wevu 6.13.0 → 6.13.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index-BPZxNlC8.d.mts +246 -0
- package/dist/{index-B7QVA9YG.d.mts → index-BvyrZ_XI.d.mts} +524 -2
- package/dist/index.d.mts +4 -4
- package/dist/index.mjs +2 -2
- package/dist/router-DW4Yf9Yj.d.mts +46 -0
- package/dist/router.d.mts +1 -1
- package/dist/{src-DLHIGzBf.mjs → src-xqSS8INA.mjs} +6 -2
- package/dist/store.d.mts +1 -1
- package/dist/vue-demi.d.mts +3 -4
- package/dist/vue-demi.mjs +1 -2
- package/package.json +3 -3
- package/dist/index-CJdlA5zG.d.mts +0 -112
- package/dist/vue-types-D8BVm-8u.d.mts +0 -698
|
@@ -1,5 +1,524 @@
|
|
|
1
1
|
import { t as WeappIntrinsicElements } from "./weappIntrinsicElements-BogJZUKk.mjs";
|
|
2
|
-
import {
|
|
2
|
+
import { B as ComponentPropsOptions, C as ComputedRef, N as Ref, P as ShallowRef, S as ComputedGetter, T as WritableComputedOptions, q as InferProps, y as ShallowUnwrapRef } from "./index-BPZxNlC8.mjs";
|
|
3
|
+
import { a as SetupContextRouter } from "./router-DW4Yf9Yj.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
|
+
/**
|
|
155
|
+
* 判断值是否为只读代理或只读 ref 包装。
|
|
156
|
+
*/
|
|
157
|
+
declare function isReadonly(value: unknown): boolean;
|
|
158
|
+
/**
|
|
159
|
+
* 判断值是否为响应式代理或只读代理。
|
|
160
|
+
*/
|
|
161
|
+
declare function isProxy(value: unknown): boolean;
|
|
162
|
+
//#endregion
|
|
163
|
+
//#region src/reactivity/shallowRef.d.ts
|
|
164
|
+
declare function shallowRef<T>(value: T): Ref<T>;
|
|
165
|
+
declare function shallowRef<T>(value: T, defaultValue: T): Ref<T>;
|
|
166
|
+
/**
|
|
167
|
+
* 判断传入值是否为浅层 ref。
|
|
168
|
+
*
|
|
169
|
+
* @param r 待判断的值
|
|
170
|
+
* @returns 若为浅层 ref 则返回 true
|
|
171
|
+
*/
|
|
172
|
+
declare function isShallowRef(r: any): r is Ref<any>;
|
|
173
|
+
/**
|
|
174
|
+
* 主动触发一次浅层 ref 的更新(无需深度比较)。
|
|
175
|
+
*
|
|
176
|
+
* @param ref 需要触发的 ref
|
|
177
|
+
*/
|
|
178
|
+
declare function triggerRef<T>(ref: Ref<T>): void;
|
|
179
|
+
//#endregion
|
|
180
|
+
//#region src/reactivity/toRefs.d.ts
|
|
181
|
+
/**
|
|
182
|
+
* 为源响应式对象的单个属性创建 ref,可读可写并与原属性保持同步。
|
|
183
|
+
*
|
|
184
|
+
* @param object 源响应式对象
|
|
185
|
+
* @param key 属性名
|
|
186
|
+
* @returns 指向该属性的 ref
|
|
187
|
+
*
|
|
188
|
+
* @example
|
|
189
|
+
* ```ts
|
|
190
|
+
* const state = reactive({ foo: 1 })
|
|
191
|
+
* const fooRef = toRef(state, 'foo')
|
|
192
|
+
*
|
|
193
|
+
* fooRef.value++
|
|
194
|
+
* console.log(state.foo) // 2
|
|
195
|
+
* ```
|
|
196
|
+
*/
|
|
197
|
+
declare function toRef<T extends object, K extends keyof T>(object: T, key: K): ToRef<T[K]>;
|
|
198
|
+
declare function toRef<T extends object, K extends keyof T>(object: T, key: K, defaultValue: T[K]): ToRef<T[K]>;
|
|
199
|
+
/**
|
|
200
|
+
* 将一个响应式对象转换成“同结构的普通对象”,其中每个字段都是指向原对象对应属性的 ref。
|
|
201
|
+
*
|
|
202
|
+
* @param object 待转换的响应式对象
|
|
203
|
+
* @returns 包含若干 ref 的普通对象
|
|
204
|
+
*
|
|
205
|
+
* @example
|
|
206
|
+
* ```ts
|
|
207
|
+
* const state = reactive({ foo: 1, bar: 2 })
|
|
208
|
+
* const stateAsRefs = toRefs(state)
|
|
209
|
+
*
|
|
210
|
+
* stateAsRefs.foo.value++ // 2
|
|
211
|
+
* state.foo // 2
|
|
212
|
+
* ```
|
|
213
|
+
*/
|
|
214
|
+
declare function toRefs<T extends object>(object: T): ToRefs<T>;
|
|
215
|
+
/**
|
|
216
|
+
* toRefs 返回值的类型辅助
|
|
217
|
+
*/
|
|
218
|
+
type ToRef<T> = T extends Ref<any> ? T : Ref<T>;
|
|
219
|
+
type ToRefs<T extends object> = { [K in keyof T]: ToRef<T[K]> };
|
|
220
|
+
//#endregion
|
|
221
|
+
//#region src/reactivity/traverse.d.ts
|
|
222
|
+
/**
|
|
223
|
+
* 深度遍历工具(框架内部依赖收集使用)。
|
|
224
|
+
* @internal
|
|
225
|
+
*/
|
|
226
|
+
declare function traverse(value: any, depth?: number, seen?: Map<object, number>): any;
|
|
227
|
+
//#endregion
|
|
228
|
+
//#region src/reactivity/watch/types.d.ts
|
|
229
|
+
type OnCleanup = (cleanupFn: () => void) => void;
|
|
230
|
+
type WatchEffect = (onCleanup: OnCleanup) => void;
|
|
231
|
+
type WatchSource<T = any> = Ref<T> | ComputedRef<T> | (() => T);
|
|
232
|
+
type WatchCallback<V = any, OV = any> = (value: V, oldValue: OV, onCleanup: OnCleanup) => void;
|
|
233
|
+
type WatchScheduler = (job: () => void, isFirstRun: boolean) => void;
|
|
234
|
+
type MaybeUndefined<T, Immediate> = Immediate extends true ? T | undefined : T;
|
|
235
|
+
type MultiWatchSources = (WatchSource<unknown> | object)[];
|
|
236
|
+
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 };
|
|
237
|
+
type WatchSourceValue<S> = S extends WatchSource<infer V> ? V : S extends object ? S : never;
|
|
238
|
+
type WatchSources<T = any> = WatchSource<T> | ReadonlyArray<WatchSource<unknown> | object> | (T extends object ? T : never);
|
|
239
|
+
type IsTuple<T extends ReadonlyArray<any>> = number extends T['length'] ? false : true;
|
|
240
|
+
type WatchMultiSources<T extends ReadonlyArray<WatchSource<unknown> | object>> = IsTuple<T> extends true ? { [K in keyof T]: WatchSourceValue<T[K]> } : Array<WatchSourceValue<T[number]>>;
|
|
241
|
+
interface WatchEffectOptions {
|
|
242
|
+
flush?: 'pre' | 'post' | 'sync';
|
|
243
|
+
}
|
|
244
|
+
interface WatchOptions<Immediate extends boolean = false> extends WatchEffectOptions {
|
|
245
|
+
immediate?: Immediate;
|
|
246
|
+
deep?: boolean | number;
|
|
247
|
+
once?: boolean;
|
|
248
|
+
scheduler?: WatchScheduler;
|
|
249
|
+
}
|
|
250
|
+
interface WatchStopHandle {
|
|
251
|
+
(): void;
|
|
252
|
+
stop: () => void;
|
|
253
|
+
pause: () => void;
|
|
254
|
+
resume: () => void;
|
|
255
|
+
}
|
|
256
|
+
type DeepWatchStrategy = 'version' | 'traverse';
|
|
257
|
+
/**
|
|
258
|
+
* 设置深度 watch 内部策略(测试/框架内部使用)。
|
|
259
|
+
* @internal
|
|
260
|
+
*/
|
|
261
|
+
declare function setDeepWatchStrategy(strategy: DeepWatchStrategy): void;
|
|
262
|
+
/**
|
|
263
|
+
* 获取深度 watch 内部策略(测试/框架内部使用)。
|
|
264
|
+
* @internal
|
|
265
|
+
*/
|
|
266
|
+
declare function getDeepWatchStrategy(): DeepWatchStrategy;
|
|
267
|
+
//#endregion
|
|
268
|
+
//#region src/reactivity/watch.d.ts
|
|
269
|
+
declare function watch<T, Immediate extends Readonly<boolean> = false>(source: WatchSource<T>, cb: WatchCallback<T, MaybeUndefined<T, Immediate>>, options?: WatchOptions<Immediate>): WatchStopHandle;
|
|
270
|
+
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;
|
|
271
|
+
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;
|
|
272
|
+
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;
|
|
273
|
+
/**
|
|
274
|
+
* watchEffect 注册一个响应式副作用,可选清理函数。
|
|
275
|
+
* 副作用会立即执行,并在依赖变化时重新运行。
|
|
276
|
+
*/
|
|
277
|
+
declare function watchEffect(effectFn: WatchEffect, options?: WatchEffectOptions): WatchStopHandle;
|
|
278
|
+
/**
|
|
279
|
+
* 以后置刷新的方式运行副作用,与 Vue 的 `watchPostEffect()` 兼容。
|
|
280
|
+
*/
|
|
281
|
+
declare function watchPostEffect(effectFn: WatchEffect, options?: Omit<WatchEffectOptions, 'flush'>): WatchStopHandle;
|
|
282
|
+
/**
|
|
283
|
+
* 以同步刷新的方式运行副作用,与 Vue 的 `watchSyncEffect()` 兼容。
|
|
284
|
+
*/
|
|
285
|
+
declare function watchSyncEffect(effectFn: WatchEffect, options?: Omit<WatchEffectOptions, 'flush'>): WatchStopHandle;
|
|
286
|
+
//#endregion
|
|
287
|
+
//#region src/runtime/types/core.d.ts
|
|
288
|
+
type ComputedDefinitions = Record<string, ComputedGetter<any> | WritableComputedOptions<any>>;
|
|
289
|
+
type MethodDefinitions = Record<string, (...args: any[]) => any>;
|
|
290
|
+
type ExtractComputed<C extends ComputedDefinitions> = { [K in keyof C]: C[K] extends ComputedGetter<infer R> ? R : C[K] extends WritableComputedOptions<infer R> ? R : never };
|
|
291
|
+
type ExtractMethods<M extends MethodDefinitions> = { [K in keyof M]: M[K] extends ((...args: infer P) => infer R) ? (...args: P) => R : never };
|
|
292
|
+
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> & {
|
|
293
|
+
$attrs: Record<string, any>;
|
|
294
|
+
$props: P;
|
|
295
|
+
$slots: S;
|
|
296
|
+
$emit: (event: string, ...args: any[]) => void;
|
|
297
|
+
};
|
|
298
|
+
interface ModelBindingOptions<T = any, Event extends string = string, ValueProp extends string = string, Formatted = T> {
|
|
299
|
+
event?: Event;
|
|
300
|
+
valueProp?: ValueProp;
|
|
301
|
+
parser?: (payload: any) => T;
|
|
302
|
+
formatter?: (value: T) => Formatted;
|
|
303
|
+
}
|
|
304
|
+
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 };
|
|
305
|
+
interface ModelBinding<T = any> {
|
|
306
|
+
value: T;
|
|
307
|
+
update: (value: T) => void;
|
|
308
|
+
model: <Event extends string = 'input', ValueProp extends string = 'value', Formatted = T>(options?: ModelBindingOptions<T, Event, ValueProp, Formatted>) => ModelBindingPayload<T, Event, ValueProp, Formatted>;
|
|
309
|
+
}
|
|
310
|
+
//#endregion
|
|
311
|
+
//#region src/runtime/types/miniprogram.d.ts
|
|
312
|
+
interface MiniProgramAdapter {
|
|
313
|
+
setData?: (payload: Record<string, any>) => void | Promise<void>;
|
|
314
|
+
}
|
|
315
|
+
type MiniProgramComponentBehaviorOptions = WechatMiniprogram.Component.ComponentOptions;
|
|
316
|
+
type MpComponentOptions = WechatMiniprogram.Component.TrivialOption;
|
|
317
|
+
type MiniProgramBehaviorIdentifier = WechatMiniprogram.Behavior.Identifier | string;
|
|
318
|
+
interface MiniProgramComponentOptions {
|
|
319
|
+
/**
|
|
320
|
+
* 类似于 mixins/traits 的组件间代码复用机制(behaviors)。
|
|
321
|
+
*/
|
|
322
|
+
behaviors?: MiniProgramBehaviorIdentifier[];
|
|
323
|
+
/**
|
|
324
|
+
* 组件接受的外部样式类。
|
|
325
|
+
*/
|
|
326
|
+
externalClasses?: MpComponentOptions['externalClasses'];
|
|
327
|
+
/**
|
|
328
|
+
* 组件间关系定义。
|
|
329
|
+
*/
|
|
330
|
+
relations?: MpComponentOptions['relations'];
|
|
331
|
+
/**
|
|
332
|
+
* 组件数据字段监听器,用于监听 properties 和 data 的变化。
|
|
333
|
+
*/
|
|
334
|
+
observers?: MpComponentOptions['observers'];
|
|
335
|
+
/**
|
|
336
|
+
* 组件生命周期声明对象:
|
|
337
|
+
* `created`/`attached`/`ready`/`moved`/`detached`/`error`。
|
|
338
|
+
*
|
|
339
|
+
* 注意:wevu 会在 `attached/ready/detached/moved/error` 阶段做桥接与包装。
|
|
340
|
+
* setup 默认在 `attached` 执行,可通过 `setupLifecycle = "created"` 切换回旧行为。
|
|
341
|
+
*/
|
|
342
|
+
lifetimes?: MpComponentOptions['lifetimes'];
|
|
343
|
+
/**
|
|
344
|
+
* 组件所在页面的生命周期声明对象:`show`/`hide`/`resize`/`routeDone`。
|
|
345
|
+
*/
|
|
346
|
+
pageLifetimes?: MpComponentOptions['pageLifetimes'];
|
|
347
|
+
/**
|
|
348
|
+
* 组件选项(multipleSlots/styleIsolation/pureDataPattern/virtualHost 等)。
|
|
349
|
+
*/
|
|
350
|
+
options?: MpComponentOptions['options'];
|
|
351
|
+
/**
|
|
352
|
+
* 定义段过滤器,用于自定义组件扩展。
|
|
353
|
+
*/
|
|
354
|
+
definitionFilter?: MpComponentOptions['definitionFilter'];
|
|
355
|
+
/**
|
|
356
|
+
* 组件自定义导出:当使用 `behavior: wx://component-export` 时,
|
|
357
|
+
* 可用于指定组件被 selectComponent 调用时的返回值。
|
|
358
|
+
*
|
|
359
|
+
* wevu 默认会将 setup() 中通过 `expose()` 写入的内容作为 export() 返回值,
|
|
360
|
+
* 因此大多数情况下无需手动编写 export();若同时提供 export(),则会与 expose() 结果浅合并。
|
|
361
|
+
*/
|
|
362
|
+
export?: MpComponentOptions['export'];
|
|
363
|
+
/**
|
|
364
|
+
* 原生 properties(与 wevu 的 props 不同)。
|
|
365
|
+
*
|
|
366
|
+
* - 推荐:使用 wevu 的 `props` 选项,让运行时规范化为小程序 `properties`。
|
|
367
|
+
* - 兼容:也可以直接传入小程序 `properties`。
|
|
368
|
+
*/
|
|
369
|
+
properties?: MpComponentOptions['properties'];
|
|
370
|
+
/**
|
|
371
|
+
* 旧式生命周期(基础库 `2.2.3` 起推荐使用 `lifetimes` 字段)。
|
|
372
|
+
* 保留以增强类型提示与兼容性。
|
|
373
|
+
*/
|
|
374
|
+
created?: MpComponentOptions['created'];
|
|
375
|
+
attached?: MpComponentOptions['attached'];
|
|
376
|
+
ready?: MpComponentOptions['ready'];
|
|
377
|
+
moved?: MpComponentOptions['moved'];
|
|
378
|
+
detached?: MpComponentOptions['detached'];
|
|
379
|
+
error?: MpComponentOptions['error'];
|
|
380
|
+
}
|
|
381
|
+
type MiniProgramAppOptions<T extends Record<string, any> = Record<string, any>> = WechatMiniprogram.App.Options<T>;
|
|
382
|
+
type TriggerEventOptions = WechatMiniprogram.Component.TriggerEventOption;
|
|
383
|
+
type MiniProgramInstance = WechatMiniprogram.Component.TrivialInstance | WechatMiniprogram.Page.TrivialInstance | WechatMiniprogram.App.TrivialInstance;
|
|
384
|
+
type MiniProgramPageLifetimes = Partial<WechatMiniprogram.Page.ILifetime>;
|
|
385
|
+
type MiniProgramComponentRawOptions = Omit<WechatMiniprogram.Component.TrivialOption, 'behaviors'> & {
|
|
386
|
+
behaviors?: MiniProgramBehaviorIdentifier[];
|
|
387
|
+
} & MiniProgramPageLifetimes & Record<string, any>;
|
|
388
|
+
//#endregion
|
|
389
|
+
//#region src/runtime/types/runtime.d.ts
|
|
390
|
+
interface AppConfig {
|
|
391
|
+
globalProperties: Record<string, any>;
|
|
392
|
+
}
|
|
393
|
+
type WevuPlugin = ((app: RuntimeApp<any, any, any>, ...options: any[]) => any) | {
|
|
394
|
+
install: (app: RuntimeApp<any, any, any>, ...options: any[]) => any;
|
|
395
|
+
};
|
|
396
|
+
interface RuntimeApp<D extends object, C extends ComputedDefinitions, M extends MethodDefinitions> {
|
|
397
|
+
mount: (adapter?: MiniProgramAdapter) => RuntimeInstance<D, C, M>;
|
|
398
|
+
use: (plugin: WevuPlugin, ...options: any[]) => RuntimeApp<D, C, M>;
|
|
399
|
+
provide: <T>(key: any, value: T) => RuntimeApp<D, C, M>;
|
|
400
|
+
onUnmount: (cleanup: () => void) => RuntimeApp<D, C, M>;
|
|
401
|
+
unmount: () => void;
|
|
402
|
+
config: AppConfig;
|
|
403
|
+
version: string;
|
|
404
|
+
}
|
|
405
|
+
interface RuntimeInstance<D extends object, C extends ComputedDefinitions, M extends MethodDefinitions> {
|
|
406
|
+
readonly state: D;
|
|
407
|
+
readonly proxy: ComponentPublicInstance<D, C, M>;
|
|
408
|
+
readonly methods: ExtractMethods<M>;
|
|
409
|
+
readonly computed: Readonly<ExtractComputed<C>>;
|
|
410
|
+
readonly adapter?: MiniProgramAdapter;
|
|
411
|
+
bindModel: <T = any>(path: string, options?: ModelBindingOptions<T>) => ModelBinding<T>;
|
|
412
|
+
watch: <T>(source: (() => T) | Record<string, any>, cb: (value: T, oldValue: T) => void, options?: WatchOptions) => WatchStopHandle;
|
|
413
|
+
snapshot: () => Record<string, any>;
|
|
414
|
+
unmount: () => void;
|
|
415
|
+
}
|
|
416
|
+
interface InternalRuntimeStateFields {
|
|
417
|
+
__wevu?: RuntimeInstance<any, any, any>;
|
|
418
|
+
__wevuIsAppInstance?: boolean;
|
|
419
|
+
__wevuRuntimeApp?: RuntimeApp<any, any, any>;
|
|
420
|
+
__wevuSetPageLayout?: (layout: string | false, props?: Record<string, any>) => void;
|
|
421
|
+
__wevuWatchStops?: WatchStopHandle[];
|
|
422
|
+
__wevuLayoutHostBridge?: Record<string, any>;
|
|
423
|
+
$wevu?: RuntimeInstance<any, any, any>;
|
|
424
|
+
__wevuHooks?: Record<string, any>;
|
|
425
|
+
__wevuExposed?: Record<string, any>;
|
|
426
|
+
__wevuAttrs?: Record<string, any>;
|
|
427
|
+
__wevuEffectScope?: EffectScope;
|
|
428
|
+
__wevuPropKeys?: string[];
|
|
429
|
+
__wevuTemplateRefs?: unknown[];
|
|
430
|
+
__wevuTemplateRefMap?: Map<string, Ref<any>>;
|
|
431
|
+
__wevuTemplateRefsPending?: boolean;
|
|
432
|
+
}
|
|
433
|
+
type InternalRuntimeState = InternalRuntimeStateFields & Partial<MiniProgramInstance>;
|
|
434
|
+
//#endregion
|
|
435
|
+
//#region src/runtime/types/props/setup.d.ts
|
|
436
|
+
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;
|
|
437
|
+
type SetupContextNativeInstance = InternalRuntimeState & {
|
|
438
|
+
/**
|
|
439
|
+
* 派发组件事件(页面/应用场景下不可用时会安全降级为 no-op)
|
|
440
|
+
*/
|
|
441
|
+
triggerEvent: (eventName: string, detail?: any, options?: TriggerEventOptions) => void;
|
|
442
|
+
/**
|
|
443
|
+
* 创建选择器查询对象(不可用时返回 undefined)
|
|
444
|
+
*/
|
|
445
|
+
createSelectorQuery: () => WechatMiniprogram.SelectorQuery | undefined;
|
|
446
|
+
/**
|
|
447
|
+
* 创建交叉观察器(不可用时返回 undefined)
|
|
448
|
+
*/
|
|
449
|
+
createIntersectionObserver: (options?: WechatMiniprogram.CreateIntersectionObserverOption) => WechatMiniprogram.IntersectionObserver | undefined;
|
|
450
|
+
/**
|
|
451
|
+
* 提交视图层更新
|
|
452
|
+
*/
|
|
453
|
+
setData: (payload: Record<string, any>, callback?: () => void) => void | Promise<void> | undefined;
|
|
454
|
+
/**
|
|
455
|
+
* 监听组件更新性能统计(不可用时返回 undefined)
|
|
456
|
+
*/
|
|
457
|
+
setUpdatePerformanceListener: (listener?: ((result: Record<string, any>) => void)) => void | undefined;
|
|
458
|
+
/**
|
|
459
|
+
* 相对于当前组件路径的 Router(基础库 2.16.1+)。
|
|
460
|
+
* 低版本基础库可能不存在,建议优先使用 `useNativeRouter()` 获取带降级能力的路由对象。
|
|
461
|
+
*/
|
|
462
|
+
router?: SetupContextRouter;
|
|
463
|
+
/**
|
|
464
|
+
* 相对于当前页面路径的 Router(基础库 2.16.1+)。
|
|
465
|
+
* 低版本基础库可能不存在,建议优先使用 `useNativePageRouter()` 获取带降级能力的路由对象。
|
|
466
|
+
*/
|
|
467
|
+
pageRouter?: SetupContextRouter;
|
|
468
|
+
};
|
|
469
|
+
interface SetupContext<D extends object, C extends ComputedDefinitions, M extends MethodDefinitions, P extends ComponentPropsOptions = ComponentPropsOptions> {
|
|
470
|
+
/**
|
|
471
|
+
* 组件 props(来自小程序 properties)
|
|
472
|
+
*/
|
|
473
|
+
props: InferProps<P>;
|
|
474
|
+
/**
|
|
475
|
+
* 运行时实例
|
|
476
|
+
*/
|
|
477
|
+
runtime: RuntimeInstance<D, C, M>;
|
|
478
|
+
/**
|
|
479
|
+
* 响应式状态
|
|
480
|
+
*/
|
|
481
|
+
state: D;
|
|
482
|
+
/**
|
|
483
|
+
* 公开实例代理
|
|
484
|
+
*/
|
|
485
|
+
proxy: RuntimeInstance<D, C, M>['proxy'];
|
|
486
|
+
/**
|
|
487
|
+
* 双向绑定辅助方法
|
|
488
|
+
*/
|
|
489
|
+
bindModel: RuntimeInstance<D, C, M>['bindModel'];
|
|
490
|
+
/**
|
|
491
|
+
* watch 辅助方法
|
|
492
|
+
*/
|
|
493
|
+
watch: RuntimeInstance<D, C, M>['watch'];
|
|
494
|
+
/**
|
|
495
|
+
* 小程序内部实例
|
|
496
|
+
*/
|
|
497
|
+
instance: SetupContextNativeInstance;
|
|
498
|
+
/**
|
|
499
|
+
* 通过小程序 `triggerEvent(eventName, detail?, options?)` 派发事件。
|
|
500
|
+
*
|
|
501
|
+
* 为兼容 Vue 3 的 `emit(event, ...args)`:
|
|
502
|
+
* - `emit(name)` -> `detail = undefined`
|
|
503
|
+
* - `emit(name, payload)` -> `detail = payload`
|
|
504
|
+
* - `emit(name, payload, options)`(当最后一个参数是事件选项)-> `detail = payload`
|
|
505
|
+
* - `emit(name, a, b, c)` -> `detail = [a, b, c]`
|
|
506
|
+
*/
|
|
507
|
+
emit: (event: string, ...args: any[]) => void;
|
|
508
|
+
/**
|
|
509
|
+
* Vue 3 对齐:expose 公共属性
|
|
510
|
+
*/
|
|
511
|
+
expose: (exposed: Record<string, any>) => void;
|
|
512
|
+
/**
|
|
513
|
+
* Vue 3 对齐:attrs(小程序场景为非 props 属性集合)
|
|
514
|
+
*/
|
|
515
|
+
attrs: Record<string, any>;
|
|
516
|
+
/**
|
|
517
|
+
* Vue 3 对齐:slots(小程序场景为只读空对象兜底,不提供可调用 slot 函数)
|
|
518
|
+
*/
|
|
519
|
+
slots: Record<string, any>;
|
|
520
|
+
}
|
|
521
|
+
//#endregion
|
|
3
522
|
//#region src/runtime/types/setData.d.ts
|
|
4
523
|
interface SetDataSnapshotOptions {
|
|
5
524
|
/**
|
|
@@ -1006,4 +1525,7 @@ declare function defineModel<T = any, M extends PropertyKey = string, G = T, S =
|
|
|
1006
1525
|
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>;
|
|
1007
1526
|
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>;
|
|
1008
1527
|
//#endregion
|
|
1009
|
-
|
|
1528
|
+
//#region src/version.d.ts
|
|
1529
|
+
declare const version: string;
|
|
1530
|
+
//#endregion
|
|
1531
|
+
export { WevuPageLayoutMap as $, MiniProgramInstance as $n, MutationOp as $r, onUnhandledRejection as $t, use as A, WevuGlobalDirectives as An, traverse as Ar, onUpdated as At, teardownRuntimeInstance as B, SetupFunction as Bn, shallowReadonly as Br, onPageNotFound as Bt, UseModelOptions as C, setWevuDefaults as Cn, WatchScheduler as Cr, onBeforeUnmount as Ct, useAttrs as D, TemplateRefValue as Dn, WatchStopHandle as Dr, onMounted as Dt, useModel as E, GlobalDirectives as En, WatchSources as Er, onErrorCaptured as Et, normalizeClass as F, PageFeatures as Fn, shallowRef as Fr, onHide as Ft, injectGlobal as G, RuntimeInstance as Gn, reactive as Gr, onResize as Gt, registerApp as H, InternalRuntimeState as Hn, isRaw as Hr, onPullDownRefresh as Ht, normalizeStyle as I, SetDataDebugInfo as In, triggerRef as Ir, onLaunch as It, setGlobalProvidedValue as J, MiniProgramAppOptions as Jn, shallowReactive as Jr, onShareAppMessage as Jt, provide as K, WevuPlugin as Kn, toRaw as Kr, onRouteDone as Kt, runSetupFunction as L, SetDataSnapshotOptions as Ln, isProxy as Lr, onLoad as Lt, UpdatePerformanceListenerResult as M, DataOption as Mn, toRef as Mr, onAttached as Mt, UseUpdatePerformanceListenerStopHandle as N, DefineAppOptions as Nn, toRefs as Nr, onDetached as Nt, useNativeInstance as O, TemplateRefs as On, getDeepWatchStrategy as Or, onServerPrefetch as Ot, useUpdatePerformanceListener as P, DefineComponentOptions as Pn, isShallowRef as Pr, onError as Pt, PageLayoutState as Q, MiniProgramComponentRawOptions as Qn, MutationKind as Qr, onThemeChange as Qt, mountRuntimeInstance as R, SetupContext as Rn, isReadonly as Rr, onMemoryWarning as Rt, ModelModifiers as S, resetWevuDefaults as Sn, WatchOptions as Sr, onBeforeMount as St, useBindModel as T, GlobalComponents as Tn, WatchSourceValue as Tr, onDeactivated as Tt, hasInjectionContext as U, InternalRuntimeStateFields as Un, isReactive as Ur, onReachBottom as Ut, registerComponent as V, AppConfig as Vn, getReactiveVersion as Vr, onPageScroll as Vt, inject as W, RuntimeApp as Wn, markRaw as Wr, onReady as Wt, UsePageScrollThrottleStopHandle as X, MiniProgramComponentBehaviorOptions as Xn, prelinkReactiveTree as Xr, onShow as Xt, UsePageScrollThrottleOptions as Y, MiniProgramBehaviorIdentifier as Yn, PrelinkReactiveTreeOptions as Yr, onShareTimeline as Yt, usePageScrollThrottle as Z, MiniProgramComponentOptions as Zn, touchReactive as Zr, onTabItemTap as Zt, EmitsOptions as _, WevuComponentConstructor as _n, OnCleanup as _r, UseIntersectionObserverOptions as _t, PageLayoutMeta as a, effect as ai, setCurrentInstance as an, ExtractMethods as ar, isNoSetData as at, useNativePageRouter as b, defineComponent as bn, WatchEffectOptions as br, callUpdateHooks as bt, defineExpose as c, getCurrentScope as ci, DisposableLike as cn, ModelBindingOptions as cr, registerPageLayoutBridge as ct, definePageMeta as d, stop as di, useDisposables as dn, watchEffect as dr, resolveLayoutHost as dt, MutationRecord as ei, onUnload as en, MiniProgramPageLifetimes as er, resolveRuntimePageLayoutName as et, defineProps as f, nextTick as fi, ComponentDefinition as fn, watchPostEffect as fr, unregisterPageLayoutBridge as ft, EmitFn as g, SetupFunctionWithTypeProps as gn, MultiWatchSources as gr, waitForLayoutHost as gt, ComponentTypeEmits as h, SetupContextWithTypeProps as hn, MaybeUndefined as hr, useLayoutHosts as ht, ModelRef as i, batch as ii, getCurrentSetupContext as in, ExtractComputed as ir, usePageLayout as it, UpdatePerformanceListener as j, CreateAppOptions as jn, ToRefs as jr, onAddToFavorites as jt, useSlots as k, WevuGlobalComponents as kn, setDeepWatchStrategy as kr, onUnmounted as kt, defineModel as l, onScopeDispose as li, DisposableMethodName as ln, ModelBindingPayload as lr, registerRuntimeLayoutHosts as lt, withDefaults as m, DefineComponentWithTypeProps as mn, MapSources as mr, useLayoutBridge as mt, DefineModelModifiers as n, removeMutationRecorder as ni, callHookReturn as nn, ComponentPublicInstance as nr, syncRuntimePageLayoutState as nt, PageMeta as o, effectScope as oi, setCurrentSetupContext as on, MethodDefinitions as or, markNoSetData as ot, defineSlots as p, DefineComponentTypePropsOptions as pn, watchSyncEffect as pr, unregisterRuntimeLayoutHosts as pt, provideGlobal as q, MiniProgramAdapter as qn, isShallowReactive as qr, onSaveExitState as qt, DefineModelTransformOptions as r, EffectScope as ri, getCurrentInstance as rn, ComputedDefinitions as rr, syncRuntimePageLayoutStateFromRuntime as rt, defineEmits as s, endBatch as si, DisposableBag as sn, ModelBinding as sr, LayoutHostBinding as st, version as t, addMutationRecorder as ti, callHookList as tn, TriggerEventOptions as tr, setPageLayout as tt, defineOptions as u, startBatch as ui, DisposableObject as un, watch as ur, resolveLayoutBridge as ut, TemplateRef as v, createWevuComponent as vn, WatchCallback as vr, UseIntersectionObserverResult as vt, mergeModels as w, createApp as wn, WatchSource as wr, onBeforeUpdate as wt, useNativeRouter as x, WevuDefaults as xn, WatchMultiSources as xr, onActivated as xt, useTemplateRef as y, createWevuScopedSlotComponent as yn, WatchEffect as yr, useIntersectionObserver as yt, setRuntimeSetDataVisibility as z, SetupContextNativeInstance as zn, readonly as zr, onMoved as zt };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as
|
|
2
|
-
import {
|
|
3
|
-
import { a as
|
|
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 };
|
|
1
|
+
import { $ as PropOptions, A as CustomRefSource, B as ComponentPropsOptions, C as ComputedRef, D as computed, E as WritableComputedRef, F as customRef, G as InferNativeProps, H as ExtractPropTypes, I as isRef, J as NativePropType, K as InferPropType, L as ref, M as MaybeRefOrGetter, N as Ref, O as CustomRefFactory, P as ShallowRef, Q as PropConstructor, R as toValue, S as ComputedGetter, T as WritableComputedOptions, U as ExtractPublicPropTypes, V as ExtractDefaultPropTypes, W as InferNativePropType, X as NativeTypeHint, Y as NativePropsOptions, Z as NativeTypedProperty, _ as ObjectDirective, a as ActionContext, b as VNode, c as MutationType, d as SubscriptionCallback, et as PropType, f as AllowedComponentProps, g as NativeComponent, h as DefineComponent, i as defineStore, j as MaybeRef, k as CustomRefOptions, l as StoreManager, m as ComponentOptionsMixin, n as storeToRefs, o as ActionSubscriber, p as ComponentCustomProps, q as InferProps, r as createStore, s as DefineStoreOptions, t as StoreToRefsResult, u as StoreSubscribeOptions, v as PublicProps, w as ComputedSetter, x as VNodeProps, y as ShallowUnwrapRef, z as unref } from "./index-BPZxNlC8.mjs";
|
|
2
|
+
import { a as SetupContextRouter, c as WevuTypedRouterRouteMap } from "./router-DW4Yf9Yj.mjs";
|
|
3
|
+
import { $ as WevuPageLayoutMap, $n as MiniProgramInstance, $r as MutationOp, $t as onUnhandledRejection, A as use, An as WevuGlobalDirectives, Ar as traverse, At as onUpdated, B as teardownRuntimeInstance, Bn as SetupFunction, Br as shallowReadonly, Bt as onPageNotFound, C as UseModelOptions, Cn as setWevuDefaults, Cr as WatchScheduler, Ct as onBeforeUnmount, D as useAttrs, Dn as TemplateRefValue, Dr as WatchStopHandle, Dt as onMounted, E as useModel, En as GlobalDirectives, Er as WatchSources, Et as onErrorCaptured, F as normalizeClass, Fn as PageFeatures, Fr as shallowRef, Ft as onHide, G as injectGlobal, Gn as RuntimeInstance, Gr as reactive, Gt as onResize, H as registerApp, Hn as InternalRuntimeState, Hr as isRaw, Ht as onPullDownRefresh, I as normalizeStyle, In as SetDataDebugInfo, Ir as triggerRef, It as onLaunch, J as setGlobalProvidedValue, Jn as MiniProgramAppOptions, Jr as shallowReactive, Jt as onShareAppMessage, K as provide, Kn as WevuPlugin, Kr as toRaw, Kt as onRouteDone, L as runSetupFunction, Ln as SetDataSnapshotOptions, Lr as isProxy, Lt as onLoad, M as UpdatePerformanceListenerResult, Mn as DataOption, Mr as toRef, Mt as onAttached, N as UseUpdatePerformanceListenerStopHandle, Nn as DefineAppOptions, Nr as toRefs, Nt as onDetached, O as useNativeInstance, On as TemplateRefs, Or as getDeepWatchStrategy, Ot as onServerPrefetch, P as useUpdatePerformanceListener, Pn as DefineComponentOptions, Pr as isShallowRef, Pt as onError, Q as PageLayoutState, Qn as MiniProgramComponentRawOptions, Qr as MutationKind, Qt as onThemeChange, R as mountRuntimeInstance, Rn as SetupContext, Rr as isReadonly, Rt as onMemoryWarning, S as ModelModifiers, Sn as resetWevuDefaults, Sr as WatchOptions, St as onBeforeMount, T as useBindModel, Tn as GlobalComponents, Tr as WatchSourceValue, Tt as onDeactivated, U as hasInjectionContext, Un as InternalRuntimeStateFields, Ur as isReactive, Ut as onReachBottom, V as registerComponent, Vn as AppConfig, Vr as getReactiveVersion, Vt as onPageScroll, W as inject, Wn as RuntimeApp, Wr as markRaw, Wt as onReady, X as UsePageScrollThrottleStopHandle, Xn as MiniProgramComponentBehaviorOptions, Xr as prelinkReactiveTree, Xt as onShow, Y as UsePageScrollThrottleOptions, Yn as MiniProgramBehaviorIdentifier, Yr as PrelinkReactiveTreeOptions, Yt as onShareTimeline, Z as usePageScrollThrottle, Zn as MiniProgramComponentOptions, Zr as touchReactive, Zt as onTabItemTap, _ as EmitsOptions, _n as WevuComponentConstructor, _r as OnCleanup, _t as UseIntersectionObserverOptions, a as PageLayoutMeta, ai as effect, an as setCurrentInstance, ar as ExtractMethods, at as isNoSetData, b as useNativePageRouter, bn as defineComponent, br as WatchEffectOptions, bt as callUpdateHooks, c as defineExpose, ci as getCurrentScope, cn as DisposableLike, cr as ModelBindingOptions, ct as registerPageLayoutBridge, d as definePageMeta, di as stop, dn as useDisposables, dr as watchEffect, dt as resolveLayoutHost, ei as MutationRecord, en as onUnload, er as MiniProgramPageLifetimes, et as resolveRuntimePageLayoutName, f as defineProps, fi as nextTick, fn as ComponentDefinition, fr as watchPostEffect, ft as unregisterPageLayoutBridge, g as EmitFn, gn as SetupFunctionWithTypeProps, gr as MultiWatchSources, gt as waitForLayoutHost, h as ComponentTypeEmits, hn as SetupContextWithTypeProps, hr as MaybeUndefined, ht as useLayoutHosts, i as ModelRef, ii as batch, in as getCurrentSetupContext, ir as ExtractComputed, it as usePageLayout, j as UpdatePerformanceListener, jn as CreateAppOptions, jr as ToRefs, jt as onAddToFavorites, k as useSlots, kn as WevuGlobalComponents, kr as setDeepWatchStrategy, kt as onUnmounted, l as defineModel, li as onScopeDispose, ln as DisposableMethodName, lr as ModelBindingPayload, lt as registerRuntimeLayoutHosts, m as withDefaults, mn as DefineComponentWithTypeProps, mr as MapSources, mt as useLayoutBridge, n as DefineModelModifiers, ni as removeMutationRecorder, nn as callHookReturn, nr as ComponentPublicInstance, nt as syncRuntimePageLayoutState, o as PageMeta, oi as effectScope, on as setCurrentSetupContext, or as MethodDefinitions, ot as markNoSetData, p as defineSlots, pn as DefineComponentTypePropsOptions, pr as watchSyncEffect, pt as unregisterRuntimeLayoutHosts, q as provideGlobal, qn as MiniProgramAdapter, qr as isShallowReactive, qt as onSaveExitState, r as DefineModelTransformOptions, ri as EffectScope, rn as getCurrentInstance, rr as ComputedDefinitions, rt as syncRuntimePageLayoutStateFromRuntime, s as defineEmits, si as endBatch, sn as DisposableBag, sr as ModelBinding, st as LayoutHostBinding, t as version, ti as addMutationRecorder, tn as callHookList, tr as TriggerEventOptions, tt as setPageLayout, u as defineOptions, ui as startBatch, un as DisposableObject, ur as watch, ut as resolveLayoutBridge, v as TemplateRef, vn as createWevuComponent, vr as WatchCallback, vt as UseIntersectionObserverResult, w as mergeModels, wn as createApp, wr as WatchSource, wt as onBeforeUpdate, x as useNativeRouter, xn as WevuDefaults, xr as WatchMultiSources, xt as onActivated, y as useTemplateRef, yn as createWevuScopedSlotComponent, yr as WatchEffect, yt as useIntersectionObserver, z as setRuntimeSetDataVisibility, zn as SetupContextNativeInstance, zr as readonly, zt as onMoved } from "./index-BvyrZ_XI.mjs";
|
|
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, version, waitForLayoutHost, watch, watchEffect, watchPostEffect, watchSyncEffect, withDefaults };
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { C as effect, D as onScopeDispose, E as getCurrentScope, N as nextTick, O as startBatch, S as batch, T as endBatch, a as toValue, b as addMutationRecorder, c as isRaw, d as reactive, f as isShallowReactive, g as touchReactive, h as prelinkReactiveTree, i as ref, k as stop, l as isReactive, n as isRef, o as unref, p as shallowReactive, s as getReactiveVersion, t as customRef, u as markRaw, w as effectScope, x as removeMutationRecorder, y as toRaw } from "./ref-DvvlGmiL.mjs";
|
|
2
2
|
import { i as computed, n as defineStore, r as createStore, t as storeToRefs } from "./store-C-Eil5IU.mjs";
|
|
3
3
|
import { A as onThemeChange, B as setCurrentSetupContext, C as onResize, D as onShareTimeline, E as onShareAppMessage, F as callHookReturn, G as readonly, I as getCurrentInstance, K as shallowReadonly, L as getCurrentSetupContext, M as onUnload, O as onShow, P as callHookList, S as onReady, T as onSaveExitState, U as isProxy, W as isReadonly, _ as onMoved, a as injectGlobal, b as onPullDownRefresh, c as setGlobalProvidedValue, d as onDetached, f as onError, g as onMemoryWarning, h as onLoad, i as inject, j as onUnhandledRejection, k as onTabItemTap, l as onAddToFavorites, m as onLaunch, n as useNativeRouter, o as provide, p as onHide, r as hasInjectionContext, s as provideGlobal, t as useNativePageRouter, u as onAttached, v as onPageNotFound, w as onRouteDone, x as onReachBottom, y as onPageScroll, z as setCurrentInstance } from "./router-DJKYJlu_.mjs";
|
|
4
|
-
import { $ as
|
|
5
|
-
export { addMutationRecorder, batch, callHookList, callHookReturn, callUpdateHooks, computed, createApp, createStore, createWevuComponent, createWevuScopedSlotComponent, customRef, defineAppSetup, defineComponent, 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 };
|
|
4
|
+
import { $ as onBeforeMount, A as registerApp, B as resetWevuDefaults, C as resolveLayoutBridge, D as useLayoutBridge, E as unregisterRuntimeLayoutHosts, F as resolveRuntimePageLayoutName, G as watch, H as isNoSetData, I as setPageLayout, J as watchSyncEffect, K as watchEffect, L as syncRuntimePageLayoutState, M as setRuntimeSetDataVisibility, N as teardownRuntimeInstance, O as useLayoutHosts, P as runSetupFunction, Q as onActivated, R as syncRuntimePageLayoutStateFromRuntime, S as registerRuntimeLayoutHosts, T as unregisterPageLayoutBridge, U as markNoSetData, V as setWevuDefaults, W as version, X as setDeepWatchStrategy, Y as getDeepWatchStrategy, Z as callUpdateHooks, _ as createWevuScopedSlotComponent, a as useAttrs, at as onServerPrefetch, b as registerComponent, c as defineAppSetup, ct as traverse, d as normalizeClass, dt as isShallowRef, et as onBeforeUnmount, f as normalizeStyle, ft as shallowRef, g as createWevuComponent, h as useDisposables, i as useModel, it as onMounted, j as mountRuntimeInstance, k as waitForLayoutHost, l as use, lt as toRef, m as useIntersectionObserver, n as mergeModels, nt as onDeactivated, o as useNativeInstance, ot as onUnmounted, p as usePageScrollThrottle, pt as triggerRef, q as watchPostEffect, r as useBindModel, rt as onErrorCaptured, s as useSlots, st as onUpdated, t as useTemplateRef, tt as onBeforeUpdate, u as useUpdatePerformanceListener, ut as toRefs, v as defineComponent, w as resolveLayoutHost, x as registerPageLayoutBridge, y as createApp, z as usePageLayout } from "./src-xqSS8INA.mjs";
|
|
5
|
+
export { addMutationRecorder, batch, callHookList, callHookReturn, callUpdateHooks, computed, createApp, createStore, createWevuComponent, createWevuScopedSlotComponent, customRef, defineAppSetup, defineComponent, 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, version, waitForLayoutHost, watch, watchEffect, watchPostEffect, watchSyncEffect };
|