wevu 6.16.23 → 6.16.25
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-DIIRnwWG.mjs → src-Dcw71lOi.mjs} +68 -21
- package/dist/dev/src-Dcw71lOi.mjs.map +1 -0
- package/dist/dev/vue-demi.mjs +1 -1
- package/dist/{index-CLoFnRY3.d.mts → index-DuNbWb3x.d.mts} +1 -0
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +1 -1
- package/dist/src-CVjc1voo.mjs +1 -0
- package/dist/vue-demi.d.mts +1 -1
- package/dist/vue-demi.mjs +1 -1
- package/package.json +4 -4
- package/dist/dev/src-DIIRnwWG.mjs.map +0 -1
- package/dist/src-DXyn394e.mjs +0 -1
package/dist/dev/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as setWevuDefaults, A as defineComponent, B as useLayoutHosts, C as useNavigationBarMetrics, Ct as isShallowRef, D as useDisposables, E as useElementIntersectionObserver, F as resolveLayoutBridge, G as teardownRuntimeInstance, H as registerApp, I as resolveLayoutHost, J as setPageLayout, K as runSetupFunction, L as unregisterPageLayoutBridge, M as registerComponent, N as registerPageLayoutBridge, O as createWevuComponent, P as registerRuntimeLayoutHosts, Q as resetWevuDefaults, R as unregisterRuntimeLayoutHosts, S as getNavigationBarMetrics, St as toRefs, T as useIntersectionObserver, Tt as triggerRef, U as mountRuntimeInstance, V as waitForLayoutHost, W as setRuntimeSetDataVisibility, X as syncRuntimePageLayoutStateFromRuntime, Y as syncRuntimePageLayoutState, Z as usePageLayout, _ as useSelectorFields, _t as onServerPrefetch, a as useModel, at as watchPostEffect, b as usePageScrollThrottle, bt as traverse, c as useSlots, ct as setDeepWatchStrategy, d as useUpdatePerformanceListener, dt as onBeforeMount, et as isNoSetData, f as normalizeClass, ft as onBeforeUnmount, g as useScrollOffset, gt as onMounted, h as useBoundingClientRect, ht as onErrorCaptured, i as useChangeModel, it as watchEffect, j as createApp, k as createWevuScopedSlotComponent, l as defineAppSetup, lt as callUpdateHooks, m as resolvePropValue, mt as onDeactivated, n as mergeModels, nt as version, o as useAttrs, ot as watchSyncEffect, p as normalizeStyle, pt as onBeforeUpdate, q as resolveRuntimePageLayoutName, r as useBindModel, rt as watch, s as useNativeInstance, st as getDeepWatchStrategy, t as useTemplateRef, tt as markNoSetData, u as use, ut as onActivated, v as useSelectorQuery, vt as onUnmounted, w as usePageStack, wt as shallowRef, x as getCurrentPageStackSnapshot, xt as toRef, y as useAsyncPullDownRefresh, yt as onUpdated, z as useLayoutBridge } from "./src-
|
|
1
|
+
import { $ as setWevuDefaults, A as defineComponent, B as useLayoutHosts, C as useNavigationBarMetrics, Ct as isShallowRef, D as useDisposables, E as useElementIntersectionObserver, F as resolveLayoutBridge, G as teardownRuntimeInstance, H as registerApp, I as resolveLayoutHost, J as setPageLayout, K as runSetupFunction, L as unregisterPageLayoutBridge, M as registerComponent, N as registerPageLayoutBridge, O as createWevuComponent, P as registerRuntimeLayoutHosts, Q as resetWevuDefaults, R as unregisterRuntimeLayoutHosts, S as getNavigationBarMetrics, St as toRefs, T as useIntersectionObserver, Tt as triggerRef, U as mountRuntimeInstance, V as waitForLayoutHost, W as setRuntimeSetDataVisibility, X as syncRuntimePageLayoutStateFromRuntime, Y as syncRuntimePageLayoutState, Z as usePageLayout, _ as useSelectorFields, _t as onServerPrefetch, a as useModel, at as watchPostEffect, b as usePageScrollThrottle, bt as traverse, c as useSlots, ct as setDeepWatchStrategy, d as useUpdatePerformanceListener, dt as onBeforeMount, et as isNoSetData, f as normalizeClass, ft as onBeforeUnmount, g as useScrollOffset, gt as onMounted, h as useBoundingClientRect, ht as onErrorCaptured, i as useChangeModel, it as watchEffect, j as createApp, k as createWevuScopedSlotComponent, l as defineAppSetup, lt as callUpdateHooks, m as resolvePropValue, mt as onDeactivated, n as mergeModels, nt as version, o as useAttrs, ot as watchSyncEffect, p as normalizeStyle, pt as onBeforeUpdate, q as resolveRuntimePageLayoutName, r as useBindModel, rt as watch, s as useNativeInstance, st as getDeepWatchStrategy, t as useTemplateRef, tt as markNoSetData, u as use, ut as onActivated, v as useSelectorQuery, vt as onUnmounted, w as usePageStack, wt as shallowRef, x as getCurrentPageStackSnapshot, xt as toRef, y as useAsyncPullDownRefresh, yt as onUpdated, z as useLayoutBridge } from "./src-Dcw71lOi.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-DAstlXwV.mjs";
|
|
3
3
|
import { i as computed, n as defineStore, r as createStore, t as storeToRefs } from "./store-Bazm64zK.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-D68ovdoh.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.25";
|
|
482
482
|
|
|
483
483
|
//#endregion
|
|
484
484
|
//#region src/version.ts
|
|
@@ -1555,7 +1555,7 @@ function runPatchUpdate(options) {
|
|
|
1555
1555
|
//#endregion
|
|
1556
1556
|
//#region src/runtime/app/setData/scheduler.ts
|
|
1557
1557
|
function createSetDataScheduler(options) {
|
|
1558
|
-
const { state, setupState, computedRefs, dirtyComputedKeys, includeComputed, setDataStrategy, computedCompare, computedCompareMaxDepth, computedCompareMaxKeys, currentAdapter, shouldIncludeKey, maxPatchKeys, maxPayloadBytes, mergeSiblingThreshold, mergeSiblingMaxInflationRatio, mergeSiblingMaxParentBytes, mergeSiblingSkipArray, elevateTopKeyThreshold, toPlainMaxDepth, toPlainMaxKeys, includeFunctions = false, functionPaths, debug, debugWhen, debugSampleRate, runTracker, isMounted } = options;
|
|
1558
|
+
const { state, setupState, snapshotOmitKeys, computedRefs, dirtyComputedKeys, includeComputed, setDataStrategy, computedCompare, computedCompareMaxDepth, computedCompareMaxKeys, currentAdapter, shouldIncludeKey, maxPatchKeys, maxPayloadBytes, mergeSiblingThreshold, mergeSiblingMaxInflationRatio, mergeSiblingMaxParentBytes, mergeSiblingSkipArray, elevateTopKeyThreshold, toPlainMaxDepth, toPlainMaxKeys, includeFunctions = false, functionPaths, debug, debugWhen, debugSampleRate, runTracker, isMounted } = options;
|
|
1559
1559
|
const plainCache = /* @__PURE__ */ new WeakMap();
|
|
1560
1560
|
let latestSnapshot = {};
|
|
1561
1561
|
let latestComputedSnapshot = Object.create(null);
|
|
@@ -1606,11 +1606,12 @@ function createSetDataScheduler(options) {
|
|
|
1606
1606
|
}
|
|
1607
1607
|
return left.raw === right.raw && left.version === right.version;
|
|
1608
1608
|
};
|
|
1609
|
+
const shouldIncludeSnapshotKey = (key) => shouldIncludeKey(key) && !(snapshotOmitKeys === null || snapshotOmitKeys === void 0 ? void 0 : snapshotOmitKeys.has(key));
|
|
1609
1610
|
const resolveTopKeysByRoot = (root) => {
|
|
1610
1611
|
const matches = [];
|
|
1611
1612
|
const rawSetupState = setupState && typeof setupState === "object" ? isReactive(setupState) ? toRaw(setupState) : setupState : void 0;
|
|
1612
1613
|
for (const key of new Set([...Object.keys(state), ...rawSetupState ? Object.keys(rawSetupState) : []])) {
|
|
1613
|
-
if (!
|
|
1614
|
+
if (!shouldIncludeSnapshotKey(key)) continue;
|
|
1614
1615
|
const value = rawSetupState && hasOwn(rawSetupState, key) ? rawSetupState[key] : state[key];
|
|
1615
1616
|
const candidate = isRef(value) ? value.value : value;
|
|
1616
1617
|
if (!candidate || typeof candidate !== "object") continue;
|
|
@@ -1632,7 +1633,7 @@ function createSetDataScheduler(options) {
|
|
|
1632
1633
|
setupState,
|
|
1633
1634
|
computedRefs,
|
|
1634
1635
|
includeComputed,
|
|
1635
|
-
shouldIncludeKey,
|
|
1636
|
+
shouldIncludeKey: shouldIncludeSnapshotKey,
|
|
1636
1637
|
plainCache,
|
|
1637
1638
|
toPlainMaxDepth,
|
|
1638
1639
|
toPlainMaxKeys,
|
|
@@ -1648,7 +1649,7 @@ function createSetDataScheduler(options) {
|
|
|
1648
1649
|
const includedComputedKeys = /* @__PURE__ */ new Set();
|
|
1649
1650
|
const replacedTopLevelKeys = /* @__PURE__ */ new Set();
|
|
1650
1651
|
for (const key of new Set([...Object.keys(rawState), ...rawSetupState ? Object.keys(rawSetupState) : []])) {
|
|
1651
|
-
if (!
|
|
1652
|
+
if (!shouldIncludeSnapshotKey(key)) continue;
|
|
1652
1653
|
includedStateKeys.add(key);
|
|
1653
1654
|
const source = rawSetupState && hasOwn(rawSetupState, key) ? rawSetupState : rawState;
|
|
1654
1655
|
const token = createValueToken(source[key]);
|
|
@@ -1676,7 +1677,7 @@ function createSetDataScheduler(options) {
|
|
|
1676
1677
|
};
|
|
1677
1678
|
}
|
|
1678
1679
|
for (const key of Object.keys(computedRefs)) {
|
|
1679
|
-
if (!
|
|
1680
|
+
if (!shouldIncludeSnapshotKey(key)) continue;
|
|
1680
1681
|
includedComputedKeys.add(key);
|
|
1681
1682
|
const value = computedRefs[key].value;
|
|
1682
1683
|
const token = createValueToken(value);
|
|
@@ -1692,7 +1693,7 @@ function createSetDataScheduler(options) {
|
|
|
1692
1693
|
}
|
|
1693
1694
|
for (const key of Object.keys(latestComputedTokens)) if (!includedComputedKeys.has(key)) {
|
|
1694
1695
|
delete latestComputedTokens[key];
|
|
1695
|
-
if (!hasOwn(rawState, key) || !
|
|
1696
|
+
if (!hasOwn(rawState, key) || !shouldIncludeSnapshotKey(key)) delete nextSnapshot[key];
|
|
1696
1697
|
}
|
|
1697
1698
|
return {
|
|
1698
1699
|
snapshot: nextSnapshot,
|
|
@@ -1717,7 +1718,7 @@ function createSetDataScheduler(options) {
|
|
|
1717
1718
|
if (setDataStrategy === "patch" && includeComputed) {
|
|
1718
1719
|
latestComputedSnapshot = Object.create(null);
|
|
1719
1720
|
for (const key of Object.keys(computedRefs)) {
|
|
1720
|
-
if (!
|
|
1721
|
+
if (!shouldIncludeSnapshotKey(key)) continue;
|
|
1721
1722
|
latestComputedSnapshot[key] = snapshot[key];
|
|
1722
1723
|
}
|
|
1723
1724
|
dirtyComputedKeys.clear();
|
|
@@ -1747,7 +1748,7 @@ function createSetDataScheduler(options) {
|
|
|
1747
1748
|
return;
|
|
1748
1749
|
}
|
|
1749
1750
|
const topKey = record.path.split(".", 1)[0];
|
|
1750
|
-
if (!
|
|
1751
|
+
if (!shouldIncludeSnapshotKey(topKey)) return;
|
|
1751
1752
|
pendingPatches.set(record.path, {
|
|
1752
1753
|
kind: record.kind,
|
|
1753
1754
|
op: record.op
|
|
@@ -1770,7 +1771,7 @@ function createSetDataScheduler(options) {
|
|
|
1770
1771
|
computedCompareMaxDepth,
|
|
1771
1772
|
computedCompareMaxKeys,
|
|
1772
1773
|
currentAdapter,
|
|
1773
|
-
shouldIncludeKey,
|
|
1774
|
+
shouldIncludeKey: shouldIncludeSnapshotKey,
|
|
1774
1775
|
maxPatchKeys,
|
|
1775
1776
|
maxPayloadBytes,
|
|
1776
1777
|
mergeSiblingThreshold,
|
|
@@ -1903,6 +1904,9 @@ function createRuntimeMount(options) {
|
|
|
1903
1904
|
} catch (_unused) {}
|
|
1904
1905
|
const state = reactive(rawState);
|
|
1905
1906
|
const setupState = reactive(Object.create(null));
|
|
1907
|
+
const adapterSnapshotOmitKeys = adapter === null || adapter === void 0 ? void 0 : adapter.__wevu_snapshotOmitKeys;
|
|
1908
|
+
const deferInitialSnapshot = Boolean(adapter === null || adapter === void 0 ? void 0 : adapter.__wevu_deferInitialSnapshot);
|
|
1909
|
+
const snapshotOmitKeys = new Set(adapterSnapshotOmitKeys instanceof Set ? adapterSnapshotOmitKeys : Array.isArray(adapterSnapshotOmitKeys) ? adapterSnapshotOmitKeys : []);
|
|
1906
1910
|
if (rawState && typeof rawState === "object" && !hasOwn(rawState, WEVU_SETUP_STATE_KEY)) try {
|
|
1907
1911
|
Object.defineProperty(rawState, WEVU_SETUP_STATE_KEY, {
|
|
1908
1912
|
value: setupState,
|
|
@@ -1942,6 +1946,7 @@ function createRuntimeMount(options) {
|
|
|
1942
1946
|
const scheduler = createSetDataScheduler({
|
|
1943
1947
|
state,
|
|
1944
1948
|
setupState,
|
|
1949
|
+
snapshotOmitKeys,
|
|
1945
1950
|
computedRefs,
|
|
1946
1951
|
dirtyComputedKeys,
|
|
1947
1952
|
includeComputed,
|
|
@@ -1984,7 +1989,7 @@ function createRuntimeMount(options) {
|
|
|
1984
1989
|
lazy: true,
|
|
1985
1990
|
scheduler: () => queueJob(job)
|
|
1986
1991
|
});
|
|
1987
|
-
job();
|
|
1992
|
+
if (!deferInitialSnapshot) job();
|
|
1988
1993
|
stopHandles.push(createWatchStopHandle(() => stop(tracker)));
|
|
1989
1994
|
if (setDataStrategy === "patch") {
|
|
1990
1995
|
prelinkReactiveTree(state, {
|
|
@@ -2084,6 +2089,16 @@ function createRuntimeMount(options) {
|
|
|
2084
2089
|
trackedSetupReactiveKeys.add(key);
|
|
2085
2090
|
};
|
|
2086
2091
|
}
|
|
2092
|
+
try {
|
|
2093
|
+
Object.defineProperty(runtimeInstance, WEVU_PROPS_DERIVED_KEYS_KEY, {
|
|
2094
|
+
value: snapshotOmitKeys,
|
|
2095
|
+
configurable: true,
|
|
2096
|
+
enumerable: false,
|
|
2097
|
+
writable: false
|
|
2098
|
+
});
|
|
2099
|
+
} catch (_unused8) {
|
|
2100
|
+
runtimeInstance[WEVU_PROPS_DERIVED_KEYS_KEY] = snapshotOmitKeys;
|
|
2101
|
+
}
|
|
2087
2102
|
return runtimeInstance;
|
|
2088
2103
|
};
|
|
2089
2104
|
}
|
|
@@ -3557,7 +3572,7 @@ function mountRuntimeInstance(target, runtimeApp, watchMap, setup, options) {
|
|
|
3557
3572
|
if (propsSource && typeof propsSource === "object") for (const [key, value] of Object.entries(propsSource)) snapshot[key] = value;
|
|
3558
3573
|
updateOwnerSnapshot(ownerId, snapshot, runtimeRef.proxy);
|
|
3559
3574
|
};
|
|
3560
|
-
const
|
|
3575
|
+
const baseMountAdapter = {
|
|
3561
3576
|
...baseAdapter,
|
|
3562
3577
|
setData(payload) {
|
|
3563
3578
|
highFrequencyWarning === null || highFrequencyWarning === void 0 || highFrequencyWarning();
|
|
@@ -3583,7 +3598,19 @@ function mountRuntimeInstance(target, runtimeApp, watchMap, setup, options) {
|
|
|
3583
3598
|
return result;
|
|
3584
3599
|
}
|
|
3585
3600
|
};
|
|
3586
|
-
|
|
3601
|
+
if (Array.isArray(options === null || options === void 0 ? void 0 : options.snapshotOmitKeys) && options.snapshotOmitKeys.length) Object.defineProperty(baseMountAdapter, "__wevu_snapshotOmitKeys", {
|
|
3602
|
+
configurable: true,
|
|
3603
|
+
enumerable: false,
|
|
3604
|
+
value: options.snapshotOmitKeys,
|
|
3605
|
+
writable: false
|
|
3606
|
+
});
|
|
3607
|
+
if (setup) Object.defineProperty(baseMountAdapter, "__wevu_deferInitialSnapshot", {
|
|
3608
|
+
configurable: true,
|
|
3609
|
+
enumerable: false,
|
|
3610
|
+
value: true,
|
|
3611
|
+
writable: false
|
|
3612
|
+
});
|
|
3613
|
+
const runtime = runtimeApp.mount(baseMountAdapter);
|
|
3587
3614
|
runtimeRef = runtime;
|
|
3588
3615
|
attachRuntimeInstance(runtime, target);
|
|
3589
3616
|
const runtimeProxy = (_runtime$proxy = runtime === null || runtime === void 0 ? void 0 : runtime.proxy) !== null && _runtime$proxy !== void 0 ? _runtime$proxy : {};
|
|
@@ -4325,7 +4352,20 @@ function createPropsSync(options) {
|
|
|
4325
4352
|
const propKeySet = new Set(propKeys);
|
|
4326
4353
|
const propsDerivedKeySet = new Set(propsDerivedKeys !== null && propsDerivedKeys !== void 0 ? propsDerivedKeys : []);
|
|
4327
4354
|
const aliasEntries = Object.entries(propsAliases !== null && propsAliases !== void 0 ? propsAliases : {}).filter(([alias, propName]) => alias && propName);
|
|
4355
|
+
const aliasKeySet = new Set(aliasEntries.map(([alias]) => alias));
|
|
4356
|
+
const directPropsDerivedKeys = [...propsDerivedKeySet].filter((key) => propKeySet.has(key) && !aliasKeySet.has(key));
|
|
4328
4357
|
const syncedAliases = /* @__PURE__ */ new WeakMap();
|
|
4358
|
+
const updateSnapshotOmitKeys = (instance) => {
|
|
4359
|
+
const runtime = instance.__wevu;
|
|
4360
|
+
const snapshotOmitKeys = runtime === null || runtime === void 0 ? void 0 : runtime[WEVU_PROPS_DERIVED_KEYS_KEY];
|
|
4361
|
+
if (!(snapshotOmitKeys instanceof Set)) return;
|
|
4362
|
+
for (const key of directPropsDerivedKeys) snapshotOmitKeys.add(key);
|
|
4363
|
+
};
|
|
4364
|
+
const setIfChanged = (target, key, value) => {
|
|
4365
|
+
if (hasOwn(target, key) && Object.is(target[key], value)) return false;
|
|
4366
|
+
target[key] = value;
|
|
4367
|
+
return true;
|
|
4368
|
+
};
|
|
4329
4369
|
const syncSetupStatePropsAliases = (instance, propsProxy) => {
|
|
4330
4370
|
var _syncedAliases$get;
|
|
4331
4371
|
if (!aliasEntries.length) return;
|
|
@@ -4333,17 +4373,18 @@ function createPropsSync(options) {
|
|
|
4333
4373
|
const setupState = runtime === null || runtime === void 0 ? void 0 : runtime.setupState;
|
|
4334
4374
|
const state = runtime === null || runtime === void 0 ? void 0 : runtime.state;
|
|
4335
4375
|
if (!setupState || typeof setupState !== "object") return;
|
|
4376
|
+
updateSnapshotOmitKeys(instance);
|
|
4336
4377
|
const aliases = (_syncedAliases$get = syncedAliases.get(instance)) !== null && _syncedAliases$get !== void 0 ? _syncedAliases$get : /* @__PURE__ */ new Set();
|
|
4337
4378
|
syncedAliases.set(instance, aliases);
|
|
4338
4379
|
for (const [alias, propName] of aliasEntries) {
|
|
4339
4380
|
if (hasOwn(setupState, alias) && !aliases.has(alias)) continue;
|
|
4340
4381
|
const value = propsProxy[propName];
|
|
4341
4382
|
try {
|
|
4342
|
-
setupState
|
|
4383
|
+
setIfChanged(setupState, alias, value);
|
|
4343
4384
|
aliases.add(alias);
|
|
4344
4385
|
} catch (_unused) {}
|
|
4345
4386
|
if (state && typeof state === "object" && (!hasOwn(state, alias) || aliases.has(alias))) try {
|
|
4346
|
-
state
|
|
4387
|
+
setIfChanged(state, alias, value);
|
|
4347
4388
|
} catch (_unused2) {}
|
|
4348
4389
|
}
|
|
4349
4390
|
};
|
|
@@ -4352,13 +4393,14 @@ function createPropsSync(options) {
|
|
|
4352
4393
|
const runtime = instance.__wevu;
|
|
4353
4394
|
const setupState = runtime === null || runtime === void 0 ? void 0 : runtime.setupState;
|
|
4354
4395
|
if (!setupState || typeof setupState !== "object") return;
|
|
4396
|
+
updateSnapshotOmitKeys(instance);
|
|
4355
4397
|
const aliasToPropName = new Map(aliasEntries);
|
|
4356
4398
|
for (const key of propsDerivedKeySet) {
|
|
4357
4399
|
var _aliasToPropName$get;
|
|
4358
4400
|
const propName = (_aliasToPropName$get = aliasToPropName.get(key)) !== null && _aliasToPropName$get !== void 0 ? _aliasToPropName$get : key;
|
|
4359
4401
|
if (!hasOwn(propsProxy, propName)) continue;
|
|
4360
4402
|
try {
|
|
4361
|
-
setupState
|
|
4403
|
+
setIfChanged(setupState, key, propsProxy[propName]);
|
|
4362
4404
|
} catch (_unused3) {}
|
|
4363
4405
|
}
|
|
4364
4406
|
};
|
|
@@ -4480,6 +4522,7 @@ function createPropsSync(options) {
|
|
|
4480
4522
|
};
|
|
4481
4523
|
return {
|
|
4482
4524
|
attachWevuPropKeys,
|
|
4525
|
+
directPropsDerivedKeys,
|
|
4483
4526
|
syncWevuPropsFromInstance,
|
|
4484
4527
|
syncWevuPropsFromValues,
|
|
4485
4528
|
finalObservers
|
|
@@ -4694,7 +4737,7 @@ function useLayoutHosts(hosts) {
|
|
|
4694
4737
|
//#endregion
|
|
4695
4738
|
//#region src/runtime/register/component/registerDefinition.ts
|
|
4696
4739
|
function registerComponentDefinition(options) {
|
|
4697
|
-
const { runtimeApp, watch, setup, restOptions, pageLifecycleHooks, finalObservers, userLifetimes, userPageLifetimes, finalMethods, finalOptions, applyExtraInstanceFields, templateRefs, layoutHosts, attachWevuPropKeys, setupLifecycle, syncWevuPropsFromInstance, isPage, legacyCreated, getRuntimeOwnerLabel } = options;
|
|
4740
|
+
const { runtimeApp, watch, setup, restOptions, pageLifecycleHooks, finalObservers, userLifetimes, userPageLifetimes, finalMethods, finalOptions, applyExtraInstanceFields, templateRefs, layoutHosts, attachWevuPropKeys, setupLifecycle, syncWevuPropsFromInstance, directPropsDerivedKeys, isPage, legacyCreated, getRuntimeOwnerLabel } = options;
|
|
4698
4741
|
const pageMethodBridges = {};
|
|
4699
4742
|
const attachRuntimeLayoutHosts = (instance) => {
|
|
4700
4743
|
if (!Array.isArray(layoutHosts) || !layoutHosts.length) return;
|
|
@@ -4744,7 +4787,10 @@ function registerComponentDefinition(options) {
|
|
|
4744
4787
|
attachWevuPropKeys(this);
|
|
4745
4788
|
if (setupLifecycle === "created") {
|
|
4746
4789
|
try {
|
|
4747
|
-
mountRuntimeInstance(this, runtimeApp, watch, setup, {
|
|
4790
|
+
mountRuntimeInstance(this, runtimeApp, watch, setup, {
|
|
4791
|
+
deferSetData: true,
|
|
4792
|
+
snapshotOmitKeys: directPropsDerivedKeys
|
|
4793
|
+
});
|
|
4748
4794
|
} catch (error) {
|
|
4749
4795
|
const label = getRuntimeOwnerLabel(this);
|
|
4750
4796
|
throw new Error(`[wevu] mount runtime failed in created (${label}): ${error instanceof Error ? error.message : String(error)}`);
|
|
@@ -4769,7 +4815,7 @@ function registerComponentDefinition(options) {
|
|
|
4769
4815
|
});
|
|
4770
4816
|
attachWevuPropKeys(this);
|
|
4771
4817
|
if (setupLifecycle !== "created" || !this.__wevu) try {
|
|
4772
|
-
mountRuntimeInstance(this, runtimeApp, watch, setup);
|
|
4818
|
+
mountRuntimeInstance(this, runtimeApp, watch, setup, { snapshotOmitKeys: directPropsDerivedKeys });
|
|
4773
4819
|
} catch (error) {
|
|
4774
4820
|
const label = getRuntimeOwnerLabel(this);
|
|
4775
4821
|
throw new Error(`[wevu] mount runtime failed in attached (${label}): ${error instanceof Error ? error.message : String(error)}`);
|
|
@@ -4914,7 +4960,7 @@ function registerComponent(runtimeApp, methods, watch, setup, mpOptions) {
|
|
|
4914
4960
|
multipleSlots: (_multipleSlots = userOptions.multipleSlots) !== null && _multipleSlots !== void 0 ? _multipleSlots : true,
|
|
4915
4961
|
...userOptions
|
|
4916
4962
|
};
|
|
4917
|
-
const { attachWevuPropKeys, syncWevuPropsFromInstance, syncWevuPropsFromValues, finalObservers } = createPropsSync({
|
|
4963
|
+
const { attachWevuPropKeys, directPropsDerivedKeys, syncWevuPropsFromInstance, syncWevuPropsFromValues, finalObservers } = createPropsSync({
|
|
4918
4964
|
restOptions,
|
|
4919
4965
|
propsAliases,
|
|
4920
4966
|
propsDerivedKeys,
|
|
@@ -4978,6 +5024,7 @@ function registerComponent(runtimeApp, methods, watch, setup, mpOptions) {
|
|
|
4978
5024
|
setupLifecycle,
|
|
4979
5025
|
syncWevuPropsFromInstance,
|
|
4980
5026
|
syncWevuPropsFromValues,
|
|
5027
|
+
directPropsDerivedKeys,
|
|
4981
5028
|
isPage,
|
|
4982
5029
|
legacyCreated,
|
|
4983
5030
|
getRuntimeOwnerLabel
|
|
@@ -6385,4 +6432,4 @@ function useTemplateRef(name) {
|
|
|
6385
6432
|
|
|
6386
6433
|
//#endregion
|
|
6387
6434
|
export { setWevuDefaults as $, defineComponent as A, useLayoutHosts as B, useNavigationBarMetrics as C, isShallowRef as Ct, useDisposables as D, __reExport as Dt, useElementIntersectionObserver as E, __exportAll as Et, resolveLayoutBridge as F, teardownRuntimeInstance as G, registerApp as H, resolveLayoutHost as I, setPageLayout as J, runSetupFunction as K, unregisterPageLayoutBridge as L, registerComponent as M, registerPageLayoutBridge as N, createWevuComponent as O, registerRuntimeLayoutHosts as P, resetWevuDefaults as Q, unregisterRuntimeLayoutHosts as R, getNavigationBarMetrics as S, toRefs as St, useIntersectionObserver as T, triggerRef as Tt, mountRuntimeInstance as U, waitForLayoutHost as V, setRuntimeSetDataVisibility as W, syncRuntimePageLayoutStateFromRuntime as X, syncRuntimePageLayoutState as Y, usePageLayout as Z, useSelectorFields as _, onServerPrefetch as _t, useModel as a, watchPostEffect as at, usePageScrollThrottle as b, traverse as bt, useSlots as c, setDeepWatchStrategy as ct, useUpdatePerformanceListener as d, onBeforeMount as dt, isNoSetData as et, normalizeClass as f, onBeforeUnmount as ft, useScrollOffset as g, onMounted as gt, useBoundingClientRect as h, onErrorCaptured as ht, useChangeModel as i, watchEffect as it, createApp as j, createWevuScopedSlotComponent as k, defineAppSetup as l, callUpdateHooks as lt, resolvePropValue as m, onDeactivated as mt, mergeModels as n, version as nt, useAttrs as o, watchSyncEffect as ot, normalizeStyle as p, onBeforeUpdate as pt, resolveRuntimePageLayoutName as q, useBindModel as r, watch as rt, useNativeInstance as s, getDeepWatchStrategy as st, useTemplateRef as t, markNoSetData as tt, use as u, onActivated as ut, useSelectorQuery as v, onUnmounted as vt, usePageStack as w, shallowRef as wt, getCurrentPageStackSnapshot as x, toRef as xt, useAsyncPullDownRefresh as y, onUpdated as yt, useLayoutBridge as z };
|
|
6388
|
-
//# sourceMappingURL=src-
|
|
6435
|
+
//# sourceMappingURL=src-Dcw71lOi.mjs.map
|