wevu 7.5.0 → 7.7.0
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/alipay/jsx-runtime.d.mts +0 -2
- package/dist/config/defaults.d.mts +42 -0
- package/dist/config/pageFeatures.d.mts +49 -0
- package/dist/config.d.mts +4 -0
- package/dist/config.mjs +1 -0
- package/dist/dev/_virtual/{_@oxc-project_runtime@0.153.0 → _@oxc-project_runtime@0.155.0}/helpers/esm/defineProperty.mjs +1 -2
- package/dist/dev/_virtual/{_@oxc-project_runtime@0.153.0 → _@oxc-project_runtime@0.155.0}/helpers/esm/toPrimitive.mjs +1 -2
- package/dist/dev/_virtual/{_@oxc-project_runtime@0.153.0 → _@oxc-project_runtime@0.155.0}/helpers/esm/toPropertyKey.mjs +1 -2
- package/dist/dev/_virtual/{_@oxc-project_runtime@0.153.0 → _@oxc-project_runtime@0.155.0}/helpers/esm/typeof.mjs +1 -2
- package/dist/dev/api/vitest/setup.mjs +1 -2
- package/dist/dev/package.mjs +2 -3
- package/dist/dev/reactivity/asyncDerivation.mjs +1 -2
- package/dist/dev/reactivity/computed.mjs +1 -2
- package/dist/dev/reactivity/computed.mjs.map +1 -1
- package/dist/dev/reactivity/core.mjs +2 -3
- package/dist/dev/reactivity/reactive/mutation.mjs +1 -2
- package/dist/dev/reactivity/reactive/patch.mjs +1 -2
- package/dist/dev/reactivity/reactive/patchState.mjs +1 -2
- package/dist/dev/reactivity/reactive/shallow.mjs +1 -2
- package/dist/dev/reactivity/reactive/shared.mjs +1 -2
- package/dist/dev/reactivity/reactive/state.mjs +1 -2
- package/dist/dev/reactivity/reactive.mjs +1 -2
- package/dist/dev/reactivity/readonly.mjs +1 -2
- package/dist/dev/reactivity/ref.mjs +2 -3
- package/dist/dev/reactivity/ref.mjs.map +1 -1
- package/dist/dev/reactivity/shallowRef.mjs +1 -2
- package/dist/dev/reactivity/toRefs.mjs +1 -2
- package/dist/dev/reactivity/traverse.mjs +1 -2
- package/dist/dev/reactivity/watch/helpers.mjs +1 -2
- package/dist/dev/reactivity/watch/types.mjs +1 -2
- package/dist/dev/reactivity/watch.mjs +1 -2
- package/dist/dev/router/auto-routes.mjs +1 -2
- package/dist/dev/router/backNavigation.mjs +1 -2
- package/dist/dev/router/createRouter.mjs +1 -2
- package/dist/dev/router/initialNavigation.mjs +1 -2
- package/dist/dev/router/instance.mjs +1 -2
- package/dist/dev/router/navigationApi.mjs +1 -2
- package/dist/dev/router/navigationCore.mjs +1 -2
- package/dist/dev/router/navigationResult.mjs +1 -2
- package/dist/dev/router/navigationTarget.mjs +1 -2
- package/dist/dev/router/navigationTargetHelpers.mjs +1 -2
- package/dist/dev/router/resolve.mjs +1 -2
- package/dist/dev/router/routeRegistry.mjs +1 -2
- package/dist/dev/router/routeSync.mjs +1 -2
- package/dist/dev/router/scrollRestoration/adapters.mjs +1 -2
- package/dist/dev/router/scrollRestoration/controller.mjs +1 -2
- package/dist/dev/router/scrollRestoration/host.mjs +1 -2
- package/dist/dev/router/scrollRestoration/index.mjs +1 -2
- package/dist/dev/router/types.mjs +1 -2
- package/dist/dev/router/useRoute.mjs +1 -2
- package/dist/dev/router/useRouter.mjs +1 -2
- package/dist/dev/routerInternal/location.mjs +1 -2
- package/dist/dev/routerInternal/matching.mjs +1 -2
- package/dist/dev/routerInternal/params.mjs +1 -2
- package/dist/dev/routerInternal/path.mjs +1 -2
- package/dist/dev/routerInternal/query.mjs +1 -2
- package/dist/dev/routerInternal/records.mjs +1 -2
- package/dist/dev/routerInternal/recordsWarnings.mjs +1 -2
- package/dist/dev/routerInternal/snapshots.mjs +1 -2
- package/dist/dev/runtime/app/computed.mjs +1 -2
- package/dist/dev/runtime/app/context.mjs +1 -2
- package/dist/dev/runtime/app/diagnostics.mjs +1 -2
- package/dist/dev/runtime/app/mount.mjs +1 -2
- package/dist/dev/runtime/app/pending.mjs +1 -2
- package/dist/dev/runtime/app/setData/commitTracker.mjs +1 -2
- package/dist/dev/runtime/app/setData/observation.mjs +1 -2
- package/dist/dev/runtime/app/setData/patchScheduler.mjs +1 -2
- package/dist/dev/runtime/app/setData/payload.mjs +1 -2
- package/dist/dev/runtime/app/setData/scheduler.mjs +1 -2
- package/dist/dev/runtime/app/setData/snapshot.mjs +1 -2
- package/dist/dev/runtime/app/setDataOptions.mjs +1 -2
- package/dist/dev/runtime/app.mjs +1 -2
- package/dist/dev/runtime/bindModel.mjs +1 -2
- package/dist/dev/runtime/bindingManifest.mjs +1 -2
- package/dist/dev/runtime/capabilities.mjs +1 -2
- package/dist/dev/runtime/css.mjs +1 -2
- package/dist/dev/runtime/defaults.mjs +1 -2
- package/dist/dev/runtime/define/componentDefinition.mjs +1 -2
- package/dist/dev/runtime/define/initialComputed.mjs +1 -2
- package/dist/dev/runtime/define/options.mjs +1 -2
- package/dist/dev/runtime/define/optionsApi.mjs +1 -2
- package/dist/dev/runtime/define/props.mjs +1 -2
- package/dist/dev/runtime/define/scopedSlotOptions.mjs +1 -2
- package/dist/dev/runtime/define/setupResult.mjs +4 -7
- package/dist/dev/runtime/define/setupResult.mjs.map +1 -1
- package/dist/dev/runtime/define.mjs +3 -9
- package/dist/dev/runtime/define.mjs.map +1 -1
- package/dist/dev/runtime/diff.mjs +1 -2
- package/dist/dev/runtime/disposables.mjs +1 -2
- package/dist/dev/runtime/elementIntersectionObserver.mjs +1 -2
- package/dist/dev/runtime/emit.mjs +1 -2
- package/dist/dev/runtime/features/inlineEvents.mjs +1 -2
- package/dist/dev/runtime/features/jsxIslands.mjs +1 -2
- package/dist/dev/runtime/features/layout.mjs +1 -2
- package/dist/dev/runtime/features/patchStrategy.mjs +1 -2
- package/dist/dev/runtime/features/publicLayout.mjs +1 -2
- package/dist/dev/runtime/features/scopedSlots.mjs +1 -2
- package/dist/dev/runtime/features/setDataHighFrequencyWarning.mjs +1 -2
- package/dist/dev/runtime/features/templateRefs.mjs +1 -2
- package/dist/dev/runtime/hooks/base.mjs +1 -2
- package/dist/dev/runtime/hooks/pageScroll.mjs +1 -2
- package/dist/dev/runtime/hooks/register.mjs +1 -2
- package/dist/dev/runtime/hooks/vue.mjs +1 -2
- package/dist/dev/runtime/inlineDataset.mjs +1 -2
- package/dist/dev/runtime/internal.mjs +1 -2
- package/dist/dev/runtime/intersectionObserver.mjs +1 -2
- package/dist/dev/runtime/jsxIsland.mjs +1 -2
- package/dist/dev/runtime/layoutBridge.mjs +1 -2
- package/dist/dev/runtime/layoutComponentMatcher.mjs +1 -2
- package/dist/dev/runtime/nativeBridge.mjs +1 -2
- package/dist/dev/runtime/navigationLifecycle.mjs +1 -2
- package/dist/dev/runtime/noSetData.mjs +1 -2
- package/dist/dev/runtime/pageEnvironment.mjs +1 -2
- package/dist/dev/runtime/pageLayout.mjs +1 -2
- package/dist/dev/runtime/pageLayout.mjs.map +1 -1
- package/dist/dev/runtime/pageScroll.mjs +1 -2
- package/dist/dev/runtime/platform/current.mjs +1 -2
- package/dist/dev/runtime/platform/generic.mjs +1 -2
- package/dist/dev/runtime/platform/globals.mjs +1 -2
- package/dist/dev/runtime/platform.mjs +1 -2
- package/dist/dev/runtime/provide.mjs +1 -2
- package/dist/dev/runtime/provideContext.mjs +1 -2
- package/dist/dev/runtime/provideStore.mjs +1 -2
- package/dist/dev/runtime/publicRuntime.mjs +1 -2
- package/dist/dev/runtime/pullDownRefresh.mjs +1 -2
- package/dist/dev/runtime/register/app.mjs +1 -2
- package/dist/dev/runtime/register/component/alipay.mjs +1 -2
- package/dist/dev/runtime/register/component/alipayRegistration.mjs +1 -2
- package/dist/dev/runtime/register/component/features.mjs +1 -2
- package/dist/dev/runtime/register/component/hmrRegistration.mjs +14 -0
- package/dist/dev/runtime/register/component/hmrRegistration.mjs.map +1 -0
- package/dist/dev/runtime/register/component/lifecycle/optionalHooks.mjs +1 -2
- package/dist/dev/runtime/register/component/lifecycle/platform.mjs +1 -2
- package/dist/dev/runtime/register/component/lifecycle.mjs +1 -2
- package/dist/dev/runtime/register/component/methods.mjs +1 -2
- package/dist/dev/runtime/register/component/options.mjs +1 -2
- package/dist/dev/runtime/register/component/props.mjs +5 -6
- package/dist/dev/runtime/register/component/props.mjs.map +1 -1
- package/dist/dev/runtime/register/component/registerDefinition.mjs +7 -6
- package/dist/dev/runtime/register/component/registerDefinition.mjs.map +1 -1
- package/dist/dev/runtime/register/component/registerNativeDefinition.mjs +1 -2
- package/dist/dev/runtime/register/component.mjs +23 -14
- package/dist/dev/runtime/register/component.mjs.map +1 -1
- package/dist/dev/runtime/register/inline.mjs +1 -2
- package/dist/dev/runtime/register/runtimeInstance/methodBridge.mjs +1 -2
- package/dist/dev/runtime/register/runtimeInstance/nativeDeclaration.mjs +1 -2
- package/dist/dev/runtime/register/runtimeInstance/provideContext.mjs +1 -2
- package/dist/dev/runtime/register/runtimeInstance/setupContext.mjs +1 -2
- package/dist/dev/runtime/register/runtimeInstance/setupPhase.mjs +3 -27
- package/dist/dev/runtime/register/runtimeInstance/setupPhase.mjs.map +1 -1
- package/dist/dev/runtime/register/runtimeInstance/setupSnapshot.mjs +1 -2
- package/dist/dev/runtime/register/runtimeInstance/utils.mjs +1 -2
- package/dist/dev/runtime/register/runtimeInstance.mjs +12 -14
- package/dist/dev/runtime/register/runtimeInstance.mjs.map +1 -1
- package/dist/dev/runtime/register/setDataFrequencyWarning.mjs +1 -2
- package/dist/dev/runtime/register/setup.mjs +1 -2
- package/dist/dev/runtime/register/snapshot.mjs +1 -2
- package/dist/dev/runtime/register/watch.mjs +2 -5
- package/dist/dev/runtime/register/watch.mjs.map +1 -1
- package/dist/dev/runtime/scopedSlots.mjs +1 -2
- package/dist/dev/runtime/selectorQuery.mjs +1 -2
- package/dist/dev/runtime/setupTracking.mjs +1 -2
- package/dist/dev/runtime/teardown.mjs +1 -2
- package/dist/dev/runtime/template.mjs +1 -2
- package/dist/dev/runtime/templateRefs/helpers.mjs +1 -2
- package/dist/dev/runtime/templateRefs.mjs +1 -2
- package/dist/dev/runtime/uniAppHost.mjs +1 -2
- package/dist/dev/runtime/updatePerformance.mjs +1 -2
- package/dist/dev/runtime/use.mjs +1 -2
- package/dist/dev/runtime/vueCompat/context.mjs +1 -2
- package/dist/dev/runtime/vueCompat/model.mjs +1 -2
- package/dist/dev/runtime/vueCompat/router.mjs +1 -2
- package/dist/dev/runtime/vueCompat/templateRef.mjs +1 -2
- package/dist/dev/scheduler.mjs +1 -2
- package/dist/dev/store/actions.mjs +1 -2
- package/dist/dev/store/base.mjs +1 -2
- package/dist/dev/store/define/create.mjs +1 -2
- package/dist/dev/store/define.mjs +1 -2
- package/dist/dev/store/manager.mjs +1 -2
- package/dist/dev/store/storeToRefs.mjs +1 -2
- package/dist/dev/store/subscriptions.mjs +1 -2
- package/dist/dev/store/types.mjs +1 -2
- package/dist/dev/store/utils.mjs +1 -2
- package/dist/dev/store/view.mjs +1 -2
- package/dist/dev/utils.mjs +1 -2
- package/dist/dev/version.mjs +1 -2
- package/dist/dev/vue-demi.mjs +1 -2
- package/dist/fetch.d.mts +0 -2
- package/dist/index.d.mts +13 -8
- package/dist/internal-reactivity.d.mts +2 -1
- package/dist/jsx-runtime.d.mts +1 -2
- package/dist/jsxTypes.d.mts +1 -3
- package/dist/macros/shared.d.mts +2 -3
- package/dist/macros.d.mts +3 -12
- package/dist/miniprogram/jsx-runtime.d.mts +0 -2
- package/dist/package.mjs +1 -1
- package/dist/reactivity/asyncDerivation.d.mts +1 -2
- package/dist/reactivity/computed.d.mts +2 -8
- package/dist/reactivity/core.d.mts +1 -3
- package/dist/reactivity/core.mjs +1 -1
- package/dist/reactivity/index.d.mts +2 -1
- package/dist/reactivity/reactive/mutation.d.mts +1 -2
- package/dist/reactivity/reactive/patch.d.mts +1 -3
- package/dist/reactivity/reactive/patchState.mjs +1 -1
- package/dist/reactivity/reactive/shallow.d.mts +1 -3
- package/dist/reactivity/reactive/shared.d.mts +1 -3
- package/dist/reactivity/reactive.d.mts +0 -2
- package/dist/reactivity/readonly.d.mts +1 -3
- package/dist/reactivity/ref.d.mts +2 -4
- package/dist/reactivity/ref.mjs +1 -1
- package/dist/reactivity/shallowRef.d.mts +1 -3
- package/dist/reactivity/toRefs.d.mts +1 -2
- package/dist/reactivity/traverse.d.mts +1 -3
- package/dist/reactivity/watch/types.d.mts +1 -2
- package/dist/reactivity/watch.d.mts +0 -2
- package/dist/router/auto-routes.d.mts +0 -2
- package/dist/router/createRouter.d.mts +1 -3
- package/dist/router/navigationCore.d.mts +1 -3
- package/dist/router/resolve.d.mts +1 -3
- package/dist/router/scrollRestoration/adapters.d.mts +1 -3
- package/dist/router/scrollRestoration/controller.d.mts +1 -3
- package/dist/router/scrollRestoration/index.d.mts +0 -2
- package/dist/router/scrollRestoration/index.mjs +1 -1
- package/dist/router/scrollRestoration/types.d.mts +1 -3
- package/dist/router/types.d.mts +1 -2
- package/dist/router/useRoute.d.mts +1 -3
- package/dist/router/useRouter.d.mts +1 -3
- package/dist/router.d.mts +0 -2
- package/dist/routerInternal/query.d.mts +1 -3
- package/dist/routerInternal/types.d.mts +1 -3
- package/dist/runtime/app/pending.d.mts +1 -3
- package/dist/runtime/app/setData/commitTracker.d.mts +1 -3
- package/dist/runtime/app/setData/observation.d.mts +1 -2
- package/dist/runtime/app/setData/scheduler.d.mts +1 -3
- package/dist/runtime/app/setData/scheduler.mjs +1 -1
- package/dist/runtime/app.d.mts +2 -4
- package/dist/runtime/capabilities.d.mts +2 -4
- package/dist/runtime/css.d.mts +1 -3
- package/dist/runtime/defaults.d.mts +1 -3
- package/dist/runtime/define/props.mjs +1 -1
- package/dist/runtime/define/scopedSlotOptions.mjs +1 -1
- package/dist/runtime/define/setupResult.mjs +1 -1
- package/dist/runtime/define.d.mts +4 -4
- package/dist/runtime/define.mjs +1 -1
- package/dist/runtime/disposables.d.mts +1 -3
- package/dist/runtime/elementIntersectionObserver.d.mts +1 -3
- package/dist/runtime/features/inlineEvents.d.mts +1 -3
- package/dist/runtime/features/jsxIslands.d.mts +1 -3
- package/dist/runtime/features/layout.d.mts +1 -3
- package/dist/runtime/features/patchStrategy.d.mts +1 -3
- package/dist/runtime/features/publicLayout.d.mts +2 -3
- package/dist/runtime/features/scopedSlots.d.mts +2 -4
- package/dist/runtime/features/setDataHighFrequencyWarning.d.mts +1 -3
- package/dist/runtime/features/templateRefs.d.mts +1 -3
- package/dist/runtime/hooks/base.d.mts +1 -3
- package/dist/runtime/hooks/register.d.mts +1 -3
- package/dist/runtime/hooks/vue.d.mts +1 -3
- package/dist/runtime/index.d.mts +7 -4
- package/dist/runtime/intersectionObserver.d.mts +1 -3
- package/dist/runtime/jsxIsland.d.mts +1 -3
- package/dist/runtime/layoutBridge.d.mts +0 -2
- package/dist/runtime/noSetData.d.mts +1 -3
- package/dist/runtime/pageEnvironment.d.mts +1 -3
- package/dist/runtime/pageLayout.d.mts +2 -3
- package/dist/runtime/pageScroll.d.mts +1 -3
- package/dist/runtime/provide.d.mts +0 -2
- package/dist/runtime/provideStore.d.mts +1 -3
- package/dist/runtime/publicRuntime.d.mts +1 -3
- package/dist/runtime/pullDownRefresh.d.mts +1 -3
- package/dist/runtime/register/app.d.mts +2 -4
- package/dist/runtime/register/component/hmrRegistration.mjs +1 -0
- package/dist/runtime/register/component/props.mjs +1 -1
- package/dist/runtime/register/component/registerDefinition.mjs +1 -1
- package/dist/runtime/register/component.d.mts +2 -4
- package/dist/runtime/register/component.mjs +1 -1
- package/dist/runtime/register/inline.d.mts +1 -2
- package/dist/runtime/register/runtimeInstance/setupPhase.mjs +1 -1
- package/dist/runtime/register/runtimeInstance.d.mts +2 -3
- package/dist/runtime/register/runtimeInstance.mjs +1 -1
- package/dist/runtime/register/setDataFrequencyWarning.mjs +1 -1
- package/dist/runtime/register/setup.d.mts +1 -2
- package/dist/runtime/register/watch.d.mts +1 -2
- package/dist/runtime/register/watch.mjs +1 -1
- package/dist/runtime/selectorQuery.d.mts +1 -3
- package/dist/runtime/template.d.mts +1 -3
- package/dist/runtime/templateRefTypes.d.mts +2 -6
- package/dist/runtime/types/core.d.mts +2 -8
- package/dist/runtime/types/miniprogram.d.mts +0 -2
- package/dist/runtime/types/miniprogramHost.d.mts +0 -2
- package/dist/runtime/types/miniprogramHostSources.d.mts +2 -3
- package/dist/runtime/types/options.d.mts +5 -53
- package/dist/runtime/types/props/propTypes.d.mts +1 -2
- package/dist/runtime/types/props/router.d.mts +1 -2
- package/dist/runtime/types/props/setup.d.mts +3 -4
- package/dist/runtime/types/runtime.d.mts +3 -4
- package/dist/runtime/types/setData.d.mts +1 -3
- package/dist/runtime/types.d.mts +5 -5
- package/dist/runtime/uniAppHost.d.mts +1 -2
- package/dist/runtime/updatePerformance.d.mts +1 -3
- package/dist/runtime/use.d.mts +1 -3
- package/dist/runtime/vueCompat/context.d.mts +1 -3
- package/dist/runtime/vueCompat/model.d.mts +2 -3
- package/dist/runtime/vueCompat/router.d.mts +1 -2
- package/dist/runtime/vueCompat/templateRef.d.mts +1 -3
- package/dist/scheduler.d.mts +1 -3
- package/dist/store/define.d.mts +1 -3
- package/dist/store/manager.d.mts +1 -3
- package/dist/store/storeToRefs.d.mts +1 -2
- package/dist/store/types.d.mts +3 -4
- package/dist/tt/jsx-runtime.d.mts +0 -2
- package/dist/types/definitions.d.mts +5 -0
- package/dist/types/pageLayout.d.mts +2 -0
- package/dist/types/pageMeta.d.mts +8 -0
- package/dist/types/reactivity.d.mts +11 -0
- package/dist/types.d.mts +5 -0
- package/dist/types.mjs +1 -0
- package/dist/version.d.mts +1 -3
- package/dist/vue-augment.d.mts +1 -3
- package/dist/vue-demi.d.mts +13 -9
- package/dist/vue-types.d.mts +3 -6
- package/dist/weapp/jsx-runtime.d.mts +0 -2
- package/package.json +22 -13
- /package/dist/_virtual/{_@oxc-project_runtime@0.153.0 → _@oxc-project_runtime@0.155.0}/helpers/esm/defineProperty.mjs +0 -0
- /package/dist/_virtual/{_@oxc-project_runtime@0.153.0 → _@oxc-project_runtime@0.155.0}/helpers/esm/toPrimitive.mjs +0 -0
- /package/dist/_virtual/{_@oxc-project_runtime@0.153.0 → _@oxc-project_runtime@0.155.0}/helpers/esm/toPropertyKey.mjs +0 -0
- /package/dist/_virtual/{_@oxc-project_runtime@0.153.0 → _@oxc-project_runtime@0.155.0}/helpers/esm/typeof.mjs +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { WEVU_JSX_ISLAND_HANDLER_MAP_KEY } from "@weapp-core/constants";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// src/runtime/jsxIsland.ts
|
|
4
4
|
const Fragment = Symbol.for("wevu.jsx.fragment");
|
|
5
5
|
function createVNode(type, props, children) {
|
|
6
6
|
return {
|
|
@@ -159,6 +159,5 @@ function runJsxIslandHandler(target, event) {
|
|
|
159
159
|
return typeof handler === "function" ? handler.call(runtime?.proxy ?? target, event) : void 0;
|
|
160
160
|
}
|
|
161
161
|
|
|
162
|
-
//#endregion
|
|
163
162
|
export { Fragment, createTextVNode, createVNode, isVNode, mergeProps, normalizeJsxIsland, resolveComponent, resolveDirective, runJsxIslandHandler, transformOn, vModelCheckbox, vModelRadio, vModelSelect, vModelText, vShow, withDirectives };
|
|
164
163
|
//# sourceMappingURL=jsxIsland.mjs.map
|
|
@@ -5,7 +5,7 @@ import { onAttached, onDetached } from "./hooks/register.mjs";
|
|
|
5
5
|
import { getTemplateRefMap } from "./templateRefs/helpers.mjs";
|
|
6
6
|
import { WEVU_LAYOUT_BRIDGE_PAGE_KEYS, WEVU_NATIVE_INSTANCE_KEY, WEVU_PUBLIC_RUNTIME_KEY } from "@weapp-core/constants";
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
// src/runtime/layoutBridge.ts
|
|
9
9
|
/**
|
|
10
10
|
* @description 对 layout host key 去重并过滤空字符串。
|
|
11
11
|
*/
|
|
@@ -268,6 +268,5 @@ function useLayoutHosts(hosts) {
|
|
|
268
268
|
} });
|
|
269
269
|
}
|
|
270
270
|
|
|
271
|
-
//#endregion
|
|
272
271
|
export { registerPageLayoutBridge, registerRuntimeLayoutHosts, resolveLayoutBridge, resolveLayoutHost, unregisterPageLayoutBridge, unregisterRuntimeLayoutHosts, useLayoutBridge, useLayoutHosts, waitForLayoutHost };
|
|
273
272
|
//# sourceMappingURL=layoutBridge.mjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/runtime/layoutComponentMatcher.ts
|
|
2
2
|
const DEFAULT_LAYOUT_COMPONENT_PATH_PREFIX = "layouts/";
|
|
3
3
|
let runtimeLayoutComponentMatcher = (componentPath) => componentPath.startsWith(DEFAULT_LAYOUT_COMPONENT_PATH_PREFIX);
|
|
4
4
|
function isRuntimeLayoutComponentTarget(target) {
|
|
@@ -6,6 +6,5 @@ function isRuntimeLayoutComponentTarget(target) {
|
|
|
6
6
|
return typeof componentPath === "string" && runtimeLayoutComponentMatcher(componentPath, target);
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
-
//#endregion
|
|
10
9
|
export { isRuntimeLayoutComponentTarget };
|
|
11
10
|
//# sourceMappingURL=layoutComponentMatcher.mjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/runtime/nativeBridge.ts
|
|
2
2
|
const NATIVE_BRIDGE_MARKER = "__wevu_native_bridge__";
|
|
3
3
|
function markNativeBridgeMethod(method) {
|
|
4
4
|
try {
|
|
@@ -16,6 +16,5 @@ function isNativeBridgeMethod(method) {
|
|
|
16
16
|
return typeof method === "function" && Boolean(method[NATIVE_BRIDGE_MARKER]);
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
//#endregion
|
|
20
19
|
export { isNativeBridgeMethod, markNativeBridgeMethod };
|
|
21
20
|
//# sourceMappingURL=nativeBridge.mjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/runtime/navigationLifecycle.ts
|
|
2
2
|
let initialNavigationLifecycle;
|
|
3
3
|
/**
|
|
4
4
|
* 路由器注册首航任务时接入生命周期,基础组件不直接依赖导航状态机。
|
|
@@ -19,6 +19,5 @@ function cancelInitialNavigation(instance) {
|
|
|
19
19
|
initialNavigationLifecycle?.cancel(instance);
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
//#endregion
|
|
23
22
|
export { cancelInitialNavigation, ensureInitialNavigation, registerInitialNavigationLifecycle };
|
|
24
23
|
//# sourceMappingURL=navigationLifecycle.mjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/runtime/noSetData.ts
|
|
2
2
|
const NO_SETDATA = Symbol("wevu.noSetData");
|
|
3
3
|
function markNoSetData(value) {
|
|
4
4
|
Object.defineProperty(value, NO_SETDATA, {
|
|
@@ -13,6 +13,5 @@ function isNoSetData(value) {
|
|
|
13
13
|
return typeof value === "object" && value !== null && value[NO_SETDATA] === true;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
//#endregion
|
|
17
16
|
export { isNoSetData, markNoSetData };
|
|
18
17
|
//# sourceMappingURL=noSetData.mjs.map
|
|
@@ -5,7 +5,7 @@ import { getCurrentMiniProgramPages } from "./platform.mjs";
|
|
|
5
5
|
import { getCurrentSetupContext } from "./hooks/base.mjs";
|
|
6
6
|
import { onAttached, onShow } from "./hooks/register.mjs";
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
// src/runtime/pageEnvironment.ts
|
|
9
9
|
function normalizeRoute(route) {
|
|
10
10
|
return route ? route.split("?")[0]?.replace(/^\/+/, "") ?? "" : "";
|
|
11
11
|
}
|
|
@@ -92,6 +92,5 @@ function useNavigationBarMetrics(options = {}) {
|
|
|
92
92
|
};
|
|
93
93
|
}
|
|
94
94
|
|
|
95
|
-
//#endregion
|
|
96
95
|
export { getCurrentPageStackSnapshot, getNavigationBarMetrics, useNavigationBarMetrics, usePageStack };
|
|
97
96
|
//# sourceMappingURL=pageEnvironment.mjs.map
|
|
@@ -5,7 +5,7 @@ import { getCurrentInstance, getCurrentSetupContext } from "./hooks/base.mjs";
|
|
|
5
5
|
import { getCurrentPageInstance } from "./register/component/lifecycle/platform.mjs";
|
|
6
6
|
import { WEVU_PAGE_LAYOUT_NAME_KEY, WEVU_PAGE_LAYOUT_NONE, WEVU_PAGE_LAYOUT_PROPS_KEY, WEVU_PAGE_LAYOUT_SETTER_KEY } from "@weapp-core/constants";
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
// src/runtime/pageLayout.ts
|
|
9
9
|
function resolveCurrentPageInstance() {
|
|
10
10
|
const runtimeCurrentPage = getCurrentPageInstance();
|
|
11
11
|
if (runtimeCurrentPage) return runtimeCurrentPage;
|
|
@@ -62,6 +62,5 @@ function resolveRuntimePageLayoutName(layout) {
|
|
|
62
62
|
return layout === false ? WEVU_PAGE_LAYOUT_NONE : layout;
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
-
//#endregion
|
|
66
65
|
export { resolveRuntimePageLayoutName, setPageLayout, syncRuntimePageLayoutState, syncRuntimePageLayoutStateFromRuntime, usePageLayout };
|
|
67
66
|
//# sourceMappingURL=pageLayout.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pageLayout.mjs","names":[],"sources":["../../../src/runtime/pageLayout.ts"],"sourcesContent":["import {\n WEVU_PAGE_LAYOUT_NAME_KEY,\n WEVU_PAGE_LAYOUT_NONE,\n WEVU_PAGE_LAYOUT_PROPS_KEY,\n WEVU_PAGE_LAYOUT_SETTER_KEY,\n} from '@weapp-core/constants'\nimport { reactive, readonly } from '../reactivity'\nimport { getCurrentInstance, getCurrentSetupContext } from './hooks'\nimport { getCurrentMiniProgramPages } from './platform'\nimport { getCurrentPageInstance } from './register/component/lifecycle/platform'\n\ntype PageLayoutProps = object\n\ntype PageLayoutSetter = (layout: string | false, props?: PageLayoutProps) => void\n\nexport
|
|
1
|
+
{"version":3,"file":"pageLayout.mjs","names":[],"sources":["../../../src/runtime/pageLayout.ts"],"sourcesContent":["import type { WevuPageLayoutMap } from '../types/pageLayout'\nimport {\n WEVU_PAGE_LAYOUT_NAME_KEY,\n WEVU_PAGE_LAYOUT_NONE,\n WEVU_PAGE_LAYOUT_PROPS_KEY,\n WEVU_PAGE_LAYOUT_SETTER_KEY,\n} from '@weapp-core/constants'\nimport { reactive, readonly } from '../reactivity'\nimport { getCurrentInstance, getCurrentSetupContext } from './hooks'\nimport { getCurrentMiniProgramPages } from './platform'\nimport { getCurrentPageInstance } from './register/component/lifecycle/platform'\n\ntype PageLayoutProps = object\n\ntype PageLayoutSetter = (layout: string | false, props?: PageLayoutProps) => void\n\nexport type { WevuPageLayoutMap } from '../types/pageLayout'\n\ntype ResolveTypedPageLayoutName = keyof WevuPageLayoutMap extends never\n ? string\n : Extract<keyof WevuPageLayoutMap, string>\n\ntype ResolveTypedPageLayoutProps<Name extends string> = Name extends keyof WevuPageLayoutMap\n ? WevuPageLayoutMap[Name]\n : PageLayoutProps\n\ntype PageLayoutNamedState = {\n [Name in ResolveTypedPageLayoutName]: {\n name: Name\n props: ResolveTypedPageLayoutProps<Name>\n }\n}[ResolveTypedPageLayoutName]\n\nexport type PageLayoutState\n = | PageLayoutNamedState\n | {\n name: false\n props: Record<string, any>\n }\n | {\n name: undefined\n props: Record<string, any>\n }\n\ninterface MutablePageLayoutState {\n name: string | false | undefined\n props: Record<string, any>\n}\n\nfunction resolveCurrentPageInstance() {\n const runtimeCurrentPage = getCurrentPageInstance()\n if (runtimeCurrentPage) {\n return runtimeCurrentPage\n }\n const pages = getCurrentMiniProgramPages()\n return pages[pages.length - 1]\n}\n\nfunction normalizeRuntimePageLayoutName(layout: string | undefined) {\n return layout === WEVU_PAGE_LAYOUT_NONE ? false : layout\n}\n\n/**\n * 获取当前页面 layout 状态。\n */\nexport function usePageLayout(): Readonly<PageLayoutState> {\n if (!getCurrentSetupContext()) {\n throw new Error('usePageLayout() 必须在 setup() 的同步阶段调用')\n }\n\n const currentInstance = getCurrentInstance() as Record<string, any> | undefined\n const runtimeState = currentInstance?.__wevu?.state as Record<string, any> | undefined\n const pageLayoutState = reactive<MutablePageLayoutState>({\n name: normalizeRuntimePageLayoutName(runtimeState?.[WEVU_PAGE_LAYOUT_NAME_KEY]) as string | false | undefined,\n props: { ...(runtimeState?.[WEVU_PAGE_LAYOUT_PROPS_KEY] ?? {}) },\n })\n\n if (currentInstance) {\n currentInstance.__wevuPageLayoutState = pageLayoutState\n }\n\n return readonly(pageLayoutState) as Readonly<PageLayoutState>\n}\n\nexport function syncRuntimePageLayoutState(target: Record<string, any>, layout: string | false, props: PageLayoutProps) {\n const state = target.__wevuPageLayoutState as MutablePageLayoutState | undefined\n if (!state) {\n return\n }\n state.name = layout\n state.props = { ...props }\n}\n\nexport function syncRuntimePageLayoutStateFromRuntime(target: Record<string, any>) {\n const state = target.__wevuPageLayoutState as MutablePageLayoutState | undefined\n const runtimeState = target.__wevu?.state as Record<string, any> | undefined\n if (!state || !runtimeState) {\n return\n }\n state.name = normalizeRuntimePageLayoutName(runtimeState[WEVU_PAGE_LAYOUT_NAME_KEY]) as string | false | undefined\n state.props = { ...(runtimeState[WEVU_PAGE_LAYOUT_PROPS_KEY] ?? {}) }\n}\n\nexport function setPageLayout(layout: false): void\nexport function setPageLayout<Name extends ResolveTypedPageLayoutName>(layout: Name, props?: ResolveTypedPageLayoutProps<Name>): void\n\n/**\n * 显式切换当前页面使用的 layout。\n */\nexport function setPageLayout(layout: string | false, props?: PageLayoutProps): void {\n const currentInstance = getCurrentInstance() as Record<string, any> | undefined\n const directSetter = currentInstance?.[WEVU_PAGE_LAYOUT_SETTER_KEY] as PageLayoutSetter | undefined\n if (typeof directSetter === 'function') {\n directSetter(layout, props)\n return\n }\n\n const currentPage = resolveCurrentPageInstance()\n const pageSetter = currentPage?.[WEVU_PAGE_LAYOUT_SETTER_KEY] as PageLayoutSetter | undefined\n if (typeof pageSetter === 'function') {\n pageSetter(layout, props)\n return\n }\n\n throw new Error('setPageLayout() 未找到当前页面实例。请在页面 setup()、事件回调或当前页面上下文中调用。')\n}\n\nexport function resolveRuntimePageLayoutName(layout: string | false) {\n return layout === false ? WEVU_PAGE_LAYOUT_NONE : layout\n}\n"],"mappings":";;;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BAA6B,QAAwB;CACnE,OAAO,WAAW,QAAQ,wBAAwB;AACpD"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { getCurrentInstance } from "./hooks/base.mjs";
|
|
2
2
|
import { onDetached, onPageScroll, onUnload } from "./hooks/register.mjs";
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
// src/runtime/pageScroll.ts
|
|
5
5
|
function resolvePositiveInterval(interval) {
|
|
6
6
|
if (typeof interval !== "number" || !Number.isFinite(interval)) return 80;
|
|
7
7
|
return Math.max(0, interval);
|
|
@@ -104,6 +104,5 @@ function usePageScrollThrottle(handler, options = {}) {
|
|
|
104
104
|
return stop;
|
|
105
105
|
}
|
|
106
106
|
|
|
107
|
-
//#endregion
|
|
108
107
|
export { usePageScrollThrottle };
|
|
109
108
|
//# sourceMappingURL=pageScroll.mjs.map
|
|
@@ -2,11 +2,10 @@ import { getAlipayGlobalObject, getBaiduGlobalObject, getDouyinCompatibleGlobalO
|
|
|
2
2
|
import { getDetectedMiniProgramRuntimeCapabilities, getMiniProgramGlobalObject, resolveDetectedMiniProgramPlatform } from "./generic.mjs";
|
|
3
3
|
import { ALIPAY_RUNTIME_DESCRIPTOR, DEFAULT_RUNTIME_CAPABILITIES, TT_RUNTIME_DESCRIPTOR } from "@weapp-core/shared/platforms/runtime";
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
// src/runtime/platform/current.ts
|
|
6
6
|
const getCurrentMiniProgramGlobalObject = import.meta.env?.PLATFORM === "weapp" || import.meta.env?.PLATFORM === "web" ? getWechatGlobalObject : import.meta.env?.PLATFORM === "alipay" ? getAlipayGlobalObject : import.meta.env?.PLATFORM === "tt" ? getDouyinCompatibleGlobalObject : import.meta.env?.PLATFORM === "swan" ? getBaiduGlobalObject : import.meta.env?.PLATFORM === "jd" ? getJdGlobalObject : import.meta.env?.PLATFORM === "xhs" ? getXhsGlobalObject : getMiniProgramGlobalObject;
|
|
7
7
|
const resolveCurrentMiniProgramPlatform = import.meta.env?.PLATFORM === "weapp" || import.meta.env?.PLATFORM === "web" ? () => "weapp" : import.meta.env?.PLATFORM === "alipay" ? () => "alipay" : import.meta.env?.PLATFORM === "tt" ? () => "tt" : import.meta.env?.PLATFORM === "swan" ? () => "swan" : import.meta.env?.PLATFORM === "jd" ? () => "jd" : import.meta.env?.PLATFORM === "xhs" ? () => "xhs" : resolveDetectedMiniProgramPlatform;
|
|
8
8
|
const getCurrentMiniProgramRuntimeCapabilities = import.meta.env?.PLATFORM === "alipay" ? () => ALIPAY_RUNTIME_DESCRIPTOR.runtime.capabilities : import.meta.env?.PLATFORM === "tt" ? () => TT_RUNTIME_DESCRIPTOR.runtime.capabilities : import.meta.env?.PLATFORM === "weapp" || import.meta.env?.PLATFORM === "swan" || import.meta.env?.PLATFORM === "jd" || import.meta.env?.PLATFORM === "xhs" || import.meta.env?.PLATFORM === "web" ? () => DEFAULT_RUNTIME_CAPABILITIES : getDetectedMiniProgramRuntimeCapabilities;
|
|
9
9
|
|
|
10
|
-
//#endregion
|
|
11
10
|
export { getCurrentMiniProgramGlobalObject, getCurrentMiniProgramRuntimeCapabilities, resolveCurrentMiniProgramPlatform };
|
|
12
11
|
//# sourceMappingURL=current.mjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { getAlipayGlobalObject, getBaiduGlobalObject, getDouyinGlobalObject, getJdGlobalObject, getWechatGlobalObject, getXhsGlobalObject } from "./globals.mjs";
|
|
2
2
|
import { getMiniProgramPlatformByRuntimeGlobalKey, getMiniProgramRuntimeCapabilities, getMiniProgramRuntimeGlobalKey, getMiniProgramRuntimeGlobalKeys, resolveMiniProgramPlatform } from "@weapp-core/shared/platforms/runtime";
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
// src/runtime/platform/generic.ts
|
|
5
5
|
function resolveRuntimeGlobalObject(globalKey) {
|
|
6
6
|
switch (globalKey) {
|
|
7
7
|
case "wx": return getWechatGlobalObject();
|
|
@@ -31,6 +31,5 @@ function getMiniProgramGlobalObject(platformInput) {
|
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
//#endregion
|
|
35
34
|
export { getDetectedMiniProgramRuntimeCapabilities, getMiniProgramGlobalObject, resolveDetectedMiniProgramPlatform };
|
|
36
35
|
//# sourceMappingURL=generic.mjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/runtime/platform/globals.ts
|
|
2
2
|
function getGlobalRuntime() {
|
|
3
3
|
return typeof globalThis === "undefined" ? void 0 : globalThis;
|
|
4
4
|
}
|
|
@@ -24,6 +24,5 @@ function getDouyinCompatibleGlobalObject() {
|
|
|
24
24
|
return getDouyinGlobalObject() ?? getWechatGlobalObject();
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
//#endregion
|
|
28
27
|
export { getAlipayGlobalObject, getBaiduGlobalObject, getDouyinCompatibleGlobalObject, getDouyinGlobalObject, getGlobalRuntime, getJdGlobalObject, getWechatGlobalObject, getXhsGlobalObject };
|
|
29
28
|
//# sourceMappingURL=globals.mjs.map
|
|
@@ -3,7 +3,7 @@ import { getMiniProgramGlobalObject } from "./platform/generic.mjs";
|
|
|
3
3
|
import { getCurrentMiniProgramGlobalObject, getCurrentMiniProgramRuntimeCapabilities, resolveCurrentMiniProgramPlatform } from "./platform/current.mjs";
|
|
4
4
|
import { DEFAULT_RUNTIME_HOST_CONFIG_KEY } from "@weapp-core/shared/platforms/runtime";
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
// src/runtime/platform.ts
|
|
7
7
|
const MINI_PROGRAM_GLOBAL_ROUTER_METHODS = [
|
|
8
8
|
"switchTab",
|
|
9
9
|
"reLaunch",
|
|
@@ -69,6 +69,5 @@ function getScopedSlotHostGlobalObject() {
|
|
|
69
69
|
return getCurrentMiniProgramGlobalObject() ?? getGlobalRuntime();
|
|
70
70
|
}
|
|
71
71
|
|
|
72
|
-
//#endregion
|
|
73
72
|
export { getCurrentMiniProgramGlobalObject, getCurrentMiniProgramGlobalRouter, getCurrentMiniProgramHostConfig, getCurrentMiniProgramPages, getCurrentMiniProgramRuntimeCapabilities, getCurrentMiniProgramTabBarPagePaths, getMiniProgramRuntimeConsoleWarn, getMiniProgramRuntimeGlobalObject, getScopedSlotHostGlobalObject, resolveCurrentMiniProgramPlatform, supportsCurrentMiniProgramRuntimeCapability };
|
|
74
73
|
//# sourceMappingURL=platform.mjs.map
|
|
@@ -3,7 +3,7 @@ import { getCurrentInstance } from "./hooks/base.mjs";
|
|
|
3
3
|
import { getGlobalProvidedValue, hasGlobalProvidedValue, setGlobalProvidedValue } from "./provideStore.mjs";
|
|
4
4
|
import { getInstanceProvides, isRuntimeAppInstance } from "./provideContext.mjs";
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
// src/runtime/provide.ts
|
|
7
7
|
/**
|
|
8
8
|
* 判断当前是否存在可用的注入上下文。
|
|
9
9
|
*
|
|
@@ -66,6 +66,5 @@ function injectGlobal(key, defaultValue) {
|
|
|
66
66
|
throw new Error(`injectGlobal():未找到对应 key 的 provider:${String(key)}`);
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
-
//#endregion
|
|
70
69
|
export { hasInjectionContext, inject, injectGlobal, provide, provideGlobal, setGlobalProvidedValue };
|
|
71
70
|
//# sourceMappingURL=provide.mjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { setGlobalProvidedValue } from "./provideStore.mjs";
|
|
2
2
|
import { WEVU_APP_PROVIDES_KEY, WEVU_IS_APP_INSTANCE_KEY, WEVU_PARENT_INSTANCE_KEY, WEVU_PROVIDES_KEY, WEVU_RUNTIME_APP_KEY } from "@weapp-core/constants";
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
// src/runtime/provideContext.ts
|
|
5
5
|
function isRuntimeAppInstance(instance) {
|
|
6
6
|
return Boolean(instance && typeof instance === "object" && instance[WEVU_IS_APP_INSTANCE_KEY] === true);
|
|
7
7
|
}
|
|
@@ -94,6 +94,5 @@ function attachRuntimeLayoutProvideContext(layoutInstance, pageInstance) {
|
|
|
94
94
|
}
|
|
95
95
|
}
|
|
96
96
|
|
|
97
|
-
//#endregion
|
|
98
97
|
export { attachInstanceProvides, attachRuntimeLayoutProvideContext, attachRuntimeProvideContext, ensureRuntimeAppProvides, getInstanceProvides, isRuntimeAppInstance, setRuntimeAppProvidedValue };
|
|
99
98
|
//# sourceMappingURL=provideContext.mjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/runtime/provideStore.ts
|
|
2
2
|
const wevuGlobalProvideStore = /* @__PURE__ */ new Map();
|
|
3
3
|
/**
|
|
4
4
|
* 写入全局 provide 存储,供运行时内部与兼容层复用。
|
|
@@ -13,6 +13,5 @@ function getGlobalProvidedValue(key) {
|
|
|
13
13
|
return wevuGlobalProvideStore.get(key);
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
//#endregion
|
|
17
16
|
export { getGlobalProvidedValue, hasGlobalProvidedValue, setGlobalProvidedValue };
|
|
18
17
|
//# sourceMappingURL=provideStore.mjs.map
|
|
@@ -13,7 +13,7 @@ import { createWevuScopedSlotComponent as createWevuScopedSlotComponent$1, insta
|
|
|
13
13
|
import { installSetDataHighFrequencyWarning } from "./features/setDataHighFrequencyWarning.mjs";
|
|
14
14
|
import { WEVU_INLINE_MAP_KEY, WEVU_SCOPED_SLOT_OWNER_REQUIRED_KEY, WEVU_SLOT_OWNER_ID_KEY } from "@weapp-core/constants";
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
// src/runtime/publicRuntime.ts
|
|
17
17
|
function installPublicOptionCapabilities() {
|
|
18
18
|
installPatchStrategy();
|
|
19
19
|
installSetDataHighFrequencyWarning();
|
|
@@ -90,6 +90,5 @@ function createWevuScopedSlotComponent(overrides) {
|
|
|
90
90
|
createWevuScopedSlotComponent$1(overrides);
|
|
91
91
|
}
|
|
92
92
|
|
|
93
|
-
//#endregion
|
|
94
93
|
export { createApp, createWevuComponent, createWevuScopedSlotComponent, defineComponent, mountRuntimeInstance, registerApp, registerComponent, setWevuDefaults };
|
|
95
94
|
//# sourceMappingURL=publicRuntime.mjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { onPullDownRefresh } from "./hooks/register.mjs";
|
|
2
2
|
import { wpi } from "@wevu/api";
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
// src/runtime/pullDownRefresh.ts
|
|
5
5
|
/**
|
|
6
6
|
* 注册下拉刷新回调,并在回调结束后自动停止宿主下拉刷新状态。
|
|
7
7
|
*/
|
|
@@ -17,6 +17,5 @@ function useAsyncPullDownRefresh(refresh, options = {}) {
|
|
|
17
17
|
});
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
//#endregion
|
|
21
20
|
export { useAsyncPullDownRefresh };
|
|
22
21
|
//# sourceMappingURL=pullDownRefresh.mjs.map
|
|
@@ -5,7 +5,7 @@ import { requireRuntimeCapability } from "../capabilities.mjs";
|
|
|
5
5
|
import { mountRuntimeInstance } from "./runtimeInstance.mjs";
|
|
6
6
|
import { WEVU_HOOKS_KEY, WEVU_INLINE_HANDLER, WEVU_INLINE_MAP_KEY, WEVU_IS_APP_INSTANCE_KEY } from "@weapp-core/constants";
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
// src/runtime/register/app.ts
|
|
9
9
|
const APP_GLOBAL_LISTENER_STORE_KEY = "__wevuAppGlobalListeners";
|
|
10
10
|
const MEMORY_WARNING_LISTENER_KEY = "__wevuOnMemoryWarningListener";
|
|
11
11
|
function bindMemoryWarningListener(target) {
|
|
@@ -152,6 +152,5 @@ function registerApp(runtimeApp, methods, watch, setup, mpOptions) {
|
|
|
152
152
|
App(appOptions);
|
|
153
153
|
}
|
|
154
154
|
|
|
155
|
-
//#endregion
|
|
156
155
|
export { registerApp };
|
|
157
156
|
//# sourceMappingURL=app.mjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/runtime/register/component/alipay.ts
|
|
2
2
|
/** 支付宝通过函数属性派发自定义事件,补齐模板分派器需要的事件与数据集。 */
|
|
3
3
|
function triggerAlipayEvent(eventName, detail) {
|
|
4
4
|
const callbackName = `on${eventName.replace(/(^|-)([a-z0-9])/g, (_match, _separator, character) => character.toUpperCase())}`;
|
|
@@ -58,6 +58,5 @@ function createAlipayComponentDefinition(definition) {
|
|
|
58
58
|
};
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
-
//#endregion
|
|
62
61
|
export { createAlipayComponentDefinition };
|
|
63
62
|
//# sourceMappingURL=alipay.mjs.map
|
|
@@ -2,7 +2,7 @@ import { getMiniProgramRuntimeGlobalObject } from "../../platform.mjs";
|
|
|
2
2
|
import { createAlipayComponentDefinition } from "./alipay.mjs";
|
|
3
3
|
import { WEAPP_VITE_STATEFUL_HMR_BRIDGE_KEY } from "@weapp-core/constants";
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
// src/runtime/register/component/alipayRegistration.ts
|
|
6
6
|
function createAlipayPageDefinition(componentDefinition) {
|
|
7
7
|
const { lifetimes = {}, methods = {}, observers: _observers, options: _options, pageLifetimes = {}, properties: _properties, ...pageDefinition } = componentDefinition;
|
|
8
8
|
const pageOnLoad = pageDefinition.onLoad;
|
|
@@ -55,6 +55,5 @@ function registerAlipayComponentDefinition(componentDefinition, isPage) {
|
|
|
55
55
|
Component(nativeDefinition);
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
-
//#endregion
|
|
59
58
|
export { registerAlipayComponentDefinition };
|
|
60
59
|
//# sourceMappingURL=alipayRegistration.mjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/runtime/register/component/features.ts
|
|
2
2
|
function resolveComponentFeatures(options) {
|
|
3
3
|
const { features, userOnSaveExitState, userOnPullDownRefresh, userOnReachBottom, userOnPageScroll, userOnRouteDone, userOnTabItemTap, userOnResize, userOnShareAppMessage, userOnShareTimeline, userOnAddToFavorites } = options;
|
|
4
4
|
const enableOnPullDownRefresh = typeof userOnPullDownRefresh === "function" || Boolean(features.enableOnPullDownRefresh);
|
|
@@ -38,6 +38,5 @@ function resolveComponentFeatures(options) {
|
|
|
38
38
|
};
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
//#endregion
|
|
42
41
|
export { resolveComponentFeatures };
|
|
43
42
|
//# sourceMappingURL=features.mjs.map
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { WEAPP_VITE_STATEFUL_HMR_REGISTRATION_CONTRACT_VERSION, WEAPP_VITE_STATEFUL_HMR_UNSUPPORTED_REGISTRATION_CODE } from "@weapp-core/constants";
|
|
2
|
+
|
|
3
|
+
// src/runtime/register/component/hmrRegistration.ts
|
|
4
|
+
/** 只向识别原始注册契约的桥接交付生成包装器,旧桥接必须保留兼容错误。 */
|
|
5
|
+
function createStatefulHmrRegistrationContract(bridge, inputs) {
|
|
6
|
+
if (bridge.registrationContractVersion !== WEAPP_VITE_STATEFUL_HMR_REGISTRATION_CONTRACT_VERSION) throw Object.assign(/* @__PURE__ */ new Error("Stateful HMR bridge does not support the Wevu registration contract; classic rebuild is required."), { code: WEAPP_VITE_STATEFUL_HMR_UNSUPPORTED_REGISTRATION_CODE });
|
|
7
|
+
return {
|
|
8
|
+
version: WEAPP_VITE_STATEFUL_HMR_REGISTRATION_CONTRACT_VERSION,
|
|
9
|
+
...inputs
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export { createStatefulHmrRegistrationContract };
|
|
14
|
+
//# sourceMappingURL=hmrRegistration.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hmrRegistration.mjs","names":[],"sources":["../../../../../src/runtime/register/component/hmrRegistration.ts"],"sourcesContent":["import type { LayoutHostBinding, TemplateRefBinding } from '../../capabilities'\nimport { WEAPP_VITE_STATEFUL_HMR_REGISTRATION_CONTRACT_VERSION, WEAPP_VITE_STATEFUL_HMR_UNSUPPORTED_REGISTRATION_CODE } from '@weapp-core/constants'\n\nexport interface StatefulHmrRegistrationInputs {\n userObservers?: Record<string, unknown>\n userExport?: unknown\n propsAliases?: Record<string, string>\n propsDerivedKeys?: string[]\n templateRefs?: TemplateRefBinding[]\n layoutHosts?: LayoutHostBinding[]\n setupLifecycle: 'created' | 'attached'\n nativeSlotContext: boolean\n}\n\n/** 只向识别原始注册契约的桥接交付生成包装器,旧桥接必须保留兼容错误。 */\nexport function createStatefulHmrRegistrationContract(bridge: { registrationContractVersion?: unknown }, inputs: StatefulHmrRegistrationInputs) {\n if (bridge.registrationContractVersion !== WEAPP_VITE_STATEFUL_HMR_REGISTRATION_CONTRACT_VERSION) {\n throw Object.assign(new Error('Stateful HMR bridge does not support the Wevu registration contract; classic rebuild is required.'), {\n code: WEAPP_VITE_STATEFUL_HMR_UNSUPPORTED_REGISTRATION_CODE,\n })\n }\n return { version: WEAPP_VITE_STATEFUL_HMR_REGISTRATION_CONTRACT_VERSION, ...inputs }\n}\n"],"mappings":";;;;AAeA,SAAgB,sCAAsC,QAAmD,QAAuC;CAC9I,IAAI,OAAO,gCAAgC,uDACzC,MAAM,OAAO,uBAAO,IAAI,MAAM,mGAAmG,GAAG,EAClI,MAAM,sDACR,CAAC;CAEH,OAAO;EAAE,SAAS;EAAuD,GAAG;CAAO;AACrF"}
|
|
@@ -2,7 +2,7 @@ import { callHookList, callHookReturn } from "../../../hooks/base.mjs";
|
|
|
2
2
|
import { callPageScrollHooks } from "../../../hooks/pageScroll.mjs";
|
|
3
3
|
import { WEVU_ROUTE_DONE_CALLED_KEY, WEVU_ROUTE_DONE_IN_TICK_KEY } from "@weapp-core/constants";
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
// src/runtime/register/component/lifecycle/optionalHooks.ts
|
|
6
6
|
function attachOptionalPageLifecycleHooks(pageLifecycleHooks, options) {
|
|
7
7
|
const { enableOnSaveExitState, enableOnPullDownRefresh, enableOnReachBottom, enableOnPageScroll, enableOnRouteDone, enableOnTabItemTap, enableOnResize, enableOnShareAppMessage, enableOnShareTimeline, enableOnAddToFavorites, effectiveOnSaveExitState, effectiveOnPullDownRefresh, effectiveOnReachBottom, effectiveOnPageScroll, effectiveOnRouteDone, effectiveOnTabItemTap, effectiveOnResize, effectiveOnShareAppMessage, effectiveOnShareTimeline, effectiveOnAddToFavorites, hasHook } = options;
|
|
8
8
|
if (enableOnSaveExitState) pageLifecycleHooks.onSaveExitState = function onSaveExitState(...args) {
|
|
@@ -56,6 +56,5 @@ function attachOptionalPageLifecycleHooks(pageLifecycleHooks, options) {
|
|
|
56
56
|
};
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
-
//#endregion
|
|
60
59
|
export { attachOptionalPageLifecycleHooks };
|
|
61
60
|
//# sourceMappingURL=optionalHooks.mjs.map
|
|
@@ -4,7 +4,7 @@ import { callHookList } from "../../../hooks/base.mjs";
|
|
|
4
4
|
import { runInPageScrollHook } from "../../../hooks/pageScroll.mjs";
|
|
5
5
|
import { WEVU_PAGE_SCROLL_EVENT_CONTRACT_KEY } from "@weapp-core/constants";
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
// src/runtime/register/component/lifecycle/platform.ts
|
|
8
8
|
let miniProgramGlobalPatched = false;
|
|
9
9
|
let currentPageInstance;
|
|
10
10
|
function getCurrentPageInstance() {
|
|
@@ -78,6 +78,5 @@ function ensurePageShareMenus(options) {
|
|
|
78
78
|
} catch {}
|
|
79
79
|
}
|
|
80
80
|
|
|
81
|
-
//#endregion
|
|
82
81
|
export { bindCurrentPageInstance, ensureMiniProgramGlobalPatched, ensurePageShareMenus, getCurrentPageInstance, releaseCurrentPageInstance, resolvePageOptions };
|
|
83
82
|
//# sourceMappingURL=platform.mjs.map
|
|
@@ -8,7 +8,7 @@ import { cancelInitialNavigation, ensureInitialNavigation } from "../../navigati
|
|
|
8
8
|
import { attachOptionalPageLifecycleHooks } from "./lifecycle/optionalHooks.mjs";
|
|
9
9
|
import { WEVU_ON_LOAD_CALLED_KEY, WEVU_READY_CALLED_KEY, WEVU_ROUTE_DONE_CALLED_KEY } from "@weapp-core/constants";
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
// src/runtime/register/component/lifecycle.ts
|
|
12
12
|
function createPageLifecycleHooks(options) {
|
|
13
13
|
const { runtimeApp, watch, setup, userOnLoad, userOnUnload, userOnShow, userOnHide, userOnReady, isPage, enableOnSaveExitState, enableOnPullDownRefresh, enableOnReachBottom, enableOnPageScroll, enableOnRouteDone, enableOnRouteDoneFallback, enableOnTabItemTap, enableOnResize, enableOnShareAppMessage, enableOnShareTimeline, enableOnAddToFavorites, syncWevuPropsFromValues, effectiveOnSaveExitState, effectiveOnPullDownRefresh, effectiveOnReachBottom, effectiveOnPageScroll, effectiveOnRouteDone, effectiveOnTabItemTap, effectiveOnResize, effectiveOnShareAppMessage, effectiveOnShareTimeline, effectiveOnAddToFavorites, hasHook } = options;
|
|
14
14
|
const flushPageSnapshotIfPossible = (target) => {
|
|
@@ -144,6 +144,5 @@ function createPageLifecycleHooks(options) {
|
|
|
144
144
|
return pageLifecycleHooks;
|
|
145
145
|
}
|
|
146
146
|
|
|
147
|
-
//#endregion
|
|
148
147
|
export { createPageLifecycleHooks };
|
|
149
148
|
//# sourceMappingURL=lifecycle.mjs.map
|
|
@@ -2,7 +2,7 @@ import { requireRuntimeCapability, runtimeCapabilityRegistry } from "../../capab
|
|
|
2
2
|
import { parseModelEventValue } from "../../internal.mjs";
|
|
3
3
|
import { WEVU_INLINE_HANDLER, WEVU_INLINE_MAP_KEY, WEVU_MODEL_HANDLER, WEVU_NATIVE_INSTANCE_KEY, WEVU_OWNER_HANDLER, WEVU_RESERVED_METHOD_PREFIX, WEVU_RUNTIME_KEY } from "@weapp-core/constants";
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
// src/runtime/register/component/methods.ts
|
|
6
6
|
function createComponentMethods(options) {
|
|
7
7
|
const { userMethods, runtimeMethods } = options;
|
|
8
8
|
const finalMethods = { ...userMethods };
|
|
@@ -73,6 +73,5 @@ function createComponentMethods(options) {
|
|
|
73
73
|
return { finalMethods };
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
-
//#endregion
|
|
77
76
|
export { createComponentMethods };
|
|
78
77
|
//# sourceMappingURL=methods.mjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { hasOwn } from "../../../utils.mjs";
|
|
2
2
|
import { WEVU_COMPONENT_NAME_KEY, WEVU_PROPS_ALIASES_KEY, WEVU_PROPS_DERIVED_KEYS_KEY } from "@weapp-core/constants";
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
// src/runtime/register/component/options.ts
|
|
5
5
|
function cloneInstanceFieldValue(value, cache = /* @__PURE__ */ new WeakMap()) {
|
|
6
6
|
if (!value || typeof value !== "object") return value;
|
|
7
7
|
if (cache.has(value)) return cache.get(value);
|
|
@@ -199,6 +199,5 @@ function prepareComponentOptions(mpOptions) {
|
|
|
199
199
|
};
|
|
200
200
|
}
|
|
201
201
|
|
|
202
|
-
//#endregion
|
|
203
202
|
export { getRuntimeOwnerLabel, prepareComponentOptions };
|
|
204
203
|
//# sourceMappingURL=options.mjs.map
|
|
@@ -4,9 +4,9 @@ import { updateNativeDeclarationAddress } from "../runtimeInstance/nativeDeclara
|
|
|
4
4
|
import { refreshOwnerSnapshotFromInstance } from "../snapshot.mjs";
|
|
5
5
|
import { WEVU_ATTRS_KEY, WEVU_NATIVE_DECLARATION_ADDRESS_PROP, WEVU_PENDING_PROP_VALUES_KEY, WEVU_PROPS_DERIVED_KEYS_KEY, WEVU_PROPS_KEY, WEVU_PROP_KEYS_KEY, WEVU_SLOT_NAMES_PROP, WEVU_SLOT_OWNER_ID_PROP, WEVU_SLOT_SCOPE_KEY } from "@weapp-core/constants";
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
// src/runtime/register/component/props.ts
|
|
8
8
|
function createPropsSync(options) {
|
|
9
|
-
const { restOptions, propsAliases, propsDerivedKeys, userObservers } = options;
|
|
9
|
+
const { restOptions, nativeSlotContext, propsAliases, propsDerivedKeys, userObservers } = options;
|
|
10
10
|
const propKeys = restOptions.properties && typeof restOptions.properties === "object" ? Object.keys(restOptions.properties) : [];
|
|
11
11
|
const propKeySet = new Set(propKeys);
|
|
12
12
|
const propsDerivedKeySet = new Set(propsDerivedKeys ?? []);
|
|
@@ -183,17 +183,17 @@ function createPropsSync(options) {
|
|
|
183
183
|
};
|
|
184
184
|
const injectedObservers = {};
|
|
185
185
|
if (propKeys.length) for (const key of propKeys) injectedObservers[key] = function __wevu_prop_observer(newValue) {
|
|
186
|
-
if ((!import.meta.env?.PLATFORM || import.meta.env?.PLATFORM === "weapp") && key === WEVU_NATIVE_DECLARATION_ADDRESS_PROP) updateNativeDeclarationAddress(this, newValue);
|
|
186
|
+
if ((!import.meta.env?.PLATFORM || import.meta.env?.PLATFORM === "weapp") && nativeSlotContext && key === WEVU_NATIVE_DECLARATION_ADDRESS_PROP) updateNativeDeclarationAddress(this, newValue);
|
|
187
187
|
syncWevuPropValue(this, key, newValue);
|
|
188
188
|
};
|
|
189
189
|
const finalObservers = {
|
|
190
|
-
...(!import.meta.env?.PLATFORM || import.meta.env?.PLATFORM === "weapp") && propKeySet.has(WEVU_NATIVE_DECLARATION_ADDRESS_PROP) ? { [WEVU_NATIVE_DECLARATION_ADDRESS_PROP]: void 0 } : {},
|
|
190
|
+
...(!import.meta.env?.PLATFORM || import.meta.env?.PLATFORM === "weapp") && nativeSlotContext && propKeySet.has(WEVU_NATIVE_DECLARATION_ADDRESS_PROP) ? { [WEVU_NATIVE_DECLARATION_ADDRESS_PROP]: void 0 } : {},
|
|
191
191
|
...userObservers ?? {}
|
|
192
192
|
};
|
|
193
193
|
for (const [key, injected] of Object.entries(injectedObservers)) {
|
|
194
194
|
const existing = finalObservers[key];
|
|
195
195
|
if (typeof existing === "function") finalObservers[key] = function chainedObserver(...args) {
|
|
196
|
-
if (key === WEVU_NATIVE_DECLARATION_ADDRESS_PROP) {
|
|
196
|
+
if (nativeSlotContext && key === WEVU_NATIVE_DECLARATION_ADDRESS_PROP) {
|
|
197
197
|
injected.apply(this, args);
|
|
198
198
|
existing.apply(this, args);
|
|
199
199
|
} else {
|
|
@@ -217,6 +217,5 @@ function createPropsSync(options) {
|
|
|
217
217
|
};
|
|
218
218
|
}
|
|
219
219
|
|
|
220
|
-
//#endregion
|
|
221
220
|
export { createPropsSync };
|
|
222
221
|
//# sourceMappingURL=props.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"props.mjs","names":[],"sources":["../../../../../src/runtime/register/component/props.ts"],"sourcesContent":["import type { InternalRuntimeState } from '../../types'\nimport {\n WEVU_ATTRS_KEY,\n WEVU_NATIVE_DECLARATION_ADDRESS_PROP,\n WEVU_PENDING_PROP_VALUES_KEY,\n WEVU_PROP_KEYS_KEY,\n WEVU_PROPS_DERIVED_KEYS_KEY,\n WEVU_PROPS_KEY,\n WEVU_SLOT_NAMES_PROP,\n WEVU_SLOT_OWNER_ID_PROP,\n WEVU_SLOT_SCOPE_KEY,\n} from '@weapp-core/constants'\nimport { hasOwn } from '../../../utils'\nimport { isDeepEqualValue } from '../../app/setData/snapshot'\nimport { updateNativeDeclarationAddress } from '../runtimeInstance/nativeDeclaration'\nimport { refreshOwnerSnapshotFromInstance } from '../snapshot'\n\ntype ImportMetaWithEnv = ImportMeta & { env?: { PLATFORM?: string } }\n\nexport function createPropsSync(options: {\n restOptions: Record<string, any>\n propsAliases?: Record<string, string>\n propsDerivedKeys?: string[]\n userObservers?: Record<string, any>\n}) {\n const { restOptions, propsAliases, propsDerivedKeys, userObservers } = options\n const propKeys = restOptions.properties && typeof restOptions.properties === 'object'\n ? Object.keys(restOptions.properties as any)\n : []\n const propKeySet = new Set(propKeys)\n const propsDerivedKeySet = new Set(propsDerivedKeys ?? [])\n const aliasEntries = Object.entries(propsAliases ?? {})\n .filter(([alias, propName]) => alias && propName)\n const templateRuntimePropKeys = new Set([\n WEVU_SLOT_NAMES_PROP,\n WEVU_SLOT_OWNER_ID_PROP,\n WEVU_SLOT_SCOPE_KEY,\n ])\n // 原生 properties 已由宿主管理,setup/data 中的同名绑定不能再通过 setData 回写。\n // 编译协议字段仍需镜像到顶层 data,供 WXML 的 slot 分支直接读取。\n const directPropsDerivedKeys = propKeys.filter(key => !templateRuntimePropKeys.has(key))\n const syncedAliases = new WeakMap<InternalRuntimeState, Set<string>>()\n\n const isInternalAttrKey = (key: string) => key.startsWith('__wv_')\n\n const updateSnapshotOmitKeys = (instance: InternalRuntimeState) => {\n const runtime = (instance as any).__wevu\n const snapshotOmitKeys = runtime?.[WEVU_PROPS_DERIVED_KEYS_KEY]\n if (!(snapshotOmitKeys instanceof Set)) {\n return\n }\n for (const key of directPropsDerivedKeys) {\n snapshotOmitKeys.add(key)\n }\n }\n\n const setIfChanged = (target: Record<string, unknown>, key: string, value: unknown) => {\n if (hasOwn(target, key) && Object.is(target[key], value)) {\n return false\n }\n target[key] = value\n return true\n }\n\n const setPropIfChanged = (target: Record<string, unknown>, key: string, value: unknown) => {\n if (\n templateRuntimePropKeys.has(key)\n && hasOwn(target, key)\n && isDeepEqualValue(target[key], value, 20, { keys: 10_000 })\n ) {\n return false\n }\n return setIfChanged(target, key, value)\n }\n\n const syncTemplateRuntimeProp = (instance: InternalRuntimeState, key: string, value: unknown) => {\n if (!templateRuntimePropKeys.has(key)) {\n return\n }\n let nativeDataChanged = false\n const runtimeState = (instance as any).__wevu?.state\n try {\n if (runtimeState && typeof runtimeState === 'object') {\n setPropIfChanged(runtimeState as Record<string, unknown>, key, value)\n }\n const nativeData = (instance as any).data\n if (nativeData && typeof nativeData === 'object') {\n nativeDataChanged = setPropIfChanged(nativeData as Record<string, unknown>, key, value)\n }\n }\n catch {\n // 忽略模板运行时字段同步失败,保持 props 主链路可用。\n }\n if (!nativeDataChanged || typeof (instance as any).setData !== 'function') {\n return\n }\n try {\n ;(instance as any).setData({ [key]: value })\n }\n catch {\n // 忽略模板桥接字段 setData 失败,后续响应式调度仍可兜底。\n }\n }\n\n const syncSetupStatePropsAliases = (instance: InternalRuntimeState, propsProxy: Record<string, unknown>) => {\n if (!aliasEntries.length) {\n return\n }\n const runtime = (instance as any).__wevu\n const setupState = runtime?.setupState\n const state = runtime?.state\n if (!setupState || typeof setupState !== 'object') {\n return\n }\n updateSnapshotOmitKeys(instance)\n const aliases = syncedAliases.get(instance) ?? new Set<string>()\n syncedAliases.set(instance, aliases)\n for (const [alias, propName] of aliasEntries) {\n if (hasOwn(setupState, alias) && !aliases.has(alias)) {\n continue\n }\n const value = propsProxy[propName]\n try {\n setIfChanged(setupState as Record<string, unknown>, alias, value)\n aliases.add(alias)\n }\n catch {\n // 忽略 alias 同步失败,保持 props 主链路可用。\n }\n if (state && typeof state === 'object' && (!hasOwn(state, alias) || aliases.has(alias))) {\n try {\n setIfChanged(state as Record<string, unknown>, alias, value)\n }\n catch {\n // 旧兼容 state 写入失败时不阻断运行时。\n }\n }\n }\n }\n\n const syncPropsDerivedKeys = (instance: InternalRuntimeState, propsProxy: Record<string, unknown>) => {\n if (!propsDerivedKeySet.size) {\n return\n }\n const runtime = (instance as any).__wevu\n const setupState = runtime?.setupState\n if (!setupState || typeof setupState !== 'object') {\n return\n }\n updateSnapshotOmitKeys(instance)\n const aliasToPropName = new Map<string, string>(aliasEntries)\n for (const key of propsDerivedKeySet) {\n const propName = aliasToPropName.get(key) ?? key\n if (!hasOwn(propsProxy, propName)) {\n continue\n }\n try {\n setIfChanged(setupState as Record<string, unknown>, key, propsProxy[propName])\n }\n catch {\n // 忽略 props-derived 同步失败,保持主 props 链路可用。\n }\n }\n }\n\n const attachWevuPropKeys = (instance: InternalRuntimeState) => {\n try {\n Object.defineProperty(instance, WEVU_PROP_KEYS_KEY, {\n value: propKeys,\n configurable: true,\n enumerable: false,\n writable: false,\n })\n }\n catch {\n ;(instance as any)[WEVU_PROP_KEYS_KEY] = propKeys\n }\n }\n\n const syncWevuAttrsFromInstance = (instance: InternalRuntimeState) => {\n const attrsProxy = (instance as any)[WEVU_ATTRS_KEY]\n if (!attrsProxy || typeof attrsProxy !== 'object') {\n return\n }\n const hasRuntimeStateKey = (key: string) => {\n const runtimeState = (instance as any).__wevu?.state\n return runtimeState != null\n && typeof runtimeState === 'object'\n && hasOwn(runtimeState as Record<string, unknown>, key)\n }\n\n const properties = (instance as any).properties\n const next = properties && typeof properties === 'object'\n ? (properties as Record<string, unknown>)\n : undefined\n\n const currentKeys = Object.keys(attrsProxy as any)\n for (const existingKey of currentKeys) {\n if (\n !next\n || !hasOwn(next, existingKey)\n || isInternalAttrKey(existingKey)\n || propKeySet.has(existingKey)\n || hasRuntimeStateKey(existingKey)\n ) {\n try {\n delete (attrsProxy as any)[existingKey]\n }\n catch {\n // 忽略异常\n }\n }\n }\n\n if (!next) {\n refreshOwnerSnapshotFromInstance(instance)\n return\n }\n\n for (const [key, value] of Object.entries(next)) {\n if (isInternalAttrKey(key) || propKeySet.has(key) || hasRuntimeStateKey(key)) {\n continue\n }\n try {\n ;(attrsProxy as any)[key] = value\n }\n catch {\n // 忽略异常\n }\n }\n\n refreshOwnerSnapshotFromInstance(instance)\n }\n\n const syncWevuPropsFromInstance = (instance: InternalRuntimeState) => {\n const propsProxy = (instance as any)[WEVU_PROPS_KEY]\n const properties = (instance as any).properties\n const pendingPropValues = (instance as any)[WEVU_PENDING_PROP_VALUES_KEY] as Record<string, unknown> | undefined\n\n if (propsProxy && typeof propsProxy === 'object' && properties && typeof properties === 'object') {\n const next = properties as any\n const currentKeys = Object.keys(propsProxy as any)\n for (const existingKey of currentKeys) {\n if (!propKeySet.has(existingKey) || !hasOwn(next, existingKey)) {\n try {\n delete (propsProxy as any)[existingKey]\n }\n catch {\n // 忽略异常\n }\n }\n }\n for (const key of propKeys) {\n const hasPendingValue = pendingPropValues && hasOwn(pendingPropValues, key)\n if (!hasPendingValue && !hasOwn(next, key)) {\n continue\n }\n const nextValue = hasPendingValue ? pendingPropValues[key] : next[key]\n try {\n setPropIfChanged(propsProxy as Record<string, unknown>, key, nextValue)\n }\n catch {\n // 忽略异常\n }\n syncTemplateRuntimeProp(instance, key, nextValue)\n }\n syncPropsDerivedKeys(instance, propsProxy as Record<string, unknown>)\n syncSetupStatePropsAliases(instance, propsProxy as Record<string, unknown>)\n refreshOwnerSnapshotFromInstance(instance)\n }\n if (pendingPropValues) {\n delete (instance as any)[WEVU_PENDING_PROP_VALUES_KEY]\n }\n\n syncWevuAttrsFromInstance(instance)\n }\n\n const syncWevuPropsFromValues = (instance: InternalRuntimeState, values: Record<string, unknown> | undefined) => {\n if (!values || typeof values !== 'object') {\n return\n }\n const propsProxy = (instance as any)[WEVU_PROPS_KEY]\n if (!propsProxy || typeof propsProxy !== 'object') {\n return\n }\n let changed = false\n for (const key of propKeys) {\n if (!hasOwn(values, key)) {\n continue\n }\n try {\n changed = setPropIfChanged(propsProxy as Record<string, unknown>, key, values[key]) || changed\n }\n catch {\n // 忽略 query props 同步失败,保持页面生命周期主链路可用。\n }\n syncTemplateRuntimeProp(instance, key, values[key])\n }\n if (!changed) {\n return\n }\n syncPropsDerivedKeys(instance, propsProxy as Record<string, unknown>)\n syncSetupStatePropsAliases(instance, propsProxy as Record<string, unknown>)\n refreshOwnerSnapshotFromInstance(instance)\n syncWevuAttrsFromInstance(instance)\n }\n\n const syncWevuPropValue = (instance: InternalRuntimeState, key: string, value: unknown) => {\n const propsProxy = (instance as any)[WEVU_PROPS_KEY]\n if (!propsProxy || typeof propsProxy !== 'object') {\n return\n }\n try {\n if (!setPropIfChanged(propsProxy as Record<string, unknown>, key, value)) {\n syncTemplateRuntimeProp(instance, key, value)\n return\n }\n }\n catch {\n // 忽略异常\n }\n syncTemplateRuntimeProp(instance, key, value)\n const pendingPropValues = ((instance as any)[WEVU_PENDING_PROP_VALUES_KEY] ??= Object.create(null)) as Record<string, unknown>\n pendingPropValues[key] = value\n syncPropsDerivedKeys(instance, propsProxy as Record<string, unknown>)\n syncSetupStatePropsAliases(instance, propsProxy as Record<string, unknown>)\n refreshOwnerSnapshotFromInstance(instance)\n syncWevuAttrsFromInstance(instance)\n }\n\n const injectedObservers: Record<string, any> = {}\n if (propKeys.length) {\n for (const key of propKeys) {\n injectedObservers[key] = function __wevu_prop_observer(this: InternalRuntimeState, newValue: unknown) {\n if (\n (!(import.meta as ImportMetaWithEnv).env?.PLATFORM || (import.meta as ImportMetaWithEnv).env?.PLATFORM === 'weapp')\n && key === WEVU_NATIVE_DECLARATION_ADDRESS_PROP\n ) {\n updateNativeDeclarationAddress(this, newValue)\n }\n // 注意:在部分小程序运行时中,observer 回调触发时 `this.properties` 可能尚未更新,\n // 因此这里以 observer 的 newValue 为准写入 propsProxy,避免出现 props 仍为旧值/undefined。\n syncWevuPropValue(this, key, newValue)\n }\n }\n }\n\n const finalObservers: Record<string, any> = {\n // 地址 observer 必须先于通配/组合用户 observer,避免同步创建的后代看到旧索引。\n ...((!(import.meta as ImportMetaWithEnv).env?.PLATFORM || (import.meta as ImportMetaWithEnv).env?.PLATFORM === 'weapp')\n && propKeySet.has(WEVU_NATIVE_DECLARATION_ADDRESS_PROP)\n ? { [WEVU_NATIVE_DECLARATION_ADDRESS_PROP]: undefined }\n : {}),\n ...(userObservers ?? {}),\n }\n for (const [key, injected] of Object.entries(injectedObservers)) {\n const existing = finalObservers[key]\n if (typeof existing === 'function') {\n finalObservers[key] = function chainedObserver(this: InternalRuntimeState, ...args: any[]) {\n if (key === WEVU_NATIVE_DECLARATION_ADDRESS_PROP) {\n injected.apply(this, args)\n existing.apply(this, args)\n }\n else {\n existing.apply(this, args)\n injected.apply(this, args)\n }\n }\n }\n else {\n finalObservers[key] = injected\n }\n }\n\n const allObserver = finalObservers['**']\n finalObservers['**'] = function __wevu_observer_all(this: InternalRuntimeState, ...args: any[]) {\n if (typeof allObserver === 'function') {\n allObserver.apply(this, args)\n }\n syncWevuPropsFromInstance(this)\n }\n\n return {\n attachWevuPropKeys,\n directPropsDerivedKeys,\n syncWevuPropsFromInstance,\n syncWevuPropsFromValues,\n finalObservers,\n }\n}\n"],"mappings":";;;;;;;AAmBA,SAAgB,gBAAgB,S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oBAAgD,GAAG,MAAa;EAC9F,IAAI,OAAO,gBAAgB,YACzB,YAAY,MAAM,MAAM,IAAI;EAE9B,0BAA0B,IAAI;CAChC;CAEA,OAAO;EACL;EACA;EACA;EACA;EACA;CACF;AACF"}
|
|
1
|
+
{"version":3,"file":"props.mjs","names":[],"sources":["../../../../../src/runtime/register/component/props.ts"],"sourcesContent":["import type { InternalRuntimeState } from '../../types'\nimport {\n WEVU_ATTRS_KEY,\n WEVU_NATIVE_DECLARATION_ADDRESS_PROP,\n WEVU_PENDING_PROP_VALUES_KEY,\n WEVU_PROP_KEYS_KEY,\n WEVU_PROPS_DERIVED_KEYS_KEY,\n WEVU_PROPS_KEY,\n WEVU_SLOT_NAMES_PROP,\n WEVU_SLOT_OWNER_ID_PROP,\n WEVU_SLOT_SCOPE_KEY,\n} from '@weapp-core/constants'\nimport { hasOwn } from '../../../utils'\nimport { isDeepEqualValue } from '../../app/setData/snapshot'\nimport { updateNativeDeclarationAddress } from '../runtimeInstance/nativeDeclaration'\nimport { refreshOwnerSnapshotFromInstance } from '../snapshot'\n\ntype ImportMetaWithEnv = ImportMeta & { env?: { PLATFORM?: string } }\n\nexport function createPropsSync(options: {\n restOptions: Record<string, any>\n nativeSlotContext: boolean\n propsAliases?: Record<string, string>\n propsDerivedKeys?: string[]\n userObservers?: Record<string, any>\n}) {\n const { restOptions, nativeSlotContext, propsAliases, propsDerivedKeys, userObservers } = options\n const propKeys = restOptions.properties && typeof restOptions.properties === 'object'\n ? Object.keys(restOptions.properties as any)\n : []\n const propKeySet = new Set(propKeys)\n const propsDerivedKeySet = new Set(propsDerivedKeys ?? [])\n const aliasEntries = Object.entries(propsAliases ?? {})\n .filter(([alias, propName]) => alias && propName)\n const templateRuntimePropKeys = new Set([\n WEVU_SLOT_NAMES_PROP,\n WEVU_SLOT_OWNER_ID_PROP,\n WEVU_SLOT_SCOPE_KEY,\n ])\n // 原生 properties 已由宿主管理,setup/data 中的同名绑定不能再通过 setData 回写。\n // 编译协议字段仍需镜像到顶层 data,供 WXML 的 slot 分支直接读取。\n const directPropsDerivedKeys = propKeys.filter(key => !templateRuntimePropKeys.has(key))\n const syncedAliases = new WeakMap<InternalRuntimeState, Set<string>>()\n\n const isInternalAttrKey = (key: string) => key.startsWith('__wv_')\n\n const updateSnapshotOmitKeys = (instance: InternalRuntimeState) => {\n const runtime = (instance as any).__wevu\n const snapshotOmitKeys = runtime?.[WEVU_PROPS_DERIVED_KEYS_KEY]\n if (!(snapshotOmitKeys instanceof Set)) {\n return\n }\n for (const key of directPropsDerivedKeys) {\n snapshotOmitKeys.add(key)\n }\n }\n\n const setIfChanged = (target: Record<string, unknown>, key: string, value: unknown) => {\n if (hasOwn(target, key) && Object.is(target[key], value)) {\n return false\n }\n target[key] = value\n return true\n }\n\n const setPropIfChanged = (target: Record<string, unknown>, key: string, value: unknown) => {\n if (\n templateRuntimePropKeys.has(key)\n && hasOwn(target, key)\n && isDeepEqualValue(target[key], value, 20, { keys: 10_000 })\n ) {\n return false\n }\n return setIfChanged(target, key, value)\n }\n\n const syncTemplateRuntimeProp = (instance: InternalRuntimeState, key: string, value: unknown) => {\n if (!templateRuntimePropKeys.has(key)) {\n return\n }\n let nativeDataChanged = false\n const runtimeState = (instance as any).__wevu?.state\n try {\n if (runtimeState && typeof runtimeState === 'object') {\n setPropIfChanged(runtimeState as Record<string, unknown>, key, value)\n }\n const nativeData = (instance as any).data\n if (nativeData && typeof nativeData === 'object') {\n nativeDataChanged = setPropIfChanged(nativeData as Record<string, unknown>, key, value)\n }\n }\n catch {\n // 忽略模板运行时字段同步失败,保持 props 主链路可用。\n }\n if (!nativeDataChanged || typeof (instance as any).setData !== 'function') {\n return\n }\n try {\n ;(instance as any).setData({ [key]: value })\n }\n catch {\n // 忽略模板桥接字段 setData 失败,后续响应式调度仍可兜底。\n }\n }\n\n const syncSetupStatePropsAliases = (instance: InternalRuntimeState, propsProxy: Record<string, unknown>) => {\n if (!aliasEntries.length) {\n return\n }\n const runtime = (instance as any).__wevu\n const setupState = runtime?.setupState\n const state = runtime?.state\n if (!setupState || typeof setupState !== 'object') {\n return\n }\n updateSnapshotOmitKeys(instance)\n const aliases = syncedAliases.get(instance) ?? new Set<string>()\n syncedAliases.set(instance, aliases)\n for (const [alias, propName] of aliasEntries) {\n if (hasOwn(setupState, alias) && !aliases.has(alias)) {\n continue\n }\n const value = propsProxy[propName]\n try {\n setIfChanged(setupState as Record<string, unknown>, alias, value)\n aliases.add(alias)\n }\n catch {\n // 忽略 alias 同步失败,保持 props 主链路可用。\n }\n if (state && typeof state === 'object' && (!hasOwn(state, alias) || aliases.has(alias))) {\n try {\n setIfChanged(state as Record<string, unknown>, alias, value)\n }\n catch {\n // 旧兼容 state 写入失败时不阻断运行时。\n }\n }\n }\n }\n\n const syncPropsDerivedKeys = (instance: InternalRuntimeState, propsProxy: Record<string, unknown>) => {\n if (!propsDerivedKeySet.size) {\n return\n }\n const runtime = (instance as any).__wevu\n const setupState = runtime?.setupState\n if (!setupState || typeof setupState !== 'object') {\n return\n }\n updateSnapshotOmitKeys(instance)\n const aliasToPropName = new Map<string, string>(aliasEntries)\n for (const key of propsDerivedKeySet) {\n const propName = aliasToPropName.get(key) ?? key\n if (!hasOwn(propsProxy, propName)) {\n continue\n }\n try {\n setIfChanged(setupState as Record<string, unknown>, key, propsProxy[propName])\n }\n catch {\n // 忽略 props-derived 同步失败,保持主 props 链路可用。\n }\n }\n }\n\n const attachWevuPropKeys = (instance: InternalRuntimeState) => {\n try {\n Object.defineProperty(instance, WEVU_PROP_KEYS_KEY, {\n value: propKeys,\n configurable: true,\n enumerable: false,\n writable: false,\n })\n }\n catch {\n ;(instance as any)[WEVU_PROP_KEYS_KEY] = propKeys\n }\n }\n\n const syncWevuAttrsFromInstance = (instance: InternalRuntimeState) => {\n const attrsProxy = (instance as any)[WEVU_ATTRS_KEY]\n if (!attrsProxy || typeof attrsProxy !== 'object') {\n return\n }\n const hasRuntimeStateKey = (key: string) => {\n const runtimeState = (instance as any).__wevu?.state\n return runtimeState != null\n && typeof runtimeState === 'object'\n && hasOwn(runtimeState as Record<string, unknown>, key)\n }\n\n const properties = (instance as any).properties\n const next = properties && typeof properties === 'object'\n ? (properties as Record<string, unknown>)\n : undefined\n\n const currentKeys = Object.keys(attrsProxy as any)\n for (const existingKey of currentKeys) {\n if (\n !next\n || !hasOwn(next, existingKey)\n || isInternalAttrKey(existingKey)\n || propKeySet.has(existingKey)\n || hasRuntimeStateKey(existingKey)\n ) {\n try {\n delete (attrsProxy as any)[existingKey]\n }\n catch {\n // 忽略异常\n }\n }\n }\n\n if (!next) {\n refreshOwnerSnapshotFromInstance(instance)\n return\n }\n\n for (const [key, value] of Object.entries(next)) {\n if (isInternalAttrKey(key) || propKeySet.has(key) || hasRuntimeStateKey(key)) {\n continue\n }\n try {\n ;(attrsProxy as any)[key] = value\n }\n catch {\n // 忽略异常\n }\n }\n\n refreshOwnerSnapshotFromInstance(instance)\n }\n\n const syncWevuPropsFromInstance = (instance: InternalRuntimeState) => {\n const propsProxy = (instance as any)[WEVU_PROPS_KEY]\n const properties = (instance as any).properties\n const pendingPropValues = (instance as any)[WEVU_PENDING_PROP_VALUES_KEY] as Record<string, unknown> | undefined\n\n if (propsProxy && typeof propsProxy === 'object' && properties && typeof properties === 'object') {\n const next = properties as any\n const currentKeys = Object.keys(propsProxy as any)\n for (const existingKey of currentKeys) {\n if (!propKeySet.has(existingKey) || !hasOwn(next, existingKey)) {\n try {\n delete (propsProxy as any)[existingKey]\n }\n catch {\n // 忽略异常\n }\n }\n }\n for (const key of propKeys) {\n const hasPendingValue = pendingPropValues && hasOwn(pendingPropValues, key)\n if (!hasPendingValue && !hasOwn(next, key)) {\n continue\n }\n const nextValue = hasPendingValue ? pendingPropValues[key] : next[key]\n try {\n setPropIfChanged(propsProxy as Record<string, unknown>, key, nextValue)\n }\n catch {\n // 忽略异常\n }\n syncTemplateRuntimeProp(instance, key, nextValue)\n }\n syncPropsDerivedKeys(instance, propsProxy as Record<string, unknown>)\n syncSetupStatePropsAliases(instance, propsProxy as Record<string, unknown>)\n refreshOwnerSnapshotFromInstance(instance)\n }\n if (pendingPropValues) {\n delete (instance as any)[WEVU_PENDING_PROP_VALUES_KEY]\n }\n\n syncWevuAttrsFromInstance(instance)\n }\n\n const syncWevuPropsFromValues = (instance: InternalRuntimeState, values: Record<string, unknown> | undefined) => {\n if (!values || typeof values !== 'object') {\n return\n }\n const propsProxy = (instance as any)[WEVU_PROPS_KEY]\n if (!propsProxy || typeof propsProxy !== 'object') {\n return\n }\n let changed = false\n for (const key of propKeys) {\n if (!hasOwn(values, key)) {\n continue\n }\n try {\n changed = setPropIfChanged(propsProxy as Record<string, unknown>, key, values[key]) || changed\n }\n catch {\n // 忽略 query props 同步失败,保持页面生命周期主链路可用。\n }\n syncTemplateRuntimeProp(instance, key, values[key])\n }\n if (!changed) {\n return\n }\n syncPropsDerivedKeys(instance, propsProxy as Record<string, unknown>)\n syncSetupStatePropsAliases(instance, propsProxy as Record<string, unknown>)\n refreshOwnerSnapshotFromInstance(instance)\n syncWevuAttrsFromInstance(instance)\n }\n\n const syncWevuPropValue = (instance: InternalRuntimeState, key: string, value: unknown) => {\n const propsProxy = (instance as any)[WEVU_PROPS_KEY]\n if (!propsProxy || typeof propsProxy !== 'object') {\n return\n }\n try {\n if (!setPropIfChanged(propsProxy as Record<string, unknown>, key, value)) {\n syncTemplateRuntimeProp(instance, key, value)\n return\n }\n }\n catch {\n // 忽略异常\n }\n syncTemplateRuntimeProp(instance, key, value)\n const pendingPropValues = ((instance as any)[WEVU_PENDING_PROP_VALUES_KEY] ??= Object.create(null)) as Record<string, unknown>\n pendingPropValues[key] = value\n syncPropsDerivedKeys(instance, propsProxy as Record<string, unknown>)\n syncSetupStatePropsAliases(instance, propsProxy as Record<string, unknown>)\n refreshOwnerSnapshotFromInstance(instance)\n syncWevuAttrsFromInstance(instance)\n }\n\n const injectedObservers: Record<string, any> = {}\n if (propKeys.length) {\n for (const key of propKeys) {\n injectedObservers[key] = function __wevu_prop_observer(this: InternalRuntimeState, newValue: unknown) {\n if (\n (!(import.meta as ImportMetaWithEnv).env?.PLATFORM || (import.meta as ImportMetaWithEnv).env?.PLATFORM === 'weapp')\n && nativeSlotContext\n && key === WEVU_NATIVE_DECLARATION_ADDRESS_PROP\n ) {\n updateNativeDeclarationAddress(this, newValue)\n }\n // 注意:在部分小程序运行时中,observer 回调触发时 `this.properties` 可能尚未更新,\n // 因此这里以 observer 的 newValue 为准写入 propsProxy,避免出现 props 仍为旧值/undefined。\n syncWevuPropValue(this, key, newValue)\n }\n }\n }\n\n const finalObservers: Record<string, any> = {\n // 地址 observer 必须先于通配/组合用户 observer,避免同步创建的后代看到旧索引。\n ...((!(import.meta as ImportMetaWithEnv).env?.PLATFORM || (import.meta as ImportMetaWithEnv).env?.PLATFORM === 'weapp')\n && nativeSlotContext\n && propKeySet.has(WEVU_NATIVE_DECLARATION_ADDRESS_PROP)\n ? { [WEVU_NATIVE_DECLARATION_ADDRESS_PROP]: undefined }\n : {}),\n ...(userObservers ?? {}),\n }\n for (const [key, injected] of Object.entries(injectedObservers)) {\n const existing = finalObservers[key]\n if (typeof existing === 'function') {\n finalObservers[key] = function chainedObserver(this: InternalRuntimeState, ...args: any[]) {\n if (nativeSlotContext && key === WEVU_NATIVE_DECLARATION_ADDRESS_PROP) {\n injected.apply(this, args)\n existing.apply(this, args)\n }\n else {\n existing.apply(this, args)\n injected.apply(this, args)\n }\n }\n }\n else {\n finalObservers[key] = injected\n }\n }\n\n const allObserver = finalObservers['**']\n finalObservers['**'] = function __wevu_observer_all(this: InternalRuntimeState, ...args: any[]) {\n if (typeof allObserver === 'function') {\n allObserver.apply(this, args)\n }\n syncWevuPropsFromInstance(this)\n }\n\n return {\n attachWevuPropKeys,\n directPropsDerivedKeys,\n syncWevuPropsFromInstance,\n syncWevuPropsFromValues,\n finalObservers,\n }\n}\n"],"mappings":";;;;;;;AAmBA,SAAgB,gBAAgB,SAM7B;CACD,MAAM,EAAE,aAAa,mB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