@katajere/recap 1.0.2 → 1.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. package/README.md +27 -1
  2. package/dist/App.css +156 -120
  3. package/dist/FloatingFrames.css +55 -55
  4. package/dist/LoginScreen.css +146 -146
  5. package/dist/OtpScreen.css +133 -133
  6. package/dist/RecapStory.css +105 -105
  7. package/dist/StoryProgress.css +47 -47
  8. package/dist/assets/huxxle-blue-logo.svg +14 -14
  9. package/dist/assets/login-logo.svg +14 -14
  10. package/dist/assets/slide-logo.svg +14 -14
  11. package/dist/components/Header.css +46 -46
  12. package/dist/index.d.ts +2 -2
  13. package/dist/index.js +2 -2
  14. package/dist/slides/Slide10Final.css +101 -101
  15. package/dist/slides/Slide1Intro.css +235 -261
  16. package/dist/slides/Slide2Days.css +209 -209
  17. package/dist/slides/Slide3Revenue.css +89 -89
  18. package/dist/slides/Slide4Orders.css +135 -135
  19. package/dist/slides/Slide5Buyers.css +140 -140
  20. package/dist/slides/Slide6Customer.css +92 -92
  21. package/dist/slides/Slide7Products.css +144 -144
  22. package/dist/slides/Slide8Months.css +148 -148
  23. package/dist/slides/Slide9Year.css +93 -93
  24. package/package.json +17 -32
  25. package/src/App.css +156 -120
  26. package/src/FloatingFrames.css +55 -55
  27. package/src/FloatingFrames.tsx +27 -27
  28. package/src/LoginScreen.css +146 -146
  29. package/src/LoginScreen.tsx +70 -70
  30. package/src/OtpScreen.css +133 -133
  31. package/src/OtpScreen.tsx +109 -109
  32. package/src/RecapApp.tsx +34 -34
  33. package/src/RecapStory.css +105 -105
  34. package/src/RecapStory.tsx +269 -269
  35. package/src/StoryProgress.css +47 -47
  36. package/src/StoryProgress.tsx +60 -60
  37. package/src/assets.d.ts +41 -41
  38. package/src/components/Header.css +46 -46
  39. package/src/components/Header.tsx +41 -41
  40. package/src/data/mock.ts +62 -62
  41. package/src/data/recapCopy.ts +33 -33
  42. package/src/hooks/useBackgroundMusic.ts +79 -79
  43. package/src/index.ts +70 -70
  44. package/src/react-app-env.d.ts +26 -26
  45. package/src/slides/Slide10Final.css +101 -101
  46. package/src/slides/Slide10Final.tsx +105 -105
  47. package/src/slides/Slide1Intro.css +235 -261
  48. package/src/slides/Slide1Intro.tsx +141 -141
  49. package/src/slides/Slide2Days.css +209 -209
  50. package/src/slides/Slide2Days.tsx +92 -92
  51. package/src/slides/Slide3Revenue.css +89 -89
  52. package/src/slides/Slide3Revenue.tsx +76 -76
  53. package/src/slides/Slide4Orders.css +135 -135
  54. package/src/slides/Slide4Orders.tsx +63 -63
  55. package/src/slides/Slide5Buyers.css +140 -140
  56. package/src/slides/Slide5Buyers.tsx +74 -74
  57. package/src/slides/Slide6Customer.css +92 -92
  58. package/src/slides/Slide6Customer.tsx +27 -27
  59. package/src/slides/Slide7Products.css +144 -144
  60. package/src/slides/Slide7Products.tsx +81 -81
  61. package/src/slides/Slide8Months.css +148 -148
  62. package/src/slides/Slide8Months.tsx +63 -63
  63. package/src/slides/Slide9Year.css +93 -93
  64. package/src/slides/Slide9Year.tsx +35 -35
  65. package/src/types.ts +39 -39
  66. package/src/utils/format.ts +18 -18
  67. package/src/utils/index.ts +3 -3
  68. package/src/utils/motion.ts +89 -89
package/src/OtpScreen.css CHANGED
@@ -1,133 +1,133 @@
1
- /* OtpScreen.css */
2
- .otp-screen {
3
- position: relative;
4
- width: 100%;
5
- height: 100%;
6
- overflow: hidden;
7
- display: flex;
8
- flex-direction: column;
9
- padding: clamp(20px, 3dvh, 32px) clamp(16px, 4.1vw, 20px) calc(clamp(32px, 5dvh, 48px) + env(safe-area-inset-bottom));
10
- box-sizing: border-box;
11
- }
12
-
13
- /* Top logo area - 3% margin from top via padding */
14
- .otp-screen__header {
15
- flex: none;
16
- width: 100%;
17
- height: 3.79%;
18
- min-height: 32px;
19
- margin-bottom: 6%;
20
- }
21
-
22
- /* Middle hero section - grows to fill space */
23
- .otp-screen__hero {
24
- flex: 1;
25
- display: flex;
26
- flex-direction: column;
27
- align-items: flex-start;
28
- justify-content: center;
29
- gap: 1.9%;
30
- width: 100%;
31
- }
32
-
33
- .otp-screen__title {
34
- width: 100%;
35
- font-family: 'Lora', serif;
36
- font-style: normal;
37
- font-weight: 700;
38
- font-size: clamp(48px, 18.46vw, 72px);
39
- line-height: 1.28;
40
- text-transform: capitalize;
41
- background: linear-gradient(90deg, #FFFFFF 0%, #FFCC80 100%);
42
- -webkit-background-clip: text;
43
- -webkit-text-fill-color: transparent;
44
- background-clip: text;
45
- margin: 0;
46
- white-space: normal;
47
- word-wrap: break-word;
48
- }
49
-
50
- .otp-screen__subtitle {
51
- width: 100%;
52
- font-family: 'Lora', serif;
53
- font-style: normal;
54
- font-weight: 400;
55
- font-size: clamp(14px, 4.1vw, 16px);
56
- line-height: 1.2;
57
- background: linear-gradient(90deg, #FFFFFF 0%, #FFCC80 100%);
58
- -webkit-background-clip: text;
59
- -webkit-text-fill-color: transparent;
60
- background-clip: text;
61
- margin: 0;
62
- }
63
-
64
- /* OTP Inputs */
65
- .otp-inputs {
66
- display: flex;
67
- flex-direction: row;
68
- align-items: flex-start;
69
- gap: 0.95%;
70
- width: 100%;
71
- height: 5.69%;
72
- min-height: 48px;
73
- }
74
-
75
- .otp-input {
76
- box-sizing: border-box;
77
- display: flex;
78
- flex-direction: row;
79
- justify-content: center;
80
- align-items: center;
81
- padding: 1.42% 4.1%;
82
- flex: 1;
83
- height: 100%;
84
- border: 1px solid #FCFCFC;
85
- background: transparent;
86
- font-family: 'Lora', serif;
87
- font-style: normal;
88
- font-weight: 600;
89
- font-size: clamp(14px, 4.1vw, 16px);
90
- line-height: 120%;
91
- color: #FCFCFC;
92
- text-align: center;
93
- outline: none;
94
- width: 5.69%;
95
- }
96
-
97
- .otp-input::placeholder {
98
- color: #FCFCFC;
99
- opacity: 0.7;
100
- }
101
-
102
- .otp-input:focus {
103
- opacity: 1;
104
- }
105
-
106
- .btn-primary {
107
- display: flex;
108
- flex-direction: row;
109
- justify-content: center;
110
- align-items: center;
111
- padding: 1.42% 4.1%;
112
- width: 100%;
113
- height: 5.69%;
114
- min-height: 48px;
115
- background: #FCFCFC;
116
- border: none;
117
- font-family: 'Lora', serif;
118
- font-style: normal;
119
- font-weight: 600;
120
- font-size: clamp(14px, 4.1vw, 16px);
121
- line-height: 120%;
122
- color: #4F4CD8;
123
- cursor: pointer;
124
- transition: opacity 0.2s;
125
- }
126
-
127
- .btn-primary:hover {
128
- opacity: 0.9;
129
- }
130
-
131
- .btn-primary:active {
132
- opacity: 0.8;
133
- }
1
+ /* OtpScreen.css */
2
+ .otp-screen {
3
+ position: relative;
4
+ width: 100%;
5
+ height: 100%;
6
+ overflow: hidden;
7
+ display: flex;
8
+ flex-direction: column;
9
+ padding: clamp(20px, 3dvh, 32px) clamp(16px, 4.1vw, 20px) calc(clamp(32px, 5dvh, 48px) + env(safe-area-inset-bottom));
10
+ box-sizing: border-box;
11
+ }
12
+
13
+ /* Top logo area - 3% margin from top via padding */
14
+ .otp-screen__header {
15
+ flex: none;
16
+ width: 100%;
17
+ height: 3.79%;
18
+ min-height: 32px;
19
+ margin-bottom: 6%;
20
+ }
21
+
22
+ /* Middle hero section - grows to fill space */
23
+ .otp-screen__hero {
24
+ flex: 1;
25
+ display: flex;
26
+ flex-direction: column;
27
+ align-items: flex-start;
28
+ justify-content: center;
29
+ gap: 1.9%;
30
+ width: 100%;
31
+ }
32
+
33
+ .otp-screen__title {
34
+ width: 100%;
35
+ font-family: 'Lora', serif;
36
+ font-style: normal;
37
+ font-weight: 700;
38
+ font-size: clamp(48px, 18.46vw, 72px);
39
+ line-height: 1.28;
40
+ text-transform: capitalize;
41
+ background: linear-gradient(90deg, #FFFFFF 0%, #FFCC80 100%);
42
+ -webkit-background-clip: text;
43
+ -webkit-text-fill-color: transparent;
44
+ background-clip: text;
45
+ margin: 0;
46
+ white-space: normal;
47
+ word-wrap: break-word;
48
+ }
49
+
50
+ .otp-screen__subtitle {
51
+ width: 100%;
52
+ font-family: 'Lora', serif;
53
+ font-style: normal;
54
+ font-weight: 400;
55
+ font-size: clamp(14px, 4.1vw, 16px);
56
+ line-height: 1.2;
57
+ background: linear-gradient(90deg, #FFFFFF 0%, #FFCC80 100%);
58
+ -webkit-background-clip: text;
59
+ -webkit-text-fill-color: transparent;
60
+ background-clip: text;
61
+ margin: 0;
62
+ }
63
+
64
+ /* OTP Inputs */
65
+ .otp-inputs {
66
+ display: flex;
67
+ flex-direction: row;
68
+ align-items: flex-start;
69
+ gap: 0.95%;
70
+ width: 100%;
71
+ height: 5.69%;
72
+ min-height: 48px;
73
+ }
74
+
75
+ .otp-input {
76
+ box-sizing: border-box;
77
+ display: flex;
78
+ flex-direction: row;
79
+ justify-content: center;
80
+ align-items: center;
81
+ padding: 1.42% 4.1%;
82
+ flex: 1;
83
+ height: 100%;
84
+ border: 1px solid #FCFCFC;
85
+ background: transparent;
86
+ font-family: 'Lora', serif;
87
+ font-style: normal;
88
+ font-weight: 600;
89
+ font-size: clamp(14px, 4.1vw, 16px);
90
+ line-height: 120%;
91
+ color: #FCFCFC;
92
+ text-align: center;
93
+ outline: none;
94
+ width: 5.69%;
95
+ }
96
+
97
+ .otp-input::placeholder {
98
+ color: #FCFCFC;
99
+ opacity: 0.7;
100
+ }
101
+
102
+ .otp-input:focus {
103
+ opacity: 1;
104
+ }
105
+
106
+ .btn-primary {
107
+ display: flex;
108
+ flex-direction: row;
109
+ justify-content: center;
110
+ align-items: center;
111
+ padding: 1.42% 4.1%;
112
+ width: 100%;
113
+ height: 5.69%;
114
+ min-height: 48px;
115
+ background: #FCFCFC;
116
+ border: none;
117
+ font-family: 'Lora', serif;
118
+ font-style: normal;
119
+ font-weight: 600;
120
+ font-size: clamp(14px, 4.1vw, 16px);
121
+ line-height: 120%;
122
+ color: #4F4CD8;
123
+ cursor: pointer;
124
+ transition: opacity 0.2s;
125
+ }
126
+
127
+ .btn-primary:hover {
128
+ opacity: 0.9;
129
+ }
130
+
131
+ .btn-primary:active {
132
+ opacity: 0.8;
133
+ }
package/src/OtpScreen.tsx CHANGED
@@ -1,109 +1,109 @@
1
- import React, { useState, useRef, useEffect } from 'react';
2
- import { motion } from 'framer-motion';
3
- import { delayedFadeIn } from './utils';
4
- import Header from './components/Header';
5
- import './OtpScreen.css';
6
-
7
- interface OtpScreenProps {
8
- identifier: string;
9
- onSubmit: (otp: string) => void;
10
- onBack: () => void;
11
- }
12
-
13
- /**
14
- * OtpScreen - OTP verification with 6 input boxes
15
- */
16
- function OtpScreen({ identifier, onSubmit, onBack }: OtpScreenProps) {
17
- const [otp, setOtp] = useState<string[]>(['', '', '', '', '', '']);
18
- const inputRefs = useRef<(HTMLInputElement | null)[]>([]);
19
-
20
- useEffect(() => {
21
- // Focus first input on mount
22
- inputRefs.current[0]?.focus();
23
- }, []);
24
-
25
- const handleChange = (index: number, value: string) => {
26
- // Only accept single digit
27
- if (value.length > 1) return;
28
-
29
- const newOtp = [...otp];
30
- newOtp[index] = value;
31
- setOtp(newOtp);
32
-
33
- // Auto-focus next input
34
- if (value && index < 5) {
35
- inputRefs.current[index + 1]?.focus();
36
- }
37
- };
38
-
39
- const handleKeyDown = (index: number, e: React.KeyboardEvent<HTMLInputElement>) => {
40
- // Handle backspace
41
- if (e.key === 'Backspace' && !otp[index] && index > 0) {
42
- inputRefs.current[index - 1]?.focus();
43
- }
44
- };
45
-
46
- const handleSubmit = (e: React.FormEvent) => {
47
- e.preventDefault();
48
- const otpValue = otp.join('');
49
- if (otpValue.length === 6) {
50
- onSubmit(otpValue);
51
- }
52
- };
53
-
54
- return (
55
- <div className="otp-screen">
56
- {/* Top logo area */}
57
- <div className="otp-screen__header">
58
- <Header />
59
- </div>
60
-
61
- {/* Middle hero section */}
62
- <motion.div
63
- className="otp-screen__hero"
64
- variants={delayedFadeIn(0.2)}
65
- initial="initial"
66
- animate="animate"
67
- >
68
- <h1 className="otp-screen__title">Recap 25'</h1>
69
- <p className="otp-screen__subtitle">Check your email or WhatsApp and enter the 6-digit OTP below</p>
70
- </motion.div>
71
-
72
- {/* Bottom form section */}
73
- <motion.form
74
- className="login-screen__form"
75
- onSubmit={handleSubmit}
76
- variants={delayedFadeIn(0.4)}
77
- initial="initial"
78
- animate="animate"
79
- >
80
- <div className="form-group">
81
- <label htmlFor="otp-input-0" className="form-label">Enter OTP</label>
82
- <div className="otp-inputs">
83
- {otp.map((digit, index) => (
84
- <input
85
- key={index}
86
- id={index === 0 ? 'otp-input-0' : undefined}
87
- ref={el => { inputRefs.current[index] = el; }}
88
- type="text"
89
- inputMode="numeric"
90
- pattern="[0-9]*"
91
- maxLength={1}
92
- value={digit}
93
- onChange={(e) => handleChange(index, e.target.value)}
94
- onKeyDown={(e) => handleKeyDown(index, e)}
95
- className="otp-input"
96
- />
97
- ))}
98
- </div>
99
- </div>
100
-
101
- <button type="submit" className="btn-primary">
102
- Verify OTP
103
- </button>
104
- </motion.form>
105
- </div>
106
- );
107
- }
108
-
109
- export default OtpScreen;
1
+ import React, { useState, useRef, useEffect } from 'react';
2
+ import { motion } from 'framer-motion';
3
+ import { delayedFadeIn } from './utils';
4
+ import Header from './components/Header';
5
+ import './OtpScreen.css';
6
+
7
+ interface OtpScreenProps {
8
+ identifier: string;
9
+ onSubmit: (otp: string) => void;
10
+ onBack: () => void;
11
+ }
12
+
13
+ /**
14
+ * OtpScreen - OTP verification with 6 input boxes
15
+ */
16
+ function OtpScreen({ identifier, onSubmit, onBack }: OtpScreenProps) {
17
+ const [otp, setOtp] = useState<string[]>(['', '', '', '', '', '']);
18
+ const inputRefs = useRef<(HTMLInputElement | null)[]>([]);
19
+
20
+ useEffect(() => {
21
+ // Focus first input on mount
22
+ inputRefs.current[0]?.focus();
23
+ }, []);
24
+
25
+ const handleChange = (index: number, value: string) => {
26
+ // Only accept single digit
27
+ if (value.length > 1) return;
28
+
29
+ const newOtp = [...otp];
30
+ newOtp[index] = value;
31
+ setOtp(newOtp);
32
+
33
+ // Auto-focus next input
34
+ if (value && index < 5) {
35
+ inputRefs.current[index + 1]?.focus();
36
+ }
37
+ };
38
+
39
+ const handleKeyDown = (index: number, e: React.KeyboardEvent<HTMLInputElement>) => {
40
+ // Handle backspace
41
+ if (e.key === 'Backspace' && !otp[index] && index > 0) {
42
+ inputRefs.current[index - 1]?.focus();
43
+ }
44
+ };
45
+
46
+ const handleSubmit = (e: React.FormEvent) => {
47
+ e.preventDefault();
48
+ const otpValue = otp.join('');
49
+ if (otpValue.length === 6) {
50
+ onSubmit(otpValue);
51
+ }
52
+ };
53
+
54
+ return (
55
+ <div className="otp-screen">
56
+ {/* Top logo area */}
57
+ <div className="otp-screen__header">
58
+ <Header />
59
+ </div>
60
+
61
+ {/* Middle hero section */}
62
+ <motion.div
63
+ className="otp-screen__hero"
64
+ variants={delayedFadeIn(0.2)}
65
+ initial="initial"
66
+ animate="animate"
67
+ >
68
+ <h1 className="otp-screen__title">Recap 25'</h1>
69
+ <p className="otp-screen__subtitle">Check your email or WhatsApp and enter the 6-digit OTP below</p>
70
+ </motion.div>
71
+
72
+ {/* Bottom form section */}
73
+ <motion.form
74
+ className="login-screen__form"
75
+ onSubmit={handleSubmit}
76
+ variants={delayedFadeIn(0.4)}
77
+ initial="initial"
78
+ animate="animate"
79
+ >
80
+ <div className="form-group">
81
+ <label htmlFor="otp-input-0" className="form-label">Enter OTP</label>
82
+ <div className="otp-inputs">
83
+ {otp.map((digit, index) => (
84
+ <input
85
+ key={index}
86
+ id={index === 0 ? 'otp-input-0' : undefined}
87
+ ref={el => { inputRefs.current[index] = el; }}
88
+ type="text"
89
+ inputMode="numeric"
90
+ pattern="[0-9]*"
91
+ maxLength={1}
92
+ value={digit}
93
+ onChange={(e) => handleChange(index, e.target.value)}
94
+ onKeyDown={(e) => handleKeyDown(index, e)}
95
+ className="otp-input"
96
+ />
97
+ ))}
98
+ </div>
99
+ </div>
100
+
101
+ <button type="submit" className="btn-primary">
102
+ Verify OTP
103
+ </button>
104
+ </motion.form>
105
+ </div>
106
+ );
107
+ }
108
+
109
+ export default OtpScreen;
package/src/RecapApp.tsx CHANGED
@@ -1,34 +1,34 @@
1
- import React from 'react';
2
- import RecapStory from './RecapStory';
3
- import { RecapData } from './types';
4
- import './App.css';
5
-
6
- /**
7
- * RecapApp - Wrapper component that provides the app shell structure
8
- * Used in WebApp integration to match standalone design
9
- *
10
- * Provides:
11
- * - .app container
12
- * - .app__backdrop (desktop blur effect)
13
- * - .app__shell (390x844 phone frame)
14
- */
15
-
16
- interface RecapAppProps {
17
- recapData: RecapData;
18
- }
19
-
20
- function RecapApp({ recapData }: RecapAppProps) {
21
- return (
22
- <div className="app">
23
- {/* Desktop backdrop blur */}
24
- <div className="app__backdrop" />
25
-
26
- {/* Story shell (390x844 phone frame) */}
27
- <div className="app__shell">
28
- <RecapStory recapData={recapData} />
29
- </div>
30
- </div>
31
- );
32
- }
33
-
34
- export default RecapApp;
1
+ import React from 'react';
2
+ import RecapStory from './RecapStory';
3
+ import { RecapData } from './types';
4
+ import './App.css';
5
+
6
+ /**
7
+ * RecapApp - Wrapper component that provides the app shell structure
8
+ * Used in WebApp integration to match standalone design
9
+ *
10
+ * Provides:
11
+ * - .app container
12
+ * - .app__backdrop (desktop blur effect)
13
+ * - .app__shell (390x844 phone frame)
14
+ */
15
+
16
+ interface RecapAppProps {
17
+ recapData: RecapData;
18
+ }
19
+
20
+ function RecapApp({ recapData }: RecapAppProps) {
21
+ return (
22
+ <div className="app">
23
+ {/* Desktop backdrop blur */}
24
+ <div className="app__backdrop" />
25
+
26
+ {/* Story shell (390x844 phone frame) */}
27
+ <div className="app__shell">
28
+ <RecapStory recapData={recapData} />
29
+ </div>
30
+ </div>
31
+ );
32
+ }
33
+
34
+ export default RecapApp;