@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,80 @@
1
+ import type { PauseReason } from './types';
2
+
3
+ export interface StoryPlayerState {
4
+ index: number;
5
+ count: number;
6
+ pauseReasons: PauseReason[];
7
+ /** The last card's timer has run out; playback stays on it until navigation. */
8
+ ended: boolean;
9
+ }
10
+
11
+ export type StoryPlayerAction =
12
+ | { type: 'next' }
13
+ | { type: 'prev' }
14
+ | { type: 'goTo'; index: number }
15
+ | { type: 'timerComplete' }
16
+ | { type: 'restart' }
17
+ | { type: 'pause'; reason: PauseReason }
18
+ | { type: 'resume'; reason: PauseReason }
19
+ | { type: 'setCount'; count: number };
20
+
21
+ /** Pauses that end when the viewer navigates; environmental ones (hidden tab, orchestrator) persist. */
22
+ const INTERACTION_PAUSES: PauseReason[] = ['hold', 'user'];
23
+
24
+ export function createInitialPlayerState(
25
+ count: number,
26
+ initialPauseReasons: PauseReason[] = []
27
+ ): StoryPlayerState {
28
+ return { index: 0, count, pauseReasons: initialPauseReasons, ended: false };
29
+ }
30
+
31
+ function navigate(state: StoryPlayerState, index: number): StoryPlayerState {
32
+ if (index < 0 || index >= state.count || index === state.index) return state;
33
+ return {
34
+ ...state,
35
+ index,
36
+ ended: false,
37
+ pauseReasons: state.pauseReasons.filter((r) => !INTERACTION_PAUSES.includes(r)),
38
+ };
39
+ }
40
+
41
+ export function storyPlayerReducer(
42
+ state: StoryPlayerState,
43
+ action: StoryPlayerAction
44
+ ): StoryPlayerState {
45
+ switch (action.type) {
46
+ case 'next':
47
+ return navigate(state, state.index + 1);
48
+ case 'prev':
49
+ return navigate(state, state.index - 1);
50
+ case 'goTo':
51
+ return navigate(state, action.index);
52
+ case 'timerComplete':
53
+ if (state.index < state.count - 1) return navigate(state, state.index + 1);
54
+ return state.ended ? state : { ...state, ended: true };
55
+ case 'restart':
56
+ return {
57
+ ...state,
58
+ index: 0,
59
+ ended: false,
60
+ pauseReasons: state.pauseReasons.filter((r) => !INTERACTION_PAUSES.includes(r)),
61
+ };
62
+ case 'pause':
63
+ if (state.pauseReasons.includes(action.reason)) return state;
64
+ return { ...state, pauseReasons: [...state.pauseReasons, action.reason] };
65
+ case 'resume':
66
+ if (!state.pauseReasons.includes(action.reason)) return state;
67
+ return { ...state, pauseReasons: state.pauseReasons.filter((r) => r !== action.reason) };
68
+ case 'setCount': {
69
+ if (action.count === state.count) return state;
70
+ const lastIndex = Math.max(action.count - 1, 0);
71
+ return { ...state, count: action.count, index: Math.min(state.index, lastIndex) };
72
+ }
73
+ default:
74
+ return state;
75
+ }
76
+ }
77
+
78
+ export function isPlayerRunning(state: StoryPlayerState): boolean {
79
+ return !state.ended && state.pauseReasons.length === 0;
80
+ }
@@ -0,0 +1,49 @@
1
+ import type { ReactNode } from 'react';
2
+
3
+ /**
4
+ * Why playback is currently halted. Playback only runs when no reasons are active,
5
+ * so independent sources (a held finger, a hidden tab, an external orchestrator)
6
+ * can pause and resume without stepping on each other.
7
+ */
8
+ export type PauseReason = 'hold' | 'hidden' | 'external' | 'user';
9
+
10
+ export interface StoryControls {
11
+ next: () => void;
12
+ prev: () => void;
13
+ goTo: (index: number) => void;
14
+ restart: () => void;
15
+ }
16
+
17
+ /**
18
+ * Declarative description of a single story card.
19
+ * `TContext` is whatever data the cards are rendered from (e.g. RecapData).
20
+ */
21
+ export interface StoryDefinition<TContext> {
22
+ id: string;
23
+ render: (context: TContext, controls: StoryControls) => ReactNode;
24
+ /** Seconds the card stays on screen before auto-advancing. */
25
+ duration?: number;
26
+ /** Omit the card for contexts where it doesn't apply. */
27
+ include?: (context: TContext) => boolean;
28
+ /** Image URLs the card needs; preloaded before the card is reached. */
29
+ assets?: (context: TContext) => string[];
30
+ /** Closing card: no floating controls, no background music, borderless progress. */
31
+ outro?: boolean;
32
+ /** Visual theme key for the card and the chrome drawn over it. */
33
+ theme?: string;
34
+ }
35
+
36
+ export interface ResolvedStory<TContext> {
37
+ id: string;
38
+ duration: number;
39
+ assets: string[];
40
+ outro: boolean;
41
+ theme?: string;
42
+ render: StoryDefinition<TContext>['render'];
43
+ }
44
+
45
+ export type StoryEvent =
46
+ | { type: 'story_view'; storyId: string; index: number }
47
+ | { type: 'story_complete'; storyId: string; index: number }
48
+ | { type: 'share'; storyId: string; index: number }
49
+ | { type: 'replay' };
@@ -0,0 +1,28 @@
1
+ import { useEffect } from 'react';
2
+ import type { ResolvedStory } from './types';
3
+
4
+ const requested = new Set<string>();
5
+
6
+ export function preloadImage(url: string): void {
7
+ if (!url || requested.has(url) || typeof Image === 'undefined') return;
8
+ requested.add(url);
9
+ const image = new Image();
10
+ image.decoding = 'async';
11
+ image.src = url;
12
+ }
13
+
14
+ /**
15
+ * Warms the browser cache for the active story and the next `lookahead` stories,
16
+ * so images are already decoded by the time each card animates in.
17
+ */
18
+ export function usePreloadAssets<TContext>(
19
+ stories: ResolvedStory<TContext>[],
20
+ activeIndex: number,
21
+ lookahead = 1
22
+ ) {
23
+ useEffect(() => {
24
+ stories
25
+ .slice(activeIndex, activeIndex + 1 + lookahead)
26
+ .forEach((story) => story.assets.forEach(preloadImage));
27
+ }, [stories, activeIndex, lookahead]);
28
+ }
@@ -0,0 +1,95 @@
1
+ import { useCallback, useEffect, useRef } from 'react';
2
+ import type { PointerEvent } from 'react';
3
+
4
+ interface UseStoryGesturesOptions {
5
+ onPrev: () => void;
6
+ onNext: () => void;
7
+ onHoldStart: () => void;
8
+ onHoldEnd: () => void;
9
+ /** Milliseconds a press must last before it counts as a hold. */
10
+ holdDelay?: number;
11
+ /** Fraction of the width on each side that acts as a prev/next tap zone. */
12
+ edgeZone?: number;
13
+ }
14
+
15
+ function isInteractiveTarget(target: EventTarget | null): boolean {
16
+ const element = target as HTMLElement | null;
17
+ return !!element && (element.tagName === 'BUTTON' || !!element.closest('button'));
18
+ }
19
+
20
+ /**
21
+ * Story tap/hold handling: tap the left edge for previous, the right edge for next,
22
+ * press and hold anywhere to pause. Presses that start on buttons are ignored.
23
+ */
24
+ export function useStoryGestures({
25
+ onPrev,
26
+ onNext,
27
+ onHoldStart,
28
+ onHoldEnd,
29
+ holdDelay = 150,
30
+ edgeZone = 0.2,
31
+ }: UseStoryGesturesOptions) {
32
+ const holdTimerRef = useRef<ReturnType<typeof setTimeout> | null>(null);
33
+ const isHoldingRef = useRef(false);
34
+
35
+ const clearHoldTimer = () => {
36
+ if (holdTimerRef.current) {
37
+ clearTimeout(holdTimerRef.current);
38
+ holdTimerRef.current = null;
39
+ }
40
+ };
41
+
42
+ useEffect(() => clearHoldTimer, []);
43
+
44
+ const onPointerDown = useCallback(
45
+ (event: PointerEvent<HTMLElement>) => {
46
+ if (isInteractiveTarget(event.target)) return;
47
+
48
+ isHoldingRef.current = false;
49
+ holdTimerRef.current = setTimeout(() => {
50
+ isHoldingRef.current = true;
51
+ onHoldStart();
52
+ }, holdDelay);
53
+ },
54
+ [holdDelay, onHoldStart]
55
+ );
56
+
57
+ const onPointerUp = useCallback(
58
+ (event: PointerEvent<HTMLElement>) => {
59
+ clearHoldTimer();
60
+
61
+ if (isHoldingRef.current) {
62
+ isHoldingRef.current = false;
63
+ onHoldEnd();
64
+ return;
65
+ }
66
+
67
+ if (isInteractiveTarget(event.target)) return;
68
+
69
+ const rect = event.currentTarget.getBoundingClientRect();
70
+ const tapX = event.clientX - rect.left;
71
+
72
+ if (tapX < rect.width * edgeZone) {
73
+ onPrev();
74
+ } else if (tapX > rect.width * (1 - edgeZone)) {
75
+ onNext();
76
+ }
77
+ },
78
+ [edgeZone, onHoldEnd, onNext, onPrev]
79
+ );
80
+
81
+ const onPointerLeave = useCallback(() => {
82
+ clearHoldTimer();
83
+ if (isHoldingRef.current) {
84
+ isHoldingRef.current = false;
85
+ onHoldEnd();
86
+ }
87
+ }, [onHoldEnd]);
88
+
89
+ return {
90
+ onPointerDown,
91
+ onPointerUp,
92
+ onPointerLeave,
93
+ onPointerCancel: onPointerLeave,
94
+ };
95
+ }
@@ -0,0 +1,56 @@
1
+ import { useEffect, useRef } from 'react';
2
+
3
+ interface UseStoryKeyboardOptions {
4
+ enabled?: boolean;
5
+ onPrev: () => void;
6
+ onNext: () => void;
7
+ onTogglePause: () => void;
8
+ }
9
+
10
+ function isEditableTarget(target: EventTarget | null): boolean {
11
+ const element = target as HTMLElement | null;
12
+ if (!element) return false;
13
+ return element.isContentEditable || ['INPUT', 'TEXTAREA', 'SELECT'].includes(element.tagName);
14
+ }
15
+
16
+ function isButtonTarget(target: EventTarget | null): boolean {
17
+ const element = target as HTMLElement | null;
18
+ return !!element && (element.tagName === 'BUTTON' || !!element.closest('button'));
19
+ }
20
+
21
+ /** Desktop navigation: ← / → to move between stories, Space to pause/resume. */
22
+ export function useStoryKeyboard({
23
+ enabled = true,
24
+ onPrev,
25
+ onNext,
26
+ onTogglePause,
27
+ }: UseStoryKeyboardOptions) {
28
+ const handlersRef = useRef({ onPrev, onNext, onTogglePause });
29
+ useEffect(() => {
30
+ handlersRef.current = { onPrev, onNext, onTogglePause };
31
+ }, [onPrev, onNext, onTogglePause]);
32
+
33
+ useEffect(() => {
34
+ if (!enabled) return;
35
+
36
+ const handleKeyDown = (event: KeyboardEvent) => {
37
+ if (event.defaultPrevented || event.metaKey || event.ctrlKey || event.altKey) return;
38
+ if (isEditableTarget(event.target)) return;
39
+
40
+ const handlers = handlersRef.current;
41
+ if (event.key === 'ArrowLeft') {
42
+ event.preventDefault();
43
+ handlers.onPrev();
44
+ } else if (event.key === 'ArrowRight') {
45
+ event.preventDefault();
46
+ handlers.onNext();
47
+ } else if (event.key === ' ' && !isButtonTarget(event.target)) {
48
+ event.preventDefault();
49
+ handlers.onTogglePause();
50
+ }
51
+ };
52
+
53
+ window.addEventListener('keydown', handleKeyDown);
54
+ return () => window.removeEventListener('keydown', handleKeyDown);
55
+ }, [enabled]);
56
+ }
@@ -0,0 +1,120 @@
1
+ import { useCallback, useEffect, useMemo, useReducer, useRef } from 'react';
2
+ import type { MotionValue } from 'framer-motion';
3
+ import {
4
+ createInitialPlayerState,
5
+ isPlayerRunning,
6
+ storyPlayerReducer,
7
+ } from './storyPlayerReducer';
8
+ import { useStoryTimer } from './useStoryTimer';
9
+ import type { PauseReason, ResolvedStory, StoryControls, StoryEvent } from './types';
10
+
11
+ interface UseStoryPlayerOptions<TContext> {
12
+ stories: ResolvedStory<TContext>[];
13
+ /** Hold playback until `resume('external')` is called (e.g. by a recording orchestrator). */
14
+ startPaused?: boolean;
15
+ autoAdvance?: boolean;
16
+ /** Pause while the page is in a background tab. */
17
+ pauseWhenHidden?: boolean;
18
+ onEvent?: (event: StoryEvent) => void;
19
+ }
20
+
21
+ export interface StoryPlayer<TContext> {
22
+ story: ResolvedStory<TContext>;
23
+ index: number;
24
+ count: number;
25
+ isRunning: boolean;
26
+ isEnded: boolean;
27
+ isPausedBy: (reason: PauseReason) => boolean;
28
+ progress: MotionValue<number>;
29
+ controls: StoryControls;
30
+ pause: (reason: PauseReason) => void;
31
+ resume: (reason: PauseReason) => void;
32
+ }
33
+
34
+ export function useStoryPlayer<TContext>({
35
+ stories,
36
+ startPaused = false,
37
+ autoAdvance = true,
38
+ pauseWhenHidden = true,
39
+ onEvent,
40
+ }: UseStoryPlayerOptions<TContext>): StoryPlayer<TContext> {
41
+ const [state, dispatch] = useReducer(
42
+ storyPlayerReducer,
43
+ undefined,
44
+ () => createInitialPlayerState(stories.length, startPaused ? ['external'] : [])
45
+ );
46
+
47
+ useEffect(() => {
48
+ dispatch({ type: 'setCount', count: stories.length });
49
+ }, [stories.length]);
50
+
51
+ const onEventRef = useRef(onEvent);
52
+ useEffect(() => {
53
+ onEventRef.current = onEvent;
54
+ }, [onEvent]);
55
+
56
+ const index = Math.min(state.index, Math.max(stories.length - 1, 0));
57
+ const story = stories[index];
58
+ const isRunning = isPlayerRunning(state);
59
+
60
+ const pause = useCallback((reason: PauseReason) => dispatch({ type: 'pause', reason }), []);
61
+ const resume = useCallback((reason: PauseReason) => dispatch({ type: 'resume', reason }), []);
62
+
63
+ const controls = useMemo<StoryControls>(
64
+ () => ({
65
+ next: () => dispatch({ type: 'next' }),
66
+ prev: () => dispatch({ type: 'prev' }),
67
+ goTo: (target: number) => dispatch({ type: 'goTo', index: target }),
68
+ restart: () => {
69
+ dispatch({ type: 'restart' });
70
+ onEventRef.current?.({ type: 'replay' });
71
+ },
72
+ }),
73
+ []
74
+ );
75
+
76
+ const handleTimerComplete = useCallback(() => {
77
+ onEventRef.current?.({ type: 'story_complete', storyId: story.id, index });
78
+ if (autoAdvance) dispatch({ type: 'timerComplete' });
79
+ }, [autoAdvance, story.id, index]);
80
+
81
+ const progress = useStoryTimer({
82
+ storyKey: index,
83
+ duration: story.duration,
84
+ isRunning,
85
+ onComplete: handleTimerComplete,
86
+ });
87
+
88
+ useEffect(() => {
89
+ onEventRef.current?.({ type: 'story_view', storyId: story.id, index });
90
+ }, [story.id, index]);
91
+
92
+ useEffect(() => {
93
+ if (!pauseWhenHidden || typeof document === 'undefined') return;
94
+
95
+ const sync = () => {
96
+ dispatch({ type: document.hidden ? 'pause' : 'resume', reason: 'hidden' });
97
+ };
98
+ sync();
99
+ document.addEventListener('visibilitychange', sync);
100
+ return () => document.removeEventListener('visibilitychange', sync);
101
+ }, [pauseWhenHidden]);
102
+
103
+ const isPausedBy = useCallback(
104
+ (reason: PauseReason) => state.pauseReasons.includes(reason),
105
+ [state.pauseReasons]
106
+ );
107
+
108
+ return {
109
+ story,
110
+ index,
111
+ count: stories.length,
112
+ isRunning,
113
+ isEnded: state.ended,
114
+ isPausedBy,
115
+ progress,
116
+ controls,
117
+ pause,
118
+ resume,
119
+ };
120
+ }
@@ -0,0 +1,55 @@
1
+ import { useEffect, useRef } from 'react';
2
+ import { animate, useMotionValue, type MotionValue } from 'framer-motion';
3
+
4
+ interface UseStoryTimerOptions {
5
+ /** Changing the key restarts the timer from zero. */
6
+ storyKey: string | number;
7
+ /** Seconds. */
8
+ duration: number;
9
+ isRunning: boolean;
10
+ onComplete: () => void;
11
+ }
12
+
13
+ /**
14
+ * Drives a 0→1 progress value for the active story. Progress lives in a MotionValue,
15
+ * so the progress bar updates on the compositor without re-rendering React every frame.
16
+ */
17
+ export function useStoryTimer({
18
+ storyKey,
19
+ duration,
20
+ isRunning,
21
+ onComplete,
22
+ }: UseStoryTimerOptions): MotionValue<number> {
23
+ const progress = useMotionValue(0);
24
+ const onCompleteRef = useRef(onComplete);
25
+ const keyRef = useRef(storyKey);
26
+
27
+ useEffect(() => {
28
+ onCompleteRef.current = onComplete;
29
+ }, [onComplete]);
30
+
31
+ useEffect(() => {
32
+ if (keyRef.current !== storyKey) {
33
+ keyRef.current = storyKey;
34
+ progress.jump(0);
35
+ }
36
+
37
+ if (!isRunning) return;
38
+
39
+ const start = progress.get();
40
+ if (start >= 1) {
41
+ onCompleteRef.current();
42
+ return;
43
+ }
44
+
45
+ const controls = animate(progress, 1, {
46
+ duration: Math.max(duration, 0) * (1 - start),
47
+ ease: 'linear',
48
+ onComplete: () => onCompleteRef.current(),
49
+ });
50
+
51
+ return () => controls.stop();
52
+ }, [storyKey, duration, isRunning, progress]);
53
+
54
+ return progress;
55
+ }
@@ -0,0 +1,30 @@
1
+ import { useEffect, useRef } from 'react';
2
+
3
+ type CaptureWindow = Window & {
4
+ __RECAP_START__?: () => void;
5
+ __RECAP_READY__?: boolean;
6
+ };
7
+
8
+ /**
9
+ * Handshake with the headless video recorder: sets `window.__RECAP_READY__` once mounted
10
+ * and exposes `window.__RECAP_START__` for the recorder to begin playback after recording starts.
11
+ */
12
+ export function useVideoCaptureBridge(enabled: boolean, onStart: () => void) {
13
+ const onStartRef = useRef(onStart);
14
+ useEffect(() => {
15
+ onStartRef.current = onStart;
16
+ }, [onStart]);
17
+
18
+ useEffect(() => {
19
+ if (!enabled || typeof window === 'undefined') return;
20
+
21
+ const captureWindow = window as CaptureWindow;
22
+ captureWindow.__RECAP_START__ = () => onStartRef.current();
23
+ captureWindow.__RECAP_READY__ = true;
24
+
25
+ return () => {
26
+ delete captureWindow.__RECAP_START__;
27
+ delete captureWindow.__RECAP_READY__;
28
+ };
29
+ }, [enabled]);
30
+ }
@@ -0,0 +1,136 @@
1
+ import React, { useCallback, useEffect, useMemo, useRef } from 'react';
2
+ import { AnimatePresence, MotionConfig, motion } from 'framer-motion';
3
+ import '@fontsource/aileron/400.css';
4
+ import '@fontsource/aileron/600.css';
5
+ import '@fontsource/aileron/700.css';
6
+ import '@fontsource/aileron/700-italic.css';
7
+ import '@fontsource/aileron/800.css';
8
+ import type { RecapData } from '../types';
9
+ import { slideCrossfade } from './motion';
10
+ import {
11
+ usePreloadAssets,
12
+ useStoryGestures,
13
+ useStoryKeyboard,
14
+ useStoryPlayer,
15
+ useVideoCaptureBridge,
16
+ type StoryEvent,
17
+ } from '../story';
18
+ import { resolveRecapCategory } from '../categories';
19
+ import { buildStories, LIGHT_THEMES, THEME_STATUS_BAR_COLORS } from './registry';
20
+ import { useStatusBarColor } from '../hooks/useStatusBarColor';
21
+ import { CANVAS_HEIGHT, CanvasSqueezeContext, useCanvasScale } from './useCanvasScale';
22
+ import Top10Chrome from './Top10Chrome';
23
+ import './Top10Story.css';
24
+
25
+ export interface RecapStory2026Props {
26
+ recapData: RecapData;
27
+ onStoryEvent?: (event: StoryEvent) => void;
28
+ onClose?: () => void;
29
+ }
30
+
31
+ /**
32
+ * RecapStory2026 - The 2026 story: slides render on a fixed 375×770 design canvas
33
+ * scaled to the screen, so Figma positions carry over directly.
34
+ */
35
+ function RecapStory2026({ recapData, onStoryEvent, onClose }: RecapStory2026Props) {
36
+ const isVideo = recapData.isVideo === true;
37
+ const recorderControls = isVideo && recapData.manualVideoPlayback === true;
38
+ const year = recapData.year ?? 2026;
39
+ const stageRef = useRef<HTMLDivElement>(null);
40
+ const { scale, squeeze } = useCanvasScale(stageRef, isVideo);
41
+
42
+ const stories = useMemo(() => buildStories(recapData), [recapData]);
43
+ const player = useStoryPlayer({
44
+ stories,
45
+ startPaused: isVideo,
46
+ autoAdvance: !recorderControls,
47
+ pauseWhenHidden: !isVideo,
48
+ onEvent: onStoryEvent,
49
+ });
50
+ const { story, index, controls, pause, resume } = player;
51
+ const theme = story.theme ?? 'dark';
52
+ useStatusBarColor(THEME_STATUS_BAR_COLORS[theme] ?? THEME_STATUS_BAR_COLORS.dark);
53
+
54
+ useVideoCaptureBridge(isVideo, () => resume('external'));
55
+ usePreloadAssets(stories, index);
56
+
57
+ useEffect(() => {
58
+ if (!recorderControls) return;
59
+ const captureWindow = window as Window & {
60
+ __RECAP_VIDEO_PLAN__?: { id: string; duration: number }[];
61
+ __RECAP_SHOW_SLIDE__?: (index: number) => void;
62
+ };
63
+ captureWindow.__RECAP_VIDEO_PLAN__ = stories.map(({ id, duration }) => ({ id, duration }));
64
+ captureWindow.__RECAP_SHOW_SLIDE__ = controls.goTo;
65
+ return () => {
66
+ delete captureWindow.__RECAP_VIDEO_PLAN__;
67
+ delete captureWindow.__RECAP_SHOW_SLIDE__;
68
+ };
69
+ }, [recorderControls, stories, controls.goTo]);
70
+
71
+ const holdStart = useCallback(() => pause('hold'), [pause]);
72
+ const holdEnd = useCallback(() => resume('hold'), [resume]);
73
+ const gestures = useStoryGestures({
74
+ onPrev: controls.prev,
75
+ onNext: controls.next,
76
+ onHoldStart: holdStart,
77
+ onHoldEnd: holdEnd,
78
+ });
79
+
80
+ useStoryKeyboard({
81
+ enabled: !isVideo,
82
+ onPrev: controls.prev,
83
+ onNext: controls.next,
84
+ onTogglePause: () => (player.isPausedBy('user') ? resume('user') : pause('user')),
85
+ });
86
+
87
+ return (
88
+ <div
89
+ ref={stageRef}
90
+ className="s26-stage"
91
+ data-s26-theme={theme}
92
+ data-recap-slide-index={index}
93
+ data-recap-category={resolveRecapCategory(recapData.businessCategory)}
94
+ >
95
+ <div
96
+ className="s26-canvas"
97
+ style={{ height: CANVAS_HEIGHT - squeeze, transform: `translateX(-50%) scale(${scale})` }}
98
+ >
99
+ <CanvasSqueezeContext.Provider value={squeeze}>
100
+ <div className="s26-touch" {...gestures}>
101
+ <MotionConfig reducedMotion="user">
102
+ {/* No mode="wait": outgoing and incoming slides crossfade over each other */}
103
+ <AnimatePresence>
104
+ <motion.div
105
+ key={story.id}
106
+ className="s26-slide"
107
+ data-s26-theme={theme}
108
+ variants={slideCrossfade}
109
+ initial={isVideo && (index === 0 || story.outro) ? false : "initial"}
110
+ animate="animate"
111
+ exit={isVideo && stories[index + 1]?.outro ? { opacity: 0, transition: { duration: 0 } } : "exit"}
112
+ >
113
+ {story.render(recapData, controls)}
114
+ </motion.div>
115
+ </AnimatePresence>
116
+ </MotionConfig>
117
+ </div>
118
+ </CanvasSqueezeContext.Provider>
119
+
120
+ <Top10Chrome
121
+ businessName={recapData.businessName}
122
+ businessLogo={recapData.businessLogo}
123
+ year={year}
124
+ total={player.count}
125
+ active={index}
126
+ progress={player.progress}
127
+ onBarClick={controls.goTo}
128
+ onClose={onClose}
129
+ darkIcons={LIGHT_THEMES.includes(theme)}
130
+ />
131
+ </div>
132
+ </div>
133
+ );
134
+ }
135
+
136
+ export default RecapStory2026;