wevu 6.15.0 → 6.15.3
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-CLkMXvCU.d.mts} +11 -4
- package/dist/{index-BZkMfL_L.d.mts → index-SDxsBVMY.d.mts} +1 -1
- package/dist/index.d.mts +4 -4
- package/dist/index.mjs +4 -4
- package/dist/{ref-JdrmsFSo.mjs → ref-mshhFqmk.mjs} +27 -3
- package/dist/{router-DKQJSUWb.mjs → router-Ci6Zqi7I.mjs} +11 -9
- package/dist/router.d.mts +1 -1
- package/dist/router.mjs +2 -2
- package/dist/{src-C5U2KbED.mjs → src-E_R8bSFM.mjs} +236 -193
- package/dist/{store-ClIYqg5X.mjs → store-fwgCLl_K.mjs} +1 -1
- package/dist/store.d.mts +1 -1
- package/dist/store.mjs +1 -1
- package/dist/vue-demi.d.mts +4 -4
- package/dist/vue-demi.mjs +4 -4
- package/dist/{vue-types-CxI8OQhB.d.mts → vue-types-BUOuHH4O.d.mts} +3 -2
- 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, i as DefineComponent, k as ComponentPublicInstance, p as SetupFunction, v as RuntimeInstance, w as MiniProgramComponentOptions, x as MiniProgramAppOptions, y as WevuPlugin, yn as InferProps } from "./vue-types-BUOuHH4O.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
|
/**
|
|
@@ -371,6 +377,7 @@ type ResolveProps<P> = P extends ComponentPropsOptions ? InferProps<P> : P;
|
|
|
371
377
|
interface WevuComponentConstructor<Props, RawBindings, D extends object, C extends ComputedDefinitions, M extends MethodDefinitions> {
|
|
372
378
|
new (): ComponentPublicInstance<D, C, M, Props> & ShallowUnwrapRef<RawBindings>;
|
|
373
379
|
}
|
|
380
|
+
type WevuDefinedComponent<PropsOrPropOptions, RawBindings, D extends object, C extends ComputedDefinitions, M extends MethodDefinitions> = DefineComponent<PropsOrPropOptions, RawBindings, D, C, M> & ComponentDefinition<D, C, M>;
|
|
374
381
|
interface SetupContextWithTypeProps<TypeProps> {
|
|
375
382
|
props: TypeProps;
|
|
376
383
|
[key: string]: any;
|
|
@@ -414,7 +421,7 @@ interface DefineComponentWithTypeProps<TypeProps> {
|
|
|
414
421
|
* ```
|
|
415
422
|
*/
|
|
416
423
|
declare function defineComponent<TypeProps = any>(options: DefineComponentTypePropsOptions<TypeProps>): DefineComponentWithTypeProps<TypeProps>;
|
|
417
|
-
declare function defineComponent<P extends ComponentPropsOptions = ComponentPropsOptions, D extends object = Record<string, any>, C extends ComputedDefinitions = ComputedDefinitions, M extends MethodDefinitions = MethodDefinitions, S extends Record<string, any> | void = Record<string, any> | void>(options: DefineComponentOptions<P, D, C, M, S>): WevuComponentConstructor<ResolveProps<P>, SetupBindings<S>, D, C, M>;
|
|
424
|
+
declare function defineComponent<P extends ComponentPropsOptions = ComponentPropsOptions, D extends object = Record<string, any>, C extends ComputedDefinitions = ComputedDefinitions, M extends MethodDefinitions = MethodDefinitions, S extends Record<string, any> | void = Record<string, any> | void>(options: DefineComponentOptions<P, D, C, M, S>): WevuComponentConstructor<ResolveProps<P>, SetupBindings<S>, D, C, M> & ComponentDefinition<D, C, M>;
|
|
418
425
|
/**
|
|
419
426
|
* 从 Vue SFC 选项创建 wevu 组件,供 weapp-vite 编译产物直接调用的兼容入口。
|
|
420
427
|
*
|
|
@@ -660,7 +667,7 @@ declare function syncRuntimePageLayoutState(target: Record<string, any>, layout:
|
|
|
660
667
|
declare function syncRuntimePageLayoutStateFromRuntime(target: Record<string, any>): void;
|
|
661
668
|
declare function setPageLayout(layout: false): void;
|
|
662
669
|
declare function setPageLayout<Name extends ResolveTypedPageLayoutName>(layout: Name, props?: ResolveTypedPageLayoutProps<Name>): void;
|
|
663
|
-
declare function resolveRuntimePageLayoutName(layout: string | false):
|
|
670
|
+
declare function resolveRuntimePageLayoutName(layout: string | false): any;
|
|
664
671
|
//#endregion
|
|
665
672
|
//#region src/runtime/pageScroll.d.ts
|
|
666
673
|
interface UsePageScrollThrottleOptions {
|
|
@@ -1019,4 +1026,4 @@ declare function defineModel<T = any, M extends PropertyKey = string, G = T, S =
|
|
|
1019
1026
|
//#region src/version.d.ts
|
|
1020
1027
|
declare const version: string;
|
|
1021
1028
|
//#endregion
|
|
1022
|
-
export { PageLayoutState as $, onTabItemTap as $t, defineAppSetup as A,
|
|
1029
|
+
export { PageLayoutState as $, onTabItemTap as $t, defineAppSetup as A, TemplateRefValue as An, onServerPrefetch as At, setRuntimeSetDataVisibility as B, SetDataSnapshotOptions as Bn, onMemoryWarning as Bt, UseModelOptions as C, defineComponent as Cn, onActivated as Ct, useAttrs as D, createApp as Dn, onDeactivated as Dt, useModel as E, setWevuDefaults as En, onBeforeUpdate as Et, useUpdatePerformanceListener as F, DataOption as Fn, onDetached as Ft, inject as G, onReachBottom as Gt, registerComponent as H, onPageNotFound as Ht, normalizeClass as I, DefineAppOptions as In, onError as It, provideGlobal as J, onRouteDone as Jt, injectGlobal as K, onReady as Kt, normalizeStyle as L, DefineComponentOptions as Ln, onHide as Lt, UpdatePerformanceListener as M, WevuGlobalComponents as Mn, onUpdated as Mt, UpdatePerformanceListenerResult as N, WevuGlobalDirectives as Nn, onAddToFavorites as Nt, useNativeInstance as O, GlobalComponents as On, onErrorCaptured as Ot, UseUpdatePerformanceListenerStopHandle as P, CreateAppOptions as Pn, onAttached as Pt, usePageScrollThrottle as Q, onShow as Qt, runSetupFunction as R, PageFeatures as Rn, onLaunch as Rt, ModelModifiers as S, createWevuScopedSlotComponent as Sn, callUpdateHooks as St, useBindModel as T, resetWevuDefaults as Tn, onBeforeUnmount as Tt, registerApp as U, onPageScroll as Ut, teardownRuntimeInstance as V, onMoved as Vt, hasInjectionContext as W, onPullDownRefresh as Wt, UsePageScrollThrottleOptions as X, onShareAppMessage as Xt, setGlobalProvidedValue as Y, onSaveExitState as Yt, UsePageScrollThrottleStopHandle as Z, onShareTimeline as Zt, EmitsOptions as _, SetupContextWithTypeProps as _n, useLayoutHosts as _t, PageLayoutMeta as a, getCurrentInstance as an, usePageLayout as at, useNativePageRouter as b, WevuDefinedComponent as bn, UseIntersectionObserverResult as bt, defineExpose as c, setCurrentSetupContext as cn, LayoutBridgeInstance as ct, definePageMeta as d, DisposableMethodName as dn, registerRuntimeLayoutHosts as dt, onThemeChange as en, WevuPageLayoutMap as et, defineProps as f, DisposableObject as fn, resolveLayoutBridge as ft, EmitFn as g, DefineComponentWithTypeProps as gn, useLayoutBridge as gt, ComponentTypeEmits as h, DefineComponentTypePropsOptions as hn, unregisterRuntimeLayoutHosts as ht, ModelRef as i, callHookReturn as in, syncRuntimePageLayoutStateFromRuntime as it, use as j, TemplateRefs as jn, onUnmounted as jt, useSlots as k, GlobalDirectives as kn, onMounted as kt, defineModel as l, DisposableBag as ln, LayoutHostBinding as lt, withDefaults as m, ComponentDefinition as mn, unregisterPageLayoutBridge as mt, DefineModelModifiers as n, onUnload as nn, setPageLayout as nt, PageMeta as o, getCurrentSetupContext as on, isNoSetData as ot, defineSlots as p, useDisposables as pn, resolveLayoutHost as pt, provide as q, onResize as qt, DefineModelTransformOptions as r, callHookList as rn, syncRuntimePageLayoutState as rt, defineEmits as s, setCurrentInstance as sn, markNoSetData as st, version as t, onUnhandledRejection as tn, resolveRuntimePageLayoutName as tt, defineOptions as u, DisposableLike as un, registerPageLayoutBridge as ut, TemplateRef as v, SetupFunctionWithTypeProps as vn, waitForLayoutHost as vt, mergeModels as w, WevuDefaults as wn, onBeforeMount as wt, useNativeRouter as x, createWevuComponent as xn, useIntersectionObserver as xt, useTemplateRef as y, WevuComponentConstructor as yn, UseIntersectionObserverOptions as yt, mountRuntimeInstance as z, SetDataDebugInfo as zn, onLoad as zt };
|
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
|
|
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-
|
|
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 };
|
|
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-BUOuHH4O.mjs";
|
|
3
|
+
import { $ as PageLayoutState, $t as onTabItemTap, A as defineAppSetup, An as TemplateRefValue, At as onServerPrefetch, B as setRuntimeSetDataVisibility, Bn as SetDataSnapshotOptions, Bt as onMemoryWarning, C as UseModelOptions, Cn as defineComponent, Ct as onActivated, D as useAttrs, Dn as createApp, Dt as onDeactivated, E as useModel, En as setWevuDefaults, Et as onBeforeUpdate, F as useUpdatePerformanceListener, Fn as DataOption, Ft as onDetached, G as inject, Gt as onReachBottom, H as registerComponent, Ht as onPageNotFound, I as normalizeClass, In as DefineAppOptions, It as onError, J as provideGlobal, Jt as onRouteDone, K as injectGlobal, Kt as onReady, L as normalizeStyle, Ln as DefineComponentOptions, Lt as onHide, M as UpdatePerformanceListener, Mn as WevuGlobalComponents, Mt as onUpdated, N as UpdatePerformanceListenerResult, Nn as WevuGlobalDirectives, Nt as onAddToFavorites, O as useNativeInstance, On as GlobalComponents, Ot as onErrorCaptured, P as UseUpdatePerformanceListenerStopHandle, Pn as CreateAppOptions, Pt as onAttached, Q as usePageScrollThrottle, Qt as onShow, R as runSetupFunction, Rn as PageFeatures, Rt as onLaunch, S as ModelModifiers, Sn as createWevuScopedSlotComponent, St as callUpdateHooks, T as useBindModel, Tn as resetWevuDefaults, 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 WevuDefinedComponent, 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 TemplateRefs, jt as onUnmounted, k as useSlots, kn as GlobalDirectives, 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 WevuDefaults, wt as onBeforeMount, x as useNativeRouter, xn as createWevuComponent, xt as useIntersectionObserver, y as useTemplateRef, yn as WevuComponentConstructor, yt as UseIntersectionObserverOptions, z as mountRuntimeInstance, zn as SetDataDebugInfo, zt as onLoad } from "./index-CLkMXvCU.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-SDxsBVMY.mjs";
|
|
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, WevuDefinedComponent, 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
|
-
import { C as
|
|
2
|
-
import { i as computed, n as defineStore, r as createStore, t as storeToRefs } from "./store-
|
|
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-
|
|
1
|
+
import { A as startBatch, C as removeMutationRecorder, D as endBatch, E as effectScope, F as nextTick, O as getCurrentScope, S as addMutationRecorder, T as effect, a as toValue, c as isRaw, d as reactive, f as isShallowReactive, g as touchReactive, h as prelinkReactiveTree, i as ref, j as stop, k as onScopeDispose, l as isReactive, n as isRef, o as unref, p as shallowReactive, s as getReactiveVersion, t as customRef, u as markRaw, w as batch, x as toRaw } from "./ref-mshhFqmk.mjs";
|
|
2
|
+
import { i as computed, n as defineStore, r as createStore, t as storeToRefs } from "./store-fwgCLl_K.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-Ci6Zqi7I.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-E_R8bSFM.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 };
|
|
@@ -343,9 +343,31 @@ let ReactiveFlags = /* @__PURE__ */ function(ReactiveFlags) {
|
|
|
343
343
|
ReactiveFlags["SKIP"] = "__r_skip";
|
|
344
344
|
return ReactiveFlags;
|
|
345
345
|
}({});
|
|
346
|
+
let TargetType = /* @__PURE__ */ function(TargetType) {
|
|
347
|
+
TargetType[TargetType["INVALID"] = 0] = "INVALID";
|
|
348
|
+
TargetType[TargetType["COMMON"] = 1] = "COMMON";
|
|
349
|
+
return TargetType;
|
|
350
|
+
}({});
|
|
346
351
|
function isObject(value) {
|
|
347
352
|
return typeof value === "object" && value !== null;
|
|
348
353
|
}
|
|
354
|
+
function toRawType(value) {
|
|
355
|
+
return Object.prototype.toString.call(value).slice(8, -1);
|
|
356
|
+
}
|
|
357
|
+
function targetTypeMap(rawType) {
|
|
358
|
+
switch (rawType) {
|
|
359
|
+
case "Object":
|
|
360
|
+
case "Array": return TargetType.COMMON;
|
|
361
|
+
case "Map":
|
|
362
|
+
case "Set":
|
|
363
|
+
case "WeakMap":
|
|
364
|
+
case "WeakSet": return TargetType.INVALID;
|
|
365
|
+
default: return TargetType.INVALID;
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
function getTargetType(value) {
|
|
369
|
+
return value[ReactiveFlags.SKIP] ? TargetType.INVALID : targetTypeMap(toRawType(value));
|
|
370
|
+
}
|
|
349
371
|
const VERSION_KEY = Symbol("wevu.version");
|
|
350
372
|
function isArrayIndexKey(key) {
|
|
351
373
|
if (!key) return false;
|
|
@@ -494,9 +516,10 @@ const shallowHandlers = {
|
|
|
494
516
|
*/
|
|
495
517
|
function shallowReactive(target) {
|
|
496
518
|
if (!isObject(target)) return target;
|
|
519
|
+
if (target[ReactiveFlags.IS_REACTIVE]) return target;
|
|
497
520
|
const existingProxy = shallowReactiveMap.get(target);
|
|
498
521
|
if (existingProxy) return existingProxy;
|
|
499
|
-
if (target
|
|
522
|
+
if (getTargetType(target) === TargetType.INVALID) return target;
|
|
500
523
|
const proxy = new Proxy(target, shallowHandlers);
|
|
501
524
|
shallowReactiveMap.set(target, proxy);
|
|
502
525
|
rawMap.set(proxy, target);
|
|
@@ -657,9 +680,10 @@ const mutableHandlers = {
|
|
|
657
680
|
};
|
|
658
681
|
function reactive(target) {
|
|
659
682
|
if (!isObject(target)) return target;
|
|
683
|
+
if (target[ReactiveFlags.IS_REACTIVE]) return target;
|
|
660
684
|
const existingProxy = reactiveMap.get(target);
|
|
661
685
|
if (existingProxy) return existingProxy;
|
|
662
|
-
if (target
|
|
686
|
+
if (getTargetType(target) === TargetType.INVALID) return target;
|
|
663
687
|
const proxy = new Proxy(target, mutableHandlers);
|
|
664
688
|
reactiveMap.set(target, proxy);
|
|
665
689
|
rawMap.set(proxy, target);
|
|
@@ -802,4 +826,4 @@ function customRef(factory, defaultValue) {
|
|
|
802
826
|
return markRaw(new CustomRefImpl(factory, defaultValue));
|
|
803
827
|
}
|
|
804
828
|
//#endregion
|
|
805
|
-
export {
|
|
829
|
+
export { startBatch as A, removeMutationRecorder as C, endBatch as D, effectScope as E, nextTick as F, queueJob as I, track as M, trigger as N, getCurrentScope as O, triggerEffects as P, addMutationRecorder as S, effect as T, ReactiveFlags as _, toValue as a, isObject as b, isRaw as c, reactive as d, isShallowReactive as f, touchReactive as g, prelinkReactiveTree as h, ref as i, stop as j, onScopeDispose as k, isReactive as l, clearPatchIndices as m, isRef as n, unref as o, shallowReactive as p, markAsRef as r, getReactiveVersion as s, customRef as t, markRaw as u, TargetType as v, batch as w, toRaw as x, getTargetType as y };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { _ as ReactiveFlags, l as isReactive, n as isRef, r as markAsRef, v as
|
|
1
|
+
import { _ as ReactiveFlags, b as isObject, l as isReactive, n as isRef, r as markAsRef, v as TargetType, y as getTargetType } from "./ref-mshhFqmk.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)) {
|
|
@@ -24,6 +25,7 @@ function createReadonlyWrapper(target) {
|
|
|
24
25
|
return readonlyRef;
|
|
25
26
|
}
|
|
26
27
|
if (!isObject(target)) return target;
|
|
28
|
+
if (getTargetType(target) === TargetType.INVALID) return target;
|
|
27
29
|
return new Proxy(target, {
|
|
28
30
|
set() {
|
|
29
31
|
throw new Error("无法在只读对象上设置属性");
|
|
@@ -109,8 +111,8 @@ function assertInSetup(name) {
|
|
|
109
111
|
return __currentInstance;
|
|
110
112
|
}
|
|
111
113
|
function ensureHookBucket(target) {
|
|
112
|
-
if (!target
|
|
113
|
-
return target
|
|
114
|
+
if (!target[WEVU_HOOKS_KEY]) target[WEVU_HOOKS_KEY] = Object.create(null);
|
|
115
|
+
return target[WEVU_HOOKS_KEY];
|
|
114
116
|
}
|
|
115
117
|
function pushHook(target, name, handler, { single = false } = {}) {
|
|
116
118
|
const bucket = ensureHookBucket(target);
|
|
@@ -127,7 +129,7 @@ function ensureSinglePageHookOnInstance(target, name) {
|
|
|
127
129
|
const original = target[name];
|
|
128
130
|
const bridge = function onWevuShareHookBridge(...args) {
|
|
129
131
|
var _runtime$proxy;
|
|
130
|
-
const hooks = this
|
|
132
|
+
const hooks = this[WEVU_HOOKS_KEY];
|
|
131
133
|
const entry = hooks === null || hooks === void 0 ? void 0 : hooks[name];
|
|
132
134
|
const runtime = this.__wevu;
|
|
133
135
|
const ctx = (_runtime$proxy = runtime === null || runtime === void 0 ? void 0 : runtime.proxy) !== null && _runtime$proxy !== void 0 ? _runtime$proxy : this;
|
|
@@ -147,10 +149,10 @@ function ensureSinglePageHookOnInstance(target, name) {
|
|
|
147
149
|
target[name] = bridge;
|
|
148
150
|
}
|
|
149
151
|
function ensurePageShareMenusOnSetup(target) {
|
|
150
|
-
var _target$
|
|
152
|
+
var _target$WEVU_HOOKS_KE;
|
|
151
153
|
const wxGlobal = getMiniProgramGlobalObject();
|
|
152
154
|
if (!wxGlobal || typeof wxGlobal.showShareMenu !== "function") return;
|
|
153
|
-
const hooks = (_target$
|
|
155
|
+
const hooks = (_target$WEVU_HOOKS_KE = target[WEVU_HOOKS_KEY]) !== null && _target$WEVU_HOOKS_KE !== void 0 ? _target$WEVU_HOOKS_KE : {};
|
|
154
156
|
const hasShareAppMessage = typeof hooks.onShareAppMessage === "function";
|
|
155
157
|
const hasShareTimeline = typeof hooks.onShareTimeline === "function";
|
|
156
158
|
if (!hasShareAppMessage && !hasShareTimeline) return;
|
|
@@ -169,7 +171,7 @@ function ensurePageShareMenusOnSetup(target) {
|
|
|
169
171
|
*/
|
|
170
172
|
function callHookList(target, name, args = []) {
|
|
171
173
|
var _runtime$proxy2;
|
|
172
|
-
const hooks = target
|
|
174
|
+
const hooks = target[WEVU_HOOKS_KEY];
|
|
173
175
|
if (!hooks) return;
|
|
174
176
|
const list = hooks[name];
|
|
175
177
|
if (!list) return;
|
|
@@ -200,7 +202,7 @@ function ensurePageHookOnInstance(target, name) {
|
|
|
200
202
|
*/
|
|
201
203
|
function callHookReturn(target, name, args = []) {
|
|
202
204
|
var _runtime$proxy3;
|
|
203
|
-
const hooks = target
|
|
205
|
+
const hooks = target[WEVU_HOOKS_KEY];
|
|
204
206
|
if (!hooks) return;
|
|
205
207
|
const entry = hooks[name];
|
|
206
208
|
if (!entry) return;
|
|
@@ -311,7 +313,7 @@ function onAddToFavorites(handler) {
|
|
|
311
313
|
const PROVIDE_SCOPE_KEY = Symbol("wevu.provideScope");
|
|
312
314
|
const __wevuGlobalProvideStore = /* @__PURE__ */ new Map();
|
|
313
315
|
function isAppInstance(instance) {
|
|
314
|
-
return Boolean(instance && typeof instance === "object" && instance
|
|
316
|
+
return Boolean(instance && typeof instance === "object" && instance[WEVU_IS_APP_INSTANCE_KEY] === true);
|
|
315
317
|
}
|
|
316
318
|
/**
|
|
317
319
|
* 写入全局 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-BUOuHH4O.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
|
-
import { d as reactive } from "./ref-
|
|
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-
|
|
1
|
+
import { d as reactive } from "./ref-mshhFqmk.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-Ci6Zqi7I.mjs";
|
|
3
3
|
//#region src/routerInternal/path.ts
|
|
4
4
|
function normalizePathSegments(path) {
|
|
5
5
|
const segments = [];
|