@ecopages/radiant 0.3.0-alpha.0 → 0.3.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -1
- package/dist/{chunk-scfk041e.js → chunk-0bswvy25.js} +3 -3
- package/dist/{chunk-scfk041e.js.map → chunk-0bswvy25.js.map} +1 -1
- package/dist/chunk-0btkzzyc.js +4 -0
- package/dist/{chunk-r75y7ydb.js.map → chunk-0btkzzyc.js.map} +1 -1
- package/dist/chunk-0g0j9re6.js +4 -0
- package/dist/{chunk-0zq7e1ne.js.map → chunk-0g0j9re6.js.map} +1 -1
- package/dist/chunk-1x26p09c.js +4 -0
- package/dist/{chunk-d4v5qpxa.js.map → chunk-1x26p09c.js.map} +1 -1
- package/dist/{chunk-jg20mzg8.js → chunk-21a7jask.js} +3 -3
- package/dist/{chunk-jg20mzg8.js.map → chunk-21a7jask.js.map} +1 -1
- package/dist/chunk-25zjh0kg.js +4 -0
- package/dist/{chunk-60q4y3k5.js.map → chunk-25zjh0kg.js.map} +1 -1
- package/dist/chunk-30x4hggg.js +4 -0
- package/dist/{chunk-zb7wh7w4.js.map → chunk-30x4hggg.js.map} +1 -1
- package/dist/chunk-3ryr5wx2.js +4 -0
- package/dist/{chunk-9554n9t4.js.map → chunk-3ryr5wx2.js.map} +2 -2
- package/dist/chunk-3xxvmd5c.js +4 -0
- package/dist/chunk-3xxvmd5c.js.map +10 -0
- package/dist/chunk-3ynk7e1e.js +4 -0
- package/dist/{chunk-d7hh3ze6.js.map → chunk-3ynk7e1e.js.map} +1 -1
- package/dist/chunk-4e559cy5.js +4 -0
- package/dist/chunk-4e559cy5.js.map +10 -0
- package/dist/chunk-5b1en9vz.js +4 -0
- package/dist/chunk-5b1en9vz.js.map +10 -0
- package/dist/chunk-5bkat72n.js +4 -0
- package/dist/{chunk-5td6v9k3.js.map → chunk-5bkat72n.js.map} +2 -2
- package/dist/{chunk-4srpf0y5.js → chunk-5qeaq3tj.js} +3 -3
- package/dist/{chunk-4srpf0y5.js.map → chunk-5qeaq3tj.js.map} +1 -1
- package/dist/{chunk-73x7jpdd.js → chunk-66e6s792.js} +2 -2
- package/dist/{chunk-73x7jpdd.js.map → chunk-66e6s792.js.map} +1 -1
- package/dist/{chunk-paehjz94.js → chunk-79jg8q67.js} +2 -2
- package/dist/{chunk-paehjz94.js.map → chunk-79jg8q67.js.map} +1 -1
- package/dist/{chunk-8vak8w5w.js → chunk-8d5ddvvf.js} +3 -3
- package/dist/{chunk-8vak8w5w.js.map → chunk-8d5ddvvf.js.map} +1 -1
- package/dist/{chunk-tyysm4gk.js → chunk-8e9fgtbn.js} +3 -3
- package/dist/{chunk-tyysm4gk.js.map → chunk-8e9fgtbn.js.map} +1 -1
- package/dist/{chunk-8dexhy6c.js → chunk-9mqtp3js.js} +2 -2
- package/dist/{chunk-8dexhy6c.js.map → chunk-9mqtp3js.js.map} +1 -1
- package/dist/chunk-9rj2rwes.js +4 -0
- package/dist/{chunk-3b033cgq.js.map → chunk-9rj2rwes.js.map} +1 -1
- package/dist/{chunk-x0522ksh.js → chunk-atms6yrh.js} +3 -3
- package/dist/{chunk-x0522ksh.js.map → chunk-atms6yrh.js.map} +1 -1
- package/dist/{chunk-qdj6r8jn.js → chunk-bk2nbmcd.js} +2 -2
- package/dist/{chunk-qdj6r8jn.js.map → chunk-bk2nbmcd.js.map} +1 -1
- package/dist/{chunk-qd28hvdx.js → chunk-bk6qkvfp.js} +2 -2
- package/dist/{chunk-qd28hvdx.js.map → chunk-bk6qkvfp.js.map} +1 -1
- package/dist/chunk-c0qyz98c.js +4 -0
- package/dist/chunk-c0qyz98c.js.map +10 -0
- package/dist/chunk-c52qhh0j.js +4 -0
- package/dist/{chunk-60015zxq.js.map → chunk-c52qhh0j.js.map} +1 -1
- package/dist/{chunk-8tvt04cm.js → chunk-cnyxrh9r.js} +2 -2
- package/dist/{chunk-8tvt04cm.js.map → chunk-cnyxrh9r.js.map} +1 -1
- package/dist/chunk-dabagjk6.js +4 -0
- package/dist/chunk-dabagjk6.js.map +10 -0
- package/dist/chunk-e0r6ca2g.js +4 -0
- package/dist/chunk-e0r6ca2g.js.map +10 -0
- package/dist/chunk-eevw1j2q.js +4 -0
- package/dist/{chunk-0y78f8hj.js.map → chunk-eevw1j2q.js.map} +2 -2
- package/dist/{chunk-s4qgct1z.js → chunk-ek664x1c.js} +3 -3
- package/dist/{chunk-s4qgct1z.js.map → chunk-ek664x1c.js.map} +1 -1
- package/dist/{chunk-9gjmqxp2.js → chunk-eyw14d6y.js} +2 -2
- package/dist/{chunk-9gjmqxp2.js.map → chunk-eyw14d6y.js.map} +1 -1
- package/dist/{chunk-hkmm3dj9.js → chunk-fs4j94bk.js} +3 -3
- package/dist/{chunk-hkmm3dj9.js.map → chunk-fs4j94bk.js.map} +1 -1
- package/dist/{chunk-chyn72n9.js → chunk-g2z3mm6b.js} +3 -3
- package/dist/{chunk-chyn72n9.js.map → chunk-g2z3mm6b.js.map} +1 -1
- package/dist/chunk-g5n3m11h.js +4 -0
- package/dist/chunk-g5n3m11h.js.map +10 -0
- package/dist/{chunk-84fc8cz9.js → chunk-gdkte2vd.js} +3 -3
- package/dist/{chunk-84fc8cz9.js.map → chunk-gdkte2vd.js.map} +1 -1
- package/dist/chunk-gg74gdpv.js +4 -0
- package/dist/chunk-gg74gdpv.js.map +10 -0
- package/dist/{chunk-hn4j8rt5.js → chunk-h9k7crjc.js} +3 -3
- package/dist/{chunk-hn4j8rt5.js.map → chunk-h9k7crjc.js.map} +1 -1
- package/dist/{chunk-ksv01cey.js → chunk-hpzgnxgq.js} +3 -3
- package/dist/{chunk-ksv01cey.js.map → chunk-hpzgnxgq.js.map} +1 -1
- package/dist/chunk-hrjc8b1y.js +4 -0
- package/dist/chunk-hrjc8b1y.js.map +10 -0
- package/dist/chunk-hvy4zvcc.js +4 -0
- package/dist/{chunk-t7a1bbxq.js.map → chunk-hvy4zvcc.js.map} +1 -1
- package/dist/{chunk-ms6a9zdt.js → chunk-hztr86b4.js} +2 -2
- package/dist/{chunk-ms6a9zdt.js.map → chunk-hztr86b4.js.map} +1 -1
- package/dist/chunk-j3v7rca5.js +4 -0
- package/dist/{chunk-4fqkmpra.js.map → chunk-j3v7rca5.js.map} +1 -1
- package/dist/chunk-j864sv4w.js +4 -0
- package/dist/{chunk-w50v38rv.js.map → chunk-j864sv4w.js.map} +1 -1
- package/dist/chunk-kakpjgzf.js +4 -0
- package/dist/{chunk-d98q3myg.js.map → chunk-kakpjgzf.js.map} +2 -2
- package/dist/{chunk-1w1dm68j.js → chunk-kmebacvv.js} +2 -2
- package/dist/{chunk-1w1dm68j.js.map → chunk-kmebacvv.js.map} +1 -1
- package/dist/chunk-knqsm6v3.js +4 -0
- package/dist/{chunk-5bym7y1d.js.map → chunk-knqsm6v3.js.map} +2 -2
- package/dist/chunk-mp2vtrkg.js +4 -0
- package/dist/{chunk-zj9ez73m.js.map → chunk-mp2vtrkg.js.map} +1 -1
- package/dist/chunk-mpsj3cjs.js +4 -0
- package/dist/{chunk-qe6sjr27.js.map → chunk-mpsj3cjs.js.map} +1 -1
- package/dist/{chunk-dscj0sk9.js → chunk-n4p2542b.js} +3 -3
- package/dist/{chunk-dscj0sk9.js.map → chunk-n4p2542b.js.map} +1 -1
- package/dist/{chunk-agjb2a3r.js → chunk-nctznxyz.js} +3 -3
- package/dist/{chunk-agjb2a3r.js.map → chunk-nctznxyz.js.map} +1 -1
- package/dist/chunk-ndw3hc3v.js +4 -0
- package/dist/{chunk-2tgrfv09.js.map → chunk-ndw3hc3v.js.map} +2 -2
- package/dist/{chunk-57w3vmme.js → chunk-nnnb6pac.js} +3 -3
- package/dist/{chunk-57w3vmme.js.map → chunk-nnnb6pac.js.map} +1 -1
- package/dist/{chunk-8n2dhx28.js → chunk-nssj2x13.js} +2 -2
- package/dist/{chunk-8n2dhx28.js.map → chunk-nssj2x13.js.map} +1 -1
- package/dist/chunk-nvr37vma.js +4 -0
- package/dist/{chunk-mqxmfvyp.js.map → chunk-nvr37vma.js.map} +1 -1
- package/dist/chunk-p8k4g99a.js +4 -0
- package/dist/{chunk-vpfm9yw8.js.map → chunk-p8k4g99a.js.map} +2 -2
- package/dist/chunk-pkszgjqf.js +4 -0
- package/dist/{chunk-c8vqg7r1.js.map → chunk-pkszgjqf.js.map} +1 -1
- package/dist/{chunk-nerd6fmg.js → chunk-q9z6tnzw.js} +2 -2
- package/dist/{chunk-nerd6fmg.js.map → chunk-q9z6tnzw.js.map} +1 -1
- package/dist/chunk-qdz5sncz.js +4 -0
- package/dist/{chunk-a7hzs37s.js.map → chunk-qdz5sncz.js.map} +1 -1
- package/dist/chunk-qe0eww1n.js +4 -0
- package/dist/{chunk-ak97hp4w.js.map → chunk-qe0eww1n.js.map} +2 -2
- package/dist/{chunk-d0n7njdy.js → chunk-r33zvvda.js} +3 -3
- package/dist/{chunk-d0n7njdy.js.map → chunk-r33zvvda.js.map} +1 -1
- package/dist/{chunk-xd1xn3vy.js → chunk-rkh1vkb9.js} +2 -2
- package/dist/{chunk-xd1xn3vy.js.map → chunk-rkh1vkb9.js.map} +1 -1
- package/dist/chunk-rrg759ht.js +4 -0
- package/dist/{chunk-42tyhfvh.js.map → chunk-rrg759ht.js.map} +1 -1
- package/dist/{chunk-par0t822.js → chunk-s09s5ayx.js} +3 -3
- package/dist/{chunk-par0t822.js.map → chunk-s09s5ayx.js.map} +1 -1
- package/dist/chunk-s5p5z3z4.js +4 -0
- package/dist/chunk-s5p5z3z4.js.map +10 -0
- package/dist/chunk-sf4a2gy5.js +4 -0
- package/dist/chunk-sf4a2gy5.js.map +10 -0
- package/dist/{chunk-dx1wqc00.js → chunk-ssnnxzrj.js} +3 -3
- package/dist/{chunk-dx1wqc00.js.map → chunk-ssnnxzrj.js.map} +1 -1
- package/dist/{chunk-4cc2syf5.js → chunk-t8xtvgyg.js} +2 -2
- package/dist/{chunk-4cc2syf5.js.map → chunk-t8xtvgyg.js.map} +1 -1
- package/dist/chunk-v3ta7hnv.js +4 -0
- package/dist/{chunk-aajhkdmn.js.map → chunk-v3ta7hnv.js.map} +1 -1
- package/dist/{chunk-bmhn4nbp.js → chunk-v92hp9g0.js} +3 -3
- package/dist/{chunk-bmhn4nbp.js.map → chunk-v92hp9g0.js.map} +1 -1
- package/dist/{chunk-8xy18qmz.js → chunk-vgtggzb6.js} +2 -2
- package/dist/{chunk-8xy18qmz.js.map → chunk-vgtggzb6.js.map} +1 -1
- package/dist/{chunk-5a2xez36.js → chunk-vk48hgm4.js} +3 -3
- package/dist/{chunk-5a2xez36.js.map → chunk-vk48hgm4.js.map} +1 -1
- package/dist/{chunk-k5hr781q.js → chunk-w8s5fnsq.js} +3 -3
- package/dist/{chunk-k5hr781q.js.map → chunk-w8s5fnsq.js.map} +1 -1
- package/dist/{chunk-13ydx769.js → chunk-wd23rn4q.js} +2 -2
- package/dist/{chunk-13ydx769.js.map → chunk-wd23rn4q.js.map} +1 -1
- package/dist/chunk-wds4href.js +4 -0
- package/dist/{chunk-147yvtsn.js.map → chunk-wds4href.js.map} +2 -2
- package/dist/{chunk-qbnedp0y.js → chunk-wvd1ffe4.js} +2 -2
- package/dist/{chunk-qbnedp0y.js.map → chunk-wvd1ffe4.js.map} +1 -1
- package/dist/{chunk-g0gz7ypq.js → chunk-wwbjz9k4.js} +2 -2
- package/dist/{chunk-g0gz7ypq.js.map → chunk-wwbjz9k4.js.map} +1 -1
- package/dist/{chunk-qaagk55a.js → chunk-x2k0ngpz.js} +3 -3
- package/dist/{chunk-qaagk55a.js.map → chunk-x2k0ngpz.js.map} +1 -1
- package/dist/{chunk-t6x9e177.js → chunk-x457d0ap.js} +3 -3
- package/dist/{chunk-t6x9e177.js.map → chunk-x457d0ap.js.map} +1 -1
- package/dist/chunk-xbhtzkre.js +4 -0
- package/dist/{chunk-p6pxdvkk.js.map → chunk-xbhtzkre.js.map} +1 -1
- package/dist/{chunk-cbvd18v1.js → chunk-y139ycfm.js} +2 -2
- package/dist/{chunk-cbvd18v1.js.map → chunk-y139ycfm.js.map} +1 -1
- package/dist/chunk-z9kxfckm.js +4 -0
- package/dist/{chunk-mpjnqmbq.js.map → chunk-z9kxfckm.js.map} +1 -1
- package/dist/chunk-zx5txex8.js +4 -0
- package/dist/chunk-zx5txex8.js.map +10 -0
- package/dist/client/hydrator.d.ts +19 -0
- package/dist/client/hydrator.js +3 -0
- package/dist/{core/slot-projection.js.map → client/hydrator.js.map} +1 -1
- package/dist/client/install-hydrator.d.ts +1 -0
- package/dist/client/install-hydrator.js +3 -0
- package/dist/client/install-hydrator.js.map +10 -0
- package/dist/context/context-consumer-bootstrap.js +2 -2
- package/dist/context/context-consumer-bootstrap.js.map +1 -1
- package/dist/context/context-consumer-runtime.js +2 -2
- package/dist/context/context-consumer-runtime.js.map +1 -1
- package/dist/context/context-provider.js +2 -2
- package/dist/context/context-provider.js.map +1 -1
- package/dist/context/context-ssr-bridge.js +2 -2
- package/dist/context/context-ssr-bridge.js.map +1 -1
- package/dist/context/create-context.js +2 -2
- package/dist/context/create-context.js.map +1 -1
- package/dist/context/decorators/consume-context.js +2 -2
- package/dist/context/decorators/consume-context.js.map +1 -1
- package/dist/context/decorators/context-selection-delivery.js +2 -2
- package/dist/context/decorators/context-selection-delivery.js.map +1 -1
- package/dist/context/decorators/context-selector.d.ts +0 -5
- package/dist/context/decorators/context-selector.js +2 -2
- package/dist/context/decorators/context-selector.js.map +1 -1
- package/dist/context/decorators/legacy/consume-context.js +2 -2
- package/dist/context/decorators/legacy/consume-context.js.map +1 -1
- package/dist/context/decorators/legacy/context-selector-field.js +2 -2
- package/dist/context/decorators/legacy/context-selector-field.js.map +1 -1
- package/dist/context/decorators/legacy/context-selector.js +2 -2
- package/dist/context/decorators/legacy/context-selector.js.map +1 -1
- package/dist/context/decorators/legacy/provide-context.js +2 -2
- package/dist/context/decorators/legacy/provide-context.js.map +1 -1
- package/dist/context/decorators/on-context-update.js +2 -2
- package/dist/context/decorators/on-context-update.js.map +1 -1
- package/dist/context/decorators/provide-context.js +2 -2
- package/dist/context/decorators/provide-context.js.map +1 -1
- package/dist/context/decorators/standard/consume-context.js +2 -2
- package/dist/context/decorators/standard/consume-context.js.map +1 -1
- package/dist/context/decorators/standard/context-selector-field.js +2 -2
- package/dist/context/decorators/standard/context-selector-field.js.map +1 -1
- package/dist/context/decorators/standard/context-selector.js +2 -2
- package/dist/context/decorators/standard/context-selector.js.map +1 -1
- package/dist/context/decorators/standard/provide-context.js +2 -2
- package/dist/context/decorators/standard/provide-context.js.map +1 -1
- package/dist/context/events.js +2 -2
- package/dist/context/events.js.map +1 -1
- package/dist/context/hydration-script.d.ts +0 -4
- package/dist/context/hydration-script.js +2 -2
- package/dist/context/hydration-script.js.map +1 -1
- package/dist/core/custom-element-metadata.js +2 -2
- package/dist/core/custom-element-metadata.js.map +1 -1
- package/dist/core/hydration-codec.js +2 -2
- package/dist/core/hydration-codec.js.map +1 -1
- package/dist/core/radiant-component-ssr-registry.d.ts +54 -0
- package/dist/core/radiant-component-ssr-registry.js +3 -0
- package/dist/core/radiant-component-ssr-registry.js.map +9 -0
- package/dist/core/radiant-component-ssr.js +2 -2
- package/dist/core/radiant-component-ssr.js.map +1 -1
- package/dist/core/radiant-component.d.ts +9 -2
- package/dist/core/radiant-component.js +2 -2
- package/dist/core/radiant-component.js.map +1 -1
- package/dist/core/radiant-element.js +2 -2
- package/dist/core/radiant-element.js.map +1 -1
- package/dist/core/radiant-hydrator-state.d.ts +20 -0
- package/dist/core/radiant-hydrator-state.js +3 -0
- package/dist/core/radiant-hydrator-state.js.map +9 -0
- package/dist/core/reactive-jsx-value.js +2 -2
- package/dist/core/reactive-jsx-value.js.map +1 -1
- package/dist/core/reactive-prop-metadata.js +2 -2
- package/dist/core/reactive-prop-metadata.js.map +1 -1
- package/dist/core/{slot-projection.d.ts → slot-projection-runtime.d.ts} +0 -20
- package/dist/core/slot-projection-runtime.js +3 -0
- package/dist/core/slot-projection-runtime.js.map +9 -0
- package/dist/core/ssr-preparation.js +2 -2
- package/dist/core/ssr-preparation.js.map +1 -1
- package/dist/decorators/bound.js +2 -2
- package/dist/decorators/bound.js.map +1 -1
- package/dist/decorators/bridge.js +2 -2
- package/dist/decorators/bridge.js.map +1 -1
- package/dist/decorators/custom-element.js +2 -2
- package/dist/decorators/custom-element.js.map +1 -1
- package/dist/decorators/debounce.js +2 -2
- package/dist/decorators/debounce.js.map +1 -1
- package/dist/decorators/event.js +2 -2
- package/dist/decorators/event.js.map +1 -1
- package/dist/decorators/legacy/bound.js +2 -2
- package/dist/decorators/legacy/bound.js.map +1 -1
- package/dist/decorators/legacy/custom-element.js +2 -2
- package/dist/decorators/legacy/custom-element.js.map +1 -1
- package/dist/decorators/legacy/debounce.js +2 -2
- package/dist/decorators/legacy/debounce.js.map +1 -1
- package/dist/decorators/legacy/event.js +2 -2
- package/dist/decorators/legacy/event.js.map +1 -1
- package/dist/decorators/legacy/instance-initializers.js +2 -2
- package/dist/decorators/legacy/instance-initializers.js.map +1 -1
- package/dist/decorators/legacy/on-event.js +2 -2
- package/dist/decorators/legacy/on-event.js.map +1 -1
- package/dist/decorators/legacy/on-updated.js +2 -2
- package/dist/decorators/legacy/on-updated.js.map +1 -1
- package/dist/decorators/legacy/query-slot.js +2 -2
- package/dist/decorators/legacy/query-slot.js.map +1 -1
- package/dist/decorators/legacy/query.js +2 -2
- package/dist/decorators/legacy/query.js.map +1 -1
- package/dist/decorators/legacy/reactive-field.js +2 -2
- package/dist/decorators/legacy/reactive-field.js.map +1 -1
- package/dist/decorators/legacy/reactive-prop.js +2 -2
- package/dist/decorators/legacy/reactive-prop.js.map +1 -1
- package/dist/decorators/legacy/signal.js +2 -2
- package/dist/decorators/legacy/signal.js.map +1 -1
- package/dist/decorators/on-event.js +2 -2
- package/dist/decorators/on-event.js.map +1 -1
- package/dist/decorators/on-updated.js +2 -2
- package/dist/decorators/on-updated.js.map +1 -1
- package/dist/decorators/prop.js +2 -2
- package/dist/decorators/prop.js.map +1 -1
- package/dist/decorators/query-slot.js +2 -2
- package/dist/decorators/query-slot.js.map +1 -1
- package/dist/decorators/query.js +2 -2
- package/dist/decorators/query.js.map +1 -1
- package/dist/decorators/signal.js +2 -2
- package/dist/decorators/signal.js.map +1 -1
- package/dist/decorators/standard/bound.js +2 -2
- package/dist/decorators/standard/bound.js.map +1 -1
- package/dist/decorators/standard/custom-element.js +2 -2
- package/dist/decorators/standard/custom-element.js.map +1 -1
- package/dist/decorators/standard/debounce.js +2 -2
- package/dist/decorators/standard/debounce.js.map +1 -1
- package/dist/decorators/standard/event.js +2 -2
- package/dist/decorators/standard/event.js.map +1 -1
- package/dist/decorators/standard/on-event.js +2 -2
- package/dist/decorators/standard/on-event.js.map +1 -1
- package/dist/decorators/standard/on-updated.js +2 -2
- package/dist/decorators/standard/on-updated.js.map +1 -1
- package/dist/decorators/standard/query-slot.js +2 -2
- package/dist/decorators/standard/query-slot.js.map +1 -1
- package/dist/decorators/standard/query.js +2 -2
- package/dist/decorators/standard/query.js.map +1 -1
- package/dist/decorators/standard/reactive-field.js +2 -2
- package/dist/decorators/standard/reactive-field.js.map +1 -1
- package/dist/decorators/standard/reactive-prop.js +2 -2
- package/dist/decorators/standard/reactive-prop.js.map +1 -1
- package/dist/decorators/standard/signal.js +2 -2
- package/dist/decorators/standard/signal.js.map +1 -1
- package/dist/decorators/state.js +2 -2
- package/dist/decorators/state.js.map +1 -1
- package/dist/helpers/create-event-listener.js +2 -2
- package/dist/helpers/create-event-listener.js.map +1 -1
- package/dist/helpers/create-event.js +2 -2
- package/dist/helpers/create-event.js.map +1 -1
- package/dist/helpers/create-query-slot.js +2 -2
- package/dist/helpers/create-query-slot.js.map +1 -1
- package/dist/helpers/create-query.js +2 -2
- package/dist/helpers/create-query.js.map +1 -1
- package/dist/helpers/debounce.js +2 -2
- package/dist/helpers/debounce.js.map +1 -1
- package/dist/helpers/index.js +2 -2
- package/dist/helpers/index.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/server/context-ssr.js +2 -2
- package/dist/server/context-ssr.js.map +1 -1
- package/dist/server/html-parser.d.ts +21 -0
- package/dist/server/html-parser.js +3 -0
- package/dist/server/html-parser.js.map +9 -0
- package/dist/server/install-light-dom-shim.js +2 -2
- package/dist/server/install-light-dom-shim.js.map +2 -2
- package/dist/server/light-dom-shim.js +2 -2
- package/dist/server/light-dom-shim.js.map +1 -1
- package/dist/server/project-root.js +1 -1
- package/dist/server/radiant-component-ssr-runtime.d.ts +9 -0
- package/dist/server/radiant-component-ssr-runtime.js +3 -0
- package/dist/server/radiant-component-ssr-runtime.js.map +9 -0
- package/dist/server/render-component.d.ts +5 -5
- package/dist/server/render-component.js +2 -2
- package/dist/server/render-component.js.map +3 -3
- package/dist/server/slot-projection-html.d.ts +3 -0
- package/dist/server/slot-projection-html.js +3 -0
- package/dist/server/slot-projection-html.js.map +10 -0
- package/dist/signals/host-resource.js +1 -1
- package/dist/signals/host-signal.js +2 -2
- package/dist/signals/host-signal.js.map +1 -1
- package/dist/signals/hydration-script.d.ts +0 -4
- package/dist/signals/hydration-script.js +2 -2
- package/dist/signals/hydration-script.js.map +1 -1
- package/dist/tools/escape-script-json.js +2 -2
- package/dist/tools/escape-script-json.js.map +1 -1
- package/dist/tools/event-emitter.js +2 -2
- package/dist/tools/event-emitter.js.map +1 -1
- package/dist/tools/index.js +2 -2
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/render-jsx-template.js +1 -1
- package/dist/tools/stringify-typed.js +1 -1
- package/dist/types.d.ts +0 -21
- package/dist/types.js +1 -1
- package/dist/types.js.map +2 -2
- package/dist/utils/attribute-utils.js +2 -2
- package/dist/utils/attribute-utils.js.map +1 -1
- package/dist/utils/index.js +2 -2
- package/dist/utils/index.js.map +1 -1
- package/package.json +14 -1
- package/size-budget.json +2 -8
- package/dist/chunk-0y78f8hj.js +0 -4
- package/dist/chunk-0zq7e1ne.js +0 -4
- package/dist/chunk-147yvtsn.js +0 -4
- package/dist/chunk-17earqbr.js +0 -4
- package/dist/chunk-17earqbr.js.map +0 -10
- package/dist/chunk-2tgrfv09.js +0 -4
- package/dist/chunk-3b033cgq.js +0 -4
- package/dist/chunk-42tyhfvh.js +0 -4
- package/dist/chunk-4fqkmpra.js +0 -4
- package/dist/chunk-5bym7y1d.js +0 -4
- package/dist/chunk-5td6v9k3.js +0 -4
- package/dist/chunk-60015zxq.js +0 -4
- package/dist/chunk-60q4y3k5.js +0 -4
- package/dist/chunk-6kdxrppw.js +0 -4
- package/dist/chunk-6kdxrppw.js.map +0 -10
- package/dist/chunk-6z34stya.js +0 -4
- package/dist/chunk-6z34stya.js.map +0 -10
- package/dist/chunk-9554n9t4.js +0 -4
- package/dist/chunk-9ascmjk3.js +0 -4
- package/dist/chunk-9ascmjk3.js.map +0 -10
- package/dist/chunk-a7hzs37s.js +0 -4
- package/dist/chunk-aajhkdmn.js +0 -4
- package/dist/chunk-ak97hp4w.js +0 -4
- package/dist/chunk-c8vqg7r1.js +0 -4
- package/dist/chunk-d4v5qpxa.js +0 -4
- package/dist/chunk-d7hh3ze6.js +0 -4
- package/dist/chunk-d98q3myg.js +0 -4
- package/dist/chunk-jce9gqqw.js +0 -4
- package/dist/chunk-jce9gqqw.js.map +0 -10
- package/dist/chunk-mpjnqmbq.js +0 -4
- package/dist/chunk-mqxmfvyp.js +0 -4
- package/dist/chunk-nw171z6m.js +0 -4
- package/dist/chunk-nw171z6m.js.map +0 -10
- package/dist/chunk-p6pxdvkk.js +0 -4
- package/dist/chunk-qe6sjr27.js +0 -4
- package/dist/chunk-r1cvaz1t.js +0 -4
- package/dist/chunk-r1cvaz1t.js.map +0 -10
- package/dist/chunk-r75y7ydb.js +0 -4
- package/dist/chunk-t7a1bbxq.js +0 -4
- package/dist/chunk-vpfm9yw8.js +0 -4
- package/dist/chunk-w50v38rv.js +0 -4
- package/dist/chunk-zb7wh7w4.js +0 -4
- package/dist/chunk-zj9ez73m.js +0 -4
- package/dist/core/slot-projection.js +0 -3
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../src/server/light-dom-shim.ts"],
|
|
4
|
-
"sourcesContent": [
|
|
5
|
-
"type MinimalCustomElementRegistry = {\n\tdefine(name: string, constructor: CustomElementConstructor, options?: ElementDefinitionOptions): void;\n\tget(name: string): CustomElementConstructor | undefined;\n};\n\n/**\n * Minimal window-like runtime surface exposed by the SSR light-DOM shim.\n *\n * This is intentionally much smaller than a browser `window`; it only includes\n * the constructors and registry access that Radiant SSR currently needs.\n */\nexport type LightDomShimWindow = {\n\t/** Event constructor exposed to SSR-created components. */\n\tCustomEvent: typeof CustomEvent;\n\t/** Element constructor exposed to SSR-created components. */\n\tElement: typeof Element;\n\t/** Event constructor exposed to SSR-created components. */\n\tEvent: typeof Event;\n\t/** EventTarget constructor exposed to SSR-created components. */\n\tEventTarget: typeof EventTarget;\n\t/** HTMLScriptElement constructor used by slot projection payload parsing. */\n\tHTMLScriptElement: typeof HTMLScriptElement;\n\t/** HTMLElement constructor exposed to SSR-created components. */\n\tHTMLElement: typeof HTMLElement;\n\t/** Node constructor exposed to SSR-created components. */\n\tNode: typeof Node;\n\t/** Custom element registry used while rendering in SSR. */\n\tcustomElements: MinimalCustomElementRegistry;\n};\n\n/** Host preparation options accepted by the server render environment. */\nexport type PrepareServerRenderHostOptions = {\n\t/** Serialized light-DOM content to attach to the host before SSR. */\n\tauthoredContent?: string;\n};\n\n/** Reusable SSR environment used to prepare component hosts before rendering. */\nexport type ServerRenderEnvironment = {\n\t/** Prepares the host instance for rendering, including authored light-DOM content. */\n\tprepareHost(host: HTMLElement, options?: PrepareServerRenderHostOptions): void;\n};\n\ntype ParsedHtmlTag = {\n\tattributes: Record<string, string>;\n\tend: number;\n\tinnerHtml: string;\n\tselfClosing: boolean;\n\ttagName: string;\n\ttype: 'open';\n};\n\ntype ParsedHtmlToken =\n\t| ParsedHtmlTag\n\t| {\n\t\t\tend: number;\n\t\t\ttype: 'close';\n\t }\n\t| {\n\t\t\tend: number;\n\t\t\ttype: 'comment' | 'declaration';\n\t };\n\ntype MinimalParentNode = Node & ParentNode;\n\nclass MinimalNode extends EventTarget {\n\tstatic readonly ELEMENT_NODE = 1;\n\tstatic readonly TEXT_NODE = 3;\n\n\tpublic childNodes: Node[] = [];\n\tpublic parentNode: MinimalParentNode | null = null;\n\n\tconstructor(public readonly nodeType: number) {\n\t\tsuper();\n\t}\n\n\tappend(...nodes: Array<Node | string>): void {\n\t\tfor (const node of nodes) {\n\t\t\tthis.appendChild(typeof node === 'string' ? createTextNode(node) : node);\n\t\t}\n\t}\n\n\tappendChild<TNode extends Node>(node: TNode): TNode {\n\t\tif ('parentNode' in node && node.parentNode && 'removeChild' in node.parentNode) {\n\t\t\t(node.parentNode as Node & { removeChild(node: Node): Node }).removeChild(node);\n\t\t}\n\n\t\tthis.childNodes.push(node);\n\t\t(node as Node & { parentNode: MinimalParentNode | null }).parentNode = this as unknown as MinimalParentNode;\n\t\treturn node;\n\t}\n\n\tremoveChild<TNode extends Node>(node: TNode): TNode {\n\t\tconst nodeIndex = this.childNodes.indexOf(node);\n\n\t\tif (nodeIndex === -1) {\n\t\t\treturn node;\n\t\t}\n\n\t\tthis.childNodes.splice(nodeIndex, 1);\n\t\t(node as Node & { parentNode: MinimalParentNode | null }).parentNode = null;\n\t\treturn node;\n\t}\n\n\treplaceChildren(...nodes: Array<Node | string>): void {\n\t\tfor (const child of this.childNodes) {\n\t\t\t(child as Node & { parentNode: MinimalParentNode | null }).parentNode = null;\n\t\t}\n\n\t\tthis.childNodes = [];\n\t\tthis.append(...nodes);\n\t}\n\n\tget textContent(): string | null {\n\t\treturn this.childNodes.map((child) => child.textContent ?? '').join('');\n\t}\n\n\tset textContent(value: string | null) {\n\t\tthis.replaceChildren(value ?? '');\n\t}\n}\n\nclass MinimalTextNode extends MinimalNode {\n\tconstructor(private value: string) {\n\t\tsuper(MinimalNode.TEXT_NODE);\n\t}\n\n\toverride get textContent(): string {\n\t\treturn this.value;\n\t}\n\n\toverride set textContent(value: string | null) {\n\t\tthis.value = value ?? '';\n\t}\n}\n\nclass MinimalElement extends MinimalNode {\n\tprivate attributes = new Map<string, string>();\n\tprivate fragmentHtml?: string;\n\tprivate fragmentText?: string;\n\n\tpublic readonly localName: string;\n\tpublic readonly tagName: string;\n\n\tconstructor(tagName = 'div') {\n\t\tsuper(MinimalNode.ELEMENT_NODE);\n\t\tthis.localName = tagName.toLowerCase();\n\t\tthis.tagName = this.localName.toUpperCase();\n\t}\n\n\thasAttribute(name: string): boolean {\n\t\treturn this.attributes.has(name);\n\t}\n\n\tgetAttribute(name: string): string | null {\n\t\treturn this.attributes.get(name) ?? null;\n\t}\n\n\tgetAttributeNames(): string[] {\n\t\treturn Array.from(this.attributes.keys());\n\t}\n\n\tsetAttribute(name: string, value: unknown): void {\n\t\tthis.fragmentHtml = undefined;\n\t\tthis.attributes.set(name, String(value));\n\t}\n\n\tremoveAttribute(name: string): void {\n\t\tthis.fragmentHtml = undefined;\n\t\tthis.attributes.delete(name);\n\t}\n\n\tquerySelector(): Element | null {\n\t\treturn null;\n\t}\n\n\tquerySelectorAll(): Element[] {\n\t\treturn [];\n\t}\n\n\tmatches(): boolean {\n\t\treturn false;\n\t}\n\n\tget outerHTML(): string {\n\t\tif (this.fragmentHtml !== undefined) {\n\t\t\treturn this.fragmentHtml;\n\t\t}\n\n\t\tconst attributes = Array.from(this.attributes.entries())\n\t\t\t.map(([name, value]) => ` ${name}=\"${escapeHtmlAttribute(value)}\"`)\n\t\t\t.join('');\n\n\t\treturn `<${this.localName}${attributes}>${this.innerHTML}</${this.localName}>`;\n\t}\n\n\tget innerHTML(): string {\n\t\treturn this.childNodes.map((child) => serializeNodeHtml(child)).join('');\n\t}\n\n\tset innerHTML(html: string) {\n\t\tthis.fragmentHtml = undefined;\n\t\tthis.fragmentText = undefined;\n\t\tthis.replaceChildren(...parseHtmlToNodes(html));\n\t}\n\n\toverride get textContent(): string {\n\t\treturn this.fragmentText ?? super.textContent ?? '';\n\t}\n\n\toverride set textContent(value: string | null) {\n\t\tthis.fragmentHtml = undefined;\n\t\tthis.fragmentText = value ?? '';\n\t\tsuper.textContent = value;\n\t}\n\n\tsetSerializedFragment(fragmentHtml: string, fragmentText: string, attributes: Record<string, string>): void {\n\t\tthis.fragmentHtml = fragmentHtml;\n\t\tthis.fragmentText = fragmentText;\n\t\tthis.attributes = new Map(Object.entries(attributes));\n\t\tthis.replaceChildren();\n\t}\n}\n\nclass MinimalEvent {\n\tpublic readonly bubbles: boolean;\n\tpublic readonly cancelable: boolean;\n\tpublic readonly composed: boolean;\n\tpublic readonly type: string;\n\n\tconstructor(type: string, eventInitDict: EventInit = {}) {\n\t\tthis.type = type;\n\t\tthis.bubbles = eventInitDict.bubbles ?? false;\n\t\tthis.cancelable = eventInitDict.cancelable ?? false;\n\t\tthis.composed = eventInitDict.composed ?? false;\n\t}\n}\n\nclass MinimalCustomEvent<T = unknown> extends MinimalEvent {\n\tpublic readonly detail: T;\n\n\tconstructor(type: string, eventInitDict: CustomEventInit<T> = {}) {\n\t\tsuper(type, eventInitDict);\n\t\tthis.detail = eventInitDict.detail as T;\n\t}\n}\n\nclass MinimalHTMLElement extends MinimalElement {\n\tpublic isConnected = false;\n\n\tconstructor(tagName = 'div') {\n\t\tsuper(tagName);\n\t}\n\n\tinsertAdjacentHTML(_position: InsertPosition, html: string): void {\n\t\tthis.append(...parseHtmlToNodes(html));\n\t}\n\n\tconnectedCallback?(): void;\n\tattributeChangedCallback?(name: string, oldValue: string | null, newValue: string | null): void;\n\tdisconnectedCallback?(): void;\n}\n\nclass MinimalHtmlScriptElement extends MinimalHTMLElement {\n\tconstructor() {\n\t\tsuper('script');\n\t}\n}\n\nclass MinimalCustomElementsRegistry implements MinimalCustomElementRegistry {\n\tprivate definitions = new Map<string, CustomElementConstructor>();\n\n\tdefine(name: string, constructor: CustomElementConstructor): void {\n\t\tif (this.definitions.has(name)) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis.definitions.set(name, constructor);\n\t}\n\n\tget(name: string): CustomElementConstructor | undefined {\n\t\treturn this.definitions.get(name);\n\t}\n}\n\nlet installedWindow: LightDomShimWindow | undefined;\n\nfunction createTextNode(value: string): Node {\n\treturn new MinimalTextNode(value) as unknown as Node;\n}\n\nfunction getExistingWindowLike(): LightDomShimWindow | undefined {\n\tconst globalScope = globalThis as typeof globalThis & {\n\t\tCustomEvent?: typeof CustomEvent;\n\t\tElement?: typeof Element;\n\t\tEvent?: typeof Event;\n\t\tEventTarget?: typeof EventTarget;\n\t\tHTMLScriptElement?: typeof HTMLScriptElement;\n\t\tHTMLElement?: typeof HTMLElement;\n\t\tNode?: typeof Node;\n\t\tcustomElements?: MinimalCustomElementRegistry;\n\t\twindow?: LightDomShimWindow;\n\t};\n\tconst existingCustomElements = globalScope.customElements;\n\n\tif (\n\t\ttypeof globalScope.Node === 'undefined' ||\n\t\ttypeof globalScope.Element === 'undefined' ||\n\t\ttypeof globalScope.HTMLElement === 'undefined' ||\n\t\t!existingCustomElements ||\n\t\ttypeof existingCustomElements.define !== 'function' ||\n\t\ttypeof existingCustomElements.get !== 'function'\n\t) {\n\t\treturn undefined;\n\t}\n\n\treturn (\n\t\tglobalScope.window ?? {\n\t\t\tCustomEvent: (globalScope.CustomEvent ?? MinimalCustomEvent) as typeof CustomEvent,\n\t\t\tElement: globalScope.Element,\n\t\t\tEvent: (globalScope.Event ?? MinimalEvent) as typeof Event,\n\t\t\tEventTarget: (globalScope.EventTarget ?? EventTarget) as typeof EventTarget,\n\t\t\tHTMLScriptElement: (globalScope.HTMLScriptElement ?? globalScope.HTMLElement) as typeof HTMLScriptElement,\n\t\t\tHTMLElement: globalScope.HTMLElement,\n\t\t\tNode: globalScope.Node,\n\t\t\tcustomElements: existingCustomElements,\n\t\t}\n\t);\n}\n\n/** Ensures that a minimal window-like SSR runtime is available and returns it. */\nexport function ensureLightDomShim(): LightDomShimWindow {\n\tconst existingWindow = getExistingWindowLike();\n\n\tif (existingWindow) {\n\t\treturn existingWindow;\n\t}\n\n\treturn installLightDomShim();\n}\n\n/**\n * Creates a reusable SSR environment that can prepare a component host with\n * authored light-DOM content before rendering.\n *\n * Adapters can reuse a single environment across multiple render calls when\n * they want a single host-preparation entrypoint backed by the installed shim.\n */\n\nexport function createServerRenderEnvironment(): ServerRenderEnvironment {\n\tensureLightDomShim();\n\n\treturn {\n\t\tprepareHost(host: HTMLElement, options: PrepareServerRenderHostOptions = {}): void {\n\t\t\tif (options.authoredContent !== undefined) {\n\t\t\t\thost.innerHTML = options.authoredContent;\n\t\t\t}\n\t\t},\n\t};\n}\n\n/**\n * Installs the smallest global surface needed to instantiate Radiant custom elements during SSR.\n */\nexport function installLightDomShim(): LightDomShimWindow {\n\tconst existingWindow = getExistingWindowLike();\n\n\tif (existingWindow) {\n\t\treturn existingWindow;\n\t}\n\n\tif (installedWindow) {\n\t\treturn installedWindow;\n\t}\n\n\tconst customElements = new MinimalCustomElementsRegistry();\n\tconst EventConstructor = (globalThis.Event ?? MinimalEvent) as typeof Event;\n\tconst CustomEventConstructor = (globalThis.CustomEvent ?? MinimalCustomEvent) as typeof CustomEvent;\n\tconst EventTargetConstructor = (globalThis.EventTarget ?? EventTarget) as typeof EventTarget;\n\tinstalledWindow = {\n\t\tCustomEvent: CustomEventConstructor,\n\t\tElement: MinimalElement as unknown as typeof Element,\n\t\tEvent: EventConstructor,\n\t\tEventTarget: EventTargetConstructor,\n\t\tHTMLScriptElement: MinimalHtmlScriptElement as unknown as typeof HTMLScriptElement,\n\t\tHTMLElement: MinimalHTMLElement as unknown as typeof HTMLElement,\n\t\tNode: MinimalNode as unknown as typeof Node,\n\t\tcustomElements,\n\t};\n\n\tObject.assign(globalThis, {\n\t\tCustomEvent: CustomEventConstructor,\n\t\tElement: MinimalElement,\n\t\tEvent: EventConstructor,\n\t\tEventTarget: EventTargetConstructor,\n\t\tHTMLScriptElement: MinimalHtmlScriptElement,\n\t\tHTMLElement: MinimalHTMLElement,\n\t\tNode: MinimalNode,\n\t\tcustomElements,\n\t\twindow: installedWindow,\n\t});\n\n\treturn installedWindow;\n}\n\nfunction collectTopLevelHtmlFragments(html: string): string[] {\n\tconst fragments: string[] = [];\n\tlet index = 0;\n\n\twhile (index < html.length) {\n\t\tconst fragmentStart = index;\n\n\t\tif (html.startsWith('<!--', index)) {\n\t\t\tconst commentEnd = html.indexOf('-->', index + 4);\n\t\t\tindex = commentEnd === -1 ? html.length : commentEnd + 3;\n\t\t\tfragments.push(html.slice(fragmentStart, index));\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (html[index] !== '<') {\n\t\t\tconst nextTagIndex = html.indexOf('<', index);\n\t\t\tindex = nextTagIndex === -1 ? html.length : nextTagIndex;\n\t\t\tfragments.push(html.slice(fragmentStart, index));\n\t\t\tcontinue;\n\t\t}\n\n\t\tconst token = parseHtmlTagToken(html, index);\n\n\t\tif (!token) {\n\t\t\tfragments.push(html.slice(fragmentStart));\n\t\t\tbreak;\n\t\t}\n\n\t\tif (token.type !== 'open' || token.selfClosing || voidElementNames.has(token.tagName)) {\n\t\t\tindex = token.end;\n\t\t\tfragments.push(html.slice(fragmentStart, index));\n\t\t\tcontinue;\n\t\t}\n\n\t\tindex = token.end;\n\t\tlet depth = 1;\n\n\t\twhile (index < html.length && depth > 0) {\n\t\t\tconst nextTagIndex = html.indexOf('<', index);\n\n\t\t\tif (nextTagIndex === -1) {\n\t\t\t\tindex = html.length;\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tconst nestedToken = parseHtmlTagToken(html, nextTagIndex);\n\n\t\t\tif (!nestedToken) {\n\t\t\t\tindex = html.length;\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tindex = nestedToken.end;\n\n\t\t\tif (nestedToken.type === 'comment' || nestedToken.type === 'declaration') {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (nestedToken.type === 'open' && !nestedToken.selfClosing && !voidElementNames.has(nestedToken.tagName)) {\n\t\t\t\tdepth += 1;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (nestedToken.type === 'close') {\n\t\t\t\tdepth -= 1;\n\t\t\t}\n\t\t}\n\n\t\tfragments.push(html.slice(fragmentStart, index));\n\t}\n\n\treturn fragments.filter((fragment) => fragment !== '');\n}\n\nfunction createElementFromFragment(fragment: string, tag: ParsedHtmlTag): Node {\n\tconst element =\n\t\ttag.tagName === 'script'\n\t\t\t? (new MinimalHtmlScriptElement() as MinimalElement)\n\t\t\t: new MinimalHTMLElement(tag.tagName);\n\n\telement.setSerializedFragment(fragment, extractTextContent(tag.innerHtml), tag.attributes);\n\treturn element as unknown as Node;\n}\n\nfunction escapeHtmlAttribute(value: string): string {\n\treturn value.replace(/&/g, '&').replace(/\"/g, '"').replace(/</g, '<').replace(/>/g, '>');\n}\n\nfunction extractTextContent(html: string): string {\n\treturn html.replace(/<!--.*?-->/gs, '').replace(/<[^>]+>/g, '');\n}\n\nfunction findHtmlTagEnd(html: string, startIndex: number): number {\n\tlet quote: '\"' | \"'\" | undefined;\n\n\tfor (let index = startIndex + 1; index < html.length; index += 1) {\n\t\tconst character = html[index];\n\n\t\tif (quote) {\n\t\t\tif (character === quote) {\n\t\t\t\tquote = undefined;\n\t\t\t}\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (character === '\"' || character === \"'\") {\n\t\t\tquote = character;\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (character === '>') {\n\t\t\treturn index + 1;\n\t\t}\n\t}\n\n\treturn html.length;\n}\n\nfunction parseAttributes(rawAttributes: string): Record<string, string> {\n\tconst attributes: Record<string, string> = {};\n\tconst attributePattern = /([:^@A-Za-z0-9_.-]+)(?:\\s*=\\s*(?:\"([^\"]*)\"|'([^']*)'|([^\\s\"'>/]+)))?/g;\n\n\tfor (const match of rawAttributes.matchAll(attributePattern)) {\n\t\tconst [, name, doubleQuoted, singleQuoted, bareValue] = match;\n\n\t\tif (!name) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tattributes[name] = doubleQuoted ?? singleQuoted ?? bareValue ?? '';\n\t}\n\n\treturn attributes;\n}\n\nfunction parseHtmlTagToken(html: string, startIndex: number): ParsedHtmlToken | undefined {\n\tif (html.startsWith('<!--', startIndex)) {\n\t\tconst endIndex = html.indexOf('-->', startIndex + 4);\n\t\treturn {\n\t\t\tend: endIndex === -1 ? html.length : endIndex + 3,\n\t\t\ttype: 'comment',\n\t\t};\n\t}\n\n\tconst endIndex = findHtmlTagEnd(html, startIndex);\n\tconst rawToken = html.slice(startIndex + 1, endIndex - 1).trim();\n\n\tif (rawToken === '') {\n\t\treturn undefined;\n\t}\n\n\tif (rawToken.startsWith('!') || rawToken.startsWith('?')) {\n\t\treturn {\n\t\t\tend: endIndex,\n\t\t\ttype: 'declaration',\n\t\t};\n\t}\n\n\tif (rawToken.startsWith('/')) {\n\t\treturn {\n\t\t\tend: endIndex,\n\t\t\ttype: 'close',\n\t\t};\n\t}\n\n\tconst selfClosing = /\\/\\s*$/.test(rawToken);\n\tconst tagBody = selfClosing ? rawToken.replace(/\\/\\s*$/, '').trim() : rawToken;\n\tconst tagName = tagBody.split(/[\\s/>]/, 1)[0]?.toLowerCase() ?? '';\n\tconst attributesStart = tagName.length;\n\tconst rawAttributes = tagBody.slice(attributesStart).trim();\n\tconst innerHtml =\n\t\tselfClosing || voidElementNames.has(tagName)\n\t\t\t? ''\n\t\t\t: extractInnerHtmlFragment(html, startIndex, endIndex, tagName);\n\n\treturn {\n\t\tattributes: parseAttributes(rawAttributes),\n\t\tend: endIndex,\n\t\tinnerHtml,\n\t\tselfClosing,\n\t\ttagName,\n\t\ttype: 'open',\n\t};\n}\n\nfunction extractInnerHtmlFragment(html: string, startIndex: number, tagEndIndex: number, tagName: string): string {\n\tlet index = tagEndIndex;\n\tlet depth = 1;\n\n\twhile (index < html.length && depth > 0) {\n\t\tconst nextTagIndex = html.indexOf('<', index);\n\n\t\tif (nextTagIndex === -1) {\n\t\t\treturn html.slice(tagEndIndex);\n\t\t}\n\n\t\tconst nextTag = parseHtmlTagToken(html, nextTagIndex);\n\n\t\tif (!nextTag) {\n\t\t\treturn html.slice(tagEndIndex);\n\t\t}\n\n\t\tif (\n\t\t\tnextTag.type === 'open' &&\n\t\t\tnextTag.tagName === tagName &&\n\t\t\t!nextTag.selfClosing &&\n\t\t\t!voidElementNames.has(tagName)\n\t\t) {\n\t\t\tdepth += 1;\n\t\t}\n\n\t\tif (nextTag.type === 'close') {\n\t\t\tconst closingName = html\n\t\t\t\t.slice(nextTagIndex + 2, nextTag.end - 1)\n\t\t\t\t.trim()\n\t\t\t\t.toLowerCase();\n\n\t\t\tif (closingName === tagName) {\n\t\t\t\tdepth -= 1;\n\n\t\t\t\tif (depth === 0) {\n\t\t\t\t\treturn html.slice(tagEndIndex, nextTagIndex);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tindex = nextTag.end;\n\t}\n\n\treturn html.slice(tagEndIndex);\n}\n\nfunction parseHtmlToNodes(html: string): Node[] {\n\treturn collectTopLevelHtmlFragments(html).map((fragment) => {\n\t\tif (!fragment.startsWith('<')) {\n\t\t\treturn createTextNode(fragment);\n\t\t}\n\n\t\tconst tag = parseHtmlTagToken(fragment, 0);\n\n\t\tif (!tag || tag.type !== 'open') {\n\t\t\treturn createTextNode(fragment);\n\t\t}\n\n\t\treturn createElementFromFragment(fragment, tag);\n\t});\n}\n\nfunction serializeNodeHtml(node: Node): string {\n\tif (node.nodeType === MinimalNode.TEXT_NODE) {\n\t\treturn node.textContent ?? '';\n\t}\n\n\treturn 'outerHTML' in node && typeof node.outerHTML === 'string' ? node.outerHTML : (node.textContent ?? '');\n}\n\nconst voidElementNames = new Set([\n\t'area',\n\t'base',\n\t'br',\n\t'col',\n\t'embed',\n\t'hr',\n\t'img',\n\t'input',\n\t'link',\n\t'meta',\n\t'param',\n\t'source',\n\t'track',\n\t'wbr',\n]);\n"
|
|
6
|
-
],
|
|
7
|
-
"mappings": "AAgEA,MAAM,UAAoB,WAAY,CAOT,eANZ,cAAe,QACf,WAAY,E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,MAAO,cAAe,GAAQ,OAAO,EAAK,YAAc,SAAW,EAAK,UAAa,EAAK,aAAe,GAG1G,IAAM,EAAmB,IAAI,IAAI,CAChC,OACA,OACA,KACA,MACA,QACA,KACA,MACA,QACA,OACA,OACA,QACA,SACA,QACA,KACD,CAAC",
|
|
8
|
-
"debugId": "1FF05320553C515864756E2164756E21",
|
|
9
|
-
"names": []
|
|
10
|
-
}
|
package/dist/chunk-mpjnqmbq.js
DELETED
package/dist/chunk-mqxmfvyp.js
DELETED
package/dist/chunk-nw171z6m.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
var Q=Symbol("radiant.shadowRootListenerHooks"),Y=Symbol("radiant.patchedAttachShadow");function _(x,j){return x.target instanceof Element&&x.target.matches(j)}function Z(x,j,z,B){let I=(G)=>{if(_(G,z))B(G)};return x.addEventListener(j.type,I,j.options),()=>{x.removeEventListener(j.type,I,j.options)}}function $(x,j){let z=x;if(!z[Q])z[Q]=new Set;if(z[Q].add(j),z[Y])return;let B=x.attachShadow;x.attachShadow=function(G){let N=B.call(this,G);for(let P of z[Q]??[])P();return N},z[Y]=!0}function q(x,j,z){let B=z.bind(x),I=null,G=null,N=null,P=null,V=!1,W=()=>{I?.(),G?.(),N?.(),P?.(),I=null,G=null,N=null,P=null},U=()=>{if(V)return;if("window"in j&&!I)window.addEventListener(j.type,B,j.options),I=()=>{window.removeEventListener(j.type,B,j.options)};if("document"in j&&!G)document.addEventListener(j.type,B,j.options),G=()=>{document.removeEventListener(j.type,B,j.options)};if("selector"in j||"ref"in j){let X="selector"in j?j.selector:`[data-ref="${j.ref}"]`;if(j.scope!=="shadow"&&!N)N=Z(x,j,X,B);if(j.scope!=="light"&&x.shadowRoot&&!P)P=Z(x.shadowRoot,j,X,B)}};if("selector"in j||"ref"in j){if(j.scope!=="light")$(x,()=>{if(x.isConnected)U()})}if(x.registerConnectedCallback(U),x.registerCleanupCallback(W),x.isConnected)U();return()=>{V=!0,W()}}
|
|
2
|
-
export{q as tb};
|
|
3
|
-
|
|
4
|
-
//# debugId=E53E644B2D3C7D3D64756E2164756E21
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../src/helpers/create-event-listener.ts"],
|
|
4
|
-
"sourcesContent": [
|
|
5
|
-
"import type { RadiantElement } from '../core/radiant-element';\nimport type { RadiantElementEventListener } from '../core/radiant-element';\n\n/**\n * Selects which DOM tree delegated event listeners should observe.\n */\nexport type OnEventScope = 'light' | 'shadow' | 'both';\n\ntype BaseOnEventConfig = Pick<RadiantElementEventListener, 'type' | 'options'> & {\n\tscope?: OnEventScope;\n};\n\nexport type OnEventConfig = BaseOnEventConfig &\n\t(\n\t\t| {\n\t\t\t\tselector: string;\n\t\t }\n\t\t| {\n\t\t\t\tref: string;\n\t\t }\n\t\t| {\n\t\t\t\twindow: true;\n\t\t }\n\t\t| {\n\t\t\t\tdocument: true;\n\t\t }\n\t);\n\ntype DelegatedEventRoot = HTMLElement | ShadowRoot;\n\nconst shadowRootListenerHooksKey = Symbol('radiant.shadowRootListenerHooks');\nconst patchedAttachShadowKey = Symbol('radiant.patchedAttachShadow');\n\ntype ShadowRootHookHost = RadiantElement & {\n\t[patchedAttachShadowKey]?: true;\n\t[shadowRootListenerHooksKey]?: Set<() => void>;\n};\n\nfunction matchesDelegatedTarget(event: Event, selector: string): boolean {\n\treturn event.target instanceof Element && event.target.matches(selector);\n}\n\nfunction addDelegatedListener(\n\troot: DelegatedEventRoot,\n\tconfig: Pick<OnEventConfig, 'type' | 'options'>,\n\tselector: string,\n\tlistener: EventListener,\n): () => void {\n\tconst delegatedListener = (event: Event) => {\n\t\tif (matchesDelegatedTarget(event, selector)) {\n\t\t\tlistener(event);\n\t\t}\n\t};\n\n\troot.addEventListener(config.type, delegatedListener, config.options);\n\n\treturn () => {\n\t\troot.removeEventListener(config.type, delegatedListener, config.options);\n\t};\n}\n\nfunction registerShadowRootHook(host: RadiantElement, hook: () => void): void {\n\tconst shadowAwareHost = host as ShadowRootHookHost;\n\n\tif (!shadowAwareHost[shadowRootListenerHooksKey]) {\n\t\tshadowAwareHost[shadowRootListenerHooksKey] = new Set();\n\t}\n\n\tshadowAwareHost[shadowRootListenerHooksKey].add(hook);\n\n\tif (shadowAwareHost[patchedAttachShadowKey]) {\n\t\treturn;\n\t}\n\n\tconst originalAttachShadow = host.attachShadow;\n\n\thost.attachShadow = function patchedAttachShadow(init: ShadowRootInit): ShadowRoot {\n\t\tconst shadowRoot = originalAttachShadow.call(this, init);\n\t\tfor (const shadowRootHook of shadowAwareHost[shadowRootListenerHooksKey] ?? []) {\n\t\t\tshadowRootHook();\n\t\t}\n\t\treturn shadowRoot;\n\t};\n\n\tshadowAwareHost[patchedAttachShadowKey] = true;\n}\n\n/**\n * Subscribes to a DOM event with delegation, window, or document targeting.\n * Functional equivalent of the `@onEvent` decorator for vanilla JS usage.\n * Returns a cleanup function to remove the listener.\n * @param host The host RadiantElement.\n * @param config The event listener configuration.\n * @param callback The event handler function.\n */\nexport function createEventListener(\n\thost: RadiantElement,\n\tconfig: OnEventConfig,\n\tcallback: (event: Event) => void,\n): () => void {\n\tconst boundCallback = callback.bind(host);\n\tlet windowCleanup: (() => void) | null = null;\n\tlet documentCleanup: (() => void) | null = null;\n\tlet lightCleanup: (() => void) | null = null;\n\tlet shadowCleanup: (() => void) | null = null;\n\tlet disposed = false;\n\n\tconst detachListeners = () => {\n\t\twindowCleanup?.();\n\t\tdocumentCleanup?.();\n\t\tlightCleanup?.();\n\t\tshadowCleanup?.();\n\n\t\twindowCleanup = null;\n\t\tdocumentCleanup = null;\n\t\tlightCleanup = null;\n\t\tshadowCleanup = null;\n\t};\n\n\tconst attachListeners = () => {\n\t\tif (disposed) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ('window' in config && !windowCleanup) {\n\t\t\twindow.addEventListener(config.type, boundCallback, config.options);\n\t\t\twindowCleanup = () => {\n\t\t\t\twindow.removeEventListener(config.type, boundCallback, config.options);\n\t\t\t};\n\t\t}\n\n\t\tif ('document' in config && !documentCleanup) {\n\t\t\tdocument.addEventListener(config.type, boundCallback, config.options);\n\t\t\tdocumentCleanup = () => {\n\t\t\t\tdocument.removeEventListener(config.type, boundCallback, config.options);\n\t\t\t};\n\t\t}\n\n\t\tif ('selector' in config || 'ref' in config) {\n\t\t\tconst selector = 'selector' in config ? config.selector : `[data-ref=\"${config.ref}\"]`;\n\n\t\t\tif (config.scope !== 'shadow' && !lightCleanup) {\n\t\t\t\tlightCleanup = addDelegatedListener(host, config, selector, boundCallback);\n\t\t\t}\n\n\t\t\tif (config.scope !== 'light' && host.shadowRoot && !shadowCleanup) {\n\t\t\t\tshadowCleanup = addDelegatedListener(host.shadowRoot, config, selector, boundCallback);\n\t\t\t}\n\t\t}\n\t};\n\n\tif ('selector' in config || 'ref' in config) {\n\t\tif (config.scope !== 'light') {\n\t\t\tregisterShadowRootHook(host, () => {\n\t\t\t\tif (host.isConnected) {\n\t\t\t\t\tattachListeners();\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\n\thost.registerConnectedCallback(attachListeners);\n\thost.registerCleanupCallback(detachListeners);\n\n\tif (host.isConnected) {\n\t\tattachListeners();\n\t}\n\n\treturn () => {\n\t\tdisposed = true;\n\t\tdetachListeners();\n\t};\n}\n"
|
|
6
|
-
],
|
|
7
|
-
"mappings": "AA8BA,IAAM,EAA6B,OAAO,iCAAiC,EACrE,EAAyB,OAAO,6BAA6B,EAOnE,SAAS,CAAsB,CAAC,EAAc,EAA2B,CACxE,OAAO,EAAM,kBAAkB,SAAW,EAAM,OAAO,QAAQ,CAAQ,EAGxE,SAAS,CAAoB,CAC5B,EACA,EACA,EACA,EACa,CACb,IAAM,EAAoB,CAAC,IAAiB,CAC3C,GAAI,EAAuB,EAAO,CAAQ,EACzC,EAAS,CAAK,GAMhB,OAFA,EAAK,iBAAiB,EAAO,KAAM,EAAmB,EAAO,OAAO,EAE7D,IAAM,CACZ,EAAK,oBAAoB,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D,EAAgB,EAAqB,EAAK,WAAY,EAAQ,EAAU,CAAa,IAKxF,GAAI,aAAc,GAAU,QAAS,GACpC,GAAI,EAAO,QAAU,QACpB,EAAuB,EAAM,IAAM,CAClC,GAAI,EAAK,YACR,EAAgB,EAEjB,EAOH,GAHA,EAAK,0BAA0B,CAAe,EAC9C,EAAK,wBAAwB,CAAe,EAExC,EAAK,YACR,EAAgB,EAGjB,MAAO,IAAM,CACZ,EAAW,GACX,EAAgB",
|
|
8
|
-
"debugId": "E53E644B2D3C7D3D64756E2164756E21",
|
|
9
|
-
"names": []
|
|
10
|
-
}
|
package/dist/chunk-p6pxdvkk.js
DELETED
package/dist/chunk-qe6sjr27.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{La as f}from"./chunk-8tvt04cm.js";import{sb as j}from"./chunk-g0gz7ypq.js";function E({cache:k=!0,...q}){return(v,w)=>{f(v,(b)=>{b.registerConnectedCallback(()=>{let x=j(b,{cache:k,...q});Object.defineProperty(b,w,{get(){return x.value},enumerable:!0,configurable:!0})})})}}
|
|
2
|
-
export{E as ia};
|
|
3
|
-
|
|
4
|
-
//# debugId=A08F45D03760947E64756E2164756E21
|
package/dist/chunk-r1cvaz1t.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{g as w}from"./chunk-par0t822.js";import{m as z}from"./chunk-chyn72n9.js";import{r as u}from"./chunk-d98q3myg.js";import{s as v}from"./chunk-qaagk55a.js";function G(j){return function(k,b,q){if(typeof b==="object"){if(b.kind==="field")return z(j)(k,b);return v(j)(k,b)}if(q)return u(j)(k,b,q);return w(j)(k,b)}}
|
|
2
|
-
export{G as f};
|
|
3
|
-
|
|
4
|
-
//# debugId=EE6AAD96F40D867664756E2164756E21
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../src/context/decorators/context-selector.ts"],
|
|
4
|
-
"sourcesContent": [
|
|
5
|
-
"import type {\n\tLegacyFieldDecoratorArgs,\n\tLegacyMethodDecoratorArgs,\n\tMethod,\n\tStandardFieldDecoratorArgs,\n\tStandardMethodDecoratorArgs,\n} from '../../types';\nimport type { RadiantElement } from '../../core/radiant-element';\nimport type { Context, ContextType, UnknownContext } from '../types';\nimport type { OnContextUpdateOptions } from './on-context-update';\nimport { contextSelector as legacyContextSelectorMethod } from './legacy/context-selector';\nimport { contextSelector as standardContextSelectorMethod } from './standard/context-selector';\nimport { contextSelectorField as legacyContextSelectorField } from './legacy/context-selector-field';\nimport { contextSelectorField as standardContextSelectorField } from './standard/context-selector-field';\n\nexport type ContextSelectorOptions<T extends UnknownContext, Selected = ContextType<T>> = {\n\t/** Context token to resolve from ancestor providers. */\n\tcontext: T;\n\t/** Optional projection that narrows the resolved context before delivery. */\n\tselect?: (context: ContextType<T>) => Selected;\n\t/** Whether client-side event-channel subscriptions should stay active after the first value. */\n\tsubscribe?: boolean;\n};\n\n/**\n * @deprecated Use `ContextSelectorOptions` for field usage or `OnContextUpdateOptions` for method usage.\n */\nexport type SubscribeToContextOptions<T extends UnknownContext> = OnContextUpdateOptions<T>;\n\ntype ContextUpdateMethod<Selected> = (value: Selected) => unknown;\n\ntype ContextSelectorDecorator<Selected> = {\n\t<Host extends RadiantElement>(\n\t\tprotoOrTarget: undefined,\n\t\tnameOrContext: ClassFieldDecoratorContext<Host, Selected>,\n\t): (this: Host, initialValue: Selected) => Selected;\n\t<Host extends RadiantElement, TMethod extends ContextUpdateMethod<Selected>>(\n\t\tprotoOrTarget: TMethod,\n\t\tnameOrContext: ClassMethodDecoratorContext<Host, TMethod>,\n\t): void;\n\t(protoOrTarget: RadiantElement, nameOrContext: string): void;\n\t(\n\t\tprotoOrTarget: RadiantElement,\n\t\tnameOrContext: string,\n\t\tdescriptor: TypedPropertyDescriptor<ContextUpdateMethod<Selected>>,\n\t): TypedPropertyDescriptor<ContextUpdateMethod<Selected>> | void;\n};\n\n/**\n * Subscribes a field or method to the current value, or a selected slice, of a context.\n *\n * **Field form (preferred):** The field holds the latest context value and is\n * updated whenever the provider changes. On `RadiantComponent` hosts, each\n * update schedules `requestUpdate()` automatically so `render()` stays in sync.\n *\n * **Method form (deprecated — use `@onContextUpdate`):** The method is called\n * with the new value on each change.\n *\n * @param options Context subscription configuration.\n */\nexport function contextSelector<T extends Context<unknown, unknown>, Selected = ContextType<T>>(\n\toptions: ContextSelectorOptions<T, Selected>,\n): ContextSelectorDecorator<Selected> {\n\treturn function (\n\t\tprotoOrTarget: RadiantElement | Method | undefined,\n\t\tnameOrContext:\n\t\t\t| string\n\t\t\t| ClassFieldDecoratorContext<RadiantElement, Selected>\n\t\t\t| ClassMethodDecoratorContext<RadiantElement, ContextUpdateMethod<Selected>>,\n\t\tdescriptor?: TypedPropertyDescriptor<ContextUpdateMethod<Selected>>,\n\t):\n\t\t| ((this: RadiantElement, initialValue: Selected) => Selected)\n\t\t| TypedPropertyDescriptor<ContextUpdateMethod<Selected>>\n\t\t| void {\n\t\tif (typeof nameOrContext === 'object') {\n\t\t\tif (nameOrContext.kind === 'field') {\n\t\t\t\treturn standardContextSelectorField(options)(\n\t\t\t\t\tprotoOrTarget as StandardFieldDecoratorArgs<RadiantElement, Selected>['protoOrTarget'],\n\t\t\t\t\tnameOrContext as StandardFieldDecoratorArgs<RadiantElement, Selected>['nameOrContext'],\n\t\t\t\t);\n\t\t\t}\n\n\t\t\treturn standardContextSelectorMethod(options as OnContextUpdateOptions<T, Selected>)(\n\t\t\t\tprotoOrTarget as StandardMethodDecoratorArgs['protoOrTarget'],\n\t\t\t\tnameOrContext as StandardMethodDecoratorArgs['nameOrContext'],\n\t\t\t);\n\t\t}\n\n\t\tif (descriptor) {\n\t\t\treturn legacyContextSelectorMethod(options as OnContextUpdateOptions<T, Selected>)(\n\t\t\t\tprotoOrTarget as LegacyMethodDecoratorArgs['protoOrTarget'],\n\t\t\t\tnameOrContext as LegacyMethodDecoratorArgs['nameOrContext'],\n\t\t\t\tdescriptor as LegacyMethodDecoratorArgs['descriptor'],\n\t\t\t);\n\t\t}\n\n\t\treturn legacyContextSelectorField(options)(\n\t\t\tprotoOrTarget as LegacyFieldDecoratorArgs['protoOrTarget'],\n\t\t\tnameOrContext as LegacyFieldDecoratorArgs['nameOrContext'],\n\t\t);\n\t} as ContextSelectorDecorator<Selected>;\n}\n"
|
|
6
|
-
],
|
|
7
|
-
"mappings": "kLA4DO,GAAS,LAA+E,LAC9F,EACqC,CACrC,OAAO,QAAS,CACf,EACA,EAIA,EAIO,CACP,GAAI,OAAO,IAAkB,SAAU,CACtC,GAAI,EAAc,OAAS,QAC1B,OAAO,EAA6B,CAAO,EAC1C,EACA,CACD,EAGD,OAAO,EAA8B,CAA8C,EAClF,EACA,CACD,EAGD,GAAI,EACH,OAAO,EAA4B,CAA8C,EAChF,EACA,EACA,CACD,EAGD,OAAO,EAA2B,CAAO,EACxC,EACA,CACD",
|
|
8
|
-
"debugId": "EE6AAD96F40D867664756E2164756E21",
|
|
9
|
-
"names": []
|
|
10
|
-
}
|
package/dist/chunk-r75y7ydb.js
DELETED
package/dist/chunk-t7a1bbxq.js
DELETED
package/dist/chunk-vpfm9yw8.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{A as E,B as H,y as D,z as G}from"./chunk-s4qgct1z.js";import{$ as F}from"./chunk-9gjmqxp2.js";function L(j,f,w,y={}){return I(j,()=>D(j,f,w,y))}function M(j,f,w,y){return I(j,()=>E(f,w,y))}function N(j,f,w,y={}){if(D(j,f,w,y))return!0;return G(j,f,w,y),!1}function O(j,f,w,y={}){if(E(f,w,y.select))return!0;return H(j,f,w,y),!1}function I(j,f){return F(j,f),f()}
|
|
2
|
-
export{L as u,M as v,N as w,O as x};
|
|
3
|
-
|
|
4
|
-
//# debugId=A9ED5E9A13C35EF164756E2164756E21
|
package/dist/chunk-w50v38rv.js
DELETED
package/dist/chunk-zb7wh7w4.js
DELETED
package/dist/chunk-zj9ez73m.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
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
|