@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,20 +1,16 @@
1
+ /* Slide4Orders - Figma exact specifications with blue/purple scheme */
2
+
1
3
  .slide4-orders {
2
4
  position: relative;
3
5
  width: 100%;
4
- min-height: 100%;
6
+ height: 100%;
5
7
  display: flex;
6
8
  align-items: flex-start;
7
9
  justify-content: center;
8
- padding: 0 6.15%;
10
+ padding: 0 calc(16px + env(safe-area-inset-left)) 0 calc(16px + env(safe-area-inset-right));
9
11
  overflow: hidden;
10
12
  }
11
13
 
12
- /* @media (max-height: 720px), (orientation: landscape) {
13
- .slide4-orders {
14
- padding: clamp(24px, 5vh, 40px) 6.15% clamp(24px, 4vh, 32px);
15
- }
16
- } */
17
-
18
14
  .slide4-orders__grid {
19
15
  position: absolute;
20
16
  width: 1117px;
@@ -31,13 +27,13 @@
31
27
  position: absolute;
32
28
  inset: 0;
33
29
  }
30
+
34
31
  .slide4-orders__rect {
35
32
  position: absolute;
36
33
  width: 180px;
37
34
  height: 240px;
38
35
  box-sizing: border-box;
39
- border: 1px solid #FFFFFF;
40
- /* transform-origin: 0 0; */
36
+ border: 1px solid var(--rect-border);
41
37
  transform: rotate(28.8631deg);
42
38
  flex: none;
43
39
  }
@@ -50,7 +46,6 @@
50
46
  .slide4-orders__rect.r6 { left: 831.705px; top: 371.446px; }
51
47
  .slide4-orders__rect.r7 { left: 710.06px; top: 592.142px; }
52
48
  .slide4-orders__rect.r8 { left: 588.415px; top: 812.837px; }
53
- /* .slide4-orders__rect.r9 { left: 480.984px; top: 208.701px; } */
54
49
  .slide4-orders__rect.r10 { left: 359.339px; top: 429.397px; }
55
50
  .slide4-orders__rect.r11 { left: 237.694px; top: 650.092px; }
56
51
  .slide4-orders__rect.r12 { left: 116.049px; top: 870.788px; }
@@ -86,50 +81,114 @@
86
81
  }
87
82
 
88
83
  .slide4-orders__content {
89
- position: relative;
84
+ position: absolute;
90
85
  z-index: 1;
91
- width: 100%;
92
- max-width: 360px;
86
+ width: calc(100% - 32px - env(safe-area-inset-left) - env(safe-area-inset-right));
87
+ max-width: 358px;
93
88
  display: flex;
94
89
  flex-direction: column;
95
90
  align-items: flex-start;
96
- gap: 2.84dvh;
97
- margin-top: 18.6vh;
91
+ gap: 32px;
92
+ left: calc(16px + env(safe-area-inset-left));
93
+ top: calc(50% - 137px/2 - 189.5px);
98
94
  }
99
- .slide4-orders__label,
100
- .slide4-orders__number,
101
- .slide4-orders__caption {
102
- font-family: 'Lora', 'Georgia', serif;
103
- background: linear-gradient(90deg, #FFFFFF 0%, #FFCC80 100%);
104
- -webkit-background-clip: text;
105
- -webkit-text-fill-color: transparent;
106
- background-clip: text;
107
- color: transparent;
95
+
96
+ /* Large/Tall screens - position content higher for better balance */
97
+ @media (min-height: 800px) {
98
+ .slide4-orders__content {
99
+ top: calc(50% - 137px/2 - 230px);
100
+ }
101
+ }
102
+
103
+ @media (min-height: 900px) {
104
+ .slide4-orders__content {
105
+ top: calc(50% - 137px/2 - 260px);
106
+ }
108
107
  }
109
108
 
110
109
  .slide4-orders__label {
111
- font-size: 2.84vh;
110
+ width: 100%;
111
+ font-family: 'Lora', serif;
112
+ font-style: normal;
112
113
  font-weight: 500;
113
- letter-spacing: 0.02em;
114
+ font-size: clamp(14px, 4.1vw, 16px);
115
+ line-height: 1.5;
116
+ color: var(--text-primary);
117
+ /* background: var(--bg-gradient);
118
+ -webkit-background-clip: text;
119
+ -webkit-text-fill-color: transparent;
120
+ background-clip: text; */
121
+ margin: 0;
114
122
  }
115
123
 
116
124
  .slide4-orders__number {
117
- font-size: 11.37vh;
125
+ width: 100%;
126
+ font-family: 'Lora', serif;
127
+ font-style: normal;
118
128
  font-weight: 700;
129
+ font-size: 10vh;
119
130
  line-height: 1;
131
+ /* color: #4F4CD8; */
132
+ background: var(--bg-gradient);
133
+ -webkit-background-clip: text;
134
+ -webkit-text-fill-color: transparent;
135
+ background-clip: text;
136
+ margin: 0;
120
137
  }
121
138
 
122
139
  .slide4-orders__caption {
123
- font-size: 1.9vh;
140
+ width: 100%;
141
+ font-family: 'Lora', serif;
142
+ font-style: normal;
124
143
  font-weight: 400;
144
+ font-size: clamp(14px, 4.1vw, 16px);
145
+ line-height: 1.5;
146
+ color: #3734D3;
147
+ margin: 0;
148
+ }
149
+
150
+ /* Media queries for landscape and short screens */
151
+ @media (max-height: 720px), (orientation: landscape) {
152
+ .slide4-orders__content {
153
+ /* top: calc(50% - 120px/2 - 150px); */
154
+ gap: 24px;
155
+ }
156
+
157
+ .slide4-orders__number {
158
+ font-size: 9dvh;
159
+ }
125
160
  }
126
161
 
127
- /* @media (max-width: 480px) {
128
- .slide4-orders {
129
- padding: 8.29% 4.1% 5.92%;
162
+ /* Small/Short screens - handles browser chrome taking space */
163
+ @media (max-height: 700px) {
164
+ .slide4-orders__content {
165
+ top: calc(50% - 100px/2 - 130px);
166
+ gap: 20px;
167
+ }
168
+
169
+ .slide4-orders__number {
170
+ font-size: 8dvh;
171
+ }
172
+
173
+ .slide4-orders__label,
174
+ .slide4-orders__caption {
175
+ font-size: clamp(12px, 3.5vw, 14px);
130
176
  }
177
+ }
131
178
 
179
+ /* Extra short screens (under 600px) - more aggressive adjustments */
180
+ @media (max-height: 600px) {
181
+ .slide4-orders__content {
182
+ top: calc(50% - 80px/2 - 100px);
183
+ gap: 16px;
184
+ }
185
+
132
186
  .slide4-orders__number {
133
- font-size: clamp(56px, 26vw, 72px);
187
+ font-size: 7dvh;
134
188
  }
135
- } */
189
+
190
+ .slide4-orders__label,
191
+ .slide4-orders__caption {
192
+ font-size: clamp(11px, 3vw, 13px);
193
+ }
194
+ }
@@ -1,10 +1,11 @@
1
1
  import './Slide4Orders.css';
2
2
  interface Slide4OrdersProps {
3
3
  orders: number;
4
+ frameImages?: string[];
4
5
  }
5
6
  /**
6
7
  * Slide4Orders - Emphasizes the order volume with rotated card outlines in the background
7
8
  */
8
- declare function Slide4Orders({ orders }: Slide4OrdersProps): import("react/jsx-runtime").JSX.Element;
9
+ declare function Slide4Orders({ orders, frameImages }: Slide4OrdersProps): import("react/jsx-runtime").JSX.Element;
9
10
  export default Slide4Orders;
10
11
  //# sourceMappingURL=Slide4Orders.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Slide4Orders.d.ts","sourceRoot":"","sources":["../../src/slides/Slide4Orders.tsx"],"names":[],"mappings":"AAEA,OAAO,oBAAoB,CAAC;AAE5B,UAAU,iBAAiB;IACzB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,iBAAS,YAAY,CAAC,EAAE,MAAM,EAAE,EAAE,iBAAiB,2CAiDlD;AAED,eAAe,YAAY,CAAC"}
1
+ {"version":3,"file":"Slide4Orders.d.ts","sourceRoot":"","sources":["../../src/slides/Slide4Orders.tsx"],"names":[],"mappings":"AAEA,OAAO,oBAAoB,CAAC;AAE5B,UAAU,iBAAiB;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;CACxB;AAsBD;;GAEG;AACH,iBAAS,YAAY,CAAC,EAAE,MAAM,EAAE,WAAW,EAAE,EAAE,iBAAiB,2CAyF/D;AAED,eAAe,YAAY,CAAC"}
@@ -1,16 +1,58 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import React from 'react';
3
- import { motion } from 'framer-motion';
3
+ import { motion, useMotionValue, useTransform, animate } from 'framer-motion';
4
4
  import './Slide4Orders.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
  * Slide4Orders - Emphasizes the order volume with rotated card outlines in the background
7
23
  */
8
- function Slide4Orders({ orders }) {
24
+ function Slide4Orders({ orders, frameImages }) {
25
+ const ordersCount = useCountAnimation(orders, 1.6, 0.4); // 1.6s + 0.4s delay = 2s total
9
26
  const rectGroups = [
10
27
  { id: 'group-1', rects: ['r5', 'r6', 'r7', 'r8'], groupClass: 'group-1' },
11
28
  { id: 'group-2', rects: ['r1', 'r2', 'r3', 'r4'], groupClass: 'group-2' },
12
29
  { id: 'group-3', rects: ['r10', 'r11', 'r12'], groupClass: 'group-3' }
13
30
  ];
14
- return (_jsxs("div", { className: "slide4-orders", children: [_jsx("div", { className: "slide4-orders__grid", "aria-hidden": "true", children: rectGroups.map(group => (_jsx(React.Fragment, { children: group.rects.map(rect => (_jsx("span", { className: `slide4-orders__rect ${rect} ${group.groupClass}` }, rect))) }, group.id))) }), _jsxs("div", { className: "slide4-orders__content", children: [_jsx(motion.p, { className: "slide4-orders__label", initial: { opacity: 0, y: 20 }, animate: { opacity: 1, y: 0 }, transition: { duration: 0.5 }, children: "orders choke" }), _jsx(motion.div, { className: "slide4-orders__number", initial: { opacity: 0, scale: 0.95 }, animate: { opacity: 1, scale: 1 }, transition: { duration: 0.8, delay: 0.3 }, children: orders.toLocaleString() }), _jsxs(motion.p, { className: "slide4-orders__caption", initial: { opacity: 0, y: 20 }, animate: { opacity: 1, y: 0 }, transition: { duration: 0.5, delay: 0.6 }, children: ["Na serious hustle be this ", _jsx("span", { "aria-hidden": "true", children: "\uD83D\uDCAA" })] })] })] }));
31
+ const frameImagePool = React.useMemo(() => {
32
+ return frameImages && frameImages.length > 0 ? frameImages : [];
33
+ }, [frameImages]);
34
+ const totalRects = rectGroups.reduce((sum, group) => sum + group.rects.length, 0);
35
+ const rectImageAssignments = React.useMemo(() => {
36
+ if (!frameImagePool.length) {
37
+ return [];
38
+ }
39
+ return Array.from({ length: totalRects }, () => frameImagePool[Math.floor(Math.random() * frameImagePool.length)]);
40
+ }, [frameImagePool, totalRects]);
41
+ return (_jsxs("div", { className: "slide4-orders", children: [_jsx("div", { className: "slide4-orders__grid", "aria-hidden": "true", children: rectGroups.map((group, groupIndex) => {
42
+ const groupStartIndex = rectGroups
43
+ .slice(0, groupIndex)
44
+ .reduce((sum, current) => sum + current.rects.length, 0);
45
+ return (_jsx(React.Fragment, { children: group.rects.map((rect, rectIndex) => {
46
+ const rectIndexOverall = groupStartIndex + rectIndex;
47
+ const image = rectImageAssignments[rectIndexOverall];
48
+ return (_jsx("span", { className: `slide4-orders__rect ${rect} ${group.groupClass}`, style: image
49
+ ? {
50
+ backgroundImage: `url('${image}')`,
51
+ backgroundSize: 'cover',
52
+ backgroundPosition: 'center',
53
+ }
54
+ : undefined }, rect));
55
+ }) }, group.id));
56
+ }) }), _jsxs("div", { className: "slide4-orders__content", children: [_jsx(motion.p, { className: "slide4-orders__label", initial: { opacity: 0, y: 20 }, animate: { opacity: 1, y: 0 }, transition: { duration: 0.5 }, children: "orders choke" }), _jsx(motion.div, { className: "slide4-orders__number", initial: { opacity: 0, scale: 0.95 }, animate: { opacity: 1, scale: 1 }, transition: { duration: 0.8, delay: 0.3 }, children: _jsx(motion.span, { children: ordersCount }) }), _jsxs(motion.p, { className: "slide4-orders__caption", initial: { opacity: 0, y: 20 }, animate: { opacity: 1, y: 0 }, transition: { duration: 0.5, delay: 0.6 }, children: ["Na serious hustle be this ", _jsx("span", { "aria-hidden": "true", children: "\uD83D\uDCAA" })] })] })] }));
15
57
  }
16
58
  export default Slide4Orders;
@@ -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
  }
@@ -2,10 +2,11 @@ import './Slide5Buyers.css';
2
2
  interface Slide5BuyersProps {
3
3
  firstTimeBuyers: number;
4
4
  repeatBuyers: number;
5
+ frameImages?: string[];
5
6
  }
6
7
  /**
7
8
  * Slide5Buyers - Displays first-time and returning buyer counts with vertical animated columns
8
9
  */
9
- declare function Slide5Buyers({ firstTimeBuyers, repeatBuyers }: Slide5BuyersProps): import("react/jsx-runtime").JSX.Element;
10
+ declare function Slide5Buyers({ firstTimeBuyers, repeatBuyers, frameImages }: Slide5BuyersProps): import("react/jsx-runtime").JSX.Element;
10
11
  export default Slide5Buyers;
11
12
  //# sourceMappingURL=Slide5Buyers.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Slide5Buyers.d.ts","sourceRoot":"","sources":["../../src/slides/Slide5Buyers.tsx"],"names":[],"mappings":"AAEA,OAAO,oBAAoB,CAAC;AAE5B,UAAU,iBAAiB;IACzB,eAAe,EAAE,MAAM,CAAC;IACxB,YAAY,EAAE,MAAM,CAAC;CACtB;AAED;;GAEG;AACH,iBAAS,YAAY,CAAC,EAAE,eAAe,EAAE,YAAY,EAAE,EAAE,iBAAiB,2CA2DzE;AAED,eAAe,YAAY,CAAC"}
1
+ {"version":3,"file":"Slide5Buyers.d.ts","sourceRoot":"","sources":["../../src/slides/Slide5Buyers.tsx"],"names":[],"mappings":"AAEA,OAAO,oBAAoB,CAAC;AAE5B,UAAU,iBAAiB;IACzB,eAAe,EAAE,MAAM,CAAC;IACxB,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;CACxB;AAsBD;;GAEG;AACH,iBAAS,YAAY,CAAC,EAAE,eAAe,EAAE,YAAY,EAAE,WAAW,EAAE,EAAE,iBAAiB,2CAiGtF;AAED,eAAe,YAAY,CAAC"}
@@ -1,12 +1,52 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { motion } from 'framer-motion';
2
+ import React from 'react';
3
+ import { motion, useMotionValue, useTransform, animate } from 'framer-motion';
3
4
  import './Slide5Buyers.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
+ }
4
21
  /**
5
22
  * Slide5Buyers - Displays first-time and returning buyer counts with vertical animated columns
6
23
  */
7
- function Slide5Buyers({ firstTimeBuyers, repeatBuyers }) {
24
+ function Slide5Buyers({ firstTimeBuyers, repeatBuyers, frameImages }) {
25
+ const firstTimeBuyersCount = useCountAnimation(firstTimeBuyers, 1.7, 0.3); // 1.7s + 0.3s delay = 2s total
26
+ const repeatBuyersCount = useCountAnimation(repeatBuyers, 1.2, 0.8); // 1.2s + 0.8s delay = 2s total
8
27
  const leftRects = ['l1', 'l2', 'l3', 'l4', 'l5', 'l6'];
9
28
  const rightRects = ['r1', 'r2', 'r3', 'r4', 'r5', 'r6'];
10
- return (_jsxs("div", { className: "slide5-buyers", children: [_jsxs("div", { className: "slide5-buyers__grid", "aria-hidden": "true", children: [_jsx("div", { className: "column column-left", children: _jsx("div", { className: "column-inner", children: leftRects.map(rect => (_jsx("span", { className: `rect ${rect}` }, rect))) }) }), _jsx("div", { className: "column column-right", children: _jsx("div", { className: "column-inner", children: rightRects.map(rect => (_jsx("span", { className: `rect ${rect}` }, rect))) }) })] }), _jsxs("div", { className: "slide5-buyers__content", children: [_jsx(motion.div, { className: "slide5-buyers__number", initial: { opacity: 0, y: 20 }, animate: { opacity: 1, y: 0 }, transition: { duration: 0.6 }, children: firstTimeBuyers.toLocaleString() }), _jsx(motion.p, { className: "slide5-buyers__label", initial: { opacity: 0, y: 20 }, animate: { opacity: 1, y: 0 }, transition: { duration: 0.6, delay: 0.2 }, children: "people don buy from you" }), _jsx(motion.div, { className: "slide5-buyers__number down", initial: { opacity: 0, y: 20 }, animate: { opacity: 1, y: 0 }, transition: { duration: 0.6, delay: 0.4 }, children: repeatBuyers.toLocaleString() }), _jsx(motion.p, { className: "slide5-buyers__label", initial: { opacity: 0, y: 20 }, animate: { opacity: 1, y: 0 }, transition: { duration: 0.6, delay: 0.6 }, children: "people come buy again" })] })] }));
29
+ const frameImagePool = React.useMemo(() => {
30
+ return frameImages && frameImages.length > 0 ? frameImages : [];
31
+ }, [frameImages]);
32
+ const totalRects = leftRects.length + rightRects.length;
33
+ const rectSources = React.useMemo(() => {
34
+ if (!frameImagePool.length) {
35
+ return [];
36
+ }
37
+ return Array.from({ length: totalRects }, () => frameImagePool[Math.floor(Math.random() * frameImagePool.length)]);
38
+ }, [frameImagePool, totalRects]);
39
+ const getRectStyle = (index) => {
40
+ const image = rectSources[index];
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: "slide5-buyers", children: [_jsxs("div", { className: "slide5-buyers__grid", "aria-hidden": "true", children: [_jsx("div", { className: "column column-left", children: _jsx("div", { className: "column-inner", children: leftRects.map((rect, index) => (_jsx("span", { className: `rect ${rect}`, style: getRectStyle(index) }, rect))) }) }), _jsx("div", { className: "column column-right", children: _jsx("div", { className: "column-inner", children: rightRects.map((rect, index) => (_jsx("span", { className: `rect ${rect}`, style: getRectStyle(leftRects.length + index) }, rect))) }) })] }), _jsxs("div", { className: "slide5-buyers__content", children: [_jsxs("div", { className: "slide5-buyers__section", children: [_jsx(motion.div, { className: "slide5-buyers__number", initial: { opacity: 0, y: 20 }, animate: { opacity: 1, y: 0 }, transition: { duration: 0.6 }, children: _jsx(motion.span, { children: firstTimeBuyersCount }) }), _jsx(motion.p, { className: "slide5-buyers__label", initial: { opacity: 0, y: 20 }, animate: { opacity: 1, y: 0 }, transition: { duration: 0.6, delay: 0.2 }, children: "people don buy from you" })] }), _jsxs("div", { className: "slide5-buyers__section", children: [_jsx(motion.div, { className: "slide5-buyers__number slide5-buyers__number--secondary", initial: { opacity: 0, y: 20 }, animate: { opacity: 1, y: 0 }, transition: { duration: 0.6, delay: 0.4 }, children: _jsx(motion.span, { children: repeatBuyersCount }) }), _jsx(motion.p, { className: "slide5-buyers__label", initial: { opacity: 0, y: 20 }, animate: { opacity: 1, y: 0 }, transition: { duration: 0.6, delay: 0.6 }, children: "people come buy again" })] })] })] }));
11
51
  }
12
52
  export default Slide5Buyers;