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
|
@@ -7,8 +7,7 @@ import { DefineComponent, ShallowUnwrapRef } from "../vue-types.mjs";
|
|
|
7
7
|
import { SetDataSnapshotOptions } from "./types/setData.mjs";
|
|
8
8
|
import { DefineComponentOptions } from "./types/options.mjs";
|
|
9
9
|
import "./types.mjs";
|
|
10
|
-
import {
|
|
11
|
-
import { TemplateRefBinding } from "./templateRefs.mjs";
|
|
10
|
+
import { WevuRuntimeBindingManifestV1 } from "@weapp-core/constants";
|
|
12
11
|
//#region src/runtime/define.d.ts
|
|
13
12
|
/**
|
|
14
13
|
* defineComponent 返回的组件定义描述,用于手动注册或高级用法。
|
|
@@ -24,16 +23,18 @@ export interface ComponentDefinition<D extends object, C extends ComputedDefinit
|
|
|
24
23
|
* @internal
|
|
25
24
|
*/
|
|
26
25
|
__wevu_options: {
|
|
26
|
+
scopedSlotOwnerRequired: boolean;
|
|
27
27
|
data: () => D;
|
|
28
28
|
computed: C;
|
|
29
29
|
methods: M;
|
|
30
30
|
setData: SetDataSnapshotOptions | undefined;
|
|
31
|
+
bindingManifest?: WevuRuntimeBindingManifestV1;
|
|
31
32
|
watch: Record<string, any> | undefined;
|
|
32
33
|
setup: ((props: any, ctx: any) => any) | undefined;
|
|
33
34
|
mpOptions: MiniProgramComponentRawOptions;
|
|
34
35
|
};
|
|
35
36
|
}
|
|
36
|
-
type SetupBindings<S> = Exclude<S, void> extends never ? Record<
|
|
37
|
+
type SetupBindings<S> = Exclude<S, void> extends never ? Record<never, never> : Exclude<S, void>;
|
|
37
38
|
type ResolveProps<P> = P extends ComponentPropsOptions ? InferProps<P> : P;
|
|
38
39
|
export interface WevuComponentConstructor<Props, RawBindings, D extends object, C extends ComputedDefinitions, M extends MethodDefinitions> {
|
|
39
40
|
new (): ComponentPublicInstance<D, C, M, Props> & ShallowUnwrapRef<RawBindings>;
|
|
@@ -82,7 +83,7 @@ export interface DefineComponentWithTypeProps<TypeProps> {
|
|
|
82
83
|
* ```
|
|
83
84
|
*/
|
|
84
85
|
export declare function defineComponent<TypeProps = any>(options: DefineComponentTypePropsOptions<TypeProps>): DefineComponentWithTypeProps<TypeProps>;
|
|
85
|
-
export declare function defineComponent<P extends ComponentPropsOptions =
|
|
86
|
+
export declare function defineComponent<P extends ComponentPropsOptions = Record<never, never>, D extends object = Record<never, never>, C extends ComputedDefinitions = Record<never, never>, M extends MethodDefinitions = Record<never, never>, S extends Record<string, any> | void = void>(options: DefineComponentOptions<P, D, C, M, S>): WevuComponentConstructor<ResolveProps<P>, SetupBindings<S>, D, C, M> & ComponentDefinition<D, C, M>;
|
|
86
87
|
/**
|
|
87
88
|
* 创建不触发宿主全局注册的 Wevu 组件定义。
|
|
88
89
|
*
|
|
@@ -113,13 +114,4 @@ export declare function getWevuComponentLifecycleDefinition(definition: object):
|
|
|
113
114
|
export declare function createWevuComponent<P extends ComponentPropsOptions = ComponentPropsOptions, D extends object = Record<string, any>, C extends ComputedDefinitions = ComputedDefinitions, M extends MethodDefinitions = MethodDefinitions>(options: DefineComponentOptions<P, D, C, M> & {
|
|
114
115
|
properties?: HostMiniProgramComponentPropertyOption;
|
|
115
116
|
}): void;
|
|
116
|
-
/**
|
|
117
|
-
* scoped slot 兼容组件入口(编译产物内部使用)。
|
|
118
|
-
* @internal
|
|
119
|
-
*/
|
|
120
|
-
export declare function createWevuScopedSlotComponent(overrides?: {
|
|
121
|
-
computed?: ComputedDefinitions;
|
|
122
|
-
inlineMap?: InlineExpressionMap;
|
|
123
|
-
templateRefs?: TemplateRefBinding[];
|
|
124
|
-
}): void;
|
|
125
117
|
//#endregion
|
package/dist/runtime/define.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{applyWevuComponentDefaults as e}from"./defaults.mjs";import{requireRuntimeCapability as t}from"./capabilities.mjs";import{hasOwn as n}from"../utils.mjs";import{hasBindingOutputPath as r,resolveBindingManifest as i}from"./bindingManifest.mjs";import{runSetupFunction as a}from"./register/setup.mjs";import{createRuntimeComponentDefinition as o}from"./define/componentDefinition.mjs";import{resolveNativeInitialData as s}from"./define/initialComputed.mjs";import{resolveVueComponentOptions as c}from"./define/options.mjs";import{applyOptionsApiProvide as l,resolveOptionsApiInjections as u}from"./define/optionsApi.mjs";import{normalizeProps as d}from"./define/props.mjs";import{applySetupResult as f}from"./define/setupResult.mjs";import{WEVU_BINDING_MANIFEST_KEY as p,WEVU_CSS_MODULES_KEY as m,WEVU_FUNCTION_PROP_PATHS_KEY as h,WEVU_SCOPED_SLOT_OWNER_REQUIRED_KEY as g,WEVU_SLOT_OWNER_ID_KEY as _,WEVU_SLOT_OWNER_ID_PROP as v,WEVU_SLOT_SCOPE_KEY as y}from"@weapp-core/constants";const b=new WeakMap;function x(e,t){let r={...t==null?{}:t};if(!e||typeof e!=`object`)return r;for(let[t,i]of Object.entries(e))i&&typeof i==`object`&&n(i,`value`)&&(r[t]=i.value);return r}function S(e,t){var n;return Array.isArray(e==null?void 0:e.pick)&&e.pick.includes(_)||(t==null||(n=t.features)==null?void 0:n.scopedSlots)===!0&&r(t,_)}function C(e){return!!e.__wevu_isPage}function w(e){let t=e.properties;return!!(t&&typeof t==`object`&&(v in t||y in t))}function T(e,t){return(t==null?void 0:t.strategy)!==`patch`||!w(e)?t:{...t,strategy:`diff`}}function E(e,t=!1){let{lifecycleDefinition:n,runtimeApp:r}=o(e,t),i={__wevu_runtime:r,__wevu_options:e};return b.set(i,n),i}function D(e){return O(e,!0)}function O(n,r){let{__typeProps:o,[g]:v,data:y,computed:b,methods:w,setData:D,watch:O,setup:k,props:A,inject:j,provide:M,allowFunctionProps:N,[p]:P,[m]:F,...I}=c(e(n)),L=i(P),R=I[h],z=Array.isArray(R)?[...new Set(R.filter(e=>typeof e==`string`&&e.length>0))]:[];delete I[h];let B=T(I,N===!0?{...D==null?{}:D,includeFunctions:!0,functionPaths:z}:N===!1?D:z.length?{...D==null?{}:D,functionPaths:z}:D),V=new Set(z.filter(e=>!e.includes(`.`))),H=d(I,A,I.properties),U=x(H.properties,w),W=typeof y==`function`?()=>y.call(U):y,G=typeof k==`function`||j!=null||M!=null||F?((e,t)=>{var n,r;F&&typeof F==`object`&&(t.instance[m]=F);let i=(n=(r=t==null?void 0:t.proxy)==null?t==null?void 0:t.instance:r)==null?Object.create(null):n,o=u(j,i);M!=null&&l(M,i);let s=typeof k==`function`?a(k,e,t):void 0,c={...o,...F==null?{}:F,...s==null?{}:s};return t&&Object.keys(c).length&&f(t.runtime,t.instance,c,{includeFunctionsInState:N===!0,functionPropPaths:N===!1?void 0:V}),c}):void 0,K=typeof W==`function`?W():W,q=K&&typeof K==`object`?Reflect.get(K,_):void 0,J=S(B,L),Y=J?t(`scopedSlots`,`defineComponent(scoped-slot owner metadata)`):void 0,X=J?{...K&&typeof K==`object`?K:{},[_]:C(I)?q||(Y==null?void 0:Y.allocateOwnerId()):q||``}:K,Z=s(X,b,B,w),Q=Z===void 0?H:{...H,data:Z};return E({scopedSlotOwnerRequired:v===!0,data:W,computed:b,methods:w,setData:B,bindingManifest:L,watch:O,setup:G,mpOptions:Q},r)}function k(e){return O(e,!1)}function A(e){let t=e.__wevu_options;if(!t)throw TypeError(`无法从非 Wevu 组件定义创建独立运行时`);return E(t)}function j(e){return b.get(e)}function M(e){var t;let n=(t=e.allowNullPropInput)==null||t;D({...e,allowNullPropInput:n,__wevu_allowNullPropInput:n})}export{A as createIsolatedWevuComponentDefinition,M as createWevuComponent,k as createWevuComponentDefinition,D as defineComponent,j as getWevuComponentLifecycleDefinition};
|
package/dist/runtime/diff.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{toRaw as e}from"../reactivity/reactive/shared.mjs";import{getReactiveVersion as t,isReactive as n}from"../reactivity/reactive.mjs";import{unref as r}from"../reactivity/ref.mjs";import{
|
|
1
|
+
import{toRaw as e}from"../reactivity/reactive/shared.mjs";import{getReactiveVersion as t,isReactive as n}from"../reactivity/reactive.mjs";import{unref as r}from"../reactivity/ref.mjs";import{isNoSetData as i}from"./noSetData.mjs";import{hasOwn as a}from"../utils.mjs";import{hasTrackableSetupBinding as o}from"./setupTracking.mjs";function s(e){if(Object.prototype.toString.call(e)!==`[object Object]`)return!1;let t=Object.getPrototypeOf(e);return t===null||t===Object.prototype}function c(e,t){if(!e||!t)return!1;let n=t;for(;n;){if(e.has(n))return!0;let t=n.lastIndexOf(`.`);if(t<0)return!1;n=n.slice(0,t)}return!1}function l(a,s,u,d,f,p,m,h,g,_){let v=r(a);if(typeof v==`bigint`){let e=Number(v);return Number.isSafeInteger(e)?e:v.toString()}if(typeof v==`symbol`)return v.toString();if(typeof v==`function`)return h||c(g,_)?v:void 0;if(typeof v!=`object`||!v)return v;if(i(v))return;let y=n(v),b=y?e(v):v,x=!!d&&y;if(d&&!x){let e=f==null?void 0:f.get(b);x=e==null?!o(b):e,f==null||f.set(b,x)}let S=x?d:void 0;if(p<=0||m.keys<=0)return b;if(S){let e=t(b),n=S.get(b);if(n&&n.version===e)return n.value}if(u.has(b))return;if(s.has(b))return s.get(b);if(b instanceof Date)return b.getTime();if(b instanceof RegExp)return b.toString();if(b instanceof Map){let e=[];return s.set(b,e),u.add(b),b.forEach((t,n)=>{e.push([l(n,s,u,void 0,void 0,1/0,{keys:1/0},h,void 0,``),l(t,s,u,void 0,void 0,1/0,{keys:1/0},h,void 0,``)])}),u.delete(b),e}if(b instanceof Set){let e=[];return s.set(b,e),u.add(b),b.forEach(t=>{e.push(l(t,s,u,void 0,void 0,1/0,{keys:1/0},h,void 0,``))}),u.delete(b),e}if(typeof ArrayBuffer<`u`){if(b instanceof ArrayBuffer)return b.byteLength;if(ArrayBuffer.isView(b)){let e=b;if(typeof e[Symbol.iterator]==`function`){let t=[...e];return s.set(b,t),t.map(e=>l(e,s,u,void 0,void 0,1/0,{keys:1/0},h,void 0,``))}let t=[...new Uint8Array(e.buffer,e.byteOffset,e.byteLength)];return s.set(b,t),t}}if(b instanceof Error)return{name:b.name,message:b.message};if(Array.isArray(b)){let e=[];s.set(b,e),u.add(b);let n=p-1;for(let t=0;t<b.length;t+=1){let r=_?`${_}.${t}`:String(t),i=l(b[t],s,u,d,f,n,m,h,g,r);e[t]=i===void 0?null:i}return u.delete(b),S&&S.set(b,{version:t(b),value:e}),e}let C={};s.set(b,C),u.add(b);let w=p-1;for(let e of Object.keys(b)){if(--m.keys,m.keys<=0)break;let t=_?`${_}.${e}`:e,n=l(b[e],s,u,d,f,w,m,h,g,t);n!==void 0&&(C[e]=n)}return u.delete(b),S&&S.set(b,{version:t(b),value:C}),C}function u(e,t=new WeakMap,n){var r,i,a;let o=(r=n==null?void 0:n._depth)==null?typeof(n==null?void 0:n.maxDepth)==`number`?Math.max(0,Math.floor(n.maxDepth)):1/0:r,s=(i=n==null?void 0:n._budget)==null?typeof(n==null?void 0:n.maxKeys)==`number`?{keys:Math.max(0,Math.floor(n.maxKeys))}:{keys:1/0}:i,c=Array.isArray(n==null?void 0:n.functionPaths)&&n.functionPaths.length?new Set(n.functionPaths):void 0;return l(e,t,new WeakSet,n==null?void 0:n.cache,n==null?void 0:n.cacheEligibility,o,s,!!(n!=null&&n.includeFunctions),c,(a=n==null?void 0:n._path)==null?``:a)}function d(e,t,n){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(!n(e[r],t[r]))return!1;return!0}function f(e,t,n){let r=Object.keys(e),i=Object.keys(t);if(r.length!==i.length)return!1;for(let i of r)if(!a(t,i)||!n(e[i],t[i]))return!1;return!0}function p(e,t){return Object.is(e,t)?!0:Array.isArray(e)&&Array.isArray(t)?d(e,t,p):s(e)&&s(t)?f(e,t,p):!1}function m(e){return e===void 0?null:e}function h(e,t,n,r){if(!p(e,t)){if(s(e)&&s(t)){for(let i of Object.keys(t)){if(!a(e,i)){r[`${n}.${i}`]=m(t[i]);continue}h(e[i],t[i],`${n}.${i}`,r)}for(let i of Object.keys(e))a(t,i)||(r[`${n}.${i}`]=null);return}if(Array.isArray(e)&&Array.isArray(t)){d(e,t,p)||(r[n]=m(t));return}r[n]=m(t)}}function g(e,t,n){let r={},i=n==null?void 0:n.skipKeys;for(let n of Object.keys(t))i!=null&&i.has(n)||h(e[n],t[n],n,r);for(let n of Object.keys(e))i!=null&&i.has(n)||a(t,n)||(r[n]=null);return r}export{g as diffSnapshots,u as toPlain};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{registerRuntimeCapability as e}from"../capabilities.mjs";import{runInlineExpression as t}from"../register/inline.mjs";import{WEVU_INLINE_MAP_KEY as n}from"@weapp-core/constants";const r={handler(e){var r,i;let a=this.__wevu,o=(r=a==null?void 0:a.proxy)==null?this:r,s=a==null||(i=a.methods)==null?void 0:i[n];return t(o,void 0,e,s&&typeof s==`object`&&!Array.isArray(s)?s:void 0)},run:t};function i(){e(`inlineEvents`,r)}export{i as installInlineEvents};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{registerRuntimeCapability as e}from"../capabilities.mjs";import{registerRuntimeLayoutHosts as t,unregisterRuntimeLayoutHosts as n}from"../layoutBridge.mjs";import{resolveRuntimePageLayoutName as r,syncRuntimePageLayoutState as i}from"../pageLayout.mjs";import{runTeardownSteps as a}from"../teardown.mjs";import{installTemplateRefs as o}from"./templateRefs.mjs";import{WEVU_LAYOUT_HOST_BRIDGE_KEY as s,WEVU_PAGE_LAYOUT_NAME_KEY as c,WEVU_PAGE_LAYOUT_PROPS_KEY as l,WEVU_PAGE_LAYOUT_SETTER_KEY as u}from"@weapp-core/constants";const d={attachPageSetter(e){e[u]=(t,n)=>{var a;let o=(a=e.__wevu)==null?void 0:a.state;if(!o||typeof o!=`object`)return;o[c]=r(t);let s=t===!1||n==null?{}:n;o[l]=s,i(e,t,s)}},attachHosts(e,n){if(!e.length||n[s])return;let r=t(e,n);r&&(n[s]=r)},detachHosts(e,t){let r=t[s];e.length&&r&&a([()=>n(e,r),()=>{delete t[s]}])}};function f(){o(),e(`layout`,d)}export{f as installLayout};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{addMutationRecorder as e,removeMutationRecorder as t}from"../../reactivity/reactive/mutation.mjs";import{toRaw as n}from"../../reactivity/reactive/shared.mjs";import{clearPatchIndices as r,prelinkReactiveTree as i}from"../../reactivity/reactive/patch.mjs";import{registerRuntimeCapability as a}from"../capabilities.mjs";import{createSetDataScheduler as o}from"../app/setData/scheduler.mjs";import{preparePatchUpdate as s}from"../app/setData/patchScheduler.mjs";function c(a){let c=o(a),l=n(a.state),u=new Map,d=new Set,f=Object.create(null),p=!0,m=!1,h=!1,g=e=>{if(a.includeComputed){for(let e of Object.keys(f))delete f[e];for(let t of Object.keys(a.computedRefs))c.shouldIncludeSnapshotKey(t)&&(f[t]=e[t]);a.dirtyComputedKeys.clear()}},_=(e=`diff`)=>{let t=u.size+d.size;u.clear(),d.clear(),p=!1,c.runDiffUpdate(e,t,g)},v=e=>{if(!a.isMounted())return;if(e.root!==l){let t=c.resolveTopKeysByRoot(e.root);for(let e of t)d.add(e);return}if(!e.path){if(Array.isArray(e.fallbackTopKeys)&&e.fallbackTopKeys.length)for(let t of e.fallbackTopKeys)d.add(t);else p=!0;return}let t=e.path.split(`.`,1)[0];c.shouldIncludeSnapshotKey(t)&&u.set(e.path,{kind:e.kind,op:e.op})};return{job(){if(!c.prepareJob(u.size+d.size,()=>[...u.keys(),...d,...a.includeComputed?a.dirtyComputedKeys:[]]))return;if(p||c.needsFullSnapshot())return _(`needsFullSnapshot`);if(!(u.size>0||d.size>0||a.includeComputed&&a.dirtyComputedKeys.size>0))return _(`diff`);let e=s({state:a.state,computedRefs:a.computedRefs,dirtyComputedKeys:a.dirtyComputedKeys,includeComputed:a.includeComputed,computedCompare:a.computedCompare,computedCompareMaxDepth:a.computedCompareMaxDepth,computedCompareMaxKeys:a.computedCompareMaxKeys,shouldIncludeKey:c.shouldIncludeSnapshotKey,maxPatchKeys:a.maxPatchKeys,maxPayloadBytes:a.maxPayloadBytes,mergeSiblingThreshold:a.mergeSiblingThreshold,mergeSiblingMaxInflationRatio:a.mergeSiblingMaxInflationRatio,mergeSiblingMaxParentBytes:a.mergeSiblingMaxParentBytes,mergeSiblingSkipArray:a.mergeSiblingSkipArray,elevateTopKeyThreshold:a.elevateTopKeyThreshold,toPlainMaxDepth:a.toPlainMaxDepth,toPlainMaxKeys:a.toPlainMaxKeys,includeFunctions:a.includeFunctions,functionPaths:a.functionPaths,plainCache:c.plainCache,plainCacheEligibility:c.plainCacheEligibility,pendingPatches:u,fallbackTopKeys:d,dispatchedSnapshot:c.getLatestSnapshot(),dispatchedComputedSnapshot:f});if(e){if(c.emitDebug(e.debug,e.type===`patch`?Object.keys(e.payload):void 0),e.type===`fallback`)return _(e.reason);e.computedUpdates&&Object.assign(f,e.computedUpdates),c.dispatchUpdate({mode:`patch`,kind:`delta`,reason:`patch`,snapshot:e.snapshot,payload:e.payload,pendingPatchKeys:e.debug.pendingPatchKeys})}},snapshot:c.snapshot,cloneLatestSnapshot:c.cloneLatestSnapshot,start(){m||h||(m=!0,i(a.state,{shouldIncludeTopKey:a.shouldIncludeKey,maxDepth:a.prelinkMaxDepth,maxKeys:a.prelinkMaxKeys}),e(v))},dispose(){h||(h=!0,c.dispose(),m&&t(v),r(a.state))}}}const l={createScheduler:c};function u(){a(`patchStrategy`,l)}export{u as installPatchStrategy};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { PageLayoutState, WevuPageLayoutMap, resolveRuntimePageLayoutName as resolveRuntimePageLayoutName$1, syncRuntimePageLayoutState as syncRuntimePageLayoutState$1, syncRuntimePageLayoutStateFromRuntime as syncRuntimePageLayoutStateFromRuntime$1, usePageLayout as usePageLayout$1 } from "../pageLayout.mjs";
|
|
2
|
+
import { LayoutHostBinding } from "../capabilities.mjs";
|
|
3
|
+
import { LayoutBridgeInstance, registerPageLayoutBridge as registerPageLayoutBridge$1, registerRuntimeLayoutHosts as registerRuntimeLayoutHosts$1, resolveLayoutBridge as resolveLayoutBridge$1, resolveLayoutHost as resolveLayoutHost$1, unregisterPageLayoutBridge as unregisterPageLayoutBridge$1, unregisterRuntimeLayoutHosts as unregisterRuntimeLayoutHosts$1, useLayoutBridge as useLayoutBridge$1, useLayoutHosts as useLayoutHosts$1, waitForLayoutHost as waitForLayoutHost$1 } from "../layoutBridge.mjs";
|
|
4
|
+
//#region src/runtime/features/publicLayout.d.ts
|
|
5
|
+
export declare const registerPageLayoutBridge: typeof registerPageLayoutBridge$1;
|
|
6
|
+
export declare const unregisterPageLayoutBridge: typeof unregisterPageLayoutBridge$1;
|
|
7
|
+
export declare const resolveLayoutBridge: typeof resolveLayoutBridge$1;
|
|
8
|
+
export declare const resolveLayoutHost: typeof resolveLayoutHost$1;
|
|
9
|
+
export declare const waitForLayoutHost: typeof waitForLayoutHost$1;
|
|
10
|
+
export declare const useLayoutBridge: typeof useLayoutBridge$1;
|
|
11
|
+
export declare const registerRuntimeLayoutHosts: typeof registerRuntimeLayoutHosts$1;
|
|
12
|
+
export declare const unregisterRuntimeLayoutHosts: typeof unregisterRuntimeLayoutHosts$1;
|
|
13
|
+
export declare const useLayoutHosts: typeof useLayoutHosts$1;
|
|
14
|
+
export declare const usePageLayout: typeof usePageLayout$1;
|
|
15
|
+
type PublicPageLayoutName = keyof WevuPageLayoutMap extends never ? string : Extract<keyof WevuPageLayoutMap, string>;
|
|
16
|
+
type PublicPageLayoutProps<Name extends string> = Name extends keyof WevuPageLayoutMap ? WevuPageLayoutMap[Name] : object;
|
|
17
|
+
export declare function setPageLayout(layout: false): void;
|
|
18
|
+
export declare function setPageLayout<Name extends PublicPageLayoutName>(layout: Name, props?: PublicPageLayoutProps<Name>): void;
|
|
19
|
+
export declare const syncRuntimePageLayoutState: typeof syncRuntimePageLayoutState$1;
|
|
20
|
+
export declare const syncRuntimePageLayoutStateFromRuntime: typeof syncRuntimePageLayoutStateFromRuntime$1;
|
|
21
|
+
export declare const resolveRuntimePageLayoutName: typeof resolveRuntimePageLayoutName$1;
|
|
22
|
+
//#endregion
|
|
23
|
+
export type { LayoutBridgeInstance, LayoutHostBinding, PageLayoutState, WevuPageLayoutMap };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{getCurrentMiniProgramPages as e}from"../platform.mjs";import{getCurrentInstance as t}from"../hooks/base.mjs";import{runtimeCapabilityRegistry as n}from"../capabilities.mjs";import{registerPageLayoutBridge as r,registerRuntimeLayoutHosts as i,resolveLayoutBridge as a,resolveLayoutHost as o,unregisterPageLayoutBridge as s,unregisterRuntimeLayoutHosts as c,useLayoutBridge as l,useLayoutHosts as u,waitForLayoutHost as d}from"../layoutBridge.mjs";import{getCurrentPageInstance as f}from"../register/component/lifecycle/platform.mjs";import{resolveRuntimePageLayoutName as p,setPageLayout as m,syncRuntimePageLayoutState as h,syncRuntimePageLayoutStateFromRuntime as g,usePageLayout as _}from"../pageLayout.mjs";import{installLayout as v}from"./layout.mjs";const y=(...e)=>(v(),r(...e)),b=(...e)=>(v(),s(...e)),x=(...e)=>(v(),a(...e)),S=(...e)=>(v(),o(...e)),C=(...e)=>(v(),d(...e)),w=(...e)=>(v(),l(...e)),T=(...e)=>(v(),i(...e)),E=(...e)=>(v(),c(...e)),D=(...e)=>(v(),u(...e)),O=(...e)=>(v(),_(...e));function k(r,i){var a;v();let o=e(),s=t(),c=s&&typeof s.route==`string`&&s.route?s:(a=f())==null?o[o.length-1]:a;if(c){var l;(l=n.layout)==null||l.attachPageSetter(c)}if(r===!1){m(!1);return}m(r,i)}const A=(...e)=>(v(),h(...e)),j=(...e)=>(v(),g(...e)),M=(...e)=>(v(),p(...e));export{y as registerPageLayoutBridge,T as registerRuntimeLayoutHosts,x as resolveLayoutBridge,S as resolveLayoutHost,M as resolveRuntimePageLayoutName,k as setPageLayout,A as syncRuntimePageLayoutState,j as syncRuntimePageLayoutStateFromRuntime,b as unregisterPageLayoutBridge,E as unregisterRuntimeLayoutHosts,w as useLayoutBridge,D as useLayoutHosts,O as usePageLayout,C as waitForLayoutHost};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ComputedDefinitions } from "../types/core.mjs";
|
|
2
|
+
import "../types.mjs";
|
|
3
|
+
import { InlineExpressionMap } from "../register/inline.mjs";
|
|
4
|
+
import { LayoutHostBinding, TemplateRefBinding } from "../capabilities.mjs";
|
|
5
|
+
import { WEVU_BINDING_MANIFEST_KEY, WevuRuntimeBindingManifestV1 } from "@weapp-core/constants";
|
|
6
|
+
//#region src/runtime/features/scopedSlots.d.ts
|
|
7
|
+
export interface CreateWevuScopedSlotComponentOptions {
|
|
8
|
+
computed?: ComputedDefinitions;
|
|
9
|
+
inlineMap?: InlineExpressionMap;
|
|
10
|
+
layoutHosts?: LayoutHostBinding[];
|
|
11
|
+
templateRefs?: TemplateRefBinding[];
|
|
12
|
+
[WEVU_BINDING_MANIFEST_KEY]?: WevuRuntimeBindingManifestV1;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* 创建编译器生成的作用域插槽组件。
|
|
16
|
+
*/
|
|
17
|
+
export declare function createWevuScopedSlotComponent(overrides?: CreateWevuScopedSlotComponentOptions): void;
|
|
18
|
+
/**
|
|
19
|
+
* 安装作用域插槽的 owner 生命周期与组件创建能力。
|
|
20
|
+
*/
|
|
21
|
+
export declare function installScopedSlots(): void;
|
|
22
|
+
//#endregion
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{getScopedSlotHostGlobalObject as e}from"../platform.mjs";import{RUNTIME_SCOPED_SLOT_STATE_KEY as t,getScopedSlotMountState as n,registerRuntimeCapability as r,requireRuntimeCapability as i}from"../capabilities.mjs";import{runTeardownSteps as a}from"../teardown.mjs";import{callNativeSetData as o,resolveNativeSetData as s}from"../register/runtimeInstance/utils.mjs";import{createWevuComponent as c}from"../define.mjs";import{allocateOwnerId as l,attachOwnerSnapshot as u,getOwnerProxy as d,mergeOwnerSnapshotProps as f,removeOwner as p,resolveOwnerSnapshot as m,updateOwnerSnapshot as h}from"../scopedSlots.mjs";import{createScopedSlotOptions as g}from"../define/scopedSlotOptions.mjs";import{WEVU_PROPS_KEY as _,WEVU_RUNTIME_OWNER_ID_KEY as v,WEVU_SCOPED_SLOT_CREATOR_KEY as y,WEVU_SLOT_OWNER_ID_KEY as b}from"@weapp-core/constants";const x={prepareMount(e){var r;let i=n(e);if(i)return i;let a=(r=e.data)==null?void 0:r[b],o=typeof a==`string`&&a?a:l(),s={ownerId:o,shouldFlushNativeOwnerId:typeof a==`string`&&a!==o};return Object.defineProperty(e,t,{value:s,configurable:!0,enumerable:!1,writable:!1}),s},attachMount(e,t,n,r){u(e,t,n.ownerId,{deferSnapshot:r})},refresh(e,t){var n;let r=e.__wevu;if(!r)return;let i=m(r),a=(n=e[_])==null?e.properties:n;f(i,a),h(t.ownerId,i,r.proxy,e)},syncNativeOwnerId(e,t){if(!t.shouldFlushNativeOwnerId)return;try{e.data&&typeof e.data==`object`&&(e.data[b]=t.ownerId)}catch(e){}let n=s(e);n&&o(e,n,{[b]:t.ownerId})},teardown(e){var r,i;let o=n(e),s=e,c=(r=(i=o==null?void 0:o.ownerId)==null?s[v]:i)==null?s[b]:r;a([()=>{typeof c==`string`&&c&&p(c)},()=>{delete s[t]}])},resolveLifecycleProxy(e){var t,n,r,i,a;let o=e,s=(t=(n=(r=o[v])==null?o[b]:r)==null?(i=e.data)==null?void 0:i[b]:n)==null?(a=e.properties)==null?void 0:a[b]:t;return typeof s==`string`&&s?d(s):void 0},allocateOwnerId:l};function S(e){i(`scopedSlots`,`createWevuScopedSlotComponent`);let t=g(e);c(t)}function C(){r(`scopedSlots`,x);let t=e();t&&t[y]!==S&&(t[y]=S)}export{S as createWevuScopedSlotComponent,C as installScopedSlots};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{registerRuntimeCapability as e}from"../capabilities.mjs";import{createSetDataHighFrequencyWarningMonitor as t}from"../register/setDataFrequencyWarning.mjs";const n={createMonitor:t};function r(){e(`setDataHighFrequencyWarning`,n)}export{r as installSetDataHighFrequencyWarning};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{registerRuntimeCapability as e}from"../capabilities.mjs";import{clearTemplateRefs as t,scheduleTemplateRefUpdate as n}from"../templateRefs.mjs";import{WEVU_TEMPLATE_REFS_KEY as r}from"@weapp-core/constants";const i={attachBindings(e,t){Object.defineProperty(e,r,{value:t,configurable:!0,enumerable:!1,writable:!1})},hasBindings(e){let t=e[r];return Array.isArray(t)&&t.length>0},schedule:n,scheduleOwner(e){let t=e.selectOwnerComponent;if(typeof t==`function`)try{let r=t.call(e);r&&r!==e&&n(r)}catch(e){}},clear:t};function a(){e(`templateRefs`,i)}export{a as installTemplateRefs};
|
|
@@ -11,8 +11,7 @@ export declare function onMounted(handler: () => void): void;
|
|
|
11
11
|
*/
|
|
12
12
|
export declare function onUpdated(handler: () => void): void;
|
|
13
13
|
/**
|
|
14
|
-
* Vue 3
|
|
15
|
-
* 小程序无 before-unload 生命周期,setup 时同步执行以保持语义。
|
|
14
|
+
* Vue 3 对齐:在卸载清理前触发,保持实例上下文和暴露方法可用。
|
|
16
15
|
*/
|
|
17
16
|
export declare function onBeforeUnmount(handler: () => void): void;
|
|
18
17
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{assertInSetup as e,callHookList as t,pushHook as n}from"./base.mjs";import{
|
|
1
|
+
import{assertInSetup as e,callHookList as t,pushHook as n}from"./base.mjs";import{WEVU_ON_BEFORE_UNMOUNT_HOOK as r,WEVU_ON_BEFORE_UPDATE_HOOK as i,WEVU_ON_UPDATED_HOOK as a}from"@weapp-core/constants";function o(t){n(e(`onMounted`),`onReady`,t)}function s(t){n(e(`onUpdated`),a,t)}function c(t){n(e(`onBeforeUnmount`),r,t)}function l(t){n(e(`onUnmounted`),`onUnload`,t)}function u(t){e(`onBeforeMount`),t()}function d(t){n(e(`onBeforeUpdate`),i,t)}function f(t){let r=e(`onErrorCaptured`);n(r,`onError`,e=>t(e,r,``))}function p(t){n(e(`onActivated`),`onShow`,t)}function m(t){n(e(`onDeactivated`),`onHide`,t)}function h(t){e(`onServerPrefetch`)}function g(e,n){t(e,n===`before`?i:a)}export{g as callUpdateHooks,p as onActivated,u as onBeforeMount,c as onBeforeUnmount,d as onBeforeUpdate,m as onDeactivated,f as onErrorCaptured,o as onMounted,h as onServerPrefetch,l as onUnmounted,s as onUpdated};
|
package/dist/runtime/index.d.mts
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { MiniProgramCSSProperties, MiniProgramDatasetAttributes, MiniProgramIntrinsicElementBaseAttributes, MiniProgramIntrinsicEventHandler, WeappCSSProperties, WeappDatasetAttributes, WeappIntrinsicElementBaseAttributes, WeappIntrinsicEventHandler } from "../weappIntrinsicElements/base.mjs";
|
|
2
|
-
import { MiniProgramHtmlAliasIntrinsicElements, MiniProgramIntrinsicElements, WeappHtmlAliasIntrinsicElements, WeappIntrinsicElements } from "../weappIntrinsicElements.mjs";
|
|
3
1
|
import { AlipayMiniProgramHostNamespace, AlipayMiniProgramHostSourceContract, DefaultMiniProgramHostNamespace, DefaultMiniProgramHostSourceContract, DouyinMiniProgramHostNamespace, DouyinMiniProgramHostSourceContract, MiniProgramHostNamespace, MiniProgramHostNamespaceBySource, MiniProgramHostSourceName, MiniProgramHostSourceRegistry, MiniProgramPlatformHostNamespaceBySource, MiniProgramPlatformHostSourceName, MiniProgramPlatformHostSourceRegistry, MiniProgramRuntimeHostNamespaceBySource, MiniProgramRuntimeHostSourceName, MiniProgramRuntimeHostSourceRegistry, TtMiniProgramHostNamespace, TtMiniProgramHostSourceContract, WechatMiniProgramHostNamespace, WechatMiniProgramHostSourceContract } from "./types/miniprogramHostSources.mjs";
|
|
4
2
|
import { HostMiniProgramAddToFavoritesOption, HostMiniProgramAppOptions, HostMiniProgramAppTrivialInstance, HostMiniProgramBehaviorIdentifier, HostMiniProgramBoundingClientRectResult, HostMiniProgramComponentAllFullProperty, HostMiniProgramComponentAllProperty, HostMiniProgramComponentBehaviorOptions, HostMiniProgramComponentEmptyArray, HostMiniProgramComponentInstance, HostMiniProgramComponentMethodOption, HostMiniProgramComponentPropertyOption, HostMiniProgramComponentPropertyValue, HostMiniProgramComponentShortProperty, HostMiniProgramComponentTrivialInstance, HostMiniProgramComponentTrivialOption, HostMiniProgramIntersectionObserver, HostMiniProgramIntersectionObserverOptions, HostMiniProgramLaunchOptions, HostMiniProgramMemoryWarningResult, HostMiniProgramNavigateToOption, HostMiniProgramNodesRef, HostMiniProgramNodesRefFields, HostMiniProgramPageLifetime, HostMiniProgramPageNotFoundOptions, HostMiniProgramPageResizeOption, HostMiniProgramPageScrollOption, HostMiniProgramPageTrivialInstance, HostMiniProgramReLaunchOption, HostMiniProgramRedirectToOption, HostMiniProgramRouter, HostMiniProgramSaveExitState, HostMiniProgramScrollOffsetResult, HostMiniProgramSelectorQuery, HostMiniProgramShareAppMessageOption, HostMiniProgramSwitchTabOption, HostMiniProgramTabItemTapOption, HostMiniProgramThemeChangeResult, HostMiniProgramTriggerEventOptions, HostMiniProgramUnhandledRejectionResult } from "./types/miniprogramHost.mjs";
|
|
5
3
|
import { MiniProgramAdapter, MiniProgramAppOptions, MiniProgramBehaviorIdentifier, MiniProgramComponentInstance, MiniProgramComponentOptions, MiniProgramComponentPropertyValue, MiniProgramComponentRawOptions, MiniProgramInstance, MiniProgramPageLifetimes } from "./types/miniprogram.mjs";
|
|
@@ -7,35 +5,35 @@ import { ComponentPropsOptions, ExtractDefaultPropTypes, ExtractPropTypes, Extra
|
|
|
7
5
|
import { MiniProgramRouterNavigateToOption, MiniProgramRouterReLaunchOption, MiniProgramRouterRedirectToOption, MiniProgramRouterSwitchTabOption, SetupContextRouter, WevuTypedRouterRouteMap } from "./types/props/router.mjs";
|
|
8
6
|
import { ComponentPublicInstance, ComputedDefinitions, ExtractComputed, ExtractMethods, MethodDefinitions, ModelBinding, ModelBindingOptions, ModelBindingPayload } from "./types/core.mjs";
|
|
9
7
|
import { AppConfig, InternalRuntimeState, InternalRuntimeStateFields, RuntimeApp, RuntimeInstance, WevuPlugin } from "./types/runtime.mjs";
|
|
10
|
-
import { SetupContext, SetupContextNativeInstance, SetupFunction } from "./types/props/setup.mjs";
|
|
8
|
+
import { SetupContext, SetupContextIntersectionObserver, SetupContextIntersectionObserverOptions, SetupContextNativeInstance, SetupContextSelectorQuery, SetupFunction } from "./types/props/setup.mjs";
|
|
11
9
|
import { AllowedComponentProps, ComponentCustomProps, ComponentOptionsMixin, DefineComponent, NativeComponent, ObjectDirective, PublicProps, ShallowUnwrapRef, VNode, VNodeProps } from "../vue-types.mjs";
|
|
12
|
-
import { SetDataDebugInfo, SetDataSnapshotOptions } from "./types/setData.mjs";
|
|
10
|
+
import { SetDataBindingDiagnostic, SetDataDebugInfo, SetDataSnapshotOptions } from "./types/setData.mjs";
|
|
13
11
|
import { CreateAppOptions, DataOption, DefineAppOptions, DefineComponentOptions, PageFeatures } from "./types/options.mjs";
|
|
14
12
|
import { GlobalComponents, GlobalDirectives, MiniProgramTemplateRefValue, TemplateRefValue, TemplateRefs, WevuGlobalComponents, WevuGlobalDirectives } from "./types.mjs";
|
|
15
|
-
import { createApp } from "./app.mjs";
|
|
16
13
|
import { useCssModule } from "./css.mjs";
|
|
17
|
-
import { WevuDefaults, resetWevuDefaults
|
|
18
|
-
import { ComponentDefinition, DefineComponentTypePropsOptions, DefineComponentWithTypeProps, SetupContextWithTypeProps, SetupFunctionWithTypeProps, WevuComponentConstructor, WevuDefinedComponent
|
|
14
|
+
import { WevuDefaults, resetWevuDefaults } from "./defaults.mjs";
|
|
15
|
+
import { ComponentDefinition, DefineComponentTypePropsOptions, DefineComponentWithTypeProps, SetupContextWithTypeProps, SetupFunctionWithTypeProps, WevuComponentConstructor, WevuDefinedComponent } from "./define.mjs";
|
|
19
16
|
import { DisposableBag, DisposableLike, DisposableMethodName, DisposableObject, useDisposables } from "./disposables.mjs";
|
|
20
17
|
import { ElementIntersectionObserverCallback, UseElementIntersectionObserverOptions, UseElementIntersectionObserverReturn, useElementIntersectionObserver } from "./elementIntersectionObserver.mjs";
|
|
18
|
+
import { PageLayoutState, WevuPageLayoutMap } from "./pageLayout.mjs";
|
|
19
|
+
import { LayoutHostBinding } from "./capabilities.mjs";
|
|
20
|
+
import { LayoutBridgeInstance } from "./layoutBridge.mjs";
|
|
21
|
+
import { registerPageLayoutBridge, registerRuntimeLayoutHosts, resolveLayoutBridge, resolveLayoutHost, resolveRuntimePageLayoutName, setPageLayout, syncRuntimePageLayoutState, syncRuntimePageLayoutStateFromRuntime, unregisterPageLayoutBridge, unregisterRuntimeLayoutHosts, useLayoutBridge, useLayoutHosts, usePageLayout, waitForLayoutHost } from "./features/publicLayout.mjs";
|
|
21
22
|
import { callHookList, callHookReturn, getCurrentInstance, getCurrentSetupContext, setCurrentInstance, setCurrentSetupContext } from "./hooks/base.mjs";
|
|
22
23
|
import { onAddToFavorites, onAttached, onDetached, onError, onHide, onLaunch, onLoad, onMemoryWarning, onMoved, onPageNotFound, onPageScroll, onPullDownRefresh, onReachBottom, onReady, onResize, onRouteDone, onSaveExitState, onShareAppMessage, onShareTimeline, onShow, onTabItemTap, onThemeChange, onUnhandledRejection, onUnload } from "./hooks/register.mjs";
|
|
23
24
|
import { callUpdateHooks, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onServerPrefetch, onUnmounted, onUpdated } from "./hooks/vue.mjs";
|
|
24
25
|
import "./hooks.mjs";
|
|
25
26
|
import { UseIntersectionObserverOptions, UseIntersectionObserverResult, useIntersectionObserver } from "./intersectionObserver.mjs";
|
|
26
|
-
import { LayoutBridgeInstance, LayoutHostBinding, registerPageLayoutBridge, registerRuntimeLayoutHosts, resolveLayoutBridge, resolveLayoutHost, unregisterPageLayoutBridge, unregisterRuntimeLayoutHosts, useLayoutBridge, useLayoutHosts, waitForLayoutHost } from "./layoutBridge.mjs";
|
|
27
27
|
import { isNoSetData, markNoSetData } from "./noSetData.mjs";
|
|
28
28
|
import { NavigationBarMetrics, PageStackSnapshot, UseNavigationBarMetricsOptions, UsePageStackOptions, getCurrentPageStackSnapshot, getNavigationBarMetrics, useNavigationBarMetrics, usePageStack } from "./pageEnvironment.mjs";
|
|
29
|
-
import { PageLayoutState, WevuPageLayoutMap, resolveRuntimePageLayoutName, setPageLayout, syncRuntimePageLayoutState, syncRuntimePageLayoutStateFromRuntime, usePageLayout } from "./pageLayout.mjs";
|
|
30
29
|
import { UsePageScrollThrottleOptions, UsePageScrollThrottleStopHandle, usePageScrollThrottle } from "./pageScroll.mjs";
|
|
31
30
|
import { setGlobalProvidedValue } from "./provideStore.mjs";
|
|
32
31
|
import { hasInjectionContext, inject, injectGlobal, provide, provideGlobal } from "./provide.mjs";
|
|
33
|
-
import {
|
|
34
|
-
import { registerApp } from "./register/app.mjs";
|
|
35
|
-
import { registerComponent } from "./register/component.mjs";
|
|
36
|
-
import { mountRuntimeInstance, setRuntimeSetDataVisibility, teardownRuntimeInstance } from "./register/runtimeInstance.mjs";
|
|
32
|
+
import { setRuntimeSetDataVisibility, teardownRuntimeInstance } from "./register/runtimeInstance.mjs";
|
|
37
33
|
import { runSetupFunction } from "./register/setup.mjs";
|
|
38
34
|
import "./register.mjs";
|
|
35
|
+
import { createApp, createWevuComponent, createWevuScopedSlotComponent, defineComponent, mountRuntimeInstance, registerApp, registerComponent, setWevuDefaults } from "./publicRuntime.mjs";
|
|
36
|
+
import { PullDownRefreshHandler, UseAsyncPullDownRefreshOptions, useAsyncPullDownRefresh } from "./pullDownRefresh.mjs";
|
|
39
37
|
import { UseAllBoundingClientRectOptions, UseAllScrollOffsetOptions, UseAllSelectorFieldsOptions, UseBoundingClientRectOptions, UseScrollOffsetOptions, UseSelectorFieldsOptions, UseSelectorQueryOptions, useBoundingClientRect, useScrollOffset, useSelectorFields, useSelectorQuery } from "./selectorQuery.mjs";
|
|
40
38
|
import { normalizeClass, normalizeStyle, resolvePropValue } from "./template.mjs";
|
|
41
39
|
import { UpdatePerformanceListener, UpdatePerformanceListenerResult, UseUpdatePerformanceListenerStopHandle, useUpdatePerformanceListener } from "./updatePerformance.mjs";
|
|
@@ -45,4 +43,4 @@ import { ModelModifiers, UseModelOptions, mergeModels, useBindModel, useChangeMo
|
|
|
45
43
|
import { useNativePageRouter, useNativeRouter } from "./vueCompat/router.mjs";
|
|
46
44
|
import { TemplateRef, useTemplateRef } from "./vueCompat/templateRef.mjs";
|
|
47
45
|
import "./vueCompat.mjs";
|
|
48
|
-
export { type AlipayMiniProgramHostNamespace, type AlipayMiniProgramHostSourceContract, type AllowedComponentProps, type AppConfig, type ComponentCustomProps, type ComponentDefinition, type ComponentOptionsMixin, type ComponentPropsOptions, type ComponentPublicInstance, type ComputedDefinitions, type CreateAppOptions, type DataOption, type DefaultMiniProgramHostNamespace, type DefaultMiniProgramHostSourceContract, type DefineAppOptions, type DefineComponent, type DefineComponentOptions, type DefineComponentTypePropsOptions, type DefineComponentWithTypeProps, DisposableBag, DisposableLike, DisposableMethodName, DisposableObject, type DouyinMiniProgramHostNamespace, type DouyinMiniProgramHostSourceContract, ElementIntersectionObserverCallback, type ExtractComputed, type ExtractDefaultPropTypes, type ExtractMethods, type ExtractPropTypes, type ExtractPublicPropTypes, GlobalComponents, GlobalDirectives, type HostMiniProgramAddToFavoritesOption, type HostMiniProgramAppOptions, type HostMiniProgramAppTrivialInstance, type HostMiniProgramBehaviorIdentifier, type HostMiniProgramBoundingClientRectResult, type HostMiniProgramComponentAllFullProperty, type HostMiniProgramComponentAllProperty, type HostMiniProgramComponentBehaviorOptions, type HostMiniProgramComponentEmptyArray, type HostMiniProgramComponentInstance, type HostMiniProgramComponentMethodOption, type HostMiniProgramComponentPropertyOption, type HostMiniProgramComponentPropertyValue, type HostMiniProgramComponentShortProperty, type HostMiniProgramComponentTrivialInstance, type HostMiniProgramComponentTrivialOption, type HostMiniProgramIntersectionObserver, type HostMiniProgramIntersectionObserverOptions, type HostMiniProgramLaunchOptions, type HostMiniProgramMemoryWarningResult, type HostMiniProgramNavigateToOption, type HostMiniProgramNodesRef, type HostMiniProgramNodesRefFields, type HostMiniProgramPageLifetime, type HostMiniProgramPageNotFoundOptions, type HostMiniProgramPageResizeOption, type HostMiniProgramPageScrollOption, type HostMiniProgramPageTrivialInstance, type HostMiniProgramReLaunchOption, type HostMiniProgramRedirectToOption, type HostMiniProgramRouter, type HostMiniProgramSaveExitState, type HostMiniProgramScrollOffsetResult, type HostMiniProgramSelectorQuery, type HostMiniProgramShareAppMessageOption, type HostMiniProgramSwitchTabOption, type HostMiniProgramTabItemTapOption, type HostMiniProgramThemeChangeResult, type HostMiniProgramTriggerEventOptions, type HostMiniProgramUnhandledRejectionResult, type InferNativePropType, type InferNativeProps, type InferPropType, type InferProps, type InternalRuntimeState, type InternalRuntimeStateFields, LayoutBridgeInstance, LayoutHostBinding, type MethodDefinitions, type MiniProgramAdapter, type HostMiniProgramAddToFavoritesOption as MiniProgramAddToFavoritesOption, type MiniProgramAppOptions, type MiniProgramBehaviorIdentifier, type HostMiniProgramBoundingClientRectResult as MiniProgramBoundingClientRectResult, type
|
|
46
|
+
export { type AlipayMiniProgramHostNamespace, type AlipayMiniProgramHostSourceContract, type AllowedComponentProps, type AppConfig, type ComponentCustomProps, type ComponentDefinition, type ComponentOptionsMixin, type ComponentPropsOptions, type ComponentPublicInstance, type ComputedDefinitions, type CreateAppOptions, type DataOption, type DefaultMiniProgramHostNamespace, type DefaultMiniProgramHostSourceContract, type DefineAppOptions, type DefineComponent, type DefineComponentOptions, type DefineComponentTypePropsOptions, type DefineComponentWithTypeProps, DisposableBag, DisposableLike, DisposableMethodName, DisposableObject, type DouyinMiniProgramHostNamespace, type DouyinMiniProgramHostSourceContract, ElementIntersectionObserverCallback, type ExtractComputed, type ExtractDefaultPropTypes, type ExtractMethods, type ExtractPropTypes, type ExtractPublicPropTypes, GlobalComponents, GlobalDirectives, type HostMiniProgramAddToFavoritesOption, type HostMiniProgramAppOptions, type HostMiniProgramAppTrivialInstance, type HostMiniProgramBehaviorIdentifier, type HostMiniProgramBoundingClientRectResult, type HostMiniProgramComponentAllFullProperty, type HostMiniProgramComponentAllProperty, type HostMiniProgramComponentBehaviorOptions, type HostMiniProgramComponentEmptyArray, type HostMiniProgramComponentInstance, type HostMiniProgramComponentMethodOption, type HostMiniProgramComponentPropertyOption, type HostMiniProgramComponentPropertyValue, type HostMiniProgramComponentShortProperty, type HostMiniProgramComponentTrivialInstance, type HostMiniProgramComponentTrivialOption, type HostMiniProgramIntersectionObserver, type HostMiniProgramIntersectionObserverOptions, type HostMiniProgramLaunchOptions, type HostMiniProgramMemoryWarningResult, type HostMiniProgramNavigateToOption, type HostMiniProgramNodesRef, type HostMiniProgramNodesRefFields, type HostMiniProgramPageLifetime, type HostMiniProgramPageNotFoundOptions, type HostMiniProgramPageResizeOption, type HostMiniProgramPageScrollOption, type HostMiniProgramPageTrivialInstance, type HostMiniProgramReLaunchOption, type HostMiniProgramRedirectToOption, type HostMiniProgramRouter, type HostMiniProgramSaveExitState, type HostMiniProgramScrollOffsetResult, type HostMiniProgramSelectorQuery, type HostMiniProgramShareAppMessageOption, type HostMiniProgramSwitchTabOption, type HostMiniProgramTabItemTapOption, type HostMiniProgramThemeChangeResult, type HostMiniProgramTriggerEventOptions, type HostMiniProgramUnhandledRejectionResult, type InferNativePropType, type InferNativeProps, type InferPropType, type InferProps, type InternalRuntimeState, type InternalRuntimeStateFields, type LayoutBridgeInstance, type LayoutHostBinding, type MethodDefinitions, type MiniProgramAdapter, type HostMiniProgramAddToFavoritesOption as MiniProgramAddToFavoritesOption, type MiniProgramAppOptions, type MiniProgramBehaviorIdentifier, type HostMiniProgramBoundingClientRectResult as MiniProgramBoundingClientRectResult, type HostMiniProgramComponentAllFullProperty as MiniProgramComponentAllFullProperty, type HostMiniProgramComponentAllProperty as MiniProgramComponentAllProperty, type HostMiniProgramComponentBehaviorOptions as MiniProgramComponentBehaviorOptions, type HostMiniProgramComponentEmptyArray as MiniProgramComponentEmptyArray, type MiniProgramComponentInstance, type HostMiniProgramComponentMethodOption as MiniProgramComponentMethodOption, type MiniProgramComponentOptions, type HostMiniProgramComponentPropertyOption as MiniProgramComponentPropertyOption, type MiniProgramComponentPropertyValue, type MiniProgramComponentRawOptions, type HostMiniProgramComponentShortProperty as MiniProgramComponentShortProperty, type MiniProgramHostNamespace, type MiniProgramHostNamespaceBySource, type MiniProgramHostSourceName, type MiniProgramHostSourceRegistry, type MiniProgramInstance, type HostMiniProgramIntersectionObserver as MiniProgramIntersectionObserver, type HostMiniProgramIntersectionObserverOptions as MiniProgramIntersectionObserverOptions, type HostMiniProgramLaunchOptions as MiniProgramLaunchOptions, type HostMiniProgramMemoryWarningResult as MiniProgramMemoryWarningResult, type HostMiniProgramNavigateToOption as MiniProgramNavigateToOption, type HostMiniProgramNodesRef as MiniProgramNodesRef, type HostMiniProgramNodesRefFields as MiniProgramNodesRefFields, type HostMiniProgramPageLifetime as MiniProgramPageLifetime, type MiniProgramPageLifetimes, type HostMiniProgramPageNotFoundOptions as MiniProgramPageNotFoundOptions, type HostMiniProgramPageResizeOption as MiniProgramPageResizeOption, type HostMiniProgramPageScrollOption as MiniProgramPageScrollOption, type MiniProgramPlatformHostNamespaceBySource, type MiniProgramPlatformHostSourceName, type MiniProgramPlatformHostSourceRegistry, type HostMiniProgramReLaunchOption as MiniProgramReLaunchOption, type HostMiniProgramRedirectToOption as MiniProgramRedirectToOption, type HostMiniProgramRouter as MiniProgramRouter, type MiniProgramRouterNavigateToOption, type MiniProgramRouterReLaunchOption, type MiniProgramRouterRedirectToOption, type MiniProgramRouterSwitchTabOption, type MiniProgramRuntimeHostNamespaceBySource, type MiniProgramRuntimeHostSourceName, type MiniProgramRuntimeHostSourceRegistry, type HostMiniProgramSaveExitState as MiniProgramSaveExitState, type HostMiniProgramScrollOffsetResult as MiniProgramScrollOffsetResult, type HostMiniProgramSelectorQuery as MiniProgramSelectorQuery, type HostMiniProgramShareAppMessageOption as MiniProgramShareAppMessageOption, type HostMiniProgramSwitchTabOption as MiniProgramSwitchTabOption, type HostMiniProgramTabItemTapOption as MiniProgramTabItemTapOption, MiniProgramTemplateRefValue, type HostMiniProgramThemeChangeResult as MiniProgramThemeChangeResult, type HostMiniProgramUnhandledRejectionResult as MiniProgramUnhandledRejectionResult, type ModelBinding, type ModelBindingOptions, type ModelBindingPayload, type ModelModifiers, type NativeComponent, type NativePropType, type NativePropsOptions, type NativeTypeHint, type NativeTypedProperty, NavigationBarMetrics, type ObjectDirective, type PageFeatures, type PageLayoutState, PageStackSnapshot, type PropConstructor, type PropOptions, type PropType, type PublicProps, PullDownRefreshHandler, type RuntimeApp, type RuntimeInstance, type SetDataBindingDiagnostic, type SetDataDebugInfo, type SetDataSnapshotOptions, type SetupContext, type SetupContextIntersectionObserver, type SetupContextIntersectionObserverOptions, type SetupContextNativeInstance, type SetupContextRouter, type SetupContextSelectorQuery, type SetupContextWithTypeProps, type SetupFunction, type SetupFunctionWithTypeProps, type ShallowUnwrapRef, type TemplateRef, TemplateRefValue, TemplateRefs, type HostMiniProgramTriggerEventOptions as TriggerEventOptions, type TtMiniProgramHostNamespace, type TtMiniProgramHostSourceContract, UpdatePerformanceListener, UpdatePerformanceListenerResult, UseAllBoundingClientRectOptions, UseAllScrollOffsetOptions, UseAllSelectorFieldsOptions, UseAsyncPullDownRefreshOptions, UseBoundingClientRectOptions, UseElementIntersectionObserverOptions, UseElementIntersectionObserverReturn, UseIntersectionObserverOptions, UseIntersectionObserverResult, type UseModelOptions, UseNavigationBarMetricsOptions, UsePageScrollThrottleOptions, UsePageScrollThrottleStopHandle, UsePageStackOptions, UseScrollOffsetOptions, UseSelectorFieldsOptions, UseSelectorQueryOptions, UseUpdatePerformanceListenerStopHandle, type VNode, type VNodeProps, type WechatMiniProgramHostNamespace, type WechatMiniProgramHostSourceContract, type WevuComponentConstructor, type WevuDefaults, type WevuDefinedComponent, WevuGlobalComponents, WevuGlobalDirectives, type WevuPageLayoutMap, type WevuPlugin, type WevuTypedRouterRouteMap, callHookList, callHookReturn, callUpdateHooks, createApp, createWevuComponent, createWevuScopedSlotComponent, defineAppSetup, defineComponent, getCurrentInstance, getCurrentPageStackSnapshot, getCurrentSetupContext, getNavigationBarMetrics, hasInjectionContext, inject, injectGlobal, isNoSetData, markNoSetData, mergeModels, mountRuntimeInstance, normalizeClass, normalizeStyle, onActivated, onAddToFavorites, onAttached, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onDetached, onError, onErrorCaptured, onHide, onLaunch, onLoad, onMemoryWarning, onMounted, onMoved, onPageNotFound, onPageScroll, onPullDownRefresh, onReachBottom, onReady, onResize, onRouteDone, onSaveExitState, onServerPrefetch, onShareAppMessage, onShareTimeline, onShow, onTabItemTap, onThemeChange, onUnhandledRejection, onUnload, onUnmounted, onUpdated, provide, provideGlobal, registerApp, registerComponent, registerPageLayoutBridge, registerRuntimeLayoutHosts, resetWevuDefaults, resolveLayoutBridge, resolveLayoutHost, resolvePropValue, resolveRuntimePageLayoutName, runSetupFunction, setCurrentInstance, setCurrentSetupContext, setGlobalProvidedValue, setPageLayout, setRuntimeSetDataVisibility, setWevuDefaults, syncRuntimePageLayoutState, syncRuntimePageLayoutStateFromRuntime, teardownRuntimeInstance, unregisterPageLayoutBridge, unregisterRuntimeLayoutHosts, use, useAsyncPullDownRefresh, useAttrs, useBindModel, useBoundingClientRect, useChangeModel, useCssModule, useDisposables, useElementIntersectionObserver, useIntersectionObserver, useLayoutBridge, useLayoutHosts, useModel, useNativeInstance, useNativePageRouter, useNativeRouter, useNavigationBarMetrics, usePageLayout, usePageScrollThrottle, usePageStack, useScrollOffset, useSelectorFields, useSelectorQuery, useSlots, useTemplateRef, useUpdatePerformanceListener, waitForLayoutHost };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=/&/g,t=/"/g,n=/"/g,r=/'/g,i=/'/g,a=/</g,o=/>/g,s=/^(?:0|[1-9]\d*)$/,c=/[^a-z0-9]+/gi,l=/^-+|-+$/g,u=/-([a-z0-9])/g,d=/[-_]/g;function f(e){if(typeof e==`number`&&Number.isFinite(e))return e;if(typeof e==`string`&&e.trim()){let t=e.trim();return s.test(t)?Number(t):t}}function p(e){return e.trim().replace(c,`-`).replace(l,``).toLowerCase()}function m(e,t){let n=t.replace(d,``).toLowerCase();for(let[t,r]of Object.entries(e))if(t.replace(d,``).toLowerCase()===n)return r}function h(e,t){let n=p(t&&typeof t==`object`&&`type`in t&&typeof t.type==`string`?t.type:``);if(!n)return;let r=n.replace(u,(e,t)=>t.toUpperCase());if(r)return`${e}${r[0].toUpperCase()}${r.slice(1)}`}const g={wvEventDetail:[`wd`,`wvEventDetail`],wvHandler:[`wh`,`wvHandler`],wvInlineId:[`wi`,`wvInlineId`]};function _(s){return s.replace(e,`&`).replace(t,`"`).replace(n,`"`).replace(r,`'`).replace(i,`'`).replace(a,`<`).replace(o,`>`)}function v(e,t,n){var r;let i=(r=g[t])==null?[t]:r;for(let t of i){let r=h(t,n);if(r&&e[r]!==void 0)return e[r];if(r){let t=m(e,r);if(t!==void 0)return t}}for(let t of i){if(e[t]!==void 0)return e[t];let n=m(e,t);if(n!==void 0)return n}}function y(e){return f(e)}export{_ as decodeWxmlEntities,v as resolveDatasetEventValue,y as resolveDatasetIndex};
|
|
@@ -1,10 +1,6 @@
|
|
|
1
|
+
import { WevuJsxVNode } from "../jsxTypes.mjs";
|
|
1
2
|
//#region src/runtime/jsxIsland.d.ts
|
|
2
3
|
export declare const Fragment: unique symbol;
|
|
3
|
-
export interface WevuJsxVNode {
|
|
4
|
-
children?: unknown;
|
|
5
|
-
props?: Record<string, any> | null;
|
|
6
|
-
type: unknown;
|
|
7
|
-
}
|
|
8
4
|
export interface WevuJsxIslandNode {
|
|
9
5
|
children?: WevuJsxIslandNode[];
|
|
10
6
|
events?: Record<string, string>;
|
|
@@ -30,7 +26,7 @@ export declare const vModelRadio = "model-radio";
|
|
|
30
26
|
export declare const vModelSelect = "model-select";
|
|
31
27
|
export declare function withDirectives(vnode: WevuJsxVNode, directives: unknown[]): {
|
|
32
28
|
props: {
|
|
33
|
-
[x: string]:
|
|
29
|
+
[x: string]: unknown;
|
|
34
30
|
};
|
|
35
31
|
children?: unknown;
|
|
36
32
|
type: unknown;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { LayoutHostBinding } from "./capabilities.mjs";
|
|
1
2
|
//#region src/runtime/layoutBridge.d.ts
|
|
2
3
|
type LayoutBridgeContext = Record<string, any>;
|
|
3
4
|
type LayoutBridgeComponentResolver = (selector: string) => any;
|
|
@@ -5,12 +6,6 @@ type LayoutHostMap = Record<string, unknown>;
|
|
|
5
6
|
export type LayoutBridgeInstance<T = LayoutBridgeContext> = T & {
|
|
6
7
|
selectComponent?: LayoutBridgeComponentResolver;
|
|
7
8
|
};
|
|
8
|
-
export interface LayoutHostBinding {
|
|
9
|
-
key: string;
|
|
10
|
-
refName?: string;
|
|
11
|
-
selector: string;
|
|
12
|
-
kind?: 'component';
|
|
13
|
-
}
|
|
14
9
|
interface LayoutHostResolveOptions<T = any> {
|
|
15
10
|
context?: T;
|
|
16
11
|
fallbackContext?: T;
|
|
@@ -46,13 +41,14 @@ export declare function useLayoutBridge(selectors: string | string[], options?:
|
|
|
46
41
|
/**
|
|
47
42
|
* 使用编译期注入的宿主绑定信息,直接从当前 layout 运行时实例解析子组件宿主并注册 bridge。
|
|
48
43
|
*/
|
|
49
|
-
export declare function registerRuntimeLayoutHosts(bindings: LayoutHostBinding[], context?: LayoutBridgeContext): any;
|
|
44
|
+
export declare function registerRuntimeLayoutHosts(bindings: readonly LayoutHostBinding[], context?: LayoutBridgeContext): any;
|
|
50
45
|
/**
|
|
51
46
|
* 移除运行时自动注册的 layout 宿主 bridge。
|
|
52
47
|
*/
|
|
53
|
-
export declare function unregisterRuntimeLayoutHosts(bindings: LayoutHostBinding[], context?: LayoutBridgeContext): boolean;
|
|
48
|
+
export declare function unregisterRuntimeLayoutHosts(bindings: readonly LayoutHostBinding[], context?: LayoutBridgeContext): boolean;
|
|
54
49
|
/**
|
|
55
50
|
* 使用 key -> 宿主实例的映射批量暴露 layout 内部宿主,适合 toast/dialog 等共享反馈节点。
|
|
56
51
|
*/
|
|
57
52
|
export declare function useLayoutHosts(hosts: LayoutHostMap): void;
|
|
58
|
-
//#endregion
|
|
53
|
+
//#endregion
|
|
54
|
+
export type { LayoutHostBinding };
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
//#region src/runtime/pageLayout.d.ts
|
|
2
|
+
type PageLayoutProps = object;
|
|
2
3
|
export interface WevuPageLayoutMap {}
|
|
3
4
|
type ResolveTypedPageLayoutName = keyof WevuPageLayoutMap extends never ? string : Extract<keyof WevuPageLayoutMap, string>;
|
|
4
|
-
type ResolveTypedPageLayoutProps<Name extends string> = Name extends keyof WevuPageLayoutMap ? WevuPageLayoutMap[Name] :
|
|
5
|
+
type ResolveTypedPageLayoutProps<Name extends string> = Name extends keyof WevuPageLayoutMap ? WevuPageLayoutMap[Name] : PageLayoutProps;
|
|
5
6
|
type PageLayoutNamedState = { [Name in ResolveTypedPageLayoutName]: {
|
|
6
7
|
name: Name;
|
|
7
8
|
props: ResolveTypedPageLayoutProps<Name>;
|
|
@@ -17,9 +18,7 @@ export type PageLayoutState = PageLayoutNamedState | {
|
|
|
17
18
|
* 获取当前页面 layout 状态。
|
|
18
19
|
*/
|
|
19
20
|
export declare function usePageLayout(): Readonly<PageLayoutState>;
|
|
20
|
-
export declare function syncRuntimePageLayoutState(target: Record<string, any>, layout: string | false, props:
|
|
21
|
+
export declare function syncRuntimePageLayoutState(target: Record<string, any>, layout: string | false, props: PageLayoutProps): void;
|
|
21
22
|
export declare function syncRuntimePageLayoutStateFromRuntime(target: Record<string, any>): void;
|
|
22
|
-
export declare function setPageLayout(layout: false): void;
|
|
23
|
-
export declare function setPageLayout<Name extends ResolveTypedPageLayoutName>(layout: Name, props?: ResolveTypedPageLayoutProps<Name>): void;
|
|
24
23
|
export declare function resolveRuntimePageLayoutName(layout: string | false): string;
|
|
25
24
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{getMiniProgramPlatformByRuntimeGlobalKey as e,getMiniProgramRuntimeCapabilities as t,getMiniProgramRuntimeGlobalKey as n,getMiniProgramRuntimeGlobalKeys as r,getMiniProgramRuntimeHostConfigKey as i,resolveMiniProgramPlatform as a,supportsMiniProgramRuntimeCapability as o}from"@weapp-core/shared/platforms";const s=[`switchTab`,`reLaunch`,`redirectTo`,`navigateTo`,`navigateBack`];function c(){if(!(typeof globalThis>`u`))return globalThis}function l(){if(typeof my<`u`)return my}function u(){var t;let n=c(),i=(t=import.meta.env)==null?void 0:t.PLATFORM,o=a(i);if(o)return o;for(let t of r())if(n!=null&&n[t])return e(t)}function d(){return t(u())}function f(e){return o(u(),e)}function p(){var e,t,r,i;if(!f(`globalPageStack`))return[];let a=c(),o=u(),s=o?n(o):void 0,d=(e=(t=s?a==null||(r=a[s])==null?void 0:r.getCurrentPages:void 0)==null?(i=l())==null?void 0:i.getCurrentPages:t)==null?a==null?void 0:a.getCurrentPages:e;if(typeof d!=`function`)return[];try{let e=d();return Array.isArray(e)?e:[]}catch(e){return[]}}function m(){let e=c(),t=i(u()),n=e==null?void 0:e[t];return n&&typeof n==`object`?n:void 0}function h(e){var t;let i=c(),o=e==null?(t=import.meta.env)==null?void 0:t.PLATFORM:e,s=a(o);if(s){var u;let e=n(s);return(u=i==null?void 0:i[e])==null?s===`alipay`?l():void 0:u}for(let e of r()){let t=i==null?void 0:i[e];if(t)return t}}function g(){var e;return(e=h())==null?c():e}function _(){var e;return(e=g())==null||(e=e.console)==null?void 0:e.warn}function v(){if(!f(`globalRouterApi`))return;let e=h();if(!e)return;let t=Object.create(null);for(let n of s){let r=e[n];if(typeof r!=`function`)return;t[n]=(...t)=>r.apply(e,t)}return t}function y(){var e;return(e=h())==null?c():e}export{v as getCurrentMiniProgramGlobalRouter,m as getCurrentMiniProgramHostConfig,p as getCurrentMiniProgramPages,d as getCurrentMiniProgramRuntimeCapabilities,h as getMiniProgramGlobalObject,_ as getMiniProgramRuntimeConsoleWarn,g as getMiniProgramRuntimeGlobalObject,
|
|
1
|
+
import{getMiniProgramPlatformByRuntimeGlobalKey as e,getMiniProgramRuntimeCapabilities as t,getMiniProgramRuntimeGlobalKey as n,getMiniProgramRuntimeGlobalKeys as r,getMiniProgramRuntimeHostConfigKey as i,resolveMiniProgramPlatform as a,supportsMiniProgramRuntimeCapability as o}from"@weapp-core/shared/platforms";const s=[`switchTab`,`reLaunch`,`redirectTo`,`navigateTo`,`navigateBack`];function c(){if(!(typeof globalThis>`u`))return globalThis}function l(){if(typeof my<`u`)return my}function u(){var t;let n=c(),i=(t=import.meta.env)==null?void 0:t.PLATFORM,o=a(i);if(o)return o;for(let t of r())if(n!=null&&n[t])return e(t)}function d(){return t(u())}function f(e){return o(u(),e)}function p(){var e,t,r,i;if(!f(`globalPageStack`))return[];let a=c(),o=u(),s=o?n(o):void 0,d=(e=(t=s?a==null||(r=a[s])==null?void 0:r.getCurrentPages:void 0)==null?(i=l())==null?void 0:i.getCurrentPages:t)==null?a==null?void 0:a.getCurrentPages:e;if(typeof d!=`function`)return[];try{let e=d();return Array.isArray(e)?e:[]}catch(e){return[]}}function m(){let e=c(),t=i(u()),n=e==null?void 0:e[t];return n&&typeof n==`object`?n:void 0}function h(e){var t;let i=c(),o=e==null?(t=import.meta.env)==null?void 0:t.PLATFORM:e,s=a(o);if(s){var u;let e=n(s);return(u=i==null?void 0:i[e])==null?s===`alipay`?l():void 0:u}for(let e of r()){let t=i==null?void 0:i[e];if(t)return t}}function g(){var e;return(e=h())==null?c():e}function _(){var e;return(e=g())==null||(e=e.console)==null?void 0:e.warn}function v(){if(!f(`globalRouterApi`))return;let e=h();if(!e)return;let t=Object.create(null);for(let n of s){let r=e[n];if(typeof r!=`function`)return;t[n]=(...t)=>r.apply(e,t)}return t}function y(){let e=m(),t=e==null?void 0:e.tabBar;if(!t||typeof t!=`object`||!(`list`in t)||!Array.isArray(t.list))return[];let n=[];for(let e of t.list){if(!e||typeof e!=`object`||!(`pagePath`in e))continue;let t=e.pagePath;typeof t==`string`&&t&&n.push(t)}return n}function b(){var e;return(e=h())==null?c():e}export{v as getCurrentMiniProgramGlobalRouter,m as getCurrentMiniProgramHostConfig,p as getCurrentMiniProgramPages,d as getCurrentMiniProgramRuntimeCapabilities,y as getCurrentMiniProgramTabBarPagePaths,h as getMiniProgramGlobalObject,_ as getMiniProgramRuntimeConsoleWarn,g as getMiniProgramRuntimeGlobalObject,b as getScopedSlotHostGlobalObject,u as resolveCurrentMiniProgramPlatform,f as supportsCurrentMiniProgramRuntimeCapability};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { setWevuDefaults as setWevuDefaults$1 } from "./defaults.mjs";
|
|
2
|
+
import { createWevuComponent as createWevuComponent$1, defineComponent as defineComponent$1 } from "./define.mjs";
|
|
3
|
+
import { CreateWevuScopedSlotComponentOptions } from "./features/scopedSlots.mjs";
|
|
4
|
+
import { createApp as createApp$1 } from "./app.mjs";
|
|
5
|
+
import { registerApp as registerApp$1 } from "./register/app.mjs";
|
|
6
|
+
import { registerComponent as registerComponent$1 } from "./register/component.mjs";
|
|
7
|
+
import { mountRuntimeInstance as mountRuntimeInstance$1 } from "./register/runtimeInstance.mjs";
|
|
8
|
+
import "./register.mjs";
|
|
9
|
+
//#region src/runtime/publicRuntime.d.ts
|
|
10
|
+
export declare const createApp: typeof createApp$1;
|
|
11
|
+
export declare const defineComponent: typeof defineComponent$1;
|
|
12
|
+
export declare const createWevuComponent: typeof createWevuComponent$1;
|
|
13
|
+
export declare const registerApp: typeof registerApp$1;
|
|
14
|
+
export declare const registerComponent: typeof registerComponent$1;
|
|
15
|
+
export declare const mountRuntimeInstance: typeof mountRuntimeInstance$1;
|
|
16
|
+
export declare const setWevuDefaults: typeof setWevuDefaults$1;
|
|
17
|
+
/**
|
|
18
|
+
* 创建公开入口的作用域插槽组件,并保留历史上的完整能力行为。
|
|
19
|
+
*/
|
|
20
|
+
export declare function createWevuScopedSlotComponent(overrides?: CreateWevuScopedSlotComponentOptions): void;
|
|
21
|
+
//#endregion
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{setWevuDefaults as e}from"./defaults.mjs";import{installTemplateRefs as t}from"./features/templateRefs.mjs";import{installLayout as n}from"./features/layout.mjs";import{mountRuntimeInstance as r}from"./register/runtimeInstance.mjs";import{registerApp as i}from"./register/app.mjs";import{registerComponent as a}from"./register/component.mjs";import{createApp as o}from"./app.mjs";import{createWevuComponent as s,defineComponent as c}from"./define.mjs";import{installInlineEvents as l}from"./features/inlineEvents.mjs";import{installPatchStrategy as u}from"./features/patchStrategy.mjs";import{createWevuScopedSlotComponent as d,installScopedSlots as f}from"./features/scopedSlots.mjs";import{installSetDataHighFrequencyWarning as p}from"./features/setDataHighFrequencyWarning.mjs";import{WEVU_INLINE_MAP_KEY as m,WEVU_SCOPED_SLOT_OWNER_REQUIRED_KEY as h,WEVU_SLOT_OWNER_ID_KEY as g}from"@weapp-core/constants";function _(){u(),p()}function v(e){if(!e||typeof e!=`object`)return;let r=e,i=r[m],a=r.methods,o=a&&typeof a==`object`?a[m]:void 0;(i&&typeof i==`object`&&Object.keys(i).length||o&&typeof o==`object`&&Object.keys(o).length)&&l();let s=r.__wevuTemplateRefs;Array.isArray(s)&&s.length&&t();let c=r.__wevuLayoutHosts;Array.isArray(c)&&c.length&&n();let u=r.setData,d=u&&typeof u==`object`?u.pick:void 0;(r[h]===!0||r.__wevuHasTemplateRuntimeBindings===!0||Array.isArray(d)&&d.includes(g))&&f()}function y(e){_(),l(),f(),v(e)}const b=e=>(y(e),o(e)),x=(e=>(y(e),c(e))),S=e=>(y(e),s(e)),C=(e,t,n,r,a)=>(_(),v(e),v(t),v(a),i(e,t,n,r,a)),w=(e,t,n,r,i,o)=>(_(),v(e),v(t),v(i),a(e,t,n,r,i,o)),T=(e,t,n,i,a)=>(_(),v(e),v(t),r(e,t,n,i,a)),E=t=>(u(),p(),e(t));function D(e){t(),l(),f(),n(),d(e)}export{b as createApp,S as createWevuComponent,D as createWevuScopedSlotComponent,x as defineComponent,T as mountRuntimeInstance,C as registerApp,w as registerComponent,E as setWevuDefaults};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{getMiniProgramGlobalObject as e,supportsCurrentMiniProgramRuntimeCapability as t}from"../platform.mjs";import{callHookList as n}from"../hooks/base.mjs";import{
|
|
1
|
+
import{getMiniProgramGlobalObject as e,supportsCurrentMiniProgramRuntimeCapability as t}from"../platform.mjs";import{callHookList as n}from"../hooks/base.mjs";import{requireRuntimeCapability as r}from"../capabilities.mjs";import{mountRuntimeInstance as i}from"./runtimeInstance.mjs";import{WEVU_HOOKS_KEY as a,WEVU_INLINE_HANDLER as o,WEVU_INLINE_MAP_KEY as s,WEVU_IS_APP_INSTANCE_KEY as c}from"@weapp-core/constants";const l=`__wevuAppGlobalListeners`,u=`__wevuOnMemoryWarningListener`;function d(r){let i=r[a],o=!!(i!=null&&i.onMemoryWarning);if(!t(`appMemoryWarningListener`)){delete r[u];return}let s=e(),c=s==null?void 0:s.onMemoryWarning,l=s==null?void 0:s.offMemoryWarning;if(typeof c!=`function`)return;let d=r[u];if(typeof d==`function`&&typeof l==`function`)try{l(d)}catch(e){}if(!o){delete r[u];return}let f=e=>{n(r,`onMemoryWarning`,[e])};r[u]=f,c(f)}function f(r,i){var o,s;let{hookName:c,onApiName:u,offApiName:d,capabilityName:f,userHandler:p}=i,m=r[a],h=!!(m!=null&&m[c]),g=(s=(o=r)[l])==null?o[l]=Object.create(null):s,_=g[c];if(!t(f)){delete g[c],delete r[c];return}let v=e(),y=v==null?void 0:v[u],b=v==null?void 0:v[d];if(typeof _==`function`&&typeof b==`function`)try{b(_)}catch(e){}if(!h&&typeof p!=`function`){delete g[c];return}let x=(...e)=>{n(r,c,e),typeof p==`function`&&p.apply(r,e)};r[c]=x,g[c]=x,typeof y==`function`&&y(x)}function p(e,t){f(e,{hookName:`onError`,onApiName:`onError`,offApiName:`offError`,capabilityName:`appErrorListener`,userHandler:t.onError}),f(e,{hookName:`onPageNotFound`,onApiName:`onPageNotFound`,offApiName:`offPageNotFound`,capabilityName:`appPageNotFoundListener`,userHandler:t.onPageNotFound}),f(e,{hookName:`onUnhandledRejection`,onApiName:`onUnhandledRejection`,offApiName:`offUnhandledRejection`,capabilityName:`appUnhandledRejectionListener`,userHandler:t.onUnhandledRejection}),f(e,{hookName:`onThemeChange`,onApiName:`onThemeChange`,offApiName:`offThemeChange`,capabilityName:`appThemeChangeListener`,userHandler:t.onThemeChange})}function m(e,t,a,l,u){var f;if(typeof App!=`function`)throw TypeError(`createApp 需要全局 App 构造器可用`);let m=Object.keys(t==null?{}:t),h={...u};h.globalData=(f=h.globalData)==null?{}:f;let g=t==null?{}:t,_=g[s],v=Object.prototype.hasOwnProperty.call(g,s)&&_&&typeof _==`object`&&Object.keys(_).length>0;!h[o]&&v&&(h[o]=r(`inlineEvents`,`registerApp(inline event metadata)`).handler);let y=h.onLaunch,b=h.onError,x=h.onPageNotFound,S=h.onUnhandledRejection,C=h.onThemeChange;h.onLaunch=function(...t){this[c]=!0,i(this,e,a,l),d(this),p(this,{onError:b,onPageNotFound:x,onUnhandledRejection:S,onThemeChange:C}),n(this,`onLaunch`,t),typeof y==`function`&&y.apply(this,t)};let w=h.onShow;h.onShow=function(...e){n(this,`onShow`,e),typeof w==`function`&&w.apply(this,e)};let T=h.onHide;h.onHide=function(...e){n(this,`onHide`,e),typeof T==`function`&&T.apply(this,e)},delete h.onError,delete h.onPageNotFound,delete h.onUnhandledRejection,delete h.onThemeChange;for(let e of m){let t=h[e];h[e]=function(...n){var r;let i=this.__wevu,a,o=i==null||(r=i.methods)==null?void 0:r[e];return o&&(a=o.apply(i.proxy,n)),typeof t==`function`?t.apply(this,n):a}}App(h)}export{m as registerApp};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{callHookList as e}from"../../hooks/base.mjs";import{bindCurrentPageInstance as
|
|
1
|
+
import{callHookList as e}from"../../hooks/base.mjs";import{runtimeCapabilityRegistry as t}from"../../capabilities.mjs";import{bindCurrentPageInstance as n,ensureMiniProgramGlobalPatched as r,ensurePageShareMenus as i,releaseCurrentPageInstance as a,resolvePageOptions as o}from"./lifecycle/platform.mjs";import{runTeardownSteps as s}from"../../teardown.mjs";import{enableDeferredSetData as c,mountRuntimeInstance as l,setRuntimeSetDataVisibility as u,teardownRuntimeInstance as d}from"../runtimeInstance.mjs";import{cancelInitialNavigation as f,ensureInitialNavigation as p}from"../../../router/initialNavigation.mjs";import{notifyRouteStateSync as m}from"../../../router/routeSync.mjs";import{attachOptionalPageLifecycleHooks as h}from"./lifecycle/optionalHooks.mjs";import{WEVU_ON_LOAD_CALLED_KEY as g,WEVU_READY_CALLED_KEY as _,WEVU_ROUTE_DONE_CALLED_KEY as v}from"@weapp-core/constants";function y(y){let{runtimeApp:b,watch:x,setup:S,userOnLoad:C,userOnUnload:w,userOnShow:T,userOnHide:E,userOnReady:D,isPage:O,enableOnSaveExitState:k,enableOnPullDownRefresh:A,enableOnReachBottom:j,enableOnPageScroll:M,enableOnRouteDone:N,enableOnRouteDoneFallback:P,enableOnTabItemTap:F,enableOnResize:I,enableOnShareAppMessage:L,enableOnShareTimeline:R,enableOnAddToFavorites:z,syncWevuPropsFromValues:B,effectiveOnSaveExitState:V,effectiveOnPullDownRefresh:H,effectiveOnReachBottom:U,effectiveOnPageScroll:W,effectiveOnRouteDone:G,effectiveOnTabItemTap:K,effectiveOnResize:q,effectiveOnShareAppMessage:J,effectiveOnShareTimeline:Y,effectiveOnAddToFavorites:X,hasHook:Z}=y,Q=e=>{var t,n;(t=e.__wevu)==null||(n=t.__wevu_flushSetupSnapshotSync)==null||n.call(t)},$={onLoad(...t){if(this[g])return;this[g]=!0;let n=()=>{l(this,b,x,S);let n=t[0]&&typeof t[0]==`object`?t[0]:o(this);if(B==null||B(this,n),Q(this),c(this),O&&i({enableOnShareAppMessage:L,enableOnShareTimeline:R}),e(this,`onLoad`,t),typeof C==`function`)return C.apply(this,t.length?t:[n])};return(O?p(this,t[0],{onComplete:e=>{e&&n()}}):void 0)||n()},onUnload(...e){let t;return s([()=>f(this),()=>{O&&a(this)},()=>d(this),()=>{typeof w==`function`&&(t=w.apply(this,e))}]),t},onShow(...t){if(O&&(r(),n(this),this[g]||$.onLoad.call(this,o(this)),B==null||B(this,o(this)),Q(this),i({enableOnShareAppMessage:L,enableOnShareTimeline:R}),this[v]=!1),u(this,!0),O&&m({page:this,source:`page`}),e(this,`onShow`,t),typeof T==`function`)return T.apply(this,t)},onHide(...t){if(O&&a(this),u(this,!1),e(this,`onHide`,t),typeof E==`function`)return E.apply(this,t)},onReady(...n){if(O&&(this[g]||$.onLoad.call(this,o(this)),B==null||B(this,o(this)),Q(this),i({enableOnShareAppMessage:L,enableOnShareTimeline:R})),!this[_]){if(this[_]=!0,O&&N&&P){let e=this;setTimeout(()=>{if(!e[v]){var t;(t=$.onRouteDone)==null||t.call(e)}},0)}let r=()=>{e(this,`onReady`,n),typeof D==`function`&&D.apply(this,n)},i=()=>{if(Array.isArray(this.__wevuTemplateRefs)&&this.__wevuTemplateRefs.length>0){var e;(e=t.templateRefs)==null||e.schedule(this,r);return}r()};O&&p(this,void 0,{start:!1,onComplete:e=>{e&&i()}})||i();return}if(typeof D==`function`)return D.apply(this,n)}};return h($,{enableOnSaveExitState:k,enableOnPullDownRefresh:A,enableOnReachBottom:j,enableOnPageScroll:M,enableOnRouteDone:N,enableOnTabItemTap:F,enableOnResize:I,enableOnShareAppMessage:L,enableOnShareTimeline:R,enableOnAddToFavorites:z,effectiveOnSaveExitState:V,effectiveOnPullDownRefresh:H,effectiveOnReachBottom:U,effectiveOnPageScroll:W,effectiveOnRouteDone:G,effectiveOnTabItemTap:K,effectiveOnResize:q,effectiveOnShareAppMessage:J,effectiveOnShareTimeline:Y,effectiveOnAddToFavorites:X,hasHook:Z}),$}export{y as createPageLifecycleHooks};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{requireRuntimeCapability as e,runtimeCapabilityRegistry as t}from"../../capabilities.mjs";import{parseModelEventValue as n}from"../../internal.mjs";import{runJsxIslandHandler as r}from"../../jsxIsland.mjs";import{WEVU_INLINE_HANDLER as i,WEVU_INLINE_MAP_KEY as a,WEVU_JSX_ISLAND_HANDLER as o,WEVU_MODEL_HANDLER as s,WEVU_NATIVE_INSTANCE_KEY as c,WEVU_OWNER_HANDLER as l,WEVU_RESERVED_METHOD_PREFIX as u,WEVU_RUNTIME_KEY as d}from"@weapp-core/constants";function f(f){let{userMethods:p,runtimeMethods:m}=f,h={...p},g=m==null?{}:m,_=g[a],v=Object.prototype.hasOwnProperty.call(g,a)&&_&&typeof _==`object`&&Object.keys(_).length>0?e(`inlineEvents`,`createComponentMethods(inline event metadata)`):t.inlineEvents;!h[i]&&v&&(h[i]=v.handler),h[s]||(h[s]=function(e){var t,r,i;let a=(t=e==null||(r=e.currentTarget)==null||(r=r.dataset)==null?void 0:r.wvModel)==null?e==null||(i=e.target)==null||(i=i.dataset)==null?void 0:i.wvModel:t;if(typeof a!=`string`||!a)return;let o=this.__wevu;if(!o||typeof o.bindModel!=`function`)return;let s=n(e);try{o.bindModel(a).update(s)}catch(e){}}),h[o]||(h[o]=function(e){return r(this,e)}),!h[l]&&typeof(m==null?void 0:m[l])==`function`&&(h[l]=m[l]);let y=Object.keys(m==null?{}:m);function b(e){let t=e.__wevu;if(t)return t;let n=e.$state;if(n&&typeof n==`object`)return n[d]}function x(e,t){if((e==null?void 0:e.proxy)===t)return;let n=e==null?void 0:e.proxy,r=e=>{let r=t[e];if(typeof r!=`function`)return!1;let i=n==null?void 0:n[e];return typeof i==`function`&&r===i};if(r(`triggerEvent`)||r(`createSelectorQuery`)||r(`createIntersectionObserver`)||r(`setData`)||typeof t.triggerEvent!=`function`&&typeof t.createSelectorQuery!=`function`&&typeof t.createIntersectionObserver!=`function`&&typeof t.setData!=`function`)return;let i=e==null?void 0:e.state;if(i&&typeof i==`object`&&t.$state!==i)try{Object.defineProperty(i,c,{value:t,configurable:!0,enumerable:!1,writable:!0})}catch(e){i[c]=t}}for(let e of y){if(e===a||e.startsWith(u))continue;let t=h[e];h[e]=function(...n){var r;let i=b(this);x(i,this);let a,o=i==null||(r=i.methods)==null?void 0:r[e];if(o&&(a=o.apply(i.proxy,n)),typeof t==`function`){let e=t.apply(this,n);return e===void 0?a:e}return a}}return{finalMethods:h}}export{f as createComponentMethods};
|