wevu 7.0.4 → 7.1.1
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 +20 -4
- package/dist/alipay/jsx-runtime.d.mts +12 -0
- package/dist/alipay/jsx-runtime.mjs +1 -0
- package/dist/dev/_virtual/{_@oxc-project_runtime@0.148.0 → _@oxc-project_runtime@0.149.0}/helpers/esm/defineProperty.mjs +1 -1
- package/dist/dev/_virtual/{_@oxc-project_runtime@0.148.0 → _@oxc-project_runtime@0.149.0}/helpers/esm/toPrimitive.mjs +1 -1
- package/dist/dev/_virtual/{_@oxc-project_runtime@0.148.0 → _@oxc-project_runtime@0.149.0}/helpers/esm/toPropertyKey.mjs +1 -1
- package/dist/dev/_virtual/{_@oxc-project_runtime@0.148.0 → _@oxc-project_runtime@0.149.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/index.mjs +12 -15
- package/dist/dev/internal-reactivity.d.mts +18 -0
- package/dist/dev/internal-reactivity.mjs +3 -2
- package/dist/dev/internal-runtime.d.mts +44 -0
- package/dist/dev/internal-runtime.mjs +19 -14
- package/dist/dev/internal-template.d.mts +2 -0
- package/dist/dev/jsxTypes.d.mts +9 -0
- package/dist/dev/macros/shared.d.mts +81 -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 +130 -0
- package/dist/dev/reactivity/asyncDerivation.mjs.map +1 -0
- package/dist/dev/reactivity/computed.d.mts +21 -0
- package/dist/dev/reactivity/computed.mjs +2 -2
- package/dist/dev/reactivity/computed.mjs.map +1 -1
- package/dist/dev/reactivity/core.d.mts +35 -0
- package/dist/dev/reactivity/core.mjs +156 -32
- 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/shallow.d.mts +22 -0
- package/dist/dev/reactivity/reactive/shared.d.mts +4 -0
- package/dist/dev/reactivity/reactive.d.mts +42 -0
- package/dist/dev/reactivity/readonly.d.mts +27 -0
- package/dist/dev/reactivity/readonly.mjs.map +1 -1
- package/dist/dev/reactivity/ref.d.mts +27 -0
- package/dist/dev/reactivity/ref.mjs +1 -1
- package/dist/dev/reactivity/shallowRef.d.mts +19 -0
- package/dist/dev/reactivity/toRefs.d.mts +43 -0
- package/dist/dev/reactivity/traverse.d.mts +8 -0
- package/dist/dev/reactivity/watch/types.d.mts +43 -0
- package/dist/dev/reactivity/watch.d.mts +22 -0
- package/dist/dev/router/createRouter.d.mts +8 -0
- package/dist/dev/router/createRouter.mjs +16 -3
- package/dist/dev/router/createRouter.mjs.map +1 -1
- package/dist/dev/router/navigationCore.d.mts +6 -0
- package/dist/dev/router/resolve.d.mts +6 -0
- package/dist/dev/router/routeSync.d.mts +1 -0
- package/dist/dev/router/types.d.mts +172 -0
- package/dist/dev/router/useRoute.d.mts +19 -0
- package/dist/dev/router/useRoute.mjs +23 -5
- package/dist/dev/router/useRoute.mjs.map +1 -1
- package/dist/dev/router/useRouter.d.mts +8 -0
- package/dist/dev/router.d.mts +10 -0
- package/dist/dev/routerInternal/query.d.mts +7 -0
- package/dist/dev/routerInternal/types.d.mts +9 -0
- package/dist/dev/runtime/app/computed.mjs +2 -2
- package/dist/dev/runtime/app/computed.mjs.map +1 -1
- package/dist/dev/runtime/app/context.mjs +8 -2
- package/dist/dev/runtime/app/context.mjs.map +1 -1
- package/dist/dev/runtime/app/diagnostics.mjs +12 -0
- package/dist/dev/runtime/app/diagnostics.mjs.map +1 -1
- package/dist/dev/runtime/app/mount.mjs +31 -28
- 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 +265 -0
- package/dist/dev/runtime/app/setData/commitTracker.mjs.map +1 -0
- package/dist/dev/runtime/app/setData/patchScheduler.mjs +47 -51
- package/dist/dev/runtime/app/setData/patchScheduler.mjs.map +1 -1
- package/dist/dev/runtime/app/setData/scheduler.d.mts +51 -0
- package/dist/dev/runtime/app/setData/scheduler.mjs +98 -111
- package/dist/dev/runtime/app/setData/scheduler.mjs.map +1 -1
- package/dist/dev/runtime/app/setData/snapshot.mjs +11 -1
- package/dist/dev/runtime/app/setData/snapshot.mjs.map +1 -1
- package/dist/dev/runtime/app.d.mts +8 -0
- package/dist/dev/runtime/app.mjs +18 -6
- package/dist/dev/runtime/app.mjs.map +1 -1
- package/dist/dev/runtime/bindingManifest.mjs +105 -0
- package/dist/dev/runtime/bindingManifest.mjs.map +1 -0
- package/dist/dev/runtime/capabilities.d.mts +75 -0
- package/dist/dev/runtime/capabilities.mjs +40 -0
- package/dist/dev/runtime/capabilities.mjs.map +1 -0
- package/dist/dev/runtime/css.d.mts +14 -0
- package/dist/dev/runtime/defaults.d.mts +12 -0
- package/dist/dev/runtime/define/componentDefinition.mjs +3 -0
- package/dist/dev/runtime/define/componentDefinition.mjs.map +1 -1
- package/dist/dev/runtime/define/optionsApi.mjs +1 -1
- package/dist/dev/runtime/define/props.mjs +30 -60
- package/dist/dev/runtime/define/props.mjs.map +1 -1
- package/dist/dev/runtime/define/scopedSlotOptions.mjs +37 -21
- package/dist/dev/runtime/define/scopedSlotOptions.mjs.map +1 -1
- package/dist/dev/runtime/define.d.mts +118 -0
- package/dist/dev/runtime/define.mjs +32 -44
- package/dist/dev/runtime/define.mjs.map +1 -1
- package/dist/dev/runtime/diff.mjs +1 -1
- package/dist/dev/runtime/disposables.d.mts +31 -0
- package/dist/dev/runtime/elementIntersectionObserver.d.mts +26 -0
- package/dist/dev/runtime/features/inlineEvents.d.mts +7 -0
- package/dist/dev/runtime/features/inlineEvents.mjs +25 -0
- package/dist/dev/runtime/features/inlineEvents.mjs.map +1 -0
- package/dist/dev/runtime/features/layout.d.mts +7 -0
- package/dist/dev/runtime/features/layout.mjs +44 -0
- package/dist/dev/runtime/features/layout.mjs.map +1 -0
- package/dist/dev/runtime/features/patchStrategy.d.mts +7 -0
- package/dist/dev/runtime/features/patchStrategy.mjs +129 -0
- package/dist/dev/runtime/features/patchStrategy.mjs.map +1 -0
- package/dist/dev/runtime/features/publicLayout.d.mts +24 -0
- package/dist/dev/runtime/features/publicLayout.mjs +81 -0
- package/dist/dev/runtime/features/publicLayout.mjs.map +1 -0
- package/dist/dev/runtime/features/scopedSlots.d.mts +23 -0
- package/dist/dev/runtime/features/scopedSlots.mjs +88 -0
- package/dist/dev/runtime/features/scopedSlots.mjs.map +1 -0
- package/dist/dev/runtime/features/setDataHighFrequencyWarning.d.mts +7 -0
- package/dist/dev/runtime/features/setDataHighFrequencyWarning.mjs +15 -0
- package/dist/dev/runtime/features/setDataHighFrequencyWarning.mjs.map +1 -0
- package/dist/dev/runtime/features/templateRefs.d.mts +7 -0
- package/dist/dev/runtime/features/templateRefs.mjs +39 -0
- package/dist/dev/runtime/features/templateRefs.mjs.map +1 -0
- package/dist/dev/runtime/hooks/base.d.mts +27 -0
- 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/vue.mjs +3 -5
- package/dist/dev/runtime/hooks/vue.mjs.map +1 -1
- package/dist/dev/runtime/hooks.d.mts +4 -0
- package/dist/dev/runtime/index.d.mts +46 -0
- package/dist/dev/runtime/inlineDataset.mjs +75 -0
- package/dist/dev/runtime/inlineDataset.mjs.map +1 -0
- package/dist/dev/runtime/intersectionObserver.d.mts +14 -0
- package/dist/dev/runtime/jsxIsland.d.mts +37 -0
- package/dist/dev/runtime/jsxIsland.mjs.map +1 -1
- package/dist/dev/runtime/layoutBridge.d.mts +55 -0
- package/dist/dev/runtime/layoutBridge.mjs.map +1 -1
- package/dist/dev/runtime/noSetData.d.mts +5 -0
- package/dist/dev/runtime/pageEnvironment.d.mts +50 -0
- package/dist/dev/runtime/pageLayout.d.mts +25 -0
- package/dist/dev/runtime/pageLayout.mjs.map +1 -1
- package/dist/dev/runtime/pageScroll.d.mts +29 -0
- package/dist/dev/runtime/platform.mjs +18 -1
- package/dist/dev/runtime/platform.mjs.map +1 -1
- package/dist/dev/runtime/provide.d.mts +60 -0
- package/dist/dev/runtime/provideStore.d.mts +7 -0
- package/dist/dev/runtime/publicRuntime.d.mts +22 -0
- package/dist/dev/runtime/publicRuntime.mjs +91 -0
- package/dist/dev/runtime/publicRuntime.mjs.map +1 -0
- package/dist/dev/runtime/pullDownRefresh.d.mts +12 -0
- package/dist/dev/runtime/register/app.d.mts +14 -0
- package/dist/dev/runtime/register/app.mjs +7 -10
- package/dist/dev/runtime/register/app.mjs.map +1 -1
- package/dist/dev/runtime/register/component/lifecycle.mjs +22 -6
- package/dist/dev/runtime/register/component/lifecycle.mjs.map +1 -1
- package/dist/dev/runtime/register/component/methods.mjs +7 -10
- package/dist/dev/runtime/register/component/methods.mjs.map +1 -1
- package/dist/dev/runtime/register/component/options.mjs.map +1 -1
- package/dist/dev/runtime/register/component/registerDefinition.mjs +64 -69
- package/dist/dev/runtime/register/component/registerDefinition.mjs.map +1 -1
- package/dist/dev/runtime/register/component.d.mts +17 -0
- package/dist/dev/runtime/register/inline.d.mts +15 -0
- package/dist/dev/runtime/register/inline.mjs +4 -64
- package/dist/dev/runtime/register/inline.mjs.map +1 -1
- package/dist/dev/runtime/register/runtimeInstance/setupContext.mjs +1 -1
- package/dist/dev/runtime/register/runtimeInstance/setupContext.mjs.map +1 -1
- package/dist/dev/runtime/register/runtimeInstance/setupPhase.mjs +4 -6
- package/dist/dev/runtime/register/runtimeInstance/setupPhase.mjs.map +1 -1
- package/dist/dev/runtime/register/runtimeInstance/setupSnapshot.mjs +26 -0
- package/dist/dev/runtime/register/runtimeInstance/setupSnapshot.mjs.map +1 -0
- 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 +402 -160
- package/dist/dev/runtime/register/runtimeInstance.mjs.map +1 -1
- 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/snapshot.mjs +6 -10
- 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.d.mts +5 -0
- package/dist/dev/runtime/scopedSlots.mjs +1 -1
- 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 -0
- package/dist/dev/runtime/selectorQuery.mjs.map +1 -1
- package/dist/dev/runtime/teardown.mjs +18 -0
- package/dist/dev/runtime/teardown.mjs.map +1 -0
- package/dist/dev/runtime/template.d.mts +6 -0
- package/dist/dev/runtime/templateRefTypes.d.mts +12 -0
- package/dist/dev/runtime/templateRefs/helpers.mjs.map +1 -1
- package/dist/dev/runtime/templateRefs.mjs +187 -118
- 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 +136 -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/updatePerformance.d.mts +13 -0
- package/dist/dev/runtime/use.d.mts +13 -0
- package/dist/dev/runtime/vueCompat/context.d.mts +8 -0
- package/dist/dev/runtime/vueCompat/model.d.mts +30 -0
- package/dist/dev/runtime/vueCompat/router.d.mts +29 -0
- package/dist/dev/runtime/vueCompat/router.mjs +18 -13
- 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 +2 -0
- 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/store/base.mjs +12 -18
- package/dist/dev/store/base.mjs.map +1 -1
- package/dist/dev/store/define/optionsStyle.mjs +13 -23
- package/dist/dev/store/define/optionsStyle.mjs.map +1 -1
- package/dist/dev/store/define/setupStyle.mjs +14 -24
- package/dist/dev/store/define/setupStyle.mjs.map +1 -1
- package/dist/dev/store/define/shared.mjs +44 -1
- package/dist/dev/store/define/shared.mjs.map +1 -1
- package/dist/dev/store/define.d.mts +28 -0
- package/dist/dev/store/define.mjs.map +1 -1
- package/dist/dev/store/manager.d.mts +8 -0
- package/dist/dev/store/storeToRefs.d.mts +13 -0
- package/dist/dev/store/types.d.mts +70 -0
- 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-demi.mjs +12 -15
- package/dist/dev/vue-demi.mjs.map +1 -1
- package/dist/dev/vue-types.d.mts +19 -0
- package/dist/dev/web-apis.d.mts +3 -0
- package/dist/index.d.mts +13 -14
- package/dist/index.mjs +1 -1
- package/dist/internal-reactivity.d.mts +2 -1
- package/dist/internal-reactivity.mjs +1 -1
- package/dist/internal-runtime.d.mts +13 -6
- package/dist/internal-runtime.mjs +1 -1
- package/dist/jsx-runtime.d.mts +47 -9
- package/dist/jsxTypes.d.mts +8 -0
- package/dist/miniprogram/jsx-runtime.d.mts +12 -0
- package/dist/miniprogram/jsx-runtime.mjs +1 -0
- package/dist/package.mjs +1 -1
- package/dist/reactivity/asyncDerivation.d.mts +40 -0
- package/dist/reactivity/asyncDerivation.mjs +1 -0
- package/dist/reactivity/computed.mjs +1 -1
- package/dist/reactivity/core.d.mts +1 -0
- package/dist/reactivity/core.mjs +1 -1
- package/dist/reactivity/index.d.mts +2 -1
- package/dist/reactivity/readonly.d.mts +1 -1
- package/dist/reactivity/ref.mjs +1 -1
- package/dist/router/createRouter.mjs +1 -1
- package/dist/router/useRoute.mjs +1 -1
- package/dist/runtime/app/computed.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.d.mts +12 -0
- package/dist/runtime/app/setData/commitTracker.mjs +1 -0
- package/dist/runtime/app/setData/patchScheduler.mjs +1 -1
- package/dist/runtime/app/setData/scheduler.d.mts +50 -0
- package/dist/runtime/app/setData/scheduler.mjs +1 -1
- package/dist/runtime/app/setData/snapshot.mjs +1 -1
- package/dist/runtime/app.mjs +1 -1
- package/dist/runtime/bindingManifest.mjs +1 -0
- package/dist/runtime/capabilities.d.mts +74 -0
- package/dist/runtime/capabilities.mjs +1 -0
- package/dist/runtime/define/componentDefinition.mjs +1 -1
- package/dist/runtime/define/optionsApi.mjs +1 -1
- package/dist/runtime/define/props.mjs +1 -1
- package/dist/runtime/define/scopedSlotOptions.mjs +1 -1
- package/dist/runtime/define.d.mts +5 -13
- package/dist/runtime/define.mjs +1 -1
- package/dist/runtime/diff.mjs +1 -1
- package/dist/runtime/features/inlineEvents.d.mts +6 -0
- package/dist/runtime/features/inlineEvents.mjs +1 -0
- package/dist/runtime/features/layout.d.mts +6 -0
- package/dist/runtime/features/layout.mjs +1 -0
- package/dist/runtime/features/patchStrategy.d.mts +6 -0
- package/dist/runtime/features/patchStrategy.mjs +1 -0
- package/dist/runtime/features/publicLayout.d.mts +23 -0
- package/dist/runtime/features/publicLayout.mjs +1 -0
- package/dist/runtime/features/scopedSlots.d.mts +22 -0
- package/dist/runtime/features/scopedSlots.mjs +1 -0
- package/dist/runtime/features/setDataHighFrequencyWarning.d.mts +6 -0
- package/dist/runtime/features/setDataHighFrequencyWarning.mjs +1 -0
- package/dist/runtime/features/templateRefs.d.mts +6 -0
- package/dist/runtime/features/templateRefs.mjs +1 -0
- package/dist/runtime/hooks/vue.d.mts +1 -2
- package/dist/runtime/hooks/vue.mjs +1 -1
- package/dist/runtime/index.d.mts +12 -14
- package/dist/runtime/inlineDataset.mjs +1 -0
- package/dist/runtime/jsxIsland.d.mts +2 -6
- package/dist/runtime/layoutBridge.d.mts +5 -9
- package/dist/runtime/pageLayout.d.mts +3 -4
- package/dist/runtime/platform.mjs +1 -1
- package/dist/runtime/publicRuntime.d.mts +21 -0
- package/dist/runtime/publicRuntime.mjs +1 -0
- package/dist/runtime/register/app.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/registerDefinition.mjs +1 -1
- package/dist/runtime/register/inline.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 -0
- package/dist/runtime/register/runtimeInstance.mjs +1 -1
- package/dist/runtime/register/snapshot.mjs +1 -1
- package/dist/runtime/scopedSlots.mjs +1 -1
- package/dist/runtime/selectorQuery.mjs +1 -1
- package/dist/runtime/teardown.mjs +1 -0
- package/dist/runtime/templateRefTypes.d.mts +5 -2
- package/dist/runtime/templateRefs.mjs +1 -1
- package/dist/runtime/types/miniprogram.d.mts +3 -0
- package/dist/runtime/types/options.d.mts +2 -2
- package/dist/runtime/types/props.d.mts +1 -1
- package/dist/runtime/types/setData.d.mts +18 -1
- package/dist/runtime/types.d.mts +3 -3
- package/dist/runtime/vueCompat/router.d.mts +5 -4
- package/dist/runtime/vueCompat/router.mjs +1 -1
- package/dist/runtime/vueCompat/templateRef.mjs +1 -1
- package/dist/store/base.mjs +1 -1
- package/dist/store/define/optionsStyle.mjs +1 -1
- package/dist/store/define/setupStyle.mjs +1 -1
- package/dist/store/define/shared.mjs +1 -1
- package/dist/store/define.d.mts +10 -8
- package/dist/store/types.d.mts +4 -4
- package/dist/tt/jsx-runtime.d.mts +12 -0
- package/dist/tt/jsx-runtime.mjs +1 -0
- package/dist/vue-demi.d.mts +13 -14
- package/dist/vue-demi.mjs +1 -1
- package/dist/weapp/jsx-runtime.d.mts +12 -0
- package/dist/weapp/jsx-runtime.mjs +1 -0
- package/package.json +26 -22
- package/dist/dev/jsx-runtime.mjs +0 -1
- package/dist/runtime/templateRefs.d.mts +0 -10
- package/dist/weappIntrinsicElements/base.d.mts +0 -21
- package/dist/weappIntrinsicElements/elements/ad-custom.d.mts +0 -12
- package/dist/weappIntrinsicElements/elements/ad.d.mts +0 -15
- package/dist/weappIntrinsicElements/elements/audio.d.mts +0 -19
- package/dist/weappIntrinsicElements/elements/block.d.mts +0 -7
- package/dist/weappIntrinsicElements/elements/button.d.mts +0 -39
- package/dist/weappIntrinsicElements/elements/camera.d.mts +0 -17
- package/dist/weappIntrinsicElements/elements/canvas.d.mts +0 -17
- package/dist/weappIntrinsicElements/elements/checkbox-group.d.mts +0 -12
- package/dist/weappIntrinsicElements/elements/checkbox.d.mts +0 -12
- package/dist/weappIntrinsicElements/elements/cover-image.d.mts +0 -9
- package/dist/weappIntrinsicElements/elements/cover-view.d.mts +0 -9
- package/dist/weappIntrinsicElements/elements/editor.d.mts +0 -21
- package/dist/weappIntrinsicElements/elements/form.d.mts +0 -15
- package/dist/weappIntrinsicElements/elements/functional-page-navigator.d.mts +0 -14
- package/dist/weappIntrinsicElements/elements/icon.d.mts +0 -11
- package/dist/weappIntrinsicElements/elements/image.d.mts +0 -17
- package/dist/weappIntrinsicElements/elements/import.d.mts +0 -9
- package/dist/weappIntrinsicElements/elements/include.d.mts +0 -9
- package/dist/weappIntrinsicElements/elements/input.d.mts +0 -46
- package/dist/weappIntrinsicElements/elements/keyboard-accessory.d.mts +0 -7
- package/dist/weappIntrinsicElements/elements/label.d.mts +0 -9
- package/dist/weappIntrinsicElements/elements/live-player.d.mts +0 -34
- package/dist/weappIntrinsicElements/elements/live-pusher.d.mts +0 -56
- package/dist/weappIntrinsicElements/elements/map.d.mts +0 -104
- package/dist/weappIntrinsicElements/elements/match-media.d.mts +0 -15
- package/dist/weappIntrinsicElements/elements/movable-area.d.mts +0 -25
- package/dist/weappIntrinsicElements/elements/movable-view.d.mts +0 -25
- package/dist/weappIntrinsicElements/elements/navigation-bar.d.mts +0 -14
- package/dist/weappIntrinsicElements/elements/navigator.d.mts +0 -24
- package/dist/weappIntrinsicElements/elements/official-account.d.mts +0 -12
- package/dist/weappIntrinsicElements/elements/open-data.d.mts +0 -14
- package/dist/weappIntrinsicElements/elements/page-container.d.mts +0 -24
- package/dist/weappIntrinsicElements/elements/page-meta.d.mts +0 -22
- package/dist/weappIntrinsicElements/elements/picker-view-column.d.mts +0 -17
- package/dist/weappIntrinsicElements/elements/picker-view.d.mts +0 -17
- package/dist/weappIntrinsicElements/elements/picker.d.mts +0 -22
- package/dist/weappIntrinsicElements/elements/progress.d.mts +0 -20
- package/dist/weappIntrinsicElements/elements/radio-group.d.mts +0 -12
- package/dist/weappIntrinsicElements/elements/radio.d.mts +0 -12
- package/dist/weappIntrinsicElements/elements/rich-text.d.mts +0 -16
- package/dist/weappIntrinsicElements/elements/scroll-view.d.mts +0 -67
- package/dist/weappIntrinsicElements/elements/share-element.d.mts +0 -17
- package/dist/weappIntrinsicElements/elements/slider.d.mts +0 -22
- package/dist/weappIntrinsicElements/elements/slot.d.mts +0 -9
- package/dist/weappIntrinsicElements/elements/swiper-item.d.mts +0 -41
- package/dist/weappIntrinsicElements/elements/swiper.d.mts +0 -41
- package/dist/weappIntrinsicElements/elements/switch.d.mts +0 -13
- package/dist/weappIntrinsicElements/elements/template.d.mts +0 -11
- package/dist/weappIntrinsicElements/elements/text.d.mts +0 -14
- package/dist/weappIntrinsicElements/elements/textarea.d.mts +0 -39
- package/dist/weappIntrinsicElements/elements/video.d.mts +0 -70
- package/dist/weappIntrinsicElements/elements/view.d.mts +0 -12
- package/dist/weappIntrinsicElements/elements/voip-room.d.mts +0 -13
- package/dist/weappIntrinsicElements/elements/web-view.d.mts +0 -12
- package/dist/weappIntrinsicElements.d.mts +0 -153
- /package/dist/_virtual/{_@oxc-project_runtime@0.148.0 → _@oxc-project_runtime@0.149.0}/helpers/esm/defineProperty.mjs +0 -0
- /package/dist/_virtual/{_@oxc-project_runtime@0.148.0 → _@oxc-project_runtime@0.149.0}/helpers/esm/toPrimitive.mjs +0 -0
- /package/dist/_virtual/{_@oxc-project_runtime@0.148.0 → _@oxc-project_runtime@0.149.0}/helpers/esm/toPropertyKey.mjs +0 -0
- /package/dist/_virtual/{_@oxc-project_runtime@0.148.0 → _@oxc-project_runtime@0.149.0}/helpers/esm/typeof.mjs +0 -0
|
@@ -6,7 +6,7 @@ import { computed } from "../../reactivity/computed.mjs";
|
|
|
6
6
|
import { wrapAction } from "../actions.mjs";
|
|
7
7
|
import { cloneDeep, resetObject } from "../utils.mjs";
|
|
8
8
|
import { createBaseApi } from "../base.mjs";
|
|
9
|
-
import { createSafeNotifier } from "./shared.mjs";
|
|
9
|
+
import { createSafeNotifier, createStoreMutationTransaction } from "./shared.mjs";
|
|
10
10
|
|
|
11
11
|
//#region src/store/define/optionsStyle.ts
|
|
12
12
|
function createOptionsStyleStore(id, options, manager) {
|
|
@@ -14,33 +14,26 @@ function createOptionsStyleStore(id, options, manager) {
|
|
|
14
14
|
const rawState = options.state ? options.state() : {};
|
|
15
15
|
const state = reactive(rawState);
|
|
16
16
|
const initialSnapshot = cloneDeep(toRaw(rawState));
|
|
17
|
-
let
|
|
18
|
-
const
|
|
17
|
+
let notifySubscribers = () => {};
|
|
18
|
+
const transaction = createStoreMutationTransaction((type) => notifySubscribers(type));
|
|
19
|
+
const base = createBaseApi(id, state, transaction.notify, () => {
|
|
19
20
|
resetObject(state, initialSnapshot);
|
|
20
|
-
notify("patch object");
|
|
21
21
|
});
|
|
22
|
-
let isPatching = false;
|
|
23
22
|
const rawPatch = base.api.$patch;
|
|
24
23
|
base.api.$patch = (patch) => {
|
|
25
|
-
|
|
26
|
-
try {
|
|
24
|
+
transaction.run(() => {
|
|
27
25
|
rawPatch(patch);
|
|
28
|
-
}
|
|
29
|
-
isPatching = false;
|
|
30
|
-
}
|
|
26
|
+
});
|
|
31
27
|
};
|
|
32
28
|
if (typeof base.api.$reset === "function") {
|
|
33
29
|
const rawReset = base.api.$reset;
|
|
34
30
|
base.api.$reset = () => {
|
|
35
|
-
|
|
36
|
-
try {
|
|
31
|
+
transaction.run(() => {
|
|
37
32
|
rawReset();
|
|
38
|
-
}
|
|
39
|
-
isPatching = false;
|
|
40
|
-
}
|
|
33
|
+
});
|
|
41
34
|
};
|
|
42
35
|
}
|
|
43
|
-
|
|
36
|
+
notifySubscribers = createSafeNotifier(id, base.subs, () => state);
|
|
44
37
|
const store = {};
|
|
45
38
|
for (const key of Object.getOwnPropertyNames(base.api)) {
|
|
46
39
|
const d = Object.getOwnPropertyDescriptor(base.api, key);
|
|
@@ -52,12 +45,9 @@ function createOptionsStyleStore(id, options, manager) {
|
|
|
52
45
|
return base.api.$state;
|
|
53
46
|
},
|
|
54
47
|
set(v) {
|
|
55
|
-
|
|
56
|
-
try {
|
|
48
|
+
transaction.run(() => {
|
|
57
49
|
base.api.$state = v;
|
|
58
|
-
}
|
|
59
|
-
isPatching = false;
|
|
60
|
-
}
|
|
50
|
+
});
|
|
61
51
|
}
|
|
62
52
|
});
|
|
63
53
|
else Object.defineProperty(store, key, d);
|
|
@@ -107,10 +97,10 @@ function createOptionsStyleStore(id, options, manager) {
|
|
|
107
97
|
initialized = true;
|
|
108
98
|
return;
|
|
109
99
|
}
|
|
110
|
-
if (
|
|
100
|
+
if (transaction.active || dispatchingDirect) return;
|
|
111
101
|
dispatchingDirect = true;
|
|
112
102
|
try {
|
|
113
|
-
|
|
103
|
+
notifySubscribers("direct");
|
|
114
104
|
} finally {
|
|
115
105
|
dispatchingDirect = false;
|
|
116
106
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"optionsStyle.mjs","names":[],"sources":["../../../../src/store/define/optionsStyle.ts"],"sourcesContent":["import { computed, effect, reactive, toRaw, touchReactive } from '../../reactivity'\nimport { wrapAction } from '../actions'\nimport { createBaseApi } from '../base'\nimport { cloneDeep, resetObject } from '../utils'\nimport { createSafeNotifier } from './shared'\n\nexport function createOptionsStyleStore(id: string, options: any, manager: any) {\n const rawState = options.state ? options.state() : {}\n const state = reactive(rawState)\n const initialSnapshot = cloneDeep(toRaw(rawState))\n let
|
|
1
|
+
{"version":3,"file":"optionsStyle.mjs","names":[],"sources":["../../../../src/store/define/optionsStyle.ts"],"sourcesContent":["import type { MutationType } from '../types'\nimport { computed, effect, reactive, toRaw, touchReactive } from '../../reactivity'\nimport { wrapAction } from '../actions'\nimport { createBaseApi } from '../base'\nimport { cloneDeep, resetObject } from '../utils'\nimport { createSafeNotifier, createStoreMutationTransaction } from './shared'\n\nexport function createOptionsStyleStore(id: string, options: any, manager: any) {\n const rawState = options.state ? options.state() : {}\n const state = reactive(rawState)\n const initialSnapshot = cloneDeep(toRaw(rawState))\n let notifySubscribers: (type: MutationType) => void = () => {}\n const transaction = createStoreMutationTransaction(type => notifySubscribers(type))\n const base = createBaseApi<typeof state>(id, state, transaction.notify, () => {\n resetObject(state as any, initialSnapshot)\n })\n\n const rawPatch = base.api.$patch\n base.api.$patch = (patch: Partial<typeof state> | ((nextState: typeof state) => void)) => {\n transaction.run(() => {\n rawPatch(patch as any)\n })\n }\n if (typeof base.api.$reset === 'function') {\n const rawReset = base.api.$reset\n base.api.$reset = () => {\n transaction.run(() => {\n rawReset()\n })\n }\n }\n\n notifySubscribers = createSafeNotifier(id, base.subs, () => state as any)\n\n const store: Record<string, any> = {}\n for (const key of Object.getOwnPropertyNames(base.api)) {\n const d = Object.getOwnPropertyDescriptor(base.api, key)\n if (d) {\n if (key === '$state') {\n Object.defineProperty(store, key, {\n enumerable: d.enumerable,\n configurable: d.configurable,\n get() {\n return (base.api as any).$state\n },\n set(v: any) {\n transaction.run(() => {\n ;(base.api as any).$state = v\n })\n },\n })\n }\n else {\n Object.defineProperty(store, key, d)\n }\n }\n }\n\n const getterDefs = options.getters ?? {}\n Object.keys(getterDefs).forEach((key) => {\n const getter = (getterDefs as any)[key]\n if (typeof getter === 'function') {\n const c = computed(() => getter.call(store, state))\n Object.defineProperty(store, key, {\n enumerable: true,\n configurable: true,\n get() {\n return c.value\n },\n })\n }\n })\n\n const actionDefs = options.actions ?? {}\n Object.keys(actionDefs).forEach((key) => {\n const act = (actionDefs as any)[key]\n if (typeof act === 'function') {\n const wrapped = wrapAction(store as any, key, (...args: any[]) => {\n return act.apply(store as any, args)\n }, base.actionSubs)\n store[key] = wrapped\n }\n })\n\n Object.keys(state).forEach((k) => {\n Object.defineProperty(store, k, {\n enumerable: true,\n configurable: true,\n get() {\n return (state as any)[k]\n },\n set(v: any) {\n ;(state as any)[k] = v\n },\n })\n })\n\n let initialized = false\n let dispatchingDirect = false\n effect(() => {\n touchReactive(state)\n if (!initialized) {\n initialized = true\n return\n }\n if (transaction.active || dispatchingDirect) {\n return\n }\n dispatchingDirect = true\n try {\n notifySubscribers('direct')\n }\n finally {\n dispatchingDirect = false\n }\n })\n\n const plugins = manager?._plugins ?? []\n for (const plugin of plugins) {\n try {\n plugin({ store })\n }\n catch {}\n }\n\n return store\n}\n"],"mappings":";;;;;;;;;;;AAOA,SAAgB,wBAAwB,IAAY,SAAc,SAAc;;CAC9E,MAAM,WAAW,QAAQ,QAAQ,QAAQ,MAAM,IAAI,CAAC;CACpD,MAAM,QAAQ,SAAS,QAAQ;CAC/B,MAAM,kBAAkB,UAAU,MAAM,QAAQ,CAAC;CACjD,IAAI,0BAAwD,CAAC;CAC7D,MAAM,cAAc,gCAA+B,SAAQ,kBAAkB,IAAI,CAAC;CAClF,MAAM,OAAO,cAA4B,IAAI,OAAO,YAAY,cAAc;EAC5E,YAAY,OAAc,eAAe;CAC3C,CAAC;CAED,MAAM,WAAW,KAAK,IAAI;CAC1B,KAAK,IAAI,UAAU,UAAuE;EACxF,YAAY,UAAU;GACpB,SAAS,KAAY;EACvB,CAAC;CACH;CACA,IAAI,OAAO,KAAK,IAAI,WAAW,YAAY;EACzC,MAAM,WAAW,KAAK,IAAI;EAC1B,KAAK,IAAI,eAAe;GACtB,YAAY,UAAU;IACpB,SAAS;GACX,CAAC;EACH;CACF;CAEA,oBAAoB,mBAAmB,IAAI,KAAK,YAAY,KAAY;CAExE,MAAM,QAA6B,CAAC;CACpC,KAAK,MAAM,OAAO,OAAO,oBAAoB,KAAK,GAAG,GAAG;EACtD,MAAM,IAAI,OAAO,yBAAyB,KAAK,KAAK,GAAG;EACvD,IAAI,GAAG;GACL,IAAI,QAAQ,UACV,OAAO,eAAe,OAAO,KAAK;IAChC,YAAY,EAAE;IACd,cAAc,EAAE;IAChB,MAAM;KACJ,OAAQ,KAAK,IAAY;IAC3B;IACA,IAAI,GAAQ;KACV,YAAY,UAAU;MACnB,AAAC,KAAK,IAAY,SAAS;KAC9B,CAAC;IACH;GACF,CAAC;QAGD,OAAO,eAAe,OAAO,KAAK,CAAC;EAEvC;CACF;CAEA,MAAM,iCAAa,QAAQ,sEAAW,CAAC;CACvC,OAAO,KAAK,UAAU,CAAC,CAAC,SAAS,QAAQ;EACvC,MAAM,SAAU,WAAmB;EACnC,IAAI,OAAO,WAAW,YAAY;GAChC,MAAM,IAAI,eAAe,OAAO,KAAK,OAAO,KAAK,CAAC;GAClD,OAAO,eAAe,OAAO,KAAK;IAChC,YAAY;IACZ,cAAc;IACd,MAAM;KACJ,OAAO,EAAE;IACX;GACF,CAAC;EACH;CACF,CAAC;CAED,MAAM,iCAAa,QAAQ,sEAAW,CAAC;CACvC,OAAO,KAAK,UAAU,CAAC,CAAC,SAAS,QAAQ;EACvC,MAAM,MAAO,WAAmB;EAChC,IAAI,OAAO,QAAQ,YAAY;GAC7B,MAAM,UAAU,WAAW,OAAc,MAAM,GAAG,SAAgB;IAChE,OAAO,IAAI,MAAM,OAAc,IAAI;GACrC,GAAG,KAAK,UAAU;GAClB,MAAM,OAAO;EACf;CACF,CAAC;CAED,OAAO,KAAK,KAAK,CAAC,CAAC,SAAS,MAAM;EAChC,OAAO,eAAe,OAAO,GAAG;GAC9B,YAAY;GACZ,cAAc;GACd,MAAM;IACJ,OAAQ,MAAc;GACxB;GACA,IAAI,GAAQ;IACT,AAAC,MAAc,KAAK;GACvB;EACF,CAAC;CACH,CAAC;CAED,IAAI,cAAc;CAClB,IAAI,oBAAoB;CACxB,aAAa;EACX,cAAc,KAAK;EACnB,IAAI,CAAC,aAAa;GAChB,cAAc;GACd;EACF;EACA,IAAI,YAAY,UAAU,mBACxB;EAEF,oBAAoB;EACpB,IAAI;GACF,kBAAkB,QAAQ;EAC5B,UACQ;GACN,oBAAoB;EACtB;CACF,CAAC;CAED,MAAM,iFAAU,QAAS,yEAAY,CAAC;CACtC,KAAK,MAAM,UAAU,SACnB,IAAI;EACF,OAAO,EAAE,MAAM,CAAC;CAClB,kBACM,CAAC;CAGT,OAAO;AACT"}
|
|
@@ -5,13 +5,13 @@ import { isRef } from "../../reactivity/ref.mjs";
|
|
|
5
5
|
import { wrapAction } from "../actions.mjs";
|
|
6
6
|
import { cloneDeep, resetObject } from "../utils.mjs";
|
|
7
7
|
import { createBaseApi } from "../base.mjs";
|
|
8
|
-
import { createSafeNotifier, isTrackableRef, snapshotValue } from "./shared.mjs";
|
|
8
|
+
import { createSafeNotifier, createStoreMutationTransaction, isTrackableRef, snapshotValue } from "./shared.mjs";
|
|
9
9
|
|
|
10
10
|
//#region src/store/define/setupStyle.ts
|
|
11
11
|
function createSetupStyleStore(id, setupFactory, manager) {
|
|
12
12
|
var _manager$_plugins;
|
|
13
13
|
const result = setupFactory();
|
|
14
|
-
let
|
|
14
|
+
let notifySubscribers = () => {};
|
|
15
15
|
const initialSnapshot = /* @__PURE__ */ new Map();
|
|
16
16
|
Object.keys(result).forEach((k) => {
|
|
17
17
|
const val = result[k];
|
|
@@ -36,32 +36,25 @@ function createSetupStyleStore(id, setupFactory, manager) {
|
|
|
36
36
|
if (isRef(current)) return;
|
|
37
37
|
instance[key] = cloneDeep(snapValue);
|
|
38
38
|
});
|
|
39
|
-
notify("patch object");
|
|
40
39
|
};
|
|
41
|
-
const
|
|
42
|
-
|
|
40
|
+
const transaction = createStoreMutationTransaction((type) => notifySubscribers(type));
|
|
41
|
+
const base = createBaseApi(id, void 0, transaction.notify, resetImpl);
|
|
43
42
|
const rawPatch = base.api.$patch;
|
|
44
43
|
base.api.$patch = (patch) => {
|
|
45
|
-
|
|
46
|
-
try {
|
|
44
|
+
transaction.run(() => {
|
|
47
45
|
rawPatch(patch);
|
|
48
|
-
}
|
|
49
|
-
isPatching = false;
|
|
50
|
-
}
|
|
46
|
+
});
|
|
51
47
|
};
|
|
52
48
|
if (typeof base.api.$reset === "function") {
|
|
53
49
|
const rawReset = base.api.$reset;
|
|
54
50
|
base.api.$reset = () => {
|
|
55
|
-
|
|
56
|
-
try {
|
|
51
|
+
transaction.run(() => {
|
|
57
52
|
rawReset();
|
|
58
|
-
}
|
|
59
|
-
isPatching = false;
|
|
60
|
-
}
|
|
53
|
+
});
|
|
61
54
|
};
|
|
62
55
|
}
|
|
63
56
|
instance = { ...result };
|
|
64
|
-
|
|
57
|
+
notifySubscribers = createSafeNotifier(id, base.subs, () => instance);
|
|
65
58
|
for (const key of Object.getOwnPropertyNames(base.api)) {
|
|
66
59
|
const d = Object.getOwnPropertyDescriptor(base.api, key);
|
|
67
60
|
if (d) {
|
|
@@ -72,12 +65,9 @@ function createSetupStyleStore(id, setupFactory, manager) {
|
|
|
72
65
|
return base.api.$state;
|
|
73
66
|
},
|
|
74
67
|
set(v) {
|
|
75
|
-
|
|
76
|
-
try {
|
|
68
|
+
transaction.run(() => {
|
|
77
69
|
base.api.$state = v;
|
|
78
|
-
}
|
|
79
|
-
isPatching = false;
|
|
80
|
-
}
|
|
70
|
+
});
|
|
81
71
|
}
|
|
82
72
|
});
|
|
83
73
|
else Object.defineProperty(instance, key, d);
|
|
@@ -109,7 +99,7 @@ function createSetupStyleStore(id, setupFactory, manager) {
|
|
|
109
99
|
},
|
|
110
100
|
set(next) {
|
|
111
101
|
innerValue = next;
|
|
112
|
-
if (!
|
|
102
|
+
if (!transaction.active) notifySubscribers("direct");
|
|
113
103
|
}
|
|
114
104
|
});
|
|
115
105
|
}
|
|
@@ -126,10 +116,10 @@ function createSetupStyleStore(id, setupFactory, manager) {
|
|
|
126
116
|
initialized = true;
|
|
127
117
|
return;
|
|
128
118
|
}
|
|
129
|
-
if (
|
|
119
|
+
if (transaction.active || dispatchingDirect) return;
|
|
130
120
|
dispatchingDirect = true;
|
|
131
121
|
try {
|
|
132
|
-
|
|
122
|
+
notifySubscribers("direct");
|
|
133
123
|
} finally {
|
|
134
124
|
dispatchingDirect = false;
|
|
135
125
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setupStyle.mjs","names":[],"sources":["../../../../src/store/define/setupStyle.ts"],"sourcesContent":["import { effect, isReactive, isRef, touchReactive } from '../../reactivity'\nimport { wrapAction } from '../actions'\nimport { createBaseApi } from '../base'\nimport { cloneDeep, resetObject } from '../utils'\nimport { createSafeNotifier, isTrackableRef, snapshotValue } from './shared'\n\nexport function createSetupStyleStore(id: string, setupFactory: () => Record<string, any>, manager: any) {\n const result = setupFactory()\n let
|
|
1
|
+
{"version":3,"file":"setupStyle.mjs","names":[],"sources":["../../../../src/store/define/setupStyle.ts"],"sourcesContent":["import type { MutationType } from '../types'\nimport { effect, isReactive, isRef, touchReactive } from '../../reactivity'\nimport { wrapAction } from '../actions'\nimport { createBaseApi } from '../base'\nimport { cloneDeep, resetObject } from '../utils'\nimport { createSafeNotifier, createStoreMutationTransaction, isTrackableRef, snapshotValue } from './shared'\n\nexport function createSetupStyleStore(id: string, setupFactory: () => Record<string, any>, manager: any) {\n const result = setupFactory()\n let notifySubscribers: (type: MutationType) => void = () => {}\n const initialSnapshot = new Map<string, any>()\n Object.keys(result).forEach((k) => {\n const val = (result as any)[k]\n if (typeof val === 'function' || k.startsWith('$')) {\n return\n }\n if (isRef(val) && !isTrackableRef(val)) {\n return\n }\n initialSnapshot.set(k, snapshotValue(val))\n })\n\n let instance: Record<string, any> = {}\n const resetImpl = () => {\n initialSnapshot.forEach((snapValue, key) => {\n const current = (instance as any)[key]\n if (isTrackableRef(current)) {\n try {\n current.value = cloneDeep(snapValue)\n }\n catch {\n // computed / readonly ref 不能写入,reset 时跳过这类派生状态。\n }\n return\n }\n if (isReactive(current)) {\n resetObject(current as any, snapValue)\n return\n }\n if (isRef(current)) {\n return\n }\n ;(instance as any)[key] = cloneDeep(snapValue)\n })\n }\n\n const transaction = createStoreMutationTransaction(type => notifySubscribers(type))\n const base = createBaseApi<any>(id, undefined, transaction.notify, resetImpl)\n const rawPatch = base.api.$patch\n base.api.$patch = (patch: Record<string, any> | ((state: any) => void)) => {\n transaction.run(() => {\n rawPatch(patch)\n })\n }\n if (typeof base.api.$reset === 'function') {\n const rawReset = base.api.$reset\n base.api.$reset = () => {\n transaction.run(() => {\n rawReset()\n })\n }\n }\n\n instance = { ...result }\n notifySubscribers = createSafeNotifier(id, base.subs, () => instance)\n\n // 将 setup 返回值与基础 API 合并,同时保留每个 getter/setter 的描述符,避免覆写访问器行为\n for (const key of Object.getOwnPropertyNames(base.api)) {\n const d = Object.getOwnPropertyDescriptor(base.api, key)\n if (d) {\n if (key === '$state') {\n Object.defineProperty(instance, key, {\n enumerable: d.enumerable,\n configurable: d.configurable,\n get() {\n return (base.api as any).$state\n },\n set(v: any) {\n transaction.run(() => {\n ;(base.api as any).$state = v\n })\n },\n })\n }\n else {\n Object.defineProperty(instance, key, d)\n }\n }\n }\n\n const directSources: any[] = []\n Object.keys(result).forEach((k) => {\n const val = (result as any)[k]\n if (typeof val === 'function' && !k.startsWith('$')) {\n ;(instance as any)[k] = wrapAction(instance, k, val, base.actionSubs)\n return\n }\n if (isTrackableRef(val)) {\n directSources.push(val)\n return\n }\n if (isReactive(val)) {\n directSources.push(val)\n return\n }\n if (isRef(val)) {\n return\n }\n if (!k.startsWith('$')) {\n let innerValue = val\n Object.defineProperty(instance, k, {\n enumerable: true,\n configurable: true,\n get() {\n return innerValue\n },\n set(next: any) {\n innerValue = next\n if (!transaction.active) {\n notifySubscribers('direct')\n }\n },\n })\n }\n })\n\n let dispatchingDirect = false\n if (directSources.length > 0) {\n let initialized = false\n effect(() => {\n directSources.forEach((source) => {\n if (isTrackableRef(source)) {\n void source.value\n }\n else {\n touchReactive(source)\n }\n })\n if (!initialized) {\n initialized = true\n return\n }\n if (transaction.active || dispatchingDirect) {\n return\n }\n dispatchingDirect = true\n try {\n notifySubscribers('direct')\n }\n finally {\n dispatchingDirect = false\n }\n })\n }\n\n const plugins = manager?._plugins ?? []\n for (const plugin of plugins) {\n try {\n plugin({ store: instance })\n }\n catch {}\n }\n\n return instance\n}\n"],"mappings":";;;;;;;;;;AAOA,SAAgB,sBAAsB,IAAY,cAAyC,SAAc;;CACvG,MAAM,SAAS,aAAa;CAC5B,IAAI,0BAAwD,CAAC;CAC7D,MAAM,kCAAkB,IAAI,IAAiB;CAC7C,OAAO,KAAK,MAAM,CAAC,CAAC,SAAS,MAAM;EACjC,MAAM,MAAO,OAAe;EAC5B,IAAI,OAAO,QAAQ,cAAc,EAAE,WAAW,GAAG,GAC/C;EAEF,IAAI,MAAM,GAAG,KAAK,CAAC,eAAe,GAAG,GACnC;EAEF,gBAAgB,IAAI,GAAG,cAAc,GAAG,CAAC;CAC3C,CAAC;CAED,IAAI,WAAgC,CAAC;CACrC,MAAM,kBAAkB;EACtB,gBAAgB,SAAS,WAAW,QAAQ;GAC1C,MAAM,UAAW,SAAiB;GAClC,IAAI,eAAe,OAAO,GAAG;IAC3B,IAAI;KACF,QAAQ,QAAQ,UAAU,SAAS;IACrC,kBACM,CAEN;IACA;GACF;GACA,IAAI,WAAW,OAAO,GAAG;IACvB,YAAY,SAAgB,SAAS;IACrC;GACF;GACA,IAAI,MAAM,OAAO,GACf;GAED,AAAC,SAAiB,OAAO,UAAU,SAAS;EAC/C,CAAC;CACH;CAEA,MAAM,cAAc,gCAA+B,SAAQ,kBAAkB,IAAI,CAAC;CAClF,MAAM,OAAO,cAAmB,IAAI,QAAW,YAAY,QAAQ,SAAS;CAC5E,MAAM,WAAW,KAAK,IAAI;CAC1B,KAAK,IAAI,UAAU,UAAwD;EACzE,YAAY,UAAU;GACpB,SAAS,KAAK;EAChB,CAAC;CACH;CACA,IAAI,OAAO,KAAK,IAAI,WAAW,YAAY;EACzC,MAAM,WAAW,KAAK,IAAI;EAC1B,KAAK,IAAI,eAAe;GACtB,YAAY,UAAU;IACpB,SAAS;GACX,CAAC;EACH;CACF;CAEA,WAAW,EAAE,GAAG,OAAO;CACvB,oBAAoB,mBAAmB,IAAI,KAAK,YAAY,QAAQ;CAGpE,KAAK,MAAM,OAAO,OAAO,oBAAoB,KAAK,GAAG,GAAG;EACtD,MAAM,IAAI,OAAO,yBAAyB,KAAK,KAAK,GAAG;EACvD,IAAI,GAAG;GACL,IAAI,QAAQ,UACV,OAAO,eAAe,UAAU,KAAK;IACnC,YAAY,EAAE;IACd,cAAc,EAAE;IAChB,MAAM;KACJ,OAAQ,KAAK,IAAY;IAC3B;IACA,IAAI,GAAQ;KACV,YAAY,UAAU;MACnB,AAAC,KAAK,IAAY,SAAS;KAC9B,CAAC;IACH;GACF,CAAC;QAGD,OAAO,eAAe,UAAU,KAAK,CAAC;EAE1C;CACF;CAEA,MAAM,gBAAuB,CAAC;CAC9B,OAAO,KAAK,MAAM,CAAC,CAAC,SAAS,MAAM;EACjC,MAAM,MAAO,OAAe;EAC5B,IAAI,OAAO,QAAQ,cAAc,CAAC,EAAE,WAAW,GAAG,GAAG;GAClD,AAAC,SAAiB,KAAK,WAAW,UAAU,GAAG,KAAK,KAAK,UAAU;GACpE;EACF;EACA,IAAI,eAAe,GAAG,GAAG;GACvB,cAAc,KAAK,GAAG;GACtB;EACF;EACA,IAAI,WAAW,GAAG,GAAG;GACnB,cAAc,KAAK,GAAG;GACtB;EACF;EACA,IAAI,MAAM,GAAG,GACX;EAEF,IAAI,CAAC,EAAE,WAAW,GAAG,GAAG;GACtB,IAAI,aAAa;GACjB,OAAO,eAAe,UAAU,GAAG;IACjC,YAAY;IACZ,cAAc;IACd,MAAM;KACJ,OAAO;IACT;IACA,IAAI,MAAW;KACb,aAAa;KACb,IAAI,CAAC,YAAY,QACf,kBAAkB,QAAQ;IAE9B;GACF,CAAC;EACH;CACF,CAAC;CAED,IAAI,oBAAoB;CACxB,IAAI,cAAc,SAAS,GAAG;EAC5B,IAAI,cAAc;EAClB,aAAa;GACX,cAAc,SAAS,WAAW;IAChC,IAAI,eAAe,MAAM,GACvB,AAAK,OAAO;SAGZ,cAAc,MAAM;GAExB,CAAC;GACD,IAAI,CAAC,aAAa;IAChB,cAAc;IACd;GACF;GACA,IAAI,YAAY,UAAU,mBACxB;GAEF,oBAAoB;GACpB,IAAI;IACF,kBAAkB,QAAQ;GAC5B,UACQ;IACN,oBAAoB;GACtB;EACF,CAAC;CACH;CAEA,MAAM,iFAAU,QAAS,yEAAY,CAAC;CACtC,KAAK,MAAM,UAAU,SACnB,IAAI;EACF,OAAO,EAAE,OAAO,SAAS,CAAC;CAC5B,mBACM,CAAC;CAGT,OAAO;AACT"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { queueBatchCallback } from "../../reactivity/core.mjs";
|
|
1
2
|
import { toRaw } from "../../reactivity/reactive/shared.mjs";
|
|
2
3
|
import { isReactive } from "../../reactivity/reactive.mjs";
|
|
3
4
|
import { isRef } from "../../reactivity/ref.mjs";
|
|
@@ -32,7 +33,49 @@ function createSafeNotifier(storeId, subs, getState) {
|
|
|
32
33
|
}
|
|
33
34
|
};
|
|
34
35
|
}
|
|
36
|
+
function createStoreMutationTransaction(notify) {
|
|
37
|
+
let depth = 0;
|
|
38
|
+
let pendingType;
|
|
39
|
+
let pendingFlush = false;
|
|
40
|
+
const publish = () => {
|
|
41
|
+
if (depth > 0) return;
|
|
42
|
+
const type = pendingType;
|
|
43
|
+
pendingType = void 0;
|
|
44
|
+
pendingFlush = false;
|
|
45
|
+
if (type) notify(type);
|
|
46
|
+
};
|
|
47
|
+
return {
|
|
48
|
+
get active() {
|
|
49
|
+
return depth > 0 || pendingFlush;
|
|
50
|
+
},
|
|
51
|
+
notify(type) {
|
|
52
|
+
if (depth === 0 && !pendingFlush) {
|
|
53
|
+
notify(type);
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
pendingType = type;
|
|
57
|
+
},
|
|
58
|
+
run(operation) {
|
|
59
|
+
const isOutermost = depth === 0;
|
|
60
|
+
const previousType = pendingType;
|
|
61
|
+
let succeeded = false;
|
|
62
|
+
depth++;
|
|
63
|
+
try {
|
|
64
|
+
const result = operation();
|
|
65
|
+
succeeded = true;
|
|
66
|
+
return result;
|
|
67
|
+
} finally {
|
|
68
|
+
depth--;
|
|
69
|
+
if (isOutermost) {
|
|
70
|
+
if (!succeeded) pendingType = previousType;
|
|
71
|
+
pendingFlush = true;
|
|
72
|
+
queueBatchCallback(publish);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
}
|
|
35
78
|
|
|
36
79
|
//#endregion
|
|
37
|
-
export { createSafeNotifier, isTrackableRef, snapshotValue };
|
|
80
|
+
export { createSafeNotifier, createStoreMutationTransaction, isTrackableRef, snapshotValue };
|
|
38
81
|
//# sourceMappingURL=shared.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared.mjs","names":[],"sources":["../../../../src/store/define/shared.ts"],"sourcesContent":["import type { MutationType, SubscriptionCallback } from '../types'\nimport { isReactive, isRef, toRaw } from '../../reactivity'\nimport { cloneDeep } from '../utils'\n\nexport function isTrackableRef(value: unknown) {\n return isRef(value)\n}\n\nexport function snapshotValue(value: unknown) {\n if (isReactive(value)) {\n return cloneDeep(toRaw(value as any))\n }\n if (isTrackableRef(value)) {\n return cloneDeep((value as any).value)\n }\n return cloneDeep(value)\n}\n\nexport function createSafeNotifier<S>(\n storeId: string,\n subs: Set<SubscriptionCallback<S>>,\n getState: () => S,\n) {\n let notifying = false\n return (type: MutationType) => {\n if (notifying) {\n return\n }\n notifying = true\n try {\n const state = getState()\n subs.forEach((cb) => {\n try {\n cb({ type, storeId }, state)\n }\n catch {}\n })\n }\n finally {\n notifying = false\n }\n }\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"shared.mjs","names":[],"sources":["../../../../src/store/define/shared.ts"],"sourcesContent":["import type { MutationType, SubscriptionCallback } from '../types'\nimport { isReactive, isRef, toRaw } from '../../reactivity'\nimport { queueBatchCallback } from '../../reactivity/core'\nimport { cloneDeep } from '../utils'\n\nexport function isTrackableRef(value: unknown) {\n return isRef(value)\n}\n\nexport function snapshotValue(value: unknown) {\n if (isReactive(value)) {\n return cloneDeep(toRaw(value as any))\n }\n if (isTrackableRef(value)) {\n return cloneDeep((value as any).value)\n }\n return cloneDeep(value)\n}\n\nexport function createSafeNotifier<S>(\n storeId: string,\n subs: Set<SubscriptionCallback<S>>,\n getState: () => S,\n) {\n let notifying = false\n return (type: MutationType) => {\n if (notifying) {\n return\n }\n notifying = true\n try {\n const state = getState()\n subs.forEach((cb) => {\n try {\n cb({ type, storeId }, state)\n }\n catch {}\n })\n }\n finally {\n notifying = false\n }\n }\n}\n\nexport function createStoreMutationTransaction(notify: (type: MutationType) => void) {\n let depth = 0\n let pendingType: MutationType | undefined\n let pendingFlush = false\n\n const publish = () => {\n if (depth > 0) {\n return\n }\n const type = pendingType\n pendingType = undefined\n pendingFlush = false\n if (type) {\n notify(type)\n }\n }\n\n return {\n get active() {\n return depth > 0 || pendingFlush\n },\n notify(type: MutationType) {\n if (depth === 0 && !pendingFlush) {\n notify(type)\n return\n }\n // 基础 API 最后记录外层 mutation 类型,避免内层 patch/reset 泄漏类型。\n pendingType = type\n },\n run<T>(operation: () => T): T {\n const isOutermost = depth === 0\n const previousType = pendingType\n let succeeded = false\n depth++\n try {\n const result = operation()\n succeeded = true\n return result\n }\n finally {\n depth--\n if (isOutermost) {\n if (!succeeded) {\n pendingType = previousType\n }\n // 嵌套批次返回时消费者可能尚未执行,直到真正 flush 后才释放 mutation 来源。\n pendingFlush = true\n queueBatchCallback(publish)\n }\n }\n },\n }\n}\n"],"mappings":";;;;;;;AAKA,SAAgB,eAAe,OAAgB;CAC7C,OAAO,MAAM,KAAK;AACpB;AAEA,SAAgB,cAAc,OAAgB;CAC5C,IAAI,WAAW,KAAK,GAClB,OAAO,UAAU,MAAM,KAAY,CAAC;CAEtC,IAAI,eAAe,KAAK,GACtB,OAAO,UAAW,MAAc,KAAK;CAEvC,OAAO,UAAU,KAAK;AACxB;AAEA,SAAgB,mBACd,SACA,MACA,UACA;CACA,IAAI,YAAY;CAChB,QAAQ,SAAuB;EAC7B,IAAI,WACF;EAEF,YAAY;EACZ,IAAI;GACF,MAAM,QAAQ,SAAS;GACvB,KAAK,SAAS,OAAO;IACnB,IAAI;KACF,GAAG;MAAE;MAAM;KAAQ,GAAG,KAAK;IAC7B,kBACM,CAAC;GACT,CAAC;EACH,UACQ;GACN,YAAY;EACd;CACF;AACF;AAEA,SAAgB,+BAA+B,QAAsC;CACnF,IAAI,QAAQ;CACZ,IAAI;CACJ,IAAI,eAAe;CAEnB,MAAM,gBAAgB;EACpB,IAAI,QAAQ,GACV;EAEF,MAAM,OAAO;EACb,cAAc;EACd,eAAe;EACf,IAAI,MACF,OAAO,IAAI;CAEf;CAEA,OAAO;EACL,IAAI,SAAS;GACX,OAAO,QAAQ,KAAK;EACtB;EACA,OAAO,MAAoB;GACzB,IAAI,UAAU,KAAK,CAAC,cAAc;IAChC,OAAO,IAAI;IACX;GACF;GAEA,cAAc;EAChB;EACA,IAAO,WAAuB;GAC5B,MAAM,cAAc,UAAU;GAC9B,MAAM,eAAe;GACrB,IAAI,YAAY;GAChB;GACA,IAAI;IACF,MAAM,SAAS,UAAU;IACzB,YAAY;IACZ,OAAO;GACT,UACQ;IACN;IACA,IAAI,aAAa;KACf,IAAI,CAAC,WACH,cAAc;KAGhB,eAAe;KACf,mBAAmB,OAAO;IAC5B;GACF;EACF;CACF;AACF"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { ActionSubscriber, DefineStoreOptions, StoreGetters, StoreSubscribeOptions, SubscriptionCallback } from "./types.mjs";
|
|
2
|
+
//#region src/store/define.d.ts
|
|
3
|
+
type SetupDefinition<T> = () => T;
|
|
4
|
+
type ActionResult<A> = Awaited<ReturnType<Extract<A[keyof A], (...args: any[]) => any>>>;
|
|
5
|
+
type OptionsStore<S extends Record<string, any>, G extends Record<string, any>, A extends Record<string, any>> = S & StoreGetters<G> & A & {
|
|
6
|
+
$id: string;
|
|
7
|
+
$state: S;
|
|
8
|
+
$patch: (patch: Partial<S> | ((state: S) => void)) => void;
|
|
9
|
+
$reset: () => void;
|
|
10
|
+
$subscribe: (cb: SubscriptionCallback<S>, opts?: StoreSubscribeOptions) => () => void;
|
|
11
|
+
$onAction: (cb: ActionSubscriber<OptionsStore<S, G, A>, ActionResult<A>>) => () => void;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* @description 定义一个 setup 风格的 store
|
|
15
|
+
*/
|
|
16
|
+
export declare function defineStore<T extends Record<string, any>>(id: string, setup: SetupDefinition<T>): () => T & {
|
|
17
|
+
$id: string;
|
|
18
|
+
$patch: (patch: Record<string, any> | ((state: any) => void)) => void;
|
|
19
|
+
$reset: () => void;
|
|
20
|
+
$subscribe: (cb: SubscriptionCallback<any>, opts?: StoreSubscribeOptions) => () => void;
|
|
21
|
+
$onAction: (cb: ActionSubscriber<any>) => () => void;
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* @description 定义一个 options 风格的 store
|
|
25
|
+
*/
|
|
26
|
+
export declare function defineStore<S extends Record<string, any>, G extends Record<string, any>, A extends Record<string, any>>(id: string, options: DefineStoreOptions<S, G, A>): () => OptionsStore<S, G, A>;
|
|
27
|
+
//#endregion
|
|
28
|
+
//# sourceMappingURL=define.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"define.mjs","names":[],"sources":["../../../src/store/define.ts"],"sourcesContent":["import type {\n ActionSubscriber,\n DefineStoreOptions,\n StoreGetters,\n StoreManager,\n StoreSubscribeOptions,\n SubscriptionCallback,\n} from './types'\nimport { effectScope } from '../reactivity'\nimport { createOptionsStyleStore } from './define/optionsStyle'\nimport { createSetupStyleStore } from './define/setupStyle'\nimport { createStore } from './manager'\n\ntype SetupDefinition<T> = () => T\n\
|
|
1
|
+
{"version":3,"file":"define.mjs","names":[],"sources":["../../../src/store/define.ts"],"sourcesContent":["import type {\n ActionSubscriber,\n DefineStoreOptions,\n StoreGetters,\n StoreManager,\n StoreSubscribeOptions,\n SubscriptionCallback,\n} from './types'\nimport { effectScope } from '../reactivity'\nimport { createOptionsStyleStore } from './define/optionsStyle'\nimport { createSetupStyleStore } from './define/setupStyle'\nimport { createStore } from './manager'\n\ntype SetupDefinition<T> = () => T\n\ntype ActionResult<A> = Awaited<ReturnType<Extract<A[keyof A], (...args: any[]) => any>>>\ntype OptionsStore<S extends Record<string, any>, G extends Record<string, any>, A extends Record<string, any>> = S & StoreGetters<G> & A & {\n $id: string\n $state: S\n $patch: (patch: Partial<S> | ((state: S) => void)) => void\n $reset: () => void\n $subscribe: (cb: SubscriptionCallback<S>, opts?: StoreSubscribeOptions) => () => void\n $onAction: (cb: ActionSubscriber<OptionsStore<S, G, A>, ActionResult<A>>) => () => void\n}\n\n/**\n * @description 定义一个 setup 风格的 store\n */\nexport function defineStore<T extends Record<string, any>>(id: string, setup: SetupDefinition<T>): () => T & {\n $id: string\n $patch: (patch: Record<string, any> | ((state: any) => void)) => void\n $reset: () => void\n $subscribe: (cb: SubscriptionCallback<any>, opts?: StoreSubscribeOptions) => () => void\n $onAction: (cb: ActionSubscriber<any>) => () => void\n}\n/**\n * @description 定义一个 options 风格的 store\n */\nexport function defineStore<S extends Record<string, any>, G extends Record<string, any>, A extends Record<string, any>>(\n id: string,\n options: DefineStoreOptions<S, G, A>,\n): () => OptionsStore<S, G, A>\nexport function defineStore(id: string, setupOrOptions: any) {\n let instance: any\n let created = false\n const manager = (createStore as any)._instance as StoreManager | undefined\n\n return function useStore(): any {\n if (created && instance) {\n return instance\n }\n created = true\n\n const storeScope = effectScope(true)\n instance = storeScope.run(() => {\n return typeof setupOrOptions === 'function'\n ? createSetupStyleStore(id, setupOrOptions, manager)\n : createOptionsStyleStore(id, setupOrOptions as DefineStoreOptions<any, any, any>, manager)\n })\n\n return instance\n }\n}\n"],"mappings":";;;;;;AA0CA,SAAgB,YAAY,IAAY,gBAAqB;CAC3D,IAAI;CACJ,IAAI,UAAU;CACd,MAAM,UAAW,YAAoB;CAErC,OAAO,SAAS,WAAgB;EAC9B,IAAI,WAAW,UACb,OAAO;EAET,UAAU;EAGV,WADmB,YAAY,IACX,CAAC,CAAC,UAAU;GAC9B,OAAO,OAAO,mBAAmB,aAC7B,sBAAsB,IAAI,gBAAgB,OAAO,IACjD,wBAAwB,IAAI,gBAAqD,OAAO;EAC9F,CAAC;EAED,OAAO;CACT;AACF"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Ref } from "../reactivity/ref.mjs";
|
|
2
|
+
import "../reactivity/index.mjs";
|
|
3
|
+
//#region src/store/storeToRefs.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* @description storeToRefs 返回类型推导
|
|
6
|
+
*/
|
|
7
|
+
export type StoreToRefsResult<T extends Record<string, any>> = { [K in keyof T]: T[K] extends ((...args: any[]) => any) ? T[K] : T[K] extends Ref<infer V> ? Ref<V> : Ref<T[K]>; };
|
|
8
|
+
/**
|
|
9
|
+
* @description 将 store 状态转换为 Ref
|
|
10
|
+
*/
|
|
11
|
+
export declare function storeToRefs<T extends Record<string, any>>(store: T): StoreToRefsResult<T>;
|
|
12
|
+
//#endregion
|
|
13
|
+
//# sourceMappingURL=storeToRefs.d.mts.map
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
//#region src/store/types.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* @description Store 变更类型
|
|
4
|
+
*/
|
|
5
|
+
export type MutationType = 'patch object' | 'patch function' | 'direct';
|
|
6
|
+
/**
|
|
7
|
+
* @description Store 订阅回调签名
|
|
8
|
+
*/
|
|
9
|
+
export interface SubscriptionCallback<S = any> {
|
|
10
|
+
(mutation: {
|
|
11
|
+
type: MutationType;
|
|
12
|
+
storeId: string;
|
|
13
|
+
}, state: S): void;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* @description Store 订阅选项
|
|
17
|
+
*/
|
|
18
|
+
export interface StoreSubscribeOptions {
|
|
19
|
+
/**
|
|
20
|
+
* @description 是否在卸载后仍保留订阅(适用于跨页面生命周期的订阅)
|
|
21
|
+
*/
|
|
22
|
+
detached?: boolean;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* @description Action 订阅回调上下文
|
|
26
|
+
*/
|
|
27
|
+
export interface ActionContext<TStore = any, TResult = any> {
|
|
28
|
+
name: string;
|
|
29
|
+
store: TStore;
|
|
30
|
+
args: any[];
|
|
31
|
+
after: (cb: (result: TResult) => void) => void;
|
|
32
|
+
onError: (cb: (error: any) => void) => void;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* @description Action 订阅回调类型
|
|
36
|
+
*/
|
|
37
|
+
export interface ActionSubscriber<TStore = any, TResult = any> {
|
|
38
|
+
(context: ActionContext<TStore, TResult>): void;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* @description Store 管理器(插件与共享实例)
|
|
42
|
+
*/
|
|
43
|
+
export interface StoreManager {
|
|
44
|
+
install: (app: any) => void;
|
|
45
|
+
_stores: Map<string, any>;
|
|
46
|
+
use: (plugin: (context: {
|
|
47
|
+
store: any;
|
|
48
|
+
}) => void) => StoreManager;
|
|
49
|
+
_plugins: Array<(context: {
|
|
50
|
+
store: any;
|
|
51
|
+
}) => void>;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* @description Getter 定义集合
|
|
55
|
+
*/
|
|
56
|
+
export type GetterTree<S extends Record<string, any>> = Record<string, (state: S) => any>;
|
|
57
|
+
/**
|
|
58
|
+
* @description 从 Getter 定义中推导返回类型
|
|
59
|
+
*/
|
|
60
|
+
export type StoreGetters<G extends GetterTree<any>> = { [K in keyof G]: G[K] extends ((...args: any[]) => infer R) ? R : never; };
|
|
61
|
+
/**
|
|
62
|
+
* @description defineStore(options) 的配置类型
|
|
63
|
+
*/
|
|
64
|
+
export interface DefineStoreOptions<S extends Record<string, any>, G extends GetterTree<S>, A extends Record<string, any>> {
|
|
65
|
+
state: () => S;
|
|
66
|
+
getters?: G & Record<string, (state: S) => any> & ThisType<S & StoreGetters<G> & A>;
|
|
67
|
+
actions?: A & ThisType<S & StoreGetters<G> & A>;
|
|
68
|
+
}
|
|
69
|
+
//#endregion
|
|
70
|
+
//# sourceMappingURL=types.d.mts.map
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ActionContext, ActionSubscriber, DefineStoreOptions, MutationType, StoreManager, StoreSubscribeOptions, SubscriptionCallback } from "./store/types.mjs";
|
|
2
|
+
import { defineStore } from "./store/define.mjs";
|
|
3
|
+
import { createStore } from "./store/manager.mjs";
|
|
4
|
+
import { StoreToRefsResult, storeToRefs } from "./store/storeToRefs.mjs";
|
|
5
|
+
export { type ActionContext, type ActionSubscriber, type DefineStoreOptions, type MutationType, type StoreManager, type StoreSubscribeOptions, type StoreToRefsResult, type SubscriptionCallback, createStore, defineStore, storeToRefs };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { WevuGlobalComponents, WevuGlobalDirectives } from "./runtime/types.mjs";
|
|
2
|
+
//#region src/vue-augment.d.ts
|
|
3
|
+
declare module '@vue/runtime-core' {
|
|
4
|
+
interface GlobalComponents extends WevuGlobalComponents {}
|
|
5
|
+
interface GlobalDirectives extends WevuGlobalDirectives {}
|
|
6
|
+
}
|
|
7
|
+
//#endregion
|
|
8
|
+
//# sourceMappingURL=vue-augment.d.mts.map
|
|
@@ -0,0 +1,87 @@
|
|
|
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 { ComponentPublicInstance, ComputedDefinitions, ExtractComputed, ExtractMethods, MethodDefinitions, ModelBinding, ModelBindingOptions, ModelBindingPayload } from "./runtime/types/core.mjs";
|
|
23
|
+
import { AppConfig, InternalRuntimeState, InternalRuntimeStateFields, RuntimeApp, RuntimeInstance, WevuPlugin } from "./runtime/types/runtime.mjs";
|
|
24
|
+
import { SetupContext, SetupContextIntersectionObserver, SetupContextIntersectionObserverOptions, SetupContextNativeInstance, SetupContextSelectorQuery, SetupFunction } from "./runtime/types/props/setup.mjs";
|
|
25
|
+
import { AllowedComponentProps, ComponentCustomProps, ComponentOptionsMixin, DefineComponent, NativeComponent, ObjectDirective, PublicProps, ShallowUnwrapRef, VNode, VNodeProps } from "./vue-types.mjs";
|
|
26
|
+
import { SetDataBindingDiagnostic, SetDataDebugInfo, SetDataSnapshotOptions } from "./runtime/types/setData.mjs";
|
|
27
|
+
import { CreateAppOptions, DataOption, DefineAppOptions, DefineComponentOptions, PageFeatures } from "./runtime/types/options.mjs";
|
|
28
|
+
import { GlobalComponents, GlobalDirectives, MiniProgramTemplateRefValue, TemplateRefValue, TemplateRefs, WevuGlobalComponents, WevuGlobalDirectives } from "./runtime/types.mjs";
|
|
29
|
+
import { useCssModule } from "./runtime/css.mjs";
|
|
30
|
+
import { WevuDefaults, resetWevuDefaults } from "./runtime/defaults.mjs";
|
|
31
|
+
import { ComponentDefinition, DefineComponentTypePropsOptions, DefineComponentWithTypeProps, SetupContextWithTypeProps, SetupFunctionWithTypeProps, WevuComponentConstructor, WevuDefinedComponent } from "./runtime/define.mjs";
|
|
32
|
+
import { DisposableBag, DisposableLike, DisposableMethodName, DisposableObject, useDisposables } from "./runtime/disposables.mjs";
|
|
33
|
+
import { ElementIntersectionObserverCallback, UseElementIntersectionObserverOptions, UseElementIntersectionObserverReturn, useElementIntersectionObserver } from "./runtime/elementIntersectionObserver.mjs";
|
|
34
|
+
import { PageLayoutState, WevuPageLayoutMap } from "./runtime/pageLayout.mjs";
|
|
35
|
+
import { LayoutHostBinding } from "./runtime/capabilities.mjs";
|
|
36
|
+
import { LayoutBridgeInstance } from "./runtime/layoutBridge.mjs";
|
|
37
|
+
import { registerPageLayoutBridge, registerRuntimeLayoutHosts, resolveLayoutBridge, resolveLayoutHost, resolveRuntimePageLayoutName, setPageLayout, syncRuntimePageLayoutState, syncRuntimePageLayoutStateFromRuntime, unregisterPageLayoutBridge, unregisterRuntimeLayoutHosts, useLayoutBridge, useLayoutHosts, usePageLayout, waitForLayoutHost } from "./runtime/features/publicLayout.mjs";
|
|
38
|
+
import { callHookList, callHookReturn, getCurrentInstance, getCurrentSetupContext, setCurrentInstance, setCurrentSetupContext } from "./runtime/hooks/base.mjs";
|
|
39
|
+
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";
|
|
40
|
+
import { callUpdateHooks, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onServerPrefetch, onUnmounted, onUpdated } from "./runtime/hooks/vue.mjs";
|
|
41
|
+
import { UseIntersectionObserverOptions, UseIntersectionObserverResult, useIntersectionObserver } from "./runtime/intersectionObserver.mjs";
|
|
42
|
+
import { isNoSetData, markNoSetData } from "./runtime/noSetData.mjs";
|
|
43
|
+
import { NavigationBarMetrics, PageStackSnapshot, UseNavigationBarMetricsOptions, UsePageStackOptions, getCurrentPageStackSnapshot, getNavigationBarMetrics, useNavigationBarMetrics, usePageStack } from "./runtime/pageEnvironment.mjs";
|
|
44
|
+
import { UsePageScrollThrottleOptions, UsePageScrollThrottleStopHandle, usePageScrollThrottle } from "./runtime/pageScroll.mjs";
|
|
45
|
+
import { setGlobalProvidedValue } from "./runtime/provideStore.mjs";
|
|
46
|
+
import { hasInjectionContext, inject, injectGlobal, provide, provideGlobal } from "./runtime/provide.mjs";
|
|
47
|
+
import { setRuntimeSetDataVisibility, teardownRuntimeInstance } from "./runtime/register/runtimeInstance.mjs";
|
|
48
|
+
import { runSetupFunction } from "./runtime/register/setup.mjs";
|
|
49
|
+
import { createApp, createWevuComponent, createWevuScopedSlotComponent, defineComponent, mountRuntimeInstance, registerApp, registerComponent, setWevuDefaults } from "./runtime/publicRuntime.mjs";
|
|
50
|
+
import { PullDownRefreshHandler, UseAsyncPullDownRefreshOptions, useAsyncPullDownRefresh } from "./runtime/pullDownRefresh.mjs";
|
|
51
|
+
import { UseAllBoundingClientRectOptions, UseAllScrollOffsetOptions, UseAllSelectorFieldsOptions, UseBoundingClientRectOptions, UseScrollOffsetOptions, UseSelectorFieldsOptions, UseSelectorQueryOptions, useBoundingClientRect, useScrollOffset, useSelectorFields, useSelectorQuery } from "./runtime/selectorQuery.mjs";
|
|
52
|
+
import { normalizeClass, normalizeStyle, resolvePropValue } from "./runtime/template.mjs";
|
|
53
|
+
import { UpdatePerformanceListener, UpdatePerformanceListenerResult, UseUpdatePerformanceListenerStopHandle, useUpdatePerformanceListener } from "./runtime/updatePerformance.mjs";
|
|
54
|
+
import { defineAppSetup, use } from "./runtime/use.mjs";
|
|
55
|
+
import { useAttrs, useNativeInstance, useSlots } from "./runtime/vueCompat/context.mjs";
|
|
56
|
+
import { ModelModifiers, UseModelOptions, mergeModels, useBindModel, useChangeModel, useModel } from "./runtime/vueCompat/model.mjs";
|
|
57
|
+
import { useNativePageRouter, useNativeRouter } from "./runtime/vueCompat/router.mjs";
|
|
58
|
+
import { TemplateRef, useTemplateRef } from "./runtime/vueCompat/templateRef.mjs";
|
|
59
|
+
import { ComponentTypeEmits, EmitFn, EmitsOptions } from "./macros/shared.mjs";
|
|
60
|
+
import { DefineModelModifiers, DefineModelTransformOptions, ModelRef, PageLayoutMeta, PageMeta, defineEmits, defineExpose, defineModel, defineOptions, definePageMeta, defineProps, defineSlots, withDefaults } from "./macros.mjs";
|
|
61
|
+
import { ActionContext, ActionSubscriber, DefineStoreOptions, MutationType, StoreManager, StoreSubscribeOptions, SubscriptionCallback } from "./store/types.mjs";
|
|
62
|
+
import { defineStore } from "./store/define.mjs";
|
|
63
|
+
import { createStore } from "./store/manager.mjs";
|
|
64
|
+
import { StoreToRefsResult, storeToRefs } from "./store/storeToRefs.mjs";
|
|
65
|
+
import { version } from "./version.mjs";
|
|
66
|
+
import "./index.mjs";
|
|
67
|
+
export * from "@wevu/web-apis";
|
|
68
|
+
//#region src/vue-demi.d.ts
|
|
69
|
+
/**
|
|
70
|
+
* 标记当前兼容层运行在 Vue 3 风格分支。
|
|
71
|
+
*/
|
|
72
|
+
export declare const isVue2 = false;
|
|
73
|
+
/**
|
|
74
|
+
* 标记当前兼容层运行在 Vue 3 风格分支。
|
|
75
|
+
*/
|
|
76
|
+
export declare const isVue3 = true;
|
|
77
|
+
/**
|
|
78
|
+
* 与 `vue-demi` 保持一致,Vue 3 分支下不暴露 Vue 2 构造器。
|
|
79
|
+
*/
|
|
80
|
+
export declare const Vue2: undefined;
|
|
81
|
+
/**
|
|
82
|
+
* Vue 3 分支的 `vue-demi.install()` 为 no-op,这里保持同样语义。
|
|
83
|
+
*/
|
|
84
|
+
export declare function install(): void;
|
|
85
|
+
//#endregion
|
|
86
|
+
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, type MutationType, type NativeComponent, type NativePropType, type NativePropsOptions, type NativeTypeHint, type NativeTypedProperty, NavigationBarMetrics, type ObjectDirective, type OnCleanup, type PageFeatures, PageLayoutMeta, type PageLayoutState, PageMeta, PageStackSnapshot, 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 StoreManager, type StoreSubscribeOptions, type StoreToRefsResult, type SubscriptionCallback, 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, createStore, createWevuComponent, createWevuScopedSlotComponent, customRef, defineAppSetup, defineComponent, defineEmits, defineExpose, defineModel, defineOptions, definePageMeta, defineProps, defineSlots, defineStore, effect, effectScope, endBatch, 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, 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 };
|
|
87
|
+
//# sourceMappingURL=vue-demi.d.mts.map
|