wevu 7.3.0 → 7.5.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 +2 -0
- package/dist/dev/_virtual/{_@oxc-project_runtime@0.151.0 → _@oxc-project_runtime@0.153.0}/helpers/esm/defineProperty.mjs +1 -1
- package/dist/dev/_virtual/{_@oxc-project_runtime@0.151.0 → _@oxc-project_runtime@0.153.0}/helpers/esm/toPrimitive.mjs +1 -1
- package/dist/dev/_virtual/{_@oxc-project_runtime@0.151.0 → _@oxc-project_runtime@0.153.0}/helpers/esm/toPropertyKey.mjs +1 -1
- package/dist/dev/_virtual/{_@oxc-project_runtime@0.151.0 → _@oxc-project_runtime@0.153.0}/helpers/esm/typeof.mjs +1 -1
- package/dist/dev/package.mjs +1 -1
- package/dist/dev/reactivity/core.mjs +1 -1
- package/dist/dev/reactivity/ref.mjs +1 -1
- package/dist/dev/router/initialNavigation.mjs +4 -1
- package/dist/dev/router/initialNavigation.mjs.map +1 -1
- package/dist/dev/router/scrollRestoration/adapters.mjs +86 -0
- package/dist/dev/router/scrollRestoration/adapters.mjs.map +1 -0
- package/dist/dev/router/scrollRestoration/controller.mjs +148 -0
- package/dist/dev/router/scrollRestoration/controller.mjs.map +1 -0
- package/dist/dev/router/scrollRestoration/host.mjs +76 -0
- package/dist/dev/router/scrollRestoration/host.mjs.map +1 -0
- package/dist/dev/router/scrollRestoration/index.mjs +156 -0
- package/dist/dev/router/scrollRestoration/index.mjs.map +1 -0
- package/dist/dev/router.mjs +4 -1
- package/dist/dev/runtime/app/diagnostics.mjs +5 -1
- package/dist/dev/runtime/app/diagnostics.mjs.map +1 -1
- package/dist/dev/runtime/app/mount.mjs +8 -3
- package/dist/dev/runtime/app/mount.mjs.map +1 -1
- package/dist/dev/runtime/app/setData/commitTracker.mjs +39 -4
- package/dist/dev/runtime/app/setData/commitTracker.mjs.map +1 -1
- package/dist/dev/runtime/app/setData/observation.mjs +109 -0
- package/dist/dev/runtime/app/setData/observation.mjs.map +1 -0
- package/dist/dev/runtime/app/setData/scheduler.mjs +12 -1
- package/dist/dev/runtime/app/setData/scheduler.mjs.map +1 -1
- package/dist/dev/runtime/app/setDataOptions.mjs +1 -0
- package/dist/dev/runtime/app/setDataOptions.mjs.map +1 -1
- package/dist/dev/runtime/define/initialComputed.mjs +13 -12
- package/dist/dev/runtime/define/initialComputed.mjs.map +1 -1
- package/dist/dev/runtime/define/props.mjs +5 -1
- package/dist/dev/runtime/define/props.mjs.map +1 -1
- package/dist/dev/runtime/define/scopedSlotOptions.mjs +2 -1
- package/dist/dev/runtime/define/scopedSlotOptions.mjs.map +1 -1
- package/dist/dev/runtime/define.mjs +1 -1
- package/dist/dev/runtime/define.mjs.map +1 -1
- package/dist/dev/runtime/features/scopedSlots.mjs.map +1 -1
- package/dist/dev/runtime/hooks/base.mjs +1 -13
- package/dist/dev/runtime/hooks/base.mjs.map +1 -1
- package/dist/dev/runtime/hooks/pageScroll.mjs +41 -0
- package/dist/dev/runtime/hooks/pageScroll.mjs.map +1 -0
- package/dist/dev/runtime/hooks/register.mjs +2 -1
- package/dist/dev/runtime/hooks/register.mjs.map +1 -1
- package/dist/dev/runtime/register/component/lifecycle/optionalHooks.mjs +2 -5
- package/dist/dev/runtime/register/component/lifecycle/optionalHooks.mjs.map +1 -1
- package/dist/dev/runtime/register/component/lifecycle/platform.mjs +8 -20
- package/dist/dev/runtime/register/component/lifecycle/platform.mjs.map +1 -1
- package/dist/dev/runtime/register/component/props.mjs +14 -4
- package/dist/dev/runtime/register/component/props.mjs.map +1 -1
- package/dist/dev/runtime/register/component/registerDefinition.mjs +30 -17
- package/dist/dev/runtime/register/component/registerDefinition.mjs.map +1 -1
- package/dist/dev/runtime/register/component.mjs +2 -1
- package/dist/dev/runtime/register/component.mjs.map +1 -1
- package/dist/dev/runtime/register/runtimeInstance/methodBridge.mjs +14 -7
- package/dist/dev/runtime/register/runtimeInstance/methodBridge.mjs.map +1 -1
- package/dist/dev/runtime/register/runtimeInstance/nativeDeclaration.mjs +78 -0
- package/dist/dev/runtime/register/runtimeInstance/nativeDeclaration.mjs.map +1 -0
- package/dist/dev/runtime/register/runtimeInstance/provideContext.mjs +52 -8
- package/dist/dev/runtime/register/runtimeInstance/provideContext.mjs.map +1 -1
- package/dist/dev/runtime/register/runtimeInstance/setupPhase.mjs +7 -2
- package/dist/dev/runtime/register/runtimeInstance/setupPhase.mjs.map +1 -1
- package/dist/dev/runtime/register/runtimeInstance/utils.mjs.map +1 -1
- package/dist/dev/runtime/register/runtimeInstance.mjs +60 -19
- package/dist/dev/runtime/register/runtimeInstance.mjs.map +1 -1
- package/dist/fetch.mjs +1 -1
- package/dist/internal-template.mjs +1 -1
- package/dist/package.mjs +1 -1
- package/dist/reactivity/core.mjs +1 -1
- package/dist/reactivity/reactive/patch.mjs +1 -1
- package/dist/reactivity/reactive/patchState.mjs +1 -1
- package/dist/reactivity/ref.mjs +1 -1
- package/dist/reactivity/watch/helpers.mjs +1 -1
- package/dist/router/initialNavigation.mjs +1 -1
- package/dist/router/scrollRestoration/adapters.d.mts +7 -0
- package/dist/router/scrollRestoration/adapters.mjs +1 -0
- package/dist/router/scrollRestoration/controller.d.mts +7 -0
- package/dist/router/scrollRestoration/controller.mjs +1 -0
- package/dist/router/scrollRestoration/host.d.mts +3 -0
- package/dist/router/scrollRestoration/host.mjs +1 -0
- package/dist/router/scrollRestoration/index.d.mts +8 -0
- package/dist/router/scrollRestoration/index.mjs +1 -0
- package/dist/router/scrollRestoration/types.d.mts +60 -0
- package/dist/router/useRoute.mjs +1 -1
- package/dist/router.d.mts +5 -1
- package/dist/router.mjs +1 -1
- package/dist/routerInternal/matching.mjs +1 -1
- package/dist/routerInternal/params.mjs +1 -1
- package/dist/routerInternal/path.mjs +1 -1
- package/dist/routerInternal/query.mjs +1 -1
- package/dist/routerInternal/records.mjs +1 -1
- package/dist/runtime/app/context.mjs +1 -1
- package/dist/runtime/app/diagnostics.mjs +1 -1
- package/dist/runtime/app/mount.mjs +1 -1
- package/dist/runtime/app/setData/commitTracker.d.mts +2 -1
- package/dist/runtime/app/setData/commitTracker.mjs +1 -1
- package/dist/runtime/app/setData/observation.d.mts +12 -0
- package/dist/runtime/app/setData/observation.mjs +1 -0
- package/dist/runtime/app/setData/scheduler.d.mts +1 -0
- package/dist/runtime/app/setData/scheduler.mjs +1 -1
- package/dist/runtime/app/setDataOptions.mjs +1 -1
- package/dist/runtime/define/initialComputed.mjs +1 -1
- package/dist/runtime/define/props.mjs +1 -1
- package/dist/runtime/define/scopedSlotOptions.mjs +1 -1
- package/dist/runtime/define.mjs +1 -1
- package/dist/runtime/diff.mjs +1 -1
- package/dist/runtime/features/publicLayout.mjs +1 -1
- package/dist/runtime/features/scopedSlots.d.mts +2 -1
- package/dist/runtime/hooks/base.mjs +1 -1
- package/dist/runtime/hooks/pageScroll.mjs +1 -0
- package/dist/runtime/hooks/register.mjs +1 -1
- package/dist/runtime/jsxIsland.mjs +1 -1
- package/dist/runtime/pageLayout.mjs +1 -1
- package/dist/runtime/pageScroll.mjs +1 -1
- package/dist/runtime/register/component/alipayRegistration.mjs +1 -1
- package/dist/runtime/register/component/lifecycle/optionalHooks.mjs +1 -1
- package/dist/runtime/register/component/lifecycle/platform.mjs +1 -1
- package/dist/runtime/register/component/lifecycle.mjs +1 -1
- package/dist/runtime/register/component/props.mjs +1 -1
- package/dist/runtime/register/component/registerDefinition.mjs +1 -1
- package/dist/runtime/register/component/registerNativeDefinition.mjs +1 -1
- package/dist/runtime/register/component.mjs +1 -1
- package/dist/runtime/register/runtimeInstance/methodBridge.mjs +1 -1
- package/dist/runtime/register/runtimeInstance/nativeDeclaration.mjs +1 -0
- package/dist/runtime/register/runtimeInstance/provideContext.mjs +1 -1
- package/dist/runtime/register/runtimeInstance/setupPhase.mjs +1 -1
- package/dist/runtime/register/runtimeInstance.d.mts +8 -4
- package/dist/runtime/register/runtimeInstance.mjs +1 -1
- package/dist/runtime/setupTracking.mjs +1 -1
- package/dist/runtime/templateRefs.mjs +1 -1
- package/dist/runtime/types/runtime.d.mts +1 -0
- package/dist/runtime/types/setData.d.mts +30 -0
- package/dist/scheduler.mjs +1 -1
- package/dist/web-apis.mjs +1 -1
- package/package.json +10 -9
- package/dist/dev/api/vitest/setup.d.mts +0 -1
- package/dist/dev/api/vitest.d.mts +0 -1
- package/dist/dev/api.d.mts +0 -1
- package/dist/dev/compiler.d.mts +0 -1
- package/dist/dev/fetch.d.mts +0 -9
- package/dist/dev/index.d.mts +0 -72
- package/dist/dev/internal-reactivity.d.mts +0 -18
- package/dist/dev/internal-runtime.d.mts +0 -45
- package/dist/dev/internal-template.d.mts +0 -2
- package/dist/dev/jsxTypes.d.mts +0 -9
- package/dist/dev/macros/shared.d.mts +0 -83
- package/dist/dev/macros.d.mts +0 -71
- package/dist/dev/reactivity/asyncDerivation.d.mts +0 -41
- package/dist/dev/reactivity/computed.d.mts +0 -25
- package/dist/dev/reactivity/core.d.mts +0 -35
- package/dist/dev/reactivity/index.d.mts +0 -16
- package/dist/dev/reactivity/reactive/mutation.d.mts +0 -21
- package/dist/dev/reactivity/reactive/patch.d.mts +0 -18
- package/dist/dev/reactivity/reactive/shallow.d.mts +0 -22
- package/dist/dev/reactivity/reactive/shared.d.mts +0 -4
- package/dist/dev/reactivity/reactive.d.mts +0 -42
- package/dist/dev/reactivity/readonly.d.mts +0 -27
- package/dist/dev/reactivity/ref.d.mts +0 -27
- package/dist/dev/reactivity/shallowRef.d.mts +0 -19
- package/dist/dev/reactivity/toRefs.d.mts +0 -43
- package/dist/dev/reactivity/traverse.d.mts +0 -8
- package/dist/dev/reactivity/watch/types.d.mts +0 -43
- package/dist/dev/reactivity/watch.d.mts +0 -22
- package/dist/dev/router/auto-routes.d.mts +0 -8
- package/dist/dev/router/createRouter.d.mts +0 -9
- package/dist/dev/router/navigationCore.d.mts +0 -7
- package/dist/dev/router/resolve.d.mts +0 -7
- package/dist/dev/router/routeSync.d.mts +0 -2
- package/dist/dev/router/types.d.mts +0 -267
- package/dist/dev/router/useRoute.d.mts +0 -20
- package/dist/dev/router/useRouter.d.mts +0 -9
- package/dist/dev/router.d.mts +0 -26
- package/dist/dev/routerInternal/location.d.mts +0 -2
- package/dist/dev/routerInternal/matching.d.mts +0 -2
- package/dist/dev/routerInternal/params.d.mts +0 -2
- package/dist/dev/routerInternal/query.d.mts +0 -7
- package/dist/dev/routerInternal/records.d.mts +0 -2
- package/dist/dev/routerInternal/recordsWarnings.d.mts +0 -2
- package/dist/dev/routerInternal/shared.d.mts +0 -9
- package/dist/dev/routerInternal/snapshots.d.mts +0 -2
- package/dist/dev/routerInternal/types.d.mts +0 -9
- package/dist/dev/runtime/app/pending.d.mts +0 -10
- package/dist/dev/runtime/app/setData/commitTracker.d.mts +0 -13
- package/dist/dev/runtime/app/setData/scheduler.d.mts +0 -51
- package/dist/dev/runtime/app.d.mts +0 -8
- package/dist/dev/runtime/capabilities.d.mts +0 -78
- package/dist/dev/runtime/css.d.mts +0 -14
- package/dist/dev/runtime/defaults.d.mts +0 -12
- package/dist/dev/runtime/define.d.mts +0 -118
- package/dist/dev/runtime/disposables.d.mts +0 -31
- package/dist/dev/runtime/elementIntersectionObserver.d.mts +0 -26
- package/dist/dev/runtime/features/inlineEvents.d.mts +0 -7
- package/dist/dev/runtime/features/jsxIslands.d.mts +0 -7
- package/dist/dev/runtime/features/layout.d.mts +0 -7
- package/dist/dev/runtime/features/patchStrategy.d.mts +0 -7
- package/dist/dev/runtime/features/publicLayout.d.mts +0 -24
- package/dist/dev/runtime/features/scopedSlots.d.mts +0 -23
- package/dist/dev/runtime/features/setDataHighFrequencyWarning.d.mts +0 -7
- package/dist/dev/runtime/features/templateRefs.d.mts +0 -7
- package/dist/dev/runtime/hooks/base.d.mts +0 -27
- package/dist/dev/runtime/hooks/register.d.mts +0 -30
- package/dist/dev/runtime/hooks/vue.d.mts +0 -52
- package/dist/dev/runtime/hooks.d.mts +0 -4
- package/dist/dev/runtime/index.d.mts +0 -46
- package/dist/dev/runtime/intersectionObserver.d.mts +0 -14
- package/dist/dev/runtime/jsxIsland.d.mts +0 -37
- package/dist/dev/runtime/layoutBridge.d.mts +0 -55
- package/dist/dev/runtime/noSetData.d.mts +0 -5
- package/dist/dev/runtime/pageEnvironment.d.mts +0 -50
- package/dist/dev/runtime/pageLayout.d.mts +0 -25
- package/dist/dev/runtime/pageScroll.d.mts +0 -29
- package/dist/dev/runtime/provide.d.mts +0 -60
- package/dist/dev/runtime/provideStore.d.mts +0 -7
- package/dist/dev/runtime/publicRuntime.d.mts +0 -22
- package/dist/dev/runtime/pullDownRefresh.d.mts +0 -12
- package/dist/dev/runtime/register/app.d.mts +0 -14
- package/dist/dev/runtime/register/component.d.mts +0 -17
- package/dist/dev/runtime/register/inline.d.mts +0 -15
- package/dist/dev/runtime/register/runtimeInstance.d.mts +0 -26
- package/dist/dev/runtime/register/setup.d.mts +0 -11
- package/dist/dev/runtime/register/watch.d.mts +0 -12
- package/dist/dev/runtime/register.d.mts +0 -5
- package/dist/dev/runtime/selectorQuery.d.mts +0 -54
- package/dist/dev/runtime/template.d.mts +0 -6
- package/dist/dev/runtime/templateRefTypes.d.mts +0 -12
- package/dist/dev/runtime/types/core.d.mts +0 -35
- package/dist/dev/runtime/types/miniprogram.d.mts +0 -84
- package/dist/dev/runtime/types/miniprogramHost.d.mts +0 -45
- package/dist/dev/runtime/types/miniprogramHostSources.d.mts +0 -112
- package/dist/dev/runtime/types/options.d.mts +0 -138
- package/dist/dev/runtime/types/props/propTypes.d.mts +0 -79
- package/dist/dev/runtime/types/props/router.d.mts +0 -51
- package/dist/dev/runtime/types/props/setup.d.mts +0 -96
- package/dist/dev/runtime/types/props.d.mts +0 -4
- package/dist/dev/runtime/types/runtime.d.mts +0 -59
- package/dist/dev/runtime/types/setData.d.mts +0 -237
- package/dist/dev/runtime/types.d.mts +0 -29
- package/dist/dev/runtime/uniAppHost.d.mts +0 -8
- package/dist/dev/runtime/updatePerformance.d.mts +0 -13
- package/dist/dev/runtime/use.d.mts +0 -13
- package/dist/dev/runtime/vueCompat/context.d.mts +0 -8
- package/dist/dev/runtime/vueCompat/model.d.mts +0 -30
- package/dist/dev/runtime/vueCompat/router.d.mts +0 -29
- package/dist/dev/runtime/vueCompat/templateRef.d.mts +0 -9
- package/dist/dev/runtime/vueCompat.d.mts +0 -5
- package/dist/dev/scheduler.d.mts +0 -4
- package/dist/dev/store/define.d.mts +0 -8
- package/dist/dev/store/manager.d.mts +0 -16
- package/dist/dev/store/storeToRefs.d.mts +0 -11
- package/dist/dev/store/types.d.mts +0 -106
- package/dist/dev/store.d.mts +0 -5
- package/dist/dev/version.d.mts +0 -4
- package/dist/dev/vue-augment.d.mts +0 -8
- package/dist/dev/vue-demi.d.mts +0 -87
- package/dist/dev/vue-types.d.mts +0 -19
- package/dist/dev/web-apis.d.mts +0 -3
- /package/dist/_virtual/{_@oxc-project_runtime@0.151.0 → _@oxc-project_runtime@0.153.0}/helpers/esm/defineProperty.mjs +0 -0
- /package/dist/_virtual/{_@oxc-project_runtime@0.151.0 → _@oxc-project_runtime@0.153.0}/helpers/esm/toPrimitive.mjs +0 -0
- /package/dist/_virtual/{_@oxc-project_runtime@0.151.0 → _@oxc-project_runtime@0.153.0}/helpers/esm/toPropertyKey.mjs +0 -0
- /package/dist/_virtual/{_@oxc-project_runtime@0.151.0 → _@oxc-project_runtime@0.153.0}/helpers/esm/typeof.mjs +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{resolveCurrentMiniProgramPlatform as e}from"../../platform/current.mjs";import{getMiniProgramRuntimeGlobalObject as t}from"../../platform.mjs";import{registerAlipayComponentDefinition as n}from"./alipayRegistration.mjs";import{WEAPP_VITE_STATEFUL_HMR_BRIDGE_KEY as r}from"@weapp-core/constants";function i(e){let n=t()?.[r];
|
|
1
|
+
import{resolveCurrentMiniProgramPlatform as e}from"../../platform/current.mjs";import{getMiniProgramRuntimeGlobalObject as t}from"../../platform.mjs";import{registerAlipayComponentDefinition as n}from"./alipayRegistration.mjs";import{WEAPP_VITE_STATEFUL_HMR_BRIDGE_KEY as r}from"@weapp-core/constants";function i(e){let n=t()?.[r];typeof n?.Component==`function`?n.Component(e):Component(e)}function a(t,r){e()===`alipay`?n(t,r):i(t)}const o=import.meta.env?.PLATFORM===`alipay`?n:import.meta.env?.PLATFORM===`weapp`||import.meta.env?.PLATFORM===`tt`||import.meta.env?.PLATFORM===`swan`||import.meta.env?.PLATFORM===`jd`||import.meta.env?.PLATFORM===`xhs`||import.meta.env?.PLATFORM===`web`?i:a;export{o as registerNativeComponentDefinition};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{resolveComponentFeatures as e}from"./component/features.mjs";import{createPageLifecycleHooks as t}from"./component/lifecycle.mjs";import{createComponentMethods as n}from"./component/methods.mjs";import{getRuntimeOwnerLabel as r,prepareComponentOptions as i}from"./component/options.mjs";import{createPropsSync as ee}from"./component/props.mjs";import{registerComponentDefinition as a}from"./component/registerDefinition.mjs";import{WEVU_EXPOSED_KEY as o,WEVU_HOOKS_KEY as s}from"@weapp-core/constants";function
|
|
1
|
+
import{resolveComponentFeatures as e}from"./component/features.mjs";import{createPageLifecycleHooks as t}from"./component/lifecycle.mjs";import{createComponentMethods as n}from"./component/methods.mjs";import{getRuntimeOwnerLabel as r,prepareComponentOptions as i}from"./component/options.mjs";import{createPropsSync as ee}from"./component/props.mjs";import{registerComponentDefinition as a}from"./component/registerDefinition.mjs";import{WEVU_EXPOSED_KEY as o,WEVU_HOOKS_KEY as s,WEVU_NATIVE_SLOT_CONTEXT_KEY as c}from"@weapp-core/constants";function l(l,u,d,f,p,m={}){let{userMethods:h,userLifetimes:g,userPageLifetimes:_,userOptions:v,restOptions:y,topLevelMethods:b,templateRefs:x,layoutHosts:S,propsAliases:C,propsDerivedKeys:w,userObservers:T,setupLifecycle:E,vueLifecycles:D,isPage:O,features:k,userOnLoad:A,userOnUnload:j,userOnShow:M,userOnHide:N,userOnReady:P,userOnSaveExitState:F,userOnPullDownRefresh:I,userOnReachBottom:L,userOnPageScroll:R,userOnRouteDone:z,userOnTabItemTap:B,userOnResize:V,userOnShareAppMessage:H,userOnShareTimeline:U,userOnAddToFavorites:W,applyExtraInstanceFields:G}=i(p),{enableOnPullDownRefresh:K,enableOnReachBottom:q,enableOnPageScroll:te,enableOnRouteDone:J,enableOnRouteDoneFallback:Y,enableOnTabItemTap:X,enableOnResize:Z,enableOnShareAppMessage:Q,enableOnShareTimeline:ne,enableOnAddToFavorites:re,enableOnSaveExitState:ie,effectiveOnSaveExitState:ae,effectiveOnPullDownRefresh:oe,effectiveOnReachBottom:se,effectiveOnPageScroll:ce,effectiveOnRouteDone:le,effectiveOnTabItemTap:ue,effectiveOnResize:de,effectiveOnShareAppMessage:fe,effectiveOnShareTimeline:pe,effectiveOnAddToFavorites:me}=e({features:k,userOnSaveExitState:F,userOnPullDownRefresh:I,userOnReachBottom:L,userOnPageScroll:R,userOnRouteDone:z,userOnTabItemTap:B,userOnResize:V,userOnShareAppMessage:H,userOnShareTimeline:U,userOnAddToFavorites:W}),he=(e,t)=>{let n=e[s];if(!n)return!1;let r=n[t];return r?Array.isArray(r)?r.length>0:typeof r==`function`:!1};{let e=y.export;y.export=function(){let t=this[o]??{},n=typeof e==`function`?e.call(this):{};return n&&typeof n==`object`&&!Array.isArray(n)?{...t,...n}:n??t}}let ge={multipleSlots:v.multipleSlots??!0,...v},{attachWevuPropKeys:_e,directPropsDerivedKeys:ve,syncWevuPropsFromInstance:ye,syncWevuPropsFromValues:$,finalObservers:be}=ee({restOptions:y,propsAliases:C,propsDerivedKeys:w,userObservers:T}),{finalMethods:xe}=n({userMethods:{...b,...h},runtimeMethods:u}),Se=t({runtimeApp:l,watch:d,setup:f,userOnLoad:A,userOnUnload:j,userOnShow:M,userOnHide:N,userOnReady:P,isPage:O,enableOnSaveExitState:ie,enableOnPullDownRefresh:K,enableOnReachBottom:q,enableOnPageScroll:te,enableOnRouteDone:J,enableOnRouteDoneFallback:Y,enableOnTabItemTap:X,enableOnResize:Z,enableOnShareAppMessage:Q,enableOnShareTimeline:ne,enableOnAddToFavorites:re,syncWevuPropsFromValues:$,effectiveOnSaveExitState:ae,effectiveOnPullDownRefresh:oe,effectiveOnReachBottom:se,effectiveOnPageScroll:ce,effectiveOnRouteDone:le,effectiveOnTabItemTap:ue,effectiveOnResize:de,effectiveOnShareAppMessage:fe,effectiveOnShareTimeline:pe,effectiveOnAddToFavorites:me,hasHook:he});return a({runtimeApp:l,watch:d,setup:f,restOptions:y,pageLifecycleHooks:Se,finalObservers:be,userLifetimes:g,userPageLifetimes:_,finalMethods:xe,finalOptions:ge,applyExtraInstanceFields:G,templateRefs:x,layoutHosts:S,attachWevuPropKeys:_e,setupLifecycle:E,syncWevuPropsFromInstance:ye,syncWevuPropsFromValues:$,directPropsDerivedKeys:ve,nativeSlotContext:(!import.meta.env?.PLATFORM||import.meta.env?.PLATFORM===`weapp`)&&p[c]===!0,isPage:O,vueLifecycles:D,getRuntimeOwnerLabel:r,registerNative:m.registerNative})}export{l as registerComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{isNativeBridgeMethod as e}from"../../nativeBridge.mjs";import{setupInstanceMethodNames as t}from"./setupContext.mjs";import{
|
|
1
|
+
import{isNativeBridgeMethod as e}from"../../nativeBridge.mjs";import{setupInstanceMethodNames as t}from"./setupContext.mjs";import{WEVU_HOST_INSTALL_METHOD_KEY as n,WEVU_NATIVE_INSTANCE_KEY as r,WEVU_PUBLIC_RUNTIME_KEY as i}from"@weapp-core/constants";function a(e){return!e||typeof e!=`object`?!1:typeof e.triggerEvent==`function`||typeof e.createSelectorQuery==`function`||typeof e.createIntersectionObserver==`function`||typeof e.setData==`function`}function o(t,n,r){let i=n?.[r];if(typeof i!=`function`)return!1;if(e(i))return!0;let a=t?.proxy;return typeof a?.[r]==`function`&&i===a[r]}function s(e,t){if(!e||!a(t)||t===e.proxy)return;let n=t;if(o(e,n,`triggerEvent`)||o(e,n,`createSelectorQuery`)||o(e,n,`createIntersectionObserver`)||o(e,n,`setData`))return;let i=e.state;if(i&&typeof i==`object`)try{Object.defineProperty(i,r,{value:n,configurable:!0,enumerable:!1,writable:!0})}catch{i[r]=n}}function c(e,r){try{let a=r.methods,o=Reflect.get(e,n),c=typeof o==`function`?{}:void 0;for(let n of Object.keys(a))if(!t.includes(n)&&(c||typeof e[n]!=`function`)){let t=function(...t){let r=this[i]??e[i];s(r,this);let a=r?.methods?.[n];if(typeof a==`function`)return a.apply(r.proxy,t)};c?c[n]=t:e[n]=t}typeof o==`function`&&o.call(e,c)}catch{}}export{c as bridgeRuntimeMethodsToTarget};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{WEVU_NATIVE_DECLARATION_ADDRESS_PROP as e,WEVU_NATIVE_DECLARATION_EVENT as t}from"@weapp-core/constants";const n=/* @__PURE__ */ Symbol(`address`),r=/* @__PURE__ */ Symbol(`registration`),i=/* @__PURE__ */ Symbol(`index`);function a(e){return Array.isArray(e)&&e.length===2&&typeof e[0]==`string`&&e[0]!==``&&typeof e[1]==`string`?e:void 0}function o(t){return t[n]===void 0?a(t.properties?.[e]):t[n]??void 0}function s(e){let{owner:t,target:n,selfKey:a}=e;t[i]?.get(a)===e&&t[i]?.delete(a),n[r]===e&&delete n[r]}function c(e){let{owner:t,target:n,selfKey:a}=e,o=t[i]??(t[i]=/* @__PURE__ */ new Map),c=o.get(a);c&&c!==e&&s(c),o.set(a,e),n[r]=e}function l(e,t){let i=a(t);e[n]=i??null;let o=e[r];o&&o.selfKey!==i?.[0]&&(s(o),i&&(o.selfKey=i[0],c(o)))}function u(e,t){return t?e[i]?.get(t)?.target:e}function d(e){typeof e.detail?.register==`function`&&e.detail.register(this)}function f(e){let n=o(e);if(!n||typeof e.triggerEvent!=`function`)return;let i;return e.triggerEvent(t,{register(t){if(t===e)return;let a=e[r];a&&s(a),c({owner:t,target:e,selfKey:n[0]}),i=u(t,n[1])}},{bubbles:!1,composed:!1}),i}function p(e,t=!1){let a=e[r];if(a&&s(a),t)return;let o=e[i];if(o){for(let e of o.values())s(e);delete e[i]}delete e[n]}export{d as receiveNativeDeclaration,p as releaseNativeDeclaration,u as resolveNativeDeclarationHost,f as resolveNativeDeclarationParent,l as updateNativeDeclarationAddress};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{getCurrentMiniProgramPages as e}from"../../platform.mjs";import{attachRuntimeLayoutProvideContext as t,attachRuntimeProvideContext as n}from"../../provideContext.mjs";import{isRuntimeLayoutComponentTarget as r}from"../../layoutComponentMatcher.mjs";import{
|
|
1
|
+
import{getCurrentMiniProgramPages as e}from"../../platform.mjs";import{attachRuntimeLayoutProvideContext as t,attachRuntimeProvideContext as n}from"../../provideContext.mjs";import{isRuntimeLayoutComponentTarget as r}from"../../layoutComponentMatcher.mjs";import{resolveNativeDeclarationHost as i,resolveNativeDeclarationParent as a}from"./nativeDeclaration.mjs";import{WEVU_NATIVE_SLOT_CONTEXT_KEY as o,WEVU_NATIVE_SLOT_PARENT_DATASET_KEY as s,WEVU_NATIVE_SLOT_PARENT_EVENT as c,WEVU_PARENT_INSTANCE_KEY as l,WEVU_PROVIDES_KEY as u,WEVU_RUNTIME_APP_KEY as d}from"@weapp-core/constants";function f(e){return!!(e&&typeof e==`object`&&e.__wevu&&e[u])}function p(e){let t=e.currentTarget?.dataset?.[s],n=typeof t==`string`?i(this,t):this;f(n)&&typeof e.detail?.resolve==`function`&&e.detail.resolve(n)}function m(e){let t=e.selectOwnerComponent;if(typeof t==`function`)try{let n=t.call(e);if(n&&n!==e&&typeof n==`object`&&n.__wevu)return n}catch{}}function h(e){if(e[o]!==!0||typeof e.triggerEvent!=`function`)return;let t,n={resolve(n){if(n!==e&&f(n)&&n!==t){if(!t)t=n;else for(let e=n[l];e;e=e[l])if(e===t){t=n;return}}}},r=a(e);return r&&n.resolve(r),e.triggerEvent(c,n,{bubbles:!0,composed:!0}),t}function g(t,n,i){if(r(t))return;if((!import.meta.env?.PLATFORM||import.meta.env?.PLATFORM===`weapp`)&&n){let e=h(t);if(e)return e}let a=t[l];if(a&&typeof a==`object`)return a;if(i!==t&&f(i))return i;let o=m(t);if(o)return o;let s=e(),c=s[s.length-1];if(c&&c!==t&&typeof c==`object`&&c.__wevu)return c}function _(n){if(!r(n))return;let i=e(),a=i[i.length-1];a&&a!==n&&typeof a==`object`&&a.__wevu&&t(n,a)}function v(e,t,r=!1,i){let a=g(e,r,i);e[d]=t,n(e,t,a),_(e)}export{v as attachRuntimeProvideParentContext,p as receiveNativeSlotParent};
|
|
@@ -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{getCurrentInstance as i,getCurrentSetupContext as a,setCurrentInstance as o,setCurrentSetupContext as s}from"../../hooks/base.mjs";import{hasOwn as c}from"../../../utils.mjs";import{hasTrackableSetupBinding as l}from"../../setupTracking.mjs";import{normalizeEmitEventName as u,normalizeEmitPayload as d}from"../../emit.mjs";import{attachRuntimeSlots as f,ensureSetupContextInstance as p,safeMarkNoSetData as m}from"./setupContext.mjs";import{preserveSetupAccessor as h}from"../../define/setupResult.mjs";import{runSetupFunction as g}from"../setup.mjs";import{attachRuntimeSetupState as _,ensureRuntimeProps as v}from"./utils.mjs";import{WEVU_ATTRS_KEY as y,WEVU_EFFECT_SCOPE_KEY as b,WEVU_EXPOSED_KEY as x,WEVU_PROP_KEYS_KEY as S}from"@weapp-core/constants";let C=0;function w(e,t){let n=e,
|
|
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{getCurrentInstance as i,getCurrentSetupContext as a,setCurrentInstance as o,setCurrentSetupContext as s}from"../../hooks/base.mjs";import{hasOwn as c}from"../../../utils.mjs";import{hasTrackableSetupBinding as l}from"../../setupTracking.mjs";import{normalizeEmitEventName as u,normalizeEmitPayload as d}from"../../emit.mjs";import{attachRuntimeSlots as f,ensureSetupContextInstance as p,safeMarkNoSetData as m}from"./setupContext.mjs";import{preserveSetupAccessor as h}from"../../define/setupResult.mjs";import{runSetupFunction as g}from"../setup.mjs";import{attachRuntimeSetupState as _,ensureRuntimeProps as v}from"./utils.mjs";import{WEVU_ATTRS_KEY as y,WEVU_EFFECT_SCOPE_KEY as b,WEVU_EXPOSED_KEY as x,WEVU_PROP_KEYS_KEY as S}from"@weapp-core/constants";let C=0;function w(e,t){let n,r=e,i={proxy:{configurable:!0,enumerable:!1,value:t,writable:!1},$:{configurable:!0,enumerable:!1,value:e,writable:!1},uid:{configurable:!0,enumerable:!1,value:++C,writable:!1},exposed:{configurable:!0,enumerable:!1,get:()=>n}};for(let[e,t]of Object.entries(i))try{Object.defineProperty(r,e,t)}catch{`value`in t&&(r[e]=t.value)}let a={$:{configurable:!0,enumerable:!1,value:e,writable:!1},$el:{configurable:!0,enumerable:!1,value:e,writable:!1}};for(let[e,n]of Object.entries(a))try{Object.defineProperty(t,e,n)}catch{t[e]=n.value}return e=>{n=e}}function T(e){return e.startsWith(`__wv_`)}function E(C){let{target:E,runtime:D,runtimeWithDefaults:O,runtimeState:k,runtimeProxy:A,setup:j}=C,M=E.properties||{},N=v(E,k,M),P=n(Object.create(null)),F=new Set(Array.isArray(E[S])?E[S]:[]),I=e=>typeof k==`object`&&!!k&&c(k,e);(()=>{let e=E.properties&&typeof E.properties==`object`?E.properties:void 0;for(let t of Object.keys(P))(!e||!c(e,t)||T(t)||F.has(t)||I(t))&&delete P[t];if(e)for(let[t,n]of Object.entries(e))T(t)||F.has(t)||I(t)||(P[t]=n)})();try{Object.defineProperty(E,y,{value:P,configurable:!0,enumerable:!1,writable:!1})}catch{E[y]=P}let L=p(E,O),R=w(E,L),z=f(k,N),B=O.setupState??Object.create(null);_(k,B);let V=m({props:N,runtime:O,state:k,proxy:A,bindModel:D.bindModel.bind(O),watch:D.watch.bind(O),instance:L,emit:(e,...t)=>{let{detail:n,options:r}=d(t),i=u(e);L.triggerEvent(i,n,r)},expose:e=>{E[x]=e,R(e)},attrs:P,slots:z}),H=e(!0),U=i(),W=a(),G=()=>{i()===E&&a()===V&&(s(W),o(U))};E[b]=H,o(E),s(V);try{let e=H.run(()=>g(j,N,V)),n=!1;if(e&&typeof e==`object`){let i=e,a=D.setupState&&typeof D.setupState==`object`?r(D.setupState)?t(D.setupState):D.setupState:Object.create(null);Object.keys(i).forEach(e=>{let t=i[e],r=h(a,i,e);if(typeof t==`function`&&!r){let r=(...e)=>t.apply(D.proxy,e);D.methods[e]=r,D.state[e]=r,a[e]=r,n=!0}else l(t)&&D.__wevu_trackSetupReactiveKey?.(e),D.state[e]=t,r||(a[e]=t)})}n&&D.__wevu_touchSetupMethodsVersion?.()}finally{G()}}export{E as runRuntimeSetupPhase};
|
|
@@ -6,14 +6,17 @@ import "../types.mjs";
|
|
|
6
6
|
import { WatchMap } from "./watch.mjs";
|
|
7
7
|
//#region src/runtime/register/runtimeInstance.d.ts
|
|
8
8
|
type RuntimeSetupFunction<D extends object, C extends ComputedDefinitions, M extends MethodDefinitions> = DefineComponentOptions<ComponentPropsOptions, D, C, M>['setup'] | DefineAppOptions<D, C, M>['setup'];
|
|
9
|
+
interface RuntimeMountOptions {
|
|
10
|
+
deferSetData?: boolean;
|
|
11
|
+
snapshotOmitKeys?: string[];
|
|
12
|
+
attached?: boolean;
|
|
13
|
+
layoutParent?: InternalRuntimeState;
|
|
14
|
+
}
|
|
9
15
|
/**
|
|
10
16
|
* 挂载运行时实例(框架内部注册流程使用)。
|
|
11
17
|
* @internal
|
|
12
18
|
*/
|
|
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
|
-
deferSetData?: boolean;
|
|
15
|
-
snapshotOmitKeys?: string[];
|
|
16
|
-
}): RuntimeInstance<D, C, M>;
|
|
19
|
+
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?: RuntimeMountOptions): RuntimeInstance<D, C, M>;
|
|
17
20
|
export declare function setRuntimeSetDataVisibility(target: InternalRuntimeState, visible: boolean): void;
|
|
18
21
|
/**
|
|
19
22
|
* 卸载运行时实例(框架内部注册流程使用)。
|
|
@@ -21,5 +24,6 @@ export declare function setRuntimeSetDataVisibility(target: InternalRuntimeState
|
|
|
21
24
|
*/
|
|
22
25
|
export declare function teardownRuntimeInstance(target: InternalRuntimeState, options?: {
|
|
23
26
|
skipHooks?: boolean;
|
|
27
|
+
preserveNativeDeclarationChildren?: boolean;
|
|
24
28
|
}): void;
|
|
25
29
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
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 y,WEVU_SLOT_OWNER_ID_KEY as ge,WEVU_WATCH_STOPS_KEY as b}from"@weapp-core/constants";const x=/* @__PURE__ */ new WeakMap;function S(e,t=/* @__PURE__ */ 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(S(r,t));return n}let n={};t.set(e,n);for(let[r,i]of Object.entries(e))n[r]=S(i,t);return n}function _e(e,t){let n=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:/* @__PURE__ */ 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 ve(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?.has(e)||(a[e]=S(t));if(n)for(let[e,t]of Object.entries(n))i?.has(e)||(a[e]=S(t));return a}function ye(e){return!!e?.__wevuHasTemplateRuntimeBindings}function C(e,n,c,l,u){if(e.__wevu)return e.__wevu;let f=n.__wevuSetDataOptions,p=ye(n)?o(`scopedSlots`,`mountRuntimeInstance(scoped-slot bindings)`):void 0,m=p?.prepareMount(e),h=e.__wevuTemplateRefs;Array.isArray(h)&&h.length&&o(`templateRefs`,`mountRuntimeInstance(template refs)`);let _=a(f?.highFrequencyWarning)?o(`setDataHighFrequencyWarning`,`mountRuntimeInstance(setData.highFrequencyWarning)`):void 0;ie(e,n),ne(e);let y=!!f?.suspendWhenHidden,C=typeof e.route==`string`&&e.route?`page:${e.route}`:typeof e.is==`string`&&e.is?`component:${e.is}`:`unknown-target`,w=_?.createMonitor({option:f?.highFrequencyWarning,targetLabel:C,isInPageScrollHook:()=>Number(e[me]??0)>0}),T=!0,E=!u?.deferSetData,D=!1,O=0,A,j,M,N=[],P=!(g in e),F=0,I=!1,L,R,z,B,V=()=>{!F&&!A&&!R&&(I=!1,L=void 0)},H=()=>{F||A||(I?B?.(L):z?.(),R=void 0,z=void 0,B=void 0)},be=()=>{P&&(F+=1)},U=(e=`committed`,t)=>{P&&!D&&(e===`failed`&&!I&&(I=!0,L=t),--F,H())},xe=e=>U(`failed`,e);P&&Object.defineProperty(e,g,{configurable:!0,enumerable:!1,get:()=>!F&&!A?I?Promise.reject(L):void 0:(R??(R=new Promise((e,t)=>{z=e,B=t})),R)});let W=()=>{m&&s.scopedSlots?.refresh(e,m)},G=()=>{if(D)return;let t=e.__wevuTemplateRefs;if(!s.templateRefs&&(!Array.isArray(t)||!t.length)){P&&U();return}o(`templateRefs`,`mountRuntimeInstance(template ref completion)`).schedule(e,P?U:void 0,e,P?xe:void 0)},Se=()=>{m&&p?.syncNativeOwnerId(e,m)},Ce=e=>{let t={settle:e,next:void 0};M?M.next=t:j=t,M=t},K=(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}},we=(t,n)=>{let r=O;be(),W(),d({invoke:n=>{let r=ue(e);if(!r){n();return}return ce(e,r,t,n)},completion:`callback`,settle:(e,t)=>{if(!(D||r!==O)){if(e!==`committed`){U(e,t),n(e,t);return}try{n(e,t)}catch(e){throw U(`failed`,e),e}G()}}})},Te=()=>{if(!A)return;let e=A,t=j,n=N;A=void 0,j=void 0,M=void 0,N=[],we(e,(e,r)=>{if(e===`committed`){try{for(let e of n)e()}finally{K(t,e,r)}return}K(t,e,r)})},Ee=()=>{let e=j;A=void 0,j=void 0,M=void 0,N=[],K(e,`abandoned`),H()},De=e=>{V(),A=_e(A,e)},q={setData(t,n){if(w?.(),!E||y&&!T){De(t),n&&N.push(n),W();return}W(),V(),be();let r=ue(e);if(!r){try{n?.()}catch(e){throw U(`failed`,e),e}G();return}let i=!0,a=!1,o=!1,s=!1,c=e=>{s||(s=!0,U(`failed`,e))},l=()=>{s||(s=!0,G())},u=()=>{try{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(w?.(),D){t(`abandoned`);return}if(!E||y&&!T){De(e),Ce(t),W();return}V(),we(e,t)},__wevu_enableSetData(e=!1){if(E=!0,e){Ee();return}Te()},__wevu_setVisibility(e){T=e,T&&E&&Te()},__wevu_disposeSetData(){D||(D=!0,O+=1,A=void 0,j=void 0,M=void 0,N=[],F=0,I=!1,L=void 0,H(),P&&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:C,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?.snapshotOmitKeys)&&u.snapshotOmitKeys.length&&Object.defineProperty(q,"__wevu_snapshotOmitKeys",{configurable:!0,enumerable:!1,value:u.snapshotOmitKeys,writable:!1});let Y=ve(e,u?.snapshotOmitKeys);Y&&Object.keys(Y).length&&Object.defineProperty(q,"__wevu_initialSnapshot",{configurable:!0,enumerable:!1,value:Y,writable:!1}),m&&Object.defineProperty(q,"__wevu_initialState",{configurable:!0,enumerable:!1,value:{[ge]:m.ownerId},writable:!1}),(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 X=n.mount(q);oe(X,e);let Oe=X?.proxy??{},Z=X?.state??{},ke=X?.setupState??Object.create(null);Z&&typeof Z==`object`&&(se(Z,X),ae(Z,e));let Ae=X?.computed??Object.create(null);if(!X?.methods)try{X.methods=Object.create(null)}catch{}let je=X?.methods??Object.create(null),Me=X?.watch??(()=>te()),Ne=X?.bindModel??(()=>{}),Q={...X??{},state:Z,setupState:ke,proxy:Oe,methods:je,computed:Ae,watch:Me,bindModel:Ne,snapshot:X?.snapshot??(()=>Object.create(null)),unmount:X?.unmount??(()=>{})};Object.defineProperty(Q,"__wevu_initialRuntimeSnapshot",{configurable:!0,enumerable:!1,value:S(Z),writable:!1});let Pe=Q,Fe={__wevu_flushSetupSnapshotSync:X.__wevu_flushSetupSnapshotSync,__wevu_touchSetupMethodsVersion:X.__wevu_touchSetupMethodsVersion,__wevu_trackSetupReactiveKey:X.__wevu_trackSetupReactiveKey,__wevu_cloneDispatchedSnapshot:X.__wevu_cloneDispatchedSnapshot,[he]:X[he]};for(let[e,t]of Object.entries(Fe))t&&Object.defineProperty(Q,e,{configurable:!0,enumerable:!1,value:t,writable:!0});Object.defineProperty(e,v,{value:Q,configurable:!0,enumerable:!1,writable:!1}),e.__wevu=Q;let Ie=le(e,Z);ee(Z,Ie),m&&p?.attachMount(e,Q,m,!!u?.deferSetData),Se();let $=c?fe(Q,c,e,{deferMissingSourceBaseline:!!l}):[];if($.length&&(e[b]=$),l)try{if(de({target:e,runtime:X,runtimeWithDefaults:Q,runtimeState:Z,runtimeProxy:Oe,setup:l}),typeof r()?.[pe]?.trackWevuComponent==`function`){let e={};for(let[n,r]of Object.entries(Q.setupState??{}))t(r)&&(e[n]=S(r));x.set(Q,e)}u?.deferSetData||Pe.__wevu_flushSetupSnapshotSync?.(),u?.deferSetData||W();for(let e of $)e.resume()}catch(t){try{k(e,{skipHooks:!0})}catch{}throw t}else!u?.deferSetData&&e.properties&&typeof e.properties==`object`&&Object.keys(e.properties).length>0&&(Pe.__wevu_flushSetupSnapshotSync?.(),W());return re(e,X),X}function w(e,t,n){for(let e of Reflect.ownKeys(t))Reflect.has(n,e)||Reflect.getOwnPropertyDescriptor(t,e)?.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{try{t[e]=n[e]}catch{}}}se(t.state,t);let r=x.get(n);return r&&x.set(t,r),e.__wevu=t,Object.defineProperty(e,v,{value:t,configurable:!0,enumerable:!1,writable:!1}),t}function T(e,r,i){let a=e.state,o=e.setupState,s={};for(let e of Object.keys(r??{})){if(!Object.prototype.hasOwnProperty.call(a,e))continue;let r=o?.[e];if(!o||!Object.prototype.hasOwnProperty.call(o,e)||n(r)||t(r)){if(i&&Object.prototype.hasOwnProperty.call(i,e)){s[e]=S(i[e]);continue}s[e]=S(n(r)?r.value:a[e])}}return s}function E(e,r){let i=e.__wevu,a=i?.state,o=i?.setupState,s=r?.nativeData??e.data;if(!a||typeof a!=`object`||!s||typeof s!=`object`)return;let c=i?.__wevu_initialRuntimeSnapshot;for(let[e,i]of Object.entries(s))if(e&&e!==`undefined`&&Object.prototype.hasOwnProperty.call(a,e))try{let s=o?.[e],l=S(i);if(o&&Object.prototype.hasOwnProperty.call(o,e)&&(!r?.includeSetupState||!n(s)&&!t(s))||!r?.includeSetupState&&c&&Object.prototype.hasOwnProperty.call(c,e)&&!u(a[e],c[e],20,{keys:1e4})||!r?.includeSetupState&&c&&!Object.prototype.hasOwnProperty.call(c,e))continue;if(n(s)){s.value=l;continue}if(t(s)&&l&&typeof l==`object`){f(s,l,r?.initialSetupState?.[e]);continue}a[e]=l}catch{}}function D(e,t){let n=e.__wevu?.adapter;E(e,{includeSetupState:t?.rehydrateSetupState}),n?.__wevu_enableSetData?.(!0),e.__wevu?.__wevu_flushSetupSnapshotSync?.()}function O(e,t){(e.__wevu?.adapter)?.__wevu_setVisibility?.(t)}function k(t,n){let r=t.__wevu,a=t[b],l=t[p];c([()=>{if(!n?.skipHooks&&r&&t[h]?.[_]){if(l?.active)l.run(()=>i(t,_));else{let n=e(!0);c([()=>n.run(()=>i(t,_)),()=>n.stop()])}}},()=>s.scopedSlots?.teardown(t),()=>{Array.isArray(t.__wevuTemplateRefs)&&t.__wevuTemplateRefs.length>0&&o(`templateRefs`,`teardownRuntimeInstance(template refs)`).clear(t)},()=>{!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{}},()=>{t[b]=void 0},()=>{l?.stop()},()=>{t[p]=void 0},()=>r?.unmount(),()=>{(r?.adapter)?.__wevu_disposeSetData?.()},()=>{delete t[y],delete t[m]},()=>{delete t.__wevu},()=>{v in t&&delete t[v]}])}function A(e,t,n,r,i){let a=e.__wevu,o=a?x.get(a):void 0,s=a?T(a,e.data,i?.stateSnapshot):void 0;k(e,{skipHooks:!0});let c=C(e,t,n,r,{deferSetData:!0,snapshotOmitKeys:i?.snapshotOmitKeys}),l=s??(i?.stateSnapshot?T(c,i.stateSnapshot,i.stateSnapshot):void 0);if(l){let t=e.data;t&&typeof t==`object`&&Object.assign(t,S(l)),E(e,{includeSetupState:!0,nativeData:l,initialSetupState:o})}return!a||a===c?c:w(e,a,c)}export{D as enableDeferredSetData,C as mountRuntimeInstance,A as refreshRuntimeInstance,O as setRuntimeSetDataVisibility,k 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{observePhysicalDispatch as l}from"../app/setData/observation.mjs";import{applySnapshotUpdate as u,isDeepEqualValue as d}from"../app/setData/snapshot.mjs";import{observeSetDataCompletion as ee}from"../app/setData/commitTracker.mjs";import{isRuntimeLayoutComponentTarget as f}from"../layoutComponentMatcher.mjs";import{attachRuntimeSlots as te,createNoopWatchStopHandle as ne,safeMarkNoSetData as re}from"./runtimeInstance/setupContext.mjs";import{bridgeRuntimeMethodsToTarget as ie}from"./runtimeInstance/methodBridge.mjs";import{releaseNativeDeclaration as p}from"./runtimeInstance/nativeDeclaration.mjs";import{attachRuntimeProvideParentContext as ae}from"./runtimeInstance/provideContext.mjs";import{attachNativeInstanceRef as oe,attachRuntimeInstance as se,attachRuntimeRef as m,callNativeSetData as ce,ensureRuntimeProps as le,resolveNativeSetData as ue}from"./runtimeInstance/utils.mjs";import{runRuntimeSetupPhase as de}from"./runtimeInstance/setupPhase.mjs";import{restoreReactiveSetupSnapshot as h}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 g,WEVU_EXPOSED_KEY as me,WEVU_HOOKS_KEY as _,WEVU_HOST_COMMIT_PROMISE_KEY as v,WEVU_ON_BEFORE_UNMOUNT_HOOK as y,WEVU_PAGE_SCROLL_HOOK_DEPTH_KEY as he,WEVU_PARENT_INSTANCE_KEY as b,WEVU_PROPS_DERIVED_KEYS_KEY as ge,WEVU_PROVIDES_KEY as x,WEVU_PUBLIC_RUNTIME_KEY as S,WEVU_RUNTIME_APP_KEY as C,WEVU_SETUP_CONTEXT_INSTANCE_KEY as w,WEVU_SLOT_OWNER_ID_KEY as _e,WEVU_WATCH_STOPS_KEY as T}from"@weapp-core/constants";const E=/* @__PURE__ */ new WeakMap;function D(e,t=/* @__PURE__ */ 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 ve(e,t){let n=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]};u(i,`value.${e.slice(t.length+1)}`,r,`set`,{cloneValue:!1,clonedParents:/* @__PURE__ */ 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 ye(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?.has(e)||(a[e]=D(t));if(n)for(let[e,t]of Object.entries(n))i?.has(e)||(a[e]=D(t));return a}function be(e){return!!e?.__wevuHasTemplateRuntimeBindings}function O(e,t,n,r,i){if(e.__wevu)return import.meta.env?.PROD!==!0&&e[C]&&e[C]!==t?I(e,t,n,r,{snapshotOmitKeys:i?.snapshotOmitKeys,attached:i?.attached}):e.__wevu;try{return k(e,t,n,r,i)}catch(t){try{F(e,{skipHooks:!0})}catch{}throw t}}function k(e,n,c,u,d){let f=n.__wevuSetDataOptions,p=be(n)?o(`scopedSlots`,`mountRuntimeInstance(scoped-slot bindings)`):void 0,h=p?.prepareMount(e),g=e.__wevuTemplateRefs;Array.isArray(g)&&g.length&&o(`templateRefs`,`mountRuntimeInstance(template refs)`);let me=a(f?.highFrequencyWarning)?o(`setDataHighFrequencyWarning`,`mountRuntimeInstance(setData.highFrequencyWarning)`):void 0;ae(e,n,d?.attached,d?.layoutParent),re(e);let _=!!f?.suspendWhenHidden,y=typeof e.route==`string`&&e.route?`page:${e.route}`:typeof e.is==`string`&&e.is?`component:${e.is}`:`unknown-target`,b=me?.createMonitor({option:f?.highFrequencyWarning,targetLabel:y,isInPageScrollHook:()=>Number(e[he]??0)>0}),x=!0,C=!d?.deferSetData,w=!1,O=0,k,A,j,M,N=[],P=!(v in e),F=0,I=!1,L,R,z,B,V=()=>{!F&&!k&&!R&&(I=!1,L=void 0)},H=()=>{F||k||(I?B?.(L):z?.(),R=void 0,z=void 0,B=void 0)},xe=()=>{P&&(F+=1)},U=(e=`committed`,t)=>{P&&!w&&(e===`failed`&&!I&&(I=!0,L=t),--F,H())},Se=e=>U(`failed`,e);P&&Object.defineProperty(e,v,{configurable:!0,enumerable:!1,get:()=>!F&&!k?I?Promise.reject(L):void 0:(R??(R=new Promise((e,t)=>{z=e,B=t})),R)});let W=()=>{h&&s.scopedSlots?.refresh(e,h)},G=()=>{if(w)return;let t=e.__wevuTemplateRefs;!s.templateRefs&&(!Array.isArray(t)||!t.length)?P&&U():o(`templateRefs`,`mountRuntimeInstance(template ref completion)`).schedule(e,P?U:void 0,e,P?Se:void 0)},Ce=()=>{h&&p?.syncNativeOwnerId(e,h)},we=(e,t)=>{let n={settle:e,next:void 0};j?j.next=n:A=n,j=n,t&&(M??(M=[])).push(t)},K=(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}},Te=(t,n,r)=>{let i=O;xe(),W(),ee({observer:r,invoke:n=>{let i=ue(e);if(!i)n();else return r&&l(r,t),ce(e,i,t,n)},completion:`callback`,settle:(e,t)=>{if(!(w||i!==O)){if(e!==`committed`)U(e,t),n(e,t);else{try{n(e,t)}catch(e){throw U(`failed`,e),e}G()}}}})},Ee=()=>{if(!k)return;let e=k,t=A,n=N;k=void 0,A=void 0,j=void 0,N=[];let r=M;M=void 0,Te(e,(e,r)=>{if(e===`committed`)try{for(let e of n)e()}finally{K(t,e,r)}else K(t,e,r)},r&&{dispatch:e=>r.forEach(t=>t.dispatch(e)),returned:e=>r.forEach(t=>t.returned(e)),complete:e=>r.forEach(t=>t.complete(e))})},De=()=>{M=void 0;let e=A;k=void 0,A=void 0,j=void 0,N=[],K(e,`abandoned`),H()},Oe=e=>{V(),k=ve(k,e)},q={setData(t,n){if(b?.(),!C||_&&!x){Oe(t),n&&N.push(n),W();return}W(),V(),xe();let r=ue(e);if(!r){try{n?.()}catch(e){throw U(`failed`,e),e}G();return}let i=!0,a=!1,o=!1,s=!1,c=e=>{s||(s=!0,U(`failed`,e))},l=()=>{s||(s=!0,G())},u=()=>{try{n?.()}catch(e){throw c(e),e}i?a=!0: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,n){b?.(),w?t(`abandoned`):!C||_&&!x?(Oe(e),we(t,n),W()):(V(),Te(e,t,n))},__wevu_enableSetData(e=!1){C=!0,e?De():Ee()},__wevu_setVisibility(e){x=e,x&&C&&Ee()},__wevu_disposeSetData(){w||(w=!0,O+=1,k=void 0,A=void 0,j=void 0,N=[],F=0,I=!1,L=void 0,H(),P&&Reflect.deleteProperty(e,v))}};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:y,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(d?.snapshotOmitKeys)&&d.snapshotOmitKeys.length&&Object.defineProperty(q,"__wevu_snapshotOmitKeys",{configurable:!0,enumerable:!1,value:d.snapshotOmitKeys,writable:!1});let Y=ye(e,d?.snapshotOmitKeys);Y&&Object.keys(Y).length&&Object.defineProperty(q,"__wevu_initialSnapshot",{configurable:!0,enumerable:!1,value:Y,writable:!1}),h&&Object.defineProperty(q,"__wevu_initialState",{configurable:!0,enumerable:!1,value:{[_e]:h.ownerId},writable:!1}),(d?.deferSetData||u||J&&typeof J==`object`&&Object.keys(J).length>0)&&Object.defineProperty(q,"__wevu_deferInitialSnapshot",{configurable:!0,enumerable:!1,value:!0,writable:!1});let X=n.mount(q);se(X,e);let ke=X?.proxy??{},Z=X?.state??{},Ae=X?.setupState??Object.create(null);Z&&typeof Z==`object`&&(m(Z,X),oe(Z,e));let je=X?.computed??Object.create(null);if(!X?.methods)try{X.methods=Object.create(null)}catch{}let Me=X?.methods??Object.create(null),Ne=X?.watch??(()=>ne()),Pe=X?.bindModel??(()=>{}),Q={...X??{},state:Z,setupState:Ae,proxy:ke,methods:Me,computed:je,watch:Ne,bindModel:Pe,snapshot:X?.snapshot??(()=>Object.create(null)),unmount:X?.unmount??(()=>{})};Object.defineProperty(Q,"__wevu_initialRuntimeSnapshot",{configurable:!0,enumerable:!1,value:D(Z),writable:!1});let Fe=Q,Ie={__wevu_flushSetupSnapshotSync:X.__wevu_flushSetupSnapshotSync,__wevu_touchSetupMethodsVersion:X.__wevu_touchSetupMethodsVersion,__wevu_trackSetupReactiveKey:X.__wevu_trackSetupReactiveKey,__wevu_cloneDispatchedSnapshot:X.__wevu_cloneDispatchedSnapshot,[ge]:X[ge]};for(let[e,t]of Object.entries(Ie))t&&Object.defineProperty(Q,e,{configurable:!0,enumerable:!1,value:t,writable:!0});Object.defineProperty(e,S,{value:Q,configurable:!0,enumerable:!1,writable:!1}),e.__wevu=Q;let Le=le(e,Z);te(Z,Le),h&&p?.attachMount(e,Q,h,!!d?.deferSetData),Ce();let $=c?fe(Q,c,e,{deferMissingSourceBaseline:!!u}):[];if($.length&&(e[T]=$),u){if(de({target:e,runtime:X,runtimeWithDefaults:Q,runtimeState:Z,runtimeProxy:ke,setup:u}),import.meta.env?.PROD!==!0&&typeof r()?.[pe]?.trackWevuComponent==`function`){let e={};for(let[n,r]of Object.entries(Q.setupState??{}))t(r)&&(e[n]=D(r));E.set(Q,e)}d?.deferSetData||Fe.__wevu_flushSetupSnapshotSync?.(),d?.deferSetData||W();for(let e of $)e.resume()}else!d?.deferSetData&&e.properties&&typeof e.properties==`object`&&Object.keys(e.properties).length>0&&(Fe.__wevu_flushSetupSnapshotSync?.(),W());return ie(e,X),X}function A(e,t,n){for(let e of Reflect.ownKeys(t))Reflect.has(n,e)||Reflect.getOwnPropertyDescriptor(t,e)?.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{try{t[e]=n[e]}catch{}}}m(t.state,t);let r=E.get(n);return r&&E.set(t,r),e.__wevu=t,Object.defineProperty(e,S,{value:t,configurable:!0,enumerable:!1,writable:!1}),t}function j(e,r,i){let a=e.state,o=e.setupState,s={};for(let e of Object.keys(r??{})){if(!Object.prototype.hasOwnProperty.call(a,e))continue;let r=o?.[e];(!o||!Object.prototype.hasOwnProperty.call(o,e)||n(r)||t(r))&&(s[e]=i&&Object.prototype.hasOwnProperty.call(i,e)?D(i[e]):D(n(r)?r.value:a[e]))}return s}function M(e,r){let i=e.__wevu,a=i?.state,o=i?.setupState,s=r?.nativeData??e.data;if(!a||typeof a!=`object`||!s||typeof s!=`object`)return;let c=i?.__wevu_initialRuntimeSnapshot;for(let[e,i]of Object.entries(s))if(e&&e!==`undefined`&&Object.prototype.hasOwnProperty.call(a,e))try{let s=o?.[e],l=D(i);if(o&&Object.prototype.hasOwnProperty.call(o,e)&&(!r?.includeSetupState||!n(s)&&!t(s))||!r?.includeSetupState&&c&&Object.prototype.hasOwnProperty.call(c,e)&&!d(a[e],c[e],20,{keys:1e4})||!r?.includeSetupState&&c&&!Object.prototype.hasOwnProperty.call(c,e))continue;if(n(s)){s.value=l;continue}if(t(s)&&l&&typeof l==`object`){h(s,l,r?.initialSetupState?.[e]);continue}a[e]=l}catch{}}function N(e,t){let n=e.__wevu?.adapter;M(e,{includeSetupState:t?.rehydrateSetupState}),n?.__wevu_enableSetData?.(!0),e.__wevu?.__wevu_flushSetupSnapshotSync?.()}function P(e,t){(e.__wevu?.adapter)?.__wevu_setVisibility?.(t)}function F(t,n){let r=t.__wevu,a=t[T],l=t[g];c([()=>{if(!n?.skipHooks&&r&&t[_]?.[y]){if(l?.active)l.run(()=>i(t,y));else{let n=e(!0);c([()=>n.run(()=>i(t,y)),()=>n.stop()])}}},...!import.meta.env?.PLATFORM||import.meta.env?.PLATFORM===`weapp`?[()=>p(t,n?.preserveNativeDeclarationChildren)]:[],()=>s.scopedSlots?.teardown(t),()=>{Array.isArray(t.__wevuTemplateRefs)&&t.__wevuTemplateRefs.length>0&&o(`templateRefs`,`teardownRuntimeInstance(template refs)`).clear(t)},()=>{!n?.skipHooks&&r&&t[_]&&i(t,`onUnload`,[])},()=>{t[_]&&(t[_]=void 0)},()=>{if(Array.isArray(a))for(let e of a)try{e()}catch{}},()=>{t[T]=void 0},()=>{l?.stop()},()=>{t[g]=void 0},()=>r?.unmount(),()=>{(r?.adapter)?.__wevu_disposeSetData?.()},()=>{delete t[w],delete t[me]},()=>{delete t.__wevu},()=>{S in t&&delete t[S]},()=>{delete t[b]},()=>{delete t[x]},()=>{delete t[C]}])}function I(e,t,n,r,i){let a=e.__wevu,o=a?E.get(a):void 0,s=a?j(a,e.data,i?.stateSnapshot):void 0,c=e[b],l=c&&f(c)?c:void 0;F(e,{skipHooks:!0,preserveNativeDeclarationChildren:!0});let u=O(e,t,n,r,{deferSetData:!0,snapshotOmitKeys:i?.snapshotOmitKeys,attached:i?.attached,layoutParent:l}),d=s??(i?.stateSnapshot?j(u,i.stateSnapshot,i.stateSnapshot):void 0);if(d){let t=e.data;t&&typeof t==`object`&&Object.assign(t,D(d)),M(e,{includeSetupState:!0,nativeData:d,initialSetupState:o})}return!a||a===u?u:A(e,a,u)}export{N as enableDeferredSetData,O as mountRuntimeInstance,I as refreshRuntimeInstance,P as setRuntimeSetDataVisibility,F as teardownRuntimeInstance};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{toRaw as e}from"../reactivity/reactive/shared.mjs";import{touchReactive as t}from"../reactivity/reactive/patch.mjs";import{isReactive as n}from"../reactivity/reactive.mjs";import{isRef as r}from"../reactivity/ref.mjs";function i(e){if(Object.prototype.toString.call(e)!==`[object Object]`)return!1;let t=Object.getPrototypeOf(e);return t===null||t===Object.prototype}function a(e){return Array.isArray(e)||i(e)}function o(e){if(Array.isArray(e))return e;let t=[];for(let n of Object.keys(e)){let r=Object.getOwnPropertyDescriptor(e,n);r&&typeof r.get!=`function`&&t.push(r.value)}return t}function s(e,t=/* @__PURE__ */ new WeakSet){return r(e)||n(e)?!0:!e||typeof e!=`object`||t.has(e)||(t.add(e),!a(e))?!1:o(e).some(e=>s(e,t))}function c(i,s=/* @__PURE__ */ new WeakSet){if(r(i)){let e=i.value;n(e)&&t(e),c(e,s)
|
|
1
|
+
import{toRaw as e}from"../reactivity/reactive/shared.mjs";import{touchReactive as t}from"../reactivity/reactive/patch.mjs";import{isReactive as n}from"../reactivity/reactive.mjs";import{isRef as r}from"../reactivity/ref.mjs";function i(e){if(Object.prototype.toString.call(e)!==`[object Object]`)return!1;let t=Object.getPrototypeOf(e);return t===null||t===Object.prototype}function a(e){return Array.isArray(e)||i(e)}function o(e){if(Array.isArray(e))return e;let t=[];for(let n of Object.keys(e)){let r=Object.getOwnPropertyDescriptor(e,n);r&&typeof r.get!=`function`&&t.push(r.value)}return t}function s(e,t=/* @__PURE__ */ new WeakSet){return r(e)||n(e)?!0:!e||typeof e!=`object`||t.has(e)||(t.add(e),!a(e))?!1:o(e).some(e=>s(e,t))}function c(i,s=/* @__PURE__ */ new WeakSet){if(r(i)){let e=i.value;n(e)&&t(e),c(e,s)}else n(i)?(t(i),c(e(i),s)):i&&typeof i==`object`&&!s.has(i)&&a(i)&&(s.add(i),o(i).forEach(e=>c(e,s)))}export{s as hasTrackableSetupBinding,c as touchSetupBinding};
|
|
@@ -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{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=/* @__PURE__ */ 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 a of e.completions)try{t?a.onRejected?a.onRejected(n):r||(r=!0,i=n):a.onResolved?.()}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?.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=>{if(!_(e))return;let r=i(p),a=/* @__PURE__ */ new Map,o=/* @__PURE__ */ new Set,s=e.runtime?.proxy??u;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(s,t)}else n.fn.call(s,t.inFor&&Array.isArray(r)?null:r??null)
|
|
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=/* @__PURE__ */ 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 a of e.completions)try{t?a.onRejected?a.onRejected(n):r||(r=!0,i=n):a.onResolved?.()}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?.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=>{if(!_(e))return;let r=i(p),a=/* @__PURE__ */ new Map,o=/* @__PURE__ */ new Set,s=e.runtime?.proxy??u;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(s,t)}else n.fn.call(s,t.inFor&&Array.isArray(r)?null:r??null)}else if(n.type===`ref`)n.ref.value=r;else if(n.type===`name`){o.add(n.name);let e=a.get(n.name)??{values:[],count:0,hasFor:!1};e.count+=1,e.hasFor=e.hasFor||t.inFor,t.inFor?Array.isArray(r)&&e.values.push(...r):r!=null&&e.values.push(r),a.set(n.name,e)}}for(let[n,i]of a){if(!_(e))return;let a;if(a=i.values.length?i.hasFor||i.values.length>1||i.count>1?t(i.values):i.values[0]:i.hasFor?t([]):null,r[n]=a,!_(e))return;l(h,n,a)}for(let t of Object.keys(r)){if(!_(e))return;o.has(t)||delete r[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?.()}function x(t,n,r=t,i){if(!t[f]?.length){b(t,n);return}let a=h(t),o=a.pending;if(o&&o.assignmentTarget===r&&_(o)){(n||i)&&o.completions.push({onResolved:n,onRejected:i});return}let s=g(t,r);(n||i)&&s.completions.push({onResolved:n,onRejected:i}),a.pending=s,t[p]=!0,e(()=>{a.pending===s&&(a.pending=void 0,t[p]=!1),y(s)})}function S(e,n=e){let r=m.get(e);r&&(r.generation+=1,r.current=void 0,r.pending=void 0,e[p]=!1);let o=e[f];if(!o||!o.length)return;let s=i(n),d=e.__wevu?.proxy??e,h=/* @__PURE__ */ new Set,g=a(n);u([...o.map(r=>()=>{let i=c(n,r,e),a=r.inFor?t([]):null;i.type===`function`?i.fn.call(d,null):i.type===`ref`?i.ref.value=a:i.type===`name`&&(h.add(i.name),s[i.name]=a,l(g,i.name,a))}),()=>{for(let e of Object.keys(s))h.has(e)||delete s[e]}])}export{S as clearTemplateRefs,x as scheduleTemplateRefUpdate};
|
|
@@ -40,6 +40,7 @@ export interface InternalRuntimeStateFields {
|
|
|
40
40
|
__wevuAppProvides?: Record<PropertyKey, any>;
|
|
41
41
|
__wevuProvides?: Record<PropertyKey, any>;
|
|
42
42
|
__wevuParentInstance?: InternalRuntimeState;
|
|
43
|
+
__wevuNativeSlotContext?: boolean;
|
|
43
44
|
__wevuSetPageLayout?: (layout: string | false, props?: Record<string, any>) => void;
|
|
44
45
|
__wevuWatchStops?: WatchStopHandle[];
|
|
45
46
|
__wevuLayoutHostBridge?: Record<string, any>;
|
|
@@ -132,6 +132,12 @@ export interface SetDataSnapshotOptions {
|
|
|
132
132
|
* setData 调试信息回调(用于观测 patch 命中率/回退原因/payload 大小)。
|
|
133
133
|
*/
|
|
134
134
|
debug?: (info: SetDataDebugInfo) => void;
|
|
135
|
+
/**
|
|
136
|
+
* 通过 debug 回调额外观测 prepare、物理 dispatch 与提交结算,默认关闭。
|
|
137
|
+
* 按 revision 采样一次;同一次物理调用可关联多个 revision,按 dispatch.id 去重。
|
|
138
|
+
* callback / Promise / 同步返回均不等于可见视图完成;visibleAt 始终为 null。
|
|
139
|
+
*/
|
|
140
|
+
debugPhases?: boolean;
|
|
135
141
|
/**
|
|
136
142
|
* 内建诊断日志开关(默认 off)。
|
|
137
143
|
*
|
|
@@ -232,5 +238,29 @@ export interface SetDataDebugInfo {
|
|
|
232
238
|
bindings?: SetDataBindingDiagnostic[];
|
|
233
239
|
revision?: number;
|
|
234
240
|
committedRevision?: number;
|
|
241
|
+
/** 阶段观测;仅在显式开启 debugPhases 时提供。 */
|
|
242
|
+
phase?: {
|
|
243
|
+
version: 1;
|
|
244
|
+
observerId: number;
|
|
245
|
+
name: 'prepare' | 'dispatch' | 'commit';
|
|
246
|
+
result: 'prepared' | 'pending' | 'committed' | 'failed' | 'abandoned' | 'disposed' | 'late-committed' | 'late-failed' | 'out-of-order';
|
|
247
|
+
completion: 'unknown' | 'callback' | 'promise' | 'return' | 'throw';
|
|
248
|
+
/** Date.now 毫秒时间;不可用或时钟倒退时,持续时间为 null。 */
|
|
249
|
+
prepareStartedAt: number | null;
|
|
250
|
+
preparedAt: number;
|
|
251
|
+
prepareDurationMs: number | null;
|
|
252
|
+
settledAt: number | null;
|
|
253
|
+
commitDurationMs: number | null;
|
|
254
|
+
visibleAt: null;
|
|
255
|
+
/** 一个运行时模块实例内唯一的物理调用;缺失表示尚未下发或适配器无法观测。 */
|
|
256
|
+
dispatch: {
|
|
257
|
+
id: number;
|
|
258
|
+
startedAt: number;
|
|
259
|
+
returnedAt: number | null;
|
|
260
|
+
durationMs: number | null;
|
|
261
|
+
/** JSON 载荷 UTF-8 字节数;不含宿主协议封装,序列化失败时为 null。 */
|
|
262
|
+
payloadBytes: number | null;
|
|
263
|
+
} | null;
|
|
264
|
+
};
|
|
235
265
|
}
|
|
236
266
|
//#endregion
|
package/dist/scheduler.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=Promise.resolve(),t=/* @__PURE__ */ new Set,n=/* @__PURE__ */ new Set;let r=!1,i=!1,a,o;function s(){i=!1,r=!0,a=/* @__PURE__ */ new Set;let e=!1,o=!1,c,l=[];try{t.forEach(e=>{a?.add(e);try{let t=e();t&&typeof t.then==`function`&&l.push(t)}catch(e){o||(o=!0,c=e)}})}finally{t.clear(),a=void 0,r=!1,n.size&&(n.forEach(e=>t.add(e)),n.clear(),i=!0,e=!0)}if(l.length||e)return Promise.all(l).then(()=>e?s():void 0).then(()=>{if(o)throw c},e=>{throw o?c:e});if(o)throw c}function c(){let t=e.then(s);o=t;let n=()=>{o===t&&(o=void 0)};t.then(n,n)}function l(e){
|
|
1
|
+
const e=Promise.resolve(),t=/* @__PURE__ */ new Set,n=/* @__PURE__ */ new Set;let r=!1,i=!1,a,o;function s(){i=!1,r=!0,a=/* @__PURE__ */ new Set;let e=!1,o=!1,c,l=[];try{t.forEach(e=>{a?.add(e);try{let t=e();t&&typeof t.then==`function`&&l.push(t)}catch(e){o||(o=!0,c=e)}})}finally{t.clear(),a=void 0,r=!1,n.size&&(n.forEach(e=>t.add(e)),n.clear(),i=!0,e=!0)}if(l.length||e)return Promise.all(l).then(()=>e?s():void 0).then(()=>{if(o)throw c},e=>{throw o?c:e});if(o)throw c}function c(){let t=e.then(s);o=t;let n=()=>{o===t&&(o=void 0)};t.then(n,n)}function l(e){r&&a?.has(e)?n.add(e):(t.add(e),!r&&!i&&(i=!0,c()))}function u(t){let n=o??e;return t?n.then(t):n}export{u as nextTick,l as queueJob};
|
package/dist/web-apis.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
export{installRequestGlobals,installWebRuntimeGlobals}from"@wevu/web-apis";export*from"@wevu/web-apis";
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wevu",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "7.
|
|
4
|
+
"version": "7.5.0",
|
|
5
5
|
"description": "Vue 3 风格的小程序运行时,包含响应式、diff+setData 与轻量状态管理",
|
|
6
6
|
"author": "ice breaker <1324318532@qq.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -272,7 +272,7 @@
|
|
|
272
272
|
"registry": "https://registry.npmjs.org"
|
|
273
273
|
},
|
|
274
274
|
"engines": {
|
|
275
|
-
"node": "^
|
|
275
|
+
"node": "^22.18.0 || ^24.11.0 || >=26.0.0"
|
|
276
276
|
},
|
|
277
277
|
"peerDependencies": {
|
|
278
278
|
"miniprogram-api-typings": "^5.0.0",
|
|
@@ -291,12 +291,12 @@
|
|
|
291
291
|
}
|
|
292
292
|
},
|
|
293
293
|
"dependencies": {
|
|
294
|
-
"@weapp-core/constants": "0.
|
|
295
|
-
"@weapp-core/shared": "3.2.
|
|
296
|
-
"@weapp-core/types": "1.1.
|
|
297
|
-
"@wevu/api": "0.3.
|
|
298
|
-
"@wevu/compiler": "7.
|
|
299
|
-
"@wevu/web-apis": "1.3.
|
|
294
|
+
"@weapp-core/constants": "0.3.1",
|
|
295
|
+
"@weapp-core/shared": "3.2.8",
|
|
296
|
+
"@weapp-core/types": "1.1.6",
|
|
297
|
+
"@wevu/api": "0.3.8",
|
|
298
|
+
"@wevu/compiler": "7.5.0",
|
|
299
|
+
"@wevu/web-apis": "1.3.5",
|
|
300
300
|
"vue": "^3.5.43"
|
|
301
301
|
},
|
|
302
302
|
"devDependencies": {
|
|
@@ -308,7 +308,8 @@
|
|
|
308
308
|
"build:types": "tsdown --dts",
|
|
309
309
|
"test": "vitest run",
|
|
310
310
|
"test:dev": "vitest",
|
|
311
|
-
"test:types": "pnpm build:types &&
|
|
311
|
+
"test:types": "pnpm build:types && pnpm run test:types:check",
|
|
312
|
+
"test:types:check": "tsd --files \"test-d/**/*.test-d.{ts,tsx}\" && tsd --files \"test-d/router-named-map.test-types.ts\"",
|
|
312
313
|
"typecheck": "tsc --noEmit",
|
|
313
314
|
"release": "pnpm publish",
|
|
314
315
|
"lint": "eslint .",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "@wevu/api/vitest";
|
package/dist/dev/api.d.mts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "@wevu/api";
|
package/dist/dev/compiler.d.mts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "@wevu/compiler";
|
package/dist/dev/fetch.d.mts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { WeapiMiniProgramRequestMethod } from "@wevu/api";
|
|
2
|
-
import { RequestGlobalsFetchInit as WevuFetchInit, fetch } from "@wevu/web-apis/fetch";
|
|
3
|
-
//#region src/fetch.d.ts
|
|
4
|
-
export type WevuFetchInput = Parameters<typeof import('@wevu/web-apis/fetch').fetch>[0];
|
|
5
|
-
export type MiniProgramRequestMethod = WeapiMiniProgramRequestMethod;
|
|
6
|
-
export type WxRequestMethod = MiniProgramRequestMethod;
|
|
7
|
-
//#endregion
|
|
8
|
-
export { type WevuFetchInit, fetch };
|
|
9
|
-
//# sourceMappingURL=fetch.d.mts.map
|
package/dist/dev/index.d.mts
DELETED
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import { AlipayMiniProgramHostNamespace, AlipayMiniProgramHostSourceContract, DefaultMiniProgramHostNamespace, DefaultMiniProgramHostSourceContract, DouyinMiniProgramHostNamespace, DouyinMiniProgramHostSourceContract, MiniProgramHostNamespace, MiniProgramHostNamespaceBySource, MiniProgramHostSourceName, MiniProgramHostSourceRegistry, MiniProgramPlatformHostNamespaceBySource, MiniProgramPlatformHostSourceName, MiniProgramPlatformHostSourceRegistry, MiniProgramRuntimeHostNamespaceBySource, MiniProgramRuntimeHostSourceName, MiniProgramRuntimeHostSourceRegistry, TtMiniProgramHostNamespace, TtMiniProgramHostSourceContract, WechatMiniProgramHostNamespace, WechatMiniProgramHostSourceContract } from "./runtime/types/miniprogramHostSources.mjs";
|
|
2
|
-
import { HostMiniProgramAddToFavoritesOption, HostMiniProgramAppOptions, HostMiniProgramAppTrivialInstance, HostMiniProgramBehaviorIdentifier, HostMiniProgramBoundingClientRectResult, HostMiniProgramComponentAllFullProperty, HostMiniProgramComponentAllProperty, HostMiniProgramComponentBehaviorOptions, HostMiniProgramComponentEmptyArray, HostMiniProgramComponentInstance, HostMiniProgramComponentMethodOption, HostMiniProgramComponentPropertyOption, HostMiniProgramComponentPropertyValue, HostMiniProgramComponentShortProperty, HostMiniProgramComponentTrivialInstance, HostMiniProgramComponentTrivialOption, HostMiniProgramIntersectionObserver, HostMiniProgramIntersectionObserverOptions, HostMiniProgramLaunchOptions, HostMiniProgramMemoryWarningResult, HostMiniProgramNavigateToOption, HostMiniProgramNodesRef, HostMiniProgramNodesRefFields, HostMiniProgramPageLifetime, HostMiniProgramPageNotFoundOptions, HostMiniProgramPageResizeOption, HostMiniProgramPageScrollOption, HostMiniProgramPageTrivialInstance, HostMiniProgramReLaunchOption, HostMiniProgramRedirectToOption, HostMiniProgramRouter, HostMiniProgramSaveExitState, HostMiniProgramScrollOffsetResult, HostMiniProgramSelectorQuery, HostMiniProgramShareAppMessageOption, HostMiniProgramSwitchTabOption, HostMiniProgramTabItemTapOption, HostMiniProgramThemeChangeResult, HostMiniProgramTriggerEventOptions, HostMiniProgramUnhandledRejectionResult } from "./runtime/types/miniprogramHost.mjs";
|
|
3
|
-
import { MiniProgramAdapter, MiniProgramAppOptions, MiniProgramBehaviorIdentifier, MiniProgramComponentInstance, MiniProgramComponentOptions, MiniProgramComponentPropertyValue, MiniProgramComponentRawOptions, MiniProgramInstance, MiniProgramPageLifetimes } from "./runtime/types/miniprogram.mjs";
|
|
4
|
-
import { ComponentPropsOptions, ExtractDefaultPropTypes, ExtractPropTypes, ExtractPublicPropTypes, InferNativePropType, InferNativeProps, InferPropType, InferProps, NativePropType, NativePropsOptions, NativeTypeHint, NativeTypedProperty, PropConstructor, PropOptions, PropType } from "./runtime/types/props/propTypes.mjs";
|
|
5
|
-
import { MiniProgramRouterNavigateToOption, MiniProgramRouterReLaunchOption, MiniProgramRouterRedirectToOption, MiniProgramRouterSwitchTabOption, SetupContextRouter, WevuTypedRouterRouteMap } from "./runtime/types/props/router.mjs";
|
|
6
|
-
import { AsyncDerivation, AsyncDerivationContext, AsyncDerivationState, AsyncDerivationStatus, UseAsyncDerivationOptions, useAsyncDerivation } from "./reactivity/asyncDerivation.mjs";
|
|
7
|
-
import { CustomRefFactory, CustomRefOptions, CustomRefSource, MaybeRef, MaybeRefOrGetter, Ref, ShallowRef, customRef, isRef, ref, toValue, unref } from "./reactivity/ref.mjs";
|
|
8
|
-
import { ComputedGetter, ComputedRef, ComputedSetter, WritableComputedOptions, WritableComputedRef, computed } from "./reactivity/computed.mjs";
|
|
9
|
-
import { nextTick } from "./scheduler.mjs";
|
|
10
|
-
import { EffectScope, batch, effect, effectScope, endBatch, getCurrentScope, onScopeDispose, startBatch, stop } from "./reactivity/core.mjs";
|
|
11
|
-
import { MutationKind, MutationOp, MutationRecord, addMutationRecorder, removeMutationRecorder } from "./reactivity/reactive/mutation.mjs";
|
|
12
|
-
import { PrelinkReactiveTreeOptions, prelinkReactiveTree, touchReactive } from "./reactivity/reactive/patch.mjs";
|
|
13
|
-
import { isShallowReactive, shallowReactive } from "./reactivity/reactive/shallow.mjs";
|
|
14
|
-
import { toRaw } from "./reactivity/reactive/shared.mjs";
|
|
15
|
-
import { getReactiveVersion, isRaw, isReactive, markRaw, reactive } from "./reactivity/reactive.mjs";
|
|
16
|
-
import { isProxy, isReadonly, readonly, shallowReadonly } from "./reactivity/readonly.mjs";
|
|
17
|
-
import { isShallowRef, shallowRef, triggerRef } from "./reactivity/shallowRef.mjs";
|
|
18
|
-
import { ToRefs, toRef, toRefs } from "./reactivity/toRefs.mjs";
|
|
19
|
-
import { traverse } from "./reactivity/traverse.mjs";
|
|
20
|
-
import { MapSources, MaybeUndefined, MultiWatchSources, OnCleanup, WatchCallback, WatchEffect, WatchEffectOptions, WatchMultiSources, WatchOptions, WatchScheduler, WatchSource, WatchSourceValue, WatchSources, WatchStopHandle, getDeepWatchStrategy, setDeepWatchStrategy } from "./reactivity/watch/types.mjs";
|
|
21
|
-
import { watch, watchEffect, watchPostEffect, watchSyncEffect } from "./reactivity/watch.mjs";
|
|
22
|
-
import "./reactivity/index.mjs";
|
|
23
|
-
import { ComponentPublicInstance, ComputedDefinitions, ExtractComputed, ExtractMethods, MethodDefinitions, ModelBinding, ModelBindingOptions, ModelBindingPayload } from "./runtime/types/core.mjs";
|
|
24
|
-
import { AppConfig, InternalRuntimeState, InternalRuntimeStateFields, RuntimeApp, RuntimeInstance, WevuPlugin } from "./runtime/types/runtime.mjs";
|
|
25
|
-
import { SetupContext, SetupContextIntersectionObserver, SetupContextIntersectionObserverOptions, SetupContextNativeInstance, SetupContextSelectorQuery, SetupFunction } from "./runtime/types/props/setup.mjs";
|
|
26
|
-
import { AllowedComponentProps, ComponentCustomProps, ComponentOptionsMixin, DefineComponent, NativeComponent, ObjectDirective, PublicProps, ShallowUnwrapRef, VNode, VNodeProps } from "./vue-types.mjs";
|
|
27
|
-
import { SetDataBindingDiagnostic, SetDataDebugInfo, SetDataSnapshotOptions } from "./runtime/types/setData.mjs";
|
|
28
|
-
import { CreateAppOptions, DataOption, DefineAppOptions, DefineComponentOptions, PageFeatures } from "./runtime/types/options.mjs";
|
|
29
|
-
import { GlobalComponents, GlobalDirectives, MiniProgramTemplateRefValue, TemplateRefValue, TemplateRefs, WevuGlobalComponents, WevuGlobalDirectives } from "./runtime/types.mjs";
|
|
30
|
-
import "./runtime/templateRefTypes.mjs";
|
|
31
|
-
import "./vue-augment.mjs";
|
|
32
|
-
import { useCssModule } from "./runtime/css.mjs";
|
|
33
|
-
import { WevuDefaults, resetWevuDefaults } from "./runtime/defaults.mjs";
|
|
34
|
-
import { ComponentDefinition, DefineComponentTypePropsOptions, DefineComponentWithTypeProps, SetupContextWithTypeProps, SetupFunctionWithTypeProps, WevuComponentConstructor, WevuDefinedComponent } from "./runtime/define.mjs";
|
|
35
|
-
import { DisposableBag, DisposableLike, DisposableMethodName, DisposableObject, useDisposables } from "./runtime/disposables.mjs";
|
|
36
|
-
import { ElementIntersectionObserverCallback, UseElementIntersectionObserverOptions, UseElementIntersectionObserverReturn, useElementIntersectionObserver } from "./runtime/elementIntersectionObserver.mjs";
|
|
37
|
-
import { PageLayoutState, WevuPageLayoutMap } from "./runtime/pageLayout.mjs";
|
|
38
|
-
import { LayoutHostBinding } from "./runtime/capabilities.mjs";
|
|
39
|
-
import { LayoutBridgeInstance } from "./runtime/layoutBridge.mjs";
|
|
40
|
-
import { registerPageLayoutBridge, registerRuntimeLayoutHosts, resolveLayoutBridge, resolveLayoutHost, resolveRuntimePageLayoutName, setPageLayout, syncRuntimePageLayoutState, syncRuntimePageLayoutStateFromRuntime, unregisterPageLayoutBridge, unregisterRuntimeLayoutHosts, useLayoutBridge, useLayoutHosts, usePageLayout, waitForLayoutHost } from "./runtime/features/publicLayout.mjs";
|
|
41
|
-
import { callHookList, callHookReturn, getCurrentInstance, getCurrentSetupContext, setCurrentInstance, setCurrentSetupContext } from "./runtime/hooks/base.mjs";
|
|
42
|
-
import { onAddToFavorites, onAttached, onDetached, onError, onHide, onLaunch, onLoad, onMemoryWarning, onMoved, onPageNotFound, onPageScroll, onPullDownRefresh, onReachBottom, onReady, onResize, onRouteDone, onSaveExitState, onShareAppMessage, onShareTimeline, onShow, onTabItemTap, onThemeChange, onUnhandledRejection, onUnload } from "./runtime/hooks/register.mjs";
|
|
43
|
-
import { callUpdateHooks, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onServerPrefetch, onUnmounted, onUpdated } from "./runtime/hooks/vue.mjs";
|
|
44
|
-
import { UseIntersectionObserverOptions, UseIntersectionObserverResult, useIntersectionObserver } from "./runtime/intersectionObserver.mjs";
|
|
45
|
-
import { isNoSetData, markNoSetData } from "./runtime/noSetData.mjs";
|
|
46
|
-
import { NavigationBarMetrics, PageStackSnapshot, UseNavigationBarMetricsOptions, UsePageStackOptions, getCurrentPageStackSnapshot, getNavigationBarMetrics, useNavigationBarMetrics, usePageStack } from "./runtime/pageEnvironment.mjs";
|
|
47
|
-
import { UsePageScrollThrottleOptions, UsePageScrollThrottleStopHandle, usePageScrollThrottle } from "./runtime/pageScroll.mjs";
|
|
48
|
-
import { setGlobalProvidedValue } from "./runtime/provideStore.mjs";
|
|
49
|
-
import { hasInjectionContext, inject, injectGlobal, provide, provideGlobal } from "./runtime/provide.mjs";
|
|
50
|
-
import { setRuntimeSetDataVisibility, teardownRuntimeInstance } from "./runtime/register/runtimeInstance.mjs";
|
|
51
|
-
import { runSetupFunction } from "./runtime/register/setup.mjs";
|
|
52
|
-
import { createApp, createWevuComponent, createWevuScopedSlotComponent, defineComponent, mountRuntimeInstance, registerApp, registerComponent, setWevuDefaults } from "./runtime/publicRuntime.mjs";
|
|
53
|
-
import { PullDownRefreshHandler, UseAsyncPullDownRefreshOptions, useAsyncPullDownRefresh } from "./runtime/pullDownRefresh.mjs";
|
|
54
|
-
import { UseAllBoundingClientRectOptions, UseAllScrollOffsetOptions, UseAllSelectorFieldsOptions, UseBoundingClientRectOptions, UseScrollOffsetOptions, UseSelectorFieldsOptions, UseSelectorQueryOptions, useBoundingClientRect, useScrollOffset, useSelectorFields, useSelectorQuery } from "./runtime/selectorQuery.mjs";
|
|
55
|
-
import { normalizeClass, normalizeStyle, resolvePropValue } from "./runtime/template.mjs";
|
|
56
|
-
import { UpdatePerformanceListener, UpdatePerformanceListenerResult, UseUpdatePerformanceListenerStopHandle, useUpdatePerformanceListener } from "./runtime/updatePerformance.mjs";
|
|
57
|
-
import { defineAppSetup, use } from "./runtime/use.mjs";
|
|
58
|
-
import { useAttrs, useNativeInstance, useSlots } from "./runtime/vueCompat/context.mjs";
|
|
59
|
-
import { ModelModifiers, UseModelOptions, mergeModels, useBindModel, useChangeModel, useModel } from "./runtime/vueCompat/model.mjs";
|
|
60
|
-
import { useNativePageRouter, useNativeRouter } from "./runtime/vueCompat/router.mjs";
|
|
61
|
-
import { TemplateRef, useTemplateRef } from "./runtime/vueCompat/templateRef.mjs";
|
|
62
|
-
import "./runtime/index.mjs";
|
|
63
|
-
import { ComponentTypeEmits, EmitFn, EmitsOptions } from "./macros/shared.mjs";
|
|
64
|
-
import { DefineModelModifiers, DefineModelTransformOptions, ModelRef, PageLayoutMeta, PageMeta, defineEmits, defineExpose, defineModel, defineOptions, definePageMeta, defineProps, defineSlots, withDefaults } from "./macros.mjs";
|
|
65
|
-
import { ActionContext, ActionSubscriber, DefineStoreOptions, MutationType, Pinia, PiniaCustomProperties, PiniaCustomStateProperties, PiniaPlugin, PiniaPluginContext, StateTree, StoreActions, StoreDefinition, StoreGeneric, StoreManager, StoreState, StoreSubscribeOptions, SubscriptionCallback, SubscriptionCallbackMutation } from "./store/types.mjs";
|
|
66
|
-
import { defineStore } from "./store/define.mjs";
|
|
67
|
-
import { createPinia, createStore, disposePinia, getActivePinia, setActivePinia } from "./store/manager.mjs";
|
|
68
|
-
import { StoreToRefsResult, storeToRefs } from "./store/storeToRefs.mjs";
|
|
69
|
-
import "./store.mjs";
|
|
70
|
-
import { version } from "./version.mjs";
|
|
71
|
-
export * from "@wevu/web-apis";
|
|
72
|
-
export { type ActionContext, type ActionSubscriber, type AlipayMiniProgramHostNamespace, type AlipayMiniProgramHostSourceContract, type AllowedComponentProps, type AppConfig, type AsyncDerivation, type AsyncDerivationContext, type AsyncDerivationState, type AsyncDerivationStatus, type ComponentCustomProps, type ComponentDefinition, type ComponentOptionsMixin, type ComponentPropsOptions, type ComponentPublicInstance, type ComponentTypeEmits, type ComputedDefinitions, type ComputedGetter, type ComputedRef, type ComputedSetter, type CreateAppOptions, type CustomRefFactory, type CustomRefOptions, type CustomRefSource, type DataOption, type DefaultMiniProgramHostNamespace, type DefaultMiniProgramHostSourceContract, type DefineAppOptions, type DefineComponent, type DefineComponentOptions, type DefineComponentTypePropsOptions, type DefineComponentWithTypeProps, DefineModelModifiers, DefineModelTransformOptions, type DefineStoreOptions, DisposableBag, DisposableLike, DisposableMethodName, DisposableObject, type DouyinMiniProgramHostNamespace, type DouyinMiniProgramHostSourceContract, type EffectScope, ElementIntersectionObserverCallback, type EmitFn, type EmitsOptions, type ExtractComputed, type ExtractDefaultPropTypes, type ExtractMethods, type ExtractPropTypes, type ExtractPublicPropTypes, GlobalComponents, GlobalDirectives, type HostMiniProgramAddToFavoritesOption, type HostMiniProgramAppOptions, type HostMiniProgramAppTrivialInstance, type HostMiniProgramBehaviorIdentifier, type HostMiniProgramBoundingClientRectResult, type HostMiniProgramComponentAllFullProperty, type HostMiniProgramComponentAllProperty, type HostMiniProgramComponentBehaviorOptions, type HostMiniProgramComponentEmptyArray, type HostMiniProgramComponentInstance, type HostMiniProgramComponentMethodOption, type HostMiniProgramComponentPropertyOption, type HostMiniProgramComponentPropertyValue, type HostMiniProgramComponentShortProperty, type HostMiniProgramComponentTrivialInstance, type HostMiniProgramComponentTrivialOption, type HostMiniProgramIntersectionObserver, type HostMiniProgramIntersectionObserverOptions, type HostMiniProgramLaunchOptions, type HostMiniProgramMemoryWarningResult, type HostMiniProgramNavigateToOption, type HostMiniProgramNodesRef, type HostMiniProgramNodesRefFields, type HostMiniProgramPageLifetime, type HostMiniProgramPageNotFoundOptions, type HostMiniProgramPageResizeOption, type HostMiniProgramPageScrollOption, type HostMiniProgramPageTrivialInstance, type HostMiniProgramReLaunchOption, type HostMiniProgramRedirectToOption, type HostMiniProgramRouter, type HostMiniProgramSaveExitState, type HostMiniProgramScrollOffsetResult, type HostMiniProgramSelectorQuery, type HostMiniProgramShareAppMessageOption, type HostMiniProgramSwitchTabOption, type HostMiniProgramTabItemTapOption, type HostMiniProgramThemeChangeResult, type HostMiniProgramTriggerEventOptions, type HostMiniProgramUnhandledRejectionResult, type InferNativePropType, type InferNativeProps, type InferPropType, type InferProps, type InternalRuntimeState, type InternalRuntimeStateFields, type LayoutBridgeInstance, type LayoutHostBinding, type MapSources, type MaybeRef, type MaybeRefOrGetter, type MaybeUndefined, type MethodDefinitions, type MiniProgramAdapter, type HostMiniProgramAddToFavoritesOption as MiniProgramAddToFavoritesOption, type MiniProgramAppOptions, type MiniProgramBehaviorIdentifier, type HostMiniProgramBoundingClientRectResult as MiniProgramBoundingClientRectResult, type HostMiniProgramComponentAllFullProperty as MiniProgramComponentAllFullProperty, type HostMiniProgramComponentAllProperty as MiniProgramComponentAllProperty, type HostMiniProgramComponentBehaviorOptions as MiniProgramComponentBehaviorOptions, type HostMiniProgramComponentEmptyArray as MiniProgramComponentEmptyArray, type MiniProgramComponentInstance, type HostMiniProgramComponentMethodOption as MiniProgramComponentMethodOption, type MiniProgramComponentOptions, type HostMiniProgramComponentPropertyOption as MiniProgramComponentPropertyOption, type MiniProgramComponentPropertyValue, type MiniProgramComponentRawOptions, type HostMiniProgramComponentShortProperty as MiniProgramComponentShortProperty, type MiniProgramHostNamespace, type MiniProgramHostNamespaceBySource, type MiniProgramHostSourceName, type MiniProgramHostSourceRegistry, type MiniProgramInstance, type HostMiniProgramIntersectionObserver as MiniProgramIntersectionObserver, type HostMiniProgramIntersectionObserverOptions as MiniProgramIntersectionObserverOptions, type HostMiniProgramLaunchOptions as MiniProgramLaunchOptions, type HostMiniProgramMemoryWarningResult as MiniProgramMemoryWarningResult, type HostMiniProgramNavigateToOption as MiniProgramNavigateToOption, type HostMiniProgramNodesRef as MiniProgramNodesRef, type HostMiniProgramNodesRefFields as MiniProgramNodesRefFields, type HostMiniProgramPageLifetime as MiniProgramPageLifetime, type MiniProgramPageLifetimes, type HostMiniProgramPageNotFoundOptions as MiniProgramPageNotFoundOptions, type HostMiniProgramPageResizeOption as MiniProgramPageResizeOption, type HostMiniProgramPageScrollOption as MiniProgramPageScrollOption, type MiniProgramPlatformHostNamespaceBySource, type MiniProgramPlatformHostSourceName, type MiniProgramPlatformHostSourceRegistry, type HostMiniProgramReLaunchOption as MiniProgramReLaunchOption, type HostMiniProgramRedirectToOption as MiniProgramRedirectToOption, type HostMiniProgramRouter as MiniProgramRouter, type MiniProgramRouterNavigateToOption, type MiniProgramRouterReLaunchOption, type MiniProgramRouterRedirectToOption, type MiniProgramRouterSwitchTabOption, type MiniProgramRuntimeHostNamespaceBySource, type MiniProgramRuntimeHostSourceName, type MiniProgramRuntimeHostSourceRegistry, type HostMiniProgramSaveExitState as MiniProgramSaveExitState, type HostMiniProgramScrollOffsetResult as MiniProgramScrollOffsetResult, type HostMiniProgramSelectorQuery as MiniProgramSelectorQuery, type HostMiniProgramShareAppMessageOption as MiniProgramShareAppMessageOption, type HostMiniProgramSwitchTabOption as MiniProgramSwitchTabOption, type HostMiniProgramTabItemTapOption as MiniProgramTabItemTapOption, MiniProgramTemplateRefValue, type HostMiniProgramThemeChangeResult as MiniProgramThemeChangeResult, type HostMiniProgramUnhandledRejectionResult as MiniProgramUnhandledRejectionResult, type ModelBinding, type ModelBindingOptions, type ModelBindingPayload, type ModelModifiers, ModelRef, type MultiWatchSources, type MutationKind, type MutationOp, type MutationRecord, MutationType, type NativeComponent, type NativePropType, type NativePropsOptions, type NativeTypeHint, type NativeTypedProperty, NavigationBarMetrics, type ObjectDirective, type OnCleanup, type PageFeatures, PageLayoutMeta, type PageLayoutState, PageMeta, PageStackSnapshot, type Pinia, type PiniaCustomProperties, type PiniaCustomStateProperties, type PiniaPlugin, type PiniaPluginContext, type PrelinkReactiveTreeOptions, type PropConstructor, type PropOptions, type PropType, type PublicProps, PullDownRefreshHandler, type Ref, type RuntimeApp, type RuntimeInstance, type SetDataBindingDiagnostic, type SetDataDebugInfo, type SetDataSnapshotOptions, type SetupContext, type SetupContextIntersectionObserver, type SetupContextIntersectionObserverOptions, type SetupContextNativeInstance, type SetupContextRouter, type SetupContextSelectorQuery, type SetupContextWithTypeProps, type SetupFunction, type SetupFunctionWithTypeProps, type ShallowRef, type ShallowUnwrapRef, type StateTree, type StoreActions, type StoreDefinition, type StoreGeneric, type StoreManager, type StoreState, type StoreSubscribeOptions, type StoreToRefsResult, type SubscriptionCallback, type SubscriptionCallbackMutation, type TemplateRef, TemplateRefValue, TemplateRefs, type ToRefs, type HostMiniProgramTriggerEventOptions as TriggerEventOptions, type TtMiniProgramHostNamespace, type TtMiniProgramHostSourceContract, UpdatePerformanceListener, UpdatePerformanceListenerResult, UseAllBoundingClientRectOptions, UseAllScrollOffsetOptions, UseAllSelectorFieldsOptions, type UseAsyncDerivationOptions, UseAsyncPullDownRefreshOptions, UseBoundingClientRectOptions, UseElementIntersectionObserverOptions, UseElementIntersectionObserverReturn, UseIntersectionObserverOptions, UseIntersectionObserverResult, type UseModelOptions, UseNavigationBarMetricsOptions, UsePageScrollThrottleOptions, UsePageScrollThrottleStopHandle, UsePageStackOptions, UseScrollOffsetOptions, UseSelectorFieldsOptions, UseSelectorQueryOptions, UseUpdatePerformanceListenerStopHandle, type VNode, type VNodeProps, type WatchCallback, type WatchEffect, type WatchEffectOptions, type WatchMultiSources, type WatchOptions, type WatchScheduler, type WatchSource, type WatchSourceValue, type WatchSources, type WatchStopHandle, type WechatMiniProgramHostNamespace, type WechatMiniProgramHostSourceContract, type WevuComponentConstructor, type WevuDefaults, type WevuDefinedComponent, WevuGlobalComponents, WevuGlobalDirectives, type WevuPageLayoutMap, type WevuPlugin, type WevuTypedRouterRouteMap, type WritableComputedOptions, type WritableComputedRef, addMutationRecorder, batch, callHookList, callHookReturn, callUpdateHooks, computed, createApp, createPinia, createStore, createWevuComponent, createWevuScopedSlotComponent, customRef, defineAppSetup, defineComponent, defineEmits, defineExpose, defineModel, defineOptions, definePageMeta, defineProps, defineSlots, defineStore, disposePinia, effect, effectScope, endBatch, getActivePinia, getCurrentInstance, getCurrentPageStackSnapshot, getCurrentScope, getCurrentSetupContext, getDeepWatchStrategy, getNavigationBarMetrics, getReactiveVersion, hasInjectionContext, inject, injectGlobal, isNoSetData, isProxy, isRaw, isReactive, isReadonly, isRef, isShallowReactive, isShallowRef, markNoSetData, markRaw, mergeModels, mountRuntimeInstance, nextTick, normalizeClass, normalizeStyle, onActivated, onAddToFavorites, onAttached, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onDetached, onError, onErrorCaptured, onHide, onLaunch, onLoad, onMemoryWarning, onMounted, onMoved, onPageNotFound, onPageScroll, onPullDownRefresh, onReachBottom, onReady, onResize, onRouteDone, onSaveExitState, onScopeDispose, onServerPrefetch, onShareAppMessage, onShareTimeline, onShow, onTabItemTap, onThemeChange, onUnhandledRejection, onUnload, onUnmounted, onUpdated, prelinkReactiveTree, provide, provideGlobal, reactive, readonly, ref, registerApp, registerComponent, registerPageLayoutBridge, registerRuntimeLayoutHosts, removeMutationRecorder, resetWevuDefaults, resolveLayoutBridge, resolveLayoutHost, resolvePropValue, resolveRuntimePageLayoutName, runSetupFunction, setActivePinia, setCurrentInstance, setCurrentSetupContext, setDeepWatchStrategy, setGlobalProvidedValue, setPageLayout, setRuntimeSetDataVisibility, setWevuDefaults, shallowReactive, shallowReadonly, shallowRef, startBatch, stop, storeToRefs, syncRuntimePageLayoutState, syncRuntimePageLayoutStateFromRuntime, teardownRuntimeInstance, toRaw, toRef, toRefs, toValue, touchReactive, traverse, triggerRef, unref, unregisterPageLayoutBridge, unregisterRuntimeLayoutHosts, use, useAsyncDerivation, useAsyncPullDownRefresh, useAttrs, useBindModel, useBoundingClientRect, useChangeModel, useCssModule, useDisposables, useElementIntersectionObserver, useIntersectionObserver, useLayoutBridge, useLayoutHosts, useModel, useNativeInstance, useNativePageRouter, useNativeRouter, useNavigationBarMetrics, usePageLayout, usePageScrollThrottle, usePageStack, useScrollOffset, useSelectorFields, useSelectorQuery, useSlots, useTemplateRef, useUpdatePerformanceListener, version, waitForLayoutHost, watch, watchEffect, watchPostEffect, watchSyncEffect, withDefaults };
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { AsyncDerivation, AsyncDerivationContext, AsyncDerivationState, AsyncDerivationStatus, UseAsyncDerivationOptions, useAsyncDerivation } from "./reactivity/asyncDerivation.mjs";
|
|
2
|
-
import { CustomRefFactory, CustomRefOptions, CustomRefSource, MaybeRef, MaybeRefOrGetter, Ref, ShallowRef, customRef, isRef, ref, toValue, unref } from "./reactivity/ref.mjs";
|
|
3
|
-
import { ComputedGetter, ComputedRef, ComputedSetter, WritableComputedOptions, WritableComputedRef, computed } from "./reactivity/computed.mjs";
|
|
4
|
-
import { nextTick } from "./scheduler.mjs";
|
|
5
|
-
import { EffectScope, batch, effect, effectScope, endBatch, getCurrentScope, onScopeDispose, startBatch, stop } from "./reactivity/core.mjs";
|
|
6
|
-
import { MutationKind, MutationOp, MutationRecord, addMutationRecorder, removeMutationRecorder } from "./reactivity/reactive/mutation.mjs";
|
|
7
|
-
import { PrelinkReactiveTreeOptions, prelinkReactiveTree, touchReactive } from "./reactivity/reactive/patch.mjs";
|
|
8
|
-
import { isShallowReactive, shallowReactive } from "./reactivity/reactive/shallow.mjs";
|
|
9
|
-
import { toRaw } from "./reactivity/reactive/shared.mjs";
|
|
10
|
-
import { getReactiveVersion, isRaw, isReactive, markRaw, reactive } from "./reactivity/reactive.mjs";
|
|
11
|
-
import { isProxy, isReadonly, readonly, shallowReadonly } from "./reactivity/readonly.mjs";
|
|
12
|
-
import { isShallowRef, shallowRef, triggerRef } from "./reactivity/shallowRef.mjs";
|
|
13
|
-
import { ToRefs, toRef, toRefs } from "./reactivity/toRefs.mjs";
|
|
14
|
-
import { traverse } from "./reactivity/traverse.mjs";
|
|
15
|
-
import { MapSources, MaybeUndefined, MultiWatchSources, OnCleanup, WatchCallback, WatchEffect, WatchEffectOptions, WatchMultiSources, WatchOptions, WatchScheduler, WatchSource, WatchSourceValue, WatchSources, WatchStopHandle, getDeepWatchStrategy, setDeepWatchStrategy } from "./reactivity/watch/types.mjs";
|
|
16
|
-
import { watch, watchEffect, watchPostEffect, watchSyncEffect } from "./reactivity/watch.mjs";
|
|
17
|
-
import "./reactivity/index.mjs";
|
|
18
|
-
export { type AsyncDerivation, type AsyncDerivationContext, type AsyncDerivationState, type AsyncDerivationStatus, type ComputedGetter, type ComputedRef, type ComputedSetter, type CustomRefFactory, type CustomRefOptions, type CustomRefSource, type EffectScope, type MapSources, type MaybeRef, type MaybeRefOrGetter, type MaybeUndefined, type MultiWatchSources, type MutationKind, type MutationOp, type MutationRecord, type OnCleanup, type PrelinkReactiveTreeOptions, type Ref, type ShallowRef, type ToRefs, type UseAsyncDerivationOptions, type WatchCallback, type WatchEffect, type WatchEffectOptions, type WatchMultiSources, type WatchOptions, type WatchScheduler, type WatchSource, type WatchSourceValue, type WatchSources, type WatchStopHandle, type WritableComputedOptions, type WritableComputedRef, addMutationRecorder, batch, computed, customRef, effect, effectScope, endBatch, getCurrentScope, getDeepWatchStrategy, getReactiveVersion, isProxy, isRaw, isReactive, isReadonly, isRef, isShallowReactive, isShallowRef, markRaw, nextTick, onScopeDispose, prelinkReactiveTree, reactive, readonly, ref, removeMutationRecorder, setDeepWatchStrategy, shallowReactive, shallowReadonly, shallowRef, startBatch, stop, toRaw, toRef, toRefs, toValue, touchReactive, traverse, triggerRef, unref, useAsyncDerivation, watch, watchEffect, watchPostEffect, watchSyncEffect };
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { useCssModule, useCssVars } from "./runtime/css.mjs";
|
|
2
|
-
import { INTERNAL_DEFAULTS_SCOPE_KEY, resetWevuDefaults, setWevuDefaults } from "./runtime/defaults.mjs";
|
|
3
|
-
import { createIsolatedWevuComponentDefinition, createWevuComponent, createWevuComponentDefinition, defineComponent, getWevuComponentLifecycleDefinition } from "./runtime/define.mjs";
|
|
4
|
-
import { useDisposables } from "./runtime/disposables.mjs";
|
|
5
|
-
import { useElementIntersectionObserver } from "./runtime/elementIntersectionObserver.mjs";
|
|
6
|
-
import { SetDataSchedulerOptions } from "./runtime/app/setData/scheduler.mjs";
|
|
7
|
-
import { HighFrequencyWarningMonitorOptions, LayoutHostBinding, RuntimeCapabilityName, RuntimeCapabilityRegistry, ScopedSlotMountState, SetDataScheduler, TemplateRefBinding } from "./runtime/capabilities.mjs";
|
|
8
|
-
import { resolveLayoutBridge, resolveLayoutHost, resolveRuntimePageLayoutName, setPageLayout, syncRuntimePageLayoutState, syncRuntimePageLayoutStateFromRuntime, useLayoutBridge, useLayoutHosts, usePageLayout, waitForLayoutHost } from "./runtime/features/publicLayout.mjs";
|
|
9
|
-
import { callHookList, callHookReturn, getCurrentInstance, getCurrentSetupContext, setCurrentInstance, setCurrentSetupContext } from "./runtime/hooks/base.mjs";
|
|
10
|
-
import { onAddToFavorites, onAttached, onDetached, onError, onHide, onLaunch, onLoad, onMemoryWarning, onMoved, onPageNotFound, onPageScroll, onPullDownRefresh, onReachBottom, onReady, onResize, onRouteDone, onSaveExitState, onShareAppMessage, onShareTimeline, onShow, onTabItemTap, onThemeChange, onUnhandledRejection, onUnload } from "./runtime/hooks/register.mjs";
|
|
11
|
-
import { onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onServerPrefetch, onUnmounted, onUpdated } from "./runtime/hooks/vue.mjs";
|
|
12
|
-
import "./runtime/hooks.mjs";
|
|
13
|
-
import { useIntersectionObserver } from "./runtime/intersectionObserver.mjs";
|
|
14
|
-
import { isNoSetData, markNoSetData } from "./runtime/noSetData.mjs";
|
|
15
|
-
import { getCurrentPageStackSnapshot, getNavigationBarMetrics, useNavigationBarMetrics, usePageStack } from "./runtime/pageEnvironment.mjs";
|
|
16
|
-
import { usePageScrollThrottle } from "./runtime/pageScroll.mjs";
|
|
17
|
-
import { setGlobalProvidedValue } from "./runtime/provideStore.mjs";
|
|
18
|
-
import { hasInjectionContext, inject, injectGlobal, provide, provideGlobal } from "./runtime/provide.mjs";
|
|
19
|
-
import { createWevuScopedSlotComponent, installScopedSlots } from "./runtime/features/scopedSlots.mjs";
|
|
20
|
-
import { createApp } from "./runtime/app.mjs";
|
|
21
|
-
import { registerApp } from "./runtime/register/app.mjs";
|
|
22
|
-
import { registerComponent } from "./runtime/register/component.mjs";
|
|
23
|
-
import { mountRuntimeInstance, setRuntimeSetDataVisibility, teardownRuntimeInstance } from "./runtime/register/runtimeInstance.mjs";
|
|
24
|
-
import { runSetupFunction } from "./runtime/register/setup.mjs";
|
|
25
|
-
import "./runtime/register.mjs";
|
|
26
|
-
import { useAsyncPullDownRefresh } from "./runtime/pullDownRefresh.mjs";
|
|
27
|
-
import { useBoundingClientRect, useScrollOffset, useSelectorFields, useSelectorQuery } from "./runtime/selectorQuery.mjs";
|
|
28
|
-
import { useUpdatePerformanceListener } from "./runtime/updatePerformance.mjs";
|
|
29
|
-
import { defineAppSetup, use } from "./runtime/use.mjs";
|
|
30
|
-
import { useAttrs, useNativeInstance, useSlots } from "./runtime/vueCompat/context.mjs";
|
|
31
|
-
import { mergeModels, useBindModel, useChangeModel, useModel } from "./runtime/vueCompat/model.mjs";
|
|
32
|
-
import { useNativePageRouter, useNativeRouter } from "./runtime/vueCompat/router.mjs";
|
|
33
|
-
import { useTemplateRef } from "./runtime/vueCompat/templateRef.mjs";
|
|
34
|
-
import "./runtime/vueCompat.mjs";
|
|
35
|
-
import { version } from "./version.mjs";
|
|
36
|
-
import { takePendingRuntimeAppRegistration } from "./runtime/app/pending.mjs";
|
|
37
|
-
import { installInlineEvents } from "./runtime/features/inlineEvents.mjs";
|
|
38
|
-
import { installJsxIslands } from "./runtime/features/jsxIslands.mjs";
|
|
39
|
-
import { installLayout } from "./runtime/features/layout.mjs";
|
|
40
|
-
import { installPatchStrategy } from "./runtime/features/patchStrategy.mjs";
|
|
41
|
-
import { installSetDataHighFrequencyWarning } from "./runtime/features/setDataHighFrequencyWarning.mjs";
|
|
42
|
-
import { installTemplateRefs } from "./runtime/features/templateRefs.mjs";
|
|
43
|
-
import { Fragment, createTextVNode, createVNode, isVNode, mergeProps, normalizeJsxIsland, resolveComponent, resolveDirective, transformOn, vModelCheckbox, vModelRadio, vModelSelect, vModelText, vShow, withDirectives } from "./runtime/jsxIsland.mjs";
|
|
44
|
-
import { createUniAppHost } from "./runtime/uniAppHost.mjs";
|
|
45
|
-
export { Fragment, type HighFrequencyWarningMonitorOptions, INTERNAL_DEFAULTS_SCOPE_KEY, type LayoutHostBinding, type RuntimeCapabilityName, type RuntimeCapabilityRegistry, type ScopedSlotMountState, type SetDataScheduler, type SetDataSchedulerOptions, type TemplateRefBinding, callHookList, callHookReturn, createApp, createIsolatedWevuComponentDefinition, createTextVNode, createUniAppHost, createVNode, createWevuComponent, createWevuComponentDefinition, createWevuScopedSlotComponent, defineAppSetup, defineComponent, getCurrentInstance, getCurrentPageStackSnapshot, getCurrentSetupContext, getNavigationBarMetrics, getWevuComponentLifecycleDefinition, hasInjectionContext, inject, injectGlobal, installInlineEvents, installJsxIslands, installLayout, installPatchStrategy, installScopedSlots, installSetDataHighFrequencyWarning, installTemplateRefs, isNoSetData, isVNode, markNoSetData, mergeModels, mergeProps, mountRuntimeInstance, normalizeJsxIsland, onActivated, onAddToFavorites, onAttached, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onDetached, onError, onErrorCaptured, onHide, onLaunch, onLoad, onMemoryWarning, onMounted, onMoved, onPageNotFound, onPageScroll, onPullDownRefresh, onReachBottom, onReady, onResize, onRouteDone, onSaveExitState, onServerPrefetch, onShareAppMessage, onShareTimeline, onShow, onTabItemTap, onThemeChange, onUnhandledRejection, onUnload, onUnmounted, onUpdated, provide, provideGlobal, registerApp, registerComponent, resetWevuDefaults, resolveComponent, resolveDirective, resolveLayoutBridge, resolveLayoutHost, resolveRuntimePageLayoutName, runSetupFunction, setCurrentInstance, setCurrentSetupContext, setGlobalProvidedValue, setPageLayout, setRuntimeSetDataVisibility, setWevuDefaults, syncRuntimePageLayoutState, syncRuntimePageLayoutStateFromRuntime, takePendingRuntimeAppRegistration, teardownRuntimeInstance, transformOn, use, useAsyncPullDownRefresh, useAttrs, useBindModel, useBoundingClientRect, useChangeModel, useCssModule, useCssVars, useDisposables, useElementIntersectionObserver, useIntersectionObserver, useLayoutBridge, useLayoutHosts, useModel, useNativeInstance, useNativePageRouter, useNativeRouter, useNavigationBarMetrics, usePageLayout, usePageScrollThrottle, usePageStack, useScrollOffset, useSelectorFields, useSelectorQuery, useSlots, useTemplateRef, useUpdatePerformanceListener, vModelCheckbox, vModelRadio, vModelSelect, vModelText, vShow, version, waitForLayoutHost, withDirectives };
|
package/dist/dev/jsxTypes.d.mts
DELETED