@askrjs/askr 0.0.51 → 0.0.53

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 (651) hide show
  1. package/README.md +5 -1
  2. package/dist/{runtime/scheduler.js → access-Bg4RJNC8.js} +190 -20
  3. package/dist/actions/index.d.ts +2 -0
  4. package/dist/actions/index.js +103 -0
  5. package/dist/{common/attr-names.js → attr-names-CjhzmHOn.js} +1 -3
  6. package/dist/benchmark.d.ts +7 -4
  7. package/dist/benchmark.js +63 -13
  8. package/dist/boot/index.d.ts +62 -4
  9. package/dist/boot/index.js +1 -194
  10. package/dist/boot-j2KoN6ss.js +647 -0
  11. package/dist/cleanup-COv77su2.js +487 -0
  12. package/dist/component-internal-B3z7GXlD.js +614 -0
  13. package/dist/component-lifecycle-CO4hXlP4.js +357 -0
  14. package/dist/{runtime/component-scope.js → component-scope-CC3cojX9.js} +35 -9
  15. package/dist/component-scope-CvPba6O6.d.ts +12 -0
  16. package/dist/components/index.d.ts +17 -2
  17. package/dist/components/index.js +39 -1
  18. package/dist/compose-ref-Cc_YkUpM.js +92 -0
  19. package/dist/{foundations/utilities/compose-ref.d.ts → compose-ref-Cizq72-x.d.ts} +1 -2
  20. package/dist/control/index.d.ts +1 -3
  21. package/dist/control/index.js +1 -3
  22. package/dist/control-BQvNVfAd.d.ts +436 -0
  23. package/dist/control-BYyLTFyw.js +165 -0
  24. package/dist/control-Bf4Wkdvv.d.ts +9 -0
  25. package/dist/{common/control.js → control-DhFRTIoE.js} +1 -3
  26. package/dist/data/index.d.ts +2 -6
  27. package/dist/data/index.js +4 -5
  28. package/dist/data-DnxnDxD-.js +559 -0
  29. package/dist/{data/data-runtime.js → data-runtime-SJ1BSUvk.js} +35 -36
  30. package/dist/deferred-lKE8uR0z.js +386 -0
  31. package/dist/effect-BwnIvLah.js +260 -0
  32. package/dist/fastlane-Dw8SOBr9.js +343 -0
  33. package/dist/for-internal-BKf_Tnv1.js +1563 -0
  34. package/dist/foundations/icon/index.d.ts +68 -2
  35. package/dist/foundations/icon/index.js +85 -1
  36. package/dist/foundations/index.d.ts +2 -5
  37. package/dist/foundations/index.js +2 -5
  38. package/dist/foundations/interactions/index.d.ts +264 -6
  39. package/dist/foundations/interactions/index.js +1 -6
  40. package/dist/foundations/state/index.d.ts +32 -1
  41. package/dist/foundations/state/index.js +78 -1
  42. package/dist/foundations/structures/index.d.ts +2 -7
  43. package/dist/foundations/structures/index.js +2 -7
  44. package/dist/foundations/utilities/index.d.ts +2 -6
  45. package/dist/foundations/utilities/index.js +2 -5
  46. package/dist/fx/index.d.ts +190 -3
  47. package/dist/fx/index.js +454 -4
  48. package/dist/index-31Uoz_NS.d.ts +239 -0
  49. package/dist/index-Bki2rqcr.d.ts +233 -0
  50. package/dist/index-BnU0NPwM.d.ts +101 -0
  51. package/dist/index-D73jgYx1.d.ts +48 -0
  52. package/dist/{runtime/runtime.d.ts → index-R2JJIbM-.d.ts} +31 -9
  53. package/dist/index-SJXJkssx.d.ts +44 -0
  54. package/dist/index.d.ts +8 -13
  55. package/dist/index.js +150 -17
  56. package/dist/interactions-w7gQN4ha.js +280 -0
  57. package/dist/{data/invalidation-listeners.js → invalidation-listeners-Des3AHYs.js} +1 -3
  58. package/dist/{common/props.d.ts → jsx-CP0gmYwJ.d.ts} +17 -6
  59. package/dist/{common/jsx.js → jsx-CUpRxrLH.js} +1 -3
  60. package/dist/jsx-dev-runtime.d.ts +17 -5
  61. package/dist/jsx-dev-runtime.js +3 -10
  62. package/dist/jsx-runtime-92bV2hSa.d.ts +34 -0
  63. package/dist/jsx-runtime-BVVgDSdq.d.ts +1 -0
  64. package/dist/jsx-runtime.d.ts +3 -22
  65. package/dist/jsx-runtime.js +17 -20
  66. package/dist/{runtime/lifecycle-operations.js → lifecycle-operations-D9va7GOU.js} +9 -11
  67. package/dist/navigate-BVDCzOuB.d.ts +34 -0
  68. package/dist/navigate-CmPLSXyw.js +1449 -0
  69. package/dist/{runtime/portal.js → portal-CyU3Ucf2.js} +124 -35
  70. package/dist/query-registry-CQIT4mXr.js +73 -0
  71. package/dist/{common/render-context.js → render-context-Clw3rFiO.js} +14 -8
  72. package/dist/renderer-DzPjeLby.js +6197 -0
  73. package/dist/resource-operation-CEzfpnDk.js +276 -0
  74. package/dist/resources/index.d.ts +42 -3
  75. package/dist/resources/index.js +3 -4
  76. package/dist/{common/route-activity.js → route-activity-CNJfpwx-.js} +1 -3
  77. package/dist/route-matching-vJpvLVbX.js +515 -0
  78. package/dist/router/index.d.ts +166 -14
  79. package/dist/router/index.js +150 -12
  80. package/dist/{common/router.d.ts → router-CeYvjj5_.d.ts} +72 -29
  81. package/dist/{common/router-internal.js → router-internal-BC0w1_xk.js} +1 -3
  82. package/dist/{runtime/scheduler.d.ts → scheduler-CmLO4Dfm.d.ts} +1 -4
  83. package/dist/{runtime/selector.js → selector-DafVYzV4.js} +35 -20
  84. package/dist/{runtime/snapshot-source.js → snapshot-source-BB42xgwb.js} +1 -3
  85. package/dist/ssg/index.d.ts +252 -4
  86. package/dist/ssg/index.js +857 -1
  87. package/dist/ssr/index.d.ts +225 -8
  88. package/dist/ssr/index.js +3 -6
  89. package/dist/{common/ssr.js → ssr-CbQO5xd3.js} +1 -3
  90. package/dist/ssr-D3t80Rc0.js +1413 -0
  91. package/dist/{runtime/state.js → state-DPl8lffD.js} +4 -8
  92. package/dist/structures-DUB3HchX.js +221 -0
  93. package/dist/testing/index.d.ts +4 -4
  94. package/dist/testing/index.js +2 -7
  95. package/dist/{jsx/types.d.ts → types-DnQVG4ZY.d.ts} +2 -6
  96. package/dist/{foundations/utilities/use-id.js → utilities-C_CGX4Dz.js} +1 -3
  97. package/dist/{ssr/verify-hydration.js → verify-hydration-io9ahUeq.js} +2 -4
  98. package/dist/{common/vnode.js → vnode-CGMJYPMB.js} +2 -4
  99. package/package.json +63 -45
  100. package/dist/bench/components/benchmark-row.d.ts +0 -20
  101. package/dist/bench/components/benchmark-row.d.ts.map +0 -1
  102. package/dist/bench/components/benchmark-row.js +0 -42
  103. package/dist/bench/components/benchmark-row.js.map +0 -1
  104. package/dist/bench/components/benchmark-table.js +0 -25
  105. package/dist/bench/components/benchmark-table.js.map +0 -1
  106. package/dist/benchmark.d.ts.map +0 -1
  107. package/dist/benchmark.js.map +0 -1
  108. package/dist/bin/askr-ssg.d.ts +0 -28
  109. package/dist/bin/askr-ssg.d.ts.map +0 -1
  110. package/dist/bin/askr-ssg.js +0 -171
  111. package/dist/bin/askr-ssg.js.map +0 -1
  112. package/dist/boot/hydration.js +0 -140
  113. package/dist/boot/hydration.js.map +0 -1
  114. package/dist/boot/index.d.ts.map +0 -1
  115. package/dist/boot/index.js.map +0 -1
  116. package/dist/boot/root-lifecycle.d.ts +0 -15
  117. package/dist/boot/root-lifecycle.d.ts.map +0 -1
  118. package/dist/boot/root-lifecycle.js +0 -205
  119. package/dist/boot/root-lifecycle.js.map +0 -1
  120. package/dist/boot/route-startup.js +0 -45
  121. package/dist/boot/route-startup.js.map +0 -1
  122. package/dist/boot/types.d.ts +0 -62
  123. package/dist/boot/types.d.ts.map +0 -1
  124. package/dist/common/attr-names.js.map +0 -1
  125. package/dist/common/component.d.ts +0 -19
  126. package/dist/common/component.d.ts.map +0 -1
  127. package/dist/common/control.d.ts +0 -13
  128. package/dist/common/control.d.ts.map +0 -1
  129. package/dist/common/control.js.map +0 -1
  130. package/dist/common/env.js +0 -47
  131. package/dist/common/env.js.map +0 -1
  132. package/dist/common/error-boundary.d.ts +0 -16
  133. package/dist/common/error-boundary.d.ts.map +0 -1
  134. package/dist/common/invariant.js +0 -17
  135. package/dist/common/invariant.js.map +0 -1
  136. package/dist/common/jsx.d.ts +0 -23
  137. package/dist/common/jsx.d.ts.map +0 -1
  138. package/dist/common/jsx.js.map +0 -1
  139. package/dist/common/logger.js +0 -36
  140. package/dist/common/logger.js.map +0 -1
  141. package/dist/common/promise.js +0 -8
  142. package/dist/common/promise.js.map +0 -1
  143. package/dist/common/props.d.ts.map +0 -1
  144. package/dist/common/render-context.js.map +0 -1
  145. package/dist/common/route-activity.js.map +0 -1
  146. package/dist/common/router-internal.js.map +0 -1
  147. package/dist/common/router.d.ts.map +0 -1
  148. package/dist/common/ssr-errors.d.ts +0 -11
  149. package/dist/common/ssr-errors.d.ts.map +0 -1
  150. package/dist/common/ssr-errors.js +0 -16
  151. package/dist/common/ssr-errors.js.map +0 -1
  152. package/dist/common/ssr.d.ts +0 -42
  153. package/dist/common/ssr.d.ts.map +0 -1
  154. package/dist/common/ssr.js.map +0 -1
  155. package/dist/common/vnode.d.ts +0 -22
  156. package/dist/common/vnode.d.ts.map +0 -1
  157. package/dist/common/vnode.js.map +0 -1
  158. package/dist/components/error-boundary.d.ts +0 -15
  159. package/dist/components/error-boundary.d.ts.map +0 -1
  160. package/dist/components/error-boundary.js +0 -43
  161. package/dist/components/error-boundary.js.map +0 -1
  162. package/dist/components/link.d.ts +0 -68
  163. package/dist/components/link.d.ts.map +0 -1
  164. package/dist/components/link.js +0 -76
  165. package/dist/components/link.js.map +0 -1
  166. package/dist/control/case.d.ts +0 -19
  167. package/dist/control/case.d.ts.map +0 -1
  168. package/dist/control/case.js +0 -70
  169. package/dist/control/case.js.map +0 -1
  170. package/dist/control/for.d.ts +0 -24
  171. package/dist/control/for.d.ts.map +0 -1
  172. package/dist/control/for.js +0 -63
  173. package/dist/control/for.js.map +0 -1
  174. package/dist/control/shared.d.ts +0 -9
  175. package/dist/control/shared.d.ts.map +0 -1
  176. package/dist/control/shared.js +0 -20
  177. package/dist/control/shared.js.map +0 -1
  178. package/dist/control/show.d.ts +0 -15
  179. package/dist/control/show.d.ts.map +0 -1
  180. package/dist/control/show.js +0 -34
  181. package/dist/control/show.js.map +0 -1
  182. package/dist/data/data-runtime.d.ts +0 -28
  183. package/dist/data/data-runtime.d.ts.map +0 -1
  184. package/dist/data/data-runtime.js.map +0 -1
  185. package/dist/data/invalidation-listeners.js.map +0 -1
  186. package/dist/data/invalidation.d.ts +0 -9
  187. package/dist/data/invalidation.d.ts.map +0 -1
  188. package/dist/data/invalidation.js +0 -27
  189. package/dist/data/invalidation.js.map +0 -1
  190. package/dist/data/mutation-cell.d.ts +0 -28
  191. package/dist/data/mutation-cell.d.ts.map +0 -1
  192. package/dist/data/mutation-cell.js +0 -132
  193. package/dist/data/mutation-cell.js.map +0 -1
  194. package/dist/data/query-cell.d.ts +0 -46
  195. package/dist/data/query-cell.d.ts.map +0 -1
  196. package/dist/data/query-cell.js +0 -290
  197. package/dist/data/query-cell.js.map +0 -1
  198. package/dist/data/query-key.js +0 -42
  199. package/dist/data/query-key.js.map +0 -1
  200. package/dist/data/shared.js +0 -21
  201. package/dist/data/shared.js.map +0 -1
  202. package/dist/data/testing.js +0 -2
  203. package/dist/data/types.d.ts +0 -161
  204. package/dist/data/types.d.ts.map +0 -1
  205. package/dist/foundations/icon/icon.d.ts +0 -53
  206. package/dist/foundations/icon/icon.d.ts.map +0 -1
  207. package/dist/foundations/icon/icon.js +0 -88
  208. package/dist/foundations/icon/icon.js.map +0 -1
  209. package/dist/foundations/icon/icon.types.d.ts +0 -22
  210. package/dist/foundations/icon/icon.types.d.ts.map +0 -1
  211. package/dist/foundations/interactions/dismissable.d.ts +0 -72
  212. package/dist/foundations/interactions/dismissable.d.ts.map +0 -1
  213. package/dist/foundations/interactions/dismissable.js +0 -26
  214. package/dist/foundations/interactions/dismissable.js.map +0 -1
  215. package/dist/foundations/interactions/focusable.d.ts +0 -22
  216. package/dist/foundations/interactions/focusable.d.ts.map +0 -1
  217. package/dist/foundations/interactions/focusable.js +0 -18
  218. package/dist/foundations/interactions/focusable.js.map +0 -1
  219. package/dist/foundations/interactions/hoverable.d.ts +0 -26
  220. package/dist/foundations/interactions/hoverable.d.ts.map +0 -1
  221. package/dist/foundations/interactions/hoverable.js +0 -15
  222. package/dist/foundations/interactions/hoverable.js.map +0 -1
  223. package/dist/foundations/interactions/interaction-policy.d.ts +0 -50
  224. package/dist/foundations/interactions/interaction-policy.d.ts.map +0 -1
  225. package/dist/foundations/interactions/interaction-policy.js +0 -122
  226. package/dist/foundations/interactions/interaction-policy.js.map +0 -1
  227. package/dist/foundations/interactions/pressable.d.ts +0 -61
  228. package/dist/foundations/interactions/pressable.d.ts.map +0 -1
  229. package/dist/foundations/interactions/pressable.js +0 -51
  230. package/dist/foundations/interactions/pressable.js.map +0 -1
  231. package/dist/foundations/interactions/roving-focus.d.ts +0 -52
  232. package/dist/foundations/interactions/roving-focus.d.ts.map +0 -1
  233. package/dist/foundations/interactions/roving-focus.js +0 -71
  234. package/dist/foundations/interactions/roving-focus.js.map +0 -1
  235. package/dist/foundations/state/controllable.d.ts +0 -33
  236. package/dist/foundations/state/controllable.d.ts.map +0 -1
  237. package/dist/foundations/state/controllable.js +0 -82
  238. package/dist/foundations/state/controllable.js.map +0 -1
  239. package/dist/foundations/structures/collection.d.ts +0 -52
  240. package/dist/foundations/structures/collection.d.ts.map +0 -1
  241. package/dist/foundations/structures/collection.js +0 -51
  242. package/dist/foundations/structures/collection.js.map +0 -1
  243. package/dist/foundations/structures/layer.d.ts +0 -81
  244. package/dist/foundations/structures/layer.d.ts.map +0 -1
  245. package/dist/foundations/structures/layer.js +0 -81
  246. package/dist/foundations/structures/layer.js.map +0 -1
  247. package/dist/foundations/structures/layout.d.ts +0 -33
  248. package/dist/foundations/structures/layout.d.ts.map +0 -1
  249. package/dist/foundations/structures/layout.js +0 -13
  250. package/dist/foundations/structures/layout.js.map +0 -1
  251. package/dist/foundations/structures/portal.d.ts +0 -2
  252. package/dist/foundations/structures/portal.js +0 -3
  253. package/dist/foundations/structures/presence.d.ts +0 -37
  254. package/dist/foundations/structures/presence.d.ts.map +0 -1
  255. package/dist/foundations/structures/presence.js +0 -39
  256. package/dist/foundations/structures/presence.js.map +0 -1
  257. package/dist/foundations/structures/slot.d.ts +0 -35
  258. package/dist/foundations/structures/slot.d.ts.map +0 -1
  259. package/dist/foundations/structures/slot.js +0 -41
  260. package/dist/foundations/structures/slot.js.map +0 -1
  261. package/dist/foundations/utilities/aria.d.ts +0 -16
  262. package/dist/foundations/utilities/aria.d.ts.map +0 -1
  263. package/dist/foundations/utilities/aria.js +0 -17
  264. package/dist/foundations/utilities/aria.js.map +0 -1
  265. package/dist/foundations/utilities/compose-handlers.d.ts +0 -37
  266. package/dist/foundations/utilities/compose-handlers.d.ts.map +0 -1
  267. package/dist/foundations/utilities/compose-handlers.js +0 -20
  268. package/dist/foundations/utilities/compose-handlers.js.map +0 -1
  269. package/dist/foundations/utilities/compose-ref.d.ts.map +0 -1
  270. package/dist/foundations/utilities/compose-ref.js +0 -18
  271. package/dist/foundations/utilities/compose-ref.js.map +0 -1
  272. package/dist/foundations/utilities/event-types.d.ts +0 -20
  273. package/dist/foundations/utilities/event-types.d.ts.map +0 -1
  274. package/dist/foundations/utilities/merge-props.d.ts +0 -5
  275. package/dist/foundations/utilities/merge-props.d.ts.map +0 -1
  276. package/dist/foundations/utilities/merge-props.js +0 -49
  277. package/dist/foundations/utilities/merge-props.js.map +0 -1
  278. package/dist/foundations/utilities/use-id.d.ts +0 -32
  279. package/dist/foundations/utilities/use-id.d.ts.map +0 -1
  280. package/dist/foundations/utilities/use-id.js.map +0 -1
  281. package/dist/fx/fx.d.ts +0 -33
  282. package/dist/fx/fx.d.ts.map +0 -1
  283. package/dist/fx/fx.js +0 -213
  284. package/dist/fx/fx.js.map +0 -1
  285. package/dist/fx/noop.js +0 -9
  286. package/dist/fx/noop.js.map +0 -1
  287. package/dist/fx/timing.d.ts +0 -159
  288. package/dist/fx/timing.d.ts.map +0 -1
  289. package/dist/fx/timing.js +0 -243
  290. package/dist/fx/timing.js.map +0 -1
  291. package/dist/index.js.map +0 -1
  292. package/dist/jsx/index.d.ts +0 -2
  293. package/dist/jsx/index.js +0 -4
  294. package/dist/jsx/types.d.ts.map +0 -1
  295. package/dist/jsx/types.js +0 -2
  296. package/dist/jsx/utils.d.ts +0 -5
  297. package/dist/jsx/utils.d.ts.map +0 -1
  298. package/dist/jsx/utils.js +0 -19
  299. package/dist/jsx/utils.js.map +0 -1
  300. package/dist/jsx-dev-runtime.d.ts.map +0 -1
  301. package/dist/jsx-dev-runtime.js.map +0 -1
  302. package/dist/jsx-runtime.d.ts.map +0 -1
  303. package/dist/jsx-runtime.js.map +0 -1
  304. package/dist/jsx-runtime2.d.ts +0 -3
  305. package/dist/jsx-runtime2.js +0 -4
  306. package/dist/renderer/attributes.js +0 -232
  307. package/dist/renderer/attributes.js.map +0 -1
  308. package/dist/renderer/boundaries.js +0 -266
  309. package/dist/renderer/boundaries.js.map +0 -1
  310. package/dist/renderer/child-shape.js +0 -85
  311. package/dist/renderer/child-shape.js.map +0 -1
  312. package/dist/renderer/children-fastpath.js +0 -149
  313. package/dist/renderer/children-fastpath.js.map +0 -1
  314. package/dist/renderer/children.js +0 -160
  315. package/dist/renderer/children.js.map +0 -1
  316. package/dist/renderer/cleanup.js +0 -210
  317. package/dist/renderer/cleanup.js.map +0 -1
  318. package/dist/renderer/component-host-cleanup.js +0 -68
  319. package/dist/renderer/component-host-cleanup.js.map +0 -1
  320. package/dist/renderer/component-host-instances.js +0 -65
  321. package/dist/renderer/component-host-instances.js.map +0 -1
  322. package/dist/renderer/component-host.js +0 -247
  323. package/dist/renderer/component-host.js.map +0 -1
  324. package/dist/renderer/dom-host.js +0 -13
  325. package/dist/renderer/dom-host.js.map +0 -1
  326. package/dist/renderer/dom-internal.js +0 -186
  327. package/dist/renderer/dom-internal.js.map +0 -1
  328. package/dist/renderer/dom.js +0 -10
  329. package/dist/renderer/element-children.js +0 -279
  330. package/dist/renderer/element-children.js.map +0 -1
  331. package/dist/renderer/env.js +0 -2
  332. package/dist/renderer/error-boundary-dom.js +0 -78
  333. package/dist/renderer/error-boundary-dom.js.map +0 -1
  334. package/dist/renderer/evaluate-dom-range.js +0 -85
  335. package/dist/renderer/evaluate-dom-range.js.map +0 -1
  336. package/dist/renderer/evaluate-reconcile.js +0 -282
  337. package/dist/renderer/evaluate-reconcile.js.map +0 -1
  338. package/dist/renderer/evaluate.js +0 -84
  339. package/dist/renderer/evaluate.js.map +0 -1
  340. package/dist/renderer/fastpath.js +0 -150
  341. package/dist/renderer/fastpath.js.map +0 -1
  342. package/dist/renderer/for-commit-dom-map.js +0 -83
  343. package/dist/renderer/for-commit-dom-map.js.map +0 -1
  344. package/dist/renderer/for-commit-removal.js +0 -36
  345. package/dist/renderer/for-commit-removal.js.map +0 -1
  346. package/dist/renderer/for-commit-reorder.js +0 -89
  347. package/dist/renderer/for-commit-reorder.js.map +0 -1
  348. package/dist/renderer/for-commit.js +0 -314
  349. package/dist/renderer/for-commit.js.map +0 -1
  350. package/dist/renderer/index.js +0 -38
  351. package/dist/renderer/index.js.map +0 -1
  352. package/dist/renderer/keyed-children.js +0 -32
  353. package/dist/renderer/keyed-children.js.map +0 -1
  354. package/dist/renderer/keyed.js +0 -167
  355. package/dist/renderer/keyed.js.map +0 -1
  356. package/dist/renderer/namespaces.js +0 -23
  357. package/dist/renderer/namespaces.js.map +0 -1
  358. package/dist/renderer/prop-bindings.js +0 -280
  359. package/dist/renderer/prop-bindings.js.map +0 -1
  360. package/dist/renderer/reactive-child-dom.js +0 -133
  361. package/dist/renderer/reactive-child-dom.js.map +0 -1
  362. package/dist/renderer/reactive-child-sources.js +0 -184
  363. package/dist/renderer/reactive-child-sources.js.map +0 -1
  364. package/dist/renderer/reactive-children.js +0 -294
  365. package/dist/renderer/reactive-children.js.map +0 -1
  366. package/dist/renderer/reconcile-commit.js +0 -38
  367. package/dist/renderer/reconcile-commit.js.map +0 -1
  368. package/dist/renderer/reconcile-fastpaths.js +0 -107
  369. package/dist/renderer/reconcile-fastpaths.js.map +0 -1
  370. package/dist/renderer/reconcile-resolution.js +0 -187
  371. package/dist/renderer/reconcile-resolution.js.map +0 -1
  372. package/dist/renderer/reconcile.js +0 -39
  373. package/dist/renderer/reconcile.js.map +0 -1
  374. package/dist/renderer/retained-element-rollback.js +0 -277
  375. package/dist/renderer/retained-element-rollback.js.map +0 -1
  376. package/dist/renderer/stable-patch.js +0 -81
  377. package/dist/renderer/stable-patch.js.map +0 -1
  378. package/dist/renderer/static-reuse.js +0 -96
  379. package/dist/renderer/static-reuse.js.map +0 -1
  380. package/dist/renderer/types.js +0 -2
  381. package/dist/renderer/utils.js +0 -256
  382. package/dist/renderer/utils.js.map +0 -1
  383. package/dist/router/access.js +0 -36
  384. package/dist/router/access.js.map +0 -1
  385. package/dist/router/activity.d.ts +0 -10
  386. package/dist/router/activity.d.ts.map +0 -1
  387. package/dist/router/activity.js +0 -87
  388. package/dist/router/activity.js.map +0 -1
  389. package/dist/router/authoring.d.ts +0 -22
  390. package/dist/router/authoring.d.ts.map +0 -1
  391. package/dist/router/authoring.js +0 -198
  392. package/dist/router/authoring.js.map +0 -1
  393. package/dist/router/internal-types.d.ts +0 -31
  394. package/dist/router/internal-types.d.ts.map +0 -1
  395. package/dist/router/lazy.d.ts +0 -19
  396. package/dist/router/lazy.d.ts.map +0 -1
  397. package/dist/router/lazy.js +0 -52
  398. package/dist/router/lazy.js.map +0 -1
  399. package/dist/router/manifest.d.ts +0 -10
  400. package/dist/router/manifest.d.ts.map +0 -1
  401. package/dist/router/manifest.js +0 -49
  402. package/dist/router/manifest.js.map +0 -1
  403. package/dist/router/match.js +0 -122
  404. package/dist/router/match.js.map +0 -1
  405. package/dist/router/navigate.d.ts +0 -11
  406. package/dist/router/navigate.d.ts.map +0 -1
  407. package/dist/router/navigate.js +0 -76
  408. package/dist/router/navigate.js.map +0 -1
  409. package/dist/router/navigation-registry.d.ts +0 -32
  410. package/dist/router/navigation-registry.d.ts.map +0 -1
  411. package/dist/router/navigation-registry.js +0 -105
  412. package/dist/router/navigation-registry.js.map +0 -1
  413. package/dist/router/navigation-scroll.d.ts +0 -14
  414. package/dist/router/navigation-scroll.d.ts.map +0 -1
  415. package/dist/router/navigation-scroll.js +0 -93
  416. package/dist/router/navigation-scroll.js.map +0 -1
  417. package/dist/router/navigation-targets.d.ts +0 -31
  418. package/dist/router/navigation-targets.d.ts.map +0 -1
  419. package/dist/router/navigation-targets.js +0 -255
  420. package/dist/router/navigation-targets.js.map +0 -1
  421. package/dist/router/policy.d.ts +0 -28
  422. package/dist/router/policy.d.ts.map +0 -1
  423. package/dist/router/policy.js +0 -132
  424. package/dist/router/policy.js.map +0 -1
  425. package/dist/router/rendering.d.ts +0 -10
  426. package/dist/router/rendering.d.ts.map +0 -1
  427. package/dist/router/rendering.js +0 -46
  428. package/dist/router/rendering.js.map +0 -1
  429. package/dist/router/resolution.d.ts +0 -4
  430. package/dist/router/resolution.d.ts.map +0 -1
  431. package/dist/router/resolution.js +0 -86
  432. package/dist/router/resolution.js.map +0 -1
  433. package/dist/router/route-context.js +0 -79
  434. package/dist/router/route-context.js.map +0 -1
  435. package/dist/router/route-matching.d.ts +0 -20
  436. package/dist/router/route-matching.d.ts.map +0 -1
  437. package/dist/router/route-matching.js +0 -175
  438. package/dist/router/route-matching.js.map +0 -1
  439. package/dist/router/route-query.d.ts +0 -17
  440. package/dist/router/route-query.d.ts.map +0 -1
  441. package/dist/router/route-query.js +0 -47
  442. package/dist/router/route-query.js.map +0 -1
  443. package/dist/router/route.d.ts +0 -8
  444. package/dist/router/route.js +0 -10
  445. package/dist/router/store.d.ts +0 -50
  446. package/dist/router/store.d.ts.map +0 -1
  447. package/dist/router/store.js +0 -171
  448. package/dist/router/store.js.map +0 -1
  449. package/dist/router/testing.js +0 -4
  450. package/dist/runtime/access.d.ts +0 -20
  451. package/dist/runtime/access.d.ts.map +0 -1
  452. package/dist/runtime/access.js +0 -45
  453. package/dist/runtime/access.js.map +0 -1
  454. package/dist/runtime/child-scope.d.ts +0 -22
  455. package/dist/runtime/child-scope.d.ts.map +0 -1
  456. package/dist/runtime/child-scope.js +0 -87
  457. package/dist/runtime/child-scope.js.map +0 -1
  458. package/dist/runtime/component-cleanup.d.ts +0 -16
  459. package/dist/runtime/component-cleanup.d.ts.map +0 -1
  460. package/dist/runtime/component-cleanup.js +0 -70
  461. package/dist/runtime/component-cleanup.js.map +0 -1
  462. package/dist/runtime/component-commit.js +0 -165
  463. package/dist/runtime/component-commit.js.map +0 -1
  464. package/dist/runtime/component-facade.d.ts +0 -5
  465. package/dist/runtime/component-facade.js +0 -4
  466. package/dist/runtime/component-internal.d.ts +0 -100
  467. package/dist/runtime/component-internal.d.ts.map +0 -1
  468. package/dist/runtime/component-internal.js +0 -219
  469. package/dist/runtime/component-internal.js.map +0 -1
  470. package/dist/runtime/component-lifecycle.d.ts +0 -49
  471. package/dist/runtime/component-lifecycle.d.ts.map +0 -1
  472. package/dist/runtime/component-lifecycle.js +0 -176
  473. package/dist/runtime/component-lifecycle.js.map +0 -1
  474. package/dist/runtime/component-scope.d.ts +0 -55
  475. package/dist/runtime/component-scope.d.ts.map +0 -1
  476. package/dist/runtime/component-scope.js.map +0 -1
  477. package/dist/runtime/component.d.ts +0 -5
  478. package/dist/runtime/component.js +0 -5
  479. package/dist/runtime/context.d.ts +0 -69
  480. package/dist/runtime/context.d.ts.map +0 -1
  481. package/dist/runtime/context.js +0 -210
  482. package/dist/runtime/context.js.map +0 -1
  483. package/dist/runtime/control.d.ts +0 -43
  484. package/dist/runtime/control.d.ts.map +0 -1
  485. package/dist/runtime/control.js +0 -126
  486. package/dist/runtime/control.js.map +0 -1
  487. package/dist/runtime/derive.d.ts +0 -17
  488. package/dist/runtime/derive.d.ts.map +0 -1
  489. package/dist/runtime/derive.js +0 -142
  490. package/dist/runtime/derive.js.map +0 -1
  491. package/dist/runtime/dev-namespace.d.ts +0 -31
  492. package/dist/runtime/dev-namespace.d.ts.map +0 -1
  493. package/dist/runtime/dev-namespace.js +0 -57
  494. package/dist/runtime/dev-namespace.js.map +0 -1
  495. package/dist/runtime/effect.d.ts +0 -32
  496. package/dist/runtime/effect.d.ts.map +0 -1
  497. package/dist/runtime/effect.js +0 -177
  498. package/dist/runtime/effect.js.map +0 -1
  499. package/dist/runtime/error-boundary.d.ts +0 -5
  500. package/dist/runtime/error-boundary.d.ts.map +0 -1
  501. package/dist/runtime/error-boundary.js +0 -31
  502. package/dist/runtime/error-boundary.js.map +0 -1
  503. package/dist/runtime/events.d.ts +0 -58
  504. package/dist/runtime/events.d.ts.map +0 -1
  505. package/dist/runtime/events.js +0 -204
  506. package/dist/runtime/events.js.map +0 -1
  507. package/dist/runtime/execution-model.d.ts +0 -7
  508. package/dist/runtime/execution-model.d.ts.map +0 -1
  509. package/dist/runtime/execution-model.js +0 -15
  510. package/dist/runtime/execution-model.js.map +0 -1
  511. package/dist/runtime/fastlane.d.ts +0 -34
  512. package/dist/runtime/fastlane.d.ts.map +0 -1
  513. package/dist/runtime/fastlane.js +0 -175
  514. package/dist/runtime/fastlane.js.map +0 -1
  515. package/dist/runtime/for-bench.d.ts +0 -41
  516. package/dist/runtime/for-bench.d.ts.map +0 -1
  517. package/dist/runtime/for-bench.js +0 -171
  518. package/dist/runtime/for-bench.js.map +0 -1
  519. package/dist/runtime/for-internal.d.ts +0 -43
  520. package/dist/runtime/for-internal.d.ts.map +0 -1
  521. package/dist/runtime/for-internal.js +0 -98
  522. package/dist/runtime/for-internal.js.map +0 -1
  523. package/dist/runtime/for-reconcile.d.ts +0 -8
  524. package/dist/runtime/for-reconcile.d.ts.map +0 -1
  525. package/dist/runtime/for-reconcile.js +0 -389
  526. package/dist/runtime/for-reconcile.js.map +0 -1
  527. package/dist/runtime/for-scopes.d.ts +0 -26
  528. package/dist/runtime/for-scopes.d.ts.map +0 -1
  529. package/dist/runtime/for-scopes.js +0 -160
  530. package/dist/runtime/for-scopes.js.map +0 -1
  531. package/dist/runtime/for-signals.d.ts +0 -30
  532. package/dist/runtime/for-signals.d.ts.map +0 -1
  533. package/dist/runtime/for-signals.js +0 -139
  534. package/dist/runtime/for-signals.js.map +0 -1
  535. package/dist/runtime/for-types.d.ts +0 -9
  536. package/dist/runtime/for-types.d.ts.map +0 -1
  537. package/dist/runtime/for.d.ts +0 -4
  538. package/dist/runtime/for.js +0 -5
  539. package/dist/runtime/index.d.ts +0 -24
  540. package/dist/runtime/index.js +0 -31
  541. package/dist/runtime/lifecycle-operations.d.ts +0 -31
  542. package/dist/runtime/lifecycle-operations.d.ts.map +0 -1
  543. package/dist/runtime/lifecycle-operations.js.map +0 -1
  544. package/dist/runtime/operations.d.ts +0 -3
  545. package/dist/runtime/operations.js +0 -3
  546. package/dist/runtime/perf-metrics.d.ts +0 -26
  547. package/dist/runtime/perf-metrics.d.ts.map +0 -1
  548. package/dist/runtime/perf-metrics.js +0 -70
  549. package/dist/runtime/perf-metrics.js.map +0 -1
  550. package/dist/runtime/portal.d.ts +0 -22
  551. package/dist/runtime/portal.d.ts.map +0 -1
  552. package/dist/runtime/portal.js.map +0 -1
  553. package/dist/runtime/readable.d.ts +0 -29
  554. package/dist/runtime/readable.d.ts.map +0 -1
  555. package/dist/runtime/readable.js +0 -159
  556. package/dist/runtime/readable.js.map +0 -1
  557. package/dist/runtime/resource-cell.js +0 -114
  558. package/dist/runtime/resource-cell.js.map +0 -1
  559. package/dist/runtime/resource-operation.d.ts +0 -13
  560. package/dist/runtime/resource-operation.d.ts.map +0 -1
  561. package/dist/runtime/resource-operation.js +0 -170
  562. package/dist/runtime/resource-operation.js.map +0 -1
  563. package/dist/runtime/runtime.d.ts.map +0 -1
  564. package/dist/runtime/runtime.js +0 -59
  565. package/dist/runtime/runtime.js.map +0 -1
  566. package/dist/runtime/scheduler.d.ts.map +0 -1
  567. package/dist/runtime/scheduler.js.map +0 -1
  568. package/dist/runtime/selector-store.js +0 -24
  569. package/dist/runtime/selector-store.js.map +0 -1
  570. package/dist/runtime/selector.d.ts +0 -11
  571. package/dist/runtime/selector.d.ts.map +0 -1
  572. package/dist/runtime/selector.js.map +0 -1
  573. package/dist/runtime/snapshot-source.d.ts +0 -10
  574. package/dist/runtime/snapshot-source.d.ts.map +0 -1
  575. package/dist/runtime/snapshot-source.js.map +0 -1
  576. package/dist/runtime/state.d.ts +0 -55
  577. package/dist/runtime/state.d.ts.map +0 -1
  578. package/dist/runtime/state.js.map +0 -1
  579. package/dist/ssg/batch-render.js +0 -103
  580. package/dist/ssg/batch-render.js.map +0 -1
  581. package/dist/ssg/create-static-gen.d.ts +0 -64
  582. package/dist/ssg/create-static-gen.d.ts.map +0 -1
  583. package/dist/ssg/create-static-gen.js +0 -199
  584. package/dist/ssg/create-static-gen.js.map +0 -1
  585. package/dist/ssg/generate-metadata.js +0 -94
  586. package/dist/ssg/generate-metadata.js.map +0 -1
  587. package/dist/ssg/generation-plan.js +0 -70
  588. package/dist/ssg/generation-plan.js.map +0 -1
  589. package/dist/ssg/incremental-manifest.js +0 -56
  590. package/dist/ssg/incremental-manifest.js.map +0 -1
  591. package/dist/ssg/resolve-ssg-data.js +0 -105
  592. package/dist/ssg/resolve-ssg-data.js.map +0 -1
  593. package/dist/ssg/route-utils.js +0 -24
  594. package/dist/ssg/route-utils.js.map +0 -1
  595. package/dist/ssg/static-routes.js +0 -102
  596. package/dist/ssg/static-routes.js.map +0 -1
  597. package/dist/ssg/types.d.ts +0 -189
  598. package/dist/ssg/types.d.ts.map +0 -1
  599. package/dist/ssg/write-static-files.js +0 -73
  600. package/dist/ssg/write-static-files.js.map +0 -1
  601. package/dist/ssr/attrs.js +0 -94
  602. package/dist/ssr/attrs.js.map +0 -1
  603. package/dist/ssr/boundaries.js +0 -113
  604. package/dist/ssr/boundaries.js.map +0 -1
  605. package/dist/ssr/component-runtime.js +0 -111
  606. package/dist/ssr/component-runtime.js.map +0 -1
  607. package/dist/ssr/context.d.ts +0 -50
  608. package/dist/ssr/context.d.ts.map +0 -1
  609. package/dist/ssr/context.js +0 -91
  610. package/dist/ssr/context.js.map +0 -1
  611. package/dist/ssr/errors.d.ts +0 -10
  612. package/dist/ssr/errors.d.ts.map +0 -1
  613. package/dist/ssr/errors.js +0 -14
  614. package/dist/ssr/errors.js.map +0 -1
  615. package/dist/ssr/escape.js +0 -193
  616. package/dist/ssr/escape.js.map +0 -1
  617. package/dist/ssr/hydration-data.js +0 -10
  618. package/dist/ssr/hydration-data.js.map +0 -1
  619. package/dist/ssr/hydration-verify.d.ts +0 -12
  620. package/dist/ssr/hydration-verify.d.ts.map +0 -1
  621. package/dist/ssr/hydration-verify.js +0 -144
  622. package/dist/ssr/hydration-verify.js.map +0 -1
  623. package/dist/ssr/index-internal.d.ts +0 -15
  624. package/dist/ssr/index-internal.d.ts.map +0 -1
  625. package/dist/ssr/index-internal.js +0 -19
  626. package/dist/ssr/index-internal.js.map +0 -1
  627. package/dist/ssr/render-keys.js +0 -16
  628. package/dist/ssr/render-keys.js.map +0 -1
  629. package/dist/ssr/render-resolved.d.ts +0 -20
  630. package/dist/ssr/render-resolved.d.ts.map +0 -1
  631. package/dist/ssr/render-resolved.js +0 -35
  632. package/dist/ssr/render-resolved.js.map +0 -1
  633. package/dist/ssr/render-sync.d.ts +0 -21
  634. package/dist/ssr/render-sync.d.ts.map +0 -1
  635. package/dist/ssr/render-sync.js +0 -275
  636. package/dist/ssr/render-sync.js.map +0 -1
  637. package/dist/ssr/route-policy-resolution.js +0 -78
  638. package/dist/ssr/route-policy-resolution.js.map +0 -1
  639. package/dist/ssr/route-render.d.ts +0 -77
  640. package/dist/ssr/route-render.d.ts.map +0 -1
  641. package/dist/ssr/route-render.js +0 -120
  642. package/dist/ssr/route-render.js.map +0 -1
  643. package/dist/ssr/sink.d.ts +0 -26
  644. package/dist/ssr/sink.d.ts.map +0 -1
  645. package/dist/ssr/sink.js +0 -86
  646. package/dist/ssr/sink.js.map +0 -1
  647. package/dist/ssr/types.d.ts +0 -23
  648. package/dist/ssr/types.d.ts.map +0 -1
  649. package/dist/ssr/verify-hydration.js.map +0 -1
  650. package/dist/testing/index.d.ts.map +0 -1
  651. package/dist/testing/index.js.map +0 -1
@@ -1,83 +0,0 @@
1
- import { keyedElements } from "./keyed.js";
2
- //#region src/renderer/for-commit-dom-map.ts
3
- function getOrBuildDomKeyMap(parent) {
4
- let keyMap = keyedElements.get(parent);
5
- if (!keyMap) {
6
- keyMap = /* @__PURE__ */ new Map();
7
- for (let child = parent.firstElementChild; child; child = child.nextElementSibling) {
8
- const key = child.getAttribute("data-key");
9
- if (key !== null) {
10
- keyMap.set(key, child);
11
- const numericKey = Number(key);
12
- if (!Number.isNaN(numericKey)) keyMap.set(numericKey, child);
13
- }
14
- }
15
- if (keyMap.size > 0) keyedElements.set(parent, keyMap);
16
- }
17
- return keyMap.size > 0 ? keyMap : void 0;
18
- }
19
- function hydrateExistingForDomInOrder(parent, forState) {
20
- if (parent.children.length !== forState.orderedKeys.length) return false;
21
- for (let i = 0; i < forState.orderedKeys.length; i += 1) {
22
- const itemKey = forState.orderedKeys[i];
23
- const itemInstance = forState.items.get(itemKey);
24
- const currentDom = parent.children[i];
25
- if (!itemInstance || currentDom.getAttribute("data-key") !== String(itemKey)) return false;
26
- itemInstance.scope.dom = currentDom;
27
- itemInstance.scope.needsDomUpdate = true;
28
- }
29
- return true;
30
- }
31
- function syncKeyedMapFromForState(parent, forState, strategy, removedNodes) {
32
- const existing = keyedElements.get(parent);
33
- const ensureMapEntry = (map, key, element) => {
34
- map.set(key, element);
35
- const keyString = String(key);
36
- map.set(keyString, element);
37
- const keyNumber = Number(keyString);
38
- if (!Number.isNaN(keyNumber)) map.set(keyNumber, element);
39
- };
40
- if (strategy === "SWAP") {
41
- if (existing) return;
42
- }
43
- if (strategy === "FULL_KEYED" && existing && removedNodes.length === 0) return;
44
- if (strategy === "NO_REORDER") {
45
- if (existing && removedNodes.length === 0) return;
46
- if (existing) {
47
- for (const [mapKey, element] of existing) if (element.parentNode !== parent) existing.delete(mapKey);
48
- if (existing.size > 0) keyedElements.set(parent, existing);
49
- else keyedElements.delete(parent);
50
- return;
51
- }
52
- }
53
- if (strategy === "TRUNCATE" && forState.orderedKeys.length === 0) {
54
- if (existing) existing.clear();
55
- keyedElements.delete(parent);
56
- return;
57
- }
58
- if (strategy === "APPEND" && existing) {
59
- for (let i = 0; i < forState.orderedKeys.length; i++) {
60
- const key = forState.orderedKeys[i];
61
- if (key === null || existing.has(key)) continue;
62
- const itemInstance = forState.items.get(key);
63
- if (itemInstance?.scope.dom instanceof Element) ensureMapEntry(existing, key, itemInstance.scope.dom);
64
- }
65
- if (existing.size > 0) keyedElements.set(parent, existing);
66
- else keyedElements.delete(parent);
67
- return;
68
- }
69
- const nextMap = existing ?? /* @__PURE__ */ new Map();
70
- nextMap.clear();
71
- for (let i = 0; i < forState.orderedKeys.length; i++) {
72
- const key = forState.orderedKeys[i];
73
- if (key === null) continue;
74
- const itemInstance = forState.items.get(key);
75
- if (itemInstance?.scope.dom instanceof Element) ensureMapEntry(nextMap, key, itemInstance.scope.dom);
76
- }
77
- if (nextMap.size > 0) keyedElements.set(parent, nextMap);
78
- else keyedElements.delete(parent);
79
- }
80
- //#endregion
81
- export { getOrBuildDomKeyMap, hydrateExistingForDomInOrder, syncKeyedMapFromForState };
82
-
83
- //# sourceMappingURL=for-commit-dom-map.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"for-commit-dom-map.js","names":[],"sources":["../../src/renderer/for-commit-dom-map.ts"],"sourcesContent":["import type { ForCommitStrategy, ForState } from '../runtime';\nimport { keyedElements } from './keyed';\n\nexport function getOrBuildDomKeyMap(\n parent: Element\n): Map<string | number, Element> | undefined {\n let keyMap = keyedElements.get(parent);\n if (!keyMap) {\n keyMap = new Map<string | number, Element>();\n for (\n let child = parent.firstElementChild;\n child;\n child = child.nextElementSibling\n ) {\n const key = child.getAttribute('data-key');\n if (key !== null) {\n keyMap.set(key, child);\n const numericKey = Number(key);\n if (!Number.isNaN(numericKey)) {\n keyMap.set(numericKey, child);\n }\n }\n }\n if (keyMap.size > 0) {\n keyedElements.set(parent, keyMap);\n }\n }\n return keyMap.size > 0 ? keyMap : undefined;\n}\n\nexport function hydrateExistingForDomInOrder(\n parent: Element,\n forState: ForState<unknown>\n): boolean {\n if (parent.children.length !== forState.orderedKeys.length) {\n return false;\n }\n\n for (let i = 0; i < forState.orderedKeys.length; i += 1) {\n const itemKey = forState.orderedKeys[i];\n const itemInstance = forState.items.get(itemKey);\n const currentDom = parent.children[i];\n\n if (\n !itemInstance ||\n currentDom.getAttribute('data-key') !== String(itemKey)\n ) {\n return false;\n }\n\n itemInstance.scope.dom = currentDom;\n itemInstance.scope.needsDomUpdate = true;\n }\n\n return true;\n}\n\nexport function syncKeyedMapFromForState(\n parent: Element,\n forState: ForState<unknown>,\n strategy: ForCommitStrategy,\n removedNodes: Node[]\n): void {\n const existing = keyedElements.get(parent);\n const ensureMapEntry = (\n map: Map<string | number, Element>,\n key: string | number,\n element: Element\n ): void => {\n map.set(key, element);\n const keyString = String(key);\n map.set(keyString, element);\n const keyNumber = Number(keyString);\n if (!Number.isNaN(keyNumber)) {\n map.set(keyNumber, element);\n }\n };\n\n if (strategy === 'SWAP') {\n if (existing) {\n return;\n }\n }\n\n if (strategy === 'FULL_KEYED' && existing && removedNodes.length === 0) {\n return;\n }\n\n if (strategy === 'NO_REORDER') {\n if (existing && removedNodes.length === 0) {\n return;\n }\n\n if (existing) {\n for (const [mapKey, element] of existing) {\n if (element.parentNode !== parent) {\n existing.delete(mapKey);\n }\n }\n\n if (existing.size > 0) {\n keyedElements.set(parent, existing);\n } else {\n keyedElements.delete(parent);\n }\n return;\n }\n }\n\n if (strategy === 'TRUNCATE' && forState.orderedKeys.length === 0) {\n if (existing) {\n existing.clear();\n }\n keyedElements.delete(parent);\n return;\n }\n\n if (strategy === 'APPEND' && existing) {\n for (let i = 0; i < forState.orderedKeys.length; i++) {\n const key = forState.orderedKeys[i];\n if (key === null || existing.has(key)) continue;\n const itemInstance = forState.items.get(key);\n if (itemInstance?.scope.dom instanceof Element) {\n ensureMapEntry(existing, key, itemInstance.scope.dom);\n }\n }\n\n if (existing.size > 0) {\n keyedElements.set(parent, existing);\n } else {\n keyedElements.delete(parent);\n }\n return;\n }\n\n const nextMap = existing ?? new Map<string | number, Element>();\n nextMap.clear();\n\n for (let i = 0; i < forState.orderedKeys.length; i++) {\n const key = forState.orderedKeys[i];\n if (key === null) continue;\n const itemInstance = forState.items.get(key);\n if (itemInstance?.scope.dom instanceof Element) {\n ensureMapEntry(nextMap, key, itemInstance.scope.dom);\n }\n }\n\n if (nextMap.size > 0) {\n keyedElements.set(parent, nextMap);\n } else {\n keyedElements.delete(parent);\n }\n}\n"],"mappings":";;AAGA,SAAgB,oBACd,QAC2C;CAC3C,IAAI,SAAS,cAAc,IAAI,MAAM;CACrC,IAAI,CAAC,QAAQ;EACX,yBAAS,IAAI,IAA8B;EAC3C,KACE,IAAI,QAAQ,OAAO,mBACnB,OACA,QAAQ,MAAM,oBACd;GACA,MAAM,MAAM,MAAM,aAAa,UAAU;GACzC,IAAI,QAAQ,MAAM;IAChB,OAAO,IAAI,KAAK,KAAK;IACrB,MAAM,aAAa,OAAO,GAAG;IAC7B,IAAI,CAAC,OAAO,MAAM,UAAU,GAC1B,OAAO,IAAI,YAAY,KAAK;GAEhC;EACF;EACA,IAAI,OAAO,OAAO,GAChB,cAAc,IAAI,QAAQ,MAAM;CAEpC;CACA,OAAO,OAAO,OAAO,IAAI,SAAS;AACpC;AAEA,SAAgB,6BACd,QACA,UACS;CACT,IAAI,OAAO,SAAS,WAAW,SAAS,YAAY,QAClD,OAAO;CAGT,KAAK,IAAI,IAAI,GAAG,IAAI,SAAS,YAAY,QAAQ,KAAK,GAAG;EACvD,MAAM,UAAU,SAAS,YAAY;EACrC,MAAM,eAAe,SAAS,MAAM,IAAI,OAAO;EAC/C,MAAM,aAAa,OAAO,SAAS;EAEnC,IACE,CAAC,gBACD,WAAW,aAAa,UAAU,MAAM,OAAO,OAAO,GAEtD,OAAO;EAGT,aAAa,MAAM,MAAM;EACzB,aAAa,MAAM,iBAAiB;CACtC;CAEA,OAAO;AACT;AAEA,SAAgB,yBACd,QACA,UACA,UACA,cACM;CACN,MAAM,WAAW,cAAc,IAAI,MAAM;CACzC,MAAM,kBACJ,KACA,KACA,YACS;EACT,IAAI,IAAI,KAAK,OAAO;EACpB,MAAM,YAAY,OAAO,GAAG;EAC5B,IAAI,IAAI,WAAW,OAAO;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,aAAa,MAAM,GAAG;CAEvD;CAEA,IAAI,QAAQ,OAAO,GACjB,cAAc,IAAI,QAAQ,OAAO;MAEjC,cAAc,OAAO,MAAM;AAE/B"}
@@ -1,36 +0,0 @@
1
- import { recordBenchCounter, recordBenchEvent, withBenchMetricScope } from "../runtime/for-bench.js";
2
- import "../runtime/index.js";
3
- import { teardownNodeSubtree } from "./cleanup.js";
4
- //#region src/renderer/for-commit-removal.ts
5
- function removeForBoundaryNodes(parent, removedNodes) {
6
- if (removedNodes.length > 0 && removedNodes.length === parent.childNodes.length) {
7
- let canBulkClear = true;
8
- for (let i = 0; i < removedNodes.length; i++) if (removedNodes[i].parentNode !== parent) {
9
- canBulkClear = false;
10
- break;
11
- }
12
- if (canBulkClear) {
13
- for (let i = 0; i < removedNodes.length; i++) {
14
- recordBenchEvent("domRemove");
15
- teardownNodeSubtree(removedNodes[i]);
16
- }
17
- withBenchMetricScope("fullClear", () => {
18
- recordBenchCounter("bulkClearCommits");
19
- parent.textContent = "";
20
- });
21
- return;
22
- }
23
- }
24
- for (let i = 0; i < removedNodes.length; i++) {
25
- const node = removedNodes[i];
26
- if (node.parentNode === parent) {
27
- recordBenchEvent("domRemove");
28
- teardownNodeSubtree(node);
29
- parent.removeChild(node);
30
- }
31
- }
32
- }
33
- //#endregion
34
- export { removeForBoundaryNodes };
35
-
36
- //# sourceMappingURL=for-commit-removal.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"for-commit-removal.js","names":[],"sources":["../../src/renderer/for-commit-removal.ts"],"sourcesContent":["import {\n recordBenchCounter,\n recordBenchEvent,\n withBenchMetricScope,\n} from '../runtime';\nimport { teardownNodeSubtree } from './cleanup';\n\nexport function removeForBoundaryNodes(\n parent: Element,\n removedNodes: Node[]\n): void {\n if (\n removedNodes.length > 0 &&\n removedNodes.length === parent.childNodes.length\n ) {\n let canBulkClear = true;\n for (let i = 0; i < removedNodes.length; i++) {\n if (removedNodes[i].parentNode !== parent) {\n canBulkClear = false;\n break;\n }\n }\n\n if (canBulkClear) {\n for (let i = 0; i < removedNodes.length; i++) {\n recordBenchEvent('domRemove');\n teardownNodeSubtree(removedNodes[i]);\n }\n withBenchMetricScope('fullClear', () => {\n recordBenchCounter('bulkClearCommits');\n parent.textContent = '';\n });\n return;\n }\n }\n\n for (let i = 0; i < removedNodes.length; i++) {\n const node = removedNodes[i];\n if (node.parentNode === parent) {\n recordBenchEvent('domRemove');\n teardownNodeSubtree(node);\n parent.removeChild(node);\n }\n }\n}\n"],"mappings":";;;;AAOA,SAAgB,uBACd,QACA,cACM;CACN,IACE,aAAa,SAAS,KACtB,aAAa,WAAW,OAAO,WAAW,QAC1C;EACA,IAAI,eAAe;EACnB,KAAK,IAAI,IAAI,GAAG,IAAI,aAAa,QAAQ,KACvC,IAAI,aAAa,EAAE,CAAC,eAAe,QAAQ;GACzC,eAAe;GACf;EACF;EAGF,IAAI,cAAc;GAChB,KAAK,IAAI,IAAI,GAAG,IAAI,aAAa,QAAQ,KAAK;IAC5C,iBAAiB,WAAW;IAC5B,oBAAoB,aAAa,EAAE;GACrC;GACA,qBAAqB,mBAAmB;IACtC,mBAAmB,kBAAkB;IACrC,OAAO,cAAc;GACvB,CAAC;GACD;EACF;CACF;CAEA,KAAK,IAAI,IAAI,GAAG,IAAI,aAAa,QAAQ,KAAK;EAC5C,MAAM,OAAO,aAAa;EAC1B,IAAI,KAAK,eAAe,QAAQ;GAC9B,iBAAiB,WAAW;GAC5B,oBAAoB,IAAI;GACxB,OAAO,YAAY,IAAI;EACzB;CACF;AACF"}
@@ -1,89 +0,0 @@
1
- import { recordBenchCounter, recordBenchEvent } from "../runtime/for-bench.js";
2
- import "../runtime/index.js";
3
- import { canUseDirectReplaceChildrenSpread } from "./utils.js";
4
- //#region src/renderer/for-commit-reorder.ts
5
- const DENSE_MOVE_MINIMUM = 64;
6
- const DENSE_MOVE_RATIO = .75;
7
- function replaceChildrenInOrder(parent, nodes, allowDirectSpread) {
8
- if (allowDirectSpread && canUseDirectReplaceChildrenSpread(nodes.length)) {
9
- parent.replaceChildren(...nodes);
10
- return;
11
- }
12
- const fragment = parent.ownerDocument.createDocumentFragment();
13
- for (let i = 0; i < nodes.length; i++) fragment.appendChild(nodes[i]);
14
- parent.replaceChildren(fragment);
15
- }
16
- function getLISIndices(sequence) {
17
- if (sequence.length === 0) return [];
18
- const predecessors = sequence.slice();
19
- const lisIndices = [0];
20
- for (let i = 1; i < sequence.length; i += 1) {
21
- const current = sequence[i];
22
- const lastLisIndex = lisIndices[lisIndices.length - 1];
23
- if (sequence[lastLisIndex] < current) {
24
- predecessors[i] = lastLisIndex;
25
- lisIndices.push(i);
26
- continue;
27
- }
28
- let lo = 0;
29
- let hi = lisIndices.length - 1;
30
- while (lo < hi) {
31
- const mid = lo + hi >> 1;
32
- if (sequence[lisIndices[mid]] < current) lo = mid + 1;
33
- else hi = mid;
34
- }
35
- if (current < sequence[lisIndices[lo]]) {
36
- if (lo > 0) predecessors[i] = lisIndices[lo - 1];
37
- lisIndices[lo] = i;
38
- }
39
- }
40
- let cursor = lisIndices.length - 1;
41
- let index = lisIndices[cursor];
42
- while (cursor >= 0) {
43
- lisIndices[cursor] = index;
44
- index = predecessors[index];
45
- cursor -= 1;
46
- }
47
- return lisIndices;
48
- }
49
- function commitMoveOnlyReorder(parent, nodes) {
50
- const currentNodes = Array.from(parent.childNodes);
51
- if (currentNodes.length !== nodes.length) return false;
52
- const currentIndexByNode = /* @__PURE__ */ new Map();
53
- for (let i = 0; i < currentNodes.length; i += 1) currentIndexByNode.set(currentNodes[i], i);
54
- const positions = Array.from({ length: nodes.length }, () => 0);
55
- for (let i = 0; i < nodes.length; i += 1) {
56
- const position = currentIndexByNode.get(nodes[i]);
57
- if (position === void 0) return false;
58
- positions[i] = position;
59
- }
60
- const lisIndices = getLISIndices(positions);
61
- if (lisIndices.length === nodes.length) return true;
62
- const moveCount = nodes.length - lisIndices.length;
63
- if (moveCount >= Math.max(DENSE_MOVE_MINIMUM, Math.floor(nodes.length * DENSE_MOVE_RATIO))) {
64
- recordBenchEvent("domMove", moveCount);
65
- recordBenchCounter("replaceChildrenCommits");
66
- replaceChildrenInOrder(parent, nodes, false);
67
- return true;
68
- }
69
- let lisCursor = lisIndices.length - 1;
70
- let anchor = null;
71
- for (let i = nodes.length - 1; i >= 0; i -= 1) {
72
- const node = nodes[i];
73
- if (lisCursor >= 0 && i === lisIndices[lisCursor]) {
74
- anchor = node;
75
- lisCursor -= 1;
76
- continue;
77
- }
78
- if (node.nextSibling !== anchor) {
79
- recordBenchEvent("domMove");
80
- parent.insertBefore(node, anchor);
81
- }
82
- anchor = node;
83
- }
84
- return true;
85
- }
86
- //#endregion
87
- export { commitMoveOnlyReorder, replaceChildrenInOrder };
88
-
89
- //# sourceMappingURL=for-commit-reorder.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"for-commit-reorder.js","names":[],"sources":["../../src/renderer/for-commit-reorder.ts"],"sourcesContent":["import { recordBenchCounter, recordBenchEvent } from '../runtime';\nimport { canUseDirectReplaceChildrenSpread } from './utils';\n\nconst DENSE_MOVE_MINIMUM = 64;\nconst DENSE_MOVE_RATIO = 0.75;\n\nexport function replaceChildrenInOrder(\n parent: Element,\n nodes: Node[],\n allowDirectSpread: boolean\n): void {\n if (allowDirectSpread && canUseDirectReplaceChildrenSpread(nodes.length)) {\n parent.replaceChildren(...nodes);\n return;\n }\n\n const fragment = parent.ownerDocument.createDocumentFragment();\n for (let i = 0; i < nodes.length; i++) {\n fragment.appendChild(nodes[i]);\n }\n parent.replaceChildren(fragment);\n}\n\nfunction getLISIndices(sequence: number[]): number[] {\n if (sequence.length === 0) {\n return [];\n }\n\n const predecessors = sequence.slice();\n const lisIndices: number[] = [0];\n\n for (let i = 1; i < sequence.length; i += 1) {\n const current = sequence[i];\n const lastLisIndex = lisIndices[lisIndices.length - 1];\n\n if (sequence[lastLisIndex] < current) {\n predecessors[i] = lastLisIndex;\n lisIndices.push(i);\n continue;\n }\n\n let lo = 0;\n let hi = lisIndices.length - 1;\n while (lo < hi) {\n const mid = (lo + hi) >> 1;\n if (sequence[lisIndices[mid]] < current) {\n lo = mid + 1;\n } else {\n hi = mid;\n }\n }\n\n if (current < sequence[lisIndices[lo]]) {\n if (lo > 0) {\n predecessors[i] = lisIndices[lo - 1];\n }\n lisIndices[lo] = i;\n }\n }\n\n let cursor = lisIndices.length - 1;\n let index = lisIndices[cursor];\n while (cursor >= 0) {\n lisIndices[cursor] = index;\n index = predecessors[index];\n cursor -= 1;\n }\n\n return lisIndices;\n}\n\nexport function commitMoveOnlyReorder(parent: Element, nodes: Node[]): boolean {\n const currentNodes = Array.from(parent.childNodes);\n if (currentNodes.length !== nodes.length) {\n return false;\n }\n\n const currentIndexByNode = new Map<Node, number>();\n for (let i = 0; i < currentNodes.length; i += 1) {\n currentIndexByNode.set(currentNodes[i], i);\n }\n\n const positions = Array.from({ length: nodes.length }, () => 0);\n for (let i = 0; i < nodes.length; i += 1) {\n const position = currentIndexByNode.get(nodes[i]);\n if (position === undefined) {\n return false;\n }\n positions[i] = position;\n }\n\n const lisIndices = getLISIndices(positions);\n if (lisIndices.length === nodes.length) {\n return true;\n }\n\n const moveCount = nodes.length - lisIndices.length;\n const denseMoveThreshold = Math.max(\n DENSE_MOVE_MINIMUM,\n Math.floor(nodes.length * DENSE_MOVE_RATIO)\n );\n\n if (moveCount >= denseMoveThreshold) {\n recordBenchEvent('domMove', moveCount);\n recordBenchCounter('replaceChildrenCommits');\n replaceChildrenInOrder(parent, nodes, false);\n return true;\n }\n\n let lisCursor = lisIndices.length - 1;\n let anchor: Node | null = null;\n\n for (let i = nodes.length - 1; i >= 0; i -= 1) {\n const node = nodes[i];\n if (lisCursor >= 0 && i === lisIndices[lisCursor]) {\n anchor = node;\n lisCursor -= 1;\n continue;\n }\n\n if (node.nextSibling !== anchor) {\n recordBenchEvent('domMove');\n parent.insertBefore(node, anchor);\n }\n\n anchor = node;\n }\n\n return true;\n}\n"],"mappings":";;;;AAGA,MAAM,qBAAqB;AAC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KAAK,IAAI,IAAI,GAAG,IAAI,aAAa,QAAQ,KAAK,GAC5C,mBAAmB,IAAI,aAAa,IAAI,CAAC;CAG3C,MAAM,YAAY,MAAM,KAAK,EAAE,QAAQ,MAAM,OAAO,SAAS,CAAC;CAC9D,KAAK,IAAI,IAAI,GAAG,IAAI,MAAM,QAAQ,KAAK,GAAG;EACxC,MAAM,WAAW,mBAAmB,IAAI,MAAM,EAAE;EAChD,IAAI,aAAa,QACf,OAAO;EAET,UAAU,KAAK;CACjB;CAEA,MAAM,aAAa,cAAc,SAAS;CAC1C,IAAI,WAAW,WAAW,MAAM,QAC9B,OAAO;CAGT,MAAM,YAAY,MAAM,SAAS,WAAW;CAM5C,IAAI,aALuB,KAAK,IAC9B,oBACA,KAAK,MAAM,MAAM,SAAS,gBAAgB,CAG3B,GAAoB;EACnC,iBAAiB,WAAW,SAAS;EACrC,mBAAmB,wBAAwB;EAC3C,uBAAuB,QAAQ,OAAO,KAAK;EAC3C,OAAO;CACT;CAEA,IAAI,YAAY,WAAW,SAAS;CACpC,IAAI,SAAsB;CAE1B,KAAK,IAAI,IAAI,MAAM,SAAS,GAAG,KAAK,GAAG,KAAK,GAAG;EAC7C,MAAM,OAAO,MAAM;EACnB,IAAI,aAAa,KAAK,MAAM,WAAW,YAAY;GACjD,SAAS;GACT,aAAa;GACb;EACF;EAEA,IAAI,KAAK,gBAAgB,QAAQ;GAC/B,iBAAiB,SAAS;GAC1B,OAAO,aAAa,MAAM,MAAM;EAClC;EAEA,SAAS;CACX;CAEA,OAAO;AACT"}
@@ -1,314 +0,0 @@
1
- import { recordBenchCounter, recordBenchEvent, recordBenchTiming, withBenchMetricScope } from "../runtime/for-bench.js";
2
- import { clearForDomUpdateState } from "../runtime/for-internal.js";
3
- import "../runtime/index.js";
4
- import { teardownNodeSubtree } from "./cleanup.js";
5
- import { canUseDirectReplaceChildrenSpread } from "./utils.js";
6
- import { keyedElements } from "./keyed.js";
7
- import { getOrBuildDomKeyMap, hydrateExistingForDomInOrder, syncKeyedMapFromForState } from "./for-commit-dom-map.js";
8
- import { commitMoveOnlyReorder, replaceChildrenInOrder } from "./for-commit-reorder.js";
9
- import { removeForBoundaryNodes } from "./for-commit-removal.js";
10
- //#region src/renderer/for-commit.ts
11
- function commitForStateBoundaryChildren(parent, forState, childrenVNodes, runtime) {
12
- const domCommitStart = performance.now();
13
- const hydrateExistingForDom = () => {
14
- if (hydrateExistingForDomInOrder(parent, forState)) return;
15
- const domKeyMap = getOrBuildDomKeyMap(parent);
16
- if (!domKeyMap) return;
17
- for (let i = 0; i < forState.orderedKeys.length; i++) {
18
- const itemKey = forState.orderedKeys[i];
19
- const itemInstance = forState.items.get(itemKey);
20
- if (!itemInstance || itemInstance.scope.dom) continue;
21
- const existingDom = domKeyMap.get(itemKey);
22
- if (!existingDom) continue;
23
- itemInstance.scope.dom = existingDom;
24
- itemInstance.scope.needsDomUpdate = true;
25
- }
26
- };
27
- if (forState.orderedKeys.length === 0) {
28
- removeForBoundaryNodes(parent, forState.lastRemovedNodes);
29
- const fallbackScope = forState.fallbackScope;
30
- const fallbackVNode = childrenVNodes[0];
31
- const nextDom = fallbackScope && fallbackVNode !== void 0 ? runtime.syncForItemDom(parent, fallbackScope, fallbackVNode) : null;
32
- if (nextDom) {
33
- if (parent.childNodes.length !== 1 || parent.firstChild !== nextDom || forState.lastRemovedNodes.length > 0) parent.replaceChildren(nextDom);
34
- } else if (parent.firstChild) parent.textContent = "";
35
- keyedElements.delete(parent);
36
- forState._hasResolvedItemDom = false;
37
- recordBenchTiming("domCommit", performance.now() - domCommitStart);
38
- clearForDomUpdateState(forState);
39
- return;
40
- }
41
- if (!forState._hasResolvedItemDom && parent.childNodes.length > 0) hydrateExistingForDom();
42
- const getDirtyForIndices = () => {
43
- const pendingDirtyIndices = forState.pendingDirtyIndices;
44
- if (pendingDirtyIndices && pendingDirtyIndices.length > 0) return pendingDirtyIndices;
45
- const dirtyIndices = [];
46
- for (let index = 0; index < forState.orderedKeys.length; index += 1) if (forState.orderedItems[index]?.scope.needsDomUpdate) dirtyIndices.push(index);
47
- return dirtyIndices;
48
- };
49
- let dirtyIndicesCache = null;
50
- const ensureDirtyIndices = () => {
51
- if (dirtyIndicesCache) return dirtyIndicesCache;
52
- dirtyIndicesCache = getDirtyForIndices();
53
- return dirtyIndicesCache;
54
- };
55
- const dirtyIndices = forState.lastCommitStrategy === "NO_REORDER" ? ensureDirtyIndices() : [];
56
- let boundaryChildrenExact = false;
57
- const commitDirtyNoReorder = (dirtyIndices) => {
58
- if (dirtyIndices.length === 0) {
59
- boundaryChildrenExact = true;
60
- return;
61
- }
62
- const orderedItems = forState.orderedItems;
63
- const childNodes = parent.childNodes;
64
- for (let dirtyIndex = 0; dirtyIndex < dirtyIndices.length; dirtyIndex++) {
65
- const i = dirtyIndices[dirtyIndex];
66
- const itemInstance = orderedItems[i];
67
- if (!itemInstance) continue;
68
- if (runtime.tryPatchStableForDirtyItem(itemInstance.scope)) continue;
69
- const dom = runtime.syncForItemDom(parent, itemInstance.scope, childrenVNodes[i]);
70
- if (!dom) continue;
71
- const anchor = childNodes[i] ?? null;
72
- if (dom.parentNode !== parent || dom !== anchor) {
73
- recordBenchEvent("domInsert");
74
- parent.insertBefore(dom, anchor);
75
- }
76
- }
77
- boundaryChildrenExact = true;
78
- };
79
- const commitPositional = () => {
80
- for (let i = 0; i < forState.orderedKeys.length; i++) {
81
- const itemInstance = forState.orderedItems[i];
82
- if (!itemInstance) continue;
83
- const dom = runtime.syncForItemDom(parent, itemInstance.scope, childrenVNodes[i]);
84
- if (!dom) continue;
85
- if (dom.parentNode !== parent) {
86
- const anchor = parent.childNodes[i] ?? null;
87
- recordBenchEvent("domInsert");
88
- parent.insertBefore(dom, anchor);
89
- }
90
- }
91
- boundaryChildrenExact = true;
92
- };
93
- const commitAppend = () => {
94
- if (!forState._hasResolvedItemDom && forState.lastRemovedNodes.length === 0 && parent.childNodes.length === forState.orderedKeys.length) {
95
- let exactOrder = true;
96
- let currentNode = parent.firstChild;
97
- for (let i = 0; i < forState.orderedKeys.length; i++) {
98
- const itemInstance = forState.orderedItems[i];
99
- if (!itemInstance) {
100
- exactOrder = false;
101
- currentNode = currentNode?.nextSibling ?? null;
102
- continue;
103
- }
104
- const dom = runtime.syncForItemDom(parent, itemInstance.scope, childrenVNodes[i]);
105
- if (!dom || dom.parentNode !== parent || dom !== currentNode) exactOrder = false;
106
- currentNode = currentNode?.nextSibling ?? null;
107
- }
108
- if (exactOrder) {
109
- boundaryChildrenExact = true;
110
- return;
111
- }
112
- }
113
- withBenchMetricScope("coldCreate", () => {
114
- const fragment = parent.ownerDocument.createDocumentFragment();
115
- let hasPendingAppend = false;
116
- for (let i = 0; i < forState.orderedKeys.length; i++) {
117
- const itemInstance = forState.orderedItems[i];
118
- if (!itemInstance) continue;
119
- if (itemInstance.scope.dom?.parentNode === parent && !itemInstance.scope.needsDomUpdate) continue;
120
- const dom = runtime.syncForItemDom(parent, itemInstance.scope, childrenVNodes[i]);
121
- if (!dom) continue;
122
- if (dom.parentNode !== parent) {
123
- recordBenchEvent("domInsert");
124
- fragment.appendChild(dom);
125
- hasPendingAppend = true;
126
- }
127
- }
128
- if (hasPendingAppend) parent.appendChild(fragment);
129
- });
130
- boundaryChildrenExact = true;
131
- };
132
- const commitSwap = () => {
133
- const swapIndices = forState.pendingSwapIndices;
134
- if (!swapIndices) return;
135
- let [firstIndex, secondIndex] = swapIndices;
136
- if (firstIndex === secondIndex) return;
137
- if (firstIndex > secondIndex) [firstIndex, secondIndex] = [secondIndex, firstIndex];
138
- const firstKey = forState.orderedKeys[firstIndex];
139
- const secondKey = forState.orderedKeys[secondIndex];
140
- const firstItem = forState.items.get(firstKey);
141
- const secondItem = forState.items.get(secondKey);
142
- if (!firstItem || !secondItem) {
143
- commitReorder();
144
- return;
145
- }
146
- const firstDom = runtime.syncForItemDom(parent, firstItem.scope, childrenVNodes[firstIndex]);
147
- const secondDom = runtime.syncForItemDom(parent, secondItem.scope, childrenVNodes[secondIndex]);
148
- if (!firstDom || !secondDom) {
149
- commitReorder();
150
- return;
151
- }
152
- if (firstDom.parentNode !== parent || secondDom.parentNode !== parent) {
153
- commitReorder();
154
- return;
155
- }
156
- if ((firstDom.compareDocumentPosition(secondDom) & Node.DOCUMENT_POSITION_FOLLOWING) !== 0) {
157
- boundaryChildrenExact = true;
158
- return;
159
- }
160
- const firstNextSibling = firstDom.nextSibling;
161
- recordBenchEvent("domMove");
162
- parent.insertBefore(firstDom, secondDom);
163
- recordBenchEvent("domMove");
164
- parent.insertBefore(secondDom, firstNextSibling);
165
- boundaryChildrenExact = true;
166
- };
167
- const commitReorder = () => {
168
- const items = forState.orderedItems;
169
- const count = items.length;
170
- if (forState.pendingMoveOnly && forState.lastRemovedNodes.length === 0) {
171
- const nodes = Array(count);
172
- let movedCount = 0;
173
- let insertedCount = 0;
174
- for (let i = 0; i < count; i++) {
175
- const itemInstance = items[i];
176
- if (!itemInstance) return;
177
- const scope = itemInstance.scope;
178
- const dom = scope.dom && !scope.needsDomUpdate ? scope.dom : runtime.syncForItemDom(parent, scope, childrenVNodes[i]);
179
- if (!dom) return;
180
- if (dom.parentNode === parent) movedCount++;
181
- else insertedCount++;
182
- nodes[i] = dom;
183
- }
184
- if (!canUseDirectReplaceChildrenSpread(count)) {
185
- if (movedCount > 0) recordBenchEvent("domMove", movedCount);
186
- if (insertedCount > 0) recordBenchEvent("domInsert", insertedCount);
187
- replaceChildrenInOrder(parent, nodes, false);
188
- boundaryChildrenExact = true;
189
- return;
190
- }
191
- if (insertedCount > 0) {
192
- if (movedCount > 0) recordBenchEvent("domMove", movedCount);
193
- recordBenchEvent("domInsert", insertedCount);
194
- replaceChildrenInOrder(parent, nodes, true);
195
- boundaryChildrenExact = true;
196
- return;
197
- }
198
- if (count > 1 && commitMoveOnlyReorder(parent, nodes)) {
199
- boundaryChildrenExact = true;
200
- return;
201
- }
202
- if (movedCount > 0) recordBenchEvent("domMove", movedCount);
203
- if (insertedCount > 0) recordBenchEvent("domInsert", insertedCount);
204
- replaceChildrenInOrder(parent, nodes, true);
205
- boundaryChildrenExact = true;
206
- return;
207
- }
208
- let hasExistingChild = false;
209
- for (let i = 0; i < count; i++) if (items[i]?.scope.dom?.parentNode === parent) {
210
- hasExistingChild = true;
211
- break;
212
- }
213
- if (!hasExistingChild) {
214
- withBenchMetricScope("coldCreate", () => {
215
- const nodes = [];
216
- for (let i = 0; i < count; i++) {
217
- const itemInstance = items[i];
218
- if (!itemInstance) continue;
219
- const dom = runtime.syncForItemDom(parent, itemInstance.scope, childrenVNodes[i]);
220
- if (dom) {
221
- recordBenchEvent("domInsert");
222
- nodes.push(dom);
223
- }
224
- }
225
- recordBenchCounter("replaceChildrenCommits");
226
- replaceChildrenInOrder(parent, nodes, false);
227
- });
228
- boundaryChildrenExact = true;
229
- return;
230
- }
231
- if (forState.lastRemovedNodes.length === 0) {
232
- const nodes = [];
233
- for (let i = 0; i < count; i++) {
234
- const itemInstance = items[i];
235
- if (!itemInstance) continue;
236
- const dom = runtime.syncForItemDom(parent, itemInstance.scope, childrenVNodes[i]);
237
- if (!dom) continue;
238
- recordBenchEvent(dom.parentNode === parent ? "domMove" : "domInsert");
239
- nodes.push(dom);
240
- }
241
- replaceChildrenInOrder(parent, nodes, false);
242
- boundaryChildrenExact = true;
243
- return;
244
- }
245
- for (let i = 0; i < count; i++) {
246
- const itemInstance = items[i];
247
- if (!itemInstance) continue;
248
- const dom = runtime.syncForItemDom(parent, itemInstance.scope, childrenVNodes[i]);
249
- if (!dom) continue;
250
- const anchor = parent.childNodes[i] ?? null;
251
- if (dom !== anchor) {
252
- recordBenchEvent("domMove");
253
- parent.insertBefore(dom, anchor);
254
- }
255
- }
256
- boundaryChildrenExact = true;
257
- };
258
- if (forState.lastCommitStrategy === "NO_REORDER" && dirtyIndices.length > 0 && forState.pendingDirtyIndices === null && forState.pendingSwapIndices === null && !forState.pendingMoveOnly && forState.lastRemovedNodes.length === 0 && parent.childNodes.length === forState.orderedKeys.length) {
259
- commitDirtyNoReorder(dirtyIndices);
260
- syncKeyedMapFromForState(parent, forState, "NO_REORDER", []);
261
- recordBenchTiming("domCommit", performance.now() - domCommitStart);
262
- clearForDomUpdateState(forState);
263
- return;
264
- }
265
- switch (forState.lastCommitStrategy) {
266
- case "NO_REORDER":
267
- commitDirtyNoReorder(dirtyIndices);
268
- break;
269
- case "TRUNCATE":
270
- commitPositional();
271
- break;
272
- case "APPEND":
273
- commitAppend();
274
- break;
275
- case "SWAP":
276
- commitSwap();
277
- break;
278
- default:
279
- commitReorder();
280
- break;
281
- }
282
- removeForBoundaryNodes(parent, forState.lastRemovedNodes);
283
- if (forState.lastRemovedNodes.length > 0) boundaryChildrenExact = false;
284
- syncKeyedMapFromForState(parent, forState, forState.lastCommitStrategy, forState.lastRemovedNodes);
285
- const syncExactForBoundaryChildren = () => {
286
- const expectedNodes = [];
287
- for (let i = 0; i < forState.orderedKeys.length; i++) {
288
- const itemInstance = forState.orderedItems[i];
289
- if (!itemInstance) continue;
290
- const dom = itemInstance.scope.dom && !itemInstance.scope.needsDomUpdate ? itemInstance.scope.dom : runtime.syncForItemDom(parent, itemInstance.scope, childrenVNodes[i]);
291
- if (dom) expectedNodes.push(dom);
292
- }
293
- const currentNodes = Array.from(parent.childNodes);
294
- if (currentNodes.length === expectedNodes.length && currentNodes.every((node, index) => node === expectedNodes[index])) return;
295
- const expectedNodeSet = new Set(expectedNodes);
296
- for (const currentNode of currentNodes) {
297
- if (expectedNodeSet.has(currentNode)) continue;
298
- teardownNodeSubtree(currentNode);
299
- if (currentNode.parentNode === parent) {
300
- recordBenchEvent("domRemove");
301
- currentNode.remove();
302
- }
303
- }
304
- replaceChildrenInOrder(parent, expectedNodes, true);
305
- };
306
- if (!boundaryChildrenExact) syncExactForBoundaryChildren();
307
- forState._hasResolvedItemDom = true;
308
- recordBenchTiming("domCommit", performance.now() - domCommitStart);
309
- clearForDomUpdateState(forState);
310
- }
311
- //#endregion
312
- export { commitForStateBoundaryChildren };
313
-
314
- //# sourceMappingURL=for-commit.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"for-commit.js","names":[],"sources":["../../src/renderer/for-commit.ts"],"sourcesContent":["import type { ChildScope } from '../runtime';\nimport {\n clearForDomUpdateState,\n recordBenchCounter,\n recordBenchEvent,\n recordBenchTiming,\n type ForState,\n withBenchMetricScope,\n} from '../runtime';\nimport { teardownNodeSubtree } from './cleanup';\nimport { keyedElements } from './keyed';\nimport type { VNode } from './types';\nimport { canUseDirectReplaceChildrenSpread } from './utils';\nimport {\n getOrBuildDomKeyMap,\n hydrateExistingForDomInOrder,\n syncKeyedMapFromForState,\n} from './for-commit-dom-map';\nimport {\n commitMoveOnlyReorder,\n replaceChildrenInOrder,\n} from './for-commit-reorder';\nimport { removeForBoundaryNodes } from './for-commit-removal';\n\nexport interface ForCommitRuntime {\n isProduction(): boolean;\n syncForItemDom(parent: Element, scope: ChildScope, vnode: VNode): Node | null;\n tryPatchStableForDirtyItem(scope: ChildScope): boolean;\n}\n\nexport function commitForStateBoundaryChildren(\n parent: Element,\n forState: ForState<unknown>,\n childrenVNodes: VNode[],\n runtime: ForCommitRuntime\n): void {\n const domCommitStart = performance.now();\n\n const hydrateExistingForDom = (): void => {\n if (hydrateExistingForDomInOrder(parent, forState)) {\n return;\n }\n\n const domKeyMap = getOrBuildDomKeyMap(parent);\n if (!domKeyMap) {\n return;\n }\n\n for (let i = 0; i < forState.orderedKeys.length; i++) {\n const itemKey = forState.orderedKeys[i];\n const itemInstance = forState.items.get(itemKey);\n if (!itemInstance || itemInstance.scope.dom) {\n continue;\n }\n\n const existingDom = domKeyMap.get(itemKey);\n if (!existingDom) {\n continue;\n }\n\n itemInstance.scope.dom = existingDom;\n itemInstance.scope.needsDomUpdate = true;\n }\n };\n\n if (forState.orderedKeys.length === 0) {\n removeForBoundaryNodes(parent, forState.lastRemovedNodes);\n\n const fallbackScope = forState.fallbackScope;\n const fallbackVNode = childrenVNodes[0];\n const nextDom =\n fallbackScope && fallbackVNode !== undefined\n ? runtime.syncForItemDom(parent, fallbackScope, fallbackVNode)\n : null;\n\n if (nextDom) {\n if (\n parent.childNodes.length !== 1 ||\n parent.firstChild !== nextDom ||\n forState.lastRemovedNodes.length > 0\n ) {\n parent.replaceChildren(nextDom);\n }\n } else if (parent.firstChild) {\n parent.textContent = '';\n }\n\n keyedElements.delete(parent);\n forState._hasResolvedItemDom = false;\n recordBenchTiming('domCommit', performance.now() - domCommitStart);\n clearForDomUpdateState(forState);\n return;\n }\n\n if (!forState._hasResolvedItemDom && parent.childNodes.length > 0) {\n hydrateExistingForDom();\n }\n\n const getDirtyForIndices = (): number[] => {\n const pendingDirtyIndices = forState.pendingDirtyIndices;\n if (pendingDirtyIndices && pendingDirtyIndices.length > 0) {\n return pendingDirtyIndices;\n }\n\n const dirtyIndices: number[] = [];\n for (let index = 0; index < forState.orderedKeys.length; index += 1) {\n const itemInstance = forState.orderedItems[index];\n if (itemInstance?.scope.needsDomUpdate) {\n dirtyIndices.push(index);\n }\n }\n\n return dirtyIndices;\n };\n\n let dirtyIndicesCache: number[] | null = null;\n const ensureDirtyIndices = (): number[] => {\n if (dirtyIndicesCache) {\n return dirtyIndicesCache;\n }\n\n dirtyIndicesCache = getDirtyForIndices();\n return dirtyIndicesCache;\n };\n\n const dirtyIndices =\n forState.lastCommitStrategy === 'NO_REORDER' ? ensureDirtyIndices() : [];\n let boundaryChildrenExact = false;\n\n const commitDirtyNoReorder = (dirtyIndices: number[]): void => {\n if (dirtyIndices.length === 0) {\n boundaryChildrenExact = true;\n return;\n }\n\n const orderedItems = forState.orderedItems;\n const childNodes = parent.childNodes;\n\n for (let dirtyIndex = 0; dirtyIndex < dirtyIndices.length; dirtyIndex++) {\n const i = dirtyIndices[dirtyIndex];\n const itemInstance = orderedItems[i];\n if (!itemInstance) {\n continue;\n }\n\n if (runtime.tryPatchStableForDirtyItem(itemInstance.scope)) {\n continue;\n }\n\n const dom = runtime.syncForItemDom(\n parent,\n itemInstance.scope,\n childrenVNodes[i]\n );\n if (!dom) {\n continue;\n }\n\n const anchor = childNodes[i] ?? null;\n if (dom.parentNode !== parent || dom !== anchor) {\n recordBenchEvent('domInsert');\n parent.insertBefore(dom, anchor);\n }\n }\n\n boundaryChildrenExact = true;\n };\n\n const commitPositional = (): void => {\n for (let i = 0; i < forState.orderedKeys.length; i++) {\n const itemInstance = forState.orderedItems[i];\n if (!itemInstance) {\n continue;\n }\n\n const dom = runtime.syncForItemDom(\n parent,\n itemInstance.scope,\n childrenVNodes[i]\n );\n if (!dom) {\n continue;\n }\n\n if (dom.parentNode !== parent) {\n const anchor = parent.childNodes[i] ?? null;\n recordBenchEvent('domInsert');\n parent.insertBefore(dom, anchor);\n }\n }\n\n boundaryChildrenExact = true;\n };\n\n const commitAppend = (): void => {\n const canHydrateInPlace =\n !forState._hasResolvedItemDom &&\n forState.lastRemovedNodes.length === 0 &&\n parent.childNodes.length === forState.orderedKeys.length;\n if (canHydrateInPlace) {\n let exactOrder = true;\n let currentNode = parent.firstChild;\n\n for (let i = 0; i < forState.orderedKeys.length; i++) {\n const itemInstance = forState.orderedItems[i];\n if (!itemInstance) {\n exactOrder = false;\n currentNode = currentNode?.nextSibling ?? null;\n continue;\n }\n\n const dom = runtime.syncForItemDom(\n parent,\n itemInstance.scope,\n childrenVNodes[i]\n );\n if (!dom || dom.parentNode !== parent || dom !== currentNode) {\n exactOrder = false;\n }\n\n currentNode = currentNode?.nextSibling ?? null;\n }\n\n if (exactOrder) {\n boundaryChildrenExact = true;\n return;\n }\n }\n\n withBenchMetricScope('coldCreate', () => {\n const fragment = parent.ownerDocument.createDocumentFragment();\n let hasPendingAppend = false;\n\n for (let i = 0; i < forState.orderedKeys.length; i++) {\n const itemInstance = forState.orderedItems[i];\n if (!itemInstance) {\n continue;\n }\n\n if (\n itemInstance.scope.dom?.parentNode === parent &&\n !itemInstance.scope.needsDomUpdate\n ) {\n continue;\n }\n\n const dom = runtime.syncForItemDom(\n parent,\n itemInstance.scope,\n childrenVNodes[i]\n );\n if (!dom) {\n continue;\n }\n\n if (dom.parentNode !== parent) {\n recordBenchEvent('domInsert');\n fragment.appendChild(dom);\n hasPendingAppend = true;\n }\n }\n\n if (hasPendingAppend) {\n parent.appendChild(fragment);\n }\n });\n\n boundaryChildrenExact = true;\n };\n\n const commitSwap = (): void => {\n const swapIndices = forState.pendingSwapIndices;\n if (!swapIndices) {\n return;\n }\n\n let [firstIndex, secondIndex] = swapIndices;\n if (firstIndex === secondIndex) {\n return;\n }\n\n if (firstIndex > secondIndex) {\n [firstIndex, secondIndex] = [secondIndex, firstIndex];\n }\n\n const firstKey = forState.orderedKeys[firstIndex];\n const secondKey = forState.orderedKeys[secondIndex];\n const firstItem = forState.items.get(firstKey);\n const secondItem = forState.items.get(secondKey);\n\n if (!firstItem || !secondItem) {\n commitReorder();\n return;\n }\n\n const firstDom = runtime.syncForItemDom(\n parent,\n firstItem.scope,\n childrenVNodes[firstIndex]\n );\n const secondDom = runtime.syncForItemDom(\n parent,\n secondItem.scope,\n childrenVNodes[secondIndex]\n );\n\n if (!firstDom || !secondDom) {\n commitReorder();\n return;\n }\n\n if (firstDom.parentNode !== parent || secondDom.parentNode !== parent) {\n commitReorder();\n return;\n }\n\n const firstBeforeSecond =\n (firstDom.compareDocumentPosition(secondDom) &\n Node.DOCUMENT_POSITION_FOLLOWING) !==\n 0;\n if (firstBeforeSecond) {\n boundaryChildrenExact = true;\n return;\n }\n\n const firstNextSibling = firstDom.nextSibling;\n recordBenchEvent('domMove');\n parent.insertBefore(firstDom, secondDom);\n recordBenchEvent('domMove');\n parent.insertBefore(secondDom, firstNextSibling);\n\n boundaryChildrenExact = true;\n };\n\n const commitReorder = (): void => {\n const items = forState.orderedItems;\n const count = items.length;\n\n if (forState.pendingMoveOnly && forState.lastRemovedNodes.length === 0) {\n const nodes = Array<Node>(count);\n let movedCount = 0;\n let insertedCount = 0;\n\n for (let i = 0; i < count; i++) {\n const itemInstance = items[i];\n if (!itemInstance) {\n return;\n }\n\n const scope = itemInstance.scope;\n const dom =\n scope.dom && !scope.needsDomUpdate\n ? scope.dom\n : runtime.syncForItemDom(parent, scope, childrenVNodes[i]);\n\n if (!dom) {\n return;\n }\n\n if (dom.parentNode === parent) {\n movedCount++;\n } else {\n insertedCount++;\n }\n nodes[i] = dom;\n }\n\n if (!canUseDirectReplaceChildrenSpread(count)) {\n if (movedCount > 0) {\n recordBenchEvent('domMove', movedCount);\n }\n if (insertedCount > 0) {\n recordBenchEvent('domInsert', insertedCount);\n }\n replaceChildrenInOrder(parent, nodes, false);\n boundaryChildrenExact = true;\n return;\n }\n\n if (insertedCount > 0) {\n if (movedCount > 0) {\n recordBenchEvent('domMove', movedCount);\n }\n recordBenchEvent('domInsert', insertedCount);\n replaceChildrenInOrder(parent, nodes, true);\n boundaryChildrenExact = true;\n return;\n }\n\n if (count > 1 && commitMoveOnlyReorder(parent, nodes)) {\n boundaryChildrenExact = true;\n return;\n }\n\n if (movedCount > 0) {\n recordBenchEvent('domMove', movedCount);\n }\n if (insertedCount > 0) {\n recordBenchEvent('domInsert', insertedCount);\n }\n\n replaceChildrenInOrder(parent, nodes, true);\n boundaryChildrenExact = true;\n return;\n }\n\n let hasExistingChild = false;\n for (let i = 0; i < count; i++) {\n const itemInstance = items[i];\n if (itemInstance?.scope.dom?.parentNode === parent) {\n hasExistingChild = true;\n break;\n }\n }\n\n if (!hasExistingChild) {\n withBenchMetricScope('coldCreate', () => {\n const nodes: Node[] = [];\n for (let i = 0; i < count; i++) {\n const itemInstance = items[i];\n if (!itemInstance) continue;\n const dom = runtime.syncForItemDom(\n parent,\n itemInstance.scope,\n childrenVNodes[i]\n );\n if (dom) {\n recordBenchEvent('domInsert');\n nodes.push(dom);\n }\n }\n recordBenchCounter('replaceChildrenCommits');\n replaceChildrenInOrder(parent, nodes, false);\n });\n\n boundaryChildrenExact = true;\n return;\n }\n\n if (forState.lastRemovedNodes.length === 0) {\n const nodes: Node[] = [];\n\n for (let i = 0; i < count; i++) {\n const itemInstance = items[i];\n if (!itemInstance) {\n continue;\n }\n\n const dom = runtime.syncForItemDom(\n parent,\n itemInstance.scope,\n childrenVNodes[i]\n );\n if (!dom) {\n continue;\n }\n\n recordBenchEvent(dom.parentNode === parent ? 'domMove' : 'domInsert');\n nodes.push(dom);\n }\n\n replaceChildrenInOrder(parent, nodes, false);\n boundaryChildrenExact = true;\n return;\n }\n\n for (let i = 0; i < count; i++) {\n const itemInstance = items[i];\n if (!itemInstance) {\n continue;\n }\n\n const dom = runtime.syncForItemDom(\n parent,\n itemInstance.scope,\n childrenVNodes[i]\n );\n if (!dom) {\n continue;\n }\n\n const anchor = parent.childNodes[i] ?? null;\n if (dom !== anchor) {\n recordBenchEvent('domMove');\n parent.insertBefore(dom, anchor);\n }\n }\n\n boundaryChildrenExact = true;\n };\n\n const isLocalOnlyDirtyCommit =\n forState.lastCommitStrategy === 'NO_REORDER' &&\n dirtyIndices.length > 0 &&\n forState.pendingDirtyIndices === null &&\n forState.pendingSwapIndices === null &&\n !forState.pendingMoveOnly &&\n forState.lastRemovedNodes.length === 0 &&\n parent.childNodes.length === forState.orderedKeys.length;\n\n if (isLocalOnlyDirtyCommit) {\n commitDirtyNoReorder(dirtyIndices);\n syncKeyedMapFromForState(parent, forState, 'NO_REORDER', []);\n\n recordBenchTiming('domCommit', performance.now() - domCommitStart);\n clearForDomUpdateState(forState);\n return;\n }\n\n switch (forState.lastCommitStrategy) {\n case 'NO_REORDER':\n commitDirtyNoReorder(dirtyIndices);\n break;\n case 'TRUNCATE':\n commitPositional();\n break;\n case 'APPEND':\n commitAppend();\n break;\n case 'SWAP':\n commitSwap();\n break;\n case 'FULL_KEYED':\n default:\n commitReorder();\n break;\n }\n\n removeForBoundaryNodes(parent, forState.lastRemovedNodes);\n if (forState.lastRemovedNodes.length > 0) {\n boundaryChildrenExact = false;\n }\n syncKeyedMapFromForState(\n parent,\n forState,\n forState.lastCommitStrategy,\n forState.lastRemovedNodes\n );\n\n const syncExactForBoundaryChildren = (): void => {\n const expectedNodes: Node[] = [];\n\n for (let i = 0; i < forState.orderedKeys.length; i++) {\n const itemInstance = forState.orderedItems[i];\n if (!itemInstance) {\n continue;\n }\n\n const dom =\n itemInstance.scope.dom && !itemInstance.scope.needsDomUpdate\n ? itemInstance.scope.dom\n : runtime.syncForItemDom(\n parent,\n itemInstance.scope,\n childrenVNodes[i]\n );\n if (dom) {\n expectedNodes.push(dom);\n }\n }\n\n const currentNodes = Array.from(parent.childNodes);\n if (\n currentNodes.length === expectedNodes.length &&\n currentNodes.every((node, index) => node === expectedNodes[index])\n ) {\n return;\n }\n\n const expectedNodeSet = new Set(expectedNodes);\n for (const currentNode of currentNodes) {\n if (expectedNodeSet.has(currentNode)) {\n continue;\n }\n\n teardownNodeSubtree(currentNode);\n\n if (currentNode.parentNode === parent) {\n recordBenchEvent('domRemove');\n currentNode.remove();\n }\n }\n\n replaceChildrenInOrder(parent, expectedNodes, true);\n };\n\n if (!boundaryChildrenExact) {\n syncExactForBoundaryChildren();\n }\n forState._hasResolvedItemDom = true;\n recordBenchTiming('domCommit', performance.now() - domCommitStart);\n clearForDomUpdateState(forState);\n}\n"],"mappings":";;;;;;;;;;AA8BA,SAAgB,+BACd,QACA,UACA,gBACA,SACM;CACN,MAAM,iBAAiB,YAAY,IAAI;CAEvC,MAAM,8BAAoC;EACxC,IAAI,6BAA6B,QAAQ,QAAQ,GAC/C;EAGF,MAAM,YAAY,oBAAoB,MAAM;EAC5C,IAAI,CAAC,WACH;EAGF,KAAK,IAAI,IAAI,GAAG,IAAI,SAAS,YAAY,QAAQ,KAAK;GACpD,MAAM,UAAU,SAAS,YAAY;GACrC,MAAM,eAAe,SAAS,MAAM,IAAI,OAAO;GAC/C,IAAI,CAAC,gBAAgB,aAAa,MAAM,KACtC;GAGF,MAAM,cAAc,UAAU,IAAI,OAAO;GACzC,IAAI,CAAC,aACH;GAGF,aAAa,MAAM,MAAM;GACzB,aAAa,MAAM,iBAAiB;EACtC;CACF;CAEA,IAAI,SAAS,YAAY,WAAW,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AiB,WAAW;IAC5B,YAAY,OAAO;GACrB;EACF;EAEA,uBAAuB,QAAQ,eAAe,IAAI;CACpD;CAEA,IAAI,CAAC,uBACH,6BAA6B;CAE/B,SAAS,sBAAsB;CAC/B,kBAAkB,aAAa,YAAY,IAAI,IAAI,cAAc;CACjE,uBAAuB,QAAQ;AACjC"}
@@ -1,38 +0,0 @@
1
- import { _isDOMElement } from "../common/vnode.js";
2
- import "./types.js";
3
- import { configureRuntimeRenderer } from "../runtime/runtime.js";
4
- import { getDefaultRuntimeInstance } from "../runtime/access.js";
5
- import "../runtime/index.js";
6
- import { REACTIVE_CHILDREN_KEY, cleanupInstanceIfPresent, cleanupInstancesUnder, elementListeners, elementReactivePropsCleanup, elementRefs, removeAllListeners, removeElementListeners, removeElementReactiveProps, removeElementRef, teardownNodeSubtree, updateElementRef } from "./cleanup.js";
7
- import { getKeyMapForElement, isKeyedReorderFastPathEligible, populateKeyMapForElement } from "./keyed.js";
8
- import "./boundaries.js";
9
- import { performBulkPositionalKeyedTextUpdate } from "./children-fastpath.js";
10
- import { isBulkTextFastPathEligible, performBulkTextReplace } from "./children.js";
11
- import { syncComponentElement } from "./component-host.js";
12
- import { setStaticChildSlotsCacheEnabled } from "./static-reuse.js";
13
- import { updateElementChildren, updateUnkeyedChildren } from "./element-children.js";
14
- import { markReactivePropsDirtySource } from "./prop-bindings.js";
15
- import { tryPatchStableForDirtyItem } from "./stable-patch.js";
16
- import { IS_DOM_AVAILABLE, createDOMNode, updateElementFromVnode } from "./dom-internal.js";
17
- import "./dom.js";
18
- import { evaluate } from "./evaluate.js";
19
- //#region src/renderer/index.ts
20
- function createRendererHost() {
21
- return {
22
- evaluate,
23
- cleanupInstancesUnder,
24
- teardownNodeSubtree,
25
- populateKeyMapForElement,
26
- getKeyMapForElement,
27
- isKeyedReorderFastPathEligible,
28
- markReactivePropsDirtySource
29
- };
30
- }
31
- function installRendererBridge(runtime = getDefaultRuntimeInstance()) {
32
- configureRuntimeRenderer(createRendererHost(), runtime);
33
- return true;
34
- }
35
- //#endregion
36
- export { IS_DOM_AVAILABLE, REACTIVE_CHILDREN_KEY, _isDOMElement, cleanupInstanceIfPresent, cleanupInstancesUnder, createDOMNode, createRendererHost, elementListeners, elementReactivePropsCleanup, elementRefs, installRendererBridge, isBulkTextFastPathEligible, markReactivePropsDirtySource, performBulkPositionalKeyedTextUpdate, performBulkTextReplace, removeAllListeners, removeElementListeners, removeElementReactiveProps, removeElementRef, setStaticChildSlotsCacheEnabled, syncComponentElement, teardownNodeSubtree, tryPatchStableForDirtyItem, updateElementChildren, updateElementFromVnode, updateElementRef, updateUnkeyedChildren };
37
-
38
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","names":["_evaluate","_markReactivePropsDirtySource"],"sources":["../../src/renderer/index.ts"],"sourcesContent":["// Renderer barrel entrypoint.\n// Keep this file small: re-export the public surface and provide the runtime\n// renderer host used by browser composition.\n\nexport * from './types';\nexport * from './cleanup';\nexport {\n keyedElements,\n getKeyMapForElement,\n populateKeyMapForElement,\n _reconcilerRecordedParents,\n isKeyedReorderFastPathEligible,\n} from './keyed';\nexport * from './dom';\nexport { evaluate, clearDOMRange } from './evaluate';\n\nimport { evaluate as _evaluate } from './evaluate';\nimport { cleanupInstancesUnder, teardownNodeSubtree } from './cleanup';\nimport { isKeyedReorderFastPathEligible, getKeyMapForElement } from './keyed';\nimport { populateKeyMapForElement } from './keyed';\nimport { markReactivePropsDirtySource as _markReactivePropsDirtySource } from './dom';\nimport { getDefaultRuntimeInstance } from '../runtime';\nimport {\n configureRuntimeRenderer,\n type AskrRuntime,\n type RuntimeRendererHost,\n} from '../runtime';\n\nexport function createRendererHost(): RuntimeRendererHost {\n return {\n evaluate: _evaluate,\n cleanupInstancesUnder,\n teardownNodeSubtree,\n populateKeyMapForElement,\n getKeyMapForElement,\n isKeyedReorderFastPathEligible,\n markReactivePropsDirtySource: _markReactivePropsDirtySource,\n };\n}\n\nexport function installRendererBridge(\n runtime: AskrRuntime = getDefaultRuntimeInstance()\n): true {\n configureRuntimeRenderer(createRendererHost(), runtime);\n return true;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AA4BA,SAAgB,qBAA0C;CACxD,OAAO;EACKA;EACV;EACA;EACA;EACA;EACA;EAC8BC;CAChC;AACF;AAEA,SAAgB,sBACd,UAAuB,0BAA0B,GAC3C;CACN,yBAAyB,mBAAmB,GAAG,OAAO;CACtD,OAAO;AACT"}