@katajere/recap 1.0.3 → 1.0.10

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 (65) hide show
  1. package/dist/App.css +156 -156
  2. package/dist/FloatingFrames.css +55 -55
  3. package/dist/LoginScreen.css +146 -146
  4. package/dist/OtpScreen.css +133 -133
  5. package/dist/RecapStory.css +105 -105
  6. package/dist/StoryProgress.css +47 -47
  7. package/dist/assets/huxxle-blue-logo.svg +14 -14
  8. package/dist/assets/login-logo.svg +14 -14
  9. package/dist/assets/slide-logo.svg +14 -14
  10. package/dist/components/Header.css +46 -46
  11. package/dist/slides/Slide10Final.css +101 -101
  12. package/dist/slides/Slide1Intro.css +235 -235
  13. package/dist/slides/Slide2Days.css +209 -209
  14. package/dist/slides/Slide3Revenue.css +89 -89
  15. package/dist/slides/Slide4Orders.css +135 -135
  16. package/dist/slides/Slide5Buyers.css +140 -140
  17. package/dist/slides/Slide6Customer.css +92 -92
  18. package/dist/slides/Slide7Products.css +144 -144
  19. package/dist/slides/Slide8Months.css +148 -148
  20. package/dist/slides/Slide9Year.css +93 -93
  21. package/package.json +1 -1
  22. package/src/App.css +156 -156
  23. package/src/FloatingFrames.css +55 -55
  24. package/src/FloatingFrames.tsx +27 -27
  25. package/src/LoginScreen.css +146 -146
  26. package/src/LoginScreen.tsx +70 -70
  27. package/src/OtpScreen.css +133 -133
  28. package/src/OtpScreen.tsx +109 -109
  29. package/src/RecapApp.tsx +34 -34
  30. package/src/RecapStory.css +105 -105
  31. package/src/RecapStory.tsx +269 -269
  32. package/src/StoryProgress.css +47 -47
  33. package/src/StoryProgress.tsx +60 -60
  34. package/src/assets.d.ts +41 -41
  35. package/src/components/Header.css +46 -46
  36. package/src/components/Header.tsx +41 -41
  37. package/src/data/mock.ts +62 -62
  38. package/src/data/recapCopy.ts +33 -33
  39. package/src/hooks/useBackgroundMusic.ts +79 -79
  40. package/src/index.ts +70 -70
  41. package/src/react-app-env.d.ts +26 -26
  42. package/src/slides/Slide10Final.css +101 -101
  43. package/src/slides/Slide10Final.tsx +105 -105
  44. package/src/slides/Slide1Intro.css +235 -235
  45. package/src/slides/Slide1Intro.tsx +141 -141
  46. package/src/slides/Slide2Days.css +209 -209
  47. package/src/slides/Slide2Days.tsx +92 -92
  48. package/src/slides/Slide3Revenue.css +89 -89
  49. package/src/slides/Slide3Revenue.tsx +76 -76
  50. package/src/slides/Slide4Orders.css +135 -135
  51. package/src/slides/Slide4Orders.tsx +63 -63
  52. package/src/slides/Slide5Buyers.css +140 -140
  53. package/src/slides/Slide5Buyers.tsx +74 -74
  54. package/src/slides/Slide6Customer.css +92 -92
  55. package/src/slides/Slide6Customer.tsx +27 -27
  56. package/src/slides/Slide7Products.css +144 -144
  57. package/src/slides/Slide7Products.tsx +81 -81
  58. package/src/slides/Slide8Months.css +148 -148
  59. package/src/slides/Slide8Months.tsx +63 -63
  60. package/src/slides/Slide9Year.css +93 -93
  61. package/src/slides/Slide9Year.tsx +35 -35
  62. package/src/types.ts +39 -39
  63. package/src/utils/format.ts +18 -18
  64. package/src/utils/index.ts +3 -3
  65. package/src/utils/motion.ts +89 -89
@@ -1,60 +1,60 @@
1
- import React, { useEffect, useState } from 'react';
2
- import { motion } from 'framer-motion';
3
- import './StoryProgress.css';
4
-
5
- interface StoryProgressProps {
6
- total: number;
7
- active: number;
8
- duration: number;
9
- onComplete: () => void;
10
- onBarClick: (index: number) => void;
11
- hideBorder?: boolean;
12
- }
13
-
14
- /**
15
- * StoryProgress - Story-style progress bars at the top
16
- */
17
- function StoryProgress({ total, active, duration, onComplete, onBarClick, hideBorder }: StoryProgressProps) {
18
- const [key, setKey] = useState(0);
19
-
20
- // Reset animation key when active slide changes
21
- useEffect(() => {
22
- setKey(prev => prev + 1);
23
- }, [active]);
24
-
25
- return (
26
- <div className={`story-progress${hideBorder ? ' story-progress--no-border' : ''}`}>
27
- {Array.from({ length: total }).map((_, index) => {
28
- const isActive = index === active;
29
- const isCompleted = index < active;
30
-
31
- return (
32
- <div
33
- key={index}
34
- className="story-progress__bar-container"
35
- onClick={() => onBarClick(index)}
36
- >
37
- <div className={`story-progress__bar ${isCompleted ? 'completed' : ''}`}>
38
- {isActive && (
39
- <motion.div
40
- key={key}
41
- className="story-progress__bar-fill"
42
- initial={{ scaleX: 0 }}
43
- animate={{ scaleX: 1 }}
44
- transition={{
45
- duration: duration,
46
- ease: 'linear'
47
- }}
48
- onAnimationComplete={onComplete}
49
- style={{ transformOrigin: 'left' }}
50
- />
51
- )}
52
- </div>
53
- </div>
54
- );
55
- })}
56
- </div>
57
- );
58
- }
59
-
60
- export default StoryProgress;
1
+ import React, { useEffect, useState } from 'react';
2
+ import { motion } from 'framer-motion';
3
+ import './StoryProgress.css';
4
+
5
+ interface StoryProgressProps {
6
+ total: number;
7
+ active: number;
8
+ duration: number;
9
+ onComplete: () => void;
10
+ onBarClick: (index: number) => void;
11
+ hideBorder?: boolean;
12
+ }
13
+
14
+ /**
15
+ * StoryProgress - Story-style progress bars at the top
16
+ */
17
+ function StoryProgress({ total, active, duration, onComplete, onBarClick, hideBorder }: StoryProgressProps) {
18
+ const [key, setKey] = useState(0);
19
+
20
+ // Reset animation key when active slide changes
21
+ useEffect(() => {
22
+ setKey(prev => prev + 1);
23
+ }, [active]);
24
+
25
+ return (
26
+ <div className={`story-progress${hideBorder ? ' story-progress--no-border' : ''}`}>
27
+ {Array.from({ length: total }).map((_, index) => {
28
+ const isActive = index === active;
29
+ const isCompleted = index < active;
30
+
31
+ return (
32
+ <div
33
+ key={index}
34
+ className="story-progress__bar-container"
35
+ onClick={() => onBarClick(index)}
36
+ >
37
+ <div className={`story-progress__bar ${isCompleted ? 'completed' : ''}`}>
38
+ {isActive && (
39
+ <motion.div
40
+ key={key}
41
+ className="story-progress__bar-fill"
42
+ initial={{ scaleX: 0 }}
43
+ animate={{ scaleX: 1 }}
44
+ transition={{
45
+ duration: duration,
46
+ ease: 'linear'
47
+ }}
48
+ onAnimationComplete={onComplete}
49
+ style={{ transformOrigin: 'left' }}
50
+ />
51
+ )}
52
+ </div>
53
+ </div>
54
+ );
55
+ })}
56
+ </div>
57
+ );
58
+ }
59
+
60
+ export default StoryProgress;
package/src/assets.d.ts CHANGED
@@ -1,41 +1,41 @@
1
- /**
2
- * Type declarations for asset imports
3
- * Tells TypeScript how to handle SVG, GIF, PNG, and other static assets
4
- */
5
-
6
- declare module '*.svg' {
7
- import * as React from 'react';
8
- export const ReactComponent: React.FunctionComponent<React.SVGProps<SVGSVGElement>>;
9
- const content: string;
10
- export default content;
11
- }
12
-
13
- declare module '*.gif' {
14
- const content: string;
15
- export default content;
16
- }
17
-
18
- declare module '*.png' {
19
- const content: string;
20
- export default content;
21
- }
22
-
23
- declare module '*.jpg' {
24
- const content: string;
25
- export default content;
26
- }
27
-
28
- declare module '*.jpeg' {
29
- const content: string;
30
- export default content;
31
- }
32
-
33
- declare module '*.webp' {
34
- const content: string;
35
- export default content;
36
- }
37
-
38
- declare module '*.mp3' {
39
- const src: string;
40
- export default src;
41
- }
1
+ /**
2
+ * Type declarations for asset imports
3
+ * Tells TypeScript how to handle SVG, GIF, PNG, and other static assets
4
+ */
5
+
6
+ declare module '*.svg' {
7
+ import * as React from 'react';
8
+ export const ReactComponent: React.FunctionComponent<React.SVGProps<SVGSVGElement>>;
9
+ const content: string;
10
+ export default content;
11
+ }
12
+
13
+ declare module '*.gif' {
14
+ const content: string;
15
+ export default content;
16
+ }
17
+
18
+ declare module '*.png' {
19
+ const content: string;
20
+ export default content;
21
+ }
22
+
23
+ declare module '*.jpg' {
24
+ const content: string;
25
+ export default content;
26
+ }
27
+
28
+ declare module '*.jpeg' {
29
+ const content: string;
30
+ export default content;
31
+ }
32
+
33
+ declare module '*.webp' {
34
+ const content: string;
35
+ export default content;
36
+ }
37
+
38
+ declare module '*.mp3' {
39
+ const src: string;
40
+ export default src;
41
+ }
@@ -1,46 +1,46 @@
1
- /* Header styles */
2
- .header {
3
- display: flex;
4
- flex-direction: row;
5
- align-items: center;
6
- justify-content: space-between;
7
- width: 100%;
8
- min-height: 32px;
9
- gap: 16px;
10
- }
11
-
12
- /* Logo image - contains both icon and text */
13
- .header__logo {
14
- height: 24px;
15
- width: auto;
16
- object-fit: contain;
17
- flex-shrink: 0;
18
- }
19
-
20
- .header__badge {
21
- font-family: 'Lora', serif;
22
- font-style: normal;
23
- font-weight: 700;
24
- font-size: clamp(14px, 5.13vw, 20px);
25
- line-height: 1.2;
26
- background-image: linear-gradient(90deg, #FFFFFF 0%, #FFCC80 100%);
27
- -webkit-background-clip: text;
28
- -webkit-text-fill-color: transparent;
29
- background-clip: text;
30
- color: transparent;
31
- white-space: normal;
32
- word-wrap: break-word;
33
- flex-shrink: 0;
34
- }
35
-
36
- @media (max-width: 360px) {
37
- .header__badge {
38
- white-space: nowrap;
39
- }
40
- }
41
-
42
- .header--new-user .header__badge {
43
- background-image: linear-gradient(90deg, #4F4CD8 0%, #FF9900 100%);
44
- background-size: 100%;
45
- background-position: 0;
46
- }
1
+ /* Header styles */
2
+ .header {
3
+ display: flex;
4
+ flex-direction: row;
5
+ align-items: center;
6
+ justify-content: space-between;
7
+ width: 100%;
8
+ min-height: 32px;
9
+ gap: 16px;
10
+ }
11
+
12
+ /* Logo image - contains both icon and text */
13
+ .header__logo {
14
+ height: 24px;
15
+ width: auto;
16
+ object-fit: contain;
17
+ flex-shrink: 0;
18
+ }
19
+
20
+ .header__badge {
21
+ font-family: 'Lora', serif;
22
+ font-style: normal;
23
+ font-weight: 700;
24
+ font-size: clamp(14px, 5.13vw, 20px);
25
+ line-height: 1.2;
26
+ background-image: linear-gradient(90deg, #FFFFFF 0%, #FFCC80 100%);
27
+ -webkit-background-clip: text;
28
+ -webkit-text-fill-color: transparent;
29
+ background-clip: text;
30
+ color: transparent;
31
+ white-space: normal;
32
+ word-wrap: break-word;
33
+ flex-shrink: 0;
34
+ }
35
+
36
+ @media (max-width: 360px) {
37
+ .header__badge {
38
+ white-space: nowrap;
39
+ }
40
+ }
41
+
42
+ .header--new-user .header__badge {
43
+ background-image: linear-gradient(90deg, #4F4CD8 0%, #FF9900 100%);
44
+ background-size: 100%;
45
+ background-position: 0;
46
+ }
@@ -1,41 +1,41 @@
1
- import React from 'react';
2
- import './Header.css';
3
- import loginLogo from '../assets/login-logo.svg';
4
- import slideLogo from '../assets/slide-logo.svg';
5
- import huxxleBlueLogo from '../assets/huxxle-blue-logo.svg';
6
-
7
- interface HeaderProps {
8
- showRecapBadge?: boolean;
9
- badgeVariant?: 'default' | 'new-user';
10
- }
11
-
12
- /**
13
- * Header - Top navigation with logo and optional Recap 25' badge
14
- * Uses different logos for login/OTP screens vs recap slides
15
- */
16
- function Header({ showRecapBadge = false, badgeVariant = 'default' }: HeaderProps) {
17
- const logoSrc = showRecapBadge
18
- ? badgeVariant === 'new-user'
19
- ? huxxleBlueLogo
20
- : slideLogo
21
- : loginLogo;
22
-
23
- const headerClasses = ['header'];
24
- if (showRecapBadge) {
25
- headerClasses.push('header--with-badge');
26
- }
27
- if (badgeVariant === 'new-user') {
28
- headerClasses.push('header--new-user');
29
- }
30
-
31
- return (
32
- <header className={headerClasses.join(' ')}>
33
- <img src={logoSrc} alt="Huxxle" className="header__logo" />
34
- {showRecapBadge && (
35
- <div className="header__badge">Recap 25'</div>
36
- )}
37
- </header>
38
- );
39
- }
40
-
41
- export default Header;
1
+ import React from 'react';
2
+ import './Header.css';
3
+ import loginLogo from '../assets/login-logo.svg';
4
+ import slideLogo from '../assets/slide-logo.svg';
5
+ import huxxleBlueLogo from '../assets/huxxle-blue-logo.svg';
6
+
7
+ interface HeaderProps {
8
+ showRecapBadge?: boolean;
9
+ badgeVariant?: 'default' | 'new-user';
10
+ }
11
+
12
+ /**
13
+ * Header - Top navigation with logo and optional Recap 25' badge
14
+ * Uses different logos for login/OTP screens vs recap slides
15
+ */
16
+ function Header({ showRecapBadge = false, badgeVariant = 'default' }: HeaderProps) {
17
+ const logoSrc = showRecapBadge
18
+ ? badgeVariant === 'new-user'
19
+ ? huxxleBlueLogo
20
+ : slideLogo
21
+ : loginLogo;
22
+
23
+ const headerClasses = ['header'];
24
+ if (showRecapBadge) {
25
+ headerClasses.push('header--with-badge');
26
+ }
27
+ if (badgeVariant === 'new-user') {
28
+ headerClasses.push('header--new-user');
29
+ }
30
+
31
+ return (
32
+ <header className={headerClasses.join(' ')}>
33
+ <img src={logoSrc} alt="Huxxle" className="header__logo" />
34
+ {showRecapBadge && (
35
+ <div className="header__badge">Recap 25'</div>
36
+ )}
37
+ </header>
38
+ );
39
+ }
40
+
41
+ export default Header;
package/src/data/mock.ts CHANGED
@@ -1,62 +1,62 @@
1
- import { BUSINESS_CATEGORIES } from '../types';
2
- import type { RecapData } from '../types';
3
-
4
- /**
5
- * Mock data for the recap experience
6
- * This will be replaced with real API data later
7
- */
8
- export const mockRecapData: RecapData = {
9
- businessName: 'RICHYO ENTERPRISES',
10
- days: 259,
11
- streak: 47,
12
- revenue: 22594123,
13
- orders: 487,
14
- firstTimeBuyers: 234,
15
- repeatBuyers: 65,
16
- topCustomerName: 'Micheal Scoffy',
17
- topProducts: [
18
- {
19
- name: 'Vanilla Yoghurt',
20
- units: 45,
21
- productImage: 'https://images.unsplash.com/photo-1447078806655-40579c2520d6?auto=format&fit=crop&w=400&q=80'
22
- },
23
- {
24
- name: 'Cocoa Milkshake',
25
- units: 38,
26
- productImage: 'https://images.unsplash.com/photo-1504674900247-0877df9cc836?auto=format&fit=crop&w=400&q=80'
27
- },
28
- {
29
- name: 'Spicy Crunch',
30
- units: 33,
31
- productImage: 'https://images.unsplash.com/photo-1447078806655-40579c2520d6?auto=format&fit=crop&w=400&q=80'
32
- },
33
- {
34
- name: 'Fresh Plantain Chips',
35
- units: 29,
36
- productImage: 'https://images.unsplash.com/photo-1506084868230-bb9d95c24759?auto=format&fit=crop&w=400&q=80'
37
- },
38
- {
39
- name: 'Mango Juice',
40
- units: 27,
41
- productImage: 'https://images.unsplash.com/photo-1447078806655-40579c2520d6?auto=format&fit=crop&w=400&q=80'
42
- }
43
- ],
44
- businessCategory: BUSINESS_CATEGORIES.THRIVING,
45
- busiestMonth: 'Oct',
46
- videoUrl: 'https://katajereassets.blob.core.windows.net/sp-list-assets/mocksite_walkthrough_a75c98dd-47ef-4f2c-a97c-ab2b3c3c97a5_2315a6b2d671d142f34e08cad43929c5.mp4',
47
- downloadUrl: 'https://api.huxxle.com/api/download?fileUrl=https://katajereassets.blob.core.windows.net/sp-list-assets/mocksite_walkthrough_a75c98dd-47ef-4f2c-a97c-ab2b3c3c97a5_2315a6b2d671d142f34e08cad43929c5.mp4'
48
- };
49
-
50
- // Slide durations in seconds - each slide can have its own timing
51
- export const slideDurations: Record<string, number> = {
52
- intro: 8,
53
- days: 8,
54
- revenue: 8,
55
- orders: 8,
56
- buyers: 8,
57
- customer: 8,
58
- products: 8,
59
- months: 8,
60
- year: 8,
61
- final: 8
62
- };
1
+ import { BUSINESS_CATEGORIES } from '../types';
2
+ import type { RecapData } from '../types';
3
+
4
+ /**
5
+ * Mock data for the recap experience
6
+ * This will be replaced with real API data later
7
+ */
8
+ export const mockRecapData: RecapData = {
9
+ businessName: 'RICHYO ENTERPRISES',
10
+ days: 259,
11
+ streak: 47,
12
+ revenue: 22594123,
13
+ orders: 487,
14
+ firstTimeBuyers: 234,
15
+ repeatBuyers: 65,
16
+ topCustomerName: 'Micheal Scoffy',
17
+ topProducts: [
18
+ {
19
+ name: 'Vanilla Yoghurt',
20
+ units: 45,
21
+ productImage: 'https://images.unsplash.com/photo-1447078806655-40579c2520d6?auto=format&fit=crop&w=400&q=80'
22
+ },
23
+ {
24
+ name: 'Cocoa Milkshake',
25
+ units: 38,
26
+ productImage: 'https://images.unsplash.com/photo-1504674900247-0877df9cc836?auto=format&fit=crop&w=400&q=80'
27
+ },
28
+ {
29
+ name: 'Spicy Crunch',
30
+ units: 33,
31
+ productImage: 'https://images.unsplash.com/photo-1447078806655-40579c2520d6?auto=format&fit=crop&w=400&q=80'
32
+ },
33
+ {
34
+ name: 'Fresh Plantain Chips',
35
+ units: 29,
36
+ productImage: 'https://images.unsplash.com/photo-1506084868230-bb9d95c24759?auto=format&fit=crop&w=400&q=80'
37
+ },
38
+ {
39
+ name: 'Mango Juice',
40
+ units: 27,
41
+ productImage: 'https://images.unsplash.com/photo-1447078806655-40579c2520d6?auto=format&fit=crop&w=400&q=80'
42
+ }
43
+ ],
44
+ businessCategory: BUSINESS_CATEGORIES.THRIVING,
45
+ busiestMonth: 'Oct',
46
+ videoUrl: 'https://katajereassets.blob.core.windows.net/sp-list-assets/mocksite_walkthrough_a75c98dd-47ef-4f2c-a97c-ab2b3c3c97a5_2315a6b2d671d142f34e08cad43929c5.mp4',
47
+ downloadUrl: 'https://api.huxxle.com/api/download?fileUrl=https://katajereassets.blob.core.windows.net/sp-list-assets/mocksite_walkthrough_a75c98dd-47ef-4f2c-a97c-ab2b3c3c97a5_2315a6b2d671d142f34e08cad43929c5.mp4'
48
+ };
49
+
50
+ // Slide durations in seconds - each slide can have its own timing
51
+ export const slideDurations: Record<string, number> = {
52
+ intro: 8,
53
+ days: 8,
54
+ revenue: 8,
55
+ orders: 8,
56
+ buyers: 8,
57
+ customer: 8,
58
+ products: 8,
59
+ months: 8,
60
+ year: 8,
61
+ final: 8
62
+ };
@@ -1,33 +1,33 @@
1
- import { BusinessCategory } from '../types';
2
-
3
- export interface RecapSlideCopy {
4
- introHeadline: string;
5
- introSubtitle: string;
6
- introVariant: 'default' | 'struggling' | 'new-user';
7
- revenueFooter: string;
8
- yearHeadline: string;
9
- }
10
-
11
- export const recapCopy: Record<BusinessCategory, RecapSlideCopy> = {
12
- thriving: {
13
- introHeadline: 'This Year You Carry Your Hustle For Head',
14
- introSubtitle: 'Make we look the numbers 🔥',
15
- introVariant: 'default',
16
- revenueFooter: 'More money dey come!',
17
- yearHeadline: 'You really kill am this year, You are the real MVP'
18
- },
19
- not_thriving: {
20
- introHeadline: 'Omoor! We See Your Hustle, But….',
21
- introSubtitle: 'Make we talk small 🤫',
22
- introVariant: 'struggling',
23
- revenueFooter: 'Consistency go pay, we dey your back.',
24
- yearHeadline: 'This year rough, but you are the real MVP'
25
- },
26
- new_user: {
27
- introHeadline: 'You Be New Face OOO....',
28
- introSubtitle: 'Come back for 6 days time, we dey for you 😉',
29
- introVariant: 'new-user',
30
- revenueFooter: 'Draft the plan, then the sales go follow.',
31
- yearHeadline: 'You really kill am this year, You are the real MVP'
32
- }
33
- };
1
+ import { BusinessCategory } from '../types';
2
+
3
+ export interface RecapSlideCopy {
4
+ introHeadline: string;
5
+ introSubtitle: string;
6
+ introVariant: 'default' | 'struggling' | 'new-user';
7
+ revenueFooter: string;
8
+ yearHeadline: string;
9
+ }
10
+
11
+ export const recapCopy: Record<BusinessCategory, RecapSlideCopy> = {
12
+ thriving: {
13
+ introHeadline: 'This Year You Carry Your Hustle For Head',
14
+ introSubtitle: 'Make we look the numbers 🔥',
15
+ introVariant: 'default',
16
+ revenueFooter: 'More money dey come!',
17
+ yearHeadline: 'You really kill am this year, You are the real MVP'
18
+ },
19
+ not_thriving: {
20
+ introHeadline: 'Omoor! We See Your Hustle, But….',
21
+ introSubtitle: 'Make we talk small 🤫',
22
+ introVariant: 'struggling',
23
+ revenueFooter: 'Consistency go pay, we dey your back.',
24
+ yearHeadline: 'This year rough, but you are the real MVP'
25
+ },
26
+ new_user: {
27
+ introHeadline: 'You Be New Face OOO....',
28
+ introSubtitle: 'Come back for 6 days time, we dey for you 😉',
29
+ introVariant: 'new-user',
30
+ revenueFooter: 'Draft the plan, then the sales go follow.',
31
+ yearHeadline: 'You really kill am this year, You are the real MVP'
32
+ }
33
+ };