@katajere/recap 1.0.12 → 1.0.14
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.
- package/dist/App.css +10 -10
- package/dist/RecapStory.d.ts +2 -2
- package/dist/RecapStory.d.ts.map +1 -1
- package/dist/RecapStory.js +121 -66
- package/dist/StoryProgress.d.ts +3 -2
- package/dist/StoryProgress.d.ts.map +1 -1
- package/dist/StoryProgress.js +66 -12
- package/dist/components/Header.d.ts +2 -1
- package/dist/components/Header.d.ts.map +1 -1
- package/dist/components/Header.js +3 -2
- package/dist/data/mock.d.ts +1 -1
- package/dist/data/mock.d.ts.map +1 -1
- package/dist/data/mock.js +24 -19
- package/dist/data/recapCopy.js +1 -1
- package/dist/slides/Slide10Final.d.ts +2 -1
- package/dist/slides/Slide10Final.d.ts.map +1 -1
- package/dist/slides/Slide10Final.js +8 -7
- package/dist/slides/Slide1Intro.css +44 -0
- package/dist/slides/Slide1Intro.d.ts +3 -1
- package/dist/slides/Slide1Intro.d.ts.map +1 -1
- package/dist/slides/Slide1Intro.js +11 -4
- package/dist/slides/Slide3Revenue.d.ts +2 -1
- package/dist/slides/Slide3Revenue.d.ts.map +1 -1
- package/dist/slides/Slide3Revenue.js +2 -2
- package/dist/slides/Slide9Year.d.ts +2 -1
- package/dist/slides/Slide9Year.d.ts.map +1 -1
- package/dist/slides/Slide9Year.js +4 -2
- package/dist/types.d.ts +6 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/utils/format.d.ts +5 -2
- package/dist/utils/format.d.ts.map +1 -1
- package/dist/utils/format.js +7 -4
- package/package.json +1 -1
- package/src/App.css +10 -10
- package/src/RecapStory.tsx +157 -89
- package/src/StoryProgress.tsx +96 -21
- package/src/components/Header.tsx +4 -2
- package/src/data/mock.ts +32 -20
- package/src/data/recapCopy.ts +1 -1
- package/src/slides/Slide10Final.tsx +9 -6
- package/src/slides/Slide1Intro.css +44 -0
- package/src/slides/Slide1Intro.tsx +27 -4
- package/src/slides/Slide3Revenue.tsx +3 -2
- package/src/slides/Slide9Year.tsx +5 -2
- package/src/types.ts +6 -0
- package/src/utils/format.ts +7 -4
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import './Slide10Final.css';
|
|
3
|
-
function Slide10Final({ videoUrl, downloadUrl, onReplay }) {
|
|
3
|
+
function Slide10Final({ videoUrl, downloadUrl, onReplay, year }) {
|
|
4
|
+
const displayYear = year ?? 2025;
|
|
4
5
|
const handleShare = async () => {
|
|
5
6
|
try {
|
|
6
7
|
// Fetch the media as a blob
|
|
@@ -9,7 +10,7 @@ function Slide10Final({ videoUrl, downloadUrl, onReplay }) {
|
|
|
9
10
|
// Determine the file type (video/image)
|
|
10
11
|
const fileExtension = videoUrl.split('.').pop()?.toLowerCase() || 'mp4';
|
|
11
12
|
const mimeType = fileExtension === 'mp4' ? 'video/mp4' : 'image/jpeg';
|
|
12
|
-
const fileName = `huxxle-wrapped
|
|
13
|
+
const fileName = `huxxle-wrapped-${displayYear}.${fileExtension}`;
|
|
13
14
|
// Create a File object (required for WhatsApp Status)
|
|
14
15
|
const file = new File([blob], fileName, {
|
|
15
16
|
type: mimeType
|
|
@@ -25,7 +26,7 @@ function Slide10Final({ videoUrl, downloadUrl, onReplay }) {
|
|
|
25
26
|
await navigator.share({
|
|
26
27
|
files: [file],
|
|
27
28
|
title: 'My Huxxle Recap',
|
|
28
|
-
text:
|
|
29
|
+
text: `Check out my Wrapped ${displayYear} highlights! 🎉`
|
|
29
30
|
});
|
|
30
31
|
return;
|
|
31
32
|
}
|
|
@@ -33,7 +34,7 @@ function Slide10Final({ videoUrl, downloadUrl, onReplay }) {
|
|
|
33
34
|
if (typeof navigator !== 'undefined' && navigator.share) {
|
|
34
35
|
await navigator.share({
|
|
35
36
|
title: 'My Huxxle Recap',
|
|
36
|
-
text:
|
|
37
|
+
text: `Check out my Wrapped ${displayYear} highlights! 🎉`,
|
|
37
38
|
url: videoUrl
|
|
38
39
|
});
|
|
39
40
|
return;
|
|
@@ -54,7 +55,7 @@ function Slide10Final({ videoUrl, downloadUrl, onReplay }) {
|
|
|
54
55
|
const handleDownload = () => {
|
|
55
56
|
const anchor = document.createElement('a');
|
|
56
57
|
anchor.href = downloadUrl;
|
|
57
|
-
anchor.download =
|
|
58
|
+
anchor.download = `huxxle-wrapped-${displayYear}.mp4`;
|
|
58
59
|
anchor.target = '_blank';
|
|
59
60
|
document.body.appendChild(anchor);
|
|
60
61
|
anchor.click();
|
|
@@ -63,6 +64,6 @@ function Slide10Final({ videoUrl, downloadUrl, onReplay }) {
|
|
|
63
64
|
const handleLearnMore = () => {
|
|
64
65
|
window.open('https://www.huxxle.com', '_blank', 'noopener');
|
|
65
66
|
};
|
|
66
|
-
return (_jsxs("div", { className: "slide10-final", children: [
|
|
67
|
+
return (_jsxs("div", { className: "slide10-final", children: [_jsxs("div", { className: "slide10-final__badge", children: ["WRAPPED ", displayYear] }), _jsx("div", { className: "slide10-final__title", children: "Your#1 AI Business Assistant" }), _jsxs("div", { className: "slide10-final__button-group", children: [_jsx("button", { className: "slide10-final__button slide10-final__button--replay", onClick: onReplay, children: "Replay" }), _jsx("button", { className: "slide10-final__button", onClick: handleShare, children: "Share Your Wrapped" }), _jsx("button", { className: "slide10-final__button", onClick: handleDownload, children: "Download Cards" }), _jsx("button", { className: "slide10-final__button", onClick: handleLearnMore, children: "Learn More on Huxxle" })] })] }));
|
|
67
68
|
}
|
|
68
69
|
export default Slide10Final;
|
|
@@ -233,3 +233,47 @@
|
|
|
233
233
|
top: clamp(420px, 70dvh, 520px);
|
|
234
234
|
} */
|
|
235
235
|
}
|
|
236
|
+
|
|
237
|
+
/* New User CTA Button */
|
|
238
|
+
.slide1-intro__cta-button {
|
|
239
|
+
position: absolute;
|
|
240
|
+
left: 0;
|
|
241
|
+
right: 0;
|
|
242
|
+
bottom: calc(32px + env(safe-area-inset-bottom));
|
|
243
|
+
margin: 0 auto;
|
|
244
|
+
width: min(320px, calc(100% - 32px));
|
|
245
|
+
padding: 14px 20px;
|
|
246
|
+
text-align: center;
|
|
247
|
+
background: linear-gradient(90deg, #4F4CD8 0%, #3F3DAD 100%);
|
|
248
|
+
border: none;
|
|
249
|
+
/* border-radius: 12px; */
|
|
250
|
+
font-family: 'Lora', serif;
|
|
251
|
+
font-weight: 600;
|
|
252
|
+
font-size: clamp(16px, 4.1vw, 18px);
|
|
253
|
+
color: #FFFFFF;
|
|
254
|
+
cursor: pointer;
|
|
255
|
+
z-index: 10;
|
|
256
|
+
box-shadow: 0 4px 12px rgba(63, 61, 173, 0.3);
|
|
257
|
+
transition: all 0.3s ease;
|
|
258
|
+
white-space: nowrap;
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
.slide1-intro__cta-button:hover {
|
|
262
|
+
transform: translateX(-50%) translateY(-2px);
|
|
263
|
+
box-shadow: 0 6px 16px rgba(63, 61, 173, 0.4);
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
.slide1-intro__cta-button:active {
|
|
267
|
+
transform: translateX(-50%) translateY(0);
|
|
268
|
+
box-shadow: 0 2px 8px rgba(63, 61, 173, 0.3);
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
.slide1-intro--new-user .slide1-intro__cta-button {
|
|
272
|
+
background: linear-gradient(90deg, #E6E5F9 0%, #CDCCF4 100%);
|
|
273
|
+
color: #2A2872;
|
|
274
|
+
box-shadow: 0 4px 12px rgba(230, 229, 249, 0.3);
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
.slide1-intro--new-user .slide1-intro__cta-button:hover {
|
|
278
|
+
box-shadow: 0 6px 16px rgba(230, 229, 249, 0.4);
|
|
279
|
+
}
|
|
@@ -3,11 +3,13 @@ import './Slide1Intro.css';
|
|
|
3
3
|
interface Slide1IntroProps {
|
|
4
4
|
businessName: string;
|
|
5
5
|
businessCategory: BusinessCategory;
|
|
6
|
+
introHeadline?: string;
|
|
7
|
+
introSubtitle?: string;
|
|
6
8
|
onDurationCalculated?: (duration: number) => void;
|
|
7
9
|
}
|
|
8
10
|
/**
|
|
9
11
|
* Slide1Intro - Identity slide with business name and category-based messaging
|
|
10
12
|
*/
|
|
11
|
-
declare function Slide1Intro({ businessName, businessCategory, onDurationCalculated }: Slide1IntroProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
declare function Slide1Intro({ businessName, businessCategory, introHeadline, introSubtitle, onDurationCalculated }: Slide1IntroProps): import("react/jsx-runtime").JSX.Element;
|
|
12
14
|
export default Slide1Intro;
|
|
13
15
|
//# sourceMappingURL=Slide1Intro.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Slide1Intro.d.ts","sourceRoot":"","sources":["../../src/slides/Slide1Intro.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAuB,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAEjE,OAAO,mBAAmB,CAAC;AAE3B,UAAU,gBAAgB;IACxB,YAAY,EAAE,MAAM,CAAC;IACrB,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,oBAAoB,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;CACnD;AAED;;GAEG;AACH,iBAAS,WAAW,CAAC,EAAE,YAAY,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,EAAE,gBAAgB,
|
|
1
|
+
{"version":3,"file":"Slide1Intro.d.ts","sourceRoot":"","sources":["../../src/slides/Slide1Intro.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAuB,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAEjE,OAAO,mBAAmB,CAAC;AAE3B,UAAU,gBAAgB;IACxB,YAAY,EAAE,MAAM,CAAC;IACrB,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,oBAAoB,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;CACnD;AAED;;GAEG;AACH,iBAAS,WAAW,CAAC,EAAE,YAAY,EAAE,gBAAgB,EAAE,aAAa,EAAE,aAAa,EAAE,oBAAoB,EAAE,EAAE,gBAAgB,2CA+I5H;AAED,eAAe,WAAW,CAAC"}
|
|
@@ -8,10 +8,11 @@ import './Slide1Intro.css';
|
|
|
8
8
|
/**
|
|
9
9
|
* Slide1Intro - Identity slide with business name and category-based messaging
|
|
10
10
|
*/
|
|
11
|
-
function Slide1Intro({ businessName, businessCategory, onDurationCalculated }) {
|
|
12
|
-
// Dynamic messaging
|
|
11
|
+
function Slide1Intro({ businessName, businessCategory, introHeadline, introSubtitle, onDurationCalculated }) {
|
|
12
|
+
// Dynamic messaging: use props if provided, otherwise fall back to recapCopy
|
|
13
13
|
const copy = recapCopy[businessCategory] ?? recapCopy[BUSINESS_CATEGORIES.THRIVING];
|
|
14
|
-
const headline = copy.introHeadline;
|
|
14
|
+
const headline = introHeadline ?? copy.introHeadline;
|
|
15
|
+
const subtitle = introSubtitle ?? copy.introSubtitle;
|
|
15
16
|
const [brandWidth, setBrandWidth] = useState(0);
|
|
16
17
|
const [headlineWidth, setHeadlineWidth] = useState(0);
|
|
17
18
|
const brandRef = useRef(null);
|
|
@@ -56,6 +57,12 @@ function Slide1Intro({ businessName, businessCategory, onDurationCalculated }) {
|
|
|
56
57
|
}
|
|
57
58
|
}, [dynamicSlideDuration, brandWidth, headlineWidth, onDurationCalculated]);
|
|
58
59
|
const slideClass = `slide1-intro slide1-intro--${copy.introVariant}`;
|
|
59
|
-
|
|
60
|
+
const isNewUser = businessCategory === BUSINESS_CATEGORIES.NEW_USER;
|
|
61
|
+
const handleContinue = () => {
|
|
62
|
+
if (typeof window !== 'undefined') {
|
|
63
|
+
window.location.href = 'https://vendor.huxxle.com';
|
|
64
|
+
}
|
|
65
|
+
};
|
|
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" }))] }));
|
|
60
67
|
}
|
|
61
68
|
export default Slide1Intro;
|
|
@@ -3,10 +3,11 @@ import './Slide3Revenue.css';
|
|
|
3
3
|
interface Slide3RevenueProps {
|
|
4
4
|
revenue: number;
|
|
5
5
|
businessCategory: BusinessCategory;
|
|
6
|
+
currency?: string;
|
|
6
7
|
}
|
|
7
8
|
/**
|
|
8
9
|
* Slide3Revenue - Revenue display with money rain overlay
|
|
9
10
|
*/
|
|
10
|
-
declare function Slide3Revenue({ revenue, businessCategory }: Slide3RevenueProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
declare function Slide3Revenue({ revenue, businessCategory, currency }: Slide3RevenueProps): import("react/jsx-runtime").JSX.Element;
|
|
11
12
|
export default Slide3Revenue;
|
|
12
13
|
//# sourceMappingURL=Slide3Revenue.d.ts.map
|
|
@@ -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;
|
|
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"}
|
|
@@ -8,9 +8,9 @@ import moneyRainGif from '../assets/raining-money.gif';
|
|
|
8
8
|
/**
|
|
9
9
|
* Slide3Revenue - Revenue display with money rain overlay
|
|
10
10
|
*/
|
|
11
|
-
function Slide3Revenue({ revenue, businessCategory }) {
|
|
11
|
+
function Slide3Revenue({ revenue, businessCategory, currency }) {
|
|
12
12
|
const copy = recapCopy[businessCategory] ?? recapCopy[BUSINESS_CATEGORIES.THRIVING];
|
|
13
13
|
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) }), _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 })] }));
|
|
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 })] }));
|
|
15
15
|
}
|
|
16
16
|
export default Slide3Revenue;
|
|
@@ -2,7 +2,8 @@ import './Slide9Year.css';
|
|
|
2
2
|
import type { BusinessCategory } from '../types';
|
|
3
3
|
interface Slide9YearProps {
|
|
4
4
|
businessCategory: BusinessCategory;
|
|
5
|
+
year?: number;
|
|
5
6
|
}
|
|
6
|
-
declare function Slide9Year({ businessCategory }: Slide9YearProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
declare function Slide9Year({ businessCategory, year }: Slide9YearProps): import("react/jsx-runtime").JSX.Element;
|
|
7
8
|
export default Slide9Year;
|
|
8
9
|
//# sourceMappingURL=Slide9Year.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Slide9Year.d.ts","sourceRoot":"","sources":["../../src/slides/Slide9Year.tsx"],"names":[],"mappings":"AACA,OAAO,kBAAkB,CAAC;AAG1B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAEjD,UAAU,eAAe;IACvB,gBAAgB,EAAE,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"Slide9Year.d.ts","sourceRoot":"","sources":["../../src/slides/Slide9Year.tsx"],"names":[],"mappings":"AACA,OAAO,kBAAkB,CAAC;AAG1B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAEjD,UAAU,eAAe;IACvB,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,iBAAS,UAAU,CAAC,EAAE,gBAAgB,EAAE,IAAI,EAAE,EAAE,eAAe,2CAwB9D;AAED,eAAe,UAAU,CAAC"}
|
|
@@ -2,8 +2,10 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import './Slide9Year.css';
|
|
3
3
|
import { recapCopy } from '../data/recapCopy';
|
|
4
4
|
import { BUSINESS_CATEGORIES } from '../types';
|
|
5
|
-
function Slide9Year({ businessCategory }) {
|
|
5
|
+
function Slide9Year({ businessCategory, year }) {
|
|
6
6
|
const copy = recapCopy[businessCategory] ?? recapCopy[BUSINESS_CATEGORIES.THRIVING];
|
|
7
|
-
|
|
7
|
+
const baseYear = year ?? 2025;
|
|
8
|
+
const nextYear = baseYear + 1;
|
|
9
|
+
return (_jsxs("div", { className: "slide9-year", children: [_jsx("div", { className: "slide9-year__message", children: copy.yearHeadline }), _jsxs("div", { className: "slide9-year__title", children: [nextYear, " na your year"] }), _jsx("div", { className: "slide9-year__crown", children: "\uD83D\uDC51" }), _jsxs("div", { className: "slide9-year__rect-layer slide9-year__rect-layer--top", children: [_jsx("span", { className: "slide9-year__rect slide9-year__rect--top-1 top-group" }), _jsx("span", { className: "slide9-year__rect slide9-year__rect--top-2 top-group" }), _jsx("span", { className: "slide9-year__rect slide9-year__rect--top-3 top-group" })] }), _jsxs("div", { className: "slide9-year__rect-layer slide9-year__rect-layer--bottom", children: [_jsx("span", { className: "slide9-year__rect slide9-year__rect--bottom-1 bottom-group" }), _jsx("span", { className: "slide9-year__rect slide9-year__rect--bottom-2 bottom-group" }), _jsx("span", { className: "slide9-year__rect slide9-year__rect--bottom-3 bottom-group" })] })] }));
|
|
8
10
|
}
|
|
9
11
|
export default Slide9Year;
|
package/dist/types.d.ts
CHANGED
|
@@ -14,6 +14,12 @@ export interface RecapData {
|
|
|
14
14
|
busiestMonth: string;
|
|
15
15
|
videoUrl: string;
|
|
16
16
|
downloadUrl: string;
|
|
17
|
+
currency?: string;
|
|
18
|
+
year?: number;
|
|
19
|
+
introHeadline?: string;
|
|
20
|
+
introSubtitle?: string;
|
|
21
|
+
slideDurations?: Record<string, number>;
|
|
22
|
+
isVideo?: boolean;
|
|
17
23
|
}
|
|
18
24
|
export interface ProductSummary {
|
|
19
25
|
name: string;
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,QAAQ,GAAG,OAAO,GAAG,KAAK,GAAG,OAAO,CAAC;AAEjD,MAAM,MAAM,gBAAgB,GAAG,UAAU,GAAG,cAAc,GAAG,UAAU,CAAC;AAExE,MAAM,WAAW,SAAS;IACxB,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,eAAe,EAAE,MAAM,CAAC;IACxB,YAAY,EAAE,MAAM,CAAC;IACrB,eAAe,EAAE,MAAM,CAAC;IACxB,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,WAAW,EAAE,KAAK,CAAC,cAAc,CAAC,CAAC;IACnC,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,QAAQ,GAAG,OAAO,GAAG,KAAK,GAAG,OAAO,CAAC;AAEjD,MAAM,MAAM,gBAAgB,GAAG,UAAU,GAAG,cAAc,GAAG,UAAU,CAAC;AAExE,MAAM,WAAW,SAAS;IACxB,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,eAAe,EAAE,MAAM,CAAC;IACxB,YAAY,EAAE,MAAM,CAAC;IACrB,eAAe,EAAE,MAAM,CAAC;IACxB,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,WAAW,EAAE,KAAK,CAAC,cAAc,CAAC,CAAC;IACnC,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACxC,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,UAAU;WACH,QAAQ;SACZ,QAAQ;WACJ,QAAQ;CAC3B,CAAC;AAEF,eAAO,MAAM,mBAAmB;cACN,gBAAgB;kBACR,gBAAgB;cACxB,gBAAgB;CACzC,CAAC"}
|
package/dist/utils/format.d.ts
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Format a number as
|
|
2
|
+
* Format a number as currency
|
|
3
|
+
* @param amount - The amount to format
|
|
4
|
+
* @param currency - Currency code (default: 'NGN')
|
|
5
|
+
* @param locale - Locale string (default: 'en-NG')
|
|
3
6
|
*/
|
|
4
|
-
export declare function formatCurrency(amount: number): string;
|
|
7
|
+
export declare function formatCurrency(amount: number, currency?: string, locale?: string): string;
|
|
5
8
|
/**
|
|
6
9
|
* Format a number with thousand separators
|
|
7
10
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"format.d.ts","sourceRoot":"","sources":["../../src/utils/format.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"format.d.ts","sourceRoot":"","sources":["../../src/utils/format.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,GAAE,MAAc,EAAE,MAAM,GAAE,MAAgB,GAAG,MAAM,CAOzG;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAEhD"}
|
package/dist/utils/format.js
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Format a number as
|
|
2
|
+
* Format a number as currency
|
|
3
|
+
* @param amount - The amount to format
|
|
4
|
+
* @param currency - Currency code (default: 'NGN')
|
|
5
|
+
* @param locale - Locale string (default: 'en-NG')
|
|
3
6
|
*/
|
|
4
|
-
export function formatCurrency(amount) {
|
|
5
|
-
return new Intl.NumberFormat(
|
|
7
|
+
export function formatCurrency(amount, currency = 'NGN', locale = 'en-NG') {
|
|
8
|
+
return new Intl.NumberFormat(locale, {
|
|
6
9
|
style: 'currency',
|
|
7
|
-
currency:
|
|
10
|
+
currency: currency,
|
|
8
11
|
minimumFractionDigits: 0,
|
|
9
12
|
maximumFractionDigits: 0
|
|
10
13
|
}).format(amount);
|
package/package.json
CHANGED
package/src/App.css
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
:root {
|
|
4
4
|
--frame-ar-num: 9;
|
|
5
|
-
--frame-ar-den:
|
|
6
|
-
--frame-ar: 9 /
|
|
5
|
+
--frame-ar-den: 16;
|
|
6
|
+
--frame-ar: 9 / 16;
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
* {
|
|
@@ -60,8 +60,8 @@ body {
|
|
|
60
60
|
aspect-ratio: var(--frame-ar);
|
|
61
61
|
width: min(100%, calc(100dvh * var(--frame-ar-num) / var(--frame-ar-den)));
|
|
62
62
|
height: min(100dvh, calc(100vw * var(--frame-ar-den) / var(--frame-ar-num)));
|
|
63
|
-
max-width:
|
|
64
|
-
max-height:
|
|
63
|
+
max-width: 1080px;
|
|
64
|
+
max-height: 1920px;
|
|
65
65
|
background: linear-gradient(180deg, #3F3DAD 0%, #CC6240 100%);
|
|
66
66
|
/* border-radius: clamp(0px, 2vw, 24px); */
|
|
67
67
|
overflow: hidden;
|
|
@@ -72,14 +72,14 @@ body {
|
|
|
72
72
|
}
|
|
73
73
|
|
|
74
74
|
/* Fallback for browsers without aspect-ratio support */
|
|
75
|
-
@supports not (aspect-ratio: 9 /
|
|
75
|
+
@supports not (aspect-ratio: 9 / 16) {
|
|
76
76
|
.app__shell {
|
|
77
77
|
width: 100vw;
|
|
78
78
|
height: calc(100vw * var(--frame-ar-den) / var(--frame-ar-num));
|
|
79
79
|
max-height: 100dvh;
|
|
80
80
|
}
|
|
81
81
|
|
|
82
|
-
@media (min-aspect-ratio: 9/
|
|
82
|
+
@media (min-aspect-ratio: 9/16) {
|
|
83
83
|
.app__shell {
|
|
84
84
|
width: calc(100dvh * var(--frame-ar-num) / var(--frame-ar-den));
|
|
85
85
|
height: 100dvh;
|
|
@@ -88,7 +88,7 @@ body {
|
|
|
88
88
|
}
|
|
89
89
|
|
|
90
90
|
/* Mobile - remove border radius and shadow */
|
|
91
|
-
@media (max-width:
|
|
91
|
+
@media (max-width: 600px) {
|
|
92
92
|
.app {
|
|
93
93
|
background: linear-gradient(180deg, #3F3DAD 0%, #CC6240 100%);
|
|
94
94
|
padding: 0;
|
|
@@ -101,10 +101,10 @@ body {
|
|
|
101
101
|
.app__shell {
|
|
102
102
|
/* border-radius: 0; */
|
|
103
103
|
box-shadow: none;
|
|
104
|
-
width:
|
|
104
|
+
width: 100vw;
|
|
105
105
|
height: 100dvh;
|
|
106
|
-
max-width:
|
|
107
|
-
max-height:
|
|
106
|
+
max-width: 100vw;
|
|
107
|
+
max-height: 100dvh;
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
110
|
|