@ecopages/radiant 0.3.0-beta.0 → 0.3.0-beta.1
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 +5 -5
- package/client/app-bootstrap.js +3 -0
- package/{dist/client → client}/app-bootstrap.js.map +2 -2
- package/client/hydrator.js +3 -0
- package/{dist/client → client}/hydrator.js.map +2 -2
- package/client/install-hydrator.js +3 -0
- package/{dist/client → client}/install-hydrator.js.map +2 -2
- package/context/context-consumer-bootstrap.js +3 -0
- package/{dist/context → context}/context-consumer-bootstrap.js.map +4 -4
- package/context/context-consumer-runtime.js +3 -0
- package/context/context-consumer-runtime.js.map +12 -0
- package/context/context-host.js +3 -0
- package/{dist/context → context}/context-host.js.map +2 -2
- package/context/context-provider.js +3 -0
- package/{dist/context → context}/context-provider.js.map +3 -3
- package/context/context-ssr-bridge.js +3 -0
- package/{dist/context → context}/context-ssr-bridge.js.map +2 -2
- package/context/create-context.js +3 -0
- package/{dist/context → context}/create-context.js.map +2 -2
- package/context/decorators/consume-context.js +3 -0
- package/{dist/context → context}/decorators/consume-context.js.map +5 -5
- package/context/decorators/context-selection-delivery.js +3 -0
- package/{dist/context → context}/decorators/context-selection-delivery.js.map +2 -2
- package/context/decorators/context-selector.js +3 -0
- package/{dist/context → context}/decorators/context-selector.js.map +6 -6
- package/context/decorators/legacy/consume-context.js +3 -0
- package/context/decorators/legacy/consume-context.js.map +16 -0
- package/context/decorators/legacy/context-selector-field.js +3 -0
- package/context/decorators/legacy/context-selector-field.js.map +17 -0
- package/context/decorators/legacy/context-selector.js +3 -0
- package/context/decorators/legacy/context-selector.js.map +17 -0
- package/context/decorators/legacy/provide-context.js +3 -0
- package/{dist/context → context}/decorators/legacy/provide-context.js.map +4 -4
- package/context/decorators/on-context-update.js +3 -0
- package/{dist/context → context}/decorators/on-context-update.js.map +5 -5
- package/context/decorators/provide-context.js +3 -0
- package/{dist/context → context}/decorators/provide-context.js.map +4 -4
- package/context/decorators/standard/consume-context.js +3 -0
- package/{dist/context → context}/decorators/standard/consume-context.js.map +4 -4
- package/context/decorators/standard/context-selector-field.js +3 -0
- package/{dist/context → context}/decorators/standard/context-selector-field.js.map +4 -4
- package/context/decorators/standard/context-selector.js +3 -0
- package/{dist/context → context}/decorators/standard/context-selector.js.map +4 -4
- package/context/decorators/standard/provide-context.js +3 -0
- package/{dist/context → context}/decorators/standard/provide-context.js.map +3 -3
- package/context/decorators/standard-legacy-dispatch.js +3 -0
- package/context/decorators/standard-legacy-dispatch.js.map +10 -0
- package/context/events.js +3 -0
- package/context/events.js.map +10 -0
- package/context/hydration-script.js +3 -0
- package/{dist/context → context}/hydration-script.js.map +2 -2
- package/context/index.js +3 -0
- package/{dist/context → context}/index.js.map +6 -6
- package/controller-registry.js +3 -0
- package/{dist/controller-registry.js.map → controller-registry.js.map} +3 -3
- package/core/controller-metadata.js +3 -0
- package/{dist/core → core}/controller-metadata.js.map +2 -2
- package/core/custom-element-metadata.js +3 -0
- package/{dist/core → core}/custom-element-metadata.js.map +2 -2
- package/core/event-subscription-registry.js +3 -0
- package/{dist/core → core}/event-subscription-registry.js.map +2 -2
- package/core/host-ssr-registry.js +3 -0
- package/{dist/core → core}/host-ssr-registry.js.map +2 -2
- package/core/hydration-capable-host.js +3 -0
- package/{dist/core → core}/hydration-capable-host.js.map +2 -2
- package/core/hydration-codec.js +3 -0
- package/{dist/core → core}/hydration-codec.js.map +2 -2
- package/{dist/core → core}/radiant-controller.d.ts +7 -5
- package/core/radiant-controller.js +3 -0
- package/core/radiant-controller.js.map +21 -0
- package/core/radiant-element-ssr-host.js +3 -0
- package/{dist/core → core}/radiant-element-ssr-host.js.map +2 -2
- package/{dist/core → core}/radiant-element-ssr-registry.d.ts +4 -2
- package/core/radiant-element-ssr-registry.js +3 -0
- package/core/radiant-element-ssr-registry.js.map +10 -0
- package/{dist/core → core}/radiant-element.d.ts +18 -15
- package/core/radiant-element.js +3 -0
- package/core/radiant-element.js.map +31 -0
- package/core/radiant-hydrator-state.js +3 -0
- package/{dist/core → core}/radiant-hydrator-state.js.map +2 -2
- package/core/reactive-binding-adapter.d.ts +10 -0
- package/core/reactive-binding-adapter.js +3 -0
- package/core/reactive-binding-adapter.js.map +10 -0
- package/core/reactive-host.d.ts +138 -0
- package/core/reactive-host.js +3 -0
- package/core/reactive-host.js.map +13 -0
- package/{dist/core → core}/reactive-jsx-value.d.ts +2 -2
- package/core/reactive-jsx-value.js +3 -0
- package/core/reactive-jsx-value.js.map +10 -0
- package/{dist/core → core}/reactive-prop-core.d.ts +6 -11
- package/core/reactive-prop-core.js +3 -0
- package/{dist/core → core}/reactive-prop-core.js.map +3 -3
- package/core/reactive-prop-metadata.js +3 -0
- package/{dist/core → core}/reactive-prop-metadata.js.map +2 -2
- package/{dist/core → core}/reactive-property-state.d.ts +5 -2
- package/core/reactive-property-state.js +3 -0
- package/core/reactive-property-state.js.map +12 -0
- package/core/reactivity-adapter.js +3 -0
- package/core/reactivity-adapter.js.map +12 -0
- package/{dist/core → core}/reactivity-contract.d.ts +14 -0
- package/core/reactivity-runtime.js +3 -0
- package/core/reactivity-runtime.js.map +11 -0
- package/core/reactivity-signals.js +3 -0
- package/core/reactivity-signals.js.map +10 -0
- package/core/render-runtime.js +3 -0
- package/{dist/core → core}/render-runtime.js.map +3 -3
- package/core/render-scheduler.js +3 -0
- package/{dist/core → core}/render-scheduler.js.map +2 -2
- package/core/slot-projection-runtime.js +3 -0
- package/{dist/core → core}/slot-projection-runtime.js.map +2 -2
- package/core/ssr-preparation.js +3 -0
- package/{dist/core → core}/ssr-preparation.js.map +2 -2
- package/decorators/attr.js +3 -0
- package/decorators/attr.js.map +18 -0
- package/decorators/bound.js +3 -0
- package/{dist/decorators → decorators}/bound.js.map +2 -2
- package/decorators/bridge.js +3 -0
- package/{dist/decorators → decorators}/bridge.js.map +2 -2
- package/decorators/controller.js +3 -0
- package/{dist/decorators → decorators}/controller.js.map +3 -3
- package/decorators/custom-element.js +3 -0
- package/{dist/decorators → decorators}/custom-element.js.map +2 -2
- package/decorators/debounce.js +3 -0
- package/{dist/decorators → decorators}/debounce.js.map +2 -2
- package/decorators/event.js +3 -0
- package/{dist/decorators → decorators}/event.js.map +3 -3
- package/decorators/legacy/attr.js +3 -0
- package/decorators/legacy/attr.js.map +15 -0
- package/decorators/legacy/bound.js +3 -0
- package/{dist/decorators → decorators}/legacy/bound.js.map +2 -2
- package/decorators/legacy/custom-element.js +3 -0
- package/{dist/decorators → decorators}/legacy/custom-element.js.map +2 -2
- package/decorators/legacy/debounce.js +3 -0
- package/{dist/decorators → decorators}/legacy/debounce.js.map +2 -2
- package/decorators/legacy/event.js +3 -0
- package/decorators/legacy/event.js.map +13 -0
- package/decorators/legacy/host-readiness.js +3 -0
- package/decorators/legacy/host-readiness.js.map +11 -0
- package/{dist/decorators → decorators}/legacy/instance-initializers.d.ts +4 -2
- package/decorators/legacy/instance-initializers.js +3 -0
- package/decorators/legacy/instance-initializers.js.map +10 -0
- package/decorators/legacy/member-bootstrap.d.ts +10 -0
- package/decorators/legacy/member-bootstrap.js +3 -0
- package/decorators/legacy/member-bootstrap.js.map +10 -0
- package/decorators/legacy/on-event.js +3 -0
- package/{dist/decorators → decorators}/legacy/on-event.js.map +3 -3
- package/decorators/legacy/on-updated.js +3 -0
- package/decorators/legacy/on-updated.js.map +11 -0
- package/decorators/legacy/query-slot.js +3 -0
- package/decorators/legacy/query-slot.js.map +13 -0
- package/decorators/legacy/query.js +3 -0
- package/decorators/legacy/query.js.map +12 -0
- package/decorators/legacy/reactive-field.js +3 -0
- package/decorators/legacy/reactive-field.js.map +13 -0
- package/{dist/decorators → decorators}/legacy/reactive-prop.d.ts +0 -1
- package/decorators/legacy/reactive-prop.js +3 -0
- package/decorators/legacy/reactive-prop.js.map +15 -0
- package/decorators/legacy/signal.js +3 -0
- package/decorators/legacy/signal.js.map +17 -0
- package/decorators/on-event.js +3 -0
- package/{dist/decorators → decorators}/on-event.js.map +3 -3
- package/decorators/on-updated.js +3 -0
- package/{dist/decorators → decorators}/on-updated.js.map +3 -3
- package/{dist/decorators → decorators}/prop.d.ts +4 -5
- package/decorators/prop.js +3 -0
- package/decorators/prop.js.map +18 -0
- package/decorators/query-slot.js +3 -0
- package/{dist/decorators → decorators}/query-slot.js.map +3 -3
- package/decorators/query.js +3 -0
- package/{dist/decorators → decorators}/query.js.map +3 -3
- package/decorators/shared/auto-bind.d.ts +7 -0
- package/decorators/shared/auto-bind.js +3 -0
- package/decorators/shared/auto-bind.js.map +10 -0
- package/decorators/shared/reactive-attr.js +3 -0
- package/decorators/shared/reactive-attr.js.map +13 -0
- package/decorators/signal.js +3 -0
- package/decorators/signal.js.map +19 -0
- package/decorators/standard/attr.js +3 -0
- package/decorators/standard/attr.js.map +14 -0
- package/decorators/standard/bound.js +3 -0
- package/{dist/decorators → decorators}/standard/bound.js.map +2 -2
- package/decorators/standard/custom-element.js +3 -0
- package/{dist/decorators → decorators}/standard/custom-element.js.map +2 -2
- package/decorators/standard/debounce.js +3 -0
- package/{dist/decorators → decorators}/standard/debounce.js.map +2 -2
- package/decorators/standard/event.js +3 -0
- package/{dist/decorators → decorators}/standard/event.js.map +2 -2
- package/decorators/standard/on-event.js +3 -0
- package/{dist/decorators → decorators}/standard/on-event.js.map +2 -2
- package/decorators/standard/on-updated.js +3 -0
- package/{dist/decorators → decorators}/standard/on-updated.js.map +2 -2
- package/decorators/standard/query-slot.js +3 -0
- package/{dist/decorators → decorators}/standard/query-slot.js.map +2 -2
- package/decorators/standard/query.js +3 -0
- package/{dist/decorators → decorators}/standard/query.js.map +2 -2
- package/decorators/standard/reactive-field.js +3 -0
- package/decorators/standard/reactive-field.js.map +11 -0
- package/decorators/standard/reactive-prop.js +3 -0
- package/{dist/decorators → decorators}/standard/reactive-prop.js.map +4 -4
- package/decorators/standard/signal.js +3 -0
- package/decorators/standard/signal.js.map +16 -0
- package/{dist/decorators → decorators}/state.d.ts +3 -2
- package/decorators/state.js +3 -0
- package/decorators/state.js.map +16 -0
- package/helpers/create-event-listener.js +3 -0
- package/{dist/helpers → helpers}/create-event-listener.js.map +2 -2
- package/helpers/create-event.js +3 -0
- package/{dist/helpers → helpers}/create-event.js.map +2 -2
- package/helpers/create-query-slot.js +3 -0
- package/{dist/helpers → helpers}/create-query-slot.js.map +2 -2
- package/helpers/create-query.js +3 -0
- package/{dist/helpers → helpers}/create-query.js.map +2 -2
- package/helpers/debounce.js +3 -0
- package/{dist/helpers → helpers}/debounce.js.map +2 -2
- package/helpers/index.js +3 -0
- package/{dist/helpers → helpers}/index.js.map +2 -2
- package/index.js +3 -0
- package/index.js.map +86 -0
- package/package.json +99 -129
- package/server/context-ssr.js +3 -0
- package/{dist/server → server}/context-ssr.js.map +2 -2
- package/server/host-attribute-serialization.js +3 -0
- package/{dist/server → server}/host-attribute-serialization.js.map +5 -5
- package/server/host-script-composition.js +3 -0
- package/{dist/server → server}/host-script-composition.js.map +2 -2
- package/server/html-parser.js +3 -0
- package/{dist/server → server}/html-parser.js.map +2 -2
- package/server/install-light-dom-shim.js +3 -0
- package/server/install-light-dom-shim.js.map +17 -0
- package/server/internal-radiant-host.js +3 -0
- package/{dist/server → server}/internal-radiant-host.js.map +1 -1
- package/server/light-dom-shim.d.ts +2 -0
- package/server/light-dom-shim.js +3 -0
- package/server/light-dom-shim.js.map +16 -0
- package/server/minimal-dom/document.d.ts +17 -0
- package/server/minimal-dom/document.js +3 -0
- package/server/minimal-dom/document.js.map +14 -0
- package/server/minimal-dom/html.d.ts +7 -0
- package/server/minimal-dom/html.js +3 -0
- package/server/minimal-dom/html.js.map +13 -0
- package/{dist/server/light-dom-shim.d.ts → server/minimal-dom/install.d.ts} +1 -4
- package/server/minimal-dom/install.js +3 -0
- package/server/minimal-dom/install.js.map +16 -0
- package/server/minimal-dom/nodes.d.ts +78 -0
- package/server/project-root.js +3 -0
- package/{dist/server → server}/project-root.js.map +2 -2
- package/server/radiant-element-ssr-bridge.js +3 -0
- package/{dist/server → server}/radiant-element-ssr-bridge.js.map +9 -9
- package/server/radiant-element-ssr-extractor.js +3 -0
- package/{dist/server → server}/radiant-element-ssr-extractor.js.map +3 -3
- package/server/radiant-element-ssr-service.js +3 -0
- package/{dist/server → server}/radiant-element-ssr-service.js.map +8 -8
- package/server/radiant-element-ssr.js +3 -0
- package/{dist/server → server}/radiant-element-ssr.js.map +9 -9
- package/{dist/server → server}/render-component.d.ts +1 -1
- package/server/render-component.js +3 -0
- package/server/render-component.js.map +32 -0
- package/server/render-controller.js +3 -0
- package/server/render-controller.js.map +35 -0
- package/server/render-fragment.js +3 -0
- package/server/render-fragment.js.map +10 -0
- package/server/slot-projection-html.js +3 -0
- package/{dist/server → server}/slot-projection-html.js.map +4 -4
- package/signals/host-resource.js +3 -0
- package/{dist/signals → signals}/host-resource.js.map +2 -2
- package/{dist/signals → signals}/host-signal.d.ts +2 -1
- package/signals/host-signal.js +3 -0
- package/signals/host-signal.js.map +13 -0
- package/signals/hydration-script.js +3 -0
- package/{dist/signals → signals}/hydration-script.js.map +2 -2
- package/tools/escape-css-identifier.js +3 -0
- package/{dist/tools → tools}/escape-css-identifier.js.map +2 -2
- package/tools/escape-script-json.js +3 -0
- package/{dist/tools → tools}/escape-script-json.js.map +2 -2
- package/tools/event-emitter.js +3 -0
- package/{dist/tools → tools}/event-emitter.js.map +2 -2
- package/tools/index.js +3 -0
- package/{dist/tools → tools}/index.js.map +2 -2
- package/tools/render-jsx-template.js +3 -0
- package/{dist/tools → tools}/render-jsx-template.js.map +2 -2
- package/types.js +3 -0
- package/{dist/types.js.map → types.js.map} +2 -2
- package/utils/attribute-utils.js +3 -0
- package/{dist/utils → utils}/attribute-utils.js.map +2 -2
- package/utils/escape-html-attribute.js +3 -0
- package/{dist/utils → utils}/escape-html-attribute.js.map +2 -2
- package/utils/index.js +3 -0
- package/{dist/utils → utils}/index.js.map +2 -2
- package/dist/LICENSE +0 -21
- package/dist/README.md +0 -315
- package/dist/client/app-bootstrap.js +0 -3
- package/dist/client/hydrator.js +0 -3
- package/dist/client/install-hydrator.js +0 -3
- package/dist/context/context-consumer-bootstrap.js +0 -3
- package/dist/context/context-consumer-runtime.js +0 -3
- package/dist/context/context-consumer-runtime.js.map +0 -12
- package/dist/context/context-host.js +0 -3
- package/dist/context/context-provider.js +0 -3
- package/dist/context/context-ssr-bridge.js +0 -3
- package/dist/context/create-context.js +0 -3
- package/dist/context/decorators/consume-context.js +0 -3
- package/dist/context/decorators/context-selection-delivery.js +0 -3
- package/dist/context/decorators/context-selector.js +0 -3
- package/dist/context/decorators/legacy/consume-context.js +0 -3
- package/dist/context/decorators/legacy/consume-context.js.map +0 -16
- package/dist/context/decorators/legacy/context-selector-field.js +0 -3
- package/dist/context/decorators/legacy/context-selector-field.js.map +0 -17
- package/dist/context/decorators/legacy/context-selector.js +0 -3
- package/dist/context/decorators/legacy/context-selector.js.map +0 -17
- package/dist/context/decorators/legacy/provide-context.js +0 -3
- package/dist/context/decorators/on-context-update.js +0 -3
- package/dist/context/decorators/provide-context.js +0 -3
- package/dist/context/decorators/standard/consume-context.js +0 -3
- package/dist/context/decorators/standard/context-selector-field.js +0 -3
- package/dist/context/decorators/standard/context-selector.js +0 -3
- package/dist/context/decorators/standard/provide-context.js +0 -3
- package/dist/context/decorators/standard-legacy-dispatch.js +0 -3
- package/dist/context/decorators/standard-legacy-dispatch.js.map +0 -10
- package/dist/context/events.js +0 -3
- package/dist/context/events.js.map +0 -10
- package/dist/context/hydration-script.js +0 -3
- package/dist/context/index.js +0 -3
- package/dist/controller-registry.js +0 -3
- package/dist/core/controller-metadata.js +0 -3
- package/dist/core/custom-element-metadata.js +0 -3
- package/dist/core/event-subscription-registry.js +0 -3
- package/dist/core/host-ssr-registry.js +0 -3
- package/dist/core/hydration-capable-host.js +0 -3
- package/dist/core/hydration-codec.js +0 -3
- package/dist/core/radiant-controller.js +0 -3
- package/dist/core/radiant-controller.js.map +0 -20
- package/dist/core/radiant-element-ssr-host.js +0 -3
- package/dist/core/radiant-element-ssr-registry.js +0 -3
- package/dist/core/radiant-element-ssr-registry.js.map +0 -10
- package/dist/core/radiant-element.js +0 -3
- package/dist/core/radiant-element.js.map +0 -30
- package/dist/core/radiant-hydrator-state.js +0 -3
- package/dist/core/reactive-host.d.ts +0 -124
- package/dist/core/reactive-host.js +0 -3
- package/dist/core/reactive-host.js.map +0 -13
- package/dist/core/reactive-jsx-value.js +0 -3
- package/dist/core/reactive-jsx-value.js.map +0 -10
- package/dist/core/reactive-prop-core.js +0 -3
- package/dist/core/reactive-prop-metadata.js +0 -3
- package/dist/core/reactive-property-state.js +0 -3
- package/dist/core/reactive-property-state.js.map +0 -12
- package/dist/core/reactivity-adapter.js +0 -3
- package/dist/core/reactivity-adapter.js.map +0 -12
- package/dist/core/reactivity-runtime.js +0 -3
- package/dist/core/reactivity-runtime.js.map +0 -11
- package/dist/core/reactivity-signals.js +0 -3
- package/dist/core/reactivity-signals.js.map +0 -10
- package/dist/core/render-runtime.js +0 -3
- package/dist/core/render-scheduler.js +0 -3
- package/dist/core/slot-projection-runtime.js +0 -3
- package/dist/core/ssr-preparation.js +0 -3
- package/dist/decorators/attr.js +0 -3
- package/dist/decorators/attr.js.map +0 -17
- package/dist/decorators/bound.js +0 -3
- package/dist/decorators/bridge.js +0 -3
- package/dist/decorators/controller.js +0 -3
- package/dist/decorators/custom-element.js +0 -3
- package/dist/decorators/debounce.js +0 -3
- package/dist/decorators/event.js +0 -3
- package/dist/decorators/legacy/attr.js +0 -3
- package/dist/decorators/legacy/attr.js.map +0 -14
- package/dist/decorators/legacy/bound.js +0 -3
- package/dist/decorators/legacy/custom-element.js +0 -3
- package/dist/decorators/legacy/debounce.js +0 -3
- package/dist/decorators/legacy/event.js +0 -3
- package/dist/decorators/legacy/event.js.map +0 -13
- package/dist/decorators/legacy/host-readiness.js +0 -3
- package/dist/decorators/legacy/host-readiness.js.map +0 -11
- package/dist/decorators/legacy/instance-initializers.js +0 -3
- package/dist/decorators/legacy/instance-initializers.js.map +0 -10
- package/dist/decorators/legacy/on-event.js +0 -3
- package/dist/decorators/legacy/on-updated.js +0 -3
- package/dist/decorators/legacy/on-updated.js.map +0 -11
- package/dist/decorators/legacy/query-slot.js +0 -3
- package/dist/decorators/legacy/query-slot.js.map +0 -13
- package/dist/decorators/legacy/query.js +0 -3
- package/dist/decorators/legacy/query.js.map +0 -12
- package/dist/decorators/legacy/reactive-field.js +0 -3
- package/dist/decorators/legacy/reactive-field.js.map +0 -11
- package/dist/decorators/legacy/reactive-prop.js +0 -3
- package/dist/decorators/legacy/reactive-prop.js.map +0 -14
- package/dist/decorators/legacy/signal.js +0 -3
- package/dist/decorators/legacy/signal.js.map +0 -16
- package/dist/decorators/on-event.js +0 -3
- package/dist/decorators/on-updated.js +0 -3
- package/dist/decorators/prop.js +0 -3
- package/dist/decorators/prop.js.map +0 -17
- package/dist/decorators/query-slot.js +0 -3
- package/dist/decorators/query.js +0 -3
- package/dist/decorators/shared/reactive-attr.js +0 -3
- package/dist/decorators/shared/reactive-attr.js.map +0 -12
- package/dist/decorators/signal.js +0 -3
- package/dist/decorators/signal.js.map +0 -18
- package/dist/decorators/standard/attr.js +0 -3
- package/dist/decorators/standard/attr.js.map +0 -13
- package/dist/decorators/standard/bound.js +0 -3
- package/dist/decorators/standard/custom-element.js +0 -3
- package/dist/decorators/standard/debounce.js +0 -3
- package/dist/decorators/standard/event.js +0 -3
- package/dist/decorators/standard/on-event.js +0 -3
- package/dist/decorators/standard/on-updated.js +0 -3
- package/dist/decorators/standard/query-slot.js +0 -3
- package/dist/decorators/standard/query.js +0 -3
- package/dist/decorators/standard/reactive-field.js +0 -3
- package/dist/decorators/standard/reactive-field.js.map +0 -10
- package/dist/decorators/standard/reactive-prop.js +0 -3
- package/dist/decorators/standard/signal.js +0 -3
- package/dist/decorators/standard/signal.js.map +0 -15
- package/dist/decorators/state.js +0 -3
- package/dist/decorators/state.js.map +0 -14
- package/dist/helpers/create-event-listener.js +0 -3
- package/dist/helpers/create-event.js +0 -3
- package/dist/helpers/create-query-slot.js +0 -3
- package/dist/helpers/create-query.js +0 -3
- package/dist/helpers/debounce.js +0 -3
- package/dist/helpers/index.js +0 -3
- package/dist/index.js +0 -3
- package/dist/index.js.map +0 -83
- package/dist/package.json +0 -209
- package/dist/server/context-ssr.js +0 -3
- package/dist/server/host-attribute-serialization.js +0 -3
- package/dist/server/host-script-composition.js +0 -3
- package/dist/server/html-parser.js +0 -3
- package/dist/server/install-light-dom-shim.js +0 -3
- package/dist/server/install-light-dom-shim.js.map +0 -12
- package/dist/server/internal-radiant-host.js +0 -3
- package/dist/server/light-dom-shim.js +0 -3
- package/dist/server/light-dom-shim.js.map +0 -11
- package/dist/server/project-root.js +0 -3
- package/dist/server/radiant-element-ssr-bridge.js +0 -3
- package/dist/server/radiant-element-ssr-extractor.js +0 -3
- package/dist/server/radiant-element-ssr-service.js +0 -3
- package/dist/server/radiant-element-ssr.js +0 -3
- package/dist/server/render-component.js +0 -3
- package/dist/server/render-component.js.map +0 -28
- package/dist/server/render-controller.js +0 -3
- package/dist/server/render-controller.js.map +0 -31
- package/dist/server/render-fragment.js +0 -3
- package/dist/server/render-fragment.js.map +0 -10
- package/dist/server/slot-projection-html.js +0 -3
- package/dist/signals/host-resource.js +0 -3
- package/dist/signals/host-signal.js +0 -3
- package/dist/signals/host-signal.js.map +0 -13
- package/dist/signals/hydration-script.js +0 -3
- package/dist/tools/escape-css-identifier.js +0 -3
- package/dist/tools/escape-script-json.js +0 -3
- package/dist/tools/event-emitter.js +0 -3
- package/dist/tools/index.js +0 -3
- package/dist/tools/render-jsx-template.js +0 -3
- package/dist/types.js +0 -3
- package/dist/utils/attribute-utils.js +0 -3
- package/dist/utils/escape-html-attribute.js +0 -3
- package/dist/utils/index.js +0 -3
- /package/{dist/client → client}/app-bootstrap.d.ts +0 -0
- /package/{dist/client → client}/hydrator.d.ts +0 -0
- /package/{dist/client → client}/install-hydrator.d.ts +0 -0
- /package/{dist/context → context}/context-consumer-bootstrap.d.ts +0 -0
- /package/{dist/context → context}/context-consumer-runtime.d.ts +0 -0
- /package/{dist/context → context}/context-host.d.ts +0 -0
- /package/{dist/context → context}/context-provider.d.ts +0 -0
- /package/{dist/context → context}/context-ssr-bridge.d.ts +0 -0
- /package/{dist/context → context}/create-context.d.ts +0 -0
- /package/{dist/context → context}/decorators/consume-context.d.ts +0 -0
- /package/{dist/context → context}/decorators/context-selection-delivery.d.ts +0 -0
- /package/{dist/context → context}/decorators/context-selector.d.ts +0 -0
- /package/{dist/context → context}/decorators/legacy/consume-context.d.ts +0 -0
- /package/{dist/context → context}/decorators/legacy/context-selector-field.d.ts +0 -0
- /package/{dist/context → context}/decorators/legacy/context-selector.d.ts +0 -0
- /package/{dist/context → context}/decorators/legacy/provide-context.d.ts +0 -0
- /package/{dist/context → context}/decorators/on-context-update.d.ts +0 -0
- /package/{dist/context → context}/decorators/provide-context.d.ts +0 -0
- /package/{dist/context → context}/decorators/standard/consume-context.d.ts +0 -0
- /package/{dist/context → context}/decorators/standard/context-selector-field.d.ts +0 -0
- /package/{dist/context → context}/decorators/standard/context-selector.d.ts +0 -0
- /package/{dist/context → context}/decorators/standard/provide-context.d.ts +0 -0
- /package/{dist/context → context}/decorators/standard-legacy-dispatch.d.ts +0 -0
- /package/{dist/context → context}/events.d.ts +0 -0
- /package/{dist/context → context}/hydration-script.d.ts +0 -0
- /package/{dist/context → context}/index.d.ts +0 -0
- /package/{dist/context → context}/types.d.ts +0 -0
- /package/{dist/context → context}/types.js +0 -0
- /package/{dist/context → context}/types.js.map +0 -0
- /package/{dist/controller-registry.d.ts → controller-registry.d.ts} +0 -0
- /package/{dist/core → core}/controller-metadata.d.ts +0 -0
- /package/{dist/core → core}/custom-element-metadata.d.ts +0 -0
- /package/{dist/core → core}/event-subscription-registry.d.ts +0 -0
- /package/{dist/core → core}/host-ssr-registry.d.ts +0 -0
- /package/{dist/core → core}/hydration-capable-host.d.ts +0 -0
- /package/{dist/core → core}/hydration-codec.d.ts +0 -0
- /package/{dist/core → core}/radiant-element-ssr-host.d.ts +0 -0
- /package/{dist/core → core}/radiant-hydrator-state.d.ts +0 -0
- /package/{dist/core → core}/reactive-prop-metadata.d.ts +0 -0
- /package/{dist/core → core}/reactivity-adapter.d.ts +0 -0
- /package/{dist/core → core}/reactivity-contract.js +0 -0
- /package/{dist/core → core}/reactivity-contract.js.map +0 -0
- /package/{dist/core → core}/reactivity-runtime.d.ts +0 -0
- /package/{dist/core → core}/reactivity-signals.d.ts +0 -0
- /package/{dist/core → core}/render-runtime.d.ts +0 -0
- /package/{dist/core → core}/render-scheduler.d.ts +0 -0
- /package/{dist/core → core}/slot-projection-runtime.d.ts +0 -0
- /package/{dist/core → core}/ssr-hydration-binding.d.ts +0 -0
- /package/{dist/core → core}/ssr-hydration-binding.js +0 -0
- /package/{dist/core → core}/ssr-hydration-binding.js.map +0 -0
- /package/{dist/core → core}/ssr-preparation.d.ts +0 -0
- /package/{dist/decorators → decorators}/attr.d.ts +0 -0
- /package/{dist/decorators → decorators}/bound.d.ts +0 -0
- /package/{dist/decorators → decorators}/bridge.d.ts +0 -0
- /package/{dist/decorators → decorators}/controller.d.ts +0 -0
- /package/{dist/decorators → decorators}/custom-element.d.ts +0 -0
- /package/{dist/decorators → decorators}/debounce.d.ts +0 -0
- /package/{dist/decorators → decorators}/event.d.ts +0 -0
- /package/{dist/decorators → decorators}/legacy/attr.d.ts +0 -0
- /package/{dist/decorators → decorators}/legacy/bound.d.ts +0 -0
- /package/{dist/decorators → decorators}/legacy/custom-element.d.ts +0 -0
- /package/{dist/decorators → decorators}/legacy/debounce.d.ts +0 -0
- /package/{dist/decorators → decorators}/legacy/event.d.ts +0 -0
- /package/{dist/decorators → decorators}/legacy/host-readiness.d.ts +0 -0
- /package/{dist/decorators → decorators}/legacy/on-event.d.ts +0 -0
- /package/{dist/decorators → decorators}/legacy/on-updated.d.ts +0 -0
- /package/{dist/decorators → decorators}/legacy/query-slot.d.ts +0 -0
- /package/{dist/decorators → decorators}/legacy/query.d.ts +0 -0
- /package/{dist/decorators → decorators}/legacy/reactive-field.d.ts +0 -0
- /package/{dist/decorators → decorators}/legacy/signal.d.ts +0 -0
- /package/{dist/decorators → decorators}/on-event.d.ts +0 -0
- /package/{dist/decorators → decorators}/on-updated.d.ts +0 -0
- /package/{dist/decorators → decorators}/query-slot.d.ts +0 -0
- /package/{dist/decorators → decorators}/query.d.ts +0 -0
- /package/{dist/decorators → decorators}/shared/reactive-attr.d.ts +0 -0
- /package/{dist/decorators → decorators}/signal.d.ts +0 -0
- /package/{dist/decorators → decorators}/standard/attr.d.ts +0 -0
- /package/{dist/decorators → decorators}/standard/bound.d.ts +0 -0
- /package/{dist/decorators → decorators}/standard/custom-element.d.ts +0 -0
- /package/{dist/decorators → decorators}/standard/debounce.d.ts +0 -0
- /package/{dist/decorators → decorators}/standard/event.d.ts +0 -0
- /package/{dist/decorators → decorators}/standard/on-event.d.ts +0 -0
- /package/{dist/decorators → decorators}/standard/on-updated.d.ts +0 -0
- /package/{dist/decorators → decorators}/standard/query-slot.d.ts +0 -0
- /package/{dist/decorators → decorators}/standard/query.d.ts +0 -0
- /package/{dist/decorators → decorators}/standard/reactive-field.d.ts +0 -0
- /package/{dist/decorators → decorators}/standard/reactive-prop.d.ts +0 -0
- /package/{dist/decorators → decorators}/standard/signal.d.ts +0 -0
- /package/{dist/helpers → helpers}/create-event-listener.d.ts +0 -0
- /package/{dist/helpers → helpers}/create-event.d.ts +0 -0
- /package/{dist/helpers → helpers}/create-query-slot.d.ts +0 -0
- /package/{dist/helpers → helpers}/create-query.d.ts +0 -0
- /package/{dist/helpers → helpers}/debounce.d.ts +0 -0
- /package/{dist/helpers → helpers}/index.d.ts +0 -0
- /package/{dist/index.d.ts → index.d.ts} +0 -0
- /package/{dist/server → server}/context-ssr.d.ts +0 -0
- /package/{dist/server → server}/host-attribute-serialization.d.ts +0 -0
- /package/{dist/server → server}/host-script-composition.d.ts +0 -0
- /package/{dist/server → server}/html-parser.d.ts +0 -0
- /package/{dist/server → server}/install-light-dom-shim.d.ts +0 -0
- /package/{dist/server → server}/internal-radiant-host.d.ts +0 -0
- /package/{dist/server → server}/project-root.d.ts +0 -0
- /package/{dist/server → server}/radiant-element-ssr-bridge.d.ts +0 -0
- /package/{dist/server → server}/radiant-element-ssr-extractor.d.ts +0 -0
- /package/{dist/server → server}/radiant-element-ssr-service.d.ts +0 -0
- /package/{dist/server → server}/radiant-element-ssr.d.ts +0 -0
- /package/{dist/server → server}/render-controller.d.ts +0 -0
- /package/{dist/server → server}/render-fragment.d.ts +0 -0
- /package/{dist/server → server}/slot-projection-html.d.ts +0 -0
- /package/{dist/signals → signals}/host-resource.d.ts +0 -0
- /package/{dist/signals → signals}/hydration-script.d.ts +0 -0
- /package/{dist/tools → tools}/escape-css-identifier.d.ts +0 -0
- /package/{dist/tools → tools}/escape-script-json.d.ts +0 -0
- /package/{dist/tools → tools}/event-emitter.d.ts +0 -0
- /package/{dist/tools → tools}/index.d.ts +0 -0
- /package/{dist/tools → tools}/render-jsx-template.d.ts +0 -0
- /package/{dist/types.d.ts → types.d.ts} +0 -0
- /package/{dist/utils → utils}/attribute-utils.d.ts +0 -0
- /package/{dist/utils → utils}/escape-html-attribute.d.ts +0 -0
- /package/{dist/utils → utils}/index.d.ts +0 -0
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
var{defineProperty:F,getOwnPropertyNames:m,getOwnPropertyDescriptor:d}=Object,c=Object.prototype.hasOwnProperty;function p(P){return this[P]}var GP=(P)=>{var D=(U??=new WeakMap).get(P),q;if(D)return D;if(D=F({},"__esModule",{value:!0}),P&&typeof P==="object"||typeof P==="function"){for(var W of m(P))if(!c.call(D,W))F(D,W,{get:p.bind(P,W),enumerable:!(q=d(P,W))||q.enumerable})}return U.set(P,D),D},U;var l=(P)=>P;function u(P,D){this[P]=l.bind(null,D)}var XP=(P,D)=>{for(var q in D)F(P,q,{get:D[q],enumerable:!0,configurable:!0,set:u.bind(D,q)})};var YP=(P,D)=>()=>(P&&(D=P(P=0)),D);var s=((P)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(P,{get:(D,q)=>(typeof require<"u"?require:D)[q]}):P)(function(P){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+P+'" is not supported')});function _(P){return P.replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">")}var J=Symbol.for("@ecopages/radiant.reactivePropDefinitions");function KP(P,D,q){let W=P.constructor,Q=W[J]??[];if(Q.some((Z)=>Z.name===D))return;Q.push({name:D,options:q}),W[J]=Q}function j(P){return(P.constructor[J]??[]).slice()}var G=Symbol.for("@ecopages/radiant.legacy-instance-initializers"),X=Symbol.for("@ecopages/radiant.legacy-post-construction-initializers"),o=Symbol.for("@ecopages/radiant.legacy-executed-post-construction-initializers");function IP(P,D){B(P,G,D)}function wP(P,D){B(P,X,D)}function Y(P){i(P,G)}function R(P,D){let q=P;n(P,D,q[o]??=new Set)}function B(P,D,q){let W=P,Q=Object.prototype.hasOwnProperty.call(W,D)?W[D]:void 0;if(Array.isArray(Q)){Q.push(q);return}Object.defineProperty(W,D,{value:[q]})}function i(P,D){r(P,(q)=>{let W=q[D];if(!Array.isArray(W))return;for(let Q of W)Q(P)})}function n(P,D,q){for(let W of K(P)){let Q=W[X];if(!Array.isArray(Q))continue;for(let Z of Q){if(q.has(Z))continue;Z(P,D),q.add(Z)}}}function K(P){let D=[],q=Object.getPrototypeOf(P);while(q&&q!==Object.prototype)D.unshift(q),q=Object.getPrototypeOf(q);return D}function r(P,D){for(let q of K(P))D(q)}function H(P,D){switch(D){case"construct":Y(P);break;case"connect":R(P,"connect");break;case"ssr":R(P,"ssr");break}}function O(P){switch(P){case Array:return"array";case Boolean:return"boolean";case Number:return"number";case Object:return"object";case String:return"string"}}function a(P){switch(typeof P){case"boolean":return"boolean";case"number":return"number";case"string":return"string"}if(Array.isArray(P))return"array";if(Object.prototype.toString.call(P)==="[object Object]")return"object"}function t(P){switch(P){case Number:return 0;case String:return"";case Boolean:return!1;default:return null}}function e(P){try{return JSON.parse(P)}catch{throw TypeError("Invalid JSON string")}}var PP={array(P){let D=e(P);if(!Array.isArray(D))throw TypeError(`Expected an array but got a value of type "${typeof D}"`);return D},boolean(P){return!(P==="0"||String(P).toLowerCase()==="false")},number(P){return Number(P.replace(/_/g,""))},object(P){let D=JSON.parse(P);if(D===null||typeof D!=="object"||Array.isArray(D))throw TypeError(`expected value of type "object" but instead got value "${P}" of type "${a(D)}"`);return D},string(P){return P}},I={default:E,array:w,object:w};function w(P){return JSON.stringify(P)}function E(P){return`${P}`}function M(P,D){let q=O(D);if(!q)throw TypeError(`[radiant-element] Unknown type "${D}"`);return PP[q](P)}function C(P,D){let q=O(D);if(!q)throw TypeError(`[radiant-element] Unknown type "${D}"`);return(I[q]??I.default??E)(P)}function DP(P){return typeof P==="boolean"}function qP(P){return typeof P==="number"}function WP(P){return typeof P==="string"}function QP(P){return Array.isArray(P)}function ZP(P){return typeof P==="object"&&!Array.isArray(P)&&P!==null}function CP(P,D){switch(P){case Boolean:return DP(D);case Number:return qP(D);case String:return WP(D);case Array:return QP(D);case Object:return ZP(D);default:return!1}}var kP=(P,D,q,W)=>{if(D===Boolean){let Z=P.getAttribute(q);if(Z===null)return W;return Z===""?!0:M(Z,D)}let Q=P.getAttribute(q);return Q!==null?M(Q,D):W??t(D)};var k=Symbol.for("@ecopages/radiant.customElementTagName");function _P(P,D){P[k]=D}function x(P){return P[k]}function L(P){let D={},q=new Set;return FP(P,D,q),JP(P,D,q),RP(P,D),D}function N(P){return Object.entries(P).map(([D,q])=>` ${D}="${_(q)}"`).join("")}function FP(P,D,q){for(let W of P.getReactiveProperties()){let Q=P.getPropertyValue(W.name);if(Q===void 0||Q===null||Q===!1)continue;D[W.attribute]=String(W.converter.toAttribute(Q)),q.add(W.attribute)}}function JP(P,D,q){for(let W of P.getReactivePropDefinitions()){let Q=W.options.attribute??W.name;if(q.has(Q))continue;let Z=P.getPropertyValue(W.name);if(Z===void 0||Z===null||Z===!1)continue;D[Q]=String(C(Z,W.options.type)),q.add(Q)}}function RP(P,D){for(let q of P.getAttributeNames()){let W=P.getAttribute(q);if(W!==null)D[q]=W}}var T=Symbol.for("@ecopages/radiant.ssr-context-provider-resolver");function f(){return globalThis}function z(P){f()[T]=P}function AP(P){return f()[T]?.(P)}var $;function g(){if($!==void 0)return $;try{let{AsyncLocalStorage:P}=(()=>{throw new Error("Cannot require module "+"node:async_hooks");})();return $=new P,$}catch{return $=null,null}}var A=Symbol.for("@ecopages/radiant.ssr-context-fallback-stack");function S(){let P=globalThis;return P[A]??=[],P[A]}function V(P){if(P.length===0)return()=>{return};let D=new Map;for(let Q of P)D.set(Q.getContextKey(),Q);let q=g();if(q){let Q=q.getStore()??[],Z=[...Q,D];return q.enterWith(Z),()=>{q.enterWith(Q)}}let W=S();return W.push(D),()=>{let Q=W.lastIndexOf(D);if(Q>=0)W.splice(Q,1)}}function v(P){let D=g()?.getStore()??S();for(let q=D.length-1;q>=0;q-=1){let W=D[q]?.get(P);if(W)return W}return}function VP(P){let D=v(P);if(!D)return;return D.getContext()}z((P)=>v(P));function b(P,D){if(!D)return`${P.hostContent}${P.authoredHydrationMarkup}${P.slotProjectionScript}`;return`${P.hostContent}${P.slotProjectionScript}${P.hydrationScripts}`}function h(P){if(UP(P))return P;return}function UP(P){return typeof P.constructor==="function"&&typeof P.getAttribute==="function"&&typeof P.getAttributeNames==="function"&&typeof P.getAuthoredHydrationScriptMarkup==="function"&&typeof P.getContextProviders==="function"&&typeof P.getHydrationBindings==="function"&&typeof P.getReactiveProperties==="function"&&typeof P.getSlotProjectionScriptTag==="function"&&typeof P.resolveTrackedRenderOutput==="function"&&typeof P.renderViewToString==="function"}function y(P){let D=h(P);if(!D)throw Error("Radiant SSR runtime requires a server extraction host shape on the component.");return{constructor:D.constructor,getAttribute:(q)=>D.getAttribute(q),getAttributeNames:()=>D.getAttributeNames(),getAuthoredHydrationScriptMarkup:()=>D.getAuthoredHydrationScriptMarkup?.(),getContextProviders:()=>D.getContextProviders(),getHydrationBindings:()=>D.getHydrationBindings(),getReactiveProperties:()=>D.getReactiveProperties(),getReactivePropDefinitions:()=>j(P),getPropertyValue:(q)=>Reflect.get(P,q),getSlotProjectionScriptTag:()=>D.getSlotProjectionScriptTag?.(),resolveTrackedRenderOutput:()=>D.resolveTrackedRenderOutput(),renderViewToString:(q)=>D.renderViewToString(q)}}class jP{component;host;constructor(P){this.component=P,this.host=y(P)}ensureReady(){H(this.component,"ssr")}renderHost(){return this.ensureReady(),{nodeType:1,outerHTML:this.renderHostToString({mode:"hydrate"})}}renderHostToString(P={},D=this.getHostAttributes()){this.ensureReady();let q=this.getTagName(),W=V(this.host.getContextProviders());try{return`<${q}${N(D)}>${this.renderHostContent(P)}</${q}>`}finally{W()}}getHostAttributes(){return this.ensureReady(),L(this.host)}renderHostContent(P){let D=P.mode==="hydrate"||P.mode===void 0&&P.hydrate===!0,q=D?this.host.getHydrationBindings().map((W)=>W.renderHydrationScriptTag()).filter((W)=>typeof W==="string").join(""):"";return b({hostContent:this.host.renderViewToString(P),authoredHydrationMarkup:this.host.getAuthoredHydrationScriptMarkup?.()??"",slotProjectionScript:this.host.getSlotProjectionScriptTag?.()??"",hydrationScripts:q},D)}getTagName(){let P=x(this.host.constructor);if(!P)throw Error(`${this.host.constructor.name} is missing @customElement metadata.`);return P}}export{jP as RadiantElementSsrService};
|
|
2
|
+
|
|
3
|
+
//# debugId=FD5B670481765E7264756E2164756E21
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../src/core/reactive-prop-metadata.ts", "../src/decorators/legacy/instance-initializers.ts", "../src/decorators/legacy/host-readiness.ts", "../src/utils/attribute-utils.ts", "../src/core/custom-element-metadata.ts", "../src/
|
|
3
|
+
"sources": ["../src/utils/escape-html-attribute.ts", "../src/core/reactive-prop-metadata.ts", "../src/decorators/legacy/instance-initializers.ts", "../src/decorators/legacy/host-readiness.ts", "../src/utils/attribute-utils.ts", "../src/core/custom-element-metadata.ts", "../src/server/host-attribute-serialization.ts", "../src/context/context-ssr-bridge.ts", "../src/server/context-ssr.ts", "../src/server/host-script-composition.ts", "../src/core/radiant-element-ssr-host.ts", "../src/server/radiant-element-ssr-extractor.ts", "../src/server/radiant-element-ssr-service.ts"],
|
|
4
4
|
"sourcesContent": [
|
|
5
|
+
"/** Escapes a string for safe interpolation inside a double-quoted HTML attribute value. */\nexport function escapeHtmlAttribute(value: string): string {\n\treturn value.replace(/&/g, '&').replace(/\"/g, '"').replace(/</g, '<').replace(/>/g, '>');\n}\n",
|
|
5
6
|
"import type { ReactivePropertyOptions } from './reactive-prop-core';\n\nconst REACTIVE_PROP_DEFINITIONS = Symbol.for('@ecopages/radiant.reactivePropDefinitions');\n\nexport type ReactivePropDefinition = {\n\tname: string;\n\toptions: ReactivePropertyOptions<unknown>;\n};\n\ntype RadiantConstructorWithReactiveProps = CustomElementConstructor & {\n\t[REACTIVE_PROP_DEFINITIONS]?: ReactivePropDefinition[];\n};\n\nexport function registerReactivePropDefinition(\n\ttarget: object,\n\tpropertyName: string,\n\toptions: ReactivePropertyOptions<unknown>,\n): void {\n\tconst constructor = target.constructor as RadiantConstructorWithReactiveProps;\n\tconst definitions = constructor[REACTIVE_PROP_DEFINITIONS] ?? [];\n\n\tif (definitions.some((definition) => definition.name === propertyName)) {\n\t\treturn;\n\t}\n\n\tdefinitions.push({ name: propertyName, options });\n\tconstructor[REACTIVE_PROP_DEFINITIONS] = definitions;\n}\n\nexport function getReactivePropDefinitions(target: object): ReactivePropDefinition[] {\n\treturn ((target.constructor as RadiantConstructorWithReactiveProps)[REACTIVE_PROP_DEFINITIONS] ?? []).slice();\n}\n",
|
|
6
|
-
"type LegacyInstanceInitializer<T extends object = object> = (instance: T) => void;\n\nconst LEGACY_INSTANCE_INITIALIZERS = Symbol.for('@ecopages/radiant.legacy-instance-initializers');\nconst LEGACY_POST_CONSTRUCTION_INITIALIZERS = Symbol.for('@ecopages/radiant.legacy-post-construction-initializers');\nconst LEGACY_EXECUTED_POST_CONSTRUCTION_INITIALIZERS = Symbol.for(\n\t'@ecopages/radiant.legacy-executed-post-construction-initializers',\n);\n\n/**\n * Registers per-instance initialization work for a legacy decorator.\n *\n * Legacy decorators execute against the prototype, so any initialization that\n * needs the concrete element instance must be deferred until construction time.\n */\nexport function registerLegacyInstanceInitializer<T extends object>(\n\tproto: T,\n\tinitializer: LegacyInstanceInitializer<T>,\n): void {\n\tregisterInitializer(proto, LEGACY_INSTANCE_INITIALIZERS, initializer);\n}\n\n/**\n * Registers post-construction work for a legacy decorator.\n *\n * This phase exists for decorators that eagerly write instance fields. With\n * legacy decorators plus `useDefineForClassFields`, subclass field definition\n * can overwrite values written during the base-class constructor.\n */\nexport function registerLegacyPostConstructionInitializer<T extends object>(\n\tproto: T,\n\tinitializer:
|
|
7
|
-
"import {
|
|
7
|
+
"export type LegacyPostConstructionPhase = 'connect' | 'ssr';\n\ntype LegacyInstanceInitializer<T extends object = object> = (instance: T) => void;\ntype LegacyPostConstructionInitializer<T extends object = object> = (\n\tinstance: T,\n\tphase: LegacyPostConstructionPhase,\n) => void;\n\nconst LEGACY_INSTANCE_INITIALIZERS = Symbol.for('@ecopages/radiant.legacy-instance-initializers');\nconst LEGACY_POST_CONSTRUCTION_INITIALIZERS = Symbol.for('@ecopages/radiant.legacy-post-construction-initializers');\nconst LEGACY_EXECUTED_POST_CONSTRUCTION_INITIALIZERS = Symbol.for(\n\t'@ecopages/radiant.legacy-executed-post-construction-initializers',\n);\n\n/**\n * Registers per-instance initialization work for a legacy decorator.\n *\n * Legacy decorators execute against the prototype, so any initialization that\n * needs the concrete element instance must be deferred until construction time.\n */\nexport function registerLegacyInstanceInitializer<T extends object>(\n\tproto: T,\n\tinitializer: LegacyInstanceInitializer<T>,\n): void {\n\tregisterInitializer(proto, LEGACY_INSTANCE_INITIALIZERS, initializer);\n}\n\n/**\n * Registers post-construction work for a legacy decorator.\n *\n * This phase exists for decorators that eagerly write instance fields. With\n * legacy decorators plus `useDefineForClassFields`, subclass field definition\n * can overwrite values written during the base-class constructor.\n */\nexport function registerLegacyPostConstructionInitializer<T extends object>(\n\tproto: T,\n\tinitializer: LegacyPostConstructionInitializer<T>,\n): void {\n\tregisterInitializer(proto, LEGACY_POST_CONSTRUCTION_INITIALIZERS, initializer);\n}\n\n/**\n * Runs all legacy decorator initializers for a newly constructed element.\n *\n * Initializers are collected from the prototype chain and executed from base to\n * derived class so inherited setup remains stable.\n */\nexport function runLegacyInstanceInitializers<T extends object>(instance: T): void {\n\trunLegacyInitializers(instance, LEGACY_INSTANCE_INITIALIZERS);\n}\n\n/**\n * Runs legacy decorator setup that must happen after subclass field\n * initialization has completed.\n *\n * Each initializer runs at most once per instance even if multiple lifecycle\n * entrypoints call this helper.\n */\nexport function runLegacyPostConstructionInitializers<T extends object>(\n\tinstance: T,\n\tphase: LegacyPostConstructionPhase,\n): void {\n\tconst target = instance as Record<PropertyKey, unknown>;\n\n\trunLegacyPostConstructionInitializersOnPrototypeChain(\n\t\tinstance,\n\t\tphase,\n\t\t(target[LEGACY_EXECUTED_POST_CONSTRUCTION_INITIALIZERS] ??= new Set()) as Set<\n\t\t\tLegacyPostConstructionInitializer<T>\n\t\t>,\n\t);\n}\n\nfunction registerInitializer<T extends object>(\n\tproto: T,\n\tkey: symbol,\n\tinitializer: LegacyInstanceInitializer<T> | LegacyPostConstructionInitializer<T>,\n): void {\n\tconst target = proto as Record<PropertyKey, unknown>;\n\tconst ownInitializers = Object.prototype.hasOwnProperty.call(target, key) ? target[key] : undefined;\n\n\tif (Array.isArray(ownInitializers)) {\n\t\townInitializers.push(initializer);\n\t\treturn;\n\t}\n\n\tObject.defineProperty(target, key, {\n\t\tvalue: [initializer],\n\t});\n}\n\nfunction runLegacyInitializers<T extends object>(instance: T, key: symbol): void {\n\twalkPrototypeChain(instance, (prototype) => {\n\t\tconst initializers = (prototype as Record<PropertyKey, unknown>)[key] as\n\t\t\tLegacyInstanceInitializer<T>[] | undefined;\n\n\t\tif (!Array.isArray(initializers)) {\n\t\t\treturn;\n\t\t}\n\n\t\tfor (const initializer of initializers) {\n\t\t\tinitializer(instance);\n\t\t}\n\t});\n}\n\nfunction runLegacyPostConstructionInitializersOnPrototypeChain<T extends object>(\n\tinstance: T,\n\tphase: LegacyPostConstructionPhase,\n\texecutedInitializers: Set<LegacyPostConstructionInitializer<T>>,\n): void {\n\tfor (const prototype of collectPrototypeChain(instance)) {\n\t\tconst initializers = (prototype as Record<PropertyKey, unknown>)[LEGACY_POST_CONSTRUCTION_INITIALIZERS] as\n\t\t\tLegacyPostConstructionInitializer<T>[] | undefined;\n\n\t\tif (!Array.isArray(initializers)) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tfor (const initializer of initializers) {\n\t\t\tif (executedInitializers.has(initializer)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tinitializer(instance, phase);\n\t\t\texecutedInitializers.add(initializer);\n\t\t}\n\t}\n}\n\nfunction collectPrototypeChain<T extends object>(instance: T): object[] {\n\tconst prototypes: object[] = [];\n\tlet prototype: object | null = Object.getPrototypeOf(instance);\n\n\twhile (prototype && prototype !== Object.prototype) {\n\t\tprototypes.unshift(prototype);\n\t\tprototype = Object.getPrototypeOf(prototype);\n\t}\n\n\treturn prototypes;\n}\n\nfunction walkPrototypeChain<T extends object>(instance: T, visit: (prototype: object) => void): void {\n\tfor (const prototype of collectPrototypeChain(instance)) {\n\t\tvisit(prototype);\n\t}\n}\n",
|
|
8
|
+
"import { runLegacyInstanceInitializers, runLegacyPostConstructionInitializers } from './instance-initializers';\n\nexport type LegacyHostReadinessPhase = 'construct' | 'connect' | 'ssr';\n\n/**\n * Runs legacy decorator initialization for the requested lifecycle phase.\n *\n * Post-construction work is idempotent — multiple calls with `connect` or `ssr`\n * only execute each registered initializer once per instance.\n */\nexport function ensureLegacyHostReady<T extends object>(host: T, phase: LegacyHostReadinessPhase): void {\n\tswitch (phase) {\n\t\tcase 'construct':\n\t\t\trunLegacyInstanceInitializers(host);\n\t\t\tbreak;\n\t\tcase 'connect':\n\t\t\trunLegacyPostConstructionInitializers(host, 'connect');\n\t\t\tbreak;\n\t\tcase 'ssr':\n\t\t\trunLegacyPostConstructionInitializers(host, 'ssr');\n\t\t\tbreak;\n\t}\n}\n",
|
|
8
9
|
"import type { RadiantElement } from '../core/radiant-element';\n\nexport type AttributeTypeConstant = typeof Array | typeof Boolean | typeof Number | typeof Object | typeof String;\n\nexport type AttributeTypeDefault = Array<unknown> | boolean | number | Record<string, unknown> | string;\n\n/**\n * Parses the given attribute type constant and returns its corresponding string representation.\n *\n * @param constant - The attribute type constant to parse.\n * @returns The string representation of the attribute type constant.\n */\nexport function parseAttributeTypeConstant(constant?: AttributeTypeConstant) {\n\tswitch (constant) {\n\t\tcase Array:\n\t\t\treturn 'array';\n\t\tcase Boolean:\n\t\t\treturn 'boolean';\n\t\tcase Number:\n\t\t\treturn 'number';\n\t\tcase Object:\n\t\t\treturn 'object';\n\t\tcase String:\n\t\t\treturn 'string';\n\t}\n}\n\n/**\n * Parses the attribute type default value and returns its type as a string.\n *\n * @param defaultValue - The default value of the attribute type.\n * @returns The type of the default value as a string.\n */\nexport function parseAttributeTypeDefault(defaultValue?: AttributeTypeDefault) {\n\tswitch (typeof defaultValue) {\n\t\tcase 'boolean':\n\t\t\treturn 'boolean';\n\t\tcase 'number':\n\t\t\treturn 'number';\n\t\tcase 'string':\n\t\t\treturn 'string';\n\t}\n\n\tif (Array.isArray(defaultValue)) return 'array';\n\tif (Object.prototype.toString.call(defaultValue) === '[object Object]') return 'object';\n}\n\n/**\n * Returns the default value for a given attribute type.\n *\n * @param type - The attribute type constant.\n * @returns The default value for the specified attribute type.\n */\nexport function defaultValueForType(type: AttributeTypeConstant): unknown {\n\tswitch (type) {\n\t\tcase Number:\n\t\t\treturn 0;\n\t\tcase String:\n\t\t\treturn '';\n\t\tcase Boolean:\n\t\t\treturn false;\n\t\tdefault:\n\t\t\treturn null;\n\t}\n}\n\ntype Reader = (value: string) => number | string | boolean | object | unknown[];\n\n/**\n * Utility function to parse a JSON string safely\n */\nfunction parseJSON<T>(value: string): T {\n\ttry {\n\t\treturn JSON.parse(value);\n\t} catch {\n\t\tthrow new TypeError('Invalid JSON string');\n\t}\n}\n\n/**\n * Object that maps attribute types to reader functions.\n * @type {Object.<string, Reader>}\n */\nconst readers: { [type: string]: Reader } = {\n\tarray(value: string): unknown[] {\n\t\tconst array = parseJSON<unknown[]>(value);\n\t\tif (!Array.isArray(array)) {\n\t\t\tthrow new TypeError(`Expected an array but got a value of type \"${typeof array}\"`);\n\t\t}\n\t\treturn array;\n\t},\n\n\tboolean(value: string): boolean {\n\t\treturn !(value === '0' || String(value).toLowerCase() === 'false');\n\t},\n\n\tnumber(value: string): number {\n\t\tconst number = Number(value.replace(/_/g, ''));\n\t\treturn number;\n\t},\n\n\tobject(value: string): object {\n\t\tconst object = JSON.parse(value);\n\t\tif (object === null || typeof object !== 'object' || Array.isArray(object)) {\n\t\t\tthrow new TypeError(\n\t\t\t\t`expected value of type \"object\" but instead got value \"${value}\" of type \"${parseAttributeTypeDefault(\n\t\t\t\t\tobject,\n\t\t\t\t)}\"`,\n\t\t\t);\n\t\t}\n\t\treturn object;\n\t},\n\n\tstring(value: string): string {\n\t\treturn value;\n\t},\n};\n\ntype Writer = (value: unknown) => string;\n\n/**\n * Object that maps attribute types to writer functions.\n * @type {Object.<string, Writer>}\n */\nconst writers: { [type: string]: Writer } = {\n\tdefault: writeString,\n\tarray: writeJSON,\n\tobject: writeJSON,\n};\n\nfunction writeJSON(value: unknown) {\n\treturn JSON.stringify(value);\n}\n\nfunction writeString(value: unknown) {\n\treturn `${value}`;\n}\n\n/**\n * Reads the attribute value based on the provided type.\n * @param value - The attribute value to be read.\n * @param type - The type of the attribute.\n * @returns The parsed attribute value.\n * @throws {TypeError} If the provided type is unknown.\n */\nexport function readAttributeValue(value: string, type: AttributeTypeConstant) {\n\tconst readerType = parseAttributeTypeConstant(type);\n\tif (!readerType) throw new TypeError(`[radiant-element] Unknown type \"${type}\"`);\n\treturn readers[readerType]!(value);\n}\n\nexport type ReadAttributeValueReturnType = ReturnType<typeof readAttributeValue>;\n\n/**\n * Writes the attribute value based on the provided type.\n *\n * @param value - The value to be written.\n * @param type - The type of the attribute.\n * @returns The written attribute value.\n * @throws {TypeError} If the provided type is unknown.\n */\nexport function writeAttributeValue(value: unknown, type: AttributeTypeConstant) {\n\tconst writerType = parseAttributeTypeConstant(type);\n\tif (!writerType) throw new TypeError(`[radiant-element] Unknown type \"${type}\"`);\n\tconst writer: Writer = writers[writerType] ?? writers.default ?? writeString;\n\treturn writer(value);\n}\n\nexport type WriteAttributeValueReturnType = ReturnType<typeof writeAttributeValue>;\n\n/*\n * Type guard functions for each type in AttributeTypeConstant\n */\nfunction isBoolean(value: unknown): value is boolean {\n\treturn typeof value === 'boolean';\n}\n\nfunction isNumber(value: unknown): value is number {\n\treturn typeof value === 'number';\n}\n\nfunction isString(value: unknown): value is string {\n\treturn typeof value === 'string';\n}\n\nfunction isArray(value: unknown): value is Array<unknown> {\n\treturn Array.isArray(value);\n}\n\nfunction isObject(value: unknown): value is object {\n\treturn typeof value === 'object' && !Array.isArray(value) && value !== null;\n}\n\n/*\n * Check function to ensure defaultValue matches the type\n */\nexport function isValueOfType(type: AttributeTypeConstant, defaultValue: unknown): boolean {\n\tswitch (type) {\n\t\tcase Boolean:\n\t\t\treturn isBoolean(defaultValue);\n\t\tcase Number:\n\t\t\treturn isNumber(defaultValue);\n\t\tcase String:\n\t\t\treturn isString(defaultValue);\n\t\tcase Array:\n\t\t\treturn isArray(defaultValue);\n\t\tcase Object:\n\t\t\treturn isObject(defaultValue);\n\t\tdefault:\n\t\t\treturn false;\n\t}\n}\n\nexport const getInitialValue = (\n\ttarget: RadiantElement,\n\ttype: AttributeTypeConstant,\n\tattributeKey: string,\n\tdefaultValue: unknown,\n) => {\n\tif (type === Boolean) {\n\t\tconst attributeValue = target.getAttribute(attributeKey);\n\t\tif (attributeValue === null) {\n\t\t\treturn defaultValue;\n\t\t}\n\n\t\treturn attributeValue === '' ? true : readAttributeValue(attributeValue, type);\n\t}\n\n\tconst attributeValue = target.getAttribute(attributeKey);\n\treturn attributeValue !== null\n\t\t? readAttributeValue(attributeValue, type)\n\t\t: (defaultValue ?? (defaultValueForType(type) as typeof defaultValue));\n};\n",
|
|
9
10
|
"export const CUSTOM_ELEMENT_TAG_NAME = Symbol.for('@ecopages/radiant.customElementTagName');\n\ntype CustomElementConstructorWithMetadata = CustomElementConstructor & {\n\t[CUSTOM_ELEMENT_TAG_NAME]?: string;\n};\n\n/**\n * Sets the custom element tag name for a given constructor.\n * This is used internally to associate a class with its custom element tag, which is necessary for features like hydration and SSR support.\n * @param target The constructor of the custom element.\n * @param tagName The tag name to associate with the custom element.\n */\nexport function setCustomElementTagName(target: CustomElementConstructor, tagName: string): void {\n\t(target as CustomElementConstructorWithMetadata)[CUSTOM_ELEMENT_TAG_NAME] = tagName;\n}\n\n/**\n * Retrieves the custom element tag name associated with a given constructor.\n * @param target The constructor of the custom element.\n * @returns The tag name associated with the custom element, or `undefined` if not set.\n */\nexport function getCustomElementTagName(target: CustomElementConstructor): string | undefined {\n\treturn (target as CustomElementConstructorWithMetadata)[CUSTOM_ELEMENT_TAG_NAME];\n}\n",
|
|
10
|
-
"
|
|
11
|
-
"import type { ReactiveProperty } from '../core/reactive-prop-core';\nimport type { ReactivePropDefinition } from '../core/reactive-prop-metadata';\nimport { writeAttributeValue } from '../utils/attribute-utils';\nimport { escapeHtmlAttribute } from '../utils/escape-html-attribute';\n\n/**\n * Minimal host shape needed by the attribute serialization policy.\n *\n * This interface defines the narrow contract that the serialization module\n * consumes, keeping it independent of the full {@link RadiantElementSsrHost}.\n */\nexport type HostAttributeSource = {\n\tgetReactiveProperties: () => ReactiveProperty[];\n\tgetReactivePropDefinitions: () => ReactivePropDefinition[];\n\tgetPropertyValue: (name: string) => unknown;\n\tgetAttributeNames: () => string[];\n\tgetAttribute: (name: string) => string | null;\n};\n\n/**\n * Resolves the final set of SSR host attributes from a Radiant Element Host.\n *\n * ## Source precedence (highest to lowest)\n *\n * 1. **Reactive properties** — legacy attribute reflection via `property.converter`.\n * These are already-registered reactive properties with established converters.\n * Falsy values (`undefined`, `null`, `false`) are omitted.\n *\n * 2. **Reactive prop definitions** — decorator-based definitions. Skipped when the\n * target attribute name was already emitted by source 1 (dedup via `seenAttributes`).\n * Uses `writeAttributeValue` for type-aware conversion.\n *\n * 3. **Authored attributes** — raw host-level attributes from the original markup.\n * These always win if present, regardless of whether sources 1 or 2 already\n * set the same name. This preserves explicit author intent in templates.\n *\n * @param host Host shape providing reactive state and attribute accessors.\n * @returns Flat record of attribute name → serialized value.\n */\nexport function resolveHostAttributes(host: HostAttributeSource): Record<string, string> {\n\tconst attributes: Record<string, string> = {};\n\tconst seenAttributes = new Set<string>();\n\n\tappendReactivePropertyAttributes(host, attributes, seenAttributes);\n\tappendReactivePropDefinitionAttributes(host, attributes, seenAttributes);\n\tappendAuthoredAttributes(host, attributes);\n\n\treturn attributes;\n}\n\n/**\n * Serializes a flat attribute record into an HTML attribute string.\n *\n * Each entry becomes ` name=\"escaped-value\"` with the leading space included.\n * The combined string is safe for direct interpolation into an opening tag.\n *\n * @param attributes Flat attribute record to serialize.\n * @returns HTML attribute string.\n */\nexport function stringifyHostAttributes(attributes: Record<string, string>): string {\n\treturn Object.entries(attributes)\n\t\t.map(([name, value]) => ` ${name}=\"${escapeHtmlAttribute(value)}\"`)\n\t\t.join('');\n}\n\n/**\n * Source 1: Reactive properties with established converters.\n *\n * Falsy runtime values are omitted — they should not appear as attributes\n * in SSR output.\n */\nfunction appendReactivePropertyAttributes(\n\thost: HostAttributeSource,\n\tattributes: Record<string, string>,\n\tseenAttributes: Set<string>,\n): void {\n\tfor (const property of host.getReactiveProperties()) {\n\t\tconst currentValue = host.getPropertyValue(property.name);\n\t\tif (currentValue === undefined || currentValue === null || currentValue === false) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tattributes[property.attribute] = String(property.converter.toAttribute(currentValue));\n\t\tseenAttributes.add(property.attribute);\n\t}\n}\n\n/**\n * Source 2: Decorator-based reactive prop definitions.\n *\n * Skipped when the attribute name was already emitted by source 1, preventing\n * duplicate or conflicting attribute values.\n */\nfunction appendReactivePropDefinitionAttributes(\n\thost: HostAttributeSource,\n\tattributes: Record<string, string>,\n\tseenAttributes: Set<string>,\n): void {\n\tfor (const definition of host.getReactivePropDefinitions()) {\n\t\tconst attributeName = definition.options.attribute ?? definition.name;\n\n\t\tif (seenAttributes.has(attributeName)) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tconst currentValue = host.getPropertyValue(definition.name);\n\n\t\tif (currentValue === undefined || currentValue === null || currentValue === false) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tattributes[attributeName] = String(writeAttributeValue(currentValue, definition.options.type));\n\t\tseenAttributes.add(attributeName);\n\t}\n}\n\n/**\n * Source 3: Authored attributes from the original markup.\n *\n * These always overwrite — when an author explicitly sets an attribute in\n * markup, that intent takes precedence over reactive property reflection.\n */\nfunction appendAuthoredAttributes(host: HostAttributeSource, attributes: Record<string, string>): void {\n\tfor (const attributeName of host.getAttributeNames()) {\n\t\tconst attributeValue = host.getAttribute(attributeName);\n\t\tif (attributeValue !== null) {\n\t\t\tattributes[attributeName] = attributeValue;\n\t\t}\n\t}\n}\n\n",
|
|
11
|
+
"import type { ReactiveProperty } from '../core/reactive-prop-core';\nimport type { ReactivePropDefinition } from '../core/reactive-prop-metadata';\nimport { writeAttributeValue } from '../utils/attribute-utils';\nimport { escapeHtmlAttribute } from '../utils/escape-html-attribute';\n\n/**\n * Minimal host shape needed by the attribute serialization policy.\n *\n * This interface defines the narrow contract that the serialization module\n * consumes, keeping it independent of the full {@link RadiantElementSsrHost}.\n */\nexport type HostAttributeSource = {\n\tgetReactiveProperties: () => ReactiveProperty[];\n\tgetReactivePropDefinitions: () => ReactivePropDefinition[];\n\tgetPropertyValue: (name: string) => unknown;\n\tgetAttributeNames: () => string[];\n\tgetAttribute: (name: string) => string | null;\n};\n\n/**\n * Resolves the final set of SSR host attributes from a Radiant Element Host.\n *\n * ## Source precedence (highest to lowest)\n *\n * 1. **Reactive properties** — legacy attribute reflection via `property.converter`.\n * These are already-registered reactive properties with established converters.\n * Falsy values (`undefined`, `null`, `false`) are omitted.\n *\n * 2. **Reactive prop definitions** — decorator-based definitions. Skipped when the\n * target attribute name was already emitted by source 1 (dedup via `seenAttributes`).\n * Uses `writeAttributeValue` for type-aware conversion.\n *\n * 3. **Authored attributes** — raw host-level attributes from the original markup.\n * These always win if present, regardless of whether sources 1 or 2 already\n * set the same name. This preserves explicit author intent in templates.\n *\n * @param host Host shape providing reactive state and attribute accessors.\n * @returns Flat record of attribute name → serialized value.\n */\nexport function resolveHostAttributes(host: HostAttributeSource): Record<string, string> {\n\tconst attributes: Record<string, string> = {};\n\tconst seenAttributes = new Set<string>();\n\n\tappendReactivePropertyAttributes(host, attributes, seenAttributes);\n\tappendReactivePropDefinitionAttributes(host, attributes, seenAttributes);\n\tappendAuthoredAttributes(host, attributes);\n\n\treturn attributes;\n}\n\n/**\n * Serializes a flat attribute record into an HTML attribute string.\n *\n * Each entry becomes ` name=\"escaped-value\"` with the leading space included.\n * The combined string is safe for direct interpolation into an opening tag.\n *\n * @param attributes Flat attribute record to serialize.\n * @returns HTML attribute string.\n */\nexport function stringifyHostAttributes(attributes: Record<string, string>): string {\n\treturn Object.entries(attributes)\n\t\t.map(([name, value]) => ` ${name}=\"${escapeHtmlAttribute(value)}\"`)\n\t\t.join('');\n}\n\n/**\n * Source 1: Reactive properties with established converters.\n *\n * Falsy runtime values are omitted — they should not appear as attributes\n * in SSR output.\n */\nfunction appendReactivePropertyAttributes(\n\thost: HostAttributeSource,\n\tattributes: Record<string, string>,\n\tseenAttributes: Set<string>,\n): void {\n\tfor (const property of host.getReactiveProperties()) {\n\t\tconst currentValue = host.getPropertyValue(property.name);\n\t\tif (currentValue === undefined || currentValue === null || currentValue === false) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tattributes[property.attribute] = String(property.converter.toAttribute(currentValue));\n\t\tseenAttributes.add(property.attribute);\n\t}\n}\n\n/**\n * Source 2: Decorator-based reactive prop definitions.\n *\n * Skipped when the attribute name was already emitted by source 1, preventing\n * duplicate or conflicting attribute values.\n */\nfunction appendReactivePropDefinitionAttributes(\n\thost: HostAttributeSource,\n\tattributes: Record<string, string>,\n\tseenAttributes: Set<string>,\n): void {\n\tfor (const definition of host.getReactivePropDefinitions()) {\n\t\tconst attributeName = definition.options.attribute ?? definition.name;\n\n\t\tif (seenAttributes.has(attributeName)) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tconst currentValue = host.getPropertyValue(definition.name);\n\n\t\tif (currentValue === undefined || currentValue === null || currentValue === false) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tattributes[attributeName] = String(writeAttributeValue(currentValue, definition.options.type));\n\t\tseenAttributes.add(attributeName);\n\t}\n}\n\n/**\n * Source 3: Authored attributes from the original markup.\n *\n * These always overwrite — when an author explicitly sets an attribute in\n * markup, that intent takes precedence over reactive property reflection.\n */\nfunction appendAuthoredAttributes(host: HostAttributeSource, attributes: Record<string, string>): void {\n\tfor (const attributeName of host.getAttributeNames()) {\n\t\tconst attributeValue = host.getAttribute(attributeName);\n\t\tif (attributeValue !== null) {\n\t\t\tattributes[attributeName] = attributeValue;\n\t\t}\n\t}\n}\n",
|
|
12
12
|
"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",
|
|
13
13
|
"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",
|
|
14
14
|
"/**\n * Host script composition for Radiant SSR.\n *\n * This module owns the mode-sensitive ordering and inclusion rules for the\n * script payloads that appear inside a server-rendered Element Host.\n *\n * ## Composition rules\n *\n * | Mode | Order |\n * |-----------|-----------------------------------------------------------------|\n * | `plain` | view content → authored hydration markup → slot projection |\n * | `hydrate` | view content → slot projection → hydration binding scripts |\n *\n * In **plain** mode, authored hydration markup (script tags pre-authored on the\n * host) is preserved because the component may rely on them for standalone\n * behavior. Hydration binding scripts are omitted because there is no client\n * hydrator to consume them.\n *\n * In **hydrate** mode, authored hydration markup is superseded by the formal\n * hydration binding scripts. Slot projection comes before hydration scripts so\n * the client can reconstruct projected content before binding recovery.\n */\n\n/** Individual content parts that make up a server-rendered host's inner HTML. */\nexport type HostContentParts = {\n\t/** The rendered view HTML from `renderViewToString`. */\n\thostContent: string;\n\t/** Authored hydration script markup pre-existing on the host, if any. */\n\tauthoredHydrationMarkup: string;\n\t/** Slot projection JSON payload script tag, if any. */\n\tslotProjectionScript: string;\n\t/** Hydration binding script tags for client-side recovery, if any. */\n\thydrationScripts: string;\n};\n\n/**\n * Assembles the inner HTML of a server-rendered Element Host from its\n * individual content parts, respecting the mode-sensitive ordering rules.\n *\n * @param parts Individual content parts to compose.\n * @param hydrate Whether the output targets client-side hydration.\n * @returns Assembled inner HTML string.\n */\nexport function composeHostContent(parts: HostContentParts, hydrate: boolean): string {\n\tif (!hydrate) {\n\t\treturn `${parts.hostContent}${parts.authoredHydrationMarkup}${parts.slotProjectionScript}`;\n\t}\n\n\treturn `${parts.hostContent}${parts.slotProjectionScript}${parts.hydrationScripts}`;\n}\n",
|
|
15
15
|
"import type { JsxRenderable } from '@ecopages/jsx';\nimport type { RenderToStringOptions } from '@ecopages/jsx/server';\nimport type { SsrSerializableContextProvider } from '../context/context-provider';\nimport type { ReactiveProperty } from './reactive-prop-core';\nimport type { ReactivePropDefinition } from './reactive-prop-metadata';\nimport type { SsrSerializableHydrationBinding } from './ssr-hydration-binding';\n\n/**\n * Unified SSR host shape shared by core resolution and server serialization.\n */\nexport type InternalRadiantSsrHost = {\n\tconstructor: CustomElementConstructor;\n\tgetAttribute(name: string): string | null;\n\tgetAttributeNames(): string[];\n\tgetAuthoredHydrationScriptMarkup?: () => string | undefined;\n\tgetContextProviders: () => SsrSerializableContextProvider[];\n\tgetHydrationBindings: () => SsrSerializableHydrationBinding[];\n\tgetReactiveProperties: () => ReactiveProperty[];\n\tgetReactivePropDefinitions: () => ReactivePropDefinition[];\n\tgetPropertyValue: (name: string) => unknown;\n\tgetSlotProjectionScriptTag?: () => string | undefined;\n\tresolveTrackedRenderOutput: () => { containsSlots: boolean; value: JsxRenderable };\n\trenderViewToString: (options?: RenderToStringOptions) => string;\n};\n\nexport type RadiantElementSsrHostSource = InternalRadiantSsrHost;\n\nexport function resolveRadiantElementSsrHostSource(component: object): InternalRadiantSsrHost | undefined {\n\tif (isInternalRadiantSsrHost(component)) {\n\t\treturn component;\n\t}\n\n\treturn undefined;\n}\n\nexport function isInternalRadiantSsrHost(component: object): component is InternalRadiantSsrHost {\n\treturn (\n\t\ttypeof component.constructor === 'function' &&\n\t\ttypeof (component as { getAttribute?: unknown }).getAttribute === 'function' &&\n\t\ttypeof (component as { getAttributeNames?: unknown }).getAttributeNames === 'function' &&\n\t\ttypeof (component as { getAuthoredHydrationScriptMarkup?: unknown }).getAuthoredHydrationScriptMarkup ===\n\t\t\t'function' &&\n\t\ttypeof (component as { getContextProviders?: unknown }).getContextProviders === 'function' &&\n\t\ttypeof (component as { getHydrationBindings?: unknown }).getHydrationBindings === 'function' &&\n\t\ttypeof (component as { getReactiveProperties?: unknown }).getReactiveProperties === 'function' &&\n\t\ttypeof (component as { getSlotProjectionScriptTag?: unknown }).getSlotProjectionScriptTag === 'function' &&\n\t\ttypeof (component as { resolveTrackedRenderOutput?: unknown }).resolveTrackedRenderOutput === 'function' &&\n\t\ttypeof (component as { renderViewToString?: unknown }).renderViewToString === 'function'\n\t);\n}\n",
|
|
16
|
-
"import { getReactivePropDefinitions } from '../core/reactive-prop-metadata';\nimport { resolveRadiantElementSsrHostSource } from '../core/radiant-element-ssr-host';\nimport type { InternalRadiantSsrHost } from './internal-radiant-host';\n\nexport function toInternalRadiantSsrHost(component: object): InternalRadiantSsrHost {\n\tconst source = resolveRadiantElementSsrHostSource(component);\n\n\tif (!source) {\n\t\tthrow new Error('Radiant SSR runtime requires a server extraction host shape on the component.');\n\t}\n\n\treturn {\n\t\tconstructor: source.constructor,\n\t\tgetAttribute: (name) => source.getAttribute(name),\n\t\tgetAttributeNames: () => source.getAttributeNames(),\n\t\tgetAuthoredHydrationScriptMarkup: () => source.getAuthoredHydrationScriptMarkup?.(),\n\t\tgetContextProviders: () => source.getContextProviders(),\n\t\tgetHydrationBindings: () => source.getHydrationBindings(),\n\t\tgetReactiveProperties: () => source.getReactiveProperties(),\n\t\tgetReactivePropDefinitions: () => getReactivePropDefinitions(component),\n\t\tgetPropertyValue: (name) => Reflect.get(component, name),\n\t\tgetSlotProjectionScriptTag: () => source.getSlotProjectionScriptTag?.(),\n\t\tresolveTrackedRenderOutput: () => source.resolveTrackedRenderOutput(),\n\t\trenderViewToString: (options) => source.renderViewToString(options),\n\t};\n}\n",
|
|
16
|
+
"import { getReactivePropDefinitions } from '../core/reactive-prop-metadata';\nimport { resolveRadiantElementSsrHostSource } from '../core/radiant-element-ssr-host';\nimport type { InternalRadiantSsrHost } from './internal-radiant-host';\n\nexport function toInternalRadiantSsrHost(component: object): InternalRadiantSsrHost {\n\tconst source = resolveRadiantElementSsrHostSource(component);\n\n\tif (!source) {\n\t\tthrow new Error('Radiant SSR runtime requires a server extraction host shape on the component.');\n\t}\n\n\treturn {\n\t\tconstructor: source.constructor as CustomElementConstructor,\n\t\tgetAttribute: (name) => source.getAttribute(name),\n\t\tgetAttributeNames: () => source.getAttributeNames(),\n\t\tgetAuthoredHydrationScriptMarkup: () => source.getAuthoredHydrationScriptMarkup?.(),\n\t\tgetContextProviders: () => source.getContextProviders(),\n\t\tgetHydrationBindings: () => source.getHydrationBindings(),\n\t\tgetReactiveProperties: () => source.getReactiveProperties(),\n\t\tgetReactivePropDefinitions: () => getReactivePropDefinitions(component),\n\t\tgetPropertyValue: (name) => Reflect.get(component, name),\n\t\tgetSlotProjectionScriptTag: () => source.getSlotProjectionScriptTag?.(),\n\t\tresolveTrackedRenderOutput: () => source.resolveTrackedRenderOutput(),\n\t\trenderViewToString: (options) => source.renderViewToString(options),\n\t};\n}\n",
|
|
17
17
|
"import type { JsxRenderable } from '@ecopages/jsx';\nimport type { RenderToStringOptions } from '@ecopages/jsx/server';\nimport { getCustomElementTagName } from '../core/custom-element-metadata';\nimport { withSsrContextProviders } from './context-ssr';\nimport { composeHostContent } from './host-script-composition';\nimport { resolveHostAttributes, stringifyHostAttributes } from './host-attribute-serialization';\nimport { ensureLegacyHostReady } from '../decorators/legacy/host-readiness';\nimport { toInternalRadiantSsrHost } from './radiant-element-ssr-extractor';\nimport type { InternalRadiantSsrHost } from '../core/radiant-element-ssr-host';\n\nexport class RadiantElementSsrService {\n\tprivate readonly component: object;\n\tprivate readonly host: InternalRadiantSsrHost;\n\n\tconstructor(component: object) {\n\t\tthis.component = component;\n\t\tthis.host = toInternalRadiantSsrHost(component);\n\t}\n\n\tprivate ensureReady(): void {\n\t\tensureLegacyHostReady(this.component, 'ssr');\n\t}\n\n\tpublic renderHost(): JsxRenderable {\n\t\tthis.ensureReady();\n\n\t\treturn {\n\t\t\tnodeType: 1,\n\t\t\touterHTML: this.renderHostToString({ mode: 'hydrate' }),\n\t\t};\n\t}\n\n\tpublic renderHostToString(options: RenderToStringOptions = {}, attributes = this.getHostAttributes()): string {\n\t\tthis.ensureReady();\n\t\tconst tagName = this.getTagName();\n\t\tconst restoreSsrContexts = withSsrContextProviders(this.host.getContextProviders());\n\n\t\ttry {\n\t\t\treturn `<${tagName}${stringifyHostAttributes(attributes)}>${this.renderHostContent(options)}</${tagName}>`;\n\t\t} finally {\n\t\t\trestoreSsrContexts();\n\t\t}\n\t}\n\n\tpublic getHostAttributes(): Record<string, string> {\n\t\tthis.ensureReady();\n\t\treturn resolveHostAttributes(this.host);\n\t}\n\n\tprivate renderHostContent(options: RenderToStringOptions): string {\n\t\tconst hydrate = options.mode === 'hydrate' || (options.mode === undefined && options.hydrate === true);\n\n\t\tconst hydrationScripts = hydrate\n\t\t\t? this.host\n\t\t\t\t\t.getHydrationBindings()\n\t\t\t\t\t.map((binding) => binding.renderHydrationScriptTag())\n\t\t\t\t\t.filter((markup): markup is string => typeof markup === 'string')\n\t\t\t\t\t.join('')\n\t\t\t: '';\n\n\t\treturn composeHostContent(\n\t\t\t{\n\t\t\t\thostContent: this.host.renderViewToString(options),\n\t\t\t\tauthoredHydrationMarkup: this.host.getAuthoredHydrationScriptMarkup?.() ?? '',\n\t\t\t\tslotProjectionScript: this.host.getSlotProjectionScriptTag?.() ?? '',\n\t\t\t\thydrationScripts,\n\t\t\t},\n\t\t\thydrate,\n\t\t);\n\t}\n\n\tprivate getTagName(): string {\n\t\tconst tagName = getCustomElementTagName(this.host.constructor);\n\n\t\tif (!tagName) {\n\t\t\tthrow new Error(`${this.host.constructor.name} is missing @customElement metadata.`);\n\t\t}\n\n\t\treturn tagName;\n\t}\n}\n"
|
|
18
18
|
],
|
|
19
|
-
"mappings": "
|
|
20
|
-
"debugId": "
|
|
19
|
+
"mappings": "o0BACO,SAAS,CAAmB,CAAC,EAAuB,CAC1D,OAAO,EAAM,QAAQ,KAAM,OAAO,EAAE,QAAQ,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AK,WAAW,EAC1B,EAAqB,EAAwB,KAAK,KAAK,oBAAoB,CAAC,EAElF,GAAI,CACH,MAAO,IAAI,IAAU,EAAwB,CAAU,KAAK,KAAK,kBAAkB,CAAO,MAAM,YAC/F,CACD,EAAmB,GAId,iBAAiB,EAA2B,CAElD,OADA,KAAK,YAAY,EACV,EAAsB,KAAK,IAAI,EAG/B,iBAAiB,CAAC,EAAwC,CACjE,IAAM,EAAU,EAAQ,OAAS,WAAc,EAAQ,OAAS,QAAa,EAAQ,UAAY,GAE3F,EAAmB,EACtB,KAAK,KACJ,qBAAqB,EACrB,IAAI,CAAC,IAAY,EAAQ,yBAAyB,CAAC,EACnD,OAAO,CAAC,IAA6B,OAAO,IAAW,QAAQ,EAC/D,KAAK,EAAE,EACR,GAEH,OAAO,EACN,CACC,YAAa,KAAK,KAAK,mBAAmB,CAAO,EACjD,wBAAyB,KAAK,KAAK,mCAAmC,GAAK,GAC3E,qBAAsB,KAAK,KAAK,6BAA6B,GAAK,GAClE,kBACD,EACA,CACD,EAGO,UAAU,EAAW,CAC5B,IAAM,EAAU,EAAwB,KAAK,KAAK,WAAW,EAE7D,GAAI,CAAC,EACJ,MAAU,MAAM,GAAG,KAAK,KAAK,YAAY,0CAA0C,EAGpF,OAAO,EAET",
|
|
20
|
+
"debugId": "FD5B670481765E7264756E2164756E21",
|
|
21
21
|
"names": []
|
|
22
22
|
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
var{defineProperty:X,getOwnPropertyNames:QR,getOwnPropertyDescriptor:ZR}=Object,$R=Object.prototype.hasOwnProperty;function FR(R){return this[R]}var yR=(R)=>{var P=(O??=new WeakMap).get(R),q;if(P)return P;if(P=X({},"__esModule",{value:!0}),R&&typeof R==="object"||typeof R==="function"){for(var D of QR(R))if(!$R.call(P,D))X(P,D,{get:FR.bind(R,D),enumerable:!(q=ZR(R,D))||q.enumerable})}return O.set(R,P),P},O;var HR=(R)=>R;function JR(R,P){this[R]=HR.bind(null,P)}var mR=(R,P)=>{for(var q in P)X(R,q,{get:P[q],enumerable:!0,configurable:!0,set:JR.bind(P,q)})};var lR=(R,P)=>()=>(R&&(P=R(R=0)),P);var jR=((R)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(R,{get:(P,q)=>(typeof require<"u"?require:P)[q]}):R)(function(R){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+R+'" is not supported')});function h(R){return R.replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">")}var U=Symbol.for("@ecopages/radiant.reactivePropDefinitions");function uR(R,P,q){let D=R.constructor,W=D[U]??[];if(W.some((Q)=>Q.name===P))return;W.push({name:P,options:q}),D[U]=W}function C(R){return(R.constructor[U]??[]).slice()}var x=Symbol.for("@ecopages/radiant.legacy-instance-initializers"),I=Symbol.for("@ecopages/radiant.legacy-post-construction-initializers"),GR=Symbol.for("@ecopages/radiant.legacy-executed-post-construction-initializers");function pR(R,P){M(R,x,P)}function sR(R,P){M(R,I,P)}function k(R){XR(R,x)}function Y(R,P){let q=R;UR(R,P,q[GR]??=new Set)}function M(R,P,q){let D=R,W=Object.prototype.hasOwnProperty.call(D,P)?D[P]:void 0;if(Array.isArray(W)){W.push(q);return}Object.defineProperty(D,P,{value:[q]})}function XR(R,P){YR(R,(q)=>{let D=q[P];if(!Array.isArray(D))return;for(let W of D)W(R)})}function UR(R,P,q){for(let D of f(R)){let W=D[I];if(!Array.isArray(W))continue;for(let Q of W){if(q.has(Q))continue;Q(R,P),q.add(Q)}}}function f(R){let P=[],q=Object.getPrototypeOf(R);while(q&&q!==Object.prototype)P.unshift(q),q=Object.getPrototypeOf(q);return P}function YR(R,P){for(let q of f(R))P(q)}function g(R,P){switch(P){case"construct":k(R);break;case"connect":Y(R,"connect");break;case"ssr":Y(R,"ssr");break}}function N(R){switch(R){case Array:return"array";case Boolean:return"boolean";case Number:return"number";case Object:return"object";case String:return"string"}}function BR(R){switch(typeof R){case"boolean":return"boolean";case"number":return"number";case"string":return"string"}if(Array.isArray(R))return"array";if(Object.prototype.toString.call(R)==="[object Object]")return"object"}function ER(R){switch(R){case Number:return 0;case String:return"";case Boolean:return!1;default:return null}}function KR(R){try{return JSON.parse(R)}catch{throw TypeError("Invalid JSON string")}}var wR={array(R){let P=KR(R);if(!Array.isArray(P))throw TypeError(`Expected an array but got a value of type "${typeof P}"`);return P},boolean(R){return!(R==="0"||String(R).toLowerCase()==="false")},number(R){return Number(R.replace(/_/g,""))},object(R){let P=JSON.parse(R);if(P===null||typeof P!=="object"||Array.isArray(P))throw TypeError(`expected value of type "object" but instead got value "${R}" of type "${BR(P)}"`);return P},string(R){return R}},L={default:z,array:T,object:T};function T(R){return JSON.stringify(R)}function z(R){return`${R}`}function _(R,P){let q=N(P);if(!q)throw TypeError(`[radiant-element] Unknown type "${P}"`);return wR[q](R)}function A(R,P){let q=N(P);if(!q)throw TypeError(`[radiant-element] Unknown type "${P}"`);return(L[q]??L.default??z)(R)}function OR(R){return typeof R==="boolean"}function CR(R){return typeof R==="number"}function xR(R){return typeof R==="string"}function IR(R){return Array.isArray(R)}function kR(R){return typeof R==="object"&&!Array.isArray(R)&&R!==null}function nR(R,P){switch(R){case Boolean:return OR(P);case Number:return CR(P);case String:return xR(P);case Array:return IR(P);case Object:return kR(P);default:return!1}}var eR=(R,P,q,D)=>{if(P===Boolean){let Q=R.getAttribute(q);if(Q===null)return D;return Q===""?!0:_(Q,P)}let W=R.getAttribute(q);return W!==null?_(W,P):D??ER(P)};import{getActiveSsrScopeValue as MR,withActiveSsrScopeValue as fR}from"@ecopages/jsx/server";var S=Symbol.for("@ecopages/radiant.element-ssr-runtime");function PP(){return MR(S)}function V(R,P){return fR(S,R,P)}var v=Symbol.for("@ecopages/radiant.customElementTagName");function DP(R,P){R[v]=P}function b(R){return R[v]}function d(R){let P={},q=new Set;return LR(R,P,q),TR(R,P,q),_R(R,P),P}function y(R){return Object.entries(R).map(([P,q])=>` ${P}="${h(q)}"`).join("")}function LR(R,P,q){for(let D of R.getReactiveProperties()){let W=R.getPropertyValue(D.name);if(W===void 0||W===null||W===!1)continue;P[D.attribute]=String(D.converter.toAttribute(W)),q.add(D.attribute)}}function TR(R,P,q){for(let D of R.getReactivePropDefinitions()){let W=D.options.attribute??D.name;if(q.has(W))continue;let Q=R.getPropertyValue(D.name);if(Q===void 0||Q===null||Q===!1)continue;P[W]=String(A(Q,D.options.type)),q.add(W)}}function _R(R,P){for(let q of R.getAttributeNames()){let D=R.getAttribute(q);if(D!==null)P[q]=D}}var m=Symbol.for("@ecopages/radiant.ssr-context-provider-resolver");function l(){return globalThis}function c(R){l()[m]=R}function HP(R){return l()[m]?.(R)}var F;function i(){if(F!==void 0)return F;try{let{AsyncLocalStorage:R}=(()=>{throw new Error("Cannot require module "+"node:async_hooks");})();return F=new R,F}catch{return F=null,null}}var u=Symbol.for("@ecopages/radiant.ssr-context-fallback-stack");function p(){let R=globalThis;return R[u]??=[],R[u]}function s(R){if(R.length===0)return()=>{return};let P=new Map;for(let W of R)P.set(W.getContextKey(),W);let q=i();if(q){let W=q.getStore()??[],Q=[...W,P];return q.enterWith(Q),()=>{q.enterWith(W)}}let D=p();return D.push(P),()=>{let W=D.lastIndexOf(P);if(W>=0)D.splice(W,1)}}function r(R){let P=i()?.getStore()??p();for(let q=P.length-1;q>=0;q-=1){let D=P[q]?.get(R);if(D)return D}return}function GP(R){let P=r(R);if(!P)return;return P.getContext()}c((R)=>r(R));function a(R,P){if(!P)return`${R.hostContent}${R.authoredHydrationMarkup}${R.slotProjectionScript}`;return`${R.hostContent}${R.slotProjectionScript}${R.hydrationScripts}`}function $(R){if(NR(R))return R;return}function NR(R){return typeof R.constructor==="function"&&typeof R.getAttribute==="function"&&typeof R.getAttributeNames==="function"&&typeof R.getAuthoredHydrationScriptMarkup==="function"&&typeof R.getContextProviders==="function"&&typeof R.getHydrationBindings==="function"&&typeof R.getReactiveProperties==="function"&&typeof R.getSlotProjectionScriptTag==="function"&&typeof R.resolveTrackedRenderOutput==="function"&&typeof R.renderViewToString==="function"}function o(R){let P=$(R);if(!P)throw Error("Radiant SSR runtime requires a server extraction host shape on the component.");return{constructor:P.constructor,getAttribute:(q)=>P.getAttribute(q),getAttributeNames:()=>P.getAttributeNames(),getAuthoredHydrationScriptMarkup:()=>P.getAuthoredHydrationScriptMarkup?.(),getContextProviders:()=>P.getContextProviders(),getHydrationBindings:()=>P.getHydrationBindings(),getReactiveProperties:()=>P.getReactiveProperties(),getReactivePropDefinitions:()=>C(R),getPropertyValue:(q)=>Reflect.get(R,q),getSlotProjectionScriptTag:()=>P.getSlotProjectionScriptTag?.(),resolveTrackedRenderOutput:()=>P.resolveTrackedRenderOutput(),renderViewToString:(q)=>P.renderViewToString(q)}}class B{component;host;constructor(R){this.component=R,this.host=o(R)}ensureReady(){g(this.component,"ssr")}renderHost(){return this.ensureReady(),{nodeType:1,outerHTML:this.renderHostToString({mode:"hydrate"})}}renderHostToString(R={},P=this.getHostAttributes()){this.ensureReady();let q=this.getTagName(),D=s(this.host.getContextProviders());try{return`<${q}${y(P)}>${this.renderHostContent(R)}</${q}>`}finally{D()}}getHostAttributes(){return this.ensureReady(),d(this.host)}renderHostContent(R){let P=R.mode==="hydrate"||R.mode===void 0&&R.hydrate===!0,q=P?this.host.getHydrationBindings().map((D)=>D.renderHydrationScriptTag()).filter((D)=>typeof D==="string").join(""):"";return a({hostContent:this.host.renderViewToString(R),authoredHydrationMarkup:this.host.getAuthoredHydrationScriptMarkup?.()??"",slotProjectionScript:this.host.getSlotProjectionScriptTag?.()??"",hydrationScripts:q},P)}getTagName(){let R=b(this.host.constructor);if(!R)throw Error(`${this.host.constructor.name} is missing @customElement metadata.`);return R}}import{renderToString as zR}from"@ecopages/jsx/server";import{createServerHydrationBindingState as n,isServerRenderHydrationActive as e,withForcedServerCustomElementRendering as AR,withServerCustomElementRenderHook as SR,withServerHydrationBindingState as t}from"@ecopages/jsx/server";var j;function E(R){return new B(R)}function H(R){return{nodeType:1,outerHTML:Z(R,{mode:"hydrate"})}}function VR(R){if(J(R))return H(R);if(!G(R))return;return R.renderHost?.()??{nodeType:1,outerHTML:R.renderHostToString({mode:"hydrate"})}}function Z(R,P={}){return w(()=>E(R).renderHostToString(P,K(R)))}function vR(R,P={}){if(J(R))return Z(R,P);if(!G(R))return;return R.renderHostToString(P)}function bR(R,P){if(J(R))return H(R);if(!G(R))return;return R.renderHost?.()??{nodeType:1,outerHTML:P}}function RR(R,P={}){return w(()=>qR(()=>zR(DR(R).value,P)))}function K(R){return E(R).getHostAttributes()}function PR(R){if(!J(R))return;return{renderHost:()=>H(R),renderHostToString:(P)=>Z(R,P)}}function hR(R){return $(R)}function qR(R){return AR(()=>SR(({instance:P})=>{if(J(P))return{nodeType:1,get outerHTML(){let D=e(),W={hydrate:D,mode:D?"hydrate":"plain"};if(!D)return Z(P,W);return t(n(),()=>Z(P,W))}};if(!G(P))return;let q=P;return{nodeType:1,get outerHTML(){let D=e();if(!D)return q.renderHostToString({hydrate:D,mode:D?"hydrate":"plain"});return t(n(),()=>q.renderHostToString({hydrate:D,mode:D?"hydrate":"plain"}))}}},R))}function DR(R){if(dR(R))return R.resolveTrackedRenderOutput();let P=$(R);if(!P)throw Error("Radiant SSR runtime requires tracked render output support on the component.");return P.resolveTrackedRenderOutput()}function J(R){if(typeof R!=="object"||R===null)return!1;return $(R)!==void 0}function G(R){if(typeof R!=="object"||R===null)return!1;return typeof R.renderHostToString==="function"}function dR(R){if(typeof R!=="object"||R===null)return!1;return typeof R.resolveTrackedRenderOutput==="function"}function WR(){if(j)return j;return j={getHostAttributes:K,renderHost:H,renderHostToString:Z,resolveRenderBridge:PR,renderView:RR},j}function w(R){return V(WR(),R)}export{w as withServerRadiantElementSsrRuntime,qR as withRadiantServerCustomElementRenderBridge,bR as resolveRegisteredRadiantElementPreview,hR as resolveRadiantElementSsrHostBridge,PR as resolveRadiantElementRenderBridge,vR as renderRegisteredRadiantElementHostToString,VR as renderRegisteredRadiantElementHost,RR as renderRadiantElementViewToString,Z as renderRadiantElementHostToString,H as renderRadiantElementHost,DR as getRadiantElementTrackedRenderOutput,K as getRadiantElementHostSsrAttributes,WR as getOrCreateRadiantElementSsrRuntime,E as createRadiantElementSsrService};
|
|
2
|
+
|
|
3
|
+
//# debugId=F29E80800D56E7A264756E2164756E21
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../src/core/reactive-prop-metadata.ts", "../src/decorators/legacy/instance-initializers.ts", "../src/decorators/legacy/host-readiness.ts", "../src/utils/attribute-utils.ts", "../src/core/radiant-element-ssr-registry.ts", "../src/core/custom-element-metadata.ts", "../src/
|
|
3
|
+
"sources": ["../src/utils/escape-html-attribute.ts", "../src/core/reactive-prop-metadata.ts", "../src/decorators/legacy/instance-initializers.ts", "../src/decorators/legacy/host-readiness.ts", "../src/utils/attribute-utils.ts", "../src/core/radiant-element-ssr-registry.ts", "../src/core/custom-element-metadata.ts", "../src/server/host-attribute-serialization.ts", "../src/context/context-ssr-bridge.ts", "../src/server/context-ssr.ts", "../src/server/host-script-composition.ts", "../src/core/radiant-element-ssr-host.ts", "../src/server/radiant-element-ssr-extractor.ts", "../src/server/radiant-element-ssr-service.ts", "../src/server/radiant-element-ssr-bridge.ts"],
|
|
4
4
|
"sourcesContent": [
|
|
5
|
+
"/** Escapes a string for safe interpolation inside a double-quoted HTML attribute value. */\nexport function escapeHtmlAttribute(value: string): string {\n\treturn value.replace(/&/g, '&').replace(/\"/g, '"').replace(/</g, '<').replace(/>/g, '>');\n}\n",
|
|
5
6
|
"import type { ReactivePropertyOptions } from './reactive-prop-core';\n\nconst REACTIVE_PROP_DEFINITIONS = Symbol.for('@ecopages/radiant.reactivePropDefinitions');\n\nexport type ReactivePropDefinition = {\n\tname: string;\n\toptions: ReactivePropertyOptions<unknown>;\n};\n\ntype RadiantConstructorWithReactiveProps = CustomElementConstructor & {\n\t[REACTIVE_PROP_DEFINITIONS]?: ReactivePropDefinition[];\n};\n\nexport function registerReactivePropDefinition(\n\ttarget: object,\n\tpropertyName: string,\n\toptions: ReactivePropertyOptions<unknown>,\n): void {\n\tconst constructor = target.constructor as RadiantConstructorWithReactiveProps;\n\tconst definitions = constructor[REACTIVE_PROP_DEFINITIONS] ?? [];\n\n\tif (definitions.some((definition) => definition.name === propertyName)) {\n\t\treturn;\n\t}\n\n\tdefinitions.push({ name: propertyName, options });\n\tconstructor[REACTIVE_PROP_DEFINITIONS] = definitions;\n}\n\nexport function getReactivePropDefinitions(target: object): ReactivePropDefinition[] {\n\treturn ((target.constructor as RadiantConstructorWithReactiveProps)[REACTIVE_PROP_DEFINITIONS] ?? []).slice();\n}\n",
|
|
6
|
-
"type LegacyInstanceInitializer<T extends object = object> = (instance: T) => void;\n\nconst LEGACY_INSTANCE_INITIALIZERS = Symbol.for('@ecopages/radiant.legacy-instance-initializers');\nconst LEGACY_POST_CONSTRUCTION_INITIALIZERS = Symbol.for('@ecopages/radiant.legacy-post-construction-initializers');\nconst LEGACY_EXECUTED_POST_CONSTRUCTION_INITIALIZERS = Symbol.for(\n\t'@ecopages/radiant.legacy-executed-post-construction-initializers',\n);\n\n/**\n * Registers per-instance initialization work for a legacy decorator.\n *\n * Legacy decorators execute against the prototype, so any initialization that\n * needs the concrete element instance must be deferred until construction time.\n */\nexport function registerLegacyInstanceInitializer<T extends object>(\n\tproto: T,\n\tinitializer: LegacyInstanceInitializer<T>,\n): void {\n\tregisterInitializer(proto, LEGACY_INSTANCE_INITIALIZERS, initializer);\n}\n\n/**\n * Registers post-construction work for a legacy decorator.\n *\n * This phase exists for decorators that eagerly write instance fields. With\n * legacy decorators plus `useDefineForClassFields`, subclass field definition\n * can overwrite values written during the base-class constructor.\n */\nexport function registerLegacyPostConstructionInitializer<T extends object>(\n\tproto: T,\n\tinitializer:
|
|
7
|
-
"import {
|
|
7
|
+
"export type LegacyPostConstructionPhase = 'connect' | 'ssr';\n\ntype LegacyInstanceInitializer<T extends object = object> = (instance: T) => void;\ntype LegacyPostConstructionInitializer<T extends object = object> = (\n\tinstance: T,\n\tphase: LegacyPostConstructionPhase,\n) => void;\n\nconst LEGACY_INSTANCE_INITIALIZERS = Symbol.for('@ecopages/radiant.legacy-instance-initializers');\nconst LEGACY_POST_CONSTRUCTION_INITIALIZERS = Symbol.for('@ecopages/radiant.legacy-post-construction-initializers');\nconst LEGACY_EXECUTED_POST_CONSTRUCTION_INITIALIZERS = Symbol.for(\n\t'@ecopages/radiant.legacy-executed-post-construction-initializers',\n);\n\n/**\n * Registers per-instance initialization work for a legacy decorator.\n *\n * Legacy decorators execute against the prototype, so any initialization that\n * needs the concrete element instance must be deferred until construction time.\n */\nexport function registerLegacyInstanceInitializer<T extends object>(\n\tproto: T,\n\tinitializer: LegacyInstanceInitializer<T>,\n): void {\n\tregisterInitializer(proto, LEGACY_INSTANCE_INITIALIZERS, initializer);\n}\n\n/**\n * Registers post-construction work for a legacy decorator.\n *\n * This phase exists for decorators that eagerly write instance fields. With\n * legacy decorators plus `useDefineForClassFields`, subclass field definition\n * can overwrite values written during the base-class constructor.\n */\nexport function registerLegacyPostConstructionInitializer<T extends object>(\n\tproto: T,\n\tinitializer: LegacyPostConstructionInitializer<T>,\n): void {\n\tregisterInitializer(proto, LEGACY_POST_CONSTRUCTION_INITIALIZERS, initializer);\n}\n\n/**\n * Runs all legacy decorator initializers for a newly constructed element.\n *\n * Initializers are collected from the prototype chain and executed from base to\n * derived class so inherited setup remains stable.\n */\nexport function runLegacyInstanceInitializers<T extends object>(instance: T): void {\n\trunLegacyInitializers(instance, LEGACY_INSTANCE_INITIALIZERS);\n}\n\n/**\n * Runs legacy decorator setup that must happen after subclass field\n * initialization has completed.\n *\n * Each initializer runs at most once per instance even if multiple lifecycle\n * entrypoints call this helper.\n */\nexport function runLegacyPostConstructionInitializers<T extends object>(\n\tinstance: T,\n\tphase: LegacyPostConstructionPhase,\n): void {\n\tconst target = instance as Record<PropertyKey, unknown>;\n\n\trunLegacyPostConstructionInitializersOnPrototypeChain(\n\t\tinstance,\n\t\tphase,\n\t\t(target[LEGACY_EXECUTED_POST_CONSTRUCTION_INITIALIZERS] ??= new Set()) as Set<\n\t\t\tLegacyPostConstructionInitializer<T>\n\t\t>,\n\t);\n}\n\nfunction registerInitializer<T extends object>(\n\tproto: T,\n\tkey: symbol,\n\tinitializer: LegacyInstanceInitializer<T> | LegacyPostConstructionInitializer<T>,\n): void {\n\tconst target = proto as Record<PropertyKey, unknown>;\n\tconst ownInitializers = Object.prototype.hasOwnProperty.call(target, key) ? target[key] : undefined;\n\n\tif (Array.isArray(ownInitializers)) {\n\t\townInitializers.push(initializer);\n\t\treturn;\n\t}\n\n\tObject.defineProperty(target, key, {\n\t\tvalue: [initializer],\n\t});\n}\n\nfunction runLegacyInitializers<T extends object>(instance: T, key: symbol): void {\n\twalkPrototypeChain(instance, (prototype) => {\n\t\tconst initializers = (prototype as Record<PropertyKey, unknown>)[key] as\n\t\t\tLegacyInstanceInitializer<T>[] | undefined;\n\n\t\tif (!Array.isArray(initializers)) {\n\t\t\treturn;\n\t\t}\n\n\t\tfor (const initializer of initializers) {\n\t\t\tinitializer(instance);\n\t\t}\n\t});\n}\n\nfunction runLegacyPostConstructionInitializersOnPrototypeChain<T extends object>(\n\tinstance: T,\n\tphase: LegacyPostConstructionPhase,\n\texecutedInitializers: Set<LegacyPostConstructionInitializer<T>>,\n): void {\n\tfor (const prototype of collectPrototypeChain(instance)) {\n\t\tconst initializers = (prototype as Record<PropertyKey, unknown>)[LEGACY_POST_CONSTRUCTION_INITIALIZERS] as\n\t\t\tLegacyPostConstructionInitializer<T>[] | undefined;\n\n\t\tif (!Array.isArray(initializers)) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tfor (const initializer of initializers) {\n\t\t\tif (executedInitializers.has(initializer)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tinitializer(instance, phase);\n\t\t\texecutedInitializers.add(initializer);\n\t\t}\n\t}\n}\n\nfunction collectPrototypeChain<T extends object>(instance: T): object[] {\n\tconst prototypes: object[] = [];\n\tlet prototype: object | null = Object.getPrototypeOf(instance);\n\n\twhile (prototype && prototype !== Object.prototype) {\n\t\tprototypes.unshift(prototype);\n\t\tprototype = Object.getPrototypeOf(prototype);\n\t}\n\n\treturn prototypes;\n}\n\nfunction walkPrototypeChain<T extends object>(instance: T, visit: (prototype: object) => void): void {\n\tfor (const prototype of collectPrototypeChain(instance)) {\n\t\tvisit(prototype);\n\t}\n}\n",
|
|
8
|
+
"import { runLegacyInstanceInitializers, runLegacyPostConstructionInitializers } from './instance-initializers';\n\nexport type LegacyHostReadinessPhase = 'construct' | 'connect' | 'ssr';\n\n/**\n * Runs legacy decorator initialization for the requested lifecycle phase.\n *\n * Post-construction work is idempotent — multiple calls with `connect` or `ssr`\n * only execute each registered initializer once per instance.\n */\nexport function ensureLegacyHostReady<T extends object>(host: T, phase: LegacyHostReadinessPhase): void {\n\tswitch (phase) {\n\t\tcase 'construct':\n\t\t\trunLegacyInstanceInitializers(host);\n\t\t\tbreak;\n\t\tcase 'connect':\n\t\t\trunLegacyPostConstructionInitializers(host, 'connect');\n\t\t\tbreak;\n\t\tcase 'ssr':\n\t\t\trunLegacyPostConstructionInitializers(host, 'ssr');\n\t\t\tbreak;\n\t}\n}\n",
|
|
8
9
|
"import type { RadiantElement } from '../core/radiant-element';\n\nexport type AttributeTypeConstant = typeof Array | typeof Boolean | typeof Number | typeof Object | typeof String;\n\nexport type AttributeTypeDefault = Array<unknown> | boolean | number | Record<string, unknown> | string;\n\n/**\n * Parses the given attribute type constant and returns its corresponding string representation.\n *\n * @param constant - The attribute type constant to parse.\n * @returns The string representation of the attribute type constant.\n */\nexport function parseAttributeTypeConstant(constant?: AttributeTypeConstant) {\n\tswitch (constant) {\n\t\tcase Array:\n\t\t\treturn 'array';\n\t\tcase Boolean:\n\t\t\treturn 'boolean';\n\t\tcase Number:\n\t\t\treturn 'number';\n\t\tcase Object:\n\t\t\treturn 'object';\n\t\tcase String:\n\t\t\treturn 'string';\n\t}\n}\n\n/**\n * Parses the attribute type default value and returns its type as a string.\n *\n * @param defaultValue - The default value of the attribute type.\n * @returns The type of the default value as a string.\n */\nexport function parseAttributeTypeDefault(defaultValue?: AttributeTypeDefault) {\n\tswitch (typeof defaultValue) {\n\t\tcase 'boolean':\n\t\t\treturn 'boolean';\n\t\tcase 'number':\n\t\t\treturn 'number';\n\t\tcase 'string':\n\t\t\treturn 'string';\n\t}\n\n\tif (Array.isArray(defaultValue)) return 'array';\n\tif (Object.prototype.toString.call(defaultValue) === '[object Object]') return 'object';\n}\n\n/**\n * Returns the default value for a given attribute type.\n *\n * @param type - The attribute type constant.\n * @returns The default value for the specified attribute type.\n */\nexport function defaultValueForType(type: AttributeTypeConstant): unknown {\n\tswitch (type) {\n\t\tcase Number:\n\t\t\treturn 0;\n\t\tcase String:\n\t\t\treturn '';\n\t\tcase Boolean:\n\t\t\treturn false;\n\t\tdefault:\n\t\t\treturn null;\n\t}\n}\n\ntype Reader = (value: string) => number | string | boolean | object | unknown[];\n\n/**\n * Utility function to parse a JSON string safely\n */\nfunction parseJSON<T>(value: string): T {\n\ttry {\n\t\treturn JSON.parse(value);\n\t} catch {\n\t\tthrow new TypeError('Invalid JSON string');\n\t}\n}\n\n/**\n * Object that maps attribute types to reader functions.\n * @type {Object.<string, Reader>}\n */\nconst readers: { [type: string]: Reader } = {\n\tarray(value: string): unknown[] {\n\t\tconst array = parseJSON<unknown[]>(value);\n\t\tif (!Array.isArray(array)) {\n\t\t\tthrow new TypeError(`Expected an array but got a value of type \"${typeof array}\"`);\n\t\t}\n\t\treturn array;\n\t},\n\n\tboolean(value: string): boolean {\n\t\treturn !(value === '0' || String(value).toLowerCase() === 'false');\n\t},\n\n\tnumber(value: string): number {\n\t\tconst number = Number(value.replace(/_/g, ''));\n\t\treturn number;\n\t},\n\n\tobject(value: string): object {\n\t\tconst object = JSON.parse(value);\n\t\tif (object === null || typeof object !== 'object' || Array.isArray(object)) {\n\t\t\tthrow new TypeError(\n\t\t\t\t`expected value of type \"object\" but instead got value \"${value}\" of type \"${parseAttributeTypeDefault(\n\t\t\t\t\tobject,\n\t\t\t\t)}\"`,\n\t\t\t);\n\t\t}\n\t\treturn object;\n\t},\n\n\tstring(value: string): string {\n\t\treturn value;\n\t},\n};\n\ntype Writer = (value: unknown) => string;\n\n/**\n * Object that maps attribute types to writer functions.\n * @type {Object.<string, Writer>}\n */\nconst writers: { [type: string]: Writer } = {\n\tdefault: writeString,\n\tarray: writeJSON,\n\tobject: writeJSON,\n};\n\nfunction writeJSON(value: unknown) {\n\treturn JSON.stringify(value);\n}\n\nfunction writeString(value: unknown) {\n\treturn `${value}`;\n}\n\n/**\n * Reads the attribute value based on the provided type.\n * @param value - The attribute value to be read.\n * @param type - The type of the attribute.\n * @returns The parsed attribute value.\n * @throws {TypeError} If the provided type is unknown.\n */\nexport function readAttributeValue(value: string, type: AttributeTypeConstant) {\n\tconst readerType = parseAttributeTypeConstant(type);\n\tif (!readerType) throw new TypeError(`[radiant-element] Unknown type \"${type}\"`);\n\treturn readers[readerType]!(value);\n}\n\nexport type ReadAttributeValueReturnType = ReturnType<typeof readAttributeValue>;\n\n/**\n * Writes the attribute value based on the provided type.\n *\n * @param value - The value to be written.\n * @param type - The type of the attribute.\n * @returns The written attribute value.\n * @throws {TypeError} If the provided type is unknown.\n */\nexport function writeAttributeValue(value: unknown, type: AttributeTypeConstant) {\n\tconst writerType = parseAttributeTypeConstant(type);\n\tif (!writerType) throw new TypeError(`[radiant-element] Unknown type \"${type}\"`);\n\tconst writer: Writer = writers[writerType] ?? writers.default ?? writeString;\n\treturn writer(value);\n}\n\nexport type WriteAttributeValueReturnType = ReturnType<typeof writeAttributeValue>;\n\n/*\n * Type guard functions for each type in AttributeTypeConstant\n */\nfunction isBoolean(value: unknown): value is boolean {\n\treturn typeof value === 'boolean';\n}\n\nfunction isNumber(value: unknown): value is number {\n\treturn typeof value === 'number';\n}\n\nfunction isString(value: unknown): value is string {\n\treturn typeof value === 'string';\n}\n\nfunction isArray(value: unknown): value is Array<unknown> {\n\treturn Array.isArray(value);\n}\n\nfunction isObject(value: unknown): value is object {\n\treturn typeof value === 'object' && !Array.isArray(value) && value !== null;\n}\n\n/*\n * Check function to ensure defaultValue matches the type\n */\nexport function isValueOfType(type: AttributeTypeConstant, defaultValue: unknown): boolean {\n\tswitch (type) {\n\t\tcase Boolean:\n\t\t\treturn isBoolean(defaultValue);\n\t\tcase Number:\n\t\t\treturn isNumber(defaultValue);\n\t\tcase String:\n\t\t\treturn isString(defaultValue);\n\t\tcase Array:\n\t\t\treturn isArray(defaultValue);\n\t\tcase Object:\n\t\t\treturn isObject(defaultValue);\n\t\tdefault:\n\t\t\treturn false;\n\t}\n}\n\nexport const getInitialValue = (\n\ttarget: RadiantElement,\n\ttype: AttributeTypeConstant,\n\tattributeKey: string,\n\tdefaultValue: unknown,\n) => {\n\tif (type === Boolean) {\n\t\tconst attributeValue = target.getAttribute(attributeKey);\n\t\tif (attributeValue === null) {\n\t\t\treturn defaultValue;\n\t\t}\n\n\t\treturn attributeValue === '' ? true : readAttributeValue(attributeValue, type);\n\t}\n\n\tconst attributeValue = target.getAttribute(attributeKey);\n\treturn attributeValue !== null\n\t\t? readAttributeValue(attributeValue, type)\n\t\t: (defaultValue ?? (defaultValueForType(type) as typeof defaultValue));\n};\n",
|
|
9
|
-
"import type { JsxRenderable } from '@ecopages/jsx';\nimport { getActiveSsrScopeValue, type RenderToStringOptions, withActiveSsrScopeValue } from '@ecopages/jsx/server';\nimport type { InternalRadiantSsrHost } from './radiant-element-ssr-host';\n\nexport type RadiantElementRenderBridge = {\n\trenderHost?: () => JsxRenderable;\n\trenderHostToString?: (options?: RenderToStringOptions) => string;\n};\n\nexport type RadiantElementServerRenderSsrCapable = InternalRadiantSsrHost;\n\nexport type RadiantElementTrackedRenderSsrCapable =
|
|
10
|
+
"import type { JsxRenderable } from '@ecopages/jsx';\nimport { getActiveSsrScopeValue, type RenderToStringOptions, withActiveSsrScopeValue } from '@ecopages/jsx/server';\nimport type { InternalRadiantSsrHost } from './radiant-element-ssr-host';\n\nexport type RadiantElementRenderBridge = {\n\trenderHost?: () => JsxRenderable;\n\trenderHostToString?: (options?: RenderToStringOptions) => string;\n};\n\nexport type RadiantElementServerRenderSsrCapable = Omit<InternalRadiantSsrHost, 'constructor'> & {\n\tconstructor: Function;\n};\n\nexport type RadiantElementTrackedRenderSsrCapable = RadiantElementServerRenderSsrCapable;\n\nexport type RadiantElementSsrRuntime = {\n\tgetHostAttributes(component: InternalRadiantSsrHost): Record<string, string>;\n\trenderHost(component: InternalRadiantSsrHost): JsxRenderable;\n\trenderHostToString(component: InternalRadiantSsrHost, options?: RenderToStringOptions): string;\n\tresolveRenderBridge(component: object): RadiantElementRenderBridge | undefined;\n\trenderView(component: InternalRadiantSsrHost, options?: RenderToStringOptions): string;\n};\n\nconst RADIANT_ELEMENT_SSR_RUNTIME_SYMBOL = Symbol.for('@ecopages/radiant.element-ssr-runtime');\n\nexport function getRadiantElementSsrRuntime(): RadiantElementSsrRuntime | undefined {\n\treturn getActiveSsrScopeValue<RadiantElementSsrRuntime>(RADIANT_ELEMENT_SSR_RUNTIME_SYMBOL);\n}\n\nexport function withRadiantElementSsrRuntime<T>(runtime: RadiantElementSsrRuntime, render: () => T): T {\n\treturn withActiveSsrScopeValue(RADIANT_ELEMENT_SSR_RUNTIME_SYMBOL, runtime, render);\n}\n",
|
|
10
11
|
"export const CUSTOM_ELEMENT_TAG_NAME = Symbol.for('@ecopages/radiant.customElementTagName');\n\ntype CustomElementConstructorWithMetadata = CustomElementConstructor & {\n\t[CUSTOM_ELEMENT_TAG_NAME]?: string;\n};\n\n/**\n * Sets the custom element tag name for a given constructor.\n * This is used internally to associate a class with its custom element tag, which is necessary for features like hydration and SSR support.\n * @param target The constructor of the custom element.\n * @param tagName The tag name to associate with the custom element.\n */\nexport function setCustomElementTagName(target: CustomElementConstructor, tagName: string): void {\n\t(target as CustomElementConstructorWithMetadata)[CUSTOM_ELEMENT_TAG_NAME] = tagName;\n}\n\n/**\n * Retrieves the custom element tag name associated with a given constructor.\n * @param target The constructor of the custom element.\n * @returns The tag name associated with the custom element, or `undefined` if not set.\n */\nexport function getCustomElementTagName(target: CustomElementConstructor): string | undefined {\n\treturn (target as CustomElementConstructorWithMetadata)[CUSTOM_ELEMENT_TAG_NAME];\n}\n",
|
|
11
|
-
"
|
|
12
|
-
"import type { ReactiveProperty } from '../core/reactive-prop-core';\nimport type { ReactivePropDefinition } from '../core/reactive-prop-metadata';\nimport { writeAttributeValue } from '../utils/attribute-utils';\nimport { escapeHtmlAttribute } from '../utils/escape-html-attribute';\n\n/**\n * Minimal host shape needed by the attribute serialization policy.\n *\n * This interface defines the narrow contract that the serialization module\n * consumes, keeping it independent of the full {@link RadiantElementSsrHost}.\n */\nexport type HostAttributeSource = {\n\tgetReactiveProperties: () => ReactiveProperty[];\n\tgetReactivePropDefinitions: () => ReactivePropDefinition[];\n\tgetPropertyValue: (name: string) => unknown;\n\tgetAttributeNames: () => string[];\n\tgetAttribute: (name: string) => string | null;\n};\n\n/**\n * Resolves the final set of SSR host attributes from a Radiant Element Host.\n *\n * ## Source precedence (highest to lowest)\n *\n * 1. **Reactive properties** — legacy attribute reflection via `property.converter`.\n * These are already-registered reactive properties with established converters.\n * Falsy values (`undefined`, `null`, `false`) are omitted.\n *\n * 2. **Reactive prop definitions** — decorator-based definitions. Skipped when the\n * target attribute name was already emitted by source 1 (dedup via `seenAttributes`).\n * Uses `writeAttributeValue` for type-aware conversion.\n *\n * 3. **Authored attributes** — raw host-level attributes from the original markup.\n * These always win if present, regardless of whether sources 1 or 2 already\n * set the same name. This preserves explicit author intent in templates.\n *\n * @param host Host shape providing reactive state and attribute accessors.\n * @returns Flat record of attribute name → serialized value.\n */\nexport function resolveHostAttributes(host: HostAttributeSource): Record<string, string> {\n\tconst attributes: Record<string, string> = {};\n\tconst seenAttributes = new Set<string>();\n\n\tappendReactivePropertyAttributes(host, attributes, seenAttributes);\n\tappendReactivePropDefinitionAttributes(host, attributes, seenAttributes);\n\tappendAuthoredAttributes(host, attributes);\n\n\treturn attributes;\n}\n\n/**\n * Serializes a flat attribute record into an HTML attribute string.\n *\n * Each entry becomes ` name=\"escaped-value\"` with the leading space included.\n * The combined string is safe for direct interpolation into an opening tag.\n *\n * @param attributes Flat attribute record to serialize.\n * @returns HTML attribute string.\n */\nexport function stringifyHostAttributes(attributes: Record<string, string>): string {\n\treturn Object.entries(attributes)\n\t\t.map(([name, value]) => ` ${name}=\"${escapeHtmlAttribute(value)}\"`)\n\t\t.join('');\n}\n\n/**\n * Source 1: Reactive properties with established converters.\n *\n * Falsy runtime values are omitted — they should not appear as attributes\n * in SSR output.\n */\nfunction appendReactivePropertyAttributes(\n\thost: HostAttributeSource,\n\tattributes: Record<string, string>,\n\tseenAttributes: Set<string>,\n): void {\n\tfor (const property of host.getReactiveProperties()) {\n\t\tconst currentValue = host.getPropertyValue(property.name);\n\t\tif (currentValue === undefined || currentValue === null || currentValue === false) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tattributes[property.attribute] = String(property.converter.toAttribute(currentValue));\n\t\tseenAttributes.add(property.attribute);\n\t}\n}\n\n/**\n * Source 2: Decorator-based reactive prop definitions.\n *\n * Skipped when the attribute name was already emitted by source 1, preventing\n * duplicate or conflicting attribute values.\n */\nfunction appendReactivePropDefinitionAttributes(\n\thost: HostAttributeSource,\n\tattributes: Record<string, string>,\n\tseenAttributes: Set<string>,\n): void {\n\tfor (const definition of host.getReactivePropDefinitions()) {\n\t\tconst attributeName = definition.options.attribute ?? definition.name;\n\n\t\tif (seenAttributes.has(attributeName)) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tconst currentValue = host.getPropertyValue(definition.name);\n\n\t\tif (currentValue === undefined || currentValue === null || currentValue === false) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tattributes[attributeName] = String(writeAttributeValue(currentValue, definition.options.type));\n\t\tseenAttributes.add(attributeName);\n\t}\n}\n\n/**\n * Source 3: Authored attributes from the original markup.\n *\n * These always overwrite — when an author explicitly sets an attribute in\n * markup, that intent takes precedence over reactive property reflection.\n */\nfunction appendAuthoredAttributes(host: HostAttributeSource, attributes: Record<string, string>): void {\n\tfor (const attributeName of host.getAttributeNames()) {\n\t\tconst attributeValue = host.getAttribute(attributeName);\n\t\tif (attributeValue !== null) {\n\t\t\tattributes[attributeName] = attributeValue;\n\t\t}\n\t}\n}\n\n",
|
|
12
|
+
"import type { ReactiveProperty } from '../core/reactive-prop-core';\nimport type { ReactivePropDefinition } from '../core/reactive-prop-metadata';\nimport { writeAttributeValue } from '../utils/attribute-utils';\nimport { escapeHtmlAttribute } from '../utils/escape-html-attribute';\n\n/**\n * Minimal host shape needed by the attribute serialization policy.\n *\n * This interface defines the narrow contract that the serialization module\n * consumes, keeping it independent of the full {@link RadiantElementSsrHost}.\n */\nexport type HostAttributeSource = {\n\tgetReactiveProperties: () => ReactiveProperty[];\n\tgetReactivePropDefinitions: () => ReactivePropDefinition[];\n\tgetPropertyValue: (name: string) => unknown;\n\tgetAttributeNames: () => string[];\n\tgetAttribute: (name: string) => string | null;\n};\n\n/**\n * Resolves the final set of SSR host attributes from a Radiant Element Host.\n *\n * ## Source precedence (highest to lowest)\n *\n * 1. **Reactive properties** — legacy attribute reflection via `property.converter`.\n * These are already-registered reactive properties with established converters.\n * Falsy values (`undefined`, `null`, `false`) are omitted.\n *\n * 2. **Reactive prop definitions** — decorator-based definitions. Skipped when the\n * target attribute name was already emitted by source 1 (dedup via `seenAttributes`).\n * Uses `writeAttributeValue` for type-aware conversion.\n *\n * 3. **Authored attributes** — raw host-level attributes from the original markup.\n * These always win if present, regardless of whether sources 1 or 2 already\n * set the same name. This preserves explicit author intent in templates.\n *\n * @param host Host shape providing reactive state and attribute accessors.\n * @returns Flat record of attribute name → serialized value.\n */\nexport function resolveHostAttributes(host: HostAttributeSource): Record<string, string> {\n\tconst attributes: Record<string, string> = {};\n\tconst seenAttributes = new Set<string>();\n\n\tappendReactivePropertyAttributes(host, attributes, seenAttributes);\n\tappendReactivePropDefinitionAttributes(host, attributes, seenAttributes);\n\tappendAuthoredAttributes(host, attributes);\n\n\treturn attributes;\n}\n\n/**\n * Serializes a flat attribute record into an HTML attribute string.\n *\n * Each entry becomes ` name=\"escaped-value\"` with the leading space included.\n * The combined string is safe for direct interpolation into an opening tag.\n *\n * @param attributes Flat attribute record to serialize.\n * @returns HTML attribute string.\n */\nexport function stringifyHostAttributes(attributes: Record<string, string>): string {\n\treturn Object.entries(attributes)\n\t\t.map(([name, value]) => ` ${name}=\"${escapeHtmlAttribute(value)}\"`)\n\t\t.join('');\n}\n\n/**\n * Source 1: Reactive properties with established converters.\n *\n * Falsy runtime values are omitted — they should not appear as attributes\n * in SSR output.\n */\nfunction appendReactivePropertyAttributes(\n\thost: HostAttributeSource,\n\tattributes: Record<string, string>,\n\tseenAttributes: Set<string>,\n): void {\n\tfor (const property of host.getReactiveProperties()) {\n\t\tconst currentValue = host.getPropertyValue(property.name);\n\t\tif (currentValue === undefined || currentValue === null || currentValue === false) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tattributes[property.attribute] = String(property.converter.toAttribute(currentValue));\n\t\tseenAttributes.add(property.attribute);\n\t}\n}\n\n/**\n * Source 2: Decorator-based reactive prop definitions.\n *\n * Skipped when the attribute name was already emitted by source 1, preventing\n * duplicate or conflicting attribute values.\n */\nfunction appendReactivePropDefinitionAttributes(\n\thost: HostAttributeSource,\n\tattributes: Record<string, string>,\n\tseenAttributes: Set<string>,\n): void {\n\tfor (const definition of host.getReactivePropDefinitions()) {\n\t\tconst attributeName = definition.options.attribute ?? definition.name;\n\n\t\tif (seenAttributes.has(attributeName)) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tconst currentValue = host.getPropertyValue(definition.name);\n\n\t\tif (currentValue === undefined || currentValue === null || currentValue === false) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tattributes[attributeName] = String(writeAttributeValue(currentValue, definition.options.type));\n\t\tseenAttributes.add(attributeName);\n\t}\n}\n\n/**\n * Source 3: Authored attributes from the original markup.\n *\n * These always overwrite — when an author explicitly sets an attribute in\n * markup, that intent takes precedence over reactive property reflection.\n */\nfunction appendAuthoredAttributes(host: HostAttributeSource, attributes: Record<string, string>): void {\n\tfor (const attributeName of host.getAttributeNames()) {\n\t\tconst attributeValue = host.getAttribute(attributeName);\n\t\tif (attributeValue !== null) {\n\t\t\tattributes[attributeName] = attributeValue;\n\t\t}\n\t}\n}\n",
|
|
13
13
|
"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",
|
|
14
14
|
"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",
|
|
15
15
|
"/**\n * Host script composition for Radiant SSR.\n *\n * This module owns the mode-sensitive ordering and inclusion rules for the\n * script payloads that appear inside a server-rendered Element Host.\n *\n * ## Composition rules\n *\n * | Mode | Order |\n * |-----------|-----------------------------------------------------------------|\n * | `plain` | view content → authored hydration markup → slot projection |\n * | `hydrate` | view content → slot projection → hydration binding scripts |\n *\n * In **plain** mode, authored hydration markup (script tags pre-authored on the\n * host) is preserved because the component may rely on them for standalone\n * behavior. Hydration binding scripts are omitted because there is no client\n * hydrator to consume them.\n *\n * In **hydrate** mode, authored hydration markup is superseded by the formal\n * hydration binding scripts. Slot projection comes before hydration scripts so\n * the client can reconstruct projected content before binding recovery.\n */\n\n/** Individual content parts that make up a server-rendered host's inner HTML. */\nexport type HostContentParts = {\n\t/** The rendered view HTML from `renderViewToString`. */\n\thostContent: string;\n\t/** Authored hydration script markup pre-existing on the host, if any. */\n\tauthoredHydrationMarkup: string;\n\t/** Slot projection JSON payload script tag, if any. */\n\tslotProjectionScript: string;\n\t/** Hydration binding script tags for client-side recovery, if any. */\n\thydrationScripts: string;\n};\n\n/**\n * Assembles the inner HTML of a server-rendered Element Host from its\n * individual content parts, respecting the mode-sensitive ordering rules.\n *\n * @param parts Individual content parts to compose.\n * @param hydrate Whether the output targets client-side hydration.\n * @returns Assembled inner HTML string.\n */\nexport function composeHostContent(parts: HostContentParts, hydrate: boolean): string {\n\tif (!hydrate) {\n\t\treturn `${parts.hostContent}${parts.authoredHydrationMarkup}${parts.slotProjectionScript}`;\n\t}\n\n\treturn `${parts.hostContent}${parts.slotProjectionScript}${parts.hydrationScripts}`;\n}\n",
|
|
16
16
|
"import type { JsxRenderable } from '@ecopages/jsx';\nimport type { RenderToStringOptions } from '@ecopages/jsx/server';\nimport type { SsrSerializableContextProvider } from '../context/context-provider';\nimport type { ReactiveProperty } from './reactive-prop-core';\nimport type { ReactivePropDefinition } from './reactive-prop-metadata';\nimport type { SsrSerializableHydrationBinding } from './ssr-hydration-binding';\n\n/**\n * Unified SSR host shape shared by core resolution and server serialization.\n */\nexport type InternalRadiantSsrHost = {\n\tconstructor: CustomElementConstructor;\n\tgetAttribute(name: string): string | null;\n\tgetAttributeNames(): string[];\n\tgetAuthoredHydrationScriptMarkup?: () => string | undefined;\n\tgetContextProviders: () => SsrSerializableContextProvider[];\n\tgetHydrationBindings: () => SsrSerializableHydrationBinding[];\n\tgetReactiveProperties: () => ReactiveProperty[];\n\tgetReactivePropDefinitions: () => ReactivePropDefinition[];\n\tgetPropertyValue: (name: string) => unknown;\n\tgetSlotProjectionScriptTag?: () => string | undefined;\n\tresolveTrackedRenderOutput: () => { containsSlots: boolean; value: JsxRenderable };\n\trenderViewToString: (options?: RenderToStringOptions) => string;\n};\n\nexport type RadiantElementSsrHostSource = InternalRadiantSsrHost;\n\nexport function resolveRadiantElementSsrHostSource(component: object): InternalRadiantSsrHost | undefined {\n\tif (isInternalRadiantSsrHost(component)) {\n\t\treturn component;\n\t}\n\n\treturn undefined;\n}\n\nexport function isInternalRadiantSsrHost(component: object): component is InternalRadiantSsrHost {\n\treturn (\n\t\ttypeof component.constructor === 'function' &&\n\t\ttypeof (component as { getAttribute?: unknown }).getAttribute === 'function' &&\n\t\ttypeof (component as { getAttributeNames?: unknown }).getAttributeNames === 'function' &&\n\t\ttypeof (component as { getAuthoredHydrationScriptMarkup?: unknown }).getAuthoredHydrationScriptMarkup ===\n\t\t\t'function' &&\n\t\ttypeof (component as { getContextProviders?: unknown }).getContextProviders === 'function' &&\n\t\ttypeof (component as { getHydrationBindings?: unknown }).getHydrationBindings === 'function' &&\n\t\ttypeof (component as { getReactiveProperties?: unknown }).getReactiveProperties === 'function' &&\n\t\ttypeof (component as { getSlotProjectionScriptTag?: unknown }).getSlotProjectionScriptTag === 'function' &&\n\t\ttypeof (component as { resolveTrackedRenderOutput?: unknown }).resolveTrackedRenderOutput === 'function' &&\n\t\ttypeof (component as { renderViewToString?: unknown }).renderViewToString === 'function'\n\t);\n}\n",
|
|
17
|
-
"import { getReactivePropDefinitions } from '../core/reactive-prop-metadata';\nimport { resolveRadiantElementSsrHostSource } from '../core/radiant-element-ssr-host';\nimport type { InternalRadiantSsrHost } from './internal-radiant-host';\n\nexport function toInternalRadiantSsrHost(component: object): InternalRadiantSsrHost {\n\tconst source = resolveRadiantElementSsrHostSource(component);\n\n\tif (!source) {\n\t\tthrow new Error('Radiant SSR runtime requires a server extraction host shape on the component.');\n\t}\n\n\treturn {\n\t\tconstructor: source.constructor,\n\t\tgetAttribute: (name) => source.getAttribute(name),\n\t\tgetAttributeNames: () => source.getAttributeNames(),\n\t\tgetAuthoredHydrationScriptMarkup: () => source.getAuthoredHydrationScriptMarkup?.(),\n\t\tgetContextProviders: () => source.getContextProviders(),\n\t\tgetHydrationBindings: () => source.getHydrationBindings(),\n\t\tgetReactiveProperties: () => source.getReactiveProperties(),\n\t\tgetReactivePropDefinitions: () => getReactivePropDefinitions(component),\n\t\tgetPropertyValue: (name) => Reflect.get(component, name),\n\t\tgetSlotProjectionScriptTag: () => source.getSlotProjectionScriptTag?.(),\n\t\tresolveTrackedRenderOutput: () => source.resolveTrackedRenderOutput(),\n\t\trenderViewToString: (options) => source.renderViewToString(options),\n\t};\n}\n",
|
|
17
|
+
"import { getReactivePropDefinitions } from '../core/reactive-prop-metadata';\nimport { resolveRadiantElementSsrHostSource } from '../core/radiant-element-ssr-host';\nimport type { InternalRadiantSsrHost } from './internal-radiant-host';\n\nexport function toInternalRadiantSsrHost(component: object): InternalRadiantSsrHost {\n\tconst source = resolveRadiantElementSsrHostSource(component);\n\n\tif (!source) {\n\t\tthrow new Error('Radiant SSR runtime requires a server extraction host shape on the component.');\n\t}\n\n\treturn {\n\t\tconstructor: source.constructor as CustomElementConstructor,\n\t\tgetAttribute: (name) => source.getAttribute(name),\n\t\tgetAttributeNames: () => source.getAttributeNames(),\n\t\tgetAuthoredHydrationScriptMarkup: () => source.getAuthoredHydrationScriptMarkup?.(),\n\t\tgetContextProviders: () => source.getContextProviders(),\n\t\tgetHydrationBindings: () => source.getHydrationBindings(),\n\t\tgetReactiveProperties: () => source.getReactiveProperties(),\n\t\tgetReactivePropDefinitions: () => getReactivePropDefinitions(component),\n\t\tgetPropertyValue: (name) => Reflect.get(component, name),\n\t\tgetSlotProjectionScriptTag: () => source.getSlotProjectionScriptTag?.(),\n\t\tresolveTrackedRenderOutput: () => source.resolveTrackedRenderOutput(),\n\t\trenderViewToString: (options) => source.renderViewToString(options),\n\t};\n}\n",
|
|
18
18
|
"import type { JsxRenderable } from '@ecopages/jsx';\nimport type { RenderToStringOptions } from '@ecopages/jsx/server';\nimport { getCustomElementTagName } from '../core/custom-element-metadata';\nimport { withSsrContextProviders } from './context-ssr';\nimport { composeHostContent } from './host-script-composition';\nimport { resolveHostAttributes, stringifyHostAttributes } from './host-attribute-serialization';\nimport { ensureLegacyHostReady } from '../decorators/legacy/host-readiness';\nimport { toInternalRadiantSsrHost } from './radiant-element-ssr-extractor';\nimport type { InternalRadiantSsrHost } from '../core/radiant-element-ssr-host';\n\nexport class RadiantElementSsrService {\n\tprivate readonly component: object;\n\tprivate readonly host: InternalRadiantSsrHost;\n\n\tconstructor(component: object) {\n\t\tthis.component = component;\n\t\tthis.host = toInternalRadiantSsrHost(component);\n\t}\n\n\tprivate ensureReady(): void {\n\t\tensureLegacyHostReady(this.component, 'ssr');\n\t}\n\n\tpublic renderHost(): JsxRenderable {\n\t\tthis.ensureReady();\n\n\t\treturn {\n\t\t\tnodeType: 1,\n\t\t\touterHTML: this.renderHostToString({ mode: 'hydrate' }),\n\t\t};\n\t}\n\n\tpublic renderHostToString(options: RenderToStringOptions = {}, attributes = this.getHostAttributes()): string {\n\t\tthis.ensureReady();\n\t\tconst tagName = this.getTagName();\n\t\tconst restoreSsrContexts = withSsrContextProviders(this.host.getContextProviders());\n\n\t\ttry {\n\t\t\treturn `<${tagName}${stringifyHostAttributes(attributes)}>${this.renderHostContent(options)}</${tagName}>`;\n\t\t} finally {\n\t\t\trestoreSsrContexts();\n\t\t}\n\t}\n\n\tpublic getHostAttributes(): Record<string, string> {\n\t\tthis.ensureReady();\n\t\treturn resolveHostAttributes(this.host);\n\t}\n\n\tprivate renderHostContent(options: RenderToStringOptions): string {\n\t\tconst hydrate = options.mode === 'hydrate' || (options.mode === undefined && options.hydrate === true);\n\n\t\tconst hydrationScripts = hydrate\n\t\t\t? this.host\n\t\t\t\t\t.getHydrationBindings()\n\t\t\t\t\t.map((binding) => binding.renderHydrationScriptTag())\n\t\t\t\t\t.filter((markup): markup is string => typeof markup === 'string')\n\t\t\t\t\t.join('')\n\t\t\t: '';\n\n\t\treturn composeHostContent(\n\t\t\t{\n\t\t\t\thostContent: this.host.renderViewToString(options),\n\t\t\t\tauthoredHydrationMarkup: this.host.getAuthoredHydrationScriptMarkup?.() ?? '',\n\t\t\t\tslotProjectionScript: this.host.getSlotProjectionScriptTag?.() ?? '',\n\t\t\t\thydrationScripts,\n\t\t\t},\n\t\t\thydrate,\n\t\t);\n\t}\n\n\tprivate getTagName(): string {\n\t\tconst tagName = getCustomElementTagName(this.host.constructor);\n\n\t\tif (!tagName) {\n\t\t\tthrow new Error(`${this.host.constructor.name} is missing @customElement metadata.`);\n\t\t}\n\n\t\treturn tagName;\n\t}\n}\n",
|
|
19
19
|
"import type { JsxRenderable } from '@ecopages/jsx';\nimport type { RenderToStringOptions } from '@ecopages/jsx/server';\nimport { renderToString as renderJsxToString } from '@ecopages/jsx/server';\nimport {\n\tcreateServerHydrationBindingState,\n\tisServerRenderHydrationActive,\n\twithForcedServerCustomElementRendering,\n\twithServerCustomElementRenderHook,\n\twithServerHydrationBindingState,\n} from '@ecopages/jsx/server';\nimport { RadiantElementSsrService } from './radiant-element-ssr-service';\nimport { resolveRadiantElementSsrHostSource as resolveInternalRadiantElementSsrHostSource } from '../core/radiant-element-ssr-host';\nimport type {\n\tRadiantElementRenderBridge,\n\tRadiantElementServerRenderSsrCapable,\n\tRadiantElementSsrRuntime,\n\tRadiantElementTrackedRenderSsrCapable,\n} from '../core/radiant-element-ssr-registry';\nimport { withRadiantElementSsrRuntime } from '../core/radiant-element-ssr-registry';\n\nlet radiantElementSsrRuntime: RadiantElementSsrRuntime | undefined;\n\nexport function createRadiantElementSsrService(component: object): RadiantElementSsrService {\n\treturn new RadiantElementSsrService(component);\n}\n\nexport function renderRadiantElementHost(component: RadiantElementServerRenderSsrCapable): JsxRenderable {\n\treturn {\n\t\tnodeType: 1,\n\t\touterHTML: renderRadiantElementHostToString(component, { mode: 'hydrate' }),\n\t};\n}\n\nexport function renderRegisteredRadiantElementHost(component: unknown): JsxRenderable | undefined {\n\tif (isRadiantElementServerRenderable(component)) {\n\t\treturn renderRadiantElementHost(component);\n\t}\n\n\tif (!isLegacyServerRenderable(component)) {\n\t\treturn undefined;\n\t}\n\n\treturn component.renderHost?.() ?? { nodeType: 1, outerHTML: component.renderHostToString({ mode: 'hydrate' }) };\n}\n\nexport function renderRadiantElementHostToString(\n\tcomponent: RadiantElementServerRenderSsrCapable,\n\toptions: RenderToStringOptions = {},\n): string {\n\treturn withServerRadiantElementSsrRuntime(() =>\n\t\tcreateRadiantElementSsrService(component).renderHostToString(\n\t\t\toptions,\n\t\t\tgetRadiantElementHostSsrAttributes(component),\n\t\t),\n\t);\n}\n\nexport function renderRegisteredRadiantElementHostToString(\n\tcomponent: unknown,\n\toptions: RenderToStringOptions = {},\n): string | undefined {\n\tif (isRadiantElementServerRenderable(component)) {\n\t\treturn renderRadiantElementHostToString(component, options);\n\t}\n\n\tif (!isLegacyServerRenderable(component)) {\n\t\treturn undefined;\n\t}\n\n\treturn component.renderHostToString(options);\n}\n\nexport function resolveRegisteredRadiantElementPreview(component: unknown, markup: string): JsxRenderable | undefined {\n\tif (isRadiantElementServerRenderable(component)) {\n\t\treturn renderRadiantElementHost(component);\n\t}\n\n\tif (!isLegacyServerRenderable(component)) {\n\t\treturn undefined;\n\t}\n\n\treturn component.renderHost?.() ?? { nodeType: 1, outerHTML: markup };\n}\n\nexport function renderRadiantElementViewToString(\n\tcomponent: RadiantElementTrackedRenderSsrCapable,\n\toptions: RenderToStringOptions = {},\n): string {\n\treturn withServerRadiantElementSsrRuntime(() =>\n\t\twithRadiantServerCustomElementRenderBridge(() =>\n\t\t\trenderJsxToString(getRadiantElementTrackedRenderOutput(component).value, options),\n\t\t),\n\t);\n}\n\nexport function getRadiantElementHostSsrAttributes(\n\tcomponent: RadiantElementServerRenderSsrCapable,\n): Record<string, string> {\n\treturn createRadiantElementSsrService(component).getHostAttributes();\n}\n\nexport function resolveRadiantElementRenderBridge(component: object): RadiantElementRenderBridge | undefined {\n\tif (!isRadiantElementServerRenderable(component)) {\n\t\treturn undefined;\n\t}\n\n\treturn {\n\t\trenderHost: () => renderRadiantElementHost(component),\n\t\trenderHostToString: (options) => renderRadiantElementHostToString(component, options),\n\t};\n}\n\nexport function resolveRadiantElementSsrHostBridge(component: object): object | undefined {\n\treturn resolveInternalRadiantElementSsrHostSource(component);\n}\n\nexport function withRadiantServerCustomElementRenderBridge<T>(render: () => T): T {\n\treturn withForcedServerCustomElementRendering(() =>\n\t\twithServerCustomElementRenderHook(({ instance }) => {\n\t\t\tif (isRadiantElementServerRenderable(instance)) {\n\t\t\t\treturn {\n\t\t\t\t\tnodeType: 1,\n\t\t\t\t\tget outerHTML() {\n\t\t\t\t\t\tconst hydrate = isServerRenderHydrationActive();\n\t\t\t\t\t\tconst options: RenderToStringOptions = { hydrate, mode: hydrate ? 'hydrate' : 'plain' };\n\n\t\t\t\t\t\tif (!hydrate) {\n\t\t\t\t\t\t\treturn renderRadiantElementHostToString(instance, options);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\treturn withServerHydrationBindingState(createServerHydrationBindingState(), () =>\n\t\t\t\t\t\t\trenderRadiantElementHostToString(instance, options),\n\t\t\t\t\t\t);\n\t\t\t\t\t},\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tif (!isLegacyServerRenderable(instance)) {\n\t\t\t\treturn undefined;\n\t\t\t}\n\n\t\t\tconst legacyInstance: { renderHostToString(options?: RenderToStringOptions): string } = instance;\n\n\t\t\treturn {\n\t\t\t\tnodeType: 1,\n\t\t\t\tget outerHTML() {\n\t\t\t\t\tconst hydrate = isServerRenderHydrationActive();\n\n\t\t\t\t\tif (!hydrate) {\n\t\t\t\t\t\treturn legacyInstance.renderHostToString({ hydrate, mode: hydrate ? 'hydrate' : 'plain' });\n\t\t\t\t\t}\n\n\t\t\t\t\treturn withServerHydrationBindingState(createServerHydrationBindingState(), () =>\n\t\t\t\t\t\tlegacyInstance.renderHostToString({ hydrate, mode: hydrate ? 'hydrate' : 'plain' }),\n\t\t\t\t\t);\n\t\t\t\t},\n\t\t\t};\n\t\t}, render),\n\t);\n}\n\nexport function getRadiantElementTrackedRenderOutput(component: RadiantElementTrackedRenderSsrCapable): {\n\tcontainsSlots: boolean;\n\tvalue: JsxRenderable;\n} {\n\tif (hasTrackedRenderOutput(component)) {\n\t\treturn component.resolveTrackedRenderOutput();\n\t}\n\n\tconst source = resolveInternalRadiantElementSsrHostSource(component);\n\n\tif (!source) {\n\t\tthrow new Error('Radiant SSR runtime requires tracked render output support on the component.');\n\t}\n\n\treturn source.resolveTrackedRenderOutput();\n}\n\nfunction isRadiantElementServerRenderable(component: unknown): component is RadiantElementServerRenderSsrCapable {\n\tif (typeof component !== 'object' || component === null) {\n\t\treturn false;\n\t}\n\n\treturn resolveInternalRadiantElementSsrHostSource(component) !== undefined;\n}\n\nfunction isLegacyServerRenderable(component: unknown): component is {\n\trenderHost?: () => JsxRenderable;\n\trenderHostToString(options?: RenderToStringOptions): string;\n} {\n\tif (typeof component !== 'object' || component === null) {\n\t\treturn false;\n\t}\n\n\treturn typeof (component as { renderHostToString?: unknown }).renderHostToString === 'function';\n}\n\nfunction hasTrackedRenderOutput(component: unknown): component is {\n\tresolveTrackedRenderOutput(): { containsSlots: boolean; value: JsxRenderable };\n} {\n\tif (typeof component !== 'object' || component === null) {\n\t\treturn false;\n\t}\n\n\treturn typeof (component as { resolveTrackedRenderOutput?: unknown }).resolveTrackedRenderOutput === 'function';\n}\n\nexport function getOrCreateRadiantElementSsrRuntime(): RadiantElementSsrRuntime {\n\tif (radiantElementSsrRuntime) {\n\t\treturn radiantElementSsrRuntime;\n\t}\n\n\tradiantElementSsrRuntime = {\n\t\tgetHostAttributes: getRadiantElementHostSsrAttributes,\n\t\trenderHost: renderRadiantElementHost,\n\t\trenderHostToString: renderRadiantElementHostToString,\n\t\tresolveRenderBridge: resolveRadiantElementRenderBridge,\n\t\trenderView: renderRadiantElementViewToString,\n\t};\n\n\treturn radiantElementSsrRuntime;\n}\n\nexport function withServerRadiantElementSsrRuntime<T>(render: () => T): T {\n\treturn withRadiantElementSsrRuntime(getOrCreateRadiantElementSsrRuntime(), render);\n}\n"
|
|
20
20
|
],
|
|
21
|
-
"mappings": "4PAEA,IAAM,EAA4B,OAAO,IAAI,2CAA2C,EAWjF,SAAS,EAA8B,CAC7C,EACA,EACA,EACO,CACP,IAAM,EAAc,EAAO,YACrB,EAAc,EAAY,IAA8B,CAAC,EAE/D,GAAI,EAAY,KAAK,CAAC,IAAe,EAAW,OAAS,CAAY,EACpE,OAGD,EAAY,KAAK,CAAE,KAAM,EAAc,SAAQ,CAAC,EAChD,EAAY,GAA6B,EAGnC,SAAS,CAA0B,CAAC,EAA0C,CACpF,OAAS,EAAO,YAAoD,IAA8B,CAAC,GAAG,MAAM,EC5B7G,IAAM,EAA+B,OAAO,IAAI,gDAAgD,EAC1F,EAAwC,OAAO,IAAI,yDAAyD,EAC5G,GAAiD,OAAO,IAC7D,kEACD,EAQO,SAAS,EAAmD,CAClE,EACA,EACO,CACP,EAAoB,EAAO,EAA8B,CAAW,EAU9D,SAAS,EAA2D,CAC1E,EACA,EACO,CACP,EAAoB,EAAO,EAAuC,CAAW,EASvE,SAAS,CAA+C,CAAC,EAAmB,CAClF,EAAsB,EAAU,CAA4B,EAUtD,SAAS,CAAuD,CAAC,EAAmB,CAC1F,IAAM,EAAS,EAEf,EACC,EACA,EACC,EAAO,MAAoD,IAAI,GACjE,EAGD,SAAS,CAAqC,CAAC,EAAU,EAAa,EAAiD,CACtH,IAAM,EAAS,EACT,EAAkB,OAAO,UAAU,eAAe,KAAK,EAAQ,CAAG,EAAI,EAAO,GAAO,OAE1F,GAAI,MAAM,QAAQ,CAAe,EAAG,CACnC,EAAgB,KAAK,CAAW,EAChC,OAGD,OAAO,eAAe,EAAQ,EAAK,CAClC,MAAO,CAAC,CAAW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IAAc,KAClD,MAAO,GAGR,OAAO,OAAQ,EAAuD,6BAA+B,WAG/F,SAAS,EAAmC,EAA6B,CAC/E,GAAI,EACH,OAAO,EAWR,OARA,EAA2B,CAC1B,kBAAmB,EACnB,WAAY,EACZ,mBAAoB,EACpB,oBAAqB,GACrB,WAAY,EACb,EAEO,EAGD,SAAS,CAAqC,CAAC,EAAoB,CACzE,OAAO,EAA6B,GAAoC,EAAG,CAAM",
|
|
22
|
+
"debugId": "F29E80800D56E7A264756E2164756E21",
|
|
23
23
|
"names": []
|
|
24
24
|
}
|
|
@@ -2,7 +2,7 @@ import type { JsxRenderable } from '@ecopages/jsx';
|
|
|
2
2
|
import type { RenderToStringOptions } from '@ecopages/jsx/server';
|
|
3
3
|
import type { ContextType, UnknownContext } from '../context/types';
|
|
4
4
|
import { type ServerRenderEnvironment } from './light-dom-shim';
|
|
5
|
-
export { createDefaultRenderTimestamp, toRenderedComponentPayload, toRenderedComponentWithPreview } from './render-fragment';
|
|
5
|
+
export { createDefaultRenderTimestamp, toRenderedComponentPayload, toRenderedComponentWithPreview, } from './render-fragment';
|
|
6
6
|
export type RenderedComponentAsset = {
|
|
7
7
|
/** Browser module specifier that must be loaded to activate the fragment. */
|
|
8
8
|
kind: 'script-module';
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
var{defineProperty:u,getOwnPropertyNames:t0,getOwnPropertyDescriptor:o0}=Object,e0=Object.prototype.hasOwnProperty;function ff(f){return this[f]}var xf=(f)=>{var x=($0??=new WeakMap).get(f),P;if(x)return x;if(x=u({},"__esModule",{value:!0}),f&&typeof f==="object"||typeof f==="function"){for(var R of t0(f))if(!e0.call(x,R))u(x,R,{get:ff.bind(f,R),enumerable:!(P=o0(f,R))||P.enumerable})}return $0.set(f,x),x},$0;var Pf=(f)=>f;function Rf(f,x){this[f]=Pf.bind(null,x)}var Ff=(f,x)=>{for(var P in x)u(f,P,{get:x[P],enumerable:!0,configurable:!0,set:Rf.bind(x,P)})};var d=(f,x)=>()=>(f&&(x=f(f=0)),x);var $f=((f)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(f,{get:(x,P)=>(typeof require<"u"?require:x)[P]}):f)(function(f){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+f+'" is not supported')});function I(f){return f.replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">")}function v0(f){let x=[],P=0;while(P<f.length){let R=P;if(f.startsWith("<!--",P)){let q=f.indexOf("-->",P+4);P=q===-1?f.length:q+3,x.push(f.slice(R,P));continue}if(f[P]!=="<"){let q=f.indexOf("<",P);P=q===-1?f.length:q,x.push(f.slice(R,P));continue}let F=w(f,P);if(!F){x.push(f.slice(R));break}if(F.type!=="open"||F.selfClosing||S.has(F.tagName)){P=F.end,x.push(f.slice(R,P));continue}P=F.end;let $=1;while(P<f.length&&$>0){let q=f.indexOf("<",P);if(q===-1){P=f.length;break}let H=w(f,q);if(!H){P=f.length;break}if(P=H.end,H.type==="comment"||H.type==="declaration")continue;if(H.type==="open"&&!H.selfClosing&&!S.has(H.tagName)){$+=1;continue}if(H.type==="close")$-=1}x.push(f.slice(R,P))}return x.filter((R)=>R!=="")}function Vf(f,x){let P;for(let R=x+1;R<f.length;R+=1){let F=f[R];if(P){if(F===P)P=void 0;continue}if(F==='"'||F==="'"){P=F;continue}if(F===">")return R+1}return f.length}function bf(f){let x={},P=/([:^@A-Za-z0-9_.-]+)(?:\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s"'>/]+)))?/g;for(let R of f.matchAll(P)){let[,F,$,q,H]=R;if(!F)continue;x[F]=$??q??H??""}return x}function w(f,x){if(f.startsWith("<!--",x)){let _=f.indexOf("-->",x+4);return{end:_===-1?f.length:_+3,type:"comment"}}let P=Vf(f,x),R=f.slice(x+1,P-1).trim();if(R==="")return;if(R.startsWith("!")||R.startsWith("?"))return{end:P,type:"declaration"};if(R.startsWith("/"))return{end:P,type:"close"};let F=/\/\s*$/.test(R),$=F?R.replace(/\/\s*$/,"").trim():R,q=$.split(/[\s/>]/,1)[0]?.toLowerCase()??"",H=q.length,j=$.slice(H).trim(),T=F||S.has(q)?"":zf(f,x,P,q);return{attributes:bf(j),end:P,innerHtml:T,selfClosing:F,tagName:q,type:"open"}}function zf(f,x,P,R){let F=P,$=1;while(F<f.length&&$>0){let q=f.indexOf("<",F);if(q===-1)return f.slice(P);let H=w(f,q);if(!H)return f.slice(P);if(H.type==="open"&&H.tagName===R&&!H.selfClosing&&!S.has(R))$+=1;if(H.type==="close"){if(f.slice(q+2,H.end-1).trim().toLowerCase()===R){if($-=1,$===0)return f.slice(P,q)}}F=H.end}return f.slice(P)}var S;var u0=d(()=>{S=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"])});function Q(){return d0??=(s0(),xf(c0)),d0}class r0{element;constructor(f){this.element=f}add(...f){let x=new Set(this.readTokens());for(let P of f)if(P!=="")x.add(P);this.writeTokens([...x])}remove(...f){let x=new Set(this.readTokens());for(let P of f)x.delete(P);this.writeTokens([...x])}toggle(f,x){let P=this.contains(f);if(x??!P)return this.add(f),!0;return this.remove(f),!1}contains(f){return this.readTokens().includes(f)}toString(){return this.value}get value(){return this.element.getAttribute("class")??""}readTokens(){return this.value.split(/\s+/).map((f)=>f.trim()).filter((f)=>f.length>0)}writeTokens(f){if(f.length===0){this.element.removeAttribute("class");return}this.element.setAttribute("class",f.join(" "))}}class E{bubbles;cancelable;composed;type;constructor(f,x={}){this.type=f,this.bubbles=x.bubbles??!1,this.cancelable=x.cancelable??!1,this.composed=x.composed??!1}}function Sf(f){return new U(f,X())}function X(){return globalThis.document??null}var d0,g,U,D,M,Z,W;var O=d(()=>{g=class g extends EventTarget{nodeType;static DOCUMENT_NODE=9;static ELEMENT_NODE=1;static TEXT_NODE=3;childNodes=[];ownerDocument;parentNode=null;constructor(f,x=null){super();this.nodeType=f;this.ownerDocument=x}append(...f){for(let x of f)this.appendChild(typeof x==="string"?Sf(x):x)}appendChild(f){if("parentNode"in f&&f.parentNode&&"removeChild"in f.parentNode)f.parentNode.removeChild(f);return this.childNodes.push(f),f.ownerDocument=this.nodeType===g.DOCUMENT_NODE?this:this.ownerDocument,f.parentNode=this,f}removeChild(f){let x=this.childNodes.indexOf(f);if(x===-1)return f;return this.childNodes.splice(x,1),f.parentNode=null,f}replaceChildren(...f){for(let x of this.childNodes)x.parentNode=null;this.childNodes=[],this.append(...f)}get textContent(){return this.childNodes.map((f)=>f.textContent??"").join("")}set textContent(f){this.replaceChildren(f??"")}getRootNode(){let f=this;while("parentNode"in f&&f.parentNode)f=f.parentNode;return f}};U=class U extends g{value;constructor(f,x=X()){super(g.TEXT_NODE,x);this.value=f}get textContent(){return this.value}set textContent(f){this.value=f??""}};D=class D extends g{attributes=new Map;classListValue;datasetValue;fragmentHtml;fragmentText;localName;tagName;constructor(f="div",x=X()){super(g.ELEMENT_NODE,x);this.localName=f.toLowerCase(),this.tagName=this.localName.toUpperCase()}get id(){return this.getAttribute("id")??""}set id(f){if(f===""){this.removeAttribute("id");return}this.setAttribute("id",f)}get classList(){return this.classListValue??=new r0(this),this.classListValue}get dataset(){return this.datasetValue??=new Proxy({},{deleteProperty:(f,x)=>{if(typeof x!=="string")return!1;return this.removeAttribute(Q().toDataAttributeName(x)),!0},get:(f,x)=>{if(typeof x!=="string")return;return this.getAttribute(Q().toDataAttributeName(x))??void 0},getOwnPropertyDescriptor:(f,x)=>{if(typeof x!=="string")return;return{configurable:!0,enumerable:!0,value:this.getAttribute(Q().toDataAttributeName(x))??void 0,writable:!0}},has:(f,x)=>{return typeof x==="string"&&this.hasAttribute(Q().toDataAttributeName(x))},ownKeys:()=>{return this.getAttributeNames().filter((f)=>f.startsWith("data-")).map((f)=>Q().toDatasetPropertyName(f.slice(5)))},set:(f,x,P)=>{if(typeof x!=="string")return!1;return this.setAttribute(Q().toDataAttributeName(x),String(P)),!0}}),this.datasetValue}hasAttribute(f){return this.attributes.has(f)}getAttribute(f){return this.attributes.get(f)??null}getAttributeNames(){return Array.from(this.attributes.keys())}setAttribute(f,x){this.fragmentHtml=void 0,this.attributes.set(f,String(x))}toggleAttribute(f,x){if(x??!this.hasAttribute(f))return this.setAttribute(f,""),!0;return this.removeAttribute(f),!1}removeAttribute(f){this.fragmentHtml=void 0,this.attributes.delete(f)}querySelector(){return null}querySelectorAll(){return[]}matches(){return!1}get outerHTML(){if(this.fragmentHtml!==void 0)return this.fragmentHtml;let f=Array.from(this.attributes.entries()).map(([x,P])=>` ${x}="${I(P)}"`).join("");return`<${this.localName}${f}>${this.innerHTML}</${this.localName}>`}get innerHTML(){return this.childNodes.map((f)=>Q().serializeNodeHtml(f)).join("")}set innerHTML(f){this.fragmentHtml=void 0,this.fragmentText=void 0,this.replaceChildren(...Q().parseHtmlToNodes(f,this.ownerDocument))}get textContent(){return this.fragmentText??super.textContent??""}set textContent(f){this.fragmentHtml=void 0,this.fragmentText=f??"",super.textContent=f}setSerializedFragment(f,x,P){this.fragmentHtml=f,this.fragmentText=x,this.attributes=new Map(Object.entries(P)),this.replaceChildren()}};M=class M extends E{detail;constructor(f,x={}){super(f,x);this.detail=x.detail}};Z=class Z extends D{isConnected=!1;constructor(f="div",x=X()){super(f,x)}insertAdjacentHTML(f,x){this.append(...Q().parseHtmlToNodes(x,this.ownerDocument))}};W=class W extends Z{constructor(f=X()){super("script",f)}}});var c0={};Ff(c0,{toDatasetPropertyName:()=>hf,toDataAttributeName:()=>Of,serializeNodeHtml:()=>yf,parseHtmlToNodes:()=>Mf,extractTextContent:()=>l0,createElementFromFragment:()=>i0});function i0(f,x,P){let R=x.tagName==="script"?new W(P):new Z(x.tagName,P);return R.setSerializedFragment(f,l0(x.innerHtml),x.attributes),R}function l0(f){return f.replace(/<!--.*?-->/gs,"").replace(/<[^>]+>/g,"")}function Mf(f,x=X()){return v0(f).map((P)=>{if(!P.startsWith("<"))return new U(P,x);let R=w(P,0);if(!R||R.type!=="open")return new U(P,x);return i0(P,R,x)})}function Of(f){return`data-${f.replace(/([A-Z])/g,"-$1").toLowerCase()}`}function hf(f){return f.replace(/-([a-z])/g,(x,P)=>P.toUpperCase())}function yf(f){if(f.nodeType===g.TEXT_NODE)return f.textContent??"";return"outerHTML"in f&&typeof f.outerHTML==="string"?f.outerHTML:f.textContent??""}var s0=d(()=>{u0();O()});var c=Symbol.for("@ecopages/radiant.reactivePropDefinitions");function of(f,x,P){let R=f.constructor,F=R[c]??[];if(F.some(($)=>$.name===x))return;F.push({name:x,options:P}),R[c]=F}function q0(f){return(f.constructor[c]??[]).slice()}var H0=Symbol.for("@ecopages/radiant.legacy-instance-initializers"),g0=Symbol.for("@ecopages/radiant.legacy-post-construction-initializers"),qf=Symbol.for("@ecopages/radiant.legacy-executed-post-construction-initializers");function f1(f,x){Z0(f,H0,x)}function x1(f,x){Z0(f,g0,x)}function Q0(f){Hf(f,H0)}function s(f,x){let P=f;gf(f,x,P[qf]??=new Set)}function Z0(f,x,P){let R=f,F=Object.prototype.hasOwnProperty.call(R,x)?R[x]:void 0;if(Array.isArray(F)){F.push(P);return}Object.defineProperty(R,x,{value:[P]})}function Hf(f,x){Qf(f,(P)=>{let R=P[x];if(!Array.isArray(R))return;for(let F of R)F(f)})}function gf(f,x,P){for(let R of W0(f)){let F=R[g0];if(!Array.isArray(F))continue;for(let $ of F){if(P.has($))continue;$(f,x),P.add($)}}}function W0(f){let x=[],P=Object.getPrototypeOf(f);while(P&&P!==Object.prototype)x.unshift(P),P=Object.getPrototypeOf(P);return x}function Qf(f,x){for(let P of W0(f))x(P)}function L(f,x){switch(x){case"construct":Q0(f);break;case"connect":s(f,"connect");break;case"ssr":s(f,"ssr");break}}function j0(f){switch(f){case Array:return"array";case Boolean:return"boolean";case Number:return"number";case Object:return"object";case String:return"string"}}function Zf(f){switch(typeof f){case"boolean":return"boolean";case"number":return"number";case"string":return"string"}if(Array.isArray(f))return"array";if(Object.prototype.toString.call(f)==="[object Object]")return"object"}function Wf(f){switch(f){case Number:return 0;case String:return"";case Boolean:return!1;default:return null}}function Jf(f){try{return JSON.parse(f)}catch{throw TypeError("Invalid JSON string")}}var Uf={array(f){let x=Jf(f);if(!Array.isArray(x))throw TypeError(`Expected an array but got a value of type "${typeof x}"`);return x},boolean(f){return!(f==="0"||String(f).toLowerCase()==="false")},number(f){return Number(f.replace(/_/g,""))},object(f){let x=JSON.parse(f);if(x===null||typeof x!=="object"||Array.isArray(x))throw TypeError(`expected value of type "object" but instead got value "${f}" of type "${Zf(x)}"`);return x},string(f){return f}},J0={default:G0,array:U0,object:U0};function U0(f){return JSON.stringify(f)}function G0(f){return`${f}`}function X0(f,x){let P=j0(x);if(!P)throw TypeError(`[radiant-element] Unknown type "${x}"`);return Uf[P](f)}function T0(f,x){let P=j0(x);if(!P)throw TypeError(`[radiant-element] Unknown type "${x}"`);return(J0[P]??J0.default??G0)(f)}function Xf(f){return typeof f==="boolean"}function jf(f){return typeof f==="number"}function Gf(f){return typeof f==="string"}function Tf(f){return Array.isArray(f)}function Bf(f){return typeof f==="object"&&!Array.isArray(f)&&f!==null}function $1(f,x){switch(f){case Boolean:return Xf(x);case Number:return jf(x);case String:return Gf(x);case Array:return Tf(x);case Object:return Bf(x);default:return!1}}var q1=(f,x,P,R)=>{if(x===Boolean){let $=f.getAttribute(P);if($===null)return R;return $===""?!0:X0($,x)}let F=f.getAttribute(P);return F!==null?X0(F,x):R??Wf(x)};import{getActiveSsrScopeValue as Yf,withActiveSsrScopeValue as Kf}from"@ecopages/jsx/server";var B0=Symbol.for("@ecopages/radiant.element-ssr-runtime");function Q1(){return Yf(B0)}function N(f,x){return Kf(B0,f,x)}var Y0=Symbol.for("@ecopages/radiant.customElementTagName");function W1(f,x){f[Y0]=x}function A(f){return f[Y0]}function K0(f){let x=globalThis.CSS;if(typeof x?.escape==="function")return x.escape(f);let P="";for(let R=0;R<f.length;R+=1){let F=f[R]??"",$=F.codePointAt(0)??0;if($===0){P+="�";continue}let q=$>=1&&$<=31||$===127,H=R===0&&$>=48&&$<=57,j=R===1&&$>=48&&$<=57&&(f[0]??"")==="-",T=R===0&&F==="-"&&f.length===1;if(q||H||j){P+=`\\${$.toString(16)} `;continue}if($>=128||F==="-"||F==="_"||$>=48&&$<=57||$>=65&&$<=90||$>=97&&$<=122){P+=T?`\\${F}`:F;continue}P+=`\\${F}`}return P}function w0(f){let x={},P=new Set;return Df(f,x,P),Ef(f,x,P),Cf(f,x),x}function D0(f){return Object.entries(f).map(([x,P])=>` ${x}="${I(P)}"`).join("")}function Df(f,x,P){for(let R of f.getReactiveProperties()){let F=f.getPropertyValue(R.name);if(F===void 0||F===null||F===!1)continue;x[R.attribute]=String(R.converter.toAttribute(F)),P.add(R.attribute)}}function Ef(f,x,P){for(let R of f.getReactivePropDefinitions()){let F=R.options.attribute??R.name;if(P.has(F))continue;let $=f.getPropertyValue(R.name);if($===void 0||$===null||$===!1)continue;x[F]=String(T0($,R.options.type)),P.add(F)}}function Cf(f,x){for(let P of f.getAttributeNames()){let R=f.getAttribute(P);if(R!==null)x[P]=R}}var E0=Symbol.for("@ecopages/radiant.ssr-context-provider-resolver");function C0(){return globalThis}function _0(f){C0()[E0]=f}function B1(f){return C0()[E0]?.(f)}var B;function N0(){if(B!==void 0)return B;try{let{AsyncLocalStorage:f}=(()=>{throw new Error("Cannot require module "+"node:async_hooks");})();return B=new f,B}catch{return B=null,null}}var L0=Symbol.for("@ecopages/radiant.ssr-context-fallback-stack");function A0(){let f=globalThis;return f[L0]??=[],f[L0]}function k(f){if(f.length===0)return()=>{return};let x=new Map;for(let F of f)x.set(F.getContextKey(),F);let P=N0();if(P){let F=P.getStore()??[],$=[...F,x];return P.enterWith($),()=>{P.enterWith(F)}}let R=A0();return R.push(x),()=>{let F=R.lastIndexOf(x);if(F>=0)R.splice(F,1)}}function I0(f){let x=N0()?.getStore()??A0();for(let P=x.length-1;P>=0;P-=1){let R=x[P]?.get(f);if(R)return R}return}function w1(f){let x=I0(f);if(!x)return;return x.getContext()}_0((f)=>I0(f));function k0(f,x){if(!x)return`${f.hostContent}${f.authoredHydrationMarkup}${f.slotProjectionScript}`;return`${f.hostContent}${f.slotProjectionScript}${f.hydrationScripts}`}function G(f){if(_f(f))return f;return}function _f(f){return typeof f.constructor==="function"&&typeof f.getAttribute==="function"&&typeof f.getAttributeNames==="function"&&typeof f.getAuthoredHydrationScriptMarkup==="function"&&typeof f.getContextProviders==="function"&&typeof f.getHydrationBindings==="function"&&typeof f.getReactiveProperties==="function"&&typeof f.getSlotProjectionScriptTag==="function"&&typeof f.resolveTrackedRenderOutput==="function"&&typeof f.renderViewToString==="function"}function V0(f){let x=G(f);if(!x)throw Error("Radiant SSR runtime requires a server extraction host shape on the component.");return{constructor:x.constructor,getAttribute:(P)=>x.getAttribute(P),getAttributeNames:()=>x.getAttributeNames(),getAuthoredHydrationScriptMarkup:()=>x.getAuthoredHydrationScriptMarkup?.(),getContextProviders:()=>x.getContextProviders(),getHydrationBindings:()=>x.getHydrationBindings(),getReactiveProperties:()=>x.getReactiveProperties(),getReactivePropDefinitions:()=>q0(f),getPropertyValue:(P)=>Reflect.get(f,P),getSlotProjectionScriptTag:()=>x.getSlotProjectionScriptTag?.(),resolveTrackedRenderOutput:()=>x.resolveTrackedRenderOutput(),renderViewToString:(P)=>x.renderViewToString(P)}}class r{component;host;constructor(f){this.component=f,this.host=V0(f)}ensureReady(){L(this.component,"ssr")}renderHost(){return this.ensureReady(),{nodeType:1,outerHTML:this.renderHostToString({mode:"hydrate"})}}renderHostToString(f={},x=this.getHostAttributes()){this.ensureReady();let P=this.getTagName(),R=k(this.host.getContextProviders());try{return`<${P}${D0(x)}>${this.renderHostContent(f)}</${P}>`}finally{R()}}getHostAttributes(){return this.ensureReady(),w0(this.host)}renderHostContent(f){let x=f.mode==="hydrate"||f.mode===void 0&&f.hydrate===!0,P=x?this.host.getHydrationBindings().map((R)=>R.renderHydrationScriptTag()).filter((R)=>typeof R==="string").join(""):"";return k0({hostContent:this.host.renderViewToString(f),authoredHydrationMarkup:this.host.getAuthoredHydrationScriptMarkup?.()??"",slotProjectionScript:this.host.getSlotProjectionScriptTag?.()??"",hydrationScripts:P},x)}getTagName(){let f=A(this.host.constructor);if(!f)throw Error(`${this.host.constructor.name} is missing @customElement metadata.`);return f}}import{renderToString as Lf}from"@ecopages/jsx/server";import{createServerHydrationBindingState as b0,isServerRenderHydrationActive as z0,withForcedServerCustomElementRendering as Nf,withServerCustomElementRenderHook as Af,withServerHydrationBindingState as S0}from"@ecopages/jsx/server";var V;function i(f){return new r(f)}function Y(f){return{nodeType:1,outerHTML:J(f,{mode:"hydrate"})}}function l(f){if(K(f))return Y(f);if(!b(f))return;return f.renderHost?.()??{nodeType:1,outerHTML:f.renderHostToString({mode:"hydrate"})}}function J(f,x={}){return n(()=>i(f).renderHostToString(x,a(f)))}function m(f,x={}){if(K(f))return J(f,x);if(!b(f))return;return f.renderHostToString(x)}function p(f,x){if(K(f))return Y(f);if(!b(f))return;return f.renderHost?.()??{nodeType:1,outerHTML:x}}function M0(f,x={}){return n(()=>h0(()=>Lf(y0(f).value,x)))}function a(f){return i(f).getHostAttributes()}function O0(f){if(!K(f))return;return{renderHost:()=>Y(f),renderHostToString:(x)=>J(f,x)}}function If(f){return G(f)}function h0(f){return Nf(()=>Af(({instance:x})=>{if(K(x))return{nodeType:1,get outerHTML(){let R=z0(),F={hydrate:R,mode:R?"hydrate":"plain"};if(!R)return J(x,F);return S0(b0(),()=>J(x,F))}};if(!b(x))return;let P=x;return{nodeType:1,get outerHTML(){let R=z0();if(!R)return P.renderHostToString({hydrate:R,mode:R?"hydrate":"plain"});return S0(b0(),()=>P.renderHostToString({hydrate:R,mode:R?"hydrate":"plain"}))}}},f))}function y0(f){if(kf(f))return f.resolveTrackedRenderOutput();let x=G(f);if(!x)throw Error("Radiant SSR runtime requires tracked render output support on the component.");return x.resolveTrackedRenderOutput()}function K(f){if(typeof f!=="object"||f===null)return!1;return G(f)!==void 0}function b(f){if(typeof f!=="object"||f===null)return!1;return typeof f.renderHostToString==="function"}function kf(f){if(typeof f!=="object"||f===null)return!1;return typeof f.resolveTrackedRenderOutput==="function"}function z(){if(V)return V;return V={getHostAttributes:a,renderHost:Y,renderHostToString:J,resolveRenderBridge:O0,renderView:M0},V}function n(f){return N(z(),f)}O();class h extends g{constructor(){super(g.DOCUMENT_NODE)}createElement(f){return f.toLowerCase()==="script"?new W(this):new Z(f,this)}createTextNode(f){return new U(f,this)}querySelector(){return null}querySelectorAll(){return[]}}class t{definitions=new Map;define(f,x){if(this.definitions.has(f))return;this.definitions.set(f,x)}get(f){return this.definitions.get(f)}}O();var C,o={escape(f){return K0(String(f))}};function m0(){let f=globalThis,x=f.customElements;if(typeof f.Node>"u"||typeof f.Document>"u"||typeof f.Element>"u"||typeof f.HTMLElement>"u"||typeof f.document>"u"||!x||typeof x.define!=="function"||typeof x.get!=="function")return;return f.window??{CSS:f.CSS??o,CustomEvent:f.CustomEvent??M,Document:f.Document,Element:f.Element,Event:f.Event??E,EventTarget:f.EventTarget??EventTarget,HTMLScriptElement:f.HTMLScriptElement??f.HTMLElement,HTMLElement:f.HTMLElement,Node:f.Node,document:f.document,customElements:x}}function p0(){let f=m0();if(f)return f;return a0()}function e(){return p0(),{prepareHost(f,x={}){if(x.authoredContent!==void 0)f.innerHTML=x.authoredContent}}}function a0(){let f=m0();if(f)return f;if(C)return C;let x=new t,P=new h,R=globalThis.Event??E,F=globalThis.CustomEvent??M,$=h,q=globalThis.EventTarget??EventTarget;return C={CSS:globalThis.CSS??o,CustomEvent:F,Document:$,Element:D,Event:R,EventTarget:q,HTMLScriptElement:W,HTMLElement:Z,Node:g,document:P,customElements:x},Object.assign(globalThis,{CSS:globalThis.CSS??o,CustomEvent:F,Document:$,Element:D,Event:R,EventTarget:q,HTMLScriptElement:W,HTMLElement:Z,Node:g,document:P,customElements:x,window:C}),C}function f0(){return new Date}function x0(f){if("metadata"in f)return{assets:f.metadata.assets,clientModuleSrc:f.metadata.clientModuleUrl,generatedAt:f.metadata.generatedAt,markup:f.markup,tagName:f.metadata.tagName};let{preview:x,...P}=f;return P}function P0(f){return{assets:f.metadata.assets,clientModuleSrc:f.metadata.clientModuleUrl,generatedAt:f.metadata.generatedAt,markup:f.markup,preview:f.preview,tagName:f.metadata.tagName}}function vf(f,x="hydrate"){return{kind:"script-module",src:f,stage:x}}function Jx(f){return{kind:"modulepreload",href:f}}function Ux(f,x){return x?{kind:"style",href:f,media:x}:{kind:"style",href:f}}async function Xx(f,x){return(await y(v(f,x))).markup}async function jx(f,x){return y(v(f,x))}async function Gx(f,x){return x0(await y(v(f,x)))}async function Tx(f,x){return P0(await y(v(f,x)))}async function y(f){return N(z(),async()=>{let x=f.environment??e(),P=k(cf(f.ssrContext));try{let R="component"in f?f.component:await f.load(),F=new R;L(F,"ssr"),df(x,F,f.authoredContent,f.prepareHost),f.initialize?.(F);let $=f.clientModuleSrc??await f.resolveClientModuleSrc?.(R),q=f.assets??await f.resolveAssets?.(R)??[],H=rf(q,$),j=lf(H)??$,T=f.tagName??nf(R),_=(f.now??f0)().toISOString(),R0=mf(f.renderOptions),F0=m(F,R0)??af(F,R0),n0=uf(F,F0);return{markup:F0,metadata:{assets:H,clientModuleUrl:j,generatedAt:_,tagName:T},preview:n0}}finally{P()}})}function uf(f,x){return p(f,x)??l(f)??f.renderHost?.()??{nodeType:1,outerHTML:x}}function df(f,x,P,R){if(!pf(x)){if(P===void 0&&R===void 0)return;throw Error(`${x.constructor.name} cannot prepare SSR host content because it does not expose an innerHTML host surface.`)}f.prepareHost(x,{authoredContent:P}),R?.(x,f)}function cf(f){if(!f||f.length===0)return[];return f.map((x)=>({getContext:()=>x.value,getContextKey:()=>x.context,renderHydrationScript:()=>{return},renderHydrationScriptTag:()=>{return}}))}function sf(f){if(!f)return[];return[vf(f)]}function rf(f,x){if(!x)return f;if(f.some((P)=>P.kind==="script-module"&&P.src===x))return f;return[...sf(x),...f]}function lf(f){return f.find((x)=>x.kind==="script-module")?.src}function v(f,x){if(typeof f==="function")return{...x,component:f};return f}function mf(f){if(f?.mode!==void 0||f?.hydrate!==void 0)return f;return{...f,mode:"hydrate"}}function pf(f){return"innerHTML"in f}function af(f,x){if(typeof f.renderHostToString==="function")return f.renderHostToString(x);throw Error(`${f.constructor.name} cannot be server-rendered without a registered Radiant SSR host or renderHostToString().`)}function nf(f){let x=A(f);if(!x)throw Error(`${f.name} is missing @customElement metadata.`);return x}export{P0 as toRenderedComponentWithPreview,x0 as toRenderedComponentPayload,Ux as styleAsset,vf as scriptModuleAsset,lf as resolvePrimaryClientModuleSrc,Tx as renderComponentWithPreview,Xx as renderComponentToString,Gx as renderComponentToPayload,jx as renderComponent,mf as normalizeRenderOptions,Jx as modulePreloadAsset,rf as mergeRenderedComponentAssets,f0 as createDefaultRenderTimestamp};
|
|
2
|
+
|
|
3
|
+
//# debugId=4FA34FA5C7FFE38064756E2164756E21
|