motion-brew 0.0.0-stage → 0.1.1
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/LICENSE +21 -0
- package/README.md +106 -2
- package/dist/account-menu.d.ts +1 -0
- package/dist/account-menu.js +16 -0
- package/dist/action-menu.d.ts +1 -0
- package/dist/action-menu.js +10 -0
- package/dist/activity-grid.d.ts +1 -0
- package/dist/activity-grid.js +14 -0
- package/dist/add-card.d.ts +1 -0
- package/dist/add-card.js +11 -0
- package/dist/amount-slider.d.ts +1 -0
- package/dist/amount-slider.js +10 -0
- package/dist/annotation-text.d.ts +1 -0
- package/dist/annotation-text.js +8 -0
- package/dist/aura-card.d.ts +1 -0
- package/dist/aura-card.js +19 -0
- package/dist/auth-card.d.ts +1 -0
- package/dist/auth-card.js +15 -0
- package/dist/avatar-testimonial.d.ts +1 -0
- package/dist/avatar-testimonial.js +8 -0
- package/dist/backspace-text.d.ts +1 -0
- package/dist/backspace-text.js +8 -0
- package/dist/bell-toggle.d.ts +1 -0
- package/dist/bell-toggle.js +8 -0
- package/dist/bill-list.d.ts +1 -0
- package/dist/bill-list.js +15 -0
- package/dist/binary-text.d.ts +1 -0
- package/dist/binary-text.js +8 -0
- package/dist/blur-accordion.d.ts +1 -0
- package/dist/blur-accordion.js +8 -0
- package/dist/blur-text.d.ts +1 -0
- package/dist/blur-text.js +8 -0
- package/dist/booking-card.d.ts +1 -0
- package/dist/booking-card.js +11 -0
- package/dist/brand-bridge.d.ts +1 -0
- package/dist/brand-bridge.js +12 -0
- package/dist/calendar-agenda.d.ts +1 -0
- package/dist/calendar-agenda.js +12 -0
- package/dist/channel-mix.d.ts +1 -0
- package/dist/channel-mix.js +11 -0
- package/dist/chunk-25254AZA.js +141 -0
- package/dist/chunk-2CIJ5TVW.js +59 -0
- package/dist/chunk-2GXY54MP.js +247 -0
- package/dist/chunk-2IMPUH4H.js +135 -0
- package/dist/chunk-2NRXP4HM.js +371 -0
- package/dist/chunk-2QCWELWT.js +120 -0
- package/dist/chunk-2TQSHVXA.js +12 -0
- package/dist/chunk-327TGRS5.js +75 -0
- package/dist/chunk-3B2RYSTL.js +867 -0
- package/dist/chunk-3RKCLFY5.js +634 -0
- package/dist/chunk-4BVCRIR4.js +51 -0
- package/dist/chunk-4CKKTOJK.js +366 -0
- package/dist/chunk-4IGMH34C.js +319 -0
- package/dist/chunk-4PI6UNIZ.js +464 -0
- package/dist/chunk-4RHQKP2P.js +664 -0
- package/dist/chunk-5MP5QNFG.js +560 -0
- package/dist/chunk-62RBYLIN.js +128 -0
- package/dist/chunk-6GAKTS3D.js +329 -0
- package/dist/chunk-6GRDT3OE.js +124 -0
- package/dist/chunk-6JQY7AX5.js +307 -0
- package/dist/chunk-6LOUA6XB.js +237 -0
- package/dist/chunk-6V6OTHNE.js +299 -0
- package/dist/chunk-6VZIT62Q.js +142 -0
- package/dist/chunk-6WSY725U.js +387 -0
- package/dist/chunk-6XSJC7M7.js +764 -0
- package/dist/chunk-75DEIDBX.js +129 -0
- package/dist/chunk-7FQ4XU7E.js +127 -0
- package/dist/chunk-7IL5WRJR.js +615 -0
- package/dist/chunk-7MPC3RUE.js +1462 -0
- package/dist/chunk-7PS2W7PU.js +112 -0
- package/dist/chunk-AATJOPNH.js +86 -0
- package/dist/chunk-ADXWPWJR.js +209 -0
- package/dist/chunk-ANNDITUM.js +47 -0
- package/dist/chunk-AQN6BHWC.js +325 -0
- package/dist/chunk-AVOS73MR.js +537 -0
- package/dist/chunk-B4LNE6YK.js +473 -0
- package/dist/chunk-BHUNLG6S.js +142 -0
- package/dist/chunk-BN4MA5UY.js +127 -0
- package/dist/chunk-BPE43MTT.js +183 -0
- package/dist/chunk-BPF3FQRS.js +590 -0
- package/dist/chunk-BRTZFUFR.js +503 -0
- package/dist/chunk-BS4ZFJKW.js +121 -0
- package/dist/chunk-BXAKCY6X.js +86 -0
- package/dist/chunk-CEQ56RF6.js +129 -0
- package/dist/chunk-CGDKH6BB.js +902 -0
- package/dist/chunk-CMTGYFT7.js +395 -0
- package/dist/chunk-COKBF5PG.js +3291 -0
- package/dist/chunk-DD55JZOI.js +257 -0
- package/dist/chunk-DQUXBNSH.js +412 -0
- package/dist/chunk-DR4DUSNF.js +265 -0
- package/dist/chunk-EDPCK6VU.js +419 -0
- package/dist/chunk-EEQ2WHTN.js +142 -0
- package/dist/chunk-ERVE5RSN.js +793 -0
- package/dist/chunk-FFUBTMDC.js +303 -0
- package/dist/chunk-FK4TZ5OW.js +29 -0
- package/dist/chunk-FXI6NHNR.js +1033 -0
- package/dist/chunk-G3XH7YT2.js +122 -0
- package/dist/chunk-G7KDH7ME.js +559 -0
- package/dist/chunk-GRUDTDLX.js +534 -0
- package/dist/chunk-GUQINNWS.js +770 -0
- package/dist/chunk-GV3Q4D2N.js +320 -0
- package/dist/chunk-GVWOJJ3T.js +129 -0
- package/dist/chunk-GYDTIVOY.js +934 -0
- package/dist/chunk-H2JOCJWM.js +125 -0
- package/dist/chunk-H7XKIWHA.js +135 -0
- package/dist/chunk-HHXK3NAH.js +1382 -0
- package/dist/chunk-HK34LPY6.js +112 -0
- package/dist/chunk-HLJXNSMM.js +320 -0
- package/dist/chunk-HPJJAQ5L.js +406 -0
- package/dist/chunk-HYSXVKZB.js +213 -0
- package/dist/chunk-I45D4XV4.js +124 -0
- package/dist/chunk-I7KTTOOJ.js +113 -0
- package/dist/chunk-IDJOKV6S.js +67 -0
- package/dist/chunk-IGI6OLRX.js +138 -0
- package/dist/chunk-IKM7EEYN.js +117 -0
- package/dist/chunk-INV5FI6O.js +394 -0
- package/dist/chunk-IUBUAIQZ.js +321 -0
- package/dist/chunk-IYZOANPX.js +159 -0
- package/dist/chunk-JFTD3YAL.js +163 -0
- package/dist/chunk-JGEV462J.js +235 -0
- package/dist/chunk-JHT6RCGY.js +127 -0
- package/dist/chunk-JJEWOQYQ.js +141 -0
- package/dist/chunk-JT2EIO5M.js +129 -0
- package/dist/chunk-K3HQEHJ6.js +663 -0
- package/dist/chunk-K6ET254T.js +398 -0
- package/dist/chunk-KE563QS4.js +425 -0
- package/dist/chunk-LBRMNY72.js +159 -0
- package/dist/chunk-LNBTWX4J.js +114 -0
- package/dist/chunk-LS4FP6SI.js +37 -0
- package/dist/chunk-M22UY764.js +135 -0
- package/dist/chunk-M4YMNHPI.js +204 -0
- package/dist/chunk-MGBS5LRY.js +412 -0
- package/dist/chunk-MKJOBHPQ.js +215 -0
- package/dist/chunk-MQDOFNKI.js +818 -0
- package/dist/chunk-MUDKP3LK.js +120 -0
- package/dist/chunk-N4ZNBWKO.js +118 -0
- package/dist/chunk-NB5CB65C.js +137 -0
- package/dist/chunk-NCEAUODT.js +172 -0
- package/dist/chunk-NGX34WJO.js +335 -0
- package/dist/chunk-NIQFSLPC.js +114 -0
- package/dist/chunk-NJWTPRGJ.js +806 -0
- package/dist/chunk-NNKC6NEH.js +128 -0
- package/dist/chunk-NY7M42KC.js +112 -0
- package/dist/chunk-O7G4ISAC.js +277 -0
- package/dist/chunk-O7QYPA6X.js +700 -0
- package/dist/chunk-OEDHLZ4T.js +651 -0
- package/dist/chunk-OGQQ2FZZ.js +114 -0
- package/dist/chunk-OINRQUYT.js +186 -0
- package/dist/chunk-OMJBDFEW.js +506 -0
- package/dist/chunk-ONUWTWKP.js +345 -0
- package/dist/chunk-OS6REIBR.js +154 -0
- package/dist/chunk-OUVP5VKH.js +702 -0
- package/dist/chunk-OVEBMZHA.js +573 -0
- package/dist/chunk-PFEHD3A2.js +409 -0
- package/dist/chunk-PJ5EVDNN.js +157 -0
- package/dist/chunk-PKM6B4JJ.js +108 -0
- package/dist/chunk-PV3OYTMT.js +596 -0
- package/dist/chunk-RBSLSNMW.js +444 -0
- package/dist/chunk-RE74K7KI.js +370 -0
- package/dist/chunk-RP22J4NX.js +247 -0
- package/dist/chunk-RU2Q2XVP.js +287 -0
- package/dist/chunk-RWUARRFZ.js +267 -0
- package/dist/chunk-RZ2UCZ3C.js +212 -0
- package/dist/chunk-SBDTC4UY.js +367 -0
- package/dist/chunk-SKEE23KW.js +137 -0
- package/dist/chunk-SOW7S7ET.js +1103 -0
- package/dist/chunk-SQ7F3VBU.js +1069 -0
- package/dist/chunk-SSWKGVRI.js +172 -0
- package/dist/chunk-T2TSMDP3.js +1022 -0
- package/dist/chunk-TAFVHTWV.js +607 -0
- package/dist/chunk-TNLY4CSA.js +523 -0
- package/dist/chunk-TP3XIHL5.js +787 -0
- package/dist/chunk-TQ6KSDDE.js +682 -0
- package/dist/chunk-TRWXLGL7.js +885 -0
- package/dist/chunk-TTNORJF5.js +908 -0
- package/dist/chunk-UD5OQ2T3.js +117 -0
- package/dist/chunk-UDFBQWUH.js +333 -0
- package/dist/chunk-USRMXCZD.js +625 -0
- package/dist/chunk-VAPHE4G4.js +442 -0
- package/dist/chunk-VEC5QAOY.js +104 -0
- package/dist/chunk-VIR5NV5W.js +118 -0
- package/dist/chunk-VT2FNWQF.js +240 -0
- package/dist/chunk-VX4XEYQN.js +837 -0
- package/dist/chunk-WE7VCUOA.js +130 -0
- package/dist/chunk-WFWO2EIW.js +120 -0
- package/dist/chunk-WGIT4MMH.js +350 -0
- package/dist/chunk-WOR2GMMN.js +114 -0
- package/dist/chunk-WTTDB475.js +54 -0
- package/dist/chunk-WWWKMU4Y.js +184 -0
- package/dist/chunk-XDR4FO6Q.js +124 -0
- package/dist/chunk-XH6YNONO.js +112 -0
- package/dist/chunk-XL4L2J6N.js +129 -0
- package/dist/chunk-Y6MTC46Q.js +684 -0
- package/dist/chunk-YFLQ4HPJ.js +119 -0
- package/dist/chunk-YGONLKWH.js +180 -0
- package/dist/chunk-YLSWBUDC.js +373 -0
- package/dist/chunk-YU6B7YRO.js +128 -0
- package/dist/chunk-YURGXJSP.js +102 -0
- package/dist/chunk-YVYYDPE2.js +124 -0
- package/dist/chunk-ZPGAMYOQ.js +1 -0
- package/dist/chunk-ZWGOAY27.js +234 -0
- package/dist/column-card.d.ts +1 -0
- package/dist/column-card.js +8 -0
- package/dist/components/account-menu/account-menu.d.ts +56 -0
- package/dist/components/account-menu/index.d.ts +1 -0
- package/dist/components/action-menu/action-menu.d.ts +45 -0
- package/dist/components/action-menu/index.d.ts +1 -0
- package/dist/components/activity-grid/activity-grid.d.ts +54 -0
- package/dist/components/activity-grid/index.d.ts +1 -0
- package/dist/components/add-card/add-card.d.ts +41 -0
- package/dist/components/add-card/index.d.ts +1 -0
- package/dist/components/amount-slider/amount-slider.d.ts +43 -0
- package/dist/components/amount-slider/index.d.ts +1 -0
- package/dist/components/annotation-text/annotation-text.d.ts +27 -0
- package/dist/components/annotation-text/index.d.ts +1 -0
- package/dist/components/aura-card/aura-card.d.ts +63 -0
- package/dist/components/aura-card/index.d.ts +1 -0
- package/dist/components/auth-card/auth-card.d.ts +51 -0
- package/dist/components/auth-card/index.d.ts +1 -0
- package/dist/components/avatar-testimonial/avatar-testimonial.d.ts +39 -0
- package/dist/components/avatar-testimonial/index.d.ts +1 -0
- package/dist/components/backspace-text/backspace-text.d.ts +27 -0
- package/dist/components/backspace-text/index.d.ts +1 -0
- package/dist/components/bell-toggle/bell-toggle.d.ts +33 -0
- package/dist/components/bell-toggle/index.d.ts +1 -0
- package/dist/components/bill-list/bill-list.d.ts +49 -0
- package/dist/components/bill-list/index.d.ts +1 -0
- package/dist/components/binary-text/binary-text.d.ts +24 -0
- package/dist/components/binary-text/index.d.ts +1 -0
- package/dist/components/blur-accordion/blur-accordion.d.ts +35 -0
- package/dist/components/blur-accordion/index.d.ts +1 -0
- package/dist/components/blur-text/blur-text.d.ts +33 -0
- package/dist/components/blur-text/index.d.ts +1 -0
- package/dist/components/booking-card/booking-card.d.ts +56 -0
- package/dist/components/booking-card/index.d.ts +1 -0
- package/dist/components/brand-bridge/brand-bridge.d.ts +63 -0
- package/dist/components/brand-bridge/index.d.ts +1 -0
- package/dist/components/calendar-agenda/calendar-agenda.d.ts +64 -0
- package/dist/components/calendar-agenda/index.d.ts +1 -0
- package/dist/components/channel-mix/channel-mix.d.ts +63 -0
- package/dist/components/channel-mix/index.d.ts +1 -0
- package/dist/components/column-card/column-card.d.ts +39 -0
- package/dist/components/column-card/index.d.ts +1 -0
- package/dist/components/contact-card/contact-card.d.ts +44 -0
- package/dist/components/contact-card/index.d.ts +1 -0
- package/dist/components/context-menu/context-menu.d.ts +59 -0
- package/dist/components/context-menu/index.d.ts +1 -0
- package/dist/components/contour-feature-card/contour-feature-card.d.ts +36 -0
- package/dist/components/contour-feature-card/index.d.ts +1 -0
- package/dist/components/contour-lines/contour-lines.d.ts +34 -0
- package/dist/components/contour-lines/index.d.ts +1 -0
- package/dist/components/decay-card/decay-card.d.ts +44 -0
- package/dist/components/decay-card/index.d.ts +1 -0
- package/dist/components/deploy-streak/deploy-streak.d.ts +30 -0
- package/dist/components/deploy-streak/index.d.ts +1 -0
- package/dist/components/depth-carousel/depth-carousel.d.ts +42 -0
- package/dist/components/depth-carousel/index.d.ts +1 -0
- package/dist/components/device-traffic/device-traffic.d.ts +59 -0
- package/dist/components/device-traffic/index.d.ts +1 -0
- package/dist/components/download-button/download-button.d.ts +36 -0
- package/dist/components/download-button/index.d.ts +1 -0
- package/dist/components/event-card/event-card.d.ts +55 -0
- package/dist/components/event-card/index.d.ts +1 -0
- package/dist/components/file-drop/file-drop.d.ts +46 -0
- package/dist/components/file-drop/index.d.ts +1 -0
- package/dist/components/flip-words/flip-words.d.ts +26 -0
- package/dist/components/flip-words/index.d.ts +1 -0
- package/dist/components/flux-card/flux-card.d.ts +56 -0
- package/dist/components/flux-card/index.d.ts +1 -0
- package/dist/components/fuse-button/fuse-button.d.ts +75 -0
- package/dist/components/fuse-button/index.d.ts +1 -0
- package/dist/components/globe-card/globe-card.d.ts +46 -0
- package/dist/components/globe-card/index.d.ts +1 -0
- package/dist/components/goal-gauge/goal-gauge.d.ts +47 -0
- package/dist/components/goal-gauge/index.d.ts +1 -0
- package/dist/components/gradient-card/gradient-card.d.ts +56 -0
- package/dist/components/gradient-card/index.d.ts +1 -0
- package/dist/components/gradient-text/gradient-text.d.ts +22 -0
- package/dist/components/gradient-text/index.d.ts +1 -0
- package/dist/components/gravity-tag-pile/gravity-tag-pile.d.ts +69 -0
- package/dist/components/gravity-tag-pile/index.d.ts +1 -0
- package/dist/components/growth-stream/growth-stream.d.ts +47 -0
- package/dist/components/growth-stream/index.d.ts +1 -0
- package/dist/components/highlight-text/highlight-text.d.ts +22 -0
- package/dist/components/highlight-text/index.d.ts +1 -0
- package/dist/components/hold-to-confirm/hold-to-confirm.d.ts +32 -0
- package/dist/components/hold-to-confirm/index.d.ts +1 -0
- package/dist/components/infinite-gallery/index.d.ts +1 -0
- package/dist/components/infinite-gallery/infinite-gallery.d.ts +73 -0
- package/dist/components/integration-hub/index.d.ts +1 -0
- package/dist/components/integration-hub/integration-hub.d.ts +40 -0
- package/dist/components/liquid-card/index.d.ts +1 -0
- package/dist/components/liquid-card/liquid-card.d.ts +66 -0
- package/dist/components/liquid-metal-card/index.d.ts +1 -0
- package/dist/components/liquid-metal-card/liquid-metal-card.d.ts +45 -0
- package/dist/components/liquid-tabs/index.d.ts +1 -0
- package/dist/components/liquid-tabs/liquid-tabs.d.ts +47 -0
- package/dist/components/magnetic-button/index.d.ts +1 -0
- package/dist/components/magnetic-button/magnetic-button.d.ts +46 -0
- package/dist/components/magnetic-flow/index.d.ts +1 -0
- package/dist/components/magnetic-flow/magnetic-flow.d.ts +35 -0
- package/dist/components/message-composer/index.d.ts +1 -0
- package/dist/components/message-composer/message-composer.d.ts +79 -0
- package/dist/components/metal-card-stack/index.d.ts +1 -0
- package/dist/components/metal-card-stack/metal-card-stack.d.ts +49 -0
- package/dist/components/metric-split/index.d.ts +1 -0
- package/dist/components/metric-split/metric-split.d.ts +45 -0
- package/dist/components/mix-chart/index.d.ts +1 -0
- package/dist/components/mix-chart/mix-chart.d.ts +59 -0
- package/dist/components/month-calendar/index.d.ts +1 -0
- package/dist/components/month-calendar/month-calendar.d.ts +34 -0
- package/dist/components/morph-search/index.d.ts +1 -0
- package/dist/components/morph-search/morph-search.d.ts +33 -0
- package/dist/components/orbit-card/index.d.ts +1 -0
- package/dist/components/orbit-card/orbit-card.d.ts +50 -0
- package/dist/components/otp-code/index.d.ts +1 -0
- package/dist/components/otp-code/otp-code.d.ts +61 -0
- package/dist/components/particle-card/index.d.ts +1 -0
- package/dist/components/particle-card/particle-card.d.ts +57 -0
- package/dist/components/payment-form/index.d.ts +1 -0
- package/dist/components/payment-form/payment-form.d.ts +54 -0
- package/dist/components/pill-tabs/index.d.ts +1 -0
- package/dist/components/pill-tabs/pill-tabs.d.ts +39 -0
- package/dist/components/pixel-blast/index.d.ts +1 -0
- package/dist/components/pixel-blast/pixel-blast.d.ts +41 -0
- package/dist/components/pixel-feature-card/index.d.ts +1 -0
- package/dist/components/pixel-feature-card/pixel-feature-card.d.ts +43 -0
- package/dist/components/pixel-scroll/index.d.ts +1 -0
- package/dist/components/pixel-scroll/pixel-scroll.d.ts +64 -0
- package/dist/components/pricing-card/index.d.ts +1 -0
- package/dist/components/pricing-card/pricing-card.d.ts +60 -0
- package/dist/components/prism-carousel/index.d.ts +1 -0
- package/dist/components/prism-carousel/prism-carousel.d.ts +54 -0
- package/dist/components/prism-flow/index.d.ts +1 -0
- package/dist/components/prism-flow/prism-flow.d.ts +41 -0
- package/dist/components/privacy-banner/index.d.ts +1 -0
- package/dist/components/privacy-banner/privacy-banner.d.ts +41 -0
- package/dist/components/profile-card/index.d.ts +1 -0
- package/dist/components/profile-card/profile-card.d.ts +52 -0
- package/dist/components/profile-menu/index.d.ts +1 -0
- package/dist/components/profile-menu/profile-menu.d.ts +43 -0
- package/dist/components/project-index/index.d.ts +1 -0
- package/dist/components/project-index/project-index.d.ts +65 -0
- package/dist/components/prompt-input/index.d.ts +1 -0
- package/dist/components/prompt-input/prompt-input.d.ts +49 -0
- package/dist/components/quota-gauge/index.d.ts +1 -0
- package/dist/components/quota-gauge/quota-gauge.d.ts +30 -0
- package/dist/components/range-chart/index.d.ts +1 -0
- package/dist/components/range-chart/range-chart.d.ts +47 -0
- package/dist/components/reaction-card/index.d.ts +1 -0
- package/dist/components/reaction-card/reaction-card.d.ts +60 -0
- package/dist/components/recap-card/index.d.ts +1 -0
- package/dist/components/recap-card/recap-card.d.ts +61 -0
- package/dist/components/receipt-button/index.d.ts +1 -0
- package/dist/components/receipt-button/receipt-button.d.ts +53 -0
- package/dist/components/ribbon-gallery/index.d.ts +1 -0
- package/dist/components/ribbon-gallery/ribbon-gallery.d.ts +61 -0
- package/dist/components/roadmap-card/index.d.ts +1 -0
- package/dist/components/roadmap-card/roadmap-card.d.ts +38 -0
- package/dist/components/rolling-card-stack/index.d.ts +1 -0
- package/dist/components/rolling-card-stack/rolling-card-stack.d.ts +53 -0
- package/dist/components/rolling-stepper/index.d.ts +1 -0
- package/dist/components/rolling-stepper/rolling-stepper.d.ts +33 -0
- package/dist/components/rotating-text/index.d.ts +1 -0
- package/dist/components/rotating-text/rotating-text.d.ts +25 -0
- package/dist/components/score-card/index.d.ts +1 -0
- package/dist/components/score-card/score-card.d.ts +40 -0
- package/dist/components/search-modal/index.d.ts +1 -0
- package/dist/components/search-modal/search-modal.d.ts +62 -0
- package/dist/components/shimmer-text/index.d.ts +1 -0
- package/dist/components/shimmer-text/shimmer-text.d.ts +22 -0
- package/dist/components/sidebar-nav/index.d.ts +1 -0
- package/dist/components/sidebar-nav/sidebar-nav.d.ts +71 -0
- package/dist/components/slide-commit/index.d.ts +1 -0
- package/dist/components/slide-commit/slide-commit.d.ts +39 -0
- package/dist/components/spatial-gallery/index.d.ts +1 -0
- package/dist/components/spatial-gallery/spatial-gallery.d.ts +88 -0
- package/dist/components/spending-meter/index.d.ts +1 -0
- package/dist/components/spending-meter/spending-meter.d.ts +41 -0
- package/dist/components/tab-bar/index.d.ts +1 -0
- package/dist/components/tab-bar/tab-bar.d.ts +44 -0
- package/dist/components/team-member-card/index.d.ts +1 -0
- package/dist/components/team-member-card/team-member-card.d.ts +66 -0
- package/dist/components/team-morph/index.d.ts +1 -0
- package/dist/components/team-morph/team-morph.d.ts +38 -0
- package/dist/components/tilt-card/index.d.ts +1 -0
- package/dist/components/tilt-card/tilt-card.d.ts +27 -0
- package/dist/components/tilt-carousel/index.d.ts +1 -0
- package/dist/components/tilt-carousel/tilt-carousel.d.ts +43 -0
- package/dist/components/toast-stack/index.d.ts +1 -0
- package/dist/components/toast-stack/toast-stack.d.ts +57 -0
- package/dist/components/usage-ring/index.d.ts +1 -0
- package/dist/components/usage-ring/usage-ring.d.ts +40 -0
- package/dist/components/verify-flow/index.d.ts +1 -0
- package/dist/components/verify-flow/verify-flow.d.ts +49 -0
- package/dist/components/voice-prompt/index.d.ts +1 -0
- package/dist/components/voice-prompt/voice-prompt.d.ts +55 -0
- package/dist/components/wallet-card/index.d.ts +1 -0
- package/dist/components/wallet-card/wallet-card.d.ts +54 -0
- package/dist/components/wave-text/index.d.ts +1 -0
- package/dist/components/wave-text/wave-text.d.ts +27 -0
- package/dist/contact-card.d.ts +1 -0
- package/dist/contact-card.js +12 -0
- package/dist/context-menu.d.ts +1 -0
- package/dist/context-menu.js +17 -0
- package/dist/contour-feature-card.d.ts +1 -0
- package/dist/contour-feature-card.js +9 -0
- package/dist/contour-lines.d.ts +1 -0
- package/dist/contour-lines.js +8 -0
- package/dist/decay-card.d.ts +1 -0
- package/dist/decay-card.js +8 -0
- package/dist/deploy-streak.d.ts +1 -0
- package/dist/deploy-streak.js +9 -0
- package/dist/depth-carousel.d.ts +1 -0
- package/dist/depth-carousel.js +8 -0
- package/dist/device-traffic.d.ts +1 -0
- package/dist/device-traffic.js +12 -0
- package/dist/download-button.d.ts +1 -0
- package/dist/download-button.js +8 -0
- package/dist/event-card.d.ts +1 -0
- package/dist/event-card.js +12 -0
- package/dist/file-drop.d.ts +1 -0
- package/dist/file-drop.js +12 -0
- package/dist/flip-words.d.ts +1 -0
- package/dist/flip-words.js +8 -0
- package/dist/flux-card.d.ts +1 -0
- package/dist/flux-card.js +13 -0
- package/dist/fuse-button.d.ts +1 -0
- package/dist/fuse-button.js +9 -0
- package/dist/globe-card.d.ts +1 -0
- package/dist/globe-card.js +8 -0
- package/dist/goal-gauge.d.ts +1 -0
- package/dist/goal-gauge.js +9 -0
- package/dist/gradient-card.d.ts +1 -0
- package/dist/gradient-card.js +8 -0
- package/dist/gradient-text.d.ts +1 -0
- package/dist/gradient-text.js +8 -0
- package/dist/gravity-tag-pile.d.ts +1 -0
- package/dist/gravity-tag-pile.js +9 -0
- package/dist/growth-stream.d.ts +1 -0
- package/dist/growth-stream.js +10 -0
- package/dist/highlight-text.d.ts +1 -0
- package/dist/highlight-text.js +8 -0
- package/dist/hold-to-confirm.d.ts +1 -0
- package/dist/hold-to-confirm.js +8 -0
- package/dist/icons/activity.d.ts +15 -0
- package/dist/icons/archive.d.ts +15 -0
- package/dist/icons/arrow-down-right.d.ts +15 -0
- package/dist/icons/arrow-down.d.ts +15 -0
- package/dist/icons/arrow-right.d.ts +15 -0
- package/dist/icons/arrow-up-right.d.ts +15 -0
- package/dist/icons/arrow-up.d.ts +15 -0
- package/dist/icons/at-sign.d.ts +15 -0
- package/dist/icons/attach-file.d.ts +15 -0
- package/dist/icons/badge-alert.d.ts +15 -0
- package/dist/icons/bell.d.ts +15 -0
- package/dist/icons/bold.d.ts +15 -0
- package/dist/icons/bookmark.d.ts +15 -0
- package/dist/icons/bot.d.ts +15 -0
- package/dist/icons/calendar-check-2.d.ts +15 -0
- package/dist/icons/calendar-check.d.ts +15 -0
- package/dist/icons/calendar-days.d.ts +15 -0
- package/dist/icons/chart-line.d.ts +15 -0
- package/dist/icons/chart-pie.d.ts +15 -0
- package/dist/icons/check.d.ts +15 -0
- package/dist/icons/chevron-down.d.ts +15 -0
- package/dist/icons/chevron-left.d.ts +15 -0
- package/dist/icons/chevron-right.d.ts +15 -0
- package/dist/icons/circle-check.d.ts +15 -0
- package/dist/icons/circle-dollar-sign.d.ts +15 -0
- package/dist/icons/clipboard-check.d.ts +15 -0
- package/dist/icons/clock.d.ts +15 -0
- package/dist/icons/cloud-upload.d.ts +15 -0
- package/dist/icons/compass.d.ts +15 -0
- package/dist/icons/contrast.d.ts +15 -0
- package/dist/icons/copy.d.ts +15 -0
- package/dist/icons/credit-card.d.ts +15 -0
- package/dist/icons/delete.d.ts +15 -0
- package/dist/icons/download.d.ts +15 -0
- package/dist/icons/dribbble.d.ts +15 -0
- package/dist/icons/earth.d.ts +15 -0
- package/dist/icons/eye-off.d.ts +15 -0
- package/dist/icons/eye.d.ts +15 -0
- package/dist/icons/feather.d.ts +15 -0
- package/dist/icons/figma.d.ts +15 -0
- package/dist/icons/file-text.d.ts +16 -0
- package/dist/icons/flame.d.ts +15 -0
- package/dist/icons/folder-input.d.ts +15 -0
- package/dist/icons/folder-open.d.ts +15 -0
- package/dist/icons/folders.d.ts +15 -0
- package/dist/icons/github.d.ts +15 -0
- package/dist/icons/hand-coins.d.ts +15 -0
- package/dist/icons/heart.d.ts +15 -0
- package/dist/icons/history.d.ts +15 -0
- package/dist/icons/home.d.ts +15 -0
- package/dist/icons/hourglass.d.ts +15 -0
- package/dist/icons/instagram.d.ts +15 -0
- package/dist/icons/italic.d.ts +15 -0
- package/dist/icons/layout-grid.d.ts +15 -0
- package/dist/icons/link.d.ts +15 -0
- package/dist/icons/linkedin.d.ts +15 -0
- package/dist/icons/loader-circle.d.ts +15 -0
- package/dist/icons/lock-keyhole-open.d.ts +15 -0
- package/dist/icons/lock-keyhole.d.ts +15 -0
- package/dist/icons/lock.d.ts +15 -0
- package/dist/icons/logout.d.ts +15 -0
- package/dist/icons/mail-check.d.ts +15 -0
- package/dist/icons/map-pin.d.ts +15 -0
- package/dist/icons/message-circle.d.ts +15 -0
- package/dist/icons/mic.d.ts +15 -0
- package/dist/icons/monitor-check.d.ts +15 -0
- package/dist/icons/moon.d.ts +15 -0
- package/dist/icons/palette.d.ts +15 -0
- package/dist/icons/panel-left-close.d.ts +15 -0
- package/dist/icons/panel-left-open.d.ts +15 -0
- package/dist/icons/plug-zap.d.ts +15 -0
- package/dist/icons/plus.d.ts +15 -0
- package/dist/icons/radio.d.ts +15 -0
- package/dist/icons/receipt.d.ts +15 -0
- package/dist/icons/refresh-cw.d.ts +15 -0
- package/dist/icons/rotate-ccw.d.ts +15 -0
- package/dist/icons/search.d.ts +15 -0
- package/dist/icons/send.d.ts +15 -0
- package/dist/icons/settings.d.ts +15 -0
- package/dist/icons/shield-check.d.ts +15 -0
- package/dist/icons/smartphone-nfc.d.ts +15 -0
- package/dist/icons/smile.d.ts +15 -0
- package/dist/icons/sparkles.d.ts +15 -0
- package/dist/icons/square-pen.d.ts +15 -0
- package/dist/icons/sun.d.ts +15 -0
- package/dist/icons/terminal.d.ts +15 -0
- package/dist/icons/timer.d.ts +15 -0
- package/dist/icons/trending-up.d.ts +15 -0
- package/dist/icons/twitter.d.ts +15 -0
- package/dist/icons/underline.d.ts +15 -0
- package/dist/icons/undo.d.ts +15 -0
- package/dist/icons/user-check.d.ts +15 -0
- package/dist/icons/user-plus.d.ts +15 -0
- package/dist/icons/user-round-plus.d.ts +15 -0
- package/dist/icons/user.d.ts +15 -0
- package/dist/icons/users.d.ts +15 -0
- package/dist/icons/wifi.d.ts +15 -0
- package/dist/icons/workflow.d.ts +15 -0
- package/dist/icons/x.d.ts +15 -0
- package/dist/icons/zap.d.ts +15 -0
- package/dist/index.d.ts +100 -0
- package/dist/index.js +472 -0
- package/dist/infinite-gallery.d.ts +1 -0
- package/dist/infinite-gallery.js +9 -0
- package/dist/integration-hub.d.ts +1 -0
- package/dist/integration-hub.js +8 -0
- package/dist/lib/cn.d.ts +3 -0
- package/dist/liquid-card.d.ts +1 -0
- package/dist/liquid-card.js +10 -0
- package/dist/liquid-metal-card.d.ts +1 -0
- package/dist/liquid-metal-card.js +8 -0
- package/dist/liquid-tabs.d.ts +1 -0
- package/dist/liquid-tabs.js +14 -0
- package/dist/magnetic-button.d.ts +1 -0
- package/dist/magnetic-button.js +8 -0
- package/dist/magnetic-flow.d.ts +1 -0
- package/dist/magnetic-flow.js +8 -0
- package/dist/message-composer.d.ts +1 -0
- package/dist/message-composer.js +20 -0
- package/dist/metal-card-stack.d.ts +1 -0
- package/dist/metal-card-stack.js +8 -0
- package/dist/metric-split.d.ts +1 -0
- package/dist/metric-split.js +9 -0
- package/dist/mix-chart.d.ts +1 -0
- package/dist/mix-chart.js +9 -0
- package/dist/month-calendar.d.ts +1 -0
- package/dist/month-calendar.js +10 -0
- package/dist/morph-search.d.ts +1 -0
- package/dist/morph-search.js +10 -0
- package/dist/orbit-card.d.ts +1 -0
- package/dist/orbit-card.js +8 -0
- package/dist/otp-code.d.ts +1 -0
- package/dist/otp-code.js +17 -0
- package/dist/particle-card.d.ts +1 -0
- package/dist/particle-card.js +8 -0
- package/dist/payment-form.d.ts +1 -0
- package/dist/payment-form.js +8 -0
- package/dist/pill-tabs.d.ts +1 -0
- package/dist/pill-tabs.js +9 -0
- package/dist/pixel-blast.d.ts +1 -0
- package/dist/pixel-blast.js +8 -0
- package/dist/pixel-feature-card.d.ts +1 -0
- package/dist/pixel-feature-card.js +9 -0
- package/dist/pixel-scroll.d.ts +1 -0
- package/dist/pixel-scroll.js +8 -0
- package/dist/pricing-card.d.ts +1 -0
- package/dist/pricing-card.js +14 -0
- package/dist/prism-carousel.d.ts +1 -0
- package/dist/prism-carousel.js +8 -0
- package/dist/prism-flow.d.ts +1 -0
- package/dist/prism-flow.js +8 -0
- package/dist/privacy-banner.d.ts +1 -0
- package/dist/privacy-banner.js +8 -0
- package/dist/profile-card.d.ts +1 -0
- package/dist/profile-card.js +13 -0
- package/dist/profile-menu.d.ts +1 -0
- package/dist/profile-menu.js +21 -0
- package/dist/project-index.d.ts +1 -0
- package/dist/project-index.js +9 -0
- package/dist/prompt-input.d.ts +1 -0
- package/dist/prompt-input.js +14 -0
- package/dist/quota-gauge.d.ts +1 -0
- package/dist/quota-gauge.js +9 -0
- package/dist/range-chart.d.ts +1 -0
- package/dist/range-chart.js +8 -0
- package/dist/reaction-card.d.ts +1 -0
- package/dist/reaction-card.js +8 -0
- package/dist/recap-card.d.ts +1 -0
- package/dist/recap-card.js +15 -0
- package/dist/receipt-button.d.ts +1 -0
- package/dist/receipt-button.js +8 -0
- package/dist/ribbon-gallery.d.ts +1 -0
- package/dist/ribbon-gallery.js +8 -0
- package/dist/roadmap-card.d.ts +1 -0
- package/dist/roadmap-card.js +11 -0
- package/dist/rolling-card-stack.d.ts +1 -0
- package/dist/rolling-card-stack.js +8 -0
- package/dist/rolling-stepper.d.ts +1 -0
- package/dist/rolling-stepper.js +8 -0
- package/dist/rotating-text.d.ts +1 -0
- package/dist/rotating-text.js +9 -0
- package/dist/score-card.d.ts +1 -0
- package/dist/score-card.js +10 -0
- package/dist/search-modal.d.ts +1 -0
- package/dist/search-modal.js +16 -0
- package/dist/shimmer-text.d.ts +1 -0
- package/dist/shimmer-text.js +8 -0
- package/dist/sidebar-nav.d.ts +1 -0
- package/dist/sidebar-nav.js +19 -0
- package/dist/slide-commit.d.ts +1 -0
- package/dist/slide-commit.js +9 -0
- package/dist/spatial-gallery.d.ts +1 -0
- package/dist/spatial-gallery.js +8 -0
- package/dist/spending-meter.d.ts +1 -0
- package/dist/spending-meter.js +9 -0
- package/dist/tab-bar.d.ts +1 -0
- package/dist/tab-bar.js +18 -0
- package/dist/team-member-card.d.ts +1 -0
- package/dist/team-member-card.js +14 -0
- package/dist/team-morph.d.ts +1 -0
- package/dist/team-morph.js +11 -0
- package/dist/tilt-card.d.ts +1 -0
- package/dist/tilt-card.js +8 -0
- package/dist/tilt-carousel.d.ts +1 -0
- package/dist/tilt-carousel.js +8 -0
- package/dist/toast-stack.d.ts +1 -0
- package/dist/toast-stack.js +13 -0
- package/dist/usage-ring.d.ts +1 -0
- package/dist/usage-ring.js +9 -0
- package/dist/verify-flow.d.ts +1 -0
- package/dist/verify-flow.js +10 -0
- package/dist/voice-prompt.d.ts +1 -0
- package/dist/voice-prompt.js +14 -0
- package/dist/wallet-card.d.ts +1 -0
- package/dist/wallet-card.js +15 -0
- package/dist/wave-text.d.ts +1 -0
- package/dist/wave-text.js +8 -0
- package/package.json +111 -4
|
@@ -0,0 +1,366 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
cn
|
|
4
|
+
} from "./chunk-2TQSHVXA.js";
|
|
5
|
+
|
|
6
|
+
// src/components/ribbon-gallery/ribbon-gallery.tsx
|
|
7
|
+
import * as React from "react";
|
|
8
|
+
import { useAnimationFrame, useReducedMotion } from "motion/react";
|
|
9
|
+
import { ArrowRight } from "lucide-react";
|
|
10
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
11
|
+
var photo = (id) => `https://images.unsplash.com/photo-${id}?w=1040&h=1280&fit=crop&q=80`;
|
|
12
|
+
var DEFAULT_ITEMS = [
|
|
13
|
+
{ src: photo("1470071459604-3b5ec3a7fe05"), title: "Soft Signal" },
|
|
14
|
+
{ src: photo("1505144808419-1957a94ca61e"), title: "Tide Lines" },
|
|
15
|
+
{ src: photo("1475924156734-496f6cac6ec1"), title: "Afterglow" },
|
|
16
|
+
{ src: photo("1500534314209-a25ddb2bd429"), title: "Paper Dunes" },
|
|
17
|
+
{ src: photo("1494500764479-0c8f2919a3d8"), title: "Night Bloom" },
|
|
18
|
+
{ src: photo("1490750967868-88aa4486c946"), title: "Glass Garden" },
|
|
19
|
+
{ src: photo("1519681393784-d120267933ba"), title: "Low Orbit" },
|
|
20
|
+
{ src: photo("1508739773434-c26b3d09e071"), title: "Velvet Hour" }
|
|
21
|
+
];
|
|
22
|
+
var SLICES = 20;
|
|
23
|
+
var PERSPECTIVE = 1400;
|
|
24
|
+
var OVERLAP = 2;
|
|
25
|
+
var TITLE_SLICE = 2;
|
|
26
|
+
var SUPERSAMPLE = 2;
|
|
27
|
+
var mod = (a, n) => (a % n + n) % n;
|
|
28
|
+
var RibbonGallery = React.forwardRef(function RibbonGallery2({
|
|
29
|
+
items = DEFAULT_ITEMS,
|
|
30
|
+
angle = 20,
|
|
31
|
+
curve = 0.45,
|
|
32
|
+
cardWidth = 230,
|
|
33
|
+
cardHeight = 290,
|
|
34
|
+
gap = 14,
|
|
35
|
+
drift = 30,
|
|
36
|
+
momentum = 0.65,
|
|
37
|
+
wave = 1,
|
|
38
|
+
blur = 9.5,
|
|
39
|
+
intro = true,
|
|
40
|
+
wheel = true,
|
|
41
|
+
dim = 0.75,
|
|
42
|
+
dimColor = "rgb(245 245 245)",
|
|
43
|
+
label = "Project ribbon",
|
|
44
|
+
className
|
|
45
|
+
}, forwardedRef) {
|
|
46
|
+
const still = !!useReducedMotion();
|
|
47
|
+
const root = React.useRef(null);
|
|
48
|
+
React.useImperativeHandle(forwardedRef, () => root.current);
|
|
49
|
+
const track = React.useRef(null);
|
|
50
|
+
const blurNode = React.useRef(null);
|
|
51
|
+
const slices = React.useRef([]);
|
|
52
|
+
const washes = React.useRef([]);
|
|
53
|
+
const titles = React.useRef([]);
|
|
54
|
+
const arrows = React.useRef([]);
|
|
55
|
+
const uid = React.useId().replace(/[^a-zA-Z0-9]/g, "");
|
|
56
|
+
const [view, setView] = React.useState({ w: 0, h: 0 });
|
|
57
|
+
const cam = React.useRef({ x: 0, tx: 0, v: 0, time: 0, phase: 0 });
|
|
58
|
+
const band = React.useRef({ x: 0, v: 0 });
|
|
59
|
+
const drag = React.useRef(null);
|
|
60
|
+
const swallowClick = React.useRef(false);
|
|
61
|
+
const hovering = React.useRef(false);
|
|
62
|
+
const hovered = React.useRef(null);
|
|
63
|
+
const focus = React.useRef([]);
|
|
64
|
+
const settled = React.useRef([]);
|
|
65
|
+
const written = React.useRef([]);
|
|
66
|
+
const introAt = React.useRef(null);
|
|
67
|
+
const settings = React.useRef({
|
|
68
|
+
angle,
|
|
69
|
+
drift,
|
|
70
|
+
momentum,
|
|
71
|
+
wave,
|
|
72
|
+
blur,
|
|
73
|
+
dim,
|
|
74
|
+
still
|
|
75
|
+
});
|
|
76
|
+
settings.current = { angle, drift, momentum, wave, blur, dim, still };
|
|
77
|
+
const pitch = cardWidth + gap;
|
|
78
|
+
const sliceW = cardWidth / SLICES;
|
|
79
|
+
const rad = angle * Math.PI / 180;
|
|
80
|
+
const run = view.w ? Math.abs(view.w * Math.cos(rad)) + Math.abs(view.h * Math.sin(rad)) : 0;
|
|
81
|
+
const radius = run ? run / (0.9 + Math.max(0, Math.min(1, curve)) * 2.6) : 1;
|
|
82
|
+
const visibleHalf = Math.min(radius * 1.45, run * 0.9);
|
|
83
|
+
const needed = Math.ceil((2 * visibleHalf + cardWidth) / pitch) + 2;
|
|
84
|
+
const count = run && items.length ? Math.ceil(needed / items.length) * items.length : 0;
|
|
85
|
+
const span = count * pitch;
|
|
86
|
+
React.useLayoutEffect(() => {
|
|
87
|
+
const el = root.current;
|
|
88
|
+
if (!el) return;
|
|
89
|
+
const measure = () => setView({ w: el.clientWidth, h: el.clientHeight });
|
|
90
|
+
measure();
|
|
91
|
+
const ro = new ResizeObserver(measure);
|
|
92
|
+
ro.observe(el);
|
|
93
|
+
return () => ro.disconnect();
|
|
94
|
+
}, []);
|
|
95
|
+
React.useEffect(() => {
|
|
96
|
+
const el = root.current;
|
|
97
|
+
if (!el) return;
|
|
98
|
+
if (!intro || still) {
|
|
99
|
+
introAt.current = -Infinity;
|
|
100
|
+
return;
|
|
101
|
+
}
|
|
102
|
+
const io = new IntersectionObserver(
|
|
103
|
+
([entry]) => {
|
|
104
|
+
if (entry?.isIntersecting && introAt.current === null) {
|
|
105
|
+
introAt.current = performance.now();
|
|
106
|
+
cam.current.x = cam.current.tx + pitch * 3.2;
|
|
107
|
+
io.disconnect();
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
{ threshold: 0.25 }
|
|
111
|
+
);
|
|
112
|
+
io.observe(el);
|
|
113
|
+
return () => io.disconnect();
|
|
114
|
+
}, []);
|
|
115
|
+
React.useEffect(() => {
|
|
116
|
+
const el = root.current;
|
|
117
|
+
if (!el || !wheel) return;
|
|
118
|
+
const onWheel = (e) => {
|
|
119
|
+
e.preventDefault();
|
|
120
|
+
const k = e.deltaMode === 1 ? 32 : 1;
|
|
121
|
+
cam.current.tx -= (Math.abs(e.deltaX) > Math.abs(e.deltaY) ? e.deltaX : e.deltaY) * k;
|
|
122
|
+
};
|
|
123
|
+
el.addEventListener("wheel", onWheel, { passive: false });
|
|
124
|
+
return () => el.removeEventListener("wheel", onWheel);
|
|
125
|
+
}, [wheel]);
|
|
126
|
+
useAnimationFrame((_, delta) => {
|
|
127
|
+
var _a;
|
|
128
|
+
if (!count) return;
|
|
129
|
+
const dt = Math.min(delta, 50) / 1e3;
|
|
130
|
+
const s = settings.current;
|
|
131
|
+
const c = cam.current;
|
|
132
|
+
c.time += dt;
|
|
133
|
+
if (!drag.current) {
|
|
134
|
+
c.tx += c.v * dt;
|
|
135
|
+
c.v *= Math.exp(-dt * (1.5 + (1 - s.momentum) * 10));
|
|
136
|
+
if (!hovering.current && !s.still && s.drift > 0) c.tx -= s.drift * dt;
|
|
137
|
+
}
|
|
138
|
+
const introAge = introAt.current === null ? -1 : (performance.now() - introAt.current) / 1e3;
|
|
139
|
+
if (introAge < 0 && !s.still) {
|
|
140
|
+
if (track.current) track.current.style.opacity = "0";
|
|
141
|
+
return;
|
|
142
|
+
}
|
|
143
|
+
const rate = introAge < 1.6 ? 2.6 + introAge * 4 : 12;
|
|
144
|
+
const px = c.x;
|
|
145
|
+
c.x += (c.tx - c.x) * (s.still ? 1 : 1 - Math.exp(-dt * rate));
|
|
146
|
+
const speed = dt > 0 ? (c.x - px) / dt : 0;
|
|
147
|
+
const b = band.current;
|
|
148
|
+
const K = 160;
|
|
149
|
+
b.v += ((speed - b.x) * K - b.v * 2 * Math.sqrt(K) * 0.45) * dt;
|
|
150
|
+
b.x += b.v * dt;
|
|
151
|
+
const pull = s.still ? 0 : Math.min(1, Math.abs(b.x) / 2200);
|
|
152
|
+
if (track.current) {
|
|
153
|
+
track.current.style.opacity = s.still ? "1" : Math.min(1, Math.max(0, introAge) * 2.5).toFixed(3);
|
|
154
|
+
const sd = s.still || !s.blur ? 0 : Math.min(s.blur, Math.abs(b.x) / 240);
|
|
155
|
+
blurNode.current?.setAttribute("stdDeviation", `${sd.toFixed(2)} 0`);
|
|
156
|
+
track.current.style.filter = sd > 0.05 ? `url(#${uid}-blur)` : "none";
|
|
157
|
+
}
|
|
158
|
+
const amp = s.still ? 0 : (0.4 + pull * 0.55) * s.wave;
|
|
159
|
+
c.phase += dt * (1.2 - Math.max(-3, Math.min(3, b.x / 300)));
|
|
160
|
+
const R = radius;
|
|
161
|
+
const maxPhi = 1.45;
|
|
162
|
+
const focusEase = s.still ? 1 : 1 - Math.exp(-dt * 9);
|
|
163
|
+
for (let k = 0; k < count; k++) {
|
|
164
|
+
const center = mod(k * pitch + c.x + span / 2, span) - span / 2;
|
|
165
|
+
const want = hovered.current === null || hovered.current === k ? 1 : 0;
|
|
166
|
+
const f = ((_a = focus.current)[k] ?? (_a[k] = 1)) + (want - (focus.current[k] ?? 1)) * focusEase;
|
|
167
|
+
focus.current[k] = f;
|
|
168
|
+
const up = (settled.current[k] ?? 0) + ((hovered.current === k ? 1 : 0) - (settled.current[k] ?? 0)) * focusEase;
|
|
169
|
+
settled.current[k] = up;
|
|
170
|
+
const cardAmp = amp * (1 - up);
|
|
171
|
+
const opacity = 1 - (1 - f) * Math.max(0, Math.min(1, s.dim)) * 0.88;
|
|
172
|
+
const writeOpacity = Math.abs((written.current[k] ?? 1) - opacity) > 2e-3;
|
|
173
|
+
if (writeOpacity) written.current[k] = opacity;
|
|
174
|
+
for (let j = 0; j < SLICES; j++) {
|
|
175
|
+
const el = slices.current[k * SLICES + j];
|
|
176
|
+
if (!el) continue;
|
|
177
|
+
const x = center - cardWidth / 2 + (j + 0.5) * sliceW;
|
|
178
|
+
const phi = x / R;
|
|
179
|
+
const depth = R * (1 - Math.cos(phi));
|
|
180
|
+
const hidden = Math.abs(phi) > maxPhi || depth > PERSPECTIVE * 0.7;
|
|
181
|
+
let transform = "";
|
|
182
|
+
if (!hidden) {
|
|
183
|
+
const wobble = Math.sin(phi * 2.4 - c.phase);
|
|
184
|
+
const ty = wobble * 26 * cardAmp;
|
|
185
|
+
const sy = 1 + Math.cos(phi * 1.9 + c.time * 1.2) * 0.1 * cardAmp;
|
|
186
|
+
transform = `translate3d(${(R * Math.sin(phi)).toFixed(2)}px, ${ty.toFixed(2)}px, ${depth.toFixed(2)}px) rotateY(${(-phi).toFixed(4)}rad) scaleY(${sy.toFixed(4)})`;
|
|
187
|
+
el.style.transform = `${transform} scale(${1 / SUPERSAMPLE})`;
|
|
188
|
+
}
|
|
189
|
+
el.style.visibility = hidden ? "hidden" : "visible";
|
|
190
|
+
const wash = washes.current[k * SLICES + j];
|
|
191
|
+
if (writeOpacity && wash) wash.style.opacity = (1 - opacity).toFixed(3);
|
|
192
|
+
const overlay = j === TITLE_SLICE ? titles.current[k] : j === SLICES - 1 ? arrows.current[k] : null;
|
|
193
|
+
if (overlay) {
|
|
194
|
+
overlay.style.visibility = hidden ? "hidden" : "visible";
|
|
195
|
+
if (writeOpacity) overlay.style.opacity = opacity.toFixed(3);
|
|
196
|
+
if (!hidden) overlay.style.transform = transform;
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
});
|
|
201
|
+
return /* @__PURE__ */ jsxs(
|
|
202
|
+
"div",
|
|
203
|
+
{
|
|
204
|
+
ref: root,
|
|
205
|
+
role: "region",
|
|
206
|
+
"aria-label": label,
|
|
207
|
+
"aria-roledescription": "carousel",
|
|
208
|
+
tabIndex: 0,
|
|
209
|
+
onPointerEnter: (e) => e.pointerType === "mouse" && (hovering.current = true),
|
|
210
|
+
onPointerLeave: () => {
|
|
211
|
+
hovering.current = false;
|
|
212
|
+
hovered.current = null;
|
|
213
|
+
},
|
|
214
|
+
onPointerDown: (e) => {
|
|
215
|
+
if (e.button !== 0) return;
|
|
216
|
+
drag.current = {
|
|
217
|
+
id: e.pointerId,
|
|
218
|
+
x: e.clientX,
|
|
219
|
+
y: e.clientY,
|
|
220
|
+
sx: e.clientX,
|
|
221
|
+
sy: e.clientY,
|
|
222
|
+
t: performance.now(),
|
|
223
|
+
moved: false
|
|
224
|
+
};
|
|
225
|
+
cam.current.v = 0;
|
|
226
|
+
swallowClick.current = false;
|
|
227
|
+
},
|
|
228
|
+
onPointerMove: (e) => {
|
|
229
|
+
const d = drag.current;
|
|
230
|
+
if (!d || d.id !== e.pointerId) return;
|
|
231
|
+
const now = performance.now();
|
|
232
|
+
const a = settings.current.angle * Math.PI / 180;
|
|
233
|
+
const along = (e.clientX - d.x) * Math.cos(a) - (e.clientY - d.y) * Math.sin(a);
|
|
234
|
+
if (!d.moved && Math.hypot(e.clientX - d.sx, e.clientY - d.sy) > 5) {
|
|
235
|
+
d.moved = true;
|
|
236
|
+
e.currentTarget.setPointerCapture(e.pointerId);
|
|
237
|
+
}
|
|
238
|
+
cam.current.tx += along;
|
|
239
|
+
cam.current.v = cam.current.v * 0.6 + along / (Math.max(1, now - d.t) / 1e3) * 0.4;
|
|
240
|
+
Object.assign(d, { x: e.clientX, y: e.clientY, t: now });
|
|
241
|
+
},
|
|
242
|
+
onPointerUp: (e) => {
|
|
243
|
+
const d = drag.current;
|
|
244
|
+
if (!d || d.id !== e.pointerId) return;
|
|
245
|
+
if (d.moved) swallowClick.current = true;
|
|
246
|
+
if (performance.now() - d.t > 80 || still) cam.current.v = 0;
|
|
247
|
+
drag.current = null;
|
|
248
|
+
},
|
|
249
|
+
onPointerCancel: () => drag.current = null,
|
|
250
|
+
onKeyDown: (e) => {
|
|
251
|
+
if (e.target !== e.currentTarget) return;
|
|
252
|
+
if (e.key === "ArrowLeft" || e.key === "ArrowUp")
|
|
253
|
+
e.preventDefault(), cam.current.tx += pitch;
|
|
254
|
+
if (e.key === "ArrowRight" || e.key === "ArrowDown")
|
|
255
|
+
e.preventDefault(), cam.current.tx -= pitch;
|
|
256
|
+
},
|
|
257
|
+
className: cn(
|
|
258
|
+
"relative h-[520px] w-full cursor-grab touch-none select-none outline-none active:cursor-grabbing focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-zinc-400",
|
|
259
|
+
className
|
|
260
|
+
),
|
|
261
|
+
children: [
|
|
262
|
+
/* @__PURE__ */ jsx("svg", { "aria-hidden": true, className: "absolute size-0", children: /* @__PURE__ */ jsx("filter", { id: `${uid}-blur`, x: "-10%", y: "-10%", width: "120%", height: "120%", children: /* @__PURE__ */ jsx("feGaussianBlur", { ref: blurNode, stdDeviation: "0 0" }) }) }),
|
|
263
|
+
/* @__PURE__ */ jsx(
|
|
264
|
+
"div",
|
|
265
|
+
{
|
|
266
|
+
ref: track,
|
|
267
|
+
className: "absolute left-1/2 top-1/2 size-0",
|
|
268
|
+
style: {
|
|
269
|
+
transform: `rotate(${-angle}deg)`,
|
|
270
|
+
opacity: 0
|
|
271
|
+
},
|
|
272
|
+
children: Array.from({ length: count }, (_, k) => {
|
|
273
|
+
const item = items[k % items.length];
|
|
274
|
+
const repeat = k >= items.length;
|
|
275
|
+
const Card = item.href ? "a" : "div";
|
|
276
|
+
return /* @__PURE__ */ jsxs(
|
|
277
|
+
Card,
|
|
278
|
+
{
|
|
279
|
+
...item.href ? { href: item.href, draggable: false } : {},
|
|
280
|
+
...repeat ? { "aria-hidden": true, tabIndex: -1 } : { "aria-label": item.alt ?? item.title },
|
|
281
|
+
onClick: (e) => swallowClick.current && e.preventDefault(),
|
|
282
|
+
onDragStart: (e) => e.preventDefault(),
|
|
283
|
+
onPointerEnter: (e) => {
|
|
284
|
+
if (e.pointerType === "mouse" && !drag.current?.moved)
|
|
285
|
+
hovered.current = k;
|
|
286
|
+
},
|
|
287
|
+
onPointerLeave: (e) => {
|
|
288
|
+
if (e.pointerType === "mouse" && hovered.current === k)
|
|
289
|
+
hovered.current = null;
|
|
290
|
+
},
|
|
291
|
+
onFocus: () => hovered.current = k,
|
|
292
|
+
onBlur: () => hovered.current === k && (hovered.current = null),
|
|
293
|
+
className: "group/card absolute left-0 top-0 block outline-none",
|
|
294
|
+
style: { perspective: PERSPECTIVE },
|
|
295
|
+
children: [
|
|
296
|
+
Array.from({ length: SLICES }, (_2, j) => /* @__PURE__ */ jsx(
|
|
297
|
+
"span",
|
|
298
|
+
{
|
|
299
|
+
ref: (el) => void (slices.current[k * SLICES + j] = el),
|
|
300
|
+
className: cn(
|
|
301
|
+
"absolute block bg-zinc-300 will-change-transform dark:bg-zinc-700",
|
|
302
|
+
j === 0 && "rounded-l-[36px]",
|
|
303
|
+
j === SLICES - 1 && "rounded-r-[36px]"
|
|
304
|
+
),
|
|
305
|
+
style: {
|
|
306
|
+
width: (sliceW + OVERLAP * 2) * SUPERSAMPLE,
|
|
307
|
+
height: cardHeight * SUPERSAMPLE,
|
|
308
|
+
left: (-sliceW / 2 - OVERLAP) * SUPERSAMPLE,
|
|
309
|
+
top: -cardHeight / 2 * SUPERSAMPLE,
|
|
310
|
+
backgroundImage: `url("${item.src}")`,
|
|
311
|
+
backgroundSize: `${cardWidth * SUPERSAMPLE}px ${cardHeight * SUPERSAMPLE}px`,
|
|
312
|
+
backgroundPosition: `${(-j * sliceW + OVERLAP) * SUPERSAMPLE}px 0`,
|
|
313
|
+
visibility: "hidden"
|
|
314
|
+
},
|
|
315
|
+
children: /* @__PURE__ */ jsx(
|
|
316
|
+
"span",
|
|
317
|
+
{
|
|
318
|
+
ref: (el) => void (washes.current[k * SLICES + j] = el),
|
|
319
|
+
className: "pointer-events-none absolute inset-0 block rounded-[inherit]",
|
|
320
|
+
style: { background: dimColor, opacity: 0 }
|
|
321
|
+
}
|
|
322
|
+
)
|
|
323
|
+
},
|
|
324
|
+
j
|
|
325
|
+
)),
|
|
326
|
+
/* @__PURE__ */ jsx(
|
|
327
|
+
"span",
|
|
328
|
+
{
|
|
329
|
+
ref: (el) => void (titles.current[k] = el),
|
|
330
|
+
className: "pointer-events-none absolute block whitespace-nowrap text-[14px] font-medium leading-none tracking-tight text-white will-change-transform [text-shadow:0_1px_8px_rgba(0,0,0,0.45)]",
|
|
331
|
+
style: {
|
|
332
|
+
left: -sliceW / 2 - TITLE_SLICE * sliceW + 18,
|
|
333
|
+
top: cardHeight / 2 - 34,
|
|
334
|
+
visibility: "hidden"
|
|
335
|
+
},
|
|
336
|
+
children: item.title
|
|
337
|
+
}
|
|
338
|
+
),
|
|
339
|
+
/* @__PURE__ */ jsx(
|
|
340
|
+
"span",
|
|
341
|
+
{
|
|
342
|
+
ref: (el) => void (arrows.current[k] = el),
|
|
343
|
+
className: "pointer-events-none absolute block will-change-transform",
|
|
344
|
+
style: {
|
|
345
|
+
left: sliceW / 2 - 14 - 28,
|
|
346
|
+
top: cardHeight / 2 - 18 - 28,
|
|
347
|
+
visibility: "hidden"
|
|
348
|
+
},
|
|
349
|
+
children: /* @__PURE__ */ jsx("span", { className: "grid size-7 place-items-center rounded-full bg-white text-zinc-900 transition-transform duration-300 ease-[cubic-bezier(0.22,1,0.36,1)] group-hover/card:scale-[1.18]", children: /* @__PURE__ */ jsx(ArrowRight, { className: "size-3.5", strokeWidth: 2.5 }) })
|
|
350
|
+
}
|
|
351
|
+
)
|
|
352
|
+
]
|
|
353
|
+
},
|
|
354
|
+
k
|
|
355
|
+
);
|
|
356
|
+
})
|
|
357
|
+
}
|
|
358
|
+
)
|
|
359
|
+
]
|
|
360
|
+
}
|
|
361
|
+
);
|
|
362
|
+
});
|
|
363
|
+
|
|
364
|
+
export {
|
|
365
|
+
RibbonGallery
|
|
366
|
+
};
|
|
@@ -0,0 +1,319 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
cn
|
|
4
|
+
} from "./chunk-2TQSHVXA.js";
|
|
5
|
+
|
|
6
|
+
// src/components/pixel-blast/pixel-blast.tsx
|
|
7
|
+
import * as React from "react";
|
|
8
|
+
import { useInView, useReducedMotion } from "motion/react";
|
|
9
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
|
+
var BAYER = [0, 8, 2, 10, 12, 4, 14, 6, 3, 11, 1, 9, 15, 7, 13, 5].map(
|
|
11
|
+
(v) => (v + 0.5) / 16
|
|
12
|
+
);
|
|
13
|
+
var hash = (x, y) => {
|
|
14
|
+
let h = Math.imul(x, 374761393) + Math.imul(y, 668265263);
|
|
15
|
+
h = Math.imul(h ^ h >>> 13, 1274126177);
|
|
16
|
+
return ((h ^ h >>> 16) >>> 0) / 4294967295;
|
|
17
|
+
};
|
|
18
|
+
var smooth = (t) => t * t * (3 - 2 * t);
|
|
19
|
+
var noise = (x, y) => {
|
|
20
|
+
const ix = Math.floor(x);
|
|
21
|
+
const iy = Math.floor(y);
|
|
22
|
+
const fx = smooth(x - ix);
|
|
23
|
+
const fy = smooth(y - iy);
|
|
24
|
+
const a = hash(ix, iy);
|
|
25
|
+
const b = hash(ix + 1, iy);
|
|
26
|
+
const c = hash(ix, iy + 1);
|
|
27
|
+
const d = hash(ix + 1, iy + 1);
|
|
28
|
+
return a + (b - a) * fx + (c - a) * fy + (a - b - c + d) * fx * fy;
|
|
29
|
+
};
|
|
30
|
+
var fbm = (x, y) => noise(x, y) * 0.6 + noise(x * 2.1, y * 2.1) * 0.3 + noise(x * 4.3, y * 4.3) * 0.1;
|
|
31
|
+
var CLOUDS = [
|
|
32
|
+
{ ax: 0.42, ay: 0.36, fx: 0.23, fy: 0.17, px: 0, py: 1.2, r: 0.2 },
|
|
33
|
+
{ ax: 0.46, ay: 0.4, fx: 0.15, fy: 0.21, px: 2.4, py: 4.1, r: 0.17 },
|
|
34
|
+
{ ax: 0.38, ay: 0.44, fx: 0.19, fy: 0.13, px: 4.6, py: 0.4, r: 0.15 }
|
|
35
|
+
];
|
|
36
|
+
var REVEAL = 1.5;
|
|
37
|
+
var STEPS = [0, 0, 0.16, 0.26, 0.38, 0.5, 0.62, 0.74, 0.86];
|
|
38
|
+
var band = (lo, hi, v) => smooth(Math.min(1, Math.max(0, (v - lo) / (hi - lo))));
|
|
39
|
+
function PixelField({
|
|
40
|
+
color,
|
|
41
|
+
cell,
|
|
42
|
+
shape,
|
|
43
|
+
speed,
|
|
44
|
+
coverage,
|
|
45
|
+
density,
|
|
46
|
+
floor,
|
|
47
|
+
still,
|
|
48
|
+
pointer,
|
|
49
|
+
ripples,
|
|
50
|
+
reveal
|
|
51
|
+
}) {
|
|
52
|
+
const canvas = React.useRef(null);
|
|
53
|
+
React.useEffect(() => {
|
|
54
|
+
const el = canvas.current;
|
|
55
|
+
const ctx = el.getContext("2d");
|
|
56
|
+
let w = 0;
|
|
57
|
+
let h = 0;
|
|
58
|
+
let raf = 0;
|
|
59
|
+
let visible = true;
|
|
60
|
+
let last = performance.now();
|
|
61
|
+
let time = 0;
|
|
62
|
+
const glow = { x: 0, y: 0, a: 0 };
|
|
63
|
+
let idle = 0;
|
|
64
|
+
const phases = new Float32Array(4096).map(
|
|
65
|
+
(_, k) => hash(k, 17) * Math.PI * 2
|
|
66
|
+
);
|
|
67
|
+
const size = () => {
|
|
68
|
+
const dpr = Math.min(2, window.devicePixelRatio || 1);
|
|
69
|
+
w = el.clientWidth;
|
|
70
|
+
h = el.clientHeight;
|
|
71
|
+
el.width = Math.round(w * dpr);
|
|
72
|
+
el.height = Math.round(h * dpr);
|
|
73
|
+
ctx.setTransform(dpr, 0, 0, dpr, 0, 0);
|
|
74
|
+
};
|
|
75
|
+
const dot = (x, y, s) => {
|
|
76
|
+
if (s < 0.6) return;
|
|
77
|
+
if (shape === "circle") {
|
|
78
|
+
ctx.beginPath();
|
|
79
|
+
ctx.arc(x, y, s / 2, 0, Math.PI * 2);
|
|
80
|
+
ctx.fill();
|
|
81
|
+
} else if (shape === "diamond") {
|
|
82
|
+
const r = s * 0.62;
|
|
83
|
+
ctx.beginPath();
|
|
84
|
+
ctx.moveTo(x, y - r);
|
|
85
|
+
ctx.lineTo(x + r, y);
|
|
86
|
+
ctx.lineTo(x, y + r);
|
|
87
|
+
ctx.lineTo(x - r, y);
|
|
88
|
+
ctx.fill();
|
|
89
|
+
} else {
|
|
90
|
+
ctx.fillRect(x - s / 2, y - s / 2, s, s);
|
|
91
|
+
}
|
|
92
|
+
};
|
|
93
|
+
const light = (x, y) => {
|
|
94
|
+
let l = 0;
|
|
95
|
+
if (glow.a > 0.01) {
|
|
96
|
+
const dx = x - glow.x;
|
|
97
|
+
const dy = y - glow.y;
|
|
98
|
+
l += glow.a * 0.55 * Math.exp(-(dx * dx + dy * dy) / (2 * 54 * 54));
|
|
99
|
+
}
|
|
100
|
+
for (const r of ripples.current) {
|
|
101
|
+
const age = time - r.t;
|
|
102
|
+
const radius = age * 240;
|
|
103
|
+
const d = Math.hypot(x - r.x, y - r.y) - radius;
|
|
104
|
+
const fade = Math.max(0, 1 - age / 1.6);
|
|
105
|
+
l += 0.6 * fade * Math.exp(-(d * d) / (2 * 14 * 14));
|
|
106
|
+
}
|
|
107
|
+
return l;
|
|
108
|
+
};
|
|
109
|
+
const draw = () => {
|
|
110
|
+
ctx.clearRect(0, 0, w, h);
|
|
111
|
+
ctx.fillStyle = color;
|
|
112
|
+
const start = reveal.current;
|
|
113
|
+
const pr = still ? 1 : start === -1 || start === -2 ? 0 : Math.min(1, (time - start) / REVEAL);
|
|
114
|
+
if (pr === 0) return;
|
|
115
|
+
const eased = 1 - Math.pow(1 - pr, 3);
|
|
116
|
+
const reach = (Math.hypot(w, h) / 2 + 90) * eased;
|
|
117
|
+
const cx = w / 2;
|
|
118
|
+
const cy = h / 2;
|
|
119
|
+
const opened = (x, y) => {
|
|
120
|
+
if (pr >= 1) return { m: 1, edge: 0 };
|
|
121
|
+
const d = Math.hypot(x - cx, y - cy);
|
|
122
|
+
const e = d - reach;
|
|
123
|
+
return {
|
|
124
|
+
m: Math.min(1, Math.max(0, -e / 70)),
|
|
125
|
+
edge: 0.6 * (1 - pr) * Math.exp(-(e * e) / (2 * 14 * 14))
|
|
126
|
+
};
|
|
127
|
+
};
|
|
128
|
+
const horizon = floor ? h * 0.66 : h * 2;
|
|
129
|
+
const t = time * speed;
|
|
130
|
+
const cols = Math.ceil(w / cell);
|
|
131
|
+
const rows = Math.ceil(h / cell);
|
|
132
|
+
const bodies = CLOUDS.map((c) => ({
|
|
133
|
+
x: w * (0.5 + c.ax * Math.sin(t * c.fx + c.px)),
|
|
134
|
+
y: h * (0.5 + c.ay * Math.sin(t * c.fy + c.py)),
|
|
135
|
+
r2: 2 * (c.r * coverage * Math.max(w, h)) ** 2
|
|
136
|
+
}));
|
|
137
|
+
for (let j = 0; j < rows; j++) {
|
|
138
|
+
for (let i = 0; i < cols; i++) {
|
|
139
|
+
const x = i * cell + cell / 2;
|
|
140
|
+
const y = j * cell + cell / 2;
|
|
141
|
+
const n = fbm(x * 62e-4 + t * 0.045, y * 62e-4 - t * 0.03);
|
|
142
|
+
let body = 0;
|
|
143
|
+
for (const b of bodies) {
|
|
144
|
+
const dx = x - b.x;
|
|
145
|
+
const dy = y - b.y;
|
|
146
|
+
body += Math.exp(-(dx * dx + dy * dy) / b.r2);
|
|
147
|
+
}
|
|
148
|
+
let v = band(0.3, 0.95, body * (0.45 + 0.9 * n) * density);
|
|
149
|
+
v *= 1 - 0.55 * band(horizon - 30, horizon + 30, y);
|
|
150
|
+
v *= 0.82 + 0.18 * Math.sin(t * 2.4 + phases[(j * cols + i) % phases.length]);
|
|
151
|
+
const o = opened(x, y);
|
|
152
|
+
v = v * o.m + o.edge + light(x, y) * o.m;
|
|
153
|
+
if (v < 0.04) continue;
|
|
154
|
+
const th = BAYER[(j & 3) * 4 + (i & 3)];
|
|
155
|
+
const q = Math.min(1, v + (th - 0.5) * 0.32);
|
|
156
|
+
const step = STEPS[Math.min(STEPS.length - 1, Math.floor(q * STEPS.length))];
|
|
157
|
+
if (!step) continue;
|
|
158
|
+
ctx.globalAlpha = 0.3 + Math.min(1, v) * 0.7;
|
|
159
|
+
dot(x, y, cell * step);
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
if (floor) {
|
|
163
|
+
const near = 1;
|
|
164
|
+
const depth = 9;
|
|
165
|
+
const roll = t * 0.5 % 1;
|
|
166
|
+
const spacing = cell * 3.2;
|
|
167
|
+
const span = Math.ceil(w / spacing) * 3;
|
|
168
|
+
for (let k = depth; k >= 0; k--) {
|
|
169
|
+
const z = near + (k - roll) * 0.8;
|
|
170
|
+
if (z < near * 0.6) continue;
|
|
171
|
+
const p = near / z;
|
|
172
|
+
const y = horizon + (h - horizon) * p * 0.98;
|
|
173
|
+
const fade = Math.pow(Math.min(1, p * 1.1), 1.6);
|
|
174
|
+
for (let c = -span; c <= span; c++) {
|
|
175
|
+
const x = w / 2 + c * spacing * p;
|
|
176
|
+
if (x < -cell || x > w + cell) continue;
|
|
177
|
+
const shimmer = 0.8 + 0.2 * Math.sin(t * 2 + hash(c, k + 99) * 6.28);
|
|
178
|
+
const o = opened(x, y);
|
|
179
|
+
const v = (fade * 0.75 * shimmer + light(x, y) * p) * o.m;
|
|
180
|
+
ctx.globalAlpha = Math.min(1, v);
|
|
181
|
+
dot(x, y, cell * 0.8 * p);
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
ctx.globalAlpha = 1;
|
|
186
|
+
};
|
|
187
|
+
const frame = (now) => {
|
|
188
|
+
raf = requestAnimationFrame(frame);
|
|
189
|
+
const dt = Math.min(0.05, Math.max(0, (now - last) / 1e3));
|
|
190
|
+
last = now;
|
|
191
|
+
if (!visible) return;
|
|
192
|
+
time += dt;
|
|
193
|
+
if (reveal.current === -2) reveal.current = time;
|
|
194
|
+
const p = pointer.current;
|
|
195
|
+
const k = 1 - Math.pow(15e-4, dt);
|
|
196
|
+
glow.x += (p.x - glow.x) * k;
|
|
197
|
+
glow.y += (p.y - glow.y) * k;
|
|
198
|
+
glow.a += ((p.on ? 1 : 0) - glow.a) * (1 - Math.pow(0.02, dt));
|
|
199
|
+
idle = p.on ? 0 : idle + dt;
|
|
200
|
+
if (idle > 3.2) {
|
|
201
|
+
idle = 0;
|
|
202
|
+
ripples.current.push({
|
|
203
|
+
x: w * (0.15 + Math.random() * 0.7),
|
|
204
|
+
y: h * (0.15 + Math.random() * 0.45),
|
|
205
|
+
t: time
|
|
206
|
+
});
|
|
207
|
+
}
|
|
208
|
+
ripples.current = ripples.current.map((r) => r.t < 0 ? { ...r, t: time } : r).filter((r) => time - r.t < 1.6);
|
|
209
|
+
draw();
|
|
210
|
+
};
|
|
211
|
+
size();
|
|
212
|
+
const ro = new ResizeObserver(() => {
|
|
213
|
+
size();
|
|
214
|
+
if (still) draw();
|
|
215
|
+
});
|
|
216
|
+
ro.observe(el);
|
|
217
|
+
const io = new IntersectionObserver(
|
|
218
|
+
([e]) => void (visible = !!e?.isIntersecting)
|
|
219
|
+
);
|
|
220
|
+
io.observe(el);
|
|
221
|
+
if (still) {
|
|
222
|
+
time = 3;
|
|
223
|
+
draw();
|
|
224
|
+
} else raf = requestAnimationFrame(frame);
|
|
225
|
+
return () => {
|
|
226
|
+
cancelAnimationFrame(raf);
|
|
227
|
+
ro.disconnect();
|
|
228
|
+
io.disconnect();
|
|
229
|
+
};
|
|
230
|
+
}, [
|
|
231
|
+
color,
|
|
232
|
+
cell,
|
|
233
|
+
shape,
|
|
234
|
+
speed,
|
|
235
|
+
coverage,
|
|
236
|
+
density,
|
|
237
|
+
floor,
|
|
238
|
+
still,
|
|
239
|
+
pointer,
|
|
240
|
+
ripples,
|
|
241
|
+
reveal
|
|
242
|
+
]);
|
|
243
|
+
return /* @__PURE__ */ jsx(
|
|
244
|
+
"canvas",
|
|
245
|
+
{
|
|
246
|
+
ref: canvas,
|
|
247
|
+
"aria-hidden": true,
|
|
248
|
+
className: "pointer-events-none absolute inset-0 size-full"
|
|
249
|
+
}
|
|
250
|
+
);
|
|
251
|
+
}
|
|
252
|
+
var PixelBlast = React.forwardRef(
|
|
253
|
+
function PixelBlast2({
|
|
254
|
+
color = "#252528",
|
|
255
|
+
cellSize = 6,
|
|
256
|
+
shape = "square",
|
|
257
|
+
speed = 1,
|
|
258
|
+
coverage = 1.4,
|
|
259
|
+
density = 0.8,
|
|
260
|
+
floor = false,
|
|
261
|
+
interactive = true,
|
|
262
|
+
children,
|
|
263
|
+
className
|
|
264
|
+
}, ref) {
|
|
265
|
+
const root = React.useRef(null);
|
|
266
|
+
React.useImperativeHandle(ref, () => root.current);
|
|
267
|
+
const still = !!useReducedMotion();
|
|
268
|
+
const inView = useInView(root, { once: true, amount: 0.2 });
|
|
269
|
+
const pointer = React.useRef({ x: -999, y: -999, on: false });
|
|
270
|
+
const ripples = React.useRef([]);
|
|
271
|
+
const reveal = React.useRef(-1);
|
|
272
|
+
React.useEffect(() => {
|
|
273
|
+
if (inView || still) reveal.current = -2;
|
|
274
|
+
}, [inView, still]);
|
|
275
|
+
const local = (e) => {
|
|
276
|
+
const r = root.current.getBoundingClientRect();
|
|
277
|
+
return { x: e.clientX - r.left, y: e.clientY - r.top };
|
|
278
|
+
};
|
|
279
|
+
return /* @__PURE__ */ jsxs(
|
|
280
|
+
"div",
|
|
281
|
+
{
|
|
282
|
+
ref: root,
|
|
283
|
+
onPointerMove: interactive ? (e) => void (pointer.current = { ...local(e), on: true }) : void 0,
|
|
284
|
+
onPointerLeave: interactive ? () => void (pointer.current = { ...pointer.current, on: false }) : void 0,
|
|
285
|
+
onPointerDown: (
|
|
286
|
+
// t < 0 marks it new; the field stamps it with its own clock.
|
|
287
|
+
interactive ? (e) => void ripples.current.push({ ...local(e), t: -1 }) : void 0
|
|
288
|
+
),
|
|
289
|
+
className: cn(
|
|
290
|
+
"relative isolate min-h-[320px] w-full overflow-hidden",
|
|
291
|
+
className
|
|
292
|
+
),
|
|
293
|
+
children: [
|
|
294
|
+
/* @__PURE__ */ jsx(
|
|
295
|
+
PixelField,
|
|
296
|
+
{
|
|
297
|
+
color,
|
|
298
|
+
cell: Math.max(4, cellSize),
|
|
299
|
+
shape,
|
|
300
|
+
speed,
|
|
301
|
+
coverage: Math.max(0.3, coverage),
|
|
302
|
+
density: Math.max(0.2, density),
|
|
303
|
+
floor,
|
|
304
|
+
still,
|
|
305
|
+
pointer,
|
|
306
|
+
ripples,
|
|
307
|
+
reveal
|
|
308
|
+
}
|
|
309
|
+
),
|
|
310
|
+
children
|
|
311
|
+
]
|
|
312
|
+
}
|
|
313
|
+
);
|
|
314
|
+
}
|
|
315
|
+
);
|
|
316
|
+
|
|
317
|
+
export {
|
|
318
|
+
PixelBlast
|
|
319
|
+
};
|