@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,49 @@
1
+ export declare const AuthService: {
2
+ login: (_payload: {
3
+ email: string;
4
+ }) => Promise<{
5
+ data: {
6
+ message: string;
7
+ };
8
+ }>;
9
+ verifyOtp: (_payload: {
10
+ email: string;
11
+ otp: string;
12
+ }) => Promise<{
13
+ data: {
14
+ message: string;
15
+ token: string;
16
+ business: {
17
+ business_name: string;
18
+ business_image: string;
19
+ business_type: string;
20
+ business_phone: string;
21
+ business_website: string;
22
+ business_address: string;
23
+ business_city: string;
24
+ business_state: string;
25
+ business_zip_code: string;
26
+ subdomain: string;
27
+ website_status: string;
28
+ website_status_by_admin: string;
29
+ social_facebook: string;
30
+ social_instagram: string;
31
+ social_twitter: string;
32
+ social_tiktok: string;
33
+ };
34
+ };
35
+ }>;
36
+ recapData: () => Promise<{
37
+ recapData: import("../..").RecapData;
38
+ }>;
39
+ } | {
40
+ login: (payload: {
41
+ email: string;
42
+ }) => Promise<import("axios").AxiosResponse<any, any, {}>>;
43
+ verifyOtp: (payload: {
44
+ email: string;
45
+ otp: string;
46
+ }) => Promise<import("axios").AxiosResponse<any, any, {}>>;
47
+ recapData: () => Promise<any>;
48
+ };
49
+ //# sourceMappingURL=AuthServices.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AuthServices.d.ts","sourceRoot":"","sources":["../../../src/utils/Services/AuthServices.tsx"],"names":[],"mappings":"AAiBA,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBAbC;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE;yBAGb;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE;;CAUgB,CAAC"}
@@ -0,0 +1,16 @@
1
+ import RecapApi from "../RecapApi";
2
+ import { MockAuthService, USE_MOCK_API } from "./mockApi";
3
+ const LiveAuthService = {
4
+ login: async (payload) => {
5
+ return await RecapApi().post("/auth/login", payload);
6
+ },
7
+ verifyOtp: async (payload) => {
8
+ return await RecapApi().post("/auth/verify-otp", payload);
9
+ },
10
+ recapData: async () => {
11
+ const params = import.meta.env.VITE_RECAP_YEAR === "2026" ? { year: "2026" } : undefined;
12
+ const data = await RecapApi().get("/recap", { params });
13
+ return data.data;
14
+ },
15
+ };
16
+ export const AuthService = USE_MOCK_API ? MockAuthService : LiveAuthService;
@@ -0,0 +1,49 @@
1
+ import type { RecapData } from "../../types";
2
+ /**
3
+ * Mock API mode: on in local dev unless VITE_USE_MOCK_API=false,
4
+ * off in production builds unless VITE_USE_MOCK_API=true.
5
+ */
6
+ export declare const USE_MOCK_API: boolean;
7
+ /** Which category's recap the mock API returns: VITE_MOCK_CATEGORY=top_10 | steady | fluctuating | low_data | zero_order (default fluctuating). */
8
+ export declare const MOCK_CATEGORY: any;
9
+ /** Same response shapes as the live endpoints; any email/phone and any 6-digit OTP are accepted. */
10
+ export declare const MockAuthService: {
11
+ login: (_payload: {
12
+ email: string;
13
+ }) => Promise<{
14
+ data: {
15
+ message: string;
16
+ };
17
+ }>;
18
+ verifyOtp: (_payload: {
19
+ email: string;
20
+ otp: string;
21
+ }) => Promise<{
22
+ data: {
23
+ message: string;
24
+ token: string;
25
+ business: {
26
+ business_name: string;
27
+ business_image: string;
28
+ business_type: string;
29
+ business_phone: string;
30
+ business_website: string;
31
+ business_address: string;
32
+ business_city: string;
33
+ business_state: string;
34
+ business_zip_code: string;
35
+ subdomain: string;
36
+ website_status: string;
37
+ website_status_by_admin: string;
38
+ social_facebook: string;
39
+ social_instagram: string;
40
+ social_twitter: string;
41
+ social_tiktok: string;
42
+ };
43
+ };
44
+ }>;
45
+ recapData: () => Promise<{
46
+ recapData: RecapData;
47
+ }>;
48
+ };
49
+ //# sourceMappingURL=mockApi.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mockApi.d.ts","sourceRoot":"","sources":["../../../src/utils/Services/mockApi.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C;;;GAGG;AACH,eAAO,MAAM,YAAY,SAEF,CAAC;AAUxB,mJAAmJ;AACnJ,eAAO,MAAM,aAAa,KAAsD,CAAC;AAkCjF,oGAAoG;AACpG,eAAO,MAAM,eAAe;sBACF;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE;;;;;0BAIb;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;CAQ3D,CAAC"}
@@ -0,0 +1,60 @@
1
+ /// <reference types="vite/client" />
2
+ import { mockFluctuatingRecapData, mockLowDataRecapData, mockRecapData, mockSteadyRecapData, mockZeroOrderRecapData, } from "../../data/mock";
3
+ /**
4
+ * Mock API mode: on in local dev unless VITE_USE_MOCK_API=false,
5
+ * off in production builds unless VITE_USE_MOCK_API=true.
6
+ */
7
+ export const USE_MOCK_API = import.meta.env.VITE_USE_MOCK_API
8
+ ? import.meta.env.VITE_USE_MOCK_API === "true"
9
+ : import.meta.env.DEV;
10
+ const MOCK_DATA_BY_CATEGORY = {
11
+ top_10: mockRecapData,
12
+ steady: mockSteadyRecapData,
13
+ fluctuating: mockFluctuatingRecapData,
14
+ low_data: mockLowDataRecapData,
15
+ zero_order: mockZeroOrderRecapData,
16
+ };
17
+ /** Which category's recap the mock API returns: VITE_MOCK_CATEGORY=top_10 | steady | fluctuating | low_data | zero_order (default fluctuating). */
18
+ export const MOCK_CATEGORY = import.meta.env.VITE_MOCK_CATEGORY ?? "fluctuating";
19
+ const mockData = MOCK_DATA_BY_CATEGORY[MOCK_CATEGORY] ?? mockRecapData;
20
+ const delay = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
21
+ const base64Url = (value) => btoa(JSON.stringify(value)).replace(/=+$/, "").replace(/\+/g, "-").replace(/\//g, "_");
22
+ // Unsigned JWT with a far-future expiry, so the app's token checks treat the mock session as valid
23
+ const MOCK_TOKEN = [
24
+ base64Url({ alg: "none", typ: "JWT" }),
25
+ base64Url({ name: "Mock Vendor", exp: 4102444800 }),
26
+ "mock",
27
+ ].join(".");
28
+ const MOCK_BUSINESS = {
29
+ business_name: mockData.businessName,
30
+ business_image: "",
31
+ business_type: "",
32
+ business_phone: "",
33
+ business_website: mockData.websiteLink ?? "",
34
+ business_address: "",
35
+ business_city: "",
36
+ business_state: "",
37
+ business_zip_code: "",
38
+ subdomain: "",
39
+ website_status: "",
40
+ website_status_by_admin: "",
41
+ social_facebook: "",
42
+ social_instagram: "",
43
+ social_twitter: "",
44
+ social_tiktok: "",
45
+ };
46
+ /** Same response shapes as the live endpoints; any email/phone and any 6-digit OTP are accepted. */
47
+ export const MockAuthService = {
48
+ login: async (_payload) => {
49
+ await delay(600);
50
+ return { data: { message: "OTP sent (mock)" } };
51
+ },
52
+ verifyOtp: async (_payload) => {
53
+ await delay(600);
54
+ return { data: { message: "Verified (mock)", token: MOCK_TOKEN, business: MOCK_BUSINESS } };
55
+ },
56
+ recapData: async () => {
57
+ await delay(1500);
58
+ return { recapData: mockData };
59
+ },
60
+ };
@@ -0,0 +1,4 @@
1
+ import type { StoryEvent } from '../story';
2
+ /** Forwards story playback events to the GTM dataLayer initialised in index.html. */
3
+ export declare function pushStoryEventToDataLayer(event: StoryEvent): void;
4
+ //# sourceMappingURL=analytics.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"analytics.d.ts","sourceRoot":"","sources":["../../src/utils/analytics.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAI3C,qFAAqF;AACrF,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI,CASjE"}
@@ -0,0 +1,12 @@
1
+ /** Forwards story playback events to the GTM dataLayer initialised in index.html. */
2
+ export function pushStoryEventToDataLayer(event) {
3
+ if (typeof window === 'undefined')
4
+ return;
5
+ const { dataLayer } = window;
6
+ if (!Array.isArray(dataLayer))
7
+ return;
8
+ dataLayer.push({
9
+ event: `recap_${event.type}`,
10
+ ...('storyId' in event ? { story_id: event.storyId, story_index: event.index } : {}),
11
+ });
12
+ }
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Shares the recap video: as a file where the Web Share API supports files (needed for
3
+ * WhatsApp Status), else as a link, else by opening it in a new tab.
4
+ */
5
+ export declare function shareRecapVideo(videoUrl: string, year: number): Promise<void>;
6
+ //# sourceMappingURL=shareRecapVideo.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shareRecapVideo.d.ts","sourceRoot":"","sources":["../../src/utils/shareRecapVideo.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,wBAAsB,eAAe,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAuCnF"}
@@ -0,0 +1,40 @@
1
+ /**
2
+ * Shares the recap video: as a file where the Web Share API supports files (needed for
3
+ * WhatsApp Status), else as a link, else by opening it in a new tab.
4
+ */
5
+ export async function shareRecapVideo(videoUrl, year) {
6
+ try {
7
+ const response = await fetch(videoUrl);
8
+ const blob = await response.blob();
9
+ const fileExtension = videoUrl.split('.').pop()?.toLowerCase() || 'mp4';
10
+ const mimeType = fileExtension === 'mp4' ? 'video/mp4' : 'image/jpeg';
11
+ const file = new File([blob], `huxxle-wrapped-${year}.${fileExtension}`, { type: mimeType });
12
+ // WhatsApp limits: 5MB for images, 16MB for videos
13
+ const maxSize = mimeType.startsWith('video') ? 16 * 1024 * 1024 : 5 * 1024 * 1024;
14
+ if (file.size > maxSize) {
15
+ alert(`File is too large. Maximum size is ${mimeType.startsWith('video') ? '16MB' : '5MB'}`);
16
+ return;
17
+ }
18
+ if (typeof navigator !== 'undefined' && navigator.canShare && navigator.canShare({ files: [file] })) {
19
+ await navigator.share({
20
+ files: [file],
21
+ title: 'My Huxxle Recap',
22
+ text: `Check out my Wrapped ${year} highlights! 🎉`,
23
+ });
24
+ return;
25
+ }
26
+ if (typeof navigator !== 'undefined' && navigator.share) {
27
+ await navigator.share({
28
+ title: 'My Huxxle Recap',
29
+ text: `Check out my Wrapped ${year} highlights! 🎉`,
30
+ url: videoUrl,
31
+ });
32
+ return;
33
+ }
34
+ window.open(videoUrl, '_blank', 'noopener');
35
+ }
36
+ catch (error) {
37
+ console.error('Share canceled or failed', error);
38
+ window.open(videoUrl, '_blank', 'noopener');
39
+ }
40
+ }
@@ -0,0 +1,2 @@
1
+ export declare function getVendorAppUrl(): string;
2
+ //# sourceMappingURL=vendorApp.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vendorApp.d.ts","sourceRoot":"","sources":["../../src/utils/vendorApp.ts"],"names":[],"mappings":"AAEA,wBAAgB,eAAe,IAAI,MAAM,CAExC"}
@@ -0,0 +1,4 @@
1
+ /// <reference types="vite/client" />
2
+ export function getVendorAppUrl() {
3
+ return import.meta.env.DEV ? "http://localhost:3001" : "https://vendor.huxxle.com";
4
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@katajere/recap",
3
- "version": "2.1.7",
3
+ "version": "2.1.9",
4
4
  "description": "Vendor Year in Review Experience - Recap your business metrics for 2025",
5
5
  "private": false,
6
6
  "publishConfig": {
@@ -13,21 +13,23 @@
13
13
  "src/**/*.tsx",
14
14
  "src/**/*.ts",
15
15
  "src/**/*.css",
16
+ "!src/**/*.test.ts",
17
+ "!src/**/*.test.tsx",
16
18
  "public/assets"
17
19
  ],
18
20
  "exports": {
19
21
  ".": {
22
+ "types": "./dist/index.d.ts",
20
23
  "import": "./dist/index.js",
21
- "require": "./dist/index.js",
22
- "types": "./dist/index.d.ts"
24
+ "require": "./dist/index.js"
23
25
  },
24
26
  "./RecapStory": {
25
- "import": "./src/RecapStory.tsx",
26
- "types": "./src/RecapStory.tsx"
27
+ "types": "./src/RecapStory.tsx",
28
+ "import": "./src/RecapStory.tsx"
27
29
  },
28
30
  "./types": {
29
- "import": "./src/types.ts",
30
- "types": "./src/types.ts"
31
+ "types": "./src/types.ts",
32
+ "import": "./src/types.ts"
31
33
  },
32
34
  "./styles": "./src/RecapStory.css"
33
35
  },
@@ -51,19 +53,31 @@
51
53
  "react-dom": "^18.0.0 || ^19.0.0"
52
54
  },
53
55
  "dependencies": {
56
+ "@fontsource/aileron": "^5.3.0",
57
+ "@tailwindcss/vite": "^4.1.18",
58
+ "@tanstack/react-query": "^5.90.12",
59
+ "axios": "^1.13.2",
54
60
  "framer-motion": "^12.0.0",
55
61
  "html2canvas": "^1.4.1",
62
+ "jwt-decode": "^4.0.0",
56
63
  "react": "^18.0.0 || ^19.0.0",
57
- "react-dom": "^18.0.0 || ^19.0.0"
64
+ "react-dom": "^18.0.0 || ^19.0.0",
65
+ "react-hook-form": "^7.68.0",
66
+ "react-hot-toast": "^2.6.0",
67
+ "tailwindcss": "^4.1.18",
68
+ "zustand": "^5.0.9"
58
69
  },
59
70
  "devDependencies": {
71
+ "@tanstack/query-sync-storage-persister": "^5.90.12",
72
+ "@tanstack/react-query-persist-client": "^5.90.12",
60
73
  "@types/node": "^24.10.1",
61
74
  "@types/react": "^19.2.7",
62
75
  "@types/react-dom": "^19.2.3",
63
76
  "@vitejs/plugin-react": "^5.1.1",
64
77
  "typescript": "^5.9.3",
65
78
  "vite": "^7.2.6",
66
- "vite-plugin-static-copy": "^3.1.4"
79
+ "vite-plugin-static-copy": "^3.1.4",
80
+ "vitest": "^5.1.0"
67
81
  },
68
82
  "scripts": {
69
83
  "dev": "vite",
@@ -73,7 +87,8 @@
73
87
  "build:standalone": "vite build",
74
88
  "preview": "vite preview",
75
89
  "copy-css": "node scripts/copy-css.js",
76
- "test": "echo 'Tests disabled for library build'",
90
+ "test": "vitest run",
91
+ "typecheck": "tsc --noEmit",
77
92
  "prepublishOnly": "npm run build:lib"
78
93
  },
79
94
  "eslintConfig": {
package/src/App.css CHANGED
@@ -162,6 +162,14 @@ body {
162
162
  }
163
163
 
164
164
  /* Gradient text utility class */
165
+ .app.app--recording {
166
+ padding: 0;
167
+ }
168
+
169
+ .app--recording .app__shell {
170
+ box-shadow: none;
171
+ }
172
+
165
173
  .gradient-text {
166
174
  background: linear-gradient(90deg, #FFFFFF 0%, #FFCC80 100%);
167
175
  -webkit-background-clip: text;
package/src/App.tsx CHANGED
@@ -1,19 +1,58 @@
1
- import React, { useState } from 'react';
2
- import { AnimatePresence } from 'framer-motion';
3
- import LoginScreen from './LoginScreen';
4
- import OtpScreen from './OtpScreen';
5
- import RecapStory from './RecapStory';
6
- import { AUTH_STEPS, AuthStep } from './types';
7
- import { mockRecapData } from './data/mock';
8
- import './App.css';
1
+ import React, { useState, useEffect } from "react";
2
+ import { AnimatePresence } from "framer-motion";
3
+ import { useQuery } from "@tanstack/react-query";
4
+ import toast from "react-hot-toast";
5
+ import LoginScreen from "./LoginScreen";
6
+ import OtpScreen from "./OtpScreen";
7
+ import RecapStory from "./RecapStory";
8
+ import RecapLoadingScreen from "./RecapLoadingScreen";
9
+ import { RECAP_INTRO_LOOP_S } from "./components/RecapIntroLayout";
10
+ import { AUTH_STEPS, AuthStep } from "./types";
11
+ import "./App.css";
12
+ import { useAuthStore } from "./store/auth";
13
+ import { useSessionValidator } from "./hooks/useSessionValidator";
14
+ import { recapQueryOptions } from "./queries/recap";
15
+ import { pushStoryEventToDataLayer } from "./utils/analytics";
16
+ import { getVendorAppUrl } from "./utils/vendorApp";
9
17
 
10
18
  /**
11
19
  * Main App component
12
20
  * Manages auth state machine: login → otp → recap
13
21
  */
14
22
  function App() {
15
- const [authStep, setAuthStep] = useState<AuthStep>(AUTH_STEPS.LOGIN);
16
- const [identifier, setIdentifier] = useState<string>('');
23
+ const token = useAuthStore((state) => state.token);
24
+ const businessName = useAuthStore((state) => state.business.business_name);
25
+ const recapQuery = useQuery({ ...recapQueryOptions(token), enabled: !!token });
26
+ const recapData = recapQuery.data;
27
+
28
+ // Cross-app SSO: Check for shared auth cookie
29
+ const { isAuthenticated: hasSharedSession } = useSessionValidator();
30
+
31
+ useEffect(() => {
32
+ if (!recapQuery.isError || recapData) return;
33
+ const error = recapQuery.error as any;
34
+ toast.error(error?.response ? error?.response?.data?.error : error?.message);
35
+ }, [recapQuery.isError, recapQuery.error, recapData]);
36
+
37
+ const [authStep, setAuthStep] = useState<AuthStep>(
38
+ token ? AUTH_STEPS.RECAP : AUTH_STEPS.LOGIN
39
+ );
40
+ const [identifier, setIdentifier] = useState<string>("");
41
+ // Right after sign-in, the loading screen plays at least one full animation loop
42
+ const [isHoldingIntro, setIsHoldingIntro] = useState(false);
43
+
44
+ useEffect(() => {
45
+ if (!isHoldingIntro) return;
46
+ const timer = setTimeout(() => setIsHoldingIntro(false), RECAP_INTRO_LOOP_S * 1000);
47
+ return () => clearTimeout(timer);
48
+ }, [isHoldingIntro]);
49
+
50
+ // Skip to recap if token becomes available (from local store or shared session)
51
+ useEffect(() => {
52
+ if (token || hasSharedSession) {
53
+ setAuthStep(AUTH_STEPS.RECAP);
54
+ }
55
+ }, [token, hasSharedSession]);
17
56
 
18
57
  // Handle login submission
19
58
  const handleLogin = (value: string) => {
@@ -23,43 +62,57 @@ function App() {
23
62
 
24
63
  // Handle OTP submission
25
64
  const handleOtpSubmit = (otp: string) => {
65
+ setIsHoldingIntro(true);
26
66
  setAuthStep(AUTH_STEPS.RECAP);
27
67
  };
28
68
 
69
+ const showRecapLoading = authStep === AUTH_STEPS.RECAP && (!recapData || isHoldingIntro);
70
+
29
71
  // Handle back from OTP to login
30
72
  const handleBackToLogin = () => {
31
73
  setAuthStep(AUTH_STEPS.LOGIN);
32
- setIdentifier('');
74
+ setIdentifier("");
33
75
  };
34
76
 
35
77
  return (
36
78
  <div className="app">
37
79
  {/* Desktop backdrop blur */}
38
80
  <div className="app__backdrop" />
39
-
81
+
40
82
  {/* Story shell (390x844 phone frame) */}
41
83
  <div className="app__shell">
42
84
  <AnimatePresence mode="wait">
43
85
  {authStep === AUTH_STEPS.LOGIN && (
44
- <LoginScreen
45
- key="login"
46
- onSubmit={handleLogin}
47
- />
86
+ <LoginScreen key="login" onSubmit={handleLogin} />
48
87
  )}
49
-
88
+
50
89
  {authStep === AUTH_STEPS.OTP && (
51
- <OtpScreen
90
+ <OtpScreen
52
91
  key="otp"
53
92
  identifier={identifier}
54
93
  onSubmit={handleOtpSubmit}
55
94
  onBack={handleBackToLogin}
56
95
  />
57
96
  )}
58
-
59
- {authStep === AUTH_STEPS.RECAP && (
60
- <RecapStory
97
+
98
+ {showRecapLoading && (
99
+ <RecapLoadingScreen
100
+ key="loading"
101
+ businessName={businessName}
102
+ onClose={() => {
103
+ window.location.href = getVendorAppUrl();
104
+ }}
105
+ />
106
+ )}
107
+
108
+ {authStep === AUTH_STEPS.RECAP && recapData && !showRecapLoading && (
109
+ <RecapStory
61
110
  key="recap"
62
- recapData={mockRecapData}
111
+ recapData={recapData}
112
+ onStoryEvent={pushStoryEventToDataLayer}
113
+ onClose={() => {
114
+ window.location.href = getVendorAppUrl();
115
+ }}
63
116
  />
64
117
  )}
65
118
  </AnimatePresence>
@@ -1,147 +1,14 @@
1
- /* LoginScreen.css */
2
- .login-screen {
3
- position: relative;
4
- width: 100%;
5
- height: 100%;
6
- background: transparent;
7
- overflow: hidden;
8
- display: flex;
9
- flex-direction: column;
10
- padding: clamp(20px, 3dvh, 32px) clamp(16px, 4.1vw, 20px) calc(clamp(32px, 5dvh, 48px) + env(safe-area-inset-bottom));
11
- box-sizing: border-box;
12
- }
13
-
14
- /* Top logo area - 3% margin from top via padding */
15
- .login-screen__header {
16
- flex: none;
17
- width: 100%;
18
- height: 3.79%;
19
- min-height: 32px;
20
- margin-bottom: 6%;
21
- }
22
-
23
- /* Middle hero section - grows to fill space */
24
- .login-screen__hero {
25
- flex: 1;
26
- display: flex;
27
- flex-direction: column;
28
- align-items: flex-start;
29
- justify-content: center;
30
- gap: 1.9%;
31
- width: 100%;
32
- }
33
-
34
- .login-screen__title {
35
- width: 100%;
36
- font-family: 'Lora', serif;
37
- font-style: normal;
38
- font-weight: 700;
39
- font-size: clamp(48px, 18.46vw, 72px);
40
- line-height: 1.28;
41
- text-transform: capitalize;
42
- color: var(--primary-blue);
43
- margin: 0;
44
- white-space: normal;
45
- word-wrap: break-word;
46
- display: inline;
47
- }
48
-
49
- .login-screen__title::after {
50
- content: " 25'";
51
- color: var(--bg-white);
52
- -webkit-text-stroke: 1.5px var(--primary-blue);
53
- paint-order: stroke fill;
54
- }
55
-
56
- .login-screen__subtitle {
57
- width: 100%;
58
- font-family: 'Lora', serif;
59
- font-style: normal;
60
- font-weight: 400;
61
- font-size: clamp(14px, 4.1vw, 16px);
62
- line-height: 1.5;
63
- color: var(--text-primary);
64
- margin: 0;
65
- }
66
-
67
- /* Bottom form section - 5% margin from bottom via parent padding */
1
+ /* LoginScreen.css - layout and colors come from RecapIntroLayout.css */
68
2
  .login-screen__form {
69
- flex: none;
70
3
  display: flex;
71
4
  flex-direction: column;
72
- align-items: flex-start;
73
5
  gap: 16px;
74
6
  width: 100%;
75
7
  }
76
8
 
77
- .form-group {
78
- display: flex;
79
- flex-direction: column;
80
- align-items: flex-start;
81
- gap: 8px;
82
- width: 100%;
83
- }
84
-
85
- .form-label {
86
- width: 100%;
87
- font-family: 'Lora', serif;
88
- font-style: normal;
89
- font-weight: 400;
90
- font-size: clamp(10px, 3.08vw, 12px);
91
- line-height: 120%;
92
- color: var(--text-secondary);
93
- }
94
-
95
- .form-input {
96
- box-sizing: border-box;
97
- display: flex;
98
- flex-direction: row;
99
- align-items: center;
100
- padding: 12px 16px;
101
- width: 100%;
102
- height: 48px;
103
- min-height: 48px;
104
- background: transparent;
105
- border: 1px solid var(--primary-purple);
106
- font-family: 'Lora', serif;
107
- font-style: normal;
108
- font-weight: 400;
109
- font-size: clamp(14px, 4.1vw, 16px);
110
- line-height: 120%;
111
- color: var(--text-primary);
112
- outline: none;
113
- }
114
-
115
- .form-input::placeholder {
116
- color: var(--text-primary);
117
- opacity: 0.7;
118
- }
119
-
120
- .btn-primary {
121
- display: flex;
122
- flex-direction: row;
123
- justify-content: center;
124
- align-items: center;
125
- padding: 12px 16px;
126
- width: 100%;
127
- height: 48px;
128
- min-height: 48px;
129
- background: var(--bg-gradient);
130
- border: none;
131
- font-family: 'Lora', serif;
132
- font-style: normal;
133
- font-weight: 600;
134
- font-size: clamp(14px, 4.1vw, 16px);
135
- line-height: 120%;
136
- color: var(--text-white);
137
- cursor: pointer;
138
- transition: opacity 0.2s;
139
- }
140
-
141
- .btn-primary:hover {
142
- opacity: 0.9;
143
- }
144
-
145
- .btn-primary:active {
146
- opacity: 0.8;
9
+ .form-error {
10
+ font-family: 'Aileron', sans-serif;
11
+ font-size: 12px;
12
+ line-height: 1.2;
13
+ color: #FFB4A8;
147
14
  }