@katajere/recap 1.0.13 → 2.0.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 (102) hide show
  1. package/dist/App.css +32 -12
  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 +2 -2
  6. package/dist/RecapStory.d.ts.map +1 -1
  7. package/dist/RecapStory.js +169 -81
  8. package/dist/StoryProgress.css +3 -3
  9. package/dist/StoryProgress.d.ts +3 -2
  10. package/dist/StoryProgress.d.ts.map +1 -1
  11. package/dist/StoryProgress.js +66 -12
  12. package/dist/assets/huxxle-login-blue-logo.svg +14 -0
  13. package/dist/assets/noisy-background.png +0 -0
  14. package/dist/assets/noisy-background.svg +23 -0
  15. package/dist/assets/search-icon.svg +4 -0
  16. package/dist/assets/share-button.svg +5 -0
  17. package/dist/assets/web-icon.png +0 -0
  18. package/dist/assets/web-icon.svg +14 -0
  19. package/dist/components/Header.css +12 -1
  20. package/dist/components/Header.js +2 -2
  21. package/dist/data/mock.d.ts +1 -1
  22. package/dist/data/mock.d.ts.map +1 -1
  23. package/dist/data/mock.js +36 -23
  24. package/dist/index.d.ts +0 -1
  25. package/dist/index.d.ts.map +1 -1
  26. package/dist/index.js +0 -1
  27. package/dist/slides/Slide10Final.css +73 -35
  28. package/dist/slides/Slide1Intro.css +204 -56
  29. package/dist/slides/Slide1Intro.d.ts +2 -1
  30. package/dist/slides/Slide1Intro.d.ts.map +1 -1
  31. package/dist/slides/Slide1Intro.js +41 -47
  32. package/dist/slides/Slide2Days.css +121 -34
  33. package/dist/slides/Slide2Days.d.ts +2 -1
  34. package/dist/slides/Slide2Days.d.ts.map +1 -1
  35. package/dist/slides/Slide2Days.js +45 -4
  36. package/dist/slides/Slide3Revenue.css +80 -38
  37. package/dist/slides/Slide3Revenue.d.ts.map +1 -1
  38. package/dist/slides/Slide3Revenue.js +31 -3
  39. package/dist/slides/Slide4Orders.css +93 -34
  40. package/dist/slides/Slide4Orders.d.ts +2 -1
  41. package/dist/slides/Slide4Orders.d.ts.map +1 -1
  42. package/dist/slides/Slide4Orders.js +45 -3
  43. package/dist/slides/Slide5Buyers.css +124 -67
  44. package/dist/slides/Slide5Buyers.d.ts +2 -1
  45. package/dist/slides/Slide5Buyers.d.ts.map +1 -1
  46. package/dist/slides/Slide5Buyers.js +43 -3
  47. package/dist/slides/Slide6Customer.css +294 -52
  48. package/dist/slides/Slide6Customer.d.ts +6 -3
  49. package/dist/slides/Slide6Customer.d.ts.map +1 -1
  50. package/dist/slides/Slide6Customer.js +25 -4
  51. package/dist/slides/Slide7Products.css +8 -7
  52. package/dist/slides/Slide7Products.js +3 -3
  53. package/dist/slides/Slide8Months.css +6 -6
  54. package/dist/slides/Slide9Year.css +4 -2
  55. package/dist/slides/Slide9Year.d.ts +2 -1
  56. package/dist/slides/Slide9Year.d.ts.map +1 -1
  57. package/dist/slides/Slide9Year.js +23 -2
  58. package/dist/types.d.ts +7 -0
  59. package/dist/types.d.ts.map +1 -1
  60. package/dist/utils/slideScreenshot.d.ts +27 -0
  61. package/dist/utils/slideScreenshot.d.ts.map +1 -0
  62. package/dist/utils/slideScreenshot.js +274 -0
  63. package/package.json +2 -1
  64. package/src/App.css +32 -12
  65. package/src/LoginScreen.css +22 -21
  66. package/src/LoginScreen.tsx +1 -1
  67. package/src/OtpScreen.css +20 -17
  68. package/src/OtpScreen.tsx +1 -1
  69. package/src/RecapStory.css +148 -0
  70. package/src/RecapStory.tsx +249 -118
  71. package/src/StoryProgress.css +3 -3
  72. package/src/StoryProgress.tsx +96 -21
  73. package/src/components/Header.css +12 -1
  74. package/src/components/Header.tsx +2 -2
  75. package/src/data/mock.ts +44 -24
  76. package/src/index.ts +0 -1
  77. package/src/slides/Slide10Final.css +73 -35
  78. package/src/slides/Slide1Intro.css +204 -56
  79. package/src/slides/Slide1Intro.tsx +89 -81
  80. package/src/slides/Slide2Days.css +121 -34
  81. package/src/slides/Slide2Days.tsx +67 -19
  82. package/src/slides/Slide3Revenue.css +80 -38
  83. package/src/slides/Slide3Revenue.tsx +43 -6
  84. package/src/slides/Slide4Orders.css +93 -34
  85. package/src/slides/Slide4Orders.tsx +71 -10
  86. package/src/slides/Slide5Buyers.css +124 -67
  87. package/src/slides/Slide5Buyers.tsx +97 -38
  88. package/src/slides/Slide6Customer.css +294 -52
  89. package/src/slides/Slide6Customer.tsx +68 -10
  90. package/src/slides/Slide7Products.css +8 -7
  91. package/src/slides/Slide7Products.tsx +3 -3
  92. package/src/slides/Slide8Months.css +6 -6
  93. package/src/slides/Slide9Year.css +4 -2
  94. package/src/slides/Slide9Year.tsx +35 -7
  95. package/src/types.ts +7 -0
  96. package/src/utils/slideScreenshot.ts +324 -0
  97. package/dist/FloatingFrames.css +0 -55
  98. package/dist/FloatingFrames.d.ts +0 -11
  99. package/dist/FloatingFrames.d.ts.map +0 -1
  100. package/dist/FloatingFrames.js +0 -12
  101. package/src/FloatingFrames.css +0 -55
  102. package/src/FloatingFrames.tsx +0 -27
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import React, { useLayoutEffect, useRef, useState } from 'react';
2
+ import React from 'react';
3
3
  import { motion } from 'framer-motion';
4
4
  import { delayedFadeIn } from '../utils';
5
5
  import { BUSINESS_CATEGORIES } from '../types';
@@ -8,61 +8,55 @@ import './Slide1Intro.css';
8
8
  /**
9
9
  * Slide1Intro - Identity slide with business name and category-based messaging
10
10
  */
11
- function Slide1Intro({ businessName, businessCategory, introHeadline, introSubtitle, onDurationCalculated }) {
11
+ function Slide1Intro({ businessName, businessCategory, introHeadline, introSubtitle, onDurationCalculated, frameImages }) {
12
12
  // Dynamic messaging: use props if provided, otherwise fall back to recapCopy
13
13
  const copy = recapCopy[businessCategory] ?? recapCopy[BUSINESS_CATEGORIES.THRIVING];
14
14
  const headline = introHeadline ?? copy.introHeadline;
15
15
  const subtitle = introSubtitle ?? copy.introSubtitle;
16
- const [brandWidth, setBrandWidth] = useState(0);
17
- const [headlineWidth, setHeadlineWidth] = useState(0);
18
- const brandRef = useRef(null);
19
- const headlineRef = useRef(null);
20
- useLayoutEffect(() => {
21
- if (brandRef.current) {
22
- // Add extra buffer to account for hidden characters (approximately 3 character widths)
23
- const extraBuffer = brandRef.current.scrollWidth * 0.25; // ~25% extra space
24
- setBrandWidth(brandRef.current.scrollWidth + extraBuffer);
25
- }
26
- }, [businessName]);
27
- useLayoutEffect(() => {
28
- if (headlineRef.current) {
29
- setHeadlineWidth(headlineRef.current.scrollWidth);
30
- }
31
- }, [headline]);
32
- // Get actual viewport width for calculation
33
- const viewportWidth = typeof window !== 'undefined' ? window.innerWidth : 390;
34
- const containerWidth = Math.min(viewportWidth, 430); // max-width from App.css
35
- const sidePadding = Math.max(16, containerWidth * 0.041); // clamp(16px, 4.1vw, 20px)
36
- const availableWidth = containerWidth - (sidePadding * 2);
37
- const brandShift = Math.max(brandWidth - availableWidth, 0);
38
- const headlineShift = Math.max(headlineWidth - availableWidth, 0);
39
- // Calculate dynamic slide duration based on brand name length
40
- // Tested with real data: 26-75 character business names
41
- const baseAnimationDuration = 6; // seconds minimum for short names
42
- const pixelsPerSecond = 65; // animation speed (constant across all names)
43
- // Calculate animation duration for brand name
44
- const brandAnimationDuration = brandShift > 0
45
- ? Math.max(baseAnimationDuration, brandShift / pixelsPerSecond)
46
- : baseAnimationDuration;
47
- // Calculate animation duration for headline
48
- const headlineAnimationDuration = headlineShift > 0
49
- ? Math.max(baseAnimationDuration, headlineShift / pixelsPerSecond)
50
- : baseAnimationDuration;
51
- // Use the longer of the two animations, plus buffer time
52
- const dynamicSlideDuration = Math.max(brandAnimationDuration, headlineAnimationDuration) + 2; // +2 second buffer for user to read the final position
53
- // Notify parent of calculated duration
54
- React.useEffect(() => {
55
- if (onDurationCalculated && brandWidth > 0 && headlineWidth > 0) {
56
- onDurationCalculated(dynamicSlideDuration);
57
- }
58
- }, [dynamicSlideDuration, brandWidth, headlineWidth, onDurationCalculated]);
59
- const slideClass = `slide1-intro slide1-intro--${copy.introVariant}`;
16
+ const slideClass = `slide1-intro slide1-intro--${copy.introVariant} slide1-intro--words-${Math.min(businessName.split(' ').length, 3)}`;
60
17
  const isNewUser = businessCategory === BUSINESS_CATEGORIES.NEW_USER;
61
18
  const handleContinue = () => {
62
19
  if (typeof window !== 'undefined') {
63
20
  window.location.href = 'https://vendor.huxxle.com';
64
21
  }
65
22
  };
66
- return (_jsxs("div", { className: slideClass, children: [_jsxs("div", { className: "slide1-intro__brand-container", children: [_jsx("div", { className: "slide1-intro__bg-text", children: "HEY" }), _jsx(motion.div, { className: "slide1-intro__brand", ref: brandRef, animate: { x: [0, -brandShift] }, transition: { duration: brandAnimationDuration, repeat: 0, ease: 'linear' }, children: businessName })] }), _jsxs(motion.div, { className: "slide1-intro__frames-top", animate: { x: [-30, 30] }, transition: { duration: 15, repeat: Infinity, repeatType: 'reverse', ease: 'linear' }, children: [_jsx("div", { className: "frame-rect" }), _jsx("div", { className: "frame-rect" }), _jsx("div", { className: "frame-rect" })] }), _jsxs(motion.div, { className: "slide1-intro__text", variants: delayedFadeIn(0.5), initial: "initial", animate: "animate", children: [_jsx(motion.h2, { className: "slide1-intro__headline", ref: headlineRef, animate: { x: [0, -headlineShift] }, transition: { duration: headlineAnimationDuration, repeat: 1, repeatType: 'reverse', ease: 'linear' }, children: headline }), _jsx("p", { className: "slide1-intro__subtitle", children: subtitle })] }), _jsxs(motion.div, { className: "slide1-intro__frames-bottom", animate: { x: [-30, 30] }, transition: { duration: 15, repeat: Infinity, repeatType: 'reverse', ease: 'linear' }, children: [_jsx("div", { className: "frame-rect" }), _jsx("div", { className: "frame-rect" }), _jsx("div", { className: "frame-rect" })] }), isNewUser && (_jsx(motion.button, { className: "slide1-intro__cta-button", onClick: handleContinue, initial: { y: 100, opacity: 0 }, animate: { y: 0, opacity: 1 }, transition: { duration: 0.8, delay: 2.0, ease: 'easeOut' }, children: "Continue on Huxxle" }))] }));
23
+ const frameImagePool = React.useMemo(() => {
24
+ return frameImages && frameImages.length > 0 ? frameImages : [];
25
+ }, [frameImages]);
26
+ const frameSources = React.useMemo(() => {
27
+ if (!frameImagePool.length) {
28
+ return [];
29
+ }
30
+ return Array.from({ length: 6 }, () => frameImagePool[Math.floor(Math.random() * frameImagePool.length)]);
31
+ }, [frameImagePool]);
32
+ const getFrameStyle = (index) => {
33
+ if (!frameSources.length) {
34
+ return undefined;
35
+ }
36
+ const image = frameSources[index % frameSources.length];
37
+ if (!image) {
38
+ return undefined;
39
+ }
40
+ return {
41
+ backgroundImage: `url('${image}')`,
42
+ backgroundSize: 'cover',
43
+ backgroundPosition: 'center',
44
+ };
45
+ };
46
+ return (_jsxs("div", { className: slideClass, children: [_jsxs("div", { className: "slide1-intro__brand-container", children: [_jsx("div", { className: "slide1-intro__bg-text", children: "HEY" }), _jsx("div", { className: `slide1-intro__brand slide1-intro__brand--words-${Math.min(businessName.split(' ').length, 3)}`, children: businessName.split(' ').map((word, wordIndex, wordsArray) => {
47
+ // Calculate character offset for stagger delay (include space characters)
48
+ const charOffset = wordsArray
49
+ .slice(0, wordIndex)
50
+ .reduce((acc, w, i) => acc + w.length + (i < wordIndex ? 1 : 0), 0);
51
+ return (_jsxs(React.Fragment, { children: [_jsx("span", { className: "slide1-intro__word", children: word.split('').map((char, charIndex) => (_jsx(motion.span, { initial: { opacity: 0, y: 20, rotateX: -90 }, animate: {
52
+ opacity: 1,
53
+ y: 0,
54
+ rotateX: 0,
55
+ }, transition: {
56
+ duration: 0.5,
57
+ delay: (charOffset + charIndex) * 0.03,
58
+ ease: [0.34, 1.56, 0.64, 1],
59
+ }, style: { display: 'inline-block' }, children: char }, charIndex))) }), wordIndex < wordsArray.length - 1 && (_jsx(motion.span, { initial: { opacity: 0 }, animate: { opacity: 1 }, transition: { duration: 0.3, delay: (charOffset + word.length) * 0.03 }, style: { display: 'inline-block', width: '0.3em' }, children: ' ' }))] }, wordIndex));
60
+ }) })] }), _jsx(motion.div, { className: "slide1-intro__frames-top", animate: { x: [-30, 30] }, transition: { duration: 15, repeat: Infinity, repeatType: 'reverse', ease: 'linear' }, children: Array.from({ length: 3 }).map((_, index) => (_jsx("div", { className: "frame-rect", style: getFrameStyle(index) }, `top-rect-${index}`))) }), _jsxs(motion.div, { className: "slide1-intro__text", variants: delayedFadeIn(0.5), initial: "initial", animate: "animate", children: [_jsx("h2", { className: "slide1-intro__headline", children: headline }), _jsx("p", { className: "slide1-intro__subtitle", children: subtitle })] }), _jsx(motion.div, { className: "slide1-intro__frames-bottom", animate: { x: [-30, 30] }, transition: { duration: 15, repeat: Infinity, repeatType: 'reverse', ease: 'linear' }, children: Array.from({ length: 3 }).map((_, index) => (_jsx("div", { className: "frame-rect", style: getFrameStyle(index + 3) }, `bottom-rect-${index}`))) }), isNewUser && (_jsx(motion.button, { className: "slide1-intro__cta-button", onClick: handleContinue, initial: { y: 100, opacity: 0 }, animate: { y: 0, opacity: 1 }, transition: { duration: 0.8, delay: 2.0, ease: 'easeOut' }, children: "Continue on Huxxle" }))] }));
67
61
  }
68
62
  export default Slide1Intro;
@@ -11,14 +11,12 @@
11
11
  .slide2-days__heading {
12
12
  position: absolute;
13
13
  width: 91.79%;
14
- /* left: 4.1%;
15
- top: 10.66%; */
16
14
  font-family: 'Lora', serif;
17
15
  font-style: normal;
18
16
  font-weight: 400;
19
- color: white;
20
- /* margin: 0 0 4.74% 0; */
21
- margin: calc(108px + env(safe-area-inset-top)) calc(16px + env(safe-area-inset-left)) 0 calc(16px + env(safe-area-inset-right));
17
+ font-size: clamp(14px, 4.1vw, 16px);
18
+ color: #3734D3;
19
+ margin: calc(128px + env(safe-area-inset-top)) calc(16px + env(safe-area-inset-left)) 0 calc(16px + env(safe-area-inset-right));
22
20
  text-align: left;
23
21
  z-index: 3;
24
22
  }
@@ -33,10 +31,8 @@
33
31
  gap: clamp(8px, 3.08vw, 12px);
34
32
  position: absolute;
35
33
  width: 100%;
36
- /* height: 28.4vh; */
37
34
  left: 0;
38
- top: 21.68vh;
39
- /* margin: calc(183px + env(safe-area-inset-top)) calc(16px + env(safe-area-inset-left)) 0 calc(16px + env(safe-area-inset-right)); */
35
+ top: calc(50% - 240px/2 - 143px);
40
36
  z-index: 2;
41
37
  }
42
38
 
@@ -69,13 +65,9 @@
69
65
  width: 100%;
70
66
  font-family: 'Lora', serif;
71
67
  font-style: normal;
72
- font-weight: 500;
73
- font-size: 2.8vh;
74
- /* line-height: 72px; */
75
- background: linear-gradient(90deg, #FFFFFF 0%, #FFCC80 100%);
76
- -webkit-background-clip: text;
77
- -webkit-text-fill-color: transparent;
78
- background-clip: text;
68
+ font-weight: 600;
69
+ font-size: clamp(14px, 4.1vw, 16px);
70
+ color: #3734D3;
79
71
  margin: 0;
80
72
  flex: none;
81
73
  order: 0;
@@ -102,8 +94,8 @@
102
94
  font-style: normal;
103
95
  font-weight: 700;
104
96
  font-size: 10.37vh;
105
- /* line-height: 115px; */
106
- background: linear-gradient(90deg, #FFFFFF 0%, #FFCC80 100%);
97
+ /* color: var(--primary-blue); */
98
+ background: var(--bg-gradient);
107
99
  -webkit-background-clip: text;
108
100
  -webkit-text-fill-color: transparent;
109
101
  background-clip: text;
@@ -120,11 +112,7 @@
120
112
  font-style: normal;
121
113
  font-weight: 400;
122
114
  font-size: clamp(14px, 4.1vw, 16px);
123
- /* line-height: 72px; */
124
- background: linear-gradient(90deg, #FFFFFF 0%, #FFCC80 100%);
125
- -webkit-background-clip: text;
126
- -webkit-text-fill-color: transparent;
127
- background-clip: text;
115
+ color: #3734D3;
128
116
  margin: 0;
129
117
  flex: none;
130
118
  order: 1;
@@ -138,9 +126,8 @@
138
126
  width: 74.1%;
139
127
  height: 0;
140
128
  left: 25.9%;
141
- top: 79.86vh;
142
- opacity: 0.4;
143
- border: 0.24vh solid #FFFFFF;
129
+ top: 77vh;
130
+ border: 2px solid #E6E5F9;
144
131
  transform-origin: left;
145
132
  z-index: 3;
146
133
  }
@@ -158,11 +145,12 @@
158
145
  flex-direction: column;
159
146
  align-items: flex-end;
160
147
  padding: 0;
148
+ /* padding-right: 70px; Avoid floating Share button */
161
149
  /* gap: 40px; */
162
150
  position: absolute;
163
151
  width: 91.79%;
164
152
  left: 4.1%;
165
- top: 82.23vh;
153
+ top: 79.5vh;
166
154
  z-index: 3;
167
155
  }
168
156
 
@@ -179,12 +167,10 @@
179
167
  font-style: normal;
180
168
  font-weight: 700;
181
169
  font-size: 6.64vh;
182
- /* line-height: 115px; */
183
170
  text-align: right;
184
- background: linear-gradient(90deg, #FFFFFF 0%, #FFCC80 100%);
185
- -webkit-background-clip: text;
186
- -webkit-text-fill-color: transparent;
187
- background-clip: text;
171
+ color: #FFFFFF;
172
+ -webkit-text-stroke: 1.5px var(--primary-blue);
173
+ paint-order: stroke fill;
188
174
  margin: 0;
189
175
  flex: none;
190
176
  order: 0;
@@ -198,12 +184,113 @@
198
184
  font-style: normal;
199
185
  font-weight: 400;
200
186
  font-size: clamp(14px, 4.1vw, 16px);
201
- /* line-height: 72px; */
202
187
  text-align: right;
203
188
  flex: none;
204
189
  order: 1;
205
190
  align-self: stretch;
206
191
  flex-grow: 0;
207
- color: white;
208
- margin: 0 0 4.74% 0;
192
+ color: #3734D3;
193
+ margin: 0;
194
+ }
195
+
196
+ /* Media queries for landscape and short screens */
197
+ @media (max-height: 720px), (orientation: landscape) {
198
+ .slide2-days__heading {
199
+ margin-top: calc(100px + env(safe-area-inset-top));
200
+ font-size: clamp(12px, 3.5vw, 14px);
201
+ }
202
+
203
+ .slide2-days__frames .frame-rect {
204
+ height: 24dvh;
205
+ }
206
+
207
+ .stats-number {
208
+ font-size: 8dvh;
209
+ }
210
+
211
+ .streak-number {
212
+ font-size: 5.5dvh;
213
+ }
214
+ }
215
+
216
+ /* Small/Short screens - handles browser chrome taking space */
217
+ @media (max-height: 700px) {
218
+ .slide2-days__heading {
219
+ margin-top: calc(84px + env(safe-area-inset-top));
220
+ }
221
+
222
+ .slide2-days__frames {
223
+ top: calc(50% - 180px/2 - 110px);
224
+ }
225
+
226
+ .slide2-days__frames .frame-rect {
227
+ height: 22dvh;
228
+ width: clamp(120px, 40vw, 160px);
229
+ }
230
+
231
+ .slide2-days__stats-section {
232
+ margin-top: calc(50dvh + env(safe-area-inset-top));
233
+ }
234
+
235
+ .stats-number {
236
+ font-size: 7dvh;
237
+ }
238
+
239
+ .slide2-days__divider {
240
+ top: 70dvh;
241
+ }
242
+
243
+ .slide2-days__streak-section {
244
+ top: 72.5dvh;
245
+ }
246
+
247
+ .streak-number {
248
+ font-size: 5dvh;
249
+ }
250
+ }
251
+
252
+ /* Extra short screens (under 600px) - more aggressive adjustments */
253
+ @media (max-height: 600px) {
254
+ .slide2-days__heading {
255
+ margin-top: calc(68px + env(safe-area-inset-top));
256
+ font-size: clamp(11px, 3vw, 13px);
257
+ }
258
+
259
+ .slide2-days__frames {
260
+ top: calc(50% - 160px/2 - 90px);
261
+ }
262
+
263
+ .slide2-days__frames .frame-rect {
264
+ height: 18dvh;
265
+ width: clamp(100px, 35vw, 140px);
266
+ }
267
+
268
+ .slide2-days__stats-section {
269
+ margin-top: calc(46dvh + env(safe-area-inset-top));
270
+ }
271
+
272
+ .stats-number {
273
+ font-size: 6dvh;
274
+ }
275
+
276
+ .stats-label,
277
+ .stats-sublabel {
278
+ font-size: clamp(11px, 3vw, 13px);
279
+ }
280
+
281
+ .slide2-days__divider {
282
+ top: 66dvh;
283
+ }
284
+
285
+ .slide2-days__streak-section {
286
+ top: 68.5dvh;
287
+ }
288
+
289
+ .streak-number {
290
+ font-size: 4.5dvh;
291
+ }
292
+
293
+ .streak-label {
294
+ font-size: clamp(11px, 3vw, 13px);
295
+ }
209
296
  }
@@ -2,10 +2,11 @@ import './Slide2Days.css';
2
2
  interface Slide2DaysProps {
3
3
  days: number;
4
4
  streak: number;
5
+ frameImages?: string[];
5
6
  }
6
7
  /**
7
8
  * Slide2Days - Days active and streak statistics
8
9
  */
9
- declare function Slide2Days({ days, streak }: Slide2DaysProps): import("react/jsx-runtime").JSX.Element;
10
+ declare function Slide2Days({ days, streak, frameImages }: Slide2DaysProps): import("react/jsx-runtime").JSX.Element;
10
11
  export default Slide2Days;
11
12
  //# sourceMappingURL=Slide2Days.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Slide2Days.d.ts","sourceRoot":"","sources":["../../src/slides/Slide2Days.tsx"],"names":[],"mappings":"AAGA,OAAO,kBAAkB,CAAC;AAE1B,UAAU,eAAe;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,iBAAS,UAAU,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,eAAe,2CA4EpD;AAED,eAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"Slide2Days.d.ts","sourceRoot":"","sources":["../../src/slides/Slide2Days.tsx"],"names":[],"mappings":"AAGA,OAAO,kBAAkB,CAAC;AAE1B,UAAU,eAAe;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;CACxB;AAsBD;;GAEG;AACH,iBAAS,UAAU,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,EAAE,eAAe,2CAuGjE;AAED,eAAe,UAAU,CAAC"}
@@ -1,11 +1,52 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { motion } from 'framer-motion';
3
- import { formatNumber } from '../utils';
2
+ import React from 'react';
3
+ import { motion, useMotionValue, useTransform, animate } from 'framer-motion';
4
4
  import './Slide2Days.css';
5
+ /**
6
+ * Custom hook for number counter animation
7
+ */
8
+ function useCountAnimation(target, duration = 2, delay = 0) {
9
+ const count = useMotionValue(0);
10
+ const rounded = useTransform(count, (latest) => Math.round(latest));
11
+ React.useEffect(() => {
12
+ const controls = animate(count, target, {
13
+ duration,
14
+ delay,
15
+ ease: 'easeOut',
16
+ });
17
+ return controls.stop;
18
+ }, [count, target, duration, delay]);
19
+ return rounded;
20
+ }
5
21
  /**
6
22
  * Slide2Days - Days active and streak statistics
7
23
  */
8
- function Slide2Days({ days, streak }) {
9
- return (_jsxs("div", { className: "slide2-days", children: [_jsx(motion.div, { className: "slide2-days__heading", initial: { opacity: 0, y: -20 }, animate: { opacity: 1, y: 0 }, transition: { duration: 0.6, ease: 'easeOut' }, children: "Make we look the numbers \uD83D\uDD25" }), _jsxs(motion.div, { className: "slide2-days__frames", initial: { opacity: 0, x: -50 }, animate: { opacity: 1, x: 0 }, transition: { duration: 0.8, delay: 0.2 }, children: [_jsx(motion.div, { className: "frame-rect", animate: { x: [-20, 20] }, transition: { duration: 4, repeat: Infinity, repeatType: 'reverse', ease: 'linear' } }), _jsx(motion.div, { className: "frame-rect", animate: { x: [-20, 20] }, transition: { duration: 4, repeat: Infinity, repeatType: 'reverse', ease: 'linear' } }), _jsx(motion.div, { className: "frame-rect", animate: { x: [-20, 20] }, transition: { duration: 4, repeat: Infinity, repeatType: 'reverse', ease: 'linear' } })] }), _jsxs(motion.div, { className: "slide2-days__stats-section", initial: { opacity: 0, y: 30 }, animate: { opacity: 1, y: 0 }, transition: { duration: 0.7, delay: 0.4 }, children: [_jsx("p", { className: "stats-label", children: "You don spend over" }), _jsxs(motion.div, { className: "stats-container", initial: { opacity: 0, scale: 0.9 }, animate: { opacity: 1, scale: 1 }, transition: { duration: 0.6, delay: 0.6 }, children: [_jsx("div", { className: "stats-number", children: formatNumber(days) }), _jsx("p", { className: "stats-sublabel", children: "days dey hustle with Huxxle" })] })] }), _jsx(motion.div, { className: "slide2-days__divider", initial: { scaleX: 0 }, animate: { scaleX: 1 }, transition: { duration: 0.8, delay: 0.9, ease: 'easeInOut' } }), _jsxs(motion.div, { className: "slide2-days__streak-section", initial: { opacity: 0, y: 20 }, animate: { opacity: 1, y: 0 }, transition: { duration: 0.6, delay: 1.1 }, children: [_jsx("div", { className: "streak-number", children: formatNumber(streak) }), _jsx("p", { className: "streak-label", children: "day streak, You no dey play oh \uD83E\uDD2F" })] })] }));
24
+ function Slide2Days({ days, streak, frameImages }) {
25
+ const daysCount = useCountAnimation(days, 1.6, 0.4); // 1.6s + 0.4s delay = 2s total
26
+ const streakCount = useCountAnimation(streak, 1.2, 0.8); // 1.2s + 0.8s delay = 2s total
27
+ const frameImagePool = React.useMemo(() => {
28
+ return frameImages && frameImages.length > 0 ? frameImages : [];
29
+ }, [frameImages]);
30
+ const frameSources = React.useMemo(() => {
31
+ if (!frameImagePool.length) {
32
+ return [];
33
+ }
34
+ return Array.from({ length: 3 }, () => frameImagePool[Math.floor(Math.random() * frameImagePool.length)]);
35
+ }, [frameImagePool]);
36
+ const getFrameStyle = (index) => {
37
+ if (!frameSources.length) {
38
+ return undefined;
39
+ }
40
+ const image = frameSources[index % frameSources.length];
41
+ if (!image) {
42
+ return undefined;
43
+ }
44
+ return {
45
+ backgroundImage: `url('${image}')`,
46
+ backgroundSize: 'cover',
47
+ backgroundPosition: 'center',
48
+ };
49
+ };
50
+ return (_jsxs("div", { className: "slide2-days", children: [_jsx(motion.div, { className: "slide2-days__heading", initial: { opacity: 0, y: -20 }, animate: { opacity: 1, y: 0 }, transition: { duration: 0.6, ease: 'easeOut' }, children: "Make we look the numbers \uD83D\uDD25" }), _jsx(motion.div, { className: "slide2-days__frames", initial: { opacity: 0, x: -50 }, animate: { opacity: 1, x: 0 }, transition: { duration: 0.8, delay: 0.2 }, children: Array.from({ length: 3 }).map((_, index) => (_jsx(motion.div, { className: "frame-rect", style: getFrameStyle(index), animate: { x: [-20, 20] }, transition: { duration: 4, repeat: Infinity, repeatType: 'reverse', ease: 'linear' } }, `frame-${index}-${frameSources[index] ?? 'no-image'}`))) }), _jsxs(motion.div, { className: "slide2-days__stats-section", initial: { opacity: 0, y: 30 }, animate: { opacity: 1, y: 0 }, transition: { duration: 0.7, delay: 0.4 }, children: [_jsx("p", { className: "stats-label", children: "You don spend over" }), _jsxs(motion.div, { className: "stats-container", initial: { opacity: 0, scale: 0.9 }, animate: { opacity: 1, scale: 1 }, transition: { duration: 0.6, delay: 0.6 }, children: [_jsx(motion.div, { className: "stats-number", children: daysCount }), _jsx("p", { className: "stats-sublabel", children: "days dey hustle with Huxxle" })] })] }), _jsx(motion.div, { className: "slide2-days__divider", initial: { scaleX: 0 }, animate: { scaleX: 1 }, transition: { duration: 0.8, delay: 0.9, ease: 'easeInOut' } }), _jsxs(motion.div, { className: "slide2-days__streak-section", initial: { opacity: 0, y: 20 }, animate: { opacity: 1, y: 0 }, transition: { duration: 0.6, delay: 1.1 }, children: [_jsx(motion.div, { className: "streak-number", children: streakCount }), _jsx("p", { className: "streak-label", children: "day streak, You no dey play oh \uD83E\uDD2F" })] })] }));
10
51
  }
11
52
  export default Slide2Days;
@@ -1,30 +1,27 @@
1
+ /* Slide3Revenue - Figma exact specifications with blue/purple scheme */
2
+
1
3
  .slide3-revenue {
2
4
  position: relative;
3
5
  width: 100%;
4
- min-height: 100%;
6
+ height: 100%;
5
7
  overflow: hidden;
6
8
  display: flex;
7
9
  align-items: center;
8
10
  justify-content: center;
9
- padding: 9.48% 6.15% 7.11%;
10
- }
11
-
12
- @media (max-height: 720px), (orientation: landscape) {
13
- .slide3-revenue {
14
- padding: clamp(24px, 5vh, 40px) 6.15% clamp(24px, 4vh, 32px);
15
- }
16
11
  }
17
12
 
18
13
  .slide3-revenue__overlay {
19
14
  position: absolute;
20
- inset: 0;
15
+ width: 100%;
16
+ height: 100%;
17
+ left: 0;
18
+ top: 0;
21
19
  background-size: cover;
22
20
  background-repeat: no-repeat;
23
21
  background-position: center;
24
- opacity: 0.05;
25
- mix-blend-mode: screen;
22
+ opacity: 0.1;
26
23
  z-index: 0;
27
- filter: brightness(0.75);
24
+ pointer-events: none;
28
25
  }
29
26
 
30
27
  .slide3-revenue__content {
@@ -35,55 +32,100 @@
35
32
  flex-direction: column;
36
33
  align-items: center;
37
34
  justify-content: center;
38
- gap: 2.84vh;
35
+ gap: clamp(12px, 2dvh, 24px);
39
36
  text-align: center;
40
- }
41
-
42
- .gradient-text {
43
- background: linear-gradient(90deg, #FFFFFF 0%, #FFCC80 100%);
44
- -webkit-background-clip: text;
45
- -webkit-text-fill-color: transparent;
46
- background-clip: text;
47
- color: transparent;
37
+ padding: 0 calc(16px + env(safe-area-inset-left)) 0 calc(16px + env(safe-area-inset-right));
48
38
  }
49
39
 
50
40
  .slide3-revenue__title {
51
- font-family: 'Lora', 'Georgia', serif;
52
- font-size: 2.84vh;
53
- font-weight: 500;
54
- letter-spacing: 0.04em;
41
+ font-family: 'Lora', serif;
42
+ font-style: normal;
43
+ font-weight: 600;
44
+ font-size: clamp(16px, 4.1vw, 20px);
45
+ line-height: 1.25;
46
+ color: #3734D3;
55
47
  margin: 0;
56
48
  }
57
49
 
58
50
  .slide3-revenue__amount {
59
- font-family: 'Lora', 'Georgia', serif;
60
- font-size: 7.58vh;
51
+ font-family: 'Lora', serif;
52
+ font-style: normal;
61
53
  font-weight: 700;
54
+ font-size: clamp(40px, 12vh, 60px);
62
55
  line-height: 1;
56
+ /* color: #4F4CD8; */
57
+ background: var(--bg-gradient);
58
+ -webkit-background-clip: text;
59
+ -webkit-text-fill-color: transparent;
60
+ background-clip: text;
63
61
  margin: 0;
62
+ display: flex;
63
+ align-items: baseline;
64
+ justify-content: center;
64
65
  }
65
66
 
66
67
  .slide3-revenue__subline {
67
- font-family: 'Lora', 'Georgia', serif;
68
- font-size: 1.9vh;
68
+ font-family: 'Lora', serif;
69
+ font-style: normal;
69
70
  font-weight: 400;
71
+ font-size: clamp(14px, 4.1vw, 16px);
72
+ line-height: 1.5;
73
+ color: #3734D3;
70
74
  margin: 0;
71
75
  }
72
76
 
73
77
  .slide3-revenue__footer {
74
78
  position: absolute;
75
- bottom: 4.74%;
76
- left: 4.1%;
77
- transform: translateX(0);
78
- font-family: 'Lora', 'Georgia', serif;
79
- font-size: clamp(14px, 4.1vw, 16px);
79
+ bottom: calc(100px + env(safe-area-inset-bottom));
80
+ left: 0;
81
+ right: 0;
82
+ padding: 0 calc(16px + env(safe-area-inset-left)) 0 calc(16px + env(safe-area-inset-right));
83
+ font-family: 'Lora', serif;
84
+ font-style: normal;
80
85
  font-weight: 400;
81
- letter-spacing: 0.03em;
86
+ font-size: clamp(14px, 4.1vw, 16px);
87
+ line-height: 1.5;
88
+ color: #3734D3;
89
+ text-align: left;
82
90
  z-index: 1;
83
91
  }
84
92
 
85
- @media (max-width: 480px) {
86
- .slide3-revenue {
87
- padding: 7.11% 4.1% 5.69%;
93
+ /* Media queries for landscape and short screens */
94
+ @media (max-height: 720px), (orientation: landscape) {
95
+ .slide3-revenue__amount {
96
+ font-size: clamp(36px, 10dvh, 60px);
97
+ }
98
+
99
+ .slide3-revenue__title {
100
+ font-size: clamp(14px, 3.5vw, 18px);
101
+ }
102
+ }
103
+
104
+ /* Small/Short screens - handles browser chrome taking space */
105
+ @media (max-height: 700px) {
106
+ .slide3-revenue__amount {
107
+ font-size: clamp(32px, 9dvh, 56px);
108
+ }
109
+
110
+ .slide3-revenue__footer {
111
+ bottom: calc(90px + env(safe-area-inset-bottom));
112
+ font-size: clamp(12px, 3.5vw, 14px);
113
+ }
114
+ }
115
+
116
+ /* Extra short screens (under 600px) - more aggressive adjustments */
117
+ @media (max-height: 600px) {
118
+ .slide3-revenue__amount {
119
+ font-size: clamp(28px, 8dvh, 52px);
120
+ }
121
+
122
+ .slide3-revenue__title,
123
+ .slide3-revenue__subline {
124
+ font-size: clamp(12px, 3vw, 14px);
125
+ }
126
+
127
+ .slide3-revenue__footer {
128
+ bottom: calc(80px + env(safe-area-inset-bottom));
129
+ font-size: clamp(11px, 3vw, 13px);
88
130
  }
89
131
  }
@@ -1 +1 @@
1
- {"version":3,"file":"Slide3Revenue.d.ts","sourceRoot":"","sources":["../../src/slides/Slide3Revenue.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAuB,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAEjE,OAAO,qBAAqB,CAAC;AAI7B,UAAU,kBAAkB;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,iBAAS,aAAa,CAAC,EAAE,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,EAAE,kBAAkB,2CAwDjF;AAED,eAAe,aAAa,CAAC"}
1
+ {"version":3,"file":"Slide3Revenue.d.ts","sourceRoot":"","sources":["../../src/slides/Slide3Revenue.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAuB,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAEjE,OAAO,qBAAqB,CAAC;AAI7B,UAAU,kBAAkB;IAC1B,OAAO,EAAE,MAAM,CAAC;IAChB,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAwBD;;GAEG;AACH,iBAAS,aAAa,CAAC,EAAE,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,EAAE,kBAAkB,2CAuEjF;AAED,eAAe,aAAa,CAAC"}
@@ -1,16 +1,44 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { motion } from 'framer-motion';
3
- import { formatCurrency } from '../utils';
2
+ import React from 'react';
3
+ import { motion, useMotionValue, useTransform, animate } from 'framer-motion';
4
4
  import { BUSINESS_CATEGORIES } from '../types';
5
5
  import { recapCopy } from '../data/recapCopy';
6
6
  import './Slide3Revenue.css';
7
7
  import moneyRainGif from '../assets/raining-money.gif';
8
+ /**
9
+ * Custom hook for number counter animation with formatting
10
+ */
11
+ function useCountAnimation(target, duration = 2, delay = 0) {
12
+ const count = useMotionValue(0);
13
+ const formatted = useTransform(count, (latest) => Math.round(latest).toLocaleString());
14
+ React.useEffect(() => {
15
+ const controls = animate(count, target, {
16
+ duration,
17
+ delay,
18
+ ease: 'easeOut',
19
+ });
20
+ return controls.stop;
21
+ }, [count, target, duration, delay]);
22
+ return formatted;
23
+ }
8
24
  /**
9
25
  * Slide3Revenue - Revenue display with money rain overlay
10
26
  */
11
27
  function Slide3Revenue({ revenue, businessCategory, currency }) {
12
28
  const copy = recapCopy[businessCategory] ?? recapCopy[BUSINESS_CATEGORIES.THRIVING];
13
29
  const footerText = copy.revenueFooter;
14
- return (_jsxs("div", { className: "slide3-revenue", children: [_jsx("div", { className: "slide3-revenue__overlay", style: { backgroundImage: `url(${moneyRainGif})` }, "aria-hidden": "true" }), _jsxs("div", { className: "slide3-revenue__content", children: [_jsx(motion.h2, { className: "slide3-revenue__title gradient-text", initial: { opacity: 0, y: 20 }, animate: { opacity: 1, y: 0 }, transition: { duration: 0.5 }, children: "You don make" }), _jsx(motion.div, { className: "slide3-revenue__amount gradient-text", initial: { opacity: 0, scale: 0.9 }, animate: { opacity: 1, scale: 1 }, transition: { duration: 0.8, delay: 0.3 }, children: formatCurrency(revenue, currency) }), _jsx(motion.p, { className: "slide3-revenue__subline gradient-text", initial: { opacity: 0, y: 20 }, animate: { opacity: 1, y: 0 }, transition: { duration: 0.5, delay: 0.6 }, children: "Walahi you no small rara" })] }), _jsx(motion.div, { className: "slide3-revenue__footer gradient-text", initial: { opacity: 0, y: 20 }, animate: { opacity: 1, y: 0 }, transition: { duration: 0.5, delay: 0.9 }, children: footerText })] }));
30
+ // Counter animation for revenue
31
+ const revenueCount = useCountAnimation(revenue, 1.6, 0.4); // 1.6s + 0.4s delay = 2s total
32
+ // Get currency symbol
33
+ const getCurrencySymbol = (curr) => {
34
+ const symbols = {
35
+ GBP: '£',
36
+ USD: '$',
37
+ EUR: '€',
38
+ NGN: '₦',
39
+ };
40
+ return symbols[curr ?? 'GBP'] ?? '£';
41
+ };
42
+ return (_jsxs("div", { className: "slide3-revenue", children: [_jsx("div", { className: "slide3-revenue__overlay", style: { backgroundImage: `url(${moneyRainGif})` }, "aria-hidden": "true" }), _jsxs("div", { className: "slide3-revenue__content", children: [_jsx(motion.h2, { className: "slide3-revenue__title", initial: { opacity: 0, y: 20 }, animate: { opacity: 1, y: 0 }, transition: { duration: 0.5 }, children: "You don make" }), _jsxs(motion.div, { className: "slide3-revenue__amount", initial: { opacity: 0, scale: 0.9 }, animate: { opacity: 1, scale: 1 }, transition: { duration: 0.8, delay: 0.3 }, children: [_jsx("span", { className: "slide3-revenue__currency", children: getCurrencySymbol(currency) }), _jsx(motion.span, { children: revenueCount })] }), _jsx(motion.p, { className: "slide3-revenue__subline", initial: { opacity: 0, y: 20 }, animate: { opacity: 1, y: 0 }, transition: { duration: 0.5, delay: 0.6 }, children: "Walahi you no small rara" })] }), _jsx(motion.div, { className: "slide3-revenue__footer", initial: { opacity: 0, y: 20 }, animate: { opacity: 1, y: 0 }, transition: { duration: 0.5, delay: 0.9 }, children: footerText })] }));
15
43
  }
16
44
  export default Slide3Revenue;