@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
|
@@ -1,41 +1,17 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { motion
|
|
3
|
-
import { formatCurrency } from '../utils';
|
|
2
|
+
import { motion } from 'framer-motion';
|
|
4
3
|
import { BUSINESS_CATEGORIES, BusinessCategory } from '../types';
|
|
5
4
|
import { recapCopy } from '../data/recapCopy';
|
|
5
|
+
import { MONEY_RAIN_GIF_URL } from '../data/remoteAssets';
|
|
6
|
+
import { useCountUp, withThousandsSeparators } from '../hooks/useCountUp';
|
|
6
7
|
import './Slide3Revenue.css';
|
|
7
8
|
|
|
8
|
-
// External CDN URL for raining money GIF (reduces package size)
|
|
9
|
-
const moneyRainGif = "https://katajereassets.blob.core.windows.net/recap-videos/raining-money.gif";
|
|
10
|
-
|
|
11
9
|
interface Slide3RevenueProps {
|
|
12
10
|
revenue: number;
|
|
13
11
|
businessCategory: BusinessCategory;
|
|
14
12
|
currency?: string;
|
|
15
13
|
}
|
|
16
14
|
|
|
17
|
-
/**
|
|
18
|
-
* Custom hook for number counter animation with formatting
|
|
19
|
-
*/
|
|
20
|
-
function useCountAnimation(target: number, duration: number = 2, delay: number = 0) {
|
|
21
|
-
const count = useMotionValue(0);
|
|
22
|
-
const formatted = useTransform(count, (latest) =>
|
|
23
|
-
Math.round(latest).toLocaleString()
|
|
24
|
-
);
|
|
25
|
-
|
|
26
|
-
React.useEffect(() => {
|
|
27
|
-
const controls = animate(count, target, {
|
|
28
|
-
duration,
|
|
29
|
-
delay,
|
|
30
|
-
ease: 'easeOut',
|
|
31
|
-
});
|
|
32
|
-
|
|
33
|
-
return controls.stop;
|
|
34
|
-
}, [count, target, duration, delay]);
|
|
35
|
-
|
|
36
|
-
return formatted;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
15
|
/**
|
|
40
16
|
* Slide3Revenue - Revenue display with money rain overlay
|
|
41
17
|
*/
|
|
@@ -44,7 +20,7 @@ function Slide3Revenue({ revenue, businessCategory, currency }: Slide3RevenuePro
|
|
|
44
20
|
const footerText = copy.revenueFooter;
|
|
45
21
|
|
|
46
22
|
// Counter animation for revenue
|
|
47
|
-
const revenueCount =
|
|
23
|
+
const revenueCount = useCountUp(revenue, { duration: 1.6, delay: 0.4, format: withThousandsSeparators }); // 1.6s + 0.4s delay = 2s total
|
|
48
24
|
|
|
49
25
|
// Get currency symbol
|
|
50
26
|
const getCurrencySymbol = (curr?: string) => {
|
|
@@ -62,7 +38,7 @@ function Slide3Revenue({ revenue, businessCategory, currency }: Slide3RevenuePro
|
|
|
62
38
|
{/* Money rain overlay */}
|
|
63
39
|
<div
|
|
64
40
|
className="slide3-revenue__overlay"
|
|
65
|
-
style={{ backgroundImage: `url(${
|
|
41
|
+
style={{ backgroundImage: `url(${MONEY_RAIN_GIF_URL})` }}
|
|
66
42
|
aria-hidden="true"
|
|
67
43
|
/>
|
|
68
44
|
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { motion
|
|
2
|
+
import { motion } from 'framer-motion';
|
|
3
|
+
import { useCountUp } from '../hooks/useCountUp';
|
|
4
|
+
import { frameImageStyle, useRandomFrameImages } from '../hooks/useFrameImages';
|
|
3
5
|
import './Slide4Orders.css';
|
|
4
6
|
|
|
5
7
|
interface Slide4OrdersProps {
|
|
@@ -7,52 +9,19 @@ interface Slide4OrdersProps {
|
|
|
7
9
|
frameImages?: string[];
|
|
8
10
|
}
|
|
9
11
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
React.useEffect(() => {
|
|
18
|
-
const controls = animate(count, target, {
|
|
19
|
-
duration,
|
|
20
|
-
delay,
|
|
21
|
-
ease: 'easeOut',
|
|
22
|
-
});
|
|
23
|
-
|
|
24
|
-
return controls.stop;
|
|
25
|
-
}, [count, target, duration, delay]);
|
|
26
|
-
|
|
27
|
-
return rounded;
|
|
28
|
-
}
|
|
12
|
+
const rectGroups = [
|
|
13
|
+
{ id: 'group-1', rects: ['r5', 'r6', 'r7', 'r8'], groupClass: 'group-1' },
|
|
14
|
+
{ id: 'group-2', rects: ['r1', 'r2', 'r3', 'r4'], groupClass: 'group-2' },
|
|
15
|
+
{ id: 'group-3', rects: ['r10', 'r11', 'r12'], groupClass: 'group-3' }
|
|
16
|
+
];
|
|
17
|
+
const totalRects = rectGroups.reduce((sum, group) => sum + group.rects.length, 0);
|
|
29
18
|
|
|
30
19
|
/**
|
|
31
20
|
* Slide4Orders - Emphasizes the order volume with rotated card outlines in the background
|
|
32
21
|
*/
|
|
33
22
|
function Slide4Orders({ orders, frameImages }: Slide4OrdersProps) {
|
|
34
|
-
const ordersCount =
|
|
35
|
-
const
|
|
36
|
-
{ id: 'group-1', rects: ['r5', 'r6', 'r7', 'r8'], groupClass: 'group-1' },
|
|
37
|
-
{ id: 'group-2', rects: ['r1', 'r2', 'r3', 'r4'], groupClass: 'group-2' },
|
|
38
|
-
{ id: 'group-3', rects: ['r10', 'r11', 'r12'], groupClass: 'group-3' }
|
|
39
|
-
];
|
|
40
|
-
|
|
41
|
-
const frameImagePool = React.useMemo(() => {
|
|
42
|
-
return frameImages && frameImages.length > 0 ? frameImages : [];
|
|
43
|
-
}, [frameImages]);
|
|
44
|
-
|
|
45
|
-
const totalRects = rectGroups.reduce((sum, group) => sum + group.rects.length, 0);
|
|
46
|
-
|
|
47
|
-
const rectImageAssignments = React.useMemo(() => {
|
|
48
|
-
if (!frameImagePool.length) {
|
|
49
|
-
return [];
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
return Array.from({ length: totalRects }, () =>
|
|
53
|
-
frameImagePool[Math.floor(Math.random() * frameImagePool.length)]
|
|
54
|
-
);
|
|
55
|
-
}, [frameImagePool, totalRects]);
|
|
23
|
+
const ordersCount = useCountUp(orders, { duration: 1.6, delay: 0.4 }); // 1.6s + 0.4s delay = 2s total
|
|
24
|
+
const rectImageAssignments = useRandomFrameImages(frameImages, totalRects);
|
|
56
25
|
|
|
57
26
|
return (
|
|
58
27
|
<div className="slide4-orders">
|
|
@@ -66,21 +35,11 @@ function Slide4Orders({ orders, frameImages }: Slide4OrdersProps) {
|
|
|
66
35
|
<React.Fragment key={group.id}>
|
|
67
36
|
{group.rects.map((rect, rectIndex) => {
|
|
68
37
|
const rectIndexOverall = groupStartIndex + rectIndex;
|
|
69
|
-
const image = rectImageAssignments[rectIndexOverall];
|
|
70
|
-
|
|
71
38
|
return (
|
|
72
39
|
<span
|
|
73
40
|
key={rect}
|
|
74
41
|
className={`slide4-orders__rect ${rect} ${group.groupClass}`}
|
|
75
|
-
style={
|
|
76
|
-
image
|
|
77
|
-
? {
|
|
78
|
-
backgroundImage: `url('${image}')`,
|
|
79
|
-
backgroundSize: 'cover',
|
|
80
|
-
backgroundPosition: 'center',
|
|
81
|
-
}
|
|
82
|
-
: undefined
|
|
83
|
-
}
|
|
42
|
+
style={frameImageStyle(rectImageAssignments[rectIndexOverall])}
|
|
84
43
|
/>
|
|
85
44
|
);
|
|
86
45
|
})}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { motion
|
|
2
|
+
import { motion } from 'framer-motion';
|
|
3
|
+
import { useCountUp } from '../hooks/useCountUp';
|
|
4
|
+
import { frameImageStyle, useRandomFrameImages } from '../hooks/useFrameImages';
|
|
3
5
|
import './Slide5Buyers.css';
|
|
4
6
|
|
|
5
7
|
interface Slide5BuyersProps {
|
|
@@ -8,62 +10,17 @@ interface Slide5BuyersProps {
|
|
|
8
10
|
frameImages?: string[];
|
|
9
11
|
}
|
|
10
12
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
*/
|
|
14
|
-
function useCountAnimation(target: number, duration: number = 2, delay: number = 0) {
|
|
15
|
-
const count = useMotionValue(0);
|
|
16
|
-
const rounded = useTransform(count, (latest) => Math.round(latest));
|
|
17
|
-
|
|
18
|
-
React.useEffect(() => {
|
|
19
|
-
const controls = animate(count, target, {
|
|
20
|
-
duration,
|
|
21
|
-
delay,
|
|
22
|
-
ease: 'easeOut',
|
|
23
|
-
});
|
|
24
|
-
|
|
25
|
-
return controls.stop;
|
|
26
|
-
}, [count, target, duration, delay]);
|
|
27
|
-
|
|
28
|
-
return rounded;
|
|
29
|
-
}
|
|
13
|
+
const leftRects = ['l1', 'l2', 'l3', 'l4', 'l5', 'l6'];
|
|
14
|
+
const rightRects = ['r1', 'r2', 'r3', 'r4', 'r5', 'r6'];
|
|
30
15
|
|
|
31
16
|
/**
|
|
32
17
|
* Slide5Buyers - Displays first-time and returning buyer counts with vertical animated columns
|
|
33
18
|
*/
|
|
34
19
|
function Slide5Buyers({ firstTimeBuyers, repeatBuyers, frameImages }: Slide5BuyersProps) {
|
|
35
|
-
const firstTimeBuyersCount =
|
|
36
|
-
const repeatBuyersCount =
|
|
37
|
-
const
|
|
38
|
-
const
|
|
39
|
-
|
|
40
|
-
const frameImagePool = React.useMemo(() => {
|
|
41
|
-
return frameImages && frameImages.length > 0 ? frameImages : [];
|
|
42
|
-
}, [frameImages]);
|
|
43
|
-
|
|
44
|
-
const totalRects = leftRects.length + rightRects.length;
|
|
45
|
-
const rectSources = React.useMemo(() => {
|
|
46
|
-
if (!frameImagePool.length) {
|
|
47
|
-
return [];
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
return Array.from({ length: totalRects }, () =>
|
|
51
|
-
frameImagePool[Math.floor(Math.random() * frameImagePool.length)]
|
|
52
|
-
);
|
|
53
|
-
}, [frameImagePool, totalRects]);
|
|
54
|
-
|
|
55
|
-
const getRectStyle = (index: number) => {
|
|
56
|
-
const image = rectSources[index];
|
|
57
|
-
if (!image) {
|
|
58
|
-
return undefined;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
return {
|
|
62
|
-
backgroundImage: `url('${image}')`,
|
|
63
|
-
backgroundSize: 'cover',
|
|
64
|
-
backgroundPosition: 'center',
|
|
65
|
-
};
|
|
66
|
-
};
|
|
20
|
+
const firstTimeBuyersCount = useCountUp(firstTimeBuyers, { duration: 1.7, delay: 0.3 }); // 1.7s + 0.3s delay = 2s total
|
|
21
|
+
const repeatBuyersCount = useCountUp(repeatBuyers, { duration: 1.2, delay: 0.8 }); // 1.2s + 0.8s delay = 2s total
|
|
22
|
+
const rectSources = useRandomFrameImages(frameImages, leftRects.length + rightRects.length);
|
|
23
|
+
const getRectStyle = (index: number) => frameImageStyle(rectSources[index]);
|
|
67
24
|
|
|
68
25
|
return (
|
|
69
26
|
<div className="slide5-buyers">
|
|
@@ -1,28 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { useMotionValue, useTransform, animate } from 'framer-motion';
|
|
3
2
|
import { motion } from 'framer-motion';
|
|
3
|
+
import { useCountUp, withThousandsSeparators } from '../hooks/useCountUp';
|
|
4
4
|
import './Slide6Customer.css';
|
|
5
5
|
import webIcon from '../assets/web-icon.png';
|
|
6
6
|
import searchIcon from '../assets/search-icon.svg';
|
|
7
7
|
|
|
8
|
-
// Counter animation hook with optional comma formatting
|
|
9
|
-
function useCountAnimation(target: number, duration: number = 2, delay: number = 0, formatWithCommas: boolean = false) {
|
|
10
|
-
const count = useMotionValue(0);
|
|
11
|
-
const formatted = useTransform(count, (v) => {
|
|
12
|
-
const rounded = Math.round(v);
|
|
13
|
-
return formatWithCommas ? rounded.toLocaleString() : rounded.toString();
|
|
14
|
-
});
|
|
15
|
-
|
|
16
|
-
React.useEffect(() => {
|
|
17
|
-
const timeout = setTimeout(() => {
|
|
18
|
-
animate(count, target, { duration, ease: 'easeOut' });
|
|
19
|
-
}, delay * 1000);
|
|
20
|
-
return () => clearTimeout(timeout);
|
|
21
|
-
}, [count, target, duration, delay]);
|
|
22
|
-
|
|
23
|
-
return formatted;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
8
|
interface Slide6CustomerProps {
|
|
27
9
|
websiteLink?: string;
|
|
28
10
|
websiteVisits?: number;
|
|
@@ -39,8 +21,8 @@ function Slide6Customer({
|
|
|
39
21
|
mostViewedProduct = "",
|
|
40
22
|
mostViewedProductCount = 0
|
|
41
23
|
}: Slide6CustomerProps) {
|
|
42
|
-
const visitsCount =
|
|
43
|
-
const productCount =
|
|
24
|
+
const visitsCount = useCountUp(websiteVisits, { duration: 1.7, delay: 0.3, format: withThousandsSeparators }); // 1.7s + 0.3s delay = 2s total
|
|
25
|
+
const productCount = useCountUp(mostViewedProductCount, { duration: 1.5, delay: 0.5, format: withThousandsSeparators }); // 1.5s + 0.5s delay = 2s total
|
|
44
26
|
|
|
45
27
|
return (
|
|
46
28
|
<div className="slide6-customer">
|
|
@@ -3,6 +3,7 @@ import './Slide9Year.css';
|
|
|
3
3
|
import { recapCopy } from '../data/recapCopy';
|
|
4
4
|
import { BUSINESS_CATEGORIES } from '../types';
|
|
5
5
|
import type { BusinessCategory } from '../types';
|
|
6
|
+
import { frameImageStyle, useRandomFrameImages } from '../hooks/useFrameImages';
|
|
6
7
|
|
|
7
8
|
interface Slide9YearProps {
|
|
8
9
|
businessCategory: BusinessCategory;
|
|
@@ -15,32 +16,8 @@ function Slide9Year({ businessCategory, year, frameImages }: Slide9YearProps) {
|
|
|
15
16
|
const baseYear = year ?? 2025;
|
|
16
17
|
const nextYear = baseYear + 1;
|
|
17
18
|
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
}, [frameImages]);
|
|
21
|
-
|
|
22
|
-
const rectSources = React.useMemo(() => {
|
|
23
|
-
if (!frameImagePool.length) {
|
|
24
|
-
return [];
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
return Array.from({ length: 6 }, () =>
|
|
28
|
-
frameImagePool[Math.floor(Math.random() * frameImagePool.length)]
|
|
29
|
-
);
|
|
30
|
-
}, [frameImagePool]);
|
|
31
|
-
|
|
32
|
-
const getRectStyle = (index: number) => {
|
|
33
|
-
const image = rectSources[index];
|
|
34
|
-
if (!image) {
|
|
35
|
-
return undefined;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
return {
|
|
39
|
-
backgroundImage: `url('${image}')`,
|
|
40
|
-
backgroundSize: 'cover',
|
|
41
|
-
backgroundPosition: 'center',
|
|
42
|
-
};
|
|
43
|
-
};
|
|
19
|
+
const rectSources = useRandomFrameImages(frameImages, 6);
|
|
20
|
+
const getRectStyle = (index: number) => frameImageStyle(rectSources[index]);
|
|
44
21
|
|
|
45
22
|
return (
|
|
46
23
|
<div className="slide9-year">
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import Slide1Intro from './Slide1Intro';
|
|
3
|
+
import Slide2Days from './Slide2Days';
|
|
4
|
+
import Slide3Revenue from './Slide3Revenue';
|
|
5
|
+
import Slide4Orders from './Slide4Orders';
|
|
6
|
+
import Slide5Buyers from './Slide5Buyers';
|
|
7
|
+
import Slide6Customer from './Slide6Customer';
|
|
8
|
+
import Slide7Products from './Slide7Products';
|
|
9
|
+
import Slide8Months from './Slide8Months';
|
|
10
|
+
import Slide9Year from './Slide9Year';
|
|
11
|
+
import Slide10Final from './Slide10Final';
|
|
12
|
+
import webIcon from '../assets/web-icon.png';
|
|
13
|
+
import searchIcon from '../assets/search-icon.svg';
|
|
14
|
+
import { MONEY_RAIN_GIF_URL } from '../data/remoteAssets';
|
|
15
|
+
import { slideDurations } from '../data/mock';
|
|
16
|
+
import { BUSINESS_CATEGORIES, RecapData } from '../types';
|
|
17
|
+
import { resolveStories, type StoryDefinition } from '../story';
|
|
18
|
+
|
|
19
|
+
const hasFullRecap = (data: RecapData) => data.businessCategory !== BUSINESS_CATEGORIES.NEW_USER;
|
|
20
|
+
const productImages = (data: RecapData) => data.productImages ?? [];
|
|
21
|
+
|
|
22
|
+
/** The recap playlist, in order. New users only see the intro. */
|
|
23
|
+
export const recapStories: StoryDefinition<RecapData>[] = [
|
|
24
|
+
{
|
|
25
|
+
id: 'intro',
|
|
26
|
+
assets: productImages,
|
|
27
|
+
render: (data) => (
|
|
28
|
+
<Slide1Intro
|
|
29
|
+
businessName={data.businessName}
|
|
30
|
+
businessCategory={data.businessCategory}
|
|
31
|
+
introHeadline={data.introHeadline}
|
|
32
|
+
introSubtitle={data.introSubtitle}
|
|
33
|
+
frameImages={data.productImages}
|
|
34
|
+
/>
|
|
35
|
+
),
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
id: 'days',
|
|
39
|
+
include: hasFullRecap,
|
|
40
|
+
assets: productImages,
|
|
41
|
+
render: (data) => (
|
|
42
|
+
<Slide2Days days={data.days ?? 0} streak={data.streak ?? 0} frameImages={data.productImages} />
|
|
43
|
+
),
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
id: 'revenue',
|
|
47
|
+
include: hasFullRecap,
|
|
48
|
+
assets: () => [MONEY_RAIN_GIF_URL],
|
|
49
|
+
render: (data) => (
|
|
50
|
+
<Slide3Revenue
|
|
51
|
+
revenue={data.revenue ?? 0}
|
|
52
|
+
currency={data.currency}
|
|
53
|
+
businessCategory={data.businessCategory}
|
|
54
|
+
/>
|
|
55
|
+
),
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
id: 'orders',
|
|
59
|
+
include: hasFullRecap,
|
|
60
|
+
assets: productImages,
|
|
61
|
+
render: (data) => <Slide4Orders orders={data.orders} frameImages={data.productImages} />,
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
id: 'buyers',
|
|
65
|
+
include: hasFullRecap,
|
|
66
|
+
assets: productImages,
|
|
67
|
+
render: (data) => (
|
|
68
|
+
<Slide5Buyers
|
|
69
|
+
firstTimeBuyers={data.firstTimeBuyers ?? 0}
|
|
70
|
+
repeatBuyers={data.repeatBuyers ?? 0}
|
|
71
|
+
frameImages={data.productImages}
|
|
72
|
+
/>
|
|
73
|
+
),
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
id: 'customer',
|
|
77
|
+
include: hasFullRecap,
|
|
78
|
+
assets: () => [webIcon, searchIcon],
|
|
79
|
+
render: (data) => (
|
|
80
|
+
<Slide6Customer
|
|
81
|
+
websiteLink={data.websiteLink ?? ''}
|
|
82
|
+
websiteVisits={data.websiteVisits ?? 0}
|
|
83
|
+
mostViewedProduct={data.mostViewedProduct ?? ''}
|
|
84
|
+
mostViewedProductCount={data.mostViewedProductCount ?? 0}
|
|
85
|
+
/>
|
|
86
|
+
),
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
id: 'products',
|
|
90
|
+
include: hasFullRecap,
|
|
91
|
+
assets: (data) => (data.favouriteProduct?.productImage ? [data.favouriteProduct.productImage] : []),
|
|
92
|
+
render: (data) => <Slide7Products products={data.favouriteProduct ? [data.favouriteProduct] : []} />,
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
id: 'months',
|
|
96
|
+
include: hasFullRecap,
|
|
97
|
+
render: (data) => <Slide8Months busiestMonth={data.busiestMonth ?? 'Jan'} />,
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
id: 'year',
|
|
101
|
+
include: hasFullRecap,
|
|
102
|
+
assets: productImages,
|
|
103
|
+
render: (data) => (
|
|
104
|
+
<Slide9Year
|
|
105
|
+
businessCategory={data.businessCategory}
|
|
106
|
+
year={data.year}
|
|
107
|
+
frameImages={data.productImages}
|
|
108
|
+
/>
|
|
109
|
+
),
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
id: 'final',
|
|
113
|
+
include: hasFullRecap,
|
|
114
|
+
outro: true,
|
|
115
|
+
render: (data, controls) => (
|
|
116
|
+
<Slide10Final
|
|
117
|
+
videoUrl={data.videoUrl}
|
|
118
|
+
downloadUrl={data.downloadUrl ?? data.videoUrl}
|
|
119
|
+
year={data.year}
|
|
120
|
+
onReplay={controls.restart}
|
|
121
|
+
/>
|
|
122
|
+
),
|
|
123
|
+
},
|
|
124
|
+
];
|
|
125
|
+
|
|
126
|
+
/** Resolves the playlist for one recap; backend-provided `slideDurations` override the defaults per slide. */
|
|
127
|
+
export function buildRecapStories(data: RecapData) {
|
|
128
|
+
return resolveStories(recapStories, data, { ...slideDurations, ...data.slideDurations });
|
|
129
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { persist, createJSONStorage } from "zustand/middleware";
|
|
2
|
+
import { create } from "zustand";
|
|
3
|
+
|
|
4
|
+
type AuthState = {
|
|
5
|
+
token: string;
|
|
6
|
+
business: {
|
|
7
|
+
business_name: string;
|
|
8
|
+
business_image: string;
|
|
9
|
+
business_type: string;
|
|
10
|
+
business_phone: string;
|
|
11
|
+
business_website: string;
|
|
12
|
+
business_address: string;
|
|
13
|
+
business_city: string;
|
|
14
|
+
business_state: string;
|
|
15
|
+
business_zip_code: string;
|
|
16
|
+
subdomain: string;
|
|
17
|
+
website_status: string;
|
|
18
|
+
website_status_by_admin: string;
|
|
19
|
+
social_facebook: string;
|
|
20
|
+
social_instagram: string;
|
|
21
|
+
social_twitter: string;
|
|
22
|
+
social_tiktok: string;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
type AuthActions = {
|
|
26
|
+
updateToken: (token: string) => void;
|
|
27
|
+
updateBusiness: (businessData: AuthState["business"]) => void;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
const initialState: AuthState = {
|
|
31
|
+
token: "",
|
|
32
|
+
business: {
|
|
33
|
+
business_name: "",
|
|
34
|
+
business_image: "",
|
|
35
|
+
business_type: "",
|
|
36
|
+
business_phone: "",
|
|
37
|
+
business_website: "",
|
|
38
|
+
business_address: "",
|
|
39
|
+
business_city: "",
|
|
40
|
+
business_state: "",
|
|
41
|
+
business_zip_code: "",
|
|
42
|
+
subdomain: "",
|
|
43
|
+
website_status: "",
|
|
44
|
+
website_status_by_admin: "",
|
|
45
|
+
social_facebook: "",
|
|
46
|
+
social_instagram: "",
|
|
47
|
+
social_tiktok: "",
|
|
48
|
+
social_twitter: "",
|
|
49
|
+
},
|
|
50
|
+
};
|
|
51
|
+
export const useAuthStore = create<AuthState & AuthActions>()(
|
|
52
|
+
persist(
|
|
53
|
+
(set) => ({
|
|
54
|
+
...initialState,
|
|
55
|
+
updateToken: (token: string) => set(() => ({ token })),
|
|
56
|
+
clearToken: () => {
|
|
57
|
+
set(() => ({
|
|
58
|
+
token: "",
|
|
59
|
+
}));
|
|
60
|
+
},
|
|
61
|
+
updateBusiness: (businessData: AuthState["business"]) => {
|
|
62
|
+
set(() => ({
|
|
63
|
+
business: businessData,
|
|
64
|
+
}));
|
|
65
|
+
},
|
|
66
|
+
}),
|
|
67
|
+
{
|
|
68
|
+
name: "auth-storage",
|
|
69
|
+
storage: createJSONStorage(() => localStorage),
|
|
70
|
+
}
|
|
71
|
+
)
|
|
72
|
+
);
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { motion, type MotionValue } from 'framer-motion';
|
|
3
|
+
import '../StoryProgress.css';
|
|
4
|
+
|
|
5
|
+
interface StoryProgressBarsProps {
|
|
6
|
+
total: number;
|
|
7
|
+
active: number;
|
|
8
|
+
progress: MotionValue<number>;
|
|
9
|
+
onBarClick: (index: number) => void;
|
|
10
|
+
hideBorder?: boolean;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/** Segmented story progress bars; the active segment's fill is bound to `progress` (0→1). */
|
|
14
|
+
function StoryProgressBars({ total, active, progress, onBarClick, hideBorder }: StoryProgressBarsProps) {
|
|
15
|
+
return (
|
|
16
|
+
<div className={`story-progress${hideBorder ? ' story-progress--no-border' : ''}`}>
|
|
17
|
+
{Array.from({ length: total }).map((_, index) => {
|
|
18
|
+
const isActive = index === active;
|
|
19
|
+
const isCompleted = index < active;
|
|
20
|
+
|
|
21
|
+
return (
|
|
22
|
+
<div
|
|
23
|
+
key={index}
|
|
24
|
+
className="story-progress__bar-container"
|
|
25
|
+
onClick={() => onBarClick(index)}
|
|
26
|
+
>
|
|
27
|
+
<div className={`story-progress__bar ${isCompleted ? 'completed' : ''}`}>
|
|
28
|
+
{isActive && (
|
|
29
|
+
<motion.div
|
|
30
|
+
className="story-progress__bar-fill"
|
|
31
|
+
style={{ scaleX: progress, transformOrigin: 'left' }}
|
|
32
|
+
/>
|
|
33
|
+
)}
|
|
34
|
+
</div>
|
|
35
|
+
</div>
|
|
36
|
+
);
|
|
37
|
+
})}
|
|
38
|
+
</div>
|
|
39
|
+
);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export default StoryProgressBars;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export * from './types';
|
|
2
|
+
export * from './storyPlayerReducer';
|
|
3
|
+
export * from './resolveStories';
|
|
4
|
+
export { useStoryTimer } from './useStoryTimer';
|
|
5
|
+
export { useStoryPlayer } from './useStoryPlayer';
|
|
6
|
+
export type { StoryPlayer } from './useStoryPlayer';
|
|
7
|
+
export { useStoryGestures } from './useStoryGestures';
|
|
8
|
+
export { useStoryKeyboard } from './useStoryKeyboard';
|
|
9
|
+
export { usePreloadAssets, preloadImage } from './usePreloadAssets';
|
|
10
|
+
export { useVideoCaptureBridge } from './useVideoCaptureBridge';
|
|
11
|
+
export { default as StoryProgressBars } from './StoryProgressBars';
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { ResolvedStory, StoryDefinition } from './types';
|
|
2
|
+
|
|
3
|
+
export const DEFAULT_STORY_DURATION = 8;
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Turns story definitions into the concrete playlist for a given context:
|
|
7
|
+
* drops excluded cards and settles each card's duration and asset list.
|
|
8
|
+
* `durationOverrides` (seconds, keyed by story id) wins over a definition's own duration.
|
|
9
|
+
*/
|
|
10
|
+
export function resolveStories<TContext>(
|
|
11
|
+
definitions: StoryDefinition<TContext>[],
|
|
12
|
+
context: TContext,
|
|
13
|
+
durationOverrides: Record<string, number | undefined> = {}
|
|
14
|
+
): ResolvedStory<TContext>[] {
|
|
15
|
+
return definitions
|
|
16
|
+
.filter((definition) => definition.include?.(context) ?? true)
|
|
17
|
+
.map((definition) => {
|
|
18
|
+
const override = durationOverrides[definition.id];
|
|
19
|
+
return {
|
|
20
|
+
id: definition.id,
|
|
21
|
+
duration:
|
|
22
|
+
typeof override === 'number' && override > 0
|
|
23
|
+
? override
|
|
24
|
+
: definition.duration ?? DEFAULT_STORY_DURATION,
|
|
25
|
+
assets: (definition.assets?.(context) ?? []).filter(Boolean),
|
|
26
|
+
outro: definition.outro === true,
|
|
27
|
+
theme: definition.theme,
|
|
28
|
+
render: definition.render,
|
|
29
|
+
};
|
|
30
|
+
});
|
|
31
|
+
}
|