wevu 6.13.0 → 6.13.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.
@@ -0,0 +1,46 @@
1
+ //#region src/runtime/types/props/router.d.ts
2
+ /**
3
+ * Router 路由类型映射(供声明合并扩展)。
4
+ *
5
+ * 典型用法:在业务项目的类型声明中补充 `entries` 联合类型,
6
+ * 让 `useNativeRouter()/useNativePageRouter()` 的 `url` 参数获得字面量约束。
7
+ */
8
+ interface WevuTypedRouterRouteMap {}
9
+ type ResolveTypedRouterEntries = WevuTypedRouterRouteMap extends {
10
+ entries: infer Entries;
11
+ } ? Extract<Entries, string> : string;
12
+ type ResolveTypedRouterTabBarEntries = WevuTypedRouterRouteMap extends {
13
+ tabBarEntries: infer Entries;
14
+ } ? Extract<Entries, string> : ResolveTypedRouterEntries;
15
+ type RelativeRouterUrl = `./${string}` | `../${string}`;
16
+ type AbsoluteRouterPath<Path extends string> = Path | `/${Path}`;
17
+ type AbsoluteRouterUrl<Path extends string> = AbsoluteRouterPath<Path> | `${Path}?${string}` | `/${Path}?${string}`;
18
+ type RouterUrl<Path extends string> = string extends Path ? string : AbsoluteRouterUrl<Path> | RelativeRouterUrl;
19
+ type RouterPathUrl<Path extends string> = string extends Path ? string : AbsoluteRouterPath<Path>;
20
+ type TypedRouterUrl = RouterUrl<ResolveTypedRouterEntries>;
21
+ type TypedRouterTabBarUrl = RouterPathUrl<ResolveTypedRouterTabBarEntries>;
22
+ type RouterSwitchTabOption = Omit<WechatMiniprogram.SwitchTabOption, 'url'> & {
23
+ url: TypedRouterTabBarUrl;
24
+ };
25
+ type RouterReLaunchOption = Omit<WechatMiniprogram.ReLaunchOption, 'url'> & {
26
+ url: TypedRouterUrl;
27
+ };
28
+ type RouterRedirectToOption = Omit<WechatMiniprogram.RedirectToOption, 'url'> & {
29
+ url: TypedRouterUrl;
30
+ };
31
+ type RouterNavigateToOption = Omit<WechatMiniprogram.NavigateToOption, 'url'> & {
32
+ url: TypedRouterUrl;
33
+ };
34
+ /**
35
+ * setup 场景下推荐使用的 Router 类型。
36
+ * 默认行为与原生 Router 一致;声明合并后可获得更精确的 `url` 类型提示。
37
+ */
38
+ interface SetupContextRouter {
39
+ switchTab: (option: RouterSwitchTabOption) => ReturnType<WechatMiniprogram.Component.Router['switchTab']>;
40
+ reLaunch: (option: RouterReLaunchOption) => ReturnType<WechatMiniprogram.Component.Router['reLaunch']>;
41
+ redirectTo: (option: RouterRedirectToOption) => ReturnType<WechatMiniprogram.Component.Router['redirectTo']>;
42
+ navigateTo: (option: RouterNavigateToOption) => ReturnType<WechatMiniprogram.Component.Router['navigateTo']>;
43
+ navigateBack: WechatMiniprogram.Component.Router['navigateBack'];
44
+ }
45
+ //#endregion
46
+ export { SetupContextRouter as a, WevuTypedRouterRouteMap as c, RouterSwitchTabOption as i, RouterReLaunchOption as n, TypedRouterTabBarUrl as o, RouterRedirectToOption as r, TypedRouterUrl as s, RouterNavigateToOption as t };
package/dist/router.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { an as RouterReLaunchOption, cn as SetupContextRouter, dn as WevuTypedRouterRouteMap, in as RouterNavigateToOption, ln as TypedRouterTabBarUrl, on as RouterRedirectToOption, sn as RouterSwitchTabOption, un as TypedRouterUrl } from "./vue-types-D8BVm-8u.mjs";
1
+ import { a as SetupContextRouter, c as WevuTypedRouterRouteMap, i as RouterSwitchTabOption, n as RouterReLaunchOption, o as TypedRouterTabBarUrl, r as RouterRedirectToOption, s as TypedRouterUrl, t as RouterNavigateToOption } from "./router-DW4Yf9Yj.mjs";
2
2
 
3
3
  //#region src/routerInternal/types.d.ts
4
4
  interface RouteResolveCodec {
@@ -430,6 +430,9 @@ function watchSyncEffect(effectFn, options = {}) {
430
430
  });
431
431
  }
432
432
  //#endregion
433
+ //#region src/version.ts
434
+ const version = "6.13.2";
435
+ //#endregion
433
436
  //#region src/utils.ts
434
437
  function capitalize(str) {
435
438
  if (!str) return "";
@@ -4607,7 +4610,8 @@ function createApp(options) {
4607
4610
  for (const cleanup of appUnmountCleanups) cleanup();
4608
4611
  appUnmountCleanups.clear();
4609
4612
  },
4610
- config: appConfig
4613
+ config: appConfig,
4614
+ version
4611
4615
  };
4612
4616
  const hasGlobalApp = typeof App === "function";
4613
4617
  try {
@@ -5518,4 +5522,4 @@ function useTemplateRef(name) {
5518
5522
  return target;
5519
5523
  }
5520
5524
  //#endregion
5521
- export { onBeforeUnmount as $, registerApp as A, resetWevuDefaults as B, resolveLayoutBridge as C, useLayoutBridge as D, unregisterRuntimeLayoutHosts as E, resolveRuntimePageLayoutName as F, watchEffect as G, isNoSetData as H, setPageLayout as I, getDeepWatchStrategy as J, watchPostEffect as K, syncRuntimePageLayoutState as L, setRuntimeSetDataVisibility as M, teardownRuntimeInstance as N, useLayoutHosts as O, runSetupFunction as P, onBeforeMount as Q, syncRuntimePageLayoutStateFromRuntime as R, registerRuntimeLayoutHosts as S, unregisterPageLayoutBridge as T, markNoSetData as U, setWevuDefaults as V, watch as W, callUpdateHooks as X, setDeepWatchStrategy as Y, onActivated as Z, createWevuScopedSlotComponent as _, useAttrs as a, onUnmounted as at, registerComponent as b, defineAppSetup as c, toRef as ct, normalizeClass as d, shallowRef as dt, onBeforeUpdate as et, normalizeStyle as f, triggerRef as ft, createWevuComponent as g, useDisposables as h, useModel as i, onServerPrefetch as it, mountRuntimeInstance as j, waitForLayoutHost as k, use as l, toRefs as lt, useIntersectionObserver as m, mergeModels as n, onErrorCaptured as nt, useNativeInstance as o, onUpdated as ot, usePageScrollThrottle as p, watchSyncEffect as q, useBindModel as r, onMounted as rt, useSlots as s, traverse as st, useTemplateRef as t, onDeactivated as tt, useUpdatePerformanceListener as u, isShallowRef as ut, defineComponent as v, resolveLayoutHost as w, registerPageLayoutBridge as x, createApp as y, usePageLayout as z };
5525
+ export { onBeforeMount as $, registerApp as A, resetWevuDefaults as B, resolveLayoutBridge as C, useLayoutBridge as D, unregisterRuntimeLayoutHosts as E, resolveRuntimePageLayoutName as F, watch as G, isNoSetData as H, setPageLayout as I, watchSyncEffect as J, watchEffect as K, syncRuntimePageLayoutState as L, setRuntimeSetDataVisibility as M, teardownRuntimeInstance as N, useLayoutHosts as O, runSetupFunction as P, onActivated as Q, syncRuntimePageLayoutStateFromRuntime as R, registerRuntimeLayoutHosts as S, unregisterPageLayoutBridge as T, markNoSetData as U, setWevuDefaults as V, version as W, setDeepWatchStrategy as X, getDeepWatchStrategy as Y, callUpdateHooks as Z, createWevuScopedSlotComponent as _, useAttrs as a, onServerPrefetch as at, registerComponent as b, defineAppSetup as c, traverse as ct, normalizeClass as d, isShallowRef as dt, onBeforeUnmount as et, normalizeStyle as f, shallowRef as ft, createWevuComponent as g, useDisposables as h, useModel as i, onMounted as it, mountRuntimeInstance as j, waitForLayoutHost as k, use as l, toRef as lt, useIntersectionObserver as m, mergeModels as n, onDeactivated as nt, useNativeInstance as o, onUnmounted as ot, usePageScrollThrottle as p, triggerRef as pt, watchPostEffect as q, useBindModel as r, onErrorCaptured as rt, useSlots as s, onUpdated as st, useTemplateRef as t, onBeforeUpdate as tt, useUpdatePerformanceListener as u, toRefs as ut, defineComponent as v, resolveLayoutHost as w, registerPageLayoutBridge as x, createApp as y, usePageLayout as z };
package/dist/store.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- import { a as ActionContext, c as MutationType, d as SubscriptionCallback, i as defineStore, l as StoreManager, n as storeToRefs, o as ActionSubscriber, r as createStore, s as DefineStoreOptions, t as StoreToRefsResult, u as StoreSubscribeOptions } from "./index-CJdlA5zG.mjs";
1
+ import { a as ActionContext, c as MutationType, d as SubscriptionCallback, i as defineStore, l as StoreManager, n as storeToRefs, o as ActionSubscriber, r as createStore, s as DefineStoreOptions, t as StoreToRefsResult, u as StoreSubscribeOptions } from "./index-BPZxNlC8.mjs";
2
2
  export { ActionContext, ActionSubscriber, DefineStoreOptions, MutationType, StoreManager, StoreSubscribeOptions, StoreToRefsResult, SubscriptionCallback, createStore, defineStore, storeToRefs };
@@ -1,7 +1,6 @@
1
- import { $ as WatchSources, $t as customRef, A as ComputedDefinitions, At as EffectScope, B as watchSyncEffect, Bt as ComputedGetter, C as MiniProgramComponentBehaviorOptions, Cn as NativeTypedProperty, Ct as prelinkReactiveTree, D as MiniProgramPageLifetimes, Dt as MutationRecord, E as MiniProgramInstance, En as PropType, Et as MutationOp, F as ModelBindingOptions, Ft as getCurrentScope, G as WatchCallback, Gt as computed, H as MaybeUndefined, Ht as ComputedSetter, I as ModelBindingPayload, It as onScopeDispose, J as WatchMultiSources, Jt as CustomRefSource, K as WatchEffect, Kt as CustomRefFactory, L as watch, Lt as startBatch, M as ExtractMethods, Mt as effect, N as MethodDefinitions, Nt as effectScope, O as TriggerEventOptions, Ot as addMutationRecorder, P as ModelBinding, Pt as endBatch, Q as WatchSourceValue, Qt as ShallowRef, R as watchEffect, Rt as stop, S as MiniProgramBehaviorIdentifier, Sn as NativeTypeHint, St as PrelinkReactiveTreeOptions, T as MiniProgramComponentRawOptions, Tn as PropOptions, Tt as MutationKind, U as MultiWatchSources, Ut as WritableComputedOptions, V as MapSources, Vt as ComputedRef, W as OnCleanup, Wt as WritableComputedRef, X as WatchScheduler, Xt as MaybeRefOrGetter, Y as WatchOptions, Yt as MaybeRef, Z as WatchSource, Zt as Ref, _ as RuntimeApp, _n as InferNativeProps, _t as markRaw, a as NativeComponent, at as toRef, b as MiniProgramAdapter, bn as NativePropType, bt as isShallowReactive, c as ShallowUnwrapRef, cn as SetupContextRouter, ct as shallowRef, d as SetupContext, dn as WevuTypedRouterRouteMap, dt as isReadonly, en as isRef, et as WatchStopHandle, f as SetupContextNativeInstance, fn as ComponentPropsOptions, ft as readonly, g as InternalRuntimeStateFields, gn as InferNativePropType, gt as isReactive, h as InternalRuntimeState, hn as ExtractPublicPropTypes, ht as isRaw, i as DefineComponent, it as ToRefs, j as ExtractComputed, jt as batch, k as ComponentPublicInstance, kt as removeMutationRecorder, l as VNode, lt as triggerRef, m as AppConfig, mn as ExtractPropTypes, mt as getReactiveVersion, n as ComponentCustomProps, nn as toValue, nt as setDeepWatchStrategy, o as ObjectDirective, ot as toRefs, p as SetupFunction, pn as ExtractDefaultPropTypes, pt as shallowReadonly, q as WatchEffectOptions, qt as CustomRefOptions, r as ComponentOptionsMixin, rn as unref, rt as traverse, s as PublicProps, st as isShallowRef, t as AllowedComponentProps, tn as ref, tt as getDeepWatchStrategy, u as VNodeProps, ut as isProxy, v as RuntimeInstance, vn as InferPropType, vt as reactive, w as MiniProgramComponentOptions, wn as PropConstructor, wt as touchReactive, x as MiniProgramAppOptions, xn as NativePropsOptions, xt as shallowReactive, y as WevuPlugin, yn as InferProps, yt as toRaw, z as watchPostEffect, zt as nextTick } from "./vue-types-D8BVm-8u.mjs";
2
- import { $ as resolveRuntimePageLayoutName, $t as onUnload, A as UpdatePerformanceListener, An as CreateAppOptions, At as onAddToFavorites, B as registerComponent, Bt as onPageScroll, C as mergeModels, Cn as createApp, Ct as onBeforeUpdate, D as useNativeInstance, Dn as TemplateRefs, Dt as onServerPrefetch, E as useAttrs, En as TemplateRefValue, Et as onMounted, F as normalizeStyle, Fn as SetDataDebugInfo, Ft as onLaunch, G as provide, Gt as onRouteDone, H as hasInjectionContext, Ht as onReachBottom, I as runSetupFunction, In as SetDataSnapshotOptions, It as onLoad, J as UsePageScrollThrottleOptions, Jt as onShareTimeline, K as provideGlobal, Kt as onSaveExitState, L as mountRuntimeInstance, Lt as onMemoryWarning, M as UseUpdatePerformanceListenerStopHandle, Mn as DefineAppOptions, Mt as onDetached, N as useUpdatePerformanceListener, Nn as DefineComponentOptions, Nt as onError, O as useSlots, On as WevuGlobalComponents, Ot as onUnmounted, P as normalizeClass, Pn as PageFeatures, Pt as onHide, Q as WevuPageLayoutMap, Qt as onUnhandledRejection, R as setRuntimeSetDataVisibility, Rt as onMoved, S as UseModelOptions, Sn as setWevuDefaults, St as onBeforeUnmount, T as useModel, Tn as GlobalDirectives, Tt as onErrorCaptured, U as inject, Ut as onReady, V as registerApp, Vt as onPullDownRefresh, W as injectGlobal, Wt as onResize, X as usePageScrollThrottle, Xt as onTabItemTap, Y as UsePageScrollThrottleStopHandle, Yt as onShow, Z as PageLayoutState, Zt as onThemeChange, _ as TemplateRef, _n as createWevuComponent, _t as UseIntersectionObserverResult, a as PageMeta, an as setCurrentSetupContext, at as markNoSetData, b as useNativeRouter, bn as WevuDefaults, bt as onActivated, c as defineModel, cn as DisposableMethodName, ct as registerRuntimeLayoutHosts, d as defineProps, dn as ComponentDefinition, dt as unregisterPageLayoutBridge, en as callHookList, et as setPageLayout, f as defineSlots, fn as DefineComponentTypePropsOptions, ft as unregisterRuntimeLayoutHosts, g as EmitsOptions, gn as WevuComponentConstructor, gt as UseIntersectionObserverOptions, h as EmitFn, hn as SetupFunctionWithTypeProps, ht as waitForLayoutHost, i as PageLayoutMeta, in as setCurrentInstance, it as isNoSetData, j as UpdatePerformanceListenerResult, jn as DataOption, jt as onAttached, k as use, kn as WevuGlobalDirectives, kt as onUpdated, l as defineOptions, ln as DisposableObject, lt as resolveLayoutBridge, m as ComponentTypeEmits, mn as SetupContextWithTypeProps, mt as useLayoutHosts, n as DefineModelTransformOptions, nn as getCurrentInstance, nt as syncRuntimePageLayoutStateFromRuntime, o as defineEmits, on as DisposableBag, ot as LayoutHostBinding, p as withDefaults, pn as DefineComponentWithTypeProps, pt as useLayoutBridge, q as setGlobalProvidedValue, qt as onShareAppMessage, r as ModelRef, rn as getCurrentSetupContext, rt as usePageLayout, s as defineExpose, sn as DisposableLike, st as registerPageLayoutBridge, t as DefineModelModifiers, tn as callHookReturn, tt as syncRuntimePageLayoutState, u as definePageMeta, un as useDisposables, ut as resolveLayoutHost, v as useTemplateRef, vn as createWevuScopedSlotComponent, vt as useIntersectionObserver, w as useBindModel, wn as GlobalComponents, wt as onDeactivated, x as ModelModifiers, xn as resetWevuDefaults, xt as onBeforeMount, y as useNativePageRouter, yn as defineComponent, yt as callUpdateHooks, z as teardownRuntimeInstance, zt as onPageNotFound } from "./index-B7QVA9YG.mjs";
3
- import { a as ActionContext, c as MutationType, d as SubscriptionCallback, i as defineStore, l as StoreManager, n as storeToRefs, o as ActionSubscriber, r as createStore, s as DefineStoreOptions, t as StoreToRefsResult, u as StoreSubscribeOptions } from "./index-CJdlA5zG.mjs";
4
- import { version } from "vue";
1
+ import { $ as PropOptions, A as CustomRefSource, B as ComponentPropsOptions, C as ComputedRef, D as computed, E as WritableComputedRef, F as customRef, G as InferNativeProps, H as ExtractPropTypes, I as isRef, J as NativePropType, K as InferPropType, L as ref, M as MaybeRefOrGetter, N as Ref, O as CustomRefFactory, P as ShallowRef, Q as PropConstructor, R as toValue, S as ComputedGetter, T as WritableComputedOptions, U as ExtractPublicPropTypes, V as ExtractDefaultPropTypes, W as InferNativePropType, X as NativeTypeHint, Y as NativePropsOptions, Z as NativeTypedProperty, _ as ObjectDirective, a as ActionContext, b as VNode, c as MutationType, d as SubscriptionCallback, et as PropType, f as AllowedComponentProps, g as NativeComponent, h as DefineComponent, i as defineStore, j as MaybeRef, k as CustomRefOptions, l as StoreManager, m as ComponentOptionsMixin, n as storeToRefs, o as ActionSubscriber, p as ComponentCustomProps, q as InferProps, r as createStore, s as DefineStoreOptions, t as StoreToRefsResult, u as StoreSubscribeOptions, v as PublicProps, w as ComputedSetter, x as VNodeProps, y as ShallowUnwrapRef, z as unref } from "./index-BPZxNlC8.mjs";
2
+ import { a as SetupContextRouter, c as WevuTypedRouterRouteMap } from "./router-DW4Yf9Yj.mjs";
3
+ import { $ as WevuPageLayoutMap, $n as MiniProgramInstance, $r as MutationOp, $t as onUnhandledRejection, A as use, An as WevuGlobalDirectives, Ar as traverse, At as onUpdated, B as teardownRuntimeInstance, Bn as SetupFunction, Br as shallowReadonly, Bt as onPageNotFound, C as UseModelOptions, Cn as setWevuDefaults, Cr as WatchScheduler, Ct as onBeforeUnmount, D as useAttrs, Dn as TemplateRefValue, Dr as WatchStopHandle, Dt as onMounted, E as useModel, En as GlobalDirectives, Er as WatchSources, Et as onErrorCaptured, F as normalizeClass, Fn as PageFeatures, Fr as shallowRef, Ft as onHide, G as injectGlobal, Gn as RuntimeInstance, Gr as reactive, Gt as onResize, H as registerApp, Hn as InternalRuntimeState, Hr as isRaw, Ht as onPullDownRefresh, I as normalizeStyle, In as SetDataDebugInfo, Ir as triggerRef, It as onLaunch, J as setGlobalProvidedValue, Jn as MiniProgramAppOptions, Jr as shallowReactive, Jt as onShareAppMessage, K as provide, Kn as WevuPlugin, Kr as toRaw, Kt as onRouteDone, L as runSetupFunction, Ln as SetDataSnapshotOptions, Lr as isProxy, Lt as onLoad, M as UpdatePerformanceListenerResult, Mn as DataOption, Mr as toRef, Mt as onAttached, N as UseUpdatePerformanceListenerStopHandle, Nn as DefineAppOptions, Nr as toRefs, Nt as onDetached, O as useNativeInstance, On as TemplateRefs, Or as getDeepWatchStrategy, Ot as onServerPrefetch, P as useUpdatePerformanceListener, Pn as DefineComponentOptions, Pr as isShallowRef, Pt as onError, Q as PageLayoutState, Qn as MiniProgramComponentRawOptions, Qr as MutationKind, Qt as onThemeChange, R as mountRuntimeInstance, Rn as SetupContext, Rr as isReadonly, Rt as onMemoryWarning, S as ModelModifiers, Sn as resetWevuDefaults, Sr as WatchOptions, St as onBeforeMount, T as useBindModel, Tn as GlobalComponents, Tr as WatchSourceValue, Tt as onDeactivated, U as hasInjectionContext, Un as InternalRuntimeStateFields, Ur as isReactive, Ut as onReachBottom, V as registerComponent, Vn as AppConfig, Vr as getReactiveVersion, Vt as onPageScroll, W as inject, Wn as RuntimeApp, Wr as markRaw, Wt as onReady, X as UsePageScrollThrottleStopHandle, Xn as MiniProgramComponentBehaviorOptions, Xr as prelinkReactiveTree, Xt as onShow, Y as UsePageScrollThrottleOptions, Yn as MiniProgramBehaviorIdentifier, Yr as PrelinkReactiveTreeOptions, Yt as onShareTimeline, Z as usePageScrollThrottle, Zn as MiniProgramComponentOptions, Zr as touchReactive, Zt as onTabItemTap, _ as EmitsOptions, _n as WevuComponentConstructor, _r as OnCleanup, _t as UseIntersectionObserverOptions, a as PageLayoutMeta, ai as effect, an as setCurrentInstance, ar as ExtractMethods, at as isNoSetData, b as useNativePageRouter, bn as defineComponent, br as WatchEffectOptions, bt as callUpdateHooks, c as defineExpose, ci as getCurrentScope, cn as DisposableLike, cr as ModelBindingOptions, ct as registerPageLayoutBridge, d as definePageMeta, di as stop, dn as useDisposables, dr as watchEffect, dt as resolveLayoutHost, ei as MutationRecord, en as onUnload, er as MiniProgramPageLifetimes, et as resolveRuntimePageLayoutName, f as defineProps, fi as nextTick, fn as ComponentDefinition, fr as watchPostEffect, ft as unregisterPageLayoutBridge, g as EmitFn, gn as SetupFunctionWithTypeProps, gr as MultiWatchSources, gt as waitForLayoutHost, h as ComponentTypeEmits, hn as SetupContextWithTypeProps, hr as MaybeUndefined, ht as useLayoutHosts, i as ModelRef, ii as batch, in as getCurrentSetupContext, ir as ExtractComputed, it as usePageLayout, j as UpdatePerformanceListener, jn as CreateAppOptions, jr as ToRefs, jt as onAddToFavorites, k as useSlots, kn as WevuGlobalComponents, kr as setDeepWatchStrategy, kt as onUnmounted, l as defineModel, li as onScopeDispose, ln as DisposableMethodName, lr as ModelBindingPayload, lt as registerRuntimeLayoutHosts, m as withDefaults, mn as DefineComponentWithTypeProps, mr as MapSources, mt as useLayoutBridge, n as DefineModelModifiers, ni as removeMutationRecorder, nn as callHookReturn, nr as ComponentPublicInstance, nt as syncRuntimePageLayoutState, o as PageMeta, oi as effectScope, on as setCurrentSetupContext, or as MethodDefinitions, ot as markNoSetData, p as defineSlots, pn as DefineComponentTypePropsOptions, pr as watchSyncEffect, pt as unregisterRuntimeLayoutHosts, q as provideGlobal, qn as MiniProgramAdapter, qr as isShallowReactive, qt as onSaveExitState, r as DefineModelTransformOptions, ri as EffectScope, rn as getCurrentInstance, rr as ComputedDefinitions, rt as syncRuntimePageLayoutStateFromRuntime, s as defineEmits, si as endBatch, sn as DisposableBag, sr as ModelBinding, st as LayoutHostBinding, t as version, ti as addMutationRecorder, tn as callHookList, tr as TriggerEventOptions, tt as setPageLayout, u as defineOptions, ui as startBatch, un as DisposableObject, ur as watch, ut as resolveLayoutBridge, v as TemplateRef, vn as createWevuComponent, vr as WatchCallback, vt as UseIntersectionObserverResult, w as mergeModels, wn as createApp, wr as WatchSource, wt as onBeforeUpdate, x as useNativeRouter, xn as WevuDefaults, xr as WatchMultiSources, xt as onActivated, y as useTemplateRef, yn as createWevuScopedSlotComponent, yr as WatchEffect, yt as useIntersectionObserver, z as setRuntimeSetDataVisibility, zn as SetupContextNativeInstance, zr as readonly, zt as onMoved } from "./index-BvyrZ_XI.mjs";
5
4
 
6
5
  //#region src/vue-demi.d.ts
7
6
  /**
package/dist/vue-demi.mjs CHANGED
@@ -1,8 +1,7 @@
1
1
  import { C as effect, D as onScopeDispose, E as getCurrentScope, N as nextTick, O as startBatch, S as batch, T as endBatch, a as toValue, b as addMutationRecorder, c as isRaw, d as reactive, f as isShallowReactive, g as touchReactive, h as prelinkReactiveTree, i as ref, k as stop, l as isReactive, n as isRef, o as unref, p as shallowReactive, s as getReactiveVersion, t as customRef, u as markRaw, w as effectScope, x as removeMutationRecorder, y as toRaw } from "./ref-DvvlGmiL.mjs";
2
2
  import { i as computed, n as defineStore, r as createStore, t as storeToRefs } from "./store-C-Eil5IU.mjs";
3
3
  import { A as onThemeChange, B as setCurrentSetupContext, C as onResize, D as onShareTimeline, E as onShareAppMessage, F as callHookReturn, G as readonly, I as getCurrentInstance, K as shallowReadonly, L as getCurrentSetupContext, M as onUnload, O as onShow, P as callHookList, S as onReady, T as onSaveExitState, U as isProxy, W as isReadonly, _ as onMoved, a as injectGlobal, b as onPullDownRefresh, c as setGlobalProvidedValue, d as onDetached, f as onError, g as onMemoryWarning, h as onLoad, i as inject, j as onUnhandledRejection, k as onTabItemTap, l as onAddToFavorites, m as onLaunch, n as useNativeRouter, o as provide, p as onHide, r as hasInjectionContext, s as provideGlobal, t as useNativePageRouter, u as onAttached, v as onPageNotFound, w as onRouteDone, x as onReachBottom, y as onPageScroll, z as setCurrentInstance } from "./router-DJKYJlu_.mjs";
4
- import { $ as onBeforeUnmount, A as registerApp, B as resetWevuDefaults, C as resolveLayoutBridge, D as useLayoutBridge, E as unregisterRuntimeLayoutHosts, F as resolveRuntimePageLayoutName, G as watchEffect, H as isNoSetData, I as setPageLayout, J as getDeepWatchStrategy, K as watchPostEffect, L as syncRuntimePageLayoutState, M as setRuntimeSetDataVisibility, N as teardownRuntimeInstance, O as useLayoutHosts, P as runSetupFunction, Q as onBeforeMount, R as syncRuntimePageLayoutStateFromRuntime, S as registerRuntimeLayoutHosts, T as unregisterPageLayoutBridge, U as markNoSetData, V as setWevuDefaults, W as watch, X as callUpdateHooks, Y as setDeepWatchStrategy, Z as onActivated, _ as createWevuScopedSlotComponent, a as useAttrs, at as onUnmounted, b as registerComponent, c as defineAppSetup, ct as toRef, d as normalizeClass, dt as shallowRef, et as onBeforeUpdate, f as normalizeStyle, ft as triggerRef, g as createWevuComponent, h as useDisposables, i as useModel, it as onServerPrefetch, j as mountRuntimeInstance, k as waitForLayoutHost, l as use, lt as toRefs, m as useIntersectionObserver, n as mergeModels, nt as onErrorCaptured, o as useNativeInstance, ot as onUpdated, p as usePageScrollThrottle, q as watchSyncEffect, r as useBindModel, rt as onMounted, s as useSlots, st as traverse, t as useTemplateRef, tt as onDeactivated, u as useUpdatePerformanceListener, ut as isShallowRef, v as defineComponent, w as resolveLayoutHost, x as registerPageLayoutBridge, y as createApp, z as usePageLayout } from "./src-DLHIGzBf.mjs";
5
- import { version } from "vue";
4
+ import { $ as onBeforeMount, A as registerApp, B as resetWevuDefaults, C as resolveLayoutBridge, D as useLayoutBridge, E as unregisterRuntimeLayoutHosts, F as resolveRuntimePageLayoutName, G as watch, H as isNoSetData, I as setPageLayout, J as watchSyncEffect, K as watchEffect, L as syncRuntimePageLayoutState, M as setRuntimeSetDataVisibility, N as teardownRuntimeInstance, O as useLayoutHosts, P as runSetupFunction, Q as onActivated, R as syncRuntimePageLayoutStateFromRuntime, S as registerRuntimeLayoutHosts, T as unregisterPageLayoutBridge, U as markNoSetData, V as setWevuDefaults, W as version, X as setDeepWatchStrategy, Y as getDeepWatchStrategy, Z as callUpdateHooks, _ as createWevuScopedSlotComponent, a as useAttrs, at as onServerPrefetch, b as registerComponent, c as defineAppSetup, ct as traverse, d as normalizeClass, dt as isShallowRef, et as onBeforeUnmount, f as normalizeStyle, ft as shallowRef, g as createWevuComponent, h as useDisposables, i as useModel, it as onMounted, j as mountRuntimeInstance, k as waitForLayoutHost, l as use, lt as toRef, m as useIntersectionObserver, n as mergeModels, nt as onDeactivated, o as useNativeInstance, ot as onUnmounted, p as usePageScrollThrottle, pt as triggerRef, q as watchPostEffect, r as useBindModel, rt as onErrorCaptured, s as useSlots, st as onUpdated, t as useTemplateRef, tt as onBeforeUpdate, u as useUpdatePerformanceListener, ut as toRefs, v as defineComponent, w as resolveLayoutHost, x as registerPageLayoutBridge, y as createApp, z as usePageLayout } from "./src-xqSS8INA.mjs";
6
5
  //#region src/vue-demi.ts
7
6
  /**
8
7
  * 标记当前兼容层运行在 Vue 3 风格分支。
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "wevu",
3
3
  "type": "module",
4
- "version": "6.13.0",
4
+ "version": "6.13.2",
5
5
  "description": "Vue 3 风格的小程序运行时,包含响应式、diff+setData 与轻量状态管理",
6
6
  "author": "ice breaker <1324318532@qq.com>",
7
7
  "license": "MIT",
@@ -101,9 +101,9 @@
101
101
  "miniprogram-api-typings": "^5.0.0"
102
102
  },
103
103
  "dependencies": {
104
- "vue": "^3.5.31",
104
+ "vue": "^3.5.32",
105
105
  "@wevu/api": "0.2.2",
106
- "@wevu/compiler": "6.13.0"
106
+ "@wevu/compiler": "6.13.2"
107
107
  },
108
108
  "scripts": {
109
109
  "dev": "tsdown -w",
@@ -1,112 +0,0 @@
1
- import { Zt as Ref } from "./vue-types-D8BVm-8u.mjs";
2
-
3
- //#region src/store/types.d.ts
4
- /**
5
- * @description Store 变更类型
6
- */
7
- type MutationType = 'patch object' | 'patch function' | 'direct';
8
- /**
9
- * @description Store 订阅回调签名
10
- */
11
- interface SubscriptionCallback<S = any> {
12
- (mutation: {
13
- type: MutationType;
14
- storeId: string;
15
- }, state: S): void;
16
- }
17
- /**
18
- * @description Store 订阅选项
19
- */
20
- interface StoreSubscribeOptions {
21
- /**
22
- * @description 是否在卸载后仍保留订阅(适用于跨页面生命周期的订阅)
23
- */
24
- detached?: boolean;
25
- }
26
- /**
27
- * @description Action 订阅回调上下文
28
- */
29
- interface ActionContext<TStore = any> {
30
- name: string;
31
- store: TStore;
32
- args: any[];
33
- after: (cb: (result: any) => void) => void;
34
- onError: (cb: (error: any) => void) => void;
35
- }
36
- /**
37
- * @description Action 订阅回调类型
38
- */
39
- interface ActionSubscriber<TStore = any> {
40
- (context: ActionContext<TStore>): void;
41
- }
42
- /**
43
- * @description Store 管理器(插件与共享实例)
44
- */
45
- interface StoreManager {
46
- install: (app: any) => void;
47
- _stores: Map<string, any>;
48
- use: (plugin: (context: {
49
- store: any;
50
- }) => void) => StoreManager;
51
- _plugins: Array<(context: {
52
- store: any;
53
- }) => void>;
54
- }
55
- /**
56
- * @description Getter 定义集合
57
- */
58
- type GetterTree<S extends Record<string, any>> = Record<string, (state: S) => any>;
59
- /**
60
- * @description 从 Getter 定义中推导返回类型
61
- */
62
- type StoreGetters<G extends GetterTree<any>> = { [K in keyof G]: G[K] extends ((...args: any[]) => infer R) ? R : never };
63
- /**
64
- * @description defineStore(options) 的配置类型
65
- */
66
- interface DefineStoreOptions<S extends Record<string, any>, G extends GetterTree<S>, A extends Record<string, any>> {
67
- state: () => S;
68
- getters?: G & Record<string, (state: S) => any> & ThisType<S & StoreGetters<G> & A>;
69
- actions?: A & ThisType<S & StoreGetters<G> & A>;
70
- }
71
- //#endregion
72
- //#region src/store/define.d.ts
73
- type SetupDefinition<T> = () => T;
74
- /**
75
- * @description 定义一个 setup 风格的 store
76
- */
77
- declare function defineStore<T extends Record<string, any>>(id: string, setup: SetupDefinition<T>): () => T & {
78
- $id: string;
79
- $patch: (patch: Record<string, any> | ((state: any) => void)) => void;
80
- $reset: () => void;
81
- $subscribe: (cb: SubscriptionCallback<any>, opts?: StoreSubscribeOptions) => () => void;
82
- $onAction: (cb: ActionSubscriber<any>) => () => void;
83
- };
84
- /**
85
- * @description 定义一个 options 风格的 store
86
- */
87
- declare function defineStore<S extends Record<string, any>, G extends Record<string, any>, A extends Record<string, any>>(id: string, options: DefineStoreOptions<S, G, A>): () => S & StoreGetters<G> & A & {
88
- $id: string;
89
- $state: S;
90
- $patch: (patch: Partial<S> | ((state: S) => void)) => void;
91
- $reset: () => void;
92
- $subscribe: (cb: SubscriptionCallback<S>, opts?: StoreSubscribeOptions) => () => void;
93
- $onAction: (cb: ActionSubscriber<S & StoreGetters<G> & A>) => () => void;
94
- };
95
- //#endregion
96
- //#region src/store/manager.d.ts
97
- /**
98
- * @description 创建 store 管理器(插件与共享实例入口)
99
- */
100
- declare function createStore(): StoreManager;
101
- //#endregion
102
- //#region src/store/storeToRefs.d.ts
103
- /**
104
- * @description storeToRefs 返回类型推导
105
- */
106
- type StoreToRefsResult<T extends Record<string, any>> = { [K in keyof T]: T[K] extends ((...args: any[]) => any) ? T[K] : T[K] extends Ref<infer V> ? Ref<V> : Ref<T[K]> };
107
- /**
108
- * @description 将 store 状态转换为 Ref
109
- */
110
- declare function storeToRefs<T extends Record<string, any>>(store: T): StoreToRefsResult<T>;
111
- //#endregion
112
- export { ActionContext as a, MutationType as c, SubscriptionCallback as d, defineStore as i, StoreManager as l, storeToRefs as n, ActionSubscriber as o, createStore as r, DefineStoreOptions as s, StoreToRefsResult as t, StoreSubscribeOptions as u };