@ecopages/radiant 0.3.0-beta.0 → 0.3.0-beta.2

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 (578) hide show
  1. package/README.md +5 -5
  2. package/client/app-bootstrap.js +3 -0
  3. package/{dist/client → client}/app-bootstrap.js.map +2 -2
  4. package/client/hydrator.js +3 -0
  5. package/{dist/client → client}/hydrator.js.map +2 -2
  6. package/client/install-hydrator.js +3 -0
  7. package/{dist/client → client}/install-hydrator.js.map +2 -2
  8. package/context/context-consumer-bootstrap.js +3 -0
  9. package/{dist/context → context}/context-consumer-bootstrap.js.map +4 -4
  10. package/context/context-consumer-runtime.js +3 -0
  11. package/context/context-consumer-runtime.js.map +12 -0
  12. package/context/context-host.js +3 -0
  13. package/{dist/context → context}/context-host.js.map +2 -2
  14. package/context/context-provider.js +3 -0
  15. package/{dist/context → context}/context-provider.js.map +3 -3
  16. package/context/context-ssr-bridge.js +3 -0
  17. package/{dist/context → context}/context-ssr-bridge.js.map +2 -2
  18. package/context/create-context.js +3 -0
  19. package/{dist/context → context}/create-context.js.map +2 -2
  20. package/context/decorators/consume-context.js +3 -0
  21. package/{dist/context → context}/decorators/consume-context.js.map +5 -5
  22. package/context/decorators/context-selection-delivery.js +3 -0
  23. package/{dist/context → context}/decorators/context-selection-delivery.js.map +2 -2
  24. package/context/decorators/context-selector.js +3 -0
  25. package/{dist/context → context}/decorators/context-selector.js.map +6 -6
  26. package/context/decorators/legacy/consume-context.js +3 -0
  27. package/context/decorators/legacy/consume-context.js.map +16 -0
  28. package/context/decorators/legacy/context-selector-field.js +3 -0
  29. package/context/decorators/legacy/context-selector-field.js.map +17 -0
  30. package/context/decorators/legacy/context-selector.js +3 -0
  31. package/context/decorators/legacy/context-selector.js.map +17 -0
  32. package/context/decorators/legacy/provide-context.js +3 -0
  33. package/{dist/context → context}/decorators/legacy/provide-context.js.map +4 -4
  34. package/context/decorators/on-context-update.js +3 -0
  35. package/{dist/context → context}/decorators/on-context-update.js.map +5 -5
  36. package/context/decorators/provide-context.js +3 -0
  37. package/{dist/context → context}/decorators/provide-context.js.map +4 -4
  38. package/context/decorators/standard/consume-context.js +3 -0
  39. package/{dist/context → context}/decorators/standard/consume-context.js.map +4 -4
  40. package/context/decorators/standard/context-selector-field.js +3 -0
  41. package/{dist/context → context}/decorators/standard/context-selector-field.js.map +4 -4
  42. package/context/decorators/standard/context-selector.js +3 -0
  43. package/{dist/context → context}/decorators/standard/context-selector.js.map +4 -4
  44. package/context/decorators/standard/provide-context.js +3 -0
  45. package/{dist/context → context}/decorators/standard/provide-context.js.map +3 -3
  46. package/context/decorators/standard-legacy-dispatch.js +3 -0
  47. package/context/decorators/standard-legacy-dispatch.js.map +10 -0
  48. package/context/events.js +3 -0
  49. package/context/events.js.map +10 -0
  50. package/context/hydration-script.js +3 -0
  51. package/{dist/context → context}/hydration-script.js.map +2 -2
  52. package/context/index.js +3 -0
  53. package/{dist/context → context}/index.js.map +6 -6
  54. package/controller-registry.js +3 -0
  55. package/{dist/controller-registry.js.map → controller-registry.js.map} +3 -3
  56. package/core/controller-metadata.js +3 -0
  57. package/{dist/core → core}/controller-metadata.js.map +2 -2
  58. package/core/custom-element-metadata.js +3 -0
  59. package/{dist/core → core}/custom-element-metadata.js.map +2 -2
  60. package/core/event-subscription-registry.js +3 -0
  61. package/{dist/core → core}/event-subscription-registry.js.map +2 -2
  62. package/core/host-ssr-registry.js +3 -0
  63. package/{dist/core → core}/host-ssr-registry.js.map +2 -2
  64. package/core/hydration-capable-host.js +3 -0
  65. package/{dist/core → core}/hydration-capable-host.js.map +2 -2
  66. package/core/hydration-codec.js +3 -0
  67. package/{dist/core → core}/hydration-codec.js.map +2 -2
  68. package/{dist/core → core}/radiant-controller.d.ts +7 -5
  69. package/core/radiant-controller.js +3 -0
  70. package/core/radiant-controller.js.map +21 -0
  71. package/core/radiant-element-ssr-host.js +3 -0
  72. package/{dist/core → core}/radiant-element-ssr-host.js.map +2 -2
  73. package/{dist/core → core}/radiant-element-ssr-registry.d.ts +4 -2
  74. package/core/radiant-element-ssr-registry.js +3 -0
  75. package/core/radiant-element-ssr-registry.js.map +10 -0
  76. package/{dist/core → core}/radiant-element.d.ts +18 -15
  77. package/core/radiant-element.js +3 -0
  78. package/core/radiant-element.js.map +31 -0
  79. package/core/radiant-hydrator-state.js +3 -0
  80. package/{dist/core → core}/radiant-hydrator-state.js.map +2 -2
  81. package/core/reactive-binding-adapter.d.ts +10 -0
  82. package/core/reactive-binding-adapter.js +3 -0
  83. package/core/reactive-binding-adapter.js.map +10 -0
  84. package/core/reactive-host.d.ts +138 -0
  85. package/core/reactive-host.js +3 -0
  86. package/core/reactive-host.js.map +13 -0
  87. package/{dist/core → core}/reactive-jsx-value.d.ts +2 -2
  88. package/core/reactive-jsx-value.js +3 -0
  89. package/core/reactive-jsx-value.js.map +10 -0
  90. package/{dist/core → core}/reactive-prop-core.d.ts +6 -11
  91. package/core/reactive-prop-core.js +3 -0
  92. package/{dist/core → core}/reactive-prop-core.js.map +3 -3
  93. package/core/reactive-prop-metadata.js +3 -0
  94. package/{dist/core → core}/reactive-prop-metadata.js.map +2 -2
  95. package/{dist/core → core}/reactive-property-state.d.ts +5 -2
  96. package/core/reactive-property-state.js +3 -0
  97. package/core/reactive-property-state.js.map +12 -0
  98. package/core/reactivity-adapter.js +3 -0
  99. package/core/reactivity-adapter.js.map +12 -0
  100. package/{dist/core → core}/reactivity-contract.d.ts +14 -0
  101. package/core/reactivity-runtime.js +3 -0
  102. package/core/reactivity-runtime.js.map +11 -0
  103. package/core/reactivity-signals.js +3 -0
  104. package/core/reactivity-signals.js.map +10 -0
  105. package/core/render-runtime.js +3 -0
  106. package/{dist/core → core}/render-runtime.js.map +3 -3
  107. package/core/render-scheduler.js +3 -0
  108. package/{dist/core → core}/render-scheduler.js.map +2 -2
  109. package/core/slot-projection-runtime.js +3 -0
  110. package/{dist/core → core}/slot-projection-runtime.js.map +2 -2
  111. package/core/ssr-preparation.js +3 -0
  112. package/{dist/core → core}/ssr-preparation.js.map +2 -2
  113. package/decorators/attr.js +3 -0
  114. package/decorators/attr.js.map +18 -0
  115. package/decorators/bound.js +3 -0
  116. package/{dist/decorators → decorators}/bound.js.map +2 -2
  117. package/decorators/bridge.js +3 -0
  118. package/{dist/decorators → decorators}/bridge.js.map +2 -2
  119. package/decorators/controller.js +3 -0
  120. package/{dist/decorators → decorators}/controller.js.map +3 -3
  121. package/decorators/custom-element.js +3 -0
  122. package/{dist/decorators → decorators}/custom-element.js.map +2 -2
  123. package/decorators/debounce.js +3 -0
  124. package/{dist/decorators → decorators}/debounce.js.map +2 -2
  125. package/decorators/event.js +3 -0
  126. package/{dist/decorators → decorators}/event.js.map +3 -3
  127. package/decorators/legacy/attr.js +3 -0
  128. package/decorators/legacy/attr.js.map +15 -0
  129. package/decorators/legacy/bound.js +3 -0
  130. package/{dist/decorators → decorators}/legacy/bound.js.map +2 -2
  131. package/decorators/legacy/custom-element.js +3 -0
  132. package/{dist/decorators → decorators}/legacy/custom-element.js.map +2 -2
  133. package/decorators/legacy/debounce.js +3 -0
  134. package/{dist/decorators → decorators}/legacy/debounce.js.map +2 -2
  135. package/decorators/legacy/event.js +3 -0
  136. package/decorators/legacy/event.js.map +13 -0
  137. package/decorators/legacy/host-readiness.js +3 -0
  138. package/decorators/legacy/host-readiness.js.map +11 -0
  139. package/{dist/decorators → decorators}/legacy/instance-initializers.d.ts +4 -2
  140. package/decorators/legacy/instance-initializers.js +3 -0
  141. package/decorators/legacy/instance-initializers.js.map +10 -0
  142. package/decorators/legacy/member-bootstrap.d.ts +10 -0
  143. package/decorators/legacy/member-bootstrap.js +3 -0
  144. package/decorators/legacy/member-bootstrap.js.map +10 -0
  145. package/decorators/legacy/on-event.js +3 -0
  146. package/{dist/decorators → decorators}/legacy/on-event.js.map +3 -3
  147. package/decorators/legacy/on-updated.js +3 -0
  148. package/decorators/legacy/on-updated.js.map +11 -0
  149. package/decorators/legacy/query-slot.js +3 -0
  150. package/decorators/legacy/query-slot.js.map +13 -0
  151. package/decorators/legacy/query.js +3 -0
  152. package/decorators/legacy/query.js.map +12 -0
  153. package/decorators/legacy/reactive-field.js +3 -0
  154. package/decorators/legacy/reactive-field.js.map +13 -0
  155. package/{dist/decorators → decorators}/legacy/reactive-prop.d.ts +0 -1
  156. package/decorators/legacy/reactive-prop.js +3 -0
  157. package/decorators/legacy/reactive-prop.js.map +15 -0
  158. package/decorators/legacy/signal.js +3 -0
  159. package/decorators/legacy/signal.js.map +17 -0
  160. package/decorators/on-event.js +3 -0
  161. package/{dist/decorators → decorators}/on-event.js.map +3 -3
  162. package/decorators/on-updated.js +3 -0
  163. package/{dist/decorators → decorators}/on-updated.js.map +3 -3
  164. package/{dist/decorators → decorators}/prop.d.ts +4 -5
  165. package/decorators/prop.js +3 -0
  166. package/decorators/prop.js.map +18 -0
  167. package/decorators/query-slot.js +3 -0
  168. package/{dist/decorators → decorators}/query-slot.js.map +3 -3
  169. package/decorators/query.js +3 -0
  170. package/{dist/decorators → decorators}/query.js.map +3 -3
  171. package/decorators/shared/auto-bind.d.ts +7 -0
  172. package/decorators/shared/auto-bind.js +3 -0
  173. package/decorators/shared/auto-bind.js.map +10 -0
  174. package/decorators/shared/reactive-attr.js +3 -0
  175. package/decorators/shared/reactive-attr.js.map +13 -0
  176. package/decorators/signal.js +3 -0
  177. package/decorators/signal.js.map +19 -0
  178. package/decorators/standard/attr.js +3 -0
  179. package/decorators/standard/attr.js.map +14 -0
  180. package/decorators/standard/bound.js +3 -0
  181. package/{dist/decorators → decorators}/standard/bound.js.map +2 -2
  182. package/decorators/standard/custom-element.js +3 -0
  183. package/{dist/decorators → decorators}/standard/custom-element.js.map +2 -2
  184. package/decorators/standard/debounce.js +3 -0
  185. package/{dist/decorators → decorators}/standard/debounce.js.map +2 -2
  186. package/decorators/standard/event.js +3 -0
  187. package/{dist/decorators → decorators}/standard/event.js.map +2 -2
  188. package/decorators/standard/on-event.js +3 -0
  189. package/{dist/decorators → decorators}/standard/on-event.js.map +2 -2
  190. package/decorators/standard/on-updated.js +3 -0
  191. package/{dist/decorators → decorators}/standard/on-updated.js.map +2 -2
  192. package/decorators/standard/query-slot.js +3 -0
  193. package/{dist/decorators → decorators}/standard/query-slot.js.map +2 -2
  194. package/decorators/standard/query.js +3 -0
  195. package/{dist/decorators → decorators}/standard/query.js.map +2 -2
  196. package/decorators/standard/reactive-field.js +3 -0
  197. package/decorators/standard/reactive-field.js.map +11 -0
  198. package/decorators/standard/reactive-prop.js +3 -0
  199. package/{dist/decorators → decorators}/standard/reactive-prop.js.map +4 -4
  200. package/decorators/standard/signal.js +3 -0
  201. package/decorators/standard/signal.js.map +16 -0
  202. package/{dist/decorators → decorators}/state.d.ts +3 -2
  203. package/decorators/state.js +3 -0
  204. package/decorators/state.js.map +16 -0
  205. package/helpers/create-event-listener.js +3 -0
  206. package/{dist/helpers → helpers}/create-event-listener.js.map +2 -2
  207. package/helpers/create-event.js +3 -0
  208. package/{dist/helpers → helpers}/create-event.js.map +2 -2
  209. package/helpers/create-query-slot.js +3 -0
  210. package/{dist/helpers → helpers}/create-query-slot.js.map +2 -2
  211. package/helpers/create-query.js +3 -0
  212. package/{dist/helpers → helpers}/create-query.js.map +2 -2
  213. package/helpers/debounce.js +3 -0
  214. package/{dist/helpers → helpers}/debounce.js.map +2 -2
  215. package/helpers/index.js +3 -0
  216. package/{dist/helpers → helpers}/index.js.map +2 -2
  217. package/index.js +3 -0
  218. package/index.js.map +86 -0
  219. package/package.json +99 -129
  220. package/server/context-ssr.js +3 -0
  221. package/{dist/server → server}/context-ssr.js.map +2 -2
  222. package/server/host-attribute-serialization.js +3 -0
  223. package/{dist/server → server}/host-attribute-serialization.js.map +5 -5
  224. package/server/host-script-composition.js +3 -0
  225. package/{dist/server → server}/host-script-composition.js.map +2 -2
  226. package/server/html-parser.js +3 -0
  227. package/{dist/server → server}/html-parser.js.map +2 -2
  228. package/server/install-light-dom-shim.js +3 -0
  229. package/server/install-light-dom-shim.js.map +17 -0
  230. package/server/internal-radiant-host.js +3 -0
  231. package/{dist/server → server}/internal-radiant-host.js.map +1 -1
  232. package/server/light-dom-shim.d.ts +2 -0
  233. package/server/light-dom-shim.js +3 -0
  234. package/server/light-dom-shim.js.map +16 -0
  235. package/server/minimal-dom/document.d.ts +17 -0
  236. package/server/minimal-dom/document.js +3 -0
  237. package/server/minimal-dom/document.js.map +14 -0
  238. package/server/minimal-dom/html.d.ts +7 -0
  239. package/server/minimal-dom/html.js +3 -0
  240. package/server/minimal-dom/html.js.map +13 -0
  241. package/{dist/server/light-dom-shim.d.ts → server/minimal-dom/install.d.ts} +1 -4
  242. package/server/minimal-dom/install.js +3 -0
  243. package/server/minimal-dom/install.js.map +16 -0
  244. package/server/minimal-dom/nodes.d.ts +78 -0
  245. package/server/project-root.js +3 -0
  246. package/{dist/server → server}/project-root.js.map +2 -2
  247. package/server/radiant-element-ssr-bridge.js +3 -0
  248. package/{dist/server → server}/radiant-element-ssr-bridge.js.map +9 -9
  249. package/server/radiant-element-ssr-extractor.js +3 -0
  250. package/{dist/server → server}/radiant-element-ssr-extractor.js.map +3 -3
  251. package/server/radiant-element-ssr-service.js +3 -0
  252. package/{dist/server → server}/radiant-element-ssr-service.js.map +8 -8
  253. package/server/radiant-element-ssr.js +3 -0
  254. package/{dist/server → server}/radiant-element-ssr.js.map +9 -9
  255. package/{dist/server → server}/render-component.d.ts +1 -1
  256. package/server/render-component.js +3 -0
  257. package/server/render-component.js.map +32 -0
  258. package/server/render-controller.js +3 -0
  259. package/server/render-controller.js.map +35 -0
  260. package/server/render-fragment.js +3 -0
  261. package/server/render-fragment.js.map +10 -0
  262. package/server/slot-projection-html.js +3 -0
  263. package/{dist/server → server}/slot-projection-html.js.map +4 -4
  264. package/signals/host-resource.js +3 -0
  265. package/{dist/signals → signals}/host-resource.js.map +2 -2
  266. package/{dist/signals → signals}/host-signal.d.ts +2 -1
  267. package/signals/host-signal.js +3 -0
  268. package/signals/host-signal.js.map +13 -0
  269. package/signals/hydration-script.js +3 -0
  270. package/{dist/signals → signals}/hydration-script.js.map +2 -2
  271. package/tools/escape-css-identifier.js +3 -0
  272. package/{dist/tools → tools}/escape-css-identifier.js.map +2 -2
  273. package/tools/escape-script-json.js +3 -0
  274. package/{dist/tools → tools}/escape-script-json.js.map +2 -2
  275. package/tools/event-emitter.js +3 -0
  276. package/{dist/tools → tools}/event-emitter.js.map +2 -2
  277. package/tools/index.js +3 -0
  278. package/{dist/tools → tools}/index.js.map +2 -2
  279. package/tools/render-jsx-template.js +3 -0
  280. package/{dist/tools → tools}/render-jsx-template.js.map +2 -2
  281. package/types.js +3 -0
  282. package/{dist/types.js.map → types.js.map} +2 -2
  283. package/utils/attribute-utils.js +3 -0
  284. package/{dist/utils → utils}/attribute-utils.js.map +2 -2
  285. package/utils/escape-html-attribute.js +3 -0
  286. package/{dist/utils → utils}/escape-html-attribute.js.map +2 -2
  287. package/utils/index.js +3 -0
  288. package/{dist/utils → utils}/index.js.map +2 -2
  289. package/dist/LICENSE +0 -21
  290. package/dist/README.md +0 -315
  291. package/dist/client/app-bootstrap.js +0 -3
  292. package/dist/client/hydrator.js +0 -3
  293. package/dist/client/install-hydrator.js +0 -3
  294. package/dist/context/context-consumer-bootstrap.js +0 -3
  295. package/dist/context/context-consumer-runtime.js +0 -3
  296. package/dist/context/context-consumer-runtime.js.map +0 -12
  297. package/dist/context/context-host.js +0 -3
  298. package/dist/context/context-provider.js +0 -3
  299. package/dist/context/context-ssr-bridge.js +0 -3
  300. package/dist/context/create-context.js +0 -3
  301. package/dist/context/decorators/consume-context.js +0 -3
  302. package/dist/context/decorators/context-selection-delivery.js +0 -3
  303. package/dist/context/decorators/context-selector.js +0 -3
  304. package/dist/context/decorators/legacy/consume-context.js +0 -3
  305. package/dist/context/decorators/legacy/consume-context.js.map +0 -16
  306. package/dist/context/decorators/legacy/context-selector-field.js +0 -3
  307. package/dist/context/decorators/legacy/context-selector-field.js.map +0 -17
  308. package/dist/context/decorators/legacy/context-selector.js +0 -3
  309. package/dist/context/decorators/legacy/context-selector.js.map +0 -17
  310. package/dist/context/decorators/legacy/provide-context.js +0 -3
  311. package/dist/context/decorators/on-context-update.js +0 -3
  312. package/dist/context/decorators/provide-context.js +0 -3
  313. package/dist/context/decorators/standard/consume-context.js +0 -3
  314. package/dist/context/decorators/standard/context-selector-field.js +0 -3
  315. package/dist/context/decorators/standard/context-selector.js +0 -3
  316. package/dist/context/decorators/standard/provide-context.js +0 -3
  317. package/dist/context/decorators/standard-legacy-dispatch.js +0 -3
  318. package/dist/context/decorators/standard-legacy-dispatch.js.map +0 -10
  319. package/dist/context/events.js +0 -3
  320. package/dist/context/events.js.map +0 -10
  321. package/dist/context/hydration-script.js +0 -3
  322. package/dist/context/index.js +0 -3
  323. package/dist/controller-registry.js +0 -3
  324. package/dist/core/controller-metadata.js +0 -3
  325. package/dist/core/custom-element-metadata.js +0 -3
  326. package/dist/core/event-subscription-registry.js +0 -3
  327. package/dist/core/host-ssr-registry.js +0 -3
  328. package/dist/core/hydration-capable-host.js +0 -3
  329. package/dist/core/hydration-codec.js +0 -3
  330. package/dist/core/radiant-controller.js +0 -3
  331. package/dist/core/radiant-controller.js.map +0 -20
  332. package/dist/core/radiant-element-ssr-host.js +0 -3
  333. package/dist/core/radiant-element-ssr-registry.js +0 -3
  334. package/dist/core/radiant-element-ssr-registry.js.map +0 -10
  335. package/dist/core/radiant-element.js +0 -3
  336. package/dist/core/radiant-element.js.map +0 -30
  337. package/dist/core/radiant-hydrator-state.js +0 -3
  338. package/dist/core/reactive-host.d.ts +0 -124
  339. package/dist/core/reactive-host.js +0 -3
  340. package/dist/core/reactive-host.js.map +0 -13
  341. package/dist/core/reactive-jsx-value.js +0 -3
  342. package/dist/core/reactive-jsx-value.js.map +0 -10
  343. package/dist/core/reactive-prop-core.js +0 -3
  344. package/dist/core/reactive-prop-metadata.js +0 -3
  345. package/dist/core/reactive-property-state.js +0 -3
  346. package/dist/core/reactive-property-state.js.map +0 -12
  347. package/dist/core/reactivity-adapter.js +0 -3
  348. package/dist/core/reactivity-adapter.js.map +0 -12
  349. package/dist/core/reactivity-runtime.js +0 -3
  350. package/dist/core/reactivity-runtime.js.map +0 -11
  351. package/dist/core/reactivity-signals.js +0 -3
  352. package/dist/core/reactivity-signals.js.map +0 -10
  353. package/dist/core/render-runtime.js +0 -3
  354. package/dist/core/render-scheduler.js +0 -3
  355. package/dist/core/slot-projection-runtime.js +0 -3
  356. package/dist/core/ssr-preparation.js +0 -3
  357. package/dist/decorators/attr.js +0 -3
  358. package/dist/decorators/attr.js.map +0 -17
  359. package/dist/decorators/bound.js +0 -3
  360. package/dist/decorators/bridge.js +0 -3
  361. package/dist/decorators/controller.js +0 -3
  362. package/dist/decorators/custom-element.js +0 -3
  363. package/dist/decorators/debounce.js +0 -3
  364. package/dist/decorators/event.js +0 -3
  365. package/dist/decorators/legacy/attr.js +0 -3
  366. package/dist/decorators/legacy/attr.js.map +0 -14
  367. package/dist/decorators/legacy/bound.js +0 -3
  368. package/dist/decorators/legacy/custom-element.js +0 -3
  369. package/dist/decorators/legacy/debounce.js +0 -3
  370. package/dist/decorators/legacy/event.js +0 -3
  371. package/dist/decorators/legacy/event.js.map +0 -13
  372. package/dist/decorators/legacy/host-readiness.js +0 -3
  373. package/dist/decorators/legacy/host-readiness.js.map +0 -11
  374. package/dist/decorators/legacy/instance-initializers.js +0 -3
  375. package/dist/decorators/legacy/instance-initializers.js.map +0 -10
  376. package/dist/decorators/legacy/on-event.js +0 -3
  377. package/dist/decorators/legacy/on-updated.js +0 -3
  378. package/dist/decorators/legacy/on-updated.js.map +0 -11
  379. package/dist/decorators/legacy/query-slot.js +0 -3
  380. package/dist/decorators/legacy/query-slot.js.map +0 -13
  381. package/dist/decorators/legacy/query.js +0 -3
  382. package/dist/decorators/legacy/query.js.map +0 -12
  383. package/dist/decorators/legacy/reactive-field.js +0 -3
  384. package/dist/decorators/legacy/reactive-field.js.map +0 -11
  385. package/dist/decorators/legacy/reactive-prop.js +0 -3
  386. package/dist/decorators/legacy/reactive-prop.js.map +0 -14
  387. package/dist/decorators/legacy/signal.js +0 -3
  388. package/dist/decorators/legacy/signal.js.map +0 -16
  389. package/dist/decorators/on-event.js +0 -3
  390. package/dist/decorators/on-updated.js +0 -3
  391. package/dist/decorators/prop.js +0 -3
  392. package/dist/decorators/prop.js.map +0 -17
  393. package/dist/decorators/query-slot.js +0 -3
  394. package/dist/decorators/query.js +0 -3
  395. package/dist/decorators/shared/reactive-attr.js +0 -3
  396. package/dist/decorators/shared/reactive-attr.js.map +0 -12
  397. package/dist/decorators/signal.js +0 -3
  398. package/dist/decorators/signal.js.map +0 -18
  399. package/dist/decorators/standard/attr.js +0 -3
  400. package/dist/decorators/standard/attr.js.map +0 -13
  401. package/dist/decorators/standard/bound.js +0 -3
  402. package/dist/decorators/standard/custom-element.js +0 -3
  403. package/dist/decorators/standard/debounce.js +0 -3
  404. package/dist/decorators/standard/event.js +0 -3
  405. package/dist/decorators/standard/on-event.js +0 -3
  406. package/dist/decorators/standard/on-updated.js +0 -3
  407. package/dist/decorators/standard/query-slot.js +0 -3
  408. package/dist/decorators/standard/query.js +0 -3
  409. package/dist/decorators/standard/reactive-field.js +0 -3
  410. package/dist/decorators/standard/reactive-field.js.map +0 -10
  411. package/dist/decorators/standard/reactive-prop.js +0 -3
  412. package/dist/decorators/standard/signal.js +0 -3
  413. package/dist/decorators/standard/signal.js.map +0 -15
  414. package/dist/decorators/state.js +0 -3
  415. package/dist/decorators/state.js.map +0 -14
  416. package/dist/helpers/create-event-listener.js +0 -3
  417. package/dist/helpers/create-event.js +0 -3
  418. package/dist/helpers/create-query-slot.js +0 -3
  419. package/dist/helpers/create-query.js +0 -3
  420. package/dist/helpers/debounce.js +0 -3
  421. package/dist/helpers/index.js +0 -3
  422. package/dist/index.js +0 -3
  423. package/dist/index.js.map +0 -83
  424. package/dist/package.json +0 -209
  425. package/dist/server/context-ssr.js +0 -3
  426. package/dist/server/host-attribute-serialization.js +0 -3
  427. package/dist/server/host-script-composition.js +0 -3
  428. package/dist/server/html-parser.js +0 -3
  429. package/dist/server/install-light-dom-shim.js +0 -3
  430. package/dist/server/install-light-dom-shim.js.map +0 -12
  431. package/dist/server/internal-radiant-host.js +0 -3
  432. package/dist/server/light-dom-shim.js +0 -3
  433. package/dist/server/light-dom-shim.js.map +0 -11
  434. package/dist/server/project-root.js +0 -3
  435. package/dist/server/radiant-element-ssr-bridge.js +0 -3
  436. package/dist/server/radiant-element-ssr-extractor.js +0 -3
  437. package/dist/server/radiant-element-ssr-service.js +0 -3
  438. package/dist/server/radiant-element-ssr.js +0 -3
  439. package/dist/server/render-component.js +0 -3
  440. package/dist/server/render-component.js.map +0 -28
  441. package/dist/server/render-controller.js +0 -3
  442. package/dist/server/render-controller.js.map +0 -31
  443. package/dist/server/render-fragment.js +0 -3
  444. package/dist/server/render-fragment.js.map +0 -10
  445. package/dist/server/slot-projection-html.js +0 -3
  446. package/dist/signals/host-resource.js +0 -3
  447. package/dist/signals/host-signal.js +0 -3
  448. package/dist/signals/host-signal.js.map +0 -13
  449. package/dist/signals/hydration-script.js +0 -3
  450. package/dist/tools/escape-css-identifier.js +0 -3
  451. package/dist/tools/escape-script-json.js +0 -3
  452. package/dist/tools/event-emitter.js +0 -3
  453. package/dist/tools/index.js +0 -3
  454. package/dist/tools/render-jsx-template.js +0 -3
  455. package/dist/types.js +0 -3
  456. package/dist/utils/attribute-utils.js +0 -3
  457. package/dist/utils/escape-html-attribute.js +0 -3
  458. package/dist/utils/index.js +0 -3
  459. /package/{dist/client → client}/app-bootstrap.d.ts +0 -0
  460. /package/{dist/client → client}/hydrator.d.ts +0 -0
  461. /package/{dist/client → client}/install-hydrator.d.ts +0 -0
  462. /package/{dist/context → context}/context-consumer-bootstrap.d.ts +0 -0
  463. /package/{dist/context → context}/context-consumer-runtime.d.ts +0 -0
  464. /package/{dist/context → context}/context-host.d.ts +0 -0
  465. /package/{dist/context → context}/context-provider.d.ts +0 -0
  466. /package/{dist/context → context}/context-ssr-bridge.d.ts +0 -0
  467. /package/{dist/context → context}/create-context.d.ts +0 -0
  468. /package/{dist/context → context}/decorators/consume-context.d.ts +0 -0
  469. /package/{dist/context → context}/decorators/context-selection-delivery.d.ts +0 -0
  470. /package/{dist/context → context}/decorators/context-selector.d.ts +0 -0
  471. /package/{dist/context → context}/decorators/legacy/consume-context.d.ts +0 -0
  472. /package/{dist/context → context}/decorators/legacy/context-selector-field.d.ts +0 -0
  473. /package/{dist/context → context}/decorators/legacy/context-selector.d.ts +0 -0
  474. /package/{dist/context → context}/decorators/legacy/provide-context.d.ts +0 -0
  475. /package/{dist/context → context}/decorators/on-context-update.d.ts +0 -0
  476. /package/{dist/context → context}/decorators/provide-context.d.ts +0 -0
  477. /package/{dist/context → context}/decorators/standard/consume-context.d.ts +0 -0
  478. /package/{dist/context → context}/decorators/standard/context-selector-field.d.ts +0 -0
  479. /package/{dist/context → context}/decorators/standard/context-selector.d.ts +0 -0
  480. /package/{dist/context → context}/decorators/standard/provide-context.d.ts +0 -0
  481. /package/{dist/context → context}/decorators/standard-legacy-dispatch.d.ts +0 -0
  482. /package/{dist/context → context}/events.d.ts +0 -0
  483. /package/{dist/context → context}/hydration-script.d.ts +0 -0
  484. /package/{dist/context → context}/index.d.ts +0 -0
  485. /package/{dist/context → context}/types.d.ts +0 -0
  486. /package/{dist/context → context}/types.js +0 -0
  487. /package/{dist/context → context}/types.js.map +0 -0
  488. /package/{dist/controller-registry.d.ts → controller-registry.d.ts} +0 -0
  489. /package/{dist/core → core}/controller-metadata.d.ts +0 -0
  490. /package/{dist/core → core}/custom-element-metadata.d.ts +0 -0
  491. /package/{dist/core → core}/event-subscription-registry.d.ts +0 -0
  492. /package/{dist/core → core}/host-ssr-registry.d.ts +0 -0
  493. /package/{dist/core → core}/hydration-capable-host.d.ts +0 -0
  494. /package/{dist/core → core}/hydration-codec.d.ts +0 -0
  495. /package/{dist/core → core}/radiant-element-ssr-host.d.ts +0 -0
  496. /package/{dist/core → core}/radiant-hydrator-state.d.ts +0 -0
  497. /package/{dist/core → core}/reactive-prop-metadata.d.ts +0 -0
  498. /package/{dist/core → core}/reactivity-adapter.d.ts +0 -0
  499. /package/{dist/core → core}/reactivity-contract.js +0 -0
  500. /package/{dist/core → core}/reactivity-contract.js.map +0 -0
  501. /package/{dist/core → core}/reactivity-runtime.d.ts +0 -0
  502. /package/{dist/core → core}/reactivity-signals.d.ts +0 -0
  503. /package/{dist/core → core}/render-runtime.d.ts +0 -0
  504. /package/{dist/core → core}/render-scheduler.d.ts +0 -0
  505. /package/{dist/core → core}/slot-projection-runtime.d.ts +0 -0
  506. /package/{dist/core → core}/ssr-hydration-binding.d.ts +0 -0
  507. /package/{dist/core → core}/ssr-hydration-binding.js +0 -0
  508. /package/{dist/core → core}/ssr-hydration-binding.js.map +0 -0
  509. /package/{dist/core → core}/ssr-preparation.d.ts +0 -0
  510. /package/{dist/decorators → decorators}/attr.d.ts +0 -0
  511. /package/{dist/decorators → decorators}/bound.d.ts +0 -0
  512. /package/{dist/decorators → decorators}/bridge.d.ts +0 -0
  513. /package/{dist/decorators → decorators}/controller.d.ts +0 -0
  514. /package/{dist/decorators → decorators}/custom-element.d.ts +0 -0
  515. /package/{dist/decorators → decorators}/debounce.d.ts +0 -0
  516. /package/{dist/decorators → decorators}/event.d.ts +0 -0
  517. /package/{dist/decorators → decorators}/legacy/attr.d.ts +0 -0
  518. /package/{dist/decorators → decorators}/legacy/bound.d.ts +0 -0
  519. /package/{dist/decorators → decorators}/legacy/custom-element.d.ts +0 -0
  520. /package/{dist/decorators → decorators}/legacy/debounce.d.ts +0 -0
  521. /package/{dist/decorators → decorators}/legacy/event.d.ts +0 -0
  522. /package/{dist/decorators → decorators}/legacy/host-readiness.d.ts +0 -0
  523. /package/{dist/decorators → decorators}/legacy/on-event.d.ts +0 -0
  524. /package/{dist/decorators → decorators}/legacy/on-updated.d.ts +0 -0
  525. /package/{dist/decorators → decorators}/legacy/query-slot.d.ts +0 -0
  526. /package/{dist/decorators → decorators}/legacy/query.d.ts +0 -0
  527. /package/{dist/decorators → decorators}/legacy/reactive-field.d.ts +0 -0
  528. /package/{dist/decorators → decorators}/legacy/signal.d.ts +0 -0
  529. /package/{dist/decorators → decorators}/on-event.d.ts +0 -0
  530. /package/{dist/decorators → decorators}/on-updated.d.ts +0 -0
  531. /package/{dist/decorators → decorators}/query-slot.d.ts +0 -0
  532. /package/{dist/decorators → decorators}/query.d.ts +0 -0
  533. /package/{dist/decorators → decorators}/shared/reactive-attr.d.ts +0 -0
  534. /package/{dist/decorators → decorators}/signal.d.ts +0 -0
  535. /package/{dist/decorators → decorators}/standard/attr.d.ts +0 -0
  536. /package/{dist/decorators → decorators}/standard/bound.d.ts +0 -0
  537. /package/{dist/decorators → decorators}/standard/custom-element.d.ts +0 -0
  538. /package/{dist/decorators → decorators}/standard/debounce.d.ts +0 -0
  539. /package/{dist/decorators → decorators}/standard/event.d.ts +0 -0
  540. /package/{dist/decorators → decorators}/standard/on-event.d.ts +0 -0
  541. /package/{dist/decorators → decorators}/standard/on-updated.d.ts +0 -0
  542. /package/{dist/decorators → decorators}/standard/query-slot.d.ts +0 -0
  543. /package/{dist/decorators → decorators}/standard/query.d.ts +0 -0
  544. /package/{dist/decorators → decorators}/standard/reactive-field.d.ts +0 -0
  545. /package/{dist/decorators → decorators}/standard/reactive-prop.d.ts +0 -0
  546. /package/{dist/decorators → decorators}/standard/signal.d.ts +0 -0
  547. /package/{dist/helpers → helpers}/create-event-listener.d.ts +0 -0
  548. /package/{dist/helpers → helpers}/create-event.d.ts +0 -0
  549. /package/{dist/helpers → helpers}/create-query-slot.d.ts +0 -0
  550. /package/{dist/helpers → helpers}/create-query.d.ts +0 -0
  551. /package/{dist/helpers → helpers}/debounce.d.ts +0 -0
  552. /package/{dist/helpers → helpers}/index.d.ts +0 -0
  553. /package/{dist/index.d.ts → index.d.ts} +0 -0
  554. /package/{dist/server → server}/context-ssr.d.ts +0 -0
  555. /package/{dist/server → server}/host-attribute-serialization.d.ts +0 -0
  556. /package/{dist/server → server}/host-script-composition.d.ts +0 -0
  557. /package/{dist/server → server}/html-parser.d.ts +0 -0
  558. /package/{dist/server → server}/install-light-dom-shim.d.ts +0 -0
  559. /package/{dist/server → server}/internal-radiant-host.d.ts +0 -0
  560. /package/{dist/server → server}/project-root.d.ts +0 -0
  561. /package/{dist/server → server}/radiant-element-ssr-bridge.d.ts +0 -0
  562. /package/{dist/server → server}/radiant-element-ssr-extractor.d.ts +0 -0
  563. /package/{dist/server → server}/radiant-element-ssr-service.d.ts +0 -0
  564. /package/{dist/server → server}/radiant-element-ssr.d.ts +0 -0
  565. /package/{dist/server → server}/render-controller.d.ts +0 -0
  566. /package/{dist/server → server}/render-fragment.d.ts +0 -0
  567. /package/{dist/server → server}/slot-projection-html.d.ts +0 -0
  568. /package/{dist/signals → signals}/host-resource.d.ts +0 -0
  569. /package/{dist/signals → signals}/hydration-script.d.ts +0 -0
  570. /package/{dist/tools → tools}/escape-css-identifier.d.ts +0 -0
  571. /package/{dist/tools → tools}/escape-script-json.d.ts +0 -0
  572. /package/{dist/tools → tools}/event-emitter.d.ts +0 -0
  573. /package/{dist/tools → tools}/index.d.ts +0 -0
  574. /package/{dist/tools → tools}/render-jsx-template.d.ts +0 -0
  575. /package/{dist/types.d.ts → types.d.ts} +0 -0
  576. /package/{dist/utils → utils}/attribute-utils.d.ts +0 -0
  577. /package/{dist/utils → utils}/escape-html-attribute.d.ts +0 -0
  578. /package/{dist/utils → utils}/index.d.ts +0 -0
@@ -1,3 +0,0 @@
1
- var V=((n)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(n,{get:(c,b)=>(typeof require<"u"?require:c)[b]}):n)(function(n){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+n+'" is not supported')});var x=Symbol.for("@ecopages/radiant.legacy-instance-initializers"),L=Symbol.for("@ecopages/radiant.legacy-post-construction-initializers"),Z=Symbol.for("@ecopages/radiant.legacy-executed-post-construction-initializers");function E(n,c){P(n,x,c)}function N(n,c){P(n,L,c)}function u(n){k(n,x)}function z(n){let c=n;k(n,L,c[Z]??=new Set)}function P(n,c,b){let A=n,r=Object.prototype.hasOwnProperty.call(A,c)?A[c]:void 0;if(Array.isArray(r)){r.push(b);return}Object.defineProperty(A,c,{value:[b]})}function k(n,c,b,A=Object.getPrototypeOf(n)){if(!A||A===Object.prototype)return;k(n,c,b,Object.getPrototypeOf(A));let r=A[c];if(!Array.isArray(r))return;for(let R of r){if(b?.has(R))continue;R(n),b?.add(R)}}function F(n){switch(n){case Array:return"array";case Boolean:return"boolean";case Number:return"number";case Object:return"object";case String:return"string"}}function G(n){switch(typeof n){case"boolean":return"boolean";case"number":return"number";case"string":return"string"}if(Array.isArray(n))return"array";if(Object.prototype.toString.call(n)==="[object Object]")return"object"}function M(n){switch(n){case Number:return 0;case String:return"";case Boolean:return!1;default:return null}}function Y(n){try{return JSON.parse(n)}catch{throw TypeError("Invalid JSON string")}}var J={array(n){let c=Y(n);if(!Array.isArray(c))throw TypeError(`Expected an array but got a value of type "${typeof c}"`);return c},boolean(n){return!(n==="0"||String(n).toLowerCase()==="false")},number(n){return Number(n.replace(/_/g,""))},object(n){let c=JSON.parse(n);if(c===null||typeof c!=="object"||Array.isArray(c))throw TypeError(`expected value of type "object" but instead got value "${n}" of type "${G(c)}"`);return c},string(n){return n}},j={default:q,array:D,object:D};function D(n){return JSON.stringify(n)}function q(n){return`${n}`}function f(n,c){let b=F(c);if(!b)throw TypeError(`[radiant-element] Unknown type "${c}"`);return J[b](n)}function B(n,c){let b=F(c);if(!b)throw TypeError(`[radiant-element] Unknown type "${c}"`);return(j[b]??j.default??q)(n)}function K(n){return typeof n==="boolean"}function _(n){return typeof n==="number"}function S(n){return typeof n==="string"}function w(n){return Array.isArray(n)}function o(n){return typeof n==="object"&&!Array.isArray(n)&&n!==null}function Q(n,c){switch(n){case Boolean:return K(c);case Number:return _(c);case String:return S(c);case Array:return w(c);case Object:return o(c);default:return!1}}var l=(n,c,b,A)=>{if(c===Boolean){let R=n.getAttribute(b);if(R===null)return A;return R===""?!0:f(R,c)}let r=n.getAttribute(b);return r!==null?f(r,c):A??M(c)};function U(n,c){if(c!==void 0&&!Q(n,c))throw Error(`defaultValue does not match the expected type for ${n.name}`)}function nn(n,c,b,A){return{type:b,name:n,value:A,initialValue:A,attribute:c,converter:{fromAttribute:(r)=>f(r,b),toAttribute:(r)=>B(r,b)}}}function O(n){if(n instanceof Element)return n;if("host"in n)return n.host;return n.element}function i(n){return n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/_/g,"-").toLowerCase()}function e(n,c){if(c.converter?.fromAttribute){let b=c.converter.fromAttribute(n);if(n===null&&b===void 0&&"defaultValue"in c)return c.defaultValue;return b}if(c.type){if(n===null)return c.defaultValue??M(c.type);if(c.type===Boolean&&n==="")return!0;return f(n,c.type)}if(n===null)return c.defaultValue;return n}function t(n,c,b){return e(O(n).getAttribute(c),b)}function h(n,c,b,A){let r=A.converter?.toAttribute?A.converter.toAttribute(b):A.type?B(b,A.type):b==null?null:String(b);if(r===null){n.removeAttribute(c);return}n.setAttribute(c,r)}function X(n,c,b={}){if(b.type)U(b.type,b.defaultValue);let A=n,r=b.source??i(c),R=Symbol(`@ecopages/radiant/attr:${c}:observer`),d=Symbol(`@ecopages/radiant/attr:${c}:last-value`),W=b.bind??n.shouldAutoBindReactiveMembers?.()??!1;n.defineReactiveBinding(c,W),n.registerReactiveDependencyReader(c,()=>t(n,r,b)),A[d]=t(n,r,b),Object.defineProperty(n,c,{get(){return n.trackReactiveRead(c),t(this,r,b)},set(s){let v=O(this),H=t(this,r,b);h(v,r,s,b);let g=t(this,r,b);if(Object.is(H,g))return;this[d]=g,n.notifyUpdate(c,H,g)},enumerable:!0,configurable:!0});let m=()=>{A[R]?.disconnect()},C=()=>{let s=t(n,r,b),v=A[d];if(!Object.is(v,s))A[d]=s,n.notifyUpdate(c,v,s);if(typeof MutationObserver>"u")return;let H=O(n);m();let g=new MutationObserver(()=>{let T=t(n,r,b),$=A[d];if(Object.is($,T))return;A[d]=T,n.notifyUpdate(c,$,T)});g.observe(H,{attributeFilter:[r],attributes:!0}),A[R]=g};C(),n.registerConnectedCallback(C),n.registerCleanupCallback(m)}function tn(n={}){return(c,b)=>{let A=Symbol(`@ecopages/radiant/attr:${b}:installed`);E(c,(r)=>{r.registerConnectedCallback(()=>{if(r[A])return;let R=r[b],d=n.defaultValue===void 0?R:n.defaultValue;X(r,b,{...n,defaultValue:d}),r[A]=!0})})}}export{tn as reactiveAttr};
2
-
3
- //# debugId=E3A9274EE7EA0F7664756E2164756E21
@@ -1,14 +0,0 @@
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\t/** When true, skip the initial notifyUpdate emitted while defining the field. */\n\tsuppressInitialNotify?: boolean;\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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,EAAuB,CAAI,EAE1C,EAAmB,EAEnB,IAAM,EAAW,IAAI,iBAAiB,IAAM,CAC3C,IAAM,EAAe,EAA2B,EAAM,EAAe,CAAO,EACtE,EAAY,EAAW,GAE7B,GAAI,OAAO,GAAG,EAAW,CAAY,EACpC,OAGD,EAAW,GAAgB,EAC3B,EAAK,aAAa,EAAc,EAAW,CAAY,EACvD,EAED,EAAS,QAAQ,EAAQ,CACxB,gBAAiB,CAAC,CAAa,EAC/B,WAAY,EACb,CAAC,EAED,EAAW,GAAe,GAG3B,EAAe,EACf,EAAK,0BAA0B,CAAc,EAC7C,EAAK,wBAAwB,CAAkB,ECpMzC,SAAS,EAAyC,CAAC,EAA+B,CAAC,EAAG,CAC5F,MAAO,CAAC,EAAmC,IAAyB,CACnE,IAAM,EAAe,OAAO,0BAA0B,aAAwB,EAE9E,EAAkC,EAAQ,CAAC,IAAS,CAClD,EAAmC,0BAA0B,IAAM,CACnE,GAAK,EAAiD,GACrD,OAGD,IAAM,EAAoB,EAA4D,GAChF,EAAgB,EAAQ,eAAiB,OAAY,EAAmB,EAAQ,aAItF,EAAyB,EAAmC,EAAc,IACtE,EACH,cACD,CAAC,EAEA,EAAiD,GAAgB,GAClE,EACD",
12
- "debugId": "E3A9274EE7EA0F7664756E2164756E21",
13
- "names": []
14
- }
@@ -1,3 +0,0 @@
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
@@ -1,3 +0,0 @@
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
@@ -1,3 +0,0 @@
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
@@ -1,3 +0,0 @@
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
@@ -1,13 +0,0 @@
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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Y,GACZ,aAAc,EACf,CAAC,EACD,EACD",
11
- "debugId": "1AB8EE13696F1F2F64756E2164756E21",
12
- "names": []
13
- }
@@ -1,3 +0,0 @@
1
- var Q=((b)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(b,{get:(f,j)=>(typeof require<"u"?require:f)[j]}):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 W(b,f){K(b,D,f)}function X(b,f){K(b,F,f)}function H(b){B(b,D)}function J(b){let f=b;B(b,F,f[M]??=new Set)}function K(b,f,j){let m=b,q=Object.prototype.hasOwnProperty.call(m,f)?m[f]:void 0;if(Array.isArray(q)){q.push(j);return}Object.defineProperty(m,f,{value:[j]})}function B(b,f,j,m=Object.getPrototypeOf(b)){if(!m||m===Object.prototype)return;B(b,f,j,Object.getPrototypeOf(m));let q=m[f];if(!Array.isArray(q))return;for(let v of q){if(j?.has(v))continue;v(b),j?.add(v)}}function G(b,f){switch(f){case"construct":H(b);break;case"connect":case"ssr":J(b);break}}export{G as ensureLegacyHostReady};
2
-
3
- //# debugId=2B24C82066F9CD4764756E2164756E21
@@ -1,11 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../src/decorators/legacy/instance-initializers.ts", "../src/decorators/legacy/host-readiness.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 {\n\trunLegacyInstanceInitializers,\n\trunLegacyPostConstructionInitializers,\n} from './instance-initializers';\n\nexport type LegacyHostReadinessPhase = 'construct' | 'connect' | 'ssr';\n\n/**\n * Runs legacy decorator initialization for the requested lifecycle phase.\n *\n * Post-construction work is idempotent — multiple calls with `connect` or `ssr`\n * only execute each registered initializer once per instance.\n */\nexport function ensureLegacyHostReady<T extends object>(host: T, phase: LegacyHostReadinessPhase): void {\n\tswitch (phase) {\n\t\tcase 'construct':\n\t\t\trunLegacyInstanceInitializers(host);\n\t\t\tbreak;\n\t\tcase 'connect':\n\t\tcase 'ssr':\n\t\t\trunLegacyPostConstructionInitializers(host);\n\t\t\tbreak;\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,GCvFhC,SAAS,CAAuC,CAAC,EAAS,EAAuC,CACvG,OAAQ,OACF,YACJ,EAA8B,CAAI,EAClC,UACI,cACA,MACJ,EAAsC,CAAI,EAC1C",
9
- "debugId": "2B24C82066F9CD4764756E2164756E21",
10
- "names": []
11
- }
@@ -1,3 +0,0 @@
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
@@ -1,10 +0,0 @@
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,3 +0,0 @@
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
@@ -1,3 +0,0 @@
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
@@ -1,11 +0,0 @@
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: () => void): () => 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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AQ,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
- }
@@ -1,3 +0,0 @@
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
@@ -1,13 +0,0 @@
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,CAA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D,EACD,EAAQ,0BAA0B,IAAM,CACvC,EAAwB,CAAwB,EAChD,EACD",
11
- "debugId": "2A64593EAE8DD82064756E2164756E21",
12
- "names": []
13
- }
@@ -1,3 +0,0 @@
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
@@ -1,12 +0,0 @@
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,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,EAC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C,EAA+B,IAAiC,CACvE,EAAkC,EAAO,CAAC,IAAY,CACrD,EAAQ,0BAA0B,IAAM,CACvC,IAAM,EAAW,EAAe,EAAS,CACxC,MAAO,KACJ,CACJ,CAAC,EAED,OAAO,eAAe,EAAS,EAAa,CAC3C,GAAG,EAAG,CACL,OAAO,EAAS,OAEjB,WAAY,GACZ,aAAc,EACf,CAAC,EACD,EACD",
10
- "debugId": "F249EF35C53C01C064756E2164756E21",
11
- "names": []
12
- }
@@ -1,3 +0,0 @@
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
@@ -1,11 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../src/decorators/legacy/instance-initializers.ts", "../src/decorators/legacy/reactive-field.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 { ReactiveHostLike } from '../../core/reactive-host';\nimport { registerLegacyInstanceInitializer } from './instance-initializers';\n\n/**\n * A decorator to define a reactive field.\n * Every time the property changes, the `updated` method will be called.\n * Due the fact the value is always undefined before the first update,\n * we are adding a `isDefined` WeakSet to track if the property has been defined.\n * @param target The target element.\n * @param propertyKey The property key.\n */\nexport function reactiveField(target: ReactiveHostLike, propertyKey: string) {\n\tregisterLegacyInstanceInitializer(target, (element) => {\n\t\telement.registerConnectedCallback(() => {\n\t\t\telement.createReactiveField(propertyKey, element[propertyKey as keyof typeof element], {\n\t\t\t\tbind:\n\t\t\t\t\t(\n\t\t\t\t\t\telement as unknown as { shouldAutoBindReactiveMembers?: () => boolean }\n\t\t\t\t\t).shouldAutoB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C,CACtF,KAEE,EACC,gCAAgC,GAAK,EACzC,CAAC,EACD,EACD",
9
- "debugId": "5CCB81985718E4AD64756E2164756E21",
10
- "names": []
11
- }
@@ -1,3 +0,0 @@
1
- var s=((P)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(P,{get:(R,D)=>(typeof require<"u"?require:R)[D]}):P)(function(P){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+P+'" is not supported')});var Q=Symbol.for("@ecopages/radiant.reactivePropDefinitions");function C(P,R,D){let E=P.constructor,W=E[Q]??[];if(W.some((F)=>F.name===R))return;W.push({name:R,options:D}),E[Q]=W}function b(P){return(P.constructor[Q]??[]).slice()}var G=Symbol.for("@ecopages/radiant.legacy-instance-initializers"),Y=Symbol.for("@ecopages/radiant.legacy-post-construction-initializers"),k=Symbol.for("@ecopages/radiant.legacy-executed-post-construction-initializers");function Z(P,R){_(P,G,R)}function f(P,R){_(P,Y,R)}function n(P){X(P,G)}function V(P){let R=P;X(P,Y,R[k]??=new Set)}function _(P,R,D){let E=P,W=Object.prototype.hasOwnProperty.call(E,R)?E[R]:void 0;if(Array.isArray(W)){W.push(D);return}Object.defineProperty(E,R,{value:[D]})}function X(P,R,D,E=Object.getPrototypeOf(P)){if(!E||E===Object.prototype)return;X(P,R,D,Object.getPrototypeOf(E));let W=E[R];if(!Array.isArray(W))return;for(let F of W){if(D?.has(F))continue;F(P),D?.add(F)}}function x(P){switch(P){case Array:return"array";case Boolean:return"boolean";case Number:return"number";case Object:return"object";case String:return"string"}}function w(P){switch(typeof P){case"boolean":return"boolean";case"number":return"number";case"string":return"string"}if(Array.isArray(P))return"array";if(Object.prototype.toString.call(P)==="[object Object]")return"object"}function A(P){switch(P){case Number:return 0;case String:return"";case Boolean:return!1;default:return null}}function K(P){try{return JSON.parse(P)}catch{throw TypeError("Invalid JSON string")}}var S={array(P){let R=K(P);if(!Array.isArray(R))throw TypeError(`Expected an array but got a value of type "${typeof R}"`);return R},boolean(P){return!(P==="0"||String(P).toLowerCase()==="false")},number(P){return Number(P.replace(/_/g,""))},object(P){let R=JSON.parse(P);if(R===null||typeof R!=="object"||Array.isArray(R))throw TypeError(`expected value of type "object" but instead got value "${P}" of type "${w(R)}"`);return R},string(P){return P}},h={default:J,array:o,object:o};function o(P){return JSON.stringify(P)}function J(P){return`${P}`}function M(P,R){let D=x(R);if(!D)throw TypeError(`[radiant-element] Unknown type "${R}"`);return S[D](P)}function U(P,R){let D=x(R);if(!D)throw TypeError(`[radiant-element] Unknown type "${R}"`);return(h[D]??h.default??J)(P)}function T(P){return typeof P==="boolean"}function m(P){return typeof P==="number"}function I(P){return typeof P==="string"}function g(P){return Array.isArray(P)}function N(P){return typeof P==="object"&&!Array.isArray(P)&&P!==null}function j(P,R){switch(P){case Boolean:return T(R);case Number:return m(R);case String:return I(R);case Array:return g(R);case Object:return N(R);default:return!1}}var p=(P,R,D,E)=>{if(R===Boolean){let F=P.getAttribute(D);if(F===null)return E;return F===""?!0:M(F,R)}let W=P.getAttribute(D);return W!==null?M(W,R):E??A(R)};function O(P,R){if(R!==void 0&&!j(P,R))throw Error(`defaultValue does not match the expected type for ${P.name}`)}function i(P,R,D,E){return{type:D,name:P,value:E,initialValue:E,attribute:R,converter:{fromAttribute:(W)=>M(W,D),toAttribute:(W)=>U(W,D)}}}function e({type:P,attribute:R,reflect:D,defaultValue:E,bind:W}){return O(P,E),(F,q)=>{let $=R??q;C(F,q,{type:P,reflect:D,attribute:$,defaultValue:E,bind:W});let B=Symbol.for(`@ecopages/radiant.ssr-prop:${q}`);Object.defineProperty(F,q,{get(){return this[B]??E},set(H){this[B]=H},configurable:!0,enumerable:!0}),Z(F,(H)=>{H.registerConnectedCallback(()=>{let c=H[q],L=E===void 0?c:E;H.createReactiveProp(q,{type:P,reflect:D,attribute:$,defaultValue:L,bind:W})})})}}export{e as reactiveProp};
2
-
3
- //# debugId=EEB4E1C1AA4A2DAA64756E2164756E21
@@ -1,14 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../src/core/reactive-prop-metadata.ts", "../src/decorators/legacy/instance-initializers.ts", "../src/utils/attribute-utils.ts", "../src/core/reactive-prop-core.ts", "../src/decorators/legacy/reactive-prop.ts"],
4
- "sourcesContent": [
5
- "import type { ReactivePropertyOptions } from './reactive-prop-core';\n\nconst REACTIVE_PROP_DEFINITIONS = Symbol.for('@ecopages/radiant.reactivePropDefinitions');\n\nexport type ReactivePropDefinition = {\n\tname: string;\n\toptions: ReactivePropertyOptions<unknown>;\n};\n\ntype RadiantConstructorWithReactiveProps = CustomElementConstructor & {\n\t[REACTIVE_PROP_DEFINITIONS]?: ReactivePropDefinition[];\n};\n\nexport function registerReactivePropDefinition(\n\ttarget: object,\n\tpropertyName: string,\n\toptions: ReactivePropertyOptions<unknown>,\n): void {\n\tconst constructor = target.constructor as RadiantConstructorWithReactiveProps;\n\tconst definitions = constructor[REACTIVE_PROP_DEFINITIONS] ?? [];\n\n\tif (definitions.some((definition) => definition.name === propertyName)) {\n\t\treturn;\n\t}\n\n\tdefinitions.push({ name: propertyName, options });\n\tconstructor[REACTIVE_PROP_DEFINITIONS] = definitions;\n}\n\nexport function getReactivePropDefinitions(target: object): ReactivePropDefinition[] {\n\treturn ((target.constructor as RadiantConstructorWithReactiveProps)[REACTIVE_PROP_DEFINITIONS] ?? []).slice();\n}\n",
6
- "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",
7
- "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",
8
- "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\t/** When true, skip the initial notifyUpdate emitted while defining the field. */\n\tsuppressInitialNotify?: boolean;\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",
9
- "import { type ReactivePropertyOptions, validateReactivePropertyDefault } from '../../core/reactive-prop-core';\nimport { registerReactivePropDefinition } from '../../core/reactive-prop-metadata';\nimport { registerLegacyInstanceInitializer } from './instance-initializers';\n\ntype ReactivePropHost<T> = {\n\tcreateReactiveProp(propertyName: string, options: ReactivePropertyOptions<T>): void;\n\tregisterConnectedCallback(callback: () => void): void;\n};\n\n/**\n * Legacy-decorator implementation for `@prop(...)`.\n *\n * The decorated host is expected to expose `createReactiveProp(...)`, which\n * lets both `RadiantElement` and `RadiantController` share the same public\n * decorator while keeping their runtime channels different.\n */\nexport function reactiveProp<T = unknown>({\n\ttype,\n\tattribute,\n\treflect,\n\tdefaultValue,\n\tbind,\n}: ReactivePropertyOptions<T>) {\n\tvalidateReactivePropertyDefault(type, defaultValue);\n\n\treturn (target: ReactivePropHost<T>, propertyName: string) => {\n\t\tconst attributeKey = attribute ?? propertyName;\n\t\tregisterReactivePropDefinition(target, propertyName, {\n\t\t\ttype,\n\t\t\treflect,\n\t\t\tattribute: attributeKey,\n\t\t\tdefaultValue,\n\t\t\tbind,\n\t\t});\n\n\t\tconst ssrStoreKey = Symbol.for(`@ecopages/radiant.ssr-prop:${propertyName}`);\n\n\t\tObject.defineProperty(target, propertyName, {\n\t\t\tget(this: ReactivePropHost<T> & Record<PropertyKey, unknown>) {\n\t\t\t\treturn this[ssrStoreKey] ?? defaultValue;\n\t\t\t},\n\t\t\tset(this: ReactivePropHost<T> & Record<PropertyKey, unknown>, value: T) {\n\t\t\t\tthis[ssrStoreKey] = value;\n\t\t\t},\n\t\t\tconfigurable: true,\n\t\t\tenumerable: true,\n\t\t});\n\n\t\tregisterLegacyInstanceInitializer(target, (element) => {\n\t\t\telement.registerConnectedCallback(() => {\n\t\t\t\tconst initializerValue = element[propertyName as keyof typeof element] as T | undefined;\n\t\t\t\tconst resolvedDefaultValue = defaultValue === undefined ? initializerValue : defaultValue;\n\n\t\t\t\telement.createReactiveProp(propertyName, {\n\t\t\t\t\ttype,\n\t\t\t\t\treflect,\n\t\t\t\t\tattribute: attributeKey,\n\t\t\t\t\tdefaultValue: resolvedDefaultValue,\n\t\t\t\t\tbind,\n\t\t\t\t});\n\t\t\t});\n\t\t});\n\t};\n}\n"
10
- ],
11
- "mappings": "2PAEA,IAAM,EAA4B,OAAO,IAAI,2CAA2C,EAWjF,SAAS,CAA8B,CAC7C,EACA,EACA,EACO,CACP,IAAM,EAAc,EAAO,YACrB,EAAc,EAAY,IAA8B,CAAC,EAE/D,GAAI,EAAY,KAAK,CAAC,IAAe,EAAW,OAAS,CAAY,EACpE,OAGD,EAAY,KAAK,CAAE,KAAM,EAAc,SAAQ,CAAC,EAChD,EAAY,GAA6B,EAGnC,SAAS,CAA0B,CAAC,EAA0C,CACpF,OAAS,EAAO,YAAoD,IAA8B,CAAC,GAAG,MAAM,E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AM,EACN,MAAO,EACP,eACA,UAAW,EACX,UAAW,CACV,cAAe,CAAC,IAAU,EAAmB,EAAO,CAAI,EACxD,YAAa,CAAC,IAAU,EAAoB,EAAO,CAAI,CACxD,CACD,ECnEM,SAAS,CAAyB,EACxC,OACA,YACA,UACA,eACA,QAC8B,CAG9B,OAFA,EAAgC,EAAM,CAAY,EAE3C,CAAC,EAA6B,IAAyB,CAC7D,IAAM,EAAe,GAAa,EAClC,EAA+B,EAAQ,EAAc,CACpD,OACA,UACA,UAAW,EACX,eACA,MACD,CAAC,EAED,IAAM,EAAc,OAAO,IAAI,8BAA8B,GAAc,EAE3E,OAAO,eAAe,EAAQ,EAAc,CAC3C,GAAG,EAA2D,CAC7D,OAAO,KAAK,IAAgB,GAE7B,GAAG,CAA2D,EAAU,CACvE,KAAK,GAAe,GAErB,aAAc,GACd,WAAY,EACb,CAAC,EAED,EAAkC,EAAQ,CAAC,IAAY,CACtD,EAAQ,0BAA0B,IAAM,CACvC,IAAM,EAAmB,EAAQ,GAC3B,EAAuB,IAAiB,OAAY,EAAmB,EAE7E,EAAQ,mBAAmB,EAAc,CACxC,OACA,UACA,UAAW,EACX,aAAc,EACd,MACD,CAAC,EACD,EACD",
12
- "debugId": "EEB4E1C1AA4A2DAA64756E2164756E21",
13
- "names": []
14
- }
@@ -1,3 +0,0 @@
1
- var v=((q)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(q,{get:(Q,X)=>(typeof require<"u"?require:Q)[X]}):q)(function(q){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+q+'" is not supported')});var f=Symbol.for("@ecopages/radiant.legacy-instance-initializers"),B=Symbol.for("@ecopages/radiant.legacy-post-construction-initializers"),z=Symbol.for("@ecopages/radiant.legacy-executed-post-construction-initializers");function V(q,Q){U(q,f,Q)}function D(q,Q){U(q,B,Q)}function T(q){M(q,f)}function h(q){let Q=q;M(q,B,Q[z]??=new Set)}function U(q,Q,X){let F=q,$=Object.prototype.hasOwnProperty.call(F,Q)?F[Q]:void 0;if(Array.isArray($)){$.push(X);return}Object.defineProperty(F,Q,{value:[X]})}function M(q,Q,X,F=Object.getPrototypeOf(q)){if(!F||F===Object.prototype)return;M(q,Q,X,Object.getPrototypeOf(F));let $=F[Q];if(!Array.isArray($))return;for(let j of $){if(X?.has(j))continue;j(q),X?.add(j)}}function C(q){return q.replace(/&/g,"\\u0026").replace(/</g,"\\u003c").replace(/>/g,"\\u003e").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}var P="data-hydration",L="data-hydration-type",w="data-hydration-key";function b(q){let Q=q.hydrationKey?` ${w}="${g(q.hydrationKey)}"`:"";return`<script type="application/json" ${P} ${L}="${q.type}"${Q}>${q.serializedValue}</script>`}function O(q){return C(q)}function Y(q,Q){let X=q.textContent;if(!X)return Q;try{return JSON.parse(X)}catch{if(typeof console<"u")console.warn(`[@ecopages/radiant] Failed to parse hydration payload from <script ${P}>:`,X.slice(0,120));return Q}}function E(q,Q,X){let F=q.children;if(!F||F.length===0){let $=q.childNodes;if(!$||$.length===0)return null;for(let j=0;j<$.length;j+=1){let J=$[j];if(J.nodeType!==1)continue;let Z=J;if(K(Z,Q,X))return Z}return null}for(let $=0;$<F.length;$+=1)if(K(F[$],Q,X))return F[$];return null}function K(q,Q,X){if(q.tagName!=="SCRIPT"||!q.hasAttribute(P)||q.getAttribute(L)!==Q)return!1;if(X!==void 0)return q.getAttribute(w)===X;return!q.hasAttribute(w)}function g(q){return q.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function _(q){return b({type:"signal",...q})}function x(q){return O(q)}import{createMarkupNodeLike as N}from"@ecopages/jsx";import{state as S}from"@ecopages/signals";function A(q){return typeof q==="object"&&q!==null&&typeof q.get==="function"&&typeof q.set==="function"&&typeof q.subscribe==="function"&&typeof q.update==="function"}class W{host;hydrate;hydrationKey;property;source;currentValue;hasAppliedHostHydration=!1;sourceUnsubscribe;constructor(q){this.host=q.host,this.hydrate=q.hydrate,this.hydrationKey=q.hydrationKey,this.property=q.property,this.source=q.source??S(this.resolveInitialValue(q.initialValue)),this.currentValue=this.source.get()}get(){return this.source.get()}set(q){this.source.set(q)}subscribe(q){return this.source.subscribe(q)}update(q){this.set(q(this.get()))}connectToSource(){if(this.sourceUnsubscribe)return;let q=this.source.get();if(!Object.is(this.currentValue,q)){let Q=this.currentValue;this.currentValue=q,this.host.notifyUpdate(this.property,Q,q)}this.sourceUnsubscribe=this.source.subscribe((Q)=>{this.handleSourceChange(Q)})}disconnectFromSource(){this.sourceUnsubscribe?.(),this.sourceUnsubscribe=void 0}hydrateFromHost(){if(!this.hydrate||this.hasAppliedHostHydration)return;this.hasAppliedHostHydration=!0;let q=this.source.get(),Q=this.resolveInitialValue(q);if(!Object.is(q,Q))this.source.set(Q),this.currentValue=this.source.get(),this.host.notifyUpdate(this.property,q,this.currentValue)}renderHydrationScript(){let q=this.renderHydrationScriptTag();if(!q)return;return N(q)}renderHydrationScriptTag(){let q=this.serializeHydrationValue();if(!q)return;return _({hydrationKey:this.hydrationKey,serializedValue:q})}findHydrationScriptElement(){if(!(this.host instanceof Element))return null;return E(this.host,"signal",this.hydrationKey)}isObject(q){return typeof q==="object"&&!Array.isArray(q)&&q!==null}resolveInitialValue(q){if(!this.hydrate)return q;let Q=this.findHydrationScriptElement();if(!Q)return q;let X=Y(Q,q);if(this.hydrate===Object&&this.isObject(X)&&this.isObject(q))return{...q,...X};return X}serializeHydrationValue(){if(!this.hydrate)return;let q=JSON.stringify(this.get());if(typeof q!=="string")return;return x(q)}handleSourceChange(q){let Q=this.currentValue;if(this.currentValue=q,!Object.is(Q,q))this.host.notifyUpdate(this.property,Q,q)}}function R(q){return new W(q)}function k(q){return typeof q.registerHydrationBinding==="function"}function q0(q={}){return(Q,X)=>{let F=($)=>{let j=$[X];if(j instanceof W)return j;let J=typeof q.source==="function"?q.source($):q.source??(A(j)?j:void 0),Z=q.bind??$.shouldAutoBindReactiveMembers?.()??!1,H=J!==void 0?q.initial:j===void 0?q.initial:j;$.defineReactiveBinding(X,Z);let G=R({host:$,hydrate:q.hydrate,hydrationKey:X,initialValue:H,property:X,source:J});if($.registerConnectedCallback(()=>{G.hydrateFromHost(),G.connectToSource()}),$.registerCleanupCallback(()=>{G.disconnectFromSource()}),q.hydrate&&k($))$.registerHydrationBinding(X,G);return $[X]=G,G};D(Q,($)=>{let j=F($);$.registerConnectedCallback(()=>{if(!($[X]instanceof W))$[X]=j})})}}export{q0 as signal};
2
-
3
- //# debugId=1CC0F5D89ED31A0464756E2164756E21
@@ -1,16 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../src/decorators/legacy/instance-initializers.ts", "../src/tools/escape-script-json.ts", "../src/core/hydration-codec.ts", "../src/signals/hydration-script.ts", "../src/signals/host-signal.ts", "../src/core/hydration-capable-host.ts", "../src/decorators/legacy/signal.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
- "/**\n * Escapes serialized JSON so it remains safe when embedded inside an HTML\n * `<script>` tag.\n */\nexport function escapeScriptJson(value: string): string {\n\treturn value\n\t\t.replace(/&/g, '\\\\u0026')\n\t\t.replace(/</g, '\\\\u003c')\n\t\t.replace(/>/g, '\\\\u003e')\n\t\t.replace(/\\u2028/g, '\\\\u2028')\n\t\t.replace(/\\u2029/g, '\\\\u2029');\n}\n",
7
- "import { escapeScriptJson } from '../tools/escape-script-json';\n\n/** Attribute marker used to identify hydration payloads inside a host. */\nexport const HYDRATION_ATTRIBUTE = 'data-hydration';\n/** Discriminator that scopes a hydration payload to a specific feature. */\nexport const HYDRATION_TYPE_ATTRIBUTE = 'data-hydration-type';\n/** Optional key that scopes a hydration payload to a specific decorated field. */\nexport const HYDRATION_KEY_ATTRIBUTE = 'data-hydration-key';\n\nexport type HydrationPayloadType = 'signal' | 'context';\n\ntype HydrationScriptHost = {\n\tchildren?: ArrayLike<Element> | undefined;\n\tchildNodes?: ArrayLike<{ nodeType: number }> | undefined;\n};\n\n/** Creates a `<script type=\"application/json\">` tag for a hydration payload. */\nexport function createHydrationScriptTag(options: {\n\ttype: HydrationPayloadType;\n\thydrationKey?: string;\n\tserializedValue: string;\n}): string {\n\tconst keyAttribute = options.hydrationKey\n\t\t? ` ${HYDRATION_KEY_ATTRIBUTE}=\"${escapeHtmlAttribute(options.hydrationKey)}\"`\n\t\t: '';\n\n\treturn `<script type=\"application/json\" ${HYDRATION_ATTRIBUTE} ${HYDRATION_TYPE_ATTRIBUTE}=\"${options.type}\"${keyAttribute}>${options.serializedValue}</script>`;\n}\n\n/** Escapes serialized JSON so it remains safe inside an HTML script tag. */\nexport function escapeHydrationJson(value: string): string {\n\treturn escapeScriptJson(value);\n}\n\n/** Parses JSON from a hydration script element, returning the fallback on failure. */\nexport function parseHydrationPayload<T>(element: Element, fallback: T): T {\n\tconst textContent = element.textContent;\n\n\tif (!textContent) {\n\t\treturn fallback;\n\t}\n\n\ttry {\n\t\treturn JSON.parse(textContent) as T;\n\t} catch {\n\t\tif (typeof console !== 'undefined') {\n\t\t\tconsole.warn(\n\t\t\t\t`[@ecopages/radiant] Failed to parse hydration payload from <script ${HYDRATION_ATTRIBUTE}>:`,\n\t\t\t\ttextContent.slice(0, 120),\n\t\t\t);\n\t\t}\n\t\treturn fallback;\n\t}\n}\n\n/**\n * Finds a hydration script element inside a host by type and optional key.\n *\n * When a key is provided, looks for an exact `data-hydration-key` match.\n * Otherwise, returns the first unkeyed script matching the type.\n */\nexport function findHydrationScript(\n\thost: HydrationScriptHost,\n\ttype: HydrationPayloadType,\n\thydrationKey?: string,\n): Element | null {\n\tconst children = host.children;\n\n\tif (!children || children.length === 0) {\n\t\tconst childNodes = (host as Partial<{ childNodes: ArrayLike<{ nodeType: number }> }>).childNodes;\n\n\t\tif (!childNodes || childNodes.length === 0) {\n\t\t\treturn null;\n\t\t}\n\n\t\tfor (let i = 0; i < childNodes.length; i += 1) {\n\t\t\tconst node = childNodes[i]!;\n\n\t\t\tif (node.nodeType !== 1) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tconst element = node as unknown as Element;\n\n\t\t\tif (matchesHydrationScript(element, type, hydrationKey)) {\n\t\t\t\treturn element;\n\t\t\t}\n\t\t}\n\n\t\treturn null;\n\t}\n\n\tfor (let i = 0; i < children.length; i += 1) {\n\t\tif (matchesHydrationScript(children[i]!, type, hydrationKey)) {\n\t\t\treturn children[i]!;\n\t\t}\n\t}\n\n\treturn null;\n}\n\nfunction matchesHydrationScript(element: Element, type: HydrationPayloadType, hydrationKey?: string): boolean {\n\tif (\n\t\telement.tagName !== 'SCRIPT' ||\n\t\t!element.hasAttribute(HYDRATION_ATTRIBUTE) ||\n\t\telement.getAttribute(HYDRATION_TYPE_ATTRIBUTE) !== type\n\t) {\n\t\treturn false;\n\t}\n\n\tif (hydrationKey !== undefined) {\n\t\treturn element.getAttribute(HYDRATION_KEY_ATTRIBUTE) === hydrationKey;\n\t}\n\n\treturn !element.hasAttribute(HYDRATION_KEY_ATTRIBUTE);\n}\n\nfunction escapeHtmlAttribute(value: string): string {\n\treturn value.replace(/&/g, '&amp;').replace(/\"/g, '&quot;').replace(/</g, '&lt;').replace(/>/g, '&gt;');\n}\n",
8
- "import { createHydrationScriptTag, escapeHydrationJson } from '../core/hydration-codec';\n\n/** Creates the raw `<script type=\"application/json\">` tag used to hydrate a signal field. */\nexport function createSignalHydrationScriptTag(options: { hydrationKey?: string; serializedValue: string }): string {\n\treturn createHydrationScriptTag({ type: 'signal', ...options });\n}\n\n/** Escapes serialized JSON so it remains safe inside an HTML script tag. */\nexport function escapeSignalHydrationJson(value: string): string {\n\treturn escapeHydrationJson(value);\n}\n",
9
- "import { createMarkupNodeLike, type JsxRenderable } from '@ecopages/jsx';\nimport { state, type WritableSignal } from '@ecopages/signals';\nimport type { SsrSerializableHydrationBinding } from '../core/ssr-hydration-binding';\nimport type { AttributeTypeConstant } from '../utils/attribute-utils';\nimport { findHydrationScript, parseHydrationPayload } from '../core/hydration-codec';\nimport { createSignalHydrationScriptTag, escapeSignalHydrationJson } from './hydration-script';\n\ntype HostSignalOwner = {\n\tnotifyUpdate(property: string, oldValue: unknown, value: unknown): void;\n};\n\ntype HostSignalOptions<Value> = {\n\thost: HostSignalOwner;\n\thydrate?: AttributeTypeConstant;\n\thydrationKey?: string;\n\tinitialValue?: Value;\n\tproperty: string;\n\tsource?: WritableSignal<Value>;\n};\n\nexport function isWritableSignalLike<Value>(value: unknown): value is WritableSignal<Value> {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\ttypeof (value as WritableSignal<Value>).get === 'function' &&\n\t\ttypeof (value as WritableSignal<Value>).set === 'function' &&\n\t\ttypeof (value as WritableSignal<Value>).subscribe === 'function' &&\n\t\ttypeof (value as WritableSignal<Value>).update === 'function'\n\t);\n}\n\n/**\n * Host-owned writable signal that bridges signal updates back into Radiant's\n * update callback channel and optional SSR hydration pipeline.\n */\nexport class HostSignal<Value> implements WritableSignal<Value>, SsrSerializableHydrationBinding {\n\tprivate readonly host: HostSignalOwner;\n\tprivate readonly hydrate?: AttributeTypeConstant;\n\tprivate readonly hydrationKey?: string;\n\tprivate readonly property: string;\n\tprivate readonly source: WritableSignal<Value>;\n\tprivate currentValue: Value;\n\tprivate hasAppliedHostHydration = false;\n\tprivate sourceUnsubscribe?: () => void;\n\n\tconstructor(options: HostSignalOptions<Value>) {\n\t\tthis.host = options.host;\n\t\tthis.hydrate = options.hydrate;\n\t\tthis.hydrationKey = options.hydrationKey;\n\t\tthis.property = options.property;\n\t\tthis.source = options.source ?? state(this.resolveInitialValue(options.initialValue as Value));\n\t\tthis.currentValue = this.source.get();\n\t}\n\n\tpublic get(): Value {\n\t\treturn this.source.get();\n\t}\n\n\tpublic set(nextValue: Value): void {\n\t\tthis.source.set(nextValue);\n\t}\n\n\tpublic subscribe(notify: (value: Value) => void): () => void {\n\t\treturn this.source.subscribe(notify);\n\t}\n\n\tpublic update(updater: (value: Value) => Value): void {\n\t\tthis.set(updater(this.get()));\n\t}\n\n\tpublic connectToSource(): void {\n\t\tif (this.sourceUnsubscribe) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst nextValue = this.source.get();\n\n\t\tif (!Object.is(this.currentValue, nextValue)) {\n\t\t\tconst previousValue = this.currentValue;\n\t\t\tthis.currentValue = nextValue;\n\t\t\tthis.host.notifyUpdate(this.property, previousValue, nextValue);\n\t\t}\n\n\t\tthis.sourceUnsubscribe = this.source.subscribe((value) => {\n\t\t\tthis.handleSourceChange(value);\n\t\t});\n\t}\n\n\tpublic disconnectFromSource(): void {\n\t\tthis.sourceUnsubscribe?.();\n\t\tthis.sourceUnsubscribe = undefined;\n\t}\n\n\tpublic hydrateFromHost(): void {\n\t\tif (!this.hydrate || this.hasAppliedHostHydration) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.hasAppliedHostHydration = true;\n\n\t\tconst previousValue = this.source.get();\n\t\tconst hydratedValue = this.resolveInitialValue(previousValue);\n\n\t\tif (!Object.is(previousValue, hydratedValue)) {\n\t\t\tthis.source.set(hydratedValue);\n\t\t\tthis.currentValue = this.source.get();\n\t\t\tthis.host.notifyUpdate(this.property, previousValue, this.currentValue);\n\t\t}\n\t}\n\n\tpublic renderHydrationScript(): JsxRenderable | undefined {\n\t\tconst outerHTML = this.renderHydrationScriptTag();\n\n\t\tif (!outerHTML) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\treturn createMarkupNodeLike(outerHTML);\n\t}\n\n\tpublic renderHydrationScriptTag(): string | undefined {\n\t\tconst serializedValue = this.serializeHydrationValue();\n\n\t\tif (!serializedValue) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\treturn createSignalHydrationScriptTag({\n\t\t\thydrationKey: this.hydrationKey,\n\t\t\tserializedValue,\n\t\t});\n\t}\n\n\tprivate findHydrationScriptElement(): Element | null {\n\t\tif (!(this.host instanceof Element)) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn findHydrationScript(this.host, 'signal', this.hydrationKey);\n\t}\n\n\tprivate isObject(value: unknown): value is Record<string, unknown> {\n\t\treturn typeof value === 'object' && !Array.isArray(value) && value !== null;\n\t}\n\n\tprivate resolveInitialValue(initialValue: Value): Value {\n\t\tif (!this.hydrate) {\n\t\t\treturn initialValue;\n\t\t}\n\n\t\tconst hydrationScriptElement = this.findHydrationScriptElement();\n\n\t\tif (!hydrationScriptElement) {\n\t\t\treturn initialValue;\n\t\t}\n\n\t\tconst parsedHydrationValue = parseHydrationPayload(hydrationScriptElement, initialValue);\n\n\t\tif (this.hydrate === Object && this.isObject(parsedHydrationValue) && this.isObject(initialValue)) {\n\t\t\treturn {\n\t\t\t\t...initialValue,\n\t\t\t\t...parsedHydrationValue,\n\t\t\t} as Value;\n\t\t}\n\n\t\treturn parsedHydrationValue;\n\t}\n\n\tprivate serializeHydrationValue(): string | undefined {\n\t\tif (!this.hydrate) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst serializedValue = JSON.stringify(this.get());\n\n\t\tif (typeof serializedValue !== 'string') {\n\t\t\treturn undefined;\n\t\t}\n\n\t\treturn escapeSignalHydrationJson(serializedValue);\n\t}\n\n\tprivate handleSourceChange(nextValue: Value): void {\n\t\tconst previousValue = this.currentValue;\n\t\tthis.currentValue = nextValue;\n\n\t\tif (!Object.is(previousValue, nextValue)) {\n\t\t\tthis.host.notifyUpdate(this.property, previousValue, nextValue);\n\t\t}\n\t}\n}\n\nexport function createHostSignal<Value>(options: HostSignalOptions<Value>): HostSignal<Value> {\n\treturn new HostSignal(options);\n}\n",
10
- "import type { SsrSerializableHydrationBinding } from './ssr-hydration-binding';\n\n/**\n * Hosts that can register keyed SSR hydration bindings.\n */\nexport interface HydrationCapableHost {\n\tregisterHydrationBinding(name: string, binding: SsrSerializableHydrationBinding): void;\n}\n\nexport function isHydrationCapableHost(host: object): host is HydrationCapableHost {\n\treturn typeof (host as HydrationCapableHost).registerHydrationBinding === 'function';\n}\n",
11
- "import type { ReactiveBindingOption } from '../../core/reactive-prop-core';\nimport { createHostSignal, HostSignal, isWritableSignalLike } from '../../signals/host-signal';\nimport { isHydrationCapableHost } from '../../core/hydration-capable-host';\nimport type { ReactiveHostLike } from '../../core/reactive-host';\nimport { registerLegacyPostConstructionInitializer } from './instance-initializers';\nimport type { AttributeTypeConstant } from '../../utils/attribute-utils';\nimport type { WritableSignal } from '@ecopages/signals';\n\nexport type SignalDecoratorOptions<Value = unknown> = {\n\tbind?: ReactiveBindingOption;\n\tinitial?: Value;\n\tsource?: WritableSignal<Value> | ((host: ReactiveHostLike) => WritableSignal<Value>);\n\thydrate?: AttributeTypeConstant;\n};\n\nexport function signal<Value = unknown>(options: SignalDecoratorOptions<Value> = {}) {\n\treturn (target: ReactiveHostLike, propertyName: string) => {\n\t\tconst initializeSignal = (element: ReactiveHostLike): HostSignal<unknown> => {\n\t\t\tconst currentValue = element[propertyName as keyof typeof element] as unknown;\n\n\t\t\tif (currentValue instanceof HostSignal) {\n\t\t\t\treturn currentValue;\n\t\t\t}\n\n\t\t\tconst resolvedSource =\n\t\t\t\ttypeof options.source === 'function'\n\t\t\t\t\t? options.source(element)\n\t\t\t\t\t: (options.source ?? (isWritableSignalLike(currentValue) ? currentValue : undefined));\n\n\t\t\tconst bind =\n\t\t\t\toptions.bind ??\n\t\t\t\t(\n\t\t\t\t\telement as unknown as { shouldAutoBindReactiveMembers?: () => boolean }\n\t\t\t\t).shouldAutoBindReactiveMembers?.() ??\n\t\t\t\tfalse;\n\n\t\t\tconst resolvedInitialValue =\n\t\t\t\tresolvedSource !== undefined\n\t\t\t\t\t? options.initial\n\t\t\t\t\t: ((currentValue === undefined ? options.initial : currentValue) as Value);\n\t\t\telement.defineReactiveBinding(propertyName, bind);\n\n\t\t\tconst hostSignal = createHostSignal({\n\t\t\t\thost: element,\n\t\t\t\thydrate: options.hydrate,\n\t\t\t\thydrationKey: propertyName,\n\t\t\t\tinitialValue: resolvedInitialValue,\n\t\t\t\tproperty: propertyName,\n\t\t\t\tsource: resolvedSource,\n\t\t\t});\n\n\t\t\telement.registerConnectedCallback(() => {\n\t\t\t\thostSignal.hydrateFromHost();\n\t\t\t\thostSignal.connectToSource();\n\t\t\t});\n\t\t\telement.registerCleanupCallback(() => {\n\t\t\t\thostSignal.disconnectFromSource();\n\t\t\t});\n\n\t\t\tif (options.hydrate && isHydrationCapableHost(element)) {\n\t\t\t\telement.registerHydrationBinding(propertyName, hostSignal);\n\t\t\t}\n\n\t\t\t(element as unknown as Record<string, unknown>)[propertyName] = hostSignal;\n\t\t\treturn hostSignal as unknown as HostSignal<unknown>;\n\t\t};\n\n\t\tregisterLegacyPostConstructionInitializer(target, (element) => {\n\t\t\tconst hostSignal = initializeSignal(element);\n\t\t\telement.registerConnectedCallback(() => {\n\t\t\t\tif (!((element as any)[propertyName] instanceof HostSignal)) {\n\t\t\t\t\t(element as unknown as Record<string, unknown>)[propertyName] = hostSignal;\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t};\n}\n"
12
- ],
13
- "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,GChGhC,SAAS,CAAgB,CAAC,EAAuB,CACvD,OAAO,EACL,QAAQ,KAAM,S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C3B,EAAW,gBAAgB,EAC3B,EACD,EAAQ,wBAAwB,IAAM,CACrC,EAAW,qBAAqB,EAChC,EAEG,EAAQ,SAAW,EAAuB,CAAO,EACpD,EAAQ,yBAAyB,EAAc,CAAU,EAI1D,OADC,EAA+C,GAAgB,EACzD,GAGR,EAA0C,EAAQ,CAAC,IAAY,CAC9D,IAAM,EAAa,EAAiB,CAAO,EAC3C,EAAQ,0BAA0B,IAAM,CACvC,GAAI,EAAG,EAAgB,aAAyB,GAC9C,EAA+C,GAAgB,EAEjE,EACD",
14
- "debugId": "1CC0F5D89ED31A0464756E2164756E21",
15
- "names": []
16
- }
@@ -1,3 +0,0 @@
1
- var O=((d)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(d,{get:(x,F)=>(typeof require<"u"?require:x)[F]}):d)(function(d){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+d+'" is not supported')});var $=Symbol.for("@ecopages/radiant.legacy-instance-initializers"),W=Symbol.for("@ecopages/radiant.legacy-post-construction-initializers"),K=Symbol.for("@ecopages/radiant.legacy-executed-post-construction-initializers");function q(d,x){Q(d,$,x)}function A(d,x){Q(d,W,x)}function C(d){B(d,$)}function k(d){let x=d;B(d,W,x[K]??=new Set)}function Q(d,x,F){let M=d,R=Object.prototype.hasOwnProperty.call(M,x)?M[x]:void 0;if(Array.isArray(R)){R.push(F);return}Object.defineProperty(M,x,{value:[F]})}function B(d,x,F,M=Object.getPrototypeOf(d)){if(!M||M===Object.prototype)return;B(d,x,F,Object.getPrototypeOf(M));let R=M[x];if(!Array.isArray(R))return;for(let P of R){if(F?.has(P))continue;P(d),F?.add(P)}}function N(d){return typeof d==="function"}function E(d,x,F,M){if(typeof M==="object")return d(void 0,M);return x(F,M)}function X(d,x,F,M,R){if(typeof M==="object"){if(!N(F))throw TypeError("Standard method decorators require a method target");return d(F,M)}if(!R)throw TypeError("Legacy method decorators require a property descriptor");return x(F,M,R)}function J(d){let x=globalThis.CSS;if(typeof x?.escape==="function")return x.escape(d);let F="";for(let M=0;M<d.length;M+=1){let R=d[M]??"",P=R.codePointAt(0)??0;if(P===0){F+="�";continue}let u=P>=1&&P<=31||P===127,D=M===0&&P>=48&&P<=57,r=M===1&&P>=48&&P<=57&&(d[0]??"")==="-",j=M===0&&R==="-"&&d.length===1;if(u||D||r){F+=`\\${P.toString(16)} `;continue}if(P>=128||R==="-"||R==="_"||P>=48&&P<=57||P>=65&&P<=90||P>=97&&P<=122){F+=j?`\\${R}`:R;continue}F+=`\\${R}`}return F}var V=Symbol("radiant.shadowRootListenerHooks"),G=Symbol("radiant.patchedAttachShadow");function Y(d){if(d instanceof Element)return d;if("host"in d)return d.host;return d.element}function L(d){return!(d instanceof Element)}function U(d,x,F,M){let R=(P)=>{if(P.target instanceof Element&&P.target.matches(F))M(P)};return d.addEventListener(x.type,R,x.options),()=>{d.removeEventListener(x.type,R,x.options)}}function t(d,x){let F=Y(d);if(!F[V])F[V]=new Set;if(F[V].add(x),F[G])return;let M=F.attachShadow;F.attachShadow=function(P){let u=M.call(this,P);for(let D of F[V]??[])D();return u},F[G]=!0}function y(d,x,F){if(L(d)&&"scope"in x&&x.scope&&x.scope!=="light")throw Error("RadiantController event listeners only support light DOM scope.");let M=Y(d),R=F.bind(d),P=null,u=null,D=null,r=null,j=!1,H=()=>{P?.(),u?.(),D?.(),r?.(),P=null,u=null,D=null,r=null},S=()=>{if(j)return;if("window"in x&&!P)window.addEventListener(x.type,R,x.options),P=()=>{window.removeEventListener(x.type,R,x.options)};if("document"in x&&!u)document.addEventListener(x.type,R,x.options),u=()=>{document.removeEventListener(x.type,R,x.options)};if("selector"in x||"ref"in x){let T="selector"in x?x.selector:`[data-ref='${J(x.ref)}']`;if(x.scope!=="shadow"&&!D)D=U(M,x,T,R);if(x.scope!=="light"&&M.shadowRoot&&!r)r=U(M.shadowRoot,x,T,R)}};if("selector"in x||"ref"in x){if(x.scope!=="light")t(d,()=>{if(d.isConnected)S()})}if(d.registerConnectedCallback(S),d.registerCleanupCallback(H),d.isConnected)S();return()=>{j=!0,H()}}function Z(d){return(x,F,M)=>{let R=M.value;return q(x,(P)=>{y(P,d,R.bind(P))}),M}}function _(d){return function(x,F){F.addInitializer(function(){y(this,d,x.bind(this))})}}function o(d){function x(F,M,R){return X(_(d),Z(d),F,M,R)}return x}export{o as onEvent};
2
-
3
- //# debugId=273F047A5EF5576564756E2164756E21
@@ -1,3 +0,0 @@
1
- var H=((o)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(o,{get:(d,r)=>(typeof require<"u"?require:d)[r]}):o)(function(o){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+o+'" is not supported')});var c=Symbol.for("@ecopages/radiant.legacy-instance-initializers"),h=Symbol.for("@ecopages/radiant.legacy-post-construction-initializers"),R=Symbol.for("@ecopages/radiant.legacy-executed-post-construction-initializers");function f(o,d){M(o,c,d)}function D(o,d){M(o,h,d)}function b(o){a(o,c)}function w(o){let d=o;a(o,h,d[R]??=new Set)}function M(o,d,r){let t=o,e=Object.prototype.hasOwnProperty.call(t,d)?t[d]:void 0;if(Array.isArray(e)){e.push(r);return}Object.defineProperty(t,d,{value:[r]})}function a(o,d,r,t=Object.getPrototypeOf(o)){if(!t||t===Object.prototype)return;a(o,d,r,Object.getPrototypeOf(t));let e=t[d];if(!Array.isArray(e))return;for(let n of e){if(r?.has(n))continue;n(o),r?.add(n)}}function x(o){return typeof o==="function"}function p(o,d,r,t){if(typeof t==="object")return o(void 0,t);return d(r,t)}function g(o,d,r,t,e){if(typeof t==="object"){if(!x(r))throw TypeError("Standard method decorators require a method target");return o(r,t)}if(!e)throw TypeError("Legacy method decorators require a property descriptor");return d(r,t,e)}function F(o){return(d,r)=>{let t=Symbol(`@ecopages/radiant/on-updated:${r}:cleanup`);f(d,(e)=>{e.registerConnectedCallback(()=>{let n=e[r].bind(e),s=[];if(Array.isArray(o))for(let u of o)s.push(e.registerUpdateCallback(u,n));else if(typeof o==="string")s.push(e.registerUpdateCallback(o,n));e[t]=()=>{for(let u of s)u()}}),e.registerCleanupCallback(()=>{let n=e[t];if(typeof n==="function")n(),delete e[t]})})}}function l(o){return function(d,r){r.addInitializer(function(){let t=d.bind(this);if(Object.defineProperty(this,r.name,{value:t,configurable:!0,writable:!0}),Array.isArray(o))for(let e of o)this.registerUpdateCallback(e,t);else if(typeof o==="string")this.registerUpdateCallback(o,t)})}}function q(o){function d(r,t,e){return g(l(o),F(o),r,t,e)}return d}export{q as onUpdated};
2
-
3
- //# debugId=98CD82210B4E4C0964756E2164756E21