@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,199 @@
1
+ import React, { useEffect, useState } from 'react';
2
+ import { motion } from 'framer-motion';
3
+ import type { RecapData } from '../types';
4
+ import {
5
+ BagIllustration,
6
+ CalendarIllustration,
7
+ CALENDAR_TICK_DONE_S,
8
+ ILLUSTRATION_ASSETS,
9
+ MilestoneCoinIllustration,
10
+ SurpriseIllustration,
11
+ } from './illustrations';
12
+ import { dayAndMonth, fullMonthName, roundCountInWords, shortDateUpper } from './format';
13
+ import { fadeIn, popIn } from './motion';
14
+ import { At, Illustration, isPaidOrderRecap, RecognitionSlide, type SlideProps, yearOf } from './slides';
15
+ import treeIllustration from '../assets/steady/tree.svg';
16
+
17
+ /* Steady (`steady`) story frames. Slides that match Top 10 reuse its components (see registry.tsx).
18
+ Motion timings from docs/design/.../steady-motion.md (designer video). */
19
+
20
+ export const STEADY_ASSETS = {
21
+ months: ILLUSTRATION_ASSETS.calendar,
22
+ orders: ILLUSTRATION_ASSETS.bag,
23
+ milestone: ILLUSTRATION_ASSETS.milestoneCoin,
24
+ recognition: [treeIllustration],
25
+ };
26
+
27
+ /** Counts from 0 to `to` after `delay`, matching the Steady Orders video. */
28
+ function CountUp({ to, delay = 0.15, duration = 1.45 }: { to: number; delay?: number; duration?: number }) {
29
+ const [value, setValue] = useState(0);
30
+
31
+ useEffect(() => {
32
+ let frame = 0;
33
+ const startAt = performance.now() + delay * 1000;
34
+ const tick = (now: number) => {
35
+ if (now < startAt) {
36
+ frame = requestAnimationFrame(tick);
37
+ return;
38
+ }
39
+ const t = Math.min(1, (now - startAt) / (duration * 1000));
40
+ const eased = 1 - (1 - t) ** 3;
41
+ setValue(Math.round(to * eased));
42
+ if (t < 1) frame = requestAnimationFrame(tick);
43
+ };
44
+ frame = requestAnimationFrame(tick);
45
+ return () => cancelAnimationFrame(frame);
46
+ }, [to, delay, duration]);
47
+
48
+ return <>{value.toLocaleString('en-NG')}</>;
49
+ }
50
+
51
+ // Steady Months (18864:38776) — only the busiest month (most orders) is stamped (18868:181507)
52
+ export function SteadyMonthsSlide({ data }: SlideProps) {
53
+ if (!data.busiestMonth) return null;
54
+
55
+ const paid = isPaidOrderRecap(data);
56
+ const busiestMonth = fullMonthName(data.busiestMonth);
57
+
58
+ return (
59
+ <>
60
+ <At top={100} className="s26-stack" style={{ gap: 24 }}>
61
+ <p className="s26-text s26-eyebrow">
62
+ {data.periodMode === 'preview' ? 'Across completed months' : 'Month after month'}
63
+ </p>
64
+ <motion.p className="s26-text s26-h4" {...fadeIn(0.25)}>
65
+ {paid ? 'Paid Orders' : 'Orders'} in {data.activeMonths} Months
66
+ </motion.p>
67
+ </At>
68
+ <Illustration top={231.5} height={394}>
69
+ <CalendarIllustration month={data.busiestMonth} />
70
+ </Illustration>
71
+ <At top={661} anchor="bottom" delay={CALENDAR_TICK_DONE_S + 0.2}>
72
+ <p className="s26-text s26-body s26-body--strong">
73
+ {data.activeMonths === 12
74
+ ? `You recorded at least one ${paid ? 'paid ' : ''}order in every month of ${yearOf(data)}.`
75
+ : `${busiestMonth} had the most ${paid ? 'paid ' : ''}orders of those months.`}
76
+ </p>
77
+ </At>
78
+ </>
79
+ );
80
+ }
81
+
82
+ // Steady Orders (18864:38934)
83
+ export function SteadyOrdersSlide({ data }: SlideProps) {
84
+ const orders = data.orders.toLocaleString('en-NG');
85
+ const ordersLabel = isPaidOrderRecap(data) ? 'paid orders' : 'orders';
86
+
87
+ return (
88
+ <>
89
+ <At top={100} className="s26-stack" style={{ gap: 24 }}>
90
+ <p className="s26-text s26-eyebrow">Your order count</p>
91
+ <motion.div className="s26-steady-count" {...fadeIn(0.15)}>
92
+ <p className="s26-text s26-h2 s26-steady-count__value">
93
+ <CountUp to={data.orders} delay={0.2} duration={1.45} />
94
+ </p>
95
+ <p className="s26-text s26-body">{ordersLabel}</p>
96
+ </motion.div>
97
+ <motion.p className="s26-text s26-h4" {...fadeIn(0.55)}>
98
+ Your Customers
99
+ <br />
100
+ Showed Up
101
+ </motion.p>
102
+ </At>
103
+ <Illustration top={260} height={394}>
104
+ <BagIllustration />
105
+ </Illustration>
106
+ <At top={661} anchor="bottom" delay={1.8}>
107
+ <p className="s26-text s26-body">
108
+ That&apos;s {orders} {ordersLabel} recorded on Huxxle.
109
+ </p>
110
+ </At>
111
+ </>
112
+ );
113
+ }
114
+
115
+ // Steady Biggest Day (18864:38743): the Top 10 cash rain on the secondary theme
116
+ export function SteadyBiggestDaySlide({ data }: SlideProps) {
117
+ const day = data.biggestDay!;
118
+ const date = dayAndMonth(day.date);
119
+ const ordersLabel = day.orders === 1 ? 'order' : 'orders';
120
+
121
+ return (
122
+ <>
123
+ <At top={100}>
124
+ <p className="s26-text s26-eyebrow">Your biggest day</p>
125
+ </At>
126
+ <At top={134} className="s26-stack" style={{ gap: 24 }}>
127
+ <motion.p className="s26-text s26-h2 s26-steady-day__date" {...fadeIn(0.2)}>
128
+ {date}
129
+ </motion.p>
130
+ <motion.p className="s26-text s26-h4" {...fadeIn(0.4)}>
131
+ was one for the books.
132
+ </motion.p>
133
+ </At>
134
+ <Illustration top={238} height={330}>
135
+ <SurpriseIllustration />
136
+ </Illustration>
137
+ <At top={685} anchor="bottom" delay={1.0}>
138
+ <p className="s26-text s26-body s26-body--strong s26-steady-day__body">
139
+ You recorded {day.orders.toLocaleString('en-NG')} {isPaidOrderRecap(data) && 'paid '}{ordersLabel} on {date}.
140
+ </p>
141
+ </At>
142
+ </>
143
+ );
144
+ }
145
+
146
+ // Steady Milestone (18864:39023) — coin scales in, then mc-shimmer sweeps across (designer video)
147
+ export function SteadyMilestoneSlide({ data }: SlideProps) {
148
+ const milestone = data.orderMilestone!;
149
+ const paid = isPaidOrderRecap(data);
150
+
151
+ return (
152
+ <>
153
+ <At top={100} className="s26-stack" style={{ gap: 24 }}>
154
+ <p className="s26-text s26-eyebrow">Milestone</p>
155
+ <motion.p className="s26-text s26-h4" {...fadeIn(0.25)}>
156
+ And Then Came
157
+ <br />
158
+ {paid ? 'Paid Order' : 'Order'} Number {milestone.orders.toLocaleString('en-NG')}.
159
+ </motion.p>
160
+ </At>
161
+ <Illustration top={205} height={326}>
162
+ <MilestoneCoinIllustration />
163
+ </Illustration>
164
+ <At top={556.5} anchor="bottom" className="s26-stack" style={{ gap: 40 }}>
165
+ <motion.p className="s26-text s26-h4" {...fadeIn(1.1)}>
166
+ {shortDateUpper(milestone.reachedOn)}
167
+ </motion.p>
168
+ <motion.p className="s26-text s26-body s26-body--strong" {...fadeIn(1.4)}>
169
+ {roundCountInWords(milestone.orders)} {paid && 'paid '}orders recorded on Huxxle. A milestone worth remembering.
170
+ </motion.p>
171
+ </At>
172
+ </>
173
+ );
174
+ }
175
+
176
+ /** Recognition chips shared by Steady and Fluctuating. */
177
+ export const momentumChips = (data: RecapData) => [
178
+ data.growthComparison && (data.growthMultiplier ?? 0) > 1
179
+ ? `${data.growthMultiplier}× paid order value (${data.growthComparison.baselineMonth.slice(0, 3)} → ${data.growthComparison.comparisonMonth.slice(0, 3)})`
180
+ : null,
181
+ data.busiestMonth ? `Busiest Month: ${fullMonthName(data.busiestMonth)}` : null,
182
+ ];
183
+
184
+ // Steady Recognition (18776:6124): the Top 10 layout with the tree and Steady stats
185
+ export function SteadyRecognitionSlide({ data }: SlideProps) {
186
+ return (
187
+ <RecognitionSlide
188
+ data={data}
189
+ title="The Constant"
190
+ art={
191
+ <motion.div className="s26-steady-tree" {...popIn(0.3, { scale: 0.8 })}>
192
+ <img src={treeIllustration} alt="" width={89.64} height={82.2026} />
193
+ </motion.div>
194
+ }
195
+ chips={momentumChips(data)}
196
+ bodyClassName="s26-body s26-body--strong"
197
+ />
198
+ );
199
+ }
@@ -0,0 +1,66 @@
1
+ import { createContext, useContext, useLayoutEffect, useState } from 'react';
2
+ import type { RefObject } from 'react';
3
+
4
+ export const CANVAS_WIDTH = 375;
5
+ export const CANVAS_HEIGHT = 770;
6
+
7
+ /** Most the canvas may shorten on phones before falling back to letterboxing. */
8
+ const MAX_SQUEEZE = 120;
9
+ const PHONE_MAX_WIDTH = 600;
10
+
11
+ export interface CanvasFit {
12
+ scale: number;
13
+ /** Canvas px removed from the middle of each slide so phones fill the screen width. */
14
+ squeeze: number;
15
+ }
16
+
17
+ /**
18
+ * Fits the 375×770 design canvas into the element. Desktop keeps the full canvas;
19
+ * phones always fill the width and shorten the canvas by up to MAX_SQUEEZE instead.
20
+ */
21
+ export function useCanvasScale(ref: RefObject<HTMLElement | null>, fillPortrait = false): CanvasFit {
22
+ const [fit, setFit] = useState<CanvasFit>({ scale: 1, squeeze: 0 });
23
+
24
+ useLayoutEffect(() => {
25
+ const element = ref.current;
26
+ if (!element) return;
27
+
28
+ const update = () => {
29
+ const { width, height } = element.getBoundingClientRect();
30
+ const canvas = element.querySelector<HTMLElement>(':scope > *');
31
+ const topInset = canvas ? parseFloat(getComputedStyle(canvas).top) || 0 : 0;
32
+ const available = height - topInset;
33
+ if (!width || available <= 0) return;
34
+
35
+ const widthScale = width / CANVAS_WIDTH;
36
+ const fullFit = Math.min(widthScale, available / CANVAS_HEIGHT);
37
+ if ((!fillPortrait && width > PHONE_MAX_WIDTH) || fullFit === widthScale) {
38
+ setFit({ scale: fullFit, squeeze: 0 });
39
+ return;
40
+ }
41
+
42
+ const squeeze = CANVAS_HEIGHT - available / widthScale;
43
+ if (squeeze <= MAX_SQUEEZE) {
44
+ setFit({ scale: widthScale, squeeze });
45
+ } else {
46
+ setFit({ scale: available / (CANVAS_HEIGHT - MAX_SQUEEZE), squeeze: MAX_SQUEEZE });
47
+ }
48
+ };
49
+ update();
50
+
51
+ const observer = new ResizeObserver(update);
52
+ observer.observe(element);
53
+ return () => observer.disconnect();
54
+ }, [ref, fillPortrait]);
55
+
56
+ return fit;
57
+ }
58
+
59
+ /** Empty space under every slide's last line (it ends around y 697) that can absorb squeeze first. */
60
+ const BOTTOM_SLACK = 46;
61
+
62
+ export const CanvasSqueezeContext = createContext(0);
63
+ export const useCanvasSqueeze = () => useContext(CanvasSqueezeContext);
64
+
65
+ /** How far content below the illustration must move up (and the illustration shrink) to stay on screen. */
66
+ export const useContentShift = () => Math.max(0, useCanvasSqueeze() - BOTTOM_SLACK);
@@ -0,0 +1,120 @@
1
+ import React from 'react';
2
+ import { motion } from 'framer-motion';
3
+ import { CatalogueIllustration, OpenSignIllustration, StorefrontIllustration } from './illustrations';
4
+ import { dayAndMonth } from './format';
5
+ import { fadeIn } from './motion';
6
+ import { At, Illustration, IntroSlide, SignatureSlide, type SlideProps } from './slides';
7
+
8
+ /* Zero order (`zero_order`) story frames. Motion from docs/design/.../zero-order-motion.md. */
9
+
10
+ // Zero order Intro (19039:4065): the Top 10 opening with new copy
11
+ export function ZeroOrderIntroSlide({ data }: SlideProps) {
12
+ return (
13
+ <IntroSlide
14
+ data={data}
15
+ headline={`${data.businessName}, Your Story Is Taking Shape.`}
16
+ body="Here’s a look at your business on Huxxle so far."
17
+ bodyClassName="s26-intro__body s26-body--strong"
18
+ />
19
+ );
20
+ }
21
+
22
+ // Use the First Chapter frame for account creation when storefront opening is unknown.
23
+ export function ZeroOrderFirstChapterSlide({ joinedOn }: { joinedOn?: string }) {
24
+ return (
25
+ <>
26
+ <At top={100} className="s26-stack" style={{ gap: 24 }}>
27
+ <p className="s26-text s26-eyebrow">Your first chapter</p>
28
+ <motion.p className="s26-text s26-h4" {...fadeIn(0.25)}>
29
+ {joinedOn ? 'You Joined Huxxle.' : 'Your Story on Huxxle.'}
30
+ </motion.p>
31
+ </At>
32
+ <Illustration top={216.77} height={320}>
33
+ <OpenSignIllustration />
34
+ </Illustration>
35
+ <At top={556.5} anchor="bottom" delay={1.2}>
36
+ <p className="s26-text s26-body s26-body--strong">
37
+ {joinedOn
38
+ ? `Your account was created on ${dayAndMonth(joinedOn)} ${joinedOn.slice(0, 4)}.`
39
+ : 'Make Huxxle a place for your business, one step at a time.'}
40
+ </p>
41
+ </At>
42
+ </>
43
+ );
44
+ }
45
+
46
+ // Zero order Products (19039:4935): empty + slot, then product card stamps in
47
+ export function ZeroOrderProductsSlide({ data }: SlideProps) {
48
+ const products = data.catalogueProducts;
49
+ const hasProducts = products !== undefined && Number.isSafeInteger(products) && products > 0;
50
+
51
+ return (
52
+ <>
53
+ <At top={100} className="s26-stack" style={{ gap: 24 }}>
54
+ <p className="s26-text s26-eyebrow">Your store</p>
55
+ <motion.p className="s26-text s26-h4" {...fadeIn(0.25)}>
56
+ Your Product
57
+ <br />
58
+ Catalogue.
59
+ </motion.p>
60
+ </At>
61
+ <Illustration top={230.5} height={354}>
62
+ <CatalogueIllustration />
63
+ </Illustration>
64
+ <At top={618} anchor="bottom" delay={1.4}>
65
+ <p className="s26-text s26-body">
66
+ {hasProducts ? (
67
+ <>
68
+ You have {products.toLocaleString('en-NG')} {products === 1 ? 'entry' : 'entries'} in your Huxxle catalogue.
69
+ <br />
70
+ Keep your product details up to date as your business changes.
71
+ </>
72
+ ) : products === 0 ? (
73
+ 'Your catalogue is empty. Add your first product whenever you’re ready.'
74
+ ) : (
75
+ 'Use your catalogue to show what your business offers.'
76
+ )}
77
+ </p>
78
+ </At>
79
+ </>
80
+ );
81
+ }
82
+
83
+ // Zero order Digital presence (19039:4947): storefront pops in, then soft bob
84
+ export function ZeroOrderOnlineSlide({ data }: SlideProps) {
85
+ const readyToShare = data.storefrontReady === true;
86
+ return (
87
+ <>
88
+ <At top={100} className="s26-stack" style={{ gap: 24 }}>
89
+ <p className="s26-text s26-eyebrow">Your store online</p>
90
+ <motion.p className="s26-text s26-h4" {...fadeIn(0.25)}>
91
+ {readyToShare ? 'Your Store Has a' : 'A Place for Your'}
92
+ <br />
93
+ {readyToShare ? 'Place Online.' : 'Store Online.'}
94
+ </motion.p>
95
+ </At>
96
+ <Illustration top={210} height={354}>
97
+ <StorefrontIllustration />
98
+ </Illustration>
99
+ <At top={618} anchor="bottom" delay={1.4}>
100
+ <p className="s26-text s26-body">
101
+ {readyToShare
102
+ ? <>Your Huxxle storefront is ready to share.<br />A place for people to find what you offer.</>
103
+ : 'With a Huxxle storefront, customers can browse what you offer in one place.'}
104
+ </p>
105
+ </At>
106
+ </>
107
+ );
108
+ }
109
+
110
+ // Zero order Signature (19039:5276): the Top 10 horizon with new copy
111
+ export function ZeroOrderSignatureSlide({ data }: SlideProps) {
112
+ return (
113
+ <SignatureSlide
114
+ data={data}
115
+ headline="There's Still Plenty of Story Left to Write."
116
+ body="Take the next step when it works for your business."
117
+ bodyClassName="s26-body s26-body--strong"
118
+ />
119
+ );
120
+ }
package/src/types.ts CHANGED
@@ -1,36 +1,111 @@
1
1
  // Type definitions for the Huxxle Recap app
2
+ import type { RecapCategory } from './categories';
2
3
 
3
4
  export type AuthStep = 'login' | 'otp' | 'recap';
4
5
 
5
- export type BusinessCategory = 'thriving' | 'not_thriving' | 'new_user';
6
+ /** 2026 category key, or a legacy 2025 backend value (mapped in `resolveRecapCategory`). */
7
+ export type BusinessCategory = 'thriving' | 'not_thriving' | 'new_user' | RecapCategory;
6
8
 
7
9
  export interface RecapData {
8
10
  businessName: string;
9
- days: number;
10
- streak: number;
11
- revenue: number;
12
- orders: number;
13
- firstTimeBuyers: number;
14
- repeatBuyers: number;
15
- topCustomerName: string;
16
11
  businessCategory: BusinessCategory;
17
- topProducts: Array<ProductSummary>;
18
- busiestMonth: string;
12
+ orders: number;
19
13
  videoUrl: string;
20
- downloadUrl: string;
21
- currency?: string; // e.g., 'NGN', 'USD'
22
- year?: number; // e.g., 2025
23
- introHeadline?: string; // Custom intro headline from backend
24
- introSubtitle?: string; // Custom intro subtitle from backend
25
- slideDurations?: Record<string, number>; // Optional per-slide durations
26
- isVideo?: boolean; // If true, hide sound icon (video has own audio)
27
- productImages?: string[]; // Optional image pool for background frames
28
- websiteLink?: string;
14
+
15
+ /** Customer-favourite product (Favourite slide). One product only. */
16
+ favouriteProduct?: ProductSummary;
17
+
18
+ /** Chrome avatar; falls back to a default if omitted. */
19
+ businessLogo?: string;
20
+ currency?: string;
21
+ year?: number;
22
+ periodMode?: 'preview' | 'final';
23
+ /** Last completed calendar month in the recap period, or 0 before January closes. */
24
+ completedMonths?: number;
25
+ isVideo?: boolean;
26
+ slideDurations?: Record<string, number>;
27
+
28
+ // Shared 2026 story fields (omit when the slide is not in that category)
29
+ streak?: number;
30
+ firstTimeBuyers?: number;
31
+ repeatBuyers?: number;
32
+ busiestMonth?: string;
33
+ biggestDay?: RecapBiggestDay;
34
+ growthMultiplier?: number;
35
+ /** Comparable completed months in this recap year, e.g. Jan and Dec. */
36
+ growthComparison?: { baselineMonth: string; comparisonMonth: string };
37
+ bestWeekday?: RecapBestWeekday;
38
+ milestone?: RecapMilestone;
39
+ personality?: RecapPersonality;
40
+
41
+ // Steady
42
+ activeMonths?: number;
43
+ /** Selling months from the completed part of the recap period, numbered 1 to 12. */
44
+ sellingMonths?: number[];
45
+ orderMilestone?: RecapOrderMilestone;
46
+ orderPaceMultiplier?: number;
47
+
48
+ // Sales Moments and the Top Flight busiest-month highlight
49
+ totalCustomers?: number;
50
+ busiestMonthOrders?: number;
51
+
52
+ // Low data
53
+ storeOpenedOn?: string;
54
+ firstOrderOn?: string;
29
55
  websiteVisits?: number;
56
+ storefrontOrders?: number;
57
+ daysOnHuxxle?: number;
58
+
59
+ // Zero order
60
+ /** Verified Huxxle account creation date as a WAT calendar date. */
61
+ accountJoinedOn?: string;
62
+ hasBusinessProfile?: boolean;
63
+ manualVideoPlayback?: boolean;
64
+ catalogueProducts?: number;
65
+ /** Only true when the storefront is independently verified as ready to share. */
66
+ storefrontReady?: boolean;
67
+
68
+ // Legacy 2025 fields (old `src/slides` registry); not used by Recap 2026
69
+ days?: number;
70
+ revenue?: number;
71
+ topCustomerName?: string;
72
+ downloadUrl?: string;
73
+ introHeadline?: string;
74
+ introSubtitle?: string;
75
+ productImages?: string[];
76
+ websiteLink?: string;
30
77
  mostViewedProduct?: string;
31
78
  mostViewedProductCount?: number;
32
79
  }
33
80
 
81
+ export interface RecapOrderMilestone {
82
+ orders: number;
83
+ reachedOn: string;
84
+ }
85
+
86
+ export interface RecapBiggestDay {
87
+ date: string;
88
+ orders: number;
89
+ /** Value of the selected orders in major currency units, when supported. */
90
+ revenue?: number;
91
+ }
92
+
93
+ export interface RecapBestWeekday {
94
+ day: string;
95
+ salesShare: number;
96
+ orders: number;
97
+ }
98
+
99
+ export interface RecapMilestone {
100
+ amount: number;
101
+ reachedOn: string;
102
+ }
103
+
104
+ export interface RecapPersonality {
105
+ title: string;
106
+ description: string;
107
+ }
108
+
34
109
  export interface ProductSummary {
35
110
  name: string;
36
111
  units: number;
@@ -43,6 +118,7 @@ export const AUTH_STEPS = {
43
118
  RECAP: 'recap' as AuthStep
44
119
  };
45
120
 
121
+ /** @deprecated Prefer 2026 keys (`top_10`, `fluctuating`, `low_data`). Kept for legacy API values. */
46
122
  export const BUSINESS_CATEGORIES = {
47
123
  THRIVING: 'thriving' as BusinessCategory,
48
124
  NOT_THRIVING: 'not_thriving' as BusinessCategory,
@@ -0,0 +1,25 @@
1
+ import { jwtDecode } from "jwt-decode";
2
+
3
+ interface MyToken {
4
+ name: string;
5
+ exp: number;
6
+ }
7
+
8
+ /**
9
+ * Validate if the token is valid or has expired
10
+ * @param token the jwt token
11
+ * @returns boolean
12
+ */
13
+ export const isTokenValid = (token: string) => {
14
+ try {
15
+ if (!token) return false;
16
+ const decoded = jwtDecode<MyToken>(token);
17
+ if (Date.now() >= decoded.exp * 1000) {
18
+ return false;
19
+ }
20
+ return true;
21
+ } catch (error) {
22
+ console.error("Token decoding failed:", error);
23
+ return false;
24
+ }
25
+ };
@@ -0,0 +1,39 @@
1
+ /// <reference types="vite/client" />
2
+
3
+ import axios from "axios";
4
+ import { isTokenValid } from "./Helpers";
5
+ import { useAuthStore } from "../store/auth";
6
+
7
+ const RecapApi = () => {
8
+ let headers = {};
9
+ const token =
10
+ useAuthStore.getState().token ||
11
+ (() => {
12
+ const userAuthStore = localStorage.getItem("auth-storage");
13
+ if (userAuthStore) {
14
+ const parsedAuthStore = JSON.parse(userAuthStore);
15
+ return parsedAuthStore.token;
16
+ }
17
+ return null; // Return null if token is not found in either store or localStorage
18
+ })();
19
+ if (token) {
20
+ if (!isTokenValid(token)) {
21
+ sessionStorage.removeItem("auth-storage");
22
+ localStorage.removeItem("auth-storage"); // Also clear from local storage
23
+ window.location.href = "/";
24
+ }
25
+ headers = {
26
+ Authorization: `Bearer ${token}`,
27
+ };
28
+ }
29
+
30
+ const baseURL = import.meta.env.VITE_REACT_APP_KATAJERE_BASE_URL || "";
31
+ const axiosInstance = axios.create({
32
+ baseURL,
33
+ timeout: 60000, // Default timeout (will be overridden by interceptor)
34
+ headers,
35
+ withCredentials: true, // Enable cross-origin cookie handling for SSO
36
+ });
37
+ return axiosInstance;
38
+ };
39
+ export default RecapApi;
@@ -0,0 +1,18 @@
1
+ import RecapApi from "../RecapApi";
2
+ import { MockAuthService, USE_MOCK_API } from "./mockApi";
3
+
4
+ const LiveAuthService = {
5
+ login: async (payload: { email: string }) => {
6
+ return await RecapApi().post("/auth/login", payload);
7
+ },
8
+ verifyOtp: async (payload: { email: string; otp: string }) => {
9
+ return await RecapApi().post("/auth/verify-otp", payload);
10
+ },
11
+ recapData: async () => {
12
+ const params = import.meta.env.VITE_RECAP_YEAR === "2026" ? { year: "2026" } : undefined;
13
+ const data = await RecapApi().get("/recap", { params });
14
+ return data.data;
15
+ },
16
+ };
17
+
18
+ export const AuthService = USE_MOCK_API ? MockAuthService : LiveAuthService;
@@ -0,0 +1,77 @@
1
+ /// <reference types="vite/client" />
2
+
3
+ import {
4
+ mockFluctuatingRecapData,
5
+ mockLowDataRecapData,
6
+ mockRecapData,
7
+ mockSteadyRecapData,
8
+ mockZeroOrderRecapData,
9
+ } from "../../data/mock";
10
+ import type { RecapData } from "../../types";
11
+
12
+ /**
13
+ * Mock API mode: on in local dev unless VITE_USE_MOCK_API=false,
14
+ * off in production builds unless VITE_USE_MOCK_API=true.
15
+ */
16
+ export const USE_MOCK_API = import.meta.env.VITE_USE_MOCK_API
17
+ ? import.meta.env.VITE_USE_MOCK_API === "true"
18
+ : import.meta.env.DEV;
19
+
20
+ const MOCK_DATA_BY_CATEGORY: Record<string, RecapData> = {
21
+ top_10: mockRecapData,
22
+ steady: mockSteadyRecapData,
23
+ fluctuating: mockFluctuatingRecapData,
24
+ low_data: mockLowDataRecapData,
25
+ zero_order: mockZeroOrderRecapData,
26
+ };
27
+
28
+ /** Which category's recap the mock API returns: VITE_MOCK_CATEGORY=top_10 | steady | fluctuating | low_data | zero_order (default fluctuating). */
29
+ export const MOCK_CATEGORY = import.meta.env.VITE_MOCK_CATEGORY ?? "fluctuating";
30
+ const mockData = MOCK_DATA_BY_CATEGORY[MOCK_CATEGORY] ?? mockRecapData;
31
+
32
+ const delay = (ms: number) => new Promise((resolve) => setTimeout(resolve, ms));
33
+
34
+ const base64Url = (value: object) =>
35
+ btoa(JSON.stringify(value)).replace(/=+$/, "").replace(/\+/g, "-").replace(/\//g, "_");
36
+
37
+ // Unsigned JWT with a far-future expiry, so the app's token checks treat the mock session as valid
38
+ const MOCK_TOKEN = [
39
+ base64Url({ alg: "none", typ: "JWT" }),
40
+ base64Url({ name: "Mock Vendor", exp: 4102444800 }),
41
+ "mock",
42
+ ].join(".");
43
+
44
+ const MOCK_BUSINESS = {
45
+ business_name: mockData.businessName,
46
+ business_image: "",
47
+ business_type: "",
48
+ business_phone: "",
49
+ business_website: mockData.websiteLink ?? "",
50
+ business_address: "",
51
+ business_city: "",
52
+ business_state: "",
53
+ business_zip_code: "",
54
+ subdomain: "",
55
+ website_status: "",
56
+ website_status_by_admin: "",
57
+ social_facebook: "",
58
+ social_instagram: "",
59
+ social_twitter: "",
60
+ social_tiktok: "",
61
+ };
62
+
63
+ /** Same response shapes as the live endpoints; any email/phone and any 6-digit OTP are accepted. */
64
+ export const MockAuthService = {
65
+ login: async (_payload: { email: string }) => {
66
+ await delay(600);
67
+ return { data: { message: "OTP sent (mock)" } };
68
+ },
69
+ verifyOtp: async (_payload: { email: string; otp: string }) => {
70
+ await delay(600);
71
+ return { data: { message: "Verified (mock)", token: MOCK_TOKEN, business: MOCK_BUSINESS } };
72
+ },
73
+ recapData: async () => {
74
+ await delay(1500);
75
+ return { recapData: mockData };
76
+ },
77
+ };