@katajere/recap 1.0.2

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 (149) hide show
  1. package/README.md +39 -0
  2. package/dist/App.css +120 -0
  3. package/dist/FloatingFrames.css +55 -0
  4. package/dist/FloatingFrames.d.ts +11 -0
  5. package/dist/FloatingFrames.d.ts.map +1 -0
  6. package/dist/FloatingFrames.js +12 -0
  7. package/dist/LoginScreen.css +146 -0
  8. package/dist/OtpScreen.css +133 -0
  9. package/dist/RecapApp.d.ts +17 -0
  10. package/dist/RecapApp.d.ts.map +1 -0
  11. package/dist/RecapApp.js +7 -0
  12. package/dist/RecapStory.css +105 -0
  13. package/dist/RecapStory.d.ts +11 -0
  14. package/dist/RecapStory.d.ts.map +1 -0
  15. package/dist/RecapStory.js +150 -0
  16. package/dist/StoryProgress.css +47 -0
  17. package/dist/StoryProgress.d.ts +15 -0
  18. package/dist/StoryProgress.d.ts.map +1 -0
  19. package/dist/StoryProgress.js +23 -0
  20. package/dist/assets/huxxle-blue-logo.png +0 -0
  21. package/dist/assets/huxxle-blue-logo.svg +14 -0
  22. package/dist/assets/huxxle-logo.png +0 -0
  23. package/dist/assets/huxxle_star_final.gif +0 -0
  24. package/dist/assets/login-logo.png +0 -0
  25. package/dist/assets/login-logo.svg +14 -0
  26. package/dist/assets/money-rain.png +0 -0
  27. package/dist/assets/raining-money.gif +0 -0
  28. package/dist/assets/recap-music.mp3 +0 -0
  29. package/dist/assets/sketch_draw.gif +0 -0
  30. package/dist/assets/slide-logo.png +0 -0
  31. package/dist/assets/slide-logo.svg +14 -0
  32. package/dist/assets/sound-off.svg +4 -0
  33. package/dist/assets/sound-on.svg +5 -0
  34. package/dist/components/Header.css +46 -0
  35. package/dist/components/Header.d.ts +12 -0
  36. package/dist/components/Header.d.ts.map +1 -0
  37. package/dist/components/Header.js +25 -0
  38. package/dist/data/mock.d.ts +8 -0
  39. package/dist/data/mock.d.ts.map +1 -0
  40. package/dist/data/mock.js +59 -0
  41. package/dist/data/recapCopy.d.ts +10 -0
  42. package/dist/data/recapCopy.d.ts.map +1 -0
  43. package/dist/data/recapCopy.js +23 -0
  44. package/dist/hooks/useBackgroundMusic.d.ts +20 -0
  45. package/dist/hooks/useBackgroundMusic.d.ts.map +1 -0
  46. package/dist/hooks/useBackgroundMusic.js +62 -0
  47. package/dist/index.css +13 -0
  48. package/dist/index.d.ts +30 -0
  49. package/dist/index.d.ts.map +1 -0
  50. package/dist/index.js +40 -0
  51. package/dist/slides/Slide10Final.css +101 -0
  52. package/dist/slides/Slide10Final.d.ts +9 -0
  53. package/dist/slides/Slide10Final.d.ts.map +1 -0
  54. package/dist/slides/Slide10Final.js +68 -0
  55. package/dist/slides/Slide1Intro.css +261 -0
  56. package/dist/slides/Slide1Intro.d.ts +13 -0
  57. package/dist/slides/Slide1Intro.d.ts.map +1 -0
  58. package/dist/slides/Slide1Intro.js +61 -0
  59. package/dist/slides/Slide2Days.css +209 -0
  60. package/dist/slides/Slide2Days.d.ts +11 -0
  61. package/dist/slides/Slide2Days.d.ts.map +1 -0
  62. package/dist/slides/Slide2Days.js +11 -0
  63. package/dist/slides/Slide3Revenue.css +89 -0
  64. package/dist/slides/Slide3Revenue.d.ts +12 -0
  65. package/dist/slides/Slide3Revenue.d.ts.map +1 -0
  66. package/dist/slides/Slide3Revenue.js +16 -0
  67. package/dist/slides/Slide4Orders.css +135 -0
  68. package/dist/slides/Slide4Orders.d.ts +10 -0
  69. package/dist/slides/Slide4Orders.d.ts.map +1 -0
  70. package/dist/slides/Slide4Orders.js +16 -0
  71. package/dist/slides/Slide5Buyers.css +140 -0
  72. package/dist/slides/Slide5Buyers.d.ts +11 -0
  73. package/dist/slides/Slide5Buyers.d.ts.map +1 -0
  74. package/dist/slides/Slide5Buyers.js +12 -0
  75. package/dist/slides/Slide6Customer.css +92 -0
  76. package/dist/slides/Slide6Customer.d.ts +10 -0
  77. package/dist/slides/Slide6Customer.d.ts.map +1 -0
  78. package/dist/slides/Slide6Customer.js +10 -0
  79. package/dist/slides/Slide7Products.css +144 -0
  80. package/dist/slides/Slide7Products.d.ts +11 -0
  81. package/dist/slides/Slide7Products.d.ts.map +1 -0
  82. package/dist/slides/Slide7Products.js +29 -0
  83. package/dist/slides/Slide8Months.css +148 -0
  84. package/dist/slides/Slide8Months.d.ts +7 -0
  85. package/dist/slides/Slide8Months.d.ts.map +1 -0
  86. package/dist/slides/Slide8Months.js +31 -0
  87. package/dist/slides/Slide9Year.css +93 -0
  88. package/dist/slides/Slide9Year.d.ts +8 -0
  89. package/dist/slides/Slide9Year.d.ts.map +1 -0
  90. package/dist/slides/Slide9Year.js +9 -0
  91. package/dist/types.d.ts +33 -0
  92. package/dist/types.d.ts.map +1 -0
  93. package/dist/types.js +11 -0
  94. package/dist/utils/format.d.ts +9 -0
  95. package/dist/utils/format.d.ts.map +1 -0
  96. package/dist/utils/format.js +17 -0
  97. package/dist/utils/index.d.ts +3 -0
  98. package/dist/utils/index.d.ts.map +1 -0
  99. package/dist/utils/index.js +3 -0
  100. package/dist/utils/motion.d.ts +19 -0
  101. package/dist/utils/motion.d.ts.map +1 -0
  102. package/dist/utils/motion.js +80 -0
  103. package/package.json +98 -0
  104. package/src/App.css +120 -0
  105. package/src/App.tsx +73 -0
  106. package/src/FloatingFrames.css +55 -0
  107. package/src/FloatingFrames.tsx +27 -0
  108. package/src/LoginScreen.css +146 -0
  109. package/src/LoginScreen.tsx +70 -0
  110. package/src/OtpScreen.css +133 -0
  111. package/src/OtpScreen.tsx +109 -0
  112. package/src/RecapApp.tsx +34 -0
  113. package/src/RecapStory.css +105 -0
  114. package/src/RecapStory.tsx +269 -0
  115. package/src/StoryProgress.css +47 -0
  116. package/src/StoryProgress.tsx +60 -0
  117. package/src/assets.d.ts +41 -0
  118. package/src/components/Header.css +46 -0
  119. package/src/components/Header.tsx +41 -0
  120. package/src/data/mock.ts +62 -0
  121. package/src/data/recapCopy.ts +33 -0
  122. package/src/hooks/useBackgroundMusic.ts +79 -0
  123. package/src/index.css +13 -0
  124. package/src/index.ts +70 -0
  125. package/src/react-app-env.d.ts +26 -0
  126. package/src/slides/Slide10Final.css +101 -0
  127. package/src/slides/Slide10Final.tsx +105 -0
  128. package/src/slides/Slide1Intro.css +261 -0
  129. package/src/slides/Slide1Intro.tsx +141 -0
  130. package/src/slides/Slide2Days.css +209 -0
  131. package/src/slides/Slide2Days.tsx +92 -0
  132. package/src/slides/Slide3Revenue.css +89 -0
  133. package/src/slides/Slide3Revenue.tsx +76 -0
  134. package/src/slides/Slide4Orders.css +135 -0
  135. package/src/slides/Slide4Orders.tsx +63 -0
  136. package/src/slides/Slide5Buyers.css +140 -0
  137. package/src/slides/Slide5Buyers.tsx +74 -0
  138. package/src/slides/Slide6Customer.css +92 -0
  139. package/src/slides/Slide6Customer.tsx +27 -0
  140. package/src/slides/Slide7Products.css +144 -0
  141. package/src/slides/Slide7Products.tsx +81 -0
  142. package/src/slides/Slide8Months.css +148 -0
  143. package/src/slides/Slide8Months.tsx +63 -0
  144. package/src/slides/Slide9Year.css +93 -0
  145. package/src/slides/Slide9Year.tsx +35 -0
  146. package/src/types.ts +39 -0
  147. package/src/utils/format.ts +18 -0
  148. package/src/utils/index.ts +3 -0
  149. package/src/utils/motion.ts +89 -0
@@ -0,0 +1,62 @@
1
+ import { useEffect, useRef, useState } from 'react';
2
+ /**
3
+ * useBackgroundMusic - simple audio controller for a single background track.
4
+ * Handles autoplay attempt (may be blocked by browsers), mute toggle, and cleanup on unmount.
5
+ */
6
+ export function useBackgroundMusic({ src, volume = 0.6, autoPlay = true, loop = false }) {
7
+ const audioRef = useRef(null);
8
+ const [isPlaying, setIsPlaying] = useState(false);
9
+ const [isMuted, setIsMuted] = useState(false);
10
+ useEffect(() => {
11
+ const audio = new Audio(src);
12
+ audio.loop = loop;
13
+ audio.volume = volume;
14
+ audioRef.current = audio;
15
+ const handlePlay = () => setIsPlaying(true);
16
+ const handlePause = () => setIsPlaying(false);
17
+ const handleEnded = () => setIsPlaying(false);
18
+ audio.addEventListener('play', handlePlay);
19
+ audio.addEventListener('pause', handlePause);
20
+ audio.addEventListener('ended', handleEnded);
21
+ if (autoPlay) {
22
+ const playPromise = audio.play();
23
+ if (playPromise !== undefined) {
24
+ playPromise.catch(() => {
25
+ // Autoplay may be blocked; user interaction will be needed.
26
+ });
27
+ }
28
+ }
29
+ return () => {
30
+ audio.removeEventListener('play', handlePlay);
31
+ audio.removeEventListener('pause', handlePause);
32
+ audio.removeEventListener('ended', handleEnded);
33
+ audio.pause();
34
+ audio.src = '';
35
+ audioRef.current = null;
36
+ };
37
+ }, [src, volume, autoPlay, loop]);
38
+ const play = () => {
39
+ const playPromise = audioRef.current?.play();
40
+ if (playPromise !== undefined) {
41
+ playPromise.catch(() => {
42
+ // Playback failed (likely blocked); caller may prompt user interaction.
43
+ });
44
+ }
45
+ };
46
+ const pause = () => audioRef.current?.pause();
47
+ const stop = () => {
48
+ if (audioRef.current) {
49
+ audioRef.current.pause();
50
+ audioRef.current.currentTime = 0;
51
+ setIsPlaying(false);
52
+ }
53
+ };
54
+ const toggleMute = () => {
55
+ if (!audioRef.current)
56
+ return;
57
+ const nextMuted = !audioRef.current.muted;
58
+ audioRef.current.muted = nextMuted;
59
+ setIsMuted(nextMuted);
60
+ };
61
+ return { isPlaying, isMuted, play, pause, stop, toggleMute };
62
+ }
package/dist/index.css ADDED
@@ -0,0 +1,13 @@
1
+ body {
2
+ margin: 0;
3
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
4
+ 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
5
+ sans-serif;
6
+ -webkit-font-smoothing: antialiased;
7
+ -moz-osx-font-smoothing: grayscale;
8
+ }
9
+
10
+ code {
11
+ font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
12
+ monospace;
13
+ }
@@ -0,0 +1,30 @@
1
+ /**
2
+ * @huxxle/recap - Vendor Year in Review Experience
3
+ * Public API exports for NPM package
4
+ *
5
+ * This file exports components and types for use in:
6
+ * - WebApp: Direct RecapStory integration (no auth)
7
+ * - Backend: Server-side rendering for video generation
8
+ * - Standalone: Full App with authentication
9
+ */
10
+ export { default as RecapApp } from './RecapApp';
11
+ export { default as RecapStory } from './RecapStory';
12
+ export { default as StoryProgress } from './StoryProgress';
13
+ export { default as FloatingFrames } from './FloatingFrames';
14
+ export { default as Header } from './components/Header';
15
+ export { default as Slide1Intro } from './slides/Slide1Intro';
16
+ export { default as Slide2Days } from './slides/Slide2Days';
17
+ export { default as Slide3Revenue } from './slides/Slide3Revenue';
18
+ export { default as Slide4Orders } from './slides/Slide4Orders';
19
+ export { default as Slide5Buyers } from './slides/Slide5Buyers';
20
+ export { default as Slide6Customer } from './slides/Slide6Customer';
21
+ export { default as Slide7Products } from './slides/Slide7Products';
22
+ export { default as Slide8Months } from './slides/Slide8Months';
23
+ export { default as Slide9Year } from './slides/Slide9Year';
24
+ export { default as Slide10Final } from './slides/Slide10Final';
25
+ export type { RecapData, ProductSummary, BusinessCategory, AuthStep, } from './types';
26
+ export { BUSINESS_CATEGORIES, AUTH_STEPS, } from './types';
27
+ export { formatCurrency, formatNumber, } from './utils/format';
28
+ export { slideDurations, mockRecapData, } from './data/mock';
29
+ export declare const VERSION = "1.0.0";
30
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAMH,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAMxD,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAC9D,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAClE,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAChE,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAChE,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACpE,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACpE,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAChE,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAMhE,YAAY,EACV,SAAS,EACT,cAAc,EACd,gBAAgB,EAChB,QAAQ,GACT,MAAM,SAAS,CAAC;AAEjB,OAAO,EACL,mBAAmB,EACnB,UAAU,GACX,MAAM,SAAS,CAAC;AAMjB,OAAO,EACL,cAAc,EACd,YAAY,GACb,MAAM,gBAAgB,CAAC;AAExB,OAAO,EACL,cAAc,EACd,aAAa,GACd,MAAM,aAAa,CAAC;AAMrB,eAAO,MAAM,OAAO,UAAU,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,40 @@
1
+ /**
2
+ * @huxxle/recap - Vendor Year in Review Experience
3
+ * Public API exports for NPM package
4
+ *
5
+ * This file exports components and types for use in:
6
+ * - WebApp: Direct RecapStory integration (no auth)
7
+ * - Backend: Server-side rendering for video generation
8
+ * - Standalone: Full App with authentication
9
+ */
10
+ // ============================================================================
11
+ // HEADLESS COMPONENTS (No authentication) - Use in WebApp & Backend
12
+ // ============================================================================
13
+ export { default as RecapApp } from './RecapApp';
14
+ export { default as RecapStory } from './RecapStory';
15
+ export { default as StoryProgress } from './StoryProgress';
16
+ export { default as FloatingFrames } from './FloatingFrames';
17
+ export { default as Header } from './components/Header';
18
+ // ============================================================================
19
+ // INDIVIDUAL SLIDES - For custom layouts or granular control
20
+ // ============================================================================
21
+ export { default as Slide1Intro } from './slides/Slide1Intro';
22
+ export { default as Slide2Days } from './slides/Slide2Days';
23
+ export { default as Slide3Revenue } from './slides/Slide3Revenue';
24
+ export { default as Slide4Orders } from './slides/Slide4Orders';
25
+ export { default as Slide5Buyers } from './slides/Slide5Buyers';
26
+ export { default as Slide6Customer } from './slides/Slide6Customer';
27
+ export { default as Slide7Products } from './slides/Slide7Products';
28
+ export { default as Slide8Months } from './slides/Slide8Months';
29
+ export { default as Slide9Year } from './slides/Slide9Year';
30
+ export { default as Slide10Final } from './slides/Slide10Final';
31
+ export { BUSINESS_CATEGORIES, AUTH_STEPS, } from './types';
32
+ // ============================================================================
33
+ // UTILITIES - Helper functions
34
+ // ============================================================================
35
+ export { formatCurrency, formatNumber, } from './utils/format';
36
+ export { slideDurations, mockRecapData, } from './data/mock';
37
+ // ============================================================================
38
+ // VERSION - For compatibility checking
39
+ // ============================================================================
40
+ export const VERSION = '1.0.0';
@@ -0,0 +1,101 @@
1
+ .slide10-final {
2
+ position: relative;
3
+ width: 100%;
4
+ height: 100%;
5
+ color: #FCFCFC;
6
+ display: flex;
7
+ flex-direction: column;
8
+ align-items: center;
9
+ justify-content: center;
10
+ gap: 3.79%;
11
+ padding-top: 41.65vh;
12
+ margin-bottom: 2.84vh;
13
+ }
14
+
15
+ @media (max-height: 720px), (orientation: landscape) {
16
+ .slide10-final {
17
+ gap: clamp(16px, 2vh, 32px);
18
+ }
19
+
20
+ .slide10-final__button-group {
21
+ margin-top: clamp(32px, 5vh, 80px);
22
+ }
23
+ }
24
+
25
+ .slide10-final__badge {
26
+ box-sizing: border-box;
27
+ border: 0.5px solid #FCFCFC;
28
+ padding: 0.95% 4.1%;
29
+ font-family: 'Lora', serif;
30
+ font-size: clamp(10px, 3.08vw, 12px);
31
+ font-weight: 600;
32
+ letter-spacing: 0.08em;
33
+ }
34
+
35
+ .slide10-final__title {
36
+ font-family: 'Lora', serif;
37
+ font-size: clamp(24px, 10.26vw, 40px);
38
+ font-weight: 700;
39
+ line-height: 1.28;
40
+ text-transform: capitalize;
41
+ text-align: center;
42
+ width: 92.31%;
43
+ max-width: 360px;
44
+ background: linear-gradient(90deg, #FFFFFF 0%, #FFCC80 100%);
45
+ -webkit-background-clip: text;
46
+ -webkit-text-fill-color: transparent;
47
+ background-clip: text;
48
+ }
49
+
50
+ .slide10-final__button-group {
51
+ width: 91.79%;
52
+ max-width: 358px;
53
+ display: flex;
54
+ flex-direction: column;
55
+ gap: 8px;
56
+ margin-top: 14.16vh;
57
+ padding-bottom: 2.84vh;
58
+ margin-bottom: 2.84vh;
59
+ }
60
+
61
+ .slide10-final__button {
62
+ border: 1px solid #FCFCFC;
63
+ background: transparent;
64
+ color: #FCFCFC;
65
+ font-family: 'Lora', serif;
66
+ font-weight: 600;
67
+ font-size: clamp(12px, 4.1vw, 16px);
68
+ padding: 1.42% 4.1%;
69
+ min-height: 40px;
70
+ display: flex;
71
+ justify-content: center;
72
+ align-items: center;
73
+ cursor: pointer;
74
+ }
75
+
76
+ /* .slide10-final__button--replay {
77
+ width: 122px;
78
+ align-self: flex-start;
79
+ padding: 8px 16px;
80
+ font-size: 14px;
81
+ } */
82
+
83
+ .slide10-final__fallback {
84
+ margin-top: 1.42%;
85
+ font-size: clamp(12px, 3.59vw, 14px);
86
+ color: #FFCC80;
87
+ text-align: center;
88
+ max-width: 82.05%;
89
+ }
90
+
91
+ .slide10-final__manual-link {
92
+ margin-top: 0.95%;
93
+ border: 1px dashed #FFCC80;
94
+ background: transparent;
95
+ color: #FFCC80;
96
+ font-weight: 600;
97
+ padding: 1.19% 4.1%;
98
+ min-height: 36px;
99
+ cursor: pointer;
100
+ font-size: clamp(12px, 3.59vw, 14px);
101
+ }
@@ -0,0 +1,9 @@
1
+ import './Slide10Final.css';
2
+ interface Slide10FinalProps {
3
+ videoUrl: string;
4
+ downloadUrl: string;
5
+ onReplay: () => void;
6
+ }
7
+ declare function Slide10Final({ videoUrl, downloadUrl, onReplay }: Slide10FinalProps): import("react/jsx-runtime").JSX.Element;
8
+ export default Slide10Final;
9
+ //# sourceMappingURL=Slide10Final.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Slide10Final.d.ts","sourceRoot":"","sources":["../../src/slides/Slide10Final.tsx"],"names":[],"mappings":"AACA,OAAO,oBAAoB,CAAC;AAE5B,UAAU,iBAAiB;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,iBAAS,YAAY,CAAC,EAAE,QAAQ,EAAE,WAAW,EAAE,QAAQ,EAAE,EAAE,iBAAiB,2CA6F3E;AAED,eAAe,YAAY,CAAC"}
@@ -0,0 +1,68 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import './Slide10Final.css';
3
+ function Slide10Final({ videoUrl, downloadUrl, onReplay }) {
4
+ const handleShare = async () => {
5
+ try {
6
+ // Fetch the media as a blob
7
+ const response = await fetch(videoUrl);
8
+ const blob = await response.blob();
9
+ // Determine the file type (video/image)
10
+ const fileExtension = videoUrl.split('.').pop()?.toLowerCase() || 'mp4';
11
+ const mimeType = fileExtension === 'mp4' ? 'video/mp4' : 'image/jpeg';
12
+ const fileName = `huxxle-wrapped-2025.${fileExtension}`;
13
+ // Create a File object (required for WhatsApp Status)
14
+ const file = new File([blob], fileName, {
15
+ type: mimeType
16
+ });
17
+ // Validate file size (WhatsApp limits: 5MB for images, 16MB for videos)
18
+ const maxSize = mimeType.startsWith('video') ? 16 * 1024 * 1024 : 5 * 1024 * 1024;
19
+ if (file.size > maxSize) {
20
+ alert(`File is too large. Maximum size is ${mimeType.startsWith('video') ? '16MB' : '5MB'}`);
21
+ return;
22
+ }
23
+ // Check if sharing files is supported
24
+ if (typeof navigator !== 'undefined' && navigator.canShare && navigator.canShare({ files: [file] })) {
25
+ await navigator.share({
26
+ files: [file],
27
+ title: 'My Huxxle Recap',
28
+ text: 'Check out my Wrapped 2025 highlights! 🎉'
29
+ });
30
+ return;
31
+ }
32
+ // Fallback to sharing URL if file sharing not supported
33
+ if (typeof navigator !== 'undefined' && navigator.share) {
34
+ await navigator.share({
35
+ title: 'My Huxxle Recap',
36
+ text: 'Check out my Wrapped 2025 highlights! 🎉',
37
+ url: videoUrl
38
+ });
39
+ return;
40
+ }
41
+ // Final fallback: open in new tab
42
+ if (typeof window !== 'undefined') {
43
+ window.open(videoUrl, '_blank', 'noopener');
44
+ }
45
+ }
46
+ catch (error) {
47
+ console.error('Share canceled or failed', error);
48
+ // Fallback on error: open in new tab
49
+ if (typeof window !== 'undefined') {
50
+ window.open(videoUrl, '_blank', 'noopener');
51
+ }
52
+ }
53
+ };
54
+ const handleDownload = () => {
55
+ const anchor = document.createElement('a');
56
+ anchor.href = downloadUrl;
57
+ anchor.download = 'huxxle-wrapped-2025.mp4';
58
+ anchor.target = '_blank';
59
+ document.body.appendChild(anchor);
60
+ anchor.click();
61
+ document.body.removeChild(anchor);
62
+ };
63
+ const handleLearnMore = () => {
64
+ window.open('https://www.huxxle.com', '_blank', 'noopener');
65
+ };
66
+ return (_jsxs("div", { className: "slide10-final", children: [_jsx("div", { className: "slide10-final__badge", children: "WRAPPED 2025" }), _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
+ export default Slide10Final;
@@ -0,0 +1,261 @@
1
+ /* Slide1Intro.css - Responsive design */
2
+
3
+ .slide1-intro {
4
+ position: relative;
5
+ width: 100%;
6
+ height: 100%;
7
+ overflow: hidden;
8
+ display: flex;
9
+ flex-direction: column;
10
+ }
11
+
12
+ /* Brand name container - positioned at top */
13
+ .slide1-intro__brand-container {
14
+ display: flex;
15
+ flex-direction: column;
16
+ align-items: flex-start;
17
+ padding: 0;
18
+ gap: clamp(8px, 1.5%, 12px);
19
+ position: absolute;
20
+ top: clamp(32px, 5%, 48px);
21
+ left: clamp(12px, 4%, 16px);
22
+ z-index: 3;
23
+ overflow: visible;
24
+ width: calc(100% - clamp(24px, 8%, 32px));
25
+ }
26
+
27
+ /* Background "HEY" text - first line, with opacity */
28
+ .slide1-intro__bg-text {
29
+ font-family: 'Lora', serif;
30
+ font-style: normal;
31
+ font-weight: 700;
32
+ font-size: clamp(32px, 12vw, 56px);
33
+ line-height: 1;
34
+ background: linear-gradient(90deg, #FFFFFF 0%, #FFCC80 100%);
35
+ -webkit-background-clip: text;
36
+ -webkit-text-fill-color: transparent;
37
+ background-clip: text;
38
+ opacity: 0.1;
39
+ flex: none;
40
+ margin: 0;
41
+ white-space: nowrap;
42
+ }
43
+
44
+ /* Business name - animated horizontally */
45
+ .slide1-intro__brand {
46
+ font-family: 'Lora', serif;
47
+ font-style: normal;
48
+ font-weight: 700;
49
+ font-size: clamp(32px, 12vw, 56px);
50
+ line-height: 1;
51
+ background: linear-gradient(90deg, #FFFFFF 0%, #FFCC80 100%);
52
+ -webkit-background-clip: text;
53
+ -webkit-text-fill-color: transparent;
54
+ background-clip: text;
55
+ flex: none;
56
+ white-space: nowrap;
57
+ margin: 0;
58
+ }
59
+
60
+ /* Top floating frames - positioned at ~30% from top */
61
+ .slide1-intro__frames-top {
62
+ display: flex;
63
+ flex-direction: row;
64
+ justify-content: center;
65
+ align-items: center;
66
+ padding: 0;
67
+ gap: clamp(6px, 2%, 10px);
68
+ position: absolute;
69
+ width: 100%;
70
+ left: 0;
71
+ top: clamp(140px, 30%, 220px);
72
+ z-index: 2;
73
+ }
74
+
75
+ .slide1-intro__frames-top .frame-rect {
76
+ box-sizing: border-box;
77
+ width: clamp(120px, 35%, 160px);
78
+ aspect-ratio: 140 / 186;
79
+ border: 1px solid #FFFFFF;
80
+ flex: none;
81
+ }
82
+
83
+ /* Headline and subtitle container - positioned at ~63% from top */
84
+ .slide1-intro__text {
85
+ display: flex;
86
+ flex-direction: column;
87
+ align-items: flex-start;
88
+ gap: clamp(8px, 1.5%, 12px);
89
+ position: absolute;
90
+ width: calc(100% - clamp(24px, 8%, 32px));
91
+ left: clamp(12px, 4%, 16px);
92
+ top: clamp(320px, 63%, 480px);
93
+ z-index: 3;
94
+ }
95
+
96
+ .slide1-intro__headline {
97
+ width: 100%;
98
+ font-family: 'Lora', serif;
99
+ font-style: normal;
100
+ font-weight: 600;
101
+ font-size: clamp(20px, 6vw, 32px);
102
+ line-height: 1.2;
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
+ flex: none;
108
+ margin: 0;
109
+ display: -webkit-box;
110
+ -webkit-line-clamp: 3;
111
+ line-clamp: inherit;
112
+ -webkit-box-orient: vertical;
113
+ overflow: hidden;
114
+ }
115
+
116
+ .slide1-intro__subtitle {
117
+ width: 100%;
118
+ font-family: 'Lora', serif;
119
+ font-style: normal;
120
+ font-weight: 400;
121
+ font-size: clamp(12px, 3.5vw, 14px);
122
+ line-height: 1.5;
123
+ color: #FFFFFF;
124
+ flex: none;
125
+ margin: 0;
126
+ }
127
+
128
+ /* Bottom floating frames - positioned at ~88% from top */
129
+ .slide1-intro__frames-bottom {
130
+ display: flex;
131
+ flex-direction: row;
132
+ justify-content: center;
133
+ align-items: center;
134
+ padding: 0;
135
+ gap: clamp(8px, 2%, 12px);
136
+ position: absolute;
137
+ width: 100%;
138
+ left: 0;
139
+ top: clamp(560px, 88%, 720px);
140
+ z-index: 2;
141
+ }
142
+
143
+ .slide1-intro__frames-bottom .frame-rect {
144
+ box-sizing: border-box;
145
+ width: clamp(120px, 35%, 160px);
146
+ aspect-ratio: 140 / 186;
147
+ border: 1px solid #FFFFFF;
148
+ flex: none;
149
+ }
150
+
151
+ @media (max-height: 600px) {
152
+ .slide1-intro__brand-container {
153
+ top: 16px;
154
+ }
155
+
156
+ .slide1-intro__bg-text,
157
+ .slide1-intro__brand {
158
+ font-size: clamp(24px, 10vw, 40px);
159
+ }
160
+
161
+ .slide1-intro__frames-top {
162
+ top: 30%;
163
+ }
164
+
165
+ .slide1-intro__text {
166
+ top: 60%;
167
+ }
168
+
169
+ .slide1-intro__headline {
170
+ font-size: clamp(16px, 5vw, 24px);
171
+ }
172
+
173
+ .slide1-intro__frames-bottom {
174
+ top: 85%;
175
+ }
176
+ }
177
+
178
+ .slide1-intro__frames-bottom .frame-rect {
179
+ box-sizing: border-box;
180
+ width: clamp(140px, 46.15vw, 180px);
181
+ height: clamp(186px, 28.44dvh, 240px);
182
+ border: 1px solid #FFFFFF;
183
+ flex: none;
184
+ }
185
+
186
+ /* Variant styles */
187
+ .slide1-intro--struggling {
188
+ background: linear-gradient(180deg, #1B1A3D 0%, #E33D2E 100%);
189
+ }
190
+
191
+ .slide1-intro--new-user {
192
+ background: linear-gradient(180deg, #FFFFFF 0%, #3F3DAD 100%);
193
+ }
194
+
195
+ .slide1-intro--struggling .slide1-intro__subtitle {
196
+ color: #F6E7DF;
197
+ }
198
+
199
+ .slide1-intro--new-user .slide1-intro__subtitle {
200
+ color: #16205A;
201
+ }
202
+
203
+ .slide1-intro--struggling .frame-rect {
204
+ border-color: rgba(255, 255, 255, 0.6);
205
+ }
206
+
207
+ .slide1-intro--new-user .slide1-intro__brand {
208
+ background: linear-gradient(180deg, #4F4CD8 0%, #2A2872 100%);
209
+ -webkit-background-clip: text;
210
+ -webkit-text-fill-color: transparent;
211
+ background-clip: text;
212
+ }
213
+
214
+ .slide1-intro--new-user .slide1-intro__headline {
215
+ background: none;
216
+ color: #E6E5F9;
217
+ -webkit-background-clip: unset;
218
+ background-clip: unset;
219
+ -webkit-text-fill-color: #E6E5F9;
220
+ }
221
+
222
+ .slide1-intro--new-user .slide1-intro__subtitle {
223
+ color: #CDCCF4;
224
+ }
225
+
226
+ .slide1-intro--new-user .frame-rect {
227
+ border-color: rgba(63, 61, 173, 0.6);
228
+ }
229
+
230
+ .slide1-intro--new-user .slide1-intro__bg-text {
231
+ background: linear-gradient(180deg, #4F4CD8 0%, #2A2872 100%);
232
+ -webkit-background-clip: text;
233
+ -webkit-text-fill-color: transparent;
234
+ background-clip: text;
235
+ opacity: 0.08;
236
+ }
237
+
238
+ /* Media queries for landscape and short screens */
239
+ @media (max-height: 720px), (orientation: landscape) {
240
+ /* .slide1-intro__brand-container {
241
+ top: clamp(32px, 4dvh, 40px);
242
+ gap: clamp(8px, 1.5dvh, 12px);
243
+ } */
244
+
245
+ .slide1-intro__bg-text,
246
+ .slide1-intro__brand {
247
+ font-size: clamp(32px, 12vw, 48px);
248
+ }
249
+
250
+ /* .slide1-intro__frames-top {
251
+ top: clamp(140px, 22dvh, 180px);
252
+ } */
253
+
254
+ /* .slide1-intro__text {
255
+ top: clamp(280px, 50dvh, 380px);
256
+ } */
257
+
258
+ /* .slide1-intro__frames-bottom {
259
+ top: clamp(420px, 70dvh, 520px);
260
+ } */
261
+ }
@@ -0,0 +1,13 @@
1
+ import { BusinessCategory } from '../types';
2
+ import './Slide1Intro.css';
3
+ interface Slide1IntroProps {
4
+ businessName: string;
5
+ businessCategory: BusinessCategory;
6
+ onDurationCalculated?: (duration: number) => void;
7
+ }
8
+ /**
9
+ * Slide1Intro - Identity slide with business name and category-based messaging
10
+ */
11
+ declare function Slide1Intro({ businessName, businessCategory, onDurationCalculated }: Slide1IntroProps): import("react/jsx-runtime").JSX.Element;
12
+ export default Slide1Intro;
13
+ //# sourceMappingURL=Slide1Intro.d.ts.map
@@ -0,0 +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,2CA0H9F;AAED,eAAe,WAAW,CAAC"}
@@ -0,0 +1,61 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import React, { useLayoutEffect, useRef, useState } from 'react';
3
+ import { motion } from 'framer-motion';
4
+ import { delayedFadeIn } from '../utils';
5
+ import { BUSINESS_CATEGORIES } from '../types';
6
+ import { recapCopy } from '../data/recapCopy';
7
+ import './Slide1Intro.css';
8
+ /**
9
+ * Slide1Intro - Identity slide with business name and category-based messaging
10
+ */
11
+ function Slide1Intro({ businessName, businessCategory, onDurationCalculated }) {
12
+ // Dynamic messaging based on category
13
+ const copy = recapCopy[businessCategory] ?? recapCopy[BUSINESS_CATEGORIES.THRIVING];
14
+ const headline = copy.introHeadline;
15
+ const [brandWidth, setBrandWidth] = useState(0);
16
+ const [headlineWidth, setHeadlineWidth] = useState(0);
17
+ const brandRef = useRef(null);
18
+ const headlineRef = useRef(null);
19
+ useLayoutEffect(() => {
20
+ if (brandRef.current) {
21
+ // Add extra buffer to account for hidden characters (approximately 3 character widths)
22
+ const extraBuffer = brandRef.current.scrollWidth * 0.25; // ~25% extra space
23
+ setBrandWidth(brandRef.current.scrollWidth + extraBuffer);
24
+ }
25
+ }, [businessName]);
26
+ useLayoutEffect(() => {
27
+ if (headlineRef.current) {
28
+ setHeadlineWidth(headlineRef.current.scrollWidth);
29
+ }
30
+ }, [headline]);
31
+ // Get actual viewport width for calculation
32
+ const viewportWidth = typeof window !== 'undefined' ? window.innerWidth : 390;
33
+ const containerWidth = Math.min(viewportWidth, 430); // max-width from App.css
34
+ const sidePadding = Math.max(16, containerWidth * 0.041); // clamp(16px, 4.1vw, 20px)
35
+ const availableWidth = containerWidth - (sidePadding * 2);
36
+ const brandShift = Math.max(brandWidth - availableWidth, 0);
37
+ const headlineShift = Math.max(headlineWidth - availableWidth, 0);
38
+ // Calculate dynamic slide duration based on brand name length
39
+ // Tested with real data: 26-75 character business names
40
+ const baseAnimationDuration = 6; // seconds minimum for short names
41
+ const pixelsPerSecond = 65; // animation speed (constant across all names)
42
+ // Calculate animation duration for brand name
43
+ const brandAnimationDuration = brandShift > 0
44
+ ? Math.max(baseAnimationDuration, brandShift / pixelsPerSecond)
45
+ : baseAnimationDuration;
46
+ // Calculate animation duration for headline
47
+ const headlineAnimationDuration = headlineShift > 0
48
+ ? Math.max(baseAnimationDuration, headlineShift / pixelsPerSecond)
49
+ : baseAnimationDuration;
50
+ // Use the longer of the two animations, plus buffer time
51
+ const dynamicSlideDuration = Math.max(brandAnimationDuration, headlineAnimationDuration) + 2; // +2 second buffer for user to read the final position
52
+ // Notify parent of calculated duration
53
+ React.useEffect(() => {
54
+ if (onDurationCalculated && brandWidth > 0 && headlineWidth > 0) {
55
+ onDurationCalculated(dynamicSlideDuration);
56
+ }
57
+ }, [dynamicSlideDuration, brandWidth, headlineWidth, onDurationCalculated]);
58
+ const slideClass = `slide1-intro slide1-intro--${copy.introVariant}`;
59
+ 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: copy.introSubtitle })] }), _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" })] })] }));
60
+ }
61
+ export default Slide1Intro;