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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (450) hide show
  1. package/README.md +66 -56
  2. package/dist/LICENSE +21 -0
  3. package/dist/client/hydrator.d.ts +1 -1
  4. package/dist/client/hydrator.js +2 -2
  5. package/dist/client/hydrator.js.map +5 -3
  6. package/dist/client/install-hydrator.js +2 -2
  7. package/dist/client/install-hydrator.js.map +5 -3
  8. package/dist/context/context-consumer-bootstrap.d.ts +7 -6
  9. package/dist/context/context-consumer-bootstrap.js +2 -2
  10. package/dist/context/context-consumer-bootstrap.js.map +8 -3
  11. package/dist/context/context-consumer-runtime.d.ts +21 -8
  12. package/dist/context/context-consumer-runtime.js +2 -2
  13. package/dist/context/context-consumer-runtime.js.map +6 -3
  14. package/dist/context/context-host.d.ts +25 -0
  15. package/dist/context/context-host.js +3 -0
  16. package/dist/context/context-host.js.map +10 -0
  17. package/dist/context/context-provider.d.ts +10 -6
  18. package/dist/context/context-provider.js +2 -2
  19. package/dist/context/context-provider.js.map +9 -3
  20. package/dist/context/context-ssr-bridge.js +2 -2
  21. package/dist/context/context-ssr-bridge.js.map +4 -3
  22. package/dist/context/create-context.js +2 -2
  23. package/dist/context/create-context.js.map +4 -3
  24. package/dist/context/decorators/consume-context.d.ts +5 -2
  25. package/dist/context/decorators/consume-context.js +2 -2
  26. package/dist/context/decorators/consume-context.js.map +13 -3
  27. package/dist/context/decorators/context-selection-delivery.d.ts +1 -1
  28. package/dist/context/decorators/context-selection-delivery.js +2 -2
  29. package/dist/context/decorators/context-selection-delivery.js.map +5 -3
  30. package/dist/context/decorators/context-selector.d.ts +6 -6
  31. package/dist/context/decorators/context-selector.js +2 -2
  32. package/dist/context/decorators/context-selector.js.map +15 -3
  33. package/dist/context/decorators/legacy/consume-context.d.ts +2 -2
  34. package/dist/context/decorators/legacy/consume-context.js +2 -2
  35. package/dist/context/decorators/legacy/consume-context.js.map +10 -3
  36. package/dist/context/decorators/legacy/context-selector-field.d.ts +2 -2
  37. package/dist/context/decorators/legacy/context-selector-field.js +2 -2
  38. package/dist/context/decorators/legacy/context-selector-field.js.map +11 -3
  39. package/dist/context/decorators/legacy/context-selector.d.ts +2 -2
  40. package/dist/context/decorators/legacy/context-selector.js +2 -2
  41. package/dist/context/decorators/legacy/context-selector.js.map +11 -3
  42. package/dist/context/decorators/legacy/provide-context.d.ts +2 -2
  43. package/dist/context/decorators/legacy/provide-context.js +2 -2
  44. package/dist/context/decorators/legacy/provide-context.js.map +11 -3
  45. package/dist/context/decorators/on-context-update.d.ts +5 -5
  46. package/dist/context/decorators/on-context-update.js +2 -2
  47. package/dist/context/decorators/on-context-update.js.map +14 -3
  48. package/dist/context/decorators/provide-context.d.ts +5 -2
  49. package/dist/context/decorators/provide-context.js +2 -2
  50. package/dist/context/decorators/provide-context.js.map +14 -3
  51. package/dist/context/decorators/standard/consume-context.d.ts +2 -2
  52. package/dist/context/decorators/standard/consume-context.js +2 -2
  53. package/dist/context/decorators/standard/consume-context.js.map +9 -3
  54. package/dist/context/decorators/standard/context-selector-field.d.ts +2 -2
  55. package/dist/context/decorators/standard/context-selector-field.js +2 -2
  56. package/dist/context/decorators/standard/context-selector-field.js.map +10 -3
  57. package/dist/context/decorators/standard/context-selector.d.ts +2 -3
  58. package/dist/context/decorators/standard/context-selector.js +2 -2
  59. package/dist/context/decorators/standard/context-selector.js.map +10 -3
  60. package/dist/context/decorators/standard/provide-context.d.ts +2 -2
  61. package/dist/context/decorators/standard/provide-context.js +2 -2
  62. package/dist/context/decorators/standard/provide-context.js.map +10 -3
  63. package/dist/context/events.d.ts +18 -11
  64. package/dist/context/events.js +2 -2
  65. package/dist/context/events.js.map +4 -3
  66. package/dist/context/hydration-script.js +2 -2
  67. package/dist/context/hydration-script.js.map +6 -3
  68. package/dist/controller-registry.d.ts +28 -0
  69. package/dist/controller-registry.js +3 -0
  70. package/dist/controller-registry.js.map +11 -0
  71. package/dist/core/controller-metadata.d.ts +3 -0
  72. package/dist/core/controller-metadata.js +3 -0
  73. package/dist/core/controller-metadata.js.map +10 -0
  74. package/dist/core/custom-element-metadata.d.ts +11 -0
  75. package/dist/core/custom-element-metadata.js +2 -2
  76. package/dist/core/custom-element-metadata.js.map +4 -3
  77. package/dist/core/hydration-codec.d.ts +8 -1
  78. package/dist/core/hydration-codec.js +2 -2
  79. package/dist/core/hydration-codec.js.map +5 -3
  80. package/dist/core/radiant-component-ssr-registry.d.ts +13 -13
  81. package/dist/core/radiant-component-ssr-registry.js +2 -2
  82. package/dist/core/radiant-component-ssr-registry.js.map +4 -3
  83. package/dist/core/radiant-component-ssr.d.ts +3 -3
  84. package/dist/core/radiant-component-ssr.js +2 -2
  85. package/dist/core/radiant-component-ssr.js.map +8 -3
  86. package/dist/core/radiant-controller.d.ts +127 -0
  87. package/dist/core/radiant-controller.js +3 -0
  88. package/dist/core/radiant-controller.js.map +13 -0
  89. package/dist/core/radiant-element.d.ts +43 -41
  90. package/dist/core/radiant-element.js +2 -2
  91. package/dist/core/radiant-element.js.map +13 -3
  92. package/dist/core/radiant-hydrator-state.d.ts +1 -1
  93. package/dist/core/radiant-hydrator-state.js +2 -2
  94. package/dist/core/radiant-hydrator-state.js.map +4 -3
  95. package/dist/core/reactive-host.d.ts +137 -0
  96. package/dist/core/reactive-host.js +3 -0
  97. package/dist/core/reactive-host.js.map +10 -0
  98. package/dist/core/reactive-jsx-value.js +2 -2
  99. package/dist/core/reactive-jsx-value.js.map +4 -3
  100. package/dist/core/reactive-prop-metadata.js +2 -2
  101. package/dist/core/reactive-prop-metadata.js.map +4 -3
  102. package/dist/core/slot-projection-runtime.js +2 -2
  103. package/dist/core/slot-projection-runtime.js.map +6 -3
  104. package/dist/core/ssr-preparation.js +2 -2
  105. package/dist/core/ssr-preparation.js.map +4 -3
  106. package/dist/decorators/attr.d.ts +6 -0
  107. package/dist/decorators/attr.js +3 -0
  108. package/dist/decorators/attr.js.map +16 -0
  109. package/dist/decorators/bound.d.ts +4 -2
  110. package/dist/decorators/bound.js +2 -2
  111. package/dist/decorators/bound.js.map +7 -3
  112. package/dist/decorators/bridge.d.ts +11 -7
  113. package/dist/decorators/bridge.js +2 -2
  114. package/dist/decorators/bridge.js.map +4 -3
  115. package/dist/decorators/controller.d.ts +2 -0
  116. package/dist/decorators/controller.js +3 -0
  117. package/dist/decorators/controller.js.map +12 -0
  118. package/dist/decorators/custom-element.d.ts +4 -2
  119. package/dist/decorators/custom-element.js +2 -2
  120. package/dist/decorators/custom-element.js.map +7 -3
  121. package/dist/decorators/debounce.d.ts +5 -2
  122. package/dist/decorators/debounce.js +2 -2
  123. package/dist/decorators/debounce.js.map +8 -3
  124. package/dist/decorators/event.d.ts +5 -2
  125. package/dist/decorators/event.js +2 -2
  126. package/dist/decorators/event.js.map +10 -3
  127. package/dist/decorators/legacy/attr.d.ts +2 -0
  128. package/dist/decorators/legacy/attr.js +3 -0
  129. package/dist/decorators/legacy/attr.js.map +13 -0
  130. package/dist/decorators/legacy/bound.js +2 -2
  131. package/dist/decorators/legacy/bound.js.map +4 -3
  132. package/dist/decorators/legacy/custom-element.js +2 -2
  133. package/dist/decorators/legacy/custom-element.js.map +5 -3
  134. package/dist/decorators/legacy/debounce.js +2 -2
  135. package/dist/decorators/legacy/debounce.js.map +5 -3
  136. package/dist/decorators/legacy/event.js +2 -2
  137. package/dist/decorators/legacy/event.js.map +7 -3
  138. package/dist/decorators/legacy/instance-initializers.d.ts +3 -4
  139. package/dist/decorators/legacy/instance-initializers.js +2 -2
  140. package/dist/decorators/legacy/instance-initializers.js.map +4 -3
  141. package/dist/decorators/legacy/on-event.d.ts +2 -2
  142. package/dist/decorators/legacy/on-event.js +2 -2
  143. package/dist/decorators/legacy/on-event.js.map +6 -3
  144. package/dist/decorators/legacy/on-updated.d.ts +7 -2
  145. package/dist/decorators/legacy/on-updated.js +2 -2
  146. package/dist/decorators/legacy/on-updated.js.map +5 -3
  147. package/dist/decorators/legacy/query-slot.js +2 -2
  148. package/dist/decorators/legacy/query-slot.js.map +7 -3
  149. package/dist/decorators/legacy/query.d.ts +7 -2
  150. package/dist/decorators/legacy/query.js +2 -2
  151. package/dist/decorators/legacy/query.js.map +6 -3
  152. package/dist/decorators/legacy/reactive-field.d.ts +2 -2
  153. package/dist/decorators/legacy/reactive-field.js +2 -2
  154. package/dist/decorators/legacy/reactive-field.js.map +5 -3
  155. package/dist/decorators/legacy/reactive-prop.d.ts +10 -16
  156. package/dist/decorators/legacy/reactive-prop.js +2 -2
  157. package/dist/decorators/legacy/reactive-prop.js.map +7 -3
  158. package/dist/decorators/legacy/signal.d.ts +4 -3
  159. package/dist/decorators/legacy/signal.js +2 -2
  160. package/dist/decorators/legacy/signal.js.map +9 -3
  161. package/dist/decorators/on-event.d.ts +6 -3
  162. package/dist/decorators/on-event.js +2 -2
  163. package/dist/decorators/on-event.js.map +9 -3
  164. package/dist/decorators/on-updated.d.ts +12 -2
  165. package/dist/decorators/on-updated.js +2 -2
  166. package/dist/decorators/on-updated.js.map +8 -3
  167. package/dist/decorators/prop.d.ts +19 -7
  168. package/dist/decorators/prop.js +2 -2
  169. package/dist/decorators/prop.js.map +10 -3
  170. package/dist/decorators/query-slot.d.ts +11 -3
  171. package/dist/decorators/query-slot.js +2 -2
  172. package/dist/decorators/query-slot.js.map +10 -3
  173. package/dist/decorators/query.d.ts +9 -2
  174. package/dist/decorators/query.js +2 -2
  175. package/dist/decorators/query.js.map +9 -3
  176. package/dist/decorators/shared/reactive-attr.d.ts +25 -0
  177. package/dist/decorators/shared/reactive-attr.js +3 -0
  178. package/dist/decorators/shared/reactive-attr.js.map +11 -0
  179. package/dist/decorators/signal.d.ts +10 -4
  180. package/dist/decorators/signal.js +2 -2
  181. package/dist/decorators/signal.js.map +11 -3
  182. package/dist/decorators/standard/attr.d.ts +2 -0
  183. package/dist/decorators/standard/attr.js +3 -0
  184. package/dist/decorators/standard/attr.js.map +12 -0
  185. package/dist/decorators/standard/bound.js +2 -2
  186. package/dist/decorators/standard/bound.js.map +4 -3
  187. package/dist/decorators/standard/custom-element.js +2 -2
  188. package/dist/decorators/standard/custom-element.js.map +5 -3
  189. package/dist/decorators/standard/debounce.js +2 -2
  190. package/dist/decorators/standard/debounce.js.map +5 -3
  191. package/dist/decorators/standard/event.js +2 -2
  192. package/dist/decorators/standard/event.js.map +6 -3
  193. package/dist/decorators/standard/on-event.d.ts +2 -1
  194. package/dist/decorators/standard/on-event.js +2 -2
  195. package/dist/decorators/standard/on-event.js.map +5 -3
  196. package/dist/decorators/standard/on-updated.d.ts +5 -1
  197. package/dist/decorators/standard/on-updated.js +2 -2
  198. package/dist/decorators/standard/on-updated.js.map +4 -3
  199. package/dist/decorators/standard/query-slot.d.ts +1 -1
  200. package/dist/decorators/standard/query-slot.js +2 -2
  201. package/dist/decorators/standard/query-slot.js.map +5 -3
  202. package/dist/decorators/standard/query.d.ts +2 -1
  203. package/dist/decorators/standard/query.js +2 -2
  204. package/dist/decorators/standard/query.js.map +5 -3
  205. package/dist/decorators/standard/reactive-field.d.ts +2 -2
  206. package/dist/decorators/standard/reactive-field.js +2 -2
  207. package/dist/decorators/standard/reactive-field.js.map +4 -3
  208. package/dist/decorators/standard/reactive-prop.d.ts +13 -2
  209. package/dist/decorators/standard/reactive-prop.js +2 -2
  210. package/dist/decorators/standard/reactive-prop.js.map +6 -3
  211. package/dist/decorators/standard/signal.d.ts +4 -3
  212. package/dist/decorators/standard/signal.js +2 -2
  213. package/dist/decorators/standard/signal.js.map +8 -3
  214. package/dist/decorators/state.d.ts +6 -5
  215. package/dist/decorators/state.js +2 -2
  216. package/dist/decorators/state.js.map +8 -3
  217. package/dist/helpers/create-event-listener.d.ts +11 -2
  218. package/dist/helpers/create-event-listener.js +2 -2
  219. package/dist/helpers/create-event-listener.js.map +4 -3
  220. package/dist/helpers/create-event.js +2 -2
  221. package/dist/helpers/create-event.js.map +5 -3
  222. package/dist/helpers/create-query-slot.js +2 -2
  223. package/dist/helpers/create-query-slot.js.map +4 -3
  224. package/dist/helpers/create-query.d.ts +14 -3
  225. package/dist/helpers/create-query.js +2 -2
  226. package/dist/helpers/create-query.js.map +4 -3
  227. package/dist/helpers/debounce.js +2 -2
  228. package/dist/helpers/debounce.js.map +4 -3
  229. package/dist/helpers/index.js +2 -2
  230. package/dist/helpers/index.js.map +9 -3
  231. package/dist/index.d.ts +11 -12
  232. package/dist/index.js +2 -2
  233. package/dist/index.js.map +87 -3
  234. package/dist/server/context-ssr.js +2 -2
  235. package/dist/server/context-ssr.js.map +5 -3
  236. package/dist/server/html-parser.js +2 -2
  237. package/dist/server/html-parser.js.map +4 -3
  238. package/dist/server/install-light-dom-shim.js +2 -2
  239. package/dist/server/install-light-dom-shim.js.map +5 -3
  240. package/dist/server/light-dom-shim.js +2 -2
  241. package/dist/server/light-dom-shim.js.map +5 -3
  242. package/dist/server/project-root.js +2 -2
  243. package/dist/server/project-root.js.map +2 -2
  244. package/dist/server/radiant-component-ssr-runtime.d.ts +2 -2
  245. package/dist/server/radiant-component-ssr-runtime.js +2 -2
  246. package/dist/server/radiant-component-ssr-runtime.js.map +11 -3
  247. package/dist/server/render-component.d.ts +3 -13
  248. package/dist/server/render-component.js +2 -2
  249. package/dist/server/render-component.js.map +14 -4
  250. package/dist/server/render-controller.d.ts +57 -0
  251. package/dist/server/render-controller.js +3 -0
  252. package/dist/server/render-controller.js.map +23 -0
  253. package/dist/server/slot-projection-html.js +2 -2
  254. package/dist/server/slot-projection-html.js.map +7 -3
  255. package/dist/signals/host-resource.js +2 -2
  256. package/dist/signals/host-resource.js.map +2 -2
  257. package/dist/signals/host-signal.d.ts +4 -2
  258. package/dist/signals/host-signal.js +2 -2
  259. package/dist/signals/host-signal.js.map +7 -3
  260. package/dist/signals/hydration-script.js +2 -2
  261. package/dist/signals/hydration-script.js.map +6 -3
  262. package/dist/tools/escape-script-json.js +2 -2
  263. package/dist/tools/escape-script-json.js.map +4 -3
  264. package/dist/tools/event-emitter.js +2 -2
  265. package/dist/tools/event-emitter.js.map +4 -3
  266. package/dist/tools/index.js +2 -2
  267. package/dist/tools/index.js.map +7 -3
  268. package/dist/tools/render-jsx-template.js +2 -2
  269. package/dist/tools/render-jsx-template.js.map +4 -3
  270. package/dist/tools/stringify-typed.js +2 -2
  271. package/dist/tools/stringify-typed.js.map +4 -3
  272. package/dist/types.js +2 -2
  273. package/dist/types.js.map +2 -2
  274. package/dist/utils/attribute-utils.js +2 -2
  275. package/dist/utils/attribute-utils.js.map +4 -3
  276. package/dist/utils/index.js +2 -2
  277. package/dist/utils/index.js.map +4 -3
  278. package/package.json +22 -5
  279. package/size-budget.json +11 -2
  280. package/dist/chunk-0bswvy25.js +0 -4
  281. package/dist/chunk-0bswvy25.js.map +0 -10
  282. package/dist/chunk-0btkzzyc.js +0 -4
  283. package/dist/chunk-0btkzzyc.js.map +0 -10
  284. package/dist/chunk-0g0j9re6.js +0 -4
  285. package/dist/chunk-0g0j9re6.js.map +0 -10
  286. package/dist/chunk-1x26p09c.js +0 -4
  287. package/dist/chunk-1x26p09c.js.map +0 -10
  288. package/dist/chunk-21a7jask.js +0 -4
  289. package/dist/chunk-21a7jask.js.map +0 -10
  290. package/dist/chunk-25zjh0kg.js +0 -4
  291. package/dist/chunk-25zjh0kg.js.map +0 -10
  292. package/dist/chunk-30x4hggg.js +0 -4
  293. package/dist/chunk-30x4hggg.js.map +0 -10
  294. package/dist/chunk-3xxvmd5c.js +0 -4
  295. package/dist/chunk-3xxvmd5c.js.map +0 -10
  296. package/dist/chunk-3ynk7e1e.js +0 -4
  297. package/dist/chunk-3ynk7e1e.js.map +0 -10
  298. package/dist/chunk-5b1en9vz.js +0 -4
  299. package/dist/chunk-5b1en9vz.js.map +0 -10
  300. package/dist/chunk-5bkat72n.js +0 -4
  301. package/dist/chunk-5bkat72n.js.map +0 -10
  302. package/dist/chunk-5qeaq3tj.js +0 -4
  303. package/dist/chunk-5qeaq3tj.js.map +0 -10
  304. package/dist/chunk-66e6s792.js +0 -4
  305. package/dist/chunk-66e6s792.js.map +0 -10
  306. package/dist/chunk-79jg8q67.js +0 -4
  307. package/dist/chunk-79jg8q67.js.map +0 -10
  308. package/dist/chunk-8d5ddvvf.js +0 -4
  309. package/dist/chunk-8d5ddvvf.js.map +0 -10
  310. package/dist/chunk-8e9fgtbn.js +0 -4
  311. package/dist/chunk-8e9fgtbn.js.map +0 -10
  312. package/dist/chunk-9mqtp3js.js +0 -4
  313. package/dist/chunk-9mqtp3js.js.map +0 -10
  314. package/dist/chunk-9rj2rwes.js +0 -4
  315. package/dist/chunk-9rj2rwes.js.map +0 -10
  316. package/dist/chunk-atms6yrh.js +0 -4
  317. package/dist/chunk-atms6yrh.js.map +0 -10
  318. package/dist/chunk-bk2nbmcd.js +0 -4
  319. package/dist/chunk-bk2nbmcd.js.map +0 -10
  320. package/dist/chunk-bk6qkvfp.js +0 -4
  321. package/dist/chunk-bk6qkvfp.js.map +0 -10
  322. package/dist/chunk-c0qyz98c.js +0 -4
  323. package/dist/chunk-c0qyz98c.js.map +0 -10
  324. package/dist/chunk-c52qhh0j.js +0 -4
  325. package/dist/chunk-c52qhh0j.js.map +0 -10
  326. package/dist/chunk-cnyxrh9r.js +0 -4
  327. package/dist/chunk-cnyxrh9r.js.map +0 -10
  328. package/dist/chunk-cvz9mrxa.js +0 -4
  329. package/dist/chunk-cvz9mrxa.js.map +0 -10
  330. package/dist/chunk-dabagjk6.js +0 -4
  331. package/dist/chunk-dabagjk6.js.map +0 -10
  332. package/dist/chunk-e0r6ca2g.js +0 -4
  333. package/dist/chunk-e0r6ca2g.js.map +0 -10
  334. package/dist/chunk-eevw1j2q.js +0 -4
  335. package/dist/chunk-eevw1j2q.js.map +0 -10
  336. package/dist/chunk-ek664x1c.js +0 -4
  337. package/dist/chunk-ek664x1c.js.map +0 -10
  338. package/dist/chunk-eyw14d6y.js +0 -4
  339. package/dist/chunk-eyw14d6y.js.map +0 -10
  340. package/dist/chunk-fs4j94bk.js +0 -4
  341. package/dist/chunk-fs4j94bk.js.map +0 -10
  342. package/dist/chunk-g2z3mm6b.js +0 -4
  343. package/dist/chunk-g2z3mm6b.js.map +0 -10
  344. package/dist/chunk-g5n3m11h.js +0 -4
  345. package/dist/chunk-g5n3m11h.js.map +0 -10
  346. package/dist/chunk-gdkte2vd.js +0 -4
  347. package/dist/chunk-gdkte2vd.js.map +0 -10
  348. package/dist/chunk-gg74gdpv.js +0 -4
  349. package/dist/chunk-gg74gdpv.js.map +0 -10
  350. package/dist/chunk-gpv1n74a.js +0 -4
  351. package/dist/chunk-gpv1n74a.js.map +0 -10
  352. package/dist/chunk-h9k7crjc.js +0 -4
  353. package/dist/chunk-h9k7crjc.js.map +0 -10
  354. package/dist/chunk-hpzgnxgq.js +0 -4
  355. package/dist/chunk-hpzgnxgq.js.map +0 -10
  356. package/dist/chunk-hrjc8b1y.js +0 -4
  357. package/dist/chunk-hrjc8b1y.js.map +0 -10
  358. package/dist/chunk-hvy4zvcc.js +0 -4
  359. package/dist/chunk-hvy4zvcc.js.map +0 -10
  360. package/dist/chunk-hztr86b4.js +0 -4
  361. package/dist/chunk-hztr86b4.js.map +0 -10
  362. package/dist/chunk-j3v7rca5.js +0 -4
  363. package/dist/chunk-j3v7rca5.js.map +0 -10
  364. package/dist/chunk-j864sv4w.js +0 -4
  365. package/dist/chunk-j864sv4w.js.map +0 -10
  366. package/dist/chunk-jkb2y7c8.js +0 -4
  367. package/dist/chunk-jkb2y7c8.js.map +0 -10
  368. package/dist/chunk-kakpjgzf.js +0 -4
  369. package/dist/chunk-kakpjgzf.js.map +0 -10
  370. package/dist/chunk-kmebacvv.js +0 -4
  371. package/dist/chunk-kmebacvv.js.map +0 -10
  372. package/dist/chunk-knqsm6v3.js +0 -4
  373. package/dist/chunk-knqsm6v3.js.map +0 -10
  374. package/dist/chunk-mp2vtrkg.js +0 -4
  375. package/dist/chunk-mp2vtrkg.js.map +0 -10
  376. package/dist/chunk-mpsj3cjs.js +0 -4
  377. package/dist/chunk-mpsj3cjs.js.map +0 -10
  378. package/dist/chunk-n4p2542b.js +0 -4
  379. package/dist/chunk-n4p2542b.js.map +0 -10
  380. package/dist/chunk-nctznxyz.js +0 -4
  381. package/dist/chunk-nctznxyz.js.map +0 -10
  382. package/dist/chunk-ndw3hc3v.js +0 -4
  383. package/dist/chunk-ndw3hc3v.js.map +0 -10
  384. package/dist/chunk-nnnb6pac.js +0 -4
  385. package/dist/chunk-nnnb6pac.js.map +0 -10
  386. package/dist/chunk-nssj2x13.js +0 -4
  387. package/dist/chunk-nssj2x13.js.map +0 -10
  388. package/dist/chunk-nvr37vma.js +0 -4
  389. package/dist/chunk-nvr37vma.js.map +0 -10
  390. package/dist/chunk-p8k4g99a.js +0 -4
  391. package/dist/chunk-p8k4g99a.js.map +0 -10
  392. package/dist/chunk-pkszgjqf.js +0 -4
  393. package/dist/chunk-pkszgjqf.js.map +0 -10
  394. package/dist/chunk-q9z6tnzw.js +0 -4
  395. package/dist/chunk-q9z6tnzw.js.map +0 -10
  396. package/dist/chunk-qdz5sncz.js +0 -4
  397. package/dist/chunk-qdz5sncz.js.map +0 -10
  398. package/dist/chunk-qe0eww1n.js +0 -4
  399. package/dist/chunk-qe0eww1n.js.map +0 -10
  400. package/dist/chunk-r33zvvda.js +0 -4
  401. package/dist/chunk-r33zvvda.js.map +0 -10
  402. package/dist/chunk-rkh1vkb9.js +0 -4
  403. package/dist/chunk-rkh1vkb9.js.map +0 -10
  404. package/dist/chunk-rrg759ht.js +0 -4
  405. package/dist/chunk-rrg759ht.js.map +0 -10
  406. package/dist/chunk-s09s5ayx.js +0 -4
  407. package/dist/chunk-s09s5ayx.js.map +0 -10
  408. package/dist/chunk-s5p5z3z4.js +0 -4
  409. package/dist/chunk-s5p5z3z4.js.map +0 -10
  410. package/dist/chunk-sf4a2gy5.js +0 -4
  411. package/dist/chunk-sf4a2gy5.js.map +0 -10
  412. package/dist/chunk-ssnnxzrj.js +0 -4
  413. package/dist/chunk-ssnnxzrj.js.map +0 -10
  414. package/dist/chunk-t8xtvgyg.js +0 -4
  415. package/dist/chunk-t8xtvgyg.js.map +0 -10
  416. package/dist/chunk-v3ta7hnv.js +0 -4
  417. package/dist/chunk-v3ta7hnv.js.map +0 -10
  418. package/dist/chunk-v92hp9g0.js +0 -4
  419. package/dist/chunk-v92hp9g0.js.map +0 -10
  420. package/dist/chunk-vgtggzb6.js +0 -4
  421. package/dist/chunk-vgtggzb6.js.map +0 -9
  422. package/dist/chunk-vk48hgm4.js +0 -4
  423. package/dist/chunk-vk48hgm4.js.map +0 -10
  424. package/dist/chunk-w8s5fnsq.js +0 -4
  425. package/dist/chunk-w8s5fnsq.js.map +0 -10
  426. package/dist/chunk-wd23rn4q.js +0 -4
  427. package/dist/chunk-wd23rn4q.js.map +0 -10
  428. package/dist/chunk-wds4href.js +0 -4
  429. package/dist/chunk-wds4href.js.map +0 -10
  430. package/dist/chunk-wvd1ffe4.js +0 -4
  431. package/dist/chunk-wvd1ffe4.js.map +0 -10
  432. package/dist/chunk-wwbjz9k4.js +0 -4
  433. package/dist/chunk-wwbjz9k4.js.map +0 -10
  434. package/dist/chunk-x2k0ngpz.js +0 -4
  435. package/dist/chunk-x2k0ngpz.js.map +0 -10
  436. package/dist/chunk-x457d0ap.js +0 -4
  437. package/dist/chunk-x457d0ap.js.map +0 -10
  438. package/dist/chunk-xbhtzkre.js +0 -4
  439. package/dist/chunk-xbhtzkre.js.map +0 -10
  440. package/dist/chunk-y139ycfm.js +0 -4
  441. package/dist/chunk-y139ycfm.js.map +0 -10
  442. package/dist/chunk-z9kxfckm.js +0 -4
  443. package/dist/chunk-z9kxfckm.js.map +0 -10
  444. package/dist/chunk-zx5txex8.js +0 -4
  445. package/dist/chunk-zx5txex8.js.map +0 -10
  446. package/dist/chunk-zygdebw8.js +0 -4
  447. package/dist/chunk-zygdebw8.js.map +0 -10
  448. package/dist/core/radiant-component.d.ts +0 -113
  449. package/dist/core/radiant-component.js +0 -3
  450. package/dist/core/radiant-component.js.map +0 -9
@@ -1,4 +0,0 @@
1
- import{C as w}from"./chunk-s09s5ayx.js";import{D as z}from"./chunk-g2z3mm6b.js";import{E as v}from"./chunk-x2k0ngpz.js";import{F as u}from"./chunk-kakpjgzf.js";function G(j){return function(k,b,q){if(typeof b==="object"){if(b.kind==="field")return z(j)(k,b);return v(j)(k,b)}if(q)return u(j)(k,b,q);return w(j)(k,b)}}
2
- export{G as B};
3
-
4
- //# debugId=18BD725C32637F8D64756E2164756E21
@@ -1,10 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../src/context/decorators/context-selector.ts"],
4
- "sourcesContent": [
5
- "import type {\n\tLegacyFieldDecoratorArgs,\n\tLegacyMethodDecoratorArgs,\n\tMethod,\n\tStandardFieldDecoratorArgs,\n\tStandardMethodDecoratorArgs,\n} from '../../types';\nimport type { RadiantElement } from '../../core/radiant-element';\nimport type { Context, ContextType, UnknownContext } from '../types';\nimport type { OnContextUpdateOptions } from './on-context-update';\nimport { contextSelector as legacyContextSelectorMethod } from './legacy/context-selector';\nimport { contextSelector as standardContextSelectorMethod } from './standard/context-selector';\nimport { contextSelectorField as legacyContextSelectorField } from './legacy/context-selector-field';\nimport { contextSelectorField as standardContextSelectorField } from './standard/context-selector-field';\n\nexport type ContextSelectorOptions<T extends UnknownContext, Selected = ContextType<T>> = {\n\t/** Context token to resolve from ancestor providers. */\n\tcontext: T;\n\t/** Optional projection that narrows the resolved context before delivery. */\n\tselect?: (context: ContextType<T>) => Selected;\n\t/** Whether client-side event-channel subscriptions should stay active after the first value. */\n\tsubscribe?: boolean;\n};\n\ntype ContextUpdateMethod<Selected> = (value: Selected) => unknown;\n\ntype ContextSelectorDecorator<Selected> = {\n\t<Host extends RadiantElement>(\n\t\tprotoOrTarget: undefined,\n\t\tnameOrContext: ClassFieldDecoratorContext<Host, Selected>,\n\t): (this: Host, initialValue: Selected) => Selected;\n\t<Host extends RadiantElement, TMethod extends ContextUpdateMethod<Selected>>(\n\t\tprotoOrTarget: TMethod,\n\t\tnameOrContext: ClassMethodDecoratorContext<Host, TMethod>,\n\t): void;\n\t(protoOrTarget: RadiantElement, nameOrContext: string): void;\n\t(\n\t\tprotoOrTarget: RadiantElement,\n\t\tnameOrContext: string,\n\t\tdescriptor: TypedPropertyDescriptor<ContextUpdateMethod<Selected>>,\n\t): TypedPropertyDescriptor<ContextUpdateMethod<Selected>> | void;\n};\n\n/**\n * Subscribes a field or method to the current value, or a selected slice, of a context.\n *\n * **Field form (preferred):** The field holds the latest context value and is\n * updated whenever the provider changes. On `RadiantComponent` hosts, each\n * update schedules `requestUpdate()` automatically so `render()` stays in sync.\n *\n * **Method form (deprecated — use `@onContextUpdate`):** The method is called\n * with the new value on each change.\n *\n * @param options Context subscription configuration.\n */\nexport function contextSelector<T extends Context<unknown, unknown>, Selected = ContextType<T>>(\n\toptions: ContextSelectorOptions<T, Selected>,\n): ContextSelectorDecorator<Selected> {\n\treturn function (\n\t\tprotoOrTarget: RadiantElement | Method | undefined,\n\t\tnameOrContext:\n\t\t\t| string\n\t\t\t| ClassFieldDecoratorContext<RadiantElement, Selected>\n\t\t\t| ClassMethodDecoratorContext<RadiantElement, ContextUpdateMethod<Selected>>,\n\t\tdescriptor?: TypedPropertyDescriptor<ContextUpdateMethod<Selected>>,\n\t):\n\t\t| ((this: RadiantElement, initialValue: Selected) => Selected)\n\t\t| TypedPropertyDescriptor<ContextUpdateMethod<Selected>>\n\t\t| void {\n\t\tif (typeof nameOrContext === 'object') {\n\t\t\tif (nameOrContext.kind === 'field') {\n\t\t\t\treturn standardContextSelectorField(options)(\n\t\t\t\t\tprotoOrTarget as StandardFieldDecoratorArgs<RadiantElement, Selected>['protoOrTarget'],\n\t\t\t\t\tnameOrContext as StandardFieldDecoratorArgs<RadiantElement, Selected>['nameOrContext'],\n\t\t\t\t);\n\t\t\t}\n\n\t\t\treturn standardContextSelectorMethod(options as OnContextUpdateOptions<T, Selected>)(\n\t\t\t\tprotoOrTarget as StandardMethodDecoratorArgs['protoOrTarget'],\n\t\t\t\tnameOrContext as StandardMethodDecoratorArgs['nameOrContext'],\n\t\t\t);\n\t\t}\n\n\t\tif (descriptor) {\n\t\t\treturn legacyContextSelectorMethod(options as OnContextUpdateOptions<T, Selected>)(\n\t\t\t\tprotoOrTarget as LegacyMethodDecoratorArgs['protoOrTarget'],\n\t\t\t\tnameOrContext as LegacyMethodDecoratorArgs['nameOrContext'],\n\t\t\t\tdescriptor as LegacyMethodDecoratorArgs['descriptor'],\n\t\t\t);\n\t\t}\n\n\t\treturn legacyContextSelectorField(options)(\n\t\t\tprotoOrTarget as LegacyFieldDecoratorArgs['protoOrTarget'],\n\t\t\tnameOrContext as LegacyFieldDecoratorArgs['nameOrContext'],\n\t\t);\n\t} as ContextSelectorDecorator<Selected>;\n}\n"
6
- ],
7
- "mappings": "kLAuDO,GAAS,LAA+E,LAC9F,EACqC,CACrC,OAAO,QAAS,CACf,EACA,EAIA,EAIO,CACP,GAAI,OAAO,IAAkB,SAAU,CACtC,GAAI,EAAc,OAAS,QAC1B,OAAO,EAA6B,CAAO,EAC1C,EACA,CACD,EAGD,OAAO,EAA8B,CAA8C,EAClF,EACA,CACD,EAGD,GAAI,EACH,OAAO,EAA4B,CAA8C,EAChF,EACA,EACA,CACD,EAGD,OAAO,EAA2B,CAAO,EACxC,EACA,CACD",
8
- "debugId": "18BD725C32637F8D64756E2164756E21",
9
- "names": []
10
- }
@@ -1,4 +0,0 @@
1
- import{za as F}from"./chunk-eyw14d6y.js";import{Na as A}from"./chunk-cnyxrh9r.js";import{db as H,eb as O,fb as M,gb as L}from"./chunk-66e6s792.js";import{createSubscribableJsxValue as I}from"@ecopages/jsx";import{trackDependency as x}from"@ecopages/signals";var z=D();class B{read;subscribers=new Set;watcherListeners=new Set;version=0;constructor(j){this.read=j}get(){return x(this),this.read()}subscribe(j){return this.subscribers.add(j),()=>{this.subscribers.delete(j)}}addWatcher(j){return this.watcherListeners.add(j),()=>{this.watcherListeners.delete(j)}}getVersion(){return this.version}notify(j){this.version+=1;let G;try{this.notifyWatchers()}catch(Q){G=Q}if(this.publish(j),G)throw G}publish(j){for(let G of this.subscribers)G(j)}notifyWatchers(){let j=[];for(let G of this.watcherListeners)try{G()}catch(Q){j.push(Q)}if(j.length===1)throw j[0];if(j.length>1)throw AggregateError(j,"Multiple reactive dependency notifications failed.")}}function D(){if(typeof HTMLElement<"u")return HTMLElement;throw Error("RadiantElement requires HTMLElement. Install '@ecopages/radiant/server/light-dom-shim' before importing Radiant components in SSR.")}class K extends z{bindings;$;reactiveProperties=new Map;reactiveFields=new Map;reactiveDependencies=new Map;reactiveDependencyReaders=new Map;reactiveBindings=new Map;contextProviders=new Map;hydrationBindings=new Map;updateCallbacks=new Map;eventSubscriptions=new Map;eventEmitters=new Map;onConnectedCallbacks=[];onDisconnectedCallback=[];elementReady=!1;constructor(){super();let j=this.createReactiveBindingNamespace();this.bindings=j,this.$=j,A(this)}createReactiveBindingNamespace(){return new Proxy(Object.create(null),{get:(j,G)=>{if(typeof G!=="string")return;return this.getReactiveBinding(G)}})}connectedCallback(){this.elementReady=!0;for(let j of this.onConnectedCallbacks)j()}connectedContextCallback(j){}disconnectedCallback(){this.removeAllSubscribedEvents();for(let j of this.onDisconnectedCallback)j()}notifyUpdate(j,G,Q){if(G===Q)return;this.reactiveDependencies.get(j)?.notify(Q);let U=this.updateCallbacks.get(j);if(U)for(let X of U)X()}transformAttributeValue(j,G){return j!==null?G?.converter.fromAttribute(j):j}attributeChangedCallback(j,G,Q){if(G===Q||!this.elementReady)return;if(this.reactiveProperties.has(j)){let U=this.reactiveProperties.get(j),X=this.transformAttributeValue(Q,U),Y=this.transformAttributeValue(G,U),Z=U?U.attribute:j;this[Z]=X,this.notifyUpdate(j,Y,X)}}renderTemplate({target:j=this,template:G,insert:Q="replace",sanitize:U}){let X=U?U(G):G;switch(Q){case"replace":j.innerHTML=X;break;case"beforeend":j.insertAdjacentHTML("beforeend",X);break;case"afterbegin":j.insertAdjacentHTML("afterbegin",X);break;case"beforebegin":j.insertAdjacentHTML("beforebegin",X);break;case"afterend":j.insertAdjacentHTML("afterend",X);break}}registerReactiveProperty(j){this.reactiveProperties.set(j.name,j)}getReactiveProperties(){return Array.from(this.reactiveProperties.values())}registerReactiveField(j){this.reactiveFields.set(j.name,j)}registerReactiveDependencyReader(j,G){this.reactiveDependencyReaders.set(j,G)}registerContextProvider(j,G){this.contextProviders.set(j,G),this.registerHydrationBinding(j,G)}registerHydrationBinding(j,G){this.hydrationBindings.set(j,G)}getContextProviders(){return Array.from(this.contextProviders.values())}getHydrationBindings(){return Array.from(this.hydrationBindings.values())}prepareForSsr(){F(this)}shouldAutoBindReactiveMembers(){return!1}registerUpdateCallback(j,G){if(!this.updateCallbacks.has(j))this.updateCallbacks.set(j,new Set);let Q=this.updateCallbacks.get(j);return Q.add(G),()=>{if(Q.delete(G),Q.size===0)this.updateCallbacks.delete(j)}}getReactiveBinding(j){let G=this.reactiveBindings.get(j);if(G)return G;let Q=I({getValue:()=>this.readReactiveBindingValue(j),subscribe:(U)=>this.registerUpdateCallback(j,()=>{U(this.readReactiveBindingValue(j))})});return this.reactiveBindings.set(j,Q),Q}bind(j){return this.getReactiveBinding(j)}defineReactiveBinding(j,G=!0){let Q=typeof G==="string"?G:G?`$${j}`:void 0;if(!Q||Object.prototype.hasOwnProperty.call(this,Q))return;Object.defineProperty(this,Q,{get:function(){return this.getReactiveBinding(j)},enumerable:!1,configurable:!0})}getReactiveDependency(j){let G=this.reactiveDependencies.get(j);if(G)return G;let Q=new B(()=>this.readReactiveDependencyValue(j));return this.reactiveDependencies.set(j,Q),Q}trackReactiveRead(j){x(this.getReactiveDependency(j))}readReactiveDependencyValue(j){let G=this.reactiveDependencyReaders.get(j);if(G)return G();return this.readReactiveBindingValue(j)}readReactiveBindingValue(j){let G=this[j];if(P(G))return G.get();return G}subscribeEvents(j){let G=[];for(let Q of j)G.push(this.subscribeEvent(Q));return G}subscribeEvent(j){let G=(U)=>{if(U.target&&U.target.matches(j.selector))j.listener.call(this,U)},Q=`${j.type}:${j.selector}`;return this.addEventListener(j.type,G,j.options),this.eventSubscriptions.set(Q,{...j,listener:G}),this.unsubscribeEvent.bind(this,Q)}unsubscribeEvent(j){let G=this.eventSubscriptions.get(j);if(G)this.removeEventListener(G.type,G.listener,G.options),this.eventSubscriptions.delete(j)}removeAllSubscribedEvents(){for(let j of this.eventSubscriptions.values())this.removeEventListener(j.type,j.listener,j.options);this.eventSubscriptions.clear()}registerCleanupCallback(j){this.onDisconnectedCallback.push(j)}registerConnectedCallback(j){this.onConnectedCallbacks.push(j)}registerEventEmitter(j,G){this.eventEmitters.set(j,G)}getRef(j,G=!1){let Q=`[data-ref="${j}"]`;if(G)return Array.from(this.querySelectorAll(Q));return this.querySelector(Q)??null}createReactiveField(j,G,Q={}){let U=Q.bind??this.shouldAutoBindReactiveMembers(),X={name:j,value:G,initialValue:G};this.registerReactiveField(X),this.defineReactiveBinding(j,U),this.registerReactiveDependencyReader(j,()=>this.reactiveFields.get(j)?.value),Object.defineProperty(this,j,{get(){return this.trackReactiveRead(j),this.reactiveFields.get(j)?.value??void 0},set(Y){let Z=this.reactiveFields.get(j)?.value;if(Z!==Y)this.reactiveFields.set(j,{...X,value:Y}),this.notifyUpdate(j,Z,Y)},enumerable:!0,configurable:!0}),this.notifyUpdate(j,void 0,G)}createReactiveProp(j,G){let{type:Q,attribute:U,reflect:X,defaultValue:Y}=G,Z=G.bind??this.shouldAutoBindReactiveMembers(),_=U??j;if(Y!==void 0&&!M(Q,Y))throw Error(`defaultValue does not match the expected type for ${Q.name}`);let $=L(this,Q,_,Y);if(this.hasAttribute(_)&&(!X||$==null||$===""))this.removeAttribute(_);let T={type:Q,name:j,value:$,initialValue:$,attribute:_,converter:{fromAttribute:(W)=>H(W,Q),toAttribute:(W)=>O(W,Q)}};this.registerReactiveProperty(T),this.defineReactiveBinding(j,Z),this.registerReactiveDependencyReader(j,()=>this.reactiveProperties.get(j)?.value);let q=(W)=>{if(X)if(W==null||W===""||W===!1)this.removeAttribute(_);else{let J=T.converter.toAttribute(W);this.setAttribute(_,J)}};if(Object.defineProperty(this,j,{get:function(){return this.trackReactiveRead(j),this.reactiveProperties.get(j)?.value??void 0},set:function(W){let J=this.reactiveProperties.get(j)?.value;if(J!==W)this.reactiveProperties.set(j,{...T,value:W}),q(W),this.notifyUpdate(j,J,W)},enumerable:!0,configurable:!0}),$!==void 0)queueMicrotask(()=>{let W=this.reactiveProperties.get(j)?.value;if(W===void 0)return;q(W),this.notifyUpdate(j,void 0,W)})}}function P(j){return typeof j==="object"&&j!==null&&typeof j.get==="function"}
2
- export{K as Y};
3
-
4
- //# debugId=E825FDA4BDC6619564756E2164756E21
@@ -1,10 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../src/core/radiant-element.ts"],
4
- "sourcesContent": [
5
- "import type { EventEmitter } from '../tools';\nimport { createSubscribableJsxValue, type JsxRenderable, type SubscribableJsxValue } from '@ecopages/jsx';\nimport { trackDependency, type DependencyNode, type SignalSubscriber } from '@ecopages/signals';\nimport type { SsrSerializableContextProvider } from '../context/context-provider';\nimport type { UnknownContext } from '../context/types';\nimport { runLegacyInstanceInitializers } from '../decorators/legacy/instance-initializers';\nimport type { SsrSerializableHydrationBinding } from './ssr-hydration-binding';\nimport { runSsrPreparationCallbacks } from './ssr-preparation';\nimport {\n\ttype AttributeTypeConstant,\n\ttype ReadAttributeValueReturnType,\n\ttype WriteAttributeValueReturnType,\n\tgetInitialValue,\n\tisValueOfType,\n\treadAttributeValue,\n\twriteAttributeValue,\n} from '../utils/attribute-utils';\n\nconst RadiantElementBase = resolveRadiantElementBase();\n\ntype ReactiveDependencyReader = () => unknown;\n\nclass ReactiveHostDependency implements DependencyNode {\n\tprivate readonly subscribers = new Set<SignalSubscriber<unknown>>();\n\tprivate readonly watcherListeners = new Set<() => void>();\n\tprivate version = 0;\n\n\tconstructor(private readonly read: ReactiveDependencyReader) {}\n\n\tpublic get(): unknown {\n\t\ttrackDependency(this);\n\t\treturn this.read();\n\t}\n\n\tpublic subscribe(notify: SignalSubscriber<unknown>): () => void {\n\t\tthis.subscribers.add(notify);\n\n\t\treturn () => {\n\t\t\tthis.subscribers.delete(notify);\n\t\t};\n\t}\n\n\tpublic addWatcher(notify: () => void): () => void {\n\t\tthis.watcherListeners.add(notify);\n\n\t\treturn () => {\n\t\t\tthis.watcherListeners.delete(notify);\n\t\t};\n\t}\n\n\tpublic getVersion(): number {\n\t\treturn this.version;\n\t}\n\n\tpublic notify(nextValue: unknown): void {\n\t\tthis.version += 1;\n\t\tlet watcherError: unknown;\n\n\t\ttry {\n\t\t\tthis.notifyWatchers();\n\t\t} catch (error) {\n\t\t\twatcherError = error;\n\t\t}\n\n\t\tthis.publish(nextValue);\n\n\t\tif (watcherError) {\n\t\t\tthrow watcherError;\n\t\t}\n\t}\n\n\tprivate publish(nextValue: unknown): void {\n\t\tfor (const subscriber of this.subscribers) {\n\t\t\tsubscriber(nextValue);\n\t\t}\n\t}\n\n\tprivate notifyWatchers(): void {\n\t\tconst errors: unknown[] = [];\n\n\t\tfor (const listener of this.watcherListeners) {\n\t\t\ttry {\n\t\t\t\tlistener();\n\t\t\t} catch (error) {\n\t\t\t\terrors.push(error);\n\t\t\t}\n\t\t}\n\n\t\tif (errors.length === 1) {\n\t\t\tthrow errors[0];\n\t\t}\n\n\t\tif (errors.length > 1) {\n\t\t\tthrow new AggregateError(errors, 'Multiple reactive dependency notifications failed.');\n\t\t}\n\t}\n}\n\nfunction resolveRadiantElementBase(): typeof HTMLElement {\n\tif (typeof HTMLElement !== 'undefined') {\n\t\treturn HTMLElement;\n\t}\n\n\tthrow new Error(\n\t\t\"RadiantElement requires HTMLElement. Install '@ecopages/radiant/server/light-dom-shim' before importing Radiant components in SSR.\",\n\t);\n}\n\n/**\n * Possible positions to insert a rendered template.\n */\nexport type RenderInsertPosition = 'replace' | 'beforebegin' | 'afterbegin' | 'beforeend' | 'afterend';\n\n/**\n * Represents a Radiant element event listener.\n */\nexport type RadiantElementEventListener = {\n\tselector: string;\n\ttype: string;\n\tlistener: EventListener;\n\toptions?: AddEventListenerOptions;\n};\n\n/**\n * Represents a property metadata object.\n */\nexport interface ReactiveProperty<T = unknown> {\n\ttype: AttributeTypeConstant;\n\tvalue?: T;\n\tinitialValue?: T;\n\tname: string;\n\tattribute: string;\n\tconverter: {\n\t\tfromAttribute: (value: string) => ReadAttributeValueReturnType;\n\t\ttoAttribute: (value: any) => WriteAttributeValueReturnType;\n\t};\n}\n\n/**\n * Represents the options for a reactive property.\n */\nexport type ReactivePropertyOptions<T> = {\n\ttype: AttributeTypeConstant;\n\treflect?: boolean;\n\tattribute?: string;\n\tdefaultValue?: T;\n\t/**\n\t * Exposes a JSX binding companion for the reactive property.\n\t *\n\t * - `true` creates a `$propertyName` accessor.\n\t * - a string creates a custom accessor with that name.\n\t * - `undefined` defers to the host default.\n\t *\n\t * The generated accessor returns a subscribable JSX child value so JSX can\n\t * patch only the affected child part when the property changes.\n\t */\n\tbind?: boolean | string;\n};\n\nexport type ReactiveBindingOption = boolean | string;\n\nexport type ReactiveFieldOptions = {\n\t/**\n\t * Exposes a JSX binding companion for the reactive field.\n\t *\n\t * - `true` creates a `$fieldName` accessor.\n\t * - a string creates a custom accessor with that name.\n\t * - `undefined` defers to the host default.\n\t */\n\tbind?: ReactiveBindingOption;\n};\n\nexport type ReactiveField<T = unknown> = {\n\tname: string;\n\tvalue: T;\n\tinitialValue: T;\n};\n\ntype StringPropertyKey<Value> = Extract<keyof Value, string>;\n\n/**\n * Value type produced by a JSX binding for a selected reactive member.\n *\n * Bindings preserve the original property type when it is already renderable by\n * the Ecopages JSX runtime. For non-renderable values, the binding falls back\n * to the broader `JsxRenderable` contract consumed by the renderer.\n */\nexport type ReactiveBindingValue<\n\tHost extends object,\n\tProperty extends StringPropertyKey<Host>,\n> = Host[Property] extends JsxRenderable ? Host[Property] : JsxRenderable;\n\n/**\n * Namespace of cached JSX bindings keyed by the explicit bindable shape.\n *\n * Radiant exposes this namespace twice on every host:\n *\n * - `host.bindings.key` for the explicit form\n * - `host.$.key` for the short form\n *\n * Both aliases resolve through the same cached binding objects as\n * `host.bind('key')`.\n */\nexport type ReactiveBindings<Bindings extends object> = {\n\treadonly [Property in StringPropertyKey<Bindings>]: SubscribableJsxValue<ReactiveBindingValue<Bindings, Property>>;\n};\n\n/**\n * Represents an interface for a Radiant element.\n * @typeParam Bindings - Explicit internal bindable shape used to type `bind()` and `getReactiveBinding()`.\n *\n * This shape describes which reactive members are exposed through `bindings`,\n * `$`, and `bind(...)`. It does not automatically define the public JSX\n * attribute contract for the custom element.\n */\nexport interface IRadiantElement<Bindings extends object = {}> {\n\t/**\n\t * Namespace of cached JSX bindings keyed by the explicit bindable shape.\n\t */\n\treadonly bindings: ReactiveBindings<Bindings>;\n\n\t/**\n\t * Short alias for {@link bindings}.\n\t */\n\treadonly $: ReactiveBindings<Bindings>;\n\n\t/**\n\t * Called when a property of the element is updated.\n\t * @param changedProperty - The name of the changed property.\n\t * @param oldValue - The old value of the property.\n\t * @param newValue - The new value of the property.\n\t */\n\tnotifyUpdate(changedProperty: string, oldValue: unknown, newValue: unknown): void;\n\n\t/**\n\t * Subscribes to a Radiant element event.\n\t * @param event - The event listener to subscribe to.\n\t */\n\tsubscribeEvent(event: RadiantElementEventListener): void;\n\n\t/**\n\t * Registers a callback to be invoked when a reactive property or field changes.\n\t *\n\t * @returns A cleanup function that unregisters the callback.\n\t */\n\tregisterUpdateCallback(property: string, update: (...rest: any[]) => any): () => void;\n\n\t/**\n\t * Returns a subscribable JSX child binding for a reactive property or field.\n\t *\n\t * Prefer `this.bindings.key` or `this.$.key` in JSX render code when you want\n\t * property access syntax without string literals.\n\t */\n\tbind<Property extends StringPropertyKey<Bindings>>(\n\t\tproperty: Property,\n\t): SubscribableJsxValue<ReactiveBindingValue<Bindings, Property>>;\n\n\t/**\n\t * Returns a subscribable JSX child binding for a reactive property or field.\n\t *\n\t * This is the primitive lookup used by `bind()`, `bindings.key`, and `$.key`.\n\t */\n\tgetReactiveBinding<Property extends StringPropertyKey<Bindings>>(\n\t\tproperty: Property,\n\t): SubscribableJsxValue<ReactiveBindingValue<Bindings, Property>>;\n\n\t/**\n\t * Defines a stable JSX binding companion accessor for a reactive member.\n\t *\n\t * Companion bindings create properties such as `$count` directly on the host.\n\t * Prefer the `bindings` or `$` namespace for new code when you want typed,\n\t * explicit access to the configured bindable shape.\n\t */\n\tdefineReactiveBinding(property: string, bind?: ReactiveBindingOption): void;\n\n\t/**\n\t * Subscribes to multiple Radiant element events.\n\t * @param events - The array of event listeners to subscribe to.\n\t */\n\tsubscribeEvents(events: RadiantElementEventListener[]): void;\n\n\t/**\n\t * It adds a callback to be executed when the Radiant element is disconnected from the DOM.\n\t */\n\tregisterCleanupCallback(callback: () => void): void;\n\n\t/**\n\t * Registers a callback to run on each future host connection.\n\t *\n\t * The callback is only invoked from `connectedCallback()`. Registering it\n\t * after the host is already connected does not invoke it immediately.\n\t */\n\tregisterConnectedCallback(callback: () => void): void;\n\n\t/**\n\t * Registers a raw value reader for a reactive member so that tracked render\n\t * dependencies can read the underlying value without triggering the public\n\t * getter's dependency tracking.\n\t */\n\tregisterReactiveDependencyReader(property: string, read: () => unknown): void;\n\n\t/**\n\t * Records a tracked read of a reactive member during a component render,\n\t * allowing the signals runtime to re-render only the affected parts.\n\t */\n\ttrackReactiveRead(property: string): void;\n\n\t/**\n\t * Renders a trusted HTML template string into the specified target element.\n\t *\n\t * **Security:** The `template` string is written to the DOM via `innerHTML`\n\t * or `insertAdjacentHTML` without built-in sanitization. Callers are\n\t * responsible for ensuring the input is trusted. Supply a `sanitize`\n\t * function to transform the template before insertion.\n\t *\n\t * @param options - The rendering options.\n\t * @param options.target - The target element to render the template into.\n\t * @param options.template - The template string to render.\n\t * @param options.insert - The position to insert the rendered template. (optional)\n\t * @param options.sanitize - An optional function that transforms the template string before insertion.\n\t */\n\trenderTemplate(options: {\n\t\ttarget: HTMLElement;\n\t\ttemplate: string;\n\t\tinsert?: RenderInsertPosition;\n\t\tsanitize?: (html: string) => string;\n\t}): void;\n\n\t/**\n\t * Called when the Radiant element is connected to a context.\n\t * @param context - The connected context.\n\t */\n\tconnectedContextCallback(context: UnknownContext): void;\n\n\t/**\n\t * Gets a reference to a child element by its data-ref attribute.\n\t * @param ref - The data-ref attribute value of the element to get.\n\t * @param all - Whether to get all elements with the specified data-ref attribute value.\n\t * @returns The element with the specified data-ref attribute value, an array of elements or null if no element was found.\n\t */\n\tgetRef<T extends Element = Element>(ref: string, all: true): T[];\n\tgetRef<T extends Element = Element>(ref: string, all?: false): T | null;\n}\n\n/**\n * A base class for creating custom elements with reactive properties and event subscriptions.\n * @typeParam Bindings - Explicit internal bindable shape. Include only the\n * prop/state keys that JSX bindings should accept.\n *\n * Prefer a separate public props type for custom-element JSX declarations when\n * the external attribute contract differs from the component's internal\n * reactive state. Reuse the same type only when the public props and bindable\n * members are intentionally identical.\n * @extends HTMLElement\n * @implements IRadiantElement<Bindings>\n */\nexport class RadiantElement<Bindings extends object = {}>\n\textends RadiantElementBase\n\timplements IRadiantElement<Bindings>\n{\n\tpublic readonly bindings: ReactiveBindings<Bindings>;\n\tpublic readonly $: ReactiveBindings<Bindings>;\n\n\t/**\n\t * A map of property metadata objects, it contains useful information about the properties configured via decorators.\n\t */\n\tprivate reactiveProperties = new Map<string, ReactiveProperty>();\n\n\t/**\n\t * A map of reactive fields, it contains the reactive fields configured via decorators.\n\t */\n\tprivate reactiveFields = new Map<string, ReactiveField>();\n\n\t/**\n\t * Stable dependency nodes used when plain reactive member reads participate\n\t * in tracked component renders.\n\t */\n\tprivate reactiveDependencies = new Map<string, ReactiveHostDependency>();\n\n\t/**\n\t * Raw value readers for reactive members whose public getter should also\n\t * register tracked render dependencies.\n\t */\n\tprivate reactiveDependencyReaders = new Map<string, ReactiveDependencyReader>();\n\n\t/**\n\t * Stable subscribable JSX bindings keyed by reactive property name.\n\t */\n\tprivate reactiveBindings = new Map<string, SubscribableJsxValue>();\n\n\t/**\n\t * Registered context providers keyed by decorated property name.\n\t */\n\tprivate contextProviders = new Map<string, SsrSerializableContextProvider>();\n\n\t/**\n\t * Registered keyed hydration payload producers appended to SSR host output.\n\t */\n\tprivate hydrationBindings = new Map<string, SsrSerializableHydrationBinding>();\n\n\t/**\n\t * A map of property update callbacks. These callbacks are called when a property is updated.\n\t */\n\tprivate updateCallbacks = new Map<string, Set<(...rest: any[]) => any>>();\n\n\t/**\n\t * A map of event subscriptions used to manage event listeners on the Radiant element.\n\t */\n\tprivate eventSubscriptions = new Map<string, RadiantElementEventListener>();\n\n\t/**\n\t * A map for event emitters\n\t */\n\tprivate eventEmitters = new Map<string, EventEmitter>();\n\n\t/**\n\t * Callbacks executed whenever the Radiant element is connected to the DOM.\n\t */\n\tprivate onConnectedCallbacks: (() => void)[] = [];\n\n\t/**\n\t * An array of cleanup callbacks to be executed when the Radiant element is disconnected from the DOM.\n\t */\n\tprivate onDisconnectedCallback: (() => void)[] = [];\n\n\t/**\n\t * A flag indicating whether the element has been connected to the DOM.\n\t */\n\tprivate elementReady = false;\n\n\tconstructor() {\n\t\tsuper();\n\t\tconst bindingNamespace = this.createReactiveBindingNamespace();\n\t\tthis.bindings = bindingNamespace;\n\t\tthis.$ = bindingNamespace;\n\t\trunLegacyInstanceInitializers(this);\n\t}\n\n\tprivate createReactiveBindingNamespace(): ReactiveBindings<Bindings> {\n\t\treturn new Proxy(Object.create(null) as ReactiveBindings<Bindings>, {\n\t\t\tget: (_target, property) => {\n\t\t\t\tif (typeof property !== 'string') {\n\t\t\t\t\treturn undefined;\n\t\t\t\t}\n\n\t\t\t\treturn this.getReactiveBinding(property as StringPropertyKey<Bindings>);\n\t\t\t},\n\t\t}) as ReactiveBindings<Bindings>;\n\t}\n\n\tconnectedCallback() {\n\t\tthis.elementReady = true;\n\n\t\tfor (const callback of this.onConnectedCallbacks) {\n\t\t\tcallback();\n\t\t}\n\t}\n\n\tconnectedContextCallback(_contextName: UnknownContext): void {}\n\n\tdisconnectedCallback() {\n\t\tthis.removeAllSubscribedEvents();\n\t\tfor (const cleanup of this.onDisconnectedCallback) {\n\t\t\tcleanup();\n\t\t}\n\t}\n\n\tpublic notifyUpdate(changedProperty: string, oldValue: unknown, value: unknown) {\n\t\tif (oldValue === value) return;\n\n\t\tthis.reactiveDependencies.get(changedProperty)?.notify(value);\n\t\tconst updates = this.updateCallbacks.get(changedProperty);\n\n\t\tif (updates) {\n\t\t\tfor (const update of updates) {\n\t\t\t\tupdate();\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate transformAttributeValue(value: string | null, config: any): unknown {\n\t\treturn value !== null ? config?.converter.fromAttribute(value) : value;\n\t}\n\n\tattributeChangedCallback(name: string, oldValue: string | null, newValue: string | null) {\n\t\tif (oldValue === newValue || !this.elementReady) return;\n\n\t\tif (this.reactiveProperties.has(name)) {\n\t\t\tconst config = this.reactiveProperties.get(name);\n\n\t\t\tconst transformedValue = this.transformAttributeValue(newValue, config);\n\t\t\tconst transformedOldValue = this.transformAttributeValue(oldValue, config);\n\n\t\t\tconst key = config ? config.attribute : name;\n\t\t\t(this as any)[key] = transformedValue;\n\t\t\tthis.notifyUpdate(name, transformedOldValue, transformedValue);\n\t\t}\n\t}\n\n\t/**\n\t * Renders a trusted HTML template string into the specified target element.\n\t *\n\t * **Security:** The `template` string is written to the DOM via `innerHTML`\n\t * or `insertAdjacentHTML` without built-in sanitization. Callers are\n\t * responsible for ensuring the input is trusted. Supply a `sanitize`\n\t * function to transform the template before insertion.\n\t */\n\tpublic renderTemplate({\n\t\ttarget = this,\n\t\ttemplate,\n\t\tinsert = 'replace',\n\t\tsanitize,\n\t}: {\n\t\ttarget: HTMLElement;\n\t\ttemplate: string;\n\t\tinsert?: RenderInsertPosition;\n\t\tsanitize?: (html: string) => string;\n\t}) {\n\t\tconst html = sanitize ? sanitize(template) : template;\n\t\tswitch (insert) {\n\t\t\tcase 'replace':\n\t\t\t\ttarget.innerHTML = html;\n\t\t\t\tbreak;\n\t\t\tcase 'beforeend':\n\t\t\t\ttarget.insertAdjacentHTML('beforeend', html);\n\t\t\t\tbreak;\n\t\t\tcase 'afterbegin':\n\t\t\t\ttarget.insertAdjacentHTML('afterbegin', html);\n\t\t\t\tbreak;\n\t\t\tcase 'beforebegin':\n\t\t\t\ttarget.insertAdjacentHTML('beforebegin', html);\n\t\t\t\tbreak;\n\t\t\tcase 'afterend':\n\t\t\t\ttarget.insertAdjacentHTML('afterend', html);\n\t\t\t\tbreak;\n\t\t}\n\t}\n\n\tpublic registerReactiveProperty(config: ReactiveProperty) {\n\t\tthis.reactiveProperties.set(config.name, config);\n\t}\n\n\tprotected getReactiveProperties(): ReactiveProperty[] {\n\t\treturn Array.from(this.reactiveProperties.values());\n\t}\n\n\tpublic registerReactiveField<T>(config: ReactiveField<T>) {\n\t\tthis.reactiveFields.set(config.name, config);\n\t}\n\n\tpublic registerReactiveDependencyReader(property: string, read: ReactiveDependencyReader): void {\n\t\tthis.reactiveDependencyReaders.set(property, read);\n\t}\n\n\tpublic registerContextProvider(name: string, provider: SsrSerializableContextProvider): void {\n\t\tthis.contextProviders.set(name, provider);\n\t\tthis.registerHydrationBinding(name, provider);\n\t}\n\n\tpublic registerHydrationBinding(name: string, binding: SsrSerializableHydrationBinding): void {\n\t\tthis.hydrationBindings.set(name, binding);\n\t}\n\n\tprotected getContextProviders(): SsrSerializableContextProvider[] {\n\t\treturn Array.from(this.contextProviders.values());\n\t}\n\n\tprotected getHydrationBindings(): SsrSerializableHydrationBinding[] {\n\t\treturn Array.from(this.hydrationBindings.values());\n\t}\n\n\t/**\n\t * Flushes any deferred SSR-only preparation work before the host is\n\t * serialized.\n\t *\n\t * Radiant uses this to reapply SSR consumer state after construction so the\n\t * first server render sees finalized fields, props, and authored content.\n\t */\n\tprotected prepareForSsr(): void {\n\t\trunSsrPreparationCallbacks(this);\n\t}\n\n\t/**\n\t * Returns the default JSX binding policy for reactive members on this host.\n\t *\n\t * Plain `RadiantElement` instances keep binding opt-in. JSX-first hosts such\n\t * as `RadiantComponent` override this hook to opt into automatic bindings for\n\t * `@prop`, `@state`, and direct `createReactiveProp`/`createReactiveField`\n\t * calls when no explicit `bind` option is supplied.\n\t */\n\tprotected shouldAutoBindReactiveMembers(): boolean {\n\t\treturn false;\n\t}\n\n\tpublic registerUpdateCallback(property: string, update: (...rest: any[]) => any): () => void {\n\t\tif (!this.updateCallbacks.has(property)) {\n\t\t\tthis.updateCallbacks.set(property, new Set());\n\t\t}\n\n\t\tconst callbacks = this.updateCallbacks.get(property)!;\n\t\tcallbacks.add(update);\n\n\t\treturn () => {\n\t\t\tcallbacks.delete(update);\n\n\t\t\tif (callbacks.size === 0) {\n\t\t\t\tthis.updateCallbacks.delete(property);\n\t\t\t}\n\t\t};\n\t}\n\n\tpublic getReactiveBinding<Property extends StringPropertyKey<Bindings>>(\n\t\tproperty: Property,\n\t): SubscribableJsxValue<ReactiveBindingValue<Bindings, Property>> {\n\t\tconst cachedBinding = this.reactiveBindings.get(property);\n\n\t\tif (cachedBinding) {\n\t\t\treturn cachedBinding as SubscribableJsxValue<ReactiveBindingValue<Bindings, Property>>;\n\t\t}\n\n\t\tconst binding = createSubscribableJsxValue<ReactiveBindingValue<Bindings, Property>>({\n\t\t\tgetValue: () => this.readReactiveBindingValue(property) as ReactiveBindingValue<Bindings, Property>,\n\t\t\tsubscribe: (notify) =>\n\t\t\t\tthis.registerUpdateCallback(property, () => {\n\t\t\t\t\tnotify(this.readReactiveBindingValue(property) as ReactiveBindingValue<Bindings, Property>);\n\t\t\t\t}),\n\t\t});\n\n\t\tthis.reactiveBindings.set(property, binding);\n\t\treturn binding;\n\t}\n\n\tpublic bind<Property extends StringPropertyKey<Bindings>>(\n\t\tproperty: Property,\n\t): SubscribableJsxValue<ReactiveBindingValue<Bindings, Property>> {\n\t\treturn this.getReactiveBinding(property) as SubscribableJsxValue<ReactiveBindingValue<Bindings, Property>>;\n\t}\n\n\tpublic defineReactiveBinding(property: string, bind: ReactiveBindingOption = true): void {\n\t\tconst bindingPropertyName = typeof bind === 'string' ? bind : bind ? `$${property}` : undefined;\n\n\t\tif (!bindingPropertyName || Object.prototype.hasOwnProperty.call(this, bindingPropertyName)) {\n\t\t\treturn;\n\t\t}\n\n\t\tObject.defineProperty(this, bindingPropertyName, {\n\t\t\tget: function (this: RadiantElement<Bindings>) {\n\t\t\t\treturn this.getReactiveBinding(property as StringPropertyKey<Bindings>);\n\t\t\t},\n\t\t\tenumerable: false,\n\t\t\tconfigurable: true,\n\t\t});\n\t}\n\n\tprivate getReactiveDependency(property: string): ReactiveHostDependency {\n\t\tconst cachedDependency = this.reactiveDependencies.get(property);\n\n\t\tif (cachedDependency) {\n\t\t\treturn cachedDependency;\n\t\t}\n\n\t\tconst dependency = new ReactiveHostDependency(() => this.readReactiveDependencyValue(property));\n\t\tthis.reactiveDependencies.set(property, dependency);\n\t\treturn dependency;\n\t}\n\n\tpublic trackReactiveRead(property: string): void {\n\t\ttrackDependency(this.getReactiveDependency(property));\n\t}\n\n\tprivate readReactiveDependencyValue(property: string): unknown {\n\t\tconst reader = this.reactiveDependencyReaders.get(property);\n\n\t\tif (reader) {\n\t\t\treturn reader();\n\t\t}\n\n\t\treturn this.readReactiveBindingValue(property as StringPropertyKey<Bindings>);\n\t}\n\n\tprivate readReactiveBindingValue<Property extends StringPropertyKey<Bindings>>(property: Property): unknown {\n\t\tconst value = (this as unknown as Record<string, unknown>)[property];\n\n\t\tif (isSignalLikeBindingValue(value)) {\n\t\t\treturn value.get();\n\t\t}\n\n\t\treturn value;\n\t}\n\n\tpublic subscribeEvents(events: RadiantElementEventListener[]): Array<() => void> {\n\t\tconst unsubscribers: Array<() => void> = [];\n\t\tfor (const event of events) {\n\t\t\tunsubscribers.push(this.subscribeEvent(event));\n\t\t}\n\t\treturn unsubscribers;\n\t}\n\n\tpublic subscribeEvent(eventConfig: RadiantElementEventListener): () => void {\n\t\tconst delegatedListener = (delegatedEvent: Event) => {\n\t\t\tif (delegatedEvent.target && (delegatedEvent.target as Element).matches(eventConfig.selector)) {\n\t\t\t\teventConfig.listener.call(this, delegatedEvent);\n\t\t\t}\n\t\t};\n\t\tconst subscriptionId = `${eventConfig.type}:${eventConfig.selector}`;\n\t\tthis.addEventListener(eventConfig.type, delegatedListener, eventConfig.options);\n\t\tthis.eventSubscriptions.set(subscriptionId, {\n\t\t\t...eventConfig,\n\t\t\tlistener: delegatedListener,\n\t\t});\n\n\t\treturn this.unsubscribeEvent.bind(this, subscriptionId);\n\t}\n\n\tprivate unsubscribeEvent(id: string): void {\n\t\tconst eventSubscription = this.eventSubscriptions.get(id);\n\t\tif (eventSubscription) {\n\t\t\tthis.removeEventListener(eventSubscription.type, eventSubscription.listener, eventSubscription.options);\n\t\t\tthis.eventSubscriptions.delete(id);\n\t\t}\n\t}\n\n\tprivate removeAllSubscribedEvents(): void {\n\t\tfor (const eventSubscription of this.eventSubscriptions.values()) {\n\t\t\tthis.removeEventListener(eventSubscription.type, eventSubscription.listener, eventSubscription.options);\n\t\t}\n\t\tthis.eventSubscriptions.clear();\n\t}\n\n\t/**\n\t * Registers a callback that runs on every future disconnect.\n\t */\n\tpublic registerCleanupCallback(callback: () => void): void {\n\t\tthis.onDisconnectedCallback.push(callback);\n\t}\n\n\t/**\n\t * Registers a callback that runs from `connectedCallback()` on future host\n\t * connections.\n\t *\n\t * Registering after the host is already connected does not invoke the\n\t * callback immediately.\n\t */\n\tpublic registerConnectedCallback(callback: () => void): void {\n\t\tthis.onConnectedCallbacks.push(callback);\n\t}\n\n\tpublic registerEventEmitter(name: string, emitter: EventEmitter) {\n\t\tthis.eventEmitters.set(name, emitter);\n\t}\n\n\tpublic getRef<T extends Element = Element>(ref: string, all: true): T[];\n\tpublic getRef<T extends Element = Element>(ref: string, all?: false): T | null;\n\tpublic getRef<T extends Element = Element>(ref: string, all = false): T | T[] | null {\n\t\tconst selector = `[data-ref=\"${ref}\"]`;\n\t\tif (all) {\n\t\t\treturn Array.from(this.querySelectorAll(selector)) as T[];\n\t\t}\n\t\treturn (this.querySelector(selector) as T) ?? null;\n\t}\n\n\tpublic createReactiveField<T>(propertyName: string, initialValue: T, options: ReactiveFieldOptions = {}): void {\n\t\tconst bind = options.bind ?? this.shouldAutoBindReactiveMembers();\n\t\tconst reactiveField: ReactiveField<T> = {\n\t\t\tname: propertyName,\n\t\t\tvalue: initialValue,\n\t\t\tinitialValue: initialValue,\n\t\t};\n\n\t\tthis.registerReactiveField(reactiveField);\n\t\tthis.defineReactiveBinding(propertyName, bind);\n\t\tthis.registerReactiveDependencyReader(propertyName, () => this.reactiveFields.get(propertyName)?.value);\n\n\t\tObject.defineProperty(this, propertyName, {\n\t\t\tget(this: RadiantElement) {\n\t\t\t\tthis.trackReactiveRead(propertyName);\n\t\t\t\treturn this.reactiveFields.get(propertyName)?.value ?? undefined;\n\t\t\t},\n\t\t\tset(this: RadiantElement, newValue: T) {\n\t\t\t\tconst oldValue = this.reactiveFields.get(propertyName)?.value;\n\t\t\t\tif (oldValue !== newValue) {\n\t\t\t\t\tthis.reactiveFields.set(propertyName, { ...reactiveField, value: newValue });\n\t\t\t\t\tthis.notifyUpdate(propertyName, oldValue, newValue);\n\t\t\t\t}\n\t\t\t},\n\t\t\tenumerable: true,\n\t\t\tconfigurable: true,\n\t\t});\n\n\t\tthis.notifyUpdate(propertyName, undefined, initialValue);\n\t}\n\n\tpublic createReactiveProp<T = unknown>(propertyName: string, options: ReactivePropertyOptions<T>): void {\n\t\tconst { type, attribute, reflect, defaultValue } = options;\n\t\tconst bind = options.bind ?? this.shouldAutoBindReactiveMembers();\n\t\tconst attributeKey = attribute ?? propertyName;\n\n\t\tif (defaultValue !== undefined && !isValueOfType(type, defaultValue)) {\n\t\t\tthrow new Error(`defaultValue does not match the expected type for ${type.name}`);\n\t\t}\n\n\t\tconst initialValue: T | undefined = getInitialValue(this, type, attributeKey, defaultValue) as T;\n\n\t\tif (this.hasAttribute(attributeKey) && (!reflect || initialValue == null || initialValue === '')) {\n\t\t\tthis.removeAttribute(attributeKey);\n\t\t}\n\n\t\tconst propertyMapping: ReactiveProperty<T> = {\n\t\t\ttype,\n\t\t\tname: propertyName,\n\t\t\tvalue: initialValue,\n\t\t\tinitialValue,\n\t\t\tattribute: attributeKey,\n\t\t\tconverter: {\n\t\t\t\tfromAttribute: (value) => readAttributeValue(value, type),\n\t\t\t\ttoAttribute: (value) => writeAttributeValue(value, type),\n\t\t\t},\n\t\t};\n\n\t\tthis.registerReactiveProperty(propertyMapping);\n\t\tthis.defineReactiveBinding(propertyName, bind);\n\t\tthis.registerReactiveDependencyReader(propertyName, () => this.reactiveProperties.get(propertyName)?.value);\n\n\t\tconst handleReflectRequest = (value: T) => {\n\t\t\tif (reflect) {\n\t\t\t\tif (value == null || value === '' || value === false) {\n\t\t\t\t\tthis.removeAttribute(attributeKey);\n\t\t\t\t} else {\n\t\t\t\t\tconst attributeValue = propertyMapping.converter.toAttribute(value);\n\t\t\t\t\tthis.setAttribute(attributeKey, attributeValue);\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\tObject.defineProperty(this, propertyName, {\n\t\t\tget: function (this: RadiantElement) {\n\t\t\t\tthis.trackReactiveRead(propertyName);\n\t\t\t\treturn this.reactiveProperties.get(propertyName)?.value ?? undefined;\n\t\t\t},\n\t\t\tset: function (this: RadiantElement, newValue: T) {\n\t\t\t\tconst oldValue = this.reactiveProperties.get(propertyName)?.value;\n\t\t\t\tif (oldValue !== newValue) {\n\t\t\t\t\tthis.reactiveProperties.set(propertyName, { ...propertyMapping, value: newValue });\n\t\t\t\t\thandleReflectRequest(newValue);\n\t\t\t\t\tthis.notifyUpdate(propertyName, oldValue, newValue);\n\t\t\t\t}\n\t\t\t},\n\t\t\tenumerable: true,\n\t\t\tconfigurable: true,\n\t\t});\n\n\t\tif (initialValue !== undefined) {\n\t\t\tqueueMicrotask(() => {\n\t\t\t\tconst currentValue = this.reactiveProperties.get(propertyName)?.value as T | undefined;\n\t\t\t\tif (currentValue === undefined) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\thandleReflectRequest(currentValue);\n\t\t\t\tthis.notifyUpdate(propertyName, undefined, currentValue);\n\t\t\t});\n\t\t}\n\t}\n}\n\nfunction isSignalLikeBindingValue(value: unknown): value is { get(): unknown } {\n\treturn typeof value === 'object' && value !== null && typeof (value as { get?: unknown }).get === 'function';\n}\n"
6
- ],
7
- "mappings": "+JACA,+BAAS,gBACT,0BAAS,0BAgBT,IAAM,EAAqB,EAA0B,EAIrD,MAAM,CAAiD,CAKzB,KAJZ,YAAc,IAAI,IAClB,iBAAmB,IAAI,IAChC,QAAU,EAElB,WAAW,CAAkB,EAAgC,CAAhC,YAEtB,GAAG,EAAY,CAErB,OADA,EAAgB,IAAI,EACb,KAAK,KAAK,EAGX,SAAS,CAAC,EAA+C,CAG/D,OAFA,KAAK,YAAY,IAAI,CAAM,EAEpB,IAAM,CACZ,KAAK,YAAY,OAAO,CAAM,GAIzB,UAAU,CAAC,EAAgC,CAGjD,OAFA,KAAK,iBAAiB,IAAI,CAAM,EAEzB,IAAM,CACZ,KAAK,iBAAiB,OAAO,CAAM,GAI9B,UAAU,EAAW,CAC3B,OAAO,KAAK,QAGN,MAAM,CAAC,EAA0B,CACvC,KAAK,SAAW,EAChB,IAAI,EAEJ,GAAI,CACH,KAAK,eAAe,EACnB,MAAO,EAAO,CACf,EAAe,EAKhB,GAFA,KAAK,QAAQ,CAAS,EAElB,EACH,MAAM,EAIA,OAAO,CAAC,EAA0B,CACzC,QAAW,KAAc,KAAK,YAC7B,EAAW,CAAS,EAId,cAAc,EAAS,CAC9B,IAAM,EAAoB,CAAC,EAE3B,QAAW,KAAY,KAAK,iBAC3B,GAAI,CACH,EAAS,EACR,MAAO,EAAO,CACf,EAAO,KAAK,CAAK,EAInB,GAAI,EAAO,SAAW,EACrB,MAAM,EAAO,GAGd,GAAI,EAAO,OAAS,EACnB,MAAU,eAAe,EAAQ,oDAAoD,EAGxF,CAEA,SAAS,CAAyB,EAAuB,CACxD,GAAI,OAAO,YAAgB,IAC1B,OAAO,YAGR,MAAU,MACT,o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E2164756E21",
9
- "names": []
10
- }
@@ -1,4 +0,0 @@
1
- var a=Symbol.for("@ecopages/radiant.hydrator-installed");function b(){globalThis[a]=!0}function c(){delete globalThis[a]}function d(){return globalThis[a]===!0}
2
- export{b as Qa,c as Ra,d as Sa};
3
-
4
- //# debugId=FBA0BA95E617859164756E2164756E21
@@ -1,10 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../src/core/radiant-hydrator-state.ts"],
4
- "sourcesContent": [
5
- "const RADIANT_HYDRATOR_INSTALLED_SYMBOL = Symbol.for('@ecopages/radiant.hydrator-installed');\n\ntype GlobalHydratorState = typeof globalThis & Record<PropertyKey, unknown>;\n\n/**\n * Marks the current JavaScript environment as hydration-enabled for first\n * custom-element connect.\n *\n * `RadiantComponent` reads this flag before deciding whether SSR markup should\n * hydrate in place or be replaced by a fresh client render.\n */\nexport function installRadiantHydratorState(): void {\n\t(globalThis as GlobalHydratorState)[RADIANT_HYDRATOR_INSTALLED_SYMBOL] = true;\n}\n\n/**\n * Clears the explicit hydration-enabled flag from `globalThis`.\n *\n * This is mainly used by tests so they can assert both hydrated and non-\n * hydrated first-connect behavior deterministically.\n */\nexport function uninstallRadiantHydratorState(): void {\n\tdelete (globalThis as GlobalHydratorState)[RADIANT_HYDRATOR_INSTALLED_SYMBOL];\n}\n\n/**\n * Returns whether first-connect hydration is currently enabled for this\n * JavaScript environment.\n */\nexport function isRadiantHydratorInstalled(): boolean {\n\treturn (globalThis as GlobalHydratorState)[RADIANT_HYDRATOR_INSTALLED_SYMBOL] === true;\n}\n"
6
- ],
7
- "mappings": "AAAA,IAAM,EAAoC,OAAO,IAAI,sCAAsC,EAWpF,SAAS,CAA2B,EAAS,CAClD,WAAmC,GAAqC,GASnE,SAAS,CAA6B,EAAS,CACrD,OAAQ,WAAmC,GAOrC,SAAS,CAA0B,EAAY,CACrD,OAAQ,WAAmC,KAAuC",
8
- "debugId": "FBA0BA95E617859164756E2164756E21",
9
- "names": []
10
- }
@@ -1,4 +0,0 @@
1
- import{g as I}from"./chunk-zygdebw8.js";import{Ta as D,Ua as F}from"./chunk-e0r6ca2g.js";import{Za as G}from"./chunk-9mqtp3js.js";import{renderToString as N}from"@ecopages/jsx/server";import{withServerCustomElementRenderHook as O}from"@ecopages/jsx/server";var P=Symbol.for("@ecopages/jsx.active-ssr-hydrate"),A=new WeakSet;function Q(f){return{nodeType:1,outerHTML:J(f,{mode:"hydrate"})}}function J(f,j={}){return L(f).renderHostToString(j,K(f))}function K(f){let j=f;if(A.has(f))return L(f).getHostAttributes();A.add(f);try{return j.getHostSsrAttributes()}finally{A.delete(f)}}function L(f){let j=f;return new I({constructor:j.constructor,getAuthoredHydrationScriptMarkup:()=>j.getAuthoredHydrationScriptMarkup(),getHydrationBindings:()=>j.getHydrationBindings(),getSlotProjectionScriptTag:()=>j.getSlotProjectionScriptTag(),renderToString:(k)=>j.renderToString(k),getContextProviders:()=>j.getContextProviders(),getReactiveProperties:()=>j.getReactiveProperties(),getReactivePropDefinitions:()=>G(f),getPropertyValue:(k)=>j[k],listAttributeNames:()=>typeof j.getAttributeNames==="function"?j.getAttributeNames():[],getAttributeValue:(k)=>j.getAttribute(k)})}function U(f){return O(({instance:j})=>{let k=M(j);if(!k?.renderHostToString)return;let z=k.renderHostToString;return{nodeType:1,get outerHTML(){let q=V();return z({hydrate:q,mode:q?"hydrate":"plain"})}}},f)}function M(f){return f.resolveSsrRenderBridge?.()}function V(){return globalThis[P]===!0}function W(){let f=D();if(f)return f;let j={getHostAttributes:K,renderHost:Q,renderHostToString:J,resolveRenderBridge:M,renderView:(k,z={})=>{let q=k;return U(()=>N(q.resolveTrackedRenderOutput().value,z))}};return F(j),j}W();
2
- export{W as f};
3
-
4
- //# debugId=6D634BADD4BBC3EB64756E2164756E21
@@ -1,10 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../src/server/radiant-component-ssr-runtime.ts"],
4
- "sourcesContent": [
5
- "import type { JsxRenderable } from '@ecopages/jsx';\nimport { renderToString as renderJsxToString } from '@ecopages/jsx/server';\nimport { withServerCustomElementRenderHook } from '@ecopages/jsx/server';\nimport type { RenderToStringOptions } from '@ecopages/jsx/server';\nimport { getReactivePropDefinitions } from '../core/reactive-prop-metadata';\nimport { RadiantComponentSsrService } from '../core/radiant-component-ssr';\nimport {\n\tgetRadiantComponentSsrRuntime,\n\tregisterRadiantComponentSsrRuntime,\n\ttype RadiantComponentRenderBridge,\n\ttype RadiantComponentSsrCapable,\n\ttype RadiantComponentSsrRuntime,\n} from '../core/radiant-component-ssr-registry';\nimport type { SsrSerializableContextProvider } from '../context/context-provider';\nimport type { ReactiveProperty } from '../core/radiant-element';\nimport type { SsrSerializableHydrationBinding } from '../core/ssr-hydration-binding';\n\ntype RadiantComponentSsrHostBridge = Record<string, unknown> & {\n\tconstructor: CustomElementConstructor;\n\tgetAttribute(name: string): string | null;\n\tgetAttributeNames?(): string[];\n\tgetAuthoredHydrationScriptMarkup(): string | undefined;\n\tgetContextProviders(): SsrSerializableContextProvider[];\n\tgetHostSsrAttributes(): Record<string, string>;\n\tgetHydrationBindings(): SsrSerializableHydrationBinding[];\n\tgetReactiveProperties(): ReactiveProperty[];\n\tgetSlotProjectionScriptTag(): string | undefined;\n\tresolveTrackedRenderOutput(): { containsSlots: boolean; value: JsxRenderable };\n\trenderToString(options?: RenderToStringOptions): string;\n\tresolveSsrRenderBridge(): RadiantComponentRenderBridge;\n};\n\nconst ACTIVE_SSR_HYDRATE_SYMBOL = Symbol.for('@ecopages/jsx.active-ssr-hydrate');\nconst hostAttributeResolutionInProgress = new WeakSet<object>();\n\n/**\n * Produces a JSX-compatible host preview for a Radiant component.\n *\n * The preview always serializes with hydration enabled because it is intended\n * for shell composition, where nested client islands must preserve hydration\n * markers when embedded into a larger SSR document.\n */\nfunction renderRadiantComponentHost(component: RadiantComponentSsrCapable): JsxRenderable {\n\treturn {\n\t\tnodeType: 1,\n\t\touterHTML: renderRadiantComponentHostToString(component, { mode: 'hydrate' }),\n\t};\n}\n\n/**\n * Serializes a Radiant component host through the shared SSR service.\n *\n * This path centralizes host serialization so direct component renders and\n * nested JSX custom-element renders follow the same attribute and hydration\n * rules.\n */\nfunction renderRadiantComponentHostToString(\n\tcomponent: RadiantComponentSsrCapable,\n\toptions: RenderToStringOptions = {},\n): string {\n\treturn createRadiantComponentSsrService(component).renderHostToString(\n\t\toptions,\n\t\tgetRadiantComponentHostSsrAttributes(component),\n\t);\n}\n\n/**\n * Resolves the final host attribute map for a Radiant component.\n *\n * The recursion guard is required because `getHostSsrAttributes()` can itself\n * delegate back into the shared runtime. When that happens, the runtime falls\n * back to the raw SSR service attribute collector for the current call.\n */\nfunction getRadiantComponentHostSsrAttributes(component: RadiantComponentSsrCapable): Record<string, string> {\n\tconst bridge = component as unknown as RadiantComponentSsrHostBridge;\n\n\tif (hostAttributeResolutionInProgress.has(component)) {\n\t\treturn createRadiantComponentSsrService(component).getHostAttributes();\n\t}\n\n\thostAttributeResolutionInProgress.add(component);\n\n\ttry {\n\t\treturn bridge.getHostSsrAttributes();\n\t} finally {\n\t\thostAttributeResolutionInProgress.delete(component);\n\t}\n}\n\n/**\n * Adapts a `RadiantComponent` instance to the older `RadiantComponentSsrService`\n * contract.\n *\n * Keeping this adapter local lets the base class shed its eager SSR service\n * instance while preserving the established host serialization behavior.\n */\nfunction createRadiantComponentSsrService(component: RadiantComponentSsrCapable): RadiantComponentSsrService {\n\tconst bridge = component as unknown as RadiantComponentSsrHostBridge;\n\n\treturn new RadiantComponentSsrService({\n\t\tconstructor: bridge.constructor,\n\t\tgetAuthoredHydrationScriptMarkup: () => bridge.getAuthoredHydrationScriptMarkup(),\n\t\tgetHydrationBindings: () => bridge.getHydrationBindings(),\n\t\tgetSlotProjectionScriptTag: () => bridge.getSlotProjectionScriptTag(),\n\t\trenderToString: (options) => bridge.renderToString(options),\n\t\tgetContextProviders: () => bridge.getContextProviders(),\n\t\tgetReactiveProperties: () => bridge.getReactiveProperties(),\n\t\tgetReactivePropDefinitions: () => getReactivePropDefinitions(component),\n\t\tgetPropertyValue: (name) => bridge[name],\n\t\tlistAttributeNames: () => (typeof bridge.getAttributeNames === 'function' ? bridge.getAttributeNames() : []),\n\t\tgetAttributeValue: (name) => bridge.getAttribute(name),\n\t});\n}\n\n/**\n * Installs a temporary JSX custom-element render hook that understands\n * `RadiantComponent` SSR bridges.\n *\n * This makes nested intrinsic custom-element renders honor explicit host SSR\n * overrides instead of always falling back to the inherited JSX runtime path.\n */\nfunction withRadiantServerCustomElementRenderBridge<T>(render: () => T): T {\n\treturn withServerCustomElementRenderHook(({ instance }) => {\n\t\tconst nestedBridge = resolveRadiantComponentRenderBridge(instance as unknown as RadiantComponentSsrCapable);\n\n\t\tif (!nestedBridge?.renderHostToString) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst renderHostToString = nestedBridge.renderHostToString;\n\n\t\treturn {\n\t\t\tnodeType: 1,\n\t\t\tget outerHTML() {\n\t\t\t\tconst hydrate = isActiveSsrHydrateMode();\n\t\t\t\treturn renderHostToString({ hydrate, mode: hydrate ? 'hydrate' : 'plain' });\n\t\t\t},\n\t\t};\n\t}, render);\n}\n\n/**\n * Resolves the SSR bridge exposed by a component instance, when present.\n */\nfunction resolveRadiantComponentRenderBridge(\n\tcomponent: RadiantComponentSsrCapable,\n): RadiantComponentRenderBridge | undefined {\n\treturn component.resolveSsrRenderBridge?.();\n}\n\n/**\n * Reads the active JSX SSR hydrate flag from `globalThis`.\n *\n * Nested custom-element serialization mirrors the hydrate mode of the current\n * top-level render so host and child markup stay consistent.\n */\nfunction isActiveSsrHydrateMode(): boolean {\n\treturn (globalThis as typeof globalThis & Record<PropertyKey, unknown>)[ACTIVE_SSR_HYDRATE_SYMBOL] === true;\n}\n\n/**\n * Registers the shared Radiant SSR runtime if it is not already present.\n *\n * Server entrypoints call this eagerly so instance SSR methods, nested JSX\n * custom-element SSR, and portable server helpers all share one implementation\n * and one bridge-resolution strategy.\n */\nexport function ensureRadiantComponentSsrRuntimeRegistered() {\n\tconst existingRuntime = getRadiantComponentSsrRuntime();\n\n\tif (existingRuntime) {\n\t\treturn existingRuntime;\n\t}\n\n\tconst runtime: RadiantComponentSsrRuntime = {\n\t\tgetHostAttributes: getRadiantComponentHostSsrAttributes,\n\t\trenderHost: renderRadiantComponentHost,\n\t\trenderHostToString: renderRadiantComponentHostToString,\n\t\tresolveRenderBridge: resolveRadiantComponentRenderBridge,\n\t\trenderView: (component, options = {}) => {\n\t\t\tconst bridge = component as unknown as RadiantComponentSsrHostBridge;\n\n\t\t\treturn withRadiantServerCustomElementRenderBridge(() =>\n\t\t\t\trenderJsxToString(bridge.resolveTrackedRenderOutput().value, options),\n\t\t\t);\n\t\t},\n\t};\n\n\tregisterRadiantComponentSsrRuntime(runtime);\n\treturn runtime;\n}\n\nensureRadiantComponentSsrRuntimeRegistered();\n"
6
- ],
7
- "mappings": "8IACA,mBAAS,uBACT,4CAAS,6BA8BT,IAAM,EAA4B,OAAO,IAAI,kCAAkC,EACzE,EAAoC,IAAI,QAS9C,SAAS,CAA0B,CAAC,EAAsD,CACzF,MAAO,CACN,SAAU,EACV,UAAW,EAAmC,EAAW,CAAE,KAAM,SAAU,CAAC,CAC7E,EAUD,SAAS,CAAkC,CAC1C,EACA,EAAiC,CAAC,EACzB,CACT,OAAO,EAAiC,CAAS,EAAE,mBAClD,EACA,EAAqC,CAAS,CAC/C,EAUD,SAAS,CAAoC,CAAC,EAA+D,CAC5G,IAAM,EAAS,EAEf,GAAI,EAAkC,IAAI,CAAS,EAClD,OAAO,EAAiC,CAAS,EAAE,kBAAkB,EAGtE,EAAkC,IAAI,CAAS,EAE/C,GAAI,CACH,OAAO,EAAO,qBAAqB,SAClC,CACD,EAAkC,OAAO,CAAS,GAWpD,SAAS,CAAgC,CAAC,EAAmE,CAC5G,IAAM,EAAS,EAEf,OAAO,IAAI,EAA2B,CACrC,YAAa,EAAO,YACpB,iCAAkC,IAAM,EAAO,iCAAiC,EAChF,qBAAsB,IAAM,EAAO,qBAAqB,EACxD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=new WeakMap;return t.value=function(...a){let e=r.get(this);if(!e)e=o((...p)=>{return i.apply(this,p)},n),r.set(this,e);e(...a)},t}}
2
- export{d as ka};
3
-
4
- //# debugId=DC8D7CC44F15D92164756E2164756E21
@@ -1,10 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../src/decorators/legacy/debounce.ts"],
4
- "sourcesContent": [
5
- "import type { RadiantElement } from '../../core/radiant-element';\nimport { debounce as debounceFunction } from '../../helpers/debounce';\n\nexport function debounce(\n\ttimeout: number,\n): (target: any, propertyKey: string, descriptor: PropertyDescriptor) => PropertyDescriptor {\n\treturn (_target: RadiantElement, _propertyKey: string, descriptor: PropertyDescriptor): PropertyDescriptor => {\n\t\tconst originalMethod = descriptor.value;\n\t\tconst debouncedByInstance = new WeakMap<object, ReturnType<typeof debounceFunction<typeof originalMethod>>>();\n\n\t\tdescriptor.value = function debounce(this: object, ...args: Parameters<typeof originalMethod>) {\n\t\t\tlet debounced = debouncedByInstance.get(this);\n\n\t\t\tif (!debounced) {\n\t\t\t\tdebounced = debounceFunction((...innerArgs: Parameters<typeof originalMethod>) => {\n\t\t\t\t\treturn originalMethod.apply(this, innerArgs);\n\t\t\t\t}, timeout);\n\t\t\t\tdebouncedByInstance.set(this, debounced);\n\t\t\t}\n\n\t\t\tdebounced(...args);\n\t\t};\n\n\t\treturn descriptor;\n\t};\n}\n"
6
- ],
7
- "mappings": "yCAGO,SAAS,CAAQ,CACvB,EAC2F,CAC3F,MAAO,CAAC,EAAyB,EAAsB,IAAuD,CAC7G,IAAM,EAAiB,EAAW,MAC5B,EAAsB,IAAI,QAehC,OAbA,EAAW,MAAQ,QAAiB,IAAkB,EAAyC,CAC9F,IAAI,EAAY,EAAoB,IAAI,IAAI,EAE5C,GAAI,CAAC,EACJ,EAAY,EAAiB,IAAI,IAAiD,CACjF,OAAO,EAAe,MAAM,KAAM,CAAS,GACzC,CAAO,EACV,EAAoB,IAAI,KAAM,CAAS,EAGxC,EAAU,GAAG,CAAI,GAGX",
8
- "debugId": "DC8D7CC44F15D92164756E2164756E21",
9
- "names": []
10
- }
@@ -1,4 +0,0 @@
1
- import{wb as j}from"./chunk-nssj2x13.js";var X="data-hydration",w="data-hydration-type",V="data-hydration-key";function W(q){let z=q.hydrationKey?` ${V}="${F(q.hydrationKey)}"`:"";return`<script type="application/json" ${X} ${w}="${q.type}"${z}>${q.serializedValue}</script>`}function P(q){return j(q)}function C(q,z){let G=q.textContent;if(!G)return z;try{return JSON.parse(G)}catch{if(typeof console<"u")console.warn(`[@ecopages/radiant] Failed to parse hydration payload from <script ${X}>:`,G.slice(0,120));return z}}function S(q,z,G){let M=q.children;if(!M||M.length===0){let L=q.childNodes;if(!L||L.length===0)return null;for(let Q=0;Q<L.length;Q+=1){let Z=L[Q];if(Z.nodeType!==1)continue;let $=Z;if(g($,z,G))return $}return null}for(let L=0;L<M.length;L+=1)if(g(M[L],z,G))return M[L];return null}function g(q,z,G){if(q.tagName!=="SCRIPT"||!q.hasAttribute(X)||q.getAttribute(w)!==z)return!1;if(G!==void 0)return q.getAttribute(V)===G;return!q.hasAttribute(V)}function F(q){return q.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}
2
- export{X as pb,w as qb,V as rb,W as sb,P as tb,C as ub,S as vb};
3
-
4
- //# debugId=A274AAF950CB806764756E2164756E21
@@ -1,10 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../src/core/hydration-codec.ts"],
4
- "sourcesContent": [
5
- "import { escapeScriptJson } from '../tools/escape-script-json';\n\n/** Attribute marker used to identify hydration payloads inside a host. */\nexport const HYDRATION_ATTRIBUTE = 'data-hydration';\n/** Discriminator that scopes a hydration payload to a specific feature. */\nexport const HYDRATION_TYPE_ATTRIBUTE = 'data-hydration-type';\n/** Optional key that scopes a hydration payload to a specific decorated field. */\nexport const HYDRATION_KEY_ATTRIBUTE = 'data-hydration-key';\n\nexport type HydrationPayloadType = 'signal' | 'context';\n\n/** Creates a `<script type=\"application/json\">` tag for a hydration payload. */\nexport function createHydrationScriptTag(options: {\n\ttype: HydrationPayloadType;\n\thydrationKey?: string;\n\tserializedValue: string;\n}): string {\n\tconst keyAttribute = options.hydrationKey\n\t\t? ` ${HYDRATION_KEY_ATTRIBUTE}=\"${escapeHtmlAttribute(options.hydrationKey)}\"`\n\t\t: '';\n\n\treturn `<script type=\"application/json\" ${HYDRATION_ATTRIBUTE} ${HYDRATION_TYPE_ATTRIBUTE}=\"${options.type}\"${keyAttribute}>${options.serializedValue}</script>`;\n}\n\n/** Escapes serialized JSON so it remains safe inside an HTML script tag. */\nexport function escapeHydrationJson(value: string): string {\n\treturn escapeScriptJson(value);\n}\n\n/** Parses JSON from a hydration script element, returning the fallback on failure. */\nexport function parseHydrationPayload<T>(element: Element, fallback: T): T {\n\tconst textContent = element.textContent;\n\n\tif (!textContent) {\n\t\treturn fallback;\n\t}\n\n\ttry {\n\t\treturn JSON.parse(textContent) as T;\n\t} catch {\n\t\tif (typeof console !== 'undefined') {\n\t\t\tconsole.warn(\n\t\t\t\t`[@ecopages/radiant] Failed to parse hydration payload from <script ${HYDRATION_ATTRIBUTE}>:`,\n\t\t\t\ttextContent.slice(0, 120),\n\t\t\t);\n\t\t}\n\t\treturn fallback;\n\t}\n}\n\n/**\n * Finds a hydration script element inside a host by type and optional key.\n *\n * When a key is provided, looks for an exact `data-hydration-key` match.\n * Otherwise, returns the first unkeyed script matching the type.\n */\nexport function findHydrationScript(host: Element, type: HydrationPayloadType, hydrationKey?: string): Element | null {\n\tconst children = host.children;\n\n\tif (!children || children.length === 0) {\n\t\tconst childNodes = (host as Partial<{ childNodes: ArrayLike<{ nodeType: number }> }>).childNodes;\n\n\t\tif (!childNodes || childNodes.length === 0) {\n\t\t\treturn null;\n\t\t}\n\n\t\tfor (let i = 0; i < childNodes.length; i += 1) {\n\t\t\tconst node = childNodes[i]!;\n\n\t\t\tif (node.nodeType !== 1) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tconst element = node as unknown as Element;\n\n\t\t\tif (matchesHydrationScript(element, type, hydrationKey)) {\n\t\t\t\treturn element;\n\t\t\t}\n\t\t}\n\n\t\treturn null;\n\t}\n\n\tfor (let i = 0; i < children.length; i += 1) {\n\t\tif (matchesHydrationScript(children[i]!, type, hydrationKey)) {\n\t\t\treturn children[i]!;\n\t\t}\n\t}\n\n\treturn null;\n}\n\nfunction matchesHydrationScript(element: Element, type: HydrationPayloadType, hydrationKey?: string): boolean {\n\tif (\n\t\telement.tagName !== 'SCRIPT' ||\n\t\t!element.hasAttribute(HYDRATION_ATTRIBUTE) ||\n\t\telement.getAttribute(HYDRATION_TYPE_ATTRIBUTE) !== type\n\t) {\n\t\treturn false;\n\t}\n\n\tif (hydrationKey !== undefined) {\n\t\treturn element.getAttribute(HYDRATION_KEY_ATTRIBUTE) === hydrationKey;\n\t}\n\n\treturn !element.hasAttribute(HYDRATION_KEY_ATTRIBUTE);\n}\n\nfunction escapeHtmlAttribute(value: string): string {\n\treturn value.replace(/&/g, '&amp;').replace(/\"/g, '&quot;').replace(/</g, '&lt;').replace(/>/g, '&gt;');\n}\n"
6
- ],
7
- "mappings": "yCAGO,IAAM,EAAsB,iBAEtB,EAA2B,sBAE3B,EAA0B,qBAKhC,SAAS,CAAwB,CAAC,EAI9B,CACV,IAAM,EAAe,EAAQ,aAC1B,IAAI,MAA4B,EAAoB,EAAQ,YAAY,KACxE,GAEH,MAAO,mCAAmC,KAAuB,MAA6B,EAAQ,QAAQ,KAAgB,EAAQ,2BAIhI,SAAS,CAAmB,CAAC,EAAuB,CAC1D,OAAO,EAAiB,CAAK,EAIvB,SAAS,CAAwB,CAAC,EAAkB,EAAgB,CAC1E,IAAM,EAAc,EAAQ,YAE5B,GAAI,CAAC,EACJ,OAAO,EAGR,GAAI,CACH,OAAO,KAAK,MAAM,CAAW,EAC5B,KAAM,CACP,GAAI,OAAO,QAAY,IACtB,QAAQ,KACP,sEAAsE,MACtE,EAAY,MAAM,EAAG,GAAG,CACzB,EAED,OAAO,GAUF,SAAS,CAAmB,CAAC,EAAe,EAA4B,EAAuC,CACrH,IAAM,EAAW,EAAK,SAEtB,GAAI,CAAC,GAAY,EAAS,SAAW,EAAG,CACvC,IAAM,EAAc,EAAkE,WAEtF,GAAI,CAAC,GAAc,EAAW,SAAW,EACxC,OAAO,KAGR,QAAS,EAAI,EAAG,EAAI,EAAW,OAAQ,GAAK,EAAG,CAC9C,IAAM,EAAO,EAAW,GAExB,GAAI,EAAK,WAAa,EACrB,SAGD,IAAM,EAAU,EAEhB,GAAI,EAAuB,EAAS,EAAM,CAAY,EACrD,OAAO,EAIT,OAAO,KAGR,QAAS,EAAI,EAAG,EAAI,EAAS,OAAQ,GAAK,EACzC,GAAI,EAAuB,EAAS,GAAK,EAAM,CAAY,EAC1D,OAAO,EAAS,GAIlB,OAAO,KAGR,SAAS,CAAsB,CAAC,EAAkB,EAA4B,EAAgC,CAC7G,GACC,EAAQ,UAAY,UACpB,CAAC,EAAQ,aAAa,CAAmB,GACzC,EAAQ,aAAa,CAAwB,IAAM,EAEnD,MAAO,GAGR,GAAI,IAAiB,OACpB,OAAO,EAAQ,aAAa,CAAuB,IAAM,EAG1D,MAAO,CAAC,EAAQ,aAAa,CAAuB,EAGrD,SAAS,CAAmB,CAAC,EAAuB,CACnD,OAAO,EAAM,QAAQ,KAAM,OAAO,EAAE,QAAQ,KAAM,QAAQ,EAAE,QAAQ,KAAM,MAAM,EAAE,QAAQ,KAAM,MAAM",
8
- "debugId": "A274AAF950CB806764756E2164756E21",
9
- "names": []
10
- }
@@ -1,4 +0,0 @@
1
- var Q=Symbol("radiant.shadowRootListenerHooks"),Y=Symbol("radiant.patchedAttachShadow");function Z(x,j,z,B){let I=(G)=>{if(G.target instanceof Element&&G.target.matches(z))B(G)};return x.addEventListener(j.type,I,j.options),()=>{x.removeEventListener(j.type,I,j.options)}}function _(x,j){let z=x;if(!z[Q])z[Q]=new Set;if(z[Q].add(j),z[Y])return;let B=x.attachShadow;x.attachShadow=function(G){let N=B.call(this,G);for(let P of z[Q]??[])P();return N},z[Y]=!0}function $(x,j,z){let B=z.bind(x),I=null,G=null,N=null,P=null,V=!1,W=()=>{I?.(),G?.(),N?.(),P?.(),I=null,G=null,N=null,P=null},U=()=>{if(V)return;if("window"in j&&!I)window.addEventListener(j.type,B,j.options),I=()=>{window.removeEventListener(j.type,B,j.options)};if("document"in j&&!G)document.addEventListener(j.type,B,j.options),G=()=>{document.removeEventListener(j.type,B,j.options)};if("selector"in j||"ref"in j){let X="selector"in j?j.selector:`[data-ref='${CSS.escape(j.ref)}']`;if(j.scope!=="shadow"&&!N)N=Z(x,j,X,B);if(j.scope!=="light"&&x.shadowRoot&&!P)P=Z(x.shadowRoot,j,X,B)}};if("selector"in j||"ref"in j){if(j.scope!=="light")_(x,()=>{if(x.isConnected)U()})}if(x.registerConnectedCallback(U),x.registerCleanupCallback(W),x.isConnected)U();return()=>{V=!0,W()}}
2
- export{$ as Cb};
3
-
4
- //# debugId=DB4D49CB458BEF8364756E2164756E21
@@ -1,10 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../src/helpers/create-event-listener.ts"],
4
- "sourcesContent": [
5
- "import type { RadiantElement } from '../core/radiant-element';\nimport type { RadiantElementEventListener } from '../core/radiant-element';\n\n/**\n * Selects which DOM tree delegated event listeners should observe.\n */\nexport type OnEventScope = 'light' | 'shadow' | 'both';\n\ntype BaseOnEventConfig = Pick<RadiantElementEventListener, 'type' | 'options'> & {\n\tscope?: OnEventScope;\n};\n\nexport type OnEventConfig = BaseOnEventConfig &\n\t(\n\t\t| {\n\t\t\t\tselector: string;\n\t\t }\n\t\t| {\n\t\t\t\tref: string;\n\t\t }\n\t\t| {\n\t\t\t\twindow: true;\n\t\t }\n\t\t| {\n\t\t\t\tdocument: true;\n\t\t }\n\t);\n\ntype DelegatedEventRoot = HTMLElement | ShadowRoot;\n\nconst shadowRootListenerHooksKey = Symbol('radiant.shadowRootListenerHooks');\nconst patchedAttachShadowKey = Symbol('radiant.patchedAttachShadow');\n\ntype ShadowRootHookHost = RadiantElement & {\n\t[patchedAttachShadowKey]?: true;\n\t[shadowRootListenerHooksKey]?: Set<() => void>;\n};\n\nfunction addDelegatedListener(\n\troot: DelegatedEventRoot,\n\tconfig: Pick<OnEventConfig, 'type' | 'options'>,\n\tselector: string,\n\tlistener: EventListener,\n): () => void {\n\tconst delegatedListener = (event: Event) => {\n\t\tif (event.target instanceof Element && event.target.matches(selector)) {\n\t\t\tlistener(event);\n\t\t}\n\t};\n\n\troot.addEventListener(config.type, delegatedListener, config.options);\n\n\treturn () => {\n\t\troot.removeEventListener(config.type, delegatedListener, config.options);\n\t};\n}\n\nfunction registerShadowRootHook(host: RadiantElement, hook: () => void): void {\n\tconst shadowAwareHost = host as ShadowRootHookHost;\n\n\tif (!shadowAwareHost[shadowRootListenerHooksKey]) {\n\t\tshadowAwareHost[shadowRootListenerHooksKey] = new Set();\n\t}\n\n\tshadowAwareHost[shadowRootListenerHooksKey].add(hook);\n\n\tif (shadowAwareHost[patchedAttachShadowKey]) {\n\t\treturn;\n\t}\n\n\tconst originalAttachShadow = host.attachShadow;\n\n\thost.attachShadow = function patchedAttachShadow(init: ShadowRootInit): ShadowRoot {\n\t\tconst shadowRoot = originalAttachShadow.call(this, init);\n\t\tfor (const shadowRootHook of shadowAwareHost[shadowRootListenerHooksKey] ?? []) {\n\t\t\tshadowRootHook();\n\t\t}\n\t\treturn shadowRoot;\n\t};\n\n\tshadowAwareHost[patchedAttachShadowKey] = true;\n}\n\n/**\n * Subscribes to a DOM event with delegation, window, or document targeting.\n * Functional equivalent of the `@onEvent` decorator for vanilla JS usage.\n * Returns a cleanup function to remove the listener.\n * @param host The host RadiantElement.\n * @param config The event listener configuration.\n * @param callback The event handler function.\n */\nexport function createEventListener(\n\thost: RadiantElement,\n\tconfig: OnEventConfig,\n\tcallback: (event: Event) => void,\n): () => void {\n\tconst boundCallback = callback.bind(host);\n\tlet windowCleanup: (() => void) | null = null;\n\tlet documentCleanup: (() => void) | null = null;\n\tlet lightCleanup: (() => void) | null = null;\n\tlet shadowCleanup: (() => void) | null = null;\n\tlet disposed = false;\n\n\tconst detachListeners = () => {\n\t\twindowCleanup?.();\n\t\tdocumentCleanup?.();\n\t\tlightCleanup?.();\n\t\tshadowCleanup?.();\n\n\t\twindowCleanup = null;\n\t\tdocumentCleanup = null;\n\t\tlightCleanup = null;\n\t\tshadowCleanup = null;\n\t};\n\n\tconst attachListeners = () => {\n\t\tif (disposed) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ('window' in config && !windowCleanup) {\n\t\t\twindow.addEventListener(config.type, boundCallback, config.options);\n\t\t\twindowCleanup = () => {\n\t\t\t\twindow.removeEventListener(config.type, boundCallback, config.options);\n\t\t\t};\n\t\t}\n\n\t\tif ('document' in config && !documentCleanup) {\n\t\t\tdocument.addEventListener(config.type, boundCallback, config.options);\n\t\t\tdocumentCleanup = () => {\n\t\t\t\tdocument.removeEventListener(config.type, boundCallback, config.options);\n\t\t\t};\n\t\t}\n\n\t\tif ('selector' in config || 'ref' in config) {\n\t\t\tconst selector = 'selector' in config ? config.selector : `[data-ref='${CSS.escape(config.ref)}']`;\n\n\t\t\tif (config.scope !== 'shadow' && !lightCleanup) {\n\t\t\t\tlightCleanup = addDelegatedListener(host, config, selector, boundCallback);\n\t\t\t}\n\n\t\t\tif (config.scope !== 'light' && host.shadowRoot && !shadowCleanup) {\n\t\t\t\tshadowCleanup = addDelegatedListener(host.shadowRoot, config, selector, boundCallback);\n\t\t\t}\n\t\t}\n\t};\n\n\tif ('selector' in config || 'ref' in config) {\n\t\tif (config.scope !== 'light') {\n\t\t\tregisterShadowRootHook(host, () => {\n\t\t\t\tif (host.isConnected) {\n\t\t\t\t\tattachListeners();\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\n\thost.registerConnectedCallback(attachListeners);\n\thost.registerCleanupCallback(detachListeners);\n\n\tif (host.isConnected) {\n\t\tattachListeners();\n\t}\n\n\tretur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AIvE,GAAI,aAAc,GAAU,CAAC,EAC5B,SAAS,iBAAiB,EAAO,KAAM,EAAe,EAAO,OAAO,EACpE,EAAkB,IAAM,CACvB,SAAS,oBAAoB,EAAO,KAAM,EAAe,EAAO,OAAO,GAIzE,GAAI,aAAc,GAAU,QAAS,EAAQ,CAC5C,IAAM,EAAW,aAAc,EAAS,EAAO,SAAW,cAAc,IAAI,OAAO,EAAO,GAAG,MAE7F,GAAI,EAAO,QAAU,UAAY,CAAC,EACjC,EAAe,EAAqB,EAAM,EAAQ,EAAU,CAAa,EAG1E,GAAI,EAAO,QAAU,SAAW,EAAK,YAAc,CAAC,EACnD,EAAgB,EAAqB,EAAK,WAAY,EAAQ,EAAU,CAAa,IAKxF,GAAI,aAAc,GAAU,QAAS,GACpC,GAAI,EAAO,QAAU,QACpB,EAAuB,EAAM,IAAM,CAClC,GAAI,EAAK,YACR,EAAgB,EAEjB,EAOH,GAHA,EAAK,0BAA0B,CAAe,EAC9C,EAAK,wBAAwB,CAAe,EAExC,EAAK,YACR,EAAgB,EAGjB,MAAO,IAAM,CACZ,EAAW,GACX,EAAgB",
8
- "debugId": "DB4D49CB458BEF8364756E2164756E21",
9
- "names": []
10
- }
@@ -1,4 +0,0 @@
1
- import{Ma as f}from"./chunk-cnyxrh9r.js";function k(h,d){f(h,(b)=>{b.registerConnectedCallback(()=>{b.createReactiveField(d,b[d],{bind:b.shouldAutoBindReactiveMembers?.()??!1})})})}
2
- export{k as Ka};
3
-
4
- //# debugId=2E4613E2DB32C17264756E2164756E21
@@ -1,10 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../src/decorators/legacy/reactive-field.ts"],
4
- "sourcesContent": [
5
- "import type { RadiantElement } from '../../core/radiant-element';\nimport { registerLegacyInstanceInitializer } from './instance-initializers';\n\n/**\n * A decorator to define a reactive field.\n * Every time the property changes, the `updated` method will be called.\n * Due the fact the value is always undefined before the first update,\n * we are adding a `isDefined` WeakSet to track if the property has been defined.\n * @param target The target element.\n * @param propertyKey The property key.\n */\nexport function reactiveField(target: RadiantElement, propertyKey: string) {\n\tregisterLegacyInstanceInitializer(target, (element) => {\n\t\telement.registerConnectedCallback(() => {\n\t\t\telement.createReactiveField(propertyKey, element[propertyKey as keyof typeof element], {\n\t\t\t\tbind:\n\t\t\t\t\t(\n\t\t\t\t\t\telement as unknown as { shouldAutoBindReactiveMembers?: () => boolean }\n\t\t\t\t\t).shouldAutoBindReactiveMembers?.() ?? false,\n\t\t\t});\n\t\t});\n\t});\n}\n"
6
- ],
7
- "mappings": "yCAWO,SAAS,CAAa,CAAC,EAAwB,EAAqB,CAC1E,EAAkC,EAAQ,CAAC,IAAY,CACtD,EAAQ,0BAA0B,IAAM,CACvC,EAAQ,oBAAoB,EAAa,EAAQ,GAAsC,CACtF,KAEE,EACC,gCAAgC,GAAK,EACzC,CAAC,EACD,EACD",
8
- "debugId": "2E4613E2DB32C17264756E2164756E21",
9
- "names": []
10
- }
@@ -1,4 +0,0 @@
1
- var e=Symbol.for("@ecopages/radiant.customElementTagName");function n(t,o){t[e]=o}function s(t){return t[e]}
2
- export{e as Va,n as Wa,s as Xa};
3
-
4
- //# debugId=DF04F4DED5A8A34364756E2164756E21
@@ -1,10 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../src/core/custom-element-metadata.ts"],
4
- "sourcesContent": [
5
- "export const CUSTOM_ELEMENT_TAG_NAME = Symbol.for('@ecopages/radiant.customElementTagName');\n\ntype CustomElementConstructorWithMetadata = CustomElementConstructor & {\n\t[CUSTOM_ELEMENT_TAG_NAME]?: string;\n};\n\nexport function setCustomElementTagName(target: CustomElementConstructor, tagName: string): void {\n\t(target as CustomElementConstructorWithMetadata)[CUSTOM_ELEMENT_TAG_NAME] = tagName;\n}\n\nexport function getCustomElementTagName(target: CustomElementConstructor): string | undefined {\n\treturn (target as CustomElementConstructorWithMetadata)[CUSTOM_ELEMENT_TAG_NAME];\n}\n"
6
- ],
7
- "mappings": "AAAO,IAAM,EAA0B,OAAO,IAAI,wCAAwC,EAMnF,SAAS,CAAuB,CAAC,EAAkC,EAAuB,CAC/F,EAAgD,GAA2B,EAGtE,SAAS,CAAuB,CAAC,EAAsD,CAC7F,OAAQ,EAAgD",
8
- "debugId": "DF04F4DED5A8A34364756E2164756E21",
9
- "names": []
10
- }
@@ -1,4 +0,0 @@
1
- import{Ka as q}from"./chunk-hvy4zvcc.js";import{La as z}from"./chunk-79jg8q67.js";import{Oa as j}from"./chunk-q9z6tnzw.js";function L(A,G){return j(z,q,A,G)}
2
- export{L as Ja};
3
-
4
- //# debugId=970C30549045923964756E2164756E21
@@ -1,10 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../src/decorators/state.ts"],
4
- "sourcesContent": [
5
- "import type { StandardOrLegacyFieldDecoratorArgs } from '../types';\nimport { reactiveField as legacyReactiveField } from './legacy/reactive-field';\nimport { reactiveField as standardReactiveField } from './standard/reactive-field';\nimport { fieldDecoratorBridge } from './bridge';\n\n/**\n * Declares internal mutable component state.\n *\n * Each write triggers `notifyUpdate` so update callbacks, bindings, and\n * `RadiantComponent` renders stay in sync. When no explicit binding option\n * is supplied, `RadiantComponent` hosts expose a JSX companion binding\n * accessor automatically while plain `RadiantElement` hosts keep binding\n * opt-in.\n */\nexport function state(\n\tprotoOrTarget: StandardOrLegacyFieldDecoratorArgs['protoOrTarget'],\n\tnameOrContext: StandardOrLegacyFieldDecoratorArgs['nameOrContext'],\n): any {\n\treturn fieldDecoratorBridge(standardReactiveField, legacyReactiveField, protoOrTarget, nameOrContext);\n}\n"
6
- ],
7
- "mappings": "uIAcO,GAAS,LAAK,CACpB,EACA,EACM,CACN,OAAO,EAAqB,EAAuB,EAAqB,EAAe,CAAa",
8
- "debugId": "970C30549045923964756E2164756E21",
9
- "names": []
10
- }
@@ -1,4 +0,0 @@
1
- import{ha as f}from"./chunk-y139ycfm.js";import{ia as j}from"./chunk-rkh1vkb9.js";import{Pa as k}from"./chunk-q9z6tnzw.js";function G(q,v,w){return k(j,f,q,v,w)}
2
- export{G as ga};
3
-
4
- //# debugId=E4B1403CDF7305CA64756E2164756E21
@@ -1,10 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../src/decorators/bound.ts"],
4
- "sourcesContent": [
5
- "import type { StandardOrLegacyMethodDecoratorArgs } from '../types';\nimport { bound as legacyBound } from './legacy/bound';\nimport { bound as standardBound } from './standard/bound';\nimport { methodDecoratorBridge } from './bridge';\n\n/**\n * A decorator to bind a method to the instance.\n */\nexport function bound(\n\tprotoOrTarget: StandardOrLegacyMethodDecoratorArgs['protoOrTarget'],\n\tnameOrContext: StandardOrLegacyMethodDecoratorArgs['nameOrContext'],\n\tdescriptor?: StandardOrLegacyMethodDecoratorArgs['descriptor'],\n): any {\n\treturn methodDecoratorBridge(standardBound, legacyBound, protoOrTarget, nameOrContext, descriptor);\n}\n"
6
- ],
7
- "mappings": "uIAQO,GAAS,LAAK,CACpB,EACA,EACA,EACM,CACN,OAAO,EAAsB,EAAe,EAAa,EAAe,EAAe,CAAU",
8
- "debugId": "E4B1403CDF7305CA64756E2164756E21",
9
- "names": []
10
- }
@@ -1,4 +0,0 @@
1
- import{render as q}from"@ecopages/jsx";function w(f,k){q(f,k)}
2
- export{w as a};
3
-
4
- //# debugId=72CAF556CCD84FB264756E2164756E21
@@ -1,10 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../src/tools/render-jsx-template.ts"],
4
- "sourcesContent": [
5
- "import { render, type TemplateResultLike } from '@ecopages/jsx';\n\n/**\n * Renders a JSX template result into a target element by replacing its children.\n */\nexport function renderJsxTemplate(template: TemplateResultLike, target: HTMLElement): void {\n\trender(template, target);\n}\n"
6
- ],
7
- "mappings": "AAAA,iBAAS,sBAKF,SAAS,CAAiB,CAAC,EAA8B,EAA2B,CAC1F,EAAO,EAAU,CAAM",
8
- "debugId": "72CAF556CCD84FB264756E2164756E21",
9
- "names": []
10
- }
@@ -1,4 +0,0 @@
1
- import{G}from"./chunk-5bkat72n.js";import{I as F,K as A}from"./chunk-p8k4g99a.js";import{Ma as E}from"./chunk-cnyxrh9r.js";function T({context:j,select:k,subscribe:B=!0,requestUpdate:H=!0}){return(J,O,D)=>{let K=D.value;return E(J,(f)=>{let w=G(f,(N)=>{K.call(f,N)},H);F(f,j,w,k),f.registerConnectedCallback(()=>{if(A(f,j,w,{select:k,subscribe:B}))return;queueMicrotask(()=>{A(f,j,w,{select:k,subscribe:B})})})}),D}}
2
- export{T as F};
3
-
4
- //# debugId=09677386ECB9CD8C64756E2164756E21
@@ -1,10 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../src/context/decorators/legacy/context-selector.ts"],
4
- "sourcesContent": [
5
- "import type { RadiantElement } from '../../../core/radiant-element';\nimport { registerLegacyInstanceInitializer } from '../../../decorators/legacy/instance-initializers';\nimport { bootstrapSsrContextSelection, connectContextSelection } from '../../context-consumer-bootstrap';\nimport type { Context, ContextType } from '../../types';\nimport type { OnContextUpdateOptions } from '../on-context-update';\nimport { createContextSelectionDelivery } from '../context-selection-delivery';\n\nexport function contextSelector<T extends Context<unknown, unknown>, Selected = ContextType<T>>({\n\tcontext,\n\tselect,\n\tsubscribe = true,\n\trequestUpdate = true,\n}: OnContextUpdateOptions<T, Selected>) {\n\treturn (proto: RadiantElement, _: string, descriptor: PropertyDescriptor) => {\n\t\tconst originalMethod = descriptor.value;\n\n\t\tregisterLegacyInstanceInitializer(proto, (element) => {\n\t\t\tconst applySelectedContext = createContextSelectionDelivery(\n\t\t\t\telement,\n\t\t\t\t(value) => {\n\t\t\t\t\toriginalMethod.call(element, value);\n\t\t\t\t},\n\t\t\t\trequestUpdate,\n\t\t\t);\n\n\t\t\tbootstrapSsrContextSelection(element, context, applySelectedContext, select);\n\n\t\t\telement.registerConnectedCallback(() => {\n\t\t\t\tif (\n\t\t\t\t\tconnectContextSelection(element, context, applySelectedContext, {\n\t\t\t\t\t\tselect,\n\t\t\t\t\t\tsubscribe,\n\t\t\t\t\t})\n\t\t\t\t) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tqueueMicrotask(() => {\n\t\t\t\t\tconnectContextSelection(element, context, applySelectedContext, {\n\t\t\t\t\t\tselect,\n\t\t\t\t\t\tsubscribe,\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t});\n\t\t});\n\n\t\treturn descriptor;\n\t};\n}\n"
6
- ],
7
- "mappings": "uIAOO,GAAS,LAA+E,EAC9F,UACA,SACA,YAAY,GACZ,gBAAgB,IACuB,CACvC,MAAO,CAAC,EAAuB,EAAW,IAAmC,CAC5E,IAAM,EAAiB,EAAW,MAgClC,OA9BA,EAAkC,EAAO,CAAC,IAAY,CACrD,IAAM,EAAuB,EAC5B,EACA,CAAC,IAAU,CACV,EAAe,KAAK,EAAS,CAAK,GAEnC,CACD,EAEA,EAA6B,EAAS,EAAS,EAAsB,CAAM,EAE3E,EAAQ,0BAA0B,IAAM,CACvC,GACC,EAAwB,EAAS,EAAS,EAAsB,CAC/D,SACA,WACD,CAAC,EAED,OAGD,eAAe,IAAM,CACpB,EAAwB,EAAS,EAAS,EAAsB,CAC/D,SACA,WACD,CAAC,EACD,EACD,EACD,EAEM",
8
- "debugId": "09677386ECB9CD8C64756E2164756E21",
9
- "names": []
10
- }
@@ -1,4 +0,0 @@
1
- var z;((j)=>{j.SUBSCRIPTION_REQUEST="context-subscription-request";j.CONTEXT_REQUEST="context-request";j.ON_MOUNT="context-on-mount";j.MOUNTED="context-mounted"})(z||={});class B extends Event{context;callback;subscribe;constructor(k,q,w){super("context-request",{bubbles:!0,composed:!0});this.context=k;this.callback=q;this.subscribe=w}}class D extends CustomEvent{constructor(k){super("context-on-mount",{detail:{context:k},bubbles:!0,composed:!0})}}class F extends Event{context;callback;select;subscribe;constructor(k,q,w,G){super("context-subscription-request",{bubbles:!0,composed:!0});this.context=k;this.callback=q;this.select=w;this.subscribe=G}}
2
- export{z as S,B as T,D as U,F as V};
3
-
4
- //# debugId=4862E3DBD58F036564756E2164756E21
@@ -1,10 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../src/context/events.ts"],
4
- "sourcesContent": [
5
- "import type { Context, ContextCallback, ContextType, UnknownContext } from './types';\n\n/**\n * List of events which can be emitted by a context provider or requester.\n */\nexport enum ContextEventsTypes {\n\tSUBSCRIPTION_REQUEST = 'context-subscription-request',\n\tCONTEXT_REQUEST = 'context-request',\n\tON_MOUNT = 'context-on-mount',\n\tMOUNTED = 'context-mounted',\n}\n\n/**\n * An event fired by a context requester to signal it desires a named context.\n *\n * A provider should inspect the `context` property of the event to determine if it has a value that can\n * satisfy the request, calling the `callback` with the requested value if so.\n *\n * If the requested context event contains a truthy `subscribe` value, then a provider can call the callback\n * multiple times if the value is changed, if this is the case the provider should pass an `unsubscribe`\n * function to the callback which requesters can invoke to indicate they no longer wish to receive these updates.\n */\nexport class ContextRequestEvent<T extends UnknownContext> extends Event {\n\tpublic constructor(\n\t\tpublic readonly context: T,\n\t\tpublic readonly callback: ContextCallback<ContextType<T>>,\n\t\tpublic readonly subscribe?: boolean,\n\t) {\n\t\tsuper(ContextEventsTypes.CONTEXT_REQUEST, { bubbles: true, composed: true });\n\t}\n}\n\n/**\n * A type which represents a subscription to a context value.\n */\nexport type ContextSubscription<T extends UnknownContext> = {\n\tselect?: (context: ContextType<T>) => unknown;\n\tcallback: (value: unknown) => void;\n};\n\n/**\n * An event fired by a context provider to signal that a context value has been mounted and is available for consumption.\n */\nexport class ContextOnMountEvent extends CustomEvent<{ context: UnknownContext }> {\n\tpublic constructor(context: UnknownContext) {\n\t\tsuper(ContextEventsTypes.ON_MOUNT, {\n\t\t\tdetail: { context },\n\t\t\tbubbles: true,\n\t\t\tcomposed: true,\n\t\t});\n\t}\n}\n\n/**\n * An event fired by a context requester to signal it desires a named context.\n *\n * A provider should inspect the `context` property of the event to determine if it has a value that can\n * satisfy the request, calling the `callback` with the requested value if so.\n *\n * If the requested context event contains a truthy `subscribe` value, then a provider can call the callback\n * multiple times if the value is changed, if this is the case the provider should pass an `unsubscribe`\n * function to the callback which requesters can invoke to indicate they no longer wish to receive these updates.\n *\n * It accepts a `selector` property which can be used to request a specific property of the context value.\n */\nexport class ContextSubscriptionRequestEvent<T extends UnknownContext> extends Event {\n\tpublic constructor(\n\t\tpublic readonly context: T,\n\t\tpublic readonly callback: (value: ContextType<T> | { [K in keyof ContextType<T>]: ContextType<T>[K] }) => void,\n\t\tpublic readonly select?: (context: ContextType<T>) => unknown,\n\t\tpublic readonly subscribe?: boolean,\n\t) {\n\t\tsuper(ContextEventsTypes.SUBSCRIPTION_REQUEST, {\n\t\t\tbubbles: true,\n\t\t\tcomposed: true,\n\t\t});\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementEventMap {\n\t\t/**\n\t\t * A 'context-request-subscription' event can be emitted by any element which desires\n\t\t * a context value to be injected by an external provider.\n\t\t */\n\t\t[ContextEventsTypes.SUBSCRIPTION_REQUEST]: ContextSubscriptionRequestEvent<UnknownContext>;\n\t\t/**\n\t\t * A context-request-provider event can be emitted by a context requester to signal\n\t\t * that it desires a context value to be provided by a context provider.\n\t\t */\n\t\t[ContextEventsTypes.CONTEXT_REQUEST]: ContextRequestEvent<Context<unknown, unknown>>;\n\t\t/**\n\t\t * A 'context-mount' event can be emitted by a context provider to signal\n\t\t * that a context value has been mounted and is available for consumption.\n\t\t */\n\t\t[ContextEventsTypes.ON_MOUNT]: ContextOnMountEvent;\n\t}\n}\n"
6
- ],
7
- "mappings": "AAKO,IAAK,GAAL,CAAK,IAAL,CACN,uBAAuB,+BACvB,kBAAkB,kBAClB,WAAW,mBACX,UAAU,oBAJC,QAiBL,MAAM,UAAsD,KAAM,CAEvD,QACA,SACA,UAHV,WAAW,CACD,EACA,EACA,EACf,CACD,MAAM,kBAAoC,CAAE,QAAS,GAAM,SAAU,EAAK,CAAC,EAJ3D,eACA,gBACA,iBAIlB,CAaO,MAAM,UAA4B,WAAyC,CAC1E,WAAW,CAAC,EAAyB,CAC3C,MAAM,mBAA6B,CAClC,OAAQ,CAAE,SAAQ,EAClB,QAAS,GACT,SAAU,EACX,CAAC,EAEH,CAcO,MAAM,UAAkE,KAAM,CAEnE,QACA,SACA,OACA,UAJV,WAAW,CACD,EACA,EACA,EACA,EACf,CACD,MAAM,+BAAyC,CAC9C,QAAS,GACT,SAAU,EACX,CAAC,EARe,eACA,gBACA,cACA,iBAOlB",
8
- "debugId": "4862E3DBD58F036564756E2164756E21",
9
- "names": []
10
- }
@@ -1,4 +0,0 @@
1
- import{ya as F}from"./chunk-eyw14d6y.js";import{Ma as E}from"./chunk-cnyxrh9r.js";import{Ab as k}from"./chunk-bk6qkvfp.js";function N(q={}){return(v,j)=>{let G=(b)=>{return typeof Object.getOwnPropertyDescriptor(b,j)?.get==="function"},w=(b)=>{if(G(b))return;let B=k(b,q);Object.defineProperty(b,j,{get(){return B.value},enumerable:!0,configurable:!0})},x=new WeakMap;Object.defineProperty(v,j,{get(){let b=x.get(this);if(!b)b=k(this,q),x.set(this,b);return b.value},enumerable:!0,configurable:!0}),E(v,(b)=>{F(b,()=>{w(b)}),b.registerConnectedCallback(()=>{w(b)})})}}
2
- export{N as wa};
3
-
4
- //# debugId=94FE48B057E72F0864756E2164756E21
@@ -1,10 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../src/decorators/legacy/query-slot.ts"],
4
- "sourcesContent": [
5
- "import type { RadiantElement } from '../../core/radiant-element';\nimport { createQuerySlot } from '../../helpers/create-query-slot';\nimport { registerSsrPreparationCallback } from '../../core/ssr-preparation';\nimport type { QuerySlotConfig } from '../query-slot';\nimport { registerLegacyInstanceInitializer } from './instance-initializers';\n\ntype SlotQueryHost = RadiantElement & {\n\tgetSlotElement<T extends Element = Element>(name?: string): T | null;\n\tgetSlotElements<T extends Element = Element>(name?: string): T[];\n\tslotProjectionVersion?: number;\n};\n\nexport function querySlot<T extends Element | Element[]>(\n\toptions: QuerySlotConfig = {},\n): (proto: RadiantElement, propertyName: string | symbol) => void {\n\treturn (proto: RadiantElement, propertyKey: string | symbol) => {\n\t\tconst hasDefinedInstanceQuery = (instance: SlotQueryHost) => {\n\t\t\tconst descriptor = Object.getOwnPropertyDescriptor(instance, propertyKey);\n\t\t\treturn typeof descriptor?.get === 'function';\n\t\t};\n\n\t\tconst defineSlotQueryProperty = (instance: SlotQueryHost) => {\n\t\t\tif (hasDefinedInstanceQuery(instance)) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst accessor = createQuerySlot<T>(instance, options);\n\n\t\t\tObject.defineProperty(instance, propertyKey, {\n\t\t\t\tget() {\n\t\t\t\t\treturn accessor.value;\n\t\t\t\t},\n\t\t\t\tenumerable: true,\n\t\t\t\tconfigurable: true,\n\t\t\t});\n\t\t};\n\n\t\tconst protoAccessorCache = new WeakMap<SlotQueryHost, ReturnType<typeof createQuerySlot<T>>>();\n\n\t\tObject.defineProperty(proto, propertyKey, {\n\t\t\tget(this: SlotQueryHost) {\n\t\t\t\tlet accessor = protoAccessorCache.get(this);\n\t\t\t\tif (!accessor) {\n\t\t\t\t\taccessor = createQuerySlot<T>(this, options);\n\t\t\t\t\tprotoAccessorCache.set(this, accessor);\n\t\t\t\t}\n\t\t\t\treturn accessor.value;\n\t\t\t},\n\t\t\tenumerable: true,\n\t\t\tconfigurable: true,\n\t\t});\n\n\t\tregisterLegacyInstanceInitializer(proto, (element) => {\n\t\t\tregisterSsrPreparationCallback(element, () => {\n\t\t\t\tdefineSlotQueryProperty(element as SlotQueryHost);\n\t\t\t});\n\t\t\telement.registerConnectedCallback(() => {\n\t\t\t\tdefineSlotQueryProperty(element as SlotQueryHost);\n\t\t\t});\n\t\t});\n\t};\n}\n"
6
- ],
7
- "mappings": "uIAYO,GAAS,LAAwC,CACvD,EAA2B,CAAC,EACqC,CACjE,MAAO,CAAC,EAAuB,IAAiC,CAC/D,IAAM,EAA0B,CAAC,IAA4B,CAE5D,OAAO,OADY,OAAO,yBAAyB,EAAU,CAAW,GAC9C,MAAQ,YAG7B,EAA0B,CAAC,IAA4B,CAC5D,GAAI,EAAwB,CAAQ,EACnC,OAGD,IAAM,EAAW,EAAmB,EAAU,CAAO,EAErD,OAAO,eAAe,EAAU,EAAa,CAC5C,GAAG,EAAG,CACL,OAAO,EAAS,OAEjB,WAAY,GACZ,aAAc,EACf,CAAC,GAGI,EAAqB,IAAI,QAE/B,OAAO,eAAe,EAAO,EAAa,CACzC,GAAG,EAAsB,CACxB,IAAI,EAAW,EAAmB,IAAI,IAAI,EAC1C,GAAI,CAAC,EACJ,EAAW,EAAmB,KAAM,CAAO,EAC3C,EAAmB,IAAI,KAAM,CAAQ,EAEtC,OAAO,EAAS,OAEjB,WAAY,GACZ,aAAc,EACf,CAAC,EAED,EAAkC,EAAO,CAAC,IAAY,CACrD,EAA+B,EAAS,IAAM,CAC7C,EAAwB,CAAwB,EAChD,EACD,EAAQ,0BAA0B,IAAM,CACvC,EAAwB,CAAwB,EAChD,EACD",
8
- "debugId": "94FE48B057E72F0864756E2164756E21",
9
- "names": []
10
- }
@@ -1,4 +0,0 @@
1
- import{Wa as f}from"./chunk-hztr86b4.js";function v(b,h){return function(k,j){j.addInitializer(function(){if(f(this,b),!window.customElements.get(b))customElements.define(b,this,h)})}}
2
- export{v as ra};
3
-
4
- //# debugId=4A2DABCAE882703064756E2164756E21
@@ -1,10 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../src/decorators/standard/custom-element.ts"],
4
- "sourcesContent": [
5
- "import { setCustomElementTagName } from '../../core/custom-element-metadata';\n\nexport function customElement(name: string, options?: ElementDefinitionOptions) {\n\treturn function <T extends CustomElementConstructor>(_: T, context: ClassDecoratorContext<T>) {\n\t\tcontext.addInitializer(function () {\n\t\t\tsetCustomElementTagName(this, name);\n\n\t\t\tif (!window.customElements.get(name)) {\n\t\t\t\tcustomElements.define(name, this, options);\n\t\t\t}\n\t\t});\n\t};\n}\n"
6
- ],
7
- "mappings": "yCAEO,SAAS,CAAa,CAAC,EAAc,EAAoC,CAC/E,OAAO,QAA6C,CAAC,EAAM,EAAmC,CAC7F,EAAQ,eAAe,QAAS,EAAG,CAGlC,GAFA,EAAwB,KAAM,CAAI,EAE9B,CAAC,OAAO,eAAe,IAAI,CAAI,EAClC,eAAe,OAAO,EAAM,KAAM,CAAO,EAE1C",
8
- "debugId": "4A2DABCAE882703064756E2164756E21",
9
- "names": []
10
- }
@@ -1,4 +0,0 @@
1
- import{Ma as f}from"./chunk-cnyxrh9r.js";import{Bb as j}from"./chunk-wwbjz9k4.js";function E({cache:k=!0,...q}){return(v,w)=>{f(v,(b)=>{b.registerConnectedCallback(()=>{let x=j(b,{cache:k,...q});Object.defineProperty(b,w,{get(){return x.value},enumerable:!0,configurable:!0})})})}}
2
- export{E as _};
3
-
4
- //# debugId=A418A61805EA696D64756E2164756E21
@@ -1,10 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../src/decorators/legacy/query.ts"],
4
- "sourcesContent": [
5
- "import type { RadiantElement } from '../../core/radiant-element';\nimport { createQuery } from '../../helpers/create-query';\nimport type { QueryConfig } from '../query';\nimport { registerLegacyInstanceInitializer } from './instance-initializers';\n\n/**\n * A decorator to query by CSS selector or data-ref attribute.\n * By default it queries for the first element that matches the selector, but it can be configured to query for all elements.\n *\n * @param {QueryConfig} options - The configuration object for the query.\n * @param {boolean} [options.all] - A flag to query for all elements that match the selector. Defaults to `false`.\n * @param {boolean} [options.cache] - A flag to cache the query result. Defaults to `true`.\n * @param {string} [options.selector] - A CSS selector to match elements against. This property is mutually exclusive with `options.ref`.\n * @param {string} [options.ref] - A reference to an element. This property is mutually exclusive with `options.selector`.\n *\n * @returns {Function} A decorator function that, when applied to a class property, will replace it with a getter. The getter will return the result of the query when accessed.\n *\n * @example\n * class MyElement extends HTMLElement {\n * @query({ selector: '.my-class' })\n * myElement;\n * }\n *\n * // Now, `myElement` will return the first element in the light DOM of `MyElement` that matches the selector '.my-class'.\n */\nexport function query<T extends Element | Element[]>({\n\tcache: shouldBeCached = true,\n\t...options\n}: QueryConfig): (proto: RadiantElement, propertyName: string | symbol) => void {\n\treturn (proto: RadiantElement, propertyKey: string | symbol) => {\n\t\tregisterLegacyInstanceInitializer(proto, (element) => {\n\t\t\telement.registerConnectedCallback(() => {\n\t\t\t\tconst accessor = createQuery<T>(element, { cache: shouldBeCached, ...options });\n\n\t\t\t\tObject.defineProperty(element, propertyKey, {\n\t\t\t\t\tget() {\n\t\t\t\t\t\treturn accessor.value;\n\t\t\t\t\t},\n\t\t\t\t\tenumerable: true,\n\t\t\t\t\tconfigurable: true,\n\t\t\t\t});\n\t\t\t});\n\t\t});\n\t};\n}\n"
6
- ],
7
- "mappings": "wFAyBO,GAAS,CAAoC,EACnD,MAAO,EAAiB,MACrB,GAC4E,CAC/E,MAAO,CAAC,EAAuB,IAAiC,CAC/D,EAAkC,EAAO,CAAC,IAAY,CACrD,EAAQ,0BAA0B,IAAM,CACvC,IAAM,EAAW,EAAe,EAAS,CAAE,MAAO,KAAmB,CAAQ,CAAC,EAE9E,OAAO,eAAe,EAAS,EAAa,CAC3C,GAAG,EAAG,CACL,OAAO,EAAS,OAEjB,WAAY,GACZ,aAAc,EACf,CAAC,EACD,EACD",
8
- "debugId": "A418A61805EA696D64756E2164756E21",
9
- "names": []
10
- }
@@ -1,4 +0,0 @@
1
- import{Ya as G}from"./chunk-9mqtp3js.js";import{fb as F}from"./chunk-66e6s792.js";function Q({type:j,attribute:H,reflect:w,defaultValue:h,bind:A}){if(h!==void 0&&!F(j,h))throw Error(`defaultValue does not match the expected type for ${j.name}`);return function(J,B){let k=String(B.name),C=H??k,E=Symbol(`@ecopages/radiant/reactive-prop:${k}:initializer`);return B.addInitializer(function(){let q=this[E],I=h===void 0?q:h;G(this,k,{type:j,reflect:w,attribute:C,defaultValue:h,bind:A}),this.createReactiveProp(k,{type:j,reflect:w,attribute:C,defaultValue:I,bind:A})}),function(q){return this[E]=q,q}}}
2
- export{Q as Da};
3
-
4
- //# debugId=C67B9CC0E78E579D64756E2164756E21
@@ -1,10 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../src/decorators/standard/reactive-prop.ts"],
4
- "sourcesContent": [
5
- "import type { RadiantElement, ReactivePropertyOptions } from '../../core/radiant-element.js';\nimport { registerReactivePropDefinition } from '../../core/reactive-prop-metadata';\nimport { isValueOfType } from '../../utils/attribute-utils';\n\nexport function reactiveProp<P = unknown>({\n\ttype,\n\tattribute,\n\treflect,\n\tdefaultValue,\n\tbind,\n}: ReactivePropertyOptions<P>) {\n\tif (defaultValue !== undefined && !isValueOfType(type, defaultValue)) {\n\t\tthrow new Error(`defaultValue does not match the expected type for ${type.name}`);\n\t}\n\treturn function <T extends RadiantElement, V>(_: undefined, context: ClassFieldDecoratorContext<T, V>) {\n\t\tconst propertyName = String(context.name);\n\t\tconst attributeKey = attribute ?? propertyName;\n\t\tconst initializerValueKey = Symbol(`@ecopages/radiant/reactive-prop:${propertyName}:initializer`);\n\n\t\tcontext.addInitializer(function (this: T) {\n\t\t\tconst initializerValue = (this as T & Record<PropertyKey, V | undefined>)[initializerValueKey];\n\t\t\tconst resolvedDefaultValue = (defaultValue === undefined ? initializerValue : defaultValue) as\n\t\t\t\t| P\n\t\t\t\t| undefined;\n\n\t\t\tregisterReactivePropDefinition(this, propertyName, {\n\t\t\t\ttype,\n\t\t\t\treflect,\n\t\t\t\tattribute: attributeKey,\n\t\t\t\tdefaultValue,\n\t\t\t\tbind,\n\t\t\t});\n\t\t\tthis.createReactiveProp(propertyName, {\n\t\t\t\ttype,\n\t\t\t\treflect,\n\t\t\t\tattribute: attributeKey,\n\t\t\t\tdefaultValue: resolvedDefaultValue,\n\t\t\t\tbind,\n\t\t\t});\n\t\t});\n\n\t\treturn function (this: T, value: V) {\n\t\t\t(this as Record<PropertyKey, V | undefined>)[initializerValueKey] = value;\n\t\t\treturn value;\n\t\t};\n\t};\n}\n"
6
- ],
7
- "mappings": "wFAIO,GAAS,CAAyB,EACxC,OACA,YACA,UACA,eACA,QAC8B,CAC9B,GAAI,IAAiB,QAAa,CAAC,EAAc,EAAM,CAAY,EAClE,MAAU,MAAM,qDAAqD,EAAK,MAAM,EAEjF,OAAO,QAAsC,CAAC,EAAc,EAA2C,CACtG,IAAM,EAAe,OAAO,EAAQ,IAAI,EAClC,EAAe,GAAa,EAC5B,EAAsB,OAAO,mCAAmC,eAA0B,EAwBhG,OAtBA,EAAQ,eAAe,QAAS,EAAU,CACzC,IAAM,EAAoB,KAAgD,GACpE,EAAwB,IAAiB,OAAY,EAAmB,EAI9E,EAA+B,KAAM,EAAc,CAClD,OACA,UACA,UAAW,EACX,eACA,MACD,CAAC,EACD,KAAK,mBAAmB,EAAc,CACrC,OACA,UACA,UAAW,EACX,aAAc,EACd,MACD,CAAC,EACD,EAEM,QAAS,CAAU,EAAU,CAEnC,OADC,KAA4C,GAAuB,EAC7D",
8
- "debugId": "C67B9CC0E78E579D64756E2164756E21",
9
- "names": []
10
- }
@@ -1,4 +0,0 @@
1
- import{H as w,J as y}from"./chunk-p8k4g99a.js";import{Ma as q}from"./chunk-cnyxrh9r.js";function G(f){return(A,h)=>{let j=(b,c)=>{b[h]=c},k=(b,c={})=>{if(b[h])return!0;return y(b,f,(B)=>{j(b,B)},c)};q(A,(b)=>{w(b,f,(c)=>{j(b,c)}),b.registerConnectedCallback(()=>{if(k(b,{emitMounted:!0}))return;queueMicrotask(()=>{k(b,{emitMounted:!0})})})})}}
2
- export{G as u};
3
-
4
- //# debugId=C969449EEF34F5CD64756E2164756E21
@@ -1,10 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../src/context/decorators/legacy/consume-context.ts"],
4
- "sourcesContent": [
5
- "import type { RadiantElement } from '../../../core/radiant-element';\nimport { registerLegacyInstanceInitializer } from '../../../decorators/legacy/instance-initializers';\nimport { bootstrapSsrConsumedContext, connectConsumedContext } from '../../context-consumer-bootstrap';\nimport type { UnknownContext } from '../../types';\n\nexport function consumeContext(context: UnknownContext) {\n\treturn (proto: RadiantElement, propertyKey: string) => {\n\t\tconst assignContextProvider = (element: RadiantElement, provider: unknown) => {\n\t\t\t(element as any)[propertyKey] = provider;\n\t\t};\n\t\tconst initializeConsumedContextForHost = (element: RadiantElement, options: { emitMounted?: boolean } = {}) => {\n\t\t\tif ((element as any)[propertyKey]) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\treturn connectConsumedContext(\n\t\t\t\telement,\n\t\t\t\tcontext,\n\t\t\t\t(provider) => {\n\t\t\t\t\tassignContextProvider(element, provider);\n\t\t\t\t},\n\t\t\t\toptions,\n\t\t\t);\n\t\t};\n\n\t\tregisterLegacyInstanceInitializer(proto, (element) => {\n\t\t\tbootstrapSsrConsumedContext(element, context, (provider) => {\n\t\t\t\tassignContextProvider(element, provider);\n\t\t\t});\n\n\t\t\telement.registerConnectedCallback(() => {\n\t\t\t\tif (initializeConsumedContextForHost(element, { emitMounted: true })) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tqueueMicrotask(() => {\n\t\t\t\t\tinitializeConsumedContextForHost(element, { emitMounted: true });\n\t\t\t\t});\n\t\t\t});\n\t\t});\n\t};\n}\n"
6
- ],
7
- "mappings": "8FAKO,GAAS,CAAc,CAAC,EAAyB,CACvD,MAAO,CAAC,EAAuB,IAAwB,CACtD,IAAM,EAAwB,CAAC,EAAyB,IAAsB,CAC5E,EAAgB,GAAe,GAE3B,EAAmC,CAAC,EAAyB,EAAqC,CAAC,IAAM,CAC9G,GAAK,EAAgB,GACpB,MAAO,GAGR,OAAO,EACN,EACA,EACA,CAAC,IAAa,CACb,EAAsB,EAAS,CAAQ,GAExC,CACD,GAGD,EAAkC,EAAO,CAAC,IAAY,CACrD,EAA4B,EAAS,EAAS,CAAC,IAAa,CAC3D,EAAsB,EAAS,CAAQ,EACvC,EAED,EAAQ,0BAA0B,IAAM,CACvC,GAAI,EAAiC,EAAS,CAAE,YAAa,EAAK,CAAC,EAClE,OAGD,eAAe,IAAM,CACpB,EAAiC,EAAS,CAAE,YAAa,EAAK,CAAC,EAC/D,EACD,EACD",
8
- "debugId": "C969449EEF34F5CD64756E2164756E21",
9
- "names": []
10
- }
@@ -1,4 +0,0 @@
1
- import{_ as E}from"./chunk-mpsj3cjs.js";import{$ as F}from"./chunk-0bswvy25.js";import{Oa as z}from"./chunk-q9z6tnzw.js";function N(j){return function(G,H){return z(F(j),E(j),G,H)}}
2
- export{N as Z};
3
-
4
- //# debugId=C26428BC6AB60B5B64756E2164756E21
@@ -1,10 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../src/decorators/query.ts"],
4
- "sourcesContent": [
5
- "import type { StandardOrLegacyFieldDecoratorArgs } from '../types';\nimport type { QueryConfig, QueryScope } from '../helpers/create-query';\nimport { query as legacyQuery } from './legacy/query';\nimport { query as standardQuery } from './standard/query';\nimport { fieldDecoratorBridge } from './bridge';\n\nexport type { QueryConfig, QueryScope };\n\n/**\n * A decorator to query by CSS selector or data-ref attribute.\n * By default it queries for the first element that matches the selector, but it can be configured to query for all elements.\n * It caches the result only when `cache` is enabled.\n * Queries run against the host light DOM by default, but can be directed to the shadow root or both trees.\n * @param options {@link QueryConfig} The options for the reactive property.\n */\nexport function query<T extends Element | Element[]>(options: QueryConfig) {\n\treturn function (\n\t\tprotoOrTarget: StandardOrLegacyFieldDecoratorArgs['protoOrTarget'],\n\t\tnameOrContext: StandardOrLegacyFieldDecoratorArgs['nameOrContext'],\n\t): any {\n\t\treturn fieldDecoratorBridge(standardQuery(options), legacyQuery<T>(options), protoOrTarget, nameOrContext);\n\t};\n}\n"
6
- ],
7
- "mappings": "qIAeO,GAAS,LAAoC,CAAC,EAAsB,CAC1E,OAAO,QAAS,CACf,EACA,EACM,CACN,OAAO,EAAqB,EAAc,CAAO,EAAG,EAAe,CAAO,EAAG,EAAe,CAAa",
8
- "debugId": "C26428BC6AB60B5B64756E2164756E21",
9
- "names": []
10
- }
@@ -1,4 +0,0 @@
1
- import{Ha as F,Ia as G}from"./chunk-dabagjk6.js";import{ub as C,vb as D}from"./chunk-hpzgnxgq.js";import{createMarkupNodeLike as K}from"@ecopages/jsx";import{state as O}from"@ecopages/signals";function Y(q){return typeof q==="object"&&q!==null&&typeof q.get==="function"&&typeof q.set==="function"&&typeof q.subscribe==="function"&&typeof q.update==="function"}class I{host;hydrate;hydrationKey;property;source;currentValue;hasAppliedHostHydration=!1;sourceUnsubscribe;constructor(q){this.host=q.host,this.hydrate=q.hydrate,this.hydrationKey=q.hydrationKey,this.property=q.property,this.source=q.source??O(this.resolveInitialValue(q.initialValue)),this.currentValue=this.source.get()}get(){return this.source.get()}set(q){this.source.set(q)}subscribe(q){return this.source.subscribe(q)}update(q){this.set(q(this.get()))}connectToSource(){if(this.sourceUnsubscribe)return;let q=this.source.get();if(!Object.is(this.currentValue,q)){let A=this.currentValue;this.currentValue=q,this.host.notifyUpdate(this.property,A,q)}this.sourceUnsubscribe=this.source.subscribe((A)=>{this.handleSourceChange(A)})}disconnectFromSource(){this.sourceUnsubscribe?.(),this.sourceUnsubscribe=void 0}hydrateFromHost(){if(!this.hydrate||this.hasAppliedHostHydration)return;this.hasAppliedHostHydration=!0;let q=this.source.get(),A=this.resolveInitialValue(q);if(!Object.is(q,A))this.source.set(A),this.currentValue=this.source.get(),this.host.notifyUpdate(this.property,q,this.currentValue)}renderHydrationScript(){let q=this.renderHydrationScriptTag();if(!q)return;return K(q)}renderHydrationScriptTag(){let q=this.serializeHydrationValue();if(!q)return;return F({hydrationKey:this.hydrationKey,serializedValue:q})}findHydrationScriptElement(){return D(this.host,"signal",this.hydrationKey)}isObject(q){return typeof q==="object"&&!Array.isArray(q)&&q!==null}resolveInitialValue(q){if(!this.hydrate)return q;let A=this.findHydrationScriptElement();if(!A)return q;let B=C(A,q);if(this.hydrate===Object&&this.isObject(B)&&this.isObject(q))return{...q,...B};return B}serializeHydrationValue(){if(!this.hydrate)return;let q=JSON.stringify(this.get());if(typeof q!=="string")return;return G(q)}handleSourceChange(q){let A=this.currentValue;if(this.currentValue=q,!Object.is(A,q))this.host.notifyUpdate(this.property,A,q)}}function Z(q){return new I(q)}
2
- export{Y as Ea,I as Fa,Z as Ga};
3
-
4
- //# debugId=FF7C4716227882D764756E2164756E21