@katajere/recap 1.0.14 → 2.1.0

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 (98) hide show
  1. package/dist/App.css +22 -2
  2. package/dist/LoginScreen.css +22 -21
  3. package/dist/OtpScreen.css +20 -17
  4. package/dist/RecapStory.css +148 -0
  5. package/dist/RecapStory.d.ts.map +1 -1
  6. package/dist/RecapStory.js +63 -29
  7. package/dist/StoryProgress.css +3 -3
  8. package/dist/assets/huxxle-login-blue-logo.svg +14 -0
  9. package/dist/assets/noisy-background.svg +23 -0
  10. package/dist/assets/search-icon.svg +4 -0
  11. package/dist/assets/share-button.svg +5 -0
  12. package/dist/assets/web-icon.png +0 -0
  13. package/dist/assets/web-icon.svg +14 -0
  14. package/dist/components/Header.css +12 -1
  15. package/dist/components/Header.js +2 -2
  16. package/dist/data/mock.d.ts.map +1 -1
  17. package/dist/data/mock.js +19 -7
  18. package/dist/index.d.ts +0 -1
  19. package/dist/index.d.ts.map +1 -1
  20. package/dist/index.js +0 -1
  21. package/dist/slides/Slide10Final.css +73 -35
  22. package/dist/slides/Slide1Intro.css +204 -56
  23. package/dist/slides/Slide1Intro.d.ts +2 -1
  24. package/dist/slides/Slide1Intro.d.ts.map +1 -1
  25. package/dist/slides/Slide1Intro.js +41 -47
  26. package/dist/slides/Slide2Days.css +121 -34
  27. package/dist/slides/Slide2Days.d.ts +2 -1
  28. package/dist/slides/Slide2Days.d.ts.map +1 -1
  29. package/dist/slides/Slide2Days.js +45 -4
  30. package/dist/slides/Slide3Revenue.css +80 -38
  31. package/dist/slides/Slide3Revenue.d.ts.map +1 -1
  32. package/dist/slides/Slide3Revenue.js +33 -4
  33. package/dist/slides/Slide4Orders.css +93 -34
  34. package/dist/slides/Slide4Orders.d.ts +2 -1
  35. package/dist/slides/Slide4Orders.d.ts.map +1 -1
  36. package/dist/slides/Slide4Orders.js +45 -3
  37. package/dist/slides/Slide5Buyers.css +124 -67
  38. package/dist/slides/Slide5Buyers.d.ts +2 -1
  39. package/dist/slides/Slide5Buyers.d.ts.map +1 -1
  40. package/dist/slides/Slide5Buyers.js +43 -3
  41. package/dist/slides/Slide6Customer.css +294 -52
  42. package/dist/slides/Slide6Customer.d.ts +6 -3
  43. package/dist/slides/Slide6Customer.d.ts.map +1 -1
  44. package/dist/slides/Slide6Customer.js +25 -4
  45. package/dist/slides/Slide7Products.css +8 -7
  46. package/dist/slides/Slide7Products.js +3 -3
  47. package/dist/slides/Slide8Months.css +6 -6
  48. package/dist/slides/Slide9Year.css +4 -2
  49. package/dist/slides/Slide9Year.d.ts +2 -1
  50. package/dist/slides/Slide9Year.d.ts.map +1 -1
  51. package/dist/slides/Slide9Year.js +23 -2
  52. package/dist/types.d.ts +5 -0
  53. package/dist/types.d.ts.map +1 -1
  54. package/dist/utils/slideScreenshot.d.ts +27 -0
  55. package/dist/utils/slideScreenshot.d.ts.map +1 -0
  56. package/dist/utils/slideScreenshot.js +274 -0
  57. package/package.json +2 -1
  58. package/src/App.css +22 -2
  59. package/src/LoginScreen.css +22 -21
  60. package/src/LoginScreen.tsx +1 -1
  61. package/src/OtpScreen.css +20 -17
  62. package/src/OtpScreen.tsx +1 -1
  63. package/src/RecapStory.css +148 -0
  64. package/src/RecapStory.tsx +134 -58
  65. package/src/StoryProgress.css +3 -3
  66. package/src/components/Header.css +12 -1
  67. package/src/components/Header.tsx +2 -2
  68. package/src/data/mock.ts +19 -7
  69. package/src/index.ts +0 -1
  70. package/src/slides/Slide10Final.css +73 -35
  71. package/src/slides/Slide1Intro.css +204 -56
  72. package/src/slides/Slide1Intro.tsx +89 -81
  73. package/src/slides/Slide2Days.css +121 -34
  74. package/src/slides/Slide2Days.tsx +67 -19
  75. package/src/slides/Slide3Revenue.css +80 -38
  76. package/src/slides/Slide3Revenue.tsx +45 -7
  77. package/src/slides/Slide4Orders.css +93 -34
  78. package/src/slides/Slide4Orders.tsx +71 -10
  79. package/src/slides/Slide5Buyers.css +124 -67
  80. package/src/slides/Slide5Buyers.tsx +97 -38
  81. package/src/slides/Slide6Customer.css +294 -52
  82. package/src/slides/Slide6Customer.tsx +68 -10
  83. package/src/slides/Slide7Products.css +8 -7
  84. package/src/slides/Slide7Products.tsx +3 -3
  85. package/src/slides/Slide8Months.css +6 -6
  86. package/src/slides/Slide9Year.css +4 -2
  87. package/src/slides/Slide9Year.tsx +35 -7
  88. package/src/types.ts +5 -0
  89. package/src/utils/slideScreenshot.ts +324 -0
  90. package/dist/FloatingFrames.css +0 -55
  91. package/dist/FloatingFrames.d.ts +0 -11
  92. package/dist/FloatingFrames.d.ts.map +0 -1
  93. package/dist/FloatingFrames.js +0 -12
  94. package/dist/assets/money-rain.png +0 -0
  95. package/dist/assets/raining-money.gif +0 -0
  96. package/dist/assets/recap-music.mp3 +0 -0
  97. package/src/FloatingFrames.css +0 -55
  98. package/src/FloatingFrames.tsx +0 -27
@@ -103,3 +103,151 @@
103
103
  width: 100%;
104
104
  height: 100%;
105
105
  }
106
+
107
+ /* Base button style for floating buttons */
108
+ .recap-story__floating-btn {
109
+ position: absolute;
110
+ bottom: calc(32px + env(safe-area-inset-bottom));
111
+ display: flex;
112
+ flex-direction: row;
113
+ justify-content: center;
114
+ align-items: center;
115
+ padding: 8px;
116
+ gap: 8px;
117
+ background: #FCFCFC url('https://katajereassets.blob.core.windows.net/recap-videos/noisy-background.png') repeat;
118
+ background-size: 390px 844px;
119
+ border: 1px solid var(--border-line);
120
+ box-shadow: 0px 4px 100px rgba(0, 0, 0, 0.24);
121
+ cursor: pointer;
122
+ z-index: 10;
123
+ }
124
+
125
+ .recap-story__floating-btn:hover {
126
+ box-shadow: 0px 6px 120px rgba(0, 0, 0, 0.32);
127
+ }
128
+
129
+ .recap-story__floating-btn:active {
130
+ box-shadow: 0px 2px 80px rgba(0, 0, 0, 0.24);
131
+ }
132
+
133
+ /* Sound button - positioned left, always visible */
134
+ .recap-story__sound-btn {
135
+ left: calc(16px + env(safe-area-inset-left));
136
+ width: 36px;
137
+ height: 36px;
138
+ }
139
+
140
+ .recap-story__sound-btn svg {
141
+ width: 20px;
142
+ height: 20px;
143
+ }
144
+
145
+ /* Share button - positioned right, hidden initially */
146
+ .recap-story__share-btn {
147
+ right: calc(16px + env(safe-area-inset-right));
148
+ height: 36px;
149
+ padding: 8px 12px;
150
+ gap: 4px;
151
+ /* Hidden by default until counter animations complete */
152
+ opacity: 0;
153
+ pointer-events: none;
154
+ /* Transition must be on base state for smooth animation */
155
+ transition: opacity 0.4s ease-out;
156
+ }
157
+
158
+ /* Show share button when ready */
159
+ .recap-story__share-btn--visible {
160
+ opacity: 1;
161
+ pointer-events: auto;
162
+ }
163
+
164
+ .recap-story__share-btn svg {
165
+ width: 20px;
166
+ height: 20px;
167
+ }
168
+
169
+ .recap-story__share-text {
170
+ font-family: 'Lora', serif;
171
+ font-weight: 600;
172
+ font-size: 12px;
173
+ line-height: 120%;
174
+ color: #4F4CD8;
175
+ white-space: nowrap;
176
+ }
177
+
178
+ /* Screenshot mode - prepares the slide for clean capture */
179
+ /* Note: Buttons are excluded via html2canvas ignoreElements option, not CSS */
180
+ .recap-story.screenshot-mode .recap-story__progress-wrap {
181
+ display: none !important;
182
+ visibility: hidden !important;
183
+ }
184
+
185
+ /* Force elements to be visible (in case animations are mid-flight) */
186
+ .recap-story.screenshot-mode [style*="opacity"] {
187
+ opacity: 1 !important;
188
+ }
189
+
190
+ /*
191
+ * Fix gradient text for html2canvas - background-clip:text not supported.
192
+ * We remove the gradient background and use solid color fallback.
193
+ * This targets all known gradient text elements.
194
+ */
195
+ .recap-story.screenshot-mode .header__badge,
196
+ .recap-story.screenshot-mode .slide1-intro__brand,
197
+ .recap-story.screenshot-mode .slide1-intro__bg-text,
198
+ .recap-story.screenshot-mode .stats-number,
199
+ .recap-story.screenshot-mode .stats-label,
200
+ .recap-story.screenshot-mode .stats-sublabel,
201
+ .recap-story.screenshot-mode .streak-number,
202
+ .recap-story.screenshot-mode .streak-label,
203
+ .recap-story.screenshot-mode .slide3-revenue__amount,
204
+ .recap-story.screenshot-mode .slide3-revenue__currency,
205
+ .recap-story.screenshot-mode .slide4-orders__number,
206
+ .recap-story.screenshot-mode .slide5-buyers__number,
207
+ .recap-story.screenshot-mode .slide5-buyers__label,
208
+ .recap-story.screenshot-mode .slide6-customer__number,
209
+ .recap-story.screenshot-mode .slide6-customer__label,
210
+ .recap-story.screenshot-mode .slide7-products__lead,
211
+ .recap-story.screenshot-mode .slide7-products__rank,
212
+ .recap-story.screenshot-mode .slide7-products__title,
213
+ .recap-story.screenshot-mode .slide7-products__subtitle,
214
+ .recap-story.screenshot-mode .slide8-months__message,
215
+ .recap-story.screenshot-mode .slide8-months__entry,
216
+ .recap-story.screenshot-mode .slide9-year__message,
217
+ .recap-story.screenshot-mode .slide9-year__title,
218
+ .recap-story.screenshot-mode .slide10-final__badge,
219
+ .recap-story.screenshot-mode .slide10-final__title {
220
+ background: none !important;
221
+ -webkit-background-clip: unset !important;
222
+ background-clip: unset !important;
223
+ -webkit-text-fill-color: #4F4CD8 !important;
224
+ color: #4F4CD8 !important;
225
+ }
226
+
227
+ /* Fix outline text (stroke) for screenshot - keep stroke styling but fix fill color */
228
+ .recap-story.screenshot-mode .streak-number {
229
+ background: none !important;
230
+ -webkit-background-clip: unset !important;
231
+ background-clip: unset !important;
232
+ color: #FFFFFF !important;
233
+ -webkit-text-fill-color: #FFFFFF !important;
234
+ -webkit-text-stroke: 1.5px #4F4CD8 !important;
235
+ paint-order: stroke fill !important;
236
+ }
237
+
238
+ .recap-story.screenshot-mode .slide5-buyers__number--secondary,
239
+ .recap-story.screenshot-mode .slide6-customer__number--secondary {
240
+ background: none !important;
241
+ -webkit-background-clip: unset !important;
242
+ background-clip: unset !important;
243
+ color: #FFFFFF !important;
244
+ -webkit-text-fill-color: #FFFFFF !important;
245
+ -webkit-text-stroke: 1.5px #4F4CD8 !important;
246
+ paint-order: stroke fill !important;
247
+ }
248
+
249
+ /* Fix overflow issues for grids/decorative elements that may be clipped */
250
+ .recap-story.screenshot-mode .slide4-orders__grid,
251
+ .recap-story.screenshot-mode .slide7-products__frames {
252
+ overflow: visible !important;
253
+ }
@@ -13,14 +13,15 @@ import Slide8Months from "./slides/Slide8Months";
13
13
  import Slide9Year from "./slides/Slide9Year";
14
14
  import Slide10Final from "./slides/Slide10Final";
15
15
  import { slideVariants } from "./utils";
16
+ import { captureAndShareSlide, preCaptureSlide, clearScreenshotCache } from "./utils/slideScreenshot";
16
17
  import { slideDurations as defaultDurations } from "./data/mock";
17
18
  import { BUSINESS_CATEGORIES, RecapData } from "./types";
18
19
  import { useBackgroundMusic } from "./hooks/useBackgroundMusic";
19
- import soundOnIcon from "./assets/sound-on.svg";
20
- import soundOffIcon from "./assets/sound-off.svg";
21
- import recapMusic from "./assets/recap-music.mp3";
22
20
  import "./RecapStory.css";
23
21
 
22
+ // External CDN URL for background music (reduces package size)
23
+ const recapMusic = "https://katajereassets.blob.core.windows.net/recap-videos/recap-music.mp3";
24
+
24
25
  interface RecapStoryProps {
25
26
  recapData: RecapData;
26
27
  }
@@ -31,14 +32,11 @@ interface RecapStoryProps {
31
32
  function RecapStory({ recapData }: RecapStoryProps) {
32
33
  const [activeIndex, setActiveIndex] = useState<number>(0);
33
34
  const durations = recapData.slideDurations || defaultDurations;
34
- const [introDuration, setIntroDuration] = useState<number>(
35
- durations.intro
36
- );
37
- const [isIntroDurationReady, setIsIntroDurationReady] =
38
- useState<boolean>(false);
39
35
  const [isPaused, setIsPaused] = useState<boolean>(false);
36
+ const [isShareVisible, setIsShareVisible] = useState<boolean>(false);
40
37
  const holdTimerRef = useRef<ReturnType<typeof setTimeout> | null>(null);
41
38
  const isHoldingRef = useRef<boolean>(false);
39
+ const slidesContainerRef = useRef<HTMLDivElement>(null);
42
40
 
43
41
  // Cleanup on unmount to prevent memory leaks
44
42
  React.useEffect(() => {
@@ -46,8 +44,11 @@ function RecapStory({ recapData }: RecapStoryProps) {
46
44
  if (holdTimerRef.current) {
47
45
  clearTimeout(holdTimerRef.current);
48
46
  }
47
+ // Clear screenshot cache on unmount
48
+ clearScreenshotCache();
49
49
  };
50
50
  }, []);
51
+
51
52
  const { isMuted, isPlaying, toggleMute, play, stop } = useBackgroundMusic({
52
53
  src: recapMusic,
53
54
  volume: 0.6,
@@ -55,24 +56,11 @@ function RecapStory({ recapData }: RecapStoryProps) {
55
56
  loop: false,
56
57
  });
57
58
 
58
- // Handle intro duration updates
59
- const handleIntroDurationCalculated = (duration: number) => {
60
- setIntroDuration(duration);
61
- setIsIntroDurationReady(true);
62
- };
63
-
64
- // Reset ready state when returning to intro slide
65
- React.useEffect(() => {
66
- if (activeIndex === 0) {
67
- setIsIntroDurationReady(false);
68
- }
69
- }, [activeIndex]);
70
-
71
59
  const isNewUser = recapData.businessCategory === BUSINESS_CATEGORIES.NEW_USER;
72
60
 
73
61
  // Define slides with their durations (new-user only sees the intro)
74
62
  const fullSlideSet = [
75
- { id: "intro", duration: introDuration },
63
+ { id: "intro", duration: durations.intro },
76
64
  { id: "days", duration: durations.days },
77
65
  { id: "revenue", duration: durations.revenue },
78
66
  { id: "orders", duration: durations.orders },
@@ -84,12 +72,52 @@ function RecapStory({ recapData }: RecapStoryProps) {
84
72
  { id: "final", duration: durations.final },
85
73
  ];
86
74
  const slides = isNewUser
87
- ? [{ id: "intro", duration: introDuration }]
75
+ ? [{ id: "intro", duration: durations.intro }]
88
76
  : fullSlideSet;
89
77
 
90
78
  const currentSlide = slides[activeIndex];
91
79
  const isFinalSlide = currentSlide.id === "final";
92
80
 
81
+ // Pre-capture screenshot and show share button when ready
82
+ React.useEffect(() => {
83
+ // Hide share button immediately on slide change
84
+ setIsShareVisible(false);
85
+
86
+ if (isFinalSlide || !slidesContainerRef.current) return;
87
+
88
+ let isMounted = true;
89
+
90
+ // Wait for animations to complete, then pre-capture
91
+ const timer = setTimeout(async () => {
92
+ if (!isMounted || !slidesContainerRef.current) return;
93
+
94
+ try {
95
+ // Pre-capture the screenshot
96
+ await preCaptureSlide(slidesContainerRef.current, {
97
+ slideId: currentSlide.id,
98
+ businessName: recapData.businessName,
99
+ year: recapData.year ?? 2025,
100
+ });
101
+
102
+ // Only show share button AFTER pre-capture is complete
103
+ if (isMounted) {
104
+ setIsShareVisible(true);
105
+ }
106
+ } catch (error) {
107
+ console.error('[RecapStory] Pre-capture failed:', error);
108
+ // Still show share button even if pre-capture fails (will fall back to download)
109
+ if (isMounted) {
110
+ setIsShareVisible(true);
111
+ }
112
+ }
113
+ }, 2500); // Wait 2.5s for all animations to complete
114
+
115
+ return () => {
116
+ isMounted = false;
117
+ clearTimeout(timer);
118
+ };
119
+ }, [activeIndex, currentSlide.id, recapData.businessName, recapData.year, isFinalSlide]);
120
+
93
121
  // Ensure music plays only on slides 1-9 and stops immediately on the final slide
94
122
  React.useEffect(() => {
95
123
  if (isFinalSlide) {
@@ -97,10 +125,10 @@ function RecapStory({ recapData }: RecapStoryProps) {
97
125
  return;
98
126
  }
99
127
 
100
- if (isIntroDurationReady && !isPlaying) {
128
+ if (!isPlaying) {
101
129
  play();
102
130
  }
103
- }, [isFinalSlide, isIntroDurationReady, isPlaying, play, stop]);
131
+ }, [isFinalSlide, isPlaying, play, stop]);
104
132
 
105
133
  // Stop music when reaching the final slide (safety net)
106
134
  React.useEffect(() => {
@@ -122,7 +150,6 @@ function RecapStory({ recapData }: RecapStoryProps) {
122
150
 
123
151
  const handleReplay = () => {
124
152
  setActiveIndex(0);
125
- setIsIntroDurationReady(false);
126
153
  setIsPaused(false);
127
154
  };
128
155
 
@@ -213,11 +240,17 @@ function RecapStory({ recapData }: RecapStoryProps) {
213
240
  businessCategory={recapData.businessCategory}
214
241
  introHeadline={recapData.introHeadline}
215
242
  introSubtitle={recapData.introSubtitle}
216
- onDurationCalculated={handleIntroDurationCalculated}
243
+ frameImages={recapData.productImages}
217
244
  />
218
245
  );
219
246
  case "days":
220
- return <Slide2Days days={recapData.days} streak={recapData.streak} />;
247
+ return (
248
+ <Slide2Days
249
+ days={recapData.days}
250
+ streak={recapData.streak}
251
+ frameImages={recapData.productImages}
252
+ />
253
+ );
221
254
  case "revenue":
222
255
  return (
223
256
  <Slide3Revenue
@@ -227,16 +260,29 @@ function RecapStory({ recapData }: RecapStoryProps) {
227
260
  />
228
261
  );
229
262
  case "orders":
230
- return <Slide4Orders orders={recapData.orders} />;
263
+ return (
264
+ <Slide4Orders
265
+ orders={recapData.orders}
266
+ frameImages={recapData.productImages}
267
+ />
268
+ );
231
269
  case "buyers":
232
270
  return (
233
271
  <Slide5Buyers
234
272
  firstTimeBuyers={recapData.firstTimeBuyers}
235
273
  repeatBuyers={recapData.repeatBuyers}
274
+ frameImages={recapData.productImages}
236
275
  />
237
276
  );
238
277
  case "customer":
239
- return <Slide6Customer customerName={recapData.topCustomerName} />;
278
+ return (
279
+ <Slide6Customer
280
+ websiteLink={recapData.websiteLink ?? ""}
281
+ websiteVisits={recapData.websiteVisits ?? 0}
282
+ mostViewedProduct={recapData.mostViewedProduct ?? ""}
283
+ mostViewedProductCount={recapData.mostViewedProductCount ?? 0}
284
+ />
285
+ );
240
286
  case "products":
241
287
  return <Slide7Products products={recapData.topProducts} />;
242
288
  case "months":
@@ -246,6 +292,7 @@ function RecapStory({ recapData }: RecapStoryProps) {
246
292
  <Slide9Year
247
293
  businessCategory={recapData.businessCategory}
248
294
  year={recapData.year}
295
+ frameImages={recapData.productImages}
249
296
  />
250
297
  );
251
298
  case "final":
@@ -275,43 +322,26 @@ function RecapStory({ recapData }: RecapStoryProps) {
275
322
  />
276
323
  </div>
277
324
 
278
- {/* Progress bars with sound toggle */}
325
+ {/* Progress bars */}
279
326
  <div className="recap-story__progress-wrap">
280
327
  <div className="recap-story__progress">
281
- {(activeIndex !== 0 || isIntroDurationReady) && (
282
- <StoryProgress
283
- total={slides.length}
284
- active={activeIndex}
285
- duration={currentSlide.duration}
286
- onComplete={handleProgressComplete}
287
- onBarClick={handleBarClick}
288
- hideBorder={isFinalSlide}
289
- isPaused={isPaused}
290
- />
291
- )}
328
+ <StoryProgress
329
+ total={slides.length}
330
+ active={activeIndex}
331
+ duration={currentSlide.duration}
332
+ onComplete={handleProgressComplete}
333
+ onBarClick={handleBarClick}
334
+ hideBorder={isFinalSlide}
335
+ isPaused={isPaused}
336
+ />
292
337
  </div>
293
-
294
- {!isFinalSlide && recapData.isVideo !== true && (
295
- <button
296
- type="button"
297
- className="recap-story__sound-toggle"
298
- onClick={toggleMute}
299
- aria-label={isMuted ? "Unmute sound" : "Mute sound"}
300
- >
301
- <img
302
- src={isMuted ? soundOffIcon : soundOnIcon}
303
- alt={isMuted ? "Unmute sound" : "Mute sound"}
304
- className="recap-story__sound-icon"
305
- draggable={false}
306
- />
307
- </button>
308
- )}
309
338
  </div>
310
339
  </div>
311
340
 
312
341
  {/* Slide content with transitions */}
313
342
  <div
314
343
  className="recap-story__slides"
344
+ ref={slidesContainerRef}
315
345
  onPointerDown={handlePointerDown}
316
346
  onPointerUp={handlePointerUp}
317
347
  onPointerLeave={handlePointerLeave}
@@ -330,6 +360,52 @@ function RecapStory({ recapData }: RecapStoryProps) {
330
360
  </motion.div>
331
361
  </AnimatePresence>
332
362
  </div>
363
+
364
+ {/* Floating buttons - Sound and Share (only on slides 1-9, hidden for video and new users) */}
365
+ {!isFinalSlide && !recapData.isVideo && (
366
+ <>
367
+ {/* Sound button - always visible, independent of share state */}
368
+ <button
369
+ className="recap-story__floating-btn recap-story__sound-btn"
370
+ onClick={toggleMute}
371
+ aria-label={isMuted ? "Unmute" : "Mute"}
372
+ >
373
+ <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
374
+ <path d="M1.66675 8.83333V11.1667C1.66675 13 2.50008 13.8333 4.33341 13.8333H5.51675C5.82508 13.8333 6.12508 13.9417 6.36675 14.1333L8.68341 16.0167C10.3167 17.4 12.5001 16.325 12.5001 14.2333V5.76667C12.5001 3.66667 10.3167 2.6 8.68341 3.98333L6.36675 5.86667C6.12508 6.05833 5.82508 6.16667 5.51675 6.16667H4.33341C2.50008 6.16667 1.66675 7 1.66675 8.83333Z" stroke="#4F4CD8" strokeWidth="1.5"/>
375
+ {!isMuted && (
376
+ <>
377
+ <path d="M15 6.66667C16.3834 8.30834 16.3834 11.7 15 13.3333" stroke="#4F4CD8" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round"/>
378
+ <path d="M16.825 4.58334C19.3917 7.59168 19.3917 12.4167 16.825 15.4167" stroke="#4F4CD8" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round"/>
379
+ </>
380
+ )}
381
+ </svg>
382
+ </button>
383
+
384
+ {/* Share button - fades in after counter animations (hidden for new users) */}
385
+ {!isNewUser && (
386
+ <button
387
+ className={`recap-story__floating-btn recap-story__share-btn ${isShareVisible ? 'recap-story__share-btn--visible' : ''}`}
388
+ onClick={() => {
389
+ // Call without await - the function handles sharing internally
390
+ // This preserves the user gesture chain for mobile Web Share API
391
+ captureAndShareSlide(slidesContainerRef.current, {
392
+ slideId: currentSlide.id,
393
+ businessName: recapData.businessName,
394
+ year: recapData.year ?? new Date().getFullYear(),
395
+ });
396
+ }}
397
+ aria-label="Share"
398
+ >
399
+ <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
400
+ <path d="M13.7 7.4165C16.7 7.67484 17.925 9.2165 17.925 12.5915V12.6998C17.925 16.4248 16.4333 17.9165 12.7083 17.9165H7.28332C3.55832 17.9165 2.06665 16.4248 2.06665 12.6998V12.5915C2.06665 9.2415 3.27498 7.69984 6.22498 7.42484" stroke="#4F4CD8" strokeLinecap="round" strokeLinejoin="round"/>
401
+ <path d="M10 12.4999V3.0166" stroke="#4F4CD8" strokeLinecap="round" strokeLinejoin="round"/>
402
+ <path d="M12.7916 4.87516L9.99998 2.0835L7.20831 4.87516" stroke="#4F4CD8" strokeLinecap="round" strokeLinejoin="round"/>
403
+ </svg>
404
+ <span className="recap-story__share-text">Share</span>
405
+ </button>
406
+ )}
407
+ </>
408
+ )}
333
409
  </div>
334
410
  );
335
411
  }
@@ -19,7 +19,7 @@
19
19
  width: 100%;
20
20
  height: 100%;
21
21
  background: transparent;
22
- border: 0.5px solid rgba(217, 217, 217, 0.3);
22
+ border: 0.5px solid rgba(55, 52, 211, 1);
23
23
  border-radius: 2px;
24
24
  overflow: hidden;
25
25
  position: relative;
@@ -31,7 +31,7 @@
31
31
  }
32
32
 
33
33
  .story-progress__bar.completed {
34
- background: linear-gradient(90deg, #FFFFFF 0%, #FFCC80 100%);
34
+ background: linear-gradient(90deg, #4F4CD8 0%, #2A2872 100%);
35
35
  border: none;
36
36
  }
37
37
 
@@ -41,7 +41,7 @@
41
41
  left: 0;
42
42
  width: 100%;
43
43
  height: 100%;
44
- background: linear-gradient(90deg, #FFFFFF 0%, #FFCC80 100%);
44
+ background: linear-gradient(90deg, #4F4CD8 0%, #2A2872 100%);
45
45
  transform-origin: left;
46
46
  transform: scaleX(0);
47
47
  }
@@ -23,7 +23,7 @@
23
23
  font-weight: 700;
24
24
  font-size: clamp(14px, 5.13vw, 20px);
25
25
  line-height: 1.2;
26
- background-image: linear-gradient(90deg, #FFFFFF 0%, #FFCC80 100%);
26
+ background-image: linear-gradient(90deg, #2724A7 0%, #4F4CD8 100%);
27
27
  -webkit-background-clip: text;
28
28
  -webkit-text-fill-color: transparent;
29
29
  background-clip: text;
@@ -44,3 +44,14 @@
44
44
  background-size: 100%;
45
45
  background-position: 0;
46
46
  }
47
+
48
+ /* Screenshot mode - solid color fallback for gradient text */
49
+ .screenshot-mode .header__badge {
50
+ -webkit-text-fill-color: #4F4CD8 !important;
51
+ color: #4F4CD8 !important;
52
+ }
53
+
54
+ .screenshot-mode .header--new-user .header__badge {
55
+ -webkit-text-fill-color: #FF9900 !important;
56
+ color: #FF9900 !important;
57
+ }
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import './Header.css';
3
- import loginLogo from '../assets/login-logo.svg';
4
- import slideLogo from '../assets/slide-logo.svg';
3
+ import loginLogo from '../assets/huxxle-login-blue-logo.svg';
4
+ import slideLogo from '../assets/huxxle-blue-logo.svg';
5
5
  import huxxleBlueLogo from '../assets/huxxle-blue-logo.svg';
6
6
 
7
7
  interface HeaderProps {
package/src/data/mock.ts CHANGED
@@ -9,15 +9,15 @@ export const mockRecapData: RecapData = {
9
9
  businessName: "RICHYO ENTERPRISES",
10
10
  days: 259,
11
11
  streak: 47,
12
- revenue: 22594,
12
+ revenue: 22594000,
13
13
  orders: 487,
14
14
  firstTimeBuyers: 234,
15
15
  repeatBuyers: 65,
16
16
  topCustomerName: "Micheal Scoffy",
17
- currency: "GBP",
17
+ currency: "NGN",
18
18
  year: 2025,
19
- introHeadline: "You Be New Face OOO....",
20
- introSubtitle: "Come back for 6 days time, we dey for you 😉",
19
+ introHeadline: "This Year You Carry Your Hustle For Head",
20
+ introSubtitle: "Make we look the numbers 🔥",
21
21
  topProducts: [
22
22
  {
23
23
  name: "Vanilla Yoghurt",
@@ -50,13 +50,25 @@ export const mockRecapData: RecapData = {
50
50
  "https://images.unsplash.com/photo-1447078806655-40579c2520d6?auto=format&fit=crop&w=400&q=80",
51
51
  },
52
52
  ],
53
+ productImages: [
54
+ "https://images.unsplash.com/photo-1447078806655-40579c2520d6?auto=format&fit=crop&w=400&q=80",
55
+ "https://images.unsplash.com/photo-1504674900247-0877df9cc836?auto=format&fit=crop&w=400&q=80",
56
+ "https://images.unsplash.com/photo-1506084868230-bb9d95c24759?auto=format&fit=crop&w=400&q=80",
57
+ "https://images.unsplash.com/photo-1447078806655-40579c2520d6?auto=format&fit=crop&w=400&q=80",
58
+ "https://images.unsplash.com/photo-1498837167922-ddd27525d352?auto=format&fit=crop&w=400&q=80",
59
+ "https://images.unsplash.com/photo-1470337458703-46ad1756a187?auto=format&fit=crop&w=400&q=80",
60
+ ],
53
61
  businessCategory: BUSINESS_CATEGORIES.THRIVING,
54
62
  busiestMonth: "Oct",
55
63
  videoUrl:
56
- "https://katajereassets.blob.core.windows.net/sp-list-assets/mocksite_walkthrough_a75c98dd-47ef-4f2c-a97c-ab2b3c3c97a5_2315a6b2d671d142f34e08cad43929c5.mp4",
64
+ "https://katajereassets.blob.core.windows.net/sp-list-assets/recap_4e5f6a7b-8c9d-0e1f-2a3b-4c5d6e7f8a9b_b5aac4492a8b453fbdbdbc8ed96f04f0.mp4",
57
65
  downloadUrl:
58
- "https://api.huxxle.com/api/download?fileUrl=https://katajereassets.blob.core.windows.net/sp-list-assets/mocksite_walkthrough_a75c98dd-47ef-4f2c-a97c-ab2b3c3c97a5_2315a6b2d671d142f34e08cad43929c5.mp4",
59
- isVideo: true
66
+ "https://api.huxxle.com/api/download?fileUrl=https://katajereassets.blob.core.windows.net/sp-list-assets/recap_4e5f6a7b-8c9d-0e1f-2a3b-4c5d6e7f8a9b_b5aac4492a8b453fbdbdbc8ed96f04f0.mp4",
67
+ isVideo: false,
68
+ websiteLink: "https://vendor.huxxle.com",
69
+ websiteVisits: 123400,
70
+ mostViewedProduct: "Vanilla Yoghurt",
71
+ mostViewedProductCount: 567,
60
72
  };
61
73
 
62
74
  // Slide durations in seconds - each slide can have its own timing
package/src/index.ts CHANGED
@@ -15,7 +15,6 @@
15
15
  export { default as RecapApp } from './RecapApp';
16
16
  export { default as RecapStory } from './RecapStory';
17
17
  export { default as StoryProgress } from './StoryProgress';
18
- export { default as FloatingFrames } from './FloatingFrames';
19
18
  export { default as Header } from './components/Header';
20
19
 
21
20
  // ============================================================================