@ecopages/radiant 0.2.0 → 0.3.0-alpha.0
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 +289 -34
- package/dist/chunk-0y78f8hj.js +4 -0
- package/dist/chunk-0y78f8hj.js.map +10 -0
- package/dist/chunk-0zq7e1ne.js +4 -0
- package/dist/chunk-0zq7e1ne.js.map +10 -0
- package/dist/chunk-13ydx769.js +4 -0
- package/dist/chunk-13ydx769.js.map +10 -0
- package/dist/chunk-147yvtsn.js +4 -0
- package/dist/chunk-147yvtsn.js.map +10 -0
- package/dist/chunk-17earqbr.js +4 -0
- package/dist/chunk-17earqbr.js.map +10 -0
- package/dist/chunk-1w1dm68j.js +4 -0
- package/dist/chunk-1w1dm68j.js.map +10 -0
- package/dist/chunk-2tgrfv09.js +4 -0
- package/dist/chunk-2tgrfv09.js.map +10 -0
- package/dist/chunk-3b033cgq.js +4 -0
- package/dist/chunk-3b033cgq.js.map +10 -0
- package/dist/chunk-42tyhfvh.js +4 -0
- package/dist/chunk-42tyhfvh.js.map +10 -0
- package/dist/chunk-4cc2syf5.js +4 -0
- package/dist/chunk-4cc2syf5.js.map +10 -0
- package/dist/chunk-4fqkmpra.js +4 -0
- package/dist/chunk-4fqkmpra.js.map +10 -0
- package/dist/chunk-4srpf0y5.js +4 -0
- package/dist/chunk-4srpf0y5.js.map +10 -0
- package/dist/chunk-57w3vmme.js +4 -0
- package/dist/chunk-57w3vmme.js.map +10 -0
- package/dist/chunk-5a2xez36.js +4 -0
- package/dist/chunk-5a2xez36.js.map +10 -0
- package/dist/chunk-5bym7y1d.js +4 -0
- package/dist/chunk-5bym7y1d.js.map +10 -0
- package/dist/chunk-5td6v9k3.js +4 -0
- package/dist/chunk-5td6v9k3.js.map +10 -0
- package/dist/chunk-60015zxq.js +4 -0
- package/dist/chunk-60015zxq.js.map +10 -0
- package/dist/chunk-60q4y3k5.js +4 -0
- package/dist/chunk-60q4y3k5.js.map +10 -0
- package/dist/chunk-6kdxrppw.js +4 -0
- package/dist/chunk-6kdxrppw.js.map +10 -0
- package/dist/chunk-6z34stya.js +4 -0
- package/dist/chunk-6z34stya.js.map +10 -0
- package/dist/chunk-73x7jpdd.js +4 -0
- package/dist/chunk-73x7jpdd.js.map +10 -0
- package/dist/chunk-84fc8cz9.js +4 -0
- package/dist/chunk-84fc8cz9.js.map +10 -0
- package/dist/chunk-8dexhy6c.js +4 -0
- package/dist/chunk-8dexhy6c.js.map +10 -0
- package/dist/chunk-8n2dhx28.js +4 -0
- package/dist/chunk-8n2dhx28.js.map +10 -0
- package/dist/chunk-8tvt04cm.js +4 -0
- package/dist/chunk-8tvt04cm.js.map +10 -0
- package/dist/chunk-8vak8w5w.js +4 -0
- package/dist/chunk-8vak8w5w.js.map +10 -0
- package/dist/chunk-8xy18qmz.js +4 -0
- package/dist/chunk-8xy18qmz.js.map +9 -0
- package/dist/chunk-9554n9t4.js +4 -0
- package/dist/chunk-9554n9t4.js.map +10 -0
- package/dist/chunk-9ascmjk3.js +4 -0
- package/dist/chunk-9ascmjk3.js.map +10 -0
- package/dist/chunk-9gjmqxp2.js +4 -0
- package/dist/chunk-9gjmqxp2.js.map +10 -0
- package/dist/chunk-a7hzs37s.js +4 -0
- package/dist/chunk-a7hzs37s.js.map +10 -0
- package/dist/chunk-aajhkdmn.js +4 -0
- package/dist/chunk-aajhkdmn.js.map +10 -0
- package/dist/chunk-agjb2a3r.js +4 -0
- package/dist/chunk-agjb2a3r.js.map +10 -0
- package/dist/chunk-ak97hp4w.js +4 -0
- package/dist/chunk-ak97hp4w.js.map +10 -0
- package/dist/chunk-bmhn4nbp.js +4 -0
- package/dist/chunk-bmhn4nbp.js.map +10 -0
- package/dist/chunk-c8vqg7r1.js +4 -0
- package/dist/chunk-c8vqg7r1.js.map +10 -0
- package/dist/chunk-cbvd18v1.js +4 -0
- package/dist/chunk-cbvd18v1.js.map +10 -0
- package/dist/chunk-chyn72n9.js +4 -0
- package/dist/chunk-chyn72n9.js.map +10 -0
- package/dist/chunk-cvz9mrxa.js +4 -0
- package/dist/chunk-cvz9mrxa.js.map +10 -0
- package/dist/chunk-d0n7njdy.js +4 -0
- package/dist/chunk-d0n7njdy.js.map +10 -0
- package/dist/chunk-d4v5qpxa.js +4 -0
- package/dist/chunk-d4v5qpxa.js.map +10 -0
- package/dist/chunk-d7hh3ze6.js +4 -0
- package/dist/chunk-d7hh3ze6.js.map +10 -0
- package/dist/chunk-d98q3myg.js +4 -0
- package/dist/chunk-d98q3myg.js.map +10 -0
- package/dist/chunk-dscj0sk9.js +4 -0
- package/dist/chunk-dscj0sk9.js.map +10 -0
- package/dist/chunk-dx1wqc00.js +4 -0
- package/dist/chunk-dx1wqc00.js.map +10 -0
- package/dist/chunk-g0gz7ypq.js +4 -0
- package/dist/chunk-g0gz7ypq.js.map +10 -0
- package/dist/chunk-hkmm3dj9.js +4 -0
- package/dist/chunk-hkmm3dj9.js.map +10 -0
- package/dist/chunk-hn4j8rt5.js +4 -0
- package/dist/chunk-hn4j8rt5.js.map +10 -0
- package/dist/chunk-jce9gqqw.js +4 -0
- package/dist/chunk-jce9gqqw.js.map +10 -0
- package/dist/chunk-jg20mzg8.js +4 -0
- package/dist/chunk-jg20mzg8.js.map +10 -0
- package/dist/chunk-jkb2y7c8.js +4 -0
- package/dist/chunk-jkb2y7c8.js.map +10 -0
- package/dist/chunk-k5hr781q.js +4 -0
- package/dist/chunk-k5hr781q.js.map +10 -0
- package/dist/chunk-ksv01cey.js +4 -0
- package/dist/chunk-ksv01cey.js.map +10 -0
- package/dist/chunk-mpjnqmbq.js +4 -0
- package/dist/chunk-mpjnqmbq.js.map +10 -0
- package/dist/chunk-mqxmfvyp.js +4 -0
- package/dist/chunk-mqxmfvyp.js.map +10 -0
- package/dist/chunk-ms6a9zdt.js +4 -0
- package/dist/chunk-ms6a9zdt.js.map +10 -0
- package/dist/chunk-nerd6fmg.js +4 -0
- package/dist/chunk-nerd6fmg.js.map +10 -0
- package/dist/chunk-nw171z6m.js +4 -0
- package/dist/chunk-nw171z6m.js.map +10 -0
- package/dist/chunk-p6pxdvkk.js +4 -0
- package/dist/chunk-p6pxdvkk.js.map +10 -0
- package/dist/chunk-paehjz94.js +4 -0
- package/dist/chunk-paehjz94.js.map +10 -0
- package/dist/chunk-par0t822.js +4 -0
- package/dist/chunk-par0t822.js.map +10 -0
- package/dist/chunk-qaagk55a.js +4 -0
- package/dist/chunk-qaagk55a.js.map +10 -0
- package/dist/chunk-qbnedp0y.js +4 -0
- package/dist/chunk-qbnedp0y.js.map +10 -0
- package/dist/chunk-qd28hvdx.js +4 -0
- package/dist/chunk-qd28hvdx.js.map +10 -0
- package/dist/chunk-qdj6r8jn.js +4 -0
- package/dist/chunk-qdj6r8jn.js.map +10 -0
- package/dist/chunk-qe6sjr27.js +4 -0
- package/dist/chunk-qe6sjr27.js.map +10 -0
- package/dist/chunk-r1cvaz1t.js +4 -0
- package/dist/chunk-r1cvaz1t.js.map +10 -0
- package/dist/chunk-r75y7ydb.js +4 -0
- package/dist/chunk-r75y7ydb.js.map +10 -0
- package/dist/chunk-s4qgct1z.js +4 -0
- package/dist/chunk-s4qgct1z.js.map +10 -0
- package/dist/chunk-scfk041e.js +4 -0
- package/dist/chunk-scfk041e.js.map +10 -0
- package/dist/chunk-t6x9e177.js +4 -0
- package/dist/chunk-t6x9e177.js.map +10 -0
- package/dist/chunk-t7a1bbxq.js +4 -0
- package/dist/chunk-t7a1bbxq.js.map +10 -0
- package/dist/chunk-tyysm4gk.js +4 -0
- package/dist/chunk-tyysm4gk.js.map +10 -0
- package/dist/chunk-vpfm9yw8.js +4 -0
- package/dist/chunk-vpfm9yw8.js.map +10 -0
- package/dist/chunk-w50v38rv.js +4 -0
- package/dist/chunk-w50v38rv.js.map +10 -0
- package/dist/chunk-x0522ksh.js +4 -0
- package/dist/chunk-x0522ksh.js.map +10 -0
- package/dist/chunk-xd1xn3vy.js +4 -0
- package/dist/chunk-xd1xn3vy.js.map +10 -0
- package/dist/chunk-zb7wh7w4.js +4 -0
- package/dist/chunk-zb7wh7w4.js.map +10 -0
- package/dist/chunk-zj9ez73m.js +4 -0
- package/dist/chunk-zj9ez73m.js.map +10 -0
- package/dist/context/context-consumer-bootstrap.d.ts +41 -0
- package/dist/context/context-consumer-bootstrap.js +3 -0
- package/dist/context/context-consumer-bootstrap.js.map +9 -0
- package/dist/context/context-consumer-runtime.d.ts +34 -0
- package/dist/context/context-consumer-runtime.js +3 -0
- package/dist/context/context-consumer-runtime.js.map +9 -0
- package/dist/context/context-provider.d.ts +50 -2
- package/dist/context/context-provider.js +2 -3
- package/dist/context/context-provider.js.map +3 -4
- package/dist/context/context-ssr-bridge.d.ts +16 -0
- package/dist/context/context-ssr-bridge.js +3 -0
- package/dist/context/context-ssr-bridge.js.map +9 -0
- package/dist/context/create-context.js +2 -3
- package/dist/context/create-context.js.map +3 -4
- package/dist/context/decorators/consume-context.d.ts +8 -4
- package/dist/context/decorators/consume-context.js +2 -3
- package/dist/context/decorators/consume-context.js.map +3 -4
- package/dist/context/decorators/context-selection-delivery.d.ts +1 -0
- package/dist/context/decorators/context-selection-delivery.js +3 -0
- package/dist/context/decorators/context-selection-delivery.js.map +9 -0
- package/dist/context/decorators/context-selector.d.ts +31 -8
- package/dist/context/decorators/context-selector.js +2 -3
- package/dist/context/decorators/context-selector.js.map +3 -4
- package/dist/context/decorators/legacy/consume-context.d.ts +1 -1
- package/dist/context/decorators/legacy/consume-context.js +2 -3
- package/dist/context/decorators/legacy/consume-context.js.map +3 -4
- package/dist/context/decorators/legacy/context-selector-field.d.ts +8 -0
- package/dist/context/decorators/legacy/context-selector-field.js +3 -0
- package/dist/context/decorators/legacy/context-selector-field.js.map +9 -0
- package/dist/context/decorators/legacy/context-selector.d.ts +3 -3
- package/dist/context/decorators/legacy/context-selector.js +2 -3
- package/dist/context/decorators/legacy/context-selector.js.map +3 -4
- package/dist/context/decorators/legacy/provide-context.d.ts +1 -1
- package/dist/context/decorators/legacy/provide-context.js +2 -3
- package/dist/context/decorators/legacy/provide-context.js.map +3 -4
- package/dist/context/decorators/on-context-update.d.ts +31 -0
- package/dist/context/decorators/on-context-update.js +3 -0
- package/dist/context/decorators/on-context-update.js.map +9 -0
- package/dist/context/decorators/provide-context.d.ts +12 -0
- package/dist/context/decorators/provide-context.js +2 -3
- package/dist/context/decorators/provide-context.js.map +3 -4
- package/dist/context/decorators/standard/consume-context.d.ts +1 -1
- package/dist/context/decorators/standard/consume-context.js +2 -3
- package/dist/context/decorators/standard/consume-context.js.map +3 -4
- package/dist/context/decorators/standard/context-selector-field.d.ts +8 -0
- package/dist/context/decorators/standard/context-selector-field.js +3 -0
- package/dist/context/decorators/standard/context-selector-field.js.map +9 -0
- package/dist/context/decorators/standard/context-selector.d.ts +4 -3
- package/dist/context/decorators/standard/context-selector.js +2 -3
- package/dist/context/decorators/standard/context-selector.js.map +3 -4
- package/dist/context/decorators/standard/provide-context.d.ts +1 -1
- package/dist/context/decorators/standard/provide-context.js +2 -3
- package/dist/context/decorators/standard/provide-context.js.map +3 -4
- package/dist/context/events.js +2 -3
- package/dist/context/events.js.map +3 -4
- package/dist/context/hydration-script.d.ts +17 -0
- package/dist/context/hydration-script.js +3 -0
- package/dist/context/hydration-script.js.map +9 -0
- package/dist/core/custom-element-metadata.d.ts +3 -0
- package/dist/core/custom-element-metadata.js +3 -0
- package/dist/core/custom-element-metadata.js.map +9 -0
- package/dist/core/hydration-codec.d.ts +24 -0
- package/dist/core/hydration-codec.js +3 -0
- package/dist/core/hydration-codec.js.map +9 -0
- package/dist/core/radiant-component-ssr.d.ts +29 -0
- package/dist/core/radiant-component-ssr.js +3 -0
- package/dist/core/radiant-component-ssr.js.map +9 -0
- package/dist/core/radiant-component.d.ts +106 -0
- package/dist/core/radiant-component.js +3 -0
- package/dist/core/radiant-component.js.map +9 -0
- package/dist/core/radiant-element.d.ts +217 -9
- package/dist/core/radiant-element.js +2 -3
- package/dist/core/radiant-element.js.map +3 -4
- package/dist/core/reactive-jsx-value.d.ts +10 -0
- package/dist/core/reactive-jsx-value.js +3 -0
- package/dist/core/reactive-jsx-value.js.map +9 -0
- package/dist/core/reactive-prop-metadata.d.ts +7 -0
- package/dist/core/reactive-prop-metadata.js +3 -0
- package/dist/core/reactive-prop-metadata.js.map +9 -0
- package/dist/core/slot-projection.d.ts +34 -0
- package/dist/core/slot-projection.js +3 -0
- package/dist/core/slot-projection.js.map +9 -0
- package/dist/core/ssr-hydration-binding.d.ts +14 -0
- package/dist/core/ssr-hydration-binding.js +2 -0
- package/dist/core/ssr-hydration-binding.js.map +9 -0
- package/dist/core/ssr-preparation.d.ts +18 -0
- package/dist/core/ssr-preparation.js +3 -0
- package/dist/core/ssr-preparation.js.map +9 -0
- package/dist/decorators/bound.js +2 -2
- package/dist/decorators/bound.js.map +3 -4
- package/dist/decorators/bridge.d.ts +8 -0
- package/dist/decorators/bridge.js +3 -0
- package/dist/decorators/bridge.js.map +9 -0
- package/dist/decorators/custom-element.js +2 -3
- package/dist/decorators/custom-element.js.map +3 -4
- package/dist/decorators/debounce.js +2 -2
- package/dist/decorators/debounce.js.map +3 -4
- package/dist/decorators/event.js +2 -3
- package/dist/decorators/event.js.map +3 -4
- package/dist/decorators/legacy/bound.js +2 -3
- package/dist/decorators/legacy/bound.js.map +3 -4
- package/dist/decorators/legacy/custom-element.js +2 -3
- package/dist/decorators/legacy/custom-element.js.map +3 -4
- package/dist/decorators/legacy/debounce.js +2 -3
- package/dist/decorators/legacy/debounce.js.map +3 -4
- package/dist/decorators/legacy/event.d.ts +1 -1
- package/dist/decorators/legacy/event.js +2 -2
- package/dist/decorators/legacy/event.js.map +3 -4
- package/dist/decorators/legacy/instance-initializers.d.ts +17 -0
- package/dist/decorators/legacy/instance-initializers.js +3 -0
- package/dist/decorators/legacy/instance-initializers.js.map +9 -0
- package/dist/decorators/legacy/on-event.d.ts +2 -11
- package/dist/decorators/legacy/on-event.js +2 -3
- package/dist/decorators/legacy/on-event.js.map +3 -4
- package/dist/decorators/legacy/on-updated.js +2 -3
- package/dist/decorators/legacy/on-updated.js.map +3 -4
- package/dist/decorators/legacy/query-slot.d.ts +3 -0
- package/dist/decorators/legacy/query-slot.js +3 -0
- package/dist/decorators/legacy/query-slot.js.map +9 -0
- package/dist/decorators/legacy/query.js +2 -3
- package/dist/decorators/legacy/query.js.map +3 -4
- package/dist/decorators/legacy/reactive-field.js +2 -3
- package/dist/decorators/legacy/reactive-field.js.map +3 -4
- package/dist/decorators/legacy/reactive-prop.d.ts +2 -1
- package/dist/decorators/legacy/reactive-prop.js +2 -3
- package/dist/decorators/legacy/reactive-prop.js.map +3 -4
- package/dist/decorators/legacy/signal.d.ts +10 -0
- package/dist/decorators/legacy/signal.js +3 -0
- package/dist/decorators/legacy/signal.js.map +9 -0
- package/dist/decorators/on-event.d.ts +3 -11
- package/dist/decorators/on-event.js +2 -3
- package/dist/decorators/on-event.js.map +3 -4
- package/dist/decorators/on-updated.js +2 -3
- package/dist/decorators/on-updated.js.map +3 -4
- package/dist/decorators/prop.d.ts +14 -0
- package/dist/decorators/prop.js +3 -0
- package/dist/decorators/prop.js.map +9 -0
- package/dist/decorators/query-slot.d.ts +13 -0
- package/dist/decorators/query-slot.js +3 -0
- package/dist/decorators/query-slot.js.map +9 -0
- package/dist/decorators/query.d.ts +4 -13
- package/dist/decorators/query.js +2 -3
- package/dist/decorators/query.js.map +3 -4
- package/dist/decorators/signal.d.ts +23 -0
- package/dist/decorators/signal.js +3 -0
- package/dist/decorators/signal.js.map +9 -0
- package/dist/decorators/standard/bound.js +2 -3
- package/dist/decorators/standard/bound.js.map +3 -4
- package/dist/decorators/standard/custom-element.js +2 -3
- package/dist/decorators/standard/custom-element.js.map +3 -4
- package/dist/decorators/standard/debounce.js +2 -3
- package/dist/decorators/standard/debounce.js.map +3 -4
- package/dist/decorators/standard/event.d.ts +1 -1
- package/dist/decorators/standard/event.js +2 -3
- package/dist/decorators/standard/event.js.map +3 -4
- package/dist/decorators/standard/on-event.d.ts +1 -11
- package/dist/decorators/standard/on-event.js +2 -3
- package/dist/decorators/standard/on-event.js.map +3 -4
- package/dist/decorators/standard/on-updated.js +2 -3
- package/dist/decorators/standard/on-updated.js.map +3 -4
- package/dist/decorators/standard/query-slot.d.ts +8 -0
- package/dist/decorators/standard/query-slot.js +3 -0
- package/dist/decorators/standard/query-slot.js.map +9 -0
- package/dist/decorators/standard/query.js +2 -3
- package/dist/decorators/standard/query.js.map +3 -4
- package/dist/decorators/standard/reactive-field.js +2 -3
- package/dist/decorators/standard/reactive-field.js.map +3 -4
- package/dist/decorators/standard/reactive-prop.d.ts +1 -1
- package/dist/decorators/standard/reactive-prop.js +2 -3
- package/dist/decorators/standard/reactive-prop.js.map +3 -4
- package/dist/decorators/standard/signal.d.ts +33 -0
- package/dist/decorators/standard/signal.js +3 -0
- package/dist/decorators/standard/signal.js.map +9 -0
- package/dist/decorators/state.d.ts +11 -0
- package/dist/decorators/state.js +3 -0
- package/dist/decorators/state.js.map +9 -0
- package/dist/helpers/create-event-listener.d.ts +28 -0
- package/dist/helpers/create-event-listener.js +3 -0
- package/dist/helpers/create-event-listener.js.map +9 -0
- package/dist/helpers/create-event.d.ts +9 -0
- package/dist/helpers/create-event.js +3 -0
- package/dist/helpers/create-event.js.map +9 -0
- package/dist/helpers/create-query-slot.d.ts +20 -0
- package/dist/helpers/create-query-slot.js +3 -0
- package/dist/helpers/create-query-slot.js.map +9 -0
- package/dist/helpers/create-query.d.ts +27 -0
- package/dist/helpers/create-query.js +3 -0
- package/dist/helpers/create-query.js.map +9 -0
- package/dist/helpers/debounce.d.ts +39 -0
- package/dist/helpers/debounce.js +3 -0
- package/dist/helpers/debounce.js.map +9 -0
- package/dist/helpers/index.d.ts +5 -0
- package/dist/helpers/index.js +3 -0
- package/dist/{mixins → helpers}/index.js.map +1 -1
- package/dist/index.d.ts +13 -5
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/server/context-ssr.d.ts +27 -0
- package/dist/server/context-ssr.js +3 -0
- package/dist/server/context-ssr.js.map +9 -0
- package/dist/server/install-light-dom-shim.d.ts +1 -0
- package/dist/server/install-light-dom-shim.js +3 -0
- package/dist/server/install-light-dom-shim.js.map +10 -0
- package/dist/server/light-dom-shim.d.ts +53 -0
- package/dist/server/light-dom-shim.js +3 -0
- package/dist/server/light-dom-shim.js.map +9 -0
- package/dist/server/project-root.d.ts +20 -0
- package/dist/server/project-root.js +3 -0
- package/dist/server/project-root.js.map +11 -0
- package/dist/server/render-component.d.ts +195 -0
- package/dist/server/render-component.js +3 -0
- package/dist/server/render-component.js.map +10 -0
- package/dist/signals/host-resource.d.ts +59 -0
- package/dist/signals/host-resource.js +3 -0
- package/dist/signals/host-resource.js.map +10 -0
- package/dist/signals/host-signal.d.ts +45 -0
- package/dist/signals/host-signal.js +3 -0
- package/dist/signals/host-signal.js.map +9 -0
- package/dist/signals/hydration-script.d.ts +11 -0
- package/dist/signals/hydration-script.js +3 -0
- package/dist/signals/hydration-script.js.map +9 -0
- package/dist/tools/escape-script-json.d.ts +5 -0
- package/dist/tools/escape-script-json.js +3 -0
- package/dist/tools/escape-script-json.js.map +9 -0
- package/dist/tools/event-emitter.js +2 -3
- package/dist/tools/event-emitter.js.map +3 -4
- package/dist/tools/index.d.ts +2 -0
- package/dist/tools/index.js +2 -2
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/render-jsx-template.d.ts +5 -0
- package/dist/tools/render-jsx-template.js +3 -0
- package/dist/tools/render-jsx-template.js.map +9 -0
- package/dist/tools/stringify-typed.d.ts +4 -6
- package/dist/tools/stringify-typed.js +2 -3
- package/dist/tools/stringify-typed.js.map +3 -4
- package/dist/types.js +2 -2
- package/dist/types.js.map +3 -3
- package/dist/utils/attribute-utils.js +2 -3
- package/dist/utils/attribute-utils.js.map +3 -4
- package/dist/utils/index.js +2 -2
- package/dist/utils/index.js.map +1 -1
- package/package.json +97 -21
- package/size-budget.json +22 -0
- package/dist/decorators/reactive-field.d.ts +0 -6
- package/dist/decorators/reactive-field.js +0 -4
- package/dist/decorators/reactive-field.js.map +0 -10
- package/dist/decorators/reactive-prop.d.ts +0 -8
- package/dist/decorators/reactive-prop.js +0 -4
- package/dist/decorators/reactive-prop.js.map +0 -10
- package/dist/mixins/index.d.ts +0 -1
- package/dist/mixins/index.js +0 -3
- package/dist/mixins/with-kita.d.ts +0 -15
- package/dist/mixins/with-kita.js +0 -4
- package/dist/mixins/with-kita.js.map +0 -10
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": [
|
|
3
|
+
"sources": [],
|
|
4
4
|
"sourcesContent": [
|
|
5
|
-
"import type {\n LegacyFieldDecoratorArgs,\n StandardFieldDecoratorArgs,\n StandardOrLegacyFieldDecoratorArgs,\n} from '../types';\nimport { query as legacyQuery } from './legacy/query';\nimport { query as standardQuery } from './standard/query';\n\ntype BaseQueryConfig = {\n all?: boolean;\n cache?: boolean;\n};\n\ntype QueryBySelector = { selector: string };\n\ntype QueryByRef = { ref: string };\n\nexport type QueryConfig = BaseQueryConfig & (QueryBySelector | QueryByRef);\n\n/**\n * A decorator to query by CSS selector or data-ref attribute.\n * By default it queries for the first element that matches the selector, but it can be configured to query for all elements.\n * It cache the result by default, but it can be configured to not cache it.\n * @param options {@link QueryConfig} The options for the reactive property.\n */\nexport function query<T extends Element | Element[]>(options: QueryConfig) {\n return function (\n protoOrTarget: StandardOrLegacyFieldDecoratorArgs['protoOrTarget'],\n nameOrContext: StandardOrLegacyFieldDecoratorArgs['nameOrContext'],\n ): any {\n if (typeof nameOrContext === 'object') {\n return standardQuery(options)(\n protoOrTarget as StandardFieldDecoratorArgs['protoOrTarget'],\n nameOrContext as StandardFieldDecoratorArgs<HTMLElement, Element | Element[]>['nameOrContext'],\n );\n }\n return legacyQuery<T>(options)(\n protoOrTarget as LegacyFieldDecoratorArgs['protoOrTarget'],\n nameOrContext as LegacyFieldDecoratorArgs['nameOrContext'],\n );\n };\n}\n"
|
|
6
5
|
],
|
|
7
|
-
"mappings": "
|
|
8
|
-
"debugId": "
|
|
6
|
+
"mappings": "",
|
|
7
|
+
"debugId": "20008E9E16D5D5FB64756E2164756E21",
|
|
9
8
|
"names": []
|
|
10
9
|
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { StandardOrLegacyFieldDecoratorArgs } from '../types';
|
|
2
|
+
import { type SignalDecoratorOptions } from './legacy/signal';
|
|
3
|
+
export type { SignalDecoratorOptions } from './standard/signal';
|
|
4
|
+
/**
|
|
5
|
+
* Declares a host-aware writable signal field.
|
|
6
|
+
*
|
|
7
|
+
* The decorated member becomes a real `WritableSignal` instance that JSX can
|
|
8
|
+
* consume directly in child or attribute positions. By default the decorator
|
|
9
|
+
* creates a host-owned signal, but it can also connect an existing shared
|
|
10
|
+
* signal through the `source` option or a signal-valued field initializer.
|
|
11
|
+
*
|
|
12
|
+
* Connected signals still flow through Radiant's update callback channel so
|
|
13
|
+
* `@onUpdated(...)` and `this.$.name` bindings continue to work. On
|
|
14
|
+
* `RadiantComponent`, any signal or store reads performed during `render()`
|
|
15
|
+
* now participate in rerender invalidation directly, which makes module-level
|
|
16
|
+
* shared stores a natural fit without prop-bridging them through a second
|
|
17
|
+
* reactive layer.
|
|
18
|
+
*
|
|
19
|
+
* When `hydrate` is provided, SSR host output appends a keyed JSON script so
|
|
20
|
+
* the client can restore the signal's initial value during hydration.
|
|
21
|
+
*/
|
|
22
|
+
export declare function signal(protoOrTarget: StandardOrLegacyFieldDecoratorArgs['protoOrTarget'], nameOrContext: StandardOrLegacyFieldDecoratorArgs['nameOrContext']): any;
|
|
23
|
+
export declare function signal(options?: SignalDecoratorOptions): any;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{ka as a}from"../chunk-c8vqg7r1.js";import"../chunk-t6x9e177.js";import"../chunk-5a2xez36.js";import"../chunk-57w3vmme.js";import"../chunk-8tvt04cm.js";import"../chunk-6z34stya.js";import"../chunk-ksv01cey.js";import"../chunk-8n2dhx28.js";import"../chunk-8xy18qmz.js";export{a as signal};
|
|
2
|
+
|
|
3
|
+
//# debugId=6DA7522CFED013A964756E2164756E21
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
export{o as b};
|
|
1
|
+
import{ya as a}from"../../chunk-xd1xn3vy.js";import"../../chunk-8xy18qmz.js";export{a as bound};
|
|
3
2
|
|
|
4
|
-
//# debugId=
|
|
3
|
+
//# debugId=7A69026E97B01CD464756E2164756E21
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": [
|
|
3
|
+
"sources": [],
|
|
4
4
|
"sourcesContent": [
|
|
5
|
-
"import type { Method } from '../../types';\n\nexport function bound<T extends Method>(_: T, context: ClassMethodDecoratorContext) {\n const methodName = String(context.name);\n if (context.private) {\n throw new Error(`'bound' cannot decorate private properties like ${methodName as string}.`);\n }\n context.addInitializer(function (this: any) {\n this[methodName] = this[methodName].bind(this);\n });\n}\n"
|
|
6
5
|
],
|
|
7
|
-
"mappings": "
|
|
8
|
-
"debugId": "
|
|
6
|
+
"mappings": "",
|
|
7
|
+
"debugId": "7A69026E97B01CD464756E2164756E21",
|
|
9
8
|
"names": []
|
|
10
9
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
export{i as y};
|
|
1
|
+
import{Ha as a}from"../../chunk-zj9ez73m.js";import"../../chunk-ms6a9zdt.js";import"../../chunk-8xy18qmz.js";export{a as customElement};
|
|
3
2
|
|
|
4
|
-
//# debugId=
|
|
3
|
+
//# debugId=0B86574B12B5327764756E2164756E21
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": [
|
|
3
|
+
"sources": [],
|
|
4
4
|
"sourcesContent": [
|
|
5
|
-
"export function customElement(name: string, options?: ElementDefinitionOptions) {\n return function <T extends CustomElementConstructor>(_: T, context: ClassDecoratorContext<T>) {\n context.addInitializer(function () {\n if (!window.customElements.get(name)) {\n customElements.define(name, this, options);\n }\n });\n };\n}\n"
|
|
6
5
|
],
|
|
7
|
-
"mappings": "
|
|
8
|
-
"debugId": "
|
|
6
|
+
"mappings": "",
|
|
7
|
+
"debugId": "0B86574B12B5327764756E2164756E21",
|
|
9
8
|
"names": []
|
|
10
9
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
export{o as D};
|
|
1
|
+
import{Ba as a}from"../../chunk-8vak8w5w.js";import"../../chunk-13ydx769.js";import"../../chunk-8xy18qmz.js";export{a as debounce};
|
|
3
2
|
|
|
4
|
-
//# debugId=
|
|
3
|
+
//# debugId=55D1AF349670249964756E2164756E21
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": [
|
|
3
|
+
"sources": [],
|
|
4
4
|
"sourcesContent": [
|
|
5
|
-
"import type { Method } from '../../types';\n\nexport function debounce(timeout: number): Method {\n let timeoutRef: ReturnType<typeof setTimeout> | null = null;\n\n return <T extends Method>(originalMethod: T): Method => {\n return function (this: any, ...args: any[]): T {\n if (timeoutRef !== null) {\n clearTimeout(timeoutRef);\n }\n\n timeoutRef = setTimeout(() => {\n originalMethod.apply(this, args);\n }, timeout);\n\n return originalMethod;\n };\n };\n}\n"
|
|
6
5
|
],
|
|
7
|
-
"mappings": "
|
|
8
|
-
"debugId": "
|
|
6
|
+
"mappings": "",
|
|
7
|
+
"debugId": "55D1AF349670249964756E2164756E21",
|
|
9
8
|
"names": []
|
|
10
9
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { RadiantElement } from '../../core/radiant-element';
|
|
2
|
-
import {
|
|
2
|
+
import type { EventEmitterConfig } from '../../tools/event-emitter';
|
|
3
3
|
/**
|
|
4
4
|
* Decorator that attaches an EventEmitter to the class field property.
|
|
5
5
|
* The EventEmitter can be used to dispatch custom events from the target element.
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{F as T};
|
|
1
|
+
import{pa as a}from"../../chunk-k5hr781q.js";import"../../chunk-42tyhfvh.js";import"../../chunk-qbnedp0y.js";import"../../chunk-8xy18qmz.js";export{a as event};
|
|
3
2
|
|
|
4
|
-
//# debugId=
|
|
3
|
+
//# debugId=44A9F99057647C9664756E2164756E21
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": [
|
|
3
|
+
"sources": [],
|
|
4
4
|
"sourcesContent": [
|
|
5
|
-
"import type { RadiantElement } from '../../core/radiant-element';\nimport { EventEmitter, type EventEmitterConfig } from '../../tools/event-emitter';\n\n/**\n * Decorator that attaches an EventEmitter to the class field property.\n * The EventEmitter can be used to dispatch custom events from the target element.\n * @param eventConfig Configuration for the event emitter.\n * @see {@link EventEmitter} for more details about how the EventEmitter works.\n */\nexport function event(eventConfig: EventEmitterConfig) {\n return function <T extends RadiantElement, V>(_: undefined, context: ClassFieldDecoratorContext<T, V>) {\n context.addInitializer(function (this: T) {\n this.registerEventEmitter(eventConfig.name, new EventEmitter(this, eventConfig));\n\n Object.defineProperty(this, context.name, {\n get() {\n return this.eventEmitters.get(eventConfig.name);\n },\n enumerable: true,\n configurable: true,\n });\n });\n };\n}\n"
|
|
6
5
|
],
|
|
7
|
-
"mappings": "
|
|
8
|
-
"debugId": "
|
|
6
|
+
"mappings": "",
|
|
7
|
+
"debugId": "44A9F99057647C9664756E2164756E21",
|
|
9
8
|
"names": []
|
|
10
9
|
}
|
|
@@ -1,14 +1,5 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { OnEventConfig } from '../on-event';
|
|
2
2
|
import type { Method } from '../../types';
|
|
3
|
-
type OnEventConfig = Pick<RadiantElementEventListener, 'type' | 'options'> & ({
|
|
4
|
-
selector: string;
|
|
5
|
-
} | {
|
|
6
|
-
ref: string;
|
|
7
|
-
} | {
|
|
8
|
-
window: boolean;
|
|
9
|
-
} | {
|
|
10
|
-
document: boolean;
|
|
11
|
-
});
|
|
12
3
|
/**
|
|
13
4
|
* A decorator to subscribe to an event on the target element.
|
|
14
5
|
* The event listener will be automatically unsubscribed when the element is disconnected.
|
|
@@ -24,4 +15,3 @@ type OnEventConfig = Pick<RadiantElementEventListener, 'type' | 'options'> & ({
|
|
|
24
15
|
* @param eventConfig.options Optional. An options object that specifies characteristics about the event listener.
|
|
25
16
|
*/
|
|
26
17
|
export declare function onEvent(eventConfig: OnEventConfig): <T extends Method>(originalMethod: T, context: ClassMethodDecoratorContext) => void;
|
|
27
|
-
export {};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
export{G as Q};
|
|
1
|
+
import{Ka as a}from"../../chunk-aajhkdmn.js";import"../../chunk-nw171z6m.js";import"../../chunk-8xy18qmz.js";export{a as onEvent};
|
|
3
2
|
|
|
4
|
-
//# debugId=
|
|
3
|
+
//# debugId=1CE0D0BAC2B43DEF64756E2164756E21
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": [
|
|
3
|
+
"sources": [],
|
|
4
4
|
"sourcesContent": [
|
|
5
|
-
"import type { RadiantElement, RadiantElementEventListener } from '../../core/radiant-element';\nimport type { Method } from '../../types';\n\ntype OnEventConfig = Pick<RadiantElementEventListener, 'type' | 'options'> &\n (\n | {\n selector: string;\n }\n | {\n ref: string;\n }\n | {\n window: boolean;\n }\n | {\n document: boolean;\n }\n );\n\n/**\n * A decorator to subscribe to an event on the target element.\n * The event listener will be automatically unsubscribed when the element is disconnected.\n *\n * Note: This decorator uses event delegation, which means it relies on event bubbling.\n * Therefore, it will not work with events that do not bubble, such as `focus`, `blur`, `load`, `unload`, `scroll`, etc.\n * For focus and blur events, consider using `focusin` and `focusout` which are similar but do bubble.\n *\n * @param eventConfig The event configuration.\n * @param eventConfig.selectors The CSS selector(s) of the target element(s).\n * @param eventConfig.ref The data-ref attribute of the target element.\n * @param eventConfig.type The type of the event to listen for.\n * @param eventConfig.options Optional. An options object that specifies characteristics about the event listener.\n */\nexport function onEvent(eventConfig: OnEventConfig) {\n return function <T extends Method>(originalMethod: T, context: ClassMethodDecoratorContext): void {\n context.addInitializer(function (this: any) {\n const boundMethod = originalMethod.bind(this);\n\n if ('window' in eventConfig) {\n window.addEventListener(eventConfig.type, boundMethod, eventConfig.options);\n (this as RadiantElement).registerCleanupCallback(() => {\n window.removeEventListener(eventConfig.type, boundMethod, eventConfig.options);\n });\n }\n\n if ('document' in eventConfig) {\n document.addEventListener(eventConfig.type, boundMethod, eventConfig.options);\n (this as RadiantElement).registerCleanupCallback(() => {\n document.removeEventListener(eventConfig.type, boundMethod, eventConfig.options);\n });\n }\n\n const selector =\n 'selector' in eventConfig ? eventConfig.selector : 'ref' in eventConfig && `[data-ref=\"${eventConfig.ref}\"]`;\n\n if (selector) {\n (this as RadiantElement).subscribeEvent({\n selector: selector,\n type: eventConfig.type,\n listener: boundMethod,\n options: eventConfig?.options ?? undefined,\n });\n }\n });\n };\n}\n"
|
|
6
5
|
],
|
|
7
|
-
"mappings": "
|
|
8
|
-
"debugId": "
|
|
6
|
+
"mappings": "",
|
|
7
|
+
"debugId": "1CE0D0BAC2B43DEF64756E2164756E21",
|
|
9
8
|
"names": []
|
|
10
9
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
export{n as X};
|
|
1
|
+
import{Ea as a}from"../../chunk-qdj6r8jn.js";import"../../chunk-8xy18qmz.js";export{a as onUpdated};
|
|
3
2
|
|
|
4
|
-
//# debugId=
|
|
3
|
+
//# debugId=6E66A90072456F1164756E2164756E21
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": [
|
|
3
|
+
"sources": [],
|
|
4
4
|
"sourcesContent": [
|
|
5
|
-
"import type { RadiantElement } from '../../core/radiant-element';\nimport type { Method } from '../../types';\n\nexport function onUpdated(keyOrKeys: string | string[]) {\n return function <T extends Method>(_: T, context: ClassMethodDecoratorContext): void {\n context.addInitializer(function (this: any) {\n this[context.name] = this[context.name].bind(this);\n if (Array.isArray(keyOrKeys)) {\n for (const key of keyOrKeys) {\n (this as RadiantElement).registerUpdateCallback(key, this[context.name]);\n }\n } else if (typeof keyOrKeys === 'string') {\n (this as RadiantElement).registerUpdateCallback(keyOrKeys, this[context.name]);\n }\n });\n };\n}\n"
|
|
6
5
|
],
|
|
7
|
-
"mappings": "
|
|
8
|
-
"debugId": "
|
|
6
|
+
"mappings": "",
|
|
7
|
+
"debugId": "6E66A90072456F1164756E2164756E21",
|
|
9
8
|
"names": []
|
|
10
9
|
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { QuerySlotConfig } from '../query-slot';
|
|
2
|
+
type SlotQueryHost = HTMLElement & {
|
|
3
|
+
getSlotElement<T extends Element = Element>(name?: string): T | null;
|
|
4
|
+
getSlotElements<T extends Element = Element>(name?: string): T[];
|
|
5
|
+
slotProjectionVersion?: number;
|
|
6
|
+
};
|
|
7
|
+
export declare function querySlot(options?: QuerySlotConfig): <T extends SlotQueryHost, V extends Element | Element[]>(_: undefined, context: ClassFieldDecoratorContext<T, V>) => void;
|
|
8
|
+
export {};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
export{o as v};
|
|
1
|
+
import{ja as a}from"../../chunk-scfk041e.js";import"../../chunk-g0gz7ypq.js";import"../../chunk-8xy18qmz.js";export{a as query};
|
|
3
2
|
|
|
4
|
-
//# debugId=
|
|
3
|
+
//# debugId=6E6550A38865ECFB64756E2164756E21
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": [
|
|
3
|
+
"sources": [],
|
|
4
4
|
"sourcesContent": [
|
|
5
|
-
"import type { QueryConfig } from '../query';\n\nexport function query(options: QueryConfig) {\n return function <T extends HTMLElement, V extends Element | Element[]>(\n _: undefined,\n context: ClassFieldDecoratorContext<T, V>,\n ) {\n const propertyName = String(context.name);\n const privatePropertyKey = Symbol(`__${String(propertyName)}__cache`);\n\n const selector = 'selector' in options ? options.selector : `[data-ref=\"${options.ref}\"]`;\n\n const executeQuery = (instance: T) => {\n let result: V | V[] = [];\n if (options?.all) {\n const queried = instance.querySelectorAll(selector);\n result = queried.length ? (Array.from(queried) as V) : [];\n return result;\n }\n\n return instance.querySelector(selector);\n };\n\n context.addInitializer(function (this: T) {\n Object.defineProperty(this, propertyName, {\n get() {\n if (options?.cache) {\n if (!this[privatePropertyKey] || (options?.all && !this[privatePropertyKey].length)) {\n this[privatePropertyKey] = executeQuery(this);\n }\n return this[privatePropertyKey];\n }\n return executeQuery(this) as V;\n },\n enumerable: true,\n configurable: true,\n });\n });\n };\n}\n"
|
|
6
5
|
],
|
|
7
|
-
"mappings": "
|
|
8
|
-
"debugId": "
|
|
6
|
+
"mappings": "",
|
|
7
|
+
"debugId": "6E6550A38865ECFB64756E2164756E21",
|
|
9
8
|
"names": []
|
|
10
9
|
}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
export{o as B};
|
|
1
|
+
import{va as a}from"../../chunk-paehjz94.js";import"../../chunk-8xy18qmz.js";export{a as reactiveField};
|
|
3
2
|
|
|
4
|
-
//# debugId=
|
|
3
|
+
//# debugId=60DDF85D2820FBCB64756E2164756E21
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": [
|
|
3
|
+
"sources": [],
|
|
4
4
|
"sourcesContent": [
|
|
5
|
-
"import type { RadiantElement } from '../../core/radiant-element';\n\nexport function reactiveField<T extends RadiantElement, V>(_: undefined, context: ClassFieldDecoratorContext<T, V>) {\n const privatePropertyKey = Symbol(`__${String(context.name)}__value`);\n\n const contextName = String(context.name);\n\n context.addInitializer(function (this: T) {\n Object.defineProperty(this, context.name, {\n get() {\n return this[privatePropertyKey];\n },\n set(newValue: unknown) {\n const oldValue = this[privatePropertyKey];\n if (oldValue !== newValue) {\n this[privatePropertyKey] = newValue;\n (this as RadiantElement).notifyUpdate(contextName, oldValue, newValue);\n }\n },\n enumerable: true,\n configurable: true,\n });\n });\n\n return function (this: T, value: V) {\n (this as any)[privatePropertyKey] = value;\n return value;\n };\n}\n"
|
|
6
5
|
],
|
|
7
|
-
"mappings": "
|
|
8
|
-
"debugId": "
|
|
6
|
+
"mappings": "",
|
|
7
|
+
"debugId": "60DDF85D2820FBCB64756E2164756E21",
|
|
9
8
|
"names": []
|
|
10
9
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { RadiantElement, ReactivePropertyOptions } from '../../core/radiant-element.js';
|
|
2
|
-
export declare function reactiveProp<P = unknown>({ type, attribute, reflect, defaultValue }: ReactivePropertyOptions<P>): <T extends RadiantElement, V>(_: undefined, context: ClassFieldDecoratorContext<T, V>) =>
|
|
2
|
+
export declare function reactiveProp<P = unknown>({ type, attribute, reflect, defaultValue, bind, }: ReactivePropertyOptions<P>): <T extends RadiantElement, V>(_: undefined, context: ClassFieldDecoratorContext<T, V>) => (this: T, value: V) => V;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
export{p as N};
|
|
1
|
+
import{ea as a}from"../../chunk-dscj0sk9.js";import"../../chunk-8dexhy6c.js";import"../../chunk-73x7jpdd.js";import"../../chunk-8xy18qmz.js";export{a as reactiveProp};
|
|
3
2
|
|
|
4
|
-
//# debugId=
|
|
3
|
+
//# debugId=0EABDF8EE7B254AC64756E2164756E21
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": [
|
|
3
|
+
"sources": [],
|
|
4
4
|
"sourcesContent": [
|
|
5
|
-
"import type { RadiantElement, ReactivePropertyOptions } from '../../core/radiant-element.js';\n\nexport function reactiveProp<P = unknown>({ type, attribute, reflect, defaultValue }: ReactivePropertyOptions<P>) {\n return function <T extends RadiantElement, V>(_: undefined, context: ClassFieldDecoratorContext<T, V>) {\n const propertyName = String(context.name);\n const attributeKey = attribute ?? propertyName;\n\n context.addInitializer(function (this: T) {\n this.createReactiveProp(propertyName, { type, reflect, attribute: attributeKey, defaultValue });\n });\n };\n}\n"
|
|
6
5
|
],
|
|
7
|
-
"mappings": "
|
|
8
|
-
"debugId": "
|
|
6
|
+
"mappings": "",
|
|
7
|
+
"debugId": "0EABDF8EE7B254AC64756E2164756E21",
|
|
9
8
|
"names": []
|
|
10
9
|
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { WritableSignal } from '@ecopages/signals';
|
|
2
|
+
import type { RadiantElement, ReactiveBindingOption } from '../../core/radiant-element';
|
|
3
|
+
import type { AttributeTypeConstant } from '../../utils/attribute-utils';
|
|
4
|
+
/** Options for the `@signal` decorator. */
|
|
5
|
+
export type SignalDecoratorOptions<Value = unknown> = {
|
|
6
|
+
/**
|
|
7
|
+
* Exposes a JSX binding companion for the decorated signal.
|
|
8
|
+
*
|
|
9
|
+
* - `true` creates a `$propertyName` accessor.
|
|
10
|
+
* - a string creates a custom accessor with that name.
|
|
11
|
+
* - `undefined` defers to the host default.
|
|
12
|
+
*/
|
|
13
|
+
bind?: ReactiveBindingOption;
|
|
14
|
+
/**
|
|
15
|
+
* Optional initial value used when the field does not provide one directly.
|
|
16
|
+
*
|
|
17
|
+
* This is primarily useful with `declare field: WritableSignal<T>` syntax,
|
|
18
|
+
* which keeps the component surface clean while still letting the decorator
|
|
19
|
+
* own signal construction.
|
|
20
|
+
*/
|
|
21
|
+
initial?: Value;
|
|
22
|
+
/**
|
|
23
|
+
* Connects an existing writable signal to the host instead of creating a
|
|
24
|
+
* host-owned one.
|
|
25
|
+
*/
|
|
26
|
+
source?: WritableSignal<Value> | ((host: RadiantElement) => WritableSignal<Value>);
|
|
27
|
+
/**
|
|
28
|
+
* Serializes the current signal value into a keyed hydration script during
|
|
29
|
+
* SSR and restores it on the client.
|
|
30
|
+
*/
|
|
31
|
+
hydrate?: AttributeTypeConstant;
|
|
32
|
+
};
|
|
33
|
+
export declare function signal<Value = unknown>(options?: SignalDecoratorOptions<Value>): <T extends RadiantElement, Value_1>(_: undefined, context: ClassFieldDecoratorContext<T, unknown>) => (this: T, initialValue: Value_1) => WritableSignal<Value_1>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { StandardOrLegacyFieldDecoratorArgs } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Declares internal mutable component state.
|
|
4
|
+
*
|
|
5
|
+
* Each write triggers `notifyUpdate` so update callbacks, bindings, and
|
|
6
|
+
* `RadiantComponent` renders stay in sync. When no explicit binding option
|
|
7
|
+
* is supplied, `RadiantComponent` hosts expose a JSX companion binding
|
|
8
|
+
* accessor automatically while plain `RadiantElement` hosts keep binding
|
|
9
|
+
* opt-in.
|
|
10
|
+
*/
|
|
11
|
+
export declare function state(protoOrTarget: StandardOrLegacyFieldDecoratorArgs['protoOrTarget'], nameOrContext: StandardOrLegacyFieldDecoratorArgs['nameOrContext']): any;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { RadiantElement } from '../core/radiant-element';
|
|
2
|
+
import type { RadiantElementEventListener } from '../core/radiant-element';
|
|
3
|
+
/**
|
|
4
|
+
* Selects which DOM tree delegated event listeners should observe.
|
|
5
|
+
*/
|
|
6
|
+
export type OnEventScope = 'light' | 'shadow' | 'both';
|
|
7
|
+
type BaseOnEventConfig = Pick<RadiantElementEventListener, 'type' | 'options'> & {
|
|
8
|
+
scope?: OnEventScope;
|
|
9
|
+
};
|
|
10
|
+
export type OnEventConfig = BaseOnEventConfig & ({
|
|
11
|
+
selector: string;
|
|
12
|
+
} | {
|
|
13
|
+
ref: string;
|
|
14
|
+
} | {
|
|
15
|
+
window: true;
|
|
16
|
+
} | {
|
|
17
|
+
document: true;
|
|
18
|
+
});
|
|
19
|
+
/**
|
|
20
|
+
* Subscribes to a DOM event with delegation, window, or document targeting.
|
|
21
|
+
* Functional equivalent of the `@onEvent` decorator for vanilla JS usage.
|
|
22
|
+
* Returns a cleanup function to remove the listener.
|
|
23
|
+
* @param host The host RadiantElement.
|
|
24
|
+
* @param config The event listener configuration.
|
|
25
|
+
* @param callback The event handler function.
|
|
26
|
+
*/
|
|
27
|
+
export declare function createEventListener(host: RadiantElement, config: OnEventConfig, callback: (event: Event) => void): () => void;
|
|
28
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { RadiantElement } from '../core/radiant-element';
|
|
2
|
+
import { EventEmitter, type EventEmitterConfig } from '../tools/event-emitter';
|
|
3
|
+
/**
|
|
4
|
+
* Creates an EventEmitter bound to a host element and registers it on the host.
|
|
5
|
+
* Functional equivalent of the `@event` decorator for vanilla JS usage.
|
|
6
|
+
* @param host The host element that will dispatch the events.
|
|
7
|
+
* @param config {@link EventEmitterConfig} The event emitter configuration.
|
|
8
|
+
*/
|
|
9
|
+
export declare function createEvent<T = unknown>(host: RadiantElement, config: EventEmitterConfig): EventEmitter<T>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export type QuerySlotConfig = {
|
|
2
|
+
all?: boolean;
|
|
3
|
+
cache?: boolean;
|
|
4
|
+
name?: string;
|
|
5
|
+
};
|
|
6
|
+
type SlotQueryHost = HTMLElement & {
|
|
7
|
+
getSlotElement<T extends Element = Element>(name?: string): T | null;
|
|
8
|
+
getSlotElements<T extends Element = Element>(name?: string): T[];
|
|
9
|
+
};
|
|
10
|
+
type QuerySlotResult<T extends Element | Element[]> = {
|
|
11
|
+
get value(): T | null;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Creates a lazy slot query accessor bound to a host element.
|
|
15
|
+
* Functional equivalent of the `@querySlot` decorator for vanilla JS usage.
|
|
16
|
+
* @param host The host element to query slots within.
|
|
17
|
+
* @param options {@link QuerySlotConfig} The slot query configuration.
|
|
18
|
+
*/
|
|
19
|
+
export declare function createQuerySlot<T extends Element | Element[] = Element>(host: SlotQueryHost, options?: QuerySlotConfig): QuerySlotResult<T>;
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
type BaseQueryConfig = {
|
|
2
|
+
all?: boolean;
|
|
3
|
+
cache?: boolean;
|
|
4
|
+
scope?: QueryScope;
|
|
5
|
+
};
|
|
6
|
+
type QueryBySelector = {
|
|
7
|
+
selector: string;
|
|
8
|
+
};
|
|
9
|
+
type QueryByRef = {
|
|
10
|
+
ref: string;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Selects which DOM tree a query should read from.
|
|
14
|
+
*/
|
|
15
|
+
export type QueryScope = 'light' | 'shadow' | 'both';
|
|
16
|
+
export type QueryConfig = BaseQueryConfig & (QueryBySelector | QueryByRef);
|
|
17
|
+
type QueryResult<T extends Element | Element[]> = {
|
|
18
|
+
get value(): T | null;
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* Creates a lazy DOM query accessor bound to a host element.
|
|
22
|
+
* Functional equivalent of the `@query` decorator for vanilla JS usage.
|
|
23
|
+
* @param host The host element to query within.
|
|
24
|
+
* @param options {@link QueryConfig} The query configuration.
|
|
25
|
+
*/
|
|
26
|
+
export declare function createQuery<T extends Element | Element[] = Element>(host: HTMLElement, options: QueryConfig): QueryResult<T>;
|
|
27
|
+
export {};
|