wevu 6.25.1 → 7.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/dev/index.mjs +1 -1
- package/dist/dev/internal-runtime.mjs +1 -1
- package/dist/dev/package.mjs +1 -1
- package/dist/dev/router/createRouter.mjs +80 -12
- package/dist/dev/router/createRouter.mjs.map +1 -1
- package/dist/dev/router/initialNavigation.mjs +141 -0
- package/dist/dev/router/initialNavigation.mjs.map +1 -0
- package/dist/dev/router/navigationTarget.mjs +3 -2
- package/dist/dev/router/navigationTarget.mjs.map +1 -1
- package/dist/dev/router/types.mjs.map +1 -1
- package/dist/dev/router/useRoute.mjs +14 -1
- package/dist/dev/router/useRoute.mjs.map +1 -1
- package/dist/dev/routerInternal/snapshots.mjs +3 -1
- package/dist/dev/routerInternal/snapshots.mjs.map +1 -1
- package/dist/dev/runtime/register/component/lifecycle.mjs +29 -13
- package/dist/dev/runtime/register/component/lifecycle.mjs.map +1 -1
- package/dist/dev/runtime/register/component/registerDefinition.mjs +69 -32
- package/dist/dev/runtime/register/component/registerDefinition.mjs.map +1 -1
- package/dist/dev/vue-demi.mjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/internal-runtime.mjs +1 -1
- package/dist/package.mjs +1 -1
- package/dist/router/createRouter.mjs +1 -1
- package/dist/router/initialNavigation.mjs +1 -0
- package/dist/router/navigationTarget.mjs +1 -1
- package/dist/router/types.d.mts +10 -1
- package/dist/router/useRoute.mjs +1 -1
- package/dist/router.d.mts +2 -2
- package/dist/routerInternal/snapshots.mjs +1 -1
- package/dist/runtime/register/component/lifecycle.mjs +1 -1
- package/dist/runtime/register/component/registerDefinition.mjs +1 -1
- package/dist/vue-demi.mjs +1 -1
- package/package.json +5 -5
package/dist/package.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var e=`
|
|
1
|
+
var e=`7.0.1`;export{e as version};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{getMiniProgramGlobalObject as e}from"../runtime/platform.mjs";import{
|
|
1
|
+
import{getMiniProgramGlobalObject as e}from"../runtime/platform.mjs";import{setActiveRouter as t}from"./instance.mjs";import{DEFAULT_INITIAL_NAVIGATION_TIMEOUT as n,registerInitialNavigationRunner as r}from"./initialNavigation.mjs";import{installRouteStateSyncOnNativeRouter as i,notifyRouteStateSync as a}from"./routeSync.mjs";import{resolvePath as o}from"../routerInternal/path.mjs";import{parseQuery as s,stringifyQuery as c}from"../routerInternal/query.mjs";import{resolveCurrentRoute as l}from"../routerInternal/location.mjs";import{resolveNamedRouteLocation as u}from"../routerInternal/params.mjs";import{mergeMatchedRouteMeta as ee,resolveMatchedRouteRecord as te}from"../routerInternal/matching.mjs";import{warnDuplicateRouteEntries as ne}from"../routerInternal/recordsWarnings.mjs";import{createNamedRouteLookup as re,resolveRouteOptionEntries as ie}from"../routerInternal/records.mjs";import{cloneRouteMeta as ae,cloneRouteParams as oe,createRouterOptionsSnapshot as d,normalizeRouteRecordMatched as se,snapshotRouteLocation as f}from"../routerInternal/snapshots.mjs";import{createNavigationResultController as p}from"./navigationResult.mjs";import{resolveBackNavigationTarget as m,runBackNavigationGuards as ce}from"./backNavigation.mjs";import{navigateWithTarget as le}from"./navigationTarget.mjs";import{createNavigationApi as ue}from"./navigationApi.mjs";import{resolveRouteLocation as de}from"./resolve.mjs";import{createRouteRegistry as fe}from"./routeRegistry.mjs";import{createRouteStateController as pe,useNativeRouter as h}from"./useRoute.mjs";function g(g={}){var _,v,y,b,x,S,C;let w=h();i(e());let T=new Set,E=new Set,D=new Set,O=new Set,k=(_=g.maxRedirects)==null?10:_,A=g.initialNavigationMode===`blocking`?`blocking`:`eager`,j=Number.isFinite(g.initialNavigationTimeout)&&((v=g.initialNavigationTimeout)==null?0:v)>0?Math.max(1,Math.trunc(g.initialNavigationTimeout)):n,M=(y=g.paramsMode)==null?`loose`:y,N=(b=g.rejectOnError)==null||b,P={parseQuery:(x=g.parseQuery)==null?s:x,stringifyQuery:(S=g.stringifyQuery)==null?c:S},F=Promise.resolve(),I=ie(g);ne(I);let L=re(I),R=((C=g.tabBarEntries)==null?[]:C).map(e=>o(e,``)).filter(Boolean),z=new Set(R),B=fe(L),V=0,H,U,W,me=d(R,B.getRoutes(),M,k,A,j,P,N);function G(e){let t={...e};t.href=t.fullPath;let n=te(t,L);if(n){let e=n.record;t.name===void 0&&(t.name=e.name);let r=ee(n.matchedRecords);r!==void 0&&(t.meta=ae(r)),n.params&&Object.keys(t.params).length===0&&(t.params=oe(n.params)),t.matched=n.matchedRecords.map((e,t,r)=>{let i=t===r.length-1?n.matchedPath:void 0;return se(e,i)})}else t.matched=[];return t}function K(e,t){let n=typeof e==`string`?e:u(e,L,M);return G(de(n,t,P))}let q,J;function he(e){return e.source===`page`||e.source===`native`&&e.method===`navigateBack`}function ge(e,t){if(V>0||!he(t)||W!==void 0)return;if(U!==void 0){let t=U;if(U=void 0,e.fullPath===t)return}if(e.fullPath===q.fullPath)return;W=e.fullPath;let n=f(q);ce({target:e,from:n,nativeRouter:w,beforeEachGuards:T,beforeResolveGuards:E,resolveWithCodec:K}).then(e=>J==null?void 0:J(e)).finally(()=>{W=void 0})}q=pe({beforeRouteStateSync:ge,resolveRoute:G}).route;function _e(e){return K(e,q.path)}let Y=p({afterEachHooks:D,errorHandlers:O,nativeRouter:w,rejectOnError:N});J=Y.emitNavigationAfterEach;let X=ue({nativeRouter:w,route:q,routeResolveCodec:P,namedRouteLookup:L,beforeEachGuards:T,beforeResolveGuards:E,maxRedirects:k,tabBarPathSet:z,resolveWithCodec:K,settleNavigationResult:Y.settleNavigationResult});async function Z(e,t){let n=q.fullPath;t&&(H=t),V+=1;try{let t=await e();return q.fullPath!==n&&(U=q.fullPath),t}finally{--V,V<=0&&(H=void 0)}}function Q(e){try{return K(e,q.path).fullPath}catch(e){return}}async function ve(e,t,n=()=>!0){return Z(async()=>{let r=f(q),i=G(l(t,e));if(!i.path)return;if(H===i.fullPath){a({route:i,source:`router`});return}let o=await le({mode:`push`,target:i,from:r,nativeRouter:w,routeResolveCodec:P,namedRouteLookup:L,beforeEachGuards:T,beforeResolveGuards:E,maxRedirects:k,tabBarPathSet:z,resolveWithCodec:K,executeNative:!1,allowSameLocation:!0});if(n())return Y.settleNavigationResult(o)})}function ye(e){return T.add(e),()=>{T.delete(e)}}function be(e){return E.add(e),()=>{E.delete(e)}}function xe(e){return D.add(e),()=>{D.delete(e)}}function Se(e){return O.add(e),()=>{O.delete(e)}}let $={nativeRouter:w,options:me,currentRoute:q,install(e){var n;t($);let r=e==null||(n=e.config)==null?void 0:n.globalProperties;r&&(r.$router=$)},resolve:_e,isReady(){return F},push:e=>Z(()=>X.push(e),Q(e)),replace:e=>Z(()=>X.replace(e),Q(e)),back:e=>{var t;return Z(()=>X.back(e),(t=m(e==null?1:e,q,K))==null?void 0:t.fullPath)},go:e=>{var t;return Z(()=>X.go(e),e<0?(t=m(Math.abs(e),q,K))==null?void 0:t.fullPath:void 0)},forward:()=>Z(()=>X.forward()),hasRoute:B.hasRoute,getRoutes:B.getRoutes,addRoute:B.addRoute,removeRoute:B.removeRoute,clearRoutes:B.clearRoutes,beforeEach:ye,beforeResolve:be,afterEach:xe,onError:Se};return t($),r($,ve,j,A),$}export{g as createRouter};
|
|
@@ -0,0 +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(!(!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{createAbsoluteRoutePath as e}from"../routerInternal/path.mjs";import{resolveMatchedRouteRecord as t}from"../routerInternal/matching.mjs";import{createNativeRouteUrl as n,hasLocationQuery as r}from"../routerInternal/snapshots.mjs";import{NavigationFailureType as i}from"./types.mjs";import{createNavigationFailure as a,executeNavigationMethod as o,isNavigationFailure as s,runNavigationGuards as c}from"./navigationCore.mjs";import{createNavigationRunResult as l}from"./navigationResult.mjs";import{applyRedirectedFrom as u,createDuplicatedFailure as d,createHashOnlyNavigationFailure as f,createTabBarQueryFailure as p,createTooManyRedirectsFailure as m,resolveRouteRecordRedirect as h}from"./navigationTargetHelpers.mjs";async function g(g){let{mode:_,target:v,from:y,nativeRouter:b,routeResolveCodec:x,namedRouteLookup:S,beforeEachGuards:C,beforeResolveGuards:w,maxRedirects:T,tabBarPathSet:E,resolveWithCodec:D}=g,
|
|
1
|
+
import{createAbsoluteRoutePath as e}from"../routerInternal/path.mjs";import{resolveMatchedRouteRecord as t}from"../routerInternal/matching.mjs";import{createNativeRouteUrl as n,hasLocationQuery as r}from"../routerInternal/snapshots.mjs";import{NavigationFailureType as i}from"./types.mjs";import{createNavigationFailure as a,executeNavigationMethod as o,isNavigationFailure as s,runNavigationGuards as c}from"./navigationCore.mjs";import{createNavigationRunResult as l}from"./navigationResult.mjs";import{applyRedirectedFrom as u,createDuplicatedFailure as d,createHashOnlyNavigationFailure as f,createTabBarQueryFailure as p,createTooManyRedirectsFailure as m,resolveRouteRecordRedirect as h}from"./navigationTargetHelpers.mjs";async function g(g){let{mode:_,target:v,from:y,nativeRouter:b,routeResolveCodec:x,namedRouteLookup:S,beforeEachGuards:C,beforeResolveGuards:w,maxRedirects:T,tabBarPathSet:E,resolveWithCodec:D,executeNative:O=!0,allowSameLocation:k=!1}=g,A=v,j=_,M=0;for(;;){var N;let g=E.has(A.path);if(n(A,x.stringifyQuery)===n(y,x.stringifyQuery)&&A.hash!==y.hash)return l(j,y,A,f(A,y));if(!k&&(g?A.path===y.path:A.fullPath===y.fullPath))return l(j,y,A,d(A,y));if(g&&r(A.query))return l(j,y,A,p(A,y));let _=await c(C,{mode:j,to:A,from:y,nativeRouter:b},D);if(_.status===`failure`)return l(j,y,A,_.failure);if(_.status===`redirect`){let e=_.target,t=_.replace===!0?`replace`:_.replace===!1?`push`:j;if(e.fullPath!==A.fullPath||t!==j){if(u(e,A),A=e,j=t,M+=1,M>T)return l(j,y,A,m(A,y,T));continue}}let v=t(A,S),P=(N=v==null?void 0:v.matchedRecords)==null?[]:N,F=!1;for(let e of P){if(e.redirect===void 0)continue;let t;try{t=await h(e.redirect,A,y,D)}catch(e){return l(j,y,A,a(i.aborted,A,y,e))}let n=t.replace===!1?`push`:`replace`,r=t.target;if(r.fullPath!==A.fullPath||n!==j){if(u(r,A),A=r,j=n,M+=1,M>T)return l(j,y,A,m(A,y,T));F=!0;break}}if(F)continue;let I=!1;for(let e of P){if(e.beforeEnterGuards.length===0)continue;let t=await c(new Set(e.beforeEnterGuards),{mode:j,to:A,from:y,nativeRouter:b},D);if(t.status===`failure`)return l(j,y,A,t.failure);if(t.status===`redirect`){let e=t.target,n=t.replace===!0?`replace`:t.replace===!1?`push`:j;if(e.fullPath!==A.fullPath||n!==j){if(u(e,A),A=e,j=n,M+=1,M>T)return l(j,y,A,m(A,y,T));I=!0;break}}}if(I)continue;let L=await c(w,{mode:j,to:A,from:y,nativeRouter:b},D);if(L.status===`failure`)return l(j,y,A,L.failure);if(L.status===`redirect`){let e=L.target,t=L.replace===!0?`replace`:L.replace===!1?`push`:j;if(e.fullPath!==A.fullPath||t!==j){if(u(e,A),A=e,j=t,M+=1,M>T)return l(j,y,A,m(A,y,T));continue}}if(!O)return l(j,y,A);if(g){let t=await o(b.switchTab,{url:e(A.path)},A,y);return s(t)?l(j,y,A,t):l(j,y,A)}let R=j===`push`?b.navigateTo:b.redirectTo,z=await o(R,{url:n(A,x.stringifyQuery)},A,y);return s(z)?l(j,y,A,z):l(j,y,A)}}export{g as navigateWithTarget};
|
package/dist/router/types.d.mts
CHANGED
|
@@ -62,6 +62,7 @@ interface NavigationFailure extends Error {
|
|
|
62
62
|
readonly cause?: unknown;
|
|
63
63
|
}
|
|
64
64
|
type NavigationMode = 'push' | 'replace' | 'back';
|
|
65
|
+
type InitialNavigationMode = 'eager' | 'blocking';
|
|
65
66
|
interface NavigationRedirect {
|
|
66
67
|
to: RouteLocationRaw;
|
|
67
68
|
replace?: boolean;
|
|
@@ -123,6 +124,14 @@ interface UseRouterOptions {
|
|
|
123
124
|
namedRoutes?: NamedRoutes;
|
|
124
125
|
paramsMode?: RouteParamsMode;
|
|
125
126
|
maxRedirects?: number;
|
|
127
|
+
/**
|
|
128
|
+
* 首屏导航守卫模式。默认立即挂载页面,只有明确配置 `blocking` 时才等待守卫完成。
|
|
129
|
+
*/
|
|
130
|
+
initialNavigationMode?: InitialNavigationMode;
|
|
131
|
+
/**
|
|
132
|
+
* blocking 首屏导航守卫的最大等待时间(毫秒),超时后放行页面挂载。
|
|
133
|
+
*/
|
|
134
|
+
initialNavigationTimeout?: number;
|
|
126
135
|
parseQuery?: RouteQueryParser;
|
|
127
136
|
stringifyQuery?: RouteQueryStringifier;
|
|
128
137
|
/**
|
|
@@ -160,4 +169,4 @@ interface AddRoute {
|
|
|
160
169
|
(parentName: string, route: RouteRecordRaw): () => void;
|
|
161
170
|
}
|
|
162
171
|
//#endregion
|
|
163
|
-
export { AddRoute, LocationQuery, LocationQueryRaw, LocationQueryValue, LocationQueryValueRaw, NamedRouteRecord, NamedRoutes, NavigationAfterEach, NavigationAfterEachContext, NavigationErrorContext, NavigationErrorHandler, NavigationFailure, NavigationFailureType, NavigationFailureTypeValue, NavigationGuard, NavigationGuardContext, NavigationGuardResult, NavigationMode, NavigationRedirect, RouteLocationNormalizedLoaded, RouteLocationRaw, RouteLocationRedirectedFrom, RouteMeta, RouteParamValue, RouteParamValueRaw, RouteParams, RouteParamsMode, RouteParamsRaw, RouteQueryParser, RouteQueryStringifier, RouteRecordInput, RouteRecordMatched, RouteRecordRaw, RouteRecordRedirect, RouterNavigation, UseRouterOptions };
|
|
172
|
+
export { AddRoute, InitialNavigationMode, LocationQuery, LocationQueryRaw, LocationQueryValue, LocationQueryValueRaw, NamedRouteRecord, NamedRoutes, NavigationAfterEach, NavigationAfterEachContext, NavigationErrorContext, NavigationErrorHandler, NavigationFailure, NavigationFailureType, NavigationFailureTypeValue, NavigationGuard, NavigationGuardContext, NavigationGuardResult, NavigationMode, NavigationRedirect, RouteLocationNormalizedLoaded, RouteLocationRaw, RouteLocationRedirectedFrom, RouteMeta, RouteParamValue, RouteParamValueRaw, RouteParams, RouteParamsMode, RouteParamsRaw, RouteQueryParser, RouteQueryStringifier, RouteRecordInput, RouteRecordMatched, RouteRecordRaw, RouteRecordRedirect, RouterNavigation, UseRouterOptions };
|
package/dist/router/useRoute.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{reactive as e}from"../reactivity/reactive.mjs";import{readonly as t}from"../reactivity/readonly.mjs";import{
|
|
1
|
+
import{reactive as e}from"../reactivity/reactive.mjs";import{readonly as t}from"../reactivity/readonly.mjs";import{getCurrentMiniProgramPages as n}from"../runtime/platform.mjs";import{getCurrentSetupContext as r}from"../runtime/hooks/base.mjs";import{onLoad as i,onReady as a,onRouteDone as o,onShow as s,onUnload as c}from"../runtime/hooks/register.mjs";import{getActiveRouter as l}from"./instance.mjs";import{registerRouteStateSyncHandler as u}from"./routeSync.mjs";import{resolveCurrentRoute as d,resolvePageRoute as f}from"../routerInternal/location.mjs";import{cloneLocationQuery as p,cloneRouteLocationRedirectedFrom as m,cloneRouteMeta as h,cloneRouteParams as g,cloneRouteRecordMatchedList as _}from"../routerInternal/snapshots.mjs";import{useNativePageRouter as v,useNativeRouter as y}from"../runtime/vueCompat/router.mjs";import{resolveRouteLocation as b}from"./resolve.mjs";function x(e){return typeof e.route==`string`||typeof e.__route__==`string`}function S(e,t,r){if((r==null?void 0:r.source)===`router`||!t)return!0;if(r!=null&&r.page)return r.page===e;let i=n();return i[i.length-1]===e}function C(e,t){e.path=t.path,e.fullPath=t.fullPath,e.query=p(t.query),e.hash=t.hash,e.params=g(t.params),t.name===void 0?delete e.name:e.name=t.name,t.meta===void 0?delete e.meta:e.meta=h(t.meta),t.href===void 0?delete e.href:e.href=t.href,t.matched===void 0?delete e.matched:e.matched=_(t.matched),t.redirectedFrom===void 0?delete e.redirectedFrom:e.redirectedFrom=m(t.redirectedFrom)}function w(m={}){var h;let _=r();if(!_)throw Error(`useRoute() 必须在 setup() 的同步阶段调用`);let v=_.instance,y=(h=m.resolveRoute)==null?(e=>{var t,n;return(t=(n=l())==null?void 0:n.resolve(e))==null?e:t}):h,w=y(d(void 0,v)),T=x(v)||n().includes(v),E=e({path:w.path,fullPath:w.fullPath,query:p(w.query),hash:w.hash,params:g(w.params)});C(E,w);function D(e,t,n){let r=y(t||d(e,v));if(n){var i;(i=m.beforeRouteStateSync)==null||i.call(m,r,n)}C(E,r)}i(e=>{D(e)}),a(()=>{D()}),s(()=>{D()}),o(()=>{D()});let O=u(e=>{if(S(v,T,e)){if(e!=null&&e.route){D(void 0,e.route,e);return}if(e!=null&&e.page){D(void 0,f(e.page),e);return}if(e!=null&&e.url){D(void 0,b(e.url,E.path),e);return}D(void 0,void 0,e)}});return c(()=>{O()}),{route:t(E)}}function T(e={}){return w(e).route}function E(){return y()}function D(){return v()}export{w as createRouteStateController,D as useNativePageRouter,E as useNativeRouter,T as useRoute};
|
package/dist/router.d.mts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { RouterNavigateToOption, RouterReLaunchOption, RouterRedirectToOption, RouterSwitchTabOption, SetupContextRouter, TypedRouterTabBarUrl, TypedRouterUrl, WevuTypedRouterRouteMap } from "./runtime/types/props/router.mjs";
|
|
2
2
|
import "./runtime/types/props.mjs";
|
|
3
3
|
import { parseQuery, stringifyQuery } from "./routerInternal/query.mjs";
|
|
4
|
-
import { AddRoute, LocationQuery, LocationQueryRaw, LocationQueryValue, LocationQueryValueRaw, NamedRouteRecord, NamedRoutes, NavigationAfterEach, NavigationAfterEachContext, NavigationErrorContext, NavigationErrorHandler, NavigationFailure, NavigationFailureType, NavigationFailureTypeValue, NavigationGuard, NavigationGuardContext, NavigationGuardResult, NavigationMode, NavigationRedirect, RouteLocationNormalizedLoaded, RouteLocationRaw, RouteLocationRedirectedFrom, RouteMeta, RouteParamValue, RouteParamValueRaw, RouteParams, RouteParamsMode, RouteParamsRaw, RouteQueryParser, RouteQueryStringifier, RouteRecordInput, RouteRecordMatched, RouteRecordRaw, RouteRecordRedirect, RouterNavigation, UseRouterOptions } from "./router/types.mjs";
|
|
4
|
+
import { AddRoute, InitialNavigationMode, LocationQuery, LocationQueryRaw, LocationQueryValue, LocationQueryValueRaw, NamedRouteRecord, NamedRoutes, NavigationAfterEach, NavigationAfterEachContext, NavigationErrorContext, NavigationErrorHandler, NavigationFailure, NavigationFailureType, NavigationFailureTypeValue, NavigationGuard, NavigationGuardContext, NavigationGuardResult, NavigationMode, NavigationRedirect, RouteLocationNormalizedLoaded, RouteLocationRaw, RouteLocationRedirectedFrom, RouteMeta, RouteParamValue, RouteParamValueRaw, RouteParams, RouteParamsMode, RouteParamsRaw, RouteQueryParser, RouteQueryStringifier, RouteRecordInput, RouteRecordMatched, RouteRecordRaw, RouteRecordRedirect, RouterNavigation, UseRouterOptions } from "./router/types.mjs";
|
|
5
5
|
import { createRouter } from "./router/createRouter.mjs";
|
|
6
6
|
import { createNavigationFailure, isNavigationFailure } from "./router/navigationCore.mjs";
|
|
7
7
|
import { resolveRouteLocation } from "./router/resolve.mjs";
|
|
8
8
|
import { useNativePageRouter, useNativeRouter, useRoute } from "./router/useRoute.mjs";
|
|
9
9
|
import { useRouter } from "./router/useRouter.mjs";
|
|
10
|
-
export { type AddRoute, type LocationQuery, type LocationQueryRaw, type LocationQueryValue, type LocationQueryValueRaw, type NamedRouteRecord, type NamedRoutes, type NavigationAfterEach, type NavigationAfterEachContext, type NavigationErrorContext, type NavigationErrorHandler, type NavigationFailure, NavigationFailureType, type NavigationFailureTypeValue, type NavigationGuard, type NavigationGuardContext, type NavigationGuardResult, type NavigationMode, type NavigationRedirect, type RouteLocationNormalizedLoaded, type RouteLocationRaw, type RouteLocationRedirectedFrom, type RouteMeta, type RouteParamValue, type RouteParamValueRaw, type RouteParams, type RouteParamsMode, type RouteParamsRaw, type RouteQueryParser, type RouteQueryStringifier, type RouteRecordInput, type RouteRecordMatched, type RouteRecordRaw, type RouteRecordRedirect, type RouterNavigateToOption, type RouterNavigation, type RouterReLaunchOption, type RouterRedirectToOption, type RouterSwitchTabOption, type SetupContextRouter, type TypedRouterTabBarUrl, type TypedRouterUrl, type UseRouterOptions, type WevuTypedRouterRouteMap, createNavigationFailure, createRouter, isNavigationFailure, parseQuery, resolveRouteLocation, stringifyQuery, useNativePageRouter, useNativeRouter, useRoute, useRouter };
|
|
10
|
+
export { type AddRoute, type InitialNavigationMode, type LocationQuery, type LocationQueryRaw, type LocationQueryValue, type LocationQueryValueRaw, type NamedRouteRecord, type NamedRoutes, type NavigationAfterEach, type NavigationAfterEachContext, type NavigationErrorContext, type NavigationErrorHandler, type NavigationFailure, NavigationFailureType, type NavigationFailureTypeValue, type NavigationGuard, type NavigationGuardContext, type NavigationGuardResult, type NavigationMode, type NavigationRedirect, type RouteLocationNormalizedLoaded, type RouteLocationRaw, type RouteLocationRedirectedFrom, type RouteMeta, type RouteParamValue, type RouteParamValueRaw, type RouteParams, type RouteParamsMode, type RouteParamsRaw, type RouteQueryParser, type RouteQueryStringifier, type RouteRecordInput, type RouteRecordMatched, type RouteRecordRaw, type RouteRecordRedirect, type RouterNavigateToOption, type RouterNavigation, type RouterReLaunchOption, type RouterRedirectToOption, type RouterSwitchTabOption, type SetupContextRouter, type TypedRouterTabBarUrl, type TypedRouterUrl, type UseRouterOptions, type WevuTypedRouterRouteMap, createNavigationFailure, createRouter, isNavigationFailure, parseQuery, resolveRouteLocation, stringifyQuery, useNativePageRouter, useNativeRouter, useRoute, useRouter };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createAbsoluteRoutePath as e,resolvePath as t}from"./path.mjs";import{stringifyQuery as n}from"./query.mjs";function r(e){if(e)return{...e}}function i(e){let t={name:e.name,path:e.path};return e.meta!==void 0&&(t.meta=r(e.meta)),Array.isArray(e.alias)?t.alias=Object.freeze(e.alias.slice()):e.alias!==void 0&&(t.alias=e.alias),Array.isArray(e.beforeEnter)?t.beforeEnter=Object.freeze(e.beforeEnter.slice()):e.beforeEnter!==void 0&&(t.beforeEnter=e.beforeEnter),e.redirect!==void 0&&(t.redirect=e.redirect),Object.freeze(t)}function a(t,n,r,a,o,s){let
|
|
1
|
+
import{createAbsoluteRoutePath as e,resolvePath as t}from"./path.mjs";import{stringifyQuery as n}from"./query.mjs";function r(e){if(e)return{...e}}function i(e){let t={name:e.name,path:e.path};return e.meta!==void 0&&(t.meta=r(e.meta)),Array.isArray(e.alias)?t.alias=Object.freeze(e.alias.slice()):e.alias!==void 0&&(t.alias=e.alias),Array.isArray(e.beforeEnter)?t.beforeEnter=Object.freeze(e.beforeEnter.slice()):e.beforeEnter!==void 0&&(t.beforeEnter=e.beforeEnter),e.redirect!==void 0&&(t.redirect=e.redirect),Object.freeze(t)}function a(t,n,r,a,o,s,c,l){let u=Object.freeze(t.map(t=>e(t))),d=Object.freeze(n.map(i));return Object.freeze({tabBarEntries:u,routes:d,namedRoutes:d,paramsMode:r,maxRedirects:a,initialNavigationMode:o,initialNavigationTimeout:s,parseQuery:c.parseQuery,stringifyQuery:c.stringifyQuery,rejectOnError:l})}function o(n,i){let a={name:n.name,path:e(n.path)},o=typeof i==`string`&&i?e(t(i,``)):void 0;return o&&o!==a.path&&(a.aliasPath=o),n.meta!==void 0&&(a.meta=r(n.meta)),a}function s(e){if(e)return e.map(e=>({name:e.name,path:e.path,aliasPath:e.aliasPath,meta:r(e.meta)}))}function c(e){let t={};for(let n of Object.keys(e)){let r=e[n];t[n]=Array.isArray(r)?r.slice():r}return t}function l(e){let t={};for(let n of Object.keys(e)){let r=e[n];t[n]=Array.isArray(r)?r.slice():r}return t}function u(e){if(!e)return;let t={path:e.path,fullPath:e.fullPath,query:c(e.query),hash:e.hash,params:l(e.params)};return e.name!==void 0&&(t.name=e.name),e.meta!==void 0&&(t.meta=r(e.meta)),e.href!==void 0&&(t.href=e.href),e.matched!==void 0&&(t.matched=s(e.matched)),t}function d(e){let t={path:e.path,fullPath:e.fullPath,query:c(e.query),hash:e.hash,params:l(e.params)};return e.name!==void 0&&(t.name=e.name),e.meta!==void 0&&(t.meta=r(e.meta)),e.href!==void 0&&(t.href=e.href),e.matched!==void 0&&(t.matched=s(e.matched)),t}function f(e){let t={path:e.path,fullPath:e.fullPath,query:c(e.query),hash:e.hash,params:l(e.params)};return e.meta!==void 0&&(t.meta=r(e.meta)),e.href!==void 0&&(t.href=e.href),e.matched!==void 0&&(t.matched=s(e.matched)),e.redirectedFrom!==void 0&&(t.redirectedFrom=u(e.redirectedFrom)),e.name!==void 0&&(t.name=e.name),t}function p(t,r=n){let i=e(t.path),a=r(t.query);return a?`${i}?${a}`:i}function m(e){return Object.keys(e).length>0}export{c as cloneLocationQuery,u as cloneRouteLocationRedirectedFrom,r as cloneRouteMeta,l as cloneRouteParams,s as cloneRouteRecordMatchedList,p as createNativeRouteUrl,d as createRedirectedFromSnapshot,a as createRouterOptionsSnapshot,m as hasLocationQuery,o as normalizeRouteRecordMatched,f as snapshotRouteLocation};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{callHookList as e}from"../../hooks/base.mjs";import{bindCurrentPageInstance as t,ensureMiniProgramGlobalPatched as n,ensurePageShareMenus as r,releaseCurrentPageInstance as i,resolvePageOptions as a}from"./lifecycle/platform.mjs";import{scheduleTemplateRefUpdate as o}from"../../templateRefs.mjs";import{enableDeferredSetData as s,mountRuntimeInstance as c,setRuntimeSetDataVisibility as l,teardownRuntimeInstance as u}from"../runtimeInstance.mjs";import{
|
|
1
|
+
import{callHookList as e}from"../../hooks/base.mjs";import{bindCurrentPageInstance as t,ensureMiniProgramGlobalPatched as n,ensurePageShareMenus as r,releaseCurrentPageInstance as i,resolvePageOptions as a}from"./lifecycle/platform.mjs";import{scheduleTemplateRefUpdate as o}from"../../templateRefs.mjs";import{enableDeferredSetData as s,mountRuntimeInstance as c,setRuntimeSetDataVisibility as l,teardownRuntimeInstance as u}from"../runtimeInstance.mjs";import{cancelInitialNavigation as d,ensureInitialNavigation as f}from"../../../router/initialNavigation.mjs";import{notifyRouteStateSync as p}from"../../../router/routeSync.mjs";import{attachOptionalPageLifecycleHooks as m}from"./lifecycle/optionalHooks.mjs";import{WEVU_ON_LOAD_CALLED_KEY as h,WEVU_READY_CALLED_KEY as g,WEVU_ROUTE_DONE_CALLED_KEY as _}from"@weapp-core/constants";function v(v){let{runtimeApp:y,watch:b,setup:x,userOnLoad:S,userOnUnload:C,userOnShow:w,userOnHide:T,userOnReady:E,isPage:D,enableOnSaveExitState:O,enableOnPullDownRefresh:k,enableOnReachBottom:A,enableOnPageScroll:j,enableOnRouteDone:M,enableOnRouteDoneFallback:N,enableOnTabItemTap:P,enableOnResize:F,enableOnShareAppMessage:I,enableOnShareTimeline:L,enableOnAddToFavorites:R,syncWevuPropsFromValues:z,effectiveOnSaveExitState:B,effectiveOnPullDownRefresh:V,effectiveOnReachBottom:H,effectiveOnPageScroll:U,effectiveOnRouteDone:W,effectiveOnTabItemTap:G,effectiveOnResize:K,effectiveOnShareAppMessage:q,effectiveOnShareTimeline:J,effectiveOnAddToFavorites:Y,hasHook:X}=v,Z=e=>{var t,n;(t=e.__wevu)==null||(n=t.__wevu_flushSetupSnapshotSync)==null||n.call(t)},Q={onLoad(...t){if(this[h])return;this[h]=!0;let n=()=>{c(this,y,b,x);let n=t[0]&&typeof t[0]==`object`?t[0]:a(this);if(z==null||z(this,n),Z(this),s(this),D&&r({enableOnShareAppMessage:I,enableOnShareTimeline:L}),e(this,`onLoad`,t),typeof S==`function`)return S.apply(this,t.length?t:[n])};return(D?f(this,t[0],{onComplete:e=>{e&&n()}}):void 0)||n()},onUnload(...e){if(d(this),D&&i(this),u(this),typeof C==`function`)return C.apply(this,e)},onShow(...i){if(D&&(n(),t(this),this[h]||Q.onLoad.call(this,a(this)),z==null||z(this,a(this)),Z(this),r({enableOnShareAppMessage:I,enableOnShareTimeline:L}),this[_]=!1),l(this,!0),D&&p({page:this,source:`page`}),e(this,`onShow`,i),typeof w==`function`)return w.apply(this,i)},onHide(...t){if(D&&i(this),l(this,!1),e(this,`onHide`,t),typeof T==`function`)return T.apply(this,t)},onReady(...t){if(D&&(this[h]||Q.onLoad.call(this,a(this)),z==null||z(this,a(this)),Z(this),r({enableOnShareAppMessage:I,enableOnShareTimeline:L})),!this[g]){if(this[g]=!0,D&&M&&N){let e=this;setTimeout(()=>{if(!e[_]){var t;(t=Q.onRouteDone)==null||t.call(e)}},0)}let n=()=>{e(this,`onReady`,t),typeof E==`function`&&E.apply(this,t)},r=()=>o(this,n);D&&f(this,void 0,{start:!1,onComplete:e=>{e&&r()}})||r();return}if(typeof E==`function`)return E.apply(this,t)}};return m(Q,{enableOnSaveExitState:O,enableOnPullDownRefresh:k,enableOnReachBottom:A,enableOnPageScroll:j,enableOnRouteDone:M,enableOnTabItemTap:P,enableOnResize:F,enableOnShareAppMessage:I,enableOnShareTimeline:L,enableOnAddToFavorites:R,effectiveOnSaveExitState:B,effectiveOnPullDownRefresh:V,effectiveOnReachBottom:H,effectiveOnPageScroll:U,effectiveOnRouteDone:W,effectiveOnTabItemTap:G,effectiveOnResize:K,effectiveOnShareAppMessage:q,effectiveOnShareTimeline:J,effectiveOnAddToFavorites:Y,hasHook:X}),Q}export{v as createPageLifecycleHooks};
|
|
@@ -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
|
|
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};
|
package/dist/vue-demi.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{nextTick as e}from"./scheduler.mjs";import{batch as t,effect as n,effectScope as r,endBatch as i,getCurrentScope as a,onScopeDispose as o,startBatch as s,stop as c}from"./reactivity/core.mjs";import{addMutationRecorder as l,removeMutationRecorder as u}from"./reactivity/reactive/mutation.mjs";import{toRaw as d}from"./reactivity/reactive/shared.mjs";import{prelinkReactiveTree as f,touchReactive as p}from"./reactivity/reactive/patch.mjs";import{isShallowReactive as m,shallowReactive as h}from"./reactivity/reactive/shallow.mjs";import{getReactiveVersion as g,isRaw as _,isReactive as v,markRaw as y,reactive as b}from"./reactivity/reactive.mjs";import{customRef as x,isRef as S,ref as C,toValue as w,unref as T}from"./reactivity/ref.mjs";import{computed as E}from"./reactivity/computed.mjs";import{isProxy as D,isReadonly as O,readonly as k,shallowReadonly as A}from"./reactivity/readonly.mjs";import{isShallowRef as j,shallowRef as M,triggerRef as N}from"./reactivity/shallowRef.mjs";import{toRef as P,toRefs as F}from"./reactivity/toRefs.mjs";import{traverse as I}from"./reactivity/traverse.mjs";import{callHookList as L,callHookReturn as R,getCurrentInstance as z,getCurrentSetupContext as B,setCurrentInstance as V,setCurrentSetupContext as H}from"./runtime/hooks/base.mjs";import{onAddToFavorites as U,onAttached as W,onDetached as G,onError as K,onHide as q,onLaunch as J,onLoad as Y,onMemoryWarning as X,onMoved as Z,onPageNotFound as Q,onPageScroll as $,onPullDownRefresh as ee,onReachBottom as te,onReady as ne,onResize as re,onRouteDone as ie,onSaveExitState as ae,onShareAppMessage as oe,onShareTimeline as se,onShow as ce,onTabItemTap as le,onThemeChange as ue,onUnhandledRejection as de,onUnload as fe}from"./runtime/hooks/register.mjs";import{callUpdateHooks as pe,onActivated as me,onBeforeMount as he,onBeforeUnmount as ge,onBeforeUpdate as _e,onDeactivated as ve,onErrorCaptured as ye,onMounted as be,onServerPrefetch as xe,onUnmounted as Se,onUpdated as Ce}from"./runtime/hooks/vue.mjs";import{getDeepWatchStrategy as we,setDeepWatchStrategy as Te}from"./reactivity/watch/types.mjs";import{watch as Ee,watchEffect as De,watchPostEffect as Oe,watchSyncEffect as ke}from"./reactivity/watch.mjs";import{version as Ae}from"./version.mjs";import{isNoSetData as je,markNoSetData as Me}from"./runtime/noSetData.mjs";import{resetWevuDefaults as Ne,setWevuDefaults as Pe}from"./runtime/defaults.mjs";import{setGlobalProvidedValue as Fe}from"./runtime/provideStore.mjs";import{resolveRuntimePageLayoutName as Ie,setPageLayout as Le,syncRuntimePageLayoutState as Re,syncRuntimePageLayoutStateFromRuntime as ze,usePageLayout as Be}from"./runtime/pageLayout.mjs";import{runSetupFunction as Ve}from"./runtime/register/setup.mjs";import{mountRuntimeInstance as He,setRuntimeSetDataVisibility as Ue,teardownRuntimeInstance as We}from"./runtime/register/runtimeInstance.mjs";import{registerApp as Ge}from"./runtime/register/app.mjs";import{
|
|
1
|
+
import{nextTick as e}from"./scheduler.mjs";import{batch as t,effect as n,effectScope as r,endBatch as i,getCurrentScope as a,onScopeDispose as o,startBatch as s,stop as c}from"./reactivity/core.mjs";import{addMutationRecorder as l,removeMutationRecorder as u}from"./reactivity/reactive/mutation.mjs";import{toRaw as d}from"./reactivity/reactive/shared.mjs";import{prelinkReactiveTree as f,touchReactive as p}from"./reactivity/reactive/patch.mjs";import{isShallowReactive as m,shallowReactive as h}from"./reactivity/reactive/shallow.mjs";import{getReactiveVersion as g,isRaw as _,isReactive as v,markRaw as y,reactive as b}from"./reactivity/reactive.mjs";import{customRef as x,isRef as S,ref as C,toValue as w,unref as T}from"./reactivity/ref.mjs";import{computed as E}from"./reactivity/computed.mjs";import{isProxy as D,isReadonly as O,readonly as k,shallowReadonly as A}from"./reactivity/readonly.mjs";import{isShallowRef as j,shallowRef as M,triggerRef as N}from"./reactivity/shallowRef.mjs";import{toRef as P,toRefs as F}from"./reactivity/toRefs.mjs";import{traverse as I}from"./reactivity/traverse.mjs";import{callHookList as L,callHookReturn as R,getCurrentInstance as z,getCurrentSetupContext as B,setCurrentInstance as V,setCurrentSetupContext as H}from"./runtime/hooks/base.mjs";import{onAddToFavorites as U,onAttached as W,onDetached as G,onError as K,onHide as q,onLaunch as J,onLoad as Y,onMemoryWarning as X,onMoved as Z,onPageNotFound as Q,onPageScroll as $,onPullDownRefresh as ee,onReachBottom as te,onReady as ne,onResize as re,onRouteDone as ie,onSaveExitState as ae,onShareAppMessage as oe,onShareTimeline as se,onShow as ce,onTabItemTap as le,onThemeChange as ue,onUnhandledRejection as de,onUnload as fe}from"./runtime/hooks/register.mjs";import{callUpdateHooks as pe,onActivated as me,onBeforeMount as he,onBeforeUnmount as ge,onBeforeUpdate as _e,onDeactivated as ve,onErrorCaptured as ye,onMounted as be,onServerPrefetch as xe,onUnmounted as Se,onUpdated as Ce}from"./runtime/hooks/vue.mjs";import{getDeepWatchStrategy as we,setDeepWatchStrategy as Te}from"./reactivity/watch/types.mjs";import{watch as Ee,watchEffect as De,watchPostEffect as Oe,watchSyncEffect as ke}from"./reactivity/watch.mjs";import{version as Ae}from"./version.mjs";import{isNoSetData as je,markNoSetData as Me}from"./runtime/noSetData.mjs";import{resetWevuDefaults as Ne,setWevuDefaults as Pe}from"./runtime/defaults.mjs";import{setGlobalProvidedValue as Fe}from"./runtime/provideStore.mjs";import{resolveRuntimePageLayoutName as Ie,setPageLayout as Le,syncRuntimePageLayoutState as Re,syncRuntimePageLayoutStateFromRuntime as ze,usePageLayout as Be}from"./runtime/pageLayout.mjs";import{runSetupFunction as Ve}from"./runtime/register/setup.mjs";import{mountRuntimeInstance as He,setRuntimeSetDataVisibility as Ue,teardownRuntimeInstance as We}from"./runtime/register/runtimeInstance.mjs";import{registerApp as Ge}from"./runtime/register/app.mjs";import{hasInjectionContext as Ke,inject as qe,injectGlobal as Je,provide as Ye,provideGlobal as Xe}from"./runtime/provide.mjs";import{registerPageLayoutBridge as Ze,registerRuntimeLayoutHosts as Qe,resolveLayoutBridge as $e,resolveLayoutHost as et,unregisterPageLayoutBridge as tt,unregisterRuntimeLayoutHosts as nt,useLayoutBridge as rt,useLayoutHosts as it,waitForLayoutHost as at}from"./runtime/layoutBridge.mjs";import{registerComponent as ot}from"./runtime/register/component.mjs";import{createApp as st}from"./runtime/app.mjs";import{useCssModule as ct}from"./runtime/css.mjs";import{createWevuComponent as lt,createWevuScopedSlotComponent as ut,defineComponent as dt}from"./runtime/define.mjs";import{useDisposables as ft}from"./runtime/disposables.mjs";import{useElementIntersectionObserver as pt}from"./runtime/elementIntersectionObserver.mjs";import{useIntersectionObserver as mt}from"./runtime/intersectionObserver.mjs";import{getCurrentPageStackSnapshot as ht,getNavigationBarMetrics as gt,useNavigationBarMetrics as _t,usePageStack as vt}from"./runtime/pageEnvironment.mjs";import{usePageScrollThrottle as yt}from"./runtime/pageScroll.mjs";import{useAsyncPullDownRefresh as bt}from"./runtime/pullDownRefresh.mjs";import{useBoundingClientRect as xt,useScrollOffset as St,useSelectorFields as Ct,useSelectorQuery as wt}from"./runtime/selectorQuery.mjs";import{normalizeClass as Tt,normalizeStyle as Et,resolvePropValue as Dt}from"./runtime/template.mjs";import{useUpdatePerformanceListener as Ot}from"./runtime/updatePerformance.mjs";import{defineAppSetup as kt,use as At}from"./runtime/use.mjs";import{useAttrs as jt,useNativeInstance as Mt,useSlots as Nt}from"./runtime/vueCompat/context.mjs";import{mergeModels as Pt,useBindModel as Ft,useChangeModel as It,useModel as Lt}from"./runtime/vueCompat/model.mjs";import{useNativePageRouter as Rt,useNativeRouter as zt}from"./runtime/vueCompat/router.mjs";import{useTemplateRef as Bt}from"./runtime/vueCompat/templateRef.mjs";import{createStore as Vt}from"./store/manager.mjs";import{defineStore as Ht}from"./store/define.mjs";import{storeToRefs as Ut}from"./store/storeToRefs.mjs";export*from"@wevu/web-apis";const Wt=!1,Gt=!0,Kt=void 0;function qt(){}export{Kt as Vue2,l as addMutationRecorder,t as batch,L as callHookList,R as callHookReturn,pe as callUpdateHooks,E as computed,st as createApp,Vt as createStore,lt as createWevuComponent,ut as createWevuScopedSlotComponent,x as customRef,kt as defineAppSetup,dt as defineComponent,Ht as defineStore,n as effect,r as effectScope,i as endBatch,z as getCurrentInstance,ht as getCurrentPageStackSnapshot,a as getCurrentScope,B as getCurrentSetupContext,we as getDeepWatchStrategy,gt as getNavigationBarMetrics,g as getReactiveVersion,Ke as hasInjectionContext,qe as inject,Je as injectGlobal,qt as install,je as isNoSetData,D as isProxy,_ as isRaw,v as isReactive,O as isReadonly,S as isRef,m as isShallowReactive,j as isShallowRef,Wt as isVue2,Gt as isVue3,Me as markNoSetData,y as markRaw,Pt as mergeModels,He as mountRuntimeInstance,e as nextTick,Tt as normalizeClass,Et as normalizeStyle,me as onActivated,U as onAddToFavorites,W as onAttached,he as onBeforeMount,ge as onBeforeUnmount,_e as onBeforeUpdate,ve as onDeactivated,G as onDetached,K as onError,ye as onErrorCaptured,q as onHide,J as onLaunch,Y as onLoad,X as onMemoryWarning,be as onMounted,Z as onMoved,Q as onPageNotFound,$ as onPageScroll,ee as onPullDownRefresh,te as onReachBottom,ne as onReady,re as onResize,ie as onRouteDone,ae as onSaveExitState,o as onScopeDispose,xe as onServerPrefetch,oe as onShareAppMessage,se as onShareTimeline,ce as onShow,le as onTabItemTap,ue as onThemeChange,de as onUnhandledRejection,fe as onUnload,Se as onUnmounted,Ce as onUpdated,f as prelinkReactiveTree,Ye as provide,Xe as provideGlobal,b as reactive,k as readonly,C as ref,Ge as registerApp,ot as registerComponent,Ze as registerPageLayoutBridge,Qe as registerRuntimeLayoutHosts,u as removeMutationRecorder,Ne as resetWevuDefaults,$e as resolveLayoutBridge,et as resolveLayoutHost,Dt as resolvePropValue,Ie as resolveRuntimePageLayoutName,Ve as runSetupFunction,V as setCurrentInstance,H as setCurrentSetupContext,Te as setDeepWatchStrategy,Fe as setGlobalProvidedValue,Le as setPageLayout,Ue as setRuntimeSetDataVisibility,Pe as setWevuDefaults,h as shallowReactive,A as shallowReadonly,M as shallowRef,s as startBatch,c as stop,Ut as storeToRefs,Re as syncRuntimePageLayoutState,ze as syncRuntimePageLayoutStateFromRuntime,We as teardownRuntimeInstance,d as toRaw,P as toRef,F as toRefs,w as toValue,p as touchReactive,I as traverse,N as triggerRef,T as unref,tt as unregisterPageLayoutBridge,nt as unregisterRuntimeLayoutHosts,At as use,bt as useAsyncPullDownRefresh,jt as useAttrs,Ft as useBindModel,xt as useBoundingClientRect,It as useChangeModel,ct as useCssModule,ft as useDisposables,pt as useElementIntersectionObserver,mt as useIntersectionObserver,rt as useLayoutBridge,it as useLayoutHosts,Lt as useModel,Mt as useNativeInstance,Rt as useNativePageRouter,zt as useNativeRouter,_t as useNavigationBarMetrics,Be as usePageLayout,yt as usePageScrollThrottle,vt as usePageStack,St as useScrollOffset,Ct as useSelectorFields,wt as useSelectorQuery,Nt as useSlots,Bt as useTemplateRef,Ot as useUpdatePerformanceListener,Ae as version,at as waitForLayoutHost,Ee as watch,De as watchEffect,Oe as watchPostEffect,ke as watchSyncEffect};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wevu",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "7.0.1",
|
|
5
5
|
"description": "Vue 3 风格的小程序运行时,包含响应式、diff+setData 与轻量状态管理",
|
|
6
6
|
"author": "ice breaker <1324318532@qq.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -271,12 +271,12 @@
|
|
|
271
271
|
}
|
|
272
272
|
},
|
|
273
273
|
"dependencies": {
|
|
274
|
-
"
|
|
274
|
+
"@weapp-core/constants": "0.2.1",
|
|
275
275
|
"@weapp-core/shared": "3.2.0",
|
|
276
276
|
"@wevu/api": "0.3.0",
|
|
277
|
-
"@
|
|
278
|
-
"@wevu/
|
|
279
|
-
"
|
|
277
|
+
"@wevu/compiler": "7.0.1",
|
|
278
|
+
"@wevu/web-apis": "1.2.39",
|
|
279
|
+
"vue": "^3.5.42"
|
|
280
280
|
},
|
|
281
281
|
"scripts": {
|
|
282
282
|
"dev": "tsdown -w",
|