@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,16 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/decorators/legacy/instance-initializers.ts", "../src/decorators/bridge.ts", "../src/tools/event-emitter.ts", "../src/helpers/create-event.ts", "../src/decorators/legacy/event.ts", "../src/decorators/standard/event.ts", "../src/decorators/event.ts"],
4
+ "sourcesContent": [
5
+ "type LegacyInstanceInitializer<T extends object = object> = (instance: T) => void;\n\nconst LEGACY_INSTANCE_INITIALIZERS = Symbol.for('@ecopages/radiant.legacy-instance-initializers');\nconst LEGACY_POST_CONSTRUCTION_INITIALIZERS = Symbol.for('@ecopages/radiant.legacy-post-construction-initializers');\nconst LEGACY_EXECUTED_POST_CONSTRUCTION_INITIALIZERS = Symbol.for(\n\t'@ecopages/radiant.legacy-executed-post-construction-initializers',\n);\n\n/**\n * Registers per-instance initialization work for a legacy decorator.\n *\n * Legacy decorators execute against the prototype, so any initialization that\n * needs the concrete element instance must be deferred until construction time.\n */\nexport function registerLegacyInstanceInitializer<T extends object>(\n\tproto: T,\n\tinitializer: LegacyInstanceInitializer<T>,\n): void {\n\tregisterInitializer(proto, LEGACY_INSTANCE_INITIALIZERS, initializer);\n}\n\n/**\n * Registers post-construction work for a legacy decorator.\n *\n * This phase exists for decorators that eagerly write instance fields. With\n * legacy decorators plus `useDefineForClassFields`, subclass field definition\n * can overwrite values written during the base-class constructor.\n */\nexport function registerLegacyPostConstructionInitializer<T extends object>(\n\tproto: T,\n\tinitializer: LegacyInstanceInitializer<T>,\n): void {\n\tregisterInitializer(proto, LEGACY_POST_CONSTRUCTION_INITIALIZERS, initializer);\n}\n\n/**\n * Runs all legacy decorator initializers for a newly constructed element.\n *\n * Initializers are collected from the prototype chain and executed from base to\n * derived class so inherited setup remains stable.\n */\nexport function runLegacyInstanceInitializers<T extends object>(instance: T): void {\n\trunLegacyInitializers(instance, LEGACY_INSTANCE_INITIALIZERS);\n}\n\n/**\n * Runs legacy decorator setup that must happen after subclass field\n * initialization has completed.\n *\n * Each initializer runs at most once per instance even if multiple lifecycle\n * entrypoints call this helper.\n */\nexport function runLegacyPostConstructionInitializers<T extends object>(instance: T): void {\n\tconst target = instance as Record<PropertyKey, unknown>;\n\n\trunLegacyInitializers(\n\t\tinstance,\n\t\tLEGACY_POST_CONSTRUCTION_INITIALIZERS,\n\t\t(target[LEGACY_EXECUTED_POST_CONSTRUCTION_INITIALIZERS] ??= new Set()) as Set<LegacyInstanceInitializer<T>>,\n\t);\n}\n\nfunction registerInitializer<T extends object>(proto: T, key: symbol, initializer: LegacyInstanceInitializer<T>): void {\n\tconst target = proto as Record<PropertyKey, unknown>;\n\tconst ownInitializers = Object.prototype.hasOwnProperty.call(target, key) ? target[key] : undefined;\n\n\tif (Array.isArray(ownInitializers)) {\n\t\townInitializers.push(initializer);\n\t\treturn;\n\t}\n\n\tObject.defineProperty(target, key, {\n\t\tvalue: [initializer],\n\t});\n}\n\nfunction runLegacyInitializers<T extends object>(\n\tinstance: T,\n\tkey: symbol,\n\texecutedInitializers?: Set<LegacyInstanceInitializer<T>>,\n\tprototype: object | null = Object.getPrototypeOf(instance),\n): void {\n\tif (!prototype || prototype === Object.prototype) {\n\t\treturn;\n\t}\n\n\trunLegacyInitializers(instance, key, executedInitializers, Object.getPrototypeOf(prototype));\n\n\tconst initializers = (prototype as Record<PropertyKey, unknown>)[key] as LegacyInstanceInitializer<T>[] | undefined;\n\n\tif (!Array.isArray(initializers)) {\n\t\treturn;\n\t}\n\n\tfor (const initializer of initializers) {\n\t\tif (executedInitializers?.has(initializer)) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tinitializer(instance);\n\t\texecutedInitializers?.add(initializer);\n\t}\n}\n",
6
+ "import type { Method } from '../types';\n\ntype StandardFieldFn<Host extends object, Value, Result> = (\n\ttarget: undefined,\n\tcontext: ClassFieldDecoratorContext<Host, Value>,\n) => Result;\n\ntype LegacyFieldFn<Proto, Result> = (proto: Proto, name: string) => Result;\n\ntype StandardMethodFn<Host extends object, TMethod extends Method, Result> = (\n\ttarget: TMethod,\n\tcontext: ClassMethodDecoratorContext<Host, TMethod>,\n) => Result;\n\ntype LegacyMethodFn<Proto, Result> = (proto: Proto, name: string, descriptor: PropertyDescriptor) => Result;\n\nfunction isMethod(value: unknown): value is Method {\n\treturn typeof value === 'function';\n}\n\nexport function fieldDecoratorBridge<Host extends object, Value, Result, Proto>(\n\tstandard: StandardFieldFn<Host, Value, Result>,\n\tlegacy: LegacyFieldFn<Proto, void>,\n\tprotoOrTarget: undefined,\n\tnameOrContext: ClassFieldDecoratorContext<Host, Value>,\n): Result;\nexport function fieldDecoratorBridge<Host extends object, Value, Proto, Result>(\n\tstandard: StandardFieldFn<Host, Value, void>,\n\tlegacy: LegacyFieldFn<Proto, Result>,\n\tprotoOrTarget: Proto,\n\tnameOrContext: string,\n): Result;\nexport function fieldDecoratorBridge<Host extends object, Value, StandardResult, Proto, LegacyResult>(\n\tstandard: StandardFieldFn<Host, Value, StandardResult>,\n\tlegacy: LegacyFieldFn<Proto, LegacyResult>,\n\tprotoOrTarget: Proto | undefined,\n\tnameOrContext: string | ClassFieldDecoratorContext<Host, Value>,\n): StandardResult | LegacyResult;\n\nexport function fieldDecoratorBridge(\n\tstandard: StandardFieldFn<object, unknown, unknown>,\n\tlegacy: LegacyFieldFn<unknown, unknown>,\n\tprotoOrTarget: unknown,\n\tnameOrContext: string | ClassFieldDecoratorContext<object, unknown>,\n): unknown {\n\tif (typeof nameOrContext === 'object') {\n\t\treturn standard(undefined, nameOrContext);\n\t}\n\n\treturn legacy(protoOrTarget, nameOrContext);\n}\n\nexport function methodDecoratorBridge<Host extends object, TMethod extends Method, Result, Proto>(\n\tstandard: StandardMethodFn<Host, TMethod, Result>,\n\tlegacy: LegacyMethodFn<Proto, void>,\n\tprotoOrTarget: TMethod,\n\tnameOrContext: ClassMethodDecoratorContext<Host, TMethod>,\n\tdescriptor?: undefined,\n): Result;\nexport function methodDecoratorBridge<Host extends object, TMethod extends Method, Proto, Result>(\n\tstandard: StandardMethodFn<Host, TMethod, void>,\n\tlegacy: LegacyMethodFn<Proto, Result>,\n\tprotoOrTarget: Proto,\n\tnameOrContext: string,\n\tdescriptor: PropertyDescriptor,\n): Result;\nexport function methodDecoratorBridge<Host extends object, TMethod extends Method, StandardResult, Proto, LegacyResult>(\n\tstandard: StandardMethodFn<Host, TMethod, StandardResult>,\n\tlegacy: LegacyMethodFn<Proto, LegacyResult>,\n\tprotoOrTarget: Proto | TMethod,\n\tnameOrContext: string | ClassMethodDecoratorContext<Host, TMethod>,\n\tdescriptor?: PropertyDescriptor,\n): StandardResult | LegacyResult;\n\nexport function methodDecoratorBridge(\n\tstandard: StandardMethodFn<object, Method, unknown>,\n\tlegacy: LegacyMethodFn<unknown, unknown>,\n\tprotoOrTarget: unknown,\n\tnameOrContext: string | ClassMethodDecoratorContext<object, Method>,\n\tdescriptor?: PropertyDescriptor,\n): unknown {\n\tif (typeof nameOrContext === 'object') {\n\t\tif (!isMethod(protoOrTarget)) {\n\t\t\tthrow new TypeError('Standard method decorators require a method target');\n\t\t}\n\n\t\treturn standard(protoOrTarget, nameOrContext);\n\t}\n\n\tif (!descriptor) {\n\t\tthrow new TypeError('Legacy method decorators require a property descriptor');\n\t}\n\n\treturn legacy(protoOrTarget, nameOrContext, descriptor);\n}\n",
7
+ "import type { RadiantElement } from '../core/radiant-element';\n\nexport interface EventEmitterConfig {\n\tname: string;\n\tbubbles?: boolean;\n\tcancelable?: boolean;\n\tcomposed?: boolean;\n}\n\n/**\n * A generic event emitter class that allows emitting custom events.\n *\n * @template T - The type of the event detail.\n */\nexport class EventEmitter<T = unknown> {\n\tprivate host: RadiantElement;\n\tprivate eventConfig: EventEmitterConfig;\n\n\t/**\n\t * Constructs a new instance of the EventEmitter class.\n\t *\n\t * @param host - The host element on which the events will be dispatched.\n\t * @param eventConfig - The configuration for the event.\n\t */\n\tconstructor(host: RadiantElement, eventConfig: EventEmitterConfig) {\n\t\tthis.host = host;\n\t\tthis.eventConfig = eventConfig;\n\t}\n\n\t/**\n\t * Emits a custom event with the specified detail.\n\t *\n\t * @param detail - The detail object to be passed along with the event.\n\t */\n\temit(detail?: T) {\n\t\tconst event = new CustomEvent(this.eventConfig.name, {\n\t\t\tdetail: detail,\n\t\t\tbubbles: this.eventConfig.bubbles,\n\t\t\tcancelable: this.eventConfig.cancelable,\n\t\t\tcomposed: this.eventConfig.composed,\n\t\t});\n\t\tthis.host.dispatchEvent(event);\n\t}\n}\n",
8
+ "import type { RadiantElement } from '../core/radiant-element';\nimport { EventEmitter, type EventEmitterConfig } from '../tools/event-emitter';\n\n/**\n * Creates an EventEmitter bound to a host element and registers it on the host.\n * Functional equivalent of the `@event` decorator for vanilla JS usage.\n * @param host The host element that will dispatch the events.\n * @param config {@link EventEmitterConfig} The event emitter configuration.\n */\nexport function createEvent<T = unknown>(host: RadiantElement, config: EventEmitterConfig): EventEmitter<T> {\n\tconst emitter = new EventEmitter<T>(host, config);\n\thost.registerEventEmitter(config.name, emitter);\n\treturn emitter;\n}\n",
9
+ "import type { RadiantElement } from '../../core/radiant-element';\nimport { createEvent } from '../../helpers/create-event';\nimport type { EventEmitterConfig } from '../../tools/event-emitter';\nimport { registerLegacyInstanceInitializer } from './instance-initializers';\n\n/**\n * Decorator that attaches an EventEmitter to the class field property.\n * The EventEmitter can be used to dispatch custom events from the target element.\n * @param eventConfig Configuration for the event emitter.\n * @see {@link EventEmitter} for more details about how the EventEmitter works.\n */\nexport function event(eventConfig: EventEmitterConfig) {\n\treturn (proto: RadiantElement, propertyKey: string) => {\n\t\tregisterLegacyInstanceInitializer(proto, (element) => {\n\t\t\tconst emitter = createEvent(element, eventConfig);\n\n\t\t\telement.registerConnectedCallback(() => {\n\t\t\t\tObject.defineProperty(element, propertyKey, {\n\t\t\t\t\tget() {\n\t\t\t\t\t\treturn emitter;\n\t\t\t\t\t},\n\t\t\t\t\tenumerable: true,\n\t\t\t\t\tconfigurable: true,\n\t\t\t\t});\n\t\t\t});\n\t\t});\n\t};\n}\n",
10
+ "import type { RadiantElement } from '../../core/radiant-element';\nimport { createEvent } from '../../helpers/create-event';\nimport type { EventEmitterConfig } from '../../tools/event-emitter';\n\n/**\n * Decorator that attaches an EventEmitter to the class field property.\n * The EventEmitter can be used to dispatch custom events from the target element.\n * @param eventConfig Configuration for the event emitter.\n * @see {@link EventEmitter} for more details about how the EventEmitter works.\n */\nexport function event(eventConfig: EventEmitterConfig) {\n\treturn function <T extends RadiantElement, V>(_: undefined, context: ClassFieldDecoratorContext<T, V>) {\n\t\tcontext.addInitializer(function (this: T) {\n\t\t\tconst emitter = createEvent(this, eventConfig);\n\n\t\t\tObject.defineProperty(this, context.name, {\n\t\t\t\tget() {\n\t\t\t\t\treturn emitter;\n\t\t\t\t},\n\t\t\t\tenumerable: true,\n\t\t\t\tconfigurable: true,\n\t\t\t});\n\t\t});\n\t};\n}\n",
11
+ "import { type EventEmitterConfig } from '../tools/event-emitter';\nimport type { RadiantElement } from '../core/radiant-element';\nimport { event as legacyEvent } from './legacy/event';\nimport { event as standardEvent } from './standard/event';\nimport { fieldDecoratorBridge } from './bridge';\n\n/**\n * Decorator that attaches an EventEmitter to the class field property.\n * The EventEmitter can be used to dispatch custom events from the target element.\n * @param eventConfig {@link EventEmitterConfig} Configuration for the event emitter.\n * @see {@link EventEmitter} for more details about how the EventEmitter works.\n */\nexport function event(eventConfig: EventEmitterConfig) {\n\tfunction decorator<THost extends RadiantElement, TValue>(\n\t\tprotoOrTarget: undefined,\n\t\tnameOrContext: ClassFieldDecoratorContext<THost, TValue>,\n\t): void;\n\tfunction decorator(protoOrTarget: RadiantElement, nameOrContext: string): void;\n\tfunction decorator(\n\t\tprotoOrTarget: RadiantElement | undefined,\n\t\tnameOrContext: string | ClassFieldDecoratorContext<RadiantElement, unknown>,\n\t): void {\n\t\treturn fieldDecoratorBridge(standardEvent(eventConfig), legacyEvent(eventConfig), protoOrTarget, nameOrContext);\n\t}\n\n\treturn decorator;\n}\n"
12
+ ],
13
+ "mappings": "2PAEA,IAAM,EAA+B,OAAO,IAAI,gDAAgD,EAC1F,EAAwC,OAAO,IAAI,yDAAyD,EA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Ae,CAAa,EAG/G,OAAO",
14
+ "debugId": "B307D91DFF24EA6264756E2164756E21",
15
+ "names": []
16
+ }
@@ -0,0 +1,2 @@
1
+ import { type AttrOptions, type ReactiveAttributeHostLike } from '../shared/reactive-attr';
2
+ export declare function reactiveAttr<TValue = string | undefined>(options?: AttrOptions<TValue>): (target: ReactiveAttributeHostLike, propertyName: string) => void;
@@ -0,0 +1,3 @@
1
+ var Y=((t)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,n)=>(typeof require<"u"?require:e)[n]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});var P=Symbol.for("@ecopages/radiant.legacy-instance-initializers"),k=Symbol.for("@ecopages/radiant.legacy-post-construction-initializers"),J=Symbol.for("@ecopages/radiant.legacy-executed-post-construction-initializers");function O(t,e){C(t,P,e)}function S(t,e){C(t,k,e)}function _(t){f(t,P)}function p(t){let e=t;f(t,k,e[J]??=new Set)}function C(t,e,n){let r=t,i=Object.prototype.hasOwnProperty.call(r,e)?r[e]:void 0;if(Array.isArray(i)){i.push(n);return}Object.defineProperty(r,e,{value:[n]})}function f(t,e,n,r=Object.getPrototypeOf(t)){if(!r||r===Object.prototype)return;f(t,e,n,Object.getPrototypeOf(r));let i=r[e];if(!Array.isArray(i))return;for(let c of i){if(n?.has(c))continue;c(t),n?.add(c)}}function j(t){switch(t){case Array:return"array";case Boolean:return"boolean";case Number:return"number";case Object:return"object";case String:return"string"}}function W(t){switch(typeof t){case"boolean":return"boolean";case"number":return"number";case"string":return"string"}if(Array.isArray(t))return"array";if(Object.prototype.toString.call(t)==="[object Object]")return"object"}function T(t){switch(t){case Number:return 0;case String:return"";case Boolean:return!1;default:return null}}function K(t){try{return JSON.parse(t)}catch{throw TypeError("Invalid JSON string")}}var U={array(t){let e=K(t);if(!Array.isArray(e))throw TypeError(`Expected an array but got a value of type "${typeof e}"`);return e},boolean(t){return!(t==="0"||String(t).toLowerCase()==="false")},number(t){return Number(t.replace(/_/g,""))},object(t){let e=JSON.parse(t);if(e===null||typeof e!=="object"||Array.isArray(e))throw TypeError(`expected value of type "object" but instead got value "${t}" of type "${W(e)}"`);return e},string(t){return t}},M={default:E,array:$,object:$};function $(t){return JSON.stringify(t)}function E(t){return`${t}`}function u(t,e){let n=j(e);if(!n)throw TypeError(`[radiant-element] Unknown type "${e}"`);return U[n](t)}function v(t,e){let n=j(e);if(!n)throw TypeError(`[radiant-element] Unknown type "${e}"`);return(M[n]??M.default??E)(t)}function l(t){return typeof t==="boolean"}function q(t){return typeof t==="number"}function y(t){return typeof t==="string"}function Q(t){return Array.isArray(t)}function X(t){return typeof t==="object"&&!Array.isArray(t)&&t!==null}function V(t,e){switch(t){case Boolean:return l(e);case Number:return q(e);case String:return y(e);case Array:return Q(e);case Object:return X(e);default:return!1}}var N=(t,e,n,r)=>{if(e===Boolean){let c=t.getAttribute(n);if(c===null)return r;return c===""?!0:u(c,e)}let i=t.getAttribute(n);return i!==null?u(i,e):r??T(e)};function D(t,e){if(e!==void 0&&!V(t,e))throw Error(`defaultValue does not match the expected type for ${t.name}`)}function tt(t,e,n,r){return{type:n,name:t,value:r,initialValue:r,attribute:e,converter:{fromAttribute:(i)=>u(i,n),toAttribute:(i)=>v(i,n)}}}function x(t){if(t instanceof Element)return t;if("host"in t)return t.host;return t.element}function Z(t){return t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/_/g,"-").toLowerCase()}function w(t,e){if(e.converter?.fromAttribute){let n=e.converter.fromAttribute(t);if(t===null&&n===void 0&&"defaultValue"in e)return e.defaultValue;return n}if(e.type){if(t===null)return e.defaultValue??T(e.type);if(e.type===Boolean&&t==="")return!0;return u(t,e.type)}if(t===null)return e.defaultValue;return t}function d(t,e,n){return w(x(t).getAttribute(e),n)}function G(t,e,n,r){let i=r.converter?.toAttribute?r.converter.toAttribute(n):r.type?v(n,r.type):n==null?null:String(n);if(i===null){t.removeAttribute(e);return}t.setAttribute(e,i)}function F(t,e,n={}){if(n.type)D(n.type,n.defaultValue);let r=t,i=n.source??Z(e),c=Symbol(`@ecopages/radiant/attr:${e}:observer`),b=Symbol(`@ecopages/radiant/attr:${e}:last-value`),L=n.bind??t.shouldAutoBindReactiveMembers?.()??!1;t.defineReactiveBinding(e,L),t.registerReactiveDependencyReader(e,()=>d(t,i,n)),r[b]=d(t,i,n),Object.defineProperty(t,e,{get(){return t.trackReactiveRead(e),d(this,i,n)},set(s){let A=x(this),R=d(this,i,n);G(A,i,s,n);let o=d(this,i,n);if(Object.is(R,o))return;this[b]=o,t.notifyUpdate(e,R,o)},enumerable:!0,configurable:!0});let B=()=>{r[c]?.disconnect()},m=()=>{let s=d(t,i,n),A=r[b];if(!Object.is(A,s))r[b]=s,t.notifyUpdate(e,A,s);if(typeof MutationObserver>"u")return;let R=x(t);B();let o=new MutationObserver(()=>{let g=d(t,i,n),H=r[b];if(Object.is(H,g))return;r[b]=g,t.notifyUpdate(e,H,g)});o.observe(R,{attributeFilter:[i],attributes:!0}),r[c]=o};m(),t.registerConnectedCallback(m),t.registerCleanupCallback(B)}function dt(t={}){return(e,n)=>{let r=Symbol(`@ecopages/radiant/attr:${n}:installed`);O(e,(i)=>{i.registerConnectedCallback(()=>{if(i[r])return;let c=i[n],b=t.defaultValue===void 0?c:t.defaultValue;F(i,n,{...t,defaultValue:b}),i[r]=!0})})}}export{dt as reactiveAttr};
2
+
3
+ //# debugId=94E55F30494AF4DE64756E2164756E21
@@ -0,0 +1,14 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/decorators/legacy/instance-initializers.ts", "../src/utils/attribute-utils.ts", "../src/core/reactive-prop-core.ts", "../src/decorators/shared/reactive-attr.ts", "../src/decorators/legacy/attr.ts"],
4
+ "sourcesContent": [
5
+ "type LegacyInstanceInitializer<T extends object = object> = (instance: T) => void;\n\nconst LEGACY_INSTANCE_INITIALIZERS = Symbol.for('@ecopages/radiant.legacy-instance-initializers');\nconst LEGACY_POST_CONSTRUCTION_INITIALIZERS = Symbol.for('@ecopages/radiant.legacy-post-construction-initializers');\nconst LEGACY_EXECUTED_POST_CONSTRUCTION_INITIALIZERS = Symbol.for(\n\t'@ecopages/radiant.legacy-executed-post-construction-initializers',\n);\n\n/**\n * Registers per-instance initialization work for a legacy decorator.\n *\n * Legacy decorators execute against the prototype, so any initialization that\n * needs the concrete element instance must be deferred until construction time.\n */\nexport function registerLegacyInstanceInitializer<T extends object>(\n\tproto: T,\n\tinitializer: LegacyInstanceInitializer<T>,\n): void {\n\tregisterInitializer(proto, LEGACY_INSTANCE_INITIALIZERS, initializer);\n}\n\n/**\n * Registers post-construction work for a legacy decorator.\n *\n * This phase exists for decorators that eagerly write instance fields. With\n * legacy decorators plus `useDefineForClassFields`, subclass field definition\n * can overwrite values written during the base-class constructor.\n */\nexport function registerLegacyPostConstructionInitializer<T extends object>(\n\tproto: T,\n\tinitializer: LegacyInstanceInitializer<T>,\n): void {\n\tregisterInitializer(proto, LEGACY_POST_CONSTRUCTION_INITIALIZERS, initializer);\n}\n\n/**\n * Runs all legacy decorator initializers for a newly constructed element.\n *\n * Initializers are collected from the prototype chain and executed from base to\n * derived class so inherited setup remains stable.\n */\nexport function runLegacyInstanceInitializers<T extends object>(instance: T): void {\n\trunLegacyInitializers(instance, LEGACY_INSTANCE_INITIALIZERS);\n}\n\n/**\n * Runs legacy decorator setup that must happen after subclass field\n * initialization has completed.\n *\n * Each initializer runs at most once per instance even if multiple lifecycle\n * entrypoints call this helper.\n */\nexport function runLegacyPostConstructionInitializers<T extends object>(instance: T): void {\n\tconst target = instance as Record<PropertyKey, unknown>;\n\n\trunLegacyInitializers(\n\t\tinstance,\n\t\tLEGACY_POST_CONSTRUCTION_INITIALIZERS,\n\t\t(target[LEGACY_EXECUTED_POST_CONSTRUCTION_INITIALIZERS] ??= new Set()) as Set<LegacyInstanceInitializer<T>>,\n\t);\n}\n\nfunction registerInitializer<T extends object>(proto: T, key: symbol, initializer: LegacyInstanceInitializer<T>): void {\n\tconst target = proto as Record<PropertyKey, unknown>;\n\tconst ownInitializers = Object.prototype.hasOwnProperty.call(target, key) ? target[key] : undefined;\n\n\tif (Array.isArray(ownInitializers)) {\n\t\townInitializers.push(initializer);\n\t\treturn;\n\t}\n\n\tObject.defineProperty(target, key, {\n\t\tvalue: [initializer],\n\t});\n}\n\nfunction runLegacyInitializers<T extends object>(\n\tinstance: T,\n\tkey: symbol,\n\texecutedInitializers?: Set<LegacyInstanceInitializer<T>>,\n\tprototype: object | null = Object.getPrototypeOf(instance),\n): void {\n\tif (!prototype || prototype === Object.prototype) {\n\t\treturn;\n\t}\n\n\trunLegacyInitializers(instance, key, executedInitializers, Object.getPrototypeOf(prototype));\n\n\tconst initializers = (prototype as Record<PropertyKey, unknown>)[key] as LegacyInstanceInitializer<T>[] | undefined;\n\n\tif (!Array.isArray(initializers)) {\n\t\treturn;\n\t}\n\n\tfor (const initializer of initializers) {\n\t\tif (executedInitializers?.has(initializer)) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tinitializer(instance);\n\t\texecutedInitializers?.add(initializer);\n\t}\n}\n",
6
+ "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",
7
+ "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",
8
+ "import type { ReactiveHostLike } from '../../core/reactive-host';\nimport { type ReactiveBindingOption, validateReactivePropertyDefault } from '../../core/reactive-prop-core';\nimport {\n\tdefaultValueForType,\n\treadAttributeValue,\n\ttype AttributeTypeConstant,\n\twriteAttributeValue,\n} from '../../utils/attribute-utils';\n\nexport type AttrConverter<T> = {\n\tfromAttribute?: (value: string | null) => T;\n\ttoAttribute?: (value: T) => string | null;\n};\n\nexport type AttrOptions<T = string | undefined> = {\n\tsource?: string;\n\ttype?: AttributeTypeConstant;\n\tbind?: ReactiveBindingOption;\n\tdefaultValue?: T;\n\tconverter?: AttrConverter<T>;\n};\n\ntype ReactiveAttributeHostApi<Bindings extends object = {}> = ReactiveHostLike<Bindings> & {\n\tregisterCleanupCallback(callback: () => void): void;\n\tregisterConnectedCallback(callback: () => void): void;\n};\n\nexport type ReactiveAttributeHostLike<Bindings extends object = {}> =\n\t| (ReactiveAttributeHostApi<Bindings> & Element)\n\t| (ReactiveAttributeHostApi<Bindings> & { host: Element })\n\t| (ReactiveAttributeHostApi<Bindings> & { element: Element });\n\nfunction resolveAttributeTarget(host: ReactiveAttributeHostLike): Element {\n\tif (host instanceof Element) {\n\t\treturn host;\n\t}\n\n\tif ('host' in host) {\n\t\treturn host.host;\n\t}\n\n\treturn host.element;\n}\n\nfunction toAttributeName(propertyName: string): string {\n\treturn propertyName\n\t\t.replace(/([a-z0-9])([A-Z])/g, '$1-$2')\n\t\t.replace(/_/g, '-')\n\t\t.toLowerCase();\n}\n\nfunction resolveAttributeValue<T>(rawValue: string | null, options: AttrOptions<T>): T {\n\tif (options.converter?.fromAttribute) {\n\t\tconst convertedValue = options.converter.fromAttribute(rawValue);\n\n\t\tif (rawValue === null && convertedValue === undefined && 'defaultValue' in options) {\n\t\t\treturn options.defaultValue as T;\n\t\t}\n\n\t\treturn convertedValue;\n\t}\n\n\tif (options.type) {\n\t\tif (rawValue === null) {\n\t\t\treturn (options.defaultValue ?? defaultValueForType(options.type)) as T;\n\t\t}\n\n\t\tif (options.type === Boolean && rawValue === '') {\n\t\t\treturn true as T;\n\t\t}\n\n\t\treturn readAttributeValue(rawValue, options.type) as T;\n\t}\n\n\tif (rawValue === null) {\n\t\treturn options.defaultValue as T;\n\t}\n\n\treturn rawValue as T;\n}\n\nfunction readReactiveAttributeValue<T>(\n\thost: ReactiveAttributeHostLike,\n\tattributeName: string,\n\toptions: AttrOptions<T>,\n): T {\n\treturn resolveAttributeValue(resolveAttributeTarget(host).getAttribute(attributeName), options);\n}\n\nfunction writeReactiveAttributeValue<T>(\n\ttarget: Element,\n\tattributeName: string,\n\tvalue: T,\n\toptions: AttrOptions<T>,\n): void {\n\tconst attributeValue = options.converter?.toAttribute\n\t\t? options.converter.toAttribute(value)\n\t\t: options.type\n\t\t\t? writeAttributeValue(value, options.type)\n\t\t\t: value == null\n\t\t\t\t? null\n\t\t\t\t: String(value);\n\n\tif (attributeValue === null) {\n\t\ttarget.removeAttribute(attributeName);\n\t\treturn;\n\t}\n\n\ttarget.setAttribute(attributeName, attributeValue);\n}\n\nexport function installReactiveAttribute<TBindings extends object, TValue>(\n\thost: ReactiveAttributeHostLike<TBindings>,\n\tpropertyName: string,\n\toptions: AttrOptions<TValue> = {},\n): void {\n\tif (options.type) {\n\t\tvalidateReactivePropertyDefault(options.type, options.defaultValue);\n\t}\n\n\tconst hostRecord = host as unknown as Record<PropertyKey, unknown>;\n\tconst attributeName = options.source ?? toAttributeName(propertyName);\n\tconst observerKey = Symbol(`@ecopages/radiant/attr:${propertyName}:observer`);\n\tconst lastValueKey = Symbol(`@ecopages/radiant/attr:${propertyName}:last-value`);\n\tconst bind =\n\t\toptions.bind ??\n\t\t(host as unknown as { shouldAutoBindReactiveMembers?: () => boolean }).shouldAutoBindReactiveMembers?.() ??\n\t\tfalse;\n\n\thost.defineReactiveBinding(propertyName, bind);\n\thost.registerReactiveDependencyReader(propertyName, () => readReactiveAttributeValue(host, attributeName, options));\n\thostRecord[lastValueKey] = readReactiveAttributeValue(host, attributeName, options);\n\n\tObject.defineProperty(host, propertyName, {\n\t\tget() {\n\t\t\thost.trackReactiveRead(propertyName);\n\t\t\treturn readReactiveAttributeValue(this as ReactiveAttributeHostLike, attributeName, options);\n\t\t},\n\t\tset(newValue: TValue) {\n\t\t\tconst target = resolveAttributeTarget(this as ReactiveAttributeHostLike);\n\t\t\tconst oldValue = readReactiveAttributeValue(this as ReactiveAttributeHostLike, attributeName, options);\n\t\t\twriteReactiveAttributeValue(target, attributeName, newValue, options);\n\t\t\tconst nextValue = readReactiveAttributeValue(this as ReactiveAttributeHostLike, attributeName, options);\n\n\t\t\tif (Object.is(oldValue, nextValue)) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t(this as Record<PropertyKey, unknown>)[lastValueKey] = nextValue;\n\t\t\thost.notifyUpdate(propertyName, oldValue, nextValue);\n\t\t},\n\t\tenumerable: true,\n\t\tconfigurable: true,\n\t});\n\n\tconst disconnectObserver = () => {\n\t\tconst observer = hostRecord[observerKey] as MutationObserver | undefined;\n\t\tobserver?.disconnect();\n\t};\n\n\tconst syncAndObserve = () => {\n\t\tconst nextValue = readReactiveAttributeValue(host, attributeName, options);\n\t\tconst previousValue = hostRecord[lastValueKey];\n\n\t\tif (!Object.is(previousValue, nextValue)) {\n\t\t\thostRecord[lastValueKey] = nextValue;\n\t\t\thost.notifyUpdate(propertyName, previousValue, nextValue);\n\t\t}\n\n\t\tif (typeof MutationObserver === 'undefined') {\n\t\t\treturn;\n\t\t}\n\n\t\tconst target = resolveAttributeTarget(host);\n\n\t\tdisconnectObserver();\n\n\t\tconst observer = new MutationObserver(() => {\n\t\t\tconst currentValue = readReactiveAttributeValue(host, attributeName, options);\n\t\t\tconst lastValue = hostRecord[lastValueKey];\n\n\t\t\tif (Object.is(lastValue, currentValue)) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\thostRecord[lastValueKey] = currentValue;\n\t\t\thost.notifyUpdate(propertyName, lastValue, currentValue);\n\t\t});\n\n\t\tobserver.observe(target, {\n\t\t\tattributeFilter: [attributeName],\n\t\t\tattributes: true,\n\t\t});\n\n\t\thostRecord[observerKey] = observer;\n\t};\n\n\tsyncAndObserve();\n\thost.registerConnectedCallback(syncAndObserve);\n\thost.registerCleanupCallback(disconnectObserver);\n}\n",
9
+ "import { installReactiveAttribute, type AttrOptions, type ReactiveAttributeHostLike } from '../shared/reactive-attr';\nimport { registerLegacyInstanceInitializer } from './instance-initializers';\n\nexport function reactiveAttr<TValue = string | undefined>(options: AttrOptions<TValue> = {}) {\n\treturn (target: ReactiveAttributeHostLike, propertyName: string) => {\n\t\tconst installedKey = Symbol(`@ecopages/radiant/attr:${propertyName}:installed`);\n\n\t\tregisterLegacyInstanceInitializer(target, (host) => {\n\t\t\t(host as ReactiveAttributeHostLike).registerConnectedCallback(() => {\n\t\t\t\tif ((host as unknown as Record<PropertyKey, unknown>)[installedKey]) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst initializerValue = (host as unknown as Record<PropertyKey, TValue | undefined>)[propertyName];\n\t\t\t\tconst defaultValue = (options.defaultValue === undefined ? initializerValue : options.defaultValue) as\n\t\t\t\t\t| TValue\n\t\t\t\t\t| undefined;\n\n\t\t\t\tinstallReactiveAttribute(host as ReactiveAttributeHostLike, propertyName, {\n\t\t\t\t\t...options,\n\t\t\t\t\tdefaultValue,\n\t\t\t\t});\n\n\t\t\t\t(host as unknown as Record<PropertyKey, unknown>)[installedKey] = true;\n\t\t\t});\n\t\t});\n\t};\n}\n"
10
+ ],
11
+ "mappings": "2PAEA,IAAM,EAA+B,OAAO,IAAI,gDAAgD,EAC1F,EAAwC,OAAO,IAAI,yDAAyD,EAC5G,EAAiD,OAAO,IAC7D,kEACD,EAQO,SAAS,CAAmD,CAClE,EACA,EACO,CACP,EAAoB,EAAO,EAA8B,CAAW,EAU9D,SAAS,CAA2D,CAC1E,EACA,EACO,CACP,EAAoB,EAAO,EAAuC,CAAW,EASvE,SAAS,CAA+C,CAAC,EAAmB,CAClF,EAAsB,EAAU,CAA4B,EAUtD,SAAS,CAAuD,CAAC,EAAmB,CAC1F,IAAM,EAAS,EAEf,EACC,EACA,EACC,EAAO,KAAoD,IAAI,GACjE,EAGD,SAAS,CAAqC,CAAC,EAAU,EAAa,EAAiD,CACtH,IAAM,EAAS,EACT,EAAkB,OAAO,UAAU,eAAe,KAAK,EAAQ,CAAG,EAAI,EAAO,GAAO,OAE1F,GAAI,MAAM,QAAQ,CAAe,EAAG,CACnC,EAAgB,KAAK,CAA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AClE,EACD",
12
+ "debugId": "94E55F30494AF4DE64756E2164756E21",
13
+ "names": []
14
+ }
@@ -0,0 +1,3 @@
1
+ var x=((f)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(f,{get:(j,q)=>(typeof require<"u"?require:j)[q]}):f)(function(f){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+f+'" is not supported')});function B(f,j,q){let v=q.value;return{configurable:!0,get(){if(this===f.prototype||Object.prototype.hasOwnProperty.call(this,j))return v;let w=v.bind(this);return Object.defineProperty(this,j,{value:w,configurable:!0,writable:!0}),w}}}export{B as bound};
2
+
3
+ //# debugId=002989A9EF405CB664756E2164756E21
@@ -0,0 +1,10 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/decorators/legacy/bound.ts"],
4
+ "sourcesContent": [
5
+ "import type { RadiantElement } from '../../core/radiant-element';\n\n/**\n * A decorator to bind a method to the instance.\n * @param target {@link RadiantElement}\n * @param propertyKey string\n * @param descriptor {@link PropertyDescriptor}\n * @returns\n */\nexport function bound(target: RadiantElement, propertyKey: string, descriptor: PropertyDescriptor): PropertyDescriptor {\n\tconst originalMethod = descriptor.value;\n\n\treturn {\n\t\tconfigurable: true,\n\t\tget() {\n\t\t\tif (this === (target as any).prototype || Object.prototype.hasOwnProperty.call(this, propertyKey)) {\n\t\t\t\treturn originalMethod;\n\t\t\t}\n\n\t\t\tconst boundMethod = originalMethod.bind(this);\n\t\t\tObject.defineProperty(this, propertyKey, {\n\t\t\t\tvalue: boundMethod,\n\t\t\t\tconfigurable: true,\n\t\t\t\twritable: true,\n\t\t\t});\n\t\t\treturn boundMethod;\n\t\t},\n\t};\n}\n"
6
+ ],
7
+ "mappings": "2PASO,SAAS,CAAK,CAAC,EAAwB,EAAqB,EAAoD,CACtH,IAAM,EAAiB,EAAW,MAElC,MAAO,CACN,aAAc,GACd,GAAG,EAAG,CACL,GAAI,OAAU,EAAe,WAAa,OAAO,UAAU,eAAe,KAAK,KAAM,CAAW,EAC/F,OAAO,EAGR,IAAM,EAAc,EAAe,KAAK,IAAI,EAM5C,OALA,OAAO,eAAe,KAAM,EAAa,CACxC,MAAO,EACP,aAAc,GACd,SAAU,EACX,CAAC,EACM,EAET",
8
+ "debugId": "002989A9EF405CB664756E2164756E21",
9
+ "names": []
10
+ }
@@ -0,0 +1,3 @@
1
+ var y=((b)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(b,{get:(j,k)=>(typeof require<"u"?require:j)[k]}):b)(function(b){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+b+'" is not supported')});var q=Symbol.for("@ecopages/radiant.customElementTagName");function x(b,j){b[q]=j}function B(b){return b[q]}function H(b,j){return(k)=>{if(x(k,b),typeof customElements<"u"&&!customElements.get(b))customElements.define(b,k,j)}}export{H as customElement};
2
+
3
+ //# debugId=A99CB015E651C8C064756E2164756E21
@@ -0,0 +1,11 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/core/custom-element-metadata.ts", "../src/decorators/legacy/custom-element.ts"],
4
+ "sourcesContent": [
5
+ "export const CUSTOM_ELEMENT_TAG_NAME = Symbol.for('@ecopages/radiant.customElementTagName');\n\ntype CustomElementConstructorWithMetadata = CustomElementConstructor & {\n\t[CUSTOM_ELEMENT_TAG_NAME]?: string;\n};\n\n/**\n * Sets the custom element tag name for a given constructor.\n * This is used internally to associate a class with its custom element tag, which is necessary for features like hydration and SSR support.\n * @param target The constructor of the custom element.\n * @param tagName The tag name to associate with the custom element.\n */\nexport function setCustomElementTagName(target: CustomElementConstructor, tagName: string): void {\n\t(target as CustomElementConstructorWithMetadata)[CUSTOM_ELEMENT_TAG_NAME] = tagName;\n}\n\n/**\n * Retrieves the custom element tag name associated with a given constructor.\n * @param target The constructor of the custom element.\n * @returns The tag name associated with the custom element, or `undefined` if not set.\n */\nexport function getCustomElementTagName(target: CustomElementConstructor): string | undefined {\n\treturn (target as CustomElementConstructorWithMetadata)[CUSTOM_ELEMENT_TAG_NAME];\n}\n",
6
+ "import { setCustomElementTagName } from '../../core/custom-element-metadata';\n\n/**\n * Registers a web component with the given name on the global `window.customElements` registry.\n * @param name selector name.\n * @param options {@link ElementDefinitionOptions}\n */\nexport function customElement(name: string, options?: ElementDefinitionOptions) {\n\treturn (target: CustomElementConstructor) => {\n\t\tsetCustomElementTagName(target, name);\n\n\t\tif (typeof customElements !== 'undefined' && !customElements.get(name)) {\n\t\t\tcustomElements.define(name, target, options);\n\t\t}\n\t};\n}\n"
7
+ ],
8
+ "mappings": "2PAAO,IAAM,EAA0B,OAAO,IAAI,wCAAwC,EAYnF,SAAS,CAAuB,CAAC,EAAkC,EAAuB,CAC/F,EAAgD,GAA2B,EAQtE,SAAS,CAAuB,CAAC,EAAsD,CAC7F,OAAQ,EAAgD,GCflD,SAAS,CAAa,CAAC,EAAc,EAAoC,CAC/E,MAAO,CAAC,IAAqC,CAG5C,GAFA,EAAwB,EAAQ,CAAI,EAEhC,OAAO,eAAmB,KAAe,CAAC,eAAe,IAAI,CAAI,EACpE,eAAe,OAAO,EAAM,EAAQ,CAAO",
9
+ "debugId": "A99CB015E651C8C064756E2164756E21",
10
+ "names": []
11
+ }
@@ -0,0 +1,3 @@
1
+ var f=((y)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(y,{get:(F,D)=>(typeof require<"u"?require:F)[D]}):y)(function(y){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+y+'" is not supported')});function P(y,F){let D=null,r=null,t,j=()=>{if(D!==null)clearTimeout(D),D=null},K=()=>{if(r===null)return t;let M=r;return r=null,j(),t=M(),t},E=function(...M){r=()=>y.apply(this,M),j(),D=setTimeout(()=>{K()},F)};return E.cancel=()=>{j(),r=null},E.flush=()=>{if(r===null)return t;return K()},E.pending=()=>r!==null,E}function q(y){return(F,D,r)=>{let t=r.value,j=new WeakMap;return r.value=function(...E){let M=j.get(this);if(!M)M=P((..._)=>{return t.apply(this,_)},y),j.set(this,M);M(...E)},r}}export{q as debounce};
2
+
3
+ //# debugId=BB1D62C7B0AC636264756E2164756E21
@@ -0,0 +1,11 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/helpers/debounce.ts", "../src/decorators/legacy/debounce.ts"],
4
+ "sourcesContent": [
5
+ "import type { Method } from '../types';\n\n/**\n * A debounced function with imperative helpers for controlling pending work.\n *\n * @typeParam T The wrapped callback type.\n */\nexport interface DebouncedFunction<T extends Method> {\n\t(...args: Parameters<T>): void;\n\n\t/**\n\t * Cancels the pending callback invocation, if one exists.\n\t */\n\tcancel(): void;\n\n\t/**\n\t * Immediately invokes the latest pending callback invocation.\n\t *\n\t * @returns The callback result when a call is pending, or the last completed\n\t * result when no call is pending.\n\t */\n\tflush(): ReturnType<T> | undefined;\n\n\t/**\n\t * Reports whether the callback currently has a scheduled invocation.\n\t *\n\t * @returns True when a call is pending.\n\t */\n\tpending(): boolean;\n}\n\n/**\n * Creates a debounced wrapper around a function.\n *\n * The returned function delays invocation until the configured timeout has\n * elapsed since the latest call. It also exposes helpers to cancel, flush,\n * and inspect pending work.\n *\n * @typeParam T The wrapped callback type.\n * @param callback The callback to debounce.\n * @param timeout The debounce timeout in milliseconds.\n * @returns A debounced wrapper around the callback.\n */\nexport function debounce<T extends Method>(callback: T, timeout: number): DebouncedFunction<T> {\n\tlet timeoutRef: ReturnType<typeof setTimeout> | null = null;\n\tlet pendingInvocation: (() => ReturnType<T>) | null = null;\n\tlet lastResult: ReturnType<T> | undefined;\n\n\tconst clearPendingCall = () => {\n\t\tif (timeoutRef !== null) {\n\t\t\tclearTimeout(timeoutRef);\n\t\t\ttimeoutRef = null;\n\t\t}\n\t};\n\n\tconst invoke = (): ReturnType<T> | undefined => {\n\t\tif (pendingInvocation === null) {\n\t\t\treturn lastResult;\n\t\t}\n\n\t\tconst invocation = pendingInvocation;\n\t\tpendingInvocation = null;\n\t\tclearPendingCall();\n\t\tlastResult = invocation();\n\n\t\treturn lastResult;\n\t};\n\n\tconst debounced = function (this: ThisParameterType<T>, ...args: Parameters<T>) {\n\t\tpendingInvocation = () => callback.apply(this, args) as ReturnType<T>;\n\t\tclearPendingCall();\n\t\ttimeoutRef = setTimeout(() => {\n\t\t\tinvoke();\n\t\t}, timeout);\n\t} as DebouncedFunction<T>;\n\n\tdebounced.cancel = () => {\n\t\tclearPendingCall();\n\t\tpendingInvocation = null;\n\t};\n\n\tdebounced.flush = () => {\n\t\tif (pendingInvocation === null) {\n\t\t\treturn lastResult;\n\t\t}\n\n\t\treturn invoke();\n\t};\n\n\tdebounced.pending = () => pendingInvocation !== null;\n\n\treturn debounced;\n}\n",
6
+ "import type { RadiantElement } from '../../core/radiant-element';\nimport { debounce as debounceFunction } from '../../helpers/debounce';\n\nexport function debounce(\n\ttimeout: number,\n): (target: any, propertyKey: string, descriptor: PropertyDescriptor) => PropertyDescriptor {\n\treturn (_target: RadiantElement, _propertyKey: string, descriptor: PropertyDescriptor): PropertyDescriptor => {\n\t\tconst originalMethod = descriptor.value;\n\t\tconst debouncedByInstance = new WeakMap<object, ReturnType<typeof debounceFunction<typeof originalMethod>>>();\n\n\t\tdescriptor.value = function debounce(this: object, ...args: Parameters<typeof originalMethod>) {\n\t\t\tlet debounced = debouncedByInstance.get(this);\n\n\t\t\tif (!debounced) {\n\t\t\t\tdebounced = debounceFunction((...innerArgs: Parameters<typeof originalMethod>) => {\n\t\t\t\t\treturn originalMethod.apply(this, innerArgs);\n\t\t\t\t}, timeout);\n\t\t\t\tdebouncedByInstance.set(this, debounced);\n\t\t\t}\n\n\t\t\tdebounced(...args);\n\t\t};\n\n\t\treturn descriptor;\n\t};\n}\n"
7
+ ],
8
+ "mappings": "2PA2CO,SAAS,CAA0B,CAAC,EAAa,EAAuC,CAC9F,IAAI,EAAmD,KACnD,EAAkD,KAClD,EAEE,EAAmB,IAAM,CAC9B,GAAI,IAAe,KAClB,aAAa,CAAU,EACvB,EAAa,MAIT,EAAS,IAAiC,CAC/C,GAAI,IAAsB,KACzB,OAAO,EAGR,IAAM,EAAa,EAKnB,OAJA,EAAoB,KACpB,EAAiB,EACjB,EAAa,EAAW,EAEjB,GAGF,EAAY,QAAS,IAAgC,EAAqB,CAC/E,EAAoB,IAAM,EAAS,MAAM,KAAM,CAAI,EACnD,EAAiB,EACjB,EAAa,WAAW,IAAM,CAC7B,EAAO,GACL,CAAO,GAkBX,OAfA,EAAU,OAAS,IAAM,CACxB,EAAiB,EACjB,EAAoB,MAGrB,EAAU,MAAQ,IAAM,CACvB,GAAI,IAAsB,KACzB,OAAO,EAGR,OAAO,EAAO,GAGf,EAAU,QAAU,IAAM,IAAsB,KAEzC,ECxFD,SAAS,CAAQ,CACvB,EAC2F,CAC3F,MAAO,CAAC,EAAyB,EAAsB,IAAuD,CAC7G,IAAM,EAAiB,EAAW,MAC5B,EAAsB,IAAI,QAehC,OAbA,EAAW,MAAQ,QAAiB,IAAkB,EAAyC,CAC9F,IAAI,EAAY,EAAoB,IAAI,IAAI,EAE5C,GAAI,CAAC,EACJ,EAAY,EAAiB,IAAI,IAAiD,CACjF,OAAO,EAAe,MAAM,KAAM,CAAS,GACzC,CAAO,EACV,EAAoB,IAAI,KAAM,CAAS,EAGxC,EAAU,GAAG,CAAI,GAGX",
9
+ "debugId": "BB1D62C7B0AC636264756E2164756E21",
10
+ "names": []
11
+ }
@@ -0,0 +1,3 @@
1
+ var K=((B)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(B,{get:(D,H)=>(typeof require<"u"?require:D)[H]}):B)(function(B){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+B+'" is not supported')});var $=Symbol.for("@ecopages/radiant.legacy-instance-initializers"),j=Symbol.for("@ecopages/radiant.legacy-post-construction-initializers"),G=Symbol.for("@ecopages/radiant.legacy-executed-post-construction-initializers");function q(B,D){F(B,$,D)}function U(B,D){F(B,j,D)}function Y(B){W(B,$)}function Z(B){let D=B;W(B,j,D[G]??=new Set)}function F(B,D,H){let M=B,Q=Object.prototype.hasOwnProperty.call(M,D)?M[D]:void 0;if(Array.isArray(Q)){Q.push(H);return}Object.defineProperty(M,D,{value:[H]})}function W(B,D,H,M=Object.getPrototypeOf(B)){if(!M||M===Object.prototype)return;W(B,D,H,Object.getPrototypeOf(M));let Q=M[D];if(!Array.isArray(Q))return;for(let V of Q){if(H?.has(V))continue;V(B),H?.add(V)}}class X{host;eventConfig;constructor(B,D){this.host=B,this.eventConfig=D}emit(B){let D=new CustomEvent(this.eventConfig.name,{detail:B,bubbles:this.eventConfig.bubbles,cancelable:this.eventConfig.cancelable,composed:this.eventConfig.composed});this.host.dispatchEvent(D)}}function J(B,D){let H=new X(B,D);return B.registerEventEmitter(D.name,H),H}function O(B){return(D,H)=>{q(D,(M)=>{let Q=J(M,B);M.registerConnectedCallback(()=>{Object.defineProperty(M,H,{get(){return Q},enumerable:!0,configurable:!0})})})}}export{O as event};
2
+
3
+ //# debugId=1AB8EE13696F1F2F64756E2164756E21
@@ -0,0 +1,13 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/decorators/legacy/instance-initializers.ts", "../src/tools/event-emitter.ts", "../src/helpers/create-event.ts", "../src/decorators/legacy/event.ts"],
4
+ "sourcesContent": [
5
+ "type LegacyInstanceInitializer<T extends object = object> = (instance: T) => void;\n\nconst LEGACY_INSTANCE_INITIALIZERS = Symbol.for('@ecopages/radiant.legacy-instance-initializers');\nconst LEGACY_POST_CONSTRUCTION_INITIALIZERS = Symbol.for('@ecopages/radiant.legacy-post-construction-initializers');\nconst LEGACY_EXECUTED_POST_CONSTRUCTION_INITIALIZERS = Symbol.for(\n\t'@ecopages/radiant.legacy-executed-post-construction-initializers',\n);\n\n/**\n * Registers per-instance initialization work for a legacy decorator.\n *\n * Legacy decorators execute against the prototype, so any initialization that\n * needs the concrete element instance must be deferred until construction time.\n */\nexport function registerLegacyInstanceInitializer<T extends object>(\n\tproto: T,\n\tinitializer: LegacyInstanceInitializer<T>,\n): void {\n\tregisterInitializer(proto, LEGACY_INSTANCE_INITIALIZERS, initializer);\n}\n\n/**\n * Registers post-construction work for a legacy decorator.\n *\n * This phase exists for decorators that eagerly write instance fields. With\n * legacy decorators plus `useDefineForClassFields`, subclass field definition\n * can overwrite values written during the base-class constructor.\n */\nexport function registerLegacyPostConstructionInitializer<T extends object>(\n\tproto: T,\n\tinitializer: LegacyInstanceInitializer<T>,\n): void {\n\tregisterInitializer(proto, LEGACY_POST_CONSTRUCTION_INITIALIZERS, initializer);\n}\n\n/**\n * Runs all legacy decorator initializers for a newly constructed element.\n *\n * Initializers are collected from the prototype chain and executed from base to\n * derived class so inherited setup remains stable.\n */\nexport function runLegacyInstanceInitializers<T extends object>(instance: T): void {\n\trunLegacyInitializers(instance, LEGACY_INSTANCE_INITIALIZERS);\n}\n\n/**\n * Runs legacy decorator setup that must happen after subclass field\n * initialization has completed.\n *\n * Each initializer runs at most once per instance even if multiple lifecycle\n * entrypoints call this helper.\n */\nexport function runLegacyPostConstructionInitializers<T extends object>(instance: T): void {\n\tconst target = instance as Record<PropertyKey, unknown>;\n\n\trunLegacyInitializers(\n\t\tinstance,\n\t\tLEGACY_POST_CONSTRUCTION_INITIALIZERS,\n\t\t(target[LEGACY_EXECUTED_POST_CONSTRUCTION_INITIALIZERS] ??= new Set()) as Set<LegacyInstanceInitializer<T>>,\n\t);\n}\n\nfunction registerInitializer<T extends object>(proto: T, key: symbol, initializer: LegacyInstanceInitializer<T>): void {\n\tconst target = proto as Record<PropertyKey, unknown>;\n\tconst ownInitializers = Object.prototype.hasOwnProperty.call(target, key) ? target[key] : undefined;\n\n\tif (Array.isArray(ownInitializers)) {\n\t\townInitializers.push(initializer);\n\t\treturn;\n\t}\n\n\tObject.defineProperty(target, key, {\n\t\tvalue: [initializer],\n\t});\n}\n\nfunction runLegacyInitializers<T extends object>(\n\tinstance: T,\n\tkey: symbol,\n\texecutedInitializers?: Set<LegacyInstanceInitializer<T>>,\n\tprototype: object | null = Object.getPrototypeOf(instance),\n): void {\n\tif (!prototype || prototype === Object.prototype) {\n\t\treturn;\n\t}\n\n\trunLegacyInitializers(instance, key, executedInitializers, Object.getPrototypeOf(prototype));\n\n\tconst initializers = (prototype as Record<PropertyKey, unknown>)[key] as LegacyInstanceInitializer<T>[] | undefined;\n\n\tif (!Array.isArray(initializers)) {\n\t\treturn;\n\t}\n\n\tfor (const initializer of initializers) {\n\t\tif (executedInitializers?.has(initializer)) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tinitializer(instance);\n\t\texecutedInitializers?.add(initializer);\n\t}\n}\n",
6
+ "import type { RadiantElement } from '../core/radiant-element';\n\nexport interface EventEmitterConfig {\n\tname: string;\n\tbubbles?: boolean;\n\tcancelable?: boolean;\n\tcomposed?: boolean;\n}\n\n/**\n * A generic event emitter class that allows emitting custom events.\n *\n * @template T - The type of the event detail.\n */\nexport class EventEmitter<T = unknown> {\n\tprivate host: RadiantElement;\n\tprivate eventConfig: EventEmitterConfig;\n\n\t/**\n\t * Constructs a new instance of the EventEmitter class.\n\t *\n\t * @param host - The host element on which the events will be dispatched.\n\t * @param eventConfig - The configuration for the event.\n\t */\n\tconstructor(host: RadiantElement, eventConfig: EventEmitterConfig) {\n\t\tthis.host = host;\n\t\tthis.eventConfig = eventConfig;\n\t}\n\n\t/**\n\t * Emits a custom event with the specified detail.\n\t *\n\t * @param detail - The detail object to be passed along with the event.\n\t */\n\temit(detail?: T) {\n\t\tconst event = new CustomEvent(this.eventConfig.name, {\n\t\t\tdetail: detail,\n\t\t\tbubbles: this.eventConfig.bubbles,\n\t\t\tcancelable: this.eventConfig.cancelable,\n\t\t\tcomposed: this.eventConfig.composed,\n\t\t});\n\t\tthis.host.dispatchEvent(event);\n\t}\n}\n",
7
+ "import type { RadiantElement } from '../core/radiant-element';\nimport { EventEmitter, type EventEmitterConfig } from '../tools/event-emitter';\n\n/**\n * Creates an EventEmitter bound to a host element and registers it on the host.\n * Functional equivalent of the `@event` decorator for vanilla JS usage.\n * @param host The host element that will dispatch the events.\n * @param config {@link EventEmitterConfig} The event emitter configuration.\n */\nexport function createEvent<T = unknown>(host: RadiantElement, config: EventEmitterConfig): EventEmitter<T> {\n\tconst emitter = new EventEmitter<T>(host, config);\n\thost.registerEventEmitter(config.name, emitter);\n\treturn emitter;\n}\n",
8
+ "import type { RadiantElement } from '../../core/radiant-element';\nimport { createEvent } from '../../helpers/create-event';\nimport type { EventEmitterConfig } from '../../tools/event-emitter';\nimport { registerLegacyInstanceInitializer } from './instance-initializers';\n\n/**\n * Decorator that attaches an EventEmitter to the class field property.\n * The EventEmitter can be used to dispatch custom events from the target element.\n * @param eventConfig Configuration for the event emitter.\n * @see {@link EventEmitter} for more details about how the EventEmitter works.\n */\nexport function event(eventConfig: EventEmitterConfig) {\n\treturn (proto: RadiantElement, propertyKey: string) => {\n\t\tregisterLegacyInstanceInitializer(proto, (element) => {\n\t\t\tconst emitter = createEvent(element, eventConfig);\n\n\t\t\telement.registerConnectedCallback(() => {\n\t\t\t\tObject.defineProperty(element, propertyKey, {\n\t\t\t\t\tget() {\n\t\t\t\t\t\treturn emitter;\n\t\t\t\t\t},\n\t\t\t\t\tenumerable: true,\n\t\t\t\t\tconfigurable: true,\n\t\t\t\t});\n\t\t\t});\n\t\t});\n\t};\n}\n"
9
+ ],
10
+ "mappings": "2PAEA,IAAM,EAA+B,OAAO,IAAI,gDAAgD,EAC1F,EAAwC,OAAO,IAAI,yDAAyD,EAC5G,EAAiD,OAAO,IAC7D,kEACD,EAQO,SAAS,CAAmD,CAClE,EACA,EACO,CACP,EAAoB,EAAO,EAA8B,CAAW,EAU9D,SAAS,CAA2D,CAC1E,EACA,EACO,CACP,EAAoB,EAAO,EAAuC,CAAW,EASvE,SAAS,CAA+C,CAAC,EAAmB,CAClF,EAAsB,EAAU,CAA4B,EAUtD,SAAS,CAAuD,CAAC,EAAmB,CAC1F,IAAM,EAAS,EAEf,EACC,EACA,EACC,EAAO,KAAoD,IAAI,GACjE,EAGD,SAAS,CAAqC,CAAC,EAAU,EAAa,EAAiD,CACtH,IAAM,EAAS,EACT,EAAkB,OAAO,UAAU,e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ACD,EACD",
11
+ "debugId": "1AB8EE13696F1F2F64756E2164756E21",
12
+ "names": []
13
+ }
@@ -0,0 +1,32 @@
1
+ type LegacyInstanceInitializer<T extends object = object> = (instance: T) => void;
2
+ /**
3
+ * Registers per-instance initialization work for a legacy decorator.
4
+ *
5
+ * Legacy decorators execute against the prototype, so any initialization that
6
+ * needs the concrete element instance must be deferred until construction time.
7
+ */
8
+ export declare function registerLegacyInstanceInitializer<T extends object>(proto: T, initializer: LegacyInstanceInitializer<T>): void;
9
+ /**
10
+ * Registers post-construction work for a legacy decorator.
11
+ *
12
+ * This phase exists for decorators that eagerly write instance fields. With
13
+ * legacy decorators plus `useDefineForClassFields`, subclass field definition
14
+ * can overwrite values written during the base-class constructor.
15
+ */
16
+ export declare function registerLegacyPostConstructionInitializer<T extends object>(proto: T, initializer: LegacyInstanceInitializer<T>): void;
17
+ /**
18
+ * Runs all legacy decorator initializers for a newly constructed element.
19
+ *
20
+ * Initializers are collected from the prototype chain and executed from base to
21
+ * derived class so inherited setup remains stable.
22
+ */
23
+ export declare function runLegacyInstanceInitializers<T extends object>(instance: T): void;
24
+ /**
25
+ * Runs legacy decorator setup that must happen after subclass field
26
+ * initialization has completed.
27
+ *
28
+ * Each initializer runs at most once per instance even if multiple lifecycle
29
+ * entrypoints call this helper.
30
+ */
31
+ export declare function runLegacyPostConstructionInitializers<T extends object>(instance: T): void;
32
+ export {};
@@ -0,0 +1,3 @@
1
+ var J=((b)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(b,{get:(f,h)=>(typeof require<"u"?require:f)[h]}):b)(function(b){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+b+'" is not supported')});var B=Symbol.for("@ecopages/radiant.legacy-instance-initializers"),D=Symbol.for("@ecopages/radiant.legacy-post-construction-initializers"),H=Symbol.for("@ecopages/radiant.legacy-executed-post-construction-initializers");function M(b,f){F(b,B,f)}function Q(b,f){F(b,D,f)}function V(b){v(b,B)}function W(b){let f=b;v(b,D,f[H]??=new Set)}function F(b,f,h){let j=b,m=Object.prototype.hasOwnProperty.call(j,f)?j[f]:void 0;if(Array.isArray(m)){m.push(h);return}Object.defineProperty(j,f,{value:[h]})}function v(b,f,h,j=Object.getPrototypeOf(b)){if(!j||j===Object.prototype)return;v(b,f,h,Object.getPrototypeOf(j));let m=j[f];if(!Array.isArray(m))return;for(let q of m){if(h?.has(q))continue;q(b),h?.add(q)}}export{W as runLegacyPostConstructionInitializers,V as runLegacyInstanceInitializers,Q as registerLegacyPostConstructionInitializer,M as registerLegacyInstanceInitializer};
2
+
3
+ //# debugId=31B43FCC2270E87364756E2164756E21
@@ -0,0 +1,10 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/decorators/legacy/instance-initializers.ts"],
4
+ "sourcesContent": [
5
+ "type LegacyInstanceInitializer<T extends object = object> = (instance: T) => void;\n\nconst LEGACY_INSTANCE_INITIALIZERS = Symbol.for('@ecopages/radiant.legacy-instance-initializers');\nconst LEGACY_POST_CONSTRUCTION_INITIALIZERS = Symbol.for('@ecopages/radiant.legacy-post-construction-initializers');\nconst LEGACY_EXECUTED_POST_CONSTRUCTION_INITIALIZERS = Symbol.for(\n\t'@ecopages/radiant.legacy-executed-post-construction-initializers',\n);\n\n/**\n * Registers per-instance initialization work for a legacy decorator.\n *\n * Legacy decorators execute against the prototype, so any initialization that\n * needs the concrete element instance must be deferred until construction time.\n */\nexport function registerLegacyInstanceInitializer<T extends object>(\n\tproto: T,\n\tinitializer: LegacyInstanceInitializer<T>,\n): void {\n\tregisterInitializer(proto, LEGACY_INSTANCE_INITIALIZERS, initializer);\n}\n\n/**\n * Registers post-construction work for a legacy decorator.\n *\n * This phase exists for decorators that eagerly write instance fields. With\n * legacy decorators plus `useDefineForClassFields`, subclass field definition\n * can overwrite values written during the base-class constructor.\n */\nexport function registerLegacyPostConstructionInitializer<T extends object>(\n\tproto: T,\n\tinitializer: LegacyInstanceInitializer<T>,\n): void {\n\tregisterInitializer(proto, LEGACY_POST_CONSTRUCTION_INITIALIZERS, initializer);\n}\n\n/**\n * Runs all legacy decorator initializers for a newly constructed element.\n *\n * Initializers are collected from the prototype chain and executed from base to\n * derived class so inherited setup remains stable.\n */\nexport function runLegacyInstanceInitializers<T extends object>(instance: T): void {\n\trunLegacyInitializers(instance, LEGACY_INSTANCE_INITIALIZERS);\n}\n\n/**\n * Runs legacy decorator setup that must happen after subclass field\n * initialization has completed.\n *\n * Each initializer runs at most once per instance even if multiple lifecycle\n * entrypoints call this helper.\n */\nexport function runLegacyPostConstructionInitializers<T extends object>(instance: T): void {\n\tconst target = instance as Record<PropertyKey, unknown>;\n\n\trunLegacyInitializers(\n\t\tinstance,\n\t\tLEGACY_POST_CONSTRUCTION_INITIALIZERS,\n\t\t(target[LEGACY_EXECUTED_POST_CONSTRUCTION_INITIALIZERS] ??= new Set()) as Set<LegacyInstanceInitializer<T>>,\n\t);\n}\n\nfunction registerInitializer<T extends object>(proto: T, key: symbol, initializer: LegacyInstanceInitializer<T>): void {\n\tconst target = proto as Record<PropertyKey, unknown>;\n\tconst ownInitializers = Object.prototype.hasOwnProperty.call(target, key) ? target[key] : undefined;\n\n\tif (Array.isArray(ownInitializers)) {\n\t\townInitializers.push(initializer);\n\t\treturn;\n\t}\n\n\tObject.defineProperty(target, key, {\n\t\tvalue: [initializer],\n\t});\n}\n\nfunction runLegacyInitializers<T extends object>(\n\tinstance: T,\n\tkey: symbol,\n\texecutedInitializers?: Set<LegacyInstanceInitializer<T>>,\n\tprototype: object | null = Object.getPrototypeOf(instance),\n): void {\n\tif (!prototype || prototype === Object.prototype) {\n\t\treturn;\n\t}\n\n\trunLegacyInitializers(instance, key, executedInitializers, Object.getPrototypeOf(prototype));\n\n\tconst initializers = (prototype as Record<PropertyKey, unknown>)[key] as LegacyInstanceInitializer<T>[] | undefined;\n\n\tif (!Array.isArray(initializers)) {\n\t\treturn;\n\t}\n\n\tfor (const initializer of initializers) {\n\t\tif (executedInitializers?.has(initializer)) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tinitializer(instance);\n\t\texecutedInitializers?.add(initializer);\n\t}\n}\n"
6
+ ],
7
+ "mappings": "2PAEA,IAAM,EAA+B,OAAO,IAAI,gDAAgD,EAC1F,EAAwC,OAAO,IAAI,yDAAyD,EAC5G,EAAiD,OAAO,IAC7D,kEACD,EAQO,SAAS,CAAmD,CAClE,EACA,EACO,CACP,EAAoB,EAAO,EAA8B,CAAW,EAU9D,SAAS,CAA2D,CAC1E,EACA,EACO,CACP,EAAoB,EAAO,EAAuC,CAAW,EASvE,SAAS,CAA+C,CAAC,EAAmB,CAClF,EAAsB,EAAU,CAA4B,EAUtD,SAAS,CAAuD,CAAC,EAAmB,CAC1F,IAAM,EAAS,EAEf,EACC,EACA,EACC,EAAO,KAAoD,IAAI,GACjE,EAGD,SAAS,CAAqC,CAAC,EAAU,EAAa,EAAiD,CACtH,IAAM,EAAS,EACT,EAAkB,OAAO,UAAU,eAAe,KAAK,EAAQ,CAAG,EAAI,EAAO,GAAO,OAE1F,GAAI,MAAM,QAAQ,CAAe,EAAG,CACnC,EAAgB,KAAK,CAAW,EAChC,OAGD,OAAO,eAAe,EAAQ,EAAK,CAClC,MAAO,CAAC,CAAW,CACpB,CAAC,EAGF,SAAS,CAAuC,CAC/C,EACA,EACA,EACA,EAA2B,OAAO,eAAe,CAAQ,EAClD,CACP,GAAI,CAAC,GAAa,IAAc,OAAO,UACtC,OAGD,EAAsB,EAAU,EAAK,EAAsB,OAAO,eAAe,CAAS,CAAC,EAE3F,IAAM,EAAgB,EAA2C,GAEjE,GAAI,CAAC,MAAM,QAAQ,CAAY,EAC9B,OAGD,QAAW,KAAe,EAAc,CACvC,GAAI,GAAsB,IAAI,CAAW,EACxC,SAGD,EAAY,CAAQ,EACpB,GAAsB,IAAI,CAAW",
8
+ "debugId": "31B43FCC2270E87364756E2164756E21",
9
+ "names": []
10
+ }
@@ -1,4 +1,4 @@
1
- import type { RadiantElement } from '../../core/radiant-element';
1
+ import { type EventListenerHost } from '../../helpers/create-event-listener';
2
2
  import type { OnEventConfig } from '../on-event';
3
3
  /**
4
4
  * A decorator to subscribe to an event on the target element.
@@ -14,4 +14,4 @@ import type { OnEventConfig } from '../on-event';
14
14
  * @param eventConfig.type The type of the event to listen for.
15
15
  * @param eventConfig.options Optional. An options object that specifies characteristics about the event listener.
16
16
  */
17
- export declare function onEvent(eventConfig: OnEventConfig): (proto: RadiantElement, _: string, descriptor: PropertyDescriptor) => PropertyDescriptor;
17
+ export declare function onEvent(eventConfig: OnEventConfig): (proto: EventListenerHost, _: string, descriptor: PropertyDescriptor) => PropertyDescriptor;
@@ -0,0 +1,3 @@
1
+ var H=(($)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy($,{get:(x,W)=>(typeof require<"u"?require:x)[W]}):$)(function($){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+$+'" is not supported')});var U=Symbol.for("@ecopages/radiant.legacy-instance-initializers"),Y=Symbol.for("@ecopages/radiant.legacy-post-construction-initializers"),R=Symbol.for("@ecopages/radiant.legacy-executed-post-construction-initializers");function Z($,x){N($,U,x)}function m($,x){N($,Y,x)}function v($){J($,U)}function L($){let x=$;J($,Y,x[R]??=new Set)}function N($,x,W){let j=$,B=Object.prototype.hasOwnProperty.call(j,x)?j[x]:void 0;if(Array.isArray(B)){B.push(W);return}Object.defineProperty(j,x,{value:[W]})}function J($,x,W,j=Object.getPrototypeOf($)){if(!j||j===Object.prototype)return;J($,x,W,Object.getPrototypeOf(j));let B=j[x];if(!Array.isArray(B))return;for(let F of B){if(W?.has(F))continue;F($),W?.add(F)}}function _($){let x=globalThis.CSS;if(typeof x?.escape==="function")return x.escape($);let W="";for(let j=0;j<$.length;j+=1){let B=$[j]??"",F=B.codePointAt(0)??0;if(F===0){W+="�";continue}let D=F>=1&&F<=31||F===127,P=j===0&&F>=48&&F<=57,Q=j===1&&F>=48&&F<=57&&($[0]??"")==="-",V=j===0&&B==="-"&&$.length===1;if(D||P||Q){W+=`\\${F.toString(16)} `;continue}if(F>=128||B==="-"||B==="_"||F>=48&&F<=57||F>=65&&F<=90||F>=97&&F<=122){W+=V?`\\${B}`:B;continue}W+=`\\${B}`}return W}var X=Symbol("radiant.shadowRootListenerHooks"),K=Symbol("radiant.patchedAttachShadow");function S($){if($ instanceof Element)return $;if("host"in $)return $.host;return $.element}function A($){return!($ instanceof Element)}function O($,x,W,j){let B=(F)=>{if(F.target instanceof Element&&F.target.matches(W))j(F)};return $.addEventListener(x.type,B,x.options),()=>{$.removeEventListener(x.type,B,x.options)}}function E($,x){let W=S($);if(!W[X])W[X]=new Set;if(W[X].add(x),W[K])return;let j=W.attachShadow;W.attachShadow=function(F){let D=j.call(this,F);for(let P of W[X]??[])P();return D},W[K]=!0}function T($,x,W){if(A($)&&"scope"in x&&x.scope&&x.scope!=="light")throw Error("RadiantController event listeners only support light DOM scope.");let j=S($),B=W.bind($),F=null,D=null,P=null,Q=null,V=!1,G=()=>{F?.(),D?.(),P?.(),Q?.(),F=null,D=null,P=null,Q=null},q=()=>{if(V)return;if("window"in x&&!F)window.addEventListener(x.type,B,x.options),F=()=>{window.removeEventListener(x.type,B,x.options)};if("document"in x&&!D)document.addEventListener(x.type,B,x.options),D=()=>{document.removeEventListener(x.type,B,x.options)};if("selector"in x||"ref"in x){let M="selector"in x?x.selector:`[data-ref='${_(x.ref)}']`;if(x.scope!=="shadow"&&!P)P=O(j,x,M,B);if(x.scope!=="light"&&j.shadowRoot&&!Q)Q=O(j.shadowRoot,x,M,B)}};if("selector"in x||"ref"in x){if(x.scope!=="light")E($,()=>{if($.isConnected)q()})}if($.registerConnectedCallback(q),$.registerCleanupCallback(G),$.isConnected)q();return()=>{V=!0,G()}}function w($){return(x,W,j)=>{let B=j.value;return Z(x,(F)=>{T(F,$,B.bind(F))}),j}}export{w as onEvent};
2
+
3
+ //# debugId=23FB8CBE1C12C11964756E2164756E21
@@ -0,0 +1,13 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/decorators/legacy/instance-initializers.ts", "../src/tools/escape-css-identifier.ts", "../src/helpers/create-event-listener.ts", "../src/decorators/legacy/on-event.ts"],
4
+ "sourcesContent": [
5
+ "type LegacyInstanceInitializer<T extends object = object> = (instance: T) => void;\n\nconst LEGACY_INSTANCE_INITIALIZERS = Symbol.for('@ecopages/radiant.legacy-instance-initializers');\nconst LEGACY_POST_CONSTRUCTION_INITIALIZERS = Symbol.for('@ecopages/radiant.legacy-post-construction-initializers');\nconst LEGACY_EXECUTED_POST_CONSTRUCTION_INITIALIZERS = Symbol.for(\n\t'@ecopages/radiant.legacy-executed-post-construction-initializers',\n);\n\n/**\n * Registers per-instance initialization work for a legacy decorator.\n *\n * Legacy decorators execute against the prototype, so any initialization that\n * needs the concrete element instance must be deferred until construction time.\n */\nexport function registerLegacyInstanceInitializer<T extends object>(\n\tproto: T,\n\tinitializer: LegacyInstanceInitializer<T>,\n): void {\n\tregisterInitializer(proto, LEGACY_INSTANCE_INITIALIZERS, initializer);\n}\n\n/**\n * Registers post-construction work for a legacy decorator.\n *\n * This phase exists for decorators that eagerly write instance fields. With\n * legacy decorators plus `useDefineForClassFields`, subclass field definition\n * can overwrite values written during the base-class constructor.\n */\nexport function registerLegacyPostConstructionInitializer<T extends object>(\n\tproto: T,\n\tinitializer: LegacyInstanceInitializer<T>,\n): void {\n\tregisterInitializer(proto, LEGACY_POST_CONSTRUCTION_INITIALIZERS, initializer);\n}\n\n/**\n * Runs all legacy decorator initializers for a newly constructed element.\n *\n * Initializers are collected from the prototype chain and executed from base to\n * derived class so inherited setup remains stable.\n */\nexport function runLegacyInstanceInitializers<T extends object>(instance: T): void {\n\trunLegacyInitializers(instance, LEGACY_INSTANCE_INITIALIZERS);\n}\n\n/**\n * Runs legacy decorator setup that must happen after subclass field\n * initialization has completed.\n *\n * Each initializer runs at most once per instance even if multiple lifecycle\n * entrypoints call this helper.\n */\nexport function runLegacyPostConstructionInitializers<T extends object>(instance: T): void {\n\tconst target = instance as Record<PropertyKey, unknown>;\n\n\trunLegacyInitializers(\n\t\tinstance,\n\t\tLEGACY_POST_CONSTRUCTION_INITIALIZERS,\n\t\t(target[LEGACY_EXECUTED_POST_CONSTRUCTION_INITIALIZERS] ??= new Set()) as Set<LegacyInstanceInitializer<T>>,\n\t);\n}\n\nfunction registerInitializer<T extends object>(proto: T, key: symbol, initializer: LegacyInstanceInitializer<T>): void {\n\tconst target = proto as Record<PropertyKey, unknown>;\n\tconst ownInitializers = Object.prototype.hasOwnProperty.call(target, key) ? target[key] : undefined;\n\n\tif (Array.isArray(ownInitializers)) {\n\t\townInitializers.push(initializer);\n\t\treturn;\n\t}\n\n\tObject.defineProperty(target, key, {\n\t\tvalue: [initializer],\n\t});\n}\n\nfunction runLegacyInitializers<T extends object>(\n\tinstance: T,\n\tkey: symbol,\n\texecutedInitializers?: Set<LegacyInstanceInitializer<T>>,\n\tprototype: object | null = Object.getPrototypeOf(instance),\n): void {\n\tif (!prototype || prototype === Object.prototype) {\n\t\treturn;\n\t}\n\n\trunLegacyInitializers(instance, key, executedInitializers, Object.getPrototypeOf(prototype));\n\n\tconst initializers = (prototype as Record<PropertyKey, unknown>)[key] as LegacyInstanceInitializer<T>[] | undefined;\n\n\tif (!Array.isArray(initializers)) {\n\t\treturn;\n\t}\n\n\tfor (const initializer of initializers) {\n\t\tif (executedInitializers?.has(initializer)) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tinitializer(instance);\n\t\texecutedInitializers?.add(initializer);\n\t}\n}\n",
6
+ "export function escapeCssIdentifier(value: string): string {\n\tconst cssNamespace = globalThis.CSS as { escape?: (value: string) => string } | undefined;\n\n\tif (typeof cssNamespace?.escape === 'function') {\n\t\treturn cssNamespace.escape(value);\n\t}\n\n\tlet escaped = '';\n\n\tfor (let index = 0; index < value.length; index += 1) {\n\t\tconst character = value[index] ?? '';\n\t\tconst codePoint = character.codePointAt(0) ?? 0;\n\n\t\tif (codePoint === 0) {\n\t\t\tescaped += '\\uFFFD';\n\t\t\tcontinue;\n\t\t}\n\n\t\tconst isControlCharacter = (codePoint >= 0x0001 && codePoint <= 0x001f) || codePoint === 0x007f;\n\t\tconst startsWithDigit = index === 0 && codePoint >= 0x0030 && codePoint <= 0x0039;\n\t\tconst startsWithHyphenDigit =\n\t\t\tindex === 1 && codePoint >= 0x0030 && codePoint <= 0x0039 && (value[0] ?? '') === '-';\n\t\tconst isSingleHyphen = index === 0 && character === '-' && value.length === 1;\n\n\t\tif (isControlCharacter || startsWithDigit || startsWithHyphenDigit) {\n\t\t\tescaped += `\\\\${codePoint.toString(16)} `;\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (\n\t\t\tcodePoint >= 0x0080 ||\n\t\t\tcharacter === '-' ||\n\t\t\tcharacter === '_' ||\n\t\t\t(codePoint >= 0x0030 && codePoint <= 0x0039) ||\n\t\t\t(codePoint >= 0x0041 && codePoint <= 0x005a) ||\n\t\t\t(codePoint >= 0x0061 && codePoint <= 0x007a)\n\t\t) {\n\t\t\tescaped += isSingleHyphen ? `\\\\${character}` : character;\n\t\t\tcontinue;\n\t\t}\n\n\t\tescaped += `\\\\${character}`;\n\t}\n\n\treturn escaped;\n}\n",
7
+ "import type { RadiantElementEventListener } from '../core/radiant-element';\nimport { escapeCssIdentifier } from '../tools/escape-css-identifier';\n\n/**\n * Selects which DOM tree delegated event listeners should observe.\n */\nexport type OnEventScope = 'light' | 'shadow' | 'both';\n\ntype BaseOnEventConfig = Pick<RadiantElementEventListener, 'type' | 'options'> & {\n\tscope?: OnEventScope;\n};\n\nexport type OnEventConfig = BaseOnEventConfig &\n\t(\n\t\t| {\n\t\t\t\tselector: string;\n\t\t }\n\t\t| {\n\t\t\t\tref: string;\n\t\t }\n\t\t| {\n\t\t\t\twindow: true;\n\t\t }\n\t\t| {\n\t\t\t\tdocument: true;\n\t\t }\n\t);\n\ntype DelegatedEventRoot = Element | ShadowRoot;\n\ntype EventListenerLifecycleHost = {\n\tregisterConnectedCallback(callback: () => void): void;\n\tregisterCleanupCallback(callback: () => void): void;\n\tisConnected: boolean;\n};\n\nexport type EventListenerHost =\n\t| (EventListenerLifecycleHost & Element)\n\t| (EventListenerLifecycleHost & { host: Element })\n\t| (EventListenerLifecycleHost & { element: Element });\n\nconst shadowRootListenerHooksKey = Symbol('radiant.shadowRootListenerHooks');\nconst patchedAttachShadowKey = Symbol('radiant.patchedAttachShadow');\n\ntype ShadowRootHookHost = Element & {\n\t[patchedAttachShadowKey]?: true;\n\t[shadowRootListenerHooksKey]?: Set<() => void>;\n};\n\nfunction resolveEventListenerHostElement(host: EventListenerHost): Element {\n\tif (host instanceof Element) {\n\t\treturn host;\n\t}\n\n\tif ('host' in host) {\n\t\treturn host.host;\n\t}\n\n\treturn host.element;\n}\n\nfunction isControllerEventHost(host: EventListenerHost): host is EventListenerLifecycleHost & { host: Element } {\n\treturn !(host instanceof Element);\n}\n\nfunction addDelegatedListener(\n\troot: DelegatedEventRoot,\n\tconfig: Pick<OnEventConfig, 'type' | 'options'>,\n\tselector: string,\n\tlistener: EventListener,\n): () => void {\n\tconst delegatedListener = (event: Event) => {\n\t\tif (event.target instanceof Element && event.target.matches(selector)) {\n\t\t\tlistener(event);\n\t\t}\n\t};\n\n\troot.addEventListener(config.type, delegatedListener, config.options);\n\n\treturn () => {\n\t\troot.removeEventListener(config.type, delegatedListener, config.options);\n\t};\n}\n\nfunction registerShadowRootHook(host: EventListenerHost, hook: () => void): void {\n\tconst shadowAwareHost = resolveEventListenerHostElement(host) as ShadowRootHookHost;\n\n\tif (!shadowAwareHost[shadowRootListenerHooksKey]) {\n\t\tshadowAwareHost[shadowRootListenerHooksKey] = new Set();\n\t}\n\n\tshadowAwareHost[shadowRootListenerHooksKey].add(hook);\n\n\tif (shadowAwareHost[patchedAttachShadowKey]) {\n\t\treturn;\n\t}\n\n\tconst originalAttachShadow = shadowAwareHost.attachShadow;\n\n\tshadowAwareHost.attachShadow = function patchedAttachShadow(init: ShadowRootInit): ShadowRoot {\n\t\tconst shadowRoot = originalAttachShadow.call(this, init);\n\t\tfor (const shadowRootHook of shadowAwareHost[shadowRootListenerHooksKey] ?? []) {\n\t\t\tshadowRootHook();\n\t\t}\n\t\treturn shadowRoot;\n\t};\n\n\tshadowAwareHost[patchedAttachShadowKey] = true;\n}\n\n/**\n * Subscribes to a DOM event with delegation, window, or document targeting.\n * Functional equivalent of the `@onEvent` decorator for vanilla JS usage.\n * Returns a cleanup function to remove the listener.\n * @param host The host RadiantElement.\n * @param config The event listener configuration.\n * @param callback The event handler function.\n */\nexport function createEventListener(\n\thost: EventListenerHost,\n\tconfig: OnEventConfig,\n\tcallback: (event: Event) => void,\n): () => void {\n\tif (isControllerEventHost(host) && 'scope' in config && config.scope && config.scope !== 'light') {\n\t\tthrow new Error('RadiantController event listeners only support light DOM scope.');\n\t}\n\n\tconst hostElement = resolveEventListenerHostElement(host);\n\tconst boundCallback = callback.bind(host);\n\tlet windowCleanup: (() => void) | null = null;\n\tlet documentCleanup: (() => void) | null = null;\n\tlet lightCleanup: (() => void) | null = null;\n\tlet shadowCleanup: (() => void) | null = null;\n\tlet disposed = false;\n\n\tconst detachListeners = () => {\n\t\twindowCleanup?.();\n\t\tdocumentCleanup?.();\n\t\tlightCleanup?.();\n\t\tshadowCleanup?.();\n\n\t\twindowCleanup = null;\n\t\tdocumentCleanup = null;\n\t\tlightCleanup = null;\n\t\tshadowCleanup = null;\n\t};\n\n\tconst attachListeners = () => {\n\t\tif (disposed) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ('window' in config && !windowCleanup) {\n\t\t\twindow.addEventListener(config.type, boundCallback, config.options);\n\t\t\twindowCleanup = () => {\n\t\t\t\twindow.removeEventListener(config.type, boundCallback, config.options);\n\t\t\t};\n\t\t}\n\n\t\tif ('document' in config && !documentCleanup) {\n\t\t\tdocument.addEventListener(config.type, boundCallback, config.options);\n\t\t\tdocumentCleanup = () => {\n\t\t\t\tdocument.removeEventListener(config.type, boundCallback, config.options);\n\t\t\t};\n\t\t}\n\n\t\tif ('selector' in config || 'ref' in config) {\n\t\t\tconst selector = 'selector' in config ? config.selector : `[data-ref='${escapeCssIdentifier(config.ref)}']`;\n\n\t\t\tif (config.scope !== 'shadow' && !lightCleanup) {\n\t\t\t\tlightCleanup = addDelegatedListener(hostElement, config, selector, boundCallback);\n\t\t\t}\n\n\t\t\tif (config.scope !== 'light' && hostElement.shadowRoot && !shadowCleanup) {\n\t\t\t\tshadowCleanup = addDelegatedListener(hostElement.shadowRoot, config, selector, boundCallback);\n\t\t\t}\n\t\t}\n\t};\n\n\tif ('selector' in config || 'ref' in config) {\n\t\tif (config.scope !== 'light') {\n\t\t\tregisterShadowRootHook(host, () => {\n\t\t\t\tif (host.isConnected) {\n\t\t\t\t\tattachListeners();\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\n\thost.registerConnectedCallback(attachListeners);\n\thost.registerCleanupCallback(detachListeners);\n\n\tif (host.isConnected) {\n\t\tattachListeners();\n\t}\n\n\treturn () => {\n\t\tdisposed = true;\n\t\tdetachListeners();\n\t};\n}\n",
8
+ "import { createEventListener, type EventListenerHost } from '../../helpers/create-event-listener';\nimport type { OnEventConfig } from '../on-event';\nimport { registerLegacyInstanceInitializer } from './instance-initializers';\n\n/**\n * A decorator to subscribe to an event on the target element.\n * The event listener will be automatically unsubscribed when the element is disconnected.\n *\n * Note: This decorator uses event delegation, which means it relies on event bubbling.\n * Therefore, it will not work with events that do not bubble, such as `focus`, `blur`, `load`, `unload`, `scroll`, etc.\n * For focus and blur events, consider using `focusin` and `focusout` which are similar but do bubble.\n *\n * @param eventConfig The event configuration.\n * @param eventConfig.selectors The CSS selector(s) of the target element(s).\n * @param eventConfig.ref The data-ref attribute of the target element.\n * @param eventConfig.type The type of the event to listen for.\n * @param eventConfig.options Optional. An options object that specifies characteristics about the event listener.\n */\nexport function onEvent(eventConfig: OnEventConfig) {\n\treturn (proto: EventListenerHost, _: string, descriptor: PropertyDescriptor) => {\n\t\tconst originalMethod = descriptor.value;\n\n\t\tregisterLegacyInstanceInitializer(proto, (element) =>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EAAa,EAAQ,EAAU,CAAa,EAGjF,GAAI,EAAO,QAAU,SAAW,EAAY,YAAc,CAAC,EAC1D,EAAgB,EAAqB,EAAY,WAAY,EAAQ,EAAU,CAAa,IAK/F,GAAI,aAAc,GAAU,QAAS,GACpC,GAAI,EAAO,QAAU,QACpB,EAAuB,EAAM,IAAM,CAClC,GAAI,EAAK,YACR,EAAgB,EAEjB,EAOH,GAHA,EAAK,0BAA0B,CAAe,EAC9C,EAAK,wBAAwB,CAAe,EAExC,EAAK,YACR,EAAgB,EAGjB,MAAO,IAAM,CACZ,EAAW,GACX,EAAgB,GCpLX,SAAS,CAAO,CAAC,EAA4B,CACnD,MAAO,CAAC,EAA0B,EAAW,IAAmC,CAC/E,IAAM,EAAiB,EAAW,MAMlC,OAJA,EAAkC,EAAO,CAAC,IAAY,CACrD,EAAoB,EAAS,EAAa,EAAe,KAAK,CAAO,CAAC,EACtE,EAEM",
11
+ "debugId": "23FB8CBE1C12C11964756E2164756E21",
12
+ "names": []
13
+ }
@@ -0,0 +1,11 @@
1
+ type LegacyUpdatedHost = {
2
+ registerCleanupCallback(callback: () => void): void;
3
+ registerConnectedCallback(callback: () => void): void;
4
+ registerUpdateCallback(key: string, update: (...rest: any[]) => any): () => void;
5
+ };
6
+ /**
7
+ * A decorator to subscribe to an updated callback when a reactive field or property changes.
8
+ * @param eventConfig The event configuration.
9
+ */
10
+ export declare function onUpdated(keyOrKeys: string | string[]): (target: LegacyUpdatedHost, methodName: string) => void;
11
+ export {};
@@ -0,0 +1,3 @@
1
+ var b=((f)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(f,{get:(j,B)=>(typeof require<"u"?require:j)[B]}):f)(function(f){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+f+'" is not supported')});var Q=Symbol.for("@ecopages/radiant.legacy-instance-initializers"),V=Symbol.for("@ecopages/radiant.legacy-post-construction-initializers"),$=Symbol.for("@ecopages/radiant.legacy-executed-post-construction-initializers");function W(f,j){X(f,Q,j)}function G(f,j){X(f,V,j)}function M(f){J(f,Q)}function P(f){let j=f;J(f,V,j[$]??=new Set)}function X(f,j,B){let v=f,q=Object.prototype.hasOwnProperty.call(v,j)?v[j]:void 0;if(Array.isArray(q)){q.push(B);return}Object.defineProperty(v,j,{value:[B]})}function J(f,j,B,v=Object.getPrototypeOf(f)){if(!v||v===Object.prototype)return;J(f,j,B,Object.getPrototypeOf(v));let q=v[j];if(!Array.isArray(q))return;for(let D of q){if(B?.has(D))continue;D(f),B?.add(D)}}function Z(f){return(j,B)=>{let v=Symbol(`@ecopages/radiant/on-updated:${B}:cleanup`);W(j,(q)=>{q.registerConnectedCallback(()=>{let D=q[B].bind(q),F=[];if(Array.isArray(f))for(let H of f)F.push(q.registerUpdateCallback(H,D));else if(typeof f==="string")F.push(q.registerUpdateCallback(f,D));q[v]=()=>{for(let H of F)H()}}),q.registerCleanupCallback(()=>{let D=q[v];if(typeof D==="function")D(),delete q[v]})})}}export{Z as onUpdated};
2
+
3
+ //# debugId=CF508F1A5822955664756E2164756E21
@@ -0,0 +1,11 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/decorators/legacy/instance-initializers.ts", "../src/decorators/legacy/on-updated.ts"],
4
+ "sourcesContent": [
5
+ "type LegacyInstanceInitializer<T extends object = object> = (instance: T) => void;\n\nconst LEGACY_INSTANCE_INITIALIZERS = Symbol.for('@ecopages/radiant.legacy-instance-initializers');\nconst LEGACY_POST_CONSTRUCTION_INITIALIZERS = Symbol.for('@ecopages/radiant.legacy-post-construction-initializers');\nconst LEGACY_EXECUTED_POST_CONSTRUCTION_INITIALIZERS = Symbol.for(\n\t'@ecopages/radiant.legacy-executed-post-construction-initializers',\n);\n\n/**\n * Registers per-instance initialization work for a legacy decorator.\n *\n * Legacy decorators execute against the prototype, so any initialization that\n * needs the concrete element instance must be deferred until construction time.\n */\nexport function registerLegacyInstanceInitializer<T extends object>(\n\tproto: T,\n\tinitializer: LegacyInstanceInitializer<T>,\n): void {\n\tregisterInitializer(proto, LEGACY_INSTANCE_INITIALIZERS, initializer);\n}\n\n/**\n * Registers post-construction work for a legacy decorator.\n *\n * This phase exists for decorators that eagerly write instance fields. With\n * legacy decorators plus `useDefineForClassFields`, subclass field definition\n * can overwrite values written during the base-class constructor.\n */\nexport function registerLegacyPostConstructionInitializer<T extends object>(\n\tproto: T,\n\tinitializer: LegacyInstanceInitializer<T>,\n): void {\n\tregisterInitializer(proto, LEGACY_POST_CONSTRUCTION_INITIALIZERS, initializer);\n}\n\n/**\n * Runs all legacy decorator initializers for a newly constructed element.\n *\n * Initializers are collected from the prototype chain and executed from base to\n * derived class so inherited setup remains stable.\n */\nexport function runLegacyInstanceInitializers<T extends object>(instance: T): void {\n\trunLegacyInitializers(instance, LEGACY_INSTANCE_INITIALIZERS);\n}\n\n/**\n * Runs legacy decorator setup that must happen after subclass field\n * initialization has completed.\n *\n * Each initializer runs at most once per instance even if multiple lifecycle\n * entrypoints call this helper.\n */\nexport function runLegacyPostConstructionInitializers<T extends object>(instance: T): void {\n\tconst target = instance as Record<PropertyKey, unknown>;\n\n\trunLegacyInitializers(\n\t\tinstance,\n\t\tLEGACY_POST_CONSTRUCTION_INITIALIZERS,\n\t\t(target[LEGACY_EXECUTED_POST_CONSTRUCTION_INITIALIZERS] ??= new Set()) as Set<LegacyInstanceInitializer<T>>,\n\t);\n}\n\nfunction registerInitializer<T extends object>(proto: T, key: symbol, initializer: LegacyInstanceInitializer<T>): void {\n\tconst target = proto as Record<PropertyKey, unknown>;\n\tconst ownInitializers = Object.prototype.hasOwnProperty.call(target, key) ? target[key] : undefined;\n\n\tif (Array.isArray(ownInitializers)) {\n\t\townInitializers.push(initializer);\n\t\treturn;\n\t}\n\n\tObject.defineProperty(target, key, {\n\t\tvalue: [initializer],\n\t});\n}\n\nfunction runLegacyInitializers<T extends object>(\n\tinstance: T,\n\tkey: symbol,\n\texecutedInitializers?: Set<LegacyInstanceInitializer<T>>,\n\tprototype: object | null = Object.getPrototypeOf(instance),\n): void {\n\tif (!prototype || prototype === Object.prototype) {\n\t\treturn;\n\t}\n\n\trunLegacyInitializers(instance, key, executedInitializers, Object.getPrototypeOf(prototype));\n\n\tconst initializers = (prototype as Record<PropertyKey, unknown>)[key] as LegacyInstanceInitializer<T>[] | undefined;\n\n\tif (!Array.isArray(initializers)) {\n\t\treturn;\n\t}\n\n\tfor (const initializer of initializers) {\n\t\tif (executedInitializers?.has(initializer)) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tinitializer(instance);\n\t\texecutedInitializers?.add(initializer);\n\t}\n}\n",
6
+ "type LegacyUpdatedHost = {\n\tregisterCleanupCallback(callback: () => void): void;\n\tregisterConnectedCallback(callback: () => void): void;\n\tregisterUpdateCallback(key: string, update: (...rest: any[]) => any): () => void;\n};\n\nimport { registerLegacyInstanceInitializer } from './instance-initializers';\n\n/**\n * A decorator to subscribe to an updated callback when a reactive field or property changes.\n * @param eventConfig The event configuration.\n */\nexport function onUpdated(keyOrKeys: string | string[]) {\n\treturn (target: LegacyUpdatedHost, methodName: string) => {\n\t\tconst cleanupKey = Symbol(`@ecopages/radiant/on-updated:${methodName}:cleanup`);\n\n\t\tregisterLegacyInstanceInitializer(target, (element) => {\n\t\t\telement.registerConnectedCallback(() => {\n\t\t\t\tconst boundedMethod = (element as any)[methodName].bind(element);\n\t\t\t\tconst cleanups: Array<() => void> = [];\n\n\t\t\t\tif (Array.isArray(keyOrKeys)) {\n\t\t\t\t\tfor (const key of keyOrKeys) {\n\t\t\t\t\t\tcleanups.push(element.registerUpdateCallback(key, boundedMethod));\n\t\t\t\t\t}\n\t\t\t\t} else if (typeof keyOrKeys === 'string') {\n\t\t\t\t\tcleanups.push(element.registerUpdateCallback(keyOrKeys, boundedMethod));\n\t\t\t\t}\n\n\t\t\t\t(element as unknown as Record<PropertyKey, unknown>)[cleanupKey] = () => {\n\t\t\t\t\tfor (const cleanup of cleanups) {\n\t\t\t\t\t\tcleanup();\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t});\n\n\t\t\telement.registerCleanupCallback(() => {\n\t\t\t\tconst cleanup = (element as unknown as Record<PropertyKey, unknown>)[cleanupKey];\n\n\t\t\t\tif (typeof cleanup === 'function') {\n\t\t\t\t\tcleanup();\n\t\t\t\t\tdelete (element as unknown as Record<PropertyKey, unknown>)[cleanupKey];\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t};\n}\n"
7
+ ],
8
+ "mappings": "2PAEA,IAAM,EAA+B,OAAO,IAAI,gDAAgD,EAC1F,EAAwC,OAAO,IAAI,yDAAyD,EAC5G,EAAiD,OAAO,IAC7D,kEACD,EAQO,SAAS,CAAmD,CAClE,EACA,EACO,CACP,EAAoB,EAAO,EAA8B,CAAW,EAU9D,SAAS,CAA2D,CAC1E,EACA,EACO,CACP,EAAoB,EAAO,EAAuC,CAAW,EASvE,SAAS,CAA+C,CAAC,EAAmB,CAClF,EAAsB,EAAU,CAA4B,EAUtD,SAAS,CAAuD,CAAC,EAAmB,CAC1F,IAAM,EAAS,EAEf,EACC,EACA,EACC,EAAO,KAAoD,IAAI,GACjE,EAGD,SAAS,CAAqC,CAAC,EAAU,EAAa,EAAiD,CACtH,IAAM,EAAS,EACT,EAAkB,OAAO,UAAU,eAAe,KAAK,EAAQ,CAAG,EAAI,EAAO,GAAO,OAE1F,GAAI,MAAM,QAAQ,CAAe,EAAG,CACnC,EAAgB,KAAK,CAAW,EAChC,OAGD,OAAO,eAAe,EAAQ,EAAK,CAClC,MAAO,CAAC,CAAW,CACpB,CAAC,EAGF,SAAS,CAAuC,CAC/C,EACA,EACA,EACA,EAA2B,OAAO,eAAe,CAAQ,EAClD,CACP,GAAI,CAAC,GAAa,IAAc,OAAO,UACtC,OAGD,EAAsB,EAAU,EAAK,EAAsB,OAAO,eAAe,CAAS,CAAC,EAE3F,IAAM,EAAgB,EAA2C,GAEjE,GAAI,CAAC,MAAM,QAAQ,CAAY,EAC9B,OAGD,QAAW,KAAe,EAAc,CACvC,GAAI,GAAsB,IAAI,CAAW,EACxC,SAGD,EAAY,CAAQ,EACpB,GAAsB,IAAI,CAAW,GCxFhC,SAAS,CAAS,CAAC,EAA8B,CACvD,MAAO,CAAC,EAA2B,IAAuB,CACzD,IAAM,EAAa,OAAO,gCAAgC,WAAoB,EAE9E,EAAkC,EAAQ,CAAC,IAAY,CACtD,EAAQ,0BAA0B,IAAM,CACvC,IAAM,EAAiB,EAAgB,GAAY,KAAK,CAAO,EACzD,EAA8B,CAAC,EAErC,GAAI,MAAM,QAAQ,CAAS,EAC1B,QAAW,KAAO,EACjB,EAAS,KAAK,EAAQ,uBAAuB,EAAK,CAAa,CAAC,EAE3D,QAAI,OAAO,IAAc,SAC/B,EAAS,KAAK,EAAQ,uBAAuB,EAAW,CAAa,CAAC,EAGtE,EAAoD,GAAc,IAAM,CACxE,QAAW,KAAW,EACrB,EAAQ,GAGV,EAED,EAAQ,wBAAwB,IAAM,CACrC,IAAM,EAAW,EAAoD,GAErE,GAAI,OAAO,IAAY,WACtB,EAAQ,EACR,OAAQ,EAAoD,GAE7D,EACD",
9
+ "debugId": "CF508F1A5822955664756E2164756E21",
10
+ "names": []
11
+ }
@@ -0,0 +1,3 @@
1
+ import type { RadiantElement } from '../../core/radiant-element';
2
+ import type { QuerySlotConfig } from '../query-slot';
3
+ export declare function querySlot<T extends Element | Element[] | null>(options?: QuerySlotConfig): (proto: RadiantElement, propertyName: string | symbol) => void;
@@ -0,0 +1,3 @@
1
+ var Q=((j)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(j,{get:(H,M)=>(typeof require<"u"?require:H)[M]}):j)(function(j){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+j+'" is not supported')});var v=Symbol.for("@ecopages/radiant.legacy-instance-initializers"),w=Symbol.for("@ecopages/radiant.legacy-post-construction-initializers"),q=Symbol.for("@ecopages/radiant.legacy-executed-post-construction-initializers");function B(j,H){G(j,v,H)}function E(j,H){G(j,w,H)}function K(j){F(j,v)}function x(j){let H=j;F(j,w,H[q]??=new Set)}function G(j,H,M){let W=j,$=Object.prototype.hasOwnProperty.call(W,H)?W[H]:void 0;if(Array.isArray($)){$.push(M);return}Object.defineProperty(W,H,{value:[M]})}function F(j,H,M,W=Object.getPrototypeOf(j)){if(!W||W===Object.prototype)return;F(j,H,M,Object.getPrototypeOf(W));let $=W[H];if(!Array.isArray($))return;for(let D of $){if(M?.has(D))continue;D(j),M?.add(D)}}var J=Symbol.for("@ecopages/radiant.ssr-preparation-callbacks"),U=Symbol.for("@ecopages/radiant.ssr-preparation-running");function V(j,H){let W=j[J];if(Array.isArray(W)){W.push(H);return}Object.defineProperty(j,J,{value:[H],configurable:!0})}function b(j){let H=j,M=H[J];if(!Array.isArray(M))return;H[U]=!0;try{for(let W of M)W()}finally{delete H[U]}}function Y(j,H={}){let M=null,W,$=()=>{if(H.all)return j.getSlotElements(H.name);return j.getSlotElements(H.name)[0]??null};return{get value(){if(H.cache===!1)return $();let D=j.slotProjectionVersion??0;if(W!==D)M=$(),W=D;return M}}}function N(j={}){return(H,M)=>{let W=(X)=>{return typeof Object.getOwnPropertyDescriptor(X,M)?.get==="function"},$=(X)=>{if(W(X))return;let Z=Y(X,j);Object.defineProperty(X,M,{get(){return Z.value},enumerable:!0,configurable:!0})},D=new WeakMap;Object.defineProperty(H,M,{get(){let X=D.get(this);if(!X)X=Y(this,j),D.set(this,X);return X.value},enumerable:!0,configurable:!0}),B(H,(X)=>{V(X,()=>{$(X)}),X.registerConnectedCallback(()=>{$(X)})})}}export{N as querySlot};
2
+
3
+ //# debugId=2A64593EAE8DD82064756E2164756E21
@@ -0,0 +1,13 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/decorators/legacy/instance-initializers.ts", "../src/core/ssr-preparation.ts", "../src/helpers/create-query-slot.ts", "../src/decorators/legacy/query-slot.ts"],
4
+ "sourcesContent": [
5
+ "type LegacyInstanceInitializer<T extends object = object> = (instance: T) => void;\n\nconst LEGACY_INSTANCE_INITIALIZERS = Symbol.for('@ecopages/radiant.legacy-instance-initializers');\nconst LEGACY_POST_CONSTRUCTION_INITIALIZERS = Symbol.for('@ecopages/radiant.legacy-post-construction-initializers');\nconst LEGACY_EXECUTED_POST_CONSTRUCTION_INITIALIZERS = Symbol.for(\n\t'@ecopages/radiant.legacy-executed-post-construction-initializers',\n);\n\n/**\n * Registers per-instance initialization work for a legacy decorator.\n *\n * Legacy decorators execute against the prototype, so any initialization that\n * needs the concrete element instance must be deferred until construction time.\n */\nexport function registerLegacyInstanceInitializer<T extends object>(\n\tproto: T,\n\tinitializer: LegacyInstanceInitializer<T>,\n): void {\n\tregisterInitializer(proto, LEGACY_INSTANCE_INITIALIZERS, initializer);\n}\n\n/**\n * Registers post-construction work for a legacy decorator.\n *\n * This phase exists for decorators that eagerly write instance fields. With\n * legacy decorators plus `useDefineForClassFields`, subclass field definition\n * can overwrite values written during the base-class constructor.\n */\nexport function registerLegacyPostConstructionInitializer<T extends object>(\n\tproto: T,\n\tinitializer: LegacyInstanceInitializer<T>,\n): void {\n\tregisterInitializer(proto, LEGACY_POST_CONSTRUCTION_INITIALIZERS, initializer);\n}\n\n/**\n * Runs all legacy decorator initializers for a newly constructed element.\n *\n * Initializers are collected from the prototype chain and executed from base to\n * derived class so inherited setup remains stable.\n */\nexport function runLegacyInstanceInitializers<T extends object>(instance: T): void {\n\trunLegacyInitializers(instance, LEGACY_INSTANCE_INITIALIZERS);\n}\n\n/**\n * Runs legacy decorator setup that must happen after subclass field\n * initialization has completed.\n *\n * Each initializer runs at most once per instance even if multiple lifecycle\n * entrypoints call this helper.\n */\nexport function runLegacyPostConstructionInitializers<T extends object>(instance: T): void {\n\tconst target = instance as Record<PropertyKey, unknown>;\n\n\trunLegacyInitializers(\n\t\tinstance,\n\t\tLEGACY_POST_CONSTRUCTION_INITIALIZERS,\n\t\t(target[LEGACY_EXECUTED_POST_CONSTRUCTION_INITIALIZERS] ??= new Set()) as Set<LegacyInstanceInitializer<T>>,\n\t);\n}\n\nfunction registerInitializer<T extends object>(proto: T, key: symbol, initializer: LegacyInstanceInitializer<T>): void {\n\tconst target = proto as Record<PropertyKey, unknown>;\n\tconst ownInitializers = Object.prototype.hasOwnProperty.call(target, key) ? target[key] : undefined;\n\n\tif (Array.isArray(ownInitializers)) {\n\t\townInitializers.push(initializer);\n\t\treturn;\n\t}\n\n\tObject.defineProperty(target, key, {\n\t\tvalue: [initializer],\n\t});\n}\n\nfunction runLegacyInitializers<T extends object>(\n\tinstance: T,\n\tkey: symbol,\n\texecutedInitializers?: Set<LegacyInstanceInitializer<T>>,\n\tprototype: object | null = Object.getPrototypeOf(instance),\n): void {\n\tif (!prototype || prototype === Object.prototype) {\n\t\treturn;\n\t}\n\n\trunLegacyInitializers(instance, key, executedInitializers, Object.getPrototypeOf(prototype));\n\n\tconst initializers = (prototype as Record<PropertyKey, unknown>)[key] as LegacyInstanceInitializer<T>[] | undefined;\n\n\tif (!Array.isArray(initializers)) {\n\t\treturn;\n\t}\n\n\tfor (const initializer of initializers) {\n\t\tif (executedInitializers?.has(initializer)) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tinitializer(instance);\n\t\texecutedInitializers?.add(initializer);\n\t}\n}\n",
6
+ "type SsrPreparationCallback = () => void;\n\nconst SSR_PREPARATION_CALLBACKS = Symbol.for('@ecopages/radiant.ssr-preparation-callbacks');\nexport const SSR_PREPARATION_RUNNING = Symbol.for('@ecopages/radiant.ssr-preparation-running');\n\n/**\n * Registers instance-local SSR preparation work that should run immediately\n * before a Radiant host serializes its first server render.\n *\n * Decorators use this to defer SSR-only setup until after class fields,\n * reactive props, and authored host content have all been applied.\n */\nexport function registerSsrPreparationCallback(host: object, callback: SsrPreparationCallback): void {\n\tconst target = host as Record<PropertyKey, unknown>;\n\tconst existingCallbacks = target[SSR_PREPARATION_CALLBACKS];\n\n\tif (Array.isArray(existingCallbacks)) {\n\t\texistingCallbacks.push(callback);\n\t\treturn;\n\t}\n\n\tObject.defineProperty(host, SSR_PREPARATION_CALLBACKS, {\n\t\tvalue: [callback],\n\t\tconfigurable: true,\n\t});\n}\n\n/**\n * Runs all registered SSR preparation callbacks for the provided host.\n *\n * The callbacks are intentionally retained so repeated SSR serializations stay\n * deterministic after later host mutations.\n */\nexport function runSsrPreparationCallbacks(host: object): void {\n\tconst target = host as Record<PropertyKey, unknown>;\n\tconst callbacks = target[SSR_PREPARATION_CALLBACKS];\n\n\tif (!Array.isArray(callbacks)) {\n\t\treturn;\n\t}\n\n\ttarget[SSR_PREPARATION_RUNNING] = true;\n\n\ttry {\n\t\tfor (const callback of callbacks as SsrPreparationCallback[]) {\n\t\t\tcallback();\n\t\t}\n\t} finally {\n\t\tdelete target[SSR_PREPARATION_RUNNING];\n\t}\n}\n",
7
+ "export type QuerySlotConfig = {\n\tall?: boolean;\n\tcache?: boolean;\n\tname?: string;\n};\n\ntype SlotQueryHost = HTMLElement & {\n\tgetSlotElements<T extends Element = Element>(name?: string): T[];\n};\n\ntype QuerySlotResult<T extends Element | Element[] | null> = {\n\tget value(): T | null;\n};\n\n/**\n * Creates a lazy slot query accessor bound to a host element.\n * Functional equivalent of the `@querySlot` decorator for vanilla JS usage.\n * @param host The host element to query slots within.\n * @param options {@link QuerySlotConfig} The slot query configuration.\n */\nexport function createQuerySlot<T extends Element | Element[] | null = Element | null>(\n\thost: SlotQueryHost,\n\toptions: QuerySlotConfig = {},\n): QuerySlotResult<T> {\n\tlet cached: T | null = null;\n\tlet cachedVersion: number | undefined;\n\n\tconst executeQuery = (): T | null => {\n\t\tif (options.all) {\n\t\t\treturn host.getSlotElements(options.name) as T;\n\t\t}\n\t\treturn (host.getSlotElements(options.name)[0] ?? null) as T | null;\n\t};\n\n\treturn {\n\t\tget value(): T | null {\n\t\t\tif (options.cache === false) {\n\t\t\t\treturn executeQuery();\n\t\t\t}\n\n\t\t\tconst currentVersion = (host as unknown as Record<string, number | undefined>).slotProjectionVersion ?? 0;\n\n\t\t\tif (cachedVersion !== currentVersion) {\n\t\t\t\tcached = executeQuery();\n\t\t\t\tcachedVersion = currentVersion;\n\t\t\t}\n\n\t\t\treturn cached;\n\t\t},\n\t};\n}\n",
8
+ "import type { RadiantElement } from '../../core/radiant-element';\nimport { createQuerySlot } from '../../helpers/create-query-slot';\nimport { registerSsrPreparationCallback } from '../../core/ssr-preparation';\nimport type { QuerySlotConfig } from '../query-slot';\nimport { registerLegacyInstanceInitializer } from './instance-initializers';\n\ntype SlotQueryHost = RadiantElement & {\n\tgetSlotElements<T extends Element = Element>(name?: string): T[];\n\tslotProjectionVersion?: number;\n};\n\nexport function querySlot<T extends Element | Element[] | null>(\n\toptions: QuerySlotConfig = {},\n): (proto: RadiantElement, propertyName: string | symbol) => void {\n\treturn (proto: RadiantElement, propertyKey: string | symbol) => {\n\t\tconst hasDefinedInstanceQuery = (instance: SlotQueryHost) => {\n\t\t\tconst descriptor = Object.getOwnPropertyDescriptor(instance, propertyKey);\n\t\t\treturn typeof descriptor?.get === 'function';\n\t\t};\n\n\t\tconst defineSlotQueryProperty = (instance: SlotQueryHost) => {\n\t\t\tif (hasDefinedInstanceQuery(instance)) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst accessor = createQuerySlot<T>(instance, options);\n\n\t\t\tObject.defineProperty(instance, propertyKey, {\n\t\t\t\tget() {\n\t\t\t\t\treturn accessor.value;\n\t\t\t\t},\n\t\t\t\tenumerable: true,\n\t\t\t\tconfigurable: true,\n\t\t\t});\n\t\t};\n\n\t\tconst protoAccessorCache = new WeakMap<SlotQueryHost, ReturnType<typeof createQuerySlot<T>>>();\n\n\t\tObject.defineProperty(proto, propertyKey, {\n\t\t\tget(this: SlotQueryHost) {\n\t\t\t\tlet accessor = protoAccessorCache.get(this);\n\t\t\t\tif (!accessor) {\n\t\t\t\t\taccessor = createQuerySlot<T>(this, options);\n\t\t\t\t\tprotoAccessorCache.set(this, accessor);\n\t\t\t\t}\n\t\t\t\treturn accessor.value;\n\t\t\t},\n\t\t\tenumerable: true,\n\t\t\tconfigurable: true,\n\t\t});\n\n\t\tregisterLegacyInstanceInitializer(proto, (element) => {\n\t\t\tregisterSsrPreparationCallback(element, () => {\n\t\t\t\tdefineSlotQueryProperty(element as SlotQueryHost);\n\t\t\t});\n\t\t\telement.registerConnectedCallback(() => {\n\t\t\t\tdefineSlotQueryProperty(element as SlotQueryHost);\n\t\t\t});\n\t\t});\n\t};\n}\n"
9
+ ],
10
+ "mappings": "2PAEA,IAAM,EAA+B,OAAO,IAAI,gDAAgD,EAC1F,EAAwC,OAAO,IAAI,yDAAyD,EAC5G,EAAiD,OAAO,IAC7D,kEACD,EAQO,SAAS,CAAmD,CAClE,EACA,EACO,CACP,EAAoB,EAAO,EAA8B,CAAW,EAU9D,SAAS,CAA2D,CAC1E,EACA,EACO,CACP,EAAoB,EAAO,EAAuC,CAAW,EASvE,SAAS,CAA+C,CAAC,EAAmB,CAClF,EAAsB,EAAU,CAA4B,EAUtD,SAAS,CAAuD,CAAC,EAAmB,CAC1F,IAAM,EAAS,EAEf,EACC,EACA,EACC,EAAO,KAAoD,IAAI,GACjE,EAGD,SAAS,CAAqC,CAAC,EAAU,EAAa,EAAiD,CACtH,IAAM,EAAS,EACT,EAAkB,OAAO,UAAU,eAAe,KAAK,EAAQ,CAAG,EAAI,EAAO,GAAO,OAE1F,GAAI,MAAM,QAAQ,CAAe,EAAG,CACnC,EAAgB,KAAK,CAAW,EAChC,OAGD,OAAO,eAAe,EAAQ,EAAK,CAClC,MAAO,CAAC,CAAW,CACpB,CAAC,EAGF,SAAS,CAAuC,CAC/C,EACA,EACA,EACA,EAA2B,OAAO,eAAe,CAAQ,EAClD,CACP,GAAI,CAAC,GAAa,IAAc,OAAO,UACtC,OAGD,EAAsB,EAAU,EAAK,EAAsB,OAAO,eAAe,CAAS,CAAC,EAE3F,IAAM,EAAgB,EAA2C,GAEjE,GAAI,CAAC,MAAM,QAAQ,CAAY,EAC9B,OAGD,QAAW,KAAe,EAAc,CACvC,GAAI,GAAsB,IAAI,CAAW,EACxC,SAGD,EAAY,CAAQ,EACpB,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,WAAY,GACZ,aAAc,EACf,CAAC,GAGI,EAAqB,IAAI,QAE/B,OAAO,eAAe,EAAO,EAAa,CACzC,GAAG,EAAsB,CACxB,IAAI,EAAW,EAAmB,IAAI,IAAI,EAC1C,GAAI,CAAC,EACJ,EAAW,EAAmB,KAAM,CAAO,EAC3C,EAAmB,IAAI,KAAM,CAAQ,EAEtC,OAAO,EAAS,OAEjB,WAAY,GACZ,aAAc,EACf,CAAC,EAED,EAAkC,EAAO,CAAC,IAAY,CACrD,EAA+B,EAAS,IAAM,CAC7C,EAAwB,CAAwB,EAChD,EACD,EAAQ,0BAA0B,IAAM,CACvC,EAAwB,CAAwB,EAChD,EACD",
11
+ "debugId": "2A64593EAE8DD82064756E2164756E21",
12
+ "names": []
13
+ }
@@ -1,5 +1,9 @@
1
- import type { RadiantElement } from '../../core/radiant-element';
2
1
  import type { QueryConfig } from '../query';
2
+ type QueryDecoratorInstance = (Element | {
3
+ host: Element;
4
+ }) & {
5
+ registerConnectedCallback(callback: () => void): void;
6
+ };
3
7
  /**
4
8
  * A decorator to query by CSS selector or data-ref attribute.
5
9
  * By default it queries for the first element that matches the selector, but it can be configured to query for all elements.
@@ -20,4 +24,5 @@ import type { QueryConfig } from '../query';
20
24
  *
21
25
  * // Now, `myElement` will return the first element in the light DOM of `MyElement` that matches the selector '.my-class'.
22
26
  */
23
- export declare function query<T extends Element | Element[]>({ cache: shouldBeCached, ...options }: QueryConfig): (proto: RadiantElement, propertyName: string | symbol) => void;
27
+ export declare function query<T extends Element | Element[]>({ cache: shouldBeCached, ...options }: QueryConfig): (proto: QueryDecoratorInstance, propertyName: string | symbol) => void;
28
+ export {};
@@ -0,0 +1,3 @@
1
+ var A=((j)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(j,{get:(V,W)=>(typeof require<"u"?require:V)[W]}):j)(function(j){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+j+'" is not supported')});var M=Symbol.for("@ecopages/radiant.legacy-instance-initializers"),B=Symbol.for("@ecopages/radiant.legacy-post-construction-initializers"),U=Symbol.for("@ecopages/radiant.legacy-executed-post-construction-initializers");function G(j,V){K(j,M,V)}function q(j,V){K(j,B,V)}function N(j){F(j,M)}function Q(j){let V=j;F(j,B,V[U]??=new Set)}function K(j,V,W){let $=j,X=Object.prototype.hasOwnProperty.call($,V)?$[V]:void 0;if(Array.isArray(X)){X.push(W);return}Object.defineProperty($,V,{value:[W]})}function F(j,V,W,$=Object.getPrototypeOf(j)){if(!$||$===Object.prototype)return;F(j,V,W,Object.getPrototypeOf($));let X=$[V];if(!Array.isArray(X))return;for(let b of X){if(W?.has(b))continue;b(j),W?.add(b)}}function Y(j){return!(j instanceof Element)}function Z(j){return"shadowRoot"in j?j.shadowRoot??null:null}function f(j){return j instanceof Element?j:j.host}function v(j,V="light"){let W=Z(j);if(V==="shadow")return W?[W]:[];if(V==="both")return W?[j,W]:[j];return[j]}function P(j,V){if(Y(j)&&V.scope&&V.scope!=="light")throw Error("RadiantController queries only support light DOM scope.");let W=f(j),$="selector"in V?V.selector:`[data-ref="${V.ref}"]`,X=null,b=()=>{let H=v(W,V.scope);if(V.all)return H.flatMap((D)=>Array.from(D.querySelectorAll($)));for(let D of H){let J=D.querySelector($);if(J)return J}return null};return{get value(){if(V.cache){if(X===null||V.all&&Array.isArray(X)&&!X.length)X=b();return X}return b()}}}function L({cache:j=!0,...V}){return(W,$)=>{G(W,(X)=>{X.registerConnectedCallback(()=>{let b=P(X,{cache:j,...V});Object.defineProperty(X,$,{get(){return b.value},enumerable:!0,configurable:!0})})})}}export{L as query};
2
+
3
+ //# debugId=F249EF35C53C01C064756E2164756E21
@@ -0,0 +1,12 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/decorators/legacy/instance-initializers.ts", "../src/helpers/create-query.ts", "../src/decorators/legacy/query.ts"],
4
+ "sourcesContent": [
5
+ "type LegacyInstanceInitializer<T extends object = object> = (instance: T) => void;\n\nconst LEGACY_INSTANCE_INITIALIZERS = Symbol.for('@ecopages/radiant.legacy-instance-initializers');\nconst LEGACY_POST_CONSTRUCTION_INITIALIZERS = Symbol.for('@ecopages/radiant.legacy-post-construction-initializers');\nconst LEGACY_EXECUTED_POST_CONSTRUCTION_INITIALIZERS = Symbol.for(\n\t'@ecopages/radiant.legacy-executed-post-construction-initializers',\n);\n\n/**\n * Registers per-instance initialization work for a legacy decorator.\n *\n * Legacy decorators execute against the prototype, so any initialization that\n * needs the concrete element instance must be deferred until construction time.\n */\nexport function registerLegacyInstanceInitializer<T extends object>(\n\tproto: T,\n\tinitializer: LegacyInstanceInitializer<T>,\n): void {\n\tregisterInitializer(proto, LEGACY_INSTANCE_INITIALIZERS, initializer);\n}\n\n/**\n * Registers post-construction work for a legacy decorator.\n *\n * This phase exists for decorators that eagerly write instance fields. With\n * legacy decorators plus `useDefineForClassFields`, subclass field definition\n * can overwrite values written during the base-class constructor.\n */\nexport function registerLegacyPostConstructionInitializer<T extends object>(\n\tproto: T,\n\tinitializer: LegacyInstanceInitializer<T>,\n): void {\n\tregisterInitializer(proto, LEGACY_POST_CONSTRUCTION_INITIALIZERS, initializer);\n}\n\n/**\n * Runs all legacy decorator initializers for a newly constructed element.\n *\n * Initializers are collected from the prototype chain and executed from base to\n * derived class so inherited setup remains stable.\n */\nexport function runLegacyInstanceInitializers<T extends object>(instance: T): void {\n\trunLegacyInitializers(instance, LEGACY_INSTANCE_INITIALIZERS);\n}\n\n/**\n * Runs legacy decorator setup that must happen after subclass field\n * initialization has completed.\n *\n * Each initializer runs at most once per instance even if multiple lifecycle\n * entrypoints call this helper.\n */\nexport function runLegacyPostConstructionInitializers<T extends object>(instance: T): void {\n\tconst target = instance as Record<PropertyKey, unknown>;\n\n\trunLegacyInitializers(\n\t\tinstance,\n\t\tLEGACY_POST_CONSTRUCTION_INITIALIZERS,\n\t\t(target[LEGACY_EXECUTED_POST_CONSTRUCTION_INITIALIZERS] ??= new Set()) as Set<LegacyInstanceInitializer<T>>,\n\t);\n}\n\nfunction registerInitializer<T extends object>(proto: T, key: symbol, initializer: LegacyInstanceInitializer<T>): void {\n\tconst target = proto as Record<PropertyKey, unknown>;\n\tconst ownInitializers = Object.prototype.hasOwnProperty.call(target, key) ? target[key] : undefined;\n\n\tif (Array.isArray(ownInitializers)) {\n\t\townInitializers.push(initializer);\n\t\treturn;\n\t}\n\n\tObject.defineProperty(target, key, {\n\t\tvalue: [initializer],\n\t});\n}\n\nfunction runLegacyInitializers<T extends object>(\n\tinstance: T,\n\tkey: symbol,\n\texecutedInitializers?: Set<LegacyInstanceInitializer<T>>,\n\tprototype: object | null = Object.getPrototypeOf(instance),\n): void {\n\tif (!prototype || prototype === Object.prototype) {\n\t\treturn;\n\t}\n\n\trunLegacyInitializers(instance, key, executedInitializers, Object.getPrototypeOf(prototype));\n\n\tconst initializers = (prototype as Record<PropertyKey, unknown>)[key] as LegacyInstanceInitializer<T>[] | undefined;\n\n\tif (!Array.isArray(initializers)) {\n\t\treturn;\n\t}\n\n\tfor (const initializer of initializers) {\n\t\tif (executedInitializers?.has(initializer)) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tinitializer(instance);\n\t\texecutedInitializers?.add(initializer);\n\t}\n}\n",
6
+ "type BaseQueryConfig = {\n\tall?: boolean;\n\tcache?: boolean;\n\tscope?: QueryScope;\n};\n\ntype QueryBySelector = { selector: string };\n\ntype QueryByRef = { ref: string };\n\nexport type QueryHostTarget = Element | { host: Element };\n\n/**\n * Selects which DOM tree a query should read from.\n */\nexport type QueryScope = 'light' | 'shadow' | 'both';\n\nexport type QueryConfig = BaseQueryConfig & (QueryBySelector | QueryByRef);\n\ntype QueryRoot = Element | ShadowRoot;\n\ntype QueryResult<T extends Element | Element[]> = {\n\tget value(): T | null;\n};\n\nfunction isControllerQueryTarget(target: QueryHostTarget): target is { host: Element } {\n\treturn !(target instanceof Element);\n}\n\nfunction resolveShadowRoot(host: Element): ShadowRoot | null {\n\treturn 'shadowRoot' in host ? ((host as Element & { shadowRoot?: ShadowRoot | null }).shadowRoot ?? null) : null;\n}\n\n/**\n * Resolves the DOM element that should serve as the query root.\n *\n * `@query(...)` can run on both element hosts and controller instances. This\n * helper normalizes those call sites to the underlying element that actually\n * owns the DOM subtree.\n */\nexport function resolveQueryHost(target: QueryHostTarget): Element {\n\treturn target instanceof Element ? target : target.host;\n}\n\nfunction getQueryRoots(host: Element, scope: QueryScope = 'light'): QueryRoot[] {\n\tconst shadowRoot = resolveShadowRoot(host);\n\n\tif (scope === 'shadow') {\n\t\treturn shadowRoot ? [shadowRoot] : [];\n\t}\n\n\tif (scope === 'both') {\n\t\treturn shadowRoot ? [host, shadowRoot] : [host];\n\t}\n\n\treturn [host];\n}\n\n/**\n * Creates a lazy DOM query accessor bound to an element host or controller.\n * Functional equivalent of the `@query` decorator for vanilla JS usage.\n * @param target The element host or controller to query within.\n * @param options {@link QueryConfig} The query configuration.\n */\nexport function createQuery<T extends Element | Element[] = Element>(\n\ttarget: QueryHostTarget,\n\toptions: QueryConfig,\n): QueryResult<T> {\n\tif (isControllerQueryTarget(target) && options.scope && options.scope !== 'light') {\n\t\tthrow new Error('RadiantController queries only support light DOM scope.');\n\t}\n\n\tconst host = resolveQueryHost(target);\n\tconst selector = 'selector' in options ? options.selector : `[data-ref=\"${options.ref}\"]`;\n\tlet cached: T | null = null;\n\n\tconst executeQuery = (): T | null => {\n\t\tconst roots = getQueryRoots(host, options.scope);\n\n\t\tif (options.all) {\n\t\t\treturn roots.flatMap((root) => Array.from(root.querySelectorAll(selector))) as T;\n\t\t}\n\n\t\tfor (const root of roots) {\n\t\t\tconst match = root.querySelector(selector);\n\t\t\tif (match) {\n\t\t\t\treturn match as T;\n\t\t\t}\n\t\t}\n\n\t\treturn null;\n\t};\n\n\treturn {\n\t\tget value(): T | null {\n\t\t\tif (options.cache) {\n\t\t\t\tif (cached === null || (options.all && Array.isArray(cached) && !cached.length)) {\n\t\t\t\t\tcached = executeQuery();\n\t\t\t\t}\n\t\t\t\treturn cached;\n\t\t\t}\n\t\t\treturn executeQuery();\n\t\t},\n\t};\n}\n",
7
+ "import { createQuery } from '../../helpers/create-query';\nimport type { QueryConfig } from '../query';\nimport { registerLegacyInstanceInitializer } from './instance-initializers';\n\ntype QueryDecoratorInstance = (Element | { host: Element }) & {\n\tregisterConnectedCallback(callback: () => void): void;\n};\n\n/**\n * A decorator to query by CSS selector or data-ref attribute.\n * By default it queries for the first element that matches the selector, but it can be configured to query for all elements.\n *\n * @param {QueryConfig} options - The configuration object for the query.\n * @param {boolean} [options.all] - A flag to query for all elements that match the selector. Defaults to `false`.\n * @param {boolean} [options.cache] - A flag to cache the query result. Defaults to `true`.\n * @param {string} [options.selector] - A CSS selector to match elements against. This property is mutually exclusive with `options.ref`.\n * @param {string} [options.ref] - A reference to an element. This property is mutually exclusive with `options.selector`.\n *\n * @returns {Function} A decorator function that, when applied to a class property, will replace it with a getter. The getter will return the result of the query when accessed.\n *\n * @example\n * class MyElement extends HTMLElement {\n * @query({ selector: '.my-class' })\n * myElement;\n * }\n *\n * // Now, `myElement` will return the first element in the light DOM of `MyElement` that matches the selector '.my-class'.\n */\nexport function query<T extends Element | Element[]>({\n\tcache: shouldBeCached = true,\n\t...options\n}: QueryConfig): (proto: QueryDecoratorInstance, propertyName: string | symbol) => void {\n\treturn (proto: QueryDecoratorInstance, propertyKey: string | symbol) => {\n\t\tregisterLegacyInstanceInitializer(proto, (element) => {\n\t\t\telement.registerConnectedCallback(() => {\n\t\t\t\tconst accessor = createQuery<T>(element, {\n\t\t\t\t\tcache: shouldBeCached,\n\t\t\t\t\t...options,\n\t\t\t\t});\n\n\t\t\t\tObject.defineProperty(element, propertyKey, {\n\t\t\t\t\tget() {\n\t\t\t\t\t\treturn accessor.value;\n\t\t\t\t\t},\n\t\t\t\t\tenumerable: true,\n\t\t\t\t\tconfigurable: true,\n\t\t\t\t});\n\t\t\t});\n\t\t});\n\t};\n}\n"
8
+ ],
9
+ "mappings": "2PAEA,IAAM,EAA+B,OAAO,IAAI,gDAAgD,EAC1F,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4 +1,4 @@
1
- import type { RadiantElement } from '../../core/radiant-element';
1
+ import type { ReactiveHostLike } from '../../core/reactive-host';
2
2
  /**
3
3
  * A decorator to define a reactive field.
4
4
  * Every time the property changes, the `updated` method will be called.
@@ -7,4 +7,4 @@ import type { RadiantElement } from '../../core/radiant-element';
7
7
  * @param target The target element.
8
8
  * @param propertyKey The property key.
9
9
  */
10
- export declare function reactiveField(target: RadiantElement, propertyKey: string): void;
10
+ export declare function reactiveField(target: ReactiveHostLike, propertyKey: string): void;
@@ -0,0 +1,3 @@
1
+ var Q=((b)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(b,{get:(f,h)=>(typeof require<"u"?require:f)[h]}):b)(function(b){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+b+'" is not supported')});var D=Symbol.for("@ecopages/radiant.legacy-instance-initializers"),F=Symbol.for("@ecopages/radiant.legacy-post-construction-initializers"),M=Symbol.for("@ecopages/radiant.legacy-executed-post-construction-initializers");function H(b,f){J(b,D,f)}function W(b,f){J(b,F,f)}function X(b){B(b,D)}function $(b){let f=b;B(b,F,f[M]??=new Set)}function J(b,f,h){let j=b,q=Object.prototype.hasOwnProperty.call(j,f)?j[f]:void 0;if(Array.isArray(q)){q.push(h);return}Object.defineProperty(j,f,{value:[h]})}function B(b,f,h,j=Object.getPrototypeOf(b)){if(!j||j===Object.prototype)return;B(b,f,h,Object.getPrototypeOf(j));let q=j[f];if(!Array.isArray(q))return;for(let v of q){if(h?.has(v))continue;v(b),h?.add(v)}}function P(b,f){H(b,(h)=>{h.registerConnectedCallback(()=>{h.createReactiveField(f,h[f],{bind:h.shouldAutoBindReactiveMembers?.()??!1})})})}export{P as reactiveField};
2
+
3
+ //# debugId=5CCB81985718E4AD64756E2164756E21