wevu 7.0.3 → 7.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +20 -4
- package/dist/alipay/jsx-runtime.d.mts +13 -0
- package/dist/alipay/jsx-runtime.mjs +1 -0
- package/dist/alipayIntrinsicElements/base.d.mts +4 -0
- package/dist/alipayIntrinsicElements/elements/button.d.mts +29 -0
- package/dist/alipayIntrinsicElements/elements/camera.d.mts +18 -0
- package/dist/alipayIntrinsicElements/elements/canvas.d.mts +20 -0
- package/dist/alipayIntrinsicElements/elements/checkbox-group.d.mts +11 -0
- package/dist/alipayIntrinsicElements/elements/checkbox.d.mts +14 -0
- package/dist/alipayIntrinsicElements/elements/contact-button.d.mts +15 -0
- package/dist/alipayIntrinsicElements/elements/cover-image.d.mts +11 -0
- package/dist/alipayIntrinsicElements/elements/cover-view.d.mts +11 -0
- package/dist/alipayIntrinsicElements/elements/error-view.d.mts +14 -0
- package/dist/alipayIntrinsicElements/elements/form.d.mts +12 -0
- package/dist/alipayIntrinsicElements/elements/icon.d.mts +11 -0
- package/dist/alipayIntrinsicElements/elements/image.d.mts +17 -0
- package/dist/alipayIntrinsicElements/elements/input.d.mts +31 -0
- package/dist/alipayIntrinsicElements/elements/join-group-chat.d.mts +9 -0
- package/dist/alipayIntrinsicElements/elements/label.d.mts +9 -0
- package/dist/alipayIntrinsicElements/elements/lifestyle.d.mts +11 -0
- package/dist/alipayIntrinsicElements/elements/lottie.d.mts +25 -0
- package/dist/alipayIntrinsicElements/elements/map.d.mts +44 -0
- package/dist/alipayIntrinsicElements/elements/match-media.d.mts +15 -0
- package/dist/alipayIntrinsicElements/elements/movable-area.d.mts +9 -0
- package/dist/alipayIntrinsicElements/elements/movable-view.d.mts +32 -0
- package/dist/alipayIntrinsicElements/elements/navigator.d.mts +13 -0
- package/dist/alipayIntrinsicElements/elements/page-container.d.mts +27 -0
- package/dist/alipayIntrinsicElements/elements/page-meta.d.mts +19 -0
- package/dist/alipayIntrinsicElements/elements/picker-view-column.d.mts +7 -0
- package/dist/alipayIntrinsicElements/elements/picker-view.d.mts +18 -0
- package/dist/alipayIntrinsicElements/elements/picker.d.mts +15 -0
- package/dist/alipayIntrinsicElements/elements/progress.d.mts +14 -0
- package/dist/alipayIntrinsicElements/elements/radio-group.d.mts +11 -0
- package/dist/alipayIntrinsicElements/elements/radio.d.mts +12 -0
- package/dist/alipayIntrinsicElements/elements/rich-text.d.mts +17 -0
- package/dist/alipayIntrinsicElements/elements/root-portal.d.mts +9 -0
- package/dist/alipayIntrinsicElements/elements/scroll-view.d.mts +29 -0
- package/dist/alipayIntrinsicElements/elements/share-element.d.mts +12 -0
- package/dist/alipayIntrinsicElements/elements/slider.d.mts +23 -0
- package/dist/alipayIntrinsicElements/elements/subscribe-message.d.mts +11 -0
- package/dist/alipayIntrinsicElements/elements/swiper-item.d.mts +7 -0
- package/dist/alipayIntrinsicElements/elements/swiper.d.mts +36 -0
- package/dist/alipayIntrinsicElements/elements/switch.d.mts +15 -0
- package/dist/alipayIntrinsicElements/elements/text.d.mts +12 -0
- package/dist/alipayIntrinsicElements/elements/textarea.d.mts +24 -0
- package/dist/alipayIntrinsicElements/elements/video.d.mts +39 -0
- package/dist/alipayIntrinsicElements/elements/view.d.mts +29 -0
- package/dist/alipayIntrinsicElements/elements/web-view.d.mts +13 -0
- package/dist/alipayIntrinsicElements.d.mts +94 -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/alipayIntrinsicElements/base.d.mts +5 -0
- package/dist/dev/alipayIntrinsicElements/elements/button.d.mts +30 -0
- package/dist/dev/alipayIntrinsicElements/elements/camera.d.mts +19 -0
- package/dist/dev/alipayIntrinsicElements/elements/canvas.d.mts +21 -0
- package/dist/dev/alipayIntrinsicElements/elements/checkbox-group.d.mts +12 -0
- package/dist/dev/alipayIntrinsicElements/elements/checkbox.d.mts +15 -0
- package/dist/dev/alipayIntrinsicElements/elements/contact-button.d.mts +16 -0
- package/dist/dev/alipayIntrinsicElements/elements/cover-image.d.mts +12 -0
- package/dist/dev/alipayIntrinsicElements/elements/cover-view.d.mts +12 -0
- package/dist/dev/alipayIntrinsicElements/elements/error-view.d.mts +15 -0
- package/dist/dev/alipayIntrinsicElements/elements/form.d.mts +13 -0
- package/dist/dev/alipayIntrinsicElements/elements/icon.d.mts +12 -0
- package/dist/dev/alipayIntrinsicElements/elements/image.d.mts +18 -0
- package/dist/dev/alipayIntrinsicElements/elements/input.d.mts +32 -0
- package/dist/dev/alipayIntrinsicElements/elements/join-group-chat.d.mts +10 -0
- package/dist/dev/alipayIntrinsicElements/elements/label.d.mts +10 -0
- package/dist/dev/alipayIntrinsicElements/elements/lifestyle.d.mts +12 -0
- package/dist/dev/alipayIntrinsicElements/elements/lottie.d.mts +26 -0
- package/dist/dev/alipayIntrinsicElements/elements/map.d.mts +45 -0
- package/dist/dev/alipayIntrinsicElements/elements/match-media.d.mts +16 -0
- package/dist/dev/alipayIntrinsicElements/elements/movable-area.d.mts +10 -0
- package/dist/dev/alipayIntrinsicElements/elements/movable-view.d.mts +33 -0
- package/dist/dev/alipayIntrinsicElements/elements/navigator.d.mts +14 -0
- package/dist/dev/alipayIntrinsicElements/elements/page-container.d.mts +28 -0
- package/dist/dev/alipayIntrinsicElements/elements/page-meta.d.mts +20 -0
- package/dist/dev/alipayIntrinsicElements/elements/picker-view-column.d.mts +8 -0
- package/dist/dev/alipayIntrinsicElements/elements/picker-view.d.mts +19 -0
- package/dist/dev/alipayIntrinsicElements/elements/picker.d.mts +16 -0
- package/dist/dev/alipayIntrinsicElements/elements/progress.d.mts +15 -0
- package/dist/dev/alipayIntrinsicElements/elements/radio-group.d.mts +12 -0
- package/dist/dev/alipayIntrinsicElements/elements/radio.d.mts +13 -0
- package/dist/dev/alipayIntrinsicElements/elements/rich-text.d.mts +18 -0
- package/dist/dev/alipayIntrinsicElements/elements/root-portal.d.mts +10 -0
- package/dist/dev/alipayIntrinsicElements/elements/scroll-view.d.mts +30 -0
- package/dist/dev/alipayIntrinsicElements/elements/share-element.d.mts +13 -0
- package/dist/dev/alipayIntrinsicElements/elements/slider.d.mts +24 -0
- package/dist/dev/alipayIntrinsicElements/elements/subscribe-message.d.mts +12 -0
- package/dist/dev/alipayIntrinsicElements/elements/swiper-item.d.mts +8 -0
- package/dist/dev/alipayIntrinsicElements/elements/swiper.d.mts +37 -0
- package/dist/dev/alipayIntrinsicElements/elements/switch.d.mts +16 -0
- package/dist/dev/alipayIntrinsicElements/elements/text.d.mts +13 -0
- package/dist/dev/alipayIntrinsicElements/elements/textarea.d.mts +25 -0
- package/dist/dev/alipayIntrinsicElements/elements/video.d.mts +40 -0
- package/dist/dev/alipayIntrinsicElements/elements/view.d.mts +30 -0
- package/dist/dev/alipayIntrinsicElements/elements/web-view.d.mts +14 -0
- package/dist/dev/alipayIntrinsicElements.d.mts +94 -0
- 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/jsx-runtime.d.mts +44 -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/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/routeSync.mjs +8 -2
- package/dist/dev/router/routeSync.mjs.map +1 -1
- package/dist/dev/router/types.d.mts +172 -0
- package/dist/dev/router/useRoute.d.mts +19 -0
- package/dist/dev/router/useRoute.mjs +14 -7
- 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/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 +16 -2
- package/dist/dev/runtime/register/runtimeInstance/setupContext.mjs.map +1 -1
- package/dist/dev/runtime/register/runtimeInstance/setupPhase.mjs +0 -4
- 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 +28 -0
- 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/ttIntrinsicElements/base.d.mts +5 -0
- package/dist/dev/ttIntrinsicElements/elements/ad.d.mts +8 -0
- package/dist/dev/ttIntrinsicElements/elements/aweme-data.d.mts +15 -0
- package/dist/dev/ttIntrinsicElements/elements/aweme-user-card.d.mts +16 -0
- package/dist/dev/ttIntrinsicElements/elements/button.d.mts +23 -0
- package/dist/dev/ttIntrinsicElements/elements/camera.d.mts +19 -0
- package/dist/dev/ttIntrinsicElements/elements/canvas.d.mts +16 -0
- package/dist/dev/ttIntrinsicElements/elements/checkbox-group.d.mts +12 -0
- package/dist/dev/ttIntrinsicElements/elements/checkbox.d.mts +12 -0
- package/dist/dev/ttIntrinsicElements/elements/draw-ad.d.mts +16 -0
- package/dist/dev/ttIntrinsicElements/elements/form.d.mts +14 -0
- package/dist/dev/ttIntrinsicElements/elements/icon.d.mts +11 -0
- package/dist/dev/ttIntrinsicElements/elements/image.d.mts +16 -0
- package/dist/dev/ttIntrinsicElements/elements/input.d.mts +32 -0
- package/dist/dev/ttIntrinsicElements/elements/label.d.mts +10 -0
- package/dist/dev/ttIntrinsicElements/elements/live-player.d.mts +19 -0
- package/dist/dev/ttIntrinsicElements/elements/live-preview.d.mts +13 -0
- package/dist/dev/ttIntrinsicElements/elements/map.d.mts +36 -0
- package/dist/dev/ttIntrinsicElements/elements/mask.d.mts +8 -0
- package/dist/dev/ttIntrinsicElements/elements/match-media.d.mts +16 -0
- package/dist/dev/ttIntrinsicElements/elements/movable-area.d.mts +10 -0
- package/dist/dev/ttIntrinsicElements/elements/movable-view.d.mts +27 -0
- package/dist/dev/ttIntrinsicElements/elements/navigator.d.mts +16 -0
- package/dist/dev/ttIntrinsicElements/elements/open-data.d.mts +15 -0
- package/dist/dev/ttIntrinsicElements/elements/picker-view-column.d.mts +8 -0
- package/dist/dev/ttIntrinsicElements/elements/picker-view.d.mts +19 -0
- package/dist/dev/ttIntrinsicElements/elements/picker.d.mts +22 -0
- package/dist/dev/ttIntrinsicElements/elements/progress.d.mts +16 -0
- package/dist/dev/ttIntrinsicElements/elements/radio-group.d.mts +12 -0
- package/dist/dev/ttIntrinsicElements/elements/radio.d.mts +12 -0
- package/dist/dev/ttIntrinsicElements/elements/rich-text.d.mts +10 -0
- package/dist/dev/ttIntrinsicElements/elements/rtc-room.d.mts +13 -0
- package/dist/dev/ttIntrinsicElements/elements/scroll-view.d.mts +32 -0
- package/dist/dev/ttIntrinsicElements/elements/slider.d.mts +19 -0
- package/dist/dev/ttIntrinsicElements/elements/swiper-item.d.mts +10 -0
- package/dist/dev/ttIntrinsicElements/elements/swiper.d.mts +27 -0
- package/dist/dev/ttIntrinsicElements/elements/switch.d.mts +14 -0
- package/dist/dev/ttIntrinsicElements/elements/text.d.mts +12 -0
- package/dist/dev/ttIntrinsicElements/elements/textarea.d.mts +34 -0
- package/dist/dev/ttIntrinsicElements/elements/video.d.mts +58 -0
- package/dist/dev/ttIntrinsicElements/elements/view.d.mts +15 -0
- package/dist/dev/ttIntrinsicElements/elements/web-view.d.mts +15 -0
- package/dist/dev/ttIntrinsicElements.d.mts +88 -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/weappIntrinsicElements/base.d.mts +5 -0
- package/dist/dev/weappIntrinsicElements/elements/ad-custom.d.mts +14 -0
- package/dist/dev/weappIntrinsicElements/elements/ad.d.mts +17 -0
- package/dist/dev/weappIntrinsicElements/elements/audio.d.mts +21 -0
- package/dist/dev/weappIntrinsicElements/elements/block.d.mts +8 -0
- package/dist/dev/weappIntrinsicElements/elements/button.d.mts +42 -0
- package/dist/dev/weappIntrinsicElements/elements/camera.d.mts +19 -0
- package/dist/dev/weappIntrinsicElements/elements/canvas.d.mts +19 -0
- package/dist/dev/weappIntrinsicElements/elements/checkbox-group.d.mts +11 -0
- package/dist/dev/weappIntrinsicElements/elements/checkbox.d.mts +13 -0
- package/dist/dev/weappIntrinsicElements/elements/cover-image.d.mts +14 -0
- package/dist/dev/weappIntrinsicElements/elements/cover-view.d.mts +10 -0
- package/dist/dev/weappIntrinsicElements/elements/editor.d.mts +23 -0
- package/dist/dev/weappIntrinsicElements/elements/form.d.mts +17 -0
- package/dist/dev/weappIntrinsicElements/elements/functional-page-navigator.d.mts +16 -0
- package/dist/dev/weappIntrinsicElements/elements/icon.d.mts +12 -0
- package/dist/dev/weappIntrinsicElements/elements/image.d.mts +19 -0
- package/dist/dev/weappIntrinsicElements/elements/import.d.mts +10 -0
- package/dist/dev/weappIntrinsicElements/elements/include.d.mts +10 -0
- package/dist/dev/weappIntrinsicElements/elements/input.d.mts +47 -0
- package/dist/dev/weappIntrinsicElements/elements/keyboard-accessory.d.mts +8 -0
- package/dist/dev/weappIntrinsicElements/elements/label.d.mts +10 -0
- package/dist/dev/weappIntrinsicElements/elements/live-player.d.mts +36 -0
- package/dist/dev/weappIntrinsicElements/elements/live-pusher.d.mts +58 -0
- package/dist/dev/weappIntrinsicElements/elements/map.d.mts +106 -0
- package/dist/dev/weappIntrinsicElements/elements/match-media.d.mts +16 -0
- package/dist/dev/weappIntrinsicElements/elements/movable-area.d.mts +27 -0
- package/dist/dev/weappIntrinsicElements/elements/movable-view.d.mts +27 -0
- package/dist/dev/weappIntrinsicElements/elements/navigation-bar.d.mts +15 -0
- package/dist/dev/weappIntrinsicElements/elements/navigator.d.mts +26 -0
- package/dist/dev/weappIntrinsicElements/elements/official-account.d.mts +14 -0
- package/dist/dev/weappIntrinsicElements/elements/open-data.d.mts +16 -0
- package/dist/dev/weappIntrinsicElements/elements/page-container.d.mts +26 -0
- package/dist/dev/weappIntrinsicElements/elements/page-meta.d.mts +24 -0
- package/dist/dev/weappIntrinsicElements/elements/picker-view-column.d.mts +19 -0
- package/dist/dev/weappIntrinsicElements/elements/picker-view.d.mts +19 -0
- package/dist/dev/weappIntrinsicElements/elements/picker.d.mts +24 -0
- package/dist/dev/weappIntrinsicElements/elements/progress.d.mts +22 -0
- package/dist/dev/weappIntrinsicElements/elements/radio-group.d.mts +11 -0
- package/dist/dev/weappIntrinsicElements/elements/radio.d.mts +13 -0
- package/dist/dev/weappIntrinsicElements/elements/rich-text.d.mts +17 -0
- package/dist/dev/weappIntrinsicElements/elements/scroll-view.d.mts +64 -0
- package/dist/dev/weappIntrinsicElements/elements/share-element.d.mts +17 -0
- package/dist/dev/weappIntrinsicElements/elements/slider.d.mts +24 -0
- package/dist/dev/weappIntrinsicElements/elements/slot.d.mts +10 -0
- package/dist/dev/weappIntrinsicElements/elements/swiper-item.d.mts +11 -0
- package/dist/dev/weappIntrinsicElements/elements/swiper.d.mts +40 -0
- package/dist/dev/weappIntrinsicElements/elements/switch.d.mts +15 -0
- package/dist/dev/weappIntrinsicElements/elements/template.d.mts +12 -0
- package/dist/dev/weappIntrinsicElements/elements/text.d.mts +15 -0
- package/dist/dev/weappIntrinsicElements/elements/textarea.d.mts +41 -0
- package/dist/dev/weappIntrinsicElements/elements/video.d.mts +72 -0
- package/dist/dev/weappIntrinsicElements/elements/view.d.mts +15 -0
- package/dist/dev/weappIntrinsicElements/elements/voip-room.d.mts +15 -0
- package/dist/dev/weappIntrinsicElements/elements/web-view.d.mts +14 -0
- package/dist/dev/weappIntrinsicElements.d.mts +114 -0
- package/dist/dev/web-apis.d.mts +3 -0
- package/dist/fetch.d.mts +4 -4
- 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 +51 -14
- package/dist/jsxTypes.d.mts +8 -0
- package/dist/macros/shared.d.mts +14 -15
- package/dist/macros.d.mts +22 -22
- package/dist/miniprogram/jsx-runtime.d.mts +13 -0
- package/dist/miniprogram/jsx-runtime.mjs +1 -0
- package/dist/miniprogramIntrinsicElements/base.d.mts +4 -0
- package/dist/miniprogramIntrinsicElements/elements/button.d.mts +23 -0
- package/dist/miniprogramIntrinsicElements/elements/camera.d.mts +18 -0
- package/dist/miniprogramIntrinsicElements/elements/canvas.d.mts +16 -0
- package/dist/miniprogramIntrinsicElements/elements/checkbox-group.d.mts +12 -0
- package/dist/miniprogramIntrinsicElements/elements/checkbox.d.mts +13 -0
- package/dist/miniprogramIntrinsicElements/elements/form.d.mts +13 -0
- package/dist/miniprogramIntrinsicElements/elements/icon.d.mts +12 -0
- package/dist/miniprogramIntrinsicElements/elements/image.d.mts +16 -0
- package/dist/miniprogramIntrinsicElements/elements/input.d.mts +29 -0
- package/dist/miniprogramIntrinsicElements/elements/label.d.mts +11 -0
- package/dist/miniprogramIntrinsicElements/elements/map.d.mts +31 -0
- package/dist/miniprogramIntrinsicElements/elements/match-media.d.mts +13 -0
- package/dist/miniprogramIntrinsicElements/elements/movable-area.d.mts +9 -0
- package/dist/miniprogramIntrinsicElements/elements/movable-view.d.mts +26 -0
- package/dist/miniprogramIntrinsicElements/elements/navigator.d.mts +15 -0
- package/dist/miniprogramIntrinsicElements/elements/picker-view-column.d.mts +9 -0
- package/dist/miniprogramIntrinsicElements/elements/picker-view.d.mts +20 -0
- package/dist/miniprogramIntrinsicElements/elements/picker.d.mts +14 -0
- package/dist/miniprogramIntrinsicElements/elements/progress.d.mts +12 -0
- package/dist/miniprogramIntrinsicElements/elements/radio-group.d.mts +12 -0
- package/dist/miniprogramIntrinsicElements/elements/radio.d.mts +13 -0
- package/dist/miniprogramIntrinsicElements/elements/rich-text.d.mts +11 -0
- package/dist/miniprogramIntrinsicElements/elements/scroll-view.d.mts +22 -0
- package/dist/miniprogramIntrinsicElements/elements/slider.d.mts +19 -0
- package/dist/miniprogramIntrinsicElements/elements/swiper-item.d.mts +9 -0
- package/dist/miniprogramIntrinsicElements/elements/swiper.d.mts +24 -0
- package/dist/miniprogramIntrinsicElements/elements/switch.d.mts +14 -0
- package/dist/miniprogramIntrinsicElements/elements/text.d.mts +13 -0
- package/dist/miniprogramIntrinsicElements/elements/textarea.d.mts +23 -0
- package/dist/miniprogramIntrinsicElements/elements/video.d.mts +29 -0
- package/dist/miniprogramIntrinsicElements/elements/view.d.mts +16 -0
- package/dist/miniprogramIntrinsicElements/elements/web-view.d.mts +15 -0
- package/dist/miniprogramIntrinsicElements.d.mts +70 -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.d.mts +8 -9
- package/dist/reactivity/computed.mjs +1 -1
- package/dist/reactivity/core.d.mts +15 -15
- package/dist/reactivity/core.mjs +1 -1
- package/dist/reactivity/index.d.mts +2 -1
- package/dist/reactivity/reactive/mutation.d.mts +6 -7
- package/dist/reactivity/reactive/patch.d.mts +4 -5
- package/dist/reactivity/reactive/shallow.d.mts +3 -4
- package/dist/reactivity/reactive/shared.d.mts +2 -3
- package/dist/reactivity/reactive.d.mts +6 -6
- package/dist/reactivity/readonly.d.mts +7 -8
- package/dist/reactivity/ref.d.mts +14 -15
- package/dist/reactivity/ref.mjs +1 -1
- package/dist/reactivity/shallowRef.d.mts +5 -6
- package/dist/reactivity/toRefs.d.mts +5 -6
- package/dist/reactivity/traverse.d.mts +2 -3
- package/dist/reactivity/watch/types.d.mts +18 -19
- package/dist/reactivity/watch.d.mts +8 -8
- package/dist/router/createRouter.d.mts +2 -3
- package/dist/router/navigationCore.d.mts +3 -4
- package/dist/router/resolve.d.mts +2 -3
- package/dist/router/routeSync.mjs +1 -1
- package/dist/router/types.d.mts +38 -39
- package/dist/router/useRoute.d.mts +5 -6
- package/dist/router/useRoute.mjs +1 -1
- package/dist/router/useRouter.d.mts +2 -3
- package/dist/routerInternal/query.d.mts +3 -4
- package/dist/routerInternal/types.d.mts +2 -3
- 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/pending.d.mts +3 -4
- 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.d.mts +2 -3
- 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/css.d.mts +3 -4
- package/dist/runtime/defaults.d.mts +5 -6
- 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 +18 -27
- package/dist/runtime/define.mjs +1 -1
- package/dist/runtime/diff.mjs +1 -1
- package/dist/runtime/disposables.d.mts +6 -7
- package/dist/runtime/elementIntersectionObserver.d.mts +5 -6
- 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/base.d.mts +7 -8
- package/dist/runtime/hooks/register.d.mts +26 -27
- package/dist/runtime/hooks/vue.d.mts +13 -15
- 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/intersectionObserver.d.mts +4 -5
- package/dist/runtime/jsxIsland.d.mts +20 -25
- package/dist/runtime/layoutBridge.d.mts +12 -17
- package/dist/runtime/noSetData.d.mts +3 -4
- package/dist/runtime/pageEnvironment.d.mts +9 -10
- package/dist/runtime/pageLayout.d.mts +9 -11
- package/dist/runtime/pageScroll.d.mts +4 -5
- package/dist/runtime/provide.d.mts +7 -7
- package/dist/runtime/provideStore.d.mts +2 -3
- package/dist/runtime/publicRuntime.d.mts +21 -0
- package/dist/runtime/publicRuntime.mjs +1 -0
- package/dist/runtime/pullDownRefresh.d.mts +4 -5
- package/dist/runtime/register/app.d.mts +2 -3
- 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/component.d.mts +2 -3
- package/dist/runtime/register/inline.d.mts +3 -4
- 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.d.mts +4 -5
- package/dist/runtime/register/runtimeInstance.mjs +1 -1
- package/dist/runtime/register/setup.d.mts +2 -3
- package/dist/runtime/register/snapshot.mjs +1 -1
- package/dist/runtime/register/watch.d.mts +3 -4
- package/dist/runtime/scopedSlots.mjs +1 -1
- package/dist/runtime/selectorQuery.d.mts +15 -16
- package/dist/runtime/selectorQuery.mjs +1 -1
- package/dist/runtime/teardown.mjs +1 -0
- package/dist/runtime/template.d.mts +4 -5
- package/dist/runtime/templateRefTypes.d.mts +7 -3
- package/dist/runtime/templateRefs.mjs +1 -1
- package/dist/runtime/types/core.d.mts +9 -10
- package/dist/runtime/types/miniprogram.d.mts +13 -10
- package/dist/runtime/types/miniprogramHost.d.mts +41 -41
- package/dist/runtime/types/miniprogramHostSources.d.mts +21 -22
- package/dist/runtime/types/options.d.mts +8 -9
- package/dist/runtime/types/props/propTypes.d.mts +16 -17
- package/dist/runtime/types/props/router.d.mts +13 -14
- package/dist/runtime/types/props/setup.d.mts +7 -8
- package/dist/runtime/types/props.d.mts +1 -1
- package/dist/runtime/types/runtime.d.mts +7 -8
- package/dist/runtime/types/setData.d.mts +21 -5
- package/dist/runtime/types.d.mts +10 -10
- package/dist/runtime/uniAppHost.d.mts +2 -3
- package/dist/runtime/updatePerformance.d.mts +5 -6
- package/dist/runtime/use.d.mts +3 -4
- package/dist/runtime/vueCompat/context.d.mts +4 -5
- package/dist/runtime/vueCompat/model.d.mts +9 -10
- package/dist/runtime/vueCompat/router.d.mts +3 -4
- package/dist/runtime/vueCompat/templateRef.d.mts +4 -5
- package/dist/runtime/vueCompat/templateRef.mjs +1 -1
- package/dist/scheduler.d.mts +2 -3
- 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 +12 -11
- package/dist/store/manager.d.mts +2 -3
- package/dist/store/storeToRefs.d.mts +3 -4
- package/dist/store/types.d.mts +12 -13
- package/dist/tt/jsx-runtime.d.mts +13 -0
- package/dist/tt/jsx-runtime.mjs +1 -0
- package/dist/ttIntrinsicElements/base.d.mts +4 -0
- package/dist/ttIntrinsicElements/elements/ad.d.mts +7 -0
- package/dist/ttIntrinsicElements/elements/aweme-data.d.mts +14 -0
- package/dist/ttIntrinsicElements/elements/aweme-user-card.d.mts +15 -0
- package/dist/ttIntrinsicElements/elements/button.d.mts +22 -0
- package/dist/ttIntrinsicElements/elements/camera.d.mts +18 -0
- package/dist/ttIntrinsicElements/elements/canvas.d.mts +15 -0
- package/dist/ttIntrinsicElements/elements/checkbox-group.d.mts +11 -0
- package/dist/ttIntrinsicElements/elements/checkbox.d.mts +11 -0
- package/dist/ttIntrinsicElements/elements/draw-ad.d.mts +15 -0
- package/dist/ttIntrinsicElements/elements/form.d.mts +13 -0
- package/dist/ttIntrinsicElements/elements/icon.d.mts +10 -0
- package/dist/ttIntrinsicElements/elements/image.d.mts +15 -0
- package/dist/ttIntrinsicElements/elements/input.d.mts +31 -0
- package/dist/ttIntrinsicElements/elements/label.d.mts +9 -0
- package/dist/ttIntrinsicElements/elements/live-player.d.mts +18 -0
- package/dist/ttIntrinsicElements/elements/live-preview.d.mts +12 -0
- package/dist/ttIntrinsicElements/elements/map.d.mts +35 -0
- package/dist/ttIntrinsicElements/elements/mask.d.mts +7 -0
- package/dist/ttIntrinsicElements/elements/match-media.d.mts +15 -0
- package/dist/ttIntrinsicElements/elements/movable-area.d.mts +9 -0
- package/dist/ttIntrinsicElements/elements/movable-view.d.mts +26 -0
- package/dist/ttIntrinsicElements/elements/navigator.d.mts +15 -0
- package/dist/ttIntrinsicElements/elements/open-data.d.mts +14 -0
- package/dist/ttIntrinsicElements/elements/picker-view-column.d.mts +7 -0
- package/dist/ttIntrinsicElements/elements/picker-view.d.mts +18 -0
- package/dist/ttIntrinsicElements/elements/picker.d.mts +21 -0
- package/dist/ttIntrinsicElements/elements/progress.d.mts +15 -0
- package/dist/ttIntrinsicElements/elements/radio-group.d.mts +11 -0
- package/dist/ttIntrinsicElements/elements/radio.d.mts +11 -0
- package/dist/ttIntrinsicElements/elements/rich-text.d.mts +9 -0
- package/dist/ttIntrinsicElements/elements/rtc-room.d.mts +12 -0
- package/dist/ttIntrinsicElements/elements/scroll-view.d.mts +31 -0
- package/dist/ttIntrinsicElements/elements/slider.d.mts +18 -0
- package/dist/ttIntrinsicElements/elements/swiper-item.d.mts +9 -0
- package/dist/ttIntrinsicElements/elements/swiper.d.mts +26 -0
- package/dist/ttIntrinsicElements/elements/switch.d.mts +13 -0
- package/dist/ttIntrinsicElements/elements/text.d.mts +11 -0
- package/dist/ttIntrinsicElements/elements/textarea.d.mts +33 -0
- package/dist/ttIntrinsicElements/elements/video.d.mts +57 -0
- package/dist/ttIntrinsicElements/elements/view.d.mts +14 -0
- package/dist/ttIntrinsicElements/elements/web-view.d.mts +14 -0
- package/dist/ttIntrinsicElements.d.mts +88 -0
- package/dist/version.d.mts +2 -3
- package/dist/vue-augment.d.mts +2 -1
- package/dist/vue-demi.d.mts +17 -18
- package/dist/vue-demi.mjs +1 -1
- package/dist/vue-types.d.mts +2 -2
- package/dist/weapp/jsx-runtime.d.mts +13 -0
- package/dist/weapp/jsx-runtime.mjs +1 -0
- package/dist/weappIntrinsicElements/base.d.mts +3 -21
- package/dist/weappIntrinsicElements/elements/ad-custom.d.mts +6 -6
- package/dist/weappIntrinsicElements/elements/ad.d.mts +7 -7
- package/dist/weappIntrinsicElements/elements/audio.d.mts +9 -9
- package/dist/weappIntrinsicElements/elements/block.d.mts +3 -4
- package/dist/weappIntrinsicElements/elements/button.d.mts +18 -17
- package/dist/weappIntrinsicElements/elements/camera.d.mts +12 -12
- package/dist/weappIntrinsicElements/elements/canvas.d.mts +10 -10
- package/dist/weappIntrinsicElements/elements/checkbox-group.d.mts +6 -9
- package/dist/weappIntrinsicElements/elements/checkbox.d.mts +3 -4
- package/dist/weappIntrinsicElements/elements/cover-image.d.mts +9 -6
- package/dist/weappIntrinsicElements/elements/cover-view.d.mts +3 -4
- package/dist/weappIntrinsicElements/elements/editor.d.mts +9 -9
- package/dist/weappIntrinsicElements/elements/form.d.mts +7 -7
- package/dist/weappIntrinsicElements/elements/functional-page-navigator.d.mts +9 -9
- package/dist/weappIntrinsicElements/elements/icon.d.mts +3 -4
- package/dist/weappIntrinsicElements/elements/image.d.mts +7 -7
- package/dist/weappIntrinsicElements/elements/import.d.mts +3 -4
- package/dist/weappIntrinsicElements/elements/include.d.mts +3 -4
- package/dist/weappIntrinsicElements/elements/input.d.mts +17 -18
- package/dist/weappIntrinsicElements/elements/keyboard-accessory.d.mts +3 -4
- package/dist/weappIntrinsicElements/elements/label.d.mts +3 -4
- package/dist/weappIntrinsicElements/elements/live-player.d.mts +18 -18
- package/dist/weappIntrinsicElements/elements/live-pusher.d.mts +19 -19
- package/dist/weappIntrinsicElements/elements/map.d.mts +18 -18
- package/dist/weappIntrinsicElements/elements/match-media.d.mts +3 -4
- package/dist/weappIntrinsicElements/elements/movable-area.d.mts +8 -8
- package/dist/weappIntrinsicElements/elements/movable-view.d.mts +8 -8
- package/dist/weappIntrinsicElements/elements/navigation-bar.d.mts +3 -4
- package/dist/weappIntrinsicElements/elements/navigator.d.mts +10 -10
- package/dist/weappIntrinsicElements/elements/official-account.d.mts +6 -6
- package/dist/weappIntrinsicElements/elements/open-data.d.mts +5 -5
- package/dist/weappIntrinsicElements/elements/page-container.d.mts +11 -11
- package/dist/weappIntrinsicElements/elements/page-meta.d.mts +7 -7
- package/dist/weappIntrinsicElements/elements/picker-view-column.d.mts +7 -7
- package/dist/weappIntrinsicElements/elements/picker-view.d.mts +7 -7
- package/dist/weappIntrinsicElements/elements/picker.d.mts +9 -9
- package/dist/weappIntrinsicElements/elements/progress.d.mts +5 -5
- package/dist/weappIntrinsicElements/elements/radio-group.d.mts +6 -9
- package/dist/weappIntrinsicElements/elements/radio.d.mts +3 -4
- package/dist/weappIntrinsicElements/elements/rich-text.d.mts +6 -7
- package/dist/weappIntrinsicElements/elements/scroll-view.d.mts +20 -25
- package/dist/weappIntrinsicElements/elements/share-element.d.mts +5 -7
- package/dist/weappIntrinsicElements/elements/slider.d.mts +6 -6
- package/dist/weappIntrinsicElements/elements/slot.d.mts +3 -4
- package/dist/weappIntrinsicElements/elements/swiper-item.d.mts +6 -38
- package/dist/weappIntrinsicElements/elements/swiper.d.mts +11 -14
- package/dist/weappIntrinsicElements/elements/switch.d.mts +5 -5
- package/dist/weappIntrinsicElements/elements/template.d.mts +3 -4
- package/dist/weappIntrinsicElements/elements/text.d.mts +5 -6
- package/dist/weappIntrinsicElements/elements/textarea.d.mts +16 -16
- package/dist/weappIntrinsicElements/elements/video.d.mts +24 -24
- package/dist/weappIntrinsicElements/elements/view.d.mts +5 -4
- package/dist/weappIntrinsicElements/elements/voip-room.d.mts +7 -7
- package/dist/weappIntrinsicElements/elements/web-view.d.mts +7 -7
- package/dist/weappIntrinsicElements.d.mts +111 -150
- package/package.json +19 -19
- package/dist/dev/jsx-runtime.mjs +0 -1
- package/dist/runtime/templateRefs.d.mts +0 -11
- /package/dist/_virtual/{_@oxc-project_runtime@0.148.0 → _@oxc-project_runtime@0.149.0}/helpers/esm/defineProperty.mjs +0 -0
- /package/dist/_virtual/{_@oxc-project_runtime@0.148.0 → _@oxc-project_runtime@0.149.0}/helpers/esm/toPrimitive.mjs +0 -0
- /package/dist/_virtual/{_@oxc-project_runtime@0.148.0 → _@oxc-project_runtime@0.149.0}/helpers/esm/toPropertyKey.mjs +0 -0
- /package/dist/_virtual/{_@oxc-project_runtime@0.148.0 → _@oxc-project_runtime@0.149.0}/helpers/esm/typeof.mjs +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{getMiniProgramRuntimeGlobalObject as e}from"../../platform.mjs";import{callHookList as t}from"../../hooks/base.mjs";import{
|
|
1
|
+
import{getMiniProgramRuntimeGlobalObject as e}from"../../platform.mjs";import{callHookList as t}from"../../hooks/base.mjs";import{requireRuntimeCapability as n,runtimeCapabilityRegistry as r}from"../../capabilities.mjs";import{runTeardownSteps as i}from"../../teardown.mjs";import{enableDeferredSetData as a,mountRuntimeInstance as o,refreshRuntimeInstance as s,setRuntimeSetDataVisibility as c,teardownRuntimeInstance as l}from"../runtimeInstance.mjs";import{ensureInitialNavigation as u}from"../../../router/initialNavigation.mjs";import{registerNativeComponentDefinition as d}from"./registerNativeDefinition.mjs";import{WEAPP_VITE_STATEFUL_HMR_BRIDGE_KEY as f,WEVU_PUBLIC_RUNTIME_KEY as p,WEVU_READY_CALLED_KEY as m,WEVU_RESOLVE_PUBLIC_INSTANCE_METHOD as h,WEVU_RUNTIME_KEY as ee}from"@weapp-core/constants";function g(g){var _;let{runtimeApp:v,watch:y,setup:b,restOptions:x,pageLifecycleHooks:S,finalObservers:C,userLifetimes:w,userPageLifetimes:T,finalMethods:E,finalOptions:D,applyExtraInstanceFields:O,templateRefs:k,layoutHosts:A,attachWevuPropKeys:j,setupLifecycle:M,syncWevuPropsFromInstance:N,directPropsDerivedKeys:P,isPage:F,vueLifecycles:I,getRuntimeOwnerLabel:L,registerNative:R=!0}=g,z=Array.isArray(k)&&k.length>0?k:void 0;z&&n(`templateRefs`,`registerComponentDefinition(template refs)`);let B=Array.isArray(A)&&A.length>0?A:void 0,V=B?n(`layout`,`registerComponentDefinition(layout hosts)`):void 0,H=(e,t)=>{if(z){var n;(n=r.templateRefs)==null||n.schedule(e,t);return}t==null||t()},U=e=>{var t;let n=(t=e.__wevu)==null?e[p]:t;if(n)return n;let r=e.$state;if(r&&typeof r==`object`)return r[ee]},W=e=>{var t,n,i;return((t=U(e))==null?void 0:t.proxy)||((n=(i=r.scopedSlots)==null?void 0:i.resolveLifecycleProxy(e))==null?e:n)},G=e=>{let t=U(e);return t?{runtime:t,mounted:!1}:(O(e),j(e),o(e,v,y,b,{deferSetData:!0,snapshotOmitKeys:P}),N(e),a(e),{runtime:U(e),mounted:!0})},K=(e,t,n)=>{let r=I[t];if(typeof r==`function`)return r.apply(W(e),n)},q=(e,t)=>{if(!F){t();return}u(e,void 0,{start:!1,onComplete:e=>{e&&t()}})||t()},J=e=>{U(e)||typeof I.mounted!=`function`||G(e).mounted&&(K(e,`created`,[]),K(e,`beforeMount`,[]))},Y={},X=e=>{B&&(V==null||V.attachHosts(B,e))},Z=e=>{F&&V&&(V==null||V.attachPageSetter(e))};if(F)for(let e of[`onPullDownRefresh`,`onReachBottom`,`onShareAppMessage`,`onShareTimeline`,`onAddToFavorites`]){let t=S[e];typeof t==`function`&&typeof E[e]!=`function`&&(Y[e]=function(...e){return t.apply(this,e)})}let Q={...x,...F?S:{},observers:C,lifetimes:{...w,created:function(...e){if(O(this),j(this),z){var t;(t=r.templateRefs)==null||t.attachBindings(this,z)}q(this,()=>{if(K(this,`beforeCreate`,e),M===`created`){try{o(this,v,y,b,{deferSetData:!0,snapshotOmitKeys:P})}catch(e){let t=L(this);throw Error(`[wevu] mount runtime failed in created (${t}): ${e instanceof Error?e.message:String(e)}`)}N(this),Z(this)}typeof w.created==`function`&&w.created.apply(this,e)})},moved:function(...e){t(this,`onMoved`,e),typeof w.moved==`function`&&w.moved.apply(this,e)},attached:function(...e){var n;if(O(this),j(this),z&&!((n=r.templateRefs)!=null&&n.hasBindings(this))){var i;(i=r.templateRefs)==null||i.attachBindings(this,z)}q(this,()=>{if(M!==`created`||!this.__wevu)try{o(this,v,y,b,{deferSetData:!0,snapshotOmitKeys:P})}catch(e){let t=L(this);throw Error(`[wevu] mount runtime failed in attached (${t}): ${e instanceof Error?e.message:String(e)}`)}N(this),K(this,`created`,e),K(this,`beforeMount`,e),Z(this),X(this),a(this),t(this,`onAttached`,e),typeof w.attached==`function`&&w.attached.apply(this,e)})},ready:function(...e){if(!F||this[m]||!u(this,void 0,{start:!0,onComplete:t=>{t&&!this.__wevuInitialNavigationReady&&(this.__wevuInitialNavigationReady=!0,Q.lifetimes.ready.call(this,...e))}})||this.__wevuInitialNavigationReady){if(J(this),F&&typeof S.onReady==`function`){let t=!!this[m];if(S.onReady.call(this,...e),!t){let t=()=>K(this,`mounted`,e);u(this,void 0,{start:!1,onComplete:e=>{e&&t()}})||t()}typeof w.ready==`function`&&w.ready.apply(this,e);return}if(!this[m]){var n;this[m]=!0,N(this),(n=r.templateRefs)==null||n.scheduleOwner(this),H(this,()=>{t(this,`onReady`,e),K(this,`mounted`,e),typeof w.ready==`function`&&w.ready.apply(this,e)});return}typeof w.ready==`function`&&w.ready.apply(this,e)}},detached:function(...e){if(F&&typeof S.onUnload==`function`){i([()=>K(this,`beforeUnmount`,e),()=>K(this,`beforeDestroy`,e),()=>{var e;return(e=r.templateRefs)==null?void 0:e.scheduleOwner(this)},()=>t(this,`onDetached`,e),()=>S.onUnload.call(this,...e),()=>{typeof w.detached==`function`&&w.detached.apply(this,e)},()=>K(this,`unmounted`,e),()=>K(this,`destroyed`,e)]);return}i([()=>K(this,`beforeUnmount`,e),()=>K(this,`beforeDestroy`,e),()=>{var e;return(e=r.templateRefs)==null?void 0:e.scheduleOwner(this)},()=>t(this,`onDetached`,e),()=>{B&&(V==null||V.detachHosts(B,this))},()=>l(this),()=>K(this,`unmounted`,e),()=>K(this,`destroyed`,e),()=>{typeof w.detached==`function`&&w.detached.apply(this,e)}])},error:function(...e){t(this,`onError`,e),typeof w.error==`function`&&w.error.apply(this,e)}},pageLifetimes:{...T,show:function(...e){if(F&&typeof S.onShow==`function`){S.onShow.call(this,...e),typeof T.show==`function`&&T.show.apply(this,e);return}c(this,!0),t(this,`onShow`,e),typeof T.show==`function`&&T.show.apply(this,e)},hide:function(...e){if(F&&typeof S.onHide==`function`){S.onHide.call(this,...e),typeof T.hide==`function`&&T.hide.apply(this,e);return}c(this,!1),t(this,`onHide`,e),typeof T.hide==`function`&&T.hide.apply(this,e)},resize:function(...e){if(F&&typeof S.onResize==`function`){S.onResize.call(this,...e),typeof T.resize==`function`&&T.resize.apply(this,e);return}t(this,`onResize`,e),typeof T.resize==`function`&&T.resize.apply(this,e)},routeDone:function(...e){if(F&&typeof S.onRouteDone==`function`){S.onRouteDone.call(this,...e),typeof T.routeDone==`function`&&T.routeDone.apply(this,e);return}t(this,`onRouteDone`,e),typeof T.routeDone==`function`&&T.routeDone.apply(this,e)}},methods:{...Y,...E,[h]:function(){var e;let t=G(this);return t.mounted&&(K(this,`created`,[]),K(this,`beforeMount`,[])),(e=t.runtime)==null?void 0:e.proxy}},options:D};if(!R)return Q;let $=(_=e())==null?void 0:_[f];if(typeof($==null?void 0:$.trackWevuComponent)==`function`){let e=$.trackWevuComponent(Q,(e,t)=>{s(e,v,y,b,{snapshotOmitKeys:P,stateSnapshot:t}),N(e),Z(e),X(e),a(e,{rehydrateSetupState:!0})});return $.isApplying()||d(e,F),e}return d(Q,F),Q}export{g as registerComponentDefinition};
|
|
@@ -10,8 +10,7 @@ import { WatchMap } from "./watch.mjs";
|
|
|
10
10
|
* 注册组件入口(框架内部使用)。
|
|
11
11
|
* @internal
|
|
12
12
|
*/
|
|
13
|
-
declare function registerComponent<D extends object, C extends ComputedDefinitions, M extends MethodDefinitions>(runtimeApp: RuntimeApp<D, C, M>, methods: MethodDefinitions, watch: WatchMap | undefined, setup: DefineComponentOptions<ComponentPropsOptions, D, C, M>['setup'], mpOptions: MiniProgramComponentRawOptions, options?: {
|
|
13
|
+
export declare function registerComponent<D extends object, C extends ComputedDefinitions, M extends MethodDefinitions>(runtimeApp: RuntimeApp<D, C, M>, methods: MethodDefinitions, watch: WatchMap | undefined, setup: DefineComponentOptions<ComponentPropsOptions, D, C, M>['setup'], mpOptions: MiniProgramComponentRawOptions, options?: {
|
|
14
14
|
registerNative?: boolean;
|
|
15
15
|
}): any;
|
|
16
|
-
//#endregion
|
|
17
|
-
export { registerComponent };
|
|
16
|
+
//#endregion
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
//#region src/runtime/register/inline.d.ts
|
|
2
|
-
interface InlineExpressionEntry {
|
|
2
|
+
export interface InlineExpressionEntry {
|
|
3
3
|
keys: string[];
|
|
4
4
|
indexKeys?: string[];
|
|
5
5
|
scopeResolvers?: Array<InlineExpressionScopeResolver | ((ctx: any, scope: Record<string, any>, event: any) => any) | undefined>;
|
|
@@ -10,6 +10,5 @@ interface InlineExpressionScopeResolver {
|
|
|
10
10
|
path: string;
|
|
11
11
|
indexKey: string;
|
|
12
12
|
}
|
|
13
|
-
type InlineExpressionMap = Record<string, InlineExpressionEntry>;
|
|
14
|
-
//#endregion
|
|
15
|
-
export { InlineExpressionEntry, InlineExpressionMap };
|
|
13
|
+
export type InlineExpressionMap = Record<string, InlineExpressionEntry>;
|
|
14
|
+
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{isRef as e}from"../../reactivity/ref.mjs";
|
|
1
|
+
import{isRef as e}from"../../reactivity/ref.mjs";import{decodeWxmlEntities as t,resolveDatasetEventValue as n,resolveDatasetIndex as r}from"../inlineDataset.mjs";function i(e,t){let r=n(e,`wvEventDetail`,t);return r===!0||r===1||r===`1`||r===`true`}function a(e,t){if(!i(t,e))return e;if(e&&typeof e==`object`&&`detail`in e)return e.detail}function o(t,n){if(!n)return;let r=n.split(`.`).filter(Boolean),i=e(t)?t.value:t;for(let t of r){if(e(i)&&(i=i.value),i==null)return;i=i[t]}return e(i)?i.value:i}function s(e){return e}function c(e,i,c,l){var u,d,f,p;let m=(u=(d=c==null||(f=c.currentTarget)==null?void 0:f.dataset)==null?c==null||(p=c.target)==null?void 0:p.dataset:d)==null?{}:u,h=a(c,m),g=n(m,`wvInlineId`,c);if(typeof g==`string`&&g&&l){let t=l[g];if(t&&typeof t.fn==`function`){let n={},i=Array.isArray(t.keys)?t.keys:[];for(let e=0;e<i.length;e+=1){let t=i[e];n[t]=m==null?void 0:m[`wvS${e}`]}let a=Array.isArray(t.indexKeys)?t.indexKeys:[];for(let e=0;e<a.length;e+=1){let t=a[e],i=r(m==null?void 0:m[`wvI${e}`]);i!==void 0&&(n[t]=i)}let c=Array.isArray(t.scopeResolvers)?t.scopeResolvers:[];for(let t=0;t<i.length;t+=1){let r=i[t],a=c[t];try{let t;if(typeof a==`function`)t=a(e,n,h);else if(a&&typeof a==`object`&&a.type===`for-item`){let r=n[a.indexKey],i=o(e,a.path);t=i==null?void 0:i[r]}else continue;t!==void 0&&(n[r]=s(t))}catch(e){}}let l=t.fn(e,n,h);return typeof l==`function`?l.call(e,h):l}}let _=n(m,`wvHandler`,c),v=typeof i==`string`&&i?i:typeof _==`string`?_:void 0;if(!v)return;let y=n(m,`wvArgs`,c),b=[];if(Array.isArray(y))b=y;else if(typeof y==`string`)try{b=JSON.parse(y)}catch(e){try{b=JSON.parse(t(y))}catch(e){b=[]}}Array.isArray(b)||(b=[]);let x=b.map(e=>e===`$event`?h:e),S=e==null?void 0:e[v];if(typeof S==`function`)return S.apply(e,x)}export{c as runInlineExpression};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{toRaw as e}from"../../../reactivity/reactive/shared.mjs";import{getCurrentMiniProgramRuntimeCapabilities as t,getMiniProgramGlobalObject as n,supportsCurrentMiniProgramRuntimeCapability as r}from"../../platform.mjs";import{
|
|
1
|
+
import{toRaw as e}from"../../../reactivity/reactive/shared.mjs";import{getCurrentMiniProgramRuntimeCapabilities as t,getMiniProgramGlobalObject as n,supportsCurrentMiniProgramRuntimeCapability as r}from"../../platform.mjs";import{markNoSetData as i}from"../../noSetData.mjs";import{hasOwn as a}from"../../../utils.mjs";import{normalizeEmitPayload as o}from"../../emit.mjs";import{isNativeBridgeMethod as s,markNativeBridgeMethod as c}from"../../nativeBridge.mjs";import{WEVU_NATIVE_INSTANCE_KEY as l,WEVU_PROPS_KEY as u,WEVU_SETUP_CONTEXT_INSTANCE_KEY as d,WEVU_SLOT_NAMES_PROP as f}from"@weapp-core/constants";const p=[`triggerEvent`,`createSelectorQuery`,`createIntersectionObserver`,`setData`,`setUpdatePerformanceListener`];function m(){return Object.freeze(Object.create(null))}const h=()=>[];function g(e){return Array.isArray(e)?[...new Set(e.filter(e=>typeof e==`string`&&e.length>0))]:!e||typeof e!=`object`?[]:Object.entries(e).filter(([,e])=>!!e).map(([e])=>e)}function _(e){if(!a(e,f))return m();let t=()=>g(e[f]),n=e=>typeof e==`string`&&t().includes(e);return new Proxy(Object.create(null),{get(e,t){if(n(t))return h},has(e,t){return n(t)},ownKeys(){return t()},getOwnPropertyDescriptor(e,t){if(n(t))return{configurable:!0,enumerable:!0,value:h}},set(){return!1},deleteProperty(){return!1}})}function v(e,t){let n=_(t);try{Object.defineProperty(e,"$slots",{value:n,configurable:!0,enumerable:!1,writable:!1})}catch(t){e.$slots=n}return n}function y(){let e=(()=>{});return e.stop=()=>{},e.pause=()=>{},e.resume=()=>{},e}function b(e){try{return i(e)}catch(t){return e}}function x(t,n,r){let i=t==null?void 0:t.state,a=i&&typeof i==`object`?e(i):void 0,o=t==null?void 0:t.proxy,c=e=>{let t=e[r];if(typeof t!=`function`)return!1;if(s(t))return!0;let i=n[r];return typeof i==`function`&&t===i},u=e=>!e||typeof e!=`object`||e===n||e===o||c(e)?!1:typeof e[r]==`function`,d=a?a[l]:void 0;if(u(d))return d;let f=t==null?void 0:t.instance;if(u(f))return f}function S(e,t,n){c(n);try{Object.defineProperty(e,t,{value:n,configurable:!0,enumerable:!1,writable:!0})}catch(r){e[t]=n}}function C(i,o){let c=i[d];if(c&&typeof c==`object`)return c;let f=Object.create(null);try{Object.defineProperty(f,l,{configurable:!0,enumerable:!1,get(){let t=o==null?void 0:o.state,n=t&&typeof t==`object`?e(t):void 0,r=n==null?void 0:n[l];return r&&typeof r==`object`?r:i}})}catch(e){f[l]=i}let p=e=>{var t,n;let r=o==null?void 0:o.proxy;if(r&&Reflect.has(r,e))return{found:!0,value:Reflect.get(r,e)};let s=(t=o==null||(n=o.state)==null?void 0:n[u])==null?i[u]:t;return s&&typeof s==`object`&&a(s,e)?{found:!0,value:Reflect.get(s,e)}:{found:!1,value:void 0}},m=e=>{let t=x(o,i,e);if(t)return t;let n=i[e];if(typeof n==`function`&&!s(n))return i};S(f,`triggerEvent`,(...e)=>{let[t,n,r]=e,i=m(`triggerEvent`);i&&typeof i.triggerEvent==`function`&&(e.length>=3?i.triggerEvent(t,n,r):i.triggerEvent(t,n))}),S(f,`createSelectorQuery`,()=>{var e;let a=m(`createSelectorQuery`);if(a&&typeof a.createSelectorQuery==`function`)return a.createSelectorQuery();let s=n();if(!r(`globalCreateSelectorQuery`)||!s||typeof s.createSelectorQuery!=`function`)return;let c=s.createSelectorQuery();if(!c||!t().selectorQueryScopeByIn||typeof c.in!=`function`)return c;let l=(e=x(o,i,`setData`))==null?i:e;return c.in(l)}),S(f,`createIntersectionObserver`,e=>{var a;let s=m(`createIntersectionObserver`);if(s&&typeof s.createIntersectionObserver==`function`)return s.createIntersectionObserver(e==null?{}:e);let c=n();if(!r(`globalCreateIntersectionObserver`)||!c||typeof c.createIntersectionObserver!=`function`)return;let l=(a=x(o,i,`setData`))==null?i:a;return t().intersectionObserverScopeByParameter?c.createIntersectionObserver(l,e==null?{}:e):c.createIntersectionObserver(e==null?{}:e)}),S(f,`setData`,(e,t)=>{let n=m(`setData`);if(n&&typeof n.setData==`function`)return n.setData(e,t);let r=o==null?void 0:o.adapter,i=typeof(r==null?void 0:r.setData)==`function`?r.setData(e):void 0;return typeof t==`function`&&t(),i}),S(f,`setUpdatePerformanceListener`,e=>{let t=m(`setUpdatePerformanceListener`);if(t&&typeof t.setUpdatePerformanceListener==`function`)return t.setUpdatePerformanceListener(e)});let h=b(new Proxy(f,{get(e,t,n){if(Reflect.has(e,t))return Reflect.get(e,t,n);if(t===`$el`){var r;return(r=x(o,i,`setData`))==null?i:r}if(t===`renderRoot`||t===`shadowRoot`){var a;return((a=x(o,i,`setData`))==null?i:a)[t]}let s=p(t);if(s.found)return s.value;let c=i[t];return typeof c==`function`?c.bind(i):c},has(e,t){return Reflect.has(e,t)||p(t).found||t in i},set(e,t,n){return Reflect.has(e,t)?(e[t]=n,!0):(i[t]=n,!0)}}));try{Object.defineProperty(i,d,{value:h,configurable:!0,enumerable:!1,writable:!0})}catch(e){i[d]=h}return h}export{v as attachRuntimeSlots,y as createNoopWatchStopHandle,m as createSetupSlotsFallback,_ as createSetupSlotsProxy,C as ensureSetupContextInstance,o as normalizeEmitPayload,b as safeMarkNoSetData,p as setupInstanceMethodNames};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{effectScope as e}from"../../../reactivity/core.mjs";import{toRaw as t}from"../../../reactivity/reactive/shared.mjs";import{shallowReactive as n}from"../../../reactivity/reactive/shallow.mjs";import{isReactive as r}from"../../../reactivity/reactive.mjs";import{setCurrentInstance as i,setCurrentSetupContext as a}from"../../hooks/base.mjs";import{hasOwn as o}from"../../../utils.mjs";import{hasTrackableSetupBinding as s}from"../../setupTracking.mjs";import{normalizeEmitEventName as c,normalizeEmitPayload as l}from"../../emit.mjs";import{attachRuntimeSlots as u,ensureSetupContextInstance as d,safeMarkNoSetData as f}from"./setupContext.mjs";import{runSetupFunction as p}from"../setup.mjs";import{attachRuntimeSetupState as m,ensureRuntimeProps as h}from"./utils.mjs";import{WEVU_ATTRS_KEY as g,WEVU_EFFECT_SCOPE_KEY as _,WEVU_EXPOSED_KEY as v,WEVU_PROP_KEYS_KEY as y}from"@weapp-core/constants";let b=0;function x(e,t){let n=e,r={proxy:{configurable:!0,enumerable:!1,value:t,writable:!1},$:{configurable:!0,enumerable:!1,value:e,writable:!1},uid:{configurable:!0,enumerable:!1,value:++b,writable:!1},exposed:{configurable:!0,enumerable:!1,get:()=>e[v]}};for(let[e,t]of Object.entries(r))try{Object.defineProperty(n,e,t)}catch(r){`value`in t&&(n[e]=t.value)}let i={$:{configurable:!0,enumerable:!1,value:e,writable:!1},$el:{configurable:!0,enumerable:!1,value:e,writable:!1}};for(let[e,n]of Object.entries(i))try{Object.defineProperty(t,e,n)}catch(r){t[e]=n.value}}function S(e){return e.startsWith(`__wv_`)}function C(b){var C;let{target:w,runtime:T,runtimeWithDefaults:E,runtimeState:D,runtimeProxy:O,setup:k}=b,A=w.properties||{},j=h(w,D,A),M=n(Object.create(null)),N=new Set(Array.isArray(w[y])?w[y]:[]),P=e=>typeof D==`object`&&!!D&&o(D,e);(()=>{let e=w.properties&&typeof w.properties==`object`?w.properties:void 0;for(let t of Object.keys(M))(!e||!o(e,t)||S(t)||N.has(t)||P(t))&&delete M[t];if(e)for(let[t,n]of Object.entries(e))S(t)||N.has(t)||P(t)||(M[t]=n)})();try{Object.defineProperty(w,g,{value:M,configurable:!0,enumerable:!1,writable:!1})}catch(e){w[g]=M}let F=d(w,E);x(w,F);let I=u(D,j),L=(C=E.setupState)==null?Object.create(null):C;m(D,L);let R=f({props:j,runtime:E,state:D,proxy:O,bindModel:T.bindModel.bind(E),watch:T.watch.bind(E),instance:F,emit:(e,...t)=>{let{detail:n,options:r}=l(t),i=c(e);F.triggerEvent(i,n,r)},expose:e=>{w[v]=e},attrs:M,slots:I}),z=e(!0);w[_]=z,i(w),a(R);try{let e=z.run(()=>p(k,j,R)),n=!1;if(e&&typeof e==`object`){let i=T.setupState&&typeof T.setupState==`object`?r(T.setupState)?t(T.setupState):T.setupState:Object.create(null);Object.keys(e).forEach(t=>{let r=e[t];if(typeof r==`function`)T.methods[t]=(...e)=>r.apply(T.proxy,e),T.state[t]=(...e)=>r.apply(T.proxy,e),n=!0;else{if(s(r)){var a;(a=T.__wevu_trackSetupReactiveKey)==null||a.call(T,t)}T.state[t]=r,i[t]=r}})}if(n){var B;(B=T.__wevu_touchSetupMethodsVersion)==null||B.call(T)}}
|
|
1
|
+
import{effectScope as e}from"../../../reactivity/core.mjs";import{toRaw as t}from"../../../reactivity/reactive/shared.mjs";import{shallowReactive as n}from"../../../reactivity/reactive/shallow.mjs";import{isReactive as r}from"../../../reactivity/reactive.mjs";import{setCurrentInstance as i,setCurrentSetupContext as a}from"../../hooks/base.mjs";import{hasOwn as o}from"../../../utils.mjs";import{hasTrackableSetupBinding as s}from"../../setupTracking.mjs";import{normalizeEmitEventName as c,normalizeEmitPayload as l}from"../../emit.mjs";import{attachRuntimeSlots as u,ensureSetupContextInstance as d,safeMarkNoSetData as f}from"./setupContext.mjs";import{runSetupFunction as p}from"../setup.mjs";import{attachRuntimeSetupState as m,ensureRuntimeProps as h}from"./utils.mjs";import{WEVU_ATTRS_KEY as g,WEVU_EFFECT_SCOPE_KEY as _,WEVU_EXPOSED_KEY as v,WEVU_PROP_KEYS_KEY as y}from"@weapp-core/constants";let b=0;function x(e,t){let n=e,r={proxy:{configurable:!0,enumerable:!1,value:t,writable:!1},$:{configurable:!0,enumerable:!1,value:e,writable:!1},uid:{configurable:!0,enumerable:!1,value:++b,writable:!1},exposed:{configurable:!0,enumerable:!1,get:()=>e[v]}};for(let[e,t]of Object.entries(r))try{Object.defineProperty(n,e,t)}catch(r){`value`in t&&(n[e]=t.value)}let i={$:{configurable:!0,enumerable:!1,value:e,writable:!1},$el:{configurable:!0,enumerable:!1,value:e,writable:!1}};for(let[e,n]of Object.entries(i))try{Object.defineProperty(t,e,n)}catch(r){t[e]=n.value}}function S(e){return e.startsWith(`__wv_`)}function C(b){var C;let{target:w,runtime:T,runtimeWithDefaults:E,runtimeState:D,runtimeProxy:O,setup:k}=b,A=w.properties||{},j=h(w,D,A),M=n(Object.create(null)),N=new Set(Array.isArray(w[y])?w[y]:[]),P=e=>typeof D==`object`&&!!D&&o(D,e);(()=>{let e=w.properties&&typeof w.properties==`object`?w.properties:void 0;for(let t of Object.keys(M))(!e||!o(e,t)||S(t)||N.has(t)||P(t))&&delete M[t];if(e)for(let[t,n]of Object.entries(e))S(t)||N.has(t)||P(t)||(M[t]=n)})();try{Object.defineProperty(w,g,{value:M,configurable:!0,enumerable:!1,writable:!1})}catch(e){w[g]=M}let F=d(w,E);x(w,F);let I=u(D,j),L=(C=E.setupState)==null?Object.create(null):C;m(D,L);let R=f({props:j,runtime:E,state:D,proxy:O,bindModel:T.bindModel.bind(E),watch:T.watch.bind(E),instance:F,emit:(e,...t)=>{let{detail:n,options:r}=l(t),i=c(e);F.triggerEvent(i,n,r)},expose:e=>{w[v]=e},attrs:M,slots:I}),z=e(!0);w[_]=z,i(w),a(R);try{let e=z.run(()=>p(k,j,R)),n=!1;if(e&&typeof e==`object`){let i=T.setupState&&typeof T.setupState==`object`?r(T.setupState)?t(T.setupState):T.setupState:Object.create(null);Object.keys(e).forEach(t=>{let r=e[t];if(typeof r==`function`)T.methods[t]=(...e)=>r.apply(T.proxy,e),T.state[t]=(...e)=>r.apply(T.proxy,e),n=!0;else{if(s(r)){var a;(a=T.__wevu_trackSetupReactiveKey)==null||a.call(T,t)}T.state[t]=r,i[t]=r}})}if(n){var B;(B=T.__wevu_touchSetupMethodsVersion)==null||B.call(T)}}finally{a(void 0),i(void 0)}}export{C as runRuntimeSetupPhase};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{isRef as e}from"../../../reactivity/ref.mjs";function t(e){return!!e&&typeof e==`object`&&!Array.isArray(e)}function n(r,i,a){if(Array.isArray(r)&&Array.isArray(i)){r.splice(0,r.length,...i);return}if(!t(r)||!t(i))return;let o=t(a)?a:void 0;for(let e of Object.keys(o==null?{}:o))typeof(o==null?void 0:o[e])!=`function`&&typeof r[e]!=`function`&&!Object.prototype.hasOwnProperty.call(i,e)&&delete r[e];for(let[a,s]of Object.entries(i))typeof r[a]!=`function`&&(e(r[a])?r[a].value=s:t(r[a])&&t(s)||Array.isArray(r[a])&&Array.isArray(s)?n(r[a],s,o==null?void 0:o[a]):r[a]=s)}export{n as restoreReactiveSetupSnapshot};
|
|
@@ -10,17 +10,16 @@ type RuntimeSetupFunction<D extends object, C extends ComputedDefinitions, M ext
|
|
|
10
10
|
* 挂载运行时实例(框架内部注册流程使用)。
|
|
11
11
|
* @internal
|
|
12
12
|
*/
|
|
13
|
-
declare function mountRuntimeInstance<D extends object, C extends ComputedDefinitions, M extends MethodDefinitions>(target: InternalRuntimeState, runtimeApp: RuntimeApp<D, C, M>, watchMap: WatchMap | undefined, setup?: RuntimeSetupFunction<D, C, M>, options?: {
|
|
13
|
+
export declare function mountRuntimeInstance<D extends object, C extends ComputedDefinitions, M extends MethodDefinitions>(target: InternalRuntimeState, runtimeApp: RuntimeApp<D, C, M>, watchMap: WatchMap | undefined, setup?: RuntimeSetupFunction<D, C, M>, options?: {
|
|
14
14
|
deferSetData?: boolean;
|
|
15
15
|
snapshotOmitKeys?: string[];
|
|
16
16
|
}): RuntimeInstance<D, C, M>;
|
|
17
|
-
declare function setRuntimeSetDataVisibility(target: InternalRuntimeState, visible: boolean): void;
|
|
17
|
+
export declare function setRuntimeSetDataVisibility(target: InternalRuntimeState, visible: boolean): void;
|
|
18
18
|
/**
|
|
19
19
|
* 卸载运行时实例(框架内部注册流程使用)。
|
|
20
20
|
* @internal
|
|
21
21
|
*/
|
|
22
|
-
declare function teardownRuntimeInstance(target: InternalRuntimeState, options?: {
|
|
22
|
+
export declare function teardownRuntimeInstance(target: InternalRuntimeState, options?: {
|
|
23
23
|
skipHooks?: boolean;
|
|
24
24
|
}): void;
|
|
25
|
-
//#endregion
|
|
26
|
-
export { mountRuntimeInstance, setRuntimeSetDataVisibility, teardownRuntimeInstance };
|
|
25
|
+
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{isRef as e}from"../../reactivity/ref.mjs";import{callHookList as t}from"../hooks/base.mjs";import{isDeepEqualValue as n}from"../app/setData/snapshot.mjs";import{resolveRuntimePageLayoutName as r,syncRuntimePageLayoutState as i}from"../pageLayout.mjs";import{allocateOwnerId as a,attachOwnerSnapshot as o,mergeOwnerSnapshotProps as s,removeOwner as c,resolveOwnerSnapshot as l,updateOwnerSnapshot as ee}from"../scopedSlots.mjs";import{clearTemplateRefs as u,scheduleTemplateRefUpdate as d}from"../templateRefs.mjs";import{attachRuntimeSlots as te,createNoopWatchStopHandle as ne,safeMarkNoSetData as re}from"./runtimeInstance/setupContext.mjs";import{bridgeRuntimeMethodsToTarget as ie}from"./runtimeInstance/methodBridge.mjs";import{attachRuntimeProvideParentContext as ae}from"./runtimeInstance/provideContext.mjs";import{attachNativeInstanceRef as oe,attachRuntimeInstance as se,attachRuntimeRef as f,callNativeSetData as p,ensureRuntimeProps as ce,resolveNativeSetData as m}from"./runtimeInstance/utils.mjs";import{runRuntimeSetupPhase as le}from"./runtimeInstance/setupPhase.mjs";import{createSetDataHighFrequencyWarningMonitor as ue}from"./setDataFrequencyWarning.mjs";import{registerWatches as de}from"./watch.mjs";import{WEVU_EFFECT_SCOPE_KEY as h,WEVU_HOOKS_KEY as g,WEVU_PAGE_LAYOUT_NAME_KEY as _,WEVU_PAGE_LAYOUT_PROPS_KEY as v,WEVU_PAGE_LAYOUT_SETTER_KEY as y,WEVU_PAGE_SCROLL_HOOK_DEPTH_KEY as fe,WEVU_PROPS_DERIVED_KEYS_KEY as b,WEVU_PROPS_KEY as x,WEVU_PUBLIC_RUNTIME_KEY as S,WEVU_RUNTIME_OWNER_ID_KEY as C,WEVU_SLOT_OWNER_ID_KEY as w,WEVU_TEMPLATE_REFS_KEY as T,WEVU_WATCH_STOPS_KEY as E}from"@weapp-core/constants";function D(e,t=new WeakMap){if(!e||typeof e!=`object`)return e;if(t.has(e))return t.get(e);if(Array.isArray(e)){let n=[];t.set(e,n);for(let r of e)n.push(D(r,t));return n}let n={};t.set(e,n);for(let[r,i]of Object.entries(e))n[r]=D(i,t);return n}function pe(e,t,n){let r=e.data;if((!r||typeof r!=`object`)&&(!n||!Object.keys(n).length))return;let i=Array.isArray(t)&&t.length?new Set(t):void 0,a={};if(r&&typeof r==`object`)for(let[e,t]of Object.entries(r))i!=null&&i.has(e)||(a[e]=D(t));if(n)for(let[e,t]of Object.entries(n))i!=null&&i.has(e)||(a[e]=D(t));return a}function me(e){return!!(e!=null&&e.__wevuHasTemplateRuntimeBindings)}function he(e){typeof e.route==`string`&&e.route&&(e[y]=(t,n)=>{var a;let o=(a=e.__wevu)==null?void 0:a.state;if(!o||typeof o!=`object`)return;o[_]=r(t);let s=t===!1||n==null?{}:n;o[v]=s,i(e,t,s)})}function O(e,t,n,r,i){var c,u,h,g,_,v,y,C,O,k,A,j;if(e.__wevu)return e.__wevu;ae(e,t),re(e);let M=(c=e.data)==null?void 0:c[w],N=typeof M==`string`&&M?M:a(),P=typeof M==`string`&&M!==N,F=!!(t!=null&&(u=t.__wevuSetDataOptions)!=null&&u.suspendWhenHidden),I=typeof e.route==`string`&&e.route?`page:${e.route}`:typeof e.is==`string`&&e.is?`component:${e.is}`:`unknown-target`,L=ue({option:t==null||(h=t.__wevuSetDataOptions)==null?void 0:h.highFrequencyWarning,targetLabel:I,isInPageScrollHook:()=>{var t;return Number((t=e[fe])==null?0:t)>0}}),R=i!=null&&i.deferSetData?(e=>{let t,n=[],r=!1,i={setData(i,a){if(!r){var o;t={...(o=t)==null?{}:o,...i},a&&n.push(a);return}let s=m(e);if(s)return p(e,s,i,a)}};return i.__wevu_enableSetData=(i=!1)=>{r=!0,i&&(t=void 0,n=[]);let a=m(e);if(t&&Object.keys(t).length&&a){let r=t,i=n;t=void 0,n=[];let o=i.length?()=>i.forEach(e=>e()):void 0;p(e,a,r,o)}},i})(e):{setData(t,n){let r=m(e);if(r)return p(e,r,t,n)}},z,B=!0,V,ge=(e,t)=>({...e==null?{}:e,...t}),H=()=>{var t;if(!z)return;let n=l(z),r=(t=e[x])==null?e.properties:t;s(n,r),ee(N,n,z.proxy,e)},_e=()=>{if(!P)return;let t=e.data;try{t&&typeof t==`object`&&(t[w]=N)}catch(e){}let n=m(e);n&&p(e,n,{[w]:N})},U={...R,setData(t){if(L==null||L(),F&&!B){V=ge(V,t),H(),d(e);return}let n=Array.isArray(e[T])&&e[T].length>0;if(H(),n&&m(e))return new Promise(n=>{R.setData(t,()=>{H(),d(e),n()})});let r=R.setData(t);return d(e),r},__wevu_setVisibility(t){if(B=t,!B||!V)return;let n=V;V=void 0;let r=Array.isArray(e[T])&&e[T].length>0;if(H(),r&&m(e))return new Promise(t=>{R.setData(n,()=>{H(),d(e),t()})});let i=R.setData(n);return d(e),i}};Object.defineProperty(U,"__wevu_targetLabel",{configurable:!0,enumerable:!1,value:I,writable:!1});let W=e.properties;W&&typeof W==`object`&&Object.defineProperty(U,"__wevu_initialProps",{configurable:!0,enumerable:!1,value:W,writable:!1}),Array.isArray(i==null?void 0:i.snapshotOmitKeys)&&i.snapshotOmitKeys.length&&Object.defineProperty(U,"__wevu_snapshotOmitKeys",{configurable:!0,enumerable:!1,value:i.snapshotOmitKeys,writable:!1});let G=pe(e,i==null?void 0:i.snapshotOmitKeys,me(t)?void 0:{[w]:N});G&&Object.keys(G).length&&Object.defineProperty(U,"__wevu_initialSnapshot",{configurable:!0,enumerable:!1,value:G,writable:!1}),Object.defineProperty(U,"__wevu_initialState",{configurable:!0,enumerable:!1,value:{[w]:N},writable:!1}),(i!=null&&i.deferSetData||r||W&&typeof W==`object`&&Object.keys(W).length>0)&&Object.defineProperty(U,"__wevu_deferInitialSnapshot",{configurable:!0,enumerable:!1,value:!0,writable:!1});let K=t.mount(U);z=K,se(K,e);let q=(g=K==null?void 0:K.proxy)==null?{}:g,J=(_=K==null?void 0:K.state)==null?{}:_,ve=(v=K==null?void 0:K.setupState)==null?Object.create(null):v;J&&typeof J==`object`&&(f(J,K),oe(J,e));let ye=(y=K==null?void 0:K.computed)==null?Object.create(null):y;if(!(K!=null&&K.methods))try{K.methods=Object.create(null)}catch(e){}let be=(C=K==null?void 0:K.methods)==null?Object.create(null):C,xe=(O=K==null?void 0:K.watch)==null?(()=>ne()):O,Se=(k=K==null?void 0:K.bindModel)==null?(()=>{}):k,Y={...K==null?{}:K,state:J,setupState:ve,proxy:q,methods:be,computed:ye,watch:xe,bindModel:Se,snapshot:(A=K==null?void 0:K.snapshot)==null?(()=>Object.create(null)):A,unmount:(j=K==null?void 0:K.unmount)==null?(()=>{}):j};Object.defineProperty(Y,"__wevu_initialRuntimeSnapshot",{configurable:!0,enumerable:!1,value:D(J),writable:!1});let X=Y,Ce={__wevu_flushSetupSnapshotSync:K.__wevu_flushSetupSnapshotSync,__wevu_touchSetupMethodsVersion:K.__wevu_touchSetupMethodsVersion,__wevu_trackSetupReactiveKey:K.__wevu_trackSetupReactiveKey,[b]:K[b]};for(let[e,t]of Object.entries(Ce))t&&Object.defineProperty(Y,e,{configurable:!0,enumerable:!1,value:t,writable:!0});Object.defineProperty(e,S,{value:Y,configurable:!0,enumerable:!1,writable:!1}),e.__wevu=Y,he(e);let we=ce(e,J);te(J,we),o(e,Y,N,{deferSnapshot:i==null?void 0:i.deferSetData}),_e();let Z=n?de(Y,n,e,{deferMissingSourceBaseline:!!r}):[];if(Z.length&&(e[E]=Z),r){if(le({target:e,runtime:K,runtimeWithDefaults:Y,runtimeState:J,runtimeProxy:q,setup:r}),!(i!=null&&i.deferSetData)){var Q;(Q=X.__wevu_flushSetupSnapshotSync)==null||Q.call(X)}i!=null&&i.deferSetData||H();for(let e of Z)e.resume()}else if(!(i!=null&&i.deferSetData)&&e.properties&&typeof e.properties==`object`&&Object.keys(e.properties).length>0){var $;($=X.__wevu_flushSetupSnapshotSync)==null||$.call(X),H()}return ie(e,K),K}function k(e,t,n){for(let e of Reflect.ownKeys(t))if(!Reflect.has(n,e)){let n=Reflect.getOwnPropertyDescriptor(t,e);n!=null&&n.configurable&&Reflect.deleteProperty(t,e)}for(let e of Reflect.ownKeys(n)){let r=Reflect.getOwnPropertyDescriptor(n,e);if(r)try{Reflect.defineProperty(t,e,r)}catch(r){try{t[e]=n[e]}catch(e){}}}return f(t.state,t),e.__wevu=t,Object.defineProperty(e,S,{value:t,configurable:!0,enumerable:!1,writable:!1}),t}function A(t,n,r){let i=t.state,a=t.setupState,o={};for(let t of Object.keys(n==null?{}:n)){if(!Object.prototype.hasOwnProperty.call(i,t))continue;let n=a==null?void 0:a[t];if(!(a&&Object.prototype.hasOwnProperty.call(a,t)&&!e(n))){if(r&&Object.prototype.hasOwnProperty.call(r,t)){o[t]=D(r[t]);continue}o[t]=D(e(n)?n.value:i[t])}}return o}function j(t,n){let r=t.setupState;return!r||!n||typeof n!=`object`?[]:Object.keys(n).filter(t=>{let n=r[t];return Object.prototype.hasOwnProperty.call(r,t)&&!e(n)})}function M(t,r){var i;let a=t.__wevu,o=a==null?void 0:a.state,s=a==null?void 0:a.setupState,c=(i=r==null?void 0:r.nativeData)==null?t.data:i;if(!o||typeof o!=`object`||!c||typeof c!=`object`)return;let l=a==null?void 0:a.__wevu_initialRuntimeSnapshot;for(let[t,i]of Object.entries(c))if(t&&t!==`undefined`&&Object.prototype.hasOwnProperty.call(o,t))try{let a=s==null?void 0:s[t],c=D(i);if(!(r!=null&&r.includeSetupState)&&s&&Object.prototype.hasOwnProperty.call(s,t)||!(r!=null&&r.includeSetupState)&&l&&Object.prototype.hasOwnProperty.call(l,t)&&!n(o[t],l[t],20,{keys:1e4})||!(r!=null&&r.includeSetupState)&&l&&!Object.prototype.hasOwnProperty.call(l,t))continue;if(e(a)){a.value=c;continue}o[t]=c}catch(e){}}function N(e,t){var n,r,i;let a=(n=e.__wevu)==null?void 0:n.adapter;M(e,{includeSetupState:t==null?void 0:t.rehydrateSetupState}),a&&typeof a.__wevu_enableSetData==`function`&&a.__wevu_enableSetData(!0),(r=e.__wevu)==null||(i=r.__wevu_flushSetupSnapshotSync)==null||i.call(r)}function P(e,t){var n;let r=(n=e.__wevu)==null?void 0:n.adapter;r&&typeof r.__wevu_setVisibility==`function`&&r.__wevu_setVisibility(t)}function F(e,n){var r,i;let a=e.__wevu,o=(r=e[C])==null?e[w]:r;o&&c(o),u(e),!(n!=null&&n.skipHooks)&&a&&e[g]&&t(e,`onUnload`,[]),e[g]&&(e[g]=void 0);let s=e[E];if(Array.isArray(s))for(let e of s)try{e()}catch(e){}e[E]=void 0,(i=e[h])==null||i.stop(),e[h]=void 0,a&&a.unmount(),delete e.__wevu,S in e&&delete e[S]}function I(e,t,n,r,i){let a=e.__wevu,o=a?A(a,e.data,i==null?void 0:i.stateSnapshot):void 0,s=a?j(a,e.data):[];F(e,{skipHooks:!0});let c=O(e,t,n,r,{deferSetData:!0,snapshotOmitKeys:i==null?void 0:i.snapshotOmitKeys});if(o){let t=e.data;if(t&&typeof t==`object`){for(let e of s)delete t[e];Object.assign(t,D(o))}M(e,{includeSetupState:!0,nativeData:o})}return!a||a===c?c:k(e,a,c)}export{N as enableDeferredSetData,O as mountRuntimeInstance,I as refreshRuntimeInstance,P as setRuntimeSetDataVisibility,F as teardownRuntimeInstance};
|
|
1
|
+
import{effectScope as e}from"../../reactivity/core.mjs";import{isReactive as t}from"../../reactivity/reactive.mjs";import{isRef as n}from"../../reactivity/ref.mjs";import{getMiniProgramRuntimeGlobalObject as r}from"../platform.mjs";import{callHookList as i}from"../hooks/base.mjs";import{isSetDataHighFrequencyWarningRequested as a,requireRuntimeCapability as o,runtimeCapabilityRegistry as s}from"../capabilities.mjs";import{runTeardownSteps as c}from"../teardown.mjs";import{applySnapshotUpdate as l,isDeepEqualValue as u}from"../app/setData/snapshot.mjs";import{observeSetDataCompletion as d}from"../app/setData/commitTracker.mjs";import{attachRuntimeSlots as ee,createNoopWatchStopHandle as te,safeMarkNoSetData as ne}from"./runtimeInstance/setupContext.mjs";import{bridgeRuntimeMethodsToTarget as re}from"./runtimeInstance/methodBridge.mjs";import{attachRuntimeProvideParentContext as ie}from"./runtimeInstance/provideContext.mjs";import{attachNativeInstanceRef as ae,attachRuntimeInstance as oe,attachRuntimeRef as se,callNativeSetData as ce,ensureRuntimeProps as le,resolveNativeSetData as ue}from"./runtimeInstance/utils.mjs";import{runRuntimeSetupPhase as de}from"./runtimeInstance/setupPhase.mjs";import{restoreReactiveSetupSnapshot as f}from"./runtimeInstance/setupSnapshot.mjs";import{registerWatches as fe}from"./watch.mjs";import{WEAPP_VITE_STATEFUL_HMR_BRIDGE_KEY as pe,WEVU_EFFECT_SCOPE_KEY as p,WEVU_EXPOSED_KEY as m,WEVU_HOOKS_KEY as h,WEVU_HOST_COMMIT_PROMISE_KEY as g,WEVU_ON_BEFORE_UNMOUNT_HOOK as _,WEVU_PAGE_SCROLL_HOOK_DEPTH_KEY as me,WEVU_PROPS_DERIVED_KEYS_KEY as he,WEVU_PUBLIC_RUNTIME_KEY as v,WEVU_SETUP_CONTEXT_INSTANCE_KEY as ge,WEVU_SLOT_OWNER_ID_KEY as _e,WEVU_WATCH_STOPS_KEY as ve}from"@weapp-core/constants";const y=new WeakMap;function b(e,t=new WeakMap){if(!e||typeof e!=`object`)return e;if(t.has(e))return t.get(e);if(Array.isArray(e)){let n=[];t.set(e,n);for(let r of e)n.push(b(r,t));return n}let n={};t.set(e,n);for(let[r,i]of Object.entries(e))n[r]=b(i,t);return n}function ye(e,t){let n=e==null?{}:e;for(let[e,r]of Object.entries(t)){let t;for(let r of Object.keys(n))if(e.startsWith(`${r}.`)){t=r;break}if(t){let i={value:n[t]};l(i,`value.${e.slice(t.length+1)}`,r,`set`,{cloneValue:!1,clonedParents:new WeakSet}),n[t]=i.value;continue}let i=`${e}.`;for(let e of Object.keys(n))e.startsWith(i)&&delete n[e];n[e]=r}return n}function be(e,t,n){let r=e.data;if((!r||typeof r!=`object`)&&(!n||!Object.keys(n).length))return;let i=Array.isArray(t)&&t.length?new Set(t):void 0,a={};if(r&&typeof r==`object`)for(let[e,t]of Object.entries(r))i!=null&&i.has(e)||(a[e]=b(t));if(n)for(let[e,t]of Object.entries(n))i!=null&&i.has(e)||(a[e]=b(t));return a}function xe(e){return!!(e!=null&&e.__wevuHasTemplateRuntimeBindings)}function x(e,n,c,l,u){var f,p,m,h,_,ge,x,S,C;if(e.__wevu)return e.__wevu;let w=n.__wevuSetDataOptions,T=xe(n)?o(`scopedSlots`,`mountRuntimeInstance(scoped-slot bindings)`):void 0,E=T==null?void 0:T.prepareMount(e),O=e.__wevuTemplateRefs;Array.isArray(O)&&O.length&&o(`templateRefs`,`mountRuntimeInstance(template refs)`);let Se=a(w==null?void 0:w.highFrequencyWarning)?o(`setDataHighFrequencyWarning`,`mountRuntimeInstance(setData.highFrequencyWarning)`):void 0;ie(e,n),ne(e);let Ce=!!(w!=null&&w.suspendWhenHidden),we=typeof e.route==`string`&&e.route?`page:${e.route}`:typeof e.is==`string`&&e.is?`component:${e.is}`:`unknown-target`,k=Se==null?void 0:Se.createMonitor({option:w==null?void 0:w.highFrequencyWarning,targetLabel:we,isInPageScrollHook:()=>{var t;return Number((t=e[me])==null?0:t)>0}}),A=!0,j=!(u!=null&&u.deferSetData),M=!1,N=0,P,F,I,L=[],R=!(g in e),z=0,B=!1,V,H,U,W,Te=()=>{!z&&!P&&!H&&(B=!1,V=void 0)},Ee=()=>{z||P||(B?W==null||W(V):U==null||U(),H=void 0,U=void 0,W=void 0)},De=()=>{R&&(z+=1)},G=(e=`committed`,t)=>{R&&!M&&(e===`failed`&&!B&&(B=!0,V=t),--z,Ee())},Oe=e=>G(`failed`,e);R&&Object.defineProperty(e,g,{configurable:!0,enumerable:!1,get:()=>!z&&!P?B?Promise.reject(V):void 0:(H!=null||(H=new Promise((e,t)=>{U=e,W=t})),H)});let K=()=>{if(E){var t;(t=s.scopedSlots)==null||t.refresh(e,E)}},ke=()=>{if(M)return;let t=e.__wevuTemplateRefs;if(!s.templateRefs&&(!Array.isArray(t)||!t.length)){R&&G();return}o(`templateRefs`,`mountRuntimeInstance(template ref completion)`).schedule(e,R?G:void 0,e,R?Oe:void 0)},Ae=()=>{E&&(T==null||T.syncNativeOwnerId(e,E))},je=e=>{let t={settle:e,next:void 0};I?I.next=t:F=t,I=t},Me=(e,t,n)=>{let r=e,i=!0;for(;r;){let e=r.next;r.next=void 0,t===`failed`&&!i?r.settle(`abandoned`):r.settle(t,n),r=e,i=!1}},Ne=(t,n)=>{let r=N;De(),K(),d({invoke:n=>{let r=ue(e);if(!r){n();return}return ce(e,r,t,n)},completion:`callback`,settle:(e,t)=>{if(!(M||r!==N)){if(e!==`committed`){G(e,t),n(e,t);return}try{n(e,t)}catch(e){throw G(`failed`,e),e}ke()}}})},Pe=()=>{if(!P)return;let e=P,t=F,n=L;P=void 0,F=void 0,I=void 0,L=[],Ne(e,(e,r)=>{if(e===`committed`){try{for(let e of n)e()}finally{Me(t,e,r)}return}Me(t,e,r)})},Fe=()=>{let e=F;P=void 0,F=void 0,I=void 0,L=[],Me(e,`abandoned`),Ee()},Ie=e=>{Te(),P=ye(P,e)},q={setData(t,n){if(k==null||k(),!j||Ce&&!A){Ie(t),n&&L.push(n),K();return}K(),Te(),De();let r=ue(e);if(!r){try{n==null||n()}catch(e){throw G(`failed`,e),e}ke();return}let i=!0,a=!1,o=!1,s=!1,c=e=>{s||(s=!0,G(`failed`,e))},l=()=>{s||(s=!0,ke())},u=()=>{try{n==null||n()}catch(e){throw c(e),e}if(i){a=!0;return}o||l()},d;try{d=ce(e,r,t,u)}catch(e){throw c(e),e}return i=!1,o=!!(d&&typeof d.then==`function`),d&&typeof d.then==`function`?d.then(()=>{l()},e=>{throw c(e),e}):(a&&l(),d)},__wevu_dispatchSetData(e,t){if(k==null||k(),M){t(`abandoned`);return}if(!j||Ce&&!A){Ie(e),je(t),K();return}Te(),Ne(e,t)},__wevu_enableSetData(e=!1){if(j=!0,e){Fe();return}Pe()},__wevu_setVisibility(e){A=e,A&&j&&Pe()},__wevu_disposeSetData(){M||(M=!0,N+=1,P=void 0,F=void 0,I=void 0,L=[],z=0,B=!1,V=void 0,Ee(),R&&Reflect.deleteProperty(e,g))}};Object.defineProperty(q,"__wevu_reportSetDataError",{configurable:!0,enumerable:!1,value:t=>{i(e,`onError`,[t])},writable:!1}),Object.defineProperty(q,"__wevu_targetLabel",{configurable:!0,enumerable:!1,value:we,writable:!1});let J=e.properties;J&&typeof J==`object`&&Object.defineProperty(q,"__wevu_initialProps",{configurable:!0,enumerable:!1,value:J,writable:!1}),Array.isArray(u==null?void 0:u.snapshotOmitKeys)&&u.snapshotOmitKeys.length&&Object.defineProperty(q,"__wevu_snapshotOmitKeys",{configurable:!0,enumerable:!1,value:u.snapshotOmitKeys,writable:!1});let Le=be(e,u==null?void 0:u.snapshotOmitKeys);Le&&Object.keys(Le).length&&Object.defineProperty(q,"__wevu_initialSnapshot",{configurable:!0,enumerable:!1,value:Le,writable:!1}),E&&Object.defineProperty(q,"__wevu_initialState",{configurable:!0,enumerable:!1,value:{[_e]:E.ownerId},writable:!1}),(u!=null&&u.deferSetData||l||J&&typeof J==`object`&&Object.keys(J).length>0)&&Object.defineProperty(q,"__wevu_deferInitialSnapshot",{configurable:!0,enumerable:!1,value:!0,writable:!1});let Y=n.mount(q);oe(Y,e);let Re=(f=Y==null?void 0:Y.proxy)==null?{}:f,X=(p=Y==null?void 0:Y.state)==null?{}:p,ze=(m=Y==null?void 0:Y.setupState)==null?Object.create(null):m;X&&typeof X==`object`&&(se(X,Y),ae(X,e));let Be=(h=Y==null?void 0:Y.computed)==null?Object.create(null):h;if(!(Y!=null&&Y.methods))try{Y.methods=Object.create(null)}catch(e){}let Ve=(_=Y==null?void 0:Y.methods)==null?Object.create(null):_,He=(ge=Y==null?void 0:Y.watch)==null?(()=>te()):ge,Ue=(x=Y==null?void 0:Y.bindModel)==null?(()=>{}):x,Z={...Y==null?{}:Y,state:X,setupState:ze,proxy:Re,methods:Ve,computed:Be,watch:He,bindModel:Ue,snapshot:(S=Y==null?void 0:Y.snapshot)==null?(()=>Object.create(null)):S,unmount:(C=Y==null?void 0:Y.unmount)==null?(()=>{}):C};Object.defineProperty(Z,"__wevu_initialRuntimeSnapshot",{configurable:!0,enumerable:!1,value:b(X),writable:!1});let Q=Z,We={__wevu_flushSetupSnapshotSync:Y.__wevu_flushSetupSnapshotSync,__wevu_touchSetupMethodsVersion:Y.__wevu_touchSetupMethodsVersion,__wevu_trackSetupReactiveKey:Y.__wevu_trackSetupReactiveKey,__wevu_cloneDispatchedSnapshot:Y.__wevu_cloneDispatchedSnapshot,[he]:Y[he]};for(let[e,t]of Object.entries(We))t&&Object.defineProperty(Z,e,{configurable:!0,enumerable:!1,value:t,writable:!0});Object.defineProperty(e,v,{value:Z,configurable:!0,enumerable:!1,writable:!1}),e.__wevu=Z;let Ge=le(e,X);ee(X,Ge),E&&(T==null||T.attachMount(e,Z,E,!!(u!=null&&u.deferSetData))),Ae();let Ke=c?fe(Z,c,e,{deferMissingSourceBaseline:!!l}):[];if(Ke.length&&(e[ve]=Ke),l)try{var $;if(de({target:e,runtime:Y,runtimeWithDefaults:Z,runtimeState:X,runtimeProxy:Re,setup:l}),typeof(($=r())==null||($=$[pe])==null?void 0:$.trackWevuComponent)==`function`){var qe;let e={};for(let[n,r]of Object.entries((qe=Z.setupState)==null?{}:qe))t(r)&&(e[n]=b(r));y.set(Z,e)}if(!(u!=null&&u.deferSetData)){var Je;(Je=Q.__wevu_flushSetupSnapshotSync)==null||Je.call(Q)}u!=null&&u.deferSetData||K();for(let e of Ke)e.resume()}catch(t){try{D(e,{skipHooks:!0})}catch(e){}throw t}else if(!(u!=null&&u.deferSetData)&&e.properties&&typeof e.properties==`object`&&Object.keys(e.properties).length>0){var Ye;(Ye=Q.__wevu_flushSetupSnapshotSync)==null||Ye.call(Q),K()}return re(e,Y),Y}function S(e,t,n){for(let e of Reflect.ownKeys(t))if(!Reflect.has(n,e)){let n=Reflect.getOwnPropertyDescriptor(t,e);n!=null&&n.configurable&&Reflect.deleteProperty(t,e)}for(let e of Reflect.ownKeys(n)){let r=Reflect.getOwnPropertyDescriptor(n,e);if(r)try{Reflect.defineProperty(t,e,r)}catch(r){try{t[e]=n[e]}catch(e){}}}se(t.state,t);let r=y.get(n);return r&&y.set(t,r),e.__wevu=t,Object.defineProperty(e,v,{value:t,configurable:!0,enumerable:!1,writable:!1}),t}function C(e,r,i){let a=e.state,o=e.setupState,s={};for(let e of Object.keys(r==null?{}:r)){if(!Object.prototype.hasOwnProperty.call(a,e))continue;let r=o==null?void 0:o[e];if(!o||!Object.prototype.hasOwnProperty.call(o,e)||n(r)||t(r)){if(i&&Object.prototype.hasOwnProperty.call(i,e)){s[e]=b(i[e]);continue}s[e]=b(n(r)?r.value:a[e])}}return s}function w(e,r){var i;let a=e.__wevu,o=a==null?void 0:a.state,s=a==null?void 0:a.setupState,c=(i=r==null?void 0:r.nativeData)==null?e.data:i;if(!o||typeof o!=`object`||!c||typeof c!=`object`)return;let l=a==null?void 0:a.__wevu_initialRuntimeSnapshot;for(let[e,i]of Object.entries(c))if(e&&e!==`undefined`&&Object.prototype.hasOwnProperty.call(o,e))try{let a=s==null?void 0:s[e],c=b(i);if(s&&Object.prototype.hasOwnProperty.call(s,e)&&(!(r!=null&&r.includeSetupState)||!n(a)&&!t(a))||!(r!=null&&r.includeSetupState)&&l&&Object.prototype.hasOwnProperty.call(l,e)&&!u(o[e],l[e],20,{keys:1e4})||!(r!=null&&r.includeSetupState)&&l&&!Object.prototype.hasOwnProperty.call(l,e))continue;if(n(a)){a.value=c;continue}if(t(a)&&c&&typeof c==`object`){var d;f(a,c,r==null||(d=r.initialSetupState)==null?void 0:d[e]);continue}o[e]=c}catch(e){}}function T(e,t){var n,r,i,a;let o=(n=e.__wevu)==null?void 0:n.adapter;w(e,{includeSetupState:t==null?void 0:t.rehydrateSetupState}),o==null||(r=o.__wevu_enableSetData)==null||r.call(o,!0),(i=e.__wevu)==null||(a=i.__wevu_flushSetupSnapshotSync)==null||a.call(i)}function E(e,t){var n,r;let i=(n=e.__wevu)==null?void 0:n.adapter;i==null||(r=i.__wevu_setVisibility)==null||r.call(i,t)}function D(t,n){let r=t.__wevu,a=t[ve],l=t[p];c([()=>{var a;if(!(n!=null&&n.skipHooks)&&r&&(a=t[h])!=null&&a[_]){if(l!=null&&l.active)l.run(()=>i(t,_));else{let n=e(!0);c([()=>n.run(()=>i(t,_)),()=>n.stop()])}}},()=>{var e;return(e=s.scopedSlots)==null?void 0:e.teardown(t)},()=>{Array.isArray(t.__wevuTemplateRefs)&&t.__wevuTemplateRefs.length>0&&o(`templateRefs`,`teardownRuntimeInstance(template refs)`).clear(t)},()=>{!(n!=null&&n.skipHooks)&&r&&t[h]&&i(t,`onUnload`,[])},()=>{t[h]&&(t[h]=void 0)},()=>{if(Array.isArray(a))for(let e of a)try{e()}catch(e){}},()=>{t[ve]=void 0},()=>{l==null||l.stop()},()=>{t[p]=void 0},()=>r==null?void 0:r.unmount(),()=>{var e;let t=r==null?void 0:r.adapter;t==null||(e=t.__wevu_disposeSetData)==null||e.call(t)},()=>{delete t[ge],delete t[m]},()=>{delete t.__wevu},()=>{v in t&&delete t[v]}])}function O(e,t,n,r,i){let a=e.__wevu,o=a?y.get(a):void 0,s=a?C(a,e.data,i==null?void 0:i.stateSnapshot):void 0;D(e,{skipHooks:!0});let c=x(e,t,n,r,{deferSetData:!0,snapshotOmitKeys:i==null?void 0:i.snapshotOmitKeys}),l=s==null?i!=null&&i.stateSnapshot?C(c,i.stateSnapshot,i.stateSnapshot):void 0:s;if(l){let t=e.data;t&&typeof t==`object`&&Object.assign(t,b(l)),w(e,{includeSetupState:!0,nativeData:l,initialSetupState:o})}return!a||a===c?c:S(e,a,c)}export{T as enableDeferredSetData,x as mountRuntimeInstance,O as refreshRuntimeInstance,E as setRuntimeSetDataVisibility,D as teardownRuntimeInstance};
|
|
@@ -6,6 +6,5 @@ type SetupRunner = {
|
|
|
6
6
|
* 执行 setup 函数并注入运行时上下文(框架内部使用)。
|
|
7
7
|
* @internal
|
|
8
8
|
*/
|
|
9
|
-
declare function runSetupFunction(setup: SetupRunner | undefined, props: Record<string, any>, context: any): unknown;
|
|
10
|
-
//#endregion
|
|
11
|
-
export { runSetupFunction };
|
|
9
|
+
export declare function runSetupFunction(setup: SetupRunner | undefined, props: Record<string, any>, context: any): unknown;
|
|
10
|
+
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{getScopedSlotMountState as e,runtimeCapabilityRegistry as t}from"../capabilities.mjs";function n(n){let r=e(n);if(r){var i;(i=t.scopedSlots)==null||i.refresh(n,r)}}export{n as refreshOwnerSnapshotFromInstance};
|
|
@@ -2,11 +2,10 @@ import "../../reactivity/index.mjs";
|
|
|
2
2
|
import "../types.mjs";
|
|
3
3
|
//#region src/runtime/register/watch.d.ts
|
|
4
4
|
type WatchHandler = (this: any, value: any, oldValue: any) => void;
|
|
5
|
-
type WatchDescriptor = WatchHandler | string | {
|
|
5
|
+
export type WatchDescriptor = WatchHandler | string | {
|
|
6
6
|
handler: WatchHandler | string;
|
|
7
7
|
immediate?: boolean;
|
|
8
8
|
deep?: boolean;
|
|
9
9
|
};
|
|
10
|
-
type WatchMap = Record<string, WatchDescriptor>;
|
|
11
|
-
//#endregion
|
|
12
|
-
export { WatchDescriptor, WatchMap };
|
|
10
|
+
export type WatchMap = Record<string, WatchDescriptor>;
|
|
11
|
+
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{getScopedSlotHostGlobalObject as e}from"./platform.mjs";import{isDeepEqualValue as t}from"./app/setData/snapshot.mjs";import{WEVU_PROPS_KEY as n,WEVU_RUNTIME_OWNER_ID_KEY as r,WEVU_SCOPED_SLOT_OWNER_SEED_KEY as i,WEVU_SCOPED_SLOT_OWNER_STORE_KEY as a,WEVU_SLOT_OWNER_ID_KEY as o,WEVU_SLOT_OWNER_ID_PROP as s,WEVU_SLOT_OWNER_KEY as c,WEVU_SLOT_OWNER_PROXY_KEY as l,WEVU_SLOT_PROPS_DATA_KEY as u,WEVU_SLOT_PROPS_KEY as d,WEVU_SLOT_SCOPE_KEY as f}from"@weapp-core/constants";function p(){var t;let n=(t=e())==null?Object.create(null):t;return n[a]instanceof Map||(n[a]=new Map),typeof n[i]!=`number`&&(n[i]=0),{globalObject:n,ownerStore:n[a]}}function m(){let{globalObject:e}=p();return e[i]+=1,`wv${e[i]}`}function h(e,n,r,i){var a;let{ownerStore:o}=p(),s=(a=o.get(e))==null?{snapshot:{},proxy:r,subscribers:new Set}:a,c=!t(s.snapshot,n,20,{keys:1e4}),l=s.proxy!==r;if(s.snapshot=n,s.proxy=r,s.target=i==null?s.target:i,o.set(e,s),(c||l)&&s.subscribers.size)for(let e of s.subscribers)try{e(n,r)}catch(e){}}function g(e){let{ownerStore:t}=p();t.delete(e)}function _(e,t){var n;let{ownerStore:r}=p(),i=(n=r.get(e))==null?{snapshot:{},proxy:void 0,subscribers:new Set}:n;return i.subscribers.add(t),r.set(e,i),()=>{let n=r.get(e);n&&n.subscribers.delete(t)}}function v(e){var t;let{ownerStore:n}=p();return(t=n.get(e))==null?void 0:t.proxy}function y(e){var t;let{ownerStore:n}=p();return(t=n.get(e))==null?void 0:t.snapshot}function b(e){var t;let{ownerStore:n}=p();return(t=n.get(e))==null?void 0:t.target}function x(e){let t=e.
|
|
1
|
+
import{getScopedSlotHostGlobalObject as e}from"./platform.mjs";import{isDeepEqualValue as t}from"./app/setData/snapshot.mjs";import{WEVU_PROPS_KEY as n,WEVU_RUNTIME_OWNER_ID_KEY as r,WEVU_SCOPED_SLOT_OWNER_SEED_KEY as i,WEVU_SCOPED_SLOT_OWNER_STORE_KEY as a,WEVU_SLOT_OWNER_ID_KEY as o,WEVU_SLOT_OWNER_ID_PROP as s,WEVU_SLOT_OWNER_KEY as c,WEVU_SLOT_OWNER_PROXY_KEY as l,WEVU_SLOT_PROPS_DATA_KEY as u,WEVU_SLOT_PROPS_KEY as d,WEVU_SLOT_SCOPE_KEY as f}from"@weapp-core/constants";function p(){var t;let n=(t=e())==null?Object.create(null):t;return n[a]instanceof Map||(n[a]=new Map),typeof n[i]!=`number`&&(n[i]=0),{globalObject:n,ownerStore:n[a]}}function m(){let{globalObject:e}=p();return e[i]+=1,`wv${e[i]}`}function h(e,n,r,i){var a;let{ownerStore:o}=p(),s=(a=o.get(e))==null?{snapshot:{},proxy:r,subscribers:new Set}:a,c=!t(s.snapshot,n,20,{keys:1e4}),l=s.proxy!==r;if(s.snapshot=n,s.proxy=r,s.target=i==null?s.target:i,o.set(e,s),(c||l)&&s.subscribers.size)for(let e of s.subscribers)try{e(n,r)}catch(e){}}function g(e){let{ownerStore:t}=p();t.delete(e)}function _(e,t){var n;let{ownerStore:r}=p(),i=(n=r.get(e))==null?{snapshot:{},proxy:void 0,subscribers:new Set}:n;return i.subscribers.add(t),r.set(e,i),()=>{let n=r.get(e);n&&n.subscribers.delete(t)}}function v(e){var t;let{ownerStore:n}=p();return(t=n.get(e))==null?void 0:t.proxy}function y(e){var t;let{ownerStore:n}=p();return(t=n.get(e))==null?void 0:t.snapshot}function b(e){var t;let{ownerStore:n}=p();return(t=n.get(e))==null?void 0:t.target}function x(e){let t=e.__wevu_cloneDispatchedSnapshot;return typeof t==`function`?t():typeof e.snapshot==`function`?e.snapshot():{}}const S=new Set([o,s,c,l,u,d,f]);function C(e,t){if(t&&typeof t==`object`)for(let[n,r]of Object.entries(t))S.has(n)||(e[n]=r)}function w(e,t,i,a){var s;try{e[r]=i}catch(e){}try{t.state[o]=i}catch(e){}try{e[o]=i}catch(e){}try{let t=e.data;t&&typeof t==`object`&&(t[o]=i)}catch(e){}let c=a!=null&&a.deferSnapshot?{}:x(t);C(c,(s=e[n])==null?e.properties:s),h(i,c,t.proxy,e)}export{m as allocateOwnerId,w as attachOwnerSnapshot,v as getOwnerProxy,y as getOwnerSnapshot,b as getOwnerTarget,C as mergeOwnerSnapshotProps,g as removeOwner,x as resolveOwnerSnapshot,_ as subscribeOwner,h as updateOwnerSnapshot};
|
|
@@ -2,53 +2,52 @@ import { HostMiniProgramBoundingClientRectResult, HostMiniProgramNodesRefFields,
|
|
|
2
2
|
import { InternalRuntimeState } from "./types/runtime.mjs";
|
|
3
3
|
import "./types.mjs";
|
|
4
4
|
//#region src/runtime/selectorQuery.d.ts
|
|
5
|
-
interface UseSelectorQueryOptions {
|
|
5
|
+
export interface UseSelectorQueryOptions {
|
|
6
6
|
context?: InternalRuntimeState | null;
|
|
7
7
|
}
|
|
8
|
-
interface UseBoundingClientRectOptions extends UseSelectorQueryOptions {
|
|
8
|
+
export interface UseBoundingClientRectOptions extends UseSelectorQueryOptions {
|
|
9
9
|
all?: boolean;
|
|
10
10
|
}
|
|
11
|
-
interface UseSelectorFieldsOptions extends UseSelectorQueryOptions {
|
|
11
|
+
export interface UseSelectorFieldsOptions extends UseSelectorQueryOptions {
|
|
12
12
|
all?: boolean;
|
|
13
13
|
fields: HostMiniProgramNodesRefFields;
|
|
14
14
|
}
|
|
15
|
-
interface UseScrollOffsetOptions extends UseSelectorQueryOptions {
|
|
15
|
+
export interface UseScrollOffsetOptions extends UseSelectorQueryOptions {
|
|
16
16
|
all?: boolean;
|
|
17
17
|
}
|
|
18
|
-
interface UseAllBoundingClientRectOptions extends UseSelectorQueryOptions {
|
|
18
|
+
export interface UseAllBoundingClientRectOptions extends UseSelectorQueryOptions {
|
|
19
19
|
all: true;
|
|
20
20
|
}
|
|
21
|
-
interface UseAllSelectorFieldsOptions extends UseSelectorQueryOptions {
|
|
21
|
+
export interface UseAllSelectorFieldsOptions extends UseSelectorQueryOptions {
|
|
22
22
|
all: true;
|
|
23
23
|
fields: HostMiniProgramNodesRefFields;
|
|
24
24
|
}
|
|
25
|
-
interface UseAllScrollOffsetOptions extends UseSelectorQueryOptions {
|
|
25
|
+
export interface UseAllScrollOffsetOptions extends UseSelectorQueryOptions {
|
|
26
26
|
all: true;
|
|
27
27
|
}
|
|
28
28
|
/**
|
|
29
29
|
* 创建绑定当前小程序实例的选择器查询工厂。
|
|
30
30
|
*/
|
|
31
|
-
declare function useSelectorQuery(options?: UseSelectorQueryOptions): () => HostMiniProgramSelectorQuery | null;
|
|
31
|
+
export declare function useSelectorQuery(options?: UseSelectorQueryOptions): () => HostMiniProgramSelectorQuery | null;
|
|
32
32
|
/**
|
|
33
33
|
* 创建绑定当前小程序实例的节点布局查询函数。
|
|
34
34
|
*/
|
|
35
|
-
declare function useBoundingClientRect(options?: UseBoundingClientRectOptions & {
|
|
35
|
+
export declare function useBoundingClientRect(options?: UseBoundingClientRectOptions & {
|
|
36
36
|
all?: false;
|
|
37
37
|
}): (selector: string) => Promise<HostMiniProgramBoundingClientRectResult | null>;
|
|
38
|
-
declare function useBoundingClientRect(options: UseAllBoundingClientRectOptions): (selector: string) => Promise<HostMiniProgramBoundingClientRectResult[] | null>;
|
|
38
|
+
export declare function useBoundingClientRect(options: UseAllBoundingClientRectOptions): (selector: string) => Promise<HostMiniProgramBoundingClientRectResult[] | null>;
|
|
39
39
|
/**
|
|
40
40
|
* 创建绑定当前小程序实例的节点字段查询函数。
|
|
41
41
|
*/
|
|
42
|
-
declare function useSelectorFields(options: UseSelectorFieldsOptions & {
|
|
42
|
+
export declare function useSelectorFields(options: UseSelectorFieldsOptions & {
|
|
43
43
|
all?: false;
|
|
44
44
|
}): (selector: string) => Promise<Record<string, any> | null>;
|
|
45
|
-
declare function useSelectorFields(options: UseAllSelectorFieldsOptions): (selector: string) => Promise<Array<Record<string, any>> | null>;
|
|
45
|
+
export declare function useSelectorFields(options: UseAllSelectorFieldsOptions): (selector: string) => Promise<Array<Record<string, any>> | null>;
|
|
46
46
|
/**
|
|
47
47
|
* 创建绑定当前小程序实例的滚动位置查询函数。
|
|
48
48
|
*/
|
|
49
|
-
declare function useScrollOffset(options?: UseScrollOffsetOptions & {
|
|
49
|
+
export declare function useScrollOffset(options?: UseScrollOffsetOptions & {
|
|
50
50
|
all?: false;
|
|
51
51
|
}): (selector: string) => Promise<HostMiniProgramScrollOffsetResult | null>;
|
|
52
|
-
declare function useScrollOffset(options: UseAllScrollOffsetOptions): (selector: string) => Promise<HostMiniProgramScrollOffsetResult[] | null>;
|
|
53
|
-
//#endregion
|
|
54
|
-
export { UseAllBoundingClientRectOptions, UseAllScrollOffsetOptions, UseAllSelectorFieldsOptions, UseBoundingClientRectOptions, UseScrollOffsetOptions, UseSelectorFieldsOptions, UseSelectorQueryOptions, useBoundingClientRect, useScrollOffset, useSelectorFields, useSelectorQuery };
|
|
52
|
+
export declare function useScrollOffset(options: UseAllScrollOffsetOptions): (selector: string) => Promise<HostMiniProgramScrollOffsetResult[] | null>;
|
|
53
|
+
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{getCurrentInstance as e,getCurrentSetupContext as t}from"./hooks/base.mjs";import{createSelectorQuery as n}from"./templateRefs/helpers.mjs";function
|
|
1
|
+
import{getCurrentInstance as e,getCurrentSetupContext as t}from"./hooks/base.mjs";import{createSelectorQuery as n}from"./templateRefs/helpers.mjs";import{installTemplateRefs as r}from"./features/templateRefs.mjs";function i(n,r){let i=r==null?e():r;if(!i||!t())throw Error(`${n}() 必须在 setup() 的同步阶段调用`);return i}function a(e,t,r,i){let a=n(e);return!a||!t?Promise.resolve(null):(i(r?a.selectAll(t):a.select(t)),new Promise(e=>{a.exec(t=>{let n=Array.isArray(t)?t[0]:null;e(n==null?null:n)})}))}function o(e={}){r();let t=i(`useSelectorQuery`,e.context);return()=>n(t)}function s(e={}){var t;r();let n=i(`useBoundingClientRect`,e.context),o=(t=e.all)!=null&&t;return e=>a(n,e,o,e=>e.boundingClientRect())}function c(e){var t;r();let n=i(`useSelectorFields`,e.context),o=(t=e.all)!=null&&t;return t=>a(n,t,o,t=>t.fields(e.fields))}function l(e={}){var t;r();let n=i(`useScrollOffset`,e.context),o=(t=e.all)!=null&&t;return e=>a(n,e,o,e=>e.scrollOffset())}export{s as useBoundingClientRect,l as useScrollOffset,c as useSelectorFields,o as useSelectorQuery};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function e(e){let t,n=!1;for(let r of e)try{r()}catch(e){n||(t=e,n=!0)}if(n)throw t}export{e as runTeardownSteps};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
//#region src/runtime/template.d.ts
|
|
2
|
-
declare function normalizeStyle(value: any): string;
|
|
3
|
-
declare function normalizeClass(value: any): string;
|
|
4
|
-
declare function resolvePropValue(target: any, key: string, fallback: any, preferProps?: boolean): any;
|
|
5
|
-
//#endregion
|
|
6
|
-
export { normalizeClass, normalizeStyle, resolvePropValue };
|
|
2
|
+
export declare function normalizeStyle(value: any): string;
|
|
3
|
+
export declare function normalizeClass(value: any): string;
|
|
4
|
+
export declare function resolvePropValue(target: any, key: string, fallback: any, preferProps?: boolean): any;
|
|
5
|
+
//#endregion
|
|
@@ -1,7 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AlipayIntrinsicElements } from "../alipayIntrinsicElements.mjs";
|
|
2
|
+
import { TtIntrinsicElements } from "../ttIntrinsicElements.mjs";
|
|
3
|
+
import { WeappIntrinsicElements } from "../weappIntrinsicElements.mjs";
|
|
2
4
|
import { TemplateRefValue } from "./types.mjs";
|
|
3
5
|
//#region src/runtime/templateRefTypes.d.ts
|
|
4
|
-
type
|
|
6
|
+
type MiniProgramTemplateRefTagName = keyof AlipayIntrinsicElements | keyof TtIntrinsicElements | keyof WeappIntrinsicElements;
|
|
7
|
+
type MiniProgramTemplateRefElements = { [K in MiniProgramTemplateRefTagName]: TemplateRefValue; };
|
|
5
8
|
declare global {
|
|
6
9
|
interface HTMLElementTagNameMap extends MiniProgramTemplateRefElements {}
|
|
7
|
-
}
|
|
10
|
+
}
|
|
11
|
+
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{nextTick as e}from"../scheduler.mjs";import{markNoSetData as t}from"./noSetData.mjs";import{buildTemplateRefValue as n,createSelectorQuery as r,ensureRefsContainer as i,getTemplateRefMap as a,isComponentRef as o,resolveComponentRefValue as s,resolveTemplateRefTarget as c,updateTemplateRefMapValue as l}from"./templateRefs/helpers.mjs";import{
|
|
1
|
+
import{nextTick as e}from"../scheduler.mjs";import{markNoSetData as t}from"./noSetData.mjs";import{buildTemplateRefValue as n,createSelectorQuery as r,ensureRefsContainer as i,getTemplateRefMap as a,isComponentRef as o,resolveComponentRefValue as s,resolveTemplateRefTarget as c,updateTemplateRefMapValue as l}from"./templateRefs/helpers.mjs";import{runTeardownSteps as u}from"./teardown.mjs";import{WEVU_READY_CALLED_KEY as d,WEVU_TEMPLATE_REFS_KEY as f,WEVU_TEMPLATE_REFS_PENDING_KEY as p}from"@weapp-core/constants";const m=new WeakMap;function h(e){let t=m.get(e);return t||(t={generation:0},m.set(e,t)),t}function g(e,t){let n=h(e),r=h(t),i={target:e,assignmentTarget:t,runtime:e.__wevu,assignmentRuntime:t.__wevu,owner:n,assignmentOwner:r,assignmentGeneration:r.generation,completions:[],settled:!1};return n.current=i,i}function _(e){return!e.settled&&e.owner.current===e&&e.target.__wevu===e.runtime&&e.assignmentTarget.__wevu===e.assignmentRuntime&&e.assignmentOwner.generation===e.assignmentGeneration}function v(e,t=!1,n){if(e.settled)return;e.settled=!0,e.owner.current===e&&(e.owner.current=void 0);let r=t&&!e.completions.length,i=n;for(let o of e.completions)try{if(t)o.onRejected?o.onRejected(n):r||(r=!0,i=n);else{var a;(a=o.onResolved)==null||a.call(o)}}catch(e){r||(r=!0,i=e)}if(e.completions.length=0,r)throw i}function y(e){let{target:u,assignmentTarget:p}=e;try{let m=u[f];if(!_(e)||!(m!=null&&m.length)||!u[d]||!u.__wevu){v(e);return}let h=a(p),g=m.filter(e=>!o(e)),y=m.filter(e=>o(e)).map(e=>({binding:e,value:s(u,e)})),b=n=>{var r,a;if(!_(e))return;let o=i(p),s=new Map,d=new Set,f=(r=(a=e.runtime)==null?void 0:a.proxy)==null?u:r;for(let{binding:t,value:r}of n){if(!_(e))return;let n=c(p,t,u);if(!_(e))return;if(n.type===`function`){if(t.inFor&&Array.isArray(r)&&r.length)for(let t of r){if(!_(e))return;n.fn.call(f,t)}else n.fn.call(f,t.inFor&&Array.isArray(r)||r==null?null:r);continue}if(n.type===`ref`){n.ref.value=r;continue}if(n.type===`name`){var m;d.add(n.name);let e=(m=s.get(n.name))==null?{values:[],count:0,hasFor:!1}:m;e.count+=1,e.hasFor=e.hasFor||t.inFor,t.inFor?Array.isArray(r)&&e.values.push(...r):r!=null&&e.values.push(r),s.set(n.name,e)}}for(let[n,r]of s){if(!_(e))return;let i;if(i=r.values.length?r.hasFor||r.values.length>1||r.count>1?t(r.values):r.values[0]:r.hasFor?t([]):null,o[n]=i,!_(e))return;l(h,n,i)}for(let t of Object.keys(o)){if(!_(e))return;d.has(t)||delete o[t]}},x=g.length?r(u):null;if(!x){b(y),v(e);return}for(let e of g)(e.inFor?x.selectAll(e.selector):x.select(e.selector)).boundingClientRect();x.exec(t=>{if(!e.settled){try{if(_(e)){let e=g.map((e,r)=>({binding:e,value:n(u,e,Array.isArray(t)?t[r]:null)}));b([...y,...e])}}catch(t){v(e,!0,t);return}v(e)}})}catch(t){if(e.settled)throw t;v(e,!0,t)}}function b(e,t){let n=m.get(e);n&&(n.current=void 0),t==null||t()}function x(t,n,r=t,i){let a=t[f];if(!(a!=null&&a.length)){b(t,n);return}let o=h(t),s=o.pending;if(s&&s.assignmentTarget===r&&_(s)){(n||i)&&s.completions.push({onResolved:n,onRejected:i});return}let c=g(t,r);(n||i)&&c.completions.push({onResolved:n,onRejected:i}),o.pending=c,t[p]=!0,e(()=>{o.pending===c&&(o.pending=void 0,t[p]=!1),y(c)})}function S(e,n=e){var r,o;let s=m.get(e);s&&(s.generation+=1,s.current=void 0,s.pending=void 0,e[p]=!1);let d=e[f];if(!d||!d.length)return;let h=i(n),g=(r=(o=e.__wevu)==null?void 0:o.proxy)==null?e:r,_=new Set,v=a(n);u([...d.map(r=>()=>{let i=c(n,r,e),a=r.inFor?t([]):null;if(i.type===`function`){i.fn.call(g,null);return}if(i.type===`ref`){i.ref.value=a;return}i.type===`name`&&(_.add(i.name),h[i.name]=a,l(v,i.name,a))}),()=>{for(let e of Object.keys(h))_.has(e)||delete h[e]}])}export{S as clearTemplateRefs,x as scheduleTemplateRefUpdate};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { ComputedGetter, WritableComputedOptions } from "../../reactivity/computed.mjs";
|
|
2
2
|
import "../../reactivity/index.mjs";
|
|
3
3
|
//#region src/runtime/types/core.d.ts
|
|
4
|
-
type ComputedDefinitions = Record<string, ComputedGetter<any> | WritableComputedOptions<any>>;
|
|
5
|
-
type MethodDefinitions = Record<string, (...args: any[]) => any>;
|
|
6
|
-
type ExtractComputed<C extends ComputedDefinitions> = { [K in keyof C]: C[K] extends ComputedGetter<infer R> ? R : C[K] extends WritableComputedOptions<infer R> ? R : never; };
|
|
7
|
-
type ExtractMethods<M extends MethodDefinitions> = { [K in keyof M]: M[K] extends ((...args: infer P) => infer R) ? (...args: P) => R : never; };
|
|
8
|
-
type ComponentPublicInstance<D extends object = Record<string, any>, C extends ComputedDefinitions = ComputedDefinitions, M extends MethodDefinitions = MethodDefinitions, P = Record<string, any>, S = Record<string, any>> = D & ExtractComputed<C> & ExtractMethods<M> & {
|
|
4
|
+
export type ComputedDefinitions = Record<string, ComputedGetter<any> | WritableComputedOptions<any>>;
|
|
5
|
+
export type MethodDefinitions = Record<string, (...args: any[]) => any>;
|
|
6
|
+
export type ExtractComputed<C extends ComputedDefinitions> = { [K in keyof C]: C[K] extends ComputedGetter<infer R> ? R : C[K] extends WritableComputedOptions<infer R> ? R : never; };
|
|
7
|
+
export type ExtractMethods<M extends MethodDefinitions> = { [K in keyof M]: M[K] extends ((...args: infer P) => infer R) ? (...args: P) => R : never; };
|
|
8
|
+
export type ComponentPublicInstance<D extends object = Record<string, any>, C extends ComputedDefinitions = ComputedDefinitions, M extends MethodDefinitions = MethodDefinitions, P = Record<string, any>, S = Record<string, any>> = D & ExtractComputed<C> & ExtractMethods<M> & {
|
|
9
9
|
$attrs: Record<string, any>;
|
|
10
10
|
$props: P;
|
|
11
11
|
$refs: Record<string, any>;
|
|
@@ -19,17 +19,16 @@ type ComponentPublicInstance<D extends object = Record<string, any>, C extends C
|
|
|
19
19
|
};
|
|
20
20
|
$parent?: ComponentPublicInstance;
|
|
21
21
|
};
|
|
22
|
-
interface ModelBindingOptions<T = any, Event extends string = string, ValueProp extends string = string, Formatted = T> {
|
|
22
|
+
export interface ModelBindingOptions<T = any, Event extends string = string, ValueProp extends string = string, Formatted = T> {
|
|
23
23
|
event?: Event;
|
|
24
24
|
valueProp?: ValueProp;
|
|
25
25
|
parser?: (payload: any) => T;
|
|
26
26
|
formatter?: (value: T) => Formatted;
|
|
27
27
|
}
|
|
28
|
-
type ModelBindingPayload<T = any, Event extends string = 'input', ValueProp extends string = 'value', Formatted = T> = { [K in ValueProp]: Formatted; } & { [K in `on${Capitalize<Event>}`]: (event: any) => void; };
|
|
29
|
-
interface ModelBinding<T = any> {
|
|
28
|
+
export type ModelBindingPayload<T = any, Event extends string = 'input', ValueProp extends string = 'value', Formatted = T> = { [K in ValueProp]: Formatted; } & { [K in `on${Capitalize<Event>}`]: (event: any) => void; };
|
|
29
|
+
export interface ModelBinding<T = any> {
|
|
30
30
|
value: T;
|
|
31
31
|
update: (value: T) => void;
|
|
32
32
|
model: <Event extends string = 'input', ValueProp extends string = 'value', Formatted = T>(options?: ModelBindingOptions<T, Event, ValueProp, Formatted>) => ModelBindingPayload<T, Event, ValueProp, Formatted>;
|
|
33
33
|
}
|
|
34
|
-
//#endregion
|
|
35
|
-
export { ComponentPublicInstance, ComputedDefinitions, ExtractComputed, ExtractMethods, MethodDefinitions, ModelBinding, ModelBindingOptions, ModelBindingPayload };
|
|
34
|
+
//#endregion
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import { HostMiniProgramAddToFavoritesOption, HostMiniProgramAppOptions, HostMiniProgramAppTrivialInstance, HostMiniProgramBehaviorIdentifier, HostMiniProgramBoundingClientRectResult, HostMiniProgramComponentAllFullProperty, HostMiniProgramComponentAllProperty, HostMiniProgramComponentBehaviorOptions, HostMiniProgramComponentEmptyArray, HostMiniProgramComponentInstance, HostMiniProgramComponentMethodOption, HostMiniProgramComponentPropertyOption, HostMiniProgramComponentPropertyValue, HostMiniProgramComponentShortProperty, HostMiniProgramComponentTrivialInstance, HostMiniProgramComponentTrivialOption, HostMiniProgramIntersectionObserver, HostMiniProgramIntersectionObserverOptions, HostMiniProgramLaunchOptions, HostMiniProgramMemoryWarningResult, HostMiniProgramNavigateToOption, HostMiniProgramNodesRef, HostMiniProgramNodesRefFields, HostMiniProgramPageLifetime, HostMiniProgramPageNotFoundOptions, HostMiniProgramPageResizeOption, HostMiniProgramPageScrollOption, HostMiniProgramPageTrivialInstance, HostMiniProgramReLaunchOption, HostMiniProgramRedirectToOption, HostMiniProgramRouter, HostMiniProgramSaveExitState, HostMiniProgramScrollOffsetResult, HostMiniProgramSelectorQuery, HostMiniProgramShareAppMessageOption, HostMiniProgramSwitchTabOption, HostMiniProgramTabItemTapOption, HostMiniProgramThemeChangeResult, HostMiniProgramTriggerEventOptions, HostMiniProgramUnhandledRejectionResult } from "./miniprogramHost.mjs";
|
|
2
2
|
//#region src/runtime/types/miniprogram.d.ts
|
|
3
|
-
interface MiniProgramAdapter {
|
|
3
|
+
export interface MiniProgramAdapter {
|
|
4
|
+
/**
|
|
5
|
+
* 下发视图数据。返回 `void` 表示同步完成;异步适配器必须返回在宿主提交后兑现的 Promise。
|
|
6
|
+
*/
|
|
4
7
|
setData?: (payload: Record<string, any>) => void | Promise<void>;
|
|
5
8
|
}
|
|
6
9
|
type MpComponentOptions = HostMiniProgramComponentTrivialOption;
|
|
7
|
-
type MiniProgramBehaviorIdentifier = HostMiniProgramBehaviorIdentifier | string;
|
|
8
|
-
type MiniProgramComponentPropertyValue<TProperty extends HostMiniProgramComponentAllFullProperty> = HostMiniProgramComponentPropertyValue<TProperty>;
|
|
9
|
-
type MiniProgramComponentInstance<D extends object, P extends HostMiniProgramComponentPropertyOption, M extends HostMiniProgramComponentMethodOption, B extends HostMiniProgramComponentEmptyArray = HostMiniProgramComponentEmptyArray> = HostMiniProgramComponentInstance<D, P, M, B>;
|
|
10
|
-
interface MiniProgramComponentOptions {
|
|
10
|
+
export type MiniProgramBehaviorIdentifier = HostMiniProgramBehaviorIdentifier | string;
|
|
11
|
+
export type MiniProgramComponentPropertyValue<TProperty extends HostMiniProgramComponentAllFullProperty> = HostMiniProgramComponentPropertyValue<TProperty>;
|
|
12
|
+
export type MiniProgramComponentInstance<D extends object, P extends HostMiniProgramComponentPropertyOption, M extends HostMiniProgramComponentMethodOption, B extends HostMiniProgramComponentEmptyArray = HostMiniProgramComponentEmptyArray> = HostMiniProgramComponentInstance<D, P, M, B>;
|
|
13
|
+
export interface MiniProgramComponentOptions {
|
|
11
14
|
/**
|
|
12
15
|
* 类似于 mixins/traits 的组件间代码复用机制(behaviors)。
|
|
13
16
|
*/
|
|
@@ -70,11 +73,11 @@ interface MiniProgramComponentOptions {
|
|
|
70
73
|
detached?: MpComponentOptions['detached'];
|
|
71
74
|
error?: MpComponentOptions['error'];
|
|
72
75
|
}
|
|
73
|
-
type MiniProgramAppOptions<T extends Record<string, any> = Record<string, any>> = HostMiniProgramAppOptions<T>;
|
|
74
|
-
type MiniProgramInstance = HostMiniProgramComponentTrivialInstance | HostMiniProgramPageTrivialInstance | HostMiniProgramAppTrivialInstance;
|
|
75
|
-
type MiniProgramPageLifetimes = Partial<HostMiniProgramPageLifetime>;
|
|
76
|
-
type MiniProgramComponentRawOptions = Omit<HostMiniProgramComponentTrivialOption, 'behaviors'> & {
|
|
76
|
+
export type MiniProgramAppOptions<T extends Record<string, any> = Record<string, any>> = HostMiniProgramAppOptions<T>;
|
|
77
|
+
export type MiniProgramInstance = HostMiniProgramComponentTrivialInstance | HostMiniProgramPageTrivialInstance | HostMiniProgramAppTrivialInstance;
|
|
78
|
+
export type MiniProgramPageLifetimes = Partial<HostMiniProgramPageLifetime>;
|
|
79
|
+
export type MiniProgramComponentRawOptions = Omit<HostMiniProgramComponentTrivialOption, 'behaviors'> & {
|
|
77
80
|
behaviors?: MiniProgramBehaviorIdentifier[];
|
|
78
81
|
} & MiniProgramPageLifetimes & Record<string, any>;
|
|
79
82
|
//#endregion
|
|
80
|
-
export {
|
|
83
|
+
export type { HostMiniProgramAddToFavoritesOption as MiniProgramAddToFavoritesOption, HostMiniProgramBoundingClientRectResult as MiniProgramBoundingClientRectResult, HostMiniProgramComponentAllFullProperty as MiniProgramComponentAllFullProperty, HostMiniProgramComponentAllProperty as MiniProgramComponentAllProperty, HostMiniProgramComponentBehaviorOptions as MiniProgramComponentBehaviorOptions, HostMiniProgramComponentEmptyArray as MiniProgramComponentEmptyArray, HostMiniProgramComponentMethodOption as MiniProgramComponentMethodOption, HostMiniProgramComponentPropertyOption as MiniProgramComponentPropertyOption, HostMiniProgramComponentShortProperty as MiniProgramComponentShortProperty, HostMiniProgramIntersectionObserver as MiniProgramIntersectionObserver, HostMiniProgramIntersectionObserverOptions as MiniProgramIntersectionObserverOptions, HostMiniProgramLaunchOptions as MiniProgramLaunchOptions, HostMiniProgramMemoryWarningResult as MiniProgramMemoryWarningResult, HostMiniProgramNavigateToOption as MiniProgramNavigateToOption, HostMiniProgramNodesRef as MiniProgramNodesRef, HostMiniProgramNodesRefFields as MiniProgramNodesRefFields, HostMiniProgramPageLifetime as MiniProgramPageLifetime, HostMiniProgramPageNotFoundOptions as MiniProgramPageNotFoundOptions, HostMiniProgramPageResizeOption as MiniProgramPageResizeOption, HostMiniProgramPageScrollOption as MiniProgramPageScrollOption, HostMiniProgramReLaunchOption as MiniProgramReLaunchOption, HostMiniProgramRedirectToOption as MiniProgramRedirectToOption, HostMiniProgramRouter as MiniProgramRouter, HostMiniProgramSaveExitState as MiniProgramSaveExitState, HostMiniProgramScrollOffsetResult as MiniProgramScrollOffsetResult, HostMiniProgramSelectorQuery as MiniProgramSelectorQuery, HostMiniProgramShareAppMessageOption as MiniProgramShareAppMessageOption, HostMiniProgramSwitchTabOption as MiniProgramSwitchTabOption, HostMiniProgramTabItemTapOption as MiniProgramTabItemTapOption, HostMiniProgramThemeChangeResult as MiniProgramThemeChangeResult, HostMiniProgramUnhandledRejectionResult as MiniProgramUnhandledRejectionResult, HostMiniProgramTriggerEventOptions as TriggerEventOptions };
|