@ecopages/radiant 0.1.8 → 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 -279
- package/dist/context/context-provider.js.map +3 -6
- 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 -6
- package/dist/context/create-context.js.map +3 -4
- package/dist/context/decorators/consume-context.d.ts +10 -6
- package/dist/context/decorators/consume-context.js +2 -64
- package/dist/context/decorators/consume-context.js.map +3 -5
- 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 +29 -9
- package/dist/context/decorators/context-selector.js +2 -71
- package/dist/context/decorators/context-selector.js.map +3 -5
- package/dist/context/decorators/legacy/consume-context.d.ts +3 -0
- package/dist/context/decorators/legacy/consume-context.js +3 -0
- package/dist/context/decorators/legacy/consume-context.js.map +9 -0
- 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 +4 -0
- package/dist/context/decorators/legacy/context-selector.js +3 -0
- package/dist/context/decorators/legacy/context-selector.js.map +9 -0
- package/dist/context/decorators/legacy/provide-context.d.ts +4 -0
- package/dist/context/decorators/legacy/provide-context.js +3 -0
- package/dist/context/decorators/legacy/provide-context.js.map +9 -0
- 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 +18 -7
- package/dist/context/decorators/provide-context.js +2 -291
- package/dist/context/decorators/provide-context.js.map +3 -7
- package/dist/context/decorators/standard/consume-context.d.ts +3 -0
- package/dist/context/decorators/standard/consume-context.js +3 -0
- package/dist/context/decorators/standard/consume-context.js.map +9 -0
- 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 +5 -0
- package/dist/context/decorators/standard/context-selector.js +3 -0
- package/dist/context/decorators/standard/context-selector.js.map +9 -0
- package/dist/context/decorators/standard/provide-context.d.ts +4 -0
- package/dist/context/decorators/standard/provide-context.js +3 -0
- package/dist/context/decorators/standard/provide-context.js.map +9 -0
- package/dist/context/events.d.ts +3 -2
- package/dist/context/events.js +2 -53
- 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 +283 -23
- package/dist/core/radiant-element.js +2 -82
- 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.d.ts +2 -6
- package/dist/decorators/bound.js +2 -23
- 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.d.ts +3 -1
- package/dist/decorators/custom-element.js +2 -14
- package/dist/decorators/custom-element.js.map +3 -4
- package/dist/decorators/debounce.d.ts +6 -1
- package/dist/decorators/debounce.js +2 -20
- package/dist/decorators/debounce.js.map +3 -4
- package/dist/decorators/event.d.ts +3 -2
- package/dist/decorators/event.js +2 -46
- package/dist/decorators/event.js.map +3 -5
- package/dist/decorators/legacy/bound.d.ts +9 -0
- package/dist/decorators/legacy/bound.js +3 -0
- package/dist/decorators/legacy/bound.js.map +9 -0
- package/dist/decorators/legacy/custom-element.d.ts +6 -0
- package/dist/decorators/legacy/custom-element.js +3 -0
- package/dist/decorators/legacy/custom-element.js.map +9 -0
- package/dist/decorators/legacy/debounce.d.ts +1 -0
- package/dist/decorators/legacy/debounce.js +3 -0
- package/dist/decorators/legacy/debounce.js.map +9 -0
- package/dist/decorators/legacy/event.d.ts +9 -0
- package/dist/decorators/legacy/event.js +3 -0
- package/dist/decorators/legacy/event.js.map +9 -0
- 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 +17 -0
- package/dist/decorators/legacy/on-event.js +3 -0
- package/dist/decorators/legacy/on-event.js.map +9 -0
- package/dist/decorators/legacy/on-updated.d.ts +6 -0
- package/dist/decorators/legacy/on-updated.js +3 -0
- package/dist/decorators/legacy/on-updated.js.map +9 -0
- 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.d.ts +23 -0
- package/dist/decorators/legacy/query.js +3 -0
- package/dist/decorators/legacy/query.js.map +9 -0
- package/dist/decorators/{reactive-field.d.ts → legacy/reactive-field.d.ts} +2 -2
- package/dist/decorators/legacy/reactive-field.js +3 -0
- package/dist/decorators/legacy/reactive-field.js.map +9 -0
- package/dist/decorators/{reactive-prop.d.ts → legacy/reactive-prop.d.ts} +4 -3
- package/dist/decorators/legacy/reactive-prop.js +3 -0
- package/dist/decorators/legacy/reactive-prop.js.map +9 -0
- 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 +6 -17
- package/dist/decorators/on-event.js +2 -47
- package/dist/decorators/on-event.js.map +3 -4
- package/dist/decorators/on-updated.d.ts +3 -4
- package/dist/decorators/on-updated.js +2 -29
- 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 +7 -35
- package/dist/decorators/query.js +2 -36
- 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.d.ts +2 -0
- package/dist/decorators/standard/bound.js +3 -0
- package/dist/decorators/standard/bound.js.map +9 -0
- package/dist/decorators/standard/custom-element.d.ts +1 -0
- package/dist/decorators/standard/custom-element.js +3 -0
- package/dist/decorators/standard/custom-element.js.map +9 -0
- package/dist/decorators/standard/debounce.d.ts +2 -0
- package/dist/decorators/standard/debounce.js +3 -0
- package/dist/decorators/standard/debounce.js.map +9 -0
- package/dist/decorators/standard/event.d.ts +9 -0
- package/dist/decorators/standard/event.js +3 -0
- package/dist/decorators/standard/event.js.map +9 -0
- package/dist/decorators/standard/on-event.d.ts +17 -0
- package/dist/decorators/standard/on-event.js +3 -0
- package/dist/decorators/standard/on-event.js.map +9 -0
- package/dist/decorators/standard/on-updated.d.ts +2 -0
- package/dist/decorators/standard/on-updated.js +3 -0
- package/dist/decorators/standard/on-updated.js.map +9 -0
- 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.d.ts +2 -0
- package/dist/decorators/standard/query.js +3 -0
- package/dist/decorators/standard/query.js.map +9 -0
- package/dist/decorators/standard/reactive-field.d.ts +2 -0
- package/dist/decorators/standard/reactive-field.js +3 -0
- package/dist/decorators/standard/reactive-field.js.map +9 -0
- package/dist/decorators/standard/reactive-prop.d.ts +2 -0
- package/dist/decorators/standard/reactive-prop.js +3 -0
- package/dist/decorators/standard/reactive-prop.js.map +9 -0
- 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/helpers/index.js.map +9 -0
- package/dist/index.d.ts +24 -6
- package/dist/index.js +2 -716
- package/dist/index.js.map +3 -21
- 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.d.ts +1 -1
- package/dist/tools/event-emitter.js +2 -22
- package/dist/tools/event-emitter.js.map +3 -4
- package/dist/tools/index.d.ts +2 -0
- package/dist/tools/index.js +2 -28
- package/dist/tools/index.js.map +3 -5
- 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 -8
- package/dist/tools/stringify-typed.js.map +3 -4
- package/dist/types.d.ts +79 -0
- package/dist/types.js +3 -0
- package/dist/types.js.map +10 -0
- package/dist/utils/attribute-utils.d.ts +2 -0
- package/dist/utils/attribute-utils.js +2 -137
- package/dist/utils/attribute-utils.js.map +3 -4
- package/dist/utils/index.js +2 -137
- package/dist/utils/index.js.map +3 -4
- package/package.json +108 -44
- package/size-budget.json +22 -0
- package/dist/context/index.d.ts +0 -7
- package/dist/context/index.js +0 -338
- package/dist/context/index.js.map +0 -16
- package/dist/core/index.d.ts +0 -1
- package/dist/core/index.js +0 -83
- package/dist/core/index.js.map +0 -10
- package/dist/decorators/reactive-field.js +0 -27
- package/dist/decorators/reactive-field.js.map +0 -10
- package/dist/decorators/reactive-prop.js +0 -215
- package/dist/decorators/reactive-prop.js.map +0 -11
- package/dist/decorators.d.ts +0 -7
- package/dist/decorators.js +0 -401
- package/dist/decorators.js.map +0 -18
- package/dist/mixins/index.d.ts +0 -1
- package/dist/mixins/index.js +0 -24
- package/dist/mixins/index.js.map +0 -10
- package/dist/mixins/with-kita.d.ts +0 -15
- package/dist/mixins/with-kita.js +0 -24
- package/dist/mixins/with-kita.js.map +0 -10
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { SubscribableJsxValue } from '@ecopages/jsx';
|
|
2
|
+
import type { RadiantElement, ReactiveBindingValue } from './radiant-element';
|
|
3
|
+
/**
|
|
4
|
+
* Creates a stable JSX child binding backed by a Radiant reactive property or field.
|
|
5
|
+
*
|
|
6
|
+
* The returned value resolves eagerly on the server and subscribes to the host's
|
|
7
|
+
* update callbacks on the client so the mounted child range can patch directly
|
|
8
|
+
* when the selected property changes.
|
|
9
|
+
*/
|
|
10
|
+
export declare function bindReactiveValue<Bindings extends object, Host extends RadiantElement<Bindings>, Property extends Extract<keyof Bindings, string>>(host: Host, property: Property): SubscribableJsxValue<ReactiveBindingValue<Bindings, Property>>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ReactivePropertyOptions } from './radiant-element';
|
|
2
|
+
export type ReactivePropDefinition = {
|
|
3
|
+
name: string;
|
|
4
|
+
options: ReactivePropertyOptions<unknown>;
|
|
5
|
+
};
|
|
6
|
+
export declare function registerReactivePropDefinition(target: object, propertyName: string, options: ReactivePropertyOptions<unknown>): void;
|
|
7
|
+
export declare function getReactivePropDefinitions(target: object): ReactivePropDefinition[];
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { type JsxRenderable } from '@ecopages/jsx';
|
|
2
|
+
export declare const DEFAULT_SLOT_NAME = "";
|
|
3
|
+
export declare const SLOT_PROJECTION_SCRIPT_ATTRIBUTE = "data-radiant-slot-projection";
|
|
4
|
+
type ResolvedSlotProjection = {
|
|
5
|
+
containsSlots: boolean;
|
|
6
|
+
value: JsxRenderable;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Captures direct host children as projected slot content for client rendering.
|
|
10
|
+
*/
|
|
11
|
+
export declare function captureProjectedSlotRenderables(host: HTMLElement): Map<string, JsxRenderable[]>;
|
|
12
|
+
/**
|
|
13
|
+
* Parses the SSR slot projection payload back into renderable fragments.
|
|
14
|
+
*/
|
|
15
|
+
export declare function deserializeProjectedSlotRenderables(payload: string): Map<string, JsxRenderable[]>;
|
|
16
|
+
/**
|
|
17
|
+
* Parses serialized child HTML into slot buckets for SSR-driven projection.
|
|
18
|
+
*/
|
|
19
|
+
export declare function parseProjectedSlotRenderablesFromHtml(html: string): Map<string, JsxRenderable[]>;
|
|
20
|
+
export declare function collectAuthoredHydrationScriptMarkup(host: HTMLElement): string | undefined;
|
|
21
|
+
export declare function collectAuthoredHydrationScriptMarkupFromHtml(html: string): string | undefined;
|
|
22
|
+
/**
|
|
23
|
+
* Serializes the current slot assignments into the payload embedded in SSR host output.
|
|
24
|
+
*/
|
|
25
|
+
export declare function serializeProjectedSlotRenderables(projectedContent: ReadonlyMap<string, readonly JsxRenderable[]>): string | undefined;
|
|
26
|
+
/**
|
|
27
|
+
* Resolves literal `<slot>` placeholders inside a JSX tree.
|
|
28
|
+
*/
|
|
29
|
+
export declare function resolveSlotProjection(value: JsxRenderable, projectedContent: ReadonlyMap<string, readonly JsxRenderable[]>): ResolvedSlotProjection;
|
|
30
|
+
/**
|
|
31
|
+
* Extracts and removes the SSR slot projection script from the host when present.
|
|
32
|
+
*/
|
|
33
|
+
export declare function takeSlotProjectionScriptPayload(host: HTMLElement): string | undefined;
|
|
34
|
+
export {};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{I as a,J as b,K as c,L as d,M as e,N as f,O as g,P as h,Q as i,R as j}from"../chunk-9ascmjk3.js";import"../chunk-ksv01cey.js";import"../chunk-8n2dhx28.js";import"../chunk-8xy18qmz.js";export{j as takeSlotProjectionScriptPayload,h as serializeProjectedSlotRenderables,i as resolveSlotProjection,e as parseProjectedSlotRenderablesFromHtml,d as deserializeProjectedSlotRenderables,g as collectAuthoredHydrationScriptMarkupFromHtml,f as collectAuthoredHydrationScriptMarkup,c as captureProjectedSlotRenderables,b as SLOT_PROJECTION_SCRIPT_ATTRIBUTE,a as DEFAULT_SLOT_NAME};
|
|
2
|
+
|
|
3
|
+
//# debugId=D6B349EF7A834A0E64756E2164756E21
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { JsxRenderable } from '@ecopages/jsx';
|
|
2
|
+
/**
|
|
3
|
+
* Serializable host-level hydration payload that can be appended to SSR output.
|
|
4
|
+
*
|
|
5
|
+
* Context providers and other host-owned reactive primitives use this contract
|
|
6
|
+
* to surface keyed `<script type="application/json">` payloads that the client
|
|
7
|
+
* can recover during hydration.
|
|
8
|
+
*/
|
|
9
|
+
export interface SsrSerializableHydrationBinding {
|
|
10
|
+
/** Returns the hydration script as JSX-friendly serialized markup, when available. */
|
|
11
|
+
renderHydrationScript(): JsxRenderable | undefined;
|
|
12
|
+
/** Returns the hydration script as a raw HTML string, when available. */
|
|
13
|
+
renderHydrationScriptTag(): string | undefined;
|
|
14
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
type SsrPreparationCallback = () => void;
|
|
2
|
+
export declare const SSR_PREPARATION_RUNNING: unique symbol;
|
|
3
|
+
/**
|
|
4
|
+
* Registers instance-local SSR preparation work that should run immediately
|
|
5
|
+
* before a Radiant host serializes its first server render.
|
|
6
|
+
*
|
|
7
|
+
* Decorators use this to defer SSR-only setup until after class fields,
|
|
8
|
+
* reactive props, and authored host content have all been applied.
|
|
9
|
+
*/
|
|
10
|
+
export declare function registerSsrPreparationCallback(host: object, callback: SsrPreparationCallback): void;
|
|
11
|
+
/**
|
|
12
|
+
* Runs all registered SSR preparation callbacks for the provided host.
|
|
13
|
+
*
|
|
14
|
+
* The callbacks are intentionally retained so repeated SSR serializations stay
|
|
15
|
+
* deterministic after later host mutations.
|
|
16
|
+
*/
|
|
17
|
+
export declare function runSsrPreparationCallbacks(host: object): void;
|
|
18
|
+
export {};
|
|
@@ -1,9 +1,5 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { StandardOrLegacyMethodDecoratorArgs } from '../types';
|
|
2
2
|
/**
|
|
3
3
|
* A decorator to bind a method to the instance.
|
|
4
|
-
* @param target {@link RadiantElement}
|
|
5
|
-
* @param propertyKey string
|
|
6
|
-
* @param descriptor {@link PropertyDescriptor}
|
|
7
|
-
* @returns
|
|
8
4
|
*/
|
|
9
|
-
export declare function bound(
|
|
5
|
+
export declare function bound(protoOrTarget: StandardOrLegacyMethodDecoratorArgs['protoOrTarget'], nameOrContext: StandardOrLegacyMethodDecoratorArgs['nameOrContext'], descriptor?: StandardOrLegacyMethodDecoratorArgs['descriptor']): any;
|
package/dist/decorators/bound.js
CHANGED
|
@@ -1,24 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
function bound(target, propertyKey, descriptor) {
|
|
3
|
-
const originalMethod = descriptor.value;
|
|
4
|
-
return {
|
|
5
|
-
configurable: true,
|
|
6
|
-
get() {
|
|
7
|
-
if (this === target.prototype || Object.hasOwn(this, propertyKey)) {
|
|
8
|
-
return originalMethod;
|
|
9
|
-
}
|
|
10
|
-
const boundMethod = originalMethod.bind(this);
|
|
11
|
-
Object.defineProperty(this, propertyKey, {
|
|
12
|
-
value: boundMethod,
|
|
13
|
-
configurable: true,
|
|
14
|
-
writable: true
|
|
15
|
-
});
|
|
16
|
-
return boundMethod;
|
|
17
|
-
}
|
|
18
|
-
};
|
|
19
|
-
}
|
|
20
|
-
export {
|
|
21
|
-
bound
|
|
22
|
-
};
|
|
1
|
+
import{wa as a}from"../chunk-w50v38rv.js";import"../chunk-cbvd18v1.js";import"../chunk-xd1xn3vy.js";import"../chunk-nerd6fmg.js";import"../chunk-8xy18qmz.js";export{a as bound};
|
|
23
2
|
|
|
24
|
-
//# debugId=
|
|
3
|
+
//# debugId=9DA7BEE57029EA6B64756E2164756E21
|
|
@@ -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\n/**\n * A decorator to bind a method to the instance.\n * @param target {@link RadiantElement}\n * @param propertyKey string\n * @param descriptor {@link PropertyDescriptor}\n * @returns\n */\nexport function bound(target: RadiantElement, propertyKey: string, descriptor: PropertyDescriptor): PropertyDescriptor {\n const originalMethod = descriptor.value;\n\n return {\n configurable: true,\n get() {\n /**\n * Check if the method is already bound to the instance.\n */\n if (this === (target as any).prototype || Object.hasOwn(this, propertyKey)) {\n return originalMethod;\n }\n\n /**\n * Bind the method to the instance.\n */\n const boundMethod = originalMethod.bind(this);\n Object.defineProperty(this, propertyKey, {\n value: boundMethod,\n configurable: true,\n writable: true,\n });\n return boundMethod;\n },\n };\n}\n"
|
|
6
5
|
],
|
|
7
|
-
"mappings": "
|
|
8
|
-
"debugId": "
|
|
6
|
+
"mappings": "",
|
|
7
|
+
"debugId": "9DA7BEE57029EA6B64756E2164756E21",
|
|
9
8
|
"names": []
|
|
10
9
|
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { LegacyFieldDecoratorArgs, LegacyMethodDecoratorArgs, StandardMethodDecoratorArgs, StandardOrLegacyFieldDecoratorArgs, StandardOrLegacyMethodDecoratorArgs } from '../types';
|
|
2
|
+
type StandardFieldFn = (target: undefined, context: ClassFieldDecoratorContext<any, any>) => any;
|
|
3
|
+
type LegacyFieldFn = (proto: LegacyFieldDecoratorArgs['protoOrTarget'], name: LegacyFieldDecoratorArgs['nameOrContext']) => any;
|
|
4
|
+
type StandardMethodFn = (target: StandardMethodDecoratorArgs['protoOrTarget'], context: StandardMethodDecoratorArgs['nameOrContext']) => any;
|
|
5
|
+
type LegacyMethodFn = (proto: LegacyMethodDecoratorArgs['protoOrTarget'], name: LegacyMethodDecoratorArgs['nameOrContext'], descriptor: LegacyMethodDecoratorArgs['descriptor']) => any;
|
|
6
|
+
export declare function fieldDecoratorBridge(standard: StandardFieldFn, legacy: LegacyFieldFn, protoOrTarget: StandardOrLegacyFieldDecoratorArgs['protoOrTarget'], nameOrContext: StandardOrLegacyFieldDecoratorArgs['nameOrContext']): any;
|
|
7
|
+
export declare function methodDecoratorBridge(standard: StandardMethodFn, legacy: LegacyMethodFn, protoOrTarget: StandardOrLegacyMethodDecoratorArgs['protoOrTarget'], nameOrContext: StandardOrLegacyMethodDecoratorArgs['nameOrContext'], descriptor?: StandardOrLegacyMethodDecoratorArgs['descriptor']): any;
|
|
8
|
+
export {};
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import type { StandardOrLegacyClassDecoratorArgs } from '../types';
|
|
1
2
|
/**
|
|
2
3
|
* Registers a web component with the given name on the global `window.customElements` registry.
|
|
3
4
|
* @param name selector name.
|
|
5
|
+
* @param options {@link ElementDefinitionOptions}
|
|
4
6
|
*/
|
|
5
|
-
export declare function customElement(name: string): (
|
|
7
|
+
export declare function customElement(name: string, options?: ElementDefinitionOptions): (protoOrTarget: StandardOrLegacyClassDecoratorArgs["protoOrTarget"], nameOrContext?: StandardOrLegacyClassDecoratorArgs["nameOrContext"]) => any;
|
|
@@ -1,15 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
function customElement(name) {
|
|
3
|
-
return (target) => {
|
|
4
|
-
if (!globalThis.window)
|
|
5
|
-
return;
|
|
6
|
-
if (!window.customElements.get(name)) {
|
|
7
|
-
window.customElements.define(name, target);
|
|
8
|
-
}
|
|
9
|
-
};
|
|
10
|
-
}
|
|
11
|
-
export {
|
|
12
|
-
customElement
|
|
13
|
-
};
|
|
1
|
+
import{Fa as a}from"../chunk-60015zxq.js";import"../chunk-60q4y3k5.js";import"../chunk-zj9ez73m.js";import"../chunk-ms6a9zdt.js";import"../chunk-8xy18qmz.js";export{a as customElement};
|
|
14
2
|
|
|
15
|
-
//# debugId=
|
|
3
|
+
//# debugId=233D559C4D57950264756E2164756E21
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": [
|
|
3
|
+
"sources": [],
|
|
4
4
|
"sourcesContent": [
|
|
5
|
-
"/**\n * Registers a web component with the given name on the global `window.customElements` registry.\n * @param name selector name.\n */\nexport function customElement(name: string) {\n return (target: CustomElementConstructor) => {\n if (!globalThis.window) return;\n if (!window.customElements.get(name)) {\n window.customElements.define(name, target);\n }\n };\n}\n"
|
|
6
5
|
],
|
|
7
|
-
"mappings": "
|
|
8
|
-
"debugId": "
|
|
6
|
+
"mappings": "",
|
|
7
|
+
"debugId": "233D559C4D57950264756E2164756E21",
|
|
9
8
|
"names": []
|
|
10
9
|
}
|
|
@@ -1 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import type { StandardOrLegacyMethodDecoratorArgs } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* A decorator to debounce a method.
|
|
4
|
+
* @param timeout The debounce timeout in milliseconds.
|
|
5
|
+
*/
|
|
6
|
+
export declare function debounce(timeout: number): (protoOrTarget: StandardOrLegacyMethodDecoratorArgs["protoOrTarget"], nameOrContext: StandardOrLegacyMethodDecoratorArgs["nameOrContext"], descriptor?: StandardOrLegacyMethodDecoratorArgs["descriptor"]) => any;
|
|
@@ -1,21 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
function debounce(timeout) {
|
|
3
|
-
let timeoutRef = null;
|
|
4
|
-
return (_target, _propertyKey, descriptor) => {
|
|
5
|
-
const originalMethod = descriptor.value;
|
|
6
|
-
descriptor.value = function debounce(...args) {
|
|
7
|
-
if (timeoutRef !== null) {
|
|
8
|
-
clearTimeout(timeoutRef);
|
|
9
|
-
}
|
|
10
|
-
timeoutRef = setTimeout(() => {
|
|
11
|
-
originalMethod.apply(this, args);
|
|
12
|
-
}, timeout);
|
|
13
|
-
};
|
|
14
|
-
return descriptor;
|
|
15
|
-
};
|
|
16
|
-
}
|
|
17
|
-
export {
|
|
18
|
-
debounce
|
|
19
|
-
};
|
|
1
|
+
import{za as a}from"../chunk-mqxmfvyp.js";import"../chunk-hn4j8rt5.js";import"../chunk-8vak8w5w.js";import"../chunk-nerd6fmg.js";import"../chunk-13ydx769.js";import"../chunk-8xy18qmz.js";export{a as debounce};
|
|
20
2
|
|
|
21
|
-
//# debugId=
|
|
3
|
+
//# debugId=BCD4A1D2E7714F4364756E2164756E21
|
|
@@ -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 debounce(\n timeout: number,\n): (target: any, propertyKey: string, descriptor: PropertyDescriptor) => PropertyDescriptor {\n let timeoutRef: ReturnType<typeof setTimeout> | null = null;\n\n return (_target: RadiantElement, _propertyKey: string, descriptor: PropertyDescriptor): PropertyDescriptor => {\n const originalMethod = descriptor.value;\n\n descriptor.value = function debounce(...args: any[]) {\n if (timeoutRef !== null) {\n clearTimeout(timeoutRef);\n }\n\n timeoutRef = setTimeout(() => {\n originalMethod.apply(this, args);\n }, timeout);\n };\n\n return descriptor;\n };\n}\n"
|
|
6
5
|
],
|
|
7
|
-
"mappings": "
|
|
8
|
-
"debugId": "
|
|
6
|
+
"mappings": "",
|
|
7
|
+
"debugId": "BCD4A1D2E7714F4364756E2164756E21",
|
|
9
8
|
"names": []
|
|
10
9
|
}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { type EventEmitterConfig } from '../tools/event-emitter';
|
|
2
|
+
import type { StandardOrLegacyFieldDecoratorArgs } from '../types';
|
|
2
3
|
/**
|
|
3
4
|
* Decorator that attaches an EventEmitter to the class field property.
|
|
4
5
|
* The EventEmitter can be used to dispatch custom events from the target element.
|
|
5
|
-
* @param eventConfig Configuration for the event emitter.
|
|
6
|
+
* @param eventConfig {@link EventEmitterConfig} Configuration for the event emitter.
|
|
6
7
|
* @see {@link EventEmitter} for more details about how the EventEmitter works.
|
|
7
8
|
*/
|
|
8
|
-
export declare function event(eventConfig: EventEmitterConfig): (
|
|
9
|
+
export declare function event(eventConfig: EventEmitterConfig): (protoOrTarget: StandardOrLegacyFieldDecoratorArgs["protoOrTarget"], nameOrContext: StandardOrLegacyFieldDecoratorArgs["nameOrContext"]) => any;
|
package/dist/decorators/event.js
CHANGED
|
@@ -1,47 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
class EventEmitter {
|
|
3
|
-
host;
|
|
4
|
-
eventConfig;
|
|
5
|
-
constructor(host, eventConfig) {
|
|
6
|
-
this.host = host;
|
|
7
|
-
this.eventConfig = eventConfig;
|
|
8
|
-
}
|
|
9
|
-
emit(detail) {
|
|
10
|
-
const event = new CustomEvent(this.eventConfig.name, {
|
|
11
|
-
detail,
|
|
12
|
-
bubbles: this.eventConfig.bubbles,
|
|
13
|
-
cancelable: this.eventConfig.cancelable,
|
|
14
|
-
composed: this.eventConfig.composed
|
|
15
|
-
});
|
|
16
|
-
this.host.dispatchEvent(event);
|
|
17
|
-
}
|
|
18
|
-
}
|
|
1
|
+
import{na as a}from"../chunk-r75y7ydb.js";import"../chunk-a7hzs37s.js";import"../chunk-k5hr781q.js";import"../chunk-8tvt04cm.js";import"../chunk-nerd6fmg.js";import"../chunk-42tyhfvh.js";import"../chunk-qbnedp0y.js";import"../chunk-8xy18qmz.js";export{a as event};
|
|
19
2
|
|
|
20
|
-
|
|
21
|
-
function event(eventConfig) {
|
|
22
|
-
return (target, propertyKey) => {
|
|
23
|
-
if (!propertyKey) {
|
|
24
|
-
throw new Error("The propertyKey is missing for the event decorator.");
|
|
25
|
-
}
|
|
26
|
-
if (!eventConfig || !eventConfig.name) {
|
|
27
|
-
throw new Error("Invalid eventConfig provided.");
|
|
28
|
-
}
|
|
29
|
-
const uniqueKey = Symbol(eventConfig.name);
|
|
30
|
-
Object.defineProperty(target, propertyKey, {
|
|
31
|
-
get() {
|
|
32
|
-
const emittersMap = eventEmitters.get(this) || new Map;
|
|
33
|
-
if (!emittersMap.has(uniqueKey)) {
|
|
34
|
-
emittersMap.set(uniqueKey, new EventEmitter(this, eventConfig));
|
|
35
|
-
eventEmitters.set(this, emittersMap);
|
|
36
|
-
}
|
|
37
|
-
return emittersMap.get(uniqueKey);
|
|
38
|
-
}
|
|
39
|
-
});
|
|
40
|
-
};
|
|
41
|
-
}
|
|
42
|
-
var eventEmitters = new WeakMap;
|
|
43
|
-
export {
|
|
44
|
-
event
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
//# debugId=64B9F802F680DEB764756E2164756E21
|
|
3
|
+
//# debugId=9D07D82316C2113964756E2164756E21
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": [
|
|
3
|
+
"sources": [],
|
|
4
4
|
"sourcesContent": [
|
|
5
|
-
"import type { RadiantElement } from '..';\n\nexport interface EventEmitterConfig {\n name: string;\n bubbles?: boolean;\n cancelable?: boolean;\n composed?: 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 private host: RadiantElement;\n private eventConfig: EventEmitterConfig;\n\n /**\n * Constructs a new instance of the EventEmitter class.\n *\n * @param host - The host element on which the events will be dispatched.\n * @param eventConfig - The configuration for the event.\n */\n constructor(host: RadiantElement, eventConfig: EventEmitterConfig) {\n this.host = host;\n this.eventConfig = eventConfig;\n }\n\n /**\n * Emits a custom event with the specified detail.\n *\n * @param detail - The detail object to be passed along with the event.\n */\n emit(detail?: T) {\n const event = new CustomEvent(this.eventConfig.name, {\n detail: detail,\n bubbles: this.eventConfig.bubbles,\n cancelable: this.eventConfig.cancelable,\n composed: this.eventConfig.composed,\n });\n this.host.dispatchEvent(event);\n }\n}\n",
|
|
6
|
-
"import { EventEmitter, type EventEmitterConfig } from '@/tools/event-emitter';\n\nconst eventEmitters = new WeakMap();\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 (target: any, propertyKey: string) => {\n if (!propertyKey) {\n throw new Error('The propertyKey is missing for the event decorator.');\n }\n\n if (!eventConfig || !eventConfig.name) {\n throw new Error('Invalid eventConfig provided.');\n }\n\n const uniqueKey = Symbol(eventConfig.name);\n\n Object.defineProperty(target, propertyKey, {\n get() {\n const emittersMap: Map<symbol, EventEmitter> = eventEmitters.get(this) || new Map();\n if (!emittersMap.has(uniqueKey)) {\n emittersMap.set(uniqueKey, new EventEmitter(this, eventConfig));\n eventEmitters.set(this, emittersMap);\n }\n\n return emittersMap.get(uniqueKey);\n },\n });\n };\n}\n"
|
|
7
5
|
],
|
|
8
|
-
"mappings": "
|
|
9
|
-
"debugId": "
|
|
6
|
+
"mappings": "",
|
|
7
|
+
"debugId": "9D07D82316C2113964756E2164756E21",
|
|
10
8
|
"names": []
|
|
11
9
|
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { RadiantElement } from '../../core/radiant-element';
|
|
2
|
+
/**
|
|
3
|
+
* A decorator to bind a method to the instance.
|
|
4
|
+
* @param target {@link RadiantElement}
|
|
5
|
+
* @param propertyKey string
|
|
6
|
+
* @param descriptor {@link PropertyDescriptor}
|
|
7
|
+
* @returns
|
|
8
|
+
*/
|
|
9
|
+
export declare function bound(target: RadiantElement, propertyKey: string, descriptor: PropertyDescriptor): PropertyDescriptor;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Registers a web component with the given name on the global `window.customElements` registry.
|
|
3
|
+
* @param name selector name.
|
|
4
|
+
* @param options {@link ElementDefinitionOptions}
|
|
5
|
+
*/
|
|
6
|
+
export declare function customElement(name: string, options?: ElementDefinitionOptions): (target: CustomElementConstructor) => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function debounce(timeout: number): (target: any, propertyKey: string, descriptor: PropertyDescriptor) => PropertyDescriptor;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { RadiantElement } from '../../core/radiant-element';
|
|
2
|
+
import type { EventEmitterConfig } from '../../tools/event-emitter';
|
|
3
|
+
/**
|
|
4
|
+
* Decorator that attaches an EventEmitter to the class field property.
|
|
5
|
+
* The EventEmitter can be used to dispatch custom events from the target element.
|
|
6
|
+
* @param eventConfig Configuration for the event emitter.
|
|
7
|
+
* @see {@link EventEmitter} for more details about how the EventEmitter works.
|
|
8
|
+
*/
|
|
9
|
+
export declare function event(eventConfig: EventEmitterConfig): (proto: RadiantElement, propertyKey: string) => void;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { RadiantElement } from '../../core/radiant-element';
|
|
2
|
+
type LegacyInstanceInitializer = (instance: RadiantElement) => void;
|
|
3
|
+
/**
|
|
4
|
+
* Registers per-instance initialization work for a legacy decorator.
|
|
5
|
+
*
|
|
6
|
+
* Legacy decorators execute against the prototype, so any initialization that
|
|
7
|
+
* needs the concrete element instance must be deferred until construction time.
|
|
8
|
+
*/
|
|
9
|
+
export declare function registerLegacyInstanceInitializer(proto: object, initializer: LegacyInstanceInitializer): void;
|
|
10
|
+
/**
|
|
11
|
+
* Runs all legacy decorator initializers for a newly constructed element.
|
|
12
|
+
*
|
|
13
|
+
* Initializers are collected from the prototype chain and executed from base to
|
|
14
|
+
* derived class so inherited setup remains stable.
|
|
15
|
+
*/
|
|
16
|
+
export declare function runLegacyInstanceInitializers(instance: RadiantElement): void;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { RadiantElement } from '../../core/radiant-element';
|
|
2
|
+
import type { OnEventConfig } from '../on-event';
|
|
3
|
+
/**
|
|
4
|
+
* A decorator to subscribe to an event on the target element.
|
|
5
|
+
* The event listener will be automatically unsubscribed when the element is disconnected.
|
|
6
|
+
*
|
|
7
|
+
* Note: This decorator uses event delegation, which means it relies on event bubbling.
|
|
8
|
+
* Therefore, it will not work with events that do not bubble, such as `focus`, `blur`, `load`, `unload`, `scroll`, etc.
|
|
9
|
+
* For focus and blur events, consider using `focusin` and `focusout` which are similar but do bubble.
|
|
10
|
+
*
|
|
11
|
+
* @param eventConfig The event configuration.
|
|
12
|
+
* @param eventConfig.selectors The CSS selector(s) of the target element(s).
|
|
13
|
+
* @param eventConfig.ref The data-ref attribute of the target element.
|
|
14
|
+
* @param eventConfig.type The type of the event to listen for.
|
|
15
|
+
* @param eventConfig.options Optional. An options object that specifies characteristics about the event listener.
|
|
16
|
+
*/
|
|
17
|
+
export declare function onEvent(eventConfig: OnEventConfig): (proto: RadiantElement, _: string, descriptor: PropertyDescriptor) => PropertyDescriptor;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { RadiantElement } from '../../core/radiant-element';
|
|
2
|
+
/**
|
|
3
|
+
* A decorator to subscribe to an updated callback when a reactive field or property changes.
|
|
4
|
+
* @param eventConfig The event configuration.
|
|
5
|
+
*/
|
|
6
|
+
export declare function onUpdated(keyOrKeys: string | string[]): (target: RadiantElement, methodName: string) => void;
|