@katajere/recap 1.0.14 → 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 (96) 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 +61 -28
  7. package/dist/StoryProgress.css +3 -3
  8. package/dist/assets/huxxle-login-blue-logo.svg +14 -0
  9. package/dist/assets/noisy-background.png +0 -0
  10. package/dist/assets/noisy-background.svg +23 -0
  11. package/dist/assets/search-icon.svg +4 -0
  12. package/dist/assets/share-button.svg +5 -0
  13. package/dist/assets/web-icon.png +0 -0
  14. package/dist/assets/web-icon.svg +14 -0
  15. package/dist/components/Header.css +12 -1
  16. package/dist/components/Header.js +2 -2
  17. package/dist/data/mock.d.ts.map +1 -1
  18. package/dist/data/mock.js +19 -7
  19. package/dist/index.d.ts +0 -1
  20. package/dist/index.d.ts.map +1 -1
  21. package/dist/index.js +0 -1
  22. package/dist/slides/Slide10Final.css +73 -35
  23. package/dist/slides/Slide1Intro.css +204 -56
  24. package/dist/slides/Slide1Intro.d.ts +2 -1
  25. package/dist/slides/Slide1Intro.d.ts.map +1 -1
  26. package/dist/slides/Slide1Intro.js +41 -47
  27. package/dist/slides/Slide2Days.css +121 -34
  28. package/dist/slides/Slide2Days.d.ts +2 -1
  29. package/dist/slides/Slide2Days.d.ts.map +1 -1
  30. package/dist/slides/Slide2Days.js +45 -4
  31. package/dist/slides/Slide3Revenue.css +80 -38
  32. package/dist/slides/Slide3Revenue.d.ts.map +1 -1
  33. package/dist/slides/Slide3Revenue.js +31 -3
  34. package/dist/slides/Slide4Orders.css +93 -34
  35. package/dist/slides/Slide4Orders.d.ts +2 -1
  36. package/dist/slides/Slide4Orders.d.ts.map +1 -1
  37. package/dist/slides/Slide4Orders.js +45 -3
  38. package/dist/slides/Slide5Buyers.css +124 -67
  39. package/dist/slides/Slide5Buyers.d.ts +2 -1
  40. package/dist/slides/Slide5Buyers.d.ts.map +1 -1
  41. package/dist/slides/Slide5Buyers.js +43 -3
  42. package/dist/slides/Slide6Customer.css +294 -52
  43. package/dist/slides/Slide6Customer.d.ts +6 -3
  44. package/dist/slides/Slide6Customer.d.ts.map +1 -1
  45. package/dist/slides/Slide6Customer.js +25 -4
  46. package/dist/slides/Slide7Products.css +8 -7
  47. package/dist/slides/Slide7Products.js +3 -3
  48. package/dist/slides/Slide8Months.css +6 -6
  49. package/dist/slides/Slide9Year.css +4 -2
  50. package/dist/slides/Slide9Year.d.ts +2 -1
  51. package/dist/slides/Slide9Year.d.ts.map +1 -1
  52. package/dist/slides/Slide9Year.js +23 -2
  53. package/dist/types.d.ts +5 -0
  54. package/dist/types.d.ts.map +1 -1
  55. package/dist/utils/slideScreenshot.d.ts +27 -0
  56. package/dist/utils/slideScreenshot.d.ts.map +1 -0
  57. package/dist/utils/slideScreenshot.js +274 -0
  58. package/package.json +2 -1
  59. package/src/App.css +22 -2
  60. package/src/LoginScreen.css +22 -21
  61. package/src/LoginScreen.tsx +1 -1
  62. package/src/OtpScreen.css +20 -17
  63. package/src/OtpScreen.tsx +1 -1
  64. package/src/RecapStory.css +148 -0
  65. package/src/RecapStory.tsx +131 -57
  66. package/src/StoryProgress.css +3 -3
  67. package/src/components/Header.css +12 -1
  68. package/src/components/Header.tsx +2 -2
  69. package/src/data/mock.ts +19 -7
  70. package/src/index.ts +0 -1
  71. package/src/slides/Slide10Final.css +73 -35
  72. package/src/slides/Slide1Intro.css +204 -56
  73. package/src/slides/Slide1Intro.tsx +89 -81
  74. package/src/slides/Slide2Days.css +121 -34
  75. package/src/slides/Slide2Days.tsx +67 -19
  76. package/src/slides/Slide3Revenue.css +80 -38
  77. package/src/slides/Slide3Revenue.tsx +43 -6
  78. package/src/slides/Slide4Orders.css +93 -34
  79. package/src/slides/Slide4Orders.tsx +71 -10
  80. package/src/slides/Slide5Buyers.css +124 -67
  81. package/src/slides/Slide5Buyers.tsx +97 -38
  82. package/src/slides/Slide6Customer.css +294 -52
  83. package/src/slides/Slide6Customer.tsx +68 -10
  84. package/src/slides/Slide7Products.css +8 -7
  85. package/src/slides/Slide7Products.tsx +3 -3
  86. package/src/slides/Slide8Months.css +6 -6
  87. package/src/slides/Slide9Year.css +4 -2
  88. package/src/slides/Slide9Year.tsx +35 -7
  89. package/src/types.ts +5 -0
  90. package/src/utils/slideScreenshot.ts +324 -0
  91. package/dist/FloatingFrames.css +0 -55
  92. package/dist/FloatingFrames.d.ts +0 -11
  93. package/dist/FloatingFrames.d.ts.map +0 -1
  94. package/dist/FloatingFrames.js +0 -12
  95. package/src/FloatingFrames.css +0 -55
  96. package/src/FloatingFrames.tsx +0 -27
@@ -1,52 +1,48 @@
1
+ /* Slide5Buyers - Figma exact specifications with blue/purple scheme */
2
+
1
3
  .slide5-buyers {
2
4
  position: relative;
3
5
  width: 100%;
4
- min-height: 100%;
6
+ height: 100%;
5
7
  display: flex;
6
8
  align-items: center;
7
9
  justify-content: center;
8
- padding: 9.48% 6.15% 7.11%;
9
10
  overflow: hidden;
10
11
  }
11
12
 
12
- @media (max-height: 720px), (orientation: landscape) {
13
- .slide5-buyers {
14
- padding: clamp(24px, 5vh, 40px) 6.15% clamp(24px, 4vh, 32px);
15
- }
16
- }
17
-
18
13
  .slide5-buyers__grid {
19
14
  position: absolute;
20
15
  inset: 0;
21
- /* width: 650px; */
22
- height: 100%;
23
- margin: 0 auto;
24
16
  pointer-events: none;
25
17
  z-index: 0;
26
18
  }
27
19
 
28
20
  .column {
29
21
  position: absolute;
30
- width: 179px;
31
- height: 100%;
22
+ width: 180px;
32
23
  display: flex;
24
+ flex-direction: column;
33
25
  justify-content: center;
26
+ align-items: center;
27
+ gap: 12px;
28
+ height: 996px;
34
29
  }
35
30
 
36
31
  .column-left {
37
- left: -33.33%;
32
+ left: -130px;
33
+ top: -80.98px;
38
34
  }
39
35
 
40
36
  .column-right {
41
- right: -33.33%;
37
+ right: -130px;
38
+ top: calc(50% - 996px/2 - 0.5px);
42
39
  }
43
40
 
44
41
  .column-inner {
45
- position: absolute;
46
- top: 0;
47
- left: 0;
48
- width: 179px;
49
- height: 1300px;
42
+ display: flex;
43
+ flex-direction: column;
44
+ gap: 12px;
45
+ width: 180px;
50
46
  }
51
47
 
52
48
  .column-left .column-inner {
@@ -58,27 +54,13 @@
58
54
  }
59
55
 
60
56
  .rect {
61
- position: absolute;
62
- width: 179px;
63
- height: 239px;
57
+ width: 180px;
58
+ height: 240px;
64
59
  box-sizing: border-box;
65
- border: 1px solid #FFFFFF;
60
+ border: 1px solid #817FE3;
61
+ flex: none;
66
62
  }
67
63
 
68
- .rect.l1 { top: -251.5px; }
69
- .rect.l2 { top: 0.5px; }
70
- .rect.l3 { top: 252.5px; }
71
- .rect.l4 { top: 504.5px; }
72
- .rect.l5 { top: 756.5px; }
73
- .rect.l6 { top: 1008.5px; }
74
-
75
- .rect.r1 { top: -247.022px; }
76
- .rect.r2 { top: 4.978px; }
77
- .rect.r3 { top: 256.978px; }
78
- .rect.r4 { top: 508.978px; }
79
- .rect.r5 { top: 760.978px; }
80
- .rect.r6 { top: 1012.978px; }
81
-
82
64
  @keyframes moveUp {
83
65
  from { transform: translateY(0); }
84
66
  to { transform: translateY(-29.86%); }
@@ -90,51 +72,126 @@
90
72
  }
91
73
 
92
74
  .slide5-buyers__content {
93
- position: relative;
75
+ position: absolute;
94
76
  z-index: 1;
95
- max-width: 360px;
96
- text-align: center;
77
+ width: calc(100% - 32px - env(safe-area-inset-left) - env(safe-area-inset-right));
78
+ max-width: 358px;
97
79
  display: flex;
98
80
  flex-direction: column;
99
81
  align-items: center;
100
- justify-content: center;
101
- gap: 6.58vh;
82
+ gap: 64px;
83
+ left: 50%;
84
+ top: 50%;
85
+ transform: translate(-50%, -50%);
86
+ }
87
+
88
+ .slide5-buyers__section {
89
+ display: flex;
90
+ flex-direction: column;
91
+ align-items: center;
92
+ width: 100%;
93
+ gap: 16px;
102
94
  }
103
95
 
104
96
  .slide5-buyers__number {
105
- font-family: 'Lora', 'Georgia', serif;
106
- font-size: 11.37vh;
97
+ width: 100%;
98
+ font-family: 'Lora', serif;
99
+ font-style: normal;
107
100
  font-weight: 700;
108
- /* line-height: 1; */
109
- background: linear-gradient(90deg, #FFFFFF 0%, #FFCC80 100%);
110
- -webkit-background-clip: text;
111
- -webkit-text-fill-color: transparent;
112
- background-clip: text;
113
- color: transparent;
114
- padding-top: 4.74%;
101
+ font-size: 10vh;
102
+ line-height: 1;
103
+ text-align: center;
104
+ color: var(--primary-blue);
105
+ margin: 0;
115
106
  }
116
107
 
117
- .slide5-buyers__number.down {
118
- font-size: 7.58vh;
108
+ .slide5-buyers__number--secondary {
109
+ font-size: 8vh;
110
+ color: #FFFFFF;
111
+ -webkit-text-stroke: 1.5px var(--primary-blue);
112
+ paint-order: stroke fill;
119
113
  }
120
114
 
121
115
  .slide5-buyers__label {
122
- font-family: 'Lora', 'Georgia', serif;
123
- font-size: 1.89vh;
116
+ width: 100%;
117
+ font-family: 'Lora', serif;
118
+ font-style: normal;
124
119
  font-weight: 400;
125
- background: linear-gradient(90deg, #FFFFFF 0%, #FFCC80 100%);
126
- -webkit-background-clip: text;
127
- -webkit-text-fill-color: transparent;
128
- background-clip: text;
129
- color: transparent;
120
+ font-size: clamp(14px, 4.1vw, 16px);
121
+ line-height: 1.5;
122
+ text-align: center;
123
+ color: #3734D3;
124
+ margin: 0;
130
125
  }
131
126
 
132
- @media (max-width: 480px) {
133
- .slide5-buyers {
134
- padding: 8.29% 4.1% 5.92%;
127
+ /* Media queries for landscape and short screens */
128
+ @media (max-height: 720px), (orientation: landscape) {
129
+ .slide5-buyers__content {
130
+ gap: 48px;
131
+ }
132
+
133
+ .slide5-buyers__number {
134
+ font-size: 9dvh;
135
135
  }
136
+
137
+ .slide5-buyers__number--secondary {
138
+ font-size: 7dvh;
139
+ }
140
+ }
136
141
 
137
- /* .slide5-buyers__number {
138
- font-size: clamp(56px, 26vw, 72px);
139
- } */
142
+ /* Small/Short screens - handles browser chrome taking space */
143
+ @media (max-height: 700px) {
144
+ .slide5-buyers__content {
145
+ gap: 40px;
146
+ }
147
+
148
+ .slide5-buyers__section {
149
+ gap: 12px;
150
+ }
151
+
152
+ .slide5-buyers__number {
153
+ font-size: 8dvh;
154
+ }
155
+
156
+ .slide5-buyers__number--secondary {
157
+ font-size: 6dvh;
158
+ }
159
+
160
+ .slide5-buyers__label {
161
+ font-size: clamp(12px, 3.5vw, 14px);
162
+ }
163
+ }
164
+
165
+ /* Extra short screens (under 600px) - more aggressive adjustments */
166
+ @media (max-height: 600px) {
167
+ .slide5-buyers__content {
168
+ gap: 32px;
169
+ }
170
+
171
+ .slide5-buyers__section {
172
+ gap: 8px;
173
+ }
174
+
175
+ .slide5-buyers__number {
176
+ font-size: 7dvh;
177
+ }
178
+
179
+ .slide5-buyers__number--secondary {
180
+ font-size: 5dvh;
181
+ }
182
+
183
+ .slide5-buyers__label {
184
+ font-size: clamp(11px, 3vw, 13px);
185
+ }
186
+ }
187
+
188
+ /* Large screens - ensure columns are visible */
189
+ @media (min-width: 768px) {
190
+ .column-left {
191
+ left: -80px;
192
+ }
193
+
194
+ .column-right {
195
+ right: -80px;
196
+ }
140
197
  }
@@ -1,71 +1,130 @@
1
1
  import React from 'react';
2
- import { motion } from 'framer-motion';
2
+ import { motion, useMotionValue, useTransform, animate } from 'framer-motion';
3
3
  import './Slide5Buyers.css';
4
4
 
5
5
  interface Slide5BuyersProps {
6
6
  firstTimeBuyers: number;
7
7
  repeatBuyers: number;
8
+ frameImages?: string[];
9
+ }
10
+
11
+ /**
12
+ * Custom hook for number counter animation
13
+ */
14
+ function useCountAnimation(target: number, duration: number = 2, delay: number = 0) {
15
+ const count = useMotionValue(0);
16
+ const rounded = useTransform(count, (latest) => Math.round(latest));
17
+
18
+ React.useEffect(() => {
19
+ const controls = animate(count, target, {
20
+ duration,
21
+ delay,
22
+ ease: 'easeOut',
23
+ });
24
+
25
+ return controls.stop;
26
+ }, [count, target, duration, delay]);
27
+
28
+ return rounded;
8
29
  }
9
30
 
10
31
  /**
11
32
  * Slide5Buyers - Displays first-time and returning buyer counts with vertical animated columns
12
33
  */
13
- function Slide5Buyers({ firstTimeBuyers, repeatBuyers }: Slide5BuyersProps) {
34
+ function Slide5Buyers({ firstTimeBuyers, repeatBuyers, frameImages }: Slide5BuyersProps) {
35
+ const firstTimeBuyersCount = useCountAnimation(firstTimeBuyers, 1.7, 0.3); // 1.7s + 0.3s delay = 2s total
36
+ const repeatBuyersCount = useCountAnimation(repeatBuyers, 1.2, 0.8); // 1.2s + 0.8s delay = 2s total
14
37
  const leftRects = ['l1', 'l2', 'l3', 'l4', 'l5', 'l6'];
15
38
  const rightRects = ['r1', 'r2', 'r3', 'r4', 'r5', 'r6'];
16
39
 
40
+ const frameImagePool = React.useMemo(() => {
41
+ return frameImages && frameImages.length > 0 ? frameImages : [];
42
+ }, [frameImages]);
43
+
44
+ const totalRects = leftRects.length + rightRects.length;
45
+ const rectSources = React.useMemo(() => {
46
+ if (!frameImagePool.length) {
47
+ return [];
48
+ }
49
+
50
+ return Array.from({ length: totalRects }, () =>
51
+ frameImagePool[Math.floor(Math.random() * frameImagePool.length)]
52
+ );
53
+ }, [frameImagePool, totalRects]);
54
+
55
+ const getRectStyle = (index: number) => {
56
+ const image = rectSources[index];
57
+ if (!image) {
58
+ return undefined;
59
+ }
60
+
61
+ return {
62
+ backgroundImage: `url('${image}')`,
63
+ backgroundSize: 'cover',
64
+ backgroundPosition: 'center',
65
+ };
66
+ };
67
+
17
68
  return (
18
69
  <div className="slide5-buyers">
19
70
  <div className="slide5-buyers__grid" aria-hidden="true">
20
71
  <div className="column column-left">
21
72
  <div className="column-inner">
22
- {leftRects.map(rect => (
23
- <span key={rect} className={`rect ${rect}`} />
73
+ {leftRects.map((rect, index) => (
74
+ <span key={rect} className={`rect ${rect}`} style={getRectStyle(index)} />
24
75
  ))}
25
76
  </div>
26
77
  </div>
27
78
  <div className="column column-right">
28
79
  <div className="column-inner">
29
- {rightRects.map(rect => (
30
- <span key={rect} className={`rect ${rect}`} />
80
+ {rightRects.map((rect, index) => (
81
+ <span
82
+ key={rect}
83
+ className={`rect ${rect}`}
84
+ style={getRectStyle(leftRects.length + index)}
85
+ />
31
86
  ))}
32
87
  </div>
33
88
  </div>
34
89
  </div>
35
90
 
36
91
  <div className="slide5-buyers__content">
37
- <motion.div
38
- className="slide5-buyers__number"
39
- initial={{ opacity: 0, y: 20 }}
40
- animate={{ opacity: 1, y: 0 }}
41
- transition={{ duration: 0.6 }}
42
- >
43
- {firstTimeBuyers.toLocaleString()}
44
- </motion.div>
45
- <motion.p
46
- className="slide5-buyers__label"
47
- initial={{ opacity: 0, y: 20 }}
48
- animate={{ opacity: 1, y: 0 }}
49
- transition={{ duration: 0.6, delay: 0.2 }}
50
- >
51
- people don buy from you
52
- </motion.p>
53
- <motion.div
54
- className="slide5-buyers__number down"
55
- initial={{ opacity: 0, y: 20 }}
56
- animate={{ opacity: 1, y: 0 }}
57
- transition={{ duration: 0.6, delay: 0.4 }}
58
- >
59
- {repeatBuyers.toLocaleString()}
60
- </motion.div>
61
- <motion.p
62
- className="slide5-buyers__label"
63
- initial={{ opacity: 0, y: 20 }}
64
- animate={{ opacity: 1, y: 0 }}
65
- transition={{ duration: 0.6, delay: 0.6 }}
66
- >
67
- people come buy again
68
- </motion.p>
92
+ <div className="slide5-buyers__section">
93
+ <motion.div
94
+ className="slide5-buyers__number"
95
+ initial={{ opacity: 0, y: 20 }}
96
+ animate={{ opacity: 1, y: 0 }}
97
+ transition={{ duration: 0.6 }}
98
+ >
99
+ <motion.span>{firstTimeBuyersCount}</motion.span>
100
+ </motion.div>
101
+ <motion.p
102
+ className="slide5-buyers__label"
103
+ initial={{ opacity: 0, y: 20 }}
104
+ animate={{ opacity: 1, y: 0 }}
105
+ transition={{ duration: 0.6, delay: 0.2 }}
106
+ >
107
+ people don buy from you
108
+ </motion.p>
109
+ </div>
110
+ <div className="slide5-buyers__section">
111
+ <motion.div
112
+ className="slide5-buyers__number slide5-buyers__number--secondary"
113
+ initial={{ opacity: 0, y: 20 }}
114
+ animate={{ opacity: 1, y: 0 }}
115
+ transition={{ duration: 0.6, delay: 0.4 }}
116
+ >
117
+ <motion.span>{repeatBuyersCount}</motion.span>
118
+ </motion.div>
119
+ <motion.p
120
+ className="slide5-buyers__label"
121
+ initial={{ opacity: 0, y: 20 }}
122
+ animate={{ opacity: 1, y: 0 }}
123
+ transition={{ duration: 0.6, delay: 0.6 }}
124
+ >
125
+ people come buy again
126
+ </motion.p>
127
+ </div>
69
128
  </div>
70
129
  </div>
71
130
  );