@ecopages/radiant 0.3.0-beta.0 → 0.3.0-beta.1

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 (578) hide show
  1. package/README.md +5 -5
  2. package/client/app-bootstrap.js +3 -0
  3. package/{dist/client → client}/app-bootstrap.js.map +2 -2
  4. package/client/hydrator.js +3 -0
  5. package/{dist/client → client}/hydrator.js.map +2 -2
  6. package/client/install-hydrator.js +3 -0
  7. package/{dist/client → client}/install-hydrator.js.map +2 -2
  8. package/context/context-consumer-bootstrap.js +3 -0
  9. package/{dist/context → context}/context-consumer-bootstrap.js.map +4 -4
  10. package/context/context-consumer-runtime.js +3 -0
  11. package/context/context-consumer-runtime.js.map +12 -0
  12. package/context/context-host.js +3 -0
  13. package/{dist/context → context}/context-host.js.map +2 -2
  14. package/context/context-provider.js +3 -0
  15. package/{dist/context → context}/context-provider.js.map +3 -3
  16. package/context/context-ssr-bridge.js +3 -0
  17. package/{dist/context → context}/context-ssr-bridge.js.map +2 -2
  18. package/context/create-context.js +3 -0
  19. package/{dist/context → context}/create-context.js.map +2 -2
  20. package/context/decorators/consume-context.js +3 -0
  21. package/{dist/context → context}/decorators/consume-context.js.map +5 -5
  22. package/context/decorators/context-selection-delivery.js +3 -0
  23. package/{dist/context → context}/decorators/context-selection-delivery.js.map +2 -2
  24. package/context/decorators/context-selector.js +3 -0
  25. package/{dist/context → context}/decorators/context-selector.js.map +6 -6
  26. package/context/decorators/legacy/consume-context.js +3 -0
  27. package/context/decorators/legacy/consume-context.js.map +16 -0
  28. package/context/decorators/legacy/context-selector-field.js +3 -0
  29. package/context/decorators/legacy/context-selector-field.js.map +17 -0
  30. package/context/decorators/legacy/context-selector.js +3 -0
  31. package/context/decorators/legacy/context-selector.js.map +17 -0
  32. package/context/decorators/legacy/provide-context.js +3 -0
  33. package/{dist/context → context}/decorators/legacy/provide-context.js.map +4 -4
  34. package/context/decorators/on-context-update.js +3 -0
  35. package/{dist/context → context}/decorators/on-context-update.js.map +5 -5
  36. package/context/decorators/provide-context.js +3 -0
  37. package/{dist/context → context}/decorators/provide-context.js.map +4 -4
  38. package/context/decorators/standard/consume-context.js +3 -0
  39. package/{dist/context → context}/decorators/standard/consume-context.js.map +4 -4
  40. package/context/decorators/standard/context-selector-field.js +3 -0
  41. package/{dist/context → context}/decorators/standard/context-selector-field.js.map +4 -4
  42. package/context/decorators/standard/context-selector.js +3 -0
  43. package/{dist/context → context}/decorators/standard/context-selector.js.map +4 -4
  44. package/context/decorators/standard/provide-context.js +3 -0
  45. package/{dist/context → context}/decorators/standard/provide-context.js.map +3 -3
  46. package/context/decorators/standard-legacy-dispatch.js +3 -0
  47. package/context/decorators/standard-legacy-dispatch.js.map +10 -0
  48. package/context/events.js +3 -0
  49. package/context/events.js.map +10 -0
  50. package/context/hydration-script.js +3 -0
  51. package/{dist/context → context}/hydration-script.js.map +2 -2
  52. package/context/index.js +3 -0
  53. package/{dist/context → context}/index.js.map +6 -6
  54. package/controller-registry.js +3 -0
  55. package/{dist/controller-registry.js.map → controller-registry.js.map} +3 -3
  56. package/core/controller-metadata.js +3 -0
  57. package/{dist/core → core}/controller-metadata.js.map +2 -2
  58. package/core/custom-element-metadata.js +3 -0
  59. package/{dist/core → core}/custom-element-metadata.js.map +2 -2
  60. package/core/event-subscription-registry.js +3 -0
  61. package/{dist/core → core}/event-subscription-registry.js.map +2 -2
  62. package/core/host-ssr-registry.js +3 -0
  63. package/{dist/core → core}/host-ssr-registry.js.map +2 -2
  64. package/core/hydration-capable-host.js +3 -0
  65. package/{dist/core → core}/hydration-capable-host.js.map +2 -2
  66. package/core/hydration-codec.js +3 -0
  67. package/{dist/core → core}/hydration-codec.js.map +2 -2
  68. package/{dist/core → core}/radiant-controller.d.ts +7 -5
  69. package/core/radiant-controller.js +3 -0
  70. package/core/radiant-controller.js.map +21 -0
  71. package/core/radiant-element-ssr-host.js +3 -0
  72. package/{dist/core → core}/radiant-element-ssr-host.js.map +2 -2
  73. package/{dist/core → core}/radiant-element-ssr-registry.d.ts +4 -2
  74. package/core/radiant-element-ssr-registry.js +3 -0
  75. package/core/radiant-element-ssr-registry.js.map +10 -0
  76. package/{dist/core → core}/radiant-element.d.ts +18 -15
  77. package/core/radiant-element.js +3 -0
  78. package/core/radiant-element.js.map +31 -0
  79. package/core/radiant-hydrator-state.js +3 -0
  80. package/{dist/core → core}/radiant-hydrator-state.js.map +2 -2
  81. package/core/reactive-binding-adapter.d.ts +10 -0
  82. package/core/reactive-binding-adapter.js +3 -0
  83. package/core/reactive-binding-adapter.js.map +10 -0
  84. package/core/reactive-host.d.ts +138 -0
  85. package/core/reactive-host.js +3 -0
  86. package/core/reactive-host.js.map +13 -0
  87. package/{dist/core → core}/reactive-jsx-value.d.ts +2 -2
  88. package/core/reactive-jsx-value.js +3 -0
  89. package/core/reactive-jsx-value.js.map +10 -0
  90. package/{dist/core → core}/reactive-prop-core.d.ts +6 -11
  91. package/core/reactive-prop-core.js +3 -0
  92. package/{dist/core → core}/reactive-prop-core.js.map +3 -3
  93. package/core/reactive-prop-metadata.js +3 -0
  94. package/{dist/core → core}/reactive-prop-metadata.js.map +2 -2
  95. package/{dist/core → core}/reactive-property-state.d.ts +5 -2
  96. package/core/reactive-property-state.js +3 -0
  97. package/core/reactive-property-state.js.map +12 -0
  98. package/core/reactivity-adapter.js +3 -0
  99. package/core/reactivity-adapter.js.map +12 -0
  100. package/{dist/core → core}/reactivity-contract.d.ts +14 -0
  101. package/core/reactivity-runtime.js +3 -0
  102. package/core/reactivity-runtime.js.map +11 -0
  103. package/core/reactivity-signals.js +3 -0
  104. package/core/reactivity-signals.js.map +10 -0
  105. package/core/render-runtime.js +3 -0
  106. package/{dist/core → core}/render-runtime.js.map +3 -3
  107. package/core/render-scheduler.js +3 -0
  108. package/{dist/core → core}/render-scheduler.js.map +2 -2
  109. package/core/slot-projection-runtime.js +3 -0
  110. package/{dist/core → core}/slot-projection-runtime.js.map +2 -2
  111. package/core/ssr-preparation.js +3 -0
  112. package/{dist/core → core}/ssr-preparation.js.map +2 -2
  113. package/decorators/attr.js +3 -0
  114. package/decorators/attr.js.map +18 -0
  115. package/decorators/bound.js +3 -0
  116. package/{dist/decorators → decorators}/bound.js.map +2 -2
  117. package/decorators/bridge.js +3 -0
  118. package/{dist/decorators → decorators}/bridge.js.map +2 -2
  119. package/decorators/controller.js +3 -0
  120. package/{dist/decorators → decorators}/controller.js.map +3 -3
  121. package/decorators/custom-element.js +3 -0
  122. package/{dist/decorators → decorators}/custom-element.js.map +2 -2
  123. package/decorators/debounce.js +3 -0
  124. package/{dist/decorators → decorators}/debounce.js.map +2 -2
  125. package/decorators/event.js +3 -0
  126. package/{dist/decorators → decorators}/event.js.map +3 -3
  127. package/decorators/legacy/attr.js +3 -0
  128. package/decorators/legacy/attr.js.map +15 -0
  129. package/decorators/legacy/bound.js +3 -0
  130. package/{dist/decorators → decorators}/legacy/bound.js.map +2 -2
  131. package/decorators/legacy/custom-element.js +3 -0
  132. package/{dist/decorators → decorators}/legacy/custom-element.js.map +2 -2
  133. package/decorators/legacy/debounce.js +3 -0
  134. package/{dist/decorators → decorators}/legacy/debounce.js.map +2 -2
  135. package/decorators/legacy/event.js +3 -0
  136. package/decorators/legacy/event.js.map +13 -0
  137. package/decorators/legacy/host-readiness.js +3 -0
  138. package/decorators/legacy/host-readiness.js.map +11 -0
  139. package/{dist/decorators → decorators}/legacy/instance-initializers.d.ts +4 -2
  140. package/decorators/legacy/instance-initializers.js +3 -0
  141. package/decorators/legacy/instance-initializers.js.map +10 -0
  142. package/decorators/legacy/member-bootstrap.d.ts +10 -0
  143. package/decorators/legacy/member-bootstrap.js +3 -0
  144. package/decorators/legacy/member-bootstrap.js.map +10 -0
  145. package/decorators/legacy/on-event.js +3 -0
  146. package/{dist/decorators → decorators}/legacy/on-event.js.map +3 -3
  147. package/decorators/legacy/on-updated.js +3 -0
  148. package/decorators/legacy/on-updated.js.map +11 -0
  149. package/decorators/legacy/query-slot.js +3 -0
  150. package/decorators/legacy/query-slot.js.map +13 -0
  151. package/decorators/legacy/query.js +3 -0
  152. package/decorators/legacy/query.js.map +12 -0
  153. package/decorators/legacy/reactive-field.js +3 -0
  154. package/decorators/legacy/reactive-field.js.map +13 -0
  155. package/{dist/decorators → decorators}/legacy/reactive-prop.d.ts +0 -1
  156. package/decorators/legacy/reactive-prop.js +3 -0
  157. package/decorators/legacy/reactive-prop.js.map +15 -0
  158. package/decorators/legacy/signal.js +3 -0
  159. package/decorators/legacy/signal.js.map +17 -0
  160. package/decorators/on-event.js +3 -0
  161. package/{dist/decorators → decorators}/on-event.js.map +3 -3
  162. package/decorators/on-updated.js +3 -0
  163. package/{dist/decorators → decorators}/on-updated.js.map +3 -3
  164. package/{dist/decorators → decorators}/prop.d.ts +4 -5
  165. package/decorators/prop.js +3 -0
  166. package/decorators/prop.js.map +18 -0
  167. package/decorators/query-slot.js +3 -0
  168. package/{dist/decorators → decorators}/query-slot.js.map +3 -3
  169. package/decorators/query.js +3 -0
  170. package/{dist/decorators → decorators}/query.js.map +3 -3
  171. package/decorators/shared/auto-bind.d.ts +7 -0
  172. package/decorators/shared/auto-bind.js +3 -0
  173. package/decorators/shared/auto-bind.js.map +10 -0
  174. package/decorators/shared/reactive-attr.js +3 -0
  175. package/decorators/shared/reactive-attr.js.map +13 -0
  176. package/decorators/signal.js +3 -0
  177. package/decorators/signal.js.map +19 -0
  178. package/decorators/standard/attr.js +3 -0
  179. package/decorators/standard/attr.js.map +14 -0
  180. package/decorators/standard/bound.js +3 -0
  181. package/{dist/decorators → decorators}/standard/bound.js.map +2 -2
  182. package/decorators/standard/custom-element.js +3 -0
  183. package/{dist/decorators → decorators}/standard/custom-element.js.map +2 -2
  184. package/decorators/standard/debounce.js +3 -0
  185. package/{dist/decorators → decorators}/standard/debounce.js.map +2 -2
  186. package/decorators/standard/event.js +3 -0
  187. package/{dist/decorators → decorators}/standard/event.js.map +2 -2
  188. package/decorators/standard/on-event.js +3 -0
  189. package/{dist/decorators → decorators}/standard/on-event.js.map +2 -2
  190. package/decorators/standard/on-updated.js +3 -0
  191. package/{dist/decorators → decorators}/standard/on-updated.js.map +2 -2
  192. package/decorators/standard/query-slot.js +3 -0
  193. package/{dist/decorators → decorators}/standard/query-slot.js.map +2 -2
  194. package/decorators/standard/query.js +3 -0
  195. package/{dist/decorators → decorators}/standard/query.js.map +2 -2
  196. package/decorators/standard/reactive-field.js +3 -0
  197. package/decorators/standard/reactive-field.js.map +11 -0
  198. package/decorators/standard/reactive-prop.js +3 -0
  199. package/{dist/decorators → decorators}/standard/reactive-prop.js.map +4 -4
  200. package/decorators/standard/signal.js +3 -0
  201. package/decorators/standard/signal.js.map +16 -0
  202. package/{dist/decorators → decorators}/state.d.ts +3 -2
  203. package/decorators/state.js +3 -0
  204. package/decorators/state.js.map +16 -0
  205. package/helpers/create-event-listener.js +3 -0
  206. package/{dist/helpers → helpers}/create-event-listener.js.map +2 -2
  207. package/helpers/create-event.js +3 -0
  208. package/{dist/helpers → helpers}/create-event.js.map +2 -2
  209. package/helpers/create-query-slot.js +3 -0
  210. package/{dist/helpers → helpers}/create-query-slot.js.map +2 -2
  211. package/helpers/create-query.js +3 -0
  212. package/{dist/helpers → helpers}/create-query.js.map +2 -2
  213. package/helpers/debounce.js +3 -0
  214. package/{dist/helpers → helpers}/debounce.js.map +2 -2
  215. package/helpers/index.js +3 -0
  216. package/{dist/helpers → helpers}/index.js.map +2 -2
  217. package/index.js +3 -0
  218. package/index.js.map +86 -0
  219. package/package.json +99 -129
  220. package/server/context-ssr.js +3 -0
  221. package/{dist/server → server}/context-ssr.js.map +2 -2
  222. package/server/host-attribute-serialization.js +3 -0
  223. package/{dist/server → server}/host-attribute-serialization.js.map +5 -5
  224. package/server/host-script-composition.js +3 -0
  225. package/{dist/server → server}/host-script-composition.js.map +2 -2
  226. package/server/html-parser.js +3 -0
  227. package/{dist/server → server}/html-parser.js.map +2 -2
  228. package/server/install-light-dom-shim.js +3 -0
  229. package/server/install-light-dom-shim.js.map +17 -0
  230. package/server/internal-radiant-host.js +3 -0
  231. package/{dist/server → server}/internal-radiant-host.js.map +1 -1
  232. package/server/light-dom-shim.d.ts +2 -0
  233. package/server/light-dom-shim.js +3 -0
  234. package/server/light-dom-shim.js.map +16 -0
  235. package/server/minimal-dom/document.d.ts +17 -0
  236. package/server/minimal-dom/document.js +3 -0
  237. package/server/minimal-dom/document.js.map +14 -0
  238. package/server/minimal-dom/html.d.ts +7 -0
  239. package/server/minimal-dom/html.js +3 -0
  240. package/server/minimal-dom/html.js.map +13 -0
  241. package/{dist/server/light-dom-shim.d.ts → server/minimal-dom/install.d.ts} +1 -4
  242. package/server/minimal-dom/install.js +3 -0
  243. package/server/minimal-dom/install.js.map +16 -0
  244. package/server/minimal-dom/nodes.d.ts +78 -0
  245. package/server/project-root.js +3 -0
  246. package/{dist/server → server}/project-root.js.map +2 -2
  247. package/server/radiant-element-ssr-bridge.js +3 -0
  248. package/{dist/server → server}/radiant-element-ssr-bridge.js.map +9 -9
  249. package/server/radiant-element-ssr-extractor.js +3 -0
  250. package/{dist/server → server}/radiant-element-ssr-extractor.js.map +3 -3
  251. package/server/radiant-element-ssr-service.js +3 -0
  252. package/{dist/server → server}/radiant-element-ssr-service.js.map +8 -8
  253. package/server/radiant-element-ssr.js +3 -0
  254. package/{dist/server → server}/radiant-element-ssr.js.map +9 -9
  255. package/{dist/server → server}/render-component.d.ts +1 -1
  256. package/server/render-component.js +3 -0
  257. package/server/render-component.js.map +32 -0
  258. package/server/render-controller.js +3 -0
  259. package/server/render-controller.js.map +35 -0
  260. package/server/render-fragment.js +3 -0
  261. package/server/render-fragment.js.map +10 -0
  262. package/server/slot-projection-html.js +3 -0
  263. package/{dist/server → server}/slot-projection-html.js.map +4 -4
  264. package/signals/host-resource.js +3 -0
  265. package/{dist/signals → signals}/host-resource.js.map +2 -2
  266. package/{dist/signals → signals}/host-signal.d.ts +2 -1
  267. package/signals/host-signal.js +3 -0
  268. package/signals/host-signal.js.map +13 -0
  269. package/signals/hydration-script.js +3 -0
  270. package/{dist/signals → signals}/hydration-script.js.map +2 -2
  271. package/tools/escape-css-identifier.js +3 -0
  272. package/{dist/tools → tools}/escape-css-identifier.js.map +2 -2
  273. package/tools/escape-script-json.js +3 -0
  274. package/{dist/tools → tools}/escape-script-json.js.map +2 -2
  275. package/tools/event-emitter.js +3 -0
  276. package/{dist/tools → tools}/event-emitter.js.map +2 -2
  277. package/tools/index.js +3 -0
  278. package/{dist/tools → tools}/index.js.map +2 -2
  279. package/tools/render-jsx-template.js +3 -0
  280. package/{dist/tools → tools}/render-jsx-template.js.map +2 -2
  281. package/types.js +3 -0
  282. package/{dist/types.js.map → types.js.map} +2 -2
  283. package/utils/attribute-utils.js +3 -0
  284. package/{dist/utils → utils}/attribute-utils.js.map +2 -2
  285. package/utils/escape-html-attribute.js +3 -0
  286. package/{dist/utils → utils}/escape-html-attribute.js.map +2 -2
  287. package/utils/index.js +3 -0
  288. package/{dist/utils → utils}/index.js.map +2 -2
  289. package/dist/LICENSE +0 -21
  290. package/dist/README.md +0 -315
  291. package/dist/client/app-bootstrap.js +0 -3
  292. package/dist/client/hydrator.js +0 -3
  293. package/dist/client/install-hydrator.js +0 -3
  294. package/dist/context/context-consumer-bootstrap.js +0 -3
  295. package/dist/context/context-consumer-runtime.js +0 -3
  296. package/dist/context/context-consumer-runtime.js.map +0 -12
  297. package/dist/context/context-host.js +0 -3
  298. package/dist/context/context-provider.js +0 -3
  299. package/dist/context/context-ssr-bridge.js +0 -3
  300. package/dist/context/create-context.js +0 -3
  301. package/dist/context/decorators/consume-context.js +0 -3
  302. package/dist/context/decorators/context-selection-delivery.js +0 -3
  303. package/dist/context/decorators/context-selector.js +0 -3
  304. package/dist/context/decorators/legacy/consume-context.js +0 -3
  305. package/dist/context/decorators/legacy/consume-context.js.map +0 -16
  306. package/dist/context/decorators/legacy/context-selector-field.js +0 -3
  307. package/dist/context/decorators/legacy/context-selector-field.js.map +0 -17
  308. package/dist/context/decorators/legacy/context-selector.js +0 -3
  309. package/dist/context/decorators/legacy/context-selector.js.map +0 -17
  310. package/dist/context/decorators/legacy/provide-context.js +0 -3
  311. package/dist/context/decorators/on-context-update.js +0 -3
  312. package/dist/context/decorators/provide-context.js +0 -3
  313. package/dist/context/decorators/standard/consume-context.js +0 -3
  314. package/dist/context/decorators/standard/context-selector-field.js +0 -3
  315. package/dist/context/decorators/standard/context-selector.js +0 -3
  316. package/dist/context/decorators/standard/provide-context.js +0 -3
  317. package/dist/context/decorators/standard-legacy-dispatch.js +0 -3
  318. package/dist/context/decorators/standard-legacy-dispatch.js.map +0 -10
  319. package/dist/context/events.js +0 -3
  320. package/dist/context/events.js.map +0 -10
  321. package/dist/context/hydration-script.js +0 -3
  322. package/dist/context/index.js +0 -3
  323. package/dist/controller-registry.js +0 -3
  324. package/dist/core/controller-metadata.js +0 -3
  325. package/dist/core/custom-element-metadata.js +0 -3
  326. package/dist/core/event-subscription-registry.js +0 -3
  327. package/dist/core/host-ssr-registry.js +0 -3
  328. package/dist/core/hydration-capable-host.js +0 -3
  329. package/dist/core/hydration-codec.js +0 -3
  330. package/dist/core/radiant-controller.js +0 -3
  331. package/dist/core/radiant-controller.js.map +0 -20
  332. package/dist/core/radiant-element-ssr-host.js +0 -3
  333. package/dist/core/radiant-element-ssr-registry.js +0 -3
  334. package/dist/core/radiant-element-ssr-registry.js.map +0 -10
  335. package/dist/core/radiant-element.js +0 -3
  336. package/dist/core/radiant-element.js.map +0 -30
  337. package/dist/core/radiant-hydrator-state.js +0 -3
  338. package/dist/core/reactive-host.d.ts +0 -124
  339. package/dist/core/reactive-host.js +0 -3
  340. package/dist/core/reactive-host.js.map +0 -13
  341. package/dist/core/reactive-jsx-value.js +0 -3
  342. package/dist/core/reactive-jsx-value.js.map +0 -10
  343. package/dist/core/reactive-prop-core.js +0 -3
  344. package/dist/core/reactive-prop-metadata.js +0 -3
  345. package/dist/core/reactive-property-state.js +0 -3
  346. package/dist/core/reactive-property-state.js.map +0 -12
  347. package/dist/core/reactivity-adapter.js +0 -3
  348. package/dist/core/reactivity-adapter.js.map +0 -12
  349. package/dist/core/reactivity-runtime.js +0 -3
  350. package/dist/core/reactivity-runtime.js.map +0 -11
  351. package/dist/core/reactivity-signals.js +0 -3
  352. package/dist/core/reactivity-signals.js.map +0 -10
  353. package/dist/core/render-runtime.js +0 -3
  354. package/dist/core/render-scheduler.js +0 -3
  355. package/dist/core/slot-projection-runtime.js +0 -3
  356. package/dist/core/ssr-preparation.js +0 -3
  357. package/dist/decorators/attr.js +0 -3
  358. package/dist/decorators/attr.js.map +0 -17
  359. package/dist/decorators/bound.js +0 -3
  360. package/dist/decorators/bridge.js +0 -3
  361. package/dist/decorators/controller.js +0 -3
  362. package/dist/decorators/custom-element.js +0 -3
  363. package/dist/decorators/debounce.js +0 -3
  364. package/dist/decorators/event.js +0 -3
  365. package/dist/decorators/legacy/attr.js +0 -3
  366. package/dist/decorators/legacy/attr.js.map +0 -14
  367. package/dist/decorators/legacy/bound.js +0 -3
  368. package/dist/decorators/legacy/custom-element.js +0 -3
  369. package/dist/decorators/legacy/debounce.js +0 -3
  370. package/dist/decorators/legacy/event.js +0 -3
  371. package/dist/decorators/legacy/event.js.map +0 -13
  372. package/dist/decorators/legacy/host-readiness.js +0 -3
  373. package/dist/decorators/legacy/host-readiness.js.map +0 -11
  374. package/dist/decorators/legacy/instance-initializers.js +0 -3
  375. package/dist/decorators/legacy/instance-initializers.js.map +0 -10
  376. package/dist/decorators/legacy/on-event.js +0 -3
  377. package/dist/decorators/legacy/on-updated.js +0 -3
  378. package/dist/decorators/legacy/on-updated.js.map +0 -11
  379. package/dist/decorators/legacy/query-slot.js +0 -3
  380. package/dist/decorators/legacy/query-slot.js.map +0 -13
  381. package/dist/decorators/legacy/query.js +0 -3
  382. package/dist/decorators/legacy/query.js.map +0 -12
  383. package/dist/decorators/legacy/reactive-field.js +0 -3
  384. package/dist/decorators/legacy/reactive-field.js.map +0 -11
  385. package/dist/decorators/legacy/reactive-prop.js +0 -3
  386. package/dist/decorators/legacy/reactive-prop.js.map +0 -14
  387. package/dist/decorators/legacy/signal.js +0 -3
  388. package/dist/decorators/legacy/signal.js.map +0 -16
  389. package/dist/decorators/on-event.js +0 -3
  390. package/dist/decorators/on-updated.js +0 -3
  391. package/dist/decorators/prop.js +0 -3
  392. package/dist/decorators/prop.js.map +0 -17
  393. package/dist/decorators/query-slot.js +0 -3
  394. package/dist/decorators/query.js +0 -3
  395. package/dist/decorators/shared/reactive-attr.js +0 -3
  396. package/dist/decorators/shared/reactive-attr.js.map +0 -12
  397. package/dist/decorators/signal.js +0 -3
  398. package/dist/decorators/signal.js.map +0 -18
  399. package/dist/decorators/standard/attr.js +0 -3
  400. package/dist/decorators/standard/attr.js.map +0 -13
  401. package/dist/decorators/standard/bound.js +0 -3
  402. package/dist/decorators/standard/custom-element.js +0 -3
  403. package/dist/decorators/standard/debounce.js +0 -3
  404. package/dist/decorators/standard/event.js +0 -3
  405. package/dist/decorators/standard/on-event.js +0 -3
  406. package/dist/decorators/standard/on-updated.js +0 -3
  407. package/dist/decorators/standard/query-slot.js +0 -3
  408. package/dist/decorators/standard/query.js +0 -3
  409. package/dist/decorators/standard/reactive-field.js +0 -3
  410. package/dist/decorators/standard/reactive-field.js.map +0 -10
  411. package/dist/decorators/standard/reactive-prop.js +0 -3
  412. package/dist/decorators/standard/signal.js +0 -3
  413. package/dist/decorators/standard/signal.js.map +0 -15
  414. package/dist/decorators/state.js +0 -3
  415. package/dist/decorators/state.js.map +0 -14
  416. package/dist/helpers/create-event-listener.js +0 -3
  417. package/dist/helpers/create-event.js +0 -3
  418. package/dist/helpers/create-query-slot.js +0 -3
  419. package/dist/helpers/create-query.js +0 -3
  420. package/dist/helpers/debounce.js +0 -3
  421. package/dist/helpers/index.js +0 -3
  422. package/dist/index.js +0 -3
  423. package/dist/index.js.map +0 -83
  424. package/dist/package.json +0 -209
  425. package/dist/server/context-ssr.js +0 -3
  426. package/dist/server/host-attribute-serialization.js +0 -3
  427. package/dist/server/host-script-composition.js +0 -3
  428. package/dist/server/html-parser.js +0 -3
  429. package/dist/server/install-light-dom-shim.js +0 -3
  430. package/dist/server/install-light-dom-shim.js.map +0 -12
  431. package/dist/server/internal-radiant-host.js +0 -3
  432. package/dist/server/light-dom-shim.js +0 -3
  433. package/dist/server/light-dom-shim.js.map +0 -11
  434. package/dist/server/project-root.js +0 -3
  435. package/dist/server/radiant-element-ssr-bridge.js +0 -3
  436. package/dist/server/radiant-element-ssr-extractor.js +0 -3
  437. package/dist/server/radiant-element-ssr-service.js +0 -3
  438. package/dist/server/radiant-element-ssr.js +0 -3
  439. package/dist/server/render-component.js +0 -3
  440. package/dist/server/render-component.js.map +0 -28
  441. package/dist/server/render-controller.js +0 -3
  442. package/dist/server/render-controller.js.map +0 -31
  443. package/dist/server/render-fragment.js +0 -3
  444. package/dist/server/render-fragment.js.map +0 -10
  445. package/dist/server/slot-projection-html.js +0 -3
  446. package/dist/signals/host-resource.js +0 -3
  447. package/dist/signals/host-signal.js +0 -3
  448. package/dist/signals/host-signal.js.map +0 -13
  449. package/dist/signals/hydration-script.js +0 -3
  450. package/dist/tools/escape-css-identifier.js +0 -3
  451. package/dist/tools/escape-script-json.js +0 -3
  452. package/dist/tools/event-emitter.js +0 -3
  453. package/dist/tools/index.js +0 -3
  454. package/dist/tools/render-jsx-template.js +0 -3
  455. package/dist/types.js +0 -3
  456. package/dist/utils/attribute-utils.js +0 -3
  457. package/dist/utils/escape-html-attribute.js +0 -3
  458. package/dist/utils/index.js +0 -3
  459. /package/{dist/client → client}/app-bootstrap.d.ts +0 -0
  460. /package/{dist/client → client}/hydrator.d.ts +0 -0
  461. /package/{dist/client → client}/install-hydrator.d.ts +0 -0
  462. /package/{dist/context → context}/context-consumer-bootstrap.d.ts +0 -0
  463. /package/{dist/context → context}/context-consumer-runtime.d.ts +0 -0
  464. /package/{dist/context → context}/context-host.d.ts +0 -0
  465. /package/{dist/context → context}/context-provider.d.ts +0 -0
  466. /package/{dist/context → context}/context-ssr-bridge.d.ts +0 -0
  467. /package/{dist/context → context}/create-context.d.ts +0 -0
  468. /package/{dist/context → context}/decorators/consume-context.d.ts +0 -0
  469. /package/{dist/context → context}/decorators/context-selection-delivery.d.ts +0 -0
  470. /package/{dist/context → context}/decorators/context-selector.d.ts +0 -0
  471. /package/{dist/context → context}/decorators/legacy/consume-context.d.ts +0 -0
  472. /package/{dist/context → context}/decorators/legacy/context-selector-field.d.ts +0 -0
  473. /package/{dist/context → context}/decorators/legacy/context-selector.d.ts +0 -0
  474. /package/{dist/context → context}/decorators/legacy/provide-context.d.ts +0 -0
  475. /package/{dist/context → context}/decorators/on-context-update.d.ts +0 -0
  476. /package/{dist/context → context}/decorators/provide-context.d.ts +0 -0
  477. /package/{dist/context → context}/decorators/standard/consume-context.d.ts +0 -0
  478. /package/{dist/context → context}/decorators/standard/context-selector-field.d.ts +0 -0
  479. /package/{dist/context → context}/decorators/standard/context-selector.d.ts +0 -0
  480. /package/{dist/context → context}/decorators/standard/provide-context.d.ts +0 -0
  481. /package/{dist/context → context}/decorators/standard-legacy-dispatch.d.ts +0 -0
  482. /package/{dist/context → context}/events.d.ts +0 -0
  483. /package/{dist/context → context}/hydration-script.d.ts +0 -0
  484. /package/{dist/context → context}/index.d.ts +0 -0
  485. /package/{dist/context → context}/types.d.ts +0 -0
  486. /package/{dist/context → context}/types.js +0 -0
  487. /package/{dist/context → context}/types.js.map +0 -0
  488. /package/{dist/controller-registry.d.ts → controller-registry.d.ts} +0 -0
  489. /package/{dist/core → core}/controller-metadata.d.ts +0 -0
  490. /package/{dist/core → core}/custom-element-metadata.d.ts +0 -0
  491. /package/{dist/core → core}/event-subscription-registry.d.ts +0 -0
  492. /package/{dist/core → core}/host-ssr-registry.d.ts +0 -0
  493. /package/{dist/core → core}/hydration-capable-host.d.ts +0 -0
  494. /package/{dist/core → core}/hydration-codec.d.ts +0 -0
  495. /package/{dist/core → core}/radiant-element-ssr-host.d.ts +0 -0
  496. /package/{dist/core → core}/radiant-hydrator-state.d.ts +0 -0
  497. /package/{dist/core → core}/reactive-prop-metadata.d.ts +0 -0
  498. /package/{dist/core → core}/reactivity-adapter.d.ts +0 -0
  499. /package/{dist/core → core}/reactivity-contract.js +0 -0
  500. /package/{dist/core → core}/reactivity-contract.js.map +0 -0
  501. /package/{dist/core → core}/reactivity-runtime.d.ts +0 -0
  502. /package/{dist/core → core}/reactivity-signals.d.ts +0 -0
  503. /package/{dist/core → core}/render-runtime.d.ts +0 -0
  504. /package/{dist/core → core}/render-scheduler.d.ts +0 -0
  505. /package/{dist/core → core}/slot-projection-runtime.d.ts +0 -0
  506. /package/{dist/core → core}/ssr-hydration-binding.d.ts +0 -0
  507. /package/{dist/core → core}/ssr-hydration-binding.js +0 -0
  508. /package/{dist/core → core}/ssr-hydration-binding.js.map +0 -0
  509. /package/{dist/core → core}/ssr-preparation.d.ts +0 -0
  510. /package/{dist/decorators → decorators}/attr.d.ts +0 -0
  511. /package/{dist/decorators → decorators}/bound.d.ts +0 -0
  512. /package/{dist/decorators → decorators}/bridge.d.ts +0 -0
  513. /package/{dist/decorators → decorators}/controller.d.ts +0 -0
  514. /package/{dist/decorators → decorators}/custom-element.d.ts +0 -0
  515. /package/{dist/decorators → decorators}/debounce.d.ts +0 -0
  516. /package/{dist/decorators → decorators}/event.d.ts +0 -0
  517. /package/{dist/decorators → decorators}/legacy/attr.d.ts +0 -0
  518. /package/{dist/decorators → decorators}/legacy/bound.d.ts +0 -0
  519. /package/{dist/decorators → decorators}/legacy/custom-element.d.ts +0 -0
  520. /package/{dist/decorators → decorators}/legacy/debounce.d.ts +0 -0
  521. /package/{dist/decorators → decorators}/legacy/event.d.ts +0 -0
  522. /package/{dist/decorators → decorators}/legacy/host-readiness.d.ts +0 -0
  523. /package/{dist/decorators → decorators}/legacy/on-event.d.ts +0 -0
  524. /package/{dist/decorators → decorators}/legacy/on-updated.d.ts +0 -0
  525. /package/{dist/decorators → decorators}/legacy/query-slot.d.ts +0 -0
  526. /package/{dist/decorators → decorators}/legacy/query.d.ts +0 -0
  527. /package/{dist/decorators → decorators}/legacy/reactive-field.d.ts +0 -0
  528. /package/{dist/decorators → decorators}/legacy/signal.d.ts +0 -0
  529. /package/{dist/decorators → decorators}/on-event.d.ts +0 -0
  530. /package/{dist/decorators → decorators}/on-updated.d.ts +0 -0
  531. /package/{dist/decorators → decorators}/query-slot.d.ts +0 -0
  532. /package/{dist/decorators → decorators}/query.d.ts +0 -0
  533. /package/{dist/decorators → decorators}/shared/reactive-attr.d.ts +0 -0
  534. /package/{dist/decorators → decorators}/signal.d.ts +0 -0
  535. /package/{dist/decorators → decorators}/standard/attr.d.ts +0 -0
  536. /package/{dist/decorators → decorators}/standard/bound.d.ts +0 -0
  537. /package/{dist/decorators → decorators}/standard/custom-element.d.ts +0 -0
  538. /package/{dist/decorators → decorators}/standard/debounce.d.ts +0 -0
  539. /package/{dist/decorators → decorators}/standard/event.d.ts +0 -0
  540. /package/{dist/decorators → decorators}/standard/on-event.d.ts +0 -0
  541. /package/{dist/decorators → decorators}/standard/on-updated.d.ts +0 -0
  542. /package/{dist/decorators → decorators}/standard/query-slot.d.ts +0 -0
  543. /package/{dist/decorators → decorators}/standard/query.d.ts +0 -0
  544. /package/{dist/decorators → decorators}/standard/reactive-field.d.ts +0 -0
  545. /package/{dist/decorators → decorators}/standard/reactive-prop.d.ts +0 -0
  546. /package/{dist/decorators → decorators}/standard/signal.d.ts +0 -0
  547. /package/{dist/helpers → helpers}/create-event-listener.d.ts +0 -0
  548. /package/{dist/helpers → helpers}/create-event.d.ts +0 -0
  549. /package/{dist/helpers → helpers}/create-query-slot.d.ts +0 -0
  550. /package/{dist/helpers → helpers}/create-query.d.ts +0 -0
  551. /package/{dist/helpers → helpers}/debounce.d.ts +0 -0
  552. /package/{dist/helpers → helpers}/index.d.ts +0 -0
  553. /package/{dist/index.d.ts → index.d.ts} +0 -0
  554. /package/{dist/server → server}/context-ssr.d.ts +0 -0
  555. /package/{dist/server → server}/host-attribute-serialization.d.ts +0 -0
  556. /package/{dist/server → server}/host-script-composition.d.ts +0 -0
  557. /package/{dist/server → server}/html-parser.d.ts +0 -0
  558. /package/{dist/server → server}/install-light-dom-shim.d.ts +0 -0
  559. /package/{dist/server → server}/internal-radiant-host.d.ts +0 -0
  560. /package/{dist/server → server}/project-root.d.ts +0 -0
  561. /package/{dist/server → server}/radiant-element-ssr-bridge.d.ts +0 -0
  562. /package/{dist/server → server}/radiant-element-ssr-extractor.d.ts +0 -0
  563. /package/{dist/server → server}/radiant-element-ssr-service.d.ts +0 -0
  564. /package/{dist/server → server}/radiant-element-ssr.d.ts +0 -0
  565. /package/{dist/server → server}/render-controller.d.ts +0 -0
  566. /package/{dist/server → server}/render-fragment.d.ts +0 -0
  567. /package/{dist/server → server}/slot-projection-html.d.ts +0 -0
  568. /package/{dist/signals → signals}/host-resource.d.ts +0 -0
  569. /package/{dist/signals → signals}/hydration-script.d.ts +0 -0
  570. /package/{dist/tools → tools}/escape-css-identifier.d.ts +0 -0
  571. /package/{dist/tools → tools}/escape-script-json.d.ts +0 -0
  572. /package/{dist/tools → tools}/event-emitter.d.ts +0 -0
  573. /package/{dist/tools → tools}/index.d.ts +0 -0
  574. /package/{dist/tools → tools}/render-jsx-template.d.ts +0 -0
  575. /package/{dist/types.d.ts → types.d.ts} +0 -0
  576. /package/{dist/utils → utils}/attribute-utils.d.ts +0 -0
  577. /package/{dist/utils → utils}/escape-html-attribute.d.ts +0 -0
  578. /package/{dist/utils → utils}/index.d.ts +0 -0
@@ -0,0 +1,32 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/utils/escape-html-attribute.ts", "../src/server/html-parser.ts", "../src/server/minimal-dom/nodes.ts", "../src/server/minimal-dom/html.ts", "../src/core/reactive-prop-metadata.ts", "../src/decorators/legacy/instance-initializers.ts", "../src/decorators/legacy/host-readiness.ts", "../src/utils/attribute-utils.ts", "../src/core/radiant-element-ssr-registry.ts", "../src/core/custom-element-metadata.ts", "../src/tools/escape-css-identifier.ts", "../src/server/host-attribute-serialization.ts", "../src/context/context-ssr-bridge.ts", "../src/server/context-ssr.ts", "../src/server/host-script-composition.ts", "../src/core/radiant-element-ssr-host.ts", "../src/server/radiant-element-ssr-extractor.ts", "../src/server/radiant-element-ssr-service.ts", "../src/server/radiant-element-ssr-bridge.ts", "../src/server/minimal-dom/document.ts", "../src/server/minimal-dom/install.ts", "../src/server/render-fragment.ts", "../src/server/render-component.ts"],
4
+ "sourcesContent": [
5
+ "/** Escapes a string for safe interpolation inside a double-quoted HTML attribute value. */\nexport function escapeHtmlAttribute(value: string): string {\n\treturn value.replace(/&/g, '&amp;').replace(/\"/g, '&quot;').replace(/</g, '&lt;').replace(/>/g, '&gt;');\n}\n",
6
+ "export type ParsedHtmlTag = {\n\tattributes: Record<string, string>;\n\tend: number;\n\tinnerHtml: string;\n\tselfClosing: boolean;\n\ttagName: string;\n\ttype: 'open';\n};\n\nexport type ParsedHtmlToken =\n\t| ParsedHtmlTag\n\t| {\n\t\t\tend: number;\n\t\t\ttype: 'close';\n\t }\n\t| {\n\t\t\tend: number;\n\t\t\ttype: 'comment' | 'declaration';\n\t };\n\nexport const voidElementNames = new Set([\n\t'area',\n\t'base',\n\t'br',\n\t'col',\n\t'embed',\n\t'hr',\n\t'img',\n\t'input',\n\t'link',\n\t'meta',\n\t'param',\n\t'source',\n\t'track',\n\t'wbr',\n]);\n\nexport function collectTopLevelHtmlFragments(html: string): string[] {\n\tconst fragments: string[] = [];\n\tlet index = 0;\n\n\twhile (index < html.length) {\n\t\tconst fragmentStart = index;\n\n\t\tif (html.startsWith('<!--', index)) {\n\t\t\tconst commentEnd = html.indexOf('-->', index + 4);\n\t\t\tindex = commentEnd === -1 ? html.length : commentEnd + 3;\n\t\t\tfragments.push(html.slice(fragmentStart, index));\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (html[index] !== '<') {\n\t\t\tconst nextTagIndex = html.indexOf('<', index);\n\t\t\tindex = nextTagIndex === -1 ? html.length : nextTagIndex;\n\t\t\tfragments.push(html.slice(fragmentStart, index));\n\t\t\tcontinue;\n\t\t}\n\n\t\tconst token = parseHtmlTagToken(html, index);\n\n\t\tif (!token) {\n\t\t\tfragments.push(html.slice(fragmentStart));\n\t\t\tbreak;\n\t\t}\n\n\t\tif (token.type !== 'open' || token.selfClosing || voidElementNames.has(token.tagName)) {\n\t\t\tindex = token.end;\n\t\t\tfragments.push(html.slice(fragmentStart, index));\n\t\t\tcontinue;\n\t\t}\n\n\t\tindex = token.end;\n\t\tlet depth = 1;\n\n\t\twhile (index < html.length && depth > 0) {\n\t\t\tconst nextTagIndex = html.indexOf('<', index);\n\n\t\t\tif (nextTagIndex === -1) {\n\t\t\t\tindex = html.length;\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tconst nestedToken = parseHtmlTagToken(html, nextTagIndex);\n\n\t\t\tif (!nestedToken) {\n\t\t\t\tindex = html.length;\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tindex = nestedToken.end;\n\n\t\t\tif (nestedToken.type === 'comment' || nestedToken.type === 'declaration') {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (nestedToken.type === 'open' && !nestedToken.selfClosing && !voidElementNames.has(nestedToken.tagName)) {\n\t\t\t\tdepth += 1;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (nestedToken.type === 'close') {\n\t\t\t\tdepth -= 1;\n\t\t\t}\n\t\t}\n\n\t\tfragments.push(html.slice(fragmentStart, index));\n\t}\n\n\treturn fragments.filter((fragment) => fragment !== '');\n}\n\nexport function findHtmlTagEnd(html: string, startIndex: number): number {\n\tlet quote: '\"' | \"'\" | undefined;\n\n\tfor (let index = startIndex + 1; index < html.length; index += 1) {\n\t\tconst character = html[index];\n\n\t\tif (quote) {\n\t\t\tif (character === quote) {\n\t\t\t\tquote = undefined;\n\t\t\t}\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (character === '\"' || character === \"'\") {\n\t\t\tquote = character;\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (character === '>') {\n\t\t\treturn index + 1;\n\t\t}\n\t}\n\n\treturn html.length;\n}\n\nexport function parseAttributes(rawAttributes: string): Record<string, string> {\n\tconst attributes: Record<string, string> = {};\n\tconst attributePattern = /([:^@A-Za-z0-9_.-]+)(?:\\s*=\\s*(?:\"([^\"]*)\"|'([^']*)'|([^\\s\"'>/]+)))?/g;\n\n\tfor (const match of rawAttributes.matchAll(attributePattern)) {\n\t\tconst [, name, doubleQuoted, singleQuoted, bareValue] = match;\n\n\t\tif (!name) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tattributes[name] = doubleQuoted ?? singleQuoted ?? bareValue ?? '';\n\t}\n\n\treturn attributes;\n}\n\nexport function parseHtmlTagToken(html: string, startIndex: number): ParsedHtmlToken | undefined {\n\tif (html.startsWith('<!--', startIndex)) {\n\t\tconst endIndex = html.indexOf('-->', startIndex + 4);\n\t\treturn {\n\t\t\tend: endIndex === -1 ? html.length : endIndex + 3,\n\t\t\ttype: 'comment',\n\t\t};\n\t}\n\n\tconst endIndex = findHtmlTagEnd(html, startIndex);\n\tconst rawToken = html.slice(startIndex + 1, endIndex - 1).trim();\n\n\tif (rawToken === '') {\n\t\treturn undefined;\n\t}\n\n\tif (rawToken.startsWith('!') || rawToken.startsWith('?')) {\n\t\treturn {\n\t\t\tend: endIndex,\n\t\t\ttype: 'declaration',\n\t\t};\n\t}\n\n\tif (rawToken.startsWith('/')) {\n\t\treturn {\n\t\t\tend: endIndex,\n\t\t\ttype: 'close',\n\t\t};\n\t}\n\n\tconst selfClosing = /\\/\\s*$/.test(rawToken);\n\tconst tagBody = selfClosing ? rawToken.replace(/\\/\\s*$/, '').trim() : rawToken;\n\tconst tagName = tagBody.split(/[\\s/>]/, 1)[0]?.toLowerCase() ?? '';\n\tconst attributesStart = tagName.length;\n\tconst rawAttributes = tagBody.slice(attributesStart).trim();\n\tconst innerHtml =\n\t\tselfClosing || voidElementNames.has(tagName)\n\t\t\t? ''\n\t\t\t: extractInnerHtmlFragment(html, startIndex, endIndex, tagName);\n\n\treturn {\n\t\tattributes: parseAttributes(rawAttributes),\n\t\tend: endIndex,\n\t\tinnerHtml,\n\t\tselfClosing,\n\t\ttagName,\n\t\ttype: 'open',\n\t};\n}\n\nexport function extractInnerHtmlFragment(\n\thtml: string,\n\tstartIndex: number,\n\ttagEndIndex: number,\n\ttagName: string,\n): string {\n\tlet index = tagEndIndex;\n\tlet depth = 1;\n\n\twhile (index < html.length && depth > 0) {\n\t\tconst nextTagIndex = html.indexOf('<', index);\n\n\t\tif (nextTagIndex === -1) {\n\t\t\treturn html.slice(tagEndIndex);\n\t\t}\n\n\t\tconst nextTag = parseHtmlTagToken(html, nextTagIndex);\n\n\t\tif (!nextTag) {\n\t\t\treturn html.slice(tagEndIndex);\n\t\t}\n\n\t\tif (\n\t\t\tnextTag.type === 'open' &&\n\t\t\tnextTag.tagName === tagName &&\n\t\t\t!nextTag.selfClosing &&\n\t\t\t!voidElementNames.has(tagName)\n\t\t) {\n\t\t\tdepth += 1;\n\t\t}\n\n\t\tif (nextTag.type === 'close') {\n\t\t\tconst closingName = html\n\t\t\t\t.slice(nextTagIndex + 2, nextTag.end - 1)\n\t\t\t\t.trim()\n\t\t\t\t.toLowerCase();\n\n\t\t\tif (closingName === tagName) {\n\t\t\t\tdepth -= 1;\n\n\t\t\t\tif (depth === 0) {\n\t\t\t\t\treturn html.slice(tagEndIndex, nextTagIndex);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tindex = nextTag.end;\n\t}\n\n\treturn html.slice(tagEndIndex);\n}\n",
7
+ "import { escapeHtmlAttribute } from '../../utils/escape-html-attribute';\n\ntype MinimalParentNode = Node & ParentNode;\n\ntype HtmlModule = typeof import('./html');\n\nlet htmlModule: HtmlModule | undefined;\n\nfunction getHtmlModule(): HtmlModule {\n\thtmlModule ??= require('./html') as HtmlModule;\n\treturn htmlModule;\n}\n\nexport class MinimalNode extends EventTarget {\n\tstatic readonly DOCUMENT_NODE = 9;\n\tstatic readonly ELEMENT_NODE = 1;\n\tstatic readonly TEXT_NODE = 3;\n\n\tpublic childNodes: Node[] = [];\n\tpublic ownerDocument: Document | null;\n\tpublic parentNode: MinimalParentNode | null = null;\n\n\tconstructor(\n\t\tpublic readonly nodeType: number,\n\t\townerDocument: Document | null = null,\n\t) {\n\t\tsuper();\n\t\tthis.ownerDocument = ownerDocument;\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 & { ownerDocument: Document | null }).ownerDocument =\n\t\t\tthis.nodeType === MinimalNode.DOCUMENT_NODE ? (this as unknown as Document) : this.ownerDocument;\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\tgetRootNode(): Node {\n\t\tlet current: Node = this as unknown as Node;\n\n\t\twhile ('parentNode' in current && current.parentNode) {\n\t\t\tcurrent = current.parentNode;\n\t\t}\n\n\t\treturn current;\n\t}\n}\n\nexport class MinimalTextNode extends MinimalNode {\n\tconstructor(\n\t\tprivate value: string,\n\t\townerDocument: Document | null = getInstalledDocumentLike(),\n\t) {\n\t\tsuper(MinimalNode.TEXT_NODE, ownerDocument);\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 MinimalClassList {\n\tconstructor(private readonly element: MinimalElement) {}\n\n\tadd(...tokens: string[]): void {\n\t\tconst nextTokens = new Set(this.readTokens());\n\n\t\tfor (const token of tokens) {\n\t\t\tif (token !== '') {\n\t\t\t\tnextTokens.add(token);\n\t\t\t}\n\t\t}\n\n\t\tthis.writeTokens([...nextTokens]);\n\t}\n\n\tremove(...tokens: string[]): void {\n\t\tconst nextTokens = new Set(this.readTokens());\n\n\t\tfor (const token of tokens) {\n\t\t\tnextTokens.delete(token);\n\t\t}\n\n\t\tthis.writeTokens([...nextTokens]);\n\t}\n\n\ttoggle(token: string, force?: boolean): boolean {\n\t\tconst hasToken = this.contains(token);\n\t\tconst shouldAdd = force ?? !hasToken;\n\n\t\tif (shouldAdd) {\n\t\t\tthis.add(token);\n\t\t\treturn true;\n\t\t}\n\n\t\tthis.remove(token);\n\t\treturn false;\n\t}\n\n\tcontains(token: string): boolean {\n\t\treturn this.readTokens().includes(token);\n\t}\n\n\ttoString(): string {\n\t\treturn this.value;\n\t}\n\n\tget value(): string {\n\t\treturn this.element.getAttribute('class') ?? '';\n\t}\n\n\tprivate readTokens(): string[] {\n\t\treturn this.value\n\t\t\t.split(/\\s+/)\n\t\t\t.map((token) => token.trim())\n\t\t\t.filter((token) => token.length > 0);\n\t}\n\n\tprivate writeTokens(tokens: string[]): void {\n\t\tif (tokens.length === 0) {\n\t\t\tthis.element.removeAttribute('class');\n\t\t\treturn;\n\t\t}\n\n\t\tthis.element.setAttribute('class', tokens.join(' '));\n\t}\n}\n\nexport class MinimalElement extends MinimalNode {\n\tprivate attributes = new Map<string, string>();\n\tprivate classListValue?: MinimalClassList;\n\tprivate datasetValue?: DOMStringMap;\n\tprivate fragmentHtml?: string;\n\tprivate fragmentText?: string;\n\n\tpublic readonly localName: string;\n\tpublic readonly tagName: string;\n\n\tconstructor(tagName = 'div', ownerDocument: Document | null = getInstalledDocumentLike()) {\n\t\tsuper(MinimalNode.ELEMENT_NODE, ownerDocument);\n\t\tthis.localName = tagName.toLowerCase();\n\t\tthis.tagName = this.localName.toUpperCase();\n\t}\n\n\tget id(): string {\n\t\treturn this.getAttribute('id') ?? '';\n\t}\n\n\tset id(value: string) {\n\t\tif (value === '') {\n\t\t\tthis.removeAttribute('id');\n\t\t\treturn;\n\t\t}\n\n\t\tthis.setAttribute('id', value);\n\t}\n\n\tget classList(): DOMTokenList {\n\t\tthis.classListValue ??= new MinimalClassList(this);\n\t\treturn this.classListValue as unknown as DOMTokenList;\n\t}\n\n\tget dataset(): DOMStringMap {\n\t\tthis.datasetValue ??= new Proxy(\n\t\t\t{},\n\t\t\t{\n\t\t\t\tdeleteProperty: (_target, property) => {\n\t\t\t\t\tif (typeof property !== 'string') {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\n\t\t\t\t\tthis.removeAttribute(getHtmlModule().toDataAttributeName(property));\n\t\t\t\t\treturn true;\n\t\t\t\t},\n\t\t\t\tget: (_target, property) => {\n\t\t\t\t\tif (typeof property !== 'string') {\n\t\t\t\t\t\treturn undefined;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn this.getAttribute(getHtmlModule().toDataAttributeName(property)) ?? undefined;\n\t\t\t\t},\n\t\t\t\tgetOwnPropertyDescriptor: (_target, property) => {\n\t\t\t\t\tif (typeof property !== 'string') {\n\t\t\t\t\t\treturn undefined;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn {\n\t\t\t\t\t\tconfigurable: true,\n\t\t\t\t\t\tenumerable: true,\n\t\t\t\t\t\tvalue: this.getAttribute(getHtmlModule().toDataAttributeName(property)) ?? undefined,\n\t\t\t\t\t\twritable: true,\n\t\t\t\t\t};\n\t\t\t\t},\n\t\t\t\thas: (_target, property) => {\n\t\t\t\t\treturn (\n\t\t\t\t\t\ttypeof property === 'string' && this.hasAttribute(getHtmlModule().toDataAttributeName(property))\n\t\t\t\t\t);\n\t\t\t\t},\n\t\t\t\townKeys: () => {\n\t\t\t\t\treturn this.getAttributeNames()\n\t\t\t\t\t\t.filter((name) => name.startsWith('data-'))\n\t\t\t\t\t\t.map((name) => getHtmlModule().toDatasetPropertyName(name.slice(5)));\n\t\t\t\t},\n\t\t\t\tset: (_target, property, value) => {\n\t\t\t\t\tif (typeof property !== 'string') {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\n\t\t\t\t\tthis.setAttribute(getHtmlModule().toDataAttributeName(property), String(value));\n\t\t\t\t\treturn true;\n\t\t\t\t},\n\t\t\t},\n\t\t) as DOMStringMap;\n\n\t\treturn this.datasetValue;\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\ttoggleAttribute(name: string, force?: boolean): boolean {\n\t\tconst shouldHaveAttribute = force ?? !this.hasAttribute(name);\n\n\t\tif (shouldHaveAttribute) {\n\t\t\tthis.setAttribute(name, '');\n\t\t\treturn true;\n\t\t}\n\n\t\tthis.removeAttribute(name);\n\t\treturn false;\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) => getHtmlModule().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(...getHtmlModule().parseHtmlToNodes(html, this.ownerDocument));\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\nexport class 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\nexport class 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\nexport class MinimalHTMLElement extends MinimalElement {\n\tpublic isConnected = false;\n\n\tconstructor(tagName = 'div', ownerDocument: Document | null = getInstalledDocumentLike()) {\n\t\tsuper(tagName, ownerDocument);\n\t}\n\n\tinsertAdjacentHTML(_position: InsertPosition, html: string): void {\n\t\tthis.append(...getHtmlModule().parseHtmlToNodes(html, this.ownerDocument));\n\t}\n\n\tconnectedCallback?(): void;\n\tattributeChangedCallback?(name: string, oldValue: string | null, newValue: string | null): void;\n\tdisconnectedCallback?(): void;\n}\n\nexport class MinimalHtmlScriptElement extends MinimalHTMLElement {\n\tconstructor(ownerDocument: Document | null = getInstalledDocumentLike()) {\n\t\tsuper('script', ownerDocument);\n\t}\n}\n\nexport function createTextNode(value: string): Node {\n\treturn new MinimalTextNode(value, getInstalledDocumentLike()) as unknown as Node;\n}\n\nexport function getInstalledDocumentLike(): Document | null {\n\treturn ((globalThis as typeof globalThis & { document?: Document }).document ?? null) as Document | null;\n}\n",
8
+ "import { collectTopLevelHtmlFragments, parseHtmlTagToken, type ParsedHtmlTag } from '../html-parser';\nimport {\n\tgetInstalledDocumentLike,\n\tMinimalElement,\n\tMinimalHtmlScriptElement,\n\tMinimalHTMLElement,\n\tMinimalNode,\n\tMinimalTextNode,\n} from './nodes';\n\nexport function createElementFromFragment(fragment: string, tag: ParsedHtmlTag, ownerDocument: Document | null): Node {\n\tconst element =\n\t\ttag.tagName === 'script'\n\t\t\t? (new MinimalHtmlScriptElement(ownerDocument) as MinimalElement)\n\t\t\t: new MinimalHTMLElement(tag.tagName, ownerDocument);\n\n\telement.setSerializedFragment(fragment, extractTextContent(tag.innerHtml), tag.attributes);\n\treturn element as unknown as Node;\n}\n\nexport function extractTextContent(html: string): string {\n\treturn html.replace(/<!--.*?-->/gs, '').replace(/<[^>]+>/g, '');\n}\n\nexport function parseHtmlToNodes(html: string, ownerDocument: Document | null = getInstalledDocumentLike()): Node[] {\n\treturn collectTopLevelHtmlFragments(html).map((fragment) => {\n\t\tif (!fragment.startsWith('<')) {\n\t\t\treturn new MinimalTextNode(fragment, ownerDocument) as unknown as Node;\n\t\t}\n\n\t\tconst tag = parseHtmlTagToken(fragment, 0);\n\n\t\tif (!tag || tag.type !== 'open') {\n\t\t\treturn new MinimalTextNode(fragment, ownerDocument) as unknown as Node;\n\t\t}\n\n\t\treturn createElementFromFragment(fragment, tag, ownerDocument);\n\t});\n}\n\nexport function toDataAttributeName(property: string): string {\n\treturn `data-${property.replace(/([A-Z])/g, '-$1').toLowerCase()}`;\n}\n\nexport function toDatasetPropertyName(attributeName: string): string {\n\treturn attributeName.replace(/-([a-z])/g, (_match, character: string) => character.toUpperCase());\n}\n\nexport function 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",
9
+ "import type { ReactivePropertyOptions } from './reactive-prop-core';\n\nconst REACTIVE_PROP_DEFINITIONS = Symbol.for('@ecopages/radiant.reactivePropDefinitions');\n\nexport type ReactivePropDefinition = {\n\tname: string;\n\toptions: ReactivePropertyOptions<unknown>;\n};\n\ntype RadiantConstructorWithReactiveProps = CustomElementConstructor & {\n\t[REACTIVE_PROP_DEFINITIONS]?: ReactivePropDefinition[];\n};\n\nexport function registerReactivePropDefinition(\n\ttarget: object,\n\tpropertyName: string,\n\toptions: ReactivePropertyOptions<unknown>,\n): void {\n\tconst constructor = target.constructor as RadiantConstructorWithReactiveProps;\n\tconst definitions = constructor[REACTIVE_PROP_DEFINITIONS] ?? [];\n\n\tif (definitions.some((definition) => definition.name === propertyName)) {\n\t\treturn;\n\t}\n\n\tdefinitions.push({ name: propertyName, options });\n\tconstructor[REACTIVE_PROP_DEFINITIONS] = definitions;\n}\n\nexport function getReactivePropDefinitions(target: object): ReactivePropDefinition[] {\n\treturn ((target.constructor as RadiantConstructorWithReactiveProps)[REACTIVE_PROP_DEFINITIONS] ?? []).slice();\n}\n",
10
+ "export type LegacyPostConstructionPhase = 'connect' | 'ssr';\n\ntype LegacyInstanceInitializer<T extends object = object> = (instance: T) => void;\ntype LegacyPostConstructionInitializer<T extends object = object> = (\n\tinstance: T,\n\tphase: LegacyPostConstructionPhase,\n) => void;\n\nconst LEGACY_INSTANCE_INITIALIZERS = Symbol.for('@ecopages/radiant.legacy-instance-initializers');\nconst LEGACY_POST_CONSTRUCTION_INITIALIZERS = Symbol.for('@ecopages/radiant.legacy-post-construction-initializers');\nconst LEGACY_EXECUTED_POST_CONSTRUCTION_INITIALIZERS = Symbol.for(\n\t'@ecopages/radiant.legacy-executed-post-construction-initializers',\n);\n\n/**\n * Registers per-instance initialization work for a legacy decorator.\n *\n * Legacy decorators execute against the prototype, so any initialization that\n * needs the concrete element instance must be deferred until construction time.\n */\nexport function registerLegacyInstanceInitializer<T extends object>(\n\tproto: T,\n\tinitializer: LegacyInstanceInitializer<T>,\n): void {\n\tregisterInitializer(proto, LEGACY_INSTANCE_INITIALIZERS, initializer);\n}\n\n/**\n * Registers post-construction work for a legacy decorator.\n *\n * This phase exists for decorators that eagerly write instance fields. With\n * legacy decorators plus `useDefineForClassFields`, subclass field definition\n * can overwrite values written during the base-class constructor.\n */\nexport function registerLegacyPostConstructionInitializer<T extends object>(\n\tproto: T,\n\tinitializer: LegacyPostConstructionInitializer<T>,\n): void {\n\tregisterInitializer(proto, LEGACY_POST_CONSTRUCTION_INITIALIZERS, initializer);\n}\n\n/**\n * Runs all legacy decorator initializers for a newly constructed element.\n *\n * Initializers are collected from the prototype chain and executed from base to\n * derived class so inherited setup remains stable.\n */\nexport function runLegacyInstanceInitializers<T extends object>(instance: T): void {\n\trunLegacyInitializers(instance, LEGACY_INSTANCE_INITIALIZERS);\n}\n\n/**\n * Runs legacy decorator setup that must happen after subclass field\n * initialization has completed.\n *\n * Each initializer runs at most once per instance even if multiple lifecycle\n * entrypoints call this helper.\n */\nexport function runLegacyPostConstructionInitializers<T extends object>(\n\tinstance: T,\n\tphase: LegacyPostConstructionPhase,\n): void {\n\tconst target = instance as Record<PropertyKey, unknown>;\n\n\trunLegacyPostConstructionInitializersOnPrototypeChain(\n\t\tinstance,\n\t\tphase,\n\t\t(target[LEGACY_EXECUTED_POST_CONSTRUCTION_INITIALIZERS] ??= new Set()) as Set<\n\t\t\tLegacyPostConstructionInitializer<T>\n\t\t>,\n\t);\n}\n\nfunction registerInitializer<T extends object>(\n\tproto: T,\n\tkey: symbol,\n\tinitializer: LegacyInstanceInitializer<T> | LegacyPostConstructionInitializer<T>,\n): void {\n\tconst target = proto as Record<PropertyKey, unknown>;\n\tconst ownInitializers = Object.prototype.hasOwnProperty.call(target, key) ? target[key] : undefined;\n\n\tif (Array.isArray(ownInitializers)) {\n\t\townInitializers.push(initializer);\n\t\treturn;\n\t}\n\n\tObject.defineProperty(target, key, {\n\t\tvalue: [initializer],\n\t});\n}\n\nfunction runLegacyInitializers<T extends object>(instance: T, key: symbol): void {\n\twalkPrototypeChain(instance, (prototype) => {\n\t\tconst initializers = (prototype as Record<PropertyKey, unknown>)[key] as\n\t\t\tLegacyInstanceInitializer<T>[] | undefined;\n\n\t\tif (!Array.isArray(initializers)) {\n\t\t\treturn;\n\t\t}\n\n\t\tfor (const initializer of initializers) {\n\t\t\tinitializer(instance);\n\t\t}\n\t});\n}\n\nfunction runLegacyPostConstructionInitializersOnPrototypeChain<T extends object>(\n\tinstance: T,\n\tphase: LegacyPostConstructionPhase,\n\texecutedInitializers: Set<LegacyPostConstructionInitializer<T>>,\n): void {\n\tfor (const prototype of collectPrototypeChain(instance)) {\n\t\tconst initializers = (prototype as Record<PropertyKey, unknown>)[LEGACY_POST_CONSTRUCTION_INITIALIZERS] as\n\t\t\tLegacyPostConstructionInitializer<T>[] | undefined;\n\n\t\tif (!Array.isArray(initializers)) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tfor (const initializer of initializers) {\n\t\t\tif (executedInitializers.has(initializer)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tinitializer(instance, phase);\n\t\t\texecutedInitializers.add(initializer);\n\t\t}\n\t}\n}\n\nfunction collectPrototypeChain<T extends object>(instance: T): object[] {\n\tconst prototypes: object[] = [];\n\tlet prototype: object | null = Object.getPrototypeOf(instance);\n\n\twhile (prototype && prototype !== Object.prototype) {\n\t\tprototypes.unshift(prototype);\n\t\tprototype = Object.getPrototypeOf(prototype);\n\t}\n\n\treturn prototypes;\n}\n\nfunction walkPrototypeChain<T extends object>(instance: T, visit: (prototype: object) => void): void {\n\tfor (const prototype of collectPrototypeChain(instance)) {\n\t\tvisit(prototype);\n\t}\n}\n",
11
+ "import { runLegacyInstanceInitializers, runLegacyPostConstructionInitializers } from './instance-initializers';\n\nexport type LegacyHostReadinessPhase = 'construct' | 'connect' | 'ssr';\n\n/**\n * Runs legacy decorator initialization for the requested lifecycle phase.\n *\n * Post-construction work is idempotent — multiple calls with `connect` or `ssr`\n * only execute each registered initializer once per instance.\n */\nexport function ensureLegacyHostReady<T extends object>(host: T, phase: LegacyHostReadinessPhase): void {\n\tswitch (phase) {\n\t\tcase 'construct':\n\t\t\trunLegacyInstanceInitializers(host);\n\t\t\tbreak;\n\t\tcase 'connect':\n\t\t\trunLegacyPostConstructionInitializers(host, 'connect');\n\t\t\tbreak;\n\t\tcase 'ssr':\n\t\t\trunLegacyPostConstructionInitializers(host, 'ssr');\n\t\t\tbreak;\n\t}\n}\n",
12
+ "import type { RadiantElement } from '../core/radiant-element';\n\nexport type AttributeTypeConstant = typeof Array | typeof Boolean | typeof Number | typeof Object | typeof String;\n\nexport type AttributeTypeDefault = Array<unknown> | boolean | number | Record<string, unknown> | string;\n\n/**\n * Parses the given attribute type constant and returns its corresponding string representation.\n *\n * @param constant - The attribute type constant to parse.\n * @returns The string representation of the attribute type constant.\n */\nexport function parseAttributeTypeConstant(constant?: AttributeTypeConstant) {\n\tswitch (constant) {\n\t\tcase Array:\n\t\t\treturn 'array';\n\t\tcase Boolean:\n\t\t\treturn 'boolean';\n\t\tcase Number:\n\t\t\treturn 'number';\n\t\tcase Object:\n\t\t\treturn 'object';\n\t\tcase String:\n\t\t\treturn 'string';\n\t}\n}\n\n/**\n * Parses the attribute type default value and returns its type as a string.\n *\n * @param defaultValue - The default value of the attribute type.\n * @returns The type of the default value as a string.\n */\nexport function parseAttributeTypeDefault(defaultValue?: AttributeTypeDefault) {\n\tswitch (typeof defaultValue) {\n\t\tcase 'boolean':\n\t\t\treturn 'boolean';\n\t\tcase 'number':\n\t\t\treturn 'number';\n\t\tcase 'string':\n\t\t\treturn 'string';\n\t}\n\n\tif (Array.isArray(defaultValue)) return 'array';\n\tif (Object.prototype.toString.call(defaultValue) === '[object Object]') return 'object';\n}\n\n/**\n * Returns the default value for a given attribute type.\n *\n * @param type - The attribute type constant.\n * @returns The default value for the specified attribute type.\n */\nexport function defaultValueForType(type: AttributeTypeConstant): unknown {\n\tswitch (type) {\n\t\tcase Number:\n\t\t\treturn 0;\n\t\tcase String:\n\t\t\treturn '';\n\t\tcase Boolean:\n\t\t\treturn false;\n\t\tdefault:\n\t\t\treturn null;\n\t}\n}\n\ntype Reader = (value: string) => number | string | boolean | object | unknown[];\n\n/**\n * Utility function to parse a JSON string safely\n */\nfunction parseJSON<T>(value: string): T {\n\ttry {\n\t\treturn JSON.parse(value);\n\t} catch {\n\t\tthrow new TypeError('Invalid JSON string');\n\t}\n}\n\n/**\n * Object that maps attribute types to reader functions.\n * @type {Object.<string, Reader>}\n */\nconst readers: { [type: string]: Reader } = {\n\tarray(value: string): unknown[] {\n\t\tconst array = parseJSON<unknown[]>(value);\n\t\tif (!Array.isArray(array)) {\n\t\t\tthrow new TypeError(`Expected an array but got a value of type \"${typeof array}\"`);\n\t\t}\n\t\treturn array;\n\t},\n\n\tboolean(value: string): boolean {\n\t\treturn !(value === '0' || String(value).toLowerCase() === 'false');\n\t},\n\n\tnumber(value: string): number {\n\t\tconst number = Number(value.replace(/_/g, ''));\n\t\treturn number;\n\t},\n\n\tobject(value: string): object {\n\t\tconst object = JSON.parse(value);\n\t\tif (object === null || typeof object !== 'object' || Array.isArray(object)) {\n\t\t\tthrow new TypeError(\n\t\t\t\t`expected value of type \"object\" but instead got value \"${value}\" of type \"${parseAttributeTypeDefault(\n\t\t\t\t\tobject,\n\t\t\t\t)}\"`,\n\t\t\t);\n\t\t}\n\t\treturn object;\n\t},\n\n\tstring(value: string): string {\n\t\treturn value;\n\t},\n};\n\ntype Writer = (value: unknown) => string;\n\n/**\n * Object that maps attribute types to writer functions.\n * @type {Object.<string, Writer>}\n */\nconst writers: { [type: string]: Writer } = {\n\tdefault: writeString,\n\tarray: writeJSON,\n\tobject: writeJSON,\n};\n\nfunction writeJSON(value: unknown) {\n\treturn JSON.stringify(value);\n}\n\nfunction writeString(value: unknown) {\n\treturn `${value}`;\n}\n\n/**\n * Reads the attribute value based on the provided type.\n * @param value - The attribute value to be read.\n * @param type - The type of the attribute.\n * @returns The parsed attribute value.\n * @throws {TypeError} If the provided type is unknown.\n */\nexport function readAttributeValue(value: string, type: AttributeTypeConstant) {\n\tconst readerType = parseAttributeTypeConstant(type);\n\tif (!readerType) throw new TypeError(`[radiant-element] Unknown type \"${type}\"`);\n\treturn readers[readerType]!(value);\n}\n\nexport type ReadAttributeValueReturnType = ReturnType<typeof readAttributeValue>;\n\n/**\n * Writes the attribute value based on the provided type.\n *\n * @param value - The value to be written.\n * @param type - The type of the attribute.\n * @returns The written attribute value.\n * @throws {TypeError} If the provided type is unknown.\n */\nexport function writeAttributeValue(value: unknown, type: AttributeTypeConstant) {\n\tconst writerType = parseAttributeTypeConstant(type);\n\tif (!writerType) throw new TypeError(`[radiant-element] Unknown type \"${type}\"`);\n\tconst writer: Writer = writers[writerType] ?? writers.default ?? writeString;\n\treturn writer(value);\n}\n\nexport type WriteAttributeValueReturnType = ReturnType<typeof writeAttributeValue>;\n\n/*\n * Type guard functions for each type in AttributeTypeConstant\n */\nfunction isBoolean(value: unknown): value is boolean {\n\treturn typeof value === 'boolean';\n}\n\nfunction isNumber(value: unknown): value is number {\n\treturn typeof value === 'number';\n}\n\nfunction isString(value: unknown): value is string {\n\treturn typeof value === 'string';\n}\n\nfunction isArray(value: unknown): value is Array<unknown> {\n\treturn Array.isArray(value);\n}\n\nfunction isObject(value: unknown): value is object {\n\treturn typeof value === 'object' && !Array.isArray(value) && value !== null;\n}\n\n/*\n * Check function to ensure defaultValue matches the type\n */\nexport function isValueOfType(type: AttributeTypeConstant, defaultValue: unknown): boolean {\n\tswitch (type) {\n\t\tcase Boolean:\n\t\t\treturn isBoolean(defaultValue);\n\t\tcase Number:\n\t\t\treturn isNumber(defaultValue);\n\t\tcase String:\n\t\t\treturn isString(defaultValue);\n\t\tcase Array:\n\t\t\treturn isArray(defaultValue);\n\t\tcase Object:\n\t\t\treturn isObject(defaultValue);\n\t\tdefault:\n\t\t\treturn false;\n\t}\n}\n\nexport const getInitialValue = (\n\ttarget: RadiantElement,\n\ttype: AttributeTypeConstant,\n\tattributeKey: string,\n\tdefaultValue: unknown,\n) => {\n\tif (type === Boolean) {\n\t\tconst attributeValue = target.getAttribute(attributeKey);\n\t\tif (attributeValue === null) {\n\t\t\treturn defaultValue;\n\t\t}\n\n\t\treturn attributeValue === '' ? true : readAttributeValue(attributeValue, type);\n\t}\n\n\tconst attributeValue = target.getAttribute(attributeKey);\n\treturn attributeValue !== null\n\t\t? readAttributeValue(attributeValue, type)\n\t\t: (defaultValue ?? (defaultValueForType(type) as typeof defaultValue));\n};\n",
13
+ "import type { JsxRenderable } from '@ecopages/jsx';\nimport { getActiveSsrScopeValue, type RenderToStringOptions, withActiveSsrScopeValue } from '@ecopages/jsx/server';\nimport type { InternalRadiantSsrHost } from './radiant-element-ssr-host';\n\nexport type RadiantElementRenderBridge = {\n\trenderHost?: () => JsxRenderable;\n\trenderHostToString?: (options?: RenderToStringOptions) => string;\n};\n\nexport type RadiantElementServerRenderSsrCapable = Omit<InternalRadiantSsrHost, 'constructor'> & {\n\tconstructor: Function;\n};\n\nexport type RadiantElementTrackedRenderSsrCapable = RadiantElementServerRenderSsrCapable;\n\nexport type RadiantElementSsrRuntime = {\n\tgetHostAttributes(component: InternalRadiantSsrHost): Record<string, string>;\n\trenderHost(component: InternalRadiantSsrHost): JsxRenderable;\n\trenderHostToString(component: InternalRadiantSsrHost, options?: RenderToStringOptions): string;\n\tresolveRenderBridge(component: object): RadiantElementRenderBridge | undefined;\n\trenderView(component: InternalRadiantSsrHost, options?: RenderToStringOptions): string;\n};\n\nconst RADIANT_ELEMENT_SSR_RUNTIME_SYMBOL = Symbol.for('@ecopages/radiant.element-ssr-runtime');\n\nexport function getRadiantElementSsrRuntime(): RadiantElementSsrRuntime | undefined {\n\treturn getActiveSsrScopeValue<RadiantElementSsrRuntime>(RADIANT_ELEMENT_SSR_RUNTIME_SYMBOL);\n}\n\nexport function withRadiantElementSsrRuntime<T>(runtime: RadiantElementSsrRuntime, render: () => T): T {\n\treturn withActiveSsrScopeValue(RADIANT_ELEMENT_SSR_RUNTIME_SYMBOL, runtime, render);\n}\n",
14
+ "export const CUSTOM_ELEMENT_TAG_NAME = Symbol.for('@ecopages/radiant.customElementTagName');\n\ntype CustomElementConstructorWithMetadata = CustomElementConstructor & {\n\t[CUSTOM_ELEMENT_TAG_NAME]?: string;\n};\n\n/**\n * Sets the custom element tag name for a given constructor.\n * This is used internally to associate a class with its custom element tag, which is necessary for features like hydration and SSR support.\n * @param target The constructor of the custom element.\n * @param tagName The tag name to associate with the custom element.\n */\nexport function setCustomElementTagName(target: CustomElementConstructor, tagName: string): void {\n\t(target as CustomElementConstructorWithMetadata)[CUSTOM_ELEMENT_TAG_NAME] = tagName;\n}\n\n/**\n * Retrieves the custom element tag name associated with a given constructor.\n * @param target The constructor of the custom element.\n * @returns The tag name associated with the custom element, or `undefined` if not set.\n */\nexport function getCustomElementTagName(target: CustomElementConstructor): string | undefined {\n\treturn (target as CustomElementConstructorWithMetadata)[CUSTOM_ELEMENT_TAG_NAME];\n}\n",
15
+ "export function escapeCssIdentifier(value: string): string {\n\tconst cssNamespace = globalThis.CSS as { escape?: (value: string) => string } | undefined;\n\n\tif (typeof cssNamespace?.escape === 'function') {\n\t\treturn cssNamespace.escape(value);\n\t}\n\n\tlet escaped = '';\n\n\tfor (let index = 0; index < value.length; index += 1) {\n\t\tconst character = value[index] ?? '';\n\t\tconst codePoint = character.codePointAt(0) ?? 0;\n\n\t\tif (codePoint === 0) {\n\t\t\tescaped += '\\uFFFD';\n\t\t\tcontinue;\n\t\t}\n\n\t\tconst isControlCharacter = (codePoint >= 0x0001 && codePoint <= 0x001f) || codePoint === 0x007f;\n\t\tconst startsWithDigit = index === 0 && codePoint >= 0x0030 && codePoint <= 0x0039;\n\t\tconst startsWithHyphenDigit =\n\t\t\tindex === 1 && codePoint >= 0x0030 && codePoint <= 0x0039 && (value[0] ?? '') === '-';\n\t\tconst isSingleHyphen = index === 0 && character === '-' && value.length === 1;\n\n\t\tif (isControlCharacter || startsWithDigit || startsWithHyphenDigit) {\n\t\t\tescaped += `\\\\${codePoint.toString(16)} `;\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (\n\t\t\tcodePoint >= 0x0080 ||\n\t\t\tcharacter === '-' ||\n\t\t\tcharacter === '_' ||\n\t\t\t(codePoint >= 0x0030 && codePoint <= 0x0039) ||\n\t\t\t(codePoint >= 0x0041 && codePoint <= 0x005a) ||\n\t\t\t(codePoint >= 0x0061 && codePoint <= 0x007a)\n\t\t) {\n\t\t\tescaped += isSingleHyphen ? `\\\\${character}` : character;\n\t\t\tcontinue;\n\t\t}\n\n\t\tescaped += `\\\\${character}`;\n\t}\n\n\treturn escaped;\n}\n",
16
+ "import type { ReactiveProperty } from '../core/reactive-prop-core';\nimport type { ReactivePropDefinition } from '../core/reactive-prop-metadata';\nimport { writeAttributeValue } from '../utils/attribute-utils';\nimport { escapeHtmlAttribute } from '../utils/escape-html-attribute';\n\n/**\n * Minimal host shape needed by the attribute serialization policy.\n *\n * This interface defines the narrow contract that the serialization module\n * consumes, keeping it independent of the full {@link RadiantElementSsrHost}.\n */\nexport type HostAttributeSource = {\n\tgetReactiveProperties: () => ReactiveProperty[];\n\tgetReactivePropDefinitions: () => ReactivePropDefinition[];\n\tgetPropertyValue: (name: string) => unknown;\n\tgetAttributeNames: () => string[];\n\tgetAttribute: (name: string) => string | null;\n};\n\n/**\n * Resolves the final set of SSR host attributes from a Radiant Element Host.\n *\n * ## Source precedence (highest to lowest)\n *\n * 1. **Reactive properties** — legacy attribute reflection via `property.converter`.\n * These are already-registered reactive properties with established converters.\n * Falsy values (`undefined`, `null`, `false`) are omitted.\n *\n * 2. **Reactive prop definitions** — decorator-based definitions. Skipped when the\n * target attribute name was already emitted by source 1 (dedup via `seenAttributes`).\n * Uses `writeAttributeValue` for type-aware conversion.\n *\n * 3. **Authored attributes** — raw host-level attributes from the original markup.\n * These always win if present, regardless of whether sources 1 or 2 already\n * set the same name. This preserves explicit author intent in templates.\n *\n * @param host Host shape providing reactive state and attribute accessors.\n * @returns Flat record of attribute name → serialized value.\n */\nexport function resolveHostAttributes(host: HostAttributeSource): Record<string, string> {\n\tconst attributes: Record<string, string> = {};\n\tconst seenAttributes = new Set<string>();\n\n\tappendReactivePropertyAttributes(host, attributes, seenAttributes);\n\tappendReactivePropDefinitionAttributes(host, attributes, seenAttributes);\n\tappendAuthoredAttributes(host, attributes);\n\n\treturn attributes;\n}\n\n/**\n * Serializes a flat attribute record into an HTML attribute string.\n *\n * Each entry becomes ` name=\"escaped-value\"` with the leading space included.\n * The combined string is safe for direct interpolation into an opening tag.\n *\n * @param attributes Flat attribute record to serialize.\n * @returns HTML attribute string.\n */\nexport function stringifyHostAttributes(attributes: Record<string, string>): string {\n\treturn Object.entries(attributes)\n\t\t.map(([name, value]) => ` ${name}=\"${escapeHtmlAttribute(value)}\"`)\n\t\t.join('');\n}\n\n/**\n * Source 1: Reactive properties with established converters.\n *\n * Falsy runtime values are omitted — they should not appear as attributes\n * in SSR output.\n */\nfunction appendReactivePropertyAttributes(\n\thost: HostAttributeSource,\n\tattributes: Record<string, string>,\n\tseenAttributes: Set<string>,\n): void {\n\tfor (const property of host.getReactiveProperties()) {\n\t\tconst currentValue = host.getPropertyValue(property.name);\n\t\tif (currentValue === undefined || currentValue === null || currentValue === false) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tattributes[property.attribute] = String(property.converter.toAttribute(currentValue));\n\t\tseenAttributes.add(property.attribute);\n\t}\n}\n\n/**\n * Source 2: Decorator-based reactive prop definitions.\n *\n * Skipped when the attribute name was already emitted by source 1, preventing\n * duplicate or conflicting attribute values.\n */\nfunction appendReactivePropDefinitionAttributes(\n\thost: HostAttributeSource,\n\tattributes: Record<string, string>,\n\tseenAttributes: Set<string>,\n): void {\n\tfor (const definition of host.getReactivePropDefinitions()) {\n\t\tconst attributeName = definition.options.attribute ?? definition.name;\n\n\t\tif (seenAttributes.has(attributeName)) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tconst currentValue = host.getPropertyValue(definition.name);\n\n\t\tif (currentValue === undefined || currentValue === null || currentValue === false) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tattributes[attributeName] = String(writeAttributeValue(currentValue, definition.options.type));\n\t\tseenAttributes.add(attributeName);\n\t}\n}\n\n/**\n * Source 3: Authored attributes from the original markup.\n *\n * These always overwrite — when an author explicitly sets an attribute in\n * markup, that intent takes precedence over reactive property reflection.\n */\nfunction appendAuthoredAttributes(host: HostAttributeSource, attributes: Record<string, string>): void {\n\tfor (const attributeName of host.getAttributeNames()) {\n\t\tconst attributeValue = host.getAttribute(attributeName);\n\t\tif (attributeValue !== null) {\n\t\t\tattributes[attributeName] = attributeValue;\n\t\t}\n\t}\n}\n",
17
+ "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",
18
+ "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));\n",
19
+ "/**\n * Host script composition for Radiant SSR.\n *\n * This module owns the mode-sensitive ordering and inclusion rules for the\n * script payloads that appear inside a server-rendered Element Host.\n *\n * ## Composition rules\n *\n * | Mode | Order |\n * |-----------|-----------------------------------------------------------------|\n * | `plain` | view content → authored hydration markup → slot projection |\n * | `hydrate` | view content → slot projection → hydration binding scripts |\n *\n * In **plain** mode, authored hydration markup (script tags pre-authored on the\n * host) is preserved because the component may rely on them for standalone\n * behavior. Hydration binding scripts are omitted because there is no client\n * hydrator to consume them.\n *\n * In **hydrate** mode, authored hydration markup is superseded by the formal\n * hydration binding scripts. Slot projection comes before hydration scripts so\n * the client can reconstruct projected content before binding recovery.\n */\n\n/** Individual content parts that make up a server-rendered host's inner HTML. */\nexport type HostContentParts = {\n\t/** The rendered view HTML from `renderViewToString`. */\n\thostContent: string;\n\t/** Authored hydration script markup pre-existing on the host, if any. */\n\tauthoredHydrationMarkup: string;\n\t/** Slot projection JSON payload script tag, if any. */\n\tslotProjectionScript: string;\n\t/** Hydration binding script tags for client-side recovery, if any. */\n\thydrationScripts: string;\n};\n\n/**\n * Assembles the inner HTML of a server-rendered Element Host from its\n * individual content parts, respecting the mode-sensitive ordering rules.\n *\n * @param parts Individual content parts to compose.\n * @param hydrate Whether the output targets client-side hydration.\n * @returns Assembled inner HTML string.\n */\nexport function composeHostContent(parts: HostContentParts, hydrate: boolean): string {\n\tif (!hydrate) {\n\t\treturn `${parts.hostContent}${parts.authoredHydrationMarkup}${parts.slotProjectionScript}`;\n\t}\n\n\treturn `${parts.hostContent}${parts.slotProjectionScript}${parts.hydrationScripts}`;\n}\n",
20
+ "import type { JsxRenderable } from '@ecopages/jsx';\nimport type { RenderToStringOptions } from '@ecopages/jsx/server';\nimport type { SsrSerializableContextProvider } from '../context/context-provider';\nimport type { ReactiveProperty } from './reactive-prop-core';\nimport type { ReactivePropDefinition } from './reactive-prop-metadata';\nimport type { SsrSerializableHydrationBinding } from './ssr-hydration-binding';\n\n/**\n * Unified SSR host shape shared by core resolution and server serialization.\n */\nexport type InternalRadiantSsrHost = {\n\tconstructor: CustomElementConstructor;\n\tgetAttribute(name: string): string | null;\n\tgetAttributeNames(): string[];\n\tgetAuthoredHydrationScriptMarkup?: () => string | undefined;\n\tgetContextProviders: () => SsrSerializableContextProvider[];\n\tgetHydrationBindings: () => SsrSerializableHydrationBinding[];\n\tgetReactiveProperties: () => ReactiveProperty[];\n\tgetReactivePropDefinitions: () => ReactivePropDefinition[];\n\tgetPropertyValue: (name: string) => unknown;\n\tgetSlotProjectionScriptTag?: () => string | undefined;\n\tresolveTrackedRenderOutput: () => { containsSlots: boolean; value: JsxRenderable };\n\trenderViewToString: (options?: RenderToStringOptions) => string;\n};\n\nexport type RadiantElementSsrHostSource = InternalRadiantSsrHost;\n\nexport function resolveRadiantElementSsrHostSource(component: object): InternalRadiantSsrHost | undefined {\n\tif (isInternalRadiantSsrHost(component)) {\n\t\treturn component;\n\t}\n\n\treturn undefined;\n}\n\nexport function isInternalRadiantSsrHost(component: object): component is InternalRadiantSsrHost {\n\treturn (\n\t\ttypeof component.constructor === 'function' &&\n\t\ttypeof (component as { getAttribute?: unknown }).getAttribute === 'function' &&\n\t\ttypeof (component as { getAttributeNames?: unknown }).getAttributeNames === 'function' &&\n\t\ttypeof (component as { getAuthoredHydrationScriptMarkup?: unknown }).getAuthoredHydrationScriptMarkup ===\n\t\t\t'function' &&\n\t\ttypeof (component as { getContextProviders?: unknown }).getContextProviders === 'function' &&\n\t\ttypeof (component as { getHydrationBindings?: unknown }).getHydrationBindings === 'function' &&\n\t\ttypeof (component as { getReactiveProperties?: unknown }).getReactiveProperties === 'function' &&\n\t\ttypeof (component as { getSlotProjectionScriptTag?: unknown }).getSlotProjectionScriptTag === 'function' &&\n\t\ttypeof (component as { resolveTrackedRenderOutput?: unknown }).resolveTrackedRenderOutput === 'function' &&\n\t\ttypeof (component as { renderViewToString?: unknown }).renderViewToString === 'function'\n\t);\n}\n",
21
+ "import { getReactivePropDefinitions } from '../core/reactive-prop-metadata';\nimport { resolveRadiantElementSsrHostSource } from '../core/radiant-element-ssr-host';\nimport type { InternalRadiantSsrHost } from './internal-radiant-host';\n\nexport function toInternalRadiantSsrHost(component: object): InternalRadiantSsrHost {\n\tconst source = resolveRadiantElementSsrHostSource(component);\n\n\tif (!source) {\n\t\tthrow new Error('Radiant SSR runtime requires a server extraction host shape on the component.');\n\t}\n\n\treturn {\n\t\tconstructor: source.constructor as CustomElementConstructor,\n\t\tgetAttribute: (name) => source.getAttribute(name),\n\t\tgetAttributeNames: () => source.getAttributeNames(),\n\t\tgetAuthoredHydrationScriptMarkup: () => source.getAuthoredHydrationScriptMarkup?.(),\n\t\tgetContextProviders: () => source.getContextProviders(),\n\t\tgetHydrationBindings: () => source.getHydrationBindings(),\n\t\tgetReactiveProperties: () => source.getReactiveProperties(),\n\t\tgetReactivePropDefinitions: () => getReactivePropDefinitions(component),\n\t\tgetPropertyValue: (name) => Reflect.get(component, name),\n\t\tgetSlotProjectionScriptTag: () => source.getSlotProjectionScriptTag?.(),\n\t\tresolveTrackedRenderOutput: () => source.resolveTrackedRenderOutput(),\n\t\trenderViewToString: (options) => source.renderViewToString(options),\n\t};\n}\n",
22
+ "import type { JsxRenderable } from '@ecopages/jsx';\nimport type { RenderToStringOptions } from '@ecopages/jsx/server';\nimport { getCustomElementTagName } from '../core/custom-element-metadata';\nimport { withSsrContextProviders } from './context-ssr';\nimport { composeHostContent } from './host-script-composition';\nimport { resolveHostAttributes, stringifyHostAttributes } from './host-attribute-serialization';\nimport { ensureLegacyHostReady } from '../decorators/legacy/host-readiness';\nimport { toInternalRadiantSsrHost } from './radiant-element-ssr-extractor';\nimport type { InternalRadiantSsrHost } from '../core/radiant-element-ssr-host';\n\nexport class RadiantElementSsrService {\n\tprivate readonly component: object;\n\tprivate readonly host: InternalRadiantSsrHost;\n\n\tconstructor(component: object) {\n\t\tthis.component = component;\n\t\tthis.host = toInternalRadiantSsrHost(component);\n\t}\n\n\tprivate ensureReady(): void {\n\t\tensureLegacyHostReady(this.component, 'ssr');\n\t}\n\n\tpublic renderHost(): JsxRenderable {\n\t\tthis.ensureReady();\n\n\t\treturn {\n\t\t\tnodeType: 1,\n\t\t\touterHTML: this.renderHostToString({ mode: 'hydrate' }),\n\t\t};\n\t}\n\n\tpublic renderHostToString(options: RenderToStringOptions = {}, attributes = this.getHostAttributes()): string {\n\t\tthis.ensureReady();\n\t\tconst tagName = this.getTagName();\n\t\tconst restoreSsrContexts = withSsrContextProviders(this.host.getContextProviders());\n\n\t\ttry {\n\t\t\treturn `<${tagName}${stringifyHostAttributes(attributes)}>${this.renderHostContent(options)}</${tagName}>`;\n\t\t} finally {\n\t\t\trestoreSsrContexts();\n\t\t}\n\t}\n\n\tpublic getHostAttributes(): Record<string, string> {\n\t\tthis.ensureReady();\n\t\treturn resolveHostAttributes(this.host);\n\t}\n\n\tprivate renderHostContent(options: RenderToStringOptions): string {\n\t\tconst hydrate = options.mode === 'hydrate' || (options.mode === undefined && options.hydrate === true);\n\n\t\tconst hydrationScripts = hydrate\n\t\t\t? this.host\n\t\t\t\t\t.getHydrationBindings()\n\t\t\t\t\t.map((binding) => binding.renderHydrationScriptTag())\n\t\t\t\t\t.filter((markup): markup is string => typeof markup === 'string')\n\t\t\t\t\t.join('')\n\t\t\t: '';\n\n\t\treturn composeHostContent(\n\t\t\t{\n\t\t\t\thostContent: this.host.renderViewToString(options),\n\t\t\t\tauthoredHydrationMarkup: this.host.getAuthoredHydrationScriptMarkup?.() ?? '',\n\t\t\t\tslotProjectionScript: this.host.getSlotProjectionScriptTag?.() ?? '',\n\t\t\t\thydrationScripts,\n\t\t\t},\n\t\t\thydrate,\n\t\t);\n\t}\n\n\tprivate getTagName(): string {\n\t\tconst tagName = getCustomElementTagName(this.host.constructor);\n\n\t\tif (!tagName) {\n\t\t\tthrow new Error(`${this.host.constructor.name} is missing @customElement metadata.`);\n\t\t}\n\n\t\treturn tagName;\n\t}\n}\n",
23
+ "import type { JsxRenderable } from '@ecopages/jsx';\nimport type { RenderToStringOptions } from '@ecopages/jsx/server';\nimport { renderToString as renderJsxToString } from '@ecopages/jsx/server';\nimport {\n\tcreateServerHydrationBindingState,\n\tisServerRenderHydrationActive,\n\twithForcedServerCustomElementRendering,\n\twithServerCustomElementRenderHook,\n\twithServerHydrationBindingState,\n} from '@ecopages/jsx/server';\nimport { RadiantElementSsrService } from './radiant-element-ssr-service';\nimport { resolveRadiantElementSsrHostSource as resolveInternalRadiantElementSsrHostSource } from '../core/radiant-element-ssr-host';\nimport type {\n\tRadiantElementRenderBridge,\n\tRadiantElementServerRenderSsrCapable,\n\tRadiantElementSsrRuntime,\n\tRadiantElementTrackedRenderSsrCapable,\n} from '../core/radiant-element-ssr-registry';\nimport { withRadiantElementSsrRuntime } from '../core/radiant-element-ssr-registry';\n\nlet radiantElementSsrRuntime: RadiantElementSsrRuntime | undefined;\n\nexport function createRadiantElementSsrService(component: object): RadiantElementSsrService {\n\treturn new RadiantElementSsrService(component);\n}\n\nexport function renderRadiantElementHost(component: RadiantElementServerRenderSsrCapable): JsxRenderable {\n\treturn {\n\t\tnodeType: 1,\n\t\touterHTML: renderRadiantElementHostToString(component, { mode: 'hydrate' }),\n\t};\n}\n\nexport function renderRegisteredRadiantElementHost(component: unknown): JsxRenderable | undefined {\n\tif (isRadiantElementServerRenderable(component)) {\n\t\treturn renderRadiantElementHost(component);\n\t}\n\n\tif (!isLegacyServerRenderable(component)) {\n\t\treturn undefined;\n\t}\n\n\treturn component.renderHost?.() ?? { nodeType: 1, outerHTML: component.renderHostToString({ mode: 'hydrate' }) };\n}\n\nexport function renderRadiantElementHostToString(\n\tcomponent: RadiantElementServerRenderSsrCapable,\n\toptions: RenderToStringOptions = {},\n): string {\n\treturn withServerRadiantElementSsrRuntime(() =>\n\t\tcreateRadiantElementSsrService(component).renderHostToString(\n\t\t\toptions,\n\t\t\tgetRadiantElementHostSsrAttributes(component),\n\t\t),\n\t);\n}\n\nexport function renderRegisteredRadiantElementHostToString(\n\tcomponent: unknown,\n\toptions: RenderToStringOptions = {},\n): string | undefined {\n\tif (isRadiantElementServerRenderable(component)) {\n\t\treturn renderRadiantElementHostToString(component, options);\n\t}\n\n\tif (!isLegacyServerRenderable(component)) {\n\t\treturn undefined;\n\t}\n\n\treturn component.renderHostToString(options);\n}\n\nexport function resolveRegisteredRadiantElementPreview(component: unknown, markup: string): JsxRenderable | undefined {\n\tif (isRadiantElementServerRenderable(component)) {\n\t\treturn renderRadiantElementHost(component);\n\t}\n\n\tif (!isLegacyServerRenderable(component)) {\n\t\treturn undefined;\n\t}\n\n\treturn component.renderHost?.() ?? { nodeType: 1, outerHTML: markup };\n}\n\nexport function renderRadiantElementViewToString(\n\tcomponent: RadiantElementTrackedRenderSsrCapable,\n\toptions: RenderToStringOptions = {},\n): string {\n\treturn withServerRadiantElementSsrRuntime(() =>\n\t\twithRadiantServerCustomElementRenderBridge(() =>\n\t\t\trenderJsxToString(getRadiantElementTrackedRenderOutput(component).value, options),\n\t\t),\n\t);\n}\n\nexport function getRadiantElementHostSsrAttributes(\n\tcomponent: RadiantElementServerRenderSsrCapable,\n): Record<string, string> {\n\treturn createRadiantElementSsrService(component).getHostAttributes();\n}\n\nexport function resolveRadiantElementRenderBridge(component: object): RadiantElementRenderBridge | undefined {\n\tif (!isRadiantElementServerRenderable(component)) {\n\t\treturn undefined;\n\t}\n\n\treturn {\n\t\trenderHost: () => renderRadiantElementHost(component),\n\t\trenderHostToString: (options) => renderRadiantElementHostToString(component, options),\n\t};\n}\n\nexport function resolveRadiantElementSsrHostBridge(component: object): object | undefined {\n\treturn resolveInternalRadiantElementSsrHostSource(component);\n}\n\nexport function withRadiantServerCustomElementRenderBridge<T>(render: () => T): T {\n\treturn withForcedServerCustomElementRendering(() =>\n\t\twithServerCustomElementRenderHook(({ instance }) => {\n\t\t\tif (isRadiantElementServerRenderable(instance)) {\n\t\t\t\treturn {\n\t\t\t\t\tnodeType: 1,\n\t\t\t\t\tget outerHTML() {\n\t\t\t\t\t\tconst hydrate = isServerRenderHydrationActive();\n\t\t\t\t\t\tconst options: RenderToStringOptions = { hydrate, mode: hydrate ? 'hydrate' : 'plain' };\n\n\t\t\t\t\t\tif (!hydrate) {\n\t\t\t\t\t\t\treturn renderRadiantElementHostToString(instance, options);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn withServerHydrationBindingState(createServerHydrationBindingState(), () =>\n\t\t\t\t\t\t\trenderRadiantElementHostToString(instance, options),\n\t\t\t\t\t\t);\n\t\t\t\t\t},\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tif (!isLegacyServerRenderable(instance)) {\n\t\t\t\treturn undefined;\n\t\t\t}\n\n\t\t\tconst legacyInstance: { renderHostToString(options?: RenderToStringOptions): string } = instance;\n\n\t\t\treturn {\n\t\t\t\tnodeType: 1,\n\t\t\t\tget outerHTML() {\n\t\t\t\t\tconst hydrate = isServerRenderHydrationActive();\n\n\t\t\t\t\tif (!hydrate) {\n\t\t\t\t\t\treturn legacyInstance.renderHostToString({ hydrate, mode: hydrate ? 'hydrate' : 'plain' });\n\t\t\t\t\t}\n\n\t\t\t\t\treturn withServerHydrationBindingState(createServerHydrationBindingState(), () =>\n\t\t\t\t\t\tlegacyInstance.renderHostToString({ hydrate, mode: hydrate ? 'hydrate' : 'plain' }),\n\t\t\t\t\t);\n\t\t\t\t},\n\t\t\t};\n\t\t}, render),\n\t);\n}\n\nexport function getRadiantElementTrackedRenderOutput(component: RadiantElementTrackedRenderSsrCapable): {\n\tcontainsSlots: boolean;\n\tvalue: JsxRenderable;\n} {\n\tif (hasTrackedRenderOutput(component)) {\n\t\treturn component.resolveTrackedRenderOutput();\n\t}\n\n\tconst source = resolveInternalRadiantElementSsrHostSource(component);\n\n\tif (!source) {\n\t\tthrow new Error('Radiant SSR runtime requires tracked render output support on the component.');\n\t}\n\n\treturn source.resolveTrackedRenderOutput();\n}\n\nfunction isRadiantElementServerRenderable(component: unknown): component is RadiantElementServerRenderSsrCapable {\n\tif (typeof component !== 'object' || component === null) {\n\t\treturn false;\n\t}\n\n\treturn resolveInternalRadiantElementSsrHostSource(component) !== undefined;\n}\n\nfunction isLegacyServerRenderable(component: unknown): component is {\n\trenderHost?: () => JsxRenderable;\n\trenderHostToString(options?: RenderToStringOptions): string;\n} {\n\tif (typeof component !== 'object' || component === null) {\n\t\treturn false;\n\t}\n\n\treturn typeof (component as { renderHostToString?: unknown }).renderHostToString === 'function';\n}\n\nfunction hasTrackedRenderOutput(component: unknown): component is {\n\tresolveTrackedRenderOutput(): { containsSlots: boolean; value: JsxRenderable };\n} {\n\tif (typeof component !== 'object' || component === null) {\n\t\treturn false;\n\t}\n\n\treturn typeof (component as { resolveTrackedRenderOutput?: unknown }).resolveTrackedRenderOutput === 'function';\n}\n\nexport function getOrCreateRadiantElementSsrRuntime(): RadiantElementSsrRuntime {\n\tif (radiantElementSsrRuntime) {\n\t\treturn radiantElementSsrRuntime;\n\t}\n\n\tradiantElementSsrRuntime = {\n\t\tgetHostAttributes: getRadiantElementHostSsrAttributes,\n\t\trenderHost: renderRadiantElementHost,\n\t\trenderHostToString: renderRadiantElementHostToString,\n\t\tresolveRenderBridge: resolveRadiantElementRenderBridge,\n\t\trenderView: renderRadiantElementViewToString,\n\t};\n\n\treturn radiantElementSsrRuntime;\n}\n\nexport function withServerRadiantElementSsrRuntime<T>(render: () => T): T {\n\treturn withRadiantElementSsrRuntime(getOrCreateRadiantElementSsrRuntime(), render);\n}\n",
24
+ "import { MinimalHtmlScriptElement, MinimalHTMLElement, MinimalNode, MinimalTextNode } from './nodes';\n\nexport type MinimalCustomElementRegistry = {\n\tdefine(name: string, constructor: CustomElementConstructor, options?: ElementDefinitionOptions): void;\n\tget(name: string): CustomElementConstructor | undefined;\n};\n\nexport class MinimalDocument extends MinimalNode {\n\tconstructor() {\n\t\tsuper(MinimalNode.DOCUMENT_NODE);\n\t}\n\n\tcreateElement(tagName: string): HTMLElement {\n\t\treturn (tagName.toLowerCase() === 'script'\n\t\t\t? new MinimalHtmlScriptElement(this as unknown as Document)\n\t\t\t: new MinimalHTMLElement(tagName, this as unknown as Document)) as unknown as HTMLElement;\n\t}\n\n\tcreateTextNode(value: string): Text {\n\t\treturn new MinimalTextNode(value, this as unknown as Document) as unknown as Text;\n\t}\n\n\tquerySelector(): Element | null {\n\t\treturn null;\n\t}\n\n\tquerySelectorAll(): Element[] {\n\t\treturn [];\n\t}\n}\n\nexport class 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",
25
+ "import { escapeCssIdentifier } from '../../tools/escape-css-identifier';\nimport { MinimalCustomElementsRegistry, MinimalDocument, type MinimalCustomElementRegistry } from './document';\nimport {\n\tMinimalCustomEvent,\n\tMinimalElement,\n\tMinimalEvent,\n\tMinimalHtmlScriptElement,\n\tMinimalHTMLElement,\n\tMinimalNode,\n} from './nodes';\n\ntype MinimalCssNamespace = {\n\tescape(value: string): string;\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/** Document constructor exposed to SSR-created components. */\n\tDocument: typeof Document;\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/** Minimal document instance exposed to SSR-created components. */\n\tdocument: Document;\n\t/** Minimal CSS namespace exposed to SSR-created components. */\n\tCSS: MinimalCssNamespace;\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\nlet installedWindow: LightDomShimWindow | undefined;\n\nconst minimalCssNamespace: MinimalCssNamespace = {\n\tescape(value: string): string {\n\t\treturn escapeCssIdentifier(String(value));\n\t},\n};\n\nfunction getExistingWindowLike(): LightDomShimWindow | undefined {\n\tconst globalScope = globalThis as typeof globalThis & {\n\t\tCSS?: MinimalCssNamespace;\n\t\tCustomEvent?: typeof CustomEvent;\n\t\tDocument?: typeof Document;\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\tdocument?: Document;\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.Document === 'undefined' ||\n\t\ttypeof globalScope.Element === 'undefined' ||\n\t\ttypeof globalScope.HTMLElement === 'undefined' ||\n\t\ttypeof globalScope.document === '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\tCSS: globalScope.CSS ?? minimalCssNamespace,\n\t\t\tCustomEvent: (globalScope.CustomEvent ?? MinimalCustomEvent) as typeof CustomEvent,\n\t\t\tDocument: globalScope.Document,\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\tdocument: globalScope.document,\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 */\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 document = new MinimalDocument() as unknown as Document;\n\tconst EventConstructor = (globalThis.Event ?? MinimalEvent) as typeof Event;\n\tconst CustomEventConstructor = (globalThis.CustomEvent ?? MinimalCustomEvent) as typeof CustomEvent;\n\tconst DocumentConstructor = MinimalDocument as unknown as typeof Document;\n\tconst EventTargetConstructor = (globalThis.EventTarget ?? EventTarget) as typeof EventTarget;\n\tinstalledWindow = {\n\t\tCSS: (globalThis.CSS as MinimalCssNamespace | undefined) ?? minimalCssNamespace,\n\t\tCustomEvent: CustomEventConstructor,\n\t\tDocument: DocumentConstructor,\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\tdocument,\n\t\tcustomElements,\n\t};\n\n\tObject.assign(globalThis, {\n\t\tCSS: (globalThis.CSS as MinimalCssNamespace | undefined) ?? minimalCssNamespace,\n\t\tCustomEvent: CustomEventConstructor,\n\t\tDocument: DocumentConstructor,\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\tdocument,\n\t\tcustomElements,\n\t\twindow: installedWindow,\n\t});\n\n\treturn installedWindow;\n}\n",
26
+ "import type { RenderedComponent, RenderedComponentPayload, RenderedComponentWithPreview } from './render-component';\n\n/** Returns the current time for deterministic SSR metadata in tests. */\nexport function createDefaultRenderTimestamp(): Date {\n\treturn new Date();\n}\n\n/** Converts a canonical render result into a flat transport payload. */\nexport function toRenderedComponentPayload(\n\trender: RenderedComponentWithPreview | RenderedComponent,\n): RenderedComponentPayload {\n\tif ('metadata' in render) {\n\t\treturn {\n\t\t\tassets: render.metadata.assets,\n\t\t\tclientModuleSrc: render.metadata.clientModuleUrl,\n\t\t\tgeneratedAt: render.metadata.generatedAt,\n\t\t\tmarkup: render.markup,\n\t\t\ttagName: render.metadata.tagName,\n\t\t};\n\t}\n\n\tconst { preview: _preview, ...payload } = render;\n\treturn payload;\n}\n\n/** Adds preview fields to a canonical render result. */\nexport function toRenderedComponentWithPreview(render: RenderedComponent): RenderedComponentWithPreview {\n\treturn {\n\t\tassets: render.metadata.assets,\n\t\tclientModuleSrc: render.metadata.clientModuleUrl,\n\t\tgeneratedAt: render.metadata.generatedAt,\n\t\tmarkup: render.markup,\n\t\tpreview: render.preview,\n\t\ttagName: render.metadata.tagName,\n\t};\n}\n",
27
+ "import type { JsxRenderable } from '@ecopages/jsx';\nimport type { RenderToStringOptions } from '@ecopages/jsx/server';\nimport type { SsrSerializableContextProvider } from '../context/context-provider';\nimport { withSsrContextProviders } from './context-ssr';\nimport type { ContextType, UnknownContext } from '../context/types';\nimport { getCustomElementTagName } from '../core/custom-element-metadata';\nimport { ensureLegacyHostReady } from '../decorators/legacy/host-readiness';\nimport { createServerRenderEnvironment, type ServerRenderEnvironment } from './light-dom-shim';\nimport {\n\tresolveRegisteredRadiantElementPreview,\n\trenderRegisteredRadiantElementHost,\n\trenderRegisteredRadiantElementHostToString,\n} from './radiant-element-ssr-bridge';\nimport { withRadiantElementSsrRuntime } from '../core/radiant-element-ssr-registry';\nimport { getOrCreateRadiantElementSsrRuntime } from './radiant-element-ssr';\nimport {\n\tcreateDefaultRenderTimestamp,\n\ttoRenderedComponentPayload,\n\ttoRenderedComponentWithPreview,\n} from './render-fragment';\n\nexport {\n\tcreateDefaultRenderTimestamp,\n\ttoRenderedComponentPayload,\n\ttoRenderedComponentWithPreview,\n} from './render-fragment';\n\nexport type RenderedComponentAsset =\n\t| {\n\t\t\t/** Browser module specifier that must be loaded to activate the fragment. */\n\t\t\tkind: 'script-module';\n\t\t\t/** Runtime loading policy for the module. */\n\t\t\tstage?: 'hydrate' | 'idle' | 'immediate';\n\t\t\t/** Module specifier or browser-importable URL. */\n\t\t\tsrc: string;\n\t }\n\t| {\n\t\t\t/** Module graph preload hint for adapters that control the document head. */\n\t\t\tkind: 'modulepreload';\n\t\t\t/** Module specifier or browser-importable URL. */\n\t\t\thref: string;\n\t }\n\t| {\n\t\t\t/** Stylesheet dependency required by the rendered fragment. */\n\t\t\tkind: 'style';\n\t\t\t/** Browser-importable stylesheet URL. */\n\t\t\thref: string;\n\t\t\t/** Optional media query applied to the stylesheet link. */\n\t\t\tmedia?: string;\n\t };\n\n/** Creates a module asset entry for a rendered fragment. */\nexport function scriptModuleAsset(\n\tsrc: string,\n\tstage: 'hydrate' | 'idle' | 'immediate' = 'hydrate',\n): RenderedComponentAsset {\n\treturn { kind: 'script-module', src, stage };\n}\n\n/** Creates a modulepreload hint for a rendered fragment. */\nexport function modulePreloadAsset(href: string): RenderedComponentAsset {\n\treturn { kind: 'modulepreload', href };\n}\n\n/** Creates a stylesheet asset entry for a rendered fragment. */\nexport function styleAsset(href: string, media?: string): RenderedComponentAsset {\n\treturn media ? { kind: 'style', href, media } : { kind: 'style', href };\n}\n\n/** Portable metadata for a server-rendered custom-element fragment. */\nexport type RenderedComponentMetadata = {\n\t/** Asset dependencies required by the rendered fragment. */\n\tassets: readonly RenderedComponentAsset[];\n\t/** Browser-importable client module URL used to register the component before hydration. */\n\tclientModuleUrl?: string;\n\t/** ISO timestamp describing when the fragment was rendered. */\n\tgeneratedAt: string;\n\t/** Custom-element tag name emitted at the fragment root. */\n\ttagName: string;\n};\n\n/** Canonical server render result returned by `renderComponent()`. */\nexport type RenderedComponent = {\n\t/** Serialized custom-element host markup. */\n\tmarkup: string;\n\t/** Transport-agnostic metadata that adapters can map onto headers or JSON. */\n\tmetadata: RenderedComponentMetadata;\n\t/** JSX-compatible preview value that can be embedded into a larger SSR shell. */\n\tpreview: JsxRenderable;\n};\n\n/** Serializable metadata for a server-rendered custom-element fragment. */\nexport type RenderedComponentPayload = {\n\t/** Asset dependencies required by the rendered fragment. */\n\tassets?: readonly RenderedComponentAsset[];\n\t/** Browser-importable client module URL used to register the component before hydration. */\n\tclientModuleSrc?: string;\n\t/** ISO timestamp describing when the fragment was rendered. */\n\tgeneratedAt: string;\n\t/** Serialized custom-element host markup. */\n\tmarkup: string;\n\t/** Custom-element tag name emitted at the fragment root. */\n\ttagName: string;\n};\n\n/** Full SSR result including a JSX-compatible preview value for shell composition. */\nexport type RenderedComponentWithPreview = RenderedComponentPayload & {\n\t/** JSX-compatible preview value that can be embedded into a larger SSR shell. */\n\tpreview: JsxRenderable;\n};\n\n/** Minimal component contract needed for framework-agnostic SSR helpers. */\nexport type ServerRenderableComponent = object & {\n\trenderHost?: () => JsxRenderable;\n\trenderHostToString?: (options?: RenderToStringOptions) => string;\n};\n\n/** Constructor shape for a server-renderable component. */\nexport type ServerRenderableComponentConstructor<TComponent extends ServerRenderableComponent> =\n\tCustomElementConstructor & {\n\t\tnew (): TComponent;\n\t};\n\n/**\n * Resolves the browser-importable client module URL for a component constructor.\n *\n * Use this when the server adapter can derive the client entry lazily instead of\n * hardcoding `clientModuleSrc` for every render call.\n */\nexport type ResolveRenderedComponentClientModule<TComponent extends ServerRenderableComponent> = (\n\tcomponent: ServerRenderableComponentConstructor<TComponent>,\n) => string | undefined | Promise<string | undefined>;\n\n/**\n * Resolves fragment assets for a component constructor.\n *\n * Prefer this over `resolveClientModuleSrc(...)` for new adapters so assets can\n * describe scripts, styles, and preload hints through one transport-agnostic shape.\n */\nexport type ResolveRenderedComponentAssets<TComponent extends ServerRenderableComponent> = (\n\tcomponent: ServerRenderableComponentConstructor<TComponent>,\n) => readonly RenderedComponentAsset[] | undefined | Promise<readonly RenderedComponentAsset[] | undefined>;\n\n/**\n * Prepares a component host before SSR so slot-aware logic can observe authored\n * light-DOM content during render.\n */\nexport type PrepareRenderedComponentHost<TComponent extends ServerRenderableComponent> = (\n\thost: TComponent & HTMLElement,\n\tenvironment: ServerRenderEnvironment,\n) => void;\n\n/**\n * Ambient SSR context value visible while a standalone component render runs.\n *\n * This lets adapters provide ancestor-like context to `consumeContext(...)` and\n * `contextSelector(...)` without needing to instantiate a real provider host.\n */\nexport type RenderComponentSsrContextEntry<TContext extends UnknownContext = UnknownContext> = {\n\tcontext: TContext;\n\tvalue: ContextType<TContext>;\n};\n\ntype RenderComponentSharedOptions<TComponent extends ServerRenderableComponent> = {\n\t/** Asset dependencies required by the rendered fragment. */\n\tassets?: readonly RenderedComponentAsset[];\n\t/** Serialized authored light-DOM content to attach to the host before rendering. */\n\tauthoredContent?: string;\n\t/** Browser-importable client module URL used to register the component before hydration. */\n\tclientModuleSrc?: string;\n\t/** Initializes the component instance before the host is rendered. */\n\tinitialize?: (component: TComponent) => void;\n\t/** SSR environment responsible for preparing the host runtime and authored content. */\n\tenvironment?: ServerRenderEnvironment;\n\t/**\n\t * Dedicated host-preparation hook for slot-aware SSR.\n\t *\n\t * Use this when the server needs to append or mutate authored light-DOM\n\t * nodes directly instead of passing `authoredContent` as a string.\n\t */\n\tprepareHost?: PrepareRenderedComponentHost<TComponent>;\n\t/**\n\t * Ambient SSR context entries that should be visible while the component is\n\t * instantiated and rendered.\n\t *\n\t * This solves standalone fragment renders that need to consume context from a\n\t * parent-like server environment.\n\t */\n\tssrContext?: readonly RenderComponentSsrContextEntry[];\n\t/** Clock override used by tests and adapters that need deterministic timestamps. */\n\tnow?: () => Date;\n\t/** JSX server-renderer options forwarded to `renderHostToString()`. */\n\trenderOptions?: RenderToStringOptions;\n\t/** Lazy asset resolver used when `assets` are not provided directly. */\n\tresolveAssets?: ResolveRenderedComponentAssets<TComponent>;\n\t/** Lazy client-module resolver used when `clientModuleSrc` is not provided directly. */\n\tresolveClientModuleSrc?: ResolveRenderedComponentClientModule<TComponent>;\n\t/** Explicit tag-name override when `@customElement(...)` metadata is not desired. */\n\ttagName?: string;\n};\n\n/** Options accepted by the reusable SSR component rendering helpers. */\nexport type RenderComponentOptions<TComponent extends ServerRenderableComponent> =\n\tRenderComponentSharedOptions<TComponent> &\n\t\t(\n\t\t\t| {\n\t\t\t\t\tcomponent: ServerRenderableComponentConstructor<TComponent>;\n\t\t\t }\n\t\t\t| {\n\t\t\t\t\tload: () => Promise<ServerRenderableComponentConstructor<TComponent>>;\n\t\t\t }\n\t\t);\n\n/** Call-site options used when the component constructor is passed directly. */\nexport type RenderComponentCallOptions<TComponent extends ServerRenderableComponent> =\n\tRenderComponentSharedOptions<TComponent>;\n\n/**\n * Serializes a custom element into HTML, inferring its tag name from\n * `@customElement(...)` metadata when the caller does not provide one.\n */\nexport function renderComponentToString<TComponent extends ServerRenderableComponent>(\n\tcomponent: ServerRenderableComponentConstructor<TComponent>,\n\toptions?: RenderComponentCallOptions<TComponent>,\n): Promise<string>;\n\nexport function renderComponentToString<TComponent extends ServerRenderableComponent>(\n\toptions: RenderComponentOptions<TComponent>,\n): Promise<string>;\n\nexport async function renderComponentToString<TComponent extends ServerRenderableComponent>(\n\tcomponentOrOptions: ServerRenderableComponentConstructor<TComponent> | RenderComponentOptions<TComponent>,\n\toptions?: RenderComponentCallOptions<TComponent>,\n): Promise<string> {\n\treturn (await renderResolvedComponent(normalizeRenderComponentOptions(componentOrOptions, options))).markup;\n}\n\n/**\n * Renders a custom element into the canonical portable server-rendered shape,\n * separating transport-agnostic metadata from any HTTP-specific adapter.\n */\nexport function renderComponent<TComponent extends ServerRenderableComponent>(\n\tcomponent: ServerRenderableComponentConstructor<TComponent>,\n\toptions?: RenderComponentCallOptions<TComponent>,\n): Promise<RenderedComponent>;\n\nexport function renderComponent<TComponent extends ServerRenderableComponent>(\n\toptions: RenderComponentOptions<TComponent>,\n): Promise<RenderedComponent>;\n\nexport async function renderComponent<TComponent extends ServerRenderableComponent>(\n\tcomponentOrOptions: ServerRenderableComponentConstructor<TComponent> | RenderComponentOptions<TComponent>,\n\toptions?: RenderComponentCallOptions<TComponent>,\n): Promise<RenderedComponent> {\n\treturn renderResolvedComponent(normalizeRenderComponentOptions(componentOrOptions, options));\n}\n\n/**\n * Serializes a custom element into a fragment payload that frameworks can\n * attach to any response shape they prefer.\n */\nexport function renderComponentToPayload<TComponent extends ServerRenderableComponent>(\n\tcomponent: ServerRenderableComponentConstructor<TComponent>,\n\toptions?: RenderComponentCallOptions<TComponent>,\n): Promise<RenderedComponentPayload>;\n\nexport function renderComponentToPayload<TComponent extends ServerRenderableComponent>(\n\toptions: RenderComponentOptions<TComponent>,\n): Promise<RenderedComponentPayload>;\n\nexport async function renderComponentToPayload<TComponent extends ServerRenderableComponent>(\n\tcomponentOrOptions: ServerRenderableComponentConstructor<TComponent> | RenderComponentOptions<TComponent>,\n\toptions?: RenderComponentCallOptions<TComponent>,\n): Promise<RenderedComponentPayload> {\n\treturn toRenderedComponentPayload(\n\t\tawait renderResolvedComponent(normalizeRenderComponentOptions(componentOrOptions, options)),\n\t);\n}\n\n/**\n * Renders a component into both fragment metadata and a JSX-compatible preview\n * value that can be embedded into a larger server-rendered shell.\n */\nexport function renderComponentWithPreview<TComponent extends ServerRenderableComponent>(\n\tcomponent: ServerRenderableComponentConstructor<TComponent>,\n\toptions?: RenderComponentCallOptions<TComponent>,\n): Promise<RenderedComponentWithPreview>;\n\nexport function renderComponentWithPreview<TComponent extends ServerRenderableComponent>(\n\toptions: RenderComponentOptions<TComponent>,\n): Promise<RenderedComponentWithPreview>;\n\nexport async function renderComponentWithPreview<TComponent extends ServerRenderableComponent>(\n\tcomponentOrOptions: ServerRenderableComponentConstructor<TComponent> | RenderComponentOptions<TComponent>,\n\toptions?: RenderComponentCallOptions<TComponent>,\n): Promise<RenderedComponentWithPreview> {\n\treturn toRenderedComponentWithPreview(\n\t\tawait renderResolvedComponent(normalizeRenderComponentOptions(componentOrOptions, options)),\n\t);\n}\n\nasync function renderResolvedComponent<TComponent extends ServerRenderableComponent>(\n\tnormalizedOptions: RenderComponentOptions<TComponent>,\n): Promise<RenderedComponent> {\n\treturn withRadiantElementSsrRuntime(getOrCreateRadiantElementSsrRuntime(), async () => {\n\t\tconst environment = normalizedOptions.environment ?? createServerRenderEnvironment();\n\t\tconst restoreAmbientContext = withSsrContextProviders(\n\t\t\tcreateAmbientSsrContextProviders(normalizedOptions.ssrContext),\n\t\t);\n\n\t\ttry {\n\t\t\tconst Component =\n\t\t\t\t'component' in normalizedOptions ? normalizedOptions.component : await normalizedOptions.load();\n\t\t\tconst component = new Component();\n\t\t\tensureLegacyHostReady(component, 'ssr');\n\t\t\tprepareRenderedComponentHost(\n\t\t\t\tenvironment,\n\t\t\t\tcomponent,\n\t\t\t\tnormalizedOptions.authoredContent,\n\t\t\t\tnormalizedOptions.prepareHost,\n\t\t\t);\n\t\t\tnormalizedOptions.initialize?.(component);\n\n\t\t\tconst resolvedClientModuleSrc =\n\t\t\t\tnormalizedOptions.clientModuleSrc ?? (await normalizedOptions.resolveClientModuleSrc?.(Component));\n\t\t\tconst resolvedAssets =\n\t\t\t\tnormalizedOptions.assets ?? (await normalizedOptions.resolveAssets?.(Component)) ?? [];\n\t\t\tconst assets = mergeRenderedComponentAssets(resolvedAssets, resolvedClientModuleSrc);\n\t\t\tconst clientModuleSrc = resolvePrimaryClientModuleSrc(assets) ?? resolvedClientModuleSrc;\n\t\t\tconst tagName = normalizedOptions.tagName ?? resolveRenderedComponentTagName(Component);\n\t\t\tconst generatedAt = (normalizedOptions.now ?? createDefaultRenderTimestamp)().toISOString();\n\t\t\tconst renderOptions = normalizeRenderOptions(normalizedOptions.renderOptions);\n\t\t\tconst markup =\n\t\t\t\trenderRegisteredRadiantElementHostToString(component, renderOptions) ??\n\t\t\t\trequireServerRenderableMarkup(component, renderOptions);\n\t\t\tconst preview = resolveRenderedComponentPreview(component, markup);\n\n\t\t\treturn {\n\t\t\t\tmarkup,\n\t\t\t\tmetadata: {\n\t\t\t\t\tassets,\n\t\t\t\t\tclientModuleUrl: clientModuleSrc,\n\t\t\t\t\tgeneratedAt,\n\t\t\t\t\ttagName,\n\t\t\t\t},\n\t\t\t\tpreview,\n\t\t\t};\n\t\t} finally {\n\t\t\trestoreAmbientContext();\n\t\t}\n\t});\n}\n\n/**\n * Chooses the preview renderable returned by `renderComponent()`.\n *\n * Falls back to the serialized host markup when a generic server-renderable\n * component does not expose a JSX preview surface.\n */\nfunction resolveRenderedComponentPreview<TComponent extends ServerRenderableComponent>(\n\tcomponent: TComponent,\n\tmarkup: string,\n): JsxRenderable {\n\treturn (\n\t\tresolveRegisteredRadiantElementPreview(component, markup) ??\n\t\trenderRegisteredRadiantElementHost(component) ??\n\t\tcomponent.renderHost?.() ?? { nodeType: 1, outerHTML: markup }\n\t);\n}\n\nfunction prepareRenderedComponentHost<TComponent extends ServerRenderableComponent>(\n\tenvironment: ServerRenderEnvironment,\n\tcomponent: TComponent,\n\tauthoredContent: string | undefined,\n\tprepareHost: PrepareRenderedComponentHost<TComponent> | undefined,\n): void {\n\tif (!canPrepareSsrHost(component)) {\n\t\tif (authoredContent === undefined && prepareHost === undefined) {\n\t\t\treturn;\n\t\t}\n\n\t\tthrow new Error(\n\t\t\t`${component.constructor.name} cannot prepare SSR host content because it does not expose an innerHTML host surface.`,\n\t\t);\n\t}\n\n\tenvironment.prepareHost(component, { authoredContent });\n\tprepareHost?.(component, environment);\n}\n\n/**\n * Wraps ad-hoc `ssrContext` values in provider-like objects so the existing SSR\n * context stack can resolve them exactly like real ancestor providers.\n */\nfunction createAmbientSsrContextProviders(\n\tentries: readonly RenderComponentSsrContextEntry[] | undefined,\n): SsrSerializableContextProvider[] {\n\tif (!entries || entries.length === 0) {\n\t\treturn [];\n\t}\n\n\treturn entries.map((entry) => ({\n\t\tgetContext: () => entry.value,\n\t\tgetContextKey: () => entry.context,\n\t\trenderHydrationScript: () => undefined,\n\t\trenderHydrationScriptTag: () => undefined,\n\t}));\n}\n\nfunction createRenderedComponentClientModuleAssets(\n\tclientModuleSrc: string | undefined,\n): readonly RenderedComponentAsset[] {\n\tif (!clientModuleSrc) {\n\t\treturn [];\n\t}\n\n\treturn [scriptModuleAsset(clientModuleSrc)];\n}\n\nexport function mergeRenderedComponentAssets(\n\tassets: readonly RenderedComponentAsset[],\n\tclientModuleSrc: string | undefined,\n): readonly RenderedComponentAsset[] {\n\tif (!clientModuleSrc) {\n\t\treturn assets;\n\t}\n\n\tif (assets.some((asset) => asset.kind === 'script-module' && asset.src === clientModuleSrc)) {\n\t\treturn assets;\n\t}\n\n\treturn [...createRenderedComponentClientModuleAssets(clientModuleSrc), ...assets];\n}\n\nexport function resolvePrimaryClientModuleSrc(assets: readonly RenderedComponentAsset[]): string | undefined {\n\treturn assets.find((asset) => asset.kind === 'script-module')?.src;\n}\n\nfunction normalizeRenderComponentOptions<TComponent extends ServerRenderableComponent>(\n\tcomponentOrOptions: ServerRenderableComponentConstructor<TComponent> | RenderComponentOptions<TComponent>,\n\toptions?: RenderComponentCallOptions<TComponent>,\n): RenderComponentOptions<TComponent> {\n\tif (typeof componentOrOptions === 'function') {\n\t\treturn {\n\t\t\t...options,\n\t\t\tcomponent: componentOrOptions,\n\t\t};\n\t}\n\n\treturn componentOrOptions;\n}\n\nexport function normalizeRenderOptions(options: RenderToStringOptions | undefined): RenderToStringOptions {\n\tif (options?.mode !== undefined || options?.hydrate !== undefined) {\n\t\treturn options;\n\t}\n\n\treturn {\n\t\t...options,\n\t\tmode: 'hydrate',\n\t};\n}\n\nfunction canPrepareSsrHost<TComponent extends ServerRenderableComponent>(\n\tcomponent: TComponent,\n): component is TComponent & HTMLElement {\n\treturn 'innerHTML' in component;\n}\n\nfunction requireServerRenderableMarkup<TComponent extends ServerRenderableComponent>(\n\tcomponent: TComponent,\n\toptions: RenderToStringOptions,\n): string {\n\tif (typeof component.renderHostToString === 'function') {\n\t\treturn component.renderHostToString(options);\n\t}\n\n\tthrow new Error(\n\t\t`${component.constructor.name} cannot be server-rendered without a registered Radiant SSR host or renderHostToString().`,\n\t);\n}\n\nfunction resolveRenderedComponentTagName(target: CustomElementConstructor): string {\n\tconst tagName = getCustomElementTagName(target);\n\n\tif (!tagName) {\n\t\tthrow new Error(`${target.name} is missing @customElement metadata.`);\n\t}\n\n\treturn tagName;\n}\n"
28
+ ],
29
+ "mappings": "m1BACO,SAAS,CAAmB,CAAC,EAAuB,CAC1D,OAAO,EAAM,QAAQ,KAAM,OAAO,EAAE,QAAQ,KAAM,QAAQ,EAAE,QAAQ,KAAM,MAAM,EAAE,QAAQ,KAAM,MAAM,ECmChG,SAAS,EAA4B,CAAC,EAAwB,CACpE,IAAM,EAAsB,CAAC,EACzB,EAAQ,EAEZ,MAAO,EAAQ,EAAK,OAAQ,CAC3B,IAAM,EAAgB,EAEtB,GAAI,EAAK,WAAW,OAAQ,CAAK,EAAG,CACnC,IAAM,EAAa,EAAK,QAAQ,MAAO,EAAQ,CAAC,EAChD,EAAQ,IAAe,GAAK,EAAK,OAAS,EAAa,EACvD,EAAU,KAAK,EAAK,MAAM,EAAe,CAAK,CAAC,EAC/C,SAGD,GAAI,EAAK,KAAW,IAAK,CACxB,IAAM,EAAe,EAAK,QAAQ,IAAK,CAAK,EAC5C,EAAQ,IAAiB,GAAK,EAAK,OAAS,EAC5C,EAAU,KAAK,EAAK,MAAM,EAAe,CAA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rC,GAAI,OAAO,IAAuB,WACjC,MAAO,IACH,EACH,UAAW,CACZ,EAGD,OAAO,EAGD,SAAS,EAAsB,CAAC,EAAmE,CACzG,GAAI,GAAS,OAAS,QAAa,GAAS,UAAY,OACvD,OAAO,EAGR,MAAO,IACH,EACH,KAAM,SACP,EAGD,SAAS,EAA+D,CACvE,EACwC,CACxC,MAAO,cAAe,EAGvB,SAAS,EAA2E,CACnF,EACA,EACS,CACT,GAAI,OAAO,EAAU,qBAAuB,WAC3C,OAAO,EAAU,mBAAmB,CAAO,EAG5C,MAAU,MACT,GAAG,EAAU,YAAY,+FAC1B,EAGD,SAAS,EAA+B,CAAC,EAA0C,CAClF,IAAM,EAAU,EAAwB,CAAM,EAE9C,GAAI,CAAC,EACJ,MAAU,MAAM,GAAG,EAAO,0CAA0C,EAGrE,OAAO",
30
+ "debugId": "4FA34FA5C7FFE38064756E2164756E21",
31
+ "names": []
32
+ }
@@ -0,0 +1,3 @@
1
+ var{defineProperty:t,getOwnPropertyNames:T1,getOwnPropertyDescriptor:B1}=Object,Y1=Object.prototype.hasOwnProperty;function K1(P){return this[P]}var w1=(P)=>{var R=(B0??=new WeakMap).get(P),x;if(R)return R;if(R=t({},"__esModule",{value:!0}),P&&typeof P==="object"||typeof P==="function"){for(var F of T1(P))if(!Y1.call(R,F))t(R,F,{get:K1.bind(P,F),enumerable:!(x=B1(P,F))||x.enumerable})}return B0.set(P,R),R},B0;var D1=(P)=>P;function f1(P,R){this[P]=D1.bind(null,R)}var L1=(P,R)=>{for(var x in R)t(P,x,{get:R[x],enumerable:!0,configurable:!0,set:f1.bind(R,x)})};var e=(P,R)=>()=>(P&&(R=P(P=0)),R);var _1=((P)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(P,{get:(R,x)=>(typeof require<"u"?require:R)[x]}):P)(function(P){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+P+'" is not supported')});function L(P){return P.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function x1(P){let R=[],x=0;while(x<P.length){let F=x;if(P.startsWith("<!--",x)){let Q=P.indexOf("-->",x+4);x=Q===-1?P.length:Q+3,R.push(P.slice(F,x));continue}if(P[x]!=="<"){let Q=P.indexOf("<",x);x=Q===-1?P.length:Q,R.push(P.slice(F,x));continue}let $=k(P,x);if(!$){R.push(P.slice(F));break}if($.type!=="open"||$.selfClosing||m.has($.tagName)){x=$.end,R.push(P.slice(F,x));continue}x=$.end;let q=1;while(x<P.length&&q>0){let Q=P.indexOf("<",x);if(Q===-1){x=P.length;break}let H=k(P,Q);if(!H){x=P.length;break}if(x=H.end,H.type==="comment"||H.type==="declaration")continue;if(H.type==="open"&&!H.selfClosing&&!m.has(H.tagName)){q+=1;continue}if(H.type==="close")q-=1}R.push(P.slice(F,x))}return R.filter((F)=>F!=="")}function e1(P,R){let x;for(let F=R+1;F<P.length;F+=1){let $=P[F];if(x){if($===x)x=void 0;continue}if($==='"'||$==="'"){x=$;continue}if($===">")return F+1}return P.length}function PP(P){let R={},x=/([:^@A-Za-z0-9_.-]+)(?:\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s"'>/]+)))?/g;for(let F of P.matchAll(x)){let[,$,q,Q,H]=F;if(!$)continue;R[$]=q??Q??H??""}return R}function k(P,R){if(P.startsWith("<!--",R)){let K=P.indexOf("-->",R+4);return{end:K===-1?P.length:K+3,type:"comment"}}let x=e1(P,R),F=P.slice(R+1,x-1).trim();if(F==="")return;if(F.startsWith("!")||F.startsWith("?"))return{end:x,type:"declaration"};if(F.startsWith("/"))return{end:x,type:"close"};let $=/\/\s*$/.test(F),q=$?F.replace(/\/\s*$/,"").trim():F,Q=q.split(/[\s/>]/,1)[0]?.toLowerCase()??"",H=Q.length,U=q.slice(H).trim(),j=$||m.has(Q)?"":RP(P,R,x,Q);return{attributes:PP(U),end:x,innerHtml:j,selfClosing:$,tagName:Q,type:"open"}}function RP(P,R,x,F){let $=x,q=1;while($<P.length&&q>0){let Q=P.indexOf("<",$);if(Q===-1)return P.slice(x);let H=k(P,Q);if(!H)return P.slice(x);if(H.type==="open"&&H.tagName===F&&!H.selfClosing&&!m.has(F))q+=1;if(H.type==="close"){if(P.slice(Q+2,H.end-1).trim().toLowerCase()===F){if(q-=1,q===0)return P.slice(x,Q)}}$=H.end}return P.slice(x)}var m;var F1=e(()=>{m=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"])});function Z(){return $1??=(H1(),w1(q1)),$1}class Q1{element;constructor(P){this.element=P}add(...P){let R=new Set(this.readTokens());for(let x of P)if(x!=="")R.add(x);this.writeTokens([...R])}remove(...P){let R=new Set(this.readTokens());for(let x of P)R.delete(x);this.writeTokens([...R])}toggle(P,R){let x=this.contains(P);if(R??!x)return this.add(P),!0;return this.remove(P),!1}contains(P){return this.readTokens().includes(P)}toString(){return this.value}get value(){return this.element.getAttribute("class")??""}readTokens(){return this.value.split(/\s+/).map((P)=>P.trim()).filter((P)=>P.length>0)}writeTokens(P){if(P.length===0){this.element.removeAttribute("class");return}this.element.setAttribute("class",P.join(" "))}}class O{bubbles;cancelable;composed;type;constructor(P,R={}){this.type=P,this.bubbles=R.bubbles??!1,this.cancelable=R.cancelable??!1,this.composed=R.composed??!1}}function xP(P){return new B(P,Y())}function Y(){return globalThis.document??null}var $1,W,B,M,p,J,X;var a=e(()=>{W=class W extends EventTarget{nodeType;static DOCUMENT_NODE=9;static ELEMENT_NODE=1;static TEXT_NODE=3;childNodes=[];ownerDocument;parentNode=null;constructor(P,R=null){super();this.nodeType=P;this.ownerDocument=R}append(...P){for(let R of P)this.appendChild(typeof R==="string"?xP(R):R)}appendChild(P){if("parentNode"in P&&P.parentNode&&"removeChild"in P.parentNode)P.parentNode.removeChild(P);return this.childNodes.push(P),P.ownerDocument=this.nodeType===W.DOCUMENT_NODE?this:this.ownerDocument,P.parentNode=this,P}removeChild(P){let R=this.childNodes.indexOf(P);if(R===-1)return P;return this.childNodes.splice(R,1),P.parentNode=null,P}replaceChildren(...P){for(let R of this.childNodes)R.parentNode=null;this.childNodes=[],this.append(...P)}get textContent(){return this.childNodes.map((P)=>P.textContent??"").join("")}set textContent(P){this.replaceChildren(P??"")}getRootNode(){let P=this;while("parentNode"in P&&P.parentNode)P=P.parentNode;return P}};B=class B extends W{value;constructor(P,R=Y()){super(W.TEXT_NODE,R);this.value=P}get textContent(){return this.value}set textContent(P){this.value=P??""}};M=class M extends W{attributes=new Map;classListValue;datasetValue;fragmentHtml;fragmentText;localName;tagName;constructor(P="div",R=Y()){super(W.ELEMENT_NODE,R);this.localName=P.toLowerCase(),this.tagName=this.localName.toUpperCase()}get id(){return this.getAttribute("id")??""}set id(P){if(P===""){this.removeAttribute("id");return}this.setAttribute("id",P)}get classList(){return this.classListValue??=new Q1(this),this.classListValue}get dataset(){return this.datasetValue??=new Proxy({},{deleteProperty:(P,R)=>{if(typeof R!=="string")return!1;return this.removeAttribute(Z().toDataAttributeName(R)),!0},get:(P,R)=>{if(typeof R!=="string")return;return this.getAttribute(Z().toDataAttributeName(R))??void 0},getOwnPropertyDescriptor:(P,R)=>{if(typeof R!=="string")return;return{configurable:!0,enumerable:!0,value:this.getAttribute(Z().toDataAttributeName(R))??void 0,writable:!0}},has:(P,R)=>{return typeof R==="string"&&this.hasAttribute(Z().toDataAttributeName(R))},ownKeys:()=>{return this.getAttributeNames().filter((P)=>P.startsWith("data-")).map((P)=>Z().toDatasetPropertyName(P.slice(5)))},set:(P,R,x)=>{if(typeof R!=="string")return!1;return this.setAttribute(Z().toDataAttributeName(R),String(x)),!0}}),this.datasetValue}hasAttribute(P){return this.attributes.has(P)}getAttribute(P){return this.attributes.get(P)??null}getAttributeNames(){return Array.from(this.attributes.keys())}setAttribute(P,R){this.fragmentHtml=void 0,this.attributes.set(P,String(R))}toggleAttribute(P,R){if(R??!this.hasAttribute(P))return this.setAttribute(P,""),!0;return this.removeAttribute(P),!1}removeAttribute(P){this.fragmentHtml=void 0,this.attributes.delete(P)}querySelector(){return null}querySelectorAll(){return[]}matches(){return!1}get outerHTML(){if(this.fragmentHtml!==void 0)return this.fragmentHtml;let P=Array.from(this.attributes.entries()).map(([R,x])=>` ${R}="${L(x)}"`).join("");return`<${this.localName}${P}>${this.innerHTML}</${this.localName}>`}get innerHTML(){return this.childNodes.map((P)=>Z().serializeNodeHtml(P)).join("")}set innerHTML(P){this.fragmentHtml=void 0,this.fragmentText=void 0,this.replaceChildren(...Z().parseHtmlToNodes(P,this.ownerDocument))}get textContent(){return this.fragmentText??super.textContent??""}set textContent(P){this.fragmentHtml=void 0,this.fragmentText=P??"",super.textContent=P}setSerializedFragment(P,R,x){this.fragmentHtml=P,this.fragmentText=R,this.attributes=new Map(Object.entries(x)),this.replaceChildren()}};p=class p extends O{detail;constructor(P,R={}){super(P,R);this.detail=R.detail}};J=class J extends M{isConnected=!1;constructor(P="div",R=Y()){super(P,R)}insertAdjacentHTML(P,R){this.append(...Z().parseHtmlToNodes(R,this.ownerDocument))}};X=class X extends J{constructor(P=Y()){super("script",P)}}});var q1={};L1(q1,{toDatasetPropertyName:()=>qP,toDataAttributeName:()=>$P,serializeNodeHtml:()=>HP,parseHtmlToNodes:()=>FP,extractTextContent:()=>Z1,createElementFromFragment:()=>W1});function W1(P,R,x){let F=R.tagName==="script"?new X(x):new J(R.tagName,x);return F.setSerializedFragment(P,Z1(R.innerHtml),R.attributes),F}function Z1(P){return P.replace(/<!--.*?-->/gs,"").replace(/<[^>]+>/g,"")}function FP(P,R=Y()){return x1(P).map((x)=>{if(!x.startsWith("<"))return new B(x,R);let F=k(x,0);if(!F||F.type!=="open")return new B(x,R);return W1(x,F,R)})}function $P(P){return`data-${P.replace(/([A-Z])/g,"-$1").toLowerCase()}`}function qP(P){return P.replace(/-([a-z])/g,(R,x)=>x.toUpperCase())}function HP(P){if(P.nodeType===W.TEXT_NODE)return P.textContent??"";return"outerHTML"in P&&typeof P.outerHTML==="string"?P.outerHTML:P.textContent??""}var H1=e(()=>{F1();a()});var P0=Symbol.for("@ecopages/radiant.reactivePropDefinitions");function IP(P,R,x){let F=P.constructor,$=F[P0]??[];if($.some((q)=>q.name===R))return;$.push({name:R,options:x}),F[P0]=$}function Y0(P){return(P.constructor[P0]??[]).slice()}var K0=Symbol.for("@ecopages/radiant.legacy-instance-initializers"),w0=Symbol.for("@ecopages/radiant.legacy-post-construction-initializers"),g1=Symbol.for("@ecopages/radiant.legacy-executed-post-construction-initializers");function AP(P,R){f0(P,K0,R)}function NP(P,R){f0(P,w0,R)}function D0(P){I1(P,K0)}function R0(P,R){let x=P;C1(P,R,x[g1]??=new Set)}function f0(P,R,x){let F=P,$=Object.prototype.hasOwnProperty.call(F,R)?F[R]:void 0;if(Array.isArray($)){$.push(x);return}Object.defineProperty(F,R,{value:[x]})}function I1(P,R){A1(P,(x)=>{let F=x[R];if(!Array.isArray(F))return;for(let $ of F)$(P)})}function C1(P,R,x){for(let F of L0(P)){let $=F[w0];if(!Array.isArray($))continue;for(let q of $){if(x.has(q))continue;q(P,R),x.add(q)}}}function L0(P){let R=[],x=Object.getPrototypeOf(P);while(x&&x!==Object.prototype)R.unshift(x),x=Object.getPrototypeOf(x);return R}function A1(P,R){for(let x of L0(P))R(x)}function w(P,R){switch(R){case"construct":D0(P);break;case"connect":R0(P,"connect");break;case"ssr":R0(P,"ssr");break}}function C0(P){switch(P){case Array:return"array";case Boolean:return"boolean";case Number:return"number";case Object:return"object";case String:return"string"}}function N1(P){switch(typeof P){case"boolean":return"boolean";case"number":return"number";case"string":return"string"}if(Array.isArray(P))return"array";if(Object.prototype.toString.call(P)==="[object Object]")return"object"}function V1(P){switch(P){case Number:return 0;case String:return"";case Boolean:return!1;default:return null}}function k1(P){try{return JSON.parse(P)}catch{throw TypeError("Invalid JSON string")}}var M1={array(P){let R=k1(P);if(!Array.isArray(R))throw TypeError(`Expected an array but got a value of type "${typeof R}"`);return R},boolean(P){return!(P==="0"||String(P).toLowerCase()==="false")},number(P){return Number(P.replace(/_/g,""))},object(P){let R=JSON.parse(P);if(R===null||typeof R!=="object"||Array.isArray(R))throw TypeError(`expected value of type "object" but instead got value "${P}" of type "${N1(R)}"`);return R},string(P){return P}},_0={default:A0,array:g0,object:g0};function g0(P){return JSON.stringify(P)}function A0(P){return`${P}`}function I0(P,R){let x=C0(R);if(!x)throw TypeError(`[radiant-element] Unknown type "${R}"`);return M1[x](P)}function N0(P,R){let x=C0(R);if(!x)throw TypeError(`[radiant-element] Unknown type "${R}"`);return(_0[x]??_0.default??A0)(P)}function O1(P){return typeof P==="boolean"}function z1(P){return typeof P==="number"}function S1(P){return typeof P==="string"}function b1(P){return Array.isArray(P)}function h1(P){return typeof P==="object"&&!Array.isArray(P)&&P!==null}function OP(P,R){switch(P){case Boolean:return O1(R);case Number:return z1(R);case String:return S1(R);case Array:return b1(R);case Object:return h1(R);default:return!1}}var zP=(P,R,x,F)=>{if(R===Boolean){let q=P.getAttribute(x);if(q===null)return F;return q===""?!0:I0(q,R)}let $=P.getAttribute(x);return $!==null?I0($,R):F??V1(R)};import{getActiveSsrScopeValue as y1,withActiveSsrScopeValue as v1}from"@ecopages/jsx/server";var V0=Symbol.for("@ecopages/radiant.element-ssr-runtime");function hP(){return y1(V0)}function D(P,R){return v1(V0,P,R)}var k0=Symbol.for("@ecopages/radiant.controllerIdentifier");function x0(P,R){P[k0]=R}function M0(P){return P[k0]}var G="data-controller",O0=Symbol.for("@ecopages/radiant.controller-registry-state");function u1(){let P=globalThis,R=P[O0];if(R)return R;let x={activeRuntimes:new Set,controllerRegistrationStrategy:"keep-current",controllerRegistry:new Map};return P[O0]=x,x}var v=u1(),E=v.controllerRegistry,f=v.activeRuntimes;function z0(P){let R=P.getAttribute(G);if(!R)return[];return R.split(/\s+/).map((x)=>x.trim()).filter((x)=>x.length>0)}function y(P,R){if(P instanceof Element&&P.hasAttribute(G))R(P);for(let x of Array.from(P.querySelectorAll(`[${G}]`)))R(x)}class S0{root;controllersByElement=new Map;observer;stopped=!1;constructor(P=document){this.root=P;this.start()}stop(){if(this.stopped)return;this.stopped=!0,this.observer?.disconnect(),this.observer=void 0;for(let[P,R]of this.controllersByElement)for(let[x]of R)this.disconnectController(P,x);f.delete(this)}reconcileRegisteredController(P){y(this.root,(R)=>{if(!z0(R).includes(P))return;this.connectController(R,P)})}replaceRegisteredController(P){for(let[R,x]of Array.from(this.controllersByElement.entries())){if(!x.has(P))continue;this.disconnectController(R,P)}this.reconcileRegisteredController(P)}start(){if(y(this.root,(R)=>{this.reconcileElement(R)}),typeof MutationObserver>"u"){f.add(this);return}this.observer=new MutationObserver((R)=>{for(let x of R){if(x.type==="attributes"&&x.target instanceof Element){this.reconcileElement(x.target);continue}for(let F of Array.from(x.removedNodes)){if(!(F instanceof Element))continue;y(F,($)=>{this.disconnectElementControllers($)})}for(let F of Array.from(x.addedNodes)){if(!(F instanceof Element))continue;y(F,($)=>{this.reconcileElement($)})}}});let P=this.root instanceof Document?this.root.documentElement:this.root;this.observer.observe(P,{attributeFilter:[G],attributes:!0,childList:!0,subtree:!0}),f.add(this)}reconcileElement(P){let R=new Set(z0(P)),x=this.controllersByElement.get(P);if(x){for(let F of x.keys())if(!R.has(F))this.disconnectController(P,F)}for(let F of R)this.connectController(P,F)}connectController(P,R){let x=E.get(R);if(!x)return;let F=this.controllersByElement.get(P);if(!F)F=new Map,this.controllersByElement.set(P,F);if(F.has(R))return;let $=new x(P);F.set(R,$),$.connect()}disconnectController(P,R){let x=this.controllersByElement.get(P);if(!x)return;let F=x.get(R);if(!F)return;if(F.disconnect(),x.delete(R),x.size===0)this.controllersByElement.delete(P)}disconnectElementControllers(P){let R=this.controllersByElement.get(P);if(!R)return;for(let x of Array.from(R.keys()))this.disconnectController(P,x)}}function c1(P,R){let x=E.get(P);if(x)return x;x0(R,P),E.set(P,R);for(let F of Array.from(f))F.reconcileRegisteredController(P);return R}function cP(P){return E.has(P)}function dP(P){return E.get(P)}function d1(P,R){if(E.get(P)===R)return R;x0(R,P),E.set(P,R);for(let F of Array.from(f))F.replaceRegisteredController(P);return R}function b0(P){v.controllerRegistrationStrategy=P}function sP(){b0("replace")}function mP(){b0("keep-current")}function pP(P,R){if(v.controllerRegistrationStrategy==="replace")return d1(P,R);return c1(P,R)}function aP(P=document){return new S0(P)}function iP(){for(let P of Array.from(f))P.stop()}var h0=Symbol.for("@ecopages/radiant.customElementTagName");function rP(P,R){P[h0]=R}function u(P){return P[h0]}function y0(P){let R=globalThis.CSS;if(typeof R?.escape==="function")return R.escape(P);let x="";for(let F=0;F<P.length;F+=1){let $=P[F]??"",q=$.codePointAt(0)??0;if(q===0){x+="�";continue}let Q=q>=1&&q<=31||q===127,H=F===0&&q>=48&&q<=57,U=F===1&&q>=48&&q<=57&&(P[0]??"")==="-",j=F===0&&$==="-"&&P.length===1;if(Q||H||U){x+=`\\${q.toString(16)} `;continue}if(q>=128||$==="-"||$==="_"||q>=48&&q<=57||q>=65&&q<=90||q>=97&&q<=122){x+=j?`\\${$}`:$;continue}x+=`\\${$}`}return x}function v0(P){let R={},x=new Set;return m1(P,R,x),p1(P,R,x),a1(P,R),R}function u0(P){return Object.entries(P).map(([R,x])=>` ${R}="${L(x)}"`).join("")}function m1(P,R,x){for(let F of P.getReactiveProperties()){let $=P.getPropertyValue(F.name);if($===void 0||$===null||$===!1)continue;R[F.attribute]=String(F.converter.toAttribute($)),x.add(F.attribute)}}function p1(P,R,x){for(let F of P.getReactivePropDefinitions()){let $=F.options.attribute??F.name;if(x.has($))continue;let q=P.getPropertyValue(F.name);if(q===void 0||q===null||q===!1)continue;R[$]=String(N0(q,F.options.type)),x.add($)}}function a1(P,R){for(let x of P.getAttributeNames()){let F=P.getAttribute(x);if(F!==null)R[x]=F}}var c0=Symbol.for("@ecopages/radiant.ssr-context-provider-resolver");function d0(){return globalThis}function s0(P){d0()[c0]=P}function xR(P){return d0()[c0]?.(P)}var A;function p0(){if(A!==void 0)return A;try{let{AsyncLocalStorage:P}=(()=>{throw new Error("Cannot require module "+"node:async_hooks");})();return A=new P,A}catch{return A=null,null}}var m0=Symbol.for("@ecopages/radiant.ssr-context-fallback-stack");function a0(){let P=globalThis;return P[m0]??=[],P[m0]}function _(P){if(P.length===0)return()=>{return};let R=new Map;for(let $ of P)R.set($.getContextKey(),$);let x=p0();if(x){let $=x.getStore()??[],q=[...$,R];return x.enterWith(q),()=>{x.enterWith($)}}let F=a0();return F.push(R),()=>{let $=F.lastIndexOf(R);if($>=0)F.splice($,1)}}function i0(P){let R=p0()?.getStore()??a0();for(let x=R.length-1;x>=0;x-=1){let F=R[x]?.get(P);if(F)return F}return}function qR(P){let R=i0(P);if(!R)return;return R.getContext()}s0((P)=>i0(P));function l0(P,R){if(!R)return`${P.hostContent}${P.authoredHydrationMarkup}${P.slotProjectionScript}`;return`${P.hostContent}${P.slotProjectionScript}${P.hydrationScripts}`}function g(P){if(i1(P))return P;return}function i1(P){return typeof P.constructor==="function"&&typeof P.getAttribute==="function"&&typeof P.getAttributeNames==="function"&&typeof P.getAuthoredHydrationScriptMarkup==="function"&&typeof P.getContextProviders==="function"&&typeof P.getHydrationBindings==="function"&&typeof P.getReactiveProperties==="function"&&typeof P.getSlotProjectionScriptTag==="function"&&typeof P.resolveTrackedRenderOutput==="function"&&typeof P.renderViewToString==="function"}function r0(P){let R=g(P);if(!R)throw Error("Radiant SSR runtime requires a server extraction host shape on the component.");return{constructor:R.constructor,getAttribute:(x)=>R.getAttribute(x),getAttributeNames:()=>R.getAttributeNames(),getAuthoredHydrationScriptMarkup:()=>R.getAuthoredHydrationScriptMarkup?.(),getContextProviders:()=>R.getContextProviders(),getHydrationBindings:()=>R.getHydrationBindings(),getReactiveProperties:()=>R.getReactiveProperties(),getReactivePropDefinitions:()=>Y0(P),getPropertyValue:(x)=>Reflect.get(P,x),getSlotProjectionScriptTag:()=>R.getSlotProjectionScriptTag?.(),resolveTrackedRenderOutput:()=>R.resolveTrackedRenderOutput(),renderViewToString:(x)=>R.renderViewToString(x)}}class F0{component;host;constructor(P){this.component=P,this.host=r0(P)}ensureReady(){w(this.component,"ssr")}renderHost(){return this.ensureReady(),{nodeType:1,outerHTML:this.renderHostToString({mode:"hydrate"})}}renderHostToString(P={},R=this.getHostAttributes()){this.ensureReady();let x=this.getTagName(),F=_(this.host.getContextProviders());try{return`<${x}${u0(R)}>${this.renderHostContent(P)}</${x}>`}finally{F()}}getHostAttributes(){return this.ensureReady(),v0(this.host)}renderHostContent(P){let R=P.mode==="hydrate"||P.mode===void 0&&P.hydrate===!0,x=R?this.host.getHydrationBindings().map((F)=>F.renderHydrationScriptTag()).filter((F)=>typeof F==="string").join(""):"";return l0({hostContent:this.host.renderViewToString(P),authoredHydrationMarkup:this.host.getAuthoredHydrationScriptMarkup?.()??"",slotProjectionScript:this.host.getSlotProjectionScriptTag?.()??"",hydrationScripts:x},R)}getTagName(){let P=u(this.host.constructor);if(!P)throw Error(`${this.host.constructor.name} is missing @customElement metadata.`);return P}}import{renderToString as l1}from"@ecopages/jsx/server";import{createServerHydrationBindingState as n0,isServerRenderHydrationActive as o0,withForcedServerCustomElementRendering as r1,withServerCustomElementRenderHook as n1,withServerHydrationBindingState as t0}from"@ecopages/jsx/server";var c;function $0(P){return new F0(P)}function N(P){return{nodeType:1,outerHTML:T(P,{mode:"hydrate"})}}function q0(P){if(V(P))return N(P);if(!s(P))return;return P.renderHost?.()??{nodeType:1,outerHTML:P.renderHostToString({mode:"hydrate"})}}function T(P,R={}){return Z0(()=>$0(P).renderHostToString(R,W0(P)))}function H0(P,R={}){if(V(P))return T(P,R);if(!s(P))return;return P.renderHostToString(R)}function Q0(P,R){if(V(P))return N(P);if(!s(P))return;return P.renderHost?.()??{nodeType:1,outerHTML:R}}function e0(P,R={}){return Z0(()=>d(()=>l1(R1(P).value,R)))}function W0(P){return $0(P).getHostAttributes()}function P1(P){if(!V(P))return;return{renderHost:()=>N(P),renderHostToString:(R)=>T(P,R)}}function o1(P){return g(P)}function d(P){return r1(()=>n1(({instance:R})=>{if(V(R))return{nodeType:1,get outerHTML(){let F=o0(),$={hydrate:F,mode:F?"hydrate":"plain"};if(!F)return T(R,$);return t0(n0(),()=>T(R,$))}};if(!s(R))return;let x=R;return{nodeType:1,get outerHTML(){let F=o0();if(!F)return x.renderHostToString({hydrate:F,mode:F?"hydrate":"plain"});return t0(n0(),()=>x.renderHostToString({hydrate:F,mode:F?"hydrate":"plain"}))}}},P))}function R1(P){if(t1(P))return P.resolveTrackedRenderOutput();let R=g(P);if(!R)throw Error("Radiant SSR runtime requires tracked render output support on the component.");return R.resolveTrackedRenderOutput()}function V(P){if(typeof P!=="object"||P===null)return!1;return g(P)!==void 0}function s(P){if(typeof P!=="object"||P===null)return!1;return typeof P.renderHostToString==="function"}function t1(P){if(typeof P!=="object"||P===null)return!1;return typeof P.resolveTrackedRenderOutput==="function"}function I(){if(c)return c;return c={getHostAttributes:W0,renderHost:N,renderHostToString:T,resolveRenderBridge:P1,renderView:e0},c}function Z0(P){return D(I(),P)}a();class i extends W{constructor(){super(W.DOCUMENT_NODE)}createElement(P){return P.toLowerCase()==="script"?new X(this):new J(P,this)}createTextNode(P){return new B(P,this)}querySelector(){return null}querySelectorAll(){return[]}}class J0{definitions=new Map;define(P,R){if(this.definitions.has(P))return;this.definitions.set(P,R)}get(P){return this.definitions.get(P)}}a();var z,U0={escape(P){return y0(String(P))}};function J1(){let P=globalThis,R=P.customElements;if(typeof P.Node>"u"||typeof P.Document>"u"||typeof P.Element>"u"||typeof P.HTMLElement>"u"||typeof P.document>"u"||!R||typeof R.define!=="function"||typeof R.get!=="function")return;return P.window??{CSS:P.CSS??U0,CustomEvent:P.CustomEvent??p,Document:P.Document,Element:P.Element,Event:P.Event??O,EventTarget:P.EventTarget??EventTarget,HTMLScriptElement:P.HTMLScriptElement??P.HTMLElement,HTMLElement:P.HTMLElement,Node:P.Node,document:P.document,customElements:R}}function l(){let P=J1();if(P)return P;return U1()}function X0(){return l(),{prepareHost(P,R={}){if(R.authoredContent!==void 0)P.innerHTML=R.authoredContent}}}function U1(){let P=J1();if(P)return P;if(z)return z;let R=new J0,x=new i,F=globalThis.Event??O,$=globalThis.CustomEvent??p,q=i,Q=globalThis.EventTarget??EventTarget;return z={CSS:globalThis.CSS??U0,CustomEvent:$,Document:q,Element:M,Event:F,EventTarget:Q,HTMLScriptElement:X,HTMLElement:J,Node:W,document:x,customElements:R},Object.assign(globalThis,{CSS:globalThis.CSS??U0,CustomEvent:$,Document:q,Element:M,Event:F,EventTarget:Q,HTMLScriptElement:X,HTMLElement:J,Node:W,document:x,customElements:R,window:z}),z}function S(){return new Date}function b(P){if("metadata"in P)return{assets:P.metadata.assets,clientModuleSrc:P.metadata.clientModuleUrl,generatedAt:P.metadata.generatedAt,markup:P.markup,tagName:P.metadata.tagName};let{preview:R,...x}=P;return x}function h(P){return{assets:P.metadata.assets,clientModuleSrc:P.metadata.clientModuleUrl,generatedAt:P.metadata.generatedAt,markup:P.markup,preview:P.preview,tagName:P.metadata.tagName}}function QP(P,R="hydrate"){return{kind:"script-module",src:P,stage:R}}function nR(P){return{kind:"modulepreload",href:P}}function oR(P,R){return R?{kind:"style",href:P,media:R}:{kind:"style",href:P}}async function tR(P,R){return(await r(n(P,R))).markup}async function eR(P,R){return r(n(P,R))}async function Px(P,R){return b(await r(n(P,R)))}async function Rx(P,R){return h(await r(n(P,R)))}async function r(P){return D(I(),async()=>{let R=P.environment??X0(),x=_(JP(P.ssrContext));try{let F="component"in P?P.component:await P.load(),$=new F;w($,"ssr"),ZP(R,$,P.authoredContent,P.prepareHost),P.initialize?.($);let q=P.clientModuleSrc??await P.resolveClientModuleSrc?.(F),Q=P.assets??await P.resolveAssets?.(F)??[],H=j0(Q,q),U=G0(H)??q,j=P.tagName??GP(F),K=(P.now??S)().toISOString(),C=E0(P.renderOptions),T0=H0($,C)??jP($,C),E1=WP($,T0);return{markup:T0,metadata:{assets:H,clientModuleUrl:U,generatedAt:K,tagName:j},preview:E1}}finally{x()}})}function WP(P,R){return Q0(P,R)??q0(P)??P.renderHost?.()??{nodeType:1,outerHTML:R}}function ZP(P,R,x,F){if(!XP(R)){if(x===void 0&&F===void 0)return;throw Error(`${R.constructor.name} cannot prepare SSR host content because it does not expose an innerHTML host surface.`)}P.prepareHost(R,{authoredContent:x}),F?.(R,P)}function JP(P){if(!P||P.length===0)return[];return P.map((R)=>({getContext:()=>R.value,getContextKey:()=>R.context,renderHydrationScript:()=>{return},renderHydrationScriptTag:()=>{return}}))}function UP(P){if(!P)return[];return[QP(P)]}function j0(P,R){if(!R)return P;if(P.some((x)=>x.kind==="script-module"&&x.src===R))return P;return[...UP(R),...P]}function G0(P){return P.find((R)=>R.kind==="script-module")?.src}function n(P,R){if(typeof P==="function")return{...R,component:P};return P}function E0(P){if(P?.mode!==void 0||P?.hydrate!==void 0)return P;return{...P,mode:"hydrate"}}function XP(P){return"innerHTML"in P}function jP(P,R){if(typeof P.renderHostToString==="function")return P.renderHostToString(R);throw Error(`${P.constructor.name} cannot be server-rendered without a registered Radiant SSR host or renderHostToString().`)}function GP(P){let R=u(P);if(!R)throw Error(`${P.name} is missing @customElement metadata.`);return R}import{renderToString as EP}from"@ecopages/jsx/server";async function Ex(P,R){return(await o(P,R)).markup}async function Tx(P,R){return o(P,R)}async function Bx(P,R){return b(await o(P,R))}async function Yx(P,R){return h(await o(P,R))}async function o(P,R){return D(I(),async()=>{let x=TP(R.tagName),F=BP(x,YP(P,R)),$=new P(F);w($,"ssr");try{R.initialize?.($),$.runWithSsrLifecycle(()=>$.connect());let q=R.clientModuleSrc??await R.resolveClientModuleSrc?.(P),Q=R.assets??await R.resolveAssets?.(P)??[],H=j0(Q,q),U=G0(H)??q,j=(R.now??S)().toISOString(),K=E0(R.renderOptions),C=fP($,x,K);return{markup:C,metadata:{assets:H,clientModuleUrl:U,generatedAt:j,tagName:x},preview:{nodeType:1,outerHTML:C}}}finally{$.disconnect()}})}function TP(P){let R=P.trim().toLowerCase();if(!R)throw Error("Controller SSR host tagName is required.");return R}function BP(P,R){let F=l().document.createElement(P);for(let[$,q]of Object.entries(R)){if(q===void 0||q===null||q===!1)continue;F.setAttribute($,q===!0?"":String(q))}return F}function YP(P,R){let x={},F=R.host,$=wP(R.attributes?.class,F?.class,F?.classes);if($!==void 0)x.class=$;X1(x,"data",F?.data),X1(x,"aria",F?.aria),KP(x,R.attributes);let q=M0(P);if(q&&x[G]==null)x[G]=q;return x}function X1(P,R,x){if(!G1(x))return;for(let[F,$]of Object.entries(x))P[`${R}-${DP(F)}`]=$}function KP(P,R){if(!R)return;for(let[x,F]of Object.entries(R))P[x]=F}function wP(...P){let R=[];for(let x of P)j1(R,x);return R.length===0?void 0:R.join(" ")}function j1(P,R){if(R===void 0||R===null||R===!1||R===!0)return;if(typeof R==="string"){if(R!=="")P.push(R);return}if(typeof R==="number"||typeof R==="bigint"){P.push(String(R));return}if(Array.isArray(R)){for(let x of R)j1(P,x);return}if(!G1(R))return;for(let[x,F]of Object.entries(R))if(F)P.push(x)}function G1(P){return Object.prototype.toString.call(P)==="[object Object]"}function DP(P){return P.replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/[_\s]+/g,"-").toLowerCase()}function fP(P,R,x){let F=_(P.getSsrContextProviders());try{let $=d(()=>EP(P.render(),x)),Q=x.mode==="hydrate"||x.mode===void 0&&x.hydrate===!0?P.getSsrHydrationBindings().map((H)=>H.renderHydrationScriptTag()).filter((H)=>typeof H==="string").join(""):"";return`<${R}${LP(P.host)}>${$}${Q}</${R}>`}finally{F()}}function LP(P){return P.getAttributeNames().map((R)=>_P(R,P.getAttribute(R))).join("")}function _P(P,R){if(R==="")return` ${P}`;return` ${P}="${L(R??"")}"`}export{Yx as renderControllerWithPreview,Ex as renderControllerToString,Bx as renderControllerToPayload,Tx as renderController};
2
+
3
+ //# debugId=E35AB3BE2C9136DF64756E2164756E21