@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
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"sourcesContent": [
|
|
5
5
|
"import { asyncState, state, type AsyncStateFetcherOptions, type AsyncStateResult } from '@ecopages/signals';\nimport type { RadiantElement } from '../core/radiant-element';\n\nexport type ResourceContext<Host extends RadiantElement> = {\n\thost: Host;\n};\n\nexport type ResourceRequestContext<Host extends RadiantElement> = ResourceContext<Host> & AsyncStateFetcherOptions;\n\ntype HostResourceBaseConfig<Host extends RadiantElement, Value> = {\n\t/** Seed value exposed from `data` before the first successful resolution. */\n\tinitialValue?: Value;\n\n\t/** Milliseconds a successful response stays fresh in the per-instance cache. */\n\tstaleTime?: number;\n\n\t/** Milliseconds to wait before transitioning `status` to `'pending'`. */\n\tpendingDelay?: number;\n\n\t/** Called after each successful resolution, including cache hits. */\n\tonSuccess?: (data: Value, ctx: ResourceContext<Host>) => void;\n\n\t/** Called after each failed resolution. Not called for aborted requests. */\n\tonError?: (error: unknown, ctx: ResourceContext<Host>) => void;\n\n\t/** Called after each resolution, whether successful or failed. */\n\tonSettled?: (data: Value | undefined, error: unknown, ctx: ResourceContext<Host>) => void;\n};\n\n/** Configuration for a host-owned resource that fetches on connect. */\nexport interface HostResourceConfig<Host extends RadiantElement, Value> extends HostResourceBaseConfig<Host, Value> {\n\tfetcher: (ctx: ResourceRequestContext<Host>) => Promise<Value>;\n\tsource?: undefined;\n}\n\n/** Configuration for a host-owned resource driven by a reactive source. */\nexport interface HostResourceSourcedConfig<Host extends RadiantElement, Source, Value> extends HostResourceBaseConfig<\n\tHost,\n\tValue\n> {\n\t/**\n\t * Returns the current source value while the host is connected.\n\t *\n\t * Falsy values (`false`, `null`, `undefined`) disable fetching and preserve\n\t * the current resource state.\n\t */\n\tsource: (ctx: ResourceContext<Host>) => Source | false | null | undefined;\n\n\tfetcher: (sourceValue: Source, ctx: ResourceRequestContext<Host>) => Promise<Value>;\n}\n\nexport class HostResource<Host extends RadiantElement, Value, Source = never> implements AsyncStateResult<Value> {\n\treadonly data: AsyncStateResult<Value>['data'];\n\treadonly status: AsyncStateResult<Value>['status'];\n\treadonly error: AsyncStateResult<Value>['error'];\n\n\tprivate readonly connected = state(false);\n\tprivate readonly resource: AsyncStateResult<Value>;\n\tprivate disposed = false;\n\n\tconstructor(host: Host, config: HostResourceConfig<Host, Value> | HostResourceSourcedConfig<Host, Source, Value>) {\n\t\tconst context: ResourceContext<Host> = { host };\n\t\tconst baseConfig = {\n\t\t\tinitialValue: config.initialValue,\n\t\t\tpendingDelay: config.pendingDelay,\n\t\t\tstaleTime: config.staleTime,\n\t\t\tonError: (error: unknown) => {\n\t\t\t\tconfig.onError?.(error, context);\n\t\t\t},\n\t\t\tonSettled: (data: Value | undefined, error: unknown) => {\n\t\t\t\tconfig.onSettled?.(data, error, context);\n\t\t\t},\n\t\t\tonSuccess: (data: Value) => {\n\t\t\t\tconfig.onSuccess?.(data, context);\n\t\t\t},\n\t\t};\n\n\t\tif (config.source) {\n\t\t\tthis.resource = asyncState({\n\t\t\t\t...baseConfig,\n\t\t\t\tsource: () => {\n\t\t\t\t\tif (this.disposed || !this.connected.get()) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn config.source(context);\n\t\t\t\t},\n\t\t\t\tfetcher: (sourceValue, options) => config.fetcher(sourceValue as Source, { ...context, ...options }),\n\t\t\t});\n\t\t} else {\n\t\t\tthis.resource = asyncState({\n\t\t\t\t...baseConfig,\n\t\t\t\tsource: () => {\n\t\t\t\t\tif (this.disposed || !this.connected.get()) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn true;\n\t\t\t\t},\n\t\t\t\tfetcher: (_connected, options) => config.fetcher({ ...context, ...options }),\n\t\t\t});\n\t\t}\n\n\t\tthis.data = this.resource.data;\n\t\tthis.status = this.resource.status;\n\t\tthis.error = this.resource.error;\n\t}\n\n\tpublic connect(): void {\n\t\tif (this.disposed || this.connected.get()) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.connected.set(true);\n\t}\n\n\tpublic disconnect(): void {\n\t\tif (this.disposed || !this.connected.get()) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.connected.set(false);\n\t\tthis.resource.abort();\n\t}\n\n\tpublic refetch(): void {\n\t\tif (this.disposed || !this.connected.get()) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.resource.refetch();\n\t}\n\n\tpublic abort(): void {\n\t\tif (this.disposed) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.resource.abort();\n\t}\n\n\tpublic dispose(): void {\n\t\tif (this.disposed) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.disposed = true;\n\t\tthis.connected.set(false);\n\t\tthis.resource.dispose();\n\t}\n}\n\nexport function createHostResource<Host extends RadiantElement, Value>(\n\thost: Host,\n\tconfig: HostResourceConfig<Host, Value>,\n): HostResource<Host, Value>;\nexport function createHostResource<Host extends RadiantElement, Source, Value>(\n\thost: Host,\n\tconfig: HostResourceSourcedConfig<Host, Source, Value>,\n): HostResource<Host, Value, Source>;\nexport function createHostResource<Host extends RadiantElement, Source, Value>(\n\thost: Host,\n\tconfig: HostResourceConfig<Host, Value> | HostResourceSourcedConfig<Host, Source, Value>,\n): HostResource<Host, Value, Source> {\n\treturn new HostResource<Host, Value, Source>(host, config);\n}\n\n/**\n * Creates a host-owned resource and registers connect/disconnect lifecycle\n * hooks on the provided host.\n */\nexport function createResource<Host extends RadiantElement, Value>(\n\thost: Host,\n\tconfig: HostResourceConfig<Host, Value>,\n): HostResource<Host, Value>;\nexport function createResource<Host extends RadiantElement, Source, Value>(\n\thost: Host,\n\tconfig: HostResourceSourcedConfig<Host, Source, Value>,\n): HostResource<Host, Value, Source>;\nexport function createResource<Host extends RadiantElement, Source, Value>(\n\thost: Host,\n\tconfig: HostResourceConfig<Host, Value> | HostResourceSourcedConfig<Host, Source, Value>,\n): HostResource<Host, Value, Source> {\n\tconst hostResource = new HostResource<Host, Value, Source>(host, config);\n\n\thost.registerConnectedCallback(() => {\n\t\thostResource.connect();\n\t});\n\n\thost.registerCleanupCallback(() => {\n\t\thostResource.disconnect();\n\t});\n\n\treturn hostResource;\n}\n"
|
|
6
6
|
],
|
|
7
|
-
"mappings": "
|
|
8
|
-
"debugId": "
|
|
7
|
+
"mappings": "i0BAAA,qBAAS,WAAY,0BAmDd,MAAM,CAAoG,CACvG,KACA,OACA,MAEQ,UAAY,EAAM,EAAK,EACvB,SACT,SAAW,GAEnB,WAAW,CAAC,EAAY,EAA0F,CACjH,IAAM,EAAiC,CAAE,MAAK,EACxC,EAAa,CAClB,aAAc,EAAO,aACrB,aAAc,EAAO,aACrB,UAAW,EAAO,UAClB,QAAS,CAAC,IAAmB,CAC5B,EAAO,UAAU,EAAO,CAAO,GAEhC,UAAW,CAAC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,EAenD,SAAS,CAA0D,CACzE,EACA,EACoC,CACpC,IAAM,EAAe,IAAI,EAAkC,EAAM,CAAM,EAUvE,OARA,EAAK,0BAA0B,IAAM,CACpC,EAAa,QAAQ,EACrB,EAED,EAAK,wBAAwB,IAAM,CAClC,EAAa,WAAW,EACxB,EAEM",
|
|
8
|
+
"debugId": "F65DC9B1873E2BD464756E2164756E21",
|
|
9
9
|
"names": []
|
|
10
10
|
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { type JsxRenderable } from '@ecopages/jsx';
|
|
2
2
|
import { type WritableSignal } from '@ecopages/signals';
|
|
3
|
+
import type { ReactiveState } from '../core/reactivity-contract';
|
|
3
4
|
import type { SsrSerializableHydrationBinding } from '../core/ssr-hydration-binding';
|
|
4
5
|
import type { AttributeTypeConstant } from '../utils/attribute-utils';
|
|
5
6
|
type HostSignalOwner = {
|
|
6
|
-
|
|
7
|
+
registerReactiveMember<Value>(property: string, signal: ReactiveState<Value>): void;
|
|
7
8
|
};
|
|
8
9
|
type HostSignalOptions<Value> = {
|
|
9
10
|
host: HostSignalOwner;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
var{defineProperty:F,getOwnPropertyNames:b,getOwnPropertyDescriptor:x}=Object,K=Object.prototype.hasOwnProperty;function N(q){return this[q]}var I=(q)=>{var G=(C??=new WeakMap).get(q),Q;if(G)return G;if(G=F({},"__esModule",{value:!0}),q&&typeof q==="object"||typeof q==="function"){for(var X of b(q))if(!K.call(G,X))F(G,X,{get:N.bind(q,X),enumerable:!(Q=x(q,X))||Q.enumerable})}return C.set(q,G),G},C;var S=(q)=>q;function Y(q,G){this[q]=S.bind(null,G)}var A=(q,G)=>{for(var Q in G)F(q,Q,{get:G[Q],enumerable:!0,configurable:!0,set:Y.bind(G,Q)})};var R=(q,G)=>()=>(q&&(G=q(q=0)),G);var m=((q)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(q,{get:(G,Q)=>(typeof require<"u"?require:G)[Q]}):q)(function(q){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+q+'" is not supported')});function L(q){return q.replace(/&/g,"\\u0026").replace(/</g,"\\u003c").replace(/>/g,"\\u003e").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}var j="data-hydration",P="data-hydration-type",W="data-hydration-key";function z(q){let G=q.hydrationKey?` ${W}="${_(q.hydrationKey)}"`:"";return`<script type="application/json" ${j} ${P}="${q.type}"${G}>${q.serializedValue}</script>`}function g(q){return L(q)}function f(q,G){let Q=q.textContent;if(!Q)return G;try{return JSON.parse(Q)}catch{if(typeof console<"u")console.warn(`[@ecopages/radiant] Failed to parse hydration payload from <script ${j}>:`,Q.slice(0,120));return G}}function B(q,G,Q){let X=q.children;if(!X||X.length===0){let Z=q.childNodes;if(!Z||Z.length===0)return null;for(let $=0;$<Z.length;$+=1){let w=Z[$];if(w.nodeType!==1)continue;let J=w;if(M(J,G,Q))return J}return null}for(let Z=0;Z<X.length;Z+=1)if(M(X[Z],G,Q))return X[Z];return null}function M(q,G,Q){if(q.tagName!=="SCRIPT"||!q.hasAttribute(j)||q.getAttribute(P)!==G)return!1;if(Q!==void 0)return q.getAttribute(W)===Q;return!q.hasAttribute(W)}function _(q){return q.replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">")}function D(q){return z({type:"signal",...q})}function U(q){return g(q)}import{createMarkupNodeLike as k}from"@ecopages/jsx";import{state as E}from"@ecopages/signals";function d(q){return typeof q==="object"&&q!==null&&typeof q.get==="function"&&typeof q.set==="function"&&typeof q.subscribe==="function"&&typeof q.update==="function"}class O{host;hydrate;hydrationKey;property;source;currentValue;hasAppliedHostHydration=!1;sourceUnsubscribe;constructor(q){this.host=q.host,this.hydrate=q.hydrate,this.hydrationKey=q.hydrationKey,this.property=q.property,this.source=q.source??E(this.resolveInitialValue(q.initialValue)),this.currentValue=this.source.get(),this.host.registerReactiveMember(this.property,this.source)}get(){return this.source.get()}set(q){this.source.set(q)}subscribe(q){return this.source.subscribe(q)}update(q){this.set(q(this.get()))}connectToSource(){if(this.sourceUnsubscribe)return;let q=this.source.get();if(!Object.is(this.currentValue,q))this.currentValue=q;this.sourceUnsubscribe=this.source.subscribe((G)=>{this.handleSourceChange(G)})}disconnectFromSource(){this.sourceUnsubscribe?.(),this.sourceUnsubscribe=void 0}hydrateFromHost(){if(!this.hydrate||this.hasAppliedHostHydration)return;this.hasAppliedHostHydration=!0;let q=this.source.get(),G=this.resolveInitialValue(q);if(!Object.is(q,G))this.source.set(G),this.currentValue=this.source.get()}renderHydrationScript(){let q=this.renderHydrationScriptTag();if(!q)return;return k(q)}renderHydrationScriptTag(){let q=this.serializeHydrationValue();if(!q)return;return D({hydrationKey:this.hydrationKey,serializedValue:q})}findHydrationScriptElement(){if(!(this.host instanceof Element))return null;return B(this.host,"signal",this.hydrationKey)}isObject(q){return typeof q==="object"&&!Array.isArray(q)&&q!==null}resolveInitialValue(q){if(!this.hydrate)return q;let G=this.findHydrationScriptElement();if(!G)return q;let Q=f(G,q);if(this.hydrate===Object&&this.isObject(Q)&&this.isObject(q))return{...q,...Q};return Q}serializeHydrationValue(){if(!this.hydrate)return;let q=JSON.stringify(this.get());if(typeof q!=="string")return;return U(q)}handleSourceChange(q){this.currentValue=q}}function s(q){return new O(q)}export{d as isWritableSignalLike,s as createHostSignal,O as HostSignal};
|
|
2
|
+
|
|
3
|
+
//# debugId=C3386E980C52A77C64756E2164756E21
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/tools/escape-script-json.ts", "../src/core/hydration-codec.ts", "../src/signals/hydration-script.ts", "../src/signals/host-signal.ts"],
|
|
4
|
+
"sourcesContent": [
|
|
5
|
+
"/**\n * Escapes serialized JSON so it remains safe when embedded inside an HTML\n * `<script>` tag.\n */\nexport function escapeScriptJson(value: string): string {\n\treturn value\n\t\t.replace(/&/g, '\\\\u0026')\n\t\t.replace(/</g, '\\\\u003c')\n\t\t.replace(/>/g, '\\\\u003e')\n\t\t.replace(/\\u2028/g, '\\\\u2028')\n\t\t.replace(/\\u2029/g, '\\\\u2029');\n}\n",
|
|
6
|
+
"import { escapeScriptJson } from '../tools/escape-script-json';\n\n/** Attribute marker used to identify hydration payloads inside a host. */\nexport const HYDRATION_ATTRIBUTE = 'data-hydration';\n/** Discriminator that scopes a hydration payload to a specific feature. */\nexport const HYDRATION_TYPE_ATTRIBUTE = 'data-hydration-type';\n/** Optional key that scopes a hydration payload to a specific decorated field. */\nexport const HYDRATION_KEY_ATTRIBUTE = 'data-hydration-key';\n\nexport type HydrationPayloadType = 'signal' | 'context';\n\ntype HydrationScriptHost = {\n\tchildren?: ArrayLike<Element> | undefined;\n\tchildNodes?: ArrayLike<{ nodeType: number }> | undefined;\n};\n\n/** Creates a `<script type=\"application/json\">` tag for a hydration payload. */\nexport function createHydrationScriptTag(options: {\n\ttype: HydrationPayloadType;\n\thydrationKey?: string;\n\tserializedValue: string;\n}): string {\n\tconst keyAttribute = options.hydrationKey\n\t\t? ` ${HYDRATION_KEY_ATTRIBUTE}=\"${escapeHtmlAttribute(options.hydrationKey)}\"`\n\t\t: '';\n\n\treturn `<script type=\"application/json\" ${HYDRATION_ATTRIBUTE} ${HYDRATION_TYPE_ATTRIBUTE}=\"${options.type}\"${keyAttribute}>${options.serializedValue}</script>`;\n}\n\n/** Escapes serialized JSON so it remains safe inside an HTML script tag. */\nexport function escapeHydrationJson(value: string): string {\n\treturn escapeScriptJson(value);\n}\n\n/** Parses JSON from a hydration script element, returning the fallback on failure. */\nexport function parseHydrationPayload<T>(element: Element, fallback: T): T {\n\tconst textContent = element.textContent;\n\n\tif (!textContent) {\n\t\treturn fallback;\n\t}\n\n\ttry {\n\t\treturn JSON.parse(textContent) as T;\n\t} catch {\n\t\tif (typeof console !== 'undefined') {\n\t\t\tconsole.warn(\n\t\t\t\t`[@ecopages/radiant] Failed to parse hydration payload from <script ${HYDRATION_ATTRIBUTE}>:`,\n\t\t\t\ttextContent.slice(0, 120),\n\t\t\t);\n\t\t}\n\t\treturn fallback;\n\t}\n}\n\n/**\n * Finds a hydration script element inside a host by type and optional key.\n *\n * When a key is provided, looks for an exact `data-hydration-key` match.\n * Otherwise, returns the first unkeyed script matching the type.\n */\nexport function findHydrationScript(\n\thost: HydrationScriptHost,\n\ttype: HydrationPayloadType,\n\thydrationKey?: string,\n): Element | null {\n\tconst children = host.children;\n\n\tif (!children || children.length === 0) {\n\t\tconst childNodes = (host as Partial<{ childNodes: ArrayLike<{ nodeType: number }> }>).childNodes;\n\n\t\tif (!childNodes || childNodes.length === 0) {\n\t\t\treturn null;\n\t\t}\n\n\t\tfor (let i = 0; i < childNodes.length; i += 1) {\n\t\t\tconst node = childNodes[i]!;\n\n\t\t\tif (node.nodeType !== 1) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tconst element = node as unknown as Element;\n\n\t\t\tif (matchesHydrationScript(element, type, hydrationKey)) {\n\t\t\t\treturn element;\n\t\t\t}\n\t\t}\n\n\t\treturn null;\n\t}\n\n\tfor (let i = 0; i < children.length; i += 1) {\n\t\tif (matchesHydrationScript(children[i]!, type, hydrationKey)) {\n\t\t\treturn children[i]!;\n\t\t}\n\t}\n\n\treturn null;\n}\n\nfunction matchesHydrationScript(element: Element, type: HydrationPayloadType, hydrationKey?: string): boolean {\n\tif (\n\t\telement.tagName !== 'SCRIPT' ||\n\t\t!element.hasAttribute(HYDRATION_ATTRIBUTE) ||\n\t\telement.getAttribute(HYDRATION_TYPE_ATTRIBUTE) !== type\n\t) {\n\t\treturn false;\n\t}\n\n\tif (hydrationKey !== undefined) {\n\t\treturn element.getAttribute(HYDRATION_KEY_ATTRIBUTE) === hydrationKey;\n\t}\n\n\treturn !element.hasAttribute(HYDRATION_KEY_ATTRIBUTE);\n}\n\nfunction escapeHtmlAttribute(value: string): string {\n\treturn value.replace(/&/g, '&').replace(/\"/g, '"').replace(/</g, '<').replace(/>/g, '>');\n}\n",
|
|
7
|
+
"import { createHydrationScriptTag, escapeHydrationJson } from '../core/hydration-codec';\n\n/** Creates the raw `<script type=\"application/json\">` tag used to hydrate a signal field. */\nexport function createSignalHydrationScriptTag(options: { hydrationKey?: string; serializedValue: string }): string {\n\treturn createHydrationScriptTag({ type: 'signal', ...options });\n}\n\n/** Escapes serialized JSON so it remains safe inside an HTML script tag. */\nexport function escapeSignalHydrationJson(value: string): string {\n\treturn escapeHydrationJson(value);\n}\n",
|
|
8
|
+
"import { createMarkupNodeLike, type JsxRenderable } from '@ecopages/jsx';\nimport { state, type WritableSignal } from '@ecopages/signals';\nimport type { ReactiveState } from '../core/reactivity-contract';\nimport type { SsrSerializableHydrationBinding } from '../core/ssr-hydration-binding';\nimport type { AttributeTypeConstant } from '../utils/attribute-utils';\nimport { findHydrationScript, parseHydrationPayload } from '../core/hydration-codec';\nimport { createSignalHydrationScriptTag, escapeSignalHydrationJson } from './hydration-script';\n\ntype HostSignalOwner = {\n\tregisterReactiveMember<Value>(property: string, signal: ReactiveState<Value>): void;\n};\n\ntype HostSignalOptions<Value> = {\n\thost: HostSignalOwner;\n\thydrate?: AttributeTypeConstant;\n\thydrationKey?: string;\n\tinitialValue?: Value;\n\tproperty: string;\n\tsource?: WritableSignal<Value>;\n};\n\nexport function isWritableSignalLike<Value>(value: unknown): value is WritableSignal<Value> {\n\treturn (\n\t\ttypeof value === 'object' &&\n\t\tvalue !== null &&\n\t\ttypeof (value as WritableSignal<Value>).get === 'function' &&\n\t\ttypeof (value as WritableSignal<Value>).set === 'function' &&\n\t\ttypeof (value as WritableSignal<Value>).subscribe === 'function' &&\n\t\ttypeof (value as WritableSignal<Value>).update === 'function'\n\t);\n}\n\n/**\n * Host-owned writable signal that bridges signal updates back into Radiant's\n * update callback channel and optional SSR hydration pipeline.\n */\nexport class HostSignal<Value> implements WritableSignal<Value>, SsrSerializableHydrationBinding {\n\tprivate readonly host: HostSignalOwner;\n\tprivate readonly hydrate?: AttributeTypeConstant;\n\tprivate readonly hydrationKey?: string;\n\tprivate readonly property: string;\n\tprivate readonly source: WritableSignal<Value>;\n\tprivate currentValue: Value;\n\tprivate hasAppliedHostHydration = false;\n\tprivate sourceUnsubscribe?: () => void;\n\n\tconstructor(options: HostSignalOptions<Value>) {\n\t\tthis.host = options.host;\n\t\tthis.hydrate = options.hydrate;\n\t\tthis.hydrationKey = options.hydrationKey;\n\t\tthis.property = options.property;\n\t\tthis.source = options.source ?? state(this.resolveInitialValue(options.initialValue as Value));\n\t\tthis.currentValue = this.source.get();\n\t\tthis.host.registerReactiveMember(this.property, this.source);\n\t}\n\n\tpublic get(): Value {\n\t\treturn this.source.get();\n\t}\n\n\tpublic set(nextValue: Value): void {\n\t\tthis.source.set(nextValue);\n\t}\n\n\tpublic subscribe(notify: (value: Value) => void): () => void {\n\t\treturn this.source.subscribe(notify);\n\t}\n\n\tpublic update(updater: (value: Value) => Value): void {\n\t\tthis.set(updater(this.get()));\n\t}\n\n\tpublic connectToSource(): void {\n\t\tif (this.sourceUnsubscribe) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst nextValue = this.source.get();\n\n\t\tif (!Object.is(this.currentValue, nextValue)) {\n\t\t\tthis.currentValue = nextValue;\n\t\t}\n\n\t\tthis.sourceUnsubscribe = this.source.subscribe((value) => {\n\t\t\tthis.handleSourceChange(value);\n\t\t});\n\t}\n\n\tpublic disconnectFromSource(): void {\n\t\tthis.sourceUnsubscribe?.();\n\t\tthis.sourceUnsubscribe = undefined;\n\t}\n\n\tpublic hydrateFromHost(): void {\n\t\tif (!this.hydrate || this.hasAppliedHostHydration) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.hasAppliedHostHydration = true;\n\n\t\tconst previousValue = this.source.get();\n\t\tconst hydratedValue = this.resolveInitialValue(previousValue);\n\n\t\tif (!Object.is(previousValue, hydratedValue)) {\n\t\t\tthis.source.set(hydratedValue);\n\t\t\tthis.currentValue = this.source.get();\n\t\t}\n\t}\n\n\tpublic renderHydrationScript(): JsxRenderable | undefined {\n\t\tconst outerHTML = this.renderHydrationScriptTag();\n\n\t\tif (!outerHTML) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\treturn createMarkupNodeLike(outerHTML);\n\t}\n\n\tpublic renderHydrationScriptTag(): string | undefined {\n\t\tconst serializedValue = this.serializeHydrationValue();\n\n\t\tif (!serializedValue) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\treturn createSignalHydrationScriptTag({\n\t\t\thydrationKey: this.hydrationKey,\n\t\t\tserializedValue,\n\t\t});\n\t}\n\n\tprivate findHydrationScriptElement(): Element | null {\n\t\tif (!(this.host instanceof Element)) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn findHydrationScript(this.host, 'signal', this.hydrationKey);\n\t}\n\n\tprivate isObject(value: unknown): value is Record<string, unknown> {\n\t\treturn typeof value === 'object' && !Array.isArray(value) && value !== null;\n\t}\n\n\tprivate resolveInitialValue(initialValue: Value): Value {\n\t\tif (!this.hydrate) {\n\t\t\treturn initialValue;\n\t\t}\n\n\t\tconst hydrationScriptElement = this.findHydrationScriptElement();\n\n\t\tif (!hydrationScriptElement) {\n\t\t\treturn initialValue;\n\t\t}\n\n\t\tconst parsedHydrationValue = parseHydrationPayload(hydrationScriptElement, initialValue);\n\n\t\tif (this.hydrate === Object && this.isObject(parsedHydrationValue) && this.isObject(initialValue)) {\n\t\t\treturn {\n\t\t\t\t...initialValue,\n\t\t\t\t...parsedHydrationValue,\n\t\t\t} as Value;\n\t\t}\n\n\t\treturn parsedHydrationValue;\n\t}\n\n\tprivate serializeHydrationValue(): string | undefined {\n\t\tif (!this.hydrate) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst serializedValue = JSON.stringify(this.get());\n\n\t\tif (typeof serializedValue !== 'string') {\n\t\t\treturn undefined;\n\t\t}\n\n\t\treturn escapeSignalHydrationJson(serializedValue);\n\t}\n\n\tprivate handleSourceChange(nextValue: Value): void {\n\t\tthis.currentValue = nextValue;\n\t}\n}\n\nexport function createHostSignal<Value>(options: Host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AAI,CAAC,KAAK,QACT,OAAO,EAGR,IAAM,EAAyB,KAAK,2BAA2B,EAE/D,GAAI,CAAC,EACJ,OAAO,EAGR,IAAM,EAAuB,EAAsB,EAAwB,CAAY,EAEvF,GAAI,KAAK,UAAY,QAAU,KAAK,SAAS,CAAoB,GAAK,KAAK,SAAS,CAAY,EAC/F,MAAO,IACH,KACA,CACJ,EAGD,OAAO,EAGA,uBAAuB,EAAuB,CACrD,GAAI,CAAC,KAAK,QACT,OAGD,IAAM,EAAkB,KAAK,UAAU,KAAK,IAAI,CAAC,EAEjD,GAAI,OAAO,IAAoB,SAC9B,OAGD,OAAO,EAA0B,CAAe,EAGzC,kBAAkB,CAAC,EAAwB,CAClD,KAAK,aAAe,EAEtB,CAEO,SAAS,CAAuB,CAAC,EAAsD,CAC7F,OAAO,IAAI,EAAW,CAAO",
|
|
11
|
+
"debugId": "C3386E980C52A77C64756E2164756E21",
|
|
12
|
+
"names": []
|
|
13
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
var{defineProperty:M,getOwnPropertyNames:P,getOwnPropertyDescriptor:x}=Object,C=Object.prototype.hasOwnProperty;function S(g){return this[g]}var B=(g)=>{var q=($??=new WeakMap).get(g),w;if(q)return q;if(q=M({},"__esModule",{value:!0}),g&&typeof g==="object"||typeof g==="function"){for(var z of P(g))if(!C.call(q,z))M(q,z,{get:S.bind(g,z),enumerable:!(w=x(g,z))||w.enumerable})}return $.set(g,q),q},$;var f=(g)=>g;function b(g,q){this[g]=f.bind(null,q)}var D=(g,q)=>{for(var w in q)M(g,w,{get:q[w],enumerable:!0,configurable:!0,set:b.bind(q,w)})};var U=(g,q)=>()=>(g&&(q=g(g=0)),q);var O=((g)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(g,{get:(q,w)=>(typeof require<"u"?require:q)[w]}):g)(function(g){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+g+'" is not supported')});function j(g){return g.replace(/&/g,"\\u0026").replace(/</g,"\\u003c").replace(/>/g,"\\u003e").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}var V="data-hydration",F="data-hydration-type",Q="data-hydration-key";function J(g){let q=g.hydrationKey?` ${Q}="${v(g.hydrationKey)}"`:"";return`<script type="application/json" ${V} ${F}="${g.type}"${q}>${g.serializedValue}</script>`}function W(g){return j(g)}function E(g,q){let w=g.textContent;if(!w)return q;try{return JSON.parse(w)}catch{if(typeof console<"u")console.warn(`[@ecopages/radiant] Failed to parse hydration payload from <script ${V}>:`,w.slice(0,120));return q}}function H(g,q,w){let z=g.children;if(!z||z.length===0){let G=g.childNodes;if(!G||G.length===0)return null;for(let L=0;L<G.length;L+=1){let X=G[L];if(X.nodeType!==1)continue;let Z=X;if(u(Z,q,w))return Z}return null}for(let G=0;G<z.length;G+=1)if(u(z[G],q,w))return z[G];return null}function u(g,q,w){if(g.tagName!=="SCRIPT"||!g.hasAttribute(V)||g.getAttribute(F)!==q)return!1;if(w!==void 0)return g.getAttribute(Q)===w;return!g.hasAttribute(Q)}function v(g){return g.replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">")}function I(g){return J({type:"signal",...g})}function R(g){return W(g)}export{R as escapeSignalHydrationJson,I as createSignalHydrationScriptTag};
|
|
2
|
+
|
|
3
|
+
//# debugId=733A915218CA92C464756E2164756E21
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"import { escapeScriptJson } from '../tools/escape-script-json';\n\n/** Attribute marker used to identify hydration payloads inside a host. */\nexport const HYDRATION_ATTRIBUTE = 'data-hydration';\n/** Discriminator that scopes a hydration payload to a specific feature. */\nexport const HYDRATION_TYPE_ATTRIBUTE = 'data-hydration-type';\n/** Optional key that scopes a hydration payload to a specific decorated field. */\nexport const HYDRATION_KEY_ATTRIBUTE = 'data-hydration-key';\n\nexport type HydrationPayloadType = 'signal' | 'context';\n\ntype HydrationScriptHost = {\n\tchildren?: ArrayLike<Element> | undefined;\n\tchildNodes?: ArrayLike<{ nodeType: number }> | undefined;\n};\n\n/** Creates a `<script type=\"application/json\">` tag for a hydration payload. */\nexport function createHydrationScriptTag(options: {\n\ttype: HydrationPayloadType;\n\thydrationKey?: string;\n\tserializedValue: string;\n}): string {\n\tconst keyAttribute = options.hydrationKey\n\t\t? ` ${HYDRATION_KEY_ATTRIBUTE}=\"${escapeHtmlAttribute(options.hydrationKey)}\"`\n\t\t: '';\n\n\treturn `<script type=\"application/json\" ${HYDRATION_ATTRIBUTE} ${HYDRATION_TYPE_ATTRIBUTE}=\"${options.type}\"${keyAttribute}>${options.serializedValue}</script>`;\n}\n\n/** Escapes serialized JSON so it remains safe inside an HTML script tag. */\nexport function escapeHydrationJson(value: string): string {\n\treturn escapeScriptJson(value);\n}\n\n/** Parses JSON from a hydration script element, returning the fallback on failure. */\nexport function parseHydrationPayload<T>(element: Element, fallback: T): T {\n\tconst textContent = element.textContent;\n\n\tif (!textContent) {\n\t\treturn fallback;\n\t}\n\n\ttry {\n\t\treturn JSON.parse(textContent) as T;\n\t} catch {\n\t\tif (typeof console !== 'undefined') {\n\t\t\tconsole.warn(\n\t\t\t\t`[@ecopages/radiant] Failed to parse hydration payload from <script ${HYDRATION_ATTRIBUTE}>:`,\n\t\t\t\ttextContent.slice(0, 120),\n\t\t\t);\n\t\t}\n\t\treturn fallback;\n\t}\n}\n\n/**\n * Finds a hydration script element inside a host by type and optional key.\n *\n * When a key is provided, looks for an exact `data-hydration-key` match.\n * Otherwise, returns the first unkeyed script matching the type.\n */\nexport function findHydrationScript(\n\thost: HydrationScriptHost,\n\ttype: HydrationPayloadType,\n\thydrationKey?: string,\n): Element | null {\n\tconst children = host.children;\n\n\tif (!children || children.length === 0) {\n\t\tconst childNodes = (host as Partial<{ childNodes: ArrayLike<{ nodeType: number }> }>).childNodes;\n\n\t\tif (!childNodes || childNodes.length === 0) {\n\t\t\treturn null;\n\t\t}\n\n\t\tfor (let i = 0; i < childNodes.length; i += 1) {\n\t\t\tconst node = childNodes[i]!;\n\n\t\t\tif (node.nodeType !== 1) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tconst element = node as unknown as Element;\n\n\t\t\tif (matchesHydrationScript(element, type, hydrationKey)) {\n\t\t\t\treturn element;\n\t\t\t}\n\t\t}\n\n\t\treturn null;\n\t}\n\n\tfor (let i = 0; i < children.length; i += 1) {\n\t\tif (matchesHydrationScript(children[i]!, type, hydrationKey)) {\n\t\t\treturn children[i]!;\n\t\t}\n\t}\n\n\treturn null;\n}\n\nfunction matchesHydrationScript(element: Element, type: HydrationPayloadType, hydrationKey?: string): boolean {\n\tif (\n\t\telement.tagName !== 'SCRIPT' ||\n\t\t!element.hasAttribute(HYDRATION_ATTRIBUTE) ||\n\t\telement.getAttribute(HYDRATION_TYPE_ATTRIBUTE) !== type\n\t) {\n\t\treturn false;\n\t}\n\n\tif (hydrationKey !== undefined) {\n\t\treturn element.getAttribute(HYDRATION_KEY_ATTRIBUTE) === hydrationKey;\n\t}\n\n\treturn !element.hasAttribute(HYDRATION_KEY_ATTRIBUTE);\n}\n\nfunction escapeHtmlAttribute(value: string): string {\n\treturn value.replace(/&/g, '&').replace(/\"/g, '"').replace(/</g, '<').replace(/>/g, '>');\n}\n",
|
|
7
7
|
"import { createHydrationScriptTag, escapeHydrationJson } from '../core/hydration-codec';\n\n/** Creates the raw `<script type=\"application/json\">` tag used to hydrate a signal field. */\nexport function createSignalHydrationScriptTag(options: { hydrationKey?: string; serializedValue: string }): string {\n\treturn createHydrationScriptTag({ type: 'signal', ...options });\n}\n\n/** Escapes serialized JSON so it remains safe inside an HTML script tag. */\nexport function escapeSignalHydrationJson(value: string): string {\n\treturn escapeHydrationJson(value);\n}\n"
|
|
8
8
|
],
|
|
9
|
-
"mappings": "
|
|
10
|
-
"debugId": "
|
|
9
|
+
"mappings": "i0BAIO,SAAS,CAAgB,CAAC,EAAuB,CACvD,OAAO,EACL,QAAQ,KAAM,SAAS,EACvB,QAAQ,KAAM,SAAS,EACvB,QAAQ,KAAM,S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MAAO,GAGR,GAAI,IAAiB,OACpB,OAAO,EAAQ,aAAa,CAAuB,IAAM,EAG1D,MAAO,CAAC,EAAQ,aAAa,CAAuB,EAGrD,SAAS,CAAmB,CAAC,EAAuB,CACnD,OAAO,EAAM,QAAQ,KAAM,OAAO,EAAE,QAAQ,KAAM,QAAQ,EAAE,QAAQ,KAAM,MAAM,EAAE,QAAQ,KAAM,MAAM,ECnHhG,SAAS,CAA8B,CAAC,EAAqE,CACnH,OAAO,EAAyB,CAAE,KAAM,YAAa,CAAQ,CAAC,EAIxD,SAAS,CAAyB,CAAC,EAAuB,CAChE,OAAO,EAAoB,CAAK",
|
|
10
|
+
"debugId": "733A915218CA92C464756E2164756E21",
|
|
11
11
|
"names": []
|
|
12
12
|
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
var{defineProperty:o,getOwnPropertyNames:p,getOwnPropertyDescriptor:h}=Object,d=Object.prototype.hasOwnProperty;function u(t){return this[t]}var S=(t)=>{var n=(r??=new WeakMap).get(t),i;if(n)return n;if(n=o({},"__esModule",{value:!0}),t&&typeof t==="object"||typeof t==="function"){for(var s of p(t))if(!d.call(n,s))o(n,s,{get:u.bind(t,s),enumerable:!(i=h(t,s))||i.enumerable})}return r.set(t,n),n},r;var l=(t)=>t;function C(t,n){this[t]=l.bind(null,n)}var y=(t,n)=>{for(var i in n)o(t,i,{get:n[i],enumerable:!0,configurable:!0,set:C.bind(n,i)})};var D=(t,n)=>()=>(t&&(n=t(t=0)),n);var F=((t)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(n,i)=>(typeof require<"u"?require:n)[i]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});function H(t){let n=globalThis.CSS;if(typeof n?.escape==="function")return n.escape(t);let i="";for(let s=0;s<t.length;s+=1){let c=t[s]??"",e=c.codePointAt(0)??0;if(e===0){i+="�";continue}let x=e>=1&&e<=31||e===127,a=s===0&&e>=48&&e<=57,f=s===1&&e>=48&&e<=57&&(t[0]??"")==="-",g=s===0&&c==="-"&&t.length===1;if(x||a||f){i+=`\\${e.toString(16)} `;continue}if(e>=128||c==="-"||c==="_"||e>=48&&e<=57||e>=65&&e<=90||e>=97&&e<=122){i+=g?`\\${c}`:c;continue}i+=`\\${c}`}return i}export{H as escapeCssIdentifier};
|
|
2
|
+
|
|
3
|
+
//# debugId=07CD20B07E8B726664756E2164756E21
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"sourcesContent": [
|
|
5
5
|
"export function escapeCssIdentifier(value: string): string {\n\tconst cssNamespace = globalThis.CSS as { escape?: (value: string) => string } | undefined;\n\n\tif (typeof cssNamespace?.escape === 'function') {\n\t\treturn cssNamespace.escape(value);\n\t}\n\n\tlet escaped = '';\n\n\tfor (let index = 0; index < value.length; index += 1) {\n\t\tconst character = value[index] ?? '';\n\t\tconst codePoint = character.codePointAt(0) ?? 0;\n\n\t\tif (codePoint === 0) {\n\t\t\tescaped += '\\uFFFD';\n\t\t\tcontinue;\n\t\t}\n\n\t\tconst isControlCharacter = (codePoint >= 0x0001 && codePoint <= 0x001f) || codePoint === 0x007f;\n\t\tconst startsWithDigit = index === 0 && codePoint >= 0x0030 && codePoint <= 0x0039;\n\t\tconst startsWithHyphenDigit =\n\t\t\tindex === 1 && codePoint >= 0x0030 && codePoint <= 0x0039 && (value[0] ?? '') === '-';\n\t\tconst isSingleHyphen = index === 0 && character === '-' && value.length === 1;\n\n\t\tif (isControlCharacter || startsWithDigit || startsWithHyphenDigit) {\n\t\t\tescaped += `\\\\${codePoint.toString(16)} `;\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (\n\t\t\tcodePoint >= 0x0080 ||\n\t\t\tcharacter === '-' ||\n\t\t\tcharacter === '_' ||\n\t\t\t(codePoint >= 0x0030 && codePoint <= 0x0039) ||\n\t\t\t(codePoint >= 0x0041 && codePoint <= 0x005a) ||\n\t\t\t(codePoint >= 0x0061 && codePoint <= 0x007a)\n\t\t) {\n\t\t\tescaped += isSingleHyphen ? `\\\\${character}` : character;\n\t\t\tcontinue;\n\t\t}\n\n\t\tescaped += `\\\\${character}`;\n\t}\n\n\treturn escaped;\n}\n"
|
|
6
6
|
],
|
|
7
|
-
"mappings": "
|
|
8
|
-
"debugId": "
|
|
7
|
+
"mappings": "i0BAAO,SAAS,CAAmB,CAAC,EAAuB,CAC1D,IAAM,EAAe,WAAW,IAEhC,GAAI,OAAO,GAAc,SAAW,WACnC,OAAO,EAAa,OAAO,CAAK,EAGjC,IAAI,EAAU,GAEd,QAAS,EAAQ,EAAG,EAAQ,EAAM,OAAQ,GAAS,EAAG,CACrD,IAAM,EAAY,EAAM,IAAU,GAC5B,EAAY,EAAU,YAAY,CAAC,GAAK,EAE9C,GAAI,IAAc,EAAG,CACpB,GAAW,IACX,SAGD,IAAM,EAAsB,GAAa,GAAU,GAAa,IAAW,IAAc,IACnF,EAAkB,IAAU,GAAK,GAAa,IAAU,GAAa,GACrE,EACL,IAAU,GAAK,GAAa,IAAU,GAAa,KAAW,EAAM,IAAM,MAAQ,IAC7E,EAAiB,IAAU,GAAK,IAAc,KAAO,EAAM,SAAW,EAE5E,GAAI,GAAsB,GAAmB,EAAuB,CACnE,GAAW,KAAK,EAAU,SAAS,EAAE,KACrC,SAGD,GACC,GAAa,KACb,IAAc,KACd,IAAc,KACb,GAAa,IAAU,GAAa,IACpC,GAAa,IAAU,GAAa,IACpC,GAAa,IAAU,GAAa,IACpC,CACD,GAAW,EAAiB,KAAK,IAAc,EAC/C,SAGD,GAAW,KAAK,IAGjB,OAAO",
|
|
8
|
+
"debugId": "07CD20B07E8B726664756E2164756E21",
|
|
9
9
|
"names": []
|
|
10
10
|
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
var{defineProperty:c,getOwnPropertyNames:n,getOwnPropertyDescriptor:p}=Object,t=Object.prototype.hasOwnProperty;function u(e){return this[e]}var d=(e)=>{var r=(i??=new WeakMap).get(e),a;if(r)return r;if(r=c({},"__esModule",{value:!0}),e&&typeof e==="object"||typeof e==="function"){for(var s of n(e))if(!t.call(r,s))c(r,s,{get:u.bind(e,s),enumerable:!(a=p(e,s))||a.enumerable})}return i.set(e,r),r},i;var g=(e)=>e;function l(e,r){this[e]=g.bind(null,r)}var o=(e,r)=>{for(var a in r)c(e,a,{get:r[a],enumerable:!0,configurable:!0,set:l.bind(r,a)})};var f=(e,r)=>()=>(e&&(r=e(e=0)),r);var m=((e)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(r,a)=>(typeof require<"u"?require:r)[a]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});function S(e){return e.replace(/&/g,"\\u0026").replace(/</g,"\\u003c").replace(/>/g,"\\u003e").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}export{S as escapeScriptJson};
|
|
2
|
+
|
|
3
|
+
//# debugId=A2E2FE4ADBA696F164756E2164756E21
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"sourcesContent": [
|
|
5
5
|
"/**\n * Escapes serialized JSON so it remains safe when embedded inside an HTML\n * `<script>` tag.\n */\nexport function escapeScriptJson(value: string): string {\n\treturn value\n\t\t.replace(/&/g, '\\\\u0026')\n\t\t.replace(/</g, '\\\\u003c')\n\t\t.replace(/>/g, '\\\\u003e')\n\t\t.replace(/\\u2028/g, '\\\\u2028')\n\t\t.replace(/\\u2029/g, '\\\\u2029');\n}\n"
|
|
6
6
|
],
|
|
7
|
-
"mappings": "
|
|
8
|
-
"debugId": "
|
|
7
|
+
"mappings": "i0BAIO,SAAS,CAAgB,CAAC,EAAuB,CACvD,OAAO,EACL,QAAQ,KAAM,SAAS,EACvB,QAAQ,KAAM,SAAS,EACvB,QAAQ,KAAM,SAAS,EACvB,QAAQ,UAAW,SAAS,EAC5B,QAAQ,UAAW,SAAS",
|
|
8
|
+
"debugId": "A2E2FE4ADBA696F164756E2164756E21",
|
|
9
9
|
"names": []
|
|
10
10
|
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
var{defineProperty:z,getOwnPropertyNames:B,getOwnPropertyDescriptor:D}=Object,F=Object.prototype.hasOwnProperty;function G(k){return this[k]}var K=(k)=>{var q=(A??=new WeakMap).get(k),x;if(q)return q;if(q=z({},"__esModule",{value:!0}),k&&typeof k==="object"||typeof k==="function"){for(var y of B(k))if(!F.call(q,y))z(q,y,{get:G.bind(k,y),enumerable:!(x=D(k,y))||x.enumerable})}return A.set(k,q),q},A;var H=(k)=>k;function I(k,q){this[k]=H.bind(null,q)}var L=(k,q)=>{for(var x in q)z(k,x,{get:q[x],enumerable:!0,configurable:!0,set:I.bind(q,x)})};var M=(k,q)=>()=>(k&&(q=k(k=0)),q);var N=((k)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(k,{get:(q,x)=>(typeof require<"u"?require:q)[x]}):k)(function(k){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+k+'" is not supported')});class J{host;eventConfig;constructor(k,q){this.host=k,this.eventConfig=q}emit(k){let q=new CustomEvent(this.eventConfig.name,{detail:k,bubbles:this.eventConfig.bubbles,cancelable:this.eventConfig.cancelable,composed:this.eventConfig.composed});this.host.dispatchEvent(q)}}export{J as EventEmitter};
|
|
2
|
+
|
|
3
|
+
//# debugId=4B5D9DC236B9179F64756E2164756E21
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"sourcesContent": [
|
|
5
5
|
"import type { RadiantElement } from '../core/radiant-element';\n\nexport interface EventEmitterConfig {\n\tname: string;\n\tbubbles?: boolean;\n\tcancelable?: boolean;\n\tcomposed?: boolean;\n}\n\n/**\n * A generic event emitter class that allows emitting custom events.\n *\n * @template T - The type of the event detail.\n */\nexport class EventEmitter<T = unknown> {\n\tprivate host: RadiantElement;\n\tprivate eventConfig: EventEmitterConfig;\n\n\t/**\n\t * Constructs a new instance of the EventEmitter class.\n\t *\n\t * @param host - The host element on which the events will be dispatched.\n\t * @param eventConfig - The configuration for the event.\n\t */\n\tconstructor(host: RadiantElement, eventConfig: EventEmitterConfig) {\n\t\tthis.host = host;\n\t\tthis.eventConfig = eventConfig;\n\t}\n\n\t/**\n\t * Emits a custom event with the specified detail.\n\t *\n\t * @param detail - The detail object to be passed along with the event.\n\t */\n\temit(detail?: T) {\n\t\tconst event = new CustomEvent(this.eventConfig.name, {\n\t\t\tdetail: detail,\n\t\t\tbubbles: this.eventConfig.bubbles,\n\t\t\tcancelable: this.eventConfig.cancelable,\n\t\t\tcomposed: this.eventConfig.composed,\n\t\t});\n\t\tthis.host.dispatchEvent(event);\n\t}\n}\n"
|
|
6
6
|
],
|
|
7
|
-
"mappings": "
|
|
8
|
-
"debugId": "
|
|
7
|
+
"mappings": "i0BAcO,MAAM,CAA0B,CAC9B,KACA,YAQR,WAAW,CAAC,EAAsB,EAAiC,CAClE,KAAK,KAAO,EACZ,KAAK,YAAc,EAQpB,IAAI,CAAC,EAAY,CAChB,IAAM,EAAQ,IAAI,YAAY,KAAK,YAAY,KAAM,CACpD,OAAQ,EACR,QAAS,KAAK,YAAY,QAC1B,WAAY,KAAK,YAAY,WAC7B,SAAU,KAAK,YAAY,QAC5B,CAAC,EACD,KAAK,KAAK,cAAc,CAAK,EAE/B",
|
|
8
|
+
"debugId": "4B5D9DC236B9179F64756E2164756E21",
|
|
9
9
|
"names": []
|
|
10
10
|
}
|
package/tools/index.js
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
var{defineProperty:x,getOwnPropertyNames:g,getOwnPropertyDescriptor:a}=Object,S=Object.prototype.hasOwnProperty;function D(n){return this[n]}var h=(n)=>{var r=(t??=new WeakMap).get(n),s;if(r)return r;if(r=x({},"__esModule",{value:!0}),n&&typeof n==="object"||typeof n==="function"){for(var i of g(n))if(!S.call(r,i))x(r,i,{get:D.bind(n,i),enumerable:!(s=a(n,i))||s.enumerable})}return t.set(n,r),r},t;var F=(n)=>n;function H(n,r){this[n]=F.bind(null,r)}var y=(n,r)=>{for(var s in r)x(n,s,{get:r[s],enumerable:!0,configurable:!0,set:H.bind(r,s)})};var C=(n,r)=>()=>(n&&(r=n(n=0)),r);var N=((n)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(n,{get:(r,s)=>(typeof require<"u"?require:r)[s]}):n)(function(n){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+n+'" is not supported')});function W(n){return n.replace(/&/g,"\\u0026").replace(/</g,"\\u003c").replace(/>/g,"\\u003e").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}class ${host;eventConfig;constructor(n,r){this.host=n,this.eventConfig=r}emit(n){let r=new CustomEvent(this.eventConfig.name,{detail:n,bubbles:this.eventConfig.bubbles,cancelable:this.eventConfig.cancelable,composed:this.eventConfig.composed});this.host.dispatchEvent(r)}}function I(n){let r=globalThis.CSS;if(typeof r?.escape==="function")return r.escape(n);let s="";for(let i=0;i<n.length;i+=1){let o=n[i]??"",c=o.codePointAt(0)??0;if(c===0){s+="�";continue}let e=c>=1&&c<=31||c===127,p=i===0&&c>=48&&c<=57,f=i===1&&c>=48&&c<=57&&(n[0]??"")==="-",u=i===0&&o==="-"&&n.length===1;if(e||p||f){s+=`\\${c.toString(16)} `;continue}if(c>=128||o==="-"||o==="_"||c>=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122){s+=u?`\\${o}`:o;continue}s+=`\\${o}`}return s}import{render as d}from"@ecopages/jsx";function M(n,r){d(n,r)}export{M as renderJsxTemplate,W as escapeScriptJson,I as escapeCssIdentifier,$ as EventEmitter};
|
|
2
|
+
|
|
3
|
+
//# debugId=BF99053397CDAC9764756E2164756E21
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"export function escapeCssIdentifier(value: string): string {\n\tconst cssNamespace = globalThis.CSS as { escape?: (value: string) => string } | undefined;\n\n\tif (typeof cssNamespace?.escape === 'function') {\n\t\treturn cssNamespace.escape(value);\n\t}\n\n\tlet escaped = '';\n\n\tfor (let index = 0; index < value.length; index += 1) {\n\t\tconst character = value[index] ?? '';\n\t\tconst codePoint = character.codePointAt(0) ?? 0;\n\n\t\tif (codePoint === 0) {\n\t\t\tescaped += '\\uFFFD';\n\t\t\tcontinue;\n\t\t}\n\n\t\tconst isControlCharacter = (codePoint >= 0x0001 && codePoint <= 0x001f) || codePoint === 0x007f;\n\t\tconst startsWithDigit = index === 0 && codePoint >= 0x0030 && codePoint <= 0x0039;\n\t\tconst startsWithHyphenDigit =\n\t\t\tindex === 1 && codePoint >= 0x0030 && codePoint <= 0x0039 && (value[0] ?? '') === '-';\n\t\tconst isSingleHyphen = index === 0 && character === '-' && value.length === 1;\n\n\t\tif (isControlCharacter || startsWithDigit || startsWithHyphenDigit) {\n\t\t\tescaped += `\\\\${codePoint.toString(16)} `;\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (\n\t\t\tcodePoint >= 0x0080 ||\n\t\t\tcharacter === '-' ||\n\t\t\tcharacter === '_' ||\n\t\t\t(codePoint >= 0x0030 && codePoint <= 0x0039) ||\n\t\t\t(codePoint >= 0x0041 && codePoint <= 0x005a) ||\n\t\t\t(codePoint >= 0x0061 && codePoint <= 0x007a)\n\t\t) {\n\t\t\tescaped += isSingleHyphen ? `\\\\${character}` : character;\n\t\t\tcontinue;\n\t\t}\n\n\t\tescaped += `\\\\${character}`;\n\t}\n\n\treturn escaped;\n}\n",
|
|
8
8
|
"import { render, type TemplateResultLike } from '@ecopages/jsx';\n\n/**\n * Renders a JSX template result into a target element by replacing its children.\n */\nexport function renderJsxTemplate(template: TemplateResultLike, target: HTMLElement): void {\n\trender(template, target);\n}\n"
|
|
9
9
|
],
|
|
10
|
-
"mappings": "
|
|
11
|
-
"debugId": "
|
|
10
|
+
"mappings": "i0BAIO,SAAS,CAAgB,CAAC,EAAuB,CACvD,OAAO,EACL,QAAQ,KAAM,SAAS,EACvB,QAAQ,KAAM,SAAS,EACvB,QAAQ,KAAM,SAAS,EACvB,QAAQ,UAAW,SAAS,EAC5B,QAAQ,UAAW,SAAS,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|
|
13
13
|
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
var{defineProperty:w,getOwnPropertyNames:A,getOwnPropertyDescriptor:B}=Object,C=Object.prototype.hasOwnProperty;function D(f){return this[f]}var H=(f)=>{var k=(z??=new WeakMap).get(f),q;if(k)return k;if(k=w({},"__esModule",{value:!0}),f&&typeof f==="object"||typeof f==="function"){for(var v of A(f))if(!C.call(k,v))w(k,v,{get:D.bind(f,v),enumerable:!(q=B(f,v))||q.enumerable})}return z.set(f,k),k},z;var E=(f)=>f;function F(f,k){this[f]=E.bind(null,k)}var I=(f,k)=>{for(var q in k)w(f,q,{get:k[q],enumerable:!0,configurable:!0,set:F.bind(k,q)})};var K=(f,k)=>()=>(f&&(k=f(f=0)),k);var L=((f)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(f,{get:(k,q)=>(typeof require<"u"?require:k)[q]}):f)(function(f){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+f+'" is not supported')});import{render as G}from"@ecopages/jsx";function O(f,k){G(f,k)}export{O as renderJsxTemplate};
|
|
2
|
+
|
|
3
|
+
//# debugId=8036AAB608B16B1E64756E2164756E21
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"sourcesContent": [
|
|
5
5
|
"import { render, type TemplateResultLike } from '@ecopages/jsx';\n\n/**\n * Renders a JSX template result into a target element by replacing its children.\n */\nexport function renderJsxTemplate(template: TemplateResultLike, target: HTMLElement): void {\n\trender(template, target);\n}\n"
|
|
6
6
|
],
|
|
7
|
-
"mappings": "
|
|
8
|
-
"debugId": "
|
|
7
|
+
"mappings": "i0BAAA,iBAAS,sBAKF,SAAS,CAAiB,CAAC,EAA8B,EAA2B,CAC1F,EAAO,EAAU,CAAM",
|
|
8
|
+
"debugId": "8036AAB608B16B1E64756E2164756E21",
|
|
9
9
|
"names": []
|
|
10
10
|
}
|
package/types.js
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
var{defineProperty:a,getOwnPropertyNames:s,getOwnPropertyDescriptor:d}=Object,c=Object.prototype.hasOwnProperty;function p(t){return this[t]}var l=(t)=>{var r=(n??=new WeakMap).get(t),e;if(r)return r;if(r=a({},"__esModule",{value:!0}),t&&typeof t==="object"||typeof t==="function"){for(var o of s(t))if(!c.call(r,o))a(r,o,{get:p.bind(t,o),enumerable:!(e=d(t,o))||e.enumerable})}return n.set(t,r),r},n;var i=(t)=>t;function g(t,r){this[t]=i.bind(null,r)}var C=(t,r)=>{for(var e in r)a(t,e,{get:r[e],enumerable:!0,configurable:!0,set:g.bind(r,e)})};var y=(t,r)=>()=>(t&&(r=t(t=0)),r);var u=((t)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(r,e)=>(typeof require<"u"?require:r)[e]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});var m={isStandard:{ClassDecorator:function(t){return typeof t[1]<"u"},MethodDecorator:function(t){return typeof t[1]==="object"},FieldDecorator:function(t){return typeof t[1]==="object"}}};export{m as guards};
|
|
2
|
+
|
|
3
|
+
//# debugId=417B2FABB126C8F664756E2164756E21
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"sourcesContent": [
|
|
5
5
|
"import type { RadiantElement } from './core/radiant-element';\n\nexport type Constructor<T = unknown> = { new (...args: any[]): NonNullable<T> };\n\nexport type ConstructorParams<T extends Constructor> = ConstructorParameters<T>;\n\nexport type Context = {\n\tkind: string;\n\tname: string | symbol;\n\taccess: {\n\t\tget?(): unknown;\n\t\tset?(value: unknown): void;\n\t\thas?(value: unknown): boolean;\n\t};\n\tprivate?: boolean;\n\tstatic?: boolean;\n\taddInitializer?(initializer: () => void): void;\n};\n\nexport type ClassDecorator = <T extends Constructor>(target: T, context: Context) => T | void;\n\nexport type Method = (...args: any[]) => any;\n\nexport type LegacyClassDecoratorArgs = {\n\tprotoOrTarget: CustomElementConstructor;\n\tnameOrContext: string;\n\tdescriptor: PropertyDescriptor;\n};\n\nexport type StandardClassDecoratorArgs = {\n\tprotoOrTarget: CustomElementConstructor;\n\tnameOrContext: ClassDecoratorContext;\n};\n\nexport type StandardOrLegacyClassDecoratorArgs = LegacyClassDecoratorArgs | StandardClassDecoratorArgs;\n\nexport type LegacyMethodDecoratorArgs = {\n\tprotoOrTarget: RadiantElement;\n\tnameOrContext: string;\n\tdescriptor: PropertyDescriptor;\n};\n\nexport type StandardMethodDecoratorArgs = {\n\tprotoOrTarget: Method;\n\tnameOrContext: ClassMethodDecoratorContext;\n\tdescriptor: undefined;\n};\n\nexport type StandardOrLegacyMethodDecoratorArgs = LegacyMethodDecoratorArgs | StandardMethodDecoratorArgs;\n\nexport type LegacyFieldDecoratorArgs = {\n\tprotoOrTarget: RadiantElement;\n\tnameOrContext: string;\n\tdescriptor: PropertyDescriptor;\n};\n\nexport type StandardFieldDecoratorArgs<T = unknown, V = unknown> = {\n\tprotoOrTarget: undefined;\n\tnameOrContext: ClassFieldDecoratorContext<T, V>;\n};\n\nexport type StandardOrLegacyFieldDecoratorArgs = LegacyFieldDecoratorArgs | StandardFieldDecoratorArgs;\n\nexport type CustomElementClass = Omit<typeof HTMLElement, 'new'>;\n\nexport const guards = {\n\tisStandard: {\n\t\tClassDecorator: function (\n\t\t\targs: any,\n\t\t): args is [CustomElementConstructor, ClassDecoratorContext<CustomElementConstructor>] {\n\t\t\treturn typeof args[1] !== 'undefined';\n\t\t},\n\t\tMethodDecorator: function (args: any): args is [Method, ClassMethodDecoratorContext] {\n\t\t\treturn typeof args[1] === 'object';\n\t\t},\n\t\tFieldDecorator: function (args: any): args is [undefined, ClassFieldDecoratorContext] {\n\t\t\treturn typeof args[1] === 'object';\n\t\t},\n\t},\n};\n"
|
|
6
6
|
],
|
|
7
|
-
"mappings": "
|
|
8
|
-
"debugId": "
|
|
7
|
+
"mappings": "i0BAiEO,IAAM,EAAS,CACrB,WAAY,CACX,eAAgB,QAAS,CACxB,EACsF,CACtF,OAAO,OAAO,EAAK,GAAO,KAE3B,gBAAiB,QAAS,CAAC,EAA0D,CACpF,OAAO,OAAO,EAAK,KAAO,UAE3B,eAAgB,QAAS,CAAC,EAA4D,CACrF,OAAO,OAAO,EAAK,KAAO,SAE5B,CACD",
|
|
8
|
+
"debugId": "417B2FABB126C8F664756E2164756E21",
|
|
9
9
|
"names": []
|
|
10
10
|
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
var{defineProperty:H,getOwnPropertyNames:W,getOwnPropertyDescriptor:X}=Object,Y=Object.prototype.hasOwnProperty;function Z(q){return this[q]}var N=(q)=>{var x=(L??=new WeakMap).get(q),z;if(x)return x;if(x=H({},"__esModule",{value:!0}),q&&typeof q==="object"||typeof q==="function"){for(var E of W(q))if(!Y.call(x,E))H(x,E,{get:Z.bind(q,E),enumerable:!(z=X(q,E))||z.enumerable})}return L.set(q,x),x},L;var _=(q)=>q;function $(q,x){this[q]=_.bind(null,x)}var O=(q,x)=>{for(var z in x)H(q,z,{get:x[z],enumerable:!0,configurable:!0,set:$.bind(x,z)})};var j=(q,x)=>()=>(q&&(x=q(q=0)),x);var A=((q)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(q,{get:(x,z)=>(typeof require<"u"?require:x)[z]}):q)(function(q){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+q+'" is not supported')});function R(q){switch(q){case Array:return"array";case Boolean:return"boolean";case Number:return"number";case Object:return"object";case String:return"string"}}function k(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 B(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 F={array(q){let x=D(q);if(!Array.isArray(x))throw TypeError(`Expected an array but got a value of type "${typeof x}"`);return x},boolean(q){return!(q==="0"||String(q).toLowerCase()==="false")},number(q){return Number(q.replace(/_/g,""))},object(q){let x=JSON.parse(q);if(x===null||typeof x!=="object"||Array.isArray(x))throw TypeError(`expected value of type "object" but instead got value "${q}" of type "${k(x)}"`);return x},string(q){return q}},M={default:U,array:P,object:P};function P(q){return JSON.stringify(q)}function U(q){return`${q}`}function Q(q,x){let z=R(x);if(!z)throw TypeError(`[radiant-element] Unknown type "${x}"`);return F[z](q)}function g(q,x){let z=R(x);if(!z)throw TypeError(`[radiant-element] Unknown type "${x}"`);return(M[z]??M.default??U)(q)}function m(q){return typeof q==="boolean"}function h(q){return typeof q==="number"}function C(q){return typeof q==="string"}function J(q){return Array.isArray(q)}function K(q){return typeof q==="object"&&!Array.isArray(q)&&q!==null}function w(q,x){switch(q){case Boolean:return m(x);case Number:return h(x);case String:return C(x);case Array:return J(x);case Object:return K(x);default:return!1}}var T=(q,x,z,E)=>{if(x===Boolean){let G=q.getAttribute(z);if(G===null)return E;return G===""?!0:Q(G,x)}let I=q.getAttribute(z);return I!==null?Q(I,x):E??B(x)};export{g as writeAttributeValue,Q as readAttributeValue,k as parseAttributeTypeDefault,R as parseAttributeTypeConstant,w as isValueOfType,T as getInitialValue,B as defaultValueForType};
|
|
2
|
+
|
|
3
|
+
//# debugId=DF934DE255B305D364756E2164756E21
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"sourcesContent": [
|
|
5
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
6
|
],
|
|
7
|
-
"mappings": "
|
|
8
|
-
"debugId": "
|
|
7
|
+
"mappings": "i0BAYO,SAAS,CAA0B,CAAC,EAAkC,CAC5E,OAAQ,QACF,MACJ,MAAO,aACH,QACJ,MAAO,eACH,OACJ,MAAO,cACH,OACJ,MAAO,cACH,OACJ,MAAO,UAUH,SAAS,CAAyB,CAAC,EAAqC,CAC9E,OAAQ,OAAO,OACT,UACJ,MAAO,cACH,SACJ,MAAO,aACH,SACJ,MAAO,SAGT,GAAI,MAAM,QAAQ,CAAY,EAAG,MAAO,QACxC,GAAI,OAAO,UAAU,SAAS,KAAK,CAAY,IAA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mC,IAAO,EAE/E,OADuB,EAAQ,IAAe,EAAQ,SAAW,GACnD,CAAK,EAQpB,SAAS,CAAS,CAAC,EAAkC,CACpD,OAAO,OAAO,IAAU,UAGzB,SAAS,CAAQ,CAAC,EAAiC,CAClD,OAAO,OAAO,IAAU,SAGzB,SAAS,CAAQ,CAAC,EAAiC,CAClD,OAAO,OAAO,IAAU,SAGzB,SAAS,CAAO,CAAC,EAAyC,CACzD,OAAO,MAAM,QAAQ,CAAK,EAG3B,SAAS,CAAQ,CAAC,EAAiC,CAClD,OAAO,OAAO,IAAU,UAAY,CAAC,MAAM,QAAQ,CAAK,GAAK,IAAU,KAMjE,SAAS,CAAa,CAAC,EAA6B,EAAgC,CAC1F,OAAQ,QACF,QACJ,OAAO,EAAU,CAAY,OACzB,OACJ,OAAO,EAAS,CAAY,OACxB,OACJ,OAAO,EAAS,CAAY,OACxB,MACJ,OAAO,EAAQ,CAAY,OACvB,OACJ,OAAO,EAAS,CAAY,UAE5B,MAAO,IAIH,IAAM,EAAkB,CAC9B,EACA,EACA,EACA,IACI,CACJ,GAAI,IAAS,QAAS,CACrB,IAAM,EAAiB,EAAO,aAAa,CAAY,EACvD,GAAI,IAAmB,KACtB,OAAO,EAGR,OAAO,IAAmB,GAAK,GAAO,EAAmB,EAAgB,CAAI,EAG9E,IAAM,EAAiB,EAAO,aAAa,CAAY,EACvD,OAAO,IAAmB,KACvB,EAAmB,EAAgB,CAAI,EACtC,GAAiB,EAAoB,CAAI",
|
|
8
|
+
"debugId": "DF934DE255B305D364756E2164756E21",
|
|
9
9
|
"names": []
|
|
10
10
|
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
var{defineProperty:i,getOwnPropertyNames:n,getOwnPropertyDescriptor:p}=Object,g=Object.prototype.hasOwnProperty;function o(e){return this[e]}var b=(e)=>{var t=(l??=new WeakMap).get(e),r;if(t)return t;if(t=i({},"__esModule",{value:!0}),e&&typeof e==="object"||typeof e==="function"){for(var a of n(e))if(!g.call(t,a))i(t,a,{get:o.bind(e,a),enumerable:!(r=p(e,a))||r.enumerable})}return l.set(e,t),t},l;var s=(e)=>e;function u(e,t){this[e]=s.bind(null,t)}var d=(e,t)=>{for(var r in t)i(e,r,{get:t[r],enumerable:!0,configurable:!0,set:u.bind(t,r)})};var f=(e,t)=>()=>(e&&(t=e(e=0)),t);var m=((e)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof require<"u"?require:t)[r]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});function H(e){return e.replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">")}export{H as escapeHtmlAttribute};
|
|
2
|
+
|
|
3
|
+
//# debugId=6FCDA0CFBEB217E464756E2164756E21
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"sourcesContent": [
|
|
5
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"
|
|
6
6
|
],
|
|
7
|
-
"mappings": "
|
|
8
|
-
"debugId": "
|
|
7
|
+
"mappings": "i0BACO,SAAS,CAAmB,CAAC,EAAuB,CAC1D,OAAO,EAAM,QAAQ,KAAM,OAAO,EAAE,QAAQ,KAAM,QAAQ,EAAE,QAAQ,KAAM,MAAM,EAAE,QAAQ,KAAM,MAAM",
|
|
8
|
+
"debugId": "6FCDA0CFBEB217E464756E2164756E21",
|
|
9
9
|
"names": []
|
|
10
10
|
}
|
package/utils/index.js
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
var{defineProperty:H,getOwnPropertyNames:W,getOwnPropertyDescriptor:X}=Object,Y=Object.prototype.hasOwnProperty;function Z(x){return this[x]}var N=(x)=>{var q=(L??=new WeakMap).get(x),z;if(q)return q;if(q=H({},"__esModule",{value:!0}),x&&typeof x==="object"||typeof x==="function"){for(var E of W(x))if(!Y.call(q,E))H(q,E,{get:Z.bind(x,E),enumerable:!(z=X(x,E))||z.enumerable})}return L.set(x,q),q},L;var _=(x)=>x;function $(x,q){this[x]=_.bind(null,q)}var O=(x,q)=>{for(var z in q)H(x,z,{get:q[z],enumerable:!0,configurable:!0,set:$.bind(q,z)})};var j=(x,q)=>()=>(x&&(q=x(x=0)),q);var A=((x)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(x,{get:(q,z)=>(typeof require<"u"?require:q)[z]}):x)(function(x){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+x+'" is not supported')});function R(x){switch(x){case Array:return"array";case Boolean:return"boolean";case Number:return"number";case Object:return"object";case String:return"string"}}function k(x){switch(typeof x){case"boolean":return"boolean";case"number":return"number";case"string":return"string"}if(Array.isArray(x))return"array";if(Object.prototype.toString.call(x)==="[object Object]")return"object"}function m(x){switch(x){case Number:return 0;case String:return"";case Boolean:return!1;default:return null}}function B(x){try{return JSON.parse(x)}catch{throw TypeError("Invalid JSON string")}}var D={array(x){let q=B(x);if(!Array.isArray(q))throw TypeError(`Expected an array but got a value of type "${typeof q}"`);return q},boolean(x){return!(x==="0"||String(x).toLowerCase()==="false")},number(x){return Number(x.replace(/_/g,""))},object(x){let q=JSON.parse(x);if(q===null||typeof q!=="object"||Array.isArray(q))throw TypeError(`expected value of type "object" but instead got value "${x}" of type "${k(q)}"`);return q},string(x){return x}},M={default:U,array:P,object:P};function P(x){return JSON.stringify(x)}function U(x){return`${x}`}function Q(x,q){let z=R(q);if(!z)throw TypeError(`[radiant-element] Unknown type "${q}"`);return D[z](x)}function g(x,q){let z=R(q);if(!z)throw TypeError(`[radiant-element] Unknown type "${q}"`);return(M[z]??M.default??U)(x)}function F(x){return typeof x==="boolean"}function h(x){return typeof x==="number"}function C(x){return typeof x==="string"}function J(x){return Array.isArray(x)}function K(x){return typeof x==="object"&&!Array.isArray(x)&&x!==null}function w(x,q){switch(x){case Boolean:return F(q);case Number:return h(q);case String:return C(q);case Array:return J(q);case Object:return K(q);default:return!1}}var T=(x,q,z,E)=>{if(q===Boolean){let G=x.getAttribute(z);if(G===null)return E;return G===""?!0:Q(G,q)}let I=x.getAttribute(z);return I!==null?Q(I,q):E??m(q)};export{g as writeAttributeValue,Q as readAttributeValue,k as parseAttributeTypeDefault,R as parseAttributeTypeConstant,w as isValueOfType,T as getInitialValue,m as defaultValueForType};
|
|
2
|
+
|
|
3
|
+
//# debugId=5416B17C19476DF764756E2164756E21
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"sourcesContent": [
|
|
5
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
6
|
],
|
|
7
|
-
"mappings": "
|
|
8
|
-
"debugId": "
|
|
7
|
+
"mappings": "i0BAYO,SAAS,CAA0B,CAAC,EAAkC,CAC5E,OAAQ,QACF,MACJ,MAAO,aACH,QACJ,MAAO,eACH,OACJ,MAAO,cACH,OACJ,MAAO,cACH,OACJ,MAAO,UAUH,SAAS,CAAyB,CAAC,EAAqC,CAC9E,OAAQ,OAAO,OACT,UACJ,MAAO,cACH,SACJ,MAAO,aACH,SACJ,MAAO,SAGT,GAAI,MAAM,QAAQ,CAAY,EAAG,MAAO,QACxC,GAAI,OAAO,UAAU,SAAS,KAAK,CAAY,IAAM,kBAAmB,MAAO,SASzE,SAAS,CAAmB,CAAC,EAAsC,CACzE,OAAQ,QACF,OACJ,MAAO,QACH,OACJ,MAAO,QACH,QACJ,MAAO,WAEP,OAAO,MASV,SAAS,CAAY,CAAC,EAAkB,CACvC,GAAI,CACH,OAAO,KAAK,MAAM,CAAK,EACtB,KAAM,CACP,MAAU,UAAU,qBAAqB,GAQ3C,IAAM,EAAsC,CAC3C,KAAK,CAAC,EAA0B,CAC/B,IAAM,EAAQ,EAAqB,CAAK,EACxC,GAAI,CAAC,MAAM,QAAQ,CAAK,EACvB,MAAU,UAAU,8CAA8C,OAAO,IAAQ,EAElF,OAAO,GAGR,OAAO,CAAC,E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EAA6B,EAAgC,CAC1F,OAAQ,QACF,QACJ,OAAO,EAAU,CAAY,OACzB,OACJ,OAAO,EAAS,CAAY,OACxB,OACJ,OAAO,EAAS,CAAY,OACxB,MACJ,OAAO,EAAQ,CAAY,OACvB,OACJ,OAAO,EAAS,CAAY,UAE5B,MAAO,IAIH,IAAM,EAAkB,CAC9B,EACA,EACA,EACA,IACI,CACJ,GAAI,IAAS,QAAS,CACrB,IAAM,EAAiB,EAAO,aAAa,CAAY,EACvD,GAAI,IAAmB,KACtB,OAAO,EAGR,OAAO,IAAmB,GAAK,GAAO,EAAmB,EAAgB,CAAI,EAG9E,IAAM,EAAiB,EAAO,aAAa,CAAY,EACvD,OAAO,IAAmB,KACvB,EAAmB,EAAgB,CAAI,EACtC,GAAiB,EAAoB,CAAI",
|
|
8
|
+
"debugId": "5416B17C19476DF764756E2164756E21",
|
|
9
9
|
"names": []
|
|
10
10
|
}
|
package/dist/LICENSE
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2024-present Andrea Zanenghi
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|