wevu 6.12.4 → 6.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -1,1496 +1,4 @@
1
- import { t as WeappIntrinsicElements } from "./weappIntrinsicElements-BKiRK0cC.mjs";
2
- import { $ as PropOptions, A as CustomRefSource, B as ComponentPropsOptions, C as ComputedRef, D as computed, E as WritableComputedRef, F as customRef, G as InferNativeProps, H as ExtractPropTypes, I as isRef, J as NativePropType, K as InferPropType, L as ref, M as MaybeRefOrGetter, N as Ref, O as CustomRefFactory, P as ShallowRef, Q as PropConstructor, R as toValue, S as ComputedGetter, T as WritableComputedOptions, U as ExtractPublicPropTypes, V as ExtractDefaultPropTypes, W as InferNativePropType, X as NativeTypeHint, Y as NativePropsOptions, Z as NativeTypedProperty, _ as ObjectDirective, a as ActionContext, b as VNode, c as MutationType, d as SubscriptionCallback, et as PropType, f as AllowedComponentProps, g as NativeComponent, h as DefineComponent, i as defineStore, j as MaybeRef, k as CustomRefOptions, l as StoreManager, m as ComponentOptionsMixin, n as storeToRefs, o as ActionSubscriber, p as ComponentCustomProps, q as InferProps, r as createStore, s as DefineStoreOptions, t as StoreToRefsResult, u as StoreSubscribeOptions, v as PublicProps, w as ComputedSetter, x as VNodeProps, y as ShallowUnwrapRef, z as unref } from "./index-Ciz2Ye1L.mjs";
3
- import { a as SetupContextRouter, c as WevuTypedRouterRouteMap } from "./router-BxV0btOX.mjs";
4
-
5
- //#region src/scheduler.d.ts
6
- declare function nextTick<T>(fn?: () => T): Promise<T>;
7
- //#endregion
8
- //#region src/reactivity/core.d.ts
9
- type EffectScheduler = () => void;
10
- type Dep = Set<ReactiveEffect>;
11
- interface ReactiveEffect<T = any> {
12
- (): T;
13
- deps: Dep[];
14
- scheduler?: EffectScheduler;
15
- active: boolean;
16
- _running: boolean;
17
- _fn: () => T;
18
- onStop?: () => void;
19
- }
20
- declare function startBatch(): void;
21
- declare function endBatch(): void;
22
- declare function batch<T>(fn: () => T): T;
23
- declare function stop(runner: ReactiveEffect): void;
24
- interface EffectScope {
25
- active: boolean;
26
- effects: ReactiveEffect[];
27
- cleanups: (() => void)[];
28
- run: <T>(fn: () => T) => T | undefined;
29
- stop: () => void;
30
- }
31
- declare function effectScope(detached?: boolean): EffectScope;
32
- declare function getCurrentScope(): EffectScope | undefined;
33
- declare function onScopeDispose(fn: () => void): void;
34
- interface EffectOptions {
35
- scheduler?: EffectScheduler;
36
- lazy?: boolean;
37
- onStop?: () => void;
38
- }
39
- declare function effect<T = any>(fn: () => T, options?: EffectOptions): ReactiveEffect<T>;
40
- //#endregion
41
- //#region src/reactivity/reactive/mutation.d.ts
42
- type MutationOp = 'set' | 'delete';
43
- type MutationKind = 'property' | 'array';
44
- interface MutationRecord {
45
- root: object;
46
- kind: MutationKind;
47
- op: MutationOp;
48
- /**
49
- * 点路径(例如 `a.b.c`);当路径不可靠时为 undefined。
50
- */
51
- path?: string;
52
- /**
53
- * 当路径不唯一时回退使用的顶层键列表。
54
- */
55
- fallbackTopKeys?: string[];
56
- }
57
- type MutationRecorder = (record: MutationRecord) => void;
58
- declare function addMutationRecorder(recorder: MutationRecorder): void;
59
- declare function removeMutationRecorder(recorder: MutationRecorder): void;
60
- //#endregion
61
- //#region src/reactivity/reactive/patch.d.ts
62
- interface PrelinkReactiveTreeOptions {
63
- shouldIncludeTopKey?: (key: string) => boolean;
64
- maxDepth?: number;
65
- maxKeys?: number;
66
- }
67
- /**
68
- * 预链接响应式树结构,供运行时差量路径追踪使用。
69
- * @internal
70
- */
71
- declare function prelinkReactiveTree(root: object, options?: PrelinkReactiveTreeOptions): void;
72
- /**
73
- * 让 effect 订阅整个对象的“版本号”,无需深度遍历即可对任何字段变化做出响应。
74
- * @internal
75
- */
76
- declare function touchReactive(target: object): void;
77
- //#endregion
78
- //#region src/reactivity/reactive/shallow.d.ts
79
- /**
80
- * 创建一个浅层响应式代理:仅跟踪第一层属性变更,不深度递归嵌套对象。
81
- *
82
- * @param target 待转换的对象
83
- * @returns 浅层响应式代理
84
- *
85
- * @example
86
- * ```ts
87
- * const state = shallowReactive({ nested: { count: 0 } })
88
- *
89
- * state.nested.count++ // 不会触发 effect(嵌套对象未深度代理)
90
- * state.nested = { count: 1 } // 会触发 effect(顶层属性变更)
91
- * ```
92
- */
93
- declare function shallowReactive<T extends object>(target: T): T;
94
- /**
95
- * 判断一个值是否为 shallowReactive 创建的浅层响应式对象
96
- */
97
- declare function isShallowReactive(value: unknown): boolean;
98
- //#endregion
99
- //#region src/reactivity/reactive/shared.d.ts
100
- declare function toRaw<T>(observed: T): T;
101
- //#endregion
102
- //#region src/reactivity/reactive.d.ts
103
- /**
104
- * 读取响应式版本号(框架内部调试能力)。
105
- * @internal
106
- */
107
- declare function getReactiveVersion(target: object): number;
108
- declare function reactive<T extends object>(target: T): T;
109
- declare function isReactive(value: unknown): boolean;
110
- /**
111
- * 标记对象为“原始”状态,后续不会被转换为响应式,返回原对象本身。
112
- *
113
- * @param value 需要标记的对象
114
- * @returns 带有跳过标记的原对象
115
- *
116
- * @example
117
- * ```ts
118
- * const foo = markRaw({
119
- * nested: {}
120
- * })
121
- *
122
- * const state = reactive({
123
- * foo
124
- * })
125
- *
126
- * state.foo // 不是响应式对象
127
- * ```
128
- */
129
- declare function markRaw<T extends object>(value: T): T;
130
- /**
131
- * 判断某个值是否被标记为原始(即不应转换为响应式)。
132
- *
133
- * @param value 待检测的值
134
- * @returns 若含有跳过标记则返回 true
135
- */
136
- declare function isRaw(value: unknown): boolean;
137
- //#endregion
138
- //#region src/reactivity/readonly.d.ts
139
- /**
140
- * readonly 会为对象/数组创建一个“浅层”只读代理,并为 Ref 创建只读包装。
141
- * 选择浅层而非深层递归,是为了在小程序环境中保持实现和运行时开销最小,
142
- * 仅阻止直接属性写入/删除,嵌套对象仍按原样透传。
143
- */
144
- declare function readonly<T extends object>(target: T): T;
145
- declare function readonly<T>(target: Ref<T>): Readonly<Ref<T>>;
146
- /**
147
- * 与 Vue 3 的 `shallowReadonly()` 对齐。
148
- *
149
- * 当前 wevu 的只读语义本身就是浅层只读,因此这里直接复用同一套实现,
150
- * 让依赖 Vue 兼容 API 的代码可以无缝迁移。
151
- */
152
- declare function shallowReadonly<T extends object>(target: T): Readonly<T>;
153
- declare function shallowReadonly<T>(target: Ref<T>): Readonly<Ref<T>>;
154
- //#endregion
155
- //#region src/reactivity/shallowRef.d.ts
156
- declare function shallowRef<T>(value: T): Ref<T>;
157
- declare function shallowRef<T>(value: T, defaultValue: T): Ref<T>;
158
- /**
159
- * 判断传入值是否为浅层 ref。
160
- *
161
- * @param r 待判断的值
162
- * @returns 若为浅层 ref 则返回 true
163
- */
164
- declare function isShallowRef(r: any): r is Ref<any>;
165
- /**
166
- * 主动触发一次浅层 ref 的更新(无需深度比较)。
167
- *
168
- * @param ref 需要触发的 ref
169
- */
170
- declare function triggerRef<T>(ref: Ref<T>): void;
171
- //#endregion
172
- //#region src/reactivity/toRefs.d.ts
173
- /**
174
- * 为源响应式对象的单个属性创建 ref,可读可写并与原属性保持同步。
175
- *
176
- * @param object 源响应式对象
177
- * @param key 属性名
178
- * @returns 指向该属性的 ref
179
- *
180
- * @example
181
- * ```ts
182
- * const state = reactive({ foo: 1 })
183
- * const fooRef = toRef(state, 'foo')
184
- *
185
- * fooRef.value++
186
- * console.log(state.foo) // 2
187
- * ```
188
- */
189
- declare function toRef<T extends object, K extends keyof T>(object: T, key: K): ToRef<T[K]>;
190
- declare function toRef<T extends object, K extends keyof T>(object: T, key: K, defaultValue: T[K]): ToRef<T[K]>;
191
- /**
192
- * 将一个响应式对象转换成“同结构的普通对象”,其中每个字段都是指向原对象对应属性的 ref。
193
- *
194
- * @param object 待转换的响应式对象
195
- * @returns 包含若干 ref 的普通对象
196
- *
197
- * @example
198
- * ```ts
199
- * const state = reactive({ foo: 1, bar: 2 })
200
- * const stateAsRefs = toRefs(state)
201
- *
202
- * stateAsRefs.foo.value++ // 2
203
- * state.foo // 2
204
- * ```
205
- */
206
- declare function toRefs<T extends object>(object: T): ToRefs<T>;
207
- /**
208
- * toRefs 返回值的类型辅助
209
- */
210
- type ToRef<T> = T extends Ref<any> ? T : Ref<T>;
211
- type ToRefs<T extends object> = { [K in keyof T]: ToRef<T[K]> };
212
- //#endregion
213
- //#region src/reactivity/traverse.d.ts
214
- /**
215
- * 深度遍历工具(框架内部依赖收集使用)。
216
- * @internal
217
- */
218
- declare function traverse(value: any, depth?: number, seen?: Map<object, number>): any;
219
- //#endregion
220
- //#region src/reactivity/watch/types.d.ts
221
- type OnCleanup = (cleanupFn: () => void) => void;
222
- type WatchEffect = (onCleanup: OnCleanup) => void;
223
- type WatchSource<T = any> = Ref<T> | ComputedRef<T> | (() => T);
224
- type WatchCallback<V = any, OV = any> = (value: V, oldValue: OV, onCleanup: OnCleanup) => void;
225
- type WatchScheduler = (job: () => void, isFirstRun: boolean) => void;
226
- type MaybeUndefined<T, Immediate> = Immediate extends true ? T | undefined : T;
227
- type MultiWatchSources = (WatchSource<unknown> | object)[];
228
- type MapSources<T, Immediate> = { [K in keyof T]: T[K] extends WatchSource<infer V> ? MaybeUndefined<V, Immediate> : T[K] extends object ? MaybeUndefined<T[K], Immediate> : never };
229
- type WatchSourceValue<S> = S extends WatchSource<infer V> ? V : S extends object ? S : never;
230
- type WatchSources<T = any> = WatchSource<T> | ReadonlyArray<WatchSource<unknown> | object> | (T extends object ? T : never);
231
- type IsTuple<T extends ReadonlyArray<any>> = number extends T['length'] ? false : true;
232
- type WatchMultiSources<T extends ReadonlyArray<WatchSource<unknown> | object>> = IsTuple<T> extends true ? { [K in keyof T]: WatchSourceValue<T[K]> } : Array<WatchSourceValue<T[number]>>;
233
- interface WatchEffectOptions {
234
- flush?: 'pre' | 'post' | 'sync';
235
- }
236
- interface WatchOptions<Immediate extends boolean = false> extends WatchEffectOptions {
237
- immediate?: Immediate;
238
- deep?: boolean | number;
239
- once?: boolean;
240
- scheduler?: WatchScheduler;
241
- }
242
- interface WatchStopHandle {
243
- (): void;
244
- stop: () => void;
245
- pause: () => void;
246
- resume: () => void;
247
- }
248
- type DeepWatchStrategy = 'version' | 'traverse';
249
- /**
250
- * 设置深度 watch 内部策略(测试/框架内部使用)。
251
- * @internal
252
- */
253
- declare function setDeepWatchStrategy(strategy: DeepWatchStrategy): void;
254
- /**
255
- * 获取深度 watch 内部策略(测试/框架内部使用)。
256
- * @internal
257
- */
258
- declare function getDeepWatchStrategy(): DeepWatchStrategy;
259
- //#endregion
260
- //#region src/reactivity/watch.d.ts
261
- declare function watch<T, Immediate extends Readonly<boolean> = false>(source: WatchSource<T>, cb: WatchCallback<T, MaybeUndefined<T, Immediate>>, options?: WatchOptions<Immediate>): WatchStopHandle;
262
- declare function watch<T extends object, Immediate extends Readonly<boolean> = false>(source: T extends ReadonlyArray<any> ? never : T, cb: WatchCallback<T, MaybeUndefined<T, Immediate>>, options?: WatchOptions<Immediate>): WatchStopHandle;
263
- declare function watch<T extends Readonly<MultiWatchSources>, Immediate extends Readonly<boolean> = false>(source: readonly [...T] | T, cb: WatchCallback<MapSources<T, false>, MapSources<T, Immediate>>, options?: WatchOptions<Immediate>): WatchStopHandle;
264
- declare function watch<T extends MultiWatchSources, Immediate extends Readonly<boolean> = false>(source: [...T], cb: WatchCallback<MapSources<T, false>, MapSources<T, Immediate>>, options?: WatchOptions<Immediate>): WatchStopHandle;
265
- /**
266
- * watchEffect 注册一个响应式副作用,可选清理函数。
267
- * 副作用会立即执行,并在依赖变化时重新运行。
268
- */
269
- declare function watchEffect(effectFn: WatchEffect, options?: WatchEffectOptions): WatchStopHandle;
270
- //#endregion
271
- //#region src/runtime/types/core.d.ts
272
- type ComputedDefinitions = Record<string, ComputedGetter<any> | WritableComputedOptions<any>>;
273
- type MethodDefinitions = Record<string, (...args: any[]) => any>;
274
- type ExtractComputed<C extends ComputedDefinitions> = { [K in keyof C]: C[K] extends ComputedGetter<infer R> ? R : C[K] extends WritableComputedOptions<infer R> ? R : never };
275
- type ExtractMethods<M extends MethodDefinitions> = { [K in keyof M]: M[K] extends ((...args: infer P) => infer R) ? (...args: P) => R : never };
276
- type ComponentPublicInstance<D extends object = Record<string, any>, C extends ComputedDefinitions = ComputedDefinitions, M extends MethodDefinitions = MethodDefinitions, P = Record<string, any>, S = Record<string, any>> = D & ExtractComputed<C> & ExtractMethods<M> & {
277
- $attrs: Record<string, any>;
278
- $props: P;
279
- $slots: S;
280
- $emit: (event: string, ...args: any[]) => void;
281
- };
282
- interface ModelBindingOptions<T = any, Event extends string = string, ValueProp extends string = string, Formatted = T> {
283
- event?: Event;
284
- valueProp?: ValueProp;
285
- parser?: (payload: any) => T;
286
- formatter?: (value: T) => Formatted;
287
- }
288
- type ModelBindingPayload<T = any, Event extends string = 'input', ValueProp extends string = 'value', Formatted = T> = { [K in ValueProp]: Formatted } & { [K in `on${Capitalize<Event>}`]: (event: any) => void };
289
- interface ModelBinding<T = any> {
290
- value: T;
291
- update: (value: T) => void;
292
- model: <Event extends string = 'input', ValueProp extends string = 'value', Formatted = T>(options?: ModelBindingOptions<T, Event, ValueProp, Formatted>) => ModelBindingPayload<T, Event, ValueProp, Formatted>;
293
- }
294
- //#endregion
295
- //#region src/runtime/types/miniprogram.d.ts
296
- interface MiniProgramAdapter {
297
- setData?: (payload: Record<string, any>) => void | Promise<void>;
298
- }
299
- type MiniProgramComponentBehaviorOptions = WechatMiniprogram.Component.ComponentOptions;
300
- type MpComponentOptions = WechatMiniprogram.Component.TrivialOption;
301
- type MiniProgramBehaviorIdentifier = WechatMiniprogram.Behavior.Identifier | string;
302
- interface MiniProgramComponentOptions {
303
- /**
304
- * 类似于 mixins/traits 的组件间代码复用机制(behaviors)。
305
- */
306
- behaviors?: MiniProgramBehaviorIdentifier[];
307
- /**
308
- * 组件接受的外部样式类。
309
- */
310
- externalClasses?: MpComponentOptions['externalClasses'];
311
- /**
312
- * 组件间关系定义。
313
- */
314
- relations?: MpComponentOptions['relations'];
315
- /**
316
- * 组件数据字段监听器,用于监听 properties 和 data 的变化。
317
- */
318
- observers?: MpComponentOptions['observers'];
319
- /**
320
- * 组件生命周期声明对象:
321
- * `created`/`attached`/`ready`/`moved`/`detached`/`error`。
322
- *
323
- * 注意:wevu 会在 `attached/ready/detached/moved/error` 阶段做桥接与包装。
324
- * setup 默认在 `attached` 执行,可通过 `setupLifecycle = "created"` 切换回旧行为。
325
- */
326
- lifetimes?: MpComponentOptions['lifetimes'];
327
- /**
328
- * 组件所在页面的生命周期声明对象:`show`/`hide`/`resize`/`routeDone`。
329
- */
330
- pageLifetimes?: MpComponentOptions['pageLifetimes'];
331
- /**
332
- * 组件选项(multipleSlots/styleIsolation/pureDataPattern/virtualHost 等)。
333
- */
334
- options?: MpComponentOptions['options'];
335
- /**
336
- * 定义段过滤器,用于自定义组件扩展。
337
- */
338
- definitionFilter?: MpComponentOptions['definitionFilter'];
339
- /**
340
- * 组件自定义导出:当使用 `behavior: wx://component-export` 时,
341
- * 可用于指定组件被 selectComponent 调用时的返回值。
342
- *
343
- * wevu 默认会将 setup() 中通过 `expose()` 写入的内容作为 export() 返回值,
344
- * 因此大多数情况下无需手动编写 export();若同时提供 export(),则会与 expose() 结果浅合并。
345
- */
346
- export?: MpComponentOptions['export'];
347
- /**
348
- * 原生 properties(与 wevu 的 props 不同)。
349
- *
350
- * - 推荐:使用 wevu 的 `props` 选项,让运行时规范化为小程序 `properties`。
351
- * - 兼容:也可以直接传入小程序 `properties`。
352
- */
353
- properties?: MpComponentOptions['properties'];
354
- /**
355
- * 旧式生命周期(基础库 `2.2.3` 起推荐使用 `lifetimes` 字段)。
356
- * 保留以增强类型提示与兼容性。
357
- */
358
- created?: MpComponentOptions['created'];
359
- attached?: MpComponentOptions['attached'];
360
- ready?: MpComponentOptions['ready'];
361
- moved?: MpComponentOptions['moved'];
362
- detached?: MpComponentOptions['detached'];
363
- error?: MpComponentOptions['error'];
364
- }
365
- type MiniProgramAppOptions<T extends Record<string, any> = Record<string, any>> = WechatMiniprogram.App.Options<T>;
366
- type TriggerEventOptions = WechatMiniprogram.Component.TriggerEventOption;
367
- type MiniProgramInstance = WechatMiniprogram.Component.TrivialInstance | WechatMiniprogram.Page.TrivialInstance | WechatMiniprogram.App.TrivialInstance;
368
- type MiniProgramPageLifetimes = Partial<WechatMiniprogram.Page.ILifetime>;
369
- type MiniProgramComponentRawOptions = Omit<WechatMiniprogram.Component.TrivialOption, 'behaviors'> & {
370
- behaviors?: MiniProgramBehaviorIdentifier[];
371
- } & MiniProgramPageLifetimes & Record<string, any>;
372
- //#endregion
373
- //#region src/runtime/types/runtime.d.ts
374
- interface AppConfig {
375
- globalProperties: Record<string, any>;
376
- }
377
- type WevuPlugin = ((app: RuntimeApp<any, any, any>, ...options: any[]) => any) | {
378
- install: (app: RuntimeApp<any, any, any>, ...options: any[]) => any;
379
- };
380
- interface RuntimeApp<D extends object, C extends ComputedDefinitions, M extends MethodDefinitions> {
381
- mount: (adapter?: MiniProgramAdapter) => RuntimeInstance<D, C, M>;
382
- use: (plugin: WevuPlugin, ...options: any[]) => RuntimeApp<D, C, M>;
383
- config: AppConfig;
384
- }
385
- interface RuntimeInstance<D extends object, C extends ComputedDefinitions, M extends MethodDefinitions> {
386
- readonly state: D;
387
- readonly proxy: ComponentPublicInstance<D, C, M>;
388
- readonly methods: ExtractMethods<M>;
389
- readonly computed: Readonly<ExtractComputed<C>>;
390
- readonly adapter?: MiniProgramAdapter;
391
- bindModel: <T = any>(path: string, options?: ModelBindingOptions<T>) => ModelBinding<T>;
392
- watch: <T>(source: (() => T) | Record<string, any>, cb: (value: T, oldValue: T) => void, options?: WatchOptions) => WatchStopHandle;
393
- snapshot: () => Record<string, any>;
394
- unmount: () => void;
395
- }
396
- interface InternalRuntimeStateFields {
397
- __wevu?: RuntimeInstance<any, any, any>;
398
- __wevuSetPageLayout?: (layout: string | false, props?: Record<string, any>) => void;
399
- __wevuWatchStops?: WatchStopHandle[];
400
- __wevuLayoutHostBridge?: Record<string, any>;
401
- $wevu?: RuntimeInstance<any, any, any>;
402
- __wevuHooks?: Record<string, any>;
403
- __wevuExposed?: Record<string, any>;
404
- __wevuAttrs?: Record<string, any>;
405
- __wevuEffectScope?: EffectScope;
406
- __wevuPropKeys?: string[];
407
- __wevuTemplateRefs?: unknown[];
408
- __wevuTemplateRefMap?: Map<string, Ref<any>>;
409
- __wevuTemplateRefsPending?: boolean;
410
- }
411
- type InternalRuntimeState = InternalRuntimeStateFields & Partial<MiniProgramInstance>;
412
- //#endregion
413
- //#region src/runtime/types/props/setup.d.ts
414
- type SetupFunction<P extends ComponentPropsOptions, D extends object, C extends ComputedDefinitions, M extends MethodDefinitions, R extends Record<string, any> | void = Record<string, any> | void> = (props: InferProps<P>, ctx: SetupContext<D, C, M, P>) => R;
415
- type SetupContextNativeInstance = InternalRuntimeState & {
416
- /**
417
- * 派发组件事件(页面/应用场景下不可用时会安全降级为 no-op)
418
- */
419
- triggerEvent: (eventName: string, detail?: any, options?: TriggerEventOptions) => void;
420
- /**
421
- * 创建选择器查询对象(不可用时返回 undefined)
422
- */
423
- createSelectorQuery: () => WechatMiniprogram.SelectorQuery | undefined;
424
- /**
425
- * 创建交叉观察器(不可用时返回 undefined)
426
- */
427
- createIntersectionObserver: (options?: WechatMiniprogram.CreateIntersectionObserverOption) => WechatMiniprogram.IntersectionObserver | undefined;
428
- /**
429
- * 提交视图层更新
430
- */
431
- setData: (payload: Record<string, any>, callback?: () => void) => void | Promise<void> | undefined;
432
- /**
433
- * 监听组件更新性能统计(不可用时返回 undefined)
434
- */
435
- setUpdatePerformanceListener: (listener?: ((result: Record<string, any>) => void)) => void | undefined;
436
- /**
437
- * 相对于当前组件路径的 Router(基础库 2.16.1+)。
438
- * 低版本基础库可能不存在,建议优先使用 `useNativeRouter()` 获取带降级能力的路由对象。
439
- */
440
- router?: SetupContextRouter;
441
- /**
442
- * 相对于当前页面路径的 Router(基础库 2.16.1+)。
443
- * 低版本基础库可能不存在,建议优先使用 `useNativePageRouter()` 获取带降级能力的路由对象。
444
- */
445
- pageRouter?: SetupContextRouter;
446
- };
447
- interface SetupContext<D extends object, C extends ComputedDefinitions, M extends MethodDefinitions, P extends ComponentPropsOptions = ComponentPropsOptions> {
448
- /**
449
- * 组件 props(来自小程序 properties)
450
- */
451
- props: InferProps<P>;
452
- /**
453
- * 运行时实例
454
- */
455
- runtime: RuntimeInstance<D, C, M>;
456
- /**
457
- * 响应式状态
458
- */
459
- state: D;
460
- /**
461
- * 公开实例代理
462
- */
463
- proxy: RuntimeInstance<D, C, M>['proxy'];
464
- /**
465
- * 双向绑定辅助方法
466
- */
467
- bindModel: RuntimeInstance<D, C, M>['bindModel'];
468
- /**
469
- * watch 辅助方法
470
- */
471
- watch: RuntimeInstance<D, C, M>['watch'];
472
- /**
473
- * 小程序内部实例
474
- */
475
- instance: SetupContextNativeInstance;
476
- /**
477
- * 通过小程序 `triggerEvent(eventName, detail?, options?)` 派发事件。
478
- *
479
- * 为兼容 Vue 3 的 `emit(event, ...args)`:
480
- * - `emit(name)` -> `detail = undefined`
481
- * - `emit(name, payload)` -> `detail = payload`
482
- * - `emit(name, payload, options)`(当最后一个参数是事件选项)-> `detail = payload`
483
- * - `emit(name, a, b, c)` -> `detail = [a, b, c]`
484
- */
485
- emit: (event: string, ...args: any[]) => void;
486
- /**
487
- * Vue 3 对齐:expose 公共属性
488
- */
489
- expose: (exposed: Record<string, any>) => void;
490
- /**
491
- * Vue 3 对齐:attrs(小程序场景为非 props 属性集合)
492
- */
493
- attrs: Record<string, any>;
494
- /**
495
- * Vue 3 对齐:slots(小程序场景为只读空对象兜底,不提供可调用 slot 函数)
496
- */
497
- slots: Record<string, any>;
498
- }
499
- //#endregion
500
- //#region src/runtime/types/setData.d.ts
501
- interface SetDataSnapshotOptions {
502
- /**
503
- * 开发态高频 setData 告警。
504
- *
505
- * - `undefined`:默认关闭(可通过 `weapp.wevu.preset: 'performance'` 自动开启)
506
- * - `false`:关闭告警
507
- * - `true`:启用默认阈值(默认仅开发态生效)
508
- * - `object`:自定义阈值与开关
509
- */
510
- highFrequencyWarning?: boolean | {
511
- /**
512
- * 是否启用告警。
513
- * @default true
514
- */
515
- enabled?: boolean;
516
- /**
517
- * 是否仅在开发态生效。
518
- * @default true
519
- */
520
- devOnly?: boolean;
521
- /**
522
- * 统计窗口(毫秒)。
523
- * @default 1000
524
- */
525
- sampleWindowMs?: number;
526
- /**
527
- * 窗口内超过该次数触发告警。
528
- * @default 30
529
- */
530
- maxCalls?: number;
531
- /**
532
- * 告警冷却时间(毫秒),避免刷屏。
533
- * @default 5000
534
- */
535
- coolDownMs?: number;
536
- /**
537
- * 是否在检测到 `onPageScroll` 回调内调用 setData 时输出专项告警。
538
- * @default true
539
- */
540
- warnOnPageScroll?: boolean;
541
- /**
542
- * `onPageScroll` 专项告警冷却时间(毫秒)。
543
- * @default 2000
544
- */
545
- pageScrollCoolDownMs?: number;
546
- };
547
- /**
548
- * setData 策略:
549
- * - diff:全量快照 + diff(默认,兼容性最好)
550
- * - patch:按变更路径增量产出 payload(性能更好;在共享引用等场景会自动回退 diff)
551
- */
552
- strategy?: 'diff' | 'patch';
553
- /**
554
- * 仅下发指定的顶层字段(包含 data/setup 返回值与 computed)。
555
- * 若为空则默认下发所有字段。
556
- */
557
- pick?: string[];
558
- /**
559
- * 排除指定的顶层字段(包含 data/setup 返回值与 computed)。
560
- */
561
- omit?: string[];
562
- /**
563
- * 是否将 computed 的结果参与 setData(默认 true)。
564
- */
565
- includeComputed?: boolean;
566
- /**
567
- * 页面/组件处于后台态(onHide 之后)时,是否挂起 setData 下发。
568
- *
569
- * - true:后台态仅合并最新 payload,待 onShow 后一次性 flush
570
- * - false:保持默认行为,后台态也继续 setData
571
- *
572
- * @default false
573
- */
574
- suspendWhenHidden?: boolean;
575
- /**
576
- * patch 模式阈值:当本轮变更路径数量超过该值时,自动回退到 diff。
577
- * 说明:大量路径变更时,全量快照 diff 往往更快/更小。
578
- */
579
- maxPatchKeys?: number;
580
- /**
581
- * patch 模式阈值:当本轮 payload 估算字节数超过该值时,自动回退到 diff。
582
- * 说明:该估算基于 `JSON.stringify(payload).length`,仅用于启发式降级。
583
- */
584
- maxPayloadBytes?: number;
585
- /**
586
- * patch 模式优化:当同一父路径下存在多个子路径变更时,合并为父路径整体下发。
587
- *
588
- * 例如:`a.b` 与 `a.c` 同时变更,且 `mergeSiblingThreshold = 2` 时,会下发 `a`。
589
- *
590
- * 注意:当子路径包含删除(null)时,为避免删除语义不一致,将不会触发合并。
591
- */
592
- mergeSiblingThreshold?: number;
593
- /**
594
- * 同级合并的“负优化”防护:若合并后的父路径估算体积大于子路径体积之和 * ratio,则不合并。
595
- */
596
- mergeSiblingMaxInflationRatio?: number;
597
- /**
598
- * 同级合并的“负优化”防护:若父路径估算体积超过该值,则不合并。
599
- */
600
- mergeSiblingMaxParentBytes?: number;
601
- /**
602
- * 是否在父值为数组时跳过同级合并(默认 true)。
603
- */
604
- mergeSiblingSkipArray?: boolean;
605
- /**
606
- * patch 模式优化:computed 变更对比策略。
607
- *
608
- * - reference:仅 `Object.is` 比较(最快,可能会多下发)
609
- * - shallow:仅比较数组/对象第一层(折中)
610
- * - deep:深比较(可能较慢,适合小对象);会受 `computedCompareMaxDepth/maxKeys` 限制
611
- */
612
- computedCompare?: 'reference' | 'shallow' | 'deep';
613
- /**
614
- * computed 深比较最大深度(仅在 `computedCompare = "deep"` 时生效)。
615
- */
616
- computedCompareMaxDepth?: number;
617
- /**
618
- * computed 深比较最多比较 key 数(仅在 `computedCompare = "deep"` 时生效)。
619
- */
620
- computedCompareMaxKeys?: number;
621
- /**
622
- * 限制 patch 模式的预链接(prelinkReactiveTree)开销:最多向下遍历的深度(root 为 0)。
623
- */
624
- prelinkMaxDepth?: number;
625
- /**
626
- * 限制 patch 模式的预链接(prelinkReactiveTree)开销:最多索引的节点数。
627
- */
628
- prelinkMaxKeys?: number;
629
- /**
630
- * setData 调试信息回调(用于观测 patch 命中率/回退原因/payload 大小)。
631
- */
632
- debug?: (info: SetDataDebugInfo) => void;
633
- /**
634
- * 内建诊断日志开关(默认 off)。
635
- *
636
- * - off:关闭内建日志
637
- * - fallback:仅在回退 diff / 超阈值时输出
638
- * - always:每次 flush 都输出
639
- */
640
- diagnostics?: 'off' | 'fallback' | 'always';
641
- /**
642
- * debug 触发时机:
643
- * - fallback:仅在回退 diff / 超阈值时触发(默认)
644
- * - always:每次 flush 都触发
645
- */
646
- debugWhen?: 'fallback' | 'always';
647
- /**
648
- * debug 采样率(0-1),用于降低 debug 频率与开销(默认 1)。
649
- */
650
- debugSampleRate?: number;
651
- /**
652
- * patch 模式优化:当某个顶层字段下的变更路径数量过多时,直接提升为顶层字段整体替换。
653
- */
654
- elevateTopKeyThreshold?: number;
655
- /**
656
- * setData 序列化上限:最大递归深度(root 为 0)。超过时将停止深拷贝,保留更浅层结构。
657
- */
658
- toPlainMaxDepth?: number;
659
- /**
660
- * setData 序列化上限:最多处理的对象 key 数(累计)。超过时将停止深拷贝,保留更浅层结构。
661
- */
662
- toPlainMaxKeys?: number;
663
- }
664
- interface SetDataDebugInfo {
665
- mode: 'patch' | 'diff';
666
- reason: 'patch' | 'diff' | 'needsFullSnapshot' | 'maxPatchKeys' | 'maxPayloadBytes';
667
- pendingPatchKeys: number;
668
- payloadKeys: number;
669
- estimatedBytes?: number;
670
- bytes?: number;
671
- mergedSiblingParents?: number;
672
- computedDirtyKeys?: number;
673
- }
674
- //#endregion
675
- //#region src/runtime/types/options.d.ts
676
- type DataOption<D extends object> = D | (() => D);
677
- interface DefineComponentOptions<P extends ComponentPropsOptions = ComponentPropsOptions, D extends object = Record<string, any>, C extends ComputedDefinitions = ComputedDefinitions, M extends MethodDefinitions = MethodDefinitions, S extends Record<string, any> | void = Record<string, any> | void> extends MiniProgramComponentOptions, MiniProgramPageLifetimes {
678
- /**
679
- * 页面特性开关(用于按需注入 Page 事件处理函数)。
680
- *
681
- * 说明:小程序的部分页面事件/菜单项具有“按需派发/按需展示”特性,
682
- * 只有定义了对应的 `onXXX` 方法才会触发/展示(如 `onPageScroll`、`onShareTimeline`)。
683
- * 因此 wevu 需要在注册阶段(Component())就决定是否注入这些 onXXX。
684
- *
685
- * - 若你在 options 中显式定义了原生 `onXXX`,wevu 会自动桥接对应 hook(无需 features)。
686
- * - 若你只想在 `setup()` 里使用 wevu hook(不额外写原生 `onXXX`),则通过 `features` 显式开启注入。
687
- */
688
- features?: PageFeatures;
689
- /**
690
- * 类 Vue 的 props 定义(会被规范化为小程序 `properties`)
691
- */
692
- props?: P;
693
- watch?: Record<string, any>;
694
- setup?: SetupFunction<P, D, C, M, S>;
695
- /**
696
- * setup 执行时机:
697
- * - created:与旧行为一致(默认 defer setData 到 attached)
698
- * - attached:更接近 Vue 3(props 在 attached 时已就绪)
699
- *
700
- * @default 'attached'
701
- */
702
- setupLifecycle?: 'created' | 'attached';
703
- /**
704
- * 组件 data(建议使用函数返回初始值)。
705
- */
706
- data?: DataOption<D>;
707
- /**
708
- * 组件 computed(会参与快照 diff)。
709
- */
710
- computed?: C;
711
- /**
712
- * setData 快照控制选项(用于优化性能与 payload)。
713
- */
714
- setData?: SetDataSnapshotOptions;
715
- /**
716
- * 组件 methods(会绑定到 public instance 上)。
717
- */
718
- methods?: M;
719
- /**
720
- * 透传/扩展字段:允许携带其他小程序原生 Component 选项或自定义字段。
721
- * 说明:为保持兼容性保留索引签名,但仍会对已知字段提供智能提示。
722
- */
723
- [key: string]: any;
724
- }
725
- type AppSetupProps = {};
726
- interface DefineAppOptions<D extends object = Record<string, any>, C extends ComputedDefinitions = ComputedDefinitions, M extends MethodDefinitions = MethodDefinitions> extends MiniProgramAppOptions {
727
- watch?: Record<string, any>;
728
- setup?: (props: AppSetupProps, ctx: SetupContext<D, C, M, AppSetupProps>) => Record<string, any> | void;
729
- [key: string]: any;
730
- }
731
- interface CreateAppOptions<D extends object = Record<string, any>, C extends ComputedDefinitions = ComputedDefinitions, M extends MethodDefinitions = MethodDefinitions> extends MiniProgramAppOptions {
732
- data?: DataOption<D>;
733
- computed?: C;
734
- methods?: M;
735
- setData?: SetDataSnapshotOptions;
736
- watch?: Record<string, any>;
737
- setup?: (props: AppSetupProps, ctx: SetupContext<D, C, M, AppSetupProps>) => Record<string, any> | void;
738
- [key: string]: any;
739
- }
740
- interface PageFeatures {
741
- /**
742
- * 启用页面滚动事件(注入 `onPageScroll`)。
743
- */
744
- enableOnPageScroll?: boolean;
745
- /**
746
- * 启用下拉刷新事件(注入 `onPullDownRefresh`;仍需在页面配置开启 enablePullDownRefresh)。
747
- */
748
- enableOnPullDownRefresh?: boolean;
749
- /**
750
- * 启用触底事件(注入 `onReachBottom`)。
751
- */
752
- enableOnReachBottom?: boolean;
753
- /**
754
- * 启用路由动画完成事件(注入 `onRouteDone`)。
755
- */
756
- enableOnRouteDone?: boolean;
757
- /**
758
- * 启用 onReady 阶段的 routeDone 兜底补发。
759
- *
760
- * 默认关闭:保持与微信小程序平台事件更一致的行为。
761
- * 仅当个别 IDE/基础库未派发 routeDone 且业务确实依赖该时机时再开启。
762
- */
763
- enableOnRouteDoneFallback?: boolean;
764
- /**
765
- * 启用 Tab 点击事件(注入 `onTabItemTap`)。
766
- */
767
- enableOnTabItemTap?: boolean;
768
- /**
769
- * 启用窗口尺寸变化事件(注入 `onResize`)。
770
- */
771
- enableOnResize?: boolean;
772
- /**
773
- * 启用“转发/分享给朋友”(注入 `onShareAppMessage`,使右上角菜单显示“转发”)。
774
- */
775
- enableOnShareAppMessage?: boolean;
776
- /**
777
- * 启用“分享到朋友圈”(注入 `onShareTimeline`,使右上角菜单显示“分享到朋友圈”)。
778
- */
779
- enableOnShareTimeline?: boolean;
780
- /**
781
- * 启用“收藏”(注入 `onAddToFavorites`)。
782
- */
783
- enableOnAddToFavorites?: boolean;
784
- /**
785
- * 启用“退出状态保存”(注入 `onSaveExitState`)。
786
- */
787
- enableOnSaveExitState?: boolean;
788
- }
789
- //#endregion
790
- //#region src/runtime/types.d.ts
791
- interface WevuGlobalComponents {}
792
- interface WevuGlobalDirectives {}
793
- interface GlobalComponents extends WevuGlobalComponents {}
794
- interface GlobalDirectives extends WevuGlobalDirectives {}
795
- interface TemplateRefs {}
796
- type NodesRefFields = Parameters<WechatMiniprogram.NodesRef['fields']>[0];
797
- interface TemplateRefValue {
798
- selector: string;
799
- boundingClientRect: (cb?: (value: WechatMiniprogram.BoundingClientRectCallbackResult | null) => void) => Promise<WechatMiniprogram.BoundingClientRectCallbackResult | null>;
800
- scrollOffset: (cb?: (value: WechatMiniprogram.ScrollOffsetCallbackResult | null) => void) => Promise<WechatMiniprogram.ScrollOffsetCallbackResult | null>;
801
- fields: (fields: NodesRefFields, cb?: (value: any) => void) => Promise<any | null>;
802
- node: (cb?: (value: any) => void) => Promise<any | null>;
803
- }
804
- //#endregion
805
- //#region src/runtime/templateRefTypes.d.ts
806
- type WeappTemplateRefElements = { [K in keyof WeappIntrinsicElements]: TemplateRefValue };
807
- declare global {
808
- interface HTMLElementTagNameMap extends WeappTemplateRefElements {}
809
- }
810
- //#endregion
811
- //#region src/vue-augment.d.ts
812
- declare module '@vue/runtime-core' {
813
- interface GlobalComponents extends WevuGlobalComponents {}
814
- interface GlobalDirectives extends WevuGlobalDirectives {}
815
- }
816
- //#endregion
817
- //#region src/runtime/app.d.ts
818
- declare function createApp<D extends object, C extends ComputedDefinitions, M extends MethodDefinitions>(options: CreateAppOptions<D, C, M>): RuntimeApp<D, C, M>;
819
- //#endregion
820
- //#region src/runtime/defaults.d.ts
821
- interface WevuDefaults {
822
- app?: Partial<CreateAppOptions<any, any, any>>;
823
- component?: Partial<DefineComponentOptions<any, any, any, any>>;
824
- }
825
- declare function setWevuDefaults(next: WevuDefaults): void;
826
- declare function resetWevuDefaults(): void;
827
- //#endregion
828
- //#region src/runtime/register/inline.d.ts
829
- interface InlineExpressionEntry {
830
- keys: string[];
831
- indexKeys?: string[];
832
- scopeResolvers?: Array<InlineExpressionScopeResolver | ((ctx: any, scope: Record<string, any>, event: any) => any) | undefined>;
833
- fn: (ctx: any, scope: Record<string, any>, event: any) => any;
834
- }
835
- interface InlineExpressionScopeResolver {
836
- type: 'for-item';
837
- path: string;
838
- indexKey: string;
839
- }
840
- type InlineExpressionMap = Record<string, InlineExpressionEntry>;
841
- //#endregion
842
- //#region src/runtime/define.d.ts
843
- /**
844
- * defineComponent 返回的组件定义描述,用于手动注册或高级用法。
845
- */
846
- interface ComponentDefinition<D extends object, C extends ComputedDefinitions, M extends MethodDefinitions> {
847
- /**
848
- * 内部 runtime app(高级能力使用),不对外暴露正式 API。
849
- * @internal
850
- */
851
- __wevu_runtime: RuntimeApp<D, C, M>;
852
- /**
853
- * 内部选项快照(高级能力使用),包含 data/computed/methods 等。
854
- * @internal
855
- */
856
- __wevu_options: {
857
- data: () => D;
858
- computed: C;
859
- methods: M;
860
- setData: SetDataSnapshotOptions | undefined;
861
- watch: Record<string, any> | undefined;
862
- setup: ((props: any, ctx: any) => any) | undefined;
863
- mpOptions: MiniProgramComponentRawOptions;
864
- };
865
- }
866
- type SetupBindings<S> = Exclude<S, void> extends never ? Record<string, never> : Exclude<S, void>;
867
- type ResolveProps<P> = P extends ComponentPropsOptions ? InferProps<P> : P;
868
- interface WevuComponentConstructor<Props, RawBindings, D extends object, C extends ComputedDefinitions, M extends MethodDefinitions> {
869
- new (): ComponentPublicInstance<D, C, M, Props> & ShallowUnwrapRef<RawBindings>;
870
- }
871
- interface SetupContextWithTypeProps<TypeProps> {
872
- props: TypeProps;
873
- [key: string]: any;
874
- }
875
- type SetupFunctionWithTypeProps<TypeProps> = (props: TypeProps, ctx: SetupContextWithTypeProps<TypeProps>) => Record<string, any> | void;
876
- interface DefineComponentTypePropsOptions<TypeProps> {
877
- __typeProps: TypeProps;
878
- setup?: SetupFunctionWithTypeProps<TypeProps>;
879
- [key: string]: any;
880
- }
881
- interface DefineComponentWithTypeProps<TypeProps> {
882
- new (): {
883
- $props: TypeProps;
884
- } & Record<string, any>;
885
- }
886
- /**
887
- * 按 Vue 3 风格定义一个小程序组件/页面。
888
- *
889
- * - 统一注册为 `Component()`
890
- *
891
- * @param options 组件定义项
892
- * @returns 可手动注册的组件定义
893
- *
894
- * @example
895
- * ```ts
896
- * defineComponent({
897
- * data: () => ({ count: 0 }),
898
- * setup() {
899
- * onMounted(() => console.log('已挂载'))
900
- * }
901
- * })
902
- * ```
903
- *
904
- * @example
905
- * ```ts
906
- * defineComponent({
907
- * setup() {
908
- * onPageScroll(() => {})
909
- * }
910
- * })
911
- * ```
912
- */
913
- declare function defineComponent<TypeProps = any>(options: DefineComponentTypePropsOptions<TypeProps>): DefineComponentWithTypeProps<TypeProps>;
914
- declare function defineComponent<P extends ComponentPropsOptions = ComponentPropsOptions, D extends object = Record<string, any>, C extends ComputedDefinitions = ComputedDefinitions, M extends MethodDefinitions = MethodDefinitions, S extends Record<string, any> | void = Record<string, any> | void>(options: DefineComponentOptions<P, D, C, M, S>): WevuComponentConstructor<ResolveProps<P>, SetupBindings<S>, D, C, M>;
915
- /**
916
- * 从 Vue SFC 选项创建 wevu 组件,供 weapp-vite 编译产物直接调用的兼容入口。
917
- *
918
- * @param options 组件选项,可能包含小程序特有的 properties
919
- * @internal
920
- */
921
- declare function createWevuComponent<P extends ComponentPropsOptions = ComponentPropsOptions, D extends object = Record<string, any>, C extends ComputedDefinitions = ComputedDefinitions, M extends MethodDefinitions = MethodDefinitions>(options: DefineComponentOptions<P, D, C, M> & {
922
- properties?: WechatMiniprogram.Component.PropertyOption;
923
- }): void;
924
- /**
925
- * scoped slot 兼容组件入口(编译产物内部使用)。
926
- * @internal
927
- */
928
- declare function createWevuScopedSlotComponent(overrides?: {
929
- computed?: ComputedDefinitions;
930
- inlineMap?: InlineExpressionMap;
931
- }): void;
932
- //#endregion
933
- //#region src/runtime/disposables.d.ts
934
- type DisposableMethodName = 'dispose' | 'abort' | 'cancel' | 'stop' | 'disconnect' | 'destroy' | 'close';
935
- type DisposableObject = Partial<Record<DisposableMethodName, () => void>>;
936
- type DisposableLike = (() => void) | DisposableObject;
937
- interface DisposableBag {
938
- /**
939
- * 注册一个清理项,返回“取消注册”函数(不会立即执行清理)。
940
- */
941
- add: (target: DisposableLike | null | undefined) => () => void;
942
- /**
943
- * 立即执行并清空当前 bag 中的全部清理项(幂等)。
944
- */
945
- dispose: () => void;
946
- /**
947
- * 注册 timeout,并在 bag dispose 时自动 clearTimeout。
948
- */
949
- setTimeout: (handler: (...args: any[]) => void, timeout?: number, ...args: any[]) => ReturnType<typeof setTimeout>;
950
- /**
951
- * 注册 interval,并在 bag dispose 时自动 clearInterval。
952
- */
953
- setInterval: (handler: (...args: any[]) => void, timeout?: number, ...args: any[]) => ReturnType<typeof setInterval>;
954
- }
955
- /**
956
- * 在 setup() 中创建一个“清理袋”,统一管理副作用释放。
957
- *
958
- * 典型用法:注册定时器、请求任务、事件监听退订函数,
959
- * 在页面/组件卸载时自动批量清理,减少内存泄漏风险。
960
- */
961
- declare function useDisposables(): DisposableBag;
962
- //#endregion
963
- //#region src/runtime/hooks/base.d.ts
964
- declare function getCurrentInstance<T extends InternalRuntimeState = InternalRuntimeState>(): T | undefined;
965
- /**
966
- * 设置当前运行时实例(框架内部使用)。
967
- * @internal
968
- */
969
- declare function setCurrentInstance(inst: InternalRuntimeState | undefined): void;
970
- declare function getCurrentSetupContext<T = any>(): T | undefined;
971
- /**
972
- * 设置当前 setup 上下文(框架内部使用)。
973
- * @internal
974
- */
975
- declare function setCurrentSetupContext(ctx: any | undefined): void;
976
- /**
977
- * 调用批量 hook(框架内部调度入口)。
978
- * @internal
979
- */
980
- declare function callHookList(target: InternalRuntimeState, name: string, args?: any[]): void;
981
- /**
982
- * 调用返回值型 hook(框架内部调度入口)。
983
- * @internal
984
- */
985
- declare function callHookReturn(target: InternalRuntimeState, name: string, args?: any[]): any;
986
- //#endregion
987
- //#region src/runtime/hooks/register.d.ts
988
- declare function onLaunch(handler: (options: WechatMiniprogram.App.LaunchShowOption) => void): void;
989
- declare function onPageNotFound(handler: (options: WechatMiniprogram.App.PageNotFoundOption) => void): void;
990
- declare function onUnhandledRejection(handler: WechatMiniprogram.OnUnhandledRejectionCallback): void;
991
- declare function onThemeChange(handler: WechatMiniprogram.OnThemeChangeCallback): void;
992
- declare function onMemoryWarning(handler: WechatMiniprogram.OnMemoryWarningCallback): void;
993
- declare function onShow(handler: () => void): void;
994
- declare function onShow(handler: (options: WechatMiniprogram.App.LaunchShowOption) => void): void;
995
- declare function onLoad(handler: WechatMiniprogram.Page.ILifetime['onLoad']): void;
996
- declare function onHide(handler: () => void): void;
997
- declare function onUnload(handler: () => void): void;
998
- declare function onReady(handler: () => void): void;
999
- declare function onPullDownRefresh(handler: WechatMiniprogram.Page.ILifetime['onPullDownRefresh']): void;
1000
- declare function onReachBottom(handler: WechatMiniprogram.Page.ILifetime['onReachBottom']): void;
1001
- declare function onPageScroll(handler: (opt: WechatMiniprogram.Page.IPageScrollOption) => void): void;
1002
- declare function onRouteDone(handler: WechatMiniprogram.Page.ILifetime['onRouteDone'] | ((opt?: unknown) => void)): void;
1003
- declare function onTabItemTap(handler: (opt: WechatMiniprogram.Page.ITabItemTapOption) => void): void;
1004
- declare function onResize(handler: (opt: WechatMiniprogram.Page.IResizeOption) => void): void;
1005
- declare function onMoved(handler: () => void): void;
1006
- declare function onAttached(handler: () => void): void;
1007
- declare function onDetached(handler: () => void): void;
1008
- declare function onError(handler: (err: any) => void): void;
1009
- declare function onSaveExitState(handler: () => WechatMiniprogram.Page.ISaveExitState): void;
1010
- declare function onShareAppMessage(handler: WechatMiniprogram.Page.ILifetime['onShareAppMessage']): void;
1011
- declare function onShareTimeline(handler: WechatMiniprogram.Page.ILifetime['onShareTimeline']): void;
1012
- declare function onAddToFavorites(handler: WechatMiniprogram.Page.ILifetime['onAddToFavorites']): void;
1013
- //#endregion
1014
- //#region src/runtime/hooks/vue.d.ts
1015
- /**
1016
- * Vue 3 对齐:组件/页面已挂载,映射小程序 onReady
1017
- */
1018
- declare function onMounted(handler: () => void): void;
1019
- /**
1020
- * Vue 3 对齐:组件/页面更新后触发。
1021
- * 小程序没有专用 update 生命周期,这里在每次 setData 完成后调用。
1022
- */
1023
- declare function onUpdated(handler: () => void): void;
1024
- /**
1025
- * Vue 3 对齐:卸载前触发。
1026
- * 小程序无 before-unload 生命周期,setup 时同步执行以保持语义。
1027
- */
1028
- declare function onBeforeUnmount(handler: () => void): void;
1029
- /**
1030
- * Vue 3 对齐:组件/页面卸载;映射到页面 onUnload 或组件 detached
1031
- */
1032
- declare function onUnmounted(handler: () => void): void;
1033
- /**
1034
- * Vue 3 对齐:挂载前;setup 时同步触发以模拟 beforeMount 语义
1035
- */
1036
- declare function onBeforeMount(handler: () => void): void;
1037
- /**
1038
- * Vue 3 对齐:更新前;在每次 setData 前触发
1039
- */
1040
- declare function onBeforeUpdate(handler: () => void): void;
1041
- /**
1042
- * Vue 3 对齐:错误捕获;映射到小程序 onError
1043
- */
1044
- declare function onErrorCaptured(handler: (err: any, instance: any, info: string) => void): void;
1045
- /**
1046
- * Vue 3 对齐:组件激活;映射到小程序 onShow
1047
- */
1048
- declare function onActivated(handler: () => void): void;
1049
- /**
1050
- * Vue 3 对齐:组件失活;映射到小程序 onHide
1051
- */
1052
- declare function onDeactivated(handler: () => void): void;
1053
- /**
1054
- * Vue 3 对齐:服务端渲染前置钩子。
1055
- * 小程序无此场景,保留空实现以保持 API 兼容。
1056
- */
1057
- declare function onServerPrefetch(_handler: () => void): void;
1058
- /**
1059
- * 派发更新阶段钩子(框架内部调度入口)。
1060
- * @internal
1061
- */
1062
- declare function callUpdateHooks(target: InternalRuntimeState, phase: 'before' | 'after'): void;
1063
- //#endregion
1064
- //#region src/runtime/intersectionObserver.d.ts
1065
- type UseIntersectionObserverOptions = WechatMiniprogram.CreateIntersectionObserverOption;
1066
- type UseIntersectionObserverResult = WechatMiniprogram.IntersectionObserver;
1067
- /**
1068
- * 在 setup 中创建 IntersectionObserver,并在卸载时自动断开。
1069
- *
1070
- * - 优先使用 `ctx.instance.createIntersectionObserver(options)`。
1071
- * - 不可用时回退到 `wx.createIntersectionObserver(instance, options)`。
1072
- */
1073
- declare function useIntersectionObserver(options?: UseIntersectionObserverOptions): UseIntersectionObserverResult;
1074
- //#endregion
1075
- //#region src/runtime/layoutBridge.d.ts
1076
- type LayoutBridgeContext = Record<string, any>;
1077
- type LayoutBridgeComponentResolver = (selector: string) => any;
1078
- type LayoutHostMap = Record<string, unknown>;
1079
- interface LayoutHostBinding {
1080
- key: string;
1081
- refName?: string;
1082
- selector: string;
1083
- kind?: 'component';
1084
- }
1085
- interface LayoutHostResolveOptions<T = any> {
1086
- context?: T;
1087
- fallbackContext?: T;
1088
- interval?: number;
1089
- retries?: number;
1090
- }
1091
- /**
1092
- * 为当前页面注册 layout bridge,使页面或子组件可消费 layout 内部能力。
1093
- */
1094
- declare function registerPageLayoutBridge(selectors: string | string[], context?: LayoutBridgeContext): boolean;
1095
- /**
1096
- * 移除当前页面的 layout bridge 注册。
1097
- */
1098
- declare function unregisterPageLayoutBridge(selectors: string | string[], context?: LayoutBridgeContext): boolean;
1099
- /**
1100
- * 解析当前页面已注册的 layout bridge,找不到时回退到传入上下文。
1101
- */
1102
- declare function resolveLayoutBridge<T = any>(selector: string, fallbackContext?: T): T | undefined;
1103
- /**
1104
- * 解析当前页面 layout 内通过指定 key 暴露的宿主实例。
1105
- */
1106
- declare function resolveLayoutHost<T = any, C = any>(key: string, options?: LayoutHostResolveOptions<C>): T | null;
1107
- /**
1108
- * 等待当前页面 layout 宿主实例可用,适合页面初次进入时的异步宿主解析。
1109
- */
1110
- declare function waitForLayoutHost<T = any, C = any>(key: string, options?: LayoutHostResolveOptions<C>): Promise<T | null>;
1111
- /**
1112
- * 在 layout 生命周期内暴露 bridge,使页面或子组件可访问 layout 内部实例。
1113
- */
1114
- declare function useLayoutBridge(selectors: string | string[], options?: {
1115
- resolveComponent?: LayoutBridgeComponentResolver;
1116
- }): void;
1117
- /**
1118
- * 使用编译期注入的宿主绑定信息,直接从当前 layout 运行时实例解析子组件宿主并注册 bridge。
1119
- */
1120
- declare function registerRuntimeLayoutHosts(bindings: LayoutHostBinding[], context?: LayoutBridgeContext): any;
1121
- /**
1122
- * 移除运行时自动注册的 layout 宿主 bridge。
1123
- */
1124
- declare function unregisterRuntimeLayoutHosts(bindings: LayoutHostBinding[], context?: LayoutBridgeContext): boolean;
1125
- /**
1126
- * 使用 key -> 宿主实例的映射批量暴露 layout 内部宿主,适合 toast/dialog 等共享反馈节点。
1127
- */
1128
- declare function useLayoutHosts(hosts: LayoutHostMap): void;
1129
- //#endregion
1130
- //#region src/runtime/noSetData.d.ts
1131
- declare function markNoSetData<T extends object>(value: T): T;
1132
- declare function isNoSetData(value: unknown): boolean;
1133
- //#endregion
1134
- //#region src/runtime/pageLayout.d.ts
1135
- interface WevuPageLayoutMap {}
1136
- type ResolveTypedPageLayoutName = keyof WevuPageLayoutMap extends never ? string : Extract<keyof WevuPageLayoutMap, string>;
1137
- type ResolveTypedPageLayoutProps<Name extends string> = Name extends keyof WevuPageLayoutMap ? WevuPageLayoutMap[Name] : Record<string, any>;
1138
- type PageLayoutNamedState = { [Name in ResolveTypedPageLayoutName]: {
1139
- name: Name;
1140
- props: ResolveTypedPageLayoutProps<Name>;
1141
- } }[ResolveTypedPageLayoutName];
1142
- type PageLayoutState = PageLayoutNamedState | {
1143
- name: false;
1144
- props: Record<string, any>;
1145
- } | {
1146
- name: undefined;
1147
- props: Record<string, any>;
1148
- };
1149
- /**
1150
- * 获取当前页面 layout 状态。
1151
- */
1152
- declare function usePageLayout(): Readonly<PageLayoutState>;
1153
- declare function syncRuntimePageLayoutState(target: Record<string, any>, layout: string | false, props: Record<string, any>): void;
1154
- declare function syncRuntimePageLayoutStateFromRuntime(target: Record<string, any>): void;
1155
- declare function setPageLayout(layout: false): void;
1156
- declare function setPageLayout<Name extends ResolveTypedPageLayoutName>(layout: Name, props?: ResolveTypedPageLayoutProps<Name>): void;
1157
- declare function resolveRuntimePageLayoutName(layout: string | false): string;
1158
- //#endregion
1159
- //#region src/runtime/pageScroll.d.ts
1160
- interface UsePageScrollThrottleOptions {
1161
- /**
1162
- * 节流间隔(毫秒),默认 80ms。
1163
- */
1164
- interval?: number;
1165
- /**
1166
- * 是否在窗口起始边缘立即触发,默认 true。
1167
- */
1168
- leading?: boolean;
1169
- /**
1170
- * 是否在窗口结束边缘补一次回调,默认 true。
1171
- */
1172
- trailing?: boolean;
1173
- /**
1174
- * 持续滚动时的最大等待时间(毫秒)。
1175
- * 当 trailing 为 false 时,可用于兜底触发一次回调。
1176
- */
1177
- maxWait?: number;
1178
- }
1179
- type UsePageScrollThrottleStopHandle = () => void;
1180
- /**
1181
- * 在 setup 中注册节流后的 onPageScroll 监听,并在卸载时自动清理。
1182
- */
1183
- declare function usePageScrollThrottle(handler: (opt: WechatMiniprogram.Page.IPageScrollOption) => void, options?: UsePageScrollThrottleOptions): UsePageScrollThrottleStopHandle;
1184
- //#endregion
1185
- //#region src/runtime/provide.d.ts
1186
- /**
1187
- * 判断当前是否存在可用的注入上下文。
1188
- *
1189
- * wevu 目前的依赖注入上下文来自同步 `setup()` 阶段的当前实例;
1190
- * 若未来补充 app 级 provider,这里可继续扩展判断来源。
1191
- */
1192
- declare function hasInjectionContext(): boolean;
1193
- /**
1194
- * 在组件上下文中向后代注入值(与 Vue 3 行为兼容),若没有当前实例则回落到全局存储。
1195
- *
1196
- * @param key 注入键,可为字符串、Symbol 或对象
1197
- * @param value 提供的值
1198
- *
1199
- * @example
1200
- * ```ts
1201
- * defineComponent({
1202
- * setup() {
1203
- * provide(TOKEN_KEY, { data: 'value' })
1204
- * }
1205
- * })
1206
- * ```
1207
- */
1208
- declare function provide<T>(key: any, value: T): void;
1209
- /**
1210
- * 从祖先组件(或全局存储)读取提供的值。
1211
- *
1212
- * @param key 注入键,需与 provide 使用的键保持一致
1213
- * @param defaultValue 未找到提供者时的默认值
1214
- * @returns 匹配到的值或默认值
1215
- *
1216
- * @example
1217
- * ```ts
1218
- * defineComponent({
1219
- * setup() {
1220
- * const data = inject(TOKEN_KEY)
1221
- * const value = inject('key', 'default')
1222
- * }
1223
- * })
1224
- * ```
1225
- */
1226
- declare function inject<T>(key: any, defaultValue?: T): T;
1227
- /**
1228
- * 全局注入值,适用于历史兼容场景。
1229
- *
1230
- * @deprecated 已弃用,仅用于兼容/过渡。推荐优先使用 `provide()`,
1231
- * 在无实例上下文时 `provide()` 会自动回落到全局存储。
1232
- */
1233
- declare function provideGlobal<T>(key: any, value: T): void;
1234
- /**
1235
- * 从全局存储读取值,适用于历史兼容场景。
1236
- *
1237
- * @deprecated 已弃用,仅用于兼容/过渡。推荐优先使用 `inject()`,
1238
- * 在无实例上下文时 `inject()` 会自动从全局存储读取。
1239
- */
1240
- declare function injectGlobal<T>(key: any, defaultValue?: T): T;
1241
- //#endregion
1242
- //#region src/runtime/register/watch.d.ts
1243
- type WatchHandler = (this: any, value: any, oldValue: any) => void;
1244
- type WatchDescriptor = WatchHandler | string | {
1245
- handler: WatchHandler | string;
1246
- immediate?: boolean;
1247
- deep?: boolean;
1248
- };
1249
- type WatchMap = Record<string, WatchDescriptor>;
1250
- //#endregion
1251
- //#region src/runtime/register/app.d.ts
1252
- /**
1253
- * 注册 App 入口(框架内部使用)。
1254
- * @internal
1255
- */
1256
- declare function registerApp<D extends object, C extends ComputedDefinitions, M extends MethodDefinitions>(runtimeApp: RuntimeApp<D, C, M>, methods: MethodDefinitions, watch: WatchMap | undefined, setup: DefineAppOptions<D, C, M>['setup'], mpOptions: MiniProgramAppOptions): void;
1257
- //#endregion
1258
- //#region src/runtime/register/component.d.ts
1259
- /**
1260
- * 注册组件入口(框架内部使用)。
1261
- * @internal
1262
- */
1263
- declare function registerComponent<D extends object, C extends ComputedDefinitions, M extends MethodDefinitions>(runtimeApp: RuntimeApp<D, C, M>, methods: MethodDefinitions, watch: WatchMap | undefined, setup: DefineComponentOptions<ComponentPropsOptions, D, C, M>['setup'], mpOptions: MiniProgramComponentRawOptions): void;
1264
- //#endregion
1265
- //#region src/runtime/register/runtimeInstance.d.ts
1266
- type RuntimeSetupFunction<D extends object, C extends ComputedDefinitions, M extends MethodDefinitions> = DefineComponentOptions<ComponentPropsOptions, D, C, M>['setup'] | DefineAppOptions<D, C, M>['setup'];
1267
- /**
1268
- * 挂载运行时实例(框架内部注册流程使用)。
1269
- * @internal
1270
- */
1271
- declare function mountRuntimeInstance<D extends object, C extends ComputedDefinitions, M extends MethodDefinitions>(target: InternalRuntimeState, runtimeApp: RuntimeApp<D, C, M>, watchMap: WatchMap | undefined, setup?: RuntimeSetupFunction<D, C, M>, options?: {
1272
- deferSetData?: boolean;
1273
- }): RuntimeInstance<D, C, M>;
1274
- declare function setRuntimeSetDataVisibility(target: InternalRuntimeState, visible: boolean): void;
1275
- /**
1276
- * 卸载运行时实例(框架内部注册流程使用)。
1277
- * @internal
1278
- */
1279
- declare function teardownRuntimeInstance(target: InternalRuntimeState): void;
1280
- //#endregion
1281
- //#region src/runtime/register/setup.d.ts
1282
- type SetupRunner = {
1283
- bivarianceHack: (props: Record<string, any>, ctx: any) => any;
1284
- }['bivarianceHack'];
1285
- /**
1286
- * 执行 setup 函数并注入运行时上下文(框架内部使用)。
1287
- * @internal
1288
- */
1289
- declare function runSetupFunction(setup: SetupRunner | undefined, props: Record<string, any>, context: any): unknown;
1290
- //#endregion
1291
- //#region src/runtime/template.d.ts
1292
- declare function normalizeStyle(value: any): string;
1293
- declare function normalizeClass(value: any): string;
1294
- //#endregion
1295
- //#region src/runtime/updatePerformance.d.ts
1296
- type UpdatePerformanceListenerResult = Record<string, any>;
1297
- type UpdatePerformanceListener = (result: UpdatePerformanceListenerResult) => void;
1298
- type UseUpdatePerformanceListenerStopHandle = () => void;
1299
- /**
1300
- * 在 setup 中注册更新性能监听,并在卸载时自动清理。
1301
- *
1302
- * - 底层能力:`instance.setUpdatePerformanceListener(listener)`。
1303
- * - 清理策略:卸载时回传 `undefined` 作为监听器,平台不支持时静默降级。
1304
- */
1305
- declare function useUpdatePerformanceListener(listener: UpdatePerformanceListener): UseUpdatePerformanceListenerStopHandle;
1306
- //#endregion
1307
- //#region src/runtime/vueCompat/context.d.ts
1308
- declare function useAttrs(): Record<string, any>;
1309
- declare function useSlots(): Record<string, any>;
1310
- declare function useNativeInstance(): SetupContextNativeInstance;
1311
- //#endregion
1312
- //#region src/runtime/vueCompat/model.d.ts
1313
- type ModelModifiers<M extends PropertyKey = string> = Record<M, true | undefined>;
1314
- type ModelRef$1<T, M extends PropertyKey = string, G = T, S = T> = Ref<G, S> & [ModelRef$1<T, M, G, S>, ModelModifiers<M>];
1315
- interface UseModelOptions<T, M extends PropertyKey = string, G = T, S = T> {
1316
- get?: (value: T, modifiers: ModelModifiers<M>) => G;
1317
- set?: (value: S, modifiers: ModelModifiers<M>) => T;
1318
- }
1319
- declare function useModel<T = any, M extends PropertyKey = string>(props: Record<string, any>, name: string): ModelRef$1<T, M, T, T>;
1320
- declare function useModel<T = any, M extends PropertyKey = string, G = T, S = T>(props: Record<string, any>, name: string, options: UseModelOptions<T, M, G, S>): ModelRef$1<T, M, G, S>;
1321
- /**
1322
- * useBindModel 返回绑定到当前运行时实例的 bindModel。
1323
- * 该方法必须在 setup() 的同步阶段调用。
1324
- */
1325
- type BindModelWithHelper<DefaultEvent extends string = 'input', DefaultValueProp extends string = 'value'> = (<T = any>(path: string, options?: ModelBindingOptions<T>) => ModelBinding<T>) & {
1326
- model: <T = any, Event extends string = DefaultEvent, ValueProp extends string = DefaultValueProp, Formatted = T>(path: string, options?: ModelBindingOptions<T, Event, ValueProp, Formatted>) => ModelBindingPayload<T, Event, ValueProp, Formatted>;
1327
- value: <T = any, Event extends string = DefaultEvent, ValueProp extends string = DefaultValueProp, Formatted = T>(path: string, options?: ModelBindingOptions<T, Event, ValueProp, Formatted>) => Formatted;
1328
- on: <T = any, Event extends string = DefaultEvent, ValueProp extends string = DefaultValueProp, Formatted = T>(path: string, options?: ModelBindingOptions<T, Event, ValueProp, Formatted>) => (event: any) => void;
1329
- };
1330
- declare function useBindModel<DefaultEvent extends string = 'input', DefaultValueProp extends string = 'value'>(defaultOptions?: ModelBindingOptions<any, DefaultEvent, DefaultValueProp, any>): BindModelWithHelper<DefaultEvent, DefaultValueProp>;
1331
- declare function mergeModels<T>(a: T, b: T): T;
1332
- //#endregion
1333
- //#region src/runtime/vueCompat/router.d.ts
1334
- type RuntimeRouter = SetupContextRouter;
1335
- /**
1336
- * 在 setup 中获取与当前组件路径语义一致的原生 Router 对象。
1337
- *
1338
- * - 优先使用实例上的 `this.router`(组件路径语义)。
1339
- * - 不可用时回退到 `this.pageRouter`。
1340
- * - 低版本基础库再回退到全局 `wx.*` 路由方法。
1341
- *
1342
- * 如需更贴近 Vue Router 的高阶能力(导航守卫、失败类型、统一解析),
1343
- * 推荐改用 `wevu/router` 子入口的 `useRouter()`。
1344
- */
1345
- declare function useNativeRouter(): RuntimeRouter;
1346
- /**
1347
- * 在 setup 中获取与当前页面路径语义一致的原生 Router 对象。
1348
- *
1349
- * - 优先使用实例上的 `this.pageRouter`(页面路径语义)。
1350
- * - 不可用时回退到 `this.router`。
1351
- * - 低版本基础库再回退到全局 `wx.*` 路由方法。
1352
- *
1353
- * 如需更贴近 Vue Router 的高阶能力(导航守卫、失败类型、统一解析),
1354
- * 推荐改用 `wevu/router` 子入口的 `useRouter()`。
1355
- */
1356
- declare function useNativePageRouter(): RuntimeRouter;
1357
- //#endregion
1358
- //#region src/runtime/vueCompat/templateRef.d.ts
1359
- type TemplateRef<T = unknown> = Readonly<ShallowRef<T | null>>;
1360
- declare function useTemplateRef<K extends keyof TemplateRefs>(name: K): TemplateRef<TemplateRefs[K]>;
1361
- declare function useTemplateRef<T = unknown>(name: string): TemplateRef<T>;
1362
- //#endregion
1363
- //#region src/macros/shared.d.ts
1364
- type Prettify<T> = { [K in keyof T]: T[K] } & {};
1365
- type IfAny<T, Y, N> = 0 extends 1 & T ? Y : N;
1366
- type ComponentObjectPropsOptions = ComponentPropsOptions;
1367
- type ExtractPropTypes$1<P extends ComponentObjectPropsOptions> = InferProps<P>;
1368
- type DefineProps<T, BKeys extends keyof T> = Readonly<T> & { readonly [K in BKeys]-?: boolean };
1369
- type BooleanKey<T, K extends keyof T = keyof T> = K extends any ? T[K] extends boolean | undefined ? T[K] extends never | undefined ? never : K : never : never;
1370
- type DefinePropsFromArray<PropNames extends string = string> = Prettify<Readonly<{ [key in PropNames]?: any }>>;
1371
- type DefinePropsFromOptions<PP extends ComponentObjectPropsOptions = ComponentObjectPropsOptions> = Prettify<Readonly<ExtractPropTypes$1<PP>>>;
1372
- type NotUndefined<T> = T extends undefined ? never : T;
1373
- type MappedOmit<T, K extends keyof any> = { [P in keyof T as P extends K ? never : P]: T[P] };
1374
- type InferDefaults<T> = { [K in keyof T]?: InferDefault<T, T[K]> };
1375
- type NativeType = null | undefined | number | string | boolean | symbol | ((...args: any[]) => any);
1376
- type InferDefault<P, T> = ((props: P) => T & {}) | (T extends NativeType ? T : never);
1377
- type PropsWithDefaults<T, Defaults extends InferDefaults<T>, BKeys extends keyof T> = T extends unknown ? Readonly<MappedOmit<T, keyof Defaults>> & { readonly [K in keyof Defaults as K extends keyof T ? K : never]-?: K extends keyof T ? Defaults[K] extends undefined ? IfAny<Defaults[K], NotUndefined<T[K]>, T[K]> : NotUndefined<T[K]> : never } & { readonly [K in BKeys]-?: K extends keyof Defaults ? Defaults[K] extends undefined ? boolean | undefined : boolean : boolean } : never;
1378
- type UnionToIntersection<U> = (U extends any ? (arg: U) => any : never) extends ((arg: infer I) => any) ? I : never;
1379
- type ObjectEmitsOptions = Record<string, ((...args: any[]) => any) | null>;
1380
- type EmitsOptions = ObjectEmitsOptions | string[];
1381
- type EmitFn<Options = ObjectEmitsOptions, Event extends keyof Options = keyof Options> = Options extends Array<infer V> ? (event: V, ...args: any[]) => void : {} extends Options ? (event: string, ...args: any[]) => void : UnionToIntersection<{ [K in Event]: Options[K] extends ((...args: infer Args) => any) ? (event: K, ...args: Args) => void : Options[K] extends any[] ? (event: K, ...args: Options[K]) => void : (event: K, ...args: any[]) => void }[Event]>;
1382
- type ComponentTypeEmits = ((...args: any[]) => any) | Record<string, any>;
1383
- type RecordToUnion<T extends Record<string, any>> = T[keyof T];
1384
- type ShortEmits<T extends Record<string, any>> = UnionToIntersection<RecordToUnion<{ [K in keyof T]: (evt: K, ...args: T[K]) => void }>>;
1385
- type ScriptSetupNativePropertyOption = WechatMiniprogram.Component.PropertyOption;
1386
- type ScriptSetupNativeMethodOption = WechatMiniprogram.Component.MethodOption;
1387
- type ScriptSetupNativeBehaviorOption = WechatMiniprogram.Component.IEmptyArray;
1388
- type ScriptSetupNativeInstance<D extends object, P extends ScriptSetupNativePropertyOption, M extends ScriptSetupNativeMethodOption> = WechatMiniprogram.Component.Instance<D, P, M, ScriptSetupNativeBehaviorOption>;
1389
- type ScriptSetupObservedProperty<TProperty extends WechatMiniprogram.Component.AllFullProperty, TInstance> = Omit<TProperty, 'observer'> & {
1390
- observer?: string | ((this: TInstance, newVal: WechatMiniprogram.Component.PropertyToData<TProperty>, oldVal: WechatMiniprogram.Component.PropertyToData<TProperty>, changedPath: Array<string | number>) => void);
1391
- };
1392
- type ScriptSetupPropertyObserver<TProperty extends WechatMiniprogram.Component.AllProperty, TInstance> = TProperty extends infer TCurrent extends WechatMiniprogram.Component.AllFullProperty ? ScriptSetupObservedProperty<TCurrent, TInstance> : TProperty;
1393
- type ScriptSetupNativeProperties<D extends object, P extends ScriptSetupNativePropertyOption, M extends ScriptSetupNativeMethodOption> = { [K in keyof P]: ScriptSetupPropertyObserver<P[K], ScriptSetupNativeInstance<D, P, M>> };
1394
- type ScriptSetupNativeMethods<D extends object, P extends ScriptSetupNativePropertyOption, M extends ScriptSetupNativeMethodOption> = M & ThisType<ScriptSetupNativeInstance<D, P, M>>;
1395
- type ScriptSetupDefineOptions<D extends object = Record<string, any>, C extends ComputedDefinitions = ComputedDefinitions, M extends MethodDefinitions = MethodDefinitions, P extends ScriptSetupNativePropertyOption = ScriptSetupNativePropertyOption> = Omit<DefineComponentOptions<ComponentPropsOptions, D, C, M>, 'props' | 'options' | 'data' | 'methods'> & {
1396
- /**
1397
- * props 必须通过 defineProps() 声明。
1398
- */
1399
- props?: never;
1400
- /**
1401
- * emits 必须通过 defineEmits() 声明。
1402
- */
1403
- emits?: never;
1404
- /**
1405
- * expose 必须通过 defineExpose() 声明。
1406
- */
1407
- expose?: never;
1408
- /**
1409
- * slots 必须通过 defineSlots() 声明。
1410
- */
1411
- slots?: never;
1412
- /**
1413
- * 小程序 Component 选项(multipleSlots/styleIsolation 等)。
1414
- */
1415
- options?: WechatMiniprogram.Component.ComponentOptions;
1416
- /**
1417
- * 小程序原生 properties。
1418
- */
1419
- properties?: ScriptSetupNativeProperties<D, P, M>;
1420
- /**
1421
- * 小程序原生 data。
1422
- */
1423
- data?: D | (() => D);
1424
- /**
1425
- * 小程序原生 methods。
1426
- */
1427
- methods?: ScriptSetupNativeMethods<D, P, M>;
1428
- /**
1429
- * setup 执行时机(默认 attached)。
1430
- */
1431
- setupLifecycle?: 'created' | 'attached';
1432
- };
1433
- //#endregion
1434
- //#region src/macros.d.ts
1435
- /**
1436
- * defineProps 声明(类型层宏)。
1437
- */
1438
- declare function defineProps<PropNames extends string = string>(props: PropNames[]): DefinePropsFromArray<PropNames>;
1439
- declare function defineProps<PP extends ComponentPropsOptions = ComponentPropsOptions>(props: PP): DefinePropsFromOptions<PP>;
1440
- declare function defineProps<TypeProps>(): DefineProps<TypeProps, BooleanKey<TypeProps>>;
1441
- /**
1442
- * withDefaults 为 defineProps 声明默认值(类型层)。
1443
- */
1444
- declare function withDefaults<T, BKeys extends keyof T, Defaults extends InferDefaults<T>>(props: DefineProps<T, BKeys>, defaults: Defaults): PropsWithDefaults<T, Defaults, BKeys>;
1445
- /**
1446
- * defineEmits 声明(类型层宏)。
1447
- */
1448
- declare function defineEmits<EE extends string = string>(emits?: EE[]): EmitFn<EE[]>;
1449
- declare function defineEmits<E extends EmitsOptions = EmitsOptions>(emits?: E): EmitFn<E>;
1450
- declare function defineEmits<T extends ComponentTypeEmits>(): T extends ((...args: any[]) => any) ? T : ShortEmits<T>;
1451
- /**
1452
- * defineExpose 向父级 ref 暴露成员(仅类型层)。
1453
- */
1454
- declare function defineExpose<T extends Record<string, any> = Record<string, any>>(exposed?: T): void;
1455
- /**
1456
- * defineOptions 设置 `<script setup>` 组件选项(仅类型层)。
1457
- */
1458
- declare function defineOptions<D extends object = Record<string, any>, C extends ComputedDefinitions = ComputedDefinitions, M extends MethodDefinitions = MethodDefinitions, P extends WechatMiniprogram.Component.PropertyOption = WechatMiniprogram.Component.PropertyOption>(options?: ScriptSetupDefineOptions<D, C, M, P>): void;
1459
- declare function defineOptions<D extends object = Record<string, any>, C extends ComputedDefinitions = ComputedDefinitions, M extends MethodDefinitions = MethodDefinitions, P extends WechatMiniprogram.Component.PropertyOption = WechatMiniprogram.Component.PropertyOption>(options?: () => ScriptSetupDefineOptions<D, C, M, P> | Promise<ScriptSetupDefineOptions<D, C, M, P>>): void;
1460
- /**
1461
- * defineSlots 声明 slots 类型(仅类型层)。
1462
- */
1463
- declare function defineSlots<T extends Record<string, any> = Record<string, any>>(): T;
1464
- type PageLayoutMeta = string | false | {
1465
- name: string;
1466
- props?: Record<string, unknown>;
1467
- };
1468
- interface PageMeta {
1469
- layout?: PageLayoutMeta;
1470
- [key: string]: unknown;
1471
- }
1472
- /**
1473
- * definePageMeta 声明页面级元信息(仅类型层)。
1474
- */
1475
- declare function definePageMeta(meta: PageMeta): void;
1476
- /**
1477
- * defineModel 声明 v-model 绑定(类型层宏)。
1478
- */
1479
- type DefineModelModifiers<M extends PropertyKey = string> = Record<M, true | undefined>;
1480
- type ModelRef<T, M extends PropertyKey = string, G = T, S = T> = Ref<G, S> & [ModelRef<T, M, G, S>, DefineModelModifiers<M>];
1481
- interface DefineModelTransformOptions<T, M extends PropertyKey = string, G = T, S = T> {
1482
- get?: (value: T, modifiers: DefineModelModifiers<M>) => G;
1483
- set?: (value: S, modifiers: DefineModelModifiers<M>) => T;
1484
- }
1485
- type DefineModelBaseOptions<T, M extends PropertyKey = string, G = T, S = T> = Record<string, any> & DefineModelTransformOptions<T, M, G, S>;
1486
- type DefineModelRequiredOptions<T> = {
1487
- default: T | (() => T);
1488
- } | {
1489
- required: true;
1490
- };
1491
- declare function defineModel<T = any, M extends PropertyKey = string, G = T, S = T>(options: DefineModelBaseOptions<T, M, G, S> & DefineModelRequiredOptions<T>): ModelRef<T, M, G, S>;
1492
- declare function defineModel<T = any, M extends PropertyKey = string, G = T, S = T>(name: string, options: DefineModelBaseOptions<T, M, G, S> & DefineModelRequiredOptions<T>): ModelRef<T, M, G, S>;
1493
- declare function defineModel<T = any, M extends PropertyKey = string, G = T, S = T>(options?: DefineModelBaseOptions<T | undefined, M, G | undefined, S | undefined>): ModelRef<T | undefined, M, G | undefined, S | undefined>;
1494
- declare function defineModel<T = any, M extends PropertyKey = string, G = T, S = T>(name?: string, options?: DefineModelBaseOptions<T | undefined, M, G | undefined, S | undefined>): ModelRef<T | undefined, M, G | undefined, S | undefined>;
1495
- //#endregion
1496
- export { ActionContext, ActionSubscriber, type AllowedComponentProps, type AppConfig, type ComponentCustomProps, ComponentDefinition, type ComponentOptionsMixin, type ComponentPropsOptions, type ComponentPublicInstance, type ComponentTypeEmits, type ComputedDefinitions, ComputedGetter, ComputedRef, ComputedSetter, type CreateAppOptions, CustomRefFactory, CustomRefOptions, CustomRefSource, type DataOption, type DefineAppOptions, type DefineComponent, type DefineComponentOptions, DefineComponentTypePropsOptions, DefineComponentWithTypeProps, DefineModelModifiers, DefineModelTransformOptions, DefineStoreOptions, DisposableBag, DisposableLike, DisposableMethodName, DisposableObject, EffectScope, type EmitFn, type EmitsOptions, type ExtractComputed, type ExtractDefaultPropTypes, type ExtractMethods, type ExtractPropTypes, type ExtractPublicPropTypes, GlobalComponents, GlobalDirectives, type InferNativePropType, type InferNativeProps, type InferPropType, type InferProps, type InternalRuntimeState, type InternalRuntimeStateFields, LayoutHostBinding, type MapSources, MaybeRef, MaybeRefOrGetter, type MaybeUndefined, type MethodDefinitions, type MiniProgramAdapter, type MiniProgramAppOptions, type MiniProgramBehaviorIdentifier, type MiniProgramComponentBehaviorOptions, type MiniProgramComponentOptions, type MiniProgramComponentRawOptions, type MiniProgramInstance, type MiniProgramPageLifetimes, type ModelBinding, type ModelBindingOptions, type ModelBindingPayload, ModelModifiers, ModelRef, type MultiWatchSources, type MutationKind, type MutationOp, type MutationRecord, MutationType, type NativeComponent, type NativePropType, type NativePropsOptions, type NativeTypeHint, type NativeTypedProperty, type ObjectDirective, type OnCleanup, type PageFeatures, PageLayoutMeta, PageLayoutState, PageMeta, type PrelinkReactiveTreeOptions, type PropConstructor, type PropOptions, type PropType, type PublicProps, Ref, type RuntimeApp, type RuntimeInstance, type SetDataDebugInfo, type SetDataSnapshotOptions, type SetupContext, type SetupContextNativeInstance, type SetupContextRouter, SetupContextWithTypeProps, type SetupFunction, SetupFunctionWithTypeProps, ShallowRef, type ShallowUnwrapRef, StoreManager, StoreSubscribeOptions, StoreToRefsResult, SubscriptionCallback, TemplateRef, TemplateRefValue, TemplateRefs, ToRefs, type TriggerEventOptions, UpdatePerformanceListener, UpdatePerformanceListenerResult, UseIntersectionObserverOptions, UseIntersectionObserverResult, UseModelOptions, UsePageScrollThrottleOptions, UsePageScrollThrottleStopHandle, 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, WevuComponentConstructor, WevuDefaults, WevuGlobalComponents, WevuGlobalDirectives, WevuPageLayoutMap, type WevuPlugin, type WevuTypedRouterRouteMap, WritableComputedOptions, WritableComputedRef, addMutationRecorder, batch, callHookList, callHookReturn, callUpdateHooks, computed, createApp, createStore, createWevuComponent, createWevuScopedSlotComponent, customRef, defineComponent, defineEmits, defineExpose, defineModel, defineOptions, definePageMeta, defineProps, defineSlots, defineStore, effect, effectScope, endBatch, getCurrentInstance, getCurrentScope, getCurrentSetupContext, getDeepWatchStrategy, getReactiveVersion, hasInjectionContext, inject, injectGlobal, isNoSetData, isRaw, isReactive, 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, resolveRuntimePageLayoutName, runSetupFunction, setCurrentInstance, setCurrentSetupContext, setDeepWatchStrategy, setPageLayout, setRuntimeSetDataVisibility, setWevuDefaults, shallowReactive, shallowReadonly, shallowRef, startBatch, stop, storeToRefs, syncRuntimePageLayoutState, syncRuntimePageLayoutStateFromRuntime, teardownRuntimeInstance, toRaw, toRef, toRefs, toValue, touchReactive, traverse, triggerRef, unref, unregisterPageLayoutBridge, unregisterRuntimeLayoutHosts, useAttrs, useBindModel, useDisposables, useIntersectionObserver, useLayoutBridge, useLayoutHosts, useModel, useNativeInstance, useNativePageRouter, useNativeRouter, usePageLayout, usePageScrollThrottle, useSlots, useTemplateRef, useUpdatePerformanceListener, waitForLayoutHost, watch, watchEffect, withDefaults };
1
+ import { $ as WatchSources, $t as customRef, A as ComputedDefinitions, At as EffectScope, B as watchSyncEffect, Bt as ComputedGetter, C as MiniProgramComponentBehaviorOptions, Cn as NativeTypedProperty, Ct as prelinkReactiveTree, D as MiniProgramPageLifetimes, Dt as MutationRecord, E as MiniProgramInstance, En as PropType, Et as MutationOp, F as ModelBindingOptions, Ft as getCurrentScope, G as WatchCallback, Gt as computed, H as MaybeUndefined, Ht as ComputedSetter, I as ModelBindingPayload, It as onScopeDispose, J as WatchMultiSources, Jt as CustomRefSource, K as WatchEffect, Kt as CustomRefFactory, L as watch, Lt as startBatch, M as ExtractMethods, Mt as effect, N as MethodDefinitions, Nt as effectScope, O as TriggerEventOptions, Ot as addMutationRecorder, P as ModelBinding, Pt as endBatch, Q as WatchSourceValue, Qt as ShallowRef, R as watchEffect, Rt as stop, S as MiniProgramBehaviorIdentifier, Sn as NativeTypeHint, St as PrelinkReactiveTreeOptions, T as MiniProgramComponentRawOptions, Tn as PropOptions, Tt as MutationKind, U as MultiWatchSources, Ut as WritableComputedOptions, V as MapSources, Vt as ComputedRef, W as OnCleanup, Wt as WritableComputedRef, X as WatchScheduler, Xt as MaybeRefOrGetter, Y as WatchOptions, Yt as MaybeRef, Z as WatchSource, Zt as Ref, _ as RuntimeApp, _n as InferNativeProps, _t as markRaw, a as NativeComponent, at as toRef, b as MiniProgramAdapter, bn as NativePropType, bt as isShallowReactive, c as ShallowUnwrapRef, cn as SetupContextRouter, ct as shallowRef, d as SetupContext, dn as WevuTypedRouterRouteMap, dt as isReadonly, en as isRef, et as WatchStopHandle, f as SetupContextNativeInstance, fn as ComponentPropsOptions, ft as readonly, g as InternalRuntimeStateFields, gn as InferNativePropType, gt as isReactive, h as InternalRuntimeState, hn as ExtractPublicPropTypes, ht as isRaw, i as DefineComponent, it as ToRefs, j as ExtractComputed, jt as batch, k as ComponentPublicInstance, kt as removeMutationRecorder, l as VNode, lt as triggerRef, m as AppConfig, mn as ExtractPropTypes, mt as getReactiveVersion, n as ComponentCustomProps, nn as toValue, nt as setDeepWatchStrategy, o as ObjectDirective, ot as toRefs, p as SetupFunction, pn as ExtractDefaultPropTypes, pt as shallowReadonly, q as WatchEffectOptions, qt as CustomRefOptions, r as ComponentOptionsMixin, rn as unref, rt as traverse, s as PublicProps, st as isShallowRef, t as AllowedComponentProps, tn as ref, tt as getDeepWatchStrategy, u as VNodeProps, ut as isProxy, v as RuntimeInstance, vn as InferPropType, vt as reactive, w as MiniProgramComponentOptions, wn as PropConstructor, wt as touchReactive, x as MiniProgramAppOptions, xn as NativePropsOptions, xt as shallowReactive, y as WevuPlugin, yn as InferProps, yt as toRaw, z as watchPostEffect, zt as nextTick } from "./vue-types-D8BVm-8u.mjs";
2
+ import { $ as resolveRuntimePageLayoutName, $t as onUnload, A as UpdatePerformanceListener, An as CreateAppOptions, At as onAddToFavorites, B as registerComponent, Bt as onPageScroll, C as mergeModels, Cn as createApp, Ct as onBeforeUpdate, D as useNativeInstance, Dn as TemplateRefs, Dt as onServerPrefetch, E as useAttrs, En as TemplateRefValue, Et as onMounted, F as normalizeStyle, Fn as SetDataDebugInfo, Ft as onLaunch, G as provide, Gt as onRouteDone, H as hasInjectionContext, Ht as onReachBottom, I as runSetupFunction, In as SetDataSnapshotOptions, It as onLoad, J as UsePageScrollThrottleOptions, Jt as onShareTimeline, K as provideGlobal, Kt as onSaveExitState, L as mountRuntimeInstance, Lt as onMemoryWarning, M as UseUpdatePerformanceListenerStopHandle, Mn as DefineAppOptions, Mt as onDetached, N as useUpdatePerformanceListener, Nn as DefineComponentOptions, Nt as onError, O as useSlots, On as WevuGlobalComponents, Ot as onUnmounted, P as normalizeClass, Pn as PageFeatures, Pt as onHide, Q as WevuPageLayoutMap, Qt as onUnhandledRejection, R as setRuntimeSetDataVisibility, Rt as onMoved, S as UseModelOptions, Sn as setWevuDefaults, St as onBeforeUnmount, T as useModel, Tn as GlobalDirectives, Tt as onErrorCaptured, U as inject, Ut as onReady, V as registerApp, Vt as onPullDownRefresh, W as injectGlobal, Wt as onResize, X as usePageScrollThrottle, Xt as onTabItemTap, Y as UsePageScrollThrottleStopHandle, Yt as onShow, Z as PageLayoutState, Zt as onThemeChange, _ as TemplateRef, _n as createWevuComponent, _t as UseIntersectionObserverResult, a as PageMeta, an as setCurrentSetupContext, at as markNoSetData, b as useNativeRouter, bn as WevuDefaults, bt as onActivated, c as defineModel, cn as DisposableMethodName, ct as registerRuntimeLayoutHosts, d as defineProps, dn as ComponentDefinition, dt as unregisterPageLayoutBridge, en as callHookList, et as setPageLayout, f as defineSlots, fn as DefineComponentTypePropsOptions, ft as unregisterRuntimeLayoutHosts, g as EmitsOptions, gn as WevuComponentConstructor, gt as UseIntersectionObserverOptions, h as EmitFn, hn as SetupFunctionWithTypeProps, ht as waitForLayoutHost, i as PageLayoutMeta, in as setCurrentInstance, it as isNoSetData, j as UpdatePerformanceListenerResult, jn as DataOption, jt as onAttached, k as use, kn as WevuGlobalDirectives, kt as onUpdated, l as defineOptions, ln as DisposableObject, lt as resolveLayoutBridge, m as ComponentTypeEmits, mn as SetupContextWithTypeProps, mt as useLayoutHosts, n as DefineModelTransformOptions, nn as getCurrentInstance, nt as syncRuntimePageLayoutStateFromRuntime, o as defineEmits, on as DisposableBag, ot as LayoutHostBinding, p as withDefaults, pn as DefineComponentWithTypeProps, pt as useLayoutBridge, q as setGlobalProvidedValue, qt as onShareAppMessage, r as ModelRef, rn as getCurrentSetupContext, rt as usePageLayout, s as defineExpose, sn as DisposableLike, st as registerPageLayoutBridge, t as DefineModelModifiers, tn as callHookReturn, tt as syncRuntimePageLayoutState, u as definePageMeta, un as useDisposables, ut as resolveLayoutHost, v as useTemplateRef, vn as createWevuScopedSlotComponent, vt as useIntersectionObserver, w as useBindModel, wn as GlobalComponents, wt as onDeactivated, x as ModelModifiers, xn as resetWevuDefaults, xt as onBeforeMount, y as useNativePageRouter, yn as defineComponent, yt as callUpdateHooks, z as teardownRuntimeInstance, zt as onPageNotFound } from "./index-B7QVA9YG.mjs";
3
+ import { a as ActionContext, c as MutationType, d as SubscriptionCallback, i as defineStore, l as StoreManager, n as storeToRefs, o as ActionSubscriber, r as createStore, s as DefineStoreOptions, t as StoreToRefsResult, u as StoreSubscribeOptions } from "./index-CJdlA5zG.mjs";
4
+ export { ActionContext, ActionSubscriber, AllowedComponentProps, AppConfig, ComponentCustomProps, ComponentDefinition, ComponentOptionsMixin, ComponentPropsOptions, ComponentPublicInstance, ComponentTypeEmits, ComputedDefinitions, ComputedGetter, ComputedRef, ComputedSetter, CreateAppOptions, CustomRefFactory, CustomRefOptions, CustomRefSource, DataOption, DefineAppOptions, DefineComponent, DefineComponentOptions, DefineComponentTypePropsOptions, DefineComponentWithTypeProps, DefineModelModifiers, DefineModelTransformOptions, DefineStoreOptions, DisposableBag, DisposableLike, DisposableMethodName, DisposableObject, EffectScope, EmitFn, EmitsOptions, ExtractComputed, ExtractDefaultPropTypes, ExtractMethods, ExtractPropTypes, ExtractPublicPropTypes, GlobalComponents, GlobalDirectives, InferNativePropType, InferNativeProps, InferPropType, InferProps, InternalRuntimeState, InternalRuntimeStateFields, LayoutHostBinding, MapSources, MaybeRef, MaybeRefOrGetter, MaybeUndefined, MethodDefinitions, MiniProgramAdapter, MiniProgramAppOptions, MiniProgramBehaviorIdentifier, MiniProgramComponentBehaviorOptions, MiniProgramComponentOptions, MiniProgramComponentRawOptions, MiniProgramInstance, MiniProgramPageLifetimes, ModelBinding, ModelBindingOptions, ModelBindingPayload, ModelModifiers, ModelRef, MultiWatchSources, MutationKind, MutationOp, MutationRecord, MutationType, NativeComponent, NativePropType, NativePropsOptions, NativeTypeHint, NativeTypedProperty, ObjectDirective, OnCleanup, PageFeatures, PageLayoutMeta, PageLayoutState, PageMeta, PrelinkReactiveTreeOptions, PropConstructor, PropOptions, PropType, PublicProps, Ref, RuntimeApp, RuntimeInstance, SetDataDebugInfo, SetDataSnapshotOptions, SetupContext, SetupContextNativeInstance, SetupContextRouter, SetupContextWithTypeProps, SetupFunction, SetupFunctionWithTypeProps, ShallowRef, ShallowUnwrapRef, StoreManager, StoreSubscribeOptions, StoreToRefsResult, SubscriptionCallback, TemplateRef, TemplateRefValue, TemplateRefs, ToRefs, TriggerEventOptions, UpdatePerformanceListener, UpdatePerformanceListenerResult, UseIntersectionObserverOptions, UseIntersectionObserverResult, UseModelOptions, UsePageScrollThrottleOptions, UsePageScrollThrottleStopHandle, UseUpdatePerformanceListenerStopHandle, VNode, VNodeProps, WatchCallback, WatchEffect, WatchEffectOptions, WatchMultiSources, WatchOptions, WatchScheduler, WatchSource, WatchSourceValue, WatchSources, WatchStopHandle, WevuComponentConstructor, WevuDefaults, WevuGlobalComponents, WevuGlobalDirectives, WevuPageLayoutMap, WevuPlugin, WevuTypedRouterRouteMap, WritableComputedOptions, WritableComputedRef, addMutationRecorder, batch, callHookList, callHookReturn, callUpdateHooks, computed, createApp, createStore, createWevuComponent, createWevuScopedSlotComponent, customRef, defineComponent, defineEmits, defineExpose, defineModel, defineOptions, definePageMeta, defineProps, defineSlots, defineStore, effect, effectScope, endBatch, getCurrentInstance, getCurrentScope, getCurrentSetupContext, getDeepWatchStrategy, 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, 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, useAttrs, useBindModel, useDisposables, useIntersectionObserver, useLayoutBridge, useLayoutHosts, useModel, useNativeInstance, useNativePageRouter, useNativeRouter, usePageLayout, usePageScrollThrottle, useSlots, useTemplateRef, useUpdatePerformanceListener, waitForLayoutHost, watch, watchEffect, watchPostEffect, watchSyncEffect, withDefaults };