wevu 7.0.1 → 7.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/dev/_virtual/{_@oxc-project_runtime@0.147.0 → _@oxc-project_runtime@0.148.0}/helpers/esm/defineProperty.mjs +1 -1
- package/dist/dev/_virtual/{_@oxc-project_runtime@0.147.0 → _@oxc-project_runtime@0.148.0}/helpers/esm/toPrimitive.mjs +1 -1
- package/dist/dev/_virtual/{_@oxc-project_runtime@0.147.0 → _@oxc-project_runtime@0.148.0}/helpers/esm/toPropertyKey.mjs +1 -1
- package/dist/dev/_virtual/{_@oxc-project_runtime@0.147.0 → _@oxc-project_runtime@0.148.0}/helpers/esm/typeof.mjs +1 -1
- package/dist/dev/package.mjs +1 -1
- package/dist/dev/reactivity/core.mjs +1 -1
- package/dist/dev/reactivity/ref.mjs +1 -1
- package/dist/package.mjs +1 -1
- package/dist/reactivity/core.mjs +1 -1
- package/dist/reactivity/ref.mjs +1 -1
- package/dist/reactivity/watch.mjs +1 -1
- package/dist/router/initialNavigation.mjs +1 -1
- package/dist/routerInternal/matching.mjs +1 -1
- package/dist/routerInternal/path.mjs +1 -1
- package/dist/routerInternal/records.mjs +1 -1
- package/dist/runtime/app/setData/scheduler.mjs +1 -1
- package/dist/runtime/defaults.mjs +1 -1
- package/dist/runtime/define/initialComputed.mjs +1 -1
- package/dist/runtime/define/optionsApi.mjs +1 -1
- package/dist/runtime/define/scopedSlotOptions.mjs +1 -1
- package/dist/runtime/pageLayout.mjs +1 -1
- package/dist/runtime/pageScroll.mjs +1 -1
- package/dist/runtime/register/component/lifecycle/platform.mjs +1 -1
- package/dist/runtime/register/component/methods.mjs +1 -1
- package/dist/runtime/register/component/props.mjs +1 -1
- package/dist/runtime/register/component/registerDefinition.mjs +1 -1
- package/dist/runtime/register/inline.mjs +1 -1
- package/dist/runtime/register/runtimeInstance/methodBridge.mjs +1 -1
- package/dist/runtime/register/runtimeInstance.mjs +1 -1
- package/dist/runtime/scopedSlots.mjs +1 -1
- package/dist/runtime/setupTracking.mjs +1 -1
- package/dist/runtime/templateRefs.mjs +1 -1
- package/dist/runtime/vueCompat/router.mjs +1 -1
- package/dist/store/define/setupStyle.mjs +1 -1
- package/package.json +2 -2
- /package/dist/_virtual/{_@oxc-project_runtime@0.147.0 → _@oxc-project_runtime@0.148.0}/helpers/esm/defineProperty.mjs +0 -0
- /package/dist/_virtual/{_@oxc-project_runtime@0.147.0 → _@oxc-project_runtime@0.148.0}/helpers/esm/toPrimitive.mjs +0 -0
- /package/dist/_virtual/{_@oxc-project_runtime@0.147.0 → _@oxc-project_runtime@0.148.0}/helpers/esm/toPropertyKey.mjs +0 -0
- /package/dist/_virtual/{_@oxc-project_runtime@0.147.0 → _@oxc-project_runtime@0.148.0}/helpers/esm/typeof.mjs +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import toPropertyKey from "./toPropertyKey.mjs";
|
|
2
2
|
|
|
3
|
-
//#region \0@oxc-project+runtime@0.
|
|
3
|
+
//#region \0@oxc-project+runtime@0.148.0/helpers/esm/defineProperty.js
|
|
4
4
|
function _defineProperty(e, r, t) {
|
|
5
5
|
return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
6
6
|
value: t,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _typeof from "./typeof.mjs";
|
|
2
2
|
|
|
3
|
-
//#region \0@oxc-project+runtime@0.
|
|
3
|
+
//#region \0@oxc-project+runtime@0.148.0/helpers/esm/toPrimitive.js
|
|
4
4
|
function toPrimitive(t, r) {
|
|
5
5
|
if ("object" != _typeof(t) || !t) return t;
|
|
6
6
|
var e = t[Symbol.toPrimitive];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _typeof from "./typeof.mjs";
|
|
2
2
|
import toPrimitive from "./toPrimitive.mjs";
|
|
3
3
|
|
|
4
|
-
//#region \0@oxc-project+runtime@0.
|
|
4
|
+
//#region \0@oxc-project+runtime@0.148.0/helpers/esm/toPropertyKey.js
|
|
5
5
|
function toPropertyKey(t) {
|
|
6
6
|
var i = toPrimitive(t, "string");
|
|
7
7
|
return "symbol" == _typeof(i) ? i : i + "";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region \0@oxc-project+runtime@0.
|
|
1
|
+
//#region \0@oxc-project+runtime@0.148.0/helpers/esm/typeof.js
|
|
2
2
|
function _typeof(o) {
|
|
3
3
|
"@babel/helpers - typeof";
|
|
4
4
|
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
|
package/dist/dev/package.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { queueJob } from "../scheduler.mjs";
|
|
2
|
-
import _defineProperty from "../_virtual/_@oxc-project_runtime@0.
|
|
2
|
+
import _defineProperty from "../_virtual/_@oxc-project_runtime@0.148.0/helpers/esm/defineProperty.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/reactivity/core.ts
|
|
5
5
|
const targetMap = /* @__PURE__ */ new WeakMap();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import _defineProperty from "../_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import _defineProperty from "../_virtual/_@oxc-project_runtime@0.148.0/helpers/esm/defineProperty.mjs";
|
|
2
2
|
import { trackEffects, triggerEffects } from "./core.mjs";
|
|
3
3
|
import { convertToReactive, markRaw } from "./reactive.mjs";
|
|
4
4
|
|
package/dist/package.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var e=`7.0.
|
|
1
|
+
var e=`7.0.2`;export{e as version};
|
package/dist/reactivity/core.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{queueJob as e}from"../scheduler.mjs";import t from"../_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import{queueJob as e}from"../scheduler.mjs";import t from"../_virtual/_@oxc-project_runtime@0.148.0/helpers/esm/defineProperty.mjs";const n=new WeakMap;let r=null;const i=[];let a=0;const o=new Set;function s(){a++}function c(){for(;o.size;){let e=[...o];o.clear();for(let t of e)t()}}function l(){a!==0&&(a--,a===0&&c())}function u(e){s();try{return e()}finally{l()}}function d(e){let{deps:t}=e;for(let n=0;n<t.length;n++)t[n].delete(e);t.length=0}function f(e){var t;e.active&&(e.active=!1,d(e),(t=e.onStop)==null||t.call(e))}let p;var m=class{constructor(e=!1){if(this.detached=e,t(this,`active`,!0),t(this,`effects`,[]),t(this,`cleanups`,[]),t(this,`parent`,void 0),t(this,`scopes`,void 0),!e&&p){var n;this.parent=p,((n=p).scopes||(n.scopes=[])).push(this)}}run(e){if(!this.active)return;let t=p;p=this;try{return e()}finally{p=t}}stop(){var e;if(this.active){this.active=!1;for(let e of this.effects)f(e);this.effects.length=0;for(let e of this.cleanups)e();if(this.cleanups.length=0,this.scopes){for(let e of this.scopes)e.stop();this.scopes.length=0}if((e=this.parent)!=null&&e.scopes){let e=this.parent.scopes.indexOf(this);e>=0&&this.parent.scopes.splice(e,1)}this.parent=void 0}}};function h(e=!1){return new m(e)}function g(){return p}function _(e){p!=null&&p.active&&p.cleanups.push(e)}function v(e){p!=null&&p.active&&p.effects.push(e)}function y(e,t={}){let n=function(){if(!n.active||n._running)return e();d(n);try{return n._running=!0,i.push(n),r=n,e()}finally{var t;i.pop(),r=(t=i[i.length-1])==null?null:t,n._running=!1}};return n.deps=[],n.scheduler=t.scheduler,n.onStop=t.onStop,n.active=!0,n._running=!1,n._fn=e,n}function b(e,t={}){let n=y(e,t);return v(n),t.lazy||n(),n}function x(e,t){if(!r)return;let i=n.get(e);i||(i=new Map,n.set(e,i));let a=i.get(t);a||(a=new Set,i.set(t,a)),a.has(r)||(a.add(r),r.deps.push(a))}function S(e){if(e.scheduler){e.scheduler();return}if(a>0){o.add(e);return}e()}function C(e,t){let i=n.get(e);if(!i)return;let a=i.get(t);if(!a)return;let o=new Set;a.forEach(e=>{e!==r&&o.add(e)}),o.forEach(S)}function w(e){r&&(e.has(r)||(e.add(r),r.deps.push(e)))}function T(e){new Set(e).forEach(S)}export{u as batch,y as createReactiveEffect,b as effect,h as effectScope,l as endBatch,g as getCurrentScope,_ as onScopeDispose,e as queueJob,s as startBatch,f as stop,x as track,w as trackEffects,C as trigger,T as triggerEffects};
|
package/dist/reactivity/ref.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"../_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import e from"../_virtual/_@oxc-project_runtime@0.148.0/helpers/esm/defineProperty.mjs";import{trackEffects as t,triggerEffects as n}from"./core.mjs";import{convertToReactive as r,markRaw as i}from"./reactive.mjs";const a=`__v_isRef`;function o(e){try{Object.defineProperty(e,a,{value:!0,configurable:!0})}catch(t){e[a]=!0}return e}function s(e){return!!(e&&typeof e==`object`&&e.__v_isRef===!0)}var c=class{constructor(t){e(this,`_value`,void 0),e(this,`_rawValue`,void 0),e(this,`dep`,void 0),o(this),this._rawValue=t,this._value=r(t)}get value(){return this.dep||(this.dep=new Set),t(this.dep),this._value}set value(e){Object.is(e,this._rawValue)||(this._rawValue=e,this._value=r(e),this.dep&&n(this.dep))}};function l(e){return s(e)?e:i(new c(e))}function u(e){return s(e)?e.value:e}function d(e){return typeof e==`function`?e():u(e)}var f=class{constructor(r,i){e(this,`_getValue`,void 0),e(this,`_setValue`,void 0),e(this,`dep`,void 0),o(this);let a=i,s=()=>{this.dep||(this.dep=new Set),t(this.dep)},c=()=>{this.dep&&n(this.dep)},l=e=>e===void 0&&a!==void 0?a:e;if(typeof r==`function`){let e=r(s,c);this._getValue=()=>l(e.get()),this._setValue=t=>e.set(t);return}let u=r;this._getValue=()=>(s(),l(u.get())),this._setValue=e=>{u.set(e),c()}}get value(){return this._getValue()}set value(e){this._setValue(e)}};function p(e,t){return i(new f(e,t))}export{a as RefFlag,p as customRef,s as isRef,o as markAsRef,l as ref,d as toValue,u as unref};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{effect as e,onScopeDispose as t,stop as n}from"./core.mjs";import{getCurrentInstance as r,setCurrentInstance as i}from"../runtime/hooks/base.mjs";import{getDeepWatchStrategy as a,setDeepWatchStrategy as o}from"./watch/types.mjs";import{applyDeepWatchGetter as s,createWatchGetter as c,dispatchScheduledJob as l}from"./watch/helpers.mjs";function u(a,o,u={}){var d;let f=r(),p=c(a),m=s(p.getter,a,p.isMultiSource,p.isReactiveSource,u.deep),h=u.deep===!0||typeof u.deep==`number`||u.deep===void 0&&p.hasReactiveSource||p.hasShallowSource,g,_=e=>{g=e},v=p.isMultiSource?[]:void 0,y,b=!1,x=0,S=x,C,w=u.once?(e,t,n)=>{o(e,t,n),C()}:o,T=(d=u.flush)==null?`pre`:d,E=(e,t)=>!p.isMultiSource||!Array.isArray(e)||!Array.isArray(t)?!Object.is(e,t):e.length!==t.length||e.some((e,n)=>!Object.is(e,t[n])),D=(e,t=!1)=>{if(!y.active||b||e!==x)return;let n=y();if(!t&&!h&&!E(n,v))return;g==null||g();let a=r();i(f);try{w(n,v,_)}finally{i(a)}v=n},O=()=>D(S),k=e=>{S=x,l(O,T,e,u.scheduler)};y=e(()=>m(),{scheduler:()=>{b||k(!1)},lazy:!0});let A=()=>{g==null||g(),g=void 0,n(y)};return C=A,C.stop=A,C.pause=()=>{b||(b=!0,x+=1)},C.resume=()=>{
|
|
1
|
+
import{effect as e,onScopeDispose as t,stop as n}from"./core.mjs";import{getCurrentInstance as r,setCurrentInstance as i}from"../runtime/hooks/base.mjs";import{getDeepWatchStrategy as a,setDeepWatchStrategy as o}from"./watch/types.mjs";import{applyDeepWatchGetter as s,createWatchGetter as c,dispatchScheduledJob as l}from"./watch/helpers.mjs";function u(a,o,u={}){var d;let f=r(),p=c(a),m=s(p.getter,a,p.isMultiSource,p.isReactiveSource,u.deep),h=u.deep===!0||typeof u.deep==`number`||u.deep===void 0&&p.hasReactiveSource||p.hasShallowSource,g,_=e=>{g=e},v=p.isMultiSource?[]:void 0,y,b=!1,x=0,S=x,C,w=u.once?(e,t,n)=>{o(e,t,n),C()}:o,T=(d=u.flush)==null?`pre`:d,E=(e,t)=>!p.isMultiSource||!Array.isArray(e)||!Array.isArray(t)?!Object.is(e,t):e.length!==t.length||e.some((e,n)=>!Object.is(e,t[n])),D=(e,t=!1)=>{if(!y.active||b||e!==x)return;let n=y();if(!t&&!h&&!E(n,v))return;g==null||g();let a=r();i(f);try{w(n,v,_)}finally{i(a)}v=n},O=()=>D(S),k=e=>{S=x,l(O,T,e,u.scheduler)};y=e(()=>m(),{scheduler:()=>{b||k(!1)},lazy:!0});let A=()=>{g==null||g(),g=void 0,n(y)};return C=A,C.stop=A,C.pause=()=>{b||(b=!0,x+=1)},C.resume=()=>{b&&y.active&&(b=!1,v=y())},u.immediate?D(x,!0):v=y(),t(C),C}function d(a,o={}){var s;let c=r(),u,d=e=>{u=e},f,p=!1,m=0,h=m,g=(s=o.flush)==null?`pre`:s,_=e=>{f.active&&!p&&e===m&&f()},v=()=>_(h),y=e=>{h=m,l(v,g,e)};f=e(()=>{u==null||u(),u=void 0;let e=r();i(c);try{a(d)}finally{i(e)}},{lazy:!0,scheduler:()=>{p||y(!1)}}),y(!0);let b=()=>{u==null||u(),u=void 0,n(f)},x=b;return x.stop=b,x.pause=()=>{p||(p=!0,m+=1)},x.resume=()=>{p&&f.active&&(p=!1,y(!0))},t(x),x}function f(e,t={}){return d(e,{...t,flush:`post`})}function p(e,t={}){return d(e,{...t,flush:`sync`})}export{a as getDeepWatchStrategy,o as setDeepWatchStrategy,u as watch,d as watchEffect,f as watchPostEffect,p as watchSyncEffect};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{getActiveRouter as e}from"./instance.mjs";import{WEVU_INITIAL_NAVIGATION_TIMEOUT_MARKER as t}from"@weapp-core/constants";const n=1e4,r=new WeakMap,i=new WeakMap;function a(e){return Number.isFinite(e)&&e>0?Math.max(1,Math.trunc(e)):n}function o(e){return{route:typeof e.route==`string`?e.route:void 0,__route__:typeof e.__route__==`string`?e.__route__:void 0,options:e.options&&typeof e.options==`object`?{...e.options}:void 0}}function s(e){if(
|
|
1
|
+
import{getActiveRouter as e}from"./instance.mjs";import{WEVU_INITIAL_NAVIGATION_TIMEOUT_MARKER as t}from"@weapp-core/constants";const n=1e4,r=new WeakMap,i=new WeakMap;function a(e){return Number.isFinite(e)&&e>0?Math.max(1,Math.trunc(e)):n}function o(e){return{route:typeof e.route==`string`?e.route:void 0,__route__:typeof e.__route__==`string`?e.__route__:void 0,options:e.options&&typeof e.options==`object`?{...e.options}:void 0}}function s(e){if(e&&typeof e==`object`)return Object.fromEntries(Object.entries(e).map(([e,t])=>[e,Array.isArray(t)?[...t]:t]))}function c(e,t,i=n,o=`blocking`){r.set(e,{runner:t,mode:o,timeoutMs:a(i)})}function l(){var t,i;let a=e();return a?(t=(i=r.get(a))==null?void 0:i.timeoutMs)==null?n:t:n}function u(e){return!!(e&&typeof e==`object`&&e.__wevuNavigationFailure)}function d(n,a,c={}){let d=i.get(n);if(d)return c.onComplete&&d.blocking&&d.subscribe(c.onComplete),c.start!==!1&&d.start(a),d.blocking?d.promise:void 0;let f=e(),p=f?r.get(f):void 0,m=p==null?void 0:p.runner;if(!m)return;let h=(p==null?void 0:p.mode)===`blocking`,g=o(n),_=s(a),v=`idle`,y,b=l(),x,S=new Set,C=new Promise(e=>{x=e}),w=(e,t)=>{if(v!==`idle`&&v!==`running`)return;v=e,y!==void 0&&(clearTimeout(y),y=void 0);let n=[...S];S.clear(),m=void 0,g=void 0,_=void 0,x(t),queueMicrotask(()=>{if(v===`allowed`||v===`timed-out`)for(let e of n)e.active&&(e.callback(t),e.active=!1)})},T={promise:C,blocking:h,status:()=>v,subscribe(e){let t={callback:e,active:!0};return v!==`idle`&&v!==`running`?queueMicrotask(()=>{t.active&&(v===`allowed`||v===`timed-out`)&&(e(v===`allowed`||v===`timed-out`),t.active=!1)}):S.add(t),()=>{t.active=!1,S.delete(t)}},start(e){if(v!==`idle`)return;v=`running`,h&&(y=setTimeout(()=>{var e,n;v===`running`&&(console.warn(`${t} initial navigation exceeded ${b}ms; mounting page`,(e=(n=g==null?void 0:g.route)==null?g==null?void 0:g.__route__:n)==null?``:e),w(`timed-out`,!0))},b));let n=g,r=s(e==null?_:e),i=m;if(m=void 0,!i||!n){w(`aborted`,!1);return}i(n,r,()=>v===`running`).then(e=>{let t=u(e);w(t?`aborted`:`allowed`,!t)},()=>{w(`aborted`,!1)})},cancel(){w(`cancelled`,!1)}};return i.set(n,T),c.onComplete&&h&&T.subscribe(c.onComplete),c.start!==!1&&T.start(a),h?C:void 0}function f(e){var t;(t=i.get(e))==null||t.cancel()}export{n as DEFAULT_INITIAL_NAVIGATION_TIMEOUT,f as cancelInitialNavigation,d as ensureInitialNavigation,l as getInitialNavigationTimeout,c as registerInitialNavigationRunner};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{isDynamicRoutePath as e}from"./path.mjs";import{decodeRouteParamSegment as t,parsePathParamToken as n}from"./params.mjs";function r(e){return e.split(`/`).filter(Boolean)}function i(e){return[e.path,...e.aliasPaths]}function a(e,t){let n=[],r=new Set,i=e;for(;i&&!(r.has(i.name)||(r.add(i.name),n.unshift(i),!i.parentName));)i=t.recordByName.get(i.parentName);return n}function o(e){let t;for(let n of e)n.meta&&(t||(t={}),Object.assign(t,n.meta));return t}function s(e,t){let n=new Set;if(!t.has(e))return n;n.add(e);let r=!0;for(;r;){r=!1;for(let[e,i]of t.entries())
|
|
1
|
+
import{isDynamicRoutePath as e}from"./path.mjs";import{decodeRouteParamSegment as t,parsePathParamToken as n}from"./params.mjs";function r(e){return e.split(`/`).filter(Boolean)}function i(e){return[e.path,...e.aliasPaths]}function a(e,t){let n=[],r=new Set,i=e;for(;i&&!(r.has(i.name)||(r.add(i.name),n.unshift(i),!i.parentName));)i=t.recordByName.get(i.parentName);return n}function o(e){let t;for(let n of e)n.meta&&(t||(t={}),Object.assign(t,n.meta));return t}function s(e,t){let n=new Set;if(!t.has(e))return n;n.add(e);let r=!0;for(;r;){r=!1;for(let[e,i]of t.entries())i.parentName&&!n.has(e)&&n.has(i.parentName)&&(n.add(e),r=!0)}return n}function c(e){let t={};for(let[n,r]of e.entries())r.length!==0&&(t[n]=r.length===1?r[0]:r);return t}function l(e,i){let a=r(e),o=r(i),s=new Map,l=(e,t)=>{let n=s.get(e);if(n){n.push(t);return}s.set(e,[t])},u=e=>{let t=s.get(e);t&&t.length!==0&&(t.pop(),t.length===0&&s.delete(e))},d=(e,n,r)=>{for(let i=0;i<r;i+=1)l(e,t(o[n+i]));return()=>{for(let t=0;t<r;t+=1)u(e)}},f=(e,r)=>{if(e>=a.length)return r>=o.length;let i=a[e],s=n(i);if(!s)return r>=o.length||i!==o[r]?!1:f(e+1,r+1);if(s.modifier===``){if(r>=o.length)return!1;l(s.key,t(o[r]));let n=f(e+1,r+1);return n||u(s.key),n}if(s.modifier===`?`){if(r<o.length){if(l(s.key,t(o[r])),f(e+1,r+1))return!0;u(s.key)}return f(e+1,r)}let c=+(s.modifier===`+`),p=o.length-r;for(let t=p;t>=c;--t){let n=d(s.key,r,t);if(f(e+1,r+t))return!0;n()}return!1};if(f(0,0))return c(s)}function u(t,n){if(t.name){let e=n.recordByName.get(t.name);if(e)return{record:e,matchedRecords:a(e,n)}}let r=n.nameByStaticPath.get(t.path);if(r){let e=n.recordByName.get(r);if(e)return{record:e,matchedRecords:a(e,n),matchedPath:t.path}}for(let r of n.recordByName.values())for(let o of i(r)){if(!e(o))continue;let i=l(o,t.path);if(i)return{record:r,matchedRecords:a(r,n),matchedPath:o,params:i}}}export{s as collectRouteNamesForRemoval,o as mergeMatchedRouteMeta,u as resolveMatchedRouteRecord};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function e(e){let t=[];for(let n of e.split(`/`))if(
|
|
1
|
+
function e(e){let t=[];for(let n of e.split(`/`))if(n&&n!==`.`){if(n===`..`){t.length>0&&t.pop();continue}t.push(n)}return t}function t(t,n){if(!t)return e(n).join(`/`);if(t.startsWith(`/`))return e(t).join(`/`);if(t.startsWith(`./`)||t.startsWith(`../`)){let r=e(n);r.length>0&&r.pop();for(let e of t.split(`/`))if(e&&e!==`.`){if(e===`..`){r.length>0&&r.pop();continue}r.push(e)}return r.join(`/`)}return e(t).join(`/`)}function n(e){return e?`/${e}`:`/`}const r=/(?:^|\/):/;function i(e){return r.test(e)}export{n as createAbsoluteRoutePath,i as isDynamicRoutePath,t as resolvePath};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createAbsoluteRoutePath as e,isDynamicRoutePath as t,resolvePath as n}from"./path.mjs";import{warnRouteConfig as r}from"./recordsWarnings.mjs";function i(e){return e?Array.isArray(e)?e:[e]:[]}function a(e,t,n=`namedRoutes`){return typeof e.name==`string`&&e.name.trim()?e.name.trim():n===`routes`?t||`/`:``}function o(e,t){if(!e)return[];let r=Array.isArray(e)?e:[e],i=[];for(let e of r){if(typeof e!=`string`)continue;let r=n(e,``)
|
|
1
|
+
import{createAbsoluteRoutePath as e,isDynamicRoutePath as t,resolvePath as n}from"./path.mjs";import{warnRouteConfig as r}from"./recordsWarnings.mjs";function i(e){return e?Array.isArray(e)?e:[e]:[]}function a(e,t,n=`namedRoutes`){return typeof e.name==`string`&&e.name.trim()?e.name.trim():n===`routes`?t||`/`:``}function o(e,t){if(!e)return[];let r=Array.isArray(e)?e:[e],i=[];for(let e of r){if(typeof e!=`string`)continue;let r=n(e,``);r&&r!==t&&(i.includes(r)||i.push(r))}return i}function s(e,t,r=`namedRoutes`){let s=n(e.path,``);if(!s&&e.path!==`/`)return;let c=a(e,s,r);if(c)return{name:c,path:s,aliasPaths:o(e.alias,s),parentName:t,meta:e.meta,beforeEnterGuards:i(e.beforeEnter),redirect:e.redirect}}function c(t,r){return!r||t.startsWith(`/`)?n(t,``):n(`${e(r)}/${t}`,``)}function l(e){return e?Array.isArray(e)?e.filter(e=>typeof e==`string`&&e.length>0):typeof e==`string`&&e.length>0?[e]:[]:[]}function u(e){let t=[];for(let n of e)n&&!t.includes(n)&&t.push(n);return t}function d(t){if(t.length!==0)return t.length===1?e(t[0]):t.map(t=>e(t))}function f(t,n,i,o=[],s,p=`namedRoutes`,m=new Set){let h=[];for(let[g,_]of t.entries()){let t=`${p}[${g}]`;if(m.has(_)){r(`ignored route record at ${t}: detected circular children reference`);continue}if(typeof _.path!=`string`||!_.path){let e=typeof(_==null?void 0:_.name)==`string`?_.name.trim():``;r(`ignored route record "${e}" at ${t}: route path is required`);continue}let v=c(_.path,n),y=a(_,v,s);if(!y){r(`ignored route record at ${t}: route name is required`);continue}let b=[],x=new Map;for(let i of l(_.alias)){let a=c(i,n);if(!a)continue;if(a===v){r(`ignored alias "${e(a)}" for route "${y}" at ${t}: alias is same as route path`);continue}let o=x.get(a);if(o){r(`ignored duplicate alias "${e(a)}" for route "${y}" at ${t}: already declared by "${o}"`);continue}x.set(a,i),b.push(a)}let S=_.path.startsWith(`/`)?[]:o.map(e=>c(_.path,e)).filter(Boolean).filter(e=>e!==v),C=u([...b,...S]),w={name:y,path:v?e(v):`/`,alias:d(C),meta:_.meta,beforeEnter:_.beforeEnter,redirect:_.redirect};if(h.push({route:w,parentName:i,source:s}),Array.isArray(_.children)&&_.children.length>0){let e=new Set(m);e.add(_),h.push(...f(_.children,v,y,C,s,`${t}.children`,e))}}return h}function p(e,t=`namedRoutes`){if(!e)return[];if(Array.isArray(e))return f(e,void 0,void 0,[],t,t);let n=[];for(let[i,a]of Object.entries(e)){let e=typeof i==`string`?i.trim():``;if(!e){r(`ignored route record at ${t}: route name is required`);continue}if(typeof a!=`string`||!a){r(`ignored route record "${e}" at ${t}: route path is required`);continue}n.push({route:{name:e,path:a},source:t})}return n}function m(e){return[...p(e.routes,`routes`),...p(e.namedRoutes,`namedRoutes`)]}function h(e){let n=new Map;for(let[r,i]of e.entries()){!t(i.path)&&!n.has(i.path)&&n.set(i.path,r);for(let e of i.aliasPaths)!t(e)&&!n.has(e)&&n.set(e,r)}return n}function g(e){let t=new Map;for(let n of e){let e=s(n.route,n.parentName,n.source);e&&t.set(e.name,e)}return{recordByName:t,nameByStaticPath:h(t)}}export{g as createNamedRouteLookup,h as createNamedRouteNameByStaticPath,d as createRouteRecordAliasValue,f as flattenNamedRouteRecords,s as normalizeRouteRecordRaw,m as resolveRouteOptionEntries};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{toRaw as e}from"../../../reactivity/reactive/shared.mjs";import{getReactiveVersion as t,isReactive as n}from"../../../reactivity/reactive.mjs";import{isRef as r}from"../../../reactivity/ref.mjs";import{hasOwn as i}from"../../../utils.mjs";import{hasTrackableSetupBinding as a}from"../../setupTracking.mjs";import{diffSnapshots as o,toPlain as s}from"../../diff.mjs";import{collectSnapshot as c}from"./snapshot.mjs";import{runPatchUpdate as l}from"./patchScheduler.mjs";function u(u){let{state:d,setupState:f,snapshotOmitKeys:p,computedRefs:m,dirtyComputedKeys:h,includeComputed:g,setDataStrategy:_,computedCompare:v,computedCompareMaxDepth:ee,computedCompareMaxKeys:te,currentAdapter:y,shouldIncludeKey:ne,maxPatchKeys:re,maxPayloadBytes:ie,mergeSiblingThreshold:ae,mergeSiblingMaxInflationRatio:b,mergeSiblingMaxParentBytes:x,mergeSiblingSkipArray:S,elevateTopKeyThreshold:C,toPlainMaxDepth:w,toPlainMaxKeys:T,includeFunctions:E=!1,functionPaths:D,debug:O,debugWhen:oe,debugSampleRate:k,loopWarning:A,targetLabel:j,runTracker:se,isMounted:M,initialSnapshot:N,initialState:P}=u,F=new WeakMap,I=new WeakMap,L={},R=Object.create(null),z=Object.create(null),B=Object.create(null),V={value:_===`patch`},H=new Map,U=new Set,W=[],G=-1/0,ce=new Set(P&&typeof P==`object`?Object.keys(P):[]),K=e=>{if(Object.prototype.toString.call(e)!==`[object Object]`)return!1;let t=Object.getPrototypeOf(e);return t===null||t===Object.prototype},q=(e,t)=>{if(Object.is(e,t))return!0;if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&e.every((e,n)=>q(e,t[n]));if(K(e)&&K(t)){let n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&n.every(n=>i(t,n)&&q(e[n],t[n]))}return!1},J=i=>{let o=r(i)?i.value:i;if(typeof o!=`object`||!o)return o;if(!n(o)&&a(o))return{snapshot:s(o,new WeakMap,{cacheEligibility:I,maxDepth:w,maxKeys:T,includeFunctions:E,functionPaths:D})};let c=n(o)?e(o):o;return{raw:c,version:t(c)}},Y=(e,t)=>Object.is(e,t)?!0:!e||!t||typeof e!=`object`||typeof t!=`object`||!i(e,`raw`)||!i(t,`raw`)?e&&t&&typeof e==`object`&&typeof t==`object`&&i(e,`snapshot`)&&i(t,`snapshot`)?q(e.snapshot,t.snapshot):!1:e.raw===t.raw&&e.version===t.version,X=e=>ne(e)&&!(p!=null&&p.has(e));if(N)for(let[e,t]of Object.entries(N))X(e)&&(L[e]=t);let le=()=>{if(!N)return;let t=n(d)?e(d):d,r=f&&typeof f==`object`?n(f)?e(f):f:void 0;for(let e of Object.keys(N))if(X(e)){if(r&&i(r,e)){z[e]=J(r[e]);continue}if(i(t,e)){if(ce.has(e))continue;t[e]=N[e],z[e]=J(t[e])}}},ue=t=>{let a=[],o=f&&typeof f==`object`?n(f)?e(f):f:void 0;for(let n of new Set([...Object.keys(d),...o?Object.keys(o):[]])){if(!X(n))continue;let s=o&&i(o,n)?o[n]:d[n],c=r(s)?s.value:s
|
|
1
|
+
import{toRaw as e}from"../../../reactivity/reactive/shared.mjs";import{getReactiveVersion as t,isReactive as n}from"../../../reactivity/reactive.mjs";import{isRef as r}from"../../../reactivity/ref.mjs";import{hasOwn as i}from"../../../utils.mjs";import{hasTrackableSetupBinding as a}from"../../setupTracking.mjs";import{diffSnapshots as o,toPlain as s}from"../../diff.mjs";import{collectSnapshot as c}from"./snapshot.mjs";import{runPatchUpdate as l}from"./patchScheduler.mjs";function u(u){let{state:d,setupState:f,snapshotOmitKeys:p,computedRefs:m,dirtyComputedKeys:h,includeComputed:g,setDataStrategy:_,computedCompare:v,computedCompareMaxDepth:ee,computedCompareMaxKeys:te,currentAdapter:y,shouldIncludeKey:ne,maxPatchKeys:re,maxPayloadBytes:ie,mergeSiblingThreshold:ae,mergeSiblingMaxInflationRatio:b,mergeSiblingMaxParentBytes:x,mergeSiblingSkipArray:S,elevateTopKeyThreshold:C,toPlainMaxDepth:w,toPlainMaxKeys:T,includeFunctions:E=!1,functionPaths:D,debug:O,debugWhen:oe,debugSampleRate:k,loopWarning:A,targetLabel:j,runTracker:se,isMounted:M,initialSnapshot:N,initialState:P}=u,F=new WeakMap,I=new WeakMap,L={},R=Object.create(null),z=Object.create(null),B=Object.create(null),V={value:_===`patch`},H=new Map,U=new Set,W=[],G=-1/0,ce=new Set(P&&typeof P==`object`?Object.keys(P):[]),K=e=>{if(Object.prototype.toString.call(e)!==`[object Object]`)return!1;let t=Object.getPrototypeOf(e);return t===null||t===Object.prototype},q=(e,t)=>{if(Object.is(e,t))return!0;if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&e.every((e,n)=>q(e,t[n]));if(K(e)&&K(t)){let n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&n.every(n=>i(t,n)&&q(e[n],t[n]))}return!1},J=i=>{let o=r(i)?i.value:i;if(typeof o!=`object`||!o)return o;if(!n(o)&&a(o))return{snapshot:s(o,new WeakMap,{cacheEligibility:I,maxDepth:w,maxKeys:T,includeFunctions:E,functionPaths:D})};let c=n(o)?e(o):o;return{raw:c,version:t(c)}},Y=(e,t)=>Object.is(e,t)?!0:!e||!t||typeof e!=`object`||typeof t!=`object`||!i(e,`raw`)||!i(t,`raw`)?e&&t&&typeof e==`object`&&typeof t==`object`&&i(e,`snapshot`)&&i(t,`snapshot`)?q(e.snapshot,t.snapshot):!1:e.raw===t.raw&&e.version===t.version,X=e=>ne(e)&&!(p!=null&&p.has(e));if(N)for(let[e,t]of Object.entries(N))X(e)&&(L[e]=t);let le=()=>{if(!N)return;let t=n(d)?e(d):d,r=f&&typeof f==`object`?n(f)?e(f):f:void 0;for(let e of Object.keys(N))if(X(e)){if(r&&i(r,e)){z[e]=J(r[e]);continue}if(i(t,e)){if(ce.has(e))continue;t[e]=N[e],z[e]=J(t[e])}}},ue=t=>{let a=[],o=f&&typeof f==`object`?n(f)?e(f):f:void 0;for(let n of new Set([...Object.keys(d),...o?Object.keys(o):[]])){if(!X(n))continue;let s=o&&i(o,n)?o[n]:d[n],c=r(s)?s.value:s;c&&typeof c==`object`&&e(c)===t&&a.push(n)}return a},Z=e=>{if(!O)return;let t=e.reason!==`patch`&&e.reason!==`diff`;if((oe!==`fallback`||t)&&!(k<1&&Math.random()>k))try{O(e)}catch(e){}},de=()=>{if(!A)return;let e=Date.now();W.push(e);let t=e-A.sampleWindowMs;for(;W.length&&W[0]<t;)W.shift();W.length<=A.maxFlushes||A.coolDownMs>0&&e-G<A.coolDownMs||(G=e,Z({mode:_,reason:`loopWarning`,pendingPatchKeys:H.size+U.size,payloadKeys:0,computedDirtyKeys:g?h.size:0,flushCount:W.length,windowMs:A.sampleWindowMs,targetLabel:j,message:`${j?`${j} `:``}疑似运行时更新循环:${W.length} 次 setData flush/${A.sampleWindowMs}ms`}))},Q=()=>c({state:d,setupState:f,computedRefs:m,includeComputed:g,shouldIncludeKey:X,plainCache:F,plainCacheEligibility:I,toPlainMaxDepth:w,toPlainMaxKeys:T,includeFunctions:E,functionPaths:D});le();let fe=()=>{let t=n(d)?e(d):d,r=f&&typeof f==`object`?n(f)?e(f):f:void 0,a={...L},o=new WeakMap,c=new Set,l=new Set,u=new Set;for(let e of new Set([...Object.keys(t),...r?Object.keys(r):[]])){if(!X(e))continue;c.add(e);let n=r&&i(r,e)?r:t,l=J(n[e]),d=z[e];d&&l&&typeof d==`object`&&typeof l==`object`&&i(d,`raw`)&&i(l,`raw`)&&Array.isArray(d.raw)&&Array.isArray(l.raw)&&d.raw!==l.raw&&u.add(e),(!Y(d,l)||!i(L,e))&&(a[e]=s(n[e],o,{cache:F,cacheEligibility:I,maxDepth:w,maxKeys:T,includeFunctions:E,functionPaths:D,_path:e})),z[e]=l}for(let e of Object.keys(z))c.has(e)||(delete z[e],(!g||!i(m,e))&&delete a[e]);if(!g){for(let e of Object.keys(B))delete B[e];return{snapshot:a,replacedTopLevelKeys:u}}for(let e of Object.keys(m)){if(!X(e))continue;l.add(e);let t=m[e].value,n=J(t);(!Y(B[e],n)||!i(L,e))&&(a[e]=s(t,o,{cache:F,cacheEligibility:I,maxDepth:w,maxKeys:T,includeFunctions:E,functionPaths:D,_path:e})),B[e]=n}for(let e of Object.keys(B))l.has(e)||(delete B[e],(!i(t,e)||!X(e))&&delete a[e]);return{snapshot:a,replacedTopLevelKeys:u}},$=(e=`diff`)=>{var t;let n=_===`diff`?fe():void 0,r=(t=n==null?void 0:n.snapshot)==null?Q():t,i=n?(()=>{let e={};for(let t of n.replacedTopLevelKeys)e[t]=r[t];return{...o(L,r,{skipKeys:n.replacedTopLevelKeys}),...e}})():o(L,r);if(L=r,V.value=!1,H.clear(),_===`patch`&&g){R=Object.create(null);for(let e of Object.keys(m))X(e)&&(R[e]=r[e]);h.clear()}if(Object.keys(i).length){if(typeof y.setData==`function`){let e=y.setData(i);if(e&&typeof e.then==`function`)return e.catch(()=>{})}Z({mode:`diff`,reason:e,pendingPatchKeys:0,payloadKeys:Object.keys(i).length})}};return{job:e=>{if(M())return de(),se(),_===`patch`&&!V.value?H.size>0||U.size>0||g&&h.size>0?l({state:d,computedRefs:m,dirtyComputedKeys:h,includeComputed:g,computedCompare:v,computedCompareMaxDepth:ee,computedCompareMaxKeys:te,currentAdapter:y,shouldIncludeKey:X,maxPatchKeys:re,maxPayloadBytes:ie,mergeSiblingThreshold:ae,mergeSiblingMaxInflationRatio:b,mergeSiblingMaxParentBytes:x,mergeSiblingSkipArray:S,elevateTopKeyThreshold:C,toPlainMaxDepth:w,toPlainMaxKeys:T,includeFunctions:E,functionPaths:D,plainCache:F,plainCacheEligibility:I,pendingPatches:H,fallbackTopKeys:U,latestSnapshot:L,latestComputedSnapshot:R,needsFullSnapshot:V,emitDebug:Z,runDiffUpdate:$}):$(`diff`):$(V.value?`needsFullSnapshot`:`diff`)},mutationRecorder:(e,t)=>{if(!M())return;if(e.root!==t){let t=ue(e.root);if(t.length)for(let e of t)U.add(e);return}if(!e.path){if(Array.isArray(e.fallbackTopKeys)&&e.fallbackTopKeys.length)for(let t of e.fallbackTopKeys)U.add(t);else V.value=!0;return}let n=e.path.split(`.`,1)[0];X(n)&&H.set(e.path,{kind:e.kind,op:e.op})},snapshot:()=>_===`patch`?Q():{...L},cloneLatestSnapshot:()=>({...L}),getLatestSnapshot:()=>L}}export{u as createSetDataScheduler};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=`__wevuDefaultsScope`;let t={};function n(e){if(
|
|
1
|
+
const e=`__wevuDefaultsScope`;let t={};function n(e){if(e&&typeof e==`object`&&!Array.isArray(e))return e}function r(e,t){if(!e)return t;if(!t)return e;let r={...e,...t},i=n(e.setData),a=n(t.setData);(i||a)&&(r.setData={...i==null?{}:i,...a==null?{}:a});let o=n(e.options),s=n(t.options);return(o||s)&&(r.options={...o==null?{}:o,...s==null?{}:s}),r}function i(e,t){return r(e,t)}function a(e,t){return{app:r(e.app,t.app),component:r(e.component,t.component)}}function o(e){t=a(t,e)}function s(){t={}}function c(e){return i(t.app,e)}function l(e){return i(t.component,e)}export{e as INTERNAL_DEFAULTS_SCOPE_KEY,c as applyWevuAppDefaults,l as applyWevuComponentDefaults,s as resetWevuDefaults,o as setWevuDefaults};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{hasOwn as e}from"../../utils.mjs";import{toPlain as t}from"../diff.mjs";import{resolveSetDataOptions as n}from"../app/setDataOptions.mjs";import{WEVU_SLOT_OWNER_ID_KEY as r}from"@weapp-core/constants";var i=class extends Error{};function a(e){if(typeof e==`function`)return e;let t=e==null?void 0:e.get;return typeof t==`function`?t:void 0}function o(e){return e.startsWith(`__wv_bind_`)||e.startsWith(`__wv_cls_`)||e.startsWith(`__wv_style_`)}function s(e,t){if(!e.startsWith(`__wv_bind_`))return!1;try{return!/\bthis\b/.test(Function.prototype.toString.call(t))}catch(e){return!1}}function c(e){if(e===r)return``;if(e.startsWith(`__wv_bind_`))return null;if(e.startsWith(`__wv_cls_`)||e.startsWith(`__wv_style_`))return``}function l(t,n){let r=Array.isArray(n==null?void 0:n.pick)?n.pick:[];if(!r.length)return;let i=new Set(Array.isArray(n==null?void 0:n.omit)?n.omit:[]),a={};for(let n of r){if(i.has(n)||e(t,n))continue;let r=c(n);r!==void 0&&(a[n]=r)}return Object.keys(a).length?a:void 0}function u(r){let{data:c,computed:l,methods:u,setData:d}=r,f=l?Object.keys(l):[];if(!f.length)return;let{includeComputed:p,shouldIncludeKey:m,toPlainMaxDepth:h,toPlainMaxKeys:g,includeFunctions:_,functionPaths:v}=n(d);if(!p)return;let y={},b=new Set,x,S=n=>{if(e(c,n)||!m(n))return{ok:!1};if(e(y,n))return{ok:!0,value:y[n]};if(b.has(n))return{ok:!1};let r=a(l[n]);if(!r)return{ok:!1};b.add(n);try{let e=r.call(x);if(e===void 0)return{ok:!1};let i=t(e,new WeakMap,{maxDepth:h,maxKeys:g,includeFunctions:_,functionPaths:v,_path:n});return i===void 0?{ok:!1}:(y[n]=i,{ok:!0,value:i})}catch(e){return{ok:!1}}finally{b.delete(n)}};x=new Proxy(c,{get(t,n,r){if(typeof n==`string`){if(n===`data`||n===`$state`)return c;if(n===`props`||n===`$props`||n===`$attrs`)throw new i;if(e(c,n))return Reflect.get(t,n,r);if(u&&e(u,n)){let e=u[n];return typeof e==`function`?e.bind(x):e}if(l&&e(l,n)){let e=S(n);if(e.ok)return e.value;throw new i}throw new i}return Reflect.get(t,n,r)},has(t,n){return Reflect.has(t,n)||typeof n==`string`&&!!(l&&e(l,n))}});for(let e of f){let t=a(l[e]);o(e)&&
|
|
1
|
+
import{hasOwn as e}from"../../utils.mjs";import{toPlain as t}from"../diff.mjs";import{resolveSetDataOptions as n}from"../app/setDataOptions.mjs";import{WEVU_SLOT_OWNER_ID_KEY as r}from"@weapp-core/constants";var i=class extends Error{};function a(e){if(typeof e==`function`)return e;let t=e==null?void 0:e.get;return typeof t==`function`?t:void 0}function o(e){return e.startsWith(`__wv_bind_`)||e.startsWith(`__wv_cls_`)||e.startsWith(`__wv_style_`)}function s(e,t){if(!e.startsWith(`__wv_bind_`))return!1;try{return!/\bthis\b/.test(Function.prototype.toString.call(t))}catch(e){return!1}}function c(e){if(e===r)return``;if(e.startsWith(`__wv_bind_`))return null;if(e.startsWith(`__wv_cls_`)||e.startsWith(`__wv_style_`))return``}function l(t,n){let r=Array.isArray(n==null?void 0:n.pick)?n.pick:[];if(!r.length)return;let i=new Set(Array.isArray(n==null?void 0:n.omit)?n.omit:[]),a={};for(let n of r){if(i.has(n)||e(t,n))continue;let r=c(n);r!==void 0&&(a[n]=r)}return Object.keys(a).length?a:void 0}function u(r){let{data:c,computed:l,methods:u,setData:d}=r,f=l?Object.keys(l):[];if(!f.length)return;let{includeComputed:p,shouldIncludeKey:m,toPlainMaxDepth:h,toPlainMaxKeys:g,includeFunctions:_,functionPaths:v}=n(d);if(!p)return;let y={},b=new Set,x,S=n=>{if(e(c,n)||!m(n))return{ok:!1};if(e(y,n))return{ok:!0,value:y[n]};if(b.has(n))return{ok:!1};let r=a(l[n]);if(!r)return{ok:!1};b.add(n);try{let e=r.call(x);if(e===void 0)return{ok:!1};let i=t(e,new WeakMap,{maxDepth:h,maxKeys:g,includeFunctions:_,functionPaths:v,_path:n});return i===void 0?{ok:!1}:(y[n]=i,{ok:!0,value:i})}catch(e){return{ok:!1}}finally{b.delete(n)}};x=new Proxy(c,{get(t,n,r){if(typeof n==`string`){if(n===`data`||n===`$state`)return c;if(n===`props`||n===`$props`||n===`$attrs`)throw new i;if(e(c,n))return Reflect.get(t,n,r);if(u&&e(u,n)){let e=u[n];return typeof e==`function`?e.bind(x):e}if(l&&e(l,n)){let e=S(n);if(e.ok)return e.value;throw new i}throw new i}return Reflect.get(t,n,r)},has(t,n){return Reflect.has(t,n)||typeof n==`string`&&!!(l&&e(l,n))}});for(let e of f){let t=a(l[e]);(!o(e)||t&&s(e,t))&&S(e)}return Object.keys(y).length?y:void 0}function d(e,t,n,r){if(!e||typeof e!=`object`)return e;let i=u({data:e,computed:t,methods:r,setData:n}),a=l(e,n);return i||a?{...e,...a,...i}:e}export{u as resolveInitialComputedData,d as resolveNativeInitialData};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{hasOwn as e}from"../../utils.mjs";import{inject as t,provide as n}from"../provide.mjs";const r=Symbol(`wevu-missing-options-api-injection`);function i(t){if(typeof t==`string`||typeof t==`symbol`)return{from:t};if(!t||typeof t!=`object`)return;let n=t;return{from:n.from,hasDefault:e(n,`default`),defaultValue:n.default}}function a(e,t){return typeof e==`function`?e.call(t):e}function o(e,n){let o={};if(Array.isArray(e)){for(let n of e)(typeof n==`string`||typeof n==`symbol`)&&(o[n]=t(n));return o}if(!e||typeof e!=`object`)return o;for(let[s,c]of Object.entries(e)){let e=i(c);if(!e||e.from==null)continue;let l=t(e.from,r);o[s]=l===r&&e.hasDefault?a(e.defaultValue,n):l===r?void 0:l}return o}function s(e,t){let r=typeof e==`function`?e.call(t):e;if(
|
|
1
|
+
import{hasOwn as e}from"../../utils.mjs";import{inject as t,provide as n}from"../provide.mjs";const r=Symbol(`wevu-missing-options-api-injection`);function i(t){if(typeof t==`string`||typeof t==`symbol`)return{from:t};if(!t||typeof t!=`object`)return;let n=t;return{from:n.from,hasDefault:e(n,`default`),defaultValue:n.default}}function a(e,t){return typeof e==`function`?e.call(t):e}function o(e,n){let o={};if(Array.isArray(e)){for(let n of e)(typeof n==`string`||typeof n==`symbol`)&&(o[n]=t(n));return o}if(!e||typeof e!=`object`)return o;for(let[s,c]of Object.entries(e)){let e=i(c);if(!e||e.from==null)continue;let l=t(e.from,r);o[s]=l===r&&e.hasDefault?a(e.defaultValue,n):l===r?void 0:l}return o}function s(e,t){let r=typeof e==`function`?e.call(t):e;if(r&&typeof r==`object`)for(let e of Reflect.ownKeys(r))n(e,Reflect.get(r,e))}export{s as applyOptionsApiProvide,o as resolveOptionsApiInjections};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{hasOwn as e}from"../../utils.mjs";import{cloneSnapshotValue as t,isDeepEqualValue as n}from"../app/setData/snapshot.mjs";import{resolveDatasetEventValue as r,runInlineExpression as i}from"../register/inline.mjs";import{getOwnerProxy as a,getOwnerSnapshot as o,getOwnerTarget as s,subscribeOwner as c}from"../scopedSlots.mjs";import{clearTemplateRefs as l,scheduleTemplateRefUpdate as u}from"../templateRefs.mjs";import{WEVU_INLINE_HANDLER as d,WEVU_INLINE_MAP_KEY as f,WEVU_OWNER_HANDLER as p,WEVU_PROPS_DERIVED_KEYS_KEY as m,WEVU_PUBLIC_RUNTIME_KEY as h,WEVU_SLOT_FUNCTION_TOKEN as g,WEVU_SLOT_OWNER_ID_KEY as _,WEVU_SLOT_OWNER_ID_PROP as v,WEVU_SLOT_OWNER_KEY as y,WEVU_SLOT_OWNER_PROXY_KEY as b,WEVU_SLOT_PROPS_DATA_KEY as x,WEVU_SLOT_PROPS_KEY as S,WEVU_SLOT_SCOPE_KEY as C,WEVU_TEMPLATE_REFS_KEY as w}from"@weapp-core/constants";const T=[_,v,b,y,x,S,C],E=/&/g,D=/"/g,O=/"/g,k=/'/g,A=/'/g,j=/</g,M=/>/g;function N(e){return e.replace(E,`&`).replace(D,`"`).replace(O,`"`).replace(k,`'`).replace(A,`'`).replace(j,`<`).replace(M,`>`)}function P(e){var t,n,i,a;let o=(t=(n=e==null||(i=e.currentTarget)==null?void 0:i.dataset)==null?e==null||(a=e.target)==null?void 0:a.dataset:n)==null?{}:t,s=r(o,`wvArgs`,e),c=[];if(Array.isArray(s))c=s;else if(typeof s==`string`)try{c=JSON.parse(s)}catch(e){try{c=JSON.parse(N(s))}catch(e){c=[]}}return Array.isArray(c)||(c=[]),c.map(t=>t===`$event`?e:t)}function F(e){if(!e||typeof e!=`object`)return{};if(Array.isArray(e)){let t={};for(let n=0;n<e.length;n+=2){let r=e[n];typeof r==`string`&&r&&(t[r]=e[n+1])}return t}return e}function I(e){return Array.isArray(e)&&e[0]===g&&typeof e[1]==`string`}function L(e,t){return(...n)=>{var r;let i=e==null||(r=e.selectOwnerComponent)==null?void 0:r.call(e),a=i==null?void 0:i[d];if(typeof a!=`function`)return;let o={wd:1,wi:t[1]},s=Array.isArray(t[2])?t[2]:[],c=Array.isArray(t[3])?t[3]:[];s.forEach((e,t)=>o[`wvS${t}`]=e),c.forEach((e,t)=>o[`wvI${t}`]=e);let l={type:`wv-slot-function`,detail:n,currentTarget:{dataset:o},target:{dataset:o}};return a.call(i,l)}}function R(e,t){return Object.fromEntries(Object.entries(t).map(([t,n])=>[t,I(n)?L(e,n):n]))}function z(e){var t,n,r,i;return(t=(n=e==null||(r=e.__wevu)==null?void 0:r.proxy)==null?e==null||(i=e[h])==null?void 0:i.proxy:n)==null?e:t}function B(e,t){if(!t||Object.keys(t).length===0)return;let n=z(e),r={};for(let[e,i]of Object.entries(t))try{let t;typeof i==`function`?t=i.call(n):typeof(i==null?void 0:i.get)==`function`&&(t=i.get.call(n)),t!==void 0&&(r[e]=t)}catch(e){}return r}function V(e){var t,n;e==null||(t=e.__wevu)==null||(n=t.__wevu_flushSetupSnapshotSync)==null||n.call(t)}function H(r,i,a){var o;V(r);let s=B(r,i);if(!s||typeof(r==null?void 0:r.setData)!=`function`)return;let c=e(r,`__wvScopedSlotComputedSnapshot`),l=(o=r.__wvScopedSlotComputedSnapshot)==null?{}:o,u={},d={};for(let[r,i]of Object.entries(s))u[r]=t(i),(a!=null&&a.force||!c||!e(l,r)||!n(l[r],i,20,{keys:1e4}))&&(d[r]=i);for(let t of Object.keys(l))e(s,t)||(d[t]=null);r.__wvScopedSlotComputedSnapshot=u,Object.keys(d).length>0&&r.setData(d)}function U(r,i){var a,o,s,c,l;let u=e(i==null?{}:i,C)?i[C]:r==null||(a=r.properties)==null?void 0:a[C],d=e(i==null?{}:i,S)?i[S]:r==null||(o=r.properties)==null?void 0:o[S],f=F(u),p=F(d),m={...f,...p},h=!e(r,`__wvSlotPropsSnapshot`)||!n((s=r.__wvSlotPropsSnapshot)==null?{}:s,m,20,{keys:1e4}),g=h||!r[x]?R(r,m):r[x];h&&(r.__wvSlotPropsSnapshot=t(m)),r[x]=g;let _=r==null||(c=r.__wevu)==null?void 0:c.state,v
|
|
1
|
+
import{hasOwn as e}from"../../utils.mjs";import{cloneSnapshotValue as t,isDeepEqualValue as n}from"../app/setData/snapshot.mjs";import{resolveDatasetEventValue as r,runInlineExpression as i}from"../register/inline.mjs";import{getOwnerProxy as a,getOwnerSnapshot as o,getOwnerTarget as s,subscribeOwner as c}from"../scopedSlots.mjs";import{clearTemplateRefs as l,scheduleTemplateRefUpdate as u}from"../templateRefs.mjs";import{WEVU_INLINE_HANDLER as d,WEVU_INLINE_MAP_KEY as f,WEVU_OWNER_HANDLER as p,WEVU_PROPS_DERIVED_KEYS_KEY as m,WEVU_PUBLIC_RUNTIME_KEY as h,WEVU_SLOT_FUNCTION_TOKEN as g,WEVU_SLOT_OWNER_ID_KEY as _,WEVU_SLOT_OWNER_ID_PROP as v,WEVU_SLOT_OWNER_KEY as y,WEVU_SLOT_OWNER_PROXY_KEY as b,WEVU_SLOT_PROPS_DATA_KEY as x,WEVU_SLOT_PROPS_KEY as S,WEVU_SLOT_SCOPE_KEY as C,WEVU_TEMPLATE_REFS_KEY as w}from"@weapp-core/constants";const T=[_,v,b,y,x,S,C],E=/&/g,D=/"/g,O=/"/g,k=/'/g,A=/'/g,j=/</g,M=/>/g;function N(e){return e.replace(E,`&`).replace(D,`"`).replace(O,`"`).replace(k,`'`).replace(A,`'`).replace(j,`<`).replace(M,`>`)}function P(e){var t,n,i,a;let o=(t=(n=e==null||(i=e.currentTarget)==null?void 0:i.dataset)==null?e==null||(a=e.target)==null?void 0:a.dataset:n)==null?{}:t,s=r(o,`wvArgs`,e),c=[];if(Array.isArray(s))c=s;else if(typeof s==`string`)try{c=JSON.parse(s)}catch(e){try{c=JSON.parse(N(s))}catch(e){c=[]}}return Array.isArray(c)||(c=[]),c.map(t=>t===`$event`?e:t)}function F(e){if(!e||typeof e!=`object`)return{};if(Array.isArray(e)){let t={};for(let n=0;n<e.length;n+=2){let r=e[n];typeof r==`string`&&r&&(t[r]=e[n+1])}return t}return e}function I(e){return Array.isArray(e)&&e[0]===g&&typeof e[1]==`string`}function L(e,t){return(...n)=>{var r;let i=e==null||(r=e.selectOwnerComponent)==null?void 0:r.call(e),a=i==null?void 0:i[d];if(typeof a!=`function`)return;let o={wd:1,wi:t[1]},s=Array.isArray(t[2])?t[2]:[],c=Array.isArray(t[3])?t[3]:[];s.forEach((e,t)=>o[`wvS${t}`]=e),c.forEach((e,t)=>o[`wvI${t}`]=e);let l={type:`wv-slot-function`,detail:n,currentTarget:{dataset:o},target:{dataset:o}};return a.call(i,l)}}function R(e,t){return Object.fromEntries(Object.entries(t).map(([t,n])=>[t,I(n)?L(e,n):n]))}function z(e){var t,n,r,i;return(t=(n=e==null||(r=e.__wevu)==null?void 0:r.proxy)==null?e==null||(i=e[h])==null?void 0:i.proxy:n)==null?e:t}function B(e,t){if(!t||Object.keys(t).length===0)return;let n=z(e),r={};for(let[e,i]of Object.entries(t))try{let t;typeof i==`function`?t=i.call(n):typeof(i==null?void 0:i.get)==`function`&&(t=i.get.call(n)),t!==void 0&&(r[e]=t)}catch(e){}return r}function V(e){var t,n;e==null||(t=e.__wevu)==null||(n=t.__wevu_flushSetupSnapshotSync)==null||n.call(t)}function H(r,i,a){var o;V(r);let s=B(r,i);if(!s||typeof(r==null?void 0:r.setData)!=`function`)return;let c=e(r,`__wvScopedSlotComputedSnapshot`),l=(o=r.__wvScopedSlotComputedSnapshot)==null?{}:o,u={},d={};for(let[r,i]of Object.entries(s))u[r]=t(i),(a!=null&&a.force||!c||!e(l,r)||!n(l[r],i,20,{keys:1e4}))&&(d[r]=i);for(let t of Object.keys(l))e(s,t)||(d[t]=null);r.__wvScopedSlotComputedSnapshot=u,Object.keys(d).length>0&&r.setData(d)}function U(r,i){var a,o,s,c,l;let u=e(i==null?{}:i,C)?i[C]:r==null||(a=r.properties)==null?void 0:a[C],d=e(i==null?{}:i,S)?i[S]:r==null||(o=r.properties)==null?void 0:o[S],f=F(u),p=F(d),m={...f,...p},h=!e(r,`__wvSlotPropsSnapshot`)||!n((s=r.__wvSlotPropsSnapshot)==null?{}:s,m,20,{keys:1e4}),g=h||!r[x]?R(r,m):r[x];h&&(r.__wvSlotPropsSnapshot=t(m)),r[x]=g;let _=r==null||(c=r.__wevu)==null?void 0:c.state,v=!(!_||typeof _!=`object`||e(_,x)&&n((l=_[x])==null?{}:l,m,20,{keys:1e4}));return _&&typeof _==`object`&&(_[x]=g),{merged:g,runtimeSnapshotChanged:v,snapshot:m,snapshotChanged:h}}function W(e,t,n){let{runtimeSnapshotChanged:r,snapshot:i,snapshotChanged:a}=U(e,n);(a||r)&&typeof(e==null?void 0:e.setData)==`function`&&e.setData({[x]:i}),a&&H(e,t)}function G(e,t){var n;let r=!1;e[b]!==t&&(e[b]=t,r=!0);let i=e==null?void 0:e.data;if(i&&typeof i==`object`&&i[b]!==t){try{Object.defineProperty(i,b,{value:t,configurable:!0,enumerable:!1,writable:!0})}catch(e){i[b]=t}r=!0}let a=e==null||(n=e.__wevu)==null?void 0:n.state;return a&&typeof a==`object`&&a[b]!==t&&(a[b]=t,r=!0),r}function K(e){if(!e||typeof e!=`object`)return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function q(e,n,r,i){if(typeof e==`function`){r[n]=e;return}if(typeof e!=`object`||!e)return e;if(i.has(e))return;if(Array.isArray(e)){i.add(e);let t=e.map((e,t)=>{let a=q(e,`${n}.${t}`,r,i);return a===void 0?null:a});return i.delete(e),t}if(!K(e))return t(e);i.add(e);let a={};for(let[t,o]of Object.entries(e)){let e=q(o,`${n}.${t}`,r,i);e!==void 0&&(a[t]=e)}return i.delete(e),a}function J(e){let t={},n=q(e,y,t,new WeakSet);return{[y]:n,...t}}function Y(r,i,a,o){var s;let c=G(r,a),{snapshotChanged:l}=U(r),u=i||{},d=!e(r,`__wvOwnerSnapshot`)||!n((s=r.__wvOwnerSnapshot)==null?{}:s,u,20,{keys:1e4});if(d){var f;r.__wvOwnerSnapshot=t(u),r[y]=u;let e=r==null||(f=r.__wevu)==null?void 0:f.state;e&&typeof e==`object`&&(e[y]=u)}d&&typeof(r==null?void 0:r.setData)==`function`&&r.setData(J(u)),(d||c||l)&&H(r,o)}function X(e,t,n){if(!t){typeof(e==null?void 0:e.__wvOwnerUnsub)==`function`&&e.__wvOwnerUnsub(),e.__wvOwnerUnsub=void 0,e.__wvOwnerBoundId=``,G(e,void 0);return}let r=(t,r)=>{Y(e,t,r,n)};e.__wvOwnerBoundId!==t&&(typeof e.__wvOwnerUnsub==`function`&&e.__wvOwnerUnsub(),e.__wvOwnerBoundId=t,e.__wvOwnerUnsub=c(t,r));let i=o(t);i&&r(i,a(t))}function Z(e){var t,n,r,i;return(t=(n=e==null||(r=e.properties)==null?void 0:r[v])==null?e==null||(i=e.properties)==null?void 0:i[_]:n)==null?``:t}function Q(e,t){W(e,t);let n=Z(e);n&&X(e,n,t)}function $(){let e={[y]:{},[x]:{}};return Object.defineProperty(e,b,{value:void 0,configurable:!0,enumerable:!1,writable:!0}),e}function ee(e){let t=e==null?void 0:e.computed,n=e==null?void 0:e.templateRefs,a=e=>{let t=Z(e);return t?s(t):void 0},o={options:{virtualHost:!0},setData:{omit:T},[m]:T,properties:{[v]:{type:String,value:``,observer(e){X(this,e||``,t)}},[_]:{type:String,value:``,observer(e){X(this,e||``,t)}},[S]:{type:null,value:null,observer(e){W(this,t,{[S]:e})}},[C]:{type:null,value:null,observer(e){W(this,t,{[C]:e})}}},data:$,lifetimes:{attached(){Q(this,t)},ready(){Q(this,t),H(this,t,{force:!0});let e=a(this);e&&u(this,void 0,e)},detached(){let e=a(this);e&&l(this,e),typeof this.__wvOwnerUnsub==`function`&&this.__wvOwnerUnsub(),this.__wvOwnerUnsub=void 0,this.__wvOwnerBoundId=``,G(this,void 0)}},methods:{[p](e){var t,n,a,o,s;let c=this[b],l=(t=this.__wevu)==null||(t=t.methods)==null?void 0:t[f],u=i(c,void 0,e,l);if(u!==void 0)return u;if(!c)return;let d=(n=(a=e==null||(o=e.currentTarget)==null?void 0:o.dataset)==null?e==null||(s=e.target)==null?void 0:s.dataset:a)==null?{}:n,p=r(d,`wvHandler`,e);if(typeof p!=`string`||!p)return;let m=c==null?void 0:c[p];if(typeof m!=`function`)return;let h=P(e);return m.apply(c,h)}}};return e!=null&&e.computed&&Object.keys(e.computed).length>0&&(o.computed=e.computed),e!=null&&e.inlineMap&&Object.keys(e.inlineMap).length>0&&(o.methods={...o.methods,[f]:e.inlineMap}),n!=null&&n.length&&(o[w]=n),o}export{ee as createScopedSlotOptions};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{reactive as e}from"../reactivity/reactive.mjs";import{readonly as t}from"../reactivity/readonly.mjs";import{getCurrentMiniProgramPages as n}from"./platform.mjs";import{getCurrentInstance as r,getCurrentSetupContext as i}from"./hooks/base.mjs";import{getCurrentPageInstance as a}from"./register/component/lifecycle/platform.mjs";import{WEVU_PAGE_LAYOUT_NAME_KEY as o,WEVU_PAGE_LAYOUT_NONE as s,WEVU_PAGE_LAYOUT_PROPS_KEY as c,WEVU_PAGE_LAYOUT_SETTER_KEY as l}from"@weapp-core/constants";function u(){let e=a();if(e)return e;let t=n();return t[t.length-1]}function d(e){return e!==s&&e}function f(){var n,a;if(!i())throw Error(`usePageLayout() 必须在 setup() 的同步阶段调用`);let s=r(),l=s==null||(n=s.__wevu)==null?void 0:n.state,u=e({name:d(l==null?void 0:l[o]),props:{...(a=l==null?void 0:l[c])==null?{}:a}});return s&&(s.__wevuPageLayoutState=u),t(u)}function p(e,t,n){let r=e.__wevuPageLayoutState;r&&(r.name=t,r.props={...n})}function m(e){var t,n;let r=e.__wevuPageLayoutState,i=(t=e.__wevu)==null?void 0:t.state
|
|
1
|
+
import{reactive as e}from"../reactivity/reactive.mjs";import{readonly as t}from"../reactivity/readonly.mjs";import{getCurrentMiniProgramPages as n}from"./platform.mjs";import{getCurrentInstance as r,getCurrentSetupContext as i}from"./hooks/base.mjs";import{getCurrentPageInstance as a}from"./register/component/lifecycle/platform.mjs";import{WEVU_PAGE_LAYOUT_NAME_KEY as o,WEVU_PAGE_LAYOUT_NONE as s,WEVU_PAGE_LAYOUT_PROPS_KEY as c,WEVU_PAGE_LAYOUT_SETTER_KEY as l}from"@weapp-core/constants";function u(){let e=a();if(e)return e;let t=n();return t[t.length-1]}function d(e){return e!==s&&e}function f(){var n,a;if(!i())throw Error(`usePageLayout() 必须在 setup() 的同步阶段调用`);let s=r(),l=s==null||(n=s.__wevu)==null?void 0:n.state,u=e({name:d(l==null?void 0:l[o]),props:{...(a=l==null?void 0:l[c])==null?{}:a}});return s&&(s.__wevuPageLayoutState=u),t(u)}function p(e,t,n){let r=e.__wevuPageLayoutState;r&&(r.name=t,r.props={...n})}function m(e){var t,n;let r=e.__wevuPageLayoutState,i=(t=e.__wevu)==null?void 0:t.state;r&&i&&(r.name=d(i[o]),r.props={...(n=i[c])==null?{}:n})}function h(e,t){let n=r(),i=n==null?void 0:n[l];if(typeof i==`function`){i(e,t);return}let a=u(),o=a==null?void 0:a[l];if(typeof o==`function`){o(e,t);return}throw Error(`setPageLayout() 未找到当前页面实例。请在页面 setup()、事件回调或当前页面上下文中调用。`)}function g(e){return e===!1?s:e}export{g as resolveRuntimePageLayoutName,h as setPageLayout,p as syncRuntimePageLayoutState,m as syncRuntimePageLayoutStateFromRuntime,f as usePageLayout};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{getCurrentInstance as e}from"./hooks/base.mjs";import{onDetached as t,onPageScroll as n,onUnload as r}from"./hooks/register.mjs";function i(e){return typeof e!=`number`||!Number.isFinite(e)?80:Math.max(0,e)}function a(e){if(
|
|
1
|
+
import{getCurrentInstance as e}from"./hooks/base.mjs";import{onDetached as t,onPageScroll as n,onUnload as r}from"./hooks/register.mjs";function i(e){return typeof e!=`number`||!Number.isFinite(e)?80:Math.max(0,e)}function a(e){if(typeof e==`number`&&Number.isFinite(e))return Math.max(0,e)}function o(o,s={}){var c,l;if(!e())throw Error(`usePageScrollThrottle() 必须在 setup() 的同步阶段调用`);if(typeof o!=`function`)throw TypeError(`usePageScrollThrottle() 需要传入回调函数`);let u=i(s.interval),d=(c=s.leading)==null||c,f=(l=s.trailing)==null||l,p=a(s.maxWait),m,h,g=!1,_=0,v,y=()=>{m&&(clearTimeout(m),m=void 0)},b=()=>{h&&(clearTimeout(h),h=void 0)},x=e=>{y(),b(),v=void 0,_=Date.now(),o(e)},S=()=>{let e=v;v=void 0,m=void 0,e&&!g&&x(e)},C=()=>{let e=v;h=void 0,e&&!g&&x(e)},w=e=>{if(!f||m)return;let t=Math.max(0,u-(e-(_===0?e:_)));m=setTimeout(S,t)},T=e=>{if(typeof p!=`number`||h)return;let t=p-(e-(_===0?e:_));if(t<=0){C();return}h=setTimeout(C,t)};n(e=>{if(g)return;if(u===0){x(e);return}let t=Date.now();if(v=e,d&&(_===0||t-_>=u)){x(e);return}if(typeof p==`number`&&t-(_===0?t:_)>=p){x(e);return}(f||typeof p==`number`)&&(w(t),T(t))});let E=()=>{g||(g=!0,v=void 0,y(),b())};return r(E),t(E),E}export{o as usePageScrollThrottle};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{getCurrentMiniProgramPages as e,getCurrentMiniProgramRuntimeCapabilities as t,getMiniProgramGlobalObject as n,supportsCurrentMiniProgramRuntimeCapability as r}from"../../../platform.mjs";import{callHookList as i}from"../../../hooks/base.mjs";import{WEVU_PAGE_SCROLL_HOOK_DEPTH_KEY as a}from"@weapp-core/constants";let o=!1,s;function c(){return s}function l(e){s=e}function u(e){s===e&&(s=void 0)}function d(e,t){var n;let r=Number((n=e[a])==null?0:n);e[a]=r+1;try{return t()}finally{var i;let t=Number((i=e[a])==null?1:i)-1;t<=0?delete e[a]:e[a]=t}}function f(t){let n=t.options;if(n&&typeof n==`object`)return n;let r=e(),i=r[r.length-1],a=i&&typeof i==`object`?i.options:void 0;return a&&typeof a==`object`?a:{}}function p(){if(o)return;o=!0;let e=n();if(
|
|
1
|
+
import{getCurrentMiniProgramPages as e,getCurrentMiniProgramRuntimeCapabilities as t,getMiniProgramGlobalObject as n,supportsCurrentMiniProgramRuntimeCapability as r}from"../../../platform.mjs";import{callHookList as i}from"../../../hooks/base.mjs";import{WEVU_PAGE_SCROLL_HOOK_DEPTH_KEY as a}from"@weapp-core/constants";let o=!1,s;function c(){return s}function l(e){s=e}function u(e){s===e&&(s=void 0)}function d(e,t){var n;let r=Number((n=e[a])==null?0:n);e[a]=r+1;try{return t()}finally{var i;let t=Number((i=e[a])==null?1:i)-1;t<=0?delete e[a]:e[a]=t}}function f(t){let n=t.options;if(n&&typeof n==`object`)return n;let r=e(),i=r[r.length-1],a=i&&typeof i==`object`?i.options:void 0;return a&&typeof a==`object`?a:{}}function p(){if(o)return;o=!0;let e=n();if(e&&typeof e==`object`){if(r(`pullDownRefreshApi`)){let t=e.startPullDownRefresh;typeof t==`function`&&(e.startPullDownRefresh=function(...e){let n=t.apply(this,e);return s&&i(s,`onPullDownRefresh`,[]),n})}if(r(`pageScrollApi`)){let t=e.pageScrollTo;typeof t==`function`&&(e.pageScrollTo=function(e,...n){let r=t.apply(this,[e,...n]);if(s){let t=s;d(t,()=>{i(t,`onPageScroll`,[e==null?{}:e])})}return r})}}}function m(e){let{enableOnShareAppMessage:i,enableOnShareTimeline:a}=e;if(!i&&!a||!r(`pageShareMenu`))return;let o=n();if(!o||typeof o.showShareMenu!=`function`)return;let s=t().shareTimelineRequiresShareAppMessage?i||a:i;if(!s&&!a)return;let c=[];s&&c.push(`shareAppMessage`),a&&c.push(`shareTimeline`);let l=[{withShareTicket:!0,menus:c},{menus:c},a?{withShareTicket:!0}:void 0,a?{}:void 0,void 0];for(let e of l)try{e===void 0?o.showShareMenu():o.showShareMenu(e);break}catch(e){}}export{l as bindCurrentPageInstance,p as ensureMiniProgramGlobalPatched,m as ensurePageShareMenus,c as getCurrentPageInstance,u as releaseCurrentPageInstance,f as resolvePageOptions,d as runInPageScrollHook};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{parseModelEventValue as e}from"../../internal.mjs";import{runInlineExpression as t}from"../inline.mjs";import{runJsxIslandHandler as n}from"../../jsxIsland.mjs";import{WEVU_INLINE_HANDLER as r,WEVU_INLINE_MAP_KEY as i,WEVU_JSX_ISLAND_HANDLER as a,WEVU_MODEL_HANDLER as o,WEVU_NATIVE_INSTANCE_KEY as s,WEVU_OWNER_HANDLER as c,WEVU_RESERVED_METHOD_PREFIX as l,WEVU_RUNTIME_KEY as u}from"@weapp-core/constants";function d(d){let{userMethods:f,runtimeMethods:p}=d,m={...f};m[r]||(m[r]=function(e){var n,r;let a=this.__wevu,o=(n=a==null?void 0:a.proxy)==null?this:n,s=a==null||(r=a.methods)==null?void 0:r[i];return t(o,void 0,e,s)}),m[o]||(m[o]=function(t){var n,r,i;let a=(n=t==null||(r=t.currentTarget)==null||(r=r.dataset)==null?void 0:r.wvModel)==null?t==null||(i=t.target)==null||(i=i.dataset)==null?void 0:i.wvModel:n;if(typeof a!=`string`||!a)return;let o=this.__wevu;if(!o||typeof o.bindModel!=`function`)return;let s=e(t);try{o.bindModel(a).update(s)}catch(e){}}),m[a]||(m[a]=function(e){return n(this,e)}),!m[c]&&typeof(p==null?void 0:p[c])==`function`&&(m[c]=p[c]);let h=Object.keys(p==null?{}:p);function g(e){let t=e.__wevu;if(t)return t;let n=e.$state;if(n&&typeof n==`object`)return n[u]}function _(e,t){if((e==null?void 0:e.proxy)===t)return;let n=e==null?void 0:e.proxy,r=e=>{let r=t[e];if(typeof r!=`function`)return!1;let i=n==null?void 0:n[e];return typeof i==`function`&&r===i};if(r(`triggerEvent`)||r(`createSelectorQuery`)||r(`createIntersectionObserver`)||r(`setData`)||typeof t.triggerEvent!=`function`&&typeof t.createSelectorQuery!=`function`&&typeof t.createIntersectionObserver!=`function`&&typeof t.setData!=`function`)return;let i=e==null?void 0:e.state;if(
|
|
1
|
+
import{parseModelEventValue as e}from"../../internal.mjs";import{runInlineExpression as t}from"../inline.mjs";import{runJsxIslandHandler as n}from"../../jsxIsland.mjs";import{WEVU_INLINE_HANDLER as r,WEVU_INLINE_MAP_KEY as i,WEVU_JSX_ISLAND_HANDLER as a,WEVU_MODEL_HANDLER as o,WEVU_NATIVE_INSTANCE_KEY as s,WEVU_OWNER_HANDLER as c,WEVU_RESERVED_METHOD_PREFIX as l,WEVU_RUNTIME_KEY as u}from"@weapp-core/constants";function d(d){let{userMethods:f,runtimeMethods:p}=d,m={...f};m[r]||(m[r]=function(e){var n,r;let a=this.__wevu,o=(n=a==null?void 0:a.proxy)==null?this:n,s=a==null||(r=a.methods)==null?void 0:r[i];return t(o,void 0,e,s)}),m[o]||(m[o]=function(t){var n,r,i;let a=(n=t==null||(r=t.currentTarget)==null||(r=r.dataset)==null?void 0:r.wvModel)==null?t==null||(i=t.target)==null||(i=i.dataset)==null?void 0:i.wvModel:n;if(typeof a!=`string`||!a)return;let o=this.__wevu;if(!o||typeof o.bindModel!=`function`)return;let s=e(t);try{o.bindModel(a).update(s)}catch(e){}}),m[a]||(m[a]=function(e){return n(this,e)}),!m[c]&&typeof(p==null?void 0:p[c])==`function`&&(m[c]=p[c]);let h=Object.keys(p==null?{}:p);function g(e){let t=e.__wevu;if(t)return t;let n=e.$state;if(n&&typeof n==`object`)return n[u]}function _(e,t){if((e==null?void 0:e.proxy)===t)return;let n=e==null?void 0:e.proxy,r=e=>{let r=t[e];if(typeof r!=`function`)return!1;let i=n==null?void 0:n[e];return typeof i==`function`&&r===i};if(r(`triggerEvent`)||r(`createSelectorQuery`)||r(`createIntersectionObserver`)||r(`setData`)||typeof t.triggerEvent!=`function`&&typeof t.createSelectorQuery!=`function`&&typeof t.createIntersectionObserver!=`function`&&typeof t.setData!=`function`)return;let i=e==null?void 0:e.state;if(i&&typeof i==`object`&&t.$state!==i)try{Object.defineProperty(i,s,{value:t,configurable:!0,enumerable:!1,writable:!0})}catch(e){i[s]=t}}for(let e of h){if(e===i||e.startsWith(l))continue;let t=m[e];m[e]=function(...n){var r;let i=g(this);_(i,this);let a,o=i==null||(r=i.methods)==null?void 0:r[e];if(o&&(a=o.apply(i.proxy,n)),typeof t==`function`){let e=t.apply(this,n);return e===void 0?a:e}return a}}return{finalMethods:m}}export{d as createComponentMethods};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{hasOwn as e}from"../../../utils.mjs";import{isDeepEqualValue as t}from"../../app/setData/snapshot.mjs";import{refreshOwnerSnapshotFromInstance as n}from"../snapshot.mjs";import{WEVU_ATTRS_KEY as r,WEVU_PENDING_PROP_VALUES_KEY as i,WEVU_PROPS_DERIVED_KEYS_KEY as a,WEVU_PROPS_KEY as o,WEVU_PROP_KEYS_KEY as s,WEVU_SLOT_NAMES_PROP as c,WEVU_SLOT_OWNER_ID_PROP as l,WEVU_SLOT_SCOPE_KEY as u}from"@weapp-core/constants";function d(d){let{restOptions:f,propsAliases:p,propsDerivedKeys:m,userObservers:h}=d,g=f.properties&&typeof f.properties==`object`?Object.keys(f.properties):[],_=new Set(g),v=new Set(m==null?[]:m),y=Object.entries(p==null?{}:p).filter(([e,t])=>e&&t),b=new Set([c,l,u]),x=g.filter(e=>!b.has(e)),S=new WeakMap,C=e=>e.startsWith(`__wv_`),w=e=>{let t=e.__wevu,n=t==null?void 0:t[a];if(n instanceof Set)for(let e of x)n.add(e)},T=(t,n,r)=>e(t,n)&&Object.is(t[n],r)?!1:(t[n]=r,!0),E=(n,r,i)=>b.has(r)&&e(n,r)&&t(n[r],i,20,{keys:1e4})?!1:T(n,r,i),D=(e,t,n)=>{var r;if(!b.has(t))return;let i=!1,a=(r=e.__wevu)==null?void 0:r.state;try{a&&typeof a==`object`&&E(a,t,n);let r=e.data;r&&typeof r==`object`&&(i=E(r,t,n))}catch(e){}if(
|
|
1
|
+
import{hasOwn as e}from"../../../utils.mjs";import{isDeepEqualValue as t}from"../../app/setData/snapshot.mjs";import{refreshOwnerSnapshotFromInstance as n}from"../snapshot.mjs";import{WEVU_ATTRS_KEY as r,WEVU_PENDING_PROP_VALUES_KEY as i,WEVU_PROPS_DERIVED_KEYS_KEY as a,WEVU_PROPS_KEY as o,WEVU_PROP_KEYS_KEY as s,WEVU_SLOT_NAMES_PROP as c,WEVU_SLOT_OWNER_ID_PROP as l,WEVU_SLOT_SCOPE_KEY as u}from"@weapp-core/constants";function d(d){let{restOptions:f,propsAliases:p,propsDerivedKeys:m,userObservers:h}=d,g=f.properties&&typeof f.properties==`object`?Object.keys(f.properties):[],_=new Set(g),v=new Set(m==null?[]:m),y=Object.entries(p==null?{}:p).filter(([e,t])=>e&&t),b=new Set([c,l,u]),x=g.filter(e=>!b.has(e)),S=new WeakMap,C=e=>e.startsWith(`__wv_`),w=e=>{let t=e.__wevu,n=t==null?void 0:t[a];if(n instanceof Set)for(let e of x)n.add(e)},T=(t,n,r)=>e(t,n)&&Object.is(t[n],r)?!1:(t[n]=r,!0),E=(n,r,i)=>b.has(r)&&e(n,r)&&t(n[r],i,20,{keys:1e4})?!1:T(n,r,i),D=(e,t,n)=>{var r;if(!b.has(t))return;let i=!1,a=(r=e.__wevu)==null?void 0:r.state;try{a&&typeof a==`object`&&E(a,t,n);let r=e.data;r&&typeof r==`object`&&(i=E(r,t,n))}catch(e){}if(i&&typeof e.setData==`function`)try{e.setData({[t]:n})}catch(e){}},O=(t,n)=>{var r;if(!y.length)return;let i=t.__wevu,a=i==null?void 0:i.setupState,o=i==null?void 0:i.state;if(!a||typeof a!=`object`)return;w(t);let s=(r=S.get(t))==null?new Set:r;S.set(t,s);for(let[t,r]of y){if(e(a,t)&&!s.has(t))continue;let i=n[r];try{T(a,t,i),s.add(t)}catch(e){}if(o&&typeof o==`object`&&(!e(o,t)||s.has(t)))try{T(o,t,i)}catch(e){}}},k=(t,n)=>{if(!v.size)return;let r=t.__wevu,i=r==null?void 0:r.setupState;if(!i||typeof i!=`object`)return;w(t);let a=new Map(y);for(let t of v){var o;let r=(o=a.get(t))==null?t:o;if(e(n,r))try{T(i,t,n[r])}catch(e){}}},A=e=>{try{Object.defineProperty(e,s,{value:g,configurable:!0,enumerable:!1,writable:!1})}catch(t){e[s]=g}},j=t=>{let i=t[r];if(!i||typeof i!=`object`)return;let a=n=>{var r;let i=(r=t.__wevu)==null?void 0:r.state;return typeof i==`object`&&!!i&&e(i,n)},o=t.properties,s=o&&typeof o==`object`?o:void 0,c=Object.keys(i);for(let t of c)if(!s||!e(s,t)||C(t)||_.has(t)||a(t))try{delete i[t]}catch(e){}if(!s){n(t);return}for(let[e,t]of Object.entries(s))if(!(C(e)||_.has(e)||a(e)))try{i[e]=t}catch(e){}n(t)},M=t=>{let r=t[o],a=t.properties,s=t[i];if(r&&typeof r==`object`&&a&&typeof a==`object`){let i=a,o=Object.keys(r);for(let t of o)if(!_.has(t)||!e(i,t))try{delete r[t]}catch(e){}for(let n of g){let a=s&&e(s,n);if(!a&&!e(i,n))continue;let o=a?s[n]:i[n];try{E(r,n,o)}catch(e){}D(t,n,o)}k(t,r),O(t,r),n(t)}s&&delete t[i],j(t)},N=(t,r)=>{if(!r||typeof r!=`object`)return;let i=t[o];if(!i||typeof i!=`object`)return;let a=!1;for(let n of g)if(e(r,n)){try{a=E(i,n,r[n])||a}catch(e){}D(t,n,r[n])}a&&(k(t,i),O(t,i),n(t),j(t))},P=(e,t,r)=>{var a,s;let c=e[o];if(!c||typeof c!=`object`)return;try{if(!E(c,t,r)){D(e,t,r);return}}catch(e){}D(e,t,r);let l=(s=(a=e)[i])==null?a[i]=Object.create(null):s;l[t]=r,k(e,c),O(e,c),n(e),j(e)},F={};if(g.length)for(let e of g)F[e]=function(t){P(this,e,t)};let I={...h==null?{}:h};for(let[e,t]of Object.entries(F)){let n=I[e];I[e]=typeof n==`function`?function(...e){n.apply(this,e),t.apply(this,e)}:t}let L=I[`**`];return I[`**`]=function(...e){typeof L==`function`&&L.apply(this,e),M(this)},{attachWevuPropKeys:A,directPropsDerivedKeys:x,syncWevuPropsFromInstance:M,syncWevuPropsFromValues:N,finalObservers:I}}export{d as createPropsSync};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{getMiniProgramRuntimeGlobalObject as e}from"../../platform.mjs";import{callHookList as t}from"../../hooks/base.mjs";import{resolveRuntimePageLayoutName as n,syncRuntimePageLayoutState as r}from"../../pageLayout.mjs";import{getOwnerProxy as i}from"../../scopedSlots.mjs";import{clearTemplateRefs as a,scheduleTemplateRefUpdate as o}from"../../templateRefs.mjs";import{enableDeferredSetData as s,mountRuntimeInstance as c,refreshRuntimeInstance as ee,setRuntimeSetDataVisibility as l,teardownRuntimeInstance as u}from"../runtimeInstance.mjs";import{ensureInitialNavigation as d}from"../../../router/initialNavigation.mjs";import{registerRuntimeLayoutHosts as te,unregisterRuntimeLayoutHosts as ne}from"../../layoutBridge.mjs";import{registerNativeComponentDefinition as f}from"./registerNativeDefinition.mjs";import{WEAPP_VITE_STATEFUL_HMR_BRIDGE_KEY as re,WEVU_LAYOUT_HOST_BRIDGE_KEY as p,WEVU_PAGE_LAYOUT_NAME_KEY as ie,WEVU_PAGE_LAYOUT_PROPS_KEY as ae,WEVU_PAGE_LAYOUT_SETTER_KEY as m,WEVU_PUBLIC_RUNTIME_KEY as h,WEVU_READY_CALLED_KEY as g,WEVU_RESOLVE_PUBLIC_INSTANCE_METHOD as _,WEVU_RUNTIME_KEY as oe,WEVU_RUNTIME_OWNER_ID_KEY as se,WEVU_SLOT_OWNER_ID_KEY as v,WEVU_TEMPLATE_REFS_KEY as y}from"@weapp-core/constants";function b(e){let t=e.selectOwnerComponent;if(typeof t==`function`)try{let n=t.call(e);n&&n!==e&&o(n)}catch(e){}}function x(x){var S;let{runtimeApp:C,watch:w,setup:T,restOptions:ce,pageLifecycleHooks:E,finalObservers:D,userLifetimes:O,userPageLifetimes:k,finalMethods:A,finalOptions:j,applyExtraInstanceFields:M,templateRefs:N,layoutHosts:P,attachWevuPropKeys:F,setupLifecycle:I,syncWevuPropsFromInstance:L,directPropsDerivedKeys:R,isPage:z,vueLifecycles:B,getRuntimeOwnerLabel:V,registerNative:H=!0}=x,U=e=>{var t;let n=(t=e.__wevu)==null?e[h]:t;if(n)return n;let r=e.$state;if(r&&typeof r==`object`)return r[oe]},W=e=>{var t,n,r,i,a;return(t=(n=(r=e[se])==null?e[v]:r)==null?(i=e.data)==null?void 0:i[v]:n)==null?(a=e.properties)==null?void 0:a[v]:t},G=e=>{var t;let n=(t=U(e))==null?void 0:t.proxy;if(n)return n;let r=W(e);if(typeof r==`string`&&r){var a;return(a=i(r))==null?e:a}return e},K=e=>{let t=U(e);return t?{runtime:t,mounted:!1}:(M(e),F(e),c(e,C,w,T,{deferSetData:!0,snapshotOmitKeys:R}),L(e),s(e),{runtime:U(e),mounted:!0})},q=(e,t,n)=>{let r=B[t];if(typeof r==`function`)return r.apply(G(e),n)},J=(e,t)=>{if(!z){t();return}d(e,void 0,{start:!1,onComplete:e=>{e&&t()}})||t()},le=e=>{U(e)||typeof B.mounted!=`function`||K(e).mounted&&(q(e,`created`,[]),q(e,`beforeMount`,[]))},Y={},X=e=>{if(!Array.isArray(P)||!P.length||e[p])return;let t=te(P,e);t&&(e[p]=t)},Z=e=>{z&&(e[m]=(t,i)=>{var a;let o=(a=e.__wevu)==null?void 0:a.state;if(!o||typeof o!=`object`)return;o[ie]=n(t);let s=t===!1||i==null?{}:i;o[ae]=s,r(e,t,s)})};if(z)for(let e of[`onPullDownRefresh`,`onReachBottom`,`onShareAppMessage`,`onShareTimeline`,`onAddToFavorites`]){let t=E[e];typeof t==`function`&&typeof A[e]!=`function`&&(Y[e]=function(...e){return t.apply(this,e)})}let Q={...ce,...z?E:{},observers:D,lifetimes:{...O,created:function(...e){M(this),Array.isArray(N)&&N.length&&Object.defineProperty(this,y,{value:N,configurable:!0,enumerable:!1,writable:!1}),F(this),J(this,()=>{if(q(this,`beforeCreate`,e),I===`created`){try{c(this,C,w,T,{deferSetData:!0,snapshotOmitKeys:R})}catch(e){let t=V(this);throw Error(`[wevu] mount runtime failed in created (${t}): ${e instanceof Error?e.message:String(e)}`)}L(this),Z(this)}typeof O.created==`function`&&O.created.apply(this,e)})},moved:function(...e){t(this,`onMoved`,e),typeof O.moved==`function`&&O.moved.apply(this,e)},attached:function(...e){M(this),Array.isArray(N)&&N.length&&!this[y]&&Object.defineProperty(this,y,{value:N,configurable:!0,enumerable:!1,writable:!1}),F(this),J(this,()=>{if(I!==`created`||!this.__wevu)try{c(this,C,w,T,{deferSetData:!0,snapshotOmitKeys:R})}catch(e){let t=V(this);throw Error(`[wevu] mount runtime failed in attached (${t}): ${e instanceof Error?e.message:String(e)}`)}L(this),q(this,`created`,e),q(this,`beforeMount`,e),Z(this),X(this),s(this),t(this,`onAttached`,e),typeof O.attached==`function`&&O.attached.apply(this,e)})},ready:function(...e){if(!
|
|
1
|
+
import{getMiniProgramRuntimeGlobalObject as e}from"../../platform.mjs";import{callHookList as t}from"../../hooks/base.mjs";import{resolveRuntimePageLayoutName as n,syncRuntimePageLayoutState as r}from"../../pageLayout.mjs";import{getOwnerProxy as i}from"../../scopedSlots.mjs";import{clearTemplateRefs as a,scheduleTemplateRefUpdate as o}from"../../templateRefs.mjs";import{enableDeferredSetData as s,mountRuntimeInstance as c,refreshRuntimeInstance as ee,setRuntimeSetDataVisibility as l,teardownRuntimeInstance as u}from"../runtimeInstance.mjs";import{ensureInitialNavigation as d}from"../../../router/initialNavigation.mjs";import{registerRuntimeLayoutHosts as te,unregisterRuntimeLayoutHosts as ne}from"../../layoutBridge.mjs";import{registerNativeComponentDefinition as f}from"./registerNativeDefinition.mjs";import{WEAPP_VITE_STATEFUL_HMR_BRIDGE_KEY as re,WEVU_LAYOUT_HOST_BRIDGE_KEY as p,WEVU_PAGE_LAYOUT_NAME_KEY as ie,WEVU_PAGE_LAYOUT_PROPS_KEY as ae,WEVU_PAGE_LAYOUT_SETTER_KEY as m,WEVU_PUBLIC_RUNTIME_KEY as h,WEVU_READY_CALLED_KEY as g,WEVU_RESOLVE_PUBLIC_INSTANCE_METHOD as _,WEVU_RUNTIME_KEY as oe,WEVU_RUNTIME_OWNER_ID_KEY as se,WEVU_SLOT_OWNER_ID_KEY as v,WEVU_TEMPLATE_REFS_KEY as y}from"@weapp-core/constants";function b(e){let t=e.selectOwnerComponent;if(typeof t==`function`)try{let n=t.call(e);n&&n!==e&&o(n)}catch(e){}}function x(x){var S;let{runtimeApp:C,watch:w,setup:T,restOptions:ce,pageLifecycleHooks:E,finalObservers:D,userLifetimes:O,userPageLifetimes:k,finalMethods:A,finalOptions:j,applyExtraInstanceFields:M,templateRefs:N,layoutHosts:P,attachWevuPropKeys:F,setupLifecycle:I,syncWevuPropsFromInstance:L,directPropsDerivedKeys:R,isPage:z,vueLifecycles:B,getRuntimeOwnerLabel:V,registerNative:H=!0}=x,U=e=>{var t;let n=(t=e.__wevu)==null?e[h]:t;if(n)return n;let r=e.$state;if(r&&typeof r==`object`)return r[oe]},W=e=>{var t,n,r,i,a;return(t=(n=(r=e[se])==null?e[v]:r)==null?(i=e.data)==null?void 0:i[v]:n)==null?(a=e.properties)==null?void 0:a[v]:t},G=e=>{var t;let n=(t=U(e))==null?void 0:t.proxy;if(n)return n;let r=W(e);if(typeof r==`string`&&r){var a;return(a=i(r))==null?e:a}return e},K=e=>{let t=U(e);return t?{runtime:t,mounted:!1}:(M(e),F(e),c(e,C,w,T,{deferSetData:!0,snapshotOmitKeys:R}),L(e),s(e),{runtime:U(e),mounted:!0})},q=(e,t,n)=>{let r=B[t];if(typeof r==`function`)return r.apply(G(e),n)},J=(e,t)=>{if(!z){t();return}d(e,void 0,{start:!1,onComplete:e=>{e&&t()}})||t()},le=e=>{U(e)||typeof B.mounted!=`function`||K(e).mounted&&(q(e,`created`,[]),q(e,`beforeMount`,[]))},Y={},X=e=>{if(!Array.isArray(P)||!P.length||e[p])return;let t=te(P,e);t&&(e[p]=t)},Z=e=>{z&&(e[m]=(t,i)=>{var a;let o=(a=e.__wevu)==null?void 0:a.state;if(!o||typeof o!=`object`)return;o[ie]=n(t);let s=t===!1||i==null?{}:i;o[ae]=s,r(e,t,s)})};if(z)for(let e of[`onPullDownRefresh`,`onReachBottom`,`onShareAppMessage`,`onShareTimeline`,`onAddToFavorites`]){let t=E[e];typeof t==`function`&&typeof A[e]!=`function`&&(Y[e]=function(...e){return t.apply(this,e)})}let Q={...ce,...z?E:{},observers:D,lifetimes:{...O,created:function(...e){M(this),Array.isArray(N)&&N.length&&Object.defineProperty(this,y,{value:N,configurable:!0,enumerable:!1,writable:!1}),F(this),J(this,()=>{if(q(this,`beforeCreate`,e),I===`created`){try{c(this,C,w,T,{deferSetData:!0,snapshotOmitKeys:R})}catch(e){let t=V(this);throw Error(`[wevu] mount runtime failed in created (${t}): ${e instanceof Error?e.message:String(e)}`)}L(this),Z(this)}typeof O.created==`function`&&O.created.apply(this,e)})},moved:function(...e){t(this,`onMoved`,e),typeof O.moved==`function`&&O.moved.apply(this,e)},attached:function(...e){M(this),Array.isArray(N)&&N.length&&!this[y]&&Object.defineProperty(this,y,{value:N,configurable:!0,enumerable:!1,writable:!1}),F(this),J(this,()=>{if(I!==`created`||!this.__wevu)try{c(this,C,w,T,{deferSetData:!0,snapshotOmitKeys:R})}catch(e){let t=V(this);throw Error(`[wevu] mount runtime failed in attached (${t}): ${e instanceof Error?e.message:String(e)}`)}L(this),q(this,`created`,e),q(this,`beforeMount`,e),Z(this),X(this),s(this),t(this,`onAttached`,e),typeof O.attached==`function`&&O.attached.apply(this,e)})},ready:function(...e){if(!z||this[g]||!d(this,void 0,{start:!0,onComplete:t=>{t&&!this.__wevuInitialNavigationReady&&(this.__wevuInitialNavigationReady=!0,Q.lifetimes.ready.call(this,...e))}})||this.__wevuInitialNavigationReady){if(le(this),z&&typeof E.onReady==`function`){let t=!!this[g];if(E.onReady.call(this,...e),!t){let t=()=>q(this,`mounted`,e);d(this,void 0,{start:!1,onComplete:e=>{e&&t()}})||t()}typeof O.ready==`function`&&O.ready.apply(this,e);return}if(!this[g]){this[g]=!0,L(this),b(this),o(this,()=>{t(this,`onReady`,e),q(this,`mounted`,e),typeof O.ready==`function`&&O.ready.apply(this,e)});return}typeof O.ready==`function`&&O.ready.apply(this,e)}},detached:function(...e){if(q(this,`beforeUnmount`,e),q(this,`beforeDestroy`,e),b(this),t(this,`onDetached`,e),z&&typeof E.onUnload==`function`){E.onUnload.call(this,...e),typeof O.detached==`function`&&O.detached.apply(this,e),q(this,`unmounted`,e),q(this,`destroyed`,e);return}a(this),Array.isArray(P)&&P.length&&this[p]&&(ne(P,this[p]),delete this[p]),u(this),q(this,`unmounted`,e),q(this,`destroyed`,e),typeof O.detached==`function`&&O.detached.apply(this,e)},error:function(...e){t(this,`onError`,e),typeof O.error==`function`&&O.error.apply(this,e)}},pageLifetimes:{...k,show:function(...e){if(z&&typeof E.onShow==`function`){E.onShow.call(this,...e),typeof k.show==`function`&&k.show.apply(this,e);return}l(this,!0),t(this,`onShow`,e),typeof k.show==`function`&&k.show.apply(this,e)},hide:function(...e){if(z&&typeof E.onHide==`function`){E.onHide.call(this,...e),typeof k.hide==`function`&&k.hide.apply(this,e);return}l(this,!1),t(this,`onHide`,e),typeof k.hide==`function`&&k.hide.apply(this,e)},resize:function(...e){if(z&&typeof E.onResize==`function`){E.onResize.call(this,...e),typeof k.resize==`function`&&k.resize.apply(this,e);return}t(this,`onResize`,e),typeof k.resize==`function`&&k.resize.apply(this,e)},routeDone:function(...e){if(z&&typeof E.onRouteDone==`function`){E.onRouteDone.call(this,...e),typeof k.routeDone==`function`&&k.routeDone.apply(this,e);return}t(this,`onRouteDone`,e),typeof k.routeDone==`function`&&k.routeDone.apply(this,e)}},methods:{...Y,...A,[_]:function(){var e;let t=K(this);return t.mounted&&(q(this,`created`,[]),q(this,`beforeMount`,[])),(e=t.runtime)==null?void 0:e.proxy}},options:j};if(!H)return Q;let $=(S=e())==null?void 0:S[re];if(typeof($==null?void 0:$.trackWevuComponent)==`function`){let e=$.trackWevuComponent(Q,(e,t)=>{ee(e,C,w,T,{snapshotOmitKeys:R,stateSnapshot:t}),L(e),Z(e),X(e),s(e,{rehydrateSetupState:!0})});return $.isApplying()||f(e,z),e}return f(Q,z),Q}export{x as registerComponentDefinition};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{isRef as e}from"../../reactivity/ref.mjs";const t=/&/g,n=/"/g,r=/"/g,i=/'/g,a=/'/g,o=/</g,s=/>/g;function c(e){return e.replace(t,`&`).replace(n,`"`).replace(r,`"`).replace(i,`'`).replace(a,`'`).replace(o,`<`).replace(s,`>`)}const l=/^(?:0|[1-9]\d*)$/;function u(e){if(typeof e==`number`&&Number.isFinite(e))return e;if(typeof e==`string`&&e.trim()){let t=e.trim();return l.test(t)?Number(t):t}}const d=/[^a-z0-9]+/gi,f=/^-+|-+$/g;function p(e){return e.trim().replace(d,`-`).replace(f,``).toLowerCase()}const m=/-([a-z0-9])/g,h=/[-_]/g;function g(e,t){let n=t.replace(h,``).toLowerCase();for(let[t,r]of Object.entries(e==null?{}:e))if(t.replace(h,``).toLowerCase()===n)return r}function _(e,t){let n=p(typeof(t==null?void 0:t.type)==`string`?t.type:``);if(!n)return;let r=n.replace(m,(e,t)=>t.toUpperCase());if(r)return`${e}${r[0].toUpperCase()}${r.slice(1)}`}const v={wvEventDetail:[`wd`,`wvEventDetail`],wvHandler:[`wh`,`wvHandler`],wvInlineId:[`wi`,`wvInlineId`]};function y(e,t,n){var r;let i=(r=v[t])==null?[t]:r;for(let t of i){let r=_(t,n);if(r&&(e==null?void 0:e[r])!==void 0)return e[r];if(r){let t=g(e,r);if(t!==void 0)return t}}for(let t of i){if((e==null?void 0:e[t])!==void 0)return e[t];let n=g(e,t);if(n!==void 0)return n}}function b(e,t,n){return y(e,t,n)}function x(e,t){let n=b(e,`wvEventDetail`,t);return n===!0||n===1||n===`1`||n===`true`}function S(e,t){if(!x(t,e))return e;if(
|
|
1
|
+
import{isRef as e}from"../../reactivity/ref.mjs";const t=/&/g,n=/"/g,r=/"/g,i=/'/g,a=/'/g,o=/</g,s=/>/g;function c(e){return e.replace(t,`&`).replace(n,`"`).replace(r,`"`).replace(i,`'`).replace(a,`'`).replace(o,`<`).replace(s,`>`)}const l=/^(?:0|[1-9]\d*)$/;function u(e){if(typeof e==`number`&&Number.isFinite(e))return e;if(typeof e==`string`&&e.trim()){let t=e.trim();return l.test(t)?Number(t):t}}const d=/[^a-z0-9]+/gi,f=/^-+|-+$/g;function p(e){return e.trim().replace(d,`-`).replace(f,``).toLowerCase()}const m=/-([a-z0-9])/g,h=/[-_]/g;function g(e,t){let n=t.replace(h,``).toLowerCase();for(let[t,r]of Object.entries(e==null?{}:e))if(t.replace(h,``).toLowerCase()===n)return r}function _(e,t){let n=p(typeof(t==null?void 0:t.type)==`string`?t.type:``);if(!n)return;let r=n.replace(m,(e,t)=>t.toUpperCase());if(r)return`${e}${r[0].toUpperCase()}${r.slice(1)}`}const v={wvEventDetail:[`wd`,`wvEventDetail`],wvHandler:[`wh`,`wvHandler`],wvInlineId:[`wi`,`wvInlineId`]};function y(e,t,n){var r;let i=(r=v[t])==null?[t]:r;for(let t of i){let r=_(t,n);if(r&&(e==null?void 0:e[r])!==void 0)return e[r];if(r){let t=g(e,r);if(t!==void 0)return t}}for(let t of i){if((e==null?void 0:e[t])!==void 0)return e[t];let n=g(e,t);if(n!==void 0)return n}}function b(e,t,n){return y(e,t,n)}function x(e,t){let n=b(e,`wvEventDetail`,t);return n===!0||n===1||n===`1`||n===`true`}function S(e,t){if(!x(t,e))return e;if(e&&typeof e==`object`&&`detail`in e)return e.detail}function C(t,n){if(!n)return;let r=n.split(`.`).filter(Boolean),i=e(t)?t.value:t;for(let t of r){if(e(i)&&(i=i.value),i==null)return;i=i[t]}return e(i)?i.value:i}function w(e){return e}function T(e,t,n,r){var i,a,o,s;let l=(i=(a=n==null||(o=n.currentTarget)==null?void 0:o.dataset)==null?n==null||(s=n.target)==null?void 0:s.dataset:a)==null?{}:i,d=S(n,l),f=b(l,`wvInlineId`,n);if(f&&r){let t=r[f];if(t&&typeof t.fn==`function`){let n={},r=Array.isArray(t.keys)?t.keys:[];for(let e=0;e<r.length;e+=1){let t=r[e];n[t]=l==null?void 0:l[`wvS${e}`]}let i=Array.isArray(t.indexKeys)?t.indexKeys:[];for(let e=0;e<i.length;e+=1){let t=i[e],r=u(l==null?void 0:l[`wvI${e}`]);r!==void 0&&(n[t]=r)}let a=Array.isArray(t.scopeResolvers)?t.scopeResolvers:[];for(let t=0;t<r.length;t+=1){let i=r[t],o=a[t];try{let t;if(typeof o==`function`)t=o(e,n,d);else if(o&&typeof o==`object`&&o.type===`for-item`){let r=n[o.indexKey],i=C(e,o.path);t=i==null?void 0:i[r]}else continue;t!==void 0&&(n[i]=w(t))}catch(e){}}let o=t.fn(e,n,d);return typeof o==`function`?o.call(e,d):o}}let p=b(l,`wvHandler`,n),m=typeof t==`string`&&t?t:typeof p==`string`?p:void 0;if(!m)return;let h=b(l,`wvArgs`,n),g=[];if(Array.isArray(h))g=h;else if(typeof h==`string`)try{g=JSON.parse(h)}catch(e){try{g=JSON.parse(c(h))}catch(e){g=[]}}Array.isArray(g)||(g=[]);let _=g.map(e=>e===`$event`?d:e),v=e==null?void 0:e[m];if(typeof v==`function`)return v.apply(e,_)}export{c as decodeWxmlEntities,b as resolveDatasetEventValue,T as runInlineExpression};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{isNativeBridgeMethod as e}from"../../nativeBridge.mjs";import{setupInstanceMethodNames as t}from"./setupContext.mjs";import{WEVU_NATIVE_INSTANCE_KEY as n,WEVU_PUBLIC_RUNTIME_KEY as r}from"@weapp-core/constants";function i(e){return!e||typeof e!=`object`?!1:typeof e.triggerEvent==`function`||typeof e.createSelectorQuery==`function`||typeof e.createIntersectionObserver==`function`||typeof e.setData==`function`}function a(t,n,r){let i=n==null?void 0:n[r];if(typeof i!=`function`)return!1;if(e(i))return!0;let a=t==null?void 0:t.proxy;return typeof(a==null?void 0:a[r])==`function`&&i===a[r]}function o(e,t){if(!e||!i(t)||t===e.proxy)return;let r=t;if(a(e,r,`triggerEvent`)||a(e,r,`createSelectorQuery`)||a(e,r,`createIntersectionObserver`)||a(e,r,`setData`))return;let o=e.state;if(
|
|
1
|
+
import{isNativeBridgeMethod as e}from"../../nativeBridge.mjs";import{setupInstanceMethodNames as t}from"./setupContext.mjs";import{WEVU_NATIVE_INSTANCE_KEY as n,WEVU_PUBLIC_RUNTIME_KEY as r}from"@weapp-core/constants";function i(e){return!e||typeof e!=`object`?!1:typeof e.triggerEvent==`function`||typeof e.createSelectorQuery==`function`||typeof e.createIntersectionObserver==`function`||typeof e.setData==`function`}function a(t,n,r){let i=n==null?void 0:n[r];if(typeof i!=`function`)return!1;if(e(i))return!0;let a=t==null?void 0:t.proxy;return typeof(a==null?void 0:a[r])==`function`&&i===a[r]}function o(e,t){if(!e||!i(t)||t===e.proxy)return;let r=t;if(a(e,r,`triggerEvent`)||a(e,r,`createSelectorQuery`)||a(e,r,`createIntersectionObserver`)||a(e,r,`setData`))return;let o=e.state;if(o&&typeof o==`object`)try{Object.defineProperty(o,n,{value:r,configurable:!0,enumerable:!1,writable:!0})}catch(e){o[n]=r}}function s(e,n){try{let i=n.methods;for(let n of Object.keys(i))t.includes(n)||typeof e[n]!=`function`&&(e[n]=function(...t){var i,a;let s=(i=this[r])==null?e[r]:i;o(s,this);let c=s==null||(a=s.methods)==null?void 0:a[n];if(typeof c==`function`)return c.apply(s.proxy,t)})}catch(e){}}export{s as bridgeRuntimeMethodsToTarget};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{isRef as e}from"../../reactivity/ref.mjs";import{callHookList as t}from"../hooks/base.mjs";import{isDeepEqualValue as n}from"../app/setData/snapshot.mjs";import{resolveRuntimePageLayoutName as r,syncRuntimePageLayoutState as i}from"../pageLayout.mjs";import{allocateOwnerId as a,attachOwnerSnapshot as o,mergeOwnerSnapshotProps as s,removeOwner as c,resolveOwnerSnapshot as l,updateOwnerSnapshot as ee}from"../scopedSlots.mjs";import{clearTemplateRefs as u,scheduleTemplateRefUpdate as d}from"../templateRefs.mjs";import{attachRuntimeSlots as te,createNoopWatchStopHandle as ne,safeMarkNoSetData as re}from"./runtimeInstance/setupContext.mjs";import{bridgeRuntimeMethodsToTarget as ie}from"./runtimeInstance/methodBridge.mjs";import{attachRuntimeProvideParentContext as ae}from"./runtimeInstance/provideContext.mjs";import{attachNativeInstanceRef as oe,attachRuntimeInstance as se,attachRuntimeRef as f,callNativeSetData as p,ensureRuntimeProps as ce,resolveNativeSetData as m}from"./runtimeInstance/utils.mjs";import{runRuntimeSetupPhase as le}from"./runtimeInstance/setupPhase.mjs";import{createSetDataHighFrequencyWarningMonitor as ue}from"./setDataFrequencyWarning.mjs";import{registerWatches as de}from"./watch.mjs";import{WEVU_EFFECT_SCOPE_KEY as h,WEVU_HOOKS_KEY as g,WEVU_PAGE_LAYOUT_NAME_KEY as _,WEVU_PAGE_LAYOUT_PROPS_KEY as v,WEVU_PAGE_LAYOUT_SETTER_KEY as y,WEVU_PAGE_SCROLL_HOOK_DEPTH_KEY as fe,WEVU_PROPS_DERIVED_KEYS_KEY as b,WEVU_PROPS_KEY as x,WEVU_PUBLIC_RUNTIME_KEY as S,WEVU_RUNTIME_OWNER_ID_KEY as C,WEVU_SLOT_OWNER_ID_KEY as w,WEVU_TEMPLATE_REFS_KEY as T,WEVU_WATCH_STOPS_KEY as E}from"@weapp-core/constants";function D(e,t=new WeakMap){if(!e||typeof e!=`object`)return e;if(t.has(e))return t.get(e);if(Array.isArray(e)){let n=[];t.set(e,n);for(let r of e)n.push(D(r,t));return n}let n={};t.set(e,n);for(let[r,i]of Object.entries(e))n[r]=D(i,t);return n}function pe(e,t,n){let r=e.data;if((!r||typeof r!=`object`)&&(!n||!Object.keys(n).length))return;let i=Array.isArray(t)&&t.length?new Set(t):void 0,a={};if(r&&typeof r==`object`)for(let[e,t]of Object.entries(r))i!=null&&i.has(e)||(a[e]=D(t));if(n)for(let[e,t]of Object.entries(n))i!=null&&i.has(e)||(a[e]=D(t));return a}function me(e){return!!(e!=null&&e.__wevuHasTemplateRuntimeBindings)}function he(e){typeof e.route
|
|
1
|
+
import{isRef as e}from"../../reactivity/ref.mjs";import{callHookList as t}from"../hooks/base.mjs";import{isDeepEqualValue as n}from"../app/setData/snapshot.mjs";import{resolveRuntimePageLayoutName as r,syncRuntimePageLayoutState as i}from"../pageLayout.mjs";import{allocateOwnerId as a,attachOwnerSnapshot as o,mergeOwnerSnapshotProps as s,removeOwner as c,resolveOwnerSnapshot as l,updateOwnerSnapshot as ee}from"../scopedSlots.mjs";import{clearTemplateRefs as u,scheduleTemplateRefUpdate as d}from"../templateRefs.mjs";import{attachRuntimeSlots as te,createNoopWatchStopHandle as ne,safeMarkNoSetData as re}from"./runtimeInstance/setupContext.mjs";import{bridgeRuntimeMethodsToTarget as ie}from"./runtimeInstance/methodBridge.mjs";import{attachRuntimeProvideParentContext as ae}from"./runtimeInstance/provideContext.mjs";import{attachNativeInstanceRef as oe,attachRuntimeInstance as se,attachRuntimeRef as f,callNativeSetData as p,ensureRuntimeProps as ce,resolveNativeSetData as m}from"./runtimeInstance/utils.mjs";import{runRuntimeSetupPhase as le}from"./runtimeInstance/setupPhase.mjs";import{createSetDataHighFrequencyWarningMonitor as ue}from"./setDataFrequencyWarning.mjs";import{registerWatches as de}from"./watch.mjs";import{WEVU_EFFECT_SCOPE_KEY as h,WEVU_HOOKS_KEY as g,WEVU_PAGE_LAYOUT_NAME_KEY as _,WEVU_PAGE_LAYOUT_PROPS_KEY as v,WEVU_PAGE_LAYOUT_SETTER_KEY as y,WEVU_PAGE_SCROLL_HOOK_DEPTH_KEY as fe,WEVU_PROPS_DERIVED_KEYS_KEY as b,WEVU_PROPS_KEY as x,WEVU_PUBLIC_RUNTIME_KEY as S,WEVU_RUNTIME_OWNER_ID_KEY as C,WEVU_SLOT_OWNER_ID_KEY as w,WEVU_TEMPLATE_REFS_KEY as T,WEVU_WATCH_STOPS_KEY as E}from"@weapp-core/constants";function D(e,t=new WeakMap){if(!e||typeof e!=`object`)return e;if(t.has(e))return t.get(e);if(Array.isArray(e)){let n=[];t.set(e,n);for(let r of e)n.push(D(r,t));return n}let n={};t.set(e,n);for(let[r,i]of Object.entries(e))n[r]=D(i,t);return n}function pe(e,t,n){let r=e.data;if((!r||typeof r!=`object`)&&(!n||!Object.keys(n).length))return;let i=Array.isArray(t)&&t.length?new Set(t):void 0,a={};if(r&&typeof r==`object`)for(let[e,t]of Object.entries(r))i!=null&&i.has(e)||(a[e]=D(t));if(n)for(let[e,t]of Object.entries(n))i!=null&&i.has(e)||(a[e]=D(t));return a}function me(e){return!!(e!=null&&e.__wevuHasTemplateRuntimeBindings)}function he(e){typeof e.route==`string`&&e.route&&(e[y]=(t,n)=>{var a;let o=(a=e.__wevu)==null?void 0:a.state;if(!o||typeof o!=`object`)return;o[_]=r(t);let s=t===!1||n==null?{}:n;o[v]=s,i(e,t,s)})}function O(e,t,n,r,i){var c,u,h,g,_,v,y,C,O,k,A,j;if(e.__wevu)return e.__wevu;ae(e,t),re(e);let M=(c=e.data)==null?void 0:c[w],N=typeof M==`string`&&M?M:a(),P=typeof M==`string`&&M!==N,F=!!(t!=null&&(u=t.__wevuSetDataOptions)!=null&&u.suspendWhenHidden),I=typeof e.route==`string`&&e.route?`page:${e.route}`:typeof e.is==`string`&&e.is?`component:${e.is}`:`unknown-target`,L=ue({option:t==null||(h=t.__wevuSetDataOptions)==null?void 0:h.highFrequencyWarning,targetLabel:I,isInPageScrollHook:()=>{var t;return Number((t=e[fe])==null?0:t)>0}}),R=i!=null&&i.deferSetData?(e=>{let t,n=[],r=!1,i={setData(i,a){if(!r){var o;t={...(o=t)==null?{}:o,...i},a&&n.push(a);return}let s=m(e);if(s)return p(e,s,i,a)}};return i.__wevu_enableSetData=(i=!1)=>{r=!0,i&&(t=void 0,n=[]);let a=m(e);if(t&&Object.keys(t).length&&a){let r=t,i=n;t=void 0,n=[];let o=i.length?()=>i.forEach(e=>e()):void 0;p(e,a,r,o)}},i})(e):{setData(t,n){let r=m(e);if(r)return p(e,r,t,n)}},z,B=!0,V,ge=(e,t)=>({...e==null?{}:e,...t}),H=()=>{var t;if(!z)return;let n=l(z),r=(t=e[x])==null?e.properties:t;s(n,r),ee(N,n,z.proxy,e)},_e=()=>{if(!P)return;let t=e.data;try{t&&typeof t==`object`&&(t[w]=N)}catch(e){}let n=m(e);n&&p(e,n,{[w]:N})},U={...R,setData(t){if(L==null||L(),F&&!B){V=ge(V,t),H(),d(e);return}let n=Array.isArray(e[T])&&e[T].length>0;if(H(),n&&m(e))return new Promise(n=>{R.setData(t,()=>{H(),d(e),n()})});let r=R.setData(t);return d(e),r},__wevu_setVisibility(t){if(B=t,!B||!V)return;let n=V;V=void 0;let r=Array.isArray(e[T])&&e[T].length>0;if(H(),r&&m(e))return new Promise(t=>{R.setData(n,()=>{H(),d(e),t()})});let i=R.setData(n);return d(e),i}};Object.defineProperty(U,"__wevu_targetLabel",{configurable:!0,enumerable:!1,value:I,writable:!1});let W=e.properties;W&&typeof W==`object`&&Object.defineProperty(U,"__wevu_initialProps",{configurable:!0,enumerable:!1,value:W,writable:!1}),Array.isArray(i==null?void 0:i.snapshotOmitKeys)&&i.snapshotOmitKeys.length&&Object.defineProperty(U,"__wevu_snapshotOmitKeys",{configurable:!0,enumerable:!1,value:i.snapshotOmitKeys,writable:!1});let G=pe(e,i==null?void 0:i.snapshotOmitKeys,me(t)?void 0:{[w]:N});G&&Object.keys(G).length&&Object.defineProperty(U,"__wevu_initialSnapshot",{configurable:!0,enumerable:!1,value:G,writable:!1}),Object.defineProperty(U,"__wevu_initialState",{configurable:!0,enumerable:!1,value:{[w]:N},writable:!1}),(i!=null&&i.deferSetData||r||W&&typeof W==`object`&&Object.keys(W).length>0)&&Object.defineProperty(U,"__wevu_deferInitialSnapshot",{configurable:!0,enumerable:!1,value:!0,writable:!1});let K=t.mount(U);z=K,se(K,e);let q=(g=K==null?void 0:K.proxy)==null?{}:g,J=(_=K==null?void 0:K.state)==null?{}:_,ve=(v=K==null?void 0:K.setupState)==null?Object.create(null):v;J&&typeof J==`object`&&(f(J,K),oe(J,e));let ye=(y=K==null?void 0:K.computed)==null?Object.create(null):y;if(!(K!=null&&K.methods))try{K.methods=Object.create(null)}catch(e){}let be=(C=K==null?void 0:K.methods)==null?Object.create(null):C,xe=(O=K==null?void 0:K.watch)==null?(()=>ne()):O,Se=(k=K==null?void 0:K.bindModel)==null?(()=>{}):k,Y={...K==null?{}:K,state:J,setupState:ve,proxy:q,methods:be,computed:ye,watch:xe,bindModel:Se,snapshot:(A=K==null?void 0:K.snapshot)==null?(()=>Object.create(null)):A,unmount:(j=K==null?void 0:K.unmount)==null?(()=>{}):j};Object.defineProperty(Y,"__wevu_initialRuntimeSnapshot",{configurable:!0,enumerable:!1,value:D(J),writable:!1});let X=Y,Ce={__wevu_flushSetupSnapshotSync:K.__wevu_flushSetupSnapshotSync,__wevu_touchSetupMethodsVersion:K.__wevu_touchSetupMethodsVersion,__wevu_trackSetupReactiveKey:K.__wevu_trackSetupReactiveKey,[b]:K[b]};for(let[e,t]of Object.entries(Ce))t&&Object.defineProperty(Y,e,{configurable:!0,enumerable:!1,value:t,writable:!0});Object.defineProperty(e,S,{value:Y,configurable:!0,enumerable:!1,writable:!1}),e.__wevu=Y,he(e);let we=ce(e,J);te(J,we),o(e,Y,N,{deferSnapshot:i==null?void 0:i.deferSetData}),_e();let Z=n?de(Y,n,e,{deferMissingSourceBaseline:!!r}):[];if(Z.length&&(e[E]=Z),r){if(le({target:e,runtime:K,runtimeWithDefaults:Y,runtimeState:J,runtimeProxy:q,setup:r}),!(i!=null&&i.deferSetData)){var Q;(Q=X.__wevu_flushSetupSnapshotSync)==null||Q.call(X)}i!=null&&i.deferSetData||H();for(let e of Z)e.resume()}else if(!(i!=null&&i.deferSetData)&&e.properties&&typeof e.properties==`object`&&Object.keys(e.properties).length>0){var $;($=X.__wevu_flushSetupSnapshotSync)==null||$.call(X),H()}return ie(e,K),K}function k(e,t,n){for(let e of Reflect.ownKeys(t))if(!Reflect.has(n,e)){let n=Reflect.getOwnPropertyDescriptor(t,e);n!=null&&n.configurable&&Reflect.deleteProperty(t,e)}for(let e of Reflect.ownKeys(n)){let r=Reflect.getOwnPropertyDescriptor(n,e);if(r)try{Reflect.defineProperty(t,e,r)}catch(r){try{t[e]=n[e]}catch(e){}}}return f(t.state,t),e.__wevu=t,Object.defineProperty(e,S,{value:t,configurable:!0,enumerable:!1,writable:!1}),t}function A(t,n,r){let i=t.state,a=t.setupState,o={};for(let t of Object.keys(n==null?{}:n)){if(!Object.prototype.hasOwnProperty.call(i,t))continue;let n=a==null?void 0:a[t];if(!(a&&Object.prototype.hasOwnProperty.call(a,t)&&!e(n))){if(r&&Object.prototype.hasOwnProperty.call(r,t)){o[t]=D(r[t]);continue}o[t]=D(e(n)?n.value:i[t])}}return o}function j(t,n){let r=t.setupState;return!r||!n||typeof n!=`object`?[]:Object.keys(n).filter(t=>{let n=r[t];return Object.prototype.hasOwnProperty.call(r,t)&&!e(n)})}function M(t,r){var i;let a=t.__wevu,o=a==null?void 0:a.state,s=a==null?void 0:a.setupState,c=(i=r==null?void 0:r.nativeData)==null?t.data:i;if(!o||typeof o!=`object`||!c||typeof c!=`object`)return;let l=a==null?void 0:a.__wevu_initialRuntimeSnapshot;for(let[t,i]of Object.entries(c))if(t&&t!==`undefined`&&Object.prototype.hasOwnProperty.call(o,t))try{let a=s==null?void 0:s[t],c=D(i);if(!(r!=null&&r.includeSetupState)&&s&&Object.prototype.hasOwnProperty.call(s,t)||!(r!=null&&r.includeSetupState)&&l&&Object.prototype.hasOwnProperty.call(l,t)&&!n(o[t],l[t],20,{keys:1e4})||!(r!=null&&r.includeSetupState)&&l&&!Object.prototype.hasOwnProperty.call(l,t))continue;if(e(a)){a.value=c;continue}o[t]=c}catch(e){}}function N(e,t){var n,r,i;let a=(n=e.__wevu)==null?void 0:n.adapter;M(e,{includeSetupState:t==null?void 0:t.rehydrateSetupState}),a&&typeof a.__wevu_enableSetData==`function`&&a.__wevu_enableSetData(!0),(r=e.__wevu)==null||(i=r.__wevu_flushSetupSnapshotSync)==null||i.call(r)}function P(e,t){var n;let r=(n=e.__wevu)==null?void 0:n.adapter;r&&typeof r.__wevu_setVisibility==`function`&&r.__wevu_setVisibility(t)}function F(e,n){var r,i;let a=e.__wevu,o=(r=e[C])==null?e[w]:r;o&&c(o),u(e),!(n!=null&&n.skipHooks)&&a&&e[g]&&t(e,`onUnload`,[]),e[g]&&(e[g]=void 0);let s=e[E];if(Array.isArray(s))for(let e of s)try{e()}catch(e){}e[E]=void 0,(i=e[h])==null||i.stop(),e[h]=void 0,a&&a.unmount(),delete e.__wevu,S in e&&delete e[S]}function I(e,t,n,r,i){let a=e.__wevu,o=a?A(a,e.data,i==null?void 0:i.stateSnapshot):void 0,s=a?j(a,e.data):[];F(e,{skipHooks:!0});let c=O(e,t,n,r,{deferSetData:!0,snapshotOmitKeys:i==null?void 0:i.snapshotOmitKeys});if(o){let t=e.data;if(t&&typeof t==`object`){for(let e of s)delete t[e];Object.assign(t,D(o))}M(e,{includeSetupState:!0,nativeData:o})}return!a||a===c?c:k(e,a,c)}export{N as enableDeferredSetData,O as mountRuntimeInstance,I as refreshRuntimeInstance,P as setRuntimeSetDataVisibility,F as teardownRuntimeInstance};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{getScopedSlotHostGlobalObject as e}from"./platform.mjs";import{isDeepEqualValue as t}from"./app/setData/snapshot.mjs";import{WEVU_PROPS_KEY as n,WEVU_RUNTIME_OWNER_ID_KEY as r,WEVU_SCOPED_SLOT_OWNER_SEED_KEY as i,WEVU_SCOPED_SLOT_OWNER_STORE_KEY as a,WEVU_SLOT_OWNER_ID_KEY as o,WEVU_SLOT_OWNER_ID_PROP as s,WEVU_SLOT_OWNER_KEY as c,WEVU_SLOT_OWNER_PROXY_KEY as l,WEVU_SLOT_PROPS_DATA_KEY as u,WEVU_SLOT_PROPS_KEY as d,WEVU_SLOT_SCOPE_KEY as f}from"@weapp-core/constants";function p(){var t;let n=(t=e())==null?Object.create(null):t;return n[a]instanceof Map||(n[a]=new Map),typeof n[i]!=`number`&&(n[i]=0),{globalObject:n,ownerStore:n[a]}}function m(){let{globalObject:e}=p();return e[i]+=1,`wv${e[i]}`}function h(e,n,r,i){var a;let{ownerStore:o}=p(),s=(a=o.get(e))==null?{snapshot:{},proxy:r,subscribers:new Set}:a,c=!t(s.snapshot,n,20,{keys:1e4}),l=s.proxy!==r;if(s.snapshot=n,s.proxy=r,s.target=i==null?s.target:i,o.set(e,s),(c||l)&&s.subscribers.size)for(let e of s.subscribers)try{e(n,r)}catch(e){}}function g(e){let{ownerStore:t}=p();t.delete(e)}function _(e,t){var n;let{ownerStore:r}=p(),i=(n=r.get(e))==null?{snapshot:{},proxy:void 0,subscribers:new Set}:n;return i.subscribers.add(t),r.set(e,i),()=>{let n=r.get(e);n&&n.subscribers.delete(t)}}function v(e){var t;let{ownerStore:n}=p();return(t=n.get(e))==null?void 0:t.proxy}function y(e){var t;let{ownerStore:n}=p();return(t=n.get(e))==null?void 0:t.snapshot}function b(e){var t;let{ownerStore:n}=p();return(t=n.get(e))==null?void 0:t.target}function x(e){let t=e.__wevu_cloneLatestSnapshot;return typeof t==`function`?t():typeof e.snapshot==`function`?e.snapshot():{}}const S=new Set([o,s,c,l,u,d,f]);function C(e,t){if(
|
|
1
|
+
import{getScopedSlotHostGlobalObject as e}from"./platform.mjs";import{isDeepEqualValue as t}from"./app/setData/snapshot.mjs";import{WEVU_PROPS_KEY as n,WEVU_RUNTIME_OWNER_ID_KEY as r,WEVU_SCOPED_SLOT_OWNER_SEED_KEY as i,WEVU_SCOPED_SLOT_OWNER_STORE_KEY as a,WEVU_SLOT_OWNER_ID_KEY as o,WEVU_SLOT_OWNER_ID_PROP as s,WEVU_SLOT_OWNER_KEY as c,WEVU_SLOT_OWNER_PROXY_KEY as l,WEVU_SLOT_PROPS_DATA_KEY as u,WEVU_SLOT_PROPS_KEY as d,WEVU_SLOT_SCOPE_KEY as f}from"@weapp-core/constants";function p(){var t;let n=(t=e())==null?Object.create(null):t;return n[a]instanceof Map||(n[a]=new Map),typeof n[i]!=`number`&&(n[i]=0),{globalObject:n,ownerStore:n[a]}}function m(){let{globalObject:e}=p();return e[i]+=1,`wv${e[i]}`}function h(e,n,r,i){var a;let{ownerStore:o}=p(),s=(a=o.get(e))==null?{snapshot:{},proxy:r,subscribers:new Set}:a,c=!t(s.snapshot,n,20,{keys:1e4}),l=s.proxy!==r;if(s.snapshot=n,s.proxy=r,s.target=i==null?s.target:i,o.set(e,s),(c||l)&&s.subscribers.size)for(let e of s.subscribers)try{e(n,r)}catch(e){}}function g(e){let{ownerStore:t}=p();t.delete(e)}function _(e,t){var n;let{ownerStore:r}=p(),i=(n=r.get(e))==null?{snapshot:{},proxy:void 0,subscribers:new Set}:n;return i.subscribers.add(t),r.set(e,i),()=>{let n=r.get(e);n&&n.subscribers.delete(t)}}function v(e){var t;let{ownerStore:n}=p();return(t=n.get(e))==null?void 0:t.proxy}function y(e){var t;let{ownerStore:n}=p();return(t=n.get(e))==null?void 0:t.snapshot}function b(e){var t;let{ownerStore:n}=p();return(t=n.get(e))==null?void 0:t.target}function x(e){let t=e.__wevu_cloneLatestSnapshot;return typeof t==`function`?t():typeof e.snapshot==`function`?e.snapshot():{}}const S=new Set([o,s,c,l,u,d,f]);function C(e,t){if(t&&typeof t==`object`)for(let[n,r]of Object.entries(t))S.has(n)||(e[n]=r)}function w(e,t,i,a){var s;try{e[r]=i}catch(e){}try{t.state[o]=i}catch(e){}try{e[o]=i}catch(e){}try{let t=e.data;t&&typeof t==`object`&&(t[o]=i)}catch(e){}let c=a!=null&&a.deferSnapshot?{}:x(t);C(c,(s=e[n])==null?e.properties:s),h(i,c,t.proxy,e)}export{m as allocateOwnerId,w as attachOwnerSnapshot,v as getOwnerProxy,y as getOwnerSnapshot,b as getOwnerTarget,C as mergeOwnerSnapshotProps,g as removeOwner,x as resolveOwnerSnapshot,_ as subscribeOwner,h as updateOwnerSnapshot};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{toRaw as e}from"../reactivity/reactive/shared.mjs";import{touchReactive as t}from"../reactivity/reactive/patch.mjs";import{isReactive as n}from"../reactivity/reactive.mjs";import{isRef as r}from"../reactivity/ref.mjs";function i(e){if(Object.prototype.toString.call(e)!==`[object Object]`)return!1;let t=Object.getPrototypeOf(e);return t===null||t===Object.prototype}function a(e){return Array.isArray(e)||i(e)}function o(e){if(Array.isArray(e))return e;let t=[];for(let n of Object.keys(e)){let r=Object.getOwnPropertyDescriptor(e,n)
|
|
1
|
+
import{toRaw as e}from"../reactivity/reactive/shared.mjs";import{touchReactive as t}from"../reactivity/reactive/patch.mjs";import{isReactive as n}from"../reactivity/reactive.mjs";import{isRef as r}from"../reactivity/ref.mjs";function i(e){if(Object.prototype.toString.call(e)!==`[object Object]`)return!1;let t=Object.getPrototypeOf(e);return t===null||t===Object.prototype}function a(e){return Array.isArray(e)||i(e)}function o(e){if(Array.isArray(e))return e;let t=[];for(let n of Object.keys(e)){let r=Object.getOwnPropertyDescriptor(e,n);r&&typeof r.get!=`function`&&t.push(r.value)}return t}function s(e,t=new WeakSet){return r(e)||n(e)?!0:!e||typeof e!=`object`||t.has(e)||(t.add(e),!a(e))?!1:o(e).some(e=>s(e,t))}function c(i,s=new WeakSet){if(r(i)){let e=i.value;n(e)&&t(e),c(e,s);return}if(n(i)){t(i),c(e(i),s);return}i&&typeof i==`object`&&!s.has(i)&&a(i)&&(s.add(i),o(i).forEach(e=>c(e,s)))}export{s as hasTrackableSetupBinding,c as touchSetupBinding};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{nextTick as e}from"../scheduler.mjs";import{markNoSetData as t}from"./noSetData.mjs";import{buildTemplateRefValue as n,createSelectorQuery as r,ensureRefsContainer as i,getTemplateRefMap as a,isComponentRef as o,resolveComponentRefValue as s,resolveTemplateRefTarget as c,updateTemplateRefMapValue as l}from"./templateRefs/helpers.mjs";import{WEVU_READY_CALLED_KEY as u,WEVU_TEMPLATE_REFS_CALLBACKS_KEY as d,WEVU_TEMPLATE_REFS_KEY as f,WEVU_TEMPLATE_REFS_PENDING_KEY as p}from"@weapp-core/constants";function m(e,d,p=e){let m=e[f];if(!m||!m.length){d==null||d();return}if(!e[u]){d==null||d();return}if(!e.__wevu){d==null||d();return}let h=a(p),g=m.filter(e=>!o(e)),_=m.filter(e=>o(e)).map(t=>({binding:t,value:s(e,t)})),v=n=>{var r,a;let o=i(p),s=new Map,u=new Set,f=(r=(a=e.__wevu)==null?void 0:a.proxy)==null?e:r;n.forEach(t=>{let n=t.binding,r=t.value,i=c(p,n,e);if(i.type===`function`){n.inFor&&Array.isArray(r)?r.length?r.forEach(e=>i.fn.call(f,e)):i.fn.call(f,null):i.fn.call(f,r==null?null:r);return}if(i.type===`ref`){i.ref.value=r;return}if(i.type===`name`){var a;u.add(i.name);let e=(a=s.get(i.name))==null?{values:[],count:0,hasFor:!1}:a;e.count+=1,e.hasFor=e.hasFor||n.inFor,n.inFor?Array.isArray(r)&&e.values.push(...r):r!=null&&e.values.push(r),s.set(i.name,e)}});for(let[e,n]of s){let r;r=n.values.length?n.hasFor||n.values.length>1||n.count>1?t(n.values):n.values[0]:n.hasFor?t([]):null,o[e]=r,l(h,e,r)}for(let e of Object.keys(o))u.has(e)||delete o[e];d==null||d()};if(!g.length){v(_);return}let y=r(e);if(!y){v(_);return}let b=[];for(let e of g)(e.inFor?y.selectAll(e.selector):y.select(e.selector)).boundingClientRect(),b.push({binding:e});y.exec(t=>{let r=b.map((r,i)=>{let a=Array.isArray(t)?t[i]:null;return{binding:r.binding,value:n(e,r.binding,a)}});v([..._,...r])})}function h(t,n,r=t){let i=t[f];if(!i||!i.length){n==null||n();return}if(n){var a;let e=(a=t[d])==null?[]:a;e.push(n),t[d]||Object.defineProperty(t,d,{value:e,configurable:!0,enumerable:!1,writable:!0})}t[p]||(t[p]=!0,e(()=>{t[p]=!1,m(t,()=>{let e=t[d]
|
|
1
|
+
import{nextTick as e}from"../scheduler.mjs";import{markNoSetData as t}from"./noSetData.mjs";import{buildTemplateRefValue as n,createSelectorQuery as r,ensureRefsContainer as i,getTemplateRefMap as a,isComponentRef as o,resolveComponentRefValue as s,resolveTemplateRefTarget as c,updateTemplateRefMapValue as l}from"./templateRefs/helpers.mjs";import{WEVU_READY_CALLED_KEY as u,WEVU_TEMPLATE_REFS_CALLBACKS_KEY as d,WEVU_TEMPLATE_REFS_KEY as f,WEVU_TEMPLATE_REFS_PENDING_KEY as p}from"@weapp-core/constants";function m(e,d,p=e){let m=e[f];if(!m||!m.length){d==null||d();return}if(!e[u]){d==null||d();return}if(!e.__wevu){d==null||d();return}let h=a(p),g=m.filter(e=>!o(e)),_=m.filter(e=>o(e)).map(t=>({binding:t,value:s(e,t)})),v=n=>{var r,a;let o=i(p),s=new Map,u=new Set,f=(r=(a=e.__wevu)==null?void 0:a.proxy)==null?e:r;n.forEach(t=>{let n=t.binding,r=t.value,i=c(p,n,e);if(i.type===`function`){n.inFor&&Array.isArray(r)?r.length?r.forEach(e=>i.fn.call(f,e)):i.fn.call(f,null):i.fn.call(f,r==null?null:r);return}if(i.type===`ref`){i.ref.value=r;return}if(i.type===`name`){var a;u.add(i.name);let e=(a=s.get(i.name))==null?{values:[],count:0,hasFor:!1}:a;e.count+=1,e.hasFor=e.hasFor||n.inFor,n.inFor?Array.isArray(r)&&e.values.push(...r):r!=null&&e.values.push(r),s.set(i.name,e)}});for(let[e,n]of s){let r;r=n.values.length?n.hasFor||n.values.length>1||n.count>1?t(n.values):n.values[0]:n.hasFor?t([]):null,o[e]=r,l(h,e,r)}for(let e of Object.keys(o))u.has(e)||delete o[e];d==null||d()};if(!g.length){v(_);return}let y=r(e);if(!y){v(_);return}let b=[];for(let e of g)(e.inFor?y.selectAll(e.selector):y.select(e.selector)).boundingClientRect(),b.push({binding:e});y.exec(t=>{let r=b.map((r,i)=>{let a=Array.isArray(t)?t[i]:null;return{binding:r.binding,value:n(e,r.binding,a)}});v([..._,...r])})}function h(t,n,r=t){let i=t[f];if(!i||!i.length){n==null||n();return}if(n){var a;let e=(a=t[d])==null?[]:a;e.push(n),t[d]||Object.defineProperty(t,d,{value:e,configurable:!0,enumerable:!1,writable:!0})}t[p]||(t[p]=!0,e(()=>{t[p]=!1,m(t,()=>{let e=t[d];e&&e.length&&e.splice(0).forEach(e=>{try{e()}catch(e){}})},r)}))}function g(e,n=e){var r,o;let s=e[f];if(!s||!s.length)return;let u=i(n),d=(r=(o=e.__wevu)==null?void 0:o.proxy)==null?e:r,p=new Set,m=a(n);for(let r of s){let i=c(n,r,e),a=r.inFor?t([]):null;if(i.type===`function`){i.fn.call(d,null);continue}if(i.type===`ref`){i.ref.value=a;continue}i.type===`name`&&(p.add(i.name),u[i.name]=a,l(m,i.name,a))}for(let e of Object.keys(u))p.has(e)||delete u[e]}export{g as clearTemplateRefs,h as scheduleTemplateRefUpdate,m as updateTemplateRefs};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{getCurrentMiniProgramGlobalRouter as e}from"../platform.mjs";import{getCurrentSetupContext as t}from"../hooks/base.mjs";import{notifyRouteStateSync as n}from"../../router/routeSync.mjs";import{createAbsoluteRoutePath as r,resolvePath as i}from"../../routerInternal/path.mjs";import{stringifyQuery as a}from"../../routerInternal/query.mjs";import{parsePathInput as o}from"../../routerInternal/location.mjs";const s=[`switchTab`,`reLaunch`,`redirectTo`,`navigateTo`,`navigateBack`],c=new WeakMap;function l(e){return!e||typeof e!=`object`?!1:s.every(t=>typeof e[t]==`function`)}function u(){return e()}function d(e){if(
|
|
1
|
+
import{getCurrentMiniProgramGlobalRouter as e}from"../platform.mjs";import{getCurrentSetupContext as t}from"../hooks/base.mjs";import{notifyRouteStateSync as n}from"../../router/routeSync.mjs";import{createAbsoluteRoutePath as r,resolvePath as i}from"../../routerInternal/path.mjs";import{stringifyQuery as a}from"../../routerInternal/query.mjs";import{parsePathInput as o}from"../../routerInternal/location.mjs";const s=[`switchTab`,`reLaunch`,`redirectTo`,`navigateTo`,`navigateBack`],c=new WeakMap;function l(e){return!e||typeof e!=`object`?!1:s.every(t=>typeof e[t]==`function`)}function u(){return e()}function d(e){if(typeof e==`string`&&e)return i(e,``)||void 0}function f(e,t){let n=t===`pageRouter`?[e.route,e.__route__,e.is]:[e.is,e.route,e.__route__];for(let e of n){let t=d(e);if(t)return t}}function p(e,t){if(!t||!e.startsWith(`./`)&&!e.startsWith(`../`))return e;let{path:n,query:s,hash:c}=o(e),l=r(i(n,t)),u=a(s);return`${l}${u?`?${u}`:``}${c}`}function m(e,t){let r=t==null?``:t,i=c.get(e),a=i==null?void 0:i.get(r);if(a)return a;let o=Object.create(null);for(let r of s)o[r]=i=>{let a=e[r];if(r===`navigateBack`||!i||typeof i!=`object`)return a.call(e,i);let o=typeof i.url==`string`?p(i.url,t):i.url,s=i.success,c={...i,url:o,success:(...e)=>(typeof o==`string`&&n({method:r,source:`native`,url:o}),typeof s==`function`?s(...e):void 0)};return a.call(e,c)};let l=i==null?new Map:i;return l.set(r,o),c.set(e,l),o}function h(e,n,r){let i=t();if(!(i!=null&&i.instance))throw Error(`${r}() 必须在 setup() 的同步阶段调用`);let a=i.instance,o=f(a,e),s=a[e];if(l(s))return m(s,o);let c=a[n];if(l(c))return m(c,o);let d=u();if(d)return m(d,o);throw Error(`当前运行环境不支持 Router,请升级宿主基础库或检查平台路由能力`)}function g(){return h(`router`,`pageRouter`,`useNativeRouter`)}function _(){return h(`pageRouter`,`router`,`useNativePageRouter`)}export{_ as useNativePageRouter,g as useNativeRouter};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{effect as e}from"../../reactivity/core.mjs";import{touchReactive as t}from"../../reactivity/reactive/patch.mjs";import{isReactive as n}from"../../reactivity/reactive.mjs";import{isRef as r}from"../../reactivity/ref.mjs";import{wrapAction as i}from"../actions.mjs";import{cloneDeep as a,resetObject as o}from"../utils.mjs";import{createBaseApi as s}from"../base.mjs";import{createSafeNotifier as c,isTrackableRef as l,snapshotValue as u}from"./shared.mjs";function d(d,f,p){var m;let h=f(),g=()=>{},_=new Map;Object.keys(h).forEach(e=>{let t=h[e];typeof t==`function`||e.startsWith(`$`)||r(t)
|
|
1
|
+
import{effect as e}from"../../reactivity/core.mjs";import{touchReactive as t}from"../../reactivity/reactive/patch.mjs";import{isReactive as n}from"../../reactivity/reactive.mjs";import{isRef as r}from"../../reactivity/ref.mjs";import{wrapAction as i}from"../actions.mjs";import{cloneDeep as a,resetObject as o}from"../utils.mjs";import{createBaseApi as s}from"../base.mjs";import{createSafeNotifier as c,isTrackableRef as l,snapshotValue as u}from"./shared.mjs";function d(d,f,p){var m;let h=f(),g=()=>{},_=new Map;Object.keys(h).forEach(e=>{let t=h[e];typeof t==`function`||e.startsWith(`$`)||(!r(t)||l(t))&&_.set(e,u(t))});let v={},y=s(d,void 0,e=>g(e),()=>{_.forEach((e,t)=>{let i=v[t];if(l(i)){try{i.value=a(e)}catch(e){}return}if(n(i)){o(i,e);return}r(i)||(v[t]=a(e))}),g(`patch object`)}),b=!1,x=y.api.$patch;if(y.api.$patch=e=>{b=!0;try{x(e)}finally{b=!1}},typeof y.api.$reset==`function`){let e=y.api.$reset;y.api.$reset=()=>{b=!0;try{e()}finally{b=!1}}}v={...h},g=c(d,y.subs,()=>v);for(let e of Object.getOwnPropertyNames(y.api)){let t=Object.getOwnPropertyDescriptor(y.api,e);t&&(e===`$state`?Object.defineProperty(v,e,{enumerable:t.enumerable,configurable:t.configurable,get(){return y.api.$state},set(e){b=!0;try{y.api.$state=e}finally{b=!1}}}):Object.defineProperty(v,e,t))}let S=[];Object.keys(h).forEach(e=>{let t=h[e];if(typeof t==`function`&&!e.startsWith(`$`)){v[e]=i(v,e,t,y.actionSubs);return}if(l(t)){S.push(t);return}if(n(t)){S.push(t);return}if(!r(t)&&!e.startsWith(`$`)){let n=t;Object.defineProperty(v,e,{enumerable:!0,configurable:!0,get(){return n},set(e){n=e,b||g(`direct`)}})}});let C=!1;if(S.length>0){let n=!1;e(()=>{if(S.forEach(e=>{l(e)?e.value:t(e)}),!n){n=!0;return}if(!(b||C)){C=!0;try{g(`direct`)}finally{C=!1}}})}let w=(m=p==null?void 0:p._plugins)==null?[]:m;for(let e of w)try{e({store:v})}catch(e){}return v}export{d as createSetupStyleStore};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wevu",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "7.0.
|
|
4
|
+
"version": "7.0.2",
|
|
5
5
|
"description": "Vue 3 风格的小程序运行时,包含响应式、diff+setData 与轻量状态管理",
|
|
6
6
|
"author": "ice breaker <1324318532@qq.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -274,7 +274,7 @@
|
|
|
274
274
|
"@weapp-core/constants": "0.2.1",
|
|
275
275
|
"@weapp-core/shared": "3.2.0",
|
|
276
276
|
"@wevu/api": "0.3.0",
|
|
277
|
-
"@wevu/compiler": "7.0.
|
|
277
|
+
"@wevu/compiler": "7.0.2",
|
|
278
278
|
"@wevu/web-apis": "1.2.39",
|
|
279
279
|
"vue": "^3.5.42"
|
|
280
280
|
},
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|