@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,36 @@
1
+ import { useEffect } from 'react';
2
+ import { animate, useMotionValue, useTransform, type MotionValue } from 'framer-motion';
3
+
4
+ interface CountUpOptions {
5
+ /** Seconds. */
6
+ duration?: number;
7
+ /** Seconds. */
8
+ delay?: number;
9
+ format?: (value: number) => string;
10
+ }
11
+
12
+ /** Animated 0→target counter for stat cards; render the returned value inside a motion element. */
13
+ export function useCountUp(
14
+ target: number,
15
+ options: CountUpOptions & { format: (value: number) => string }
16
+ ): MotionValue<string>;
17
+ export function useCountUp(target: number, options?: Omit<CountUpOptions, 'format'>): MotionValue<number>;
18
+ export function useCountUp(
19
+ target: number,
20
+ { duration = 2, delay = 0, format }: CountUpOptions = {}
21
+ ): MotionValue<number> | MotionValue<string> {
22
+ const count = useMotionValue(0);
23
+ const display = useTransform(count, (latest): number | string => {
24
+ const rounded = Math.round(latest);
25
+ return format ? format(rounded) : rounded;
26
+ });
27
+
28
+ useEffect(() => {
29
+ const controls = animate(count, target, { duration, delay, ease: 'easeOut' });
30
+ return () => controls.stop();
31
+ }, [count, target, duration, delay]);
32
+
33
+ return display as MotionValue<number> | MotionValue<string>;
34
+ }
35
+
36
+ export const withThousandsSeparators = (value: number) => value.toLocaleString();
@@ -0,0 +1,19 @@
1
+ import { useMemo } from 'react';
2
+ import type { CSSProperties } from 'react';
3
+
4
+ /** Picks `count` random images from the pool for decorative frames (stable per pool). */
5
+ export function useRandomFrameImages(pool: string[] | undefined, count: number): string[] {
6
+ return useMemo(() => {
7
+ if (!pool || pool.length === 0) return [];
8
+ return Array.from({ length: count }, () => pool[Math.floor(Math.random() * pool.length)]);
9
+ }, [pool, count]);
10
+ }
11
+
12
+ export function frameImageStyle(image?: string): CSSProperties | undefined {
13
+ if (!image) return undefined;
14
+ return {
15
+ backgroundImage: `url('${image}')`,
16
+ backgroundSize: 'cover',
17
+ backgroundPosition: 'center',
18
+ };
19
+ }
@@ -0,0 +1,115 @@
1
+ import { useEffect, useState, useCallback } from 'react';
2
+ import { useAuthStore } from '../store/auth';
3
+ import { isTokenValid } from '../utils/Helpers';
4
+ import { USE_MOCK_API } from '../utils/Services/mockApi';
5
+
6
+ const API_BASE_URL = import.meta.env.VITE_REACT_APP_KATAJERE_BASE_URL || '';
7
+
8
+ interface SessionValidationResult {
9
+ isValidating: boolean;
10
+ isAuthenticated: boolean;
11
+ error: string | null;
12
+ revalidate: () => Promise<void>;
13
+ }
14
+
15
+ /**
16
+ * Hook to validate and restore session from shared auth cookie.
17
+ * Enables cross-app SSO - if user logged in via Vendor app,
18
+ * they'll be automatically logged in here too.
19
+ */
20
+ export function useSessionValidator(): SessionValidationResult {
21
+ const [isValidating, setIsValidating] = useState(true);
22
+ const [isAuthenticated, setIsAuthenticated] = useState(false);
23
+ const [error, setError] = useState<string | null>(null);
24
+
25
+ const token = useAuthStore((state) => state.token);
26
+ const updateToken = useAuthStore((state) => state.updateToken);
27
+ const updateBusiness = useAuthStore((state) => state.updateBusiness);
28
+
29
+ const checkSession = useCallback(async () => {
30
+ setIsValidating(true);
31
+ setError(null);
32
+
33
+ // If we already have a valid token in store, skip validation
34
+ if (token && isTokenValid(token)) {
35
+ setIsAuthenticated(true);
36
+ setIsValidating(false);
37
+ return;
38
+ }
39
+
40
+ if (USE_MOCK_API) {
41
+ setIsAuthenticated(false);
42
+ setIsValidating(false);
43
+ return;
44
+ }
45
+
46
+ // Check for shared cookie session via backend
47
+ try {
48
+ const apiUrl = `${API_BASE_URL}/auth/validate-session`;
49
+
50
+ const response = await fetch(apiUrl, {
51
+ method: 'GET',
52
+ credentials: 'include', // Important: sends cookies cross-origin
53
+ headers: {
54
+ 'Content-Type': 'application/json',
55
+ },
56
+ });
57
+
58
+ if (response.ok) {
59
+ const data = await response.json();
60
+
61
+ if (data.authenticated && data.token) {
62
+ // Hydrate local store from shared session
63
+ updateToken(data.token);
64
+
65
+ if (data.business) {
66
+ updateBusiness({
67
+ business_name: data.business.business_name || '',
68
+ business_image: data.business.business_image || '',
69
+ business_type: data.business.business_type || '',
70
+ business_phone: data.business.business_phone || '',
71
+ business_website: data.business.business_website || '',
72
+ business_address: data.business.business_address || '',
73
+ business_city: data.business.business_city || '',
74
+ business_state: data.business.business_state || '',
75
+ business_zip_code: data.business.business_zip_code || '',
76
+ subdomain: data.business.subdomain || '',
77
+ website_status: data.business.website_status || '',
78
+ website_status_by_admin: data.business.website_status_by_admin || '',
79
+ social_facebook: data.business.social_facebook || '',
80
+ social_instagram: data.business.social_instagram || '',
81
+ social_twitter: data.business.social_twitter || '',
82
+ social_tiktok: data.business.social_tiktok || '',
83
+ });
84
+ }
85
+
86
+ setIsAuthenticated(true);
87
+ } else {
88
+ setIsAuthenticated(false);
89
+ }
90
+ } else {
91
+ // No valid session cookie
92
+ setIsAuthenticated(false);
93
+ }
94
+ } catch (err) {
95
+ console.error('[SSO] Session validation failed:', err);
96
+ setError(err instanceof Error ? err.message : 'Session validation failed');
97
+ setIsAuthenticated(false);
98
+ } finally {
99
+ setIsValidating(false);
100
+ }
101
+ }, [token, updateToken, updateBusiness]);
102
+
103
+ useEffect(() => {
104
+ checkSession();
105
+ }, []); // Only run on mount
106
+
107
+ return {
108
+ isValidating,
109
+ isAuthenticated,
110
+ error,
111
+ revalidate: checkSession
112
+ };
113
+ }
114
+
115
+ export default useSessionValidator;
@@ -0,0 +1,50 @@
1
+ import { useEffect, useState } from 'react';
2
+ import type { RefObject } from 'react';
3
+ import { clearScreenshotCache, preCaptureSlide } from '../utils/slideScreenshot';
4
+
5
+ interface UseShareCardPrecaptureOptions {
6
+ enabled: boolean;
7
+ storyId: string;
8
+ businessName: string;
9
+ year: number;
10
+ /** Wait for the card's entrance animations to settle before capturing. */
11
+ delayMs?: number;
12
+ }
13
+
14
+ /**
15
+ * Renders the active card's share image in the background so the Share button can call
16
+ * `navigator.share` synchronously (mobile browsers drop the user gesture across awaits).
17
+ * Returns whether the Share button should be shown.
18
+ */
19
+ export function useShareCardPrecapture(
20
+ containerRef: RefObject<HTMLElement | null>,
21
+ { enabled, storyId, businessName, year, delayMs = 2500 }: UseShareCardPrecaptureOptions
22
+ ): boolean {
23
+ const [isReady, setIsReady] = useState(false);
24
+
25
+ useEffect(() => clearScreenshotCache, []);
26
+
27
+ useEffect(() => {
28
+ setIsReady(false);
29
+ if (!enabled) return;
30
+
31
+ let isActive = true;
32
+ const timer = setTimeout(async () => {
33
+ if (!isActive || !containerRef.current) return;
34
+ try {
35
+ await preCaptureSlide(containerRef.current, { slideId: storyId, businessName, year });
36
+ } catch (error) {
37
+ // Sharing falls back to a fresh capture + download.
38
+ console.error('[RecapStory] Pre-capture failed:', error);
39
+ }
40
+ if (isActive) setIsReady(true);
41
+ }, delayMs);
42
+
43
+ return () => {
44
+ isActive = false;
45
+ clearTimeout(timer);
46
+ };
47
+ }, [enabled, storyId, businessName, year, delayMs, containerRef]);
48
+
49
+ return isReady;
50
+ }
@@ -0,0 +1,36 @@
1
+ import { useEffect } from 'react';
2
+
3
+ /**
4
+ * Tints the phone's status bar: `theme-color` drives Android Chrome and older iOS Safari,
5
+ * while newer Safari samples the page background. Both are restored on unmount.
6
+ */
7
+ export function useStatusBarColor(color: string) {
8
+ useEffect(() => {
9
+ if (typeof document === 'undefined') return;
10
+
11
+ let meta = document.querySelector<HTMLMetaElement>('meta[name="theme-color"]');
12
+ const createdMeta = !meta;
13
+ if (!meta) {
14
+ meta = document.createElement('meta');
15
+ meta.name = 'theme-color';
16
+ document.head.appendChild(meta);
17
+ }
18
+
19
+ const previous = {
20
+ meta: meta.content,
21
+ html: document.documentElement.style.backgroundColor,
22
+ body: document.body.style.backgroundColor,
23
+ };
24
+
25
+ meta.content = color;
26
+ document.documentElement.style.backgroundColor = color;
27
+ document.body.style.backgroundColor = color;
28
+
29
+ return () => {
30
+ if (createdMeta) meta?.remove();
31
+ else if (meta) meta.content = previous.meta;
32
+ document.documentElement.style.backgroundColor = previous.html;
33
+ document.body.style.backgroundColor = previous.body;
34
+ };
35
+ }, [color]);
36
+ }
package/src/index.css CHANGED
@@ -1,6 +1,6 @@
1
1
  /* Google Fonts import for Lora - must be first for priority loading */
2
2
  @import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600;1,700&display=swap');
3
-
3
+ @import 'tailwindcss';
4
4
  body {
5
5
  margin: 0;
6
6
  /* Lora as primary, with emoji font fallbacks for cross-platform emoji support */
package/src/index.ts CHANGED
@@ -31,6 +31,30 @@ export { default as Slide7Products } from './slides/Slide7Products';
31
31
  export { default as Slide8Months } from './slides/Slide8Months';
32
32
  export { default as Slide9Year } from './slides/Slide9Year';
33
33
  export { default as Slide10Final } from './slides/Slide10Final';
34
+ export { recapStories, buildRecapStories } from './slides/registry';
35
+
36
+ // ============================================================================
37
+ // STORY ENGINE - Playback state machine, timer, gestures, preloading
38
+ // ============================================================================
39
+
40
+ export {
41
+ useStoryPlayer,
42
+ useStoryTimer,
43
+ useStoryGestures,
44
+ useStoryKeyboard,
45
+ usePreloadAssets,
46
+ resolveStories,
47
+ StoryProgressBars,
48
+ } from './story';
49
+
50
+ export type {
51
+ StoryDefinition,
52
+ ResolvedStory,
53
+ StoryControls,
54
+ StoryEvent,
55
+ PauseReason,
56
+ StoryPlayer,
57
+ } from './story';
34
58
 
35
59
  // ============================================================================
36
60
  // TYPES - TypeScript support for consumers
@@ -0,0 +1,34 @@
1
+ import { QueryClient } from '@tanstack/react-query';
2
+ import { createSyncStoragePersister } from '@tanstack/query-sync-storage-persister';
3
+ import type { PersistQueryClientProviderProps } from '@tanstack/react-query-persist-client';
4
+ import { RECAP_QUERY_ROOT } from '../queries/recap';
5
+ import { USE_MOCK_API } from '../utils/Services/mockApi';
6
+
7
+ const ONE_DAY_MS = 1000 * 60 * 60 * 24;
8
+
9
+ export const queryClient = new QueryClient({
10
+ defaultOptions: {
11
+ queries: {
12
+ refetchOnWindowFocus: false,
13
+ refetchOnReconnect: true,
14
+ staleTime: ONE_DAY_MS,
15
+ // Must be at least the persister's maxAge, or persisted entries are dropped on restore
16
+ gcTime: ONE_DAY_MS,
17
+ retry: 3,
18
+ },
19
+ },
20
+ });
21
+
22
+ export const persistOptions: PersistQueryClientProviderProps['persistOptions'] = {
23
+ persister: createSyncStoragePersister({
24
+ storage: typeof window !== 'undefined' ? window.localStorage : undefined,
25
+ key: 'recap-query-cache',
26
+ }),
27
+ maxAge: ONE_DAY_MS,
28
+ // Mock recaps aren't cached, so edits to the mock data or VITE_MOCK_CATEGORY show on reload
29
+ buster: USE_MOCK_API ? 'mock' : '',
30
+ dehydrateOptions: {
31
+ shouldDehydrateQuery: (query) =>
32
+ !USE_MOCK_API && query.state.status === 'success' && query.queryKey[0] === RECAP_QUERY_ROOT,
33
+ },
34
+ };
package/src/main.tsx ADDED
@@ -0,0 +1,44 @@
1
+ import React from 'react';
2
+ import ReactDOM from 'react-dom/client';
3
+ import { PersistQueryClientProvider } from '@tanstack/react-query-persist-client';
4
+ import { Toaster } from 'react-hot-toast';
5
+ import '@fontsource/aileron/600.css';
6
+ import '@fontsource/aileron/700.css';
7
+ import './index.css';
8
+ import App from './App';
9
+ import { persistOptions, queryClient } from './lib/queryClient';
10
+
11
+ // Recap data used to be cached by a zustand store under this key; it now lives in the query cache.
12
+ localStorage.removeItem('recap-data-storage');
13
+
14
+ ReactDOM.createRoot(document.getElementById('root')!).render(
15
+ <React.StrictMode>
16
+ <PersistQueryClientProvider client={queryClient} persistOptions={persistOptions}>
17
+ <App />
18
+ <Toaster
19
+ position="top-right"
20
+ toastOptions={{
21
+ duration: 4000,
22
+ style: {
23
+ background: "#363636",
24
+ color: "#fff",
25
+ },
26
+ success: {
27
+ duration: 3000,
28
+ iconTheme: {
29
+ primary: "#10B981",
30
+ secondary: "#fff",
31
+ },
32
+ },
33
+ error: {
34
+ duration: 4000,
35
+ iconTheme: {
36
+ primary: "#EF4444",
37
+ secondary: "#fff",
38
+ },
39
+ },
40
+ }}
41
+ />
42
+ </PersistQueryClientProvider>
43
+ </React.StrictMode>
44
+ );
@@ -0,0 +1,15 @@
1
+ import { queryOptions } from '@tanstack/react-query';
2
+ import { AuthService } from '../utils/Services/AuthServices';
3
+ import type { RecapData } from '../types';
4
+
5
+ export const RECAP_QUERY_ROOT = 'recap';
6
+
7
+ /** Recap data for the signed-in business. Keyed by token so a different login never sees a cached recap. */
8
+ export const recapQueryOptions = (token: string) =>
9
+ queryOptions({
10
+ queryKey: [RECAP_QUERY_ROOT, token] as const,
11
+ queryFn: async (): Promise<RecapData | null> => {
12
+ const body = await AuthService.recapData();
13
+ return body?.recapData ?? null;
14
+ },
15
+ });
@@ -1,4 +1,5 @@
1
1
  import React from 'react';
2
+ import { shareRecapVideo } from '../utils/shareRecapVideo';
2
3
  import './Slide10Final.css';
3
4
 
4
5
  interface Slide10FinalProps {
@@ -11,62 +12,7 @@ interface Slide10FinalProps {
11
12
  function Slide10Final({ videoUrl, downloadUrl, onReplay, year }: Slide10FinalProps) {
12
13
  const displayYear = year ?? 2025;
13
14
 
14
- const handleShare = async () => {
15
- try {
16
- // Fetch the media as a blob
17
- const response = await fetch(videoUrl);
18
- const blob = await response.blob();
19
-
20
- // Determine the file type (video/image)
21
- const fileExtension = videoUrl.split('.').pop()?.toLowerCase() || 'mp4';
22
- const mimeType = fileExtension === 'mp4' ? 'video/mp4' : 'image/jpeg';
23
- const fileName = `huxxle-wrapped-${displayYear}.${fileExtension}`;
24
-
25
- // Create a File object (required for WhatsApp Status)
26
- const file = new File([blob], fileName, {
27
- type: mimeType
28
- });
29
-
30
- // Validate file size (WhatsApp limits: 5MB for images, 16MB for videos)
31
- const maxSize = mimeType.startsWith('video') ? 16 * 1024 * 1024 : 5 * 1024 * 1024;
32
- if (file.size > maxSize) {
33
- alert(`File is too large. Maximum size is ${mimeType.startsWith('video') ? '16MB' : '5MB'}`);
34
- return;
35
- }
36
-
37
- // Check if sharing files is supported
38
- if (typeof navigator !== 'undefined' && navigator.canShare && navigator.canShare({ files: [file] })) {
39
- await navigator.share({
40
- files: [file],
41
- title: 'My Huxxle Recap',
42
- text: `Check out my Wrapped ${displayYear} highlights! 🎉`
43
- });
44
- return;
45
- }
46
-
47
- // Fallback to sharing URL if file sharing not supported
48
- if (typeof navigator !== 'undefined' && navigator.share) {
49
- await navigator.share({
50
- title: 'My Huxxle Recap',
51
- text: `Check out my Wrapped ${displayYear} highlights! 🎉`,
52
- url: videoUrl
53
- });
54
- return;
55
- }
56
-
57
- // Final fallback: open in new tab
58
- if (typeof window !== 'undefined') {
59
- window.open(videoUrl, '_blank', 'noopener');
60
- }
61
- } catch (error) {
62
- console.error('Share canceled or failed', error);
63
-
64
- // Fallback on error: open in new tab
65
- if (typeof window !== 'undefined') {
66
- window.open(videoUrl, '_blank', 'noopener');
67
- }
68
- }
69
- };
15
+ const handleShare = () => shareRecapVideo(videoUrl, displayYear);
70
16
 
71
17
  const handleDownload = () => {
72
18
  const anchor = document.createElement('a');
@@ -136,10 +136,9 @@
136
136
  width: 100%;
137
137
  max-width: 320px;
138
138
  margin-top: 16px;
139
- margin-left: auto;
140
- margin-right: auto;
141
139
  padding: 14px 20px;
142
140
  text-align: center;
141
+ align-self: center;
143
142
  background: linear-gradient(90deg, #4F4CD8 0%, #3F3DAD 100%);
144
143
  border: none;
145
144
  font-family: 'Lora', serif;
@@ -3,6 +3,8 @@ import { motion } from 'framer-motion';
3
3
  import { delayedFadeIn } from '../utils';
4
4
  import { BUSINESS_CATEGORIES, BusinessCategory } from '../types';
5
5
  import { recapCopy } from '../data/recapCopy';
6
+ import { useAuthStore } from '../store/auth';
7
+ import { frameImageStyle, useRandomFrameImages } from '../hooks/useFrameImages';
6
8
  import './Slide1Intro.css';
7
9
 
8
10
  interface Slide1IntroProps {
@@ -18,6 +20,9 @@ interface Slide1IntroProps {
18
20
  * Slide1Intro - Identity slide with business name and category-based messaging
19
21
  */
20
22
  function Slide1Intro({ businessName, businessCategory, introHeadline, introSubtitle, onDurationCalculated, frameImages }: Slide1IntroProps) {
23
+ // Get token from auth store for SSO handoff
24
+ const token = useAuthStore((state) => state.token);
25
+
21
26
  // Dynamic messaging: use props if provided, otherwise fall back to recapCopy
22
27
  const copy = recapCopy[businessCategory] ?? recapCopy[BUSINESS_CATEGORIES.THRIVING];
23
28
  const headline = introHeadline ?? copy.introHeadline;
@@ -36,40 +41,25 @@ function Slide1Intro({ businessName, businessCategory, introHeadline, introSubti
36
41
 
37
42
  const handleContinue = () => {
38
43
  if (typeof window !== 'undefined') {
39
- window.location.href = 'https://vendor.huxxle.com';
44
+ // Use environment-aware URL for vendor app
45
+ const isLocalhost = window.location.hostname === 'localhost' || window.location.hostname === '127.0.0.1';
46
+ const vendorBaseUrl = isLocalhost
47
+ ? 'http://localhost:3001'
48
+ : 'https://vendor.huxxle.com';
49
+
50
+ // For localhost: pass token via URL for SSO (cookies don't work cross-port)
51
+ // For production: cookies handle SSO automatically via .huxxle.com domain
52
+ if (isLocalhost && token) {
53
+ // Encode token for URL safety and pass via sso-handoff route
54
+ const encodedToken = encodeURIComponent(token);
55
+ window.location.href = `${vendorBaseUrl}/sso-handoff?token=${encodedToken}`;
56
+ } else {
57
+ window.location.href = vendorBaseUrl;
58
+ }
40
59
  }
41
60
  };
42
61
 
43
- const frameImagePool = React.useMemo(() => {
44
- return frameImages && frameImages.length > 0 ? frameImages : [];
45
- }, [frameImages]);
46
-
47
- const frameSources = React.useMemo(() => {
48
- if (!frameImagePool.length) {
49
- return [];
50
- }
51
-
52
- return Array.from({ length: 3 }, () =>
53
- frameImagePool[Math.floor(Math.random() * frameImagePool.length)]
54
- );
55
- }, [frameImagePool]);
56
-
57
- const getFrameStyle = (index: number) => {
58
- if (!frameSources.length) {
59
- return undefined;
60
- }
61
-
62
- const image = frameSources[index % frameSources.length];
63
- if (!image) {
64
- return undefined;
65
- }
66
-
67
- return {
68
- backgroundImage: `url('${image}')`,
69
- backgroundSize: 'cover',
70
- backgroundPosition: 'center',
71
- };
72
- };
62
+ const frameSources = useRandomFrameImages(frameImages, 3);
73
63
 
74
64
  return (
75
65
  <div className={slideClass}>
@@ -133,7 +123,7 @@ function Slide1Intro({ businessName, businessCategory, introHeadline, introSubti
133
123
  transition={{ duration: 15, repeat: Infinity, repeatType: 'reverse', ease: 'linear' }}
134
124
  >
135
125
  {Array.from({ length: 3 }).map((_, index) => (
136
- <div key={`frame-rect-${index}`} className="frame-rect" style={getFrameStyle(index)} />
126
+ <div key={`frame-rect-${index}`} className="frame-rect" style={frameImageStyle(frameSources[index])} />
137
127
  ))}
138
128
  </motion.div>
139
129
 
@@ -1,6 +1,7 @@
1
1
  import React from 'react';
2
- import { motion, useMotionValue, useTransform, animate } from 'framer-motion';
3
- import { formatNumber } from '../utils';
2
+ import { motion } from 'framer-motion';
3
+ import { useCountUp } from '../hooks/useCountUp';
4
+ import { frameImageStyle, useRandomFrameImages } from '../hooks/useFrameImages';
4
5
  import './Slide2Days.css';
5
6
 
6
7
  interface Slide2DaysProps {
@@ -9,62 +10,13 @@ interface Slide2DaysProps {
9
10
  frameImages?: string[];
10
11
  }
11
12
 
12
- /**
13
- * Custom hook for number counter animation
14
- */
15
- function useCountAnimation(target: number, duration: number = 2, delay: number = 0) {
16
- const count = useMotionValue(0);
17
- const rounded = useTransform(count, (latest) => Math.round(latest));
18
-
19
- React.useEffect(() => {
20
- const controls = animate(count, target, {
21
- duration,
22
- delay,
23
- ease: 'easeOut',
24
- });
25
-
26
- return controls.stop;
27
- }, [count, target, duration, delay]);
28
-
29
- return rounded;
30
- }
31
-
32
13
  /**
33
14
  * Slide2Days - Days active and streak statistics
34
15
  */
35
16
  function Slide2Days({ days, streak, frameImages }: Slide2DaysProps) {
36
- const daysCount = useCountAnimation(days, 1.6, 0.4); // 1.6s + 0.4s delay = 2s total
37
- const streakCount = useCountAnimation(streak, 1.2, 0.8); // 1.2s + 0.8s delay = 2s total
38
- const frameImagePool = React.useMemo(() => {
39
- return frameImages && frameImages.length > 0 ? frameImages : [];
40
- }, [frameImages]);
41
-
42
- const frameSources = React.useMemo(() => {
43
- if (!frameImagePool.length) {
44
- return [];
45
- }
46
-
47
- return Array.from({ length: 3 }, () =>
48
- frameImagePool[Math.floor(Math.random() * frameImagePool.length)]
49
- );
50
- }, [frameImagePool]);
51
-
52
- const getFrameStyle = (index: number) => {
53
- if (!frameSources.length) {
54
- return undefined;
55
- }
56
-
57
- const image = frameSources[index % frameSources.length];
58
- if (!image) {
59
- return undefined;
60
- }
61
-
62
- return {
63
- backgroundImage: `url('${image}')`,
64
- backgroundSize: 'cover',
65
- backgroundPosition: 'center',
66
- };
67
- };
17
+ const daysCount = useCountUp(days, { duration: 1.6, delay: 0.4 }); // 1.6s + 0.4s delay = 2s total
18
+ const streakCount = useCountUp(streak, { duration: 1.2, delay: 0.8 }); // 1.2s + 0.8s delay = 2s total
19
+ const frameSources = useRandomFrameImages(frameImages, 3);
68
20
 
69
21
  return (
70
22
  <div className="slide2-days">
@@ -89,7 +41,7 @@ function Slide2Days({ days, streak, frameImages }: Slide2DaysProps) {
89
41
  <motion.div
90
42
  key={`frame-${index}-${frameSources[index] ?? 'no-image'}`}
91
43
  className="frame-rect"
92
- style={getFrameStyle(index)}
44
+ style={frameImageStyle(frameSources[index])}
93
45
  animate={{ x: [-20, 20] }}
94
46
  transition={{ duration: 4, repeat: Infinity, repeatType: 'reverse', ease: 'linear' }}
95
47
  />