wevu 7.2.1 → 7.3.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/README.md +6 -0
- package/dist/dev/_virtual/{_@oxc-project_runtime@0.150.0 → _@oxc-project_runtime@0.151.0}/helpers/esm/defineProperty.mjs +1 -1
- package/dist/dev/_virtual/{_@oxc-project_runtime@0.150.0 → _@oxc-project_runtime@0.151.0}/helpers/esm/toPrimitive.mjs +1 -1
- package/dist/dev/_virtual/{_@oxc-project_runtime@0.150.0 → _@oxc-project_runtime@0.151.0}/helpers/esm/toPropertyKey.mjs +1 -1
- package/dist/dev/_virtual/{_@oxc-project_runtime@0.150.0 → _@oxc-project_runtime@0.151.0}/helpers/esm/typeof.mjs +1 -1
- package/dist/dev/api/vitest/setup.d.mts +1 -0
- package/dist/dev/api/vitest.d.mts +1 -0
- package/dist/dev/api.d.mts +1 -0
- package/dist/dev/compiler.d.mts +1 -0
- package/dist/dev/fetch.d.mts +9 -0
- package/dist/dev/index.d.mts +72 -0
- package/dist/dev/internal-reactivity.d.mts +18 -0
- package/dist/dev/internal-runtime.d.mts +45 -0
- package/dist/dev/internal-runtime.mjs +3 -2
- package/dist/dev/internal-template.d.mts +2 -0
- package/dist/dev/jsxTypes.d.mts +9 -0
- package/dist/dev/macros/shared.d.mts +83 -0
- package/dist/dev/macros.d.mts +71 -0
- package/dist/dev/package.mjs +1 -1
- package/dist/dev/reactivity/asyncDerivation.d.mts +41 -0
- package/dist/dev/reactivity/asyncDerivation.mjs +8 -10
- package/dist/dev/reactivity/asyncDerivation.mjs.map +1 -1
- package/dist/dev/reactivity/computed.d.mts +25 -0
- package/dist/dev/reactivity/core.d.mts +35 -0
- package/dist/dev/reactivity/core.mjs +5 -8
- package/dist/dev/reactivity/core.mjs.map +1 -1
- package/dist/dev/reactivity/index.d.mts +16 -0
- package/dist/dev/reactivity/reactive/mutation.d.mts +21 -0
- package/dist/dev/reactivity/reactive/patch.d.mts +18 -0
- package/dist/dev/reactivity/reactive/patch.mjs +3 -3
- package/dist/dev/reactivity/reactive/patch.mjs.map +1 -1
- package/dist/dev/reactivity/reactive/patchState.mjs +4 -8
- package/dist/dev/reactivity/reactive/patchState.mjs.map +1 -1
- package/dist/dev/reactivity/reactive/shallow.d.mts +22 -0
- package/dist/dev/reactivity/reactive/shared.d.mts +4 -0
- package/dist/dev/reactivity/reactive/shared.mjs +1 -2
- package/dist/dev/reactivity/reactive/shared.mjs.map +1 -1
- package/dist/dev/reactivity/reactive.d.mts +42 -0
- package/dist/dev/reactivity/reactive.mjs +5 -10
- package/dist/dev/reactivity/reactive.mjs.map +1 -1
- package/dist/dev/reactivity/readonly.d.mts +27 -0
- package/dist/dev/reactivity/ref.d.mts +27 -0
- package/dist/dev/reactivity/ref.mjs +2 -2
- package/dist/dev/reactivity/ref.mjs.map +1 -1
- package/dist/dev/reactivity/shallowRef.d.mts +19 -0
- package/dist/dev/reactivity/shallowRef.mjs +1 -1
- package/dist/dev/reactivity/shallowRef.mjs.map +1 -1
- package/dist/dev/reactivity/toRefs.d.mts +43 -0
- package/dist/dev/reactivity/traverse.d.mts +8 -0
- package/dist/dev/reactivity/watch/helpers.mjs +1 -1
- package/dist/dev/reactivity/watch/helpers.mjs.map +1 -1
- package/dist/dev/reactivity/watch/types.d.mts +43 -0
- package/dist/dev/reactivity/watch.d.mts +22 -0
- package/dist/dev/reactivity/watch.mjs +6 -8
- package/dist/dev/reactivity/watch.mjs.map +1 -1
- package/dist/dev/router/auto-routes.d.mts +8 -0
- package/dist/dev/router/createRouter.d.mts +9 -0
- package/dist/dev/router/createRouter.mjs +17 -24
- package/dist/dev/router/createRouter.mjs.map +1 -1
- package/dist/dev/router/initialNavigation.mjs +18 -16
- package/dist/dev/router/initialNavigation.mjs.map +1 -1
- package/dist/dev/router/instance.mjs +1 -2
- package/dist/dev/router/instance.mjs.map +1 -1
- package/dist/dev/router/navigationCore.d.mts +7 -0
- package/dist/dev/router/navigationCore.mjs +2 -2
- package/dist/dev/router/navigationCore.mjs.map +1 -1
- package/dist/dev/router/navigationResult.mjs +7 -10
- package/dist/dev/router/navigationResult.mjs.map +1 -1
- package/dist/dev/router/navigationTarget.mjs +1 -3
- package/dist/dev/router/navigationTarget.mjs.map +1 -1
- package/dist/dev/router/resolve.d.mts +7 -0
- package/dist/dev/router/resolve.mjs +3 -4
- package/dist/dev/router/resolve.mjs.map +1 -1
- package/dist/dev/router/routeRegistry.mjs +1 -1
- package/dist/dev/router/routeRegistry.mjs.map +1 -1
- package/dist/dev/router/routeSync.d.mts +2 -0
- package/dist/dev/router/routeSync.mjs +1 -1
- package/dist/dev/router/routeSync.mjs.map +1 -1
- package/dist/dev/router/types.d.mts +267 -0
- package/dist/dev/router/useRoute.d.mts +20 -0
- package/dist/dev/router/useRoute.mjs +12 -19
- package/dist/dev/router/useRoute.mjs.map +1 -1
- package/dist/dev/router/useRouter.d.mts +9 -0
- package/dist/dev/router.d.mts +26 -0
- package/dist/dev/routerInternal/location.d.mts +2 -0
- package/dist/dev/routerInternal/location.mjs +2 -3
- package/dist/dev/routerInternal/location.mjs.map +1 -1
- package/dist/dev/routerInternal/matching.d.mts +2 -0
- package/dist/dev/routerInternal/params.d.mts +2 -0
- package/dist/dev/routerInternal/params.mjs +2 -3
- package/dist/dev/routerInternal/params.mjs.map +1 -1
- package/dist/dev/routerInternal/query.d.mts +7 -0
- package/dist/dev/routerInternal/records.d.mts +2 -0
- package/dist/dev/routerInternal/records.mjs +1 -1
- package/dist/dev/routerInternal/records.mjs.map +1 -1
- package/dist/dev/routerInternal/recordsWarnings.d.mts +2 -0
- package/dist/dev/routerInternal/recordsWarnings.mjs +1 -2
- package/dist/dev/routerInternal/recordsWarnings.mjs.map +1 -1
- package/dist/dev/routerInternal/shared.d.mts +9 -0
- package/dist/dev/routerInternal/snapshots.d.mts +2 -0
- package/dist/dev/routerInternal/types.d.mts +9 -0
- package/dist/dev/runtime/app/context.mjs +13 -26
- package/dist/dev/runtime/app/context.mjs.map +1 -1
- package/dist/dev/runtime/app/diagnostics.mjs +2 -4
- package/dist/dev/runtime/app/diagnostics.mjs.map +1 -1
- package/dist/dev/runtime/app/mount.mjs +27 -33
- package/dist/dev/runtime/app/mount.mjs.map +1 -1
- package/dist/dev/runtime/app/pending.d.mts +10 -0
- package/dist/dev/runtime/app/setData/commitTracker.d.mts +13 -0
- package/dist/dev/runtime/app/setData/commitTracker.mjs +5 -9
- package/dist/dev/runtime/app/setData/commitTracker.mjs.map +1 -1
- package/dist/dev/runtime/app/setData/patchScheduler.mjs +2 -4
- package/dist/dev/runtime/app/setData/patchScheduler.mjs.map +1 -1
- package/dist/dev/runtime/app/setData/payload.mjs +2 -3
- package/dist/dev/runtime/app/setData/payload.mjs.map +1 -1
- package/dist/dev/runtime/app/setData/scheduler.d.mts +51 -0
- package/dist/dev/runtime/app/setData/scheduler.mjs +7 -9
- package/dist/dev/runtime/app/setData/scheduler.mjs.map +1 -1
- package/dist/dev/runtime/app/setData/snapshot.mjs +5 -6
- package/dist/dev/runtime/app/setData/snapshot.mjs.map +1 -1
- package/dist/dev/runtime/app/setDataOptions.mjs +26 -27
- package/dist/dev/runtime/app/setDataOptions.mjs.map +1 -1
- package/dist/dev/runtime/app.d.mts +8 -0
- package/dist/dev/runtime/app.mjs +9 -9
- package/dist/dev/runtime/app.mjs.map +1 -1
- package/dist/dev/runtime/bindingManifest.mjs +6 -14
- package/dist/dev/runtime/bindingManifest.mjs.map +1 -1
- package/dist/dev/runtime/capabilities.d.mts +78 -0
- package/dist/dev/runtime/capabilities.mjs.map +1 -1
- package/dist/dev/runtime/css.d.mts +14 -0
- package/dist/dev/runtime/css.mjs +4 -8
- package/dist/dev/runtime/css.mjs.map +1 -1
- package/dist/dev/runtime/defaults.d.mts +12 -0
- package/dist/dev/runtime/defaults.mjs +4 -4
- package/dist/dev/runtime/defaults.mjs.map +1 -1
- package/dist/dev/runtime/define/initialComputed.mjs +5 -5
- package/dist/dev/runtime/define/initialComputed.mjs.map +1 -1
- package/dist/dev/runtime/define/options.mjs +10 -12
- package/dist/dev/runtime/define/options.mjs.map +1 -1
- package/dist/dev/runtime/define/props.mjs +4 -5
- package/dist/dev/runtime/define/props.mjs.map +1 -1
- package/dist/dev/runtime/define/scopedSlotOptions.mjs +43 -61
- package/dist/dev/runtime/define/scopedSlotOptions.mjs.map +1 -1
- package/dist/dev/runtime/define/setupResult.mjs +17 -28
- package/dist/dev/runtime/define/setupResult.mjs.map +1 -1
- package/dist/dev/runtime/define.d.mts +118 -0
- package/dist/dev/runtime/define.mjs +9 -12
- package/dist/dev/runtime/define.mjs.map +1 -1
- package/dist/dev/runtime/diff.mjs +9 -11
- package/dist/dev/runtime/diff.mjs.map +1 -1
- package/dist/dev/runtime/disposables.d.mts +31 -0
- package/dist/dev/runtime/disposables.mjs +2 -2
- package/dist/dev/runtime/disposables.mjs.map +1 -1
- package/dist/dev/runtime/elementIntersectionObserver.d.mts +26 -0
- package/dist/dev/runtime/elementIntersectionObserver.mjs +16 -24
- package/dist/dev/runtime/elementIntersectionObserver.mjs.map +1 -1
- package/dist/dev/runtime/features/inlineEvents.d.mts +7 -0
- package/dist/dev/runtime/features/inlineEvents.mjs +2 -3
- package/dist/dev/runtime/features/inlineEvents.mjs.map +1 -1
- package/dist/dev/runtime/features/jsxIslands.d.mts +7 -0
- package/dist/dev/runtime/features/jsxIslands.mjs +20 -0
- package/dist/dev/runtime/features/jsxIslands.mjs.map +1 -0
- package/dist/dev/runtime/features/layout.d.mts +7 -0
- package/dist/dev/runtime/features/layout.mjs +2 -3
- package/dist/dev/runtime/features/layout.mjs.map +1 -1
- package/dist/dev/runtime/features/patchStrategy.d.mts +7 -0
- package/dist/dev/runtime/features/publicLayout.d.mts +24 -0
- package/dist/dev/runtime/features/publicLayout.mjs +2 -6
- package/dist/dev/runtime/features/publicLayout.mjs.map +1 -1
- package/dist/dev/runtime/features/scopedSlots.d.mts +23 -0
- package/dist/dev/runtime/features/scopedSlots.mjs +5 -9
- package/dist/dev/runtime/features/scopedSlots.mjs.map +1 -1
- package/dist/dev/runtime/features/setDataHighFrequencyWarning.d.mts +7 -0
- package/dist/dev/runtime/features/templateRefs.d.mts +7 -0
- package/dist/dev/runtime/features/templateRefs.mjs +1 -1
- package/dist/dev/runtime/features/templateRefs.mjs.map +1 -1
- package/dist/dev/runtime/hooks/base.d.mts +27 -0
- package/dist/dev/runtime/hooks/base.mjs +21 -32
- package/dist/dev/runtime/hooks/base.mjs.map +1 -1
- package/dist/dev/runtime/hooks/register.d.mts +30 -0
- package/dist/dev/runtime/hooks/vue.d.mts +52 -0
- package/dist/dev/runtime/hooks.d.mts +4 -0
- package/dist/dev/runtime/index.d.mts +46 -0
- package/dist/dev/runtime/inlineDataset.mjs +1 -2
- package/dist/dev/runtime/inlineDataset.mjs.map +1 -1
- package/dist/dev/runtime/intersectionObserver.d.mts +14 -0
- package/dist/dev/runtime/intersectionObserver.mjs +6 -6
- package/dist/dev/runtime/intersectionObserver.mjs.map +1 -1
- package/dist/dev/runtime/jsxIsland.d.mts +37 -0
- package/dist/dev/runtime/jsxIsland.mjs +16 -33
- package/dist/dev/runtime/jsxIsland.mjs.map +1 -1
- package/dist/dev/runtime/layoutBridge.d.mts +55 -0
- package/dist/dev/runtime/layoutBridge.mjs +32 -62
- package/dist/dev/runtime/layoutBridge.mjs.map +1 -1
- package/dist/dev/runtime/nativeBridge.mjs +1 -1
- package/dist/dev/runtime/nativeBridge.mjs.map +1 -1
- package/dist/dev/runtime/navigationLifecycle.mjs +24 -0
- package/dist/dev/runtime/navigationLifecycle.mjs.map +1 -0
- package/dist/dev/runtime/noSetData.d.mts +5 -0
- package/dist/dev/runtime/pageEnvironment.d.mts +50 -0
- package/dist/dev/runtime/pageEnvironment.mjs +15 -18
- package/dist/dev/runtime/pageEnvironment.mjs.map +1 -1
- package/dist/dev/runtime/pageLayout.d.mts +25 -0
- package/dist/dev/runtime/pageLayout.mjs +7 -11
- package/dist/dev/runtime/pageLayout.mjs.map +1 -1
- package/dist/dev/runtime/pageScroll.d.mts +29 -0
- package/dist/dev/runtime/pageScroll.mjs +2 -3
- package/dist/dev/runtime/pageScroll.mjs.map +1 -1
- package/dist/dev/runtime/platform/current.mjs +12 -0
- package/dist/dev/runtime/platform/current.mjs.map +1 -0
- package/dist/dev/runtime/platform/generic.mjs +36 -0
- package/dist/dev/runtime/platform/generic.mjs.map +1 -0
- package/dist/dev/runtime/platform/globals.mjs +29 -0
- package/dist/dev/runtime/platform/globals.mjs.map +1 -0
- package/dist/dev/runtime/platform.mjs +15 -60
- package/dist/dev/runtime/platform.mjs.map +1 -1
- package/dist/dev/runtime/provide.d.mts +60 -0
- package/dist/dev/runtime/provideContext.mjs +7 -9
- package/dist/dev/runtime/provideContext.mjs.map +1 -1
- package/dist/dev/runtime/provideStore.d.mts +7 -0
- package/dist/dev/runtime/publicRuntime.d.mts +22 -0
- package/dist/dev/runtime/publicRuntime.mjs +4 -0
- package/dist/dev/runtime/publicRuntime.mjs.map +1 -1
- package/dist/dev/runtime/pullDownRefresh.d.mts +12 -0
- package/dist/dev/runtime/pullDownRefresh.mjs +2 -4
- package/dist/dev/runtime/pullDownRefresh.mjs.map +1 -1
- package/dist/dev/runtime/register/app.d.mts +14 -0
- package/dist/dev/runtime/register/app.mjs +18 -19
- package/dist/dev/runtime/register/app.mjs.map +1 -1
- package/dist/dev/runtime/register/component/alipay.mjs +9 -18
- package/dist/dev/runtime/register/component/alipay.mjs.map +1 -1
- package/dist/dev/runtime/register/component/alipayRegistration.mjs +60 -0
- package/dist/dev/runtime/register/component/alipayRegistration.mjs.map +1 -0
- package/dist/dev/runtime/register/component/lifecycle/platform.mjs +8 -9
- package/dist/dev/runtime/register/component/lifecycle/platform.mjs.map +1 -1
- package/dist/dev/runtime/register/component/lifecycle.mjs +7 -12
- package/dist/dev/runtime/register/component/lifecycle.mjs.map +1 -1
- package/dist/dev/runtime/register/component/methods.mjs +13 -18
- package/dist/dev/runtime/register/component/methods.mjs.map +1 -1
- package/dist/dev/runtime/register/component/options.mjs +3 -4
- package/dist/dev/runtime/register/component/options.mjs.map +1 -1
- package/dist/dev/runtime/register/component/props.mjs +25 -31
- package/dist/dev/runtime/register/component/props.mjs.map +1 -1
- package/dist/dev/runtime/register/component/registerDefinition.mjs +18 -40
- package/dist/dev/runtime/register/component/registerDefinition.mjs.map +1 -1
- package/dist/dev/runtime/register/component/registerNativeDefinition.mjs +18 -60
- package/dist/dev/runtime/register/component/registerNativeDefinition.mjs.map +1 -1
- package/dist/dev/runtime/register/component.d.mts +17 -0
- package/dist/dev/runtime/register/component.mjs +3 -5
- package/dist/dev/runtime/register/component.mjs.map +1 -1
- package/dist/dev/runtime/register/inline.d.mts +15 -0
- package/dist/dev/runtime/register/inline.mjs +8 -10
- package/dist/dev/runtime/register/inline.mjs.map +1 -1
- package/dist/dev/runtime/register/runtimeInstance/methodBridge.mjs +7 -8
- package/dist/dev/runtime/register/runtimeInstance/methodBridge.mjs.map +1 -1
- package/dist/dev/runtime/register/runtimeInstance/provideContext.mjs +1 -1
- package/dist/dev/runtime/register/runtimeInstance/provideContext.mjs.map +1 -1
- package/dist/dev/runtime/register/runtimeInstance/setupContext.mjs +25 -34
- package/dist/dev/runtime/register/runtimeInstance/setupContext.mjs.map +1 -1
- package/dist/dev/runtime/register/runtimeInstance/setupPhase.mjs +6 -13
- package/dist/dev/runtime/register/runtimeInstance/setupPhase.mjs.map +1 -1
- package/dist/dev/runtime/register/runtimeInstance/setupSnapshot.mjs +2 -2
- package/dist/dev/runtime/register/runtimeInstance/setupSnapshot.mjs.map +1 -1
- package/dist/dev/runtime/register/runtimeInstance/utils.mjs +9 -9
- package/dist/dev/runtime/register/runtimeInstance/utils.mjs.map +1 -1
- package/dist/dev/runtime/register/runtimeInstance.d.mts +26 -0
- package/dist/dev/runtime/register/runtimeInstance.mjs +74 -100
- package/dist/dev/runtime/register/runtimeInstance.mjs.map +1 -1
- package/dist/dev/runtime/register/setDataFrequencyWarning.mjs +12 -15
- package/dist/dev/runtime/register/setDataFrequencyWarning.mjs.map +1 -1
- package/dist/dev/runtime/register/setup.d.mts +11 -0
- package/dist/dev/runtime/register/setup.mjs +2 -3
- package/dist/dev/runtime/register/setup.mjs.map +1 -1
- package/dist/dev/runtime/register/snapshot.mjs +1 -4
- package/dist/dev/runtime/register/snapshot.mjs.map +1 -1
- package/dist/dev/runtime/register/watch.d.mts +12 -0
- package/dist/dev/runtime/register/watch.mjs +3 -5
- package/dist/dev/runtime/register/watch.mjs.map +1 -1
- package/dist/dev/runtime/register.d.mts +5 -0
- package/dist/dev/runtime/scopedSlots.mjs +14 -21
- package/dist/dev/runtime/scopedSlots.mjs.map +1 -1
- package/dist/dev/runtime/selectorQuery.d.mts +54 -0
- package/dist/dev/runtime/selectorQuery.mjs +5 -9
- package/dist/dev/runtime/selectorQuery.mjs.map +1 -1
- package/dist/dev/runtime/template.d.mts +6 -0
- package/dist/dev/runtime/template.mjs +1 -1
- package/dist/dev/runtime/template.mjs.map +1 -1
- package/dist/dev/runtime/templateRefTypes.d.mts +12 -0
- package/dist/dev/runtime/templateRefs/helpers.mjs +14 -24
- package/dist/dev/runtime/templateRefs/helpers.mjs.map +1 -1
- package/dist/dev/runtime/templateRefs.mjs +8 -15
- package/dist/dev/runtime/templateRefs.mjs.map +1 -1
- package/dist/dev/runtime/types/core.d.mts +35 -0
- package/dist/dev/runtime/types/miniprogram.d.mts +84 -0
- package/dist/dev/runtime/types/miniprogramHost.d.mts +45 -0
- package/dist/dev/runtime/types/miniprogramHostSources.d.mts +112 -0
- package/dist/dev/runtime/types/options.d.mts +138 -0
- package/dist/dev/runtime/types/props/propTypes.d.mts +79 -0
- package/dist/dev/runtime/types/props/router.d.mts +51 -0
- package/dist/dev/runtime/types/props/setup.d.mts +96 -0
- package/dist/dev/runtime/types/props.d.mts +4 -0
- package/dist/dev/runtime/types/runtime.d.mts +59 -0
- package/dist/dev/runtime/types/setData.d.mts +237 -0
- package/dist/dev/runtime/types.d.mts +29 -0
- package/dist/dev/runtime/uniAppHost.d.mts +8 -0
- package/dist/dev/runtime/uniAppHost.mjs +6 -14
- package/dist/dev/runtime/uniAppHost.mjs.map +1 -1
- package/dist/dev/runtime/updatePerformance.d.mts +13 -0
- package/dist/dev/runtime/updatePerformance.mjs +1 -1
- package/dist/dev/runtime/updatePerformance.mjs.map +1 -1
- package/dist/dev/runtime/use.d.mts +13 -0
- package/dist/dev/runtime/use.mjs +1 -1
- package/dist/dev/runtime/use.mjs.map +1 -1
- package/dist/dev/runtime/vueCompat/context.d.mts +8 -0
- package/dist/dev/runtime/vueCompat/context.mjs +3 -5
- package/dist/dev/runtime/vueCompat/context.mjs.map +1 -1
- package/dist/dev/runtime/vueCompat/model.d.mts +30 -0
- package/dist/dev/runtime/vueCompat/model.mjs +9 -13
- package/dist/dev/runtime/vueCompat/model.mjs.map +1 -1
- package/dist/dev/runtime/vueCompat/router.d.mts +29 -0
- package/dist/dev/runtime/vueCompat/router.mjs +4 -4
- package/dist/dev/runtime/vueCompat/router.mjs.map +1 -1
- package/dist/dev/runtime/vueCompat/templateRef.d.mts +9 -0
- package/dist/dev/runtime/vueCompat/templateRef.mjs +1 -1
- package/dist/dev/runtime/vueCompat/templateRef.mjs.map +1 -1
- package/dist/dev/runtime/vueCompat.d.mts +5 -0
- package/dist/dev/scheduler.d.mts +4 -0
- package/dist/dev/scheduler.mjs +3 -4
- package/dist/dev/scheduler.mjs.map +1 -1
- package/dist/dev/store/base.mjs +1 -2
- package/dist/dev/store/base.mjs.map +1 -1
- package/dist/dev/store/define/create.mjs +11 -22
- package/dist/dev/store/define/create.mjs.map +1 -1
- package/dist/dev/store/define.d.mts +8 -0
- package/dist/dev/store/define.mjs +1 -1
- package/dist/dev/store/define.mjs.map +1 -1
- package/dist/dev/store/manager.d.mts +16 -0
- package/dist/dev/store/storeToRefs.d.mts +11 -0
- package/dist/dev/store/types.d.mts +106 -0
- package/dist/dev/store/view.mjs +1 -1
- package/dist/dev/store/view.mjs.map +1 -1
- package/dist/dev/store.d.mts +5 -0
- package/dist/dev/version.d.mts +4 -0
- package/dist/dev/vue-augment.d.mts +8 -0
- package/dist/dev/vue-demi.d.mts +87 -0
- package/dist/dev/vue-types.d.mts +19 -0
- package/dist/dev/web-apis.d.mts +3 -0
- package/dist/internal-runtime.d.mts +2 -1
- package/dist/internal-runtime.mjs +1 -1
- package/dist/package.mjs +1 -1
- package/dist/reactivity/asyncDerivation.mjs +1 -1
- package/dist/reactivity/core.mjs +1 -1
- package/dist/reactivity/reactive/patch.mjs +1 -1
- package/dist/reactivity/reactive/patchState.mjs +1 -1
- package/dist/reactivity/reactive/shared.mjs +1 -1
- package/dist/reactivity/reactive.mjs +1 -1
- package/dist/reactivity/ref.mjs +1 -1
- package/dist/reactivity/shallowRef.mjs +1 -1
- package/dist/reactivity/watch/helpers.mjs +1 -1
- package/dist/reactivity/watch.mjs +1 -1
- package/dist/router/createRouter.mjs +1 -1
- package/dist/router/initialNavigation.mjs +1 -1
- package/dist/router/instance.mjs +1 -1
- package/dist/router/navigationCore.mjs +1 -1
- package/dist/router/navigationResult.mjs +1 -1
- package/dist/router/navigationTarget.mjs +1 -1
- package/dist/router/resolve.mjs +1 -1
- package/dist/router/routeRegistry.mjs +1 -1
- package/dist/router/routeSync.mjs +1 -1
- package/dist/router/useRoute.mjs +1 -1
- package/dist/routerInternal/location.mjs +1 -1
- package/dist/routerInternal/params.mjs +1 -1
- package/dist/routerInternal/records.mjs +1 -1
- package/dist/routerInternal/recordsWarnings.mjs +1 -1
- package/dist/runtime/app/context.mjs +1 -1
- package/dist/runtime/app/diagnostics.mjs +1 -1
- package/dist/runtime/app/mount.mjs +1 -1
- package/dist/runtime/app/setData/commitTracker.mjs +1 -1
- package/dist/runtime/app/setData/patchScheduler.mjs +1 -1
- package/dist/runtime/app/setData/payload.mjs +1 -1
- package/dist/runtime/app/setData/scheduler.mjs +1 -1
- package/dist/runtime/app/setData/snapshot.mjs +1 -1
- package/dist/runtime/app/setDataOptions.mjs +1 -1
- package/dist/runtime/app.mjs +1 -1
- package/dist/runtime/bindingManifest.mjs +1 -1
- package/dist/runtime/capabilities.d.mts +4 -1
- package/dist/runtime/css.mjs +1 -1
- package/dist/runtime/defaults.mjs +1 -1
- package/dist/runtime/define/initialComputed.mjs +1 -1
- package/dist/runtime/define/options.mjs +1 -1
- 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.mjs +1 -1
- package/dist/runtime/diff.mjs +1 -1
- package/dist/runtime/disposables.mjs +1 -1
- package/dist/runtime/elementIntersectionObserver.mjs +1 -1
- package/dist/runtime/features/inlineEvents.mjs +1 -1
- package/dist/runtime/features/jsxIslands.d.mts +6 -0
- package/dist/runtime/features/jsxIslands.mjs +1 -0
- package/dist/runtime/features/layout.mjs +1 -1
- package/dist/runtime/features/publicLayout.mjs +1 -1
- package/dist/runtime/features/scopedSlots.mjs +1 -1
- package/dist/runtime/features/templateRefs.mjs +1 -1
- package/dist/runtime/hooks/base.mjs +1 -1
- package/dist/runtime/inlineDataset.mjs +1 -1
- package/dist/runtime/intersectionObserver.mjs +1 -1
- package/dist/runtime/jsxIsland.mjs +1 -1
- package/dist/runtime/layoutBridge.mjs +1 -1
- package/dist/runtime/nativeBridge.mjs +1 -1
- package/dist/runtime/navigationLifecycle.mjs +1 -0
- package/dist/runtime/pageEnvironment.mjs +1 -1
- package/dist/runtime/pageLayout.mjs +1 -1
- package/dist/runtime/pageScroll.mjs +1 -1
- package/dist/runtime/platform/current.mjs +1 -0
- package/dist/runtime/platform/generic.mjs +1 -0
- package/dist/runtime/platform/globals.mjs +1 -0
- package/dist/runtime/platform.mjs +1 -1
- package/dist/runtime/provideContext.mjs +1 -1
- package/dist/runtime/publicRuntime.mjs +1 -1
- package/dist/runtime/pullDownRefresh.mjs +1 -1
- package/dist/runtime/register/app.mjs +1 -1
- package/dist/runtime/register/component/alipay.mjs +1 -1
- package/dist/runtime/register/component/alipayRegistration.mjs +1 -0
- package/dist/runtime/register/component/lifecycle/platform.mjs +1 -1
- package/dist/runtime/register/component/lifecycle.mjs +1 -1
- package/dist/runtime/register/component/methods.mjs +1 -1
- package/dist/runtime/register/component/options.mjs +1 -1
- package/dist/runtime/register/component/props.mjs +1 -1
- package/dist/runtime/register/component/registerDefinition.mjs +1 -1
- package/dist/runtime/register/component/registerNativeDefinition.mjs +1 -1
- package/dist/runtime/register/component.mjs +1 -1
- package/dist/runtime/register/inline.mjs +1 -1
- package/dist/runtime/register/runtimeInstance/methodBridge.mjs +1 -1
- package/dist/runtime/register/runtimeInstance/provideContext.mjs +1 -1
- package/dist/runtime/register/runtimeInstance/setupContext.mjs +1 -1
- package/dist/runtime/register/runtimeInstance/setupPhase.mjs +1 -1
- package/dist/runtime/register/runtimeInstance/setupSnapshot.mjs +1 -1
- package/dist/runtime/register/runtimeInstance/utils.mjs +1 -1
- package/dist/runtime/register/runtimeInstance.mjs +1 -1
- package/dist/runtime/register/setDataFrequencyWarning.mjs +1 -1
- package/dist/runtime/register/setup.mjs +1 -1
- package/dist/runtime/register/snapshot.mjs +1 -1
- package/dist/runtime/register/watch.mjs +1 -1
- package/dist/runtime/scopedSlots.mjs +1 -1
- package/dist/runtime/selectorQuery.mjs +1 -1
- package/dist/runtime/template.mjs +1 -1
- package/dist/runtime/templateRefs/helpers.mjs +1 -1
- package/dist/runtime/templateRefs.mjs +1 -1
- package/dist/runtime/uniAppHost.mjs +1 -1
- package/dist/runtime/updatePerformance.mjs +1 -1
- package/dist/runtime/use.mjs +1 -1
- package/dist/runtime/vueCompat/context.mjs +1 -1
- package/dist/runtime/vueCompat/model.mjs +1 -1
- package/dist/runtime/vueCompat/router.mjs +1 -1
- package/dist/runtime/vueCompat/templateRef.mjs +1 -1
- package/dist/scheduler.mjs +1 -1
- package/dist/store/base.mjs +1 -1
- package/dist/store/define/create.mjs +1 -1
- package/dist/store/define.mjs +1 -1
- package/dist/store/view.mjs +1 -1
- package/package.json +7 -7
- /package/dist/_virtual/{_@oxc-project_runtime@0.150.0 → _@oxc-project_runtime@0.151.0}/helpers/esm/defineProperty.mjs +0 -0
- /package/dist/_virtual/{_@oxc-project_runtime@0.150.0 → _@oxc-project_runtime@0.151.0}/helpers/esm/toPrimitive.mjs +0 -0
- /package/dist/_virtual/{_@oxc-project_runtime@0.150.0 → _@oxc-project_runtime@0.151.0}/helpers/esm/toPropertyKey.mjs +0 -0
- /package/dist/_virtual/{_@oxc-project_runtime@0.150.0 → _@oxc-project_runtime@0.151.0}/helpers/esm/typeof.mjs +0 -0
package/README.md
CHANGED
|
@@ -184,6 +184,12 @@ const onActiveChange = bindModel.model<boolean>('isActive').onChange
|
|
|
184
184
|
|
|
185
185
|
## 开发产物与源码调试
|
|
186
186
|
|
|
187
|
+
使用 weapp-vite 构建时,现有 `--platform` / `weapp.platform` 会自动注入编译期常量 `import.meta.env.PLATFORM`,取值为 `weapp`、`alipay`、`tt`、`swan`、`jd`、`xhs` 或 `web`。Wevu 发布包保留平台表达式,消费构建替换后即可移除非目标平台分支及构建、IDE 等元数据,无需额外裁剪配置。
|
|
188
|
+
|
|
189
|
+
能力裁剪取决于实际使用:继续从 `wevu` 使用具名导入,未使用的 Store、router 和 API/fetch 不会因根入口导出而强制进入产物。SFC / JSX 编译器根据 Binding Manifest 安装所需能力;普通 SFC 不依赖 JSX island 处理器,没有创建 router 时不加载首航 guard 状态机。公开动态工厂仍保留兼容能力安装,不能把编译器精简入口的测量值当成任意动态工厂的体积承诺。
|
|
190
|
+
|
|
191
|
+
直接在其他工具链中使用时,未提供构建目标会保留宿主探测;显式使用 API/fetch 后,其动态跨平台 adapter 仍保留。Web 继续使用自己的宿主桥接,不等同于 Vue DOM runtime,也不表示已支持原生 App 渲染。
|
|
192
|
+
|
|
187
193
|
`wevu` 默认导出压缩后的生产产物,用于降低小程序包体积。包内同时提供未压缩并带 sourcemap 的开发产物:
|
|
188
194
|
|
|
189
195
|
- 支持 `development` export condition 的构建器会在开发模式下优先解析到 `dist/dev/*`。
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import toPropertyKey from "./toPropertyKey.mjs";
|
|
2
2
|
|
|
3
|
-
//#region \0@oxc-project+runtime@0.
|
|
3
|
+
//#region \0@oxc-project+runtime@0.151.0/helpers/esm/defineProperty.js
|
|
4
4
|
function _defineProperty(e, r, t) {
|
|
5
5
|
return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
6
6
|
value: t,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _typeof from "./typeof.mjs";
|
|
2
2
|
|
|
3
|
-
//#region \0@oxc-project+runtime@0.
|
|
3
|
+
//#region \0@oxc-project+runtime@0.151.0/helpers/esm/toPrimitive.js
|
|
4
4
|
function toPrimitive(t, r) {
|
|
5
5
|
if ("object" != _typeof(t) || !t) return t;
|
|
6
6
|
var e = t[Symbol.toPrimitive];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _typeof from "./typeof.mjs";
|
|
2
2
|
import toPrimitive from "./toPrimitive.mjs";
|
|
3
3
|
|
|
4
|
-
//#region \0@oxc-project+runtime@0.
|
|
4
|
+
//#region \0@oxc-project+runtime@0.151.0/helpers/esm/toPropertyKey.js
|
|
5
5
|
function toPropertyKey(t) {
|
|
6
6
|
var i = toPrimitive(t, "string");
|
|
7
7
|
return "symbol" == _typeof(i) ? i : i + "";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region \0@oxc-project+runtime@0.
|
|
1
|
+
//#region \0@oxc-project+runtime@0.151.0/helpers/esm/typeof.js
|
|
2
2
|
function _typeof(o) {
|
|
3
3
|
"@babel/helpers - typeof";
|
|
4
4
|
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "@wevu/api/vitest";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "@wevu/api";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "@wevu/compiler";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { WeapiMiniProgramRequestMethod } from "@wevu/api";
|
|
2
|
+
import { RequestGlobalsFetchInit as WevuFetchInit, fetch } from "@wevu/web-apis/fetch";
|
|
3
|
+
//#region src/fetch.d.ts
|
|
4
|
+
export type WevuFetchInput = Parameters<typeof import('@wevu/web-apis/fetch').fetch>[0];
|
|
5
|
+
export type MiniProgramRequestMethod = WeapiMiniProgramRequestMethod;
|
|
6
|
+
export type WxRequestMethod = MiniProgramRequestMethod;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { type WevuFetchInit, fetch };
|
|
9
|
+
//# sourceMappingURL=fetch.d.mts.map
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { AlipayMiniProgramHostNamespace, AlipayMiniProgramHostSourceContract, DefaultMiniProgramHostNamespace, DefaultMiniProgramHostSourceContract, DouyinMiniProgramHostNamespace, DouyinMiniProgramHostSourceContract, MiniProgramHostNamespace, MiniProgramHostNamespaceBySource, MiniProgramHostSourceName, MiniProgramHostSourceRegistry, MiniProgramPlatformHostNamespaceBySource, MiniProgramPlatformHostSourceName, MiniProgramPlatformHostSourceRegistry, MiniProgramRuntimeHostNamespaceBySource, MiniProgramRuntimeHostSourceName, MiniProgramRuntimeHostSourceRegistry, TtMiniProgramHostNamespace, TtMiniProgramHostSourceContract, WechatMiniProgramHostNamespace, WechatMiniProgramHostSourceContract } from "./runtime/types/miniprogramHostSources.mjs";
|
|
2
|
+
import { HostMiniProgramAddToFavoritesOption, HostMiniProgramAppOptions, HostMiniProgramAppTrivialInstance, HostMiniProgramBehaviorIdentifier, HostMiniProgramBoundingClientRectResult, HostMiniProgramComponentAllFullProperty, HostMiniProgramComponentAllProperty, HostMiniProgramComponentBehaviorOptions, HostMiniProgramComponentEmptyArray, HostMiniProgramComponentInstance, HostMiniProgramComponentMethodOption, HostMiniProgramComponentPropertyOption, HostMiniProgramComponentPropertyValue, HostMiniProgramComponentShortProperty, HostMiniProgramComponentTrivialInstance, HostMiniProgramComponentTrivialOption, HostMiniProgramIntersectionObserver, HostMiniProgramIntersectionObserverOptions, HostMiniProgramLaunchOptions, HostMiniProgramMemoryWarningResult, HostMiniProgramNavigateToOption, HostMiniProgramNodesRef, HostMiniProgramNodesRefFields, HostMiniProgramPageLifetime, HostMiniProgramPageNotFoundOptions, HostMiniProgramPageResizeOption, HostMiniProgramPageScrollOption, HostMiniProgramPageTrivialInstance, HostMiniProgramReLaunchOption, HostMiniProgramRedirectToOption, HostMiniProgramRouter, HostMiniProgramSaveExitState, HostMiniProgramScrollOffsetResult, HostMiniProgramSelectorQuery, HostMiniProgramShareAppMessageOption, HostMiniProgramSwitchTabOption, HostMiniProgramTabItemTapOption, HostMiniProgramThemeChangeResult, HostMiniProgramTriggerEventOptions, HostMiniProgramUnhandledRejectionResult } from "./runtime/types/miniprogramHost.mjs";
|
|
3
|
+
import { MiniProgramAdapter, MiniProgramAppOptions, MiniProgramBehaviorIdentifier, MiniProgramComponentInstance, MiniProgramComponentOptions, MiniProgramComponentPropertyValue, MiniProgramComponentRawOptions, MiniProgramInstance, MiniProgramPageLifetimes } from "./runtime/types/miniprogram.mjs";
|
|
4
|
+
import { ComponentPropsOptions, ExtractDefaultPropTypes, ExtractPropTypes, ExtractPublicPropTypes, InferNativePropType, InferNativeProps, InferPropType, InferProps, NativePropType, NativePropsOptions, NativeTypeHint, NativeTypedProperty, PropConstructor, PropOptions, PropType } from "./runtime/types/props/propTypes.mjs";
|
|
5
|
+
import { MiniProgramRouterNavigateToOption, MiniProgramRouterReLaunchOption, MiniProgramRouterRedirectToOption, MiniProgramRouterSwitchTabOption, SetupContextRouter, WevuTypedRouterRouteMap } from "./runtime/types/props/router.mjs";
|
|
6
|
+
import { AsyncDerivation, AsyncDerivationContext, AsyncDerivationState, AsyncDerivationStatus, UseAsyncDerivationOptions, useAsyncDerivation } from "./reactivity/asyncDerivation.mjs";
|
|
7
|
+
import { CustomRefFactory, CustomRefOptions, CustomRefSource, MaybeRef, MaybeRefOrGetter, Ref, ShallowRef, customRef, isRef, ref, toValue, unref } from "./reactivity/ref.mjs";
|
|
8
|
+
import { ComputedGetter, ComputedRef, ComputedSetter, WritableComputedOptions, WritableComputedRef, computed } from "./reactivity/computed.mjs";
|
|
9
|
+
import { nextTick } from "./scheduler.mjs";
|
|
10
|
+
import { EffectScope, batch, effect, effectScope, endBatch, getCurrentScope, onScopeDispose, startBatch, stop } from "./reactivity/core.mjs";
|
|
11
|
+
import { MutationKind, MutationOp, MutationRecord, addMutationRecorder, removeMutationRecorder } from "./reactivity/reactive/mutation.mjs";
|
|
12
|
+
import { PrelinkReactiveTreeOptions, prelinkReactiveTree, touchReactive } from "./reactivity/reactive/patch.mjs";
|
|
13
|
+
import { isShallowReactive, shallowReactive } from "./reactivity/reactive/shallow.mjs";
|
|
14
|
+
import { toRaw } from "./reactivity/reactive/shared.mjs";
|
|
15
|
+
import { getReactiveVersion, isRaw, isReactive, markRaw, reactive } from "./reactivity/reactive.mjs";
|
|
16
|
+
import { isProxy, isReadonly, readonly, shallowReadonly } from "./reactivity/readonly.mjs";
|
|
17
|
+
import { isShallowRef, shallowRef, triggerRef } from "./reactivity/shallowRef.mjs";
|
|
18
|
+
import { ToRefs, toRef, toRefs } from "./reactivity/toRefs.mjs";
|
|
19
|
+
import { traverse } from "./reactivity/traverse.mjs";
|
|
20
|
+
import { MapSources, MaybeUndefined, MultiWatchSources, OnCleanup, WatchCallback, WatchEffect, WatchEffectOptions, WatchMultiSources, WatchOptions, WatchScheduler, WatchSource, WatchSourceValue, WatchSources, WatchStopHandle, getDeepWatchStrategy, setDeepWatchStrategy } from "./reactivity/watch/types.mjs";
|
|
21
|
+
import { watch, watchEffect, watchPostEffect, watchSyncEffect } from "./reactivity/watch.mjs";
|
|
22
|
+
import "./reactivity/index.mjs";
|
|
23
|
+
import { ComponentPublicInstance, ComputedDefinitions, ExtractComputed, ExtractMethods, MethodDefinitions, ModelBinding, ModelBindingOptions, ModelBindingPayload } from "./runtime/types/core.mjs";
|
|
24
|
+
import { AppConfig, InternalRuntimeState, InternalRuntimeStateFields, RuntimeApp, RuntimeInstance, WevuPlugin } from "./runtime/types/runtime.mjs";
|
|
25
|
+
import { SetupContext, SetupContextIntersectionObserver, SetupContextIntersectionObserverOptions, SetupContextNativeInstance, SetupContextSelectorQuery, SetupFunction } from "./runtime/types/props/setup.mjs";
|
|
26
|
+
import { AllowedComponentProps, ComponentCustomProps, ComponentOptionsMixin, DefineComponent, NativeComponent, ObjectDirective, PublicProps, ShallowUnwrapRef, VNode, VNodeProps } from "./vue-types.mjs";
|
|
27
|
+
import { SetDataBindingDiagnostic, SetDataDebugInfo, SetDataSnapshotOptions } from "./runtime/types/setData.mjs";
|
|
28
|
+
import { CreateAppOptions, DataOption, DefineAppOptions, DefineComponentOptions, PageFeatures } from "./runtime/types/options.mjs";
|
|
29
|
+
import { GlobalComponents, GlobalDirectives, MiniProgramTemplateRefValue, TemplateRefValue, TemplateRefs, WevuGlobalComponents, WevuGlobalDirectives } from "./runtime/types.mjs";
|
|
30
|
+
import "./runtime/templateRefTypes.mjs";
|
|
31
|
+
import "./vue-augment.mjs";
|
|
32
|
+
import { useCssModule } from "./runtime/css.mjs";
|
|
33
|
+
import { WevuDefaults, resetWevuDefaults } from "./runtime/defaults.mjs";
|
|
34
|
+
import { ComponentDefinition, DefineComponentTypePropsOptions, DefineComponentWithTypeProps, SetupContextWithTypeProps, SetupFunctionWithTypeProps, WevuComponentConstructor, WevuDefinedComponent } from "./runtime/define.mjs";
|
|
35
|
+
import { DisposableBag, DisposableLike, DisposableMethodName, DisposableObject, useDisposables } from "./runtime/disposables.mjs";
|
|
36
|
+
import { ElementIntersectionObserverCallback, UseElementIntersectionObserverOptions, UseElementIntersectionObserverReturn, useElementIntersectionObserver } from "./runtime/elementIntersectionObserver.mjs";
|
|
37
|
+
import { PageLayoutState, WevuPageLayoutMap } from "./runtime/pageLayout.mjs";
|
|
38
|
+
import { LayoutHostBinding } from "./runtime/capabilities.mjs";
|
|
39
|
+
import { LayoutBridgeInstance } from "./runtime/layoutBridge.mjs";
|
|
40
|
+
import { registerPageLayoutBridge, registerRuntimeLayoutHosts, resolveLayoutBridge, resolveLayoutHost, resolveRuntimePageLayoutName, setPageLayout, syncRuntimePageLayoutState, syncRuntimePageLayoutStateFromRuntime, unregisterPageLayoutBridge, unregisterRuntimeLayoutHosts, useLayoutBridge, useLayoutHosts, usePageLayout, waitForLayoutHost } from "./runtime/features/publicLayout.mjs";
|
|
41
|
+
import { callHookList, callHookReturn, getCurrentInstance, getCurrentSetupContext, setCurrentInstance, setCurrentSetupContext } from "./runtime/hooks/base.mjs";
|
|
42
|
+
import { onAddToFavorites, onAttached, onDetached, onError, onHide, onLaunch, onLoad, onMemoryWarning, onMoved, onPageNotFound, onPageScroll, onPullDownRefresh, onReachBottom, onReady, onResize, onRouteDone, onSaveExitState, onShareAppMessage, onShareTimeline, onShow, onTabItemTap, onThemeChange, onUnhandledRejection, onUnload } from "./runtime/hooks/register.mjs";
|
|
43
|
+
import { callUpdateHooks, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onServerPrefetch, onUnmounted, onUpdated } from "./runtime/hooks/vue.mjs";
|
|
44
|
+
import { UseIntersectionObserverOptions, UseIntersectionObserverResult, useIntersectionObserver } from "./runtime/intersectionObserver.mjs";
|
|
45
|
+
import { isNoSetData, markNoSetData } from "./runtime/noSetData.mjs";
|
|
46
|
+
import { NavigationBarMetrics, PageStackSnapshot, UseNavigationBarMetricsOptions, UsePageStackOptions, getCurrentPageStackSnapshot, getNavigationBarMetrics, useNavigationBarMetrics, usePageStack } from "./runtime/pageEnvironment.mjs";
|
|
47
|
+
import { UsePageScrollThrottleOptions, UsePageScrollThrottleStopHandle, usePageScrollThrottle } from "./runtime/pageScroll.mjs";
|
|
48
|
+
import { setGlobalProvidedValue } from "./runtime/provideStore.mjs";
|
|
49
|
+
import { hasInjectionContext, inject, injectGlobal, provide, provideGlobal } from "./runtime/provide.mjs";
|
|
50
|
+
import { setRuntimeSetDataVisibility, teardownRuntimeInstance } from "./runtime/register/runtimeInstance.mjs";
|
|
51
|
+
import { runSetupFunction } from "./runtime/register/setup.mjs";
|
|
52
|
+
import { createApp, createWevuComponent, createWevuScopedSlotComponent, defineComponent, mountRuntimeInstance, registerApp, registerComponent, setWevuDefaults } from "./runtime/publicRuntime.mjs";
|
|
53
|
+
import { PullDownRefreshHandler, UseAsyncPullDownRefreshOptions, useAsyncPullDownRefresh } from "./runtime/pullDownRefresh.mjs";
|
|
54
|
+
import { UseAllBoundingClientRectOptions, UseAllScrollOffsetOptions, UseAllSelectorFieldsOptions, UseBoundingClientRectOptions, UseScrollOffsetOptions, UseSelectorFieldsOptions, UseSelectorQueryOptions, useBoundingClientRect, useScrollOffset, useSelectorFields, useSelectorQuery } from "./runtime/selectorQuery.mjs";
|
|
55
|
+
import { normalizeClass, normalizeStyle, resolvePropValue } from "./runtime/template.mjs";
|
|
56
|
+
import { UpdatePerformanceListener, UpdatePerformanceListenerResult, UseUpdatePerformanceListenerStopHandle, useUpdatePerformanceListener } from "./runtime/updatePerformance.mjs";
|
|
57
|
+
import { defineAppSetup, use } from "./runtime/use.mjs";
|
|
58
|
+
import { useAttrs, useNativeInstance, useSlots } from "./runtime/vueCompat/context.mjs";
|
|
59
|
+
import { ModelModifiers, UseModelOptions, mergeModels, useBindModel, useChangeModel, useModel } from "./runtime/vueCompat/model.mjs";
|
|
60
|
+
import { useNativePageRouter, useNativeRouter } from "./runtime/vueCompat/router.mjs";
|
|
61
|
+
import { TemplateRef, useTemplateRef } from "./runtime/vueCompat/templateRef.mjs";
|
|
62
|
+
import "./runtime/index.mjs";
|
|
63
|
+
import { ComponentTypeEmits, EmitFn, EmitsOptions } from "./macros/shared.mjs";
|
|
64
|
+
import { DefineModelModifiers, DefineModelTransformOptions, ModelRef, PageLayoutMeta, PageMeta, defineEmits, defineExpose, defineModel, defineOptions, definePageMeta, defineProps, defineSlots, withDefaults } from "./macros.mjs";
|
|
65
|
+
import { ActionContext, ActionSubscriber, DefineStoreOptions, MutationType, Pinia, PiniaCustomProperties, PiniaCustomStateProperties, PiniaPlugin, PiniaPluginContext, StateTree, StoreActions, StoreDefinition, StoreGeneric, StoreManager, StoreState, StoreSubscribeOptions, SubscriptionCallback, SubscriptionCallbackMutation } from "./store/types.mjs";
|
|
66
|
+
import { defineStore } from "./store/define.mjs";
|
|
67
|
+
import { createPinia, createStore, disposePinia, getActivePinia, setActivePinia } from "./store/manager.mjs";
|
|
68
|
+
import { StoreToRefsResult, storeToRefs } from "./store/storeToRefs.mjs";
|
|
69
|
+
import "./store.mjs";
|
|
70
|
+
import { version } from "./version.mjs";
|
|
71
|
+
export * from "@wevu/web-apis";
|
|
72
|
+
export { type ActionContext, type ActionSubscriber, type AlipayMiniProgramHostNamespace, type AlipayMiniProgramHostSourceContract, type AllowedComponentProps, type AppConfig, type AsyncDerivation, type AsyncDerivationContext, type AsyncDerivationState, type AsyncDerivationStatus, type ComponentCustomProps, type ComponentDefinition, type ComponentOptionsMixin, type ComponentPropsOptions, type ComponentPublicInstance, type ComponentTypeEmits, type ComputedDefinitions, type ComputedGetter, type ComputedRef, type ComputedSetter, type CreateAppOptions, type CustomRefFactory, type CustomRefOptions, type CustomRefSource, type DataOption, type DefaultMiniProgramHostNamespace, type DefaultMiniProgramHostSourceContract, type DefineAppOptions, type DefineComponent, type DefineComponentOptions, type DefineComponentTypePropsOptions, type DefineComponentWithTypeProps, DefineModelModifiers, DefineModelTransformOptions, type DefineStoreOptions, DisposableBag, DisposableLike, DisposableMethodName, DisposableObject, type DouyinMiniProgramHostNamespace, type DouyinMiniProgramHostSourceContract, type EffectScope, ElementIntersectionObserverCallback, type EmitFn, type EmitsOptions, type ExtractComputed, type ExtractDefaultPropTypes, type ExtractMethods, type ExtractPropTypes, type ExtractPublicPropTypes, GlobalComponents, GlobalDirectives, type HostMiniProgramAddToFavoritesOption, type HostMiniProgramAppOptions, type HostMiniProgramAppTrivialInstance, type HostMiniProgramBehaviorIdentifier, type HostMiniProgramBoundingClientRectResult, type HostMiniProgramComponentAllFullProperty, type HostMiniProgramComponentAllProperty, type HostMiniProgramComponentBehaviorOptions, type HostMiniProgramComponentEmptyArray, type HostMiniProgramComponentInstance, type HostMiniProgramComponentMethodOption, type HostMiniProgramComponentPropertyOption, type HostMiniProgramComponentPropertyValue, type HostMiniProgramComponentShortProperty, type HostMiniProgramComponentTrivialInstance, type HostMiniProgramComponentTrivialOption, type HostMiniProgramIntersectionObserver, type HostMiniProgramIntersectionObserverOptions, type HostMiniProgramLaunchOptions, type HostMiniProgramMemoryWarningResult, type HostMiniProgramNavigateToOption, type HostMiniProgramNodesRef, type HostMiniProgramNodesRefFields, type HostMiniProgramPageLifetime, type HostMiniProgramPageNotFoundOptions, type HostMiniProgramPageResizeOption, type HostMiniProgramPageScrollOption, type HostMiniProgramPageTrivialInstance, type HostMiniProgramReLaunchOption, type HostMiniProgramRedirectToOption, type HostMiniProgramRouter, type HostMiniProgramSaveExitState, type HostMiniProgramScrollOffsetResult, type HostMiniProgramSelectorQuery, type HostMiniProgramShareAppMessageOption, type HostMiniProgramSwitchTabOption, type HostMiniProgramTabItemTapOption, type HostMiniProgramThemeChangeResult, type HostMiniProgramTriggerEventOptions, type HostMiniProgramUnhandledRejectionResult, type InferNativePropType, type InferNativeProps, type InferPropType, type InferProps, type InternalRuntimeState, type InternalRuntimeStateFields, type LayoutBridgeInstance, type LayoutHostBinding, type MapSources, type MaybeRef, type MaybeRefOrGetter, type MaybeUndefined, type MethodDefinitions, type MiniProgramAdapter, type HostMiniProgramAddToFavoritesOption as MiniProgramAddToFavoritesOption, type MiniProgramAppOptions, type MiniProgramBehaviorIdentifier, type HostMiniProgramBoundingClientRectResult as MiniProgramBoundingClientRectResult, type HostMiniProgramComponentAllFullProperty as MiniProgramComponentAllFullProperty, type HostMiniProgramComponentAllProperty as MiniProgramComponentAllProperty, type HostMiniProgramComponentBehaviorOptions as MiniProgramComponentBehaviorOptions, type HostMiniProgramComponentEmptyArray as MiniProgramComponentEmptyArray, type MiniProgramComponentInstance, type HostMiniProgramComponentMethodOption as MiniProgramComponentMethodOption, type MiniProgramComponentOptions, type HostMiniProgramComponentPropertyOption as MiniProgramComponentPropertyOption, type MiniProgramComponentPropertyValue, type MiniProgramComponentRawOptions, type HostMiniProgramComponentShortProperty as MiniProgramComponentShortProperty, type MiniProgramHostNamespace, type MiniProgramHostNamespaceBySource, type MiniProgramHostSourceName, type MiniProgramHostSourceRegistry, type MiniProgramInstance, type HostMiniProgramIntersectionObserver as MiniProgramIntersectionObserver, type HostMiniProgramIntersectionObserverOptions as MiniProgramIntersectionObserverOptions, type HostMiniProgramLaunchOptions as MiniProgramLaunchOptions, type HostMiniProgramMemoryWarningResult as MiniProgramMemoryWarningResult, type HostMiniProgramNavigateToOption as MiniProgramNavigateToOption, type HostMiniProgramNodesRef as MiniProgramNodesRef, type HostMiniProgramNodesRefFields as MiniProgramNodesRefFields, type HostMiniProgramPageLifetime as MiniProgramPageLifetime, type MiniProgramPageLifetimes, type HostMiniProgramPageNotFoundOptions as MiniProgramPageNotFoundOptions, type HostMiniProgramPageResizeOption as MiniProgramPageResizeOption, type HostMiniProgramPageScrollOption as MiniProgramPageScrollOption, type MiniProgramPlatformHostNamespaceBySource, type MiniProgramPlatformHostSourceName, type MiniProgramPlatformHostSourceRegistry, type HostMiniProgramReLaunchOption as MiniProgramReLaunchOption, type HostMiniProgramRedirectToOption as MiniProgramRedirectToOption, type HostMiniProgramRouter as MiniProgramRouter, type MiniProgramRouterNavigateToOption, type MiniProgramRouterReLaunchOption, type MiniProgramRouterRedirectToOption, type MiniProgramRouterSwitchTabOption, type MiniProgramRuntimeHostNamespaceBySource, type MiniProgramRuntimeHostSourceName, type MiniProgramRuntimeHostSourceRegistry, type HostMiniProgramSaveExitState as MiniProgramSaveExitState, type HostMiniProgramScrollOffsetResult as MiniProgramScrollOffsetResult, type HostMiniProgramSelectorQuery as MiniProgramSelectorQuery, type HostMiniProgramShareAppMessageOption as MiniProgramShareAppMessageOption, type HostMiniProgramSwitchTabOption as MiniProgramSwitchTabOption, type HostMiniProgramTabItemTapOption as MiniProgramTabItemTapOption, MiniProgramTemplateRefValue, type HostMiniProgramThemeChangeResult as MiniProgramThemeChangeResult, type HostMiniProgramUnhandledRejectionResult as MiniProgramUnhandledRejectionResult, type ModelBinding, type ModelBindingOptions, type ModelBindingPayload, type ModelModifiers, ModelRef, type MultiWatchSources, type MutationKind, type MutationOp, type MutationRecord, MutationType, type NativeComponent, type NativePropType, type NativePropsOptions, type NativeTypeHint, type NativeTypedProperty, NavigationBarMetrics, type ObjectDirective, type OnCleanup, type PageFeatures, PageLayoutMeta, type PageLayoutState, PageMeta, PageStackSnapshot, type Pinia, type PiniaCustomProperties, type PiniaCustomStateProperties, type PiniaPlugin, type PiniaPluginContext, type PrelinkReactiveTreeOptions, type PropConstructor, type PropOptions, type PropType, type PublicProps, PullDownRefreshHandler, type Ref, type RuntimeApp, type RuntimeInstance, type SetDataBindingDiagnostic, type SetDataDebugInfo, type SetDataSnapshotOptions, type SetupContext, type SetupContextIntersectionObserver, type SetupContextIntersectionObserverOptions, type SetupContextNativeInstance, type SetupContextRouter, type SetupContextSelectorQuery, type SetupContextWithTypeProps, type SetupFunction, type SetupFunctionWithTypeProps, type ShallowRef, type ShallowUnwrapRef, type StateTree, type StoreActions, type StoreDefinition, type StoreGeneric, type StoreManager, type StoreState, type StoreSubscribeOptions, type StoreToRefsResult, type SubscriptionCallback, type SubscriptionCallbackMutation, type TemplateRef, TemplateRefValue, TemplateRefs, type ToRefs, type HostMiniProgramTriggerEventOptions as TriggerEventOptions, type TtMiniProgramHostNamespace, type TtMiniProgramHostSourceContract, UpdatePerformanceListener, UpdatePerformanceListenerResult, UseAllBoundingClientRectOptions, UseAllScrollOffsetOptions, UseAllSelectorFieldsOptions, type UseAsyncDerivationOptions, UseAsyncPullDownRefreshOptions, UseBoundingClientRectOptions, UseElementIntersectionObserverOptions, UseElementIntersectionObserverReturn, UseIntersectionObserverOptions, UseIntersectionObserverResult, type UseModelOptions, UseNavigationBarMetricsOptions, UsePageScrollThrottleOptions, UsePageScrollThrottleStopHandle, UsePageStackOptions, UseScrollOffsetOptions, UseSelectorFieldsOptions, UseSelectorQueryOptions, UseUpdatePerformanceListenerStopHandle, type VNode, type VNodeProps, type WatchCallback, type WatchEffect, type WatchEffectOptions, type WatchMultiSources, type WatchOptions, type WatchScheduler, type WatchSource, type WatchSourceValue, type WatchSources, type WatchStopHandle, type WechatMiniProgramHostNamespace, type WechatMiniProgramHostSourceContract, type WevuComponentConstructor, type WevuDefaults, type WevuDefinedComponent, WevuGlobalComponents, WevuGlobalDirectives, type WevuPageLayoutMap, type WevuPlugin, type WevuTypedRouterRouteMap, type WritableComputedOptions, type WritableComputedRef, addMutationRecorder, batch, callHookList, callHookReturn, callUpdateHooks, computed, createApp, createPinia, createStore, createWevuComponent, createWevuScopedSlotComponent, customRef, defineAppSetup, defineComponent, defineEmits, defineExpose, defineModel, defineOptions, definePageMeta, defineProps, defineSlots, defineStore, disposePinia, effect, effectScope, endBatch, getActivePinia, getCurrentInstance, getCurrentPageStackSnapshot, getCurrentScope, getCurrentSetupContext, getDeepWatchStrategy, getNavigationBarMetrics, getReactiveVersion, hasInjectionContext, inject, injectGlobal, isNoSetData, isProxy, isRaw, isReactive, isReadonly, isRef, isShallowReactive, isShallowRef, markNoSetData, markRaw, mergeModels, mountRuntimeInstance, nextTick, normalizeClass, normalizeStyle, onActivated, onAddToFavorites, onAttached, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onDetached, onError, onErrorCaptured, onHide, onLaunch, onLoad, onMemoryWarning, onMounted, onMoved, onPageNotFound, onPageScroll, onPullDownRefresh, onReachBottom, onReady, onResize, onRouteDone, onSaveExitState, onScopeDispose, onServerPrefetch, onShareAppMessage, onShareTimeline, onShow, onTabItemTap, onThemeChange, onUnhandledRejection, onUnload, onUnmounted, onUpdated, prelinkReactiveTree, provide, provideGlobal, reactive, readonly, ref, registerApp, registerComponent, registerPageLayoutBridge, registerRuntimeLayoutHosts, removeMutationRecorder, resetWevuDefaults, resolveLayoutBridge, resolveLayoutHost, resolvePropValue, resolveRuntimePageLayoutName, runSetupFunction, setActivePinia, setCurrentInstance, setCurrentSetupContext, setDeepWatchStrategy, setGlobalProvidedValue, setPageLayout, setRuntimeSetDataVisibility, setWevuDefaults, shallowReactive, shallowReadonly, shallowRef, startBatch, stop, storeToRefs, syncRuntimePageLayoutState, syncRuntimePageLayoutStateFromRuntime, teardownRuntimeInstance, toRaw, toRef, toRefs, toValue, touchReactive, traverse, triggerRef, unref, unregisterPageLayoutBridge, unregisterRuntimeLayoutHosts, use, useAsyncDerivation, useAsyncPullDownRefresh, useAttrs, useBindModel, useBoundingClientRect, useChangeModel, useCssModule, useDisposables, useElementIntersectionObserver, useIntersectionObserver, useLayoutBridge, useLayoutHosts, useModel, useNativeInstance, useNativePageRouter, useNativeRouter, useNavigationBarMetrics, usePageLayout, usePageScrollThrottle, usePageStack, useScrollOffset, useSelectorFields, useSelectorQuery, useSlots, useTemplateRef, useUpdatePerformanceListener, version, waitForLayoutHost, watch, watchEffect, watchPostEffect, watchSyncEffect, withDefaults };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { AsyncDerivation, AsyncDerivationContext, AsyncDerivationState, AsyncDerivationStatus, UseAsyncDerivationOptions, useAsyncDerivation } from "./reactivity/asyncDerivation.mjs";
|
|
2
|
+
import { CustomRefFactory, CustomRefOptions, CustomRefSource, MaybeRef, MaybeRefOrGetter, Ref, ShallowRef, customRef, isRef, ref, toValue, unref } from "./reactivity/ref.mjs";
|
|
3
|
+
import { ComputedGetter, ComputedRef, ComputedSetter, WritableComputedOptions, WritableComputedRef, computed } from "./reactivity/computed.mjs";
|
|
4
|
+
import { nextTick } from "./scheduler.mjs";
|
|
5
|
+
import { EffectScope, batch, effect, effectScope, endBatch, getCurrentScope, onScopeDispose, startBatch, stop } from "./reactivity/core.mjs";
|
|
6
|
+
import { MutationKind, MutationOp, MutationRecord, addMutationRecorder, removeMutationRecorder } from "./reactivity/reactive/mutation.mjs";
|
|
7
|
+
import { PrelinkReactiveTreeOptions, prelinkReactiveTree, touchReactive } from "./reactivity/reactive/patch.mjs";
|
|
8
|
+
import { isShallowReactive, shallowReactive } from "./reactivity/reactive/shallow.mjs";
|
|
9
|
+
import { toRaw } from "./reactivity/reactive/shared.mjs";
|
|
10
|
+
import { getReactiveVersion, isRaw, isReactive, markRaw, reactive } from "./reactivity/reactive.mjs";
|
|
11
|
+
import { isProxy, isReadonly, readonly, shallowReadonly } from "./reactivity/readonly.mjs";
|
|
12
|
+
import { isShallowRef, shallowRef, triggerRef } from "./reactivity/shallowRef.mjs";
|
|
13
|
+
import { ToRefs, toRef, toRefs } from "./reactivity/toRefs.mjs";
|
|
14
|
+
import { traverse } from "./reactivity/traverse.mjs";
|
|
15
|
+
import { MapSources, MaybeUndefined, MultiWatchSources, OnCleanup, WatchCallback, WatchEffect, WatchEffectOptions, WatchMultiSources, WatchOptions, WatchScheduler, WatchSource, WatchSourceValue, WatchSources, WatchStopHandle, getDeepWatchStrategy, setDeepWatchStrategy } from "./reactivity/watch/types.mjs";
|
|
16
|
+
import { watch, watchEffect, watchPostEffect, watchSyncEffect } from "./reactivity/watch.mjs";
|
|
17
|
+
import "./reactivity/index.mjs";
|
|
18
|
+
export { type AsyncDerivation, type AsyncDerivationContext, type AsyncDerivationState, type AsyncDerivationStatus, type ComputedGetter, type ComputedRef, type ComputedSetter, type CustomRefFactory, type CustomRefOptions, type CustomRefSource, type EffectScope, type MapSources, type MaybeRef, type MaybeRefOrGetter, type MaybeUndefined, type MultiWatchSources, type MutationKind, type MutationOp, type MutationRecord, type OnCleanup, type PrelinkReactiveTreeOptions, type Ref, type ShallowRef, type ToRefs, type UseAsyncDerivationOptions, type WatchCallback, type WatchEffect, type WatchEffectOptions, type WatchMultiSources, type WatchOptions, type WatchScheduler, type WatchSource, type WatchSourceValue, type WatchSources, type WatchStopHandle, type WritableComputedOptions, type WritableComputedRef, addMutationRecorder, batch, computed, customRef, effect, effectScope, endBatch, getCurrentScope, getDeepWatchStrategy, getReactiveVersion, isProxy, isRaw, isReactive, isReadonly, isRef, isShallowReactive, isShallowRef, markRaw, nextTick, onScopeDispose, prelinkReactiveTree, reactive, readonly, ref, removeMutationRecorder, setDeepWatchStrategy, shallowReactive, shallowReadonly, shallowRef, startBatch, stop, toRaw, toRef, toRefs, toValue, touchReactive, traverse, triggerRef, unref, useAsyncDerivation, watch, watchEffect, watchPostEffect, watchSyncEffect };
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { useCssModule, useCssVars } from "./runtime/css.mjs";
|
|
2
|
+
import { INTERNAL_DEFAULTS_SCOPE_KEY, resetWevuDefaults, setWevuDefaults } from "./runtime/defaults.mjs";
|
|
3
|
+
import { createIsolatedWevuComponentDefinition, createWevuComponent, createWevuComponentDefinition, defineComponent, getWevuComponentLifecycleDefinition } from "./runtime/define.mjs";
|
|
4
|
+
import { useDisposables } from "./runtime/disposables.mjs";
|
|
5
|
+
import { useElementIntersectionObserver } from "./runtime/elementIntersectionObserver.mjs";
|
|
6
|
+
import { SetDataSchedulerOptions } from "./runtime/app/setData/scheduler.mjs";
|
|
7
|
+
import { HighFrequencyWarningMonitorOptions, LayoutHostBinding, RuntimeCapabilityName, RuntimeCapabilityRegistry, ScopedSlotMountState, SetDataScheduler, TemplateRefBinding } from "./runtime/capabilities.mjs";
|
|
8
|
+
import { resolveLayoutBridge, resolveLayoutHost, resolveRuntimePageLayoutName, setPageLayout, syncRuntimePageLayoutState, syncRuntimePageLayoutStateFromRuntime, useLayoutBridge, useLayoutHosts, usePageLayout, waitForLayoutHost } from "./runtime/features/publicLayout.mjs";
|
|
9
|
+
import { callHookList, callHookReturn, getCurrentInstance, getCurrentSetupContext, setCurrentInstance, setCurrentSetupContext } from "./runtime/hooks/base.mjs";
|
|
10
|
+
import { onAddToFavorites, onAttached, onDetached, onError, onHide, onLaunch, onLoad, onMemoryWarning, onMoved, onPageNotFound, onPageScroll, onPullDownRefresh, onReachBottom, onReady, onResize, onRouteDone, onSaveExitState, onShareAppMessage, onShareTimeline, onShow, onTabItemTap, onThemeChange, onUnhandledRejection, onUnload } from "./runtime/hooks/register.mjs";
|
|
11
|
+
import { onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onServerPrefetch, onUnmounted, onUpdated } from "./runtime/hooks/vue.mjs";
|
|
12
|
+
import "./runtime/hooks.mjs";
|
|
13
|
+
import { useIntersectionObserver } from "./runtime/intersectionObserver.mjs";
|
|
14
|
+
import { isNoSetData, markNoSetData } from "./runtime/noSetData.mjs";
|
|
15
|
+
import { getCurrentPageStackSnapshot, getNavigationBarMetrics, useNavigationBarMetrics, usePageStack } from "./runtime/pageEnvironment.mjs";
|
|
16
|
+
import { usePageScrollThrottle } from "./runtime/pageScroll.mjs";
|
|
17
|
+
import { setGlobalProvidedValue } from "./runtime/provideStore.mjs";
|
|
18
|
+
import { hasInjectionContext, inject, injectGlobal, provide, provideGlobal } from "./runtime/provide.mjs";
|
|
19
|
+
import { createWevuScopedSlotComponent, installScopedSlots } from "./runtime/features/scopedSlots.mjs";
|
|
20
|
+
import { createApp } from "./runtime/app.mjs";
|
|
21
|
+
import { registerApp } from "./runtime/register/app.mjs";
|
|
22
|
+
import { registerComponent } from "./runtime/register/component.mjs";
|
|
23
|
+
import { mountRuntimeInstance, setRuntimeSetDataVisibility, teardownRuntimeInstance } from "./runtime/register/runtimeInstance.mjs";
|
|
24
|
+
import { runSetupFunction } from "./runtime/register/setup.mjs";
|
|
25
|
+
import "./runtime/register.mjs";
|
|
26
|
+
import { useAsyncPullDownRefresh } from "./runtime/pullDownRefresh.mjs";
|
|
27
|
+
import { useBoundingClientRect, useScrollOffset, useSelectorFields, useSelectorQuery } from "./runtime/selectorQuery.mjs";
|
|
28
|
+
import { useUpdatePerformanceListener } from "./runtime/updatePerformance.mjs";
|
|
29
|
+
import { defineAppSetup, use } from "./runtime/use.mjs";
|
|
30
|
+
import { useAttrs, useNativeInstance, useSlots } from "./runtime/vueCompat/context.mjs";
|
|
31
|
+
import { mergeModels, useBindModel, useChangeModel, useModel } from "./runtime/vueCompat/model.mjs";
|
|
32
|
+
import { useNativePageRouter, useNativeRouter } from "./runtime/vueCompat/router.mjs";
|
|
33
|
+
import { useTemplateRef } from "./runtime/vueCompat/templateRef.mjs";
|
|
34
|
+
import "./runtime/vueCompat.mjs";
|
|
35
|
+
import { version } from "./version.mjs";
|
|
36
|
+
import { takePendingRuntimeAppRegistration } from "./runtime/app/pending.mjs";
|
|
37
|
+
import { installInlineEvents } from "./runtime/features/inlineEvents.mjs";
|
|
38
|
+
import { installJsxIslands } from "./runtime/features/jsxIslands.mjs";
|
|
39
|
+
import { installLayout } from "./runtime/features/layout.mjs";
|
|
40
|
+
import { installPatchStrategy } from "./runtime/features/patchStrategy.mjs";
|
|
41
|
+
import { installSetDataHighFrequencyWarning } from "./runtime/features/setDataHighFrequencyWarning.mjs";
|
|
42
|
+
import { installTemplateRefs } from "./runtime/features/templateRefs.mjs";
|
|
43
|
+
import { Fragment, createTextVNode, createVNode, isVNode, mergeProps, normalizeJsxIsland, resolveComponent, resolveDirective, transformOn, vModelCheckbox, vModelRadio, vModelSelect, vModelText, vShow, withDirectives } from "./runtime/jsxIsland.mjs";
|
|
44
|
+
import { createUniAppHost } from "./runtime/uniAppHost.mjs";
|
|
45
|
+
export { Fragment, type HighFrequencyWarningMonitorOptions, INTERNAL_DEFAULTS_SCOPE_KEY, type LayoutHostBinding, type RuntimeCapabilityName, type RuntimeCapabilityRegistry, type ScopedSlotMountState, type SetDataScheduler, type SetDataSchedulerOptions, type TemplateRefBinding, callHookList, callHookReturn, createApp, createIsolatedWevuComponentDefinition, createTextVNode, createUniAppHost, createVNode, createWevuComponent, createWevuComponentDefinition, createWevuScopedSlotComponent, defineAppSetup, defineComponent, getCurrentInstance, getCurrentPageStackSnapshot, getCurrentSetupContext, getNavigationBarMetrics, getWevuComponentLifecycleDefinition, hasInjectionContext, inject, injectGlobal, installInlineEvents, installJsxIslands, installLayout, installPatchStrategy, installScopedSlots, installSetDataHighFrequencyWarning, installTemplateRefs, isNoSetData, isVNode, markNoSetData, mergeModels, mergeProps, mountRuntimeInstance, normalizeJsxIsland, onActivated, onAddToFavorites, onAttached, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onDetached, onError, onErrorCaptured, onHide, onLaunch, onLoad, onMemoryWarning, onMounted, onMoved, onPageNotFound, onPageScroll, onPullDownRefresh, onReachBottom, onReady, onResize, onRouteDone, onSaveExitState, onServerPrefetch, onShareAppMessage, onShareTimeline, onShow, onTabItemTap, onThemeChange, onUnhandledRejection, onUnload, onUnmounted, onUpdated, provide, provideGlobal, registerApp, registerComponent, resetWevuDefaults, resolveComponent, resolveDirective, resolveLayoutBridge, resolveLayoutHost, resolveRuntimePageLayoutName, runSetupFunction, setCurrentInstance, setCurrentSetupContext, setGlobalProvidedValue, setPageLayout, setRuntimeSetDataVisibility, setWevuDefaults, syncRuntimePageLayoutState, syncRuntimePageLayoutStateFromRuntime, takePendingRuntimeAppRegistration, teardownRuntimeInstance, transformOn, use, useAsyncPullDownRefresh, useAttrs, useBindModel, useBoundingClientRect, useChangeModel, useCssModule, useCssVars, useDisposables, useElementIntersectionObserver, useIntersectionObserver, useLayoutBridge, useLayoutHosts, useModel, useNativeInstance, useNativePageRouter, useNativeRouter, useNavigationBarMetrics, usePageLayout, usePageScrollThrottle, usePageStack, useScrollOffset, useSelectorFields, useSelectorQuery, useSlots, useTemplateRef, useUpdatePerformanceListener, vModelCheckbox, vModelRadio, vModelSelect, vModelText, vShow, version, waitForLayoutHost, withDirectives };
|
|
@@ -19,11 +19,12 @@ import { takePendingRuntimeAppRegistration } from "./runtime/app/pending.mjs";
|
|
|
19
19
|
import { runSetupFunction } from "./runtime/register/setup.mjs";
|
|
20
20
|
import { mountRuntimeInstance, setRuntimeSetDataVisibility, teardownRuntimeInstance } from "./runtime/register/runtimeInstance.mjs";
|
|
21
21
|
import { registerApp } from "./runtime/register/app.mjs";
|
|
22
|
-
import { Fragment, createTextVNode, createVNode, isVNode, mergeProps, normalizeJsxIsland, resolveComponent, resolveDirective, transformOn, vModelCheckbox, vModelRadio, vModelSelect, vModelText, vShow, withDirectives } from "./runtime/jsxIsland.mjs";
|
|
23
22
|
import { registerComponent } from "./runtime/register/component.mjs";
|
|
24
23
|
import { createApp } from "./runtime/app.mjs";
|
|
25
24
|
import { createIsolatedWevuComponentDefinition, createWevuComponent, createWevuComponentDefinition, defineComponent, getWevuComponentLifecycleDefinition } from "./runtime/define.mjs";
|
|
26
25
|
import { installInlineEvents } from "./runtime/features/inlineEvents.mjs";
|
|
26
|
+
import { Fragment, createTextVNode, createVNode, isVNode, mergeProps, normalizeJsxIsland, resolveComponent, resolveDirective, transformOn, vModelCheckbox, vModelRadio, vModelSelect, vModelText, vShow, withDirectives } from "./runtime/jsxIsland.mjs";
|
|
27
|
+
import { installJsxIslands } from "./runtime/features/jsxIslands.mjs";
|
|
27
28
|
import { installPatchStrategy } from "./runtime/features/patchStrategy.mjs";
|
|
28
29
|
import { createWevuScopedSlotComponent, installScopedSlots } from "./runtime/features/scopedSlots.mjs";
|
|
29
30
|
import { installSetDataHighFrequencyWarning } from "./runtime/features/setDataHighFrequencyWarning.mjs";
|
|
@@ -37,4 +38,4 @@ import { useNativePageRouter, useNativeRouter } from "./runtime/vueCompat/router
|
|
|
37
38
|
import { useTemplateRef } from "./runtime/vueCompat/templateRef.mjs";
|
|
38
39
|
import { createUniAppHost } from "./runtime/uniAppHost.mjs";
|
|
39
40
|
|
|
40
|
-
export { Fragment, INTERNAL_DEFAULTS_SCOPE_KEY, callHookList, callHookReturn, createApp, createIsolatedWevuComponentDefinition, createTextVNode, createUniAppHost, createVNode, createWevuComponent, createWevuComponentDefinition, createWevuScopedSlotComponent, defineAppSetup, defineComponent, getCurrentInstance, getCurrentPageStackSnapshot, getCurrentSetupContext, getNavigationBarMetrics, getWevuComponentLifecycleDefinition, hasInjectionContext, inject, injectGlobal, installInlineEvents, installLayout, installPatchStrategy, installScopedSlots, installSetDataHighFrequencyWarning, installTemplateRefs, isNoSetData, isVNode, markNoSetData, mergeModels, mergeProps, mountRuntimeInstance, normalizeJsxIsland, onActivated, onAddToFavorites, onAttached, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onDetached, onError, onErrorCaptured, onHide, onLaunch, onLoad, onMemoryWarning, onMounted, onMoved, onPageNotFound, onPageScroll, onPullDownRefresh, onReachBottom, onReady, onResize, onRouteDone, onSaveExitState, onServerPrefetch, onShareAppMessage, onShareTimeline, onShow, onTabItemTap, onThemeChange, onUnhandledRejection, onUnload, onUnmounted, onUpdated, provide, provideGlobal, registerApp, registerComponent, resetWevuDefaults, resolveComponent, resolveDirective, resolveLayoutBridge, resolveLayoutHost, resolveRuntimePageLayoutName, runSetupFunction, setCurrentInstance, setCurrentSetupContext, setGlobalProvidedValue, setPageLayout, setRuntimeSetDataVisibility, setWevuDefaults, syncRuntimePageLayoutState, syncRuntimePageLayoutStateFromRuntime, takePendingRuntimeAppRegistration, teardownRuntimeInstance, transformOn, use, useAsyncPullDownRefresh, useAttrs, useBindModel, useBoundingClientRect, useChangeModel, useCssModule, useCssVars, useDisposables, useElementIntersectionObserver, useIntersectionObserver, useLayoutBridge, useLayoutHosts, useModel, useNativeInstance, useNativePageRouter, useNativeRouter, useNavigationBarMetrics, usePageLayout, usePageScrollThrottle, usePageStack, useScrollOffset, useSelectorFields, useSelectorQuery, useSlots, useTemplateRef, useUpdatePerformanceListener, vModelCheckbox, vModelRadio, vModelSelect, vModelText, vShow, version, waitForLayoutHost, withDirectives };
|
|
41
|
+
export { Fragment, INTERNAL_DEFAULTS_SCOPE_KEY, callHookList, callHookReturn, createApp, createIsolatedWevuComponentDefinition, createTextVNode, createUniAppHost, createVNode, createWevuComponent, createWevuComponentDefinition, createWevuScopedSlotComponent, defineAppSetup, defineComponent, getCurrentInstance, getCurrentPageStackSnapshot, getCurrentSetupContext, getNavigationBarMetrics, getWevuComponentLifecycleDefinition, hasInjectionContext, inject, injectGlobal, installInlineEvents, installJsxIslands, installLayout, installPatchStrategy, installScopedSlots, installSetDataHighFrequencyWarning, installTemplateRefs, isNoSetData, isVNode, markNoSetData, mergeModels, mergeProps, mountRuntimeInstance, normalizeJsxIsland, onActivated, onAddToFavorites, onAttached, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onDetached, onError, onErrorCaptured, onHide, onLaunch, onLoad, onMemoryWarning, onMounted, onMoved, onPageNotFound, onPageScroll, onPullDownRefresh, onReachBottom, onReady, onResize, onRouteDone, onSaveExitState, onServerPrefetch, onShareAppMessage, onShareTimeline, onShow, onTabItemTap, onThemeChange, onUnhandledRejection, onUnload, onUnmounted, onUpdated, provide, provideGlobal, registerApp, registerComponent, resetWevuDefaults, resolveComponent, resolveDirective, resolveLayoutBridge, resolveLayoutHost, resolveRuntimePageLayoutName, runSetupFunction, setCurrentInstance, setCurrentSetupContext, setGlobalProvidedValue, setPageLayout, setRuntimeSetDataVisibility, setWevuDefaults, syncRuntimePageLayoutState, syncRuntimePageLayoutStateFromRuntime, takePendingRuntimeAppRegistration, teardownRuntimeInstance, transformOn, use, useAsyncPullDownRefresh, useAttrs, useBindModel, useBoundingClientRect, useChangeModel, useCssModule, useCssVars, useDisposables, useElementIntersectionObserver, useIntersectionObserver, useLayoutBridge, useLayoutHosts, useModel, useNativeInstance, useNativePageRouter, useNativeRouter, useNavigationBarMetrics, usePageLayout, usePageScrollThrottle, usePageStack, useScrollOffset, useSelectorFields, useSelectorQuery, useSlots, useTemplateRef, useUpdatePerformanceListener, vModelCheckbox, vModelRadio, vModelSelect, vModelText, vShow, version, waitForLayoutHost, withDirectives };
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { HostMiniProgramComponentAllFullProperty, HostMiniProgramComponentAllProperty, HostMiniProgramComponentBehaviorOptions, HostMiniProgramComponentEmptyArray, HostMiniProgramComponentMethodOption, HostMiniProgramComponentPropertyOption, HostMiniProgramTriggerEventOptions } from "../runtime/types/miniprogramHost.mjs";
|
|
2
|
+
import { MiniProgramComponentInstance, MiniProgramComponentPropertyValue } from "../runtime/types/miniprogram.mjs";
|
|
3
|
+
import { ComponentPropsOptions, InferProps } from "../runtime/types/props/propTypes.mjs";
|
|
4
|
+
import { ComputedDefinitions, MethodDefinitions } from "../runtime/types/core.mjs";
|
|
5
|
+
import { DefineComponentOptions } from "../runtime/types/options.mjs";
|
|
6
|
+
import "../runtime/index.mjs";
|
|
7
|
+
//#region src/macros/shared.d.ts
|
|
8
|
+
export type Prettify<T> = { [K in keyof T]: T[K]; } & {};
|
|
9
|
+
type IfAny<T, Y, N> = 0 extends 1 & T ? Y : N;
|
|
10
|
+
type ComponentObjectPropsOptions = ComponentPropsOptions;
|
|
11
|
+
type ExtractPropTypes<P extends ComponentObjectPropsOptions> = InferProps<P>;
|
|
12
|
+
export type DefineProps<T, BKeys extends keyof T> = Readonly<T> & { readonly [K in BKeys]-?: boolean; };
|
|
13
|
+
export type BooleanKey<T, K extends keyof T = keyof T> = K extends any ? T[K] extends boolean | undefined ? T[K] extends never | undefined ? never : K : never : never;
|
|
14
|
+
export type DefinePropsFromArray<PropNames extends string = string> = Prettify<Readonly<{ [key in PropNames]?: any; }>>;
|
|
15
|
+
export type DefinePropsFromOptions<PP extends ComponentObjectPropsOptions = ComponentObjectPropsOptions> = Prettify<Readonly<ExtractPropTypes<PP>>>;
|
|
16
|
+
type NotUndefined<T> = T extends undefined ? never : T;
|
|
17
|
+
type MappedOmit<T, K extends keyof any> = { [P in keyof T as P extends K ? never : P]: T[P]; };
|
|
18
|
+
export type InferDefaults<T> = { [K in keyof T]?: InferDefault<T, T[K]>; };
|
|
19
|
+
type NativeType = null | undefined | number | string | boolean | symbol | ((...args: any[]) => any);
|
|
20
|
+
type InferDefault<P, T> = ((props: P) => T & {}) | (T extends NativeType ? T : never);
|
|
21
|
+
export type PropsWithDefaults<T, Defaults extends InferDefaults<T>, BKeys extends keyof T> = T extends unknown ? Readonly<MappedOmit<T, keyof Defaults>> & { readonly [K in keyof Defaults as K extends keyof T ? K : never]-?: K extends keyof T ? Defaults[K] extends undefined ? IfAny<Defaults[K], NotUndefined<T[K]>, T[K]> : NotUndefined<T[K]> : never; } & { readonly [K in BKeys]-?: K extends keyof Defaults ? Defaults[K] extends undefined ? boolean | undefined : boolean : boolean; } : never;
|
|
22
|
+
export type UnionToIntersection<U> = (U extends any ? (arg: U) => any : never) extends ((arg: infer I) => any) ? I : never;
|
|
23
|
+
type ScriptSetupTriggerEventOptions = HostMiniProgramTriggerEventOptions;
|
|
24
|
+
type EmitArgsWithTriggerEventOptions<Args extends any[]> = Args extends [] ? [] | [detail: undefined, options: ScriptSetupTriggerEventOptions] : Args | [...args: Args, options: ScriptSetupTriggerEventOptions];
|
|
25
|
+
type ObjectEmitsOptions = Record<string, ((...args: any[]) => any) | null>;
|
|
26
|
+
export type EmitsOptions = ObjectEmitsOptions | string[];
|
|
27
|
+
export type EmitFn<Options = ObjectEmitsOptions, Event extends keyof Options = keyof Options> = Options extends Array<infer V> ? (event: V, ...args: any[]) => void : {} extends Options ? (event: string, ...args: any[]) => void : UnionToIntersection<{ [K in Event]: Options[K] extends ((...args: infer Args) => any) ? (event: K, ...args: EmitArgsWithTriggerEventOptions<Args>) => void : Options[K] extends any[] ? (event: K, ...args: EmitArgsWithTriggerEventOptions<Options[K]>) => void : (event: K, ...args: any[]) => void; }[Event]>;
|
|
28
|
+
export type ComponentTypeEmits = ((...args: any[]) => any) | Record<string, any>;
|
|
29
|
+
type RecordToUnion<T extends Record<string, any>> = T[keyof T];
|
|
30
|
+
export type ShortEmits<T extends Record<string, any>> = UnionToIntersection<RecordToUnion<{ [K in keyof T]: (evt: K, ...args: EmitArgsWithTriggerEventOptions<T[K]>) => void; }>>;
|
|
31
|
+
type ScriptSetupNativePropertyOption = HostMiniProgramComponentPropertyOption;
|
|
32
|
+
type ScriptSetupNativeMethodOption = HostMiniProgramComponentMethodOption;
|
|
33
|
+
type ScriptSetupNativeBehaviorOption = HostMiniProgramComponentEmptyArray;
|
|
34
|
+
type ScriptSetupNativeInstance<D extends object, P extends ScriptSetupNativePropertyOption, M extends ScriptSetupNativeMethodOption> = MiniProgramComponentInstance<D, P, M, ScriptSetupNativeBehaviorOption>;
|
|
35
|
+
type ScriptSetupObservedProperty<TProperty extends HostMiniProgramComponentAllFullProperty, TInstance> = Omit<TProperty, 'observer'> & {
|
|
36
|
+
observer?: string | ((this: TInstance, newVal: MiniProgramComponentPropertyValue<TProperty>, oldVal: MiniProgramComponentPropertyValue<TProperty>, changedPath: Array<string | number>) => void);
|
|
37
|
+
};
|
|
38
|
+
type ScriptSetupPropertyObserver<TProperty extends HostMiniProgramComponentAllProperty, TInstance> = TProperty extends (infer TCurrent extends HostMiniProgramComponentAllFullProperty) ? ScriptSetupObservedProperty<TCurrent, TInstance> : TProperty;
|
|
39
|
+
type ScriptSetupNativeProperties<D extends object, P extends ScriptSetupNativePropertyOption, M extends ScriptSetupNativeMethodOption> = { [K in keyof P]: ScriptSetupPropertyObserver<P[K], ScriptSetupNativeInstance<D, P, M>>; };
|
|
40
|
+
type ScriptSetupNativeMethods<D extends object, P extends ScriptSetupNativePropertyOption, M extends ScriptSetupNativeMethodOption> = M & ThisType<ScriptSetupNativeInstance<D, P, M>>;
|
|
41
|
+
type RemoveIndexSignature<T> = { [K in keyof T as string extends K ? never : number extends K ? never : symbol extends K ? never : K]: T[K]; };
|
|
42
|
+
export type ScriptSetupDefineOptions<D extends object = Record<string, any>, C extends ComputedDefinitions = ComputedDefinitions, M extends MethodDefinitions = MethodDefinitions, P extends ScriptSetupNativePropertyOption = ScriptSetupNativePropertyOption> = Omit<RemoveIndexSignature<DefineComponentOptions<ComponentPropsOptions, D, C, M>>, 'props' | 'options' | 'data' | 'methods'> & {
|
|
43
|
+
/** 组件静态名称,供编译器匹配组件配置。 */
|
|
44
|
+
name?: string;
|
|
45
|
+
/**
|
|
46
|
+
* props 必须通过 defineProps() 声明。
|
|
47
|
+
*/
|
|
48
|
+
props?: never;
|
|
49
|
+
/**
|
|
50
|
+
* emits 必须通过 defineEmits() 声明。
|
|
51
|
+
*/
|
|
52
|
+
emits?: never;
|
|
53
|
+
/**
|
|
54
|
+
* expose 必须通过 defineExpose() 声明。
|
|
55
|
+
*/
|
|
56
|
+
expose?: never;
|
|
57
|
+
/**
|
|
58
|
+
* slots 必须通过 defineSlots() 声明。
|
|
59
|
+
*/
|
|
60
|
+
slots?: never;
|
|
61
|
+
/**
|
|
62
|
+
* 小程序 Component 选项(multipleSlots/styleIsolation 等)。
|
|
63
|
+
*/
|
|
64
|
+
options?: HostMiniProgramComponentBehaviorOptions;
|
|
65
|
+
/**
|
|
66
|
+
* 小程序原生 properties。
|
|
67
|
+
*/
|
|
68
|
+
properties?: ScriptSetupNativeProperties<D, P, M>;
|
|
69
|
+
/**
|
|
70
|
+
* 小程序原生 data。
|
|
71
|
+
*/
|
|
72
|
+
data?: D | (() => D);
|
|
73
|
+
/**
|
|
74
|
+
* 小程序原生 methods。
|
|
75
|
+
*/
|
|
76
|
+
methods?: ScriptSetupNativeMethods<D, P, M>;
|
|
77
|
+
/**
|
|
78
|
+
* setup 执行时机(默认 attached)。
|
|
79
|
+
*/
|
|
80
|
+
setupLifecycle?: 'created' | 'attached';
|
|
81
|
+
};
|
|
82
|
+
//#endregion
|
|
83
|
+
//# sourceMappingURL=shared.d.mts.map
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { HostMiniProgramComponentPropertyOption } from "./runtime/types/miniprogramHost.mjs";
|
|
2
|
+
import { ComponentPropsOptions } from "./runtime/types/props/propTypes.mjs";
|
|
3
|
+
import { Ref } from "./reactivity/ref.mjs";
|
|
4
|
+
import "./reactivity/index.mjs";
|
|
5
|
+
import { ComputedDefinitions, MethodDefinitions } from "./runtime/types/core.mjs";
|
|
6
|
+
import "./runtime/index.mjs";
|
|
7
|
+
import { BooleanKey, ComponentTypeEmits, DefineProps, DefinePropsFromArray, DefinePropsFromOptions, EmitFn, EmitsOptions, InferDefaults, PropsWithDefaults, ScriptSetupDefineOptions, ShortEmits } from "./macros/shared.mjs";
|
|
8
|
+
//#region src/macros.d.ts
|
|
9
|
+
/**
|
|
10
|
+
* defineProps 声明(类型层宏)。
|
|
11
|
+
*/
|
|
12
|
+
export declare function defineProps<PropNames extends string = string>(props: PropNames[]): DefinePropsFromArray<PropNames>;
|
|
13
|
+
export declare function defineProps<PP extends ComponentPropsOptions = ComponentPropsOptions>(props: PP): DefinePropsFromOptions<PP>;
|
|
14
|
+
export declare function defineProps<TypeProps>(): DefineProps<TypeProps, BooleanKey<TypeProps>>;
|
|
15
|
+
/**
|
|
16
|
+
* withDefaults 为 defineProps 声明默认值(类型层)。
|
|
17
|
+
*/
|
|
18
|
+
export declare function withDefaults<T, BKeys extends keyof T, Defaults extends InferDefaults<T>>(props: DefineProps<T, BKeys>, defaults: Defaults): PropsWithDefaults<T, Defaults, BKeys>;
|
|
19
|
+
/**
|
|
20
|
+
* defineEmits 声明(类型层宏)。
|
|
21
|
+
*/
|
|
22
|
+
export declare function defineEmits<EE extends string = string>(emits?: EE[]): EmitFn<EE[]>;
|
|
23
|
+
export declare function defineEmits<E extends EmitsOptions = EmitsOptions>(emits?: E): EmitFn<E>;
|
|
24
|
+
export declare function defineEmits<T extends ComponentTypeEmits>(): T extends ((...args: any[]) => any) ? T : ShortEmits<T>;
|
|
25
|
+
/**
|
|
26
|
+
* defineExpose 向父级 ref 暴露成员(仅类型层)。
|
|
27
|
+
*/
|
|
28
|
+
export declare function defineExpose<T extends Record<string, any> = Record<string, any>>(exposed?: T): void;
|
|
29
|
+
/**
|
|
30
|
+
* defineOptions 设置 `<script setup>` 组件选项(仅类型层)。
|
|
31
|
+
*/
|
|
32
|
+
export declare function defineOptions<D extends object = Record<string, any>, C extends ComputedDefinitions = ComputedDefinitions, M extends MethodDefinitions = MethodDefinitions, P extends HostMiniProgramComponentPropertyOption = HostMiniProgramComponentPropertyOption>(options?: ScriptSetupDefineOptions<D, C, M, P>): void;
|
|
33
|
+
export declare function defineOptions<D extends object = Record<string, any>, C extends ComputedDefinitions = ComputedDefinitions, M extends MethodDefinitions = MethodDefinitions, P extends HostMiniProgramComponentPropertyOption = HostMiniProgramComponentPropertyOption>(options?: () => ScriptSetupDefineOptions<D, C, M, P> | Promise<ScriptSetupDefineOptions<D, C, M, P>>): void;
|
|
34
|
+
/**
|
|
35
|
+
* defineSlots 声明 slots 类型(仅类型层)。
|
|
36
|
+
*/
|
|
37
|
+
export declare function defineSlots<T extends Record<string, any> = Record<string, any>>(): T;
|
|
38
|
+
export type PageLayoutMeta = string | false | {
|
|
39
|
+
name: string;
|
|
40
|
+
props?: Record<string, unknown>;
|
|
41
|
+
};
|
|
42
|
+
export interface PageMeta {
|
|
43
|
+
layout?: PageLayoutMeta;
|
|
44
|
+
[key: string]: unknown;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* definePageMeta 声明页面级元信息(仅类型层)。
|
|
48
|
+
*/
|
|
49
|
+
export declare function definePageMeta(meta: PageMeta): void;
|
|
50
|
+
/**
|
|
51
|
+
* defineModel 声明 v-model 绑定(类型层宏)。
|
|
52
|
+
*/
|
|
53
|
+
export type DefineModelModifiers<M extends PropertyKey = string> = Record<M, true | undefined>;
|
|
54
|
+
export type ModelRef<T, M extends PropertyKey = string, G = T, S = T> = Ref<G, S> & [ModelRef<T, M, G, S>, DefineModelModifiers<M>];
|
|
55
|
+
export interface DefineModelTransformOptions<T, M extends PropertyKey = string, G = T, S = T> {
|
|
56
|
+
get?: (value: T, modifiers: DefineModelModifiers<M>) => G;
|
|
57
|
+
set?: (value: S, modifiers: DefineModelModifiers<M>) => T;
|
|
58
|
+
}
|
|
59
|
+
type DefineModelBaseOptions<T, M extends PropertyKey = string, G = T, S = T> = Record<string, any> & DefineModelTransformOptions<T, M, G, S>;
|
|
60
|
+
type DefineModelRequiredOptions<T> = {
|
|
61
|
+
default: T | (() => T);
|
|
62
|
+
} | {
|
|
63
|
+
required: true;
|
|
64
|
+
};
|
|
65
|
+
export declare function defineModel<T = any, M extends PropertyKey = string, G = T, S = T>(options: DefineModelBaseOptions<T, M, G, S> & DefineModelRequiredOptions<T>): ModelRef<T, M, G, S>;
|
|
66
|
+
export declare function defineModel<T = any, M extends PropertyKey = string, G = T, S = T>(name: string, options: DefineModelBaseOptions<T, M, G, S> & DefineModelRequiredOptions<T>): ModelRef<T, M, G, S>;
|
|
67
|
+
export declare function defineModel<T = any, M extends PropertyKey = string, G = T, S = T>(options?: DefineModelBaseOptions<T | undefined, M, G | undefined, S | undefined>): ModelRef<T | undefined, M, G | undefined, S | undefined>;
|
|
68
|
+
export declare function defineModel<T = any, M extends PropertyKey = string, G = T, S = T>(name?: string, options?: DefineModelBaseOptions<T | undefined, M, G | undefined, S | undefined>): ModelRef<T | undefined, M, G | undefined, S | undefined>;
|
|
69
|
+
//#endregion
|
|
70
|
+
export type { ComponentTypeEmits, EmitFn, EmitsOptions };
|
|
71
|
+
//# sourceMappingURL=macros.d.mts.map
|
package/dist/dev/package.mjs
CHANGED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
//#region src/reactivity/asyncDerivation.d.ts
|
|
2
|
+
/** 异步派生状态的生命周期阶段。 */
|
|
3
|
+
export type AsyncDerivationStatus = 'idle' | 'initial-pending' | 'ready' | 'refreshing' | 'error' | 'disposed';
|
|
4
|
+
/** 传给异步加载函数的当前任务上下文。 */
|
|
5
|
+
export interface AsyncDerivationContext {
|
|
6
|
+
readonly signal: AbortSignal;
|
|
7
|
+
}
|
|
8
|
+
/** `useAsyncDerivation()` 的配置。 */
|
|
9
|
+
export interface UseAsyncDerivationOptions {
|
|
10
|
+
immediate?: boolean;
|
|
11
|
+
}
|
|
12
|
+
type AsyncDerivationIdleState<TStatus extends 'idle' | 'initial-pending' | 'disposed'> = Readonly<{
|
|
13
|
+
status: TStatus;
|
|
14
|
+
value: undefined;
|
|
15
|
+
error: undefined;
|
|
16
|
+
}>;
|
|
17
|
+
type AsyncDerivationReadyState<T, TStatus extends 'ready' | 'refreshing'> = Readonly<{
|
|
18
|
+
status: TStatus;
|
|
19
|
+
value: T;
|
|
20
|
+
error: undefined;
|
|
21
|
+
}>;
|
|
22
|
+
type AsyncDerivationErrorState<T> = Readonly<{
|
|
23
|
+
status: 'error';
|
|
24
|
+
value: T | undefined;
|
|
25
|
+
error: unknown;
|
|
26
|
+
}>;
|
|
27
|
+
/** 模板可观察的只读异步派生状态。 */
|
|
28
|
+
export type AsyncDerivationState<T> = AsyncDerivationIdleState<'idle'> | AsyncDerivationIdleState<'initial-pending'> | AsyncDerivationIdleState<'disposed'> | AsyncDerivationReadyState<T, 'ready'> | AsyncDerivationReadyState<T, 'refreshing'> | AsyncDerivationErrorState<T>;
|
|
29
|
+
type AsyncDerivationControls = Readonly<{
|
|
30
|
+
refresh: () => Promise<void>;
|
|
31
|
+
dispose: () => void;
|
|
32
|
+
}>;
|
|
33
|
+
/** 异步派生状态及其非枚举控制方法。 */
|
|
34
|
+
export type AsyncDerivation<T> = AsyncDerivationState<T> & AsyncDerivationControls;
|
|
35
|
+
/**
|
|
36
|
+
* 创建面向静态 WXML 数据绑定的异步派生状态。
|
|
37
|
+
* 加载错误通过 `status` 与 `error` 暴露,`refresh()` 始终正常完成。
|
|
38
|
+
*/
|
|
39
|
+
export declare function useAsyncDerivation<T>(loader: (context: AsyncDerivationContext) => T | PromiseLike<T>, options?: UseAsyncDerivationOptions): AsyncDerivation<T>;
|
|
40
|
+
//#endregion
|
|
41
|
+
//# sourceMappingURL=asyncDerivation.d.mts.map
|
|
@@ -19,7 +19,6 @@ function createAsyncDerivationCycle() {
|
|
|
19
19
|
* 加载错误通过 `status` 与 `error` 暴露,`refresh()` 始终正常完成。
|
|
20
20
|
*/
|
|
21
21
|
function useAsyncDerivation(loader, options = {}) {
|
|
22
|
-
var _options$immediate;
|
|
23
22
|
const storage = {
|
|
24
23
|
status: "idle",
|
|
25
24
|
value: void 0,
|
|
@@ -35,7 +34,7 @@ function useAsyncDerivation(loader, options = {}) {
|
|
|
35
34
|
if (disposed || completedGeneration !== generation) return;
|
|
36
35
|
const cycle = activeCycle;
|
|
37
36
|
activeCycle = void 0;
|
|
38
|
-
cycle
|
|
37
|
+
cycle?.resolve();
|
|
39
38
|
}
|
|
40
39
|
function commitValue(completedGeneration, value) {
|
|
41
40
|
if (disposed || completedGeneration !== generation) return;
|
|
@@ -65,17 +64,16 @@ function useAsyncDerivation(loader, options = {}) {
|
|
|
65
64
|
}
|
|
66
65
|
}
|
|
67
66
|
function refresh() {
|
|
68
|
-
var _activeCycle;
|
|
69
67
|
if (disposed) return RESOLVED_PROMISE;
|
|
70
|
-
const cycle =
|
|
68
|
+
const cycle = activeCycle ?? createAsyncDerivationCycle();
|
|
71
69
|
activeCycle = cycle;
|
|
72
70
|
const currentGeneration = ++generation;
|
|
73
71
|
const previousController = activeController;
|
|
74
72
|
const controller = new (typeof AbortController === "function" ? AbortController : AbortControllerPolyfill)();
|
|
75
73
|
activeController = controller;
|
|
76
74
|
try {
|
|
77
|
-
previousController
|
|
78
|
-
} catch
|
|
75
|
+
previousController?.abort();
|
|
76
|
+
} catch {}
|
|
79
77
|
if (disposed || currentGeneration !== generation) return cycle.promise;
|
|
80
78
|
batch(() => {
|
|
81
79
|
state.status = hasValue ? "refreshing" : "initial-pending";
|
|
@@ -100,8 +98,8 @@ function useAsyncDerivation(loader, options = {}) {
|
|
|
100
98
|
const controller = activeController;
|
|
101
99
|
activeController = void 0;
|
|
102
100
|
try {
|
|
103
|
-
controller
|
|
104
|
-
} catch
|
|
101
|
+
controller?.abort();
|
|
102
|
+
} catch {}
|
|
105
103
|
try {
|
|
106
104
|
batch(() => {
|
|
107
105
|
state.status = "disposed";
|
|
@@ -112,7 +110,7 @@ function useAsyncDerivation(loader, options = {}) {
|
|
|
112
110
|
hasValue = false;
|
|
113
111
|
const cycle = activeCycle;
|
|
114
112
|
activeCycle = void 0;
|
|
115
|
-
cycle
|
|
113
|
+
cycle?.resolve();
|
|
116
114
|
}
|
|
117
115
|
}
|
|
118
116
|
Object.defineProperties(storage, {
|
|
@@ -121,7 +119,7 @@ function useAsyncDerivation(loader, options = {}) {
|
|
|
121
119
|
});
|
|
122
120
|
const result = readonly(state);
|
|
123
121
|
onScopeDispose(dispose);
|
|
124
|
-
if (
|
|
122
|
+
if (options.immediate ?? true) refresh();
|
|
125
123
|
return result;
|
|
126
124
|
}
|
|
127
125
|
|