wevu 7.2.2 → 7.3.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 (348) hide show
  1. package/README.md +6 -0
  2. package/dist/dev/_virtual/{_@oxc-project_runtime@0.150.0 → _@oxc-project_runtime@0.151.0}/helpers/esm/defineProperty.mjs +1 -1
  3. package/dist/dev/_virtual/{_@oxc-project_runtime@0.150.0 → _@oxc-project_runtime@0.151.0}/helpers/esm/toPrimitive.mjs +1 -1
  4. package/dist/dev/_virtual/{_@oxc-project_runtime@0.150.0 → _@oxc-project_runtime@0.151.0}/helpers/esm/toPropertyKey.mjs +1 -1
  5. package/dist/dev/_virtual/{_@oxc-project_runtime@0.150.0 → _@oxc-project_runtime@0.151.0}/helpers/esm/typeof.mjs +1 -1
  6. package/dist/dev/internal-runtime.d.mts +2 -1
  7. package/dist/dev/internal-runtime.mjs +3 -2
  8. package/dist/dev/package.mjs +1 -1
  9. package/dist/dev/reactivity/asyncDerivation.mjs +8 -10
  10. package/dist/dev/reactivity/asyncDerivation.mjs.map +1 -1
  11. package/dist/dev/reactivity/core.mjs +5 -8
  12. package/dist/dev/reactivity/core.mjs.map +1 -1
  13. package/dist/dev/reactivity/reactive/patch.mjs +3 -3
  14. package/dist/dev/reactivity/reactive/patch.mjs.map +1 -1
  15. package/dist/dev/reactivity/reactive/patchState.mjs +4 -8
  16. package/dist/dev/reactivity/reactive/patchState.mjs.map +1 -1
  17. package/dist/dev/reactivity/reactive/shared.mjs +1 -2
  18. package/dist/dev/reactivity/reactive/shared.mjs.map +1 -1
  19. package/dist/dev/reactivity/reactive.mjs +5 -10
  20. package/dist/dev/reactivity/reactive.mjs.map +1 -1
  21. package/dist/dev/reactivity/ref.mjs +2 -2
  22. package/dist/dev/reactivity/ref.mjs.map +1 -1
  23. package/dist/dev/reactivity/shallowRef.mjs +1 -1
  24. package/dist/dev/reactivity/shallowRef.mjs.map +1 -1
  25. package/dist/dev/reactivity/watch/helpers.mjs +1 -1
  26. package/dist/dev/reactivity/watch/helpers.mjs.map +1 -1
  27. package/dist/dev/reactivity/watch.mjs +6 -8
  28. package/dist/dev/reactivity/watch.mjs.map +1 -1
  29. package/dist/dev/router/createRouter.mjs +17 -24
  30. package/dist/dev/router/createRouter.mjs.map +1 -1
  31. package/dist/dev/router/initialNavigation.mjs +18 -16
  32. package/dist/dev/router/initialNavigation.mjs.map +1 -1
  33. package/dist/dev/router/instance.mjs +1 -2
  34. package/dist/dev/router/instance.mjs.map +1 -1
  35. package/dist/dev/router/navigationCore.mjs +2 -2
  36. package/dist/dev/router/navigationCore.mjs.map +1 -1
  37. package/dist/dev/router/navigationResult.mjs +7 -10
  38. package/dist/dev/router/navigationResult.mjs.map +1 -1
  39. package/dist/dev/router/navigationTarget.mjs +1 -3
  40. package/dist/dev/router/navigationTarget.mjs.map +1 -1
  41. package/dist/dev/router/resolve.mjs +3 -4
  42. package/dist/dev/router/resolve.mjs.map +1 -1
  43. package/dist/dev/router/routeRegistry.mjs +1 -1
  44. package/dist/dev/router/routeRegistry.mjs.map +1 -1
  45. package/dist/dev/router/routeSync.mjs +1 -1
  46. package/dist/dev/router/routeSync.mjs.map +1 -1
  47. package/dist/dev/router/useRoute.mjs +12 -19
  48. package/dist/dev/router/useRoute.mjs.map +1 -1
  49. package/dist/dev/routerInternal/location.mjs +2 -3
  50. package/dist/dev/routerInternal/location.mjs.map +1 -1
  51. package/dist/dev/routerInternal/params.mjs +2 -3
  52. package/dist/dev/routerInternal/params.mjs.map +1 -1
  53. package/dist/dev/routerInternal/records.mjs +1 -1
  54. package/dist/dev/routerInternal/records.mjs.map +1 -1
  55. package/dist/dev/routerInternal/recordsWarnings.mjs +1 -2
  56. package/dist/dev/routerInternal/recordsWarnings.mjs.map +1 -1
  57. package/dist/dev/runtime/app/context.mjs +13 -26
  58. package/dist/dev/runtime/app/context.mjs.map +1 -1
  59. package/dist/dev/runtime/app/diagnostics.mjs +2 -4
  60. package/dist/dev/runtime/app/diagnostics.mjs.map +1 -1
  61. package/dist/dev/runtime/app/mount.mjs +27 -33
  62. package/dist/dev/runtime/app/mount.mjs.map +1 -1
  63. package/dist/dev/runtime/app/setData/commitTracker.mjs +5 -9
  64. package/dist/dev/runtime/app/setData/commitTracker.mjs.map +1 -1
  65. package/dist/dev/runtime/app/setData/patchScheduler.mjs +2 -4
  66. package/dist/dev/runtime/app/setData/patchScheduler.mjs.map +1 -1
  67. package/dist/dev/runtime/app/setData/payload.mjs +2 -3
  68. package/dist/dev/runtime/app/setData/payload.mjs.map +1 -1
  69. package/dist/dev/runtime/app/setData/scheduler.mjs +7 -9
  70. package/dist/dev/runtime/app/setData/scheduler.mjs.map +1 -1
  71. package/dist/dev/runtime/app/setData/snapshot.mjs +5 -6
  72. package/dist/dev/runtime/app/setData/snapshot.mjs.map +1 -1
  73. package/dist/dev/runtime/app/setDataOptions.mjs +26 -27
  74. package/dist/dev/runtime/app/setDataOptions.mjs.map +1 -1
  75. package/dist/dev/runtime/app.mjs +9 -9
  76. package/dist/dev/runtime/app.mjs.map +1 -1
  77. package/dist/dev/runtime/bindingManifest.mjs +6 -14
  78. package/dist/dev/runtime/bindingManifest.mjs.map +1 -1
  79. package/dist/dev/runtime/capabilities.d.mts +4 -1
  80. package/dist/dev/runtime/capabilities.mjs.map +1 -1
  81. package/dist/dev/runtime/css.mjs +4 -8
  82. package/dist/dev/runtime/css.mjs.map +1 -1
  83. package/dist/dev/runtime/defaults.mjs +4 -4
  84. package/dist/dev/runtime/defaults.mjs.map +1 -1
  85. package/dist/dev/runtime/define/initialComputed.mjs +5 -5
  86. package/dist/dev/runtime/define/initialComputed.mjs.map +1 -1
  87. package/dist/dev/runtime/define/options.mjs +10 -12
  88. package/dist/dev/runtime/define/options.mjs.map +1 -1
  89. package/dist/dev/runtime/define/props.mjs +4 -5
  90. package/dist/dev/runtime/define/props.mjs.map +1 -1
  91. package/dist/dev/runtime/define/scopedSlotOptions.mjs +43 -61
  92. package/dist/dev/runtime/define/scopedSlotOptions.mjs.map +1 -1
  93. package/dist/dev/runtime/define/setupResult.mjs +17 -28
  94. package/dist/dev/runtime/define/setupResult.mjs.map +1 -1
  95. package/dist/dev/runtime/define.mjs +9 -12
  96. package/dist/dev/runtime/define.mjs.map +1 -1
  97. package/dist/dev/runtime/diff.mjs +9 -11
  98. package/dist/dev/runtime/diff.mjs.map +1 -1
  99. package/dist/dev/runtime/disposables.mjs +2 -2
  100. package/dist/dev/runtime/disposables.mjs.map +1 -1
  101. package/dist/dev/runtime/elementIntersectionObserver.mjs +16 -24
  102. package/dist/dev/runtime/elementIntersectionObserver.mjs.map +1 -1
  103. package/dist/dev/runtime/features/inlineEvents.mjs +2 -3
  104. package/dist/dev/runtime/features/inlineEvents.mjs.map +1 -1
  105. package/dist/dev/runtime/features/jsxIslands.d.mts +7 -0
  106. package/dist/dev/runtime/features/jsxIslands.mjs +20 -0
  107. package/dist/dev/runtime/features/jsxIslands.mjs.map +1 -0
  108. package/dist/dev/runtime/features/layout.mjs +2 -3
  109. package/dist/dev/runtime/features/layout.mjs.map +1 -1
  110. package/dist/dev/runtime/features/publicLayout.mjs +2 -6
  111. package/dist/dev/runtime/features/publicLayout.mjs.map +1 -1
  112. package/dist/dev/runtime/features/scopedSlots.mjs +5 -9
  113. package/dist/dev/runtime/features/scopedSlots.mjs.map +1 -1
  114. package/dist/dev/runtime/features/templateRefs.mjs +1 -1
  115. package/dist/dev/runtime/features/templateRefs.mjs.map +1 -1
  116. package/dist/dev/runtime/hooks/base.mjs +21 -32
  117. package/dist/dev/runtime/hooks/base.mjs.map +1 -1
  118. package/dist/dev/runtime/inlineDataset.mjs +1 -2
  119. package/dist/dev/runtime/inlineDataset.mjs.map +1 -1
  120. package/dist/dev/runtime/intersectionObserver.mjs +6 -6
  121. package/dist/dev/runtime/intersectionObserver.mjs.map +1 -1
  122. package/dist/dev/runtime/jsxIsland.mjs +16 -33
  123. package/dist/dev/runtime/jsxIsland.mjs.map +1 -1
  124. package/dist/dev/runtime/layoutBridge.mjs +32 -62
  125. package/dist/dev/runtime/layoutBridge.mjs.map +1 -1
  126. package/dist/dev/runtime/nativeBridge.mjs +1 -1
  127. package/dist/dev/runtime/nativeBridge.mjs.map +1 -1
  128. package/dist/dev/runtime/navigationLifecycle.mjs +24 -0
  129. package/dist/dev/runtime/navigationLifecycle.mjs.map +1 -0
  130. package/dist/dev/runtime/pageEnvironment.mjs +15 -18
  131. package/dist/dev/runtime/pageEnvironment.mjs.map +1 -1
  132. package/dist/dev/runtime/pageLayout.mjs +7 -11
  133. package/dist/dev/runtime/pageLayout.mjs.map +1 -1
  134. package/dist/dev/runtime/pageScroll.mjs +2 -3
  135. package/dist/dev/runtime/pageScroll.mjs.map +1 -1
  136. package/dist/dev/runtime/platform/current.mjs +12 -0
  137. package/dist/dev/runtime/platform/current.mjs.map +1 -0
  138. package/dist/dev/runtime/platform/generic.mjs +36 -0
  139. package/dist/dev/runtime/platform/generic.mjs.map +1 -0
  140. package/dist/dev/runtime/platform/globals.mjs +29 -0
  141. package/dist/dev/runtime/platform/globals.mjs.map +1 -0
  142. package/dist/dev/runtime/platform.mjs +15 -60
  143. package/dist/dev/runtime/platform.mjs.map +1 -1
  144. package/dist/dev/runtime/provideContext.mjs +7 -9
  145. package/dist/dev/runtime/provideContext.mjs.map +1 -1
  146. package/dist/dev/runtime/publicRuntime.mjs +4 -0
  147. package/dist/dev/runtime/publicRuntime.mjs.map +1 -1
  148. package/dist/dev/runtime/pullDownRefresh.mjs +2 -4
  149. package/dist/dev/runtime/pullDownRefresh.mjs.map +1 -1
  150. package/dist/dev/runtime/register/app.mjs +18 -19
  151. package/dist/dev/runtime/register/app.mjs.map +1 -1
  152. package/dist/dev/runtime/register/component/alipay.mjs +9 -18
  153. package/dist/dev/runtime/register/component/alipay.mjs.map +1 -1
  154. package/dist/dev/runtime/register/component/alipayRegistration.mjs +60 -0
  155. package/dist/dev/runtime/register/component/alipayRegistration.mjs.map +1 -0
  156. package/dist/dev/runtime/register/component/lifecycle/platform.mjs +8 -9
  157. package/dist/dev/runtime/register/component/lifecycle/platform.mjs.map +1 -1
  158. package/dist/dev/runtime/register/component/lifecycle.mjs +7 -12
  159. package/dist/dev/runtime/register/component/lifecycle.mjs.map +1 -1
  160. package/dist/dev/runtime/register/component/methods.mjs +13 -18
  161. package/dist/dev/runtime/register/component/methods.mjs.map +1 -1
  162. package/dist/dev/runtime/register/component/options.mjs +3 -4
  163. package/dist/dev/runtime/register/component/options.mjs.map +1 -1
  164. package/dist/dev/runtime/register/component/props.mjs +25 -31
  165. package/dist/dev/runtime/register/component/props.mjs.map +1 -1
  166. package/dist/dev/runtime/register/component/registerDefinition.mjs +18 -40
  167. package/dist/dev/runtime/register/component/registerDefinition.mjs.map +1 -1
  168. package/dist/dev/runtime/register/component/registerNativeDefinition.mjs +18 -60
  169. package/dist/dev/runtime/register/component/registerNativeDefinition.mjs.map +1 -1
  170. package/dist/dev/runtime/register/component.mjs +3 -5
  171. package/dist/dev/runtime/register/component.mjs.map +1 -1
  172. package/dist/dev/runtime/register/inline.mjs +8 -10
  173. package/dist/dev/runtime/register/inline.mjs.map +1 -1
  174. package/dist/dev/runtime/register/runtimeInstance/methodBridge.mjs +7 -8
  175. package/dist/dev/runtime/register/runtimeInstance/methodBridge.mjs.map +1 -1
  176. package/dist/dev/runtime/register/runtimeInstance/provideContext.mjs +1 -1
  177. package/dist/dev/runtime/register/runtimeInstance/provideContext.mjs.map +1 -1
  178. package/dist/dev/runtime/register/runtimeInstance/setupContext.mjs +25 -34
  179. package/dist/dev/runtime/register/runtimeInstance/setupContext.mjs.map +1 -1
  180. package/dist/dev/runtime/register/runtimeInstance/setupPhase.mjs +6 -13
  181. package/dist/dev/runtime/register/runtimeInstance/setupPhase.mjs.map +1 -1
  182. package/dist/dev/runtime/register/runtimeInstance/setupSnapshot.mjs +2 -2
  183. package/dist/dev/runtime/register/runtimeInstance/setupSnapshot.mjs.map +1 -1
  184. package/dist/dev/runtime/register/runtimeInstance/utils.mjs +9 -9
  185. package/dist/dev/runtime/register/runtimeInstance/utils.mjs.map +1 -1
  186. package/dist/dev/runtime/register/runtimeInstance.mjs +74 -100
  187. package/dist/dev/runtime/register/runtimeInstance.mjs.map +1 -1
  188. package/dist/dev/runtime/register/setDataFrequencyWarning.mjs +12 -15
  189. package/dist/dev/runtime/register/setDataFrequencyWarning.mjs.map +1 -1
  190. package/dist/dev/runtime/register/setup.mjs +2 -3
  191. package/dist/dev/runtime/register/setup.mjs.map +1 -1
  192. package/dist/dev/runtime/register/snapshot.mjs +1 -4
  193. package/dist/dev/runtime/register/snapshot.mjs.map +1 -1
  194. package/dist/dev/runtime/register/watch.mjs +3 -5
  195. package/dist/dev/runtime/register/watch.mjs.map +1 -1
  196. package/dist/dev/runtime/scopedSlots.mjs +14 -21
  197. package/dist/dev/runtime/scopedSlots.mjs.map +1 -1
  198. package/dist/dev/runtime/selectorQuery.mjs +5 -9
  199. package/dist/dev/runtime/selectorQuery.mjs.map +1 -1
  200. package/dist/dev/runtime/template.mjs +1 -1
  201. package/dist/dev/runtime/template.mjs.map +1 -1
  202. package/dist/dev/runtime/templateRefs/helpers.mjs +14 -24
  203. package/dist/dev/runtime/templateRefs/helpers.mjs.map +1 -1
  204. package/dist/dev/runtime/templateRefs.mjs +8 -15
  205. package/dist/dev/runtime/templateRefs.mjs.map +1 -1
  206. package/dist/dev/runtime/uniAppHost.mjs +6 -14
  207. package/dist/dev/runtime/uniAppHost.mjs.map +1 -1
  208. package/dist/dev/runtime/updatePerformance.mjs +1 -1
  209. package/dist/dev/runtime/updatePerformance.mjs.map +1 -1
  210. package/dist/dev/runtime/use.mjs +1 -1
  211. package/dist/dev/runtime/use.mjs.map +1 -1
  212. package/dist/dev/runtime/vueCompat/context.mjs +3 -5
  213. package/dist/dev/runtime/vueCompat/context.mjs.map +1 -1
  214. package/dist/dev/runtime/vueCompat/model.mjs +9 -13
  215. package/dist/dev/runtime/vueCompat/model.mjs.map +1 -1
  216. package/dist/dev/runtime/vueCompat/router.mjs +4 -4
  217. package/dist/dev/runtime/vueCompat/router.mjs.map +1 -1
  218. package/dist/dev/runtime/vueCompat/templateRef.mjs +1 -1
  219. package/dist/dev/runtime/vueCompat/templateRef.mjs.map +1 -1
  220. package/dist/dev/scheduler.mjs +3 -4
  221. package/dist/dev/scheduler.mjs.map +1 -1
  222. package/dist/dev/store/base.mjs +1 -2
  223. package/dist/dev/store/base.mjs.map +1 -1
  224. package/dist/dev/store/define/create.mjs +11 -22
  225. package/dist/dev/store/define/create.mjs.map +1 -1
  226. package/dist/dev/store/define.mjs +1 -1
  227. package/dist/dev/store/define.mjs.map +1 -1
  228. package/dist/dev/store/view.mjs +1 -1
  229. package/dist/dev/store/view.mjs.map +1 -1
  230. package/dist/internal-runtime.d.mts +2 -1
  231. package/dist/internal-runtime.mjs +1 -1
  232. package/dist/package.mjs +1 -1
  233. package/dist/reactivity/asyncDerivation.mjs +1 -1
  234. package/dist/reactivity/core.mjs +1 -1
  235. package/dist/reactivity/reactive/patch.mjs +1 -1
  236. package/dist/reactivity/reactive/patchState.mjs +1 -1
  237. package/dist/reactivity/reactive/shared.mjs +1 -1
  238. package/dist/reactivity/reactive.mjs +1 -1
  239. package/dist/reactivity/ref.mjs +1 -1
  240. package/dist/reactivity/shallowRef.mjs +1 -1
  241. package/dist/reactivity/watch/helpers.mjs +1 -1
  242. package/dist/reactivity/watch.mjs +1 -1
  243. package/dist/router/createRouter.mjs +1 -1
  244. package/dist/router/initialNavigation.mjs +1 -1
  245. package/dist/router/instance.mjs +1 -1
  246. package/dist/router/navigationCore.mjs +1 -1
  247. package/dist/router/navigationResult.mjs +1 -1
  248. package/dist/router/navigationTarget.mjs +1 -1
  249. package/dist/router/resolve.mjs +1 -1
  250. package/dist/router/routeRegistry.mjs +1 -1
  251. package/dist/router/routeSync.mjs +1 -1
  252. package/dist/router/useRoute.mjs +1 -1
  253. package/dist/routerInternal/location.mjs +1 -1
  254. package/dist/routerInternal/params.mjs +1 -1
  255. package/dist/routerInternal/records.mjs +1 -1
  256. package/dist/routerInternal/recordsWarnings.mjs +1 -1
  257. package/dist/runtime/app/context.mjs +1 -1
  258. package/dist/runtime/app/diagnostics.mjs +1 -1
  259. package/dist/runtime/app/mount.mjs +1 -1
  260. package/dist/runtime/app/setData/commitTracker.mjs +1 -1
  261. package/dist/runtime/app/setData/patchScheduler.mjs +1 -1
  262. package/dist/runtime/app/setData/payload.mjs +1 -1
  263. package/dist/runtime/app/setData/scheduler.mjs +1 -1
  264. package/dist/runtime/app/setData/snapshot.mjs +1 -1
  265. package/dist/runtime/app/setDataOptions.mjs +1 -1
  266. package/dist/runtime/app.mjs +1 -1
  267. package/dist/runtime/bindingManifest.mjs +1 -1
  268. package/dist/runtime/capabilities.d.mts +4 -1
  269. package/dist/runtime/css.mjs +1 -1
  270. package/dist/runtime/defaults.mjs +1 -1
  271. package/dist/runtime/define/initialComputed.mjs +1 -1
  272. package/dist/runtime/define/options.mjs +1 -1
  273. package/dist/runtime/define/props.mjs +1 -1
  274. package/dist/runtime/define/scopedSlotOptions.mjs +1 -1
  275. package/dist/runtime/define/setupResult.mjs +1 -1
  276. package/dist/runtime/define.mjs +1 -1
  277. package/dist/runtime/diff.mjs +1 -1
  278. package/dist/runtime/disposables.mjs +1 -1
  279. package/dist/runtime/elementIntersectionObserver.mjs +1 -1
  280. package/dist/runtime/features/inlineEvents.mjs +1 -1
  281. package/dist/runtime/features/jsxIslands.d.mts +6 -0
  282. package/dist/runtime/features/jsxIslands.mjs +1 -0
  283. package/dist/runtime/features/layout.mjs +1 -1
  284. package/dist/runtime/features/publicLayout.mjs +1 -1
  285. package/dist/runtime/features/scopedSlots.mjs +1 -1
  286. package/dist/runtime/features/templateRefs.mjs +1 -1
  287. package/dist/runtime/hooks/base.mjs +1 -1
  288. package/dist/runtime/inlineDataset.mjs +1 -1
  289. package/dist/runtime/intersectionObserver.mjs +1 -1
  290. package/dist/runtime/jsxIsland.mjs +1 -1
  291. package/dist/runtime/layoutBridge.mjs +1 -1
  292. package/dist/runtime/nativeBridge.mjs +1 -1
  293. package/dist/runtime/navigationLifecycle.mjs +1 -0
  294. package/dist/runtime/pageEnvironment.mjs +1 -1
  295. package/dist/runtime/pageLayout.mjs +1 -1
  296. package/dist/runtime/pageScroll.mjs +1 -1
  297. package/dist/runtime/platform/current.mjs +1 -0
  298. package/dist/runtime/platform/generic.mjs +1 -0
  299. package/dist/runtime/platform/globals.mjs +1 -0
  300. package/dist/runtime/platform.mjs +1 -1
  301. package/dist/runtime/provideContext.mjs +1 -1
  302. package/dist/runtime/publicRuntime.mjs +1 -1
  303. package/dist/runtime/pullDownRefresh.mjs +1 -1
  304. package/dist/runtime/register/app.mjs +1 -1
  305. package/dist/runtime/register/component/alipay.mjs +1 -1
  306. package/dist/runtime/register/component/alipayRegistration.mjs +1 -0
  307. package/dist/runtime/register/component/lifecycle/platform.mjs +1 -1
  308. package/dist/runtime/register/component/lifecycle.mjs +1 -1
  309. package/dist/runtime/register/component/methods.mjs +1 -1
  310. package/dist/runtime/register/component/options.mjs +1 -1
  311. package/dist/runtime/register/component/props.mjs +1 -1
  312. package/dist/runtime/register/component/registerDefinition.mjs +1 -1
  313. package/dist/runtime/register/component/registerNativeDefinition.mjs +1 -1
  314. package/dist/runtime/register/component.mjs +1 -1
  315. package/dist/runtime/register/inline.mjs +1 -1
  316. package/dist/runtime/register/runtimeInstance/methodBridge.mjs +1 -1
  317. package/dist/runtime/register/runtimeInstance/provideContext.mjs +1 -1
  318. package/dist/runtime/register/runtimeInstance/setupContext.mjs +1 -1
  319. package/dist/runtime/register/runtimeInstance/setupPhase.mjs +1 -1
  320. package/dist/runtime/register/runtimeInstance/setupSnapshot.mjs +1 -1
  321. package/dist/runtime/register/runtimeInstance/utils.mjs +1 -1
  322. package/dist/runtime/register/runtimeInstance.mjs +1 -1
  323. package/dist/runtime/register/setDataFrequencyWarning.mjs +1 -1
  324. package/dist/runtime/register/setup.mjs +1 -1
  325. package/dist/runtime/register/snapshot.mjs +1 -1
  326. package/dist/runtime/register/watch.mjs +1 -1
  327. package/dist/runtime/scopedSlots.mjs +1 -1
  328. package/dist/runtime/selectorQuery.mjs +1 -1
  329. package/dist/runtime/template.mjs +1 -1
  330. package/dist/runtime/templateRefs/helpers.mjs +1 -1
  331. package/dist/runtime/templateRefs.mjs +1 -1
  332. package/dist/runtime/uniAppHost.mjs +1 -1
  333. package/dist/runtime/updatePerformance.mjs +1 -1
  334. package/dist/runtime/use.mjs +1 -1
  335. package/dist/runtime/vueCompat/context.mjs +1 -1
  336. package/dist/runtime/vueCompat/model.mjs +1 -1
  337. package/dist/runtime/vueCompat/router.mjs +1 -1
  338. package/dist/runtime/vueCompat/templateRef.mjs +1 -1
  339. package/dist/scheduler.mjs +1 -1
  340. package/dist/store/base.mjs +1 -1
  341. package/dist/store/define/create.mjs +1 -1
  342. package/dist/store/define.mjs +1 -1
  343. package/dist/store/view.mjs +1 -1
  344. package/package.json +7 -7
  345. /package/dist/_virtual/{_@oxc-project_runtime@0.150.0 → _@oxc-project_runtime@0.151.0}/helpers/esm/defineProperty.mjs +0 -0
  346. /package/dist/_virtual/{_@oxc-project_runtime@0.150.0 → _@oxc-project_runtime@0.151.0}/helpers/esm/toPrimitive.mjs +0 -0
  347. /package/dist/_virtual/{_@oxc-project_runtime@0.150.0 → _@oxc-project_runtime@0.151.0}/helpers/esm/toPropertyKey.mjs +0 -0
  348. /package/dist/_virtual/{_@oxc-project_runtime@0.150.0 → _@oxc-project_runtime@0.151.0}/helpers/esm/typeof.mjs +0 -0
@@ -33,7 +33,7 @@ function cloneInitialSnapshotValue(value, cache = /* @__PURE__ */ new WeakMap())
33
33
  return next;
34
34
  }
35
35
  function mergeBufferedSetDataPayload(buffered, incoming) {
36
- const merged = buffered !== null && buffered !== void 0 ? buffered : {};
36
+ const merged = buffered ?? {};
37
37
  for (const [path, value] of Object.entries(incoming)) {
38
38
  let ancestorPath;
39
39
  for (const candidate of Object.keys(merged)) if (path.startsWith(`${candidate}.`)) {
@@ -61,45 +61,41 @@ function resolveInitialSnapshotFromNativeData(target, omitKeys, extraEntries) {
61
61
  const omitSet = Array.isArray(omitKeys) && omitKeys.length ? new Set(omitKeys) : void 0;
62
62
  const snapshot = {};
63
63
  if (data && typeof data === "object") for (const [key, value] of Object.entries(data)) {
64
- if (omitSet === null || omitSet === void 0 ? void 0 : omitSet.has(key)) continue;
64
+ if (omitSet?.has(key)) continue;
65
65
  snapshot[key] = cloneInitialSnapshotValue(value);
66
66
  }
67
67
  if (extraEntries) for (const [key, value] of Object.entries(extraEntries)) {
68
- if (omitSet === null || omitSet === void 0 ? void 0 : omitSet.has(key)) continue;
68
+ if (omitSet?.has(key)) continue;
69
69
  snapshot[key] = cloneInitialSnapshotValue(value);
70
70
  }
71
71
  return snapshot;
72
72
  }
73
73
  function hasTemplateRuntimeBindings(runtimeApp) {
74
- return Boolean(runtimeApp === null || runtimeApp === void 0 ? void 0 : runtimeApp.__wevuHasTemplateRuntimeBindings);
74
+ return Boolean(runtimeApp?.__wevuHasTemplateRuntimeBindings);
75
75
  }
76
76
  /**
77
77
  * 挂载运行时实例(框架内部注册流程使用)。
78
78
  * @internal
79
79
  */
80
80
  function mountRuntimeInstance(target, runtimeApp, watchMap, setup, options) {
81
- var _runtime$proxy, _runtime$state, _runtime$setupState, _computed, _runtime$methods, _watch, _bindModel, _snapshot, _unmount;
82
81
  if (target.__wevu) return target.__wevu;
83
82
  const runtimeSetDataOptions = runtimeApp.__wevuSetDataOptions;
84
83
  const scopedSlotHooks = hasTemplateRuntimeBindings(runtimeApp) ? requireRuntimeCapability("scopedSlots", "mountRuntimeInstance(scoped-slot bindings)") : void 0;
85
- const scopedSlotState = scopedSlotHooks === null || scopedSlotHooks === void 0 ? void 0 : scopedSlotHooks.prepareMount(target);
84
+ const scopedSlotState = scopedSlotHooks?.prepareMount(target);
86
85
  const templateRefBindings = target.__wevuTemplateRefs;
87
86
  if (Array.isArray(templateRefBindings) && templateRefBindings.length) requireRuntimeCapability("templateRefs", "mountRuntimeInstance(template refs)");
88
- const highFrequencyWarningHooks = isSetDataHighFrequencyWarningRequested(runtimeSetDataOptions === null || runtimeSetDataOptions === void 0 ? void 0 : runtimeSetDataOptions.highFrequencyWarning) ? requireRuntimeCapability("setDataHighFrequencyWarning", "mountRuntimeInstance(setData.highFrequencyWarning)") : void 0;
87
+ const highFrequencyWarningHooks = isSetDataHighFrequencyWarningRequested(runtimeSetDataOptions?.highFrequencyWarning) ? requireRuntimeCapability("setDataHighFrequencyWarning", "mountRuntimeInstance(setData.highFrequencyWarning)") : void 0;
89
88
  attachRuntimeProvideParentContext(target, runtimeApp);
90
89
  safeMarkNoSetData(target);
91
- const suspendWhenHidden = Boolean(runtimeSetDataOptions === null || runtimeSetDataOptions === void 0 ? void 0 : runtimeSetDataOptions.suspendWhenHidden);
90
+ const suspendWhenHidden = Boolean(runtimeSetDataOptions?.suspendWhenHidden);
92
91
  const targetLabel = typeof target.route === "string" && target.route ? `page:${target.route}` : typeof target.is === "string" && target.is ? `component:${target.is}` : "unknown-target";
93
- const highFrequencyWarning = highFrequencyWarningHooks === null || highFrequencyWarningHooks === void 0 ? void 0 : highFrequencyWarningHooks.createMonitor({
94
- option: runtimeSetDataOptions === null || runtimeSetDataOptions === void 0 ? void 0 : runtimeSetDataOptions.highFrequencyWarning,
92
+ const highFrequencyWarning = highFrequencyWarningHooks?.createMonitor({
93
+ option: runtimeSetDataOptions?.highFrequencyWarning,
95
94
  targetLabel,
96
- isInPageScrollHook: () => {
97
- var _WEVU_PAGE_SCROLL_HOO;
98
- return Number((_WEVU_PAGE_SCROLL_HOO = target[WEVU_PAGE_SCROLL_HOOK_DEPTH_KEY]) !== null && _WEVU_PAGE_SCROLL_HOO !== void 0 ? _WEVU_PAGE_SCROLL_HOO : 0) > 0;
99
- }
95
+ isInPageScrollHook: () => Number(target[WEVU_PAGE_SCROLL_HOOK_DEPTH_KEY] ?? 0) > 0
100
96
  });
101
97
  let visible = true;
102
- let enabled = !(options === null || options === void 0 ? void 0 : options.deferSetData);
98
+ let enabled = !options?.deferSetData;
103
99
  let disposed = false;
104
100
  let dispatchGeneration = 0;
105
101
  let pendingPayload;
@@ -121,8 +117,8 @@ function mountRuntimeInstance(target, runtimeApp, watchMap, setup, options) {
121
117
  };
122
118
  const flushHostCommitWaiter = () => {
123
119
  if (pendingHostCommits || pendingPayload) return;
124
- if (hostCommitFailed) rejectHostCommit === null || rejectHostCommit === void 0 || rejectHostCommit(hostCommitCause);
125
- else resolveHostCommit === null || resolveHostCommit === void 0 || resolveHostCommit();
120
+ if (hostCommitFailed) rejectHostCommit?.(hostCommitCause);
121
+ else resolveHostCommit?.();
126
122
  hostCommitPromise = void 0;
127
123
  resolveHostCommit = void 0;
128
124
  rejectHostCommit = void 0;
@@ -144,9 +140,8 @@ function mountRuntimeInstance(target, runtimeApp, watchMap, setup, options) {
144
140
  configurable: true,
145
141
  enumerable: false,
146
142
  get: () => {
147
- var _hostCommitPromise;
148
143
  if (!pendingHostCommits && !pendingPayload) return hostCommitFailed ? Promise.reject(hostCommitCause) : void 0;
149
- (_hostCommitPromise = hostCommitPromise) !== null && _hostCommitPromise !== void 0 || (hostCommitPromise = new Promise((resolve, reject) => {
144
+ hostCommitPromise ?? (hostCommitPromise = new Promise((resolve, reject) => {
150
145
  resolveHostCommit = resolve;
151
146
  rejectHostCommit = reject;
152
147
  }));
@@ -154,10 +149,7 @@ function mountRuntimeInstance(target, runtimeApp, watchMap, setup, options) {
154
149
  }
155
150
  });
156
151
  const refreshOwnerSnapshot = () => {
157
- if (scopedSlotState) {
158
- var _runtimeCapabilityReg;
159
- (_runtimeCapabilityReg = runtimeCapabilityRegistry.scopedSlots) === null || _runtimeCapabilityReg === void 0 || _runtimeCapabilityReg.refresh(target, scopedSlotState);
160
- }
152
+ if (scopedSlotState) runtimeCapabilityRegistry.scopedSlots?.refresh(target, scopedSlotState);
161
153
  };
162
154
  const completeSuccessfulSetData = () => {
163
155
  if (disposed) return;
@@ -169,7 +161,7 @@ function mountRuntimeInstance(target, runtimeApp, watchMap, setup, options) {
169
161
  requireRuntimeCapability("templateRefs", "mountRuntimeInstance(template ref completion)").schedule(target, ownsHostCommit ? finishHostCommit : void 0, target, ownsHostCommit ? failHostCommit : void 0);
170
162
  };
171
163
  const syncNativeOwnerId = () => {
172
- if (scopedSlotState) scopedSlotHooks === null || scopedSlotHooks === void 0 || scopedSlotHooks.syncNativeOwnerId(target, scopedSlotState);
164
+ if (scopedSlotState) scopedSlotHooks?.syncNativeOwnerId(target, scopedSlotState);
173
165
  };
174
166
  const appendPendingSettlement = (settle) => {
175
167
  const record = {
@@ -259,7 +251,7 @@ function mountRuntimeInstance(target, runtimeApp, watchMap, setup, options) {
259
251
  };
260
252
  const baseMountAdapter = {
261
253
  setData(payload, callback) {
262
- highFrequencyWarning === null || highFrequencyWarning === void 0 || highFrequencyWarning();
254
+ highFrequencyWarning?.();
263
255
  if (!enabled || suspendWhenHidden && !visible) {
264
256
  bufferPayload(payload);
265
257
  if (callback) pendingRawCallbacks.push(callback);
@@ -272,7 +264,7 @@ function mountRuntimeInstance(target, runtimeApp, watchMap, setup, options) {
272
264
  const setData = resolveNativeSetData(target);
273
265
  if (!setData) {
274
266
  try {
275
- callback === null || callback === void 0 || callback();
267
+ callback?.();
276
268
  } catch (cause) {
277
269
  finishHostCommit("failed", cause);
278
270
  throw cause;
@@ -296,7 +288,7 @@ function mountRuntimeInstance(target, runtimeApp, watchMap, setup, options) {
296
288
  };
297
289
  const nativeCallback = () => {
298
290
  try {
299
- callback === null || callback === void 0 || callback();
291
+ callback?.();
300
292
  } catch (cause) {
301
293
  handleFailure(cause);
302
294
  throw cause;
@@ -326,7 +318,7 @@ function mountRuntimeInstance(target, runtimeApp, watchMap, setup, options) {
326
318
  return result;
327
319
  },
328
320
  __wevu_dispatchSetData(payload, settle) {
329
- highFrequencyWarning === null || highFrequencyWarning === void 0 || highFrequencyWarning();
321
+ highFrequencyWarning?.();
330
322
  if (disposed) {
331
323
  settle("abandoned");
332
324
  return;
@@ -388,13 +380,13 @@ function mountRuntimeInstance(target, runtimeApp, watchMap, setup, options) {
388
380
  value: targetProperties,
389
381
  writable: false
390
382
  });
391
- if (Array.isArray(options === null || options === void 0 ? void 0 : options.snapshotOmitKeys) && options.snapshotOmitKeys.length) Object.defineProperty(baseMountAdapter, "__wevu_snapshotOmitKeys", {
383
+ if (Array.isArray(options?.snapshotOmitKeys) && options.snapshotOmitKeys.length) Object.defineProperty(baseMountAdapter, "__wevu_snapshotOmitKeys", {
392
384
  configurable: true,
393
385
  enumerable: false,
394
386
  value: options.snapshotOmitKeys,
395
387
  writable: false
396
388
  });
397
- const initialSnapshot = resolveInitialSnapshotFromNativeData(target, options === null || options === void 0 ? void 0 : options.snapshotOmitKeys);
389
+ const initialSnapshot = resolveInitialSnapshotFromNativeData(target, options?.snapshotOmitKeys);
398
390
  if (initialSnapshot && Object.keys(initialSnapshot).length) Object.defineProperty(baseMountAdapter, "__wevu_initialSnapshot", {
399
391
  configurable: true,
400
392
  enumerable: false,
@@ -407,7 +399,7 @@ function mountRuntimeInstance(target, runtimeApp, watchMap, setup, options) {
407
399
  value: { [WEVU_SLOT_OWNER_ID_KEY]: scopedSlotState.ownerId },
408
400
  writable: false
409
401
  });
410
- if (Boolean(options === null || options === void 0 ? void 0 : options.deferSetData) || Boolean(setup) || Boolean(targetProperties && typeof targetProperties === "object" && Object.keys(targetProperties).length > 0)) Object.defineProperty(baseMountAdapter, "__wevu_deferInitialSnapshot", {
402
+ if (Boolean(options?.deferSetData) || Boolean(setup) || Boolean(targetProperties && typeof targetProperties === "object" && Object.keys(targetProperties).length > 0)) Object.defineProperty(baseMountAdapter, "__wevu_deferInitialSnapshot", {
411
403
  configurable: true,
412
404
  enumerable: false,
413
405
  value: true,
@@ -415,22 +407,22 @@ function mountRuntimeInstance(target, runtimeApp, watchMap, setup, options) {
415
407
  });
416
408
  const runtime = runtimeApp.mount(baseMountAdapter);
417
409
  attachRuntimeInstance(runtime, target);
418
- const runtimeProxy = (_runtime$proxy = runtime === null || runtime === void 0 ? void 0 : runtime.proxy) !== null && _runtime$proxy !== void 0 ? _runtime$proxy : {};
419
- const runtimeState = (_runtime$state = runtime === null || runtime === void 0 ? void 0 : runtime.state) !== null && _runtime$state !== void 0 ? _runtime$state : {};
420
- const runtimeSetupState = (_runtime$setupState = runtime === null || runtime === void 0 ? void 0 : runtime.setupState) !== null && _runtime$setupState !== void 0 ? _runtime$setupState : Object.create(null);
410
+ const runtimeProxy = runtime?.proxy ?? {};
411
+ const runtimeState = runtime?.state ?? {};
412
+ const runtimeSetupState = runtime?.setupState ?? Object.create(null);
421
413
  if (runtimeState && typeof runtimeState === "object") {
422
414
  attachRuntimeRef(runtimeState, runtime);
423
415
  attachNativeInstanceRef(runtimeState, target);
424
416
  }
425
- const runtimeComputed = (_computed = runtime === null || runtime === void 0 ? void 0 : runtime.computed) !== null && _computed !== void 0 ? _computed : Object.create(null);
426
- if (!(runtime === null || runtime === void 0 ? void 0 : runtime.methods)) try {
417
+ const runtimeComputed = runtime?.computed ?? Object.create(null);
418
+ if (!runtime?.methods) try {
427
419
  runtime.methods = Object.create(null);
428
- } catch (_unused) {}
429
- const runtimeMethods = (_runtime$methods = runtime === null || runtime === void 0 ? void 0 : runtime.methods) !== null && _runtime$methods !== void 0 ? _runtime$methods : Object.create(null);
430
- const runtimeWatch = (_watch = runtime === null || runtime === void 0 ? void 0 : runtime.watch) !== null && _watch !== void 0 ? _watch : (() => createNoopWatchStopHandle());
431
- const runtimeBindModel = (_bindModel = runtime === null || runtime === void 0 ? void 0 : runtime.bindModel) !== null && _bindModel !== void 0 ? _bindModel : (() => {});
420
+ } catch {}
421
+ const runtimeMethods = runtime?.methods ?? Object.create(null);
422
+ const runtimeWatch = runtime?.watch ?? (() => createNoopWatchStopHandle());
423
+ const runtimeBindModel = runtime?.bindModel ?? (() => {});
432
424
  const runtimeWithDefaults = {
433
- ...runtime !== null && runtime !== void 0 ? runtime : {},
425
+ ...runtime ?? {},
434
426
  state: runtimeState,
435
427
  setupState: runtimeSetupState,
436
428
  proxy: runtimeProxy,
@@ -438,8 +430,8 @@ function mountRuntimeInstance(target, runtimeApp, watchMap, setup, options) {
438
430
  computed: runtimeComputed,
439
431
  watch: runtimeWatch,
440
432
  bindModel: runtimeBindModel,
441
- snapshot: (_snapshot = runtime === null || runtime === void 0 ? void 0 : runtime.snapshot) !== null && _snapshot !== void 0 ? _snapshot : (() => Object.create(null)),
442
- unmount: (_unmount = runtime === null || runtime === void 0 ? void 0 : runtime.unmount) !== null && _unmount !== void 0 ? _unmount : (() => {})
433
+ snapshot: runtime?.snapshot ?? (() => Object.create(null)),
434
+ unmount: runtime?.unmount ?? (() => {})
443
435
  };
444
436
  Object.defineProperty(runtimeWithDefaults, "__wevu_initialRuntimeSnapshot", {
445
437
  configurable: true,
@@ -473,12 +465,11 @@ function mountRuntimeInstance(target, runtimeApp, watchMap, setup, options) {
473
465
  target.__wevu = runtimeWithDefaults;
474
466
  const runtimeProps = ensureRuntimeProps(target, runtimeState);
475
467
  attachRuntimeSlots(runtimeState, runtimeProps);
476
- if (scopedSlotState) scopedSlotHooks === null || scopedSlotHooks === void 0 || scopedSlotHooks.attachMount(target, runtimeWithDefaults, scopedSlotState, Boolean(options === null || options === void 0 ? void 0 : options.deferSetData));
468
+ if (scopedSlotState) scopedSlotHooks?.attachMount(target, runtimeWithDefaults, scopedSlotState, Boolean(options?.deferSetData));
477
469
  syncNativeOwnerId();
478
470
  const watchStops = watchMap ? registerWatches(runtimeWithDefaults, watchMap, target, { deferMissingSourceBaseline: Boolean(setup) }) : [];
479
471
  if (watchStops.length) target[WEVU_WATCH_STOPS_KEY] = watchStops;
480
472
  if (setup) try {
481
- var _getMiniProgramRuntim;
482
473
  runRuntimeSetupPhase({
483
474
  target,
484
475
  runtime,
@@ -487,27 +478,22 @@ function mountRuntimeInstance(target, runtimeApp, watchMap, setup, options) {
487
478
  runtimeProxy,
488
479
  setup
489
480
  });
490
- if (typeof ((_getMiniProgramRuntim = getMiniProgramRuntimeGlobalObject()) === null || _getMiniProgramRuntim === void 0 || (_getMiniProgramRuntim = _getMiniProgramRuntim[WEAPP_VITE_STATEFUL_HMR_BRIDGE_KEY]) === null || _getMiniProgramRuntim === void 0 ? void 0 : _getMiniProgramRuntim.trackWevuComponent) === "function") {
491
- var _runtimeWithDefaults$;
481
+ if (typeof getMiniProgramRuntimeGlobalObject()?.[WEAPP_VITE_STATEFUL_HMR_BRIDGE_KEY]?.trackWevuComponent === "function") {
492
482
  const initialReactiveSetupSnapshot = {};
493
- for (const [key, value] of Object.entries((_runtimeWithDefaults$ = runtimeWithDefaults.setupState) !== null && _runtimeWithDefaults$ !== void 0 ? _runtimeWithDefaults$ : {})) if (isReactive(value)) initialReactiveSetupSnapshot[key] = cloneInitialSnapshotValue(value);
483
+ for (const [key, value] of Object.entries(runtimeWithDefaults.setupState ?? {})) if (isReactive(value)) initialReactiveSetupSnapshot[key] = cloneInitialSnapshotValue(value);
494
484
  initialReactiveSetupSnapshots.set(runtimeWithDefaults, initialReactiveSetupSnapshot);
495
485
  }
496
- if (!(options === null || options === void 0 ? void 0 : options.deferSetData)) {
497
- var _runtimeWithSyncFlush;
498
- (_runtimeWithSyncFlush = runtimeWithSyncFlush.__wevu_flushSetupSnapshotSync) === null || _runtimeWithSyncFlush === void 0 || _runtimeWithSyncFlush.call(runtimeWithSyncFlush);
499
- }
500
- if (!(options === null || options === void 0 ? void 0 : options.deferSetData)) refreshOwnerSnapshot();
486
+ if (!options?.deferSetData) runtimeWithSyncFlush.__wevu_flushSetupSnapshotSync?.();
487
+ if (!options?.deferSetData) refreshOwnerSnapshot();
501
488
  for (const stop of watchStops) stop.resume();
502
489
  } catch (error) {
503
490
  try {
504
491
  teardownRuntimeInstance(target, { skipHooks: true });
505
- } catch (_unused2) {}
492
+ } catch {}
506
493
  throw error;
507
494
  }
508
- else if (!(options === null || options === void 0 ? void 0 : options.deferSetData) && target.properties && typeof target.properties === "object" && Object.keys(target.properties).length > 0) {
509
- var _runtimeWithSyncFlush2;
510
- (_runtimeWithSyncFlush2 = runtimeWithSyncFlush.__wevu_flushSetupSnapshotSync) === null || _runtimeWithSyncFlush2 === void 0 || _runtimeWithSyncFlush2.call(runtimeWithSyncFlush);
495
+ else if (!options?.deferSetData && target.properties && typeof target.properties === "object" && Object.keys(target.properties).length > 0) {
496
+ runtimeWithSyncFlush.__wevu_flushSetupSnapshotSync?.();
511
497
  refreshOwnerSnapshot();
512
498
  }
513
499
  bridgeRuntimeMethodsToTarget(target, runtime);
@@ -515,18 +501,17 @@ function mountRuntimeInstance(target, runtimeApp, watchMap, setup, options) {
515
501
  }
516
502
  function preserveRuntimeFacadeIdentity(target, previousRuntime, nextRuntime) {
517
503
  for (const key of Reflect.ownKeys(previousRuntime)) if (!Reflect.has(nextRuntime, key)) {
518
- const descriptor = Reflect.getOwnPropertyDescriptor(previousRuntime, key);
519
- if (descriptor === null || descriptor === void 0 ? void 0 : descriptor.configurable) Reflect.deleteProperty(previousRuntime, key);
504
+ if (Reflect.getOwnPropertyDescriptor(previousRuntime, key)?.configurable) Reflect.deleteProperty(previousRuntime, key);
520
505
  }
521
506
  for (const key of Reflect.ownKeys(nextRuntime)) {
522
507
  const descriptor = Reflect.getOwnPropertyDescriptor(nextRuntime, key);
523
508
  if (!descriptor) continue;
524
509
  try {
525
510
  Reflect.defineProperty(previousRuntime, key, descriptor);
526
- } catch (_unused3) {
511
+ } catch {
527
512
  try {
528
513
  previousRuntime[key] = nextRuntime[key];
529
- } catch (_unused4) {}
514
+ } catch {}
530
515
  }
531
516
  }
532
517
  attachRuntimeRef(previousRuntime.state, previousRuntime);
@@ -545,9 +530,9 @@ function createRuntimeStateSnapshot(runtime, nativeData, preferredState) {
545
530
  const runtimeState = runtime.state;
546
531
  const setupState = runtime.setupState;
547
532
  const snapshot = {};
548
- for (const key of Object.keys(nativeData !== null && nativeData !== void 0 ? nativeData : {})) {
533
+ for (const key of Object.keys(nativeData ?? {})) {
549
534
  if (!Object.prototype.hasOwnProperty.call(runtimeState, key)) continue;
550
- const setupBinding = setupState === null || setupState === void 0 ? void 0 : setupState[key];
535
+ const setupBinding = setupState?.[key];
551
536
  if (setupState && Object.prototype.hasOwnProperty.call(setupState, key) && !isRef(setupBinding) && !isReactive(setupBinding)) continue;
552
537
  if (preferredState && Object.prototype.hasOwnProperty.call(preferredState, key)) {
553
538
  snapshot[key] = cloneInitialSnapshotValue(preferredState[key]);
@@ -558,47 +543,42 @@ function createRuntimeStateSnapshot(runtime, nativeData, preferredState) {
558
543
  return snapshot;
559
544
  }
560
545
  function syncRuntimeStateFromNativeData(target, options) {
561
- var _options$nativeData;
562
546
  const runtime = target.__wevu;
563
- const runtimeState = runtime === null || runtime === void 0 ? void 0 : runtime.state;
564
- const setupState = runtime === null || runtime === void 0 ? void 0 : runtime.setupState;
565
- const nativeData = (_options$nativeData = options === null || options === void 0 ? void 0 : options.nativeData) !== null && _options$nativeData !== void 0 ? _options$nativeData : target.data;
547
+ const runtimeState = runtime?.state;
548
+ const setupState = runtime?.setupState;
549
+ const nativeData = options?.nativeData ?? target.data;
566
550
  if (!runtimeState || typeof runtimeState !== "object" || !nativeData || typeof nativeData !== "object") return;
567
- const initialRuntimeSnapshot = runtime === null || runtime === void 0 ? void 0 : runtime.__wevu_initialRuntimeSnapshot;
551
+ const initialRuntimeSnapshot = runtime?.__wevu_initialRuntimeSnapshot;
568
552
  for (const [key, value] of Object.entries(nativeData)) {
569
553
  if (!key || key === "undefined") continue;
570
554
  if (Object.prototype.hasOwnProperty.call(runtimeState, key)) try {
571
- const setupBinding = setupState === null || setupState === void 0 ? void 0 : setupState[key];
555
+ const setupBinding = setupState?.[key];
572
556
  const runtimeValue = cloneInitialSnapshotValue(value);
573
557
  if (setupState && Object.prototype.hasOwnProperty.call(setupState, key)) {
574
- if (!(options === null || options === void 0 ? void 0 : options.includeSetupState) || !isRef(setupBinding) && !isReactive(setupBinding)) continue;
558
+ if (!options?.includeSetupState || !isRef(setupBinding) && !isReactive(setupBinding)) continue;
575
559
  }
576
- if (!(options === null || options === void 0 ? void 0 : options.includeSetupState) && initialRuntimeSnapshot && Object.prototype.hasOwnProperty.call(initialRuntimeSnapshot, key) && !isDeepEqualValue(runtimeState[key], initialRuntimeSnapshot[key], 20, { keys: 1e4 })) continue;
577
- if (!(options === null || options === void 0 ? void 0 : options.includeSetupState) && initialRuntimeSnapshot && !Object.prototype.hasOwnProperty.call(initialRuntimeSnapshot, key)) continue;
560
+ if (!options?.includeSetupState && initialRuntimeSnapshot && Object.prototype.hasOwnProperty.call(initialRuntimeSnapshot, key) && !isDeepEqualValue(runtimeState[key], initialRuntimeSnapshot[key], 20, { keys: 1e4 })) continue;
561
+ if (!options?.includeSetupState && initialRuntimeSnapshot && !Object.prototype.hasOwnProperty.call(initialRuntimeSnapshot, key)) continue;
578
562
  if (isRef(setupBinding)) {
579
563
  setupBinding.value = runtimeValue;
580
564
  continue;
581
565
  }
582
566
  if (isReactive(setupBinding) && runtimeValue && typeof runtimeValue === "object") {
583
- var _options$initialSetup;
584
- restoreReactiveSetupSnapshot(setupBinding, runtimeValue, options === null || options === void 0 || (_options$initialSetup = options.initialSetupState) === null || _options$initialSetup === void 0 ? void 0 : _options$initialSetup[key]);
567
+ restoreReactiveSetupSnapshot(setupBinding, runtimeValue, options?.initialSetupState?.[key]);
585
568
  continue;
586
569
  }
587
570
  runtimeState[key] = runtimeValue;
588
- } catch (_unused5) {}
571
+ } catch {}
589
572
  }
590
573
  }
591
574
  function enableDeferredSetData(target, options) {
592
- var _target$__wevu, _adapter$__wevu_enabl, _wevu, _wevu$__wevu_flushSet;
593
- const adapter = (_target$__wevu = target.__wevu) === null || _target$__wevu === void 0 ? void 0 : _target$__wevu.adapter;
594
- syncRuntimeStateFromNativeData(target, { includeSetupState: options === null || options === void 0 ? void 0 : options.rehydrateSetupState });
595
- adapter === null || adapter === void 0 || (_adapter$__wevu_enabl = adapter.__wevu_enableSetData) === null || _adapter$__wevu_enabl === void 0 || _adapter$__wevu_enabl.call(adapter, true);
596
- (_wevu = target.__wevu) === null || _wevu === void 0 || (_wevu$__wevu_flushSet = _wevu.__wevu_flushSetupSnapshotSync) === null || _wevu$__wevu_flushSet === void 0 || _wevu$__wevu_flushSet.call(_wevu);
575
+ const adapter = target.__wevu?.adapter;
576
+ syncRuntimeStateFromNativeData(target, { includeSetupState: options?.rehydrateSetupState });
577
+ adapter?.__wevu_enableSetData?.(true);
578
+ target.__wevu?.__wevu_flushSetupSnapshotSync?.();
597
579
  }
598
580
  function setRuntimeSetDataVisibility(target, visible) {
599
- var _target$__wevu2, _adapter$__wevu_setVi;
600
- const adapter = (_target$__wevu2 = target.__wevu) === null || _target$__wevu2 === void 0 ? void 0 : _target$__wevu2.adapter;
601
- adapter === null || adapter === void 0 || (_adapter$__wevu_setVi = adapter.__wevu_setVisibility) === null || _adapter$__wevu_setVi === void 0 || _adapter$__wevu_setVi.call(adapter, visible);
581
+ (target.__wevu?.adapter)?.__wevu_setVisibility?.(visible);
602
582
  }
603
583
  /**
604
584
  * 卸载运行时实例(框架内部注册流程使用)。
@@ -610,24 +590,20 @@ function teardownRuntimeInstance(target, options) {
610
590
  const effectScope$1 = target[WEVU_EFFECT_SCOPE_KEY];
611
591
  runTeardownSteps([
612
592
  () => {
613
- var _target$WEVU_HOOKS_KE;
614
- if (!(options === null || options === void 0 ? void 0 : options.skipHooks) && runtime && ((_target$WEVU_HOOKS_KE = target[WEVU_HOOKS_KEY]) === null || _target$WEVU_HOOKS_KE === void 0 ? void 0 : _target$WEVU_HOOKS_KE[WEVU_ON_BEFORE_UNMOUNT_HOOK])) {
615
- if (effectScope$1 === null || effectScope$1 === void 0 ? void 0 : effectScope$1.active) effectScope$1.run(() => callHookList(target, WEVU_ON_BEFORE_UNMOUNT_HOOK));
593
+ if (!options?.skipHooks && runtime && target[WEVU_HOOKS_KEY]?.[WEVU_ON_BEFORE_UNMOUNT_HOOK]) {
594
+ if (effectScope$1?.active) effectScope$1.run(() => callHookList(target, WEVU_ON_BEFORE_UNMOUNT_HOOK));
616
595
  else {
617
596
  const teardownScope = effectScope(true);
618
597
  runTeardownSteps([() => teardownScope.run(() => callHookList(target, WEVU_ON_BEFORE_UNMOUNT_HOOK)), () => teardownScope.stop()]);
619
598
  }
620
599
  }
621
600
  },
622
- () => {
623
- var _runtimeCapabilityReg2;
624
- return (_runtimeCapabilityReg2 = runtimeCapabilityRegistry.scopedSlots) === null || _runtimeCapabilityReg2 === void 0 ? void 0 : _runtimeCapabilityReg2.teardown(target);
625
- },
601
+ () => runtimeCapabilityRegistry.scopedSlots?.teardown(target),
626
602
  () => {
627
603
  if (Array.isArray(target.__wevuTemplateRefs) && target.__wevuTemplateRefs.length > 0) requireRuntimeCapability("templateRefs", "teardownRuntimeInstance(template refs)").clear(target);
628
604
  },
629
605
  () => {
630
- if (!(options === null || options === void 0 ? void 0 : options.skipHooks) && runtime && target[WEVU_HOOKS_KEY]) callHookList(target, "onUnload", []);
606
+ if (!options?.skipHooks && runtime && target[WEVU_HOOKS_KEY]) callHookList(target, "onUnload", []);
631
607
  },
632
608
  () => {
633
609
  if (target[WEVU_HOOKS_KEY]) target[WEVU_HOOKS_KEY] = void 0;
@@ -635,22 +611,20 @@ function teardownRuntimeInstance(target, options) {
635
611
  () => {
636
612
  if (Array.isArray(stops)) for (const stop of stops) try {
637
613
  stop();
638
- } catch (_unused6) {}
614
+ } catch {}
639
615
  },
640
616
  () => {
641
617
  target[WEVU_WATCH_STOPS_KEY] = void 0;
642
618
  },
643
619
  () => {
644
- effectScope$1 === null || effectScope$1 === void 0 || effectScope$1.stop();
620
+ effectScope$1?.stop();
645
621
  },
646
622
  () => {
647
623
  target[WEVU_EFFECT_SCOPE_KEY] = void 0;
648
624
  },
649
- () => runtime === null || runtime === void 0 ? void 0 : runtime.unmount(),
625
+ () => runtime?.unmount(),
650
626
  () => {
651
- var _adapter$__wevu_dispo;
652
- const adapter = runtime === null || runtime === void 0 ? void 0 : runtime.adapter;
653
- adapter === null || adapter === void 0 || (_adapter$__wevu_dispo = adapter.__wevu_disposeSetData) === null || _adapter$__wevu_dispo === void 0 || _adapter$__wevu_dispo.call(adapter);
627
+ (runtime?.adapter)?.__wevu_disposeSetData?.();
654
628
  },
655
629
  () => {
656
630
  delete target[WEVU_SETUP_CONTEXT_INSTANCE_KEY];
@@ -671,13 +645,13 @@ function teardownRuntimeInstance(target, options) {
671
645
  function refreshRuntimeInstance(target, runtimeApp, watchMap, setup, options) {
672
646
  const previousRuntime = target.__wevu;
673
647
  const initialSetupState = previousRuntime ? initialReactiveSetupSnapshots.get(previousRuntime) : void 0;
674
- const previousRuntimeState = previousRuntime ? createRuntimeStateSnapshot(previousRuntime, target.data, options === null || options === void 0 ? void 0 : options.stateSnapshot) : void 0;
648
+ const previousRuntimeState = previousRuntime ? createRuntimeStateSnapshot(previousRuntime, target.data, options?.stateSnapshot) : void 0;
675
649
  teardownRuntimeInstance(target, { skipHooks: true });
676
650
  const nextRuntime = mountRuntimeInstance(target, runtimeApp, watchMap, setup, {
677
651
  deferSetData: true,
678
- snapshotOmitKeys: options === null || options === void 0 ? void 0 : options.snapshotOmitKeys
652
+ snapshotOmitKeys: options?.snapshotOmitKeys
679
653
  });
680
- const stateSnapshot = previousRuntimeState !== null && previousRuntimeState !== void 0 ? previousRuntimeState : (options === null || options === void 0 ? void 0 : options.stateSnapshot) ? createRuntimeStateSnapshot(nextRuntime, options.stateSnapshot, options.stateSnapshot) : void 0;
654
+ const stateSnapshot = previousRuntimeState ?? (options?.stateSnapshot ? createRuntimeStateSnapshot(nextRuntime, options.stateSnapshot, options.stateSnapshot) : void 0);
681
655
  if (stateSnapshot) {
682
656
  const nativeData = target.data;
683
657
  if (nativeData && typeof nativeData === "object") Object.assign(nativeData, cloneInitialSnapshotValue(stateSnapshot));