@katajere/recap 2.1.1 → 2.1.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.
- package/dist/RecapStory.d.ts.map +1 -1
- package/dist/RecapStory.js +20 -1
- package/dist/StoryProgress.d.ts.map +1 -1
- package/dist/StoryProgress.js +0 -3
- package/dist/data/mock.js +2 -2
- package/dist/index.css +6 -1
- package/package.json +1 -1
- package/src/RecapStory.tsx +21 -1
- package/src/StoryProgress.tsx +0 -3
- package/src/data/mock.ts +2 -2
- package/src/index.css +6 -1
package/dist/RecapStory.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RecapStory.d.ts","sourceRoot":"","sources":["../src/RecapStory.tsx"],"names":[],"mappings":"AAiBA,OAAO,EAAuB,SAAS,EAAE,MAAM,SAAS,CAAC;AAEzD,OAAO,kBAAkB,CAAC;AAK1B,UAAU,eAAe;IACvB,SAAS,EAAE,SAAS,CAAC;CACtB;AAED;;GAEG;AACH,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,EAAE,eAAe,
|
|
1
|
+
{"version":3,"file":"RecapStory.d.ts","sourceRoot":"","sources":["../src/RecapStory.tsx"],"names":[],"mappings":"AAiBA,OAAO,EAAuB,SAAS,EAAE,MAAM,SAAS,CAAC;AAEzD,OAAO,kBAAkB,CAAC;AAK1B,UAAU,eAAe;IACvB,SAAS,EAAE,SAAS,CAAC;CACtB;AAED;;GAEG;AACH,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,EAAE,eAAe,2CA+YjD;AAED,eAAe,UAAU,CAAC"}
|
package/dist/RecapStory.js
CHANGED
|
@@ -27,11 +27,30 @@ const recapMusic = "https://katajereassets.blob.core.windows.net/recap-videos/re
|
|
|
27
27
|
function RecapStory({ recapData }) {
|
|
28
28
|
const [activeIndex, setActiveIndex] = useState(0);
|
|
29
29
|
const durations = recapData.slideDurations || defaultDurations;
|
|
30
|
-
|
|
30
|
+
// Start paused when in video generation mode - orchestrator will unpause via window.__RECAP_START__
|
|
31
|
+
const [isPaused, setIsPaused] = useState(recapData.isVideo === true);
|
|
31
32
|
const [isShareVisible, setIsShareVisible] = useState(false);
|
|
32
33
|
const holdTimerRef = useRef(null);
|
|
33
34
|
const isHoldingRef = useRef(false);
|
|
34
35
|
const slidesContainerRef = useRef(null);
|
|
36
|
+
// Expose global start function for video generation orchestrator
|
|
37
|
+
React.useEffect(() => {
|
|
38
|
+
if (recapData.isVideo) {
|
|
39
|
+
// Expose function to start the story (used by Puppeteer after recording starts)
|
|
40
|
+
window.__RECAP_START__ = () => {
|
|
41
|
+
setIsPaused(false);
|
|
42
|
+
};
|
|
43
|
+
// Also add a ready flag so orchestrator knows the component is mounted
|
|
44
|
+
window.__RECAP_READY__ = true;
|
|
45
|
+
}
|
|
46
|
+
return () => {
|
|
47
|
+
// Cleanup global functions
|
|
48
|
+
if (recapData.isVideo) {
|
|
49
|
+
delete window.__RECAP_START__;
|
|
50
|
+
delete window.__RECAP_READY__;
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
}, [recapData.isVideo]);
|
|
35
54
|
// Cleanup on unmount to prevent memory leaks
|
|
36
55
|
React.useEffect(() => {
|
|
37
56
|
return () => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StoryProgress.d.ts","sourceRoot":"","sources":["../src/StoryProgress.tsx"],"names":[],"mappings":"AACA,OAAO,qBAAqB,CAAC;AAE7B,UAAU,kBAAkB;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,UAAU,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACpC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;GAEG;AACH,iBAAS,aAAa,CAAC,EACrB,KAAK,EACL,MAAM,EACN,QAAQ,EACR,UAAU,EACV,UAAU,EACV,UAAU,EACV,QAAQ,GACT,EAAE,kBAAkB,
|
|
1
|
+
{"version":3,"file":"StoryProgress.d.ts","sourceRoot":"","sources":["../src/StoryProgress.tsx"],"names":[],"mappings":"AACA,OAAO,qBAAqB,CAAC;AAE7B,UAAU,kBAAkB;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,UAAU,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACpC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;GAEG;AACH,iBAAS,aAAa,CAAC,EACrB,KAAK,EACL,MAAM,EACN,QAAQ,EACR,UAAU,EACV,UAAU,EACV,UAAU,EACV,QAAQ,GACT,EAAE,kBAAkB,2CAyGpB;AAED,eAAe,aAAa,CAAC"}
|
package/dist/StoryProgress.js
CHANGED
|
@@ -36,9 +36,6 @@ function StoryProgress({ total, active, duration, onComplete, onBarClick, hideBo
|
|
|
36
36
|
// Resume from paused progress
|
|
37
37
|
startTimeRef.current = performance.now();
|
|
38
38
|
const startProgress = pausedProgressRef.current;
|
|
39
|
-
if (startProgress >= 1) {
|
|
40
|
-
return;
|
|
41
|
-
}
|
|
42
39
|
if (startProgress >= 1) {
|
|
43
40
|
setProgress(1);
|
|
44
41
|
onCompleteRef.current();
|
package/dist/data/mock.js
CHANGED
|
@@ -53,8 +53,8 @@ export const mockRecapData = {
|
|
|
53
53
|
],
|
|
54
54
|
businessCategory: BUSINESS_CATEGORIES.THRIVING,
|
|
55
55
|
busiestMonth: "Oct",
|
|
56
|
-
videoUrl: "https://katajereassets.blob.core.windows.net/
|
|
57
|
-
downloadUrl: "https://api.huxxle.com/api/download?fileUrl=https://katajereassets.blob.core.windows.net/
|
|
56
|
+
videoUrl: "https://katajereassets.blob.core.windows.net/recap-videos/recap_4e5f6a7b-8c9d-0e1f-2a3b-4c5d6e7f8a9b_738c9226abe1a8f1a07263948a2d175e.mp4",
|
|
57
|
+
downloadUrl: "https://api.huxxle.com/api/download?fileUrl=https://katajereassets.blob.core.windows.net/recap-videos/recap_4e5f6a7b-8c9d-0e1f-2a3b-4c5d6e7f8a9b_738c9226abe1a8f1a07263948a2d175e.mp4",
|
|
58
58
|
isVideo: false,
|
|
59
59
|
websiteLink: "https://vendor.huxxle.com",
|
|
60
60
|
websiteVisits: 123400,
|
package/dist/index.css
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
|
+
/* Google Fonts import for Lora - must be first for priority loading */
|
|
2
|
+
@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600;1,700&display=swap');
|
|
3
|
+
|
|
1
4
|
body {
|
|
2
5
|
margin: 0;
|
|
3
|
-
|
|
6
|
+
/* Lora as primary, with emoji font fallbacks for cross-platform emoji support */
|
|
7
|
+
font-family: 'Lora', 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji',
|
|
8
|
+
-apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
|
|
4
9
|
'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
|
|
5
10
|
sans-serif;
|
|
6
11
|
-webkit-font-smoothing: antialiased;
|
package/package.json
CHANGED
package/src/RecapStory.tsx
CHANGED
|
@@ -32,12 +32,32 @@ interface RecapStoryProps {
|
|
|
32
32
|
function RecapStory({ recapData }: RecapStoryProps) {
|
|
33
33
|
const [activeIndex, setActiveIndex] = useState<number>(0);
|
|
34
34
|
const durations = recapData.slideDurations || defaultDurations;
|
|
35
|
-
|
|
35
|
+
// Start paused when in video generation mode - orchestrator will unpause via window.__RECAP_START__
|
|
36
|
+
const [isPaused, setIsPaused] = useState<boolean>(recapData.isVideo === true);
|
|
36
37
|
const [isShareVisible, setIsShareVisible] = useState<boolean>(false);
|
|
37
38
|
const holdTimerRef = useRef<ReturnType<typeof setTimeout> | null>(null);
|
|
38
39
|
const isHoldingRef = useRef<boolean>(false);
|
|
39
40
|
const slidesContainerRef = useRef<HTMLDivElement>(null);
|
|
40
41
|
|
|
42
|
+
// Expose global start function for video generation orchestrator
|
|
43
|
+
React.useEffect(() => {
|
|
44
|
+
if (recapData.isVideo) {
|
|
45
|
+
// Expose function to start the story (used by Puppeteer after recording starts)
|
|
46
|
+
(window as unknown as { __RECAP_START__?: () => void }).__RECAP_START__ = () => {
|
|
47
|
+
setIsPaused(false);
|
|
48
|
+
};
|
|
49
|
+
// Also add a ready flag so orchestrator knows the component is mounted
|
|
50
|
+
(window as unknown as { __RECAP_READY__?: boolean }).__RECAP_READY__ = true;
|
|
51
|
+
}
|
|
52
|
+
return () => {
|
|
53
|
+
// Cleanup global functions
|
|
54
|
+
if (recapData.isVideo) {
|
|
55
|
+
delete (window as unknown as { __RECAP_START__?: () => void }).__RECAP_START__;
|
|
56
|
+
delete (window as unknown as { __RECAP_READY__?: boolean }).__RECAP_READY__;
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
}, [recapData.isVideo]);
|
|
60
|
+
|
|
41
61
|
// Cleanup on unmount to prevent memory leaks
|
|
42
62
|
React.useEffect(() => {
|
|
43
63
|
return () => {
|
package/src/StoryProgress.tsx
CHANGED
|
@@ -58,9 +58,6 @@ function StoryProgress({
|
|
|
58
58
|
// Resume from paused progress
|
|
59
59
|
startTimeRef.current = performance.now();
|
|
60
60
|
const startProgress = pausedProgressRef.current;
|
|
61
|
-
if (startProgress >= 1) {
|
|
62
|
-
return;
|
|
63
|
-
}
|
|
64
61
|
if (startProgress >= 1) {
|
|
65
62
|
setProgress(1);
|
|
66
63
|
onCompleteRef.current();
|
package/src/data/mock.ts
CHANGED
|
@@ -61,9 +61,9 @@ export const mockRecapData: RecapData = {
|
|
|
61
61
|
businessCategory: BUSINESS_CATEGORIES.THRIVING,
|
|
62
62
|
busiestMonth: "Oct",
|
|
63
63
|
videoUrl:
|
|
64
|
-
"https://katajereassets.blob.core.windows.net/
|
|
64
|
+
"https://katajereassets.blob.core.windows.net/recap-videos/recap_4e5f6a7b-8c9d-0e1f-2a3b-4c5d6e7f8a9b_738c9226abe1a8f1a07263948a2d175e.mp4",
|
|
65
65
|
downloadUrl:
|
|
66
|
-
"https://api.huxxle.com/api/download?fileUrl=https://katajereassets.blob.core.windows.net/
|
|
66
|
+
"https://api.huxxle.com/api/download?fileUrl=https://katajereassets.blob.core.windows.net/recap-videos/recap_4e5f6a7b-8c9d-0e1f-2a3b-4c5d6e7f8a9b_738c9226abe1a8f1a07263948a2d175e.mp4",
|
|
67
67
|
isVideo: false,
|
|
68
68
|
websiteLink: "https://vendor.huxxle.com",
|
|
69
69
|
websiteVisits: 123400,
|
package/src/index.css
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
|
+
/* Google Fonts import for Lora - must be first for priority loading */
|
|
2
|
+
@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600;1,700&display=swap');
|
|
3
|
+
|
|
1
4
|
body {
|
|
2
5
|
margin: 0;
|
|
3
|
-
|
|
6
|
+
/* Lora as primary, with emoji font fallbacks for cross-platform emoji support */
|
|
7
|
+
font-family: 'Lora', 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji',
|
|
8
|
+
-apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
|
|
4
9
|
'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
|
|
5
10
|
sans-serif;
|
|
6
11
|
-webkit-font-smoothing: antialiased;
|