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 { NavigationFailureType } from "./types.mjs";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// src/router/navigationCore.ts
|
|
4
4
|
const DUPLICATED_RE = /already|same|duplicat|重复/;
|
|
5
5
|
const CANCELLED_RE = /cancel|取消/;
|
|
6
6
|
const ABORTED_RE = /abort|interrupt|中断/;
|
|
@@ -134,6 +134,5 @@ function shouldEmitNavigationError(failure) {
|
|
|
134
134
|
return false;
|
|
135
135
|
}
|
|
136
136
|
|
|
137
|
-
//#endregion
|
|
138
137
|
export { createNavigationFailure, executeNavigationMethod, isNavigationFailure, isNavigationRedirectCandidate, runAfterEachHooks, runNavigationErrorHooks, runNavigationGuards, shouldEmitNavigationError };
|
|
139
138
|
//# sourceMappingURL=navigationCore.mjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { notifyRouteStateSync } from "./routeSync.mjs";
|
|
2
2
|
import { runAfterEachHooks, runNavigationErrorHooks, shouldEmitNavigationError } from "./navigationCore.mjs";
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
// src/router/navigationResult.ts
|
|
5
5
|
function createNavigationRunResult(mode, from, to, failure) {
|
|
6
6
|
return {
|
|
7
7
|
mode,
|
|
@@ -46,6 +46,5 @@ function createNavigationResultController(options) {
|
|
|
46
46
|
};
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
//#endregion
|
|
50
49
|
export { createNavigationResultController, createNavigationRunResult };
|
|
51
50
|
//# sourceMappingURL=navigationResult.mjs.map
|
|
@@ -6,7 +6,7 @@ import { createNavigationFailure, executeNavigationMethod, isNavigationFailure,
|
|
|
6
6
|
import { createNavigationRunResult } from "./navigationResult.mjs";
|
|
7
7
|
import { applyRedirectedFrom, createDuplicatedFailure, createHashOnlyNavigationFailure, createTabBarQueryFailure, createTooManyRedirectsFailure, resolveRouteRecordRedirect } from "./navigationTargetHelpers.mjs";
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
// src/router/navigationTarget.ts
|
|
10
10
|
async function navigateWithTarget(options) {
|
|
11
11
|
const { mode, target, from, nativeRouter, routeResolveCodec, namedRouteLookup, beforeEachGuards, beforeResolveGuards, maxRedirects, tabBarPathSet, resolveWithCodec, executeNative = true, allowSameLocation = false } = options;
|
|
12
12
|
let currentTarget = target;
|
|
@@ -116,6 +116,5 @@ async function navigateWithTarget(options) {
|
|
|
116
116
|
}
|
|
117
117
|
}
|
|
118
118
|
|
|
119
|
-
//#endregion
|
|
120
119
|
export { navigateWithTarget };
|
|
121
120
|
//# sourceMappingURL=navigationTarget.mjs.map
|
|
@@ -2,7 +2,7 @@ import { cloneRouteLocationRedirectedFrom, createRedirectedFromSnapshot } from "
|
|
|
2
2
|
import { NavigationFailureType } from "./types.mjs";
|
|
3
3
|
import { createNavigationFailure, isNavigationRedirectCandidate } from "./navigationCore.mjs";
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
// src/router/navigationTargetHelpers.ts
|
|
6
6
|
function createDuplicatedFailure(target, from) {
|
|
7
7
|
return createNavigationFailure(NavigationFailureType.duplicated, target, from, "Avoided redundant navigation to current location");
|
|
8
8
|
}
|
|
@@ -33,6 +33,5 @@ async function resolveRouteRecordRedirect(redirect, to, from, resolveWithCodec)
|
|
|
33
33
|
};
|
|
34
34
|
}
|
|
35
35
|
|
|
36
|
-
//#endregion
|
|
37
36
|
export { applyRedirectedFrom, createDuplicatedFailure, createForwardNotSupportedFailure, createHashOnlyNavigationFailure, createTabBarQueryFailure, createTooManyRedirectsFailure, resolveRouteRecordRedirect };
|
|
38
37
|
//# sourceMappingURL=navigationTargetHelpers.mjs.map
|
|
@@ -2,7 +2,7 @@ import { resolvePath } from "../routerInternal/path.mjs";
|
|
|
2
2
|
import { normalizeHash, normalizeQuery, normalizeRouteParams, parseQuery, stringifyQuery } from "../routerInternal/query.mjs";
|
|
3
3
|
import { createRouteLocation, parsePathInput } from "../routerInternal/location.mjs";
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
// src/router/resolve.ts
|
|
6
6
|
const DEFAULT_ROUTE_RESOLVE_CODEC = {
|
|
7
7
|
parseQuery,
|
|
8
8
|
stringifyQuery
|
|
@@ -23,6 +23,5 @@ function resolveRouteLocation(to, currentPath = "", codec = DEFAULT_ROUTE_RESOLV
|
|
|
23
23
|
return createRouteLocation(path, query, hash, name, params, codec.stringifyQuery);
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
//#endregion
|
|
27
26
|
export { DEFAULT_ROUTE_RESOLVE_CODEC, resolveRouteLocation };
|
|
28
27
|
//# sourceMappingURL=resolve.mjs.map
|
|
@@ -4,7 +4,7 @@ import { assertValidAddRouteInput, warnRouteConfig } from "../routerInternal/rec
|
|
|
4
4
|
import { createNamedRouteNameByStaticPath, flattenNamedRouteRecords, normalizeRouteRecordRaw } from "../routerInternal/records.mjs";
|
|
5
5
|
import { cloneRouteMeta } from "../routerInternal/snapshots.mjs";
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
// src/router/routeRegistry.ts
|
|
8
8
|
function normalizeRouteRecordForOutput(record) {
|
|
9
9
|
const normalizedRoute = {
|
|
10
10
|
name: record.name,
|
|
@@ -73,6 +73,5 @@ function createRouteRegistry(namedRouteLookup) {
|
|
|
73
73
|
};
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
-
//#endregion
|
|
77
76
|
export { createRouteRegistry };
|
|
78
77
|
//# sourceMappingURL=routeRegistry.mjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { getCurrentMiniProgramPages } from "../runtime/platform.mjs";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// src/router/routeSync.ts
|
|
4
4
|
const ROUTE_SYNC_NATIVE_METHODS = [
|
|
5
5
|
"switchTab",
|
|
6
6
|
"reLaunch",
|
|
@@ -73,6 +73,5 @@ function installRouteStateSyncOnNativeRouter(nativeRouter) {
|
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
-
//#endregion
|
|
77
76
|
export { installRouteStateSyncOnNativeRouter, notifyRouteStateSync, registerRouteStateSyncHandler };
|
|
78
77
|
//# sourceMappingURL=routeSync.mjs.map
|
|
@@ -6,7 +6,7 @@ import { resolveScrollController } from "./controller.mjs";
|
|
|
6
6
|
import { getScrollSetupScope, registerScrollRestoration } from "./index.mjs";
|
|
7
7
|
import { WEVU_PAGE_SCROLL_OBSERVERS_KEY, WEVU_PAGE_SCROLL_RESTORATION_OWNER_KEY } from "@weapp-core/constants";
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
// src/router/scrollRestoration/adapters.ts
|
|
10
10
|
/** WebView 页面适配器;Skyline 没有隐式页面滚动容器。 */
|
|
11
11
|
function usePageScrollRestoration(options = {}) {
|
|
12
12
|
const state = resolveScrollController(options.controller);
|
|
@@ -81,6 +81,5 @@ function useScrollViewRestoration(options = {}) {
|
|
|
81
81
|
};
|
|
82
82
|
}
|
|
83
83
|
|
|
84
|
-
//#endregion
|
|
85
84
|
export { usePageScrollRestoration, useScrollViewRestoration };
|
|
86
85
|
//# sourceMappingURL=adapters.mjs.map
|
|
@@ -3,7 +3,7 @@ import { resolvePageRoute } from "../../routerInternal/location.mjs";
|
|
|
3
3
|
import { getActiveRouter } from "../instance.mjs";
|
|
4
4
|
import { currentScrollPage, subscribeScrollRouteEvents, supportsScrollRouteEvents } from "./host.mjs";
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
// src/router/scrollRestoration/controller.ts
|
|
7
7
|
const controllers = /* @__PURE__ */ new WeakMap();
|
|
8
8
|
const routerControllers = /* @__PURE__ */ new WeakMap();
|
|
9
9
|
/** 创建显式启用的路由会话;不会安装全局默认滚动行为。 */
|
|
@@ -143,6 +143,5 @@ function resolveScrollController(controller) {
|
|
|
143
143
|
return state;
|
|
144
144
|
}
|
|
145
145
|
|
|
146
|
-
//#endregion
|
|
147
146
|
export { createScrollRestoration, resolveScrollController };
|
|
148
147
|
//# sourceMappingURL=controller.mjs.map
|
|
@@ -3,7 +3,7 @@ import { getCurrentMiniProgramPages } from "../../runtime/platform.mjs";
|
|
|
3
3
|
import { pushHook } from "../../runtime/hooks/base.mjs";
|
|
4
4
|
import { WEVU_HOOKS_KEY, WEVU_NATIVE_INSTANCE_KEY, WEVU_ROUTE_EVENT_CONTRACT_KEY } from "@weapp-core/constants";
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
// src/router/scrollRestoration/host.ts
|
|
7
7
|
const routeEvents = [
|
|
8
8
|
"BeforeAppRoute",
|
|
9
9
|
"BeforePageUnload",
|
|
@@ -71,6 +71,5 @@ function addScrollHook(instance, name, handler) {
|
|
|
71
71
|
};
|
|
72
72
|
}
|
|
73
73
|
|
|
74
|
-
//#endregion
|
|
75
74
|
export { addScrollHook, currentScrollPage, resolveScrollPage, subscribeScrollRouteEvents, supportsScrollRouteEvents };
|
|
76
75
|
//# sourceMappingURL=host.mjs.map
|
|
@@ -5,7 +5,7 @@ import { addScrollHook, currentScrollPage, resolveScrollPage } from "./host.mjs"
|
|
|
5
5
|
import { createScrollRestoration, resolveScrollController } from "./controller.mjs";
|
|
6
6
|
import { WEVU_READY_CALLED_KEY } from "@weapp-core/constants";
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
// src/router/scrollRestoration/index.ts
|
|
9
9
|
function getScrollSetupScope() {
|
|
10
10
|
const instance = assertInSetup("useScrollRestoration");
|
|
11
11
|
const proxy = getCurrentSetupContext()?.proxy;
|
|
@@ -151,6 +151,5 @@ function useScrollRestoration(options) {
|
|
|
151
151
|
return registerScrollRestoration(options);
|
|
152
152
|
}
|
|
153
153
|
|
|
154
|
-
//#endregion
|
|
155
154
|
export { createScrollRestoration, getScrollSetupScope, registerScrollRestoration, useScrollRestoration };
|
|
156
155
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/router/types.ts
|
|
2
2
|
const NavigationFailureType = {
|
|
3
3
|
unknown: 1,
|
|
4
4
|
aborted: 4,
|
|
@@ -6,6 +6,5 @@ const NavigationFailureType = {
|
|
|
6
6
|
duplicated: 16
|
|
7
7
|
};
|
|
8
8
|
|
|
9
|
-
//#endregion
|
|
10
9
|
export { NavigationFailureType };
|
|
11
10
|
//# sourceMappingURL=types.mjs.map
|
|
@@ -11,7 +11,7 @@ import { getActiveRouter } from "./instance.mjs";
|
|
|
11
11
|
import { resolveRouteLocation } from "./resolve.mjs";
|
|
12
12
|
import { WEVU_NATIVE_INSTANCE_KEY } from "@weapp-core/constants";
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
// src/router/useRoute.ts
|
|
15
15
|
function isPageLikeInstance(instance) {
|
|
16
16
|
return typeof instance.route === "string" || typeof instance.__route__ === "string";
|
|
17
17
|
}
|
|
@@ -132,6 +132,5 @@ function useNativePageRouter() {
|
|
|
132
132
|
return useNativePageRouter$1();
|
|
133
133
|
}
|
|
134
134
|
|
|
135
|
-
//#endregion
|
|
136
135
|
export { createRouteStateController, useNativePageRouter, useNativeRouter, useRoute };
|
|
137
136
|
//# sourceMappingURL=useRoute.mjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { getActiveRouter } from "./instance.mjs";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// src/router/useRouter.ts
|
|
4
4
|
/**
|
|
5
5
|
* @description 获取当前已创建的路由实例。
|
|
6
6
|
*/
|
|
@@ -10,6 +10,5 @@ function useRouter() {
|
|
|
10
10
|
throw new Error("useRouter() 未找到已创建的 router 实例。请先在 setup() 中调用 createRouter()。");
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
//#endregion
|
|
14
13
|
export { useRouter };
|
|
15
14
|
//# sourceMappingURL=useRouter.mjs.map
|
|
@@ -3,7 +3,7 @@ import { getCurrentPageInstance } from "../runtime/register/component/lifecycle/
|
|
|
3
3
|
import { createAbsoluteRoutePath, resolvePath } from "./path.mjs";
|
|
4
4
|
import { normalizeHash, normalizeQuery, parseQuery, stringifyQuery } from "./query.mjs";
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
// src/routerInternal/location.ts
|
|
7
7
|
const DEFAULT_ROUTE_RESOLVE_CODEC = {
|
|
8
8
|
parseQuery,
|
|
9
9
|
stringifyQuery
|
|
@@ -62,6 +62,5 @@ function resolveCurrentRoute(queryOverride, fallbackPage) {
|
|
|
62
62
|
return resolvePageRoute(getCurrentMiniProgramPage(fallbackPage), queryOverride);
|
|
63
63
|
}
|
|
64
64
|
|
|
65
|
-
//#endregion
|
|
66
65
|
export { createRouteLocation, parsePathInput, resolveCurrentRoute, resolvePageRoute };
|
|
67
66
|
//# sourceMappingURL=location.mjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { isDynamicRoutePath } from "./path.mjs";
|
|
2
2
|
import { decodeRouteParamSegment, parsePathParamToken } from "./params.mjs";
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
// src/routerInternal/matching.ts
|
|
5
5
|
function splitRoutePathSegments(path) {
|
|
6
6
|
return path.split("/").filter(Boolean);
|
|
7
7
|
}
|
|
@@ -144,6 +144,5 @@ function resolveMatchedRouteRecord(target, lookup) {
|
|
|
144
144
|
}
|
|
145
145
|
}
|
|
146
146
|
|
|
147
|
-
//#endregion
|
|
148
147
|
export { collectRouteNamesForRemoval, mergeMatchedRouteMeta, resolveMatchedRouteRecord };
|
|
149
148
|
//# sourceMappingURL=matching.mjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { normalizeRouteParams } from "./query.mjs";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// src/routerInternal/params.ts
|
|
4
4
|
const PATH_PARAM_TOKEN_RE = /^:(\w+)(?:\([^)]*\))?([+*?])?$/;
|
|
5
5
|
function parsePathParamToken(segment) {
|
|
6
6
|
const match = PATH_PARAM_TOKEN_RE.exec(segment);
|
|
@@ -89,6 +89,5 @@ function resolveNamedRouteLocation(to, lookup, paramsMode) {
|
|
|
89
89
|
};
|
|
90
90
|
}
|
|
91
91
|
|
|
92
|
-
//#endregion
|
|
93
92
|
export { decodeRouteParamSegment, parsePathParamToken, resolveNamedRouteLocation };
|
|
94
93
|
//# sourceMappingURL=params.mjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/routerInternal/path.ts
|
|
2
2
|
function normalizePathSegments(path) {
|
|
3
3
|
const segments = [];
|
|
4
4
|
for (const segment of path.split("/")) {
|
|
@@ -37,6 +37,5 @@ function isDynamicRoutePath(path) {
|
|
|
37
37
|
return DYNAMIC_ROUTE_RE.test(path);
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
//#endregion
|
|
41
40
|
export { createAbsoluteRoutePath, isDynamicRoutePath, resolvePath };
|
|
42
41
|
//# sourceMappingURL=path.mjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/routerInternal/query.ts
|
|
2
2
|
const PLUS_RE = /\+/g;
|
|
3
3
|
function decodeQuerySegment(value) {
|
|
4
4
|
return decodeURIComponent(value.replace(PLUS_RE, " "));
|
|
@@ -108,6 +108,5 @@ function stringifyQuery(query = {}) {
|
|
|
108
108
|
return segments.join("&");
|
|
109
109
|
}
|
|
110
110
|
|
|
111
|
-
//#endregion
|
|
112
111
|
export { normalizeHash, normalizeQuery, normalizeRouteParams, parseQuery, stringifyQuery };
|
|
113
112
|
//# sourceMappingURL=query.mjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createAbsoluteRoutePath, isDynamicRoutePath, resolvePath } from "./path.mjs";
|
|
2
2
|
import { warnRouteConfig } from "./recordsWarnings.mjs";
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
// src/routerInternal/records.ts
|
|
5
5
|
function normalizeBeforeEnterGuards(beforeEnter) {
|
|
6
6
|
if (!beforeEnter) return [];
|
|
7
7
|
if (Array.isArray(beforeEnter)) return beforeEnter;
|
|
@@ -168,6 +168,5 @@ function createNamedRouteLookup(routeEntries) {
|
|
|
168
168
|
};
|
|
169
169
|
}
|
|
170
170
|
|
|
171
|
-
//#endregion
|
|
172
171
|
export { createNamedRouteLookup, createNamedRouteNameByStaticPath, createRouteRecordAliasValue, flattenNamedRouteRecords, normalizeRouteRecordRaw, resolveRouteOptionEntries };
|
|
173
172
|
//# sourceMappingURL=records.mjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createAbsoluteRoutePath, resolvePath } from "./path.mjs";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// src/routerInternal/recordsWarnings.ts
|
|
4
4
|
function warnRouteConfig(message) {
|
|
5
5
|
if (typeof console === "undefined" || typeof console.warn !== "function") return;
|
|
6
6
|
console.warn(`[wevu/router] ${message}`);
|
|
@@ -43,6 +43,5 @@ function warnDuplicateRouteEntries(routeEntries) {
|
|
|
43
43
|
warnRouteConfig(`duplicate route names detected, later entries override earlier ones: ${duplicateMessages.join(", ")}`);
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
-
//#endregion
|
|
47
46
|
export { assertValidAddRouteInput, warnDuplicateRouteEntries, warnRouteConfig };
|
|
48
47
|
//# sourceMappingURL=recordsWarnings.mjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createAbsoluteRoutePath, resolvePath } from "./path.mjs";
|
|
2
2
|
import { stringifyQuery } from "./query.mjs";
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
// src/routerInternal/snapshots.ts
|
|
5
5
|
function cloneRouteMeta(meta) {
|
|
6
6
|
if (!meta) return;
|
|
7
7
|
return { ...meta };
|
|
@@ -123,6 +123,5 @@ function hasLocationQuery(query) {
|
|
|
123
123
|
return Object.keys(query).length > 0;
|
|
124
124
|
}
|
|
125
125
|
|
|
126
|
-
//#endregion
|
|
127
126
|
export { cloneLocationQuery, cloneRouteLocationRedirectedFrom, cloneRouteMeta, cloneRouteParams, cloneRouteRecordMatchedList, createNativeRouteUrl, createRedirectedFromSnapshot, createRouterOptionsSnapshot, hasLocationQuery, normalizeRouteRecordMatched, snapshotRouteLocation };
|
|
128
127
|
//# sourceMappingURL=snapshots.mjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createComputedEffect, track, trigger } from "../../reactivity/core.mjs";
|
|
2
2
|
import { markAsRef } from "../../reactivity/ref.mjs";
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
// src/runtime/app/computed.ts
|
|
5
5
|
function createComputedAccessors(options) {
|
|
6
6
|
const computedRefs = Object.create(null);
|
|
7
7
|
const computedSetters = Object.create(null);
|
|
@@ -63,6 +63,5 @@ function createComputedAccessors(options) {
|
|
|
63
63
|
};
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
-
//#endregion
|
|
67
66
|
export { createComputedAccessors };
|
|
68
67
|
//# sourceMappingURL=computed.mjs.map
|
|
@@ -8,7 +8,7 @@ import { isNativeBridgeMethod, markNativeBridgeMethod } from "../nativeBridge.mj
|
|
|
8
8
|
import { createComputedAccessors } from "./computed.mjs";
|
|
9
9
|
import { WEVU_COMPONENT_NAME_KEY, WEVU_HOST_COMMIT_PROMISE_KEY, WEVU_INLINE_MAP_KEY, WEVU_NATIVE_INSTANCE_KEY, WEVU_PARENT_INSTANCE_KEY, WEVU_PROPS_KEY, WEVU_RESOLVE_PUBLIC_INSTANCE_METHOD, WEVU_RUNTIME_APP_KEY, WEVU_RUNTIME_KEY } from "@weapp-core/constants";
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
// src/runtime/app/context.ts
|
|
12
12
|
function createRuntimeContext(options) {
|
|
13
13
|
const { state, setupState, computedDefs, methodDefs, appConfig, includeComputed, setDataStrategy } = options;
|
|
14
14
|
const boundMethods = {};
|
|
@@ -267,6 +267,5 @@ function createRuntimeContext(options) {
|
|
|
267
267
|
};
|
|
268
268
|
}
|
|
269
269
|
|
|
270
|
-
//#endregion
|
|
271
270
|
export { createRuntimeContext };
|
|
272
271
|
//# sourceMappingURL=context.mjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/runtime/app/diagnostics.ts
|
|
2
2
|
function isFallbackReason(reason) {
|
|
3
3
|
return reason !== "patch" && reason !== "diff";
|
|
4
4
|
}
|
|
@@ -43,6 +43,5 @@ function createDiagnosticsLogger(mode) {
|
|
|
43
43
|
};
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
-
//#endregion
|
|
47
46
|
export { createDiagnosticsLogger };
|
|
48
47
|
//# sourceMappingURL=diagnostics.mjs.map
|
|
@@ -14,7 +14,7 @@ import { createSetDataScheduler } from "./setData/scheduler.mjs";
|
|
|
14
14
|
import { resolveSetDataOptions } from "./setDataOptions.mjs";
|
|
15
15
|
import { WEVU_ATTRS_KEY, WEVU_PROPS_DERIVED_KEYS_KEY, WEVU_PROPS_KEY, WEVU_SETUP_STATE_KEY } from "@weapp-core/constants";
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
// src/runtime/app/mount.ts
|
|
18
18
|
function createWatchStopHandle(cleanup, baseHandle) {
|
|
19
19
|
const stopHandle = (() => {
|
|
20
20
|
cleanup();
|
|
@@ -267,6 +267,5 @@ function createRuntimeMount(options) {
|
|
|
267
267
|
};
|
|
268
268
|
}
|
|
269
269
|
|
|
270
|
-
//#endregion
|
|
271
270
|
export { createRuntimeMount };
|
|
272
271
|
//# sourceMappingURL=mount.mjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/runtime/app/pending.ts
|
|
2
2
|
let pendingRuntimeAppRegistration;
|
|
3
3
|
function setPendingRuntimeAppRegistration(registration) {
|
|
4
4
|
pendingRuntimeAppRegistration = registration;
|
|
@@ -9,6 +9,5 @@ function takePendingRuntimeAppRegistration() {
|
|
|
9
9
|
return registration;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
//#endregion
|
|
13
12
|
export { setPendingRuntimeAppRegistration, takePendingRuntimeAppRegistration };
|
|
14
13
|
//# sourceMappingURL=pending.mjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { observePhysicalDispatch } from "./observation.mjs";
|
|
2
2
|
import { cloneSnapshotValue } from "./snapshot.mjs";
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
// src/runtime/app/setData/commitTracker.ts
|
|
5
5
|
const resolvedCommitPromise = Promise.resolve();
|
|
6
6
|
function isThenable(value) {
|
|
7
7
|
return Boolean(value && (typeof value === "object" || typeof value === "function") && typeof value.then === "function");
|
|
@@ -291,6 +291,5 @@ function createSetDataCommitTracker(options) {
|
|
|
291
291
|
};
|
|
292
292
|
}
|
|
293
293
|
|
|
294
|
-
//#endregion
|
|
295
294
|
export { createSetDataCommitTracker, observeSetDataCompletion };
|
|
296
295
|
//# sourceMappingURL=commitTracker.mjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/runtime/app/setData/observation.ts
|
|
2
2
|
let nextObserverId = 0;
|
|
3
3
|
let nextDispatchId = 0;
|
|
4
4
|
function duration(start, end) {
|
|
@@ -104,6 +104,5 @@ function createSetDataObservation(options) {
|
|
|
104
104
|
};
|
|
105
105
|
}
|
|
106
106
|
|
|
107
|
-
//#endregion
|
|
108
107
|
export { createSetDataObservation, observePhysicalDispatch };
|
|
109
108
|
//# sourceMappingURL=observation.mjs.map
|
|
@@ -2,7 +2,7 @@ import { toPlain } from "../../diff.mjs";
|
|
|
2
2
|
import { applySnapshotUpdate, cloneSnapshotValue, isDeepEqualValue, isShallowEqualValue, normalizeSetDataValue } from "./snapshot.mjs";
|
|
3
3
|
import { checkPayloadSize, collapsePayload, mergeSiblingPayload } from "./payload.mjs";
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
// src/runtime/app/setData/patchScheduler.ts
|
|
6
6
|
function preparePatchUpdate(options) {
|
|
7
7
|
const { state, computedRefs, dirtyComputedKeys, includeComputed, computedCompare, computedCompareMaxDepth, computedCompareMaxKeys, shouldIncludeKey, maxPatchKeys, maxPayloadBytes, mergeSiblingThreshold, mergeSiblingMaxInflationRatio, mergeSiblingMaxParentBytes, mergeSiblingSkipArray, elevateTopKeyThreshold, toPlainMaxDepth, toPlainMaxKeys, includeFunctions = false, functionPaths, plainCache, plainCacheEligibility, pendingPatches, fallbackTopKeys, dispatchedSnapshot, dispatchedComputedSnapshot } = options;
|
|
8
8
|
if (pendingPatches.size > maxPatchKeys) {
|
|
@@ -147,6 +147,5 @@ function preparePatchUpdate(options) {
|
|
|
147
147
|
};
|
|
148
148
|
}
|
|
149
149
|
|
|
150
|
-
//#endregion
|
|
151
150
|
export { preparePatchUpdate };
|
|
152
151
|
//# sourceMappingURL=patchScheduler.mjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { hasOwn } from "../../../utils.mjs";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// src/runtime/app/setData/payload.ts
|
|
4
4
|
function collapsePayload(input) {
|
|
5
5
|
const keys = Object.keys(input).sort();
|
|
6
6
|
if (keys.length <= 1) return input;
|
|
@@ -155,6 +155,5 @@ function mergeSiblingPayload(options) {
|
|
|
155
155
|
};
|
|
156
156
|
}
|
|
157
157
|
|
|
158
|
-
//#endregion
|
|
159
158
|
export { checkPayloadSize, collapsePayload, estimateJsonSize, mergeSiblingPayload };
|
|
160
159
|
//# sourceMappingURL=payload.mjs.map
|
|
@@ -9,7 +9,7 @@ import { createSetDataObservation } from "./observation.mjs";
|
|
|
9
9
|
import { collectSnapshot } from "./snapshot.mjs";
|
|
10
10
|
import { createSetDataCommitTracker } from "./commitTracker.mjs";
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
// src/runtime/app/setData/scheduler.ts
|
|
13
13
|
function createSetDataScheduler(options) {
|
|
14
14
|
const { state, setupState, snapshotOmitKeys, computedRefs, dirtyComputedKeys, includeComputed, setDataStrategy, currentAdapter, shouldIncludeKey, toPlainMaxDepth, toPlainMaxKeys, includeFunctions = false, functionPaths, debug, debugWhen, debugSampleRate, bindingManifest, loopWarning, targetLabel, runTracker, isMounted, initialSnapshot, initialState } = options;
|
|
15
15
|
const plainCache = /* @__PURE__ */ new WeakMap();
|
|
@@ -304,6 +304,5 @@ function createSetDataScheduler(options) {
|
|
|
304
304
|
};
|
|
305
305
|
}
|
|
306
306
|
|
|
307
|
-
//#endregion
|
|
308
307
|
export { createSetDataScheduler };
|
|
309
308
|
//# sourceMappingURL=scheduler.mjs.map
|
|
@@ -3,7 +3,7 @@ import { isReactive } from "../../../reactivity/reactive.mjs";
|
|
|
3
3
|
import { hasOwn } from "../../../utils.mjs";
|
|
4
4
|
import { toPlain } from "../../diff.mjs";
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
// src/runtime/app/setData/snapshot.ts
|
|
7
7
|
function isPlainObjectLike(value) {
|
|
8
8
|
if (value == null || typeof value !== "object") return false;
|
|
9
9
|
const proto = Object.getPrototypeOf(value);
|
|
@@ -133,6 +133,5 @@ function collectSnapshot(options) {
|
|
|
133
133
|
return out;
|
|
134
134
|
}
|
|
135
135
|
|
|
136
|
-
//#endregion
|
|
137
136
|
export { applySnapshotUpdate, cloneSnapshotValue, collectSnapshot, isDeepEqualValue, isPlainObjectLike, isShallowEqualValue, normalizeSetDataValue };
|
|
138
137
|
//# sourceMappingURL=snapshot.mjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/runtime/app/setDataOptions.ts
|
|
2
2
|
function resolveSetDataOptions(setDataOptions) {
|
|
3
3
|
const includeComputed = setDataOptions?.includeComputed ?? true;
|
|
4
4
|
const suspendWhenHidden = setDataOptions?.suspendWhenHidden ?? false;
|
|
@@ -68,6 +68,5 @@ function resolveSetDataOptions(setDataOptions) {
|
|
|
68
68
|
};
|
|
69
69
|
}
|
|
70
70
|
|
|
71
|
-
//#endregion
|
|
72
71
|
export { resolveSetDataOptions };
|
|
73
72
|
//# sourceMappingURL=setDataOptions.mjs.map
|
package/dist/dev/runtime/app.mjs
CHANGED
|
@@ -9,7 +9,7 @@ import { setPendingRuntimeAppRegistration } from "./app/pending.mjs";
|
|
|
9
9
|
import { registerApp } from "./register/app.mjs";
|
|
10
10
|
import { WEVU_BINDING_MANIFEST_KEY, WEVU_INLINE_HANDLER, WEVU_INLINE_MAP_KEY, WEVU_SCOPED_SLOT_OWNER_REQUIRED_KEY, WEVU_SLOT_OWNER_ID_KEY } from "@weapp-core/constants";
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
// src/runtime/app.ts
|
|
13
13
|
function createApp(options) {
|
|
14
14
|
const defaultsScope = options[INTERNAL_DEFAULTS_SCOPE_KEY];
|
|
15
15
|
const { [INTERNAL_DEFAULTS_SCOPE_KEY]: _ignoredDefaultsScope, [WEVU_BINDING_MANIFEST_KEY]: rawBindingManifest, [WEVU_SCOPED_SLOT_OWNER_REQUIRED_KEY]: scopedSlotOwnerRequired, data, computed: computedOptions, methods, setData: setDataOptions, watch: appWatch, setup: appSetup, ...mpOptions } = defaultsScope === "component" ? options : applyWevuAppDefaults(options);
|
|
@@ -100,6 +100,5 @@ function createApp(options) {
|
|
|
100
100
|
return runtimeApp;
|
|
101
101
|
}
|
|
102
102
|
|
|
103
|
-
//#endregion
|
|
104
103
|
export { createApp };
|
|
105
104
|
//# sourceMappingURL=app.mjs.map
|
|
@@ -2,7 +2,7 @@ import { isRef } from "../reactivity/ref.mjs";
|
|
|
2
2
|
import { capitalize, toPathSegments } from "../utils.mjs";
|
|
3
3
|
import { parseModelEventValue, setComputedValue } from "./internal.mjs";
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
// src/runtime/bindModel.ts
|
|
6
6
|
function setWithSegments(target, segments, value) {
|
|
7
7
|
let current = target;
|
|
8
8
|
for (let i = 0; i < segments.length - 1; i++) {
|
|
@@ -87,6 +87,5 @@ function createBindModel(publicInstance, state, computedRefs, computedSetters, s
|
|
|
87
87
|
return bindModel;
|
|
88
88
|
}
|
|
89
89
|
|
|
90
|
-
//#endregion
|
|
91
90
|
export { createBindModel, defaultParser };
|
|
92
91
|
//# sourceMappingURL=bindModel.mjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/runtime/bindingManifest.ts
|
|
2
2
|
const BINDING_UPDATE_MODES = {
|
|
3
3
|
"exact-path": true,
|
|
4
4
|
"snapshot-fallback": true,
|
|
@@ -92,6 +92,5 @@ function resolveBindingDiagnostics(manifest, paths, wholeSnapshotFallback = fals
|
|
|
92
92
|
return diagnostics;
|
|
93
93
|
}
|
|
94
94
|
|
|
95
|
-
//#endregion
|
|
96
95
|
export { hasBindingOutputPath, resolveBindingDiagnostics, resolveBindingManifest };
|
|
97
96
|
//# sourceMappingURL=bindingManifest.mjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/runtime/capabilities.ts
|
|
2
2
|
const RUNTIME_SCOPED_SLOT_STATE_KEY = "__wevuScopedSlotMountState";
|
|
3
3
|
/**
|
|
4
4
|
* 读取能力实现挂在宿主实例上的作用域插槽挂载状态。
|
|
@@ -35,6 +35,5 @@ function isSetDataHighFrequencyWarningRequested(option) {
|
|
|
35
35
|
return option.enabled !== false;
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
//#endregion
|
|
39
38
|
export { RUNTIME_SCOPED_SLOT_STATE_KEY, getScopedSlotMountState, isSetDataHighFrequencyWarningRequested, registerRuntimeCapability, requireRuntimeCapability, runtimeCapabilityRegistry };
|
|
40
39
|
//# sourceMappingURL=capabilities.mjs.map
|
package/dist/dev/runtime/css.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import { computed } from "../reactivity/computed.mjs";
|
|
|
3
3
|
import { assertInSetup } from "./hooks/base.mjs";
|
|
4
4
|
import { WEVU_CSS_MODULES_KEY, WEVU_CSS_VARS_STYLE_KEY } from "@weapp-core/constants";
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
// src/runtime/css.ts
|
|
7
7
|
function stringifyCssVars(values) {
|
|
8
8
|
return Object.entries(values).map(([key, value]) => `--${key}:${value == null ? "" : String(unref(value))}`).join(";");
|
|
9
9
|
}
|
|
@@ -28,6 +28,5 @@ function useCssVars(getter) {
|
|
|
28
28
|
return style;
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
//#endregion
|
|
32
31
|
export { useCssModule, useCssVars };
|
|
33
32
|
//# sourceMappingURL=css.mjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/runtime/defaults.ts
|
|
2
2
|
const INTERNAL_DEFAULTS_SCOPE_KEY = "__wevuDefaultsScope";
|
|
3
3
|
let currentDefaults = {};
|
|
4
4
|
function getPlainRecord(value) {
|
|
@@ -56,6 +56,5 @@ function applyWevuComponentDefaults(options) {
|
|
|
56
56
|
return mergeWithDefaults(currentDefaults.component, options);
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
-
//#endregion
|
|
60
59
|
export { INTERNAL_DEFAULTS_SCOPE_KEY, applyWevuAppDefaults, applyWevuComponentDefaults, resetWevuDefaults, setWevuDefaults };
|
|
61
60
|
//# sourceMappingURL=defaults.mjs.map
|