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
|
@@ -1 +1 @@
|
|
|
1
|
-
import{getMiniProgramRuntimeGlobalObject as e}from"../../platform.mjs";import{callHookList as t}from"../../hooks/base.mjs";import{
|
|
1
|
+
import{getMiniProgramRuntimeGlobalObject as e}from"../../platform.mjs";import{callHookList as t}from"../../hooks/base.mjs";import{requireRuntimeCapability as n,runtimeCapabilityRegistry as r}from"../../capabilities.mjs";import{runTeardownSteps as i}from"../../teardown.mjs";import{enableDeferredSetData as a,mountRuntimeInstance as o,refreshRuntimeInstance as s,setRuntimeSetDataVisibility as c,teardownRuntimeInstance as l}from"../runtimeInstance.mjs";import{ensureInitialNavigation as u}from"../../../router/initialNavigation.mjs";import{registerNativeComponentDefinition as d}from"./registerNativeDefinition.mjs";import{WEAPP_VITE_STATEFUL_HMR_BRIDGE_KEY as f,WEVU_PUBLIC_RUNTIME_KEY as p,WEVU_READY_CALLED_KEY as m,WEVU_RESOLVE_PUBLIC_INSTANCE_METHOD as h,WEVU_RUNTIME_KEY as ee}from"@weapp-core/constants";function g(g){var _;let{runtimeApp:v,watch:y,setup:b,restOptions:x,pageLifecycleHooks:S,finalObservers:C,userLifetimes:w,userPageLifetimes:T,finalMethods:E,finalOptions:D,applyExtraInstanceFields:O,templateRefs:k,layoutHosts:A,attachWevuPropKeys:j,setupLifecycle:M,syncWevuPropsFromInstance:N,directPropsDerivedKeys:P,isPage:F,vueLifecycles:I,getRuntimeOwnerLabel:L,registerNative:R=!0}=g,z=Array.isArray(k)&&k.length>0?k:void 0;z&&n(`templateRefs`,`registerComponentDefinition(template refs)`);let B=Array.isArray(A)&&A.length>0?A:void 0,V=B?n(`layout`,`registerComponentDefinition(layout hosts)`):void 0,H=(e,t)=>{if(z){var n;(n=r.templateRefs)==null||n.schedule(e,t);return}t==null||t()},U=e=>{var t;let n=(t=e.__wevu)==null?e[p]:t;if(n)return n;let r=e.$state;if(r&&typeof r==`object`)return r[ee]},W=e=>{var t,n,i;return((t=U(e))==null?void 0:t.proxy)||((n=(i=r.scopedSlots)==null?void 0:i.resolveLifecycleProxy(e))==null?e:n)},G=e=>{let t=U(e);return t?{runtime:t,mounted:!1}:(O(e),j(e),o(e,v,y,b,{deferSetData:!0,snapshotOmitKeys:P}),N(e),a(e),{runtime:U(e),mounted:!0})},K=(e,t,n)=>{let r=I[t];if(typeof r==`function`)return r.apply(W(e),n)},q=(e,t)=>{if(!F){t();return}u(e,void 0,{start:!1,onComplete:e=>{e&&t()}})||t()},J=e=>{U(e)||typeof I.mounted!=`function`||G(e).mounted&&(K(e,`created`,[]),K(e,`beforeMount`,[]))},Y={},X=e=>{B&&(V==null||V.attachHosts(B,e))},Z=e=>{F&&V&&(V==null||V.attachPageSetter(e))};if(F)for(let e of[`onPullDownRefresh`,`onReachBottom`,`onShareAppMessage`,`onShareTimeline`,`onAddToFavorites`]){let t=S[e];typeof t==`function`&&typeof E[e]!=`function`&&(Y[e]=function(...e){return t.apply(this,e)})}let Q={...x,...F?S:{},observers:C,lifetimes:{...w,created:function(...e){if(O(this),j(this),z){var t;(t=r.templateRefs)==null||t.attachBindings(this,z)}q(this,()=>{if(K(this,`beforeCreate`,e),M===`created`){try{o(this,v,y,b,{deferSetData:!0,snapshotOmitKeys:P})}catch(e){let t=L(this);throw Error(`[wevu] mount runtime failed in created (${t}): ${e instanceof Error?e.message:String(e)}`)}N(this),Z(this)}typeof w.created==`function`&&w.created.apply(this,e)})},moved:function(...e){t(this,`onMoved`,e),typeof w.moved==`function`&&w.moved.apply(this,e)},attached:function(...e){var n;if(O(this),j(this),z&&!((n=r.templateRefs)!=null&&n.hasBindings(this))){var i;(i=r.templateRefs)==null||i.attachBindings(this,z)}q(this,()=>{if(M!==`created`||!this.__wevu)try{o(this,v,y,b,{deferSetData:!0,snapshotOmitKeys:P})}catch(e){let t=L(this);throw Error(`[wevu] mount runtime failed in attached (${t}): ${e instanceof Error?e.message:String(e)}`)}N(this),K(this,`created`,e),K(this,`beforeMount`,e),Z(this),X(this),a(this),t(this,`onAttached`,e),typeof w.attached==`function`&&w.attached.apply(this,e)})},ready:function(...e){if(!F||this[m]||!u(this,void 0,{start:!0,onComplete:t=>{t&&!this.__wevuInitialNavigationReady&&(this.__wevuInitialNavigationReady=!0,Q.lifetimes.ready.call(this,...e))}})||this.__wevuInitialNavigationReady){if(J(this),F&&typeof S.onReady==`function`){let t=!!this[m];if(S.onReady.call(this,...e),!t){let t=()=>K(this,`mounted`,e);u(this,void 0,{start:!1,onComplete:e=>{e&&t()}})||t()}typeof w.ready==`function`&&w.ready.apply(this,e);return}if(!this[m]){var n;this[m]=!0,N(this),(n=r.templateRefs)==null||n.scheduleOwner(this),H(this,()=>{t(this,`onReady`,e),K(this,`mounted`,e),typeof w.ready==`function`&&w.ready.apply(this,e)});return}typeof w.ready==`function`&&w.ready.apply(this,e)}},detached:function(...e){if(F&&typeof S.onUnload==`function`){i([()=>K(this,`beforeUnmount`,e),()=>K(this,`beforeDestroy`,e),()=>{var e;return(e=r.templateRefs)==null?void 0:e.scheduleOwner(this)},()=>t(this,`onDetached`,e),()=>S.onUnload.call(this,...e),()=>{typeof w.detached==`function`&&w.detached.apply(this,e)},()=>K(this,`unmounted`,e),()=>K(this,`destroyed`,e)]);return}i([()=>K(this,`beforeUnmount`,e),()=>K(this,`beforeDestroy`,e),()=>{var e;return(e=r.templateRefs)==null?void 0:e.scheduleOwner(this)},()=>t(this,`onDetached`,e),()=>{B&&(V==null||V.detachHosts(B,this))},()=>l(this),()=>K(this,`unmounted`,e),()=>K(this,`destroyed`,e),()=>{typeof w.detached==`function`&&w.detached.apply(this,e)}])},error:function(...e){t(this,`onError`,e),typeof w.error==`function`&&w.error.apply(this,e)}},pageLifetimes:{...T,show:function(...e){if(F&&typeof S.onShow==`function`){S.onShow.call(this,...e),typeof T.show==`function`&&T.show.apply(this,e);return}c(this,!0),t(this,`onShow`,e),typeof T.show==`function`&&T.show.apply(this,e)},hide:function(...e){if(F&&typeof S.onHide==`function`){S.onHide.call(this,...e),typeof T.hide==`function`&&T.hide.apply(this,e);return}c(this,!1),t(this,`onHide`,e),typeof T.hide==`function`&&T.hide.apply(this,e)},resize:function(...e){if(F&&typeof S.onResize==`function`){S.onResize.call(this,...e),typeof T.resize==`function`&&T.resize.apply(this,e);return}t(this,`onResize`,e),typeof T.resize==`function`&&T.resize.apply(this,e)},routeDone:function(...e){if(F&&typeof S.onRouteDone==`function`){S.onRouteDone.call(this,...e),typeof T.routeDone==`function`&&T.routeDone.apply(this,e);return}t(this,`onRouteDone`,e),typeof T.routeDone==`function`&&T.routeDone.apply(this,e)}},methods:{...Y,...E,[h]:function(){var e;let t=G(this);return t.mounted&&(K(this,`created`,[]),K(this,`beforeMount`,[])),(e=t.runtime)==null?void 0:e.proxy}},options:D};if(!R)return Q;let $=(_=e())==null?void 0:_[f];if(typeof($==null?void 0:$.trackWevuComponent)==`function`){let e=$.trackWevuComponent(Q,(e,t)=>{s(e,v,y,b,{snapshotOmitKeys:P,stateSnapshot:t}),N(e),Z(e),X(e),a(e,{rehydrateSetupState:!0})});return $.isApplying()||d(e,F),e}return d(Q,F),Q}export{g as registerComponentDefinition};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{isRef as e}from"../../reactivity/ref.mjs";
|
|
1
|
+
import{isRef as e}from"../../reactivity/ref.mjs";import{decodeWxmlEntities as t,resolveDatasetEventValue as n,resolveDatasetIndex as r}from"../inlineDataset.mjs";function i(e,t){let r=n(e,`wvEventDetail`,t);return r===!0||r===1||r===`1`||r===`true`}function a(e,t){if(!i(t,e))return e;if(e&&typeof e==`object`&&`detail`in e)return e.detail}function o(t,n){if(!n)return;let r=n.split(`.`).filter(Boolean),i=e(t)?t.value:t;for(let t of r){if(e(i)&&(i=i.value),i==null)return;i=i[t]}return e(i)?i.value:i}function s(e){return e}function c(e,i,c,l){var u,d,f,p;let m=(u=(d=c==null||(f=c.currentTarget)==null?void 0:f.dataset)==null?c==null||(p=c.target)==null?void 0:p.dataset:d)==null?{}:u,h=a(c,m),g=n(m,`wvInlineId`,c);if(typeof g==`string`&&g&&l){let t=l[g];if(t&&typeof t.fn==`function`){let n={},i=Array.isArray(t.keys)?t.keys:[];for(let e=0;e<i.length;e+=1){let t=i[e];n[t]=m==null?void 0:m[`wvS${e}`]}let a=Array.isArray(t.indexKeys)?t.indexKeys:[];for(let e=0;e<a.length;e+=1){let t=a[e],i=r(m==null?void 0:m[`wvI${e}`]);i!==void 0&&(n[t]=i)}let c=Array.isArray(t.scopeResolvers)?t.scopeResolvers:[];for(let t=0;t<i.length;t+=1){let r=i[t],a=c[t];try{let t;if(typeof a==`function`)t=a(e,n,h);else if(a&&typeof a==`object`&&a.type===`for-item`){let r=n[a.indexKey],i=o(e,a.path);t=i==null?void 0:i[r]}else continue;t!==void 0&&(n[r]=s(t))}catch(e){}}let l=t.fn(e,n,h);return typeof l==`function`?l.call(e,h):l}}let _=n(m,`wvHandler`,c),v=typeof i==`string`&&i?i:typeof _==`string`?_:void 0;if(!v)return;let y=n(m,`wvArgs`,c),b=[];if(Array.isArray(y))b=y;else if(typeof y==`string`)try{b=JSON.parse(y)}catch(e){try{b=JSON.parse(t(y))}catch(e){b=[]}}Array.isArray(b)||(b=[]);let x=b.map(e=>e===`$event`?h:e),S=e==null?void 0:e[v];if(typeof S==`function`)return S.apply(e,x)}export{c as runInlineExpression};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{toRaw as e}from"../../../reactivity/reactive/shared.mjs";import{getCurrentMiniProgramRuntimeCapabilities as t,getMiniProgramGlobalObject as n,supportsCurrentMiniProgramRuntimeCapability as r}from"../../platform.mjs";import{
|
|
1
|
+
import{toRaw as e}from"../../../reactivity/reactive/shared.mjs";import{getCurrentMiniProgramRuntimeCapabilities as t,getMiniProgramGlobalObject as n,supportsCurrentMiniProgramRuntimeCapability as r}from"../../platform.mjs";import{markNoSetData as i}from"../../noSetData.mjs";import{hasOwn as a}from"../../../utils.mjs";import{normalizeEmitPayload as o}from"../../emit.mjs";import{isNativeBridgeMethod as s,markNativeBridgeMethod as c}from"../../nativeBridge.mjs";import{WEVU_NATIVE_INSTANCE_KEY as l,WEVU_PROPS_KEY as u,WEVU_SETUP_CONTEXT_INSTANCE_KEY as d,WEVU_SLOT_NAMES_PROP as f}from"@weapp-core/constants";const p=[`triggerEvent`,`createSelectorQuery`,`createIntersectionObserver`,`setData`,`setUpdatePerformanceListener`];function m(){return Object.freeze(Object.create(null))}const h=()=>[];function g(e){return Array.isArray(e)?[...new Set(e.filter(e=>typeof e==`string`&&e.length>0))]:!e||typeof e!=`object`?[]:Object.entries(e).filter(([,e])=>!!e).map(([e])=>e)}function _(e){if(!a(e,f))return m();let t=()=>g(e[f]),n=e=>typeof e==`string`&&t().includes(e);return new Proxy(Object.create(null),{get(e,t){if(n(t))return h},has(e,t){return n(t)},ownKeys(){return t()},getOwnPropertyDescriptor(e,t){if(n(t))return{configurable:!0,enumerable:!0,value:h}},set(){return!1},deleteProperty(){return!1}})}function v(e,t){let n=_(t);try{Object.defineProperty(e,"$slots",{value:n,configurable:!0,enumerable:!1,writable:!1})}catch(t){e.$slots=n}return n}function y(){let e=(()=>{});return e.stop=()=>{},e.pause=()=>{},e.resume=()=>{},e}function b(e){try{return i(e)}catch(t){return e}}function x(t,n,r){let i=t==null?void 0:t.state,a=i&&typeof i==`object`?e(i):void 0,o=t==null?void 0:t.proxy,c=e=>{let t=e[r];if(typeof t!=`function`)return!1;if(s(t))return!0;let i=n[r];return typeof i==`function`&&t===i},u=e=>!e||typeof e!=`object`||e===n||e===o||c(e)?!1:typeof e[r]==`function`,d=a?a[l]:void 0;if(u(d))return d;let f=t==null?void 0:t.instance;if(u(f))return f}function S(e,t,n){c(n);try{Object.defineProperty(e,t,{value:n,configurable:!0,enumerable:!1,writable:!0})}catch(r){e[t]=n}}function C(i,o){let c=i[d];if(c&&typeof c==`object`)return c;let f=Object.create(null);try{Object.defineProperty(f,l,{configurable:!0,enumerable:!1,get(){let t=o==null?void 0:o.state,n=t&&typeof t==`object`?e(t):void 0,r=n==null?void 0:n[l];return r&&typeof r==`object`?r:i}})}catch(e){f[l]=i}let p=e=>{var t,n;let r=o==null?void 0:o.proxy;if(r&&Reflect.has(r,e))return{found:!0,value:Reflect.get(r,e)};let s=(t=o==null||(n=o.state)==null?void 0:n[u])==null?i[u]:t;return s&&typeof s==`object`&&a(s,e)?{found:!0,value:Reflect.get(s,e)}:{found:!1,value:void 0}},m=e=>{let t=x(o,i,e);if(t)return t;let n=i[e];if(typeof n==`function`&&!s(n))return i};S(f,`triggerEvent`,(...e)=>{let[t,n,r]=e,i=m(`triggerEvent`);i&&typeof i.triggerEvent==`function`&&(e.length>=3?i.triggerEvent(t,n,r):i.triggerEvent(t,n))}),S(f,`createSelectorQuery`,()=>{var e;let a=m(`createSelectorQuery`);if(a&&typeof a.createSelectorQuery==`function`)return a.createSelectorQuery();let s=n();if(!r(`globalCreateSelectorQuery`)||!s||typeof s.createSelectorQuery!=`function`)return;let c=s.createSelectorQuery();if(!c||!t().selectorQueryScopeByIn||typeof c.in!=`function`)return c;let l=(e=x(o,i,`setData`))==null?i:e;return c.in(l)}),S(f,`createIntersectionObserver`,e=>{var a;let s=m(`createIntersectionObserver`);if(s&&typeof s.createIntersectionObserver==`function`)return s.createIntersectionObserver(e==null?{}:e);let c=n();if(!r(`globalCreateIntersectionObserver`)||!c||typeof c.createIntersectionObserver!=`function`)return;let l=(a=x(o,i,`setData`))==null?i:a;return t().intersectionObserverScopeByParameter?c.createIntersectionObserver(l,e==null?{}:e):c.createIntersectionObserver(e==null?{}:e)}),S(f,`setData`,(e,t)=>{let n=m(`setData`);if(n&&typeof n.setData==`function`)return n.setData(e,t);let r=o==null?void 0:o.adapter,i=typeof(r==null?void 0:r.setData)==`function`?r.setData(e):void 0;return typeof t==`function`&&t(),i}),S(f,`setUpdatePerformanceListener`,e=>{let t=m(`setUpdatePerformanceListener`);if(t&&typeof t.setUpdatePerformanceListener==`function`)return t.setUpdatePerformanceListener(e)});let h=b(new Proxy(f,{get(e,t,n){if(Reflect.has(e,t))return Reflect.get(e,t,n);if(t===`$el`){var r;return(r=x(o,i,`setData`))==null?i:r}if(t===`renderRoot`||t===`shadowRoot`){var a;return((a=x(o,i,`setData`))==null?i:a)[t]}let s=p(t);if(s.found)return s.value;let c=i[t];return typeof c==`function`?c.bind(i):c},has(e,t){return Reflect.has(e,t)||p(t).found||t in i},set(e,t,n){return Reflect.has(e,t)?(e[t]=n,!0):(i[t]=n,!0)}}));try{Object.defineProperty(i,d,{value:h,configurable:!0,enumerable:!1,writable:!0})}catch(e){i[d]=h}return h}export{v as attachRuntimeSlots,y as createNoopWatchStopHandle,m as createSetupSlotsFallback,_ as createSetupSlotsProxy,C as ensureSetupContextInstance,o as normalizeEmitPayload,b as safeMarkNoSetData,p as setupInstanceMethodNames};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{effectScope as e}from"../../../reactivity/core.mjs";import{toRaw as t}from"../../../reactivity/reactive/shared.mjs";import{shallowReactive as n}from"../../../reactivity/reactive/shallow.mjs";import{isReactive as r}from"../../../reactivity/reactive.mjs";import{setCurrentInstance as i,setCurrentSetupContext as a}from"../../hooks/base.mjs";import{hasOwn as o}from"../../../utils.mjs";import{hasTrackableSetupBinding as s}from"../../setupTracking.mjs";import{normalizeEmitEventName as c,normalizeEmitPayload as l}from"../../emit.mjs";import{attachRuntimeSlots as u,ensureSetupContextInstance as d,safeMarkNoSetData as f}from"./setupContext.mjs";import{runSetupFunction as p}from"../setup.mjs";import{attachRuntimeSetupState as m,ensureRuntimeProps as h}from"./utils.mjs";import{WEVU_ATTRS_KEY as g,WEVU_EFFECT_SCOPE_KEY as _,WEVU_EXPOSED_KEY as v,WEVU_PROP_KEYS_KEY as y}from"@weapp-core/constants";let b=0;function x(e,t){let n=e,r={proxy:{configurable:!0,enumerable:!1,value:t,writable:!1},$:{configurable:!0,enumerable:!1,value:e,writable:!1},uid:{configurable:!0,enumerable:!1,value:++b,writable:!1},exposed:{configurable:!0,enumerable:!1,get:()=>e[v]}};for(let[e,t]of Object.entries(r))try{Object.defineProperty(n,e,t)}catch(r){`value`in t&&(n[e]=t.value)}let i={$:{configurable:!0,enumerable:!1,value:e,writable:!1},$el:{configurable:!0,enumerable:!1,value:e,writable:!1}};for(let[e,n]of Object.entries(i))try{Object.defineProperty(t,e,n)}catch(r){t[e]=n.value}}function S(e){return e.startsWith(`__wv_`)}function C(b){var C;let{target:w,runtime:T,runtimeWithDefaults:E,runtimeState:D,runtimeProxy:O,setup:k}=b,A=w.properties||{},j=h(w,D,A),M=n(Object.create(null)),N=new Set(Array.isArray(w[y])?w[y]:[]),P=e=>typeof D==`object`&&!!D&&o(D,e);(()=>{let e=w.properties&&typeof w.properties==`object`?w.properties:void 0;for(let t of Object.keys(M))(!e||!o(e,t)||S(t)||N.has(t)||P(t))&&delete M[t];if(e)for(let[t,n]of Object.entries(e))S(t)||N.has(t)||P(t)||(M[t]=n)})();try{Object.defineProperty(w,g,{value:M,configurable:!0,enumerable:!1,writable:!1})}catch(e){w[g]=M}let F=d(w,E);x(w,F);let I=u(D,j),L=(C=E.setupState)==null?Object.create(null):C;m(D,L);let R=f({props:j,runtime:E,state:D,proxy:O,bindModel:T.bindModel.bind(E),watch:T.watch.bind(E),instance:F,emit:(e,...t)=>{let{detail:n,options:r}=l(t),i=c(e);F.triggerEvent(i,n,r)},expose:e=>{w[v]=e},attrs:M,slots:I}),z=e(!0);w[_]=z,i(w),a(R);try{let e=z.run(()=>p(k,j,R)),n=!1;if(e&&typeof e==`object`){let i=T.setupState&&typeof T.setupState==`object`?r(T.setupState)?t(T.setupState):T.setupState:Object.create(null);Object.keys(e).forEach(t=>{let r=e[t];if(typeof r==`function`)
|
|
1
|
+
import{effectScope as e}from"../../../reactivity/core.mjs";import{toRaw as t}from"../../../reactivity/reactive/shared.mjs";import{shallowReactive as n}from"../../../reactivity/reactive/shallow.mjs";import{isReactive as r}from"../../../reactivity/reactive.mjs";import{setCurrentInstance as i,setCurrentSetupContext as a}from"../../hooks/base.mjs";import{hasOwn as o}from"../../../utils.mjs";import{hasTrackableSetupBinding as s}from"../../setupTracking.mjs";import{normalizeEmitEventName as c,normalizeEmitPayload as l}from"../../emit.mjs";import{attachRuntimeSlots as u,ensureSetupContextInstance as d,safeMarkNoSetData as f}from"./setupContext.mjs";import{runSetupFunction as p}from"../setup.mjs";import{attachRuntimeSetupState as m,ensureRuntimeProps as h}from"./utils.mjs";import{WEVU_ATTRS_KEY as g,WEVU_EFFECT_SCOPE_KEY as _,WEVU_EXPOSED_KEY as v,WEVU_PROP_KEYS_KEY as y}from"@weapp-core/constants";let b=0;function x(e,t){let n=e,r={proxy:{configurable:!0,enumerable:!1,value:t,writable:!1},$:{configurable:!0,enumerable:!1,value:e,writable:!1},uid:{configurable:!0,enumerable:!1,value:++b,writable:!1},exposed:{configurable:!0,enumerable:!1,get:()=>e[v]}};for(let[e,t]of Object.entries(r))try{Object.defineProperty(n,e,t)}catch(r){`value`in t&&(n[e]=t.value)}let i={$:{configurable:!0,enumerable:!1,value:e,writable:!1},$el:{configurable:!0,enumerable:!1,value:e,writable:!1}};for(let[e,n]of Object.entries(i))try{Object.defineProperty(t,e,n)}catch(r){t[e]=n.value}}function S(e){return e.startsWith(`__wv_`)}function C(b){var C;let{target:w,runtime:T,runtimeWithDefaults:E,runtimeState:D,runtimeProxy:O,setup:k}=b,A=w.properties||{},j=h(w,D,A),M=n(Object.create(null)),N=new Set(Array.isArray(w[y])?w[y]:[]),P=e=>typeof D==`object`&&!!D&&o(D,e);(()=>{let e=w.properties&&typeof w.properties==`object`?w.properties:void 0;for(let t of Object.keys(M))(!e||!o(e,t)||S(t)||N.has(t)||P(t))&&delete M[t];if(e)for(let[t,n]of Object.entries(e))S(t)||N.has(t)||P(t)||(M[t]=n)})();try{Object.defineProperty(w,g,{value:M,configurable:!0,enumerable:!1,writable:!1})}catch(e){w[g]=M}let F=d(w,E);x(w,F);let I=u(D,j),L=(C=E.setupState)==null?Object.create(null):C;m(D,L);let R=f({props:j,runtime:E,state:D,proxy:O,bindModel:T.bindModel.bind(E),watch:T.watch.bind(E),instance:F,emit:(e,...t)=>{let{detail:n,options:r}=l(t),i=c(e);F.triggerEvent(i,n,r)},expose:e=>{w[v]=e},attrs:M,slots:I}),z=e(!0);w[_]=z,i(w),a(R);try{let e=z.run(()=>p(k,j,R)),n=!1;if(e&&typeof e==`object`){let i=T.setupState&&typeof T.setupState==`object`?r(T.setupState)?t(T.setupState):T.setupState:Object.create(null);Object.keys(e).forEach(t=>{let r=e[t];if(typeof r==`function`){let e=(...e)=>r.apply(T.proxy,e);T.methods[t]=e,T.state[t]=e,i[t]=e,n=!0}else{if(s(r)){var a;(a=T.__wevu_trackSetupReactiveKey)==null||a.call(T,t)}T.state[t]=r,i[t]=r}})}if(n){var B;(B=T.__wevu_touchSetupMethodsVersion)==null||B.call(T)}}finally{a(void 0),i(void 0)}}export{C as runRuntimeSetupPhase};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{isRef as e}from"../../../reactivity/ref.mjs";function t(e){return!!e&&typeof e==`object`&&!Array.isArray(e)}function n(r,i,a){if(Array.isArray(r)&&Array.isArray(i)){r.splice(0,r.length,...i);return}if(!t(r)||!t(i))return;let o=t(a)?a:void 0;for(let e of Object.keys(o==null?{}:o))typeof(o==null?void 0:o[e])!=`function`&&typeof r[e]!=`function`&&!Object.prototype.hasOwnProperty.call(i,e)&&delete r[e];for(let[a,s]of Object.entries(i))typeof r[a]!=`function`&&(e(r[a])?r[a].value=s:t(r[a])&&t(s)||Array.isArray(r[a])&&Array.isArray(s)?n(r[a],s,o==null?void 0:o[a]):r[a]=s)}export{n as restoreReactiveSetupSnapshot};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{isRef as e}from"../../reactivity/ref.mjs";import{callHookList as t}from"../hooks/base.mjs";import{isDeepEqualValue as n}from"../app/setData/snapshot.mjs";import{resolveRuntimePageLayoutName as r,syncRuntimePageLayoutState as i}from"../pageLayout.mjs";import{allocateOwnerId as a,attachOwnerSnapshot as o,mergeOwnerSnapshotProps as s,removeOwner as c,resolveOwnerSnapshot as l,updateOwnerSnapshot as ee}from"../scopedSlots.mjs";import{clearTemplateRefs as u,scheduleTemplateRefUpdate as d}from"../templateRefs.mjs";import{attachRuntimeSlots as te,createNoopWatchStopHandle as ne,safeMarkNoSetData as re}from"./runtimeInstance/setupContext.mjs";import{bridgeRuntimeMethodsToTarget as ie}from"./runtimeInstance/methodBridge.mjs";import{attachRuntimeProvideParentContext as ae}from"./runtimeInstance/provideContext.mjs";import{attachNativeInstanceRef as oe,attachRuntimeInstance as se,attachRuntimeRef as f,callNativeSetData as p,ensureRuntimeProps as ce,resolveNativeSetData as m}from"./runtimeInstance/utils.mjs";import{runRuntimeSetupPhase as le}from"./runtimeInstance/setupPhase.mjs";import{createSetDataHighFrequencyWarningMonitor as ue}from"./setDataFrequencyWarning.mjs";import{registerWatches as de}from"./watch.mjs";import{WEVU_EFFECT_SCOPE_KEY as h,WEVU_HOOKS_KEY as g,WEVU_PAGE_LAYOUT_NAME_KEY as _,WEVU_PAGE_LAYOUT_PROPS_KEY as v,WEVU_PAGE_LAYOUT_SETTER_KEY as y,WEVU_PAGE_SCROLL_HOOK_DEPTH_KEY as fe,WEVU_PROPS_DERIVED_KEYS_KEY as b,WEVU_PROPS_KEY as x,WEVU_PUBLIC_RUNTIME_KEY as S,WEVU_RUNTIME_OWNER_ID_KEY as C,WEVU_SLOT_OWNER_ID_KEY as w,WEVU_TEMPLATE_REFS_KEY as T,WEVU_WATCH_STOPS_KEY as E}from"@weapp-core/constants";function D(e,t=new WeakMap){if(!e||typeof e!=`object`)return e;if(t.has(e))return t.get(e);if(Array.isArray(e)){let n=[];t.set(e,n);for(let r of e)n.push(D(r,t));return n}let n={};t.set(e,n);for(let[r,i]of Object.entries(e))n[r]=D(i,t);return n}function pe(e,t,n){let r=e.data;if((!r||typeof r!=`object`)&&(!n||!Object.keys(n).length))return;let i=Array.isArray(t)&&t.length?new Set(t):void 0,a={};if(r&&typeof r==`object`)for(let[e,t]of Object.entries(r))i!=null&&i.has(e)||(a[e]=D(t));if(n)for(let[e,t]of Object.entries(n))i!=null&&i.has(e)||(a[e]=D(t));return a}function me(e){return!!(e!=null&&e.__wevuHasTemplateRuntimeBindings)}function he(e){typeof e.route==`string`&&e.route&&(e[y]=(t,n)=>{var a;let o=(a=e.__wevu)==null?void 0:a.state;if(!o||typeof o!=`object`)return;o[_]=r(t);let s=t===!1||n==null?{}:n;o[v]=s,i(e,t,s)})}function O(e,t,n,r,i){var c,u,h,g,_,v,y,C,O,k,A,j;if(e.__wevu)return e.__wevu;ae(e,t),re(e);let M=(c=e.data)==null?void 0:c[w],N=typeof M==`string`&&M?M:a(),P=typeof M==`string`&&M!==N,F=!!(t!=null&&(u=t.__wevuSetDataOptions)!=null&&u.suspendWhenHidden),I=typeof e.route==`string`&&e.route?`page:${e.route}`:typeof e.is==`string`&&e.is?`component:${e.is}`:`unknown-target`,L=ue({option:t==null||(h=t.__wevuSetDataOptions)==null?void 0:h.highFrequencyWarning,targetLabel:I,isInPageScrollHook:()=>{var t;return Number((t=e[fe])==null?0:t)>0}}),R=i!=null&&i.deferSetData?(e=>{let t,n=[],r=!1,i={setData(i,a){if(!r){var o;t={...(o=t)==null?{}:o,...i},a&&n.push(a);return}let s=m(e);if(s)return p(e,s,i,a)}};return i.__wevu_enableSetData=(i=!1)=>{r=!0,i&&(t=void 0,n=[]);let a=m(e);if(t&&Object.keys(t).length&&a){let r=t,i=n;t=void 0,n=[];let o=i.length?()=>i.forEach(e=>e()):void 0;p(e,a,r,o)}},i})(e):{setData(t,n){let r=m(e);if(r)return p(e,r,t,n)}},z,B=!0,V,ge=(e,t)=>({...e==null?{}:e,...t}),H=()=>{var t;if(!z)return;let n=l(z),r=(t=e[x])==null?e.properties:t;s(n,r),ee(N,n,z.proxy,e)},_e=()=>{if(!P)return;let t=e.data;try{t&&typeof t==`object`&&(t[w]=N)}catch(e){}let n=m(e);n&&p(e,n,{[w]:N})},U={...R,setData(t){if(L==null||L(),F&&!B){V=ge(V,t),H(),d(e);return}let n=Array.isArray(e[T])&&e[T].length>0;if(H(),n&&m(e))return new Promise(n=>{R.setData(t,()=>{H(),d(e),n()})});let r=R.setData(t);return d(e),r},__wevu_setVisibility(t){if(B=t,!B||!V)return;let n=V;V=void 0;let r=Array.isArray(e[T])&&e[T].length>0;if(H(),r&&m(e))return new Promise(t=>{R.setData(n,()=>{H(),d(e),t()})});let i=R.setData(n);return d(e),i}};Object.defineProperty(U,"__wevu_targetLabel",{configurable:!0,enumerable:!1,value:I,writable:!1});let W=e.properties;W&&typeof W==`object`&&Object.defineProperty(U,"__wevu_initialProps",{configurable:!0,enumerable:!1,value:W,writable:!1}),Array.isArray(i==null?void 0:i.snapshotOmitKeys)&&i.snapshotOmitKeys.length&&Object.defineProperty(U,"__wevu_snapshotOmitKeys",{configurable:!0,enumerable:!1,value:i.snapshotOmitKeys,writable:!1});let G=pe(e,i==null?void 0:i.snapshotOmitKeys,me(t)?void 0:{[w]:N});G&&Object.keys(G).length&&Object.defineProperty(U,"__wevu_initialSnapshot",{configurable:!0,enumerable:!1,value:G,writable:!1}),Object.defineProperty(U,"__wevu_initialState",{configurable:!0,enumerable:!1,value:{[w]:N},writable:!1}),(i!=null&&i.deferSetData||r||W&&typeof W==`object`&&Object.keys(W).length>0)&&Object.defineProperty(U,"__wevu_deferInitialSnapshot",{configurable:!0,enumerable:!1,value:!0,writable:!1});let K=t.mount(U);z=K,se(K,e);let q=(g=K==null?void 0:K.proxy)==null?{}:g,J=(_=K==null?void 0:K.state)==null?{}:_,ve=(v=K==null?void 0:K.setupState)==null?Object.create(null):v;J&&typeof J==`object`&&(f(J,K),oe(J,e));let ye=(y=K==null?void 0:K.computed)==null?Object.create(null):y;if(!(K!=null&&K.methods))try{K.methods=Object.create(null)}catch(e){}let be=(C=K==null?void 0:K.methods)==null?Object.create(null):C,xe=(O=K==null?void 0:K.watch)==null?(()=>ne()):O,Se=(k=K==null?void 0:K.bindModel)==null?(()=>{}):k,Y={...K==null?{}:K,state:J,setupState:ve,proxy:q,methods:be,computed:ye,watch:xe,bindModel:Se,snapshot:(A=K==null?void 0:K.snapshot)==null?(()=>Object.create(null)):A,unmount:(j=K==null?void 0:K.unmount)==null?(()=>{}):j};Object.defineProperty(Y,"__wevu_initialRuntimeSnapshot",{configurable:!0,enumerable:!1,value:D(J),writable:!1});let X=Y,Ce={__wevu_flushSetupSnapshotSync:K.__wevu_flushSetupSnapshotSync,__wevu_touchSetupMethodsVersion:K.__wevu_touchSetupMethodsVersion,__wevu_trackSetupReactiveKey:K.__wevu_trackSetupReactiveKey,[b]:K[b]};for(let[e,t]of Object.entries(Ce))t&&Object.defineProperty(Y,e,{configurable:!0,enumerable:!1,value:t,writable:!0});Object.defineProperty(e,S,{value:Y,configurable:!0,enumerable:!1,writable:!1}),e.__wevu=Y,he(e);let we=ce(e,J);te(J,we),o(e,Y,N,{deferSnapshot:i==null?void 0:i.deferSetData}),_e();let Z=n?de(Y,n,e,{deferMissingSourceBaseline:!!r}):[];if(Z.length&&(e[E]=Z),r){if(le({target:e,runtime:K,runtimeWithDefaults:Y,runtimeState:J,runtimeProxy:q,setup:r}),!(i!=null&&i.deferSetData)){var Q;(Q=X.__wevu_flushSetupSnapshotSync)==null||Q.call(X)}i!=null&&i.deferSetData||H();for(let e of Z)e.resume()}else if(!(i!=null&&i.deferSetData)&&e.properties&&typeof e.properties==`object`&&Object.keys(e.properties).length>0){var $;($=X.__wevu_flushSetupSnapshotSync)==null||$.call(X),H()}return ie(e,K),K}function k(e,t,n){for(let e of Reflect.ownKeys(t))if(!Reflect.has(n,e)){let n=Reflect.getOwnPropertyDescriptor(t,e);n!=null&&n.configurable&&Reflect.deleteProperty(t,e)}for(let e of Reflect.ownKeys(n)){let r=Reflect.getOwnPropertyDescriptor(n,e);if(r)try{Reflect.defineProperty(t,e,r)}catch(r){try{t[e]=n[e]}catch(e){}}}return f(t.state,t),e.__wevu=t,Object.defineProperty(e,S,{value:t,configurable:!0,enumerable:!1,writable:!1}),t}function A(t,n,r){let i=t.state,a=t.setupState,o={};for(let t of Object.keys(n==null?{}:n)){if(!Object.prototype.hasOwnProperty.call(i,t))continue;let n=a==null?void 0:a[t];if(!(a&&Object.prototype.hasOwnProperty.call(a,t)&&!e(n))){if(r&&Object.prototype.hasOwnProperty.call(r,t)){o[t]=D(r[t]);continue}o[t]=D(e(n)?n.value:i[t])}}return o}function j(t,n){let r=t.setupState;return!r||!n||typeof n!=`object`?[]:Object.keys(n).filter(t=>{let n=r[t];return Object.prototype.hasOwnProperty.call(r,t)&&!e(n)})}function M(t,r){var i;let a=t.__wevu,o=a==null?void 0:a.state,s=a==null?void 0:a.setupState,c=(i=r==null?void 0:r.nativeData)==null?t.data:i;if(!o||typeof o!=`object`||!c||typeof c!=`object`)return;let l=a==null?void 0:a.__wevu_initialRuntimeSnapshot;for(let[t,i]of Object.entries(c))if(t&&t!==`undefined`&&Object.prototype.hasOwnProperty.call(o,t))try{let a=s==null?void 0:s[t],c=D(i);if(!(r!=null&&r.includeSetupState)&&s&&Object.prototype.hasOwnProperty.call(s,t)||!(r!=null&&r.includeSetupState)&&l&&Object.prototype.hasOwnProperty.call(l,t)&&!n(o[t],l[t],20,{keys:1e4})||!(r!=null&&r.includeSetupState)&&l&&!Object.prototype.hasOwnProperty.call(l,t))continue;if(e(a)){a.value=c;continue}o[t]=c}catch(e){}}function N(e,t){var n,r,i;let a=(n=e.__wevu)==null?void 0:n.adapter;M(e,{includeSetupState:t==null?void 0:t.rehydrateSetupState}),a&&typeof a.__wevu_enableSetData==`function`&&a.__wevu_enableSetData(!0),(r=e.__wevu)==null||(i=r.__wevu_flushSetupSnapshotSync)==null||i.call(r)}function P(e,t){var n;let r=(n=e.__wevu)==null?void 0:n.adapter;r&&typeof r.__wevu_setVisibility==`function`&&r.__wevu_setVisibility(t)}function F(e,n){var r,i;let a=e.__wevu,o=(r=e[C])==null?e[w]:r;o&&c(o),u(e),!(n!=null&&n.skipHooks)&&a&&e[g]&&t(e,`onUnload`,[]),e[g]&&(e[g]=void 0);let s=e[E];if(Array.isArray(s))for(let e of s)try{e()}catch(e){}e[E]=void 0,(i=e[h])==null||i.stop(),e[h]=void 0,a&&a.unmount(),delete e.__wevu,S in e&&delete e[S]}function I(e,t,n,r,i){let a=e.__wevu,o=a?A(a,e.data,i==null?void 0:i.stateSnapshot):void 0,s=a?j(a,e.data):[];F(e,{skipHooks:!0});let c=O(e,t,n,r,{deferSetData:!0,snapshotOmitKeys:i==null?void 0:i.snapshotOmitKeys});if(o){let t=e.data;if(t&&typeof t==`object`){for(let e of s)delete t[e];Object.assign(t,D(o))}M(e,{includeSetupState:!0,nativeData:o})}return!a||a===c?c:k(e,a,c)}export{N as enableDeferredSetData,O as mountRuntimeInstance,I as refreshRuntimeInstance,P as setRuntimeSetDataVisibility,F as teardownRuntimeInstance};
|
|
1
|
+
import{effectScope as e}from"../../reactivity/core.mjs";import{isReactive as t}from"../../reactivity/reactive.mjs";import{isRef as n}from"../../reactivity/ref.mjs";import{getMiniProgramRuntimeGlobalObject as r}from"../platform.mjs";import{callHookList as i}from"../hooks/base.mjs";import{isSetDataHighFrequencyWarningRequested as a,requireRuntimeCapability as o,runtimeCapabilityRegistry as s}from"../capabilities.mjs";import{runTeardownSteps as c}from"../teardown.mjs";import{applySnapshotUpdate as l,isDeepEqualValue as u}from"../app/setData/snapshot.mjs";import{observeSetDataCompletion as d}from"../app/setData/commitTracker.mjs";import{attachRuntimeSlots as ee,createNoopWatchStopHandle as te,safeMarkNoSetData as ne}from"./runtimeInstance/setupContext.mjs";import{bridgeRuntimeMethodsToTarget as re}from"./runtimeInstance/methodBridge.mjs";import{attachRuntimeProvideParentContext as ie}from"./runtimeInstance/provideContext.mjs";import{attachNativeInstanceRef as ae,attachRuntimeInstance as oe,attachRuntimeRef as se,callNativeSetData as ce,ensureRuntimeProps as le,resolveNativeSetData as ue}from"./runtimeInstance/utils.mjs";import{runRuntimeSetupPhase as de}from"./runtimeInstance/setupPhase.mjs";import{restoreReactiveSetupSnapshot as f}from"./runtimeInstance/setupSnapshot.mjs";import{registerWatches as fe}from"./watch.mjs";import{WEAPP_VITE_STATEFUL_HMR_BRIDGE_KEY as pe,WEVU_EFFECT_SCOPE_KEY as p,WEVU_EXPOSED_KEY as m,WEVU_HOOKS_KEY as h,WEVU_HOST_COMMIT_PROMISE_KEY as g,WEVU_ON_BEFORE_UNMOUNT_HOOK as _,WEVU_PAGE_SCROLL_HOOK_DEPTH_KEY as me,WEVU_PROPS_DERIVED_KEYS_KEY as he,WEVU_PUBLIC_RUNTIME_KEY as v,WEVU_SETUP_CONTEXT_INSTANCE_KEY as ge,WEVU_SLOT_OWNER_ID_KEY as _e,WEVU_WATCH_STOPS_KEY as ve}from"@weapp-core/constants";const y=new WeakMap;function b(e,t=new WeakMap){if(!e||typeof e!=`object`)return e;if(t.has(e))return t.get(e);if(Array.isArray(e)){let n=[];t.set(e,n);for(let r of e)n.push(b(r,t));return n}let n={};t.set(e,n);for(let[r,i]of Object.entries(e))n[r]=b(i,t);return n}function ye(e,t){let n=e==null?{}:e;for(let[e,r]of Object.entries(t)){let t;for(let r of Object.keys(n))if(e.startsWith(`${r}.`)){t=r;break}if(t){let i={value:n[t]};l(i,`value.${e.slice(t.length+1)}`,r,`set`,{cloneValue:!1,clonedParents:new WeakSet}),n[t]=i.value;continue}let i=`${e}.`;for(let e of Object.keys(n))e.startsWith(i)&&delete n[e];n[e]=r}return n}function be(e,t,n){let r=e.data;if((!r||typeof r!=`object`)&&(!n||!Object.keys(n).length))return;let i=Array.isArray(t)&&t.length?new Set(t):void 0,a={};if(r&&typeof r==`object`)for(let[e,t]of Object.entries(r))i!=null&&i.has(e)||(a[e]=b(t));if(n)for(let[e,t]of Object.entries(n))i!=null&&i.has(e)||(a[e]=b(t));return a}function xe(e){return!!(e!=null&&e.__wevuHasTemplateRuntimeBindings)}function x(e,n,c,l,u){var f,p,m,h,_,ge,x,S,C;if(e.__wevu)return e.__wevu;let w=n.__wevuSetDataOptions,T=xe(n)?o(`scopedSlots`,`mountRuntimeInstance(scoped-slot bindings)`):void 0,E=T==null?void 0:T.prepareMount(e),O=e.__wevuTemplateRefs;Array.isArray(O)&&O.length&&o(`templateRefs`,`mountRuntimeInstance(template refs)`);let Se=a(w==null?void 0:w.highFrequencyWarning)?o(`setDataHighFrequencyWarning`,`mountRuntimeInstance(setData.highFrequencyWarning)`):void 0;ie(e,n),ne(e);let Ce=!!(w!=null&&w.suspendWhenHidden),we=typeof e.route==`string`&&e.route?`page:${e.route}`:typeof e.is==`string`&&e.is?`component:${e.is}`:`unknown-target`,k=Se==null?void 0:Se.createMonitor({option:w==null?void 0:w.highFrequencyWarning,targetLabel:we,isInPageScrollHook:()=>{var t;return Number((t=e[me])==null?0:t)>0}}),A=!0,j=!(u!=null&&u.deferSetData),M=!1,N=0,P,F,I,L=[],R=!(g in e),z=0,B=!1,V,H,U,W,Te=()=>{!z&&!P&&!H&&(B=!1,V=void 0)},Ee=()=>{z||P||(B?W==null||W(V):U==null||U(),H=void 0,U=void 0,W=void 0)},De=()=>{R&&(z+=1)},G=(e=`committed`,t)=>{R&&!M&&(e===`failed`&&!B&&(B=!0,V=t),--z,Ee())},Oe=e=>G(`failed`,e);R&&Object.defineProperty(e,g,{configurable:!0,enumerable:!1,get:()=>!z&&!P?B?Promise.reject(V):void 0:(H!=null||(H=new Promise((e,t)=>{U=e,W=t})),H)});let K=()=>{if(E){var t;(t=s.scopedSlots)==null||t.refresh(e,E)}},ke=()=>{if(M)return;let t=e.__wevuTemplateRefs;if(!s.templateRefs&&(!Array.isArray(t)||!t.length)){R&&G();return}o(`templateRefs`,`mountRuntimeInstance(template ref completion)`).schedule(e,R?G:void 0,e,R?Oe:void 0)},Ae=()=>{E&&(T==null||T.syncNativeOwnerId(e,E))},je=e=>{let t={settle:e,next:void 0};I?I.next=t:F=t,I=t},Me=(e,t,n)=>{let r=e,i=!0;for(;r;){let e=r.next;r.next=void 0,t===`failed`&&!i?r.settle(`abandoned`):r.settle(t,n),r=e,i=!1}},Ne=(t,n)=>{let r=N;De(),K(),d({invoke:n=>{let r=ue(e);if(!r){n();return}return ce(e,r,t,n)},completion:`callback`,settle:(e,t)=>{if(!(M||r!==N)){if(e!==`committed`){G(e,t),n(e,t);return}try{n(e,t)}catch(e){throw G(`failed`,e),e}ke()}}})},Pe=()=>{if(!P)return;let e=P,t=F,n=L;P=void 0,F=void 0,I=void 0,L=[],Ne(e,(e,r)=>{if(e===`committed`){try{for(let e of n)e()}finally{Me(t,e,r)}return}Me(t,e,r)})},Fe=()=>{let e=F;P=void 0,F=void 0,I=void 0,L=[],Me(e,`abandoned`),Ee()},Ie=e=>{Te(),P=ye(P,e)},q={setData(t,n){if(k==null||k(),!j||Ce&&!A){Ie(t),n&&L.push(n),K();return}K(),Te(),De();let r=ue(e);if(!r){try{n==null||n()}catch(e){throw G(`failed`,e),e}ke();return}let i=!0,a=!1,o=!1,s=!1,c=e=>{s||(s=!0,G(`failed`,e))},l=()=>{s||(s=!0,ke())},u=()=>{try{n==null||n()}catch(e){throw c(e),e}if(i){a=!0;return}o||l()},d;try{d=ce(e,r,t,u)}catch(e){throw c(e),e}return i=!1,o=!!(d&&typeof d.then==`function`),d&&typeof d.then==`function`?d.then(()=>{l()},e=>{throw c(e),e}):(a&&l(),d)},__wevu_dispatchSetData(e,t){if(k==null||k(),M){t(`abandoned`);return}if(!j||Ce&&!A){Ie(e),je(t),K();return}Te(),Ne(e,t)},__wevu_enableSetData(e=!1){if(j=!0,e){Fe();return}Pe()},__wevu_setVisibility(e){A=e,A&&j&&Pe()},__wevu_disposeSetData(){M||(M=!0,N+=1,P=void 0,F=void 0,I=void 0,L=[],z=0,B=!1,V=void 0,Ee(),R&&Reflect.deleteProperty(e,g))}};Object.defineProperty(q,"__wevu_reportSetDataError",{configurable:!0,enumerable:!1,value:t=>{i(e,`onError`,[t])},writable:!1}),Object.defineProperty(q,"__wevu_targetLabel",{configurable:!0,enumerable:!1,value:we,writable:!1});let J=e.properties;J&&typeof J==`object`&&Object.defineProperty(q,"__wevu_initialProps",{configurable:!0,enumerable:!1,value:J,writable:!1}),Array.isArray(u==null?void 0:u.snapshotOmitKeys)&&u.snapshotOmitKeys.length&&Object.defineProperty(q,"__wevu_snapshotOmitKeys",{configurable:!0,enumerable:!1,value:u.snapshotOmitKeys,writable:!1});let Le=be(e,u==null?void 0:u.snapshotOmitKeys);Le&&Object.keys(Le).length&&Object.defineProperty(q,"__wevu_initialSnapshot",{configurable:!0,enumerable:!1,value:Le,writable:!1}),E&&Object.defineProperty(q,"__wevu_initialState",{configurable:!0,enumerable:!1,value:{[_e]:E.ownerId},writable:!1}),(u!=null&&u.deferSetData||l||J&&typeof J==`object`&&Object.keys(J).length>0)&&Object.defineProperty(q,"__wevu_deferInitialSnapshot",{configurable:!0,enumerable:!1,value:!0,writable:!1});let Y=n.mount(q);oe(Y,e);let Re=(f=Y==null?void 0:Y.proxy)==null?{}:f,X=(p=Y==null?void 0:Y.state)==null?{}:p,ze=(m=Y==null?void 0:Y.setupState)==null?Object.create(null):m;X&&typeof X==`object`&&(se(X,Y),ae(X,e));let Be=(h=Y==null?void 0:Y.computed)==null?Object.create(null):h;if(!(Y!=null&&Y.methods))try{Y.methods=Object.create(null)}catch(e){}let Ve=(_=Y==null?void 0:Y.methods)==null?Object.create(null):_,He=(ge=Y==null?void 0:Y.watch)==null?(()=>te()):ge,Ue=(x=Y==null?void 0:Y.bindModel)==null?(()=>{}):x,Z={...Y==null?{}:Y,state:X,setupState:ze,proxy:Re,methods:Ve,computed:Be,watch:He,bindModel:Ue,snapshot:(S=Y==null?void 0:Y.snapshot)==null?(()=>Object.create(null)):S,unmount:(C=Y==null?void 0:Y.unmount)==null?(()=>{}):C};Object.defineProperty(Z,"__wevu_initialRuntimeSnapshot",{configurable:!0,enumerable:!1,value:b(X),writable:!1});let Q=Z,We={__wevu_flushSetupSnapshotSync:Y.__wevu_flushSetupSnapshotSync,__wevu_touchSetupMethodsVersion:Y.__wevu_touchSetupMethodsVersion,__wevu_trackSetupReactiveKey:Y.__wevu_trackSetupReactiveKey,__wevu_cloneDispatchedSnapshot:Y.__wevu_cloneDispatchedSnapshot,[he]:Y[he]};for(let[e,t]of Object.entries(We))t&&Object.defineProperty(Z,e,{configurable:!0,enumerable:!1,value:t,writable:!0});Object.defineProperty(e,v,{value:Z,configurable:!0,enumerable:!1,writable:!1}),e.__wevu=Z;let Ge=le(e,X);ee(X,Ge),E&&(T==null||T.attachMount(e,Z,E,!!(u!=null&&u.deferSetData))),Ae();let Ke=c?fe(Z,c,e,{deferMissingSourceBaseline:!!l}):[];if(Ke.length&&(e[ve]=Ke),l)try{var $;if(de({target:e,runtime:Y,runtimeWithDefaults:Z,runtimeState:X,runtimeProxy:Re,setup:l}),typeof(($=r())==null||($=$[pe])==null?void 0:$.trackWevuComponent)==`function`){var qe;let e={};for(let[n,r]of Object.entries((qe=Z.setupState)==null?{}:qe))t(r)&&(e[n]=b(r));y.set(Z,e)}if(!(u!=null&&u.deferSetData)){var Je;(Je=Q.__wevu_flushSetupSnapshotSync)==null||Je.call(Q)}u!=null&&u.deferSetData||K();for(let e of Ke)e.resume()}catch(t){try{D(e,{skipHooks:!0})}catch(e){}throw t}else if(!(u!=null&&u.deferSetData)&&e.properties&&typeof e.properties==`object`&&Object.keys(e.properties).length>0){var Ye;(Ye=Q.__wevu_flushSetupSnapshotSync)==null||Ye.call(Q),K()}return re(e,Y),Y}function S(e,t,n){for(let e of Reflect.ownKeys(t))if(!Reflect.has(n,e)){let n=Reflect.getOwnPropertyDescriptor(t,e);n!=null&&n.configurable&&Reflect.deleteProperty(t,e)}for(let e of Reflect.ownKeys(n)){let r=Reflect.getOwnPropertyDescriptor(n,e);if(r)try{Reflect.defineProperty(t,e,r)}catch(r){try{t[e]=n[e]}catch(e){}}}se(t.state,t);let r=y.get(n);return r&&y.set(t,r),e.__wevu=t,Object.defineProperty(e,v,{value:t,configurable:!0,enumerable:!1,writable:!1}),t}function C(e,r,i){let a=e.state,o=e.setupState,s={};for(let e of Object.keys(r==null?{}:r)){if(!Object.prototype.hasOwnProperty.call(a,e))continue;let r=o==null?void 0:o[e];if(!o||!Object.prototype.hasOwnProperty.call(o,e)||n(r)||t(r)){if(i&&Object.prototype.hasOwnProperty.call(i,e)){s[e]=b(i[e]);continue}s[e]=b(n(r)?r.value:a[e])}}return s}function w(e,r){var i;let a=e.__wevu,o=a==null?void 0:a.state,s=a==null?void 0:a.setupState,c=(i=r==null?void 0:r.nativeData)==null?e.data:i;if(!o||typeof o!=`object`||!c||typeof c!=`object`)return;let l=a==null?void 0:a.__wevu_initialRuntimeSnapshot;for(let[e,i]of Object.entries(c))if(e&&e!==`undefined`&&Object.prototype.hasOwnProperty.call(o,e))try{let a=s==null?void 0:s[e],c=b(i);if(s&&Object.prototype.hasOwnProperty.call(s,e)&&(!(r!=null&&r.includeSetupState)||!n(a)&&!t(a))||!(r!=null&&r.includeSetupState)&&l&&Object.prototype.hasOwnProperty.call(l,e)&&!u(o[e],l[e],20,{keys:1e4})||!(r!=null&&r.includeSetupState)&&l&&!Object.prototype.hasOwnProperty.call(l,e))continue;if(n(a)){a.value=c;continue}if(t(a)&&c&&typeof c==`object`){var d;f(a,c,r==null||(d=r.initialSetupState)==null?void 0:d[e]);continue}o[e]=c}catch(e){}}function T(e,t){var n,r,i,a;let o=(n=e.__wevu)==null?void 0:n.adapter;w(e,{includeSetupState:t==null?void 0:t.rehydrateSetupState}),o==null||(r=o.__wevu_enableSetData)==null||r.call(o,!0),(i=e.__wevu)==null||(a=i.__wevu_flushSetupSnapshotSync)==null||a.call(i)}function E(e,t){var n,r;let i=(n=e.__wevu)==null?void 0:n.adapter;i==null||(r=i.__wevu_setVisibility)==null||r.call(i,t)}function D(t,n){let r=t.__wevu,a=t[ve],l=t[p];c([()=>{var a;if(!(n!=null&&n.skipHooks)&&r&&(a=t[h])!=null&&a[_]){if(l!=null&&l.active)l.run(()=>i(t,_));else{let n=e(!0);c([()=>n.run(()=>i(t,_)),()=>n.stop()])}}},()=>{var e;return(e=s.scopedSlots)==null?void 0:e.teardown(t)},()=>{Array.isArray(t.__wevuTemplateRefs)&&t.__wevuTemplateRefs.length>0&&o(`templateRefs`,`teardownRuntimeInstance(template refs)`).clear(t)},()=>{!(n!=null&&n.skipHooks)&&r&&t[h]&&i(t,`onUnload`,[])},()=>{t[h]&&(t[h]=void 0)},()=>{if(Array.isArray(a))for(let e of a)try{e()}catch(e){}},()=>{t[ve]=void 0},()=>{l==null||l.stop()},()=>{t[p]=void 0},()=>r==null?void 0:r.unmount(),()=>{var e;let t=r==null?void 0:r.adapter;t==null||(e=t.__wevu_disposeSetData)==null||e.call(t)},()=>{delete t[ge],delete t[m]},()=>{delete t.__wevu},()=>{v in t&&delete t[v]}])}function O(e,t,n,r,i){let a=e.__wevu,o=a?y.get(a):void 0,s=a?C(a,e.data,i==null?void 0:i.stateSnapshot):void 0;D(e,{skipHooks:!0});let c=x(e,t,n,r,{deferSetData:!0,snapshotOmitKeys:i==null?void 0:i.snapshotOmitKeys}),l=s==null?i!=null&&i.stateSnapshot?C(c,i.stateSnapshot,i.stateSnapshot):void 0:s;if(l){let t=e.data;t&&typeof t==`object`&&Object.assign(t,b(l)),w(e,{includeSetupState:!0,nativeData:l,initialSetupState:o})}return!a||a===c?c:S(e,a,c)}export{T as enableDeferredSetData,x as mountRuntimeInstance,O as refreshRuntimeInstance,E as setRuntimeSetDataVisibility,D as teardownRuntimeInstance};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{getScopedSlotMountState as e,runtimeCapabilityRegistry as t}from"../capabilities.mjs";function n(n){let r=e(n);if(r){var i;(i=t.scopedSlots)==null||i.refresh(n,r)}}export{n as refreshOwnerSnapshotFromInstance};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{getScopedSlotHostGlobalObject as e}from"./platform.mjs";import{isDeepEqualValue as t}from"./app/setData/snapshot.mjs";import{WEVU_PROPS_KEY as n,WEVU_RUNTIME_OWNER_ID_KEY as r,WEVU_SCOPED_SLOT_OWNER_SEED_KEY as i,WEVU_SCOPED_SLOT_OWNER_STORE_KEY as a,WEVU_SLOT_OWNER_ID_KEY as o,WEVU_SLOT_OWNER_ID_PROP as s,WEVU_SLOT_OWNER_KEY as c,WEVU_SLOT_OWNER_PROXY_KEY as l,WEVU_SLOT_PROPS_DATA_KEY as u,WEVU_SLOT_PROPS_KEY as d,WEVU_SLOT_SCOPE_KEY as f}from"@weapp-core/constants";function p(){var t;let n=(t=e())==null?Object.create(null):t;return n[a]instanceof Map||(n[a]=new Map),typeof n[i]!=`number`&&(n[i]=0),{globalObject:n,ownerStore:n[a]}}function m(){let{globalObject:e}=p();return e[i]+=1,`wv${e[i]}`}function h(e,n,r,i){var a;let{ownerStore:o}=p(),s=(a=o.get(e))==null?{snapshot:{},proxy:r,subscribers:new Set}:a,c=!t(s.snapshot,n,20,{keys:1e4}),l=s.proxy!==r;if(s.snapshot=n,s.proxy=r,s.target=i==null?s.target:i,o.set(e,s),(c||l)&&s.subscribers.size)for(let e of s.subscribers)try{e(n,r)}catch(e){}}function g(e){let{ownerStore:t}=p();t.delete(e)}function _(e,t){var n;let{ownerStore:r}=p(),i=(n=r.get(e))==null?{snapshot:{},proxy:void 0,subscribers:new Set}:n;return i.subscribers.add(t),r.set(e,i),()=>{let n=r.get(e);n&&n.subscribers.delete(t)}}function v(e){var t;let{ownerStore:n}=p();return(t=n.get(e))==null?void 0:t.proxy}function y(e){var t;let{ownerStore:n}=p();return(t=n.get(e))==null?void 0:t.snapshot}function b(e){var t;let{ownerStore:n}=p();return(t=n.get(e))==null?void 0:t.target}function x(e){let t=e.
|
|
1
|
+
import{getScopedSlotHostGlobalObject as e}from"./platform.mjs";import{isDeepEqualValue as t}from"./app/setData/snapshot.mjs";import{WEVU_PROPS_KEY as n,WEVU_RUNTIME_OWNER_ID_KEY as r,WEVU_SCOPED_SLOT_OWNER_SEED_KEY as i,WEVU_SCOPED_SLOT_OWNER_STORE_KEY as a,WEVU_SLOT_OWNER_ID_KEY as o,WEVU_SLOT_OWNER_ID_PROP as s,WEVU_SLOT_OWNER_KEY as c,WEVU_SLOT_OWNER_PROXY_KEY as l,WEVU_SLOT_PROPS_DATA_KEY as u,WEVU_SLOT_PROPS_KEY as d,WEVU_SLOT_SCOPE_KEY as f}from"@weapp-core/constants";function p(){var t;let n=(t=e())==null?Object.create(null):t;return n[a]instanceof Map||(n[a]=new Map),typeof n[i]!=`number`&&(n[i]=0),{globalObject:n,ownerStore:n[a]}}function m(){let{globalObject:e}=p();return e[i]+=1,`wv${e[i]}`}function h(e,n,r,i){var a;let{ownerStore:o}=p(),s=(a=o.get(e))==null?{snapshot:{},proxy:r,subscribers:new Set}:a,c=!t(s.snapshot,n,20,{keys:1e4}),l=s.proxy!==r;if(s.snapshot=n,s.proxy=r,s.target=i==null?s.target:i,o.set(e,s),(c||l)&&s.subscribers.size)for(let e of s.subscribers)try{e(n,r)}catch(e){}}function g(e){let{ownerStore:t}=p();t.delete(e)}function _(e,t){var n;let{ownerStore:r}=p(),i=(n=r.get(e))==null?{snapshot:{},proxy:void 0,subscribers:new Set}:n;return i.subscribers.add(t),r.set(e,i),()=>{let n=r.get(e);n&&n.subscribers.delete(t)}}function v(e){var t;let{ownerStore:n}=p();return(t=n.get(e))==null?void 0:t.proxy}function y(e){var t;let{ownerStore:n}=p();return(t=n.get(e))==null?void 0:t.snapshot}function b(e){var t;let{ownerStore:n}=p();return(t=n.get(e))==null?void 0:t.target}function x(e){let t=e.__wevu_cloneDispatchedSnapshot;return typeof t==`function`?t():typeof e.snapshot==`function`?e.snapshot():{}}const S=new Set([o,s,c,l,u,d,f]);function C(e,t){if(t&&typeof t==`object`)for(let[n,r]of Object.entries(t))S.has(n)||(e[n]=r)}function w(e,t,i,a){var s;try{e[r]=i}catch(e){}try{t.state[o]=i}catch(e){}try{e[o]=i}catch(e){}try{let t=e.data;t&&typeof t==`object`&&(t[o]=i)}catch(e){}let c=a!=null&&a.deferSnapshot?{}:x(t);C(c,(s=e[n])==null?e.properties:s),h(i,c,t.proxy,e)}export{m as allocateOwnerId,w as attachOwnerSnapshot,v as getOwnerProxy,y as getOwnerSnapshot,b as getOwnerTarget,C as mergeOwnerSnapshotProps,g as removeOwner,x as resolveOwnerSnapshot,_ as subscribeOwner,h as updateOwnerSnapshot};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{getCurrentInstance as e,getCurrentSetupContext as t}from"./hooks/base.mjs";import{createSelectorQuery as n}from"./templateRefs/helpers.mjs";function
|
|
1
|
+
import{getCurrentInstance as e,getCurrentSetupContext as t}from"./hooks/base.mjs";import{createSelectorQuery as n}from"./templateRefs/helpers.mjs";import{installTemplateRefs as r}from"./features/templateRefs.mjs";function i(n,r){let i=r==null?e():r;if(!i||!t())throw Error(`${n}() 必须在 setup() 的同步阶段调用`);return i}function a(e,t,r,i){let a=n(e);return!a||!t?Promise.resolve(null):(i(r?a.selectAll(t):a.select(t)),new Promise(e=>{a.exec(t=>{let n=Array.isArray(t)?t[0]:null;e(n==null?null:n)})}))}function o(e={}){r();let t=i(`useSelectorQuery`,e.context);return()=>n(t)}function s(e={}){var t;r();let n=i(`useBoundingClientRect`,e.context),o=(t=e.all)!=null&&t;return e=>a(n,e,o,e=>e.boundingClientRect())}function c(e){var t;r();let n=i(`useSelectorFields`,e.context),o=(t=e.all)!=null&&t;return t=>a(n,t,o,t=>t.fields(e.fields))}function l(e={}){var t;r();let n=i(`useScrollOffset`,e.context),o=(t=e.all)!=null&&t;return e=>a(n,e,o,e=>e.scrollOffset())}export{s as useBoundingClientRect,l as useScrollOffset,c as useSelectorFields,o as useSelectorQuery};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function e(e){let t,n=!1;for(let r of e)try{r()}catch(e){n||(t=e,n=!0)}if(n)throw t}export{e as runTeardownSteps};
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
import { MiniProgramIntrinsicElements } from "../weappIntrinsicElements.mjs";
|
|
2
1
|
import { TemplateRefValue } from "./types.mjs";
|
|
2
|
+
import { AlipayIntrinsicElements } from "@weapp-core/types/alipay";
|
|
3
|
+
import { TtIntrinsicElements } from "@weapp-core/types/tt";
|
|
4
|
+
import { WeappIntrinsicElements } from "@weapp-core/types/weapp";
|
|
3
5
|
//#region src/runtime/templateRefTypes.d.ts
|
|
4
|
-
type
|
|
6
|
+
type MiniProgramTemplateRefTagName = keyof AlipayIntrinsicElements | keyof TtIntrinsicElements | keyof WeappIntrinsicElements;
|
|
7
|
+
type MiniProgramTemplateRefElements = { [K in MiniProgramTemplateRefTagName]: TemplateRefValue; };
|
|
5
8
|
declare global {
|
|
6
9
|
interface HTMLElementTagNameMap extends MiniProgramTemplateRefElements {}
|
|
7
10
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{nextTick as e}from"../scheduler.mjs";import{markNoSetData as t}from"./noSetData.mjs";import{buildTemplateRefValue as n,createSelectorQuery as r,ensureRefsContainer as i,getTemplateRefMap as a,isComponentRef as o,resolveComponentRefValue as s,resolveTemplateRefTarget as c,updateTemplateRefMapValue as l}from"./templateRefs/helpers.mjs";import{
|
|
1
|
+
import{nextTick as e}from"../scheduler.mjs";import{markNoSetData as t}from"./noSetData.mjs";import{buildTemplateRefValue as n,createSelectorQuery as r,ensureRefsContainer as i,getTemplateRefMap as a,isComponentRef as o,resolveComponentRefValue as s,resolveTemplateRefTarget as c,updateTemplateRefMapValue as l}from"./templateRefs/helpers.mjs";import{runTeardownSteps as u}from"./teardown.mjs";import{WEVU_READY_CALLED_KEY as d,WEVU_TEMPLATE_REFS_KEY as f,WEVU_TEMPLATE_REFS_PENDING_KEY as p}from"@weapp-core/constants";const m=new WeakMap;function h(e){let t=m.get(e);return t||(t={generation:0},m.set(e,t)),t}function g(e,t){let n=h(e),r=h(t),i={target:e,assignmentTarget:t,runtime:e.__wevu,assignmentRuntime:t.__wevu,owner:n,assignmentOwner:r,assignmentGeneration:r.generation,completions:[],settled:!1};return n.current=i,i}function _(e){return!e.settled&&e.owner.current===e&&e.target.__wevu===e.runtime&&e.assignmentTarget.__wevu===e.assignmentRuntime&&e.assignmentOwner.generation===e.assignmentGeneration}function v(e,t=!1,n){if(e.settled)return;e.settled=!0,e.owner.current===e&&(e.owner.current=void 0);let r=t&&!e.completions.length,i=n;for(let o of e.completions)try{if(t)o.onRejected?o.onRejected(n):r||(r=!0,i=n);else{var a;(a=o.onResolved)==null||a.call(o)}}catch(e){r||(r=!0,i=e)}if(e.completions.length=0,r)throw i}function y(e){let{target:u,assignmentTarget:p}=e;try{let m=u[f];if(!_(e)||!(m!=null&&m.length)||!u[d]||!u.__wevu){v(e);return}let h=a(p),g=m.filter(e=>!o(e)),y=m.filter(e=>o(e)).map(e=>({binding:e,value:s(u,e)})),b=n=>{var r,a;if(!_(e))return;let o=i(p),s=new Map,d=new Set,f=(r=(a=e.runtime)==null?void 0:a.proxy)==null?u:r;for(let{binding:t,value:r}of n){if(!_(e))return;let n=c(p,t,u);if(!_(e))return;if(n.type===`function`){if(t.inFor&&Array.isArray(r)&&r.length)for(let t of r){if(!_(e))return;n.fn.call(f,t)}else n.fn.call(f,t.inFor&&Array.isArray(r)||r==null?null:r);continue}if(n.type===`ref`){n.ref.value=r;continue}if(n.type===`name`){var m;d.add(n.name);let e=(m=s.get(n.name))==null?{values:[],count:0,hasFor:!1}:m;e.count+=1,e.hasFor=e.hasFor||t.inFor,t.inFor?Array.isArray(r)&&e.values.push(...r):r!=null&&e.values.push(r),s.set(n.name,e)}}for(let[n,r]of s){if(!_(e))return;let i;if(i=r.values.length?r.hasFor||r.values.length>1||r.count>1?t(r.values):r.values[0]:r.hasFor?t([]):null,o[n]=i,!_(e))return;l(h,n,i)}for(let t of Object.keys(o)){if(!_(e))return;d.has(t)||delete o[t]}},x=g.length?r(u):null;if(!x){b(y),v(e);return}for(let e of g)(e.inFor?x.selectAll(e.selector):x.select(e.selector)).boundingClientRect();x.exec(t=>{if(!e.settled){try{if(_(e)){let e=g.map((e,r)=>({binding:e,value:n(u,e,Array.isArray(t)?t[r]:null)}));b([...y,...e])}}catch(t){v(e,!0,t);return}v(e)}})}catch(t){if(e.settled)throw t;v(e,!0,t)}}function b(e,t){let n=m.get(e);n&&(n.current=void 0),t==null||t()}function x(t,n,r=t,i){let a=t[f];if(!(a!=null&&a.length)){b(t,n);return}let o=h(t),s=o.pending;if(s&&s.assignmentTarget===r&&_(s)){(n||i)&&s.completions.push({onResolved:n,onRejected:i});return}let c=g(t,r);(n||i)&&c.completions.push({onResolved:n,onRejected:i}),o.pending=c,t[p]=!0,e(()=>{o.pending===c&&(o.pending=void 0,t[p]=!1),y(c)})}function S(e,n=e){var r,o;let s=m.get(e);s&&(s.generation+=1,s.current=void 0,s.pending=void 0,e[p]=!1);let d=e[f];if(!d||!d.length)return;let h=i(n),g=(r=(o=e.__wevu)==null?void 0:o.proxy)==null?e:r,_=new Set,v=a(n);u([...d.map(r=>()=>{let i=c(n,r,e),a=r.inFor?t([]):null;if(i.type===`function`){i.fn.call(g,null);return}if(i.type===`ref`){i.ref.value=a;return}i.type===`name`&&(_.add(i.name),h[i.name]=a,l(v,i.name,a))}),()=>{for(let e of Object.keys(h))_.has(e)||delete h[e]}])}export{S as clearTemplateRefs,x as scheduleTemplateRefUpdate};
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
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 "./miniprogramHost.mjs";
|
|
2
2
|
//#region src/runtime/types/miniprogram.d.ts
|
|
3
3
|
export interface MiniProgramAdapter {
|
|
4
|
+
/**
|
|
5
|
+
* 下发视图数据。返回 `void` 表示同步完成;异步适配器必须返回在宿主提交后兑现的 Promise。
|
|
6
|
+
*/
|
|
4
7
|
setData?: (payload: Record<string, any>) => void | Promise<void>;
|
|
5
8
|
}
|
|
6
9
|
type MpComponentOptions = HostMiniProgramComponentTrivialOption;
|
|
@@ -23,9 +23,9 @@ export interface DefineComponentOptions<P extends ComponentPropsOptions = Compon
|
|
|
23
23
|
*/
|
|
24
24
|
props?: P;
|
|
25
25
|
/**
|
|
26
|
-
*
|
|
26
|
+
* 兼容 Vue props 的 `undefined -> null` 传输,对可选、可空或联合类型使用无主类型约束的原生属性,避免提前转换。
|
|
27
27
|
*
|
|
28
|
-
*
|
|
28
|
+
* 默认关闭;显式原生 `properties` 始终原样传递,必填且不可空的单一类型仍保持原生类型约束。
|
|
29
29
|
*/
|
|
30
30
|
allowNullPropInput?: boolean;
|
|
31
31
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { ComponentPropsOptions, ExtractDefaultPropTypes, ExtractPropTypes, ExtractPublicPropTypes, InferNativePropType, InferNativeProps, InferPropType, InferProps, NativePropType, NativePropsOptions, NativeTypeHint, NativeTypedProperty, PropConstructor, PropOptions, PropType } from "./props/propTypes.mjs";
|
|
2
2
|
import { MiniProgramRouterNavigateToOption, MiniProgramRouterReLaunchOption, MiniProgramRouterRedirectToOption, MiniProgramRouterSwitchTabOption, RouterNavigateToOption, RouterReLaunchOption, RouterRedirectToOption, RouterSwitchTabOption, SetupContextRouter, TypedRouterTabBarUrl, TypedRouterUrl, WevuTypedRouterRouteMap } from "./props/router.mjs";
|
|
3
3
|
import { SetupContext, SetupContextIntersectionObserver, SetupContextIntersectionObserverOptions, SetupContextNativeInstance, SetupContextSelectorQuery, SetupFunction } from "./props/setup.mjs";
|
|
4
|
-
export type { ComponentPropsOptions, ExtractDefaultPropTypes, ExtractPropTypes, ExtractPublicPropTypes, InferNativePropType, InferNativeProps, InferPropType, InferProps, MiniProgramRouterNavigateToOption, MiniProgramRouterReLaunchOption, MiniProgramRouterRedirectToOption, MiniProgramRouterSwitchTabOption, NativePropType, NativePropsOptions, NativeTypeHint, NativeTypedProperty, PropConstructor, PropOptions, PropType, RouterNavigateToOption, RouterReLaunchOption, RouterRedirectToOption, RouterSwitchTabOption, SetupContext, SetupContextNativeInstance, SetupContextRouter, SetupFunction, TypedRouterTabBarUrl, TypedRouterUrl, WevuTypedRouterRouteMap };
|
|
4
|
+
export type { ComponentPropsOptions, ExtractDefaultPropTypes, ExtractPropTypes, ExtractPublicPropTypes, InferNativePropType, InferNativeProps, InferPropType, InferProps, MiniProgramRouterNavigateToOption, MiniProgramRouterReLaunchOption, MiniProgramRouterRedirectToOption, MiniProgramRouterSwitchTabOption, NativePropType, NativePropsOptions, NativeTypeHint, NativeTypedProperty, PropConstructor, PropOptions, PropType, RouterNavigateToOption, RouterReLaunchOption, RouterRedirectToOption, RouterSwitchTabOption, SetupContext, SetupContextIntersectionObserver, SetupContextIntersectionObserverOptions, SetupContextNativeInstance, SetupContextRouter, SetupContextSelectorQuery, SetupFunction, TypedRouterTabBarUrl, TypedRouterUrl, WevuTypedRouterRouteMap };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { WevuBindingSourceSpanV1, WevuBindingUpdateMode } from "@weapp-core/constants";
|
|
1
2
|
//#region src/runtime/types/setData.d.ts
|
|
2
3
|
export interface SetDataSnapshotOptions {
|
|
3
4
|
/**
|
|
@@ -202,9 +203,19 @@ export interface SetDataSnapshotOptions {
|
|
|
202
203
|
*/
|
|
203
204
|
functionPaths?: string[];
|
|
204
205
|
}
|
|
206
|
+
/**
|
|
207
|
+
* 与本次 setData 诊断相关的编译期模板绑定。
|
|
208
|
+
*/
|
|
209
|
+
export interface SetDataBindingDiagnostic {
|
|
210
|
+
id: string;
|
|
211
|
+
outputPath: string;
|
|
212
|
+
updateMode: WevuBindingUpdateMode;
|
|
213
|
+
sourceFile: string;
|
|
214
|
+
sourceLocation?: WevuBindingSourceSpanV1;
|
|
215
|
+
}
|
|
205
216
|
export interface SetDataDebugInfo {
|
|
206
217
|
mode: 'patch' | 'diff';
|
|
207
|
-
reason: 'patch' | 'diff' | 'needsFullSnapshot' | 'maxPatchKeys' | 'maxPayloadBytes' | 'loopWarning';
|
|
218
|
+
reason: 'patch' | 'diff' | 'needsFullSnapshot' | 'maxPatchKeys' | 'maxPayloadBytes' | 'loopWarning' | 'commitFailure';
|
|
208
219
|
pendingPatchKeys: number;
|
|
209
220
|
payloadKeys: number;
|
|
210
221
|
estimatedBytes?: number;
|
|
@@ -215,5 +226,11 @@ export interface SetDataDebugInfo {
|
|
|
215
226
|
windowMs?: number;
|
|
216
227
|
targetLabel?: string;
|
|
217
228
|
message?: string;
|
|
229
|
+
/**
|
|
230
|
+
* 根据实际 payload 或待处理路径解析出的相关编译期绑定。
|
|
231
|
+
*/
|
|
232
|
+
bindings?: SetDataBindingDiagnostic[];
|
|
233
|
+
revision?: number;
|
|
234
|
+
committedRevision?: number;
|
|
218
235
|
}
|
|
219
236
|
//#endregion
|
package/dist/runtime/types.d.mts
CHANGED
|
@@ -5,10 +5,10 @@ import { ComponentPropsOptions, ExtractDefaultPropTypes, ExtractPropTypes, Extra
|
|
|
5
5
|
import { MiniProgramRouterNavigateToOption, MiniProgramRouterReLaunchOption, MiniProgramRouterRedirectToOption, MiniProgramRouterSwitchTabOption, SetupContextRouter, WevuTypedRouterRouteMap } from "./types/props/router.mjs";
|
|
6
6
|
import { ComponentPublicInstance, ComputedDefinitions, ExtractComputed, ExtractMethods, MethodDefinitions, ModelBinding, ModelBindingOptions, ModelBindingPayload } from "./types/core.mjs";
|
|
7
7
|
import { AppConfig, InternalRuntimeState, InternalRuntimeStateFields, RuntimeApp, RuntimeInstance, WevuPlugin } from "./types/runtime.mjs";
|
|
8
|
-
import { SetupContext, SetupContextNativeInstance, SetupFunction } from "./types/props/setup.mjs";
|
|
8
|
+
import { SetupContext, SetupContextIntersectionObserver, SetupContextIntersectionObserverOptions, SetupContextNativeInstance, SetupContextSelectorQuery, SetupFunction } from "./types/props/setup.mjs";
|
|
9
9
|
import "./types/props.mjs";
|
|
10
10
|
import { AllowedComponentProps, ComponentCustomProps, ComponentOptionsMixin, DefineComponent, NativeComponent, ObjectDirective, PublicProps, ShallowUnwrapRef, VNode, VNodeProps } from "../vue-types.mjs";
|
|
11
|
-
import { SetDataDebugInfo, SetDataSnapshotOptions } from "./types/setData.mjs";
|
|
11
|
+
import { SetDataBindingDiagnostic, SetDataDebugInfo, SetDataSnapshotOptions } from "./types/setData.mjs";
|
|
12
12
|
import { CreateAppOptions, DataOption, DefineAppOptions, DefineComponentOptions, PageFeatures } from "./types/options.mjs";
|
|
13
13
|
//#region src/runtime/types.d.ts
|
|
14
14
|
export interface WevuGlobalComponents {}
|
|
@@ -25,4 +25,4 @@ export interface TemplateRefValue {
|
|
|
25
25
|
}
|
|
26
26
|
export type MiniProgramTemplateRefValue = TemplateRefValue;
|
|
27
27
|
//#endregion
|
|
28
|
-
export type { AlipayMiniProgramHostNamespace, AlipayMiniProgramHostSourceContract, AllowedComponentProps, AppConfig, ComponentCustomProps, ComponentOptionsMixin, ComponentPropsOptions, ComponentPublicInstance, ComputedDefinitions, CreateAppOptions, DataOption, DefaultMiniProgramHostNamespace, DefaultMiniProgramHostSourceContract, DefineAppOptions, DefineComponent, DefineComponentOptions, DouyinMiniProgramHostNamespace, DouyinMiniProgramHostSourceContract, ExtractComputed, ExtractDefaultPropTypes, ExtractMethods, ExtractPropTypes, ExtractPublicPropTypes, 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, InferNativePropType, InferNativeProps, InferPropType, InferProps, InternalRuntimeState, InternalRuntimeStateFields, MethodDefinitions, MiniProgramAdapter, HostMiniProgramAddToFavoritesOption as MiniProgramAddToFavoritesOption, MiniProgramAppOptions, MiniProgramBehaviorIdentifier, HostMiniProgramBoundingClientRectResult as MiniProgramBoundingClientRectResult, HostMiniProgramComponentAllFullProperty as MiniProgramComponentAllFullProperty, HostMiniProgramComponentAllProperty as MiniProgramComponentAllProperty, HostMiniProgramComponentBehaviorOptions as MiniProgramComponentBehaviorOptions, HostMiniProgramComponentEmptyArray as MiniProgramComponentEmptyArray, MiniProgramComponentInstance, HostMiniProgramComponentMethodOption as MiniProgramComponentMethodOption, MiniProgramComponentOptions, HostMiniProgramComponentPropertyOption as MiniProgramComponentPropertyOption, MiniProgramComponentPropertyValue, MiniProgramComponentRawOptions, HostMiniProgramComponentShortProperty as MiniProgramComponentShortProperty, MiniProgramHostNamespace, MiniProgramHostNamespaceBySource, MiniProgramHostSourceName, MiniProgramHostSourceRegistry, MiniProgramInstance, HostMiniProgramIntersectionObserver as MiniProgramIntersectionObserver, HostMiniProgramIntersectionObserverOptions as MiniProgramIntersectionObserverOptions, HostMiniProgramLaunchOptions as MiniProgramLaunchOptions, HostMiniProgramMemoryWarningResult as MiniProgramMemoryWarningResult, HostMiniProgramNavigateToOption as MiniProgramNavigateToOption, HostMiniProgramNodesRef as MiniProgramNodesRef, HostMiniProgramNodesRefFields as MiniProgramNodesRefFields, HostMiniProgramPageLifetime as MiniProgramPageLifetime, MiniProgramPageLifetimes, HostMiniProgramPageNotFoundOptions as MiniProgramPageNotFoundOptions, HostMiniProgramPageResizeOption as MiniProgramPageResizeOption, HostMiniProgramPageScrollOption as MiniProgramPageScrollOption, MiniProgramPlatformHostNamespaceBySource, MiniProgramPlatformHostSourceName, MiniProgramPlatformHostSourceRegistry, HostMiniProgramReLaunchOption as MiniProgramReLaunchOption, HostMiniProgramRedirectToOption as MiniProgramRedirectToOption, HostMiniProgramRouter as MiniProgramRouter, MiniProgramRouterNavigateToOption, MiniProgramRouterReLaunchOption, MiniProgramRouterRedirectToOption, MiniProgramRouterSwitchTabOption, MiniProgramRuntimeHostNamespaceBySource, MiniProgramRuntimeHostSourceName, MiniProgramRuntimeHostSourceRegistry, HostMiniProgramSaveExitState as MiniProgramSaveExitState, HostMiniProgramScrollOffsetResult as MiniProgramScrollOffsetResult, HostMiniProgramSelectorQuery as MiniProgramSelectorQuery, HostMiniProgramShareAppMessageOption as MiniProgramShareAppMessageOption, HostMiniProgramSwitchTabOption as MiniProgramSwitchTabOption, HostMiniProgramTabItemTapOption as MiniProgramTabItemTapOption, HostMiniProgramThemeChangeResult as MiniProgramThemeChangeResult, HostMiniProgramUnhandledRejectionResult as MiniProgramUnhandledRejectionResult, ModelBinding, ModelBindingOptions, ModelBindingPayload, NativeComponent, NativePropType, NativePropsOptions, NativeTypeHint, NativeTypedProperty, ObjectDirective, PageFeatures, PropConstructor, PropOptions, PropType, PublicProps, RuntimeApp, RuntimeInstance, SetDataDebugInfo, SetDataSnapshotOptions, SetupContext, SetupContextNativeInstance, SetupContextRouter, SetupFunction, ShallowUnwrapRef, HostMiniProgramTriggerEventOptions as TriggerEventOptions, TtMiniProgramHostNamespace, TtMiniProgramHostSourceContract, VNode, VNodeProps, WechatMiniProgramHostNamespace, WechatMiniProgramHostSourceContract, WevuPlugin, WevuTypedRouterRouteMap };
|
|
28
|
+
export type { AlipayMiniProgramHostNamespace, AlipayMiniProgramHostSourceContract, AllowedComponentProps, AppConfig, ComponentCustomProps, ComponentOptionsMixin, ComponentPropsOptions, ComponentPublicInstance, ComputedDefinitions, CreateAppOptions, DataOption, DefaultMiniProgramHostNamespace, DefaultMiniProgramHostSourceContract, DefineAppOptions, DefineComponent, DefineComponentOptions, DouyinMiniProgramHostNamespace, DouyinMiniProgramHostSourceContract, ExtractComputed, ExtractDefaultPropTypes, ExtractMethods, ExtractPropTypes, ExtractPublicPropTypes, 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, InferNativePropType, InferNativeProps, InferPropType, InferProps, InternalRuntimeState, InternalRuntimeStateFields, MethodDefinitions, MiniProgramAdapter, HostMiniProgramAddToFavoritesOption as MiniProgramAddToFavoritesOption, MiniProgramAppOptions, MiniProgramBehaviorIdentifier, HostMiniProgramBoundingClientRectResult as MiniProgramBoundingClientRectResult, HostMiniProgramComponentAllFullProperty as MiniProgramComponentAllFullProperty, HostMiniProgramComponentAllProperty as MiniProgramComponentAllProperty, HostMiniProgramComponentBehaviorOptions as MiniProgramComponentBehaviorOptions, HostMiniProgramComponentEmptyArray as MiniProgramComponentEmptyArray, MiniProgramComponentInstance, HostMiniProgramComponentMethodOption as MiniProgramComponentMethodOption, MiniProgramComponentOptions, HostMiniProgramComponentPropertyOption as MiniProgramComponentPropertyOption, MiniProgramComponentPropertyValue, MiniProgramComponentRawOptions, HostMiniProgramComponentShortProperty as MiniProgramComponentShortProperty, MiniProgramHostNamespace, MiniProgramHostNamespaceBySource, MiniProgramHostSourceName, MiniProgramHostSourceRegistry, MiniProgramInstance, HostMiniProgramIntersectionObserver as MiniProgramIntersectionObserver, HostMiniProgramIntersectionObserverOptions as MiniProgramIntersectionObserverOptions, HostMiniProgramLaunchOptions as MiniProgramLaunchOptions, HostMiniProgramMemoryWarningResult as MiniProgramMemoryWarningResult, HostMiniProgramNavigateToOption as MiniProgramNavigateToOption, HostMiniProgramNodesRef as MiniProgramNodesRef, HostMiniProgramNodesRefFields as MiniProgramNodesRefFields, HostMiniProgramPageLifetime as MiniProgramPageLifetime, MiniProgramPageLifetimes, HostMiniProgramPageNotFoundOptions as MiniProgramPageNotFoundOptions, HostMiniProgramPageResizeOption as MiniProgramPageResizeOption, HostMiniProgramPageScrollOption as MiniProgramPageScrollOption, MiniProgramPlatformHostNamespaceBySource, MiniProgramPlatformHostSourceName, MiniProgramPlatformHostSourceRegistry, HostMiniProgramReLaunchOption as MiniProgramReLaunchOption, HostMiniProgramRedirectToOption as MiniProgramRedirectToOption, HostMiniProgramRouter as MiniProgramRouter, MiniProgramRouterNavigateToOption, MiniProgramRouterReLaunchOption, MiniProgramRouterRedirectToOption, MiniProgramRouterSwitchTabOption, MiniProgramRuntimeHostNamespaceBySource, MiniProgramRuntimeHostSourceName, MiniProgramRuntimeHostSourceRegistry, HostMiniProgramSaveExitState as MiniProgramSaveExitState, HostMiniProgramScrollOffsetResult as MiniProgramScrollOffsetResult, HostMiniProgramSelectorQuery as MiniProgramSelectorQuery, HostMiniProgramShareAppMessageOption as MiniProgramShareAppMessageOption, HostMiniProgramSwitchTabOption as MiniProgramSwitchTabOption, HostMiniProgramTabItemTapOption as MiniProgramTabItemTapOption, HostMiniProgramThemeChangeResult as MiniProgramThemeChangeResult, HostMiniProgramUnhandledRejectionResult as MiniProgramUnhandledRejectionResult, ModelBinding, ModelBindingOptions, ModelBindingPayload, NativeComponent, NativePropType, NativePropsOptions, NativeTypeHint, NativeTypedProperty, ObjectDirective, PageFeatures, PropConstructor, PropOptions, PropType, PublicProps, RuntimeApp, RuntimeInstance, SetDataBindingDiagnostic, SetDataDebugInfo, SetDataSnapshotOptions, SetupContext, SetupContextIntersectionObserver, SetupContextIntersectionObserverOptions, SetupContextNativeInstance, SetupContextRouter, SetupContextSelectorQuery, SetupFunction, ShallowUnwrapRef, HostMiniProgramTriggerEventOptions as TriggerEventOptions, TtMiniProgramHostNamespace, TtMiniProgramHostSourceContract, VNode, VNodeProps, WechatMiniProgramHostNamespace, WechatMiniProgramHostSourceContract, WevuPlugin, WevuTypedRouterRouteMap };
|
|
@@ -3,22 +3,23 @@ import "../types.mjs";
|
|
|
3
3
|
//#region src/runtime/vueCompat/router.d.ts
|
|
4
4
|
type RuntimeRouter = SetupContextRouter;
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
6
|
+
* 获取与当前组件路径语义一致的原生 Router 对象。
|
|
7
7
|
*
|
|
8
8
|
* - 优先使用实例上的 `this.router`(组件路径语义)。
|
|
9
9
|
* - 不可用时回退到 `this.pageRouter`。
|
|
10
|
-
* -
|
|
10
|
+
* - App setup 或低版本基础库再回退到宿主全局路由方法。
|
|
11
|
+
* - 无 setup 上下文且宿主全局路由可用时,仍可创建应用级路由器。
|
|
11
12
|
*
|
|
12
13
|
* 如需更贴近 Vue Router 的高阶能力(导航守卫、失败类型、统一解析),
|
|
13
14
|
* 推荐改用 `wevu/router` 子入口的 `useRouter()`。
|
|
14
15
|
*/
|
|
15
16
|
export declare function useNativeRouter(): RuntimeRouter;
|
|
16
17
|
/**
|
|
17
|
-
*
|
|
18
|
+
* 获取与当前页面路径语义一致的原生 Router 对象。
|
|
18
19
|
*
|
|
19
20
|
* - 优先使用实例上的 `this.pageRouter`(页面路径语义)。
|
|
20
21
|
* - 不可用时回退到 `this.router`。
|
|
21
|
-
* -
|
|
22
|
+
* - App setup 或低版本基础库再回退到宿主全局路由方法。
|
|
22
23
|
*
|
|
23
24
|
* 如需更贴近 Vue Router 的高阶能力(导航守卫、失败类型、统一解析),
|
|
24
25
|
* 推荐改用 `wevu/router` 子入口的 `useRouter()`。
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{getCurrentMiniProgramGlobalRouter as e}from"../platform.mjs";import{getCurrentSetupContext as t}from"../hooks/base.mjs";import{notifyRouteStateSync as n}from"../../router/routeSync.mjs";import{createAbsoluteRoutePath as r,resolvePath as i}from"../../routerInternal/path.mjs";import{stringifyQuery as a}from"../../routerInternal/query.mjs";import{parsePathInput as o}from"../../routerInternal/location.mjs";const s=[`switchTab`,`reLaunch`,`redirectTo`,`navigateTo`,`navigateBack`],c=new WeakMap;function l(e){return!e||typeof e!=`object`?!1:s.every(t=>typeof e[t]==`function`)}function u(){return e()}function d(e){if(typeof e==`string`&&e)return i(e,``)||void 0}function f(e,t){let n=t===`pageRouter`?[e.route,e.__route__,e.is]:[e.is,e.route,e.__route__];for(let e of n){let t=d(e);if(t)return t}}function p(e,t){if(!t||!e.startsWith(`./`)&&!e.startsWith(`../`))return e;let{path:n,query:s,hash:c}=o(e),l=r(i(n,t)),u=a(s);return`${l}${u?`?${u}`:``}${c}`}function m(e,t){let r=t==null?``:t,i=c.get(e),a=i==null?void 0:i.get(r);if(a)return a;let o=Object.create(null);for(let r of s)o[r]=i=>{let a=e[r];if(r===`navigateBack`||!i||typeof i!=`object`)return a.call(e,i);let o=typeof i.url==`string`?p(i.url,t):i.url,s=i.success,c={...i,url:o,success:(...e)=>(typeof o==`string`&&n({method:r,source:`native`,url:o}),typeof s==`function`?s(...e):void 0)};return a.call(e,c)};let l=i==null?new Map:i;return l.set(r,o),c.set(e,l),o}function h(e,n,r){let i=t()
|
|
1
|
+
import{getCurrentMiniProgramGlobalRouter as e}from"../platform.mjs";import{getCurrentSetupContext as t}from"../hooks/base.mjs";import{notifyRouteStateSync as n}from"../../router/routeSync.mjs";import{createAbsoluteRoutePath as r,resolvePath as i}from"../../routerInternal/path.mjs";import{stringifyQuery as a}from"../../routerInternal/query.mjs";import{parsePathInput as o}from"../../routerInternal/location.mjs";const s=[`switchTab`,`reLaunch`,`redirectTo`,`navigateTo`,`navigateBack`],c=new WeakMap;function l(e){return!e||typeof e!=`object`?!1:s.every(t=>typeof e[t]==`function`)}function u(){return e()}function d(e){if(typeof e==`string`&&e)return i(e,``)||void 0}function f(e,t){let n=t===`pageRouter`?[e.route,e.__route__,e.is]:[e.is,e.route,e.__route__];for(let e of n){let t=d(e);if(t)return t}}function p(e,t){if(!t||!e.startsWith(`./`)&&!e.startsWith(`../`))return e;let{path:n,query:s,hash:c}=o(e),l=r(i(n,t)),u=a(s);return`${l}${u?`?${u}`:``}${c}`}function m(e,t){let r=t==null?``:t,i=c.get(e),a=i==null?void 0:i.get(r);if(a)return a;let o=Object.create(null);for(let r of s)o[r]=i=>{let a=e[r];if(r===`navigateBack`||!i||typeof i!=`object`)return a.call(e,i);let o=typeof i.url==`string`?p(i.url,t):i.url,s=i.success,c={...i,url:o,success:(...e)=>(typeof o==`string`&&n({method:r,source:`native`,url:o}),typeof s==`function`?s(...e):void 0)};return a.call(e,c)};let l=i==null?new Map:i;return l.set(r,o),c.set(e,l),o}function h(e,n,r){let i=t(),a=i!=null&&i.instance&&typeof i.instance==`object`?i.instance:void 0;if(a){let t=f(a,e),r=a[e];if(l(r))return m(r,t);let i=a[n];if(l(i))return m(i,t);let o=u();if(o)return m(o,t);throw Error(`当前运行环境不支持 Router,请升级宿主基础库或检查平台路由能力`)}let o=u();if(o)return m(o);throw Error(`${r}() 必须在 setup() 的同步阶段调用`)}function g(){return h(`router`,`pageRouter`,`useNativeRouter`)}function _(){return h(`pageRouter`,`router`,`useNativePageRouter`)}export{_ as useNativePageRouter,g as useNativeRouter};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{shallowRef as e}from"../../reactivity/shallowRef.mjs";import{getCurrentInstance as t}from"../hooks/base.mjs";import{
|
|
1
|
+
import{shallowRef as e}from"../../reactivity/shallowRef.mjs";import{getCurrentInstance as t}from"../hooks/base.mjs";import{installTemplateRefs as n}from"../features/templateRefs.mjs";import{WEVU_TEMPLATE_REF_MAP_KEY as r}from"@weapp-core/constants";function i(e){let t=e[r];if(t)return t;let n=new Map;try{Object.defineProperty(e,r,{value:n,configurable:!0,enumerable:!1,writable:!1})}catch(t){e[r]=n}return n}function a(r){n();let a=t();if(!a)throw Error(`useTemplateRef() 必须在 setup() 的同步阶段调用`);let o=typeof r==`string`?r.trim():``;if(!o)throw Error(`useTemplateRef() 需要传入有效的模板 ref 名称`);let s=i(a),c=s.get(o);if(c)return c;let l=e(null);return s.set(o,l),l}export{a as useTemplateRef};
|
package/dist/store/base.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{isObject as
|
|
1
|
+
import{batch as e}from"../reactivity/core.mjs";import{isObject as t,mergeShallow as n}from"./utils.mjs";function r(r,i,a,o){let s={$id:r};Object.defineProperty(s,"$state",{get(){return i},set(e){i&&t(e)&&(n(i,e),a(`patch object`))}}),s.$patch=t=>{let r=typeof t==`function`?`patch function`:`patch object`;e(()=>{let e=i==null?s:i;typeof t==`function`?t(e):n(e,t)}),a(r)},o&&(s.$reset=()=>{e(o),a(`patch object`)});let c=new Set;s.$subscribe=(e,t)=>(c.add(e),()=>c.delete(e));let l=new Set;return s.$onAction=e=>(l.add(e),()=>l.delete(e)),{api:s,subs:c,actionSubs:l}}export{r as createBaseApi};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{effect as e}from"../../reactivity/core.mjs";import{toRaw as t}from"../../reactivity/reactive/shared.mjs";import{touchReactive as n}from"../../reactivity/reactive/patch.mjs";import{reactive as r}from"../../reactivity/reactive.mjs";import{computed as i}from"../../reactivity/computed.mjs";import{wrapAction as a}from"../actions.mjs";import{cloneDeep as o,resetObject as s}from"../utils.mjs";import{createBaseApi as c}from"../base.mjs";import{createSafeNotifier as l}from"./shared.mjs";function
|
|
1
|
+
import{effect as e}from"../../reactivity/core.mjs";import{toRaw as t}from"../../reactivity/reactive/shared.mjs";import{touchReactive as n}from"../../reactivity/reactive/patch.mjs";import{reactive as r}from"../../reactivity/reactive.mjs";import{computed as i}from"../../reactivity/computed.mjs";import{wrapAction as a}from"../actions.mjs";import{cloneDeep as o,resetObject as s}from"../utils.mjs";import{createBaseApi as c}from"../base.mjs";import{createSafeNotifier as l,createStoreMutationTransaction as u}from"./shared.mjs";function d(d,f,p){var m,h,g;let _=f.state?f.state():{},v=r(_),y=o(t(_)),b=()=>{},x=u(e=>b(e)),S=c(d,v,x.notify,()=>{s(v,y)}),C=S.api.$patch;if(S.api.$patch=e=>{x.run(()=>{C(e)})},typeof S.api.$reset==`function`){let e=S.api.$reset;S.api.$reset=()=>{x.run(()=>{e()})}}b=l(d,S.subs,()=>v);let w={};for(let e of Object.getOwnPropertyNames(S.api)){let t=Object.getOwnPropertyDescriptor(S.api,e);t&&(e===`$state`?Object.defineProperty(w,e,{enumerable:t.enumerable,configurable:t.configurable,get(){return S.api.$state},set(e){x.run(()=>{S.api.$state=e})}}):Object.defineProperty(w,e,t))}let T=(m=f.getters)==null?{}:m;Object.keys(T).forEach(e=>{let t=T[e];if(typeof t==`function`){let n=i(()=>t.call(w,v));Object.defineProperty(w,e,{enumerable:!0,configurable:!0,get(){return n.value}})}});let E=(h=f.actions)==null?{}:h;Object.keys(E).forEach(e=>{let t=E[e];if(typeof t==`function`){let n=a(w,e,(...e)=>t.apply(w,e),S.actionSubs);w[e]=n}}),Object.keys(v).forEach(e=>{Object.defineProperty(w,e,{enumerable:!0,configurable:!0,get(){return v[e]},set(t){v[e]=t}})});let D=!1,O=!1;e(()=>{if(n(v),!D){D=!0;return}if(!(x.active||O)){O=!0;try{b(`direct`)}finally{O=!1}}});let k=(g=p==null?void 0:p._plugins)==null?[]:g;for(let e of k)try{e({store:w})}catch(e){}return w}export{d as createOptionsStyleStore};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{effect as e}from"../../reactivity/core.mjs";import{touchReactive as t}from"../../reactivity/reactive/patch.mjs";import{isReactive as n}from"../../reactivity/reactive.mjs";import{isRef as r}from"../../reactivity/ref.mjs";import{wrapAction as i}from"../actions.mjs";import{cloneDeep as a,resetObject as o}from"../utils.mjs";import{createBaseApi as s}from"../base.mjs";import{createSafeNotifier as c,
|
|
1
|
+
import{effect as e}from"../../reactivity/core.mjs";import{touchReactive as t}from"../../reactivity/reactive/patch.mjs";import{isReactive as n}from"../../reactivity/reactive.mjs";import{isRef as r}from"../../reactivity/ref.mjs";import{wrapAction as i}from"../actions.mjs";import{cloneDeep as a,resetObject as o}from"../utils.mjs";import{createBaseApi as s}from"../base.mjs";import{createSafeNotifier as c,createStoreMutationTransaction as l,isTrackableRef as u,snapshotValue as d}from"./shared.mjs";function f(f,p,m){var h;let g=p(),_=()=>{},v=new Map;Object.keys(g).forEach(e=>{let t=g[e];typeof t==`function`||e.startsWith(`$`)||(!r(t)||u(t))&&v.set(e,d(t))});let y={},b=()=>{v.forEach((e,t)=>{let i=y[t];if(u(i)){try{i.value=a(e)}catch(e){}return}if(n(i)){o(i,e);return}r(i)||(y[t]=a(e))})},x=l(e=>_(e)),S=s(f,void 0,x.notify,b),C=S.api.$patch;if(S.api.$patch=e=>{x.run(()=>{C(e)})},typeof S.api.$reset==`function`){let e=S.api.$reset;S.api.$reset=()=>{x.run(()=>{e()})}}y={...g},_=c(f,S.subs,()=>y);for(let e of Object.getOwnPropertyNames(S.api)){let t=Object.getOwnPropertyDescriptor(S.api,e);t&&(e===`$state`?Object.defineProperty(y,e,{enumerable:t.enumerable,configurable:t.configurable,get(){return S.api.$state},set(e){x.run(()=>{S.api.$state=e})}}):Object.defineProperty(y,e,t))}let w=[];Object.keys(g).forEach(e=>{let t=g[e];if(typeof t==`function`&&!e.startsWith(`$`)){y[e]=i(y,e,t,S.actionSubs);return}if(u(t)){w.push(t);return}if(n(t)){w.push(t);return}if(!r(t)&&!e.startsWith(`$`)){let n=t;Object.defineProperty(y,e,{enumerable:!0,configurable:!0,get(){return n},set(e){n=e,x.active||_(`direct`)}})}});let T=!1;if(w.length>0){let n=!1;e(()=>{if(w.forEach(e=>{u(e)?e.value:t(e)}),!n){n=!0;return}if(!(x.active||T)){T=!0;try{_(`direct`)}finally{T=!1}}})}let E=(h=m==null?void 0:m._plugins)==null?[]:h;for(let e of E)try{e({store:y})}catch(e){}return y}export{f as createSetupStyleStore};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{queueBatchCallback as e}from"../../reactivity/core.mjs";import{toRaw as t}from"../../reactivity/reactive/shared.mjs";import{isReactive as n}from"../../reactivity/reactive.mjs";import{isRef as r}from"../../reactivity/ref.mjs";import{cloneDeep as i}from"../utils.mjs";function a(e){return r(e)}function o(e){return n(e)?i(t(e)):a(e)?i(e.value):i(e)}function s(e,t,n){let r=!1;return i=>{if(!r){r=!0;try{let r=n();t.forEach(t=>{try{t({type:i,storeId:e},r)}catch(e){}})}finally{r=!1}}}}function c(t){let n=0,r,i=!1,a=()=>{if(n>0)return;let e=r;r=void 0,i=!1,e&&t(e)};return{get active(){return n>0||i},notify(e){if(n===0&&!i){t(e);return}r=e},run(t){let o=n===0,s=r,c=!1;n++;try{let e=t();return c=!0,e}finally{n--,o&&(c||(r=s),i=!0,e(a))}}}}export{s as createSafeNotifier,c as createStoreMutationTransaction,a as isTrackableRef,o as snapshotValue};
|
package/dist/store/define.d.mts
CHANGED
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
import { ActionSubscriber, DefineStoreOptions, StoreGetters, StoreSubscribeOptions, SubscriptionCallback } from "./types.mjs";
|
|
2
2
|
//#region src/store/define.d.ts
|
|
3
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
|
+
};
|
|
4
13
|
/**
|
|
5
14
|
* @description 定义一个 setup 风格的 store
|
|
6
15
|
*/
|
|
@@ -14,12 +23,5 @@ export declare function defineStore<T extends Record<string, any>>(id: string, s
|
|
|
14
23
|
/**
|
|
15
24
|
* @description 定义一个 options 风格的 store
|
|
16
25
|
*/
|
|
17
|
-
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>): () => S
|
|
18
|
-
$id: string;
|
|
19
|
-
$state: S;
|
|
20
|
-
$patch: (patch: Partial<S> | ((state: S) => void)) => void;
|
|
21
|
-
$reset: () => void;
|
|
22
|
-
$subscribe: (cb: SubscriptionCallback<S>, opts?: StoreSubscribeOptions) => () => void;
|
|
23
|
-
$onAction: (cb: ActionSubscriber<S & StoreGetters<G> & A>) => () => void;
|
|
24
|
-
};
|
|
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>;
|
|
25
27
|
//#endregion
|
package/dist/store/types.d.mts
CHANGED
|
@@ -24,18 +24,18 @@ export interface StoreSubscribeOptions {
|
|
|
24
24
|
/**
|
|
25
25
|
* @description Action 订阅回调上下文
|
|
26
26
|
*/
|
|
27
|
-
export interface ActionContext<TStore = any> {
|
|
27
|
+
export interface ActionContext<TStore = any, TResult = any> {
|
|
28
28
|
name: string;
|
|
29
29
|
store: TStore;
|
|
30
30
|
args: any[];
|
|
31
|
-
after: (cb: (result:
|
|
31
|
+
after: (cb: (result: TResult) => void) => void;
|
|
32
32
|
onError: (cb: (error: any) => void) => void;
|
|
33
33
|
}
|
|
34
34
|
/**
|
|
35
35
|
* @description Action 订阅回调类型
|
|
36
36
|
*/
|
|
37
|
-
export interface ActionSubscriber<TStore = any> {
|
|
38
|
-
(context: ActionContext<TStore>): void;
|
|
37
|
+
export interface ActionSubscriber<TStore = any, TResult = any> {
|
|
38
|
+
(context: ActionContext<TStore, TResult>): void;
|
|
39
39
|
}
|
|
40
40
|
/**
|
|
41
41
|
* @description Store 管理器(插件与共享实例)
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { JSX as JSX$1, WevuJsxChild, WevuJsxElement, WevuJsxEventHandler, WevuJsxGlobalComponents, WevuJsxGlobalComponents as WevuJsxGlobalComponents$1, WevuJsxHostAttributes } from "wevu/jsx-runtime";
|
|
2
|
+
import { TtIntrinsicElementBaseAttributes, TtIntrinsicElements, TtIntrinsicElements as TtIntrinsicElements$1 } from "@weapp-core/types/tt";
|
|
3
|
+
//#region src/tt/jsx-runtime.d.ts
|
|
4
|
+
export declare namespace JSX {
|
|
5
|
+
type Element = JSX$1.Element;
|
|
6
|
+
interface ElementClass extends JSX$1.ElementClass {}
|
|
7
|
+
interface ElementAttributesProperty extends JSX$1.ElementAttributesProperty {}
|
|
8
|
+
interface IntrinsicAttributes extends JSX$1.IntrinsicAttributes {}
|
|
9
|
+
interface IntrinsicElements extends WevuJsxGlobalComponents$1, TtIntrinsicElements$1 {}
|
|
10
|
+
}
|
|
11
|
+
//#endregion
|
|
12
|
+
export type { TtIntrinsicElementBaseAttributes, TtIntrinsicElements, WevuJsxChild, WevuJsxElement, WevuJsxEventHandler, WevuJsxGlobalComponents, WevuJsxHostAttributes };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{};
|