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.
Files changed (262) hide show
  1. package/README.md +2 -0
  2. package/dist/dev/_virtual/{_@oxc-project_runtime@0.151.0 → _@oxc-project_runtime@0.153.0}/helpers/esm/defineProperty.mjs +1 -1
  3. package/dist/dev/_virtual/{_@oxc-project_runtime@0.151.0 → _@oxc-project_runtime@0.153.0}/helpers/esm/toPrimitive.mjs +1 -1
  4. package/dist/dev/_virtual/{_@oxc-project_runtime@0.151.0 → _@oxc-project_runtime@0.153.0}/helpers/esm/toPropertyKey.mjs +1 -1
  5. package/dist/dev/_virtual/{_@oxc-project_runtime@0.151.0 → _@oxc-project_runtime@0.153.0}/helpers/esm/typeof.mjs +1 -1
  6. package/dist/dev/package.mjs +1 -1
  7. package/dist/dev/reactivity/core.mjs +1 -1
  8. package/dist/dev/reactivity/ref.mjs +1 -1
  9. package/dist/dev/router/initialNavigation.mjs +4 -1
  10. package/dist/dev/router/initialNavigation.mjs.map +1 -1
  11. package/dist/dev/router/scrollRestoration/adapters.mjs +86 -0
  12. package/dist/dev/router/scrollRestoration/adapters.mjs.map +1 -0
  13. package/dist/dev/router/scrollRestoration/controller.mjs +148 -0
  14. package/dist/dev/router/scrollRestoration/controller.mjs.map +1 -0
  15. package/dist/dev/router/scrollRestoration/host.mjs +76 -0
  16. package/dist/dev/router/scrollRestoration/host.mjs.map +1 -0
  17. package/dist/dev/router/scrollRestoration/index.mjs +156 -0
  18. package/dist/dev/router/scrollRestoration/index.mjs.map +1 -0
  19. package/dist/dev/router.mjs +4 -1
  20. package/dist/dev/runtime/app/diagnostics.mjs +5 -1
  21. package/dist/dev/runtime/app/diagnostics.mjs.map +1 -1
  22. package/dist/dev/runtime/app/mount.mjs +8 -3
  23. package/dist/dev/runtime/app/mount.mjs.map +1 -1
  24. package/dist/dev/runtime/app/setData/commitTracker.mjs +39 -4
  25. package/dist/dev/runtime/app/setData/commitTracker.mjs.map +1 -1
  26. package/dist/dev/runtime/app/setData/observation.mjs +109 -0
  27. package/dist/dev/runtime/app/setData/observation.mjs.map +1 -0
  28. package/dist/dev/runtime/app/setData/scheduler.mjs +12 -1
  29. package/dist/dev/runtime/app/setData/scheduler.mjs.map +1 -1
  30. package/dist/dev/runtime/app/setDataOptions.mjs +1 -0
  31. package/dist/dev/runtime/app/setDataOptions.mjs.map +1 -1
  32. package/dist/dev/runtime/define/initialComputed.mjs +13 -12
  33. package/dist/dev/runtime/define/initialComputed.mjs.map +1 -1
  34. package/dist/dev/runtime/define/props.mjs +5 -1
  35. package/dist/dev/runtime/define/props.mjs.map +1 -1
  36. package/dist/dev/runtime/define/scopedSlotOptions.mjs +2 -1
  37. package/dist/dev/runtime/define/scopedSlotOptions.mjs.map +1 -1
  38. package/dist/dev/runtime/define.mjs +1 -1
  39. package/dist/dev/runtime/define.mjs.map +1 -1
  40. package/dist/dev/runtime/features/scopedSlots.mjs.map +1 -1
  41. package/dist/dev/runtime/hooks/base.mjs +1 -13
  42. package/dist/dev/runtime/hooks/base.mjs.map +1 -1
  43. package/dist/dev/runtime/hooks/pageScroll.mjs +41 -0
  44. package/dist/dev/runtime/hooks/pageScroll.mjs.map +1 -0
  45. package/dist/dev/runtime/hooks/register.mjs +2 -1
  46. package/dist/dev/runtime/hooks/register.mjs.map +1 -1
  47. package/dist/dev/runtime/register/component/lifecycle/optionalHooks.mjs +2 -5
  48. package/dist/dev/runtime/register/component/lifecycle/optionalHooks.mjs.map +1 -1
  49. package/dist/dev/runtime/register/component/lifecycle/platform.mjs +8 -20
  50. package/dist/dev/runtime/register/component/lifecycle/platform.mjs.map +1 -1
  51. package/dist/dev/runtime/register/component/props.mjs +14 -4
  52. package/dist/dev/runtime/register/component/props.mjs.map +1 -1
  53. package/dist/dev/runtime/register/component/registerDefinition.mjs +30 -17
  54. package/dist/dev/runtime/register/component/registerDefinition.mjs.map +1 -1
  55. package/dist/dev/runtime/register/component.mjs +2 -1
  56. package/dist/dev/runtime/register/component.mjs.map +1 -1
  57. package/dist/dev/runtime/register/runtimeInstance/methodBridge.mjs +14 -7
  58. package/dist/dev/runtime/register/runtimeInstance/methodBridge.mjs.map +1 -1
  59. package/dist/dev/runtime/register/runtimeInstance/nativeDeclaration.mjs +78 -0
  60. package/dist/dev/runtime/register/runtimeInstance/nativeDeclaration.mjs.map +1 -0
  61. package/dist/dev/runtime/register/runtimeInstance/provideContext.mjs +52 -8
  62. package/dist/dev/runtime/register/runtimeInstance/provideContext.mjs.map +1 -1
  63. package/dist/dev/runtime/register/runtimeInstance/setupPhase.mjs +7 -2
  64. package/dist/dev/runtime/register/runtimeInstance/setupPhase.mjs.map +1 -1
  65. package/dist/dev/runtime/register/runtimeInstance/utils.mjs.map +1 -1
  66. package/dist/dev/runtime/register/runtimeInstance.mjs +60 -19
  67. package/dist/dev/runtime/register/runtimeInstance.mjs.map +1 -1
  68. package/dist/fetch.mjs +1 -1
  69. package/dist/internal-template.mjs +1 -1
  70. package/dist/package.mjs +1 -1
  71. package/dist/reactivity/core.mjs +1 -1
  72. package/dist/reactivity/reactive/patch.mjs +1 -1
  73. package/dist/reactivity/reactive/patchState.mjs +1 -1
  74. package/dist/reactivity/ref.mjs +1 -1
  75. package/dist/reactivity/watch/helpers.mjs +1 -1
  76. package/dist/router/initialNavigation.mjs +1 -1
  77. package/dist/router/scrollRestoration/adapters.d.mts +7 -0
  78. package/dist/router/scrollRestoration/adapters.mjs +1 -0
  79. package/dist/router/scrollRestoration/controller.d.mts +7 -0
  80. package/dist/router/scrollRestoration/controller.mjs +1 -0
  81. package/dist/router/scrollRestoration/host.d.mts +3 -0
  82. package/dist/router/scrollRestoration/host.mjs +1 -0
  83. package/dist/router/scrollRestoration/index.d.mts +8 -0
  84. package/dist/router/scrollRestoration/index.mjs +1 -0
  85. package/dist/router/scrollRestoration/types.d.mts +60 -0
  86. package/dist/router/useRoute.mjs +1 -1
  87. package/dist/router.d.mts +5 -1
  88. package/dist/router.mjs +1 -1
  89. package/dist/routerInternal/matching.mjs +1 -1
  90. package/dist/routerInternal/params.mjs +1 -1
  91. package/dist/routerInternal/path.mjs +1 -1
  92. package/dist/routerInternal/query.mjs +1 -1
  93. package/dist/routerInternal/records.mjs +1 -1
  94. package/dist/runtime/app/context.mjs +1 -1
  95. package/dist/runtime/app/diagnostics.mjs +1 -1
  96. package/dist/runtime/app/mount.mjs +1 -1
  97. package/dist/runtime/app/setData/commitTracker.d.mts +2 -1
  98. package/dist/runtime/app/setData/commitTracker.mjs +1 -1
  99. package/dist/runtime/app/setData/observation.d.mts +12 -0
  100. package/dist/runtime/app/setData/observation.mjs +1 -0
  101. package/dist/runtime/app/setData/scheduler.d.mts +1 -0
  102. package/dist/runtime/app/setData/scheduler.mjs +1 -1
  103. package/dist/runtime/app/setDataOptions.mjs +1 -1
  104. package/dist/runtime/define/initialComputed.mjs +1 -1
  105. package/dist/runtime/define/props.mjs +1 -1
  106. package/dist/runtime/define/scopedSlotOptions.mjs +1 -1
  107. package/dist/runtime/define.mjs +1 -1
  108. package/dist/runtime/diff.mjs +1 -1
  109. package/dist/runtime/features/publicLayout.mjs +1 -1
  110. package/dist/runtime/features/scopedSlots.d.mts +2 -1
  111. package/dist/runtime/hooks/base.mjs +1 -1
  112. package/dist/runtime/hooks/pageScroll.mjs +1 -0
  113. package/dist/runtime/hooks/register.mjs +1 -1
  114. package/dist/runtime/jsxIsland.mjs +1 -1
  115. package/dist/runtime/pageLayout.mjs +1 -1
  116. package/dist/runtime/pageScroll.mjs +1 -1
  117. package/dist/runtime/register/component/alipayRegistration.mjs +1 -1
  118. package/dist/runtime/register/component/lifecycle/optionalHooks.mjs +1 -1
  119. package/dist/runtime/register/component/lifecycle/platform.mjs +1 -1
  120. package/dist/runtime/register/component/lifecycle.mjs +1 -1
  121. package/dist/runtime/register/component/props.mjs +1 -1
  122. package/dist/runtime/register/component/registerDefinition.mjs +1 -1
  123. package/dist/runtime/register/component/registerNativeDefinition.mjs +1 -1
  124. package/dist/runtime/register/component.mjs +1 -1
  125. package/dist/runtime/register/runtimeInstance/methodBridge.mjs +1 -1
  126. package/dist/runtime/register/runtimeInstance/nativeDeclaration.mjs +1 -0
  127. package/dist/runtime/register/runtimeInstance/provideContext.mjs +1 -1
  128. package/dist/runtime/register/runtimeInstance/setupPhase.mjs +1 -1
  129. package/dist/runtime/register/runtimeInstance.d.mts +8 -4
  130. package/dist/runtime/register/runtimeInstance.mjs +1 -1
  131. package/dist/runtime/setupTracking.mjs +1 -1
  132. package/dist/runtime/templateRefs.mjs +1 -1
  133. package/dist/runtime/types/runtime.d.mts +1 -0
  134. package/dist/runtime/types/setData.d.mts +30 -0
  135. package/dist/scheduler.mjs +1 -1
  136. package/dist/web-apis.mjs +1 -1
  137. package/package.json +10 -9
  138. package/dist/dev/api/vitest/setup.d.mts +0 -1
  139. package/dist/dev/api/vitest.d.mts +0 -1
  140. package/dist/dev/api.d.mts +0 -1
  141. package/dist/dev/compiler.d.mts +0 -1
  142. package/dist/dev/fetch.d.mts +0 -9
  143. package/dist/dev/index.d.mts +0 -72
  144. package/dist/dev/internal-reactivity.d.mts +0 -18
  145. package/dist/dev/internal-runtime.d.mts +0 -45
  146. package/dist/dev/internal-template.d.mts +0 -2
  147. package/dist/dev/jsxTypes.d.mts +0 -9
  148. package/dist/dev/macros/shared.d.mts +0 -83
  149. package/dist/dev/macros.d.mts +0 -71
  150. package/dist/dev/reactivity/asyncDerivation.d.mts +0 -41
  151. package/dist/dev/reactivity/computed.d.mts +0 -25
  152. package/dist/dev/reactivity/core.d.mts +0 -35
  153. package/dist/dev/reactivity/index.d.mts +0 -16
  154. package/dist/dev/reactivity/reactive/mutation.d.mts +0 -21
  155. package/dist/dev/reactivity/reactive/patch.d.mts +0 -18
  156. package/dist/dev/reactivity/reactive/shallow.d.mts +0 -22
  157. package/dist/dev/reactivity/reactive/shared.d.mts +0 -4
  158. package/dist/dev/reactivity/reactive.d.mts +0 -42
  159. package/dist/dev/reactivity/readonly.d.mts +0 -27
  160. package/dist/dev/reactivity/ref.d.mts +0 -27
  161. package/dist/dev/reactivity/shallowRef.d.mts +0 -19
  162. package/dist/dev/reactivity/toRefs.d.mts +0 -43
  163. package/dist/dev/reactivity/traverse.d.mts +0 -8
  164. package/dist/dev/reactivity/watch/types.d.mts +0 -43
  165. package/dist/dev/reactivity/watch.d.mts +0 -22
  166. package/dist/dev/router/auto-routes.d.mts +0 -8
  167. package/dist/dev/router/createRouter.d.mts +0 -9
  168. package/dist/dev/router/navigationCore.d.mts +0 -7
  169. package/dist/dev/router/resolve.d.mts +0 -7
  170. package/dist/dev/router/routeSync.d.mts +0 -2
  171. package/dist/dev/router/types.d.mts +0 -267
  172. package/dist/dev/router/useRoute.d.mts +0 -20
  173. package/dist/dev/router/useRouter.d.mts +0 -9
  174. package/dist/dev/router.d.mts +0 -26
  175. package/dist/dev/routerInternal/location.d.mts +0 -2
  176. package/dist/dev/routerInternal/matching.d.mts +0 -2
  177. package/dist/dev/routerInternal/params.d.mts +0 -2
  178. package/dist/dev/routerInternal/query.d.mts +0 -7
  179. package/dist/dev/routerInternal/records.d.mts +0 -2
  180. package/dist/dev/routerInternal/recordsWarnings.d.mts +0 -2
  181. package/dist/dev/routerInternal/shared.d.mts +0 -9
  182. package/dist/dev/routerInternal/snapshots.d.mts +0 -2
  183. package/dist/dev/routerInternal/types.d.mts +0 -9
  184. package/dist/dev/runtime/app/pending.d.mts +0 -10
  185. package/dist/dev/runtime/app/setData/commitTracker.d.mts +0 -13
  186. package/dist/dev/runtime/app/setData/scheduler.d.mts +0 -51
  187. package/dist/dev/runtime/app.d.mts +0 -8
  188. package/dist/dev/runtime/capabilities.d.mts +0 -78
  189. package/dist/dev/runtime/css.d.mts +0 -14
  190. package/dist/dev/runtime/defaults.d.mts +0 -12
  191. package/dist/dev/runtime/define.d.mts +0 -118
  192. package/dist/dev/runtime/disposables.d.mts +0 -31
  193. package/dist/dev/runtime/elementIntersectionObserver.d.mts +0 -26
  194. package/dist/dev/runtime/features/inlineEvents.d.mts +0 -7
  195. package/dist/dev/runtime/features/jsxIslands.d.mts +0 -7
  196. package/dist/dev/runtime/features/layout.d.mts +0 -7
  197. package/dist/dev/runtime/features/patchStrategy.d.mts +0 -7
  198. package/dist/dev/runtime/features/publicLayout.d.mts +0 -24
  199. package/dist/dev/runtime/features/scopedSlots.d.mts +0 -23
  200. package/dist/dev/runtime/features/setDataHighFrequencyWarning.d.mts +0 -7
  201. package/dist/dev/runtime/features/templateRefs.d.mts +0 -7
  202. package/dist/dev/runtime/hooks/base.d.mts +0 -27
  203. package/dist/dev/runtime/hooks/register.d.mts +0 -30
  204. package/dist/dev/runtime/hooks/vue.d.mts +0 -52
  205. package/dist/dev/runtime/hooks.d.mts +0 -4
  206. package/dist/dev/runtime/index.d.mts +0 -46
  207. package/dist/dev/runtime/intersectionObserver.d.mts +0 -14
  208. package/dist/dev/runtime/jsxIsland.d.mts +0 -37
  209. package/dist/dev/runtime/layoutBridge.d.mts +0 -55
  210. package/dist/dev/runtime/noSetData.d.mts +0 -5
  211. package/dist/dev/runtime/pageEnvironment.d.mts +0 -50
  212. package/dist/dev/runtime/pageLayout.d.mts +0 -25
  213. package/dist/dev/runtime/pageScroll.d.mts +0 -29
  214. package/dist/dev/runtime/provide.d.mts +0 -60
  215. package/dist/dev/runtime/provideStore.d.mts +0 -7
  216. package/dist/dev/runtime/publicRuntime.d.mts +0 -22
  217. package/dist/dev/runtime/pullDownRefresh.d.mts +0 -12
  218. package/dist/dev/runtime/register/app.d.mts +0 -14
  219. package/dist/dev/runtime/register/component.d.mts +0 -17
  220. package/dist/dev/runtime/register/inline.d.mts +0 -15
  221. package/dist/dev/runtime/register/runtimeInstance.d.mts +0 -26
  222. package/dist/dev/runtime/register/setup.d.mts +0 -11
  223. package/dist/dev/runtime/register/watch.d.mts +0 -12
  224. package/dist/dev/runtime/register.d.mts +0 -5
  225. package/dist/dev/runtime/selectorQuery.d.mts +0 -54
  226. package/dist/dev/runtime/template.d.mts +0 -6
  227. package/dist/dev/runtime/templateRefTypes.d.mts +0 -12
  228. package/dist/dev/runtime/types/core.d.mts +0 -35
  229. package/dist/dev/runtime/types/miniprogram.d.mts +0 -84
  230. package/dist/dev/runtime/types/miniprogramHost.d.mts +0 -45
  231. package/dist/dev/runtime/types/miniprogramHostSources.d.mts +0 -112
  232. package/dist/dev/runtime/types/options.d.mts +0 -138
  233. package/dist/dev/runtime/types/props/propTypes.d.mts +0 -79
  234. package/dist/dev/runtime/types/props/router.d.mts +0 -51
  235. package/dist/dev/runtime/types/props/setup.d.mts +0 -96
  236. package/dist/dev/runtime/types/props.d.mts +0 -4
  237. package/dist/dev/runtime/types/runtime.d.mts +0 -59
  238. package/dist/dev/runtime/types/setData.d.mts +0 -237
  239. package/dist/dev/runtime/types.d.mts +0 -29
  240. package/dist/dev/runtime/uniAppHost.d.mts +0 -8
  241. package/dist/dev/runtime/updatePerformance.d.mts +0 -13
  242. package/dist/dev/runtime/use.d.mts +0 -13
  243. package/dist/dev/runtime/vueCompat/context.d.mts +0 -8
  244. package/dist/dev/runtime/vueCompat/model.d.mts +0 -30
  245. package/dist/dev/runtime/vueCompat/router.d.mts +0 -29
  246. package/dist/dev/runtime/vueCompat/templateRef.d.mts +0 -9
  247. package/dist/dev/runtime/vueCompat.d.mts +0 -5
  248. package/dist/dev/scheduler.d.mts +0 -4
  249. package/dist/dev/store/define.d.mts +0 -8
  250. package/dist/dev/store/manager.d.mts +0 -16
  251. package/dist/dev/store/storeToRefs.d.mts +0 -11
  252. package/dist/dev/store/types.d.mts +0 -106
  253. package/dist/dev/store.d.mts +0 -5
  254. package/dist/dev/version.d.mts +0 -4
  255. package/dist/dev/vue-augment.d.mts +0 -8
  256. package/dist/dev/vue-demi.d.mts +0 -87
  257. package/dist/dev/vue-types.d.mts +0 -19
  258. package/dist/dev/web-apis.d.mts +0 -3
  259. /package/dist/_virtual/{_@oxc-project_runtime@0.151.0 → _@oxc-project_runtime@0.153.0}/helpers/esm/defineProperty.mjs +0 -0
  260. /package/dist/_virtual/{_@oxc-project_runtime@0.151.0 → _@oxc-project_runtime@0.153.0}/helpers/esm/toPrimitive.mjs +0 -0
  261. /package/dist/_virtual/{_@oxc-project_runtime@0.151.0 → _@oxc-project_runtime@0.153.0}/helpers/esm/toPropertyKey.mjs +0 -0
  262. /package/dist/_virtual/{_@oxc-project_runtime@0.151.0 → _@oxc-project_runtime@0.153.0}/helpers/esm/typeof.mjs +0 -0
@@ -1,118 +0,0 @@
1
- import { HostMiniProgramComponentPropertyOption } from "./types/miniprogramHost.mjs";
2
- import { MiniProgramComponentRawOptions } from "./types/miniprogram.mjs";
3
- import { ComponentPropsOptions, InferProps } from "./types/props/propTypes.mjs";
4
- import { ComponentPublicInstance, ComputedDefinitions, MethodDefinitions } from "./types/core.mjs";
5
- import { RuntimeApp } from "./types/runtime.mjs";
6
- import { DefineComponent, ShallowUnwrapRef } from "../vue-types.mjs";
7
- import { SetDataSnapshotOptions } from "./types/setData.mjs";
8
- import { DefineComponentOptions } from "./types/options.mjs";
9
- import "./types.mjs";
10
- import { WevuRuntimeBindingManifestV1 } from "@weapp-core/constants";
11
- //#region src/runtime/define.d.ts
12
- /**
13
- * defineComponent 返回的组件定义描述,用于手动注册或高级用法。
14
- */
15
- export interface ComponentDefinition<D extends object, C extends ComputedDefinitions, M extends MethodDefinitions> {
16
- /**
17
- * 内部 runtime app(高级能力使用),不对外暴露正式 API。
18
- * @internal
19
- */
20
- __wevu_runtime: RuntimeApp<D, C, M>;
21
- /**
22
- * 内部选项快照(高级能力使用),包含 data/computed/methods 等。
23
- * @internal
24
- */
25
- __wevu_options: {
26
- scopedSlotOwnerRequired: boolean;
27
- data: () => D;
28
- computed: C;
29
- methods: M;
30
- setData: SetDataSnapshotOptions | undefined;
31
- bindingManifest?: WevuRuntimeBindingManifestV1;
32
- watch: Record<string, any> | undefined;
33
- setup: ((props: any, ctx: any) => any) | undefined;
34
- mpOptions: MiniProgramComponentRawOptions;
35
- };
36
- }
37
- type SetupBindings<S> = Exclude<S, void> extends never ? Record<never, never> : Exclude<S, void>;
38
- type ResolveProps<P> = P extends ComponentPropsOptions ? InferProps<P> : P;
39
- export interface WevuComponentConstructor<Props, RawBindings, D extends object, C extends ComputedDefinitions, M extends MethodDefinitions> {
40
- new (): ComponentPublicInstance<D, C, M, Props> & ShallowUnwrapRef<RawBindings>;
41
- }
42
- export type WevuDefinedComponent<PropsOrPropOptions, RawBindings, D extends object, C extends ComputedDefinitions, M extends MethodDefinitions> = DefineComponent<PropsOrPropOptions, RawBindings, D, C, M> & ComponentDefinition<D, C, M>;
43
- export interface SetupContextWithTypeProps<TypeProps> {
44
- props: TypeProps;
45
- [key: string]: any;
46
- }
47
- export type SetupFunctionWithTypeProps<TypeProps> = (props: TypeProps, ctx: SetupContextWithTypeProps<TypeProps>) => Record<string, any> | void;
48
- export interface DefineComponentTypePropsOptions<TypeProps> {
49
- __typeProps: TypeProps;
50
- setup?: SetupFunctionWithTypeProps<TypeProps>;
51
- [key: string]: any;
52
- }
53
- export interface DefineComponentWithTypeProps<TypeProps> {
54
- new (): {
55
- $props: TypeProps;
56
- } & Record<string, any>;
57
- }
58
- /**
59
- * 按 Vue 3 风格定义一个小程序组件/页面。
60
- *
61
- * - 统一注册为 `Component()`
62
- *
63
- * @param options 组件定义项
64
- * @returns 可手动注册的组件定义
65
- *
66
- * @example
67
- * ```ts
68
- * defineComponent({
69
- * data: () => ({ count: 0 }),
70
- * setup() {
71
- * onMounted(() => console.log('已挂载'))
72
- * }
73
- * })
74
- * ```
75
- *
76
- * @example
77
- * ```ts
78
- * defineComponent({
79
- * setup() {
80
- * onPageScroll(() => {})
81
- * }
82
- * })
83
- * ```
84
- */
85
- export declare function defineComponent<TypeProps = any>(options: DefineComponentTypePropsOptions<TypeProps>): DefineComponentWithTypeProps<TypeProps>;
86
- export declare function defineComponent<P extends ComponentPropsOptions = Record<never, never>, D extends object = Record<never, never>, C extends ComputedDefinitions = Record<never, never>, M extends MethodDefinitions = Record<never, never>, S extends Record<string, any> | void = void>(options: DefineComponentOptions<P, D, C, M, S>): WevuComponentConstructor<ResolveProps<P>, SetupBindings<S>, D, C, M> & ComponentDefinition<D, C, M>;
87
- /**
88
- * 创建不触发宿主全局注册的 Wevu 组件定义。
89
- *
90
- * @param options 组件选项
91
- * @internal
92
- */
93
- export declare function createWevuComponentDefinition(options: DefineComponentOptions<any, any, any, any, any>): WevuComponentConstructor<InferProps<ComponentPropsOptions>, Record<string, any>, Record<string, any>, ComputedDefinitions, MethodDefinitions> & ComponentDefinition<any, any, any>;
94
- /**
95
- * 从现有组件定义派生拥有独立应用上下文的组件定义。
96
- *
97
- * @param definition 已解析的 Wevu 组件定义
98
- * @internal
99
- */
100
- export declare function createIsolatedWevuComponentDefinition(definition: object): ComponentDefinition<any, any, any>;
101
- /**
102
- * 获取组件定义对应的宿主生命周期定义。
103
- *
104
- * @param definition Wevu 组件定义
105
- * @internal
106
- */
107
- export declare function getWevuComponentLifecycleDefinition(definition: object): Record<string, any> | undefined;
108
- /**
109
- * 从 Vue SFC 选项创建 wevu 组件,供 weapp-vite 编译产物直接调用的兼容入口。
110
- *
111
- * @param options 组件选项,可能包含小程序特有的 properties
112
- * @internal
113
- */
114
- export declare function createWevuComponent<P extends ComponentPropsOptions = ComponentPropsOptions, D extends object = Record<string, any>, C extends ComputedDefinitions = ComputedDefinitions, M extends MethodDefinitions = MethodDefinitions>(options: DefineComponentOptions<P, D, C, M> & {
115
- properties?: HostMiniProgramComponentPropertyOption;
116
- }): void;
117
- //#endregion
118
- //# sourceMappingURL=define.d.mts.map
@@ -1,31 +0,0 @@
1
- //#region src/runtime/disposables.d.ts
2
- export type DisposableMethodName = 'dispose' | 'abort' | 'cancel' | 'stop' | 'disconnect' | 'destroy' | 'close';
3
- export type DisposableObject = Partial<Record<DisposableMethodName, () => void>>;
4
- export type DisposableLike = (() => void) | DisposableObject;
5
- export interface DisposableBag {
6
- /**
7
- * 注册一个清理项,返回“取消注册”函数(不会立即执行清理)。
8
- */
9
- add: (target: DisposableLike | null | undefined) => () => void;
10
- /**
11
- * 立即执行并清空当前 bag 中的全部清理项(幂等)。
12
- */
13
- dispose: () => void;
14
- /**
15
- * 注册 timeout,并在 bag dispose 时自动 clearTimeout。
16
- */
17
- setTimeout: (handler: (...args: any[]) => void, timeout?: number, ...args: any[]) => ReturnType<typeof setTimeout>;
18
- /**
19
- * 注册 interval,并在 bag dispose 时自动 clearInterval。
20
- */
21
- setInterval: (handler: (...args: any[]) => void, timeout?: number, ...args: any[]) => ReturnType<typeof setInterval>;
22
- }
23
- /**
24
- * 在 setup() 中创建一个“清理袋”,统一管理副作用释放。
25
- *
26
- * 典型用法:注册定时器、请求任务、事件监听退订函数,
27
- * 在页面/组件卸载时自动批量清理,减少内存泄漏风险。
28
- */
29
- export declare function useDisposables(): DisposableBag;
30
- //#endregion
31
- //# sourceMappingURL=disposables.d.mts.map
@@ -1,26 +0,0 @@
1
- import { HostMiniProgramIntersectionObserver, HostMiniProgramIntersectionObserverOptions } from "./types/miniprogramHost.mjs";
2
- import { MaybeRefOrGetter } from "../reactivity/ref.mjs";
3
- import "../reactivity/index.mjs";
4
- import { InternalRuntimeState } from "./types/runtime.mjs";
5
- import "./types.mjs";
6
- //#region src/runtime/elementIntersectionObserver.d.ts
7
- export type ElementIntersectionObserverCallback<T = unknown> = (result: T) => void;
8
- export interface UseElementIntersectionObserverOptions<T = unknown> {
9
- context?: InternalRuntimeState | null;
10
- enabled?: MaybeRefOrGetter<boolean>;
11
- observerOptions?: MaybeRefOrGetter<HostMiniProgramIntersectionObserverOptions>;
12
- onObserve?: ElementIntersectionObserverCallback<T>;
13
- relativeToViewport?: boolean | Record<string, number>;
14
- selector: MaybeRefOrGetter<string | null | undefined>;
15
- }
16
- export interface UseElementIntersectionObserverReturn {
17
- disconnect: () => void;
18
- observe: () => HostMiniProgramIntersectionObserver | null;
19
- readonly observer: HostMiniProgramIntersectionObserver | null;
20
- }
21
- /**
22
- * 观察当前组件或页面内的节点可见性,并在卸载时自动断开。
23
- */
24
- export declare function useElementIntersectionObserver<T = unknown>(options: UseElementIntersectionObserverOptions<T>): UseElementIntersectionObserverReturn;
25
- //#endregion
26
- //# sourceMappingURL=elementIntersectionObserver.d.mts.map
@@ -1,7 +0,0 @@
1
- //#region src/runtime/features/inlineEvents.d.ts
2
- /**
3
- * 安装模板内联事件能力。
4
- */
5
- export declare function installInlineEvents(): void;
6
- //#endregion
7
- //# sourceMappingURL=inlineEvents.d.mts.map
@@ -1,7 +0,0 @@
1
- //#region src/runtime/features/jsxIslands.d.ts
2
- /**
3
- * 安装 JSX 动态岛的宿主事件入口,纯模板组件无需携带分发实现。
4
- */
5
- export declare function installJsxIslands(): void;
6
- //#endregion
7
- //# sourceMappingURL=jsxIslands.d.mts.map
@@ -1,7 +0,0 @@
1
- //#region src/runtime/features/layout.d.ts
2
- /**
3
- * 安装 layout 能力,并直接安装其模板 ref 依赖。
4
- */
5
- export declare function installLayout(): void;
6
- //#endregion
7
- //# sourceMappingURL=layout.d.mts.map
@@ -1,7 +0,0 @@
1
- //#region src/runtime/features/patchStrategy.d.ts
2
- /**
3
- * 安装 patch setData 策略。
4
- */
5
- export declare function installPatchStrategy(): void;
6
- //#endregion
7
- //# sourceMappingURL=patchStrategy.d.mts.map
@@ -1,24 +0,0 @@
1
- import { PageLayoutState, WevuPageLayoutMap, resolveRuntimePageLayoutName as resolveRuntimePageLayoutName$1, syncRuntimePageLayoutState as syncRuntimePageLayoutState$1, syncRuntimePageLayoutStateFromRuntime as syncRuntimePageLayoutStateFromRuntime$1, usePageLayout as usePageLayout$1 } from "../pageLayout.mjs";
2
- import { LayoutHostBinding } from "../capabilities.mjs";
3
- import { LayoutBridgeInstance, registerPageLayoutBridge as registerPageLayoutBridge$1, registerRuntimeLayoutHosts as registerRuntimeLayoutHosts$1, resolveLayoutBridge as resolveLayoutBridge$1, resolveLayoutHost as resolveLayoutHost$1, unregisterPageLayoutBridge as unregisterPageLayoutBridge$1, unregisterRuntimeLayoutHosts as unregisterRuntimeLayoutHosts$1, useLayoutBridge as useLayoutBridge$1, useLayoutHosts as useLayoutHosts$1, waitForLayoutHost as waitForLayoutHost$1 } from "../layoutBridge.mjs";
4
- //#region src/runtime/features/publicLayout.d.ts
5
- export declare const registerPageLayoutBridge: typeof registerPageLayoutBridge$1;
6
- export declare const unregisterPageLayoutBridge: typeof unregisterPageLayoutBridge$1;
7
- export declare const resolveLayoutBridge: typeof resolveLayoutBridge$1;
8
- export declare const resolveLayoutHost: typeof resolveLayoutHost$1;
9
- export declare const waitForLayoutHost: typeof waitForLayoutHost$1;
10
- export declare const useLayoutBridge: typeof useLayoutBridge$1;
11
- export declare const registerRuntimeLayoutHosts: typeof registerRuntimeLayoutHosts$1;
12
- export declare const unregisterRuntimeLayoutHosts: typeof unregisterRuntimeLayoutHosts$1;
13
- export declare const useLayoutHosts: typeof useLayoutHosts$1;
14
- export declare const usePageLayout: typeof usePageLayout$1;
15
- type PublicPageLayoutName = keyof WevuPageLayoutMap extends never ? string : Extract<keyof WevuPageLayoutMap, string>;
16
- type PublicPageLayoutProps<Name extends string> = Name extends keyof WevuPageLayoutMap ? WevuPageLayoutMap[Name] : object;
17
- export declare function setPageLayout(layout: false): void;
18
- export declare function setPageLayout<Name extends PublicPageLayoutName>(layout: Name, props?: PublicPageLayoutProps<Name>): void;
19
- export declare const syncRuntimePageLayoutState: typeof syncRuntimePageLayoutState$1;
20
- export declare const syncRuntimePageLayoutStateFromRuntime: typeof syncRuntimePageLayoutStateFromRuntime$1;
21
- export declare const resolveRuntimePageLayoutName: typeof resolveRuntimePageLayoutName$1;
22
- //#endregion
23
- export type { LayoutBridgeInstance, LayoutHostBinding, PageLayoutState, WevuPageLayoutMap };
24
- //# sourceMappingURL=publicLayout.d.mts.map
@@ -1,23 +0,0 @@
1
- import { ComputedDefinitions } from "../types/core.mjs";
2
- import "../types.mjs";
3
- import { InlineExpressionMap } from "../register/inline.mjs";
4
- import { LayoutHostBinding, TemplateRefBinding } from "../capabilities.mjs";
5
- import { WEVU_BINDING_MANIFEST_KEY, WevuRuntimeBindingManifestV1 } from "@weapp-core/constants";
6
- //#region src/runtime/features/scopedSlots.d.ts
7
- export interface CreateWevuScopedSlotComponentOptions {
8
- computed?: ComputedDefinitions;
9
- inlineMap?: InlineExpressionMap;
10
- layoutHosts?: LayoutHostBinding[];
11
- templateRefs?: TemplateRefBinding[];
12
- [WEVU_BINDING_MANIFEST_KEY]?: WevuRuntimeBindingManifestV1;
13
- }
14
- /**
15
- * 创建编译器生成的作用域插槽组件。
16
- */
17
- export declare function createWevuScopedSlotComponent(overrides?: CreateWevuScopedSlotComponentOptions): void;
18
- /**
19
- * 安装作用域插槽的 owner 生命周期与组件创建能力。
20
- */
21
- export declare function installScopedSlots(): void;
22
- //#endregion
23
- //# sourceMappingURL=scopedSlots.d.mts.map
@@ -1,7 +0,0 @@
1
- //#region src/runtime/features/setDataHighFrequencyWarning.d.ts
2
- /**
3
- * 安装可选的 setData 高频告警能力。
4
- */
5
- export declare function installSetDataHighFrequencyWarning(): void;
6
- //#endregion
7
- //# sourceMappingURL=setDataHighFrequencyWarning.d.mts.map
@@ -1,7 +0,0 @@
1
- //#region src/runtime/features/templateRefs.d.ts
2
- /**
3
- * 安装模板 ref 能力。
4
- */
5
- export declare function installTemplateRefs(): void;
6
- //#endregion
7
- //# sourceMappingURL=templateRefs.d.mts.map
@@ -1,27 +0,0 @@
1
- import { InternalRuntimeState } from "../types/runtime.mjs";
2
- import "../types.mjs";
3
- //#region src/runtime/hooks/base.d.ts
4
- export declare function getCurrentInstance<T extends InternalRuntimeState = InternalRuntimeState>(): T | undefined;
5
- /**
6
- * 设置当前运行时实例(框架内部使用)。
7
- * @internal
8
- */
9
- export declare function setCurrentInstance(inst: InternalRuntimeState | undefined): void;
10
- export declare function getCurrentSetupContext<T = any>(): T | undefined;
11
- /**
12
- * 设置当前 setup 上下文(框架内部使用)。
13
- * @internal
14
- */
15
- export declare function setCurrentSetupContext(ctx: any | undefined): void;
16
- /**
17
- * 调用批量 hook(框架内部调度入口)。
18
- * @internal
19
- */
20
- export declare function callHookList(target: InternalRuntimeState, name: string, args?: any[]): void;
21
- /**
22
- * 调用返回值型 hook(框架内部调度入口)。
23
- * @internal
24
- */
25
- export declare function callHookReturn(target: InternalRuntimeState, name: string, args?: any[]): any;
26
- //#endregion
27
- //# sourceMappingURL=base.d.mts.map
@@ -1,30 +0,0 @@
1
- import { HostMiniProgramAddToFavoritesOption, HostMiniProgramLaunchOptions, HostMiniProgramMemoryWarningResult, HostMiniProgramPageLifetime, HostMiniProgramPageNotFoundOptions, HostMiniProgramPageResizeOption, HostMiniProgramPageScrollOption, HostMiniProgramSaveExitState, HostMiniProgramShareAppMessageOption, HostMiniProgramTabItemTapOption, HostMiniProgramThemeChangeResult, HostMiniProgramUnhandledRejectionResult } from "../types/miniprogramHost.mjs";
2
- import "../types.mjs";
3
- //#region src/runtime/hooks/register.d.ts
4
- export declare function onLaunch(handler: (options: HostMiniProgramLaunchOptions) => void): void;
5
- export declare function onPageNotFound(handler: (options: HostMiniProgramPageNotFoundOptions) => void): void;
6
- export declare function onUnhandledRejection(handler: (options: HostMiniProgramUnhandledRejectionResult) => void): void;
7
- export declare function onThemeChange(handler: (options: HostMiniProgramThemeChangeResult) => void): void;
8
- export declare function onMemoryWarning(handler: (options: HostMiniProgramMemoryWarningResult) => void): void;
9
- export declare function onShow(handler: () => void): void;
10
- export declare function onShow(handler: (options: HostMiniProgramLaunchOptions) => void): void;
11
- export declare function onLoad(handler: HostMiniProgramPageLifetime['onLoad']): void;
12
- export declare function onHide(handler: () => void): void;
13
- export declare function onUnload(handler: () => void): void;
14
- export declare function onReady(handler: () => void): void;
15
- export declare function onPullDownRefresh(handler: HostMiniProgramPageLifetime['onPullDownRefresh']): void;
16
- export declare function onReachBottom(handler: HostMiniProgramPageLifetime['onReachBottom']): void;
17
- export declare function onPageScroll(handler: (opt: HostMiniProgramPageScrollOption) => void): void;
18
- export declare function onRouteDone(handler: HostMiniProgramPageLifetime['onRouteDone'] | ((opt?: unknown) => void)): void;
19
- export declare function onTabItemTap(handler: (opt: HostMiniProgramTabItemTapOption) => void): void;
20
- export declare function onResize(handler: (opt: HostMiniProgramPageResizeOption) => void): void;
21
- export declare function onMoved(handler: () => void): void;
22
- export declare function onAttached(handler: () => void): void;
23
- export declare function onDetached(handler: () => void): void;
24
- export declare function onError(handler: (err: any) => void): void;
25
- export declare function onSaveExitState(handler: () => HostMiniProgramSaveExitState): void;
26
- export declare function onShareAppMessage(handler: (options: HostMiniProgramShareAppMessageOption) => Record<string, any> | void): void;
27
- export declare function onShareTimeline(handler: HostMiniProgramPageLifetime['onShareTimeline']): void;
28
- export declare function onAddToFavorites(handler: (options: HostMiniProgramAddToFavoritesOption) => Record<string, any> | void): void;
29
- //#endregion
30
- //# sourceMappingURL=register.d.mts.map
@@ -1,52 +0,0 @@
1
- import { InternalRuntimeState } from "../types/runtime.mjs";
2
- import "../types.mjs";
3
- //#region src/runtime/hooks/vue.d.ts
4
- /**
5
- * Vue 3 对齐:组件/页面已挂载,映射小程序 onReady
6
- */
7
- export declare function onMounted(handler: () => void): void;
8
- /**
9
- * Vue 3 对齐:组件/页面更新后触发。
10
- * 小程序没有专用 update 生命周期,这里在每次 setData 完成后调用。
11
- */
12
- export declare function onUpdated(handler: () => void): void;
13
- /**
14
- * Vue 3 对齐:在卸载清理前触发,保持实例上下文和暴露方法可用。
15
- */
16
- export declare function onBeforeUnmount(handler: () => void): void;
17
- /**
18
- * Vue 3 对齐:组件/页面卸载;映射到页面 onUnload 或组件 detached
19
- */
20
- export declare function onUnmounted(handler: () => void): void;
21
- /**
22
- * Vue 3 对齐:挂载前;setup 时同步触发以模拟 beforeMount 语义
23
- */
24
- export declare function onBeforeMount(handler: () => void): void;
25
- /**
26
- * Vue 3 对齐:更新前;在每次 setData 前触发
27
- */
28
- export declare function onBeforeUpdate(handler: () => void): void;
29
- /**
30
- * Vue 3 对齐:错误捕获;映射到小程序 onError
31
- */
32
- export declare function onErrorCaptured(handler: (err: any, instance: any, info: string) => void): void;
33
- /**
34
- * Vue 3 对齐:组件激活;映射到小程序 onShow
35
- */
36
- export declare function onActivated(handler: () => void): void;
37
- /**
38
- * Vue 3 对齐:组件失活;映射到小程序 onHide
39
- */
40
- export declare function onDeactivated(handler: () => void): void;
41
- /**
42
- * Vue 3 对齐:服务端渲染前置钩子。
43
- * 小程序无此场景,保留空实现以保持 API 兼容。
44
- */
45
- export declare function onServerPrefetch(_handler: () => void): void;
46
- /**
47
- * 派发更新阶段钩子(框架内部调度入口)。
48
- * @internal
49
- */
50
- export declare function callUpdateHooks(target: InternalRuntimeState, phase: 'before' | 'after'): void;
51
- //#endregion
52
- //# sourceMappingURL=vue.d.mts.map
@@ -1,4 +0,0 @@
1
- import { callHookList, callHookReturn, getCurrentInstance, getCurrentSetupContext, setCurrentInstance, setCurrentSetupContext } from "./hooks/base.mjs";
2
- import { onAddToFavorites, onAttached, onDetached, onError, onHide, onLaunch, onLoad, onMemoryWarning, onMoved, onPageNotFound, onPageScroll, onPullDownRefresh, onReachBottom, onReady, onResize, onRouteDone, onSaveExitState, onShareAppMessage, onShareTimeline, onShow, onTabItemTap, onThemeChange, onUnhandledRejection, onUnload } from "./hooks/register.mjs";
3
- import { callUpdateHooks, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onServerPrefetch, onUnmounted, onUpdated } from "./hooks/vue.mjs";
4
- export { callHookList, callHookReturn, callUpdateHooks, getCurrentInstance, getCurrentSetupContext, 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, setCurrentInstance, setCurrentSetupContext };
@@ -1,46 +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 "./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 "./types/miniprogramHost.mjs";
3
- import { MiniProgramAdapter, MiniProgramAppOptions, MiniProgramBehaviorIdentifier, MiniProgramComponentInstance, MiniProgramComponentOptions, MiniProgramComponentPropertyValue, MiniProgramComponentRawOptions, MiniProgramInstance, MiniProgramPageLifetimes } from "./types/miniprogram.mjs";
4
- import { ComponentPropsOptions, ExtractDefaultPropTypes, ExtractPropTypes, ExtractPublicPropTypes, InferNativePropType, InferNativeProps, InferPropType, InferProps, NativePropType, NativePropsOptions, NativeTypeHint, NativeTypedProperty, PropConstructor, PropOptions, PropType } from "./types/props/propTypes.mjs";
5
- import { MiniProgramRouterNavigateToOption, MiniProgramRouterReLaunchOption, MiniProgramRouterRedirectToOption, MiniProgramRouterSwitchTabOption, SetupContextRouter, WevuTypedRouterRouteMap } from "./types/props/router.mjs";
6
- import { ComponentPublicInstance, ComputedDefinitions, ExtractComputed, ExtractMethods, MethodDefinitions, ModelBinding, ModelBindingOptions, ModelBindingPayload } from "./types/core.mjs";
7
- import { AppConfig, InternalRuntimeState, InternalRuntimeStateFields, RuntimeApp, RuntimeInstance, WevuPlugin } from "./types/runtime.mjs";
8
- import { SetupContext, SetupContextIntersectionObserver, SetupContextIntersectionObserverOptions, SetupContextNativeInstance, SetupContextSelectorQuery, SetupFunction } from "./types/props/setup.mjs";
9
- import { AllowedComponentProps, ComponentCustomProps, ComponentOptionsMixin, DefineComponent, NativeComponent, ObjectDirective, PublicProps, ShallowUnwrapRef, VNode, VNodeProps } from "../vue-types.mjs";
10
- import { SetDataBindingDiagnostic, SetDataDebugInfo, SetDataSnapshotOptions } from "./types/setData.mjs";
11
- import { CreateAppOptions, DataOption, DefineAppOptions, DefineComponentOptions, PageFeatures } from "./types/options.mjs";
12
- import { GlobalComponents, GlobalDirectives, MiniProgramTemplateRefValue, TemplateRefValue, TemplateRefs, WevuGlobalComponents, WevuGlobalDirectives } from "./types.mjs";
13
- import { useCssModule } from "./css.mjs";
14
- import { WevuDefaults, resetWevuDefaults } from "./defaults.mjs";
15
- import { ComponentDefinition, DefineComponentTypePropsOptions, DefineComponentWithTypeProps, SetupContextWithTypeProps, SetupFunctionWithTypeProps, WevuComponentConstructor, WevuDefinedComponent } from "./define.mjs";
16
- import { DisposableBag, DisposableLike, DisposableMethodName, DisposableObject, useDisposables } from "./disposables.mjs";
17
- import { ElementIntersectionObserverCallback, UseElementIntersectionObserverOptions, UseElementIntersectionObserverReturn, useElementIntersectionObserver } from "./elementIntersectionObserver.mjs";
18
- import { PageLayoutState, WevuPageLayoutMap } from "./pageLayout.mjs";
19
- import { LayoutHostBinding } from "./capabilities.mjs";
20
- import { LayoutBridgeInstance } from "./layoutBridge.mjs";
21
- import { registerPageLayoutBridge, registerRuntimeLayoutHosts, resolveLayoutBridge, resolveLayoutHost, resolveRuntimePageLayoutName, setPageLayout, syncRuntimePageLayoutState, syncRuntimePageLayoutStateFromRuntime, unregisterPageLayoutBridge, unregisterRuntimeLayoutHosts, useLayoutBridge, useLayoutHosts, usePageLayout, waitForLayoutHost } from "./features/publicLayout.mjs";
22
- import { callHookList, callHookReturn, getCurrentInstance, getCurrentSetupContext, setCurrentInstance, setCurrentSetupContext } from "./hooks/base.mjs";
23
- import { onAddToFavorites, onAttached, onDetached, onError, onHide, onLaunch, onLoad, onMemoryWarning, onMoved, onPageNotFound, onPageScroll, onPullDownRefresh, onReachBottom, onReady, onResize, onRouteDone, onSaveExitState, onShareAppMessage, onShareTimeline, onShow, onTabItemTap, onThemeChange, onUnhandledRejection, onUnload } from "./hooks/register.mjs";
24
- import { callUpdateHooks, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onServerPrefetch, onUnmounted, onUpdated } from "./hooks/vue.mjs";
25
- import "./hooks.mjs";
26
- import { UseIntersectionObserverOptions, UseIntersectionObserverResult, useIntersectionObserver } from "./intersectionObserver.mjs";
27
- import { isNoSetData, markNoSetData } from "./noSetData.mjs";
28
- import { NavigationBarMetrics, PageStackSnapshot, UseNavigationBarMetricsOptions, UsePageStackOptions, getCurrentPageStackSnapshot, getNavigationBarMetrics, useNavigationBarMetrics, usePageStack } from "./pageEnvironment.mjs";
29
- import { UsePageScrollThrottleOptions, UsePageScrollThrottleStopHandle, usePageScrollThrottle } from "./pageScroll.mjs";
30
- import { setGlobalProvidedValue } from "./provideStore.mjs";
31
- import { hasInjectionContext, inject, injectGlobal, provide, provideGlobal } from "./provide.mjs";
32
- import { setRuntimeSetDataVisibility, teardownRuntimeInstance } from "./register/runtimeInstance.mjs";
33
- import { runSetupFunction } from "./register/setup.mjs";
34
- import "./register.mjs";
35
- import { createApp, createWevuComponent, createWevuScopedSlotComponent, defineComponent, mountRuntimeInstance, registerApp, registerComponent, setWevuDefaults } from "./publicRuntime.mjs";
36
- import { PullDownRefreshHandler, UseAsyncPullDownRefreshOptions, useAsyncPullDownRefresh } from "./pullDownRefresh.mjs";
37
- import { UseAllBoundingClientRectOptions, UseAllScrollOffsetOptions, UseAllSelectorFieldsOptions, UseBoundingClientRectOptions, UseScrollOffsetOptions, UseSelectorFieldsOptions, UseSelectorQueryOptions, useBoundingClientRect, useScrollOffset, useSelectorFields, useSelectorQuery } from "./selectorQuery.mjs";
38
- import { normalizeClass, normalizeStyle, resolvePropValue } from "./template.mjs";
39
- import { UpdatePerformanceListener, UpdatePerformanceListenerResult, UseUpdatePerformanceListenerStopHandle, useUpdatePerformanceListener } from "./updatePerformance.mjs";
40
- import { defineAppSetup, use } from "./use.mjs";
41
- import { useAttrs, useNativeInstance, useSlots } from "./vueCompat/context.mjs";
42
- import { ModelModifiers, UseModelOptions, mergeModels, useBindModel, useChangeModel, useModel } from "./vueCompat/model.mjs";
43
- import { useNativePageRouter, useNativeRouter } from "./vueCompat/router.mjs";
44
- import { TemplateRef, useTemplateRef } from "./vueCompat/templateRef.mjs";
45
- import "./vueCompat.mjs";
46
- export { type AlipayMiniProgramHostNamespace, type AlipayMiniProgramHostSourceContract, type AllowedComponentProps, type AppConfig, type ComponentCustomProps, type ComponentDefinition, type ComponentOptionsMixin, type ComponentPropsOptions, type ComponentPublicInstance, type ComputedDefinitions, type CreateAppOptions, type DataOption, type DefaultMiniProgramHostNamespace, type DefaultMiniProgramHostSourceContract, type DefineAppOptions, type DefineComponent, type DefineComponentOptions, type DefineComponentTypePropsOptions, type DefineComponentWithTypeProps, DisposableBag, DisposableLike, DisposableMethodName, DisposableObject, type DouyinMiniProgramHostNamespace, type DouyinMiniProgramHostSourceContract, ElementIntersectionObserverCallback, type ExtractComputed, type ExtractDefaultPropTypes, type ExtractMethods, type ExtractPropTypes, type ExtractPublicPropTypes, GlobalComponents, GlobalDirectives, type HostMiniProgramAddToFavoritesOption, type HostMiniProgramAppOptions, type HostMiniProgramAppTrivialInstance, type HostMiniProgramBehaviorIdentifier, type HostMiniProgramBoundingClientRectResult, type HostMiniProgramComponentAllFullProperty, type HostMiniProgramComponentAllProperty, type HostMiniProgramComponentBehaviorOptions, type HostMiniProgramComponentEmptyArray, type HostMiniProgramComponentInstance, type HostMiniProgramComponentMethodOption, type HostMiniProgramComponentPropertyOption, type HostMiniProgramComponentPropertyValue, type HostMiniProgramComponentShortProperty, type HostMiniProgramComponentTrivialInstance, type HostMiniProgramComponentTrivialOption, type HostMiniProgramIntersectionObserver, type HostMiniProgramIntersectionObserverOptions, type HostMiniProgramLaunchOptions, type HostMiniProgramMemoryWarningResult, type HostMiniProgramNavigateToOption, type HostMiniProgramNodesRef, type HostMiniProgramNodesRefFields, type HostMiniProgramPageLifetime, type HostMiniProgramPageNotFoundOptions, type HostMiniProgramPageResizeOption, type HostMiniProgramPageScrollOption, type HostMiniProgramPageTrivialInstance, type HostMiniProgramReLaunchOption, type HostMiniProgramRedirectToOption, type HostMiniProgramRouter, type HostMiniProgramSaveExitState, type HostMiniProgramScrollOffsetResult, type HostMiniProgramSelectorQuery, type HostMiniProgramShareAppMessageOption, type HostMiniProgramSwitchTabOption, type HostMiniProgramTabItemTapOption, type HostMiniProgramThemeChangeResult, type HostMiniProgramTriggerEventOptions, type HostMiniProgramUnhandledRejectionResult, type InferNativePropType, type InferNativeProps, type InferPropType, type InferProps, type InternalRuntimeState, type InternalRuntimeStateFields, type LayoutBridgeInstance, type LayoutHostBinding, type MethodDefinitions, type MiniProgramAdapter, type HostMiniProgramAddToFavoritesOption as MiniProgramAddToFavoritesOption, type MiniProgramAppOptions, type MiniProgramBehaviorIdentifier, type HostMiniProgramBoundingClientRectResult as MiniProgramBoundingClientRectResult, type HostMiniProgramComponentAllFullProperty as MiniProgramComponentAllFullProperty, type HostMiniProgramComponentAllProperty as MiniProgramComponentAllProperty, type HostMiniProgramComponentBehaviorOptions as MiniProgramComponentBehaviorOptions, type HostMiniProgramComponentEmptyArray as MiniProgramComponentEmptyArray, type MiniProgramComponentInstance, type HostMiniProgramComponentMethodOption as MiniProgramComponentMethodOption, type MiniProgramComponentOptions, type HostMiniProgramComponentPropertyOption as MiniProgramComponentPropertyOption, type MiniProgramComponentPropertyValue, type MiniProgramComponentRawOptions, type HostMiniProgramComponentShortProperty as MiniProgramComponentShortProperty, type MiniProgramHostNamespace, type MiniProgramHostNamespaceBySource, type MiniProgramHostSourceName, type MiniProgramHostSourceRegistry, type MiniProgramInstance, type HostMiniProgramIntersectionObserver as MiniProgramIntersectionObserver, type HostMiniProgramIntersectionObserverOptions as MiniProgramIntersectionObserverOptions, type HostMiniProgramLaunchOptions as MiniProgramLaunchOptions, type HostMiniProgramMemoryWarningResult as MiniProgramMemoryWarningResult, type HostMiniProgramNavigateToOption as MiniProgramNavigateToOption, type HostMiniProgramNodesRef as MiniProgramNodesRef, type HostMiniProgramNodesRefFields as MiniProgramNodesRefFields, type HostMiniProgramPageLifetime as MiniProgramPageLifetime, type MiniProgramPageLifetimes, type HostMiniProgramPageNotFoundOptions as MiniProgramPageNotFoundOptions, type HostMiniProgramPageResizeOption as MiniProgramPageResizeOption, type HostMiniProgramPageScrollOption as MiniProgramPageScrollOption, type MiniProgramPlatformHostNamespaceBySource, type MiniProgramPlatformHostSourceName, type MiniProgramPlatformHostSourceRegistry, type HostMiniProgramReLaunchOption as MiniProgramReLaunchOption, type HostMiniProgramRedirectToOption as MiniProgramRedirectToOption, type HostMiniProgramRouter as MiniProgramRouter, type MiniProgramRouterNavigateToOption, type MiniProgramRouterReLaunchOption, type MiniProgramRouterRedirectToOption, type MiniProgramRouterSwitchTabOption, type MiniProgramRuntimeHostNamespaceBySource, type MiniProgramRuntimeHostSourceName, type MiniProgramRuntimeHostSourceRegistry, type HostMiniProgramSaveExitState as MiniProgramSaveExitState, type HostMiniProgramScrollOffsetResult as MiniProgramScrollOffsetResult, type HostMiniProgramSelectorQuery as MiniProgramSelectorQuery, type HostMiniProgramShareAppMessageOption as MiniProgramShareAppMessageOption, type HostMiniProgramSwitchTabOption as MiniProgramSwitchTabOption, type HostMiniProgramTabItemTapOption as MiniProgramTabItemTapOption, MiniProgramTemplateRefValue, type HostMiniProgramThemeChangeResult as MiniProgramThemeChangeResult, type HostMiniProgramUnhandledRejectionResult as MiniProgramUnhandledRejectionResult, type ModelBinding, type ModelBindingOptions, type ModelBindingPayload, type ModelModifiers, type NativeComponent, type NativePropType, type NativePropsOptions, type NativeTypeHint, type NativeTypedProperty, NavigationBarMetrics, type ObjectDirective, type PageFeatures, type PageLayoutState, PageStackSnapshot, type PropConstructor, type PropOptions, type PropType, type PublicProps, PullDownRefreshHandler, type RuntimeApp, type RuntimeInstance, type SetDataBindingDiagnostic, type SetDataDebugInfo, type SetDataSnapshotOptions, type SetupContext, type SetupContextIntersectionObserver, type SetupContextIntersectionObserverOptions, type SetupContextNativeInstance, type SetupContextRouter, type SetupContextSelectorQuery, type SetupContextWithTypeProps, type SetupFunction, type SetupFunctionWithTypeProps, type ShallowUnwrapRef, type TemplateRef, TemplateRefValue, TemplateRefs, type HostMiniProgramTriggerEventOptions as TriggerEventOptions, type TtMiniProgramHostNamespace, type TtMiniProgramHostSourceContract, UpdatePerformanceListener, UpdatePerformanceListenerResult, UseAllBoundingClientRectOptions, UseAllScrollOffsetOptions, UseAllSelectorFieldsOptions, UseAsyncPullDownRefreshOptions, UseBoundingClientRectOptions, UseElementIntersectionObserverOptions, UseElementIntersectionObserverReturn, UseIntersectionObserverOptions, UseIntersectionObserverResult, type UseModelOptions, UseNavigationBarMetricsOptions, UsePageScrollThrottleOptions, UsePageScrollThrottleStopHandle, UsePageStackOptions, UseScrollOffsetOptions, UseSelectorFieldsOptions, UseSelectorQueryOptions, UseUpdatePerformanceListenerStopHandle, type VNode, type VNodeProps, type WechatMiniProgramHostNamespace, type WechatMiniProgramHostSourceContract, type WevuComponentConstructor, type WevuDefaults, type WevuDefinedComponent, WevuGlobalComponents, WevuGlobalDirectives, type WevuPageLayoutMap, type WevuPlugin, type WevuTypedRouterRouteMap, callHookList, callHookReturn, callUpdateHooks, createApp, createWevuComponent, createWevuScopedSlotComponent, defineAppSetup, defineComponent, getCurrentInstance, getCurrentPageStackSnapshot, getCurrentSetupContext, getNavigationBarMetrics, hasInjectionContext, inject, injectGlobal, isNoSetData, markNoSetData, mergeModels, mountRuntimeInstance, normalizeClass, normalizeStyle, onActivated, onAddToFavorites, onAttached, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onDetached, onError, onErrorCaptured, onHide, onLaunch, onLoad, onMemoryWarning, onMounted, onMoved, onPageNotFound, onPageScroll, onPullDownRefresh, onReachBottom, onReady, onResize, onRouteDone, onSaveExitState, onServerPrefetch, onShareAppMessage, onShareTimeline, onShow, onTabItemTap, onThemeChange, onUnhandledRejection, onUnload, onUnmounted, onUpdated, provide, provideGlobal, registerApp, registerComponent, registerPageLayoutBridge, registerRuntimeLayoutHosts, resetWevuDefaults, resolveLayoutBridge, resolveLayoutHost, resolvePropValue, resolveRuntimePageLayoutName, runSetupFunction, setCurrentInstance, setCurrentSetupContext, setGlobalProvidedValue, setPageLayout, setRuntimeSetDataVisibility, setWevuDefaults, syncRuntimePageLayoutState, syncRuntimePageLayoutStateFromRuntime, teardownRuntimeInstance, unregisterPageLayoutBridge, unregisterRuntimeLayoutHosts, use, useAsyncPullDownRefresh, useAttrs, useBindModel, useBoundingClientRect, useChangeModel, useCssModule, useDisposables, useElementIntersectionObserver, useIntersectionObserver, useLayoutBridge, useLayoutHosts, useModel, useNativeInstance, useNativePageRouter, useNativeRouter, useNavigationBarMetrics, usePageLayout, usePageScrollThrottle, usePageStack, useScrollOffset, useSelectorFields, useSelectorQuery, useSlots, useTemplateRef, useUpdatePerformanceListener, waitForLayoutHost };
@@ -1,14 +0,0 @@
1
- import { HostMiniProgramIntersectionObserver, HostMiniProgramIntersectionObserverOptions } from "./types/miniprogramHost.mjs";
2
- import "./types.mjs";
3
- //#region src/runtime/intersectionObserver.d.ts
4
- export type UseIntersectionObserverOptions = HostMiniProgramIntersectionObserverOptions;
5
- export type UseIntersectionObserverResult = HostMiniProgramIntersectionObserver;
6
- /**
7
- * 在 setup 中创建 IntersectionObserver,并在卸载时自动断开。
8
- *
9
- * - 优先使用 `ctx.instance.createIntersectionObserver(options)`。
10
- * - 不可用时回退到宿主全局对象的 `createIntersectionObserver(...)`。
11
- */
12
- export declare function useIntersectionObserver(options?: UseIntersectionObserverOptions): UseIntersectionObserverResult;
13
- //#endregion
14
- //# sourceMappingURL=intersectionObserver.d.mts.map
@@ -1,37 +0,0 @@
1
- import { WevuJsxVNode } from "../jsxTypes.mjs";
2
- //#region src/runtime/jsxIsland.d.ts
3
- export declare const Fragment: unique symbol;
4
- export interface WevuJsxIslandNode {
5
- children?: WevuJsxIslandNode[];
6
- events?: Record<string, string>;
7
- kind: 'element' | 'fragment' | 'text';
8
- props?: Record<string, any>;
9
- tag?: string;
10
- text?: string;
11
- }
12
- export interface WevuJsxIslandAdapters {
13
- normalizeClass: (value: unknown) => string;
14
- normalizeStyle: (value: unknown) => string;
15
- }
16
- export declare function createVNode(type: unknown, props?: Record<string, any> | null, children?: unknown): WevuJsxVNode;
17
- export declare function createTextVNode(text: unknown): WevuJsxVNode;
18
- export declare function isVNode(value: unknown): value is WevuJsxVNode;
19
- export declare function mergeProps(...sources: Array<Record<string, any> | null | undefined>): Record<string, any>;
20
- export declare function transformOn(events: Record<string, unknown>): Record<string, unknown>;
21
- export declare function resolveComponent(name: string): string;
22
- export declare const vShow = "show";
23
- export declare const vModelText = "model-text";
24
- export declare const vModelCheckbox = "model-checkbox";
25
- export declare const vModelRadio = "model-radio";
26
- export declare const vModelSelect = "model-select";
27
- export declare function withDirectives(vnode: WevuJsxVNode, directives: unknown[]): {
28
- props: {
29
- [x: string]: unknown;
30
- };
31
- children?: unknown;
32
- type: unknown;
33
- };
34
- export declare function resolveDirective(name: string): string;
35
- export declare function normalizeJsxIsland(this: any, value: unknown, islandId: string, adapters: WevuJsxIslandAdapters): WevuJsxIslandNode | null;
36
- //#endregion
37
- //# sourceMappingURL=jsxIsland.d.mts.map
@@ -1,55 +0,0 @@
1
- import { LayoutHostBinding } from "./capabilities.mjs";
2
- //#region src/runtime/layoutBridge.d.ts
3
- type LayoutBridgeContext = Record<string, any>;
4
- type LayoutBridgeComponentResolver = (selector: string) => any;
5
- type LayoutHostMap = Record<string, unknown>;
6
- export type LayoutBridgeInstance<T = LayoutBridgeContext> = T & {
7
- selectComponent?: LayoutBridgeComponentResolver;
8
- };
9
- interface LayoutHostResolveOptions<T = any> {
10
- context?: T;
11
- fallbackContext?: T;
12
- interval?: number;
13
- retries?: number;
14
- }
15
- /**
16
- * 为当前页面注册 layout bridge,使页面或子组件可消费 layout 内部能力。
17
- */
18
- export declare function registerPageLayoutBridge(selectors: string | string[], context?: LayoutBridgeContext): boolean;
19
- /**
20
- * 移除当前页面的 layout bridge 注册。
21
- */
22
- export declare function unregisterPageLayoutBridge(selectors: string | string[], context?: LayoutBridgeContext): boolean;
23
- /**
24
- * 解析当前页面已注册的 layout bridge,找不到时回退到传入上下文。
25
- */
26
- export declare function resolveLayoutBridge<T = any>(selector: string, fallbackContext?: T): LayoutBridgeInstance<T> | undefined;
27
- /**
28
- * 解析当前页面 layout 内通过指定 key 暴露的宿主实例。
29
- */
30
- export declare function resolveLayoutHost<T = any, C = any>(key: string, options?: LayoutHostResolveOptions<C>): NonNullable<T> | null;
31
- /**
32
- * 等待当前页面 layout 宿主实例可用,适合页面初次进入时的异步宿主解析。
33
- */
34
- export declare function waitForLayoutHost<T = any, C = any>(key: string, options?: LayoutHostResolveOptions<C>): Promise<T | null>;
35
- /**
36
- * 在 layout 生命周期内暴露 bridge,使页面或子组件可访问 layout 内部实例。
37
- */
38
- export declare function useLayoutBridge(selectors: string | string[], options?: {
39
- resolveComponent?: LayoutBridgeComponentResolver;
40
- }): void;
41
- /**
42
- * 使用编译期注入的宿主绑定信息,直接从当前 layout 运行时实例解析子组件宿主并注册 bridge。
43
- */
44
- export declare function registerRuntimeLayoutHosts(bindings: readonly LayoutHostBinding[], context?: LayoutBridgeContext): any;
45
- /**
46
- * 移除运行时自动注册的 layout 宿主 bridge。
47
- */
48
- export declare function unregisterRuntimeLayoutHosts(bindings: readonly LayoutHostBinding[], context?: LayoutBridgeContext): boolean;
49
- /**
50
- * 使用 key -> 宿主实例的映射批量暴露 layout 内部宿主,适合 toast/dialog 等共享反馈节点。
51
- */
52
- export declare function useLayoutHosts(hosts: LayoutHostMap): void;
53
- //#endregion
54
- export type { LayoutHostBinding };
55
- //# sourceMappingURL=layoutBridge.d.mts.map
@@ -1,5 +0,0 @@
1
- //#region src/runtime/noSetData.d.ts
2
- export declare function markNoSetData<T extends object>(value: T): T;
3
- export declare function isNoSetData(value: unknown): boolean;
4
- //#endregion
5
- //# sourceMappingURL=noSetData.d.mts.map