@ecopages/radiant 0.3.0-alpha.0 → 0.3.0-alpha.10

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 (463) hide show
  1. package/README.md +72 -57
  2. package/dist/LICENSE +21 -0
  3. package/dist/client/app-bootstrap.d.ts +19 -0
  4. package/dist/client/app-bootstrap.js +3 -0
  5. package/dist/client/app-bootstrap.js.map +10 -0
  6. package/dist/client/hydrator.d.ts +19 -0
  7. package/dist/client/hydrator.js +3 -0
  8. package/dist/client/hydrator.js.map +11 -0
  9. package/dist/client/install-hydrator.d.ts +1 -0
  10. package/dist/client/install-hydrator.js +3 -0
  11. package/dist/client/install-hydrator.js.map +12 -0
  12. package/dist/context/context-consumer-bootstrap.d.ts +7 -6
  13. package/dist/context/context-consumer-bootstrap.js +2 -2
  14. package/dist/context/context-consumer-bootstrap.js.map +8 -3
  15. package/dist/context/context-consumer-runtime.d.ts +21 -8
  16. package/dist/context/context-consumer-runtime.js +2 -2
  17. package/dist/context/context-consumer-runtime.js.map +6 -3
  18. package/dist/context/context-host.d.ts +25 -0
  19. package/dist/context/context-host.js +3 -0
  20. package/dist/context/context-host.js.map +10 -0
  21. package/dist/context/context-provider.d.ts +10 -6
  22. package/dist/context/context-provider.js +2 -2
  23. package/dist/context/context-provider.js.map +9 -3
  24. package/dist/context/context-ssr-bridge.js +2 -2
  25. package/dist/context/context-ssr-bridge.js.map +4 -3
  26. package/dist/context/create-context.js +2 -2
  27. package/dist/context/create-context.js.map +4 -3
  28. package/dist/context/decorators/consume-context.d.ts +5 -2
  29. package/dist/context/decorators/consume-context.js +2 -2
  30. package/dist/context/decorators/consume-context.js.map +13 -3
  31. package/dist/context/decorators/context-selection-delivery.d.ts +1 -1
  32. package/dist/context/decorators/context-selection-delivery.js +2 -2
  33. package/dist/context/decorators/context-selection-delivery.js.map +5 -3
  34. package/dist/context/decorators/context-selector.d.ts +6 -11
  35. package/dist/context/decorators/context-selector.js +2 -2
  36. package/dist/context/decorators/context-selector.js.map +15 -3
  37. package/dist/context/decorators/legacy/consume-context.d.ts +2 -2
  38. package/dist/context/decorators/legacy/consume-context.js +2 -2
  39. package/dist/context/decorators/legacy/consume-context.js.map +10 -3
  40. package/dist/context/decorators/legacy/context-selector-field.d.ts +2 -2
  41. package/dist/context/decorators/legacy/context-selector-field.js +2 -2
  42. package/dist/context/decorators/legacy/context-selector-field.js.map +11 -3
  43. package/dist/context/decorators/legacy/context-selector.d.ts +2 -2
  44. package/dist/context/decorators/legacy/context-selector.js +2 -2
  45. package/dist/context/decorators/legacy/context-selector.js.map +11 -3
  46. package/dist/context/decorators/legacy/provide-context.d.ts +2 -2
  47. package/dist/context/decorators/legacy/provide-context.js +2 -2
  48. package/dist/context/decorators/legacy/provide-context.js.map +11 -3
  49. package/dist/context/decorators/on-context-update.d.ts +5 -5
  50. package/dist/context/decorators/on-context-update.js +2 -2
  51. package/dist/context/decorators/on-context-update.js.map +14 -3
  52. package/dist/context/decorators/provide-context.d.ts +5 -2
  53. package/dist/context/decorators/provide-context.js +2 -2
  54. package/dist/context/decorators/provide-context.js.map +14 -3
  55. package/dist/context/decorators/standard/consume-context.d.ts +2 -2
  56. package/dist/context/decorators/standard/consume-context.js +2 -2
  57. package/dist/context/decorators/standard/consume-context.js.map +9 -3
  58. package/dist/context/decorators/standard/context-selector-field.d.ts +2 -2
  59. package/dist/context/decorators/standard/context-selector-field.js +2 -2
  60. package/dist/context/decorators/standard/context-selector-field.js.map +10 -3
  61. package/dist/context/decorators/standard/context-selector.d.ts +2 -3
  62. package/dist/context/decorators/standard/context-selector.js +2 -2
  63. package/dist/context/decorators/standard/context-selector.js.map +10 -3
  64. package/dist/context/decorators/standard/provide-context.d.ts +2 -2
  65. package/dist/context/decorators/standard/provide-context.js +2 -2
  66. package/dist/context/decorators/standard/provide-context.js.map +10 -3
  67. package/dist/context/events.d.ts +18 -11
  68. package/dist/context/events.js +2 -2
  69. package/dist/context/events.js.map +4 -3
  70. package/dist/context/hydration-script.d.ts +0 -4
  71. package/dist/context/hydration-script.js +2 -2
  72. package/dist/context/hydration-script.js.map +6 -3
  73. package/dist/context/index.d.ts +8 -0
  74. package/dist/context/index.js +3 -0
  75. package/dist/context/index.js.map +35 -0
  76. package/dist/controller-registry.d.ts +38 -0
  77. package/dist/controller-registry.js +3 -0
  78. package/dist/controller-registry.js.map +11 -0
  79. package/dist/core/controller-metadata.d.ts +3 -0
  80. package/dist/core/controller-metadata.js +3 -0
  81. package/dist/core/controller-metadata.js.map +10 -0
  82. package/dist/core/custom-element-metadata.d.ts +11 -0
  83. package/dist/core/custom-element-metadata.js +2 -2
  84. package/dist/core/custom-element-metadata.js.map +4 -3
  85. package/dist/core/hydration-codec.d.ts +8 -1
  86. package/dist/core/hydration-codec.js +2 -2
  87. package/dist/core/hydration-codec.js.map +5 -3
  88. package/dist/core/radiant-component-ssr-registry.d.ts +54 -0
  89. package/dist/core/radiant-component-ssr-registry.js +3 -0
  90. package/dist/core/radiant-component-ssr-registry.js.map +10 -0
  91. package/dist/core/radiant-component-ssr.d.ts +3 -3
  92. package/dist/core/radiant-component-ssr.js +2 -2
  93. package/dist/core/radiant-component-ssr.js.map +8 -3
  94. package/dist/core/radiant-controller.d.ts +128 -0
  95. package/dist/core/radiant-controller.js +3 -0
  96. package/dist/core/radiant-controller.js.map +13 -0
  97. package/dist/core/radiant-element.d.ts +80 -41
  98. package/dist/core/radiant-element.js +2 -2
  99. package/dist/core/radiant-element.js.map +13 -3
  100. package/dist/core/radiant-hydrator-state.d.ts +20 -0
  101. package/dist/core/radiant-hydrator-state.js +3 -0
  102. package/dist/core/radiant-hydrator-state.js.map +10 -0
  103. package/dist/core/reactive-host.d.ts +137 -0
  104. package/dist/core/reactive-host.js +3 -0
  105. package/dist/core/reactive-host.js.map +10 -0
  106. package/dist/core/reactive-jsx-value.js +2 -2
  107. package/dist/core/reactive-jsx-value.js.map +4 -3
  108. package/dist/core/reactive-prop-metadata.js +2 -2
  109. package/dist/core/reactive-prop-metadata.js.map +4 -3
  110. package/dist/core/{slot-projection.d.ts → slot-projection-runtime.d.ts} +0 -20
  111. package/dist/core/slot-projection-runtime.js +3 -0
  112. package/dist/core/slot-projection-runtime.js.map +12 -0
  113. package/dist/core/ssr-preparation.js +2 -2
  114. package/dist/core/ssr-preparation.js.map +4 -3
  115. package/dist/decorators/attr.d.ts +6 -0
  116. package/dist/decorators/attr.js +3 -0
  117. package/dist/decorators/attr.js.map +16 -0
  118. package/dist/decorators/bound.d.ts +4 -2
  119. package/dist/decorators/bound.js +2 -2
  120. package/dist/decorators/bound.js.map +7 -3
  121. package/dist/decorators/bridge.d.ts +11 -7
  122. package/dist/decorators/bridge.js +2 -2
  123. package/dist/decorators/bridge.js.map +4 -3
  124. package/dist/decorators/controller.d.ts +2 -0
  125. package/dist/decorators/controller.js +3 -0
  126. package/dist/decorators/controller.js.map +12 -0
  127. package/dist/decorators/custom-element.d.ts +4 -2
  128. package/dist/decorators/custom-element.js +2 -2
  129. package/dist/decorators/custom-element.js.map +7 -3
  130. package/dist/decorators/debounce.d.ts +5 -2
  131. package/dist/decorators/debounce.js +2 -2
  132. package/dist/decorators/debounce.js.map +8 -3
  133. package/dist/decorators/event.d.ts +5 -2
  134. package/dist/decorators/event.js +2 -2
  135. package/dist/decorators/event.js.map +10 -3
  136. package/dist/decorators/legacy/attr.d.ts +2 -0
  137. package/dist/decorators/legacy/attr.js +3 -0
  138. package/dist/decorators/legacy/attr.js.map +13 -0
  139. package/dist/decorators/legacy/bound.js +2 -2
  140. package/dist/decorators/legacy/bound.js.map +4 -3
  141. package/dist/decorators/legacy/custom-element.js +2 -2
  142. package/dist/decorators/legacy/custom-element.js.map +5 -3
  143. package/dist/decorators/legacy/debounce.js +2 -2
  144. package/dist/decorators/legacy/debounce.js.map +5 -3
  145. package/dist/decorators/legacy/event.js +2 -2
  146. package/dist/decorators/legacy/event.js.map +7 -3
  147. package/dist/decorators/legacy/instance-initializers.d.ts +3 -4
  148. package/dist/decorators/legacy/instance-initializers.js +2 -2
  149. package/dist/decorators/legacy/instance-initializers.js.map +4 -3
  150. package/dist/decorators/legacy/on-event.d.ts +2 -2
  151. package/dist/decorators/legacy/on-event.js +2 -2
  152. package/dist/decorators/legacy/on-event.js.map +7 -3
  153. package/dist/decorators/legacy/on-updated.d.ts +7 -2
  154. package/dist/decorators/legacy/on-updated.js +2 -2
  155. package/dist/decorators/legacy/on-updated.js.map +5 -3
  156. package/dist/decorators/legacy/query-slot.d.ts +1 -1
  157. package/dist/decorators/legacy/query-slot.js +2 -2
  158. package/dist/decorators/legacy/query-slot.js.map +7 -3
  159. package/dist/decorators/legacy/query.d.ts +7 -2
  160. package/dist/decorators/legacy/query.js +2 -2
  161. package/dist/decorators/legacy/query.js.map +6 -3
  162. package/dist/decorators/legacy/reactive-field.d.ts +2 -2
  163. package/dist/decorators/legacy/reactive-field.js +2 -2
  164. package/dist/decorators/legacy/reactive-field.js.map +5 -3
  165. package/dist/decorators/legacy/reactive-prop.d.ts +10 -16
  166. package/dist/decorators/legacy/reactive-prop.js +2 -2
  167. package/dist/decorators/legacy/reactive-prop.js.map +7 -3
  168. package/dist/decorators/legacy/signal.d.ts +4 -3
  169. package/dist/decorators/legacy/signal.js +2 -2
  170. package/dist/decorators/legacy/signal.js.map +9 -3
  171. package/dist/decorators/on-event.d.ts +6 -3
  172. package/dist/decorators/on-event.js +2 -2
  173. package/dist/decorators/on-event.js.map +10 -3
  174. package/dist/decorators/on-updated.d.ts +12 -2
  175. package/dist/decorators/on-updated.js +2 -2
  176. package/dist/decorators/on-updated.js.map +8 -3
  177. package/dist/decorators/prop.d.ts +19 -7
  178. package/dist/decorators/prop.js +2 -2
  179. package/dist/decorators/prop.js.map +10 -3
  180. package/dist/decorators/query-slot.d.ts +7 -3
  181. package/dist/decorators/query-slot.js +2 -2
  182. package/dist/decorators/query-slot.js.map +10 -3
  183. package/dist/decorators/query.d.ts +9 -2
  184. package/dist/decorators/query.js +2 -2
  185. package/dist/decorators/query.js.map +9 -3
  186. package/dist/decorators/shared/reactive-attr.d.ts +25 -0
  187. package/dist/decorators/shared/reactive-attr.js +3 -0
  188. package/dist/decorators/shared/reactive-attr.js.map +11 -0
  189. package/dist/decorators/signal.d.ts +10 -4
  190. package/dist/decorators/signal.js +2 -2
  191. package/dist/decorators/signal.js.map +11 -3
  192. package/dist/decorators/standard/attr.d.ts +2 -0
  193. package/dist/decorators/standard/attr.js +3 -0
  194. package/dist/decorators/standard/attr.js.map +12 -0
  195. package/dist/decorators/standard/bound.js +2 -2
  196. package/dist/decorators/standard/bound.js.map +4 -3
  197. package/dist/decorators/standard/custom-element.js +2 -2
  198. package/dist/decorators/standard/custom-element.js.map +5 -3
  199. package/dist/decorators/standard/debounce.js +2 -2
  200. package/dist/decorators/standard/debounce.js.map +5 -3
  201. package/dist/decorators/standard/event.js +2 -2
  202. package/dist/decorators/standard/event.js.map +6 -3
  203. package/dist/decorators/standard/on-event.d.ts +2 -1
  204. package/dist/decorators/standard/on-event.js +2 -2
  205. package/dist/decorators/standard/on-event.js.map +6 -3
  206. package/dist/decorators/standard/on-updated.d.ts +5 -1
  207. package/dist/decorators/standard/on-updated.js +2 -2
  208. package/dist/decorators/standard/on-updated.js.map +4 -3
  209. package/dist/decorators/standard/query-slot.d.ts +1 -1
  210. package/dist/decorators/standard/query-slot.js +2 -2
  211. package/dist/decorators/standard/query-slot.js.map +5 -3
  212. package/dist/decorators/standard/query.d.ts +2 -1
  213. package/dist/decorators/standard/query.js +2 -2
  214. package/dist/decorators/standard/query.js.map +5 -3
  215. package/dist/decorators/standard/reactive-field.d.ts +2 -2
  216. package/dist/decorators/standard/reactive-field.js +2 -2
  217. package/dist/decorators/standard/reactive-field.js.map +4 -3
  218. package/dist/decorators/standard/reactive-prop.d.ts +13 -2
  219. package/dist/decorators/standard/reactive-prop.js +2 -2
  220. package/dist/decorators/standard/reactive-prop.js.map +6 -3
  221. package/dist/decorators/standard/signal.d.ts +4 -3
  222. package/dist/decorators/standard/signal.js +2 -2
  223. package/dist/decorators/standard/signal.js.map +8 -3
  224. package/dist/decorators/state.d.ts +6 -5
  225. package/dist/decorators/state.js +2 -2
  226. package/dist/decorators/state.js.map +8 -3
  227. package/dist/helpers/create-event-listener.d.ts +11 -2
  228. package/dist/helpers/create-event-listener.js +2 -2
  229. package/dist/helpers/create-event-listener.js.map +5 -3
  230. package/dist/helpers/create-event.js +2 -2
  231. package/dist/helpers/create-event.js.map +5 -3
  232. package/dist/helpers/create-query-slot.d.ts +2 -2
  233. package/dist/helpers/create-query-slot.js +2 -2
  234. package/dist/helpers/create-query-slot.js.map +4 -3
  235. package/dist/helpers/create-query.d.ts +14 -3
  236. package/dist/helpers/create-query.js +2 -2
  237. package/dist/helpers/create-query.js.map +4 -3
  238. package/dist/helpers/debounce.js +2 -2
  239. package/dist/helpers/debounce.js.map +4 -3
  240. package/dist/helpers/index.js +2 -2
  241. package/dist/helpers/index.js.map +10 -3
  242. package/dist/index.d.ts +4 -12
  243. package/dist/index.js +2 -2
  244. package/dist/index.js.map +66 -3
  245. package/dist/server/context-ssr.js +2 -2
  246. package/dist/server/context-ssr.js.map +5 -3
  247. package/dist/server/html-parser.d.ts +21 -0
  248. package/dist/server/html-parser.js +3 -0
  249. package/dist/server/html-parser.js.map +10 -0
  250. package/dist/server/install-light-dom-shim.js +2 -2
  251. package/dist/server/install-light-dom-shim.js.map +5 -3
  252. package/dist/server/light-dom-shim.d.ts +9 -0
  253. package/dist/server/light-dom-shim.js +2 -2
  254. package/dist/server/light-dom-shim.js.map +5 -3
  255. package/dist/server/project-root.js +2 -2
  256. package/dist/server/project-root.js.map +2 -2
  257. package/dist/server/radiant-component-ssr-runtime.d.ts +9 -0
  258. package/dist/server/radiant-component-ssr-runtime.js +3 -0
  259. package/dist/server/radiant-component-ssr-runtime.js.map +17 -0
  260. package/dist/server/render-component.d.ts +7 -17
  261. package/dist/server/render-component.js +2 -2
  262. package/dist/server/render-component.js.map +14 -4
  263. package/dist/server/render-controller.d.ts +57 -0
  264. package/dist/server/render-controller.js +3 -0
  265. package/dist/server/render-controller.js.map +23 -0
  266. package/dist/server/slot-projection-html.d.ts +3 -0
  267. package/dist/server/slot-projection-html.js +3 -0
  268. package/dist/server/slot-projection-html.js.map +14 -0
  269. package/dist/signals/host-resource.js +2 -2
  270. package/dist/signals/host-resource.js.map +2 -2
  271. package/dist/signals/host-signal.d.ts +4 -2
  272. package/dist/signals/host-signal.js +2 -2
  273. package/dist/signals/host-signal.js.map +7 -3
  274. package/dist/signals/hydration-script.d.ts +0 -4
  275. package/dist/signals/hydration-script.js +2 -2
  276. package/dist/signals/hydration-script.js.map +6 -3
  277. package/dist/tools/escape-css-identifier.d.ts +1 -0
  278. package/dist/tools/escape-css-identifier.js +3 -0
  279. package/dist/tools/escape-css-identifier.js.map +10 -0
  280. package/dist/tools/escape-script-json.js +2 -2
  281. package/dist/tools/escape-script-json.js.map +4 -3
  282. package/dist/tools/event-emitter.js +2 -2
  283. package/dist/tools/event-emitter.js.map +4 -3
  284. package/dist/tools/index.d.ts +1 -1
  285. package/dist/tools/index.js +2 -2
  286. package/dist/tools/index.js.map +7 -3
  287. package/dist/tools/render-jsx-template.js +2 -2
  288. package/dist/tools/render-jsx-template.js.map +4 -3
  289. package/dist/types.d.ts +0 -21
  290. package/dist/types.js +2 -2
  291. package/dist/types.js.map +3 -3
  292. package/dist/utils/attribute-utils.js +2 -2
  293. package/dist/utils/attribute-utils.js.map +4 -3
  294. package/dist/utils/index.js +2 -2
  295. package/dist/utils/index.js.map +4 -3
  296. package/package.json +41 -8
  297. package/size-budget.json +12 -9
  298. package/dist/chunk-0y78f8hj.js +0 -4
  299. package/dist/chunk-0y78f8hj.js.map +0 -10
  300. package/dist/chunk-0zq7e1ne.js +0 -4
  301. package/dist/chunk-0zq7e1ne.js.map +0 -10
  302. package/dist/chunk-13ydx769.js +0 -4
  303. package/dist/chunk-13ydx769.js.map +0 -10
  304. package/dist/chunk-147yvtsn.js +0 -4
  305. package/dist/chunk-147yvtsn.js.map +0 -10
  306. package/dist/chunk-17earqbr.js +0 -4
  307. package/dist/chunk-17earqbr.js.map +0 -10
  308. package/dist/chunk-1w1dm68j.js +0 -4
  309. package/dist/chunk-1w1dm68j.js.map +0 -10
  310. package/dist/chunk-2tgrfv09.js +0 -4
  311. package/dist/chunk-2tgrfv09.js.map +0 -10
  312. package/dist/chunk-3b033cgq.js +0 -4
  313. package/dist/chunk-3b033cgq.js.map +0 -10
  314. package/dist/chunk-42tyhfvh.js +0 -4
  315. package/dist/chunk-42tyhfvh.js.map +0 -10
  316. package/dist/chunk-4cc2syf5.js +0 -4
  317. package/dist/chunk-4cc2syf5.js.map +0 -10
  318. package/dist/chunk-4fqkmpra.js +0 -4
  319. package/dist/chunk-4fqkmpra.js.map +0 -10
  320. package/dist/chunk-4srpf0y5.js +0 -4
  321. package/dist/chunk-4srpf0y5.js.map +0 -10
  322. package/dist/chunk-57w3vmme.js +0 -4
  323. package/dist/chunk-57w3vmme.js.map +0 -10
  324. package/dist/chunk-5a2xez36.js +0 -4
  325. package/dist/chunk-5a2xez36.js.map +0 -10
  326. package/dist/chunk-5bym7y1d.js +0 -4
  327. package/dist/chunk-5bym7y1d.js.map +0 -10
  328. package/dist/chunk-5td6v9k3.js +0 -4
  329. package/dist/chunk-5td6v9k3.js.map +0 -10
  330. package/dist/chunk-60015zxq.js +0 -4
  331. package/dist/chunk-60015zxq.js.map +0 -10
  332. package/dist/chunk-60q4y3k5.js +0 -4
  333. package/dist/chunk-60q4y3k5.js.map +0 -10
  334. package/dist/chunk-6kdxrppw.js +0 -4
  335. package/dist/chunk-6kdxrppw.js.map +0 -10
  336. package/dist/chunk-6z34stya.js +0 -4
  337. package/dist/chunk-6z34stya.js.map +0 -10
  338. package/dist/chunk-73x7jpdd.js +0 -4
  339. package/dist/chunk-73x7jpdd.js.map +0 -10
  340. package/dist/chunk-84fc8cz9.js +0 -4
  341. package/dist/chunk-84fc8cz9.js.map +0 -10
  342. package/dist/chunk-8dexhy6c.js +0 -4
  343. package/dist/chunk-8dexhy6c.js.map +0 -10
  344. package/dist/chunk-8n2dhx28.js +0 -4
  345. package/dist/chunk-8n2dhx28.js.map +0 -10
  346. package/dist/chunk-8tvt04cm.js +0 -4
  347. package/dist/chunk-8tvt04cm.js.map +0 -10
  348. package/dist/chunk-8vak8w5w.js +0 -4
  349. package/dist/chunk-8vak8w5w.js.map +0 -10
  350. package/dist/chunk-8xy18qmz.js +0 -4
  351. package/dist/chunk-8xy18qmz.js.map +0 -9
  352. package/dist/chunk-9554n9t4.js +0 -4
  353. package/dist/chunk-9554n9t4.js.map +0 -10
  354. package/dist/chunk-9ascmjk3.js +0 -4
  355. package/dist/chunk-9ascmjk3.js.map +0 -10
  356. package/dist/chunk-9gjmqxp2.js +0 -4
  357. package/dist/chunk-9gjmqxp2.js.map +0 -10
  358. package/dist/chunk-a7hzs37s.js +0 -4
  359. package/dist/chunk-a7hzs37s.js.map +0 -10
  360. package/dist/chunk-aajhkdmn.js +0 -4
  361. package/dist/chunk-aajhkdmn.js.map +0 -10
  362. package/dist/chunk-agjb2a3r.js +0 -4
  363. package/dist/chunk-agjb2a3r.js.map +0 -10
  364. package/dist/chunk-ak97hp4w.js +0 -4
  365. package/dist/chunk-ak97hp4w.js.map +0 -10
  366. package/dist/chunk-bmhn4nbp.js +0 -4
  367. package/dist/chunk-bmhn4nbp.js.map +0 -10
  368. package/dist/chunk-c8vqg7r1.js +0 -4
  369. package/dist/chunk-c8vqg7r1.js.map +0 -10
  370. package/dist/chunk-cbvd18v1.js +0 -4
  371. package/dist/chunk-cbvd18v1.js.map +0 -10
  372. package/dist/chunk-chyn72n9.js +0 -4
  373. package/dist/chunk-chyn72n9.js.map +0 -10
  374. package/dist/chunk-cvz9mrxa.js +0 -4
  375. package/dist/chunk-cvz9mrxa.js.map +0 -10
  376. package/dist/chunk-d0n7njdy.js +0 -4
  377. package/dist/chunk-d0n7njdy.js.map +0 -10
  378. package/dist/chunk-d4v5qpxa.js +0 -4
  379. package/dist/chunk-d4v5qpxa.js.map +0 -10
  380. package/dist/chunk-d7hh3ze6.js +0 -4
  381. package/dist/chunk-d7hh3ze6.js.map +0 -10
  382. package/dist/chunk-d98q3myg.js +0 -4
  383. package/dist/chunk-d98q3myg.js.map +0 -10
  384. package/dist/chunk-dscj0sk9.js +0 -4
  385. package/dist/chunk-dscj0sk9.js.map +0 -10
  386. package/dist/chunk-dx1wqc00.js +0 -4
  387. package/dist/chunk-dx1wqc00.js.map +0 -10
  388. package/dist/chunk-g0gz7ypq.js +0 -4
  389. package/dist/chunk-g0gz7ypq.js.map +0 -10
  390. package/dist/chunk-hkmm3dj9.js +0 -4
  391. package/dist/chunk-hkmm3dj9.js.map +0 -10
  392. package/dist/chunk-hn4j8rt5.js +0 -4
  393. package/dist/chunk-hn4j8rt5.js.map +0 -10
  394. package/dist/chunk-jce9gqqw.js +0 -4
  395. package/dist/chunk-jce9gqqw.js.map +0 -10
  396. package/dist/chunk-jg20mzg8.js +0 -4
  397. package/dist/chunk-jg20mzg8.js.map +0 -10
  398. package/dist/chunk-jkb2y7c8.js +0 -4
  399. package/dist/chunk-jkb2y7c8.js.map +0 -10
  400. package/dist/chunk-k5hr781q.js +0 -4
  401. package/dist/chunk-k5hr781q.js.map +0 -10
  402. package/dist/chunk-ksv01cey.js +0 -4
  403. package/dist/chunk-ksv01cey.js.map +0 -10
  404. package/dist/chunk-mpjnqmbq.js +0 -4
  405. package/dist/chunk-mpjnqmbq.js.map +0 -10
  406. package/dist/chunk-mqxmfvyp.js +0 -4
  407. package/dist/chunk-mqxmfvyp.js.map +0 -10
  408. package/dist/chunk-ms6a9zdt.js +0 -4
  409. package/dist/chunk-ms6a9zdt.js.map +0 -10
  410. package/dist/chunk-nerd6fmg.js +0 -4
  411. package/dist/chunk-nerd6fmg.js.map +0 -10
  412. package/dist/chunk-nw171z6m.js +0 -4
  413. package/dist/chunk-nw171z6m.js.map +0 -10
  414. package/dist/chunk-p6pxdvkk.js +0 -4
  415. package/dist/chunk-p6pxdvkk.js.map +0 -10
  416. package/dist/chunk-paehjz94.js +0 -4
  417. package/dist/chunk-paehjz94.js.map +0 -10
  418. package/dist/chunk-par0t822.js +0 -4
  419. package/dist/chunk-par0t822.js.map +0 -10
  420. package/dist/chunk-qaagk55a.js +0 -4
  421. package/dist/chunk-qaagk55a.js.map +0 -10
  422. package/dist/chunk-qbnedp0y.js +0 -4
  423. package/dist/chunk-qbnedp0y.js.map +0 -10
  424. package/dist/chunk-qd28hvdx.js +0 -4
  425. package/dist/chunk-qd28hvdx.js.map +0 -10
  426. package/dist/chunk-qdj6r8jn.js +0 -4
  427. package/dist/chunk-qdj6r8jn.js.map +0 -10
  428. package/dist/chunk-qe6sjr27.js +0 -4
  429. package/dist/chunk-qe6sjr27.js.map +0 -10
  430. package/dist/chunk-r1cvaz1t.js +0 -4
  431. package/dist/chunk-r1cvaz1t.js.map +0 -10
  432. package/dist/chunk-r75y7ydb.js +0 -4
  433. package/dist/chunk-r75y7ydb.js.map +0 -10
  434. package/dist/chunk-s4qgct1z.js +0 -4
  435. package/dist/chunk-s4qgct1z.js.map +0 -10
  436. package/dist/chunk-scfk041e.js +0 -4
  437. package/dist/chunk-scfk041e.js.map +0 -10
  438. package/dist/chunk-t6x9e177.js +0 -4
  439. package/dist/chunk-t6x9e177.js.map +0 -10
  440. package/dist/chunk-t7a1bbxq.js +0 -4
  441. package/dist/chunk-t7a1bbxq.js.map +0 -10
  442. package/dist/chunk-tyysm4gk.js +0 -4
  443. package/dist/chunk-tyysm4gk.js.map +0 -10
  444. package/dist/chunk-vpfm9yw8.js +0 -4
  445. package/dist/chunk-vpfm9yw8.js.map +0 -10
  446. package/dist/chunk-w50v38rv.js +0 -4
  447. package/dist/chunk-w50v38rv.js.map +0 -10
  448. package/dist/chunk-x0522ksh.js +0 -4
  449. package/dist/chunk-x0522ksh.js.map +0 -10
  450. package/dist/chunk-xd1xn3vy.js +0 -4
  451. package/dist/chunk-xd1xn3vy.js.map +0 -10
  452. package/dist/chunk-zb7wh7w4.js +0 -4
  453. package/dist/chunk-zb7wh7w4.js.map +0 -10
  454. package/dist/chunk-zj9ez73m.js +0 -4
  455. package/dist/chunk-zj9ez73m.js.map +0 -10
  456. package/dist/core/radiant-component.d.ts +0 -106
  457. package/dist/core/radiant-component.js +0 -3
  458. package/dist/core/radiant-component.js.map +0 -9
  459. package/dist/core/slot-projection.js +0 -3
  460. package/dist/core/slot-projection.js.map +0 -9
  461. package/dist/tools/stringify-typed.d.ts +0 -16
  462. package/dist/tools/stringify-typed.js +0 -3
  463. package/dist/tools/stringify-typed.js.map +0 -9
@@ -1,4 +0,0 @@
1
- import{i as z}from"./chunk-agjb2a3r.js";import{l as E}from"./chunk-hkmm3dj9.js";import{Na as w}from"./chunk-nerd6fmg.js";function L(q){return function(F,G){return w(E(q),z(q),F,G)}}
2
- export{L as h};
3
-
4
- //# debugId=9BE50727584DE51664756E2164756E21
@@ -1,10 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../src/context/decorators/consume-context.ts"],
4
- "sourcesContent": [
5
- "import type { StandardOrLegacyFieldDecoratorArgs } from '../../types';\nimport type { UnknownContext } from '../types';\nimport { consumeContext as legacyConsumeContext } from './legacy/consume-context';\nimport { consumeContext as standardConsumeContext } from './standard/consume-context';\nimport { fieldDecoratorBridge } from '../../decorators/bridge';\n\n/**\n * Injects the nearest matching context provider onto a decorated field.\n *\n * During SSR the field can be resolved from the active SSR context stack; on\n * the client it falls back to the DOM event-based context channel.\n *\n * @param context Context token to consume from ancestor providers.\n * @returns A standard-or-legacy decorator implementation for the target field.\n */\nexport function consumeContext(context: UnknownContext) {\n\treturn function (\n\t\tprotoOrTarget: StandardOrLegacyFieldDecoratorArgs['protoOrTarget'],\n\t\tnameOrContext: StandardOrLegacyFieldDecoratorArgs['nameOrContext'],\n\t): any {\n\t\treturn fieldDecoratorBridge(\n\t\t\tstandardConsumeContext(context),\n\t\t\tlegacyConsumeContext(context),\n\t\t\tprotoOrTarget,\n\t\t\tnameOrContext,\n\t\t);\n\t};\n}\n"
6
- ],
7
- "mappings": "qIAeO,GAAS,LAAc,CAAC,EAAyB,CACvD,OAAO,QAAS,CACf,EACA,EACM,CACN,OAAO,EACN,EAAuB,CAAO,EAC9B,EAAqB,CAAO,EAC5B,EACA,CACD",
8
- "debugId": "9BE50727584DE51664756E2164756E21",
9
- "names": []
10
- }
@@ -1,4 +0,0 @@
1
- import{t as G}from"./chunk-5td6v9k3.js";import{v as F,x as A}from"./chunk-vpfm9yw8.js";import{La as E}from"./chunk-8tvt04cm.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 r};
3
-
4
- //# debugId=EFF9D81C3F3096B064756E2164756E21
@@ -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": "4IAOO,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": "EFF9D81C3F3096B064756E2164756E21",
9
- "names": []
10
- }
@@ -1,4 +0,0 @@
1
- import{fa as G}from"./chunk-8dexhy6c.js";import{Ua as F}from"./chunk-73x7jpdd.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 ea};
3
-
4
- //# debugId=92FEC1ED84282E1E64756E2164756E21
@@ -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": "92FEC1ED84282E1E64756E2164756E21",
9
- "names": []
10
- }
@@ -1,4 +0,0 @@
1
- import{ab as D}from"./chunk-4cc2syf5.js";import{ub as P}from"./chunk-8xy18qmz.js";var y;function G(){if(y!==void 0)return y;try{let{AsyncLocalStorage:b}=(()=>{throw new Error("Cannot require module "+"node:async_hooks");})();return y=new b,y}catch{return y=null,null}}var z=Symbol.for("@ecopages/radiant.ssr-context-fallback-stack");function H(){let b=globalThis;return b[z]??=[],b[z]}function U(b){if(b.length===0)return()=>{return};let j=new Map;for(let u of b)j.set(u.getContextKey(),u);let q=G();if(q){let u=q.getStore()??[],J=[...u,j];return q.enterWith(J),()=>{q.enterWith(u)}}let w=H();return w.push(j),()=>{let u=w.lastIndexOf(j);if(u>=0)w.splice(u,1)}}function I(b){let j=G()?.getStore()??H();for(let q=j.length-1;q>=0;q-=1){let w=j[q]?.get(b);if(w)return w}return}function V(b){let j=I(b);if(!j)return;return j.getContext()}D((b)=>I(b));
2
- export{U as Za,I as _a,V as $a};
3
-
4
- //# debugId=B67255647C78BF8B64756E2164756E21
@@ -1,10 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../src/server/context-ssr.ts"],
4
- "sourcesContent": [
5
- "import type { AsyncLocalStorage } from 'node:async_hooks';\nimport type { SsrSerializableContextProvider } from '../context/context-provider';\nimport { installSsrContextProviderResolver } from '../context/context-ssr-bridge';\nimport type { ContextType, UnknownContext } from '../context/types';\n\ntype ProviderFrame = Map<UnknownContext, SsrSerializableContextProvider>;\ntype ProviderStack = ProviderFrame[];\n\nlet resolvedAsyncLocalStorage: AsyncLocalStorage<ProviderStack> | null | undefined;\n\n/**\n * Lazily resolves `AsyncLocalStorage` from `node:async_hooks`.\n *\n * The dynamic `require` is necessary because browser-based SSR tests import\n * this server-oriented module directly. A top-level static import would break\n * those browser bundles even though normal application SSR runs on the server.\n *\n * On the server (Node.js, Bun, Cloudflare Workers) the import always succeeds.\n * In browser test environments where SSR rendering is exercised without a real\n * server, the fallback global stack is used instead.\n */\nfunction getAsyncLocalStorage(): AsyncLocalStorage<ProviderStack> | null {\n\tif (resolvedAsyncLocalStorage !== undefined) {\n\t\treturn resolvedAsyncLocalStorage;\n\t}\n\n\ttry {\n\t\tconst { AsyncLocalStorage: ALS } = require('node:async_hooks') as typeof import('node:async_hooks');\n\t\tresolvedAsyncLocalStorage = new ALS<ProviderStack>();\n\t\treturn resolvedAsyncLocalStorage;\n\t} catch {\n\t\tresolvedAsyncLocalStorage = null;\n\t\treturn null;\n\t}\n}\n\nconst SSR_CONTEXT_FALLBACK_STACK_SYMBOL = Symbol.for('@ecopages/radiant.ssr-context-fallback-stack');\n\nfunction getFallbackStack(): ProviderStack {\n\tconst g = globalThis as typeof globalThis & { [SSR_CONTEXT_FALLBACK_STACK_SYMBOL]?: ProviderStack };\n\tg[SSR_CONTEXT_FALLBACK_STACK_SYMBOL] ??= [];\n\treturn g[SSR_CONTEXT_FALLBACK_STACK_SYMBOL];\n}\n\n/**\n * Pushes a temporary provider frame onto the SSR context stack.\n *\n * On the server, each call creates an isolated `AsyncLocalStorage` context so\n * concurrent renders cannot corrupt each other.\n *\n * In browser test environments where `AsyncLocalStorage` is unavailable, a\n * synchronous global stack is used as a fallback.\n */\nexport function withSsrContextProviders(providers: readonly SsrSerializableContextProvider[]): () => void {\n\tif (providers.length === 0) {\n\t\treturn () => undefined;\n\t}\n\n\tconst frame = new Map<UnknownContext, SsrSerializableContextProvider>();\n\n\tfor (const provider of providers) {\n\t\tframe.set(provider.getContextKey(), provider);\n\t}\n\n\tconst als = getAsyncLocalStorage();\n\n\tif (als) {\n\t\tconst parentStack = als.getStore() ?? [];\n\t\tconst childStack = [...parentStack, frame];\n\t\tals.enterWith(childStack);\n\n\t\treturn () => {\n\t\t\tals.enterWith(parentStack);\n\t\t};\n\t}\n\n\tconst stack = getFallbackStack();\n\tstack.push(frame);\n\n\treturn () => {\n\t\tconst index = stack.lastIndexOf(frame);\n\t\tif (index >= 0) stack.splice(index, 1);\n\t};\n}\n\n/**\n * Resolves the nearest SSR-visible provider for a given context token.\n *\n * Lookup walks the provider frames from innermost to outermost so nested host\n * serialization behaves the same way as runtime context resolution in the DOM.\n */\nexport function resolveSsrContextProvider<T extends UnknownContext>(\n\tcontext: T,\n): SsrSerializableContextProvider | undefined {\n\tconst store = getAsyncLocalStorage()?.getStore() ?? getFallbackStack();\n\n\tfor (let index = store.length - 1; index >= 0; index -= 1) {\n\t\tconst provider = store[index]?.get(context);\n\n\t\tif (provider) {\n\t\t\treturn provider;\n\t\t}\n\t}\n\n\treturn undefined;\n}\n\n/**\n * Resolves the current SSR-visible value for a given context token.\n *\n * This is the ergonomic helper consumed by SSR-aware decorators and component\n * render paths when they only need the context payload instead of the full\n * provider instance.\n */\nexport function resolveSsrContextValue<T extends UnknownContext>(context: T): ContextType<T> | undefined {\n\tconst provider = resolveSsrContextProvider(context);\n\n\tif (!provider) {\n\t\treturn undefined;\n\t}\n\n\treturn provider.getContext() as ContextType<T>;\n}\n\ninstallSsrContextProviderResolver((context) => resolveSsrContextProvider(context));\n"
6
- ],
7
- "mappings": "wFAQA,FAAI,EAaJ,SAAS,CAAoB,EAA4C,CACxE,GAAI,IAA8B,OACjC,OAAO,EAGR,GAAI,CACH,IAAQ,kBAAmB,2EAE3B,OADA,EAA4B,IAAI,EACzB,EACN,KAAM,CAEP,OADA,EAA4B,KACrB,MAIT,IAAM,EAAoC,OAAO,IAAI,8CAA8C,EAEnG,SAAS,CAAgB,EAAkB,CAC1C,IAAM,EAAI,WAEV,OADA,EAAE,KAAuC,CAAC,EACnC,EAAE,GAYH,SAAS,CAAuB,CAAC,EAAkE,CACzG,GAAI,EAAU,SAAW,EACxB,MAAO,IAAG,CAAG,QAGd,IAAM,EAAQ,IAAI,IAElB,QAAW,KAAY,EACtB,EAAM,IAAI,EAAS,cAAc,EAAG,CAAQ,EAG7C,IAAM,EAAM,EAAqB,EAEjC,GAAI,EAAK,CACR,IAAM,EAAc,EAAI,SAAS,GAAK,CAAC,EACjC,EAAa,CAAC,GAAG,EAAa,CAAK,EAGzC,OAFA,EAAI,UAAU,CAAU,EAEjB,IAAM,CACZ,EAAI,UAAU,CAAW,GAI3B,IAAM,EAAQ,EAAiB,EAG/B,OAFA,EAAM,KAAK,CAAK,EAET,IAAM,CACZ,IAAM,EAAQ,EAAM,YAAY,CAAK,EACrC,GAAI,GAAS,EAAG,EAAM,OAAO,EAAO,CAAC,GAUhC,SAAS,CAAmD,CAClE,EAC6C,CAC7C,IAAM,EAAQ,EAAqB,GAAG,SAAS,GAAK,EAAiB,EAErE,QAAS,EAAQ,EAAM,OAAS,EAAG,GAAS,EAAG,GAAS,EAAG,CAC1D,IAAM,EAAW,EAAM,IAAQ,IAAI,CAAO,EAE1C,GAAI,EACH,OAAO,EAIT,OAUM,SAAS,CAAgD,CAAC,EAAwC,CACxG,IAAM,EAAW,EAA0B,CAAO,EAElD,GAAI,CAAC,EACJ,OAGD,OAAO,EAAS,WAAW,EAG5B,EAAkC,CAAC,IAAY,EAA0B,CAAO,CAAC",
8
- "debugId": "B67255647C78BF8B64756E2164756E21",
9
- "names": []
10
- }
@@ -1,4 +0,0 @@
1
- function L(A,j="light"){if(j==="shadow")return A.shadowRoot?[A.shadowRoot]:[];if(j==="both")return A.shadowRoot?[A,A.shadowRoot]:[A];return[A]}function N(A,j){let G="selector"in j?j.selector:`[data-ref="${j.ref}"]`,B=null,H=()=>{let I=L(A,j.scope);if(j?.all)return I.flatMap((E)=>Array.from(E.querySelectorAll(G)));for(let E of I){let K=E.querySelector(G);if(K)return K}return null};return{get value(){if(j?.cache){if(B===null||j?.all&&Array.isArray(B)&&!B.length)B=H();return B}return H()}}}
2
- export{N as sb};
3
-
4
- //# debugId=47F01602D6A0DE6664756E2164756E21
@@ -1,10 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../src/helpers/create-query.ts"],
4
- "sourcesContent": [
5
- "type BaseQueryConfig = {\n\tall?: boolean;\n\tcache?: boolean;\n\tscope?: QueryScope;\n};\n\ntype QueryBySelector = { selector: string };\n\ntype QueryByRef = { ref: string };\n\n/**\n * Selects which DOM tree a query should read from.\n */\nexport type QueryScope = 'light' | 'shadow' | 'both';\n\nexport type QueryConfig = BaseQueryConfig & (QueryBySelector | QueryByRef);\n\ntype QueryRoot = Element | ShadowRoot;\n\ntype QueryResult<T extends Element | Element[]> = {\n\tget value(): T | null;\n};\n\nfunction getQueryRoots(host: HTMLElement, scope: QueryScope = 'light'): QueryRoot[] {\n\tif (scope === 'shadow') {\n\t\treturn host.shadowRoot ? [host.shadowRoot] : [];\n\t}\n\n\tif (scope === 'both') {\n\t\treturn host.shadowRoot ? [host, host.shadowRoot] : [host];\n\t}\n\n\treturn [host];\n}\n\n/**\n * Creates a lazy DOM query accessor bound to a host element.\n * Functional equivalent of the `@query` decorator for vanilla JS usage.\n * @param host The host element to query within.\n * @param options {@link QueryConfig} The query configuration.\n */\nexport function createQuery<T extends Element | Element[] = Element>(\n\thost: HTMLElement,\n\toptions: QueryConfig,\n): QueryResult<T> {\n\tconst selector = 'selector' in options ? options.selector : `[data-ref=\"${options.ref}\"]`;\n\tlet cached: T | null = null;\n\n\tconst executeQuery = (): T | null => {\n\t\tconst roots = getQueryRoots(host, options.scope);\n\n\t\tif (options?.all) {\n\t\t\treturn roots.flatMap((root) => Array.from(root.querySelectorAll(selector))) as T;\n\t\t}\n\n\t\tfor (const root of roots) {\n\t\t\tconst match = root.querySelector(selector);\n\t\t\tif (match) {\n\t\t\t\treturn match as T;\n\t\t\t}\n\t\t}\n\n\t\treturn null;\n\t};\n\n\treturn {\n\t\tget value(): T | null {\n\t\t\tif (options?.cache) {\n\t\t\t\tif (cached === null || (options?.all && Array.isArray(cached) && !cached.length)) {\n\t\t\t\t\tcached = executeQuery();\n\t\t\t\t}\n\t\t\t\treturn cached;\n\t\t\t}\n\t\t\treturn executeQuery();\n\t\t},\n\t};\n}\n"
6
- ],
7
- "mappings": "AAuBA,SAAS,CAAa,CAAC,EAAmB,EAAoB,QAAsB,CACnF,GAAI,IAAU,SACb,OAAO,EAAK,WAAa,CAAC,EAAK,UAAU,EAAI,CAAC,EAG/C,GAAI,IAAU,OACb,OAAO,EAAK,WAAa,CAAC,EAAM,EAAK,UAAU,EAAI,CAAC,CAAI,EAGzD,MAAO,CAAC,CAAI,EASN,SAAS,CAAoD,CACnE,EACA,EACiB,CACjB,IAAM,EAAW,aAAc,EAAU,EAAQ,SAAW,cAAc,EAAQ,QAC9E,EAAmB,KAEjB,EAAe,IAAgB,CACpC,IAAM,EAAQ,EAAc,EAAM,EAAQ,KAAK,EAE/C,GAAI,GAAS,IACZ,OAAO,EAAM,QAAQ,CAAC,IAAS,MAAM,KAAK,EAAK,iBAAiB,CAAQ,CAAC,CAAC,EAG3E,QAAW,KAAQ,EAAO,CACzB,IAAM,EAAQ,EAAK,cAAc,CAAQ,EACzC,GAAI,EACH,OAAO,EAIT,OAAO,MAGR,MAAO,IACF,MAAK,EAAa,CACrB,GAAI,GAAS,MAAO,CACnB,GAAI,IAAW,MAAS,GAAS,KAAO,MAAM,QAAQ,CAAM,GAAK,CAAC,EAAO,OACxE,EAAS,EAAa,EAEvB,OAAO,EAER,OAAO,EAAa,EAEtB",
8
- "debugId": "47F01602D6A0DE6664756E2164756E21",
9
- "names": []
10
- }
@@ -1,4 +0,0 @@
1
- import{u as y,w as A}from"./chunk-vpfm9yw8.js";function G(f){return(D,j)=>{let k=String(j.name),q=(b,c)=>{b[k]=c},w=(b,c={})=>{if(b[k])return!0;return A(b,f,(B)=>{q(b,B)},c)};j.addInitializer(function(){if(y(this,f,(b)=>{q(this,b)},{emitMounted:!0}))return;this.registerConnectedCallback(()=>{if(w(this,{emitMounted:!0}))return;queueMicrotask(()=>{w(this,{emitMounted:!0})})})})}}
2
- export{G as l};
3
-
4
- //# debugId=F3A04E8722B07CD364756E2164756E21
@@ -1,10 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../src/context/decorators/standard/consume-context.ts"],
4
- "sourcesContent": [
5
- "import type { RadiantElement } from '../../../core/radiant-element';\nimport { bootstrapSsrConsumedContext, connectConsumedContext } from '../../context-consumer-bootstrap';\nimport type { UnknownContext } from '../../types';\n\nexport function consumeContext(consumedContext: UnknownContext) {\n\treturn <T extends RadiantElement, V>(_: undefined, context: ClassFieldDecoratorContext<T, V>) => {\n\t\tconst contextName = String(context.name);\n\t\tconst assignContextProvider = (host: T, provider: unknown) => {\n\t\t\t(host as any)[contextName] = provider;\n\t\t};\n\t\tconst initializeConsumedContextForHost = (host: T, options: { emitMounted?: boolean } = {}) => {\n\t\t\tif ((host as any)[contextName]) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\treturn connectConsumedContext(\n\t\t\t\thost,\n\t\t\t\tconsumedContext,\n\t\t\t\t(provider) => {\n\t\t\t\t\tassignContextProvider(host, provider);\n\t\t\t\t},\n\t\t\t\toptions,\n\t\t\t);\n\t\t};\n\n\t\tcontext.addInitializer(function (this: T) {\n\t\t\tif (\n\t\t\t\tbootstrapSsrConsumedContext(\n\t\t\t\t\tthis,\n\t\t\t\t\tconsumedContext,\n\t\t\t\t\t(provider) => {\n\t\t\t\t\t\tassignContextProvider(this, provider);\n\t\t\t\t\t},\n\t\t\t\t\t{ emitMounted: true },\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.registerConnectedCallback(() => {\n\t\t\t\tif (initializeConsumedContextForHost(this, { 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(this, { emitMounted: true });\n\t\t\t\t});\n\t\t\t});\n\t\t});\n\t};\n}\n"
6
- ],
7
- "mappings": "+CAIO,SAAS,CAAc,CAAC,EAAiC,CAC/D,MAAO,CAA8B,EAAc,IAA8C,CAChG,IAAM,EAAc,OAAO,EAAQ,IAAI,EACjC,EAAwB,CAAC,EAAS,IAAsB,CAC5D,EAAa,GAAe,GAExB,EAAmC,CAAC,EAAS,EAAqC,CAAC,IAAM,CAC9F,GAAK,EAAa,GACjB,MAAO,GAGR,OAAO,EACN,EACA,EACA,CAAC,IAAa,CACb,EAAsB,EAAM,CAAQ,GAErC,CACD,GAGD,EAAQ,eAAe,QAAS,EAAU,CACzC,GACC,EACC,KACA,EACA,CAAC,IAAa,CACb,EAAsB,KAAM,CAAQ,GAErC,CAAE,YAAa,EAAK,CACrB,EAEA,OAGD,KAAK,0BAA0B,IAAM,CACpC,GAAI,EAAiC,KAAM,CAAE,YAAa,EAAK,CAAC,EAC/D,OAGD,eAAe,IAAM,CACpB,EAAiC,KAAM,CAAE,YAAa,EAAK,CAAC,EAC5D,EACD,EACD",
8
- "debugId": "F3A04E8722B07CD364756E2164756E21",
9
- "names": []
10
- }
@@ -1,4 +0,0 @@
1
- import{qb as o}from"./chunk-13ydx769.js";function d(n){return(c,u,t)=>{let i=t.value,r=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 Aa};
3
-
4
- //# debugId=AFD1D9E6D220D0D464756E2164756E21
@@ -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": "AFD1D9E6D220D0D464756E2164756E21",
9
- "names": []
10
- }
@@ -1,4 +0,0 @@
1
- class Z extends EventTarget{nodeType;static ELEMENT_NODE=1;static TEXT_NODE=3;childNodes=[];parentNode=null;constructor(j){super();this.nodeType=j}append(...j){for(let G of j)this.appendChild(typeof G==="string"?q(G):G)}appendChild(j){if("parentNode"in j&&j.parentNode&&"removeChild"in j.parentNode)j.parentNode.removeChild(j);return this.childNodes.push(j),j.parentNode=this,j}removeChild(j){let G=this.childNodes.indexOf(j);if(G===-1)return j;return this.childNodes.splice(G,1),j.parentNode=null,j}replaceChildren(...j){for(let G of this.childNodes)G.parentNode=null;this.childNodes=[],this.append(...j)}get textContent(){return this.childNodes.map((j)=>j.textContent??"").join("")}set textContent(j){this.replaceChildren(j??"")}}class y extends Z{value;constructor(j){super(Z.TEXT_NODE);this.value=j}get textContent(){return this.value}set textContent(j){this.value=j??""}}class z extends Z{attributes=new Map;fragmentHtml;fragmentText;localName;tagName;constructor(j="div"){super(Z.ELEMENT_NODE);this.localName=j.toLowerCase(),this.tagName=this.localName.toUpperCase()}hasAttribute(j){return this.attributes.has(j)}getAttribute(j){return this.attributes.get(j)??null}getAttributeNames(){return Array.from(this.attributes.keys())}setAttribute(j,G){this.fragmentHtml=void 0,this.attributes.set(j,String(G))}removeAttribute(j){this.fragmentHtml=void 0,this.attributes.delete(j)}querySelector(){return null}querySelectorAll(){return[]}matches(){return!1}get outerHTML(){if(this.fragmentHtml!==void 0)return this.fragmentHtml;let j=Array.from(this.attributes.entries()).map(([G,J])=>` ${G}="${S(J)}"`).join("");return`<${this.localName}${j}>${this.innerHTML}</${this.localName}>`}get innerHTML(){return this.childNodes.map((j)=>I(j)).join("")}set innerHTML(j){this.fragmentHtml=void 0,this.fragmentText=void 0,this.replaceChildren(...L(j))}get textContent(){return this.fragmentText??super.textContent??""}set textContent(j){this.fragmentHtml=void 0,this.fragmentText=j??"",super.textContent=j}setSerializedFragment(j,G,J){this.fragmentHtml=j,this.fragmentText=G,this.attributes=new Map(Object.entries(J)),this.replaceChildren()}}class Q{bubbles;cancelable;composed;type;constructor(j,G={}){this.type=j,this.bubbles=G.bubbles??!1,this.cancelable=G.cancelable??!1,this.composed=G.composed??!1}}class F extends Q{detail;constructor(j,G={}){super(j,G);this.detail=G.detail}}class $ extends z{isConnected=!1;constructor(j="div"){super(j)}insertAdjacentHTML(j,G){this.append(...L(G))}}class P extends ${constructor(){super("script")}}class W{definitions=new Map;define(j,G){if(this.definitions.has(j))return;this.definitions.set(j,G)}get(j){return this.definitions.get(j)}}var _;function q(j){return new y(j)}function D(){let j=globalThis,G=j.customElements;if(typeof j.Node>"u"||typeof j.Element>"u"||typeof j.HTMLElement>"u"||!G||typeof G.define!=="function"||typeof G.get!=="function")return;return j.window??{CustomEvent:j.CustomEvent??F,Element:j.Element,Event:j.Event??Q,EventTarget:j.EventTarget??EventTarget,HTMLScriptElement:j.HTMLScriptElement??j.HTMLElement,HTMLElement:j.HTMLElement,Node:j.Node,customElements:G}}function C(){let j=D();if(j)return j;return k()}function M(){return C(),{prepareHost(j,G={}){if(G.authoredContent!==void 0)j.innerHTML=G.authoredContent}}}function k(){let j=D();if(j)return j;if(_)return _;let G=new W,J=globalThis.Event??Q,K=globalThis.CustomEvent??F,O=globalThis.EventTarget??EventTarget;return _={CustomEvent:K,Element:z,Event:J,EventTarget:O,HTMLScriptElement:P,HTMLElement:$,Node:Z,customElements:G},Object.assign(globalThis,{CustomEvent:K,Element:z,Event:J,EventTarget:O,HTMLScriptElement:P,HTMLElement:$,Node:Z,customElements:G,window:_}),_}function b(j){let G=[],J=0;while(J<j.length){let K=J;if(j.startsWith("<!--",J)){let U=j.indexOf("-->",J+4);J=U===-1?j.length:U+3,G.push(j.slice(K,J));continue}if(j[J]!=="<"){let U=j.indexOf("<",J);J=U===-1?j.length:U,G.push(j.slice(K,J));continue}let O=V(j,J);if(!O){G.push(j.slice(K));break}if(O.type!=="open"||O.selfClosing||B.has(O.tagName)){J=O.end,G.push(j.slice(K,J));continue}J=O.end;let Y=1;while(J<j.length&&Y>0){let U=j.indexOf("<",J);if(U===-1){J=j.length;break}let X=V(j,U);if(!X){J=j.length;break}if(J=X.end,X.type==="comment"||X.type==="declaration")continue;if(X.type==="open"&&!X.selfClosing&&!B.has(X.tagName)){Y+=1;continue}if(X.type==="close")Y-=1}G.push(j.slice(K,J))}return G.filter((K)=>K!=="")}function H(j,G){let J=G.tagName==="script"?new P:new $(G.tagName);return J.setSerializedFragment(j,f(G.innerHtml),G.attributes),J}function S(j){return j.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function f(j){return j.replace(/<!--.*?-->/gs,"").replace(/<[^>]+>/g,"")}function N(j,G){let J;for(let K=G+1;K<j.length;K+=1){let O=j[K];if(J){if(O===J)J=void 0;continue}if(O==='"'||O==="'"){J=O;continue}if(O===">")return K+1}return j.length}function p(j){let G={},J=/([:^@A-Za-z0-9_.-]+)(?:\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s"'>/]+)))?/g;for(let K of j.matchAll(J)){let[,O,Y,U,X]=K;if(!O)continue;G[O]=Y??U??X??""}return G}function V(j,G){if(j.startsWith("<!--",G)){let A=j.indexOf("-->",G+4);return{end:A===-1?j.length:A+3,type:"comment"}}let J=N(j,G),K=j.slice(G+1,J-1).trim();if(K==="")return;if(K.startsWith("!")||K.startsWith("?"))return{end:J,type:"declaration"};if(K.startsWith("/"))return{end:J,type:"close"};let O=/\/\s*$/.test(K),Y=O?K.replace(/\/\s*$/,"").trim():K,U=Y.split(/[\s/>]/,1)[0]?.toLowerCase()??"",X=U.length,R=Y.slice(X).trim(),w=O||B.has(U)?"":v(j,G,J,U);return{attributes:p(R),end:J,innerHtml:w,selfClosing:O,tagName:U,type:"open"}}function v(j,G,J,K){let O=J,Y=1;while(O<j.length&&Y>0){let U=j.indexOf("<",O);if(U===-1)return j.slice(J);let X=V(j,U);if(!X)return j.slice(J);if(X.type==="open"&&X.tagName===K&&!X.selfClosing&&!B.has(K))Y+=1;if(X.type==="close"){if(j.slice(U+2,X.end-1).trim().toLowerCase()===K){if(Y-=1,Y===0)return j.slice(J,U)}}O=X.end}return j.slice(J)}function L(j){return b(j).map((G)=>{if(!G.startsWith("<"))return q(G);let J=V(G,0);if(!J||J.type!=="open")return q(G);return H(G,J)})}function I(j){if(j.nodeType===Z.TEXT_NODE)return j.textContent??"";return"outerHTML"in j&&typeof j.outerHTML==="string"?j.outerHTML:j.textContent??""}var B=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]);
2
- export{C as c,M as d,k as e};
3
-
4
- //# debugId=1FF05320553C515864756E2164756E21
@@ -1,10 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../src/server/light-dom-shim.ts"],
4
- "sourcesContent": [
5
- "type MinimalCustomElementRegistry = {\n\tdefine(name: string, constructor: CustomElementConstructor, options?: ElementDefinitionOptions): void;\n\tget(name: string): CustomElementConstructor | undefined;\n};\n\n/**\n * Minimal window-like runtime surface exposed by the SSR light-DOM shim.\n *\n * This is intentionally much smaller than a browser `window`; it only includes\n * the constructors and registry access that Radiant SSR currently needs.\n */\nexport type LightDomShimWindow = {\n\t/** Event constructor exposed to SSR-created components. */\n\tCustomEvent: typeof CustomEvent;\n\t/** Element constructor exposed to SSR-created components. */\n\tElement: typeof Element;\n\t/** Event constructor exposed to SSR-created components. */\n\tEvent: typeof Event;\n\t/** EventTarget constructor exposed to SSR-created components. */\n\tEventTarget: typeof EventTarget;\n\t/** HTMLScriptElement constructor used by slot projection payload parsing. */\n\tHTMLScriptElement: typeof HTMLScriptElement;\n\t/** HTMLElement constructor exposed to SSR-created components. */\n\tHTMLElement: typeof HTMLElement;\n\t/** Node constructor exposed to SSR-created components. */\n\tNode: typeof Node;\n\t/** Custom element registry used while rendering in SSR. */\n\tcustomElements: MinimalCustomElementRegistry;\n};\n\n/** Host preparation options accepted by the server render environment. */\nexport type PrepareServerRenderHostOptions = {\n\t/** Serialized light-DOM content to attach to the host before SSR. */\n\tauthoredContent?: string;\n};\n\n/** Reusable SSR environment used to prepare component hosts before rendering. */\nexport type ServerRenderEnvironment = {\n\t/** Prepares the host instance for rendering, including authored light-DOM content. */\n\tprepareHost(host: HTMLElement, options?: PrepareServerRenderHostOptions): void;\n};\n\ntype ParsedHtmlTag = {\n\tattributes: Record<string, string>;\n\tend: number;\n\tinnerHtml: string;\n\tselfClosing: boolean;\n\ttagName: string;\n\ttype: 'open';\n};\n\ntype ParsedHtmlToken =\n\t| ParsedHtmlTag\n\t| {\n\t\t\tend: number;\n\t\t\ttype: 'close';\n\t }\n\t| {\n\t\t\tend: number;\n\t\t\ttype: 'comment' | 'declaration';\n\t };\n\ntype MinimalParentNode = Node & ParentNode;\n\nclass MinimalNode extends EventTarget {\n\tstatic readonly ELEMENT_NODE = 1;\n\tstatic readonly TEXT_NODE = 3;\n\n\tpublic childNodes: Node[] = [];\n\tpublic parentNode: MinimalParentNode | null = null;\n\n\tconstructor(public readonly nodeType: number) {\n\t\tsuper();\n\t}\n\n\tappend(...nodes: Array<Node | string>): void {\n\t\tfor (const node of nodes) {\n\t\t\tthis.appendChild(typeof node === 'string' ? createTextNode(node) : node);\n\t\t}\n\t}\n\n\tappendChild<TNode extends Node>(node: TNode): TNode {\n\t\tif ('parentNode' in node && node.parentNode && 'removeChild' in node.parentNode) {\n\t\t\t(node.parentNode as Node & { removeChild(node: Node): Node }).removeChild(node);\n\t\t}\n\n\t\tthis.childNodes.push(node);\n\t\t(node as Node & { parentNode: MinimalParentNode | null }).parentNode = this as unknown as MinimalParentNode;\n\t\treturn node;\n\t}\n\n\tremoveChild<TNode extends Node>(node: TNode): TNode {\n\t\tconst nodeIndex = this.childNodes.indexOf(node);\n\n\t\tif (nodeIndex === -1) {\n\t\t\treturn node;\n\t\t}\n\n\t\tthis.childNodes.splice(nodeIndex, 1);\n\t\t(node as Node & { parentNode: MinimalParentNode | null }).parentNode = null;\n\t\treturn node;\n\t}\n\n\treplaceChildren(...nodes: Array<Node | string>): void {\n\t\tfor (const child of this.childNodes) {\n\t\t\t(child as Node & { parentNode: MinimalParentNode | null }).parentNode = null;\n\t\t}\n\n\t\tthis.childNodes = [];\n\t\tthis.append(...nodes);\n\t}\n\n\tget textContent(): string | null {\n\t\treturn this.childNodes.map((child) => child.textContent ?? '').join('');\n\t}\n\n\tset textContent(value: string | null) {\n\t\tthis.replaceChildren(value ?? '');\n\t}\n}\n\nclass MinimalTextNode extends MinimalNode {\n\tconstructor(private value: string) {\n\t\tsuper(MinimalNode.TEXT_NODE);\n\t}\n\n\toverride get textContent(): string {\n\t\treturn this.value;\n\t}\n\n\toverride set textContent(value: string | null) {\n\t\tthis.value = value ?? '';\n\t}\n}\n\nclass MinimalElement extends MinimalNode {\n\tprivate attributes = new Map<string, string>();\n\tprivate fragmentHtml?: string;\n\tprivate fragmentText?: string;\n\n\tpublic readonly localName: string;\n\tpublic readonly tagName: string;\n\n\tconstructor(tagName = 'div') {\n\t\tsuper(MinimalNode.ELEMENT_NODE);\n\t\tthis.localName = tagName.toLowerCase();\n\t\tthis.tagName = this.localName.toUpperCase();\n\t}\n\n\thasAttribute(name: string): boolean {\n\t\treturn this.attributes.has(name);\n\t}\n\n\tgetAttribute(name: string): string | null {\n\t\treturn this.attributes.get(name) ?? null;\n\t}\n\n\tgetAttributeNames(): string[] {\n\t\treturn Array.from(this.attributes.keys());\n\t}\n\n\tsetAttribute(name: string, value: unknown): void {\n\t\tthis.fragmentHtml = undefined;\n\t\tthis.attributes.set(name, String(value));\n\t}\n\n\tremoveAttribute(name: string): void {\n\t\tthis.fragmentHtml = undefined;\n\t\tthis.attributes.delete(name);\n\t}\n\n\tquerySelector(): Element | null {\n\t\treturn null;\n\t}\n\n\tquerySelectorAll(): Element[] {\n\t\treturn [];\n\t}\n\n\tmatches(): boolean {\n\t\treturn false;\n\t}\n\n\tget outerHTML(): string {\n\t\tif (this.fragmentHtml !== undefined) {\n\t\t\treturn this.fragmentHtml;\n\t\t}\n\n\t\tconst attributes = Array.from(this.attributes.entries())\n\t\t\t.map(([name, value]) => ` ${name}=\"${escapeHtmlAttribute(value)}\"`)\n\t\t\t.join('');\n\n\t\treturn `<${this.localName}${attributes}>${this.innerHTML}</${this.localName}>`;\n\t}\n\n\tget innerHTML(): string {\n\t\treturn this.childNodes.map((child) => serializeNodeHtml(child)).join('');\n\t}\n\n\tset innerHTML(html: string) {\n\t\tthis.fragmentHtml = undefined;\n\t\tthis.fragmentText = undefined;\n\t\tthis.replaceChildren(...parseHtmlToNodes(html));\n\t}\n\n\toverride get textContent(): string {\n\t\treturn this.fragmentText ?? super.textContent ?? '';\n\t}\n\n\toverride set textContent(value: string | null) {\n\t\tthis.fragmentHtml = undefined;\n\t\tthis.fragmentText = value ?? '';\n\t\tsuper.textContent = value;\n\t}\n\n\tsetSerializedFragment(fragmentHtml: string, fragmentText: string, attributes: Record<string, string>): void {\n\t\tthis.fragmentHtml = fragmentHtml;\n\t\tthis.fragmentText = fragmentText;\n\t\tthis.attributes = new Map(Object.entries(attributes));\n\t\tthis.replaceChildren();\n\t}\n}\n\nclass MinimalEvent {\n\tpublic readonly bubbles: boolean;\n\tpublic readonly cancelable: boolean;\n\tpublic readonly composed: boolean;\n\tpublic readonly type: string;\n\n\tconstructor(type: string, eventInitDict: EventInit = {}) {\n\t\tthis.type = type;\n\t\tthis.bubbles = eventInitDict.bubbles ?? false;\n\t\tthis.cancelable = eventInitDict.cancelable ?? false;\n\t\tthis.composed = eventInitDict.composed ?? false;\n\t}\n}\n\nclass MinimalCustomEvent<T = unknown> extends MinimalEvent {\n\tpublic readonly detail: T;\n\n\tconstructor(type: string, eventInitDict: CustomEventInit<T> = {}) {\n\t\tsuper(type, eventInitDict);\n\t\tthis.detail = eventInitDict.detail as T;\n\t}\n}\n\nclass MinimalHTMLElement extends MinimalElement {\n\tpublic isConnected = false;\n\n\tconstructor(tagName = 'div') {\n\t\tsuper(tagName);\n\t}\n\n\tinsertAdjacentHTML(_position: InsertPosition, html: string): void {\n\t\tthis.append(...parseHtmlToNodes(html));\n\t}\n\n\tconnectedCallback?(): void;\n\tattributeChangedCallback?(name: string, oldValue: string | null, newValue: string | null): void;\n\tdisconnectedCallback?(): void;\n}\n\nclass MinimalHtmlScriptElement extends MinimalHTMLElement {\n\tconstructor() {\n\t\tsuper('script');\n\t}\n}\n\nclass MinimalCustomElementsRegistry implements MinimalCustomElementRegistry {\n\tprivate definitions = new Map<string, CustomElementConstructor>();\n\n\tdefine(name: string, constructor: CustomElementConstructor): void {\n\t\tif (this.definitions.has(name)) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.definitions.set(name, constructor);\n\t}\n\n\tget(name: string): CustomElementConstructor | undefined {\n\t\treturn this.definitions.get(name);\n\t}\n}\n\nlet installedWindow: LightDomShimWindow | undefined;\n\nfunction createTextNode(value: string): Node {\n\treturn new MinimalTextNode(value) as unknown as Node;\n}\n\nfunction getExistingWindowLike(): LightDomShimWindow | undefined {\n\tconst globalScope = globalThis as typeof globalThis & {\n\t\tCustomEvent?: typeof CustomEvent;\n\t\tElement?: typeof Element;\n\t\tEvent?: typeof Event;\n\t\tEventTarget?: typeof EventTarget;\n\t\tHTMLScriptElement?: typeof HTMLScriptElement;\n\t\tHTMLElement?: typeof HTMLElement;\n\t\tNode?: typeof Node;\n\t\tcustomElements?: MinimalCustomElementRegistry;\n\t\twindow?: LightDomShimWindow;\n\t};\n\tconst existingCustomElements = globalScope.customElements;\n\n\tif (\n\t\ttypeof globalScope.Node === 'undefined' ||\n\t\ttypeof globalScope.Element === 'undefined' ||\n\t\ttypeof globalScope.HTMLElement === 'undefined' ||\n\t\t!existingCustomElements ||\n\t\ttypeof existingCustomElements.define !== 'function' ||\n\t\ttypeof existingCustomElements.get !== 'function'\n\t) {\n\t\treturn undefined;\n\t}\n\n\treturn (\n\t\tglobalScope.window ?? {\n\t\t\tCustomEvent: (globalScope.CustomEvent ?? MinimalCustomEvent) as typeof CustomEvent,\n\t\t\tElement: globalScope.Element,\n\t\t\tEvent: (globalScope.Event ?? MinimalEvent) as typeof Event,\n\t\t\tEventTarget: (globalScope.EventTarget ?? EventTarget) as typeof EventTarget,\n\t\t\tHTMLScriptElement: (globalScope.HTMLScriptElement ?? globalScope.HTMLElement) as typeof HTMLScriptElement,\n\t\t\tHTMLElement: globalScope.HTMLElement,\n\t\t\tNode: globalScope.Node,\n\t\t\tcustomElements: existingCustomElements,\n\t\t}\n\t);\n}\n\n/** Ensures that a minimal window-like SSR runtime is available and returns it. */\nexport function ensureLightDomShim(): LightDomShimWindow {\n\tconst existingWindow = getExistingWindowLike();\n\n\tif (existingWindow) {\n\t\treturn existingWindow;\n\t}\n\n\treturn installLightDomShim();\n}\n\n/**\n * Creates a reusable SSR environment that can prepare a component host with\n * authored light-DOM content before rendering.\n *\n * Adapters can reuse a single environment across multiple render calls when\n * they want a single host-preparation entrypoint backed by the installed shim.\n */\n\nexport function createServerRenderEnvironment(): ServerRenderEnvironment {\n\tensureLightDomShim();\n\n\treturn {\n\t\tprepareHost(host: HTMLElement, options: PrepareServerRenderHostOptions = {}): void {\n\t\t\tif (options.authoredContent !== undefined) {\n\t\t\t\thost.innerHTML = options.authoredContent;\n\t\t\t}\n\t\t},\n\t};\n}\n\n/**\n * Installs the smallest global surface needed to instantiate Radiant custom elements during SSR.\n */\nexport function installLightDomShim(): LightDomShimWindow {\n\tconst existingWindow = getExistingWindowLike();\n\n\tif (existingWindow) {\n\t\treturn existingWindow;\n\t}\n\n\tif (installedWindow) {\n\t\treturn installedWindow;\n\t}\n\n\tconst customElements = new MinimalCustomElementsRegistry();\n\tconst EventConstructor = (globalThis.Event ?? MinimalEvent) as typeof Event;\n\tconst CustomEventConstructor = (globalThis.CustomEvent ?? MinimalCustomEvent) as typeof CustomEvent;\n\tconst EventTargetConstructor = (globalThis.EventTarget ?? EventTarget) as typeof EventTarget;\n\tinstalledWindow = {\n\t\tCustomEvent: CustomEventConstructor,\n\t\tElement: MinimalElement as unknown as typeof Element,\n\t\tEvent: EventConstructor,\n\t\tEventTarget: EventTargetConstructor,\n\t\tHTMLScriptElement: MinimalHtmlScriptElement as unknown as typeof HTMLScriptElement,\n\t\tHTMLElement: MinimalHTMLElement as unknown as typeof HTMLElement,\n\t\tNode: MinimalNode as unknown as typeof Node,\n\t\tcustomElements,\n\t};\n\n\tObject.assign(globalThis, {\n\t\tCustomEvent: CustomEventConstructor,\n\t\tElement: MinimalElement,\n\t\tEvent: EventConstructor,\n\t\tEventTarget: EventTargetConstructor,\n\t\tHTMLScriptElement: MinimalHtmlScriptElement,\n\t\tHTMLElement: MinimalHTMLElement,\n\t\tNode: MinimalNode,\n\t\tcustomElements,\n\t\twindow: installedWindow,\n\t});\n\n\treturn installedWindow;\n}\n\nfunction collectTopLevelHtmlFragments(html: string): string[] {\n\tconst fragments: string[] = [];\n\tlet index = 0;\n\n\twhile (index < html.length) {\n\t\tconst fragmentStart = index;\n\n\t\tif (html.startsWith('<!--', index)) {\n\t\t\tconst commentEnd = html.indexOf('-->', index + 4);\n\t\t\tindex = commentEnd === -1 ? html.length : commentEnd + 3;\n\t\t\tfragments.push(html.slice(fragmentStart, index));\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (html[index] !== '<') {\n\t\t\tconst nextTagIndex = html.indexOf('<', index);\n\t\t\tindex = nextTagIndex === -1 ? html.length : nextTagIndex;\n\t\t\tfragments.push(html.slice(fragmentStart, index));\n\t\t\tcontinue;\n\t\t}\n\n\t\tconst token = parseHtmlTagToken(html, index);\n\n\t\tif (!token) {\n\t\t\tfragments.push(html.slice(fragmentStart));\n\t\t\tbreak;\n\t\t}\n\n\t\tif (token.type !== 'open' || token.selfClosing || voidElementNames.has(token.tagName)) {\n\t\t\tindex = token.end;\n\t\t\tfragments.push(html.slice(fragmentStart, index));\n\t\t\tcontinue;\n\t\t}\n\n\t\tindex = token.end;\n\t\tlet depth = 1;\n\n\t\twhile (index < html.length && depth > 0) {\n\t\t\tconst nextTagIndex = html.indexOf('<', index);\n\n\t\t\tif (nextTagIndex === -1) {\n\t\t\t\tindex = html.length;\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tconst nestedToken = parseHtmlTagToken(html, nextTagIndex);\n\n\t\t\tif (!nestedToken) {\n\t\t\t\tindex = html.length;\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tindex = nestedToken.end;\n\n\t\t\tif (nestedToken.type === 'comment' || nestedToken.type === 'declaration') {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (nestedToken.type === 'open' && !nestedToken.selfClosing && !voidElementNames.has(nestedToken.tagName)) {\n\t\t\t\tdepth += 1;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (nestedToken.type === 'close') {\n\t\t\t\tdepth -= 1;\n\t\t\t}\n\t\t}\n\n\t\tfragments.push(html.slice(fragmentStart, index));\n\t}\n\n\treturn fragments.filter((fragment) => fragment !== '');\n}\n\nfunction createElementFromFragment(fragment: string, tag: ParsedHtmlTag): Node {\n\tconst element =\n\t\ttag.tagName === 'script'\n\t\t\t? (new MinimalHtmlScriptElement() as MinimalElement)\n\t\t\t: new MinimalHTMLElement(tag.tagName);\n\n\telement.setSerializedFragment(fragment, extractTextContent(tag.innerHtml), tag.attributes);\n\treturn element as unknown as Node;\n}\n\nfunction escapeHtmlAttribute(value: string): string {\n\treturn value.replace(/&/g, '&amp;').replace(/\"/g, '&quot;').replace(/</g, '&lt;').replace(/>/g, '&gt;');\n}\n\nfunction extractTextContent(html: string): string {\n\treturn html.replace(/<!--.*?-->/gs, '').replace(/<[^>]+>/g, '');\n}\n\nfunction findHtmlTagEnd(html: string, startIndex: number): number {\n\tlet quote: '\"' | \"'\" | undefined;\n\n\tfor (let index = startIndex + 1; index < html.length; index += 1) {\n\t\tconst character = html[index];\n\n\t\tif (quote) {\n\t\t\tif (character === quote) {\n\t\t\t\tquote = undefined;\n\t\t\t}\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (character === '\"' || character === \"'\") {\n\t\t\tquote = character;\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (character === '>') {\n\t\t\treturn index + 1;\n\t\t}\n\t}\n\n\treturn html.length;\n}\n\nfunction parseAttributes(rawAttributes: string): Record<string, string> {\n\tconst attributes: Record<string, string> = {};\n\tconst attributePattern = /([:^@A-Za-z0-9_.-]+)(?:\\s*=\\s*(?:\"([^\"]*)\"|'([^']*)'|([^\\s\"'>/]+)))?/g;\n\n\tfor (const match of rawAttributes.matchAll(attributePattern)) {\n\t\tconst [, name, doubleQuoted, singleQuoted, bareValue] = match;\n\n\t\tif (!name) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tattributes[name] = doubleQuoted ?? singleQuoted ?? bareValue ?? '';\n\t}\n\n\treturn attributes;\n}\n\nfunction parseHtmlTagToken(html: string, startIndex: number): ParsedHtmlToken | undefined {\n\tif (html.startsWith('<!--', startIndex)) {\n\t\tconst endIndex = html.indexOf('-->', startIndex + 4);\n\t\treturn {\n\t\t\tend: endIndex === -1 ? html.length : endIndex + 3,\n\t\t\ttype: 'comment',\n\t\t};\n\t}\n\n\tconst endIndex = findHtmlTagEnd(html, startIndex);\n\tconst rawToken = html.slice(startIndex + 1, endIndex - 1).trim();\n\n\tif (rawToken === '') {\n\t\treturn undefined;\n\t}\n\n\tif (rawToken.startsWith('!') || rawToken.startsWith('?')) {\n\t\treturn {\n\t\t\tend: endIndex,\n\t\t\ttype: 'declaration',\n\t\t};\n\t}\n\n\tif (rawToken.startsWith('/')) {\n\t\treturn {\n\t\t\tend: endIndex,\n\t\t\ttype: 'close',\n\t\t};\n\t}\n\n\tconst selfClosing = /\\/\\s*$/.test(rawToken);\n\tconst tagBody = selfClosing ? rawToken.replace(/\\/\\s*$/, '').trim() : rawToken;\n\tconst tagName = tagBody.split(/[\\s/>]/, 1)[0]?.toLowerCase() ?? '';\n\tconst attributesStart = tagName.length;\n\tconst rawAttributes = tagBody.slice(attributesStart).trim();\n\tconst innerHtml =\n\t\tselfClosing || voidElementNames.has(tagName)\n\t\t\t? ''\n\t\t\t: extractInnerHtmlFragment(html, startIndex, endIndex, tagName);\n\n\treturn {\n\t\tattributes: parseAttributes(rawAttributes),\n\t\tend: endIndex,\n\t\tinnerHtml,\n\t\tselfClosing,\n\t\ttagName,\n\t\ttype: 'open',\n\t};\n}\n\nfunction extractInnerHtmlFragment(html: string, startIndex: number, tagEndIndex: number, tagName: string): string {\n\tlet index = tagEndIndex;\n\tlet depth = 1;\n\n\twhile (index < html.length && depth > 0) {\n\t\tconst nextTagIndex = html.indexOf('<', index);\n\n\t\tif (nextTagIndex === -1) {\n\t\t\treturn html.slice(tagEndIndex);\n\t\t}\n\n\t\tconst nextTag = parseHtmlTagToken(html, nextTagIndex);\n\n\t\tif (!nextTag) {\n\t\t\treturn html.slice(tagEndIndex);\n\t\t}\n\n\t\tif (\n\t\t\tnextTag.type === 'open' &&\n\t\t\tnextTag.tagName === tagName &&\n\t\t\t!nextTag.selfClosing &&\n\t\t\t!voidElementNames.has(tagName)\n\t\t) {\n\t\t\tdepth += 1;\n\t\t}\n\n\t\tif (nextTag.type === 'close') {\n\t\t\tconst closingName = html\n\t\t\t\t.slice(nextTagIndex + 2, nextTag.end - 1)\n\t\t\t\t.trim()\n\t\t\t\t.toLowerCase();\n\n\t\t\tif (closingName === tagName) {\n\t\t\t\tdepth -= 1;\n\n\t\t\t\tif (depth === 0) {\n\t\t\t\t\treturn html.slice(tagEndIndex, nextTagIndex);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tindex = nextTag.end;\n\t}\n\n\treturn html.slice(tagEndIndex);\n}\n\nfunction parseHtmlToNodes(html: string): Node[] {\n\treturn collectTopLevelHtmlFragments(html).map((fragment) => {\n\t\tif (!fragment.startsWith('<')) {\n\t\t\treturn createTextNode(fragment);\n\t\t}\n\n\t\tconst tag = parseHtmlTagToken(fragment, 0);\n\n\t\tif (!tag || tag.type !== 'open') {\n\t\t\treturn createTextNode(fragment);\n\t\t}\n\n\t\treturn createElementFromFragment(fragment, tag);\n\t});\n}\n\nfunction serializeNodeHtml(node: Node): string {\n\tif (node.nodeType === MinimalNode.TEXT_NODE) {\n\t\treturn node.textContent ?? '';\n\t}\n\n\treturn 'outerHTML' in node && typeof node.outerHTML === 'string' ? node.outerHTML : (node.textContent ?? '');\n}\n\nconst voidElementNames = new Set([\n\t'area',\n\t'base',\n\t'br',\n\t'col',\n\t'embed',\n\t'hr',\n\t'img',\n\t'input',\n\t'link',\n\t'meta',\n\t'param',\n\t'source',\n\t'track',\n\t'wbr',\n]);\n"
6
- ],
7
- "mappings": "AAgEA,MAAM,UAAoB,WAAY,CAOT,eANZ,cAAe,QACf,WAAY,EAErB,WAAqB,CAAC,EACtB,WAAuC,KAE9C,WAAW,CAAiB,EAAkB,CAC7C,MAAM,EADqB,gBAI5B,MAAM,IAAI,EAAmC,CAC5C,QAAW,KAAQ,EAClB,KAAK,YAAY,OAAO,IAAS,SAAW,EAAe,CAAI,EAAI,CAAI,EAIzE,WAA+B,CAAC,EAAoB,CACnD,GAAI,eAAgB,GAAQ,EAAK,YAAc,gBAAiB,EAAK,WACnE,EAAK,WAAwD,YAAY,CAAI,EAK/E,OAFA,KAAK,WAAW,KAAK,CAAI,EACxB,EAAyD,WAAa,KAChE,EAGR,WAA+B,CAAC,EAAoB,CACnD,IAAM,EAAY,KAAK,WAAW,QAAQ,CAAI,EAE9C,GAAI,IAAc,GACjB,OAAO,EAKR,OAFA,KAAK,WAAW,OAAO,EAAW,CAAC,EAClC,EAAyD,WAAa,KAChE,EAGR,eAAe,IAAI,EAAmC,CACrD,QAAW,KAAS,KAAK,WACvB,EAA0D,WAAa,KAGzE,KAAK,WAAa,CAAC,EACnB,KAAK,OAAO,GAAG,CAAK,KAGjB,YAAW,EAAkB,CAChC,OAAO,KAAK,WAAW,I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C,EACvC,KAAK,EACL,YAAY,IAEM,GAGnB,GAFA,GAAS,EAEL,IAAU,EACb,OAAO,EAAK,MAAM,EAAa,CAAY,GAK9C,EAAQ,EAAQ,IAGjB,OAAO,EAAK,MAAM,CAAW,EAG9B,SAAS,CAAgB,CAAC,EAAsB,CAC/C,OAAO,EAA6B,CAAI,EAAE,IAAI,CAAC,IAAa,CAC3D,GAAI,CAAC,EAAS,WAAW,GAAG,EAC3B,OAAO,EAAe,CAAQ,EAG/B,IAAM,EAAM,EAAkB,EAAU,CAAC,EAEzC,GAAI,CAAC,GAAO,EAAI,OAAS,OACxB,OAAO,EAAe,CAAQ,EAG/B,OAAO,EAA0B,EAAU,CAAG,EAC9C,EAGF,SAAS,CAAiB,CAAC,EAAoB,CAC9C,GAAI,EAAK,WAAa,EAAY,UACjC,OAAO,EAAK,aAAe,GAG5B,MAAO,cAAe,GAAQ,OAAO,EAAK,YAAc,SAAW,EAAK,UAAa,EAAK,aAAe,GAG1G,IAAM,EAAmB,IAAI,IAAI,CAChC,OACA,OACA,KACA,MACA,QACA,KACA,MACA,QACA,OACA,OACA,QACA,SACA,QACA,KACD,CAAC",
8
- "debugId": "1FF05320553C515864756E2164756E21",
9
- "names": []
10
- }
@@ -1,4 +0,0 @@
1
- import{E as I}from"./chunk-1w1dm68j.js";import{V as U,W as Y}from"./chunk-6kdxrppw.js";import{lb as K,mb as Q}from"./chunk-ksv01cey.js";import{createMarkupNodeLike as _}from"@ecopages/jsx";class ${host;context;hydrationKey;hydrate;serialize;pendingHostHydration;value;subscriptions=[];constructor(q,A){this.host=q,this.context=A.context,this.hydrationKey=A.hydrationKey,this.hydrate=A.hydrate,this.serialize=A.serialize,this.pendingHostHydration=Boolean(A.hydrate),this.value=A.initialValue,this.tryHydrateFromHost(),this.registerEvents(),this.host.dispatchEvent(new I(this.context))}setContext=(q,A)=>{if(this.tryHydrateFromHost(),this.pendingHostHydration=!1,typeof this.value>"u"&&this.isObject(q)){let B=this.value;if(this.value={...q},A)A(this.value);this.notifySubscribers(this.value,B);return}if(this.isObject(this.value)&&this.isObject(q)){let B={...this.value};if(this.value={...this.value,...q},A)A(this.value);this.notifySubscribers(this.value,B)}};getContext=()=>{return this.tryHydrateFromHost(),this.value};getContextKey=()=>{return this.context};serializeHydrationValue=()=>{if(this.tryHydrateFromHost(),!this.hydrate||typeof this.value>"u")return;let q=this.serialize?this.serialize(this.value):this.value;if(typeof q>"u")return;let A=JSON.stringify(q);if(typeof A!=="string")return;return Y(A)};renderHydrationScriptTag=()=>{let q=this.serializeHydrationValue();if(!q)return;return U({hydrationKey:this.hydrationKey,serializedValue:q})};renderHydrationScript=()=>{let q=this.renderHydrationScriptTag();if(!q)return;return _(q)};subscribe=({select:q,callback:A})=>{this.subscriptions.push({select:q,callback:A})};tryHydrateFromHost(){if(!this.pendingHostHydration)return;let q=this.findHydrationScriptElement();if(!q)return;this.value=this.mergeHydrationValue(K(q,this.value)),this.pendingHostHydration=!1}mergeHydrationValue(q){if(this.hydrate===Object&&this.isObject(q)&&(this.isObject(this.value)||typeof this.value>"u"))return{...this.value??{},...q};return q}isObject(q){return typeof q==="object"&&!Array.isArray(q)&&q!==null}findHydrationScriptElement(){return Q(this.host,"context",this.hydrationKey)}notifySubscribers=(q,A)=>{for(let B of this.subscriptions){if(!B.select||typeof A>"u"){this.sendSubscriptionUpdate(B,q);continue}let F=B.select(q),G=B.select(A);if(F!==G)this.sendSubscriptionUpdate(B,q)}};sendSubscriptionUpdate=({select:q,callback:A},B)=>{if(!q)A(B);else A(q(B))};handleSubscriptionRequest=({select:q,callback:A,subscribe:B})=>{if(this.tryHydrateFromHost(),B)this.subscribe({select:q,callback:A});if(typeof this.value>"u")return;if(q)A(q(this.value));else A(this.value)};onSubscriptionRequest=(q)=>{let{context:A,callback:B,subscribe:F,select:G,target:Z}=q;if(A!==this.context)return;q.stopPropagation(),Z.dispatchEvent(new I(this.context)),this.handleSubscriptionRequest({select:G,callback:B,subscribe:F})};onContextRequest=(q)=>{let{context:A,callback:B}=q;if(A!==this.context)return;q.stopPropagation(),B(this)};registerEvents=()=>{this.host.addEventListener("context-subscription-request",this.onSubscriptionRequest),this.host.addEventListener("context-request",this.onContextRequest)}}
2
- export{$ as o};
3
-
4
- //# debugId=12954678E1A01CDC64756E2164756E21
@@ -1,10 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../src/context/context-provider.ts"],
4
- "sourcesContent": [
5
- "import { createMarkupNodeLike, type JsxRenderable } from '@ecopages/jsx';\nimport type { RadiantElement } from '../core/radiant-element';\nimport type { SsrSerializableHydrationBinding } from '../core/ssr-hydration-binding';\nimport type { AttributeTypeConstant } from '../utils/attribute-utils';\nimport {\n\tContextEventsTypes,\n\tContextOnMountEvent,\n\ttype ContextRequestEvent,\n\ttype ContextSubscription,\n\ttype ContextSubscriptionRequestEvent,\n} from './events';\nimport { findHydrationScript, parseHydrationPayload } from '../core/hydration-codec';\nimport { createContextHydrationScriptTag, escapeContextHydrationJson } from './hydration-script';\nimport type { Context, ContextType, UnknownContext } from './types';\n\ntype ContextProviderOptions<T extends UnknownContext> = {\n\tcontext: UnknownContext;\n\thydrationKey?: string;\n\tinitialValue?: T['__context__'];\n\thydrate?: AttributeTypeConstant;\n\tserialize?: (value: ContextType<T>) => unknown;\n};\n\nexport interface SsrSerializableContextProvider extends SsrSerializableHydrationBinding {\n\t/** Returns the current context payload that should be visible to descendants. */\n\tgetContext(): unknown;\n\t/** Returns the context token used to match nested SSR consumers and providers. */\n\tgetContextKey(): UnknownContext;\n}\n\n/**\n * Represents a context provider that allows setting and getting the context,\n * as well as subscribing to context updates.\n *\n * @template T - The type of the context.\n */\nexport interface IContextProvider<T extends Context<unknown, unknown>> {\n\t/**\n\t * Sets the context with the provided update and invokes the optional callback function.\n\t *\n\t * @param update - The partial update to be applied to the context.\n\t * @param callback - An optional callback function that receives the updated context.\n\t */\n\tsetContext: (update: Partial<ContextType<T>>, callback?: (context: ContextType<T>) => void) => void;\n\n\t/**\n\t * Gets the current context.\n\t *\n\t * @returns The current context.\n\t */\n\tgetContext: () => ContextType<T>;\n\n\t/**\n\t * Subscribes to context updates.\n\t *\n\t * @param subscription - The subscription object that defines the callback function to be invoked on context updates.\n\t */\n\tsubscribe: (subscription: ContextSubscription<T>) => void;\n}\n\n/**\n * It creates a context provider that allows setting and getting the context,\n * It will also be in charge of notifying the subscribers when the context changes.\n *\n * @template T - The type of the context.\n * @implements IContextProvider\n *\n * @example\n * ```ts\n * export class MyElement extends RadiantElement {\n * provider = new ContextProvider<typeof myContext>(this, {\n * context: myContext,\n * initialValue: {\n * value: 'Hello World',\n * },\n * });\n * ```\n */\nexport class ContextProvider<T extends Context<unknown, unknown>>\n\timplements IContextProvider<T>, SsrSerializableContextProvider\n{\n\tprivate host: RadiantElement;\n\tprivate context: UnknownContext;\n\tprivate hydrationKey?: string;\n\tprivate hydrate?: AttributeTypeConstant;\n\tprivate serialize?: (value: ContextType<T>) => unknown;\n\tprivate pendingHostHydration: boolean;\n\tprivate value: ContextType<T> | undefined;\n\n\tsubscriptions: ContextSubscription<T>[] = [];\n\n\t/**\n\t * Creates a new instance of the ContextProvider.\n\t *\n\t * @param host - The host element that will contain the context provider.\n\t * @param options - The options to configure the context provider.\n\t */\n\tconstructor(host: RadiantElement, options: ContextProviderOptions<T>) {\n\t\tthis.host = host;\n\t\tthis.context = options.context;\n\t\tthis.hydrationKey = options.hydrationKey;\n\t\tthis.hydrate = options.hydrate;\n\t\tthis.serialize = options.serialize;\n\t\tthis.pendingHostHydration = Boolean(options.hydrate);\n\t\tthis.value = options.initialValue as ContextType<T>;\n\t\tthis.tryHydrateFromHost();\n\n\t\tthis.registerEvents();\n\t\tthis.host.dispatchEvent(new ContextOnMountEvent(this.context));\n\t}\n\n\tsetContext = (update: Partial<ContextType<T>>, callback?: (context: ContextType<T>) => void) => {\n\t\tthis.tryHydrateFromHost();\n\t\tthis.pendingHostHydration = false;\n\n\t\tif (typeof this.value === 'undefined' && this.isObject(update)) {\n\t\t\tconst oldContext = this.value;\n\t\t\tthis.value = { ...update } as ContextType<T>;\n\t\t\tif (callback) callback(this.value);\n\t\t\tthis.notifySubscribers(this.value, oldContext);\n\t\t\treturn;\n\t\t}\n\n\t\tif (this.isObject(this.value) && this.isObject(update)) {\n\t\t\tconst oldContext = { ...this.value };\n\t\t\tthis.value = { ...this.value, ...update };\n\t\t\tif (callback) callback(this.value);\n\t\t\tthis.notifySubscribers(this.value, oldContext);\n\t\t}\n\t};\n\n\tgetContext = () => {\n\t\tthis.tryHydrateFromHost();\n\t\treturn this.value as ContextType<T>;\n\t};\n\n\t/**\n\t * Returns the provider's logical context token.\n\t *\n\t * SSR helpers use this token to resolve the closest matching provider while a\n\t * host subtree is being serialized.\n\t */\n\tgetContextKey = () => {\n\t\treturn this.context;\n\t};\n\n\t/**\n\t * Serializes the current provider value for inclusion in a hydration script.\n\t *\n\t * The serialized payload is JSON-escaped so it can be embedded safely inside a\n\t * `<script type=\"application/json\">` tag.\n\t */\n\tserializeHydrationValue = (): string | undefined => {\n\t\tthis.tryHydrateFromHost();\n\n\t\tif (!this.hydrate || typeof this.value === 'undefined') {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst hydrationValue = this.serialize ? this.serialize(this.value) : this.value;\n\n\t\tif (typeof hydrationValue === 'undefined') {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst serializedValue = JSON.stringify(hydrationValue);\n\n\t\tif (typeof serializedValue !== 'string') {\n\t\t\treturn undefined;\n\t\t}\n\n\t\treturn escapeContextHydrationJson(serializedValue);\n\t};\n\n\t/**\n\t * Builds the raw HTML hydration script for this provider.\n\t *\n\t * When `hydrationKey` is present, the marker is scoped so sibling or nested\n\t * providers can recover their own payloads without accidentally reading a\n\t * descendant script.\n\t */\n\trenderHydrationScriptTag = (): string | undefined => {\n\t\tconst serializedValue = this.serializeHydrationValue();\n\n\t\tif (!serializedValue) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\treturn createContextHydrationScriptTag({\n\t\t\thydrationKey: this.hydrationKey,\n\t\t\tserializedValue,\n\t\t});\n\t};\n\n\t/**\n\t * Wraps the provider hydration script in a minimal JSX node-like value.\n\t *\n\t * This lets JSX-based host renderers append the script without needing a real\n\t * DOM element instance during SSR.\n\t */\n\trenderHydrationScript = (): JsxRenderable | undefined => {\n\t\tconst outerHTML = this.renderHydrationScriptTag();\n\n\t\tif (!outerHTML) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\treturn createMarkupNodeLike(outerHTML);\n\t};\n\n\tsubscribe = ({ select, callback }: ContextSubscription<T>) => {\n\t\tthis.subscriptions.push({ select, callback });\n\t};\n\n\tprivate tryHydrateFromHost(): void {\n\t\tif (!this.pendingHostHydration) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst hydrationScriptElement = this.findHydrationScriptElement();\n\n\t\tif (!hydrationScriptElement) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.value = this.mergeHydrationValue(\n\t\t\tparseHydrationPayload(hydrationScriptElement, this.value) as ContextType<T>,\n\t\t);\n\t\tthis.pendingHostHydration = false;\n\t}\n\n\tprivate mergeHydrationValue(parsedHydrationValue: ContextType<T>): ContextType<T> {\n\t\tif (\n\t\t\tthis.hydrate === Object &&\n\t\t\tthis.isObject(parsedHydrationValue) &&\n\t\t\t(this.isObject(this.value) || typeof this.value === 'undefined')\n\t\t) {\n\t\t\treturn {\n\t\t\t\t...(this.value ?? {}),\n\t\t\t\t...parsedHydrationValue,\n\t\t\t} as ContextType<T>;\n\t\t}\n\n\t\treturn parsedHydrationValue;\n\t}\n\n\tprivate isObject(value: unknown): value is Record<string, unknown> {\n\t\treturn typeof value === 'object' && !Array.isArray(value) && value !== null;\n\t}\n\n\tprivate findHydrationScriptElement(): Element | null {\n\t\treturn findHydrationScript(this.host as Element, 'context', this.hydrationKey);\n\t}\n\n\tprivate notifySubscribers = (newContext: ContextType<T>, prevContext: ContextType<T> | undefined) => {\n\t\tfor (const sub of this.subscriptions) {\n\t\t\tif (!sub.select || typeof prevContext === 'undefined') {\n\t\t\t\tthis.sendSubscriptionUpdate(sub, newContext);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst newSelected = sub.select(newContext);\n\t\t\tconst prevSelected = sub.select(prevContext);\n\t\t\tif (newSelected !== prevSelected) {\n\t\t\t\tthis.sendSubscriptionUpdate(sub, newContext);\n\t\t\t}\n\t\t}\n\t};\n\n\tprivate sendSubscriptionUpdate = ({ select, callback }: ContextSubscription<T>, context: ContextType<T>) => {\n\t\tif (!select) callback(context);\n\t\telse callback(select(context));\n\t};\n\n\tprivate handleSubscriptionRequest = ({\n\t\tselect,\n\t\tcallback,\n\t\tsubscribe,\n\t}: {\n\t\tselect?: ContextSubscription<T>['select'];\n\t\tcallback: ContextSubscription<T>['callback'];\n\t\tsubscribe?: boolean;\n\t}) => {\n\t\tthis.tryHydrateFromHost();\n\n\t\tif (subscribe) this.subscribe({ select, callback });\n\n\t\tif (typeof this.value === 'undefined') return;\n\n\t\tif (select) {\n\t\t\tcallback(select(this.value));\n\t\t} else {\n\t\t\tcallback(this.value as ContextType<T>);\n\t\t}\n\t};\n\n\tprivate onSubscriptionRequest = (event: ContextSubscriptionRequestEvent<UnknownContext>) => {\n\t\tconst { context, callback, subscribe, select, target } = event;\n\t\tif (context !== this.context) return;\n\n\t\tevent.stopPropagation();\n\n\t\t(target as HTMLElement).dispatchEvent(new ContextOnMountEvent(this.context));\n\n\t\tthis.handleSubscriptionRequest({ select, callback, subscribe });\n\t};\n\n\tprivate onContextRequest = (event: ContextRequestEvent<UnknownContext>) => {\n\t\tconst { context, callback } = event;\n\t\tif (context !== this.context) return;\n\t\tevent.stopPropagation();\n\t\tcallback(this);\n\t};\n\n\tprivate registerEvents = () => {\n\t\tthis.host.addEventListener(ContextEventsTypes.SUBSCRIPTION_REQUEST, this.onSubscriptionRequest);\n\t\tthis.host.addEventListener(ContextEventsTypes.CONTEXT_REQUEST, this.onContextRequest);\n\t};\n}\n"
6
- ],
7
- "mappings": "oJAAA,yBAAS,gB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C3G,GAAI,CAAC,EAAQ,EAAS,CAAO,EACxB,OAAS,EAAO,CAAO,CAAC,GAGtB,0BAA4B,EACnC,SACA,WACA,eAKK,CAGL,GAFA,KAAK,mBAAmB,EAEpB,EAAW,KAAK,UAAU,CAAE,SAAQ,UAAS,CAAC,EAElD,GAAI,OAAO,KAAK,MAAU,IAAa,OAEvC,GAAI,EACH,EAAS,EAAO,KAAK,KAAK,CAAC,EAE3B,OAAS,KAAK,KAAuB,GAI/B,sBAAwB,CAAC,IAA2D,CAC3F,IAAQ,UAAS,WAAU,YAAW,SAAQ,UAAW,EACzD,GAAI,IAAY,KAAK,QAAS,OAE9B,EAAM,gBAAgB,EAErB,EAAuB,cAAc,IAAI,EAAoB,KAAK,OAAO,CAAC,EAE3E,KAAK,0BAA0B,CAAE,SAAQ,WAAU,WAAU,CAAC,GAGvD,iBAAmB,CAAC,IAA+C,CAC1E,IAAQ,UAAS,YAAa,EAC9B,GAAI,IAAY,KAAK,QAAS,OAC9B,EAAM,gBAAgB,EACtB,EAAS,IAAI,GAGN,eAAiB,IAAM,CAC9B,KAAK,KAAK,gDAA0D,KAAK,qBAAqB,EAC9F,KAAK,KAAK,mCAAqD,KAAK,gBAAgB,EAEtF",
8
- "debugId": "12954678E1A01CDC64756E2164756E21",
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{ob as q}from"./chunk-42tyhfvh.js";function G(z){return function(B,j){j.addInitializer(function(){let A=q(this,z);Object.defineProperty(this,j.name,{get(){return A},enumerable:!0,configurable:!0})})}}
2
- export{G as pa};
3
-
4
- //# debugId=EFCF60DE04E1548464756E2164756E21
@@ -1,10 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../src/decorators/standard/event.ts"],
4
- "sourcesContent": [
5
- "import type { RadiantElement } from '../../core/radiant-element';\nimport { createEvent } from '../../helpers/create-event';\nimport type { EventEmitterConfig } from '../../tools/event-emitter';\n\n/**\n * Decorator that attaches an EventEmitter to the class field property.\n * The EventEmitter can be used to dispatch custom events from the target element.\n * @param eventConfig Configuration for the event emitter.\n * @see {@link EventEmitter} for more details about how the EventEmitter works.\n */\nexport function event(eventConfig: EventEmitterConfig) {\n\treturn function <T extends RadiantElement, V>(_: undefined, context: ClassFieldDecoratorContext<T, V>) {\n\t\tcontext.addInitializer(function (this: T) {\n\t\t\tconst emitter = createEvent(this, eventConfig);\n\n\t\t\tObject.defineProperty(this, context.name, {\n\t\t\t\tget() {\n\t\t\t\t\treturn emitter;\n\t\t\t\t},\n\t\t\t\tenumerable: true,\n\t\t\t\tconfigurable: true,\n\t\t\t});\n\t\t});\n\t};\n}\n"
6
- ],
7
- "mappings": "yCAUO,SAAS,CAAK,CAAC,EAAiC,CACtD,OAAO,QAAsC,CAAC,EAAc,EAA2C,CACtG,EAAQ,eAAe,QAAS,EAAU,CACzC,IAAM,EAAU,EAAY,KAAM,CAAW,EAE7C,OAAO,eAAe,KAAM,EAAQ,KAAM,CACzC,GAAG,EAAG,CACL,OAAO,GAER,WAAY,GACZ,aAAc,EACf,CAAC,EACD",
8
- "debugId": "EFCF60DE04E1548464756E2164756E21",
9
- "names": []
10
- }
@@ -1,4 +0,0 @@
1
- import{nb as j}from"./chunk-8n2dhx28.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 gb,w as hb,V as ib,W as jb,P as kb,C as lb,S as mb};
3
-
4
- //# debugId=C37C424DD167983864756E2164756E21
@@ -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": "C37C424DD167983864756E2164756E21",
9
- "names": []
10
- }
@@ -1,4 +0,0 @@
1
- function x(j,q){return j.bind(q)}
2
- export{x as S};
3
-
4
- //# debugId=4569DB012D4E9E6A64756E2164756E21
@@ -1,10 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../src/core/reactive-jsx-value.ts"],
4
- "sourcesContent": [
5
- "import type { SubscribableJsxValue } from '@ecopages/jsx';\nimport type { RadiantElement, ReactiveBindingValue } from './radiant-element';\n\n/**\n * Creates a stable JSX child binding backed by a Radiant reactive property or field.\n *\n * The returned value resolves eagerly on the server and subscribes to the host's\n * update callbacks on the client so the mounted child range can patch directly\n * when the selected property changes.\n */\nexport function bindReactiveValue<\n\tBindings extends object,\n\tHost extends RadiantElement<Bindings>,\n\tProperty extends Extract<keyof Bindings, string>,\n>(host: Host, property: Property): SubscribableJsxValue<ReactiveBindingValue<Bindings, Property>> {\n\treturn host.bind(property);\n}\n"
6
- ],
7
- "mappings": "AAUO,SAAS,CAIf,CAAC,EAAY,EAAoF,CACjG,OAAO,EAAK,KAAK,CAAQ",
8
- "debugId": "4569DB012D4E9E6A64756E2164756E21",
9
- "names": []
10
- }
@@ -1,4 +0,0 @@
1
- import{Aa as k}from"./chunk-hn4j8rt5.js";import{Ba as q}from"./chunk-8vak8w5w.js";import{Oa as j}from"./chunk-nerd6fmg.js";function H(f){return function(v,w,z){return j(q(f),k(f),v,w,z)}}
2
- export{H as za};
3
-
4
- //# debugId=E2D6A5F7A4F8500164756E2164756E21
@@ -1,10 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../src/decorators/debounce.ts"],
4
- "sourcesContent": [
5
- "import type { StandardOrLegacyMethodDecoratorArgs } from '../types';\nimport { debounce as legacyDebounce } from './legacy/debounce';\nimport { debounce as standardDebounce } from './standard/debounce';\nimport { methodDecoratorBridge } from './bridge';\n\n/**\n * A decorator to debounce a method.\n * @param timeout The debounce timeout in milliseconds.\n */\nexport function debounce(timeout: number) {\n\treturn function (\n\t\tprotoOrTarget: StandardOrLegacyMethodDecoratorArgs['protoOrTarget'],\n\t\tnameOrContext: StandardOrLegacyMethodDecoratorArgs['nameOrContext'],\n\t\tdescriptor?: StandardOrLegacyMethodDecoratorArgs['descriptor'],\n\t): any {\n\t\treturn methodDecoratorBridge(\n\t\t\tstandardDebounce(timeout),\n\t\t\tlegacyDebounce(timeout),\n\t\t\tprotoOrTarget,\n\t\t\tnameOrContext,\n\t\t\tdescriptor,\n\t\t);\n\t};\n}\n"
6
- ],
7
- "mappings": "uIASO,GAAS,LAAQ,CAAC,EAAiB,CACzC,OAAO,QAAS,CACf,EACA,EACA,EACM,CACN,OAAO,EACN,EAAiB,CAAO,EACxB,EAAe,CAAO,EACtB,EACA,EACA,CACD",
8
- "debugId": "E2D6A5F7A4F8500164756E2164756E21",
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 Wa,n as Xa,s as Ya};
3
-
4
- //# debugId=F8D5F842D8F7D14264756E2164756E21
@@ -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": "F8D5F842D8F7D14264756E2164756E21",
9
- "names": []
10
- }
@@ -1,4 +0,0 @@
1
- function d(t,a,e,r){if(typeof r==="object")return t(e,r);return a(e,r)}function c(t,a,e,r,o){if(typeof r==="object")return t(e,r);return a(e,r,o)}
2
- export{d as Na,c as Oa};
3
-
4
- //# debugId=D5F8FA4A7E28826464756E2164756E21
@@ -1,10 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../src/decorators/bridge.ts"],
4
- "sourcesContent": [
5
- "import type {\n\tLegacyFieldDecoratorArgs,\n\tLegacyMethodDecoratorArgs,\n\tStandardMethodDecoratorArgs,\n\tStandardOrLegacyFieldDecoratorArgs,\n\tStandardOrLegacyMethodDecoratorArgs,\n} from '../types';\n\ntype StandardFieldFn = (target: undefined, context: ClassFieldDecoratorContext<any, any>) => any;\n\ntype LegacyFieldFn = (\n\tproto: LegacyFieldDecoratorArgs['protoOrTarget'],\n\tname: LegacyFieldDecoratorArgs['nameOrContext'],\n) => any;\n\ntype StandardMethodFn = (\n\ttarget: StandardMethodDecoratorArgs['protoOrTarget'],\n\tcontext: StandardMethodDecoratorArgs['nameOrContext'],\n) => any;\n\ntype LegacyMethodFn = (\n\tproto: LegacyMethodDecoratorArgs['protoOrTarget'],\n\tname: LegacyMethodDecoratorArgs['nameOrContext'],\n\tdescriptor: LegacyMethodDecoratorArgs['descriptor'],\n) => any;\n\nexport function fieldDecoratorBridge(\n\tstandard: StandardFieldFn,\n\tlegacy: LegacyFieldFn,\n\tprotoOrTarget: StandardOrLegacyFieldDecoratorArgs['protoOrTarget'],\n\tnameOrContext: StandardOrLegacyFieldDecoratorArgs['nameOrContext'],\n): any {\n\tif (typeof nameOrContext === 'object') {\n\t\treturn standard(protoOrTarget as undefined, nameOrContext as ClassFieldDecoratorContext<any, any>);\n\t}\n\treturn legacy(\n\t\tprotoOrTarget as LegacyFieldDecoratorArgs['protoOrTarget'],\n\t\tnameOrContext as LegacyFieldDecoratorArgs['nameOrContext'],\n\t);\n}\n\nexport function methodDecoratorBridge(\n\tstandard: StandardMethodFn,\n\tlegacy: LegacyMethodFn,\n\tprotoOrTarget: StandardOrLegacyMethodDecoratorArgs['protoOrTarget'],\n\tnameOrContext: StandardOrLegacyMethodDecoratorArgs['nameOrContext'],\n\tdescriptor?: StandardOrLegacyMethodDecoratorArgs['descriptor'],\n): any {\n\tif (typeof nameOrContext === 'object') {\n\t\treturn standard(\n\t\t\tprotoOrTarget as StandardMethodDecoratorArgs['protoOrTarget'],\n\t\t\tnameOrContext as StandardMethodDecoratorArgs['nameOrContext'],\n\t\t);\n\t}\n\treturn legacy(\n\t\tprotoOrTarget as LegacyMethodDecoratorArgs['protoOrTarget'],\n\t\tnameOrContext as LegacyMethodDecoratorArgs['nameOrContext'],\n\t\tdescriptor as LegacyMethodDecoratorArgs['descriptor'],\n\t);\n}\n"
6
- ],
7
- "mappings": "AA0BO,SAAS,CAAoB,CACnC,EACA,EACA,EACA,EACM,CACN,GAAI,OAAO,IAAkB,SAC5B,OAAO,EAAS,EAA4B,CAAqD,EAElG,OAAO,EACN,EACA,CACD,EAGM,SAAS,CAAqB,CACpC,EACA,EACA,EACA,EACA,EACM,CACN,GAAI,OAAO,IAAkB,SAC5B,OAAO,EACN,EACA,CACD,EAED,OAAO,EACN,EACA,EACA,CACD",
8
- "debugId": "D5F8FA4A7E28826464756E2164756E21",
9
- "names": []
10
- }
@@ -1,4 +0,0 @@
1
- var Q=Symbol("radiant.shadowRootListenerHooks"),Y=Symbol("radiant.patchedAttachShadow");function _(x,j){return x.target instanceof Element&&x.target.matches(j)}function Z(x,j,z,B){let I=(G)=>{if(_(G,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 q(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="${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{q as tb};
3
-
4
- //# debugId=E53E644B2D3C7D3D64756E2164756E21
@@ -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 matchesDelegatedTarget(event: Event, selector: string): boolean {\n\treturn event.target instanceof Element && event.target.matches(selector);\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 (matchesDelegatedTarget(event, 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=\"${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\treturn () => {\n\t\tdisposed = true;\n\t\tdetachListeners();\n\t};\n}\n"
6
- ],
7
- "mappings": "AA8BA,IAAM,EAA6B,OAAO,iCAAiC,EACrE,EAAyB,OAAO,6BAA6B,EAOnE,SAAS,CAAsB,CAAC,EAAc,EAA2B,CACxE,OAAO,EAAM,kBAAkB,SAAW,EAAM,OAAO,QAAQ,CAAQ,EAGxE,SAAS,CAAoB,CAC5B,EACA,EACA,EACA,EACa,CACb,IAAM,EAAoB,CAAC,IAAiB,CAC3C,GAAI,EAAuB,EAAO,CAAQ,EACzC,EAAS,CAAK,GAMhB,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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": "E53E644B2D3C7D3D64756E2164756E21",
9
- "names": []
10
- }
@@ -1,4 +0,0 @@
1
- import{da as z}from"./chunk-x0522ksh.js";import{ea as A}from"./chunk-dscj0sk9.js";import{Na as q}from"./chunk-nerd6fmg.js";function Q(j){return function(F,G){return q(A(j),z(j),F,G)}}
2
- export{Q as ca};
3
-
4
- //# debugId=D69726912B3CF83164756E2164756E21
@@ -1,10 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../src/decorators/prop.ts"],
4
- "sourcesContent": [
5
- "import type { ReactivePropertyOptions } from '../core/radiant-element';\nimport type { StandardOrLegacyFieldDecoratorArgs } from '../types';\nimport { reactiveProp as legacyReactiveProp } from './legacy/reactive-prop';\nimport { reactiveProp as standardReactiveProp } from './standard/reactive-prop';\nimport { fieldDecoratorBridge } from './bridge';\n\n/**\n * Declares a reactive property backed by an HTML attribute.\n *\n * Every write triggers `notifyUpdate` so update callbacks, bindings, and\n * `RadiantComponent` renders stay in sync. When no explicit `bind` option\n * is supplied, `RadiantComponent` hosts expose a JSX companion binding\n * accessor automatically while plain `RadiantElement` hosts keep binding\n * opt-in.\n *\n * @param options {@link ReactivePropertyOptions} The options for the reactive property.\n */\nexport function prop<T = unknown>(options: ReactivePropertyOptions<T>) {\n\treturn function (\n\t\tprotoOrTarget: StandardOrLegacyFieldDecoratorArgs['protoOrTarget'],\n\t\tnameOrContext: StandardOrLegacyFieldDecoratorArgs['nameOrContext'],\n\t): any {\n\t\treturn fieldDecoratorBridge(\n\t\t\tstandardReactiveProp(options),\n\t\t\tlegacyReactiveProp(options),\n\t\t\tprotoOrTarget,\n\t\t\tnameOrContext,\n\t\t);\n\t};\n}\n"
6
- ],
7
- "mappings": "uIAiBO,GAAS,LAAiB,CAAC,EAAqC,CACtE,OAAO,QAAS,CACf,EACA,EACM,CACN,OAAO,EACN,EAAqB,CAAO,EAC5B,EAAmB,CAAO,EAC1B,EACA,CACD",
8
- "debugId": "D69726912B3CF83164756E2164756E21",
9
- "names": []
10
- }
@@ -1,4 +0,0 @@
1
- function o(a,t){let n=Symbol(`__${String(t.name)}__value`),i=String(t.name);return t.addInitializer(function(){this.defineReactiveBinding(i,this.shouldAutoBindReactiveMembers?.()??!1),this.registerReactiveDependencyReader(i,()=>this[n]),Object.defineProperty(this,t.name,{get(){return this.trackReactiveRead(i),this[n]},set(e){let r=this[n];if(r!==e)this[n]=e,this.notifyUpdate(i,r,e)},enumerable:!0,configurable:!0})}),function(e){return this[n]=e,e}}
2
- export{o as va};
3
-
4
- //# debugId=E93083CDB2994EDD64756E2164756E21
@@ -1,10 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../src/decorators/standard/reactive-field.ts"],
4
- "sourcesContent": [
5
- "import type { RadiantElement } from '../../core/radiant-element';\n\nexport function reactiveField<T extends RadiantElement, V>(_: undefined, context: ClassFieldDecoratorContext<T, V>) {\n\tconst privatePropertyKey = Symbol(`__${String(context.name)}__value`);\n\n\tconst contextName = String(context.name);\n\n\tcontext.addInitializer(function (this: T) {\n\t\tthis.defineReactiveBinding(contextName, this.shouldAutoBindReactiveMembers?.() ?? false);\n\t\tthis.registerReactiveDependencyReader(\n\t\t\tcontextName,\n\t\t\t() => (this as unknown as Record<PropertyKey, unknown>)[privatePropertyKey],\n\t\t);\n\n\t\tObject.defineProperty(this, context.name, {\n\t\t\tget() {\n\t\t\t\t(this as RadiantElement).trackReactiveRead(contextName);\n\t\t\t\treturn (this as unknown as Record<PropertyKey, unknown>)[privatePropertyKey];\n\t\t\t},\n\t\t\tset(newValue: unknown) {\n\t\t\t\tconst oldValue = (this as unknown as Record<PropertyKey, unknown>)[privatePropertyKey];\n\t\t\t\tif (oldValue !== newValue) {\n\t\t\t\t\t(this as unknown as Record<PropertyKey, unknown>)[privatePropertyKey] = newValue;\n\t\t\t\t\t(this as RadiantElement).notifyUpdate(contextName, 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\t});\n\n\treturn function (this: T, value: V) {\n\t\t(this as any)[privatePropertyKey] = value;\n\t\treturn value;\n\t};\n}\n"
6
- ],
7
- "mappings": "AAEO,SAAS,CAA0C,CAAC,EAAc,EAA2C,CACnH,IAAM,EAAqB,OAAO,KAAK,OAAO,EAAQ,IAAI,UAAU,EAE9D,EAAc,OAAO,EAAQ,IAAI,EA0BvC,OAxBA,EAAQ,eAAe,QAAS,EAAU,CACzC,KAAK,sBAAsB,EAAa,KAAK,gCAAgC,GAAK,EAAK,EACvF,KAAK,iCACJ,EACA,IAAO,KAAiD,EACzD,EAEA,OAAO,eAAe,KAAM,EAAQ,KAAM,CACzC,GAAG,EAAG,CAEL,OADC,KAAwB,kBAAkB,CAAW,EAC9C,KAAiD,IAE1D,GAAG,CAAC,EAAmB,CACtB,IAAM,EAAY,KAAiD,GACnE,GAAI,IAAa,EACf,KAAiD,GAAsB,EACvE,KAAwB,aAAa,EAAa,EAAU,CAAQ,GAGvE,WAAY,GACZ,aAAc,EACf,CAAC,EACD,EAEM,QAAS,CAAU,EAAU,CAEnC,OADC,KAAa,GAAsB,EAC7B",
8
- "debugId": "E93083CDB2994EDD64756E2164756E21",
9
- "names": []
10
- }
@@ -1,4 +0,0 @@
1
- import{t as B}from"./chunk-5td6v9k3.js";import{v as A,x as k}from"./chunk-vpfm9yw8.js";import{La as w}from"./chunk-8tvt04cm.js";function M(D){let{context:f,select:h,subscribe:q=!0}=D;return(E,F)=>{w(E,(d)=>{let j=B(d,(G)=>{d[F]=G},!0);A(d,f,j,h),d.registerConnectedCallback(()=>{if(k(d,f,j,{select:h,subscribe:q}))return;queueMicrotask(()=>{k(d,f,j,{select:h,subscribe:q})})})})}}
2
- export{M as g};
3
-
4
- //# debugId=F4648066BC399D0364756E2164756E21
@@ -1,10 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../src/context/decorators/legacy/context-selector-field.ts"],
4
- "sourcesContent": [
5
- "import type { RadiantElement } from '../../../core/radiant-element';\nimport { registerLegacyInstanceInitializer } from '../../../decorators/legacy/instance-initializers';\nimport { bootstrapSsrContextSelection, connectContextSelection } from '../../context-consumer-bootstrap';\nimport type { Context, ContextType } from '../../types';\nimport { createContextSelectionDelivery } from '../context-selection-delivery';\n\nexport type ContextSelectorFieldOptions<T extends Context<unknown, unknown>, Selected = ContextType<T>> = {\n\tcontext: T;\n\tselect?: (context: ContextType<T>) => Selected;\n\tsubscribe?: boolean;\n};\n\nexport function contextSelectorField<T extends Context<unknown, unknown>, Selected = ContextType<T>>(\n\toptions: ContextSelectorFieldOptions<T, Selected>,\n) {\n\tconst { context, select, subscribe = true } = options;\n\n\treturn (target: RadiantElement, propertyName: string) => {\n\t\tregisterLegacyInstanceInitializer(target, (element) => {\n\t\t\tconst applyValue = createContextSelectionDelivery(\n\t\t\t\telement,\n\t\t\t\t(value) => {\n\t\t\t\t\t(element as unknown as Record<string, unknown>)[propertyName] = value as Selected;\n\t\t\t\t},\n\t\t\t\ttrue,\n\t\t\t);\n\n\t\t\tbootstrapSsrContextSelection(element, context, applyValue, select as any);\n\n\t\t\telement.registerConnectedCallback(() => {\n\t\t\t\tif (\n\t\t\t\t\tconnectContextSelection(element, context, applyValue, {\n\t\t\t\t\t\tselect: select as any,\n\t\t\t\t\t\tsubscribe,\n\t\t\t\t\t})\n\t\t\t\t) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tqueueMicrotask(() => {\n\t\t\t\t\tconnectContextSelection(element, context, applyValue, {\n\t\t\t\t\t\tselect: select as any,\n\t\t\t\t\t\tsubscribe,\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t});\n\t\t});\n\t};\n}\n"
6
- ],
7
- "mappings": "4IAYO,GAAS,LAAoF,CACnG,EACC,CACD,IAAQ,UAAS,SAAQ,YAAY,IAAS,EAE9C,MAAO,CAAC,EAAwB,IAAyB,CACxD,EAAkC,EAAQ,CAAC,IAAY,CACtD,IAAM,EAAa,EAClB,EACA,CAAC,IAAU,CACT,EAA+C,GAAgB,GAEjE,EACD,EAEA,EAA6B,EAAS,EAAS,EAAY,CAAa,EAExE,EAAQ,0BAA0B,IAAM,CACvC,GACC,EAAwB,EAAS,EAAS,EAAY,CACrD,OAAQ,EACR,WACD,CAAC,EAED,OAGD,eAAe,IAAM,CACpB,EAAwB,EAAS,EAAS,EAAY,CACrD,OAAQ,EACR,WACD,CAAC,EACD,EACD,EACD",
8
- "debugId": "F4648066BC399D0364756E2164756E21",
9
- "names": []
10
- }
@@ -1,4 +0,0 @@
1
- import{t as B}from"./chunk-5td6v9k3.js";import{v as z,x as A}from"./chunk-vpfm9yw8.js";function L({context:f,select:j,subscribe:E=!0,requestUpdate:F=!0}){return function(G,H){H.addInitializer(function(){let k=B(this,(I)=>{G.call(this,I)},F);if(z(this,f,k,j))return;let w=()=>{A(this,f,k,{select:j,subscribe:E})};this.registerConnectedCallback(()=>{w()}),queueMicrotask(w)})}}
2
- export{L as s};
3
-
4
- //# debugId=3AFBFCB5BA0C616D64756E2164756E21
@@ -1,10 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../src/context/decorators/standard/context-selector.ts"],
4
- "sourcesContent": [
5
- "import type { Method } from '../../../types';\nimport type { RadiantElement } from '../../../core/radiant-element';\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 function <Host extends RadiantElement, TMethod extends Method>(\n\t\toriginalMethod: TMethod,\n\t\ttargetContext: ClassMethodDecoratorContext<Host, TMethod>,\n\t): void {\n\t\ttargetContext.addInitializer(function (this: Host) {\n\t\t\tconst applySelectedContext = createContextSelectionDelivery(\n\t\t\t\tthis,\n\t\t\t\t(value) => {\n\t\t\t\t\toriginalMethod.call(this, value as never);\n\t\t\t\t},\n\t\t\t\trequestUpdate,\n\t\t\t);\n\n\t\t\tif (bootstrapSsrContextSelection(this, context, applySelectedContext, select)) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst connectSelection = () => {\n\t\t\t\tconnectContextSelection(this, context, applySelectedContext, {\n\t\t\t\t\tselect,\n\t\t\t\t\tsubscribe,\n\t\t\t\t});\n\t\t\t};\n\n\t\t\tthis.registerConnectedCallback(() => {\n\t\t\t\tconnectSelection();\n\t\t\t});\n\n\t\t\tqueueMicrotask(connectSelection);\n\t\t});\n\t};\n}\n"
6
- ],
7
- "mappings": "6FAOO,GAAS,CAA+E,EAC9F,UACA,SACA,YAAY,GACZ,gBAAgB,IACuB,CACvC,OAAO,QAA8D,CACpE,EACA,EACO,CACP,EAAc,eAAe,QAAS,EAAa,CAClD,IAAM,EAAuB,EAC5B,KACA,CAAC,IAAU,CACV,EAAe,KAAK,KAAM,CAAc,GAEzC,CACD,EAEA,GAAI,EAA6B,KAAM,EAAS,EAAsB,CAAM,EAC3E,OAGD,IAAM,EAAmB,IAAM,CAC9B,EAAwB,KAAM,EAAS,EAAsB,CAC5D,SACA,WACD,CAAC,GAGF,KAAK,0BAA0B,IAAM,CACpC,EAAiB,EACjB,EAED,eAAe,CAAgB,EAC/B",
8
- "debugId": "3AFBFCB5BA0C616D64756E2164756E21",
9
- "names": []
10
- }
@@ -1,4 +0,0 @@
1
- class x{host;eventConfig;constructor(k,q){this.host=k,this.eventConfig=q}emit(k){let q=new CustomEvent(this.eventConfig.name,{detail:k,bubbles:this.eventConfig.bubbles,cancelable:this.eventConfig.cancelable,composed:this.eventConfig.composed});this.host.dispatchEvent(q)}}
2
- export{x as pb};
3
-
4
- //# debugId=AEA3C1BE04BFDA6B64756E2164756E21