@sonordev/site-kit 6.1.1 → 6.2.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/agent-manifest.json +1 -1
- package/dist/{AnalyticsProvider-5G5AFHZN.js → AnalyticsProvider-AT5XFQKT.js} +10 -10
- package/dist/{AnalyticsProvider-5G5AFHZN.js.map → AnalyticsProvider-AT5XFQKT.js.map} +1 -1
- package/dist/{AnalyticsProvider-33L4E6LO.mjs → AnalyticsProvider-KPK3N52Q.mjs} +6 -6
- package/dist/{AnalyticsProvider-33L4E6LO.mjs.map → AnalyticsProvider-KPK3N52Q.mjs.map} +1 -1
- package/dist/{ArticleViewTracker-U2KFUSZF.js → ArticleViewTracker-3PFASMTC.js} +6 -6
- package/dist/{ArticleViewTracker-U2KFUSZF.js.map → ArticleViewTracker-3PFASMTC.js.map} +1 -1
- package/dist/{ArticleViewTracker-VZRMPK4S.mjs → ArticleViewTracker-KIKKHBO6.mjs} +5 -5
- package/dist/{ArticleViewTracker-VZRMPK4S.mjs.map → ArticleViewTracker-KIKKHBO6.mjs.map} +1 -1
- package/dist/ChatWidget-6PXV6RSI.mjs +17 -0
- package/dist/{ChatWidget-LH3QZYKR.mjs.map → ChatWidget-6PXV6RSI.mjs.map} +1 -1
- package/dist/ChatWidget-D27PSWMO.js +34 -0
- package/dist/{ChatWidget-RUCQMCMN.js.map → ChatWidget-D27PSWMO.js.map} +1 -1
- package/dist/EngageWidget-SPZL3KPX.js +21 -0
- package/dist/{EngageWidget-X2CBW7DV.js.map → EngageWidget-SPZL3KPX.js.map} +1 -1
- package/dist/EngageWidget-YRTVPYAY.mjs +12 -0
- package/dist/{EngageWidget-34BQXU7K.mjs.map → EngageWidget-YRTVPYAY.mjs.map} +1 -1
- package/dist/{FileField-2MMV53BG.js → FileField-6RC33ORG.js} +6 -6
- package/dist/{FileField-2MMV53BG.js.map → FileField-6RC33ORG.js.map} +1 -1
- package/dist/{FileField-REUU36RJ.mjs → FileField-GXNG2LH2.mjs} +5 -5
- package/dist/{FileField-REUU36RJ.mjs.map → FileField-GXNG2LH2.mjs.map} +1 -1
- package/dist/{FormSpotlight-Y27TPQ4G.js → FormSpotlight-73E2CMV6.js} +9 -9
- package/dist/{FormSpotlight-Y27TPQ4G.js.map → FormSpotlight-73E2CMV6.js.map} +1 -1
- package/dist/{FormSpotlight-ZV3IS66K.mjs → FormSpotlight-YDUF3TSC.mjs} +3 -3
- package/dist/{FormSpotlight-ZV3IS66K.mjs.map → FormSpotlight-YDUF3TSC.mjs.map} +1 -1
- package/dist/{FormStage-K7Z6IEPM.js → FormStage-BL5FREFE.js} +9 -9
- package/dist/{FormStage-K7Z6IEPM.js.map → FormStage-BL5FREFE.js.map} +1 -1
- package/dist/{FormStage-6NUGCDJR.mjs → FormStage-VJZHYW6J.mjs} +3 -3
- package/dist/{FormStage-6NUGCDJR.mjs.map → FormStage-VJZHYW6J.mjs.map} +1 -1
- package/dist/ManagedForm-FUIOTKSI.js +25 -0
- package/dist/{ManagedForm-O67ILXN7.js.map → ManagedForm-FUIOTKSI.js.map} +1 -1
- package/dist/ManagedForm-Z2S37RFX.mjs +16 -0
- package/dist/{ManagedForm-EUDKMS5G.mjs.map → ManagedForm-Z2S37RFX.mjs.map} +1 -1
- package/dist/{ManagedNewsletterForm-QBJODAIA.js → ManagedNewsletterForm-3D3IW6JG.js} +8 -8
- package/dist/{ManagedNewsletterForm-QBJODAIA.js.map → ManagedNewsletterForm-3D3IW6JG.js.map} +1 -1
- package/dist/{ManagedNewsletterForm-IGWTZW7X.mjs → ManagedNewsletterForm-ZXASCHZV.mjs} +7 -7
- package/dist/{ManagedNewsletterForm-IGWTZW7X.mjs.map → ManagedNewsletterForm-ZXASCHZV.mjs.map} +1 -1
- package/dist/{SignalCore-UR4KVU5X.mjs → SignalCore-LKSU7UYG.mjs} +5 -5
- package/dist/{SignalCore-UR4KVU5X.mjs.map → SignalCore-LKSU7UYG.mjs.map} +1 -1
- package/dist/{SignalCore-KQDRH44V.js → SignalCore-RNMT4ZP4.js} +11 -11
- package/dist/{SignalCore-KQDRH44V.js.map → SignalCore-RNMT4ZP4.js.map} +1 -1
- package/dist/SitemapSync-IDJ3PXER.js +18 -0
- package/dist/{SitemapSync-DQALPBTR.js.map → SitemapSync-IDJ3PXER.js.map} +1 -1
- package/dist/SitemapSync-NTYKLAEH.mjs +9 -0
- package/dist/{SitemapSync-QYV3X5LH.mjs.map → SitemapSync-NTYKLAEH.mjs.map} +1 -1
- package/dist/analytics/index.js +9 -9
- package/dist/analytics/index.mjs +4 -4
- package/dist/articles/index.js +1 -1
- package/dist/articles/index.mjs +1 -1
- package/dist/articles/server-ui.js +1 -1
- package/dist/articles/server-ui.mjs +1 -1
- package/dist/brand/extract-brand-profile.d.ts +2 -7
- package/dist/brand/extract-brand-profile.d.ts.map +1 -1
- package/dist/{chunk-3SHAY7PK.mjs → chunk-22WIVF4O.mjs} +234 -197
- package/dist/chunk-22WIVF4O.mjs.map +1 -0
- package/dist/{chunk-VNJTU6LG.js → chunk-3NDDCSWR.js} +15 -15
- package/dist/{chunk-VNJTU6LG.js.map → chunk-3NDDCSWR.js.map} +1 -1
- package/dist/{chunk-MSSFRRXJ.mjs → chunk-3T74AR7S.mjs} +4 -4
- package/dist/{chunk-MSSFRRXJ.mjs.map → chunk-3T74AR7S.mjs.map} +1 -1
- package/dist/{chunk-OP42HO3Z.mjs → chunk-4FWJ5K5O.mjs} +3 -3
- package/dist/{chunk-OP42HO3Z.mjs.map → chunk-4FWJ5K5O.mjs.map} +1 -1
- package/dist/{chunk-CJ5YPYAE.mjs → chunk-53OU4TGU.mjs} +4 -4
- package/dist/{chunk-CJ5YPYAE.mjs.map → chunk-53OU4TGU.mjs.map} +1 -1
- package/dist/{chunk-NJSD5QY6.js → chunk-5IOMLUQS.js} +7 -7
- package/dist/{chunk-NJSD5QY6.js.map → chunk-5IOMLUQS.js.map} +1 -1
- package/dist/{chunk-S24WZNFP.js → chunk-5L46GS7N.js} +6 -6
- package/dist/{chunk-S24WZNFP.js.map → chunk-5L46GS7N.js.map} +1 -1
- package/dist/{chunk-6K3YRSYN.js → chunk-7JRFYQKN.js} +10 -10
- package/dist/{chunk-6K3YRSYN.js.map → chunk-7JRFYQKN.js.map} +1 -1
- package/dist/{chunk-MJTHYT3D.js → chunk-7JYLE3X6.js} +4 -4
- package/dist/{chunk-MJTHYT3D.js.map → chunk-7JYLE3X6.js.map} +1 -1
- package/dist/{chunk-JOYMIGR2.mjs → chunk-7K6L33BX.mjs} +22 -22
- package/dist/{chunk-R2BHRDPZ.mjs → chunk-7OOPIYLP.mjs} +3 -3
- package/dist/{chunk-R2BHRDPZ.mjs.map → chunk-7OOPIYLP.mjs.map} +1 -1
- package/dist/{chunk-WWJQGMMN.js → chunk-A4WTX36Y.js} +12 -12
- package/dist/{chunk-WWJQGMMN.js.map → chunk-A4WTX36Y.js.map} +1 -1
- package/dist/{chunk-AEW7EFYU.js → chunk-AEN7EL6N.js} +20 -6
- package/dist/chunk-AEN7EL6N.js.map +1 -0
- package/dist/{chunk-JS75ORH7.js → chunk-ATPQ6264.js} +24 -24
- package/dist/{chunk-7IM7VG4E.js → chunk-BYVAXSH5.js} +6 -6
- package/dist/{chunk-7IM7VG4E.js.map → chunk-BYVAXSH5.js.map} +1 -1
- package/dist/{chunk-ME5636V6.js → chunk-CRIZNSD2.js} +3 -3
- package/dist/{chunk-ME5636V6.js.map → chunk-CRIZNSD2.js.map} +1 -1
- package/dist/{chunk-YZMI7QQ2.mjs → chunk-EG3F5AHL.mjs} +4 -4
- package/dist/{chunk-YZMI7QQ2.mjs.map → chunk-EG3F5AHL.mjs.map} +1 -1
- package/dist/{chunk-VPZUQXZV.mjs → chunk-EJTRU275.mjs} +4 -4
- package/dist/{chunk-VPZUQXZV.mjs.map → chunk-EJTRU275.mjs.map} +1 -1
- package/dist/{chunk-MWX6QO7A.mjs → chunk-GSH4DBAD.mjs} +3 -3
- package/dist/{chunk-MWX6QO7A.mjs.map → chunk-GSH4DBAD.mjs.map} +1 -1
- package/dist/chunk-IMWON7OV.mjs +27 -0
- package/dist/chunk-IMWON7OV.mjs.map +1 -0
- package/dist/{chunk-HH5EMIXK.js → chunk-IPLOSM5F.js} +14 -14
- package/dist/{chunk-HH5EMIXK.js.map → chunk-IPLOSM5F.js.map} +1 -1
- package/dist/{chunk-OTCJRVFJ.js → chunk-ITJ5ZF33.js} +3 -3
- package/dist/{chunk-OTCJRVFJ.js.map → chunk-ITJ5ZF33.js.map} +1 -1
- package/dist/{chunk-U3SQBAUQ.mjs → chunk-IXJ2H4MU.mjs} +8 -8
- package/dist/{chunk-U3SQBAUQ.mjs.map → chunk-IXJ2H4MU.mjs.map} +1 -1
- package/dist/{chunk-7PCXI25T.mjs → chunk-JLVKZTYZ.mjs} +3 -3
- package/dist/{chunk-7PCXI25T.mjs.map → chunk-JLVKZTYZ.mjs.map} +1 -1
- package/dist/{chunk-U2DWXE2A.mjs → chunk-JOSSKN4J.mjs} +3 -3
- package/dist/{chunk-U2DWXE2A.mjs.map → chunk-JOSSKN4J.mjs.map} +1 -1
- package/dist/chunk-LGFRHT34.js +8 -0
- package/dist/{chunk-QWUDHOUE.js.map → chunk-LGFRHT34.js.map} +1 -1
- package/dist/chunk-M2N7NY3V.js +103 -0
- package/dist/chunk-M2N7NY3V.js.map +1 -0
- package/dist/{chunk-QYRJ4IQD.js → chunk-NJVU2DCX.js} +243 -204
- package/dist/chunk-NJVU2DCX.js.map +1 -0
- package/dist/chunk-NYXENHD2.mjs +96 -0
- package/dist/chunk-NYXENHD2.mjs.map +1 -0
- package/dist/{chunk-Y4A4G5XJ.js → chunk-OASA6M53.js} +5 -5
- package/dist/{chunk-Y4A4G5XJ.js.map → chunk-OASA6M53.js.map} +1 -1
- package/dist/{chunk-AG7MWWGP.mjs → chunk-P2UCNCQZ.mjs} +4 -4
- package/dist/{chunk-AG7MWWGP.mjs.map → chunk-P2UCNCQZ.mjs.map} +1 -1
- package/dist/{chunk-NNZDWY3L.mjs → chunk-RH4XEXTK.mjs} +3 -3
- package/dist/{chunk-46GMNQWN.js → chunk-RKRCWQBU.js} +3 -3
- package/dist/{chunk-46GMNQWN.js.map → chunk-RKRCWQBU.js.map} +1 -1
- package/dist/{chunk-VNSV5SY7.mjs → chunk-RKWBC43M.mjs} +3 -3
- package/dist/{chunk-VNSV5SY7.mjs.map → chunk-RKWBC43M.mjs.map} +1 -1
- package/dist/{chunk-BRED7YSL.js → chunk-RPDSNMVR.js} +11 -11
- package/dist/{chunk-BRED7YSL.js.map → chunk-RPDSNMVR.js.map} +1 -1
- package/dist/{chunk-3E7ZXPOB.mjs → chunk-RT7XKV6A.mjs} +4 -4
- package/dist/{chunk-3E7ZXPOB.mjs.map → chunk-RT7XKV6A.mjs.map} +1 -1
- package/dist/{chunk-JZCG25XK.js → chunk-RWJ3IJUP.js} +14 -14
- package/dist/{chunk-JZCG25XK.js.map → chunk-RWJ3IJUP.js.map} +1 -1
- package/dist/{chunk-22KPMJIQ.mjs → chunk-S4LTYXPR.mjs} +3 -3
- package/dist/{chunk-22KPMJIQ.mjs.map → chunk-S4LTYXPR.mjs.map} +1 -1
- package/dist/chunk-SIHPFJ6C.mjs +6 -0
- package/dist/{chunk-HQWPCX3N.mjs.map → chunk-SIHPFJ6C.mjs.map} +1 -1
- package/dist/{chunk-IPGIFBRN.js → chunk-T742S2CY.js} +4 -4
- package/dist/{chunk-IPGIFBRN.js.map → chunk-T742S2CY.js.map} +1 -1
- package/dist/{chunk-YCA4KCRF.mjs → chunk-TBAP7JNJ.mjs} +3 -3
- package/dist/{chunk-YCA4KCRF.mjs.map → chunk-TBAP7JNJ.mjs.map} +1 -1
- package/dist/{chunk-5YA6SI4Z.mjs → chunk-TIFVAASU.mjs} +2 -2
- package/dist/{chunk-MLXUMVBK.mjs → chunk-UCMMIGC6.mjs} +20 -6
- package/dist/chunk-UCMMIGC6.mjs.map +1 -0
- package/dist/{chunk-U577PJLH.mjs → chunk-UPF6HX5C.mjs} +7 -7
- package/dist/{chunk-U577PJLH.mjs.map → chunk-UPF6HX5C.mjs.map} +1 -1
- package/dist/{chunk-OB7K6EFK.js → chunk-UTCZNQ4G.js} +5 -5
- package/dist/{chunk-OB7K6EFK.js.map → chunk-UTCZNQ4G.js.map} +1 -1
- package/dist/{chunk-DGWFHL35.mjs → chunk-UV3HJDMT.mjs} +3 -3
- package/dist/{chunk-DGWFHL35.mjs.map → chunk-UV3HJDMT.mjs.map} +1 -1
- package/dist/{chunk-EF7QCYLF.js → chunk-W6GQNGIM.js} +4 -4
- package/dist/{chunk-EF7QCYLF.js.map → chunk-W6GQNGIM.js.map} +1 -1
- package/dist/{chunk-WVNUOUQI.mjs → chunk-W7D27SYJ.mjs} +3 -3
- package/dist/{chunk-WVNUOUQI.mjs.map → chunk-W7D27SYJ.mjs.map} +1 -1
- package/dist/{chunk-NK7ZWPAO.js → chunk-WI6RV2U4.js} +18 -18
- package/dist/{chunk-NK7ZWPAO.js.map → chunk-WI6RV2U4.js.map} +1 -1
- package/dist/{chunk-GZLMMX76.mjs → chunk-XAPGVZNN.mjs} +3 -3
- package/dist/{chunk-GZLMMX76.mjs.map → chunk-XAPGVZNN.mjs.map} +1 -1
- package/dist/{chunk-I7AZC5ZQ.js → chunk-XXSSUCJB.js} +2 -2
- package/dist/{chunk-3H3DTYFQ.js → chunk-Y63EG5CW.js} +8 -8
- package/dist/{chunk-3H3DTYFQ.js.map → chunk-Y63EG5CW.js.map} +1 -1
- package/dist/{chunk-D6VMDDQR.js → chunk-YNI7WQJN.js} +8 -8
- package/dist/{chunk-D6VMDDQR.js.map → chunk-YNI7WQJN.js.map} +1 -1
- package/dist/chunk-YZJ22HUQ.js +29 -0
- package/dist/chunk-YZJ22HUQ.js.map +1 -0
- package/dist/{chunk-OUZQL5PV.js → chunk-ZRCA5YGZ.js} +4 -4
- package/dist/{chunk-OUZQL5PV.js.map → chunk-ZRCA5YGZ.js.map} +1 -1
- package/dist/{chunk-7DMAVD7W.mjs → chunk-ZRD75SE5.mjs} +3 -3
- package/dist/{chunk-7DMAVD7W.mjs.map → chunk-ZRD75SE5.mjs.map} +1 -1
- package/dist/{chunk-NN2YE5WT.js → chunk-ZUQSVCMD.js} +3 -3
- package/dist/{chunk-6ZMEJSNX.mjs → chunk-ZZ6P27A5.mjs} +4 -4
- package/dist/{chunk-6ZMEJSNX.mjs.map → chunk-ZZ6P27A5.mjs.map} +1 -1
- package/dist/cli/index.js +211 -211
- package/dist/cli/index.mjs +151 -151
- package/dist/client/index.js +4 -4
- package/dist/client/index.mjs +3 -3
- package/dist/commerce/index.js +57 -57
- package/dist/commerce/index.mjs +5 -5
- package/dist/cta-bar/CtaBar.d.ts +15 -4
- package/dist/cta-bar/CtaBar.d.ts.map +1 -1
- package/dist/cta-bar/index.js +6 -12
- package/dist/cta-bar/index.js.map +1 -1
- package/dist/cta-bar/index.mjs +6 -12
- package/dist/cta-bar/index.mjs.map +1 -1
- package/dist/engage/ChatWidget.d.ts +60 -1
- package/dist/engage/ChatWidget.d.ts.map +1 -1
- package/dist/engage/EchoUiActions.d.ts +5 -2
- package/dist/engage/EchoUiActions.d.ts.map +1 -1
- package/dist/engage/brand-color.d.ts +37 -0
- package/dist/engage/brand-color.d.ts.map +1 -0
- package/dist/engage/chat-messages.d.ts +86 -0
- package/dist/engage/chat-messages.d.ts.map +1 -0
- package/dist/engage/index.js +11 -10
- package/dist/engage/index.js.map +1 -1
- package/dist/engage/index.mjs +8 -7
- package/dist/engage/index.mjs.map +1 -1
- package/dist/fleet/index.js +8 -8
- package/dist/fleet/index.mjs +4 -4
- package/dist/forms/index.js +16 -16
- package/dist/forms/index.mjs +9 -9
- package/dist/forms/server.js +10 -10
- package/dist/forms/server.mjs +8 -8
- package/dist/forms/static.js +7 -7
- package/dist/forms/static.mjs +6 -6
- package/dist/images/index.js +11 -11
- package/dist/images/index.mjs +4 -4
- package/dist/index.js +63 -63
- package/dist/index.mjs +9 -9
- package/dist/layout/client.js +8 -8
- package/dist/layout/client.mjs +7 -7
- package/dist/layout/index.js +10 -10
- package/dist/layout/index.mjs +8 -8
- package/dist/{lib-6HOOMENJ.js → lib-6GWWPDJR.js} +7 -7
- package/dist/lib-BD4KKQBI.mjs +4 -0
- package/dist/{lib-R7IQ4ZHE.mjs → lib-N5PD6JNJ.mjs} +2 -2
- package/dist/{lib-BGAWCSUH.js → lib-WFB5RLEQ.js} +8 -8
- package/dist/maps/index.js +5 -5
- package/dist/maps/index.mjs +3 -3
- package/dist/motion/CountUp.d.ts +49 -0
- package/dist/motion/CountUp.d.ts.map +1 -0
- package/dist/motion/Parallax.d.ts +14 -0
- package/dist/motion/Parallax.d.ts.map +1 -1
- package/dist/motion/ScrollScene.d.ts +1 -1
- package/dist/motion/ScrollScene.d.ts.map +1 -1
- package/dist/motion/engine.d.ts +19 -0
- package/dist/motion/engine.d.ts.map +1 -1
- package/dist/motion/gsap.d.ts +55 -6
- package/dist/motion/gsap.d.ts.map +1 -1
- package/dist/motion/gsap.js +101 -4
- package/dist/motion/gsap.js.map +1 -1
- package/dist/motion/gsap.mjs +96 -3
- package/dist/motion/gsap.mjs.map +1 -1
- package/dist/motion/index.d.ts +1 -1
- package/dist/motion/index.d.ts.map +1 -1
- package/dist/motion/index.js +21 -40
- package/dist/motion/index.js.map +1 -1
- package/dist/motion/index.mjs +11 -32
- package/dist/motion/index.mjs.map +1 -1
- package/dist/motion/three.js +5 -5
- package/dist/motion/three.mjs +1 -1
- package/dist/search/index.js +4 -4
- package/dist/search/index.mjs +3 -3
- package/dist/seo/client.js +5 -5
- package/dist/seo/client.mjs +4 -4
- package/dist/seo/index.js +5 -5
- package/dist/seo/index.mjs +4 -4
- package/dist/seo/register-sitemap-cli.js +12 -93
- package/dist/seo/register-sitemap-cli.mjs +2 -83
- package/dist/server/index.js +3 -3
- package/dist/server/index.mjs +2 -2
- package/dist/shared/color.d.ts +39 -0
- package/dist/shared/color.d.ts.map +1 -0
- package/dist/shared/version.d.ts +1 -1
- package/dist/signal/index.js +11 -11
- package/dist/signal/index.mjs +2 -2
- package/dist/sync/index.js +17 -17
- package/dist/sync/index.mjs +4 -4
- package/dist/{web-vitals.attribution-7LKLZ5GR.mjs → web-vitals.attribution-CHXXWO72.mjs} +3 -3
- package/dist/web-vitals.attribution-CHXXWO72.mjs.map +1 -0
- package/dist/{web-vitals.attribution-ONVYQNRB.js → web-vitals.attribution-SQVZNHN3.js} +3 -3
- package/dist/web-vitals.attribution-SQVZNHN3.js.map +1 -0
- package/package.json +1 -1
- package/dist/ChatWidget-LH3QZYKR.mjs +0 -16
- package/dist/ChatWidget-RUCQMCMN.js +0 -25
- package/dist/EngageWidget-34BQXU7K.mjs +0 -12
- package/dist/EngageWidget-X2CBW7DV.js +0 -21
- package/dist/ManagedForm-EUDKMS5G.mjs +0 -16
- package/dist/ManagedForm-O67ILXN7.js +0 -25
- package/dist/SitemapSync-DQALPBTR.js +0 -18
- package/dist/SitemapSync-QYV3X5LH.mjs +0 -9
- package/dist/chunk-3SHAY7PK.mjs.map +0 -1
- package/dist/chunk-AEW7EFYU.js.map +0 -1
- package/dist/chunk-HQWPCX3N.mjs +0 -6
- package/dist/chunk-MLXUMVBK.mjs.map +0 -1
- package/dist/chunk-QWUDHOUE.js +0 -8
- package/dist/chunk-QYRJ4IQD.js.map +0 -1
- package/dist/lib-RSDMEKDQ.mjs +0 -4
- package/dist/web-vitals.attribution-7LKLZ5GR.mjs.map +0 -1
- package/dist/web-vitals.attribution-ONVYQNRB.js.map +0 -1
package/dist/layout/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../chunk-
|
|
5
|
-
require('../chunk-
|
|
3
|
+
var chunkRPDSNMVR_js = require('../chunk-RPDSNMVR.js');
|
|
4
|
+
require('../chunk-OASA6M53.js');
|
|
5
|
+
require('../chunk-5IOMLUQS.js');
|
|
6
6
|
require('../chunk-7THQ4UW3.js');
|
|
7
7
|
require('../chunk-HGNSJXWT.js');
|
|
8
8
|
var chunkGCPPXUAI_js = require('../chunk-GCPPXUAI.js');
|
|
9
|
-
require('../chunk-
|
|
10
|
-
var
|
|
9
|
+
require('../chunk-CRIZNSD2.js');
|
|
10
|
+
var chunk7JYLE3X6_js = require('../chunk-7JYLE3X6.js');
|
|
11
11
|
require('../chunk-LVGSOW2F.js');
|
|
12
12
|
var chunkDV2LJYFD_js = require('../chunk-DV2LJYFD.js');
|
|
13
13
|
var chunkO5GHP7UO_js = require('../chunk-O5GHP7UO.js');
|
|
@@ -16,9 +16,9 @@ require('../chunk-SWIKKSKL.js');
|
|
|
16
16
|
require('../chunk-RC4WWQXR.js');
|
|
17
17
|
require('../chunk-VJMPIRSD.js');
|
|
18
18
|
require('../chunk-5RNAUYWE.js');
|
|
19
|
-
require('../chunk-
|
|
20
|
-
require('../chunk-
|
|
21
|
-
require('../chunk-
|
|
19
|
+
require('../chunk-3NDDCSWR.js');
|
|
20
|
+
require('../chunk-T742S2CY.js');
|
|
21
|
+
require('../chunk-LGFRHT34.js');
|
|
22
22
|
require('../chunk-SNAQBZPT.js');
|
|
23
23
|
var jsxRuntime = require('react/jsx-runtime');
|
|
24
24
|
|
|
@@ -72,7 +72,7 @@ async function SiteKitLayout({
|
|
|
72
72
|
);
|
|
73
73
|
}
|
|
74
74
|
const apiOrigin = chunkO5GHP7UO_js.resolveApiOrigin(resolvedApiUrl);
|
|
75
|
-
const clientCredential = await
|
|
75
|
+
const clientCredential = await chunk7JYLE3X6_js.resolveClientCredential(resolvedApiKey, resolvedApiUrl);
|
|
76
76
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
77
77
|
/* @__PURE__ */ jsxRuntime.jsx("link", { rel: "preconnect", href: apiOrigin, crossOrigin: "anonymous" }),
|
|
78
78
|
/* @__PURE__ */ jsxRuntime.jsx("link", { rel: "dns-prefetch", href: apiOrigin }),
|
|
@@ -80,7 +80,7 @@ async function SiteKitLayout({
|
|
|
80
80
|
managedScripts && /* @__PURE__ */ jsxRuntime.jsx(chunkDV2LJYFD_js.ManagedScripts, { position: "head" }),
|
|
81
81
|
speculation && /* @__PURE__ */ jsxRuntime.jsx(SpeculationRules, { ...typeof speculation === "object" ? speculation : {} }),
|
|
82
82
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
83
|
-
|
|
83
|
+
chunkRPDSNMVR_js.SiteKitClientProviders,
|
|
84
84
|
{
|
|
85
85
|
apiKey: clientCredential,
|
|
86
86
|
apiUrl: resolvedApiUrl,
|
package/dist/layout/index.mjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { SiteKitClientProviders } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
3
|
-
import '../chunk-
|
|
1
|
+
import { SiteKitClientProviders } from '../chunk-IXJ2H4MU.mjs';
|
|
2
|
+
import '../chunk-JOSSKN4J.mjs';
|
|
3
|
+
import '../chunk-EJTRU275.mjs';
|
|
4
4
|
import '../chunk-4WCA2HM6.mjs';
|
|
5
5
|
import '../chunk-ZVBLXXNJ.mjs';
|
|
6
6
|
import { ManagedFavicon } from '../chunk-CU6OGBKK.mjs';
|
|
7
|
-
import '../chunk-
|
|
8
|
-
import { resolveClientCredential } from '../chunk-
|
|
7
|
+
import '../chunk-S4LTYXPR.mjs';
|
|
8
|
+
import { resolveClientCredential } from '../chunk-4FWJ5K5O.mjs';
|
|
9
9
|
import '../chunk-BQP6JIE2.mjs';
|
|
10
10
|
import { ManagedScripts } from '../chunk-6PJTLBRR.mjs';
|
|
11
11
|
import { resolveApiOrigin } from '../chunk-6XNEGG5B.mjs';
|
|
@@ -14,9 +14,9 @@ import '../chunk-ZN4HBK5C.mjs';
|
|
|
14
14
|
import '../chunk-ZZQAGCSI.mjs';
|
|
15
15
|
import '../chunk-6EDVCUAG.mjs';
|
|
16
16
|
import '../chunk-A6UYV475.mjs';
|
|
17
|
-
import '../chunk-
|
|
18
|
-
import '../chunk-
|
|
19
|
-
import '../chunk-
|
|
17
|
+
import '../chunk-ZZ6P27A5.mjs';
|
|
18
|
+
import '../chunk-TBAP7JNJ.mjs';
|
|
19
|
+
import '../chunk-SIHPFJ6C.mjs';
|
|
20
20
|
import '../chunk-BEXTDHO4.mjs';
|
|
21
21
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
22
22
|
|
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkXXSSUCJB_js = require('./chunk-XXSSUCJB.js');
|
|
4
4
|
require('./chunk-SNAQBZPT.js');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
Object.defineProperty(exports, "getColumn", {
|
|
9
9
|
enumerable: true,
|
|
10
|
-
get: function () { return
|
|
10
|
+
get: function () { return chunkXXSSUCJB_js.getColumn; }
|
|
11
11
|
});
|
|
12
12
|
Object.defineProperty(exports, "getLine", {
|
|
13
13
|
enumerable: true,
|
|
14
|
-
get: function () { return
|
|
14
|
+
get: function () { return chunkXXSSUCJB_js.getLine; }
|
|
15
15
|
});
|
|
16
16
|
Object.defineProperty(exports, "parse", {
|
|
17
17
|
enumerable: true,
|
|
18
|
-
get: function () { return
|
|
18
|
+
get: function () { return chunkXXSSUCJB_js.parse; }
|
|
19
19
|
});
|
|
20
20
|
Object.defineProperty(exports, "parseExpression", {
|
|
21
21
|
enumerable: true,
|
|
22
|
-
get: function () { return
|
|
22
|
+
get: function () { return chunkXXSSUCJB_js.parseExpression; }
|
|
23
23
|
});
|
|
24
24
|
Object.defineProperty(exports, "tokTypes", {
|
|
25
25
|
enumerable: true,
|
|
26
|
-
get: function () { return
|
|
26
|
+
get: function () { return chunkXXSSUCJB_js.tokTypes; }
|
|
27
27
|
});
|
|
28
|
-
//# sourceMappingURL=lib-
|
|
28
|
+
//# sourceMappingURL=lib-6GWWPDJR.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { getColumn, getLine, parse, parseExpression, tokTypes } from './chunk-
|
|
1
|
+
export { getColumn, getLine, parse, parseExpression, tokTypes } from './chunk-TIFVAASU.mjs';
|
|
2
2
|
import './chunk-BEXTDHO4.mjs';
|
|
3
|
-
//# sourceMappingURL=lib-
|
|
3
|
+
//# sourceMappingURL=lib-N5PD6JNJ.mjs.map
|
|
@@ -2,30 +2,30 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
6
|
-
require('./chunk-
|
|
5
|
+
var chunkATPQ6264_js = require('./chunk-ATPQ6264.js');
|
|
6
|
+
require('./chunk-XXSSUCJB.js');
|
|
7
7
|
require('./chunk-SNAQBZPT.js');
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
Object.defineProperty(exports, "Hub", {
|
|
12
12
|
enumerable: true,
|
|
13
|
-
get: function () { return
|
|
13
|
+
get: function () { return chunkATPQ6264_js.Hub; }
|
|
14
14
|
});
|
|
15
15
|
Object.defineProperty(exports, "NodePath", {
|
|
16
16
|
enumerable: true,
|
|
17
|
-
get: function () { return
|
|
17
|
+
get: function () { return chunkATPQ6264_js.NodePath_Final; }
|
|
18
18
|
});
|
|
19
19
|
Object.defineProperty(exports, "Scope", {
|
|
20
20
|
enumerable: true,
|
|
21
|
-
get: function () { return
|
|
21
|
+
get: function () { return chunkATPQ6264_js.Scope; }
|
|
22
22
|
});
|
|
23
23
|
Object.defineProperty(exports, "default", {
|
|
24
24
|
enumerable: true,
|
|
25
|
-
get: function () { return
|
|
25
|
+
get: function () { return chunkATPQ6264_js.traverse; }
|
|
26
26
|
});
|
|
27
27
|
Object.defineProperty(exports, "visitors", {
|
|
28
28
|
enumerable: true,
|
|
29
|
-
get: function () { return
|
|
29
|
+
get: function () { return chunkATPQ6264_js.visitors; }
|
|
30
30
|
});
|
|
31
|
-
//# sourceMappingURL=lib-
|
|
31
|
+
//# sourceMappingURL=lib-WFB5RLEQ.js.map
|
package/dist/maps/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
-
var
|
|
5
|
-
require('../chunk-
|
|
6
|
-
require('../chunk-
|
|
4
|
+
var chunk3NDDCSWR_js = require('../chunk-3NDDCSWR.js');
|
|
5
|
+
require('../chunk-T742S2CY.js');
|
|
6
|
+
require('../chunk-LGFRHT34.js');
|
|
7
7
|
require('../chunk-SNAQBZPT.js');
|
|
8
8
|
var react = require('react');
|
|
9
9
|
var reactGoogleMaps = require('@vis.gl/react-google-maps');
|
|
@@ -141,7 +141,7 @@ async function fetchMapsConfig() {
|
|
|
141
141
|
const { apiUrl, apiKey } = getApiConfig();
|
|
142
142
|
if (apiKey) {
|
|
143
143
|
try {
|
|
144
|
-
const res = await
|
|
144
|
+
const res = await chunk3NDDCSWR_js.sonorFetch(
|
|
145
145
|
`${apiUrl}/api/public/maps/config`,
|
|
146
146
|
{ headers: { "Content-Type": "application/json" } },
|
|
147
147
|
{ apiKey }
|
|
@@ -181,7 +181,7 @@ async function fetchNearbyPlaces(params) {
|
|
|
181
181
|
});
|
|
182
182
|
if (params.radius) searchParams.set("radius", String(params.radius));
|
|
183
183
|
if (params.limit) searchParams.set("limit", String(params.limit));
|
|
184
|
-
const res = await
|
|
184
|
+
const res = await chunk3NDDCSWR_js.sonorFetch(
|
|
185
185
|
`${apiUrl}/api/public/maps/nearby-places?${searchParams}`,
|
|
186
186
|
{ headers: { "Content-Type": "application/json" } },
|
|
187
187
|
{ apiKey }
|
package/dist/maps/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { sonorFetch } from '../chunk-
|
|
3
|
-
import '../chunk-
|
|
4
|
-
import '../chunk-
|
|
2
|
+
import { sonorFetch } from '../chunk-ZZ6P27A5.mjs';
|
|
3
|
+
import '../chunk-TBAP7JNJ.mjs';
|
|
4
|
+
import '../chunk-SIHPFJ6C.mjs';
|
|
5
5
|
import '../chunk-BEXTDHO4.mjs';
|
|
6
6
|
import { useState, useCallback, useEffect } from 'react';
|
|
7
7
|
import { APIProvider, Map as Map$1, AdvancedMarker, Pin, InfoWindow } from '@vis.gl/react-google-maps';
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { type ElementType } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* <CountUp> — a stat that rolls up to its value as it scrolls into view.
|
|
4
|
+
* Tier 1: it runs on `useGsap`, so it lives on the gsap subpath.
|
|
5
|
+
*
|
|
6
|
+
* It takes the formatted value as its text ("$412,500", "38.2%", "24 min")
|
|
7
|
+
* and rolls the first number in it, keeping the formatting around it: the
|
|
8
|
+
* same decimals, and thousands separators only if the text had them.
|
|
9
|
+
*
|
|
10
|
+
* The rules, all inherited from `scrollIn` / `useGsap`:
|
|
11
|
+
*
|
|
12
|
+
* - The server HTML is the real text, so crawlers, no-JS visitors and the
|
|
13
|
+
* indexed snapshot read the true number.
|
|
14
|
+
* - A stat already on screen when setup runs keeps its real number; only
|
|
15
|
+
* one still below the fold is zeroed (offscreen, unseen) and rolled when
|
|
16
|
+
* its top crosses `start`.
|
|
17
|
+
* - The real text is restored at the end of the roll, and by the no-scroll
|
|
18
|
+
* failsafe if the visitor never scrolls to it.
|
|
19
|
+
* - Reduced motion never loads gsap and never touches the text.
|
|
20
|
+
*
|
|
21
|
+
* Replaces the per-site CountUp components.
|
|
22
|
+
*/
|
|
23
|
+
export interface CountUpProps {
|
|
24
|
+
/** The formatted value exactly as it should read, e.g. "$412,500". */
|
|
25
|
+
children: string;
|
|
26
|
+
/** Element to render. Default "span". */
|
|
27
|
+
as?: ElementType;
|
|
28
|
+
className?: string;
|
|
29
|
+
id?: string;
|
|
30
|
+
/** Roll length in seconds. Default 1.3. */
|
|
31
|
+
duration?: number;
|
|
32
|
+
/** gsap ease. Default "power2.out". */
|
|
33
|
+
ease?: string;
|
|
34
|
+
/** ScrollTrigger start that begins the roll. Default "top 90%". */
|
|
35
|
+
start?: string;
|
|
36
|
+
}
|
|
37
|
+
export interface CountUpParts {
|
|
38
|
+
/** The number the text states. */
|
|
39
|
+
value: number;
|
|
40
|
+
/** The text with `n` in the number's place, formatted the same way. */
|
|
41
|
+
format: (n: number) => string;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Splits formatted text around its first number. Null when there's nothing
|
|
45
|
+
* to roll, in which case CountUp leaves the text alone.
|
|
46
|
+
*/
|
|
47
|
+
export declare function parseCountUp(text: string): CountUpParts | null;
|
|
48
|
+
export declare function CountUp({ children: text, as, className, id, duration, ease, start, }: CountUpProps): import("react").JSX.Element;
|
|
49
|
+
//# sourceMappingURL=CountUp.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CountUp.d.ts","sourceRoot":"","sources":["../../src/motion/CountUp.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,OAAO,CAAA;AAGhD;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,MAAM,WAAW,YAAY;IAC3B,sEAAsE;IACtE,QAAQ,EAAE,MAAM,CAAA;IAChB,yCAAyC;IACzC,EAAE,CAAC,EAAE,WAAW,CAAA;IAChB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,2CAA2C;IAC3C,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,uCAAuC;IACvC,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,mEAAmE;IACnE,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED,MAAM,WAAW,YAAY;IAC3B,kCAAkC;IAClC,KAAK,EAAE,MAAM,CAAA;IACb,uEAAuE;IACvE,MAAM,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,MAAM,CAAA;CAC9B;AAKD;;;GAGG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,YAAY,GAAG,IAAI,CAsB9D;AAED,wBAAgB,OAAO,CAAC,EACtB,QAAQ,EAAE,IAAI,EACd,EAAW,EACX,SAAS,EACT,EAAE,EACF,QAAc,EACd,IAAmB,EACnB,KAAiB,GAClB,EAAE,YAAY,+BA4Cd"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type CSSProperties, type ElementType, type ReactNode, type RefObject } from 'react';
|
|
2
|
+
import { type SceneAnchor } from './engine';
|
|
2
3
|
/**
|
|
3
4
|
* Scroll-linked parallax with no animation library.
|
|
4
5
|
*
|
|
@@ -14,6 +15,12 @@ import { type CSSProperties, type ElementType, type ReactNode, type RefObject }
|
|
|
14
15
|
* Replaces the per-site ParallaxImage / ParallaxY components: wrap the
|
|
15
16
|
* image in an overflow-hidden frame and give <Parallax> a scale so the
|
|
16
17
|
* travel never shows the frame's edges.
|
|
18
|
+
*
|
|
19
|
+
* Above the fold, pass `anchor="load"`: a hero layer loads partway through
|
|
20
|
+
* its trip, so without it the layer jumps to that frame on hydration (and
|
|
21
|
+
* a hero photo is usually the LCP element). Anchored, each range starts
|
|
22
|
+
* from its first value at the position the page loaded and moves at the
|
|
23
|
+
* usual rate from there, so give it ranges that start at rest: y={[0, 120]}.
|
|
17
24
|
*/
|
|
18
25
|
export interface ParallaxOptions {
|
|
19
26
|
/** Vertical travel in px as [at p=0, at p=1]. Default [40, -40]. */
|
|
@@ -28,6 +35,13 @@ export interface ParallaxOptions {
|
|
|
28
35
|
rotate?: [number, number];
|
|
29
36
|
/** Remap progress before it's applied (e.g. an ease-in-out). */
|
|
30
37
|
ease?: (p: number) => number;
|
|
38
|
+
/**
|
|
39
|
+
* "load" counts progress from where the page was when the layer armed,
|
|
40
|
+
* so the first frame renders each range's first value and nothing moves
|
|
41
|
+
* until the visitor scrolls. For layers above the fold. See
|
|
42
|
+
* SceneOptions.anchor.
|
|
43
|
+
*/
|
|
44
|
+
anchor?: SceneAnchor;
|
|
31
45
|
}
|
|
32
46
|
export declare function useParallax(ref: RefObject<HTMLElement | null>, options?: ParallaxOptions): void;
|
|
33
47
|
export interface ParallaxProps extends ParallaxOptions {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Parallax.d.ts","sourceRoot":"","sources":["../../src/motion/Parallax.tsx"],"names":[],"mappings":"AAEA,OAAO,EAGL,KAAK,aAAa,EAClB,KAAK,WAAW,EAChB,KAAK,SAAS,EACd,KAAK,SAAS,EACf,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"Parallax.d.ts","sourceRoot":"","sources":["../../src/motion/Parallax.tsx"],"names":[],"mappings":"AAEA,OAAO,EAGL,KAAK,aAAa,EAClB,KAAK,WAAW,EAChB,KAAK,SAAS,EACd,KAAK,SAAS,EACf,MAAM,OAAO,CAAA;AACd,OAAO,EAAuC,KAAK,WAAW,EAAE,MAAM,UAAU,CAAA;AAEhF;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,MAAM,WAAW,eAAe;IAC9B,oEAAoE;IACpE,CAAC,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IACpB,+BAA+B;IAC/B,CAAC,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IACpB,2BAA2B;IAC3B,KAAK,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IACxB,6BAA6B;IAC7B,OAAO,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IAC1B,yCAAyC;IACzC,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IACzB,gEAAgE;IAChE,IAAI,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,MAAM,CAAA;IAC5B;;;;;OAKG;IACH,MAAM,CAAC,EAAE,WAAW,CAAA;CACrB;AAED,wBAAgB,WAAW,CAAC,GAAG,EAAE,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,EAAE,OAAO,GAAE,eAAoB,GAAG,IAAI,CA+BnG;AAED,MAAM,WAAW,aAAc,SAAQ,eAAe;IACpD,QAAQ,CAAC,EAAE,SAAS,CAAA;IACpB,wCAAwC;IACxC,EAAE,CAAC,EAAE,WAAW,CAAA;IAChB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,KAAK,CAAC,EAAE,aAAa,CAAA;IACrB,EAAE,CAAC,EAAE,MAAM,CAAA;CACZ;AAED,wBAAgB,QAAQ,CAAC,EAAE,QAAQ,EAAE,EAAU,EAAE,SAAS,EAAE,KAAK,EAAE,EAAE,EAAE,GAAG,OAAO,EAAE,EAAE,aAAa,+BASjG"}
|
|
@@ -24,7 +24,7 @@ export interface UseScrollSceneOptions extends SceneOptions {
|
|
|
24
24
|
cssVar?: string | false;
|
|
25
25
|
}
|
|
26
26
|
export declare function useScrollScene(ref: RefObject<HTMLElement | null>, onProgress?: (p: number, info: SceneInfo) => void, options?: UseScrollSceneOptions): void;
|
|
27
|
-
export interface ScrollSceneProps extends Omit<UseScrollSceneOptions, 'mode'> {
|
|
27
|
+
export interface ScrollSceneProps extends Omit<UseScrollSceneOptions, 'mode' | 'anchor'> {
|
|
28
28
|
children?: ReactNode;
|
|
29
29
|
/** Scroll length of the scene — the wrapper's height. Default "300vh". */
|
|
30
30
|
length?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ScrollScene.d.ts","sourceRoot":"","sources":["../../src/motion/ScrollScene.tsx"],"names":[],"mappings":"AAEA,OAAO,EAGL,KAAK,aAAa,EAClB,KAAK,WAAW,EAChB,KAAK,SAAS,EACd,KAAK,SAAS,EACf,MAAM,OAAO,CAAA;AACd,OAAO,EAAiB,KAAK,SAAS,EAAE,KAAK,YAAY,EAAE,MAAM,UAAU,CAAA;AAE3E;;;;;;;;;;;;;;;;;;GAkBG;AAEH,MAAM,WAAW,qBAAsB,SAAQ,YAAY;IACzD,iFAAiF;IACjF,MAAM,CAAC,EAAE,MAAM,GAAG,KAAK,CAAA;CACxB;AAED,wBAAgB,cAAc,CAC5B,GAAG,EAAE,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,EAClC,UAAU,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,KAAK,IAAI,EACjD,OAAO,GAAE,qBAA0B,GAClC,IAAI,CAkBN;
|
|
1
|
+
{"version":3,"file":"ScrollScene.d.ts","sourceRoot":"","sources":["../../src/motion/ScrollScene.tsx"],"names":[],"mappings":"AAEA,OAAO,EAGL,KAAK,aAAa,EAClB,KAAK,WAAW,EAChB,KAAK,SAAS,EACd,KAAK,SAAS,EACf,MAAM,OAAO,CAAA;AACd,OAAO,EAAiB,KAAK,SAAS,EAAE,KAAK,YAAY,EAAE,MAAM,UAAU,CAAA;AAE3E;;;;;;;;;;;;;;;;;;GAkBG;AAEH,MAAM,WAAW,qBAAsB,SAAQ,YAAY;IACzD,iFAAiF;IACjF,MAAM,CAAC,EAAE,MAAM,GAAG,KAAK,CAAA;CACxB;AAED,wBAAgB,cAAc,CAC5B,GAAG,EAAE,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,EAClC,UAAU,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,KAAK,IAAI,EACjD,OAAO,GAAE,qBAA0B,GAClC,IAAI,CAkBN;AAGD,MAAM,WAAW,gBAAiB,SAAQ,IAAI,CAAC,qBAAqB,EAAE,MAAM,GAAG,QAAQ,CAAC;IACtF,QAAQ,CAAC,EAAE,SAAS,CAAA;IACpB,0EAA0E;IAC1E,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,0CAA0C;IAC1C,EAAE,CAAC,EAAE,WAAW,CAAA;IAChB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,KAAK,CAAC,EAAE,aAAa,CAAA;IACrB,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,gEAAgE;IAChE,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,UAAU,CAAC,EAAE,aAAa,CAAA;IAC1B,UAAU,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,KAAK,IAAI,CAAA;CAClD;AAED,wBAAgB,WAAW,CAAC,EAC1B,QAAQ,EACR,MAAgB,EAChB,EAAc,EACd,SAAS,EACT,KAAK,EACL,EAAE,EACF,cAAc,EACd,UAAU,EACV,UAAU,EACV,UAAU,EACV,QAAQ,EACR,IAAI,EACJ,MAAM,GACP,EAAE,gBAAgB,+BAqBlB"}
|
package/dist/motion/engine.d.ts
CHANGED
|
@@ -24,6 +24,11 @@
|
|
|
24
24
|
* full playbook for building scenes on top of it.
|
|
25
25
|
*/
|
|
26
26
|
export type SceneMode = 'pin' | 'view';
|
|
27
|
+
/**
|
|
28
|
+
* "load": report progress relative to where the page was when the scene
|
|
29
|
+
* first rendered, so its first frame is 0. See SceneOptions.anchor.
|
|
30
|
+
*/
|
|
31
|
+
export type SceneAnchor = 'load';
|
|
27
32
|
export interface SceneInfo {
|
|
28
33
|
/** The un-smoothed progress the scene is easing toward. */
|
|
29
34
|
target: number;
|
|
@@ -48,6 +53,20 @@ export interface SceneOptions {
|
|
|
48
53
|
* Lower is more liquid, 1 is locked to the scrollbar. Default 0.16.
|
|
49
54
|
*/
|
|
50
55
|
lerp?: number;
|
|
56
|
+
/**
|
|
57
|
+
* "load" measures progress from where the page was when the scene first
|
|
58
|
+
* rendered instead of from the start of its trip. The first frame reports
|
|
59
|
+
* 0 and progress then moves at the usual rate (1 per full trip), so it
|
|
60
|
+
* runs from 0 up to 1 - p0, and below 0 if the page scrolls back above
|
|
61
|
+
* that point.
|
|
62
|
+
*
|
|
63
|
+
* For anything above the fold. A hero layer loads partway through its
|
|
64
|
+
* trip (p0 around 0.5), so an unanchored scene jumps to that frame on
|
|
65
|
+
* hydration; an anchored one renders its rest state and moves only when
|
|
66
|
+
* the visitor scrolls. A scene first rendered below the fold anchors at
|
|
67
|
+
* 0 and behaves exactly as unanchored.
|
|
68
|
+
*/
|
|
69
|
+
anchor?: SceneAnchor;
|
|
51
70
|
}
|
|
52
71
|
/**
|
|
53
72
|
* Pure progress math, exported so it can be unit-tested and reused by
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"engine.d.ts","sourceRoot":"","sources":["../../src/motion/engine.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,MAAM,MAAM,SAAS,GAAG,KAAK,GAAG,MAAM,CAAA;AAEtC,MAAM,WAAW,SAAS;IACxB,2DAA2D;IAC3D,MAAM,EAAE,MAAM,CAAA;IACd,yEAAyE;IACzE,OAAO,EAAE,OAAO,CAAA;CACjB;AAED,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,KAAK,IAAI,CAAA;AAE9D,MAAM,WAAW,YAAY;IAC3B,yEAAyE;IACzE,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,gEAAgE;IAChE,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB;;;;;OAKG;IACH,IAAI,CAAC,EAAE,SAAS,CAAA;IAChB;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;
|
|
1
|
+
{"version":3,"file":"engine.d.ts","sourceRoot":"","sources":["../../src/motion/engine.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,MAAM,MAAM,SAAS,GAAG,KAAK,GAAG,MAAM,CAAA;AAEtC;;;GAGG;AACH,MAAM,MAAM,WAAW,GAAG,MAAM,CAAA;AAEhC,MAAM,WAAW,SAAS;IACxB,2DAA2D;IAC3D,MAAM,EAAE,MAAM,CAAA;IACd,yEAAyE;IACzE,OAAO,EAAE,OAAO,CAAA;CACjB;AAED,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,KAAK,IAAI,CAAA;AAE9D,MAAM,WAAW,YAAY;IAC3B,yEAAyE;IACzE,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,gEAAgE;IAChE,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB;;;;;OAKG;IACH,IAAI,CAAC,EAAE,SAAS,CAAA;IAChB;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;IACb;;;;;;;;;;;;OAYG;IACH,MAAM,CAAC,EAAE,WAAW,CAAA;CACrB;AA6BD;;;GAGG;AACH,wBAAgB,aAAa,CAC3B,IAAI,EAAE,SAAS,EACf,GAAG,EAAE,MAAM,EACX,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,MAAM,EACf,cAAc,EAAE,MAAM,GACrB,MAAM,CAKR;AAmHD,kFAAkF;AAClF,wBAAgB,oBAAoB,IAAI,OAAO,CAI9C;AAED;;;;GAIG;AACH,wBAAgB,aAAa,IAAI,IAAI,CAIpC;AAED;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAC3B,GAAG,EAAE,WAAW,EAChB,EAAE,EAAE,WAAW,EACf,IAAI,GAAE,YAAiB,GACtB,MAAM,IAAI,CAiCZ"}
|
package/dist/motion/gsap.d.ts
CHANGED
|
@@ -12,9 +12,12 @@
|
|
|
12
12
|
* boundary real (src/motion/motion.test.tsx enforces it).
|
|
13
13
|
*
|
|
14
14
|
* Cost and where it goes: gsap core + ScrollTrigger is ~46KB gzipped.
|
|
15
|
-
* `useGsap` loads it
|
|
16
|
-
*
|
|
17
|
-
*
|
|
15
|
+
* `useGsap` loads it once per page at idle, after the page has loaded and the
|
|
16
|
+
* main thread has gone quiet, so it never sits on the LCP critical path or
|
|
17
|
+
* competes with hydration, and it's already in hand by the time a visitor
|
|
18
|
+
* scrolls to an animated section. Setup still waits for its element to come
|
|
19
|
+
* near the viewport. It must only be used BELOW the fold; first-paint content
|
|
20
|
+
* renders static.
|
|
18
21
|
*
|
|
19
22
|
* Not included on purpose: ScrollSmoother. It drives scrolling by
|
|
20
23
|
* transforming the page body, which fights native scroll, costs INP on
|
|
@@ -26,6 +29,7 @@ type GsapModule = typeof import('gsap');
|
|
|
26
29
|
type ScrollTriggerModule = typeof import('gsap/ScrollTrigger');
|
|
27
30
|
export type Gsap = GsapModule['gsap'];
|
|
28
31
|
export type ScrollTriggerStatic = ScrollTriggerModule['ScrollTrigger'];
|
|
32
|
+
export type GsapTimeline = ReturnType<Gsap['timeline']>;
|
|
29
33
|
export interface GsapBundle {
|
|
30
34
|
gsap: Gsap;
|
|
31
35
|
ScrollTrigger: ScrollTriggerStatic;
|
|
@@ -35,6 +39,17 @@ export interface GsapBundle {
|
|
|
35
39
|
* promise. Safe to call from anywhere; resolves the same bundle every time.
|
|
36
40
|
*/
|
|
37
41
|
export declare function loadGsap(): Promise<GsapBundle>;
|
|
42
|
+
/**
|
|
43
|
+
* Resolves once per page, after the `load` event, when the main thread next
|
|
44
|
+
* goes idle (or after `timeout` ms of waiting for that, so a busy page still
|
|
45
|
+
* gets there). requestIdleCallback where it exists; Safari, which lacks it,
|
|
46
|
+
* waits a beat after load instead.
|
|
47
|
+
*
|
|
48
|
+
* The gate `useGsap` loads gsap behind: late enough to stay off the LCP
|
|
49
|
+
* critical path and out of hydration's way, early enough that gsap is ready
|
|
50
|
+
* before anyone scrolls to the section that needs it.
|
|
51
|
+
*/
|
|
52
|
+
export declare function whenIdle(timeout?: number): Promise<void>;
|
|
38
53
|
/** Dynamic imports of GSAP plugins, by name: `{ SplitText: () => import('gsap/SplitText') }`. */
|
|
39
54
|
export type GsapPluginLoaders = Record<string, () => Promise<unknown>>;
|
|
40
55
|
type GsapContext = ReturnType<Gsap['context']>;
|
|
@@ -55,7 +70,12 @@ export interface GsapSetupContext extends GsapBundle {
|
|
|
55
70
|
context: GsapContext;
|
|
56
71
|
}
|
|
57
72
|
export interface UseGsapOptions {
|
|
58
|
-
/**
|
|
73
|
+
/**
|
|
74
|
+
* Run setup once the element is this close to the viewport. Default
|
|
75
|
+
* "200px 0px". gsap itself loads at idle regardless (see `whenIdle`), so
|
|
76
|
+
* this only decides when the element's timelines and ScrollTriggers are
|
|
77
|
+
* built.
|
|
78
|
+
*/
|
|
59
79
|
near?: string;
|
|
60
80
|
/** "skip" (default) does nothing under prefers-reduced-motion; "run" lets setup decide. */
|
|
61
81
|
reducedMotion?: 'skip' | 'run';
|
|
@@ -90,7 +110,8 @@ export declare function runGsapSetup(bundle: GsapBundle, el: HTMLElement, plugin
|
|
|
90
110
|
/**
|
|
91
111
|
* Run a GSAP setup against an element, lazily and safely:
|
|
92
112
|
*
|
|
93
|
-
* - gsap loads
|
|
113
|
+
* - gsap loads once per page at idle (`whenIdle`), so it's ready before
|
|
114
|
+
* the visitor gets there; setup runs when the element nears the viewport
|
|
94
115
|
* - setup runs inside `gsap.context(el)`, so selectors are scoped and
|
|
95
116
|
* everything it creates is reverted on unmount (including ScrollTriggers)
|
|
96
117
|
* - plugins beyond ScrollTrigger (SplitText, Flip, MorphSVG) come in through
|
|
@@ -118,6 +139,35 @@ export declare function runGsapSetup(bundle: GsapBundle, el: HTMLElement, plugin
|
|
|
118
139
|
* }, [], { plugins: { SplitText: () => import('gsap/SplitText') } })
|
|
119
140
|
*/
|
|
120
141
|
export declare function useGsap(ref: RefObject<HTMLElement | null>, setup: (ctx: GsapSetupContext) => void | (() => void), deps?: DependencyList, options?: UseGsapOptions): void;
|
|
142
|
+
export interface ScrollInOptions {
|
|
143
|
+
/** ScrollTrigger start that plays the timeline. Default "top 90%". */
|
|
144
|
+
start?: string;
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* A below-the-fold entrance on gsap, with the rules every kit reveal keeps.
|
|
148
|
+
* Call it from a `useGsap` setup (which already skips reduced motion):
|
|
149
|
+
*
|
|
150
|
+
* - an element already on screen when setup runs is left exactly as the
|
|
151
|
+
* server rendered it and `build` never runs, so nothing above the fold
|
|
152
|
+
* animates in;
|
|
153
|
+
* - otherwise `build` fills a paused timeline whose from-states apply now,
|
|
154
|
+
* while the element is still below the fold and unseen, and it plays
|
|
155
|
+
* once the element's top crosses `start`;
|
|
156
|
+
* - a visitor who never scrolls (a headless renderer) gets the finished
|
|
157
|
+
* state after 2.5s through the shared failsafe (./failsafe), callbacks
|
|
158
|
+
* included, so the indexed snapshot never shows a from-state.
|
|
159
|
+
*
|
|
160
|
+
* Returns the failsafe's cancel, for the setup to return as its cleanup.
|
|
161
|
+
* `CountUp` is built on it.
|
|
162
|
+
*
|
|
163
|
+
* @example
|
|
164
|
+
* useGsap(ref, ({ gsap, el }) =>
|
|
165
|
+
* scrollIn(gsap, el, tl => tl.from(el.querySelectorAll('li'), { y: 24, opacity: 0, stagger: 0.06 })),
|
|
166
|
+
* )
|
|
167
|
+
*/
|
|
168
|
+
export declare function scrollIn(gsap: Gsap, el: HTMLElement, build: (tl: GsapTimeline) => void, { start }?: ScrollInOptions): (() => void) | undefined;
|
|
169
|
+
export { CountUp, parseCountUp } from './CountUp';
|
|
170
|
+
export type { CountUpProps, CountUpParts } from './CountUp';
|
|
121
171
|
export interface ExpandCollapseOptions {
|
|
122
172
|
duration?: number;
|
|
123
173
|
ease?: string;
|
|
@@ -134,5 +184,4 @@ export interface ExpandCollapseOptions {
|
|
|
134
184
|
export declare function useExpandCollapse(isOpen: boolean, options?: ExpandCollapseOptions): {
|
|
135
185
|
contentRef: RefObject<HTMLDivElement | null>;
|
|
136
186
|
};
|
|
137
|
-
export {};
|
|
138
187
|
//# sourceMappingURL=gsap.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gsap.d.ts","sourceRoot":"","sources":["../../src/motion/gsap.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"gsap.d.ts","sourceRoot":"","sources":["../../src/motion/gsap.ts"],"names":[],"mappings":"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"}
|
package/dist/motion/gsap.js
CHANGED
|
@@ -1,10 +1,76 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var chunkYZJ22HUQ_js = require('../chunk-YZJ22HUQ.js');
|
|
5
|
+
var chunkAEN7EL6N_js = require('../chunk-AEN7EL6N.js');
|
|
5
6
|
require('../chunk-SNAQBZPT.js');
|
|
6
7
|
var react = require('react');
|
|
8
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
7
9
|
|
|
10
|
+
var NUMBER = /\d{1,3}(?:,\d{3})+(?:\.\d+)?|\d+(?:\.\d+)?/;
|
|
11
|
+
function parseCountUp(text) {
|
|
12
|
+
const match = NUMBER.exec(text);
|
|
13
|
+
if (!match) return null;
|
|
14
|
+
const digits = match[0];
|
|
15
|
+
const value = parseFloat(digits.replace(/,/g, ""));
|
|
16
|
+
if (!Number.isFinite(value)) return null;
|
|
17
|
+
const decimals = digits.includes(".") ? digits.length - digits.indexOf(".") - 1 : 0;
|
|
18
|
+
const useGrouping = digits.includes(",");
|
|
19
|
+
const head = text.slice(0, match.index);
|
|
20
|
+
const tail = text.slice(match.index + digits.length);
|
|
21
|
+
return {
|
|
22
|
+
value,
|
|
23
|
+
format: (n) => head + n.toLocaleString("en-US", {
|
|
24
|
+
minimumFractionDigits: decimals,
|
|
25
|
+
maximumFractionDigits: decimals,
|
|
26
|
+
useGrouping
|
|
27
|
+
}) + tail
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
function CountUp({
|
|
31
|
+
children: text,
|
|
32
|
+
as = "span",
|
|
33
|
+
className,
|
|
34
|
+
id,
|
|
35
|
+
duration = 1.3,
|
|
36
|
+
ease = "power2.out",
|
|
37
|
+
start = "top 90%"
|
|
38
|
+
}) {
|
|
39
|
+
const ref = react.useRef(null);
|
|
40
|
+
const Tag = as;
|
|
41
|
+
useGsap(
|
|
42
|
+
ref,
|
|
43
|
+
({ gsap, el }) => {
|
|
44
|
+
const parts = parseCountUp(text);
|
|
45
|
+
if (!parts) return;
|
|
46
|
+
let live = true;
|
|
47
|
+
const state = { n: 0 };
|
|
48
|
+
const render = () => {
|
|
49
|
+
if (live) el.textContent = parts.format(state.n);
|
|
50
|
+
};
|
|
51
|
+
const restore = () => {
|
|
52
|
+
if (live) el.textContent = text;
|
|
53
|
+
};
|
|
54
|
+
const cancel = scrollIn(
|
|
55
|
+
gsap,
|
|
56
|
+
el,
|
|
57
|
+
(tl) => {
|
|
58
|
+
render();
|
|
59
|
+
tl.to(state, { n: parts.value, duration, ease, onUpdate: render, onComplete: restore });
|
|
60
|
+
},
|
|
61
|
+
{ start }
|
|
62
|
+
);
|
|
63
|
+
return () => {
|
|
64
|
+
live = false;
|
|
65
|
+
cancel?.();
|
|
66
|
+
};
|
|
67
|
+
},
|
|
68
|
+
[text, duration, ease, start]
|
|
69
|
+
);
|
|
70
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Tag, { ref, id, className, "data-sk-countup": "", children: text });
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
// src/motion/gsap.ts
|
|
8
74
|
var pending = null;
|
|
9
75
|
function loadGsap() {
|
|
10
76
|
if (!pending) {
|
|
@@ -17,6 +83,23 @@ function loadGsap() {
|
|
|
17
83
|
}
|
|
18
84
|
return pending;
|
|
19
85
|
}
|
|
86
|
+
var idle = null;
|
|
87
|
+
function whenIdle(timeout = 2e3) {
|
|
88
|
+
if (!idle) {
|
|
89
|
+
idle = new Promise((resolve) => {
|
|
90
|
+
const schedule = () => {
|
|
91
|
+
if (typeof window.requestIdleCallback === "function") {
|
|
92
|
+
window.requestIdleCallback(() => resolve(), { timeout });
|
|
93
|
+
} else {
|
|
94
|
+
setTimeout(resolve, 200);
|
|
95
|
+
}
|
|
96
|
+
};
|
|
97
|
+
if (document.readyState === "complete") schedule();
|
|
98
|
+
else window.addEventListener("load", schedule, { once: true });
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
return idle;
|
|
102
|
+
}
|
|
20
103
|
var pluginCache = /* @__PURE__ */ new Map();
|
|
21
104
|
function pickPlugin(mod, name) {
|
|
22
105
|
const m = mod;
|
|
@@ -54,15 +137,16 @@ function useGsap(ref, setup, deps = [], options = {}) {
|
|
|
54
137
|
react.useEffect(() => {
|
|
55
138
|
const el = ref.current;
|
|
56
139
|
if (!el) return;
|
|
57
|
-
if (reducedMotion === "skip" &&
|
|
140
|
+
if (reducedMotion === "skip" && chunkAEN7EL6N_js.prefersReducedMotion()) return;
|
|
58
141
|
let cancelled = false;
|
|
59
142
|
let cleanup;
|
|
60
143
|
let ctx;
|
|
144
|
+
const ready = whenIdle().then(loadGsap).then(async (bundle) => ({ bundle, plugins: await loadGsapPlugins(bundle.gsap, pluginsRef.current) }));
|
|
61
145
|
const io = new IntersectionObserver(
|
|
62
146
|
([entry]) => {
|
|
63
147
|
if (!entry?.isIntersecting) return;
|
|
64
148
|
io.disconnect();
|
|
65
|
-
|
|
149
|
+
ready.then(({ bundle, plugins }) => {
|
|
66
150
|
if (cancelled || !el.isConnected) return;
|
|
67
151
|
({ context: ctx, cleanup } = runGsapSetup(bundle, el, plugins, setupRef.current));
|
|
68
152
|
});
|
|
@@ -78,6 +162,15 @@ function useGsap(ref, setup, deps = [], options = {}) {
|
|
|
78
162
|
};
|
|
79
163
|
}, [ref, near, reducedMotion, ...deps]);
|
|
80
164
|
}
|
|
165
|
+
function scrollIn(gsap, el, build, { start = "top 90%" } = {}) {
|
|
166
|
+
if (el.getBoundingClientRect().top < window.innerHeight) return void 0;
|
|
167
|
+
const tl = gsap.timeline({ scrollTrigger: { trigger: el, start, once: true } });
|
|
168
|
+
build(tl);
|
|
169
|
+
return chunkYZJ22HUQ_js.onNoScroll(() => {
|
|
170
|
+
tl.scrollTrigger?.kill();
|
|
171
|
+
tl.progress(1);
|
|
172
|
+
});
|
|
173
|
+
}
|
|
81
174
|
function useExpandCollapse(isOpen, options = {}) {
|
|
82
175
|
const { duration = 0.3, ease = "power2.inOut" } = options;
|
|
83
176
|
const contentRef = react.useRef(null);
|
|
@@ -97,7 +190,7 @@ function useExpandCollapse(isOpen, options = {}) {
|
|
|
97
190
|
let cancelled = false;
|
|
98
191
|
loadGsap().then(({ gsap }) => {
|
|
99
192
|
if (cancelled || !el.isConnected) return;
|
|
100
|
-
if (
|
|
193
|
+
if (chunkAEN7EL6N_js.prefersReducedMotion()) {
|
|
101
194
|
gsap.set(el, { height: isOpen ? "auto" : 0, opacity: isOpen ? 1 : 0 });
|
|
102
195
|
el.style.overflow = isOpen ? "visible" : "hidden";
|
|
103
196
|
return;
|
|
@@ -124,10 +217,14 @@ function useExpandCollapse(isOpen, options = {}) {
|
|
|
124
217
|
return { contentRef };
|
|
125
218
|
}
|
|
126
219
|
|
|
220
|
+
exports.CountUp = CountUp;
|
|
127
221
|
exports.loadGsap = loadGsap;
|
|
128
222
|
exports.loadGsapPlugins = loadGsapPlugins;
|
|
223
|
+
exports.parseCountUp = parseCountUp;
|
|
129
224
|
exports.runGsapSetup = runGsapSetup;
|
|
225
|
+
exports.scrollIn = scrollIn;
|
|
130
226
|
exports.useExpandCollapse = useExpandCollapse;
|
|
131
227
|
exports.useGsap = useGsap;
|
|
228
|
+
exports.whenIdle = whenIdle;
|
|
132
229
|
//# sourceMappingURL=gsap.js.map
|
|
133
230
|
//# sourceMappingURL=gsap.js.map
|