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