@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
@@ -1,105 +1,105 @@
1
- import React from 'react';
2
- import './Slide10Final.css';
3
-
4
- interface Slide10FinalProps {
5
- videoUrl: string;
6
- downloadUrl: string;
7
- onReplay: () => void;
8
- }
9
-
10
- function Slide10Final({ videoUrl, downloadUrl, onReplay }: Slide10FinalProps) {
11
- const handleShare = async () => {
12
- try {
13
- // Fetch the media as a blob
14
- const response = await fetch(videoUrl);
15
- const blob = await response.blob();
16
-
17
- // Determine the file type (video/image)
18
- const fileExtension = videoUrl.split('.').pop()?.toLowerCase() || 'mp4';
19
- const mimeType = fileExtension === 'mp4' ? 'video/mp4' : 'image/jpeg';
20
- const fileName = `huxxle-wrapped-2025.${fileExtension}`;
21
-
22
- // Create a File object (required for WhatsApp Status)
23
- const file = new File([blob], fileName, {
24
- type: mimeType
25
- });
26
-
27
- // Validate file size (WhatsApp limits: 5MB for images, 16MB for videos)
28
- const maxSize = mimeType.startsWith('video') ? 16 * 1024 * 1024 : 5 * 1024 * 1024;
29
- if (file.size > maxSize) {
30
- alert(`File is too large. Maximum size is ${mimeType.startsWith('video') ? '16MB' : '5MB'}`);
31
- return;
32
- }
33
-
34
- // Check if sharing files is supported
35
- if (typeof navigator !== 'undefined' && navigator.canShare && navigator.canShare({ files: [file] })) {
36
- await navigator.share({
37
- files: [file],
38
- title: 'My Huxxle Recap',
39
- text: 'Check out my Wrapped 2025 highlights! 🎉'
40
- });
41
- return;
42
- }
43
-
44
- // Fallback to sharing URL if file sharing not supported
45
- if (typeof navigator !== 'undefined' && navigator.share) {
46
- await navigator.share({
47
- title: 'My Huxxle Recap',
48
- text: 'Check out my Wrapped 2025 highlights! 🎉',
49
- url: videoUrl
50
- });
51
- return;
52
- }
53
-
54
- // Final fallback: open in new tab
55
- if (typeof window !== 'undefined') {
56
- window.open(videoUrl, '_blank', 'noopener');
57
- }
58
- } catch (error) {
59
- console.error('Share canceled or failed', error);
60
-
61
- // Fallback on error: open in new tab
62
- if (typeof window !== 'undefined') {
63
- window.open(videoUrl, '_blank', 'noopener');
64
- }
65
- }
66
- };
67
-
68
- const handleDownload = () => {
69
- const anchor = document.createElement('a');
70
- anchor.href = downloadUrl;
71
- anchor.download = 'huxxle-wrapped-2025.mp4';
72
- anchor.target = '_blank';
73
- document.body.appendChild(anchor);
74
- anchor.click();
75
- document.body.removeChild(anchor);
76
- };
77
-
78
- const handleLearnMore = () => {
79
- window.open('https://www.huxxle.com', '_blank', 'noopener');
80
- };
81
-
82
- return (
83
- <div className="slide10-final">
84
- <div className="slide10-final__badge">WRAPPED 2025</div>
85
- <div className="slide10-final__title">Your#1 AI Business Assistant</div>
86
-
87
- <div className="slide10-final__button-group">
88
- <button className="slide10-final__button slide10-final__button--replay" onClick={onReplay}>
89
- Replay
90
- </button>
91
- <button className="slide10-final__button" onClick={handleShare}>
92
- Share Your Wrapped
93
- </button>
94
- <button className="slide10-final__button" onClick={handleDownload}>
95
- Download Cards
96
- </button>
97
- <button className="slide10-final__button" onClick={handleLearnMore}>
98
- Learn More on Huxxle
99
- </button>
100
- </div>
101
- </div>
102
- );
103
- }
104
-
105
- export default Slide10Final;
1
+ import React from 'react';
2
+ import './Slide10Final.css';
3
+
4
+ interface Slide10FinalProps {
5
+ videoUrl: string;
6
+ downloadUrl: string;
7
+ onReplay: () => void;
8
+ }
9
+
10
+ function Slide10Final({ videoUrl, downloadUrl, onReplay }: Slide10FinalProps) {
11
+ const handleShare = async () => {
12
+ try {
13
+ // Fetch the media as a blob
14
+ const response = await fetch(videoUrl);
15
+ const blob = await response.blob();
16
+
17
+ // Determine the file type (video/image)
18
+ const fileExtension = videoUrl.split('.').pop()?.toLowerCase() || 'mp4';
19
+ const mimeType = fileExtension === 'mp4' ? 'video/mp4' : 'image/jpeg';
20
+ const fileName = `huxxle-wrapped-2025.${fileExtension}`;
21
+
22
+ // Create a File object (required for WhatsApp Status)
23
+ const file = new File([blob], fileName, {
24
+ type: mimeType
25
+ });
26
+
27
+ // Validate file size (WhatsApp limits: 5MB for images, 16MB for videos)
28
+ const maxSize = mimeType.startsWith('video') ? 16 * 1024 * 1024 : 5 * 1024 * 1024;
29
+ if (file.size > maxSize) {
30
+ alert(`File is too large. Maximum size is ${mimeType.startsWith('video') ? '16MB' : '5MB'}`);
31
+ return;
32
+ }
33
+
34
+ // Check if sharing files is supported
35
+ if (typeof navigator !== 'undefined' && navigator.canShare && navigator.canShare({ files: [file] })) {
36
+ await navigator.share({
37
+ files: [file],
38
+ title: 'My Huxxle Recap',
39
+ text: 'Check out my Wrapped 2025 highlights! 🎉'
40
+ });
41
+ return;
42
+ }
43
+
44
+ // Fallback to sharing URL if file sharing not supported
45
+ if (typeof navigator !== 'undefined' && navigator.share) {
46
+ await navigator.share({
47
+ title: 'My Huxxle Recap',
48
+ text: 'Check out my Wrapped 2025 highlights! 🎉',
49
+ url: videoUrl
50
+ });
51
+ return;
52
+ }
53
+
54
+ // Final fallback: open in new tab
55
+ if (typeof window !== 'undefined') {
56
+ window.open(videoUrl, '_blank', 'noopener');
57
+ }
58
+ } catch (error) {
59
+ console.error('Share canceled or failed', error);
60
+
61
+ // Fallback on error: open in new tab
62
+ if (typeof window !== 'undefined') {
63
+ window.open(videoUrl, '_blank', 'noopener');
64
+ }
65
+ }
66
+ };
67
+
68
+ const handleDownload = () => {
69
+ const anchor = document.createElement('a');
70
+ anchor.href = downloadUrl;
71
+ anchor.download = 'huxxle-wrapped-2025.mp4';
72
+ anchor.target = '_blank';
73
+ document.body.appendChild(anchor);
74
+ anchor.click();
75
+ document.body.removeChild(anchor);
76
+ };
77
+
78
+ const handleLearnMore = () => {
79
+ window.open('https://www.huxxle.com', '_blank', 'noopener');
80
+ };
81
+
82
+ return (
83
+ <div className="slide10-final">
84
+ <div className="slide10-final__badge">WRAPPED 2025</div>
85
+ <div className="slide10-final__title">Your#1 AI Business Assistant</div>
86
+
87
+ <div className="slide10-final__button-group">
88
+ <button className="slide10-final__button slide10-final__button--replay" onClick={onReplay}>
89
+ Replay
90
+ </button>
91
+ <button className="slide10-final__button" onClick={handleShare}>
92
+ Share Your Wrapped
93
+ </button>
94
+ <button className="slide10-final__button" onClick={handleDownload}>
95
+ Download Cards
96
+ </button>
97
+ <button className="slide10-final__button" onClick={handleLearnMore}>
98
+ Learn More on Huxxle
99
+ </button>
100
+ </div>
101
+ </div>
102
+ );
103
+ }
104
+
105
+ export default Slide10Final;