@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
|
@@ -1,65 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
var ContextEventsTypes;
|
|
3
|
-
((ContextEventsTypes2) => {
|
|
4
|
-
ContextEventsTypes2["SUBSCRIPTION_REQUEST"] = "context--subscription-request";
|
|
5
|
-
ContextEventsTypes2["CONTEXT_REQUEST"] = "context-request";
|
|
6
|
-
ContextEventsTypes2["ON_MOUNT"] = "context--on-mount";
|
|
7
|
-
})(ContextEventsTypes ||= {});
|
|
1
|
+
import{h as a}from"../../chunk-d7hh3ze6.js";import"../../chunk-agjb2a3r.js";import"../../chunk-hkmm3dj9.js";import"../../chunk-vpfm9yw8.js";import"../../chunk-s4qgct1z.js";import"../../chunk-1w1dm68j.js";import"../../chunk-9gjmqxp2.js";import"../../chunk-8tvt04cm.js";import"../../chunk-nerd6fmg.js";import"../../chunk-4cc2syf5.js";import"../../chunk-8xy18qmz.js";export{a as consumeContext};
|
|
8
2
|
|
|
9
|
-
|
|
10
|
-
context;
|
|
11
|
-
callback;
|
|
12
|
-
subscribe;
|
|
13
|
-
constructor(context, callback, subscribe) {
|
|
14
|
-
super("context-request" /* CONTEXT_REQUEST */, { bubbles: true, composed: true });
|
|
15
|
-
this.context = context;
|
|
16
|
-
this.callback = callback;
|
|
17
|
-
this.subscribe = subscribe;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
class ContextOnMountEvent extends CustomEvent {
|
|
22
|
-
constructor(context) {
|
|
23
|
-
super("context--on-mount" /* ON_MOUNT */, {
|
|
24
|
-
detail: { context },
|
|
25
|
-
bubbles: true,
|
|
26
|
-
composed: true
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
class ContextSubscriptionRequestEvent extends Event {
|
|
32
|
-
context;
|
|
33
|
-
callback;
|
|
34
|
-
select;
|
|
35
|
-
subscribe;
|
|
36
|
-
constructor(context, callback, select, subscribe) {
|
|
37
|
-
super("context--subscription-request" /* SUBSCRIPTION_REQUEST */, {
|
|
38
|
-
bubbles: true,
|
|
39
|
-
composed: true
|
|
40
|
-
});
|
|
41
|
-
this.context = context;
|
|
42
|
-
this.callback = callback;
|
|
43
|
-
this.select = select;
|
|
44
|
-
this.subscribe = subscribe;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
// src/context/decorators/consume-context.ts
|
|
49
|
-
function consumeContext(contextToProvide) {
|
|
50
|
-
return (proto, propertyKey) => {
|
|
51
|
-
const originalConnectedCallback = proto.connectedCallback;
|
|
52
|
-
proto.connectedCallback = function() {
|
|
53
|
-
originalConnectedCallback.call(this);
|
|
54
|
-
this.dispatchEvent(new ContextRequestEvent(contextToProvide, (context) => {
|
|
55
|
-
this[propertyKey] = context;
|
|
56
|
-
this.connectedContextCallback(contextToProvide);
|
|
57
|
-
}));
|
|
58
|
-
};
|
|
59
|
-
};
|
|
60
|
-
}
|
|
61
|
-
export {
|
|
62
|
-
consumeContext
|
|
63
|
-
};
|
|
64
|
-
|
|
65
|
-
//# debugId=D00E7FCC029AE39264756E2164756E21
|
|
3
|
+
//# debugId=222C6D8A2563DEE764756E2164756E21
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": [
|
|
3
|
+
"sources": [],
|
|
4
4
|
"sourcesContent": [
|
|
5
|
-
"import type { Context, ContextCallback, ContextType, UnknownContext } from './types';\n\n/**\n * List of events which can be emitted by a context provider or requester.\n */\nexport enum ContextEventsTypes {\n SUBSCRIPTION_REQUEST = 'context--subscription-request',\n CONTEXT_REQUEST = 'context-request',\n ON_MOUNT = 'context--on-mount',\n}\n\n/**\n * An event fired by a context requester to signal it desires a named context.\n *\n * A provider should inspect the `context` property of the event to determine if it has a value that can\n * satisfy the request, calling the `callback` with the requested value if so.\n *\n * If the requested context event contains a truthy `subscribe` value, then a provider can call the callback\n * multiple times if the value is changed, if this is the case the provider should pass an `unsubscribe`\n * function to the callback which requesters can invoke to indicate they no longer wish to receive these updates.\n */\nexport class ContextRequestEvent<T extends UnknownContext> extends Event {\n public constructor(\n public readonly context: T,\n public readonly callback: ContextCallback<ContextType<T>>,\n public readonly subscribe?: boolean,\n ) {\n super(ContextEventsTypes.CONTEXT_REQUEST, { bubbles: true, composed: true });\n }\n}\n\n/**\n * A type which represents a subscription to a context value.\n */\nexport type ContextSubscription<T extends UnknownContext> = {\n select?: (context: ContextType<T>) => unknown;\n callback: (value: unknown) => void;\n};\n\n/**\n * An event fired by a context provider to signal that a context value has been mounted and is available for consumption.\n */\nexport class ContextOnMountEvent extends CustomEvent<{ context: UnknownContext }> {\n public constructor(context: UnknownContext) {\n super(ContextEventsTypes.ON_MOUNT, {\n detail: { context },\n bubbles: true,\n composed: true,\n });\n }\n}\n\n/**\n * An event fired by a context requester to signal it desires a named context.\n *\n * A provider should inspect the `context` property of the event to determine if it has a value that can\n * satisfy the request, calling the `callback` with the requested value if so.\n *\n * If the requested context event contains a truthy `subscribe` value, then a provider can call the callback\n * multiple times if the value is changed, if this is the case the provider should pass an `unsubscribe`\n * function to the callback which requesters can invoke to indicate they no longer wish to receive these updates.\n *\n * It accepts a `selector` property which can be used to request a specific property of the context value.\n */\nexport class ContextSubscriptionRequestEvent<T extends UnknownContext> extends Event {\n public constructor(\n public readonly context: T,\n public readonly callback: (value: ContextType<T> | { [K in keyof ContextType<T>]: ContextType<T>[K] }) => void,\n public readonly select?: (context: ContextType<T>) => unknown,\n public readonly subscribe?: boolean,\n ) {\n super(ContextEventsTypes.SUBSCRIPTION_REQUEST, {\n bubbles: true,\n composed: true,\n });\n }\n}\n\ndeclare global {\n interface HTMLElementEventMap {\n /**\n * A 'context-request-subscription' event can be emitted by any element which desires\n * a context value to be injected by an external provider.\n */\n [ContextEventsTypes.SUBSCRIPTION_REQUEST]: ContextSubscriptionRequestEvent<UnknownContext>;\n /**\n * A context-request-provider event can be emitted by a context requester to signal\n * that it desires a context value to be provided by a context provider.\n */\n [ContextEventsTypes.CONTEXT_REQUEST]: ContextRequestEvent<Context<unknown, unknown>>;\n /**\n * A 'context-mount' event can be emitted by a context provider to signal\n * that a context value has been mounted and is available for consumption.\n */\n [ContextEventsTypes.ON_MOUNT]: ContextOnMountEvent;\n }\n}\n",
|
|
6
|
-
"import { ContextRequestEvent } from '@/context/events';\nimport type { UnknownContext } from '@/context/types';\nimport type { RadiantElement } from '@/core/radiant-element';\n\n/**\n * A decorator to provide a context to the target element.\n * @param contextToProvide\n * @returns\n */\nexport function consumeContext(contextToProvide: UnknownContext) {\n return (proto: RadiantElement, propertyKey: string) => {\n const originalConnectedCallback = proto.connectedCallback;\n\n proto.connectedCallback = function (this: RadiantElement) {\n originalConnectedCallback.call(this);\n this.dispatchEvent(\n new ContextRequestEvent(contextToProvide, (context) => {\n (this as any)[propertyKey] = context;\n this.connectedContextCallback(contextToProvide);\n }),\n );\n };\n };\n}\n"
|
|
7
5
|
],
|
|
8
|
-
"mappings": "
|
|
9
|
-
"debugId": "
|
|
6
|
+
"mappings": "",
|
|
7
|
+
"debugId": "222C6D8A2563DEE764756E2164756E21",
|
|
10
8
|
"names": []
|
|
11
9
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function createContextSelectionDelivery(host: object, apply: (value: unknown) => void, requestUpdate: boolean): (value: unknown) => void;
|
|
@@ -1,16 +1,36 @@
|
|
|
1
|
-
import type { Context, UnknownContext } from '../../context/types';
|
|
2
1
|
import type { RadiantElement } from '../../core/radiant-element';
|
|
3
|
-
type
|
|
2
|
+
import type { Context, ContextType, UnknownContext } from '../types';
|
|
3
|
+
import type { OnContextUpdateOptions } from './on-context-update';
|
|
4
|
+
export type ContextSelectorOptions<T extends UnknownContext, Selected = ContextType<T>> = {
|
|
5
|
+
/** Context token to resolve from ancestor providers. */
|
|
4
6
|
context: T;
|
|
5
|
-
|
|
7
|
+
/** Optional projection that narrows the resolved context before delivery. */
|
|
8
|
+
select?: (context: ContextType<T>) => Selected;
|
|
9
|
+
/** Whether client-side event-channel subscriptions should stay active after the first value. */
|
|
6
10
|
subscribe?: boolean;
|
|
7
11
|
};
|
|
8
12
|
/**
|
|
9
|
-
*
|
|
10
|
-
* @param context The context to subscribe to.
|
|
11
|
-
* @param selector The selector to subscribe to. If not provided, the whole context will be subscribed to.
|
|
12
|
-
* @param subscribe @default true Whether to subscribe or unsubscribe. Optional.
|
|
13
|
-
* @returns
|
|
13
|
+
* @deprecated Use `ContextSelectorOptions` for field usage or `OnContextUpdateOptions` for method usage.
|
|
14
14
|
*/
|
|
15
|
-
export
|
|
15
|
+
export type SubscribeToContextOptions<T extends UnknownContext> = OnContextUpdateOptions<T>;
|
|
16
|
+
type ContextUpdateMethod<Selected> = (value: Selected) => unknown;
|
|
17
|
+
type ContextSelectorDecorator<Selected> = {
|
|
18
|
+
<Host extends RadiantElement>(protoOrTarget: undefined, nameOrContext: ClassFieldDecoratorContext<Host, Selected>): (this: Host, initialValue: Selected) => Selected;
|
|
19
|
+
<Host extends RadiantElement, TMethod extends ContextUpdateMethod<Selected>>(protoOrTarget: TMethod, nameOrContext: ClassMethodDecoratorContext<Host, TMethod>): void;
|
|
20
|
+
(protoOrTarget: RadiantElement, nameOrContext: string): void;
|
|
21
|
+
(protoOrTarget: RadiantElement, nameOrContext: string, descriptor: TypedPropertyDescriptor<ContextUpdateMethod<Selected>>): TypedPropertyDescriptor<ContextUpdateMethod<Selected>> | void;
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* Subscribes a field or method to the current value, or a selected slice, of a context.
|
|
25
|
+
*
|
|
26
|
+
* **Field form (preferred):** The field holds the latest context value and is
|
|
27
|
+
* updated whenever the provider changes. On `RadiantComponent` hosts, each
|
|
28
|
+
* update schedules `requestUpdate()` automatically so `render()` stays in sync.
|
|
29
|
+
*
|
|
30
|
+
* **Method form (deprecated — use `@onContextUpdate`):** The method is called
|
|
31
|
+
* with the new value on each change.
|
|
32
|
+
*
|
|
33
|
+
* @param options Context subscription configuration.
|
|
34
|
+
*/
|
|
35
|
+
export declare function contextSelector<T extends Context<unknown, unknown>, Selected = ContextType<T>>(options: ContextSelectorOptions<T, Selected>): ContextSelectorDecorator<Selected>;
|
|
16
36
|
export {};
|
|
@@ -1,72 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
var ContextEventsTypes;
|
|
3
|
-
((ContextEventsTypes2) => {
|
|
4
|
-
ContextEventsTypes2["SUBSCRIPTION_REQUEST"] = "context--subscription-request";
|
|
5
|
-
ContextEventsTypes2["CONTEXT_REQUEST"] = "context-request";
|
|
6
|
-
ContextEventsTypes2["ON_MOUNT"] = "context--on-mount";
|
|
7
|
-
})(ContextEventsTypes ||= {});
|
|
1
|
+
import{f as a}from"../../chunk-r1cvaz1t.js";import"../../chunk-par0t822.js";import"../../chunk-chyn72n9.js";import"../../chunk-d98q3myg.js";import"../../chunk-qaagk55a.js";import"../../chunk-5td6v9k3.js";import"../../chunk-vpfm9yw8.js";import"../../chunk-s4qgct1z.js";import"../../chunk-1w1dm68j.js";import"../../chunk-9gjmqxp2.js";import"../../chunk-8tvt04cm.js";import"../../chunk-4cc2syf5.js";import"../../chunk-8xy18qmz.js";export{a as contextSelector};
|
|
8
2
|
|
|
9
|
-
|
|
10
|
-
context;
|
|
11
|
-
callback;
|
|
12
|
-
subscribe;
|
|
13
|
-
constructor(context, callback, subscribe) {
|
|
14
|
-
super("context-request" /* CONTEXT_REQUEST */, { bubbles: true, composed: true });
|
|
15
|
-
this.context = context;
|
|
16
|
-
this.callback = callback;
|
|
17
|
-
this.subscribe = subscribe;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
class ContextOnMountEvent extends CustomEvent {
|
|
22
|
-
constructor(context) {
|
|
23
|
-
super("context--on-mount" /* ON_MOUNT */, {
|
|
24
|
-
detail: { context },
|
|
25
|
-
bubbles: true,
|
|
26
|
-
composed: true
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
class ContextSubscriptionRequestEvent extends Event {
|
|
32
|
-
context;
|
|
33
|
-
callback;
|
|
34
|
-
select;
|
|
35
|
-
subscribe;
|
|
36
|
-
constructor(context, callback, select, subscribe) {
|
|
37
|
-
super("context--subscription-request" /* SUBSCRIPTION_REQUEST */, {
|
|
38
|
-
bubbles: true,
|
|
39
|
-
composed: true
|
|
40
|
-
});
|
|
41
|
-
this.context = context;
|
|
42
|
-
this.callback = callback;
|
|
43
|
-
this.select = select;
|
|
44
|
-
this.subscribe = subscribe;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
// src/context/decorators/context-selector.ts
|
|
49
|
-
function contextSelector({
|
|
50
|
-
context,
|
|
51
|
-
select,
|
|
52
|
-
subscribe = true
|
|
53
|
-
}) {
|
|
54
|
-
return (proto, _, descriptor) => {
|
|
55
|
-
const originalMethod = descriptor.value;
|
|
56
|
-
const originalConnectedCallback = proto.connectedCallback;
|
|
57
|
-
proto.connectedCallback = function() {
|
|
58
|
-
originalConnectedCallback.call(this);
|
|
59
|
-
this.dispatchEvent(new ContextSubscriptionRequestEvent(context, originalMethod.bind(this), select, subscribe));
|
|
60
|
-
};
|
|
61
|
-
descriptor.value = function(...args) {
|
|
62
|
-
const result = originalMethod.apply(this, args);
|
|
63
|
-
return result;
|
|
64
|
-
};
|
|
65
|
-
return descriptor;
|
|
66
|
-
};
|
|
67
|
-
}
|
|
68
|
-
export {
|
|
69
|
-
contextSelector
|
|
70
|
-
};
|
|
71
|
-
|
|
72
|
-
//# debugId=BAE397795EE3704564756E2164756E21
|
|
3
|
+
//# debugId=75B065CEA3D6614864756E2164756E21
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": [
|
|
3
|
+
"sources": [],
|
|
4
4
|
"sourcesContent": [
|
|
5
|
-
"import type { Context, ContextCallback, ContextType, UnknownContext } from './types';\n\n/**\n * List of events which can be emitted by a context provider or requester.\n */\nexport enum ContextEventsTypes {\n SUBSCRIPTION_REQUEST = 'context--subscription-request',\n CONTEXT_REQUEST = 'context-request',\n ON_MOUNT = 'context--on-mount',\n}\n\n/**\n * An event fired by a context requester to signal it desires a named context.\n *\n * A provider should inspect the `context` property of the event to determine if it has a value that can\n * satisfy the request, calling the `callback` with the requested value if so.\n *\n * If the requested context event contains a truthy `subscribe` value, then a provider can call the callback\n * multiple times if the value is changed, if this is the case the provider should pass an `unsubscribe`\n * function to the callback which requesters can invoke to indicate they no longer wish to receive these updates.\n */\nexport class ContextRequestEvent<T extends UnknownContext> extends Event {\n public constructor(\n public readonly context: T,\n public readonly callback: ContextCallback<ContextType<T>>,\n public readonly subscribe?: boolean,\n ) {\n super(ContextEventsTypes.CONTEXT_REQUEST, { bubbles: true, composed: true });\n }\n}\n\n/**\n * A type which represents a subscription to a context value.\n */\nexport type ContextSubscription<T extends UnknownContext> = {\n select?: (context: ContextType<T>) => unknown;\n callback: (value: unknown) => void;\n};\n\n/**\n * An event fired by a context provider to signal that a context value has been mounted and is available for consumption.\n */\nexport class ContextOnMountEvent extends CustomEvent<{ context: UnknownContext }> {\n public constructor(context: UnknownContext) {\n super(ContextEventsTypes.ON_MOUNT, {\n detail: { context },\n bubbles: true,\n composed: true,\n });\n }\n}\n\n/**\n * An event fired by a context requester to signal it desires a named context.\n *\n * A provider should inspect the `context` property of the event to determine if it has a value that can\n * satisfy the request, calling the `callback` with the requested value if so.\n *\n * If the requested context event contains a truthy `subscribe` value, then a provider can call the callback\n * multiple times if the value is changed, if this is the case the provider should pass an `unsubscribe`\n * function to the callback which requesters can invoke to indicate they no longer wish to receive these updates.\n *\n * It accepts a `selector` property which can be used to request a specific property of the context value.\n */\nexport class ContextSubscriptionRequestEvent<T extends UnknownContext> extends Event {\n public constructor(\n public readonly context: T,\n public readonly callback: (value: ContextType<T> | { [K in keyof ContextType<T>]: ContextType<T>[K] }) => void,\n public readonly select?: (context: ContextType<T>) => unknown,\n public readonly subscribe?: boolean,\n ) {\n super(ContextEventsTypes.SUBSCRIPTION_REQUEST, {\n bubbles: true,\n composed: true,\n });\n }\n}\n\ndeclare global {\n interface HTMLElementEventMap {\n /**\n * A 'context-request-subscription' event can be emitted by any element which desires\n * a context value to be injected by an external provider.\n */\n [ContextEventsTypes.SUBSCRIPTION_REQUEST]: ContextSubscriptionRequestEvent<UnknownContext>;\n /**\n * A context-request-provider event can be emitted by a context requester to signal\n * that it desires a context value to be provided by a context provider.\n */\n [ContextEventsTypes.CONTEXT_REQUEST]: ContextRequestEvent<Context<unknown, unknown>>;\n /**\n * A 'context-mount' event can be emitted by a context provider to signal\n * that a context value has been mounted and is available for consumption.\n */\n [ContextEventsTypes.ON_MOUNT]: ContextOnMountEvent;\n }\n}\n",
|
|
6
|
-
"import { ContextSubscriptionRequestEvent } from '@/context/events';\nimport type { Context, ContextType, UnknownContext } from '@/context/types';\nimport type { RadiantElement } from '@/core/radiant-element';\n\ntype ArgsType<T extends UnknownContext> = SubscribeToContextOptions<T>['select'] extends (...args: any[]) => infer R\n ? R\n : ContextType<T>;\n\ntype SubscribeToContextOptions<T extends UnknownContext> = {\n context: T;\n select?: (context: T['__context__']) => unknown;\n subscribe?: boolean;\n};\n/**\n * A decorator to subscribe to a context selector.\n * @param context The context to subscribe to.\n * @param selector The selector to subscribe to. If not provided, the whole context will be subscribed to.\n * @param subscribe @default true Whether to subscribe or unsubscribe. Optional.\n * @returns\n */\nexport function contextSelector<T extends Context<unknown, unknown>>({\n context,\n select,\n subscribe = true,\n}: SubscribeToContextOptions<T>) {\n return (proto: RadiantElement, _: string, descriptor: PropertyDescriptor) => {\n const originalMethod = descriptor.value;\n const originalConnectedCallback = proto.connectedCallback;\n\n proto.connectedCallback = function (this: RadiantElement) {\n originalConnectedCallback.call(this);\n this.dispatchEvent(new ContextSubscriptionRequestEvent(context, originalMethod.bind(this), select, subscribe));\n };\n\n descriptor.value = function (...args: ArgsType<T>[]) {\n const result = originalMethod.apply(this, args);\n return result;\n };\n\n return descriptor;\n };\n}\n"
|
|
7
5
|
],
|
|
8
|
-
"mappings": "
|
|
9
|
-
"debugId": "
|
|
6
|
+
"mappings": "",
|
|
7
|
+
"debugId": "75B065CEA3D6614864756E2164756E21",
|
|
10
8
|
"names": []
|
|
11
9
|
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{i as a}from"../../../chunk-agjb2a3r.js";import"../../../chunk-vpfm9yw8.js";import"../../../chunk-s4qgct1z.js";import"../../../chunk-1w1dm68j.js";import"../../../chunk-9gjmqxp2.js";import"../../../chunk-8tvt04cm.js";import"../../../chunk-4cc2syf5.js";import"../../../chunk-8xy18qmz.js";export{a as consumeContext};
|
|
2
|
+
|
|
3
|
+
//# debugId=5DC694E5EC760C2B64756E2164756E21
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { RadiantElement } from '../../../core/radiant-element';
|
|
2
|
+
import type { Context, ContextType } from '../../types';
|
|
3
|
+
export type ContextSelectorFieldOptions<T extends Context<unknown, unknown>, Selected = ContextType<T>> = {
|
|
4
|
+
context: T;
|
|
5
|
+
select?: (context: ContextType<T>) => Selected;
|
|
6
|
+
subscribe?: boolean;
|
|
7
|
+
};
|
|
8
|
+
export declare function contextSelectorField<T extends Context<unknown, unknown>, Selected = ContextType<T>>(options: ContextSelectorFieldOptions<T, Selected>): (target: RadiantElement, propertyName: string) => void;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{g as a}from"../../../chunk-par0t822.js";import"../../../chunk-5td6v9k3.js";import"../../../chunk-vpfm9yw8.js";import"../../../chunk-s4qgct1z.js";import"../../../chunk-1w1dm68j.js";import"../../../chunk-9gjmqxp2.js";import"../../../chunk-8tvt04cm.js";import"../../../chunk-4cc2syf5.js";import"../../../chunk-8xy18qmz.js";export{a as contextSelectorField};
|
|
2
|
+
|
|
3
|
+
//# debugId=C13E724F5284FFE864756E2164756E21
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { RadiantElement } from '../../../core/radiant-element';
|
|
2
|
+
import type { Context, ContextType } from '../../types';
|
|
3
|
+
import type { OnContextUpdateOptions } from '../on-context-update';
|
|
4
|
+
export declare function contextSelector<T extends Context<unknown, unknown>, Selected = ContextType<T>>({ context, select, subscribe, requestUpdate, }: OnContextUpdateOptions<T, Selected>): (proto: RadiantElement, _: string, descriptor: PropertyDescriptor) => PropertyDescriptor;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{r as a}from"../../../chunk-d98q3myg.js";import"../../../chunk-5td6v9k3.js";import"../../../chunk-vpfm9yw8.js";import"../../../chunk-s4qgct1z.js";import"../../../chunk-1w1dm68j.js";import"../../../chunk-9gjmqxp2.js";import"../../../chunk-8tvt04cm.js";import"../../../chunk-4cc2syf5.js";import"../../../chunk-8xy18qmz.js";export{a as contextSelector};
|
|
2
|
+
|
|
3
|
+
//# debugId=A48F14032A04624164756E2164756E21
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { UnknownContext } from '../../../context/types';
|
|
2
|
+
import type { RadiantElement } from '../../../core/radiant-element';
|
|
3
|
+
import type { ProvideContextOptions } from '../provide-context';
|
|
4
|
+
export declare function provideContext<T extends UnknownContext>({ context, initialValue, hydrate, serialize, }: ProvideContextOptions<T>): (proto: RadiantElement, propertyKey: string) => void;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{k as a}from"../../../chunk-d0n7njdy.js";import"../../../chunk-jg20mzg8.js";import"../../../chunk-1w1dm68j.js";import"../../../chunk-6kdxrppw.js";import"../../../chunk-8tvt04cm.js";import"../../../chunk-ksv01cey.js";import"../../../chunk-8n2dhx28.js";import"../../../chunk-8xy18qmz.js";export{a as provideContext};
|
|
2
|
+
|
|
3
|
+
//# debugId=DFA116F2E7CD93F564756E2164756E21
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { RadiantElement } from '../../core/radiant-element';
|
|
2
|
+
import type { Context, ContextType, UnknownContext } from '../types';
|
|
3
|
+
type ContextUpdateMethod<Selected> = (value: Selected) => unknown;
|
|
4
|
+
type OnContextUpdateDecorator<Selected> = {
|
|
5
|
+
<Host extends RadiantElement, TMethod extends ContextUpdateMethod<Selected>>(protoOrTarget: TMethod, nameOrContext: ClassMethodDecoratorContext<Host, TMethod>): void;
|
|
6
|
+
(protoOrTarget: RadiantElement, nameOrContext: string, descriptor: TypedPropertyDescriptor<ContextUpdateMethod<Selected>>): TypedPropertyDescriptor<ContextUpdateMethod<Selected>> | void;
|
|
7
|
+
};
|
|
8
|
+
export type OnContextUpdateOptions<T extends UnknownContext, Selected = ContextType<T>> = {
|
|
9
|
+
/** Context token to resolve from ancestor providers. */
|
|
10
|
+
context: T;
|
|
11
|
+
/** Optional projection that narrows the resolved context before delivery. */
|
|
12
|
+
select?: (context: ContextType<T>) => Selected;
|
|
13
|
+
/** Whether client-side event-channel subscriptions should stay active after the first value. */
|
|
14
|
+
subscribe?: boolean;
|
|
15
|
+
/** Whether RadiantComponent hosts should schedule `requestUpdate()` after delivery. */
|
|
16
|
+
requestUpdate?: boolean;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Subscribes a method to the current value, or a selected slice, of a context.
|
|
20
|
+
*
|
|
21
|
+
* The decorated method is invoked during SSR when an ambient provider is
|
|
22
|
+
* available, and on the client it keeps receiving updates according to the
|
|
23
|
+
* `subscribe` option.
|
|
24
|
+
*
|
|
25
|
+
* On `RadiantComponent` hosts, each delivery also schedules `requestUpdate()`
|
|
26
|
+
* unless `requestUpdate: false` is set explicitly.
|
|
27
|
+
*
|
|
28
|
+
* @param options Context subscription configuration.
|
|
29
|
+
*/
|
|
30
|
+
export declare function onContextUpdate<T extends Context<unknown, unknown>, Selected = ContextType<T>>(options: OnContextUpdateOptions<T, Selected>): OnContextUpdateDecorator<Selected>;
|
|
31
|
+
export {};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{q as a}from"../../chunk-ak97hp4w.js";import"../../chunk-d98q3myg.js";import"../../chunk-qaagk55a.js";import"../../chunk-5td6v9k3.js";import"../../chunk-vpfm9yw8.js";import"../../chunk-s4qgct1z.js";import"../../chunk-1w1dm68j.js";import"../../chunk-9gjmqxp2.js";import"../../chunk-8tvt04cm.js";import"../../chunk-nerd6fmg.js";import"../../chunk-4cc2syf5.js";import"../../chunk-8xy18qmz.js";export{a as onContextUpdate};
|
|
2
|
+
|
|
3
|
+
//# debugId=C4EDA5C49D35311E64756E2164756E21
|
|
@@ -1,15 +1,26 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
4
|
-
type
|
|
1
|
+
import type { StandardOrLegacyFieldDecoratorArgs } from '../../types';
|
|
2
|
+
import type { AttributeTypeConstant } from '../../utils';
|
|
3
|
+
import type { UnknownContext } from '../types';
|
|
4
|
+
export type ProvideContextOptions<T extends UnknownContext> = {
|
|
5
|
+
/** Context token made available to descendant consumers. */
|
|
5
6
|
context: T;
|
|
7
|
+
/** Client-side default value installed before any SSR hydration is merged. */
|
|
6
8
|
initialValue?: T['__context__'];
|
|
9
|
+
/** Attribute type used to opt the provider into SSR hydration. */
|
|
7
10
|
hydrate?: AttributeTypeConstant;
|
|
11
|
+
/**
|
|
12
|
+
* Projects the current provider value into an SSR-safe hydration payload.
|
|
13
|
+
*
|
|
14
|
+
* Use this when the live client context includes instances or other values
|
|
15
|
+
* that should stay client-only. When `hydrate: Object` is active, the parsed
|
|
16
|
+
* payload merges back into `initialValue`, so omitted members keep their
|
|
17
|
+
* client-side defaults.
|
|
18
|
+
*/
|
|
19
|
+
serialize?: (value: T['__context__']) => unknown;
|
|
8
20
|
};
|
|
9
21
|
/**
|
|
10
22
|
* A decorator to provide a context to the target element.
|
|
11
|
-
* @param
|
|
23
|
+
* @param options {@link ProvideContextOptions}
|
|
12
24
|
* @returns
|
|
13
25
|
*/
|
|
14
|
-
export declare function provideContext<T extends UnknownContext>(
|
|
15
|
-
export {};
|
|
26
|
+
export declare function provideContext<T extends UnknownContext>(options: ProvideContextOptions<T>): (protoOrTarget: StandardOrLegacyFieldDecoratorArgs["protoOrTarget"], nameOrContext: StandardOrLegacyFieldDecoratorArgs["nameOrContext"]) => any;
|