@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.
Files changed (436) hide show
  1. package/dist/App.css +8 -0
  2. package/dist/LoginScreen.css +6 -139
  3. package/dist/OtpScreen.css +5 -127
  4. package/dist/RecapApp.d.ts +4 -1
  5. package/dist/RecapApp.d.ts.map +1 -1
  6. package/dist/RecapApp.js +2 -2
  7. package/dist/RecapLoadingScreen.css +11 -0
  8. package/dist/RecapStory.d.ts +8 -4
  9. package/dist/RecapStory.d.ts.map +1 -1
  10. package/dist/RecapStory.js +5 -254
  11. package/dist/StoryProgress.d.ts +2 -2
  12. package/dist/StoryProgress.d.ts.map +1 -1
  13. package/dist/StoryProgress.js +11 -68
  14. package/dist/assets/fluctuating/notification-left.svg +30 -0
  15. package/dist/assets/fluctuating/notification-right.svg +30 -0
  16. package/dist/assets/fluctuating/notification-top.svg +30 -0
  17. package/dist/assets/fluctuating/phone-body.svg +18 -0
  18. package/dist/assets/fluctuating/phone-detail.svg +6 -0
  19. package/dist/assets/fluctuating/phone-floor.svg +5 -0
  20. package/dist/assets/fluctuating/phone-marks.svg +8 -0
  21. package/dist/assets/fluctuating/phone-pulse.svg +7 -0
  22. package/dist/assets/fluctuating/wave-mask.svg +5 -0
  23. package/dist/assets/fluctuating/wave.svg +24 -0
  24. package/dist/assets/low-data/book-left-page.svg +7 -0
  25. package/dist/assets/low-data/book-right-leaf.svg +6 -0
  26. package/dist/assets/low-data/book-right-page.svg +5 -0
  27. package/dist/assets/low-data/book-spine.svg +5 -0
  28. package/dist/assets/low-data/sign-cord-left.svg +17 -0
  29. package/dist/assets/low-data/sign-cord-right.svg +17 -0
  30. package/dist/assets/low-data/sign-edge.svg +5 -0
  31. package/dist/assets/low-data/sign-eyelet-left.svg +15 -0
  32. package/dist/assets/low-data/sign-eyelet-right.svg +15 -0
  33. package/dist/assets/low-data/sign-face-detail.svg +18 -0
  34. package/dist/assets/low-data/sign-face.svg +10 -0
  35. package/dist/assets/low-data/sign-inner-bevel.svg +11 -0
  36. package/dist/assets/low-data/sign-lettering.svg +26 -0
  37. package/dist/assets/low-data/sign-pin.svg +15 -0
  38. package/dist/assets/low-data/sign-plaque.svg +19 -0
  39. package/dist/assets/low-data/sign-rim-bottom.svg +3 -0
  40. package/dist/assets/low-data/sign-rim-top.svg +3 -0
  41. package/dist/assets/low-data/store-browser.svg +10 -0
  42. package/dist/assets/low-data/store-cursor.svg +5 -0
  43. package/dist/assets/low-data/store-ground.svg +5 -0
  44. package/dist/assets/recap-intro/close.svg +5 -0
  45. package/dist/assets/recap-intro/loading-bar-1.png +0 -0
  46. package/dist/assets/recap-intro/loading-bar-2.png +0 -0
  47. package/dist/assets/recap-intro/tunnel.svg +516 -0
  48. package/dist/assets/steady/bag/badge.svg +9 -0
  49. package/dist/assets/steady/bag/body.svg +105 -0
  50. package/dist/assets/steady/bag/front-handle-inner.svg +353 -0
  51. package/dist/assets/steady/bag/front-handle.svg +10 -0
  52. package/dist/assets/steady/bag/hand.svg +208 -0
  53. package/dist/assets/steady/bag/rear-handle-inner.svg +297 -0
  54. package/dist/assets/steady/bag/rear-handle-top.svg +3 -0
  55. package/dist/assets/steady/bag/rear-handle.svg +10 -0
  56. package/dist/assets/steady/bag/shadow.svg +7 -0
  57. package/dist/assets/steady/calendar/base.png +0 -0
  58. package/dist/assets/steady/calendar/tick.svg +6 -0
  59. package/dist/assets/steady/coin/shimmer-mask.svg +5 -0
  60. package/dist/assets/steady/coin/shimmer.svg +16 -0
  61. package/dist/assets/steady/coin.png +0 -0
  62. package/dist/assets/steady/tree.svg +790 -0
  63. package/dist/assets/top10/biggest-day/coin-left.svg +21 -0
  64. package/dist/assets/top10/biggest-day/coin-right.svg +21 -0
  65. package/dist/assets/top10/biggest-day/coin-top.svg +21 -0
  66. package/dist/assets/top10/biggest-day/floor.svg +5 -0
  67. package/dist/assets/top10/biggest-day/illustration.png +0 -0
  68. package/dist/assets/top10/biggest-day/marks.svg +8 -0
  69. package/dist/assets/top10/biggest-day/mask.svg +5 -0
  70. package/dist/assets/top10/biggest-day/phone-body.svg +18 -0
  71. package/dist/assets/top10/biggest-day/phone-detail.svg +6 -0
  72. package/dist/assets/top10/closing/imgHccStaticHaloScale.svg +5 -0
  73. package/dist/assets/top10/closing/imgHccStaticHaloScale1.svg +12 -0
  74. package/dist/assets/top10/closing/imgHccStaticP0Tumble.svg +5 -0
  75. package/dist/assets/top10/closing/imgHccStaticP10Tumble.svg +5 -0
  76. package/dist/assets/top10/closing/imgHccStaticP11Tumble.svg +5 -0
  77. package/dist/assets/top10/closing/imgHccStaticP12Tumble.svg +5 -0
  78. package/dist/assets/top10/closing/imgHccStaticP13Tumble.svg +5 -0
  79. package/dist/assets/top10/closing/imgHccStaticP14Tumble.svg +5 -0
  80. package/dist/assets/top10/closing/imgHccStaticP15Tumble.svg +5 -0
  81. package/dist/assets/top10/closing/imgHccStaticP16Tumble.svg +5 -0
  82. package/dist/assets/top10/closing/imgHccStaticP17Tumble.svg +5 -0
  83. package/dist/assets/top10/closing/imgHccStaticP18Tumble.svg +5 -0
  84. package/dist/assets/top10/closing/imgHccStaticP19Tumble.svg +5 -0
  85. package/dist/assets/top10/closing/imgHccStaticP1Tumble.svg +5 -0
  86. package/dist/assets/top10/closing/imgHccStaticP20Tumble.svg +5 -0
  87. package/dist/assets/top10/closing/imgHccStaticP21Tumble.svg +5 -0
  88. package/dist/assets/top10/closing/imgHccStaticP22Tumble.svg +5 -0
  89. package/dist/assets/top10/closing/imgHccStaticP23Tumble.svg +5 -0
  90. package/dist/assets/top10/closing/imgHccStaticP24Tumble.svg +5 -0
  91. package/dist/assets/top10/closing/imgHccStaticP25Tumble.svg +5 -0
  92. package/dist/assets/top10/closing/imgHccStaticP26Tumble.svg +5 -0
  93. package/dist/assets/top10/closing/imgHccStaticP27Tumble.svg +5 -0
  94. package/dist/assets/top10/closing/imgHccStaticP28Tumble.svg +5 -0
  95. package/dist/assets/top10/closing/imgHccStaticP29Tumble.svg +5 -0
  96. package/dist/assets/top10/closing/imgHccStaticP2Tumble.svg +5 -0
  97. package/dist/assets/top10/closing/imgHccStaticP30Tumble.svg +5 -0
  98. package/dist/assets/top10/closing/imgHccStaticP31Tumble.svg +5 -0
  99. package/dist/assets/top10/closing/imgHccStaticP32Tumble.svg +5 -0
  100. package/dist/assets/top10/closing/imgHccStaticP33Tumble.svg +5 -0
  101. package/dist/assets/top10/closing/imgHccStaticP34Tumble.svg +5 -0
  102. package/dist/assets/top10/closing/imgHccStaticP35Tumble.svg +5 -0
  103. package/dist/assets/top10/closing/imgHccStaticP36Tumble.svg +5 -0
  104. package/dist/assets/top10/closing/imgHccStaticP37Tumble.svg +5 -0
  105. package/dist/assets/top10/closing/imgHccStaticP38Tumble.svg +5 -0
  106. package/dist/assets/top10/closing/imgHccStaticP39Tumble.svg +5 -0
  107. package/dist/assets/top10/closing/imgHccStaticP3Tumble.svg +5 -0
  108. package/dist/assets/top10/closing/imgHccStaticP40Tumble.svg +5 -0
  109. package/dist/assets/top10/closing/imgHccStaticP41Tumble.svg +5 -0
  110. package/dist/assets/top10/closing/imgHccStaticP42Tumble.svg +5 -0
  111. package/dist/assets/top10/closing/imgHccStaticP43Tumble.svg +5 -0
  112. package/dist/assets/top10/closing/imgHccStaticP44Tumble.svg +5 -0
  113. package/dist/assets/top10/closing/imgHccStaticP45Tumble.svg +5 -0
  114. package/dist/assets/top10/closing/imgHccStaticP46Tumble.svg +5 -0
  115. package/dist/assets/top10/closing/imgHccStaticP47Tumble.svg +5 -0
  116. package/dist/assets/top10/closing/imgHccStaticP48Tumble.svg +5 -0
  117. package/dist/assets/top10/closing/imgHccStaticP49Tumble.svg +5 -0
  118. package/dist/assets/top10/closing/imgHccStaticP4Tumble.svg +5 -0
  119. package/dist/assets/top10/closing/imgHccStaticP50Tumble.svg +5 -0
  120. package/dist/assets/top10/closing/imgHccStaticP51Tumble.svg +5 -0
  121. package/dist/assets/top10/closing/imgHccStaticP52Tumble.svg +5 -0
  122. package/dist/assets/top10/closing/imgHccStaticP53Tumble.svg +5 -0
  123. package/dist/assets/top10/closing/imgHccStaticP54Tumble.svg +5 -0
  124. package/dist/assets/top10/closing/imgHccStaticP55Tumble.svg +5 -0
  125. package/dist/assets/top10/closing/imgHccStaticP5Tumble.svg +5 -0
  126. package/dist/assets/top10/closing/imgHccStaticP6Tumble.svg +5 -0
  127. package/dist/assets/top10/closing/imgHccStaticP7Tumble.svg +5 -0
  128. package/dist/assets/top10/closing/imgHccStaticP8Tumble.svg +5 -0
  129. package/dist/assets/top10/closing/imgHccStaticP9Tumble.svg +5 -0
  130. package/dist/assets/top10/closing/imgVector.png +0 -0
  131. package/dist/assets/top10/closing/replay.svg +7 -0
  132. package/dist/assets/top10/closing/share.svg +6 -0
  133. package/dist/assets/top10/customers/arrow.svg +6 -0
  134. package/dist/assets/top10/customers/avatar.svg +61 -0
  135. package/dist/assets/top10/customers/illustration.png +0 -0
  136. package/dist/assets/top10/favourite/emoji.svg +9 -0
  137. package/dist/assets/top10/favourite/heart.svg +8 -0
  138. package/dist/assets/top10/growth/coin.svg +10 -0
  139. package/dist/assets/top10/growth/counter-shadow.svg +12 -0
  140. package/dist/assets/top10/growth/counter.svg +8 -0
  141. package/dist/assets/top10/growth/highlight.svg +12 -0
  142. package/dist/assets/top10/growth/illustration.png +0 -0
  143. package/dist/assets/top10/milestone/illustration.png +0 -0
  144. package/dist/assets/top10/orders/giver.svg +18 -0
  145. package/dist/assets/top10/orders/illustration.png +0 -0
  146. package/dist/assets/top10/orders/mask.svg +5 -0
  147. package/dist/assets/top10/orders/parcel.svg +16 -0
  148. package/dist/assets/top10/orders/receiver.svg +20 -0
  149. package/dist/assets/top10/orders/seal.svg +8 -0
  150. package/dist/assets/top10/recognition/contact-mask.svg +6 -0
  151. package/dist/assets/top10/recognition/contact.svg +14 -0
  152. package/dist/assets/top10/recognition/mask.svg +5 -0
  153. package/dist/assets/top10/recognition/plug-left.svg +27 -0
  154. package/dist/assets/top10/recognition/plug-right.svg +23 -0
  155. package/dist/assets/top10/recognition/pulse.svg +15 -0
  156. package/dist/assets/top10/recognition/ring.svg +3 -0
  157. package/dist/assets/top10/shared/avatar.png +0 -0
  158. package/dist/assets/top10/shared/close-dark.svg +5 -0
  159. package/dist/assets/top10/shared/close-light.svg +5 -0
  160. package/dist/assets/top10/signature/glow.svg +13 -0
  161. package/dist/assets/top10/signature/horizon.svg +12 -0
  162. package/dist/assets/top10/signature/inner-glow.svg +13 -0
  163. package/dist/assets/top10/signature/mask.svg +5 -0
  164. package/dist/assets/top10/signature/rim-glow.svg +13 -0
  165. package/dist/assets/top10/signature/rim.svg +13 -0
  166. package/dist/assets/top10/signature/year-mask.svg +5 -0
  167. package/dist/assets/top10/signature/year-shadow.svg +8 -0
  168. package/dist/assets/top10/signature/year.svg +30 -0
  169. package/dist/assets/top10/surprise/illustration.png +0 -0
  170. package/dist/assets/top10/surprise/note-front.svg +275 -0
  171. package/dist/assets/zero-order/catalogue-card.svg +15 -0
  172. package/dist/assets/zero-order/catalogue-ground.svg +3 -0
  173. package/dist/assets/zero-order/catalogue-window.svg +15 -0
  174. package/dist/assets/zero-order/storefront-awning.svg +145 -0
  175. package/dist/assets/zero-order/storefront-chrome.svg +15 -0
  176. package/dist/assets/zero-order/storefront-door-frame.svg +3 -0
  177. package/dist/assets/zero-order/storefront-door-glass.svg +14 -0
  178. package/dist/assets/zero-order/storefront-door-handle-light.svg +3 -0
  179. package/dist/assets/zero-order/storefront-door-handle-shadow.svg +3 -0
  180. package/dist/assets/zero-order/storefront-door-handle.svg +3 -0
  181. package/dist/assets/zero-order/storefront-door-mask.svg +5 -0
  182. package/dist/assets/zero-order/storefront-door-pane.svg +10 -0
  183. package/dist/assets/zero-order/storefront-door-panel.svg +3 -0
  184. package/dist/assets/zero-order/storefront-door-sill.svg +3 -0
  185. package/dist/assets/zero-order/storefront-ground.svg +3 -0
  186. package/dist/assets/zero-order/storefront-shell.svg +19 -0
  187. package/dist/assets/zero-order/storefront-step.svg +8 -0
  188. package/dist/assets/zero-order/storefront-wall.svg +13 -0
  189. package/dist/assets/zero-order/storefront-window-frame.svg +3 -0
  190. package/dist/assets/zero-order/storefront-window-glass.svg +16 -0
  191. package/dist/assets/zero-order/storefront-window-ledge-edge.svg +3 -0
  192. package/dist/assets/zero-order/storefront-window-ledge-line.svg +3 -0
  193. package/dist/assets/zero-order/storefront-window-ledge.svg +3 -0
  194. package/dist/assets/zero-order/storefront-window-mask.svg +5 -0
  195. package/dist/assets/zero-order/storefront-window-pane.svg +10 -0
  196. package/dist/assets/zero-order/storefront-window-sill.svg +3 -0
  197. package/dist/categories.d.ts +15 -0
  198. package/dist/categories.d.ts.map +1 -0
  199. package/dist/categories.js +25 -0
  200. package/dist/components/RecapIntroLayout.css +225 -0
  201. package/dist/components/RecapIntroLayout.d.ts +16 -0
  202. package/dist/components/RecapIntroLayout.d.ts.map +1 -0
  203. package/dist/components/RecapIntroLayout.js +19 -0
  204. package/dist/data/mock.d.ts +12 -2
  205. package/dist/data/mock.d.ts.map +1 -1
  206. package/dist/data/mock.js +99 -59
  207. package/dist/data/recapCopy.d.ts +1 -0
  208. package/dist/data/recapCopy.d.ts.map +1 -1
  209. package/dist/data/recapCopy.js +30 -21
  210. package/dist/data/remoteAssets.d.ts +3 -0
  211. package/dist/data/remoteAssets.d.ts.map +1 -0
  212. package/dist/data/remoteAssets.js +3 -0
  213. package/dist/hooks/useBackgroundMusic.d.ts +8 -8
  214. package/dist/hooks/useBackgroundMusic.d.ts.map +1 -1
  215. package/dist/hooks/useBackgroundMusic.js +38 -43
  216. package/dist/hooks/useCountUp.d.ts +16 -0
  217. package/dist/hooks/useCountUp.d.ts.map +1 -0
  218. package/dist/hooks/useCountUp.js +15 -0
  219. package/dist/hooks/useFrameImages.d.ts +5 -0
  220. package/dist/hooks/useFrameImages.d.ts.map +1 -0
  221. package/dist/hooks/useFrameImages.js +18 -0
  222. package/dist/hooks/useSessionValidator.d.ts +14 -0
  223. package/dist/hooks/useSessionValidator.d.ts.map +1 -0
  224. package/dist/hooks/useSessionValidator.js +97 -0
  225. package/dist/hooks/useShareCardPrecapture.d.ts +17 -0
  226. package/dist/hooks/useShareCardPrecapture.d.ts.map +1 -0
  227. package/dist/hooks/useShareCardPrecapture.js +35 -0
  228. package/dist/hooks/useStatusBarColor.d.ts +6 -0
  229. package/dist/hooks/useStatusBarColor.d.ts.map +1 -0
  230. package/dist/hooks/useStatusBarColor.js +34 -0
  231. package/dist/index.css +1 -1
  232. package/dist/index.d.ts +3 -0
  233. package/dist/index.d.ts.map +1 -1
  234. package/dist/index.js +5 -0
  235. package/dist/slides/Slide10Final.d.ts.map +1 -1
  236. package/dist/slides/Slide10Final.js +2 -50
  237. package/dist/slides/Slide1Intro.css +1 -2
  238. package/dist/slides/Slide1Intro.d.ts.map +1 -1
  239. package/dist/slides/Slide1Intro.js +21 -25
  240. package/dist/slides/Slide2Days.d.ts.map +1 -1
  241. package/dist/slides/Slide2Days.js +7 -44
  242. package/dist/slides/Slide3Revenue.d.ts.map +1 -1
  243. package/dist/slides/Slide3Revenue.js +5 -22
  244. package/dist/slides/Slide4Orders.d.ts.map +1 -1
  245. package/dist/slides/Slide4Orders.js +12 -41
  246. package/dist/slides/Slide5Buyers.d.ts.map +1 -1
  247. package/dist/slides/Slide5Buyers.js +9 -43
  248. package/dist/slides/Slide6Customer.d.ts.map +1 -1
  249. package/dist/slides/Slide6Customer.js +3 -19
  250. package/dist/slides/Slide9Year.d.ts.map +1 -1
  251. package/dist/slides/Slide9Year.js +3 -21
  252. package/dist/slides/registry.d.ts +7 -0
  253. package/dist/slides/registry.d.ts.map +1 -0
  254. package/dist/slides/registry.js +84 -0
  255. package/dist/store/auth.d.ts +40 -0
  256. package/dist/store/auth.d.ts.map +1 -0
  257. package/dist/store/auth.js +40 -0
  258. package/dist/story/StoryProgressBars.d.ts +13 -0
  259. package/dist/story/StoryProgressBars.d.ts.map +1 -0
  260. package/dist/story/StoryProgressBars.js +12 -0
  261. package/dist/story/index.d.ts +12 -0
  262. package/dist/story/index.d.ts.map +1 -0
  263. package/dist/story/index.js +10 -0
  264. package/dist/story/resolveStories.d.ts +9 -0
  265. package/dist/story/resolveStories.d.ts.map +1 -0
  266. package/dist/story/resolveStories.js +23 -0
  267. package/dist/story/storyPlayerReducer.d.ts +33 -0
  268. package/dist/story/storyPlayerReducer.d.ts.map +1 -0
  269. package/dist/story/storyPlayerReducer.js +55 -0
  270. package/dist/story/types.d.ts +55 -0
  271. package/dist/story/types.d.ts.map +1 -0
  272. package/dist/story/types.js +1 -0
  273. package/dist/story/usePreloadAssets.d.ts +8 -0
  274. package/dist/story/usePreloadAssets.d.ts.map +1 -0
  275. package/dist/story/usePreloadAssets.js +21 -0
  276. package/dist/story/useStoryGestures.d.ts +23 -0
  277. package/dist/story/useStoryGestures.d.ts.map +1 -0
  278. package/dist/story/useStoryGestures.js +60 -0
  279. package/dist/story/useStoryKeyboard.d.ts +10 -0
  280. package/dist/story/useStoryKeyboard.d.ts.map +1 -0
  281. package/dist/story/useStoryKeyboard.js +43 -0
  282. package/dist/story/useStoryPlayer.d.ts +26 -0
  283. package/dist/story/useStoryPlayer.d.ts.map +1 -0
  284. package/dist/story/useStoryPlayer.js +64 -0
  285. package/dist/story/useStoryTimer.d.ts +16 -0
  286. package/dist/story/useStoryTimer.d.ts.map +1 -0
  287. package/dist/story/useStoryTimer.js +34 -0
  288. package/dist/story/useVideoCaptureBridge.d.ts +6 -0
  289. package/dist/story/useVideoCaptureBridge.d.ts.map +1 -0
  290. package/dist/story/useVideoCaptureBridge.js +22 -0
  291. package/dist/top10/RecapStory2026.d.ts +20 -0
  292. package/dist/top10/RecapStory2026.d.ts.map +1 -0
  293. package/dist/top10/RecapStory2026.js +67 -0
  294. package/dist/top10/Top10Chrome.d.ts +16 -0
  295. package/dist/top10/Top10Chrome.d.ts.map +1 -0
  296. package/dist/top10/Top10Chrome.js +15 -0
  297. package/dist/top10/Top10Slides.css +308 -0
  298. package/dist/top10/Top10Story.css +250 -0
  299. package/dist/top10/fluctuatingSlides.d.ts +5 -0
  300. package/dist/top10/fluctuatingSlides.d.ts.map +1 -0
  301. package/dist/top10/fluctuatingSlides.js +30 -0
  302. package/dist/top10/format.d.ts +17 -0
  303. package/dist/top10/format.d.ts.map +1 -0
  304. package/dist/top10/format.js +57 -0
  305. package/dist/top10/illustrations/IllustrationLayers.d.ts +51 -0
  306. package/dist/top10/illustrations/IllustrationLayers.d.ts.map +1 -0
  307. package/dist/top10/illustrations/IllustrationLayers.js +51 -0
  308. package/dist/top10/illustrations/closingAssets.d.ts +2 -0
  309. package/dist/top10/illustrations/closingAssets.d.ts.map +1 -0
  310. package/dist/top10/illustrations/closingAssets.js +119 -0
  311. package/dist/top10/illustrations/closingLayers.json +461 -0
  312. package/dist/top10/illustrations/index.d.ts +45 -0
  313. package/dist/top10/illustrations/index.d.ts.map +1 -0
  314. package/dist/top10/illustrations/index.js +646 -0
  315. package/dist/top10/lowDataSlides.d.ts +9 -0
  316. package/dist/top10/lowDataSlides.d.ts.map +1 -0
  317. package/dist/top10/lowDataSlides.js +50 -0
  318. package/dist/top10/motion.d.ts +18 -0
  319. package/dist/top10/motion.d.ts.map +1 -0
  320. package/dist/top10/motion.js +43 -0
  321. package/dist/top10/registry.d.ts +21 -0
  322. package/dist/top10/registry.d.ts.map +1 -0
  323. package/dist/top10/registry.js +313 -0
  324. package/dist/top10/slides.d.ts +87 -0
  325. package/dist/top10/slides.d.ts.map +1 -0
  326. package/dist/top10/slides.js +137 -0
  327. package/dist/top10/steadySlides.d.ts +16 -0
  328. package/dist/top10/steadySlides.d.ts.map +1 -0
  329. package/dist/top10/steadySlides.js +78 -0
  330. package/dist/top10/useCanvasScale.d.ts +18 -0
  331. package/dist/top10/useCanvasScale.d.ts.map +1 -0
  332. package/dist/top10/useCanvasScale.js +50 -0
  333. package/dist/top10/zeroOrderSlides.d.ts +9 -0
  334. package/dist/top10/zeroOrderSlides.d.ts.map +1 -0
  335. package/dist/top10/zeroOrderSlides.js +34 -0
  336. package/dist/types.d.ts +74 -14
  337. package/dist/types.d.ts.map +1 -1
  338. package/dist/types.js +1 -1
  339. package/dist/utils/Helpers.d.ts +7 -0
  340. package/dist/utils/Helpers.d.ts.map +1 -0
  341. package/dist/utils/Helpers.js +21 -0
  342. package/dist/utils/RecapApi.d.ts +3 -0
  343. package/dist/utils/RecapApi.d.ts.map +1 -0
  344. package/dist/utils/RecapApi.js +35 -0
  345. package/dist/utils/Services/AuthServices.d.ts +49 -0
  346. package/dist/utils/Services/AuthServices.d.ts.map +1 -0
  347. package/dist/utils/Services/AuthServices.js +16 -0
  348. package/dist/utils/Services/mockApi.d.ts +49 -0
  349. package/dist/utils/Services/mockApi.d.ts.map +1 -0
  350. package/dist/utils/Services/mockApi.js +60 -0
  351. package/dist/utils/analytics.d.ts +4 -0
  352. package/dist/utils/analytics.d.ts.map +1 -0
  353. package/dist/utils/analytics.js +12 -0
  354. package/dist/utils/shareRecapVideo.d.ts +6 -0
  355. package/dist/utils/shareRecapVideo.d.ts.map +1 -0
  356. package/dist/utils/shareRecapVideo.js +40 -0
  357. package/dist/utils/vendorApp.d.ts +2 -0
  358. package/dist/utils/vendorApp.d.ts.map +1 -0
  359. package/dist/utils/vendorApp.js +4 -0
  360. package/package.json +25 -10
  361. package/src/App.css +8 -0
  362. package/src/App.tsx +75 -22
  363. package/src/LoginScreen.css +6 -139
  364. package/src/LoginScreen.tsx +126 -36
  365. package/src/OtpScreen.css +5 -127
  366. package/src/OtpScreen.tsx +84 -37
  367. package/src/RecapApp.tsx +6 -3
  368. package/src/RecapLoadingScreen.css +11 -0
  369. package/src/RecapLoadingScreen.tsx +64 -0
  370. package/src/RecapStory.tsx +11 -423
  371. package/src/StoryProgress.tsx +18 -104
  372. package/src/categories.ts +30 -0
  373. package/src/components/RecapIntroLayout.css +225 -0
  374. package/src/components/RecapIntroLayout.tsx +64 -0
  375. package/src/data/mock.ts +110 -67
  376. package/src/data/recapCopy.ts +33 -21
  377. package/src/data/remoteAssets.ts +3 -0
  378. package/src/hooks/useBackgroundMusic.ts +46 -48
  379. package/src/hooks/useCountUp.ts +36 -0
  380. package/src/hooks/useFrameImages.ts +19 -0
  381. package/src/hooks/useSessionValidator.ts +115 -0
  382. package/src/hooks/useShareCardPrecapture.ts +50 -0
  383. package/src/hooks/useStatusBarColor.ts +36 -0
  384. package/src/index.css +1 -1
  385. package/src/index.ts +24 -0
  386. package/src/lib/queryClient.ts +34 -0
  387. package/src/main.tsx +44 -0
  388. package/src/queries/recap.ts +15 -0
  389. package/src/slides/Slide10Final.tsx +2 -56
  390. package/src/slides/Slide1Intro.css +1 -2
  391. package/src/slides/Slide1Intro.tsx +22 -32
  392. package/src/slides/Slide2Days.tsx +7 -55
  393. package/src/slides/Slide3Revenue.tsx +5 -29
  394. package/src/slides/Slide4Orders.tsx +12 -53
  395. package/src/slides/Slide5Buyers.tsx +9 -52
  396. package/src/slides/Slide6Customer.tsx +3 -21
  397. package/src/slides/Slide9Year.tsx +3 -26
  398. package/src/slides/registry.tsx +129 -0
  399. package/src/store/auth.tsx +72 -0
  400. package/src/story/StoryProgressBars.tsx +42 -0
  401. package/src/story/index.ts +11 -0
  402. package/src/story/resolveStories.ts +31 -0
  403. package/src/story/storyPlayerReducer.ts +80 -0
  404. package/src/story/types.ts +49 -0
  405. package/src/story/usePreloadAssets.ts +28 -0
  406. package/src/story/useStoryGestures.ts +95 -0
  407. package/src/story/useStoryKeyboard.ts +56 -0
  408. package/src/story/useStoryPlayer.ts +120 -0
  409. package/src/story/useStoryTimer.ts +55 -0
  410. package/src/story/useVideoCaptureBridge.ts +30 -0
  411. package/src/top10/RecapStory2026.tsx +136 -0
  412. package/src/top10/Top10Chrome.tsx +66 -0
  413. package/src/top10/Top10Slides.css +308 -0
  414. package/src/top10/Top10Story.css +250 -0
  415. package/src/top10/fluctuatingSlides.tsx +88 -0
  416. package/src/top10/format.ts +61 -0
  417. package/src/top10/illustrations/IllustrationLayers.tsx +150 -0
  418. package/src/top10/illustrations/closingAssets.ts +120 -0
  419. package/src/top10/illustrations/index.tsx +753 -0
  420. package/src/top10/lowDataSlides.tsx +178 -0
  421. package/src/top10/motion.ts +65 -0
  422. package/src/top10/registry.tsx +370 -0
  423. package/src/top10/slides.tsx +560 -0
  424. package/src/top10/steadySlides.tsx +199 -0
  425. package/src/top10/useCanvasScale.ts +66 -0
  426. package/src/top10/zeroOrderSlides.tsx +120 -0
  427. package/src/types.ts +95 -19
  428. package/src/utils/Helpers.tsx +25 -0
  429. package/src/utils/RecapApi.tsx +39 -0
  430. package/src/utils/Services/AuthServices.tsx +18 -0
  431. package/src/utils/Services/mockApi.ts +77 -0
  432. package/src/utils/analytics.ts +15 -0
  433. package/src/utils/shareRecapVideo.ts +44 -0
  434. package/src/utils/vendorApp.ts +5 -0
  435. package/src/vite-env.d.ts +1 -0
  436. package/src/react-app-env.d.ts +0 -26
@@ -0,0 +1,225 @@
1
+ /* Shared look for login, OTP and loading screens (Figma: From Recap On screen, 18597:26837) */
2
+ @font-face {
3
+ font-family: 'Neo Zine';
4
+ src: url('/fonts/NeoZine-Regular.woff2') format('woff2'),
5
+ url('/fonts/NeoZine-Regular.woff') format('woff'),
6
+ url('/fonts/NeoZine-Regular.otf') format('opentype');
7
+ font-weight: 400;
8
+ font-style: normal;
9
+ /* The cut-out letters look nothing like a fallback font, so hide the wordmark briefly rather than swap */
10
+ font-display: block;
11
+ }
12
+
13
+ .recap-intro {
14
+ --recap-intro-primary-400: #A5A3EE;
15
+ --recap-intro-surface: #F2F4F6;
16
+ --recap-intro-accent: #FF9900;
17
+
18
+ position: relative;
19
+ width: 100%;
20
+ height: 100%;
21
+ overflow: hidden;
22
+ background: linear-gradient(to bottom, #4F4CD8, #2A2872);
23
+ color: var(--recap-intro-surface);
24
+ font-family: 'Aileron', sans-serif;
25
+ }
26
+
27
+ /* 800×800 frame centered on the screen, clipping the 619×619 dot tunnel */
28
+ .recap-intro__tunnel {
29
+ position: absolute;
30
+ left: 50%;
31
+ top: 50%;
32
+ width: 800px;
33
+ height: 800px;
34
+ transform: translate(-50%, -50%);
35
+ overflow: hidden;
36
+ pointer-events: none;
37
+ }
38
+
39
+ .recap-intro__tunnel-group {
40
+ position: absolute;
41
+ left: 86px;
42
+ top: 90px;
43
+ width: 619px;
44
+ height: 619px;
45
+ will-change: transform;
46
+ }
47
+
48
+ .recap-intro__tunnel-group img {
49
+ display: block;
50
+ }
51
+
52
+ .recap-intro__column {
53
+ position: relative;
54
+ z-index: 1;
55
+ height: 100%;
56
+ display: flex;
57
+ flex-direction: column;
58
+ align-items: center;
59
+ padding-top: calc(env(safe-area-inset-top) + 8px);
60
+ padding-bottom: calc(env(safe-area-inset-bottom) + 40px);
61
+ overflow-y: auto;
62
+ }
63
+
64
+ .recap-intro__top-bar {
65
+ flex: none;
66
+ display: flex;
67
+ justify-content: flex-end;
68
+ width: 100%;
69
+ min-height: 64px;
70
+ padding: 12px 16px;
71
+ }
72
+
73
+ /* 164px gaps from the design; they shrink evenly on short screens */
74
+ .recap-intro__spacer {
75
+ flex: 0 1 164px;
76
+ min-height: 24px;
77
+ }
78
+
79
+ .recap-intro__close {
80
+ display: block;
81
+ width: 40px;
82
+ height: 40px;
83
+ padding: 0;
84
+ border: none;
85
+ background: transparent;
86
+ cursor: pointer;
87
+ }
88
+
89
+ .recap-intro__close img {
90
+ display: block;
91
+ }
92
+
93
+ /* Text intentionally overflows the 324×53 black box, as in the design */
94
+ .recap-wordmark {
95
+ flex: none;
96
+ position: relative;
97
+ width: 324px;
98
+ height: 53px;
99
+ background: #000;
100
+ }
101
+
102
+ .recap-wordmark__text {
103
+ position: absolute;
104
+ left: -4px;
105
+ top: -3.92px;
106
+ width: 342px;
107
+ font-family: 'Neo Zine', 'Aileron', sans-serif;
108
+ font-weight: 400;
109
+ font-size: 82.41px;
110
+ line-height: 73.242px;
111
+ text-transform: capitalize;
112
+ white-space: nowrap;
113
+ color: #FFFFFF;
114
+ text-shadow: 0 4.12px 4.12px rgba(0, 0, 0, 0.25);
115
+ }
116
+
117
+ .recap-wordmark__year {
118
+ color: var(--recap-intro-accent);
119
+ }
120
+
121
+ .recap-intro__content {
122
+ flex: none;
123
+ width: min(343px, calc(100% - 32px));
124
+ display: flex;
125
+ flex-direction: column;
126
+ gap: 32px;
127
+ }
128
+
129
+ .recap-intro__copy {
130
+ display: flex;
131
+ flex-direction: column;
132
+ gap: 32px;
133
+ }
134
+
135
+ /* Box heights match the design's cap-height trimming (eyebrow 10px, headline 3 × 36px − 14px);
136
+ CSS text-box trimming isn't used because Aileron's cap-height metric trims too much */
137
+ .recap-intro__eyebrow {
138
+ margin: 0;
139
+ font-weight: 600;
140
+ font-size: 14px;
141
+ line-height: 10px;
142
+ letter-spacing: 1.12px;
143
+ text-transform: uppercase;
144
+ color: var(--recap-intro-primary-400);
145
+ }
146
+
147
+ .recap-intro__headline {
148
+ margin: -7px 0;
149
+ font-weight: 700;
150
+ font-size: 32px;
151
+ line-height: 36px;
152
+ letter-spacing: -0.64px;
153
+ color: var(--recap-intro-surface);
154
+ }
155
+
156
+ /* Forms on the gradient (login + OTP) */
157
+ .recap-intro .form-group {
158
+ display: flex;
159
+ flex-direction: column;
160
+ gap: 8px;
161
+ width: 100%;
162
+ }
163
+
164
+ .recap-intro .form-label {
165
+ font-weight: 600;
166
+ font-size: 12px;
167
+ line-height: 1.2;
168
+ letter-spacing: 0.96px;
169
+ text-transform: uppercase;
170
+ color: var(--recap-intro-primary-400);
171
+ }
172
+
173
+ .recap-intro .form-input,
174
+ .recap-intro .otp-input {
175
+ height: 48px;
176
+ min-height: 48px;
177
+ padding: 12px 16px;
178
+ border: 1px solid var(--recap-intro-primary-400);
179
+ background: rgba(255, 255, 255, 0.06);
180
+ color: var(--recap-intro-surface);
181
+ font-family: 'Aileron', sans-serif;
182
+ font-size: 16px;
183
+ line-height: 1.2;
184
+ outline: none;
185
+ }
186
+
187
+ .recap-intro .form-input {
188
+ width: 100%;
189
+ }
190
+
191
+ .recap-intro .form-input:focus,
192
+ .recap-intro .otp-input:focus {
193
+ border-color: var(--recap-intro-surface);
194
+ }
195
+
196
+ .recap-intro .form-input::placeholder {
197
+ color: var(--recap-intro-primary-400);
198
+ }
199
+
200
+ .recap-intro .btn-primary {
201
+ display: flex;
202
+ justify-content: center;
203
+ align-items: center;
204
+ width: 100%;
205
+ height: 48px;
206
+ min-height: 48px;
207
+ padding: 12px 16px;
208
+ border: none;
209
+ background: var(--recap-intro-surface);
210
+ color: #2A2872;
211
+ font-family: 'Aileron', sans-serif;
212
+ font-weight: 700;
213
+ font-size: 16px;
214
+ line-height: 1.2;
215
+ cursor: pointer;
216
+ transition: opacity 0.2s;
217
+ }
218
+
219
+ .recap-intro .btn-primary:hover {
220
+ opacity: 0.9;
221
+ }
222
+
223
+ .recap-intro .btn-primary:active {
224
+ opacity: 0.8;
225
+ }
@@ -0,0 +1,64 @@
1
+ import React from 'react';
2
+ import type { ReactNode } from 'react';
3
+ import { motion, useReducedMotion } from 'framer-motion';
4
+ import tunnel from '../assets/recap-intro/tunnel.svg';
5
+ import closeIcon from '../assets/recap-intro/close.svg';
6
+ import './RecapIntroLayout.css';
7
+
8
+ /** Length of one loop of the intro animations, in seconds (Figma timeline: 3000ms). */
9
+ export const RECAP_INTRO_LOOP_S = 3;
10
+
11
+ interface RecapIntroLayoutProps {
12
+ children: ReactNode;
13
+ onClose?: () => void;
14
+ year?: number;
15
+ }
16
+
17
+ /**
18
+ * RecapIntroLayout - Shared shell for the pre-story screens (login, OTP, loading):
19
+ * gradient background, rotating dot tunnel, close button and the "Recap 26" wordmark.
20
+ */
21
+ function RecapIntroLayout({ children, onClose, year = 2026 }: RecapIntroLayoutProps) {
22
+ const reduceMotion = useReducedMotion();
23
+
24
+ return (
25
+ <div className="recap-intro">
26
+ <div className="recap-intro__tunnel" aria-hidden="true">
27
+ <motion.div
28
+ className="recap-intro__tunnel-group"
29
+ animate={reduceMotion ? undefined : { rotate: [0, 360], scale: [1, 1.08, 1] }}
30
+ transition={{
31
+ rotate: { duration: RECAP_INTRO_LOOP_S, times: [0, 1], ease: 'linear', repeat: Infinity },
32
+ scale: { duration: RECAP_INTRO_LOOP_S, times: [0, 0.9999, 1], ease: 'easeInOut', repeat: Infinity },
33
+ }}
34
+ >
35
+ <img src={tunnel} alt="" width={619} height={619} />
36
+ </motion.div>
37
+ </div>
38
+
39
+ <div className="recap-intro__column">
40
+ <div className="recap-intro__top-bar">
41
+ {onClose && (
42
+ <button type="button" className="recap-intro__close" onClick={onClose} aria-label="Close">
43
+ <img src={closeIcon} alt="" width={40} height={40} />
44
+ </button>
45
+ )}
46
+ </div>
47
+
48
+ <div className="recap-intro__spacer" aria-hidden="true" />
49
+
50
+ <div className="recap-wordmark" role="img" aria-label={`Recap ${year}`}>
51
+ <span className="recap-wordmark__text" aria-hidden="true">
52
+ Recap <span className="recap-wordmark__year">{String(year).slice(-2)}</span>
53
+ </span>
54
+ </div>
55
+
56
+ <div className="recap-intro__spacer" aria-hidden="true" />
57
+
58
+ <div className="recap-intro__content">{children}</div>
59
+ </div>
60
+ </div>
61
+ );
62
+ }
63
+
64
+ export default RecapIntroLayout;
package/src/data/mock.ts CHANGED
@@ -1,77 +1,120 @@
1
- import { BUSINESS_CATEGORIES } from "../types";
2
- import type { RecapData } from "../types";
1
+ import { RECAP_CATEGORIES } from "../categories";
2
+ import type { RecapData, ProductSummary } from "../types";
3
+
4
+ const PRODUCT_IMAGE =
5
+ "https://images.unsplash.com/photo-1447078806655-40579c2520d6?auto=format&fit=crop&w=400&q=80";
6
+
7
+ const favouriteProduct = (name: string, units: number): ProductSummary => ({
8
+ name,
9
+ units,
10
+ productImage: PRODUCT_IMAGE,
11
+ });
12
+
13
+ const SHARE_VIDEO =
14
+ "https://katajereassets.blob.core.windows.net/recap-videos/recap_4e5f6a7b-8c9d-0e1f-2a3b-4c5d6e7f8a9b_738c9226abe1a8f1a07263948a2d175e.mp4";
3
15
 
4
16
  /**
5
- * Mock data for the recap experience
6
- * This will be replaced with real API data later
17
+ * Mock RecapData per 2026 category — only fields the story reads for that category.
18
+ * Synthetic values exercise the Figma frames and their evidence rules.
7
19
  */
20
+
21
+ /** Top 10 (`top_10`) — full story: orders → closing. */
8
22
  export const mockRecapData: RecapData = {
9
- businessName: "RICHYO ENTERPRISES",
10
- days: 259,
11
- streak: 47,
12
- revenue: 22594000,
13
- orders: 487,
14
- firstTimeBuyers: 234,
15
- repeatBuyers: 65,
16
- topCustomerName: "Micheal Scoffy",
23
+ businessName: "Fabrics Uni",
24
+ businessCategory: RECAP_CATEGORIES.TOP_10,
25
+ businessLogo: undefined,
26
+ year: 2026,
17
27
  currency: "NGN",
18
- year: 2025,
19
- introHeadline: "This Year You Carry Your Hustle For Head",
20
- introSubtitle: "Make we look the numbers 🔥",
21
- topProducts: [
22
- {
23
- name: "Vanilla Yoghurt",
24
- units: 45,
25
- productImage:
26
- "https://images.unsplash.com/photo-1447078806655-40579c2520d6?auto=format&fit=crop&w=400&q=80",
27
- },
28
- {
29
- name: "Cocoa Milkshake",
30
- units: 38,
31
- productImage:
32
- "https://images.unsplash.com/photo-1504674900247-0877df9cc836?auto=format&fit=crop&w=400&q=80",
33
- },
34
- {
35
- name: "Spicy Crunch",
36
- units: 33,
37
- productImage:
38
- "https://images.unsplash.com/photo-1447078806655-40579c2520d6?auto=format&fit=crop&w=400&q=80",
39
- },
40
- {
41
- name: "Fresh Plantain Chips",
42
- units: 29,
43
- productImage:
44
- "https://images.unsplash.com/photo-1506084868230-bb9d95c24759?auto=format&fit=crop&w=400&q=80",
45
- },
46
- {
47
- name: "Mango Juice",
48
- units: 27,
49
- productImage:
50
- "https://images.unsplash.com/photo-1447078806655-40579c2520d6?auto=format&fit=crop&w=400&q=80",
51
- },
52
- ],
53
- productImages: [
54
- "https://images.unsplash.com/photo-1447078806655-40579c2520d6?auto=format&fit=crop&w=400&q=80",
55
- "https://images.unsplash.com/photo-1504674900247-0877df9cc836?auto=format&fit=crop&w=400&q=80",
56
- "https://images.unsplash.com/photo-1506084868230-bb9d95c24759?auto=format&fit=crop&w=400&q=80",
57
- "https://images.unsplash.com/photo-1447078806655-40579c2520d6?auto=format&fit=crop&w=400&q=80",
58
- "https://images.unsplash.com/photo-1498837167922-ddd27525d352?auto=format&fit=crop&w=400&q=80",
59
- "https://images.unsplash.com/photo-1470337458703-46ad1756a187?auto=format&fit=crop&w=400&q=80",
60
- ],
61
- businessCategory: BUSINESS_CATEGORIES.THRIVING,
62
- busiestMonth: "Oct",
63
- videoUrl:
64
- "https://katajereassets.blob.core.windows.net/recap-videos/recap_4e5f6a7b-8c9d-0e1f-2a3b-4c5d6e7f8a9b_738c9226abe1a8f1a07263948a2d175e.mp4",
65
- downloadUrl:
66
- "https://api.huxxle.com/api/download?fileUrl=https://katajereassets.blob.core.windows.net/recap-videos/recap_4e5f6a7b-8c9d-0e1f-2a3b-4c5d6e7f8a9b_738c9226abe1a8f1a07263948a2d175e.mp4",
67
- isVideo: false,
68
- websiteLink: "https://vendor.huxxle.com",
69
- websiteVisits: 123400,
70
- mostViewedProduct: "Vanilla Yoghurt",
71
- mostViewedProductCount: 567,
28
+ videoUrl: SHARE_VIDEO,
29
+ orders: 307,
30
+ firstTimeBuyers: 86,
31
+ repeatBuyers: 44,
32
+ busiestMonth: "Nov",
33
+ biggestDay: { date: "2026-11-28", orders: 12, revenue: 212000 },
34
+ growthMultiplier: 4,
35
+ growthComparison: { baselineMonth: 'Jan', comparisonMonth: 'Dec' },
36
+ bestWeekday: { day: "Thursday", salesShare: 25, orders: 77 },
37
+ milestone: { amount: 5000000, reachedOn: "2026-12-19" },
38
+ personality: {
39
+ title: "Top Plug",
40
+ description: "Your paid order count put you in the top 10% of sellers on Huxxle.",
41
+ },
42
+ favouriteProduct: favouriteProduct("Chewing Gum Lace", 74),
43
+ };
44
+
45
+ /** Steady (`steady`) — bag / calendar / order-count milestone. */
46
+ export const mockSteadyRecapData: RecapData = {
47
+ businessName: "Fabrics Uni",
48
+ businessCategory: RECAP_CATEGORIES.STEADY,
49
+ year: 2026,
50
+ currency: "NGN",
51
+ videoUrl: SHARE_VIDEO,
52
+ orders: 212,
53
+ firstTimeBuyers: 86,
54
+ repeatBuyers: 44,
55
+ busiestMonth: "Nov",
56
+ busiestMonthOrders: 52,
57
+ activeMonths: 12,
58
+ biggestDay: { date: "2026-11-28", orders: 12, revenue: 212000 },
59
+ growthMultiplier: 4,
60
+ growthComparison: { baselineMonth: 'Jan', comparisonMonth: 'Dec' },
61
+ orderMilestone: { orders: 100, reachedOn: "2026-07-17" },
62
+ personality: {
63
+ title: "The Constant",
64
+ description: "A business that kept showing up, month after month.",
65
+ },
66
+ favouriteProduct: favouriteProduct("Chewing Gum Lace", 74),
67
+ };
68
+
69
+ /** Fluctuating (`fluctuating`) — busy-month story. */
70
+ export const mockFluctuatingRecapData: RecapData = {
71
+ businessName: "Fabrics Uni",
72
+ businessCategory: RECAP_CATEGORIES.FLUCTUATING,
73
+ year: 2026,
74
+ currency: "NGN",
75
+ videoUrl: SHARE_VIDEO,
76
+ orders: 152,
77
+ totalCustomers: 118,
78
+ busiestMonth: "Nov",
79
+ busiestMonthOrders: 43,
80
+ biggestDay: { date: "2026-11-28", orders: 12, revenue: 212000 },
81
+ personality: {
82
+ title: "Your Sales Moments",
83
+ description: "November stood out in your recorded sales this year.",
84
+ },
85
+ favouriteProduct: favouriteProduct("Chewing Gum Lace", 39),
86
+ };
87
+
88
+ /** Low data (`low_data`) — new store with a few orders. */
89
+ export const mockLowDataRecapData: RecapData = {
90
+ businessName: "Fabrics Uni",
91
+ businessCategory: RECAP_CATEGORIES.LOW_DATA,
92
+ year: 2026,
93
+ currency: "NGN",
94
+ videoUrl: SHARE_VIDEO,
95
+ orders: 4,
96
+ totalCustomers: 3,
97
+ storeOpenedOn: "2026-08-14",
98
+ firstOrderOn: "2026-09-19",
99
+ websiteVisits: 620,
100
+ storefrontOrders: 2,
101
+ daysOnHuxxle: 141,
102
+ favouriteProduct: favouriteProduct("Chewing Gum Lace", 12),
103
+ };
104
+
105
+ /** Zero order (`zero_order`) — store opened, catalogue only, no orders / no favourite. */
106
+ export const mockZeroOrderRecapData: RecapData = {
107
+ businessName: "Fabrics Uni",
108
+ businessCategory: RECAP_CATEGORIES.ZERO_ORDER,
109
+ year: 2026,
110
+ videoUrl: SHARE_VIDEO,
111
+ orders: 0,
112
+ storeOpenedOn: "2026-08-14",
113
+ catalogueProducts: 8,
114
+ storefrontReady: true,
72
115
  };
73
116
 
74
- // Slide durations in seconds - each slide can have its own timing
117
+ /** @deprecated Prefer per-slide timing in the story registry. */
75
118
  export const slideDurations: Record<string, number> = {
76
119
  intro: 8,
77
120
  days: 8,
@@ -8,26 +8,38 @@ export interface RecapSlideCopy {
8
8
  yearHeadline: string;
9
9
  }
10
10
 
11
+ const thriving: RecapSlideCopy = {
12
+ introHeadline: 'This Year You Carry Your Hustle For Head',
13
+ introSubtitle: 'Make we look the numbers 🔥',
14
+ introVariant: 'default',
15
+ revenueFooter: 'More money dey come!',
16
+ yearHeadline: 'You really kill am this year, You are the real MVP'
17
+ };
18
+
19
+ const notThriving: RecapSlideCopy = {
20
+ introHeadline: 'Omoor! We See Your Hustle, But….',
21
+ introSubtitle: 'Make we talk small 🤫',
22
+ introVariant: 'default',
23
+ revenueFooter: 'Consistency go pay, we dey your back.',
24
+ yearHeadline: 'This year rough, but you are the real MVP'
25
+ };
26
+
27
+ const newUser: RecapSlideCopy = {
28
+ introHeadline: 'You Be New Face OOO....',
29
+ introSubtitle: 'Come back for 6 days time, we dey for you 😉',
30
+ introVariant: 'new-user',
31
+ revenueFooter: 'Draft the plan, then the sales go follow.',
32
+ yearHeadline: 'You really kill am this year, You are the real MVP'
33
+ };
34
+
35
+ /** 2025 slide copy. 2026 category keys reuse the 2025 copy they map to in `categories.ts`. */
11
36
  export const recapCopy: Record<BusinessCategory, RecapSlideCopy> = {
12
- thriving: {
13
- introHeadline: 'This Year You Carry Your Hustle For Head',
14
- introSubtitle: 'Make we look the numbers 🔥',
15
- introVariant: 'default',
16
- revenueFooter: 'More money dey come!',
17
- yearHeadline: 'You really kill am this year, You are the real MVP'
18
- },
19
- not_thriving: {
20
- introHeadline: 'Omoor! We See Your Hustle, But….',
21
- introSubtitle: 'Make we talk small 🤫',
22
- introVariant: 'default',
23
- revenueFooter: 'Consistency go pay, we dey your back.',
24
- yearHeadline: 'This year rough, but you are the real MVP'
25
- },
26
- new_user: {
27
- introHeadline: 'You Be New Face OOO....',
28
- introSubtitle: 'Come back for 6 days time, we dey for you 😉',
29
- introVariant: 'new-user',
30
- revenueFooter: 'Draft the plan, then the sales go follow.',
31
- yearHeadline: 'You really kill am this year, You are the real MVP'
32
- }
37
+ thriving,
38
+ not_thriving: notThriving,
39
+ new_user: newUser,
40
+ top_10: thriving,
41
+ steady: thriving,
42
+ fluctuating: notThriving,
43
+ low_data: newUser,
44
+ zero_order: newUser,
33
45
  };
@@ -0,0 +1,3 @@
1
+ // Large media is served from the CDN rather than bundled, to keep the package small.
2
+ export const RECAP_MUSIC_URL = 'https://katajereassets.blob.core.windows.net/recap-videos/recap-music.mp3';
3
+ export const MONEY_RAIN_GIF_URL = 'https://katajereassets.blob.core.windows.net/recap-videos/raining-money.gif';
@@ -1,79 +1,77 @@
1
- import { useEffect, useRef, useState } from 'react';
1
+ import { useCallback, useEffect, useRef, useState } from 'react';
2
2
 
3
3
  interface UseBackgroundMusicOptions {
4
4
  src: string;
5
5
  volume?: number;
6
- autoPlay?: boolean;
7
6
  loop?: boolean;
7
+ /** Desired playback state; the hook keeps the audio element in sync with it. */
8
+ shouldPlay: boolean;
9
+ /** When playback stops, rewind to the start (e.g. on the outro, so a replay starts fresh). */
10
+ rewindOnStop?: boolean;
8
11
  }
9
12
 
10
13
  /**
11
- * useBackgroundMusic - simple audio controller for a single background track.
12
- * Handles autoplay attempt (may be blocked by browsers), mute toggle, and cleanup on unmount.
14
+ * useBackgroundMusic - background track that follows the story player's state.
15
+ * Browsers may block the first autoplay attempt; call `unlock` from a user gesture to retry.
13
16
  */
14
- export function useBackgroundMusic({ src, volume = 0.6, autoPlay = true, loop = false }: UseBackgroundMusicOptions) {
17
+ export function useBackgroundMusic({
18
+ src,
19
+ volume = 0.6,
20
+ loop = true,
21
+ shouldPlay,
22
+ rewindOnStop = false,
23
+ }: UseBackgroundMusicOptions) {
15
24
  const audioRef = useRef<HTMLAudioElement | null>(null);
16
- const [isPlaying, setIsPlaying] = useState(false);
25
+ const shouldPlayRef = useRef(shouldPlay);
17
26
  const [isMuted, setIsMuted] = useState(false);
27
+ const isMutedRef = useRef(isMuted);
18
28
 
19
29
  useEffect(() => {
20
30
  const audio = new Audio(src);
21
31
  audio.loop = loop;
22
32
  audio.volume = volume;
33
+ audio.preload = 'auto';
34
+ audio.muted = isMutedRef.current;
23
35
  audioRef.current = audio;
24
36
 
25
- const handlePlay = () => setIsPlaying(true);
26
- const handlePause = () => setIsPlaying(false);
27
- const handleEnded = () => setIsPlaying(false);
28
-
29
- audio.addEventListener('play', handlePlay);
30
- audio.addEventListener('pause', handlePause);
31
- audio.addEventListener('ended', handleEnded);
32
-
33
- if (autoPlay) {
34
- const playPromise = audio.play();
35
- if (playPromise !== undefined) {
36
- playPromise.catch(() => {
37
- // Autoplay may be blocked; user interaction will be needed.
38
- });
39
- }
40
- }
41
-
42
37
  return () => {
43
- audio.removeEventListener('play', handlePlay);
44
- audio.removeEventListener('pause', handlePause);
45
- audio.removeEventListener('ended', handleEnded);
46
38
  audio.pause();
47
- audio.src = '';
39
+ audio.removeAttribute('src');
40
+ audio.load();
48
41
  audioRef.current = null;
49
42
  };
50
- }, [src, volume, autoPlay, loop]);
43
+ }, [src, volume, loop]);
51
44
 
52
- const play = () => {
53
- const playPromise = audioRef.current?.play();
54
- if (playPromise !== undefined) {
55
- playPromise.catch(() => {
56
- // Playback failed (likely blocked); caller may prompt user interaction.
45
+ useEffect(() => {
46
+ shouldPlayRef.current = shouldPlay;
47
+ const audio = audioRef.current;
48
+ if (!audio) return;
49
+
50
+ if (shouldPlay) {
51
+ audio.play().catch(() => {
52
+ // Autoplay blocked; `unlock` retries on the next user gesture.
57
53
  });
54
+ } else {
55
+ audio.pause();
56
+ if (rewindOnStop) audio.currentTime = 0;
58
57
  }
59
- };
60
-
61
- const pause = () => audioRef.current?.pause();
58
+ }, [shouldPlay, rewindOnStop, src, volume, loop]);
62
59
 
63
- const stop = () => {
64
- if (audioRef.current) {
65
- audioRef.current.pause();
66
- audioRef.current.currentTime = 0;
67
- setIsPlaying(false);
60
+ const unlock = useCallback(() => {
61
+ const audio = audioRef.current;
62
+ if (audio && shouldPlayRef.current && audio.paused) {
63
+ audio.play().catch(() => {});
68
64
  }
69
- };
65
+ }, []);
70
66
 
71
- const toggleMute = () => {
72
- if (!audioRef.current) return;
73
- const nextMuted = !audioRef.current.muted;
74
- audioRef.current.muted = nextMuted;
67
+ const toggleMute = useCallback(() => {
68
+ const audio = audioRef.current;
69
+ if (!audio) return;
70
+ const nextMuted = !audio.muted;
71
+ audio.muted = nextMuted;
72
+ isMutedRef.current = nextMuted;
75
73
  setIsMuted(nextMuted);
76
- };
74
+ }, []);
77
75
 
78
- return { isPlaying, isMuted, play, pause, stop, toggleMute };
76
+ return { isMuted, toggleMute, unlock };
79
77
  }