@ecopages/radiant 0.3.0-alpha.2 → 0.3.0-alpha.20
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.
- package/README.md +71 -60
- package/client/app-bootstrap.d.ts +19 -0
- package/client/app-bootstrap.js +3 -0
- package/client/app-bootstrap.js.map +10 -0
- package/{dist/client → client}/hydrator.d.ts +1 -1
- package/client/hydrator.js +3 -0
- package/client/hydrator.js.map +11 -0
- package/client/install-hydrator.js +3 -0
- package/client/install-hydrator.js.map +12 -0
- package/{dist/context → context}/context-consumer-bootstrap.d.ts +7 -6
- package/context/context-consumer-bootstrap.js +3 -0
- package/context/context-consumer-bootstrap.js.map +14 -0
- package/context/context-consumer-runtime.d.ts +47 -0
- package/context/context-consumer-runtime.js +3 -0
- package/context/context-consumer-runtime.js.map +12 -0
- package/context/context-host.d.ts +25 -0
- package/context/context-host.js +3 -0
- package/context/context-host.js.map +10 -0
- package/{dist/context → context}/context-provider.d.ts +10 -6
- package/context/context-provider.js +3 -0
- package/context/context-provider.js.map +15 -0
- package/context/context-ssr-bridge.js +3 -0
- package/{dist/chunk-t8xtvgyg.js.map → context/context-ssr-bridge.js.map} +2 -2
- package/context/create-context.js +3 -0
- package/{dist/chunk-30x4hggg.js.map → context/create-context.js.map} +2 -2
- package/{dist/context → context}/decorators/consume-context.d.ts +5 -2
- package/context/decorators/consume-context.js +3 -0
- package/context/decorators/consume-context.js.map +19 -0
- package/context/decorators/context-selection-delivery.d.ts +1 -0
- package/context/decorators/context-selection-delivery.js +3 -0
- package/context/decorators/context-selection-delivery.js.map +11 -0
- package/{dist/context → context}/decorators/context-selector.d.ts +6 -6
- package/context/decorators/context-selector.js +3 -0
- package/context/decorators/context-selector.js.map +21 -0
- package/context/decorators/legacy/consume-context.d.ts +3 -0
- package/context/decorators/legacy/consume-context.js +3 -0
- package/context/decorators/legacy/consume-context.js.map +16 -0
- package/{dist/context → context}/decorators/legacy/context-selector-field.d.ts +2 -2
- package/context/decorators/legacy/context-selector-field.js +3 -0
- package/context/decorators/legacy/context-selector-field.js.map +17 -0
- package/{dist/context → context}/decorators/legacy/context-selector.d.ts +2 -2
- package/context/decorators/legacy/context-selector.js +3 -0
- package/context/decorators/legacy/context-selector.js.map +17 -0
- package/{dist/context → context}/decorators/legacy/provide-context.d.ts +2 -2
- package/context/decorators/legacy/provide-context.js +3 -0
- package/context/decorators/legacy/provide-context.js.map +17 -0
- package/{dist/context → context}/decorators/on-context-update.d.ts +5 -5
- package/context/decorators/on-context-update.js +3 -0
- package/context/decorators/on-context-update.js.map +20 -0
- package/{dist/context → context}/decorators/provide-context.d.ts +5 -2
- package/context/decorators/provide-context.js +3 -0
- package/context/decorators/provide-context.js.map +20 -0
- package/context/decorators/standard/consume-context.d.ts +3 -0
- package/context/decorators/standard/consume-context.js +3 -0
- package/context/decorators/standard/consume-context.js.map +15 -0
- package/{dist/context → context}/decorators/standard/context-selector-field.d.ts +2 -2
- package/context/decorators/standard/context-selector-field.js +3 -0
- package/context/decorators/standard/context-selector-field.js.map +16 -0
- package/{dist/context → context}/decorators/standard/context-selector.d.ts +2 -3
- package/context/decorators/standard/context-selector.js +3 -0
- package/context/decorators/standard/context-selector.js.map +16 -0
- package/{dist/context → context}/decorators/standard/provide-context.d.ts +2 -2
- package/context/decorators/standard/provide-context.js +3 -0
- package/context/decorators/standard/provide-context.js.map +16 -0
- package/{dist/context → context}/events.d.ts +18 -11
- package/context/events.js +3 -0
- package/context/events.js.map +10 -0
- package/context/hydration-script.js +3 -0
- package/context/hydration-script.js.map +12 -0
- package/context/index.d.ts +8 -0
- package/context/index.js +3 -0
- package/context/index.js.map +35 -0
- package/controller-registry.d.ts +38 -0
- package/controller-registry.js +3 -0
- package/controller-registry.js.map +11 -0
- package/core/controller-metadata.d.ts +3 -0
- package/core/controller-metadata.js +3 -0
- package/core/controller-metadata.js.map +10 -0
- package/core/custom-element-metadata.d.ts +14 -0
- package/core/custom-element-metadata.js +3 -0
- package/core/custom-element-metadata.js.map +10 -0
- package/{dist/core → core}/hydration-codec.d.ts +8 -1
- package/core/hydration-codec.js +3 -0
- package/core/hydration-codec.js.map +11 -0
- package/core/radiant-controller.d.ts +151 -0
- package/core/radiant-controller.js +3 -0
- package/core/radiant-controller.js.map +17 -0
- package/core/radiant-element-ssr-host.d.ts +23 -0
- package/core/radiant-element-ssr-host.js +3 -0
- package/core/radiant-element-ssr-host.js.map +10 -0
- package/core/radiant-element-ssr-registry.d.ts +45 -0
- package/core/radiant-element-ssr-registry.js +3 -0
- package/core/radiant-element-ssr-registry.js.map +10 -0
- package/{dist/core/radiant-component-ssr.d.ts → core/radiant-element-ssr-service.d.ts} +5 -6
- package/core/radiant-element-ssr-service.js +3 -0
- package/core/radiant-element-ssr-service.js.map +14 -0
- package/{dist/core → core}/radiant-element.d.ts +55 -123
- package/core/radiant-element.js +3 -0
- package/core/radiant-element.js.map +24 -0
- package/{dist/core → core}/radiant-hydrator-state.d.ts +1 -1
- package/core/radiant-hydrator-state.js +3 -0
- package/core/radiant-hydrator-state.js.map +10 -0
- package/core/reactive-host.d.ts +133 -0
- package/core/reactive-host.js +3 -0
- package/core/reactive-host.js.map +13 -0
- package/{dist/core → core}/reactive-jsx-value.d.ts +2 -1
- package/core/reactive-jsx-value.js +3 -0
- package/core/reactive-jsx-value.js.map +10 -0
- package/core/reactive-prop-core.d.ts +42 -0
- package/core/reactive-prop-core.js +3 -0
- package/core/reactive-prop-core.js.map +11 -0
- package/{dist/core → core}/reactive-prop-metadata.d.ts +1 -1
- package/core/reactive-prop-metadata.js +3 -0
- package/core/reactive-prop-metadata.js.map +10 -0
- package/core/reactivity-adapter.d.ts +8 -0
- package/core/reactivity-adapter.js +3 -0
- package/core/reactivity-adapter.js.map +12 -0
- package/core/reactivity-contract.d.ts +39 -0
- package/core/reactivity-contract.js +2 -0
- package/{dist/chunk-vgtggzb6.js.map → core/reactivity-contract.js.map} +1 -1
- package/core/reactivity-runtime.d.ts +18 -0
- package/core/reactivity-runtime.js +3 -0
- package/core/reactivity-runtime.js.map +11 -0
- package/core/reactivity-signals.d.ts +10 -0
- package/core/reactivity-signals.js +3 -0
- package/core/reactivity-signals.js.map +10 -0
- package/core/render-runtime.d.ts +28 -0
- package/core/render-runtime.js +3 -0
- package/core/render-runtime.js.map +16 -0
- package/core/slot-projection-runtime.js +3 -0
- package/core/slot-projection-runtime.js.map +12 -0
- package/core/ssr-preparation.js +3 -0
- package/core/ssr-preparation.js.map +10 -0
- package/decorators/attr.d.ts +6 -0
- package/decorators/attr.js +3 -0
- package/decorators/attr.js.map +17 -0
- package/decorators/bound.d.ts +7 -0
- package/decorators/bound.js +3 -0
- package/decorators/bound.js.map +13 -0
- package/decorators/bridge.d.ts +12 -0
- package/decorators/bridge.js +3 -0
- package/decorators/bridge.js.map +10 -0
- package/decorators/controller.d.ts +2 -0
- package/decorators/controller.js +3 -0
- package/decorators/controller.js.map +12 -0
- package/{dist/decorators → decorators}/custom-element.d.ts +4 -2
- package/decorators/custom-element.js +3 -0
- package/decorators/custom-element.js.map +13 -0
- package/decorators/debounce.d.ts +9 -0
- package/decorators/debounce.js +3 -0
- package/decorators/debounce.js.map +14 -0
- package/{dist/decorators → decorators}/event.d.ts +5 -2
- package/decorators/event.js +3 -0
- package/decorators/event.js.map +16 -0
- package/decorators/legacy/attr.d.ts +2 -0
- package/decorators/legacy/attr.js +3 -0
- package/decorators/legacy/attr.js.map +14 -0
- package/decorators/legacy/bound.js +3 -0
- package/decorators/legacy/bound.js.map +10 -0
- package/decorators/legacy/custom-element.js +3 -0
- package/decorators/legacy/custom-element.js.map +11 -0
- package/decorators/legacy/debounce.js +3 -0
- package/decorators/legacy/debounce.js.map +11 -0
- package/decorators/legacy/event.js +3 -0
- package/decorators/legacy/event.js.map +13 -0
- package/decorators/legacy/instance-initializers.d.ts +32 -0
- package/decorators/legacy/instance-initializers.js +3 -0
- package/decorators/legacy/instance-initializers.js.map +10 -0
- package/{dist/decorators → decorators}/legacy/on-event.d.ts +2 -2
- package/decorators/legacy/on-event.js +3 -0
- package/decorators/legacy/on-event.js.map +13 -0
- package/decorators/legacy/on-updated.d.ts +11 -0
- package/decorators/legacy/on-updated.js +3 -0
- package/decorators/legacy/on-updated.js.map +11 -0
- package/decorators/legacy/query-slot.d.ts +3 -0
- package/decorators/legacy/query-slot.js +3 -0
- package/decorators/legacy/query-slot.js.map +13 -0
- package/{dist/decorators → decorators}/legacy/query.d.ts +7 -2
- package/decorators/legacy/query.js +3 -0
- package/decorators/legacy/query.js.map +12 -0
- package/{dist/decorators → decorators}/legacy/reactive-field.d.ts +2 -2
- package/decorators/legacy/reactive-field.js +3 -0
- package/decorators/legacy/reactive-field.js.map +11 -0
- package/decorators/legacy/reactive-prop.d.ts +14 -0
- package/decorators/legacy/reactive-prop.js +3 -0
- package/decorators/legacy/reactive-prop.js.map +14 -0
- package/{dist/decorators → decorators}/legacy/signal.d.ts +4 -3
- package/decorators/legacy/signal.js +3 -0
- package/decorators/legacy/signal.js.map +15 -0
- package/{dist/decorators → decorators}/on-event.d.ts +6 -3
- package/decorators/on-event.js +3 -0
- package/decorators/on-event.js.map +16 -0
- package/decorators/on-updated.d.ts +15 -0
- package/decorators/on-updated.js +3 -0
- package/decorators/on-updated.js.map +14 -0
- package/decorators/prop.d.ts +26 -0
- package/decorators/prop.js +3 -0
- package/decorators/prop.js.map +17 -0
- package/decorators/query-slot.d.ts +17 -0
- package/decorators/query-slot.js +3 -0
- package/decorators/query-slot.js.map +16 -0
- package/{dist/decorators → decorators}/query.d.ts +9 -2
- package/decorators/query.js +3 -0
- package/decorators/query.js.map +15 -0
- package/decorators/shared/reactive-attr.d.ts +25 -0
- package/decorators/shared/reactive-attr.js +3 -0
- package/decorators/shared/reactive-attr.js.map +12 -0
- package/decorators/signal.d.ts +29 -0
- package/decorators/signal.js +3 -0
- package/decorators/signal.js.map +17 -0
- package/decorators/standard/attr.d.ts +2 -0
- package/decorators/standard/attr.js +3 -0
- package/decorators/standard/attr.js.map +13 -0
- package/decorators/standard/bound.js +3 -0
- package/{dist/chunk-rkh1vkb9.js.map → decorators/standard/bound.js.map} +2 -2
- package/decorators/standard/custom-element.js +3 -0
- package/decorators/standard/custom-element.js.map +11 -0
- package/decorators/standard/debounce.js +3 -0
- package/decorators/standard/debounce.js.map +11 -0
- package/decorators/standard/event.js +3 -0
- package/decorators/standard/event.js.map +12 -0
- package/{dist/decorators → decorators}/standard/on-event.d.ts +2 -1
- package/decorators/standard/on-event.js +3 -0
- package/decorators/standard/on-event.js.map +12 -0
- package/decorators/standard/on-updated.d.ts +6 -0
- package/decorators/standard/on-updated.js +3 -0
- package/decorators/standard/on-updated.js.map +10 -0
- package/{dist/decorators → decorators}/standard/query-slot.d.ts +1 -2
- package/decorators/standard/query-slot.js +3 -0
- package/decorators/standard/query-slot.js.map +11 -0
- package/decorators/standard/query.d.ts +3 -0
- package/decorators/standard/query.js +3 -0
- package/decorators/standard/query.js.map +11 -0
- package/decorators/standard/reactive-field.d.ts +2 -0
- package/decorators/standard/reactive-field.js +3 -0
- package/decorators/standard/reactive-field.js.map +10 -0
- package/decorators/standard/reactive-prop.d.ts +13 -0
- package/decorators/standard/reactive-prop.js +3 -0
- package/decorators/standard/reactive-prop.js.map +13 -0
- package/{dist/decorators → decorators}/standard/signal.d.ts +4 -3
- package/decorators/standard/signal.js +3 -0
- package/decorators/standard/signal.js.map +14 -0
- package/decorators/state.d.ts +12 -0
- package/decorators/state.js +3 -0
- package/decorators/state.js.map +14 -0
- package/{dist/helpers → helpers}/create-event-listener.d.ts +11 -2
- package/helpers/create-event-listener.js +3 -0
- package/helpers/create-event-listener.js.map +11 -0
- package/helpers/create-event.js +3 -0
- package/helpers/create-event.js.map +11 -0
- package/{dist/helpers → helpers}/create-query-slot.d.ts +2 -3
- package/helpers/create-query-slot.js +3 -0
- package/helpers/create-query-slot.js.map +10 -0
- package/{dist/helpers → helpers}/create-query.d.ts +14 -3
- package/helpers/create-query.js +3 -0
- package/helpers/create-query.js.map +10 -0
- package/helpers/debounce.js +3 -0
- package/{dist/chunk-wd23rn4q.js.map → helpers/debounce.js.map} +2 -2
- package/helpers/index.js +3 -0
- package/helpers/index.js.map +16 -0
- package/index.d.ts +16 -0
- package/index.js +3 -0
- package/index.js.map +77 -0
- package/package.json +114 -120
- package/server/context-ssr.js +3 -0
- package/{dist/chunk-ssnnxzrj.js.map → server/context-ssr.js.map} +4 -3
- package/server/html-parser.js +3 -0
- package/{dist/chunk-5b1en9vz.js.map → server/html-parser.js.map} +2 -2
- package/server/install-light-dom-shim.js +3 -0
- package/server/install-light-dom-shim.js.map +12 -0
- package/{dist/server → server}/light-dom-shim.d.ts +9 -0
- package/server/light-dom-shim.js +3 -0
- package/server/light-dom-shim.js.map +11 -0
- package/server/project-root.js +3 -0
- package/{dist/server → server}/project-root.js.map +2 -2
- package/server/radiant-element-ssr-bridge.d.ts +21 -0
- package/server/radiant-element-ssr-bridge.js +3 -0
- package/server/radiant-element-ssr-bridge.js.map +19 -0
- package/server/radiant-element-ssr-extractor.d.ts +3 -0
- package/server/radiant-element-ssr-extractor.js +3 -0
- package/server/radiant-element-ssr-extractor.js.map +12 -0
- package/server/radiant-element-ssr-runtime.d.ts +1 -0
- package/server/radiant-element-ssr-runtime.js +3 -0
- package/server/radiant-element-ssr-runtime.js.map +19 -0
- package/{dist/server → server}/render-component.d.ts +5 -15
- package/server/render-component.js +3 -0
- package/server/render-component.js.map +23 -0
- package/server/render-controller.d.ts +57 -0
- package/server/render-controller.js +3 -0
- package/server/render-controller.js.map +26 -0
- package/server/slot-projection-html.js +3 -0
- package/server/slot-projection-html.js.map +14 -0
- package/signals/host-resource.js +3 -0
- package/{dist/signals → signals}/host-resource.js.map +2 -2
- package/{dist/signals → signals}/host-signal.d.ts +4 -2
- package/signals/host-signal.js +3 -0
- package/signals/host-signal.js.map +13 -0
- package/signals/hydration-script.js +3 -0
- package/signals/hydration-script.js.map +12 -0
- package/tools/escape-css-identifier.d.ts +1 -0
- package/tools/escape-css-identifier.js +3 -0
- package/tools/escape-css-identifier.js.map +10 -0
- package/tools/escape-script-json.js +3 -0
- package/{dist/chunk-nssj2x13.js.map → tools/escape-script-json.js.map} +2 -2
- package/tools/event-emitter.js +3 -0
- package/{dist/chunk-wvd1ffe4.js.map → tools/event-emitter.js.map} +2 -2
- package/{dist/tools → tools}/index.d.ts +1 -1
- package/tools/index.js +3 -0
- package/tools/index.js.map +13 -0
- package/tools/render-jsx-template.js +3 -0
- package/{dist/chunk-jkb2y7c8.js.map → tools/render-jsx-template.js.map} +2 -2
- package/types.js +3 -0
- package/{dist/types.js.map → types.js.map} +2 -2
- package/utils/attribute-utils.js +3 -0
- package/{dist/chunk-66e6s792.js.map → utils/attribute-utils.js.map} +2 -2
- package/utils/index.js +3 -0
- package/utils/index.js.map +10 -0
- package/dist/chunk-0bswvy25.js +0 -4
- package/dist/chunk-0bswvy25.js.map +0 -10
- package/dist/chunk-0btkzzyc.js +0 -4
- package/dist/chunk-0btkzzyc.js.map +0 -10
- package/dist/chunk-0g0j9re6.js +0 -4
- package/dist/chunk-0g0j9re6.js.map +0 -10
- package/dist/chunk-1x26p09c.js +0 -4
- package/dist/chunk-1x26p09c.js.map +0 -10
- package/dist/chunk-21a7jask.js +0 -4
- package/dist/chunk-21a7jask.js.map +0 -10
- package/dist/chunk-25zjh0kg.js +0 -4
- package/dist/chunk-25zjh0kg.js.map +0 -10
- package/dist/chunk-30x4hggg.js +0 -4
- package/dist/chunk-3ryr5wx2.js +0 -4
- package/dist/chunk-3ryr5wx2.js.map +0 -10
- package/dist/chunk-3xxvmd5c.js +0 -4
- package/dist/chunk-3xxvmd5c.js.map +0 -10
- package/dist/chunk-3ynk7e1e.js +0 -4
- package/dist/chunk-3ynk7e1e.js.map +0 -10
- package/dist/chunk-4e559cy5.js +0 -4
- package/dist/chunk-4e559cy5.js.map +0 -10
- package/dist/chunk-5b1en9vz.js +0 -4
- package/dist/chunk-5bkat72n.js +0 -4
- package/dist/chunk-5bkat72n.js.map +0 -10
- package/dist/chunk-5qeaq3tj.js +0 -4
- package/dist/chunk-5qeaq3tj.js.map +0 -10
- package/dist/chunk-66e6s792.js +0 -4
- package/dist/chunk-79jg8q67.js +0 -4
- package/dist/chunk-79jg8q67.js.map +0 -10
- package/dist/chunk-8d5ddvvf.js +0 -4
- package/dist/chunk-8d5ddvvf.js.map +0 -10
- package/dist/chunk-8e9fgtbn.js +0 -4
- package/dist/chunk-8e9fgtbn.js.map +0 -10
- package/dist/chunk-9mqtp3js.js +0 -4
- package/dist/chunk-9mqtp3js.js.map +0 -10
- package/dist/chunk-9rj2rwes.js +0 -4
- package/dist/chunk-9rj2rwes.js.map +0 -10
- package/dist/chunk-atms6yrh.js +0 -4
- package/dist/chunk-atms6yrh.js.map +0 -10
- package/dist/chunk-bk2nbmcd.js +0 -4
- package/dist/chunk-bk2nbmcd.js.map +0 -10
- package/dist/chunk-bk6qkvfp.js +0 -4
- package/dist/chunk-bk6qkvfp.js.map +0 -10
- package/dist/chunk-c0qyz98c.js +0 -4
- package/dist/chunk-c0qyz98c.js.map +0 -10
- package/dist/chunk-c52qhh0j.js +0 -4
- package/dist/chunk-c52qhh0j.js.map +0 -10
- package/dist/chunk-cnyxrh9r.js +0 -4
- package/dist/chunk-cnyxrh9r.js.map +0 -10
- package/dist/chunk-cvz9mrxa.js +0 -4
- package/dist/chunk-cvz9mrxa.js.map +0 -10
- package/dist/chunk-dabagjk6.js +0 -4
- package/dist/chunk-dabagjk6.js.map +0 -10
- package/dist/chunk-e0r6ca2g.js +0 -4
- package/dist/chunk-e0r6ca2g.js.map +0 -10
- package/dist/chunk-eevw1j2q.js +0 -4
- package/dist/chunk-eevw1j2q.js.map +0 -10
- package/dist/chunk-ek664x1c.js +0 -4
- package/dist/chunk-ek664x1c.js.map +0 -10
- package/dist/chunk-eyw14d6y.js +0 -4
- package/dist/chunk-eyw14d6y.js.map +0 -10
- package/dist/chunk-fs4j94bk.js +0 -4
- package/dist/chunk-fs4j94bk.js.map +0 -10
- package/dist/chunk-g2z3mm6b.js +0 -4
- package/dist/chunk-g2z3mm6b.js.map +0 -10
- package/dist/chunk-g5n3m11h.js +0 -4
- package/dist/chunk-g5n3m11h.js.map +0 -10
- package/dist/chunk-gdkte2vd.js +0 -4
- package/dist/chunk-gdkte2vd.js.map +0 -10
- package/dist/chunk-gg74gdpv.js +0 -4
- package/dist/chunk-gg74gdpv.js.map +0 -10
- package/dist/chunk-h9k7crjc.js +0 -4
- package/dist/chunk-h9k7crjc.js.map +0 -10
- package/dist/chunk-hpzgnxgq.js +0 -4
- package/dist/chunk-hpzgnxgq.js.map +0 -10
- package/dist/chunk-hrjc8b1y.js +0 -4
- package/dist/chunk-hrjc8b1y.js.map +0 -10
- package/dist/chunk-hvy4zvcc.js +0 -4
- package/dist/chunk-hvy4zvcc.js.map +0 -10
- package/dist/chunk-hztr86b4.js +0 -4
- package/dist/chunk-hztr86b4.js.map +0 -10
- package/dist/chunk-j3v7rca5.js +0 -4
- package/dist/chunk-j3v7rca5.js.map +0 -10
- package/dist/chunk-j864sv4w.js +0 -4
- package/dist/chunk-j864sv4w.js.map +0 -10
- package/dist/chunk-jkb2y7c8.js +0 -4
- package/dist/chunk-kakpjgzf.js +0 -4
- package/dist/chunk-kakpjgzf.js.map +0 -10
- package/dist/chunk-kmebacvv.js +0 -4
- package/dist/chunk-kmebacvv.js.map +0 -10
- package/dist/chunk-knqsm6v3.js +0 -4
- package/dist/chunk-knqsm6v3.js.map +0 -10
- package/dist/chunk-mp2vtrkg.js +0 -4
- package/dist/chunk-mp2vtrkg.js.map +0 -10
- package/dist/chunk-mpsj3cjs.js +0 -4
- package/dist/chunk-mpsj3cjs.js.map +0 -10
- package/dist/chunk-n4p2542b.js +0 -4
- package/dist/chunk-n4p2542b.js.map +0 -10
- package/dist/chunk-nctznxyz.js +0 -4
- package/dist/chunk-nctznxyz.js.map +0 -10
- package/dist/chunk-ndw3hc3v.js +0 -4
- package/dist/chunk-ndw3hc3v.js.map +0 -10
- package/dist/chunk-nnnb6pac.js +0 -4
- package/dist/chunk-nnnb6pac.js.map +0 -10
- package/dist/chunk-nssj2x13.js +0 -4
- package/dist/chunk-nvr37vma.js +0 -4
- package/dist/chunk-nvr37vma.js.map +0 -10
- package/dist/chunk-p8k4g99a.js +0 -4
- package/dist/chunk-p8k4g99a.js.map +0 -10
- package/dist/chunk-pkszgjqf.js +0 -4
- package/dist/chunk-pkszgjqf.js.map +0 -10
- package/dist/chunk-q9z6tnzw.js +0 -4
- package/dist/chunk-q9z6tnzw.js.map +0 -10
- package/dist/chunk-qdz5sncz.js +0 -4
- package/dist/chunk-qdz5sncz.js.map +0 -10
- package/dist/chunk-qe0eww1n.js +0 -4
- package/dist/chunk-qe0eww1n.js.map +0 -10
- package/dist/chunk-r33zvvda.js +0 -4
- package/dist/chunk-r33zvvda.js.map +0 -10
- package/dist/chunk-rkh1vkb9.js +0 -4
- package/dist/chunk-rrg759ht.js +0 -4
- package/dist/chunk-rrg759ht.js.map +0 -10
- package/dist/chunk-s09s5ayx.js +0 -4
- package/dist/chunk-s09s5ayx.js.map +0 -10
- package/dist/chunk-s5p5z3z4.js +0 -4
- package/dist/chunk-s5p5z3z4.js.map +0 -10
- package/dist/chunk-sf4a2gy5.js +0 -4
- package/dist/chunk-sf4a2gy5.js.map +0 -10
- package/dist/chunk-ssnnxzrj.js +0 -4
- package/dist/chunk-t8xtvgyg.js +0 -4
- package/dist/chunk-v3ta7hnv.js +0 -4
- package/dist/chunk-v3ta7hnv.js.map +0 -10
- package/dist/chunk-v92hp9g0.js +0 -4
- package/dist/chunk-v92hp9g0.js.map +0 -10
- package/dist/chunk-vgtggzb6.js +0 -4
- package/dist/chunk-vk48hgm4.js +0 -4
- package/dist/chunk-vk48hgm4.js.map +0 -10
- package/dist/chunk-w8s5fnsq.js +0 -4
- package/dist/chunk-w8s5fnsq.js.map +0 -10
- package/dist/chunk-wd23rn4q.js +0 -4
- package/dist/chunk-wds4href.js +0 -4
- package/dist/chunk-wds4href.js.map +0 -10
- package/dist/chunk-wvd1ffe4.js +0 -4
- package/dist/chunk-wwbjz9k4.js +0 -4
- package/dist/chunk-wwbjz9k4.js.map +0 -10
- package/dist/chunk-x2k0ngpz.js +0 -4
- package/dist/chunk-x2k0ngpz.js.map +0 -10
- package/dist/chunk-x457d0ap.js +0 -4
- package/dist/chunk-x457d0ap.js.map +0 -10
- package/dist/chunk-xbhtzkre.js +0 -4
- package/dist/chunk-xbhtzkre.js.map +0 -10
- package/dist/chunk-y139ycfm.js +0 -4
- package/dist/chunk-y139ycfm.js.map +0 -10
- package/dist/chunk-z9kxfckm.js +0 -4
- package/dist/chunk-z9kxfckm.js.map +0 -10
- package/dist/chunk-zx5txex8.js +0 -4
- package/dist/chunk-zx5txex8.js.map +0 -10
- package/dist/client/hydrator.js +0 -3
- package/dist/client/hydrator.js.map +0 -9
- package/dist/client/install-hydrator.js +0 -3
- package/dist/client/install-hydrator.js.map +0 -10
- package/dist/context/context-consumer-bootstrap.js +0 -3
- package/dist/context/context-consumer-bootstrap.js.map +0 -9
- package/dist/context/context-consumer-runtime.d.ts +0 -34
- package/dist/context/context-consumer-runtime.js +0 -3
- package/dist/context/context-consumer-runtime.js.map +0 -9
- package/dist/context/context-provider.js +0 -3
- package/dist/context/context-provider.js.map +0 -9
- package/dist/context/context-ssr-bridge.js +0 -3
- package/dist/context/context-ssr-bridge.js.map +0 -9
- package/dist/context/create-context.js +0 -3
- package/dist/context/create-context.js.map +0 -9
- package/dist/context/decorators/consume-context.js +0 -3
- package/dist/context/decorators/consume-context.js.map +0 -9
- package/dist/context/decorators/context-selection-delivery.d.ts +0 -1
- package/dist/context/decorators/context-selection-delivery.js +0 -3
- package/dist/context/decorators/context-selection-delivery.js.map +0 -9
- package/dist/context/decorators/context-selector.js +0 -3
- package/dist/context/decorators/context-selector.js.map +0 -9
- package/dist/context/decorators/legacy/consume-context.d.ts +0 -3
- package/dist/context/decorators/legacy/consume-context.js +0 -3
- package/dist/context/decorators/legacy/consume-context.js.map +0 -9
- package/dist/context/decorators/legacy/context-selector-field.js +0 -3
- package/dist/context/decorators/legacy/context-selector-field.js.map +0 -9
- package/dist/context/decorators/legacy/context-selector.js +0 -3
- package/dist/context/decorators/legacy/context-selector.js.map +0 -9
- package/dist/context/decorators/legacy/provide-context.js +0 -3
- package/dist/context/decorators/legacy/provide-context.js.map +0 -9
- package/dist/context/decorators/on-context-update.js +0 -3
- package/dist/context/decorators/on-context-update.js.map +0 -9
- package/dist/context/decorators/provide-context.js +0 -3
- package/dist/context/decorators/provide-context.js.map +0 -9
- package/dist/context/decorators/standard/consume-context.d.ts +0 -3
- package/dist/context/decorators/standard/consume-context.js +0 -3
- package/dist/context/decorators/standard/consume-context.js.map +0 -9
- package/dist/context/decorators/standard/context-selector-field.js +0 -3
- package/dist/context/decorators/standard/context-selector-field.js.map +0 -9
- package/dist/context/decorators/standard/context-selector.js +0 -3
- package/dist/context/decorators/standard/context-selector.js.map +0 -9
- package/dist/context/decorators/standard/provide-context.js +0 -3
- package/dist/context/decorators/standard/provide-context.js.map +0 -9
- package/dist/context/events.js +0 -3
- package/dist/context/events.js.map +0 -9
- package/dist/context/hydration-script.js +0 -3
- package/dist/context/hydration-script.js.map +0 -9
- package/dist/core/custom-element-metadata.d.ts +0 -3
- package/dist/core/custom-element-metadata.js +0 -3
- package/dist/core/custom-element-metadata.js.map +0 -9
- package/dist/core/hydration-codec.js +0 -3
- package/dist/core/hydration-codec.js.map +0 -9
- package/dist/core/radiant-component-ssr-registry.d.ts +0 -54
- package/dist/core/radiant-component-ssr-registry.js +0 -3
- package/dist/core/radiant-component-ssr-registry.js.map +0 -9
- package/dist/core/radiant-component-ssr.js +0 -3
- package/dist/core/radiant-component-ssr.js.map +0 -9
- package/dist/core/radiant-component.d.ts +0 -113
- package/dist/core/radiant-component.js +0 -3
- package/dist/core/radiant-component.js.map +0 -9
- package/dist/core/radiant-element.js +0 -3
- package/dist/core/radiant-element.js.map +0 -9
- package/dist/core/radiant-hydrator-state.js +0 -3
- package/dist/core/radiant-hydrator-state.js.map +0 -9
- package/dist/core/reactive-jsx-value.js +0 -3
- package/dist/core/reactive-jsx-value.js.map +0 -9
- package/dist/core/reactive-prop-metadata.js +0 -3
- package/dist/core/reactive-prop-metadata.js.map +0 -9
- package/dist/core/slot-projection-runtime.js +0 -3
- package/dist/core/slot-projection-runtime.js.map +0 -9
- package/dist/core/ssr-preparation.js +0 -3
- package/dist/core/ssr-preparation.js.map +0 -9
- package/dist/decorators/bound.d.ts +0 -5
- package/dist/decorators/bound.js +0 -3
- package/dist/decorators/bound.js.map +0 -9
- package/dist/decorators/bridge.d.ts +0 -8
- package/dist/decorators/bridge.js +0 -3
- package/dist/decorators/bridge.js.map +0 -9
- package/dist/decorators/custom-element.js +0 -3
- package/dist/decorators/custom-element.js.map +0 -9
- package/dist/decorators/debounce.d.ts +0 -6
- package/dist/decorators/debounce.js +0 -3
- package/dist/decorators/debounce.js.map +0 -9
- package/dist/decorators/event.js +0 -3
- package/dist/decorators/event.js.map +0 -9
- package/dist/decorators/legacy/bound.js +0 -3
- package/dist/decorators/legacy/bound.js.map +0 -9
- package/dist/decorators/legacy/custom-element.js +0 -3
- package/dist/decorators/legacy/custom-element.js.map +0 -9
- package/dist/decorators/legacy/debounce.js +0 -3
- package/dist/decorators/legacy/debounce.js.map +0 -9
- package/dist/decorators/legacy/event.js +0 -3
- package/dist/decorators/legacy/event.js.map +0 -9
- package/dist/decorators/legacy/instance-initializers.d.ts +0 -17
- package/dist/decorators/legacy/instance-initializers.js +0 -3
- package/dist/decorators/legacy/instance-initializers.js.map +0 -9
- package/dist/decorators/legacy/on-event.js +0 -3
- package/dist/decorators/legacy/on-event.js.map +0 -9
- package/dist/decorators/legacy/on-updated.d.ts +0 -6
- package/dist/decorators/legacy/on-updated.js +0 -3
- package/dist/decorators/legacy/on-updated.js.map +0 -9
- package/dist/decorators/legacy/query-slot.d.ts +0 -3
- package/dist/decorators/legacy/query-slot.js +0 -3
- package/dist/decorators/legacy/query-slot.js.map +0 -9
- package/dist/decorators/legacy/query.js +0 -3
- package/dist/decorators/legacy/query.js.map +0 -9
- package/dist/decorators/legacy/reactive-field.js +0 -3
- package/dist/decorators/legacy/reactive-field.js.map +0 -9
- package/dist/decorators/legacy/reactive-prop.d.ts +0 -20
- package/dist/decorators/legacy/reactive-prop.js +0 -3
- package/dist/decorators/legacy/reactive-prop.js.map +0 -9
- package/dist/decorators/legacy/signal.js +0 -3
- package/dist/decorators/legacy/signal.js.map +0 -9
- package/dist/decorators/on-event.js +0 -3
- package/dist/decorators/on-event.js.map +0 -9
- package/dist/decorators/on-updated.d.ts +0 -5
- package/dist/decorators/on-updated.js +0 -3
- package/dist/decorators/on-updated.js.map +0 -9
- package/dist/decorators/prop.d.ts +0 -14
- package/dist/decorators/prop.js +0 -3
- package/dist/decorators/prop.js.map +0 -9
- package/dist/decorators/query-slot.d.ts +0 -13
- package/dist/decorators/query-slot.js +0 -3
- package/dist/decorators/query-slot.js.map +0 -9
- package/dist/decorators/query.js +0 -3
- package/dist/decorators/query.js.map +0 -9
- package/dist/decorators/signal.d.ts +0 -23
- package/dist/decorators/signal.js +0 -3
- package/dist/decorators/signal.js.map +0 -9
- package/dist/decorators/standard/bound.js +0 -3
- package/dist/decorators/standard/bound.js.map +0 -9
- package/dist/decorators/standard/custom-element.js +0 -3
- package/dist/decorators/standard/custom-element.js.map +0 -9
- package/dist/decorators/standard/debounce.js +0 -3
- package/dist/decorators/standard/debounce.js.map +0 -9
- package/dist/decorators/standard/event.js +0 -3
- package/dist/decorators/standard/event.js.map +0 -9
- package/dist/decorators/standard/on-event.js +0 -3
- package/dist/decorators/standard/on-event.js.map +0 -9
- package/dist/decorators/standard/on-updated.d.ts +0 -2
- package/dist/decorators/standard/on-updated.js +0 -3
- package/dist/decorators/standard/on-updated.js.map +0 -9
- package/dist/decorators/standard/query-slot.js +0 -3
- package/dist/decorators/standard/query-slot.js.map +0 -9
- package/dist/decorators/standard/query.d.ts +0 -2
- package/dist/decorators/standard/query.js +0 -3
- package/dist/decorators/standard/query.js.map +0 -9
- package/dist/decorators/standard/reactive-field.d.ts +0 -2
- package/dist/decorators/standard/reactive-field.js +0 -3
- package/dist/decorators/standard/reactive-field.js.map +0 -9
- package/dist/decorators/standard/reactive-prop.d.ts +0 -2
- package/dist/decorators/standard/reactive-prop.js +0 -3
- package/dist/decorators/standard/reactive-prop.js.map +0 -9
- package/dist/decorators/standard/signal.js +0 -3
- package/dist/decorators/standard/signal.js.map +0 -9
- package/dist/decorators/state.d.ts +0 -11
- package/dist/decorators/state.js +0 -3
- package/dist/decorators/state.js.map +0 -9
- package/dist/helpers/create-event-listener.js +0 -3
- package/dist/helpers/create-event-listener.js.map +0 -9
- package/dist/helpers/create-event.js +0 -3
- package/dist/helpers/create-event.js.map +0 -9
- package/dist/helpers/create-query-slot.js +0 -3
- package/dist/helpers/create-query-slot.js.map +0 -9
- package/dist/helpers/create-query.js +0 -3
- package/dist/helpers/create-query.js.map +0 -9
- package/dist/helpers/debounce.js +0 -3
- package/dist/helpers/debounce.js.map +0 -9
- package/dist/helpers/index.js +0 -3
- package/dist/helpers/index.js.map +0 -9
- package/dist/index.d.ts +0 -25
- package/dist/index.js +0 -3
- package/dist/index.js.map +0 -9
- package/dist/server/context-ssr.js +0 -3
- package/dist/server/context-ssr.js.map +0 -9
- package/dist/server/html-parser.js +0 -3
- package/dist/server/html-parser.js.map +0 -9
- package/dist/server/install-light-dom-shim.js +0 -3
- package/dist/server/install-light-dom-shim.js.map +0 -10
- package/dist/server/light-dom-shim.js +0 -3
- package/dist/server/light-dom-shim.js.map +0 -9
- package/dist/server/project-root.js +0 -3
- package/dist/server/radiant-component-ssr-runtime.d.ts +0 -9
- package/dist/server/radiant-component-ssr-runtime.js +0 -3
- package/dist/server/radiant-component-ssr-runtime.js.map +0 -9
- package/dist/server/render-component.js +0 -3
- package/dist/server/render-component.js.map +0 -10
- package/dist/server/slot-projection-html.js +0 -3
- package/dist/server/slot-projection-html.js.map +0 -10
- package/dist/signals/host-resource.js +0 -3
- package/dist/signals/host-signal.js +0 -3
- package/dist/signals/host-signal.js.map +0 -9
- package/dist/signals/hydration-script.js +0 -3
- package/dist/signals/hydration-script.js.map +0 -9
- package/dist/tools/escape-script-json.js +0 -3
- package/dist/tools/escape-script-json.js.map +0 -9
- package/dist/tools/event-emitter.js +0 -3
- package/dist/tools/event-emitter.js.map +0 -9
- package/dist/tools/index.js +0 -3
- package/dist/tools/index.js.map +0 -9
- package/dist/tools/render-jsx-template.js +0 -3
- package/dist/tools/render-jsx-template.js.map +0 -9
- package/dist/tools/stringify-typed.d.ts +0 -16
- package/dist/tools/stringify-typed.js +0 -3
- package/dist/tools/stringify-typed.js.map +0 -9
- package/dist/types.js +0 -3
- package/dist/utils/attribute-utils.js +0 -3
- package/dist/utils/attribute-utils.js.map +0 -9
- package/dist/utils/index.js +0 -3
- package/dist/utils/index.js.map +0 -9
- package/size-budget.json +0 -16
- /package/{dist/client → client}/install-hydrator.d.ts +0 -0
- /package/{dist/context → context}/context-ssr-bridge.d.ts +0 -0
- /package/{dist/context → context}/create-context.d.ts +0 -0
- /package/{dist/context → context}/hydration-script.d.ts +0 -0
- /package/{dist/context → context}/types.d.ts +0 -0
- /package/{dist/context → context}/types.js +0 -0
- /package/{dist/context → context}/types.js.map +0 -0
- /package/{dist/core → core}/slot-projection-runtime.d.ts +0 -0
- /package/{dist/core → core}/ssr-hydration-binding.d.ts +0 -0
- /package/{dist/core → core}/ssr-hydration-binding.js +0 -0
- /package/{dist/core → core}/ssr-hydration-binding.js.map +0 -0
- /package/{dist/core → core}/ssr-preparation.d.ts +0 -0
- /package/{dist/decorators → decorators}/legacy/bound.d.ts +0 -0
- /package/{dist/decorators → decorators}/legacy/custom-element.d.ts +0 -0
- /package/{dist/decorators → decorators}/legacy/debounce.d.ts +0 -0
- /package/{dist/decorators → decorators}/legacy/event.d.ts +0 -0
- /package/{dist/decorators → decorators}/standard/bound.d.ts +0 -0
- /package/{dist/decorators → decorators}/standard/custom-element.d.ts +0 -0
- /package/{dist/decorators → decorators}/standard/debounce.d.ts +0 -0
- /package/{dist/decorators → decorators}/standard/event.d.ts +0 -0
- /package/{dist/helpers → helpers}/create-event.d.ts +0 -0
- /package/{dist/helpers → helpers}/debounce.d.ts +0 -0
- /package/{dist/helpers → helpers}/index.d.ts +0 -0
- /package/{dist/server → server}/context-ssr.d.ts +0 -0
- /package/{dist/server → server}/html-parser.d.ts +0 -0
- /package/{dist/server → server}/install-light-dom-shim.d.ts +0 -0
- /package/{dist/server → server}/project-root.d.ts +0 -0
- /package/{dist/server → server}/slot-projection-html.d.ts +0 -0
- /package/{dist/signals → signals}/host-resource.d.ts +0 -0
- /package/{dist/signals → signals}/hydration-script.d.ts +0 -0
- /package/{dist/tools → tools}/escape-script-json.d.ts +0 -0
- /package/{dist/tools → tools}/event-emitter.d.ts +0 -0
- /package/{dist/tools → tools}/render-jsx-template.d.ts +0 -0
- /package/{dist/types.d.ts → types.d.ts} +0 -0
- /package/{dist/utils → utils}/attribute-utils.d.ts +0 -0
- /package/{dist/utils → utils}/index.d.ts +0 -0
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
var X=((j)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(j,{get:(A,B)=>(typeof require<"u"?require:A)[B]}):j)(function(j){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+j+'" is not supported')});function P(j){return!(j instanceof Element)}function U(j){return"shadowRoot"in j?j.shadowRoot??null:null}function V(j){return j instanceof Element?j:j.host}function W(j,A="light"){let B=U(j);if(A==="shadow")return B?[B]:[];if(A==="both")return B?[j,B]:[j];return[j]}function Z(j,A){if(P(j)&&A.scope&&A.scope!=="light")throw Error("RadiantController queries only support light DOM scope.");let B=V(j),I="selector"in A?A.selector:`[data-ref="${A.ref}"]`,E=null,K=()=>{let L=W(B,A.scope);if(A.all)return L.flatMap((G)=>Array.from(G.querySelectorAll(I)));for(let G of L){let N=G.querySelector(I);if(N)return N}return null};return{get value(){if(A.cache){if(E===null||A.all&&Array.isArray(E)&&!E.length)E=K();return E}return K()}}}export{V as resolveQueryHost,Z as createQuery};
|
|
2
|
+
|
|
3
|
+
//# debugId=D4DC29A9DD8A39B764756E2164756E21
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/helpers/create-query.ts"],
|
|
4
|
+
"sourcesContent": [
|
|
5
|
+
"type BaseQueryConfig = {\n\tall?: boolean;\n\tcache?: boolean;\n\tscope?: QueryScope;\n};\n\ntype QueryBySelector = { selector: string };\n\ntype QueryByRef = { ref: string };\n\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"
|
|
6
|
+
],
|
|
7
|
+
"mappings": "2PAyBA,SAAS,CAAuB,CAAC,EAAsD,CACtF,MAAO,EAAE,aAAkB,SAG5B,SAAS,CAAiB,CAAC,EAAkC,CAC5D,MAAO,eAAgB,EAAS,EAAsD,YAAc,KAAQ,KAUtG,SAAS,CAAgB,CAAC,EAAkC,CAClE,OAAO,aAAkB,QAAU,EAAS,EAAO,KAGpD,SAAS,CAAa,CAAC,EAAe,EAAoB,QAAsB,CAC/E,IAAM,EAAa,EAAkB,CAAI,EAEzC,GAAI,IAAU,SACb,OAAO,EAAa,CAAC,CAAU,EAAI,CAAC,EAGrC,GAAI,IAAU,OACb,OAAO,EAAa,CAAC,EAAM,CAAU,EAAI,CAAC,CAAI,EAG/C,MAAO,CAAC,CAAI,EASN,SAAS,CAAoD,CACnE,EACA,EACiB,CACjB,GAAI,EAAwB,CAAM,GAAK,EAAQ,OAAS,EAAQ,QAAU,QACzE,MAAU,MAAM,yDAAyD,EAG1E,IAAM,EAAO,EAAiB,CAAM,EAC9B,EAAW,aAAc,EAAU,EAAQ,SAAW,cAAc,EAAQ,QAC9E,EAAmB,KAEjB,EAAe,IAAgB,CACpC,IAAM,EAAQ,EAAc,EAAM,EAAQ,KAAK,EAE/C,GAAI,EAAQ,IACX,OAAO,EAAM,QAAQ,CAAC,IAAS,MAAM,KAAK,EAAK,iBAAiB,CAAQ,CAAC,CAAC,EAG3E,QAAW,KAAQ,EAAO,CACzB,IAAM,EAAQ,EAAK,cAAc,CAAQ,EACzC,GAAI,EACH,OAAO,EAIT,OAAO,MAGR,MAAO,IACF,MAAK,EAAa,CACrB,GAAI,EAAQ,MAAO,CAClB,GAAI,IAAW,MAAS,EAAQ,KAAO,MAAM,QAAQ,CAAM,GAAK,CAAC,EAAO,OACvE,EAAS,EAAa,EAEvB,OAAO,EAER,OAAO,EAAa,EAEtB",
|
|
8
|
+
"debugId": "D4DC29A9DD8A39B764756E2164756E21",
|
|
9
|
+
"names": []
|
|
10
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
var J=((q)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(q,{get:(E,z)=>(typeof require<"u"?require:E)[z]}):q)(function(q){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+q+'" is not supported')});function L(q,E){let z=null,j=null,B,F=()=>{if(z!==null)clearTimeout(z),z=null},H=()=>{if(j===null)return B;let G=j;return j=null,F(),B=G(),B},D=function(...G){j=()=>q.apply(this,G),F(),z=setTimeout(()=>{H()},E)};return D.cancel=()=>{F(),j=null},D.flush=()=>{if(j===null)return B;return H()},D.pending=()=>j!==null,D}export{L as debounce};
|
|
2
|
+
|
|
3
|
+
//# debugId=C03902A4E5F2B24F64756E2164756E21
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"sourcesContent": [
|
|
5
5
|
"import type { Method } from '../types';\n\n/**\n * A debounced function with imperative helpers for controlling pending work.\n *\n * @typeParam T The wrapped callback type.\n */\nexport interface DebouncedFunction<T extends Method> {\n\t(...args: Parameters<T>): void;\n\n\t/**\n\t * Cancels the pending callback invocation, if one exists.\n\t */\n\tcancel(): void;\n\n\t/**\n\t * Immediately invokes the latest pending callback invocation.\n\t *\n\t * @returns The callback result when a call is pending, or the last completed\n\t * result when no call is pending.\n\t */\n\tflush(): ReturnType<T> | undefined;\n\n\t/**\n\t * Reports whether the callback currently has a scheduled invocation.\n\t *\n\t * @returns True when a call is pending.\n\t */\n\tpending(): boolean;\n}\n\n/**\n * Creates a debounced wrapper around a function.\n *\n * The returned function delays invocation until the configured timeout has\n * elapsed since the latest call. It also exposes helpers to cancel, flush,\n * and inspect pending work.\n *\n * @typeParam T The wrapped callback type.\n * @param callback The callback to debounce.\n * @param timeout The debounce timeout in milliseconds.\n * @returns A debounced wrapper around the callback.\n */\nexport function debounce<T extends Method>(callback: T, timeout: number): DebouncedFunction<T> {\n\tlet timeoutRef: ReturnType<typeof setTimeout> | null = null;\n\tlet pendingInvocation: (() => ReturnType<T>) | null = null;\n\tlet lastResult: ReturnType<T> | undefined;\n\n\tconst clearPendingCall = () => {\n\t\tif (timeoutRef !== null) {\n\t\t\tclearTimeout(timeoutRef);\n\t\t\ttimeoutRef = null;\n\t\t}\n\t};\n\n\tconst invoke = (): ReturnType<T> | undefined => {\n\t\tif (pendingInvocation === null) {\n\t\t\treturn lastResult;\n\t\t}\n\n\t\tconst invocation = pendingInvocation;\n\t\tpendingInvocation = null;\n\t\tclearPendingCall();\n\t\tlastResult = invocation();\n\n\t\treturn lastResult;\n\t};\n\n\tconst debounced = function (this: ThisParameterType<T>, ...args: Parameters<T>) {\n\t\tpendingInvocation = () => callback.apply(this, args) as ReturnType<T>;\n\t\tclearPendingCall();\n\t\ttimeoutRef = setTimeout(() => {\n\t\t\tinvoke();\n\t\t}, timeout);\n\t} as DebouncedFunction<T>;\n\n\tdebounced.cancel = () => {\n\t\tclearPendingCall();\n\t\tpendingInvocation = null;\n\t};\n\n\tdebounced.flush = () => {\n\t\tif (pendingInvocation === null) {\n\t\t\treturn lastResult;\n\t\t}\n\n\t\treturn invoke();\n\t};\n\n\tdebounced.pending = () => pendingInvocation !== null;\n\n\treturn debounced;\n}\n"
|
|
6
6
|
],
|
|
7
|
-
"mappings": "
|
|
8
|
-
"debugId": "
|
|
7
|
+
"mappings": "2PA2CO,SAAS,CAA0B,CAAC,EAAa,EAAuC,CAC9F,IAAI,EAAmD,KACnD,EAAkD,KAClD,EAEE,EAAmB,IAAM,CAC9B,GAAI,IAAe,KAClB,aAAa,CAAU,EACvB,EAAa,MAIT,EAAS,IAAiC,CAC/C,GAAI,IAAsB,KACzB,OAAO,EAGR,IAAM,EAAa,EAKnB,OAJA,EAAoB,KACpB,EAAiB,EACjB,EAAa,EAAW,EAEjB,GAGF,EAAY,QAAS,IAAgC,EAAqB,CAC/E,EAAoB,IAAM,EAAS,MAAM,KAAM,CAAI,EACnD,EAAiB,EACjB,EAAa,WAAW,IAAM,CAC7B,EAAO,GACL,CAAO,GAkBX,OAfA,EAAU,OAAS,IAAM,CACxB,EAAiB,EACjB,EAAoB,MAGrB,EAAU,MAAQ,IAAM,CACvB,GAAI,IAAsB,KACzB,OAAO,EAGR,OAAO,EAAO,GAGf,EAAU,QAAU,IAAM,IAAsB,KAEzC",
|
|
8
|
+
"debugId": "C03902A4E5F2B24F64756E2164756E21",
|
|
9
9
|
"names": []
|
|
10
10
|
}
|
package/helpers/index.js
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
var q=(($)=>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')});function T($,x){let W=null,B=null,_,N=()=>{if(W!==null)clearTimeout(W),W=null},U=()=>{if(B===null)return _;let X=B;return B=null,N(),_=X(),_},G=function(...X){B=()=>$.apply(this,X),N(),W=setTimeout(()=>{U()},x)};return G.cancel=()=>{N(),B=null},G.flush=()=>{if(B===null)return _;return U()},G.pending=()=>B!==null,G}class D{host;eventConfig;constructor($,x){this.host=$,this.eventConfig=x}emit($){let x=new CustomEvent(this.eventConfig.name,{detail:$,bubbles:this.eventConfig.bubbles,cancelable:this.eventConfig.cancelable,composed:this.eventConfig.composed});this.host.dispatchEvent(x)}}function y($,x){let W=new D($,x);return $.registerEventEmitter(x.name,W),W}function M($){let x=globalThis.CSS;if(typeof x?.escape==="function")return x.escape($);let W="";for(let B=0;B<$.length;B+=1){let _=$[B]??"",N=_.codePointAt(0)??0;if(N===0){W+="�";continue}let U=N>=1&&N<=31||N===127,G=B===0&&N>=48&&N<=57,X=B===1&&N>=48&&N<=57&&($[0]??"")==="-",Y=B===0&&_==="-"&&$.length===1;if(U||G||X){W+=`\\${N.toString(16)} `;continue}if(N>=128||_==="-"||_==="_"||N>=48&&N<=57||N>=65&&N<=90||N>=97&&N<=122){W+=Y?`\\${_}`:_;continue}W+=`\\${_}`}return W}var Z=Symbol("radiant.shadowRootListenerHooks"),O=Symbol("radiant.patchedAttachShadow");function J($){if($ instanceof Element)return $;if("host"in $)return $.host;return $.element}function V($){return!($ instanceof Element)}function P($,x,W,B){let _=(N)=>{if(N.target instanceof Element&&N.target.matches(W))B(N)};return $.addEventListener(x.type,_,x.options),()=>{$.removeEventListener(x.type,_,x.options)}}function K($,x){let W=J($);if(!W[Z])W[Z]=new Set;if(W[Z].add(x),W[O])return;let B=W.attachShadow;W.attachShadow=function(N){let U=B.call(this,N);for(let G of W[Z]??[])G();return U},W[O]=!0}function m($,x,W){if(V($)&&"scope"in x&&x.scope&&x.scope!=="light")throw Error("RadiantController event listeners only support light DOM scope.");let B=J($),_=W.bind($),N=null,U=null,G=null,X=null,Y=!1,F=()=>{N?.(),U?.(),G?.(),X?.(),N=null,U=null,G=null,X=null},j=()=>{if(Y)return;if("window"in x&&!N)window.addEventListener(x.type,_,x.options),N=()=>{window.removeEventListener(x.type,_,x.options)};if("document"in x&&!U)document.addEventListener(x.type,_,x.options),U=()=>{document.removeEventListener(x.type,_,x.options)};if("selector"in x||"ref"in x){let z="selector"in x?x.selector:`[data-ref='${M(x.ref)}']`;if(x.scope!=="shadow"&&!G)G=P(B,x,z,_);if(x.scope!=="light"&&B.shadowRoot&&!X)X=P(B.shadowRoot,x,z,_)}};if("selector"in x||"ref"in x){if(x.scope!=="light")K($,()=>{if($.isConnected)j()})}if($.registerConnectedCallback(j),$.registerCleanupCallback(F),$.isConnected)j();return()=>{Y=!0,F()}}function I($){return!($ instanceof Element)}function S($){return"shadowRoot"in $?$.shadowRoot??null:null}function Q($){return $ instanceof Element?$:$.host}function A($,x="light"){let W=S($);if(x==="shadow")return W?[W]:[];if(x==="both")return W?[$,W]:[$];return[$]}function w($,x){if(I($)&&x.scope&&x.scope!=="light")throw Error("RadiantController queries only support light DOM scope.");let W=Q($),B="selector"in x?x.selector:`[data-ref="${x.ref}"]`,_=null,N=()=>{let U=A(W,x.scope);if(x.all)return U.flatMap((G)=>Array.from(G.querySelectorAll(B)));for(let G of U){let X=G.querySelector(B);if(X)return X}return null};return{get value(){if(x.cache){if(_===null||x.all&&Array.isArray(_)&&!_.length)_=N();return _}return N()}}}function f($,x={}){let W=null,B,_=()=>{if(x.all)return $.getSlotElements(x.name);return $.getSlotElements(x.name)[0]??null};return{get value(){if(x.cache===!1)return _();let N=$.slotProjectionVersion??0;if(B!==N)W=_(),B=N;return W}}}export{Q as resolveQueryHost,T as debounce,f as createQuerySlot,w as createQuery,m as createEventListener,y as createEvent};
|
|
2
|
+
|
|
3
|
+
//# debugId=A311FE0D377E2D4464756E2164756E21
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/helpers/debounce.ts", "../src/tools/event-emitter.ts", "../src/helpers/create-event.ts", "../src/tools/escape-css-identifier.ts", "../src/helpers/create-event-listener.ts", "../src/helpers/create-query.ts", "../src/helpers/create-query-slot.ts"],
|
|
4
|
+
"sourcesContent": [
|
|
5
|
+
"import type { Method } from '../types';\n\n/**\n * A debounced function with imperative helpers for controlling pending work.\n *\n * @typeParam T The wrapped callback type.\n */\nexport interface DebouncedFunction<T extends Method> {\n\t(...args: Parameters<T>): void;\n\n\t/**\n\t * Cancels the pending callback invocation, if one exists.\n\t */\n\tcancel(): void;\n\n\t/**\n\t * Immediately invokes the latest pending callback invocation.\n\t *\n\t * @returns The callback result when a call is pending, or the last completed\n\t * result when no call is pending.\n\t */\n\tflush(): ReturnType<T> | undefined;\n\n\t/**\n\t * Reports whether the callback currently has a scheduled invocation.\n\t *\n\t * @returns True when a call is pending.\n\t */\n\tpending(): boolean;\n}\n\n/**\n * Creates a debounced wrapper around a function.\n *\n * The returned function delays invocation until the configured timeout has\n * elapsed since the latest call. It also exposes helpers to cancel, flush,\n * and inspect pending work.\n *\n * @typeParam T The wrapped callback type.\n * @param callback The callback to debounce.\n * @param timeout The debounce timeout in milliseconds.\n * @returns A debounced wrapper around the callback.\n */\nexport function debounce<T extends Method>(callback: T, timeout: number): DebouncedFunction<T> {\n\tlet timeoutRef: ReturnType<typeof setTimeout> | null = null;\n\tlet pendingInvocation: (() => ReturnType<T>) | null = null;\n\tlet lastResult: ReturnType<T> | undefined;\n\n\tconst clearPendingCall = () => {\n\t\tif (timeoutRef !== null) {\n\t\t\tclearTimeout(timeoutRef);\n\t\t\ttimeoutRef = null;\n\t\t}\n\t};\n\n\tconst invoke = (): ReturnType<T> | undefined => {\n\t\tif (pendingInvocation === null) {\n\t\t\treturn lastResult;\n\t\t}\n\n\t\tconst invocation = pendingInvocation;\n\t\tpendingInvocation = null;\n\t\tclearPendingCall();\n\t\tlastResult = invocation();\n\n\t\treturn lastResult;\n\t};\n\n\tconst debounced = function (this: ThisParameterType<T>, ...args: Parameters<T>) {\n\t\tpendingInvocation = () => callback.apply(this, args) as ReturnType<T>;\n\t\tclearPendingCall();\n\t\ttimeoutRef = setTimeout(() => {\n\t\t\tinvoke();\n\t\t}, timeout);\n\t} as DebouncedFunction<T>;\n\n\tdebounced.cancel = () => {\n\t\tclearPendingCall();\n\t\tpendingInvocation = null;\n\t};\n\n\tdebounced.flush = () => {\n\t\tif (pendingInvocation === null) {\n\t\t\treturn lastResult;\n\t\t}\n\n\t\treturn invoke();\n\t};\n\n\tdebounced.pending = () => pendingInvocation !== null;\n\n\treturn debounced;\n}\n",
|
|
6
|
+
"import type { RadiantElement } from '../core/radiant-element';\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
|
+
"export function escapeCssIdentifier(value: string): string {\n\tconst cssNamespace = globalThis.CSS as { escape?: (value: string) => string } | undefined;\n\n\tif (typeof cssNamespace?.escape === 'function') {\n\t\treturn cssNamespace.escape(value);\n\t}\n\n\tlet escaped = '';\n\n\tfor (let index = 0; index < value.length; index += 1) {\n\t\tconst character = value[index] ?? '';\n\t\tconst codePoint = character.codePointAt(0) ?? 0;\n\n\t\tif (codePoint === 0) {\n\t\t\tescaped += '\\uFFFD';\n\t\t\tcontinue;\n\t\t}\n\n\t\tconst isControlCharacter = (codePoint >= 0x0001 && codePoint <= 0x001f) || codePoint === 0x007f;\n\t\tconst startsWithDigit = index === 0 && codePoint >= 0x0030 && codePoint <= 0x0039;\n\t\tconst startsWithHyphenDigit =\n\t\t\tindex === 1 && codePoint >= 0x0030 && codePoint <= 0x0039 && (value[0] ?? '') === '-';\n\t\tconst isSingleHyphen = index === 0 && character === '-' && value.length === 1;\n\n\t\tif (isControlCharacter || startsWithDigit || startsWithHyphenDigit) {\n\t\t\tescaped += `\\\\${codePoint.toString(16)} `;\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (\n\t\t\tcodePoint >= 0x0080 ||\n\t\t\tcharacter === '-' ||\n\t\t\tcharacter === '_' ||\n\t\t\t(codePoint >= 0x0030 && codePoint <= 0x0039) ||\n\t\t\t(codePoint >= 0x0041 && codePoint <= 0x005a) ||\n\t\t\t(codePoint >= 0x0061 && codePoint <= 0x007a)\n\t\t) {\n\t\t\tescaped += isSingleHyphen ? `\\\\${character}` : character;\n\t\t\tcontinue;\n\t\t}\n\n\t\tescaped += `\\\\${character}`;\n\t}\n\n\treturn escaped;\n}\n",
|
|
9
|
+
"import type { RadiantElementEventListener } from '../core/radiant-element';\nimport { escapeCssIdentifier } from '../tools/escape-css-identifier';\n\n/**\n * Selects which DOM tree delegated event listeners should observe.\n */\nexport type OnEventScope = 'light' | 'shadow' | 'both';\n\ntype BaseOnEventConfig = Pick<RadiantElementEventListener, 'type' | 'options'> & {\n\tscope?: OnEventScope;\n};\n\nexport type OnEventConfig = BaseOnEventConfig &\n\t(\n\t\t| {\n\t\t\t\tselector: string;\n\t\t }\n\t\t| {\n\t\t\t\tref: string;\n\t\t }\n\t\t| {\n\t\t\t\twindow: true;\n\t\t }\n\t\t| {\n\t\t\t\tdocument: true;\n\t\t }\n\t);\n\ntype DelegatedEventRoot = Element | ShadowRoot;\n\ntype EventListenerLifecycleHost = {\n\tregisterConnectedCallback(callback: () => void): void;\n\tregisterCleanupCallback(callback: () => void): void;\n\tisConnected: boolean;\n};\n\nexport type EventListenerHost =\n\t| (EventListenerLifecycleHost & Element)\n\t| (EventListenerLifecycleHost & { host: Element })\n\t| (EventListenerLifecycleHost & { element: Element });\n\nconst shadowRootListenerHooksKey = Symbol('radiant.shadowRootListenerHooks');\nconst patchedAttachShadowKey = Symbol('radiant.patchedAttachShadow');\n\ntype ShadowRootHookHost = Element & {\n\t[patchedAttachShadowKey]?: true;\n\t[shadowRootListenerHooksKey]?: Set<() => void>;\n};\n\nfunction resolveEventListenerHostElement(host: EventListenerHost): Element {\n\tif (host instanceof Element) {\n\t\treturn host;\n\t}\n\n\tif ('host' in host) {\n\t\treturn host.host;\n\t}\n\n\treturn host.element;\n}\n\nfunction isControllerEventHost(host: EventListenerHost): host is EventListenerLifecycleHost & { host: Element } {\n\treturn !(host instanceof Element);\n}\n\nfunction addDelegatedListener(\n\troot: DelegatedEventRoot,\n\tconfig: Pick<OnEventConfig, 'type' | 'options'>,\n\tselector: string,\n\tlistener: EventListener,\n): () => void {\n\tconst delegatedListener = (event: Event) => {\n\t\tif (event.target instanceof Element && event.target.matches(selector)) {\n\t\t\tlistener(event);\n\t\t}\n\t};\n\n\troot.addEventListener(config.type, delegatedListener, config.options);\n\n\treturn () => {\n\t\troot.removeEventListener(config.type, delegatedListener, config.options);\n\t};\n}\n\nfunction registerShadowRootHook(host: EventListenerHost, hook: () => void): void {\n\tconst shadowAwareHost = resolveEventListenerHostElement(host) as ShadowRootHookHost;\n\n\tif (!shadowAwareHost[shadowRootListenerHooksKey]) {\n\t\tshadowAwareHost[shadowRootListenerHooksKey] = new Set();\n\t}\n\n\tshadowAwareHost[shadowRootListenerHooksKey].add(hook);\n\n\tif (shadowAwareHost[patchedAttachShadowKey]) {\n\t\treturn;\n\t}\n\n\tconst originalAttachShadow = shadowAwareHost.attachShadow;\n\n\tshadowAwareHost.attachShadow = function patchedAttachShadow(init: ShadowRootInit): ShadowRoot {\n\t\tconst shadowRoot = originalAttachShadow.call(this, init);\n\t\tfor (const shadowRootHook of shadowAwareHost[shadowRootListenerHooksKey] ?? []) {\n\t\t\tshadowRootHook();\n\t\t}\n\t\treturn shadowRoot;\n\t};\n\n\tshadowAwareHost[patchedAttachShadowKey] = true;\n}\n\n/**\n * Subscribes to a DOM event with delegation, window, or document targeting.\n * Functional equivalent of the `@onEvent` decorator for vanilla JS usage.\n * Returns a cleanup function to remove the listener.\n * @param host The host RadiantElement.\n * @param config The event listener configuration.\n * @param callback The event handler function.\n */\nexport function createEventListener(\n\thost: EventListenerHost,\n\tconfig: OnEventConfig,\n\tcallback: (event: Event) => void,\n): () => void {\n\tif (isControllerEventHost(host) && 'scope' in config && config.scope && config.scope !== 'light') {\n\t\tthrow new Error('RadiantController event listeners only support light DOM scope.');\n\t}\n\n\tconst hostElement = resolveEventListenerHostElement(host);\n\tconst boundCallback = callback.bind(host);\n\tlet windowCleanup: (() => void) | null = null;\n\tlet documentCleanup: (() => void) | null = null;\n\tlet lightCleanup: (() => void) | null = null;\n\tlet shadowCleanup: (() => void) | null = null;\n\tlet disposed = false;\n\n\tconst detachListeners = () => {\n\t\twindowCleanup?.();\n\t\tdocumentCleanup?.();\n\t\tlightCleanup?.();\n\t\tshadowCleanup?.();\n\n\t\twindowCleanup = null;\n\t\tdocumentCleanup = null;\n\t\tlightCleanup = null;\n\t\tshadowCleanup = null;\n\t};\n\n\tconst attachListeners = () => {\n\t\tif (disposed) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ('window' in config && !windowCleanup) {\n\t\t\twindow.addEventListener(config.type, boundCallback, config.options);\n\t\t\twindowCleanup = () => {\n\t\t\t\twindow.removeEventListener(config.type, boundCallback, config.options);\n\t\t\t};\n\t\t}\n\n\t\tif ('document' in config && !documentCleanup) {\n\t\t\tdocument.addEventListener(config.type, boundCallback, config.options);\n\t\t\tdocumentCleanup = () => {\n\t\t\t\tdocument.removeEventListener(config.type, boundCallback, config.options);\n\t\t\t};\n\t\t}\n\n\t\tif ('selector' in config || 'ref' in config) {\n\t\t\tconst selector = 'selector' in config ? config.selector : `[data-ref='${escapeCssIdentifier(config.ref)}']`;\n\n\t\t\tif (config.scope !== 'shadow' && !lightCleanup) {\n\t\t\t\tlightCleanup = addDelegatedListener(hostElement, config, selector, boundCallback);\n\t\t\t}\n\n\t\t\tif (config.scope !== 'light' && hostElement.shadowRoot && !shadowCleanup) {\n\t\t\t\tshadowCleanup = addDelegatedListener(hostElement.shadowRoot, config, selector, boundCallback);\n\t\t\t}\n\t\t}\n\t};\n\n\tif ('selector' in config || 'ref' in config) {\n\t\tif (config.scope !== 'light') {\n\t\t\tregisterShadowRootHook(host, () => {\n\t\t\t\tif (host.isConnected) {\n\t\t\t\t\tattachListeners();\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\n\thost.registerConnectedCallback(attachListeners);\n\thost.registerCleanupCallback(detachListeners);\n\n\tif (host.isConnected) {\n\t\tattachListeners();\n\t}\n\n\treturn () => {\n\t\tdisposed = true;\n\t\tdetachListeners();\n\t};\n}\n",
|
|
10
|
+
"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",
|
|
11
|
+
"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"
|
|
12
|
+
],
|
|
13
|
+
"mappings": "2PA2CO,SAAS,CAA0B,CAAC,EAAa,EAAuC,CAC9F,IAAI,EAAmD,KACnD,EAAkD,KAClD,EAEE,EAAmB,IAAM,CAC9B,GAAI,IAAe,KAClB,aAAa,CAAU,EACvB,EAAa,MAIT,EAAS,IAAiC,CAC/C,GAAI,IAAsB,KACzB,OAAO,EAGR,IAAM,EAAa,EAKnB,OAJA,EAAoB,KACpB,EAAiB,EACjB,EAAa,EAAW,EAEjB,GAGF,EAAY,QAAS,IAAgC,EAAqB,CAC/E,EAAoB,IAAM,EAAS,MAAM,KAAM,CAAI,EACnD,EAAiB,EACjB,EAAa,WAAW,IAAM,CAC7B,EAAO,GACL,CAAO,GAkBX,OAfA,EAAU,OAAS,IAAM,CACxB,EAAiB,EACjB,EAAoB,MAGrB,EAAU,MAAQ,IAAM,CACvB,GAAI,IAAsB,KACzB,OAAO,EAGR,OAAO,EAAO,GAGf,EAAU,QAAU,IAAM,IAAsB,KAEzC,EC7ED,MAAM,CAA0B,CAC9B,KACA,YAQR,WAAW,CAAC,EAAsB,EAAiC,CAClE,KAAK,KAAO,EACZ,KAAK,YAAc,EAQpB,IAAI,CAAC,EAAY,CAChB,IAAM,EAAQ,IAAI,YAAY,KAAK,YAAY,KAAM,CACpD,OAAQ,EACR,QAAS,KAAK,YAAY,QAC1B,WAAY,KAAK,YAAY,WAC7B,SAAU,KAAK,YAAY,QAC5B,CAAC,EACD,KAAK,KAAK,cAAc,CAAK,EAE/B,CClCO,SAAS,CAAwB,CAAC,EAAsB,EAA6C,CAC3G,IAAM,EAAU,IAAI,EAAgB,EAAM,CAAM,EAEhD,OADA,EAAK,qBAAqB,EAAO,KAAM,CAAO,EACvC,ECZD,SAAS,CAAmB,CAAC,EAAuB,CAC1D,IAAM,EAAe,WAAW,IAEhC,GAAI,OAAO,GAAc,SAAW,WACnC,OAAO,EAAa,OAAO,CAAK,EAGjC,IAAI,EAAU,GAEd,QAAS,EAAQ,EAAG,EAAQ,EAAM,OAAQ,GAAS,EAAG,CACrD,IAAM,EAAY,EAAM,IAAU,GAC5B,EAAY,EAAU,YAAY,CAAC,GAAK,EAE9C,GAAI,IAAc,EAAG,CACpB,GAAW,IACX,SAGD,IAAM,EAAsB,GAAa,GAAU,GAAa,IAAW,IAAc,IACnF,EAAkB,IAAU,GAAK,GAAa,IAAU,GAAa,GACrE,EACL,IAAU,GAAK,GAAa,IAAU,GAAa,KAAW,EAAM,IAAM,MAAQ,IAC7E,EAAiB,IAAU,GAAK,IAAc,KAAO,EAAM,SAAW,EAE5E,GAAI,GAAsB,GAAmB,EAAuB,CACnE,GAAW,KAAK,EAAU,SAAS,EAAE,KACrC,SAGD,GACC,GAAa,KACb,IAAc,KACd,IAAc,KACb,GAAa,IAAU,GAAa,IACpC,GAAa,IAAU,GAAa,IACpC,GAAa,IAAU,GAAa,IACpC,CACD,GAAW,EAAiB,KAAK,IAAc,EAC/C,SAGD,GAAW,KAAK,IAGjB,OAAO,ECHR,IAAM,EAA6B,OAAO,iCAAiC,EACrE,EAAyB,OAAO,6BAA6B,EAOnE,SAAS,CAA+B,CAAC,EAAkC,CAC1E,GAAI,aAAgB,QACnB,OAAO,EAGR,GAAI,SAAU,EACb,OAAO,EAAK,KAGb,OAAO,EAAK,QAGb,SAAS,CAAqB,CAAC,EAAiF,CAC/G,MAAO,EAAE,aAAgB,SAG1B,SAAS,CAAoB,CAC5B,EACA,EACA,EACA,EACa,CACb,IAAM,EAAoB,CAAC,IAAiB,CAC3C,GAAI,EAAM,kBAAkB,SAAW,EAAM,OAAO,QAAQ,CAAQ,EACnE,EAAS,CAAK,GAMhB,OAFA,EAAK,iBAAiB,EAAO,KAAM,EAAmB,EAAO,OAAO,EAE7D,IAAM,CACZ,EAAK,oBAAoB,EAAO,KAAM,EAAmB,EAAO,OAAO,GAIzE,SAAS,CAAsB,CAAC,EAAyB,EAAwB,CAChF,IAAM,EAAkB,EAAgC,CAAI,EAE5D,GAAI,CAAC,EAAgB,GACpB,EAAgB,GAA8B,IAAI,IAKnD,GAFA,EAAgB,GAA4B,IAAI,CAAI,EAEhD,EAAgB,GACnB,OAGD,IAAM,EAAuB,EAAgB,aAE7C,EAAgB,aAAe,QAA4B,CAAC,EAAkC,CAC7F,IAAM,EAAa,EAAqB,KAAK,KAAM,CAAI,EACvD,QAAW,KAAkB,EAAgB,IAA+B,CAAC,EAC5E,EAAe,EAEhB,OAAO,GAGR,EAAgB,GAA0B,GAWpC,SAAS,CAAmB,CAClC,EACA,EACA,EACa,CACb,GAAI,EAAsB,CAAI,GAAK,UAAW,GAAU,EAAO,OAAS,EAAO,QAAU,QACxF,MAAU,MAAM,iEAAiE,EAGlF,IAAM,EAAc,EAAgC,CAAI,EAClD,EAAgB,EAAS,KAAK,CAAI,EACpC,EAAqC,KACrC,EAAuC,KACvC,EAAoC,KACpC,EAAqC,KACrC,EAAW,GAET,EAAkB,IAAM,CAC7B,IAAgB,EAChB,IAAkB,EAClB,IAAe,EACf,IAAgB,EAEhB,EAAgB,KAChB,EAAkB,KAClB,EAAe,KACf,EAAgB,MAGX,EAAkB,IAAM,CAC7B,GAAI,EACH,OAGD,GAAI,WAAY,GAAU,CAAC,EAC1B,OAAO,iBAAiB,EAAO,KAAM,EAAe,EAAO,OAAO,EAClE,EAAgB,IAAM,CACrB,OAAO,oBAAoB,EAAO,KAAM,EAAe,EAAO,OAAO,GAIvE,GAAI,aAAc,GAAU,CAAC,EAC5B,SAAS,iBAAiB,EAAO,KAAM,EAAe,EAAO,OAAO,EACpE,EAAkB,IAAM,CACvB,SAAS,oBAAoB,EAAO,KAAM,EAAe,EAAO,OAAO,GAIzE,GAAI,aAAc,GAAU,QAAS,EAAQ,CAC5C,IAAM,EAAW,aAAc,EAAS,EAAO,SAAW,cAAc,EAAoB,EAAO,GAAG,MAEtG,GAAI,EAAO,QAAU,UAAY,CAAC,EACjC,EAAe,EAAqB,EAAa,EAAQ,EAAU,CAAa,EAGjF,GAAI,EAAO,QAAU,SAAW,EAAY,YAAc,CAAC,EAC1D,EAAgB,EAAqB,EAAY,WAAY,EAAQ,EAAU,CAAa,IAK/F,GAAI,aAAc,GAAU,QAAS,GACpC,GAAI,EAAO,QAAU,QACpB,EAAuB,EAAM,IAAM,CAClC,GAAI,EAAK,YACR,EAAgB,EAEjB,EAOH,GAHA,EAAK,0BAA0B,CAAe,EAC9C,EAAK,wBAAwB,CAAe,EAExC,EAAK,YACR,EAAgB,EAGjB,MAAO,IAAM,CACZ,EAAW,GACX,EAAgB,GC7KlB,SAAS,CAAuB,CAAC,EAAsD,CACtF,MAAO,EAAE,aAAkB,SAG5B,SAAS,CAAiB,CAAC,EAAkC,CAC5D,MAAO,eAAgB,EAAS,EAAsD,YAAc,KAAQ,KAUtG,SAAS,CAAgB,CAAC,EAAkC,CAClE,OAAO,aAAkB,QAAU,EAAS,EAAO,KAGpD,SAAS,CAAa,CAAC,EAAe,EAAoB,QAAsB,CAC/E,IAAM,EAAa,EAAkB,CAAI,EAEzC,GAAI,IAAU,SACb,OAAO,EAAa,CAAC,CAAU,EAAI,CAAC,EAGrC,GAAI,IAAU,OACb,OAAO,EAAa,CAAC,EAAM,CAAU,EAAI,CAAC,CAAI,EAG/C,MAAO,CAAC,CAAI,EASN,SAAS,CAAoD,CACnE,EACA,EACiB,CACjB,GAAI,EAAwB,CAAM,GAAK,EAAQ,OAAS,EAAQ,QAAU,QACzE,MAAU,MAAM,yDAAyD,EAG1E,IAAM,EAAO,EAAiB,CAAM,EAC9B,EAAW,aAAc,EAAU,EAAQ,SAAW,cAAc,EAAQ,QAC9E,EAAmB,KAEjB,EAAe,IAAgB,CACpC,IAAM,EAAQ,EAAc,EAAM,EAAQ,KAAK,EAE/C,GAAI,EAAQ,IACX,OAAO,EAAM,QAAQ,CAAC,IAAS,MAAM,KAAK,EAAK,iBAAiB,CAAQ,CAAC,CAAC,EAG3E,QAAW,KAAQ,EAAO,CACzB,IAAM,EAAQ,EAAK,cAAc,CAAQ,EACzC,GAAI,EACH,OAAO,EAIT,OAAO,MAGR,MAAO,IACF,MAAK,EAAa,CACrB,GAAI,EAAQ,MAAO,CAClB,GAAI,IAAW,MAAS,EAAQ,KAAO,MAAM,QAAQ,CAAM,GAAK,CAAC,EAAO,OACvE,EAAS,EAAa,EAEvB,OAAO,EAER,OAAO,EAAa,EAEtB,ECnFM,SAAS,CAAsE,CACrF,EACA,EAA2B,CAAC,EACP,CACrB,IAAI,EAAmB,KACnB,EAEE,EAAe,IAAgB,CACpC,GAAI,EAAQ,IACX,OAAO,EAAK,gBAAgB,EAAQ,IAAI,EAEzC,OAAQ,EAAK,gBAAgB,EAAQ,IAAI,EAAE,IAAM,MAGlD,MAAO,IACF,MAAK,EAAa,CACrB,GAAI,EAAQ,QAAU,GACrB,OAAO,EAAa,EAGrB,IAAM,EAAkB,EAAuD,uBAAyB,EAExG,GAAI,IAAkB,EACrB,EAAS,EAAa,EACtB,EAAgB,EAGjB,OAAO,EAET",
|
|
14
|
+
"debugId": "A311FE0D377E2D4464756E2164756E21",
|
|
15
|
+
"names": []
|
|
16
|
+
}
|
package/index.d.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export * from './core/radiant-element';
|
|
2
|
+
export * from './core/radiant-controller';
|
|
3
|
+
export * from './controller-registry';
|
|
4
|
+
export * from './decorators/attr';
|
|
5
|
+
export * from './decorators/bound';
|
|
6
|
+
export * from './decorators/controller';
|
|
7
|
+
export * from './decorators/custom-element';
|
|
8
|
+
export * from './decorators/debounce';
|
|
9
|
+
export * from './decorators/event';
|
|
10
|
+
export * from './decorators/on-event';
|
|
11
|
+
export * from './decorators/on-updated';
|
|
12
|
+
export * from './decorators/prop';
|
|
13
|
+
export * from './decorators/query';
|
|
14
|
+
export * from './decorators/query-slot';
|
|
15
|
+
export * from './decorators/signal';
|
|
16
|
+
export * from './decorators/state';
|
package/index.js
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
var SM=((F)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(F,{get:(M,x)=>(typeof require<"u"?require:M)[x]}):F)(function(F){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+F+'" is not supported')});var A0=Symbol.for("@ecopages/radiant.legacy-instance-initializers"),G0=Symbol.for("@ecopages/radiant.legacy-post-construction-initializers"),bF=Symbol.for("@ecopages/radiant.legacy-executed-post-construction-initializers");function Q(F,M){D0(F,A0,M)}function Q0(F,M){D0(F,G0,M)}function C(F){o(F,A0)}function j(F){let M=F;o(F,G0,M[bF]??=new Set)}function D0(F,M,x){let $=F,H=Object.prototype.hasOwnProperty.call($,M)?$[M]:void 0;if(Array.isArray(H)){H.push(x);return}Object.defineProperty($,M,{value:[x]})}function o(F,M,x,$=Object.getPrototypeOf(F)){if(!$||$===Object.prototype)return;o(F,M,x,Object.getPrototypeOf($));let H=$[M];if(!Array.isArray(H))return;for(let P of H){if(x?.has(P))continue;P(F),x?.add(P)}}function q0(F){switch(F){case Array:return"array";case Boolean:return"boolean";case Number:return"number";case Object:return"object";case String:return"string"}}function NF(F){switch(typeof F){case"boolean":return"boolean";case"number":return"number";case"string":return"string"}if(Array.isArray(F))return"array";if(Object.prototype.toString.call(F)==="[object Object]")return"object"}function K(F){switch(F){case Number:return 0;case String:return"";case Boolean:return!1;default:return null}}function vF(F){try{return JSON.parse(F)}catch{throw TypeError("Invalid JSON string")}}var hF={array(F){let M=vF(F);if(!Array.isArray(M))throw TypeError(`Expected an array but got a value of type "${typeof M}"`);return M},boolean(F){return!(F==="0"||String(F).toLowerCase()==="false")},number(F){return Number(F.replace(/_/g,""))},object(F){let M=JSON.parse(F);if(M===null||typeof M!=="object"||Array.isArray(M))throw TypeError(`expected value of type "object" but instead got value "${F}" of type "${NF(M)}"`);return M},string(F){return F}},R0={default:U0,array:J0,object:J0};function J0(F){return JSON.stringify(F)}function U0(F){return`${F}`}function _(F,M){let x=q0(M);if(!x)throw TypeError(`[radiant-element] Unknown type "${M}"`);return hF[x](F)}function O(F,M){let x=q0(M);if(!x)throw TypeError(`[radiant-element] Unknown type "${M}"`);return(R0[x]??R0.default??U0)(F)}function gF(F){return typeof F==="boolean"}function uF(F){return typeof F==="number"}function yF(F){return typeof F==="string"}function mF(F){return Array.isArray(F)}function cF(F){return typeof F==="object"&&!Array.isArray(F)&&F!==null}function j0(F,M){switch(F){case Boolean:return gF(M);case Number:return uF(M);case String:return yF(M);case Array:return mF(M);case Object:return cF(M);default:return!1}}var Y0=(F,M,x,$)=>{if(M===Boolean){let P=F.getAttribute(x);if(P===null)return $;return P===""?!0:_(P,M)}let H=F.getAttribute(x);return H!==null?_(H,M):$??K(M)};function q(F,M){if(M!==void 0&&!j0(F,M))throw Error(`defaultValue does not match the expected type for ${F.name}`)}function L0(F,M,x,$){return{type:x,name:F,value:$,initialValue:$,attribute:M,converter:{fromAttribute:(H)=>_(H,x),toAttribute:(H)=>O(H,x)}}}import{Computed as dF,subtle as sF,trackDependency as pF}from"@ecopages/signals";function iF(F){return F}function T0(F){return F}var _0={trackDependency(F){pF(iF(F))},createComputed(F){return new dF(F)},createWatcher(F){let M=new sF.Watcher(F);return{watch(x){M.watch(T0(x))},unwatch(x){M.unwatch(T0(x))}}}};var z0=_0;function S(){return z0}function lF(F){z0=F}function a(F){S().trackDependency(F)}function f(F){return S().createComputed(F)}function V(F){return S().createWatcher(F)}function k0(F){return F.replace(/&/g,"\\u0026").replace(/</g,"\\u003c").replace(/>/g,"\\u003e").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}var Y="data-hydration",E0="data-hydration-type",t="data-hydration-key";function I0(F){let M=F.hydrationKey?` ${t}="${nF(F.hydrationKey)}"`:"";return`<script type="application/json" ${Y} ${E0}="${F.type}"${M}>${F.serializedValue}</script>`}function w0(F){return k0(F)}function C0(F,M){let x=F.textContent;if(!x)return M;try{return JSON.parse(x)}catch{if(typeof console<"u")console.warn(`[@ecopages/radiant] Failed to parse hydration payload from <script ${Y}>:`,x.slice(0,120));return M}}function O0(F,M,x){let $=F.children;if(!$||$.length===0){let H=F.childNodes;if(!H||H.length===0)return null;for(let P=0;P<H.length;P+=1){let W=H[P];if(W.nodeType!==1)continue;let Z=W;if(K0(Z,M,x))return Z}return null}for(let H=0;H<$.length;H+=1)if(K0($[H],M,x))return $[H];return null}function K0(F,M,x){if(F.tagName!=="SCRIPT"||!F.hasAttribute(Y)||F.getAttribute(E0)!==M)return!1;if(x!==void 0)return F.getAttribute(t)===x;return!F.hasAttribute(t)}function nF(F){return F.replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">")}import{createMarkupNodeLike as rF,isKeyedJsxValue as S0,isSlotJsxValue as oF}from"@ecopages/jsx";var z="",N="data-radiant-slot-projection";function f0(F){let M=new Map;for(let x of Array.from(F.childNodes)){if(FM(x))continue;aF(M,eF(x),x)}return M}function V0(F){let M;try{M=JSON.parse(F)}catch{if(typeof console<"u")console.warn("[@ecopages/radiant] Failed to parse slot projection payload:",F.slice(0,120));return new Map}let x=new Map;for(let[$,H]of Object.entries(M)){if(!Array.isArray(H)||H.length===0)continue;x.set(e($),H.map((P)=>rF(P)))}return x}function b0(F){let M=Array.from(F.childNodes).filter((x)=>y0(x)).map((x)=>b(x)??"").filter((x)=>x!=="");return M.length>0?M.join(""):void 0}function N0(F){let M={};for(let[x,$]of F.entries()){let H=$.map((P)=>b(P)).filter((P)=>P!==void 0&&P!=="");if(H.length>0)M[x]=H}return Object.keys(M).length>0?JSON.stringify(M):void 0}function v0(F,M){let x=!1,$=(P)=>{if(oF(P))return x=!0,xM(P,M,$);if(S0(P))return tF(P,$(P.value));if(MM(P))return{_$rType$:1,rootLocalName:P.rootLocalName,ssrIntrinsicProps:P.ssrIntrinsicProps,strings:P.strings,values:P.values.map((W)=>$(W))};if(g0(P))return Array.from(P,(W)=>$(W));return P},H=$(F);return{containsSlots:x,value:H}}function h0(F){for(let M of Array.from(F.childNodes)){if(!u0(M))continue;let x=M.textContent??void 0;return M.parentNode?.removeChild(M),x}return}function aF(F,M,x){let $=F.get(M);if($){$.push(x);return}F.set(M,[x])}function tF(F,M){return{...F,value:M}}function eF(F){if(F instanceof Element)return e(F.getAttribute("slot"));return z}function g0(F){return typeof F!=="string"&&typeof F==="object"&&F!==null&&Symbol.iterator in F}function u0(F){return F instanceof HTMLScriptElement&&F.hasAttribute(N)}function y0(F){return F instanceof HTMLScriptElement&&F.hasAttribute(Y)}function FM(F){return u0(F)||y0(F)}function MM(F){return typeof F==="object"&&F!==null&&F._$rType$===1&&Array.isArray(F.strings)&&Array.isArray(F.values)}function e(F){return F??z}function b(F){if(F===void 0||F===null||F===!1||F===!0)return;if(typeof Node<"u"&&F instanceof Node){if(F.nodeType===Node.TEXT_NODE)return F.textContent??"";return F.outerHTML??F.textContent??void 0}if(S0(F))return b(F.value);if(typeof F==="string"||typeof F==="number"||typeof F==="bigint")return String(F);if(typeof F==="object"&&F!==null&&"outerHTML"in F)return typeof F.outerHTML==="string"?F.outerHTML:F.textContent??void 0;if(g0(F))return Array.from(F,(M)=>b(M)??"").join("");return}function xM(F,M,x){let $=M.get(e(F.name));if($&&$.length>0)return $.length===1?$[0]:$;if(F.fallback===void 0)return"";return x(F.fallback)}import{hydrate as $M,render as HM}from"@ecopages/jsx";class F0{#F;#M=new Map;#x;#H;#$;#P=0;constructor(F){this.#F=F,this.#H=V(()=>{this.#F.requestUpdate()})}get slotProjectionVersion(){return this.#P}getSlotElements(F){return this.ensureSlotProjectionState(),(this.#M.get(F??z)??[]).filter((M)=>typeof Node<"u"&&M instanceof Element)}getSlotProjectionScriptTag(){this.ensureSlotProjectionState();let F=N0(this.#M);if(!F)return;return`<script type="application/json" ${N}>${PM(F)}</script>`}getAuthoredHydrationScriptMarkup(){return b0(this.#F)??void 0}hydrate(F){this.disconnectSlotProjectionObserver();try{$M(this.resolveTrackedRenderOutput().value,F)}finally{this.observeSlotProjection()}}render(F){this.disconnectSlotProjectionObserver();try{HM(this.resolveTrackedRenderOutput().value,F)}finally{this.observeSlotProjection()}}observeSlotProjection(){if(typeof MutationObserver>"u"||this.#$||!this.#F.isConnected)return;this.#$=new MutationObserver((F)=>this.handleSlotProjectionMutations(F)),this.#$.observe(this.#F,{childList:!0})}disconnectSlotProjectionObserver(){this.#$?.disconnect(),this.#$=void 0}disconnectRenderWatcher(){if(!this.#x)return;this.#H.unwatch(this.#x),this.#x=void 0}resolveTrackedRenderOutput(){let F=f(()=>this.resolveRenderOutput()),M=F.get();if(!this.#F.isConnected)return M;if(this.#x)this.#H.unwatch(this.#x);return this.#x=F,this.#H.watch(F),M}dispose(){this.disconnectSlotProjectionObserver(),this.disconnectRenderWatcher()}ensureSlotProjectionState(){if(this.#M.size>0)return;let F=this.#F.isConnected?h0(this.#F):void 0;if(typeof F==="string"&&F!==""){this.#M=V0(F),this.#P+=1;return}if(this.#F.childNodes.length>0)this.#M=f0(this.#F),this.#P+=1}handleSlotProjectionMutations(F){let M=!1;for(let x of F){for(let $ of Array.from(x.removedNodes))if(this.removeProjectedSlotNode($))M=!0;for(let $ of Array.from(x.addedNodes)){if($.parentNode!==this.#F)continue;if(this.addProjectedSlotNode($))M=!0}}if(M)this.#P+=1,this.#F.requestUpdate()}addProjectedSlotNode(F){if(F instanceof HTMLScriptElement&&(F.hasAttribute(N)||F.hasAttribute(Y)))return!1;let M=F instanceof Element?F.getAttribute("slot")??z:z,x=this.#M.get(M);if(x){if(x.includes(F))return!1;return x.push(F),!0}return this.#M.set(M,[F]),!0}removeProjectedSlotNode(F){for(let[M,x]of this.#M.entries()){let $=x.indexOf(F);if($===-1)continue;if(x.splice($,1),x.length===0)this.#M.delete(M);return!0}return!1}resolveRenderOutput(){return this.ensureSlotProjectionState(),v0(this.#F.render(),this.#M)}}function PM(F){return F.replace(/</g,"\\u003c")}import{createSubscribableJsxValue as WM}from"@ecopages/jsx";class m0{read;subscribers=new Set;watcherListeners=new Set;version=0;constructor(F){this.read=F}get(){return a(this),this.read()}subscribe(F){return this.subscribers.add(F),()=>{this.subscribers.delete(F)}}addWatcher(F){return this.watcherListeners.add(F),()=>{this.watcherListeners.delete(F)}}getVersion(){return this.version}notify(F){this.version+=1;let M;try{this.notifyWatchers()}catch(x){M=x}if(this.publish(F),M)throw M}publish(F){for(let M of this.subscribers)M(F)}notifyWatchers(){let F=[];for(let M of this.watcherListeners)try{M()}catch(x){F.push(x)}if(F.length===1)throw F[0];if(F.length>1)throw AggregateError(F,"Multiple reactive dependency notifications failed.")}}function ZM(F){return typeof F==="object"&&F!==null&&typeof F.get==="function"}class E{host;access;shouldAutoBind;bindings;$;reactiveFields=new Map;reactiveDependencies=new Map;reactiveDependencyReaders=new Map;reactiveBindings=new Map;updateCallbacks=new Map;onConnectedCallbacks=[];onDisconnectedCallback=[];constructor(F,M,x){this.host=F;this.access=M;this.shouldAutoBind=x;let $=this.createReactiveBindingNamespace();this.bindings=$,this.$=$}connectHost(){for(let F of this.onConnectedCallbacks)F()}disconnectHost(){for(let F of this.onDisconnectedCallback)F()}notifyUpdate(F,M,x){if(M===x)return;this.reactiveDependencies.get(F)?.notify(x);let $=this.updateCallbacks.get(F);if($)for(let H of $)H()}registerCleanupCallback(F){this.onDisconnectedCallback.push(F)}registerConnectedCallback(F){this.onConnectedCallbacks.push(F)}registerHydrationBinding(F,M){}registerReactiveDependencyReader(F,M){this.reactiveDependencyReaders.set(F,M)}registerUpdateCallback(F,M){if(!this.updateCallbacks.has(F))this.updateCallbacks.set(F,new Set);let x=this.updateCallbacks.get(F);return x.add(M),()=>{if(x.delete(M),x.size===0)this.updateCallbacks.delete(F)}}getReactiveBinding(F){let M=this.reactiveBindings.get(F);if(M)return M;let x=WM({getValue:()=>this.readReactiveBindingValue(F),subscribe:($)=>this.registerUpdateCallback(F,()=>{$(this.readReactiveBindingValue(F))})});return this.reactiveBindings.set(F,x),x}defineReactiveBinding(F,M=!0){let x=typeof M==="string"?M:M?`$${F}`:void 0,$=this.access.getBindingTarget?.(this.host)??this.host;if(!x||this.access.hasProperty(this.host,x))return;this.access.defineProperty($,x,{get:()=>this.getReactiveBinding(F),enumerable:!1,configurable:!0})}trackReactiveRead(F){a(this.getReactiveDependency(F))}defineReactiveAccessor(F,M){let x=M.bind??this.shouldAutoBind();if(this.defineReactiveBinding(F,x),this.registerReactiveDependencyReader(F,M.getValue),this.access.defineProperty(this.host,F,{get:()=>{return this.trackReactiveRead(F),M.getValue()},set:($)=>{let H=M.getValue();if(H===$)return;M.setValue($),this.notifyUpdate(F,H,$)},enumerable:!0,configurable:!0}),M.notifyInitialValue!==void 0)this.notifyUpdate(F,void 0,M.notifyInitialValue)}createReactiveField(F,M,x={}){let $={name:F,value:M,initialValue:M};this.reactiveFields.set(F,$),this.defineReactiveAccessor(F,{bind:x.bind,getValue:()=>this.reactiveFields.get(F)?.value,setValue:(H)=>{this.reactiveFields.set(F,{...$,value:H})},notifyInitialValue:M})}createReactiveBindingNamespace(){return new Proxy(Object.create(null),{get:(F,M)=>{if(typeof M!=="string")return;return this.getReactiveBinding(M)}})}getReactiveDependency(F){let M=this.reactiveDependencies.get(F);if(M)return M;let x=new m0(()=>this.readReactiveDependencyValue(F));return this.reactiveDependencies.set(F,x),x}readReactiveDependencyValue(F){let M=this.reactiveDependencyReaders.get(F);if(M)return M();return this.readReactiveBindingValue(F)}readReactiveBindingValue(F){let M=this.access.readProperty(this.host,F);if(ZM(M))return M.get();return M}}var M0=Symbol.for("@ecopages/radiant.ssr-preparation-callbacks"),c0=Symbol.for("@ecopages/radiant.ssr-preparation-running");function d0(F,M){let $=F[M0];if(Array.isArray($)){$.push(M);return}Object.defineProperty(F,M0,{value:[M],configurable:!0})}function s0(F){let M=F,x=M[M0];if(!Array.isArray(x))return;M[c0]=!0;try{for(let $ of x)$()}finally{delete M[c0]}}var x0=Symbol.for("@ecopages/radiant.hydrator-installed");function Px(){globalThis[x0]=!0}function Wx(){delete globalThis[x0]}function p0(){return globalThis[x0]===!0}import{getActiveSsrScopeValue as XM,withActiveSsrScopeValue as BM}from"@ecopages/jsx/server";var i0=Symbol.for("@ecopages/radiant.element-ssr-runtime");function l0(){return XM(i0)}function Bx(F,M){return BM(i0,F,M)}import{hasHydrationMarkers as AM,jsx as GM}from"@ecopages/jsx";var QM=DM();function DM(){if(typeof HTMLElement<"u")return HTMLElement;throw Error("RadiantElement requires HTMLElement. Install '@ecopages/radiant/server/light-dom-shim' before SSR imports.")}class r0 extends QM{renderRootMode="light";bindings;$;reactiveHost;reactivePropertyState;contextProviders=new Map;hydrationBindings=new Map;eventSubscriptions=new Map;eventEmitters=new Map;elementReady=!1;isRendering=!1;isFirstConnectPending=!1;isRenderScheduled=!1;needsRender=!1;renderRuntime;constructor(){super();this.reactivePropertyState=new o0(this),this.reactiveHost=new E(this,{defineProperty:(F,M,x)=>Object.defineProperty(F,M,x),getBindingTarget:(F)=>Object.getPrototypeOf(F)??F,hasProperty:(F,M)=>(M in F),readProperty:(F,M)=>F[M]},()=>this.shouldAutoBindReactiveMembers()),this.bindings=this.reactiveHost.bindings,this.$=this.reactiveHost.$,C(this)}get slotProjectionVersion(){return this.renderRuntime?.slotProjectionVersion??0}connectedCallback(){j(this);let F=this.isFirstConnectPending;if(this.elementReady=!0,this.reactiveHost.connectHost(),F)return;this.isFirstConnectPending=!0,queueMicrotask(()=>{if(this.isFirstConnectPending=!1,!this.isConnected)return;if(!this.shouldRunRenderLifecycle())return;if(this.getOrCreateRenderRuntime().observeSlotProjection(),n0(this)){if(this.needsRender=!1,this.hydrate(),this.needsRender)this.update();return}this.update()})}connectedContextCallback(F){}disconnectedCallback(){this.renderRuntime?.dispose(),this.renderRuntime=void 0,this.removeAllSubscribedEvents(),this.reactiveHost.disconnectHost()}notifyUpdate(F,M,x){this.reactiveHost.notifyUpdate(F,M,x)}attributeChangedCallback(F,M,x){if(M===x||!this.elementReady)return;this.reactivePropertyState.applyAttributeChange(F,M,x)}renderTemplate({target:F=this,template:M,insert:x="replace",sanitize:$}){let H=$?$(M):M;switch(x){case"replace":F.innerHTML=H;break;case"beforeend":F.insertAdjacentHTML("beforeend",H);break;case"afterbegin":F.insertAdjacentHTML("afterbegin",H);break;case"beforebegin":F.insertAdjacentHTML("beforebegin",H);break;case"afterend":F.insertAdjacentHTML("afterend",H);break}}render(){return GM("slot",{})}renderViewToString(F={}){if(!this.shouldRunRenderLifecycle())return this.innerHTML;return j(this),this.prepareForSsr(),RM().renderView(this,F)}hydrate(){if(!this.shouldRunRenderLifecycle()||!this.isConnected||this.isRendering)return;let{renderTarget:F}=this.resolveRenderSurface(),M=this.getOrCreateRenderRuntime();this.isRendering=!0;try{M.hydrate(F)}finally{this.isRendering=!1}}requestUpdate(){if(!this.shouldRunRenderLifecycle())return;if(this.needsRender=!0,this.isRenderScheduled)return;this.isRenderScheduled=!0,queueMicrotask(()=>{if(this.isRenderScheduled=!1,!this.needsRender)return;this.update()})}update(){if(!this.shouldRunRenderLifecycle())return;let{renderTarget:F}=this.resolveRenderSurface(),M=this.getOrCreateRenderRuntime();if(this.needsRender=!0,!this.isConnected||this.isRendering)return;if(this.isFirstConnectPending&&n0(this))return;while(this.needsRender&&this.isConnected){this.needsRender=!1,this.isRendering=!0;try{M.render(F)}finally{this.isRendering=!1}}}registerReactiveProperty(F){this.reactivePropertyState.register(F)}getReactiveProperties(){return this.reactivePropertyState.getAll()}registerReactiveDependencyReader(F,M){this.reactiveHost.registerReactiveDependencyReader(F,M)}registerContextProvider(F,M){this.contextProviders.set(F,M),this.hydrationBindings.set(F,M)}registerHydrationBinding(F,M){this.hydrationBindings.set(F,M)}getContextProviders(){return j(this),[...this.contextProviders.values()]}getHydrationBindings(){return j(this),[...this.hydrationBindings.values()]}prepareForSsr(){s0(this)}shouldAutoBindReactiveMembers(){return!0}shouldRunRenderLifecycle(){return this.render!==r0.prototype.render}getRenderTarget(){if(this.renderRootMode!=="shadow")return this;if(this.shadowRoot)return this.shadowRoot;if(typeof this.attachShadow!=="function")throw Error("RadiantElement shadow render mode requires attachShadow().");return this.attachShadow({mode:"open"})}registerUpdateCallback(F,M){return this.reactiveHost.registerUpdateCallback(F,M)}getReactiveBinding(F){return this.reactiveHost.getReactiveBinding(F)}bind(F){return this.reactiveHost.getReactiveBinding(F)}defineReactiveBinding(F,M=!0){this.reactiveHost.defineReactiveBinding(F,M)}trackReactiveRead(F){this.reactiveHost.trackReactiveRead(F)}subscribeEvents(F){let M=[];for(let x of F)M.push(this.subscribeEvent(x));return M}subscribeEvent(F){let{interactionTarget:M}=this.resolveRenderSurface(),x=(H)=>{if(H.target&&H.target.matches(F.selector))F.listener.call(this,H)},$=`${F.type}:${F.selector}`;return M.addEventListener(F.type,x,F.options),this.eventSubscriptions.set($,{...F,listener:x,target:M}),this.unsubscribeEvent.bind(this,$)}unsubscribeEvent(F){let M=this.eventSubscriptions.get(F);if(M)M.target.removeEventListener(M.type,M.listener,M.options),this.eventSubscriptions.delete(F)}removeAllSubscribedEvents(){for(let F of this.eventSubscriptions.values())F.target.removeEventListener(F.type,F.listener,F.options);this.eventSubscriptions.clear()}registerCleanupCallback(F){this.reactiveHost.registerCleanupCallback(F)}registerConnectedCallback(F){this.reactiveHost.registerConnectedCallback(F)}registerEventEmitter(F,M){this.eventEmitters.set(F,M)}getRef(F,M=!1){let x=`[data-ref="${F}"]`,{queryRoot:$}=this.resolveRenderSurface();if(M)return Array.from($.querySelectorAll(x));return $.querySelector(x)??null}getSlotElement(F){return this.getSlotElements(F)[0]??null}getSlotElements(F){return this.getOrCreateRenderRuntime().getSlotElements(F)}createReactiveField(F,M,x={}){this.reactiveHost.createReactiveField(F,M,x)}createReactiveProp(F,M){this.reactivePropertyState.create(F,M,(x,$,H)=>Y0(this,x,$,H),(x,$)=>{this.reactiveHost.defineReactiveAccessor(x,$)})}getSlotProjectionScriptTag(){return this.getOrCreateRenderRuntime().getSlotProjectionScriptTag()}getAuthoredHydrationScriptMarkup(){return this.getOrCreateRenderRuntime().getAuthoredHydrationScriptMarkup()}resolveTrackedRenderOutput(){return this.getOrCreateRenderRuntime().resolveTrackedRenderOutput()}getOrCreateRenderRuntime(){if(this.renderRuntime)return this.renderRuntime;return this.renderRuntime=new F0(this),this.renderRuntime}resolveRenderSurface(){let F=this.getRenderTarget(),M=F instanceof ShadowRoot?F:this;return{interactionTarget:M,queryRoot:M,renderTarget:F}}}function RM(){let F=l0();if(!F)throw Error("Radiant SSR runtime unavailable. Import `@ecopages/radiant/server/render-component` first.");return F}function n0(F){return p0()&&AM(F)}class o0{host;properties=new Map;preUpgradePropertyValues=new Map;constructor(F){this.host=F;for(let M of Object.getOwnPropertyNames(F))this.preUpgradePropertyValues.set(M,Reflect.get(F,M))}register(F){this.properties.set(F.name,F)}getAll(){return Array.from(this.properties.values())}applyAttributeChange(F,M,x){let $=this.properties.get(F);if(!$)return;let H=this.transformAttributeValue(x,$),P=this.transformAttributeValue(M,$);Reflect.set(this.host,$.attribute,H),this.host.notifyUpdate(F,P,H)}create(F,M,x,$){let{type:H,attribute:P,reflect:W,defaultValue:Z}=M,X=P??F,B=this.preUpgradePropertyValues.has(F),A=B?this.preUpgradePropertyValues.get(F):void 0;q(H,Z);let G=B?A:x(H,X,Z);if(this.host.hasAttribute(X)&&(!W||G==null||G===""))this.host.removeAttribute(X);if(B&&Object.prototype.hasOwnProperty.call(this.host,F))Reflect.deleteProperty(this.host,F);let R=L0(F,X,H,G);if(this.register(R),$(F,{bind:M.bind,getValue:()=>this.properties.get(F)?.value,setValue:(D)=>{this.properties.set(F,{...R,value:D}),this.reflectValue(X,W,R,D)}}),G!==void 0)queueMicrotask(()=>{let D=this.properties.get(F)?.value;if(D===void 0)return;this.reflectValue(X,W,R,D),this.host.notifyUpdate(F,void 0,D)})}transformAttributeValue(F,M){return F!==null?M.converter.fromAttribute(F):F}reflectValue(F,M,x,$){if(!M)return;if($==null||$===""||$===!1){this.host.removeAttribute(F);return}let H=x.converter.toAttribute($);this.host.setAttribute(F,H)}}import{render as JM}from"@ecopages/jsx";class a0{host;element;bindings;$;reactiveHost;connected=!1;isRendering=!1;isRenderScheduled=!1;isSsrLifecycle=!1;needsRender=!1;contextProviders=new Map;hydrationBindings=new Map;renderSignal;renderWatcher=V(()=>{this.requestUpdate()});constructor(F){this.host=F,this.element=F,this.reactiveHost=new E(this,{defineProperty:(M,x,$)=>Object.defineProperty(M,x,$),hasProperty:(M,x)=>(x in M),readProperty:(M,x)=>M[x]},()=>this.shouldAutoBindReactiveMembers()),this.bindings=this.reactiveHost.bindings,this.$=this.reactiveHost.$,C(this)}connect(){if(j(this),this.connected=!0,this.reactiveHost.connectHost(),this.shouldRunRenderLifecycle())this.update()}runWithSsrLifecycle(F){this.isSsrLifecycle=!0;try{return F()}finally{this.isSsrLifecycle=!1}}disconnect(){this.connected=!1,this.disconnectRenderWatcher(),this.reactiveHost.disconnectHost()}get isConnected(){return this.connected}render(){return null}requestUpdate(){if(!this.shouldRunRenderLifecycle())return;if(this.needsRender=!0,this.isRenderScheduled)return;this.isRenderScheduled=!0,queueMicrotask(()=>{if(this.isRenderScheduled=!1,!this.needsRender)return;this.update()})}update(){if(!this.shouldRunRenderLifecycle())return;let F=this.getRenderTarget();if(!F)return;if(this.needsRender=!0,!this.connected||this.isRendering)return;while(this.needsRender){this.needsRender=!1,this.isRendering=!0;try{JM(this.resolveTrackedRenderOutput(),F)}finally{this.isRendering=!1}}}bind(F){return this.reactiveHost.getReactiveBinding(F)}getReactiveBinding(F){return this.reactiveHost.getReactiveBinding(F)}createReactiveField(F,M,x={}){this.reactiveHost.createReactiveField(F,M,x)}createReactiveProp(F,M){let{type:x,defaultValue:$,bind:H}=M;q(x,$);let P=new t0(this.host,this,F),Z=P.getInitialValue()??$??K(x);this.reactiveHost.defineReactiveAccessor(F,{bind:H,getValue:()=>Z,setValue:(X)=>{Z=X},notifyInitialValue:Z}),P.install(),this.registerCleanupCallback(()=>{P.restore()})}defineReactiveBinding(F,M=!0){this.reactiveHost.defineReactiveBinding(F,M)}notifyUpdate(F,M,x){this.reactiveHost.notifyUpdate(F,M,x)}registerUpdateCallback(F,M){return this.reactiveHost.registerUpdateCallback(F,M)}connectedContextCallback(F){}registerContextProvider(F,M){this.contextProviders.set(F,M),this.hydrationBindings.set(F,M)}registerHydrationBinding(F,M){this.hydrationBindings.set(F,M)}getSsrContextProviders(){return[...this.contextProviders.values()]}getSsrHydrationBindings(){return[...this.hydrationBindings.values()]}registerCleanupCallback(F){this.reactiveHost.registerCleanupCallback(F)}registerConnectedCallback(F){this.reactiveHost.registerConnectedCallback(F)}registerReactiveDependencyReader(F,M){this.reactiveHost.registerReactiveDependencyReader(F,M)}trackReactiveRead(F){this.reactiveHost.trackReactiveRead(F)}addEventListener(F,M,x){this.host.addEventListener(F,M,x)}removeEventListener(F,M,x){this.host.removeEventListener(F,M,x)}dispatchEvent(F){return this.host.dispatchEvent(F)}getRef(F,M=!1){let x=`[data-ref="${F}"]`;if(M)return Array.from(this.host.querySelectorAll(x));return this.host.querySelector(x)??null}shouldAutoBindReactiveMembers(){return!0}shouldRunRenderLifecycle(){return!this.isSsrLifecycle&&this.render!==a0.prototype.render}getRenderTarget(){return this.host instanceof HTMLElement?this.host:null}disconnectRenderWatcher(){if(!this.renderSignal)return;this.renderWatcher.unwatch(this.renderSignal),this.renderSignal=void 0}resolveTrackedRenderOutput(){let F=f(()=>this.render()),M=F.get();if(!this.connected)return M;if(this.renderSignal)this.renderWatcher.unwatch(this.renderSignal);return this.renderSignal=F,this.renderWatcher.watch(F),M}}class t0{host;controller;propertyName;ownDescriptor;constructor(F,M,x){this.host=F;this.controller=M;this.propertyName=x;this.ownDescriptor=Object.getOwnPropertyDescriptor(this.host,this.propertyName)}getInitialValue(){return Reflect.get(this.host,this.propertyName)}install(){Object.defineProperty(this.host,this.propertyName,{get:()=>Reflect.get(this.controller,this.propertyName),set:(F)=>{Reflect.set(this.controller,this.propertyName,F)},enumerable:this.ownDescriptor?.enumerable??!0,configurable:!0})}restore(){let F=Reflect.get(this.controller,this.propertyName);if(this.ownDescriptor){if(Object.defineProperty(this.host,this.propertyName,this.ownDescriptor),"value"in this.ownDescriptor&&this.ownDescriptor.writable)Reflect.set(this.host,this.propertyName,F);return}Reflect.deleteProperty(this.host,this.propertyName);try{Reflect.set(this.host,this.propertyName,F)}catch{Object.defineProperty(this.host,this.propertyName,{value:F,writable:!0,enumerable:!0,configurable:!0})}}}var e0=Symbol.for("@ecopages/radiant.controllerIdentifier");function $0(F,M){F[e0]=M}function wx(F){return F[e0]}var h="data-controller",FF=Symbol.for("@ecopages/radiant.controller-registry-state");function qM(){let F=globalThis,M=F[FF];if(M)return M;let x={activeRuntimes:new Set,controllerRegistrationStrategy:"keep-current",controllerRegistry:new Map};return F[FF]=x,x}var g=qM(),L=g.controllerRegistry,k=g.activeRuntimes;function MF(F){let M=F.getAttribute(h);if(!M)return[];return M.split(/\s+/).map((x)=>x.trim()).filter((x)=>x.length>0)}function v(F,M){if(F instanceof Element&&F.hasAttribute(h))M(F);for(let x of Array.from(F.querySelectorAll(`[${h}]`)))M(x)}class xF{root;controllersByElement=new Map;observer;stopped=!1;constructor(F=document){this.root=F;this.start()}stop(){if(this.stopped)return;this.stopped=!0,this.observer?.disconnect(),this.observer=void 0;for(let[F,M]of this.controllersByElement)for(let[x]of M)this.disconnectController(F,x);k.delete(this)}reconcileRegisteredController(F){v(this.root,(M)=>{if(!MF(M).includes(F))return;this.connectController(M,F)})}replaceRegisteredController(F){for(let[M,x]of Array.from(this.controllersByElement.entries())){if(!x.has(F))continue;this.disconnectController(M,F)}this.reconcileRegisteredController(F)}start(){if(v(this.root,(M)=>{this.reconcileElement(M)}),typeof MutationObserver>"u"){k.add(this);return}this.observer=new MutationObserver((M)=>{for(let x of M){if(x.type==="attributes"&&x.target instanceof Element){this.reconcileElement(x.target);continue}for(let $ of Array.from(x.removedNodes)){if(!($ instanceof Element))continue;v($,(H)=>{this.disconnectElementControllers(H)})}for(let $ of Array.from(x.addedNodes)){if(!($ instanceof Element))continue;v($,(H)=>{this.reconcileElement(H)})}}});let F=this.root instanceof Document?this.root.documentElement:this.root;this.observer.observe(F,{attributeFilter:[h],attributes:!0,childList:!0,subtree:!0}),k.add(this)}reconcileElement(F){let M=new Set(MF(F)),x=this.controllersByElement.get(F);if(x){for(let $ of x.keys())if(!M.has($))this.disconnectController(F,$)}for(let $ of M)this.connectController(F,$)}connectController(F,M){let x=L.get(M);if(!x)return;let $=this.controllersByElement.get(F);if(!$)$=new Map,this.controllersByElement.set(F,$);if($.has(M))return;let H=new x(F);$.set(M,H),H.connect()}disconnectController(F,M){let x=this.controllersByElement.get(F);if(!x)return;let $=x.get(M);if(!$)return;if($.disconnect(),x.delete(M),x.size===0)this.controllersByElement.delete(F)}disconnectElementControllers(F){let M=this.controllersByElement.get(F);if(!M)return;for(let x of Array.from(M.keys()))this.disconnectController(F,x)}}function UM(F,M){let x=L.get(F);if(x)return x;$0(M,F),L.set(F,M);for(let $ of Array.from(k))$.reconcileRegisteredController(F);return M}function Sx(F){return L.has(F)}function fx(F){return L.get(F)}function jM(F,M){if(L.get(F)===M)return M;$0(M,F),L.set(F,M);for(let $ of Array.from(k))$.replaceRegisteredController(F);return M}function $F(F){g.controllerRegistrationStrategy=F}function Vx(){$F("replace")}function bx(){$F("keep-current")}function HF(F,M){if(g.controllerRegistrationStrategy==="replace")return jM(F,M);return UM(F,M)}function Nx(F=document){return new xF(F)}function vx(){for(let F of Array.from(k))F.stop()}function YM(F){return typeof F==="function"}function J(F,M,x,$){if(typeof $==="object")return F(void 0,$);return M(x,$)}function U(F,M,x,$,H){if(typeof $==="object"){if(!YM(x))throw TypeError("Standard method decorators require a method target");return F(x,$)}if(!H)throw TypeError("Legacy method decorators require a property descriptor");return M(x,$,H)}function H0(F){if(F instanceof Element)return F;if("host"in F)return F.host;return F.element}function LM(F){return F.replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/_/g,"-").toLowerCase()}function TM(F,M){if(M.converter?.fromAttribute){let x=M.converter.fromAttribute(F);if(F===null&&x===void 0&&"defaultValue"in M)return M.defaultValue;return x}if(M.type){if(F===null)return M.defaultValue??K(M.type);if(M.type===Boolean&&F==="")return!0;return _(F,M.type)}if(F===null)return M.defaultValue;return F}function T(F,M,x){return TM(H0(F).getAttribute(M),x)}function _M(F,M,x,$){let H=$.converter?.toAttribute?$.converter.toAttribute(x):$.type?O(x,$.type):x==null?null:String(x);if(H===null){F.removeAttribute(M);return}F.setAttribute(M,H)}function u(F,M,x={}){if(x.type)q(x.type,x.defaultValue);let $=F,H=x.source??LM(M),P=Symbol(`@ecopages/radiant/attr:${M}:observer`),W=Symbol(`@ecopages/radiant/attr:${M}:last-value`),Z=x.bind??F.shouldAutoBindReactiveMembers?.()??!1;F.defineReactiveBinding(M,Z),F.registerReactiveDependencyReader(M,()=>T(F,H,x)),$[W]=T(F,H,x),Object.defineProperty(F,M,{get(){return F.trackReactiveRead(M),T(this,H,x)},set(A){let G=H0(this),R=T(this,H,x);_M(G,H,A,x);let D=T(this,H,x);if(Object.is(R,D))return;this[W]=D,F.notifyUpdate(M,R,D)},enumerable:!0,configurable:!0});let X=()=>{$[P]?.disconnect()},B=()=>{let A=T(F,H,x),G=$[W];if(!Object.is(G,A))$[W]=A,F.notifyUpdate(M,G,A);if(typeof MutationObserver>"u")return;let R=H0(F);X();let D=new MutationObserver(()=>{let r=T(F,H,x),B0=$[W];if(Object.is(B0,r))return;$[W]=r,F.notifyUpdate(M,B0,r)});D.observe(R,{attributeFilter:[H],attributes:!0}),$[P]=D};B(),F.registerConnectedCallback(B),F.registerCleanupCallback(X)}function PF(F={}){return(M,x)=>{let $=Symbol(`@ecopages/radiant/attr:${x}:installed`);Q(M,(H)=>{H.registerConnectedCallback(()=>{if(H[$])return;let P=H[x],W=F.defaultValue===void 0?P:F.defaultValue;u(H,x,{...F,defaultValue:W}),H[$]=!0})})}}function WF(F={}){return function(M,x){let $=String(x.name),H=Symbol(`@ecopages/radiant/attr:${$}:initializer`);return x.addInitializer(function(){let P=this[H],W=F.defaultValue===void 0?P:F.defaultValue;u(this,$,{...F,defaultValue:W})}),function(P){return this[H]=P,P}}}function ox(F={}){function M(x,$){return J(WF(F),PF(F),x,$)}return M}function ZF(F,M,x){let $=x.value;return{configurable:!0,get(){if(this===F.prototype||Object.prototype.hasOwnProperty.call(this,M))return $;let H=$.bind(this);return Object.defineProperty(this,M,{value:H,configurable:!0,writable:!0}),H}}}function XF(F,M){let x=String(M.name);if(M.private)throw Error(`'bound' cannot decorate private properties like ${x}.`);M.addInitializer(function(){this[x]=this[x].bind(this)})}function $2(F,M,x){return U(XF,ZF,F,M,x)}function W2(F){return function(M){return HF(F,M)}}var BF=Symbol.for("@ecopages/radiant.customElementTagName");function y(F,M){F[BF]=M}function X2(F){return F[BF]}function AF(F,M){return(x)=>{if(y(x,F),typeof customElements<"u"&&!customElements.get(F))customElements.define(F,x,M)}}function GF(F,M){return function(x,$){$.addInitializer(function(){if(y(this,F),typeof customElements<"u"&&!customElements.get(F))customElements.define(F,this,M)})}}function q2(F,M){function x($,H){if(typeof H<"u")return GF(F,M)($,H);return AF(F,M)($)}return x}function m(F,M){let x=null,$=null,H,P=()=>{if(x!==null)clearTimeout(x),x=null},W=()=>{if($===null)return H;let X=$;return $=null,P(),H=X(),H},Z=function(...X){$=()=>F.apply(this,X),P(),x=setTimeout(()=>{W()},M)};return Z.cancel=()=>{P(),$=null},Z.flush=()=>{if($===null)return H;return W()},Z.pending=()=>$!==null,Z}function QF(F){return(M,x,$)=>{let H=$.value,P=new WeakMap;return $.value=function(...Z){let X=P.get(this);if(!X)X=m((...B)=>{return H.apply(this,B)},F),P.set(this,X);X(...Z)},$}}function DF(F){return(M)=>{let x=new WeakMap;return function(...$){let H=x.get(this);if(!H)H=m((...P)=>{return M.apply(this,P)},F),x.set(this,H);H(...$)}}}function E2(F){function M(x,$,H){return U(DF(F),QF(F),x,$,H)}return M}class P0{host;eventConfig;constructor(F,M){this.host=F,this.eventConfig=M}emit(F){let M=new CustomEvent(this.eventConfig.name,{detail:F,bubbles:this.eventConfig.bubbles,cancelable:this.eventConfig.cancelable,composed:this.eventConfig.composed});this.host.dispatchEvent(M)}}function c(F,M){let x=new P0(F,M);return F.registerEventEmitter(M.name,x),x}function RF(F){return(M,x)=>{Q(M,($)=>{let H=c($,F);$.registerConnectedCallback(()=>{Object.defineProperty($,x,{get(){return H},enumerable:!0,configurable:!0})})})}}function JF(F){return function(M,x){x.addInitializer(function(){let $=c(this,F);Object.defineProperty(this,x.name,{get(){return $},enumerable:!0,configurable:!0})})}}function u2(F){function M(x,$){return J(JF(F),RF(F),x,$)}return M}function qF(F){let M=globalThis.CSS;if(typeof M?.escape==="function")return M.escape(F);let x="";for(let $=0;$<F.length;$+=1){let H=F[$]??"",P=H.codePointAt(0)??0;if(P===0){x+="�";continue}let W=P>=1&&P<=31||P===127,Z=$===0&&P>=48&&P<=57,X=$===1&&P>=48&&P<=57&&(F[0]??"")==="-",B=$===0&&H==="-"&&F.length===1;if(W||Z||X){x+=`\\${P.toString(16)} `;continue}if(P>=128||H==="-"||H==="_"||P>=48&&P<=57||P>=65&&P<=90||P>=97&&P<=122){x+=B?`\\${H}`:H;continue}x+=`\\${H}`}return x}var d=Symbol("radiant.shadowRootListenerHooks"),UF=Symbol("radiant.patchedAttachShadow");function YF(F){if(F instanceof Element)return F;if("host"in F)return F.host;return F.element}function zM(F){return!(F instanceof Element)}function jF(F,M,x,$){let H=(P)=>{if(P.target instanceof Element&&P.target.matches(x))$(P)};return F.addEventListener(M.type,H,M.options),()=>{F.removeEventListener(M.type,H,M.options)}}function kM(F,M){let x=YF(F);if(!x[d])x[d]=new Set;if(x[d].add(M),x[UF])return;let $=x.attachShadow;x.attachShadow=function(P){let W=$.call(this,P);for(let Z of x[d]??[])Z();return W},x[UF]=!0}function s(F,M,x){if(zM(F)&&"scope"in M&&M.scope&&M.scope!=="light")throw Error("RadiantController event listeners only support light DOM scope.");let $=YF(F),H=x.bind(F),P=null,W=null,Z=null,X=null,B=!1,A=()=>{P?.(),W?.(),Z?.(),X?.(),P=null,W=null,Z=null,X=null},G=()=>{if(B)return;if("window"in M&&!P)window.addEventListener(M.type,H,M.options),P=()=>{window.removeEventListener(M.type,H,M.options)};if("document"in M&&!W)document.addEventListener(M.type,H,M.options),W=()=>{document.removeEventListener(M.type,H,M.options)};if("selector"in M||"ref"in M){let R="selector"in M?M.selector:`[data-ref='${qF(M.ref)}']`;if(M.scope!=="shadow"&&!Z)Z=jF($,M,R,H);if(M.scope!=="light"&&$.shadowRoot&&!X)X=jF($.shadowRoot,M,R,H)}};if("selector"in M||"ref"in M){if(M.scope!=="light")kM(F,()=>{if(F.isConnected)G()})}if(F.registerConnectedCallback(G),F.registerCleanupCallback(A),F.isConnected)G();return()=>{B=!0,A()}}function LF(F){return(M,x,$)=>{let H=$.value;return Q(M,(P)=>{s(P,F,H.bind(P))}),$}}function TF(F){return function(M,x){x.addInitializer(function(){s(this,F,M.bind(this))})}}function t2(F){function M(x,$,H){return U(TF(F),LF(F),x,$,H)}return M}function _F(F){return(M,x)=>{let $=Symbol(`@ecopages/radiant/on-updated:${x}:cleanup`);Q(M,(H)=>{H.registerConnectedCallback(()=>{let P=H[x].bind(H),W=[];if(Array.isArray(F))for(let Z of F)W.push(H.registerUpdateCallback(Z,P));else if(typeof F==="string")W.push(H.registerUpdateCallback(F,P));H[$]=()=>{for(let Z of W)Z()}}),H.registerCleanupCallback(()=>{let P=H[$];if(typeof P==="function")P(),delete H[$]})})}}function zF(F){return function(M,x){x.addInitializer(function(){let $=M.bind(this);if(Object.defineProperty(this,x.name,{value:$,configurable:!0,writable:!0}),Array.isArray(F))for(let H of F)this.registerUpdateCallback(H,$);else if(typeof F==="string")this.registerUpdateCallback(F,$)})}}function W$(F){function M(x,$,H){return U(zF(F),_F(F),x,$,H)}return M}var W0=Symbol.for("@ecopages/radiant.reactivePropDefinitions");function p(F,M,x){let $=F.constructor,H=$[W0]??[];if(H.some((P)=>P.name===M))return;H.push({name:M,options:x}),$[W0]=H}function X$(F){return(F.constructor[W0]??[]).slice()}function kF({type:F,attribute:M,reflect:x,defaultValue:$,bind:H}){return q(F,$),(P,W)=>{let Z=M??W;p(P,W,{type:F,reflect:x,attribute:Z,defaultValue:$,bind:H});let X=Symbol.for(`@ecopages/radiant.ssr-prop:${W}`);Object.defineProperty(P,W,{get(){return this[X]??$},set(B){this[X]=B},configurable:!0,enumerable:!0}),Q(P,(B)=>{B.registerConnectedCallback(()=>{let A=B[W],G=$===void 0?A:$;B.createReactiveProp(W,{type:F,reflect:x,attribute:Z,defaultValue:G,bind:H})})})}}function KF({type:F,attribute:M,reflect:x,defaultValue:$,bind:H}){return q(F,$),function(P,W){let Z=String(W.name),X=M??Z,B=Symbol(`@ecopages/radiant/reactive-prop:${Z}:initializer`);return W.addInitializer(function(){let A=this[B],G=$===void 0?A:$;p(this,Z,{type:F,reflect:x,attribute:X,defaultValue:$,bind:H}),this.createReactiveProp(Z,{type:F,reflect:x,attribute:X,defaultValue:G,bind:H})}),function(A){return this[B]=A,A}}}function L$(F){function M(x,$){return J(KF(F),kF(F),x,$)}return M}function KM(F){return!(F instanceof Element)}function EM(F){return"shadowRoot"in F?F.shadowRoot??null:null}function IM(F){return F instanceof Element?F:F.host}function wM(F,M="light"){let x=EM(F);if(M==="shadow")return x?[x]:[];if(M==="both")return x?[F,x]:[F];return[F]}function i(F,M){if(KM(F)&&M.scope&&M.scope!=="light")throw Error("RadiantController queries only support light DOM scope.");let x=IM(F),$="selector"in M?M.selector:`[data-ref="${M.ref}"]`,H=null,P=()=>{let W=wM(x,M.scope);if(M.all)return W.flatMap((Z)=>Array.from(Z.querySelectorAll($)));for(let Z of W){let X=Z.querySelector($);if(X)return X}return null};return{get value(){if(M.cache){if(H===null||M.all&&Array.isArray(H)&&!H.length)H=P();return H}return P()}}}function EF({cache:F=!0,...M}){return(x,$)=>{Q(x,(H)=>{H.registerConnectedCallback(()=>{let P=i(H,{cache:F,...M});Object.defineProperty(H,$,{get(){return P.value},enumerable:!0,configurable:!0})})})}}function IF(F){return function(M,x){let $=String(x.name);x.addInitializer(function(){let H=i(this,F);Object.defineProperty(this,$,{get(){return H.value},enumerable:!0,configurable:!0})})}}function S$(F){function M(x,$){return J(IF(F),EF(F),x,$)}return M}function I(F,M={}){let x=null,$,H=()=>{if(M.all)return F.getSlotElements(M.name);return F.getSlotElements(M.name)[0]??null};return{get value(){if(M.cache===!1)return H();let P=F.slotProjectionVersion??0;if($!==P)x=H(),$=P;return x}}}function wF(F={}){return(M,x)=>{let $=(W)=>{return typeof Object.getOwnPropertyDescriptor(W,x)?.get==="function"},H=(W)=>{if($(W))return;let Z=I(W,F);Object.defineProperty(W,x,{get(){return Z.value},enumerable:!0,configurable:!0})},P=new WeakMap;Object.defineProperty(M,x,{get(){let W=P.get(this);if(!W)W=I(this,F),P.set(this,W);return W.value},enumerable:!0,configurable:!0}),Q(M,(W)=>{d0(W,()=>{H(W)}),W.registerConnectedCallback(()=>{H(W)})})}}function CF(F={}){return function(M,x){let $=String(x.name);x.addInitializer(function(){let H=I(this,F);Object.defineProperty(this,$,{get(){return H.value},enumerable:!0,configurable:!0})})}}function d$(F={}){function M(x,$){return J(CF(F),wF(F),x,$)}return M}function OF(F){return I0({type:"signal",...F})}function SF(F){return w0(F)}import{createMarkupNodeLike as CM}from"@ecopages/jsx";import{state as OM}from"@ecopages/signals";function l(F){return typeof F==="object"&&F!==null&&typeof F.get==="function"&&typeof F.set==="function"&&typeof F.subscribe==="function"&&typeof F.update==="function"}class w{host;hydrate;hydrationKey;property;source;currentValue;hasAppliedHostHydration=!1;sourceUnsubscribe;constructor(F){this.host=F.host,this.hydrate=F.hydrate,this.hydrationKey=F.hydrationKey,this.property=F.property,this.source=F.source??OM(this.resolveInitialValue(F.initialValue)),this.currentValue=this.source.get()}get(){return this.source.get()}set(F){this.source.set(F)}subscribe(F){return this.source.subscribe(F)}update(F){this.set(F(this.get()))}connectToSource(){if(this.sourceUnsubscribe)return;let F=this.source.get();if(!Object.is(this.currentValue,F)){let M=this.currentValue;this.currentValue=F,this.host.notifyUpdate(this.property,M,F)}this.sourceUnsubscribe=this.source.subscribe((M)=>{this.handleSourceChange(M)})}disconnectFromSource(){this.sourceUnsubscribe?.(),this.sourceUnsubscribe=void 0}hydrateFromHost(){if(!this.hydrate||this.hasAppliedHostHydration)return;this.hasAppliedHostHydration=!0;let F=this.source.get(),M=this.resolveInitialValue(F);if(!Object.is(F,M))this.source.set(M),this.currentValue=this.source.get(),this.host.notifyUpdate(this.property,F,this.currentValue)}renderHydrationScript(){let F=this.renderHydrationScriptTag();if(!F)return;return CM(F)}renderHydrationScriptTag(){let F=this.serializeHydrationValue();if(!F)return;return OF({hydrationKey:this.hydrationKey,serializedValue:F})}findHydrationScriptElement(){if(!(this.host instanceof Element))return null;return O0(this.host,"signal",this.hydrationKey)}isObject(F){return typeof F==="object"&&!Array.isArray(F)&&F!==null}resolveInitialValue(F){if(!this.hydrate)return F;let M=this.findHydrationScriptElement();if(!M)return F;let x=C0(M,F);if(this.hydrate===Object&&this.isObject(x)&&this.isObject(F))return{...F,...x};return x}serializeHydrationValue(){if(!this.hydrate)return;let F=JSON.stringify(this.get());if(typeof F!=="string")return;return SF(F)}handleSourceChange(F){let M=this.currentValue;if(this.currentValue=F,!Object.is(M,F))this.host.notifyUpdate(this.property,M,F)}}function n(F){return new w(F)}function Z0(F={}){return(M,x)=>{let $=(H)=>{let P=H[x];if(P instanceof w)return P;let W=typeof F.source==="function"?F.source(H):F.source??(l(P)?P:void 0),Z=F.bind??H.shouldAutoBindReactiveMembers?.()??!1,X=W!==void 0?F.initial:P===void 0?F.initial:P;H.defineReactiveBinding(x,Z);let B=n({host:H,hydrate:F.hydrate,hydrationKey:x,initialValue:X,property:x,source:W});if(H.registerConnectedCallback(()=>{B.hydrateFromHost(),B.connectToSource()}),H.registerCleanupCallback(()=>{B.disconnectFromSource()}),F.hydrate)H.registerHydrationBinding(x,B);return H[x]=B,B};Q0(M,(H)=>{let P=$(H);H.registerConnectedCallback(()=>{if(!(H[x]instanceof w))H[x]=P})})}}function X0(F={}){return function(M,x){let $=String(x.name);return function(H){let P=typeof F.source==="function"?F.source(this):F.source??(l(H)?H:void 0),W=P!==void 0?F.initial:H===void 0?F.initial:H,Z=F.bind??this.shouldAutoBindReactiveMembers?.()??!1;this.defineReactiveBinding($,Z);let X=n({host:this,hydrate:F.hydrate,hydrationKey:$,initialValue:W,property:$,source:P});if(this.registerConnectedCallback(()=>{X.hydrateFromHost(),X.connectToSource()}),this.registerCleanupCallback(()=>{X.disconnectFromSource()}),F.hydrate)this.registerHydrationBinding($,X);return X}}}function P1(F,M){if(typeof M<"u"){if(typeof M==="object"){if(F!==void 0)throw TypeError("@signal standard decorators require an undefined target");return X0()(void 0,M)}if(F===void 0)throw TypeError("@signal legacy decorators require a host target");return Z0()(F,M)}let x=F??{};function $(H,P){if(typeof P==="object"){if(H!==void 0)throw TypeError("@signal standard decorators require an undefined target");return X0(x)(void 0,P)}if(H===void 0)throw TypeError("@signal legacy decorators require a host target");return Z0(x)(H,P)}return $}function fF(F,M){Q(F,(x)=>{x.registerConnectedCallback(()=>{x.createReactiveField(M,x[M],{bind:x.shouldAutoBindReactiveMembers?.()??!1})})})}function VF(F,M){let x=Symbol(`__${String(M.name)}__value`),$=String(M.name);return M.addInitializer(function(){this.defineReactiveBinding($,this.shouldAutoBindReactiveMembers?.()??!1),this.registerReactiveDependencyReader($,()=>this[x]),Object.defineProperty(this,M.name,{get(){return this.trackReactiveRead($),this[x]},set(H){let P=this[x];if(P!==H)this[x]=H,this.notifyUpdate($,P,H)},enumerable:!0,configurable:!0})}),function(H){return this[x]=H,H}}function D1(F,M){return J(VF,fF,F,M)}export{v as visitControllerElements,vx as stopControllers,D1 as state,Nx as startControllers,P1 as signal,$F as setControllerRegistrationStrategy,fx as resolveRegisteredController,jM as replaceController,HF as registerControllerWithConfiguredStrategy,UM as registerController,d$ as querySlot,S$ as query,L$ as prop,MF as parseControllerIdentifiers,W$ as onUpdated,t2 as onEvent,Sx as hasRegisteredController,u2 as event,Vx as enableControllerReplacementForHmr,bx as disableControllerReplacementForHmr,E2 as debounce,q2 as customElement,W2 as controller,$2 as bound,ox as attr,r0 as RadiantElement,a0 as RadiantController,xF as ControllerRegistryRuntime,FF as CONTROLLER_REGISTRY_STATE_KEY,h as CONTROLLER_ATTRIBUTE};
|
|
2
|
+
|
|
3
|
+
//# debugId=DAA54CB7D334C84164756E2164756E21
|