wevu 7.0.3 → 7.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (731) hide show
  1. package/README.md +20 -4
  2. package/dist/alipay/jsx-runtime.d.mts +13 -0
  3. package/dist/alipay/jsx-runtime.mjs +1 -0
  4. package/dist/alipayIntrinsicElements/base.d.mts +4 -0
  5. package/dist/alipayIntrinsicElements/elements/button.d.mts +29 -0
  6. package/dist/alipayIntrinsicElements/elements/camera.d.mts +18 -0
  7. package/dist/alipayIntrinsicElements/elements/canvas.d.mts +20 -0
  8. package/dist/alipayIntrinsicElements/elements/checkbox-group.d.mts +11 -0
  9. package/dist/alipayIntrinsicElements/elements/checkbox.d.mts +14 -0
  10. package/dist/alipayIntrinsicElements/elements/contact-button.d.mts +15 -0
  11. package/dist/alipayIntrinsicElements/elements/cover-image.d.mts +11 -0
  12. package/dist/alipayIntrinsicElements/elements/cover-view.d.mts +11 -0
  13. package/dist/alipayIntrinsicElements/elements/error-view.d.mts +14 -0
  14. package/dist/alipayIntrinsicElements/elements/form.d.mts +12 -0
  15. package/dist/alipayIntrinsicElements/elements/icon.d.mts +11 -0
  16. package/dist/alipayIntrinsicElements/elements/image.d.mts +17 -0
  17. package/dist/alipayIntrinsicElements/elements/input.d.mts +31 -0
  18. package/dist/alipayIntrinsicElements/elements/join-group-chat.d.mts +9 -0
  19. package/dist/alipayIntrinsicElements/elements/label.d.mts +9 -0
  20. package/dist/alipayIntrinsicElements/elements/lifestyle.d.mts +11 -0
  21. package/dist/alipayIntrinsicElements/elements/lottie.d.mts +25 -0
  22. package/dist/alipayIntrinsicElements/elements/map.d.mts +44 -0
  23. package/dist/alipayIntrinsicElements/elements/match-media.d.mts +15 -0
  24. package/dist/alipayIntrinsicElements/elements/movable-area.d.mts +9 -0
  25. package/dist/alipayIntrinsicElements/elements/movable-view.d.mts +32 -0
  26. package/dist/alipayIntrinsicElements/elements/navigator.d.mts +13 -0
  27. package/dist/alipayIntrinsicElements/elements/page-container.d.mts +27 -0
  28. package/dist/alipayIntrinsicElements/elements/page-meta.d.mts +19 -0
  29. package/dist/alipayIntrinsicElements/elements/picker-view-column.d.mts +7 -0
  30. package/dist/alipayIntrinsicElements/elements/picker-view.d.mts +18 -0
  31. package/dist/alipayIntrinsicElements/elements/picker.d.mts +15 -0
  32. package/dist/alipayIntrinsicElements/elements/progress.d.mts +14 -0
  33. package/dist/alipayIntrinsicElements/elements/radio-group.d.mts +11 -0
  34. package/dist/alipayIntrinsicElements/elements/radio.d.mts +12 -0
  35. package/dist/alipayIntrinsicElements/elements/rich-text.d.mts +17 -0
  36. package/dist/alipayIntrinsicElements/elements/root-portal.d.mts +9 -0
  37. package/dist/alipayIntrinsicElements/elements/scroll-view.d.mts +29 -0
  38. package/dist/alipayIntrinsicElements/elements/share-element.d.mts +12 -0
  39. package/dist/alipayIntrinsicElements/elements/slider.d.mts +23 -0
  40. package/dist/alipayIntrinsicElements/elements/subscribe-message.d.mts +11 -0
  41. package/dist/alipayIntrinsicElements/elements/swiper-item.d.mts +7 -0
  42. package/dist/alipayIntrinsicElements/elements/swiper.d.mts +36 -0
  43. package/dist/alipayIntrinsicElements/elements/switch.d.mts +15 -0
  44. package/dist/alipayIntrinsicElements/elements/text.d.mts +12 -0
  45. package/dist/alipayIntrinsicElements/elements/textarea.d.mts +24 -0
  46. package/dist/alipayIntrinsicElements/elements/video.d.mts +39 -0
  47. package/dist/alipayIntrinsicElements/elements/view.d.mts +29 -0
  48. package/dist/alipayIntrinsicElements/elements/web-view.d.mts +13 -0
  49. package/dist/alipayIntrinsicElements.d.mts +94 -0
  50. package/dist/dev/_virtual/{_@oxc-project_runtime@0.148.0 → _@oxc-project_runtime@0.149.0}/helpers/esm/defineProperty.mjs +1 -1
  51. package/dist/dev/_virtual/{_@oxc-project_runtime@0.148.0 → _@oxc-project_runtime@0.149.0}/helpers/esm/toPrimitive.mjs +1 -1
  52. package/dist/dev/_virtual/{_@oxc-project_runtime@0.148.0 → _@oxc-project_runtime@0.149.0}/helpers/esm/toPropertyKey.mjs +1 -1
  53. package/dist/dev/_virtual/{_@oxc-project_runtime@0.148.0 → _@oxc-project_runtime@0.149.0}/helpers/esm/typeof.mjs +1 -1
  54. package/dist/dev/alipayIntrinsicElements/base.d.mts +5 -0
  55. package/dist/dev/alipayIntrinsicElements/elements/button.d.mts +30 -0
  56. package/dist/dev/alipayIntrinsicElements/elements/camera.d.mts +19 -0
  57. package/dist/dev/alipayIntrinsicElements/elements/canvas.d.mts +21 -0
  58. package/dist/dev/alipayIntrinsicElements/elements/checkbox-group.d.mts +12 -0
  59. package/dist/dev/alipayIntrinsicElements/elements/checkbox.d.mts +15 -0
  60. package/dist/dev/alipayIntrinsicElements/elements/contact-button.d.mts +16 -0
  61. package/dist/dev/alipayIntrinsicElements/elements/cover-image.d.mts +12 -0
  62. package/dist/dev/alipayIntrinsicElements/elements/cover-view.d.mts +12 -0
  63. package/dist/dev/alipayIntrinsicElements/elements/error-view.d.mts +15 -0
  64. package/dist/dev/alipayIntrinsicElements/elements/form.d.mts +13 -0
  65. package/dist/dev/alipayIntrinsicElements/elements/icon.d.mts +12 -0
  66. package/dist/dev/alipayIntrinsicElements/elements/image.d.mts +18 -0
  67. package/dist/dev/alipayIntrinsicElements/elements/input.d.mts +32 -0
  68. package/dist/dev/alipayIntrinsicElements/elements/join-group-chat.d.mts +10 -0
  69. package/dist/dev/alipayIntrinsicElements/elements/label.d.mts +10 -0
  70. package/dist/dev/alipayIntrinsicElements/elements/lifestyle.d.mts +12 -0
  71. package/dist/dev/alipayIntrinsicElements/elements/lottie.d.mts +26 -0
  72. package/dist/dev/alipayIntrinsicElements/elements/map.d.mts +45 -0
  73. package/dist/dev/alipayIntrinsicElements/elements/match-media.d.mts +16 -0
  74. package/dist/dev/alipayIntrinsicElements/elements/movable-area.d.mts +10 -0
  75. package/dist/dev/alipayIntrinsicElements/elements/movable-view.d.mts +33 -0
  76. package/dist/dev/alipayIntrinsicElements/elements/navigator.d.mts +14 -0
  77. package/dist/dev/alipayIntrinsicElements/elements/page-container.d.mts +28 -0
  78. package/dist/dev/alipayIntrinsicElements/elements/page-meta.d.mts +20 -0
  79. package/dist/dev/alipayIntrinsicElements/elements/picker-view-column.d.mts +8 -0
  80. package/dist/dev/alipayIntrinsicElements/elements/picker-view.d.mts +19 -0
  81. package/dist/dev/alipayIntrinsicElements/elements/picker.d.mts +16 -0
  82. package/dist/dev/alipayIntrinsicElements/elements/progress.d.mts +15 -0
  83. package/dist/dev/alipayIntrinsicElements/elements/radio-group.d.mts +12 -0
  84. package/dist/dev/alipayIntrinsicElements/elements/radio.d.mts +13 -0
  85. package/dist/dev/alipayIntrinsicElements/elements/rich-text.d.mts +18 -0
  86. package/dist/dev/alipayIntrinsicElements/elements/root-portal.d.mts +10 -0
  87. package/dist/dev/alipayIntrinsicElements/elements/scroll-view.d.mts +30 -0
  88. package/dist/dev/alipayIntrinsicElements/elements/share-element.d.mts +13 -0
  89. package/dist/dev/alipayIntrinsicElements/elements/slider.d.mts +24 -0
  90. package/dist/dev/alipayIntrinsicElements/elements/subscribe-message.d.mts +12 -0
  91. package/dist/dev/alipayIntrinsicElements/elements/swiper-item.d.mts +8 -0
  92. package/dist/dev/alipayIntrinsicElements/elements/swiper.d.mts +37 -0
  93. package/dist/dev/alipayIntrinsicElements/elements/switch.d.mts +16 -0
  94. package/dist/dev/alipayIntrinsicElements/elements/text.d.mts +13 -0
  95. package/dist/dev/alipayIntrinsicElements/elements/textarea.d.mts +25 -0
  96. package/dist/dev/alipayIntrinsicElements/elements/video.d.mts +40 -0
  97. package/dist/dev/alipayIntrinsicElements/elements/view.d.mts +30 -0
  98. package/dist/dev/alipayIntrinsicElements/elements/web-view.d.mts +14 -0
  99. package/dist/dev/alipayIntrinsicElements.d.mts +94 -0
  100. package/dist/dev/api/vitest/setup.d.mts +1 -0
  101. package/dist/dev/api/vitest.d.mts +1 -0
  102. package/dist/dev/api.d.mts +1 -0
  103. package/dist/dev/compiler.d.mts +1 -0
  104. package/dist/dev/fetch.d.mts +9 -0
  105. package/dist/dev/index.d.mts +72 -0
  106. package/dist/dev/index.mjs +12 -15
  107. package/dist/dev/internal-reactivity.d.mts +18 -0
  108. package/dist/dev/internal-reactivity.mjs +3 -2
  109. package/dist/dev/internal-runtime.d.mts +44 -0
  110. package/dist/dev/internal-runtime.mjs +19 -14
  111. package/dist/dev/internal-template.d.mts +2 -0
  112. package/dist/dev/jsx-runtime.d.mts +44 -0
  113. package/dist/dev/jsxTypes.d.mts +9 -0
  114. package/dist/dev/macros/shared.d.mts +81 -0
  115. package/dist/dev/macros.d.mts +71 -0
  116. package/dist/dev/package.mjs +1 -1
  117. package/dist/dev/reactivity/asyncDerivation.d.mts +41 -0
  118. package/dist/dev/reactivity/asyncDerivation.mjs +130 -0
  119. package/dist/dev/reactivity/asyncDerivation.mjs.map +1 -0
  120. package/dist/dev/reactivity/computed.d.mts +21 -0
  121. package/dist/dev/reactivity/computed.mjs +2 -2
  122. package/dist/dev/reactivity/computed.mjs.map +1 -1
  123. package/dist/dev/reactivity/core.d.mts +35 -0
  124. package/dist/dev/reactivity/core.mjs +156 -32
  125. package/dist/dev/reactivity/core.mjs.map +1 -1
  126. package/dist/dev/reactivity/index.d.mts +16 -0
  127. package/dist/dev/reactivity/reactive/mutation.d.mts +21 -0
  128. package/dist/dev/reactivity/reactive/patch.d.mts +18 -0
  129. package/dist/dev/reactivity/reactive/shallow.d.mts +22 -0
  130. package/dist/dev/reactivity/reactive/shared.d.mts +4 -0
  131. package/dist/dev/reactivity/reactive.d.mts +42 -0
  132. package/dist/dev/reactivity/readonly.d.mts +27 -0
  133. package/dist/dev/reactivity/readonly.mjs.map +1 -1
  134. package/dist/dev/reactivity/ref.d.mts +27 -0
  135. package/dist/dev/reactivity/ref.mjs +1 -1
  136. package/dist/dev/reactivity/shallowRef.d.mts +19 -0
  137. package/dist/dev/reactivity/toRefs.d.mts +43 -0
  138. package/dist/dev/reactivity/traverse.d.mts +8 -0
  139. package/dist/dev/reactivity/watch/types.d.mts +43 -0
  140. package/dist/dev/reactivity/watch.d.mts +22 -0
  141. package/dist/dev/router/createRouter.d.mts +8 -0
  142. package/dist/dev/router/navigationCore.d.mts +6 -0
  143. package/dist/dev/router/resolve.d.mts +6 -0
  144. package/dist/dev/router/routeSync.d.mts +1 -0
  145. package/dist/dev/router/routeSync.mjs +8 -2
  146. package/dist/dev/router/routeSync.mjs.map +1 -1
  147. package/dist/dev/router/types.d.mts +172 -0
  148. package/dist/dev/router/useRoute.d.mts +19 -0
  149. package/dist/dev/router/useRoute.mjs +14 -7
  150. package/dist/dev/router/useRoute.mjs.map +1 -1
  151. package/dist/dev/router/useRouter.d.mts +8 -0
  152. package/dist/dev/router.d.mts +10 -0
  153. package/dist/dev/routerInternal/query.d.mts +7 -0
  154. package/dist/dev/routerInternal/types.d.mts +9 -0
  155. package/dist/dev/runtime/app/computed.mjs +2 -2
  156. package/dist/dev/runtime/app/computed.mjs.map +1 -1
  157. package/dist/dev/runtime/app/context.mjs +8 -2
  158. package/dist/dev/runtime/app/context.mjs.map +1 -1
  159. package/dist/dev/runtime/app/diagnostics.mjs +12 -0
  160. package/dist/dev/runtime/app/diagnostics.mjs.map +1 -1
  161. package/dist/dev/runtime/app/mount.mjs +31 -28
  162. package/dist/dev/runtime/app/mount.mjs.map +1 -1
  163. package/dist/dev/runtime/app/pending.d.mts +10 -0
  164. package/dist/dev/runtime/app/setData/commitTracker.d.mts +13 -0
  165. package/dist/dev/runtime/app/setData/commitTracker.mjs +265 -0
  166. package/dist/dev/runtime/app/setData/commitTracker.mjs.map +1 -0
  167. package/dist/dev/runtime/app/setData/patchScheduler.mjs +47 -51
  168. package/dist/dev/runtime/app/setData/patchScheduler.mjs.map +1 -1
  169. package/dist/dev/runtime/app/setData/scheduler.d.mts +51 -0
  170. package/dist/dev/runtime/app/setData/scheduler.mjs +98 -111
  171. package/dist/dev/runtime/app/setData/scheduler.mjs.map +1 -1
  172. package/dist/dev/runtime/app/setData/snapshot.mjs +11 -1
  173. package/dist/dev/runtime/app/setData/snapshot.mjs.map +1 -1
  174. package/dist/dev/runtime/app.d.mts +8 -0
  175. package/dist/dev/runtime/app.mjs +18 -6
  176. package/dist/dev/runtime/app.mjs.map +1 -1
  177. package/dist/dev/runtime/bindingManifest.mjs +105 -0
  178. package/dist/dev/runtime/bindingManifest.mjs.map +1 -0
  179. package/dist/dev/runtime/capabilities.d.mts +75 -0
  180. package/dist/dev/runtime/capabilities.mjs +40 -0
  181. package/dist/dev/runtime/capabilities.mjs.map +1 -0
  182. package/dist/dev/runtime/css.d.mts +14 -0
  183. package/dist/dev/runtime/defaults.d.mts +12 -0
  184. package/dist/dev/runtime/define/componentDefinition.mjs +3 -0
  185. package/dist/dev/runtime/define/componentDefinition.mjs.map +1 -1
  186. package/dist/dev/runtime/define/optionsApi.mjs +1 -1
  187. package/dist/dev/runtime/define/props.mjs +30 -60
  188. package/dist/dev/runtime/define/props.mjs.map +1 -1
  189. package/dist/dev/runtime/define/scopedSlotOptions.mjs +37 -21
  190. package/dist/dev/runtime/define/scopedSlotOptions.mjs.map +1 -1
  191. package/dist/dev/runtime/define.d.mts +118 -0
  192. package/dist/dev/runtime/define.mjs +32 -44
  193. package/dist/dev/runtime/define.mjs.map +1 -1
  194. package/dist/dev/runtime/diff.mjs +1 -1
  195. package/dist/dev/runtime/disposables.d.mts +31 -0
  196. package/dist/dev/runtime/elementIntersectionObserver.d.mts +26 -0
  197. package/dist/dev/runtime/features/inlineEvents.d.mts +7 -0
  198. package/dist/dev/runtime/features/inlineEvents.mjs +25 -0
  199. package/dist/dev/runtime/features/inlineEvents.mjs.map +1 -0
  200. package/dist/dev/runtime/features/layout.d.mts +7 -0
  201. package/dist/dev/runtime/features/layout.mjs +44 -0
  202. package/dist/dev/runtime/features/layout.mjs.map +1 -0
  203. package/dist/dev/runtime/features/patchStrategy.d.mts +7 -0
  204. package/dist/dev/runtime/features/patchStrategy.mjs +129 -0
  205. package/dist/dev/runtime/features/patchStrategy.mjs.map +1 -0
  206. package/dist/dev/runtime/features/publicLayout.d.mts +24 -0
  207. package/dist/dev/runtime/features/publicLayout.mjs +81 -0
  208. package/dist/dev/runtime/features/publicLayout.mjs.map +1 -0
  209. package/dist/dev/runtime/features/scopedSlots.d.mts +23 -0
  210. package/dist/dev/runtime/features/scopedSlots.mjs +88 -0
  211. package/dist/dev/runtime/features/scopedSlots.mjs.map +1 -0
  212. package/dist/dev/runtime/features/setDataHighFrequencyWarning.d.mts +7 -0
  213. package/dist/dev/runtime/features/setDataHighFrequencyWarning.mjs +15 -0
  214. package/dist/dev/runtime/features/setDataHighFrequencyWarning.mjs.map +1 -0
  215. package/dist/dev/runtime/features/templateRefs.d.mts +7 -0
  216. package/dist/dev/runtime/features/templateRefs.mjs +39 -0
  217. package/dist/dev/runtime/features/templateRefs.mjs.map +1 -0
  218. package/dist/dev/runtime/hooks/base.d.mts +27 -0
  219. package/dist/dev/runtime/hooks/register.d.mts +30 -0
  220. package/dist/dev/runtime/hooks/vue.d.mts +52 -0
  221. package/dist/dev/runtime/hooks/vue.mjs +3 -5
  222. package/dist/dev/runtime/hooks/vue.mjs.map +1 -1
  223. package/dist/dev/runtime/hooks.d.mts +4 -0
  224. package/dist/dev/runtime/index.d.mts +46 -0
  225. package/dist/dev/runtime/inlineDataset.mjs +75 -0
  226. package/dist/dev/runtime/inlineDataset.mjs.map +1 -0
  227. package/dist/dev/runtime/intersectionObserver.d.mts +14 -0
  228. package/dist/dev/runtime/jsxIsland.d.mts +37 -0
  229. package/dist/dev/runtime/jsxIsland.mjs.map +1 -1
  230. package/dist/dev/runtime/layoutBridge.d.mts +55 -0
  231. package/dist/dev/runtime/layoutBridge.mjs.map +1 -1
  232. package/dist/dev/runtime/noSetData.d.mts +5 -0
  233. package/dist/dev/runtime/pageEnvironment.d.mts +50 -0
  234. package/dist/dev/runtime/pageLayout.d.mts +25 -0
  235. package/dist/dev/runtime/pageLayout.mjs.map +1 -1
  236. package/dist/dev/runtime/pageScroll.d.mts +29 -0
  237. package/dist/dev/runtime/provide.d.mts +60 -0
  238. package/dist/dev/runtime/provideStore.d.mts +7 -0
  239. package/dist/dev/runtime/publicRuntime.d.mts +22 -0
  240. package/dist/dev/runtime/publicRuntime.mjs +91 -0
  241. package/dist/dev/runtime/publicRuntime.mjs.map +1 -0
  242. package/dist/dev/runtime/pullDownRefresh.d.mts +12 -0
  243. package/dist/dev/runtime/register/app.d.mts +14 -0
  244. package/dist/dev/runtime/register/app.mjs +7 -10
  245. package/dist/dev/runtime/register/app.mjs.map +1 -1
  246. package/dist/dev/runtime/register/component/lifecycle.mjs +22 -6
  247. package/dist/dev/runtime/register/component/lifecycle.mjs.map +1 -1
  248. package/dist/dev/runtime/register/component/methods.mjs +7 -10
  249. package/dist/dev/runtime/register/component/methods.mjs.map +1 -1
  250. package/dist/dev/runtime/register/component/options.mjs.map +1 -1
  251. package/dist/dev/runtime/register/component/registerDefinition.mjs +64 -69
  252. package/dist/dev/runtime/register/component/registerDefinition.mjs.map +1 -1
  253. package/dist/dev/runtime/register/component.d.mts +17 -0
  254. package/dist/dev/runtime/register/inline.d.mts +15 -0
  255. package/dist/dev/runtime/register/inline.mjs +4 -64
  256. package/dist/dev/runtime/register/inline.mjs.map +1 -1
  257. package/dist/dev/runtime/register/runtimeInstance/setupContext.mjs +16 -2
  258. package/dist/dev/runtime/register/runtimeInstance/setupContext.mjs.map +1 -1
  259. package/dist/dev/runtime/register/runtimeInstance/setupPhase.mjs +0 -4
  260. package/dist/dev/runtime/register/runtimeInstance/setupPhase.mjs.map +1 -1
  261. package/dist/dev/runtime/register/runtimeInstance/setupSnapshot.mjs +26 -0
  262. package/dist/dev/runtime/register/runtimeInstance/setupSnapshot.mjs.map +1 -0
  263. package/dist/dev/runtime/register/runtimeInstance/utils.mjs.map +1 -1
  264. package/dist/dev/runtime/register/runtimeInstance.d.mts +26 -0
  265. package/dist/dev/runtime/register/runtimeInstance.mjs +402 -160
  266. package/dist/dev/runtime/register/runtimeInstance.mjs.map +1 -1
  267. package/dist/dev/runtime/register/setDataFrequencyWarning.mjs.map +1 -1
  268. package/dist/dev/runtime/register/setup.d.mts +11 -0
  269. package/dist/dev/runtime/register/snapshot.mjs +6 -10
  270. package/dist/dev/runtime/register/snapshot.mjs.map +1 -1
  271. package/dist/dev/runtime/register/watch.d.mts +12 -0
  272. package/dist/dev/runtime/register.d.mts +5 -0
  273. package/dist/dev/runtime/scopedSlots.mjs +1 -1
  274. package/dist/dev/runtime/scopedSlots.mjs.map +1 -1
  275. package/dist/dev/runtime/selectorQuery.d.mts +54 -0
  276. package/dist/dev/runtime/selectorQuery.mjs +5 -0
  277. package/dist/dev/runtime/selectorQuery.mjs.map +1 -1
  278. package/dist/dev/runtime/teardown.mjs +18 -0
  279. package/dist/dev/runtime/teardown.mjs.map +1 -0
  280. package/dist/dev/runtime/template.d.mts +6 -0
  281. package/dist/dev/runtime/templateRefTypes.d.mts +12 -0
  282. package/dist/dev/runtime/templateRefs/helpers.mjs.map +1 -1
  283. package/dist/dev/runtime/templateRefs.mjs +187 -118
  284. package/dist/dev/runtime/templateRefs.mjs.map +1 -1
  285. package/dist/dev/runtime/types/core.d.mts +35 -0
  286. package/dist/dev/runtime/types/miniprogram.d.mts +84 -0
  287. package/dist/dev/runtime/types/miniprogramHost.d.mts +45 -0
  288. package/dist/dev/runtime/types/miniprogramHostSources.d.mts +112 -0
  289. package/dist/dev/runtime/types/options.d.mts +136 -0
  290. package/dist/dev/runtime/types/props/propTypes.d.mts +79 -0
  291. package/dist/dev/runtime/types/props/router.d.mts +51 -0
  292. package/dist/dev/runtime/types/props/setup.d.mts +96 -0
  293. package/dist/dev/runtime/types/props.d.mts +4 -0
  294. package/dist/dev/runtime/types/runtime.d.mts +59 -0
  295. package/dist/dev/runtime/types/setData.d.mts +237 -0
  296. package/dist/dev/runtime/types.d.mts +29 -0
  297. package/dist/dev/runtime/uniAppHost.d.mts +8 -0
  298. package/dist/dev/runtime/updatePerformance.d.mts +13 -0
  299. package/dist/dev/runtime/use.d.mts +13 -0
  300. package/dist/dev/runtime/vueCompat/context.d.mts +8 -0
  301. package/dist/dev/runtime/vueCompat/model.d.mts +30 -0
  302. package/dist/dev/runtime/vueCompat/router.d.mts +28 -0
  303. package/dist/dev/runtime/vueCompat/templateRef.d.mts +9 -0
  304. package/dist/dev/runtime/vueCompat/templateRef.mjs +2 -0
  305. package/dist/dev/runtime/vueCompat/templateRef.mjs.map +1 -1
  306. package/dist/dev/runtime/vueCompat.d.mts +5 -0
  307. package/dist/dev/scheduler.d.mts +4 -0
  308. package/dist/dev/store/base.mjs +12 -18
  309. package/dist/dev/store/base.mjs.map +1 -1
  310. package/dist/dev/store/define/optionsStyle.mjs +13 -23
  311. package/dist/dev/store/define/optionsStyle.mjs.map +1 -1
  312. package/dist/dev/store/define/setupStyle.mjs +14 -24
  313. package/dist/dev/store/define/setupStyle.mjs.map +1 -1
  314. package/dist/dev/store/define/shared.mjs +44 -1
  315. package/dist/dev/store/define/shared.mjs.map +1 -1
  316. package/dist/dev/store/define.d.mts +28 -0
  317. package/dist/dev/store/define.mjs.map +1 -1
  318. package/dist/dev/store/manager.d.mts +8 -0
  319. package/dist/dev/store/storeToRefs.d.mts +13 -0
  320. package/dist/dev/store/types.d.mts +70 -0
  321. package/dist/dev/store.d.mts +5 -0
  322. package/dist/dev/ttIntrinsicElements/base.d.mts +5 -0
  323. package/dist/dev/ttIntrinsicElements/elements/ad.d.mts +8 -0
  324. package/dist/dev/ttIntrinsicElements/elements/aweme-data.d.mts +15 -0
  325. package/dist/dev/ttIntrinsicElements/elements/aweme-user-card.d.mts +16 -0
  326. package/dist/dev/ttIntrinsicElements/elements/button.d.mts +23 -0
  327. package/dist/dev/ttIntrinsicElements/elements/camera.d.mts +19 -0
  328. package/dist/dev/ttIntrinsicElements/elements/canvas.d.mts +16 -0
  329. package/dist/dev/ttIntrinsicElements/elements/checkbox-group.d.mts +12 -0
  330. package/dist/dev/ttIntrinsicElements/elements/checkbox.d.mts +12 -0
  331. package/dist/dev/ttIntrinsicElements/elements/draw-ad.d.mts +16 -0
  332. package/dist/dev/ttIntrinsicElements/elements/form.d.mts +14 -0
  333. package/dist/dev/ttIntrinsicElements/elements/icon.d.mts +11 -0
  334. package/dist/dev/ttIntrinsicElements/elements/image.d.mts +16 -0
  335. package/dist/dev/ttIntrinsicElements/elements/input.d.mts +32 -0
  336. package/dist/dev/ttIntrinsicElements/elements/label.d.mts +10 -0
  337. package/dist/dev/ttIntrinsicElements/elements/live-player.d.mts +19 -0
  338. package/dist/dev/ttIntrinsicElements/elements/live-preview.d.mts +13 -0
  339. package/dist/dev/ttIntrinsicElements/elements/map.d.mts +36 -0
  340. package/dist/dev/ttIntrinsicElements/elements/mask.d.mts +8 -0
  341. package/dist/dev/ttIntrinsicElements/elements/match-media.d.mts +16 -0
  342. package/dist/dev/ttIntrinsicElements/elements/movable-area.d.mts +10 -0
  343. package/dist/dev/ttIntrinsicElements/elements/movable-view.d.mts +27 -0
  344. package/dist/dev/ttIntrinsicElements/elements/navigator.d.mts +16 -0
  345. package/dist/dev/ttIntrinsicElements/elements/open-data.d.mts +15 -0
  346. package/dist/dev/ttIntrinsicElements/elements/picker-view-column.d.mts +8 -0
  347. package/dist/dev/ttIntrinsicElements/elements/picker-view.d.mts +19 -0
  348. package/dist/dev/ttIntrinsicElements/elements/picker.d.mts +22 -0
  349. package/dist/dev/ttIntrinsicElements/elements/progress.d.mts +16 -0
  350. package/dist/dev/ttIntrinsicElements/elements/radio-group.d.mts +12 -0
  351. package/dist/dev/ttIntrinsicElements/elements/radio.d.mts +12 -0
  352. package/dist/dev/ttIntrinsicElements/elements/rich-text.d.mts +10 -0
  353. package/dist/dev/ttIntrinsicElements/elements/rtc-room.d.mts +13 -0
  354. package/dist/dev/ttIntrinsicElements/elements/scroll-view.d.mts +32 -0
  355. package/dist/dev/ttIntrinsicElements/elements/slider.d.mts +19 -0
  356. package/dist/dev/ttIntrinsicElements/elements/swiper-item.d.mts +10 -0
  357. package/dist/dev/ttIntrinsicElements/elements/swiper.d.mts +27 -0
  358. package/dist/dev/ttIntrinsicElements/elements/switch.d.mts +14 -0
  359. package/dist/dev/ttIntrinsicElements/elements/text.d.mts +12 -0
  360. package/dist/dev/ttIntrinsicElements/elements/textarea.d.mts +34 -0
  361. package/dist/dev/ttIntrinsicElements/elements/video.d.mts +58 -0
  362. package/dist/dev/ttIntrinsicElements/elements/view.d.mts +15 -0
  363. package/dist/dev/ttIntrinsicElements/elements/web-view.d.mts +15 -0
  364. package/dist/dev/ttIntrinsicElements.d.mts +88 -0
  365. package/dist/dev/version.d.mts +4 -0
  366. package/dist/dev/vue-augment.d.mts +8 -0
  367. package/dist/dev/vue-demi.d.mts +87 -0
  368. package/dist/dev/vue-demi.mjs +12 -15
  369. package/dist/dev/vue-demi.mjs.map +1 -1
  370. package/dist/dev/vue-types.d.mts +19 -0
  371. package/dist/dev/weappIntrinsicElements/base.d.mts +5 -0
  372. package/dist/dev/weappIntrinsicElements/elements/ad-custom.d.mts +14 -0
  373. package/dist/dev/weappIntrinsicElements/elements/ad.d.mts +17 -0
  374. package/dist/dev/weappIntrinsicElements/elements/audio.d.mts +21 -0
  375. package/dist/dev/weappIntrinsicElements/elements/block.d.mts +8 -0
  376. package/dist/dev/weappIntrinsicElements/elements/button.d.mts +42 -0
  377. package/dist/dev/weappIntrinsicElements/elements/camera.d.mts +19 -0
  378. package/dist/dev/weappIntrinsicElements/elements/canvas.d.mts +19 -0
  379. package/dist/dev/weappIntrinsicElements/elements/checkbox-group.d.mts +11 -0
  380. package/dist/dev/weappIntrinsicElements/elements/checkbox.d.mts +13 -0
  381. package/dist/dev/weappIntrinsicElements/elements/cover-image.d.mts +14 -0
  382. package/dist/dev/weappIntrinsicElements/elements/cover-view.d.mts +10 -0
  383. package/dist/dev/weappIntrinsicElements/elements/editor.d.mts +23 -0
  384. package/dist/dev/weappIntrinsicElements/elements/form.d.mts +17 -0
  385. package/dist/dev/weappIntrinsicElements/elements/functional-page-navigator.d.mts +16 -0
  386. package/dist/dev/weappIntrinsicElements/elements/icon.d.mts +12 -0
  387. package/dist/dev/weappIntrinsicElements/elements/image.d.mts +19 -0
  388. package/dist/dev/weappIntrinsicElements/elements/import.d.mts +10 -0
  389. package/dist/dev/weappIntrinsicElements/elements/include.d.mts +10 -0
  390. package/dist/dev/weappIntrinsicElements/elements/input.d.mts +47 -0
  391. package/dist/dev/weappIntrinsicElements/elements/keyboard-accessory.d.mts +8 -0
  392. package/dist/dev/weappIntrinsicElements/elements/label.d.mts +10 -0
  393. package/dist/dev/weappIntrinsicElements/elements/live-player.d.mts +36 -0
  394. package/dist/dev/weappIntrinsicElements/elements/live-pusher.d.mts +58 -0
  395. package/dist/dev/weappIntrinsicElements/elements/map.d.mts +106 -0
  396. package/dist/dev/weappIntrinsicElements/elements/match-media.d.mts +16 -0
  397. package/dist/dev/weappIntrinsicElements/elements/movable-area.d.mts +27 -0
  398. package/dist/dev/weappIntrinsicElements/elements/movable-view.d.mts +27 -0
  399. package/dist/dev/weappIntrinsicElements/elements/navigation-bar.d.mts +15 -0
  400. package/dist/dev/weappIntrinsicElements/elements/navigator.d.mts +26 -0
  401. package/dist/dev/weappIntrinsicElements/elements/official-account.d.mts +14 -0
  402. package/dist/dev/weappIntrinsicElements/elements/open-data.d.mts +16 -0
  403. package/dist/dev/weappIntrinsicElements/elements/page-container.d.mts +26 -0
  404. package/dist/dev/weappIntrinsicElements/elements/page-meta.d.mts +24 -0
  405. package/dist/dev/weappIntrinsicElements/elements/picker-view-column.d.mts +19 -0
  406. package/dist/dev/weappIntrinsicElements/elements/picker-view.d.mts +19 -0
  407. package/dist/dev/weappIntrinsicElements/elements/picker.d.mts +24 -0
  408. package/dist/dev/weappIntrinsicElements/elements/progress.d.mts +22 -0
  409. package/dist/dev/weappIntrinsicElements/elements/radio-group.d.mts +11 -0
  410. package/dist/dev/weappIntrinsicElements/elements/radio.d.mts +13 -0
  411. package/dist/dev/weappIntrinsicElements/elements/rich-text.d.mts +17 -0
  412. package/dist/dev/weappIntrinsicElements/elements/scroll-view.d.mts +64 -0
  413. package/dist/dev/weappIntrinsicElements/elements/share-element.d.mts +17 -0
  414. package/dist/dev/weappIntrinsicElements/elements/slider.d.mts +24 -0
  415. package/dist/dev/weappIntrinsicElements/elements/slot.d.mts +10 -0
  416. package/dist/dev/weappIntrinsicElements/elements/swiper-item.d.mts +11 -0
  417. package/dist/dev/weappIntrinsicElements/elements/swiper.d.mts +40 -0
  418. package/dist/dev/weappIntrinsicElements/elements/switch.d.mts +15 -0
  419. package/dist/dev/weappIntrinsicElements/elements/template.d.mts +12 -0
  420. package/dist/dev/weappIntrinsicElements/elements/text.d.mts +15 -0
  421. package/dist/dev/weappIntrinsicElements/elements/textarea.d.mts +41 -0
  422. package/dist/dev/weappIntrinsicElements/elements/video.d.mts +72 -0
  423. package/dist/dev/weappIntrinsicElements/elements/view.d.mts +15 -0
  424. package/dist/dev/weappIntrinsicElements/elements/voip-room.d.mts +15 -0
  425. package/dist/dev/weappIntrinsicElements/elements/web-view.d.mts +14 -0
  426. package/dist/dev/weappIntrinsicElements.d.mts +114 -0
  427. package/dist/dev/web-apis.d.mts +3 -0
  428. package/dist/fetch.d.mts +4 -4
  429. package/dist/index.d.mts +13 -14
  430. package/dist/index.mjs +1 -1
  431. package/dist/internal-reactivity.d.mts +2 -1
  432. package/dist/internal-reactivity.mjs +1 -1
  433. package/dist/internal-runtime.d.mts +13 -6
  434. package/dist/internal-runtime.mjs +1 -1
  435. package/dist/jsx-runtime.d.mts +51 -14
  436. package/dist/jsxTypes.d.mts +8 -0
  437. package/dist/macros/shared.d.mts +14 -15
  438. package/dist/macros.d.mts +22 -22
  439. package/dist/miniprogram/jsx-runtime.d.mts +13 -0
  440. package/dist/miniprogram/jsx-runtime.mjs +1 -0
  441. package/dist/miniprogramIntrinsicElements/base.d.mts +4 -0
  442. package/dist/miniprogramIntrinsicElements/elements/button.d.mts +23 -0
  443. package/dist/miniprogramIntrinsicElements/elements/camera.d.mts +18 -0
  444. package/dist/miniprogramIntrinsicElements/elements/canvas.d.mts +16 -0
  445. package/dist/miniprogramIntrinsicElements/elements/checkbox-group.d.mts +12 -0
  446. package/dist/miniprogramIntrinsicElements/elements/checkbox.d.mts +13 -0
  447. package/dist/miniprogramIntrinsicElements/elements/form.d.mts +13 -0
  448. package/dist/miniprogramIntrinsicElements/elements/icon.d.mts +12 -0
  449. package/dist/miniprogramIntrinsicElements/elements/image.d.mts +16 -0
  450. package/dist/miniprogramIntrinsicElements/elements/input.d.mts +29 -0
  451. package/dist/miniprogramIntrinsicElements/elements/label.d.mts +11 -0
  452. package/dist/miniprogramIntrinsicElements/elements/map.d.mts +31 -0
  453. package/dist/miniprogramIntrinsicElements/elements/match-media.d.mts +13 -0
  454. package/dist/miniprogramIntrinsicElements/elements/movable-area.d.mts +9 -0
  455. package/dist/miniprogramIntrinsicElements/elements/movable-view.d.mts +26 -0
  456. package/dist/miniprogramIntrinsicElements/elements/navigator.d.mts +15 -0
  457. package/dist/miniprogramIntrinsicElements/elements/picker-view-column.d.mts +9 -0
  458. package/dist/miniprogramIntrinsicElements/elements/picker-view.d.mts +20 -0
  459. package/dist/miniprogramIntrinsicElements/elements/picker.d.mts +14 -0
  460. package/dist/miniprogramIntrinsicElements/elements/progress.d.mts +12 -0
  461. package/dist/miniprogramIntrinsicElements/elements/radio-group.d.mts +12 -0
  462. package/dist/miniprogramIntrinsicElements/elements/radio.d.mts +13 -0
  463. package/dist/miniprogramIntrinsicElements/elements/rich-text.d.mts +11 -0
  464. package/dist/miniprogramIntrinsicElements/elements/scroll-view.d.mts +22 -0
  465. package/dist/miniprogramIntrinsicElements/elements/slider.d.mts +19 -0
  466. package/dist/miniprogramIntrinsicElements/elements/swiper-item.d.mts +9 -0
  467. package/dist/miniprogramIntrinsicElements/elements/swiper.d.mts +24 -0
  468. package/dist/miniprogramIntrinsicElements/elements/switch.d.mts +14 -0
  469. package/dist/miniprogramIntrinsicElements/elements/text.d.mts +13 -0
  470. package/dist/miniprogramIntrinsicElements/elements/textarea.d.mts +23 -0
  471. package/dist/miniprogramIntrinsicElements/elements/video.d.mts +29 -0
  472. package/dist/miniprogramIntrinsicElements/elements/view.d.mts +16 -0
  473. package/dist/miniprogramIntrinsicElements/elements/web-view.d.mts +15 -0
  474. package/dist/miniprogramIntrinsicElements.d.mts +70 -0
  475. package/dist/package.mjs +1 -1
  476. package/dist/reactivity/asyncDerivation.d.mts +40 -0
  477. package/dist/reactivity/asyncDerivation.mjs +1 -0
  478. package/dist/reactivity/computed.d.mts +8 -9
  479. package/dist/reactivity/computed.mjs +1 -1
  480. package/dist/reactivity/core.d.mts +15 -15
  481. package/dist/reactivity/core.mjs +1 -1
  482. package/dist/reactivity/index.d.mts +2 -1
  483. package/dist/reactivity/reactive/mutation.d.mts +6 -7
  484. package/dist/reactivity/reactive/patch.d.mts +4 -5
  485. package/dist/reactivity/reactive/shallow.d.mts +3 -4
  486. package/dist/reactivity/reactive/shared.d.mts +2 -3
  487. package/dist/reactivity/reactive.d.mts +6 -6
  488. package/dist/reactivity/readonly.d.mts +7 -8
  489. package/dist/reactivity/ref.d.mts +14 -15
  490. package/dist/reactivity/ref.mjs +1 -1
  491. package/dist/reactivity/shallowRef.d.mts +5 -6
  492. package/dist/reactivity/toRefs.d.mts +5 -6
  493. package/dist/reactivity/traverse.d.mts +2 -3
  494. package/dist/reactivity/watch/types.d.mts +18 -19
  495. package/dist/reactivity/watch.d.mts +8 -8
  496. package/dist/router/createRouter.d.mts +2 -3
  497. package/dist/router/navigationCore.d.mts +3 -4
  498. package/dist/router/resolve.d.mts +2 -3
  499. package/dist/router/routeSync.mjs +1 -1
  500. package/dist/router/types.d.mts +38 -39
  501. package/dist/router/useRoute.d.mts +5 -6
  502. package/dist/router/useRoute.mjs +1 -1
  503. package/dist/router/useRouter.d.mts +2 -3
  504. package/dist/routerInternal/query.d.mts +3 -4
  505. package/dist/routerInternal/types.d.mts +2 -3
  506. package/dist/runtime/app/computed.mjs +1 -1
  507. package/dist/runtime/app/context.mjs +1 -1
  508. package/dist/runtime/app/diagnostics.mjs +1 -1
  509. package/dist/runtime/app/mount.mjs +1 -1
  510. package/dist/runtime/app/pending.d.mts +3 -4
  511. package/dist/runtime/app/setData/commitTracker.d.mts +12 -0
  512. package/dist/runtime/app/setData/commitTracker.mjs +1 -0
  513. package/dist/runtime/app/setData/patchScheduler.mjs +1 -1
  514. package/dist/runtime/app/setData/scheduler.d.mts +50 -0
  515. package/dist/runtime/app/setData/scheduler.mjs +1 -1
  516. package/dist/runtime/app/setData/snapshot.mjs +1 -1
  517. package/dist/runtime/app.d.mts +2 -3
  518. package/dist/runtime/app.mjs +1 -1
  519. package/dist/runtime/bindingManifest.mjs +1 -0
  520. package/dist/runtime/capabilities.d.mts +74 -0
  521. package/dist/runtime/capabilities.mjs +1 -0
  522. package/dist/runtime/css.d.mts +3 -4
  523. package/dist/runtime/defaults.d.mts +5 -6
  524. package/dist/runtime/define/componentDefinition.mjs +1 -1
  525. package/dist/runtime/define/optionsApi.mjs +1 -1
  526. package/dist/runtime/define/props.mjs +1 -1
  527. package/dist/runtime/define/scopedSlotOptions.mjs +1 -1
  528. package/dist/runtime/define.d.mts +18 -27
  529. package/dist/runtime/define.mjs +1 -1
  530. package/dist/runtime/diff.mjs +1 -1
  531. package/dist/runtime/disposables.d.mts +6 -7
  532. package/dist/runtime/elementIntersectionObserver.d.mts +5 -6
  533. package/dist/runtime/features/inlineEvents.d.mts +6 -0
  534. package/dist/runtime/features/inlineEvents.mjs +1 -0
  535. package/dist/runtime/features/layout.d.mts +6 -0
  536. package/dist/runtime/features/layout.mjs +1 -0
  537. package/dist/runtime/features/patchStrategy.d.mts +6 -0
  538. package/dist/runtime/features/patchStrategy.mjs +1 -0
  539. package/dist/runtime/features/publicLayout.d.mts +23 -0
  540. package/dist/runtime/features/publicLayout.mjs +1 -0
  541. package/dist/runtime/features/scopedSlots.d.mts +22 -0
  542. package/dist/runtime/features/scopedSlots.mjs +1 -0
  543. package/dist/runtime/features/setDataHighFrequencyWarning.d.mts +6 -0
  544. package/dist/runtime/features/setDataHighFrequencyWarning.mjs +1 -0
  545. package/dist/runtime/features/templateRefs.d.mts +6 -0
  546. package/dist/runtime/features/templateRefs.mjs +1 -0
  547. package/dist/runtime/hooks/base.d.mts +7 -8
  548. package/dist/runtime/hooks/register.d.mts +26 -27
  549. package/dist/runtime/hooks/vue.d.mts +13 -15
  550. package/dist/runtime/hooks/vue.mjs +1 -1
  551. package/dist/runtime/index.d.mts +12 -14
  552. package/dist/runtime/inlineDataset.mjs +1 -0
  553. package/dist/runtime/intersectionObserver.d.mts +4 -5
  554. package/dist/runtime/jsxIsland.d.mts +20 -25
  555. package/dist/runtime/layoutBridge.d.mts +12 -17
  556. package/dist/runtime/noSetData.d.mts +3 -4
  557. package/dist/runtime/pageEnvironment.d.mts +9 -10
  558. package/dist/runtime/pageLayout.d.mts +9 -11
  559. package/dist/runtime/pageScroll.d.mts +4 -5
  560. package/dist/runtime/provide.d.mts +7 -7
  561. package/dist/runtime/provideStore.d.mts +2 -3
  562. package/dist/runtime/publicRuntime.d.mts +21 -0
  563. package/dist/runtime/publicRuntime.mjs +1 -0
  564. package/dist/runtime/pullDownRefresh.d.mts +4 -5
  565. package/dist/runtime/register/app.d.mts +2 -3
  566. package/dist/runtime/register/app.mjs +1 -1
  567. package/dist/runtime/register/component/lifecycle.mjs +1 -1
  568. package/dist/runtime/register/component/methods.mjs +1 -1
  569. package/dist/runtime/register/component/registerDefinition.mjs +1 -1
  570. package/dist/runtime/register/component.d.mts +2 -3
  571. package/dist/runtime/register/inline.d.mts +3 -4
  572. package/dist/runtime/register/inline.mjs +1 -1
  573. package/dist/runtime/register/runtimeInstance/setupContext.mjs +1 -1
  574. package/dist/runtime/register/runtimeInstance/setupPhase.mjs +1 -1
  575. package/dist/runtime/register/runtimeInstance/setupSnapshot.mjs +1 -0
  576. package/dist/runtime/register/runtimeInstance.d.mts +4 -5
  577. package/dist/runtime/register/runtimeInstance.mjs +1 -1
  578. package/dist/runtime/register/setup.d.mts +2 -3
  579. package/dist/runtime/register/snapshot.mjs +1 -1
  580. package/dist/runtime/register/watch.d.mts +3 -4
  581. package/dist/runtime/scopedSlots.mjs +1 -1
  582. package/dist/runtime/selectorQuery.d.mts +15 -16
  583. package/dist/runtime/selectorQuery.mjs +1 -1
  584. package/dist/runtime/teardown.mjs +1 -0
  585. package/dist/runtime/template.d.mts +4 -5
  586. package/dist/runtime/templateRefTypes.d.mts +7 -3
  587. package/dist/runtime/templateRefs.mjs +1 -1
  588. package/dist/runtime/types/core.d.mts +9 -10
  589. package/dist/runtime/types/miniprogram.d.mts +13 -10
  590. package/dist/runtime/types/miniprogramHost.d.mts +41 -41
  591. package/dist/runtime/types/miniprogramHostSources.d.mts +21 -22
  592. package/dist/runtime/types/options.d.mts +8 -9
  593. package/dist/runtime/types/props/propTypes.d.mts +16 -17
  594. package/dist/runtime/types/props/router.d.mts +13 -14
  595. package/dist/runtime/types/props/setup.d.mts +7 -8
  596. package/dist/runtime/types/props.d.mts +1 -1
  597. package/dist/runtime/types/runtime.d.mts +7 -8
  598. package/dist/runtime/types/setData.d.mts +21 -5
  599. package/dist/runtime/types.d.mts +10 -10
  600. package/dist/runtime/uniAppHost.d.mts +2 -3
  601. package/dist/runtime/updatePerformance.d.mts +5 -6
  602. package/dist/runtime/use.d.mts +3 -4
  603. package/dist/runtime/vueCompat/context.d.mts +4 -5
  604. package/dist/runtime/vueCompat/model.d.mts +9 -10
  605. package/dist/runtime/vueCompat/router.d.mts +3 -4
  606. package/dist/runtime/vueCompat/templateRef.d.mts +4 -5
  607. package/dist/runtime/vueCompat/templateRef.mjs +1 -1
  608. package/dist/scheduler.d.mts +2 -3
  609. package/dist/store/base.mjs +1 -1
  610. package/dist/store/define/optionsStyle.mjs +1 -1
  611. package/dist/store/define/setupStyle.mjs +1 -1
  612. package/dist/store/define/shared.mjs +1 -1
  613. package/dist/store/define.d.mts +12 -11
  614. package/dist/store/manager.d.mts +2 -3
  615. package/dist/store/storeToRefs.d.mts +3 -4
  616. package/dist/store/types.d.mts +12 -13
  617. package/dist/tt/jsx-runtime.d.mts +13 -0
  618. package/dist/tt/jsx-runtime.mjs +1 -0
  619. package/dist/ttIntrinsicElements/base.d.mts +4 -0
  620. package/dist/ttIntrinsicElements/elements/ad.d.mts +7 -0
  621. package/dist/ttIntrinsicElements/elements/aweme-data.d.mts +14 -0
  622. package/dist/ttIntrinsicElements/elements/aweme-user-card.d.mts +15 -0
  623. package/dist/ttIntrinsicElements/elements/button.d.mts +22 -0
  624. package/dist/ttIntrinsicElements/elements/camera.d.mts +18 -0
  625. package/dist/ttIntrinsicElements/elements/canvas.d.mts +15 -0
  626. package/dist/ttIntrinsicElements/elements/checkbox-group.d.mts +11 -0
  627. package/dist/ttIntrinsicElements/elements/checkbox.d.mts +11 -0
  628. package/dist/ttIntrinsicElements/elements/draw-ad.d.mts +15 -0
  629. package/dist/ttIntrinsicElements/elements/form.d.mts +13 -0
  630. package/dist/ttIntrinsicElements/elements/icon.d.mts +10 -0
  631. package/dist/ttIntrinsicElements/elements/image.d.mts +15 -0
  632. package/dist/ttIntrinsicElements/elements/input.d.mts +31 -0
  633. package/dist/ttIntrinsicElements/elements/label.d.mts +9 -0
  634. package/dist/ttIntrinsicElements/elements/live-player.d.mts +18 -0
  635. package/dist/ttIntrinsicElements/elements/live-preview.d.mts +12 -0
  636. package/dist/ttIntrinsicElements/elements/map.d.mts +35 -0
  637. package/dist/ttIntrinsicElements/elements/mask.d.mts +7 -0
  638. package/dist/ttIntrinsicElements/elements/match-media.d.mts +15 -0
  639. package/dist/ttIntrinsicElements/elements/movable-area.d.mts +9 -0
  640. package/dist/ttIntrinsicElements/elements/movable-view.d.mts +26 -0
  641. package/dist/ttIntrinsicElements/elements/navigator.d.mts +15 -0
  642. package/dist/ttIntrinsicElements/elements/open-data.d.mts +14 -0
  643. package/dist/ttIntrinsicElements/elements/picker-view-column.d.mts +7 -0
  644. package/dist/ttIntrinsicElements/elements/picker-view.d.mts +18 -0
  645. package/dist/ttIntrinsicElements/elements/picker.d.mts +21 -0
  646. package/dist/ttIntrinsicElements/elements/progress.d.mts +15 -0
  647. package/dist/ttIntrinsicElements/elements/radio-group.d.mts +11 -0
  648. package/dist/ttIntrinsicElements/elements/radio.d.mts +11 -0
  649. package/dist/ttIntrinsicElements/elements/rich-text.d.mts +9 -0
  650. package/dist/ttIntrinsicElements/elements/rtc-room.d.mts +12 -0
  651. package/dist/ttIntrinsicElements/elements/scroll-view.d.mts +31 -0
  652. package/dist/ttIntrinsicElements/elements/slider.d.mts +18 -0
  653. package/dist/ttIntrinsicElements/elements/swiper-item.d.mts +9 -0
  654. package/dist/ttIntrinsicElements/elements/swiper.d.mts +26 -0
  655. package/dist/ttIntrinsicElements/elements/switch.d.mts +13 -0
  656. package/dist/ttIntrinsicElements/elements/text.d.mts +11 -0
  657. package/dist/ttIntrinsicElements/elements/textarea.d.mts +33 -0
  658. package/dist/ttIntrinsicElements/elements/video.d.mts +57 -0
  659. package/dist/ttIntrinsicElements/elements/view.d.mts +14 -0
  660. package/dist/ttIntrinsicElements/elements/web-view.d.mts +14 -0
  661. package/dist/ttIntrinsicElements.d.mts +88 -0
  662. package/dist/version.d.mts +2 -3
  663. package/dist/vue-augment.d.mts +2 -1
  664. package/dist/vue-demi.d.mts +17 -18
  665. package/dist/vue-demi.mjs +1 -1
  666. package/dist/vue-types.d.mts +2 -2
  667. package/dist/weapp/jsx-runtime.d.mts +13 -0
  668. package/dist/weapp/jsx-runtime.mjs +1 -0
  669. package/dist/weappIntrinsicElements/base.d.mts +3 -21
  670. package/dist/weappIntrinsicElements/elements/ad-custom.d.mts +6 -6
  671. package/dist/weappIntrinsicElements/elements/ad.d.mts +7 -7
  672. package/dist/weappIntrinsicElements/elements/audio.d.mts +9 -9
  673. package/dist/weappIntrinsicElements/elements/block.d.mts +3 -4
  674. package/dist/weappIntrinsicElements/elements/button.d.mts +18 -17
  675. package/dist/weappIntrinsicElements/elements/camera.d.mts +12 -12
  676. package/dist/weappIntrinsicElements/elements/canvas.d.mts +10 -10
  677. package/dist/weappIntrinsicElements/elements/checkbox-group.d.mts +6 -9
  678. package/dist/weappIntrinsicElements/elements/checkbox.d.mts +3 -4
  679. package/dist/weappIntrinsicElements/elements/cover-image.d.mts +9 -6
  680. package/dist/weappIntrinsicElements/elements/cover-view.d.mts +3 -4
  681. package/dist/weappIntrinsicElements/elements/editor.d.mts +9 -9
  682. package/dist/weappIntrinsicElements/elements/form.d.mts +7 -7
  683. package/dist/weappIntrinsicElements/elements/functional-page-navigator.d.mts +9 -9
  684. package/dist/weappIntrinsicElements/elements/icon.d.mts +3 -4
  685. package/dist/weappIntrinsicElements/elements/image.d.mts +7 -7
  686. package/dist/weappIntrinsicElements/elements/import.d.mts +3 -4
  687. package/dist/weappIntrinsicElements/elements/include.d.mts +3 -4
  688. package/dist/weappIntrinsicElements/elements/input.d.mts +17 -18
  689. package/dist/weappIntrinsicElements/elements/keyboard-accessory.d.mts +3 -4
  690. package/dist/weappIntrinsicElements/elements/label.d.mts +3 -4
  691. package/dist/weappIntrinsicElements/elements/live-player.d.mts +18 -18
  692. package/dist/weappIntrinsicElements/elements/live-pusher.d.mts +19 -19
  693. package/dist/weappIntrinsicElements/elements/map.d.mts +18 -18
  694. package/dist/weappIntrinsicElements/elements/match-media.d.mts +3 -4
  695. package/dist/weappIntrinsicElements/elements/movable-area.d.mts +8 -8
  696. package/dist/weappIntrinsicElements/elements/movable-view.d.mts +8 -8
  697. package/dist/weappIntrinsicElements/elements/navigation-bar.d.mts +3 -4
  698. package/dist/weappIntrinsicElements/elements/navigator.d.mts +10 -10
  699. package/dist/weappIntrinsicElements/elements/official-account.d.mts +6 -6
  700. package/dist/weappIntrinsicElements/elements/open-data.d.mts +5 -5
  701. package/dist/weappIntrinsicElements/elements/page-container.d.mts +11 -11
  702. package/dist/weappIntrinsicElements/elements/page-meta.d.mts +7 -7
  703. package/dist/weappIntrinsicElements/elements/picker-view-column.d.mts +7 -7
  704. package/dist/weappIntrinsicElements/elements/picker-view.d.mts +7 -7
  705. package/dist/weappIntrinsicElements/elements/picker.d.mts +9 -9
  706. package/dist/weappIntrinsicElements/elements/progress.d.mts +5 -5
  707. package/dist/weappIntrinsicElements/elements/radio-group.d.mts +6 -9
  708. package/dist/weappIntrinsicElements/elements/radio.d.mts +3 -4
  709. package/dist/weappIntrinsicElements/elements/rich-text.d.mts +6 -7
  710. package/dist/weappIntrinsicElements/elements/scroll-view.d.mts +20 -25
  711. package/dist/weappIntrinsicElements/elements/share-element.d.mts +5 -7
  712. package/dist/weappIntrinsicElements/elements/slider.d.mts +6 -6
  713. package/dist/weappIntrinsicElements/elements/slot.d.mts +3 -4
  714. package/dist/weappIntrinsicElements/elements/swiper-item.d.mts +6 -38
  715. package/dist/weappIntrinsicElements/elements/swiper.d.mts +11 -14
  716. package/dist/weappIntrinsicElements/elements/switch.d.mts +5 -5
  717. package/dist/weappIntrinsicElements/elements/template.d.mts +3 -4
  718. package/dist/weappIntrinsicElements/elements/text.d.mts +5 -6
  719. package/dist/weappIntrinsicElements/elements/textarea.d.mts +16 -16
  720. package/dist/weappIntrinsicElements/elements/video.d.mts +24 -24
  721. package/dist/weappIntrinsicElements/elements/view.d.mts +5 -4
  722. package/dist/weappIntrinsicElements/elements/voip-room.d.mts +7 -7
  723. package/dist/weappIntrinsicElements/elements/web-view.d.mts +7 -7
  724. package/dist/weappIntrinsicElements.d.mts +111 -150
  725. package/package.json +19 -19
  726. package/dist/dev/jsx-runtime.mjs +0 -1
  727. package/dist/runtime/templateRefs.d.mts +0 -11
  728. /package/dist/_virtual/{_@oxc-project_runtime@0.148.0 → _@oxc-project_runtime@0.149.0}/helpers/esm/defineProperty.mjs +0 -0
  729. /package/dist/_virtual/{_@oxc-project_runtime@0.148.0 → _@oxc-project_runtime@0.149.0}/helpers/esm/toPrimitive.mjs +0 -0
  730. /package/dist/_virtual/{_@oxc-project_runtime@0.148.0 → _@oxc-project_runtime@0.149.0}/helpers/esm/toPropertyKey.mjs +0 -0
  731. /package/dist/_virtual/{_@oxc-project_runtime@0.148.0 → _@oxc-project_runtime@0.149.0}/helpers/esm/typeof.mjs +0 -0
@@ -1 +1 @@
1
- import{getMiniProgramRuntimeGlobalObject as e}from"../../platform.mjs";import{callHookList as t}from"../../hooks/base.mjs";import{resolveRuntimePageLayoutName as n,syncRuntimePageLayoutState as r}from"../../pageLayout.mjs";import{getOwnerProxy as i}from"../../scopedSlots.mjs";import{clearTemplateRefs as a,scheduleTemplateRefUpdate as o}from"../../templateRefs.mjs";import{enableDeferredSetData as s,mountRuntimeInstance as c,refreshRuntimeInstance as ee,setRuntimeSetDataVisibility as l,teardownRuntimeInstance as u}from"../runtimeInstance.mjs";import{ensureInitialNavigation as d}from"../../../router/initialNavigation.mjs";import{registerRuntimeLayoutHosts as te,unregisterRuntimeLayoutHosts as ne}from"../../layoutBridge.mjs";import{registerNativeComponentDefinition as f}from"./registerNativeDefinition.mjs";import{WEAPP_VITE_STATEFUL_HMR_BRIDGE_KEY as re,WEVU_LAYOUT_HOST_BRIDGE_KEY as p,WEVU_PAGE_LAYOUT_NAME_KEY as ie,WEVU_PAGE_LAYOUT_PROPS_KEY as ae,WEVU_PAGE_LAYOUT_SETTER_KEY as m,WEVU_PUBLIC_RUNTIME_KEY as h,WEVU_READY_CALLED_KEY as g,WEVU_RESOLVE_PUBLIC_INSTANCE_METHOD as _,WEVU_RUNTIME_KEY as oe,WEVU_RUNTIME_OWNER_ID_KEY as se,WEVU_SLOT_OWNER_ID_KEY as v,WEVU_TEMPLATE_REFS_KEY as y}from"@weapp-core/constants";function b(e){let t=e.selectOwnerComponent;if(typeof t==`function`)try{let n=t.call(e);n&&n!==e&&o(n)}catch(e){}}function x(x){var S;let{runtimeApp:C,watch:w,setup:T,restOptions:ce,pageLifecycleHooks:E,finalObservers:D,userLifetimes:O,userPageLifetimes:k,finalMethods:A,finalOptions:j,applyExtraInstanceFields:M,templateRefs:N,layoutHosts:P,attachWevuPropKeys:F,setupLifecycle:I,syncWevuPropsFromInstance:L,directPropsDerivedKeys:R,isPage:z,vueLifecycles:B,getRuntimeOwnerLabel:V,registerNative:H=!0}=x,U=e=>{var t;let n=(t=e.__wevu)==null?e[h]:t;if(n)return n;let r=e.$state;if(r&&typeof r==`object`)return r[oe]},W=e=>{var t,n,r,i,a;return(t=(n=(r=e[se])==null?e[v]:r)==null?(i=e.data)==null?void 0:i[v]:n)==null?(a=e.properties)==null?void 0:a[v]:t},G=e=>{var t;let n=(t=U(e))==null?void 0:t.proxy;if(n)return n;let r=W(e);if(typeof r==`string`&&r){var a;return(a=i(r))==null?e:a}return e},K=e=>{let t=U(e);return t?{runtime:t,mounted:!1}:(M(e),F(e),c(e,C,w,T,{deferSetData:!0,snapshotOmitKeys:R}),L(e),s(e),{runtime:U(e),mounted:!0})},q=(e,t,n)=>{let r=B[t];if(typeof r==`function`)return r.apply(G(e),n)},J=(e,t)=>{if(!z){t();return}d(e,void 0,{start:!1,onComplete:e=>{e&&t()}})||t()},le=e=>{U(e)||typeof B.mounted!=`function`||K(e).mounted&&(q(e,`created`,[]),q(e,`beforeMount`,[]))},Y={},X=e=>{if(!Array.isArray(P)||!P.length||e[p])return;let t=te(P,e);t&&(e[p]=t)},Z=e=>{z&&(e[m]=(t,i)=>{var a;let o=(a=e.__wevu)==null?void 0:a.state;if(!o||typeof o!=`object`)return;o[ie]=n(t);let s=t===!1||i==null?{}:i;o[ae]=s,r(e,t,s)})};if(z)for(let e of[`onPullDownRefresh`,`onReachBottom`,`onShareAppMessage`,`onShareTimeline`,`onAddToFavorites`]){let t=E[e];typeof t==`function`&&typeof A[e]!=`function`&&(Y[e]=function(...e){return t.apply(this,e)})}let Q={...ce,...z?E:{},observers:D,lifetimes:{...O,created:function(...e){M(this),Array.isArray(N)&&N.length&&Object.defineProperty(this,y,{value:N,configurable:!0,enumerable:!1,writable:!1}),F(this),J(this,()=>{if(q(this,`beforeCreate`,e),I===`created`){try{c(this,C,w,T,{deferSetData:!0,snapshotOmitKeys:R})}catch(e){let t=V(this);throw Error(`[wevu] mount runtime failed in created (${t}): ${e instanceof Error?e.message:String(e)}`)}L(this),Z(this)}typeof O.created==`function`&&O.created.apply(this,e)})},moved:function(...e){t(this,`onMoved`,e),typeof O.moved==`function`&&O.moved.apply(this,e)},attached:function(...e){M(this),Array.isArray(N)&&N.length&&!this[y]&&Object.defineProperty(this,y,{value:N,configurable:!0,enumerable:!1,writable:!1}),F(this),J(this,()=>{if(I!==`created`||!this.__wevu)try{c(this,C,w,T,{deferSetData:!0,snapshotOmitKeys:R})}catch(e){let t=V(this);throw Error(`[wevu] mount runtime failed in attached (${t}): ${e instanceof Error?e.message:String(e)}`)}L(this),q(this,`created`,e),q(this,`beforeMount`,e),Z(this),X(this),s(this),t(this,`onAttached`,e),typeof O.attached==`function`&&O.attached.apply(this,e)})},ready:function(...e){if(!z||this[g]||!d(this,void 0,{start:!0,onComplete:t=>{t&&!this.__wevuInitialNavigationReady&&(this.__wevuInitialNavigationReady=!0,Q.lifetimes.ready.call(this,...e))}})||this.__wevuInitialNavigationReady){if(le(this),z&&typeof E.onReady==`function`){let t=!!this[g];if(E.onReady.call(this,...e),!t){let t=()=>q(this,`mounted`,e);d(this,void 0,{start:!1,onComplete:e=>{e&&t()}})||t()}typeof O.ready==`function`&&O.ready.apply(this,e);return}if(!this[g]){this[g]=!0,L(this),b(this),o(this,()=>{t(this,`onReady`,e),q(this,`mounted`,e),typeof O.ready==`function`&&O.ready.apply(this,e)});return}typeof O.ready==`function`&&O.ready.apply(this,e)}},detached:function(...e){if(q(this,`beforeUnmount`,e),q(this,`beforeDestroy`,e),b(this),t(this,`onDetached`,e),z&&typeof E.onUnload==`function`){E.onUnload.call(this,...e),typeof O.detached==`function`&&O.detached.apply(this,e),q(this,`unmounted`,e),q(this,`destroyed`,e);return}a(this),Array.isArray(P)&&P.length&&this[p]&&(ne(P,this[p]),delete this[p]),u(this),q(this,`unmounted`,e),q(this,`destroyed`,e),typeof O.detached==`function`&&O.detached.apply(this,e)},error:function(...e){t(this,`onError`,e),typeof O.error==`function`&&O.error.apply(this,e)}},pageLifetimes:{...k,show:function(...e){if(z&&typeof E.onShow==`function`){E.onShow.call(this,...e),typeof k.show==`function`&&k.show.apply(this,e);return}l(this,!0),t(this,`onShow`,e),typeof k.show==`function`&&k.show.apply(this,e)},hide:function(...e){if(z&&typeof E.onHide==`function`){E.onHide.call(this,...e),typeof k.hide==`function`&&k.hide.apply(this,e);return}l(this,!1),t(this,`onHide`,e),typeof k.hide==`function`&&k.hide.apply(this,e)},resize:function(...e){if(z&&typeof E.onResize==`function`){E.onResize.call(this,...e),typeof k.resize==`function`&&k.resize.apply(this,e);return}t(this,`onResize`,e),typeof k.resize==`function`&&k.resize.apply(this,e)},routeDone:function(...e){if(z&&typeof E.onRouteDone==`function`){E.onRouteDone.call(this,...e),typeof k.routeDone==`function`&&k.routeDone.apply(this,e);return}t(this,`onRouteDone`,e),typeof k.routeDone==`function`&&k.routeDone.apply(this,e)}},methods:{...Y,...A,[_]:function(){var e;let t=K(this);return t.mounted&&(q(this,`created`,[]),q(this,`beforeMount`,[])),(e=t.runtime)==null?void 0:e.proxy}},options:j};if(!H)return Q;let $=(S=e())==null?void 0:S[re];if(typeof($==null?void 0:$.trackWevuComponent)==`function`){let e=$.trackWevuComponent(Q,(e,t)=>{ee(e,C,w,T,{snapshotOmitKeys:R,stateSnapshot:t}),L(e),Z(e),X(e),s(e,{rehydrateSetupState:!0})});return $.isApplying()||f(e,z),e}return f(Q,z),Q}export{x as registerComponentDefinition};
1
+ import{getMiniProgramRuntimeGlobalObject as e}from"../../platform.mjs";import{callHookList as t}from"../../hooks/base.mjs";import{requireRuntimeCapability as n,runtimeCapabilityRegistry as r}from"../../capabilities.mjs";import{runTeardownSteps as i}from"../../teardown.mjs";import{enableDeferredSetData as a,mountRuntimeInstance as o,refreshRuntimeInstance as s,setRuntimeSetDataVisibility as c,teardownRuntimeInstance as l}from"../runtimeInstance.mjs";import{ensureInitialNavigation as u}from"../../../router/initialNavigation.mjs";import{registerNativeComponentDefinition as d}from"./registerNativeDefinition.mjs";import{WEAPP_VITE_STATEFUL_HMR_BRIDGE_KEY as f,WEVU_PUBLIC_RUNTIME_KEY as p,WEVU_READY_CALLED_KEY as m,WEVU_RESOLVE_PUBLIC_INSTANCE_METHOD as h,WEVU_RUNTIME_KEY as ee}from"@weapp-core/constants";function g(g){var _;let{runtimeApp:v,watch:y,setup:b,restOptions:x,pageLifecycleHooks:S,finalObservers:C,userLifetimes:w,userPageLifetimes:T,finalMethods:E,finalOptions:D,applyExtraInstanceFields:O,templateRefs:k,layoutHosts:A,attachWevuPropKeys:j,setupLifecycle:M,syncWevuPropsFromInstance:N,directPropsDerivedKeys:P,isPage:F,vueLifecycles:I,getRuntimeOwnerLabel:L,registerNative:R=!0}=g,z=Array.isArray(k)&&k.length>0?k:void 0;z&&n(`templateRefs`,`registerComponentDefinition(template refs)`);let B=Array.isArray(A)&&A.length>0?A:void 0,V=B?n(`layout`,`registerComponentDefinition(layout hosts)`):void 0,H=(e,t)=>{if(z){var n;(n=r.templateRefs)==null||n.schedule(e,t);return}t==null||t()},U=e=>{var t;let n=(t=e.__wevu)==null?e[p]:t;if(n)return n;let r=e.$state;if(r&&typeof r==`object`)return r[ee]},W=e=>{var t,n,i;return((t=U(e))==null?void 0:t.proxy)||((n=(i=r.scopedSlots)==null?void 0:i.resolveLifecycleProxy(e))==null?e:n)},G=e=>{let t=U(e);return t?{runtime:t,mounted:!1}:(O(e),j(e),o(e,v,y,b,{deferSetData:!0,snapshotOmitKeys:P}),N(e),a(e),{runtime:U(e),mounted:!0})},K=(e,t,n)=>{let r=I[t];if(typeof r==`function`)return r.apply(W(e),n)},q=(e,t)=>{if(!F){t();return}u(e,void 0,{start:!1,onComplete:e=>{e&&t()}})||t()},J=e=>{U(e)||typeof I.mounted!=`function`||G(e).mounted&&(K(e,`created`,[]),K(e,`beforeMount`,[]))},Y={},X=e=>{B&&(V==null||V.attachHosts(B,e))},Z=e=>{F&&V&&(V==null||V.attachPageSetter(e))};if(F)for(let e of[`onPullDownRefresh`,`onReachBottom`,`onShareAppMessage`,`onShareTimeline`,`onAddToFavorites`]){let t=S[e];typeof t==`function`&&typeof E[e]!=`function`&&(Y[e]=function(...e){return t.apply(this,e)})}let Q={...x,...F?S:{},observers:C,lifetimes:{...w,created:function(...e){if(O(this),j(this),z){var t;(t=r.templateRefs)==null||t.attachBindings(this,z)}q(this,()=>{if(K(this,`beforeCreate`,e),M===`created`){try{o(this,v,y,b,{deferSetData:!0,snapshotOmitKeys:P})}catch(e){let t=L(this);throw Error(`[wevu] mount runtime failed in created (${t}): ${e instanceof Error?e.message:String(e)}`)}N(this),Z(this)}typeof w.created==`function`&&w.created.apply(this,e)})},moved:function(...e){t(this,`onMoved`,e),typeof w.moved==`function`&&w.moved.apply(this,e)},attached:function(...e){var n;if(O(this),j(this),z&&!((n=r.templateRefs)!=null&&n.hasBindings(this))){var i;(i=r.templateRefs)==null||i.attachBindings(this,z)}q(this,()=>{if(M!==`created`||!this.__wevu)try{o(this,v,y,b,{deferSetData:!0,snapshotOmitKeys:P})}catch(e){let t=L(this);throw Error(`[wevu] mount runtime failed in attached (${t}): ${e instanceof Error?e.message:String(e)}`)}N(this),K(this,`created`,e),K(this,`beforeMount`,e),Z(this),X(this),a(this),t(this,`onAttached`,e),typeof w.attached==`function`&&w.attached.apply(this,e)})},ready:function(...e){if(!F||this[m]||!u(this,void 0,{start:!0,onComplete:t=>{t&&!this.__wevuInitialNavigationReady&&(this.__wevuInitialNavigationReady=!0,Q.lifetimes.ready.call(this,...e))}})||this.__wevuInitialNavigationReady){if(J(this),F&&typeof S.onReady==`function`){let t=!!this[m];if(S.onReady.call(this,...e),!t){let t=()=>K(this,`mounted`,e);u(this,void 0,{start:!1,onComplete:e=>{e&&t()}})||t()}typeof w.ready==`function`&&w.ready.apply(this,e);return}if(!this[m]){var n;this[m]=!0,N(this),(n=r.templateRefs)==null||n.scheduleOwner(this),H(this,()=>{t(this,`onReady`,e),K(this,`mounted`,e),typeof w.ready==`function`&&w.ready.apply(this,e)});return}typeof w.ready==`function`&&w.ready.apply(this,e)}},detached:function(...e){if(F&&typeof S.onUnload==`function`){i([()=>K(this,`beforeUnmount`,e),()=>K(this,`beforeDestroy`,e),()=>{var e;return(e=r.templateRefs)==null?void 0:e.scheduleOwner(this)},()=>t(this,`onDetached`,e),()=>S.onUnload.call(this,...e),()=>{typeof w.detached==`function`&&w.detached.apply(this,e)},()=>K(this,`unmounted`,e),()=>K(this,`destroyed`,e)]);return}i([()=>K(this,`beforeUnmount`,e),()=>K(this,`beforeDestroy`,e),()=>{var e;return(e=r.templateRefs)==null?void 0:e.scheduleOwner(this)},()=>t(this,`onDetached`,e),()=>{B&&(V==null||V.detachHosts(B,this))},()=>l(this),()=>K(this,`unmounted`,e),()=>K(this,`destroyed`,e),()=>{typeof w.detached==`function`&&w.detached.apply(this,e)}])},error:function(...e){t(this,`onError`,e),typeof w.error==`function`&&w.error.apply(this,e)}},pageLifetimes:{...T,show:function(...e){if(F&&typeof S.onShow==`function`){S.onShow.call(this,...e),typeof T.show==`function`&&T.show.apply(this,e);return}c(this,!0),t(this,`onShow`,e),typeof T.show==`function`&&T.show.apply(this,e)},hide:function(...e){if(F&&typeof S.onHide==`function`){S.onHide.call(this,...e),typeof T.hide==`function`&&T.hide.apply(this,e);return}c(this,!1),t(this,`onHide`,e),typeof T.hide==`function`&&T.hide.apply(this,e)},resize:function(...e){if(F&&typeof S.onResize==`function`){S.onResize.call(this,...e),typeof T.resize==`function`&&T.resize.apply(this,e);return}t(this,`onResize`,e),typeof T.resize==`function`&&T.resize.apply(this,e)},routeDone:function(...e){if(F&&typeof S.onRouteDone==`function`){S.onRouteDone.call(this,...e),typeof T.routeDone==`function`&&T.routeDone.apply(this,e);return}t(this,`onRouteDone`,e),typeof T.routeDone==`function`&&T.routeDone.apply(this,e)}},methods:{...Y,...E,[h]:function(){var e;let t=G(this);return t.mounted&&(K(this,`created`,[]),K(this,`beforeMount`,[])),(e=t.runtime)==null?void 0:e.proxy}},options:D};if(!R)return Q;let $=(_=e())==null?void 0:_[f];if(typeof($==null?void 0:$.trackWevuComponent)==`function`){let e=$.trackWevuComponent(Q,(e,t)=>{s(e,v,y,b,{snapshotOmitKeys:P,stateSnapshot:t}),N(e),Z(e),X(e),a(e,{rehydrateSetupState:!0})});return $.isApplying()||d(e,F),e}return d(Q,F),Q}export{g as registerComponentDefinition};
@@ -10,8 +10,7 @@ import { WatchMap } from "./watch.mjs";
10
10
  * 注册组件入口(框架内部使用)。
11
11
  * @internal
12
12
  */
13
- declare function registerComponent<D extends object, C extends ComputedDefinitions, M extends MethodDefinitions>(runtimeApp: RuntimeApp<D, C, M>, methods: MethodDefinitions, watch: WatchMap | undefined, setup: DefineComponentOptions<ComponentPropsOptions, D, C, M>['setup'], mpOptions: MiniProgramComponentRawOptions, options?: {
13
+ export declare function registerComponent<D extends object, C extends ComputedDefinitions, M extends MethodDefinitions>(runtimeApp: RuntimeApp<D, C, M>, methods: MethodDefinitions, watch: WatchMap | undefined, setup: DefineComponentOptions<ComponentPropsOptions, D, C, M>['setup'], mpOptions: MiniProgramComponentRawOptions, options?: {
14
14
  registerNative?: boolean;
15
15
  }): any;
16
- //#endregion
17
- export { registerComponent };
16
+ //#endregion
@@ -1,5 +1,5 @@
1
1
  //#region src/runtime/register/inline.d.ts
2
- interface InlineExpressionEntry {
2
+ export interface InlineExpressionEntry {
3
3
  keys: string[];
4
4
  indexKeys?: string[];
5
5
  scopeResolvers?: Array<InlineExpressionScopeResolver | ((ctx: any, scope: Record<string, any>, event: any) => any) | undefined>;
@@ -10,6 +10,5 @@ interface InlineExpressionScopeResolver {
10
10
  path: string;
11
11
  indexKey: string;
12
12
  }
13
- type InlineExpressionMap = Record<string, InlineExpressionEntry>;
14
- //#endregion
15
- export { InlineExpressionEntry, InlineExpressionMap };
13
+ export type InlineExpressionMap = Record<string, InlineExpressionEntry>;
14
+ //#endregion
@@ -1 +1 @@
1
- import{isRef as e}from"../../reactivity/ref.mjs";const t=/&amp;/g,n=/&quot;/g,r=/&#34;/g,i=/&apos;/g,a=/&#39;/g,o=/&lt;/g,s=/&gt;/g;function c(e){return e.replace(t,`&`).replace(n,`"`).replace(r,`"`).replace(i,`'`).replace(a,`'`).replace(o,`<`).replace(s,`>`)}const l=/^(?:0|[1-9]\d*)$/;function u(e){if(typeof e==`number`&&Number.isFinite(e))return e;if(typeof e==`string`&&e.trim()){let t=e.trim();return l.test(t)?Number(t):t}}const d=/[^a-z0-9]+/gi,f=/^-+|-+$/g;function p(e){return e.trim().replace(d,`-`).replace(f,``).toLowerCase()}const m=/-([a-z0-9])/g,h=/[-_]/g;function g(e,t){let n=t.replace(h,``).toLowerCase();for(let[t,r]of Object.entries(e==null?{}:e))if(t.replace(h,``).toLowerCase()===n)return r}function _(e,t){let n=p(typeof(t==null?void 0:t.type)==`string`?t.type:``);if(!n)return;let r=n.replace(m,(e,t)=>t.toUpperCase());if(r)return`${e}${r[0].toUpperCase()}${r.slice(1)}`}const v={wvEventDetail:[`wd`,`wvEventDetail`],wvHandler:[`wh`,`wvHandler`],wvInlineId:[`wi`,`wvInlineId`]};function y(e,t,n){var r;let i=(r=v[t])==null?[t]:r;for(let t of i){let r=_(t,n);if(r&&(e==null?void 0:e[r])!==void 0)return e[r];if(r){let t=g(e,r);if(t!==void 0)return t}}for(let t of i){if((e==null?void 0:e[t])!==void 0)return e[t];let n=g(e,t);if(n!==void 0)return n}}function b(e,t,n){return y(e,t,n)}function x(e,t){let n=b(e,`wvEventDetail`,t);return n===!0||n===1||n===`1`||n===`true`}function S(e,t){if(!x(t,e))return e;if(e&&typeof e==`object`&&`detail`in e)return e.detail}function C(t,n){if(!n)return;let r=n.split(`.`).filter(Boolean),i=e(t)?t.value:t;for(let t of r){if(e(i)&&(i=i.value),i==null)return;i=i[t]}return e(i)?i.value:i}function w(e){return e}function T(e,t,n,r){var i,a,o,s;let l=(i=(a=n==null||(o=n.currentTarget)==null?void 0:o.dataset)==null?n==null||(s=n.target)==null?void 0:s.dataset:a)==null?{}:i,d=S(n,l),f=b(l,`wvInlineId`,n);if(f&&r){let t=r[f];if(t&&typeof t.fn==`function`){let n={},r=Array.isArray(t.keys)?t.keys:[];for(let e=0;e<r.length;e+=1){let t=r[e];n[t]=l==null?void 0:l[`wvS${e}`]}let i=Array.isArray(t.indexKeys)?t.indexKeys:[];for(let e=0;e<i.length;e+=1){let t=i[e],r=u(l==null?void 0:l[`wvI${e}`]);r!==void 0&&(n[t]=r)}let a=Array.isArray(t.scopeResolvers)?t.scopeResolvers:[];for(let t=0;t<r.length;t+=1){let i=r[t],o=a[t];try{let t;if(typeof o==`function`)t=o(e,n,d);else if(o&&typeof o==`object`&&o.type===`for-item`){let r=n[o.indexKey],i=C(e,o.path);t=i==null?void 0:i[r]}else continue;t!==void 0&&(n[i]=w(t))}catch(e){}}let o=t.fn(e,n,d);return typeof o==`function`?o.call(e,d):o}}let p=b(l,`wvHandler`,n),m=typeof t==`string`&&t?t:typeof p==`string`?p:void 0;if(!m)return;let h=b(l,`wvArgs`,n),g=[];if(Array.isArray(h))g=h;else if(typeof h==`string`)try{g=JSON.parse(h)}catch(e){try{g=JSON.parse(c(h))}catch(e){g=[]}}Array.isArray(g)||(g=[]);let _=g.map(e=>e===`$event`?d:e),v=e==null?void 0:e[m];if(typeof v==`function`)return v.apply(e,_)}export{c as decodeWxmlEntities,b as resolveDatasetEventValue,T as runInlineExpression};
1
+ import{isRef as e}from"../../reactivity/ref.mjs";import{decodeWxmlEntities as t,resolveDatasetEventValue as n,resolveDatasetIndex as r}from"../inlineDataset.mjs";function i(e,t){let r=n(e,`wvEventDetail`,t);return r===!0||r===1||r===`1`||r===`true`}function a(e,t){if(!i(t,e))return e;if(e&&typeof e==`object`&&`detail`in e)return e.detail}function o(t,n){if(!n)return;let r=n.split(`.`).filter(Boolean),i=e(t)?t.value:t;for(let t of r){if(e(i)&&(i=i.value),i==null)return;i=i[t]}return e(i)?i.value:i}function s(e){return e}function c(e,i,c,l){var u,d,f,p;let m=(u=(d=c==null||(f=c.currentTarget)==null?void 0:f.dataset)==null?c==null||(p=c.target)==null?void 0:p.dataset:d)==null?{}:u,h=a(c,m),g=n(m,`wvInlineId`,c);if(typeof g==`string`&&g&&l){let t=l[g];if(t&&typeof t.fn==`function`){let n={},i=Array.isArray(t.keys)?t.keys:[];for(let e=0;e<i.length;e+=1){let t=i[e];n[t]=m==null?void 0:m[`wvS${e}`]}let a=Array.isArray(t.indexKeys)?t.indexKeys:[];for(let e=0;e<a.length;e+=1){let t=a[e],i=r(m==null?void 0:m[`wvI${e}`]);i!==void 0&&(n[t]=i)}let c=Array.isArray(t.scopeResolvers)?t.scopeResolvers:[];for(let t=0;t<i.length;t+=1){let r=i[t],a=c[t];try{let t;if(typeof a==`function`)t=a(e,n,h);else if(a&&typeof a==`object`&&a.type===`for-item`){let r=n[a.indexKey],i=o(e,a.path);t=i==null?void 0:i[r]}else continue;t!==void 0&&(n[r]=s(t))}catch(e){}}let l=t.fn(e,n,h);return typeof l==`function`?l.call(e,h):l}}let _=n(m,`wvHandler`,c),v=typeof i==`string`&&i?i:typeof _==`string`?_:void 0;if(!v)return;let y=n(m,`wvArgs`,c),b=[];if(Array.isArray(y))b=y;else if(typeof y==`string`)try{b=JSON.parse(y)}catch(e){try{b=JSON.parse(t(y))}catch(e){b=[]}}Array.isArray(b)||(b=[]);let x=b.map(e=>e===`$event`?h:e),S=e==null?void 0:e[v];if(typeof S==`function`)return S.apply(e,x)}export{c as runInlineExpression};
@@ -1 +1 @@
1
- import{toRaw as e}from"../../../reactivity/reactive/shared.mjs";import{getCurrentMiniProgramRuntimeCapabilities as t,getMiniProgramGlobalObject as n,supportsCurrentMiniProgramRuntimeCapability as r}from"../../platform.mjs";import{hasOwn as i}from"../../../utils.mjs";import{normalizeEmitPayload as a}from"../../emit.mjs";import{isNativeBridgeMethod as o,markNativeBridgeMethod as s}from"../../nativeBridge.mjs";import{markNoSetData as c}from"../../noSetData.mjs";import{WEVU_NATIVE_INSTANCE_KEY as l,WEVU_PROPS_KEY as u,WEVU_SETUP_CONTEXT_INSTANCE_KEY as d,WEVU_SLOT_NAMES_PROP as f}from"@weapp-core/constants";const p=[`triggerEvent`,`createSelectorQuery`,`createIntersectionObserver`,`setData`,`setUpdatePerformanceListener`];function m(){return Object.freeze(Object.create(null))}const h=()=>[];function g(e){return Array.isArray(e)?[...new Set(e.filter(e=>typeof e==`string`&&e.length>0))]:!e||typeof e!=`object`?[]:Object.entries(e).filter(([,e])=>!!e).map(([e])=>e)}function _(e){if(!i(e,f))return m();let t=()=>g(e[f]),n=e=>typeof e==`string`&&t().includes(e);return new Proxy(Object.create(null),{get(e,t){if(n(t))return h},has(e,t){return n(t)},ownKeys(){return t()},getOwnPropertyDescriptor(e,t){if(n(t))return{configurable:!0,enumerable:!0,value:h}},set(){return!1},deleteProperty(){return!1}})}function v(e,t){let n=_(t);try{Object.defineProperty(e,"$slots",{value:n,configurable:!0,enumerable:!1,writable:!1})}catch(t){e.$slots=n}return n}function y(){let e=(()=>{});return e.stop=()=>{},e.pause=()=>{},e.resume=()=>{},e}function b(e){try{return c(e)}catch(t){return e}}function x(t,n,r){let i=t==null?void 0:t.state,a=i&&typeof i==`object`?e(i):void 0,s=t==null?void 0:t.proxy,c=e=>{let t=e[r];if(typeof t!=`function`)return!1;if(o(t))return!0;let i=n[r];return typeof i==`function`&&t===i},u=e=>!e||typeof e!=`object`||e===n||e===s||c(e)?!1:typeof e[r]==`function`,d=a?a[l]:void 0;if(u(d))return d;let f=t==null?void 0:t.instance;if(u(f))return f}function S(e,t,n){s(n);try{Object.defineProperty(e,t,{value:n,configurable:!0,enumerable:!1,writable:!0})}catch(r){e[t]=n}}function C(e,a){let s=e[d];if(s&&typeof s==`object`)return s;let c=Object.create(null),l=t=>{var n,r;let o=a==null?void 0:a.proxy;if(o&&Reflect.has(o,t))return{found:!0,value:Reflect.get(o,t)};let s=(n=a==null||(r=a.state)==null?void 0:r[u])==null?e[u]:n;return s&&typeof s==`object`&&i(s,t)?{found:!0,value:Reflect.get(s,t)}:{found:!1,value:void 0}},f=t=>{let n=x(a,e,t);if(n)return n;let r=e[t];if(typeof r==`function`&&!o(r))return e};S(c,`triggerEvent`,(...e)=>{let[t,n,r]=e,i=f(`triggerEvent`);i&&typeof i.triggerEvent==`function`&&(e.length>=3?i.triggerEvent(t,n,r):i.triggerEvent(t,n))}),S(c,`createSelectorQuery`,()=>{var i;let o=f(`createSelectorQuery`);if(o&&typeof o.createSelectorQuery==`function`)return o.createSelectorQuery();let s=n();if(!r(`globalCreateSelectorQuery`)||!s||typeof s.createSelectorQuery!=`function`)return;let c=s.createSelectorQuery();if(!c||!t().selectorQueryScopeByIn||typeof c.in!=`function`)return c;let l=(i=x(a,e,`setData`))==null?e:i;return c.in(l)}),S(c,`createIntersectionObserver`,i=>{var o;let s=f(`createIntersectionObserver`);if(s&&typeof s.createIntersectionObserver==`function`)return s.createIntersectionObserver(i==null?{}:i);let c=n();if(!r(`globalCreateIntersectionObserver`)||!c||typeof c.createIntersectionObserver!=`function`)return;let l=(o=x(a,e,`setData`))==null?e:o;return t().intersectionObserverScopeByParameter?c.createIntersectionObserver(l,i==null?{}:i):c.createIntersectionObserver(i==null?{}:i)}),S(c,`setData`,(e,t)=>{let n=f(`setData`);if(n&&typeof n.setData==`function`)return n.setData(e,t);let r=a==null?void 0:a.adapter,i=typeof(r==null?void 0:r.setData)==`function`?r.setData(e):void 0;return typeof t==`function`&&t(),i}),S(c,`setUpdatePerformanceListener`,e=>{let t=f(`setUpdatePerformanceListener`);if(t&&typeof t.setUpdatePerformanceListener==`function`)return t.setUpdatePerformanceListener(e)});let p=b(new Proxy(c,{get(t,n,r){if(Reflect.has(t,n))return Reflect.get(t,n,r);if(n===`$el`){var i;return(i=x(a,e,`setData`))==null?e:i}if(n===`renderRoot`||n===`shadowRoot`){var o;return((o=x(a,e,`setData`))==null?e:o)[n]}let s=l(n);if(s.found)return s.value;let c=e[n];return typeof c==`function`?c.bind(e):c},has(t,n){return Reflect.has(t,n)||l(n).found||n in e},set(t,n,r){return Reflect.has(t,n)?(t[n]=r,!0):(e[n]=r,!0)}}));try{Object.defineProperty(e,d,{value:p,configurable:!0,enumerable:!1,writable:!0})}catch(t){e[d]=p}return p}export{v as attachRuntimeSlots,y as createNoopWatchStopHandle,m as createSetupSlotsFallback,_ as createSetupSlotsProxy,C as ensureSetupContextInstance,a as normalizeEmitPayload,b as safeMarkNoSetData,p as setupInstanceMethodNames};
1
+ import{toRaw as e}from"../../../reactivity/reactive/shared.mjs";import{getCurrentMiniProgramRuntimeCapabilities as t,getMiniProgramGlobalObject as n,supportsCurrentMiniProgramRuntimeCapability as r}from"../../platform.mjs";import{markNoSetData as i}from"../../noSetData.mjs";import{hasOwn as a}from"../../../utils.mjs";import{normalizeEmitPayload as o}from"../../emit.mjs";import{isNativeBridgeMethod as s,markNativeBridgeMethod as c}from"../../nativeBridge.mjs";import{WEVU_NATIVE_INSTANCE_KEY as l,WEVU_PROPS_KEY as u,WEVU_SETUP_CONTEXT_INSTANCE_KEY as d,WEVU_SLOT_NAMES_PROP as f}from"@weapp-core/constants";const p=[`triggerEvent`,`createSelectorQuery`,`createIntersectionObserver`,`setData`,`setUpdatePerformanceListener`];function m(){return Object.freeze(Object.create(null))}const h=()=>[];function g(e){return Array.isArray(e)?[...new Set(e.filter(e=>typeof e==`string`&&e.length>0))]:!e||typeof e!=`object`?[]:Object.entries(e).filter(([,e])=>!!e).map(([e])=>e)}function _(e){if(!a(e,f))return m();let t=()=>g(e[f]),n=e=>typeof e==`string`&&t().includes(e);return new Proxy(Object.create(null),{get(e,t){if(n(t))return h},has(e,t){return n(t)},ownKeys(){return t()},getOwnPropertyDescriptor(e,t){if(n(t))return{configurable:!0,enumerable:!0,value:h}},set(){return!1},deleteProperty(){return!1}})}function v(e,t){let n=_(t);try{Object.defineProperty(e,"$slots",{value:n,configurable:!0,enumerable:!1,writable:!1})}catch(t){e.$slots=n}return n}function y(){let e=(()=>{});return e.stop=()=>{},e.pause=()=>{},e.resume=()=>{},e}function b(e){try{return i(e)}catch(t){return e}}function x(t,n,r){let i=t==null?void 0:t.state,a=i&&typeof i==`object`?e(i):void 0,o=t==null?void 0:t.proxy,c=e=>{let t=e[r];if(typeof t!=`function`)return!1;if(s(t))return!0;let i=n[r];return typeof i==`function`&&t===i},u=e=>!e||typeof e!=`object`||e===n||e===o||c(e)?!1:typeof e[r]==`function`,d=a?a[l]:void 0;if(u(d))return d;let f=t==null?void 0:t.instance;if(u(f))return f}function S(e,t,n){c(n);try{Object.defineProperty(e,t,{value:n,configurable:!0,enumerable:!1,writable:!0})}catch(r){e[t]=n}}function C(i,o){let c=i[d];if(c&&typeof c==`object`)return c;let f=Object.create(null);try{Object.defineProperty(f,l,{configurable:!0,enumerable:!1,get(){let t=o==null?void 0:o.state,n=t&&typeof t==`object`?e(t):void 0,r=n==null?void 0:n[l];return r&&typeof r==`object`?r:i}})}catch(e){f[l]=i}let p=e=>{var t,n;let r=o==null?void 0:o.proxy;if(r&&Reflect.has(r,e))return{found:!0,value:Reflect.get(r,e)};let s=(t=o==null||(n=o.state)==null?void 0:n[u])==null?i[u]:t;return s&&typeof s==`object`&&a(s,e)?{found:!0,value:Reflect.get(s,e)}:{found:!1,value:void 0}},m=e=>{let t=x(o,i,e);if(t)return t;let n=i[e];if(typeof n==`function`&&!s(n))return i};S(f,`triggerEvent`,(...e)=>{let[t,n,r]=e,i=m(`triggerEvent`);i&&typeof i.triggerEvent==`function`&&(e.length>=3?i.triggerEvent(t,n,r):i.triggerEvent(t,n))}),S(f,`createSelectorQuery`,()=>{var e;let a=m(`createSelectorQuery`);if(a&&typeof a.createSelectorQuery==`function`)return a.createSelectorQuery();let s=n();if(!r(`globalCreateSelectorQuery`)||!s||typeof s.createSelectorQuery!=`function`)return;let c=s.createSelectorQuery();if(!c||!t().selectorQueryScopeByIn||typeof c.in!=`function`)return c;let l=(e=x(o,i,`setData`))==null?i:e;return c.in(l)}),S(f,`createIntersectionObserver`,e=>{var a;let s=m(`createIntersectionObserver`);if(s&&typeof s.createIntersectionObserver==`function`)return s.createIntersectionObserver(e==null?{}:e);let c=n();if(!r(`globalCreateIntersectionObserver`)||!c||typeof c.createIntersectionObserver!=`function`)return;let l=(a=x(o,i,`setData`))==null?i:a;return t().intersectionObserverScopeByParameter?c.createIntersectionObserver(l,e==null?{}:e):c.createIntersectionObserver(e==null?{}:e)}),S(f,`setData`,(e,t)=>{let n=m(`setData`);if(n&&typeof n.setData==`function`)return n.setData(e,t);let r=o==null?void 0:o.adapter,i=typeof(r==null?void 0:r.setData)==`function`?r.setData(e):void 0;return typeof t==`function`&&t(),i}),S(f,`setUpdatePerformanceListener`,e=>{let t=m(`setUpdatePerformanceListener`);if(t&&typeof t.setUpdatePerformanceListener==`function`)return t.setUpdatePerformanceListener(e)});let h=b(new Proxy(f,{get(e,t,n){if(Reflect.has(e,t))return Reflect.get(e,t,n);if(t===`$el`){var r;return(r=x(o,i,`setData`))==null?i:r}if(t===`renderRoot`||t===`shadowRoot`){var a;return((a=x(o,i,`setData`))==null?i:a)[t]}let s=p(t);if(s.found)return s.value;let c=i[t];return typeof c==`function`?c.bind(i):c},has(e,t){return Reflect.has(e,t)||p(t).found||t in i},set(e,t,n){return Reflect.has(e,t)?(e[t]=n,!0):(i[t]=n,!0)}}));try{Object.defineProperty(i,d,{value:h,configurable:!0,enumerable:!1,writable:!0})}catch(e){i[d]=h}return h}export{v as attachRuntimeSlots,y as createNoopWatchStopHandle,m as createSetupSlotsFallback,_ as createSetupSlotsProxy,C as ensureSetupContextInstance,o as normalizeEmitPayload,b as safeMarkNoSetData,p as setupInstanceMethodNames};
@@ -1 +1 @@
1
- import{effectScope as e}from"../../../reactivity/core.mjs";import{toRaw as t}from"../../../reactivity/reactive/shared.mjs";import{shallowReactive as n}from"../../../reactivity/reactive/shallow.mjs";import{isReactive as r}from"../../../reactivity/reactive.mjs";import{setCurrentInstance as i,setCurrentSetupContext as a}from"../../hooks/base.mjs";import{hasOwn as o}from"../../../utils.mjs";import{hasTrackableSetupBinding as s}from"../../setupTracking.mjs";import{normalizeEmitEventName as c,normalizeEmitPayload as l}from"../../emit.mjs";import{attachRuntimeSlots as u,ensureSetupContextInstance as d,safeMarkNoSetData as f}from"./setupContext.mjs";import{runSetupFunction as p}from"../setup.mjs";import{attachRuntimeSetupState as m,ensureRuntimeProps as h}from"./utils.mjs";import{WEVU_ATTRS_KEY as g,WEVU_EFFECT_SCOPE_KEY as _,WEVU_EXPOSED_KEY as v,WEVU_PROP_KEYS_KEY as y}from"@weapp-core/constants";let b=0;function x(e,t){let n=e,r={proxy:{configurable:!0,enumerable:!1,value:t,writable:!1},$:{configurable:!0,enumerable:!1,value:e,writable:!1},uid:{configurable:!0,enumerable:!1,value:++b,writable:!1},exposed:{configurable:!0,enumerable:!1,get:()=>e[v]}};for(let[e,t]of Object.entries(r))try{Object.defineProperty(n,e,t)}catch(r){`value`in t&&(n[e]=t.value)}let i={$:{configurable:!0,enumerable:!1,value:e,writable:!1},$el:{configurable:!0,enumerable:!1,value:e,writable:!1}};for(let[e,n]of Object.entries(i))try{Object.defineProperty(t,e,n)}catch(r){t[e]=n.value}}function S(e){return e.startsWith(`__wv_`)}function C(b){var C;let{target:w,runtime:T,runtimeWithDefaults:E,runtimeState:D,runtimeProxy:O,setup:k}=b,A=w.properties||{},j=h(w,D,A),M=n(Object.create(null)),N=new Set(Array.isArray(w[y])?w[y]:[]),P=e=>typeof D==`object`&&!!D&&o(D,e);(()=>{let e=w.properties&&typeof w.properties==`object`?w.properties:void 0;for(let t of Object.keys(M))(!e||!o(e,t)||S(t)||N.has(t)||P(t))&&delete M[t];if(e)for(let[t,n]of Object.entries(e))S(t)||N.has(t)||P(t)||(M[t]=n)})();try{Object.defineProperty(w,g,{value:M,configurable:!0,enumerable:!1,writable:!1})}catch(e){w[g]=M}let F=d(w,E);x(w,F);let I=u(D,j),L=(C=E.setupState)==null?Object.create(null):C;m(D,L);let R=f({props:j,runtime:E,state:D,proxy:O,bindModel:T.bindModel.bind(E),watch:T.watch.bind(E),instance:F,emit:(e,...t)=>{let{detail:n,options:r}=l(t),i=c(e);F.triggerEvent(i,n,r)},expose:e=>{w[v]=e},attrs:M,slots:I}),z=e(!0);w[_]=z,i(w),a(R);try{let e=z.run(()=>p(k,j,R)),n=!1;if(e&&typeof e==`object`){let i=T.setupState&&typeof T.setupState==`object`?r(T.setupState)?t(T.setupState):T.setupState:Object.create(null);Object.keys(e).forEach(t=>{let r=e[t];if(typeof r==`function`)T.methods[t]=(...e)=>r.apply(T.proxy,e),T.state[t]=(...e)=>r.apply(T.proxy,e),n=!0;else{if(s(r)){var a;(a=T.__wevu_trackSetupReactiveKey)==null||a.call(T,t)}T.state[t]=r,i[t]=r}})}if(n){var B;(B=T.__wevu_touchSetupMethodsVersion)==null||B.call(T)}}catch(e){throw z.stop(),w[_]=void 0,e}finally{a(void 0),i(void 0)}}export{C as runRuntimeSetupPhase};
1
+ import{effectScope as e}from"../../../reactivity/core.mjs";import{toRaw as t}from"../../../reactivity/reactive/shared.mjs";import{shallowReactive as n}from"../../../reactivity/reactive/shallow.mjs";import{isReactive as r}from"../../../reactivity/reactive.mjs";import{setCurrentInstance as i,setCurrentSetupContext as a}from"../../hooks/base.mjs";import{hasOwn as o}from"../../../utils.mjs";import{hasTrackableSetupBinding as s}from"../../setupTracking.mjs";import{normalizeEmitEventName as c,normalizeEmitPayload as l}from"../../emit.mjs";import{attachRuntimeSlots as u,ensureSetupContextInstance as d,safeMarkNoSetData as f}from"./setupContext.mjs";import{runSetupFunction as p}from"../setup.mjs";import{attachRuntimeSetupState as m,ensureRuntimeProps as h}from"./utils.mjs";import{WEVU_ATTRS_KEY as g,WEVU_EFFECT_SCOPE_KEY as _,WEVU_EXPOSED_KEY as v,WEVU_PROP_KEYS_KEY as y}from"@weapp-core/constants";let b=0;function x(e,t){let n=e,r={proxy:{configurable:!0,enumerable:!1,value:t,writable:!1},$:{configurable:!0,enumerable:!1,value:e,writable:!1},uid:{configurable:!0,enumerable:!1,value:++b,writable:!1},exposed:{configurable:!0,enumerable:!1,get:()=>e[v]}};for(let[e,t]of Object.entries(r))try{Object.defineProperty(n,e,t)}catch(r){`value`in t&&(n[e]=t.value)}let i={$:{configurable:!0,enumerable:!1,value:e,writable:!1},$el:{configurable:!0,enumerable:!1,value:e,writable:!1}};for(let[e,n]of Object.entries(i))try{Object.defineProperty(t,e,n)}catch(r){t[e]=n.value}}function S(e){return e.startsWith(`__wv_`)}function C(b){var C;let{target:w,runtime:T,runtimeWithDefaults:E,runtimeState:D,runtimeProxy:O,setup:k}=b,A=w.properties||{},j=h(w,D,A),M=n(Object.create(null)),N=new Set(Array.isArray(w[y])?w[y]:[]),P=e=>typeof D==`object`&&!!D&&o(D,e);(()=>{let e=w.properties&&typeof w.properties==`object`?w.properties:void 0;for(let t of Object.keys(M))(!e||!o(e,t)||S(t)||N.has(t)||P(t))&&delete M[t];if(e)for(let[t,n]of Object.entries(e))S(t)||N.has(t)||P(t)||(M[t]=n)})();try{Object.defineProperty(w,g,{value:M,configurable:!0,enumerable:!1,writable:!1})}catch(e){w[g]=M}let F=d(w,E);x(w,F);let I=u(D,j),L=(C=E.setupState)==null?Object.create(null):C;m(D,L);let R=f({props:j,runtime:E,state:D,proxy:O,bindModel:T.bindModel.bind(E),watch:T.watch.bind(E),instance:F,emit:(e,...t)=>{let{detail:n,options:r}=l(t),i=c(e);F.triggerEvent(i,n,r)},expose:e=>{w[v]=e},attrs:M,slots:I}),z=e(!0);w[_]=z,i(w),a(R);try{let e=z.run(()=>p(k,j,R)),n=!1;if(e&&typeof e==`object`){let i=T.setupState&&typeof T.setupState==`object`?r(T.setupState)?t(T.setupState):T.setupState:Object.create(null);Object.keys(e).forEach(t=>{let r=e[t];if(typeof r==`function`)T.methods[t]=(...e)=>r.apply(T.proxy,e),T.state[t]=(...e)=>r.apply(T.proxy,e),n=!0;else{if(s(r)){var a;(a=T.__wevu_trackSetupReactiveKey)==null||a.call(T,t)}T.state[t]=r,i[t]=r}})}if(n){var B;(B=T.__wevu_touchSetupMethodsVersion)==null||B.call(T)}}finally{a(void 0),i(void 0)}}export{C as runRuntimeSetupPhase};
@@ -0,0 +1 @@
1
+ import{isRef as e}from"../../../reactivity/ref.mjs";function t(e){return!!e&&typeof e==`object`&&!Array.isArray(e)}function n(r,i,a){if(Array.isArray(r)&&Array.isArray(i)){r.splice(0,r.length,...i);return}if(!t(r)||!t(i))return;let o=t(a)?a:void 0;for(let e of Object.keys(o==null?{}:o))typeof(o==null?void 0:o[e])!=`function`&&typeof r[e]!=`function`&&!Object.prototype.hasOwnProperty.call(i,e)&&delete r[e];for(let[a,s]of Object.entries(i))typeof r[a]!=`function`&&(e(r[a])?r[a].value=s:t(r[a])&&t(s)||Array.isArray(r[a])&&Array.isArray(s)?n(r[a],s,o==null?void 0:o[a]):r[a]=s)}export{n as restoreReactiveSetupSnapshot};
@@ -10,17 +10,16 @@ type RuntimeSetupFunction<D extends object, C extends ComputedDefinitions, M ext
10
10
  * 挂载运行时实例(框架内部注册流程使用)。
11
11
  * @internal
12
12
  */
13
- declare function mountRuntimeInstance<D extends object, C extends ComputedDefinitions, M extends MethodDefinitions>(target: InternalRuntimeState, runtimeApp: RuntimeApp<D, C, M>, watchMap: WatchMap | undefined, setup?: RuntimeSetupFunction<D, C, M>, options?: {
13
+ export declare function mountRuntimeInstance<D extends object, C extends ComputedDefinitions, M extends MethodDefinitions>(target: InternalRuntimeState, runtimeApp: RuntimeApp<D, C, M>, watchMap: WatchMap | undefined, setup?: RuntimeSetupFunction<D, C, M>, options?: {
14
14
  deferSetData?: boolean;
15
15
  snapshotOmitKeys?: string[];
16
16
  }): RuntimeInstance<D, C, M>;
17
- declare function setRuntimeSetDataVisibility(target: InternalRuntimeState, visible: boolean): void;
17
+ export declare function setRuntimeSetDataVisibility(target: InternalRuntimeState, visible: boolean): void;
18
18
  /**
19
19
  * 卸载运行时实例(框架内部注册流程使用)。
20
20
  * @internal
21
21
  */
22
- declare function teardownRuntimeInstance(target: InternalRuntimeState, options?: {
22
+ export declare function teardownRuntimeInstance(target: InternalRuntimeState, options?: {
23
23
  skipHooks?: boolean;
24
24
  }): void;
25
- //#endregion
26
- export { mountRuntimeInstance, setRuntimeSetDataVisibility, teardownRuntimeInstance };
25
+ //#endregion
@@ -1 +1 @@
1
- import{isRef as e}from"../../reactivity/ref.mjs";import{callHookList as t}from"../hooks/base.mjs";import{isDeepEqualValue as n}from"../app/setData/snapshot.mjs";import{resolveRuntimePageLayoutName as r,syncRuntimePageLayoutState as i}from"../pageLayout.mjs";import{allocateOwnerId as a,attachOwnerSnapshot as o,mergeOwnerSnapshotProps as s,removeOwner as c,resolveOwnerSnapshot as l,updateOwnerSnapshot as ee}from"../scopedSlots.mjs";import{clearTemplateRefs as u,scheduleTemplateRefUpdate as d}from"../templateRefs.mjs";import{attachRuntimeSlots as te,createNoopWatchStopHandle as ne,safeMarkNoSetData as re}from"./runtimeInstance/setupContext.mjs";import{bridgeRuntimeMethodsToTarget as ie}from"./runtimeInstance/methodBridge.mjs";import{attachRuntimeProvideParentContext as ae}from"./runtimeInstance/provideContext.mjs";import{attachNativeInstanceRef as oe,attachRuntimeInstance as se,attachRuntimeRef as f,callNativeSetData as p,ensureRuntimeProps as ce,resolveNativeSetData as m}from"./runtimeInstance/utils.mjs";import{runRuntimeSetupPhase as le}from"./runtimeInstance/setupPhase.mjs";import{createSetDataHighFrequencyWarningMonitor as ue}from"./setDataFrequencyWarning.mjs";import{registerWatches as de}from"./watch.mjs";import{WEVU_EFFECT_SCOPE_KEY as h,WEVU_HOOKS_KEY as g,WEVU_PAGE_LAYOUT_NAME_KEY as _,WEVU_PAGE_LAYOUT_PROPS_KEY as v,WEVU_PAGE_LAYOUT_SETTER_KEY as y,WEVU_PAGE_SCROLL_HOOK_DEPTH_KEY as fe,WEVU_PROPS_DERIVED_KEYS_KEY as b,WEVU_PROPS_KEY as x,WEVU_PUBLIC_RUNTIME_KEY as S,WEVU_RUNTIME_OWNER_ID_KEY as C,WEVU_SLOT_OWNER_ID_KEY as w,WEVU_TEMPLATE_REFS_KEY as T,WEVU_WATCH_STOPS_KEY as E}from"@weapp-core/constants";function D(e,t=new WeakMap){if(!e||typeof e!=`object`)return e;if(t.has(e))return t.get(e);if(Array.isArray(e)){let n=[];t.set(e,n);for(let r of e)n.push(D(r,t));return n}let n={};t.set(e,n);for(let[r,i]of Object.entries(e))n[r]=D(i,t);return n}function pe(e,t,n){let r=e.data;if((!r||typeof r!=`object`)&&(!n||!Object.keys(n).length))return;let i=Array.isArray(t)&&t.length?new Set(t):void 0,a={};if(r&&typeof r==`object`)for(let[e,t]of Object.entries(r))i!=null&&i.has(e)||(a[e]=D(t));if(n)for(let[e,t]of Object.entries(n))i!=null&&i.has(e)||(a[e]=D(t));return a}function me(e){return!!(e!=null&&e.__wevuHasTemplateRuntimeBindings)}function he(e){typeof e.route==`string`&&e.route&&(e[y]=(t,n)=>{var a;let o=(a=e.__wevu)==null?void 0:a.state;if(!o||typeof o!=`object`)return;o[_]=r(t);let s=t===!1||n==null?{}:n;o[v]=s,i(e,t,s)})}function O(e,t,n,r,i){var c,u,h,g,_,v,y,C,O,k,A,j;if(e.__wevu)return e.__wevu;ae(e,t),re(e);let M=(c=e.data)==null?void 0:c[w],N=typeof M==`string`&&M?M:a(),P=typeof M==`string`&&M!==N,F=!!(t!=null&&(u=t.__wevuSetDataOptions)!=null&&u.suspendWhenHidden),I=typeof e.route==`string`&&e.route?`page:${e.route}`:typeof e.is==`string`&&e.is?`component:${e.is}`:`unknown-target`,L=ue({option:t==null||(h=t.__wevuSetDataOptions)==null?void 0:h.highFrequencyWarning,targetLabel:I,isInPageScrollHook:()=>{var t;return Number((t=e[fe])==null?0:t)>0}}),R=i!=null&&i.deferSetData?(e=>{let t,n=[],r=!1,i={setData(i,a){if(!r){var o;t={...(o=t)==null?{}:o,...i},a&&n.push(a);return}let s=m(e);if(s)return p(e,s,i,a)}};return i.__wevu_enableSetData=(i=!1)=>{r=!0,i&&(t=void 0,n=[]);let a=m(e);if(t&&Object.keys(t).length&&a){let r=t,i=n;t=void 0,n=[];let o=i.length?()=>i.forEach(e=>e()):void 0;p(e,a,r,o)}},i})(e):{setData(t,n){let r=m(e);if(r)return p(e,r,t,n)}},z,B=!0,V,ge=(e,t)=>({...e==null?{}:e,...t}),H=()=>{var t;if(!z)return;let n=l(z),r=(t=e[x])==null?e.properties:t;s(n,r),ee(N,n,z.proxy,e)},_e=()=>{if(!P)return;let t=e.data;try{t&&typeof t==`object`&&(t[w]=N)}catch(e){}let n=m(e);n&&p(e,n,{[w]:N})},U={...R,setData(t){if(L==null||L(),F&&!B){V=ge(V,t),H(),d(e);return}let n=Array.isArray(e[T])&&e[T].length>0;if(H(),n&&m(e))return new Promise(n=>{R.setData(t,()=>{H(),d(e),n()})});let r=R.setData(t);return d(e),r},__wevu_setVisibility(t){if(B=t,!B||!V)return;let n=V;V=void 0;let r=Array.isArray(e[T])&&e[T].length>0;if(H(),r&&m(e))return new Promise(t=>{R.setData(n,()=>{H(),d(e),t()})});let i=R.setData(n);return d(e),i}};Object.defineProperty(U,"__wevu_targetLabel",{configurable:!0,enumerable:!1,value:I,writable:!1});let W=e.properties;W&&typeof W==`object`&&Object.defineProperty(U,"__wevu_initialProps",{configurable:!0,enumerable:!1,value:W,writable:!1}),Array.isArray(i==null?void 0:i.snapshotOmitKeys)&&i.snapshotOmitKeys.length&&Object.defineProperty(U,"__wevu_snapshotOmitKeys",{configurable:!0,enumerable:!1,value:i.snapshotOmitKeys,writable:!1});let G=pe(e,i==null?void 0:i.snapshotOmitKeys,me(t)?void 0:{[w]:N});G&&Object.keys(G).length&&Object.defineProperty(U,"__wevu_initialSnapshot",{configurable:!0,enumerable:!1,value:G,writable:!1}),Object.defineProperty(U,"__wevu_initialState",{configurable:!0,enumerable:!1,value:{[w]:N},writable:!1}),(i!=null&&i.deferSetData||r||W&&typeof W==`object`&&Object.keys(W).length>0)&&Object.defineProperty(U,"__wevu_deferInitialSnapshot",{configurable:!0,enumerable:!1,value:!0,writable:!1});let K=t.mount(U);z=K,se(K,e);let q=(g=K==null?void 0:K.proxy)==null?{}:g,J=(_=K==null?void 0:K.state)==null?{}:_,ve=(v=K==null?void 0:K.setupState)==null?Object.create(null):v;J&&typeof J==`object`&&(f(J,K),oe(J,e));let ye=(y=K==null?void 0:K.computed)==null?Object.create(null):y;if(!(K!=null&&K.methods))try{K.methods=Object.create(null)}catch(e){}let be=(C=K==null?void 0:K.methods)==null?Object.create(null):C,xe=(O=K==null?void 0:K.watch)==null?(()=>ne()):O,Se=(k=K==null?void 0:K.bindModel)==null?(()=>{}):k,Y={...K==null?{}:K,state:J,setupState:ve,proxy:q,methods:be,computed:ye,watch:xe,bindModel:Se,snapshot:(A=K==null?void 0:K.snapshot)==null?(()=>Object.create(null)):A,unmount:(j=K==null?void 0:K.unmount)==null?(()=>{}):j};Object.defineProperty(Y,"__wevu_initialRuntimeSnapshot",{configurable:!0,enumerable:!1,value:D(J),writable:!1});let X=Y,Ce={__wevu_flushSetupSnapshotSync:K.__wevu_flushSetupSnapshotSync,__wevu_touchSetupMethodsVersion:K.__wevu_touchSetupMethodsVersion,__wevu_trackSetupReactiveKey:K.__wevu_trackSetupReactiveKey,[b]:K[b]};for(let[e,t]of Object.entries(Ce))t&&Object.defineProperty(Y,e,{configurable:!0,enumerable:!1,value:t,writable:!0});Object.defineProperty(e,S,{value:Y,configurable:!0,enumerable:!1,writable:!1}),e.__wevu=Y,he(e);let we=ce(e,J);te(J,we),o(e,Y,N,{deferSnapshot:i==null?void 0:i.deferSetData}),_e();let Z=n?de(Y,n,e,{deferMissingSourceBaseline:!!r}):[];if(Z.length&&(e[E]=Z),r){if(le({target:e,runtime:K,runtimeWithDefaults:Y,runtimeState:J,runtimeProxy:q,setup:r}),!(i!=null&&i.deferSetData)){var Q;(Q=X.__wevu_flushSetupSnapshotSync)==null||Q.call(X)}i!=null&&i.deferSetData||H();for(let e of Z)e.resume()}else if(!(i!=null&&i.deferSetData)&&e.properties&&typeof e.properties==`object`&&Object.keys(e.properties).length>0){var $;($=X.__wevu_flushSetupSnapshotSync)==null||$.call(X),H()}return ie(e,K),K}function k(e,t,n){for(let e of Reflect.ownKeys(t))if(!Reflect.has(n,e)){let n=Reflect.getOwnPropertyDescriptor(t,e);n!=null&&n.configurable&&Reflect.deleteProperty(t,e)}for(let e of Reflect.ownKeys(n)){let r=Reflect.getOwnPropertyDescriptor(n,e);if(r)try{Reflect.defineProperty(t,e,r)}catch(r){try{t[e]=n[e]}catch(e){}}}return f(t.state,t),e.__wevu=t,Object.defineProperty(e,S,{value:t,configurable:!0,enumerable:!1,writable:!1}),t}function A(t,n,r){let i=t.state,a=t.setupState,o={};for(let t of Object.keys(n==null?{}:n)){if(!Object.prototype.hasOwnProperty.call(i,t))continue;let n=a==null?void 0:a[t];if(!(a&&Object.prototype.hasOwnProperty.call(a,t)&&!e(n))){if(r&&Object.prototype.hasOwnProperty.call(r,t)){o[t]=D(r[t]);continue}o[t]=D(e(n)?n.value:i[t])}}return o}function j(t,n){let r=t.setupState;return!r||!n||typeof n!=`object`?[]:Object.keys(n).filter(t=>{let n=r[t];return Object.prototype.hasOwnProperty.call(r,t)&&!e(n)})}function M(t,r){var i;let a=t.__wevu,o=a==null?void 0:a.state,s=a==null?void 0:a.setupState,c=(i=r==null?void 0:r.nativeData)==null?t.data:i;if(!o||typeof o!=`object`||!c||typeof c!=`object`)return;let l=a==null?void 0:a.__wevu_initialRuntimeSnapshot;for(let[t,i]of Object.entries(c))if(t&&t!==`undefined`&&Object.prototype.hasOwnProperty.call(o,t))try{let a=s==null?void 0:s[t],c=D(i);if(!(r!=null&&r.includeSetupState)&&s&&Object.prototype.hasOwnProperty.call(s,t)||!(r!=null&&r.includeSetupState)&&l&&Object.prototype.hasOwnProperty.call(l,t)&&!n(o[t],l[t],20,{keys:1e4})||!(r!=null&&r.includeSetupState)&&l&&!Object.prototype.hasOwnProperty.call(l,t))continue;if(e(a)){a.value=c;continue}o[t]=c}catch(e){}}function N(e,t){var n,r,i;let a=(n=e.__wevu)==null?void 0:n.adapter;M(e,{includeSetupState:t==null?void 0:t.rehydrateSetupState}),a&&typeof a.__wevu_enableSetData==`function`&&a.__wevu_enableSetData(!0),(r=e.__wevu)==null||(i=r.__wevu_flushSetupSnapshotSync)==null||i.call(r)}function P(e,t){var n;let r=(n=e.__wevu)==null?void 0:n.adapter;r&&typeof r.__wevu_setVisibility==`function`&&r.__wevu_setVisibility(t)}function F(e,n){var r,i;let a=e.__wevu,o=(r=e[C])==null?e[w]:r;o&&c(o),u(e),!(n!=null&&n.skipHooks)&&a&&e[g]&&t(e,`onUnload`,[]),e[g]&&(e[g]=void 0);let s=e[E];if(Array.isArray(s))for(let e of s)try{e()}catch(e){}e[E]=void 0,(i=e[h])==null||i.stop(),e[h]=void 0,a&&a.unmount(),delete e.__wevu,S in e&&delete e[S]}function I(e,t,n,r,i){let a=e.__wevu,o=a?A(a,e.data,i==null?void 0:i.stateSnapshot):void 0,s=a?j(a,e.data):[];F(e,{skipHooks:!0});let c=O(e,t,n,r,{deferSetData:!0,snapshotOmitKeys:i==null?void 0:i.snapshotOmitKeys});if(o){let t=e.data;if(t&&typeof t==`object`){for(let e of s)delete t[e];Object.assign(t,D(o))}M(e,{includeSetupState:!0,nativeData:o})}return!a||a===c?c:k(e,a,c)}export{N as enableDeferredSetData,O as mountRuntimeInstance,I as refreshRuntimeInstance,P as setRuntimeSetDataVisibility,F as teardownRuntimeInstance};
1
+ import{effectScope as e}from"../../reactivity/core.mjs";import{isReactive as t}from"../../reactivity/reactive.mjs";import{isRef as n}from"../../reactivity/ref.mjs";import{getMiniProgramRuntimeGlobalObject as r}from"../platform.mjs";import{callHookList as i}from"../hooks/base.mjs";import{isSetDataHighFrequencyWarningRequested as a,requireRuntimeCapability as o,runtimeCapabilityRegistry as s}from"../capabilities.mjs";import{runTeardownSteps as c}from"../teardown.mjs";import{applySnapshotUpdate as l,isDeepEqualValue as u}from"../app/setData/snapshot.mjs";import{observeSetDataCompletion as d}from"../app/setData/commitTracker.mjs";import{attachRuntimeSlots as ee,createNoopWatchStopHandle as te,safeMarkNoSetData as ne}from"./runtimeInstance/setupContext.mjs";import{bridgeRuntimeMethodsToTarget as re}from"./runtimeInstance/methodBridge.mjs";import{attachRuntimeProvideParentContext as ie}from"./runtimeInstance/provideContext.mjs";import{attachNativeInstanceRef as ae,attachRuntimeInstance as oe,attachRuntimeRef as se,callNativeSetData as ce,ensureRuntimeProps as le,resolveNativeSetData as ue}from"./runtimeInstance/utils.mjs";import{runRuntimeSetupPhase as de}from"./runtimeInstance/setupPhase.mjs";import{restoreReactiveSetupSnapshot as f}from"./runtimeInstance/setupSnapshot.mjs";import{registerWatches as fe}from"./watch.mjs";import{WEAPP_VITE_STATEFUL_HMR_BRIDGE_KEY as pe,WEVU_EFFECT_SCOPE_KEY as p,WEVU_EXPOSED_KEY as m,WEVU_HOOKS_KEY as h,WEVU_HOST_COMMIT_PROMISE_KEY as g,WEVU_ON_BEFORE_UNMOUNT_HOOK as _,WEVU_PAGE_SCROLL_HOOK_DEPTH_KEY as me,WEVU_PROPS_DERIVED_KEYS_KEY as he,WEVU_PUBLIC_RUNTIME_KEY as v,WEVU_SETUP_CONTEXT_INSTANCE_KEY as ge,WEVU_SLOT_OWNER_ID_KEY as _e,WEVU_WATCH_STOPS_KEY as ve}from"@weapp-core/constants";const y=new WeakMap;function b(e,t=new WeakMap){if(!e||typeof e!=`object`)return e;if(t.has(e))return t.get(e);if(Array.isArray(e)){let n=[];t.set(e,n);for(let r of e)n.push(b(r,t));return n}let n={};t.set(e,n);for(let[r,i]of Object.entries(e))n[r]=b(i,t);return n}function ye(e,t){let n=e==null?{}:e;for(let[e,r]of Object.entries(t)){let t;for(let r of Object.keys(n))if(e.startsWith(`${r}.`)){t=r;break}if(t){let i={value:n[t]};l(i,`value.${e.slice(t.length+1)}`,r,`set`,{cloneValue:!1,clonedParents:new WeakSet}),n[t]=i.value;continue}let i=`${e}.`;for(let e of Object.keys(n))e.startsWith(i)&&delete n[e];n[e]=r}return n}function be(e,t,n){let r=e.data;if((!r||typeof r!=`object`)&&(!n||!Object.keys(n).length))return;let i=Array.isArray(t)&&t.length?new Set(t):void 0,a={};if(r&&typeof r==`object`)for(let[e,t]of Object.entries(r))i!=null&&i.has(e)||(a[e]=b(t));if(n)for(let[e,t]of Object.entries(n))i!=null&&i.has(e)||(a[e]=b(t));return a}function xe(e){return!!(e!=null&&e.__wevuHasTemplateRuntimeBindings)}function x(e,n,c,l,u){var f,p,m,h,_,ge,x,S,C;if(e.__wevu)return e.__wevu;let w=n.__wevuSetDataOptions,T=xe(n)?o(`scopedSlots`,`mountRuntimeInstance(scoped-slot bindings)`):void 0,E=T==null?void 0:T.prepareMount(e),O=e.__wevuTemplateRefs;Array.isArray(O)&&O.length&&o(`templateRefs`,`mountRuntimeInstance(template refs)`);let Se=a(w==null?void 0:w.highFrequencyWarning)?o(`setDataHighFrequencyWarning`,`mountRuntimeInstance(setData.highFrequencyWarning)`):void 0;ie(e,n),ne(e);let Ce=!!(w!=null&&w.suspendWhenHidden),we=typeof e.route==`string`&&e.route?`page:${e.route}`:typeof e.is==`string`&&e.is?`component:${e.is}`:`unknown-target`,k=Se==null?void 0:Se.createMonitor({option:w==null?void 0:w.highFrequencyWarning,targetLabel:we,isInPageScrollHook:()=>{var t;return Number((t=e[me])==null?0:t)>0}}),A=!0,j=!(u!=null&&u.deferSetData),M=!1,N=0,P,F,I,L=[],R=!(g in e),z=0,B=!1,V,H,U,W,Te=()=>{!z&&!P&&!H&&(B=!1,V=void 0)},Ee=()=>{z||P||(B?W==null||W(V):U==null||U(),H=void 0,U=void 0,W=void 0)},De=()=>{R&&(z+=1)},G=(e=`committed`,t)=>{R&&!M&&(e===`failed`&&!B&&(B=!0,V=t),--z,Ee())},Oe=e=>G(`failed`,e);R&&Object.defineProperty(e,g,{configurable:!0,enumerable:!1,get:()=>!z&&!P?B?Promise.reject(V):void 0:(H!=null||(H=new Promise((e,t)=>{U=e,W=t})),H)});let K=()=>{if(E){var t;(t=s.scopedSlots)==null||t.refresh(e,E)}},ke=()=>{if(M)return;let t=e.__wevuTemplateRefs;if(!s.templateRefs&&(!Array.isArray(t)||!t.length)){R&&G();return}o(`templateRefs`,`mountRuntimeInstance(template ref completion)`).schedule(e,R?G:void 0,e,R?Oe:void 0)},Ae=()=>{E&&(T==null||T.syncNativeOwnerId(e,E))},je=e=>{let t={settle:e,next:void 0};I?I.next=t:F=t,I=t},Me=(e,t,n)=>{let r=e,i=!0;for(;r;){let e=r.next;r.next=void 0,t===`failed`&&!i?r.settle(`abandoned`):r.settle(t,n),r=e,i=!1}},Ne=(t,n)=>{let r=N;De(),K(),d({invoke:n=>{let r=ue(e);if(!r){n();return}return ce(e,r,t,n)},completion:`callback`,settle:(e,t)=>{if(!(M||r!==N)){if(e!==`committed`){G(e,t),n(e,t);return}try{n(e,t)}catch(e){throw G(`failed`,e),e}ke()}}})},Pe=()=>{if(!P)return;let e=P,t=F,n=L;P=void 0,F=void 0,I=void 0,L=[],Ne(e,(e,r)=>{if(e===`committed`){try{for(let e of n)e()}finally{Me(t,e,r)}return}Me(t,e,r)})},Fe=()=>{let e=F;P=void 0,F=void 0,I=void 0,L=[],Me(e,`abandoned`),Ee()},Ie=e=>{Te(),P=ye(P,e)},q={setData(t,n){if(k==null||k(),!j||Ce&&!A){Ie(t),n&&L.push(n),K();return}K(),Te(),De();let r=ue(e);if(!r){try{n==null||n()}catch(e){throw G(`failed`,e),e}ke();return}let i=!0,a=!1,o=!1,s=!1,c=e=>{s||(s=!0,G(`failed`,e))},l=()=>{s||(s=!0,ke())},u=()=>{try{n==null||n()}catch(e){throw c(e),e}if(i){a=!0;return}o||l()},d;try{d=ce(e,r,t,u)}catch(e){throw c(e),e}return i=!1,o=!!(d&&typeof d.then==`function`),d&&typeof d.then==`function`?d.then(()=>{l()},e=>{throw c(e),e}):(a&&l(),d)},__wevu_dispatchSetData(e,t){if(k==null||k(),M){t(`abandoned`);return}if(!j||Ce&&!A){Ie(e),je(t),K();return}Te(),Ne(e,t)},__wevu_enableSetData(e=!1){if(j=!0,e){Fe();return}Pe()},__wevu_setVisibility(e){A=e,A&&j&&Pe()},__wevu_disposeSetData(){M||(M=!0,N+=1,P=void 0,F=void 0,I=void 0,L=[],z=0,B=!1,V=void 0,Ee(),R&&Reflect.deleteProperty(e,g))}};Object.defineProperty(q,"__wevu_reportSetDataError",{configurable:!0,enumerable:!1,value:t=>{i(e,`onError`,[t])},writable:!1}),Object.defineProperty(q,"__wevu_targetLabel",{configurable:!0,enumerable:!1,value:we,writable:!1});let J=e.properties;J&&typeof J==`object`&&Object.defineProperty(q,"__wevu_initialProps",{configurable:!0,enumerable:!1,value:J,writable:!1}),Array.isArray(u==null?void 0:u.snapshotOmitKeys)&&u.snapshotOmitKeys.length&&Object.defineProperty(q,"__wevu_snapshotOmitKeys",{configurable:!0,enumerable:!1,value:u.snapshotOmitKeys,writable:!1});let Le=be(e,u==null?void 0:u.snapshotOmitKeys);Le&&Object.keys(Le).length&&Object.defineProperty(q,"__wevu_initialSnapshot",{configurable:!0,enumerable:!1,value:Le,writable:!1}),E&&Object.defineProperty(q,"__wevu_initialState",{configurable:!0,enumerable:!1,value:{[_e]:E.ownerId},writable:!1}),(u!=null&&u.deferSetData||l||J&&typeof J==`object`&&Object.keys(J).length>0)&&Object.defineProperty(q,"__wevu_deferInitialSnapshot",{configurable:!0,enumerable:!1,value:!0,writable:!1});let Y=n.mount(q);oe(Y,e);let Re=(f=Y==null?void 0:Y.proxy)==null?{}:f,X=(p=Y==null?void 0:Y.state)==null?{}:p,ze=(m=Y==null?void 0:Y.setupState)==null?Object.create(null):m;X&&typeof X==`object`&&(se(X,Y),ae(X,e));let Be=(h=Y==null?void 0:Y.computed)==null?Object.create(null):h;if(!(Y!=null&&Y.methods))try{Y.methods=Object.create(null)}catch(e){}let Ve=(_=Y==null?void 0:Y.methods)==null?Object.create(null):_,He=(ge=Y==null?void 0:Y.watch)==null?(()=>te()):ge,Ue=(x=Y==null?void 0:Y.bindModel)==null?(()=>{}):x,Z={...Y==null?{}:Y,state:X,setupState:ze,proxy:Re,methods:Ve,computed:Be,watch:He,bindModel:Ue,snapshot:(S=Y==null?void 0:Y.snapshot)==null?(()=>Object.create(null)):S,unmount:(C=Y==null?void 0:Y.unmount)==null?(()=>{}):C};Object.defineProperty(Z,"__wevu_initialRuntimeSnapshot",{configurable:!0,enumerable:!1,value:b(X),writable:!1});let Q=Z,We={__wevu_flushSetupSnapshotSync:Y.__wevu_flushSetupSnapshotSync,__wevu_touchSetupMethodsVersion:Y.__wevu_touchSetupMethodsVersion,__wevu_trackSetupReactiveKey:Y.__wevu_trackSetupReactiveKey,__wevu_cloneDispatchedSnapshot:Y.__wevu_cloneDispatchedSnapshot,[he]:Y[he]};for(let[e,t]of Object.entries(We))t&&Object.defineProperty(Z,e,{configurable:!0,enumerable:!1,value:t,writable:!0});Object.defineProperty(e,v,{value:Z,configurable:!0,enumerable:!1,writable:!1}),e.__wevu=Z;let Ge=le(e,X);ee(X,Ge),E&&(T==null||T.attachMount(e,Z,E,!!(u!=null&&u.deferSetData))),Ae();let Ke=c?fe(Z,c,e,{deferMissingSourceBaseline:!!l}):[];if(Ke.length&&(e[ve]=Ke),l)try{var $;if(de({target:e,runtime:Y,runtimeWithDefaults:Z,runtimeState:X,runtimeProxy:Re,setup:l}),typeof(($=r())==null||($=$[pe])==null?void 0:$.trackWevuComponent)==`function`){var qe;let e={};for(let[n,r]of Object.entries((qe=Z.setupState)==null?{}:qe))t(r)&&(e[n]=b(r));y.set(Z,e)}if(!(u!=null&&u.deferSetData)){var Je;(Je=Q.__wevu_flushSetupSnapshotSync)==null||Je.call(Q)}u!=null&&u.deferSetData||K();for(let e of Ke)e.resume()}catch(t){try{D(e,{skipHooks:!0})}catch(e){}throw t}else if(!(u!=null&&u.deferSetData)&&e.properties&&typeof e.properties==`object`&&Object.keys(e.properties).length>0){var Ye;(Ye=Q.__wevu_flushSetupSnapshotSync)==null||Ye.call(Q),K()}return re(e,Y),Y}function S(e,t,n){for(let e of Reflect.ownKeys(t))if(!Reflect.has(n,e)){let n=Reflect.getOwnPropertyDescriptor(t,e);n!=null&&n.configurable&&Reflect.deleteProperty(t,e)}for(let e of Reflect.ownKeys(n)){let r=Reflect.getOwnPropertyDescriptor(n,e);if(r)try{Reflect.defineProperty(t,e,r)}catch(r){try{t[e]=n[e]}catch(e){}}}se(t.state,t);let r=y.get(n);return r&&y.set(t,r),e.__wevu=t,Object.defineProperty(e,v,{value:t,configurable:!0,enumerable:!1,writable:!1}),t}function C(e,r,i){let a=e.state,o=e.setupState,s={};for(let e of Object.keys(r==null?{}:r)){if(!Object.prototype.hasOwnProperty.call(a,e))continue;let r=o==null?void 0:o[e];if(!o||!Object.prototype.hasOwnProperty.call(o,e)||n(r)||t(r)){if(i&&Object.prototype.hasOwnProperty.call(i,e)){s[e]=b(i[e]);continue}s[e]=b(n(r)?r.value:a[e])}}return s}function w(e,r){var i;let a=e.__wevu,o=a==null?void 0:a.state,s=a==null?void 0:a.setupState,c=(i=r==null?void 0:r.nativeData)==null?e.data:i;if(!o||typeof o!=`object`||!c||typeof c!=`object`)return;let l=a==null?void 0:a.__wevu_initialRuntimeSnapshot;for(let[e,i]of Object.entries(c))if(e&&e!==`undefined`&&Object.prototype.hasOwnProperty.call(o,e))try{let a=s==null?void 0:s[e],c=b(i);if(s&&Object.prototype.hasOwnProperty.call(s,e)&&(!(r!=null&&r.includeSetupState)||!n(a)&&!t(a))||!(r!=null&&r.includeSetupState)&&l&&Object.prototype.hasOwnProperty.call(l,e)&&!u(o[e],l[e],20,{keys:1e4})||!(r!=null&&r.includeSetupState)&&l&&!Object.prototype.hasOwnProperty.call(l,e))continue;if(n(a)){a.value=c;continue}if(t(a)&&c&&typeof c==`object`){var d;f(a,c,r==null||(d=r.initialSetupState)==null?void 0:d[e]);continue}o[e]=c}catch(e){}}function T(e,t){var n,r,i,a;let o=(n=e.__wevu)==null?void 0:n.adapter;w(e,{includeSetupState:t==null?void 0:t.rehydrateSetupState}),o==null||(r=o.__wevu_enableSetData)==null||r.call(o,!0),(i=e.__wevu)==null||(a=i.__wevu_flushSetupSnapshotSync)==null||a.call(i)}function E(e,t){var n,r;let i=(n=e.__wevu)==null?void 0:n.adapter;i==null||(r=i.__wevu_setVisibility)==null||r.call(i,t)}function D(t,n){let r=t.__wevu,a=t[ve],l=t[p];c([()=>{var a;if(!(n!=null&&n.skipHooks)&&r&&(a=t[h])!=null&&a[_]){if(l!=null&&l.active)l.run(()=>i(t,_));else{let n=e(!0);c([()=>n.run(()=>i(t,_)),()=>n.stop()])}}},()=>{var e;return(e=s.scopedSlots)==null?void 0:e.teardown(t)},()=>{Array.isArray(t.__wevuTemplateRefs)&&t.__wevuTemplateRefs.length>0&&o(`templateRefs`,`teardownRuntimeInstance(template refs)`).clear(t)},()=>{!(n!=null&&n.skipHooks)&&r&&t[h]&&i(t,`onUnload`,[])},()=>{t[h]&&(t[h]=void 0)},()=>{if(Array.isArray(a))for(let e of a)try{e()}catch(e){}},()=>{t[ve]=void 0},()=>{l==null||l.stop()},()=>{t[p]=void 0},()=>r==null?void 0:r.unmount(),()=>{var e;let t=r==null?void 0:r.adapter;t==null||(e=t.__wevu_disposeSetData)==null||e.call(t)},()=>{delete t[ge],delete t[m]},()=>{delete t.__wevu},()=>{v in t&&delete t[v]}])}function O(e,t,n,r,i){let a=e.__wevu,o=a?y.get(a):void 0,s=a?C(a,e.data,i==null?void 0:i.stateSnapshot):void 0;D(e,{skipHooks:!0});let c=x(e,t,n,r,{deferSetData:!0,snapshotOmitKeys:i==null?void 0:i.snapshotOmitKeys}),l=s==null?i!=null&&i.stateSnapshot?C(c,i.stateSnapshot,i.stateSnapshot):void 0:s;if(l){let t=e.data;t&&typeof t==`object`&&Object.assign(t,b(l)),w(e,{includeSetupState:!0,nativeData:l,initialSetupState:o})}return!a||a===c?c:S(e,a,c)}export{T as enableDeferredSetData,x as mountRuntimeInstance,O as refreshRuntimeInstance,E as setRuntimeSetDataVisibility,D as teardownRuntimeInstance};
@@ -6,6 +6,5 @@ type SetupRunner = {
6
6
  * 执行 setup 函数并注入运行时上下文(框架内部使用)。
7
7
  * @internal
8
8
  */
9
- declare function runSetupFunction(setup: SetupRunner | undefined, props: Record<string, any>, context: any): unknown;
10
- //#endregion
11
- export { runSetupFunction };
9
+ export declare function runSetupFunction(setup: SetupRunner | undefined, props: Record<string, any>, context: any): unknown;
10
+ //#endregion
@@ -1 +1 @@
1
- import{mergeOwnerSnapshotProps as e,updateOwnerSnapshot as t}from"../scopedSlots.mjs";import{WEVU_PROPS_KEY as n,WEVU_SLOT_OWNER_ID_KEY as r}from"@weapp-core/constants";function i(i){var a;let o=i.__wevu,s=i[r];if(!o||!s||typeof o.snapshot!=`function`)return;let c=o.snapshot(),l=(a=i[n])==null?i.properties:a;e(c,l),t(s,c,o.proxy,i)}export{i as refreshOwnerSnapshotFromInstance};
1
+ import{getScopedSlotMountState as e,runtimeCapabilityRegistry as t}from"../capabilities.mjs";function n(n){let r=e(n);if(r){var i;(i=t.scopedSlots)==null||i.refresh(n,r)}}export{n as refreshOwnerSnapshotFromInstance};
@@ -2,11 +2,10 @@ import "../../reactivity/index.mjs";
2
2
  import "../types.mjs";
3
3
  //#region src/runtime/register/watch.d.ts
4
4
  type WatchHandler = (this: any, value: any, oldValue: any) => void;
5
- type WatchDescriptor = WatchHandler | string | {
5
+ export type WatchDescriptor = WatchHandler | string | {
6
6
  handler: WatchHandler | string;
7
7
  immediate?: boolean;
8
8
  deep?: boolean;
9
9
  };
10
- type WatchMap = Record<string, WatchDescriptor>;
11
- //#endregion
12
- export { WatchDescriptor, WatchMap };
10
+ export type WatchMap = Record<string, WatchDescriptor>;
11
+ //#endregion
@@ -1 +1 @@
1
- import{getScopedSlotHostGlobalObject as e}from"./platform.mjs";import{isDeepEqualValue as t}from"./app/setData/snapshot.mjs";import{WEVU_PROPS_KEY as n,WEVU_RUNTIME_OWNER_ID_KEY as r,WEVU_SCOPED_SLOT_OWNER_SEED_KEY as i,WEVU_SCOPED_SLOT_OWNER_STORE_KEY as a,WEVU_SLOT_OWNER_ID_KEY as o,WEVU_SLOT_OWNER_ID_PROP as s,WEVU_SLOT_OWNER_KEY as c,WEVU_SLOT_OWNER_PROXY_KEY as l,WEVU_SLOT_PROPS_DATA_KEY as u,WEVU_SLOT_PROPS_KEY as d,WEVU_SLOT_SCOPE_KEY as f}from"@weapp-core/constants";function p(){var t;let n=(t=e())==null?Object.create(null):t;return n[a]instanceof Map||(n[a]=new Map),typeof n[i]!=`number`&&(n[i]=0),{globalObject:n,ownerStore:n[a]}}function m(){let{globalObject:e}=p();return e[i]+=1,`wv${e[i]}`}function h(e,n,r,i){var a;let{ownerStore:o}=p(),s=(a=o.get(e))==null?{snapshot:{},proxy:r,subscribers:new Set}:a,c=!t(s.snapshot,n,20,{keys:1e4}),l=s.proxy!==r;if(s.snapshot=n,s.proxy=r,s.target=i==null?s.target:i,o.set(e,s),(c||l)&&s.subscribers.size)for(let e of s.subscribers)try{e(n,r)}catch(e){}}function g(e){let{ownerStore:t}=p();t.delete(e)}function _(e,t){var n;let{ownerStore:r}=p(),i=(n=r.get(e))==null?{snapshot:{},proxy:void 0,subscribers:new Set}:n;return i.subscribers.add(t),r.set(e,i),()=>{let n=r.get(e);n&&n.subscribers.delete(t)}}function v(e){var t;let{ownerStore:n}=p();return(t=n.get(e))==null?void 0:t.proxy}function y(e){var t;let{ownerStore:n}=p();return(t=n.get(e))==null?void 0:t.snapshot}function b(e){var t;let{ownerStore:n}=p();return(t=n.get(e))==null?void 0:t.target}function x(e){let t=e.__wevu_cloneLatestSnapshot;return typeof t==`function`?t():typeof e.snapshot==`function`?e.snapshot():{}}const S=new Set([o,s,c,l,u,d,f]);function C(e,t){if(t&&typeof t==`object`)for(let[n,r]of Object.entries(t))S.has(n)||(e[n]=r)}function w(e,t,i,a){var s;try{e[r]=i}catch(e){}try{t.state[o]=i}catch(e){}try{e[o]=i}catch(e){}try{let t=e.data;t&&typeof t==`object`&&(t[o]=i)}catch(e){}let c=a!=null&&a.deferSnapshot?{}:x(t);C(c,(s=e[n])==null?e.properties:s),h(i,c,t.proxy,e)}export{m as allocateOwnerId,w as attachOwnerSnapshot,v as getOwnerProxy,y as getOwnerSnapshot,b as getOwnerTarget,C as mergeOwnerSnapshotProps,g as removeOwner,x as resolveOwnerSnapshot,_ as subscribeOwner,h as updateOwnerSnapshot};
1
+ import{getScopedSlotHostGlobalObject as e}from"./platform.mjs";import{isDeepEqualValue as t}from"./app/setData/snapshot.mjs";import{WEVU_PROPS_KEY as n,WEVU_RUNTIME_OWNER_ID_KEY as r,WEVU_SCOPED_SLOT_OWNER_SEED_KEY as i,WEVU_SCOPED_SLOT_OWNER_STORE_KEY as a,WEVU_SLOT_OWNER_ID_KEY as o,WEVU_SLOT_OWNER_ID_PROP as s,WEVU_SLOT_OWNER_KEY as c,WEVU_SLOT_OWNER_PROXY_KEY as l,WEVU_SLOT_PROPS_DATA_KEY as u,WEVU_SLOT_PROPS_KEY as d,WEVU_SLOT_SCOPE_KEY as f}from"@weapp-core/constants";function p(){var t;let n=(t=e())==null?Object.create(null):t;return n[a]instanceof Map||(n[a]=new Map),typeof n[i]!=`number`&&(n[i]=0),{globalObject:n,ownerStore:n[a]}}function m(){let{globalObject:e}=p();return e[i]+=1,`wv${e[i]}`}function h(e,n,r,i){var a;let{ownerStore:o}=p(),s=(a=o.get(e))==null?{snapshot:{},proxy:r,subscribers:new Set}:a,c=!t(s.snapshot,n,20,{keys:1e4}),l=s.proxy!==r;if(s.snapshot=n,s.proxy=r,s.target=i==null?s.target:i,o.set(e,s),(c||l)&&s.subscribers.size)for(let e of s.subscribers)try{e(n,r)}catch(e){}}function g(e){let{ownerStore:t}=p();t.delete(e)}function _(e,t){var n;let{ownerStore:r}=p(),i=(n=r.get(e))==null?{snapshot:{},proxy:void 0,subscribers:new Set}:n;return i.subscribers.add(t),r.set(e,i),()=>{let n=r.get(e);n&&n.subscribers.delete(t)}}function v(e){var t;let{ownerStore:n}=p();return(t=n.get(e))==null?void 0:t.proxy}function y(e){var t;let{ownerStore:n}=p();return(t=n.get(e))==null?void 0:t.snapshot}function b(e){var t;let{ownerStore:n}=p();return(t=n.get(e))==null?void 0:t.target}function x(e){let t=e.__wevu_cloneDispatchedSnapshot;return typeof t==`function`?t():typeof e.snapshot==`function`?e.snapshot():{}}const S=new Set([o,s,c,l,u,d,f]);function C(e,t){if(t&&typeof t==`object`)for(let[n,r]of Object.entries(t))S.has(n)||(e[n]=r)}function w(e,t,i,a){var s;try{e[r]=i}catch(e){}try{t.state[o]=i}catch(e){}try{e[o]=i}catch(e){}try{let t=e.data;t&&typeof t==`object`&&(t[o]=i)}catch(e){}let c=a!=null&&a.deferSnapshot?{}:x(t);C(c,(s=e[n])==null?e.properties:s),h(i,c,t.proxy,e)}export{m as allocateOwnerId,w as attachOwnerSnapshot,v as getOwnerProxy,y as getOwnerSnapshot,b as getOwnerTarget,C as mergeOwnerSnapshotProps,g as removeOwner,x as resolveOwnerSnapshot,_ as subscribeOwner,h as updateOwnerSnapshot};
@@ -2,53 +2,52 @@ import { HostMiniProgramBoundingClientRectResult, HostMiniProgramNodesRefFields,
2
2
  import { InternalRuntimeState } from "./types/runtime.mjs";
3
3
  import "./types.mjs";
4
4
  //#region src/runtime/selectorQuery.d.ts
5
- interface UseSelectorQueryOptions {
5
+ export interface UseSelectorQueryOptions {
6
6
  context?: InternalRuntimeState | null;
7
7
  }
8
- interface UseBoundingClientRectOptions extends UseSelectorQueryOptions {
8
+ export interface UseBoundingClientRectOptions extends UseSelectorQueryOptions {
9
9
  all?: boolean;
10
10
  }
11
- interface UseSelectorFieldsOptions extends UseSelectorQueryOptions {
11
+ export interface UseSelectorFieldsOptions extends UseSelectorQueryOptions {
12
12
  all?: boolean;
13
13
  fields: HostMiniProgramNodesRefFields;
14
14
  }
15
- interface UseScrollOffsetOptions extends UseSelectorQueryOptions {
15
+ export interface UseScrollOffsetOptions extends UseSelectorQueryOptions {
16
16
  all?: boolean;
17
17
  }
18
- interface UseAllBoundingClientRectOptions extends UseSelectorQueryOptions {
18
+ export interface UseAllBoundingClientRectOptions extends UseSelectorQueryOptions {
19
19
  all: true;
20
20
  }
21
- interface UseAllSelectorFieldsOptions extends UseSelectorQueryOptions {
21
+ export interface UseAllSelectorFieldsOptions extends UseSelectorQueryOptions {
22
22
  all: true;
23
23
  fields: HostMiniProgramNodesRefFields;
24
24
  }
25
- interface UseAllScrollOffsetOptions extends UseSelectorQueryOptions {
25
+ export interface UseAllScrollOffsetOptions extends UseSelectorQueryOptions {
26
26
  all: true;
27
27
  }
28
28
  /**
29
29
  * 创建绑定当前小程序实例的选择器查询工厂。
30
30
  */
31
- declare function useSelectorQuery(options?: UseSelectorQueryOptions): () => HostMiniProgramSelectorQuery | null;
31
+ export declare function useSelectorQuery(options?: UseSelectorQueryOptions): () => HostMiniProgramSelectorQuery | null;
32
32
  /**
33
33
  * 创建绑定当前小程序实例的节点布局查询函数。
34
34
  */
35
- declare function useBoundingClientRect(options?: UseBoundingClientRectOptions & {
35
+ export declare function useBoundingClientRect(options?: UseBoundingClientRectOptions & {
36
36
  all?: false;
37
37
  }): (selector: string) => Promise<HostMiniProgramBoundingClientRectResult | null>;
38
- declare function useBoundingClientRect(options: UseAllBoundingClientRectOptions): (selector: string) => Promise<HostMiniProgramBoundingClientRectResult[] | null>;
38
+ export declare function useBoundingClientRect(options: UseAllBoundingClientRectOptions): (selector: string) => Promise<HostMiniProgramBoundingClientRectResult[] | null>;
39
39
  /**
40
40
  * 创建绑定当前小程序实例的节点字段查询函数。
41
41
  */
42
- declare function useSelectorFields(options: UseSelectorFieldsOptions & {
42
+ export declare function useSelectorFields(options: UseSelectorFieldsOptions & {
43
43
  all?: false;
44
44
  }): (selector: string) => Promise<Record<string, any> | null>;
45
- declare function useSelectorFields(options: UseAllSelectorFieldsOptions): (selector: string) => Promise<Array<Record<string, any>> | null>;
45
+ export declare function useSelectorFields(options: UseAllSelectorFieldsOptions): (selector: string) => Promise<Array<Record<string, any>> | null>;
46
46
  /**
47
47
  * 创建绑定当前小程序实例的滚动位置查询函数。
48
48
  */
49
- declare function useScrollOffset(options?: UseScrollOffsetOptions & {
49
+ export declare function useScrollOffset(options?: UseScrollOffsetOptions & {
50
50
  all?: false;
51
51
  }): (selector: string) => Promise<HostMiniProgramScrollOffsetResult | null>;
52
- declare function useScrollOffset(options: UseAllScrollOffsetOptions): (selector: string) => Promise<HostMiniProgramScrollOffsetResult[] | null>;
53
- //#endregion
54
- export { UseAllBoundingClientRectOptions, UseAllScrollOffsetOptions, UseAllSelectorFieldsOptions, UseBoundingClientRectOptions, UseScrollOffsetOptions, UseSelectorFieldsOptions, UseSelectorQueryOptions, useBoundingClientRect, useScrollOffset, useSelectorFields, useSelectorQuery };
52
+ export declare function useScrollOffset(options: UseAllScrollOffsetOptions): (selector: string) => Promise<HostMiniProgramScrollOffsetResult[] | null>;
53
+ //#endregion
@@ -1 +1 @@
1
- import{getCurrentInstance as e,getCurrentSetupContext as t}from"./hooks/base.mjs";import{createSelectorQuery as n}from"./templateRefs/helpers.mjs";function r(n,r){let i=r==null?e():r;if(!i||!t())throw Error(`${n}() 必须在 setup() 的同步阶段调用`);return i}function i(e,t,r,i){let a=n(e);return!a||!t?Promise.resolve(null):(i(r?a.selectAll(t):a.select(t)),new Promise(e=>{a.exec(t=>{let n=Array.isArray(t)?t[0]:null;e(n==null?null:n)})}))}function a(e={}){let t=r(`useSelectorQuery`,e.context);return()=>n(t)}function o(e={}){var t;let n=r(`useBoundingClientRect`,e.context),a=(t=e.all)!=null&&t;return e=>i(n,e,a,e=>e.boundingClientRect())}function s(e){var t;let n=r(`useSelectorFields`,e.context),a=(t=e.all)!=null&&t;return t=>i(n,t,a,t=>t.fields(e.fields))}function c(e={}){var t;let n=r(`useScrollOffset`,e.context),a=(t=e.all)!=null&&t;return e=>i(n,e,a,e=>e.scrollOffset())}export{o as useBoundingClientRect,c as useScrollOffset,s as useSelectorFields,a as useSelectorQuery};
1
+ import{getCurrentInstance as e,getCurrentSetupContext as t}from"./hooks/base.mjs";import{createSelectorQuery as n}from"./templateRefs/helpers.mjs";import{installTemplateRefs as r}from"./features/templateRefs.mjs";function i(n,r){let i=r==null?e():r;if(!i||!t())throw Error(`${n}() 必须在 setup() 的同步阶段调用`);return i}function a(e,t,r,i){let a=n(e);return!a||!t?Promise.resolve(null):(i(r?a.selectAll(t):a.select(t)),new Promise(e=>{a.exec(t=>{let n=Array.isArray(t)?t[0]:null;e(n==null?null:n)})}))}function o(e={}){r();let t=i(`useSelectorQuery`,e.context);return()=>n(t)}function s(e={}){var t;r();let n=i(`useBoundingClientRect`,e.context),o=(t=e.all)!=null&&t;return e=>a(n,e,o,e=>e.boundingClientRect())}function c(e){var t;r();let n=i(`useSelectorFields`,e.context),o=(t=e.all)!=null&&t;return t=>a(n,t,o,t=>t.fields(e.fields))}function l(e={}){var t;r();let n=i(`useScrollOffset`,e.context),o=(t=e.all)!=null&&t;return e=>a(n,e,o,e=>e.scrollOffset())}export{s as useBoundingClientRect,l as useScrollOffset,c as useSelectorFields,o as useSelectorQuery};
@@ -0,0 +1 @@
1
+ function e(e){let t,n=!1;for(let r of e)try{r()}catch(e){n||(t=e,n=!0)}if(n)throw t}export{e as runTeardownSteps};
@@ -1,6 +1,5 @@
1
1
  //#region src/runtime/template.d.ts
2
- declare function normalizeStyle(value: any): string;
3
- declare function normalizeClass(value: any): string;
4
- declare function resolvePropValue(target: any, key: string, fallback: any, preferProps?: boolean): any;
5
- //#endregion
6
- export { normalizeClass, normalizeStyle, resolvePropValue };
2
+ export declare function normalizeStyle(value: any): string;
3
+ export declare function normalizeClass(value: any): string;
4
+ export declare function resolvePropValue(target: any, key: string, fallback: any, preferProps?: boolean): any;
5
+ //#endregion
@@ -1,7 +1,11 @@
1
- import { MiniProgramIntrinsicElements } from "../weappIntrinsicElements.mjs";
1
+ import { AlipayIntrinsicElements } from "../alipayIntrinsicElements.mjs";
2
+ import { TtIntrinsicElements } from "../ttIntrinsicElements.mjs";
3
+ import { WeappIntrinsicElements } from "../weappIntrinsicElements.mjs";
2
4
  import { TemplateRefValue } from "./types.mjs";
3
5
  //#region src/runtime/templateRefTypes.d.ts
4
- type MiniProgramTemplateRefElements = { [K in keyof MiniProgramIntrinsicElements]: TemplateRefValue; };
6
+ type MiniProgramTemplateRefTagName = keyof AlipayIntrinsicElements | keyof TtIntrinsicElements | keyof WeappIntrinsicElements;
7
+ type MiniProgramTemplateRefElements = { [K in MiniProgramTemplateRefTagName]: TemplateRefValue; };
5
8
  declare global {
6
9
  interface HTMLElementTagNameMap extends MiniProgramTemplateRefElements {}
7
- }
10
+ }
11
+ //#endregion
@@ -1 +1 @@
1
- import{nextTick as e}from"../scheduler.mjs";import{markNoSetData as t}from"./noSetData.mjs";import{buildTemplateRefValue as n,createSelectorQuery as r,ensureRefsContainer as i,getTemplateRefMap as a,isComponentRef as o,resolveComponentRefValue as s,resolveTemplateRefTarget as c,updateTemplateRefMapValue as l}from"./templateRefs/helpers.mjs";import{WEVU_READY_CALLED_KEY as u,WEVU_TEMPLATE_REFS_CALLBACKS_KEY as d,WEVU_TEMPLATE_REFS_KEY as f,WEVU_TEMPLATE_REFS_PENDING_KEY as p}from"@weapp-core/constants";function m(e,d,p=e){let m=e[f];if(!m||!m.length){d==null||d();return}if(!e[u]){d==null||d();return}if(!e.__wevu){d==null||d();return}let h=a(p),g=m.filter(e=>!o(e)),_=m.filter(e=>o(e)).map(t=>({binding:t,value:s(e,t)})),v=n=>{var r,a;let o=i(p),s=new Map,u=new Set,f=(r=(a=e.__wevu)==null?void 0:a.proxy)==null?e:r;n.forEach(t=>{let n=t.binding,r=t.value,i=c(p,n,e);if(i.type===`function`){n.inFor&&Array.isArray(r)?r.length?r.forEach(e=>i.fn.call(f,e)):i.fn.call(f,null):i.fn.call(f,r==null?null:r);return}if(i.type===`ref`){i.ref.value=r;return}if(i.type===`name`){var a;u.add(i.name);let e=(a=s.get(i.name))==null?{values:[],count:0,hasFor:!1}:a;e.count+=1,e.hasFor=e.hasFor||n.inFor,n.inFor?Array.isArray(r)&&e.values.push(...r):r!=null&&e.values.push(r),s.set(i.name,e)}});for(let[e,n]of s){let r;r=n.values.length?n.hasFor||n.values.length>1||n.count>1?t(n.values):n.values[0]:n.hasFor?t([]):null,o[e]=r,l(h,e,r)}for(let e of Object.keys(o))u.has(e)||delete o[e];d==null||d()};if(!g.length){v(_);return}let y=r(e);if(!y){v(_);return}let b=[];for(let e of g)(e.inFor?y.selectAll(e.selector):y.select(e.selector)).boundingClientRect(),b.push({binding:e});y.exec(t=>{let r=b.map((r,i)=>{let a=Array.isArray(t)?t[i]:null;return{binding:r.binding,value:n(e,r.binding,a)}});v([..._,...r])})}function h(t,n,r=t){let i=t[f];if(!i||!i.length){n==null||n();return}if(n){var a;let e=(a=t[d])==null?[]:a;e.push(n),t[d]||Object.defineProperty(t,d,{value:e,configurable:!0,enumerable:!1,writable:!0})}t[p]||(t[p]=!0,e(()=>{t[p]=!1,m(t,()=>{let e=t[d];e&&e.length&&e.splice(0).forEach(e=>{try{e()}catch(e){}})},r)}))}function g(e,n=e){var r,o;let s=e[f];if(!s||!s.length)return;let u=i(n),d=(r=(o=e.__wevu)==null?void 0:o.proxy)==null?e:r,p=new Set,m=a(n);for(let r of s){let i=c(n,r,e),a=r.inFor?t([]):null;if(i.type===`function`){i.fn.call(d,null);continue}if(i.type===`ref`){i.ref.value=a;continue}i.type===`name`&&(p.add(i.name),u[i.name]=a,l(m,i.name,a))}for(let e of Object.keys(u))p.has(e)||delete u[e]}export{g as clearTemplateRefs,h as scheduleTemplateRefUpdate,m as updateTemplateRefs};
1
+ import{nextTick as e}from"../scheduler.mjs";import{markNoSetData as t}from"./noSetData.mjs";import{buildTemplateRefValue as n,createSelectorQuery as r,ensureRefsContainer as i,getTemplateRefMap as a,isComponentRef as o,resolveComponentRefValue as s,resolveTemplateRefTarget as c,updateTemplateRefMapValue as l}from"./templateRefs/helpers.mjs";import{runTeardownSteps as u}from"./teardown.mjs";import{WEVU_READY_CALLED_KEY as d,WEVU_TEMPLATE_REFS_KEY as f,WEVU_TEMPLATE_REFS_PENDING_KEY as p}from"@weapp-core/constants";const m=new WeakMap;function h(e){let t=m.get(e);return t||(t={generation:0},m.set(e,t)),t}function g(e,t){let n=h(e),r=h(t),i={target:e,assignmentTarget:t,runtime:e.__wevu,assignmentRuntime:t.__wevu,owner:n,assignmentOwner:r,assignmentGeneration:r.generation,completions:[],settled:!1};return n.current=i,i}function _(e){return!e.settled&&e.owner.current===e&&e.target.__wevu===e.runtime&&e.assignmentTarget.__wevu===e.assignmentRuntime&&e.assignmentOwner.generation===e.assignmentGeneration}function v(e,t=!1,n){if(e.settled)return;e.settled=!0,e.owner.current===e&&(e.owner.current=void 0);let r=t&&!e.completions.length,i=n;for(let o of e.completions)try{if(t)o.onRejected?o.onRejected(n):r||(r=!0,i=n);else{var a;(a=o.onResolved)==null||a.call(o)}}catch(e){r||(r=!0,i=e)}if(e.completions.length=0,r)throw i}function y(e){let{target:u,assignmentTarget:p}=e;try{let m=u[f];if(!_(e)||!(m!=null&&m.length)||!u[d]||!u.__wevu){v(e);return}let h=a(p),g=m.filter(e=>!o(e)),y=m.filter(e=>o(e)).map(e=>({binding:e,value:s(u,e)})),b=n=>{var r,a;if(!_(e))return;let o=i(p),s=new Map,d=new Set,f=(r=(a=e.runtime)==null?void 0:a.proxy)==null?u:r;for(let{binding:t,value:r}of n){if(!_(e))return;let n=c(p,t,u);if(!_(e))return;if(n.type===`function`){if(t.inFor&&Array.isArray(r)&&r.length)for(let t of r){if(!_(e))return;n.fn.call(f,t)}else n.fn.call(f,t.inFor&&Array.isArray(r)||r==null?null:r);continue}if(n.type===`ref`){n.ref.value=r;continue}if(n.type===`name`){var m;d.add(n.name);let e=(m=s.get(n.name))==null?{values:[],count:0,hasFor:!1}:m;e.count+=1,e.hasFor=e.hasFor||t.inFor,t.inFor?Array.isArray(r)&&e.values.push(...r):r!=null&&e.values.push(r),s.set(n.name,e)}}for(let[n,r]of s){if(!_(e))return;let i;if(i=r.values.length?r.hasFor||r.values.length>1||r.count>1?t(r.values):r.values[0]:r.hasFor?t([]):null,o[n]=i,!_(e))return;l(h,n,i)}for(let t of Object.keys(o)){if(!_(e))return;d.has(t)||delete o[t]}},x=g.length?r(u):null;if(!x){b(y),v(e);return}for(let e of g)(e.inFor?x.selectAll(e.selector):x.select(e.selector)).boundingClientRect();x.exec(t=>{if(!e.settled){try{if(_(e)){let e=g.map((e,r)=>({binding:e,value:n(u,e,Array.isArray(t)?t[r]:null)}));b([...y,...e])}}catch(t){v(e,!0,t);return}v(e)}})}catch(t){if(e.settled)throw t;v(e,!0,t)}}function b(e,t){let n=m.get(e);n&&(n.current=void 0),t==null||t()}function x(t,n,r=t,i){let a=t[f];if(!(a!=null&&a.length)){b(t,n);return}let o=h(t),s=o.pending;if(s&&s.assignmentTarget===r&&_(s)){(n||i)&&s.completions.push({onResolved:n,onRejected:i});return}let c=g(t,r);(n||i)&&c.completions.push({onResolved:n,onRejected:i}),o.pending=c,t[p]=!0,e(()=>{o.pending===c&&(o.pending=void 0,t[p]=!1),y(c)})}function S(e,n=e){var r,o;let s=m.get(e);s&&(s.generation+=1,s.current=void 0,s.pending=void 0,e[p]=!1);let d=e[f];if(!d||!d.length)return;let h=i(n),g=(r=(o=e.__wevu)==null?void 0:o.proxy)==null?e:r,_=new Set,v=a(n);u([...d.map(r=>()=>{let i=c(n,r,e),a=r.inFor?t([]):null;if(i.type===`function`){i.fn.call(g,null);return}if(i.type===`ref`){i.ref.value=a;return}i.type===`name`&&(_.add(i.name),h[i.name]=a,l(v,i.name,a))}),()=>{for(let e of Object.keys(h))_.has(e)||delete h[e]}])}export{S as clearTemplateRefs,x as scheduleTemplateRefUpdate};
@@ -1,11 +1,11 @@
1
1
  import { ComputedGetter, WritableComputedOptions } from "../../reactivity/computed.mjs";
2
2
  import "../../reactivity/index.mjs";
3
3
  //#region src/runtime/types/core.d.ts
4
- type ComputedDefinitions = Record<string, ComputedGetter<any> | WritableComputedOptions<any>>;
5
- type MethodDefinitions = Record<string, (...args: any[]) => any>;
6
- type ExtractComputed<C extends ComputedDefinitions> = { [K in keyof C]: C[K] extends ComputedGetter<infer R> ? R : C[K] extends WritableComputedOptions<infer R> ? R : never; };
7
- type ExtractMethods<M extends MethodDefinitions> = { [K in keyof M]: M[K] extends ((...args: infer P) => infer R) ? (...args: P) => R : never; };
8
- type ComponentPublicInstance<D extends object = Record<string, any>, C extends ComputedDefinitions = ComputedDefinitions, M extends MethodDefinitions = MethodDefinitions, P = Record<string, any>, S = Record<string, any>> = D & ExtractComputed<C> & ExtractMethods<M> & {
4
+ export type ComputedDefinitions = Record<string, ComputedGetter<any> | WritableComputedOptions<any>>;
5
+ export type MethodDefinitions = Record<string, (...args: any[]) => any>;
6
+ export type ExtractComputed<C extends ComputedDefinitions> = { [K in keyof C]: C[K] extends ComputedGetter<infer R> ? R : C[K] extends WritableComputedOptions<infer R> ? R : never; };
7
+ export type ExtractMethods<M extends MethodDefinitions> = { [K in keyof M]: M[K] extends ((...args: infer P) => infer R) ? (...args: P) => R : never; };
8
+ export type ComponentPublicInstance<D extends object = Record<string, any>, C extends ComputedDefinitions = ComputedDefinitions, M extends MethodDefinitions = MethodDefinitions, P = Record<string, any>, S = Record<string, any>> = D & ExtractComputed<C> & ExtractMethods<M> & {
9
9
  $attrs: Record<string, any>;
10
10
  $props: P;
11
11
  $refs: Record<string, any>;
@@ -19,17 +19,16 @@ type ComponentPublicInstance<D extends object = Record<string, any>, C extends C
19
19
  };
20
20
  $parent?: ComponentPublicInstance;
21
21
  };
22
- interface ModelBindingOptions<T = any, Event extends string = string, ValueProp extends string = string, Formatted = T> {
22
+ export interface ModelBindingOptions<T = any, Event extends string = string, ValueProp extends string = string, Formatted = T> {
23
23
  event?: Event;
24
24
  valueProp?: ValueProp;
25
25
  parser?: (payload: any) => T;
26
26
  formatter?: (value: T) => Formatted;
27
27
  }
28
- type ModelBindingPayload<T = any, Event extends string = 'input', ValueProp extends string = 'value', Formatted = T> = { [K in ValueProp]: Formatted; } & { [K in `on${Capitalize<Event>}`]: (event: any) => void; };
29
- interface ModelBinding<T = any> {
28
+ export type ModelBindingPayload<T = any, Event extends string = 'input', ValueProp extends string = 'value', Formatted = T> = { [K in ValueProp]: Formatted; } & { [K in `on${Capitalize<Event>}`]: (event: any) => void; };
29
+ export interface ModelBinding<T = any> {
30
30
  value: T;
31
31
  update: (value: T) => void;
32
32
  model: <Event extends string = 'input', ValueProp extends string = 'value', Formatted = T>(options?: ModelBindingOptions<T, Event, ValueProp, Formatted>) => ModelBindingPayload<T, Event, ValueProp, Formatted>;
33
33
  }
34
- //#endregion
35
- export { ComponentPublicInstance, ComputedDefinitions, ExtractComputed, ExtractMethods, MethodDefinitions, ModelBinding, ModelBindingOptions, ModelBindingPayload };
34
+ //#endregion
@@ -1,13 +1,16 @@
1
1
  import { HostMiniProgramAddToFavoritesOption, HostMiniProgramAppOptions, HostMiniProgramAppTrivialInstance, HostMiniProgramBehaviorIdentifier, HostMiniProgramBoundingClientRectResult, HostMiniProgramComponentAllFullProperty, HostMiniProgramComponentAllProperty, HostMiniProgramComponentBehaviorOptions, HostMiniProgramComponentEmptyArray, HostMiniProgramComponentInstance, HostMiniProgramComponentMethodOption, HostMiniProgramComponentPropertyOption, HostMiniProgramComponentPropertyValue, HostMiniProgramComponentShortProperty, HostMiniProgramComponentTrivialInstance, HostMiniProgramComponentTrivialOption, HostMiniProgramIntersectionObserver, HostMiniProgramIntersectionObserverOptions, HostMiniProgramLaunchOptions, HostMiniProgramMemoryWarningResult, HostMiniProgramNavigateToOption, HostMiniProgramNodesRef, HostMiniProgramNodesRefFields, HostMiniProgramPageLifetime, HostMiniProgramPageNotFoundOptions, HostMiniProgramPageResizeOption, HostMiniProgramPageScrollOption, HostMiniProgramPageTrivialInstance, HostMiniProgramReLaunchOption, HostMiniProgramRedirectToOption, HostMiniProgramRouter, HostMiniProgramSaveExitState, HostMiniProgramScrollOffsetResult, HostMiniProgramSelectorQuery, HostMiniProgramShareAppMessageOption, HostMiniProgramSwitchTabOption, HostMiniProgramTabItemTapOption, HostMiniProgramThemeChangeResult, HostMiniProgramTriggerEventOptions, HostMiniProgramUnhandledRejectionResult } from "./miniprogramHost.mjs";
2
2
  //#region src/runtime/types/miniprogram.d.ts
3
- interface MiniProgramAdapter {
3
+ export interface MiniProgramAdapter {
4
+ /**
5
+ * 下发视图数据。返回 `void` 表示同步完成;异步适配器必须返回在宿主提交后兑现的 Promise。
6
+ */
4
7
  setData?: (payload: Record<string, any>) => void | Promise<void>;
5
8
  }
6
9
  type MpComponentOptions = HostMiniProgramComponentTrivialOption;
7
- type MiniProgramBehaviorIdentifier = HostMiniProgramBehaviorIdentifier | string;
8
- type MiniProgramComponentPropertyValue<TProperty extends HostMiniProgramComponentAllFullProperty> = HostMiniProgramComponentPropertyValue<TProperty>;
9
- type MiniProgramComponentInstance<D extends object, P extends HostMiniProgramComponentPropertyOption, M extends HostMiniProgramComponentMethodOption, B extends HostMiniProgramComponentEmptyArray = HostMiniProgramComponentEmptyArray> = HostMiniProgramComponentInstance<D, P, M, B>;
10
- interface MiniProgramComponentOptions {
10
+ export type MiniProgramBehaviorIdentifier = HostMiniProgramBehaviorIdentifier | string;
11
+ export type MiniProgramComponentPropertyValue<TProperty extends HostMiniProgramComponentAllFullProperty> = HostMiniProgramComponentPropertyValue<TProperty>;
12
+ export type MiniProgramComponentInstance<D extends object, P extends HostMiniProgramComponentPropertyOption, M extends HostMiniProgramComponentMethodOption, B extends HostMiniProgramComponentEmptyArray = HostMiniProgramComponentEmptyArray> = HostMiniProgramComponentInstance<D, P, M, B>;
13
+ export interface MiniProgramComponentOptions {
11
14
  /**
12
15
  * 类似于 mixins/traits 的组件间代码复用机制(behaviors)。
13
16
  */
@@ -70,11 +73,11 @@ interface MiniProgramComponentOptions {
70
73
  detached?: MpComponentOptions['detached'];
71
74
  error?: MpComponentOptions['error'];
72
75
  }
73
- type MiniProgramAppOptions<T extends Record<string, any> = Record<string, any>> = HostMiniProgramAppOptions<T>;
74
- type MiniProgramInstance = HostMiniProgramComponentTrivialInstance | HostMiniProgramPageTrivialInstance | HostMiniProgramAppTrivialInstance;
75
- type MiniProgramPageLifetimes = Partial<HostMiniProgramPageLifetime>;
76
- type MiniProgramComponentRawOptions = Omit<HostMiniProgramComponentTrivialOption, 'behaviors'> & {
76
+ export type MiniProgramAppOptions<T extends Record<string, any> = Record<string, any>> = HostMiniProgramAppOptions<T>;
77
+ export type MiniProgramInstance = HostMiniProgramComponentTrivialInstance | HostMiniProgramPageTrivialInstance | HostMiniProgramAppTrivialInstance;
78
+ export type MiniProgramPageLifetimes = Partial<HostMiniProgramPageLifetime>;
79
+ export type MiniProgramComponentRawOptions = Omit<HostMiniProgramComponentTrivialOption, 'behaviors'> & {
77
80
  behaviors?: MiniProgramBehaviorIdentifier[];
78
81
  } & MiniProgramPageLifetimes & Record<string, any>;
79
82
  //#endregion
80
- export { MiniProgramAdapter, type HostMiniProgramAddToFavoritesOption as MiniProgramAddToFavoritesOption, MiniProgramAppOptions, MiniProgramBehaviorIdentifier, type HostMiniProgramBoundingClientRectResult as MiniProgramBoundingClientRectResult, type HostMiniProgramComponentAllFullProperty as MiniProgramComponentAllFullProperty, type HostMiniProgramComponentAllProperty as MiniProgramComponentAllProperty, type HostMiniProgramComponentBehaviorOptions as MiniProgramComponentBehaviorOptions, type HostMiniProgramComponentEmptyArray as MiniProgramComponentEmptyArray, MiniProgramComponentInstance, type HostMiniProgramComponentMethodOption as MiniProgramComponentMethodOption, MiniProgramComponentOptions, type HostMiniProgramComponentPropertyOption as MiniProgramComponentPropertyOption, MiniProgramComponentPropertyValue, MiniProgramComponentRawOptions, type HostMiniProgramComponentShortProperty as MiniProgramComponentShortProperty, 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, MiniProgramPageLifetimes, type HostMiniProgramPageNotFoundOptions as MiniProgramPageNotFoundOptions, type HostMiniProgramPageResizeOption as MiniProgramPageResizeOption, type HostMiniProgramPageScrollOption as MiniProgramPageScrollOption, type HostMiniProgramReLaunchOption as MiniProgramReLaunchOption, type HostMiniProgramRedirectToOption as MiniProgramRedirectToOption, type HostMiniProgramRouter as MiniProgramRouter, type HostMiniProgramSaveExitState as MiniProgramSaveExitState, type HostMiniProgramScrollOffsetResult as MiniProgramScrollOffsetResult, type HostMiniProgramSelectorQuery as MiniProgramSelectorQuery, type HostMiniProgramShareAppMessageOption as MiniProgramShareAppMessageOption, type HostMiniProgramSwitchTabOption as MiniProgramSwitchTabOption, type HostMiniProgramTabItemTapOption as MiniProgramTabItemTapOption, type HostMiniProgramThemeChangeResult as MiniProgramThemeChangeResult, type HostMiniProgramUnhandledRejectionResult as MiniProgramUnhandledRejectionResult, type HostMiniProgramTriggerEventOptions as TriggerEventOptions };
83
+ export type { HostMiniProgramAddToFavoritesOption as MiniProgramAddToFavoritesOption, HostMiniProgramBoundingClientRectResult as MiniProgramBoundingClientRectResult, HostMiniProgramComponentAllFullProperty as MiniProgramComponentAllFullProperty, HostMiniProgramComponentAllProperty as MiniProgramComponentAllProperty, HostMiniProgramComponentBehaviorOptions as MiniProgramComponentBehaviorOptions, HostMiniProgramComponentEmptyArray as MiniProgramComponentEmptyArray, HostMiniProgramComponentMethodOption as MiniProgramComponentMethodOption, HostMiniProgramComponentPropertyOption as MiniProgramComponentPropertyOption, HostMiniProgramComponentShortProperty as MiniProgramComponentShortProperty, HostMiniProgramIntersectionObserver as MiniProgramIntersectionObserver, HostMiniProgramIntersectionObserverOptions as MiniProgramIntersectionObserverOptions, HostMiniProgramLaunchOptions as MiniProgramLaunchOptions, HostMiniProgramMemoryWarningResult as MiniProgramMemoryWarningResult, HostMiniProgramNavigateToOption as MiniProgramNavigateToOption, HostMiniProgramNodesRef as MiniProgramNodesRef, HostMiniProgramNodesRefFields as MiniProgramNodesRefFields, HostMiniProgramPageLifetime as MiniProgramPageLifetime, HostMiniProgramPageNotFoundOptions as MiniProgramPageNotFoundOptions, HostMiniProgramPageResizeOption as MiniProgramPageResizeOption, HostMiniProgramPageScrollOption as MiniProgramPageScrollOption, HostMiniProgramReLaunchOption as MiniProgramReLaunchOption, HostMiniProgramRedirectToOption as MiniProgramRedirectToOption, HostMiniProgramRouter as MiniProgramRouter, HostMiniProgramSaveExitState as MiniProgramSaveExitState, HostMiniProgramScrollOffsetResult as MiniProgramScrollOffsetResult, HostMiniProgramSelectorQuery as MiniProgramSelectorQuery, HostMiniProgramShareAppMessageOption as MiniProgramShareAppMessageOption, HostMiniProgramSwitchTabOption as MiniProgramSwitchTabOption, HostMiniProgramTabItemTapOption as MiniProgramTabItemTapOption, HostMiniProgramThemeChangeResult as MiniProgramThemeChangeResult, HostMiniProgramUnhandledRejectionResult as MiniProgramUnhandledRejectionResult, HostMiniProgramTriggerEventOptions as TriggerEventOptions };