wevu 6.16.10 → 6.16.12
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 +1 -1
- package/dist/dev/{src-UZC4xb1h.mjs → src-ChaoIZge.mjs} +48 -7
- package/dist/dev/src-ChaoIZge.mjs.map +1 -0
- package/dist/dev/vue-demi.mjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/src-D7JtgrPD.mjs +1 -0
- package/dist/vue-demi.mjs +1 -1
- package/package.json +2 -2
- package/dist/dev/src-UZC4xb1h.mjs.map +0 -1
- package/dist/src-C37SCOXo.mjs +0 -1
package/dist/dev/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
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-
|
|
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-ChaoIZge.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-Dui1TzOR.mjs";
|
|
3
3
|
import { i as computed, n as defineStore, r as createStore, t as storeToRefs } from "./store-Brqfb7LU.mjs";
|
|
4
4
|
import { $ as onUnhandledRejection, A as setGlobalProvidedValue, B as onPageNotFound, F as onHide, G as onResize, H as onPullDownRefresh, I as onLaunch, J as onShareAppMessage, K as onRouteDone, L as onLoad, M as onAttached, N as onDetached, P as onError, Q as onThemeChange, R as onMemoryWarning, U as onReachBottom, V as onPageScroll, W as onReady, X as onShow, Y as onShareTimeline, Z as onTabItemTap, _ as provide, _t as readonly, at as getCurrentSetupContext, ct as setCurrentSetupContext, et as onUnload, g as injectGlobal, gt as isReadonly, h as inject, ht as isProxy, it as getCurrentInstance, j as onAddToFavorites, m as hasInjectionContext, n as useNativeRouter, nt as callHookList, q as onSaveExitState, rt as callHookReturn, st as setCurrentInstance, t as useNativePageRouter, v as provideGlobal, vt as shallowReadonly, z as onMoved } from "./router-DFQw3LKA.mjs";
|
|
@@ -478,7 +478,7 @@ function watchSyncEffect(effectFn, options = {}) {
|
|
|
478
478
|
|
|
479
479
|
//#endregion
|
|
480
480
|
//#region package.json
|
|
481
|
-
var version$1 = "6.16.
|
|
481
|
+
var version$1 = "6.16.12";
|
|
482
482
|
|
|
483
483
|
//#endregion
|
|
484
484
|
//#region src/version.ts
|
|
@@ -797,7 +797,14 @@ function createRuntimeContext(options) {
|
|
|
797
797
|
setComputedValue(computedSetters, key, value);
|
|
798
798
|
return true;
|
|
799
799
|
}
|
|
800
|
-
if (Reflect.has(target, key))
|
|
800
|
+
if (Reflect.has(target, key)) {
|
|
801
|
+
const existingValue = Reflect.get(target, key, receiver);
|
|
802
|
+
if (isRef(existingValue) && !isRef(value)) {
|
|
803
|
+
existingValue.value = value;
|
|
804
|
+
return true;
|
|
805
|
+
}
|
|
806
|
+
return Reflect.set(target, key, value, receiver);
|
|
807
|
+
}
|
|
801
808
|
const nativeInstance = resolveNativeInstance(target, receiver);
|
|
802
809
|
if (nativeInstance && Reflect.has(nativeInstance, key)) return Reflect.set(nativeInstance, key, value);
|
|
803
810
|
return Reflect.set(target, key, value, receiver);
|
|
@@ -2898,19 +2905,49 @@ function ensureSetupContextInstance(target, runtime) {
|
|
|
2898
2905
|
|
|
2899
2906
|
//#endregion
|
|
2900
2907
|
//#region src/runtime/register/runtimeInstance/methodBridge.ts
|
|
2908
|
+
function hasNativeApis(instance) {
|
|
2909
|
+
if (!instance || typeof instance !== "object") return false;
|
|
2910
|
+
return typeof instance.triggerEvent === "function" || typeof instance.createSelectorQuery === "function" || typeof instance.createIntersectionObserver === "function" || typeof instance.setData === "function";
|
|
2911
|
+
}
|
|
2912
|
+
function isBridgeMethod(runtime, instance, methodName) {
|
|
2913
|
+
const instanceMethod = instance === null || instance === void 0 ? void 0 : instance[methodName];
|
|
2914
|
+
if (typeof instanceMethod !== "function") return false;
|
|
2915
|
+
if (isNativeBridgeMethod(instanceMethod)) return true;
|
|
2916
|
+
const runtimeProxy = runtime === null || runtime === void 0 ? void 0 : runtime.proxy;
|
|
2917
|
+
return typeof (runtimeProxy === null || runtimeProxy === void 0 ? void 0 : runtimeProxy[methodName]) === "function" && instanceMethod === runtimeProxy[methodName];
|
|
2918
|
+
}
|
|
2919
|
+
function syncRuntimeNativeInstance(runtime, instance) {
|
|
2920
|
+
if (!runtime || !hasNativeApis(instance)) return;
|
|
2921
|
+
if (instance === runtime.proxy) return;
|
|
2922
|
+
const nativeCandidate = instance;
|
|
2923
|
+
if (isBridgeMethod(runtime, nativeCandidate, "triggerEvent") || isBridgeMethod(runtime, nativeCandidate, "createSelectorQuery") || isBridgeMethod(runtime, nativeCandidate, "createIntersectionObserver") || isBridgeMethod(runtime, nativeCandidate, "setData")) return;
|
|
2924
|
+
const runtimeState = runtime.state;
|
|
2925
|
+
if (!runtimeState || typeof runtimeState !== "object") return;
|
|
2926
|
+
try {
|
|
2927
|
+
Object.defineProperty(runtimeState, WEVU_NATIVE_INSTANCE_KEY, {
|
|
2928
|
+
value: nativeCandidate,
|
|
2929
|
+
configurable: true,
|
|
2930
|
+
enumerable: false,
|
|
2931
|
+
writable: true
|
|
2932
|
+
});
|
|
2933
|
+
} catch (_unused) {
|
|
2934
|
+
runtimeState[WEVU_NATIVE_INSTANCE_KEY] = nativeCandidate;
|
|
2935
|
+
}
|
|
2936
|
+
}
|
|
2901
2937
|
function bridgeRuntimeMethodsToTarget(target, runtime) {
|
|
2902
2938
|
try {
|
|
2903
2939
|
const methods = runtime.methods;
|
|
2904
2940
|
for (const name of Object.keys(methods)) {
|
|
2905
2941
|
if (setupInstanceMethodNames.includes(name)) continue;
|
|
2906
2942
|
if (typeof target[name] !== "function") target[name] = function bridged(...args) {
|
|
2907
|
-
var _ref;
|
|
2908
|
-
const runtime = this[WEVU_PUBLIC_RUNTIME_KEY];
|
|
2943
|
+
var _this$WEVU_PUBLIC_RUN, _ref;
|
|
2944
|
+
const runtime = (_this$WEVU_PUBLIC_RUN = this[WEVU_PUBLIC_RUNTIME_KEY]) !== null && _this$WEVU_PUBLIC_RUN !== void 0 ? _this$WEVU_PUBLIC_RUN : target[WEVU_PUBLIC_RUNTIME_KEY];
|
|
2945
|
+
syncRuntimeNativeInstance(runtime, this);
|
|
2909
2946
|
const bound = runtime === null || runtime === void 0 || (_ref = runtime.methods) === null || _ref === void 0 ? void 0 : _ref[name];
|
|
2910
2947
|
if (typeof bound === "function") return bound.apply(runtime.proxy, args);
|
|
2911
2948
|
};
|
|
2912
2949
|
}
|
|
2913
|
-
} catch (
|
|
2950
|
+
} catch (_unused2) {}
|
|
2914
2951
|
}
|
|
2915
2952
|
|
|
2916
2953
|
//#endregion
|
|
@@ -2970,6 +3007,9 @@ function runSetupFunction(setup, props, context) {
|
|
|
2970
3007
|
|
|
2971
3008
|
//#endregion
|
|
2972
3009
|
//#region src/runtime/register/runtimeInstance/setupPhase.ts
|
|
3010
|
+
function normalizeEmitEventName(eventName) {
|
|
3011
|
+
return eventName.includes(":") ? eventName.replaceAll(":", "-").toLowerCase() : eventName;
|
|
3012
|
+
}
|
|
2973
3013
|
function runRuntimeSetupPhase(options) {
|
|
2974
3014
|
const { target, runtime, runtimeWithDefaults, runtimeState, runtimeProxy, setup, syncRuntimeProps, attachRuntimeProxyProps } = options;
|
|
2975
3015
|
const mpProperties = target.properties || {};
|
|
@@ -3034,7 +3074,8 @@ function runRuntimeSetupPhase(options) {
|
|
|
3034
3074
|
instance: setupInstance,
|
|
3035
3075
|
emit: (event, ...args) => {
|
|
3036
3076
|
const { detail, options } = normalizeEmitPayload(args);
|
|
3037
|
-
|
|
3077
|
+
const eventName = normalizeEmitEventName(event);
|
|
3078
|
+
setupInstance.triggerEvent(eventName, detail, options);
|
|
3038
3079
|
},
|
|
3039
3080
|
expose: (exposed) => {
|
|
3040
3081
|
target[WEVU_EXPOSED_KEY] = exposed;
|
|
@@ -6007,4 +6048,4 @@ function useTemplateRef(name) {
|
|
|
6007
6048
|
|
|
6008
6049
|
//#endregion
|
|
6009
6050
|
export { isNoSetData as $, createApp as A, waitForLayoutHost as B, usePageStack as C, shallowRef as Ct, createWevuComponent as D, useDisposables as E, __reExport as Et, resolveLayoutHost as F, runSetupFunction as G, mountRuntimeInstance as H, unregisterPageLayoutBridge as I, syncRuntimePageLayoutState as J, resolveRuntimePageLayoutName as K, unregisterRuntimeLayoutHosts as L, registerPageLayoutBridge as M, registerRuntimeLayoutHosts as N, createWevuScopedSlotComponent as O, resolveLayoutBridge as P, setWevuDefaults as Q, useLayoutBridge as R, useNavigationBarMetrics as S, isShallowRef as St, useElementIntersectionObserver as T, __exportAll as Tt, setRuntimeSetDataVisibility as U, registerApp as V, teardownRuntimeInstance as W, usePageLayout as X, syncRuntimePageLayoutStateFromRuntime as Y, resetWevuDefaults as Z, useSelectorQuery as _, onUnmounted as _t, useModel as a, watchSyncEffect as at, getCurrentPageStackSnapshot as b, toRef as bt, useSlots as c, callUpdateHooks as ct, useUpdatePerformanceListener as d, onBeforeUnmount as dt, markNoSetData as et, normalizeClass as f, onBeforeUpdate as ft, useSelectorFields as g, onServerPrefetch as gt, useScrollOffset as h, onMounted as ht, useChangeModel as i, watchPostEffect as it, registerComponent as j, defineComponent as k, defineAppSetup as l, onActivated as lt, useBoundingClientRect as m, onErrorCaptured as mt, mergeModels as n, watch as nt, useAttrs as o, getDeepWatchStrategy as ot, normalizeStyle as p, onDeactivated as pt, setPageLayout as q, useBindModel as r, watchEffect as rt, useNativeInstance as s, setDeepWatchStrategy as st, useTemplateRef as t, version as tt, use as u, onBeforeMount as ut, useAsyncPullDownRefresh as v, onUpdated as vt, useIntersectionObserver as w, triggerRef as wt, getNavigationBarMetrics as x, toRefs as xt, usePageScrollThrottle as y, traverse as yt, useLayoutHosts as z };
|
|
6010
|
-
//# sourceMappingURL=src-
|
|
6051
|
+
//# sourceMappingURL=src-ChaoIZge.mjs.map
|