wevu 7.1.4 → 7.2.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.
Files changed (221) hide show
  1. package/README.md +20 -6
  2. package/dist/dev/index.mjs +3 -2
  3. package/dist/dev/package.mjs +1 -1
  4. package/dist/dev/reactivity/computed.mjs +10 -1
  5. package/dist/dev/reactivity/computed.mjs.map +1 -1
  6. package/dist/dev/reactivity/reactive.mjs +27 -20
  7. package/dist/dev/reactivity/reactive.mjs.map +1 -1
  8. package/dist/dev/router/auto-routes.mjs +11 -0
  9. package/dist/dev/router/auto-routes.mjs.map +1 -0
  10. package/dist/dev/router/createRouter.mjs +3 -4
  11. package/dist/dev/router/createRouter.mjs.map +1 -1
  12. package/dist/dev/router/navigationCore.mjs +7 -7
  13. package/dist/dev/router/navigationCore.mjs.map +1 -1
  14. package/dist/dev/router/resolve.mjs.map +1 -1
  15. package/dist/dev/router/types.mjs.map +1 -1
  16. package/dist/dev/router/useRoute.mjs.map +1 -1
  17. package/dist/dev/router/useRouter.mjs.map +1 -1
  18. package/dist/dev/routerInternal/matching.mjs +1 -1
  19. package/dist/dev/routerInternal/matching.mjs.map +1 -1
  20. package/dist/dev/routerInternal/params.mjs.map +1 -1
  21. package/dist/dev/runtime/hooks/base.mjs +5 -5
  22. package/dist/dev/runtime/hooks/base.mjs.map +1 -1
  23. package/dist/dev/runtime/platform.mjs +31 -24
  24. package/dist/dev/runtime/platform.mjs.map +1 -1
  25. package/dist/dev/runtime/register/component/alipay.mjs +72 -0
  26. package/dist/dev/runtime/register/component/alipay.mjs.map +1 -0
  27. package/dist/dev/runtime/register/component/registerNativeDefinition.mjs +5 -2
  28. package/dist/dev/runtime/register/component/registerNativeDefinition.mjs.map +1 -1
  29. package/dist/dev/store/actions.mjs +27 -29
  30. package/dist/dev/store/actions.mjs.map +1 -1
  31. package/dist/dev/store/base.mjs +152 -36
  32. package/dist/dev/store/base.mjs.map +1 -1
  33. package/dist/dev/store/define/create.mjs +92 -0
  34. package/dist/dev/store/define/create.mjs.map +1 -0
  35. package/dist/dev/store/define.mjs +11 -15
  36. package/dist/dev/store/define.mjs.map +1 -1
  37. package/dist/dev/store/manager.mjs +55 -14
  38. package/dist/dev/store/manager.mjs.map +1 -1
  39. package/dist/dev/store/storeToRefs.mjs +10 -18
  40. package/dist/dev/store/storeToRefs.mjs.map +1 -1
  41. package/dist/dev/store/subscriptions.mjs +17 -0
  42. package/dist/dev/store/subscriptions.mjs.map +1 -0
  43. package/dist/dev/store/types.mjs +11 -0
  44. package/dist/dev/store/types.mjs.map +1 -0
  45. package/dist/dev/store/utils.mjs +1 -37
  46. package/dist/dev/store/utils.mjs.map +1 -1
  47. package/dist/dev/store/view.mjs +56 -0
  48. package/dist/dev/store/view.mjs.map +1 -0
  49. package/dist/dev/store.mjs +3 -2
  50. package/dist/dev/vue-demi.mjs +3 -2
  51. package/dist/dev/vue-demi.mjs.map +1 -1
  52. package/dist/index.d.mts +3 -3
  53. package/dist/index.mjs +1 -1
  54. package/dist/package.mjs +1 -1
  55. package/dist/reactivity/computed.d.mts +4 -0
  56. package/dist/reactivity/computed.mjs +1 -1
  57. package/dist/reactivity/reactive.mjs +1 -1
  58. package/dist/router/auto-routes.d.mts +7 -0
  59. package/dist/router/auto-routes.mjs +1 -0
  60. package/dist/router/createRouter.d.mts +2 -1
  61. package/dist/router/createRouter.mjs +1 -1
  62. package/dist/router/navigationCore.d.mts +3 -2
  63. package/dist/router/navigationCore.mjs +1 -1
  64. package/dist/router/resolve.d.mts +3 -2
  65. package/dist/router/routeSync.d.mts +1 -0
  66. package/dist/router/types.d.mts +173 -78
  67. package/dist/router/useRoute.d.mts +4 -3
  68. package/dist/router/useRouter.d.mts +2 -1
  69. package/dist/router.d.mts +18 -3
  70. package/dist/routerInternal/location.d.mts +2 -0
  71. package/dist/routerInternal/matching.d.mts +2 -0
  72. package/dist/routerInternal/matching.mjs +1 -1
  73. package/dist/routerInternal/params.d.mts +2 -0
  74. package/dist/routerInternal/records.d.mts +2 -0
  75. package/dist/routerInternal/recordsWarnings.d.mts +2 -0
  76. package/dist/routerInternal/shared.d.mts +9 -0
  77. package/dist/routerInternal/snapshots.d.mts +2 -0
  78. package/dist/runtime/hooks/base.mjs +1 -1
  79. package/dist/runtime/platform.mjs +1 -1
  80. package/dist/runtime/register/component/alipay.mjs +1 -0
  81. package/dist/runtime/register/component/registerNativeDefinition.mjs +1 -1
  82. package/dist/store/actions.mjs +1 -1
  83. package/dist/store/base.mjs +1 -1
  84. package/dist/store/define/create.mjs +1 -0
  85. package/dist/store/define.d.mts +5 -16
  86. package/dist/store/define.mjs +1 -1
  87. package/dist/store/manager.d.mts +13 -5
  88. package/dist/store/manager.mjs +1 -1
  89. package/dist/store/storeToRefs.d.mts +5 -7
  90. package/dist/store/storeToRefs.mjs +1 -1
  91. package/dist/store/subscriptions.mjs +1 -0
  92. package/dist/store/types.d.mts +85 -59
  93. package/dist/store/types.mjs +1 -0
  94. package/dist/store/utils.mjs +1 -1
  95. package/dist/store/view.mjs +1 -0
  96. package/dist/store.d.mts +3 -3
  97. package/dist/store.mjs +1 -1
  98. package/dist/vue-demi.d.mts +3 -3
  99. package/dist/vue-demi.mjs +1 -1
  100. package/package.json +29 -9
  101. package/dist/dev/api/vitest/setup.d.mts +0 -1
  102. package/dist/dev/api/vitest.d.mts +0 -1
  103. package/dist/dev/api.d.mts +0 -1
  104. package/dist/dev/compiler.d.mts +0 -1
  105. package/dist/dev/fetch.d.mts +0 -9
  106. package/dist/dev/index.d.mts +0 -72
  107. package/dist/dev/internal-reactivity.d.mts +0 -18
  108. package/dist/dev/internal-runtime.d.mts +0 -44
  109. package/dist/dev/internal-template.d.mts +0 -2
  110. package/dist/dev/jsxTypes.d.mts +0 -9
  111. package/dist/dev/macros/shared.d.mts +0 -83
  112. package/dist/dev/macros.d.mts +0 -71
  113. package/dist/dev/reactivity/asyncDerivation.d.mts +0 -41
  114. package/dist/dev/reactivity/computed.d.mts +0 -21
  115. package/dist/dev/reactivity/core.d.mts +0 -35
  116. package/dist/dev/reactivity/index.d.mts +0 -16
  117. package/dist/dev/reactivity/reactive/mutation.d.mts +0 -21
  118. package/dist/dev/reactivity/reactive/patch.d.mts +0 -18
  119. package/dist/dev/reactivity/reactive/shallow.d.mts +0 -22
  120. package/dist/dev/reactivity/reactive/shared.d.mts +0 -4
  121. package/dist/dev/reactivity/reactive.d.mts +0 -42
  122. package/dist/dev/reactivity/readonly.d.mts +0 -27
  123. package/dist/dev/reactivity/ref.d.mts +0 -27
  124. package/dist/dev/reactivity/shallowRef.d.mts +0 -19
  125. package/dist/dev/reactivity/toRefs.d.mts +0 -43
  126. package/dist/dev/reactivity/traverse.d.mts +0 -8
  127. package/dist/dev/reactivity/watch/types.d.mts +0 -43
  128. package/dist/dev/reactivity/watch.d.mts +0 -22
  129. package/dist/dev/router/createRouter.d.mts +0 -8
  130. package/dist/dev/router/navigationCore.d.mts +0 -6
  131. package/dist/dev/router/resolve.d.mts +0 -6
  132. package/dist/dev/router/routeSync.d.mts +0 -1
  133. package/dist/dev/router/types.d.mts +0 -172
  134. package/dist/dev/router/useRoute.d.mts +0 -19
  135. package/dist/dev/router/useRouter.d.mts +0 -8
  136. package/dist/dev/router.d.mts +0 -10
  137. package/dist/dev/routerInternal/query.d.mts +0 -7
  138. package/dist/dev/routerInternal/types.d.mts +0 -9
  139. package/dist/dev/runtime/app/pending.d.mts +0 -10
  140. package/dist/dev/runtime/app/setData/commitTracker.d.mts +0 -13
  141. package/dist/dev/runtime/app/setData/scheduler.d.mts +0 -51
  142. package/dist/dev/runtime/app.d.mts +0 -8
  143. package/dist/dev/runtime/capabilities.d.mts +0 -75
  144. package/dist/dev/runtime/css.d.mts +0 -14
  145. package/dist/dev/runtime/defaults.d.mts +0 -12
  146. package/dist/dev/runtime/define.d.mts +0 -118
  147. package/dist/dev/runtime/disposables.d.mts +0 -31
  148. package/dist/dev/runtime/elementIntersectionObserver.d.mts +0 -26
  149. package/dist/dev/runtime/features/inlineEvents.d.mts +0 -7
  150. package/dist/dev/runtime/features/layout.d.mts +0 -7
  151. package/dist/dev/runtime/features/patchStrategy.d.mts +0 -7
  152. package/dist/dev/runtime/features/publicLayout.d.mts +0 -24
  153. package/dist/dev/runtime/features/scopedSlots.d.mts +0 -23
  154. package/dist/dev/runtime/features/setDataHighFrequencyWarning.d.mts +0 -7
  155. package/dist/dev/runtime/features/templateRefs.d.mts +0 -7
  156. package/dist/dev/runtime/hooks/base.d.mts +0 -27
  157. package/dist/dev/runtime/hooks/register.d.mts +0 -30
  158. package/dist/dev/runtime/hooks/vue.d.mts +0 -52
  159. package/dist/dev/runtime/hooks.d.mts +0 -4
  160. package/dist/dev/runtime/index.d.mts +0 -46
  161. package/dist/dev/runtime/intersectionObserver.d.mts +0 -14
  162. package/dist/dev/runtime/jsxIsland.d.mts +0 -37
  163. package/dist/dev/runtime/layoutBridge.d.mts +0 -55
  164. package/dist/dev/runtime/noSetData.d.mts +0 -5
  165. package/dist/dev/runtime/pageEnvironment.d.mts +0 -50
  166. package/dist/dev/runtime/pageLayout.d.mts +0 -25
  167. package/dist/dev/runtime/pageScroll.d.mts +0 -29
  168. package/dist/dev/runtime/provide.d.mts +0 -60
  169. package/dist/dev/runtime/provideStore.d.mts +0 -7
  170. package/dist/dev/runtime/publicRuntime.d.mts +0 -22
  171. package/dist/dev/runtime/pullDownRefresh.d.mts +0 -12
  172. package/dist/dev/runtime/register/app.d.mts +0 -14
  173. package/dist/dev/runtime/register/component.d.mts +0 -17
  174. package/dist/dev/runtime/register/inline.d.mts +0 -15
  175. package/dist/dev/runtime/register/runtimeInstance.d.mts +0 -26
  176. package/dist/dev/runtime/register/setup.d.mts +0 -11
  177. package/dist/dev/runtime/register/watch.d.mts +0 -12
  178. package/dist/dev/runtime/register.d.mts +0 -5
  179. package/dist/dev/runtime/selectorQuery.d.mts +0 -54
  180. package/dist/dev/runtime/template.d.mts +0 -6
  181. package/dist/dev/runtime/templateRefTypes.d.mts +0 -12
  182. package/dist/dev/runtime/types/core.d.mts +0 -35
  183. package/dist/dev/runtime/types/miniprogram.d.mts +0 -84
  184. package/dist/dev/runtime/types/miniprogramHost.d.mts +0 -45
  185. package/dist/dev/runtime/types/miniprogramHostSources.d.mts +0 -112
  186. package/dist/dev/runtime/types/options.d.mts +0 -138
  187. package/dist/dev/runtime/types/props/propTypes.d.mts +0 -79
  188. package/dist/dev/runtime/types/props/router.d.mts +0 -51
  189. package/dist/dev/runtime/types/props/setup.d.mts +0 -96
  190. package/dist/dev/runtime/types/props.d.mts +0 -4
  191. package/dist/dev/runtime/types/runtime.d.mts +0 -59
  192. package/dist/dev/runtime/types/setData.d.mts +0 -237
  193. package/dist/dev/runtime/types.d.mts +0 -29
  194. package/dist/dev/runtime/uniAppHost.d.mts +0 -8
  195. package/dist/dev/runtime/updatePerformance.d.mts +0 -13
  196. package/dist/dev/runtime/use.d.mts +0 -13
  197. package/dist/dev/runtime/vueCompat/context.d.mts +0 -8
  198. package/dist/dev/runtime/vueCompat/model.d.mts +0 -30
  199. package/dist/dev/runtime/vueCompat/router.d.mts +0 -29
  200. package/dist/dev/runtime/vueCompat/templateRef.d.mts +0 -9
  201. package/dist/dev/runtime/vueCompat.d.mts +0 -5
  202. package/dist/dev/scheduler.d.mts +0 -4
  203. package/dist/dev/store/define/optionsStyle.mjs +0 -117
  204. package/dist/dev/store/define/optionsStyle.mjs.map +0 -1
  205. package/dist/dev/store/define/setupStyle.mjs +0 -137
  206. package/dist/dev/store/define/setupStyle.mjs.map +0 -1
  207. package/dist/dev/store/define/shared.mjs +0 -81
  208. package/dist/dev/store/define/shared.mjs.map +0 -1
  209. package/dist/dev/store/define.d.mts +0 -19
  210. package/dist/dev/store/manager.d.mts +0 -8
  211. package/dist/dev/store/storeToRefs.d.mts +0 -13
  212. package/dist/dev/store/types.d.mts +0 -80
  213. package/dist/dev/store.d.mts +0 -5
  214. package/dist/dev/version.d.mts +0 -4
  215. package/dist/dev/vue-augment.d.mts +0 -8
  216. package/dist/dev/vue-demi.d.mts +0 -87
  217. package/dist/dev/vue-types.d.mts +0 -19
  218. package/dist/dev/web-apis.d.mts +0 -3
  219. package/dist/store/define/optionsStyle.mjs +0 -1
  220. package/dist/store/define/setupStyle.mjs +0 -1
  221. package/dist/store/define/shared.mjs +0 -1
@@ -1 +1 @@
1
- import{isRef as e}from"../reactivity/ref.mjs";import{computed as t}from"../reactivity/computed.mjs";function n(n){let r={};for(let i in n){let a=n[i];if(typeof a==`function`){r[i]=a;continue}r[i]=e(a)?a:t({get:()=>n[i],set:e=>{n[i]=e}})}return r}export{n as storeToRefs};
1
+ import{isReactive as e}from"../reactivity/reactive.mjs";import{isRef as t}from"../reactivity/ref.mjs";import{isReadonly as n}from"../reactivity/readonly.mjs";import{computed as r,isComputedRef as i}from"../reactivity/computed.mjs";import{toRef as a}from"../reactivity/toRefs.mjs";import{rawStore as o}from"./view.mjs";function s(s){let c={};for(let[l,u]of Object.entries(o(s)))i(u)?c[l]=n(u)?r(()=>s[l]):r({get:()=>s[l],set:e=>s[l]=e}):(t(u)||e(u))&&(c[l]=a(s,l));return c}export{s as storeToRefs};
@@ -0,0 +1 @@
1
+ import{getCurrentScope as e,onScopeDispose as t}from"../reactivity/core.mjs";function n(){}function r(r,i,a=!1,o=n){r.add(i);let s=()=>{r.delete(i)&&o()};return!a&&e()&&t(s),s}export{r as addSubscription,n as noop};
@@ -1,79 +1,105 @@
1
+ import { Ref as Ref$1 } from "../reactivity/ref.mjs";
2
+ import { ComputedRef, WritableComputedRef } from "../reactivity/computed.mjs";
3
+ import { EffectScope } from "../reactivity/core.mjs";
4
+ import { WatchOptions } from "../reactivity/watch/types.mjs";
5
+ import "../reactivity/index.mjs";
6
+ import { UnwrapRef } from "vue";
1
7
  //#region src/store/types.d.ts
2
- /**
3
- * @description Store 变更类型
4
- */
5
- export type MutationType = 'patch object' | 'patch function' | 'direct';
6
- /**
7
- * @description Store 订阅回调签名
8
- */
8
+ /** 与 Pinia 一致的变更类型和值。 */
9
+ export declare const MutationType: {
10
+ readonly direct: "direct";
11
+ readonly patchObject: "patch object";
12
+ readonly patchFunction: "patch function";
13
+ };
14
+ export type MutationType = typeof MutationType[keyof typeof MutationType];
15
+ export type StateTree = Record<PropertyKey, any>;
16
+ export type DeepPartial<T> = { [K in keyof T]?: DeepPartial<T[K]>; };
17
+ export type SubscriptionCallbackMutation<S> = {
18
+ type: 'direct' | 'patch function';
19
+ storeId: string;
20
+ } | {
21
+ type: 'patch object';
22
+ storeId: string;
23
+ payload: DeepPartial<S>;
24
+ };
9
25
  export interface SubscriptionCallback<S = any> {
10
- (mutation: {
11
- type: MutationType;
12
- storeId: string;
13
- }, state: S): void;
26
+ (mutation: SubscriptionCallbackMutation<S>, state: S): void;
14
27
  }
15
- /**
16
- * @description Store 订阅选项
17
- */
18
- export interface StoreSubscribeOptions {
19
- /**
20
- * @description 是否在卸载后仍保留订阅(适用于跨页面生命周期的订阅)
21
- */
28
+ /** detached 订阅不随注册时的页面或组件作用域卸载。 */
29
+ export interface StoreSubscribeOptions extends WatchOptions<boolean> {
22
30
  detached?: boolean;
23
31
  }
24
- /**
25
- * @description Action 订阅回调上下文
26
- */
27
32
  export interface ActionContext<TStore = any, TResult = any> {
28
33
  name: string;
29
34
  store: TStore;
30
35
  args: any[];
31
- after: (cb: (result: TResult) => void) => void;
32
- onError: (cb: (error: any) => void) => void;
36
+ after: (callback: (result: TResult) => void) => void;
37
+ onError: (callback: (error: any) => void) => void;
33
38
  }
34
- /**
35
- * @description Action 订阅回调类型
36
- */
37
39
  export interface ActionSubscriber<TStore = any, TResult = any> {
38
40
  (context: ActionContext<TStore, TResult>): void;
39
41
  }
40
- /**
41
- * @description Store 管理器(插件与共享实例)
42
- */
43
- export interface StoreManager {
42
+ export interface PiniaPluginContext {
43
+ store: any;
44
+ pinia: Pinia;
45
+ app: any;
46
+ options: Record<string, any>;
47
+ }
48
+ export interface PiniaPlugin {
49
+ (context: PiniaPluginContext): Partial<PiniaCustomProperties> & Record<string, any> | void;
50
+ }
51
+ /** 应用的 Store 管理器,独立保存实例与状态。 */
52
+ export interface Pinia {
53
+ state: Ref$1<Record<string, StateTree>>;
44
54
  install: (app: any) => void;
55
+ use: (plugin: PiniaPlugin) => Pinia;
56
+ _e: EffectScope;
57
+ _s: Map<string, any>;
58
+ _p: PiniaPlugin[];
59
+ _a: any;
60
+ /** @deprecated 使用公开的 Pinia API。 */
45
61
  _stores: Map<string, any>;
46
- use: (plugin: (context: {
47
- store: any;
48
- }) => void) => StoreManager;
49
- _plugins: Array<(context: {
50
- store: any;
51
- }) => void>;
62
+ /** @deprecated 使用 use() 注册插件。 */
63
+ _plugins: PiniaPlugin[];
52
64
  }
53
- /**
54
- * @description Getter 定义集合
55
- */
56
- export type GetterTree<S extends Record<string, any>> = Record<string, (state: S) => any>;
57
- /**
58
- * @description 从 Getter 定义中推导返回类型
59
- */
60
- export type StoreGetters<G extends GetterTree<any>> = { [K in keyof G]: G[K] extends ((...args: any[]) => infer R) ? R : never; };
61
- type ActionResult<A> = Awaited<ReturnType<Extract<A[keyof A], (...args: any[]) => any>>>;
62
- /** 选项式 Store 的完整实例,供外部调用及 action/getter 的 this 共享。 */
63
- export type OptionsStore<S extends Record<string, any>, G extends Record<string, any>, A extends Record<string, any>> = S & StoreGetters<G> & A & {
64
- $id: string;
65
- $state: S;
66
- $patch: (patch: Partial<S> | ((state: S) => void)) => void;
65
+ /** createStore 返回的管理器,与 Pinia 使用同一类型契约。 */
66
+ export type StoreManager = Pinia;
67
+ export interface PiniaCustomProperties {}
68
+ export interface PiniaCustomStateProperties<S extends StateTree = StateTree> {}
69
+ export interface StoreDefinition<Id extends string = string, T = any> {
70
+ (pinia?: Pinia | null): T;
71
+ $id: Id;
72
+ }
73
+ export interface StoreSetupOptions {
74
+ [key: string]: any;
75
+ }
76
+ export type StoreGetters<G> = { readonly [K in keyof G]: G[K] extends ((...args: any[]) => infer R) ? R : never; };
77
+ /** 通过 action 名称同时收窄参数与异步解包后的返回值。 */
78
+ type StoreActionContext<TStore, A> = { [K in keyof A]: A[K] extends ((...args: infer Args) => infer Result) ? Omit<ActionContext<TStore, Awaited<Result>>, 'name' | 'args'> & {
79
+ name: K;
80
+ args: Args;
81
+ } : never; }[keyof A];
82
+ export interface StoreApi<Id extends string, S, TStore, A> {
83
+ $id: Id;
84
+ $state: keyof PiniaCustomStateProperties extends never ? S : S & PiniaCustomStateProperties;
85
+ $patch: (patch: DeepPartial<S> | ((state: S) => void)) => void;
67
86
  $reset: () => void;
68
- $subscribe: (cb: SubscriptionCallback<S>, opts?: StoreSubscribeOptions) => () => void;
69
- $onAction: (cb: ActionSubscriber<OptionsStore<S, G, A>, ActionResult<A>>) => () => void;
70
- };
71
- /**
72
- * @description defineStore(options) 的配置类型
73
- */
74
- export interface DefineStoreOptions<S extends Record<string, any>, G extends GetterTree<S>, A extends Record<string, any>> {
75
- state: () => S;
76
- getters?: G & Record<string, (state: S) => any> & ThisType<OptionsStore<S, G, A>>;
87
+ $subscribe: (callback: SubscriptionCallback<S>, options?: StoreSubscribeOptions) => () => void;
88
+ $onAction: (callback: (context: StoreActionContext<TStore, A>) => void, detached?: boolean) => () => void;
89
+ $dispose: () => void;
90
+ }
91
+ export type OptionsStore<S extends Record<string, any>, G extends Record<string, any>, A extends Record<string, any>, Id extends string = string> = UnwrapRef<S> & StoreGetters<G> & A & PiniaCustomProperties & PiniaCustomStateProperties<S> & StoreApi<Id, UnwrapRef<S>, OptionsStore<S, G, A, Id>, A>;
92
+ export interface DefineStoreOptions<S extends Record<string, any>, G extends Record<string, any>, A extends Record<string, any>> {
93
+ state?: () => S;
94
+ getters?: G & Record<string, (state: UnwrapRef<S>) => any> & ThisType<OptionsStore<S, G, A>>;
77
95
  actions?: A & ThisType<OptionsStore<S, G, A>>;
96
+ [key: string]: any;
78
97
  }
98
+ type SetupActions<T> = { [K in keyof T as T[K] extends ((...args: any[]) => any) ? K : never]: T[K]; };
99
+ type SetupState<T> = { [K in keyof T as T[K] extends ComputedRef<any> | WritableComputedRef<any> | ((...args: any[]) => any) ? never : K]: UnwrapRef<T[K]>; };
100
+ type SetupValues<T> = { [K in keyof T as T[K] extends ComputedRef<any> ? never : K]: UnwrapRef<T[K]>; } & { readonly [K in keyof T as T[K] extends ComputedRef<any> ? K : never]: UnwrapRef<T[K]>; };
101
+ export type SetupStore<Id extends string, T extends Record<string, any>> = SetupValues<T> & PiniaCustomProperties & StoreApi<Id, SetupState<T>, SetupStore<Id, T>, SetupActions<T>>;
102
+ export type StoreGeneric = Record<string, any> & StoreApi<string, any, any, any>;
103
+ export type StoreState<T extends StoreGeneric> = T['$state'];
104
+ export type StoreActions<T extends StoreGeneric> = SetupActions<Omit<T, keyof StoreApi<any, any, any, any>>>;
79
105
  //#endregion
@@ -0,0 +1 @@
1
+ const e={direct:`direct`,patchObject:`patch object`,patchFunction:`patch function`};export{e as MutationType};
@@ -1 +1 @@
1
- function e(e){return typeof e==`object`&&!!e}function t(t){if(!e(t))return!1;let n=Object.getPrototypeOf(t);return n===Object.prototype||n===null}function n(e,t){for(let n in t)e[n]=t[n]}function r(e){if(Array.isArray(e))return e.map(e=>r(e));if(t(e)){let t={};for(let n in e)t[n]=r(e[n]);return t}return e}function i(n,a){if(Array.isArray(n)&&Array.isArray(a)){n.length=0,a.forEach((e,t)=>{n[t]=r(e)});return}if(e(a)){for(let e in n)e in a||delete n[e];for(let e in a){let o=a[e],s=n[e];if(Array.isArray(o)&&Array.isArray(s)){i(s,o);continue}if(t(o)&&t(s)){i(s,o);continue}n[e]=r(o)}}}export{r as cloneDeep,e as isObject,t as isPlainObject,n as mergeShallow,i as resetObject};
1
+ function e(e){return typeof e==`object`&&!!e}function t(t){if(!e(t))return!1;let n=Object.getPrototypeOf(t);return n===Object.prototype||n===null}export{e as isObject,t as isPlainObject};
@@ -0,0 +1 @@
1
+ import{toRaw as e}from"../reactivity/reactive/shared.mjs";import{isShallowReactive as t}from"../reactivity/reactive/shallow.mjs";import{isReactive as n,reactive as r}from"../reactivity/reactive.mjs";import{isRef as i}from"../reactivity/ref.mjs";import{isPlainObject as a}from"./utils.mjs";const o=/* @__PURE__ */ new WeakMap;function s(e){if(e.__r_skip||!a(e)&&!Array.isArray(e)||n(e)&&t(e))return e;let c=n(e)?e:r(e),l=o.get(c);if(l)return l;let u=e=>n(e)?s(e):e,d=new Proxy(c,{get(e,t,n){let r=Reflect.get(e,t,n);return t===`__r_raw`||t===`__r_skip`?r:i(r)?Array.isArray(e)&&typeof t==`string`&&/^\d+$/.test(t)?r:u(r.value):u(r)},set(e,t,n,r){let a=Reflect.get(e,t,r);return i(a)&&!i(n)&&!Array.isArray(e)?(a.value=n,!0):Reflect.set(e,t,n,r)}});return o.set(c,d),o.set(d,d),d}function c(e,t){e instanceof Map&&t instanceof Map?t.forEach((t,n)=>e.set(n,t)):e instanceof Set&&t instanceof Set&&t.forEach(t=>e.add(t));for(let r of Object.keys(t==null?{}:t)){if(r===`__proto__`||r===`constructor`||r===`prototype`)continue;let o=t[r];a(e[r])&&a(o)&&!i(o)&&!n(o)?c(e[r],o):e[r]=o}}function l(t){return e(t)}export{c as mergeState,l as rawStore,s as storeView};
package/dist/store.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import { ActionContext, ActionSubscriber, DefineStoreOptions, MutationType, StoreManager, StoreSubscribeOptions, SubscriptionCallback } from "./store/types.mjs";
1
+ import { ActionContext, ActionSubscriber, DefineStoreOptions, MutationType, Pinia, PiniaCustomProperties, PiniaCustomStateProperties, PiniaPlugin, PiniaPluginContext, StateTree, StoreActions, StoreDefinition, StoreGeneric, StoreManager, StoreState, StoreSubscribeOptions, SubscriptionCallback, SubscriptionCallbackMutation } from "./store/types.mjs";
2
2
  import { defineStore } from "./store/define.mjs";
3
- import { createStore } from "./store/manager.mjs";
3
+ import { createPinia, createStore, disposePinia, getActivePinia, setActivePinia } from "./store/manager.mjs";
4
4
  import { StoreToRefsResult, storeToRefs } from "./store/storeToRefs.mjs";
5
- export { type ActionContext, type ActionSubscriber, type DefineStoreOptions, type MutationType, type StoreManager, type StoreSubscribeOptions, type StoreToRefsResult, type SubscriptionCallback, createStore, defineStore, storeToRefs };
5
+ export { type ActionContext, type ActionSubscriber, type DefineStoreOptions, MutationType, type Pinia, type PiniaCustomProperties, type PiniaCustomStateProperties, type PiniaPlugin, type PiniaPluginContext, type StateTree, type StoreActions, type StoreDefinition, type StoreGeneric, type StoreManager, type StoreState, type StoreSubscribeOptions, type StoreToRefsResult, type SubscriptionCallback, type SubscriptionCallbackMutation, createPinia, createStore, defineStore, disposePinia, getActivePinia, setActivePinia, storeToRefs };
package/dist/store.mjs CHANGED
@@ -1 +1 @@
1
- import{createStore as e}from"./store/manager.mjs";import{defineStore as t}from"./store/define.mjs";import{storeToRefs as n}from"./store/storeToRefs.mjs";export{e as createStore,t as defineStore,n as storeToRefs};
1
+ import{createPinia as e,createStore as t,disposePinia as n,getActivePinia as r,setActivePinia as i}from"./store/manager.mjs";import{MutationType as a}from"./store/types.mjs";import{defineStore as o}from"./store/define.mjs";import{storeToRefs as s}from"./store/storeToRefs.mjs";export{a as MutationType,e as createPinia,t as createStore,o as defineStore,n as disposePinia,r as getActivePinia,i as setActivePinia,s as storeToRefs};
@@ -58,9 +58,9 @@ import { useNativePageRouter, useNativeRouter } from "./runtime/vueCompat/router
58
58
  import { TemplateRef, useTemplateRef } from "./runtime/vueCompat/templateRef.mjs";
59
59
  import { ComponentTypeEmits, EmitFn, EmitsOptions } from "./macros/shared.mjs";
60
60
  import { DefineModelModifiers, DefineModelTransformOptions, ModelRef, PageLayoutMeta, PageMeta, defineEmits, defineExpose, defineModel, defineOptions, definePageMeta, defineProps, defineSlots, withDefaults } from "./macros.mjs";
61
- import { ActionContext, ActionSubscriber, DefineStoreOptions, MutationType, StoreManager, StoreSubscribeOptions, SubscriptionCallback } from "./store/types.mjs";
61
+ import { ActionContext, ActionSubscriber, DefineStoreOptions, MutationType, Pinia, PiniaCustomProperties, PiniaCustomStateProperties, PiniaPlugin, PiniaPluginContext, StateTree, StoreActions, StoreDefinition, StoreGeneric, StoreManager, StoreState, StoreSubscribeOptions, SubscriptionCallback, SubscriptionCallbackMutation } from "./store/types.mjs";
62
62
  import { defineStore } from "./store/define.mjs";
63
- import { createStore } from "./store/manager.mjs";
63
+ import { createPinia, createStore, disposePinia, getActivePinia, setActivePinia } from "./store/manager.mjs";
64
64
  import { StoreToRefsResult, storeToRefs } from "./store/storeToRefs.mjs";
65
65
  import { version } from "./version.mjs";
66
66
  import "./index.mjs";
@@ -83,4 +83,4 @@ export declare const Vue2: undefined;
83
83
  */
84
84
  export declare function install(): void;
85
85
  //#endregion
86
- export { type ActionContext, type ActionSubscriber, type AlipayMiniProgramHostNamespace, type AlipayMiniProgramHostSourceContract, type AllowedComponentProps, type AppConfig, type AsyncDerivation, type AsyncDerivationContext, type AsyncDerivationState, type AsyncDerivationStatus, type ComponentCustomProps, type ComponentDefinition, type ComponentOptionsMixin, type ComponentPropsOptions, type ComponentPublicInstance, type ComponentTypeEmits, type ComputedDefinitions, type ComputedGetter, type ComputedRef, type ComputedSetter, type CreateAppOptions, type CustomRefFactory, type CustomRefOptions, type CustomRefSource, type DataOption, type DefaultMiniProgramHostNamespace, type DefaultMiniProgramHostSourceContract, type DefineAppOptions, type DefineComponent, type DefineComponentOptions, type DefineComponentTypePropsOptions, type DefineComponentWithTypeProps, DefineModelModifiers, DefineModelTransformOptions, type DefineStoreOptions, DisposableBag, DisposableLike, DisposableMethodName, DisposableObject, type DouyinMiniProgramHostNamespace, type DouyinMiniProgramHostSourceContract, type EffectScope, ElementIntersectionObserverCallback, type EmitFn, type EmitsOptions, type ExtractComputed, type ExtractDefaultPropTypes, type ExtractMethods, type ExtractPropTypes, type ExtractPublicPropTypes, GlobalComponents, GlobalDirectives, type HostMiniProgramAddToFavoritesOption, type HostMiniProgramAppOptions, type HostMiniProgramAppTrivialInstance, type HostMiniProgramBehaviorIdentifier, type HostMiniProgramBoundingClientRectResult, type HostMiniProgramComponentAllFullProperty, type HostMiniProgramComponentAllProperty, type HostMiniProgramComponentBehaviorOptions, type HostMiniProgramComponentEmptyArray, type HostMiniProgramComponentInstance, type HostMiniProgramComponentMethodOption, type HostMiniProgramComponentPropertyOption, type HostMiniProgramComponentPropertyValue, type HostMiniProgramComponentShortProperty, type HostMiniProgramComponentTrivialInstance, type HostMiniProgramComponentTrivialOption, type HostMiniProgramIntersectionObserver, type HostMiniProgramIntersectionObserverOptions, type HostMiniProgramLaunchOptions, type HostMiniProgramMemoryWarningResult, type HostMiniProgramNavigateToOption, type HostMiniProgramNodesRef, type HostMiniProgramNodesRefFields, type HostMiniProgramPageLifetime, type HostMiniProgramPageNotFoundOptions, type HostMiniProgramPageResizeOption, type HostMiniProgramPageScrollOption, type HostMiniProgramPageTrivialInstance, type HostMiniProgramReLaunchOption, type HostMiniProgramRedirectToOption, type HostMiniProgramRouter, type HostMiniProgramSaveExitState, type HostMiniProgramScrollOffsetResult, type HostMiniProgramSelectorQuery, type HostMiniProgramShareAppMessageOption, type HostMiniProgramSwitchTabOption, type HostMiniProgramTabItemTapOption, type HostMiniProgramThemeChangeResult, type HostMiniProgramTriggerEventOptions, type HostMiniProgramUnhandledRejectionResult, type InferNativePropType, type InferNativeProps, type InferPropType, type InferProps, type InternalRuntimeState, type InternalRuntimeStateFields, type LayoutBridgeInstance, type LayoutHostBinding, type MapSources, type MaybeRef, type MaybeRefOrGetter, type MaybeUndefined, type MethodDefinitions, type MiniProgramAdapter, type HostMiniProgramAddToFavoritesOption as MiniProgramAddToFavoritesOption, type MiniProgramAppOptions, type MiniProgramBehaviorIdentifier, type HostMiniProgramBoundingClientRectResult as MiniProgramBoundingClientRectResult, type HostMiniProgramComponentAllFullProperty as MiniProgramComponentAllFullProperty, type HostMiniProgramComponentAllProperty as MiniProgramComponentAllProperty, type HostMiniProgramComponentBehaviorOptions as MiniProgramComponentBehaviorOptions, type HostMiniProgramComponentEmptyArray as MiniProgramComponentEmptyArray, type MiniProgramComponentInstance, type HostMiniProgramComponentMethodOption as MiniProgramComponentMethodOption, type MiniProgramComponentOptions, type HostMiniProgramComponentPropertyOption as MiniProgramComponentPropertyOption, type MiniProgramComponentPropertyValue, type MiniProgramComponentRawOptions, type HostMiniProgramComponentShortProperty as MiniProgramComponentShortProperty, type MiniProgramHostNamespace, type MiniProgramHostNamespaceBySource, type MiniProgramHostSourceName, type MiniProgramHostSourceRegistry, type MiniProgramInstance, type HostMiniProgramIntersectionObserver as MiniProgramIntersectionObserver, type HostMiniProgramIntersectionObserverOptions as MiniProgramIntersectionObserverOptions, type HostMiniProgramLaunchOptions as MiniProgramLaunchOptions, type HostMiniProgramMemoryWarningResult as MiniProgramMemoryWarningResult, type HostMiniProgramNavigateToOption as MiniProgramNavigateToOption, type HostMiniProgramNodesRef as MiniProgramNodesRef, type HostMiniProgramNodesRefFields as MiniProgramNodesRefFields, type HostMiniProgramPageLifetime as MiniProgramPageLifetime, type MiniProgramPageLifetimes, type HostMiniProgramPageNotFoundOptions as MiniProgramPageNotFoundOptions, type HostMiniProgramPageResizeOption as MiniProgramPageResizeOption, type HostMiniProgramPageScrollOption as MiniProgramPageScrollOption, type MiniProgramPlatformHostNamespaceBySource, type MiniProgramPlatformHostSourceName, type MiniProgramPlatformHostSourceRegistry, type HostMiniProgramReLaunchOption as MiniProgramReLaunchOption, type HostMiniProgramRedirectToOption as MiniProgramRedirectToOption, type HostMiniProgramRouter as MiniProgramRouter, type MiniProgramRouterNavigateToOption, type MiniProgramRouterReLaunchOption, type MiniProgramRouterRedirectToOption, type MiniProgramRouterSwitchTabOption, type MiniProgramRuntimeHostNamespaceBySource, type MiniProgramRuntimeHostSourceName, type MiniProgramRuntimeHostSourceRegistry, type HostMiniProgramSaveExitState as MiniProgramSaveExitState, type HostMiniProgramScrollOffsetResult as MiniProgramScrollOffsetResult, type HostMiniProgramSelectorQuery as MiniProgramSelectorQuery, type HostMiniProgramShareAppMessageOption as MiniProgramShareAppMessageOption, type HostMiniProgramSwitchTabOption as MiniProgramSwitchTabOption, type HostMiniProgramTabItemTapOption as MiniProgramTabItemTapOption, MiniProgramTemplateRefValue, type HostMiniProgramThemeChangeResult as MiniProgramThemeChangeResult, type HostMiniProgramUnhandledRejectionResult as MiniProgramUnhandledRejectionResult, type ModelBinding, type ModelBindingOptions, type ModelBindingPayload, type ModelModifiers, ModelRef, type MultiWatchSources, type MutationKind, type MutationOp, type MutationRecord, type MutationType, type NativeComponent, type NativePropType, type NativePropsOptions, type NativeTypeHint, type NativeTypedProperty, NavigationBarMetrics, type ObjectDirective, type OnCleanup, type PageFeatures, PageLayoutMeta, type PageLayoutState, PageMeta, PageStackSnapshot, type PrelinkReactiveTreeOptions, type PropConstructor, type PropOptions, type PropType, type PublicProps, PullDownRefreshHandler, type Ref, type RuntimeApp, type RuntimeInstance, type SetDataBindingDiagnostic, type SetDataDebugInfo, type SetDataSnapshotOptions, type SetupContext, type SetupContextIntersectionObserver, type SetupContextIntersectionObserverOptions, type SetupContextNativeInstance, type SetupContextRouter, type SetupContextSelectorQuery, type SetupContextWithTypeProps, type SetupFunction, type SetupFunctionWithTypeProps, type ShallowRef, type ShallowUnwrapRef, type StoreManager, type StoreSubscribeOptions, type StoreToRefsResult, type SubscriptionCallback, type TemplateRef, TemplateRefValue, TemplateRefs, type ToRefs, type HostMiniProgramTriggerEventOptions as TriggerEventOptions, type TtMiniProgramHostNamespace, type TtMiniProgramHostSourceContract, UpdatePerformanceListener, UpdatePerformanceListenerResult, UseAllBoundingClientRectOptions, UseAllScrollOffsetOptions, UseAllSelectorFieldsOptions, type UseAsyncDerivationOptions, UseAsyncPullDownRefreshOptions, UseBoundingClientRectOptions, UseElementIntersectionObserverOptions, UseElementIntersectionObserverReturn, UseIntersectionObserverOptions, UseIntersectionObserverResult, type UseModelOptions, UseNavigationBarMetricsOptions, UsePageScrollThrottleOptions, UsePageScrollThrottleStopHandle, UsePageStackOptions, UseScrollOffsetOptions, UseSelectorFieldsOptions, UseSelectorQueryOptions, UseUpdatePerformanceListenerStopHandle, type VNode, type VNodeProps, type WatchCallback, type WatchEffect, type WatchEffectOptions, type WatchMultiSources, type WatchOptions, type WatchScheduler, type WatchSource, type WatchSourceValue, type WatchSources, type WatchStopHandle, type WechatMiniProgramHostNamespace, type WechatMiniProgramHostSourceContract, type WevuComponentConstructor, type WevuDefaults, type WevuDefinedComponent, WevuGlobalComponents, WevuGlobalDirectives, type WevuPageLayoutMap, type WevuPlugin, type WevuTypedRouterRouteMap, type WritableComputedOptions, type WritableComputedRef, addMutationRecorder, batch, callHookList, callHookReturn, callUpdateHooks, computed, createApp, createStore, createWevuComponent, createWevuScopedSlotComponent, customRef, defineAppSetup, defineComponent, defineEmits, defineExpose, defineModel, defineOptions, definePageMeta, defineProps, defineSlots, defineStore, effect, effectScope, endBatch, getCurrentInstance, getCurrentPageStackSnapshot, getCurrentScope, getCurrentSetupContext, getDeepWatchStrategy, getNavigationBarMetrics, getReactiveVersion, hasInjectionContext, inject, injectGlobal, isNoSetData, isProxy, isRaw, isReactive, isReadonly, isRef, isShallowReactive, isShallowRef, markNoSetData, markRaw, mergeModels, mountRuntimeInstance, nextTick, normalizeClass, normalizeStyle, onActivated, onAddToFavorites, onAttached, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onDetached, onError, onErrorCaptured, onHide, onLaunch, onLoad, onMemoryWarning, onMounted, onMoved, onPageNotFound, onPageScroll, onPullDownRefresh, onReachBottom, onReady, onResize, onRouteDone, onSaveExitState, onScopeDispose, onServerPrefetch, onShareAppMessage, onShareTimeline, onShow, onTabItemTap, onThemeChange, onUnhandledRejection, onUnload, onUnmounted, onUpdated, prelinkReactiveTree, provide, provideGlobal, reactive, readonly, ref, registerApp, registerComponent, registerPageLayoutBridge, registerRuntimeLayoutHosts, removeMutationRecorder, resetWevuDefaults, resolveLayoutBridge, resolveLayoutHost, resolvePropValue, resolveRuntimePageLayoutName, runSetupFunction, setCurrentInstance, setCurrentSetupContext, setDeepWatchStrategy, setGlobalProvidedValue, setPageLayout, setRuntimeSetDataVisibility, setWevuDefaults, shallowReactive, shallowReadonly, shallowRef, startBatch, stop, storeToRefs, syncRuntimePageLayoutState, syncRuntimePageLayoutStateFromRuntime, teardownRuntimeInstance, toRaw, toRef, toRefs, toValue, touchReactive, traverse, triggerRef, unref, unregisterPageLayoutBridge, unregisterRuntimeLayoutHosts, use, useAsyncDerivation, useAsyncPullDownRefresh, useAttrs, useBindModel, useBoundingClientRect, useChangeModel, useCssModule, useDisposables, useElementIntersectionObserver, useIntersectionObserver, useLayoutBridge, useLayoutHosts, useModel, useNativeInstance, useNativePageRouter, useNativeRouter, useNavigationBarMetrics, usePageLayout, usePageScrollThrottle, usePageStack, useScrollOffset, useSelectorFields, useSelectorQuery, useSlots, useTemplateRef, useUpdatePerformanceListener, version, waitForLayoutHost, watch, watchEffect, watchPostEffect, watchSyncEffect, withDefaults };
86
+ export { type ActionContext, type ActionSubscriber, type AlipayMiniProgramHostNamespace, type AlipayMiniProgramHostSourceContract, type AllowedComponentProps, type AppConfig, type AsyncDerivation, type AsyncDerivationContext, type AsyncDerivationState, type AsyncDerivationStatus, type ComponentCustomProps, type ComponentDefinition, type ComponentOptionsMixin, type ComponentPropsOptions, type ComponentPublicInstance, type ComponentTypeEmits, type ComputedDefinitions, type ComputedGetter, type ComputedRef, type ComputedSetter, type CreateAppOptions, type CustomRefFactory, type CustomRefOptions, type CustomRefSource, type DataOption, type DefaultMiniProgramHostNamespace, type DefaultMiniProgramHostSourceContract, type DefineAppOptions, type DefineComponent, type DefineComponentOptions, type DefineComponentTypePropsOptions, type DefineComponentWithTypeProps, DefineModelModifiers, DefineModelTransformOptions, type DefineStoreOptions, DisposableBag, DisposableLike, DisposableMethodName, DisposableObject, type DouyinMiniProgramHostNamespace, type DouyinMiniProgramHostSourceContract, type EffectScope, ElementIntersectionObserverCallback, type EmitFn, type EmitsOptions, type ExtractComputed, type ExtractDefaultPropTypes, type ExtractMethods, type ExtractPropTypes, type ExtractPublicPropTypes, GlobalComponents, GlobalDirectives, type HostMiniProgramAddToFavoritesOption, type HostMiniProgramAppOptions, type HostMiniProgramAppTrivialInstance, type HostMiniProgramBehaviorIdentifier, type HostMiniProgramBoundingClientRectResult, type HostMiniProgramComponentAllFullProperty, type HostMiniProgramComponentAllProperty, type HostMiniProgramComponentBehaviorOptions, type HostMiniProgramComponentEmptyArray, type HostMiniProgramComponentInstance, type HostMiniProgramComponentMethodOption, type HostMiniProgramComponentPropertyOption, type HostMiniProgramComponentPropertyValue, type HostMiniProgramComponentShortProperty, type HostMiniProgramComponentTrivialInstance, type HostMiniProgramComponentTrivialOption, type HostMiniProgramIntersectionObserver, type HostMiniProgramIntersectionObserverOptions, type HostMiniProgramLaunchOptions, type HostMiniProgramMemoryWarningResult, type HostMiniProgramNavigateToOption, type HostMiniProgramNodesRef, type HostMiniProgramNodesRefFields, type HostMiniProgramPageLifetime, type HostMiniProgramPageNotFoundOptions, type HostMiniProgramPageResizeOption, type HostMiniProgramPageScrollOption, type HostMiniProgramPageTrivialInstance, type HostMiniProgramReLaunchOption, type HostMiniProgramRedirectToOption, type HostMiniProgramRouter, type HostMiniProgramSaveExitState, type HostMiniProgramScrollOffsetResult, type HostMiniProgramSelectorQuery, type HostMiniProgramShareAppMessageOption, type HostMiniProgramSwitchTabOption, type HostMiniProgramTabItemTapOption, type HostMiniProgramThemeChangeResult, type HostMiniProgramTriggerEventOptions, type HostMiniProgramUnhandledRejectionResult, type InferNativePropType, type InferNativeProps, type InferPropType, type InferProps, type InternalRuntimeState, type InternalRuntimeStateFields, type LayoutBridgeInstance, type LayoutHostBinding, type MapSources, type MaybeRef, type MaybeRefOrGetter, type MaybeUndefined, type MethodDefinitions, type MiniProgramAdapter, type HostMiniProgramAddToFavoritesOption as MiniProgramAddToFavoritesOption, type MiniProgramAppOptions, type MiniProgramBehaviorIdentifier, type HostMiniProgramBoundingClientRectResult as MiniProgramBoundingClientRectResult, type HostMiniProgramComponentAllFullProperty as MiniProgramComponentAllFullProperty, type HostMiniProgramComponentAllProperty as MiniProgramComponentAllProperty, type HostMiniProgramComponentBehaviorOptions as MiniProgramComponentBehaviorOptions, type HostMiniProgramComponentEmptyArray as MiniProgramComponentEmptyArray, type MiniProgramComponentInstance, type HostMiniProgramComponentMethodOption as MiniProgramComponentMethodOption, type MiniProgramComponentOptions, type HostMiniProgramComponentPropertyOption as MiniProgramComponentPropertyOption, type MiniProgramComponentPropertyValue, type MiniProgramComponentRawOptions, type HostMiniProgramComponentShortProperty as MiniProgramComponentShortProperty, type MiniProgramHostNamespace, type MiniProgramHostNamespaceBySource, type MiniProgramHostSourceName, type MiniProgramHostSourceRegistry, type MiniProgramInstance, type HostMiniProgramIntersectionObserver as MiniProgramIntersectionObserver, type HostMiniProgramIntersectionObserverOptions as MiniProgramIntersectionObserverOptions, type HostMiniProgramLaunchOptions as MiniProgramLaunchOptions, type HostMiniProgramMemoryWarningResult as MiniProgramMemoryWarningResult, type HostMiniProgramNavigateToOption as MiniProgramNavigateToOption, type HostMiniProgramNodesRef as MiniProgramNodesRef, type HostMiniProgramNodesRefFields as MiniProgramNodesRefFields, type HostMiniProgramPageLifetime as MiniProgramPageLifetime, type MiniProgramPageLifetimes, type HostMiniProgramPageNotFoundOptions as MiniProgramPageNotFoundOptions, type HostMiniProgramPageResizeOption as MiniProgramPageResizeOption, type HostMiniProgramPageScrollOption as MiniProgramPageScrollOption, type MiniProgramPlatformHostNamespaceBySource, type MiniProgramPlatformHostSourceName, type MiniProgramPlatformHostSourceRegistry, type HostMiniProgramReLaunchOption as MiniProgramReLaunchOption, type HostMiniProgramRedirectToOption as MiniProgramRedirectToOption, type HostMiniProgramRouter as MiniProgramRouter, type MiniProgramRouterNavigateToOption, type MiniProgramRouterReLaunchOption, type MiniProgramRouterRedirectToOption, type MiniProgramRouterSwitchTabOption, type MiniProgramRuntimeHostNamespaceBySource, type MiniProgramRuntimeHostSourceName, type MiniProgramRuntimeHostSourceRegistry, type HostMiniProgramSaveExitState as MiniProgramSaveExitState, type HostMiniProgramScrollOffsetResult as MiniProgramScrollOffsetResult, type HostMiniProgramSelectorQuery as MiniProgramSelectorQuery, type HostMiniProgramShareAppMessageOption as MiniProgramShareAppMessageOption, type HostMiniProgramSwitchTabOption as MiniProgramSwitchTabOption, type HostMiniProgramTabItemTapOption as MiniProgramTabItemTapOption, MiniProgramTemplateRefValue, type HostMiniProgramThemeChangeResult as MiniProgramThemeChangeResult, type HostMiniProgramUnhandledRejectionResult as MiniProgramUnhandledRejectionResult, type ModelBinding, type ModelBindingOptions, type ModelBindingPayload, type ModelModifiers, ModelRef, type MultiWatchSources, type MutationKind, type MutationOp, type MutationRecord, MutationType, type NativeComponent, type NativePropType, type NativePropsOptions, type NativeTypeHint, type NativeTypedProperty, NavigationBarMetrics, type ObjectDirective, type OnCleanup, type PageFeatures, PageLayoutMeta, type PageLayoutState, PageMeta, PageStackSnapshot, type Pinia, type PiniaCustomProperties, type PiniaCustomStateProperties, type PiniaPlugin, type PiniaPluginContext, type PrelinkReactiveTreeOptions, type PropConstructor, type PropOptions, type PropType, type PublicProps, PullDownRefreshHandler, type Ref, type RuntimeApp, type RuntimeInstance, type SetDataBindingDiagnostic, type SetDataDebugInfo, type SetDataSnapshotOptions, type SetupContext, type SetupContextIntersectionObserver, type SetupContextIntersectionObserverOptions, type SetupContextNativeInstance, type SetupContextRouter, type SetupContextSelectorQuery, type SetupContextWithTypeProps, type SetupFunction, type SetupFunctionWithTypeProps, type ShallowRef, type ShallowUnwrapRef, type StateTree, type StoreActions, type StoreDefinition, type StoreGeneric, type StoreManager, type StoreState, type StoreSubscribeOptions, type StoreToRefsResult, type SubscriptionCallback, type SubscriptionCallbackMutation, type TemplateRef, TemplateRefValue, TemplateRefs, type ToRefs, type HostMiniProgramTriggerEventOptions as TriggerEventOptions, type TtMiniProgramHostNamespace, type TtMiniProgramHostSourceContract, UpdatePerformanceListener, UpdatePerformanceListenerResult, UseAllBoundingClientRectOptions, UseAllScrollOffsetOptions, UseAllSelectorFieldsOptions, type UseAsyncDerivationOptions, UseAsyncPullDownRefreshOptions, UseBoundingClientRectOptions, UseElementIntersectionObserverOptions, UseElementIntersectionObserverReturn, UseIntersectionObserverOptions, UseIntersectionObserverResult, type UseModelOptions, UseNavigationBarMetricsOptions, UsePageScrollThrottleOptions, UsePageScrollThrottleStopHandle, UsePageStackOptions, UseScrollOffsetOptions, UseSelectorFieldsOptions, UseSelectorQueryOptions, UseUpdatePerformanceListenerStopHandle, type VNode, type VNodeProps, type WatchCallback, type WatchEffect, type WatchEffectOptions, type WatchMultiSources, type WatchOptions, type WatchScheduler, type WatchSource, type WatchSourceValue, type WatchSources, type WatchStopHandle, type WechatMiniProgramHostNamespace, type WechatMiniProgramHostSourceContract, type WevuComponentConstructor, type WevuDefaults, type WevuDefinedComponent, WevuGlobalComponents, WevuGlobalDirectives, type WevuPageLayoutMap, type WevuPlugin, type WevuTypedRouterRouteMap, type WritableComputedOptions, type WritableComputedRef, addMutationRecorder, batch, callHookList, callHookReturn, callUpdateHooks, computed, createApp, createPinia, createStore, createWevuComponent, createWevuScopedSlotComponent, customRef, defineAppSetup, defineComponent, defineEmits, defineExpose, defineModel, defineOptions, definePageMeta, defineProps, defineSlots, defineStore, disposePinia, effect, effectScope, endBatch, getActivePinia, getCurrentInstance, getCurrentPageStackSnapshot, getCurrentScope, getCurrentSetupContext, getDeepWatchStrategy, getNavigationBarMetrics, getReactiveVersion, hasInjectionContext, inject, injectGlobal, isNoSetData, isProxy, isRaw, isReactive, isReadonly, isRef, isShallowReactive, isShallowRef, markNoSetData, markRaw, mergeModels, mountRuntimeInstance, nextTick, normalizeClass, normalizeStyle, onActivated, onAddToFavorites, onAttached, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onDetached, onError, onErrorCaptured, onHide, onLaunch, onLoad, onMemoryWarning, onMounted, onMoved, onPageNotFound, onPageScroll, onPullDownRefresh, onReachBottom, onReady, onResize, onRouteDone, onSaveExitState, onScopeDispose, onServerPrefetch, onShareAppMessage, onShareTimeline, onShow, onTabItemTap, onThemeChange, onUnhandledRejection, onUnload, onUnmounted, onUpdated, prelinkReactiveTree, provide, provideGlobal, reactive, readonly, ref, registerApp, registerComponent, registerPageLayoutBridge, registerRuntimeLayoutHosts, removeMutationRecorder, resetWevuDefaults, resolveLayoutBridge, resolveLayoutHost, resolvePropValue, resolveRuntimePageLayoutName, runSetupFunction, setActivePinia, setCurrentInstance, setCurrentSetupContext, setDeepWatchStrategy, setGlobalProvidedValue, setPageLayout, setRuntimeSetDataVisibility, setWevuDefaults, shallowReactive, shallowReadonly, shallowRef, startBatch, stop, storeToRefs, syncRuntimePageLayoutState, syncRuntimePageLayoutStateFromRuntime, teardownRuntimeInstance, toRaw, toRef, toRefs, toValue, touchReactive, traverse, triggerRef, unref, unregisterPageLayoutBridge, unregisterRuntimeLayoutHosts, use, useAsyncDerivation, useAsyncPullDownRefresh, useAttrs, useBindModel, useBoundingClientRect, useChangeModel, useCssModule, useDisposables, useElementIntersectionObserver, useIntersectionObserver, useLayoutBridge, useLayoutHosts, useModel, useNativeInstance, useNativePageRouter, useNativeRouter, useNavigationBarMetrics, usePageLayout, usePageScrollThrottle, usePageStack, useScrollOffset, useSelectorFields, useSelectorQuery, useSlots, useTemplateRef, useUpdatePerformanceListener, version, waitForLayoutHost, watch, watchEffect, watchPostEffect, watchSyncEffect, withDefaults };
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{isProxy as E,isReadonly as D,readonly as O,shallowReadonly as k}from"./reactivity/readonly.mjs";import{useAsyncDerivation as A}from"./reactivity/asyncDerivation.mjs";import{computed as j}from"./reactivity/computed.mjs";import{isShallowRef as M,shallowRef as N,triggerRef as P}from"./reactivity/shallowRef.mjs";import{toRef as F,toRefs as I}from"./reactivity/toRefs.mjs";import{traverse as L}from"./reactivity/traverse.mjs";import{callHookList as R,callHookReturn as z,getCurrentInstance as B,getCurrentSetupContext as V,setCurrentInstance as H,setCurrentSetupContext as U}from"./runtime/hooks/base.mjs";import{onAddToFavorites as W,onAttached as G,onDetached as K,onError as q,onHide as J,onLaunch as Y,onLoad as X,onMemoryWarning as Z,onMoved as Q,onPageNotFound as $,onPageScroll as ee,onPullDownRefresh as te,onReachBottom as ne,onReady as re,onResize as ie,onRouteDone as ae,onSaveExitState as oe,onShareAppMessage as se,onShareTimeline as ce,onShow as le,onTabItemTap as ue,onThemeChange as de,onUnhandledRejection as fe,onUnload as pe}from"./runtime/hooks/register.mjs";import{callUpdateHooks as me,onActivated as he,onBeforeMount as ge,onBeforeUnmount as _e,onBeforeUpdate as ve,onDeactivated as ye,onErrorCaptured as be,onMounted as xe,onServerPrefetch as Se,onUnmounted as Ce,onUpdated as we}from"./runtime/hooks/vue.mjs";import{getDeepWatchStrategy as Te,setDeepWatchStrategy as Ee}from"./reactivity/watch/types.mjs";import{watch as De,watchEffect as Oe,watchPostEffect as ke,watchSyncEffect as Ae}from"./reactivity/watch.mjs";import{useCssModule as je}from"./runtime/css.mjs";import{resetWevuDefaults as Me}from"./runtime/defaults.mjs";import{useDisposables as Ne}from"./runtime/disposables.mjs";import{useElementIntersectionObserver as Pe}from"./runtime/elementIntersectionObserver.mjs";import{isNoSetData as Fe,markNoSetData as Ie}from"./runtime/noSetData.mjs";import{registerPageLayoutBridge as Le,registerRuntimeLayoutHosts as Re,resolveLayoutBridge as ze,resolveLayoutHost as Be,resolveRuntimePageLayoutName as Ve,setPageLayout as He,syncRuntimePageLayoutState as Ue,syncRuntimePageLayoutStateFromRuntime as We,unregisterPageLayoutBridge as Ge,unregisterRuntimeLayoutHosts as Ke,useLayoutBridge as qe,useLayoutHosts as Je,usePageLayout as Ye,waitForLayoutHost as Xe}from"./runtime/features/publicLayout.mjs";import{useIntersectionObserver as Ze}from"./runtime/intersectionObserver.mjs";import{getCurrentPageStackSnapshot as Qe,getNavigationBarMetrics as $e,useNavigationBarMetrics as et,usePageStack as tt}from"./runtime/pageEnvironment.mjs";import{usePageScrollThrottle as nt}from"./runtime/pageScroll.mjs";import{setGlobalProvidedValue as rt}from"./runtime/provideStore.mjs";import{hasInjectionContext as it,inject as at,injectGlobal as ot,provide as st,provideGlobal as ct}from"./runtime/provide.mjs";import{version as lt}from"./version.mjs";import{runSetupFunction as ut}from"./runtime/register/setup.mjs";import{setRuntimeSetDataVisibility as dt,teardownRuntimeInstance as ft}from"./runtime/register/runtimeInstance.mjs";import{createApp as pt,createWevuComponent as mt,createWevuScopedSlotComponent as ht,defineComponent as gt,mountRuntimeInstance as _t,registerApp as vt,registerComponent as yt,setWevuDefaults as bt}from"./runtime/publicRuntime.mjs";import{useAsyncPullDownRefresh as xt}from"./runtime/pullDownRefresh.mjs";import{useBoundingClientRect as St,useScrollOffset as Ct,useSelectorFields as wt,useSelectorQuery as Tt}from"./runtime/selectorQuery.mjs";import{normalizeClass as Et,normalizeStyle as Dt,resolvePropValue as Ot}from"./runtime/template.mjs";import{useUpdatePerformanceListener as kt}from"./runtime/updatePerformance.mjs";import{defineAppSetup as At,use as jt}from"./runtime/use.mjs";import{useAttrs as Mt,useNativeInstance as Nt,useSlots as Pt}from"./runtime/vueCompat/context.mjs";import{mergeModels as Ft,useBindModel as It,useChangeModel as Lt,useModel as Rt}from"./runtime/vueCompat/model.mjs";import{useNativePageRouter as zt,useNativeRouter as Bt}from"./runtime/vueCompat/router.mjs";import{useTemplateRef as Vt}from"./runtime/vueCompat/templateRef.mjs";import{createStore as Ht}from"./store/manager.mjs";import{defineStore as Ut}from"./store/define.mjs";import{storeToRefs as Wt}from"./store/storeToRefs.mjs";export*from"@wevu/web-apis";const Gt=!1,Kt=!0,qt=void 0;function Jt(){}export{qt as Vue2,l as addMutationRecorder,t as batch,R as callHookList,z as callHookReturn,me as callUpdateHooks,j as computed,pt as createApp,Ht as createStore,mt as createWevuComponent,ht as createWevuScopedSlotComponent,x as customRef,At as defineAppSetup,gt as defineComponent,Ut as defineStore,n as effect,r as effectScope,i as endBatch,B as getCurrentInstance,Qe as getCurrentPageStackSnapshot,a as getCurrentScope,V as getCurrentSetupContext,Te as getDeepWatchStrategy,$e as getNavigationBarMetrics,g as getReactiveVersion,it as hasInjectionContext,at as inject,ot as injectGlobal,Jt as install,Fe as isNoSetData,E as isProxy,_ as isRaw,v as isReactive,D as isReadonly,S as isRef,m as isShallowReactive,M as isShallowRef,Gt as isVue2,Kt as isVue3,Ie as markNoSetData,y as markRaw,Ft as mergeModels,_t as mountRuntimeInstance,e as nextTick,Et as normalizeClass,Dt as normalizeStyle,he as onActivated,W as onAddToFavorites,G as onAttached,ge as onBeforeMount,_e as onBeforeUnmount,ve as onBeforeUpdate,ye as onDeactivated,K as onDetached,q as onError,be as onErrorCaptured,J as onHide,Y as onLaunch,X as onLoad,Z as onMemoryWarning,xe as onMounted,Q as onMoved,$ as onPageNotFound,ee as onPageScroll,te as onPullDownRefresh,ne as onReachBottom,re as onReady,ie as onResize,ae as onRouteDone,oe as onSaveExitState,o as onScopeDispose,Se as onServerPrefetch,se as onShareAppMessage,ce as onShareTimeline,le as onShow,ue as onTabItemTap,de as onThemeChange,fe as onUnhandledRejection,pe as onUnload,Ce as onUnmounted,we as onUpdated,f as prelinkReactiveTree,st as provide,ct as provideGlobal,b as reactive,O as readonly,C as ref,vt as registerApp,yt as registerComponent,Le as registerPageLayoutBridge,Re as registerRuntimeLayoutHosts,u as removeMutationRecorder,Me as resetWevuDefaults,ze as resolveLayoutBridge,Be as resolveLayoutHost,Ot as resolvePropValue,Ve as resolveRuntimePageLayoutName,ut as runSetupFunction,H as setCurrentInstance,U as setCurrentSetupContext,Ee as setDeepWatchStrategy,rt as setGlobalProvidedValue,He as setPageLayout,dt as setRuntimeSetDataVisibility,bt as setWevuDefaults,h as shallowReactive,k as shallowReadonly,N as shallowRef,s as startBatch,c as stop,Wt as storeToRefs,Ue as syncRuntimePageLayoutState,We as syncRuntimePageLayoutStateFromRuntime,ft as teardownRuntimeInstance,d as toRaw,F as toRef,I as toRefs,w as toValue,p as touchReactive,L as traverse,P as triggerRef,T as unref,Ge as unregisterPageLayoutBridge,Ke as unregisterRuntimeLayoutHosts,jt as use,A as useAsyncDerivation,xt as useAsyncPullDownRefresh,Mt as useAttrs,It as useBindModel,St as useBoundingClientRect,Lt as useChangeModel,je as useCssModule,Ne as useDisposables,Pe as useElementIntersectionObserver,Ze as useIntersectionObserver,qe as useLayoutBridge,Je as useLayoutHosts,Rt as useModel,Nt as useNativeInstance,zt as useNativePageRouter,Bt as useNativeRouter,et as useNavigationBarMetrics,Ye as usePageLayout,nt as usePageScrollThrottle,tt as usePageStack,Ct as useScrollOffset,wt as useSelectorFields,Tt as useSelectorQuery,Pt as useSlots,Vt as useTemplateRef,kt as useUpdatePerformanceListener,lt as version,Xe as waitForLayoutHost,De as watch,Oe as watchEffect,ke as watchPostEffect,Ae as watchSyncEffect};
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{isProxy as E,isReadonly as D,readonly as O,shallowReadonly as k}from"./reactivity/readonly.mjs";import{useAsyncDerivation as A}from"./reactivity/asyncDerivation.mjs";import{computed as j}from"./reactivity/computed.mjs";import{isShallowRef as M,shallowRef as N,triggerRef as P}from"./reactivity/shallowRef.mjs";import{toRef as F,toRefs as I}from"./reactivity/toRefs.mjs";import{traverse as L}from"./reactivity/traverse.mjs";import{callHookList as R,callHookReturn as z,getCurrentInstance as B,getCurrentSetupContext as V,setCurrentInstance as H,setCurrentSetupContext as U}from"./runtime/hooks/base.mjs";import{onAddToFavorites as W,onAttached as G,onDetached as K,onError as q,onHide as J,onLaunch as Y,onLoad as X,onMemoryWarning as Z,onMoved as Q,onPageNotFound as $,onPageScroll as ee,onPullDownRefresh as te,onReachBottom as ne,onReady as re,onResize as ie,onRouteDone as ae,onSaveExitState as oe,onShareAppMessage as se,onShareTimeline as ce,onShow as le,onTabItemTap as ue,onThemeChange as de,onUnhandledRejection as fe,onUnload as pe}from"./runtime/hooks/register.mjs";import{callUpdateHooks as me,onActivated as he,onBeforeMount as ge,onBeforeUnmount as _e,onBeforeUpdate as ve,onDeactivated as ye,onErrorCaptured as be,onMounted as xe,onServerPrefetch as Se,onUnmounted as Ce,onUpdated as we}from"./runtime/hooks/vue.mjs";import{getDeepWatchStrategy as Te,setDeepWatchStrategy as Ee}from"./reactivity/watch/types.mjs";import{watch as De,watchEffect as Oe,watchPostEffect as ke,watchSyncEffect as Ae}from"./reactivity/watch.mjs";import{useCssModule as je}from"./runtime/css.mjs";import{resetWevuDefaults as Me}from"./runtime/defaults.mjs";import{useDisposables as Ne}from"./runtime/disposables.mjs";import{useElementIntersectionObserver as Pe}from"./runtime/elementIntersectionObserver.mjs";import{isNoSetData as Fe,markNoSetData as Ie}from"./runtime/noSetData.mjs";import{registerPageLayoutBridge as Le,registerRuntimeLayoutHosts as Re,resolveLayoutBridge as ze,resolveLayoutHost as Be,resolveRuntimePageLayoutName as Ve,setPageLayout as He,syncRuntimePageLayoutState as Ue,syncRuntimePageLayoutStateFromRuntime as We,unregisterPageLayoutBridge as Ge,unregisterRuntimeLayoutHosts as Ke,useLayoutBridge as qe,useLayoutHosts as Je,usePageLayout as Ye,waitForLayoutHost as Xe}from"./runtime/features/publicLayout.mjs";import{useIntersectionObserver as Ze}from"./runtime/intersectionObserver.mjs";import{getCurrentPageStackSnapshot as Qe,getNavigationBarMetrics as $e,useNavigationBarMetrics as et,usePageStack as tt}from"./runtime/pageEnvironment.mjs";import{usePageScrollThrottle as nt}from"./runtime/pageScroll.mjs";import{setGlobalProvidedValue as rt}from"./runtime/provideStore.mjs";import{hasInjectionContext as it,inject as at,injectGlobal as ot,provide as st,provideGlobal as ct}from"./runtime/provide.mjs";import{version as lt}from"./version.mjs";import{runSetupFunction as ut}from"./runtime/register/setup.mjs";import{setRuntimeSetDataVisibility as dt,teardownRuntimeInstance as ft}from"./runtime/register/runtimeInstance.mjs";import{createApp as pt,createWevuComponent as mt,createWevuScopedSlotComponent as ht,defineComponent as gt,mountRuntimeInstance as _t,registerApp as vt,registerComponent as yt,setWevuDefaults as bt}from"./runtime/publicRuntime.mjs";import{useAsyncPullDownRefresh as xt}from"./runtime/pullDownRefresh.mjs";import{useBoundingClientRect as St,useScrollOffset as Ct,useSelectorFields as wt,useSelectorQuery as Tt}from"./runtime/selectorQuery.mjs";import{normalizeClass as Et,normalizeStyle as Dt,resolvePropValue as Ot}from"./runtime/template.mjs";import{useUpdatePerformanceListener as kt}from"./runtime/updatePerformance.mjs";import{defineAppSetup as At,use as jt}from"./runtime/use.mjs";import{useAttrs as Mt,useNativeInstance as Nt,useSlots as Pt}from"./runtime/vueCompat/context.mjs";import{mergeModels as Ft,useBindModel as It,useChangeModel as Lt,useModel as Rt}from"./runtime/vueCompat/model.mjs";import{useNativePageRouter as zt,useNativeRouter as Bt}from"./runtime/vueCompat/router.mjs";import{useTemplateRef as Vt}from"./runtime/vueCompat/templateRef.mjs";import{createPinia as Ht,createStore as Ut,disposePinia as Wt,getActivePinia as Gt,setActivePinia as Kt}from"./store/manager.mjs";import{MutationType as qt}from"./store/types.mjs";import{defineStore as Jt}from"./store/define.mjs";import{storeToRefs as Yt}from"./store/storeToRefs.mjs";export*from"@wevu/web-apis";const Xt=!1,Zt=!0,Qt=void 0;function $t(){}export{qt as MutationType,Qt as Vue2,l as addMutationRecorder,t as batch,R as callHookList,z as callHookReturn,me as callUpdateHooks,j as computed,pt as createApp,Ht as createPinia,Ut as createStore,mt as createWevuComponent,ht as createWevuScopedSlotComponent,x as customRef,At as defineAppSetup,gt as defineComponent,Jt as defineStore,Wt as disposePinia,n as effect,r as effectScope,i as endBatch,Gt as getActivePinia,B as getCurrentInstance,Qe as getCurrentPageStackSnapshot,a as getCurrentScope,V as getCurrentSetupContext,Te as getDeepWatchStrategy,$e as getNavigationBarMetrics,g as getReactiveVersion,it as hasInjectionContext,at as inject,ot as injectGlobal,$t as install,Fe as isNoSetData,E as isProxy,_ as isRaw,v as isReactive,D as isReadonly,S as isRef,m as isShallowReactive,M as isShallowRef,Xt as isVue2,Zt as isVue3,Ie as markNoSetData,y as markRaw,Ft as mergeModels,_t as mountRuntimeInstance,e as nextTick,Et as normalizeClass,Dt as normalizeStyle,he as onActivated,W as onAddToFavorites,G as onAttached,ge as onBeforeMount,_e as onBeforeUnmount,ve as onBeforeUpdate,ye as onDeactivated,K as onDetached,q as onError,be as onErrorCaptured,J as onHide,Y as onLaunch,X as onLoad,Z as onMemoryWarning,xe as onMounted,Q as onMoved,$ as onPageNotFound,ee as onPageScroll,te as onPullDownRefresh,ne as onReachBottom,re as onReady,ie as onResize,ae as onRouteDone,oe as onSaveExitState,o as onScopeDispose,Se as onServerPrefetch,se as onShareAppMessage,ce as onShareTimeline,le as onShow,ue as onTabItemTap,de as onThemeChange,fe as onUnhandledRejection,pe as onUnload,Ce as onUnmounted,we as onUpdated,f as prelinkReactiveTree,st as provide,ct as provideGlobal,b as reactive,O as readonly,C as ref,vt as registerApp,yt as registerComponent,Le as registerPageLayoutBridge,Re as registerRuntimeLayoutHosts,u as removeMutationRecorder,Me as resetWevuDefaults,ze as resolveLayoutBridge,Be as resolveLayoutHost,Ot as resolvePropValue,Ve as resolveRuntimePageLayoutName,ut as runSetupFunction,Kt as setActivePinia,H as setCurrentInstance,U as setCurrentSetupContext,Ee as setDeepWatchStrategy,rt as setGlobalProvidedValue,He as setPageLayout,dt as setRuntimeSetDataVisibility,bt as setWevuDefaults,h as shallowReactive,k as shallowReadonly,N as shallowRef,s as startBatch,c as stop,Yt as storeToRefs,Ue as syncRuntimePageLayoutState,We as syncRuntimePageLayoutStateFromRuntime,ft as teardownRuntimeInstance,d as toRaw,F as toRef,I as toRefs,w as toValue,p as touchReactive,L as traverse,P as triggerRef,T as unref,Ge as unregisterPageLayoutBridge,Ke as unregisterRuntimeLayoutHosts,jt as use,A as useAsyncDerivation,xt as useAsyncPullDownRefresh,Mt as useAttrs,It as useBindModel,St as useBoundingClientRect,Lt as useChangeModel,je as useCssModule,Ne as useDisposables,Pe as useElementIntersectionObserver,Ze as useIntersectionObserver,qe as useLayoutBridge,Je as useLayoutHosts,Rt as useModel,Nt as useNativeInstance,zt as useNativePageRouter,Bt as useNativeRouter,et as useNavigationBarMetrics,Ye as usePageLayout,nt as usePageScrollThrottle,tt as usePageStack,Ct as useScrollOffset,wt as useSelectorFields,Tt as useSelectorQuery,Pt as useSlots,Vt as useTemplateRef,kt as useUpdatePerformanceListener,lt as version,Xe as waitForLayoutHost,De as watch,Oe as watchEffect,ke as watchPostEffect,Ae as watchSyncEffect};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "wevu",
3
3
  "type": "module",
4
- "version": "7.1.4",
4
+ "version": "7.2.1",
5
5
  "description": "Vue 3 风格的小程序运行时,包含响应式、diff+setData 与轻量状态管理",
6
6
  "author": "ice breaker <1324318532@qq.com>",
7
7
  "license": "MIT",
@@ -30,7 +30,9 @@
30
30
  ],
31
31
  "sideEffects": [
32
32
  "./dist/api/vitest/setup.mjs",
33
- "./dist/dev/api/vitest/setup.mjs"
33
+ "./dist/dev/api/vitest/setup.mjs",
34
+ "./dist/router/auto-routes.mjs",
35
+ "./dist/dev/router/auto-routes.mjs"
34
36
  ],
35
37
  "exports": {
36
38
  ".": {
@@ -144,6 +146,14 @@
144
146
  "default": "./dist/router.mjs"
145
147
  }
146
148
  },
149
+ "./router/auto-routes": {
150
+ "types": "./dist/router/auto-routes.d.mts",
151
+ "import": {
152
+ "types": "./dist/router/auto-routes.d.mts",
153
+ "development": "./dist/dev/router/auto-routes.mjs",
154
+ "default": "./dist/router/auto-routes.mjs"
155
+ }
156
+ },
147
157
  "./vue-demi": {
148
158
  "types": "./dist/vue-demi.d.mts",
149
159
  "import": {
@@ -236,6 +246,13 @@
236
246
  "default": "./dist/dev/router.mjs"
237
247
  }
238
248
  },
249
+ "./dev/router/auto-routes": {
250
+ "types": "./dist/router/auto-routes.d.mts",
251
+ "import": {
252
+ "types": "./dist/router/auto-routes.d.mts",
253
+ "default": "./dist/dev/router/auto-routes.mjs"
254
+ }
255
+ },
239
256
  "./dev/vue-demi": {
240
257
  "types": "./dist/vue-demi.d.mts",
241
258
  "import": {
@@ -274,21 +291,24 @@
274
291
  }
275
292
  },
276
293
  "dependencies": {
277
- "@weapp-core/constants": "0.2.5",
278
- "@weapp-core/shared": "3.2.4",
279
- "@weapp-core/types": "1.1.2",
280
- "@wevu/api": "0.3.4",
281
- "@wevu/compiler": "7.1.4",
282
- "@wevu/web-apis": "1.3.1",
294
+ "@weapp-core/constants": "0.2.6",
295
+ "@weapp-core/shared": "3.2.5",
296
+ "@weapp-core/types": "1.1.3",
297
+ "@wevu/api": "0.3.5",
298
+ "@wevu/compiler": "7.2.1",
299
+ "@wevu/web-apis": "1.3.2",
283
300
  "vue": "^3.5.43"
284
301
  },
302
+ "devDependencies": {
303
+ "pinia": "4.0.3"
304
+ },
285
305
  "scripts": {
286
306
  "dev": "tsdown -w",
287
307
  "build": "tsdown",
288
308
  "build:types": "tsdown --dts",
289
309
  "test": "vitest run",
290
310
  "test:dev": "vitest",
291
- "test:types": "pnpm build:types && tsd --files \"test-d/**/*.test-d.{ts,tsx}\"",
311
+ "test:types": "pnpm build:types && tsd --files \"test-d/**/*.test-d.{ts,tsx}\" && tsd --files \"test-d/router-named-map.test-types.ts\"",
292
312
  "typecheck": "tsc --noEmit",
293
313
  "release": "pnpm publish",
294
314
  "lint": "eslint .",
@@ -1 +0,0 @@
1
- export {}
@@ -1 +0,0 @@
1
- export * from "@wevu/api/vitest";
@@ -1 +0,0 @@
1
- export * from "@wevu/api";
@@ -1 +0,0 @@
1
- export * from "@wevu/compiler";
@@ -1,9 +0,0 @@
1
- import { WeapiMiniProgramRequestMethod } from "@wevu/api";
2
- import { RequestGlobalsFetchInit as WevuFetchInit, fetch } from "@wevu/web-apis/fetch";
3
- //#region src/fetch.d.ts
4
- export type WevuFetchInput = Parameters<typeof import('@wevu/web-apis/fetch').fetch>[0];
5
- export type MiniProgramRequestMethod = WeapiMiniProgramRequestMethod;
6
- export type WxRequestMethod = MiniProgramRequestMethod;
7
- //#endregion
8
- export { type WevuFetchInit, fetch };
9
- //# sourceMappingURL=fetch.d.mts.map
@@ -1,72 +0,0 @@
1
- import { AlipayMiniProgramHostNamespace, AlipayMiniProgramHostSourceContract, DefaultMiniProgramHostNamespace, DefaultMiniProgramHostSourceContract, DouyinMiniProgramHostNamespace, DouyinMiniProgramHostSourceContract, MiniProgramHostNamespace, MiniProgramHostNamespaceBySource, MiniProgramHostSourceName, MiniProgramHostSourceRegistry, MiniProgramPlatformHostNamespaceBySource, MiniProgramPlatformHostSourceName, MiniProgramPlatformHostSourceRegistry, MiniProgramRuntimeHostNamespaceBySource, MiniProgramRuntimeHostSourceName, MiniProgramRuntimeHostSourceRegistry, TtMiniProgramHostNamespace, TtMiniProgramHostSourceContract, WechatMiniProgramHostNamespace, WechatMiniProgramHostSourceContract } from "./runtime/types/miniprogramHostSources.mjs";
2
- import { HostMiniProgramAddToFavoritesOption, HostMiniProgramAppOptions, HostMiniProgramAppTrivialInstance, HostMiniProgramBehaviorIdentifier, HostMiniProgramBoundingClientRectResult, HostMiniProgramComponentAllFullProperty, HostMiniProgramComponentAllProperty, HostMiniProgramComponentBehaviorOptions, HostMiniProgramComponentEmptyArray, HostMiniProgramComponentInstance, HostMiniProgramComponentMethodOption, HostMiniProgramComponentPropertyOption, HostMiniProgramComponentPropertyValue, HostMiniProgramComponentShortProperty, HostMiniProgramComponentTrivialInstance, HostMiniProgramComponentTrivialOption, HostMiniProgramIntersectionObserver, HostMiniProgramIntersectionObserverOptions, HostMiniProgramLaunchOptions, HostMiniProgramMemoryWarningResult, HostMiniProgramNavigateToOption, HostMiniProgramNodesRef, HostMiniProgramNodesRefFields, HostMiniProgramPageLifetime, HostMiniProgramPageNotFoundOptions, HostMiniProgramPageResizeOption, HostMiniProgramPageScrollOption, HostMiniProgramPageTrivialInstance, HostMiniProgramReLaunchOption, HostMiniProgramRedirectToOption, HostMiniProgramRouter, HostMiniProgramSaveExitState, HostMiniProgramScrollOffsetResult, HostMiniProgramSelectorQuery, HostMiniProgramShareAppMessageOption, HostMiniProgramSwitchTabOption, HostMiniProgramTabItemTapOption, HostMiniProgramThemeChangeResult, HostMiniProgramTriggerEventOptions, HostMiniProgramUnhandledRejectionResult } from "./runtime/types/miniprogramHost.mjs";
3
- import { MiniProgramAdapter, MiniProgramAppOptions, MiniProgramBehaviorIdentifier, MiniProgramComponentInstance, MiniProgramComponentOptions, MiniProgramComponentPropertyValue, MiniProgramComponentRawOptions, MiniProgramInstance, MiniProgramPageLifetimes } from "./runtime/types/miniprogram.mjs";
4
- import { ComponentPropsOptions, ExtractDefaultPropTypes, ExtractPropTypes, ExtractPublicPropTypes, InferNativePropType, InferNativeProps, InferPropType, InferProps, NativePropType, NativePropsOptions, NativeTypeHint, NativeTypedProperty, PropConstructor, PropOptions, PropType } from "./runtime/types/props/propTypes.mjs";
5
- import { MiniProgramRouterNavigateToOption, MiniProgramRouterReLaunchOption, MiniProgramRouterRedirectToOption, MiniProgramRouterSwitchTabOption, SetupContextRouter, WevuTypedRouterRouteMap } from "./runtime/types/props/router.mjs";
6
- import { AsyncDerivation, AsyncDerivationContext, AsyncDerivationState, AsyncDerivationStatus, UseAsyncDerivationOptions, useAsyncDerivation } from "./reactivity/asyncDerivation.mjs";
7
- import { CustomRefFactory, CustomRefOptions, CustomRefSource, MaybeRef, MaybeRefOrGetter, Ref, ShallowRef, customRef, isRef, ref, toValue, unref } from "./reactivity/ref.mjs";
8
- import { ComputedGetter, ComputedRef, ComputedSetter, WritableComputedOptions, WritableComputedRef, computed } from "./reactivity/computed.mjs";
9
- import { nextTick } from "./scheduler.mjs";
10
- import { EffectScope, batch, effect, effectScope, endBatch, getCurrentScope, onScopeDispose, startBatch, stop } from "./reactivity/core.mjs";
11
- import { MutationKind, MutationOp, MutationRecord, addMutationRecorder, removeMutationRecorder } from "./reactivity/reactive/mutation.mjs";
12
- import { PrelinkReactiveTreeOptions, prelinkReactiveTree, touchReactive } from "./reactivity/reactive/patch.mjs";
13
- import { isShallowReactive, shallowReactive } from "./reactivity/reactive/shallow.mjs";
14
- import { toRaw } from "./reactivity/reactive/shared.mjs";
15
- import { getReactiveVersion, isRaw, isReactive, markRaw, reactive } from "./reactivity/reactive.mjs";
16
- import { isProxy, isReadonly, readonly, shallowReadonly } from "./reactivity/readonly.mjs";
17
- import { isShallowRef, shallowRef, triggerRef } from "./reactivity/shallowRef.mjs";
18
- import { ToRefs, toRef, toRefs } from "./reactivity/toRefs.mjs";
19
- import { traverse } from "./reactivity/traverse.mjs";
20
- import { MapSources, MaybeUndefined, MultiWatchSources, OnCleanup, WatchCallback, WatchEffect, WatchEffectOptions, WatchMultiSources, WatchOptions, WatchScheduler, WatchSource, WatchSourceValue, WatchSources, WatchStopHandle, getDeepWatchStrategy, setDeepWatchStrategy } from "./reactivity/watch/types.mjs";
21
- import { watch, watchEffect, watchPostEffect, watchSyncEffect } from "./reactivity/watch.mjs";
22
- import "./reactivity/index.mjs";
23
- import { ComponentPublicInstance, ComputedDefinitions, ExtractComputed, ExtractMethods, MethodDefinitions, ModelBinding, ModelBindingOptions, ModelBindingPayload } from "./runtime/types/core.mjs";
24
- import { AppConfig, InternalRuntimeState, InternalRuntimeStateFields, RuntimeApp, RuntimeInstance, WevuPlugin } from "./runtime/types/runtime.mjs";
25
- import { SetupContext, SetupContextIntersectionObserver, SetupContextIntersectionObserverOptions, SetupContextNativeInstance, SetupContextSelectorQuery, SetupFunction } from "./runtime/types/props/setup.mjs";
26
- import { AllowedComponentProps, ComponentCustomProps, ComponentOptionsMixin, DefineComponent, NativeComponent, ObjectDirective, PublicProps, ShallowUnwrapRef, VNode, VNodeProps } from "./vue-types.mjs";
27
- import { SetDataBindingDiagnostic, SetDataDebugInfo, SetDataSnapshotOptions } from "./runtime/types/setData.mjs";
28
- import { CreateAppOptions, DataOption, DefineAppOptions, DefineComponentOptions, PageFeatures } from "./runtime/types/options.mjs";
29
- import { GlobalComponents, GlobalDirectives, MiniProgramTemplateRefValue, TemplateRefValue, TemplateRefs, WevuGlobalComponents, WevuGlobalDirectives } from "./runtime/types.mjs";
30
- import "./runtime/templateRefTypes.mjs";
31
- import "./vue-augment.mjs";
32
- import { useCssModule } from "./runtime/css.mjs";
33
- import { WevuDefaults, resetWevuDefaults } from "./runtime/defaults.mjs";
34
- import { ComponentDefinition, DefineComponentTypePropsOptions, DefineComponentWithTypeProps, SetupContextWithTypeProps, SetupFunctionWithTypeProps, WevuComponentConstructor, WevuDefinedComponent } from "./runtime/define.mjs";
35
- import { DisposableBag, DisposableLike, DisposableMethodName, DisposableObject, useDisposables } from "./runtime/disposables.mjs";
36
- import { ElementIntersectionObserverCallback, UseElementIntersectionObserverOptions, UseElementIntersectionObserverReturn, useElementIntersectionObserver } from "./runtime/elementIntersectionObserver.mjs";
37
- import { PageLayoutState, WevuPageLayoutMap } from "./runtime/pageLayout.mjs";
38
- import { LayoutHostBinding } from "./runtime/capabilities.mjs";
39
- import { LayoutBridgeInstance } from "./runtime/layoutBridge.mjs";
40
- import { registerPageLayoutBridge, registerRuntimeLayoutHosts, resolveLayoutBridge, resolveLayoutHost, resolveRuntimePageLayoutName, setPageLayout, syncRuntimePageLayoutState, syncRuntimePageLayoutStateFromRuntime, unregisterPageLayoutBridge, unregisterRuntimeLayoutHosts, useLayoutBridge, useLayoutHosts, usePageLayout, waitForLayoutHost } from "./runtime/features/publicLayout.mjs";
41
- import { callHookList, callHookReturn, getCurrentInstance, getCurrentSetupContext, setCurrentInstance, setCurrentSetupContext } from "./runtime/hooks/base.mjs";
42
- import { onAddToFavorites, onAttached, onDetached, onError, onHide, onLaunch, onLoad, onMemoryWarning, onMoved, onPageNotFound, onPageScroll, onPullDownRefresh, onReachBottom, onReady, onResize, onRouteDone, onSaveExitState, onShareAppMessage, onShareTimeline, onShow, onTabItemTap, onThemeChange, onUnhandledRejection, onUnload } from "./runtime/hooks/register.mjs";
43
- import { callUpdateHooks, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onServerPrefetch, onUnmounted, onUpdated } from "./runtime/hooks/vue.mjs";
44
- import { UseIntersectionObserverOptions, UseIntersectionObserverResult, useIntersectionObserver } from "./runtime/intersectionObserver.mjs";
45
- import { isNoSetData, markNoSetData } from "./runtime/noSetData.mjs";
46
- import { NavigationBarMetrics, PageStackSnapshot, UseNavigationBarMetricsOptions, UsePageStackOptions, getCurrentPageStackSnapshot, getNavigationBarMetrics, useNavigationBarMetrics, usePageStack } from "./runtime/pageEnvironment.mjs";
47
- import { UsePageScrollThrottleOptions, UsePageScrollThrottleStopHandle, usePageScrollThrottle } from "./runtime/pageScroll.mjs";
48
- import { setGlobalProvidedValue } from "./runtime/provideStore.mjs";
49
- import { hasInjectionContext, inject, injectGlobal, provide, provideGlobal } from "./runtime/provide.mjs";
50
- import { setRuntimeSetDataVisibility, teardownRuntimeInstance } from "./runtime/register/runtimeInstance.mjs";
51
- import { runSetupFunction } from "./runtime/register/setup.mjs";
52
- import { createApp, createWevuComponent, createWevuScopedSlotComponent, defineComponent, mountRuntimeInstance, registerApp, registerComponent, setWevuDefaults } from "./runtime/publicRuntime.mjs";
53
- import { PullDownRefreshHandler, UseAsyncPullDownRefreshOptions, useAsyncPullDownRefresh } from "./runtime/pullDownRefresh.mjs";
54
- import { UseAllBoundingClientRectOptions, UseAllScrollOffsetOptions, UseAllSelectorFieldsOptions, UseBoundingClientRectOptions, UseScrollOffsetOptions, UseSelectorFieldsOptions, UseSelectorQueryOptions, useBoundingClientRect, useScrollOffset, useSelectorFields, useSelectorQuery } from "./runtime/selectorQuery.mjs";
55
- import { normalizeClass, normalizeStyle, resolvePropValue } from "./runtime/template.mjs";
56
- import { UpdatePerformanceListener, UpdatePerformanceListenerResult, UseUpdatePerformanceListenerStopHandle, useUpdatePerformanceListener } from "./runtime/updatePerformance.mjs";
57
- import { defineAppSetup, use } from "./runtime/use.mjs";
58
- import { useAttrs, useNativeInstance, useSlots } from "./runtime/vueCompat/context.mjs";
59
- import { ModelModifiers, UseModelOptions, mergeModels, useBindModel, useChangeModel, useModel } from "./runtime/vueCompat/model.mjs";
60
- import { useNativePageRouter, useNativeRouter } from "./runtime/vueCompat/router.mjs";
61
- import { TemplateRef, useTemplateRef } from "./runtime/vueCompat/templateRef.mjs";
62
- import "./runtime/index.mjs";
63
- import { ComponentTypeEmits, EmitFn, EmitsOptions } from "./macros/shared.mjs";
64
- import { DefineModelModifiers, DefineModelTransformOptions, ModelRef, PageLayoutMeta, PageMeta, defineEmits, defineExpose, defineModel, defineOptions, definePageMeta, defineProps, defineSlots, withDefaults } from "./macros.mjs";
65
- import { ActionContext, ActionSubscriber, DefineStoreOptions, MutationType, StoreManager, StoreSubscribeOptions, SubscriptionCallback } from "./store/types.mjs";
66
- import { defineStore } from "./store/define.mjs";
67
- import { createStore } from "./store/manager.mjs";
68
- import { StoreToRefsResult, storeToRefs } from "./store/storeToRefs.mjs";
69
- import "./store.mjs";
70
- import { version } from "./version.mjs";
71
- export * from "@wevu/web-apis";
72
- export { type ActionContext, type ActionSubscriber, type AlipayMiniProgramHostNamespace, type AlipayMiniProgramHostSourceContract, type AllowedComponentProps, type AppConfig, type AsyncDerivation, type AsyncDerivationContext, type AsyncDerivationState, type AsyncDerivationStatus, type ComponentCustomProps, type ComponentDefinition, type ComponentOptionsMixin, type ComponentPropsOptions, type ComponentPublicInstance, type ComponentTypeEmits, type ComputedDefinitions, type ComputedGetter, type ComputedRef, type ComputedSetter, type CreateAppOptions, type CustomRefFactory, type CustomRefOptions, type CustomRefSource, type DataOption, type DefaultMiniProgramHostNamespace, type DefaultMiniProgramHostSourceContract, type DefineAppOptions, type DefineComponent, type DefineComponentOptions, type DefineComponentTypePropsOptions, type DefineComponentWithTypeProps, DefineModelModifiers, DefineModelTransformOptions, type DefineStoreOptions, DisposableBag, DisposableLike, DisposableMethodName, DisposableObject, type DouyinMiniProgramHostNamespace, type DouyinMiniProgramHostSourceContract, type EffectScope, ElementIntersectionObserverCallback, type EmitFn, type EmitsOptions, type ExtractComputed, type ExtractDefaultPropTypes, type ExtractMethods, type ExtractPropTypes, type ExtractPublicPropTypes, GlobalComponents, GlobalDirectives, type HostMiniProgramAddToFavoritesOption, type HostMiniProgramAppOptions, type HostMiniProgramAppTrivialInstance, type HostMiniProgramBehaviorIdentifier, type HostMiniProgramBoundingClientRectResult, type HostMiniProgramComponentAllFullProperty, type HostMiniProgramComponentAllProperty, type HostMiniProgramComponentBehaviorOptions, type HostMiniProgramComponentEmptyArray, type HostMiniProgramComponentInstance, type HostMiniProgramComponentMethodOption, type HostMiniProgramComponentPropertyOption, type HostMiniProgramComponentPropertyValue, type HostMiniProgramComponentShortProperty, type HostMiniProgramComponentTrivialInstance, type HostMiniProgramComponentTrivialOption, type HostMiniProgramIntersectionObserver, type HostMiniProgramIntersectionObserverOptions, type HostMiniProgramLaunchOptions, type HostMiniProgramMemoryWarningResult, type HostMiniProgramNavigateToOption, type HostMiniProgramNodesRef, type HostMiniProgramNodesRefFields, type HostMiniProgramPageLifetime, type HostMiniProgramPageNotFoundOptions, type HostMiniProgramPageResizeOption, type HostMiniProgramPageScrollOption, type HostMiniProgramPageTrivialInstance, type HostMiniProgramReLaunchOption, type HostMiniProgramRedirectToOption, type HostMiniProgramRouter, type HostMiniProgramSaveExitState, type HostMiniProgramScrollOffsetResult, type HostMiniProgramSelectorQuery, type HostMiniProgramShareAppMessageOption, type HostMiniProgramSwitchTabOption, type HostMiniProgramTabItemTapOption, type HostMiniProgramThemeChangeResult, type HostMiniProgramTriggerEventOptions, type HostMiniProgramUnhandledRejectionResult, type InferNativePropType, type InferNativeProps, type InferPropType, type InferProps, type InternalRuntimeState, type InternalRuntimeStateFields, type LayoutBridgeInstance, type LayoutHostBinding, type MapSources, type MaybeRef, type MaybeRefOrGetter, type MaybeUndefined, type MethodDefinitions, type MiniProgramAdapter, type HostMiniProgramAddToFavoritesOption as MiniProgramAddToFavoritesOption, type MiniProgramAppOptions, type MiniProgramBehaviorIdentifier, type HostMiniProgramBoundingClientRectResult as MiniProgramBoundingClientRectResult, type HostMiniProgramComponentAllFullProperty as MiniProgramComponentAllFullProperty, type HostMiniProgramComponentAllProperty as MiniProgramComponentAllProperty, type HostMiniProgramComponentBehaviorOptions as MiniProgramComponentBehaviorOptions, type HostMiniProgramComponentEmptyArray as MiniProgramComponentEmptyArray, type MiniProgramComponentInstance, type HostMiniProgramComponentMethodOption as MiniProgramComponentMethodOption, type MiniProgramComponentOptions, type HostMiniProgramComponentPropertyOption as MiniProgramComponentPropertyOption, type MiniProgramComponentPropertyValue, type MiniProgramComponentRawOptions, type HostMiniProgramComponentShortProperty as MiniProgramComponentShortProperty, type MiniProgramHostNamespace, type MiniProgramHostNamespaceBySource, type MiniProgramHostSourceName, type MiniProgramHostSourceRegistry, type MiniProgramInstance, type HostMiniProgramIntersectionObserver as MiniProgramIntersectionObserver, type HostMiniProgramIntersectionObserverOptions as MiniProgramIntersectionObserverOptions, type HostMiniProgramLaunchOptions as MiniProgramLaunchOptions, type HostMiniProgramMemoryWarningResult as MiniProgramMemoryWarningResult, type HostMiniProgramNavigateToOption as MiniProgramNavigateToOption, type HostMiniProgramNodesRef as MiniProgramNodesRef, type HostMiniProgramNodesRefFields as MiniProgramNodesRefFields, type HostMiniProgramPageLifetime as MiniProgramPageLifetime, type MiniProgramPageLifetimes, type HostMiniProgramPageNotFoundOptions as MiniProgramPageNotFoundOptions, type HostMiniProgramPageResizeOption as MiniProgramPageResizeOption, type HostMiniProgramPageScrollOption as MiniProgramPageScrollOption, type MiniProgramPlatformHostNamespaceBySource, type MiniProgramPlatformHostSourceName, type MiniProgramPlatformHostSourceRegistry, type HostMiniProgramReLaunchOption as MiniProgramReLaunchOption, type HostMiniProgramRedirectToOption as MiniProgramRedirectToOption, type HostMiniProgramRouter as MiniProgramRouter, type MiniProgramRouterNavigateToOption, type MiniProgramRouterReLaunchOption, type MiniProgramRouterRedirectToOption, type MiniProgramRouterSwitchTabOption, type MiniProgramRuntimeHostNamespaceBySource, type MiniProgramRuntimeHostSourceName, type MiniProgramRuntimeHostSourceRegistry, type HostMiniProgramSaveExitState as MiniProgramSaveExitState, type HostMiniProgramScrollOffsetResult as MiniProgramScrollOffsetResult, type HostMiniProgramSelectorQuery as MiniProgramSelectorQuery, type HostMiniProgramShareAppMessageOption as MiniProgramShareAppMessageOption, type HostMiniProgramSwitchTabOption as MiniProgramSwitchTabOption, type HostMiniProgramTabItemTapOption as MiniProgramTabItemTapOption, MiniProgramTemplateRefValue, type HostMiniProgramThemeChangeResult as MiniProgramThemeChangeResult, type HostMiniProgramUnhandledRejectionResult as MiniProgramUnhandledRejectionResult, type ModelBinding, type ModelBindingOptions, type ModelBindingPayload, type ModelModifiers, ModelRef, type MultiWatchSources, type MutationKind, type MutationOp, type MutationRecord, type MutationType, type NativeComponent, type NativePropType, type NativePropsOptions, type NativeTypeHint, type NativeTypedProperty, NavigationBarMetrics, type ObjectDirective, type OnCleanup, type PageFeatures, PageLayoutMeta, type PageLayoutState, PageMeta, PageStackSnapshot, type PrelinkReactiveTreeOptions, type PropConstructor, type PropOptions, type PropType, type PublicProps, PullDownRefreshHandler, type Ref, type RuntimeApp, type RuntimeInstance, type SetDataBindingDiagnostic, type SetDataDebugInfo, type SetDataSnapshotOptions, type SetupContext, type SetupContextIntersectionObserver, type SetupContextIntersectionObserverOptions, type SetupContextNativeInstance, type SetupContextRouter, type SetupContextSelectorQuery, type SetupContextWithTypeProps, type SetupFunction, type SetupFunctionWithTypeProps, type ShallowRef, type ShallowUnwrapRef, type StoreManager, type StoreSubscribeOptions, type StoreToRefsResult, type SubscriptionCallback, type TemplateRef, TemplateRefValue, TemplateRefs, type ToRefs, type HostMiniProgramTriggerEventOptions as TriggerEventOptions, type TtMiniProgramHostNamespace, type TtMiniProgramHostSourceContract, UpdatePerformanceListener, UpdatePerformanceListenerResult, UseAllBoundingClientRectOptions, UseAllScrollOffsetOptions, UseAllSelectorFieldsOptions, type UseAsyncDerivationOptions, UseAsyncPullDownRefreshOptions, UseBoundingClientRectOptions, UseElementIntersectionObserverOptions, UseElementIntersectionObserverReturn, UseIntersectionObserverOptions, UseIntersectionObserverResult, type UseModelOptions, UseNavigationBarMetricsOptions, UsePageScrollThrottleOptions, UsePageScrollThrottleStopHandle, UsePageStackOptions, UseScrollOffsetOptions, UseSelectorFieldsOptions, UseSelectorQueryOptions, UseUpdatePerformanceListenerStopHandle, type VNode, type VNodeProps, type WatchCallback, type WatchEffect, type WatchEffectOptions, type WatchMultiSources, type WatchOptions, type WatchScheduler, type WatchSource, type WatchSourceValue, type WatchSources, type WatchStopHandle, type WechatMiniProgramHostNamespace, type WechatMiniProgramHostSourceContract, type WevuComponentConstructor, type WevuDefaults, type WevuDefinedComponent, WevuGlobalComponents, WevuGlobalDirectives, type WevuPageLayoutMap, type WevuPlugin, type WevuTypedRouterRouteMap, type WritableComputedOptions, type WritableComputedRef, addMutationRecorder, batch, callHookList, callHookReturn, callUpdateHooks, computed, createApp, createStore, createWevuComponent, createWevuScopedSlotComponent, customRef, defineAppSetup, defineComponent, defineEmits, defineExpose, defineModel, defineOptions, definePageMeta, defineProps, defineSlots, defineStore, effect, effectScope, endBatch, getCurrentInstance, getCurrentPageStackSnapshot, getCurrentScope, getCurrentSetupContext, getDeepWatchStrategy, getNavigationBarMetrics, getReactiveVersion, hasInjectionContext, inject, injectGlobal, isNoSetData, isProxy, isRaw, isReactive, isReadonly, isRef, isShallowReactive, isShallowRef, markNoSetData, markRaw, mergeModels, mountRuntimeInstance, nextTick, normalizeClass, normalizeStyle, onActivated, onAddToFavorites, onAttached, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onDetached, onError, onErrorCaptured, onHide, onLaunch, onLoad, onMemoryWarning, onMounted, onMoved, onPageNotFound, onPageScroll, onPullDownRefresh, onReachBottom, onReady, onResize, onRouteDone, onSaveExitState, onScopeDispose, onServerPrefetch, onShareAppMessage, onShareTimeline, onShow, onTabItemTap, onThemeChange, onUnhandledRejection, onUnload, onUnmounted, onUpdated, prelinkReactiveTree, provide, provideGlobal, reactive, readonly, ref, registerApp, registerComponent, registerPageLayoutBridge, registerRuntimeLayoutHosts, removeMutationRecorder, resetWevuDefaults, resolveLayoutBridge, resolveLayoutHost, resolvePropValue, resolveRuntimePageLayoutName, runSetupFunction, setCurrentInstance, setCurrentSetupContext, setDeepWatchStrategy, setGlobalProvidedValue, setPageLayout, setRuntimeSetDataVisibility, setWevuDefaults, shallowReactive, shallowReadonly, shallowRef, startBatch, stop, storeToRefs, syncRuntimePageLayoutState, syncRuntimePageLayoutStateFromRuntime, teardownRuntimeInstance, toRaw, toRef, toRefs, toValue, touchReactive, traverse, triggerRef, unref, unregisterPageLayoutBridge, unregisterRuntimeLayoutHosts, use, useAsyncDerivation, useAsyncPullDownRefresh, useAttrs, useBindModel, useBoundingClientRect, useChangeModel, useCssModule, useDisposables, useElementIntersectionObserver, useIntersectionObserver, useLayoutBridge, useLayoutHosts, useModel, useNativeInstance, useNativePageRouter, useNativeRouter, useNavigationBarMetrics, usePageLayout, usePageScrollThrottle, usePageStack, useScrollOffset, useSelectorFields, useSelectorQuery, useSlots, useTemplateRef, useUpdatePerformanceListener, version, waitForLayoutHost, watch, watchEffect, watchPostEffect, watchSyncEffect, withDefaults };
@@ -1,18 +0,0 @@
1
- import { AsyncDerivation, AsyncDerivationContext, AsyncDerivationState, AsyncDerivationStatus, UseAsyncDerivationOptions, useAsyncDerivation } from "./reactivity/asyncDerivation.mjs";
2
- import { CustomRefFactory, CustomRefOptions, CustomRefSource, MaybeRef, MaybeRefOrGetter, Ref, ShallowRef, customRef, isRef, ref, toValue, unref } from "./reactivity/ref.mjs";
3
- import { ComputedGetter, ComputedRef, ComputedSetter, WritableComputedOptions, WritableComputedRef, computed } from "./reactivity/computed.mjs";
4
- import { nextTick } from "./scheduler.mjs";
5
- import { EffectScope, batch, effect, effectScope, endBatch, getCurrentScope, onScopeDispose, startBatch, stop } from "./reactivity/core.mjs";
6
- import { MutationKind, MutationOp, MutationRecord, addMutationRecorder, removeMutationRecorder } from "./reactivity/reactive/mutation.mjs";
7
- import { PrelinkReactiveTreeOptions, prelinkReactiveTree, touchReactive } from "./reactivity/reactive/patch.mjs";
8
- import { isShallowReactive, shallowReactive } from "./reactivity/reactive/shallow.mjs";
9
- import { toRaw } from "./reactivity/reactive/shared.mjs";
10
- import { getReactiveVersion, isRaw, isReactive, markRaw, reactive } from "./reactivity/reactive.mjs";
11
- import { isProxy, isReadonly, readonly, shallowReadonly } from "./reactivity/readonly.mjs";
12
- import { isShallowRef, shallowRef, triggerRef } from "./reactivity/shallowRef.mjs";
13
- import { ToRefs, toRef, toRefs } from "./reactivity/toRefs.mjs";
14
- import { traverse } from "./reactivity/traverse.mjs";
15
- import { MapSources, MaybeUndefined, MultiWatchSources, OnCleanup, WatchCallback, WatchEffect, WatchEffectOptions, WatchMultiSources, WatchOptions, WatchScheduler, WatchSource, WatchSourceValue, WatchSources, WatchStopHandle, getDeepWatchStrategy, setDeepWatchStrategy } from "./reactivity/watch/types.mjs";
16
- import { watch, watchEffect, watchPostEffect, watchSyncEffect } from "./reactivity/watch.mjs";
17
- import "./reactivity/index.mjs";
18
- export { type AsyncDerivation, type AsyncDerivationContext, type AsyncDerivationState, type AsyncDerivationStatus, type ComputedGetter, type ComputedRef, type ComputedSetter, type CustomRefFactory, type CustomRefOptions, type CustomRefSource, type EffectScope, type MapSources, type MaybeRef, type MaybeRefOrGetter, type MaybeUndefined, type MultiWatchSources, type MutationKind, type MutationOp, type MutationRecord, type OnCleanup, type PrelinkReactiveTreeOptions, type Ref, type ShallowRef, type ToRefs, type UseAsyncDerivationOptions, type WatchCallback, type WatchEffect, type WatchEffectOptions, type WatchMultiSources, type WatchOptions, type WatchScheduler, type WatchSource, type WatchSourceValue, type WatchSources, type WatchStopHandle, type WritableComputedOptions, type WritableComputedRef, addMutationRecorder, batch, computed, customRef, effect, effectScope, endBatch, getCurrentScope, getDeepWatchStrategy, getReactiveVersion, isProxy, isRaw, isReactive, isReadonly, isRef, isShallowReactive, isShallowRef, markRaw, nextTick, onScopeDispose, prelinkReactiveTree, reactive, readonly, ref, removeMutationRecorder, setDeepWatchStrategy, shallowReactive, shallowReadonly, shallowRef, startBatch, stop, toRaw, toRef, toRefs, toValue, touchReactive, traverse, triggerRef, unref, useAsyncDerivation, watch, watchEffect, watchPostEffect, watchSyncEffect };