@ecopages/radiant 0.3.0-alpha.3 → 0.3.0-alpha.5

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 (450) hide show
  1. package/README.md +66 -56
  2. package/dist/LICENSE +21 -0
  3. package/dist/client/hydrator.d.ts +1 -1
  4. package/dist/client/hydrator.js +2 -2
  5. package/dist/client/hydrator.js.map +5 -3
  6. package/dist/client/install-hydrator.js +2 -2
  7. package/dist/client/install-hydrator.js.map +5 -3
  8. package/dist/context/context-consumer-bootstrap.d.ts +7 -6
  9. package/dist/context/context-consumer-bootstrap.js +2 -2
  10. package/dist/context/context-consumer-bootstrap.js.map +8 -3
  11. package/dist/context/context-consumer-runtime.d.ts +21 -8
  12. package/dist/context/context-consumer-runtime.js +2 -2
  13. package/dist/context/context-consumer-runtime.js.map +6 -3
  14. package/dist/context/context-host.d.ts +25 -0
  15. package/dist/context/context-host.js +3 -0
  16. package/dist/context/context-host.js.map +10 -0
  17. package/dist/context/context-provider.d.ts +10 -6
  18. package/dist/context/context-provider.js +2 -2
  19. package/dist/context/context-provider.js.map +9 -3
  20. package/dist/context/context-ssr-bridge.js +2 -2
  21. package/dist/context/context-ssr-bridge.js.map +4 -3
  22. package/dist/context/create-context.js +2 -2
  23. package/dist/context/create-context.js.map +4 -3
  24. package/dist/context/decorators/consume-context.d.ts +5 -2
  25. package/dist/context/decorators/consume-context.js +2 -2
  26. package/dist/context/decorators/consume-context.js.map +13 -3
  27. package/dist/context/decorators/context-selection-delivery.d.ts +1 -1
  28. package/dist/context/decorators/context-selection-delivery.js +2 -2
  29. package/dist/context/decorators/context-selection-delivery.js.map +5 -3
  30. package/dist/context/decorators/context-selector.d.ts +6 -6
  31. package/dist/context/decorators/context-selector.js +2 -2
  32. package/dist/context/decorators/context-selector.js.map +15 -3
  33. package/dist/context/decorators/legacy/consume-context.d.ts +2 -2
  34. package/dist/context/decorators/legacy/consume-context.js +2 -2
  35. package/dist/context/decorators/legacy/consume-context.js.map +10 -3
  36. package/dist/context/decorators/legacy/context-selector-field.d.ts +2 -2
  37. package/dist/context/decorators/legacy/context-selector-field.js +2 -2
  38. package/dist/context/decorators/legacy/context-selector-field.js.map +11 -3
  39. package/dist/context/decorators/legacy/context-selector.d.ts +2 -2
  40. package/dist/context/decorators/legacy/context-selector.js +2 -2
  41. package/dist/context/decorators/legacy/context-selector.js.map +11 -3
  42. package/dist/context/decorators/legacy/provide-context.d.ts +2 -2
  43. package/dist/context/decorators/legacy/provide-context.js +2 -2
  44. package/dist/context/decorators/legacy/provide-context.js.map +11 -3
  45. package/dist/context/decorators/on-context-update.d.ts +5 -5
  46. package/dist/context/decorators/on-context-update.js +2 -2
  47. package/dist/context/decorators/on-context-update.js.map +14 -3
  48. package/dist/context/decorators/provide-context.d.ts +5 -2
  49. package/dist/context/decorators/provide-context.js +2 -2
  50. package/dist/context/decorators/provide-context.js.map +14 -3
  51. package/dist/context/decorators/standard/consume-context.d.ts +2 -2
  52. package/dist/context/decorators/standard/consume-context.js +2 -2
  53. package/dist/context/decorators/standard/consume-context.js.map +9 -3
  54. package/dist/context/decorators/standard/context-selector-field.d.ts +2 -2
  55. package/dist/context/decorators/standard/context-selector-field.js +2 -2
  56. package/dist/context/decorators/standard/context-selector-field.js.map +10 -3
  57. package/dist/context/decorators/standard/context-selector.d.ts +2 -3
  58. package/dist/context/decorators/standard/context-selector.js +2 -2
  59. package/dist/context/decorators/standard/context-selector.js.map +10 -3
  60. package/dist/context/decorators/standard/provide-context.d.ts +2 -2
  61. package/dist/context/decorators/standard/provide-context.js +2 -2
  62. package/dist/context/decorators/standard/provide-context.js.map +10 -3
  63. package/dist/context/events.d.ts +18 -11
  64. package/dist/context/events.js +2 -2
  65. package/dist/context/events.js.map +4 -3
  66. package/dist/context/hydration-script.js +2 -2
  67. package/dist/context/hydration-script.js.map +6 -3
  68. package/dist/controller-registry.d.ts +28 -0
  69. package/dist/controller-registry.js +3 -0
  70. package/dist/controller-registry.js.map +11 -0
  71. package/dist/core/controller-metadata.d.ts +3 -0
  72. package/dist/core/controller-metadata.js +3 -0
  73. package/dist/core/controller-metadata.js.map +10 -0
  74. package/dist/core/custom-element-metadata.d.ts +11 -0
  75. package/dist/core/custom-element-metadata.js +2 -2
  76. package/dist/core/custom-element-metadata.js.map +4 -3
  77. package/dist/core/hydration-codec.d.ts +8 -1
  78. package/dist/core/hydration-codec.js +2 -2
  79. package/dist/core/hydration-codec.js.map +5 -3
  80. package/dist/core/radiant-component-ssr-registry.d.ts +13 -13
  81. package/dist/core/radiant-component-ssr-registry.js +2 -2
  82. package/dist/core/radiant-component-ssr-registry.js.map +4 -3
  83. package/dist/core/radiant-component-ssr.d.ts +3 -3
  84. package/dist/core/radiant-component-ssr.js +2 -2
  85. package/dist/core/radiant-component-ssr.js.map +8 -3
  86. package/dist/core/radiant-controller.d.ts +127 -0
  87. package/dist/core/radiant-controller.js +3 -0
  88. package/dist/core/radiant-controller.js.map +13 -0
  89. package/dist/core/radiant-element.d.ts +43 -41
  90. package/dist/core/radiant-element.js +2 -2
  91. package/dist/core/radiant-element.js.map +13 -3
  92. package/dist/core/radiant-hydrator-state.d.ts +1 -1
  93. package/dist/core/radiant-hydrator-state.js +2 -2
  94. package/dist/core/radiant-hydrator-state.js.map +4 -3
  95. package/dist/core/reactive-host.d.ts +137 -0
  96. package/dist/core/reactive-host.js +3 -0
  97. package/dist/core/reactive-host.js.map +10 -0
  98. package/dist/core/reactive-jsx-value.js +2 -2
  99. package/dist/core/reactive-jsx-value.js.map +4 -3
  100. package/dist/core/reactive-prop-metadata.js +2 -2
  101. package/dist/core/reactive-prop-metadata.js.map +4 -3
  102. package/dist/core/slot-projection-runtime.js +2 -2
  103. package/dist/core/slot-projection-runtime.js.map +6 -3
  104. package/dist/core/ssr-preparation.js +2 -2
  105. package/dist/core/ssr-preparation.js.map +4 -3
  106. package/dist/decorators/attr.d.ts +6 -0
  107. package/dist/decorators/attr.js +3 -0
  108. package/dist/decorators/attr.js.map +16 -0
  109. package/dist/decorators/bound.d.ts +4 -2
  110. package/dist/decorators/bound.js +2 -2
  111. package/dist/decorators/bound.js.map +7 -3
  112. package/dist/decorators/bridge.d.ts +11 -7
  113. package/dist/decorators/bridge.js +2 -2
  114. package/dist/decorators/bridge.js.map +4 -3
  115. package/dist/decorators/controller.d.ts +2 -0
  116. package/dist/decorators/controller.js +3 -0
  117. package/dist/decorators/controller.js.map +12 -0
  118. package/dist/decorators/custom-element.d.ts +4 -2
  119. package/dist/decorators/custom-element.js +2 -2
  120. package/dist/decorators/custom-element.js.map +7 -3
  121. package/dist/decorators/debounce.d.ts +5 -2
  122. package/dist/decorators/debounce.js +2 -2
  123. package/dist/decorators/debounce.js.map +8 -3
  124. package/dist/decorators/event.d.ts +5 -2
  125. package/dist/decorators/event.js +2 -2
  126. package/dist/decorators/event.js.map +10 -3
  127. package/dist/decorators/legacy/attr.d.ts +2 -0
  128. package/dist/decorators/legacy/attr.js +3 -0
  129. package/dist/decorators/legacy/attr.js.map +13 -0
  130. package/dist/decorators/legacy/bound.js +2 -2
  131. package/dist/decorators/legacy/bound.js.map +4 -3
  132. package/dist/decorators/legacy/custom-element.js +2 -2
  133. package/dist/decorators/legacy/custom-element.js.map +5 -3
  134. package/dist/decorators/legacy/debounce.js +2 -2
  135. package/dist/decorators/legacy/debounce.js.map +5 -3
  136. package/dist/decorators/legacy/event.js +2 -2
  137. package/dist/decorators/legacy/event.js.map +7 -3
  138. package/dist/decorators/legacy/instance-initializers.d.ts +3 -4
  139. package/dist/decorators/legacy/instance-initializers.js +2 -2
  140. package/dist/decorators/legacy/instance-initializers.js.map +4 -3
  141. package/dist/decorators/legacy/on-event.d.ts +2 -2
  142. package/dist/decorators/legacy/on-event.js +2 -2
  143. package/dist/decorators/legacy/on-event.js.map +6 -3
  144. package/dist/decorators/legacy/on-updated.d.ts +7 -2
  145. package/dist/decorators/legacy/on-updated.js +2 -2
  146. package/dist/decorators/legacy/on-updated.js.map +5 -3
  147. package/dist/decorators/legacy/query-slot.js +2 -2
  148. package/dist/decorators/legacy/query-slot.js.map +7 -3
  149. package/dist/decorators/legacy/query.d.ts +7 -2
  150. package/dist/decorators/legacy/query.js +2 -2
  151. package/dist/decorators/legacy/query.js.map +6 -3
  152. package/dist/decorators/legacy/reactive-field.d.ts +2 -2
  153. package/dist/decorators/legacy/reactive-field.js +2 -2
  154. package/dist/decorators/legacy/reactive-field.js.map +5 -3
  155. package/dist/decorators/legacy/reactive-prop.d.ts +10 -16
  156. package/dist/decorators/legacy/reactive-prop.js +2 -2
  157. package/dist/decorators/legacy/reactive-prop.js.map +7 -3
  158. package/dist/decorators/legacy/signal.d.ts +4 -3
  159. package/dist/decorators/legacy/signal.js +2 -2
  160. package/dist/decorators/legacy/signal.js.map +9 -3
  161. package/dist/decorators/on-event.d.ts +6 -3
  162. package/dist/decorators/on-event.js +2 -2
  163. package/dist/decorators/on-event.js.map +9 -3
  164. package/dist/decorators/on-updated.d.ts +12 -2
  165. package/dist/decorators/on-updated.js +2 -2
  166. package/dist/decorators/on-updated.js.map +8 -3
  167. package/dist/decorators/prop.d.ts +19 -7
  168. package/dist/decorators/prop.js +2 -2
  169. package/dist/decorators/prop.js.map +10 -3
  170. package/dist/decorators/query-slot.d.ts +11 -3
  171. package/dist/decorators/query-slot.js +2 -2
  172. package/dist/decorators/query-slot.js.map +10 -3
  173. package/dist/decorators/query.d.ts +9 -2
  174. package/dist/decorators/query.js +2 -2
  175. package/dist/decorators/query.js.map +9 -3
  176. package/dist/decorators/shared/reactive-attr.d.ts +25 -0
  177. package/dist/decorators/shared/reactive-attr.js +3 -0
  178. package/dist/decorators/shared/reactive-attr.js.map +11 -0
  179. package/dist/decorators/signal.d.ts +10 -4
  180. package/dist/decorators/signal.js +2 -2
  181. package/dist/decorators/signal.js.map +11 -3
  182. package/dist/decorators/standard/attr.d.ts +2 -0
  183. package/dist/decorators/standard/attr.js +3 -0
  184. package/dist/decorators/standard/attr.js.map +12 -0
  185. package/dist/decorators/standard/bound.js +2 -2
  186. package/dist/decorators/standard/bound.js.map +4 -3
  187. package/dist/decorators/standard/custom-element.js +2 -2
  188. package/dist/decorators/standard/custom-element.js.map +5 -3
  189. package/dist/decorators/standard/debounce.js +2 -2
  190. package/dist/decorators/standard/debounce.js.map +5 -3
  191. package/dist/decorators/standard/event.js +2 -2
  192. package/dist/decorators/standard/event.js.map +6 -3
  193. package/dist/decorators/standard/on-event.d.ts +2 -1
  194. package/dist/decorators/standard/on-event.js +2 -2
  195. package/dist/decorators/standard/on-event.js.map +5 -3
  196. package/dist/decorators/standard/on-updated.d.ts +5 -1
  197. package/dist/decorators/standard/on-updated.js +2 -2
  198. package/dist/decorators/standard/on-updated.js.map +4 -3
  199. package/dist/decorators/standard/query-slot.d.ts +1 -1
  200. package/dist/decorators/standard/query-slot.js +2 -2
  201. package/dist/decorators/standard/query-slot.js.map +5 -3
  202. package/dist/decorators/standard/query.d.ts +2 -1
  203. package/dist/decorators/standard/query.js +2 -2
  204. package/dist/decorators/standard/query.js.map +5 -3
  205. package/dist/decorators/standard/reactive-field.d.ts +2 -2
  206. package/dist/decorators/standard/reactive-field.js +2 -2
  207. package/dist/decorators/standard/reactive-field.js.map +4 -3
  208. package/dist/decorators/standard/reactive-prop.d.ts +13 -2
  209. package/dist/decorators/standard/reactive-prop.js +2 -2
  210. package/dist/decorators/standard/reactive-prop.js.map +6 -3
  211. package/dist/decorators/standard/signal.d.ts +4 -3
  212. package/dist/decorators/standard/signal.js +2 -2
  213. package/dist/decorators/standard/signal.js.map +8 -3
  214. package/dist/decorators/state.d.ts +6 -5
  215. package/dist/decorators/state.js +2 -2
  216. package/dist/decorators/state.js.map +8 -3
  217. package/dist/helpers/create-event-listener.d.ts +11 -2
  218. package/dist/helpers/create-event-listener.js +2 -2
  219. package/dist/helpers/create-event-listener.js.map +4 -3
  220. package/dist/helpers/create-event.js +2 -2
  221. package/dist/helpers/create-event.js.map +5 -3
  222. package/dist/helpers/create-query-slot.js +2 -2
  223. package/dist/helpers/create-query-slot.js.map +4 -3
  224. package/dist/helpers/create-query.d.ts +14 -3
  225. package/dist/helpers/create-query.js +2 -2
  226. package/dist/helpers/create-query.js.map +4 -3
  227. package/dist/helpers/debounce.js +2 -2
  228. package/dist/helpers/debounce.js.map +4 -3
  229. package/dist/helpers/index.js +2 -2
  230. package/dist/helpers/index.js.map +9 -3
  231. package/dist/index.d.ts +11 -12
  232. package/dist/index.js +2 -2
  233. package/dist/index.js.map +87 -3
  234. package/dist/server/context-ssr.js +2 -2
  235. package/dist/server/context-ssr.js.map +5 -3
  236. package/dist/server/html-parser.js +2 -2
  237. package/dist/server/html-parser.js.map +4 -3
  238. package/dist/server/install-light-dom-shim.js +2 -2
  239. package/dist/server/install-light-dom-shim.js.map +5 -3
  240. package/dist/server/light-dom-shim.js +2 -2
  241. package/dist/server/light-dom-shim.js.map +5 -3
  242. package/dist/server/project-root.js +2 -2
  243. package/dist/server/project-root.js.map +2 -2
  244. package/dist/server/radiant-component-ssr-runtime.d.ts +2 -2
  245. package/dist/server/radiant-component-ssr-runtime.js +2 -2
  246. package/dist/server/radiant-component-ssr-runtime.js.map +11 -3
  247. package/dist/server/render-component.d.ts +3 -13
  248. package/dist/server/render-component.js +2 -2
  249. package/dist/server/render-component.js.map +14 -4
  250. package/dist/server/render-controller.d.ts +57 -0
  251. package/dist/server/render-controller.js +3 -0
  252. package/dist/server/render-controller.js.map +23 -0
  253. package/dist/server/slot-projection-html.js +2 -2
  254. package/dist/server/slot-projection-html.js.map +7 -3
  255. package/dist/signals/host-resource.js +2 -2
  256. package/dist/signals/host-resource.js.map +2 -2
  257. package/dist/signals/host-signal.d.ts +4 -2
  258. package/dist/signals/host-signal.js +2 -2
  259. package/dist/signals/host-signal.js.map +7 -3
  260. package/dist/signals/hydration-script.js +2 -2
  261. package/dist/signals/hydration-script.js.map +6 -3
  262. package/dist/tools/escape-script-json.js +2 -2
  263. package/dist/tools/escape-script-json.js.map +4 -3
  264. package/dist/tools/event-emitter.js +2 -2
  265. package/dist/tools/event-emitter.js.map +4 -3
  266. package/dist/tools/index.js +2 -2
  267. package/dist/tools/index.js.map +7 -3
  268. package/dist/tools/render-jsx-template.js +2 -2
  269. package/dist/tools/render-jsx-template.js.map +4 -3
  270. package/dist/tools/stringify-typed.js +2 -2
  271. package/dist/tools/stringify-typed.js.map +4 -3
  272. package/dist/types.js +2 -2
  273. package/dist/types.js.map +2 -2
  274. package/dist/utils/attribute-utils.js +2 -2
  275. package/dist/utils/attribute-utils.js.map +4 -3
  276. package/dist/utils/index.js +2 -2
  277. package/dist/utils/index.js.map +4 -3
  278. package/package.json +22 -5
  279. package/size-budget.json +11 -2
  280. package/dist/chunk-0bswvy25.js +0 -4
  281. package/dist/chunk-0bswvy25.js.map +0 -10
  282. package/dist/chunk-0btkzzyc.js +0 -4
  283. package/dist/chunk-0btkzzyc.js.map +0 -10
  284. package/dist/chunk-0g0j9re6.js +0 -4
  285. package/dist/chunk-0g0j9re6.js.map +0 -10
  286. package/dist/chunk-1x26p09c.js +0 -4
  287. package/dist/chunk-1x26p09c.js.map +0 -10
  288. package/dist/chunk-21a7jask.js +0 -4
  289. package/dist/chunk-21a7jask.js.map +0 -10
  290. package/dist/chunk-25zjh0kg.js +0 -4
  291. package/dist/chunk-25zjh0kg.js.map +0 -10
  292. package/dist/chunk-30x4hggg.js +0 -4
  293. package/dist/chunk-30x4hggg.js.map +0 -10
  294. package/dist/chunk-3xxvmd5c.js +0 -4
  295. package/dist/chunk-3xxvmd5c.js.map +0 -10
  296. package/dist/chunk-3ynk7e1e.js +0 -4
  297. package/dist/chunk-3ynk7e1e.js.map +0 -10
  298. package/dist/chunk-5b1en9vz.js +0 -4
  299. package/dist/chunk-5b1en9vz.js.map +0 -10
  300. package/dist/chunk-5bkat72n.js +0 -4
  301. package/dist/chunk-5bkat72n.js.map +0 -10
  302. package/dist/chunk-5qeaq3tj.js +0 -4
  303. package/dist/chunk-5qeaq3tj.js.map +0 -10
  304. package/dist/chunk-66e6s792.js +0 -4
  305. package/dist/chunk-66e6s792.js.map +0 -10
  306. package/dist/chunk-79jg8q67.js +0 -4
  307. package/dist/chunk-79jg8q67.js.map +0 -10
  308. package/dist/chunk-8d5ddvvf.js +0 -4
  309. package/dist/chunk-8d5ddvvf.js.map +0 -10
  310. package/dist/chunk-8e9fgtbn.js +0 -4
  311. package/dist/chunk-8e9fgtbn.js.map +0 -10
  312. package/dist/chunk-9mqtp3js.js +0 -4
  313. package/dist/chunk-9mqtp3js.js.map +0 -10
  314. package/dist/chunk-9rj2rwes.js +0 -4
  315. package/dist/chunk-9rj2rwes.js.map +0 -10
  316. package/dist/chunk-atms6yrh.js +0 -4
  317. package/dist/chunk-atms6yrh.js.map +0 -10
  318. package/dist/chunk-bk2nbmcd.js +0 -4
  319. package/dist/chunk-bk2nbmcd.js.map +0 -10
  320. package/dist/chunk-bk6qkvfp.js +0 -4
  321. package/dist/chunk-bk6qkvfp.js.map +0 -10
  322. package/dist/chunk-c0qyz98c.js +0 -4
  323. package/dist/chunk-c0qyz98c.js.map +0 -10
  324. package/dist/chunk-c52qhh0j.js +0 -4
  325. package/dist/chunk-c52qhh0j.js.map +0 -10
  326. package/dist/chunk-cnyxrh9r.js +0 -4
  327. package/dist/chunk-cnyxrh9r.js.map +0 -10
  328. package/dist/chunk-cvz9mrxa.js +0 -4
  329. package/dist/chunk-cvz9mrxa.js.map +0 -10
  330. package/dist/chunk-dabagjk6.js +0 -4
  331. package/dist/chunk-dabagjk6.js.map +0 -10
  332. package/dist/chunk-e0r6ca2g.js +0 -4
  333. package/dist/chunk-e0r6ca2g.js.map +0 -10
  334. package/dist/chunk-eevw1j2q.js +0 -4
  335. package/dist/chunk-eevw1j2q.js.map +0 -10
  336. package/dist/chunk-ek664x1c.js +0 -4
  337. package/dist/chunk-ek664x1c.js.map +0 -10
  338. package/dist/chunk-eyw14d6y.js +0 -4
  339. package/dist/chunk-eyw14d6y.js.map +0 -10
  340. package/dist/chunk-fs4j94bk.js +0 -4
  341. package/dist/chunk-fs4j94bk.js.map +0 -10
  342. package/dist/chunk-g2z3mm6b.js +0 -4
  343. package/dist/chunk-g2z3mm6b.js.map +0 -10
  344. package/dist/chunk-g5n3m11h.js +0 -4
  345. package/dist/chunk-g5n3m11h.js.map +0 -10
  346. package/dist/chunk-gdkte2vd.js +0 -4
  347. package/dist/chunk-gdkte2vd.js.map +0 -10
  348. package/dist/chunk-gg74gdpv.js +0 -4
  349. package/dist/chunk-gg74gdpv.js.map +0 -10
  350. package/dist/chunk-gpv1n74a.js +0 -4
  351. package/dist/chunk-gpv1n74a.js.map +0 -10
  352. package/dist/chunk-h9k7crjc.js +0 -4
  353. package/dist/chunk-h9k7crjc.js.map +0 -10
  354. package/dist/chunk-hpzgnxgq.js +0 -4
  355. package/dist/chunk-hpzgnxgq.js.map +0 -10
  356. package/dist/chunk-hrjc8b1y.js +0 -4
  357. package/dist/chunk-hrjc8b1y.js.map +0 -10
  358. package/dist/chunk-hvy4zvcc.js +0 -4
  359. package/dist/chunk-hvy4zvcc.js.map +0 -10
  360. package/dist/chunk-hztr86b4.js +0 -4
  361. package/dist/chunk-hztr86b4.js.map +0 -10
  362. package/dist/chunk-j3v7rca5.js +0 -4
  363. package/dist/chunk-j3v7rca5.js.map +0 -10
  364. package/dist/chunk-j864sv4w.js +0 -4
  365. package/dist/chunk-j864sv4w.js.map +0 -10
  366. package/dist/chunk-jkb2y7c8.js +0 -4
  367. package/dist/chunk-jkb2y7c8.js.map +0 -10
  368. package/dist/chunk-kakpjgzf.js +0 -4
  369. package/dist/chunk-kakpjgzf.js.map +0 -10
  370. package/dist/chunk-kmebacvv.js +0 -4
  371. package/dist/chunk-kmebacvv.js.map +0 -10
  372. package/dist/chunk-knqsm6v3.js +0 -4
  373. package/dist/chunk-knqsm6v3.js.map +0 -10
  374. package/dist/chunk-mp2vtrkg.js +0 -4
  375. package/dist/chunk-mp2vtrkg.js.map +0 -10
  376. package/dist/chunk-mpsj3cjs.js +0 -4
  377. package/dist/chunk-mpsj3cjs.js.map +0 -10
  378. package/dist/chunk-n4p2542b.js +0 -4
  379. package/dist/chunk-n4p2542b.js.map +0 -10
  380. package/dist/chunk-nctznxyz.js +0 -4
  381. package/dist/chunk-nctznxyz.js.map +0 -10
  382. package/dist/chunk-ndw3hc3v.js +0 -4
  383. package/dist/chunk-ndw3hc3v.js.map +0 -10
  384. package/dist/chunk-nnnb6pac.js +0 -4
  385. package/dist/chunk-nnnb6pac.js.map +0 -10
  386. package/dist/chunk-nssj2x13.js +0 -4
  387. package/dist/chunk-nssj2x13.js.map +0 -10
  388. package/dist/chunk-nvr37vma.js +0 -4
  389. package/dist/chunk-nvr37vma.js.map +0 -10
  390. package/dist/chunk-p8k4g99a.js +0 -4
  391. package/dist/chunk-p8k4g99a.js.map +0 -10
  392. package/dist/chunk-pkszgjqf.js +0 -4
  393. package/dist/chunk-pkszgjqf.js.map +0 -10
  394. package/dist/chunk-q9z6tnzw.js +0 -4
  395. package/dist/chunk-q9z6tnzw.js.map +0 -10
  396. package/dist/chunk-qdz5sncz.js +0 -4
  397. package/dist/chunk-qdz5sncz.js.map +0 -10
  398. package/dist/chunk-qe0eww1n.js +0 -4
  399. package/dist/chunk-qe0eww1n.js.map +0 -10
  400. package/dist/chunk-r33zvvda.js +0 -4
  401. package/dist/chunk-r33zvvda.js.map +0 -10
  402. package/dist/chunk-rkh1vkb9.js +0 -4
  403. package/dist/chunk-rkh1vkb9.js.map +0 -10
  404. package/dist/chunk-rrg759ht.js +0 -4
  405. package/dist/chunk-rrg759ht.js.map +0 -10
  406. package/dist/chunk-s09s5ayx.js +0 -4
  407. package/dist/chunk-s09s5ayx.js.map +0 -10
  408. package/dist/chunk-s5p5z3z4.js +0 -4
  409. package/dist/chunk-s5p5z3z4.js.map +0 -10
  410. package/dist/chunk-sf4a2gy5.js +0 -4
  411. package/dist/chunk-sf4a2gy5.js.map +0 -10
  412. package/dist/chunk-ssnnxzrj.js +0 -4
  413. package/dist/chunk-ssnnxzrj.js.map +0 -10
  414. package/dist/chunk-t8xtvgyg.js +0 -4
  415. package/dist/chunk-t8xtvgyg.js.map +0 -10
  416. package/dist/chunk-v3ta7hnv.js +0 -4
  417. package/dist/chunk-v3ta7hnv.js.map +0 -10
  418. package/dist/chunk-v92hp9g0.js +0 -4
  419. package/dist/chunk-v92hp9g0.js.map +0 -10
  420. package/dist/chunk-vgtggzb6.js +0 -4
  421. package/dist/chunk-vgtggzb6.js.map +0 -9
  422. package/dist/chunk-vk48hgm4.js +0 -4
  423. package/dist/chunk-vk48hgm4.js.map +0 -10
  424. package/dist/chunk-w8s5fnsq.js +0 -4
  425. package/dist/chunk-w8s5fnsq.js.map +0 -10
  426. package/dist/chunk-wd23rn4q.js +0 -4
  427. package/dist/chunk-wd23rn4q.js.map +0 -10
  428. package/dist/chunk-wds4href.js +0 -4
  429. package/dist/chunk-wds4href.js.map +0 -10
  430. package/dist/chunk-wvd1ffe4.js +0 -4
  431. package/dist/chunk-wvd1ffe4.js.map +0 -10
  432. package/dist/chunk-wwbjz9k4.js +0 -4
  433. package/dist/chunk-wwbjz9k4.js.map +0 -10
  434. package/dist/chunk-x2k0ngpz.js +0 -4
  435. package/dist/chunk-x2k0ngpz.js.map +0 -10
  436. package/dist/chunk-x457d0ap.js +0 -4
  437. package/dist/chunk-x457d0ap.js.map +0 -10
  438. package/dist/chunk-xbhtzkre.js +0 -4
  439. package/dist/chunk-xbhtzkre.js.map +0 -10
  440. package/dist/chunk-y139ycfm.js +0 -4
  441. package/dist/chunk-y139ycfm.js.map +0 -10
  442. package/dist/chunk-z9kxfckm.js +0 -4
  443. package/dist/chunk-z9kxfckm.js.map +0 -10
  444. package/dist/chunk-zx5txex8.js +0 -4
  445. package/dist/chunk-zx5txex8.js.map +0 -10
  446. package/dist/chunk-zygdebw8.js +0 -4
  447. package/dist/chunk-zygdebw8.js.map +0 -10
  448. package/dist/core/radiant-component.d.ts +0 -113
  449. package/dist/core/radiant-component.js +0 -3
  450. package/dist/core/radiant-component.js.map +0 -9
@@ -1,10 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../src/signals/host-signal.ts"],
4
- "sourcesContent": [
5
- "import { createMarkupNodeLike, type JsxRenderable } from '@ecopages/jsx';\nimport { state, type WritableSignal } from '@ecopages/signals';\nimport type { SsrSerializableHydrationBinding } from '../core/ssr-hydration-binding';\nimport type { RadiantElement } from '../core/radiant-element';\nimport type { AttributeTypeConstant } from '../utils/attribute-utils';\nimport { findHydrationScript, parseHydrationPayload } from '../core/hydration-codec';\nimport { createSignalHydrationScriptTag, escapeSignalHydrationJson } from './hydration-script';\n\ntype HostSignalOptions<Value> = {\n\thost: RadiantElement;\n\thydrate?: AttributeTypeConstant;\n\thydrationKey?: string;\n\tinitialValue?: Value;\n\tproperty: string;\n\tsource?: WritableSignal<Value>;\n};\n\nexport function isWritableSignalLike<Value>(value: unknown): value is WritableSignal<Value> {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\ttypeof (value as WritableSignal<Value>).get === 'function' &&\n\t\ttypeof (value as WritableSignal<Value>).set === 'function' &&\n\t\ttypeof (value as WritableSignal<Value>).subscribe === 'function' &&\n\t\ttypeof (value as WritableSignal<Value>).update === 'function'\n\t);\n}\n\n/**\n * Host-owned writable signal that bridges signal updates back into Radiant's\n * update callback channel and optional SSR hydration pipeline.\n */\nexport class HostSignal<Value> implements WritableSignal<Value>, SsrSerializableHydrationBinding {\n\tprivate readonly host: RadiantElement;\n\tprivate readonly hydrate?: AttributeTypeConstant;\n\tprivate readonly hydrationKey?: string;\n\tprivate readonly property: string;\n\tprivate readonly source: WritableSignal<Value>;\n\tprivate currentValue: Value;\n\tprivate hasAppliedHostHydration = false;\n\tprivate sourceUnsubscribe?: () => void;\n\n\tconstructor(options: HostSignalOptions<Value>) {\n\t\tthis.host = options.host;\n\t\tthis.hydrate = options.hydrate;\n\t\tthis.hydrationKey = options.hydrationKey;\n\t\tthis.property = options.property;\n\t\tthis.source = options.source ?? state(this.resolveInitialValue(options.initialValue as Value));\n\t\tthis.currentValue = this.source.get();\n\t}\n\n\tpublic get(): Value {\n\t\treturn this.source.get();\n\t}\n\n\tpublic set(nextValue: Value): void {\n\t\tthis.source.set(nextValue);\n\t}\n\n\tpublic subscribe(notify: (value: Value) => void): () => void {\n\t\treturn this.source.subscribe(notify);\n\t}\n\n\tpublic update(updater: (value: Value) => Value): void {\n\t\tthis.set(updater(this.get()));\n\t}\n\n\tpublic connectToSource(): void {\n\t\tif (this.sourceUnsubscribe) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst nextValue = this.source.get();\n\n\t\tif (!Object.is(this.currentValue, nextValue)) {\n\t\t\tconst previousValue = this.currentValue;\n\t\t\tthis.currentValue = nextValue;\n\t\t\tthis.host.notifyUpdate(this.property, previousValue, nextValue);\n\t\t}\n\n\t\tthis.sourceUnsubscribe = this.source.subscribe((value) => {\n\t\t\tthis.handleSourceChange(value);\n\t\t});\n\t}\n\n\tpublic disconnectFromSource(): void {\n\t\tthis.sourceUnsubscribe?.();\n\t\tthis.sourceUnsubscribe = undefined;\n\t}\n\n\tpublic hydrateFromHost(): void {\n\t\tif (!this.hydrate || this.hasAppliedHostHydration) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.hasAppliedHostHydration = true;\n\n\t\tconst previousValue = this.source.get();\n\t\tconst hydratedValue = this.resolveInitialValue(previousValue);\n\n\t\tif (!Object.is(previousValue, hydratedValue)) {\n\t\t\tthis.source.set(hydratedValue);\n\t\t\tthis.currentValue = this.source.get();\n\t\t\tthis.host.notifyUpdate(this.property, previousValue, this.currentValue);\n\t\t}\n\t}\n\n\tpublic renderHydrationScript(): JsxRenderable | undefined {\n\t\tconst outerHTML = this.renderHydrationScriptTag();\n\n\t\tif (!outerHTML) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\treturn createMarkupNodeLike(outerHTML);\n\t}\n\n\tpublic renderHydrationScriptTag(): string | undefined {\n\t\tconst serializedValue = this.serializeHydrationValue();\n\n\t\tif (!serializedValue) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\treturn createSignalHydrationScriptTag({\n\t\t\thydrationKey: this.hydrationKey,\n\t\t\tserializedValue,\n\t\t});\n\t}\n\n\tprivate findHydrationScriptElement(): Element | null {\n\t\treturn findHydrationScript(this.host, 'signal', this.hydrationKey);\n\t}\n\n\tprivate isObject(value: unknown): value is Record<string, unknown> {\n\t\treturn typeof value === 'object' && !Array.isArray(value) && value !== null;\n\t}\n\n\tprivate resolveInitialValue(initialValue: Value): Value {\n\t\tif (!this.hydrate) {\n\t\t\treturn initialValue;\n\t\t}\n\n\t\tconst hydrationScriptElement = this.findHydrationScriptElement();\n\n\t\tif (!hydrationScriptElement) {\n\t\t\treturn initialValue;\n\t\t}\n\n\t\tconst parsedHydrationValue = parseHydrationPayload(hydrationScriptElement, initialValue);\n\n\t\tif (this.hydrate === Object && this.isObject(parsedHydrationValue) && this.isObject(initialValue)) {\n\t\t\treturn {\n\t\t\t\t...initialValue,\n\t\t\t\t...parsedHydrationValue,\n\t\t\t} as Value;\n\t\t}\n\n\t\treturn parsedHydrationValue;\n\t}\n\n\tprivate serializeHydrationValue(): string | undefined {\n\t\tif (!this.hydrate) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst serializedValue = JSON.stringify(this.get());\n\n\t\tif (typeof serializedValue !== 'string') {\n\t\t\treturn undefined;\n\t\t}\n\n\t\treturn escapeSignalHydrationJson(serializedValue);\n\t}\n\n\tprivate handleSourceChange(nextValue: Value): void {\n\t\tconst previousValue = this.currentValue;\n\t\tthis.currentValue = nextValue;\n\n\t\tif (!Object.is(previousValue, nextValue)) {\n\t\t\tthis.host.notifyUpdate(this.property, previousValue, nextValue);\n\t\t}\n\t}\n}\n\nexport function createHostSignal<Value>(options: HostSignalOptions<Value>): HostSignal<Value> {\n\treturn new HostSignal(options);\n}\n"
6
- ],
7
- "mappings": "wGAAA,yBAAS,sBACT,gBAAS,0BAgBF,SAAS,CAA2B,CAAC,EAAgD,CAC3F,OACC,OAAO,IAAU,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- "debugId": "FF7C4716227882D764756E2164756E21",
9
- "names": []
10
- }
@@ -1,4 +0,0 @@
1
- function r(e){return e.replace(/&/g,"\\u0026").replace(/</g,"\\u003c").replace(/>/g,"\\u003e").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}
2
- export{r as wb};
3
-
4
- //# debugId=0C6A194314FA70CB64756E2164756E21
@@ -1,10 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../src/tools/escape-script-json.ts"],
4
- "sourcesContent": [
5
- "/**\n * Escapes serialized JSON so it remains safe when embedded inside an HTML\n * `<script>` tag.\n */\nexport function escapeScriptJson(value: string): string {\n\treturn value\n\t\t.replace(/&/g, '\\\\u0026')\n\t\t.replace(/</g, '\\\\u003c')\n\t\t.replace(/>/g, '\\\\u003e')\n\t\t.replace(/\\u2028/g, '\\\\u2028')\n\t\t.replace(/\\u2029/g, '\\\\u2029');\n}\n"
6
- ],
7
- "mappings": "AAIO,SAAS,CAAgB,CAAC,EAAuB,CACvD,OAAO,EACL,QAAQ,KAAM,SAAS,EACvB,QAAQ,KAAM,SAAS,EACvB,QAAQ,KAAM,SAAS,EACvB,QAAQ,UAAW,SAAS,EAC5B,QAAQ,UAAW,SAAS",
8
- "debugId": "0C6A194314FA70CB64756E2164756E21",
9
- "names": []
10
- }
@@ -1,4 +0,0 @@
1
- import{ka as k}from"./chunk-h9k7crjc.js";import{la as q}from"./chunk-8d5ddvvf.js";import{Pa as j}from"./chunk-q9z6tnzw.js";function H(f){return function(v,w,z){return j(q(f),k(f),v,w,z)}}
2
- export{H as ja};
3
-
4
- //# debugId=EE8FCDE8C69DD19764756E2164756E21
@@ -1,10 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../src/decorators/debounce.ts"],
4
- "sourcesContent": [
5
- "import type { StandardOrLegacyMethodDecoratorArgs } from '../types';\nimport { debounce as legacyDebounce } from './legacy/debounce';\nimport { debounce as standardDebounce } from './standard/debounce';\nimport { methodDecoratorBridge } from './bridge';\n\n/**\n * A decorator to debounce a method.\n * @param timeout The debounce timeout in milliseconds.\n */\nexport function debounce(timeout: number) {\n\treturn function (\n\t\tprotoOrTarget: StandardOrLegacyMethodDecoratorArgs['protoOrTarget'],\n\t\tnameOrContext: StandardOrLegacyMethodDecoratorArgs['nameOrContext'],\n\t\tdescriptor?: StandardOrLegacyMethodDecoratorArgs['descriptor'],\n\t): any {\n\t\treturn methodDecoratorBridge(\n\t\t\tstandardDebounce(timeout),\n\t\t\tlegacyDebounce(timeout),\n\t\t\tprotoOrTarget,\n\t\t\tnameOrContext,\n\t\t\tdescriptor,\n\t\t);\n\t};\n}\n"
6
- ],
7
- "mappings": "uIASO,GAAS,LAAQ,CAAC,EAAiB,CACzC,OAAO,QAAS,CACf,EACA,EACA,EACM,CACN,OAAO,EACN,EAAiB,CAAO,EACxB,EAAe,CAAO,EACtB,EACA,EACA,CACD",
8
- "debugId": "EE8FCDE8C69DD19764756E2164756E21",
9
- "names": []
10
- }
@@ -1,4 +0,0 @@
1
- import{L as D,M as G,N as E,O as H}from"./chunk-ek664x1c.js";import{ya as F}from"./chunk-eyw14d6y.js";function L(j,f,w,y={}){return I(j,()=>D(j,f,w,y))}function M(j,f,w,y){return I(j,()=>E(f,w,y))}function N(j,f,w,y={}){if(D(j,f,w,y))return!0;return G(j,f,w,y),!1}function O(j,f,w,y={}){if(E(f,w,y.select))return!0;return H(j,f,w,y),!1}function I(j,f){return F(j,f),f()}
2
- export{L as H,M as I,N as J,O as K};
3
-
4
- //# debugId=CC91456931A8600264756E2164756E21
@@ -1,10 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../src/context/context-consumer-bootstrap.ts"],
4
- "sourcesContent": [
5
- "import type { RadiantElement } from '../core/radiant-element';\nimport { registerSsrPreparationCallback } from '../core/ssr-preparation';\nimport {\n\tinitializeConsumedContext,\n\tinitializeContextSelection,\n\trequestConsumedContext,\n\trequestContextSelection,\n} from './context-consumer-runtime';\nimport type { ContextType, UnknownContext } from './types';\n\ntype ConsumedContextAssignment = (provider: unknown) => void;\n\n/**\n * Resolves a consumed context immediately and registers the same resolution to\n * run again during the later SSR preparation phase.\n *\n * This keeps constructor-time state and pre-serialization state aligned after\n * instance fields, props, or authored host content change during SSR setup.\n */\nexport function bootstrapSsrConsumedContext(\n\thost: RadiantElement,\n\tcontext: UnknownContext,\n\tassign: ConsumedContextAssignment,\n\toptions: { emitMounted?: boolean } = {},\n): boolean {\n\treturn registerAndResolveConsumerBootstrap(host, () => initializeConsumedContext(host, context, assign, options));\n}\n\n/**\n * Resolves a selected context value immediately and registers the same\n * selection for the later SSR preparation phase.\n *\n * This lets nested SSR renders recompute selector-backed state after the host\n * has finished construction and any server-side configuration hooks have run.\n */\nexport function bootstrapSsrContextSelection<TContext extends UnknownContext>(\n\thost: object,\n\tcontext: TContext,\n\tcallback: (value: unknown) => void,\n\tselect?: (context: ContextType<TContext>) => unknown,\n): boolean {\n\treturn registerAndResolveConsumerBootstrap(host, () => initializeContextSelection(context, callback, select));\n}\n\n/**\n * Resolves a consumed context from SSR when available, otherwise requests it\n * through the DOM event channel for the current client-side lifecycle pass.\n *\n * @returns `true` when the value was satisfied synchronously from SSR state.\n */\nexport function connectConsumedContext(\n\thost: RadiantElement,\n\tcontext: UnknownContext,\n\tassign: ConsumedContextAssignment,\n\toptions: { emitMounted?: boolean } = {},\n): boolean {\n\tif (initializeConsumedContext(host, context, assign, options)) {\n\t\treturn true;\n\t}\n\n\trequestConsumedContext(host, context, assign, options);\n\treturn false;\n}\n\n/**\n * Resolves a selected context value from SSR when available, otherwise requests\n * it through the DOM event channel for the current client-side lifecycle pass.\n *\n * @returns `true` when the value was satisfied synchronously from SSR state.\n */\nexport function connectContextSelection<TContext extends UnknownContext>(\n\thost: RadiantElement,\n\tcontext: TContext,\n\tcallback: (value: unknown) => void,\n\toptions: {\n\t\tselect?: (context: ContextType<TContext>) => unknown;\n\t\tsubscribe?: boolean;\n\t} = {},\n): boolean {\n\tif (initializeContextSelection(context, callback, options.select)) {\n\t\treturn true;\n\t}\n\n\trequestContextSelection(host, context, callback, options);\n\treturn false;\n}\n\nfunction registerAndResolveConsumerBootstrap<TResult>(host: object, resolve: () => TResult): TResult {\n\tregisterSsrPreparationCallback(host, resolve);\n\treturn resolve();\n}\n"
6
- ],
7
- "mappings": "4GAmBO,GAAS,CAA2B,CAC1C,EACA,EACA,EACA,EAAqC,CAAC,EAC5B,CACV,OAAO,EAAoC,EAAM,IAAM,EAA0B,EAAM,EAAS,EAAQ,CAAO,CAAC,EAU1G,SAAS,CAA6D,CAC5E,EACA,EACA,EACA,EACU,CACV,OAAO,EAAoC,EAAM,IAAM,EAA2B,EAAS,EAAU,CAAM,CAAC,EAStG,SAAS,CAAsB,CACrC,EACA,EACA,EACA,EAAqC,CAAC,EAC5B,CACV,GAAI,EAA0B,EAAM,EAAS,EAAQ,CAAO,EAC3D,MAAO,GAIR,OADA,EAAuB,EAAM,EAAS,EAAQ,CAAO,EAC9C,GASD,SAAS,CAAwD,CACvE,EACA,EACA,EACA,EAGI,CAAC,EACK,CACV,GAAI,EAA2B,EAAS,EAAU,EAAQ,MAAM,EAC/D,MAAO,GAIR,OADA,EAAwB,EAAM,EAAS,EAAU,CAAO,EACjD,GAGR,SAAS,CAA4C,CAAC,EAAc,EAAiC,CAEpG,OADA,EAA+B,EAAM,CAAO,EACrC,EAAQ",
8
- "debugId": "CC91456931A8600264756E2164756E21",
9
- "names": []
10
- }
@@ -1,4 +0,0 @@
1
- import{ba as E}from"./chunk-x457d0ap.js";import{ca as F}from"./chunk-vk48hgm4.js";function L(q,j){if(typeof j<"u"){if(typeof j==="object")return F()(q,j);return E()(q,j)}let G=q??{};return function(H,A){if(typeof A==="object")return F(G)(H,A);return E(G)(H,A)}}
2
- export{L as aa};
3
-
4
- //# debugId=B0D7E14A4522220E64756E2164756E21
@@ -1,10 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../src/decorators/signal.ts"],
4
- "sourcesContent": [
5
- "import type {\n\tLegacyFieldDecoratorArgs,\n\tStandardFieldDecoratorArgs,\n\tStandardOrLegacyFieldDecoratorArgs,\n} from '../types';\nimport { signal as legacySignal, type SignalDecoratorOptions } from './legacy/signal';\nimport { signal as standardSignal } from './standard/signal';\n\nexport type { SignalDecoratorOptions } from './standard/signal';\n\n/**\n * Declares a host-aware writable signal field.\n *\n * The decorated member becomes a real `WritableSignal` instance that JSX can\n * consume directly in child or attribute positions. By default the decorator\n * creates a host-owned signal, but it can also connect an existing shared\n * signal through the `source` option or a signal-valued field initializer.\n *\n * Connected signals still flow through Radiant's update callback channel so\n * `@onUpdated(...)` and `this.$.name` bindings continue to work. On\n * `RadiantComponent`, any signal or store reads performed during `render()`\n * now participate in rerender invalidation directly, which makes module-level\n * shared stores a natural fit without prop-bridging them through a second\n * reactive layer.\n *\n * When `hydrate` is provided, SSR host output appends a keyed JSON script so\n * the client can restore the signal's initial value during hydration.\n */\nexport function signal(\n\tprotoOrTarget: StandardOrLegacyFieldDecoratorArgs['protoOrTarget'],\n\tnameOrContext: StandardOrLegacyFieldDecoratorArgs['nameOrContext'],\n): any;\nexport function signal(options?: SignalDecoratorOptions): any;\nexport function signal(\n\tprotoOrOptions?: StandardOrLegacyFieldDecoratorArgs['protoOrTarget'] | SignalDecoratorOptions,\n\tnameOrContext?: StandardOrLegacyFieldDecoratorArgs['nameOrContext'],\n): any {\n\tif (typeof nameOrContext !== 'undefined') {\n\t\tif (typeof nameOrContext === 'object') {\n\t\t\treturn standardSignal()(protoOrOptions as StandardFieldDecoratorArgs['protoOrTarget'], nameOrContext);\n\t\t}\n\n\t\treturn legacySignal()(protoOrOptions as LegacyFieldDecoratorArgs['protoOrTarget'], nameOrContext);\n\t}\n\n\tconst options = (protoOrOptions ?? {}) as SignalDecoratorOptions;\n\n\treturn function (\n\t\tprotoOrTarget: StandardOrLegacyFieldDecoratorArgs['protoOrTarget'],\n\t\tcontextOrName: StandardOrLegacyFieldDecoratorArgs['nameOrContext'],\n\t): any {\n\t\tif (typeof contextOrName === 'object') {\n\t\t\treturn standardSignal(options)(\n\t\t\t\tprotoOrTarget as StandardFieldDecoratorArgs['protoOrTarget'],\n\t\t\t\tcontextOrName as StandardFieldDecoratorArgs['nameOrContext'],\n\t\t\t);\n\t\t}\n\n\t\treturn legacySignal(options)(\n\t\t\tprotoOrTarget as LegacyFieldDecoratorArgs['protoOrTarget'],\n\t\t\tcontextOrName as LegacyFieldDecoratorArgs['nameOrContext'],\n\t\t);\n\t};\n}\n"
6
- ],
7
- "mappings": "wFAiCO,GAAS,CAAM,CACrB,EACA,EACM,CACN,GAAI,OAAO,EAAkB,IAAa,CACzC,GAAI,OAAO,IAAkB,SAC5B,OAAO,EAAe,EAAE,EAA+D,CAAa,EAGrG,OAAO,EAAa,EAAE,EAA6D,CAAa,EAGjG,IAAM,EAAW,GAAkB,CAAC,EAEpC,OAAO,QAAS,CACf,EACA,EACM,CACN,GAAI,OAAO,IAAkB,SAC5B,OAAO,EAAe,CAAO,EAC5B,EACA,CACD,EAGD,OAAO,EAAa,CAAO,EAC1B,EACA,CACD",
8
- "debugId": "B0D7E14A4522220E64756E2164756E21",
9
- "names": []
10
- }
@@ -1,4 +0,0 @@
1
- function d(t,a,e,r){if(typeof r==="object")return t(e,r);return a(e,r)}function c(t,a,e,r,o){if(typeof r==="object")return t(e,r);return a(e,r,o)}
2
- export{d as Oa,c as Pa};
3
-
4
- //# debugId=D2CC43EB923EB13264756E2164756E21
@@ -1,10 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../src/decorators/bridge.ts"],
4
- "sourcesContent": [
5
- "import type {\n\tLegacyFieldDecoratorArgs,\n\tLegacyMethodDecoratorArgs,\n\tStandardMethodDecoratorArgs,\n\tStandardOrLegacyFieldDecoratorArgs,\n\tStandardOrLegacyMethodDecoratorArgs,\n} from '../types';\n\ntype StandardFieldFn = (target: undefined, context: ClassFieldDecoratorContext<any, any>) => any;\n\ntype LegacyFieldFn = (\n\tproto: LegacyFieldDecoratorArgs['protoOrTarget'],\n\tname: LegacyFieldDecoratorArgs['nameOrContext'],\n) => any;\n\ntype StandardMethodFn = (\n\ttarget: StandardMethodDecoratorArgs['protoOrTarget'],\n\tcontext: StandardMethodDecoratorArgs['nameOrContext'],\n) => any;\n\ntype LegacyMethodFn = (\n\tproto: LegacyMethodDecoratorArgs['protoOrTarget'],\n\tname: LegacyMethodDecoratorArgs['nameOrContext'],\n\tdescriptor: LegacyMethodDecoratorArgs['descriptor'],\n) => any;\n\nexport function fieldDecoratorBridge(\n\tstandard: StandardFieldFn,\n\tlegacy: LegacyFieldFn,\n\tprotoOrTarget: StandardOrLegacyFieldDecoratorArgs['protoOrTarget'],\n\tnameOrContext: StandardOrLegacyFieldDecoratorArgs['nameOrContext'],\n): any {\n\tif (typeof nameOrContext === 'object') {\n\t\treturn standard(protoOrTarget as undefined, nameOrContext as ClassFieldDecoratorContext<any, any>);\n\t}\n\treturn legacy(\n\t\tprotoOrTarget as LegacyFieldDecoratorArgs['protoOrTarget'],\n\t\tnameOrContext as LegacyFieldDecoratorArgs['nameOrContext'],\n\t);\n}\n\nexport function methodDecoratorBridge(\n\tstandard: StandardMethodFn,\n\tlegacy: LegacyMethodFn,\n\tprotoOrTarget: StandardOrLegacyMethodDecoratorArgs['protoOrTarget'],\n\tnameOrContext: StandardOrLegacyMethodDecoratorArgs['nameOrContext'],\n\tdescriptor?: StandardOrLegacyMethodDecoratorArgs['descriptor'],\n): any {\n\tif (typeof nameOrContext === 'object') {\n\t\treturn standard(\n\t\t\tprotoOrTarget as StandardMethodDecoratorArgs['protoOrTarget'],\n\t\t\tnameOrContext as StandardMethodDecoratorArgs['nameOrContext'],\n\t\t);\n\t}\n\treturn legacy(\n\t\tprotoOrTarget as LegacyMethodDecoratorArgs['protoOrTarget'],\n\t\tnameOrContext as LegacyMethodDecoratorArgs['nameOrContext'],\n\t\tdescriptor as LegacyMethodDecoratorArgs['descriptor'],\n\t);\n}\n"
6
- ],
7
- "mappings": "AA0BO,SAAS,CAAoB,CACnC,EACA,EACA,EACA,EACM,CACN,GAAI,OAAO,IAAkB,SAC5B,OAAO,EAAS,EAA4B,CAAqD,EAElG,OAAO,EACN,EACA,CACD,EAGM,SAAS,CAAqB,CACpC,EACA,EACA,EACA,EACA,EACM,CACN,GAAI,OAAO,IAAkB,SAC5B,OAAO,EACN,EACA,CACD,EAED,OAAO,EACN,EACA,EACA,CACD",
8
- "debugId": "D2CC43EB923EB13264756E2164756E21",
9
- "names": []
10
- }
@@ -1,4 +0,0 @@
1
- import{Ma as d}from"./chunk-cnyxrh9r.js";import{xb as h}from"./chunk-rrg759ht.js";function A(j){return(k,q)=>{d(k,(b)=>{let u=h(b,j);b.registerConnectedCallback(()=>{Object.defineProperty(b,q,{get(){return u},enumerable:!0,configurable:!0})})})}}
2
- export{A as ea};
3
-
4
- //# debugId=E29727BF3027842A64756E2164756E21
@@ -1,10 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../src/decorators/legacy/event.ts"],
4
- "sourcesContent": [
5
- "import type { RadiantElement } from '../../core/radiant-element';\nimport { createEvent } from '../../helpers/create-event';\nimport type { EventEmitterConfig } from '../../tools/event-emitter';\nimport { registerLegacyInstanceInitializer } from './instance-initializers';\n\n/**\n * Decorator that attaches an EventEmitter to the class field property.\n * The EventEmitter can be used to dispatch custom events from the target element.\n * @param eventConfig Configuration for the event emitter.\n * @see {@link EventEmitter} for more details about how the EventEmitter works.\n */\nexport function event(eventConfig: EventEmitterConfig) {\n\treturn (proto: RadiantElement, propertyKey: string) => {\n\t\tregisterLegacyInstanceInitializer(proto, (element) => {\n\t\t\tconst emitter = createEvent(element, eventConfig);\n\n\t\t\telement.registerConnectedCallback(() => {\n\t\t\t\tObject.defineProperty(element, propertyKey, {\n\t\t\t\t\tget() {\n\t\t\t\t\t\treturn emitter;\n\t\t\t\t\t},\n\t\t\t\t\tenumerable: true,\n\t\t\t\t\tconfigurable: true,\n\t\t\t\t});\n\t\t\t});\n\t\t});\n\t};\n}\n"
6
- ],
7
- "mappings": "wFAWO,GAAS,CAAK,CAAC,EAAiC,CACtD,MAAO,CAAC,EAAuB,IAAwB,CACtD,EAAkC,EAAO,CAAC,IAAY,CACrD,IAAM,EAAU,EAAY,EAAS,CAAW,EAEhD,EAAQ,0BAA0B,IAAM,CACvC,OAAO,eAAe,EAAS,EAAa,CAC3C,GAAG,EAAG,CACL,OAAO,GAER,WAAY,GACZ,aAAc,EACf,CAAC,EACD,EACD",
8
- "debugId": "E29727BF3027842A64756E2164756E21",
9
- "names": []
10
- }
@@ -1,4 +0,0 @@
1
- import{E}from"./chunk-x2k0ngpz.js";import{F as A}from"./chunk-kakpjgzf.js";import{Pa as z}from"./chunk-q9z6tnzw.js";function L(j){return function(F,G,H){return z(E(j),A(j),F,G,H)}}
2
- export{L as A};
3
-
4
- //# debugId=E63D15B4F122B2CD64756E2164756E21
@@ -1,10 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../src/context/decorators/on-context-update.ts"],
4
- "sourcesContent": [
5
- "import type { StandardOrLegacyMethodDecoratorArgs } from '../../types';\nimport type { RadiantElement } from '../../core/radiant-element';\nimport type { Context, ContextType, UnknownContext } from '../types';\nimport { contextSelector as legacyContextSelectorMethod } from './legacy/context-selector';\nimport { contextSelector as standardContextSelectorMethod } from './standard/context-selector';\nimport { methodDecoratorBridge } from '../../decorators/bridge';\n\ntype ContextUpdateMethod<Selected> = (value: Selected) => unknown;\n\ntype OnContextUpdateDecorator<Selected> = {\n\t<Host extends RadiantElement, TMethod extends ContextUpdateMethod<Selected>>(\n\t\tprotoOrTarget: TMethod,\n\t\tnameOrContext: ClassMethodDecoratorContext<Host, TMethod>,\n\t): void;\n\t(\n\t\tprotoOrTarget: RadiantElement,\n\t\tnameOrContext: string,\n\t\tdescriptor: TypedPropertyDescriptor<ContextUpdateMethod<Selected>>,\n\t): TypedPropertyDescriptor<ContextUpdateMethod<Selected>> | void;\n};\n\nexport type OnContextUpdateOptions<T extends UnknownContext, Selected = ContextType<T>> = {\n\t/** Context token to resolve from ancestor providers. */\n\tcontext: T;\n\t/** Optional projection that narrows the resolved context before delivery. */\n\tselect?: (context: ContextType<T>) => Selected;\n\t/** Whether client-side event-channel subscriptions should stay active after the first value. */\n\tsubscribe?: boolean;\n\t/** Whether RadiantComponent hosts should schedule `requestUpdate()` after delivery. */\n\trequestUpdate?: boolean;\n};\n\n/**\n * Subscribes a method to the current value, or a selected slice, of a context.\n *\n * The decorated method is invoked during SSR when an ambient provider is\n * available, and on the client it keeps receiving updates according to the\n * `subscribe` option.\n *\n * On `RadiantComponent` hosts, each delivery also schedules `requestUpdate()`\n * unless `requestUpdate: false` is set explicitly.\n *\n * @param options Context subscription configuration.\n */\nexport function onContextUpdate<T extends Context<unknown, unknown>, Selected = ContextType<T>>(\n\toptions: OnContextUpdateOptions<T, Selected>,\n): OnContextUpdateDecorator<Selected> {\n\treturn function (\n\t\tprotoOrTarget: StandardOrLegacyMethodDecoratorArgs['protoOrTarget'],\n\t\tnameOrContext: StandardOrLegacyMethodDecoratorArgs['nameOrContext'],\n\t\tdescriptor?: StandardOrLegacyMethodDecoratorArgs['descriptor'],\n\t): TypedPropertyDescriptor<ContextUpdateMethod<Selected>> | void {\n\t\treturn methodDecoratorBridge(\n\t\t\tstandardContextSelectorMethod(options),\n\t\t\tlegacyContextSelectorMethod(options),\n\t\t\tprotoOrTarget,\n\t\t\tnameOrContext,\n\t\t\tdescriptor,\n\t\t) as TypedPropertyDescriptor<ContextUpdateMethod<Selected>> | void;\n\t} as OnContextUpdateDecorator<Selected>;\n}\n"
6
- ],
7
- "mappings": "gIA4CO,GAAS,LAA+E,CAC9F,EACqC,CACrC,OAAO,QAAS,CACf,EACA,EACA,EACgE,CAChE,OAAO,EACN,EAA8B,CAAO,EACrC,EAA4B,CAAO,EACnC,EACA,EACA,CACD",
8
- "debugId": "E63D15B4F122B2CD64756E2164756E21",
9
- "names": []
10
- }
@@ -1,4 +0,0 @@
1
- import{R as A}from"./chunk-21a7jask.js";import{Ma as w}from"./chunk-cnyxrh9r.js";function H({context:j,initialValue:B,hydrate:C,serialize:D}){return(E,f)=>{let k=(b)=>{if(b[f])return;let q=new A(b,{context:j,hydrationKey:f,initialValue:B,hydrate:C,serialize:D});b[f]=q,b.registerContextProvider(f,q),b.connectedContextCallback(j)};w(E,(b)=>{k(b),b.registerConnectedCallback(()=>{k(b)})})}}
2
- export{H as w};
3
-
4
- //# debugId=FA5A6E529695847664756E2164756E21
@@ -1,10 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../src/context/decorators/legacy/provide-context.ts"],
4
- "sourcesContent": [
5
- "import { ContextProvider } from '../../../context/context-provider';\nimport type { UnknownContext } from '../../../context/types';\nimport type { RadiantElement } from '../../../core/radiant-element';\nimport { registerLegacyInstanceInitializer } from '../../../decorators/legacy/instance-initializers';\nimport type { ProvideContextOptions } from '../provide-context';\n\nexport function provideContext<T extends UnknownContext>({\n\tcontext,\n\tinitialValue,\n\thydrate,\n\tserialize,\n}: ProvideContextOptions<T>) {\n\treturn (proto: RadiantElement, propertyKey: string) => {\n\t\tconst initializeProvider = (element: RadiantElement) => {\n\t\t\tif ((element as any)[propertyKey]) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst provider = new ContextProvider<T>(element, {\n\t\t\t\tcontext,\n\t\t\t\thydrationKey: propertyKey,\n\t\t\t\tinitialValue,\n\t\t\t\thydrate,\n\t\t\t\tserialize,\n\t\t\t});\n\t\t\t(element as any)[propertyKey] = provider;\n\t\t\telement.registerContextProvider(propertyKey, provider);\n\t\t\telement.connectedContextCallback(context);\n\t\t};\n\n\t\tregisterLegacyInstanceInitializer(proto, (element) => {\n\t\t\tinitializeProvider(element);\n\t\t\telement.registerConnectedCallback(() => {\n\t\t\t\tinitializeProvider(element);\n\t\t\t});\n\t\t});\n\t};\n}\n"
6
- ],
7
- "mappings": "uFAMO,GAAS,CAAwC,EACvD,UACA,eACA,UACA,aAC4B,CAC5B,MAAO,CAAC,EAAuB,IAAwB,CACtD,IAAM,EAAqB,CAAC,IAA4B,CACvD,GAAK,EAAgB,GACpB,OAGD,IAAM,EAAW,IAAI,EAAmB,EAAS,CAChD,UACA,aAAc,EACd,eACA,UACA,WACD,CAAC,EACA,EAAgB,GAAe,EAChC,EAAQ,wBAAwB,EAAa,CAAQ,EACrD,EAAQ,yBAAyB,CAAO,GAGzC,EAAkC,EAAO,CAAC,IAAY,CACrD,EAAmB,CAAO,EAC1B,EAAQ,0BAA0B,IAAM,CACvC,EAAmB,CAAO,EAC1B,EACD",
8
- "debugId": "FA5A6E529695847664756E2164756E21",
9
- "names": []
10
- }
@@ -1,4 +0,0 @@
1
- function o(i,t){let e=String(t.name);if(t.private)throw Error(`'bound' cannot decorate private properties like ${e}.`);t.addInitializer(function(){this[e]=this[e].bind(this)})}
2
- export{o as ia};
3
-
4
- //# debugId=543AC0E8DE660B4864756E2164756E21
@@ -1,10 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../src/decorators/standard/bound.ts"],
4
- "sourcesContent": [
5
- "import type { Method } from '../../types';\n\nexport function bound<T extends Method>(_: T, context: ClassMethodDecoratorContext) {\n\tconst methodName = String(context.name);\n\tif (context.private) {\n\t\tthrow new Error(`'bound' cannot decorate private properties like ${methodName as string}.`);\n\t}\n\tcontext.addInitializer(function (this: any) {\n\t\tthis[methodName] = this[methodName].bind(this);\n\t});\n}\n"
6
- ],
7
- "mappings": "AAEO,SAAS,CAAuB,CAAC,EAAM,EAAsC,CACnF,IAAM,EAAa,OAAO,EAAQ,IAAI,EACtC,GAAI,EAAQ,QACX,MAAU,MAAM,mDAAmD,IAAuB,EAE3F,EAAQ,eAAe,QAAS,EAAY,CAC3C,KAAK,GAAc,KAAK,GAAY,KAAK,IAAI,EAC7C",
8
- "debugId": "543AC0E8DE660B4864756E2164756E21",
9
- "names": []
10
- }
@@ -1,4 +0,0 @@
1
- import{yb as z}from"./chunk-wvd1ffe4.js";function B(j,x){let y=new z(j,x);return j.registerEventEmitter(x.name,y),y}
2
- export{B as xb};
3
-
4
- //# debugId=B632339BCFF34DA564756E2164756E21
@@ -1,10 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../src/helpers/create-event.ts"],
4
- "sourcesContent": [
5
- "import type { RadiantElement } from '../core/radiant-element';\nimport { EventEmitter, type EventEmitterConfig } from '../tools/event-emitter';\n\n/**\n * Creates an EventEmitter bound to a host element and registers it on the host.\n * Functional equivalent of the `@event` decorator for vanilla JS usage.\n * @param host The host element that will dispatch the events.\n * @param config {@link EventEmitterConfig} The event emitter configuration.\n */\nexport function createEvent<T = unknown>(host: RadiantElement, config: EventEmitterConfig): EventEmitter<T> {\n\tconst emitter = new EventEmitter<T>(host, config);\n\thost.registerEventEmitter(config.name, emitter);\n\treturn emitter;\n}\n"
6
- ],
7
- "mappings": "yCASO,SAAS,CAAwB,CAAC,EAAsB,EAA6C,CAC3G,IAAM,EAAU,IAAI,EAAgB,EAAM,CAAM,EAEhD,OADA,EAAK,qBAAqB,EAAO,KAAM,CAAO,EACvC",
8
- "debugId": "B632339BCFF34DA564756E2164756E21",
9
- "names": []
10
- }
@@ -1,4 +0,0 @@
1
- import{G as B}from"./chunk-5bkat72n.js";import{I as A,K as k}from"./chunk-p8k4g99a.js";import{Ma as w}from"./chunk-cnyxrh9r.js";function M(D){let{context:f,select:h,subscribe:q=!0}=D;return(E,F)=>{w(E,(d)=>{let j=B(d,(G)=>{d[F]=G},!0);A(d,f,j,h),d.registerConnectedCallback(()=>{if(k(d,f,j,{select:h,subscribe:q}))return;queueMicrotask(()=>{k(d,f,j,{select:h,subscribe:q})})})})}}
2
- export{M as C};
3
-
4
- //# debugId=AAAD552D0788280D64756E2164756E21
@@ -1,10 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../src/context/decorators/legacy/context-selector-field.ts"],
4
- "sourcesContent": [
5
- "import type { RadiantElement } from '../../../core/radiant-element';\nimport { registerLegacyInstanceInitializer } from '../../../decorators/legacy/instance-initializers';\nimport { bootstrapSsrContextSelection, connectContextSelection } from '../../context-consumer-bootstrap';\nimport type { Context, ContextType } from '../../types';\nimport { createContextSelectionDelivery } from '../context-selection-delivery';\n\nexport type ContextSelectorFieldOptions<T extends Context<unknown, unknown>, Selected = ContextType<T>> = {\n\tcontext: T;\n\tselect?: (context: ContextType<T>) => Selected;\n\tsubscribe?: boolean;\n};\n\nexport function contextSelectorField<T extends Context<unknown, unknown>, Selected = ContextType<T>>(\n\toptions: ContextSelectorFieldOptions<T, Selected>,\n) {\n\tconst { context, select, subscribe = true } = options;\n\n\treturn (target: RadiantElement, propertyName: string) => {\n\t\tregisterLegacyInstanceInitializer(target, (element) => {\n\t\t\tconst applyValue = createContextSelectionDelivery(\n\t\t\t\telement,\n\t\t\t\t(value) => {\n\t\t\t\t\t(element as unknown as Record<string, unknown>)[propertyName] = value as Selected;\n\t\t\t\t},\n\t\t\t\ttrue,\n\t\t\t);\n\n\t\t\tbootstrapSsrContextSelection(element, context, applyValue, select as any);\n\n\t\t\telement.registerConnectedCallback(() => {\n\t\t\t\tif (\n\t\t\t\t\tconnectContextSelection(element, context, applyValue, {\n\t\t\t\t\t\tselect: select as any,\n\t\t\t\t\t\tsubscribe,\n\t\t\t\t\t})\n\t\t\t\t) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tqueueMicrotask(() => {\n\t\t\t\t\tconnectContextSelection(element, context, applyValue, {\n\t\t\t\t\t\tselect: select as any,\n\t\t\t\t\t\tsubscribe,\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t});\n\t\t});\n\t};\n}\n"
6
- ],
7
- "mappings": "4IAYO,GAAS,LAAoF,CACnG,EACC,CACD,IAAQ,UAAS,SAAQ,YAAY,IAAS,EAE9C,MAAO,CAAC,EAAwB,IAAyB,CACxD,EAAkC,EAAQ,CAAC,IAAY,CACtD,IAAM,EAAa,EAClB,EACA,CAAC,IAAU,CACT,EAA+C,GAAgB,GAEjE,EACD,EAEA,EAA6B,EAAS,EAAS,EAAY,CAAa,EAExE,EAAQ,0BAA0B,IAAM,CACvC,GACC,EAAwB,EAAS,EAAS,EAAY,CACrD,OAAQ,EACR,WACD,CAAC,EAED,OAGD,eAAe,IAAM,CACpB,EAAwB,EAAS,EAAS,EAAY,CACrD,OAAQ,EACR,WACD,CAAC,EACD,EACD,EACD",
8
- "debugId": "AAAD552D0788280D64756E2164756E21",
9
- "names": []
10
- }
@@ -1,4 +0,0 @@
1
- import{Y as K}from"./chunk-gdkte2vd.js";import{Sa as X}from"./chunk-gg74gdpv.js";import{Ta as Y}from"./chunk-e0r6ca2g.js";import{hb as D,ib as F,jb as O,kb as Q,lb as T,mb as U,nb as V,ob as W}from"./chunk-3xxvmd5c.js";import{pb as L}from"./chunk-hpzgnxgq.js";import{hasHydrationMarkers as Z,hydrate as _,jsx as $,render as A}from"@ecopages/jsx";import{Computed as E,subtle as I}from"@ecopages/signals";class G extends K{isRendering=!1;isFirstConnectPending=!1;isRenderScheduled=!1;needsRender=!1;projectedSlotContent=new Map;renderSignal;renderWatcher=new I.Watcher(()=>{this.requestUpdate()});slotProjectionObserver;slotProjectionVersion=0;connectedCallback(){if(super.connectedCallback(),this.isFirstConnectPending)return;this.isFirstConnectPending=!0,queueMicrotask(()=>{if(this.isFirstConnectPending=!1,!this.isConnected)return;if(this.ensureSlotProjectionState(),this.observeSlotProjection(),J(this)){if(this.needsRender=!1,this.hydrate(),this.needsRender)this.update();return}this.update()})}render(){return $("slot",{})}renderToString(f={}){return this.prepareForSsr(),B().renderView(this,f)}renderHost(){return B().renderHost(this)}renderHostToString(f={}){return B().renderHostToString(this,f)}hydrate(){if(!this.isConnected||this.isRendering)return;this.isRendering=!0,this.disconnectSlotProjectionObserver();try{_(this.resolveTrackedRenderOutput().value,this)}finally{this.isRendering=!1,this.observeSlotProjection()}}requestUpdate(){if(this.needsRender=!0,this.isRenderScheduled)return;this.isRenderScheduled=!0,queueMicrotask(()=>{if(this.isRenderScheduled=!1,!this.needsRender)return;this.update()})}update(){if(this.needsRender=!0,!this.isConnected||this.isRendering)return;if(this.isFirstConnectPending&&J(this))return;while(this.needsRender&&this.isConnected){this.needsRender=!1,this.isRendering=!0,this.disconnectSlotProjectionObserver();try{A(this.resolveTrackedRenderOutput().value,this)}finally{this.isRendering=!1,this.observeSlotProjection()}}}disconnectedCallback(){this.disconnectSlotProjectionObserver(),this.disconnectRenderWatcher(),super.disconnectedCallback()}getSlotElement(f){return this.getSlotElements(f)[0]??null}getSlotElements(f){return this.ensureSlotProjectionState(),(this.projectedSlotContent.get(f??D)??[]).filter((q)=>typeof Node<"u"&&q instanceof Element)}shouldAutoBindReactiveMembers(){return!0}getHostSsrAttributes(){return B().getHostAttributes(this)}resolveSsrRenderBridge(){let f={};if(this.renderHostToString===G.prototype.renderHostToString)f.renderHostToString=(q)=>this.renderHostToString(q);if(this.renderHost===G.prototype.renderHost)f.renderHost=()=>this.renderHost();return f}ensureSlotProjectionState(){if(this.projectedSlotContent.size>0)return;let f=this.isConnected?W(this):void 0;if(typeof f==="string"&&f!==""){this.projectedSlotContent=Q(f),this.slotProjectionVersion+=1;return}if(this.getHostChildNodeCount()>0)this.projectedSlotContent=O(this),this.slotProjectionVersion+=1}getHostChildNodeCount(){return"childNodes"in this&&this.childNodes?this.childNodes.length:0}getSlotProjectionScriptTag(){this.ensureSlotProjectionState();let f=U(this.projectedSlotContent);if(!f)return;return`<script type="application/json" ${F}>${v(f)}</script>`}getAuthoredHydrationScriptMarkup(){let f=T(this);if(f)return f;return}handleSlotProjectionMutations(f){let q=!1;for(let w of f){for(let z of Array.from(w.removedNodes))if(this.removeProjectedSlotNode(z))q=!0;for(let z of Array.from(w.addedNodes)){if(z.parentNode!==this)continue;if(this.addProjectedSlotNode(z))q=!0}}if(q)this.slotProjectionVersion+=1,this.update()}addProjectedSlotNode(f){if(f instanceof HTMLScriptElement&&(f.hasAttribute(F)||f.hasAttribute(L)))return!1;let q=f instanceof Element?f.getAttribute("slot")??D:D,w=this.projectedSlotContent.get(q);if(w){if(w.includes(f))return!1;return w.push(f),!0}return this.projectedSlotContent.set(q,[f]),!0}removeProjectedSlotNode(f){for(let[q,w]of this.projectedSlotContent.entries()){let z=w.indexOf(f);if(z===-1)continue;if(w.splice(z,1),w.length===0)this.projectedSlotContent.delete(q);return!0}return!1}observeSlotProjection(){if(typeof MutationObserver>"u"||this.slotProjectionObserver||!this.isConnected)return;this.slotProjectionObserver=new MutationObserver((f)=>this.handleSlotProjectionMutations(f)),this.slotProjectionObserver.observe(this,{childList:!0})}disconnectSlotProjectionObserver(){this.slotProjectionObserver?.disconnect(),this.slotProjectionObserver=void 0}disconnectRenderWatcher(){if(!this.renderSignal)return;this.renderWatcher.unwatch(this.renderSignal),this.renderSignal=void 0}resolveTrackedRenderOutput(){let f=new E(()=>this.resolveRenderOutput()),q=f.get();if(!this.isConnected)return q;if(this.renderSignal)this.renderWatcher.unwatch(this.renderSignal);return this.renderSignal=f,this.renderWatcher.watch(f),q}resolveRenderOutput(){return this.ensureSlotProjectionState(),V(this.render(),this.projectedSlotContent)}}function B(){let f=Y();if(!f)throw Error("Radiant SSR runtime is unavailable. Import `@ecopages/radiant/server/render-component` before using instance SSR methods.");return f}function J(f){return X()&&Z(f)}function v(f){return f.replace(/</g,"\\u003c")}
2
- export{G as P};
3
-
4
- //# debugId=55107CFC631DC79E64756E2164756E21
@@ -1,10 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../src/core/radiant-component.ts"],
4
- "sourcesContent": [
5
- "import {\n\thasHydrationMarkers,\n\thydrate as hydrateJsx,\n\tjsx,\n\trender as renderJsx,\n\ttype JsxRenderable,\n} from '@ecopages/jsx';\nimport type { RenderToStringOptions } from '@ecopages/jsx/server';\nimport { Computed, subtle } from '@ecopages/signals';\nimport { RadiantElement } from './radiant-element';\nimport {\n\tDEFAULT_SLOT_NAME,\n\tSLOT_PROJECTION_SCRIPT_ATTRIBUTE,\n\tcollectAuthoredHydrationScriptMarkup,\n\tcaptureProjectedSlotRenderables,\n\tdeserializeProjectedSlotRenderables,\n\tresolveSlotProjection,\n\tserializeProjectedSlotRenderables,\n\ttakeSlotProjectionScriptPayload,\n} from './slot-projection-runtime';\nimport { HYDRATION_ATTRIBUTE } from './hydration-codec';\nimport { isRadiantHydratorInstalled } from './radiant-hydrator-state';\nimport {\n\tgetRadiantComponentSsrRuntime,\n\ttype RadiantComponentRenderBridge,\n\ttype RadiantComponentSsrCapable,\n} from './radiant-component-ssr-registry';\n\n/**\n * A structured JSX-first Radiant base class.\n * @typeParam Bindings - Explicit internal bindable shape. Include only the\n * prop/state keys that JSX bindings should accept.\n *\n * Treat this as the component's internal reactive/bindable surface, not as the\n * default public custom-element attribute contract. When a component exposes a\n * narrower external API than its internal state, declare a separate public\n * props type for the JSX intrinsic element and keep internal-only state out of\n * that contract.\n *\n * Reusing the same type for both is fine only when the public props and the\n * bindable reactive members are intentionally the same surface.\n *\n * - `render()` describes the view.\n * - `update()` commits the current view into the host.\n * - first render happens automatically on connect.\n * - plain `@prop`, `@state`, and `@signal` reads performed during `render()`\n * participate in tracked rerender invalidation.\n * - `update()` and `requestUpdate()` remain available when a rerender should be\n * scheduled from imperative work outside those tracked reads.\n */\nexport class RadiantComponent<Bindings extends object = {}> extends RadiantElement<Bindings> {\n\tprivate isRendering = false;\n\tprivate isFirstConnectPending = false;\n\tprivate isRenderScheduled = false;\n\tprivate needsRender = false;\n\tprivate projectedSlotContent = new Map<string, JsxRenderable[]>();\n\tprivate renderSignal?: Computed<{ containsSlots: boolean; value: JsxRenderable }>;\n\tprivate readonly renderWatcher = new subtle.Watcher(() => {\n\t\tthis.requestUpdate();\n\t});\n\tprivate slotProjectionObserver?: MutationObserver;\n\tprivate slotProjectionVersion = 0;\n\n\toverride connectedCallback() {\n\t\tsuper.connectedCallback();\n\n\t\tif (this.isFirstConnectPending) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.isFirstConnectPending = true;\n\n\t\tqueueMicrotask(() => {\n\t\t\tthis.isFirstConnectPending = false;\n\n\t\t\tif (!this.isConnected) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.ensureSlotProjectionState();\n\t\t\tthis.observeSlotProjection();\n\n\t\t\tif (shouldHydrateOnConnect(this)) {\n\t\t\t\tthis.needsRender = false;\n\t\t\t\tthis.hydrate();\n\n\t\t\t\tif (this.needsRender) {\n\t\t\t\t\tthis.update();\n\t\t\t\t}\n\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.update();\n\t\t});\n\t}\n\n\t/**\n\t * Returns the current component view.\n\t *\n\t * The base implementation behaves like `<slot />`, so authored host children\n\t * pass through unchanged when a subclass does not override `render()`.\n\t */\n\tpublic render(): JsxRenderable {\n\t\treturn jsx('slot', {});\n\t}\n\n\t/**\n\t * Serializes the current component view into HTML.\n\t */\n\tpublic renderToString(options: RenderToStringOptions = {}): string {\n\t\tthis.prepareForSsr();\n\n\t\treturn requireRadiantComponentSsrRuntime().renderView(this as unknown as RadiantComponentSsrCapable, options);\n\t}\n\n\t/**\n\t * Returns the component host and current view as a JSX element.\n\t */\n\tpublic renderHost(): JsxRenderable {\n\t\treturn requireRadiantComponentSsrRuntime().renderHost(this as unknown as RadiantComponentSsrCapable);\n\t}\n\n\t/**\n\t * Serializes the component host and current view into HTML.\n\t */\n\tpublic renderHostToString(options: RenderToStringOptions = {}): string {\n\t\treturn requireRadiantComponentSsrRuntime().renderHostToString(\n\t\t\tthis as unknown as RadiantComponentSsrCapable,\n\t\t\toptions,\n\t\t);\n\t}\n\n\t/**\n\t * Hydrates an SSR-rendered component view in place.\n\t */\n\tpublic hydrate(): void {\n\t\tif (!this.isConnected || this.isRendering) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.isRendering = true;\n\t\tthis.disconnectSlotProjectionObserver();\n\n\t\ttry {\n\t\t\thydrateJsx(this.resolveTrackedRenderOutput().value, this);\n\t\t} finally {\n\t\t\tthis.isRendering = false;\n\t\t\tthis.observeSlotProjection();\n\t\t}\n\t}\n\n\t/**\n\t * Queues a component rerender and coalesces repeated requests into the same\n\t * microtask.\n\t *\n\t * Use this when reactive state may change multiple times in the same turn and\n\t * the current view should refresh once with the final values.\n\t */\n\tpublic requestUpdate(): void {\n\t\tthis.needsRender = true;\n\n\t\tif (this.isRenderScheduled) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.isRenderScheduled = true;\n\n\t\tqueueMicrotask(() => {\n\t\t\tthis.isRenderScheduled = false;\n\n\t\t\tif (!this.needsRender) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.update();\n\t\t});\n\t}\n\n\t/**\n\t * Explicitly rerenders the component into its host.\n\t */\n\tpublic update(): void {\n\t\tthis.needsRender = true;\n\n\t\tif (!this.isConnected || this.isRendering) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (this.isFirstConnectPending && shouldHydrateOnConnect(this)) {\n\t\t\treturn;\n\t\t}\n\n\t\twhile (this.needsRender && this.isConnected) {\n\t\t\tthis.needsRender = false;\n\t\t\tthis.isRendering = true;\n\t\t\tthis.disconnectSlotProjectionObserver();\n\n\t\t\ttry {\n\t\t\t\trenderJsx(this.resolveTrackedRenderOutput().value, this);\n\t\t\t} finally {\n\t\t\t\tthis.isRendering = false;\n\t\t\t\tthis.observeSlotProjection();\n\t\t\t}\n\t\t}\n\t}\n\n\toverride disconnectedCallback() {\n\t\tthis.disconnectSlotProjectionObserver();\n\t\tthis.disconnectRenderWatcher();\n\t\tsuper.disconnectedCallback();\n\t}\n\n\t/**\n\t * Returns the first projected element assigned to the default or named slot.\n\t *\n\t * Use this when component logic needs direct access to authored light-DOM\n\t * content after projection.\n\t *\n\t * @param name Optional slot name. Omit for the default slot.\n\t */\n\tpublic getSlotElement<T extends Element = Element>(name?: string): T | null {\n\t\treturn (this.getSlotElements<T>(name)[0] ?? null) as T | null;\n\t}\n\n\t/**\n\t * Returns all projected elements assigned to the default or named slot.\n\t *\n\t * Text nodes are intentionally excluded so the result matches the element-\n\t * oriented query semantics used by Radiant decorators.\n\t *\n\t * @param name Optional slot name. Omit for the default slot.\n\t */\n\tpublic getSlotElements<T extends Element = Element>(name?: string): T[] {\n\t\tthis.ensureSlotProjectionState();\n\n\t\treturn (this.projectedSlotContent.get(name ?? DEFAULT_SLOT_NAME) ?? []).filter(\n\t\t\t(renderable): renderable is T => typeof Node !== 'undefined' && renderable instanceof Element,\n\t\t);\n\t}\n\n\tprotected override shouldAutoBindReactiveMembers(): boolean {\n\t\treturn true;\n\t}\n\n\tprotected getHostSsrAttributes(): Record<string, string> {\n\t\treturn requireRadiantComponentSsrRuntime().getHostAttributes(this as unknown as RadiantComponentSsrCapable);\n\t}\n\n\t/**\n\t * Exposes the inherited SSR helper path to internal server renderers.\n\t *\n\t * The bridge is intentionally empty when a subclass overrides the host SSR\n\t * methods so that custom host serialization remains the source of truth.\n\t */\n\tprotected resolveSsrRenderBridge(): RadiantComponentRenderBridge {\n\t\tconst bridge: RadiantComponentRenderBridge = {};\n\n\t\tif (this.renderHostToString === RadiantComponent.prototype.renderHostToString) {\n\t\t\tbridge.renderHostToString = (options: RenderToStringOptions | undefined) =>\n\t\t\t\tthis.renderHostToString(options);\n\t\t}\n\n\t\tif (this.renderHost === RadiantComponent.prototype.renderHost) {\n\t\t\tbridge.renderHost = () => this.renderHost();\n\t\t}\n\n\t\treturn bridge;\n\t}\n\n\tprivate ensureSlotProjectionState(): void {\n\t\tif (this.projectedSlotContent.size > 0) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst scriptPayload = this.isConnected ? takeSlotProjectionScriptPayload(this) : undefined;\n\n\t\tif (typeof scriptPayload === 'string' && scriptPayload !== '') {\n\t\t\tthis.projectedSlotContent = deserializeProjectedSlotRenderables(scriptPayload);\n\t\t\tthis.slotProjectionVersion += 1;\n\t\t\treturn;\n\t\t}\n\n\t\tif (this.getHostChildNodeCount() > 0) {\n\t\t\tthis.projectedSlotContent = captureProjectedSlotRenderables(this);\n\t\t\tthis.slotProjectionVersion += 1;\n\t\t}\n\t}\n\n\tprivate getHostChildNodeCount(): number {\n\t\treturn 'childNodes' in this && this.childNodes ? this.childNodes.length : 0;\n\t}\n\n\tprivate getSlotProjectionScriptTag(): string | undefined {\n\t\tthis.ensureSlotProjectionState();\n\t\tconst payload = serializeProjectedSlotRenderables(this.projectedSlotContent);\n\n\t\tif (!payload) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\treturn `<script type=\"application/json\" ${SLOT_PROJECTION_SCRIPT_ATTRIBUTE}>${escapeScriptText(payload)}</script>`;\n\t}\n\n\tprivate getAuthoredHydrationScriptMarkup(): string | undefined {\n\t\tconst authoredHydrationMarkup = collectAuthoredHydrationScriptMarkup(this);\n\n\t\tif (authoredHydrationMarkup) {\n\t\t\treturn authoredHydrationMarkup;\n\t\t}\n\n\t\treturn undefined;\n\t}\n\n\tprivate handleSlotProjectionMutations(records: MutationRecord[]): void {\n\t\tlet hasProjectionChanges = false;\n\n\t\tfor (const record of records) {\n\t\t\tfor (const removedNode of Array.from(record.removedNodes)) {\n\t\t\t\tif (this.removeProjectedSlotNode(removedNode)) {\n\t\t\t\t\thasProjectionChanges = true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tfor (const addedNode of Array.from(record.addedNodes)) {\n\t\t\t\tif (addedNode.parentNode !== this) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif (this.addProjectedSlotNode(addedNode)) {\n\t\t\t\t\thasProjectionChanges = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (hasProjectionChanges) {\n\t\t\tthis.slotProjectionVersion += 1;\n\t\t\tthis.update();\n\t\t}\n\t}\n\n\tprivate addProjectedSlotNode(node: Node): boolean {\n\t\tif (\n\t\t\tnode instanceof HTMLScriptElement &&\n\t\t\t(node.hasAttribute(SLOT_PROJECTION_SCRIPT_ATTRIBUTE) || node.hasAttribute(HYDRATION_ATTRIBUTE))\n\t\t) {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst slotName = node instanceof Element ? (node.getAttribute('slot') ?? DEFAULT_SLOT_NAME) : DEFAULT_SLOT_NAME;\n\t\tconst bucket = this.projectedSlotContent.get(slotName);\n\n\t\tif (bucket) {\n\t\t\tif (bucket.includes(node)) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tbucket.push(node);\n\t\t\treturn true;\n\t\t}\n\n\t\tthis.projectedSlotContent.set(slotName, [node]);\n\t\treturn true;\n\t}\n\n\tprivate removeProjectedSlotNode(node: Node): boolean {\n\t\tfor (const [slotName, bucket] of this.projectedSlotContent.entries()) {\n\t\t\tconst nodeIndex = bucket.indexOf(node);\n\n\t\t\tif (nodeIndex === -1) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tbucket.splice(nodeIndex, 1);\n\n\t\t\tif (bucket.length === 0) {\n\t\t\t\tthis.projectedSlotContent.delete(slotName);\n\t\t\t}\n\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}\n\n\tprivate observeSlotProjection(): void {\n\t\tif (typeof MutationObserver === 'undefined' || this.slotProjectionObserver || !this.isConnected) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.slotProjectionObserver = new MutationObserver((records) => this.handleSlotProjectionMutations(records));\n\t\tthis.slotProjectionObserver.observe(this, { childList: true });\n\t}\n\n\tprivate disconnectSlotProjectionObserver(): void {\n\t\tthis.slotProjectionObserver?.disconnect();\n\t\tthis.slotProjectionObserver = undefined;\n\t}\n\n\tprivate disconnectRenderWatcher(): void {\n\t\tif (!this.renderSignal) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.renderWatcher.unwatch(this.renderSignal);\n\t\tthis.renderSignal = undefined;\n\t}\n\n\tprivate resolveTrackedRenderOutput(): { containsSlots: boolean; value: JsxRenderable } {\n\t\tconst nextRenderSignal = new Computed(() => this.resolveRenderOutput());\n\t\tconst output = nextRenderSignal.get();\n\n\t\tif (!this.isConnected) {\n\t\t\treturn output;\n\t\t}\n\n\t\tif (this.renderSignal) {\n\t\t\tthis.renderWatcher.unwatch(this.renderSignal);\n\t\t}\n\n\t\tthis.renderSignal = nextRenderSignal;\n\t\tthis.renderWatcher.watch(nextRenderSignal);\n\t\treturn output;\n\t}\n\n\tprivate resolveRenderOutput(): { containsSlots: boolean; value: JsxRenderable } {\n\t\tthis.ensureSlotProjectionState();\n\t\treturn resolveSlotProjection(this.render(), this.projectedSlotContent);\n\t}\n}\n\nfunction requireRadiantComponentSsrRuntime() {\n\tconst runtime = getRadiantComponentSsrRuntime();\n\n\tif (!runtime) {\n\t\tthrow new Error(\n\t\t\t'Radiant SSR runtime is unavailable. Import `@ecopages/radiant/server/render-component` before using instance SSR methods.',\n\t\t);\n\t}\n\n\treturn runtime;\n}\n\nfunction shouldHydrateOnConnect(component: HTMLElement): boolean {\n\treturn isRadiantHydratorInstalled() && hasHydrationMarkers(component);\n}\n\nfunction escapeScriptText(value: string): string {\n\treturn value.replace(/</g, '\\\\u003c');\n}\n"
6
- ],
7
- "mappings": "4RAAA,wBACC,OACA,GACA,MACA,sBAID,mBAAS,YAAU,0BA0CZ,MAAM,UAAuD,CAAyB,CACpF,YAAc,GACd,sBAAwB,GACxB,kBAAoB,GACpB,YAAc,GACd,qBAAuB,IAAI,IAC3B,aACS,cAAgB,IAAI,EAAO,QAAQ,IAAM,CACzD,KAAK,cAAc,EACnB,EACO,uBACA,sBAAwB,EAEvB,iBAAiB,EAAG,CAG5B,GAFA,MAAM,kBAAkB,EAEpB,KAAK,sBACR,OAGD,KAAK,sBAAwB,GAE7B,eAAe,IAAM,CAGpB,GAFA,KAAK,sBAAwB,GAEzB,CAAC,KAAK,YACT,OAMD,GAHA,KAAK,0BAA0B,EAC/B,KAAK,sBAAsB,EAEvB,EAAuB,IAAI,EAAG,CAIjC,GAHA,KAAK,YAAc,GACnB,KAAK,QAAQ,EAET,KAAK,YACR,KAAK,OAAO,EAGb,OAGD,KAAK,OAAO,EACZ,EASK,MAAM,EAAkB,CAC9B,OAAO,EAAI,OAAQ,CAAC,CAAC,EAMf,cAAc,CAAC,EAAiC,CAAC,EAAW,CAGlE,OAFA,KAAK,cAAc,EAEZ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,YAAY,EAK7C,OAFA,KAAK,aAAe,EACpB,KAAK,cAAc,MAAM,CAAgB,EAClC,EAGA,mBAAmB,EAAqD,CAE/E,OADA,KAAK,0BAA0B,EACxB,EAAsB,KAAK,OAAO,EAAG,KAAK,oBAAoB,EAEvE,CAEA,SAAS,CAAiC,EAAG,CAC5C,IAAM,EAAU,EAA8B,EAE9C,GAAI,CAAC,EACJ,MAAU,MACT,2HACD,EAGD,OAAO,EAGR,SAAS,CAAsB,CAAC,EAAiC,CAChE,OAAO,EAA2B,GAAK,EAAoB,CAAS,EAGrE,SAAS,CAAgB,CAAC,EAAuB,CAChD,OAAO,EAAM,QAAQ,KAAM,SAAS",
8
- "debugId": "55107CFC631DC79E64756E2164756E21",
9
- "names": []
10
- }
@@ -1,4 +0,0 @@
1
- import{o as Z,r as _}from"./chunk-5b1en9vz.js";class G extends EventTarget{nodeType;static ELEMENT_NODE=1;static TEXT_NODE=3;childNodes=[];parentNode=null;constructor(j){super();this.nodeType=j}append(...j){for(let q of j)this.appendChild(typeof q==="string"?U(q):q)}appendChild(j){if("parentNode"in j&&j.parentNode&&"removeChild"in j.parentNode)j.parentNode.removeChild(j);return this.childNodes.push(j),j.parentNode=this,j}removeChild(j){let q=this.childNodes.indexOf(j);if(q===-1)return j;return this.childNodes.splice(q,1),j.parentNode=null,j}replaceChildren(...j){for(let q of this.childNodes)q.parentNode=null;this.childNodes=[],this.append(...j)}get textContent(){return this.childNodes.map((j)=>j.textContent??"").join("")}set textContent(j){this.replaceChildren(j??"")}}class $ extends G{value;constructor(j){super(G.TEXT_NODE);this.value=j}get textContent(){return this.value}set textContent(j){this.value=j??""}}class O extends G{attributes=new Map;fragmentHtml;fragmentText;localName;tagName;constructor(j="div"){super(G.ELEMENT_NODE);this.localName=j.toLowerCase(),this.tagName=this.localName.toUpperCase()}hasAttribute(j){return this.attributes.has(j)}getAttribute(j){return this.attributes.get(j)??null}getAttributeNames(){return Array.from(this.attributes.keys())}setAttribute(j,q){this.fragmentHtml=void 0,this.attributes.set(j,String(q))}removeAttribute(j){this.fragmentHtml=void 0,this.attributes.delete(j)}querySelector(){return null}querySelectorAll(){return[]}matches(){return!1}get outerHTML(){if(this.fragmentHtml!==void 0)return this.fragmentHtml;let j=Array.from(this.attributes.entries()).map(([q,B])=>` ${q}="${w(B)}"`).join("");return`<${this.localName}${j}>${this.innerHTML}</${this.localName}>`}get innerHTML(){return this.childNodes.map((j)=>D(j)).join("")}set innerHTML(j){this.fragmentHtml=void 0,this.fragmentText=void 0,this.replaceChildren(...k(j))}get textContent(){return this.fragmentText??super.textContent??""}set textContent(j){this.fragmentHtml=void 0,this.fragmentText=j??"",super.textContent=j}setSerializedFragment(j,q,B){this.fragmentHtml=j,this.fragmentText=q,this.attributes=new Map(Object.entries(B)),this.replaceChildren()}}class Q{bubbles;cancelable;composed;type;constructor(j,q={}){this.type=j,this.bubbles=q.bubbles??!1,this.cancelable=q.cancelable??!1,this.composed=q.composed??!1}}class V extends Q{detail;constructor(j,q={}){super(j,q);this.detail=q.detail}}class K extends O{isConnected=!1;constructor(j="div"){super(j)}insertAdjacentHTML(j,q){this.append(...k(q))}}class P extends K{constructor(){super("script")}}class z{definitions=new Map;define(j,q){if(this.definitions.has(j))return;this.definitions.set(j,q)}get(j){return this.definitions.get(j)}}var J;function U(j){return new $(j)}function A(){let j=globalThis,q=j.customElements;if(typeof j.Node>"u"||typeof j.Element>"u"||typeof j.HTMLElement>"u"||!q||typeof q.define!=="function"||typeof q.get!=="function")return;return j.window??{CustomEvent:j.CustomEvent??V,Element:j.Element,Event:j.Event??Q,EventTarget:j.EventTarget??EventTarget,HTMLScriptElement:j.HTMLScriptElement??j.HTMLElement,HTMLElement:j.HTMLElement,Node:j.Node,customElements:q}}function F(){let j=A();if(j)return j;return R()}function L(){return F(),{prepareHost(j,q={}){if(q.authoredContent!==void 0)j.innerHTML=q.authoredContent}}}function R(){let j=A();if(j)return j;if(J)return J;let q=new z,B=globalThis.Event??Q,X=globalThis.CustomEvent??V,Y=globalThis.EventTarget??EventTarget;return J={CustomEvent:X,Element:O,Event:B,EventTarget:Y,HTMLScriptElement:P,HTMLElement:K,Node:G,customElements:q},Object.assign(globalThis,{CustomEvent:X,Element:O,Event:B,EventTarget:Y,HTMLScriptElement:P,HTMLElement:K,Node:G,customElements:q,window:J}),J}function y(j,q){let B=q.tagName==="script"?new P:new K(q.tagName);return B.setSerializedFragment(j,W(q.innerHtml),q.attributes),B}function w(j){return j.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function W(j){return j.replace(/<!--.*?-->/gs,"").replace(/<[^>]+>/g,"")}function k(j){return Z(j).map((q)=>{if(!q.startsWith("<"))return U(q);let B=_(q,0);if(!B||B.type!=="open")return U(q);return y(q,B)})}function D(j){if(j.nodeType===G.TEXT_NODE)return j.textContent??"";return"outerHTML"in j&&typeof j.outerHTML==="string"?j.outerHTML:j.textContent??""}
2
- export{F as k,L as l,R as m};
3
-
4
- //# debugId=C9C0B7F6FE7C768764756E2164756E21
@@ -1,10 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../src/server/light-dom-shim.ts"],
4
- "sourcesContent": [
5
- "import { collectTopLevelHtmlFragments, parseHtmlTagToken, type ParsedHtmlTag } from './html-parser';\n\ntype MinimalCustomElementRegistry = {\n\tdefine(name: string, constructor: CustomElementConstructor, options?: ElementDefinitionOptions): void;\n\tget(name: string): CustomElementConstructor | undefined;\n};\n\n/**\n * Minimal window-like runtime surface exposed by the SSR light-DOM shim.\n *\n * This is intentionally much smaller than a browser `window`; it only includes\n * the constructors and registry access that Radiant SSR currently needs.\n */\nexport type LightDomShimWindow = {\n\t/** Event constructor exposed to SSR-created components. */\n\tCustomEvent: typeof CustomEvent;\n\t/** Element constructor exposed to SSR-created components. */\n\tElement: typeof Element;\n\t/** Event constructor exposed to SSR-created components. */\n\tEvent: typeof Event;\n\t/** EventTarget constructor exposed to SSR-created components. */\n\tEventTarget: typeof EventTarget;\n\t/** HTMLScriptElement constructor used by slot projection payload parsing. */\n\tHTMLScriptElement: typeof HTMLScriptElement;\n\t/** HTMLElement constructor exposed to SSR-created components. */\n\tHTMLElement: typeof HTMLElement;\n\t/** Node constructor exposed to SSR-created components. */\n\tNode: typeof Node;\n\t/** Custom element registry used while rendering in SSR. */\n\tcustomElements: MinimalCustomElementRegistry;\n};\n\n/** Host preparation options accepted by the server render environment. */\nexport type PrepareServerRenderHostOptions = {\n\t/** Serialized light-DOM content to attach to the host before SSR. */\n\tauthoredContent?: string;\n};\n\n/** Reusable SSR environment used to prepare component hosts before rendering. */\nexport type ServerRenderEnvironment = {\n\t/** Prepares the host instance for rendering, including authored light-DOM content. */\n\tprepareHost(host: HTMLElement, options?: PrepareServerRenderHostOptions): void;\n};\n\ntype MinimalParentNode = Node & ParentNode;\n\nclass MinimalNode extends EventTarget {\n\tstatic readonly ELEMENT_NODE = 1;\n\tstatic readonly TEXT_NODE = 3;\n\n\tpublic childNodes: Node[] = [];\n\tpublic parentNode: MinimalParentNode | null = null;\n\n\tconstructor(public readonly nodeType: number) {\n\t\tsuper();\n\t}\n\n\tappend(...nodes: Array<Node | string>): void {\n\t\tfor (const node of nodes) {\n\t\t\tthis.appendChild(typeof node === 'string' ? createTextNode(node) : node);\n\t\t}\n\t}\n\n\tappendChild<TNode extends Node>(node: TNode): TNode {\n\t\tif ('parentNode' in node && node.parentNode && 'removeChild' in node.parentNode) {\n\t\t\t(node.parentNode as Node & { removeChild(node: Node): Node }).removeChild(node);\n\t\t}\n\n\t\tthis.childNodes.push(node);\n\t\t(node as Node & { parentNode: MinimalParentNode | null }).parentNode = this as unknown as MinimalParentNode;\n\t\treturn node;\n\t}\n\n\tremoveChild<TNode extends Node>(node: TNode): TNode {\n\t\tconst nodeIndex = this.childNodes.indexOf(node);\n\n\t\tif (nodeIndex === -1) {\n\t\t\treturn node;\n\t\t}\n\n\t\tthis.childNodes.splice(nodeIndex, 1);\n\t\t(node as Node & { parentNode: MinimalParentNode | null }).parentNode = null;\n\t\treturn node;\n\t}\n\n\treplaceChildren(...nodes: Array<Node | string>): void {\n\t\tfor (const child of this.childNodes) {\n\t\t\t(child as Node & { parentNode: MinimalParentNode | null }).parentNode = null;\n\t\t}\n\n\t\tthis.childNodes = [];\n\t\tthis.append(...nodes);\n\t}\n\n\tget textContent(): string | null {\n\t\treturn this.childNodes.map((child) => child.textContent ?? '').join('');\n\t}\n\n\tset textContent(value: string | null) {\n\t\tthis.replaceChildren(value ?? '');\n\t}\n}\n\nclass MinimalTextNode extends MinimalNode {\n\tconstructor(private value: string) {\n\t\tsuper(MinimalNode.TEXT_NODE);\n\t}\n\n\toverride get textContent(): string {\n\t\treturn this.value;\n\t}\n\n\toverride set textContent(value: string | null) {\n\t\tthis.value = value ?? '';\n\t}\n}\n\nclass MinimalElement extends MinimalNode {\n\tprivate attributes = new Map<string, string>();\n\tprivate fragmentHtml?: string;\n\tprivate fragmentText?: string;\n\n\tpublic readonly localName: string;\n\tpublic readonly tagName: string;\n\n\tconstructor(tagName = 'div') {\n\t\tsuper(MinimalNode.ELEMENT_NODE);\n\t\tthis.localName = tagName.toLowerCase();\n\t\tthis.tagName = this.localName.toUpperCase();\n\t}\n\n\thasAttribute(name: string): boolean {\n\t\treturn this.attributes.has(name);\n\t}\n\n\tgetAttribute(name: string): string | null {\n\t\treturn this.attributes.get(name) ?? null;\n\t}\n\n\tgetAttributeNames(): string[] {\n\t\treturn Array.from(this.attributes.keys());\n\t}\n\n\tsetAttribute(name: string, value: unknown): void {\n\t\tthis.fragmentHtml = undefined;\n\t\tthis.attributes.set(name, String(value));\n\t}\n\n\tremoveAttribute(name: string): void {\n\t\tthis.fragmentHtml = undefined;\n\t\tthis.attributes.delete(name);\n\t}\n\n\tquerySelector(): Element | null {\n\t\treturn null;\n\t}\n\n\tquerySelectorAll(): Element[] {\n\t\treturn [];\n\t}\n\n\tmatches(): boolean {\n\t\treturn false;\n\t}\n\n\tget outerHTML(): string {\n\t\tif (this.fragmentHtml !== undefined) {\n\t\t\treturn this.fragmentHtml;\n\t\t}\n\n\t\tconst attributes = Array.from(this.attributes.entries())\n\t\t\t.map(([name, value]) => ` ${name}=\"${escapeHtmlAttribute(value)}\"`)\n\t\t\t.join('');\n\n\t\treturn `<${this.localName}${attributes}>${this.innerHTML}</${this.localName}>`;\n\t}\n\n\tget innerHTML(): string {\n\t\treturn this.childNodes.map((child) => serializeNodeHtml(child)).join('');\n\t}\n\n\tset innerHTML(html: string) {\n\t\tthis.fragmentHtml = undefined;\n\t\tthis.fragmentText = undefined;\n\t\tthis.replaceChildren(...parseHtmlToNodes(html));\n\t}\n\n\toverride get textContent(): string {\n\t\treturn this.fragmentText ?? super.textContent ?? '';\n\t}\n\n\toverride set textContent(value: string | null) {\n\t\tthis.fragmentHtml = undefined;\n\t\tthis.fragmentText = value ?? '';\n\t\tsuper.textContent = value;\n\t}\n\n\tsetSerializedFragment(fragmentHtml: string, fragmentText: string, attributes: Record<string, string>): void {\n\t\tthis.fragmentHtml = fragmentHtml;\n\t\tthis.fragmentText = fragmentText;\n\t\tthis.attributes = new Map(Object.entries(attributes));\n\t\tthis.replaceChildren();\n\t}\n}\n\nclass MinimalEvent {\n\tpublic readonly bubbles: boolean;\n\tpublic readonly cancelable: boolean;\n\tpublic readonly composed: boolean;\n\tpublic readonly type: string;\n\n\tconstructor(type: string, eventInitDict: EventInit = {}) {\n\t\tthis.type = type;\n\t\tthis.bubbles = eventInitDict.bubbles ?? false;\n\t\tthis.cancelable = eventInitDict.cancelable ?? false;\n\t\tthis.composed = eventInitDict.composed ?? false;\n\t}\n}\n\nclass MinimalCustomEvent<T = unknown> extends MinimalEvent {\n\tpublic readonly detail: T;\n\n\tconstructor(type: string, eventInitDict: CustomEventInit<T> = {}) {\n\t\tsuper(type, eventInitDict);\n\t\tthis.detail = eventInitDict.detail as T;\n\t}\n}\n\nclass MinimalHTMLElement extends MinimalElement {\n\tpublic isConnected = false;\n\n\tconstructor(tagName = 'div') {\n\t\tsuper(tagName);\n\t}\n\n\tinsertAdjacentHTML(_position: InsertPosition, html: string): void {\n\t\tthis.append(...parseHtmlToNodes(html));\n\t}\n\n\tconnectedCallback?(): void;\n\tattributeChangedCallback?(name: string, oldValue: string | null, newValue: string | null): void;\n\tdisconnectedCallback?(): void;\n}\n\nclass MinimalHtmlScriptElement extends MinimalHTMLElement {\n\tconstructor() {\n\t\tsuper('script');\n\t}\n}\n\nclass MinimalCustomElementsRegistry implements MinimalCustomElementRegistry {\n\tprivate definitions = new Map<string, CustomElementConstructor>();\n\n\tdefine(name: string, constructor: CustomElementConstructor): void {\n\t\tif (this.definitions.has(name)) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.definitions.set(name, constructor);\n\t}\n\n\tget(name: string): CustomElementConstructor | undefined {\n\t\treturn this.definitions.get(name);\n\t}\n}\n\nlet installedWindow: LightDomShimWindow | undefined;\n\nfunction createTextNode(value: string): Node {\n\treturn new MinimalTextNode(value) as unknown as Node;\n}\n\nfunction getExistingWindowLike(): LightDomShimWindow | undefined {\n\tconst globalScope = globalThis as typeof globalThis & {\n\t\tCustomEvent?: typeof CustomEvent;\n\t\tElement?: typeof Element;\n\t\tEvent?: typeof Event;\n\t\tEventTarget?: typeof EventTarget;\n\t\tHTMLScriptElement?: typeof HTMLScriptElement;\n\t\tHTMLElement?: typeof HTMLElement;\n\t\tNode?: typeof Node;\n\t\tcustomElements?: MinimalCustomElementRegistry;\n\t\twindow?: LightDomShimWindow;\n\t};\n\tconst existingCustomElements = globalScope.customElements;\n\n\tif (\n\t\ttypeof globalScope.Node === 'undefined' ||\n\t\ttypeof globalScope.Element === 'undefined' ||\n\t\ttypeof globalScope.HTMLElement === 'undefined' ||\n\t\t!existingCustomElements ||\n\t\ttypeof existingCustomElements.define !== 'function' ||\n\t\ttypeof existingCustomElements.get !== 'function'\n\t) {\n\t\treturn undefined;\n\t}\n\n\treturn (\n\t\tglobalScope.window ?? {\n\t\t\tCustomEvent: (globalScope.CustomEvent ?? MinimalCustomEvent) as typeof CustomEvent,\n\t\t\tElement: globalScope.Element,\n\t\t\tEvent: (globalScope.Event ?? MinimalEvent) as typeof Event,\n\t\t\tEventTarget: (globalScope.EventTarget ?? EventTarget) as typeof EventTarget,\n\t\t\tHTMLScriptElement: (globalScope.HTMLScriptElement ?? globalScope.HTMLElement) as typeof HTMLScriptElement,\n\t\t\tHTMLElement: globalScope.HTMLElement,\n\t\t\tNode: globalScope.Node,\n\t\t\tcustomElements: existingCustomElements,\n\t\t}\n\t);\n}\n\n/** Ensures that a minimal window-like SSR runtime is available and returns it. */\nexport function ensureLightDomShim(): LightDomShimWindow {\n\tconst existingWindow = getExistingWindowLike();\n\n\tif (existingWindow) {\n\t\treturn existingWindow;\n\t}\n\n\treturn installLightDomShim();\n}\n\n/**\n * Creates a reusable SSR environment that can prepare a component host with\n * authored light-DOM content before rendering.\n *\n * Adapters can reuse a single environment across multiple render calls when\n * they want a single host-preparation entrypoint backed by the installed shim.\n */\n\nexport function createServerRenderEnvironment(): ServerRenderEnvironment {\n\tensureLightDomShim();\n\n\treturn {\n\t\tprepareHost(host: HTMLElement, options: PrepareServerRenderHostOptions = {}): void {\n\t\t\tif (options.authoredContent !== undefined) {\n\t\t\t\thost.innerHTML = options.authoredContent;\n\t\t\t}\n\t\t},\n\t};\n}\n\n/**\n * Installs the smallest global surface needed to instantiate Radiant custom elements during SSR.\n */\nexport function installLightDomShim(): LightDomShimWindow {\n\tconst existingWindow = getExistingWindowLike();\n\n\tif (existingWindow) {\n\t\treturn existingWindow;\n\t}\n\n\tif (installedWindow) {\n\t\treturn installedWindow;\n\t}\n\n\tconst customElements = new MinimalCustomElementsRegistry();\n\tconst EventConstructor = (globalThis.Event ?? MinimalEvent) as typeof Event;\n\tconst CustomEventConstructor = (globalThis.CustomEvent ?? MinimalCustomEvent) as typeof CustomEvent;\n\tconst EventTargetConstructor = (globalThis.EventTarget ?? EventTarget) as typeof EventTarget;\n\tinstalledWindow = {\n\t\tCustomEvent: CustomEventConstructor,\n\t\tElement: MinimalElement as unknown as typeof Element,\n\t\tEvent: EventConstructor,\n\t\tEventTarget: EventTargetConstructor,\n\t\tHTMLScriptElement: MinimalHtmlScriptElement as unknown as typeof HTMLScriptElement,\n\t\tHTMLElement: MinimalHTMLElement as unknown as typeof HTMLElement,\n\t\tNode: MinimalNode as unknown as typeof Node,\n\t\tcustomElements,\n\t};\n\n\tObject.assign(globalThis, {\n\t\tCustomEvent: CustomEventConstructor,\n\t\tElement: MinimalElement,\n\t\tEvent: EventConstructor,\n\t\tEventTarget: EventTargetConstructor,\n\t\tHTMLScriptElement: MinimalHtmlScriptElement,\n\t\tHTMLElement: MinimalHTMLElement,\n\t\tNode: MinimalNode,\n\t\tcustomElements,\n\t\twindow: installedWindow,\n\t});\n\n\treturn installedWindow;\n}\n\nfunction createElementFromFragment(fragment: string, tag: ParsedHtmlTag): Node {\n\tconst element =\n\t\ttag.tagName === 'script'\n\t\t\t? (new MinimalHtmlScriptElement() as MinimalElement)\n\t\t\t: new MinimalHTMLElement(tag.tagName);\n\n\telement.setSerializedFragment(fragment, extractTextContent(tag.innerHtml), tag.attributes);\n\treturn element as unknown as Node;\n}\n\nfunction escapeHtmlAttribute(value: string): string {\n\treturn value.replace(/&/g, '&amp;').replace(/\"/g, '&quot;').replace(/</g, '&lt;').replace(/>/g, '&gt;');\n}\n\nfunction extractTextContent(html: string): string {\n\treturn html.replace(/<!--.*?-->/gs, '').replace(/<[^>]+>/g, '');\n}\n\nfunction parseHtmlToNodes(html: string): Node[] {\n\treturn collectTopLevelHtmlFragments(html).map((fragment) => {\n\t\tif (!fragment.startsWith('<')) {\n\t\t\treturn createTextNode(fragment);\n\t\t}\n\n\t\tconst tag = parseHtmlTagToken(fragment, 0);\n\n\t\tif (!tag || tag.type !== 'open') {\n\t\t\treturn createTextNode(fragment);\n\t\t}\n\n\t\treturn createElementFromFragment(fragment, tag);\n\t});\n}\n\nfunction serializeNodeHtml(node: Node): string {\n\tif (node.nodeType === MinimalNode.TEXT_NODE) {\n\t\treturn node.textContent ?? '';\n\t}\n\n\treturn 'outerHTML' in node && typeof node.outerHTML === 'string' ? node.outerHTML : (node.textContent ?? '');\n}\n"
6
- ],
7
- "mappings": "+CA8CA,MAAM,UAAoB,WAAY,CAOT,eANZ,cAAe,QACf,WAAY,EAErB,WAAqB,CAAC,EACtB,WAAuC,KAE9C,WAAW,CAAiB,EAAkB,CAC7C,MAAM,EADqB,gBAI5B,MAAM,IAAI,EAAmC,CAC5C,QAAW,KAAQ,EAClB,KAAK,YAAY,OAAO,IAAS,SAAW,EAAe,CAAI,EAAI,CAAI,EAIzE,WAA+B,CAAC,EAAoB,CACnD,GAAI,eAAgB,GAAQ,EAAK,YAAc,gBAAiB,EAAK,WACnE,EAAK,WAAwD,YAAY,CAAI,EAK/E,OAFA,KAAK,WAAW,KAAK,CAAI,EACxB,EAAyD,WAAa,KAChE,EAGR,WAA+B,CAAC,EAAoB,CACnD,IAAM,EAAY,KAAK,WAAW,QAAQ,CAAI,EAE9C,GAAI,IAAc,GACjB,OAAO,EAKR,OAFA,KAAK,WAAW,OAAO,EAAW,CAAC,EAClC,EAAyD,WAAa,KAChE,EAGR,eAAe,IAAI,EAAmC,CACrD,QAAW,KAAS,KAAK,WACvB,EAA0D,WAAa,KAGzE,KAAK,WAAa,CAAC,EACnB,KAAK,OAAO,GAAG,CAAK,KAGjB,YAAW,EAAkB,CAChC,OAAO,KAAK,WAAW,IAAI,CAAC,IAAU,EAAM,aAAe,EAAE,EAAE,KAAK,EAAE,KAGnE,YAAW,CAAC,EAAsB,CACrC,KAAK,gBAAgB,GAAS,EAAE,EAElC,CAEA,MAAM,UAAwB,CAAY,CACrB,MAApB,WAAW,CAAS,EAAe,CAClC,MAAM,EAAY,SAAS,EADR,gBAIP,YAAW,EAAW,CAClC,OAAO,KAAK,SAGA,YAAW,CAAC,EAAsB,CAC9C,KAAK,MAAQ,GAAS,GAExB,CAEA,MAAM,UAAuB,CAAY,CAChC,WAAa,IAAI,IACjB,aACA,a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AAE,QAAQ,KAAM,MAAM,EAGvG,SAAS,CAAkB,CAAC,EAAsB,CACjD,OAAO,EAAK,QAAQ,eAAgB,EAAE,EAAE,QAAQ,WAAY,EAAE,EAG/D,SAAS,CAAgB,CAAC,EAAsB,CAC/C,OAAO,EAA6B,CAAI,EAAE,IAAI,CAAC,IAAa,CAC3D,GAAI,CAAC,EAAS,WAAW,GAAG,EAC3B,OAAO,EAAe,CAAQ,EAG/B,IAAM,EAAM,EAAkB,EAAU,CAAC,EAEzC,GAAI,CAAC,GAAO,EAAI,OAAS,OACxB,OAAO,EAAe,CAAQ,EAG/B,OAAO,EAA0B,EAAU,CAAG,EAC9C,EAGF,SAAS,CAAiB,CAAC,EAAoB,CAC9C,GAAI,EAAK,WAAa,EAAY,UACjC,OAAO,EAAK,aAAe,GAG5B,MAAO,cAAe,GAAQ,OAAO,EAAK,YAAc,SAAW,EAAK,UAAa,EAAK,aAAe",
8
- "debugId": "C9C0B7F6FE7C768764756E2164756E21",
9
- "names": []
10
- }
@@ -1,4 +0,0 @@
1
- import{_a as D}from"./chunk-t8xtvgyg.js";import{Db as P}from"./chunk-vgtggzb6.js";var y;function G(){if(y!==void 0)return y;try{let{AsyncLocalStorage:b}=(()=>{throw new Error("Cannot require module "+"node:async_hooks");})();return y=new b,y}catch{return y=null,null}}var z=Symbol.for("@ecopages/radiant.ssr-context-fallback-stack");function H(){let b=globalThis;return b[z]??=[],b[z]}function U(b){if(b.length===0)return()=>{return};let j=new Map;for(let u of b)j.set(u.getContextKey(),u);let q=G();if(q){let u=q.getStore()??[],J=[...u,j];return q.enterWith(J),()=>{q.enterWith(u)}}let w=H();return w.push(j),()=>{let u=w.lastIndexOf(j);if(u>=0)w.splice(u,1)}}function I(b){let j=G()?.getStore()??H();for(let q=j.length-1;q>=0;q-=1){let w=j[q]?.get(b);if(w)return w}return}function V(b){let j=I(b);if(!j)return;return j.getContext()}D((b)=>I(b));
2
- export{U as h,I as i,V as j};
3
-
4
- //# debugId=A236058E840B355764756E2164756E21
@@ -1,10 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../src/server/context-ssr.ts"],
4
- "sourcesContent": [
5
- "import type { AsyncLocalStorage } from 'node:async_hooks';\nimport type { SsrSerializableContextProvider } from '../context/context-provider';\nimport { installSsrContextProviderResolver } from '../context/context-ssr-bridge';\nimport type { ContextType, UnknownContext } from '../context/types';\n\ntype ProviderFrame = Map<UnknownContext, SsrSerializableContextProvider>;\ntype ProviderStack = ProviderFrame[];\n\nlet resolvedAsyncLocalStorage: AsyncLocalStorage<ProviderStack> | null | undefined;\n\n/**\n * Lazily resolves `AsyncLocalStorage` from `node:async_hooks`.\n *\n * The dynamic `require` is necessary because browser-based SSR tests import\n * this server-oriented module directly. A top-level static import would break\n * those browser bundles even though normal application SSR runs on the server.\n *\n * On the server (Node.js, Bun, Cloudflare Workers) the import always succeeds.\n * In browser test environments where SSR rendering is exercised without a real\n * server, the fallback global stack is used instead.\n */\nfunction getAsyncLocalStorage(): AsyncLocalStorage<ProviderStack> | null {\n\tif (resolvedAsyncLocalStorage !== undefined) {\n\t\treturn resolvedAsyncLocalStorage;\n\t}\n\n\ttry {\n\t\tconst { AsyncLocalStorage: ALS } = require('node:async_hooks') as typeof import('node:async_hooks');\n\t\tresolvedAsyncLocalStorage = new ALS<ProviderStack>();\n\t\treturn resolvedAsyncLocalStorage;\n\t} catch {\n\t\tresolvedAsyncLocalStorage = null;\n\t\treturn null;\n\t}\n}\n\nconst SSR_CONTEXT_FALLBACK_STACK_SYMBOL = Symbol.for('@ecopages/radiant.ssr-context-fallback-stack');\n\nfunction getFallbackStack(): ProviderStack {\n\tconst g = globalThis as typeof globalThis & { [SSR_CONTEXT_FALLBACK_STACK_SYMBOL]?: ProviderStack };\n\tg[SSR_CONTEXT_FALLBACK_STACK_SYMBOL] ??= [];\n\treturn g[SSR_CONTEXT_FALLBACK_STACK_SYMBOL];\n}\n\n/**\n * Pushes a temporary provider frame onto the SSR context stack.\n *\n * On the server, each call creates an isolated `AsyncLocalStorage` context so\n * concurrent renders cannot corrupt each other.\n *\n * In browser test environments where `AsyncLocalStorage` is unavailable, a\n * synchronous global stack is used as a fallback.\n */\nexport function withSsrContextProviders(providers: readonly SsrSerializableContextProvider[]): () => void {\n\tif (providers.length === 0) {\n\t\treturn () => undefined;\n\t}\n\n\tconst frame = new Map<UnknownContext, SsrSerializableContextProvider>();\n\n\tfor (const provider of providers) {\n\t\tframe.set(provider.getContextKey(), provider);\n\t}\n\n\tconst als = getAsyncLocalStorage();\n\n\tif (als) {\n\t\tconst parentStack = als.getStore() ?? [];\n\t\tconst childStack = [...parentStack, frame];\n\t\tals.enterWith(childStack);\n\n\t\treturn () => {\n\t\t\tals.enterWith(parentStack);\n\t\t};\n\t}\n\n\tconst stack = getFallbackStack();\n\tstack.push(frame);\n\n\treturn () => {\n\t\tconst index = stack.lastIndexOf(frame);\n\t\tif (index >= 0) stack.splice(index, 1);\n\t};\n}\n\n/**\n * Resolves the nearest SSR-visible provider for a given context token.\n *\n * Lookup walks the provider frames from innermost to outermost so nested host\n * serialization behaves the same way as runtime context resolution in the DOM.\n */\nexport function resolveSsrContextProvider<T extends UnknownContext>(\n\tcontext: T,\n): SsrSerializableContextProvider | undefined {\n\tconst store = getAsyncLocalStorage()?.getStore() ?? getFallbackStack();\n\n\tfor (let index = store.length - 1; index >= 0; index -= 1) {\n\t\tconst provider = store[index]?.get(context);\n\n\t\tif (provider) {\n\t\t\treturn provider;\n\t\t}\n\t}\n\n\treturn undefined;\n}\n\n/**\n * Resolves the current SSR-visible value for a given context token.\n *\n * This is the ergonomic helper consumed by SSR-aware decorators and component\n * render paths when they only need the context payload instead of the full\n * provider instance.\n */\nexport function resolveSsrContextValue<T extends UnknownContext>(context: T): ContextType<T> | undefined {\n\tconst provider = resolveSsrContextProvider(context);\n\n\tif (!provider) {\n\t\treturn undefined;\n\t}\n\n\treturn provider.getContext() as ContextType<T>;\n}\n\ninstallSsrContextProviderResolver((context) => resolveSsrContextProvider(context));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058E840B355764756E2164756E21",
9
- "names": []
10
- }
@@ -1,4 +0,0 @@
1
- var f=Symbol.for("@ecopages/radiant.ssr-context-provider-resolver");function h(){return globalThis}function i(d){h()[f]=d}function j(d){return h()[f]?.(d)}
2
- export{i as _a,j as $a};
3
-
4
- //# debugId=D0388EE001F5A0F564756E2164756E21
@@ -1,10 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../src/context/context-ssr-bridge.ts"],
4
- "sourcesContent": [
5
- "import type { SsrSerializableContextProvider } from './context-provider';\nimport type { UnknownContext } from './types';\n\ntype SsrContextProviderResolver = (context: UnknownContext) => SsrSerializableContextProvider | undefined;\n\nconst SSR_CONTEXT_PROVIDER_RESOLVER_SYMBOL = Symbol.for('@ecopages/radiant.ssr-context-provider-resolver');\n\ntype GlobalResolverScope = typeof globalThis & {\n\t[SSR_CONTEXT_PROVIDER_RESOLVER_SYMBOL]?: SsrContextProviderResolver;\n};\n\nfunction getGlobalResolverScope(): GlobalResolverScope {\n\treturn globalThis as GlobalResolverScope;\n}\n\n/**\n * Installs the ambient SSR provider resolver used by shared context runtime helpers.\n *\n * Server-side rendering infrastructure owns the actual provider stack storage and\n * publishes a lookup function here so client/runtime code does not need to import\n * server-oriented modules.\n */\nexport function installSsrContextProviderResolver(resolver: SsrContextProviderResolver): void {\n\tgetGlobalResolverScope()[SSR_CONTEXT_PROVIDER_RESOLVER_SYMBOL] = resolver;\n}\n\n/**\n * Resolves an ambient SSR provider when a server render has published one.\n */\nexport function resolveAmbientSsrContextProvider(context: UnknownContext): SsrSerializableContextProvider | undefined {\n\treturn getGlobalResolverScope()[SSR_CONTEXT_PROVIDER_RESOLVER_SYMBOL]?.(context);\n}\n"
6
- ],
7
- "mappings": "AAKA,IAAM,EAAuC,OAAO,IAAI,iDAAiD,EAMzG,SAAS,CAAsB,EAAwB,CACtD,OAAO,WAUD,SAAS,CAAiC,CAAC,EAA4C,CAC7F,EAAuB,EAAE,GAAwC,EAM3D,SAAS,CAAgC,CAAC,EAAqE,CACrH,OAAO,EAAuB,EAAE,KAAwC,CAAO",
8
- "debugId": "D0388EE001F5A0F564756E2164756E21",
9
- "names": []
10
- }
@@ -1,4 +0,0 @@
1
- import{Cb as b}from"./chunk-hrjc8b1y.js";function u(j){return function(k,m){m.addInitializer(function(){b(this,j,k.bind(this))})}}
2
- export{u as ua};
3
-
4
- //# debugId=E070803058AE2FAA64756E2164756E21
@@ -1,10 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../src/decorators/standard/on-event.ts"],
4
- "sourcesContent": [
5
- "import type { RadiantElement } from '../../core/radiant-element';\nimport { createEventListener } from '../../helpers/create-event-listener';\nimport type { OnEventConfig } from '../on-event';\nimport type { Method } from '../../types';\n\n/**\n * A decorator to subscribe to an event on the target element.\n * The event listener will be automatically unsubscribed when the element is disconnected.\n *\n * Note: This decorator uses event delegation, which means it relies on event bubbling.\n * Therefore, it will not work with events that do not bubble, such as `focus`, `blur`, `load`, `unload`, `scroll`, etc.\n * For focus and blur events, consider using `focusin` and `focusout` which are similar but do bubble.\n *\n * @param eventConfig The event configuration.\n * @param eventConfig.selectors The CSS selector(s) of the target element(s).\n * @param eventConfig.ref The data-ref attribute of the target element.\n * @param eventConfig.type The type of the event to listen for.\n * @param eventConfig.options Optional. An options object that specifies characteristics about the event listener.\n */\nexport function onEvent(eventConfig: OnEventConfig) {\n\treturn function <T extends Method>(originalMethod: T, context: ClassMethodDecoratorContext): void {\n\t\tcontext.addInitializer(function (this: any) {\n\t\t\tcreateEventListener(this as RadiantElement, eventConfig, originalMethod.bind(this));\n\t\t});\n\t};\n}\n"
6
- ],
7
- "mappings": "yCAmBO,SAAS,CAAO,CAAC,EAA4B,CACnD,OAAO,QAA2B,CAAC,EAAmB,EAA4C,CACjG,EAAQ,eAAe,QAAS,EAAY,CAC3C,EAAoB,KAAwB,EAAa,EAAe,KAAK,IAAI,CAAC,EAClF",
8
- "debugId": "E070803058AE2FAA64756E2164756E21",
9
- "names": []
10
- }
@@ -1,4 +0,0 @@
1
- import{Ab as t}from"./chunk-bk6qkvfp.js";function s(n={}){return function(l,e){let r=String(e.name);e.addInitializer(function(){let o=t(this,n);Object.defineProperty(this,r,{get(){return o.value},enumerable:!0,configurable:!0})})}}
2
- export{s as Aa};
3
-
4
- //# debugId=74F672DF73091F0B64756E2164756E21
@@ -1,10 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../src/decorators/standard/query-slot.ts"],
4
- "sourcesContent": [
5
- "import { createQuerySlot } from '../../helpers/create-query-slot';\nimport type { QuerySlotConfig } from '../query-slot';\n\ntype SlotQueryHost = HTMLElement & {\n\tgetSlotElement<T extends Element = Element>(name?: string): T | null;\n\tgetSlotElements<T extends Element = Element>(name?: string): T[];\n\tslotProjectionVersion?: number;\n};\n\nexport function querySlot(options: QuerySlotConfig = {}) {\n\treturn function <T extends SlotQueryHost, V extends Element | Element[]>(\n\t\t_: undefined,\n\t\tcontext: ClassFieldDecoratorContext<T, V>,\n\t) {\n\t\tconst propertyName = String(context.name);\n\n\t\tcontext.addInitializer(function (this: T) {\n\t\t\tconst accessor = createQuerySlot<V>(this, options);\n\n\t\t\tObject.defineProperty(this, propertyName, {\n\t\t\t\tget() {\n\t\t\t\t\treturn accessor.value;\n\t\t\t\t},\n\t\t\t\tenumerable: true,\n\t\t\t\tconfigurable: true,\n\t\t\t});\n\t\t});\n\t};\n}\n"
6
- ],
7
- "mappings": "yCASO,SAAS,CAAS,CAAC,EAA2B,CAAC,EAAG,CACxD,OAAO,QAAiE,CACvE,EACA,EACC,CACD,IAAM,EAAe,OAAO,EAAQ,IAAI,EAExC,EAAQ,eAAe,QAAS,EAAU,CACzC,IAAM,EAAW,EAAmB,KAAM,CAAO,EAEjD,OAAO,eAAe,KAAM,EAAc,CACzC,GAAG,EAAG,CACL,OAAO,EAAS,OAEjB,WAAY,GACZ,aAAc,EACf,CAAC,EACD",
8
- "debugId": "74F672DF73091F0B64756E2164756E21",
9
- "names": []
10
- }
@@ -1,4 +0,0 @@
1
- var d=((a)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(a,{get:(b,c)=>(typeof require<"u"?require:b)[c]}):a)(function(a){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+a+'" is not supported')});
2
- export{d as Db};
3
-
4
- //# debugId=D915F4578C1B7CB964756E2164756E21
@@ -1,9 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": [],
4
- "sourcesContent": [
5
- ],
6
- "mappings": "",
7
- "debugId": "D915F4578C1B7CB964756E2164756E21",
8
- "names": []
9
- }
@@ -1,4 +0,0 @@
1
- import{Ea as B,Ga as C}from"./chunk-nnnb6pac.js";function K(f={}){return function(G,D){let q=String(D.name);return function(w){let A=typeof f.source==="function"?f.source(this):f.source??(B(w)?w:void 0),E=A!==void 0?f.initial:w===void 0?f.initial:w,F=f.bind??this.shouldAutoBindReactiveMembers?.()??!1;this.defineReactiveBinding(q,F);let j=C({host:this,hydrate:f.hydrate,hydrationKey:q,initialValue:E,property:q,source:A});if(this.registerConnectedCallback(()=>{j.hydrateFromHost(),j.connectToSource()}),this.registerCleanupCallback(()=>{j.disconnectFromSource()}),f.hydrate)this.registerHydrationBinding(q,j);return j}}}
2
- export{K as ca};
3
-
4
- //# debugId=AF6404250CA79F2F64756E2164756E21
@@ -1,10 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../src/decorators/standard/signal.ts"],
4
- "sourcesContent": [
5
- "import type { WritableSignal } from '@ecopages/signals';\nimport type { RadiantElement, ReactiveBindingOption } from '../../core/radiant-element';\nimport { createHostSignal, isWritableSignalLike } from '../../signals/host-signal';\nimport type { AttributeTypeConstant } from '../../utils/attribute-utils';\n\n/** Options for the `@signal` decorator. */\nexport type SignalDecoratorOptions<Value = unknown> = {\n\t/**\n\t * Exposes a JSX binding companion for the decorated signal.\n\t *\n\t * - `true` creates a `$propertyName` accessor.\n\t * - a string creates a custom accessor with that name.\n\t * - `undefined` defers to the host default.\n\t */\n\tbind?: ReactiveBindingOption;\n\n\t/**\n\t * Optional initial value used when the field does not provide one directly.\n\t *\n\t * This is primarily useful with `declare field: WritableSignal<T>` syntax,\n\t * which keeps the component surface clean while still letting the decorator\n\t * own signal construction.\n\t */\n\tinitial?: Value;\n\n\t/**\n\t * Connects an existing writable signal to the host instead of creating a\n\t * host-owned one.\n\t */\n\tsource?: WritableSignal<Value> | ((host: RadiantElement) => WritableSignal<Value>);\n\n\t/**\n\t * Serializes the current signal value into a keyed hydration script during\n\t * SSR and restores it on the client.\n\t */\n\thydrate?: AttributeTypeConstant;\n};\n\nexport function signal<Value = unknown>(options: SignalDecoratorOptions<Value> = {}) {\n\treturn function <T extends RadiantElement, Value>(_: undefined, context: ClassFieldDecoratorContext<T, unknown>) {\n\t\tconst propertyName = String(context.name);\n\n\t\treturn function (this: T, initialValue: Value) {\n\t\t\tconst resolvedSource =\n\t\t\t\ttypeof options.source === 'function'\n\t\t\t\t\t? options.source(this)\n\t\t\t\t\t: (options.source ?? (isWritableSignalLike<Value>(initialValue) ? initialValue : undefined));\n\t\t\tconst resolvedInitialValue =\n\t\t\t\tresolvedSource !== undefined\n\t\t\t\t\t? options.initial\n\t\t\t\t\t: ((initialValue === undefined ? options.initial : initialValue) as Value);\n\t\t\tconst bind =\n\t\t\t\toptions.bind ??\n\t\t\t\t(\n\t\t\t\t\tthis as unknown as { shouldAutoBindReactiveMembers?: () => boolean }\n\t\t\t\t).shouldAutoBindReactiveMembers?.() ??\n\t\t\t\tfalse;\n\n\t\t\tthis.defineReactiveBinding(propertyName, bind);\n\n\t\t\tconst hostSignal = createHostSignal({\n\t\t\t\thost: this,\n\t\t\t\thydrate: options.hydrate,\n\t\t\t\thydrationKey: propertyName,\n\t\t\t\tinitialValue: resolvedInitialValue,\n\t\t\t\tproperty: propertyName,\n\t\t\t\tsource: resolvedSource,\n\t\t\t});\n\n\t\t\tthis.registerConnectedCallback(() => {\n\t\t\t\thostSignal.hydrateFromHost();\n\t\t\t\thostSignal.connectToSource();\n\t\t\t});\n\t\t\tthis.registerCleanupCallback(() => {\n\t\t\t\thostSignal.disconnectFromSource();\n\t\t\t});\n\n\t\t\tif (options.hydrate) {\n\t\t\t\tthis.registerHydrationBinding(propertyName, hostSignal);\n\t\t\t}\n\n\t\t\treturn hostSignal as unknown as WritableSignal<Value>;\n\t\t};\n\t};\n}\n"
6
- ],
7
- "mappings": "iDAsCO,SAAS,CAAuB,CAAC,EAAyC,CAAC,EAAG,CACpF,OAAO,QAA0C,CAAC,EAAc,EAAiD,CAChH,IAAM,EAAe,OAAO,EAAQ,IAAI,EAExC,OAAO,QAAS,CAAU,EAAqB,CAC9C,IAAM,EACL,OAAO,EAAQ,SAAW,WACvB,EAAQ,OAAO,IAAI,EAClB,EAAQ,SAAW,EAA4B,CAAY,EAAI,EAAe,QAC7E,EACL,IAAmB,OAChB,EAAQ,QACN,IAAiB,OAAY,EAAQ,QAAU,EAC/C,EACL,EAAQ,MAEP,KACC,gCAAgC,GAClC,GAED,KAAK,sBAAsB,EAAc,CAAI,EAE7C,IAAM,EAAa,EAAiB,CACnC,KAAM,KACN,QAAS,EAAQ,QACjB,aAAc,EACd,aAAc,EACd,SAAU,EACV,OAAQ,CACT,CAAC,EAUD,GARA,KAAK,0BAA0B,IAAM,CACpC,EAAW,gBAAgB,EAC3B,EAAW,gBAAgB,EAC3B,EACD,KAAK,wBAAwB,IAAM,CAClC,EAAW,qBAAqB,EAChC,EAEG,EAAQ,QACX,KAAK,yBAAyB,EAAc,CAAU,EAGvD,OAAO",
8
- "debugId": "AF6404250CA79F2F64756E2164756E21",
9
- "names": []
10
- }
@@ -1,4 +0,0 @@
1
- import{xb as q}from"./chunk-rrg759ht.js";function G(z){return function(B,j){j.addInitializer(function(){let A=q(this,z);Object.defineProperty(this,j.name,{get(){return A},enumerable:!0,configurable:!0})})}}
2
- export{G as fa};
3
-
4
- //# debugId=3312BA759871518064756E2164756E21
@@ -1,10 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../src/decorators/standard/event.ts"],
4
- "sourcesContent": [
5
- "import type { RadiantElement } from '../../core/radiant-element';\nimport { createEvent } from '../../helpers/create-event';\nimport type { EventEmitterConfig } from '../../tools/event-emitter';\n\n/**\n * Decorator that attaches an EventEmitter to the class field property.\n * The EventEmitter can be used to dispatch custom events from the target element.\n * @param eventConfig Configuration for the event emitter.\n * @see {@link EventEmitter} for more details about how the EventEmitter works.\n */\nexport function event(eventConfig: EventEmitterConfig) {\n\treturn function <T extends RadiantElement, V>(_: undefined, context: ClassFieldDecoratorContext<T, V>) {\n\t\tcontext.addInitializer(function (this: T) {\n\t\t\tconst emitter = createEvent(this, eventConfig);\n\n\t\t\tObject.defineProperty(this, context.name, {\n\t\t\t\tget() {\n\t\t\t\t\treturn emitter;\n\t\t\t\t},\n\t\t\t\tenumerable: true,\n\t\t\t\tconfigurable: true,\n\t\t\t});\n\t\t});\n\t};\n}\n"
6
- ],
7
- "mappings": "yCAUO,SAAS,CAAK,CAAC,EAAiC,CACtD,OAAO,QAAsC,CAAC,EAAc,EAA2C,CACtG,EAAQ,eAAe,QAAS,EAAU,CACzC,IAAM,EAAU,EAAY,KAAM,CAAW,EAE7C,OAAO,eAAe,KAAM,EAAQ,KAAM,CACzC,GAAG,EAAG,CACL,OAAO,GAER,WAAY,GACZ,aAAc,EACf,CAAC,EACD",
8
- "debugId": "3312BA759871518064756E2164756E21",
9
- "names": []
10
- }
@@ -1,4 +0,0 @@
1
- function J(G,H){let q=null,j=null,z,D=()=>{if(q!==null)clearTimeout(q),q=null},F=()=>{if(j===null)return z;let E=j;return j=null,D(),z=E(),z},B=function(...E){j=()=>G.apply(this,E),D(),q=setTimeout(()=>{F()},H)};return B.cancel=()=>{D(),j=null},B.flush=()=>{if(j===null)return z;return F()},B.pending=()=>j!==null,B}
2
- export{J as zb};
3
-
4
- //# debugId=767008292B1F12AB64756E2164756E21
@@ -1,10 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../src/helpers/debounce.ts"],
4
- "sourcesContent": [
5
- "import type { Method } from '../types';\n\n/**\n * A debounced function with imperative helpers for controlling pending work.\n *\n * @typeParam T The wrapped callback type.\n */\nexport interface DebouncedFunction<T extends Method> {\n\t(...args: Parameters<T>): void;\n\n\t/**\n\t * Cancels the pending callback invocation, if one exists.\n\t */\n\tcancel(): void;\n\n\t/**\n\t * Immediately invokes the latest pending callback invocation.\n\t *\n\t * @returns The callback result when a call is pending, or the last completed\n\t * result when no call is pending.\n\t */\n\tflush(): ReturnType<T> | undefined;\n\n\t/**\n\t * Reports whether the callback currently has a scheduled invocation.\n\t *\n\t * @returns True when a call is pending.\n\t */\n\tpending(): boolean;\n}\n\n/**\n * Creates a debounced wrapper around a function.\n *\n * The returned function delays invocation until the configured timeout has\n * elapsed since the latest call. It also exposes helpers to cancel, flush,\n * and inspect pending work.\n *\n * @typeParam T The wrapped callback type.\n * @param callback The callback to debounce.\n * @param timeout The debounce timeout in milliseconds.\n * @returns A debounced wrapper around the callback.\n */\nexport function debounce<T extends Method>(callback: T, timeout: number): DebouncedFunction<T> {\n\tlet timeoutRef: ReturnType<typeof setTimeout> | null = null;\n\tlet pendingInvocation: (() => ReturnType<T>) | null = null;\n\tlet lastResult: ReturnType<T> | undefined;\n\n\tconst clearPendingCall = () => {\n\t\tif (timeoutRef !== null) {\n\t\t\tclearTimeout(timeoutRef);\n\t\t\ttimeoutRef = null;\n\t\t}\n\t};\n\n\tconst invoke = (): ReturnType<T> | undefined => {\n\t\tif (pendingInvocation === null) {\n\t\t\treturn lastResult;\n\t\t}\n\n\t\tconst invocation = pendingInvocation;\n\t\tpendingInvocation = null;\n\t\tclearPendingCall();\n\t\tlastResult = invocation();\n\n\t\treturn lastResult;\n\t};\n\n\tconst debounced = function (this: ThisParameterType<T>, ...args: Parameters<T>) {\n\t\tpendingInvocation = () => callback.apply(this, args) as ReturnType<T>;\n\t\tclearPendingCall();\n\t\ttimeoutRef = setTimeout(() => {\n\t\t\tinvoke();\n\t\t}, timeout);\n\t} as DebouncedFunction<T>;\n\n\tdebounced.cancel = () => {\n\t\tclearPendingCall();\n\t\tpendingInvocation = null;\n\t};\n\n\tdebounced.flush = () => {\n\t\tif (pendingInvocation === null) {\n\t\t\treturn lastResult;\n\t\t}\n\n\t\treturn invoke();\n\t};\n\n\tdebounced.pending = () => pendingInvocation !== null;\n\n\treturn debounced;\n}\n"
6
- ],
7
- "mappings": "AA2CO,SAAS,CAA0B,CAAC,EAAa,EAAuC,CAC9F,IAAI,EAAmD,KACnD,EAAkD,KAClD,EAEE,EAAmB,IAAM,CAC9B,GAAI,IAAe,KAClB,aAAa,CAAU,EACvB,EAAa,MAIT,EAAS,IAAiC,CAC/C,GAAI,IAAsB,KACzB,OAAO,EAGR,IAAM,EAAa,EAKnB,OAJA,EAAoB,KACpB,EAAiB,EACjB,EAAa,EAAW,EAEjB,GAGF,EAAY,QAAS,IAAgC,EAAqB,CAC/E,EAAoB,IAAM,EAAS,MAAM,KAAM,CAAI,EACnD,EAAiB,EACjB,EAAa,WAAW,IAAM,CAC7B,EAAO,GACL,CAAO,GAkBX,OAfA,EAAU,OAAS,IAAM,CACxB,EAAiB,EACjB,EAAoB,MAGrB,EAAU,MAAQ,IAAM,CACvB,GAAI,IAAsB,KACzB,OAAO,EAGR,OAAO,EAAO,GAGf,EAAU,QAAU,IAAM,IAAsB,KAEzC",
8
- "debugId": "767008292B1F12AB64756E2164756E21",
9
- "names": []
10
- }
@@ -1,4 +0,0 @@
1
- import{w}from"./chunk-r33zvvda.js";import{y as z}from"./chunk-5qeaq3tj.js";import{Oa as q}from"./chunk-q9z6tnzw.js";function J(j){return function(E,F){return q(z(j),w(j),E,F)}}
2
- export{J as v};
3
-
4
- //# debugId=F8A7AE6E3132067864756E2164756E21