@ecopages/radiant 0.3.0-alpha.4 → 0.3.0-alpha.6
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 -59
- package/dist/LICENSE +21 -0
- package/dist/client/hydrator.d.ts +1 -1
- package/dist/client/hydrator.js +2 -2
- package/dist/client/hydrator.js.map +5 -3
- package/dist/client/install-hydrator.js +2 -2
- package/dist/client/install-hydrator.js.map +5 -3
- package/dist/context/context-consumer-bootstrap.d.ts +7 -6
- package/dist/context/context-consumer-bootstrap.js +2 -2
- package/dist/context/context-consumer-bootstrap.js.map +8 -3
- package/dist/context/context-consumer-runtime.d.ts +21 -8
- package/dist/context/context-consumer-runtime.js +2 -2
- package/dist/context/context-consumer-runtime.js.map +6 -3
- package/dist/context/context-host.d.ts +25 -0
- package/dist/context/context-host.js +3 -0
- package/dist/context/context-host.js.map +10 -0
- package/dist/context/context-provider.d.ts +10 -6
- package/dist/context/context-provider.js +2 -2
- package/dist/context/context-provider.js.map +9 -3
- package/dist/context/context-ssr-bridge.js +2 -2
- package/dist/context/context-ssr-bridge.js.map +4 -3
- package/dist/context/create-context.js +2 -2
- package/dist/context/create-context.js.map +4 -3
- package/dist/context/decorators/consume-context.d.ts +5 -2
- package/dist/context/decorators/consume-context.js +2 -2
- package/dist/context/decorators/consume-context.js.map +13 -3
- package/dist/context/decorators/context-selection-delivery.d.ts +1 -1
- package/dist/context/decorators/context-selection-delivery.js +2 -2
- package/dist/context/decorators/context-selection-delivery.js.map +5 -3
- package/dist/context/decorators/context-selector.d.ts +6 -6
- package/dist/context/decorators/context-selector.js +2 -2
- package/dist/context/decorators/context-selector.js.map +15 -3
- package/dist/context/decorators/legacy/consume-context.d.ts +2 -2
- package/dist/context/decorators/legacy/consume-context.js +2 -2
- package/dist/context/decorators/legacy/consume-context.js.map +10 -3
- package/dist/context/decorators/legacy/context-selector-field.d.ts +2 -2
- package/dist/context/decorators/legacy/context-selector-field.js +2 -2
- package/dist/context/decorators/legacy/context-selector-field.js.map +11 -3
- package/dist/context/decorators/legacy/context-selector.d.ts +2 -2
- package/dist/context/decorators/legacy/context-selector.js +2 -2
- package/dist/context/decorators/legacy/context-selector.js.map +11 -3
- package/dist/context/decorators/legacy/provide-context.d.ts +2 -2
- package/dist/context/decorators/legacy/provide-context.js +2 -2
- package/dist/context/decorators/legacy/provide-context.js.map +11 -3
- package/dist/context/decorators/on-context-update.d.ts +5 -5
- package/dist/context/decorators/on-context-update.js +2 -2
- package/dist/context/decorators/on-context-update.js.map +14 -3
- package/dist/context/decorators/provide-context.d.ts +5 -2
- package/dist/context/decorators/provide-context.js +2 -2
- package/dist/context/decorators/provide-context.js.map +14 -3
- package/dist/context/decorators/standard/consume-context.d.ts +2 -2
- package/dist/context/decorators/standard/consume-context.js +2 -2
- package/dist/context/decorators/standard/consume-context.js.map +9 -3
- package/dist/context/decorators/standard/context-selector-field.d.ts +2 -2
- package/dist/context/decorators/standard/context-selector-field.js +2 -2
- package/dist/context/decorators/standard/context-selector-field.js.map +10 -3
- package/dist/context/decorators/standard/context-selector.d.ts +2 -3
- package/dist/context/decorators/standard/context-selector.js +2 -2
- package/dist/context/decorators/standard/context-selector.js.map +10 -3
- package/dist/context/decorators/standard/provide-context.d.ts +2 -2
- package/dist/context/decorators/standard/provide-context.js +2 -2
- package/dist/context/decorators/standard/provide-context.js.map +10 -3
- package/dist/context/events.d.ts +18 -11
- package/dist/context/events.js +2 -2
- package/dist/context/events.js.map +4 -3
- package/dist/context/hydration-script.js +2 -2
- package/dist/context/hydration-script.js.map +6 -3
- package/dist/context/index.d.ts +8 -0
- package/dist/context/index.js +3 -0
- package/dist/context/index.js.map +35 -0
- package/dist/controller-registry.d.ts +28 -0
- package/dist/controller-registry.js +3 -0
- package/dist/controller-registry.js.map +11 -0
- package/dist/core/controller-metadata.d.ts +3 -0
- package/dist/core/controller-metadata.js +3 -0
- package/dist/core/controller-metadata.js.map +10 -0
- package/dist/core/custom-element-metadata.d.ts +11 -0
- package/dist/core/custom-element-metadata.js +2 -2
- package/dist/core/custom-element-metadata.js.map +4 -3
- package/dist/core/hydration-codec.d.ts +8 -1
- package/dist/core/hydration-codec.js +2 -2
- package/dist/core/hydration-codec.js.map +5 -3
- package/dist/core/radiant-component-ssr-registry.d.ts +13 -13
- package/dist/core/radiant-component-ssr-registry.js +2 -2
- package/dist/core/radiant-component-ssr-registry.js.map +4 -3
- package/dist/core/radiant-component-ssr.d.ts +3 -3
- package/dist/core/radiant-component-ssr.js +2 -2
- package/dist/core/radiant-component-ssr.js.map +8 -3
- package/dist/core/radiant-controller.d.ts +127 -0
- package/dist/core/radiant-controller.js +3 -0
- package/dist/core/radiant-controller.js.map +13 -0
- package/dist/core/radiant-element.d.ts +43 -41
- package/dist/core/radiant-element.js +2 -2
- package/dist/core/radiant-element.js.map +13 -3
- package/dist/core/radiant-hydrator-state.d.ts +1 -1
- package/dist/core/radiant-hydrator-state.js +2 -2
- package/dist/core/radiant-hydrator-state.js.map +4 -3
- package/dist/core/reactive-host.d.ts +137 -0
- package/dist/core/reactive-host.js +3 -0
- package/dist/core/reactive-host.js.map +10 -0
- package/dist/core/reactive-jsx-value.js +2 -2
- package/dist/core/reactive-jsx-value.js.map +4 -3
- package/dist/core/reactive-prop-metadata.js +2 -2
- package/dist/core/reactive-prop-metadata.js.map +4 -3
- package/dist/core/slot-projection-runtime.js +2 -2
- package/dist/core/slot-projection-runtime.js.map +6 -3
- package/dist/core/ssr-preparation.js +2 -2
- package/dist/core/ssr-preparation.js.map +4 -3
- package/dist/decorators/attr.d.ts +6 -0
- package/dist/decorators/attr.js +3 -0
- package/dist/decorators/attr.js.map +16 -0
- package/dist/decorators/bound.d.ts +4 -2
- package/dist/decorators/bound.js +2 -2
- package/dist/decorators/bound.js.map +7 -3
- package/dist/decorators/bridge.d.ts +11 -7
- package/dist/decorators/bridge.js +2 -2
- package/dist/decorators/bridge.js.map +4 -3
- package/dist/decorators/controller.d.ts +2 -0
- package/dist/decorators/controller.js +3 -0
- package/dist/decorators/controller.js.map +12 -0
- package/dist/decorators/custom-element.d.ts +4 -2
- package/dist/decorators/custom-element.js +2 -2
- package/dist/decorators/custom-element.js.map +7 -3
- package/dist/decorators/debounce.d.ts +5 -2
- package/dist/decorators/debounce.js +2 -2
- package/dist/decorators/debounce.js.map +8 -3
- package/dist/decorators/event.d.ts +5 -2
- package/dist/decorators/event.js +2 -2
- package/dist/decorators/event.js.map +10 -3
- package/dist/decorators/legacy/attr.d.ts +2 -0
- package/dist/decorators/legacy/attr.js +3 -0
- package/dist/decorators/legacy/attr.js.map +13 -0
- package/dist/decorators/legacy/bound.js +2 -2
- package/dist/decorators/legacy/bound.js.map +4 -3
- package/dist/decorators/legacy/custom-element.js +2 -2
- package/dist/decorators/legacy/custom-element.js.map +5 -3
- package/dist/decorators/legacy/debounce.js +2 -2
- package/dist/decorators/legacy/debounce.js.map +5 -3
- package/dist/decorators/legacy/event.js +2 -2
- package/dist/decorators/legacy/event.js.map +7 -3
- package/dist/decorators/legacy/instance-initializers.d.ts +3 -4
- package/dist/decorators/legacy/instance-initializers.js +2 -2
- package/dist/decorators/legacy/instance-initializers.js.map +4 -3
- package/dist/decorators/legacy/on-event.d.ts +2 -2
- package/dist/decorators/legacy/on-event.js +2 -2
- package/dist/decorators/legacy/on-event.js.map +6 -3
- package/dist/decorators/legacy/on-updated.d.ts +7 -2
- package/dist/decorators/legacy/on-updated.js +2 -2
- package/dist/decorators/legacy/on-updated.js.map +5 -3
- package/dist/decorators/legacy/query-slot.js +2 -2
- package/dist/decorators/legacy/query-slot.js.map +7 -3
- package/dist/decorators/legacy/query.d.ts +7 -2
- package/dist/decorators/legacy/query.js +2 -2
- package/dist/decorators/legacy/query.js.map +6 -3
- package/dist/decorators/legacy/reactive-field.d.ts +2 -2
- package/dist/decorators/legacy/reactive-field.js +2 -2
- package/dist/decorators/legacy/reactive-field.js.map +5 -3
- package/dist/decorators/legacy/reactive-prop.d.ts +10 -16
- package/dist/decorators/legacy/reactive-prop.js +2 -2
- package/dist/decorators/legacy/reactive-prop.js.map +7 -3
- package/dist/decorators/legacy/signal.d.ts +4 -3
- package/dist/decorators/legacy/signal.js +2 -2
- package/dist/decorators/legacy/signal.js.map +9 -3
- package/dist/decorators/on-event.d.ts +6 -3
- package/dist/decorators/on-event.js +2 -2
- package/dist/decorators/on-event.js.map +9 -3
- package/dist/decorators/on-updated.d.ts +12 -2
- package/dist/decorators/on-updated.js +2 -2
- package/dist/decorators/on-updated.js.map +8 -3
- package/dist/decorators/prop.d.ts +19 -7
- package/dist/decorators/prop.js +2 -2
- package/dist/decorators/prop.js.map +10 -3
- package/dist/decorators/query-slot.d.ts +11 -3
- package/dist/decorators/query-slot.js +2 -2
- package/dist/decorators/query-slot.js.map +10 -3
- package/dist/decorators/query.d.ts +9 -2
- package/dist/decorators/query.js +2 -2
- package/dist/decorators/query.js.map +9 -3
- package/dist/decorators/shared/reactive-attr.d.ts +25 -0
- package/dist/decorators/shared/reactive-attr.js +3 -0
- package/dist/decorators/shared/reactive-attr.js.map +11 -0
- package/dist/decorators/signal.d.ts +10 -4
- package/dist/decorators/signal.js +2 -2
- package/dist/decorators/signal.js.map +11 -3
- package/dist/decorators/standard/attr.d.ts +2 -0
- package/dist/decorators/standard/attr.js +3 -0
- package/dist/decorators/standard/attr.js.map +12 -0
- package/dist/decorators/standard/bound.js +2 -2
- package/dist/decorators/standard/bound.js.map +4 -3
- package/dist/decorators/standard/custom-element.js +2 -2
- package/dist/decorators/standard/custom-element.js.map +5 -3
- package/dist/decorators/standard/debounce.js +2 -2
- package/dist/decorators/standard/debounce.js.map +5 -3
- package/dist/decorators/standard/event.js +2 -2
- package/dist/decorators/standard/event.js.map +6 -3
- package/dist/decorators/standard/on-event.d.ts +2 -1
- package/dist/decorators/standard/on-event.js +2 -2
- package/dist/decorators/standard/on-event.js.map +5 -3
- package/dist/decorators/standard/on-updated.d.ts +5 -1
- package/dist/decorators/standard/on-updated.js +2 -2
- package/dist/decorators/standard/on-updated.js.map +4 -3
- package/dist/decorators/standard/query-slot.d.ts +1 -1
- package/dist/decorators/standard/query-slot.js +2 -2
- package/dist/decorators/standard/query-slot.js.map +5 -3
- package/dist/decorators/standard/query.d.ts +2 -1
- package/dist/decorators/standard/query.js +2 -2
- package/dist/decorators/standard/query.js.map +5 -3
- package/dist/decorators/standard/reactive-field.d.ts +2 -2
- package/dist/decorators/standard/reactive-field.js +2 -2
- package/dist/decorators/standard/reactive-field.js.map +4 -3
- package/dist/decorators/standard/reactive-prop.d.ts +13 -2
- package/dist/decorators/standard/reactive-prop.js +2 -2
- package/dist/decorators/standard/reactive-prop.js.map +6 -3
- package/dist/decorators/standard/signal.d.ts +4 -3
- package/dist/decorators/standard/signal.js +2 -2
- package/dist/decorators/standard/signal.js.map +8 -3
- package/dist/decorators/state.d.ts +6 -5
- package/dist/decorators/state.js +2 -2
- package/dist/decorators/state.js.map +8 -3
- package/dist/helpers/create-event-listener.d.ts +11 -2
- package/dist/helpers/create-event-listener.js +2 -2
- package/dist/helpers/create-event-listener.js.map +4 -3
- package/dist/helpers/create-event.js +2 -2
- package/dist/helpers/create-event.js.map +5 -3
- package/dist/helpers/create-query-slot.js +2 -2
- package/dist/helpers/create-query-slot.js.map +4 -3
- package/dist/helpers/create-query.d.ts +14 -3
- package/dist/helpers/create-query.js +2 -2
- package/dist/helpers/create-query.js.map +4 -3
- package/dist/helpers/debounce.js +2 -2
- package/dist/helpers/debounce.js.map +4 -3
- package/dist/helpers/index.js +2 -2
- package/dist/helpers/index.js.map +9 -3
- package/dist/index.d.ts +4 -14
- package/dist/index.js +2 -2
- package/dist/index.js.map +60 -3
- package/dist/server/context-ssr.js +2 -2
- package/dist/server/context-ssr.js.map +5 -3
- package/dist/server/html-parser.js +2 -2
- package/dist/server/html-parser.js.map +4 -3
- package/dist/server/install-light-dom-shim.js +2 -2
- package/dist/server/install-light-dom-shim.js.map +5 -3
- package/dist/server/light-dom-shim.js +2 -2
- package/dist/server/light-dom-shim.js.map +5 -3
- package/dist/server/project-root.js +2 -2
- package/dist/server/project-root.js.map +2 -2
- package/dist/server/radiant-component-ssr-runtime.d.ts +2 -2
- package/dist/server/radiant-component-ssr-runtime.js +2 -2
- package/dist/server/radiant-component-ssr-runtime.js.map +11 -3
- package/dist/server/render-component.d.ts +3 -13
- package/dist/server/render-component.js +2 -2
- package/dist/server/render-component.js.map +14 -4
- package/dist/server/render-controller.d.ts +57 -0
- package/dist/server/render-controller.js +3 -0
- package/dist/server/render-controller.js.map +23 -0
- package/dist/server/slot-projection-html.js +2 -2
- package/dist/server/slot-projection-html.js.map +7 -3
- package/dist/signals/host-resource.js +2 -2
- package/dist/signals/host-resource.js.map +2 -2
- package/dist/signals/host-signal.d.ts +4 -2
- package/dist/signals/host-signal.js +2 -2
- package/dist/signals/host-signal.js.map +7 -3
- package/dist/signals/hydration-script.js +2 -2
- package/dist/signals/hydration-script.js.map +6 -3
- package/dist/tools/escape-script-json.js +2 -2
- package/dist/tools/escape-script-json.js.map +4 -3
- package/dist/tools/event-emitter.js +2 -2
- package/dist/tools/event-emitter.js.map +4 -3
- package/dist/tools/index.js +2 -2
- package/dist/tools/index.js.map +7 -3
- package/dist/tools/render-jsx-template.js +2 -2
- package/dist/tools/render-jsx-template.js.map +4 -3
- package/dist/tools/stringify-typed.js +2 -2
- package/dist/tools/stringify-typed.js.map +4 -3
- package/dist/types.js +2 -2
- package/dist/types.js.map +2 -2
- package/dist/utils/attribute-utils.js +2 -2
- package/dist/utils/attribute-utils.js.map +4 -3
- package/dist/utils/index.js +2 -2
- package/dist/utils/index.js.map +4 -3
- package/package.json +26 -5
- package/size-budget.json +11 -2
- 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-21acj2eq.js +0 -4
- package/dist/chunk-21acj2eq.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-30x4hggg.js.map +0 -10
- package/dist/chunk-3ynk7e1e.js +0 -4
- package/dist/chunk-3ynk7e1e.js.map +0 -10
- package/dist/chunk-5b1en9vz.js +0 -4
- package/dist/chunk-5b1en9vz.js.map +0 -10
- 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-66e6s792.js.map +0 -10
- 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-e5jd9h6t.js +0 -4
- package/dist/chunk-e5jd9h6t.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-gpv1n74a.js +0 -4
- package/dist/chunk-gpv1n74a.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-jkb2y7c8.js.map +0 -10
- 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-nssj2x13.js.map +0 -10
- 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-rkh1vkb9.js.map +0 -10
- 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-sf4a2gy5.js +0 -4
- package/dist/chunk-sf4a2gy5.js.map +0 -10
- package/dist/chunk-ssnnxzrj.js +0 -4
- package/dist/chunk-ssnnxzrj.js.map +0 -10
- package/dist/chunk-t8xtvgyg.js +0 -4
- package/dist/chunk-t8xtvgyg.js.map +0 -10
- 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-vgtggzb6.js.map +0 -9
- 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-wd23rn4q.js.map +0 -10
- 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-wvd1ffe4.js.map +0 -10
- 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/chunk-zygdebw8.js +0 -4
- package/dist/chunk-zygdebw8.js.map +0 -10
- 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
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../src/context/decorators/legacy/consume-context.ts"],
|
|
4
|
-
"sourcesContent": [
|
|
5
|
-
"import type { RadiantElement } from '../../../core/radiant-element';\nimport { registerLegacyInstanceInitializer } from '../../../decorators/legacy/instance-initializers';\nimport { bootstrapSsrConsumedContext, connectConsumedContext } from '../../context-consumer-bootstrap';\nimport type { UnknownContext } from '../../types';\n\nexport function consumeContext(context: UnknownContext) {\n\treturn (proto: RadiantElement, propertyKey: string) => {\n\t\tconst assignContextProvider = (element: RadiantElement, provider: unknown) => {\n\t\t\t(element as any)[propertyKey] = provider;\n\t\t};\n\t\tconst initializeConsumedContextForHost = (element: RadiantElement, options: { emitMounted?: boolean } = {}) => {\n\t\t\tif ((element as any)[propertyKey]) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\treturn connectConsumedContext(\n\t\t\t\telement,\n\t\t\t\tcontext,\n\t\t\t\t(provider) => {\n\t\t\t\t\tassignContextProvider(element, provider);\n\t\t\t\t},\n\t\t\t\toptions,\n\t\t\t);\n\t\t};\n\n\t\tregisterLegacyInstanceInitializer(proto, (element) => {\n\t\t\tbootstrapSsrConsumedContext(element, context, (provider) => {\n\t\t\t\tassignContextProvider(element, provider);\n\t\t\t});\n\n\t\t\telement.registerConnectedCallback(() => {\n\t\t\t\tif (initializeConsumedContextForHost(element, { emitMounted: true })) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tqueueMicrotask(() => {\n\t\t\t\t\tinitializeConsumedContextForHost(element, { emitMounted: true });\n\t\t\t\t});\n\t\t\t});\n\t\t});\n\t};\n}\n"
|
|
6
|
-
],
|
|
7
|
-
"mappings": "8FAKO,GAAS,CAAc,CAAC,EAAyB,CACvD,MAAO,CAAC,EAAuB,IAAwB,CACtD,IAAM,EAAwB,CAAC,EAAyB,IAAsB,CAC5E,EAAgB,GAAe,GAE3B,EAAmC,CAAC,EAAyB,EAAqC,CAAC,IAAM,CAC9G,GAAK,EAAgB,GACpB,MAAO,GAGR,OAAO,EACN,EACA,EACA,CAAC,IAAa,CACb,EAAsB,EAAS,CAAQ,GAExC,CACD,GAGD,EAAkC,EAAO,CAAC,IAAY,CACrD,EAA4B,EAAS,EAAS,CAAC,IAAa,CAC3D,EAAsB,EAAS,CAAQ,EACvC,EAED,EAAQ,0BAA0B,IAAM,CACvC,GAAI,EAAiC,EAAS,CAAE,YAAa,EAAK,CAAC,EAClE,OAGD,eAAe,IAAM,CACpB,EAAiC,EAAS,CAAE,YAAa,EAAK,CAAC,EAC/D,EACD,EACD",
|
|
8
|
-
"debugId": "C969449EEF34F5CD64756E2164756E21",
|
|
9
|
-
"names": []
|
|
10
|
-
}
|
package/dist/chunk-ndw3hc3v.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../src/decorators/query.ts"],
|
|
4
|
-
"sourcesContent": [
|
|
5
|
-
"import type { StandardOrLegacyFieldDecoratorArgs } from '../types';\nimport type { QueryConfig, QueryScope } from '../helpers/create-query';\nimport { query as legacyQuery } from './legacy/query';\nimport { query as standardQuery } from './standard/query';\nimport { fieldDecoratorBridge } from './bridge';\n\nexport type { QueryConfig, QueryScope };\n\n/**\n * A decorator to query by CSS selector or data-ref attribute.\n * By default it queries for the first element that matches the selector, but it can be configured to query for all elements.\n * It caches the result only when `cache` is enabled.\n * Queries run against the host light DOM by default, but can be directed to the shadow root or both trees.\n * @param options {@link QueryConfig} The options for the reactive property.\n */\nexport function query<T extends Element | Element[]>(options: QueryConfig) {\n\treturn function (\n\t\tprotoOrTarget: StandardOrLegacyFieldDecoratorArgs['protoOrTarget'],\n\t\tnameOrContext: StandardOrLegacyFieldDecoratorArgs['nameOrContext'],\n\t): any {\n\t\treturn fieldDecoratorBridge(standardQuery(options), legacyQuery<T>(options), protoOrTarget, nameOrContext);\n\t};\n}\n"
|
|
6
|
-
],
|
|
7
|
-
"mappings": "qIAeO,GAAS,LAAoC,CAAC,EAAsB,CAC1E,OAAO,QAAS,CACf,EACA,EACM,CACN,OAAO,EAAqB,EAAc,CAAO,EAAG,EAAe,CAAO,EAAG,EAAe,CAAa",
|
|
8
|
-
"debugId": "C26428BC6AB60B5B64756E2164756E21",
|
|
9
|
-
"names": []
|
|
10
|
-
}
|
package/dist/chunk-nnnb6pac.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{Ha as F,Ia as G}from"./chunk-dabagjk6.js";import{ub as C,vb as D}from"./chunk-hpzgnxgq.js";import{createMarkupNodeLike as K}from"@ecopages/jsx";import{state as O}from"@ecopages/signals";function Y(q){return typeof q==="object"&&q!==null&&typeof q.get==="function"&&typeof q.set==="function"&&typeof q.subscribe==="function"&&typeof q.update==="function"}class I{host;hydrate;hydrationKey;property;source;currentValue;hasAppliedHostHydration=!1;sourceUnsubscribe;constructor(q){this.host=q.host,this.hydrate=q.hydrate,this.hydrationKey=q.hydrationKey,this.property=q.property,this.source=q.source??O(this.resolveInitialValue(q.initialValue)),this.currentValue=this.source.get()}get(){return this.source.get()}set(q){this.source.set(q)}subscribe(q){return this.source.subscribe(q)}update(q){this.set(q(this.get()))}connectToSource(){if(this.sourceUnsubscribe)return;let q=this.source.get();if(!Object.is(this.currentValue,q)){let A=this.currentValue;this.currentValue=q,this.host.notifyUpdate(this.property,A,q)}this.sourceUnsubscribe=this.source.subscribe((A)=>{this.handleSourceChange(A)})}disconnectFromSource(){this.sourceUnsubscribe?.(),this.sourceUnsubscribe=void 0}hydrateFromHost(){if(!this.hydrate||this.hasAppliedHostHydration)return;this.hasAppliedHostHydration=!0;let q=this.source.get(),A=this.resolveInitialValue(q);if(!Object.is(q,A))this.source.set(A),this.currentValue=this.source.get(),this.host.notifyUpdate(this.property,q,this.currentValue)}renderHydrationScript(){let q=this.renderHydrationScriptTag();if(!q)return;return K(q)}renderHydrationScriptTag(){let q=this.serializeHydrationValue();if(!q)return;return F({hydrationKey:this.hydrationKey,serializedValue:q})}findHydrationScriptElement(){return D(this.host,"signal",this.hydrationKey)}isObject(q){return typeof q==="object"&&!Array.isArray(q)&&q!==null}resolveInitialValue(q){if(!this.hydrate)return q;let A=this.findHydrationScriptElement();if(!A)return q;let B=C(A,q);if(this.hydrate===Object&&this.isObject(B)&&this.isObject(q))return{...q,...B};return B}serializeHydrationValue(){if(!this.hydrate)return;let q=JSON.stringify(this.get());if(typeof q!=="string")return;return G(q)}handleSourceChange(q){let A=this.currentValue;if(this.currentValue=q,!Object.is(A,q))this.host.notifyUpdate(this.property,A,q)}}function Z(q){return new I(q)}
|
|
2
|
-
export{Y as Ea,I as Fa,Z as Ga};
|
|
3
|
-
|
|
4
|
-
//# debugId=FF7C4716227882D764756E2164756E21
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../src/signals/host-signal.ts"],
|
|
4
|
-
"sourcesContent": [
|
|
5
|
-
"import { createMarkupNodeLike, type JsxRenderable } from '@ecopages/jsx';\nimport { state, type WritableSignal } from '@ecopages/signals';\nimport type { SsrSerializableHydrationBinding } from '../core/ssr-hydration-binding';\nimport type { RadiantElement } from '../core/radiant-element';\nimport type { AttributeTypeConstant } from '../utils/attribute-utils';\nimport { findHydrationScript, parseHydrationPayload } from '../core/hydration-codec';\nimport { createSignalHydrationScriptTag, escapeSignalHydrationJson } from './hydration-script';\n\ntype HostSignalOptions<Value> = {\n\thost: RadiantElement;\n\thydrate?: AttributeTypeConstant;\n\thydrationKey?: string;\n\tinitialValue?: Value;\n\tproperty: string;\n\tsource?: WritableSignal<Value>;\n};\n\nexport function isWritableSignalLike<Value>(value: unknown): value is WritableSignal<Value> {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\ttypeof (value as WritableSignal<Value>).get === 'function' &&\n\t\ttypeof (value as WritableSignal<Value>).set === 'function' &&\n\t\ttypeof (value as WritableSignal<Value>).subscribe === 'function' &&\n\t\ttypeof (value as WritableSignal<Value>).update === 'function'\n\t);\n}\n\n/**\n * Host-owned writable signal that bridges signal updates back into Radiant's\n * update callback channel and optional SSR hydration pipeline.\n */\nexport class HostSignal<Value> implements WritableSignal<Value>, SsrSerializableHydrationBinding {\n\tprivate readonly host: RadiantElement;\n\tprivate readonly hydrate?: AttributeTypeConstant;\n\tprivate readonly hydrationKey?: string;\n\tprivate readonly property: string;\n\tprivate readonly source: WritableSignal<Value>;\n\tprivate currentValue: Value;\n\tprivate hasAppliedHostHydration = false;\n\tprivate sourceUnsubscribe?: () => void;\n\n\tconstructor(options: HostSignalOptions<Value>) {\n\t\tthis.host = options.host;\n\t\tthis.hydrate = options.hydrate;\n\t\tthis.hydrationKey = options.hydrationKey;\n\t\tthis.property = options.property;\n\t\tthis.source = options.source ?? state(this.resolveInitialValue(options.initialValue as Value));\n\t\tthis.currentValue = this.source.get();\n\t}\n\n\tpublic get(): Value {\n\t\treturn this.source.get();\n\t}\n\n\tpublic set(nextValue: Value): void {\n\t\tthis.source.set(nextValue);\n\t}\n\n\tpublic subscribe(notify: (value: Value) => void): () => void {\n\t\treturn this.source.subscribe(notify);\n\t}\n\n\tpublic update(updater: (value: Value) => Value): void {\n\t\tthis.set(updater(this.get()));\n\t}\n\n\tpublic connectToSource(): void {\n\t\tif (this.sourceUnsubscribe) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst nextValue = this.source.get();\n\n\t\tif (!Object.is(this.currentValue, nextValue)) {\n\t\t\tconst previousValue = this.currentValue;\n\t\t\tthis.currentValue = nextValue;\n\t\t\tthis.host.notifyUpdate(this.property, previousValue, nextValue);\n\t\t}\n\n\t\tthis.sourceUnsubscribe = this.source.subscribe((value) => {\n\t\t\tthis.handleSourceChange(value);\n\t\t});\n\t}\n\n\tpublic disconnectFromSource(): void {\n\t\tthis.sourceUnsubscribe?.();\n\t\tthis.sourceUnsubscribe = undefined;\n\t}\n\n\tpublic hydrateFromHost(): void {\n\t\tif (!this.hydrate || this.hasAppliedHostHydration) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.hasAppliedHostHydration = true;\n\n\t\tconst previousValue = this.source.get();\n\t\tconst hydratedValue = this.resolveInitialValue(previousValue);\n\n\t\tif (!Object.is(previousValue, hydratedValue)) {\n\t\t\tthis.source.set(hydratedValue);\n\t\t\tthis.currentValue = this.source.get();\n\t\t\tthis.host.notifyUpdate(this.property, previousValue, this.currentValue);\n\t\t}\n\t}\n\n\tpublic renderHydrationScript(): JsxRenderable | undefined {\n\t\tconst outerHTML = this.renderHydrationScriptTag();\n\n\t\tif (!outerHTML) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\treturn createMarkupNodeLike(outerHTML);\n\t}\n\n\tpublic renderHydrationScriptTag(): string | undefined {\n\t\tconst serializedValue = this.serializeHydrationValue();\n\n\t\tif (!serializedValue) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\treturn createSignalHydrationScriptTag({\n\t\t\thydrationKey: this.hydrationKey,\n\t\t\tserializedValue,\n\t\t});\n\t}\n\n\tprivate findHydrationScriptElement(): Element | null {\n\t\treturn findHydrationScript(this.host, 'signal', this.hydrationKey);\n\t}\n\n\tprivate isObject(value: unknown): value is Record<string, unknown> {\n\t\treturn typeof value === 'object' && !Array.isArray(value) && value !== null;\n\t}\n\n\tprivate resolveInitialValue(initialValue: Value): Value {\n\t\tif (!this.hydrate) {\n\t\t\treturn initialValue;\n\t\t}\n\n\t\tconst hydrationScriptElement = this.findHydrationScriptElement();\n\n\t\tif (!hydrationScriptElement) {\n\t\t\treturn initialValue;\n\t\t}\n\n\t\tconst parsedHydrationValue = parseHydrationPayload(hydrationScriptElement, initialValue);\n\n\t\tif (this.hydrate === Object && this.isObject(parsedHydrationValue) && this.isObject(initialValue)) {\n\t\t\treturn {\n\t\t\t\t...initialValue,\n\t\t\t\t...parsedHydrationValue,\n\t\t\t} as Value;\n\t\t}\n\n\t\treturn parsedHydrationValue;\n\t}\n\n\tprivate serializeHydrationValue(): string | undefined {\n\t\tif (!this.hydrate) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst serializedValue = JSON.stringify(this.get());\n\n\t\tif (typeof serializedValue !== 'string') {\n\t\t\treturn undefined;\n\t\t}\n\n\t\treturn escapeSignalHydrationJson(serializedValue);\n\t}\n\n\tprivate handleSourceChange(nextValue: Value): void {\n\t\tconst previousValue = this.currentValue;\n\t\tthis.currentValue = nextValue;\n\n\t\tif (!Object.is(previousValue, nextValue)) {\n\t\t\tthis.host.notifyUpdate(this.property, previousValue, nextValue);\n\t\t}\n\t}\n}\n\nexport function createHostSignal<Value>(options: HostSignalOptions<Value>): HostSignal<Value> {\n\treturn new HostSignal(options);\n}\n"
|
|
6
|
-
],
|
|
7
|
-
"mappings": "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",
|
|
8
|
-
"debugId": "FF7C4716227882D764756E2164756E21",
|
|
9
|
-
"names": []
|
|
10
|
-
}
|
package/dist/chunk-nssj2x13.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../src/tools/escape-script-json.ts"],
|
|
4
|
-
"sourcesContent": [
|
|
5
|
-
"/**\n * Escapes serialized JSON so it remains safe when embedded inside an HTML\n * `<script>` tag.\n */\nexport function escapeScriptJson(value: string): string {\n\treturn value\n\t\t.replace(/&/g, '\\\\u0026')\n\t\t.replace(/</g, '\\\\u003c')\n\t\t.replace(/>/g, '\\\\u003e')\n\t\t.replace(/\\u2028/g, '\\\\u2028')\n\t\t.replace(/\\u2029/g, '\\\\u2029');\n}\n"
|
|
6
|
-
],
|
|
7
|
-
"mappings": "AAIO,SAAS,CAAgB,CAAC,EAAuB,CACvD,OAAO,EACL,QAAQ,KAAM,SAAS,EACvB,QAAQ,KAAM,SAAS,EACvB,QAAQ,KAAM,SAAS,EACvB,QAAQ,UAAW,SAAS,EAC5B,QAAQ,UAAW,SAAS",
|
|
8
|
-
"debugId": "0C6A194314FA70CB64756E2164756E21",
|
|
9
|
-
"names": []
|
|
10
|
-
}
|
package/dist/chunk-nvr37vma.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../src/decorators/debounce.ts"],
|
|
4
|
-
"sourcesContent": [
|
|
5
|
-
"import type { StandardOrLegacyMethodDecoratorArgs } from '../types';\nimport { debounce as legacyDebounce } from './legacy/debounce';\nimport { debounce as standardDebounce } from './standard/debounce';\nimport { methodDecoratorBridge } from './bridge';\n\n/**\n * A decorator to debounce a method.\n * @param timeout The debounce timeout in milliseconds.\n */\nexport function debounce(timeout: number) {\n\treturn function (\n\t\tprotoOrTarget: StandardOrLegacyMethodDecoratorArgs['protoOrTarget'],\n\t\tnameOrContext: StandardOrLegacyMethodDecoratorArgs['nameOrContext'],\n\t\tdescriptor?: StandardOrLegacyMethodDecoratorArgs['descriptor'],\n\t): any {\n\t\treturn methodDecoratorBridge(\n\t\t\tstandardDebounce(timeout),\n\t\t\tlegacyDebounce(timeout),\n\t\t\tprotoOrTarget,\n\t\t\tnameOrContext,\n\t\t\tdescriptor,\n\t\t);\n\t};\n}\n"
|
|
6
|
-
],
|
|
7
|
-
"mappings": "uIASO,GAAS,LAAQ,CAAC,EAAiB,CACzC,OAAO,QAAS,CACf,EACA,EACA,EACM,CACN,OAAO,EACN,EAAiB,CAAO,EACxB,EAAe,CAAO,EACtB,EACA,EACA,CACD",
|
|
8
|
-
"debugId": "EE8FCDE8C69DD19764756E2164756E21",
|
|
9
|
-
"names": []
|
|
10
|
-
}
|
package/dist/chunk-p8k4g99a.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{L as D,M as G,N as E,O as H}from"./chunk-ek664x1c.js";import{ya as F}from"./chunk-eyw14d6y.js";function L(j,f,w,y={}){return I(j,()=>D(j,f,w,y))}function M(j,f,w,y){return I(j,()=>E(f,w,y))}function N(j,f,w,y={}){if(D(j,f,w,y))return!0;return G(j,f,w,y),!1}function O(j,f,w,y={}){if(E(f,w,y.select))return!0;return H(j,f,w,y),!1}function I(j,f){return F(j,f),f()}
|
|
2
|
-
export{L as H,M as I,N as J,O as K};
|
|
3
|
-
|
|
4
|
-
//# debugId=CC91456931A8600264756E2164756E21
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../src/context/context-consumer-bootstrap.ts"],
|
|
4
|
-
"sourcesContent": [
|
|
5
|
-
"import type { RadiantElement } from '../core/radiant-element';\nimport { registerSsrPreparationCallback } from '../core/ssr-preparation';\nimport {\n\tinitializeConsumedContext,\n\tinitializeContextSelection,\n\trequestConsumedContext,\n\trequestContextSelection,\n} from './context-consumer-runtime';\nimport type { ContextType, UnknownContext } from './types';\n\ntype ConsumedContextAssignment = (provider: unknown) => void;\n\n/**\n * Resolves a consumed context immediately and registers the same resolution to\n * run again during the later SSR preparation phase.\n *\n * This keeps constructor-time state and pre-serialization state aligned after\n * instance fields, props, or authored host content change during SSR setup.\n */\nexport function bootstrapSsrConsumedContext(\n\thost: RadiantElement,\n\tcontext: UnknownContext,\n\tassign: ConsumedContextAssignment,\n\toptions: { emitMounted?: boolean } = {},\n): boolean {\n\treturn registerAndResolveConsumerBootstrap(host, () => initializeConsumedContext(host, context, assign, options));\n}\n\n/**\n * Resolves a selected context value immediately and registers the same\n * selection for the later SSR preparation phase.\n *\n * This lets nested SSR renders recompute selector-backed state after the host\n * has finished construction and any server-side configuration hooks have run.\n */\nexport function bootstrapSsrContextSelection<TContext extends UnknownContext>(\n\thost: object,\n\tcontext: TContext,\n\tcallback: (value: unknown) => void,\n\tselect?: (context: ContextType<TContext>) => unknown,\n): boolean {\n\treturn registerAndResolveConsumerBootstrap(host, () => initializeContextSelection(context, callback, select));\n}\n\n/**\n * Resolves a consumed context from SSR when available, otherwise requests it\n * through the DOM event channel for the current client-side lifecycle pass.\n *\n * @returns `true` when the value was satisfied synchronously from SSR state.\n */\nexport function connectConsumedContext(\n\thost: RadiantElement,\n\tcontext: UnknownContext,\n\tassign: ConsumedContextAssignment,\n\toptions: { emitMounted?: boolean } = {},\n): boolean {\n\tif (initializeConsumedContext(host, context, assign, options)) {\n\t\treturn true;\n\t}\n\n\trequestConsumedContext(host, context, assign, options);\n\treturn false;\n}\n\n/**\n * Resolves a selected context value from SSR when available, otherwise requests\n * it through the DOM event channel for the current client-side lifecycle pass.\n *\n * @returns `true` when the value was satisfied synchronously from SSR state.\n */\nexport function connectContextSelection<TContext extends UnknownContext>(\n\thost: RadiantElement,\n\tcontext: TContext,\n\tcallback: (value: unknown) => void,\n\toptions: {\n\t\tselect?: (context: ContextType<TContext>) => unknown;\n\t\tsubscribe?: boolean;\n\t} = {},\n): boolean {\n\tif (initializeContextSelection(context, callback, options.select)) {\n\t\treturn true;\n\t}\n\n\trequestContextSelection(host, context, callback, options);\n\treturn false;\n}\n\nfunction registerAndResolveConsumerBootstrap<TResult>(host: object, resolve: () => TResult): TResult {\n\tregisterSsrPreparationCallback(host, resolve);\n\treturn resolve();\n}\n"
|
|
6
|
-
],
|
|
7
|
-
"mappings": "4GAmBO,GAAS,CAA2B,CAC1C,EACA,EACA,EACA,EAAqC,CAAC,EAC5B,CACV,OAAO,EAAoC,EAAM,IAAM,EAA0B,EAAM,EAAS,EAAQ,CAAO,CAAC,EAU1G,SAAS,CAA6D,CAC5E,EACA,EACA,EACA,EACU,CACV,OAAO,EAAoC,EAAM,IAAM,EAA2B,EAAS,EAAU,CAAM,CAAC,EAStG,SAAS,CAAsB,CACrC,EACA,EACA,EACA,EAAqC,CAAC,EAC5B,CACV,GAAI,EAA0B,EAAM,EAAS,EAAQ,CAAO,EAC3D,MAAO,GAIR,OADA,EAAuB,EAAM,EAAS,EAAQ,CAAO,EAC9C,GASD,SAAS,CAAwD,CACvE,EACA,EACA,EACA,EAGI,CAAC,EACK,CACV,GAAI,EAA2B,EAAS,EAAU,EAAQ,MAAM,EAC/D,MAAO,GAIR,OADA,EAAwB,EAAM,EAAS,EAAU,CAAO,EACjD,GAGR,SAAS,CAA4C,CAAC,EAAc,EAAiC,CAEpG,OADA,EAA+B,EAAM,CAAO,EACrC,EAAQ",
|
|
8
|
-
"debugId": "CC91456931A8600264756E2164756E21",
|
|
9
|
-
"names": []
|
|
10
|
-
}
|
package/dist/chunk-pkszgjqf.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{ba as E}from"./chunk-x457d0ap.js";import{ca as F}from"./chunk-vk48hgm4.js";function L(q,j){if(typeof j<"u"){if(typeof j==="object")return F()(q,j);return E()(q,j)}let G=q??{};return function(H,A){if(typeof A==="object")return F(G)(H,A);return E(G)(H,A)}}
|
|
2
|
-
export{L as aa};
|
|
3
|
-
|
|
4
|
-
//# debugId=B0D7E14A4522220E64756E2164756E21
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../src/decorators/signal.ts"],
|
|
4
|
-
"sourcesContent": [
|
|
5
|
-
"import type {\n\tLegacyFieldDecoratorArgs,\n\tStandardFieldDecoratorArgs,\n\tStandardOrLegacyFieldDecoratorArgs,\n} from '../types';\nimport { signal as legacySignal, type SignalDecoratorOptions } from './legacy/signal';\nimport { signal as standardSignal } from './standard/signal';\n\nexport type { SignalDecoratorOptions } from './standard/signal';\n\n/**\n * Declares a host-aware writable signal field.\n *\n * The decorated member becomes a real `WritableSignal` instance that JSX can\n * consume directly in child or attribute positions. By default the decorator\n * creates a host-owned signal, but it can also connect an existing shared\n * signal through the `source` option or a signal-valued field initializer.\n *\n * Connected signals still flow through Radiant's update callback channel so\n * `@onUpdated(...)` and `this.$.name` bindings continue to work. On\n * `RadiantComponent`, any signal or store reads performed during `render()`\n * now participate in rerender invalidation directly, which makes module-level\n * shared stores a natural fit without prop-bridging them through a second\n * reactive layer.\n *\n * When `hydrate` is provided, SSR host output appends a keyed JSON script so\n * the client can restore the signal's initial value during hydration.\n */\nexport function signal(\n\tprotoOrTarget: StandardOrLegacyFieldDecoratorArgs['protoOrTarget'],\n\tnameOrContext: StandardOrLegacyFieldDecoratorArgs['nameOrContext'],\n): any;\nexport function signal(options?: SignalDecoratorOptions): any;\nexport function signal(\n\tprotoOrOptions?: StandardOrLegacyFieldDecoratorArgs['protoOrTarget'] | SignalDecoratorOptions,\n\tnameOrContext?: StandardOrLegacyFieldDecoratorArgs['nameOrContext'],\n): any {\n\tif (typeof nameOrContext !== 'undefined') {\n\t\tif (typeof nameOrContext === 'object') {\n\t\t\treturn standardSignal()(protoOrOptions as StandardFieldDecoratorArgs['protoOrTarget'], nameOrContext);\n\t\t}\n\n\t\treturn legacySignal()(protoOrOptions as LegacyFieldDecoratorArgs['protoOrTarget'], nameOrContext);\n\t}\n\n\tconst options = (protoOrOptions ?? {}) as SignalDecoratorOptions;\n\n\treturn function (\n\t\tprotoOrTarget: StandardOrLegacyFieldDecoratorArgs['protoOrTarget'],\n\t\tcontextOrName: StandardOrLegacyFieldDecoratorArgs['nameOrContext'],\n\t): any {\n\t\tif (typeof contextOrName === 'object') {\n\t\t\treturn standardSignal(options)(\n\t\t\t\tprotoOrTarget as StandardFieldDecoratorArgs['protoOrTarget'],\n\t\t\t\tcontextOrName as StandardFieldDecoratorArgs['nameOrContext'],\n\t\t\t);\n\t\t}\n\n\t\treturn legacySignal(options)(\n\t\t\tprotoOrTarget as LegacyFieldDecoratorArgs['protoOrTarget'],\n\t\t\tcontextOrName as LegacyFieldDecoratorArgs['nameOrContext'],\n\t\t);\n\t};\n}\n"
|
|
6
|
-
],
|
|
7
|
-
"mappings": "wFAiCO,GAAS,CAAM,CACrB,EACA,EACM,CACN,GAAI,OAAO,EAAkB,IAAa,CACzC,GAAI,OAAO,IAAkB,SAC5B,OAAO,EAAe,EAAE,EAA+D,CAAa,EAGrG,OAAO,EAAa,EAAE,EAA6D,CAAa,EAGjG,IAAM,EAAW,GAAkB,CAAC,EAEpC,OAAO,QAAS,CACf,EACA,EACM,CACN,GAAI,OAAO,IAAkB,SAC5B,OAAO,EAAe,CAAO,EAC5B,EACA,CACD,EAGD,OAAO,EAAa,CAAO,EAC1B,EACA,CACD",
|
|
8
|
-
"debugId": "B0D7E14A4522220E64756E2164756E21",
|
|
9
|
-
"names": []
|
|
10
|
-
}
|
package/dist/chunk-q9z6tnzw.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../src/decorators/bridge.ts"],
|
|
4
|
-
"sourcesContent": [
|
|
5
|
-
"import type {\n\tLegacyFieldDecoratorArgs,\n\tLegacyMethodDecoratorArgs,\n\tStandardMethodDecoratorArgs,\n\tStandardOrLegacyFieldDecoratorArgs,\n\tStandardOrLegacyMethodDecoratorArgs,\n} from '../types';\n\ntype StandardFieldFn = (target: undefined, context: ClassFieldDecoratorContext<any, any>) => any;\n\ntype LegacyFieldFn = (\n\tproto: LegacyFieldDecoratorArgs['protoOrTarget'],\n\tname: LegacyFieldDecoratorArgs['nameOrContext'],\n) => any;\n\ntype StandardMethodFn = (\n\ttarget: StandardMethodDecoratorArgs['protoOrTarget'],\n\tcontext: StandardMethodDecoratorArgs['nameOrContext'],\n) => any;\n\ntype LegacyMethodFn = (\n\tproto: LegacyMethodDecoratorArgs['protoOrTarget'],\n\tname: LegacyMethodDecoratorArgs['nameOrContext'],\n\tdescriptor: LegacyMethodDecoratorArgs['descriptor'],\n) => any;\n\nexport function fieldDecoratorBridge(\n\tstandard: StandardFieldFn,\n\tlegacy: LegacyFieldFn,\n\tprotoOrTarget: StandardOrLegacyFieldDecoratorArgs['protoOrTarget'],\n\tnameOrContext: StandardOrLegacyFieldDecoratorArgs['nameOrContext'],\n): any {\n\tif (typeof nameOrContext === 'object') {\n\t\treturn standard(protoOrTarget as undefined, nameOrContext as ClassFieldDecoratorContext<any, any>);\n\t}\n\treturn legacy(\n\t\tprotoOrTarget as LegacyFieldDecoratorArgs['protoOrTarget'],\n\t\tnameOrContext as LegacyFieldDecoratorArgs['nameOrContext'],\n\t);\n}\n\nexport function methodDecoratorBridge(\n\tstandard: StandardMethodFn,\n\tlegacy: LegacyMethodFn,\n\tprotoOrTarget: StandardOrLegacyMethodDecoratorArgs['protoOrTarget'],\n\tnameOrContext: StandardOrLegacyMethodDecoratorArgs['nameOrContext'],\n\tdescriptor?: StandardOrLegacyMethodDecoratorArgs['descriptor'],\n): any {\n\tif (typeof nameOrContext === 'object') {\n\t\treturn standard(\n\t\t\tprotoOrTarget as StandardMethodDecoratorArgs['protoOrTarget'],\n\t\t\tnameOrContext as StandardMethodDecoratorArgs['nameOrContext'],\n\t\t);\n\t}\n\treturn legacy(\n\t\tprotoOrTarget as LegacyMethodDecoratorArgs['protoOrTarget'],\n\t\tnameOrContext as LegacyMethodDecoratorArgs['nameOrContext'],\n\t\tdescriptor as LegacyMethodDecoratorArgs['descriptor'],\n\t);\n}\n"
|
|
6
|
-
],
|
|
7
|
-
"mappings": "AA0BO,SAAS,CAAoB,CACnC,EACA,EACA,EACA,EACM,CACN,GAAI,OAAO,IAAkB,SAC5B,OAAO,EAAS,EAA4B,CAAqD,EAElG,OAAO,EACN,EACA,CACD,EAGM,SAAS,CAAqB,CACpC,EACA,EACA,EACA,EACA,EACM,CACN,GAAI,OAAO,IAAkB,SAC5B,OAAO,EACN,EACA,CACD,EAED,OAAO,EACN,EACA,EACA,CACD",
|
|
8
|
-
"debugId": "D2CC43EB923EB13264756E2164756E21",
|
|
9
|
-
"names": []
|
|
10
|
-
}
|
package/dist/chunk-qdz5sncz.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{Ma as d}from"./chunk-cnyxrh9r.js";import{xb as h}from"./chunk-rrg759ht.js";function A(j){return(k,q)=>{d(k,(b)=>{let u=h(b,j);b.registerConnectedCallback(()=>{Object.defineProperty(b,q,{get(){return u},enumerable:!0,configurable:!0})})})}}
|
|
2
|
-
export{A as ea};
|
|
3
|
-
|
|
4
|
-
//# debugId=E29727BF3027842A64756E2164756E21
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../src/decorators/legacy/event.ts"],
|
|
4
|
-
"sourcesContent": [
|
|
5
|
-
"import type { RadiantElement } from '../../core/radiant-element';\nimport { createEvent } from '../../helpers/create-event';\nimport type { EventEmitterConfig } from '../../tools/event-emitter';\nimport { registerLegacyInstanceInitializer } from './instance-initializers';\n\n/**\n * Decorator that attaches an EventEmitter to the class field property.\n * The EventEmitter can be used to dispatch custom events from the target element.\n * @param eventConfig Configuration for the event emitter.\n * @see {@link EventEmitter} for more details about how the EventEmitter works.\n */\nexport function event(eventConfig: EventEmitterConfig) {\n\treturn (proto: RadiantElement, propertyKey: string) => {\n\t\tregisterLegacyInstanceInitializer(proto, (element) => {\n\t\t\tconst emitter = createEvent(element, eventConfig);\n\n\t\t\telement.registerConnectedCallback(() => {\n\t\t\t\tObject.defineProperty(element, propertyKey, {\n\t\t\t\t\tget() {\n\t\t\t\t\t\treturn emitter;\n\t\t\t\t\t},\n\t\t\t\t\tenumerable: true,\n\t\t\t\t\tconfigurable: true,\n\t\t\t\t});\n\t\t\t});\n\t\t});\n\t};\n}\n"
|
|
6
|
-
],
|
|
7
|
-
"mappings": "wFAWO,GAAS,CAAK,CAAC,EAAiC,CACtD,MAAO,CAAC,EAAuB,IAAwB,CACtD,EAAkC,EAAO,CAAC,IAAY,CACrD,IAAM,EAAU,EAAY,EAAS,CAAW,EAEhD,EAAQ,0BAA0B,IAAM,CACvC,OAAO,eAAe,EAAS,EAAa,CAC3C,GAAG,EAAG,CACL,OAAO,GAER,WAAY,GACZ,aAAc,EACf,CAAC,EACD,EACD",
|
|
8
|
-
"debugId": "E29727BF3027842A64756E2164756E21",
|
|
9
|
-
"names": []
|
|
10
|
-
}
|
package/dist/chunk-qe0eww1n.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../src/context/decorators/on-context-update.ts"],
|
|
4
|
-
"sourcesContent": [
|
|
5
|
-
"import type { StandardOrLegacyMethodDecoratorArgs } from '../../types';\nimport type { RadiantElement } from '../../core/radiant-element';\nimport type { Context, ContextType, UnknownContext } from '../types';\nimport { contextSelector as legacyContextSelectorMethod } from './legacy/context-selector';\nimport { contextSelector as standardContextSelectorMethod } from './standard/context-selector';\nimport { methodDecoratorBridge } from '../../decorators/bridge';\n\ntype ContextUpdateMethod<Selected> = (value: Selected) => unknown;\n\ntype OnContextUpdateDecorator<Selected> = {\n\t<Host extends RadiantElement, TMethod extends ContextUpdateMethod<Selected>>(\n\t\tprotoOrTarget: TMethod,\n\t\tnameOrContext: ClassMethodDecoratorContext<Host, TMethod>,\n\t): void;\n\t(\n\t\tprotoOrTarget: RadiantElement,\n\t\tnameOrContext: string,\n\t\tdescriptor: TypedPropertyDescriptor<ContextUpdateMethod<Selected>>,\n\t): TypedPropertyDescriptor<ContextUpdateMethod<Selected>> | void;\n};\n\nexport type OnContextUpdateOptions<T extends UnknownContext, Selected = ContextType<T>> = {\n\t/** Context token to resolve from ancestor providers. */\n\tcontext: T;\n\t/** Optional projection that narrows the resolved context before delivery. */\n\tselect?: (context: ContextType<T>) => Selected;\n\t/** Whether client-side event-channel subscriptions should stay active after the first value. */\n\tsubscribe?: boolean;\n\t/** Whether RadiantComponent hosts should schedule `requestUpdate()` after delivery. */\n\trequestUpdate?: boolean;\n};\n\n/**\n * Subscribes a method to the current value, or a selected slice, of a context.\n *\n * The decorated method is invoked during SSR when an ambient provider is\n * available, and on the client it keeps receiving updates according to the\n * `subscribe` option.\n *\n * On `RadiantComponent` hosts, each delivery also schedules `requestUpdate()`\n * unless `requestUpdate: false` is set explicitly.\n *\n * @param options Context subscription configuration.\n */\nexport function onContextUpdate<T extends Context<unknown, unknown>, Selected = ContextType<T>>(\n\toptions: OnContextUpdateOptions<T, Selected>,\n): OnContextUpdateDecorator<Selected> {\n\treturn function (\n\t\tprotoOrTarget: StandardOrLegacyMethodDecoratorArgs['protoOrTarget'],\n\t\tnameOrContext: StandardOrLegacyMethodDecoratorArgs['nameOrContext'],\n\t\tdescriptor?: StandardOrLegacyMethodDecoratorArgs['descriptor'],\n\t): TypedPropertyDescriptor<ContextUpdateMethod<Selected>> | void {\n\t\treturn methodDecoratorBridge(\n\t\t\tstandardContextSelectorMethod(options),\n\t\t\tlegacyContextSelectorMethod(options),\n\t\t\tprotoOrTarget,\n\t\t\tnameOrContext,\n\t\t\tdescriptor,\n\t\t) as TypedPropertyDescriptor<ContextUpdateMethod<Selected>> | void;\n\t} as OnContextUpdateDecorator<Selected>;\n}\n"
|
|
6
|
-
],
|
|
7
|
-
"mappings": "gIA4CO,GAAS,LAA+E,CAC9F,EACqC,CACrC,OAAO,QAAS,CACf,EACA,EACA,EACgE,CAChE,OAAO,EACN,EAA8B,CAAO,EACrC,EAA4B,CAAO,EACnC,EACA,EACA,CACD",
|
|
8
|
-
"debugId": "E63D15B4F122B2CD64756E2164756E21",
|
|
9
|
-
"names": []
|
|
10
|
-
}
|
package/dist/chunk-r33zvvda.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{R as A}from"./chunk-21a7jask.js";import{Ma as w}from"./chunk-cnyxrh9r.js";function H({context:j,initialValue:B,hydrate:C,serialize:D}){return(E,f)=>{let k=(b)=>{if(b[f])return;let q=new A(b,{context:j,hydrationKey:f,initialValue:B,hydrate:C,serialize:D});b[f]=q,b.registerContextProvider(f,q),b.connectedContextCallback(j)};w(E,(b)=>{k(b),b.registerConnectedCallback(()=>{k(b)})})}}
|
|
2
|
-
export{H as w};
|
|
3
|
-
|
|
4
|
-
//# debugId=FA5A6E529695847664756E2164756E21
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../src/context/decorators/legacy/provide-context.ts"],
|
|
4
|
-
"sourcesContent": [
|
|
5
|
-
"import { ContextProvider } from '../../../context/context-provider';\nimport type { UnknownContext } from '../../../context/types';\nimport type { RadiantElement } from '../../../core/radiant-element';\nimport { registerLegacyInstanceInitializer } from '../../../decorators/legacy/instance-initializers';\nimport type { ProvideContextOptions } from '../provide-context';\n\nexport function provideContext<T extends UnknownContext>({\n\tcontext,\n\tinitialValue,\n\thydrate,\n\tserialize,\n}: ProvideContextOptions<T>) {\n\treturn (proto: RadiantElement, propertyKey: string) => {\n\t\tconst initializeProvider = (element: RadiantElement) => {\n\t\t\tif ((element as any)[propertyKey]) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst provider = new ContextProvider<T>(element, {\n\t\t\t\tcontext,\n\t\t\t\thydrationKey: propertyKey,\n\t\t\t\tinitialValue,\n\t\t\t\thydrate,\n\t\t\t\tserialize,\n\t\t\t});\n\t\t\t(element as any)[propertyKey] = provider;\n\t\t\telement.registerContextProvider(propertyKey, provider);\n\t\t\telement.connectedContextCallback(context);\n\t\t};\n\n\t\tregisterLegacyInstanceInitializer(proto, (element) => {\n\t\t\tinitializeProvider(element);\n\t\t\telement.registerConnectedCallback(() => {\n\t\t\t\tinitializeProvider(element);\n\t\t\t});\n\t\t});\n\t};\n}\n"
|
|
6
|
-
],
|
|
7
|
-
"mappings": "uFAMO,GAAS,CAAwC,EACvD,UACA,eACA,UACA,aAC4B,CAC5B,MAAO,CAAC,EAAuB,IAAwB,CACtD,IAAM,EAAqB,CAAC,IAA4B,CACvD,GAAK,EAAgB,GACpB,OAGD,IAAM,EAAW,IAAI,EAAmB,EAAS,CAChD,UACA,aAAc,EACd,eACA,UACA,WACD,CAAC,EACA,EAAgB,GAAe,EAChC,EAAQ,wBAAwB,EAAa,CAAQ,EACrD,EAAQ,yBAAyB,CAAO,GAGzC,EAAkC,EAAO,CAAC,IAAY,CACrD,EAAmB,CAAO,EAC1B,EAAQ,0BAA0B,IAAM,CACvC,EAAmB,CAAO,EAC1B,EACD",
|
|
8
|
-
"debugId": "FA5A6E529695847664756E2164756E21",
|
|
9
|
-
"names": []
|
|
10
|
-
}
|
package/dist/chunk-rkh1vkb9.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../src/decorators/standard/bound.ts"],
|
|
4
|
-
"sourcesContent": [
|
|
5
|
-
"import type { Method } from '../../types';\n\nexport function bound<T extends Method>(_: T, context: ClassMethodDecoratorContext) {\n\tconst methodName = String(context.name);\n\tif (context.private) {\n\t\tthrow new Error(`'bound' cannot decorate private properties like ${methodName as string}.`);\n\t}\n\tcontext.addInitializer(function (this: any) {\n\t\tthis[methodName] = this[methodName].bind(this);\n\t});\n}\n"
|
|
6
|
-
],
|
|
7
|
-
"mappings": "AAEO,SAAS,CAAuB,CAAC,EAAM,EAAsC,CACnF,IAAM,EAAa,OAAO,EAAQ,IAAI,EACtC,GAAI,EAAQ,QACX,MAAU,MAAM,mDAAmD,IAAuB,EAE3F,EAAQ,eAAe,QAAS,EAAY,CAC3C,KAAK,GAAc,KAAK,GAAY,KAAK,IAAI,EAC7C",
|
|
8
|
-
"debugId": "543AC0E8DE660B4864756E2164756E21",
|
|
9
|
-
"names": []
|
|
10
|
-
}
|
package/dist/chunk-rrg759ht.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../src/helpers/create-event.ts"],
|
|
4
|
-
"sourcesContent": [
|
|
5
|
-
"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"
|
|
6
|
-
],
|
|
7
|
-
"mappings": "yCASO,SAAS,CAAwB,CAAC,EAAsB,EAA6C,CAC3G,IAAM,EAAU,IAAI,EAAgB,EAAM,CAAM,EAEhD,OADA,EAAK,qBAAqB,EAAO,KAAM,CAAO,EACvC",
|
|
8
|
-
"debugId": "B632339BCFF34DA564756E2164756E21",
|
|
9
|
-
"names": []
|
|
10
|
-
}
|
package/dist/chunk-s09s5ayx.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{G as B}from"./chunk-5bkat72n.js";import{I as A,K as k}from"./chunk-p8k4g99a.js";import{Ma as w}from"./chunk-cnyxrh9r.js";function M(D){let{context:f,select:h,subscribe:q=!0}=D;return(E,F)=>{w(E,(d)=>{let j=B(d,(G)=>{d[F]=G},!0);A(d,f,j,h),d.registerConnectedCallback(()=>{if(k(d,f,j,{select:h,subscribe:q}))return;queueMicrotask(()=>{k(d,f,j,{select:h,subscribe:q})})})})}}
|
|
2
|
-
export{M as C};
|
|
3
|
-
|
|
4
|
-
//# debugId=AAAD552D0788280D64756E2164756E21
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../src/context/decorators/legacy/context-selector-field.ts"],
|
|
4
|
-
"sourcesContent": [
|
|
5
|
-
"import type { RadiantElement } from '../../../core/radiant-element';\nimport { registerLegacyInstanceInitializer } from '../../../decorators/legacy/instance-initializers';\nimport { bootstrapSsrContextSelection, connectContextSelection } from '../../context-consumer-bootstrap';\nimport type { Context, ContextType } from '../../types';\nimport { createContextSelectionDelivery } from '../context-selection-delivery';\n\nexport type ContextSelectorFieldOptions<T extends Context<unknown, unknown>, Selected = ContextType<T>> = {\n\tcontext: T;\n\tselect?: (context: ContextType<T>) => Selected;\n\tsubscribe?: boolean;\n};\n\nexport function contextSelectorField<T extends Context<unknown, unknown>, Selected = ContextType<T>>(\n\toptions: ContextSelectorFieldOptions<T, Selected>,\n) {\n\tconst { context, select, subscribe = true } = options;\n\n\treturn (target: RadiantElement, propertyName: string) => {\n\t\tregisterLegacyInstanceInitializer(target, (element) => {\n\t\t\tconst applyValue = createContextSelectionDelivery(\n\t\t\t\telement,\n\t\t\t\t(value) => {\n\t\t\t\t\t(element as unknown as Record<string, unknown>)[propertyName] = value as Selected;\n\t\t\t\t},\n\t\t\t\ttrue,\n\t\t\t);\n\n\t\t\tbootstrapSsrContextSelection(element, context, applyValue, select as any);\n\n\t\t\telement.registerConnectedCallback(() => {\n\t\t\t\tif (\n\t\t\t\t\tconnectContextSelection(element, context, applyValue, {\n\t\t\t\t\t\tselect: select as any,\n\t\t\t\t\t\tsubscribe,\n\t\t\t\t\t})\n\t\t\t\t) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tqueueMicrotask(() => {\n\t\t\t\t\tconnectContextSelection(element, context, applyValue, {\n\t\t\t\t\t\tselect: select as any,\n\t\t\t\t\t\tsubscribe,\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t});\n\t\t});\n\t};\n}\n"
|
|
6
|
-
],
|
|
7
|
-
"mappings": "4IAYO,GAAS,LAAoF,CACnG,EACC,CACD,IAAQ,UAAS,SAAQ,YAAY,IAAS,EAE9C,MAAO,CAAC,EAAwB,IAAyB,CACxD,EAAkC,EAAQ,CAAC,IAAY,CACtD,IAAM,EAAa,EAClB,EACA,CAAC,IAAU,CACT,EAA+C,GAAgB,GAEjE,EACD,EAEA,EAA6B,EAAS,EAAS,EAAY,CAAa,EAExE,EAAQ,0BAA0B,IAAM,CACvC,GACC,EAAwB,EAAS,EAAS,EAAY,CACrD,OAAQ,EACR,WACD,CAAC,EAED,OAGD,eAAe,IAAM,CACpB,EAAwB,EAAS,EAAS,EAAY,CACrD,OAAQ,EACR,WACD,CAAC,EACD,EACD,EACD",
|
|
8
|
-
"debugId": "AAAD552D0788280D64756E2164756E21",
|
|
9
|
-
"names": []
|
|
10
|
-
}
|
package/dist/chunk-sf4a2gy5.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{o as Z,r as _}from"./chunk-5b1en9vz.js";class G extends EventTarget{nodeType;static ELEMENT_NODE=1;static TEXT_NODE=3;childNodes=[];parentNode=null;constructor(j){super();this.nodeType=j}append(...j){for(let q of j)this.appendChild(typeof q==="string"?U(q):q)}appendChild(j){if("parentNode"in j&&j.parentNode&&"removeChild"in j.parentNode)j.parentNode.removeChild(j);return this.childNodes.push(j),j.parentNode=this,j}removeChild(j){let q=this.childNodes.indexOf(j);if(q===-1)return j;return this.childNodes.splice(q,1),j.parentNode=null,j}replaceChildren(...j){for(let q of this.childNodes)q.parentNode=null;this.childNodes=[],this.append(...j)}get textContent(){return this.childNodes.map((j)=>j.textContent??"").join("")}set textContent(j){this.replaceChildren(j??"")}}class $ extends G{value;constructor(j){super(G.TEXT_NODE);this.value=j}get textContent(){return this.value}set textContent(j){this.value=j??""}}class O extends G{attributes=new Map;fragmentHtml;fragmentText;localName;tagName;constructor(j="div"){super(G.ELEMENT_NODE);this.localName=j.toLowerCase(),this.tagName=this.localName.toUpperCase()}hasAttribute(j){return this.attributes.has(j)}getAttribute(j){return this.attributes.get(j)??null}getAttributeNames(){return Array.from(this.attributes.keys())}setAttribute(j,q){this.fragmentHtml=void 0,this.attributes.set(j,String(q))}removeAttribute(j){this.fragmentHtml=void 0,this.attributes.delete(j)}querySelector(){return null}querySelectorAll(){return[]}matches(){return!1}get outerHTML(){if(this.fragmentHtml!==void 0)return this.fragmentHtml;let j=Array.from(this.attributes.entries()).map(([q,B])=>` ${q}="${w(B)}"`).join("");return`<${this.localName}${j}>${this.innerHTML}</${this.localName}>`}get innerHTML(){return this.childNodes.map((j)=>D(j)).join("")}set innerHTML(j){this.fragmentHtml=void 0,this.fragmentText=void 0,this.replaceChildren(...k(j))}get textContent(){return this.fragmentText??super.textContent??""}set textContent(j){this.fragmentHtml=void 0,this.fragmentText=j??"",super.textContent=j}setSerializedFragment(j,q,B){this.fragmentHtml=j,this.fragmentText=q,this.attributes=new Map(Object.entries(B)),this.replaceChildren()}}class Q{bubbles;cancelable;composed;type;constructor(j,q={}){this.type=j,this.bubbles=q.bubbles??!1,this.cancelable=q.cancelable??!1,this.composed=q.composed??!1}}class V extends Q{detail;constructor(j,q={}){super(j,q);this.detail=q.detail}}class K extends O{isConnected=!1;constructor(j="div"){super(j)}insertAdjacentHTML(j,q){this.append(...k(q))}}class P extends K{constructor(){super("script")}}class z{definitions=new Map;define(j,q){if(this.definitions.has(j))return;this.definitions.set(j,q)}get(j){return this.definitions.get(j)}}var J;function U(j){return new $(j)}function A(){let j=globalThis,q=j.customElements;if(typeof j.Node>"u"||typeof j.Element>"u"||typeof j.HTMLElement>"u"||!q||typeof q.define!=="function"||typeof q.get!=="function")return;return j.window??{CustomEvent:j.CustomEvent??V,Element:j.Element,Event:j.Event??Q,EventTarget:j.EventTarget??EventTarget,HTMLScriptElement:j.HTMLScriptElement??j.HTMLElement,HTMLElement:j.HTMLElement,Node:j.Node,customElements:q}}function F(){let j=A();if(j)return j;return R()}function L(){return F(),{prepareHost(j,q={}){if(q.authoredContent!==void 0)j.innerHTML=q.authoredContent}}}function R(){let j=A();if(j)return j;if(J)return J;let q=new z,B=globalThis.Event??Q,X=globalThis.CustomEvent??V,Y=globalThis.EventTarget??EventTarget;return J={CustomEvent:X,Element:O,Event:B,EventTarget:Y,HTMLScriptElement:P,HTMLElement:K,Node:G,customElements:q},Object.assign(globalThis,{CustomEvent:X,Element:O,Event:B,EventTarget:Y,HTMLScriptElement:P,HTMLElement:K,Node:G,customElements:q,window:J}),J}function y(j,q){let B=q.tagName==="script"?new P:new K(q.tagName);return B.setSerializedFragment(j,W(q.innerHtml),q.attributes),B}function w(j){return j.replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">")}function W(j){return j.replace(/<!--.*?-->/gs,"").replace(/<[^>]+>/g,"")}function k(j){return Z(j).map((q)=>{if(!q.startsWith("<"))return U(q);let B=_(q,0);if(!B||B.type!=="open")return U(q);return y(q,B)})}function D(j){if(j.nodeType===G.TEXT_NODE)return j.textContent??"";return"outerHTML"in j&&typeof j.outerHTML==="string"?j.outerHTML:j.textContent??""}
|
|
2
|
-
export{F as k,L as l,R as m};
|
|
3
|
-
|
|
4
|
-
//# debugId=C9C0B7F6FE7C768764756E2164756E21
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../src/server/light-dom-shim.ts"],
|
|
4
|
-
"sourcesContent": [
|
|
5
|
-
"import { collectTopLevelHtmlFragments, parseHtmlTagToken, type ParsedHtmlTag } from './html-parser';\n\ntype MinimalCustomElementRegistry = {\n\tdefine(name: string, constructor: CustomElementConstructor, options?: ElementDefinitionOptions): void;\n\tget(name: string): CustomElementConstructor | undefined;\n};\n\n/**\n * Minimal window-like runtime surface exposed by the SSR light-DOM shim.\n *\n * This is intentionally much smaller than a browser `window`; it only includes\n * the constructors and registry access that Radiant SSR currently needs.\n */\nexport type LightDomShimWindow = {\n\t/** Event constructor exposed to SSR-created components. */\n\tCustomEvent: typeof CustomEvent;\n\t/** Element constructor exposed to SSR-created components. */\n\tElement: typeof Element;\n\t/** Event constructor exposed to SSR-created components. */\n\tEvent: typeof Event;\n\t/** EventTarget constructor exposed to SSR-created components. */\n\tEventTarget: typeof EventTarget;\n\t/** HTMLScriptElement constructor used by slot projection payload parsing. */\n\tHTMLScriptElement: typeof HTMLScriptElement;\n\t/** HTMLElement constructor exposed to SSR-created components. */\n\tHTMLElement: typeof HTMLElement;\n\t/** Node constructor exposed to SSR-created components. */\n\tNode: typeof Node;\n\t/** Custom element registry used while rendering in SSR. */\n\tcustomElements: MinimalCustomElementRegistry;\n};\n\n/** Host preparation options accepted by the server render environment. */\nexport type PrepareServerRenderHostOptions = {\n\t/** Serialized light-DOM content to attach to the host before SSR. */\n\tauthoredContent?: string;\n};\n\n/** Reusable SSR environment used to prepare component hosts before rendering. */\nexport type ServerRenderEnvironment = {\n\t/** Prepares the host instance for rendering, including authored light-DOM content. */\n\tprepareHost(host: HTMLElement, options?: PrepareServerRenderHostOptions): void;\n};\n\ntype MinimalParentNode = Node & ParentNode;\n\nclass MinimalNode extends EventTarget {\n\tstatic readonly ELEMENT_NODE = 1;\n\tstatic readonly TEXT_NODE = 3;\n\n\tpublic childNodes: Node[] = [];\n\tpublic parentNode: MinimalParentNode | null = null;\n\n\tconstructor(public readonly nodeType: number) {\n\t\tsuper();\n\t}\n\n\tappend(...nodes: Array<Node | string>): void {\n\t\tfor (const node of nodes) {\n\t\t\tthis.appendChild(typeof node === 'string' ? createTextNode(node) : node);\n\t\t}\n\t}\n\n\tappendChild<TNode extends Node>(node: TNode): TNode {\n\t\tif ('parentNode' in node && node.parentNode && 'removeChild' in node.parentNode) {\n\t\t\t(node.parentNode as Node & { removeChild(node: Node): Node }).removeChild(node);\n\t\t}\n\n\t\tthis.childNodes.push(node);\n\t\t(node as Node & { parentNode: MinimalParentNode | null }).parentNode = this as unknown as MinimalParentNode;\n\t\treturn node;\n\t}\n\n\tremoveChild<TNode extends Node>(node: TNode): TNode {\n\t\tconst nodeIndex = this.childNodes.indexOf(node);\n\n\t\tif (nodeIndex === -1) {\n\t\t\treturn node;\n\t\t}\n\n\t\tthis.childNodes.splice(nodeIndex, 1);\n\t\t(node as Node & { parentNode: MinimalParentNode | null }).parentNode = null;\n\t\treturn node;\n\t}\n\n\treplaceChildren(...nodes: Array<Node | string>): void {\n\t\tfor (const child of this.childNodes) {\n\t\t\t(child as Node & { parentNode: MinimalParentNode | null }).parentNode = null;\n\t\t}\n\n\t\tthis.childNodes = [];\n\t\tthis.append(...nodes);\n\t}\n\n\tget textContent(): string | null {\n\t\treturn this.childNodes.map((child) => child.textContent ?? '').join('');\n\t}\n\n\tset textContent(value: string | null) {\n\t\tthis.replaceChildren(value ?? '');\n\t}\n}\n\nclass MinimalTextNode extends MinimalNode {\n\tconstructor(private value: string) {\n\t\tsuper(MinimalNode.TEXT_NODE);\n\t}\n\n\toverride get textContent(): string {\n\t\treturn this.value;\n\t}\n\n\toverride set textContent(value: string | null) {\n\t\tthis.value = value ?? '';\n\t}\n}\n\nclass MinimalElement extends MinimalNode {\n\tprivate attributes = new Map<string, string>();\n\tprivate fragmentHtml?: string;\n\tprivate fragmentText?: string;\n\n\tpublic readonly localName: string;\n\tpublic readonly tagName: string;\n\n\tconstructor(tagName = 'div') {\n\t\tsuper(MinimalNode.ELEMENT_NODE);\n\t\tthis.localName = tagName.toLowerCase();\n\t\tthis.tagName = this.localName.toUpperCase();\n\t}\n\n\thasAttribute(name: string): boolean {\n\t\treturn this.attributes.has(name);\n\t}\n\n\tgetAttribute(name: string): string | null {\n\t\treturn this.attributes.get(name) ?? null;\n\t}\n\n\tgetAttributeNames(): string[] {\n\t\treturn Array.from(this.attributes.keys());\n\t}\n\n\tsetAttribute(name: string, value: unknown): void {\n\t\tthis.fragmentHtml = undefined;\n\t\tthis.attributes.set(name, String(value));\n\t}\n\n\tremoveAttribute(name: string): void {\n\t\tthis.fragmentHtml = undefined;\n\t\tthis.attributes.delete(name);\n\t}\n\n\tquerySelector(): Element | null {\n\t\treturn null;\n\t}\n\n\tquerySelectorAll(): Element[] {\n\t\treturn [];\n\t}\n\n\tmatches(): boolean {\n\t\treturn false;\n\t}\n\n\tget outerHTML(): string {\n\t\tif (this.fragmentHtml !== undefined) {\n\t\t\treturn this.fragmentHtml;\n\t\t}\n\n\t\tconst attributes = Array.from(this.attributes.entries())\n\t\t\t.map(([name, value]) => ` ${name}=\"${escapeHtmlAttribute(value)}\"`)\n\t\t\t.join('');\n\n\t\treturn `<${this.localName}${attributes}>${this.innerHTML}</${this.localName}>`;\n\t}\n\n\tget innerHTML(): string {\n\t\treturn this.childNodes.map((child) => serializeNodeHtml(child)).join('');\n\t}\n\n\tset innerHTML(html: string) {\n\t\tthis.fragmentHtml = undefined;\n\t\tthis.fragmentText = undefined;\n\t\tthis.replaceChildren(...parseHtmlToNodes(html));\n\t}\n\n\toverride get textContent(): string {\n\t\treturn this.fragmentText ?? super.textContent ?? '';\n\t}\n\n\toverride set textContent(value: string | null) {\n\t\tthis.fragmentHtml = undefined;\n\t\tthis.fragmentText = value ?? '';\n\t\tsuper.textContent = value;\n\t}\n\n\tsetSerializedFragment(fragmentHtml: string, fragmentText: string, attributes: Record<string, string>): void {\n\t\tthis.fragmentHtml = fragmentHtml;\n\t\tthis.fragmentText = fragmentText;\n\t\tthis.attributes = new Map(Object.entries(attributes));\n\t\tthis.replaceChildren();\n\t}\n}\n\nclass MinimalEvent {\n\tpublic readonly bubbles: boolean;\n\tpublic readonly cancelable: boolean;\n\tpublic readonly composed: boolean;\n\tpublic readonly type: string;\n\n\tconstructor(type: string, eventInitDict: EventInit = {}) {\n\t\tthis.type = type;\n\t\tthis.bubbles = eventInitDict.bubbles ?? false;\n\t\tthis.cancelable = eventInitDict.cancelable ?? false;\n\t\tthis.composed = eventInitDict.composed ?? false;\n\t}\n}\n\nclass MinimalCustomEvent<T = unknown> extends MinimalEvent {\n\tpublic readonly detail: T;\n\n\tconstructor(type: string, eventInitDict: CustomEventInit<T> = {}) {\n\t\tsuper(type, eventInitDict);\n\t\tthis.detail = eventInitDict.detail as T;\n\t}\n}\n\nclass MinimalHTMLElement extends MinimalElement {\n\tpublic isConnected = false;\n\n\tconstructor(tagName = 'div') {\n\t\tsuper(tagName);\n\t}\n\n\tinsertAdjacentHTML(_position: InsertPosition, html: string): void {\n\t\tthis.append(...parseHtmlToNodes(html));\n\t}\n\n\tconnectedCallback?(): void;\n\tattributeChangedCallback?(name: string, oldValue: string | null, newValue: string | null): void;\n\tdisconnectedCallback?(): void;\n}\n\nclass MinimalHtmlScriptElement extends MinimalHTMLElement {\n\tconstructor() {\n\t\tsuper('script');\n\t}\n}\n\nclass MinimalCustomElementsRegistry implements MinimalCustomElementRegistry {\n\tprivate definitions = new Map<string, CustomElementConstructor>();\n\n\tdefine(name: string, constructor: CustomElementConstructor): void {\n\t\tif (this.definitions.has(name)) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.definitions.set(name, constructor);\n\t}\n\n\tget(name: string): CustomElementConstructor | undefined {\n\t\treturn this.definitions.get(name);\n\t}\n}\n\nlet installedWindow: LightDomShimWindow | undefined;\n\nfunction createTextNode(value: string): Node {\n\treturn new MinimalTextNode(value) as unknown as Node;\n}\n\nfunction getExistingWindowLike(): LightDomShimWindow | undefined {\n\tconst globalScope = globalThis as typeof globalThis & {\n\t\tCustomEvent?: typeof CustomEvent;\n\t\tElement?: typeof Element;\n\t\tEvent?: typeof Event;\n\t\tEventTarget?: typeof EventTarget;\n\t\tHTMLScriptElement?: typeof HTMLScriptElement;\n\t\tHTMLElement?: typeof HTMLElement;\n\t\tNode?: typeof Node;\n\t\tcustomElements?: MinimalCustomElementRegistry;\n\t\twindow?: LightDomShimWindow;\n\t};\n\tconst existingCustomElements = globalScope.customElements;\n\n\tif (\n\t\ttypeof globalScope.Node === 'undefined' ||\n\t\ttypeof globalScope.Element === 'undefined' ||\n\t\ttypeof globalScope.HTMLElement === 'undefined' ||\n\t\t!existingCustomElements ||\n\t\ttypeof existingCustomElements.define !== 'function' ||\n\t\ttypeof existingCustomElements.get !== 'function'\n\t) {\n\t\treturn undefined;\n\t}\n\n\treturn (\n\t\tglobalScope.window ?? {\n\t\t\tCustomEvent: (globalScope.CustomEvent ?? MinimalCustomEvent) as typeof CustomEvent,\n\t\t\tElement: globalScope.Element,\n\t\t\tEvent: (globalScope.Event ?? MinimalEvent) as typeof Event,\n\t\t\tEventTarget: (globalScope.EventTarget ?? EventTarget) as typeof EventTarget,\n\t\t\tHTMLScriptElement: (globalScope.HTMLScriptElement ?? globalScope.HTMLElement) as typeof HTMLScriptElement,\n\t\t\tHTMLElement: globalScope.HTMLElement,\n\t\t\tNode: globalScope.Node,\n\t\t\tcustomElements: existingCustomElements,\n\t\t}\n\t);\n}\n\n/** Ensures that a minimal window-like SSR runtime is available and returns it. */\nexport function ensureLightDomShim(): LightDomShimWindow {\n\tconst existingWindow = getExistingWindowLike();\n\n\tif (existingWindow) {\n\t\treturn existingWindow;\n\t}\n\n\treturn installLightDomShim();\n}\n\n/**\n * Creates a reusable SSR environment that can prepare a component host with\n * authored light-DOM content before rendering.\n *\n * Adapters can reuse a single environment across multiple render calls when\n * they want a single host-preparation entrypoint backed by the installed shim.\n */\n\nexport function createServerRenderEnvironment(): ServerRenderEnvironment {\n\tensureLightDomShim();\n\n\treturn {\n\t\tprepareHost(host: HTMLElement, options: PrepareServerRenderHostOptions = {}): void {\n\t\t\tif (options.authoredContent !== undefined) {\n\t\t\t\thost.innerHTML = options.authoredContent;\n\t\t\t}\n\t\t},\n\t};\n}\n\n/**\n * Installs the smallest global surface needed to instantiate Radiant custom elements during SSR.\n */\nexport function installLightDomShim(): LightDomShimWindow {\n\tconst existingWindow = getExistingWindowLike();\n\n\tif (existingWindow) {\n\t\treturn existingWindow;\n\t}\n\n\tif (installedWindow) {\n\t\treturn installedWindow;\n\t}\n\n\tconst customElements = new MinimalCustomElementsRegistry();\n\tconst EventConstructor = (globalThis.Event ?? MinimalEvent) as typeof Event;\n\tconst CustomEventConstructor = (globalThis.CustomEvent ?? MinimalCustomEvent) as typeof CustomEvent;\n\tconst EventTargetConstructor = (globalThis.EventTarget ?? EventTarget) as typeof EventTarget;\n\tinstalledWindow = {\n\t\tCustomEvent: CustomEventConstructor,\n\t\tElement: MinimalElement as unknown as typeof Element,\n\t\tEvent: EventConstructor,\n\t\tEventTarget: EventTargetConstructor,\n\t\tHTMLScriptElement: MinimalHtmlScriptElement as unknown as typeof HTMLScriptElement,\n\t\tHTMLElement: MinimalHTMLElement as unknown as typeof HTMLElement,\n\t\tNode: MinimalNode as unknown as typeof Node,\n\t\tcustomElements,\n\t};\n\n\tObject.assign(globalThis, {\n\t\tCustomEvent: CustomEventConstructor,\n\t\tElement: MinimalElement,\n\t\tEvent: EventConstructor,\n\t\tEventTarget: EventTargetConstructor,\n\t\tHTMLScriptElement: MinimalHtmlScriptElement,\n\t\tHTMLElement: MinimalHTMLElement,\n\t\tNode: MinimalNode,\n\t\tcustomElements,\n\t\twindow: installedWindow,\n\t});\n\n\treturn installedWindow;\n}\n\nfunction createElementFromFragment(fragment: string, tag: ParsedHtmlTag): Node {\n\tconst element =\n\t\ttag.tagName === 'script'\n\t\t\t? (new MinimalHtmlScriptElement() as MinimalElement)\n\t\t\t: new MinimalHTMLElement(tag.tagName);\n\n\telement.setSerializedFragment(fragment, extractTextContent(tag.innerHtml), tag.attributes);\n\treturn element as unknown as Node;\n}\n\nfunction escapeHtmlAttribute(value: string): string {\n\treturn value.replace(/&/g, '&').replace(/\"/g, '"').replace(/</g, '<').replace(/>/g, '>');\n}\n\nfunction extractTextContent(html: string): string {\n\treturn html.replace(/<!--.*?-->/gs, '').replace(/<[^>]+>/g, '');\n}\n\nfunction parseHtmlToNodes(html: string): Node[] {\n\treturn collectTopLevelHtmlFragments(html).map((fragment) => {\n\t\tif (!fragment.startsWith('<')) {\n\t\t\treturn createTextNode(fragment);\n\t\t}\n\n\t\tconst tag = parseHtmlTagToken(fragment, 0);\n\n\t\tif (!tag || tag.type !== 'open') {\n\t\t\treturn createTextNode(fragment);\n\t\t}\n\n\t\treturn createElementFromFragment(fragment, tag);\n\t});\n}\n\nfunction serializeNodeHtml(node: Node): string {\n\tif (node.nodeType === MinimalNode.TEXT_NODE) {\n\t\treturn node.textContent ?? '';\n\t}\n\n\treturn 'outerHTML' in node && typeof node.outerHTML === 'string' ? node.outerHTML : (node.textContent ?? '');\n}\n"
|
|
6
|
-
],
|
|
7
|
-
"mappings": "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",
|
|
8
|
-
"debugId": "C9C0B7F6FE7C768764756E2164756E21",
|
|
9
|
-
"names": []
|
|
10
|
-
}
|
package/dist/chunk-ssnnxzrj.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{_a as D}from"./chunk-t8xtvgyg.js";import{Db as P}from"./chunk-vgtggzb6.js";var y;function G(){if(y!==void 0)return y;try{let{AsyncLocalStorage:b}=(()=>{throw new Error("Cannot require module "+"node:async_hooks");})();return y=new b,y}catch{return y=null,null}}var z=Symbol.for("@ecopages/radiant.ssr-context-fallback-stack");function H(){let b=globalThis;return b[z]??=[],b[z]}function U(b){if(b.length===0)return()=>{return};let j=new Map;for(let u of b)j.set(u.getContextKey(),u);let q=G();if(q){let u=q.getStore()??[],J=[...u,j];return q.enterWith(J),()=>{q.enterWith(u)}}let w=H();return w.push(j),()=>{let u=w.lastIndexOf(j);if(u>=0)w.splice(u,1)}}function I(b){let j=G()?.getStore()??H();for(let q=j.length-1;q>=0;q-=1){let w=j[q]?.get(b);if(w)return w}return}function V(b){let j=I(b);if(!j)return;return j.getContext()}D((b)=>I(b));
|
|
2
|
-
export{U as h,I as i,V as j};
|
|
3
|
-
|
|
4
|
-
//# debugId=A236058E840B355764756E2164756E21
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../src/server/context-ssr.ts"],
|
|
4
|
-
"sourcesContent": [
|
|
5
|
-
"import type { AsyncLocalStorage } from 'node:async_hooks';\nimport type { SsrSerializableContextProvider } from '../context/context-provider';\nimport { installSsrContextProviderResolver } from '../context/context-ssr-bridge';\nimport type { ContextType, UnknownContext } from '../context/types';\n\ntype ProviderFrame = Map<UnknownContext, SsrSerializableContextProvider>;\ntype ProviderStack = ProviderFrame[];\n\nlet resolvedAsyncLocalStorage: AsyncLocalStorage<ProviderStack> | null | undefined;\n\n/**\n * Lazily resolves `AsyncLocalStorage` from `node:async_hooks`.\n *\n * The dynamic `require` is necessary because browser-based SSR tests import\n * this server-oriented module directly. A top-level static import would break\n * those browser bundles even though normal application SSR runs on the server.\n *\n * On the server (Node.js, Bun, Cloudflare Workers) the import always succeeds.\n * In browser test environments where SSR rendering is exercised without a real\n * server, the fallback global stack is used instead.\n */\nfunction getAsyncLocalStorage(): AsyncLocalStorage<ProviderStack> | null {\n\tif (resolvedAsyncLocalStorage !== undefined) {\n\t\treturn resolvedAsyncLocalStorage;\n\t}\n\n\ttry {\n\t\tconst { AsyncLocalStorage: ALS } = require('node:async_hooks') as typeof import('node:async_hooks');\n\t\tresolvedAsyncLocalStorage = new ALS<ProviderStack>();\n\t\treturn resolvedAsyncLocalStorage;\n\t} catch {\n\t\tresolvedAsyncLocalStorage = null;\n\t\treturn null;\n\t}\n}\n\nconst SSR_CONTEXT_FALLBACK_STACK_SYMBOL = Symbol.for('@ecopages/radiant.ssr-context-fallback-stack');\n\nfunction getFallbackStack(): ProviderStack {\n\tconst g = globalThis as typeof globalThis & { [SSR_CONTEXT_FALLBACK_STACK_SYMBOL]?: ProviderStack };\n\tg[SSR_CONTEXT_FALLBACK_STACK_SYMBOL] ??= [];\n\treturn g[SSR_CONTEXT_FALLBACK_STACK_SYMBOL];\n}\n\n/**\n * Pushes a temporary provider frame onto the SSR context stack.\n *\n * On the server, each call creates an isolated `AsyncLocalStorage` context so\n * concurrent renders cannot corrupt each other.\n *\n * In browser test environments where `AsyncLocalStorage` is unavailable, a\n * synchronous global stack is used as a fallback.\n */\nexport function withSsrContextProviders(providers: readonly SsrSerializableContextProvider[]): () => void {\n\tif (providers.length === 0) {\n\t\treturn () => undefined;\n\t}\n\n\tconst frame = new Map<UnknownContext, SsrSerializableContextProvider>();\n\n\tfor (const provider of providers) {\n\t\tframe.set(provider.getContextKey(), provider);\n\t}\n\n\tconst als = getAsyncLocalStorage();\n\n\tif (als) {\n\t\tconst parentStack = als.getStore() ?? [];\n\t\tconst childStack = [...parentStack, frame];\n\t\tals.enterWith(childStack);\n\n\t\treturn () => {\n\t\t\tals.enterWith(parentStack);\n\t\t};\n\t}\n\n\tconst stack = getFallbackStack();\n\tstack.push(frame);\n\n\treturn () => {\n\t\tconst index = stack.lastIndexOf(frame);\n\t\tif (index >= 0) stack.splice(index, 1);\n\t};\n}\n\n/**\n * Resolves the nearest SSR-visible provider for a given context token.\n *\n * Lookup walks the provider frames from innermost to outermost so nested host\n * serialization behaves the same way as runtime context resolution in the DOM.\n */\nexport function resolveSsrContextProvider<T extends UnknownContext>(\n\tcontext: T,\n): SsrSerializableContextProvider | undefined {\n\tconst store = getAsyncLocalStorage()?.getStore() ?? getFallbackStack();\n\n\tfor (let index = store.length - 1; index >= 0; index -= 1) {\n\t\tconst provider = store[index]?.get(context);\n\n\t\tif (provider) {\n\t\t\treturn provider;\n\t\t}\n\t}\n\n\treturn undefined;\n}\n\n/**\n * Resolves the current SSR-visible value for a given context token.\n *\n * This is the ergonomic helper consumed by SSR-aware decorators and component\n * render paths when they only need the context payload instead of the full\n * provider instance.\n */\nexport function resolveSsrContextValue<T extends UnknownContext>(context: T): ContextType<T> | undefined {\n\tconst provider = resolveSsrContextProvider(context);\n\n\tif (!provider) {\n\t\treturn undefined;\n\t}\n\n\treturn provider.getContext() as ContextType<T>;\n}\n\ninstallSsrContextProviderResolver((context) => resolveSsrContextProvider(context));\n"
|
|
6
|
-
],
|
|
7
|
-
"mappings": "wFAQA,FAAI,EAaJ,SAAS,CAAoB,EAA4C,CACxE,GAAI,IAA8B,OACjC,OAAO,EAGR,GAAI,CACH,IAAQ,kBAAmB,2EAE3B,OADA,EAA4B,IAAI,EACzB,EACN,KAAM,CAEP,OADA,EAA4B,KACrB,MAIT,IAAM,EAAoC,OAAO,IAAI,8CAA8C,EAEnG,SAAS,CAAgB,EAAkB,CAC1C,IAAM,EAAI,WAEV,OADA,EAAE,KAAuC,CAAC,EACnC,EAAE,GAYH,SAAS,CAAuB,CAAC,EAAkE,CACzG,GAAI,EAAU,SAAW,EACxB,MAAO,IAAG,CAAG,QAGd,IAAM,EAAQ,IAAI,IAElB,QAAW,KAAY,EACtB,EAAM,IAAI,EAAS,cAAc,EAAG,CAAQ,EAG7C,IAAM,EAAM,EAAqB,EAEjC,GAAI,EAAK,CACR,IAAM,EAAc,EAAI,SAAS,GAAK,CAAC,EACjC,EAAa,CAAC,GAAG,EAAa,CAAK,EAGzC,OAFA,EAAI,UAAU,CAAU,EAEjB,IAAM,CACZ,EAAI,UAAU,CAAW,GAI3B,IAAM,EAAQ,EAAiB,EAG/B,OAFA,EAAM,KAAK,CAAK,EAET,IAAM,CACZ,IAAM,EAAQ,EAAM,YAAY,CAAK,EACrC,GAAI,GAAS,EAAG,EAAM,OAAO,EAAO,CAAC,GAUhC,SAAS,CAAmD,CAClE,EAC6C,CAC7C,IAAM,EAAQ,EAAqB,GAAG,SAAS,GAAK,EAAiB,EAErE,QAAS,EAAQ,EAAM,OAAS,EAAG,GAAS,EAAG,GAAS,EAAG,CAC1D,IAAM,EAAW,EAAM,IAAQ,IAAI,CAAO,EAE1C,GAAI,EACH,OAAO,EAIT,OAUM,SAAS,CAAgD,CAAC,EAAwC,CACxG,IAAM,EAAW,EAA0B,CAAO,EAElD,GAAI,CAAC,EACJ,OAGD,OAAO,EAAS,WAAW,EAG5B,EAAkC,CAAC,IAAY,EAA0B,CAAO,CAAC",
|
|
8
|
-
"debugId": "A236058E840B355764756E2164756E21",
|
|
9
|
-
"names": []
|
|
10
|
-
}
|
package/dist/chunk-t8xtvgyg.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../src/context/context-ssr-bridge.ts"],
|
|
4
|
-
"sourcesContent": [
|
|
5
|
-
"import type { SsrSerializableContextProvider } from './context-provider';\nimport type { UnknownContext } from './types';\n\ntype SsrContextProviderResolver = (context: UnknownContext) => SsrSerializableContextProvider | undefined;\n\nconst SSR_CONTEXT_PROVIDER_RESOLVER_SYMBOL = Symbol.for('@ecopages/radiant.ssr-context-provider-resolver');\n\ntype GlobalResolverScope = typeof globalThis & {\n\t[SSR_CONTEXT_PROVIDER_RESOLVER_SYMBOL]?: SsrContextProviderResolver;\n};\n\nfunction getGlobalResolverScope(): GlobalResolverScope {\n\treturn globalThis as GlobalResolverScope;\n}\n\n/**\n * Installs the ambient SSR provider resolver used by shared context runtime helpers.\n *\n * Server-side rendering infrastructure owns the actual provider stack storage and\n * publishes a lookup function here so client/runtime code does not need to import\n * server-oriented modules.\n */\nexport function installSsrContextProviderResolver(resolver: SsrContextProviderResolver): void {\n\tgetGlobalResolverScope()[SSR_CONTEXT_PROVIDER_RESOLVER_SYMBOL] = resolver;\n}\n\n/**\n * Resolves an ambient SSR provider when a server render has published one.\n */\nexport function resolveAmbientSsrContextProvider(context: UnknownContext): SsrSerializableContextProvider | undefined {\n\treturn getGlobalResolverScope()[SSR_CONTEXT_PROVIDER_RESOLVER_SYMBOL]?.(context);\n}\n"
|
|
6
|
-
],
|
|
7
|
-
"mappings": "AAKA,IAAM,EAAuC,OAAO,IAAI,iDAAiD,EAMzG,SAAS,CAAsB,EAAwB,CACtD,OAAO,WAUD,SAAS,CAAiC,CAAC,EAA4C,CAC7F,EAAuB,EAAE,GAAwC,EAM3D,SAAS,CAAgC,CAAC,EAAqE,CACrH,OAAO,EAAuB,EAAE,KAAwC,CAAO",
|
|
8
|
-
"debugId": "D0388EE001F5A0F564756E2164756E21",
|
|
9
|
-
"names": []
|
|
10
|
-
}
|
package/dist/chunk-v3ta7hnv.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../src/decorators/standard/on-event.ts"],
|
|
4
|
-
"sourcesContent": [
|
|
5
|
-
"import type { RadiantElement } from '../../core/radiant-element';\nimport { createEventListener } from '../../helpers/create-event-listener';\nimport type { OnEventConfig } from '../on-event';\nimport type { Method } from '../../types';\n\n/**\n * A decorator to subscribe to an event on the target element.\n * The event listener will be automatically unsubscribed when the element is disconnected.\n *\n * Note: This decorator uses event delegation, which means it relies on event bubbling.\n * Therefore, it will not work with events that do not bubble, such as `focus`, `blur`, `load`, `unload`, `scroll`, etc.\n * For focus and blur events, consider using `focusin` and `focusout` which are similar but do bubble.\n *\n * @param eventConfig The event configuration.\n * @param eventConfig.selectors The CSS selector(s) of the target element(s).\n * @param eventConfig.ref The data-ref attribute of the target element.\n * @param eventConfig.type The type of the event to listen for.\n * @param eventConfig.options Optional. An options object that specifies characteristics about the event listener.\n */\nexport function onEvent(eventConfig: OnEventConfig) {\n\treturn function <T extends Method>(originalMethod: T, context: ClassMethodDecoratorContext): void {\n\t\tcontext.addInitializer(function (this: any) {\n\t\t\tcreateEventListener(this as RadiantElement, eventConfig, originalMethod.bind(this));\n\t\t});\n\t};\n}\n"
|
|
6
|
-
],
|
|
7
|
-
"mappings": "yCAmBO,SAAS,CAAO,CAAC,EAA4B,CACnD,OAAO,QAA2B,CAAC,EAAmB,EAA4C,CACjG,EAAQ,eAAe,QAAS,EAAY,CAC3C,EAAoB,KAAwB,EAAa,EAAe,KAAK,IAAI,CAAC,EAClF",
|
|
8
|
-
"debugId": "E070803058AE2FAA64756E2164756E21",
|
|
9
|
-
"names": []
|
|
10
|
-
}
|
package/dist/chunk-v92hp9g0.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{Ab as t}from"./chunk-bk6qkvfp.js";function s(n={}){return function(l,e){let r=String(e.name);e.addInitializer(function(){let o=t(this,n);Object.defineProperty(this,r,{get(){return o.value},enumerable:!0,configurable:!0})})}}
|
|
2
|
-
export{s as Aa};
|
|
3
|
-
|
|
4
|
-
//# debugId=74F672DF73091F0B64756E2164756E21
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../src/decorators/standard/query-slot.ts"],
|
|
4
|
-
"sourcesContent": [
|
|
5
|
-
"import { createQuerySlot } from '../../helpers/create-query-slot';\nimport type { QuerySlotConfig } from '../query-slot';\n\ntype SlotQueryHost = HTMLElement & {\n\tgetSlotElement<T extends Element = Element>(name?: string): T | null;\n\tgetSlotElements<T extends Element = Element>(name?: string): T[];\n\tslotProjectionVersion?: number;\n};\n\nexport function querySlot(options: QuerySlotConfig = {}) {\n\treturn function <T extends SlotQueryHost, V extends Element | Element[]>(\n\t\t_: undefined,\n\t\tcontext: ClassFieldDecoratorContext<T, V>,\n\t) {\n\t\tconst propertyName = String(context.name);\n\n\t\tcontext.addInitializer(function (this: T) {\n\t\t\tconst accessor = createQuerySlot<V>(this, options);\n\n\t\t\tObject.defineProperty(this, propertyName, {\n\t\t\t\tget() {\n\t\t\t\t\treturn accessor.value;\n\t\t\t\t},\n\t\t\t\tenumerable: true,\n\t\t\t\tconfigurable: true,\n\t\t\t});\n\t\t});\n\t};\n}\n"
|
|
6
|
-
],
|
|
7
|
-
"mappings": "yCASO,SAAS,CAAS,CAAC,EAA2B,CAAC,EAAG,CACxD,OAAO,QAAiE,CACvE,EACA,EACC,CACD,IAAM,EAAe,OAAO,EAAQ,IAAI,EAExC,EAAQ,eAAe,QAAS,EAAU,CACzC,IAAM,EAAW,EAAmB,KAAM,CAAO,EAEjD,OAAO,eAAe,KAAM,EAAc,CACzC,GAAG,EAAG,CACL,OAAO,EAAS,OAEjB,WAAY,GACZ,aAAc,EACf,CAAC,EACD",
|
|
8
|
-
"debugId": "74F672DF73091F0B64756E2164756E21",
|
|
9
|
-
"names": []
|
|
10
|
-
}
|
package/dist/chunk-vgtggzb6.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
var d=((a)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(a,{get:(b,c)=>(typeof require<"u"?require:b)[c]}):a)(function(a){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+a+'" is not supported')});
|
|
2
|
-
export{d as Db};
|
|
3
|
-
|
|
4
|
-
//# debugId=D915F4578C1B7CB964756E2164756E21
|
package/dist/chunk-vk48hgm4.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{Ea as B,Ga as C}from"./chunk-nnnb6pac.js";function K(f={}){return function(G,D){let q=String(D.name);return function(w){let A=typeof f.source==="function"?f.source(this):f.source??(B(w)?w:void 0),E=A!==void 0?f.initial:w===void 0?f.initial:w,F=f.bind??this.shouldAutoBindReactiveMembers?.()??!1;this.defineReactiveBinding(q,F);let j=C({host:this,hydrate:f.hydrate,hydrationKey:q,initialValue:E,property:q,source:A});if(this.registerConnectedCallback(()=>{j.hydrateFromHost(),j.connectToSource()}),this.registerCleanupCallback(()=>{j.disconnectFromSource()}),f.hydrate)this.registerHydrationBinding(q,j);return j}}}
|
|
2
|
-
export{K as ca};
|
|
3
|
-
|
|
4
|
-
//# debugId=AF6404250CA79F2F64756E2164756E21
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../src/decorators/standard/signal.ts"],
|
|
4
|
-
"sourcesContent": [
|
|
5
|
-
"import type { WritableSignal } from '@ecopages/signals';\nimport type { RadiantElement, ReactiveBindingOption } from '../../core/radiant-element';\nimport { createHostSignal, isWritableSignalLike } from '../../signals/host-signal';\nimport type { AttributeTypeConstant } from '../../utils/attribute-utils';\n\n/** Options for the `@signal` decorator. */\nexport type SignalDecoratorOptions<Value = unknown> = {\n\t/**\n\t * Exposes a JSX binding companion for the decorated signal.\n\t *\n\t * - `true` creates a `$propertyName` accessor.\n\t * - a string creates a custom accessor with that name.\n\t * - `undefined` defers to the host default.\n\t */\n\tbind?: ReactiveBindingOption;\n\n\t/**\n\t * Optional initial value used when the field does not provide one directly.\n\t *\n\t * This is primarily useful with `declare field: WritableSignal<T>` syntax,\n\t * which keeps the component surface clean while still letting the decorator\n\t * own signal construction.\n\t */\n\tinitial?: Value;\n\n\t/**\n\t * Connects an existing writable signal to the host instead of creating a\n\t * host-owned one.\n\t */\n\tsource?: WritableSignal<Value> | ((host: RadiantElement) => WritableSignal<Value>);\n\n\t/**\n\t * Serializes the current signal value into a keyed hydration script during\n\t * SSR and restores it on the client.\n\t */\n\thydrate?: AttributeTypeConstant;\n};\n\nexport function signal<Value = unknown>(options: SignalDecoratorOptions<Value> = {}) {\n\treturn function <T extends RadiantElement, Value>(_: undefined, context: ClassFieldDecoratorContext<T, unknown>) {\n\t\tconst propertyName = String(context.name);\n\n\t\treturn function (this: T, initialValue: Value) {\n\t\t\tconst resolvedSource =\n\t\t\t\ttypeof options.source === 'function'\n\t\t\t\t\t? options.source(this)\n\t\t\t\t\t: (options.source ?? (isWritableSignalLike<Value>(initialValue) ? initialValue : undefined));\n\t\t\tconst resolvedInitialValue =\n\t\t\t\tresolvedSource !== undefined\n\t\t\t\t\t? options.initial\n\t\t\t\t\t: ((initialValue === undefined ? options.initial : initialValue) as Value);\n\t\t\tconst bind =\n\t\t\t\toptions.bind ??\n\t\t\t\t(\n\t\t\t\t\tthis as unknown as { shouldAutoBindReactiveMembers?: () => boolean }\n\t\t\t\t).shouldAutoBindReactiveMembers?.() ??\n\t\t\t\tfalse;\n\n\t\t\tthis.defineReactiveBinding(propertyName, bind);\n\n\t\t\tconst hostSignal = createHostSignal({\n\t\t\t\thost: this,\n\t\t\t\thydrate: options.hydrate,\n\t\t\t\thydrationKey: propertyName,\n\t\t\t\tinitialValue: resolvedInitialValue,\n\t\t\t\tproperty: propertyName,\n\t\t\t\tsource: resolvedSource,\n\t\t\t});\n\n\t\t\tthis.registerConnectedCallback(() => {\n\t\t\t\thostSignal.hydrateFromHost();\n\t\t\t\thostSignal.connectToSource();\n\t\t\t});\n\t\t\tthis.registerCleanupCallback(() => {\n\t\t\t\thostSignal.disconnectFromSource();\n\t\t\t});\n\n\t\t\tif (options.hydrate) {\n\t\t\t\tthis.registerHydrationBinding(propertyName, hostSignal);\n\t\t\t}\n\n\t\t\treturn hostSignal as unknown as WritableSignal<Value>;\n\t\t};\n\t};\n}\n"
|
|
6
|
-
],
|
|
7
|
-
"mappings": "iDAsCO,SAAS,CAAuB,CAAC,EAAyC,CAAC,EAAG,CACpF,OAAO,QAA0C,CAAC,EAAc,EAAiD,CAChH,IAAM,EAAe,OAAO,EAAQ,IAAI,EAExC,OAAO,QAAS,CAAU,EAAqB,CAC9C,IAAM,EACL,OAAO,EAAQ,SAAW,WACvB,EAAQ,OAAO,IAAI,EAClB,EAAQ,SAAW,EAA4B,CAAY,EAAI,EAAe,QAC7E,EACL,IAAmB,OAChB,EAAQ,QACN,IAAiB,OAAY,EAAQ,QAAU,EAC/C,EACL,EAAQ,MAEP,KACC,gCAAgC,GAClC,GAED,KAAK,sBAAsB,EAAc,CAAI,EAE7C,IAAM,EAAa,EAAiB,CACnC,KAAM,KACN,QAAS,EAAQ,QACjB,aAAc,EACd,aAAc,EACd,SAAU,EACV,OAAQ,CACT,CAAC,EAUD,GARA,KAAK,0BAA0B,IAAM,CACpC,EAAW,gBAAgB,EAC3B,EAAW,gBAAgB,EAC3B,EACD,KAAK,wBAAwB,IAAM,CAClC,EAAW,qBAAqB,EAChC,EAEG,EAAQ,QACX,KAAK,yBAAyB,EAAc,CAAU,EAGvD,OAAO",
|
|
8
|
-
"debugId": "AF6404250CA79F2F64756E2164756E21",
|
|
9
|
-
"names": []
|
|
10
|
-
}
|
package/dist/chunk-w8s5fnsq.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{xb as q}from"./chunk-rrg759ht.js";function G(z){return function(B,j){j.addInitializer(function(){let A=q(this,z);Object.defineProperty(this,j.name,{get(){return A},enumerable:!0,configurable:!0})})}}
|
|
2
|
-
export{G as fa};
|
|
3
|
-
|
|
4
|
-
//# debugId=3312BA759871518064756E2164756E21
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../src/decorators/standard/event.ts"],
|
|
4
|
-
"sourcesContent": [
|
|
5
|
-
"import type { RadiantElement } from '../../core/radiant-element';\nimport { createEvent } from '../../helpers/create-event';\nimport type { EventEmitterConfig } from '../../tools/event-emitter';\n\n/**\n * Decorator that attaches an EventEmitter to the class field property.\n * The EventEmitter can be used to dispatch custom events from the target element.\n * @param eventConfig Configuration for the event emitter.\n * @see {@link EventEmitter} for more details about how the EventEmitter works.\n */\nexport function event(eventConfig: EventEmitterConfig) {\n\treturn function <T extends RadiantElement, V>(_: undefined, context: ClassFieldDecoratorContext<T, V>) {\n\t\tcontext.addInitializer(function (this: T) {\n\t\t\tconst emitter = createEvent(this, eventConfig);\n\n\t\t\tObject.defineProperty(this, context.name, {\n\t\t\t\tget() {\n\t\t\t\t\treturn emitter;\n\t\t\t\t},\n\t\t\t\tenumerable: true,\n\t\t\t\tconfigurable: true,\n\t\t\t});\n\t\t});\n\t};\n}\n"
|
|
6
|
-
],
|
|
7
|
-
"mappings": "yCAUO,SAAS,CAAK,CAAC,EAAiC,CACtD,OAAO,QAAsC,CAAC,EAAc,EAA2C,CACtG,EAAQ,eAAe,QAAS,EAAU,CACzC,IAAM,EAAU,EAAY,KAAM,CAAW,EAE7C,OAAO,eAAe,KAAM,EAAQ,KAAM,CACzC,GAAG,EAAG,CACL,OAAO,GAER,WAAY,GACZ,aAAc,EACf,CAAC,EACD",
|
|
8
|
-
"debugId": "3312BA759871518064756E2164756E21",
|
|
9
|
-
"names": []
|
|
10
|
-
}
|
package/dist/chunk-wd23rn4q.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
function J(G,H){let q=null,j=null,z,D=()=>{if(q!==null)clearTimeout(q),q=null},F=()=>{if(j===null)return z;let E=j;return j=null,D(),z=E(),z},B=function(...E){j=()=>G.apply(this,E),D(),q=setTimeout(()=>{F()},H)};return B.cancel=()=>{D(),j=null},B.flush=()=>{if(j===null)return z;return F()},B.pending=()=>j!==null,B}
|
|
2
|
-
export{J as zb};
|
|
3
|
-
|
|
4
|
-
//# debugId=767008292B1F12AB64756E2164756E21
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../src/helpers/debounce.ts"],
|
|
4
|
-
"sourcesContent": [
|
|
5
|
-
"import type { Method } from '../types';\n\n/**\n * A debounced function with imperative helpers for controlling pending work.\n *\n * @typeParam T The wrapped callback type.\n */\nexport interface DebouncedFunction<T extends Method> {\n\t(...args: Parameters<T>): void;\n\n\t/**\n\t * Cancels the pending callback invocation, if one exists.\n\t */\n\tcancel(): void;\n\n\t/**\n\t * Immediately invokes the latest pending callback invocation.\n\t *\n\t * @returns The callback result when a call is pending, or the last completed\n\t * result when no call is pending.\n\t */\n\tflush(): ReturnType<T> | undefined;\n\n\t/**\n\t * Reports whether the callback currently has a scheduled invocation.\n\t *\n\t * @returns True when a call is pending.\n\t */\n\tpending(): boolean;\n}\n\n/**\n * Creates a debounced wrapper around a function.\n *\n * The returned function delays invocation until the configured timeout has\n * elapsed since the latest call. It also exposes helpers to cancel, flush,\n * and inspect pending work.\n *\n * @typeParam T The wrapped callback type.\n * @param callback The callback to debounce.\n * @param timeout The debounce timeout in milliseconds.\n * @returns A debounced wrapper around the callback.\n */\nexport function debounce<T extends Method>(callback: T, timeout: number): DebouncedFunction<T> {\n\tlet timeoutRef: ReturnType<typeof setTimeout> | null = null;\n\tlet pendingInvocation: (() => ReturnType<T>) | null = null;\n\tlet lastResult: ReturnType<T> | undefined;\n\n\tconst clearPendingCall = () => {\n\t\tif (timeoutRef !== null) {\n\t\t\tclearTimeout(timeoutRef);\n\t\t\ttimeoutRef = null;\n\t\t}\n\t};\n\n\tconst invoke = (): ReturnType<T> | undefined => {\n\t\tif (pendingInvocation === null) {\n\t\t\treturn lastResult;\n\t\t}\n\n\t\tconst invocation = pendingInvocation;\n\t\tpendingInvocation = null;\n\t\tclearPendingCall();\n\t\tlastResult = invocation();\n\n\t\treturn lastResult;\n\t};\n\n\tconst debounced = function (this: ThisParameterType<T>, ...args: Parameters<T>) {\n\t\tpendingInvocation = () => callback.apply(this, args) as ReturnType<T>;\n\t\tclearPendingCall();\n\t\ttimeoutRef = setTimeout(() => {\n\t\t\tinvoke();\n\t\t}, timeout);\n\t} as DebouncedFunction<T>;\n\n\tdebounced.cancel = () => {\n\t\tclearPendingCall();\n\t\tpendingInvocation = null;\n\t};\n\n\tdebounced.flush = () => {\n\t\tif (pendingInvocation === null) {\n\t\t\treturn lastResult;\n\t\t}\n\n\t\treturn invoke();\n\t};\n\n\tdebounced.pending = () => pendingInvocation !== null;\n\n\treturn debounced;\n}\n"
|
|
6
|
-
],
|
|
7
|
-
"mappings": "AA2CO,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": "767008292B1F12AB64756E2164756E21",
|
|
9
|
-
"names": []
|
|
10
|
-
}
|
package/dist/chunk-wds4href.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../src/context/decorators/provide-context.ts"],
|
|
4
|
-
"sourcesContent": [
|
|
5
|
-
"import type { StandardOrLegacyFieldDecoratorArgs } from '../../types';\nimport type { AttributeTypeConstant } from '../../utils';\nimport type { UnknownContext } from '../types';\nimport { provideContext as legacyProvideContext } from './legacy/provide-context';\nimport { provideContext as standardProvideContext } from './standard/provide-context';\nimport { fieldDecoratorBridge } from '../../decorators/bridge';\n\nexport type ProvideContextOptions<T extends UnknownContext> = {\n\t/** Context token made available to descendant consumers. */\n\tcontext: T;\n\t/** Client-side default value installed before any SSR hydration is merged. */\n\tinitialValue?: T['__context__'];\n\t/** Attribute type used to opt the provider into SSR hydration. */\n\thydrate?: AttributeTypeConstant;\n\t/**\n\t * Projects the current provider value into an SSR-safe hydration payload.\n\t *\n\t * Use this when the live client context includes instances or other values\n\t * that should stay client-only. When `hydrate: Object` is active, the parsed\n\t * payload merges back into `initialValue`, so omitted members keep their\n\t * client-side defaults.\n\t */\n\tserialize?: (value: T['__context__']) => unknown;\n};\n\n/**\n * A decorator to provide a context to the target element.\n * @param options {@link ProvideContextOptions}\n * @returns\n */\nexport function provideContext<T extends UnknownContext>(options: ProvideContextOptions<T>) {\n\treturn function (\n\t\tprotoOrTarget: StandardOrLegacyFieldDecoratorArgs['protoOrTarget'],\n\t\tnameOrContext: StandardOrLegacyFieldDecoratorArgs['nameOrContext'],\n\t): any {\n\t\treturn fieldDecoratorBridge(\n\t\t\tstandardProvideContext(options),\n\t\t\tlegacyProvideContext(options),\n\t\t\tprotoOrTarget,\n\t\t\tnameOrContext,\n\t\t);\n\t};\n}\n"
|
|
6
|
-
],
|
|
7
|
-
"mappings": "gIA8BO,GAAS,LAAwC,CAAC,EAAmC,CAC3F,OAAO,QAAS,CACf,EACA,EACM,CACN,OAAO,EACN,EAAuB,CAAO,EAC9B,EAAqB,CAAO,EAC5B,EACA,CACD",
|
|
8
|
-
"debugId": "F8A7AE6E3132067864756E2164756E21",
|
|
9
|
-
"names": []
|
|
10
|
-
}
|
package/dist/chunk-wvd1ffe4.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
class x{host;eventConfig;constructor(k,q){this.host=k,this.eventConfig=q}emit(k){let q=new CustomEvent(this.eventConfig.name,{detail:k,bubbles:this.eventConfig.bubbles,cancelable:this.eventConfig.cancelable,composed:this.eventConfig.composed});this.host.dispatchEvent(q)}}
|
|
2
|
-
export{x as yb};
|
|
3
|
-
|
|
4
|
-
//# debugId=E5C0D64E9F670E4664756E2164756E21
|