wevu 6.15.0 → 6.15.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/fetch.d.mts +4 -2
- package/dist/fetch.mjs +104 -92
- package/dist/{index-5l-9KY-_.d.mts → index-gXdStbgb.d.mts} +8 -2
- package/dist/{index-BZkMfL_L.d.mts → index-xg5b-v5q.d.mts} +1 -1
- package/dist/index.d.mts +3 -3
- package/dist/index.mjs +2 -2
- package/dist/{router-DKQJSUWb.mjs → router-BCfYPEq2.mjs} +9 -8
- package/dist/router.d.mts +1 -1
- package/dist/router.mjs +1 -1
- package/dist/{src-C5U2KbED.mjs → src-BufOrhxF.mjs} +235 -192
- package/dist/store.d.mts +1 -1
- package/dist/vue-demi.d.mts +3 -3
- package/dist/vue-demi.mjs +2 -2
- package/dist/{vue-types-CxI8OQhB.d.mts → vue-types-BCW41JNB.d.mts} +1 -0
- package/package.json +3 -2
package/dist/fetch.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region src/fetch.d.ts
|
|
1
|
+
//#region src/fetch/types.d.ts
|
|
2
2
|
interface WevuFetchInit {
|
|
3
3
|
method?: string;
|
|
4
4
|
headers?: unknown;
|
|
@@ -18,9 +18,11 @@ interface RequestLikeInput {
|
|
|
18
18
|
};
|
|
19
19
|
}
|
|
20
20
|
type WevuFetchInput = string | URL | RequestLikeInput;
|
|
21
|
+
//#endregion
|
|
22
|
+
//#region src/fetch/index.d.ts
|
|
21
23
|
/**
|
|
22
24
|
* @description 使用 @wevu/api 的 request 能力实现 fetch 语义对齐
|
|
23
25
|
*/
|
|
24
26
|
declare function fetch(input: WevuFetchInput, init?: WevuFetchInit): Promise<Response>;
|
|
25
27
|
//#endregion
|
|
26
|
-
export { WevuFetchInit, fetch };
|
|
28
|
+
export { type WevuFetchInit, type WevuFetchInput, fetch };
|
package/dist/fetch.mjs
CHANGED
|
@@ -1,8 +1,42 @@
|
|
|
1
1
|
import { t as _defineProperty } from "./defineProperty-BewxOmW8.mjs";
|
|
2
2
|
import { wpi } from "@wevu/api";
|
|
3
|
-
//#region src/fetch.ts
|
|
4
|
-
let _Symbol$iterator, _Symbol$toStringTag;
|
|
3
|
+
//#region src/fetch/shared.ts
|
|
5
4
|
const hasOwn = Object.prototype.hasOwnProperty;
|
|
5
|
+
function isObject(value) {
|
|
6
|
+
return typeof value === "object" && value !== null;
|
|
7
|
+
}
|
|
8
|
+
function createAbortError() {
|
|
9
|
+
if (typeof DOMException === "function") return new DOMException("The operation was aborted.", "AbortError");
|
|
10
|
+
const error = /* @__PURE__ */ new Error("The operation was aborted.");
|
|
11
|
+
error.name = "AbortError";
|
|
12
|
+
return error;
|
|
13
|
+
}
|
|
14
|
+
function encodeText(text) {
|
|
15
|
+
if (typeof TextEncoder === "function") return new TextEncoder().encode(text).buffer;
|
|
16
|
+
const bytes = new Uint8Array(text.length);
|
|
17
|
+
for (let i = 0; i < text.length; i++) bytes[i] = text.charCodeAt(i) & 255;
|
|
18
|
+
return bytes.buffer;
|
|
19
|
+
}
|
|
20
|
+
function decodeText(buffer) {
|
|
21
|
+
if (typeof TextDecoder === "function") return new TextDecoder().decode(buffer);
|
|
22
|
+
const view = new Uint8Array(buffer);
|
|
23
|
+
let text = "";
|
|
24
|
+
for (const byte of view) text += String.fromCharCode(byte);
|
|
25
|
+
return text;
|
|
26
|
+
}
|
|
27
|
+
function cloneBuffer(buffer) {
|
|
28
|
+
return buffer.slice(0);
|
|
29
|
+
}
|
|
30
|
+
function cloneViewBuffer(view) {
|
|
31
|
+
const copied = new Uint8Array(view.byteLength);
|
|
32
|
+
copied.set(new Uint8Array(view.buffer, view.byteOffset, view.byteLength));
|
|
33
|
+
return copied.buffer;
|
|
34
|
+
}
|
|
35
|
+
function isRequestLikeInput(input) {
|
|
36
|
+
return isObject(input) && typeof input.url === "string";
|
|
37
|
+
}
|
|
38
|
+
//#endregion
|
|
39
|
+
//#region src/fetch/types.ts
|
|
6
40
|
const REQUEST_METHODS = [
|
|
7
41
|
"GET",
|
|
8
42
|
"HEAD",
|
|
@@ -13,15 +47,9 @@ const REQUEST_METHODS = [
|
|
|
13
47
|
"TRACE",
|
|
14
48
|
"CONNECT"
|
|
15
49
|
];
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
function createAbortError() {
|
|
20
|
-
if (typeof DOMException === "function") return new DOMException("The operation was aborted.", "AbortError");
|
|
21
|
-
const error = /* @__PURE__ */ new Error("The operation was aborted.");
|
|
22
|
-
error.name = "AbortError";
|
|
23
|
-
return error;
|
|
24
|
-
}
|
|
50
|
+
//#endregion
|
|
51
|
+
//#region src/fetch/headers.ts
|
|
52
|
+
let _Symbol$iterator;
|
|
25
53
|
function normalizeMethod(method) {
|
|
26
54
|
const normalized = (method !== null && method !== void 0 ? method : "GET").toUpperCase();
|
|
27
55
|
if (REQUEST_METHODS.includes(normalized)) return normalized;
|
|
@@ -69,85 +97,6 @@ function toHeaderMap(source) {
|
|
|
69
97
|
mergeHeaderSource(headers, source);
|
|
70
98
|
return headers;
|
|
71
99
|
}
|
|
72
|
-
function encodeText(text) {
|
|
73
|
-
if (typeof TextEncoder === "function") return new TextEncoder().encode(text).buffer;
|
|
74
|
-
const bytes = new Uint8Array(text.length);
|
|
75
|
-
for (let i = 0; i < text.length; i++) bytes[i] = text.charCodeAt(i) & 255;
|
|
76
|
-
return bytes.buffer;
|
|
77
|
-
}
|
|
78
|
-
function decodeText(buffer) {
|
|
79
|
-
if (typeof TextDecoder === "function") return new TextDecoder().decode(buffer);
|
|
80
|
-
const view = new Uint8Array(buffer);
|
|
81
|
-
let text = "";
|
|
82
|
-
for (const byte of view) text += String.fromCharCode(byte);
|
|
83
|
-
return text;
|
|
84
|
-
}
|
|
85
|
-
function cloneBuffer(buffer) {
|
|
86
|
-
return buffer.slice(0);
|
|
87
|
-
}
|
|
88
|
-
function cloneViewBuffer(view) {
|
|
89
|
-
const copied = new Uint8Array(view.byteLength);
|
|
90
|
-
copied.set(new Uint8Array(view.buffer, view.byteOffset, view.byteLength));
|
|
91
|
-
return copied.buffer;
|
|
92
|
-
}
|
|
93
|
-
function isRequestLikeInput(input) {
|
|
94
|
-
return isObject(input) && typeof input.url === "string";
|
|
95
|
-
}
|
|
96
|
-
async function extractRequestBodyFromInput(input) {
|
|
97
|
-
if (!input || typeof input.clone !== "function") return;
|
|
98
|
-
if (input.bodyUsed) throw new TypeError("Failed to execute fetch: request body is already used");
|
|
99
|
-
const cloned = input.clone();
|
|
100
|
-
if (cloned === null || cloned === void 0 ? void 0 : cloned.arrayBuffer) return cloned.arrayBuffer();
|
|
101
|
-
if (cloned === null || cloned === void 0 ? void 0 : cloned.text) return cloned.text();
|
|
102
|
-
}
|
|
103
|
-
async function normalizeRequestBody(body, headers) {
|
|
104
|
-
if (body == null) return;
|
|
105
|
-
if (typeof body === "string") {
|
|
106
|
-
if (!hasHeader(headers, "content-type")) headers["content-type"] = "text/plain;charset=UTF-8";
|
|
107
|
-
return body;
|
|
108
|
-
}
|
|
109
|
-
if (typeof URLSearchParams !== "undefined" && body instanceof URLSearchParams) {
|
|
110
|
-
if (!hasHeader(headers, "content-type")) headers["content-type"] = "application/x-www-form-urlencoded;charset=UTF-8";
|
|
111
|
-
return body.toString();
|
|
112
|
-
}
|
|
113
|
-
if (body instanceof ArrayBuffer) return cloneBuffer(body);
|
|
114
|
-
if (ArrayBuffer.isView(body)) return cloneViewBuffer(body);
|
|
115
|
-
if (typeof Blob !== "undefined" && body instanceof Blob) {
|
|
116
|
-
if (body.type && !hasHeader(headers, "content-type")) headers["content-type"] = body.type;
|
|
117
|
-
return body.arrayBuffer();
|
|
118
|
-
}
|
|
119
|
-
if (typeof FormData !== "undefined" && body instanceof FormData) throw new TypeError("Failed to execute fetch: FormData body is not supported in wevu/fetch");
|
|
120
|
-
return String(body);
|
|
121
|
-
}
|
|
122
|
-
async function resolveRequestMeta(input, init = {}) {
|
|
123
|
-
var _init$method, _ref, _init$signal;
|
|
124
|
-
const requestInput = isRequestLikeInput(input) ? input : void 0;
|
|
125
|
-
const url = typeof input === "string" ? input : input instanceof URL ? input.toString() : requestInput === null || requestInput === void 0 ? void 0 : requestInput.url;
|
|
126
|
-
if (!url) throw new TypeError("Failed to execute fetch: invalid request url");
|
|
127
|
-
const method = normalizeMethod((_init$method = init.method) !== null && _init$method !== void 0 ? _init$method : requestInput === null || requestInput === void 0 ? void 0 : requestInput.method);
|
|
128
|
-
const headers = toHeaderMap(requestInput === null || requestInput === void 0 ? void 0 : requestInput.headers);
|
|
129
|
-
mergeHeaderSource(headers, init.headers);
|
|
130
|
-
const rawBody = hasOwn.call(init, "body") ? init.body : await extractRequestBodyFromInput(requestInput);
|
|
131
|
-
if ((method === "GET" || method === "HEAD") && rawBody != null) throw new TypeError("Failed to execute fetch: GET/HEAD request cannot have body");
|
|
132
|
-
return {
|
|
133
|
-
url,
|
|
134
|
-
method,
|
|
135
|
-
headers,
|
|
136
|
-
body: await normalizeRequestBody(rawBody, headers),
|
|
137
|
-
signal: (_ref = (_init$signal = init.signal) !== null && _init$signal !== void 0 ? _init$signal : requestInput === null || requestInput === void 0 ? void 0 : requestInput.signal) !== null && _ref !== void 0 ? _ref : null
|
|
138
|
-
};
|
|
139
|
-
}
|
|
140
|
-
function readResponseDataAsArrayBuffer(data) {
|
|
141
|
-
if (data == null) return Promise.resolve(/* @__PURE__ */ new ArrayBuffer(0));
|
|
142
|
-
if (data instanceof ArrayBuffer) return Promise.resolve(cloneBuffer(data));
|
|
143
|
-
if (ArrayBuffer.isView(data)) {
|
|
144
|
-
const view = data;
|
|
145
|
-
return Promise.resolve(cloneViewBuffer(view));
|
|
146
|
-
}
|
|
147
|
-
if (typeof data === "string") return Promise.resolve(encodeText(data));
|
|
148
|
-
if (typeof Blob !== "undefined" && data instanceof Blob) return data.arrayBuffer();
|
|
149
|
-
return Promise.resolve(encodeText(JSON.stringify(data)));
|
|
150
|
-
}
|
|
151
100
|
_Symbol$iterator = Symbol.iterator;
|
|
152
101
|
var WevuHeadersFallback = class {
|
|
153
102
|
constructor(init) {
|
|
@@ -207,6 +156,63 @@ function cloneHeadersToMap(headers) {
|
|
|
207
156
|
});
|
|
208
157
|
return result;
|
|
209
158
|
}
|
|
159
|
+
//#endregion
|
|
160
|
+
//#region src/fetch/body.ts
|
|
161
|
+
async function extractRequestBodyFromInput(input) {
|
|
162
|
+
if (!input || typeof input.clone !== "function") return;
|
|
163
|
+
if (input.bodyUsed) throw new TypeError("Failed to execute fetch: request body is already used");
|
|
164
|
+
const cloned = input.clone();
|
|
165
|
+
if (cloned === null || cloned === void 0 ? void 0 : cloned.arrayBuffer) return cloned.arrayBuffer();
|
|
166
|
+
if (cloned === null || cloned === void 0 ? void 0 : cloned.text) return cloned.text();
|
|
167
|
+
}
|
|
168
|
+
async function normalizeRequestBody(body, headers) {
|
|
169
|
+
if (body == null) return;
|
|
170
|
+
if (typeof body === "string") {
|
|
171
|
+
if (!hasHeader(headers, "content-type")) headers["content-type"] = "text/plain;charset=UTF-8";
|
|
172
|
+
return body;
|
|
173
|
+
}
|
|
174
|
+
if (typeof URLSearchParams !== "undefined" && body instanceof URLSearchParams) {
|
|
175
|
+
if (!hasHeader(headers, "content-type")) headers["content-type"] = "application/x-www-form-urlencoded;charset=UTF-8";
|
|
176
|
+
return body.toString();
|
|
177
|
+
}
|
|
178
|
+
if (body instanceof ArrayBuffer) return cloneBuffer(body);
|
|
179
|
+
if (ArrayBuffer.isView(body)) return cloneViewBuffer(body);
|
|
180
|
+
if (typeof Blob !== "undefined" && body instanceof Blob) {
|
|
181
|
+
if (body.type && !hasHeader(headers, "content-type")) headers["content-type"] = body.type;
|
|
182
|
+
return body.arrayBuffer();
|
|
183
|
+
}
|
|
184
|
+
if (typeof FormData !== "undefined" && body instanceof FormData) throw new TypeError("Failed to execute fetch: FormData body is not supported in wevu/fetch");
|
|
185
|
+
return String(body);
|
|
186
|
+
}
|
|
187
|
+
async function resolveRequestMeta(input, init = {}) {
|
|
188
|
+
var _init$method, _ref, _init$signal;
|
|
189
|
+
const requestInput = isRequestLikeInput(input) ? input : void 0;
|
|
190
|
+
const url = typeof input === "string" ? input : input instanceof URL ? input.toString() : requestInput === null || requestInput === void 0 ? void 0 : requestInput.url;
|
|
191
|
+
if (!url) throw new TypeError("Failed to execute fetch: invalid request url");
|
|
192
|
+
const method = normalizeMethod((_init$method = init.method) !== null && _init$method !== void 0 ? _init$method : requestInput === null || requestInput === void 0 ? void 0 : requestInput.method);
|
|
193
|
+
const headers = toHeaderMap(requestInput === null || requestInput === void 0 ? void 0 : requestInput.headers);
|
|
194
|
+
mergeHeaderSource(headers, init.headers);
|
|
195
|
+
const rawBody = hasOwn.call(init, "body") ? init.body : await extractRequestBodyFromInput(requestInput);
|
|
196
|
+
if ((method === "GET" || method === "HEAD") && rawBody != null) throw new TypeError("Failed to execute fetch: GET/HEAD request cannot have body");
|
|
197
|
+
return {
|
|
198
|
+
url,
|
|
199
|
+
method,
|
|
200
|
+
headers,
|
|
201
|
+
body: await normalizeRequestBody(rawBody, headers),
|
|
202
|
+
signal: (_ref = (_init$signal = init.signal) !== null && _init$signal !== void 0 ? _init$signal : requestInput === null || requestInput === void 0 ? void 0 : requestInput.signal) !== null && _ref !== void 0 ? _ref : null
|
|
203
|
+
};
|
|
204
|
+
}
|
|
205
|
+
//#endregion
|
|
206
|
+
//#region src/fetch/response.ts
|
|
207
|
+
let _Symbol$toStringTag;
|
|
208
|
+
function readResponseDataAsArrayBuffer(data) {
|
|
209
|
+
if (data == null) return Promise.resolve(/* @__PURE__ */ new ArrayBuffer(0));
|
|
210
|
+
if (data instanceof ArrayBuffer) return Promise.resolve(cloneBuffer(data));
|
|
211
|
+
if (ArrayBuffer.isView(data)) return Promise.resolve(cloneViewBuffer(data));
|
|
212
|
+
if (typeof data === "string") return Promise.resolve(encodeText(data));
|
|
213
|
+
if (typeof Blob !== "undefined" && data instanceof Blob) return data.arrayBuffer();
|
|
214
|
+
return Promise.resolve(encodeText(JSON.stringify(data)));
|
|
215
|
+
}
|
|
210
216
|
_Symbol$toStringTag = Symbol.toStringTag;
|
|
211
217
|
var WevuResponseFallback = class WevuResponseFallback {
|
|
212
218
|
constructor(data, options) {
|
|
@@ -289,6 +295,11 @@ function createFetchResponse(data, status, headers, url) {
|
|
|
289
295
|
url
|
|
290
296
|
});
|
|
291
297
|
}
|
|
298
|
+
function normalizeResponseHeaders(headers) {
|
|
299
|
+
return toHeaderMap(headers);
|
|
300
|
+
}
|
|
301
|
+
//#endregion
|
|
302
|
+
//#region src/fetch/index.ts
|
|
292
303
|
function isRequestTask(value) {
|
|
293
304
|
return isObject(value) && typeof value.abort === "function";
|
|
294
305
|
}
|
|
@@ -302,6 +313,7 @@ function fetch(input, init) {
|
|
|
302
313
|
return new Promise((resolve, reject) => {
|
|
303
314
|
let settled = false;
|
|
304
315
|
let aborted = false;
|
|
316
|
+
let requestTask;
|
|
305
317
|
const onAbort = () => {
|
|
306
318
|
if (settled) return;
|
|
307
319
|
aborted = true;
|
|
@@ -323,7 +335,7 @@ function fetch(input, init) {
|
|
|
323
335
|
if (settled) return;
|
|
324
336
|
settled = true;
|
|
325
337
|
cleanup();
|
|
326
|
-
resolve(createFetchResponse(res.data, res.statusCode,
|
|
338
|
+
resolve(createFetchResponse(res.data, res.statusCode, normalizeResponseHeaders(res.header), meta.url));
|
|
327
339
|
},
|
|
328
340
|
fail: (err) => {
|
|
329
341
|
if (settled) return;
|
|
@@ -337,7 +349,7 @@ function fetch(input, init) {
|
|
|
337
349
|
reject(new TypeError(message));
|
|
338
350
|
}
|
|
339
351
|
});
|
|
340
|
-
|
|
352
|
+
requestTask = isRequestTask(requestResult) ? requestResult : void 0;
|
|
341
353
|
});
|
|
342
354
|
});
|
|
343
355
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as WeappIntrinsicElements } from "./weappIntrinsicElements-CwA7kB31.mjs";
|
|
2
|
-
import { A as ComputedDefinitions, D as MiniProgramPageLifetimes, F as ModelBindingOptions, I as ModelBindingPayload, N as MethodDefinitions, P as ModelBinding, Qt as ShallowRef, T as MiniProgramComponentRawOptions, Zt as Ref, _ as RuntimeApp, c as ShallowUnwrapRef, cn as SetupContextRouter, d as SetupContext, f as SetupContextNativeInstance, fn as ComponentPropsOptions, h as InternalRuntimeState, k as ComponentPublicInstance, p as SetupFunction, v as RuntimeInstance, w as MiniProgramComponentOptions, x as MiniProgramAppOptions, y as WevuPlugin, yn as InferProps } from "./vue-types-
|
|
2
|
+
import { A as ComputedDefinitions, D as MiniProgramPageLifetimes, F as ModelBindingOptions, I as ModelBindingPayload, N as MethodDefinitions, P as ModelBinding, Qt as ShallowRef, T as MiniProgramComponentRawOptions, Zt as Ref, _ as RuntimeApp, c as ShallowUnwrapRef, cn as SetupContextRouter, d as SetupContext, f as SetupContextNativeInstance, fn as ComponentPropsOptions, h as InternalRuntimeState, k as ComponentPublicInstance, p as SetupFunction, v as RuntimeInstance, w as MiniProgramComponentOptions, x as MiniProgramAppOptions, y as WevuPlugin, yn as InferProps } from "./vue-types-BCW41JNB.mjs";
|
|
3
3
|
//#region src/runtime/types/setData.d.ts
|
|
4
4
|
interface SetDataSnapshotOptions {
|
|
5
5
|
/**
|
|
@@ -193,6 +193,12 @@ interface DefineComponentOptions<P extends ComponentPropsOptions = ComponentProp
|
|
|
193
193
|
* 类 Vue 的 props 定义(会被规范化为小程序 `properties`)
|
|
194
194
|
*/
|
|
195
195
|
props?: P;
|
|
196
|
+
/**
|
|
197
|
+
* 允许将运行时传入的 `undefined` props 兼容为 `null` 输入,避免小程序对已声明类型 props 报告 `null` 类型告警。
|
|
198
|
+
*
|
|
199
|
+
* 适合迁移 Vue 组件或需要兼容 `undefined -> null` 传参链路的场景;默认关闭,避免影响原生 `properties` 的严格类型语义。
|
|
200
|
+
*/
|
|
201
|
+
allowNullPropInput?: boolean;
|
|
196
202
|
watch?: Record<string, any>;
|
|
197
203
|
setup?: SetupFunction<P, D, C, M, S>;
|
|
198
204
|
/**
|
|
@@ -660,7 +666,7 @@ declare function syncRuntimePageLayoutState(target: Record<string, any>, layout:
|
|
|
660
666
|
declare function syncRuntimePageLayoutStateFromRuntime(target: Record<string, any>): void;
|
|
661
667
|
declare function setPageLayout(layout: false): void;
|
|
662
668
|
declare function setPageLayout<Name extends ResolveTypedPageLayoutName>(layout: Name, props?: ResolveTypedPageLayoutProps<Name>): void;
|
|
663
|
-
declare function resolveRuntimePageLayoutName(layout: string | false):
|
|
669
|
+
declare function resolveRuntimePageLayoutName(layout: string | false): any;
|
|
664
670
|
//#endregion
|
|
665
671
|
//#region src/runtime/pageScroll.d.ts
|
|
666
672
|
interface UsePageScrollThrottleOptions {
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as WeappIntrinsicElementBaseAttributes, r as WeappIntrinsicEventHandler } from "./weappIntrinsicElements-CwA7kB31.mjs";
|
|
2
|
-
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-
|
|
3
|
-
import { $ as PageLayoutState, $t as onTabItemTap, A as defineAppSetup, An as TemplateRefs, At as onServerPrefetch, B as setRuntimeSetDataVisibility, Bt as onMemoryWarning, C as UseModelOptions, Cn as WevuDefaults, Ct as onActivated, D as useAttrs, Dn as GlobalComponents, Dt as onDeactivated, E as useModel, En as createApp, Et as onBeforeUpdate, F as useUpdatePerformanceListener, Fn as DefineAppOptions, Ft as onDetached, G as inject, Gt as onReachBottom, H as registerComponent, Ht as onPageNotFound, I as normalizeClass, In as DefineComponentOptions, It as onError, J as provideGlobal, Jt as onRouteDone, K as injectGlobal, Kt as onReady, L as normalizeStyle, Ln as PageFeatures, Lt as onHide, M as UpdatePerformanceListener, Mn as WevuGlobalDirectives, Mt as onUpdated, N as UpdatePerformanceListenerResult, Nn as CreateAppOptions, Nt as onAddToFavorites, O as useNativeInstance, On as GlobalDirectives, Ot as onErrorCaptured, P as UseUpdatePerformanceListenerStopHandle, Pn as DataOption, Pt as onAttached, Q as usePageScrollThrottle, Qt as onShow, R as runSetupFunction, Rn as SetDataDebugInfo, Rt as onLaunch, S as ModelModifiers, Sn as defineComponent, St as callUpdateHooks, T as useBindModel, Tn as setWevuDefaults, Tt as onBeforeUnmount, U as registerApp, Ut as onPageScroll, V as teardownRuntimeInstance, Vt as onMoved, W as hasInjectionContext, Wt as onPullDownRefresh, X as UsePageScrollThrottleOptions, Xt as onShareAppMessage, Y as setGlobalProvidedValue, Yt as onSaveExitState, Z as UsePageScrollThrottleStopHandle, Zt as onShareTimeline, _ as EmitsOptions, _n as SetupContextWithTypeProps, _t as useLayoutHosts, a as PageLayoutMeta, an as getCurrentInstance, at as usePageLayout, b as useNativePageRouter, bn as createWevuComponent, bt as UseIntersectionObserverResult, c as defineExpose, cn as setCurrentSetupContext, ct as LayoutBridgeInstance, d as definePageMeta, dn as DisposableMethodName, dt as registerRuntimeLayoutHosts, en as onThemeChange, et as WevuPageLayoutMap, f as defineProps, fn as DisposableObject, ft as resolveLayoutBridge, g as EmitFn, gn as DefineComponentWithTypeProps, gt as useLayoutBridge, h as ComponentTypeEmits, hn as DefineComponentTypePropsOptions, ht as unregisterRuntimeLayoutHosts, i as ModelRef, in as callHookReturn, it as syncRuntimePageLayoutStateFromRuntime, j as use, jn as WevuGlobalComponents, jt as onUnmounted, k as useSlots, kn as TemplateRefValue, kt as onMounted, l as defineModel, ln as DisposableBag, lt as LayoutHostBinding, m as withDefaults, mn as ComponentDefinition, mt as unregisterPageLayoutBridge, n as DefineModelModifiers, nn as onUnload, nt as setPageLayout, o as PageMeta, on as getCurrentSetupContext, ot as isNoSetData, p as defineSlots, pn as useDisposables, pt as resolveLayoutHost, q as provide, qt as onResize, r as DefineModelTransformOptions, rn as callHookList, rt as syncRuntimePageLayoutState, s as defineEmits, sn as setCurrentInstance, st as markNoSetData, t as version, tn as onUnhandledRejection, tt as resolveRuntimePageLayoutName, u as defineOptions, un as DisposableLike, ut as registerPageLayoutBridge, v as TemplateRef, vn as SetupFunctionWithTypeProps, vt as waitForLayoutHost, w as mergeModels, wn as resetWevuDefaults, wt as onBeforeMount, x as useNativeRouter, xn as createWevuScopedSlotComponent, xt as useIntersectionObserver, y as useTemplateRef, yn as WevuComponentConstructor, yt as UseIntersectionObserverOptions, z as mountRuntimeInstance, zn as SetDataSnapshotOptions, zt as onLoad } from "./index-
|
|
4
|
-
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-
|
|
2
|
+
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-BCW41JNB.mjs";
|
|
3
|
+
import { $ as PageLayoutState, $t as onTabItemTap, A as defineAppSetup, An as TemplateRefs, At as onServerPrefetch, B as setRuntimeSetDataVisibility, Bt as onMemoryWarning, C as UseModelOptions, Cn as WevuDefaults, Ct as onActivated, D as useAttrs, Dn as GlobalComponents, Dt as onDeactivated, E as useModel, En as createApp, Et as onBeforeUpdate, F as useUpdatePerformanceListener, Fn as DefineAppOptions, Ft as onDetached, G as inject, Gt as onReachBottom, H as registerComponent, Ht as onPageNotFound, I as normalizeClass, In as DefineComponentOptions, It as onError, J as provideGlobal, Jt as onRouteDone, K as injectGlobal, Kt as onReady, L as normalizeStyle, Ln as PageFeatures, Lt as onHide, M as UpdatePerformanceListener, Mn as WevuGlobalDirectives, Mt as onUpdated, N as UpdatePerformanceListenerResult, Nn as CreateAppOptions, Nt as onAddToFavorites, O as useNativeInstance, On as GlobalDirectives, Ot as onErrorCaptured, P as UseUpdatePerformanceListenerStopHandle, Pn as DataOption, Pt as onAttached, Q as usePageScrollThrottle, Qt as onShow, R as runSetupFunction, Rn as SetDataDebugInfo, Rt as onLaunch, S as ModelModifiers, Sn as defineComponent, St as callUpdateHooks, T as useBindModel, Tn as setWevuDefaults, Tt as onBeforeUnmount, U as registerApp, Ut as onPageScroll, V as teardownRuntimeInstance, Vt as onMoved, W as hasInjectionContext, Wt as onPullDownRefresh, X as UsePageScrollThrottleOptions, Xt as onShareAppMessage, Y as setGlobalProvidedValue, Yt as onSaveExitState, Z as UsePageScrollThrottleStopHandle, Zt as onShareTimeline, _ as EmitsOptions, _n as SetupContextWithTypeProps, _t as useLayoutHosts, a as PageLayoutMeta, an as getCurrentInstance, at as usePageLayout, b as useNativePageRouter, bn as createWevuComponent, bt as UseIntersectionObserverResult, c as defineExpose, cn as setCurrentSetupContext, ct as LayoutBridgeInstance, d as definePageMeta, dn as DisposableMethodName, dt as registerRuntimeLayoutHosts, en as onThemeChange, et as WevuPageLayoutMap, f as defineProps, fn as DisposableObject, ft as resolveLayoutBridge, g as EmitFn, gn as DefineComponentWithTypeProps, gt as useLayoutBridge, h as ComponentTypeEmits, hn as DefineComponentTypePropsOptions, ht as unregisterRuntimeLayoutHosts, i as ModelRef, in as callHookReturn, it as syncRuntimePageLayoutStateFromRuntime, j as use, jn as WevuGlobalComponents, jt as onUnmounted, k as useSlots, kn as TemplateRefValue, kt as onMounted, l as defineModel, ln as DisposableBag, lt as LayoutHostBinding, m as withDefaults, mn as ComponentDefinition, mt as unregisterPageLayoutBridge, n as DefineModelModifiers, nn as onUnload, nt as setPageLayout, o as PageMeta, on as getCurrentSetupContext, ot as isNoSetData, p as defineSlots, pn as useDisposables, pt as resolveLayoutHost, q as provide, qt as onResize, r as DefineModelTransformOptions, rn as callHookList, rt as syncRuntimePageLayoutState, s as defineEmits, sn as setCurrentInstance, st as markNoSetData, t as version, tn as onUnhandledRejection, tt as resolveRuntimePageLayoutName, u as defineOptions, un as DisposableLike, ut as registerPageLayoutBridge, v as TemplateRef, vn as SetupFunctionWithTypeProps, vt as waitForLayoutHost, w as mergeModels, wn as resetWevuDefaults, wt as onBeforeMount, x as useNativeRouter, xn as createWevuScopedSlotComponent, xt as useIntersectionObserver, y as useTemplateRef, yn as WevuComponentConstructor, yt as UseIntersectionObserverOptions, z as mountRuntimeInstance, zn as SetDataSnapshotOptions, zt as onLoad } from "./index-gXdStbgb.mjs";
|
|
4
|
+
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-xg5b-v5q.mjs";
|
|
5
5
|
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, LayoutBridgeInstance, 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, WeappIntrinsicElementBaseAttributes, WeappIntrinsicEventHandler, WevuComponentConstructor, WevuDefaults, WevuGlobalComponents, WevuGlobalDirectives, WevuPageLayoutMap, WevuPlugin, WevuTypedRouterRouteMap, WritableComputedOptions, WritableComputedRef, addMutationRecorder, batch, callHookList, callHookReturn, callUpdateHooks, computed, createApp, createStore, createWevuComponent, createWevuScopedSlotComponent, customRef, defineAppSetup, defineComponent, defineEmits, defineExpose, defineModel, defineOptions, definePageMeta, defineProps, defineSlots, defineStore, effect, effectScope, endBatch, getCurrentInstance, 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-JdrmsFSo.mjs";
|
|
2
2
|
import { i as computed, n as defineStore, r as createStore, t as storeToRefs } from "./store-ClIYqg5X.mjs";
|
|
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-
|
|
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-
|
|
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-BCfYPEq2.mjs";
|
|
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-BufOrhxF.mjs";
|
|
5
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 };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { _ as ReactiveFlags, l as isReactive, n as isRef, r as markAsRef, v as isObject } from "./ref-JdrmsFSo.mjs";
|
|
2
|
+
import { WEVU_HOOKS_KEY, WEVU_IS_APP_INSTANCE_KEY } from "@weapp-core/constants";
|
|
2
3
|
//#region src/reactivity/readonly.ts
|
|
3
4
|
function createReadonlyWrapper(target) {
|
|
4
5
|
if (isRef(target)) {
|
|
@@ -109,8 +110,8 @@ function assertInSetup(name) {
|
|
|
109
110
|
return __currentInstance;
|
|
110
111
|
}
|
|
111
112
|
function ensureHookBucket(target) {
|
|
112
|
-
if (!target
|
|
113
|
-
return target
|
|
113
|
+
if (!target[WEVU_HOOKS_KEY]) target[WEVU_HOOKS_KEY] = Object.create(null);
|
|
114
|
+
return target[WEVU_HOOKS_KEY];
|
|
114
115
|
}
|
|
115
116
|
function pushHook(target, name, handler, { single = false } = {}) {
|
|
116
117
|
const bucket = ensureHookBucket(target);
|
|
@@ -127,7 +128,7 @@ function ensureSinglePageHookOnInstance(target, name) {
|
|
|
127
128
|
const original = target[name];
|
|
128
129
|
const bridge = function onWevuShareHookBridge(...args) {
|
|
129
130
|
var _runtime$proxy;
|
|
130
|
-
const hooks = this
|
|
131
|
+
const hooks = this[WEVU_HOOKS_KEY];
|
|
131
132
|
const entry = hooks === null || hooks === void 0 ? void 0 : hooks[name];
|
|
132
133
|
const runtime = this.__wevu;
|
|
133
134
|
const ctx = (_runtime$proxy = runtime === null || runtime === void 0 ? void 0 : runtime.proxy) !== null && _runtime$proxy !== void 0 ? _runtime$proxy : this;
|
|
@@ -147,10 +148,10 @@ function ensureSinglePageHookOnInstance(target, name) {
|
|
|
147
148
|
target[name] = bridge;
|
|
148
149
|
}
|
|
149
150
|
function ensurePageShareMenusOnSetup(target) {
|
|
150
|
-
var _target$
|
|
151
|
+
var _target$WEVU_HOOKS_KE;
|
|
151
152
|
const wxGlobal = getMiniProgramGlobalObject();
|
|
152
153
|
if (!wxGlobal || typeof wxGlobal.showShareMenu !== "function") return;
|
|
153
|
-
const hooks = (_target$
|
|
154
|
+
const hooks = (_target$WEVU_HOOKS_KE = target[WEVU_HOOKS_KEY]) !== null && _target$WEVU_HOOKS_KE !== void 0 ? _target$WEVU_HOOKS_KE : {};
|
|
154
155
|
const hasShareAppMessage = typeof hooks.onShareAppMessage === "function";
|
|
155
156
|
const hasShareTimeline = typeof hooks.onShareTimeline === "function";
|
|
156
157
|
if (!hasShareAppMessage && !hasShareTimeline) return;
|
|
@@ -169,7 +170,7 @@ function ensurePageShareMenusOnSetup(target) {
|
|
|
169
170
|
*/
|
|
170
171
|
function callHookList(target, name, args = []) {
|
|
171
172
|
var _runtime$proxy2;
|
|
172
|
-
const hooks = target
|
|
173
|
+
const hooks = target[WEVU_HOOKS_KEY];
|
|
173
174
|
if (!hooks) return;
|
|
174
175
|
const list = hooks[name];
|
|
175
176
|
if (!list) return;
|
|
@@ -200,7 +201,7 @@ function ensurePageHookOnInstance(target, name) {
|
|
|
200
201
|
*/
|
|
201
202
|
function callHookReturn(target, name, args = []) {
|
|
202
203
|
var _runtime$proxy3;
|
|
203
|
-
const hooks = target
|
|
204
|
+
const hooks = target[WEVU_HOOKS_KEY];
|
|
204
205
|
if (!hooks) return;
|
|
205
206
|
const entry = hooks[name];
|
|
206
207
|
if (!entry) return;
|
|
@@ -311,7 +312,7 @@ function onAddToFavorites(handler) {
|
|
|
311
312
|
const PROVIDE_SCOPE_KEY = Symbol("wevu.provideScope");
|
|
312
313
|
const __wevuGlobalProvideStore = /* @__PURE__ */ new Map();
|
|
313
314
|
function isAppInstance(instance) {
|
|
314
|
-
return Boolean(instance && typeof instance === "object" && instance
|
|
315
|
+
return Boolean(instance && typeof instance === "object" && instance[WEVU_IS_APP_INSTANCE_KEY] === true);
|
|
315
316
|
}
|
|
316
317
|
/**
|
|
317
318
|
* 写入全局 provide 存储,供运行时内部与兼容层复用。
|
package/dist/router.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { an as RouterReLaunchOption, cn as SetupContextRouter, dn as WevuTypedRouterRouteMap, in as RouterNavigateToOption, ln as TypedRouterTabBarUrl, on as RouterRedirectToOption, sn as RouterSwitchTabOption, un as TypedRouterUrl } from "./vue-types-
|
|
1
|
+
import { an as RouterReLaunchOption, cn as SetupContextRouter, dn as WevuTypedRouterRouteMap, in as RouterNavigateToOption, ln as TypedRouterTabBarUrl, on as RouterRedirectToOption, sn as RouterSwitchTabOption, un as TypedRouterUrl } from "./vue-types-BCW41JNB.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/routerInternal/types.d.ts
|
|
4
4
|
interface RouteResolveCodec {
|
package/dist/router.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { d as reactive } from "./ref-JdrmsFSo.mjs";
|
|
2
|
-
import { G as readonly, L as getCurrentSetupContext, O as onShow, a as injectGlobal, h as onLoad, n as useNativeRouter$1, s as provideGlobal, t as useNativePageRouter$1, w as onRouteDone } from "./router-
|
|
2
|
+
import { G as readonly, L as getCurrentSetupContext, O as onShow, a as injectGlobal, h as onLoad, n as useNativeRouter$1, s as provideGlobal, t as useNativePageRouter$1, w as onRouteDone } from "./router-BCfYPEq2.mjs";
|
|
3
3
|
//#region src/routerInternal/path.ts
|
|
4
4
|
function normalizePathSegments(path) {
|
|
5
5
|
const segments = [];
|