@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
@@ -0,0 +1,133 @@
1
+ import { type SubscribableJsxValue } from '@ecopages/jsx';
2
+ import type { ReactiveBindingOption, ReactiveBindingValue, ReactiveBindings, ReactiveFieldOptions } from './reactive-prop-core';
3
+ import type { SsrSerializableHydrationBinding } from './ssr-hydration-binding';
4
+ type StringPropertyKey<Value> = Extract<keyof Value, string>;
5
+ type ReactiveDependencyReader = () => unknown;
6
+ type ReactiveHostAccess<Host extends object> = {
7
+ defineProperty(target: object, property: string, descriptor: PropertyDescriptor): void;
8
+ getBindingTarget?(host: Host): object;
9
+ hasProperty(host: Host, property: string): boolean;
10
+ readProperty(host: Host, property: string): unknown;
11
+ };
12
+ type ReactiveAccessorOptions<T> = {
13
+ bind?: ReactiveBindingOption;
14
+ getValue: () => T | undefined;
15
+ setValue: (value: T) => void;
16
+ notifyInitialValue?: T;
17
+ };
18
+ /**
19
+ * Shared reactive-host contract consumed by decorators and host adapters.
20
+ *
21
+ * `RadiantElement` and `RadiantController` both implement this surface so the
22
+ * decorator layer can define fields, bindings, context reactions, and tracked
23
+ * reads without depending on a specific host class.
24
+ */
25
+ export interface ReactiveHostLike<Bindings extends object = {}> {
26
+ readonly bindings: ReactiveBindings<Bindings>;
27
+ readonly $: ReactiveBindings<Bindings>;
28
+ bind<Property extends StringPropertyKey<Bindings>>(property: Property): SubscribableJsxValue<ReactiveBindingValue<Bindings, Property>>;
29
+ getReactiveBinding<Property extends StringPropertyKey<Bindings>>(property: Property): SubscribableJsxValue<ReactiveBindingValue<Bindings, Property>>;
30
+ createReactiveField<T>(propertyName: string, initialValue: T, options?: ReactiveFieldOptions): void;
31
+ defineReactiveBinding(property: string, bind?: ReactiveBindingOption): void;
32
+ notifyUpdate(changedProperty: string, oldValue: unknown, value: unknown): void;
33
+ registerCleanupCallback(callback: () => void): void;
34
+ registerConnectedCallback(callback: () => void): void;
35
+ registerHydrationBinding(name: string, binding: SsrSerializableHydrationBinding): void;
36
+ registerReactiveDependencyReader(property: string, read: () => unknown): void;
37
+ trackReactiveRead(property: string): void;
38
+ }
39
+ /**
40
+ * Shared reactivity engine used by both `RadiantElement` and
41
+ * `RadiantController`.
42
+ *
43
+ * This class owns three pieces of shared behavior:
44
+ *
45
+ * - defining reactive accessors on the host object
46
+ * - exposing cached JSX bindings such as `bindings.count` and `$count`
47
+ * - publishing tracked updates into the signals graph and update callbacks
48
+ *
49
+ * Host-specific concerns such as attribute reflection, render lifecycles, and
50
+ * custom-element APIs stay in the outer host classes.
51
+ */
52
+ export declare class ReactiveHost<Host extends object, Bindings extends object = {}> {
53
+ private readonly host;
54
+ private readonly access;
55
+ private readonly shouldAutoBind;
56
+ readonly bindings: ReactiveBindings<Bindings>;
57
+ readonly $: ReactiveBindings<Bindings>;
58
+ private reactiveFields;
59
+ private reactiveDependencies;
60
+ private reactiveDependencyReaders;
61
+ private reactiveBindings;
62
+ private updateCallbacks;
63
+ private onConnectedCallbacks;
64
+ private onDisconnectedCallback;
65
+ constructor(host: Host, access: ReactiveHostAccess<Host>, shouldAutoBind: () => boolean);
66
+ /**
67
+ * Runs all connection callbacks registered by decorators or host adapters.
68
+ */
69
+ connectHost(): void;
70
+ /**
71
+ * Runs all cleanup callbacks registered for host disconnect.
72
+ */
73
+ disconnectHost(): void;
74
+ /**
75
+ * Publishes a reactive member change to tracked dependencies and explicit
76
+ * update callbacks.
77
+ */
78
+ notifyUpdate(changedProperty: string, oldValue: unknown, value: unknown): void;
79
+ /**
80
+ * Registers a callback that should run when the outer host disconnects.
81
+ */
82
+ registerCleanupCallback(callback: () => void): void;
83
+ /**
84
+ * Registers a callback that should run whenever the outer host connects.
85
+ */
86
+ registerConnectedCallback(callback: () => void): void;
87
+ /**
88
+ * Placeholder hydration hook so shared decorators can target both host types.
89
+ *
90
+ * `ReactiveHost` itself does not persist hydration bindings; concrete hosts
91
+ * such as `RadiantElement` can override this behavior at the outer layer.
92
+ */
93
+ registerHydrationBinding(_name: string, _binding: SsrSerializableHydrationBinding): void;
94
+ /**
95
+ * Registers a raw reader for a reactive member so tracked dependency reads do
96
+ * not need to go back through the public accessor.
97
+ */
98
+ registerReactiveDependencyReader(property: string, read: ReactiveDependencyReader): void;
99
+ /**
100
+ * Registers a callback that runs whenever a named reactive member changes.
101
+ *
102
+ * Returns a disposer that removes the callback.
103
+ */
104
+ registerUpdateCallback(property: string, update: (...rest: any[]) => any): () => void;
105
+ /**
106
+ * Returns the cached JSX binding object for a named reactive member.
107
+ */
108
+ getReactiveBinding<Property extends StringPropertyKey<Bindings>>(property: Property): SubscribableJsxValue<ReactiveBindingValue<Bindings, Property>>;
109
+ /**
110
+ * Defines a stable binding companion property such as `$count` on the host or
111
+ * its chosen binding target.
112
+ */
113
+ defineReactiveBinding(property: string, bind?: ReactiveBindingOption): void;
114
+ /**
115
+ * Records a dependency read for the named reactive member.
116
+ */
117
+ trackReactiveRead(property: string): void;
118
+ /**
119
+ * Defines a reactive getter/setter pair on the host and wires it into
120
+ * bindings, dependency tracking, and update notifications.
121
+ */
122
+ defineReactiveAccessor<T>(propertyName: string, options: ReactiveAccessorOptions<T>): void;
123
+ /**
124
+ * Defines a controller- or element-local reactive field with optional JSX
125
+ * binding exposure.
126
+ */
127
+ createReactiveField<T>(propertyName: string, initialValue: T, options?: ReactiveFieldOptions): void;
128
+ private createReactiveBindingNamespace;
129
+ private getReactiveDependency;
130
+ private readReactiveDependencyValue;
131
+ private readReactiveBindingValue;
132
+ }
133
+ export {};
@@ -0,0 +1,3 @@
1
+ var H=((q)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(q,{get:(z,A)=>(typeof require<"u"?require:z)[A]}):q)(function(q){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+q+'" is not supported')});import{Computed as Z,subtle as _,trackDependency as $}from"@ecopages/signals";function j(q){return q}function Q(q){return q}var U={trackDependency(q){$(j(q))},createComputed(q){return new Z(q)},createWatcher(q){let z=new _.Watcher(q);return{watch(A){z.watch(Q(A))},unwatch(A){z.unwatch(Q(A))}}}};var W=U;function M(){return W}function I(q){W=q}function O(q){M().trackDependency(q)}function x(q){return M().createComputed(q)}function D(q){return M().createWatcher(q)}import{createSubscribableJsxValue as L}from"@ecopages/jsx";class Y{read;subscribers=new Set;watcherListeners=new Set;version=0;constructor(q){this.read=q}get(){return O(this),this.read()}subscribe(q){return this.subscribers.add(q),()=>{this.subscribers.delete(q)}}addWatcher(q){return this.watcherListeners.add(q),()=>{this.watcherListeners.delete(q)}}getVersion(){return this.version}notify(q){this.version+=1;let z;try{this.notifyWatchers()}catch(A){z=A}if(this.publish(q),z)throw z}publish(q){for(let z of this.subscribers)z(q)}notifyWatchers(){let q=[];for(let z of this.watcherListeners)try{z()}catch(A){q.push(A)}if(q.length===1)throw q[0];if(q.length>1)throw AggregateError(q,"Multiple reactive dependency notifications failed.")}}function X(q){return typeof q==="object"&&q!==null&&typeof q.get==="function"}class F{host;access;shouldAutoBind;bindings;$;reactiveFields=new Map;reactiveDependencies=new Map;reactiveDependencyReaders=new Map;reactiveBindings=new Map;updateCallbacks=new Map;onConnectedCallbacks=[];onDisconnectedCallback=[];constructor(q,z,A){this.host=q;this.access=z;this.shouldAutoBind=A;let G=this.createReactiveBindingNamespace();this.bindings=G,this.$=G}connectHost(){for(let q of this.onConnectedCallbacks)q()}disconnectHost(){for(let q of this.onDisconnectedCallback)q()}notifyUpdate(q,z,A){if(z===A)return;this.reactiveDependencies.get(q)?.notify(A);let G=this.updateCallbacks.get(q);if(G)for(let K of G)K()}registerCleanupCallback(q){this.onDisconnectedCallback.push(q)}registerConnectedCallback(q){this.onConnectedCallbacks.push(q)}registerHydrationBinding(q,z){}registerReactiveDependencyReader(q,z){this.reactiveDependencyReaders.set(q,z)}registerUpdateCallback(q,z){if(!this.updateCallbacks.has(q))this.updateCallbacks.set(q,new Set);let A=this.updateCallbacks.get(q);return A.add(z),()=>{if(A.delete(z),A.size===0)this.updateCallbacks.delete(q)}}getReactiveBinding(q){let z=this.reactiveBindings.get(q);if(z)return z;let A=L({getValue:()=>this.readReactiveBindingValue(q),subscribe:(G)=>this.registerUpdateCallback(q,()=>{G(this.readReactiveBindingValue(q))})});return this.reactiveBindings.set(q,A),A}defineReactiveBinding(q,z=!0){let A=typeof z==="string"?z:z?`$${q}`:void 0,G=this.access.getBindingTarget?.(this.host)??this.host;if(!A||this.access.hasProperty(this.host,A))return;this.access.defineProperty(G,A,{get:()=>this.getReactiveBinding(q),enumerable:!1,configurable:!0})}trackReactiveRead(q){O(this.getReactiveDependency(q))}defineReactiveAccessor(q,z){let A=z.bind??this.shouldAutoBind();if(this.defineReactiveBinding(q,A),this.registerReactiveDependencyReader(q,z.getValue),this.access.defineProperty(this.host,q,{get:()=>{return this.trackReactiveRead(q),z.getValue()},set:(G)=>{let K=z.getValue();if(K===G)return;z.setValue(G),this.notifyUpdate(q,K,G)},enumerable:!0,configurable:!0}),z.notifyInitialValue!==void 0)this.notifyUpdate(q,void 0,z.notifyInitialValue)}createReactiveField(q,z,A={}){let G={name:q,value:z,initialValue:z};this.reactiveFields.set(q,G),this.defineReactiveAccessor(q,{bind:A.bind,getValue:()=>this.reactiveFields.get(q)?.value,setValue:(K)=>{this.reactiveFields.set(q,{...G,value:K})},notifyInitialValue:z})}createReactiveBindingNamespace(){return new Proxy(Object.create(null),{get:(q,z)=>{if(typeof z!=="string")return;return this.getReactiveBinding(z)}})}getReactiveDependency(q){let z=this.reactiveDependencies.get(q);if(z)return z;let A=new Y(()=>this.readReactiveDependencyValue(q));return this.reactiveDependencies.set(q,A),A}readReactiveDependencyValue(q){let z=this.reactiveDependencyReaders.get(q);if(z)return z();return this.readReactiveBindingValue(q)}readReactiveBindingValue(q){let z=this.access.readProperty(this.host,q);if(X(z))return z.get();return z}}export{F as ReactiveHost};
2
+
3
+ //# debugId=56E9428E864C8E3D64756E2164756E21
@@ -0,0 +1,13 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/core/reactivity-signals.ts", "../src/core/reactivity-runtime.ts", "../src/core/reactivity-adapter.ts", "../src/core/reactive-host.ts"],
4
+ "sourcesContent": [
5
+ "import {\n\tComputed as SignalsComputed,\n\tsubtle,\n\ttrackDependency,\n\ttype DependencyNode as SignalsDependencyNode,\n} from '@ecopages/signals';\nimport type { ReactiveComputed, ReactiveDependencyNode, ReactiveRuntime, ReactiveWatcher } from './reactivity-contract';\n\nfunction asSignalsDependencyNode(node: ReactiveDependencyNode): SignalsDependencyNode {\n\treturn node as SignalsDependencyNode;\n}\n\nfunction asSignalsComputed(signal: ReactiveComputed<unknown>): SignalsComputed<unknown> {\n\treturn signal as SignalsComputed<unknown>;\n}\n\n/**\n * Default Signals-backed implementation of Radiant's internal reactivity\n * runtime contract.\n *\n * This is the only core module that imports `@ecopages/signals` directly. The\n * rest of core consumes the narrower runtime contract through the adapter and\n * runtime holder modules.\n */\nexport const signalsReactiveRuntime: ReactiveRuntime = {\n\ttrackDependency(node) {\n\t\ttrackDependency(asSignalsDependencyNode(node));\n\t},\n\tcreateComputed<T>(read: () => T): ReactiveComputed<T> {\n\t\treturn new SignalsComputed(read);\n\t},\n\tcreateWatcher(notify: () => void): ReactiveWatcher {\n\t\tconst watcher = new subtle.Watcher(notify);\n\n\t\treturn {\n\t\t\twatch(signal) {\n\t\t\t\twatcher.watch(asSignalsComputed(signal));\n\t\t\t},\n\t\t\tunwatch(signal) {\n\t\t\t\twatcher.unwatch(asSignalsComputed(signal));\n\t\t\t},\n\t\t};\n\t},\n};\n",
6
+ "import type { ReactiveRuntime } from './reactivity-contract';\nimport { signalsReactiveRuntime } from './reactivity-signals';\n\nlet activeReactiveRuntime: ReactiveRuntime = signalsReactiveRuntime;\n\n/**\n * Returns the currently active internal reactivity runtime.\n *\n * The current implementation still defaults to the Signals-backed runtime, so\n * importing this module preserves today's behavior. A stricter optional-runtime\n * architecture would move that default installation into an explicit bootstrap\n * step instead of this eager default.\n */\nexport function getReactiveRuntime(): ReactiveRuntime {\n\treturn activeReactiveRuntime;\n}\n\n/**\n * Replaces the active internal reactivity runtime used by Radiant core.\n *\n * This is an internal seam for alternate runtime experiments and tests. It does\n * not yet make Signals optional at module-load time because this module still\n * imports the default Signals-backed runtime eagerly.\n */\nexport function setReactiveRuntime(runtime: ReactiveRuntime): void {\n\tactiveReactiveRuntime = runtime;\n}\n",
7
+ "import { getReactiveRuntime } from './reactivity-runtime';\nexport type {\n\tReactiveComputed,\n\tReactiveDependencyNode,\n\tReactiveRuntime,\n\tReactiveSubscriber,\n\tReactiveWatcher,\n} from './reactivity-contract';\nexport { setReactiveRuntime } from './reactivity-runtime';\n\n/** Tracks one dependency-node read against the active internal reactivity runtime. */\nexport function trackReactiveDependency(node: import('./reactivity-contract').ReactiveDependencyNode): void {\n\tgetReactiveRuntime().trackDependency(node);\n}\n\n/** Creates a computed value using the currently selected internal reactivity runtime. */\nexport function createReactiveComputed<T>(read: () => T): import('./reactivity-contract').ReactiveComputed<T> {\n\treturn getReactiveRuntime().createComputed(read);\n}\n\n/** Creates a watcher using the currently selected internal reactivity runtime. */\nexport function createReactiveWatcher(notify: () => void): import('./reactivity-contract').ReactiveWatcher {\n\treturn getReactiveRuntime().createWatcher(notify);\n}\n",
8
+ "import { createSubscribableJsxValue, type SubscribableJsxValue } from '@ecopages/jsx';\nimport { trackReactiveDependency, type ReactiveDependencyNode, type ReactiveSubscriber } from './reactivity-adapter';\nimport type {\n\tReactiveBindingOption,\n\tReactiveBindingValue,\n\tReactiveBindings,\n\tReactiveFieldOptions,\n} from './reactive-prop-core';\nimport type { SsrSerializableHydrationBinding } from './ssr-hydration-binding';\n\ntype StringPropertyKey<Value> = Extract<keyof Value, string>;\ntype ReactiveDependencyReader = () => unknown;\n\ntype ReactiveHostAccess<Host extends object> = {\n\tdefineProperty(target: object, property: string, descriptor: PropertyDescriptor): void;\n\tgetBindingTarget?(host: Host): object;\n\thasProperty(host: Host, property: string): boolean;\n\treadProperty(host: Host, property: string): unknown;\n};\n\ntype ReactiveField<T = unknown> = {\n\tname: string;\n\tvalue: T;\n\tinitialValue: T;\n};\n\ntype ReactiveAccessorOptions<T> = {\n\tbind?: ReactiveBindingOption;\n\tgetValue: () => T | undefined;\n\tsetValue: (value: T) => void;\n\tnotifyInitialValue?: T;\n};\n\n/**\n * Shared reactive-host contract consumed by decorators and host adapters.\n *\n * `RadiantElement` and `RadiantController` both implement this surface so the\n * decorator layer can define fields, bindings, context reactions, and tracked\n * reads without depending on a specific host class.\n */\nexport interface ReactiveHostLike<Bindings extends object = {}> {\n\treadonly bindings: ReactiveBindings<Bindings>;\n\treadonly $: ReactiveBindings<Bindings>;\n\tbind<Property extends StringPropertyKey<Bindings>>(\n\t\tproperty: Property,\n\t): SubscribableJsxValue<ReactiveBindingValue<Bindings, Property>>;\n\tgetReactiveBinding<Property extends StringPropertyKey<Bindings>>(\n\t\tproperty: Property,\n\t): SubscribableJsxValue<ReactiveBindingValue<Bindings, Property>>;\n\tcreateReactiveField<T>(propertyName: string, initialValue: T, options?: ReactiveFieldOptions): void;\n\tdefineReactiveBinding(property: string, bind?: ReactiveBindingOption): void;\n\tnotifyUpdate(changedProperty: string, oldValue: unknown, value: unknown): void;\n\tregisterCleanupCallback(callback: () => void): void;\n\tregisterConnectedCallback(callback: () => void): void;\n\tregisterHydrationBinding(name: string, binding: SsrSerializableHydrationBinding): void;\n\tregisterReactiveDependencyReader(property: string, read: () => unknown): void;\n\ttrackReactiveRead(property: string): void;\n}\n\n/**\n * Internal dependency node that bridges Radiant host members into the signals\n * tracking graph.\n */\nclass ReactiveHostDependency implements ReactiveDependencyNode {\n\tprivate readonly subscribers = new Set<ReactiveSubscriber<unknown>>();\n\tprivate readonly watcherListeners = new Set<() => void>();\n\tprivate version = 0;\n\n\tconstructor(private readonly read: ReactiveDependencyReader) {}\n\n\tpublic get(): unknown {\n\t\ttrackReactiveDependency(this);\n\t\treturn this.read();\n\t}\n\n\tpublic subscribe(notify: ReactiveSubscriber<unknown>): () => void {\n\t\tthis.subscribers.add(notify);\n\n\t\treturn () => {\n\t\t\tthis.subscribers.delete(notify);\n\t\t};\n\t}\n\n\tpublic addWatcher(notify: () => void): () => void {\n\t\tthis.watcherListeners.add(notify);\n\n\t\treturn () => {\n\t\t\tthis.watcherListeners.delete(notify);\n\t\t};\n\t}\n\n\tpublic getVersion(): number {\n\t\treturn this.version;\n\t}\n\n\tpublic notify(nextValue: unknown): void {\n\t\tthis.version += 1;\n\t\tlet watcherError: unknown;\n\n\t\ttry {\n\t\t\tthis.notifyWatchers();\n\t\t} catch (error) {\n\t\t\twatcherError = error;\n\t\t}\n\n\t\tthis.publish(nextValue);\n\n\t\tif (watcherError) {\n\t\t\tthrow watcherError;\n\t\t}\n\t}\n\n\tprivate publish(nextValue: unknown): void {\n\t\tfor (const subscriber of this.subscribers) {\n\t\t\tsubscriber(nextValue);\n\t\t}\n\t}\n\n\tprivate notifyWatchers(): void {\n\t\tconst errors: unknown[] = [];\n\n\t\tfor (const listener of this.watcherListeners) {\n\t\t\ttry {\n\t\t\t\tlistener();\n\t\t\t} catch (error) {\n\t\t\t\terrors.push(error);\n\t\t\t}\n\t\t}\n\n\t\tif (errors.length === 1) {\n\t\t\tthrow errors[0];\n\t\t}\n\n\t\tif (errors.length > 1) {\n\t\t\tthrow new AggregateError(errors, 'Multiple reactive dependency notifications failed.');\n\t\t}\n\t}\n}\n\nfunction isSignalLikeBindingValue(value: unknown): value is { get(): unknown } {\n\treturn typeof value === 'object' && value !== null && typeof (value as { get?: unknown }).get === 'function';\n}\n\n/**\n * Shared reactivity engine used by both `RadiantElement` and\n * `RadiantController`.\n *\n * This class owns three pieces of shared behavior:\n *\n * - defining reactive accessors on the host object\n * - exposing cached JSX bindings such as `bindings.count` and `$count`\n * - publishing tracked updates into the signals graph and update callbacks\n *\n * Host-specific concerns such as attribute reflection, render lifecycles, and\n * custom-element APIs stay in the outer host classes.\n */\nexport class ReactiveHost<Host extends object, Bindings extends object = {}> {\n\tpublic readonly bindings: ReactiveBindings<Bindings>;\n\tpublic readonly $: ReactiveBindings<Bindings>;\n\n\tprivate reactiveFields = new Map<string, ReactiveField>();\n\tprivate reactiveDependencies = new Map<string, ReactiveHostDependency>();\n\tprivate reactiveDependencyReaders = new Map<string, ReactiveDependencyReader>();\n\tprivate reactiveBindings = new Map<string, SubscribableJsxValue>();\n\tprivate updateCallbacks = new Map<string, Set<(...rest: any[]) => any>>();\n\tprivate onConnectedCallbacks: (() => void)[] = [];\n\tprivate onDisconnectedCallback: (() => void)[] = [];\n\n\tconstructor(\n\t\tprivate readonly host: Host,\n\t\tprivate readonly access: ReactiveHostAccess<Host>,\n\t\tprivate readonly shouldAutoBind: () => boolean,\n\t) {\n\t\tconst bindingNamespace = this.createReactiveBindingNamespace();\n\t\tthis.bindings = bindingNamespace;\n\t\tthis.$ = bindingNamespace;\n\t}\n\n\t/**\n\t * Runs all connection callbacks registered by decorators or host adapters.\n\t */\n\tpublic connectHost(): void {\n\t\tfor (const callback of this.onConnectedCallbacks) {\n\t\t\tcallback();\n\t\t}\n\t}\n\n\t/**\n\t * Runs all cleanup callbacks registered for host disconnect.\n\t */\n\tpublic disconnectHost(): void {\n\t\tfor (const cleanup of this.onDisconnectedCallback) {\n\t\t\tcleanup();\n\t\t}\n\t}\n\n\t/**\n\t * Publishes a reactive member change to tracked dependencies and explicit\n\t * update callbacks.\n\t */\n\tpublic notifyUpdate(changedProperty: string, oldValue: unknown, value: unknown): void {\n\t\tif (oldValue === value) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.reactiveDependencies.get(changedProperty)?.notify(value);\n\t\tconst updates = this.updateCallbacks.get(changedProperty);\n\n\t\tif (updates) {\n\t\t\tfor (const update of updates) {\n\t\t\t\tupdate();\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Registers a callback that should run when the outer host disconnects.\n\t */\n\tpublic registerCleanupCallback(callback: () => void): void {\n\t\tthis.onDisconnectedCallback.push(callback);\n\t}\n\n\t/**\n\t * Registers a callback that should run whenever the outer host connects.\n\t */\n\tpublic registerConnectedCallback(callback: () => void): void {\n\t\tthis.onConnectedCallbacks.push(callback);\n\t}\n\n\t/**\n\t * Placeholder hydration hook so shared decorators can target both host types.\n\t *\n\t * `ReactiveHost` itself does not persist hydration bindings; concrete hosts\n\t * such as `RadiantElement` can override this behavior at the outer layer.\n\t */\n\tpublic registerHydrationBinding(_name: string, _binding: SsrSerializableHydrationBinding): void {}\n\n\t/**\n\t * Registers a raw reader for a reactive member so tracked dependency reads do\n\t * not need to go back through the public accessor.\n\t */\n\tpublic registerReactiveDependencyReader(property: string, read: ReactiveDependencyReader): void {\n\t\tthis.reactiveDependencyReaders.set(property, read);\n\t}\n\n\t/**\n\t * Registers a callback that runs whenever a named reactive member changes.\n\t *\n\t * Returns a disposer that removes the callback.\n\t */\n\tpublic registerUpdateCallback(property: string, update: (...rest: any[]) => any): () => void {\n\t\tif (!this.updateCallbacks.has(property)) {\n\t\t\tthis.updateCallbacks.set(property, new Set());\n\t\t}\n\n\t\tconst callbacks = this.updateCallbacks.get(property)!;\n\t\tcallbacks.add(update);\n\n\t\treturn () => {\n\t\t\tcallbacks.delete(update);\n\n\t\t\tif (callbacks.size === 0) {\n\t\t\t\tthis.updateCallbacks.delete(property);\n\t\t\t}\n\t\t};\n\t}\n\n\t/**\n\t * Returns the cached JSX binding object for a named reactive member.\n\t */\n\tpublic getReactiveBinding<Property extends StringPropertyKey<Bindings>>(\n\t\tproperty: Property,\n\t): SubscribableJsxValue<ReactiveBindingValue<Bindings, Property>> {\n\t\tconst cachedBinding = this.reactiveBindings.get(property);\n\n\t\tif (cachedBinding) {\n\t\t\treturn cachedBinding as SubscribableJsxValue<ReactiveBindingValue<Bindings, Property>>;\n\t\t}\n\n\t\tconst binding = createSubscribableJsxValue<ReactiveBindingValue<Bindings, Property>>({\n\t\t\tgetValue: () => this.readReactiveBindingValue(property) as ReactiveBindingValue<Bindings, Property>,\n\t\t\tsubscribe: (notify) =>\n\t\t\t\tthis.registerUpdateCallback(property, () => {\n\t\t\t\t\tnotify(this.readReactiveBindingValue(property) as ReactiveBindingValue<Bindings, Property>);\n\t\t\t\t}),\n\t\t});\n\n\t\tthis.reactiveBindings.set(property, binding);\n\t\treturn binding;\n\t}\n\n\t/**\n\t * Defines a stable binding companion property such as `$count` on the host or\n\t * its chosen binding target.\n\t */\n\tpublic defineReactiveBinding(property: string, bind: ReactiveBindingOption = true): void {\n\t\tconst bindingPropertyName = typeof bind === 'string' ? bind : bind ? `$${property}` : undefined;\n\t\tconst bindingTarget = this.access.getBindingTarget?.(this.host) ?? this.host;\n\n\t\tif (!bindingPropertyName || this.access.hasProperty(this.host, bindingPropertyName)) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.access.defineProperty(bindingTarget, bindingPropertyName, {\n\t\t\tget: () => this.getReactiveBinding(property as StringPropertyKey<Bindings>),\n\t\t\tenumerable: false,\n\t\t\tconfigurable: true,\n\t\t});\n\t}\n\n\t/**\n\t * Records a dependency read for the named reactive member.\n\t */\n\tpublic trackReactiveRead(property: string): void {\n\t\ttrackReactiveDependency(this.getReactiveDependency(property));\n\t}\n\n\t/**\n\t * Defines a reactive getter/setter pair on the host and wires it into\n\t * bindings, dependency tracking, and update notifications.\n\t */\n\tpublic defineReactiveAccessor<T>(propertyName: string, options: ReactiveAccessorOptions<T>): void {\n\t\tconst bind = options.bind ?? this.shouldAutoBind();\n\n\t\tthis.defineReactiveBinding(propertyName, bind);\n\t\tthis.registerReactiveDependencyReader(propertyName, options.getValue);\n\n\t\tthis.access.defineProperty(this.host, propertyName, {\n\t\t\tget: () => {\n\t\t\t\tthis.trackReactiveRead(propertyName);\n\t\t\t\treturn options.getValue();\n\t\t\t},\n\t\t\tset: (newValue: T) => {\n\t\t\t\tconst oldValue = options.getValue();\n\n\t\t\t\tif (oldValue === newValue) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\toptions.setValue(newValue);\n\t\t\t\tthis.notifyUpdate(propertyName, oldValue, newValue);\n\t\t\t},\n\t\t\tenumerable: true,\n\t\t\tconfigurable: true,\n\t\t});\n\n\t\tif (options.notifyInitialValue !== undefined) {\n\t\t\tthis.notifyUpdate(propertyName, undefined, options.notifyInitialValue);\n\t\t}\n\t}\n\n\t/**\n\t * Defines a controller- or element-local reactive field with optional JSX\n\t * binding exposure.\n\t */\n\tpublic createReactiveField<T>(propertyName: string, initialValue: T, options: ReactiveFieldOptions = {}): void {\n\t\tconst reactiveField: ReactiveField<T> = {\n\t\t\tname: propertyName,\n\t\t\tvalue: initialValue,\n\t\t\tinitialValue,\n\t\t};\n\n\t\tthis.reactiveFields.set(propertyName, reactiveField);\n\n\t\tthis.defineReactiveAccessor(propertyName, {\n\t\t\tbind: options.bind,\n\t\t\tgetValue: () => this.reactiveFields.get(propertyName)?.value as T | undefined,\n\t\t\tsetValue: (newValue: T) => {\n\t\t\t\tthis.reactiveFields.set(propertyName, { ...reactiveField, value: newValue });\n\t\t\t},\n\t\t\tnotifyInitialValue: initialValue,\n\t\t});\n\t}\n\n\tprivate createReactiveBindingNamespace(): ReactiveBindings<Bindings> {\n\t\treturn new Proxy(Object.create(null) as ReactiveBindings<Bindings>, {\n\t\t\tget: (_target, property) => {\n\t\t\t\tif (typeof property !== 'string') {\n\t\t\t\t\treturn undefined;\n\t\t\t\t}\n\n\t\t\t\treturn this.getReactiveBinding(property as StringPropertyKey<Bindings>);\n\t\t\t},\n\t\t}) as ReactiveBindings<Bindings>;\n\t}\n\n\tprivate getReactiveDependency(property: string): ReactiveHostDependency {\n\t\tconst cachedDependency = this.reactiveDependencies.get(property);\n\n\t\tif (cachedDependency) {\n\t\t\treturn cachedDependency;\n\t\t}\n\n\t\tconst dependency = new ReactiveHostDependency(() => this.readReactiveDependencyValue(property));\n\t\tthis.reactiveDependencies.set(property, dependency);\n\t\treturn dependency;\n\t}\n\n\tprivate readReactiveDependencyValue(property: string): unknown {\n\t\tconst reader = this.reactiveDependencyReaders.get(property);\n\n\t\tif (reader) {\n\t\t\treturn reader();\n\t\t}\n\n\t\treturn this.readReactiveBindingValue(property as StringPropertyKey<Bindings>);\n\t}\n\n\tprivate readReactiveBindingValue<Property extends StringPropertyKey<Bindings>>(property: Property): unknown {\n\t\tconst value = this.access.readPro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AAmB,KAAK,qBAAqB,IAAI,CAAQ,EAE/D,GAAI,EACH,OAAO,EAGR,IAAM,EAAa,IAAI,EAAuB,IAAM,KAAK,4BAA4B,CAAQ,CAAC,EAE9F,OADA,KAAK,qBAAqB,IAAI,EAAU,CAAU,EAC3C,EAGA,2BAA2B,CAAC,EAA2B,CAC9D,IAAM,EAAS,KAAK,0BAA0B,IAAI,CAAQ,EAE1D,GAAI,EACH,OAAO,EAAO,EAGf,OAAO,KAAK,yBAAyB,CAAuC,EAGrE,wBAAsE,CAAC,EAA6B,CAC3G,IAAM,EAAQ,KAAK,OAAO,aAAa,KAAK,KAAM,CAAQ,EAE1D,GAAI,EAAyB,CAAK,EACjC,OAAO,EAAM,IAAI,EAGlB,OAAO,EAET",
11
+ "debugId": "56E9428E864C8E3D64756E2164756E21",
12
+ "names": []
13
+ }
@@ -1,5 +1,6 @@
1
1
  import type { SubscribableJsxValue } from '@ecopages/jsx';
2
- import type { RadiantElement, ReactiveBindingValue } from './radiant-element';
2
+ import type { RadiantElement } from './radiant-element';
3
+ import type { ReactiveBindingValue } from './reactive-prop-core';
3
4
  /**
4
5
  * Creates a stable JSX child binding backed by a Radiant reactive property or field.
5
6
  *
@@ -0,0 +1,3 @@
1
+ var z=((j)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(j,{get:(q,x)=>(typeof require<"u"?require:q)[x]}):j)(function(j){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+j+'" is not supported')});function B(j,q){return j.bind(q)}export{B as bindReactiveValue};
2
+
3
+ //# debugId=0E5C45AE990E173564756E2164756E21
@@ -0,0 +1,10 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/core/reactive-jsx-value.ts"],
4
+ "sourcesContent": [
5
+ "import type { SubscribableJsxValue } from '@ecopages/jsx';\nimport type { RadiantElement } from './radiant-element';\nimport type { ReactiveBindingValue } from './reactive-prop-core';\n\n/**\n * Creates a stable JSX child binding backed by a Radiant reactive property or field.\n *\n * The returned value resolves eagerly on the server and subscribes to the host's\n * update callbacks on the client so the mounted child range can patch directly\n * when the selected property changes.\n */\nexport function bindReactiveValue<\n\tBindings extends object,\n\tHost extends RadiantElement<Bindings>,\n\tProperty extends Extract<keyof Bindings, string>,\n>(host: Host, property: Property): SubscribableJsxValue<ReactiveBindingValue<Bindings, Property>> {\n\treturn host.bind(property);\n}\n"
6
+ ],
7
+ "mappings": "2PAWO,SAAS,CAIf,CAAC,EAAY,EAAoF,CACjG,OAAO,EAAK,KAAK,CAAQ",
8
+ "debugId": "0E5C45AE990E173564756E2164756E21",
9
+ "names": []
10
+ }
@@ -0,0 +1,42 @@
1
+ import type { JsxRenderable, SubscribableJsxValue } from '@ecopages/jsx';
2
+ import { type AttributeTypeConstant, type ReadAttributeValueReturnType, type WriteAttributeValueReturnType } from '../utils/attribute-utils';
3
+ type StringPropertyKey<Value> = Extract<keyof Value, string>;
4
+ export interface ReactiveProperty<T = unknown> {
5
+ type: AttributeTypeConstant;
6
+ value?: T;
7
+ initialValue?: T;
8
+ name: string;
9
+ attribute: string;
10
+ converter: {
11
+ fromAttribute: (value: string) => ReadAttributeValueReturnType;
12
+ toAttribute: (value: any) => WriteAttributeValueReturnType;
13
+ };
14
+ }
15
+ export type ReactivePropertyOptions<T> = {
16
+ type: AttributeTypeConstant;
17
+ reflect?: boolean;
18
+ attribute?: string;
19
+ defaultValue?: T;
20
+ bind?: boolean | string;
21
+ };
22
+ export type ReactiveBindingOption = boolean | string;
23
+ export type ReactiveFieldOptions = {
24
+ bind?: ReactiveBindingOption;
25
+ };
26
+ export type ReactiveField<T = unknown> = {
27
+ name: string;
28
+ value: T;
29
+ initialValue: T;
30
+ };
31
+ export type ReactiveBindingValue<Host extends object, Property extends StringPropertyKey<Host>> = Host[Property] extends JsxRenderable ? Host[Property] : JsxRenderable;
32
+ export type ReactiveBindings<Bindings extends object> = {
33
+ readonly [Property in StringPropertyKey<Bindings>]: SubscribableJsxValue<ReactiveBindingValue<Bindings, Property>>;
34
+ };
35
+ export type ReactiveAccessorDefinition<T> = {
36
+ bind?: ReactiveBindingOption;
37
+ getValue: () => T | undefined;
38
+ setValue: (value: T) => void;
39
+ };
40
+ export declare function validateReactivePropertyDefault(type: AttributeTypeConstant, defaultValue: unknown): void;
41
+ export declare function createReactivePropertyMapping<T>(propertyName: string, attributeKey: string, type: AttributeTypeConstant, initialValue: T | undefined): ReactiveProperty<T>;
42
+ export {};
@@ -0,0 +1,3 @@
1
+ var C=((n)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(n,{get:(i,o)=>(typeof require<"u"?require:i)[o]}):n)(function(n){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+n+'" is not supported')});function c(n){switch(n){case Array:return"array";case Boolean:return"boolean";case Number:return"number";case Object:return"object";case String:return"string"}}function b(n){switch(typeof n){case"boolean":return"boolean";case"number":return"number";case"string":return"string"}if(Array.isArray(n))return"array";if(Object.prototype.toString.call(n)==="[object Object]")return"object"}function P(n){switch(n){case Number:return 0;case String:return"";case Boolean:return!1;default:return null}}function d(n){try{return JSON.parse(n)}catch{throw TypeError("Invalid JSON string")}}var A={array(n){let i=d(n);if(!Array.isArray(i))throw TypeError(`Expected an array but got a value of type "${typeof i}"`);return i},boolean(n){return!(n==="0"||String(n).toLowerCase()==="false")},number(n){return Number(n.replace(/_/g,""))},object(n){let i=JSON.parse(n);if(i===null||typeof i!=="object"||Array.isArray(i))throw TypeError(`expected value of type "object" but instead got value "${n}" of type "${b(i)}"`);return i},string(n){return n}},R={default:g,array:x,object:x};function x(n){return JSON.stringify(n)}function g(n){return`${n}`}function s(n,i){let o=c(i);if(!o)throw TypeError(`[radiant-element] Unknown type "${i}"`);return A[o](n)}function e(n,i){let o=c(i);if(!o)throw TypeError(`[radiant-element] Unknown type "${i}"`);return(R[o]??R.default??g)(n)}function m(n){return typeof n==="boolean"}function B(n){return typeof n==="number"}function y(n){return typeof n==="string"}function H(n){return Array.isArray(n)}function k(n){return typeof n==="object"&&!Array.isArray(n)&&n!==null}function T(n,i){switch(n){case Boolean:return m(i);case Number:return B(i);case String:return y(i);case Array:return H(i);case Object:return k(i);default:return!1}}var J=(n,i,o,t)=>{if(i===Boolean){let p=n.getAttribute(o);if(p===null)return t;return p===""?!0:s(p,i)}let r=n.getAttribute(o);return r!==null?s(r,i):t??P(i)};function D(n,i){if(i!==void 0&&!T(n,i))throw Error(`defaultValue does not match the expected type for ${n.name}`)}function F(n,i,o,t){return{type:o,name:n,value:t,initialValue:t,attribute:i,converter:{fromAttribute:(r)=>s(r,o),toAttribute:(r)=>e(r,o)}}}export{D as validateReactivePropertyDefault,F as createReactivePropertyMapping};
2
+
3
+ //# debugId=5898E823D32B8CC264756E2164756E21
@@ -0,0 +1,11 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/utils/attribute-utils.ts", "../src/core/reactive-prop-core.ts"],
4
+ "sourcesContent": [
5
+ "import type { RadiantElement } from '../core/radiant-element';\n\nexport type AttributeTypeConstant = typeof Array | typeof Boolean | typeof Number | typeof Object | typeof String;\n\nexport type AttributeTypeDefault = Array<unknown> | boolean | number | Record<string, unknown> | string;\n\n/**\n * Parses the given attribute type constant and returns its corresponding string representation.\n *\n * @param constant - The attribute type constant to parse.\n * @returns The string representation of the attribute type constant.\n */\nexport function parseAttributeTypeConstant(constant?: AttributeTypeConstant) {\n\tswitch (constant) {\n\t\tcase Array:\n\t\t\treturn 'array';\n\t\tcase Boolean:\n\t\t\treturn 'boolean';\n\t\tcase Number:\n\t\t\treturn 'number';\n\t\tcase Object:\n\t\t\treturn 'object';\n\t\tcase String:\n\t\t\treturn 'string';\n\t}\n}\n\n/**\n * Parses the attribute type default value and returns its type as a string.\n *\n * @param defaultValue - The default value of the attribute type.\n * @returns The type of the default value as a string.\n */\nexport function parseAttributeTypeDefault(defaultValue?: AttributeTypeDefault) {\n\tswitch (typeof defaultValue) {\n\t\tcase 'boolean':\n\t\t\treturn 'boolean';\n\t\tcase 'number':\n\t\t\treturn 'number';\n\t\tcase 'string':\n\t\t\treturn 'string';\n\t}\n\n\tif (Array.isArray(defaultValue)) return 'array';\n\tif (Object.prototype.toString.call(defaultValue) === '[object Object]') return 'object';\n}\n\n/**\n * Returns the default value for a given attribute type.\n *\n * @param type - The attribute type constant.\n * @returns The default value for the specified attribute type.\n */\nexport function defaultValueForType(type: AttributeTypeConstant): unknown {\n\tswitch (type) {\n\t\tcase Number:\n\t\t\treturn 0;\n\t\tcase String:\n\t\t\treturn '';\n\t\tcase Boolean:\n\t\t\treturn false;\n\t\tdefault:\n\t\t\treturn null;\n\t}\n}\n\ntype Reader = (value: string) => number | string | boolean | object | unknown[];\n\n/**\n * Utility function to parse a JSON string safely\n */\nfunction parseJSON<T>(value: string): T {\n\ttry {\n\t\treturn JSON.parse(value);\n\t} catch {\n\t\tthrow new TypeError('Invalid JSON string');\n\t}\n}\n\n/**\n * Object that maps attribute types to reader functions.\n * @type {Object.<string, Reader>}\n */\nconst readers: { [type: string]: Reader } = {\n\tarray(value: string): unknown[] {\n\t\tconst array = parseJSON<unknown[]>(value);\n\t\tif (!Array.isArray(array)) {\n\t\t\tthrow new TypeError(`Expected an array but got a value of type \"${typeof array}\"`);\n\t\t}\n\t\treturn array;\n\t},\n\n\tboolean(value: string): boolean {\n\t\treturn !(value === '0' || String(value).toLowerCase() === 'false');\n\t},\n\n\tnumber(value: string): number {\n\t\tconst number = Number(value.replace(/_/g, ''));\n\t\treturn number;\n\t},\n\n\tobject(value: string): object {\n\t\tconst object = JSON.parse(value);\n\t\tif (object === null || typeof object !== 'object' || Array.isArray(object)) {\n\t\t\tthrow new TypeError(\n\t\t\t\t`expected value of type \"object\" but instead got value \"${value}\" of type \"${parseAttributeTypeDefault(\n\t\t\t\t\tobject,\n\t\t\t\t)}\"`,\n\t\t\t);\n\t\t}\n\t\treturn object;\n\t},\n\n\tstring(value: string): string {\n\t\treturn value;\n\t},\n};\n\ntype Writer = (value: unknown) => string;\n\n/**\n * Object that maps attribute types to writer functions.\n * @type {Object.<string, Writer>}\n */\nconst writers: { [type: string]: Writer } = {\n\tdefault: writeString,\n\tarray: writeJSON,\n\tobject: writeJSON,\n};\n\nfunction writeJSON(value: unknown) {\n\treturn JSON.stringify(value);\n}\n\nfunction writeString(value: unknown) {\n\treturn `${value}`;\n}\n\n/**\n * Reads the attribute value based on the provided type.\n * @param value - The attribute value to be read.\n * @param type - The type of the attribute.\n * @returns The parsed attribute value.\n * @throws {TypeError} If the provided type is unknown.\n */\nexport function readAttributeValue(value: string, type: AttributeTypeConstant) {\n\tconst readerType = parseAttributeTypeConstant(type);\n\tif (!readerType) throw new TypeError(`[radiant-element] Unknown type \"${type}\"`);\n\treturn readers[readerType]!(value);\n}\n\nexport type ReadAttributeValueReturnType = ReturnType<typeof readAttributeValue>;\n\n/**\n * Writes the attribute value based on the provided type.\n *\n * @param value - The value to be written.\n * @param type - The type of the attribute.\n * @returns The written attribute value.\n * @throws {TypeError} If the provided type is unknown.\n */\nexport function writeAttributeValue(value: unknown, type: AttributeTypeConstant) {\n\tconst writerType = parseAttributeTypeConstant(type);\n\tif (!writerType) throw new TypeError(`[radiant-element] Unknown type \"${type}\"`);\n\tconst writer: Writer = writers[writerType] ?? writers.default ?? writeString;\n\treturn writer(value);\n}\n\nexport type WriteAttributeValueReturnType = ReturnType<typeof writeAttributeValue>;\n\n/*\n * Type guard functions for each type in AttributeTypeConstant\n */\nfunction isBoolean(value: unknown): value is boolean {\n\treturn typeof value === 'boolean';\n}\n\nfunction isNumber(value: unknown): value is number {\n\treturn typeof value === 'number';\n}\n\nfunction isString(value: unknown): value is string {\n\treturn typeof value === 'string';\n}\n\nfunction isArray(value: unknown): value is Array<unknown> {\n\treturn Array.isArray(value);\n}\n\nfunction isObject(value: unknown): value is object {\n\treturn typeof value === 'object' && !Array.isArray(value) && value !== null;\n}\n\n/*\n * Check function to ensure defaultValue matches the type\n */\nexport function isValueOfType(type: AttributeTypeConstant, defaultValue: unknown): boolean {\n\tswitch (type) {\n\t\tcase Boolean:\n\t\t\treturn isBoolean(defaultValue);\n\t\tcase Number:\n\t\t\treturn isNumber(defaultValue);\n\t\tcase String:\n\t\t\treturn isString(defaultValue);\n\t\tcase Array:\n\t\t\treturn isArray(defaultValue);\n\t\tcase Object:\n\t\t\treturn isObject(defaultValue);\n\t\tdefault:\n\t\t\treturn false;\n\t}\n}\n\nexport const getInitialValue = (\n\ttarget: RadiantElement,\n\ttype: AttributeTypeConstant,\n\tattributeKey: string,\n\tdefaultValue: unknown,\n) => {\n\tif (type === Boolean) {\n\t\tconst attributeValue = target.getAttribute(attributeKey);\n\t\tif (attributeValue === null) {\n\t\t\treturn defaultValue;\n\t\t}\n\n\t\treturn attributeValue === '' ? true : readAttributeValue(attributeValue, type);\n\t}\n\n\tconst attributeValue = target.getAttribute(attributeKey);\n\treturn attributeValue !== null\n\t\t? readAttributeValue(attributeValue, type)\n\t\t: (defaultValue ?? (defaultValueForType(type) as typeof defaultValue));\n};\n",
6
+ "import type { JsxRenderable, SubscribableJsxValue } from '@ecopages/jsx';\nimport {\n\ttype AttributeTypeConstant,\n\ttype ReadAttributeValueReturnType,\n\ttype WriteAttributeValueReturnType,\n\tisValueOfType,\n\treadAttributeValue,\n\twriteAttributeValue,\n} from '../utils/attribute-utils';\n\ntype StringPropertyKey<Value> = Extract<keyof Value, string>;\n\nexport interface ReactiveProperty<T = unknown> {\n\ttype: AttributeTypeConstant;\n\tvalue?: T;\n\tinitialValue?: T;\n\tname: string;\n\tattribute: string;\n\tconverter: {\n\t\tfromAttribute: (value: string) => ReadAttributeValueReturnType;\n\t\ttoAttribute: (value: any) => WriteAttributeValueReturnType;\n\t};\n}\n\nexport type ReactivePropertyOptions<T> = {\n\ttype: AttributeTypeConstant;\n\treflect?: boolean;\n\tattribute?: string;\n\tdefaultValue?: T;\n\tbind?: boolean | string;\n};\n\nexport type ReactiveBindingOption = boolean | string;\n\nexport type ReactiveFieldOptions = {\n\tbind?: ReactiveBindingOption;\n};\n\nexport type ReactiveField<T = unknown> = {\n\tname: string;\n\tvalue: T;\n\tinitialValue: T;\n};\n\nexport type ReactiveBindingValue<\n\tHost extends object,\n\tProperty extends StringPropertyKey<Host>,\n> = Host[Property] extends JsxRenderable ? Host[Property] : JsxRenderable;\n\nexport type ReactiveBindings<Bindings extends object> = {\n\treadonly [Property in StringPropertyKey<Bindings>]: SubscribableJsxValue<ReactiveBindingValue<Bindings, Property>>;\n};\n\nexport type ReactiveAccessorDefinition<T> = {\n\tbind?: ReactiveBindingOption;\n\tgetValue: () => T | undefined;\n\tsetValue: (value: T) => void;\n};\n\nexport function validateReactivePropertyDefault(type: AttributeTypeConstant, defaultValue: unknown): void {\n\tif (defaultValue !== undefined && !isValueOfType(type, defaultValue)) {\n\t\tthrow new Error(`defaultValue does not match the expected type for ${type.name}`);\n\t}\n}\n\nexport function createReactivePropertyMapping<T>(\n\tpropertyName: string,\n\tattributeKey: string,\n\ttype: AttributeTypeConstant,\n\tinitialValue: T | undefined,\n): ReactiveProperty<T> {\n\treturn {\n\t\ttype,\n\t\tname: propertyName,\n\t\tvalue: initialValue,\n\t\tinitialValue,\n\t\tattribute: attributeKey,\n\t\tconverter: {\n\t\t\tfromAttribute: (value) => readAttributeValue(value, type),\n\t\t\ttoAttribute: (value) => writeAttributeValue(value, type),\n\t\t},\n\t};\n}\n"
7
+ ],
8
+ "mappings": "2PAYO,SAAS,CAA0B,CAAC,EAAkC,CAC5E,OAAQ,QACF,MACJ,MAAO,aACH,QACJ,MAAO,eACH,OACJ,MAAO,cACH,OACJ,MAAO,cACH,OACJ,MAAO,UAUH,SAAS,CAAyB,CAAC,EAAqC,CAC9E,OAAQ,OAAO,OACT,UACJ,MAAO,cACH,SACJ,MAAO,aACH,SACJ,MAAO,SAGT,GAAI,MAAM,QAAQ,CAAY,EAAG,MAAO,QACxC,GAAI,OAAO,UAAU,SAAS,KAAK,CAAY,IAAM,kBAAmB,MAAO,SASzE,SAAS,CAAmB,CAAC,EAAsC,CACzE,OAAQ,QACF,OACJ,MAAO,Q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@ -1,4 +1,4 @@
1
- import type { ReactivePropertyOptions } from './radiant-element';
1
+ import type { ReactivePropertyOptions } from './reactive-prop-core';
2
2
  export type ReactivePropDefinition = {
3
3
  name: string;
4
4
  options: ReactivePropertyOptions<unknown>;
@@ -0,0 +1,3 @@
1
+ var s=((t)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(o,e)=>(typeof require<"u"?require:o)[e]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});var n=Symbol.for("@ecopages/radiant.reactivePropDefinitions");function p(t,o,e){let r=t.constructor,i=r[n]??[];if(i.some((c)=>c.name===o))return;i.push({name:o,options:e}),r[n]=i}function R(t){return(t.constructor[n]??[]).slice()}export{p as registerReactivePropDefinition,R as getReactivePropDefinitions};
2
+
3
+ //# debugId=8922999A64A3455464756E2164756E21
@@ -0,0 +1,10 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/core/reactive-prop-metadata.ts"],
4
+ "sourcesContent": [
5
+ "import type { ReactivePropertyOptions } from './reactive-prop-core';\n\nconst REACTIVE_PROP_DEFINITIONS = Symbol.for('@ecopages/radiant.reactivePropDefinitions');\n\nexport type ReactivePropDefinition = {\n\tname: string;\n\toptions: ReactivePropertyOptions<unknown>;\n};\n\ntype RadiantConstructorWithReactiveProps = CustomElementConstructor & {\n\t[REACTIVE_PROP_DEFINITIONS]?: ReactivePropDefinition[];\n};\n\nexport function registerReactivePropDefinition(\n\ttarget: object,\n\tpropertyName: string,\n\toptions: ReactivePropertyOptions<unknown>,\n): void {\n\tconst constructor = target.constructor as RadiantConstructorWithReactiveProps;\n\tconst definitions = constructor[REACTIVE_PROP_DEFINITIONS] ?? [];\n\n\tif (definitions.some((definition) => definition.name === propertyName)) {\n\t\treturn;\n\t}\n\n\tdefinitions.push({ name: propertyName, options });\n\tconstructor[REACTIVE_PROP_DEFINITIONS] = definitions;\n}\n\nexport function getReactivePropDefinitions(target: object): ReactivePropDefinition[] {\n\treturn ((target.constructor as RadiantConstructorWithReactiveProps)[REACTIVE_PROP_DEFINITIONS] ?? []).slice();\n}\n"
6
+ ],
7
+ "mappings": "2PAEA,IAAM,EAA4B,OAAO,IAAI,2CAA2C,EAWjF,SAAS,CAA8B,CAC7C,EACA,EACA,EACO,CACP,IAAM,EAAc,EAAO,YACrB,EAAc,EAAY,IAA8B,CAAC,EAE/D,GAAI,EAAY,KAAK,CAAC,IAAe,EAAW,OAAS,CAAY,EACpE,OAGD,EAAY,KAAK,CAAE,KAAM,EAAc,SAAQ,CAAC,EAChD,EAAY,GAA6B,EAGnC,SAAS,CAA0B,CAAC,EAA0C,CACpF,OAAS,EAAO,YAAoD,IAA8B,CAAC,GAAG,MAAM",
8
+ "debugId": "8922999A64A3455464756E2164756E21",
9
+ "names": []
10
+ }
@@ -0,0 +1,8 @@
1
+ export type { ReactiveComputed, ReactiveDependencyNode, ReactiveRuntime, ReactiveSubscriber, ReactiveWatcher, } from './reactivity-contract';
2
+ export { setReactiveRuntime } from './reactivity-runtime';
3
+ /** Tracks one dependency-node read against the active internal reactivity runtime. */
4
+ export declare function trackReactiveDependency(node: import('./reactivity-contract').ReactiveDependencyNode): void;
5
+ /** Creates a computed value using the currently selected internal reactivity runtime. */
6
+ export declare function createReactiveComputed<T>(read: () => T): import('./reactivity-contract').ReactiveComputed<T>;
7
+ /** Creates a watcher using the currently selected internal reactivity runtime. */
8
+ export declare function createReactiveWatcher(notify: () => void): import('./reactivity-contract').ReactiveWatcher;
@@ -0,0 +1,3 @@
1
+ var M=((j)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(j,{get:(z,q)=>(typeof require<"u"?require:z)[q]}):j)(function(j){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+j+'" is not supported')});import{Computed as G,subtle as H,trackDependency as J}from"@ecopages/signals";function K(j){return j}function B(j){return j}var E={trackDependency(j){J(K(j))},createComputed(j){return new G(j)},createWatcher(j){let z=new H.Watcher(j);return{watch(q){z.watch(B(q))},unwatch(q){z.unwatch(B(q))}}}};var F=E;function A(){return F}function L(j){F=j}function X(j){A().trackDependency(j)}function Y(j){return A().createComputed(j)}function Z(j){return A().createWatcher(j)}export{X as trackReactiveDependency,L as setReactiveRuntime,Z as createReactiveWatcher,Y as createReactiveComputed};
2
+
3
+ //# debugId=2C1410C07BEF790364756E2164756E21
@@ -0,0 +1,12 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/core/reactivity-signals.ts", "../src/core/reactivity-runtime.ts", "../src/core/reactivity-adapter.ts"],
4
+ "sourcesContent": [
5
+ "import {\n\tComputed as SignalsComputed,\n\tsubtle,\n\ttrackDependency,\n\ttype DependencyNode as SignalsDependencyNode,\n} from '@ecopages/signals';\nimport type { ReactiveComputed, ReactiveDependencyNode, ReactiveRuntime, ReactiveWatcher } from './reactivity-contract';\n\nfunction asSignalsDependencyNode(node: ReactiveDependencyNode): SignalsDependencyNode {\n\treturn node as SignalsDependencyNode;\n}\n\nfunction asSignalsComputed(signal: ReactiveComputed<unknown>): SignalsComputed<unknown> {\n\treturn signal as SignalsComputed<unknown>;\n}\n\n/**\n * Default Signals-backed implementation of Radiant's internal reactivity\n * runtime contract.\n *\n * This is the only core module that imports `@ecopages/signals` directly. The\n * rest of core consumes the narrower runtime contract through the adapter and\n * runtime holder modules.\n */\nexport const signalsReactiveRuntime: ReactiveRuntime = {\n\ttrackDependency(node) {\n\t\ttrackDependency(asSignalsDependencyNode(node));\n\t},\n\tcreateComputed<T>(read: () => T): ReactiveComputed<T> {\n\t\treturn new SignalsComputed(read);\n\t},\n\tcreateWatcher(notify: () => void): ReactiveWatcher {\n\t\tconst watcher = new subtle.Watcher(notify);\n\n\t\treturn {\n\t\t\twatch(signal) {\n\t\t\t\twatcher.watch(asSignalsComputed(signal));\n\t\t\t},\n\t\t\tunwatch(signal) {\n\t\t\t\twatcher.unwatch(asSignalsComputed(signal));\n\t\t\t},\n\t\t};\n\t},\n};\n",
6
+ "import type { ReactiveRuntime } from './reactivity-contract';\nimport { signalsReactiveRuntime } from './reactivity-signals';\n\nlet activeReactiveRuntime: ReactiveRuntime = signalsReactiveRuntime;\n\n/**\n * Returns the currently active internal reactivity runtime.\n *\n * The current implementation still defaults to the Signals-backed runtime, so\n * importing this module preserves today's behavior. A stricter optional-runtime\n * architecture would move that default installation into an explicit bootstrap\n * step instead of this eager default.\n */\nexport function getReactiveRuntime(): ReactiveRuntime {\n\treturn activeReactiveRuntime;\n}\n\n/**\n * Replaces the active internal reactivity runtime used by Radiant core.\n *\n * This is an internal seam for alternate runtime experiments and tests. It does\n * not yet make Signals optional at module-load time because this module still\n * imports the default Signals-backed runtime eagerly.\n */\nexport function setReactiveRuntime(runtime: ReactiveRuntime): void {\n\tactiveReactiveRuntime = runtime;\n}\n",
7
+ "import { getReactiveRuntime } from './reactivity-runtime';\nexport type {\n\tReactiveComputed,\n\tReactiveDependencyNode,\n\tReactiveRuntime,\n\tReactiveSubscriber,\n\tReactiveWatcher,\n} from './reactivity-contract';\nexport { setReactiveRuntime } from './reactivity-runtime';\n\n/** Tracks one dependency-node read against the active internal reactivity runtime. */\nexport function trackReactiveDependency(node: import('./reactivity-contract').ReactiveDependencyNode): void {\n\tgetReactiveRuntime().trackDependency(node);\n}\n\n/** Creates a computed value using the currently selected internal reactivity runtime. */\nexport function createReactiveComputed<T>(read: () => T): import('./reactivity-contract').ReactiveComputed<T> {\n\treturn getReactiveRuntime().createComputed(read);\n}\n\n/** Creates a watcher using the currently selected internal reactivity runtime. */\nexport function createReactiveWatcher(notify: () => void): import('./reactivity-contract').ReactiveWatcher {\n\treturn getReactiveRuntime().createWatcher(notify);\n}\n"
8
+ ],
9
+ "mappings": "2PAAA,mBACC,YACA,qBACA,0BAKD,SAAS,CAAuB,CAAC,EAAqD,CACrF,OAAO,EAGR,SAAS,CAAiB,CAAC,EAA6D,CACvF,OAAO,EAWD,IAAM,EAA0C,CACtD,eAAe,CAAC,EAAM,CACrB,EAAgB,EAAwB,CAAI,CAAC,GAE9C,cAAiB,CAAC,EAAoC,CACrD,OAAO,IAAI,EAAgB,CAAI,GAEhC,aAAa,CAAC,EAAqC,CAClD,IAAM,EAAU,IAAI,EAAO,QAAQ,CAAM,EAEzC,MAAO,CACN,KAAK,CAAC,EAAQ,CACb,EAAQ,MAAM,EAAkB,CAAM,CAAC,GAExC,OAAO,CAAC,EAAQ,CACf,EAAQ,QAAQ,EAAkB,CAAM,CAAC,EAE3C,EAEF,ECxCA,IAAI,EAAyC,EAUtC,SAAS,CAAkB,EAAoB,CACrD,OAAO,EAUD,SAAS,CAAkB,CAAC,EAAgC,CAClE,EAAwB,ECdlB,SAAS,CAAuB,CAAC,EAAoE,CAC3G,EAAmB,EAAE,gBAAgB,CAAI,EAInC,SAAS,CAAyB,CAAC,EAAoE,CAC7G,OAAO,EAAmB,EAAE,eAAe,CAAI,EAIzC,SAAS,CAAqB,CAAC,EAAqE,CAC1G,OAAO,EAAmB,EAAE,cAAc,CAAM",
10
+ "debugId": "2C1410C07BEF790364756E2164756E21",
11
+ "names": []
12
+ }
@@ -0,0 +1,39 @@
1
+ /**
2
+ * Minimal dependency-node contract that Radiant core can publish into a
3
+ * reactive runtime.
4
+ *
5
+ * The shape intentionally covers only the capabilities core needs for tracked
6
+ * reads and watcher notifications, rather than exposing any concrete Signals
7
+ * types to the rest of the package.
8
+ */
9
+ export interface ReactiveDependencyNode {
10
+ get(): unknown;
11
+ subscribe(notify: ReactiveSubscriber<unknown>): () => void;
12
+ addWatcher?(notify: () => void): () => void;
13
+ getVersion?(): number;
14
+ }
15
+ /** Callback signature used when a dependency node publishes a new value. */
16
+ export interface ReactiveSubscriber<T> {
17
+ (value: T): void;
18
+ }
19
+ /** Read-only computed value consumed by Radiant core render lifecycles. */
20
+ export interface ReactiveComputed<T> {
21
+ get(): T;
22
+ }
23
+ /** Watcher contract used to subscribe and unsubscribe from computed values. */
24
+ export interface ReactiveWatcher {
25
+ watch(signal: ReactiveComputed<unknown>): void;
26
+ unwatch(signal: ReactiveComputed<unknown>): void;
27
+ }
28
+ /**
29
+ * Internal runtime contract that supplies Radiant's reactivity primitives.
30
+ *
31
+ * Core code should target this contract rather than a concrete reactive
32
+ * library so the dependency stays centralized and alternate implementations can
33
+ * be introduced without rewriting core behavior.
34
+ */
35
+ export interface ReactiveRuntime {
36
+ trackDependency(node: ReactiveDependencyNode): void;
37
+ createComputed<T>(read: () => T): ReactiveComputed<T>;
38
+ createWatcher(notify: () => void): ReactiveWatcher;
39
+ }
@@ -0,0 +1,2 @@
1
+
2
+ //# debugId=90C6D7D7B82E94BC64756E2164756E21
@@ -4,6 +4,6 @@
4
4
  "sourcesContent": [
5
5
  ],
6
6
  "mappings": "",
7
- "debugId": "D915F4578C1B7CB964756E2164756E21",
7
+ "debugId": "90C6D7D7B82E94BC64756E2164756E21",
8
8
  "names": []
9
9
  }
@@ -0,0 +1,18 @@
1
+ import type { ReactiveRuntime } from './reactivity-contract';
2
+ /**
3
+ * Returns the currently active internal reactivity runtime.
4
+ *
5
+ * The current implementation still defaults to the Signals-backed runtime, so
6
+ * importing this module preserves today's behavior. A stricter optional-runtime
7
+ * architecture would move that default installation into an explicit bootstrap
8
+ * step instead of this eager default.
9
+ */
10
+ export declare function getReactiveRuntime(): ReactiveRuntime;
11
+ /**
12
+ * Replaces the active internal reactivity runtime used by Radiant core.
13
+ *
14
+ * This is an internal seam for alternate runtime experiments and tests. It does
15
+ * not yet make Signals optional at module-load time because this module still
16
+ * imports the default Signals-backed runtime eagerly.
17
+ */
18
+ export declare function setReactiveRuntime(runtime: ReactiveRuntime): void;
@@ -0,0 +1,3 @@
1
+ var K=((j)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(j,{get:(z,q)=>(typeof require<"u"?require:z)[q]}):j)(function(j){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+j+'" is not supported')});import{Computed as F,subtle as G,trackDependency as H}from"@ecopages/signals";function J(j){return j}function A(j){return j}var B={trackDependency(j){H(J(j))},createComputed(j){return new F(j)},createWatcher(j){let z=new G.Watcher(j);return{watch(q){z.watch(A(q))},unwatch(q){z.unwatch(A(q))}}}};var E=B;function Q(){return E}function U(j){E=j}export{U as setReactiveRuntime,Q as getReactiveRuntime};
2
+
3
+ //# debugId=EC9477ED76A559EF64756E2164756E21
@@ -0,0 +1,11 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/core/reactivity-signals.ts", "../src/core/reactivity-runtime.ts"],
4
+ "sourcesContent": [
5
+ "import {\n\tComputed as SignalsComputed,\n\tsubtle,\n\ttrackDependency,\n\ttype DependencyNode as SignalsDependencyNode,\n} from '@ecopages/signals';\nimport type { ReactiveComputed, ReactiveDependencyNode, ReactiveRuntime, ReactiveWatcher } from './reactivity-contract';\n\nfunction asSignalsDependencyNode(node: ReactiveDependencyNode): SignalsDependencyNode {\n\treturn node as SignalsDependencyNode;\n}\n\nfunction asSignalsComputed(signal: ReactiveComputed<unknown>): SignalsComputed<unknown> {\n\treturn signal as SignalsComputed<unknown>;\n}\n\n/**\n * Default Signals-backed implementation of Radiant's internal reactivity\n * runtime contract.\n *\n * This is the only core module that imports `@ecopages/signals` directly. The\n * rest of core consumes the narrower runtime contract through the adapter and\n * runtime holder modules.\n */\nexport const signalsReactiveRuntime: ReactiveRuntime = {\n\ttrackDependency(node) {\n\t\ttrackDependency(asSignalsDependencyNode(node));\n\t},\n\tcreateComputed<T>(read: () => T): ReactiveComputed<T> {\n\t\treturn new SignalsComputed(read);\n\t},\n\tcreateWatcher(notify: () => void): ReactiveWatcher {\n\t\tconst watcher = new subtle.Watcher(notify);\n\n\t\treturn {\n\t\t\twatch(signal) {\n\t\t\t\twatcher.watch(asSignalsComputed(signal));\n\t\t\t},\n\t\t\tunwatch(signal) {\n\t\t\t\twatcher.unwatch(asSignalsComputed(signal));\n\t\t\t},\n\t\t};\n\t},\n};\n",
6
+ "import type { ReactiveRuntime } from './reactivity-contract';\nimport { signalsReactiveRuntime } from './reactivity-signals';\n\nlet activeReactiveRuntime: ReactiveRuntime = signalsReactiveRuntime;\n\n/**\n * Returns the currently active internal reactivity runtime.\n *\n * The current implementation still defaults to the Signals-backed runtime, so\n * importing this module preserves today's behavior. A stricter optional-runtime\n * architecture would move that default installation into an explicit bootstrap\n * step instead of this eager default.\n */\nexport function getReactiveRuntime(): ReactiveRuntime {\n\treturn activeReactiveRuntime;\n}\n\n/**\n * Replaces the active internal reactivity runtime used by Radiant core.\n *\n * This is an internal seam for alternate runtime experiments and tests. It does\n * not yet make Signals optional at module-load time because this module still\n * imports the default Signals-backed runtime eagerly.\n */\nexport function setReactiveRuntime(runtime: ReactiveRuntime): void {\n\tactiveReactiveRuntime = runtime;\n}\n"
7
+ ],
8
+ "mappings": "2PAAA,mBACC,YACA,qBACA,0BAKD,SAAS,CAAuB,CAAC,EAAqD,CACrF,OAAO,EAGR,SAAS,CAAiB,CAAC,EAA6D,CACvF,OAAO,EAWD,IAAM,EAA0C,CACtD,eAAe,CAAC,EAAM,CACrB,EAAgB,EAAwB,CAAI,CAAC,GAE9C,cAAiB,CAAC,EAAoC,CACrD,OAAO,IAAI,EAAgB,CAAI,GAEhC,aAAa,CAAC,EAAqC,CAClD,IAAM,EAAU,IAAI,EAAO,QAAQ,CAAM,EAEzC,MAAO,CACN,KAAK,CAAC,EAAQ,CACb,EAAQ,MAAM,EAAkB,CAAM,CAAC,GAExC,OAAO,CAAC,EAAQ,CACf,EAAQ,QAAQ,EAAkB,CAAM,CAAC,EAE3C,EAEF,ECxCA,IAAI,EAAyC,EAUtC,SAAS,CAAkB,EAAoB,CACrD,OAAO,EAUD,SAAS,CAAkB,CAAC,EAAgC,CAClE,EAAwB",
9
+ "debugId": "EC9477ED76A559EF64756E2164756E21",
10
+ "names": []
11
+ }
@@ -0,0 +1,10 @@
1
+ import type { ReactiveRuntime } from './reactivity-contract';
2
+ /**
3
+ * Default Signals-backed implementation of Radiant's internal reactivity
4
+ * runtime contract.
5
+ *
6
+ * This is the only core module that imports `@ecopages/signals` directly. The
7
+ * rest of core consumes the narrower runtime contract through the adapter and
8
+ * runtime holder modules.
9
+ */
10
+ export declare const signalsReactiveRuntime: ReactiveRuntime;
@@ -0,0 +1,3 @@
1
+ var G=((j)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(j,{get:(x,q)=>(typeof require<"u"?require:x)[q]}):j)(function(j){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+j+'" is not supported')});import{Computed as A,subtle as B,trackDependency as E}from"@ecopages/signals";function F(j){return j}function z(j){return j}var J={trackDependency(j){E(F(j))},createComputed(j){return new A(j)},createWatcher(j){let x=new B.Watcher(j);return{watch(q){x.watch(z(q))},unwatch(q){x.unwatch(z(q))}}}};export{J as signalsReactiveRuntime};
2
+
3
+ //# debugId=D1656A9DD7B8269564756E2164756E21
@@ -0,0 +1,10 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/core/reactivity-signals.ts"],
4
+ "sourcesContent": [
5
+ "import {\n\tComputed as SignalsComputed,\n\tsubtle,\n\ttrackDependency,\n\ttype DependencyNode as SignalsDependencyNode,\n} from '@ecopages/signals';\nimport type { ReactiveComputed, ReactiveDependencyNode, ReactiveRuntime, ReactiveWatcher } from './reactivity-contract';\n\nfunction asSignalsDependencyNode(node: ReactiveDependencyNode): SignalsDependencyNode {\n\treturn node as SignalsDependencyNode;\n}\n\nfunction asSignalsComputed(signal: ReactiveComputed<unknown>): SignalsComputed<unknown> {\n\treturn signal as SignalsComputed<unknown>;\n}\n\n/**\n * Default Signals-backed implementation of Radiant's internal reactivity\n * runtime contract.\n *\n * This is the only core module that imports `@ecopages/signals` directly. The\n * rest of core consumes the narrower runtime contract through the adapter and\n * runtime holder modules.\n */\nexport const signalsReactiveRuntime: ReactiveRuntime = {\n\ttrackDependency(node) {\n\t\ttrackDependency(asSignalsDependencyNode(node));\n\t},\n\tcreateComputed<T>(read: () => T): ReactiveComputed<T> {\n\t\treturn new SignalsComputed(read);\n\t},\n\tcreateWatcher(notify: () => void): ReactiveWatcher {\n\t\tconst watcher = new subtle.Watcher(notify);\n\n\t\treturn {\n\t\t\twatch(signal) {\n\t\t\t\twatcher.watch(asSignalsComputed(signal));\n\t\t\t},\n\t\t\tunwatch(signal) {\n\t\t\t\twatcher.unwatch(asSignalsComputed(signal));\n\t\t\t},\n\t\t};\n\t},\n};\n"
6
+ ],
7
+ "mappings": "2PAAA,mBACC,YACA,qBACA,0BAKD,SAAS,CAAuB,CAAC,EAAqD,CACrF,OAAO,EAGR,SAAS,CAAiB,CAAC,EAA6D,CACvF,OAAO,EAWD,IAAM,EAA0C,CACtD,eAAe,CAAC,EAAM,CACrB,EAAgB,EAAwB,CAAI,CAAC,GAE9C,cAAiB,CAAC,EAAoC,CACrD,OAAO,IAAI,EAAgB,CAAI,GAEhC,aAAa,CAAC,EAAqC,CAClD,IAAM,EAAU,IAAI,EAAO,QAAQ,CAAM,EAEzC,MAAO,CACN,KAAK,CAAC,EAAQ,CACb,EAAQ,MAAM,EAAkB,CAAM,CAAC,GAExC,OAAO,CAAC,EAAQ,CACf,EAAQ,QAAQ,EAAkB,CAAM,CAAC,EAE3C,EAEF",
8
+ "debugId": "D1656A9DD7B8269564756E2164756E21",
9
+ "names": []
10
+ }
@@ -0,0 +1,28 @@
1
+ import { type JsxRenderable } from '@ecopages/jsx';
2
+ export type RenderRuntimeHost = HTMLElement & {
3
+ render(): JsxRenderable;
4
+ requestUpdate(): void;
5
+ };
6
+ export declare class RenderRuntime {
7
+ #private;
8
+ constructor(host: RenderRuntimeHost);
9
+ get slotProjectionVersion(): number;
10
+ getSlotElements<T extends Element = Element>(name?: string): T[];
11
+ getSlotProjectionScriptTag(): string | undefined;
12
+ getAuthoredHydrationScriptMarkup(): string | undefined;
13
+ hydrate(renderTarget: HTMLElement): void;
14
+ render(renderTarget: HTMLElement): void;
15
+ observeSlotProjection(): void;
16
+ disconnectSlotProjectionObserver(): void;
17
+ disconnectRenderWatcher(): void;
18
+ resolveTrackedRenderOutput(): {
19
+ containsSlots: boolean;
20
+ value: JsxRenderable;
21
+ };
22
+ dispose(): void;
23
+ private ensureSlotProjectionState;
24
+ private handleSlotProjectionMutations;
25
+ private addProjectedSlotNode;
26
+ private removeProjectedSlotNode;
27
+ private resolveRenderOutput;
28
+ }
@@ -0,0 +1,3 @@
1
+ var n=((q)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(q,{get:(G,Q)=>(typeof require<"u"?require:G)[Q]}):q)(function(q){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+q+'" is not supported')});import{Computed as S,subtle as T,trackDependency as g}from"@ecopages/signals";function v(q){return q}function D(q){return q}var Y={trackDependency(q){g(v(q))},createComputed(q){return new S(q)},createWatcher(q){let G=new T.Watcher(q);return{watch(Q){G.watch(D(Q))},unwatch(Q){G.unwatch(D(Q))}}}};var K=Y;function J(){return K}function y(q){K=q}function Z0(q){J().trackDependency(q)}function H(q){return J().createComputed(q)}function x(q){return J().createWatcher(q)}function E(q){return q.replace(/&/g,"\\u0026").replace(/</g,"\\u003c").replace(/>/g,"\\u003e").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}var M="data-hydration",_="data-hydration-type",F="data-hydration-key";function J0(q){let G=q.hydrationKey?` ${F}="${h(q.hydrationKey)}"`:"";return`<script type="application/json" ${M} ${_}="${q.type}"${G}>${q.serializedValue}</script>`}function W0(q){return E(q)}function L0(q,G){let Q=q.textContent;if(!Q)return G;try{return JSON.parse(Q)}catch{if(typeof console<"u")console.warn(`[@ecopages/radiant] Failed to parse hydration payload from <script ${M}>:`,Q.slice(0,120));return G}}function F0(q,G,Q){let X=q.children;if(!X||X.length===0){let $=q.childNodes;if(!$||$.length===0)return null;for(let Z=0;Z<$.length;Z+=1){let z=$[Z];if(z.nodeType!==1)continue;let U=z;if(O(U,G,Q))return U}return null}for(let $=0;$<X.length;$+=1)if(O(X[$],G,Q))return X[$];return null}function O(q,G,Q){if(q.tagName!=="SCRIPT"||!q.hasAttribute(M)||q.getAttribute(_)!==G)return!1;if(Q!==void 0)return q.getAttribute(F)===Q;return!q.hasAttribute(F)}function h(q){return q.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}import{createMarkupNodeLike as p,isKeyedJsxValue as k,isSlotJsxValue as b}from"@ecopages/jsx";var w="",L="data-radiant-slot-projection";function A(q){let G=new Map;for(let Q of Array.from(q.childNodes)){if(i(Q))continue;m(G,c(Q),Q)}return G}function I(q){let G;try{G=JSON.parse(q)}catch{if(typeof console<"u")console.warn("[@ecopages/radiant] Failed to parse slot projection payload:",q.slice(0,120));return new Map}let Q=new Map;for(let[X,$]of Object.entries(G)){if(!Array.isArray($)||$.length===0)continue;Q.set(B(X),$.map((Z)=>p(Z)))}return Q}function P(q){let G=Array.from(q.childNodes).filter((Q)=>V(Q)).map((Q)=>W(Q)??"").filter((Q)=>Q!=="");return G.length>0?G.join(""):void 0}function f(q){let G={};for(let[Q,X]of q.entries()){let $=X.map((Z)=>W(Z)).filter((Z)=>Z!==void 0&&Z!=="");if($.length>0)G[Q]=$}return Object.keys(G).length>0?JSON.stringify(G):void 0}function N(q,G){let Q=!1,X=(Z)=>{if(b(Z))return Q=!0,d(Z,G,X);if(k(Z))return u(Z,X(Z.value));if(s(Z))return{_$rType$:1,rootLocalName:Z.rootLocalName,ssrIntrinsicProps:Z.ssrIntrinsicProps,strings:Z.strings,values:Z.values.map((z)=>X(z))};if(C(Z))return Array.from(Z,(z)=>X(z));return Z},$=X(q);return{containsSlots:Q,value:$}}function j(q){for(let G of Array.from(q.childNodes)){if(!R(G))continue;let Q=G.textContent??void 0;return G.parentNode?.removeChild(G),Q}return}function m(q,G,Q){let X=q.get(G);if(X){X.push(Q);return}q.set(G,[Q])}function u(q,G){return{...q,value:G}}function c(q){if(q instanceof Element)return B(q.getAttribute("slot"));return w}function C(q){return typeof q!=="string"&&typeof q==="object"&&q!==null&&Symbol.iterator in q}function R(q){return q instanceof HTMLScriptElement&&q.hasAttribute(L)}function V(q){return q instanceof HTMLScriptElement&&q.hasAttribute(M)}function i(q){return R(q)||V(q)}function s(q){return typeof q==="object"&&q!==null&&q._$rType$===1&&Array.isArray(q.strings)&&Array.isArray(q.values)}function B(q){return q??w}function W(q){if(q===void 0||q===null||q===!1||q===!0)return;if(typeof Node<"u"&&q instanceof Node){if(q.nodeType===Node.TEXT_NODE)return q.textContent??"";return q.outerHTML??q.textContent??void 0}if(k(q))return W(q.value);if(typeof q==="string"||typeof q==="number"||typeof q==="bigint")return String(q);if(typeof q==="object"&&q!==null&&"outerHTML"in q)return typeof q.outerHTML==="string"?q.outerHTML:q.textContent??void 0;if(C(q))return Array.from(q,(G)=>W(G)??"").join("");return}function d(q,G,Q){let X=G.get(B(q.name));if(X&&X.length>0)return X.length===1?X[0]:X;if(q.fallback===void 0)return"";return Q(q.fallback)}import{hydrate as l,render as o}from"@ecopages/jsx";class a{#q;#G=new Map;#Q;#Z;#X;#$=0;constructor(q){this.#q=q,this.#Z=x(()=>{this.#q.requestUpdate()})}get slotProjectionVersion(){return this.#$}getSlotElements(q){return this.ensureSlotProjectionState(),(this.#G.get(q??w)??[]).filter((G)=>typeof Node<"u"&&G instanceof Element)}getSlotProjectionScriptTag(){this.ensureSlotProjectionState();let q=f(this.#G);if(!q)return;return`<script type="application/json" ${L}>${r(q)}</script>`}getAuthoredHydrationScriptMarkup(){return P(this.#q)??void 0}hydrate(q){this.disconnectSlotProjectionObserver();try{l(this.resolveTrackedRenderOutput().value,q)}finally{this.observeSlotProjection()}}render(q){this.disconnectSlotProjectionObserver();try{o(this.resolveTrackedRenderOutput().value,q)}finally{this.observeSlotProjection()}}observeSlotProjection(){if(typeof MutationObserver>"u"||this.#X||!this.#q.isConnected)return;this.#X=new MutationObserver((q)=>this.handleSlotProjectionMutations(q)),this.#X.observe(this.#q,{childList:!0})}disconnectSlotProjectionObserver(){this.#X?.disconnect(),this.#X=void 0}disconnectRenderWatcher(){if(!this.#Q)return;this.#Z.unwatch(this.#Q),this.#Q=void 0}resolveTrackedRenderOutput(){let q=H(()=>this.resolveRenderOutput()),G=q.get();if(!this.#q.isConnected)return G;if(this.#Q)this.#Z.unwatch(this.#Q);return this.#Q=q,this.#Z.watch(q),G}dispose(){this.disconnectSlotProjectionObserver(),this.disconnectRenderWatcher()}ensureSlotProjectionState(){if(this.#G.size>0)return;let q=this.#q.isConnected?j(this.#q):void 0;if(typeof q==="string"&&q!==""){this.#G=I(q),this.#$+=1;return}if(this.#q.childNodes.length>0)this.#G=A(this.#q),this.#$+=1}handleSlotProjectionMutations(q){let G=!1;for(let Q of q){for(let X of Array.from(Q.removedNodes))if(this.removeProjectedSlotNode(X))G=!0;for(let X of Array.from(Q.addedNodes)){if(X.parentNode!==this.#q)continue;if(this.addProjectedSlotNode(X))G=!0}}if(G)this.#$+=1,this.#q.requestUpdate()}addProjectedSlotNode(q){if(q instanceof HTMLScriptElement&&(q.hasAttribute(L)||q.hasAttribute(M)))return!1;let G=q instanceof Element?q.getAttribute("slot")??w:w,Q=this.#G.get(G);if(Q){if(Q.includes(q))return!1;return Q.push(q),!0}return this.#G.set(G,[q]),!0}removeProjectedSlotNode(q){for(let[G,Q]of this.#G.entries()){let X=Q.indexOf(q);if(X===-1)continue;if(Q.splice(X,1),Q.length===0)this.#G.delete(G);return!0}return!1}resolveRenderOutput(){return this.ensureSlotProjectionState(),N(this.#q.render(),this.#G)}}function r(q){return q.replace(/</g,"\\u003c")}export{a as RenderRuntime};
2
+
3
+ //# debugId=CAC1A45120DEFD2C64756E2164756E21