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
@@ -0,0 +1,31 @@
1
+ //#region src/runtime/disposables.d.ts
2
+ export type DisposableMethodName = 'dispose' | 'abort' | 'cancel' | 'stop' | 'disconnect' | 'destroy' | 'close';
3
+ export type DisposableObject = Partial<Record<DisposableMethodName, () => void>>;
4
+ export type DisposableLike = (() => void) | DisposableObject;
5
+ export interface DisposableBag {
6
+ /**
7
+ * 注册一个清理项,返回“取消注册”函数(不会立即执行清理)。
8
+ */
9
+ add: (target: DisposableLike | null | undefined) => () => void;
10
+ /**
11
+ * 立即执行并清空当前 bag 中的全部清理项(幂等)。
12
+ */
13
+ dispose: () => void;
14
+ /**
15
+ * 注册 timeout,并在 bag dispose 时自动 clearTimeout。
16
+ */
17
+ setTimeout: (handler: (...args: any[]) => void, timeout?: number, ...args: any[]) => ReturnType<typeof setTimeout>;
18
+ /**
19
+ * 注册 interval,并在 bag dispose 时自动 clearInterval。
20
+ */
21
+ setInterval: (handler: (...args: any[]) => void, timeout?: number, ...args: any[]) => ReturnType<typeof setInterval>;
22
+ }
23
+ /**
24
+ * 在 setup() 中创建一个“清理袋”,统一管理副作用释放。
25
+ *
26
+ * 典型用法:注册定时器、请求任务、事件监听退订函数,
27
+ * 在页面/组件卸载时自动批量清理,减少内存泄漏风险。
28
+ */
29
+ export declare function useDisposables(): DisposableBag;
30
+ //#endregion
31
+ //# sourceMappingURL=disposables.d.mts.map
@@ -0,0 +1,26 @@
1
+ import { HostMiniProgramIntersectionObserver, HostMiniProgramIntersectionObserverOptions } from "./types/miniprogramHost.mjs";
2
+ import { MaybeRefOrGetter } from "../reactivity/ref.mjs";
3
+ import "../reactivity/index.mjs";
4
+ import { InternalRuntimeState } from "./types/runtime.mjs";
5
+ import "./types.mjs";
6
+ //#region src/runtime/elementIntersectionObserver.d.ts
7
+ export type ElementIntersectionObserverCallback<T = unknown> = (result: T) => void;
8
+ export interface UseElementIntersectionObserverOptions<T = unknown> {
9
+ context?: InternalRuntimeState | null;
10
+ enabled?: MaybeRefOrGetter<boolean>;
11
+ observerOptions?: MaybeRefOrGetter<HostMiniProgramIntersectionObserverOptions>;
12
+ onObserve?: ElementIntersectionObserverCallback<T>;
13
+ relativeToViewport?: boolean | Record<string, number>;
14
+ selector: MaybeRefOrGetter<string | null | undefined>;
15
+ }
16
+ export interface UseElementIntersectionObserverReturn {
17
+ disconnect: () => void;
18
+ observe: () => HostMiniProgramIntersectionObserver | null;
19
+ readonly observer: HostMiniProgramIntersectionObserver | null;
20
+ }
21
+ /**
22
+ * 观察当前组件或页面内的节点可见性,并在卸载时自动断开。
23
+ */
24
+ export declare function useElementIntersectionObserver<T = unknown>(options: UseElementIntersectionObserverOptions<T>): UseElementIntersectionObserverReturn;
25
+ //#endregion
26
+ //# sourceMappingURL=elementIntersectionObserver.d.mts.map
@@ -0,0 +1,7 @@
1
+ //#region src/runtime/features/inlineEvents.d.ts
2
+ /**
3
+ * 安装模板内联事件能力。
4
+ */
5
+ export declare function installInlineEvents(): void;
6
+ //#endregion
7
+ //# sourceMappingURL=inlineEvents.d.mts.map
@@ -0,0 +1,25 @@
1
+ import { registerRuntimeCapability } from "../capabilities.mjs";
2
+ import { runInlineExpression } from "../register/inline.mjs";
3
+ import { WEVU_INLINE_MAP_KEY } from "@weapp-core/constants";
4
+
5
+ //#region src/runtime/features/inlineEvents.ts
6
+ const inlineEventHooks = {
7
+ handler(event) {
8
+ var _runtime$proxy, _runtime$methods;
9
+ const runtime = this.__wevu;
10
+ const context = (_runtime$proxy = runtime === null || runtime === void 0 ? void 0 : runtime.proxy) !== null && _runtime$proxy !== void 0 ? _runtime$proxy : this;
11
+ const inlineMap = runtime === null || runtime === void 0 || (_runtime$methods = runtime.methods) === null || _runtime$methods === void 0 ? void 0 : _runtime$methods[WEVU_INLINE_MAP_KEY];
12
+ return runInlineExpression(context, void 0, event, inlineMap && typeof inlineMap === "object" && !Array.isArray(inlineMap) ? inlineMap : void 0);
13
+ },
14
+ run: runInlineExpression
15
+ };
16
+ /**
17
+ * 安装模板内联事件能力。
18
+ */
19
+ function installInlineEvents() {
20
+ registerRuntimeCapability("inlineEvents", inlineEventHooks);
21
+ }
22
+
23
+ //#endregion
24
+ export { installInlineEvents };
25
+ //# sourceMappingURL=inlineEvents.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inlineEvents.mjs","names":[],"sources":["../../../../src/runtime/features/inlineEvents.ts"],"sourcesContent":["import type { RuntimeCapabilityRegistry } from '../capabilities'\nimport type { InlineExpressionMap } from '../register/inline'\nimport type { InternalRuntimeState } from '../types'\nimport { WEVU_INLINE_MAP_KEY } from '@weapp-core/constants'\nimport { registerRuntimeCapability } from '../capabilities'\nimport { runInlineExpression } from '../register/inline'\n\nconst inlineEventHooks: NonNullable<RuntimeCapabilityRegistry['inlineEvents']> = {\n handler(this: InternalRuntimeState, event: unknown) {\n const runtime = this.__wevu\n const context = runtime?.proxy ?? this\n const inlineMap = runtime?.methods?.[WEVU_INLINE_MAP_KEY] as unknown\n return runInlineExpression(\n context,\n undefined,\n event,\n inlineMap && typeof inlineMap === 'object' && !Array.isArray(inlineMap)\n ? inlineMap as InlineExpressionMap\n : undefined,\n )\n },\n run: runInlineExpression,\n}\n\n/**\n * 安装模板内联事件能力。\n */\nexport function installInlineEvents(): void {\n registerRuntimeCapability('inlineEvents', inlineEventHooks)\n}\n"],"mappings":";;;;;AAOA,MAAM,mBAA2E;CAC/E,QAAoC,OAAgB;;EAClD,MAAM,UAAU,KAAK;EACrB,MAAM,8EAAU,QAAS,gEAAS;EAClC,MAAM,0EAAY,QAAS,6EAAU;EACrC,OAAO,oBACL,SACA,QACA,OACA,aAAa,OAAO,cAAc,YAAY,CAAC,MAAM,QAAQ,SAAS,IAClE,YACA,MACN;CACF;CACA,KAAK;AACP;;;;AAKA,SAAgB,sBAA4B;CAC1C,0BAA0B,gBAAgB,gBAAgB;AAC5D"}
@@ -0,0 +1,7 @@
1
+ //#region src/runtime/features/layout.d.ts
2
+ /**
3
+ * 安装 layout 能力,并直接安装其模板 ref 依赖。
4
+ */
5
+ export declare function installLayout(): void;
6
+ //#endregion
7
+ //# sourceMappingURL=layout.d.mts.map
@@ -0,0 +1,44 @@
1
+ import { registerRuntimeCapability } from "../capabilities.mjs";
2
+ import { registerRuntimeLayoutHosts, unregisterRuntimeLayoutHosts } from "../layoutBridge.mjs";
3
+ import { resolveRuntimePageLayoutName, syncRuntimePageLayoutState } from "../pageLayout.mjs";
4
+ import { runTeardownSteps } from "../teardown.mjs";
5
+ import { installTemplateRefs } from "./templateRefs.mjs";
6
+ import { WEVU_LAYOUT_HOST_BRIDGE_KEY, WEVU_PAGE_LAYOUT_NAME_KEY, WEVU_PAGE_LAYOUT_PROPS_KEY, WEVU_PAGE_LAYOUT_SETTER_KEY } from "@weapp-core/constants";
7
+
8
+ //#region src/runtime/features/layout.ts
9
+ const layoutHooks = {
10
+ attachPageSetter(target) {
11
+ target[WEVU_PAGE_LAYOUT_SETTER_KEY] = (layout, props) => {
12
+ var _target$__wevu;
13
+ const runtimeState = (_target$__wevu = target.__wevu) === null || _target$__wevu === void 0 ? void 0 : _target$__wevu.state;
14
+ if (!runtimeState || typeof runtimeState !== "object") return;
15
+ runtimeState[WEVU_PAGE_LAYOUT_NAME_KEY] = resolveRuntimePageLayoutName(layout);
16
+ const nextProps = layout === false ? {} : props !== null && props !== void 0 ? props : {};
17
+ runtimeState[WEVU_PAGE_LAYOUT_PROPS_KEY] = nextProps;
18
+ syncRuntimePageLayoutState(target, layout, nextProps);
19
+ };
20
+ },
21
+ attachHosts(bindings, target) {
22
+ if (!bindings.length || target[WEVU_LAYOUT_HOST_BRIDGE_KEY]) return;
23
+ const bridge = registerRuntimeLayoutHosts(bindings, target);
24
+ if (bridge) target[WEVU_LAYOUT_HOST_BRIDGE_KEY] = bridge;
25
+ },
26
+ detachHosts(bindings, target) {
27
+ const bridge = target[WEVU_LAYOUT_HOST_BRIDGE_KEY];
28
+ if (!bindings.length || !bridge) return;
29
+ runTeardownSteps([() => unregisterRuntimeLayoutHosts(bindings, bridge), () => {
30
+ delete target[WEVU_LAYOUT_HOST_BRIDGE_KEY];
31
+ }]);
32
+ }
33
+ };
34
+ /**
35
+ * 安装 layout 能力,并直接安装其模板 ref 依赖。
36
+ */
37
+ function installLayout() {
38
+ installTemplateRefs();
39
+ registerRuntimeCapability("layout", layoutHooks);
40
+ }
41
+
42
+ //#endregion
43
+ export { installLayout };
44
+ //# sourceMappingURL=layout.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"layout.mjs","names":[],"sources":["../../../../src/runtime/features/layout.ts"],"sourcesContent":["import type { RuntimeCapabilityRegistry } from '../capabilities'\nimport type { InternalRuntimeState } from '../types'\nimport {\n WEVU_LAYOUT_HOST_BRIDGE_KEY,\n WEVU_PAGE_LAYOUT_NAME_KEY,\n WEVU_PAGE_LAYOUT_PROPS_KEY,\n WEVU_PAGE_LAYOUT_SETTER_KEY,\n} from '@weapp-core/constants'\nimport { registerRuntimeCapability } from '../capabilities'\nimport { registerRuntimeLayoutHosts, unregisterRuntimeLayoutHosts } from '../layoutBridge'\nimport { resolveRuntimePageLayoutName, syncRuntimePageLayoutState } from '../pageLayout'\nimport { runTeardownSteps } from '../teardown'\nimport { installTemplateRefs } from './templateRefs'\n\nconst layoutHooks: NonNullable<RuntimeCapabilityRegistry['layout']> = {\n attachPageSetter(target) {\n target[WEVU_PAGE_LAYOUT_SETTER_KEY] = (layout: string | false, props?: object) => {\n const runtimeState = target.__wevu?.state as Record<string, unknown> | undefined\n if (!runtimeState || typeof runtimeState !== 'object') {\n return\n }\n runtimeState[WEVU_PAGE_LAYOUT_NAME_KEY] = resolveRuntimePageLayoutName(layout)\n const nextProps = layout === false ? {} : (props ?? {})\n runtimeState[WEVU_PAGE_LAYOUT_PROPS_KEY] = nextProps\n syncRuntimePageLayoutState(target as InternalRuntimeState & Record<string, unknown>, layout, nextProps)\n }\n },\n attachHosts(bindings, target) {\n if (!bindings.length || target[WEVU_LAYOUT_HOST_BRIDGE_KEY]) {\n return\n }\n const bridge = registerRuntimeLayoutHosts(bindings, target)\n if (bridge) {\n target[WEVU_LAYOUT_HOST_BRIDGE_KEY] = bridge\n }\n },\n detachHosts(bindings, target) {\n const bridge = target[WEVU_LAYOUT_HOST_BRIDGE_KEY]\n if (!bindings.length || !bridge) {\n return\n }\n runTeardownSteps([\n () => unregisterRuntimeLayoutHosts(bindings, bridge),\n () => {\n delete target[WEVU_LAYOUT_HOST_BRIDGE_KEY]\n },\n ])\n },\n}\n\n/**\n * 安装 layout 能力,并直接安装其模板 ref 依赖。\n */\nexport function installLayout(): void {\n installTemplateRefs()\n registerRuntimeCapability('layout', layoutHooks)\n}\n"],"mappings":";;;;;;;;AAcA,MAAM,cAAgE;CACpE,iBAAiB,QAAQ;EACvB,OAAO,gCAAgC,QAAwB,UAAmB;;GAChF,MAAM,iCAAe,OAAO,wEAAQ;GACpC,IAAI,CAAC,gBAAgB,OAAO,iBAAiB,UAC3C;GAEF,aAAa,6BAA6B,6BAA6B,MAAM;GAC7E,MAAM,YAAY,WAAW,QAAQ,CAAC,IAAK,6CAAS,CAAC;GACrD,aAAa,8BAA8B;GAC3C,2BAA2B,QAA0D,QAAQ,SAAS;EACxG;CACF;CACA,YAAY,UAAU,QAAQ;EAC5B,IAAI,CAAC,SAAS,UAAU,OAAO,8BAC7B;EAEF,MAAM,SAAS,2BAA2B,UAAU,MAAM;EAC1D,IAAI,QACF,OAAO,+BAA+B;CAE1C;CACA,YAAY,UAAU,QAAQ;EAC5B,MAAM,SAAS,OAAO;EACtB,IAAI,CAAC,SAAS,UAAU,CAAC,QACvB;EAEF,iBAAiB,OACT,6BAA6B,UAAU,MAAM,SAC7C;GACJ,OAAO,OAAO;EAChB,CACF,CAAC;CACH;AACF;;;;AAKA,SAAgB,gBAAsB;CACpC,oBAAoB;CACpB,0BAA0B,UAAU,WAAW;AACjD"}
@@ -0,0 +1,7 @@
1
+ //#region src/runtime/features/patchStrategy.d.ts
2
+ /**
3
+ * 安装 patch setData 策略。
4
+ */
5
+ export declare function installPatchStrategy(): void;
6
+ //#endregion
7
+ //# sourceMappingURL=patchStrategy.d.mts.map
@@ -0,0 +1,129 @@
1
+ import { addMutationRecorder, removeMutationRecorder } from "../../reactivity/reactive/mutation.mjs";
2
+ import { toRaw } from "../../reactivity/reactive/shared.mjs";
3
+ import { clearPatchIndices, prelinkReactiveTree } from "../../reactivity/reactive/patch.mjs";
4
+ import { registerRuntimeCapability } from "../capabilities.mjs";
5
+ import { createSetDataScheduler } from "../app/setData/scheduler.mjs";
6
+ import { preparePatchUpdate } from "../app/setData/patchScheduler.mjs";
7
+
8
+ //#region src/runtime/features/patchStrategy.ts
9
+ function createPatchSetDataScheduler(options) {
10
+ const scheduler = createSetDataScheduler(options);
11
+ const stateRootRaw = toRaw(options.state);
12
+ const pendingPatches = /* @__PURE__ */ new Map();
13
+ const fallbackTopKeys = /* @__PURE__ */ new Set();
14
+ const dispatchedComputedSnapshot = Object.create(null);
15
+ let requiresDiffCollection = true;
16
+ let started = false;
17
+ let disposed = false;
18
+ const syncComputedSnapshot = (snapshot) => {
19
+ if (!options.includeComputed) return;
20
+ for (const key of Object.keys(dispatchedComputedSnapshot)) delete dispatchedComputedSnapshot[key];
21
+ for (const key of Object.keys(options.computedRefs)) if (scheduler.shouldIncludeSnapshotKey(key)) dispatchedComputedSnapshot[key] = snapshot[key];
22
+ options.dirtyComputedKeys.clear();
23
+ };
24
+ const runDiffUpdate = (reason = "diff") => {
25
+ const pendingPatchKeys = pendingPatches.size + fallbackTopKeys.size;
26
+ pendingPatches.clear();
27
+ fallbackTopKeys.clear();
28
+ requiresDiffCollection = false;
29
+ scheduler.runDiffUpdate(reason, pendingPatchKeys, syncComputedSnapshot);
30
+ };
31
+ const mutationRecorder = (record) => {
32
+ if (!options.isMounted()) return;
33
+ if (record.root !== stateRootRaw) {
34
+ const topKeys = scheduler.resolveTopKeysByRoot(record.root);
35
+ for (const key of topKeys) fallbackTopKeys.add(key);
36
+ return;
37
+ }
38
+ if (!record.path) {
39
+ if (Array.isArray(record.fallbackTopKeys) && record.fallbackTopKeys.length) for (const key of record.fallbackTopKeys) fallbackTopKeys.add(key);
40
+ else requiresDiffCollection = true;
41
+ return;
42
+ }
43
+ const topKey = record.path.split(".", 1)[0];
44
+ if (scheduler.shouldIncludeSnapshotKey(topKey)) pendingPatches.set(record.path, {
45
+ kind: record.kind,
46
+ op: record.op
47
+ });
48
+ };
49
+ return {
50
+ job() {
51
+ if (!scheduler.prepareJob(pendingPatches.size + fallbackTopKeys.size, () => [
52
+ ...pendingPatches.keys(),
53
+ ...fallbackTopKeys,
54
+ ...options.includeComputed ? options.dirtyComputedKeys : []
55
+ ])) return;
56
+ if (requiresDiffCollection || scheduler.needsFullSnapshot()) return runDiffUpdate("needsFullSnapshot");
57
+ if (!(pendingPatches.size > 0 || fallbackTopKeys.size > 0 || options.includeComputed && options.dirtyComputedKeys.size > 0)) return runDiffUpdate("diff");
58
+ const preparation = preparePatchUpdate({
59
+ state: options.state,
60
+ computedRefs: options.computedRefs,
61
+ dirtyComputedKeys: options.dirtyComputedKeys,
62
+ includeComputed: options.includeComputed,
63
+ computedCompare: options.computedCompare,
64
+ computedCompareMaxDepth: options.computedCompareMaxDepth,
65
+ computedCompareMaxKeys: options.computedCompareMaxKeys,
66
+ shouldIncludeKey: scheduler.shouldIncludeSnapshotKey,
67
+ maxPatchKeys: options.maxPatchKeys,
68
+ maxPayloadBytes: options.maxPayloadBytes,
69
+ mergeSiblingThreshold: options.mergeSiblingThreshold,
70
+ mergeSiblingMaxInflationRatio: options.mergeSiblingMaxInflationRatio,
71
+ mergeSiblingMaxParentBytes: options.mergeSiblingMaxParentBytes,
72
+ mergeSiblingSkipArray: options.mergeSiblingSkipArray,
73
+ elevateTopKeyThreshold: options.elevateTopKeyThreshold,
74
+ toPlainMaxDepth: options.toPlainMaxDepth,
75
+ toPlainMaxKeys: options.toPlainMaxKeys,
76
+ includeFunctions: options.includeFunctions,
77
+ functionPaths: options.functionPaths,
78
+ plainCache: scheduler.plainCache,
79
+ plainCacheEligibility: scheduler.plainCacheEligibility,
80
+ pendingPatches,
81
+ fallbackTopKeys,
82
+ dispatchedSnapshot: scheduler.getLatestSnapshot(),
83
+ dispatchedComputedSnapshot
84
+ });
85
+ if (!preparation) return;
86
+ scheduler.emitDebug(preparation.debug, preparation.type === "patch" ? Object.keys(preparation.payload) : void 0);
87
+ if (preparation.type === "fallback") return runDiffUpdate(preparation.reason);
88
+ if (preparation.computedUpdates) Object.assign(dispatchedComputedSnapshot, preparation.computedUpdates);
89
+ scheduler.dispatchUpdate({
90
+ mode: "patch",
91
+ kind: "delta",
92
+ reason: "patch",
93
+ snapshot: preparation.snapshot,
94
+ payload: preparation.payload,
95
+ pendingPatchKeys: preparation.debug.pendingPatchKeys
96
+ });
97
+ },
98
+ snapshot: scheduler.snapshot,
99
+ cloneLatestSnapshot: scheduler.cloneLatestSnapshot,
100
+ start() {
101
+ if (started || disposed) return;
102
+ started = true;
103
+ prelinkReactiveTree(options.state, {
104
+ shouldIncludeTopKey: options.shouldIncludeKey,
105
+ maxDepth: options.prelinkMaxDepth,
106
+ maxKeys: options.prelinkMaxKeys
107
+ });
108
+ addMutationRecorder(mutationRecorder);
109
+ },
110
+ dispose() {
111
+ if (disposed) return;
112
+ disposed = true;
113
+ scheduler.dispose();
114
+ if (started) removeMutationRecorder(mutationRecorder);
115
+ clearPatchIndices(options.state);
116
+ }
117
+ };
118
+ }
119
+ const patchStrategyHooks = { createScheduler: createPatchSetDataScheduler };
120
+ /**
121
+ * 安装 patch setData 策略。
122
+ */
123
+ function installPatchStrategy() {
124
+ registerRuntimeCapability("patchStrategy", patchStrategyHooks);
125
+ }
126
+
127
+ //#endregion
128
+ export { installPatchStrategy };
129
+ //# sourceMappingURL=patchStrategy.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"patchStrategy.mjs","names":[],"sources":["../../../../src/runtime/features/patchStrategy.ts"],"sourcesContent":["import type { MutationRecord } from '../../reactivity'\nimport type { SetDataSchedulerOptions } from '../app/setData/scheduler'\nimport type { RuntimeCapabilityRegistry, SetDataScheduler } from '../capabilities'\nimport type { SetDataDebugInfo } from '../types'\nimport { addMutationRecorder, prelinkReactiveTree, removeMutationRecorder, toRaw } from '../../reactivity'\nimport { clearPatchIndices } from '../../reactivity/reactive'\nimport { preparePatchUpdate } from '../app/setData/patchScheduler'\nimport { createSetDataScheduler } from '../app/setData/scheduler'\nimport { registerRuntimeCapability } from '../capabilities'\n\nfunction createPatchSetDataScheduler(options: SetDataSchedulerOptions): SetDataScheduler {\n const scheduler = createSetDataScheduler(options)\n const stateRootRaw = toRaw(options.state) as object\n const pendingPatches = new Map<string, { kind: 'property' | 'array', op: 'set' | 'delete' }>()\n const fallbackTopKeys = new Set<string>()\n const dispatchedComputedSnapshot: Record<string, unknown> = Object.create(null)\n let requiresDiffCollection = true\n let started = false\n let disposed = false\n\n const syncComputedSnapshot = (\n snapshot: Record<string, unknown>,\n ) => {\n if (!options.includeComputed) {\n return\n }\n for (const key of Object.keys(dispatchedComputedSnapshot)) {\n delete dispatchedComputedSnapshot[key]\n }\n for (const key of Object.keys(options.computedRefs)) {\n if (scheduler.shouldIncludeSnapshotKey(key)) {\n dispatchedComputedSnapshot[key] = snapshot[key]\n }\n }\n options.dirtyComputedKeys.clear()\n }\n\n const runDiffUpdate = (reason: SetDataDebugInfo['reason'] = 'diff') => {\n const pendingPatchKeys = pendingPatches.size + fallbackTopKeys.size\n pendingPatches.clear()\n fallbackTopKeys.clear()\n requiresDiffCollection = false\n scheduler.runDiffUpdate(reason, pendingPatchKeys, syncComputedSnapshot)\n }\n\n const mutationRecorder = (record: MutationRecord) => {\n if (!options.isMounted()) {\n return\n }\n if (record.root !== stateRootRaw) {\n const topKeys = scheduler.resolveTopKeysByRoot(record.root)\n for (const key of topKeys) {\n fallbackTopKeys.add(key)\n }\n return\n }\n if (!record.path) {\n if (Array.isArray(record.fallbackTopKeys) && record.fallbackTopKeys.length) {\n for (const key of record.fallbackTopKeys) {\n fallbackTopKeys.add(key)\n }\n }\n else {\n requiresDiffCollection = true\n }\n return\n }\n const topKey = record.path.split('.', 1)[0]\n if (scheduler.shouldIncludeSnapshotKey(topKey)) {\n pendingPatches.set(record.path, { kind: record.kind, op: record.op })\n }\n }\n\n return {\n job() {\n if (!scheduler.prepareJob(\n pendingPatches.size + fallbackTopKeys.size,\n () => [\n ...pendingPatches.keys(),\n ...fallbackTopKeys,\n ...(options.includeComputed ? options.dirtyComputedKeys : []),\n ],\n )) {\n return\n }\n if (requiresDiffCollection || scheduler.needsFullSnapshot()) {\n return runDiffUpdate('needsFullSnapshot')\n }\n const hasPatchSignal = pendingPatches.size > 0\n || fallbackTopKeys.size > 0\n || (options.includeComputed && options.dirtyComputedKeys.size > 0)\n // setup 返回的 ref/computed 变更不会进入 mutation recorder,patch 信号为空时兜底走 diff。\n if (!hasPatchSignal) {\n return runDiffUpdate('diff')\n }\n const preparation = preparePatchUpdate({\n state: options.state,\n computedRefs: options.computedRefs,\n dirtyComputedKeys: options.dirtyComputedKeys,\n includeComputed: options.includeComputed,\n computedCompare: options.computedCompare,\n computedCompareMaxDepth: options.computedCompareMaxDepth,\n computedCompareMaxKeys: options.computedCompareMaxKeys,\n shouldIncludeKey: scheduler.shouldIncludeSnapshotKey,\n maxPatchKeys: options.maxPatchKeys,\n maxPayloadBytes: options.maxPayloadBytes,\n mergeSiblingThreshold: options.mergeSiblingThreshold,\n mergeSiblingMaxInflationRatio: options.mergeSiblingMaxInflationRatio,\n mergeSiblingMaxParentBytes: options.mergeSiblingMaxParentBytes,\n mergeSiblingSkipArray: options.mergeSiblingSkipArray,\n elevateTopKeyThreshold: options.elevateTopKeyThreshold,\n toPlainMaxDepth: options.toPlainMaxDepth,\n toPlainMaxKeys: options.toPlainMaxKeys,\n includeFunctions: options.includeFunctions,\n functionPaths: options.functionPaths,\n plainCache: scheduler.plainCache,\n plainCacheEligibility: scheduler.plainCacheEligibility,\n pendingPatches,\n fallbackTopKeys,\n dispatchedSnapshot: scheduler.getLatestSnapshot(),\n dispatchedComputedSnapshot,\n })\n if (!preparation) {\n return\n }\n scheduler.emitDebug(\n preparation.debug,\n preparation.type === 'patch' ? Object.keys(preparation.payload) : undefined,\n )\n if (preparation.type === 'fallback') {\n return runDiffUpdate(preparation.reason)\n }\n if (preparation.computedUpdates) {\n Object.assign(dispatchedComputedSnapshot, preparation.computedUpdates)\n }\n scheduler.dispatchUpdate({\n mode: 'patch',\n kind: 'delta',\n reason: 'patch',\n snapshot: preparation.snapshot,\n payload: preparation.payload,\n pendingPatchKeys: preparation.debug.pendingPatchKeys,\n })\n },\n snapshot: scheduler.snapshot,\n cloneLatestSnapshot: scheduler.cloneLatestSnapshot,\n start() {\n if (started || disposed) {\n return\n }\n started = true\n prelinkReactiveTree(options.state, {\n shouldIncludeTopKey: options.shouldIncludeKey,\n maxDepth: options.prelinkMaxDepth,\n maxKeys: options.prelinkMaxKeys,\n })\n addMutationRecorder(mutationRecorder)\n },\n dispose() {\n if (disposed) {\n return\n }\n disposed = true\n scheduler.dispose()\n if (started) {\n removeMutationRecorder(mutationRecorder)\n }\n clearPatchIndices(options.state)\n },\n }\n}\n\nconst patchStrategyHooks: NonNullable<RuntimeCapabilityRegistry['patchStrategy']> = {\n createScheduler: createPatchSetDataScheduler,\n}\n\n/**\n * 安装 patch setData 策略。\n */\nexport function installPatchStrategy(): void {\n registerRuntimeCapability('patchStrategy', patchStrategyHooks)\n}\n"],"mappings":";;;;;;;;AAUA,SAAS,4BAA4B,SAAoD;CACvF,MAAM,YAAY,uBAAuB,OAAO;CAChD,MAAM,eAAe,MAAM,QAAQ,KAAK;CACxC,MAAM,iCAAiB,IAAI,IAAkE;CAC7F,MAAM,kCAAkB,IAAI,IAAY;CACxC,MAAM,6BAAsD,OAAO,OAAO,IAAI;CAC9E,IAAI,yBAAyB;CAC7B,IAAI,UAAU;CACd,IAAI,WAAW;CAEf,MAAM,wBACJ,aACG;EACH,IAAI,CAAC,QAAQ,iBACX;EAEF,KAAK,MAAM,OAAO,OAAO,KAAK,0BAA0B,GACtD,OAAO,2BAA2B;EAEpC,KAAK,MAAM,OAAO,OAAO,KAAK,QAAQ,YAAY,GAChD,IAAI,UAAU,yBAAyB,GAAG,GACxC,2BAA2B,OAAO,SAAS;EAG/C,QAAQ,kBAAkB,MAAM;CAClC;CAEA,MAAM,iBAAiB,SAAqC,WAAW;EACrE,MAAM,mBAAmB,eAAe,OAAO,gBAAgB;EAC/D,eAAe,MAAM;EACrB,gBAAgB,MAAM;EACtB,yBAAyB;EACzB,UAAU,cAAc,QAAQ,kBAAkB,oBAAoB;CACxE;CAEA,MAAM,oBAAoB,WAA2B;EACnD,IAAI,CAAC,QAAQ,UAAU,GACrB;EAEF,IAAI,OAAO,SAAS,cAAc;GAChC,MAAM,UAAU,UAAU,qBAAqB,OAAO,IAAI;GAC1D,KAAK,MAAM,OAAO,SAChB,gBAAgB,IAAI,GAAG;GAEzB;EACF;EACA,IAAI,CAAC,OAAO,MAAM;GAChB,IAAI,MAAM,QAAQ,OAAO,eAAe,KAAK,OAAO,gBAAgB,QAClE,KAAK,MAAM,OAAO,OAAO,iBACvB,gBAAgB,IAAI,GAAG;QAIzB,yBAAyB;GAE3B;EACF;EACA,MAAM,SAAS,OAAO,KAAK,MAAM,KAAK,CAAC,CAAC,CAAC;EACzC,IAAI,UAAU,yBAAyB,MAAM,GAC3C,eAAe,IAAI,OAAO,MAAM;GAAE,MAAM,OAAO;GAAM,IAAI,OAAO;EAAG,CAAC;CAExE;CAEA,OAAO;EACL,MAAM;GACJ,IAAI,CAAC,UAAU,WACb,eAAe,OAAO,gBAAgB,YAChC;IACJ,GAAG,eAAe,KAAK;IACvB,GAAG;IACH,GAAI,QAAQ,kBAAkB,QAAQ,oBAAoB,CAAC;GAC7D,CACF,GACE;GAEF,IAAI,0BAA0B,UAAU,kBAAkB,GACxD,OAAO,cAAc,mBAAmB;GAM1C,IAAI,EAJmB,eAAe,OAAO,KACxC,gBAAgB,OAAO,KACtB,QAAQ,mBAAmB,QAAQ,kBAAkB,OAAO,IAGhE,OAAO,cAAc,MAAM;GAE7B,MAAM,cAAc,mBAAmB;IACrC,OAAO,QAAQ;IACf,cAAc,QAAQ;IACtB,mBAAmB,QAAQ;IAC3B,iBAAiB,QAAQ;IACzB,iBAAiB,QAAQ;IACzB,yBAAyB,QAAQ;IACjC,wBAAwB,QAAQ;IAChC,kBAAkB,UAAU;IAC5B,cAAc,QAAQ;IACtB,iBAAiB,QAAQ;IACzB,uBAAuB,QAAQ;IAC/B,+BAA+B,QAAQ;IACvC,4BAA4B,QAAQ;IACpC,uBAAuB,QAAQ;IAC/B,wBAAwB,QAAQ;IAChC,iBAAiB,QAAQ;IACzB,gBAAgB,QAAQ;IACxB,kBAAkB,QAAQ;IAC1B,eAAe,QAAQ;IACvB,YAAY,UAAU;IACtB,uBAAuB,UAAU;IACjC;IACA;IACA,oBAAoB,UAAU,kBAAkB;IAChD;GACF,CAAC;GACD,IAAI,CAAC,aACH;GAEF,UAAU,UACR,YAAY,OACZ,YAAY,SAAS,UAAU,OAAO,KAAK,YAAY,OAAO,IAAI,MACpE;GACA,IAAI,YAAY,SAAS,YACvB,OAAO,cAAc,YAAY,MAAM;GAEzC,IAAI,YAAY,iBACd,OAAO,OAAO,4BAA4B,YAAY,eAAe;GAEvE,UAAU,eAAe;IACvB,MAAM;IACN,MAAM;IACN,QAAQ;IACR,UAAU,YAAY;IACtB,SAAS,YAAY;IACrB,kBAAkB,YAAY,MAAM;GACtC,CAAC;EACH;EACA,UAAU,UAAU;EACpB,qBAAqB,UAAU;EAC/B,QAAQ;GACN,IAAI,WAAW,UACb;GAEF,UAAU;GACV,oBAAoB,QAAQ,OAAO;IACjC,qBAAqB,QAAQ;IAC7B,UAAU,QAAQ;IAClB,SAAS,QAAQ;GACnB,CAAC;GACD,oBAAoB,gBAAgB;EACtC;EACA,UAAU;GACR,IAAI,UACF;GAEF,WAAW;GACX,UAAU,QAAQ;GAClB,IAAI,SACF,uBAAuB,gBAAgB;GAEzC,kBAAkB,QAAQ,KAAK;EACjC;CACF;AACF;AAEA,MAAM,qBAA8E,EAClF,iBAAiB,4BACnB;;;;AAKA,SAAgB,uBAA6B;CAC3C,0BAA0B,iBAAiB,kBAAkB;AAC/D"}
@@ -0,0 +1,24 @@
1
+ import { PageLayoutState, WevuPageLayoutMap, resolveRuntimePageLayoutName as resolveRuntimePageLayoutName$1, syncRuntimePageLayoutState as syncRuntimePageLayoutState$1, syncRuntimePageLayoutStateFromRuntime as syncRuntimePageLayoutStateFromRuntime$1, usePageLayout as usePageLayout$1 } from "../pageLayout.mjs";
2
+ import { LayoutHostBinding } from "../capabilities.mjs";
3
+ import { LayoutBridgeInstance, registerPageLayoutBridge as registerPageLayoutBridge$1, registerRuntimeLayoutHosts as registerRuntimeLayoutHosts$1, resolveLayoutBridge as resolveLayoutBridge$1, resolveLayoutHost as resolveLayoutHost$1, unregisterPageLayoutBridge as unregisterPageLayoutBridge$1, unregisterRuntimeLayoutHosts as unregisterRuntimeLayoutHosts$1, useLayoutBridge as useLayoutBridge$1, useLayoutHosts as useLayoutHosts$1, waitForLayoutHost as waitForLayoutHost$1 } from "../layoutBridge.mjs";
4
+ //#region src/runtime/features/publicLayout.d.ts
5
+ export declare const registerPageLayoutBridge: typeof registerPageLayoutBridge$1;
6
+ export declare const unregisterPageLayoutBridge: typeof unregisterPageLayoutBridge$1;
7
+ export declare const resolveLayoutBridge: typeof resolveLayoutBridge$1;
8
+ export declare const resolveLayoutHost: typeof resolveLayoutHost$1;
9
+ export declare const waitForLayoutHost: typeof waitForLayoutHost$1;
10
+ export declare const useLayoutBridge: typeof useLayoutBridge$1;
11
+ export declare const registerRuntimeLayoutHosts: typeof registerRuntimeLayoutHosts$1;
12
+ export declare const unregisterRuntimeLayoutHosts: typeof unregisterRuntimeLayoutHosts$1;
13
+ export declare const useLayoutHosts: typeof useLayoutHosts$1;
14
+ export declare const usePageLayout: typeof usePageLayout$1;
15
+ type PublicPageLayoutName = keyof WevuPageLayoutMap extends never ? string : Extract<keyof WevuPageLayoutMap, string>;
16
+ type PublicPageLayoutProps<Name extends string> = Name extends keyof WevuPageLayoutMap ? WevuPageLayoutMap[Name] : object;
17
+ export declare function setPageLayout(layout: false): void;
18
+ export declare function setPageLayout<Name extends PublicPageLayoutName>(layout: Name, props?: PublicPageLayoutProps<Name>): void;
19
+ export declare const syncRuntimePageLayoutState: typeof syncRuntimePageLayoutState$1;
20
+ export declare const syncRuntimePageLayoutStateFromRuntime: typeof syncRuntimePageLayoutStateFromRuntime$1;
21
+ export declare const resolveRuntimePageLayoutName: typeof resolveRuntimePageLayoutName$1;
22
+ //#endregion
23
+ export type { LayoutBridgeInstance, LayoutHostBinding, PageLayoutState, WevuPageLayoutMap };
24
+ //# sourceMappingURL=publicLayout.d.mts.map
@@ -0,0 +1,81 @@
1
+ import { getCurrentMiniProgramPages } from "../platform.mjs";
2
+ import { getCurrentInstance } from "../hooks/base.mjs";
3
+ import { runtimeCapabilityRegistry } from "../capabilities.mjs";
4
+ import { registerPageLayoutBridge as registerPageLayoutBridge$1, registerRuntimeLayoutHosts as registerRuntimeLayoutHosts$1, resolveLayoutBridge as resolveLayoutBridge$1, resolveLayoutHost as resolveLayoutHost$1, unregisterPageLayoutBridge as unregisterPageLayoutBridge$1, unregisterRuntimeLayoutHosts as unregisterRuntimeLayoutHosts$1, useLayoutBridge as useLayoutBridge$1, useLayoutHosts as useLayoutHosts$1, waitForLayoutHost as waitForLayoutHost$1 } from "../layoutBridge.mjs";
5
+ import { getCurrentPageInstance } from "../register/component/lifecycle/platform.mjs";
6
+ import { resolveRuntimePageLayoutName as resolveRuntimePageLayoutName$1, setPageLayout as setPageLayout$1, syncRuntimePageLayoutState as syncRuntimePageLayoutState$1, syncRuntimePageLayoutStateFromRuntime as syncRuntimePageLayoutStateFromRuntime$1, usePageLayout as usePageLayout$1 } from "../pageLayout.mjs";
7
+ import { installLayout } from "./layout.mjs";
8
+
9
+ //#region src/runtime/features/publicLayout.ts
10
+ const registerPageLayoutBridge = (...args) => {
11
+ installLayout();
12
+ return registerPageLayoutBridge$1(...args);
13
+ };
14
+ const unregisterPageLayoutBridge = (...args) => {
15
+ installLayout();
16
+ return unregisterPageLayoutBridge$1(...args);
17
+ };
18
+ const resolveLayoutBridge = (...args) => {
19
+ installLayout();
20
+ return resolveLayoutBridge$1(...args);
21
+ };
22
+ const resolveLayoutHost = (...args) => {
23
+ installLayout();
24
+ return resolveLayoutHost$1(...args);
25
+ };
26
+ const waitForLayoutHost = (...args) => {
27
+ installLayout();
28
+ return waitForLayoutHost$1(...args);
29
+ };
30
+ const useLayoutBridge = (...args) => {
31
+ installLayout();
32
+ return useLayoutBridge$1(...args);
33
+ };
34
+ const registerRuntimeLayoutHosts = (...args) => {
35
+ installLayout();
36
+ return registerRuntimeLayoutHosts$1(...args);
37
+ };
38
+ const unregisterRuntimeLayoutHosts = (...args) => {
39
+ installLayout();
40
+ return unregisterRuntimeLayoutHosts$1(...args);
41
+ };
42
+ const useLayoutHosts = (...args) => {
43
+ installLayout();
44
+ return useLayoutHosts$1(...args);
45
+ };
46
+ const usePageLayout = (...args) => {
47
+ installLayout();
48
+ return usePageLayout$1(...args);
49
+ };
50
+ function setPageLayout(layout, props) {
51
+ var _getCurrentPageInstan;
52
+ installLayout();
53
+ const pages = getCurrentMiniProgramPages();
54
+ const currentInstance = getCurrentInstance();
55
+ const currentTarget = currentInstance && typeof currentInstance.route === "string" && currentInstance.route ? currentInstance : (_getCurrentPageInstan = getCurrentPageInstance()) !== null && _getCurrentPageInstan !== void 0 ? _getCurrentPageInstan : pages[pages.length - 1];
56
+ if (currentTarget) {
57
+ var _runtimeCapabilityReg;
58
+ (_runtimeCapabilityReg = runtimeCapabilityRegistry.layout) === null || _runtimeCapabilityReg === void 0 || _runtimeCapabilityReg.attachPageSetter(currentTarget);
59
+ }
60
+ if (layout === false) {
61
+ setPageLayout$1(false);
62
+ return;
63
+ }
64
+ setPageLayout$1(layout, props);
65
+ }
66
+ const syncRuntimePageLayoutState = (...args) => {
67
+ installLayout();
68
+ return syncRuntimePageLayoutState$1(...args);
69
+ };
70
+ const syncRuntimePageLayoutStateFromRuntime = (...args) => {
71
+ installLayout();
72
+ return syncRuntimePageLayoutStateFromRuntime$1(...args);
73
+ };
74
+ const resolveRuntimePageLayoutName = (...args) => {
75
+ installLayout();
76
+ return resolveRuntimePageLayoutName$1(...args);
77
+ };
78
+
79
+ //#endregion
80
+ export { registerPageLayoutBridge, registerRuntimeLayoutHosts, resolveLayoutBridge, resolveLayoutHost, resolveRuntimePageLayoutName, setPageLayout, syncRuntimePageLayoutState, syncRuntimePageLayoutStateFromRuntime, unregisterPageLayoutBridge, unregisterRuntimeLayoutHosts, useLayoutBridge, useLayoutHosts, usePageLayout, waitForLayoutHost };
81
+ //# sourceMappingURL=publicLayout.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"publicLayout.mjs","names":["registerPageLayoutBridgeImplementation","unregisterPageLayoutBridgeImplementation","resolveLayoutBridgeImplementation","resolveLayoutHostImplementation","waitForLayoutHostImplementation","useLayoutBridgeImplementation","registerRuntimeLayoutHostsImplementation","unregisterRuntimeLayoutHostsImplementation","useLayoutHostsImplementation","usePageLayoutImplementation","syncRuntimePageLayoutStateImplementation","syncRuntimePageLayoutStateFromRuntimeImplementation","resolveRuntimePageLayoutNameImplementation"],"sources":["../../../../src/runtime/features/publicLayout.ts"],"sourcesContent":["import type { WevuPageLayoutMap } from '../pageLayout'\nimport type { InternalRuntimeState } from '../types'\nimport { runtimeCapabilityRegistry } from '../capabilities'\nimport { getCurrentInstance } from '../hooks'\nimport {\n registerPageLayoutBridge as registerPageLayoutBridgeImplementation,\n registerRuntimeLayoutHosts as registerRuntimeLayoutHostsImplementation,\n resolveLayoutBridge as resolveLayoutBridgeImplementation,\n resolveLayoutHost as resolveLayoutHostImplementation,\n unregisterPageLayoutBridge as unregisterPageLayoutBridgeImplementation,\n unregisterRuntimeLayoutHosts as unregisterRuntimeLayoutHostsImplementation,\n useLayoutBridge as useLayoutBridgeImplementation,\n useLayoutHosts as useLayoutHostsImplementation,\n waitForLayoutHost as waitForLayoutHostImplementation,\n} from '../layoutBridge'\nimport {\n resolveRuntimePageLayoutName as resolveRuntimePageLayoutNameImplementation,\n setPageLayout as setPageLayoutImplementation,\n syncRuntimePageLayoutStateFromRuntime as syncRuntimePageLayoutStateFromRuntimeImplementation,\n syncRuntimePageLayoutState as syncRuntimePageLayoutStateImplementation,\n usePageLayout as usePageLayoutImplementation,\n} from '../pageLayout'\nimport { getCurrentMiniProgramPages } from '../platform'\nimport { getCurrentPageInstance } from '../register/component/lifecycle/platform'\nimport { installLayout } from './layout'\n\nexport type { LayoutBridgeInstance, LayoutHostBinding } from '../layoutBridge'\nexport type { PageLayoutState, WevuPageLayoutMap } from '../pageLayout'\n\nexport const registerPageLayoutBridge: typeof registerPageLayoutBridgeImplementation = (...args) => {\n installLayout()\n return registerPageLayoutBridgeImplementation(...args)\n}\n\nexport const unregisterPageLayoutBridge: typeof unregisterPageLayoutBridgeImplementation = (...args) => {\n installLayout()\n return unregisterPageLayoutBridgeImplementation(...args)\n}\n\nexport const resolveLayoutBridge: typeof resolveLayoutBridgeImplementation = (...args) => {\n installLayout()\n return resolveLayoutBridgeImplementation(...args)\n}\n\nexport const resolveLayoutHost: typeof resolveLayoutHostImplementation = (...args) => {\n installLayout()\n return resolveLayoutHostImplementation(...args)\n}\n\nexport const waitForLayoutHost: typeof waitForLayoutHostImplementation = (...args) => {\n installLayout()\n return waitForLayoutHostImplementation(...args)\n}\n\nexport const useLayoutBridge: typeof useLayoutBridgeImplementation = (...args) => {\n installLayout()\n return useLayoutBridgeImplementation(...args)\n}\n\nexport const registerRuntimeLayoutHosts: typeof registerRuntimeLayoutHostsImplementation = (...args) => {\n installLayout()\n return registerRuntimeLayoutHostsImplementation(...args)\n}\n\nexport const unregisterRuntimeLayoutHosts: typeof unregisterRuntimeLayoutHostsImplementation = (...args) => {\n installLayout()\n return unregisterRuntimeLayoutHostsImplementation(...args)\n}\n\nexport const useLayoutHosts: typeof useLayoutHostsImplementation = (...args) => {\n installLayout()\n return useLayoutHostsImplementation(...args)\n}\n\nexport const usePageLayout: typeof usePageLayoutImplementation = (...args) => {\n installLayout()\n return usePageLayoutImplementation(...args)\n}\n\ntype PublicPageLayoutName = keyof WevuPageLayoutMap extends never\n ? string\n : Extract<keyof WevuPageLayoutMap, string>\ntype PublicPageLayoutProps<Name extends string> = Name extends keyof WevuPageLayoutMap\n ? WevuPageLayoutMap[Name]\n : object\n\nexport function setPageLayout(layout: false): void\nexport function setPageLayout<Name extends PublicPageLayoutName>(\n layout: Name,\n props?: PublicPageLayoutProps<Name>,\n): void\nexport function setPageLayout(layout: string | false, props?: object): void {\n installLayout()\n const pages = getCurrentMiniProgramPages()\n const currentInstance = getCurrentInstance()\n const currentTarget = currentInstance && typeof currentInstance.route === 'string' && currentInstance.route\n ? currentInstance\n : getCurrentPageInstance() ?? pages[pages.length - 1]\n if (currentTarget) {\n runtimeCapabilityRegistry.layout?.attachPageSetter(currentTarget as InternalRuntimeState)\n }\n if (layout === false) {\n setPageLayoutImplementation(false)\n return\n }\n setPageLayoutImplementation(layout, props)\n}\n\nexport const syncRuntimePageLayoutState: typeof syncRuntimePageLayoutStateImplementation = (...args) => {\n installLayout()\n return syncRuntimePageLayoutStateImplementation(...args)\n}\n\nexport const syncRuntimePageLayoutStateFromRuntime: typeof syncRuntimePageLayoutStateFromRuntimeImplementation = (...args) => {\n installLayout()\n return syncRuntimePageLayoutStateFromRuntimeImplementation(...args)\n}\n\nexport const resolveRuntimePageLayoutName: typeof resolveRuntimePageLayoutNameImplementation = (...args) => {\n installLayout()\n return resolveRuntimePageLayoutNameImplementation(...args)\n}\n"],"mappings":";;;;;;;;;AA6BA,MAAa,4BAA2E,GAAG,SAAS;CAClG,cAAc;CACd,OAAOA,2BAAuC,GAAG,IAAI;AACvD;AAEA,MAAa,8BAA+E,GAAG,SAAS;CACtG,cAAc;CACd,OAAOC,6BAAyC,GAAG,IAAI;AACzD;AAEA,MAAa,uBAAiE,GAAG,SAAS;CACxF,cAAc;CACd,OAAOC,sBAAkC,GAAG,IAAI;AAClD;AAEA,MAAa,qBAA6D,GAAG,SAAS;CACpF,cAAc;CACd,OAAOC,oBAAgC,GAAG,IAAI;AAChD;AAEA,MAAa,qBAA6D,GAAG,SAAS;CACpF,cAAc;CACd,OAAOC,oBAAgC,GAAG,IAAI;AAChD;AAEA,MAAa,mBAAyD,GAAG,SAAS;CAChF,cAAc;CACd,OAAOC,kBAA8B,GAAG,IAAI;AAC9C;AAEA,MAAa,8BAA+E,GAAG,SAAS;CACtG,cAAc;CACd,OAAOC,6BAAyC,GAAG,IAAI;AACzD;AAEA,MAAa,gCAAmF,GAAG,SAAS;CAC1G,cAAc;CACd,OAAOC,+BAA2C,GAAG,IAAI;AAC3D;AAEA,MAAa,kBAAuD,GAAG,SAAS;CAC9E,cAAc;CACd,OAAOC,iBAA6B,GAAG,IAAI;AAC7C;AAEA,MAAa,iBAAqD,GAAG,SAAS;CAC5E,cAAc;CACd,OAAOC,gBAA4B,GAAG,IAAI;AAC5C;AAcA,SAAgB,cAAc,QAAwB,OAAsB;;CAC1E,cAAc;CACd,MAAM,QAAQ,2BAA2B;CACzC,MAAM,kBAAkB,mBAAmB;CAC3C,MAAM,gBAAgB,mBAAmB,OAAO,gBAAgB,UAAU,YAAY,gBAAgB,QAClG,2CACA,uBAAuB,0EAAK,MAAM,MAAM,SAAS;CACrD,IAAI,eAAe;;EACjB,mDAA0B,8EAAQ,iBAAiB,aAAqC;CAC1F;CACA,IAAI,WAAW,OAAO;EACpB,gBAA4B,KAAK;EACjC;CACF;CACA,gBAA4B,QAAQ,KAAK;AAC3C;AAEA,MAAa,8BAA+E,GAAG,SAAS;CACtG,cAAc;CACd,OAAOC,6BAAyC,GAAG,IAAI;AACzD;AAEA,MAAa,yCAAqG,GAAG,SAAS;CAC5H,cAAc;CACd,OAAOC,wCAAoD,GAAG,IAAI;AACpE;AAEA,MAAa,gCAAmF,GAAG,SAAS;CAC1G,cAAc;CACd,OAAOC,+BAA2C,GAAG,IAAI;AAC3D"}
@@ -0,0 +1,23 @@
1
+ import { ComputedDefinitions } from "../types/core.mjs";
2
+ import "../types.mjs";
3
+ import { InlineExpressionMap } from "../register/inline.mjs";
4
+ import { LayoutHostBinding, TemplateRefBinding } from "../capabilities.mjs";
5
+ import { WEVU_BINDING_MANIFEST_KEY, WevuRuntimeBindingManifestV1 } from "@weapp-core/constants";
6
+ //#region src/runtime/features/scopedSlots.d.ts
7
+ export interface CreateWevuScopedSlotComponentOptions {
8
+ computed?: ComputedDefinitions;
9
+ inlineMap?: InlineExpressionMap;
10
+ layoutHosts?: LayoutHostBinding[];
11
+ templateRefs?: TemplateRefBinding[];
12
+ [WEVU_BINDING_MANIFEST_KEY]?: WevuRuntimeBindingManifestV1;
13
+ }
14
+ /**
15
+ * 创建编译器生成的作用域插槽组件。
16
+ */
17
+ export declare function createWevuScopedSlotComponent(overrides?: CreateWevuScopedSlotComponentOptions): void;
18
+ /**
19
+ * 安装作用域插槽的 owner 生命周期与组件创建能力。
20
+ */
21
+ export declare function installScopedSlots(): void;
22
+ //#endregion
23
+ //# sourceMappingURL=scopedSlots.d.mts.map
@@ -0,0 +1,88 @@
1
+ import { getScopedSlotHostGlobalObject } from "../platform.mjs";
2
+ import { RUNTIME_SCOPED_SLOT_STATE_KEY, getScopedSlotMountState, registerRuntimeCapability, requireRuntimeCapability } from "../capabilities.mjs";
3
+ import { runTeardownSteps } from "../teardown.mjs";
4
+ import { callNativeSetData, resolveNativeSetData } from "../register/runtimeInstance/utils.mjs";
5
+ import { createWevuComponent } from "../define.mjs";
6
+ import { allocateOwnerId, attachOwnerSnapshot, getOwnerProxy, mergeOwnerSnapshotProps, removeOwner, resolveOwnerSnapshot, updateOwnerSnapshot } from "../scopedSlots.mjs";
7
+ import { createScopedSlotOptions } from "../define/scopedSlotOptions.mjs";
8
+ import { WEVU_PROPS_KEY, WEVU_RUNTIME_OWNER_ID_KEY, WEVU_SCOPED_SLOT_CREATOR_KEY, WEVU_SLOT_OWNER_ID_KEY } from "@weapp-core/constants";
9
+
10
+ //#region src/runtime/features/scopedSlots.ts
11
+ const scopedSlotHooks = {
12
+ prepareMount(target) {
13
+ var _target$data;
14
+ const existing = getScopedSlotMountState(target);
15
+ if (existing) return existing;
16
+ const initialNativeOwnerId = (_target$data = target.data) === null || _target$data === void 0 ? void 0 : _target$data[WEVU_SLOT_OWNER_ID_KEY];
17
+ const ownerId = typeof initialNativeOwnerId === "string" && initialNativeOwnerId ? initialNativeOwnerId : allocateOwnerId();
18
+ const state = {
19
+ ownerId,
20
+ shouldFlushNativeOwnerId: typeof initialNativeOwnerId === "string" && initialNativeOwnerId !== ownerId
21
+ };
22
+ Object.defineProperty(target, RUNTIME_SCOPED_SLOT_STATE_KEY, {
23
+ value: state,
24
+ configurable: true,
25
+ enumerable: false,
26
+ writable: false
27
+ });
28
+ return state;
29
+ },
30
+ attachMount(target, runtime, state, deferSnapshot) {
31
+ attachOwnerSnapshot(target, runtime, state.ownerId, { deferSnapshot });
32
+ },
33
+ refresh(target, state) {
34
+ var _WEVU_PROPS_KEY;
35
+ const runtime = target.__wevu;
36
+ if (!runtime) return;
37
+ const snapshot = resolveOwnerSnapshot(runtime);
38
+ const propsSource = (_WEVU_PROPS_KEY = target[WEVU_PROPS_KEY]) !== null && _WEVU_PROPS_KEY !== void 0 ? _WEVU_PROPS_KEY : target.properties;
39
+ mergeOwnerSnapshotProps(snapshot, propsSource);
40
+ updateOwnerSnapshot(state.ownerId, snapshot, runtime.proxy, target);
41
+ },
42
+ syncNativeOwnerId(target, state) {
43
+ if (!state.shouldFlushNativeOwnerId) return;
44
+ try {
45
+ if (target.data && typeof target.data === "object") target.data[WEVU_SLOT_OWNER_ID_KEY] = state.ownerId;
46
+ } catch (_unused) {}
47
+ const setData = resolveNativeSetData(target);
48
+ if (setData) callNativeSetData(target, setData, { [WEVU_SLOT_OWNER_ID_KEY]: state.ownerId });
49
+ },
50
+ teardown(target) {
51
+ var _ref, _state$ownerId;
52
+ const state = getScopedSlotMountState(target);
53
+ const scopedTarget = target;
54
+ const ownerId = (_ref = (_state$ownerId = state === null || state === void 0 ? void 0 : state.ownerId) !== null && _state$ownerId !== void 0 ? _state$ownerId : scopedTarget[WEVU_RUNTIME_OWNER_ID_KEY]) !== null && _ref !== void 0 ? _ref : scopedTarget[WEVU_SLOT_OWNER_ID_KEY];
55
+ runTeardownSteps([() => {
56
+ if (typeof ownerId === "string" && ownerId) removeOwner(ownerId);
57
+ }, () => {
58
+ delete scopedTarget[RUNTIME_SCOPED_SLOT_STATE_KEY];
59
+ }]);
60
+ },
61
+ resolveLifecycleProxy(target) {
62
+ var _ref2, _ref3, _scopedTarget$WEVU_RU, _target$data2, _target$properties;
63
+ const scopedTarget = target;
64
+ const ownerId = (_ref2 = (_ref3 = (_scopedTarget$WEVU_RU = scopedTarget[WEVU_RUNTIME_OWNER_ID_KEY]) !== null && _scopedTarget$WEVU_RU !== void 0 ? _scopedTarget$WEVU_RU : scopedTarget[WEVU_SLOT_OWNER_ID_KEY]) !== null && _ref3 !== void 0 ? _ref3 : (_target$data2 = target.data) === null || _target$data2 === void 0 ? void 0 : _target$data2[WEVU_SLOT_OWNER_ID_KEY]) !== null && _ref2 !== void 0 ? _ref2 : (_target$properties = target.properties) === null || _target$properties === void 0 ? void 0 : _target$properties[WEVU_SLOT_OWNER_ID_KEY];
65
+ return typeof ownerId === "string" && ownerId ? getOwnerProxy(ownerId) : void 0;
66
+ },
67
+ allocateOwnerId
68
+ };
69
+ /**
70
+ * 创建编译器生成的作用域插槽组件。
71
+ */
72
+ function createWevuScopedSlotComponent(overrides) {
73
+ requireRuntimeCapability("scopedSlots", "createWevuScopedSlotComponent");
74
+ const componentOptions = createScopedSlotOptions(overrides);
75
+ createWevuComponent(componentOptions);
76
+ }
77
+ /**
78
+ * 安装作用域插槽的 owner 生命周期与组件创建能力。
79
+ */
80
+ function installScopedSlots() {
81
+ registerRuntimeCapability("scopedSlots", scopedSlotHooks);
82
+ const globalObject = getScopedSlotHostGlobalObject();
83
+ if (globalObject && globalObject[WEVU_SCOPED_SLOT_CREATOR_KEY] !== createWevuScopedSlotComponent) globalObject[WEVU_SCOPED_SLOT_CREATOR_KEY] = createWevuScopedSlotComponent;
84
+ }
85
+
86
+ //#endregion
87
+ export { createWevuScopedSlotComponent, installScopedSlots };
88
+ //# sourceMappingURL=scopedSlots.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scopedSlots.mjs","names":[],"sources":["../../../../src/runtime/features/scopedSlots.ts"],"sourcesContent":["import type { WEVU_BINDING_MANIFEST_KEY, WevuRuntimeBindingManifestV1 } from '@weapp-core/constants'\nimport type {\n LayoutHostBinding,\n RuntimeCapabilityRegistry,\n ScopedSlotMountState,\n TemplateRefBinding,\n} from '../capabilities'\nimport type { InlineExpressionMap } from '../register/inline'\nimport type { ComputedDefinitions, InternalRuntimeState } from '../types'\nimport {\n WEVU_PROPS_KEY,\n WEVU_RUNTIME_OWNER_ID_KEY,\n WEVU_SCOPED_SLOT_CREATOR_KEY,\n WEVU_SLOT_OWNER_ID_KEY,\n} from '@weapp-core/constants'\nimport {\n getScopedSlotMountState,\n registerRuntimeCapability,\n requireRuntimeCapability,\n RUNTIME_SCOPED_SLOT_STATE_KEY,\n} from '../capabilities'\nimport { createWevuComponent } from '../define'\nimport { createScopedSlotOptions } from '../define/scopedSlotOptions'\nimport { getScopedSlotHostGlobalObject } from '../platform'\nimport { callNativeSetData, resolveNativeSetData } from '../register/runtimeInstance/utils'\nimport {\n allocateOwnerId,\n attachOwnerSnapshot,\n getOwnerProxy,\n mergeOwnerSnapshotProps,\n removeOwner,\n resolveOwnerSnapshot,\n updateOwnerSnapshot,\n} from '../scopedSlots'\nimport { runTeardownSteps } from '../teardown'\n\nexport interface CreateWevuScopedSlotComponentOptions {\n computed?: ComputedDefinitions\n inlineMap?: InlineExpressionMap\n layoutHosts?: LayoutHostBinding[]\n templateRefs?: TemplateRefBinding[]\n [WEVU_BINDING_MANIFEST_KEY]?: WevuRuntimeBindingManifestV1\n}\n\ntype RuntimeTargetWithScopedSlotState = InternalRuntimeState & {\n [RUNTIME_SCOPED_SLOT_STATE_KEY]?: ScopedSlotMountState\n [WEVU_PROPS_KEY]?: unknown\n [WEVU_RUNTIME_OWNER_ID_KEY]?: unknown\n [WEVU_SLOT_OWNER_ID_KEY]?: unknown\n}\n\nconst scopedSlotHooks: NonNullable<RuntimeCapabilityRegistry['scopedSlots']> = {\n prepareMount(target: InternalRuntimeState) {\n const existing = getScopedSlotMountState(target)\n if (existing) {\n return existing\n }\n const initialNativeOwnerId = target.data?.[WEVU_SLOT_OWNER_ID_KEY]\n const ownerId = typeof initialNativeOwnerId === 'string' && initialNativeOwnerId\n ? initialNativeOwnerId\n : allocateOwnerId()\n const state: ScopedSlotMountState = {\n ownerId,\n shouldFlushNativeOwnerId: typeof initialNativeOwnerId === 'string' && initialNativeOwnerId !== ownerId,\n }\n Object.defineProperty(target, RUNTIME_SCOPED_SLOT_STATE_KEY, {\n value: state,\n configurable: true,\n enumerable: false,\n writable: false,\n })\n return state\n },\n attachMount(target, runtime, state, deferSnapshot) {\n attachOwnerSnapshot(target, runtime, state.ownerId, { deferSnapshot })\n },\n refresh(target: InternalRuntimeState, state: ScopedSlotMountState) {\n const runtime = target.__wevu\n if (!runtime) {\n return\n }\n const snapshot = resolveOwnerSnapshot(runtime)\n const propsSource = (target as RuntimeTargetWithScopedSlotState)[WEVU_PROPS_KEY] ?? target.properties\n mergeOwnerSnapshotProps(snapshot, propsSource)\n updateOwnerSnapshot(state.ownerId, snapshot, runtime.proxy, target)\n },\n syncNativeOwnerId(target: InternalRuntimeState, state: ScopedSlotMountState) {\n if (!state.shouldFlushNativeOwnerId) {\n return\n }\n try {\n if (target.data && typeof target.data === 'object') {\n target.data[WEVU_SLOT_OWNER_ID_KEY] = state.ownerId\n }\n }\n catch {\n // 忽略直接写入失败,后续 setData 仍会尝试同步。\n }\n const setData = resolveNativeSetData(target)\n if (setData) {\n callNativeSetData(target, setData, { [WEVU_SLOT_OWNER_ID_KEY]: state.ownerId })\n }\n },\n teardown(target: InternalRuntimeState) {\n const state = getScopedSlotMountState(target)\n const scopedTarget = target as RuntimeTargetWithScopedSlotState\n const ownerId = state?.ownerId\n ?? scopedTarget[WEVU_RUNTIME_OWNER_ID_KEY]\n ?? scopedTarget[WEVU_SLOT_OWNER_ID_KEY]\n runTeardownSteps([\n () => {\n if (typeof ownerId === 'string' && ownerId) {\n removeOwner(ownerId)\n }\n },\n () => {\n delete scopedTarget[RUNTIME_SCOPED_SLOT_STATE_KEY]\n },\n ])\n },\n resolveLifecycleProxy(target: InternalRuntimeState) {\n const scopedTarget = target as RuntimeTargetWithScopedSlotState\n const ownerId = scopedTarget[WEVU_RUNTIME_OWNER_ID_KEY]\n ?? scopedTarget[WEVU_SLOT_OWNER_ID_KEY]\n ?? target.data?.[WEVU_SLOT_OWNER_ID_KEY]\n ?? target.properties?.[WEVU_SLOT_OWNER_ID_KEY]\n return typeof ownerId === 'string' && ownerId ? getOwnerProxy(ownerId) : undefined\n },\n allocateOwnerId,\n}\n\n/**\n * 创建编译器生成的作用域插槽组件。\n */\nexport function createWevuScopedSlotComponent(\n overrides?: CreateWevuScopedSlotComponentOptions,\n): void {\n requireRuntimeCapability('scopedSlots', 'createWevuScopedSlotComponent')\n const baseOptions = createScopedSlotOptions(overrides)\n // 作用域插槽选项由内部工厂完整构造,动态常量键会丢失静态索引信息。\n const componentOptions = baseOptions as unknown as Parameters<typeof createWevuComponent>[0]\n createWevuComponent(componentOptions)\n}\n/**\n * 安装作用域插槽的 owner 生命周期与组件创建能力。\n */\nexport function installScopedSlots(): void {\n registerRuntimeCapability('scopedSlots', scopedSlotHooks)\n const globalObject = getScopedSlotHostGlobalObject()\n if (globalObject && globalObject[WEVU_SCOPED_SLOT_CREATOR_KEY] !== createWevuScopedSlotComponent) {\n globalObject[WEVU_SCOPED_SLOT_CREATOR_KEY] = createWevuScopedSlotComponent\n }\n}\n"],"mappings":";;;;;;;;;;AAmDA,MAAM,kBAAyE;CAC7E,aAAa,QAA8B;;EACzC,MAAM,WAAW,wBAAwB,MAAM;EAC/C,IAAI,UACF,OAAO;EAET,MAAM,uCAAuB,OAAO,kEAAO;EAC3C,MAAM,UAAU,OAAO,yBAAyB,YAAY,uBACxD,uBACA,gBAAgB;EACpB,MAAM,QAA8B;GAClC;GACA,0BAA0B,OAAO,yBAAyB,YAAY,yBAAyB;EACjG;EACA,OAAO,eAAe,QAAQ,+BAA+B;GAC3D,OAAO;GACP,cAAc;GACd,YAAY;GACZ,UAAU;EACZ,CAAC;EACD,OAAO;CACT;CACA,YAAY,QAAQ,SAAS,OAAO,eAAe;EACjD,oBAAoB,QAAQ,SAAS,MAAM,SAAS,EAAE,cAAc,CAAC;CACvE;CACA,QAAQ,QAA8B,OAA6B;;EACjE,MAAM,UAAU,OAAO;EACvB,IAAI,CAAC,SACH;EAEF,MAAM,WAAW,qBAAqB,OAAO;EAC7C,MAAM,iCAAe,OAA4C,4EAAmB,OAAO;EAC3F,wBAAwB,UAAU,WAAW;EAC7C,oBAAoB,MAAM,SAAS,UAAU,QAAQ,OAAO,MAAM;CACpE;CACA,kBAAkB,QAA8B,OAA6B;EAC3E,IAAI,CAAC,MAAM,0BACT;EAEF,IAAI;GACF,IAAI,OAAO,QAAQ,OAAO,OAAO,SAAS,UACxC,OAAO,KAAK,0BAA0B,MAAM;EAEhD,kBACM,CAEN;EACA,MAAM,UAAU,qBAAqB,MAAM;EAC3C,IAAI,SACF,kBAAkB,QAAQ,SAAS,GAAG,yBAAyB,MAAM,QAAQ,CAAC;CAElF;CACA,SAAS,QAA8B;;EACrC,MAAM,QAAQ,wBAAwB,MAAM;EAC5C,MAAM,eAAe;EACrB,MAAM,kFAAU,MAAO,kEAClB,aAAa,iEACb,aAAa;EAClB,iBAAiB,OACT;GACJ,IAAI,OAAO,YAAY,YAAY,SACjC,YAAY,OAAO;EAEvB,SACM;GACJ,OAAO,aAAa;EACtB,CACF,CAAC;CACH;CACA,sBAAsB,QAA8B;;EAClD,MAAM,eAAe;EACrB,MAAM,qDAAU,aAAa,mGACxB,aAAa,iFACb,OAAO,oEAAO,sFACd,OAAO,oFAAa;EACzB,OAAO,OAAO,YAAY,YAAY,UAAU,cAAc,OAAO,IAAI;CAC3E;CACA;AACF;;;;AAKA,SAAgB,8BACd,WACM;CACN,yBAAyB,eAAe,+BAA+B;CAGvE,MAAM,mBAFc,wBAAwB,SAET;CACnC,oBAAoB,gBAAgB;AACtC;;;;AAIA,SAAgB,qBAA2B;CACzC,0BAA0B,eAAe,eAAe;CACxD,MAAM,eAAe,8BAA8B;CACnD,IAAI,gBAAgB,aAAa,kCAAkC,+BACjE,aAAa,gCAAgC;AAEjD"}
@@ -0,0 +1,7 @@
1
+ //#region src/runtime/features/setDataHighFrequencyWarning.d.ts
2
+ /**
3
+ * 安装可选的 setData 高频告警能力。
4
+ */
5
+ export declare function installSetDataHighFrequencyWarning(): void;
6
+ //#endregion
7
+ //# sourceMappingURL=setDataHighFrequencyWarning.d.mts.map
@@ -0,0 +1,15 @@
1
+ import { registerRuntimeCapability } from "../capabilities.mjs";
2
+ import { createSetDataHighFrequencyWarningMonitor } from "../register/setDataFrequencyWarning.mjs";
3
+
4
+ //#region src/runtime/features/setDataHighFrequencyWarning.ts
5
+ const setDataHighFrequencyWarningHooks = { createMonitor: createSetDataHighFrequencyWarningMonitor };
6
+ /**
7
+ * 安装可选的 setData 高频告警能力。
8
+ */
9
+ function installSetDataHighFrequencyWarning() {
10
+ registerRuntimeCapability("setDataHighFrequencyWarning", setDataHighFrequencyWarningHooks);
11
+ }
12
+
13
+ //#endregion
14
+ export { installSetDataHighFrequencyWarning };
15
+ //# sourceMappingURL=setDataHighFrequencyWarning.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"setDataHighFrequencyWarning.mjs","names":[],"sources":["../../../../src/runtime/features/setDataHighFrequencyWarning.ts"],"sourcesContent":["import type { RuntimeCapabilityRegistry } from '../capabilities'\nimport { registerRuntimeCapability } from '../capabilities'\nimport { createSetDataHighFrequencyWarningMonitor } from '../register/setDataFrequencyWarning'\n\nconst setDataHighFrequencyWarningHooks: NonNullable<RuntimeCapabilityRegistry['setDataHighFrequencyWarning']> = {\n createMonitor: createSetDataHighFrequencyWarningMonitor,\n}\n\n/**\n * 安装可选的 setData 高频告警能力。\n */\nexport function installSetDataHighFrequencyWarning(): void {\n registerRuntimeCapability('setDataHighFrequencyWarning', setDataHighFrequencyWarningHooks)\n}\n"],"mappings":";;;;AAIA,MAAM,mCAA0G,EAC9G,eAAe,yCACjB;;;;AAKA,SAAgB,qCAA2C;CACzD,0BAA0B,+BAA+B,gCAAgC;AAC3F"}
@@ -0,0 +1,7 @@
1
+ //#region src/runtime/features/templateRefs.d.ts
2
+ /**
3
+ * 安装模板 ref 能力。
4
+ */
5
+ export declare function installTemplateRefs(): void;
6
+ //#endregion
7
+ //# sourceMappingURL=templateRefs.d.mts.map