@ecopages/radiant 0.3.0-alpha.2 → 0.3.0-alpha.21

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 (722) hide show
  1. package/README.md +71 -60
  2. package/client/app-bootstrap.d.ts +19 -0
  3. package/client/app-bootstrap.js +3 -0
  4. package/client/app-bootstrap.js.map +10 -0
  5. package/{dist/client → client}/hydrator.d.ts +1 -1
  6. package/client/hydrator.js +3 -0
  7. package/client/hydrator.js.map +11 -0
  8. package/client/install-hydrator.js +3 -0
  9. package/client/install-hydrator.js.map +12 -0
  10. package/{dist/context → context}/context-consumer-bootstrap.d.ts +7 -6
  11. package/context/context-consumer-bootstrap.js +3 -0
  12. package/context/context-consumer-bootstrap.js.map +14 -0
  13. package/context/context-consumer-runtime.d.ts +47 -0
  14. package/context/context-consumer-runtime.js +3 -0
  15. package/context/context-consumer-runtime.js.map +12 -0
  16. package/context/context-host.d.ts +25 -0
  17. package/context/context-host.js +3 -0
  18. package/context/context-host.js.map +10 -0
  19. package/{dist/context → context}/context-provider.d.ts +10 -6
  20. package/context/context-provider.js +3 -0
  21. package/context/context-provider.js.map +15 -0
  22. package/context/context-ssr-bridge.js +3 -0
  23. package/{dist/chunk-t8xtvgyg.js.map → context/context-ssr-bridge.js.map} +2 -2
  24. package/context/create-context.js +3 -0
  25. package/{dist/chunk-30x4hggg.js.map → context/create-context.js.map} +2 -2
  26. package/{dist/context → context}/decorators/consume-context.d.ts +5 -2
  27. package/context/decorators/consume-context.js +3 -0
  28. package/context/decorators/consume-context.js.map +19 -0
  29. package/context/decorators/context-selection-delivery.d.ts +1 -0
  30. package/context/decorators/context-selection-delivery.js +3 -0
  31. package/context/decorators/context-selection-delivery.js.map +11 -0
  32. package/{dist/context → context}/decorators/context-selector.d.ts +6 -6
  33. package/context/decorators/context-selector.js +3 -0
  34. package/context/decorators/context-selector.js.map +21 -0
  35. package/context/decorators/legacy/consume-context.d.ts +3 -0
  36. package/context/decorators/legacy/consume-context.js +3 -0
  37. package/context/decorators/legacy/consume-context.js.map +16 -0
  38. package/{dist/context → context}/decorators/legacy/context-selector-field.d.ts +2 -2
  39. package/context/decorators/legacy/context-selector-field.js +3 -0
  40. package/context/decorators/legacy/context-selector-field.js.map +17 -0
  41. package/{dist/context → context}/decorators/legacy/context-selector.d.ts +2 -2
  42. package/context/decorators/legacy/context-selector.js +3 -0
  43. package/context/decorators/legacy/context-selector.js.map +17 -0
  44. package/{dist/context → context}/decorators/legacy/provide-context.d.ts +2 -2
  45. package/context/decorators/legacy/provide-context.js +3 -0
  46. package/context/decorators/legacy/provide-context.js.map +17 -0
  47. package/{dist/context → context}/decorators/on-context-update.d.ts +5 -5
  48. package/context/decorators/on-context-update.js +3 -0
  49. package/context/decorators/on-context-update.js.map +20 -0
  50. package/{dist/context → context}/decorators/provide-context.d.ts +5 -2
  51. package/context/decorators/provide-context.js +3 -0
  52. package/context/decorators/provide-context.js.map +20 -0
  53. package/context/decorators/standard/consume-context.d.ts +3 -0
  54. package/context/decorators/standard/consume-context.js +3 -0
  55. package/context/decorators/standard/consume-context.js.map +15 -0
  56. package/{dist/context → context}/decorators/standard/context-selector-field.d.ts +2 -2
  57. package/context/decorators/standard/context-selector-field.js +3 -0
  58. package/context/decorators/standard/context-selector-field.js.map +16 -0
  59. package/{dist/context → context}/decorators/standard/context-selector.d.ts +2 -3
  60. package/context/decorators/standard/context-selector.js +3 -0
  61. package/context/decorators/standard/context-selector.js.map +16 -0
  62. package/{dist/context → context}/decorators/standard/provide-context.d.ts +2 -2
  63. package/context/decorators/standard/provide-context.js +3 -0
  64. package/context/decorators/standard/provide-context.js.map +16 -0
  65. package/{dist/context → context}/events.d.ts +18 -11
  66. package/context/events.js +3 -0
  67. package/context/events.js.map +10 -0
  68. package/context/hydration-script.js +3 -0
  69. package/context/hydration-script.js.map +12 -0
  70. package/context/index.d.ts +8 -0
  71. package/context/index.js +3 -0
  72. package/context/index.js.map +35 -0
  73. package/controller-registry.d.ts +38 -0
  74. package/controller-registry.js +3 -0
  75. package/controller-registry.js.map +11 -0
  76. package/core/controller-metadata.d.ts +3 -0
  77. package/core/controller-metadata.js +3 -0
  78. package/core/controller-metadata.js.map +10 -0
  79. package/core/custom-element-metadata.d.ts +14 -0
  80. package/core/custom-element-metadata.js +3 -0
  81. package/core/custom-element-metadata.js.map +10 -0
  82. package/{dist/core → core}/hydration-codec.d.ts +8 -1
  83. package/core/hydration-codec.js +3 -0
  84. package/core/hydration-codec.js.map +11 -0
  85. package/core/radiant-controller.d.ts +151 -0
  86. package/core/radiant-controller.js +3 -0
  87. package/core/radiant-controller.js.map +17 -0
  88. package/core/radiant-element-ssr-host.d.ts +23 -0
  89. package/core/radiant-element-ssr-host.js +3 -0
  90. package/core/radiant-element-ssr-host.js.map +10 -0
  91. package/core/radiant-element-ssr-registry.d.ts +45 -0
  92. package/core/radiant-element-ssr-registry.js +3 -0
  93. package/core/radiant-element-ssr-registry.js.map +10 -0
  94. package/{dist/core/radiant-component-ssr.d.ts → core/radiant-element-ssr-service.d.ts} +5 -6
  95. package/core/radiant-element-ssr-service.js +3 -0
  96. package/core/radiant-element-ssr-service.js.map +14 -0
  97. package/{dist/core → core}/radiant-element.d.ts +55 -123
  98. package/core/radiant-element.js +3 -0
  99. package/core/radiant-element.js.map +24 -0
  100. package/{dist/core → core}/radiant-hydrator-state.d.ts +1 -1
  101. package/core/radiant-hydrator-state.js +3 -0
  102. package/core/radiant-hydrator-state.js.map +10 -0
  103. package/core/reactive-host.d.ts +133 -0
  104. package/core/reactive-host.js +3 -0
  105. package/core/reactive-host.js.map +13 -0
  106. package/{dist/core → core}/reactive-jsx-value.d.ts +2 -1
  107. package/core/reactive-jsx-value.js +3 -0
  108. package/core/reactive-jsx-value.js.map +10 -0
  109. package/core/reactive-prop-core.d.ts +42 -0
  110. package/core/reactive-prop-core.js +3 -0
  111. package/core/reactive-prop-core.js.map +11 -0
  112. package/{dist/core → core}/reactive-prop-metadata.d.ts +1 -1
  113. package/core/reactive-prop-metadata.js +3 -0
  114. package/core/reactive-prop-metadata.js.map +10 -0
  115. package/core/reactivity-adapter.d.ts +8 -0
  116. package/core/reactivity-adapter.js +3 -0
  117. package/core/reactivity-adapter.js.map +12 -0
  118. package/core/reactivity-contract.d.ts +39 -0
  119. package/core/reactivity-contract.js +2 -0
  120. package/{dist/chunk-vgtggzb6.js.map → core/reactivity-contract.js.map} +1 -1
  121. package/core/reactivity-runtime.d.ts +18 -0
  122. package/core/reactivity-runtime.js +3 -0
  123. package/core/reactivity-runtime.js.map +11 -0
  124. package/core/reactivity-signals.d.ts +10 -0
  125. package/core/reactivity-signals.js +3 -0
  126. package/core/reactivity-signals.js.map +10 -0
  127. package/core/render-runtime.d.ts +28 -0
  128. package/core/render-runtime.js +3 -0
  129. package/core/render-runtime.js.map +16 -0
  130. package/core/slot-projection-runtime.js +3 -0
  131. package/core/slot-projection-runtime.js.map +12 -0
  132. package/core/ssr-preparation.js +3 -0
  133. package/core/ssr-preparation.js.map +10 -0
  134. package/decorators/attr.d.ts +6 -0
  135. package/decorators/attr.js +3 -0
  136. package/decorators/attr.js.map +17 -0
  137. package/decorators/bound.d.ts +7 -0
  138. package/decorators/bound.js +3 -0
  139. package/decorators/bound.js.map +13 -0
  140. package/decorators/bridge.d.ts +12 -0
  141. package/decorators/bridge.js +3 -0
  142. package/decorators/bridge.js.map +10 -0
  143. package/decorators/controller.d.ts +2 -0
  144. package/decorators/controller.js +3 -0
  145. package/decorators/controller.js.map +12 -0
  146. package/{dist/decorators → decorators}/custom-element.d.ts +4 -2
  147. package/decorators/custom-element.js +3 -0
  148. package/decorators/custom-element.js.map +13 -0
  149. package/decorators/debounce.d.ts +9 -0
  150. package/decorators/debounce.js +3 -0
  151. package/decorators/debounce.js.map +14 -0
  152. package/{dist/decorators → decorators}/event.d.ts +5 -2
  153. package/decorators/event.js +3 -0
  154. package/decorators/event.js.map +16 -0
  155. package/decorators/legacy/attr.d.ts +2 -0
  156. package/decorators/legacy/attr.js +3 -0
  157. package/decorators/legacy/attr.js.map +14 -0
  158. package/decorators/legacy/bound.js +3 -0
  159. package/decorators/legacy/bound.js.map +10 -0
  160. package/decorators/legacy/custom-element.js +3 -0
  161. package/decorators/legacy/custom-element.js.map +11 -0
  162. package/decorators/legacy/debounce.js +3 -0
  163. package/decorators/legacy/debounce.js.map +11 -0
  164. package/decorators/legacy/event.js +3 -0
  165. package/decorators/legacy/event.js.map +13 -0
  166. package/decorators/legacy/instance-initializers.d.ts +32 -0
  167. package/decorators/legacy/instance-initializers.js +3 -0
  168. package/decorators/legacy/instance-initializers.js.map +10 -0
  169. package/{dist/decorators → decorators}/legacy/on-event.d.ts +2 -2
  170. package/decorators/legacy/on-event.js +3 -0
  171. package/decorators/legacy/on-event.js.map +13 -0
  172. package/decorators/legacy/on-updated.d.ts +11 -0
  173. package/decorators/legacy/on-updated.js +3 -0
  174. package/decorators/legacy/on-updated.js.map +11 -0
  175. package/decorators/legacy/query-slot.d.ts +3 -0
  176. package/decorators/legacy/query-slot.js +3 -0
  177. package/decorators/legacy/query-slot.js.map +13 -0
  178. package/{dist/decorators → decorators}/legacy/query.d.ts +7 -2
  179. package/decorators/legacy/query.js +3 -0
  180. package/decorators/legacy/query.js.map +12 -0
  181. package/{dist/decorators → decorators}/legacy/reactive-field.d.ts +2 -2
  182. package/decorators/legacy/reactive-field.js +3 -0
  183. package/decorators/legacy/reactive-field.js.map +11 -0
  184. package/decorators/legacy/reactive-prop.d.ts +14 -0
  185. package/decorators/legacy/reactive-prop.js +3 -0
  186. package/decorators/legacy/reactive-prop.js.map +14 -0
  187. package/{dist/decorators → decorators}/legacy/signal.d.ts +4 -3
  188. package/decorators/legacy/signal.js +3 -0
  189. package/decorators/legacy/signal.js.map +15 -0
  190. package/{dist/decorators → decorators}/on-event.d.ts +6 -3
  191. package/decorators/on-event.js +3 -0
  192. package/decorators/on-event.js.map +16 -0
  193. package/decorators/on-updated.d.ts +15 -0
  194. package/decorators/on-updated.js +3 -0
  195. package/decorators/on-updated.js.map +14 -0
  196. package/decorators/prop.d.ts +26 -0
  197. package/decorators/prop.js +3 -0
  198. package/decorators/prop.js.map +17 -0
  199. package/decorators/query-slot.d.ts +17 -0
  200. package/decorators/query-slot.js +3 -0
  201. package/decorators/query-slot.js.map +16 -0
  202. package/{dist/decorators → decorators}/query.d.ts +9 -2
  203. package/decorators/query.js +3 -0
  204. package/decorators/query.js.map +15 -0
  205. package/decorators/shared/reactive-attr.d.ts +25 -0
  206. package/decorators/shared/reactive-attr.js +3 -0
  207. package/decorators/shared/reactive-attr.js.map +12 -0
  208. package/decorators/signal.d.ts +29 -0
  209. package/decorators/signal.js +3 -0
  210. package/decorators/signal.js.map +17 -0
  211. package/decorators/standard/attr.d.ts +2 -0
  212. package/decorators/standard/attr.js +3 -0
  213. package/decorators/standard/attr.js.map +13 -0
  214. package/decorators/standard/bound.js +3 -0
  215. package/{dist/chunk-rkh1vkb9.js.map → decorators/standard/bound.js.map} +2 -2
  216. package/decorators/standard/custom-element.js +3 -0
  217. package/decorators/standard/custom-element.js.map +11 -0
  218. package/decorators/standard/debounce.js +3 -0
  219. package/decorators/standard/debounce.js.map +11 -0
  220. package/decorators/standard/event.js +3 -0
  221. package/decorators/standard/event.js.map +12 -0
  222. package/{dist/decorators → decorators}/standard/on-event.d.ts +2 -1
  223. package/decorators/standard/on-event.js +3 -0
  224. package/decorators/standard/on-event.js.map +12 -0
  225. package/decorators/standard/on-updated.d.ts +6 -0
  226. package/decorators/standard/on-updated.js +3 -0
  227. package/decorators/standard/on-updated.js.map +10 -0
  228. package/{dist/decorators → decorators}/standard/query-slot.d.ts +1 -2
  229. package/decorators/standard/query-slot.js +3 -0
  230. package/decorators/standard/query-slot.js.map +11 -0
  231. package/decorators/standard/query.d.ts +3 -0
  232. package/decorators/standard/query.js +3 -0
  233. package/decorators/standard/query.js.map +11 -0
  234. package/decorators/standard/reactive-field.d.ts +2 -0
  235. package/decorators/standard/reactive-field.js +3 -0
  236. package/decorators/standard/reactive-field.js.map +10 -0
  237. package/decorators/standard/reactive-prop.d.ts +13 -0
  238. package/decorators/standard/reactive-prop.js +3 -0
  239. package/decorators/standard/reactive-prop.js.map +13 -0
  240. package/{dist/decorators → decorators}/standard/signal.d.ts +4 -3
  241. package/decorators/standard/signal.js +3 -0
  242. package/decorators/standard/signal.js.map +14 -0
  243. package/decorators/state.d.ts +12 -0
  244. package/decorators/state.js +3 -0
  245. package/decorators/state.js.map +14 -0
  246. package/{dist/helpers → helpers}/create-event-listener.d.ts +11 -2
  247. package/helpers/create-event-listener.js +3 -0
  248. package/helpers/create-event-listener.js.map +11 -0
  249. package/helpers/create-event.js +3 -0
  250. package/helpers/create-event.js.map +11 -0
  251. package/{dist/helpers → helpers}/create-query-slot.d.ts +2 -3
  252. package/helpers/create-query-slot.js +3 -0
  253. package/helpers/create-query-slot.js.map +10 -0
  254. package/{dist/helpers → helpers}/create-query.d.ts +14 -3
  255. package/helpers/create-query.js +3 -0
  256. package/helpers/create-query.js.map +10 -0
  257. package/helpers/debounce.js +3 -0
  258. package/{dist/chunk-wd23rn4q.js.map → helpers/debounce.js.map} +2 -2
  259. package/helpers/index.js +3 -0
  260. package/helpers/index.js.map +16 -0
  261. package/index.d.ts +16 -0
  262. package/index.js +3 -0
  263. package/index.js.map +77 -0
  264. package/package.json +114 -120
  265. package/server/context-ssr.js +3 -0
  266. package/{dist/chunk-ssnnxzrj.js.map → server/context-ssr.js.map} +4 -3
  267. package/server/html-parser.js +3 -0
  268. package/{dist/chunk-5b1en9vz.js.map → server/html-parser.js.map} +2 -2
  269. package/server/install-light-dom-shim.js +3 -0
  270. package/server/install-light-dom-shim.js.map +12 -0
  271. package/{dist/server → server}/light-dom-shim.d.ts +9 -0
  272. package/server/light-dom-shim.js +3 -0
  273. package/server/light-dom-shim.js.map +11 -0
  274. package/server/project-root.js +3 -0
  275. package/{dist/server → server}/project-root.js.map +2 -2
  276. package/server/radiant-element-ssr-bridge.d.ts +21 -0
  277. package/server/radiant-element-ssr-bridge.js +3 -0
  278. package/server/radiant-element-ssr-bridge.js.map +19 -0
  279. package/server/radiant-element-ssr-extractor.d.ts +3 -0
  280. package/server/radiant-element-ssr-extractor.js +3 -0
  281. package/server/radiant-element-ssr-extractor.js.map +12 -0
  282. package/server/radiant-element-ssr-runtime.d.ts +1 -0
  283. package/server/radiant-element-ssr-runtime.js +3 -0
  284. package/server/radiant-element-ssr-runtime.js.map +19 -0
  285. package/{dist/server → server}/render-component.d.ts +5 -15
  286. package/server/render-component.js +3 -0
  287. package/server/render-component.js.map +23 -0
  288. package/server/render-controller.d.ts +57 -0
  289. package/server/render-controller.js +3 -0
  290. package/server/render-controller.js.map +26 -0
  291. package/server/slot-projection-html.js +3 -0
  292. package/server/slot-projection-html.js.map +14 -0
  293. package/signals/host-resource.js +3 -0
  294. package/{dist/signals → signals}/host-resource.js.map +2 -2
  295. package/{dist/signals → signals}/host-signal.d.ts +4 -2
  296. package/signals/host-signal.js +3 -0
  297. package/signals/host-signal.js.map +13 -0
  298. package/signals/hydration-script.js +3 -0
  299. package/signals/hydration-script.js.map +12 -0
  300. package/tools/escape-css-identifier.d.ts +1 -0
  301. package/tools/escape-css-identifier.js +3 -0
  302. package/tools/escape-css-identifier.js.map +10 -0
  303. package/tools/escape-script-json.js +3 -0
  304. package/{dist/chunk-nssj2x13.js.map → tools/escape-script-json.js.map} +2 -2
  305. package/tools/event-emitter.js +3 -0
  306. package/{dist/chunk-wvd1ffe4.js.map → tools/event-emitter.js.map} +2 -2
  307. package/{dist/tools → tools}/index.d.ts +1 -1
  308. package/tools/index.js +3 -0
  309. package/tools/index.js.map +13 -0
  310. package/tools/render-jsx-template.js +3 -0
  311. package/{dist/chunk-jkb2y7c8.js.map → tools/render-jsx-template.js.map} +2 -2
  312. package/types.js +3 -0
  313. package/{dist/types.js.map → types.js.map} +2 -2
  314. package/utils/attribute-utils.js +3 -0
  315. package/{dist/chunk-66e6s792.js.map → utils/attribute-utils.js.map} +2 -2
  316. package/utils/index.js +3 -0
  317. package/utils/index.js.map +10 -0
  318. package/dist/chunk-0bswvy25.js +0 -4
  319. package/dist/chunk-0bswvy25.js.map +0 -10
  320. package/dist/chunk-0btkzzyc.js +0 -4
  321. package/dist/chunk-0btkzzyc.js.map +0 -10
  322. package/dist/chunk-0g0j9re6.js +0 -4
  323. package/dist/chunk-0g0j9re6.js.map +0 -10
  324. package/dist/chunk-1x26p09c.js +0 -4
  325. package/dist/chunk-1x26p09c.js.map +0 -10
  326. package/dist/chunk-21a7jask.js +0 -4
  327. package/dist/chunk-21a7jask.js.map +0 -10
  328. package/dist/chunk-25zjh0kg.js +0 -4
  329. package/dist/chunk-25zjh0kg.js.map +0 -10
  330. package/dist/chunk-30x4hggg.js +0 -4
  331. package/dist/chunk-3ryr5wx2.js +0 -4
  332. package/dist/chunk-3ryr5wx2.js.map +0 -10
  333. package/dist/chunk-3xxvmd5c.js +0 -4
  334. package/dist/chunk-3xxvmd5c.js.map +0 -10
  335. package/dist/chunk-3ynk7e1e.js +0 -4
  336. package/dist/chunk-3ynk7e1e.js.map +0 -10
  337. package/dist/chunk-4e559cy5.js +0 -4
  338. package/dist/chunk-4e559cy5.js.map +0 -10
  339. package/dist/chunk-5b1en9vz.js +0 -4
  340. package/dist/chunk-5bkat72n.js +0 -4
  341. package/dist/chunk-5bkat72n.js.map +0 -10
  342. package/dist/chunk-5qeaq3tj.js +0 -4
  343. package/dist/chunk-5qeaq3tj.js.map +0 -10
  344. package/dist/chunk-66e6s792.js +0 -4
  345. package/dist/chunk-79jg8q67.js +0 -4
  346. package/dist/chunk-79jg8q67.js.map +0 -10
  347. package/dist/chunk-8d5ddvvf.js +0 -4
  348. package/dist/chunk-8d5ddvvf.js.map +0 -10
  349. package/dist/chunk-8e9fgtbn.js +0 -4
  350. package/dist/chunk-8e9fgtbn.js.map +0 -10
  351. package/dist/chunk-9mqtp3js.js +0 -4
  352. package/dist/chunk-9mqtp3js.js.map +0 -10
  353. package/dist/chunk-9rj2rwes.js +0 -4
  354. package/dist/chunk-9rj2rwes.js.map +0 -10
  355. package/dist/chunk-atms6yrh.js +0 -4
  356. package/dist/chunk-atms6yrh.js.map +0 -10
  357. package/dist/chunk-bk2nbmcd.js +0 -4
  358. package/dist/chunk-bk2nbmcd.js.map +0 -10
  359. package/dist/chunk-bk6qkvfp.js +0 -4
  360. package/dist/chunk-bk6qkvfp.js.map +0 -10
  361. package/dist/chunk-c0qyz98c.js +0 -4
  362. package/dist/chunk-c0qyz98c.js.map +0 -10
  363. package/dist/chunk-c52qhh0j.js +0 -4
  364. package/dist/chunk-c52qhh0j.js.map +0 -10
  365. package/dist/chunk-cnyxrh9r.js +0 -4
  366. package/dist/chunk-cnyxrh9r.js.map +0 -10
  367. package/dist/chunk-cvz9mrxa.js +0 -4
  368. package/dist/chunk-cvz9mrxa.js.map +0 -10
  369. package/dist/chunk-dabagjk6.js +0 -4
  370. package/dist/chunk-dabagjk6.js.map +0 -10
  371. package/dist/chunk-e0r6ca2g.js +0 -4
  372. package/dist/chunk-e0r6ca2g.js.map +0 -10
  373. package/dist/chunk-eevw1j2q.js +0 -4
  374. package/dist/chunk-eevw1j2q.js.map +0 -10
  375. package/dist/chunk-ek664x1c.js +0 -4
  376. package/dist/chunk-ek664x1c.js.map +0 -10
  377. package/dist/chunk-eyw14d6y.js +0 -4
  378. package/dist/chunk-eyw14d6y.js.map +0 -10
  379. package/dist/chunk-fs4j94bk.js +0 -4
  380. package/dist/chunk-fs4j94bk.js.map +0 -10
  381. package/dist/chunk-g2z3mm6b.js +0 -4
  382. package/dist/chunk-g2z3mm6b.js.map +0 -10
  383. package/dist/chunk-g5n3m11h.js +0 -4
  384. package/dist/chunk-g5n3m11h.js.map +0 -10
  385. package/dist/chunk-gdkte2vd.js +0 -4
  386. package/dist/chunk-gdkte2vd.js.map +0 -10
  387. package/dist/chunk-gg74gdpv.js +0 -4
  388. package/dist/chunk-gg74gdpv.js.map +0 -10
  389. package/dist/chunk-h9k7crjc.js +0 -4
  390. package/dist/chunk-h9k7crjc.js.map +0 -10
  391. package/dist/chunk-hpzgnxgq.js +0 -4
  392. package/dist/chunk-hpzgnxgq.js.map +0 -10
  393. package/dist/chunk-hrjc8b1y.js +0 -4
  394. package/dist/chunk-hrjc8b1y.js.map +0 -10
  395. package/dist/chunk-hvy4zvcc.js +0 -4
  396. package/dist/chunk-hvy4zvcc.js.map +0 -10
  397. package/dist/chunk-hztr86b4.js +0 -4
  398. package/dist/chunk-hztr86b4.js.map +0 -10
  399. package/dist/chunk-j3v7rca5.js +0 -4
  400. package/dist/chunk-j3v7rca5.js.map +0 -10
  401. package/dist/chunk-j864sv4w.js +0 -4
  402. package/dist/chunk-j864sv4w.js.map +0 -10
  403. package/dist/chunk-jkb2y7c8.js +0 -4
  404. package/dist/chunk-kakpjgzf.js +0 -4
  405. package/dist/chunk-kakpjgzf.js.map +0 -10
  406. package/dist/chunk-kmebacvv.js +0 -4
  407. package/dist/chunk-kmebacvv.js.map +0 -10
  408. package/dist/chunk-knqsm6v3.js +0 -4
  409. package/dist/chunk-knqsm6v3.js.map +0 -10
  410. package/dist/chunk-mp2vtrkg.js +0 -4
  411. package/dist/chunk-mp2vtrkg.js.map +0 -10
  412. package/dist/chunk-mpsj3cjs.js +0 -4
  413. package/dist/chunk-mpsj3cjs.js.map +0 -10
  414. package/dist/chunk-n4p2542b.js +0 -4
  415. package/dist/chunk-n4p2542b.js.map +0 -10
  416. package/dist/chunk-nctznxyz.js +0 -4
  417. package/dist/chunk-nctznxyz.js.map +0 -10
  418. package/dist/chunk-ndw3hc3v.js +0 -4
  419. package/dist/chunk-ndw3hc3v.js.map +0 -10
  420. package/dist/chunk-nnnb6pac.js +0 -4
  421. package/dist/chunk-nnnb6pac.js.map +0 -10
  422. package/dist/chunk-nssj2x13.js +0 -4
  423. package/dist/chunk-nvr37vma.js +0 -4
  424. package/dist/chunk-nvr37vma.js.map +0 -10
  425. package/dist/chunk-p8k4g99a.js +0 -4
  426. package/dist/chunk-p8k4g99a.js.map +0 -10
  427. package/dist/chunk-pkszgjqf.js +0 -4
  428. package/dist/chunk-pkszgjqf.js.map +0 -10
  429. package/dist/chunk-q9z6tnzw.js +0 -4
  430. package/dist/chunk-q9z6tnzw.js.map +0 -10
  431. package/dist/chunk-qdz5sncz.js +0 -4
  432. package/dist/chunk-qdz5sncz.js.map +0 -10
  433. package/dist/chunk-qe0eww1n.js +0 -4
  434. package/dist/chunk-qe0eww1n.js.map +0 -10
  435. package/dist/chunk-r33zvvda.js +0 -4
  436. package/dist/chunk-r33zvvda.js.map +0 -10
  437. package/dist/chunk-rkh1vkb9.js +0 -4
  438. package/dist/chunk-rrg759ht.js +0 -4
  439. package/dist/chunk-rrg759ht.js.map +0 -10
  440. package/dist/chunk-s09s5ayx.js +0 -4
  441. package/dist/chunk-s09s5ayx.js.map +0 -10
  442. package/dist/chunk-s5p5z3z4.js +0 -4
  443. package/dist/chunk-s5p5z3z4.js.map +0 -10
  444. package/dist/chunk-sf4a2gy5.js +0 -4
  445. package/dist/chunk-sf4a2gy5.js.map +0 -10
  446. package/dist/chunk-ssnnxzrj.js +0 -4
  447. package/dist/chunk-t8xtvgyg.js +0 -4
  448. package/dist/chunk-v3ta7hnv.js +0 -4
  449. package/dist/chunk-v3ta7hnv.js.map +0 -10
  450. package/dist/chunk-v92hp9g0.js +0 -4
  451. package/dist/chunk-v92hp9g0.js.map +0 -10
  452. package/dist/chunk-vgtggzb6.js +0 -4
  453. package/dist/chunk-vk48hgm4.js +0 -4
  454. package/dist/chunk-vk48hgm4.js.map +0 -10
  455. package/dist/chunk-w8s5fnsq.js +0 -4
  456. package/dist/chunk-w8s5fnsq.js.map +0 -10
  457. package/dist/chunk-wd23rn4q.js +0 -4
  458. package/dist/chunk-wds4href.js +0 -4
  459. package/dist/chunk-wds4href.js.map +0 -10
  460. package/dist/chunk-wvd1ffe4.js +0 -4
  461. package/dist/chunk-wwbjz9k4.js +0 -4
  462. package/dist/chunk-wwbjz9k4.js.map +0 -10
  463. package/dist/chunk-x2k0ngpz.js +0 -4
  464. package/dist/chunk-x2k0ngpz.js.map +0 -10
  465. package/dist/chunk-x457d0ap.js +0 -4
  466. package/dist/chunk-x457d0ap.js.map +0 -10
  467. package/dist/chunk-xbhtzkre.js +0 -4
  468. package/dist/chunk-xbhtzkre.js.map +0 -10
  469. package/dist/chunk-y139ycfm.js +0 -4
  470. package/dist/chunk-y139ycfm.js.map +0 -10
  471. package/dist/chunk-z9kxfckm.js +0 -4
  472. package/dist/chunk-z9kxfckm.js.map +0 -10
  473. package/dist/chunk-zx5txex8.js +0 -4
  474. package/dist/chunk-zx5txex8.js.map +0 -10
  475. package/dist/client/hydrator.js +0 -3
  476. package/dist/client/hydrator.js.map +0 -9
  477. package/dist/client/install-hydrator.js +0 -3
  478. package/dist/client/install-hydrator.js.map +0 -10
  479. package/dist/context/context-consumer-bootstrap.js +0 -3
  480. package/dist/context/context-consumer-bootstrap.js.map +0 -9
  481. package/dist/context/context-consumer-runtime.d.ts +0 -34
  482. package/dist/context/context-consumer-runtime.js +0 -3
  483. package/dist/context/context-consumer-runtime.js.map +0 -9
  484. package/dist/context/context-provider.js +0 -3
  485. package/dist/context/context-provider.js.map +0 -9
  486. package/dist/context/context-ssr-bridge.js +0 -3
  487. package/dist/context/context-ssr-bridge.js.map +0 -9
  488. package/dist/context/create-context.js +0 -3
  489. package/dist/context/create-context.js.map +0 -9
  490. package/dist/context/decorators/consume-context.js +0 -3
  491. package/dist/context/decorators/consume-context.js.map +0 -9
  492. package/dist/context/decorators/context-selection-delivery.d.ts +0 -1
  493. package/dist/context/decorators/context-selection-delivery.js +0 -3
  494. package/dist/context/decorators/context-selection-delivery.js.map +0 -9
  495. package/dist/context/decorators/context-selector.js +0 -3
  496. package/dist/context/decorators/context-selector.js.map +0 -9
  497. package/dist/context/decorators/legacy/consume-context.d.ts +0 -3
  498. package/dist/context/decorators/legacy/consume-context.js +0 -3
  499. package/dist/context/decorators/legacy/consume-context.js.map +0 -9
  500. package/dist/context/decorators/legacy/context-selector-field.js +0 -3
  501. package/dist/context/decorators/legacy/context-selector-field.js.map +0 -9
  502. package/dist/context/decorators/legacy/context-selector.js +0 -3
  503. package/dist/context/decorators/legacy/context-selector.js.map +0 -9
  504. package/dist/context/decorators/legacy/provide-context.js +0 -3
  505. package/dist/context/decorators/legacy/provide-context.js.map +0 -9
  506. package/dist/context/decorators/on-context-update.js +0 -3
  507. package/dist/context/decorators/on-context-update.js.map +0 -9
  508. package/dist/context/decorators/provide-context.js +0 -3
  509. package/dist/context/decorators/provide-context.js.map +0 -9
  510. package/dist/context/decorators/standard/consume-context.d.ts +0 -3
  511. package/dist/context/decorators/standard/consume-context.js +0 -3
  512. package/dist/context/decorators/standard/consume-context.js.map +0 -9
  513. package/dist/context/decorators/standard/context-selector-field.js +0 -3
  514. package/dist/context/decorators/standard/context-selector-field.js.map +0 -9
  515. package/dist/context/decorators/standard/context-selector.js +0 -3
  516. package/dist/context/decorators/standard/context-selector.js.map +0 -9
  517. package/dist/context/decorators/standard/provide-context.js +0 -3
  518. package/dist/context/decorators/standard/provide-context.js.map +0 -9
  519. package/dist/context/events.js +0 -3
  520. package/dist/context/events.js.map +0 -9
  521. package/dist/context/hydration-script.js +0 -3
  522. package/dist/context/hydration-script.js.map +0 -9
  523. package/dist/core/custom-element-metadata.d.ts +0 -3
  524. package/dist/core/custom-element-metadata.js +0 -3
  525. package/dist/core/custom-element-metadata.js.map +0 -9
  526. package/dist/core/hydration-codec.js +0 -3
  527. package/dist/core/hydration-codec.js.map +0 -9
  528. package/dist/core/radiant-component-ssr-registry.d.ts +0 -54
  529. package/dist/core/radiant-component-ssr-registry.js +0 -3
  530. package/dist/core/radiant-component-ssr-registry.js.map +0 -9
  531. package/dist/core/radiant-component-ssr.js +0 -3
  532. package/dist/core/radiant-component-ssr.js.map +0 -9
  533. package/dist/core/radiant-component.d.ts +0 -113
  534. package/dist/core/radiant-component.js +0 -3
  535. package/dist/core/radiant-component.js.map +0 -9
  536. package/dist/core/radiant-element.js +0 -3
  537. package/dist/core/radiant-element.js.map +0 -9
  538. package/dist/core/radiant-hydrator-state.js +0 -3
  539. package/dist/core/radiant-hydrator-state.js.map +0 -9
  540. package/dist/core/reactive-jsx-value.js +0 -3
  541. package/dist/core/reactive-jsx-value.js.map +0 -9
  542. package/dist/core/reactive-prop-metadata.js +0 -3
  543. package/dist/core/reactive-prop-metadata.js.map +0 -9
  544. package/dist/core/slot-projection-runtime.js +0 -3
  545. package/dist/core/slot-projection-runtime.js.map +0 -9
  546. package/dist/core/ssr-preparation.js +0 -3
  547. package/dist/core/ssr-preparation.js.map +0 -9
  548. package/dist/decorators/bound.d.ts +0 -5
  549. package/dist/decorators/bound.js +0 -3
  550. package/dist/decorators/bound.js.map +0 -9
  551. package/dist/decorators/bridge.d.ts +0 -8
  552. package/dist/decorators/bridge.js +0 -3
  553. package/dist/decorators/bridge.js.map +0 -9
  554. package/dist/decorators/custom-element.js +0 -3
  555. package/dist/decorators/custom-element.js.map +0 -9
  556. package/dist/decorators/debounce.d.ts +0 -6
  557. package/dist/decorators/debounce.js +0 -3
  558. package/dist/decorators/debounce.js.map +0 -9
  559. package/dist/decorators/event.js +0 -3
  560. package/dist/decorators/event.js.map +0 -9
  561. package/dist/decorators/legacy/bound.js +0 -3
  562. package/dist/decorators/legacy/bound.js.map +0 -9
  563. package/dist/decorators/legacy/custom-element.js +0 -3
  564. package/dist/decorators/legacy/custom-element.js.map +0 -9
  565. package/dist/decorators/legacy/debounce.js +0 -3
  566. package/dist/decorators/legacy/debounce.js.map +0 -9
  567. package/dist/decorators/legacy/event.js +0 -3
  568. package/dist/decorators/legacy/event.js.map +0 -9
  569. package/dist/decorators/legacy/instance-initializers.d.ts +0 -17
  570. package/dist/decorators/legacy/instance-initializers.js +0 -3
  571. package/dist/decorators/legacy/instance-initializers.js.map +0 -9
  572. package/dist/decorators/legacy/on-event.js +0 -3
  573. package/dist/decorators/legacy/on-event.js.map +0 -9
  574. package/dist/decorators/legacy/on-updated.d.ts +0 -6
  575. package/dist/decorators/legacy/on-updated.js +0 -3
  576. package/dist/decorators/legacy/on-updated.js.map +0 -9
  577. package/dist/decorators/legacy/query-slot.d.ts +0 -3
  578. package/dist/decorators/legacy/query-slot.js +0 -3
  579. package/dist/decorators/legacy/query-slot.js.map +0 -9
  580. package/dist/decorators/legacy/query.js +0 -3
  581. package/dist/decorators/legacy/query.js.map +0 -9
  582. package/dist/decorators/legacy/reactive-field.js +0 -3
  583. package/dist/decorators/legacy/reactive-field.js.map +0 -9
  584. package/dist/decorators/legacy/reactive-prop.d.ts +0 -20
  585. package/dist/decorators/legacy/reactive-prop.js +0 -3
  586. package/dist/decorators/legacy/reactive-prop.js.map +0 -9
  587. package/dist/decorators/legacy/signal.js +0 -3
  588. package/dist/decorators/legacy/signal.js.map +0 -9
  589. package/dist/decorators/on-event.js +0 -3
  590. package/dist/decorators/on-event.js.map +0 -9
  591. package/dist/decorators/on-updated.d.ts +0 -5
  592. package/dist/decorators/on-updated.js +0 -3
  593. package/dist/decorators/on-updated.js.map +0 -9
  594. package/dist/decorators/prop.d.ts +0 -14
  595. package/dist/decorators/prop.js +0 -3
  596. package/dist/decorators/prop.js.map +0 -9
  597. package/dist/decorators/query-slot.d.ts +0 -13
  598. package/dist/decorators/query-slot.js +0 -3
  599. package/dist/decorators/query-slot.js.map +0 -9
  600. package/dist/decorators/query.js +0 -3
  601. package/dist/decorators/query.js.map +0 -9
  602. package/dist/decorators/signal.d.ts +0 -23
  603. package/dist/decorators/signal.js +0 -3
  604. package/dist/decorators/signal.js.map +0 -9
  605. package/dist/decorators/standard/bound.js +0 -3
  606. package/dist/decorators/standard/bound.js.map +0 -9
  607. package/dist/decorators/standard/custom-element.js +0 -3
  608. package/dist/decorators/standard/custom-element.js.map +0 -9
  609. package/dist/decorators/standard/debounce.js +0 -3
  610. package/dist/decorators/standard/debounce.js.map +0 -9
  611. package/dist/decorators/standard/event.js +0 -3
  612. package/dist/decorators/standard/event.js.map +0 -9
  613. package/dist/decorators/standard/on-event.js +0 -3
  614. package/dist/decorators/standard/on-event.js.map +0 -9
  615. package/dist/decorators/standard/on-updated.d.ts +0 -2
  616. package/dist/decorators/standard/on-updated.js +0 -3
  617. package/dist/decorators/standard/on-updated.js.map +0 -9
  618. package/dist/decorators/standard/query-slot.js +0 -3
  619. package/dist/decorators/standard/query-slot.js.map +0 -9
  620. package/dist/decorators/standard/query.d.ts +0 -2
  621. package/dist/decorators/standard/query.js +0 -3
  622. package/dist/decorators/standard/query.js.map +0 -9
  623. package/dist/decorators/standard/reactive-field.d.ts +0 -2
  624. package/dist/decorators/standard/reactive-field.js +0 -3
  625. package/dist/decorators/standard/reactive-field.js.map +0 -9
  626. package/dist/decorators/standard/reactive-prop.d.ts +0 -2
  627. package/dist/decorators/standard/reactive-prop.js +0 -3
  628. package/dist/decorators/standard/reactive-prop.js.map +0 -9
  629. package/dist/decorators/standard/signal.js +0 -3
  630. package/dist/decorators/standard/signal.js.map +0 -9
  631. package/dist/decorators/state.d.ts +0 -11
  632. package/dist/decorators/state.js +0 -3
  633. package/dist/decorators/state.js.map +0 -9
  634. package/dist/helpers/create-event-listener.js +0 -3
  635. package/dist/helpers/create-event-listener.js.map +0 -9
  636. package/dist/helpers/create-event.js +0 -3
  637. package/dist/helpers/create-event.js.map +0 -9
  638. package/dist/helpers/create-query-slot.js +0 -3
  639. package/dist/helpers/create-query-slot.js.map +0 -9
  640. package/dist/helpers/create-query.js +0 -3
  641. package/dist/helpers/create-query.js.map +0 -9
  642. package/dist/helpers/debounce.js +0 -3
  643. package/dist/helpers/debounce.js.map +0 -9
  644. package/dist/helpers/index.js +0 -3
  645. package/dist/helpers/index.js.map +0 -9
  646. package/dist/index.d.ts +0 -25
  647. package/dist/index.js +0 -3
  648. package/dist/index.js.map +0 -9
  649. package/dist/server/context-ssr.js +0 -3
  650. package/dist/server/context-ssr.js.map +0 -9
  651. package/dist/server/html-parser.js +0 -3
  652. package/dist/server/html-parser.js.map +0 -9
  653. package/dist/server/install-light-dom-shim.js +0 -3
  654. package/dist/server/install-light-dom-shim.js.map +0 -10
  655. package/dist/server/light-dom-shim.js +0 -3
  656. package/dist/server/light-dom-shim.js.map +0 -9
  657. package/dist/server/project-root.js +0 -3
  658. package/dist/server/radiant-component-ssr-runtime.d.ts +0 -9
  659. package/dist/server/radiant-component-ssr-runtime.js +0 -3
  660. package/dist/server/radiant-component-ssr-runtime.js.map +0 -9
  661. package/dist/server/render-component.js +0 -3
  662. package/dist/server/render-component.js.map +0 -10
  663. package/dist/server/slot-projection-html.js +0 -3
  664. package/dist/server/slot-projection-html.js.map +0 -10
  665. package/dist/signals/host-resource.js +0 -3
  666. package/dist/signals/host-signal.js +0 -3
  667. package/dist/signals/host-signal.js.map +0 -9
  668. package/dist/signals/hydration-script.js +0 -3
  669. package/dist/signals/hydration-script.js.map +0 -9
  670. package/dist/tools/escape-script-json.js +0 -3
  671. package/dist/tools/escape-script-json.js.map +0 -9
  672. package/dist/tools/event-emitter.js +0 -3
  673. package/dist/tools/event-emitter.js.map +0 -9
  674. package/dist/tools/index.js +0 -3
  675. package/dist/tools/index.js.map +0 -9
  676. package/dist/tools/render-jsx-template.js +0 -3
  677. package/dist/tools/render-jsx-template.js.map +0 -9
  678. package/dist/tools/stringify-typed.d.ts +0 -16
  679. package/dist/tools/stringify-typed.js +0 -3
  680. package/dist/tools/stringify-typed.js.map +0 -9
  681. package/dist/types.js +0 -3
  682. package/dist/utils/attribute-utils.js +0 -3
  683. package/dist/utils/attribute-utils.js.map +0 -9
  684. package/dist/utils/index.js +0 -3
  685. package/dist/utils/index.js.map +0 -9
  686. package/size-budget.json +0 -16
  687. /package/{dist/client → client}/install-hydrator.d.ts +0 -0
  688. /package/{dist/context → context}/context-ssr-bridge.d.ts +0 -0
  689. /package/{dist/context → context}/create-context.d.ts +0 -0
  690. /package/{dist/context → context}/hydration-script.d.ts +0 -0
  691. /package/{dist/context → context}/types.d.ts +0 -0
  692. /package/{dist/context → context}/types.js +0 -0
  693. /package/{dist/context → context}/types.js.map +0 -0
  694. /package/{dist/core → core}/slot-projection-runtime.d.ts +0 -0
  695. /package/{dist/core → core}/ssr-hydration-binding.d.ts +0 -0
  696. /package/{dist/core → core}/ssr-hydration-binding.js +0 -0
  697. /package/{dist/core → core}/ssr-hydration-binding.js.map +0 -0
  698. /package/{dist/core → core}/ssr-preparation.d.ts +0 -0
  699. /package/{dist/decorators → decorators}/legacy/bound.d.ts +0 -0
  700. /package/{dist/decorators → decorators}/legacy/custom-element.d.ts +0 -0
  701. /package/{dist/decorators → decorators}/legacy/debounce.d.ts +0 -0
  702. /package/{dist/decorators → decorators}/legacy/event.d.ts +0 -0
  703. /package/{dist/decorators → decorators}/standard/bound.d.ts +0 -0
  704. /package/{dist/decorators → decorators}/standard/custom-element.d.ts +0 -0
  705. /package/{dist/decorators → decorators}/standard/debounce.d.ts +0 -0
  706. /package/{dist/decorators → decorators}/standard/event.d.ts +0 -0
  707. /package/{dist/helpers → helpers}/create-event.d.ts +0 -0
  708. /package/{dist/helpers → helpers}/debounce.d.ts +0 -0
  709. /package/{dist/helpers → helpers}/index.d.ts +0 -0
  710. /package/{dist/server → server}/context-ssr.d.ts +0 -0
  711. /package/{dist/server → server}/html-parser.d.ts +0 -0
  712. /package/{dist/server → server}/install-light-dom-shim.d.ts +0 -0
  713. /package/{dist/server → server}/project-root.d.ts +0 -0
  714. /package/{dist/server → server}/slot-projection-html.d.ts +0 -0
  715. /package/{dist/signals → signals}/host-resource.d.ts +0 -0
  716. /package/{dist/signals → signals}/hydration-script.d.ts +0 -0
  717. /package/{dist/tools → tools}/escape-script-json.d.ts +0 -0
  718. /package/{dist/tools → tools}/event-emitter.d.ts +0 -0
  719. /package/{dist/tools → tools}/render-jsx-template.d.ts +0 -0
  720. /package/{dist/types.d.ts → types.d.ts} +0 -0
  721. /package/{dist/utils → utils}/attribute-utils.d.ts +0 -0
  722. /package/{dist/utils → utils}/index.d.ts +0 -0
package/README.md CHANGED
@@ -1,8 +1,8 @@
1
1
  # Radiant
2
2
 
3
- Radiant is a light-DOM custom element library.
3
+ Radiant is a light-DOM platform for custom elements and DOM-attached controllers.
4
4
 
5
- It keeps browser primitives visible instead of wrapping them in a synthetic component model. You work with real custom elements, real DOM events, real attributes, and real light-DOM children. When you want JSX-backed rendering, SSR host serialization, and hydration, use `RadiantComponent`. When you want a more imperative base without JSX, use `RadiantElement`.
5
+ It keeps browser primitives visible instead of wrapping them in a synthetic component model. You work with real custom elements, real DOM events, real attributes, and real light-DOM children. Use `RadiantElement` when you want reactive fields, JSX-backed rendering, SSR host serialization, and hydration on a real custom element. Use `RadiantController` when you want behavior attached to existing DOM instead of defining a custom element.
6
6
 
7
7
  Radiant deliberately does not use shadow DOM by default. That makes styling, DOM inspection, and authored child content simpler, while giving up some of the encapsulation that conventional custom-element guidance usually prefers.
8
8
 
@@ -10,19 +10,21 @@ For the full docs site, see [radiant.ecopages.app](https://radiant.ecopages.app/
10
10
 
11
11
  ## Installation
12
12
 
13
- `@ecopages/radiant` currently expects both `@ecopages/signals` and `@ecopages/jsx` as peer dependencies.
13
+ `@ecopages/radiant` is the core package. `@ecopages/jsx` and `@ecopages/signals` are companion packages for TSX rendering and standalone signals.
14
+
15
+ `@ecopages/radiant` currently declares both companion packages as peer dependencies.
14
16
 
15
17
  Install all three packages:
16
18
 
17
19
  ```sh
18
- bun install @ecopages/radiant @ecopages/signals @ecopages/jsx
20
+ bun add @ecopages/radiant @ecopages/signals @ecopages/jsx
19
21
  ```
20
22
 
21
- Important: even if you are starting from `RadiantElement`, the current package surface still depends on `@ecopages/jsx`.
23
+ Application code does not need to import JSX helpers or Signals primitives directly for every feature, but the current published Radiant surface expects both companion packages to be installed alongside it.
22
24
 
23
- ## RadiantComponent Mental Model
25
+ ## RadiantElement Mental Model
24
26
 
25
- `RadiantComponent` is the structured JSX-first base class.
27
+ `RadiantElement` is the structured base class for reactive custom elements.
26
28
 
27
29
  - `render()` returns the current JSX view.
28
30
  - First connect automatically chooses between hydration and a fresh client render.
@@ -39,17 +41,17 @@ The key distinction is this:
39
41
  - Use bindings such as `this.$.count` when the shape of the view stays the same and only child values need to change.
40
42
  - Use `update()` or `requestUpdate()` when a reactive change affects the structure of the JSX tree.
41
43
 
42
- Signal and store reads performed directly inside `render()` also participate in rerender invalidation, so shared reactive data can drive `RadiantComponent` views without an extra wrapper layer.
44
+ Signal and store reads performed directly inside `render()` also participate in rerender invalidation, so shared reactive data can drive `RadiantElement` views without an extra wrapper layer.
43
45
 
44
46
  ## Counter Example
45
47
 
46
- This counter shows the intended `RadiantComponent` style for stable templates: public props stay explicit, internal state stays local, and bound child values update without forcing a full rerender of the whole template.
48
+ This counter shows the intended `RadiantElement` style for stable templates: public props stay explicit, internal state stays local, and bound child values update without forcing a full rerender of the whole template.
47
49
 
48
50
  ```tsx
49
51
  /** @jsxImportSource @ecopages/jsx */
50
52
 
51
53
  import type { JsxCustomElementAttributes } from '@ecopages/jsx';
52
- import { RadiantComponent, customElement, prop, state } from '@ecopages/radiant';
54
+ import { RadiantElement, customElement, prop, state } from '@ecopages/radiant';
53
55
 
54
56
  type CounterCardBindings = {
55
57
  count: number;
@@ -61,7 +63,7 @@ type CounterCardAttributes = {
61
63
  };
62
64
 
63
65
  @customElement('counter-card')
64
- export class CounterCard extends RadiantComponent<CounterCardBindings> {
66
+ export class CounterCard extends RadiantElement<CounterCardBindings> {
65
67
  @prop({ type: String, defaultValue: 'Clicks' }) label!: string;
66
68
  @state count = 0;
67
69
 
@@ -104,9 +106,9 @@ If the same type truly represents both internal bindings and public JSX attribut
104
106
  Call `update()` or `requestUpdate()` when a reactive change affects which elements should exist, not just their child values.
105
107
 
106
108
  ```ts
107
- import { RadiantComponent, onUpdated, state } from '@ecopages/radiant';
109
+ import { RadiantElement, onUpdated, state } from '@ecopages/radiant';
108
110
 
109
- export class ResultsPanel extends RadiantComponent<{ expanded: boolean }> {
111
+ export class ResultsPanel extends RadiantElement<{ expanded: boolean }> {
110
112
  @state expanded = false;
111
113
 
112
114
  @onUpdated('expanded')
@@ -122,7 +124,7 @@ Use `update()` when you want the rerender immediately. Use `requestUpdate()` whe
122
124
 
123
125
  Bindings are the non-obvious part of the API, and they are worth being explicit about.
124
126
 
125
- `RadiantComponent<Bindings>` and `RadiantElement<Bindings>` take a dedicated binding shape, not the full class type. That keeps the binding namespace limited to the reactive props or fields you want JSX to consume.
127
+ `RadiantElement<Bindings>` takes a dedicated binding shape, not the full class type. That keeps the binding namespace limited to the reactive props or fields you want JSX to consume.
126
128
 
127
129
  These three forms are equivalent:
128
130
 
@@ -142,16 +144,16 @@ Use `@onUpdated(...)` with `update()` or `requestUpdate()` when the reactive cha
142
144
 
143
145
  ## SSR And Hydration
144
146
 
145
- `RadiantComponent` has two SSR surfaces:
147
+ `RadiantElement` has two SSR surfaces:
146
148
 
147
149
  - `renderToString()` serializes the component view only.
148
150
  - `renderHostToString()` serializes the custom-element host together with the current view.
149
151
 
150
152
  In practice, `renderHostToString()` is the right default for full component SSR because it emits `<my-element>...</my-element>` instead of only the view fragment.
151
153
 
152
- `hydrate: true` adds hydration markers for the component view. First-connect hydration is now explicit: SSR pages should import `@ecopages/radiant/client/install-hydrator` before loading component modules, or call `installRadiantHydrator()` from `@ecopages/radiant/client/hydrator` before custom elements upgrade. Without that client hydrator gate, SSR hosts fall back to a fresh client render on first connect.
154
+ `mode: 'hydrate'` adds hydration markers for the component view. First-connect hydration is now explicit: SSR pages should import `@ecopages/radiant/client/install-hydrator` before loading component modules, or call `installRadiantHydrator()` from `@ecopages/radiant/client/hydrator` before custom elements upgrade. Without that client hydrator gate, SSR hosts fall back to a fresh client render on first connect.
153
155
 
154
- For component-owned SSR, the instance methods still work. For adapters, fragment responses, and shared server utilities, prefer the explicit helpers under `@ecopages/radiant/server/render-component`.
156
+ For element-owned SSR, the instance methods still work. For adapters, fragment responses, and shared server utilities, prefer the explicit helpers under `@ecopages/radiant/server/render-component`.
155
157
 
156
158
  Server runtime setup, fragment rendering helpers, and SSR-specific import guidance now live in [src/server/README.md](src/server/README.md).
157
159
 
@@ -161,12 +163,12 @@ For the client lifecycle and hydration flow diagram, see [src/core/README.md](sr
161
163
 
162
164
  Radiant does not invent a synthetic event layer. JSX handlers and decorators work with the native browser event object directly.
163
165
 
164
- | Use this | When you want | Runtime shape |
165
- | -------------------- | ----------------------------------------------------------------- | ------------------------------------------------------------------------------------------------ |
166
- | `on:*` in JSX | The normal event API | Auto-delegates a fixed allowlist of bubbling events and falls back to direct listeners otherwise |
167
- | `on-native:*` in JSX | Exact element-level browser listener semantics | Always calls `addEventListener(...)` on that element |
168
- | `@onEvent(...)` | Class-level listening from `RadiantElement` or `RadiantComponent` | Supports `selector`, `ref`, `window`, and `document` targets |
169
- | `@event(...)` | A typed custom event emitter owned by the component | Dispatches a real `CustomEvent` from the host element |
166
+ | Use this | When you want | Runtime shape |
167
+ | -------------------- | --------------------------------------------------- | ------------------------------------------------------------------------------------------------ |
168
+ | `on:*` in JSX | The normal event API | Auto-delegates a fixed allowlist of bubbling events and falls back to direct listeners otherwise |
169
+ | `on-native:*` in JSX | Exact element-level browser listener semantics | Always calls `addEventListener(...)` on that element |
170
+ | `@onEvent(...)` | Class-level listening from `RadiantElement` | Supports `selector`, `ref`, `window`, and `document` targets |
171
+ | `@event(...)` | A typed custom event emitter owned by the component | Dispatches a real `CustomEvent` from the host element |
170
172
 
171
173
  ### How JSX Event Binding Works
172
174
 
@@ -211,10 +213,10 @@ At the class level, `@onEvent(...)` is the main decorator for incoming DOM event
211
213
  ```tsx
212
214
  /** @jsxImportSource @ecopages/jsx */
213
215
 
214
- import { RadiantComponent, customElement, onEvent, state } from '@ecopages/radiant';
216
+ import { RadiantElement, customElement, onEvent, state } from '@ecopages/radiant';
215
217
 
216
218
  @customElement('keyboard-panel')
217
- export class KeyboardPanel extends RadiantComponent<{ lastKey: string }> {
219
+ export class KeyboardPanel extends RadiantElement<{ lastKey: string }> {
218
220
  @state lastKey = 'none';
219
221
 
220
222
  @onEvent({ document: true, type: 'keydown' })
@@ -265,40 +267,49 @@ The mental model stays simple:
265
267
 
266
268
  These are the documented public import paths exposed by the package.
267
269
 
268
- | Path | Use for |
269
- | --------------------------------------------- | --------------------------------------------------------------------------------------------------------------- |
270
- | `@ecopages/radiant` | Main client entrypoint. Re-exports `RadiantElement`, `RadiantComponent`, common decorators, and context helpers |
271
- | `@ecopages/radiant/context` | Context-related exports as a grouped entrypoint |
272
- | `@ecopages/radiant/context/create-context` | Creating context keys |
273
- | `@ecopages/radiant/context/context-provider` | Low-level context provider class |
274
- | `@ecopages/radiant/context/consume-context` | `@consumeContext(...)` decorator |
275
- | `@ecopages/radiant/context/provide-context` | `@provideContext(...)` decorator |
276
- | `@ecopages/radiant/context/context-selector` | `@contextSelector(...)` decorator — bind a field to context |
277
- | `@ecopages/radiant/context/on-context-update` | `@onContextUpdate(...)` decorator — run a method on context change |
278
- | `@ecopages/radiant/core/radiant-element` | Non-JSX reactive custom-element base |
279
- | `@ecopages/radiant/core/radiant-component` | JSX-first component base |
280
- | `@ecopages/radiant/client/hydrator` | Explicit client hydrator installer and status helpers for SSR pages |
281
- | `@ecopages/radiant/client/install-hydrator` | Side-effect entrypoint that enables first-connect hydration before component modules load |
282
- | `@ecopages/radiant/signals/host-resource` | Low-level `HostResource`, `createHostResource(...)`, and `createResource(...)` helpers |
283
- | `@ecopages/radiant/server/light-dom-shim` | Minimal SSR window and host-preparation helpers |
284
- | `@ecopages/radiant/server/render-component` | Canonical component SSR helpers and metadata utilities |
285
- | `@ecopages/radiant/server/project-root` | Project-root resolution helper for server adapters |
286
- | `@ecopages/radiant/decorators/bound` | `@bound` |
287
- | `@ecopages/radiant/decorators/custom-element` | `@customElement(...)` |
288
- | `@ecopages/radiant/decorators/debounce` | `@debounce(...)` |
289
- | `@ecopages/radiant/decorators/event` | `@event(...)` |
290
- | `@ecopages/radiant/decorators/on-event` | `@onEvent(...)` |
291
- | `@ecopages/radiant/decorators/on-updated` | `@onUpdated(...)` |
292
- | `@ecopages/radiant/decorators/prop` | `@prop(...)` |
293
- | `@ecopages/radiant/decorators/query` | `@query(...)` |
294
- | `@ecopages/radiant/decorators/query-slot` | `@querySlot(...)` |
295
- | `@ecopages/radiant/decorators/signal` | `@signal(...)` |
296
- | `@ecopages/radiant/decorators/state` | `@state` |
297
- | `@ecopages/radiant/tools/stringify-typed` | Typed attribute serialization helper |
298
- | `@ecopages/radiant/tools/render-jsx-template` | Render a JSX template result into an existing host |
299
- | `@ecopages/radiant/tools/escape-script-json` | Safe JSON-for-script serialization helper |
300
- | `@ecopages/radiant/tools/event-emitter` | Low-level `EventEmitter` helper |
301
-
302
- Import component bases, decorators, and context helpers from the root entrypoint. Import server and low-level tool helpers from their explicit public subpaths.
270
+ | Path | Use for |
271
+ | ------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
272
+ | `@ecopages/radiant` | Main client entrypoint. Re-exports `RadiantElement`, `RadiantController`, reactive JSX bindings, common decorators, and controller-registry helpers such as `startControllers(...)` |
273
+ | `@ecopages/radiant/context` | Context-related exports as a grouped entrypoint |
274
+ | `@ecopages/radiant/context/create-context` | Creating context keys |
275
+ | `@ecopages/radiant/context/context-provider` | Low-level context provider class |
276
+ | `@ecopages/radiant/context/consume-context` | `@consumeContext(...)` decorator |
277
+ | `@ecopages/radiant/context/provide-context` | `@provideContext(...)` decorator |
278
+ | `@ecopages/radiant/context/context-selector` | `@contextSelector(...)` decorator — bind a field to context |
279
+ | `@ecopages/radiant/context/on-context-update` | `@onContextUpdate(...)` decorator — run a method on context change |
280
+ | `@ecopages/radiant/controller-registry` | Controller registration and activation helpers |
281
+ | `@ecopages/radiant/core/radiant-element` | Non-JSX reactive custom-element base |
282
+ | `@ecopages/radiant/core/radiant-controller` | DOM-attached controller base |
283
+ | `@ecopages/radiant/helpers/create-query` | Low-level query helper for component fields |
284
+ | `@ecopages/radiant/helpers/create-query-slot` | Low-level slot query helper for component fields |
285
+ | `@ecopages/radiant/helpers/create-event` | Low-level typed custom-event helper |
286
+ | `@ecopages/radiant/helpers/create-event-listener` | Low-level DOM event-listener helper |
287
+ | `@ecopages/radiant/client/hydrator` | Explicit client hydrator installer and status helpers for SSR pages |
288
+ | `@ecopages/radiant/client/install-hydrator` | Side-effect entrypoint that enables first-connect hydration before component modules load |
289
+ | `@ecopages/radiant/signals/host-resource` | Low-level `HostResource`, `createHostResource(...)`, and `createResource(...)` helpers |
290
+ | `@ecopages/radiant/server/light-dom-shim` | Minimal SSR window and host-preparation helpers |
291
+ | `@ecopages/radiant/server/render-component` | Canonical component SSR helpers and shared fragment metadata utilities |
292
+ | `@ecopages/radiant/server/render-controller` | Controller-host SSR helpers and controller-specific host option types |
293
+ | `@ecopages/radiant/server/project-root` | Project-root resolution helper for server adapters |
294
+ | `@ecopages/radiant/decorators/bound` | `@bound` |
295
+ | `@ecopages/radiant/decorators/custom-element` | `@customElement(...)` |
296
+ | `@ecopages/radiant/decorators/debounce` | `@debounce(...)` |
297
+ | `@ecopages/radiant/decorators/event` | `@event(...)` |
298
+ | `@ecopages/radiant/decorators/on-event` | `@onEvent(...)` |
299
+ | `@ecopages/radiant/decorators/on-updated` | `@onUpdated(...)` |
300
+ | `@ecopages/radiant/decorators/prop` | `@prop(...)` |
301
+ | `@ecopages/radiant/decorators/query` | `@query(...)` |
302
+ | `@ecopages/radiant/decorators/query-slot` | `@querySlot(...)` |
303
+ | `@ecopages/radiant/decorators/signal` | `@signal(...)` |
304
+ | `@ecopages/radiant/decorators/state` | `@state` |
305
+ | `@ecopages/radiant/tools/render-jsx-template` | Render a JSX template result into an existing host |
306
+ | `@ecopages/radiant/tools/escape-script-json` | Safe JSON-for-script serialization helper |
307
+ | `@ecopages/radiant/tools/event-emitter` | Low-level `EventEmitter` helper |
308
+
309
+ Prefer focused public subpaths when bundle size matters or when a module only needs one narrow runtime surface. The root entrypoint remains the ergonomic default for common app code, but context, registry, helper, server, signal-resource, and low-level tool imports are better taken from their explicit public subpaths.
310
+
311
+ For controller authoring, prefer a single import surface per module. If a file mixes `RadiantController`, `@controller(...)`, `@state`, `@attr(...)`, or `startControllers(...)`, default to `@ecopages/radiant` so controller registration and startup come from the same entrypoint.
312
+
313
+ Important: context APIs, controller registry helpers, helper factories, server APIs, and low-level tools have explicit public subpaths. Prefer those focused paths for library and adapter code, or when a module intentionally wants only the registry runtime without the broader client surface; the root entrypoint remains the ergonomic app entrypoint for the common client surface.
303
314
 
304
315
  For SSR-specific guidance and examples, see [src/server/README.md](src/server/README.md).
@@ -0,0 +1,19 @@
1
+ import type { JsxRenderable } from '@ecopages/jsx';
2
+ export type RadiantAppBootstrapContext = {
3
+ documentRoot: Document;
4
+ rootElement: HTMLElement;
5
+ shouldHydrate: boolean;
6
+ };
7
+ export type RadiantAppBootstrapResult<AppProps> = {
8
+ appProps: AppProps;
9
+ onStarted?: () => void | Promise<void>;
10
+ };
11
+ export type RadiantAppBootstrap<AppProps> = (context: RadiantAppBootstrapContext) => void | RadiantAppBootstrapResult<AppProps> | Promise<void | RadiantAppBootstrapResult<AppProps>>;
12
+ export declare function prepareRadiantApp<AppProps = void>({ app, bootstrap, context, }: {
13
+ app: (props: AppProps) => JsxRenderable;
14
+ bootstrap?: RadiantAppBootstrap<AppProps>;
15
+ context: RadiantAppBootstrapContext;
16
+ }): Promise<{
17
+ app: JsxRenderable;
18
+ onStarted?: () => void | Promise<void>;
19
+ }>;
@@ -0,0 +1,3 @@
1
+ var a=((p)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(p,{get:(t,o)=>(typeof require<"u"?require:t)[o]}):p)(function(p){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+p+'" is not supported')});async function s({app:p,bootstrap:t,context:o}){let e=await t?.(o);return{app:p(e?.appProps??void 0),onStarted:e?.onStarted}}export{s as prepareRadiantApp};
2
+
3
+ //# debugId=CED638BAFDDA666064756E2164756E21
@@ -0,0 +1,10 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/client/app-bootstrap.ts"],
4
+ "sourcesContent": [
5
+ "import type { JsxRenderable } from '@ecopages/jsx';\n\nexport type RadiantAppBootstrapContext = {\n\tdocumentRoot: Document;\n\trootElement: HTMLElement;\n\tshouldHydrate: boolean;\n};\n\nexport type RadiantAppBootstrapResult<AppProps> = {\n\tappProps: AppProps;\n\tonStarted?: () => void | Promise<void>;\n};\n\nexport type RadiantAppBootstrap<AppProps> = (\n\tcontext: RadiantAppBootstrapContext,\n) => void | RadiantAppBootstrapResult<AppProps> | Promise<void | RadiantAppBootstrapResult<AppProps>>;\n\nexport async function prepareRadiantApp<AppProps = void>({\n\tapp,\n\tbootstrap,\n\tcontext,\n}: {\n\tapp: (props: AppProps) => JsxRenderable;\n\tbootstrap?: RadiantAppBootstrap<AppProps>;\n\tcontext: RadiantAppBootstrapContext;\n}): Promise<{ app: JsxRenderable; onStarted?: () => void | Promise<void> }> {\n\tconst bootstrapResult = await bootstrap?.(context);\n\n\treturn {\n\t\tapp: app((bootstrapResult?.appProps ?? undefined) as AppProps),\n\t\tonStarted: bootstrapResult?.onStarted,\n\t};\n}\n"
6
+ ],
7
+ "mappings": "2PAiBA,eAAsB,CAAkC,EACvD,MACA,YACA,WAK2E,CAC3E,IAAM,EAAkB,MAAM,IAAY,CAAO,EAEjD,MAAO,CACN,IAAK,EAAK,GAAiB,UAAY,MAAsB,EAC7D,UAAW,GAAiB,SAC7B",
8
+ "debugId": "CED638BAFDDA666064756E2164756E21",
9
+ "names": []
10
+ }
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Enables first-connect hydration for SSR-rendered RadiantComponent hosts.
2
+ * Enables first-connect hydration for SSR-rendered RadiantElement hosts.
3
3
  *
4
4
  * Import this from SSR pages before loading component modules so upgraded
5
5
  * custom elements hydrate their existing DOM instead of performing a fresh
@@ -0,0 +1,3 @@
1
+ var C=((f)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(f,{get:(v,z)=>(typeof require<"u"?require:v)[z]}):f)(function(f){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+f+'" is not supported')});var j=Symbol.for("@ecopages/radiant.hydrator-installed");function k(){globalThis[j]=!0}function m(){delete globalThis[j]}function q(){return globalThis[j]===!0}function K(){k()}function P(){m()}function Q(){return q()}export{P as uninstallRadiantHydrator,K as installRadiantHydrator,Q as hasRadiantHydrator};
2
+
3
+ //# debugId=44CC84C7C166F16C64756E2164756E21
@@ -0,0 +1,11 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/core/radiant-hydrator-state.ts", "../src/client/hydrator.ts"],
4
+ "sourcesContent": [
5
+ "const RADIANT_HYDRATOR_INSTALLED_SYMBOL = Symbol.for('@ecopages/radiant.hydrator-installed');\n\ntype GlobalHydratorState = typeof globalThis & Record<PropertyKey, unknown>;\n\n/**\n * Marks the current JavaScript environment as hydration-enabled for first\n * custom-element connect.\n *\n * `RadiantElement` reads this flag before deciding whether SSR markup should\n * hydrate in place or be replaced by a fresh client render.\n */\nexport function installRadiantHydratorState(): void {\n\t(globalThis as GlobalHydratorState)[RADIANT_HYDRATOR_INSTALLED_SYMBOL] = true;\n}\n\n/**\n * Clears the explicit hydration-enabled flag from `globalThis`.\n *\n * This is mainly used by tests so they can assert both hydrated and non-\n * hydrated first-connect behavior deterministically.\n */\nexport function uninstallRadiantHydratorState(): void {\n\tdelete (globalThis as GlobalHydratorState)[RADIANT_HYDRATOR_INSTALLED_SYMBOL];\n}\n\n/**\n * Returns whether first-connect hydration is currently enabled for this\n * JavaScript environment.\n */\nexport function isRadiantHydratorInstalled(): boolean {\n\treturn (globalThis as GlobalHydratorState)[RADIANT_HYDRATOR_INSTALLED_SYMBOL] === true;\n}\n",
6
+ "import {\n\tisRadiantHydratorInstalled,\n\tinstallRadiantHydratorState,\n\tuninstallRadiantHydratorState,\n} from '../core/radiant-hydrator-state';\n\n/**\n * Enables first-connect hydration for SSR-rendered RadiantElement hosts.\n *\n * Import this from SSR pages before loading component modules so upgraded\n * custom elements hydrate their existing DOM instead of performing a fresh\n * client render on first connect.\n */\nexport function installRadiantHydrator(): void {\n\tinstallRadiantHydratorState();\n}\n\n/**\n * Disables the explicit Radiant hydrator gate.\n *\n * This is primarily useful for tests and controlled bootstrap scenarios where\n * SSR hosts should intentionally fall back to a fresh client render.\n */\nexport function uninstallRadiantHydrator(): void {\n\tuninstallRadiantHydratorState();\n}\n\n/**\n * Returns whether the explicit Radiant hydrator gate is currently enabled.\n */\nexport function hasRadiantHydrator(): boolean {\n\treturn isRadiantHydratorInstalled();\n}\n"
7
+ ],
8
+ "mappings": "2PAAA,IAAM,EAAoC,OAAO,IAAI,sCAAsC,EAWpF,SAAS,CAA2B,EAAS,CAClD,WAAmC,GAAqC,GASnE,SAAS,CAA6B,EAAS,CACrD,OAAQ,WAAmC,GAOrC,SAAS,CAA0B,EAAY,CACrD,OAAQ,WAAmC,KAAuC,GCjB5E,SAAS,CAAsB,EAAS,CAC9C,EAA4B,EAStB,SAAS,CAAwB,EAAS,CAChD,EAA8B,EAMxB,SAAS,CAAkB,EAAY,CAC7C,OAAO,EAA2B",
9
+ "debugId": "44CC84C7C166F16C64756E2164756E21",
10
+ "names": []
11
+ }
@@ -0,0 +1,3 @@
1
+ var C=((m)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(m,{get:(v,z)=>(typeof require<"u"?require:v)[z]}):m)(function(m){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+m+'" is not supported')});var f=Symbol.for("@ecopages/radiant.hydrator-installed");function j(){globalThis[f]=!0}function k(){delete globalThis[f]}function p(){return globalThis[f]===!0}function q(){j()}function K(){k()}function P(){return p()}q();
2
+
3
+ //# debugId=AE046A6617778EC864756E2164756E21
@@ -0,0 +1,12 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/core/radiant-hydrator-state.ts", "../src/client/hydrator.ts", "../src/client/install-hydrator.ts"],
4
+ "sourcesContent": [
5
+ "const RADIANT_HYDRATOR_INSTALLED_SYMBOL = Symbol.for('@ecopages/radiant.hydrator-installed');\n\ntype GlobalHydratorState = typeof globalThis & Record<PropertyKey, unknown>;\n\n/**\n * Marks the current JavaScript environment as hydration-enabled for first\n * custom-element connect.\n *\n * `RadiantElement` reads this flag before deciding whether SSR markup should\n * hydrate in place or be replaced by a fresh client render.\n */\nexport function installRadiantHydratorState(): void {\n\t(globalThis as GlobalHydratorState)[RADIANT_HYDRATOR_INSTALLED_SYMBOL] = true;\n}\n\n/**\n * Clears the explicit hydration-enabled flag from `globalThis`.\n *\n * This is mainly used by tests so they can assert both hydrated and non-\n * hydrated first-connect behavior deterministically.\n */\nexport function uninstallRadiantHydratorState(): void {\n\tdelete (globalThis as GlobalHydratorState)[RADIANT_HYDRATOR_INSTALLED_SYMBOL];\n}\n\n/**\n * Returns whether first-connect hydration is currently enabled for this\n * JavaScript environment.\n */\nexport function isRadiantHydratorInstalled(): boolean {\n\treturn (globalThis as GlobalHydratorState)[RADIANT_HYDRATOR_INSTALLED_SYMBOL] === true;\n}\n",
6
+ "import {\n\tisRadiantHydratorInstalled,\n\tinstallRadiantHydratorState,\n\tuninstallRadiantHydratorState,\n} from '../core/radiant-hydrator-state';\n\n/**\n * Enables first-connect hydration for SSR-rendered RadiantElement hosts.\n *\n * Import this from SSR pages before loading component modules so upgraded\n * custom elements hydrate their existing DOM instead of performing a fresh\n * client render on first connect.\n */\nexport function installRadiantHydrator(): void {\n\tinstallRadiantHydratorState();\n}\n\n/**\n * Disables the explicit Radiant hydrator gate.\n *\n * This is primarily useful for tests and controlled bootstrap scenarios where\n * SSR hosts should intentionally fall back to a fresh client render.\n */\nexport function uninstallRadiantHydrator(): void {\n\tuninstallRadiantHydratorState();\n}\n\n/**\n * Returns whether the explicit Radiant hydrator gate is currently enabled.\n */\nexport function hasRadiantHydrator(): boolean {\n\treturn isRadiantHydratorInstalled();\n}\n",
7
+ "import { installRadiantHydrator } from './hydrator';\n\ninstallRadiantHydrator();\n"
8
+ ],
9
+ "mappings": "2PAAA,IAAM,EAAoC,OAAO,IAAI,sCAAsC,EAWpF,SAAS,CAA2B,EAAS,CAClD,WAAmC,GAAqC,GASnE,SAAS,CAA6B,EAAS,CACrD,OAAQ,WAAmC,GAOrC,SAAS,CAA0B,EAAY,CACrD,OAAQ,WAAmC,KAAuC,GCjB5E,SAAS,CAAsB,EAAS,CAC9C,EAA4B,EAStB,SAAS,CAAwB,EAAS,CAChD,EAA8B,EAMxB,SAAS,CAAkB,EAAY,CAC7C,OAAO,EAA2B,EC7BnC,EAAuB",
10
+ "debugId": "AE046A6617778EC864756E2164756E21",
11
+ "names": []
12
+ }
@@ -1,4 +1,4 @@
1
- import type { RadiantElement } from '../core/radiant-element';
1
+ import type { ContextHostLike } from './context-host';
2
2
  import type { ContextType, UnknownContext } from './types';
3
3
  type ConsumedContextAssignment = (provider: unknown) => void;
4
4
  /**
@@ -8,7 +8,7 @@ type ConsumedContextAssignment = (provider: unknown) => void;
8
8
  * This keeps constructor-time state and pre-serialization state aligned after
9
9
  * instance fields, props, or authored host content change during SSR setup.
10
10
  */
11
- export declare function bootstrapSsrConsumedContext(host: RadiantElement, context: UnknownContext, assign: ConsumedContextAssignment, options?: {
11
+ export declare function bootstrapSsrConsumedContext(host: ContextHostLike, context: UnknownContext, assign: ConsumedContextAssignment, options?: {
12
12
  emitMounted?: boolean;
13
13
  }): boolean;
14
14
  /**
@@ -18,14 +18,14 @@ export declare function bootstrapSsrConsumedContext(host: RadiantElement, contex
18
18
  * This lets nested SSR renders recompute selector-backed state after the host
19
19
  * has finished construction and any server-side configuration hooks have run.
20
20
  */
21
- export declare function bootstrapSsrContextSelection<TContext extends UnknownContext>(host: object, context: TContext, callback: (value: unknown) => void, select?: (context: ContextType<TContext>) => unknown): boolean;
21
+ export declare function bootstrapSsrContextSelection<TContext extends UnknownContext, Selected = ContextType<TContext>>(host: object, context: TContext, callback: (value: Selected) => void, select?: (context: ContextType<TContext>) => Selected): boolean;
22
22
  /**
23
23
  * Resolves a consumed context from SSR when available, otherwise requests it
24
24
  * through the DOM event channel for the current client-side lifecycle pass.
25
25
  *
26
26
  * @returns `true` when the value was satisfied synchronously from SSR state.
27
27
  */
28
- export declare function connectConsumedContext(host: RadiantElement, context: UnknownContext, assign: ConsumedContextAssignment, options?: {
28
+ export declare function connectConsumedContext(host: ContextHostLike, context: UnknownContext, assign: ConsumedContextAssignment, options?: {
29
29
  emitMounted?: boolean;
30
30
  }): boolean;
31
31
  /**
@@ -34,8 +34,9 @@ export declare function connectConsumedContext(host: RadiantElement, context: Un
34
34
  *
35
35
  * @returns `true` when the value was satisfied synchronously from SSR state.
36
36
  */
37
- export declare function connectContextSelection<TContext extends UnknownContext>(host: RadiantElement, context: TContext, callback: (value: unknown) => void, options?: {
38
- select?: (context: ContextType<TContext>) => unknown;
37
+ export declare function connectContextSelection<TContext extends UnknownContext, Selected = ContextType<TContext>>(host: ContextHostLike, context: TContext, callback: (value: Selected) => void, options?: {
38
+ select?: (context: ContextType<TContext>) => Selected;
39
39
  subscribe?: boolean;
40
+ onSubscribe?: (unsubscribe: () => void) => void;
40
41
  }): boolean;
41
42
  export {};
@@ -0,0 +1,3 @@
1
+ var y=((j)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(j,{get:(w,H)=>(typeof require<"u"?require:w)[H]}):j)(function(j){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+j+'" is not supported')});var Z=Symbol.for("@ecopages/radiant.ssr-preparation-callbacks"),Y=Symbol.for("@ecopages/radiant.ssr-preparation-running");function f(j,w){let F=j[Z];if(Array.isArray(F)){F.push(w);return}Object.defineProperty(j,Z,{value:[w],configurable:!0})}function m(j){let w=j,H=w[Z];if(!Array.isArray(H))return;w[Y]=!0;try{for(let F of H)F()}finally{delete w[Y]}}var z=Symbol.for("@ecopages/radiant.ssr-context-provider-resolver");function K(){return globalThis}function O(j){K()[z]=j}function $(j){return K()[z]?.(j)}var G;((J)=>{J.SUBSCRIPTION_REQUEST="context-subscription-request";J.CONTEXT_REQUEST="context-request";J.ON_MOUNT="context-on-mount";J.MOUNTED="context-mounted"})(G||={});class D extends Event{context;callback;subscribe;handled=!1;constructor(j,w,H){super("context-request",{bubbles:!0,composed:!0});this.context=j;this.callback=w;this.subscribe=H}markHandled(){this.handled=!0}}class I extends CustomEvent{constructor(j){super("context-on-mount",{detail:{context:j},bubbles:!0,composed:!0})}}class M extends Event{context;callback;select;subscribe;onSubscribe;handled=!1;constructor(j,w,H,F,J){super("context-subscription-request",{bubbles:!0,composed:!0});this.context=j;this.callback=w;this.select=H;this.subscribe=F;this.onSubscribe=J}markHandled(){this.handled=!0}}function U(j,w,H,F={}){let J=$(w);if(!J)return!1;if(H(J),j.connectedContextCallback(w),F.emitMounted)j.dispatchEvent(new CustomEvent("context-mounted",{detail:J}));return!0}function V(j,w,H,F={}){let J=new D(w,(Q)=>{if(H(Q),j.connectedContextCallback(w),F.emitMounted)j.dispatchEvent(new CustomEvent("context-mounted",{detail:Q}))});return j.dispatchEvent(J),J.handled}function W(j,w){let H=$(j);if(!H)return!1;let F=H.getContext();if(w.select)return w.callback(w.select(F)),!0;return w.callback(F),!0}function X(j,w,H,F){let J=new M(w,H.callback,H.select,F.subscribe,F.onSubscribe);return j.dispatchEvent(J),J.handled}function g(j,w,H,F={}){return B(j,()=>U(j,w,H,F))}function b(j,w,H,F){return B(j,()=>{if(F)return W(w,{callback:H,select:F});return W(w,{callback:H})})}function d(j,w,H,F={}){if(U(j,w,H,F))return!0;return V(j,w,H,F)}function u(j,w,H,F={}){if(F.select){let Q={callback:H,select:F.select};if(W(w,Q))return!0;return X(j,w,Q,{subscribe:F.subscribe,onSubscribe:F.onSubscribe})}let J={callback:H};if(W(w,J))return!0;return X(j,w,J,{subscribe:F.subscribe,onSubscribe:F.onSubscribe})}function B(j,w){return f(j,w),w()}export{u as connectContextSelection,d as connectConsumedContext,b as bootstrapSsrContextSelection,g as bootstrapSsrConsumedContext};
2
+
3
+ //# debugId=916174640860D2F664756E2164756E21
@@ -0,0 +1,14 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/core/ssr-preparation.ts", "../src/context/context-ssr-bridge.ts", "../src/context/events.ts", "../src/context/context-consumer-runtime.ts", "../src/context/context-consumer-bootstrap.ts"],
4
+ "sourcesContent": [
5
+ "type SsrPreparationCallback = () => void;\n\nconst SSR_PREPARATION_CALLBACKS = Symbol.for('@ecopages/radiant.ssr-preparation-callbacks');\nexport const SSR_PREPARATION_RUNNING = Symbol.for('@ecopages/radiant.ssr-preparation-running');\n\n/**\n * Registers instance-local SSR preparation work that should run immediately\n * before a Radiant host serializes its first server render.\n *\n * Decorators use this to defer SSR-only setup until after class fields,\n * reactive props, and authored host content have all been applied.\n */\nexport function registerSsrPreparationCallback(host: object, callback: SsrPreparationCallback): void {\n\tconst target = host as Record<PropertyKey, unknown>;\n\tconst existingCallbacks = target[SSR_PREPARATION_CALLBACKS];\n\n\tif (Array.isArray(existingCallbacks)) {\n\t\texistingCallbacks.push(callback);\n\t\treturn;\n\t}\n\n\tObject.defineProperty(host, SSR_PREPARATION_CALLBACKS, {\n\t\tvalue: [callback],\n\t\tconfigurable: true,\n\t});\n}\n\n/**\n * Runs all registered SSR preparation callbacks for the provided host.\n *\n * The callbacks are intentionally retained so repeated SSR serializations stay\n * deterministic after later host mutations.\n */\nexport function runSsrPreparationCallbacks(host: object): void {\n\tconst target = host as Record<PropertyKey, unknown>;\n\tconst callbacks = target[SSR_PREPARATION_CALLBACKS];\n\n\tif (!Array.isArray(callbacks)) {\n\t\treturn;\n\t}\n\n\ttarget[SSR_PREPARATION_RUNNING] = true;\n\n\ttry {\n\t\tfor (const callback of callbacks as SsrPreparationCallback[]) {\n\t\t\tcallback();\n\t\t}\n\t} finally {\n\t\tdelete target[SSR_PREPARATION_RUNNING];\n\t}\n}\n",
6
+ "import type { SsrSerializableContextProvider } from './context-provider';\nimport type { UnknownContext } from './types';\n\ntype SsrContextProviderResolver = (context: UnknownContext) => SsrSerializableContextProvider | undefined;\n\nconst SSR_CONTEXT_PROVIDER_RESOLVER_SYMBOL = Symbol.for('@ecopages/radiant.ssr-context-provider-resolver');\n\ntype GlobalResolverScope = typeof globalThis & {\n\t[SSR_CONTEXT_PROVIDER_RESOLVER_SYMBOL]?: SsrContextProviderResolver;\n};\n\nfunction getGlobalResolverScope(): GlobalResolverScope {\n\treturn globalThis as GlobalResolverScope;\n}\n\n/**\n * Installs the ambient SSR provider resolver used by shared context runtime helpers.\n *\n * Server-side rendering infrastructure owns the actual provider stack storage and\n * publishes a lookup function here so client/runtime code does not need to import\n * server-oriented modules.\n */\nexport function installSsrContextProviderResolver(resolver: SsrContextProviderResolver): void {\n\tgetGlobalResolverScope()[SSR_CONTEXT_PROVIDER_RESOLVER_SYMBOL] = resolver;\n}\n\n/**\n * Resolves an ambient SSR provider when a server render has published one.\n */\nexport function resolveAmbientSsrContextProvider(context: UnknownContext): SsrSerializableContextProvider | undefined {\n\treturn getGlobalResolverScope()[SSR_CONTEXT_PROVIDER_RESOLVER_SYMBOL]?.(context);\n}\n",
7
+ "import type { Context, ContextCallback, ContextType, UnknownContext } from './types';\n\n/**\n * List of events which can be emitted by a context provider or requester.\n */\nexport enum ContextEventsTypes {\n\tSUBSCRIPTION_REQUEST = 'context-subscription-request',\n\tCONTEXT_REQUEST = 'context-request',\n\tON_MOUNT = 'context-on-mount',\n\tMOUNTED = 'context-mounted',\n}\n\n/**\n * An event fired by a context requester to signal it desires a named context.\n *\n * A provider should inspect the `context` property of the event to determine if it has a value that can\n * satisfy the request, calling the `callback` with the requested value if so.\n *\n * If the requested context event contains a truthy `subscribe` value, then a provider can call the callback\n * multiple times if the value is changed, if this is the case the provider should pass an `unsubscribe`\n * function to the callback which requesters can invoke to indicate they no longer wish to receive these updates.\n */\nexport class ContextRequestEvent<T extends UnknownContext> extends Event {\n\tpublic handled = false;\n\n\tpublic constructor(\n\t\tpublic readonly context: T,\n\t\tpublic readonly callback: ContextCallback<ContextType<T>>,\n\t\tpublic readonly subscribe?: boolean,\n\t) {\n\t\tsuper(ContextEventsTypes.CONTEXT_REQUEST, { bubbles: true, composed: true });\n\t}\n\n\tpublic markHandled(): void {\n\t\tthis.handled = true;\n\t}\n}\n\n/**\n * A type which represents a subscription to a context value.\n */\ntype DirectContextSubscription<T extends UnknownContext> = {\n\tselect?: undefined;\n\tcallback: ContextCallback<ContextType<T>>;\n};\n\ntype SelectedContextSubscription<T extends UnknownContext, Selected> = {\n\tselect: (context: ContextType<T>) => Selected;\n\tcallback: ContextCallback<Selected>;\n};\n\nexport type ContextSubscription<T extends UnknownContext, Selected = ContextType<T>> =\n\t| DirectContextSubscription<T>\n\t| SelectedContextSubscription<T, Selected>;\n\n/**\n * An event fired by a context provider to signal that a context value has been mounted and is available for consumption.\n */\nexport class ContextOnMountEvent extends CustomEvent<{ context: UnknownContext }> {\n\tpublic constructor(context: UnknownContext) {\n\t\tsuper(ContextEventsTypes.ON_MOUNT, {\n\t\t\tdetail: { context },\n\t\t\tbubbles: true,\n\t\t\tcomposed: true,\n\t\t});\n\t}\n}\n\n/**\n * An event fired by a context requester to signal it desires a named context.\n *\n * A provider should inspect the `context` property of the event to determine if it has a value that can\n * satisfy the request, calling the `callback` with the requested value if so.\n *\n * If the requested context event contains a truthy `subscribe` value, then a provider can call the callback\n * multiple times if the value is changed, if this is the case the provider should pass an `unsubscribe`\n * function to the callback which requesters can invoke to indicate they no longer wish to receive these updates.\n *\n * It accepts a `selector` property which can be used to request a specific property of the context value.\n */\nexport class ContextSubscriptionRequestEvent<T extends UnknownContext, Selected = ContextType<T>> extends Event {\n\tpublic handled = false;\n\n\tpublic constructor(\n\t\tpublic readonly context: T,\n\t\tpublic readonly callback: ContextCallback<Selected>,\n\t\tpublic readonly select?: (context: ContextType<T>) => Selected,\n\t\tpublic readonly subscribe?: boolean,\n\t\tpublic readonly onSubscribe?: (unsubscribe: () => void) => void,\n\t) {\n\t\tsuper(ContextEventsTypes.SUBSCRIPTION_REQUEST, {\n\t\t\tbubbles: true,\n\t\t\tcomposed: true,\n\t\t});\n\t}\n\n\tpublic markHandled(): void {\n\t\tthis.handled = true;\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementEventMap {\n\t\t/**\n\t\t * A 'context-request-subscription' event can be emitted by any element which desires\n\t\t * a context value to be injected by an external provider.\n\t\t */\n\t\t[ContextEventsTypes.SUBSCRIPTION_REQUEST]: ContextSubscriptionRequestEvent<UnknownContext>;\n\t\t/**\n\t\t * A context-request-provider event can be emitted by a context requester to signal\n\t\t * that it desires a context value to be provided by a context provider.\n\t\t */\n\t\t[ContextEventsTypes.CONTEXT_REQUEST]: ContextRequestEvent<Context<unknown, unknown>>;\n\t\t/**\n\t\t * A 'context-mount' event can be emitted by a context provider to signal\n\t\t * that a context value has been mounted and is available for consumption.\n\t\t */\n\t\t[ContextEventsTypes.ON_MOUNT]: ContextOnMountEvent;\n\t}\n}\n",
8
+ "import type { ContextHostLike } from './context-host';\nimport { resolveAmbientSsrContextProvider } from './context-ssr-bridge';\nimport { ContextEventsTypes, ContextRequestEvent, ContextSubscriptionRequestEvent } from './events';\nimport type { ContextCallback, ContextType, UnknownContext } from './types';\n\ntype ConsumedContextAssignment = (provider: unknown) => void;\n\ntype DirectContextSelectionRequest<TContext extends UnknownContext> = {\n\tcallback: (value: ContextType<TContext>) => void;\n\tselect?: undefined;\n};\n\ntype SelectedContextSelectionRequest<TContext extends UnknownContext, Selected> = {\n\tcallback: (value: Selected) => void;\n\tselect: (context: ContextType<TContext>) => Selected;\n};\n\ntype ContextSelectionRequest<TContext extends UnknownContext, Selected = ContextType<TContext>> =\n\t| DirectContextSelectionRequest<TContext>\n\t| SelectedContextSelectionRequest<TContext, Selected>;\n\n/**\n * Resolves a consumed context from the active SSR provider stack when one is available.\n *\n * This keeps SSR-specific lookup outside decorator implementations while preserving\n * the same consumer initialization contract for both standard and legacy decorators.\n *\n * @returns `true` when the context was resolved synchronously from SSR state.\n */\nexport function initializeConsumedContext(\n\thost: ContextHostLike,\n\tcontext: UnknownContext,\n\tassign: ConsumedContextAssignment,\n\toptions: { emitMounted?: boolean } = {},\n): boolean {\n\tconst provider = resolveAmbientSsrContextProvider(context);\n\n\tif (!provider) {\n\t\treturn false;\n\t}\n\n\tassign(provider);\n\thost.connectedContextCallback(context);\n\n\tif (options.emitMounted) {\n\t\thost.dispatchEvent(new CustomEvent(ContextEventsTypes.MOUNTED, { detail: provider }));\n\t}\n\n\treturn true;\n}\n\n/**\n * Requests a context provider through the DOM event channel when SSR state is not active.\n */\nexport function requestConsumedContext(\n\thost: ContextHostLike,\n\tcontext: UnknownContext,\n\tassign: ConsumedContextAssignment,\n\toptions: { emitMounted?: boolean } = {},\n): boolean {\n\tconst event = new ContextRequestEvent(context, (provider) => {\n\t\tassign(provider);\n\t\thost.connectedContextCallback(context);\n\n\t\tif (options.emitMounted) {\n\t\t\thost.dispatchEvent(new CustomEvent(ContextEventsTypes.MOUNTED, { detail: provider }));\n\t\t}\n\t});\n\n\thost.dispatchEvent(event);\n\treturn event.handled;\n}\n\n/**\n * Resolves a selected context value from the active SSR provider stack when available.\n *\n * @returns `true` when the selection callback was satisfied synchronously from SSR state.\n */\nexport function initializeContextSelection<TContext extends UnknownContext>(\n\tcontext: TContext,\n\trequest: DirectContextSelectionRequest<TContext>,\n): boolean;\nexport function initializeContextSelection<TContext extends UnknownContext, Selected>(\n\tcontext: TContext,\n\trequest: SelectedContextSelectionRequest<TContext, Selected>,\n): boolean;\nexport function initializeContextSelection<TContext extends UnknownContext, Selected = ContextType<TContext>>(\n\tcontext: TContext,\n\trequest: ContextSelectionRequest<TContext, Selected>,\n): boolean {\n\tconst provider = resolveAmbientSsrContextProvider(context);\n\n\tif (!provider) {\n\t\treturn false;\n\t}\n\n\tconst resolvedContext = provider.getContext() as ContextType<TContext>;\n\n\tif (request.select) {\n\t\trequest.callback(request.select(resolvedContext));\n\t\treturn true;\n\t}\n\n\trequest.callback(resolvedContext);\n\treturn true;\n}\n\n/**\n * Requests a selected context value through the DOM event channel.\n */\nexport function requestContextSelection<TContext extends UnknownContext>(\n\thost: ContextHostLike,\n\tcontext: TContext,\n\trequest: DirectContextSelectionRequest<TContext>,\n\toptions: {\n\t\tsubscribe?: boolean;\n\t\tonSubscribe?: (unsubscribe: () => void) => void;\n\t},\n): boolean;\nexport function requestContextSelection<TContext extends UnknownContext, Selected>(\n\thost: ContextHostLike,\n\tcontext: TContext,\n\trequest: SelectedContextSelectionRequest<TContext, Selected>,\n\toptions: {\n\t\tsubscribe?: boolean;\n\t\tonSubscribe?: (unsubscribe: () => void) => void;\n\t},\n): boolean;\nexport function requestContextSelection<TContext extends UnknownContext, Selected = ContextType<TContext>>(\n\thost: ContextHostLike,\n\tcontext: TContext,\n\trequest: ContextSelectionRequest<TContext, Selected>,\n\toptions: {\n\t\tsubscribe?: boolean;\n\t\tonSubscribe?: (unsubscribe: () => void) => void;\n\t},\n): boolean {\n\tconst event = new ContextSubscriptionRequestEvent(\n\t\tcontext,\n\t\trequest.callback as ContextCallback<Selected>,\n\t\trequest.select,\n\t\toptions.subscribe,\n\t\toptions.onSubscribe,\n\t);\n\n\thost.dispatchEvent(event);\n\treturn event.handled;\n}\n",
9
+ "import type { ContextHostLike } from './context-host';\nimport { registerSsrPreparationCallback } from '../core/ssr-preparation';\nimport {\n\tinitializeConsumedContext,\n\tinitializeContextSelection,\n\trequestConsumedContext,\n\trequestContextSelection,\n} from './context-consumer-runtime';\nimport type { ContextType, UnknownContext } from './types';\n\ntype ConsumedContextAssignment = (provider: unknown) => void;\n\n/**\n * Resolves a consumed context immediately and registers the same resolution to\n * run again during the later SSR preparation phase.\n *\n * This keeps constructor-time state and pre-serialization state aligned after\n * instance fields, props, or authored host content change during SSR setup.\n */\nexport function bootstrapSsrConsumedContext(\n\thost: ContextHostLike,\n\tcontext: UnknownContext,\n\tassign: ConsumedContextAssignment,\n\toptions: { emitMounted?: boolean } = {},\n): boolean {\n\treturn registerAndResolveConsumerBootstrap(host, () => initializeConsumedContext(host, context, assign, options));\n}\n\n/**\n * Resolves a selected context value immediately and registers the same\n * selection for the later SSR preparation phase.\n *\n * This lets nested SSR renders recompute selector-backed state after the host\n * has finished construction and any server-side configuration hooks have run.\n */\nexport function bootstrapSsrContextSelection<TContext extends UnknownContext, Selected = ContextType<TContext>>(\n\thost: object,\n\tcontext: TContext,\n\tcallback: (value: Selected) => void,\n\tselect?: (context: ContextType<TContext>) => Selected,\n): boolean {\n\treturn registerAndResolveConsumerBootstrap(host, () => {\n\t\tif (select) {\n\t\t\treturn initializeContextSelection(context, { callback, select });\n\t\t}\n\n\t\treturn initializeContextSelection(context, {\n\t\t\tcallback: callback as (value: ContextType<TContext>) => void,\n\t\t});\n\t});\n}\n\n/**\n * Resolves a consumed context from SSR when available, otherwise requests it\n * through the DOM event channel for the current client-side lifecycle pass.\n *\n * @returns `true` when the value was satisfied synchronously from SSR state.\n */\nexport function connectConsumedContext(\n\thost: ContextHostLike,\n\tcontext: UnknownContext,\n\tassign: ConsumedContextAssignment,\n\toptions: { emitMounted?: boolean } = {},\n): boolean {\n\tif (initializeConsumedContext(host, context, assign, options)) {\n\t\treturn true;\n\t}\n\n\treturn requestConsumedContext(host, context, assign, options);\n}\n\n/**\n * Resolves a selected context value from SSR when available, otherwise requests\n * it through the DOM event channel for the current client-side lifecycle pass.\n *\n * @returns `true` when the value was satisfied synchronously from SSR state.\n */\nexport function connectContextSelection<TContext extends UnknownContext, Selected = ContextType<TContext>>(\n\thost: ContextHostLike,\n\tcontext: TContext,\n\tcallback: (value: Selected) => void,\n\toptions: {\n\t\tselect?: (context: ContextType<TContext>) => Selected;\n\t\tsubscribe?: boolean;\n\t\tonSubscribe?: (unsubscribe: () => void) => void;\n\t} = {},\n): boolean {\n\tif (options.select) {\n\t\tconst request = { callback, select: options.select };\n\n\t\tif (initializeContextSelection(context, request)) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn requestContextSelection(host, context, request, {\n\t\t\tsubscribe: options.subscribe,\n\t\t\tonSubscribe: options.onSubscribe,\n\t\t});\n\t}\n\n\tconst request = {\n\t\tcallback: callback as (value: ContextType<TContext>) => void,\n\t};\n\n\tif (initializeContextSelection(context, request)) {\n\t\treturn true;\n\t}\n\n\treturn requestContextSelection(host, context, request, {\n\t\tsubscribe: options.subscribe,\n\t\tonSubscribe: options.onSubscribe,\n\t});\n}\n\nfunction registerAndResolveConsumerBootstrap<TResult>(host: object, resolve: () => TResult): TResult {\n\tregisterSsrPreparationCallback(host, resolve);\n\treturn resolve();\n}\n"
10
+ ],
11
+ "mappings": "2PAEA,IAAM,EAA4B,OAAO,IAAI,6CAA6C,EAC7E,EAA0B,OAAO,IAAI,2CAA2C,EAStF,SAAS,CAA8B,CAAC,EAAc,EAAwC,CAEpG,IAAM,EADS,EACkB,GAEjC,GAAI,MAAM,QAAQ,CAAiB,EAAG,CACrC,EAAkB,KAAK,CAAQ,EAC/B,OAGD,OAAO,eAAe,EAAM,EAA2B,CACtD,MAAO,CAAC,CAAQ,EAChB,aAAc,EACf,CAAC,EASK,SAAS,CAA0B,CAAC,EAAoB,CAC9D,IAAM,EAAS,EACT,EAAY,EAAO,GAEzB,GAAI,CAAC,MAAM,QAAQ,CAAS,EAC3B,OAGD,EAAO,GAA2B,GAElC,GAAI,CACH,QAAW,KAAY,EACtB,EAAS,SAET,CACD,OAAO,EAAO,IC3ChB,IAAM,EAAuC,OAAO,IAAI,iDAAiD,EAMzG,SAAS,CAAsB,EAAwB,CACtD,OAAO,WAUD,SAAS,CAAiC,CAAC,EAA4C,CAC7F,EAAuB,EAAE,GAAwC,EAM3D,SAAS,CAAgC,CAAC,EAAqE,CACrH,OAAO,EAAuB,EAAE,KAAwC,CAAO,ECzBzE,IAAK,GAAL,CAAK,IAAL,CACN,uBAAuB,+BACvB,kBAAkB,kBAClB,WAAW,mBACX,UAAU,oBAJC,QAiBL,MAAM,UAAsD,KAAM,CAIvD,QACA,SACA,UALV,QAAU,GAEV,WAAW,CACD,EACA,EACA,EACf,CACD,MAAM,kBAAoC,CAAE,QAAS,GAAM,SAAU,EAAK,CAAC,EAJ3D,eACA,gBACA,iBAKV,WAAW,EAAS,CAC1B,KAAK,QAAU,GAEjB,CAsBO,MAAM,UAA4B,WAAyC,CAC1E,WAAW,CAAC,EAAyB,CAC3C,MAAM,mBAA6B,CAClC,OAAQ,CAAE,SAAQ,EAClB,QAAS,GACT,SAAU,EACX,CAAC,EAEH,CAcO,MAAM,UAA6F,KAAM,CAI9F,QACA,SACA,OACA,UACA,YAPV,QAAU,GAEV,WAAW,CACD,EACA,EACA,EACA,EACA,EACf,CACD,MAAM,+BAAyC,CAC9C,QAAS,GACT,SAAU,EACX,CAAC,EATe,eACA,gBACA,cACA,iBACA,mBAQV,WAAW,EAAS,CAC1B,KAAK,QAAU,GAEjB,CCtEO,SAAS,CAAyB,CACxC,EACA,EACA,EACA,EAAqC,CAAC,EAC5B,CACV,IAAM,EAAW,EAAiC,CAAO,EAEzD,GAAI,CAAC,EACJ,MAAO,GAMR,GAHA,EAAO,CAAQ,EACf,EAAK,yBAAyB,CAAO,EAEjC,EAAQ,YACX,EAAK,cAAc,IAAI,8BAAwC,CAAE,OAAQ,CAAS,CAAC,CAAC,EAGrF,MAAO,GAMD,SAAS,CAAsB,CACrC,EACA,EACA,EACA,EAAqC,CAAC,EAC5B,CACV,IAAM,EAAQ,IAAI,EAAoB,EAAS,CAAC,IAAa,CAI5D,GAHA,EAAO,CAAQ,EACf,EAAK,yBAAyB,CAAO,EAEjC,EAAQ,YACX,EAAK,cAAc,IAAI,8BAAwC,CAAE,OAAQ,CAAS,CAAC,CAAC,EAErF,EAGD,OADA,EAAK,cAAc,CAAK,EACjB,EAAM,QAgBP,SAAS,CAA6F,CAC5G,EACA,EACU,CACV,IAAM,EAAW,EAAiC,CAAO,EAEzD,GAAI,CAAC,EACJ,MAAO,GAGR,IAAM,EAAkB,EAAS,WAAW,EAE5C,GAAI,EAAQ,OAEX,OADA,EAAQ,SAAS,EAAQ,OAAO,CAAe,CAAC,EACzC,GAIR,OADA,EAAQ,SAAS,CAAe,EACzB,GAwBD,SAAS,CAA0F,CACzG,EACA,EACA,EACA,EAIU,CACV,IAAM,EAAQ,IAAI,EACjB,EACA,EAAQ,SACR,EAAQ,OACR,EAAQ,UACR,EAAQ,WACT,EAGA,OADA,EAAK,cAAc,CAAK,EACjB,EAAM,QC/HP,SAAS,CAA2B,CAC1C,EACA,EACA,EACA,EAAqC,CAAC,EAC5B,CACV,OAAO,EAAoC,EAAM,IAAM,EAA0B,EAAM,EAAS,EAAQ,CAAO,CAAC,EAU1G,SAAS,CAA+F,CAC9G,EACA,EACA,EACA,EACU,CACV,OAAO,EAAoC,EAAM,IAAM,CACtD,GAAI,EACH,OAAO,EAA2B,EAAS,CAAE,WAAU,QAAO,CAAC,EAGhE,OAAO,EAA2B,EAAS,CAC1C,SAAU,CACX,CAAC,EACD,EASK,SAAS,CAAsB,CACrC,EACA,EACA,EACA,EAAqC,CAAC,EAC5B,CACV,GAAI,EAA0B,EAAM,EAAS,EAAQ,CAAO,EAC3D,MAAO,GAGR,OAAO,EAAuB,EAAM,EAAS,EAAQ,CAAO,EAStD,SAAS,CAA0F,CACzG,EACA,EACA,EACA,EAII,CAAC,EACK,CACV,GAAI,EAAQ,OAAQ,CACnB,IAAM,EAAU,CAAE,WAAU,OAAQ,EAAQ,MAAO,EAEnD,GAAI,EAA2B,EAAS,CAAO,EAC9C,MAAO,GAGR,OAAO,EAAwB,EAAM,EAAS,EAAS,CACtD,UAAW,EAAQ,UACnB,YAAa,EAAQ,WACtB,CAAC,EAGF,IAAM,EAAU,CACf,SAAU,CACX,EAEA,GAAI,EAA2B,EAAS,CAAO,EAC9C,MAAO,GAGR,OAAO,EAAwB,EAAM,EAAS,EAAS,CACtD,UAAW,EAAQ,UACnB,YAAa,EAAQ,WACtB,CAAC,EAGF,SAAS,CAA4C,CAAC,EAAc,EAAiC,CAEpG,OADA,EAA+B,EAAM,CAAO,EACrC,EAAQ",
12
+ "debugId": "916174640860D2F664756E2164756E21",
13
+ "names": []
14
+ }
@@ -0,0 +1,47 @@
1
+ import type { ContextHostLike } from './context-host';
2
+ import type { ContextType, UnknownContext } from './types';
3
+ type ConsumedContextAssignment = (provider: unknown) => void;
4
+ type DirectContextSelectionRequest<TContext extends UnknownContext> = {
5
+ callback: (value: ContextType<TContext>) => void;
6
+ select?: undefined;
7
+ };
8
+ type SelectedContextSelectionRequest<TContext extends UnknownContext, Selected> = {
9
+ callback: (value: Selected) => void;
10
+ select: (context: ContextType<TContext>) => Selected;
11
+ };
12
+ /**
13
+ * Resolves a consumed context from the active SSR provider stack when one is available.
14
+ *
15
+ * This keeps SSR-specific lookup outside decorator implementations while preserving
16
+ * the same consumer initialization contract for both standard and legacy decorators.
17
+ *
18
+ * @returns `true` when the context was resolved synchronously from SSR state.
19
+ */
20
+ export declare function initializeConsumedContext(host: ContextHostLike, context: UnknownContext, assign: ConsumedContextAssignment, options?: {
21
+ emitMounted?: boolean;
22
+ }): boolean;
23
+ /**
24
+ * Requests a context provider through the DOM event channel when SSR state is not active.
25
+ */
26
+ export declare function requestConsumedContext(host: ContextHostLike, context: UnknownContext, assign: ConsumedContextAssignment, options?: {
27
+ emitMounted?: boolean;
28
+ }): boolean;
29
+ /**
30
+ * Resolves a selected context value from the active SSR provider stack when available.
31
+ *
32
+ * @returns `true` when the selection callback was satisfied synchronously from SSR state.
33
+ */
34
+ export declare function initializeContextSelection<TContext extends UnknownContext>(context: TContext, request: DirectContextSelectionRequest<TContext>): boolean;
35
+ export declare function initializeContextSelection<TContext extends UnknownContext, Selected>(context: TContext, request: SelectedContextSelectionRequest<TContext, Selected>): boolean;
36
+ /**
37
+ * Requests a selected context value through the DOM event channel.
38
+ */
39
+ export declare function requestContextSelection<TContext extends UnknownContext>(host: ContextHostLike, context: TContext, request: DirectContextSelectionRequest<TContext>, options: {
40
+ subscribe?: boolean;
41
+ onSubscribe?: (unsubscribe: () => void) => void;
42
+ }): boolean;
43
+ export declare function requestContextSelection<TContext extends UnknownContext, Selected>(host: ContextHostLike, context: TContext, request: SelectedContextSelectionRequest<TContext, Selected>, options: {
44
+ subscribe?: boolean;
45
+ onSubscribe?: (unsubscribe: () => void) => void;
46
+ }): boolean;
47
+ export {};
@@ -0,0 +1,3 @@
1
+ var f=((j)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(j,{get:(k,z)=>(typeof require<"u"?require:k)[z]}):j)(function(j){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+j+'" is not supported')});var U=Symbol.for("@ecopages/radiant.ssr-context-provider-resolver");function W(){return globalThis}function D(j){W()[U]=j}function H(j){return W()[U]?.(j)}var Z;((w)=>{w.SUBSCRIPTION_REQUEST="context-subscription-request";w.CONTEXT_REQUEST="context-request";w.ON_MOUNT="context-on-mount";w.MOUNTED="context-mounted"})(Z||={});class J extends Event{context;callback;subscribe;handled=!1;constructor(j,k,z){super("context-request",{bubbles:!0,composed:!0});this.context=j;this.callback=k;this.subscribe=z}markHandled(){this.handled=!0}}class $ extends CustomEvent{constructor(j){super("context-on-mount",{detail:{context:j},bubbles:!0,composed:!0})}}class K extends Event{context;callback;select;subscribe;onSubscribe;handled=!1;constructor(j,k,z,F,w){super("context-subscription-request",{bubbles:!0,composed:!0});this.context=j;this.callback=k;this.select=z;this.subscribe=F;this.onSubscribe=w}markHandled(){this.handled=!0}}function X(j,k,z,F={}){let w=H(k);if(!w)return!1;if(z(w),j.connectedContextCallback(k),F.emitMounted)j.dispatchEvent(new CustomEvent("context-mounted",{detail:w}));return!0}function Y(j,k,z,F={}){let w=new J(k,(Q)=>{if(z(Q),j.connectedContextCallback(k),F.emitMounted)j.dispatchEvent(new CustomEvent("context-mounted",{detail:Q}))});return j.dispatchEvent(w),w.handled}function A(j,k){let z=H(j);if(!z)return!1;let F=z.getContext();if(k.select)return k.callback(k.select(F)),!0;return k.callback(F),!0}function L(j,k,z,F){let w=new K(k,z.callback,z.select,F.subscribe,F.onSubscribe);return j.dispatchEvent(w),w.handled}export{L as requestContextSelection,Y as requestConsumedContext,A as initializeContextSelection,X as initializeConsumedContext};
2
+
3
+ //# debugId=A42C1D7F427BF19B64756E2164756E21
@@ -0,0 +1,12 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/context/context-ssr-bridge.ts", "../src/context/events.ts", "../src/context/context-consumer-runtime.ts"],
4
+ "sourcesContent": [
5
+ "import type { SsrSerializableContextProvider } from './context-provider';\nimport type { UnknownContext } from './types';\n\ntype SsrContextProviderResolver = (context: UnknownContext) => SsrSerializableContextProvider | undefined;\n\nconst SSR_CONTEXT_PROVIDER_RESOLVER_SYMBOL = Symbol.for('@ecopages/radiant.ssr-context-provider-resolver');\n\ntype GlobalResolverScope = typeof globalThis & {\n\t[SSR_CONTEXT_PROVIDER_RESOLVER_SYMBOL]?: SsrContextProviderResolver;\n};\n\nfunction getGlobalResolverScope(): GlobalResolverScope {\n\treturn globalThis as GlobalResolverScope;\n}\n\n/**\n * Installs the ambient SSR provider resolver used by shared context runtime helpers.\n *\n * Server-side rendering infrastructure owns the actual provider stack storage and\n * publishes a lookup function here so client/runtime code does not need to import\n * server-oriented modules.\n */\nexport function installSsrContextProviderResolver(resolver: SsrContextProviderResolver): void {\n\tgetGlobalResolverScope()[SSR_CONTEXT_PROVIDER_RESOLVER_SYMBOL] = resolver;\n}\n\n/**\n * Resolves an ambient SSR provider when a server render has published one.\n */\nexport function resolveAmbientSsrContextProvider(context: UnknownContext): SsrSerializableContextProvider | undefined {\n\treturn getGlobalResolverScope()[SSR_CONTEXT_PROVIDER_RESOLVER_SYMBOL]?.(context);\n}\n",
6
+ "import type { Context, ContextCallback, ContextType, UnknownContext } from './types';\n\n/**\n * List of events which can be emitted by a context provider or requester.\n */\nexport enum ContextEventsTypes {\n\tSUBSCRIPTION_REQUEST = 'context-subscription-request',\n\tCONTEXT_REQUEST = 'context-request',\n\tON_MOUNT = 'context-on-mount',\n\tMOUNTED = 'context-mounted',\n}\n\n/**\n * An event fired by a context requester to signal it desires a named context.\n *\n * A provider should inspect the `context` property of the event to determine if it has a value that can\n * satisfy the request, calling the `callback` with the requested value if so.\n *\n * If the requested context event contains a truthy `subscribe` value, then a provider can call the callback\n * multiple times if the value is changed, if this is the case the provider should pass an `unsubscribe`\n * function to the callback which requesters can invoke to indicate they no longer wish to receive these updates.\n */\nexport class ContextRequestEvent<T extends UnknownContext> extends Event {\n\tpublic handled = false;\n\n\tpublic constructor(\n\t\tpublic readonly context: T,\n\t\tpublic readonly callback: ContextCallback<ContextType<T>>,\n\t\tpublic readonly subscribe?: boolean,\n\t) {\n\t\tsuper(ContextEventsTypes.CONTEXT_REQUEST, { bubbles: true, composed: true });\n\t}\n\n\tpublic markHandled(): void {\n\t\tthis.handled = true;\n\t}\n}\n\n/**\n * A type which represents a subscription to a context value.\n */\ntype DirectContextSubscription<T extends UnknownContext> = {\n\tselect?: undefined;\n\tcallback: ContextCallback<ContextType<T>>;\n};\n\ntype SelectedContextSubscription<T extends UnknownContext, Selected> = {\n\tselect: (context: ContextType<T>) => Selected;\n\tcallback: ContextCallback<Selected>;\n};\n\nexport type ContextSubscription<T extends UnknownContext, Selected = ContextType<T>> =\n\t| DirectContextSubscription<T>\n\t| SelectedContextSubscription<T, Selected>;\n\n/**\n * An event fired by a context provider to signal that a context value has been mounted and is available for consumption.\n */\nexport class ContextOnMountEvent extends CustomEvent<{ context: UnknownContext }> {\n\tpublic constructor(context: UnknownContext) {\n\t\tsuper(ContextEventsTypes.ON_MOUNT, {\n\t\t\tdetail: { context },\n\t\t\tbubbles: true,\n\t\t\tcomposed: true,\n\t\t});\n\t}\n}\n\n/**\n * An event fired by a context requester to signal it desires a named context.\n *\n * A provider should inspect the `context` property of the event to determine if it has a value that can\n * satisfy the request, calling the `callback` with the requested value if so.\n *\n * If the requested context event contains a truthy `subscribe` value, then a provider can call the callback\n * multiple times if the value is changed, if this is the case the provider should pass an `unsubscribe`\n * function to the callback which requesters can invoke to indicate they no longer wish to receive these updates.\n *\n * It accepts a `selector` property which can be used to request a specific property of the context value.\n */\nexport class ContextSubscriptionRequestEvent<T extends UnknownContext, Selected = ContextType<T>> extends Event {\n\tpublic handled = false;\n\n\tpublic constructor(\n\t\tpublic readonly context: T,\n\t\tpublic readonly callback: ContextCallback<Selected>,\n\t\tpublic readonly select?: (context: ContextType<T>) => Selected,\n\t\tpublic readonly subscribe?: boolean,\n\t\tpublic readonly onSubscribe?: (unsubscribe: () => void) => void,\n\t) {\n\t\tsuper(ContextEventsTypes.SUBSCRIPTION_REQUEST, {\n\t\t\tbubbles: true,\n\t\t\tcomposed: true,\n\t\t});\n\t}\n\n\tpublic markHandled(): void {\n\t\tthis.handled = true;\n\t}\n}\n\ndeclare global {\n\tinterface HTMLElementEventMap {\n\t\t/**\n\t\t * A 'context-request-subscription' event can be emitted by any element which desires\n\t\t * a context value to be injected by an external provider.\n\t\t */\n\t\t[ContextEventsTypes.SUBSCRIPTION_REQUEST]: ContextSubscriptionRequestEvent<UnknownContext>;\n\t\t/**\n\t\t * A context-request-provider event can be emitted by a context requester to signal\n\t\t * that it desires a context value to be provided by a context provider.\n\t\t */\n\t\t[ContextEventsTypes.CONTEXT_REQUEST]: ContextRequestEvent<Context<unknown, unknown>>;\n\t\t/**\n\t\t * A 'context-mount' event can be emitted by a context provider to signal\n\t\t * that a context value has been mounted and is available for consumption.\n\t\t */\n\t\t[ContextEventsTypes.ON_MOUNT]: ContextOnMountEvent;\n\t}\n}\n",
7
+ "import type { ContextHostLike } from './context-host';\nimport { resolveAmbientSsrContextProvider } from './context-ssr-bridge';\nimport { ContextEventsTypes, ContextRequestEvent, ContextSubscriptionRequestEvent } from './events';\nimport type { ContextCallback, ContextType, UnknownContext } from './types';\n\ntype ConsumedContextAssignment = (provider: unknown) => void;\n\ntype DirectContextSelectionRequest<TContext extends UnknownContext> = {\n\tcallback: (value: ContextType<TContext>) => void;\n\tselect?: undefined;\n};\n\ntype SelectedContextSelectionRequest<TContext extends UnknownContext, Selected> = {\n\tcallback: (value: Selected) => void;\n\tselect: (context: ContextType<TContext>) => Selected;\n};\n\ntype ContextSelectionRequest<TContext extends UnknownContext, Selected = ContextType<TContext>> =\n\t| DirectContextSelectionRequest<TContext>\n\t| SelectedContextSelectionRequest<TContext, Selected>;\n\n/**\n * Resolves a consumed context from the active SSR provider stack when one is available.\n *\n * This keeps SSR-specific lookup outside decorator implementations while preserving\n * the same consumer initialization contract for both standard and legacy decorators.\n *\n * @returns `true` when the context was resolved synchronously from SSR state.\n */\nexport function initializeConsumedContext(\n\thost: ContextHostLike,\n\tcontext: UnknownContext,\n\tassign: ConsumedContextAssignment,\n\toptions: { emitMounted?: boolean } = {},\n): boolean {\n\tconst provider = resolveAmbientSsrContextProvider(context);\n\n\tif (!provider) {\n\t\treturn false;\n\t}\n\n\tassign(provider);\n\thost.connectedContextCallback(context);\n\n\tif (options.emitMounted) {\n\t\thost.dispatchEvent(new CustomEvent(ContextEventsTypes.MOUNTED, { detail: provider }));\n\t}\n\n\treturn true;\n}\n\n/**\n * Requests a context provider through the DOM event channel when SSR state is not active.\n */\nexport function requestConsumedContext(\n\thost: ContextHostLike,\n\tcontext: UnknownContext,\n\tassign: ConsumedContextAssignment,\n\toptions: { emitMounted?: boolean } = {},\n): boolean {\n\tconst event = new ContextRequestEvent(context, (provider) => {\n\t\tassign(provider);\n\t\thost.connectedContextCallback(context);\n\n\t\tif (options.emitMounted) {\n\t\t\thost.dispatchEvent(new CustomEvent(ContextEventsTypes.MOUNTED, { detail: provider }));\n\t\t}\n\t});\n\n\thost.dispatchEvent(event);\n\treturn event.handled;\n}\n\n/**\n * Resolves a selected context value from the active SSR provider stack when available.\n *\n * @returns `true` when the selection callback was satisfied synchronously from SSR state.\n */\nexport function initializeContextSelection<TContext extends UnknownContext>(\n\tcontext: TContext,\n\trequest: DirectContextSelectionRequest<TContext>,\n): boolean;\nexport function initializeContextSelection<TContext extends UnknownContext, Selected>(\n\tcontext: TContext,\n\trequest: SelectedContextSelectionRequest<TContext, Selected>,\n): boolean;\nexport function initializeContextSelection<TContext extends UnknownContext, Selected = ContextType<TContext>>(\n\tcontext: TContext,\n\trequest: ContextSelectionRequest<TContext, Selected>,\n): boolean {\n\tconst provider = resolveAmbientSsrContextProvider(context);\n\n\tif (!provider) {\n\t\treturn false;\n\t}\n\n\tconst resolvedContext = provider.getContext() as ContextType<TContext>;\n\n\tif (request.select) {\n\t\trequest.callback(request.select(resolvedContext));\n\t\treturn true;\n\t}\n\n\trequest.callback(resolvedContext);\n\treturn true;\n}\n\n/**\n * Requests a selected context value through the DOM event channel.\n */\nexport function requestContextSelection<TContext extends UnknownContext>(\n\thost: ContextHostLike,\n\tcontext: TContext,\n\trequest: DirectContextSelectionRequest<TContext>,\n\toptions: {\n\t\tsubscribe?: boolean;\n\t\tonSubscribe?: (unsubscribe: () => void) => void;\n\t},\n): boolean;\nexport function requestContextSelection<TContext extends UnknownContext, Selected>(\n\thost: ContextHostLike,\n\tcontext: TContext,\n\trequest: SelectedContextSelectionRequest<TContext, Selected>,\n\toptions: {\n\t\tsubscribe?: boolean;\n\t\tonSubscribe?: (unsubscribe: () => void) => void;\n\t},\n): boolean;\nexport function requestContextSelection<TContext extends UnknownContext, Selected = ContextType<TContext>>(\n\thost: ContextHostLike,\n\tcontext: TContext,\n\trequest: ContextSelectionRequest<TContext, Selected>,\n\toptions: {\n\t\tsubscribe?: boolean;\n\t\tonSubscribe?: (unsubscribe: () => void) => void;\n\t},\n): boolean {\n\tconst event = new ContextSubscriptionRequestEvent(\n\t\tcontext,\n\t\trequest.callback as ContextCallback<Selected>,\n\t\trequest.select,\n\t\toptions.subscribe,\n\t\toptions.onSubscribe,\n\t);\n\n\thost.dispatchEvent(event);\n\treturn event.handled;\n}\n"
8
+ ],
9
+ "mappings": "2PAKA,IAAM,EAAuC,OAAO,IAAI,iDAAiD,EAMzG,SAAS,CAAsB,EAAwB,CACtD,OAAO,WAUD,SAAS,CAAiC,CAAC,EAA4C,CAC7F,EAAuB,EAAE,GAAwC,EAM3D,SAAS,CAAgC,CAAC,EAAqE,CACrH,OAAO,EAAuB,EAAE,KAAwC,CAAO,ECzBzE,IAAK,GAAL,CAAK,IAAL,CACN,uBAAuB,+BACvB,kBAAkB,kBAClB,WAAW,mBACX,UAAU,oBAJC,QAiBL,MAAM,UAAsD,KAAM,CAIvD,QACA,SACA,UALV,QAAU,GAEV,WAAW,CACD,EACA,EACA,EACf,CACD,MAAM,kBAAoC,CAAE,QAAS,GAAM,SAAU,EAAK,CAAC,EAJ3D,eACA,gBACA,iBAKV,WAAW,EAAS,CAC1B,KAAK,QAAU,GAEjB,CAsBO,MAAM,UAA4B,WAAyC,CAC1E,WAAW,CAAC,EAAyB,CAC3C,MAAM,mBAA6B,CAClC,OAAQ,CAAE,SAAQ,EAClB,QAAS,GACT,SAAU,EACX,CAAC,EAEH,CAcO,MAAM,UAA6F,KAAM,CAI9F,QACA,SACA,OACA,UACA,YAPV,QAAU,GAEV,WAAW,CACD,EACA,EACA,EACA,EACA,EACf,CACD,MAAM,+BAAyC,CAC9C,QAAS,GACT,SAAU,EACX,CAAC,EATe,eACA,gBACA,cACA,iBACA,mBAQV,WAAW,EAAS,CAC1B,KAAK,QAAU,GAEjB,CCtEO,SAAS,CAAyB,CACxC,EACA,EACA,EACA,EAAqC,CAAC,EAC5B,CACV,IAAM,EAAW,EAAiC,CAAO,EAEzD,GAAI,CAAC,EACJ,MAAO,GAMR,GAHA,EAAO,CAAQ,EACf,EAAK,yBAAyB,CAAO,EAEjC,EAAQ,YACX,EAAK,cAAc,IAAI,8BAAwC,CAAE,OAAQ,CAAS,CAAC,CAAC,EAGrF,MAAO,GAMD,SAAS,CAAsB,CACrC,EACA,EACA,EACA,EAAqC,CAAC,EAC5B,CACV,IAAM,EAAQ,IAAI,EAAoB,EAAS,CAAC,IAAa,CAI5D,GAHA,EAAO,CAAQ,EACf,EAAK,yBAAyB,CAAO,EAEjC,EAAQ,YACX,EAAK,cAAc,IAAI,8BAAwC,CAAE,OAAQ,CAAS,CAAC,CAAC,EAErF,EAGD,OADA,EAAK,cAAc,CAAK,EACjB,EAAM,QAgBP,SAAS,CAA6F,CAC5G,EACA,EACU,CACV,IAAM,EAAW,EAAiC,CAAO,EAEzD,GAAI,CAAC,EACJ,MAAO,GAGR,IAAM,EAAkB,EAAS,WAAW,EAE5C,GAAI,EAAQ,OAEX,OADA,EAAQ,SAAS,EAAQ,OAAO,CAAe,CAAC,EACzC,GAIR,OADA,EAAQ,SAAS,CAAe,EACzB,GAwBD,SAAS,CAA0F,CACzG,EACA,EACA,EACA,EAIU,CACV,IAAM,EAAQ,IAAI,EACjB,EACA,EAAQ,SACR,EAAQ,OACR,EAAQ,UACR,EAAQ,WACT,EAGA,OADA,EAAK,cAAc,CAAK,EACjB,EAAM",
10
+ "debugId": "A42C1D7F427BF19B64756E2164756E21",
11
+ "names": []
12
+ }
@@ -0,0 +1,25 @@
1
+ import type { UnknownContext } from './types';
2
+ type ContextHostApi = {
3
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
4
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
5
+ dispatchEvent(event: Event): boolean;
6
+ registerConnectedCallback(callback: () => void): void;
7
+ registerCleanupCallback(callback: () => void): void;
8
+ connectedContextCallback(context: UnknownContext): void;
9
+ registerContextProvider(name: string, provider: unknown): void;
10
+ };
11
+ type SsrHydrationContainer = {
12
+ children?: ArrayLike<Element> | undefined;
13
+ childNodes?: ArrayLike<{
14
+ nodeType: number;
15
+ }> | undefined;
16
+ };
17
+ export type ContextHydrationHost = Element | SsrHydrationContainer;
18
+ export type ContextHostLike = (ContextHostApi & Element) | (ContextHostApi & {
19
+ host: Element;
20
+ }) | (ContextHostApi & {
21
+ element: Element;
22
+ }) | (ContextHostApi & SsrHydrationContainer);
23
+ export declare function resolveContextHostElement(host: ContextHostLike): Element | null;
24
+ export declare function resolveContextHydrationHost(host: ContextHostLike): ContextHydrationHost;
25
+ export {};
@@ -0,0 +1,3 @@
1
+ var o=((e)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,n)=>(typeof require<"u"?require:t)[n]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});function r(e){if(e instanceof Element)return e;if("host"in e)return e.host;if("element"in e)return e.element;return null}function l(e){if(e instanceof Element)return e;if("host"in e)return e.host;if("element"in e)return e.element;return e}export{l as resolveContextHydrationHost,r as resolveContextHostElement};
2
+
3
+ //# debugId=1756919FA3B4A60064756E2164756E21