wevu 6.16.2 → 6.16.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/dev/index.mjs +2 -2
- package/dist/dev/router.mjs +39 -39
- package/dist/dev/router.mjs.map +1 -1
- package/dist/dev/{src-DcTVnwpE.mjs → src-DjDCQerj.mjs} +239 -3
- package/dist/dev/{src-DcTVnwpE.mjs.map → src-DjDCQerj.mjs.map} +1 -1
- package/dist/dev/vue-demi.mjs +13 -2
- package/dist/dev/vue-demi.mjs.map +1 -1
- package/dist/{index-6sv3KnLP.d.mts → index-BKnpWfa6.d.mts} +132 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +1 -1
- package/dist/router.mjs +1 -1
- package/dist/src-D9uUICz0.mjs +1 -0
- package/dist/vue-demi.d.mts +3 -3
- package/dist/vue-demi.mjs +1 -1
- package/package.json +2 -2
- package/dist/src-BFQLJ5K7.mjs +0 -1
package/dist/dev/index.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { $ as
|
|
1
|
+
import { $ as isNoSetData, A as createApp, B as waitForLayoutHost, C as usePageStack, Ct as shallowRef, D as createWevuComponent, E as useDisposables, F as resolveLayoutHost, G as runSetupFunction, H as mountRuntimeInstance, I as unregisterPageLayoutBridge, J as syncRuntimePageLayoutState, K as resolveRuntimePageLayoutName, L as unregisterRuntimeLayoutHosts, M as registerPageLayoutBridge, N as registerRuntimeLayoutHosts, O as createWevuScopedSlotComponent, P as resolveLayoutBridge, Q as setWevuDefaults, R as useLayoutBridge, S as useNavigationBarMetrics, St as isShallowRef, T as useElementIntersectionObserver, U as setRuntimeSetDataVisibility, V as registerApp, W as teardownRuntimeInstance, X as usePageLayout, Y as syncRuntimePageLayoutStateFromRuntime, Z as resetWevuDefaults, _ as useSelectorQuery, _t as onUnmounted, a as useModel, at as watchSyncEffect, b as getCurrentPageStackSnapshot, bt as toRef, c as useSlots, ct as callUpdateHooks, d as useUpdatePerformanceListener, dt as onBeforeUnmount, et as markNoSetData, f as normalizeClass, ft as onBeforeUpdate, g as useSelectorFields, gt as onServerPrefetch, h as useScrollOffset, ht as onMounted, i as useChangeModel, it as watchPostEffect, j as registerComponent, k as defineComponent, l as defineAppSetup, lt as onActivated, m as useBoundingClientRect, mt as onErrorCaptured, n as mergeModels, nt as watch, o as useAttrs, ot as getDeepWatchStrategy, p as normalizeStyle, pt as onDeactivated, q as setPageLayout, r as useBindModel, rt as watchEffect, s as useNativeInstance, st as setDeepWatchStrategy, t as useTemplateRef, tt as version, u as use, ut as onBeforeMount, v as useAsyncPullDownRefresh, vt as onUpdated, w as useIntersectionObserver, wt as triggerRef, x as getNavigationBarMetrics, xt as toRefs, y as usePageScrollThrottle, yt as traverse, z as useLayoutHosts } from "./src-DjDCQerj.mjs";
|
|
2
2
|
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-BTTXccLL.mjs";
|
|
3
3
|
import { i as computed, n as defineStore, r as createStore, t as storeToRefs } from "./store-Dr0zE_9B.mjs";
|
|
4
4
|
import { A as onLoad, B as onSaveExitState, C as setGlobalProvidedValue, D as onError, E as onDetached, F as onPullDownRefresh, G as onThemeChange, H as onShareTimeline, I as onReachBottom, K as onUnhandledRejection, L as onReady, M as onMoved, N as onPageNotFound, O as onHide, P as onPageScroll, Q as getCurrentSetupContext, R as onResize, T as onAttached, U as onShow, V as onShareAppMessage, W as onTabItemTap, X as callHookReturn, Y as callHookList, Z as getCurrentInstance, _ as provide, ct as isProxy, dt as shallowReadonly, et as setCurrentInstance, g as injectGlobal, h as inject, j as onMemoryWarning, k as onLaunch, lt as isReadonly, m as hasInjectionContext, n as useNativeRouter, q as onUnload, t as useNativePageRouter, tt as setCurrentSetupContext, ut as readonly, v as provideGlobal, w as onAddToFavorites, z as onRouteDone } from "./router-BZZnIx32.mjs";
|
|
5
5
|
|
|
6
6
|
export * from "@wevu/web-apis"
|
|
7
7
|
|
|
8
|
-
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 };
|
|
8
|
+
export { addMutationRecorder, batch, callHookList, callHookReturn, callUpdateHooks, computed, createApp, createStore, createWevuComponent, createWevuScopedSlotComponent, customRef, defineAppSetup, defineComponent, defineStore, effect, effectScope, endBatch, getCurrentInstance, getCurrentPageStackSnapshot, getCurrentScope, getCurrentSetupContext, getDeepWatchStrategy, getNavigationBarMetrics, getReactiveVersion, hasInjectionContext, inject, injectGlobal, isNoSetData, isProxy, isRaw, isReactive, isReadonly, isRef, isShallowReactive, isShallowRef, markNoSetData, markRaw, mergeModels, mountRuntimeInstance, nextTick, normalizeClass, normalizeStyle, onActivated, onAddToFavorites, onAttached, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onDetached, onError, onErrorCaptured, onHide, onLaunch, onLoad, onMemoryWarning, onMounted, onMoved, onPageNotFound, onPageScroll, onPullDownRefresh, onReachBottom, onReady, onResize, onRouteDone, onSaveExitState, onScopeDispose, onServerPrefetch, onShareAppMessage, onShareTimeline, onShow, onTabItemTap, onThemeChange, onUnhandledRejection, onUnload, onUnmounted, onUpdated, prelinkReactiveTree, provide, provideGlobal, reactive, readonly, ref, registerApp, registerComponent, registerPageLayoutBridge, registerRuntimeLayoutHosts, removeMutationRecorder, resetWevuDefaults, resolveLayoutBridge, resolveLayoutHost, 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, useAsyncPullDownRefresh, useAttrs, useBindModel, useBoundingClientRect, useChangeModel, useDisposables, useElementIntersectionObserver, useIntersectionObserver, useLayoutBridge, useLayoutHosts, useModel, useNativeInstance, useNativePageRouter, useNativeRouter, useNavigationBarMetrics, usePageLayout, usePageScrollThrottle, usePageStack, useScrollOffset, useSelectorFields, useSelectorQuery, useSlots, useTemplateRef, useUpdatePerformanceListener, version, waitForLayoutHost, watch, watchEffect, watchPostEffect, watchSyncEffect };
|
package/dist/dev/router.mjs
CHANGED
|
@@ -292,6 +292,18 @@ function resolveRouteRecordName(route, normalizedPath, source = "namedRoutes") {
|
|
|
292
292
|
if (source === "routes") return normalizedPath || "/";
|
|
293
293
|
return "";
|
|
294
294
|
}
|
|
295
|
+
function normalizeRouteRecordAliasPaths(alias, normalizedPath) {
|
|
296
|
+
if (!alias) return [];
|
|
297
|
+
const aliasList = Array.isArray(alias) ? alias : [alias];
|
|
298
|
+
const normalizedAliasPaths = [];
|
|
299
|
+
for (const aliasPath of aliasList) {
|
|
300
|
+
if (typeof aliasPath !== "string") continue;
|
|
301
|
+
const normalizedAliasPath = resolvePath(aliasPath, "");
|
|
302
|
+
if (!normalizedAliasPath || normalizedAliasPath === normalizedPath) continue;
|
|
303
|
+
if (!normalizedAliasPaths.includes(normalizedAliasPath)) normalizedAliasPaths.push(normalizedAliasPath);
|
|
304
|
+
}
|
|
305
|
+
return normalizedAliasPaths;
|
|
306
|
+
}
|
|
295
307
|
function normalizeRouteRecordRaw(route, parentName, source = "namedRoutes") {
|
|
296
308
|
const normalizedPath = resolvePath(route.path, "");
|
|
297
309
|
if (!normalizedPath && route.path !== "/") return;
|
|
@@ -307,45 +319,6 @@ function normalizeRouteRecordRaw(route, parentName, source = "namedRoutes") {
|
|
|
307
319
|
redirect: route.redirect
|
|
308
320
|
};
|
|
309
321
|
}
|
|
310
|
-
function normalizeRouteRecordAliasPaths(alias, normalizedPath) {
|
|
311
|
-
if (!alias) return [];
|
|
312
|
-
const aliasList = Array.isArray(alias) ? alias : [alias];
|
|
313
|
-
const normalizedAliasPaths = [];
|
|
314
|
-
for (const aliasPath of aliasList) {
|
|
315
|
-
if (typeof aliasPath !== "string") continue;
|
|
316
|
-
const normalizedAliasPath = resolvePath(aliasPath, "");
|
|
317
|
-
if (!normalizedAliasPath || normalizedAliasPath === normalizedPath) continue;
|
|
318
|
-
if (!normalizedAliasPaths.includes(normalizedAliasPath)) normalizedAliasPaths.push(normalizedAliasPath);
|
|
319
|
-
}
|
|
320
|
-
return normalizedAliasPaths;
|
|
321
|
-
}
|
|
322
|
-
function normalizeNamedRouteEntries(namedRoutes, source = "namedRoutes") {
|
|
323
|
-
if (!namedRoutes) return [];
|
|
324
|
-
if (Array.isArray(namedRoutes)) return flattenNamedRouteRecords(namedRoutes, void 0, void 0, [], source, source);
|
|
325
|
-
const normalizedEntries = [];
|
|
326
|
-
for (const [rawName, rawPath] of Object.entries(namedRoutes)) {
|
|
327
|
-
const routeName = typeof rawName === "string" ? rawName.trim() : "";
|
|
328
|
-
if (!routeName) {
|
|
329
|
-
warnRouteConfig(`ignored route record at ${source}: route name is required`);
|
|
330
|
-
continue;
|
|
331
|
-
}
|
|
332
|
-
if (typeof rawPath !== "string" || !rawPath) {
|
|
333
|
-
warnRouteConfig(`ignored route record "${routeName}" at ${source}: route path is required`);
|
|
334
|
-
continue;
|
|
335
|
-
}
|
|
336
|
-
normalizedEntries.push({
|
|
337
|
-
route: {
|
|
338
|
-
name: routeName,
|
|
339
|
-
path: rawPath
|
|
340
|
-
},
|
|
341
|
-
source
|
|
342
|
-
});
|
|
343
|
-
}
|
|
344
|
-
return normalizedEntries;
|
|
345
|
-
}
|
|
346
|
-
function resolveRouteOptionEntries(options) {
|
|
347
|
-
return [...normalizeNamedRouteEntries(options.routes, "routes"), ...normalizeNamedRouteEntries(options.namedRoutes, "namedRoutes")];
|
|
348
|
-
}
|
|
349
322
|
function normalizeNestedRoutePath(path, parentPath) {
|
|
350
323
|
if (!parentPath || path.startsWith("/")) return resolvePath(path, "");
|
|
351
324
|
return resolvePath(`${createAbsoluteRoutePath(parentPath)}/${path}`, "");
|
|
@@ -426,6 +399,33 @@ function flattenNamedRouteRecords(records, parentPath, parentName, parentAliasPa
|
|
|
426
399
|
}
|
|
427
400
|
return flattenedRecords;
|
|
428
401
|
}
|
|
402
|
+
function normalizeNamedRouteEntries(namedRoutes, source = "namedRoutes") {
|
|
403
|
+
if (!namedRoutes) return [];
|
|
404
|
+
if (Array.isArray(namedRoutes)) return flattenNamedRouteRecords(namedRoutes, void 0, void 0, [], source, source);
|
|
405
|
+
const normalizedEntries = [];
|
|
406
|
+
for (const [rawName, rawPath] of Object.entries(namedRoutes)) {
|
|
407
|
+
const routeName = typeof rawName === "string" ? rawName.trim() : "";
|
|
408
|
+
if (!routeName) {
|
|
409
|
+
warnRouteConfig(`ignored route record at ${source}: route name is required`);
|
|
410
|
+
continue;
|
|
411
|
+
}
|
|
412
|
+
if (typeof rawPath !== "string" || !rawPath) {
|
|
413
|
+
warnRouteConfig(`ignored route record "${routeName}" at ${source}: route path is required`);
|
|
414
|
+
continue;
|
|
415
|
+
}
|
|
416
|
+
normalizedEntries.push({
|
|
417
|
+
route: {
|
|
418
|
+
name: routeName,
|
|
419
|
+
path: rawPath
|
|
420
|
+
},
|
|
421
|
+
source
|
|
422
|
+
});
|
|
423
|
+
}
|
|
424
|
+
return normalizedEntries;
|
|
425
|
+
}
|
|
426
|
+
function resolveRouteOptionEntries(options) {
|
|
427
|
+
return [...normalizeNamedRouteEntries(options.routes, "routes"), ...normalizeNamedRouteEntries(options.namedRoutes, "namedRoutes")];
|
|
428
|
+
}
|
|
429
429
|
function createNamedRouteNameByStaticPath(recordByName) {
|
|
430
430
|
const nameByStaticPath = /* @__PURE__ */ new Map();
|
|
431
431
|
for (const [name, record] of recordByName.entries()) {
|