@katajere/recap 2.1.7 → 2.1.9
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/dist/App.css +8 -0
- package/dist/LoginScreen.css +6 -139
- package/dist/OtpScreen.css +5 -127
- package/dist/RecapApp.d.ts +4 -1
- package/dist/RecapApp.d.ts.map +1 -1
- package/dist/RecapApp.js +2 -2
- package/dist/RecapLoadingScreen.css +11 -0
- package/dist/RecapStory.d.ts +8 -4
- package/dist/RecapStory.d.ts.map +1 -1
- package/dist/RecapStory.js +5 -254
- package/dist/StoryProgress.d.ts +2 -2
- package/dist/StoryProgress.d.ts.map +1 -1
- package/dist/StoryProgress.js +11 -68
- package/dist/assets/fluctuating/notification-left.svg +30 -0
- package/dist/assets/fluctuating/notification-right.svg +30 -0
- package/dist/assets/fluctuating/notification-top.svg +30 -0
- package/dist/assets/fluctuating/phone-body.svg +18 -0
- package/dist/assets/fluctuating/phone-detail.svg +6 -0
- package/dist/assets/fluctuating/phone-floor.svg +5 -0
- package/dist/assets/fluctuating/phone-marks.svg +8 -0
- package/dist/assets/fluctuating/phone-pulse.svg +7 -0
- package/dist/assets/fluctuating/wave-mask.svg +5 -0
- package/dist/assets/fluctuating/wave.svg +24 -0
- package/dist/assets/low-data/book-left-page.svg +7 -0
- package/dist/assets/low-data/book-right-leaf.svg +6 -0
- package/dist/assets/low-data/book-right-page.svg +5 -0
- package/dist/assets/low-data/book-spine.svg +5 -0
- package/dist/assets/low-data/sign-cord-left.svg +17 -0
- package/dist/assets/low-data/sign-cord-right.svg +17 -0
- package/dist/assets/low-data/sign-edge.svg +5 -0
- package/dist/assets/low-data/sign-eyelet-left.svg +15 -0
- package/dist/assets/low-data/sign-eyelet-right.svg +15 -0
- package/dist/assets/low-data/sign-face-detail.svg +18 -0
- package/dist/assets/low-data/sign-face.svg +10 -0
- package/dist/assets/low-data/sign-inner-bevel.svg +11 -0
- package/dist/assets/low-data/sign-lettering.svg +26 -0
- package/dist/assets/low-data/sign-pin.svg +15 -0
- package/dist/assets/low-data/sign-plaque.svg +19 -0
- package/dist/assets/low-data/sign-rim-bottom.svg +3 -0
- package/dist/assets/low-data/sign-rim-top.svg +3 -0
- package/dist/assets/low-data/store-browser.svg +10 -0
- package/dist/assets/low-data/store-cursor.svg +5 -0
- package/dist/assets/low-data/store-ground.svg +5 -0
- package/dist/assets/recap-intro/close.svg +5 -0
- package/dist/assets/recap-intro/loading-bar-1.png +0 -0
- package/dist/assets/recap-intro/loading-bar-2.png +0 -0
- package/dist/assets/recap-intro/tunnel.svg +516 -0
- package/dist/assets/steady/bag/badge.svg +9 -0
- package/dist/assets/steady/bag/body.svg +105 -0
- package/dist/assets/steady/bag/front-handle-inner.svg +353 -0
- package/dist/assets/steady/bag/front-handle.svg +10 -0
- package/dist/assets/steady/bag/hand.svg +208 -0
- package/dist/assets/steady/bag/rear-handle-inner.svg +297 -0
- package/dist/assets/steady/bag/rear-handle-top.svg +3 -0
- package/dist/assets/steady/bag/rear-handle.svg +10 -0
- package/dist/assets/steady/bag/shadow.svg +7 -0
- package/dist/assets/steady/calendar/base.png +0 -0
- package/dist/assets/steady/calendar/tick.svg +6 -0
- package/dist/assets/steady/coin/shimmer-mask.svg +5 -0
- package/dist/assets/steady/coin/shimmer.svg +16 -0
- package/dist/assets/steady/coin.png +0 -0
- package/dist/assets/steady/tree.svg +790 -0
- package/dist/assets/top10/biggest-day/coin-left.svg +21 -0
- package/dist/assets/top10/biggest-day/coin-right.svg +21 -0
- package/dist/assets/top10/biggest-day/coin-top.svg +21 -0
- package/dist/assets/top10/biggest-day/floor.svg +5 -0
- package/dist/assets/top10/biggest-day/illustration.png +0 -0
- package/dist/assets/top10/biggest-day/marks.svg +8 -0
- package/dist/assets/top10/biggest-day/mask.svg +5 -0
- package/dist/assets/top10/biggest-day/phone-body.svg +18 -0
- package/dist/assets/top10/biggest-day/phone-detail.svg +6 -0
- package/dist/assets/top10/closing/imgHccStaticHaloScale.svg +5 -0
- package/dist/assets/top10/closing/imgHccStaticHaloScale1.svg +12 -0
- package/dist/assets/top10/closing/imgHccStaticP0Tumble.svg +5 -0
- package/dist/assets/top10/closing/imgHccStaticP10Tumble.svg +5 -0
- package/dist/assets/top10/closing/imgHccStaticP11Tumble.svg +5 -0
- package/dist/assets/top10/closing/imgHccStaticP12Tumble.svg +5 -0
- package/dist/assets/top10/closing/imgHccStaticP13Tumble.svg +5 -0
- package/dist/assets/top10/closing/imgHccStaticP14Tumble.svg +5 -0
- package/dist/assets/top10/closing/imgHccStaticP15Tumble.svg +5 -0
- package/dist/assets/top10/closing/imgHccStaticP16Tumble.svg +5 -0
- package/dist/assets/top10/closing/imgHccStaticP17Tumble.svg +5 -0
- package/dist/assets/top10/closing/imgHccStaticP18Tumble.svg +5 -0
- package/dist/assets/top10/closing/imgHccStaticP19Tumble.svg +5 -0
- package/dist/assets/top10/closing/imgHccStaticP1Tumble.svg +5 -0
- package/dist/assets/top10/closing/imgHccStaticP20Tumble.svg +5 -0
- package/dist/assets/top10/closing/imgHccStaticP21Tumble.svg +5 -0
- package/dist/assets/top10/closing/imgHccStaticP22Tumble.svg +5 -0
- package/dist/assets/top10/closing/imgHccStaticP23Tumble.svg +5 -0
- package/dist/assets/top10/closing/imgHccStaticP24Tumble.svg +5 -0
- package/dist/assets/top10/closing/imgHccStaticP25Tumble.svg +5 -0
- package/dist/assets/top10/closing/imgHccStaticP26Tumble.svg +5 -0
- package/dist/assets/top10/closing/imgHccStaticP27Tumble.svg +5 -0
- package/dist/assets/top10/closing/imgHccStaticP28Tumble.svg +5 -0
- package/dist/assets/top10/closing/imgHccStaticP29Tumble.svg +5 -0
- package/dist/assets/top10/closing/imgHccStaticP2Tumble.svg +5 -0
- package/dist/assets/top10/closing/imgHccStaticP30Tumble.svg +5 -0
- package/dist/assets/top10/closing/imgHccStaticP31Tumble.svg +5 -0
- package/dist/assets/top10/closing/imgHccStaticP32Tumble.svg +5 -0
- package/dist/assets/top10/closing/imgHccStaticP33Tumble.svg +5 -0
- package/dist/assets/top10/closing/imgHccStaticP34Tumble.svg +5 -0
- package/dist/assets/top10/closing/imgHccStaticP35Tumble.svg +5 -0
- package/dist/assets/top10/closing/imgHccStaticP36Tumble.svg +5 -0
- package/dist/assets/top10/closing/imgHccStaticP37Tumble.svg +5 -0
- package/dist/assets/top10/closing/imgHccStaticP38Tumble.svg +5 -0
- package/dist/assets/top10/closing/imgHccStaticP39Tumble.svg +5 -0
- package/dist/assets/top10/closing/imgHccStaticP3Tumble.svg +5 -0
- package/dist/assets/top10/closing/imgHccStaticP40Tumble.svg +5 -0
- package/dist/assets/top10/closing/imgHccStaticP41Tumble.svg +5 -0
- package/dist/assets/top10/closing/imgHccStaticP42Tumble.svg +5 -0
- package/dist/assets/top10/closing/imgHccStaticP43Tumble.svg +5 -0
- package/dist/assets/top10/closing/imgHccStaticP44Tumble.svg +5 -0
- package/dist/assets/top10/closing/imgHccStaticP45Tumble.svg +5 -0
- package/dist/assets/top10/closing/imgHccStaticP46Tumble.svg +5 -0
- package/dist/assets/top10/closing/imgHccStaticP47Tumble.svg +5 -0
- package/dist/assets/top10/closing/imgHccStaticP48Tumble.svg +5 -0
- package/dist/assets/top10/closing/imgHccStaticP49Tumble.svg +5 -0
- package/dist/assets/top10/closing/imgHccStaticP4Tumble.svg +5 -0
- package/dist/assets/top10/closing/imgHccStaticP50Tumble.svg +5 -0
- package/dist/assets/top10/closing/imgHccStaticP51Tumble.svg +5 -0
- package/dist/assets/top10/closing/imgHccStaticP52Tumble.svg +5 -0
- package/dist/assets/top10/closing/imgHccStaticP53Tumble.svg +5 -0
- package/dist/assets/top10/closing/imgHccStaticP54Tumble.svg +5 -0
- package/dist/assets/top10/closing/imgHccStaticP55Tumble.svg +5 -0
- package/dist/assets/top10/closing/imgHccStaticP5Tumble.svg +5 -0
- package/dist/assets/top10/closing/imgHccStaticP6Tumble.svg +5 -0
- package/dist/assets/top10/closing/imgHccStaticP7Tumble.svg +5 -0
- package/dist/assets/top10/closing/imgHccStaticP8Tumble.svg +5 -0
- package/dist/assets/top10/closing/imgHccStaticP9Tumble.svg +5 -0
- package/dist/assets/top10/closing/imgVector.png +0 -0
- package/dist/assets/top10/closing/replay.svg +7 -0
- package/dist/assets/top10/closing/share.svg +6 -0
- package/dist/assets/top10/customers/arrow.svg +6 -0
- package/dist/assets/top10/customers/avatar.svg +61 -0
- package/dist/assets/top10/customers/illustration.png +0 -0
- package/dist/assets/top10/favourite/emoji.svg +9 -0
- package/dist/assets/top10/favourite/heart.svg +8 -0
- package/dist/assets/top10/growth/coin.svg +10 -0
- package/dist/assets/top10/growth/counter-shadow.svg +12 -0
- package/dist/assets/top10/growth/counter.svg +8 -0
- package/dist/assets/top10/growth/highlight.svg +12 -0
- package/dist/assets/top10/growth/illustration.png +0 -0
- package/dist/assets/top10/milestone/illustration.png +0 -0
- package/dist/assets/top10/orders/giver.svg +18 -0
- package/dist/assets/top10/orders/illustration.png +0 -0
- package/dist/assets/top10/orders/mask.svg +5 -0
- package/dist/assets/top10/orders/parcel.svg +16 -0
- package/dist/assets/top10/orders/receiver.svg +20 -0
- package/dist/assets/top10/orders/seal.svg +8 -0
- package/dist/assets/top10/recognition/contact-mask.svg +6 -0
- package/dist/assets/top10/recognition/contact.svg +14 -0
- package/dist/assets/top10/recognition/mask.svg +5 -0
- package/dist/assets/top10/recognition/plug-left.svg +27 -0
- package/dist/assets/top10/recognition/plug-right.svg +23 -0
- package/dist/assets/top10/recognition/pulse.svg +15 -0
- package/dist/assets/top10/recognition/ring.svg +3 -0
- package/dist/assets/top10/shared/avatar.png +0 -0
- package/dist/assets/top10/shared/close-dark.svg +5 -0
- package/dist/assets/top10/shared/close-light.svg +5 -0
- package/dist/assets/top10/signature/glow.svg +13 -0
- package/dist/assets/top10/signature/horizon.svg +12 -0
- package/dist/assets/top10/signature/inner-glow.svg +13 -0
- package/dist/assets/top10/signature/mask.svg +5 -0
- package/dist/assets/top10/signature/rim-glow.svg +13 -0
- package/dist/assets/top10/signature/rim.svg +13 -0
- package/dist/assets/top10/signature/year-mask.svg +5 -0
- package/dist/assets/top10/signature/year-shadow.svg +8 -0
- package/dist/assets/top10/signature/year.svg +30 -0
- package/dist/assets/top10/surprise/illustration.png +0 -0
- package/dist/assets/top10/surprise/note-front.svg +275 -0
- package/dist/assets/zero-order/catalogue-card.svg +15 -0
- package/dist/assets/zero-order/catalogue-ground.svg +3 -0
- package/dist/assets/zero-order/catalogue-window.svg +15 -0
- package/dist/assets/zero-order/storefront-awning.svg +145 -0
- package/dist/assets/zero-order/storefront-chrome.svg +15 -0
- package/dist/assets/zero-order/storefront-door-frame.svg +3 -0
- package/dist/assets/zero-order/storefront-door-glass.svg +14 -0
- package/dist/assets/zero-order/storefront-door-handle-light.svg +3 -0
- package/dist/assets/zero-order/storefront-door-handle-shadow.svg +3 -0
- package/dist/assets/zero-order/storefront-door-handle.svg +3 -0
- package/dist/assets/zero-order/storefront-door-mask.svg +5 -0
- package/dist/assets/zero-order/storefront-door-pane.svg +10 -0
- package/dist/assets/zero-order/storefront-door-panel.svg +3 -0
- package/dist/assets/zero-order/storefront-door-sill.svg +3 -0
- package/dist/assets/zero-order/storefront-ground.svg +3 -0
- package/dist/assets/zero-order/storefront-shell.svg +19 -0
- package/dist/assets/zero-order/storefront-step.svg +8 -0
- package/dist/assets/zero-order/storefront-wall.svg +13 -0
- package/dist/assets/zero-order/storefront-window-frame.svg +3 -0
- package/dist/assets/zero-order/storefront-window-glass.svg +16 -0
- package/dist/assets/zero-order/storefront-window-ledge-edge.svg +3 -0
- package/dist/assets/zero-order/storefront-window-ledge-line.svg +3 -0
- package/dist/assets/zero-order/storefront-window-ledge.svg +3 -0
- package/dist/assets/zero-order/storefront-window-mask.svg +5 -0
- package/dist/assets/zero-order/storefront-window-pane.svg +10 -0
- package/dist/assets/zero-order/storefront-window-sill.svg +3 -0
- package/dist/categories.d.ts +15 -0
- package/dist/categories.d.ts.map +1 -0
- package/dist/categories.js +25 -0
- package/dist/components/RecapIntroLayout.css +225 -0
- package/dist/components/RecapIntroLayout.d.ts +16 -0
- package/dist/components/RecapIntroLayout.d.ts.map +1 -0
- package/dist/components/RecapIntroLayout.js +19 -0
- package/dist/data/mock.d.ts +12 -2
- package/dist/data/mock.d.ts.map +1 -1
- package/dist/data/mock.js +99 -59
- package/dist/data/recapCopy.d.ts +1 -0
- package/dist/data/recapCopy.d.ts.map +1 -1
- package/dist/data/recapCopy.js +30 -21
- package/dist/data/remoteAssets.d.ts +3 -0
- package/dist/data/remoteAssets.d.ts.map +1 -0
- package/dist/data/remoteAssets.js +3 -0
- package/dist/hooks/useBackgroundMusic.d.ts +8 -8
- package/dist/hooks/useBackgroundMusic.d.ts.map +1 -1
- package/dist/hooks/useBackgroundMusic.js +38 -43
- package/dist/hooks/useCountUp.d.ts +16 -0
- package/dist/hooks/useCountUp.d.ts.map +1 -0
- package/dist/hooks/useCountUp.js +15 -0
- package/dist/hooks/useFrameImages.d.ts +5 -0
- package/dist/hooks/useFrameImages.d.ts.map +1 -0
- package/dist/hooks/useFrameImages.js +18 -0
- package/dist/hooks/useSessionValidator.d.ts +14 -0
- package/dist/hooks/useSessionValidator.d.ts.map +1 -0
- package/dist/hooks/useSessionValidator.js +97 -0
- package/dist/hooks/useShareCardPrecapture.d.ts +17 -0
- package/dist/hooks/useShareCardPrecapture.d.ts.map +1 -0
- package/dist/hooks/useShareCardPrecapture.js +35 -0
- package/dist/hooks/useStatusBarColor.d.ts +6 -0
- package/dist/hooks/useStatusBarColor.d.ts.map +1 -0
- package/dist/hooks/useStatusBarColor.js +34 -0
- package/dist/index.css +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -0
- package/dist/slides/Slide10Final.d.ts.map +1 -1
- package/dist/slides/Slide10Final.js +2 -50
- package/dist/slides/Slide1Intro.css +1 -2
- package/dist/slides/Slide1Intro.d.ts.map +1 -1
- package/dist/slides/Slide1Intro.js +21 -25
- package/dist/slides/Slide2Days.d.ts.map +1 -1
- package/dist/slides/Slide2Days.js +7 -44
- package/dist/slides/Slide3Revenue.d.ts.map +1 -1
- package/dist/slides/Slide3Revenue.js +5 -22
- package/dist/slides/Slide4Orders.d.ts.map +1 -1
- package/dist/slides/Slide4Orders.js +12 -41
- package/dist/slides/Slide5Buyers.d.ts.map +1 -1
- package/dist/slides/Slide5Buyers.js +9 -43
- package/dist/slides/Slide6Customer.d.ts.map +1 -1
- package/dist/slides/Slide6Customer.js +3 -19
- package/dist/slides/Slide9Year.d.ts.map +1 -1
- package/dist/slides/Slide9Year.js +3 -21
- package/dist/slides/registry.d.ts +7 -0
- package/dist/slides/registry.d.ts.map +1 -0
- package/dist/slides/registry.js +84 -0
- package/dist/store/auth.d.ts +40 -0
- package/dist/store/auth.d.ts.map +1 -0
- package/dist/store/auth.js +40 -0
- package/dist/story/StoryProgressBars.d.ts +13 -0
- package/dist/story/StoryProgressBars.d.ts.map +1 -0
- package/dist/story/StoryProgressBars.js +12 -0
- package/dist/story/index.d.ts +12 -0
- package/dist/story/index.d.ts.map +1 -0
- package/dist/story/index.js +10 -0
- package/dist/story/resolveStories.d.ts +9 -0
- package/dist/story/resolveStories.d.ts.map +1 -0
- package/dist/story/resolveStories.js +23 -0
- package/dist/story/storyPlayerReducer.d.ts +33 -0
- package/dist/story/storyPlayerReducer.d.ts.map +1 -0
- package/dist/story/storyPlayerReducer.js +55 -0
- package/dist/story/types.d.ts +55 -0
- package/dist/story/types.d.ts.map +1 -0
- package/dist/story/types.js +1 -0
- package/dist/story/usePreloadAssets.d.ts +8 -0
- package/dist/story/usePreloadAssets.d.ts.map +1 -0
- package/dist/story/usePreloadAssets.js +21 -0
- package/dist/story/useStoryGestures.d.ts +23 -0
- package/dist/story/useStoryGestures.d.ts.map +1 -0
- package/dist/story/useStoryGestures.js +60 -0
- package/dist/story/useStoryKeyboard.d.ts +10 -0
- package/dist/story/useStoryKeyboard.d.ts.map +1 -0
- package/dist/story/useStoryKeyboard.js +43 -0
- package/dist/story/useStoryPlayer.d.ts +26 -0
- package/dist/story/useStoryPlayer.d.ts.map +1 -0
- package/dist/story/useStoryPlayer.js +64 -0
- package/dist/story/useStoryTimer.d.ts +16 -0
- package/dist/story/useStoryTimer.d.ts.map +1 -0
- package/dist/story/useStoryTimer.js +34 -0
- package/dist/story/useVideoCaptureBridge.d.ts +6 -0
- package/dist/story/useVideoCaptureBridge.d.ts.map +1 -0
- package/dist/story/useVideoCaptureBridge.js +22 -0
- package/dist/top10/RecapStory2026.d.ts +20 -0
- package/dist/top10/RecapStory2026.d.ts.map +1 -0
- package/dist/top10/RecapStory2026.js +67 -0
- package/dist/top10/Top10Chrome.d.ts +16 -0
- package/dist/top10/Top10Chrome.d.ts.map +1 -0
- package/dist/top10/Top10Chrome.js +15 -0
- package/dist/top10/Top10Slides.css +308 -0
- package/dist/top10/Top10Story.css +250 -0
- package/dist/top10/fluctuatingSlides.d.ts +5 -0
- package/dist/top10/fluctuatingSlides.d.ts.map +1 -0
- package/dist/top10/fluctuatingSlides.js +30 -0
- package/dist/top10/format.d.ts +17 -0
- package/dist/top10/format.d.ts.map +1 -0
- package/dist/top10/format.js +57 -0
- package/dist/top10/illustrations/IllustrationLayers.d.ts +51 -0
- package/dist/top10/illustrations/IllustrationLayers.d.ts.map +1 -0
- package/dist/top10/illustrations/IllustrationLayers.js +51 -0
- package/dist/top10/illustrations/closingAssets.d.ts +2 -0
- package/dist/top10/illustrations/closingAssets.d.ts.map +1 -0
- package/dist/top10/illustrations/closingAssets.js +119 -0
- package/dist/top10/illustrations/closingLayers.json +461 -0
- package/dist/top10/illustrations/index.d.ts +45 -0
- package/dist/top10/illustrations/index.d.ts.map +1 -0
- package/dist/top10/illustrations/index.js +646 -0
- package/dist/top10/lowDataSlides.d.ts +9 -0
- package/dist/top10/lowDataSlides.d.ts.map +1 -0
- package/dist/top10/lowDataSlides.js +50 -0
- package/dist/top10/motion.d.ts +18 -0
- package/dist/top10/motion.d.ts.map +1 -0
- package/dist/top10/motion.js +43 -0
- package/dist/top10/registry.d.ts +21 -0
- package/dist/top10/registry.d.ts.map +1 -0
- package/dist/top10/registry.js +313 -0
- package/dist/top10/slides.d.ts +87 -0
- package/dist/top10/slides.d.ts.map +1 -0
- package/dist/top10/slides.js +137 -0
- package/dist/top10/steadySlides.d.ts +16 -0
- package/dist/top10/steadySlides.d.ts.map +1 -0
- package/dist/top10/steadySlides.js +78 -0
- package/dist/top10/useCanvasScale.d.ts +18 -0
- package/dist/top10/useCanvasScale.d.ts.map +1 -0
- package/dist/top10/useCanvasScale.js +50 -0
- package/dist/top10/zeroOrderSlides.d.ts +9 -0
- package/dist/top10/zeroOrderSlides.d.ts.map +1 -0
- package/dist/top10/zeroOrderSlides.js +34 -0
- package/dist/types.d.ts +74 -14
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +1 -1
- package/dist/utils/Helpers.d.ts +7 -0
- package/dist/utils/Helpers.d.ts.map +1 -0
- package/dist/utils/Helpers.js +21 -0
- package/dist/utils/RecapApi.d.ts +3 -0
- package/dist/utils/RecapApi.d.ts.map +1 -0
- package/dist/utils/RecapApi.js +35 -0
- package/dist/utils/Services/AuthServices.d.ts +49 -0
- package/dist/utils/Services/AuthServices.d.ts.map +1 -0
- package/dist/utils/Services/AuthServices.js +16 -0
- package/dist/utils/Services/mockApi.d.ts +49 -0
- package/dist/utils/Services/mockApi.d.ts.map +1 -0
- package/dist/utils/Services/mockApi.js +60 -0
- package/dist/utils/analytics.d.ts +4 -0
- package/dist/utils/analytics.d.ts.map +1 -0
- package/dist/utils/analytics.js +12 -0
- package/dist/utils/shareRecapVideo.d.ts +6 -0
- package/dist/utils/shareRecapVideo.d.ts.map +1 -0
- package/dist/utils/shareRecapVideo.js +40 -0
- package/dist/utils/vendorApp.d.ts +2 -0
- package/dist/utils/vendorApp.d.ts.map +1 -0
- package/dist/utils/vendorApp.js +4 -0
- package/package.json +25 -10
- package/src/App.css +8 -0
- package/src/App.tsx +75 -22
- package/src/LoginScreen.css +6 -139
- package/src/LoginScreen.tsx +126 -36
- package/src/OtpScreen.css +5 -127
- package/src/OtpScreen.tsx +84 -37
- package/src/RecapApp.tsx +6 -3
- package/src/RecapLoadingScreen.css +11 -0
- package/src/RecapLoadingScreen.tsx +64 -0
- package/src/RecapStory.tsx +11 -423
- package/src/StoryProgress.tsx +18 -104
- package/src/categories.ts +30 -0
- package/src/components/RecapIntroLayout.css +225 -0
- package/src/components/RecapIntroLayout.tsx +64 -0
- package/src/data/mock.ts +110 -67
- package/src/data/recapCopy.ts +33 -21
- package/src/data/remoteAssets.ts +3 -0
- package/src/hooks/useBackgroundMusic.ts +46 -48
- package/src/hooks/useCountUp.ts +36 -0
- package/src/hooks/useFrameImages.ts +19 -0
- package/src/hooks/useSessionValidator.ts +115 -0
- package/src/hooks/useShareCardPrecapture.ts +50 -0
- package/src/hooks/useStatusBarColor.ts +36 -0
- package/src/index.css +1 -1
- package/src/index.ts +24 -0
- package/src/lib/queryClient.ts +34 -0
- package/src/main.tsx +44 -0
- package/src/queries/recap.ts +15 -0
- package/src/slides/Slide10Final.tsx +2 -56
- package/src/slides/Slide1Intro.css +1 -2
- package/src/slides/Slide1Intro.tsx +22 -32
- package/src/slides/Slide2Days.tsx +7 -55
- package/src/slides/Slide3Revenue.tsx +5 -29
- package/src/slides/Slide4Orders.tsx +12 -53
- package/src/slides/Slide5Buyers.tsx +9 -52
- package/src/slides/Slide6Customer.tsx +3 -21
- package/src/slides/Slide9Year.tsx +3 -26
- package/src/slides/registry.tsx +129 -0
- package/src/store/auth.tsx +72 -0
- package/src/story/StoryProgressBars.tsx +42 -0
- package/src/story/index.ts +11 -0
- package/src/story/resolveStories.ts +31 -0
- package/src/story/storyPlayerReducer.ts +80 -0
- package/src/story/types.ts +49 -0
- package/src/story/usePreloadAssets.ts +28 -0
- package/src/story/useStoryGestures.ts +95 -0
- package/src/story/useStoryKeyboard.ts +56 -0
- package/src/story/useStoryPlayer.ts +120 -0
- package/src/story/useStoryTimer.ts +55 -0
- package/src/story/useVideoCaptureBridge.ts +30 -0
- package/src/top10/RecapStory2026.tsx +136 -0
- package/src/top10/Top10Chrome.tsx +66 -0
- package/src/top10/Top10Slides.css +308 -0
- package/src/top10/Top10Story.css +250 -0
- package/src/top10/fluctuatingSlides.tsx +88 -0
- package/src/top10/format.ts +61 -0
- package/src/top10/illustrations/IllustrationLayers.tsx +150 -0
- package/src/top10/illustrations/closingAssets.ts +120 -0
- package/src/top10/illustrations/index.tsx +753 -0
- package/src/top10/lowDataSlides.tsx +178 -0
- package/src/top10/motion.ts +65 -0
- package/src/top10/registry.tsx +370 -0
- package/src/top10/slides.tsx +560 -0
- package/src/top10/steadySlides.tsx +199 -0
- package/src/top10/useCanvasScale.ts +66 -0
- package/src/top10/zeroOrderSlides.tsx +120 -0
- package/src/types.ts +95 -19
- package/src/utils/Helpers.tsx +25 -0
- package/src/utils/RecapApi.tsx +39 -0
- package/src/utils/Services/AuthServices.tsx +18 -0
- package/src/utils/Services/mockApi.ts +77 -0
- package/src/utils/analytics.ts +15 -0
- package/src/utils/shareRecapVideo.ts +44 -0
- package/src/utils/vendorApp.ts +5 -0
- package/src/vite-env.d.ts +1 -0
- package/src/react-app-env.d.ts +0 -26
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import { jsxs as _jsxs, jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { motion } from 'framer-motion';
|
|
3
|
+
import { RECAP_CATEGORIES } from '../categories';
|
|
4
|
+
import { shareRecapVideo } from '../utils/shareRecapVideo';
|
|
5
|
+
import { BiggestDayIllustration, ClosingIllustration, CustomersIllustration, GrowthIllustration, HorizonIllustration, OrdersIllustration, PlugIllustration, SurpriseIllustration, } from './illustrations';
|
|
6
|
+
import { countInWords, dayAndMonth, formatMoney, fullMonthName, shortDateUpper } from './format';
|
|
7
|
+
import { useCanvasSqueeze, useContentShift } from './useCanvasScale';
|
|
8
|
+
import { fadeIn, loop, popIn } from './motion';
|
|
9
|
+
import milestoneIllustration from '../assets/top10/milestone/illustration.png';
|
|
10
|
+
import favouriteEmoji from '../assets/top10/favourite/emoji.svg';
|
|
11
|
+
import favouriteHeart from '../assets/top10/favourite/heart.svg';
|
|
12
|
+
import recognitionRing from '../assets/top10/recognition/ring.svg';
|
|
13
|
+
import shareIcon from '../assets/top10/closing/share.svg';
|
|
14
|
+
import replayIcon from '../assets/top10/closing/replay.svg';
|
|
15
|
+
// The type scale must load first so the slide styles below can override it
|
|
16
|
+
import './Top10Story.css';
|
|
17
|
+
import './Top10Slides.css';
|
|
18
|
+
export const yearOf = (data) => data.year ?? 2026;
|
|
19
|
+
export const isPaidOrderRecap = (data) => yearOf(data) >= 2026 && Object.values(RECAP_CATEGORIES).some((category) => category === data.businessCategory);
|
|
20
|
+
// TF-01 Opening (18597:29455)
|
|
21
|
+
export function IntroSlide({ data, headline, body, bodyClassName = 's26-intro__body' }) {
|
|
22
|
+
const year = yearOf(data);
|
|
23
|
+
return (_jsxs(_Fragment, { children: [_jsxs(At, { top: 364, anchor: "middle", className: "s26-stack", style: { gap: 40, transform: 'translateY(-50%)' }, children: [_jsxs(motion.p, { className: "s26-text s26-intro__eyebrow", ...fadeIn(1.1), initial: data.isVideo ? false : { opacity: 0 }, children: ["Huxxle Recap ", year] }), _jsx(motion.p, { className: "s26-text s26-intro__headline", ...fadeIn(1.25), initial: data.isVideo ? false : { opacity: 0 }, children: headline ?? `You Didn't Come to Play in ${year}.` }), _jsx(motion.p, { className: `s26-text ${bodyClassName}`, ...fadeIn(1.7), initial: data.isVideo ? false : { opacity: 0 }, children: body ?? (data.periodMode === 'preview'
|
|
24
|
+
? 'Here are a few moments from your year so far on Huxxle.'
|
|
25
|
+
: 'Here are a few moments from your year on Huxxle.') })] }), _jsx(motion.p, { className: "s26-text s26-intro__year", "aria-hidden": "true", initial: { x: 0 }, animate: { x: [-40, -320] }, transition: { duration: 14, ease: 'linear', repeat: Infinity }, children: year })] }));
|
|
26
|
+
}
|
|
27
|
+
/** Absolutely positioned at a canvas y (Figma y − 42), or pinned from the slide bottom. */
|
|
28
|
+
export const At = ({ top = 0, bottom, anchor = 'top', delay, className = '', style, children }) => {
|
|
29
|
+
const squeeze = useCanvasSqueeze();
|
|
30
|
+
const shift = useContentShift();
|
|
31
|
+
const offset = anchor === 'bottom' ? shift : anchor === 'middle' ? squeeze / 2 : 0;
|
|
32
|
+
const placement = bottom !== undefined ? { top: 'auto', bottom } : { top: top - offset };
|
|
33
|
+
return (_jsx(motion.div, { className: `s26-abs ${className}`, style: { ...placement, ...style }, ...(delay === undefined ? {} : fadeIn(delay)), children: children }));
|
|
34
|
+
};
|
|
35
|
+
/** Centered illustration; shrinks from its top edge by the content shift so content below keeps its spacing. */
|
|
36
|
+
export const Illustration = ({ top, height, entrance, children }) => {
|
|
37
|
+
const scale = Math.max(0, (height - useContentShift()) / height);
|
|
38
|
+
return (_jsx("div", { className: "s26-center-x", style: { top, transform: `translateX(-50%) scale(${scale})`, transformOrigin: 'top center' }, children: entrance ? _jsx(motion.div, { ...entrance, children: children }) : children }));
|
|
39
|
+
};
|
|
40
|
+
// TF-02 Orders (18597:29498)
|
|
41
|
+
export function OrdersSlide({ data }) {
|
|
42
|
+
const paid = isPaidOrderRecap(data);
|
|
43
|
+
const ordersLabel = data.orders === 1 ? 'order' : 'orders';
|
|
44
|
+
return (_jsxs(_Fragment, { children: [_jsxs(At, { top: 100, className: "s26-stack", style: { gap: 40 }, children: [_jsx("p", { className: "s26-text s26-eyebrow", children: "The year was in \u2018order\u2019" }), _jsxs("div", { className: "s26-stack", style: { gap: 24 }, children: [_jsx(motion.p, { className: "s26-text s26-h2 s26-orders__count", ...fadeIn(0.15), children: data.orders.toLocaleString('en-NG') }), _jsx(motion.p, { className: "s26-text s26-h4", ...fadeIn(0.55), children: paid ? 'Paid orders' : 'Orders recorded' })] })] }), _jsx(Illustration, { top: 248, height: 394, children: _jsx(OrdersIllustration, {}) }), _jsx(At, { top: 661, anchor: "bottom", delay: data.isVideo ? 1.25 : 3.1, children: _jsxs("p", { className: "s26-text s26-body", children: ["You had ", data.orders.toLocaleString('en-NG'), " ", paid && 'paid ', ordersLabel, " recorded on Huxxle. Take a moment to celebrate that."] }) })] }));
|
|
45
|
+
}
|
|
46
|
+
// TF-03 Biggest Day (18597:29544)
|
|
47
|
+
export function BiggestDaySlide({ data }) {
|
|
48
|
+
const day = data.biggestDay;
|
|
49
|
+
const date = dayAndMonth(day.date);
|
|
50
|
+
if (day.revenue === undefined)
|
|
51
|
+
return null;
|
|
52
|
+
const orderValue = formatMoney(day.revenue, data.currency, { preserveMinorUnits: true });
|
|
53
|
+
const paid = isPaidOrderRecap(data);
|
|
54
|
+
const ordersLabel = day.orders === 1 ? 'order' : 'orders';
|
|
55
|
+
return (_jsxs(_Fragment, { children: [_jsx(At, { top: 100, children: _jsx("p", { className: "s26-text s26-eyebrow", children: "A day to remember" }) }), _jsx(At, { top: 150, delay: 0.25, children: _jsxs("p", { className: "s26-text s26-h5", children: [date, " Was One to Remember"] }) }), _jsx(Illustration, { top: 213.15, height: 250, children: _jsx(BiggestDayIllustration, {}) }), _jsxs(At, { top: 478, anchor: "bottom", delay: data.isVideo ? 1.25 : 3.1, className: "s26-day-stats", children: [_jsxs("div", { className: "s26-day-stats__column", children: [_jsx("p", { className: "s26-text s26-eyebrow", children: paid ? 'Paid orders' : 'Orders' }), _jsx("p", { className: "s26-text s26-day-stats__value", children: day.orders.toLocaleString('en-NG') })] }), _jsx("span", { className: "s26-day-stats__divider", "aria-hidden": "true" }), _jsxs("div", { className: "s26-day-stats__column", children: [_jsx("p", { className: "s26-text s26-eyebrow", children: paid ? 'Paid order value' : 'Order value' }), _jsx("p", { className: "s26-text s26-day-stats__value", children: orderValue })] })] }), _jsx(At, { top: 637, anchor: "bottom", delay: data.isVideo ? 1.75 : 3.7, children: _jsxs("p", { className: "s26-text s26-body", children: [countInWords(day.orders), " ", paid && 'paid ', ordersLabel, " recorded on ", date, ", worth ", orderValue, " in total."] }) })] }));
|
|
56
|
+
}
|
|
57
|
+
// TF-04 Growth (18635:57877)
|
|
58
|
+
export function GrowthSlide({ data, showGrowth }) {
|
|
59
|
+
const comparison = showGrowth ? data.growthComparison : undefined;
|
|
60
|
+
const month = data.busiestMonth ? fullMonthName(data.busiestMonth) : '';
|
|
61
|
+
const orders = data.busiestMonthOrders;
|
|
62
|
+
return (_jsxs(_Fragment, { children: [_jsx(At, { top: 100, children: _jsx("p", { className: "s26-text s26-eyebrow", children: comparison ? 'Look how far you came' : 'A month to remember' }) }), _jsx(At, { top: 134, delay: 0.4, children: _jsxs("p", { className: "s26-text s26-h4", children: [comparison ? 'Look at Your' : 'Your Busiest', _jsx("br", {}), _jsx(motion.span, { className: "s26-accent", ...fadeIn(0.8), children: comparison ? 'Sales Grow.' : `Month Was ${month}.` })] }) }), _jsx(Illustration, { top: 219.5, height: 394, children: _jsx(GrowthIllustration, {}) }), _jsx(At, { top: 637, anchor: "bottom", delay: data.isVideo ? 1.5 : 4.5, children: _jsx("p", { className: "s26-text s26-body", children: comparison
|
|
63
|
+
? `Your paid orders in ${fullMonthName(comparison.comparisonMonth)} were worth ${data.growthMultiplier}× your ${fullMonthName(comparison.baselineMonth)} total.`
|
|
64
|
+
: `You recorded ${orders?.toLocaleString('en-NG')} ${isPaidOrderRecap(data) ? 'paid ' : ''}${orders === 1 ? 'order' : 'orders'} in ${month} on Huxxle.` }) })] }));
|
|
65
|
+
}
|
|
66
|
+
// TF-05 Customers (18643:59836)
|
|
67
|
+
export function CustomersSlide({ data }) {
|
|
68
|
+
const firstTime = data.firstTimeBuyers;
|
|
69
|
+
const repeat = data.repeatBuyers;
|
|
70
|
+
if (firstTime == null || repeat == null)
|
|
71
|
+
return null;
|
|
72
|
+
return (_jsxs(_Fragment, { children: [_jsx(At, { top: 100, children: _jsx("p", { className: "s26-text s26-eyebrow", children: "Your people" }) }), _jsx(At, { top: 134, delay: 0.2, children: _jsx("p", { className: "s26-text s26-h4", children: "The People Who Bought From You" }) }), _jsx(Illustration, { top: 220, height: 240, children: _jsx(CustomersIllustration, {}) }), _jsxs(At, { top: 469, anchor: "bottom", className: "s26-stack", style: { gap: 31 }, children: [_jsxs(motion.div, { className: "s26-customer-stat", ...fadeIn(1.6), children: [_jsx("p", { className: "s26-text s26-h2 s26-customer-stat__value", children: firstTime.toLocaleString('en-NG') }), _jsx("p", { className: "s26-text s26-h6", children: "First-Time Buyers" })] }), _jsx(motion.span, { className: "s26-customer-stat__divider", "aria-hidden": "true", ...fadeIn(1.8) }), _jsxs(motion.div, { className: "s26-customer-stat", ...fadeIn(2.0), children: [_jsx("p", { className: "s26-text s26-h2 s26-customer-stat__value", children: repeat.toLocaleString('en-NG') }), _jsx("p", { className: "s26-text s26-h6", children: "Buyers Who Ordered Again" })] })] }), _jsx(At, { top: 637, anchor: "bottom", delay: 2.6, children: _jsx("p", { className: "s26-text s26-body", children: repeat > 0
|
|
73
|
+
? 'Every customer who came back is part of your story on Huxxle.'
|
|
74
|
+
: 'Every first order is the start of a customer story.' }) })] }));
|
|
75
|
+
}
|
|
76
|
+
// TF-06 Favourite (18643:59886)
|
|
77
|
+
export function FavouriteSlide({ data }) {
|
|
78
|
+
const product = data.favouriteProduct;
|
|
79
|
+
return (_jsxs(_Fragment, { children: [_jsx(At, { top: 100, children: _jsx("p", { className: "s26-text s26-eyebrow", children: "Your customers fave" }) }), _jsx(Illustration, { top: 156.5, height: 372, entrance: popIn(0.25, { scale: 0.96 }), children: _jsxs("div", { className: "s26-post", children: [_jsxs("div", { className: "s26-post__header", children: [_jsx("img", { src: favouriteEmoji, alt: "", width: 32, height: 32 }), _jsx("span", { className: "s26-post__title", children: "#Customer Favorite" })] }), _jsx("div", { className: "s26-post__image", children: product.productImage && _jsx("img", { src: product.productImage, alt: product.name }) }), _jsx("div", { className: "s26-post__footer", children: _jsx("span", { className: "s26-post__heart", children: _jsx("img", { src: favouriteHeart, alt: "" }) }) })] }) }), _jsx(At, { top: 575, anchor: "bottom", delay: 0.8, children: _jsxs("p", { className: "s26-text s26-h4", children: [product.units.toLocaleString('en-NG'), " Units Sold"] }) }), _jsx(At, { top: 637, anchor: "bottom", delay: 1.0, children: _jsxs("p", { className: "s26-text s26-body", children: [_jsx("strong", { className: "s26-product-name", children: product.name }), " led your catalogue in units sold", isPaidOrderRecap(data) && ' across paid orders', "."] }) })] }));
|
|
80
|
+
}
|
|
81
|
+
// TF-07 Surprise (18678:59999)
|
|
82
|
+
export function SurpriseSlide({ data }) {
|
|
83
|
+
const weekday = data.bestWeekday;
|
|
84
|
+
const days = `${weekday.day}s`;
|
|
85
|
+
const orders = isPaidOrderRecap(data) ? 'paid orders' : 'orders';
|
|
86
|
+
const share = ((weekday.orders / data.orders) * 100).toLocaleString('en-NG', { maximumFractionDigits: 1 });
|
|
87
|
+
return (_jsxs(_Fragment, { children: [_jsx(At, { top: 100, children: _jsx("p", { className: "s26-text s26-eyebrow", children: "Did you know?" }) }), _jsxs(At, { top: 134, className: "s26-stack", style: { gap: 24 }, children: [_jsx(motion.p, { className: "s26-text s26-h2 s26-surprise__day", ...fadeIn(0.2), children: days }), _jsx(motion.p, { className: "s26-text s26-h4", ...fadeIn(0.3), children: "Were Your Busiest" })] }), _jsx(Illustration, { top: 238, height: 330, children: _jsx(SurpriseIllustration, {}) }), _jsx(At, { top: 599, anchor: "bottom", delay: 0.8, children: _jsxs("p", { className: "s26-text s26-h6", children: [weekday.orders.toLocaleString('en-NG'), " ", orders, " on ", days] }) }), _jsx(At, { top: 637, anchor: "bottom", delay: 1.0, children: _jsxs("p", { className: "s26-text s26-body", children: [share, "% of your ", orders, " were recorded on ", days, "."] }) })] }));
|
|
88
|
+
}
|
|
89
|
+
const cardRock = loop(0.6, 4, [0, 1, 2, 3, 4], { rotate: [0, 1.5, 0, -1.5, 0] }, 'easeInOut');
|
|
90
|
+
// TF-08 Milestone (18678:60043)
|
|
91
|
+
export function MilestoneSlide({ data }) {
|
|
92
|
+
const milestone = data.milestone;
|
|
93
|
+
const milestoneValue = formatMoney(milestone.amount, data.currency, { spaced: true, preserveMinorUnits: true });
|
|
94
|
+
return (_jsxs(_Fragment, { children: [_jsx(At, { top: 100, children: _jsx("p", { className: "s26-text s26-eyebrow", children: "Your order value" }) }), _jsx(Illustration, { top: 133.5, height: 330, entrance: popIn(0.1, { scale: 0.9, rotate: -6 }), children: _jsx(motion.img, { src: milestoneIllustration, alt: "", width: 343, height: 330, className: "s26-illustration-image", ...cardRock }) }), _jsxs(At, { top: 450, anchor: "bottom", className: "s26-stack s26-milestone-copy", children: [_jsx(motion.p, { className: "s26-text s26-h2 s26-accent", ...fadeIn(0.2), children: milestoneValue }), _jsx(motion.p, { className: "s26-text s26-h4", ...fadeIn(0.5), children: "You Hit a Milestone" }), _jsxs(motion.p, { className: "s26-text s26-body", ...fadeIn(0.6), children: ["You reached ", milestoneValue, " in ", isPaidOrderRecap(data) ? 'paid order value' : 'order value', " on Huxxle."] }), _jsx(motion.span, { className: "s26-chip", ...fadeIn(0.8), children: _jsx("span", { className: "s26-text s26-body", children: shortDateUpper(milestone.reachedOn) }) })] })] }));
|
|
95
|
+
}
|
|
96
|
+
// TF-09 Build-up (18679:60162)
|
|
97
|
+
export function BuildUpSlide({ data }) {
|
|
98
|
+
return (_jsxs(At, { top: 364, anchor: "middle", className: "s26-stack s26-centered", style: { gap: 24, transform: 'translateY(-50%)' }, children: [_jsxs("p", { className: "s26-text s26-eyebrow", children: ["Your ", yearOf(data), " business personality"] }), _jsx(motion.p, { className: "s26-text s26-h4 s26-lilac", ...fadeIn(0.3), children: "Everything You\u2019ve Shown Us Points to One Thing" }), _jsx(motion.span, { className: "s26-chip", ...fadeIn(1.0), children: _jsx("span", { className: "s26-text s26-body", children: "Revealing..." }) })] }));
|
|
99
|
+
}
|
|
100
|
+
const top10Chips = (data) => [
|
|
101
|
+
data.streak != null && data.streak > 0 ? `${data.streak.toLocaleString('en-NG')} Day Streak` : null,
|
|
102
|
+
data.currency === 'NGN' && (data.milestone?.amount ?? 0) >= 1000000 ? 'Joined Millionaire’s Club' : null,
|
|
103
|
+
data.busiestMonth ? `Busiest Month: ${fullMonthName(data.busiestMonth)}` : null,
|
|
104
|
+
];
|
|
105
|
+
// TF-10 Recognition (18679:60203)
|
|
106
|
+
export function RecognitionSlide({ data, art = _jsx(PlugIllustration, {}), chips: chipList, bodyClassName = 's26-body', title = data.personality?.title, description = data.personality?.description, top = 399, anchor = 'middle', compact = false, }) {
|
|
107
|
+
const chips = (chipList ?? top10Chips(data)).filter(Boolean);
|
|
108
|
+
const stackGap = compact ? 20 : 24;
|
|
109
|
+
const bodyGap = compact ? 32 : 48;
|
|
110
|
+
const artGap = compact ? 28 : 40;
|
|
111
|
+
const copyGap = compact ? 16 : 24;
|
|
112
|
+
return (_jsxs(At, { top: top, anchor: anchor, className: "s26-stack s26-centered", style: { gap: stackGap, ...(anchor === 'middle' ? { transform: 'translateY(-50%)' } : {}) }, children: [_jsxs("p", { className: "s26-text s26-eyebrow", children: ["Your ", yearOf(data), " business personality"] }), _jsxs("div", { className: "s26-stack", style: { gap: bodyGap }, children: [_jsxs("div", { className: "s26-stack s26-centered", style: { gap: artGap }, children: [_jsxs("div", { className: "s26-plug", children: [_jsx(motion.img, { src: recognitionRing, alt: "", width: 120, height: 120, className: "s26-plug__ring", ...popIn(0, { scale: 0.9 }) }), _jsx("div", { className: "s26-plug__art", children: art })] }), _jsxs("div", { className: "s26-stack s26-centered", style: { gap: copyGap }, children: [_jsx(motion.p, { className: "s26-text s26-h2 s26-accent s26-personality", ...fadeIn(1.3), children: title }), _jsx(motion.p, { className: `s26-text ${bodyClassName}`, ...fadeIn(1.6), children: description })] })] }), _jsx("div", { className: "s26-chips", children: chips.map((chip, index) => (_jsx(motion.span, { className: "s26-chip", ...fadeIn(2.0 + index * 0.2), children: _jsx("span", { className: "s26-text s26-body-sm", children: chip }) }, chip))) })] })] }));
|
|
113
|
+
}
|
|
114
|
+
// TF-11 Signature (18679:60255). Text is bottom-pinned so tall Zero order copy stays on squeezed phones.
|
|
115
|
+
export function SignatureSlide({ headline, body, bodyClassName = 's26-body' }) {
|
|
116
|
+
return (_jsxs(_Fragment, { children: [_jsx(Illustration, { top: 59, height: 354, children: _jsx(HorizonIllustration, {}) }), _jsxs(At, { bottom: 72, className: "s26-stack", style: { gap: 24 }, children: [_jsx(motion.p, { className: "s26-text s26-eyebrow", ...fadeIn(0.4), children: "Looking ahead" }), _jsxs("div", { className: "s26-stack", style: { gap: 24 }, children: [_jsx(motion.p, { className: "s26-text s26-h3 s26-lilac", ...fadeIn(1.4), children: headline ?? 'Here’s to What Comes Next' }), _jsx(motion.p, { className: `s26-text ${bodyClassName}`, ...fadeIn(2.0), children: body ?? 'Keep building, one moment at a time.' })] })] })] }));
|
|
117
|
+
}
|
|
118
|
+
function validVideoUrl(videoUrl) {
|
|
119
|
+
const url = videoUrl?.trim();
|
|
120
|
+
if (!url || !/^https?:\/\//i.test(url))
|
|
121
|
+
return undefined;
|
|
122
|
+
try {
|
|
123
|
+
new URL(url);
|
|
124
|
+
return url;
|
|
125
|
+
}
|
|
126
|
+
catch {
|
|
127
|
+
return undefined;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
// 92 Closing (18597:29592)
|
|
131
|
+
export function ClosingSlide({ data, controls, welcome = false }) {
|
|
132
|
+
const year = yearOf(data);
|
|
133
|
+
const videoUrl = validVideoUrl(data.videoUrl);
|
|
134
|
+
return (_jsxs(_Fragment, { children: [_jsx(Illustration, { top: 64, height: 310, children: _jsx(ClosingIllustration, {}) }), _jsxs(At, { top: 423, anchor: "bottom", className: "s26-stack s26-centered", style: { gap: 24 }, children: [_jsx(motion.p, { className: "s26-text s26-closing__title", ...fadeIn(1.0), initial: data.isVideo ? false : { opacity: 0 }, children: welcome ? "Make It Yours" : "Take Your Flowers" }), _jsx(motion.p, { className: "s26-text s26-body", ...fadeIn(1.2), initial: data.isVideo ? false : { opacity: 0 }, children: welcome
|
|
135
|
+
? 'Add your business details whenever you’re ready.'
|
|
136
|
+
: _jsxs(_Fragment, { children: ["Sit back and be proud of the business you're building. ", year + 1, " isn't ready for you."] }) })] }), _jsxs(At, { top: 555, anchor: "bottom", className: "s26-stack", style: { gap: 12 }, children: [_jsxs(motion.button, { type: "button", className: "s26-button s26-button--primary", disabled: !videoUrl, title: videoUrl ? undefined : 'Sharing is available when your recap video is ready', onClick: videoUrl ? () => shareRecapVideo(videoUrl, year) : undefined, ...fadeIn(1.8), children: [_jsx("img", { src: shareIcon, alt: "", width: 24, height: 24 }), _jsx("span", { className: "s26-text s26-button__label", children: "Share My Recap" })] }), _jsxs(motion.button, { type: "button", className: "s26-button s26-button--secondary", onClick: controls.restart, ...fadeIn(2.0), children: [_jsx("img", { src: replayIcon, alt: "", width: 24, height: 24 }), _jsx("span", { className: "s26-text s26-button__label", children: "Replay Recap" })] })] }), _jsx(At, { top: 687, anchor: "bottom", delay: 2.2, className: "s26-centered", children: _jsxs("p", { className: "s26-text s26-body-sm s26-closing__footer", children: ["Your ", year, " business story, powered by Huxxle"] }) })] }));
|
|
137
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { RecapData } from '../types';
|
|
2
|
+
import { type SlideProps } from './slides';
|
|
3
|
+
export declare const STEADY_ASSETS: {
|
|
4
|
+
months: string[];
|
|
5
|
+
orders: string[];
|
|
6
|
+
milestone: string[];
|
|
7
|
+
recognition: string[];
|
|
8
|
+
};
|
|
9
|
+
export declare function SteadyMonthsSlide({ data }: SlideProps): import("react/jsx-runtime").JSX.Element | null;
|
|
10
|
+
export declare function SteadyOrdersSlide({ data }: SlideProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export declare function SteadyBiggestDaySlide({ data }: SlideProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export declare function SteadyMilestoneSlide({ data }: SlideProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
/** Recognition chips shared by Steady and Fluctuating. */
|
|
14
|
+
export declare const momentumChips: (data: RecapData) => (string | null)[];
|
|
15
|
+
export declare function SteadyRecognitionSlide({ data }: SlideProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
//# sourceMappingURL=steadySlides.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"steadySlides.d.ts","sourceRoot":"","sources":["../../src/top10/steadySlides.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAW1C,OAAO,EAAwD,KAAK,UAAU,EAAU,MAAM,UAAU,CAAC;AAMzG,eAAO,MAAM,aAAa;;;;;CAKzB,CAAC;AA2BF,wBAAgB,iBAAiB,CAAC,EAAE,IAAI,EAAE,EAAE,UAAU,kDA4BrD;AAGD,wBAAgB,iBAAiB,CAAC,EAAE,IAAI,EAAE,EAAE,UAAU,2CA8BrD;AAGD,wBAAgB,qBAAqB,CAAC,EAAE,IAAI,EAAE,EAAE,UAAU,2CA4BzD;AAGD,wBAAgB,oBAAoB,CAAC,EAAE,IAAI,EAAE,EAAE,UAAU,2CA2BxD;AAED,0DAA0D;AAC1D,eAAO,MAAM,aAAa,GAAI,MAAM,SAAS,sBAK5C,CAAC;AAGF,wBAAgB,sBAAsB,CAAC,EAAE,IAAI,EAAE,EAAE,UAAU,2CAc1D"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect, useState } from 'react';
|
|
3
|
+
import { motion } from 'framer-motion';
|
|
4
|
+
import { BagIllustration, CalendarIllustration, CALENDAR_TICK_DONE_S, ILLUSTRATION_ASSETS, MilestoneCoinIllustration, SurpriseIllustration, } from './illustrations';
|
|
5
|
+
import { dayAndMonth, fullMonthName, roundCountInWords, shortDateUpper } from './format';
|
|
6
|
+
import { fadeIn, popIn } from './motion';
|
|
7
|
+
import { At, Illustration, isPaidOrderRecap, RecognitionSlide, yearOf } from './slides';
|
|
8
|
+
import treeIllustration from '../assets/steady/tree.svg';
|
|
9
|
+
/* Steady (`steady`) story frames. Slides that match Top 10 reuse its components (see registry.tsx).
|
|
10
|
+
Motion timings from docs/design/.../steady-motion.md (designer video). */
|
|
11
|
+
export const STEADY_ASSETS = {
|
|
12
|
+
months: ILLUSTRATION_ASSETS.calendar,
|
|
13
|
+
orders: ILLUSTRATION_ASSETS.bag,
|
|
14
|
+
milestone: ILLUSTRATION_ASSETS.milestoneCoin,
|
|
15
|
+
recognition: [treeIllustration],
|
|
16
|
+
};
|
|
17
|
+
/** Counts from 0 to `to` after `delay`, matching the Steady Orders video. */
|
|
18
|
+
function CountUp({ to, delay = 0.15, duration = 1.45 }) {
|
|
19
|
+
const [value, setValue] = useState(0);
|
|
20
|
+
useEffect(() => {
|
|
21
|
+
let frame = 0;
|
|
22
|
+
const startAt = performance.now() + delay * 1000;
|
|
23
|
+
const tick = (now) => {
|
|
24
|
+
if (now < startAt) {
|
|
25
|
+
frame = requestAnimationFrame(tick);
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
const t = Math.min(1, (now - startAt) / (duration * 1000));
|
|
29
|
+
const eased = 1 - (1 - t) ** 3;
|
|
30
|
+
setValue(Math.round(to * eased));
|
|
31
|
+
if (t < 1)
|
|
32
|
+
frame = requestAnimationFrame(tick);
|
|
33
|
+
};
|
|
34
|
+
frame = requestAnimationFrame(tick);
|
|
35
|
+
return () => cancelAnimationFrame(frame);
|
|
36
|
+
}, [to, delay, duration]);
|
|
37
|
+
return _jsx(_Fragment, { children: value.toLocaleString('en-NG') });
|
|
38
|
+
}
|
|
39
|
+
// Steady Months (18864:38776) — only the busiest month (most orders) is stamped (18868:181507)
|
|
40
|
+
export function SteadyMonthsSlide({ data }) {
|
|
41
|
+
if (!data.busiestMonth)
|
|
42
|
+
return null;
|
|
43
|
+
const paid = isPaidOrderRecap(data);
|
|
44
|
+
const busiestMonth = fullMonthName(data.busiestMonth);
|
|
45
|
+
return (_jsxs(_Fragment, { children: [_jsxs(At, { top: 100, className: "s26-stack", style: { gap: 24 }, children: [_jsx("p", { className: "s26-text s26-eyebrow", children: data.periodMode === 'preview' ? 'Across completed months' : 'Month after month' }), _jsxs(motion.p, { className: "s26-text s26-h4", ...fadeIn(0.25), children: [paid ? 'Paid Orders' : 'Orders', " in ", data.activeMonths, " Months"] })] }), _jsx(Illustration, { top: 231.5, height: 394, children: _jsx(CalendarIllustration, { month: data.busiestMonth }) }), _jsx(At, { top: 661, anchor: "bottom", delay: CALENDAR_TICK_DONE_S + 0.2, children: _jsx("p", { className: "s26-text s26-body s26-body--strong", children: data.activeMonths === 12
|
|
46
|
+
? `You recorded at least one ${paid ? 'paid ' : ''}order in every month of ${yearOf(data)}.`
|
|
47
|
+
: `${busiestMonth} had the most ${paid ? 'paid ' : ''}orders of those months.` }) })] }));
|
|
48
|
+
}
|
|
49
|
+
// Steady Orders (18864:38934)
|
|
50
|
+
export function SteadyOrdersSlide({ data }) {
|
|
51
|
+
const orders = data.orders.toLocaleString('en-NG');
|
|
52
|
+
const ordersLabel = isPaidOrderRecap(data) ? 'paid orders' : 'orders';
|
|
53
|
+
return (_jsxs(_Fragment, { children: [_jsxs(At, { top: 100, className: "s26-stack", style: { gap: 24 }, children: [_jsx("p", { className: "s26-text s26-eyebrow", children: "Your order count" }), _jsxs(motion.div, { className: "s26-steady-count", ...fadeIn(0.15), children: [_jsx("p", { className: "s26-text s26-h2 s26-steady-count__value", children: _jsx(CountUp, { to: data.orders, delay: 0.2, duration: 1.45 }) }), _jsx("p", { className: "s26-text s26-body", children: ordersLabel })] }), _jsxs(motion.p, { className: "s26-text s26-h4", ...fadeIn(0.55), children: ["Your Customers", _jsx("br", {}), "Showed Up"] })] }), _jsx(Illustration, { top: 260, height: 394, children: _jsx(BagIllustration, {}) }), _jsx(At, { top: 661, anchor: "bottom", delay: 1.8, children: _jsxs("p", { className: "s26-text s26-body", children: ["That's ", orders, " ", ordersLabel, " recorded on Huxxle."] }) })] }));
|
|
54
|
+
}
|
|
55
|
+
// Steady Biggest Day (18864:38743): the Top 10 cash rain on the secondary theme
|
|
56
|
+
export function SteadyBiggestDaySlide({ data }) {
|
|
57
|
+
const day = data.biggestDay;
|
|
58
|
+
const date = dayAndMonth(day.date);
|
|
59
|
+
const ordersLabel = day.orders === 1 ? 'order' : 'orders';
|
|
60
|
+
return (_jsxs(_Fragment, { children: [_jsx(At, { top: 100, children: _jsx("p", { className: "s26-text s26-eyebrow", children: "Your biggest day" }) }), _jsxs(At, { top: 134, className: "s26-stack", style: { gap: 24 }, children: [_jsx(motion.p, { className: "s26-text s26-h2 s26-steady-day__date", ...fadeIn(0.2), children: date }), _jsx(motion.p, { className: "s26-text s26-h4", ...fadeIn(0.4), children: "was one for the books." })] }), _jsx(Illustration, { top: 238, height: 330, children: _jsx(SurpriseIllustration, {}) }), _jsx(At, { top: 685, anchor: "bottom", delay: 1.0, children: _jsxs("p", { className: "s26-text s26-body s26-body--strong s26-steady-day__body", children: ["You recorded ", day.orders.toLocaleString('en-NG'), " ", isPaidOrderRecap(data) && 'paid ', ordersLabel, " on ", date, "."] }) })] }));
|
|
61
|
+
}
|
|
62
|
+
// Steady Milestone (18864:39023) — coin scales in, then mc-shimmer sweeps across (designer video)
|
|
63
|
+
export function SteadyMilestoneSlide({ data }) {
|
|
64
|
+
const milestone = data.orderMilestone;
|
|
65
|
+
const paid = isPaidOrderRecap(data);
|
|
66
|
+
return (_jsxs(_Fragment, { children: [_jsxs(At, { top: 100, className: "s26-stack", style: { gap: 24 }, children: [_jsx("p", { className: "s26-text s26-eyebrow", children: "Milestone" }), _jsxs(motion.p, { className: "s26-text s26-h4", ...fadeIn(0.25), children: ["And Then Came", _jsx("br", {}), paid ? 'Paid Order' : 'Order', " Number ", milestone.orders.toLocaleString('en-NG'), "."] })] }), _jsx(Illustration, { top: 205, height: 326, children: _jsx(MilestoneCoinIllustration, {}) }), _jsxs(At, { top: 556.5, anchor: "bottom", className: "s26-stack", style: { gap: 40 }, children: [_jsx(motion.p, { className: "s26-text s26-h4", ...fadeIn(1.1), children: shortDateUpper(milestone.reachedOn) }), _jsxs(motion.p, { className: "s26-text s26-body s26-body--strong", ...fadeIn(1.4), children: [roundCountInWords(milestone.orders), " ", paid && 'paid ', "orders recorded on Huxxle. A milestone worth remembering."] })] })] }));
|
|
67
|
+
}
|
|
68
|
+
/** Recognition chips shared by Steady and Fluctuating. */
|
|
69
|
+
export const momentumChips = (data) => [
|
|
70
|
+
data.growthComparison && (data.growthMultiplier ?? 0) > 1
|
|
71
|
+
? `${data.growthMultiplier}× paid order value (${data.growthComparison.baselineMonth.slice(0, 3)} → ${data.growthComparison.comparisonMonth.slice(0, 3)})`
|
|
72
|
+
: null,
|
|
73
|
+
data.busiestMonth ? `Busiest Month: ${fullMonthName(data.busiestMonth)}` : null,
|
|
74
|
+
];
|
|
75
|
+
// Steady Recognition (18776:6124): the Top 10 layout with the tree and Steady stats
|
|
76
|
+
export function SteadyRecognitionSlide({ data }) {
|
|
77
|
+
return (_jsx(RecognitionSlide, { data: data, title: "The Constant", art: _jsx(motion.div, { className: "s26-steady-tree", ...popIn(0.3, { scale: 0.8 }), children: _jsx("img", { src: treeIllustration, alt: "", width: 89.64, height: 82.2026 }) }), chips: momentumChips(data), bodyClassName: "s26-body s26-body--strong" }));
|
|
78
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { RefObject } from 'react';
|
|
2
|
+
export declare const CANVAS_WIDTH = 375;
|
|
3
|
+
export declare const CANVAS_HEIGHT = 770;
|
|
4
|
+
export interface CanvasFit {
|
|
5
|
+
scale: number;
|
|
6
|
+
/** Canvas px removed from the middle of each slide so phones fill the screen width. */
|
|
7
|
+
squeeze: number;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Fits the 375×770 design canvas into the element. Desktop keeps the full canvas;
|
|
11
|
+
* phones always fill the width and shorten the canvas by up to MAX_SQUEEZE instead.
|
|
12
|
+
*/
|
|
13
|
+
export declare function useCanvasScale(ref: RefObject<HTMLElement | null>, fillPortrait?: boolean): CanvasFit;
|
|
14
|
+
export declare const CanvasSqueezeContext: import("react").Context<number>;
|
|
15
|
+
export declare const useCanvasSqueeze: () => number;
|
|
16
|
+
/** How far content below the illustration must move up (and the illustration shrink) to stay on screen. */
|
|
17
|
+
export declare const useContentShift: () => number;
|
|
18
|
+
//# sourceMappingURL=useCanvasScale.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useCanvasScale.d.ts","sourceRoot":"","sources":["../../src/top10/useCanvasScale.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,eAAO,MAAM,YAAY,MAAM,CAAC;AAChC,eAAO,MAAM,aAAa,MAAM,CAAC;AAMjC,MAAM,WAAW,SAAS;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,uFAAuF;IACvF,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,EAAE,YAAY,UAAQ,GAAG,SAAS,CAoClG;AAKD,eAAO,MAAM,oBAAoB,iCAAmB,CAAC;AACrD,eAAO,MAAM,gBAAgB,cAAyC,CAAC;AAEvE,2GAA2G;AAC3G,eAAO,MAAM,eAAe,cAAuD,CAAC"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { createContext, useContext, useLayoutEffect, useState } from 'react';
|
|
2
|
+
export const CANVAS_WIDTH = 375;
|
|
3
|
+
export const CANVAS_HEIGHT = 770;
|
|
4
|
+
/** Most the canvas may shorten on phones before falling back to letterboxing. */
|
|
5
|
+
const MAX_SQUEEZE = 120;
|
|
6
|
+
const PHONE_MAX_WIDTH = 600;
|
|
7
|
+
/**
|
|
8
|
+
* Fits the 375×770 design canvas into the element. Desktop keeps the full canvas;
|
|
9
|
+
* phones always fill the width and shorten the canvas by up to MAX_SQUEEZE instead.
|
|
10
|
+
*/
|
|
11
|
+
export function useCanvasScale(ref, fillPortrait = false) {
|
|
12
|
+
const [fit, setFit] = useState({ scale: 1, squeeze: 0 });
|
|
13
|
+
useLayoutEffect(() => {
|
|
14
|
+
const element = ref.current;
|
|
15
|
+
if (!element)
|
|
16
|
+
return;
|
|
17
|
+
const update = () => {
|
|
18
|
+
const { width, height } = element.getBoundingClientRect();
|
|
19
|
+
const canvas = element.querySelector(':scope > *');
|
|
20
|
+
const topInset = canvas ? parseFloat(getComputedStyle(canvas).top) || 0 : 0;
|
|
21
|
+
const available = height - topInset;
|
|
22
|
+
if (!width || available <= 0)
|
|
23
|
+
return;
|
|
24
|
+
const widthScale = width / CANVAS_WIDTH;
|
|
25
|
+
const fullFit = Math.min(widthScale, available / CANVAS_HEIGHT);
|
|
26
|
+
if ((!fillPortrait && width > PHONE_MAX_WIDTH) || fullFit === widthScale) {
|
|
27
|
+
setFit({ scale: fullFit, squeeze: 0 });
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
const squeeze = CANVAS_HEIGHT - available / widthScale;
|
|
31
|
+
if (squeeze <= MAX_SQUEEZE) {
|
|
32
|
+
setFit({ scale: widthScale, squeeze });
|
|
33
|
+
}
|
|
34
|
+
else {
|
|
35
|
+
setFit({ scale: available / (CANVAS_HEIGHT - MAX_SQUEEZE), squeeze: MAX_SQUEEZE });
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
update();
|
|
39
|
+
const observer = new ResizeObserver(update);
|
|
40
|
+
observer.observe(element);
|
|
41
|
+
return () => observer.disconnect();
|
|
42
|
+
}, [ref, fillPortrait]);
|
|
43
|
+
return fit;
|
|
44
|
+
}
|
|
45
|
+
/** Empty space under every slide's last line (it ends around y 697) that can absorb squeeze first. */
|
|
46
|
+
const BOTTOM_SLACK = 46;
|
|
47
|
+
export const CanvasSqueezeContext = createContext(0);
|
|
48
|
+
export const useCanvasSqueeze = () => useContext(CanvasSqueezeContext);
|
|
49
|
+
/** How far content below the illustration must move up (and the illustration shrink) to stay on screen. */
|
|
50
|
+
export const useContentShift = () => Math.max(0, useCanvasSqueeze() - BOTTOM_SLACK);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type SlideProps } from './slides';
|
|
2
|
+
export declare function ZeroOrderIntroSlide({ data }: SlideProps): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export declare function ZeroOrderFirstChapterSlide({ joinedOn }: {
|
|
4
|
+
joinedOn?: string;
|
|
5
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export declare function ZeroOrderProductsSlide({ data }: SlideProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare function ZeroOrderOnlineSlide({ data }: SlideProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare function ZeroOrderSignatureSlide({ data }: SlideProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
//# sourceMappingURL=zeroOrderSlides.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"zeroOrderSlides.d.ts","sourceRoot":"","sources":["../../src/top10/zeroOrderSlides.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAgD,KAAK,UAAU,EAAE,MAAM,UAAU,CAAC;AAKzF,wBAAgB,mBAAmB,CAAC,EAAE,IAAI,EAAE,EAAE,UAAU,2CASvD;AAGD,wBAAgB,0BAA0B,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAE,2CAqB7E;AAGD,wBAAgB,sBAAsB,CAAC,EAAE,IAAI,EAAE,EAAE,UAAU,2CAkC1D;AAGD,wBAAgB,oBAAoB,CAAC,EAAE,IAAI,EAAE,EAAE,UAAU,2CAwBxD;AAGD,wBAAgB,uBAAuB,CAAC,EAAE,IAAI,EAAE,EAAE,UAAU,2CAS3D"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { motion } from 'framer-motion';
|
|
3
|
+
import { CatalogueIllustration, OpenSignIllustration, StorefrontIllustration } from './illustrations';
|
|
4
|
+
import { dayAndMonth } from './format';
|
|
5
|
+
import { fadeIn } from './motion';
|
|
6
|
+
import { At, Illustration, IntroSlide, SignatureSlide } from './slides';
|
|
7
|
+
/* Zero order (`zero_order`) story frames. Motion from docs/design/.../zero-order-motion.md. */
|
|
8
|
+
// Zero order Intro (19039:4065): the Top 10 opening with new copy
|
|
9
|
+
export function ZeroOrderIntroSlide({ data }) {
|
|
10
|
+
return (_jsx(IntroSlide, { data: data, headline: `${data.businessName}, Your Story Is Taking Shape.`, body: "Here\u2019s a look at your business on Huxxle so far.", bodyClassName: "s26-intro__body s26-body--strong" }));
|
|
11
|
+
}
|
|
12
|
+
// Use the First Chapter frame for account creation when storefront opening is unknown.
|
|
13
|
+
export function ZeroOrderFirstChapterSlide({ joinedOn }) {
|
|
14
|
+
return (_jsxs(_Fragment, { children: [_jsxs(At, { top: 100, className: "s26-stack", style: { gap: 24 }, children: [_jsx("p", { className: "s26-text s26-eyebrow", children: "Your first chapter" }), _jsx(motion.p, { className: "s26-text s26-h4", ...fadeIn(0.25), children: joinedOn ? 'You Joined Huxxle.' : 'Your Story on Huxxle.' })] }), _jsx(Illustration, { top: 216.77, height: 320, children: _jsx(OpenSignIllustration, {}) }), _jsx(At, { top: 556.5, anchor: "bottom", delay: 1.2, children: _jsx("p", { className: "s26-text s26-body s26-body--strong", children: joinedOn
|
|
15
|
+
? `Your account was created on ${dayAndMonth(joinedOn)} ${joinedOn.slice(0, 4)}.`
|
|
16
|
+
: 'Make Huxxle a place for your business, one step at a time.' }) })] }));
|
|
17
|
+
}
|
|
18
|
+
// Zero order Products (19039:4935): empty + slot, then product card stamps in
|
|
19
|
+
export function ZeroOrderProductsSlide({ data }) {
|
|
20
|
+
const products = data.catalogueProducts;
|
|
21
|
+
const hasProducts = products !== undefined && Number.isSafeInteger(products) && products > 0;
|
|
22
|
+
return (_jsxs(_Fragment, { children: [_jsxs(At, { top: 100, className: "s26-stack", style: { gap: 24 }, children: [_jsx("p", { className: "s26-text s26-eyebrow", children: "Your store" }), _jsxs(motion.p, { className: "s26-text s26-h4", ...fadeIn(0.25), children: ["Your Product", _jsx("br", {}), "Catalogue."] })] }), _jsx(Illustration, { top: 230.5, height: 354, children: _jsx(CatalogueIllustration, {}) }), _jsx(At, { top: 618, anchor: "bottom", delay: 1.4, children: _jsx("p", { className: "s26-text s26-body", children: hasProducts ? (_jsxs(_Fragment, { children: ["You have ", products.toLocaleString('en-NG'), " ", products === 1 ? 'entry' : 'entries', " in your Huxxle catalogue.", _jsx("br", {}), "Keep your product details up to date as your business changes."] })) : products === 0 ? ('Your catalogue is empty. Add your first product whenever you’re ready.') : ('Use your catalogue to show what your business offers.') }) })] }));
|
|
23
|
+
}
|
|
24
|
+
// Zero order Digital presence (19039:4947): storefront pops in, then soft bob
|
|
25
|
+
export function ZeroOrderOnlineSlide({ data }) {
|
|
26
|
+
const readyToShare = data.storefrontReady === true;
|
|
27
|
+
return (_jsxs(_Fragment, { children: [_jsxs(At, { top: 100, className: "s26-stack", style: { gap: 24 }, children: [_jsx("p", { className: "s26-text s26-eyebrow", children: "Your store online" }), _jsxs(motion.p, { className: "s26-text s26-h4", ...fadeIn(0.25), children: [readyToShare ? 'Your Store Has a' : 'A Place for Your', _jsx("br", {}), readyToShare ? 'Place Online.' : 'Store Online.'] })] }), _jsx(Illustration, { top: 210, height: 354, children: _jsx(StorefrontIllustration, {}) }), _jsx(At, { top: 618, anchor: "bottom", delay: 1.4, children: _jsx("p", { className: "s26-text s26-body", children: readyToShare
|
|
28
|
+
? _jsxs(_Fragment, { children: ["Your Huxxle storefront is ready to share.", _jsx("br", {}), "A place for people to find what you offer."] })
|
|
29
|
+
: 'With a Huxxle storefront, customers can browse what you offer in one place.' }) })] }));
|
|
30
|
+
}
|
|
31
|
+
// Zero order Signature (19039:5276): the Top 10 horizon with new copy
|
|
32
|
+
export function ZeroOrderSignatureSlide({ data }) {
|
|
33
|
+
return (_jsx(SignatureSlide, { data: data, headline: "There's Still Plenty of Story Left to Write.", body: "Take the next step when it works for your business.", bodyClassName: "s26-body s26-body--strong" }));
|
|
34
|
+
}
|
package/dist/types.d.ts
CHANGED
|
@@ -1,31 +1,90 @@
|
|
|
1
|
+
import type { RecapCategory } from './categories';
|
|
1
2
|
export type AuthStep = 'login' | 'otp' | 'recap';
|
|
2
|
-
|
|
3
|
+
/** 2026 category key, or a legacy 2025 backend value (mapped in `resolveRecapCategory`). */
|
|
4
|
+
export type BusinessCategory = 'thriving' | 'not_thriving' | 'new_user' | RecapCategory;
|
|
3
5
|
export interface RecapData {
|
|
4
6
|
businessName: string;
|
|
5
|
-
days: number;
|
|
6
|
-
streak: number;
|
|
7
|
-
revenue: number;
|
|
8
|
-
orders: number;
|
|
9
|
-
firstTimeBuyers: number;
|
|
10
|
-
repeatBuyers: number;
|
|
11
|
-
topCustomerName: string;
|
|
12
7
|
businessCategory: BusinessCategory;
|
|
13
|
-
|
|
14
|
-
busiestMonth: string;
|
|
8
|
+
orders: number;
|
|
15
9
|
videoUrl: string;
|
|
16
|
-
|
|
10
|
+
/** Customer-favourite product (Favourite slide). One product only. */
|
|
11
|
+
favouriteProduct?: ProductSummary;
|
|
12
|
+
/** Chrome avatar; falls back to a default if omitted. */
|
|
13
|
+
businessLogo?: string;
|
|
17
14
|
currency?: string;
|
|
18
15
|
year?: number;
|
|
16
|
+
periodMode?: 'preview' | 'final';
|
|
17
|
+
/** Last completed calendar month in the recap period, or 0 before January closes. */
|
|
18
|
+
completedMonths?: number;
|
|
19
|
+
isVideo?: boolean;
|
|
20
|
+
slideDurations?: Record<string, number>;
|
|
21
|
+
streak?: number;
|
|
22
|
+
firstTimeBuyers?: number;
|
|
23
|
+
repeatBuyers?: number;
|
|
24
|
+
busiestMonth?: string;
|
|
25
|
+
biggestDay?: RecapBiggestDay;
|
|
26
|
+
growthMultiplier?: number;
|
|
27
|
+
/** Comparable completed months in this recap year, e.g. Jan and Dec. */
|
|
28
|
+
growthComparison?: {
|
|
29
|
+
baselineMonth: string;
|
|
30
|
+
comparisonMonth: string;
|
|
31
|
+
};
|
|
32
|
+
bestWeekday?: RecapBestWeekday;
|
|
33
|
+
milestone?: RecapMilestone;
|
|
34
|
+
personality?: RecapPersonality;
|
|
35
|
+
activeMonths?: number;
|
|
36
|
+
/** Selling months from the completed part of the recap period, numbered 1 to 12. */
|
|
37
|
+
sellingMonths?: number[];
|
|
38
|
+
orderMilestone?: RecapOrderMilestone;
|
|
39
|
+
orderPaceMultiplier?: number;
|
|
40
|
+
totalCustomers?: number;
|
|
41
|
+
busiestMonthOrders?: number;
|
|
42
|
+
storeOpenedOn?: string;
|
|
43
|
+
firstOrderOn?: string;
|
|
44
|
+
websiteVisits?: number;
|
|
45
|
+
storefrontOrders?: number;
|
|
46
|
+
daysOnHuxxle?: number;
|
|
47
|
+
/** Verified Huxxle account creation date as a WAT calendar date. */
|
|
48
|
+
accountJoinedOn?: string;
|
|
49
|
+
hasBusinessProfile?: boolean;
|
|
50
|
+
manualVideoPlayback?: boolean;
|
|
51
|
+
catalogueProducts?: number;
|
|
52
|
+
/** Only true when the storefront is independently verified as ready to share. */
|
|
53
|
+
storefrontReady?: boolean;
|
|
54
|
+
days?: number;
|
|
55
|
+
revenue?: number;
|
|
56
|
+
topCustomerName?: string;
|
|
57
|
+
downloadUrl?: string;
|
|
19
58
|
introHeadline?: string;
|
|
20
59
|
introSubtitle?: string;
|
|
21
|
-
slideDurations?: Record<string, number>;
|
|
22
|
-
isVideo?: boolean;
|
|
23
60
|
productImages?: string[];
|
|
24
61
|
websiteLink?: string;
|
|
25
|
-
websiteVisits?: number;
|
|
26
62
|
mostViewedProduct?: string;
|
|
27
63
|
mostViewedProductCount?: number;
|
|
28
64
|
}
|
|
65
|
+
export interface RecapOrderMilestone {
|
|
66
|
+
orders: number;
|
|
67
|
+
reachedOn: string;
|
|
68
|
+
}
|
|
69
|
+
export interface RecapBiggestDay {
|
|
70
|
+
date: string;
|
|
71
|
+
orders: number;
|
|
72
|
+
/** Value of the selected orders in major currency units, when supported. */
|
|
73
|
+
revenue?: number;
|
|
74
|
+
}
|
|
75
|
+
export interface RecapBestWeekday {
|
|
76
|
+
day: string;
|
|
77
|
+
salesShare: number;
|
|
78
|
+
orders: number;
|
|
79
|
+
}
|
|
80
|
+
export interface RecapMilestone {
|
|
81
|
+
amount: number;
|
|
82
|
+
reachedOn: string;
|
|
83
|
+
}
|
|
84
|
+
export interface RecapPersonality {
|
|
85
|
+
title: string;
|
|
86
|
+
description: string;
|
|
87
|
+
}
|
|
29
88
|
export interface ProductSummary {
|
|
30
89
|
name: string;
|
|
31
90
|
units: number;
|
|
@@ -36,6 +95,7 @@ export declare const AUTH_STEPS: {
|
|
|
36
95
|
OTP: AuthStep;
|
|
37
96
|
RECAP: AuthStep;
|
|
38
97
|
};
|
|
98
|
+
/** @deprecated Prefer 2026 keys (`top_10`, `fluctuating`, `low_data`). Kept for legacy API values. */
|
|
39
99
|
export declare const BUSINESS_CATEGORIES: {
|
|
40
100
|
THRIVING: BusinessCategory;
|
|
41
101
|
NOT_THRIVING: BusinessCategory;
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAElD,MAAM,MAAM,QAAQ,GAAG,OAAO,GAAG,KAAK,GAAG,OAAO,CAAC;AAEjD,4FAA4F;AAC5F,MAAM,MAAM,gBAAgB,GAAG,UAAU,GAAG,cAAc,GAAG,UAAU,GAAG,aAAa,CAAC;AAExF,MAAM,WAAW,SAAS;IACxB,YAAY,EAAE,MAAM,CAAC;IACrB,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IAEjB,sEAAsE;IACtE,gBAAgB,CAAC,EAAE,cAAc,CAAC;IAElC,yDAAyD;IACzD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,SAAS,GAAG,OAAO,CAAC;IACjC,qFAAqF;IACrF,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAGxC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,eAAe,CAAC;IAC7B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,wEAAwE;IACxE,gBAAgB,CAAC,EAAE;QAAE,aAAa,EAAE,MAAM,CAAC;QAAC,eAAe,EAAE,MAAM,CAAA;KAAE,CAAC;IACtE,WAAW,CAAC,EAAE,gBAAgB,CAAC;IAC/B,SAAS,CAAC,EAAE,cAAc,CAAC;IAC3B,WAAW,CAAC,EAAE,gBAAgB,CAAC;IAG/B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,oFAAoF;IACpF,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IACzB,cAAc,CAAC,EAAE,mBAAmB,CAAC;IACrC,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAG7B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAG5B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,YAAY,CAAC,EAAE,MAAM,CAAC;IAGtB,oEAAoE;IACpE,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,iFAAiF;IACjF,eAAe,CAAC,EAAE,OAAO,CAAC;IAG1B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IACzB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,sBAAsB,CAAC,EAAE,MAAM,CAAC;CACjC;AAED,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,4EAA4E;IAC5E,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,gBAAgB;IAC/B,GAAG,EAAE,MAAM,CAAC;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,UAAU;WACH,QAAQ;SACZ,QAAQ;WACJ,QAAQ;CAC3B,CAAC;AAEF,sGAAsG;AACtG,eAAO,MAAM,mBAAmB;cACN,gBAAgB;kBACR,gBAAgB;cACxB,gBAAgB;CACzC,CAAC"}
|
package/dist/types.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
// Type definitions for the Huxxle Recap app
|
|
2
1
|
export const AUTH_STEPS = {
|
|
3
2
|
LOGIN: 'login',
|
|
4
3
|
OTP: 'otp',
|
|
5
4
|
RECAP: 'recap'
|
|
6
5
|
};
|
|
6
|
+
/** @deprecated Prefer 2026 keys (`top_10`, `fluctuating`, `low_data`). Kept for legacy API values. */
|
|
7
7
|
export const BUSINESS_CATEGORIES = {
|
|
8
8
|
THRIVING: 'thriving',
|
|
9
9
|
NOT_THRIVING: 'not_thriving',
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Helpers.d.ts","sourceRoot":"","sources":["../../src/utils/Helpers.tsx"],"names":[],"mappings":"AAOA;;;;GAIG;AACH,eAAO,MAAM,YAAY,GAAI,OAAO,MAAM,YAYzC,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { jwtDecode } from "jwt-decode";
|
|
2
|
+
/**
|
|
3
|
+
* Validate if the token is valid or has expired
|
|
4
|
+
* @param token the jwt token
|
|
5
|
+
* @returns boolean
|
|
6
|
+
*/
|
|
7
|
+
export const isTokenValid = (token) => {
|
|
8
|
+
try {
|
|
9
|
+
if (!token)
|
|
10
|
+
return false;
|
|
11
|
+
const decoded = jwtDecode(token);
|
|
12
|
+
if (Date.now() >= decoded.exp * 1000) {
|
|
13
|
+
return false;
|
|
14
|
+
}
|
|
15
|
+
return true;
|
|
16
|
+
}
|
|
17
|
+
catch (error) {
|
|
18
|
+
console.error("Token decoding failed:", error);
|
|
19
|
+
return false;
|
|
20
|
+
}
|
|
21
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RecapApi.d.ts","sourceRoot":"","sources":["../../src/utils/RecapApi.tsx"],"names":[],"mappings":"AAMA,QAAA,MAAM,QAAQ,qCA+Bb,CAAC;AACF,eAAe,QAAQ,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/// <reference types="vite/client" />
|
|
2
|
+
import axios from "axios";
|
|
3
|
+
import { isTokenValid } from "./Helpers";
|
|
4
|
+
import { useAuthStore } from "../store/auth";
|
|
5
|
+
const RecapApi = () => {
|
|
6
|
+
let headers = {};
|
|
7
|
+
const token = useAuthStore.getState().token ||
|
|
8
|
+
(() => {
|
|
9
|
+
const userAuthStore = localStorage.getItem("auth-storage");
|
|
10
|
+
if (userAuthStore) {
|
|
11
|
+
const parsedAuthStore = JSON.parse(userAuthStore);
|
|
12
|
+
return parsedAuthStore.token;
|
|
13
|
+
}
|
|
14
|
+
return null; // Return null if token is not found in either store or localStorage
|
|
15
|
+
})();
|
|
16
|
+
if (token) {
|
|
17
|
+
if (!isTokenValid(token)) {
|
|
18
|
+
sessionStorage.removeItem("auth-storage");
|
|
19
|
+
localStorage.removeItem("auth-storage"); // Also clear from local storage
|
|
20
|
+
window.location.href = "/";
|
|
21
|
+
}
|
|
22
|
+
headers = {
|
|
23
|
+
Authorization: `Bearer ${token}`,
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
const baseURL = import.meta.env.VITE_REACT_APP_KATAJERE_BASE_URL || "";
|
|
27
|
+
const axiosInstance = axios.create({
|
|
28
|
+
baseURL,
|
|
29
|
+
timeout: 60000, // Default timeout (will be overridden by interceptor)
|
|
30
|
+
headers,
|
|
31
|
+
withCredentials: true, // Enable cross-origin cookie handling for SSO
|
|
32
|
+
});
|
|
33
|
+
return axiosInstance;
|
|
34
|
+
};
|
|
35
|
+
export default RecapApi;
|