@ecopages/radiant 0.3.0-beta.0 → 0.3.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ecopages/radiant",
|
|
3
|
-
"version": "0.3.0-beta.
|
|
3
|
+
"version": "0.3.0-beta.2",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/ecopages/radiant.git"
|
|
@@ -8,231 +8,201 @@
|
|
|
8
8
|
"author": "Andrea Zanenghi",
|
|
9
9
|
"license": "MIT",
|
|
10
10
|
"type": "module",
|
|
11
|
-
"main": "dist/index.js",
|
|
12
|
-
"module": "dist/index.js",
|
|
13
|
-
"types": "dist/index.d.ts",
|
|
14
11
|
"publishConfig": {
|
|
15
|
-
"access": "public"
|
|
16
|
-
"directory": "dist"
|
|
17
|
-
},
|
|
18
|
-
"scripts": {
|
|
19
|
-
"build:lib": "bun run clean && bun run build:files && bun run build:types",
|
|
20
|
-
"build:files": "bun run ./build.ts",
|
|
21
|
-
"build:types": "tsc -p tsconfig.build.json && tsc-alias",
|
|
22
|
-
"clean": "rm -rf ./dist",
|
|
23
|
-
"watch:lib": "bun run ./build.ts --watch",
|
|
24
|
-
"size:check": "bun run ./check-size.ts",
|
|
25
|
-
"size:report": "bun run ./check-size.ts --report-only",
|
|
26
|
-
"test:standard": "vitest run",
|
|
27
|
-
"test:legacy": "vitest run -- --legacy",
|
|
28
|
-
"test:lib": "bun run test:standard && bun run test:legacy",
|
|
29
|
-
"test:lib:coverage": "bun run test:standard -- --coverage && bun run vitest run --coverage -- --legacy"
|
|
30
|
-
},
|
|
31
|
-
"dependencies": {},
|
|
32
|
-
"devDependencies": {
|
|
33
|
-
"@ecopages/jsx": "workspace:*",
|
|
34
|
-
"@ecopages/signals": "workspace:*",
|
|
35
|
-
"@testing-library/dom": "^10.4.0",
|
|
36
|
-
"@testing-library/user-event": "^14.5.2",
|
|
37
|
-
"@vitest/browser": "^3.2.4",
|
|
38
|
-
"@vitest/coverage-istanbul": "^3.2.4",
|
|
39
|
-
"bun-types": "latest",
|
|
40
|
-
"tsc-alias": "1.8.10",
|
|
41
|
-
"esbuild": "^0.25.0",
|
|
42
|
-
"playwright": "^1.52.0",
|
|
43
|
-
"vite": "^7.1.3",
|
|
44
|
-
"vitest": "^3.2.4"
|
|
45
|
-
},
|
|
46
|
-
"peerDependencies": {
|
|
47
|
-
"@ecopages/jsx": ">=0.3.0-beta.0 <1.0.0",
|
|
48
|
-
"@ecopages/signals": ">=0.3.0-beta.0 <1.0.0"
|
|
12
|
+
"access": "public"
|
|
49
13
|
},
|
|
14
|
+
"main": "./index.js",
|
|
15
|
+
"module": "./index.js",
|
|
16
|
+
"types": "./index.d.ts",
|
|
50
17
|
"files": [
|
|
51
|
-
"
|
|
18
|
+
"**/*"
|
|
52
19
|
],
|
|
53
20
|
"sideEffects": [
|
|
54
|
-
"./
|
|
55
|
-
"./
|
|
21
|
+
"./client/install-hydrator.js",
|
|
22
|
+
"./server/install-light-dom-shim.js"
|
|
56
23
|
],
|
|
57
24
|
"exports": {
|
|
58
25
|
"./package.json": {
|
|
59
26
|
"import": "./package.json"
|
|
60
27
|
},
|
|
61
28
|
".": {
|
|
62
|
-
"types": "./
|
|
63
|
-
"import": "./
|
|
29
|
+
"types": "./index.d.ts",
|
|
30
|
+
"import": "./index.js"
|
|
64
31
|
},
|
|
65
32
|
"./context": {
|
|
66
|
-
"types": "./
|
|
67
|
-
"import": "./
|
|
33
|
+
"types": "./context/index.d.ts",
|
|
34
|
+
"import": "./context/index.js"
|
|
68
35
|
},
|
|
69
36
|
"./context/create-context": {
|
|
70
|
-
"types": "./
|
|
71
|
-
"import": "./
|
|
37
|
+
"types": "./context/create-context.d.ts",
|
|
38
|
+
"import": "./context/create-context.js"
|
|
72
39
|
},
|
|
73
40
|
"./context/context-provider": {
|
|
74
|
-
"types": "./
|
|
75
|
-
"import": "./
|
|
41
|
+
"types": "./context/context-provider.d.ts",
|
|
42
|
+
"import": "./context/context-provider.js"
|
|
76
43
|
},
|
|
77
44
|
"./context/consume-context": {
|
|
78
|
-
"types": "./
|
|
79
|
-
"import": "./
|
|
45
|
+
"types": "./context/decorators/consume-context.d.ts",
|
|
46
|
+
"import": "./context/decorators/consume-context.js"
|
|
80
47
|
},
|
|
81
48
|
"./context/provide-context": {
|
|
82
|
-
"types": "./
|
|
83
|
-
"import": "./
|
|
49
|
+
"types": "./context/decorators/provide-context.d.ts",
|
|
50
|
+
"import": "./context/decorators/provide-context.js"
|
|
84
51
|
},
|
|
85
52
|
"./context/context-selector": {
|
|
86
|
-
"types": "./
|
|
87
|
-
"import": "./
|
|
53
|
+
"types": "./context/decorators/context-selector.d.ts",
|
|
54
|
+
"import": "./context/decorators/context-selector.js"
|
|
88
55
|
},
|
|
89
56
|
"./context/on-context-update": {
|
|
90
|
-
"types": "./
|
|
91
|
-
"import": "./
|
|
57
|
+
"types": "./context/decorators/on-context-update.d.ts",
|
|
58
|
+
"import": "./context/decorators/on-context-update.js"
|
|
92
59
|
},
|
|
93
60
|
"./context/events": {
|
|
94
|
-
"types": "./
|
|
95
|
-
"import": "./
|
|
61
|
+
"types": "./context/events.d.ts",
|
|
62
|
+
"import": "./context/events.js"
|
|
96
63
|
},
|
|
97
64
|
"./controller-registry": {
|
|
98
|
-
"types": "./
|
|
99
|
-
"import": "./
|
|
65
|
+
"types": "./controller-registry.d.ts",
|
|
66
|
+
"import": "./controller-registry.js"
|
|
100
67
|
},
|
|
101
68
|
"./core/radiant-element": {
|
|
102
|
-
"types": "./
|
|
103
|
-
"import": "./
|
|
69
|
+
"types": "./core/radiant-element.d.ts",
|
|
70
|
+
"import": "./core/radiant-element.js"
|
|
104
71
|
},
|
|
105
72
|
"./core/radiant-controller": {
|
|
106
|
-
"types": "./
|
|
107
|
-
"import": "./
|
|
73
|
+
"types": "./core/radiant-controller.d.ts",
|
|
74
|
+
"import": "./core/radiant-controller.js"
|
|
108
75
|
},
|
|
109
76
|
"./core/reactive-jsx-value": {
|
|
110
|
-
"types": "./
|
|
111
|
-
"import": "./
|
|
77
|
+
"types": "./core/reactive-jsx-value.d.ts",
|
|
78
|
+
"import": "./core/reactive-jsx-value.js"
|
|
112
79
|
},
|
|
113
80
|
"./client/hydrator": {
|
|
114
|
-
"types": "./
|
|
115
|
-
"import": "./
|
|
81
|
+
"types": "./client/hydrator.d.ts",
|
|
82
|
+
"import": "./client/hydrator.js"
|
|
116
83
|
},
|
|
117
84
|
"./client/app-bootstrap": {
|
|
118
|
-
"types": "./
|
|
119
|
-
"import": "./
|
|
85
|
+
"types": "./client/app-bootstrap.d.ts",
|
|
86
|
+
"import": "./client/app-bootstrap.js"
|
|
120
87
|
},
|
|
121
88
|
"./client/install-hydrator": {
|
|
122
|
-
"types": "./
|
|
123
|
-
"import": "./
|
|
89
|
+
"types": "./client/install-hydrator.d.ts",
|
|
90
|
+
"import": "./client/install-hydrator.js"
|
|
124
91
|
},
|
|
125
92
|
"./signals/host-resource": {
|
|
126
|
-
"types": "./
|
|
127
|
-
"import": "./
|
|
93
|
+
"types": "./signals/host-resource.d.ts",
|
|
94
|
+
"import": "./signals/host-resource.js"
|
|
128
95
|
},
|
|
129
96
|
"./server/light-dom-shim": {
|
|
130
|
-
"types": "./
|
|
131
|
-
"import": "./
|
|
97
|
+
"types": "./server/light-dom-shim.d.ts",
|
|
98
|
+
"import": "./server/light-dom-shim.js"
|
|
132
99
|
},
|
|
133
100
|
"./server/install-light-dom-shim": {
|
|
134
|
-
"types": "./
|
|
135
|
-
"import": "./
|
|
101
|
+
"types": "./server/install-light-dom-shim.d.ts",
|
|
102
|
+
"import": "./server/install-light-dom-shim.js"
|
|
136
103
|
},
|
|
137
104
|
"./server/render-component": {
|
|
138
|
-
"types": "./
|
|
139
|
-
"import": "./
|
|
105
|
+
"types": "./server/render-component.d.ts",
|
|
106
|
+
"import": "./server/render-component.js"
|
|
140
107
|
},
|
|
141
108
|
"./server/render-controller": {
|
|
142
|
-
"types": "./
|
|
143
|
-
"import": "./
|
|
109
|
+
"types": "./server/render-controller.d.ts",
|
|
110
|
+
"import": "./server/render-controller.js"
|
|
144
111
|
},
|
|
145
112
|
"./server/project-root": {
|
|
146
|
-
"types": "./
|
|
147
|
-
"import": "./
|
|
113
|
+
"types": "./server/project-root.d.ts",
|
|
114
|
+
"import": "./server/project-root.js"
|
|
148
115
|
},
|
|
149
116
|
"./decorators/bound": {
|
|
150
|
-
"types": "./
|
|
151
|
-
"import": "./
|
|
117
|
+
"types": "./decorators/bound.d.ts",
|
|
118
|
+
"import": "./decorators/bound.js"
|
|
152
119
|
},
|
|
153
120
|
"./decorators/attr": {
|
|
154
|
-
"types": "./
|
|
155
|
-
"import": "./
|
|
121
|
+
"types": "./decorators/attr.d.ts",
|
|
122
|
+
"import": "./decorators/attr.js"
|
|
156
123
|
},
|
|
157
124
|
"./decorators/controller": {
|
|
158
|
-
"types": "./
|
|
159
|
-
"import": "./
|
|
125
|
+
"types": "./decorators/controller.d.ts",
|
|
126
|
+
"import": "./decorators/controller.js"
|
|
160
127
|
},
|
|
161
128
|
"./decorators/custom-element": {
|
|
162
|
-
"types": "./
|
|
163
|
-
"import": "./
|
|
129
|
+
"types": "./decorators/custom-element.d.ts",
|
|
130
|
+
"import": "./decorators/custom-element.js"
|
|
164
131
|
},
|
|
165
132
|
"./decorators/debounce": {
|
|
166
|
-
"types": "./
|
|
167
|
-
"import": "./
|
|
133
|
+
"types": "./decorators/debounce.d.ts",
|
|
134
|
+
"import": "./decorators/debounce.js"
|
|
168
135
|
},
|
|
169
136
|
"./helpers/debounce": {
|
|
170
|
-
"types": "./
|
|
171
|
-
"import": "./
|
|
137
|
+
"types": "./helpers/debounce.d.ts",
|
|
138
|
+
"import": "./helpers/debounce.js"
|
|
172
139
|
},
|
|
173
140
|
"./helpers/create-query": {
|
|
174
|
-
"types": "./
|
|
175
|
-
"import": "./
|
|
141
|
+
"types": "./helpers/create-query.d.ts",
|
|
142
|
+
"import": "./helpers/create-query.js"
|
|
176
143
|
},
|
|
177
144
|
"./helpers/create-query-slot": {
|
|
178
|
-
"types": "./
|
|
179
|
-
"import": "./
|
|
145
|
+
"types": "./helpers/create-query-slot.d.ts",
|
|
146
|
+
"import": "./helpers/create-query-slot.js"
|
|
180
147
|
},
|
|
181
148
|
"./helpers/create-event": {
|
|
182
|
-
"types": "./
|
|
183
|
-
"import": "./
|
|
149
|
+
"types": "./helpers/create-event.d.ts",
|
|
150
|
+
"import": "./helpers/create-event.js"
|
|
184
151
|
},
|
|
185
152
|
"./helpers/create-event-listener": {
|
|
186
|
-
"types": "./
|
|
187
|
-
"import": "./
|
|
153
|
+
"types": "./helpers/create-event-listener.d.ts",
|
|
154
|
+
"import": "./helpers/create-event-listener.js"
|
|
188
155
|
},
|
|
189
156
|
"./decorators/event": {
|
|
190
|
-
"types": "./
|
|
191
|
-
"import": "./
|
|
157
|
+
"types": "./decorators/event.d.ts",
|
|
158
|
+
"import": "./decorators/event.js"
|
|
192
159
|
},
|
|
193
160
|
"./decorators/on-event": {
|
|
194
|
-
"types": "./
|
|
195
|
-
"import": "./
|
|
161
|
+
"types": "./decorators/on-event.d.ts",
|
|
162
|
+
"import": "./decorators/on-event.js"
|
|
196
163
|
},
|
|
197
164
|
"./decorators/on-updated": {
|
|
198
|
-
"types": "./
|
|
199
|
-
"import": "./
|
|
165
|
+
"types": "./decorators/on-updated.d.ts",
|
|
166
|
+
"import": "./decorators/on-updated.js"
|
|
200
167
|
},
|
|
201
168
|
"./decorators/prop": {
|
|
202
|
-
"types": "./
|
|
203
|
-
"import": "./
|
|
169
|
+
"types": "./decorators/prop.d.ts",
|
|
170
|
+
"import": "./decorators/prop.js"
|
|
204
171
|
},
|
|
205
172
|
"./decorators/query": {
|
|
206
|
-
"types": "./
|
|
207
|
-
"import": "./
|
|
173
|
+
"types": "./decorators/query.d.ts",
|
|
174
|
+
"import": "./decorators/query.js"
|
|
208
175
|
},
|
|
209
176
|
"./decorators/query-slot": {
|
|
210
|
-
"types": "./
|
|
211
|
-
"import": "./
|
|
177
|
+
"types": "./decorators/query-slot.d.ts",
|
|
178
|
+
"import": "./decorators/query-slot.js"
|
|
212
179
|
},
|
|
213
180
|
"./decorators/resource": {
|
|
214
|
-
"types": "./
|
|
215
|
-
"import": "./
|
|
181
|
+
"types": "./decorators/resource.d.ts",
|
|
182
|
+
"import": "./decorators/resource.js"
|
|
216
183
|
},
|
|
217
184
|
"./decorators/signal": {
|
|
218
|
-
"types": "./
|
|
219
|
-
"import": "./
|
|
185
|
+
"types": "./decorators/signal.d.ts",
|
|
186
|
+
"import": "./decorators/signal.js"
|
|
220
187
|
},
|
|
221
188
|
"./decorators/state": {
|
|
222
|
-
"types": "./
|
|
223
|
-
"import": "./
|
|
189
|
+
"types": "./decorators/state.d.ts",
|
|
190
|
+
"import": "./decorators/state.js"
|
|
224
191
|
},
|
|
225
192
|
"./tools/render-jsx-template": {
|
|
226
|
-
"types": "./
|
|
227
|
-
"import": "./
|
|
193
|
+
"types": "./tools/render-jsx-template.d.ts",
|
|
194
|
+
"import": "./tools/render-jsx-template.js"
|
|
228
195
|
},
|
|
229
196
|
"./tools/escape-script-json": {
|
|
230
|
-
"types": "./
|
|
231
|
-
"import": "./
|
|
197
|
+
"types": "./tools/escape-script-json.d.ts",
|
|
198
|
+
"import": "./tools/escape-script-json.js"
|
|
232
199
|
},
|
|
233
200
|
"./tools/event-emitter": {
|
|
234
|
-
"types": "./
|
|
235
|
-
"import": "./
|
|
201
|
+
"types": "./tools/event-emitter.d.ts",
|
|
202
|
+
"import": "./tools/event-emitter.js"
|
|
236
203
|
}
|
|
204
|
+
},
|
|
205
|
+
"peerDependencies": {
|
|
206
|
+
"@ecopages/jsx": ">=0.3.0-beta.2 <1.0.0"
|
|
237
207
|
}
|
|
238
208
|
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
var{defineProperty:H,getOwnPropertyNames:F,getOwnPropertyDescriptor:G}=Object,I=Object.prototype.hasOwnProperty;function P(j){return this[j]}var K=(j)=>{var q=(J??=new WeakMap).get(j),u;if(q)return q;if(q=H({},"__esModule",{value:!0}),j&&typeof j==="object"||typeof j==="function"){for(var w of F(j))if(!I.call(q,w))H(q,w,{get:P.bind(j,w),enumerable:!(u=G(j,w))||u.enumerable})}return J.set(j,q),q},J;var f=(j)=>j;function g(j,q){this[j]=f.bind(null,q)}var M=(j,q)=>{for(var u in q)H(j,u,{get:q[u],enumerable:!0,configurable:!0,set:g.bind(q,u)})};var N=(j,q)=>()=>(j&&(q=j(j=0)),q);var m=((j)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(j,{get:(q,u)=>(typeof require<"u"?require:q)[u]}):j)(function(j){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+j+'" is not supported')});var Q=Symbol.for("@ecopages/radiant.ssr-context-provider-resolver");function U(){return globalThis}function W(j){U()[Q]=j}function X(j){return U()[Q]?.(j)}var z;function $(){if(z!==void 0)return z;try{let{AsyncLocalStorage:j}=(()=>{throw new Error("Cannot require module "+"node:async_hooks");})();return z=new j,z}catch{return z=null,null}}var Z=Symbol.for("@ecopages/radiant.ssr-context-fallback-stack");function h(){let j=globalThis;return j[Z]??=[],j[Z]}function B(j){if(j.length===0)return()=>{return};let q=new Map;for(let y of j)q.set(y.getContextKey(),y);let u=$();if(u){let y=u.getStore()??[],D=[...y,q];return u.enterWith(D),()=>{u.enterWith(y)}}let w=h();return w.push(q),()=>{let y=w.lastIndexOf(q);if(y>=0)w.splice(y,1)}}function b(j){let q=$()?.getStore()??h();for(let u=q.length-1;u>=0;u-=1){let w=q[u]?.get(j);if(w)return w}return}function A(j){let q=b(j);if(!q)return;return q.getContext()}W((j)=>b(j));export{B as withSsrContextProviders,A as resolveSsrContextValue,b as resolveSsrContextProvider};
|
|
2
|
+
|
|
3
|
+
//# debugId=0730EF1B0BEA738164756E2164756E21
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"import type { SsrSerializableContextProvider } from './context-provider';\nimport type { UnknownContext } from './types';\n\ntype SsrContextProviderResolver = (context: UnknownContext) => SsrSerializableContextProvider | undefined;\n\nconst SSR_CONTEXT_PROVIDER_RESOLVER_SYMBOL = Symbol.for('@ecopages/radiant.ssr-context-provider-resolver');\n\ntype GlobalResolverScope = typeof globalThis & {\n\t[SSR_CONTEXT_PROVIDER_RESOLVER_SYMBOL]?: SsrContextProviderResolver;\n};\n\nfunction getGlobalResolverScope(): GlobalResolverScope {\n\treturn globalThis as GlobalResolverScope;\n}\n\n/**\n * Installs the ambient SSR provider resolver used by shared context runtime helpers.\n *\n * Server-side rendering infrastructure owns the actual provider stack storage and\n * publishes a lookup function here so client/runtime code does not need to import\n * server-oriented modules.\n */\nexport function installSsrContextProviderResolver(resolver: SsrContextProviderResolver): void {\n\tgetGlobalResolverScope()[SSR_CONTEXT_PROVIDER_RESOLVER_SYMBOL] = resolver;\n}\n\n/**\n * Resolves an ambient SSR provider when a server render has published one.\n */\nexport function resolveAmbientSsrContextProvider(context: UnknownContext): SsrSerializableContextProvider | undefined {\n\treturn getGlobalResolverScope()[SSR_CONTEXT_PROVIDER_RESOLVER_SYMBOL]?.(context);\n}\n",
|
|
6
6
|
"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"
|
|
7
7
|
],
|
|
8
|
-
"mappings": "
|
|
9
|
-
"debugId": "
|
|
8
|
+
"mappings": "i0BAKA,IAAM,EAAuC,OAAO,IAAI,iDAAiD,EAMzG,SAAS,CAAsB,EAAwB,CACtD,OAAO,WAUD,SAAS,CAAiC,CAAC,EAA4C,CAC7F,EAAuB,EAAE,GAAwC,EAM3D,SAAS,CAAgC,CAAC,EAAqE,CACrH,OAAO,EAAuB,EAAE,KAAwC,CAAO,ECtBhF,IAAI,EAaJ,SAAS,CAAoB,EAA4C,CACxE,GAAI,IAA8B,OACjC,OAAO,EAGR,GAAI,CACH,IAAQ,kBAAmB,2EAE3B,OADA,EAA4B,IAAI,EACzB,EACN,KAAM,CAEP,OADA,EAA4B,KACrB,MAIT,IAAM,EAAoC,OAAO,IAAI,8CAA8C,EAEnG,SAAS,CAAgB,EAAkB,CAC1C,IAAM,EAAI,WAEV,OADA,EAAE,KAAuC,CAAC,EACnC,EAAE,GAYH,SAAS,CAAuB,CAAC,EAAkE,CACzG,GAAI,EAAU,SAAW,EACxB,MAAO,IAAG,CAAG,QAGd,IAAM,EAAQ,IAAI,IAElB,QAAW,KAAY,EACtB,EAAM,IAAI,EAAS,cAAc,EAAG,CAAQ,EAG7C,IAAM,EAAM,EAAqB,EAEjC,GAAI,EAAK,CACR,IAAM,EAAc,EAAI,SAAS,GAAK,CAAC,EACjC,EAAa,CAAC,GAAG,EAAa,CAAK,EAGzC,OAFA,EAAI,UAAU,CAAU,EAEjB,IAAM,CACZ,EAAI,UAAU,CAAW,GAI3B,IAAM,EAAQ,EAAiB,EAG/B,OAFA,EAAM,KAAK,CAAK,EAET,IAAM,CACZ,IAAM,EAAQ,EAAM,YAAY,CAAK,EACrC,GAAI,GAAS,EAAG,EAAM,OAAO,EAAO,CAAC,GAUhC,SAAS,CAAmD,CAClE,EAC6C,CAC7C,IAAM,EAAQ,EAAqB,GAAG,SAAS,GAAK,EAAiB,EAErE,QAAS,EAAQ,EAAM,OAAS,EAAG,GAAS,EAAG,GAAS,EAAG,CAC1D,IAAM,EAAW,EAAM,IAAQ,IAAI,CAAO,EAE1C,GAAI,EACH,OAAO,EAIT,OAUM,SAAS,CAAgD,CAAC,EAAwC,CACxG,IAAM,EAAW,EAA0B,CAAO,EAElD,GAAI,CAAC,EACJ,OAGD,OAAO,EAAS,WAAW,EAG5B,EAAkC,CAAC,IAAY,EAA0B,CAAO,CAAC",
|
|
9
|
+
"debugId": "0730EF1B0BEA738164756E2164756E21",
|
|
10
10
|
"names": []
|
|
11
11
|
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
var{defineProperty:M,getOwnPropertyNames:Z,getOwnPropertyDescriptor:_}=Object,$=Object.prototype.hasOwnProperty;function k(q){return this[q]}var c=(q)=>{var g=(z??=new WeakMap).get(q),x;if(g)return g;if(g=M({},"__esModule",{value:!0}),q&&typeof q==="object"||typeof q==="function"){for(var E of Z(q))if(!$.call(g,E))M(g,E,{get:k.bind(q,E),enumerable:!(x=_(q,E))||x.enumerable})}return z.set(q,g),g},z;var B=(q)=>q;function F(q,g){this[q]=B.bind(null,g)}var A=(q,g)=>{for(var x in g)M(q,x,{get:g[x],enumerable:!0,configurable:!0,set:F.bind(g,x)})};var h=(q,g)=>()=>(q&&(g=q(q=0)),g);var f=((q)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(q,{get:(g,x)=>(typeof require<"u"?require:g)[x]}):q)(function(q){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+q+'" is not supported')});function Y(q){return q.replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">")}function U(q){switch(q){case Array:return"array";case Boolean:return"boolean";case Number:return"number";case Object:return"object";case String:return"string"}}function P(q){switch(typeof q){case"boolean":return"boolean";case"number":return"number";case"string":return"string"}if(Array.isArray(q))return"array";if(Object.prototype.toString.call(q)==="[object Object]")return"object"}function R(q){switch(q){case Number:return 0;case String:return"";case Boolean:return!1;default:return null}}function D(q){try{return JSON.parse(q)}catch{throw TypeError("Invalid JSON string")}}var C={array(q){let g=D(q);if(!Array.isArray(g))throw TypeError(`Expected an array but got a value of type "${typeof g}"`);return g},boolean(q){return!(q==="0"||String(q).toLowerCase()==="false")},number(q){return Number(q.replace(/_/g,""))},object(q){let g=JSON.parse(q);if(g===null||typeof g!=="object"||Array.isArray(g))throw TypeError(`expected value of type "object" but instead got value "${q}" of type "${P(g)}"`);return g},string(q){return q}},G={default:W,array:I,object:I};function I(q){return JSON.stringify(q)}function W(q){return`${q}`}function Q(q,g){let x=U(g);if(!x)throw TypeError(`[radiant-element] Unknown type "${g}"`);return C[x](q)}function X(q,g){let x=U(g);if(!x)throw TypeError(`[radiant-element] Unknown type "${g}"`);return(G[x]??G.default??W)(q)}function J(q){return typeof q==="boolean"}function K(q){return typeof q==="number"}function O(q){return typeof q==="string"}function j(q){return Array.isArray(q)}function S(q){return typeof q==="object"&&!Array.isArray(q)&&q!==null}function o(q,g){switch(q){case Boolean:return J(g);case Number:return K(g);case String:return O(g);case Array:return j(g);case Object:return S(g);default:return!1}}var n=(q,g,x,E)=>{if(g===Boolean){let L=q.getAttribute(x);if(L===null)return E;return L===""?!0:Q(L,g)}let H=q.getAttribute(x);return H!==null?Q(H,g):E??R(g)};function b(q){let g={},x=new Set;return m(q,g,x),w(q,g,x),N(q,g),g}function s(q){return Object.entries(q).map(([g,x])=>` ${g}="${Y(x)}"`).join("")}function m(q,g,x){for(let E of q.getReactiveProperties()){let H=q.getPropertyValue(E.name);if(H===void 0||H===null||H===!1)continue;g[E.attribute]=String(E.converter.toAttribute(H)),x.add(E.attribute)}}function w(q,g,x){for(let E of q.getReactivePropDefinitions()){let H=E.options.attribute??E.name;if(x.has(H))continue;let L=q.getPropertyValue(E.name);if(L===void 0||L===null||L===!1)continue;g[H]=String(X(L,E.options.type)),x.add(H)}}function N(q,g){for(let x of q.getAttributeNames()){let E=q.getAttribute(x);if(E!==null)g[x]=E}}export{s as stringifyHostAttributes,b as resolveHostAttributes};
|
|
2
|
+
|
|
3
|
+
//# debugId=2F1E135C72BF6A6B64756E2164756E21
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../src/utils/attribute
|
|
3
|
+
"sources": ["../src/utils/escape-html-attribute.ts", "../src/utils/attribute-utils.ts", "../src/server/host-attribute-serialization.ts"],
|
|
4
4
|
"sourcesContent": [
|
|
5
|
-
"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",
|
|
6
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",
|
|
7
|
-
"import type {
|
|
6
|
+
"import type { RadiantElement } from '../core/radiant-element';\n\nexport type AttributeTypeConstant = typeof Array | typeof Boolean | typeof Number | typeof Object | typeof String;\n\nexport type AttributeTypeDefault = Array<unknown> | boolean | number | Record<string, unknown> | string;\n\n/**\n * Parses the given attribute type constant and returns its corresponding string representation.\n *\n * @param constant - The attribute type constant to parse.\n * @returns The string representation of the attribute type constant.\n */\nexport function parseAttributeTypeConstant(constant?: AttributeTypeConstant) {\n\tswitch (constant) {\n\t\tcase Array:\n\t\t\treturn 'array';\n\t\tcase Boolean:\n\t\t\treturn 'boolean';\n\t\tcase Number:\n\t\t\treturn 'number';\n\t\tcase Object:\n\t\t\treturn 'object';\n\t\tcase String:\n\t\t\treturn 'string';\n\t}\n}\n\n/**\n * Parses the attribute type default value and returns its type as a string.\n *\n * @param defaultValue - The default value of the attribute type.\n * @returns The type of the default value as a string.\n */\nexport function parseAttributeTypeDefault(defaultValue?: AttributeTypeDefault) {\n\tswitch (typeof defaultValue) {\n\t\tcase 'boolean':\n\t\t\treturn 'boolean';\n\t\tcase 'number':\n\t\t\treturn 'number';\n\t\tcase 'string':\n\t\t\treturn 'string';\n\t}\n\n\tif (Array.isArray(defaultValue)) return 'array';\n\tif (Object.prototype.toString.call(defaultValue) === '[object Object]') return 'object';\n}\n\n/**\n * Returns the default value for a given attribute type.\n *\n * @param type - The attribute type constant.\n * @returns The default value for the specified attribute type.\n */\nexport function defaultValueForType(type: AttributeTypeConstant): unknown {\n\tswitch (type) {\n\t\tcase Number:\n\t\t\treturn 0;\n\t\tcase String:\n\t\t\treturn '';\n\t\tcase Boolean:\n\t\t\treturn false;\n\t\tdefault:\n\t\t\treturn null;\n\t}\n}\n\ntype Reader = (value: string) => number | string | boolean | object | unknown[];\n\n/**\n * Utility function to parse a JSON string safely\n */\nfunction parseJSON<T>(value: string): T {\n\ttry {\n\t\treturn JSON.parse(value);\n\t} catch {\n\t\tthrow new TypeError('Invalid JSON string');\n\t}\n}\n\n/**\n * Object that maps attribute types to reader functions.\n * @type {Object.<string, Reader>}\n */\nconst readers: { [type: string]: Reader } = {\n\tarray(value: string): unknown[] {\n\t\tconst array = parseJSON<unknown[]>(value);\n\t\tif (!Array.isArray(array)) {\n\t\t\tthrow new TypeError(`Expected an array but got a value of type \"${typeof array}\"`);\n\t\t}\n\t\treturn array;\n\t},\n\n\tboolean(value: string): boolean {\n\t\treturn !(value === '0' || String(value).toLowerCase() === 'false');\n\t},\n\n\tnumber(value: string): number {\n\t\tconst number = Number(value.replace(/_/g, ''));\n\t\treturn number;\n\t},\n\n\tobject(value: string): object {\n\t\tconst object = JSON.parse(value);\n\t\tif (object === null || typeof object !== 'object' || Array.isArray(object)) {\n\t\t\tthrow new TypeError(\n\t\t\t\t`expected value of type \"object\" but instead got value \"${value}\" of type \"${parseAttributeTypeDefault(\n\t\t\t\t\tobject,\n\t\t\t\t)}\"`,\n\t\t\t);\n\t\t}\n\t\treturn object;\n\t},\n\n\tstring(value: string): string {\n\t\treturn value;\n\t},\n};\n\ntype Writer = (value: unknown) => string;\n\n/**\n * Object that maps attribute types to writer functions.\n * @type {Object.<string, Writer>}\n */\nconst writers: { [type: string]: Writer } = {\n\tdefault: writeString,\n\tarray: writeJSON,\n\tobject: writeJSON,\n};\n\nfunction writeJSON(value: unknown) {\n\treturn JSON.stringify(value);\n}\n\nfunction writeString(value: unknown) {\n\treturn `${value}`;\n}\n\n/**\n * Reads the attribute value based on the provided type.\n * @param value - The attribute value to be read.\n * @param type - The type of the attribute.\n * @returns The parsed attribute value.\n * @throws {TypeError} If the provided type is unknown.\n */\nexport function readAttributeValue(value: string, type: AttributeTypeConstant) {\n\tconst readerType = parseAttributeTypeConstant(type);\n\tif (!readerType) throw new TypeError(`[radiant-element] Unknown type \"${type}\"`);\n\treturn readers[readerType]!(value);\n}\n\nexport type ReadAttributeValueReturnType = ReturnType<typeof readAttributeValue>;\n\n/**\n * Writes the attribute value based on the provided type.\n *\n * @param value - The value to be written.\n * @param type - The type of the attribute.\n * @returns The written attribute value.\n * @throws {TypeError} If the provided type is unknown.\n */\nexport function writeAttributeValue(value: unknown, type: AttributeTypeConstant) {\n\tconst writerType = parseAttributeTypeConstant(type);\n\tif (!writerType) throw new TypeError(`[radiant-element] Unknown type \"${type}\"`);\n\tconst writer: Writer = writers[writerType] ?? writers.default ?? writeString;\n\treturn writer(value);\n}\n\nexport type WriteAttributeValueReturnType = ReturnType<typeof writeAttributeValue>;\n\n/*\n * Type guard functions for each type in AttributeTypeConstant\n */\nfunction isBoolean(value: unknown): value is boolean {\n\treturn typeof value === 'boolean';\n}\n\nfunction isNumber(value: unknown): value is number {\n\treturn typeof value === 'number';\n}\n\nfunction isString(value: unknown): value is string {\n\treturn typeof value === 'string';\n}\n\nfunction isArray(value: unknown): value is Array<unknown> {\n\treturn Array.isArray(value);\n}\n\nfunction isObject(value: unknown): value is object {\n\treturn typeof value === 'object' && !Array.isArray(value) && value !== null;\n}\n\n/*\n * Check function to ensure defaultValue matches the type\n */\nexport function isValueOfType(type: AttributeTypeConstant, defaultValue: unknown): boolean {\n\tswitch (type) {\n\t\tcase Boolean:\n\t\t\treturn isBoolean(defaultValue);\n\t\tcase Number:\n\t\t\treturn isNumber(defaultValue);\n\t\tcase String:\n\t\t\treturn isString(defaultValue);\n\t\tcase Array:\n\t\t\treturn isArray(defaultValue);\n\t\tcase Object:\n\t\t\treturn isObject(defaultValue);\n\t\tdefault:\n\t\t\treturn false;\n\t}\n}\n\nexport const getInitialValue = (\n\ttarget: RadiantElement,\n\ttype: AttributeTypeConstant,\n\tattributeKey: string,\n\tdefaultValue: unknown,\n) => {\n\tif (type === Boolean) {\n\t\tconst attributeValue = target.getAttribute(attributeKey);\n\t\tif (attributeValue === null) {\n\t\t\treturn defaultValue;\n\t\t}\n\n\t\treturn attributeValue === '' ? true : readAttributeValue(attributeValue, type);\n\t}\n\n\tconst attributeValue = target.getAttribute(attributeKey);\n\treturn attributeValue !== null\n\t\t? readAttributeValue(attributeValue, type)\n\t\t: (defaultValue ?? (defaultValueForType(type) as typeof defaultValue));\n};\n",
|
|
7
|
+
"import type { 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"
|
|
8
8
|
],
|
|
9
|
-
"mappings": "
|
|
10
|
-
"debugId": "
|
|
9
|
+
"mappings": "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",
|
|
10
|
+
"debugId": "2F1E135C72BF6A6B64756E2164756E21",
|
|
11
11
|
"names": []
|
|
12
12
|
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
var{defineProperty:x,getOwnPropertyNames:B,getOwnPropertyDescriptor:C}=Object,D=Object.prototype.hasOwnProperty;function F(j){return this[j]}var K=(j)=>{var k=(z??=new WeakMap).get(j),q;if(k)return k;if(k=x({},"__esModule",{value:!0}),j&&typeof j==="object"||typeof j==="function"){for(var w of B(j))if(!D.call(k,w))x(k,w,{get:F.bind(j,w),enumerable:!(q=C(j,w))||q.enumerable})}return z.set(j,k),k},z;var G=(j)=>j;function J(j,k){this[j]=G.bind(null,k)}var N=(j,k)=>{for(var q in k)x(j,q,{get:k[q],enumerable:!0,configurable:!0,set:J.bind(k,q)})};var O=(j,k)=>()=>(j&&(k=j(j=0)),k);var P=((j)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(j,{get:(k,q)=>(typeof require<"u"?require:k)[q]}):j)(function(j){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+j+'" is not supported')});function R(j,k){if(!k)return`${j.hostContent}${j.authoredHydrationMarkup}${j.slotProjectionScript}`;return`${j.hostContent}${j.slotProjectionScript}${j.hydrationScripts}`}export{R as composeHostContent};
|
|
2
|
+
|
|
3
|
+
//# debugId=B2161565713629FB64756E2164756E21
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"sourcesContent": [
|
|
5
5
|
"/**\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"
|
|
6
6
|
],
|
|
7
|
-
"mappings": "
|
|
8
|
-
"debugId": "
|
|
7
|
+
"mappings": "i0BA2CO,SAAS,CAAkB,CAAC,EAAyB,EAA0B,CACrF,GAAI,CAAC,EACJ,MAAO,GAAG,EAAM,cAAc,EAAM,0BAA0B,EAAM,uBAGrE,MAAO,GAAG,EAAM,cAAc,EAAM,uBAAuB,EAAM",
|
|
8
|
+
"debugId": "B2161565713629FB64756E2164756E21",
|
|
9
9
|
"names": []
|
|
10
10
|
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
var{defineProperty:u,getOwnPropertyNames:b,getOwnPropertyDescriptor:x}=Object,m=Object.prototype.hasOwnProperty;function y(e){return this[e]}var P=(e)=>{var t=(l??=new WeakMap).get(e),n;if(t)return t;if(t=u({},"__esModule",{value:!0}),e&&typeof e==="object"||typeof e==="function"){for(var i of b(e))if(!m.call(t,i))u(t,i,{get:y.bind(e,i),enumerable:!(n=x(e,i))||n.enumerable})}return l.set(e,t),t},l;var T=(e)=>e;function k(e,t){this[e]=T.bind(null,t)}var W=(e,t)=>{for(var n in t)u(e,n,{get:t[n],enumerable:!0,configurable:!0,set:k.bind(t,n)})};var H=(e,t)=>()=>(e&&(t=e(e=0)),t);var A=((e)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,n)=>(typeof require<"u"?require:t)[n]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});function L(e){let t=[],n=0;while(n<e.length){let i=n;if(e.startsWith("<!--",n)){let s=e.indexOf("-->",n+4);n=s===-1?e.length:s+3,t.push(e.slice(i,n));continue}if(e[n]!=="<"){let s=e.indexOf("<",n);n=s===-1?e.length:s,t.push(e.slice(i,n));continue}let r=f(e,n);if(!r){t.push(e.slice(i));break}if(r.type!=="open"||r.selfClosing||a.has(r.tagName)){n=r.end,t.push(e.slice(i,n));continue}n=r.end;let c=1;while(n<e.length&&c>0){let s=e.indexOf("<",n);if(s===-1){n=e.length;break}let o=f(e,s);if(!o){n=e.length;break}if(n=o.end,o.type==="comment"||o.type==="declaration")continue;if(o.type==="open"&&!o.selfClosing&&!a.has(o.tagName)){c+=1;continue}if(o.type==="close")c-=1}t.push(e.slice(i,n))}return t.filter((i)=>i!=="")}function w(e,t){let n;for(let i=t+1;i<e.length;i+=1){let r=e[i];if(n){if(r===n)n=void 0;continue}if(r==='"'||r==="'"){n=r;continue}if(r===">")return i+1}return e.length}function C(e){let t={},n=/([:^@A-Za-z0-9_.-]+)(?:\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s"'>/]+)))?/g;for(let i of e.matchAll(n)){let[,r,c,s,o]=i;if(!r)continue;t[r]=c??s??o??""}return t}function f(e,t){if(e.startsWith("<!--",t)){let d=e.indexOf("-->",t+4);return{end:d===-1?e.length:d+3,type:"comment"}}let n=w(e,t),i=e.slice(t+1,n-1).trim();if(i==="")return;if(i.startsWith("!")||i.startsWith("?"))return{end:n,type:"declaration"};if(i.startsWith("/"))return{end:n,type:"close"};let r=/\/\s*$/.test(i),c=r?i.replace(/\/\s*$/,"").trim():i,s=c.split(/[\s/>]/,1)[0]?.toLowerCase()??"",o=s.length,g=c.slice(o).trim(),p=r||a.has(s)?"":N(e,t,n,s);return{attributes:C(g),end:n,innerHtml:p,selfClosing:r,tagName:s,type:"open"}}function N(e,t,n,i){let r=n,c=1;while(r<e.length&&c>0){let s=e.indexOf("<",r);if(s===-1)return e.slice(n);let o=f(e,s);if(!o)return e.slice(n);if(o.type==="open"&&o.tagName===i&&!o.selfClosing&&!a.has(i))c+=1;if(o.type==="close"){if(e.slice(s+2,o.end-1).trim().toLowerCase()===i){if(c-=1,c===0)return e.slice(n,s)}}r=o.end}return e.slice(n)}var a;var O=H(()=>{a=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"])});O();export{a as voidElementNames,f as parseHtmlTagToken,C as parseAttributes,w as findHtmlTagEnd,N as extractInnerHtmlFragment,L as collectTopLevelHtmlFragments};
|
|
2
|
+
|
|
3
|
+
//# debugId=28325EA44B8AA6B264756E2164756E21
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"sourcesContent": [
|
|
5
5
|
"export type ParsedHtmlTag = {\n\tattributes: Record<string, string>;\n\tend: number;\n\tinnerHtml: string;\n\tselfClosing: boolean;\n\ttagName: string;\n\ttype: 'open';\n};\n\nexport type ParsedHtmlToken =\n\t| ParsedHtmlTag\n\t| {\n\t\t\tend: number;\n\t\t\ttype: 'close';\n\t }\n\t| {\n\t\t\tend: number;\n\t\t\ttype: 'comment' | 'declaration';\n\t };\n\nexport const voidElementNames = new Set([\n\t'area',\n\t'base',\n\t'br',\n\t'col',\n\t'embed',\n\t'hr',\n\t'img',\n\t'input',\n\t'link',\n\t'meta',\n\t'param',\n\t'source',\n\t'track',\n\t'wbr',\n]);\n\nexport function collectTopLevelHtmlFragments(html: string): string[] {\n\tconst fragments: string[] = [];\n\tlet index = 0;\n\n\twhile (index < html.length) {\n\t\tconst fragmentStart = index;\n\n\t\tif (html.startsWith('<!--', index)) {\n\t\t\tconst commentEnd = html.indexOf('-->', index + 4);\n\t\t\tindex = commentEnd === -1 ? html.length : commentEnd + 3;\n\t\t\tfragments.push(html.slice(fragmentStart, index));\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (html[index] !== '<') {\n\t\t\tconst nextTagIndex = html.indexOf('<', index);\n\t\t\tindex = nextTagIndex === -1 ? html.length : nextTagIndex;\n\t\t\tfragments.push(html.slice(fragmentStart, index));\n\t\t\tcontinue;\n\t\t}\n\n\t\tconst token = parseHtmlTagToken(html, index);\n\n\t\tif (!token) {\n\t\t\tfragments.push(html.slice(fragmentStart));\n\t\t\tbreak;\n\t\t}\n\n\t\tif (token.type !== 'open' || token.selfClosing || voidElementNames.has(token.tagName)) {\n\t\t\tindex = token.end;\n\t\t\tfragments.push(html.slice(fragmentStart, index));\n\t\t\tcontinue;\n\t\t}\n\n\t\tindex = token.end;\n\t\tlet depth = 1;\n\n\t\twhile (index < html.length && depth > 0) {\n\t\t\tconst nextTagIndex = html.indexOf('<', index);\n\n\t\t\tif (nextTagIndex === -1) {\n\t\t\t\tindex = html.length;\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tconst nestedToken = parseHtmlTagToken(html, nextTagIndex);\n\n\t\t\tif (!nestedToken) {\n\t\t\t\tindex = html.length;\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tindex = nestedToken.end;\n\n\t\t\tif (nestedToken.type === 'comment' || nestedToken.type === 'declaration') {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (nestedToken.type === 'open' && !nestedToken.selfClosing && !voidElementNames.has(nestedToken.tagName)) {\n\t\t\t\tdepth += 1;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (nestedToken.type === 'close') {\n\t\t\t\tdepth -= 1;\n\t\t\t}\n\t\t}\n\n\t\tfragments.push(html.slice(fragmentStart, index));\n\t}\n\n\treturn fragments.filter((fragment) => fragment !== '');\n}\n\nexport function findHtmlTagEnd(html: string, startIndex: number): number {\n\tlet quote: '\"' | \"'\" | undefined;\n\n\tfor (let index = startIndex + 1; index < html.length; index += 1) {\n\t\tconst character = html[index];\n\n\t\tif (quote) {\n\t\t\tif (character === quote) {\n\t\t\t\tquote = undefined;\n\t\t\t}\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (character === '\"' || character === \"'\") {\n\t\t\tquote = character;\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (character === '>') {\n\t\t\treturn index + 1;\n\t\t}\n\t}\n\n\treturn html.length;\n}\n\nexport function parseAttributes(rawAttributes: string): Record<string, string> {\n\tconst attributes: Record<string, string> = {};\n\tconst attributePattern = /([:^@A-Za-z0-9_.-]+)(?:\\s*=\\s*(?:\"([^\"]*)\"|'([^']*)'|([^\\s\"'>/]+)))?/g;\n\n\tfor (const match of rawAttributes.matchAll(attributePattern)) {\n\t\tconst [, name, doubleQuoted, singleQuoted, bareValue] = match;\n\n\t\tif (!name) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tattributes[name] = doubleQuoted ?? singleQuoted ?? bareValue ?? '';\n\t}\n\n\treturn attributes;\n}\n\nexport function parseHtmlTagToken(html: string, startIndex: number): ParsedHtmlToken | undefined {\n\tif (html.startsWith('<!--', startIndex)) {\n\t\tconst endIndex = html.indexOf('-->', startIndex + 4);\n\t\treturn {\n\t\t\tend: endIndex === -1 ? html.length : endIndex + 3,\n\t\t\ttype: 'comment',\n\t\t};\n\t}\n\n\tconst endIndex = findHtmlTagEnd(html, startIndex);\n\tconst rawToken = html.slice(startIndex + 1, endIndex - 1).trim();\n\n\tif (rawToken === '') {\n\t\treturn undefined;\n\t}\n\n\tif (rawToken.startsWith('!') || rawToken.startsWith('?')) {\n\t\treturn {\n\t\t\tend: endIndex,\n\t\t\ttype: 'declaration',\n\t\t};\n\t}\n\n\tif (rawToken.startsWith('/')) {\n\t\treturn {\n\t\t\tend: endIndex,\n\t\t\ttype: 'close',\n\t\t};\n\t}\n\n\tconst selfClosing = /\\/\\s*$/.test(rawToken);\n\tconst tagBody = selfClosing ? rawToken.replace(/\\/\\s*$/, '').trim() : rawToken;\n\tconst tagName = tagBody.split(/[\\s/>]/, 1)[0]?.toLowerCase() ?? '';\n\tconst attributesStart = tagName.length;\n\tconst rawAttributes = tagBody.slice(attributesStart).trim();\n\tconst innerHtml =\n\t\tselfClosing || voidElementNames.has(tagName)\n\t\t\t? ''\n\t\t\t: extractInnerHtmlFragment(html, startIndex, endIndex, tagName);\n\n\treturn {\n\t\tattributes: parseAttributes(rawAttributes),\n\t\tend: endIndex,\n\t\tinnerHtml,\n\t\tselfClosing,\n\t\ttagName,\n\t\ttype: 'open',\n\t};\n}\n\nexport function extractInnerHtmlFragment(\n\thtml: string,\n\tstartIndex: number,\n\ttagEndIndex: number,\n\ttagName: string,\n): string {\n\tlet index = tagEndIndex;\n\tlet depth = 1;\n\n\twhile (index < html.length && depth > 0) {\n\t\tconst nextTagIndex = html.indexOf('<', index);\n\n\t\tif (nextTagIndex === -1) {\n\t\t\treturn html.slice(tagEndIndex);\n\t\t}\n\n\t\tconst nextTag = parseHtmlTagToken(html, nextTagIndex);\n\n\t\tif (!nextTag) {\n\t\t\treturn html.slice(tagEndIndex);\n\t\t}\n\n\t\tif (\n\t\t\tnextTag.type === 'open' &&\n\t\t\tnextTag.tagName === tagName &&\n\t\t\t!nextTag.selfClosing &&\n\t\t\t!voidElementNames.has(tagName)\n\t\t) {\n\t\t\tdepth += 1;\n\t\t}\n\n\t\tif (nextTag.type === 'close') {\n\t\t\tconst closingName = html\n\t\t\t\t.slice(nextTagIndex + 2, nextTag.end - 1)\n\t\t\t\t.trim()\n\t\t\t\t.toLowerCase();\n\n\t\t\tif (closingName === tagName) {\n\t\t\t\tdepth -= 1;\n\n\t\t\t\tif (depth === 0) {\n\t\t\t\t\treturn html.slice(tagEndIndex, nextTagIndex);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tindex = nextTag.end;\n\t}\n\n\treturn html.slice(tagEndIndex);\n}\n"
|
|
6
6
|
],
|
|
7
|
-
"mappings": "
|
|
8
|
-
"debugId": "
|
|
7
|
+
"mappings": "i0BAqCO,SAAS,CAA4B,CAAC,EAAwB,CACpE,IAAM,EAAsB,CAAC,EACzB,EAAQ,EAEZ,MAAO,EAAQ,EAAK,OAAQ,CAC3B,IAAM,EAAgB,EAEtB,GAAI,EAAK,WAAW,OAAQ,CAAK,EAAG,CACnC,IAAM,EAAa,EAAK,QAAQ,MAAO,EAAQ,CAAC,EAChD,EAAQ,IAAe,GAAK,EAAK,OAAS,EAAa,EACvD,EAAU,KAAK,EAAK,MAAM,EAAe,CAAK,CAAC,EAC/C,SAGD,GAAI,EAAK,KAAW,IAAK,CACxB,IAAM,EAAe,EAAK,QAAQ,IAAK,CAAK,EAC5C,EAAQ,IAAiB,GAAK,EAAK,OAAS,EAC5C,EAAU,KAAK,EAAK,MAAM,EAAe,CAAK,CAAC,EAC/C,SAGD,IAAM,EAAQ,EAAkB,EAAM,CAAK,EAE3C,GAAI,CAAC,EAAO,CACX,EAAU,KAAK,EAAK,MAAM,CAAa,CAAC,EACxC,MAGD,GAAI,EAAM,OAAS,QAAU,EAAM,aAAe,EAAiB,IAAI,EAAM,OAAO,EAAG,CACtF,EAAQ,EAAM,IACd,EAAU,KAAK,EAAK,MAAM,EAAe,CAAK,CAAC,EAC/C,SAGD,EAAQ,EAAM,IACd,IAAI,EAAQ,EAEZ,MAAO,EAAQ,EAAK,QAAU,EAAQ,EAAG,CACxC,IAAM,EAAe,EAAK,QAAQ,IAAK,CAAK,EAE5C,GAAI,IAAiB,GAAI,CACxB,EAAQ,EAAK,OACb,MAGD,IAAM,EAAc,EAAkB,EAAM,CAAY,EAExD,GAAI,CAAC,EAAa,CACjB,EAAQ,EAAK,OACb,MAKD,GAFA,EAAQ,EAAY,IAEhB,EAAY,OAAS,WAAa,EAAY,OAAS,cAC1D,SAGD,GAAI,EAAY,OAAS,QAAU,CAAC,EAAY,aAAe,CAAC,EAAiB,IAAI,EAAY,OAAO,EAAG,CAC1G,GAAS,EACT,SAGD,GAAI,EAAY,OAAS,QACxB,GAAS,EAIX,EAAU,KAAK,EAAK,MAAM,EAAe,CAAK,CAAC,EAGhD,OAAO,EAAU,OAAO,CAAC,IAAa,IAAa,EAAE,EAG/C,SAAS,CAAc,CAAC,EAAc,EAA4B,CACxE,IAAI,EAEJ,QAAS,EAAQ,EAAa,EAAG,EAAQ,EAAK,OAAQ,GAAS,EAAG,CACjE,IAAM,EAAY,EAAK,GAEvB,GAAI,EAAO,CACV,GAAI,IAAc,EACjB,EAAQ,OAET,SAGD,GAAI,IAAc,KAAO,IAAc,IAAK,CAC3C,EAAQ,EACR,SAGD,GAAI,IAAc,IACjB,OAAO,EAAQ,EAIjB,OAAO,EAAK,OAGN,SAAS,CAAe,CAAC,EAA+C,CAC9E,IAAM,EAAqC,CAAC,EACtC,EAAmB,wEAEzB,QAAW,KAAS,EAAc,SAAS,CAAgB,EAAG,CAC7D,KAAS,EAAM,EAAc,EAAc,GAAa,EAExD,GAAI,CAAC,EACJ,SAGD,EAAW,GAAQ,GAAgB,GAAgB,GAAa,GAGjE,OAAO,EAGD,SAAS,CAAiB,CAAC,EAAc,EAAiD,CAChG,GAAI,EAAK,WAAW,OAAQ,CAAU,EAAG,CACxC,IAAM,EAAW,EAAK,QAAQ,MAAO,EAAa,CAAC,EACnD,MAAO,CACN,IAAK,IAAa,GAAK,EAAK,OAAS,EAAW,EAChD,KAAM,SACP,EAGD,IAAM,EAAW,EAAe,EAAM,CAAU,EAC1C,EAAW,EAAK,MAAM,EAAa,EAAG,EAAW,CAAC,EAAE,KAAK,EAE/D,GAAI,IAAa,GAChB,OAGD,GAAI,EAAS,WAAW,GAAG,GAAK,EAAS,WAAW,GAAG,EACtD,MAAO,CACN,IAAK,EACL,KAAM,aACP,EAGD,GAAI,EAAS,WAAW,GAAG,EAC1B,MAAO,CACN,IAAK,EACL,KAAM,OACP,EAGD,IAAM,EAAc,SAAS,KAAK,CAAQ,EACpC,EAAU,EAAc,EAAS,QAAQ,SAAU,EAAE,EAAE,KAAK,EAAI,EAChE,EAAU,EAAQ,MAAM,SAAU,CAAC,EAAE,IAAI,YAAY,GAAK,GAC1D,EAAkB,EAAQ,OAC1B,EAAgB,EAAQ,MAAM,CAAe,EAAE,KAAK,EACpD,EACL,GAAe,EAAiB,IAAI,CAAO,EACxC,GACA,EAAyB,EAAM,EAAY,EAAU,CAAO,EAEhE,MAAO,CACN,WAAY,EAAgB,CAAa,EACzC,IAAK,EACL,YACA,cACA,UACA,KAAM,MACP,EAGM,SAAS,CAAwB,CACvC,EACA,EACA,EACA,EACS,CACT,IAAI,EAAQ,EACR,EAAQ,EAEZ,MAAO,EAAQ,EAAK,QAAU,EAAQ,EAAG,CACxC,IAAM,EAAe,EAAK,QAAQ,IAAK,CAAK,EAE5C,GAAI,IAAiB,GACpB,OAAO,EAAK,MAAM,CAAW,EAG9B,IAAM,EAAU,EAAkB,EAAM,CAAY,EAEpD,GAAI,CAAC,EACJ,OAAO,EAAK,MAAM,CAAW,EAG9B,GACC,EAAQ,OAAS,QACjB,EAAQ,UAAY,GACpB,CAAC,EAAQ,aACT,CAAC,EAAiB,IAAI,CAAO,EAE7B,GAAS,EAGV,GAAI,EAAQ,OAAS,SAMpB,GALoB,EAClB,MAAM,EAAe,EAAG,EAAQ,IAAM,CAAC,EACvC,KAAK,EACL,YAAY,IAEM,GAGnB,GAFA,GAAS,EAEL,IAAU,EACb,OAAO,EAAK,MAAM,EAAa,CAAY,GAK9C,EAAQ,EAAQ,IAGjB,OAAO,EAAK,MAAM,CAAW,MAzOjB,iBAAmB,IAAI,IAAI,CACvC,OACA,OACA,KACA,MACA,QACA,KACA,MACA,QACA,OACA,OACA,QACA,SACA,QACA,KACD,CAAC",
|
|
8
|
+
"debugId": "28325EA44B8AA6B264756E2164756E21",
|
|
9
9
|
"names": []
|
|
10
10
|
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
var{defineProperty:o,getOwnPropertyNames:W,getOwnPropertyDescriptor:S}=Object,E=Object.prototype.hasOwnProperty;function d(r){return this[r]}var k=(r)=>{var t=(L??=new WeakMap).get(r),s;if(t)return t;if(t=o({},"__esModule",{value:!0}),r&&typeof r==="object"||typeof r==="function"){for(var n of W(r))if(!E.call(t,n))o(t,n,{get:d.bind(r,n),enumerable:!(s=S(r,n))||s.enumerable})}return L.set(r,t),t},L;var D=(r)=>r;function I(r,t){this[r]=D.bind(null,t)}var M=(r,t)=>{for(var s in t)o(r,s,{get:t[s],enumerable:!0,configurable:!0,set:I.bind(t,s)})};var q=(r,t)=>()=>(r&&(t=r(r=0)),t);var cr=((r)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(r,{get:(t,s)=>(typeof require<"u"?require:t)[s]}):r)(function(r){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+r+'" is not supported')});function Q(r){return r.replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">")}function U(r){let t=[],s=0;while(s<r.length){let n=s;if(r.startsWith("<!--",s)){let f=r.indexOf("-->",s+4);s=f===-1?r.length:f+3,t.push(r.slice(n,s));continue}if(r[s]!=="<"){let f=r.indexOf("<",s);s=f===-1?r.length:f,t.push(r.slice(n,s));continue}let i=H(r,s);if(!i){t.push(r.slice(n));break}if(i.type!=="open"||i.selfClosing||b.has(i.tagName)){s=i.end,t.push(r.slice(n,s));continue}s=i.end;let e=1;while(s<r.length&&e>0){let f=r.indexOf("<",s);if(f===-1){s=r.length;break}let c=H(r,f);if(!c){s=r.length;break}if(s=c.end,c.type==="comment"||c.type==="declaration")continue;if(c.type==="open"&&!c.selfClosing&&!b.has(c.tagName)){e+=1;continue}if(c.type==="close")e-=1}t.push(r.slice(n,s))}return t.filter((n)=>n!=="")}function l(r,t){let s;for(let n=t+1;n<r.length;n+=1){let i=r[n];if(s){if(i===s)s=void 0;continue}if(i==='"'||i==="'"){s=i;continue}if(i===">")return n+1}return r.length}function m(r){let t={},s=/([:^@A-Za-z0-9_.-]+)(?:\s*=\s*(?:"([^"]*)"|'([^']*)'|([^\s"'>/]+)))?/g;for(let n of r.matchAll(s)){let[,i,e,f,c]=n;if(!i)continue;t[i]=e??f??c??""}return t}function H(r,t){if(r.startsWith("<!--",t)){let z=r.indexOf("-->",t+4);return{end:z===-1?r.length:z+3,type:"comment"}}let s=l(r,t),n=r.slice(t+1,s-1).trim();if(n==="")return;if(n.startsWith("!")||n.startsWith("?"))return{end:s,type:"declaration"};if(n.startsWith("/"))return{end:s,type:"close"};let i=/\/\s*$/.test(n),e=i?n.replace(/\/\s*$/,"").trim():n,f=e.split(/[\s/>]/,1)[0]?.toLowerCase()??"",c=f.length,F=e.slice(c).trim(),$=i||b.has(f)?"":rr(r,t,s,f);return{attributes:m(F),end:s,innerHtml:$,selfClosing:i,tagName:f,type:"open"}}function rr(r,t,s,n){let i=s,e=1;while(i<r.length&&e>0){let f=r.indexOf("<",i);if(f===-1)return r.slice(s);let c=H(r,f);if(!c)return r.slice(s);if(c.type==="open"&&c.tagName===n&&!c.selfClosing&&!b.has(n))e+=1;if(c.type==="close"){if(r.slice(f+2,c.end-1).trim().toLowerCase()===n){if(e-=1,e===0)return r.slice(s,f)}}i=c.end}return r.slice(s)}var b;var Z=q(()=>{b=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"])});function g(){return B??=(X(),k(V)),B}class j{element;constructor(r){this.element=r}add(...r){let t=new Set(this.readTokens());for(let s of r)if(s!=="")t.add(s);this.writeTokens([...t])}remove(...r){let t=new Set(this.readTokens());for(let s of r)t.delete(s);this.writeTokens([...t])}toggle(r,t){let s=this.contains(r);if(t??!s)return this.add(r),!0;return this.remove(r),!1}contains(r){return this.readTokens().includes(r)}toString(){return this.value}get value(){return this.element.getAttribute("class")??""}readTokens(){return this.value.split(/\s+/).map((r)=>r.trim()).filter((r)=>r.length>0)}writeTokens(r){if(r.length===0){this.element.removeAttribute("class");return}this.element.setAttribute("class",r.join(" "))}}class O{bubbles;cancelable;composed;type;constructor(r,t={}){this.type=r,this.bubbles=t.bubbles??!1,this.cancelable=t.cancelable??!1,this.composed=t.composed??!1}}function tr(r){return new a(r,T())}function T(){return globalThis.document??null}var B,u,a,P,A,x,p;var C=q(()=>{u=class u extends EventTarget{nodeType;static DOCUMENT_NODE=9;static ELEMENT_NODE=1;static TEXT_NODE=3;childNodes=[];ownerDocument;parentNode=null;constructor(r,t=null){super();this.nodeType=r;this.ownerDocument=t}append(...r){for(let t of r)this.appendChild(typeof t==="string"?tr(t):t)}appendChild(r){if("parentNode"in r&&r.parentNode&&"removeChild"in r.parentNode)r.parentNode.removeChild(r);return this.childNodes.push(r),r.ownerDocument=this.nodeType===u.DOCUMENT_NODE?this:this.ownerDocument,r.parentNode=this,r}removeChild(r){let t=this.childNodes.indexOf(r);if(t===-1)return r;return this.childNodes.splice(t,1),r.parentNode=null,r}replaceChildren(...r){for(let t of this.childNodes)t.parentNode=null;this.childNodes=[],this.append(...r)}get textContent(){return this.childNodes.map((r)=>r.textContent??"").join("")}set textContent(r){this.replaceChildren(r??"")}getRootNode(){let r=this;while("parentNode"in r&&r.parentNode)r=r.parentNode;return r}};a=class a extends u{value;constructor(r,t=T()){super(u.TEXT_NODE,t);this.value=r}get textContent(){return this.value}set textContent(r){this.value=r??""}};P=class P extends u{attributes=new Map;classListValue;datasetValue;fragmentHtml;fragmentText;localName;tagName;constructor(r="div",t=T()){super(u.ELEMENT_NODE,t);this.localName=r.toLowerCase(),this.tagName=this.localName.toUpperCase()}get id(){return this.getAttribute("id")??""}set id(r){if(r===""){this.removeAttribute("id");return}this.setAttribute("id",r)}get classList(){return this.classListValue??=new j(this),this.classListValue}get dataset(){return this.datasetValue??=new Proxy({},{deleteProperty:(r,t)=>{if(typeof t!=="string")return!1;return this.removeAttribute(g().toDataAttributeName(t)),!0},get:(r,t)=>{if(typeof t!=="string")return;return this.getAttribute(g().toDataAttributeName(t))??void 0},getOwnPropertyDescriptor:(r,t)=>{if(typeof t!=="string")return;return{configurable:!0,enumerable:!0,value:this.getAttribute(g().toDataAttributeName(t))??void 0,writable:!0}},has:(r,t)=>{return typeof t==="string"&&this.hasAttribute(g().toDataAttributeName(t))},ownKeys:()=>{return this.getAttributeNames().filter((r)=>r.startsWith("data-")).map((r)=>g().toDatasetPropertyName(r.slice(5)))},set:(r,t,s)=>{if(typeof t!=="string")return!1;return this.setAttribute(g().toDataAttributeName(t),String(s)),!0}}),this.datasetValue}hasAttribute(r){return this.attributes.has(r)}getAttribute(r){return this.attributes.get(r)??null}getAttributeNames(){return Array.from(this.attributes.keys())}setAttribute(r,t){this.fragmentHtml=void 0,this.attributes.set(r,String(t))}toggleAttribute(r,t){if(t??!this.hasAttribute(r))return this.setAttribute(r,""),!0;return this.removeAttribute(r),!1}removeAttribute(r){this.fragmentHtml=void 0,this.attributes.delete(r)}querySelector(){return null}querySelectorAll(){return[]}matches(){return!1}get outerHTML(){if(this.fragmentHtml!==void 0)return this.fragmentHtml;let r=Array.from(this.attributes.entries()).map(([t,s])=>` ${t}="${Q(s)}"`).join("");return`<${this.localName}${r}>${this.innerHTML}</${this.localName}>`}get innerHTML(){return this.childNodes.map((r)=>g().serializeNodeHtml(r)).join("")}set innerHTML(r){this.fragmentHtml=void 0,this.fragmentText=void 0,this.replaceChildren(...g().parseHtmlToNodes(r,this.ownerDocument))}get textContent(){return this.fragmentText??super.textContent??""}set textContent(r){this.fragmentHtml=void 0,this.fragmentText=r??"",super.textContent=r}setSerializedFragment(r,t,s){this.fragmentHtml=r,this.fragmentText=t,this.attributes=new Map(Object.entries(s)),this.replaceChildren()}};A=class A extends O{detail;constructor(r,t={}){super(r,t);this.detail=t.detail}};x=class x extends P{isConnected=!1;constructor(r="div",t=T()){super(r,t)}insertAdjacentHTML(r,t){this.append(...g().parseHtmlToNodes(t,this.ownerDocument))}};p=class p extends x{constructor(r=T()){super("script",r)}}});var V={};M(V,{toDatasetPropertyName:()=>ir,toDataAttributeName:()=>nr,serializeNodeHtml:()=>er,parseHtmlToNodes:()=>sr,extractTextContent:()=>J,createElementFromFragment:()=>G});function G(r,t,s){let n=t.tagName==="script"?new p(s):new x(t.tagName,s);return n.setSerializedFragment(r,J(t.innerHtml),t.attributes),n}function J(r){return r.replace(/<!--.*?-->/gs,"").replace(/<[^>]+>/g,"")}function sr(r,t=T()){return U(r).map((s)=>{if(!s.startsWith("<"))return new a(s,t);let n=H(s,0);if(!n||n.type!=="open")return new a(s,t);return G(s,n,t)})}function nr(r){return`data-${r.replace(/([A-Z])/g,"-$1").toLowerCase()}`}function ir(r){return r.replace(/-([a-z])/g,(t,s)=>s.toUpperCase())}function er(r){if(r.nodeType===u.TEXT_NODE)return r.textContent??"";return"outerHTML"in r&&typeof r.outerHTML==="string"?r.outerHTML:r.textContent??""}var X=q(()=>{Z();C()});function N(r){let t=globalThis.CSS;if(typeof t?.escape==="function")return t.escape(r);let s="";for(let n=0;n<r.length;n+=1){let i=r[n]??"",e=i.codePointAt(0)??0;if(e===0){s+="�";continue}let f=e>=1&&e<=31||e===127,c=n===0&&e>=48&&e<=57,F=n===1&&e>=48&&e<=57&&(r[0]??"")==="-",$=n===0&&i==="-"&&r.length===1;if(f||c||F){s+=`\\${e.toString(16)} `;continue}if(e>=128||i==="-"||i==="_"||e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122){s+=$?`\\${i}`:i;continue}s+=`\\${i}`}return s}C();class R extends u{constructor(){super(u.DOCUMENT_NODE)}createElement(r){return r.toLowerCase()==="script"?new p(this):new x(r,this)}createTextNode(r){return new a(r,this)}querySelector(){return null}querySelectorAll(){return[]}}class _{definitions=new Map;define(r,t){if(this.definitions.has(r))return;this.definitions.set(r,t)}get(r){return this.definitions.get(r)}}C();var h,w={escape(r){return N(String(r))}};function K(){let r=globalThis,t=r.customElements;if(typeof r.Node>"u"||typeof r.Document>"u"||typeof r.Element>"u"||typeof r.HTMLElement>"u"||typeof r.document>"u"||!t||typeof t.define!=="function"||typeof t.get!=="function")return;return r.window??{CSS:r.CSS??w,CustomEvent:r.CustomEvent??A,Document:r.Document,Element:r.Element,Event:r.Event??O,EventTarget:r.EventTarget??EventTarget,HTMLScriptElement:r.HTMLScriptElement??r.HTMLElement,HTMLElement:r.HTMLElement,Node:r.Node,document:r.document,customElements:t}}function Y(){let r=K();if(r)return r;return y()}function fr(){return Y(),{prepareHost(r,t={}){if(t.authoredContent!==void 0)r.innerHTML=t.authoredContent}}}function y(){let r=K();if(r)return r;if(h)return h;let t=new _,s=new R,n=globalThis.Event??O,i=globalThis.CustomEvent??A,e=R,f=globalThis.EventTarget??EventTarget;return h={CSS:globalThis.CSS??w,CustomEvent:i,Document:e,Element:P,Event:n,EventTarget:f,HTMLScriptElement:p,HTMLElement:x,Node:u,document:s,customElements:t},Object.assign(globalThis,{CSS:globalThis.CSS??w,CustomEvent:i,Document:e,Element:P,Event:n,EventTarget:f,HTMLScriptElement:p,HTMLElement:x,Node:u,document:s,customElements:t,window:h}),h}y();
|
|
2
|
+
|
|
3
|
+
//# debugId=A6146C0864FAA9AE64756E2164756E21
|