@remotion/promo-pages 4.0.485 → 4.0.487
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/Homepage.css +1 -1
- package/dist/Homepage.js +1215 -2314
- package/dist/components/homepage/CommunityStatsItems.js +2 -2
- package/dist/components/homepage/GetStartedStrip.js +1 -1
- package/dist/components/homepage/GitHubButton.js +1 -1
- package/dist/components/homepage/Pricing.d.ts +3 -1
- package/dist/components/homepage/Pricing.js +6 -2
- package/dist/components/prompts/PromptsGallery.js +1 -1
- package/dist/components/prompts/PromptsSubmit.js +3 -169
- package/dist/design.js +318 -206
- package/dist/experts.js +225 -113
- package/dist/homepage/Pricing.js +349 -215
- package/dist/prompts/PromptsGallery.js +322 -210
- package/dist/prompts/PromptsShow.js +320 -208
- package/dist/prompts/PromptsSubmit.js +318 -206
- package/dist/tailwind.css +21 -3
- package/dist/team.js +318 -206
- package/dist/template-modal-content.css +1 -1
- package/dist/template-modal-content.js +327 -215
- package/dist/templates.js +318 -206
- package/package.json +17 -17
- package/public/img/editing-safari.mp4 +0 -0
- package/public/img/editing-vp9-chrome.webm +0 -0
- package/public/img/homepage-assets-master.mp4 +0 -0
- package/public/img/homepage-assets-master.webm +0 -0
- package/public/img/what-is-remotion.mp4 +0 -0
- package/public/img/what-is-remotion.webm +0 -0
|
@@ -18712,7 +18712,7 @@ var getDefaultConfig = () => {
|
|
|
18712
18712
|
var twMerge = /* @__PURE__ */ createTailwindMerge(getDefaultConfig);
|
|
18713
18713
|
|
|
18714
18714
|
// ../design/dist/esm/index.mjs
|
|
18715
|
-
import React32, { useEffect as
|
|
18715
|
+
import React32, { useEffect as useEffect21, useMemo as useMemo42, useState as useState21 } from "react";
|
|
18716
18716
|
|
|
18717
18717
|
// ../paths/dist/esm/index.mjs
|
|
18718
18718
|
var cutLInstruction = ({
|
|
@@ -20818,6 +20818,94 @@ var getBoundingBox = (d) => {
|
|
|
20818
20818
|
const unarced = removeATSHVQInstructions(normalizeInstructions(parsed));
|
|
20819
20819
|
return getBoundingBoxFromInstructions(unarced);
|
|
20820
20820
|
};
|
|
20821
|
+
var translateSegments = (segments, x, y) => {
|
|
20822
|
+
return segments.map((segment) => {
|
|
20823
|
+
if (segment.type === "a" || segment.type === "c" || segment.type === "v" || segment.type === "s" || segment.type === "h" || segment.type === "l" || segment.type === "m" || segment.type === "q" || segment.type === "t") {
|
|
20824
|
+
return segment;
|
|
20825
|
+
}
|
|
20826
|
+
if (segment.type === "V") {
|
|
20827
|
+
return {
|
|
20828
|
+
type: "V",
|
|
20829
|
+
y: segment.y + y
|
|
20830
|
+
};
|
|
20831
|
+
}
|
|
20832
|
+
if (segment.type === "H") {
|
|
20833
|
+
return {
|
|
20834
|
+
type: "H",
|
|
20835
|
+
x: segment.x + x
|
|
20836
|
+
};
|
|
20837
|
+
}
|
|
20838
|
+
if (segment.type === "A") {
|
|
20839
|
+
return {
|
|
20840
|
+
type: "A",
|
|
20841
|
+
rx: segment.rx,
|
|
20842
|
+
ry: segment.ry,
|
|
20843
|
+
largeArcFlag: segment.largeArcFlag,
|
|
20844
|
+
sweepFlag: segment.sweepFlag,
|
|
20845
|
+
xAxisRotation: segment.xAxisRotation,
|
|
20846
|
+
x: segment.x + x,
|
|
20847
|
+
y: segment.y + y
|
|
20848
|
+
};
|
|
20849
|
+
}
|
|
20850
|
+
if (segment.type === "Z") {
|
|
20851
|
+
return segment;
|
|
20852
|
+
}
|
|
20853
|
+
if (segment.type === "C") {
|
|
20854
|
+
return {
|
|
20855
|
+
type: "C",
|
|
20856
|
+
cp1x: segment.cp1x + x,
|
|
20857
|
+
cp1y: segment.cp1y + y,
|
|
20858
|
+
cp2x: segment.cp2x + x,
|
|
20859
|
+
cp2y: segment.cp2y + y,
|
|
20860
|
+
x: segment.x + x,
|
|
20861
|
+
y: segment.y + y
|
|
20862
|
+
};
|
|
20863
|
+
}
|
|
20864
|
+
if (segment.type === "Q") {
|
|
20865
|
+
return {
|
|
20866
|
+
type: "Q",
|
|
20867
|
+
cpx: segment.cpx + x,
|
|
20868
|
+
cpy: segment.cpy + y,
|
|
20869
|
+
x: segment.x + x,
|
|
20870
|
+
y: segment.y + y
|
|
20871
|
+
};
|
|
20872
|
+
}
|
|
20873
|
+
if (segment.type === "S") {
|
|
20874
|
+
return {
|
|
20875
|
+
type: "S",
|
|
20876
|
+
cpx: segment.cpx + x,
|
|
20877
|
+
cpy: segment.cpy + y,
|
|
20878
|
+
x: segment.x + x,
|
|
20879
|
+
y: segment.y + y
|
|
20880
|
+
};
|
|
20881
|
+
}
|
|
20882
|
+
if (segment.type === "T") {
|
|
20883
|
+
return {
|
|
20884
|
+
type: "T",
|
|
20885
|
+
x: segment.x + x,
|
|
20886
|
+
y: segment.y + y
|
|
20887
|
+
};
|
|
20888
|
+
}
|
|
20889
|
+
if (segment.type === "L") {
|
|
20890
|
+
return {
|
|
20891
|
+
type: "L",
|
|
20892
|
+
x: segment.x + x,
|
|
20893
|
+
y: segment.y + y
|
|
20894
|
+
};
|
|
20895
|
+
}
|
|
20896
|
+
if (segment.type === "M") {
|
|
20897
|
+
return {
|
|
20898
|
+
type: "M",
|
|
20899
|
+
x: segment.x + x,
|
|
20900
|
+
y: segment.y + y
|
|
20901
|
+
};
|
|
20902
|
+
}
|
|
20903
|
+
throw new Error(`Unknown segment type: ${segment.type}`);
|
|
20904
|
+
});
|
|
20905
|
+
};
|
|
20906
|
+
var translatePath = (path, x, y) => {
|
|
20907
|
+
return serializeInstructions(translateSegments(parsePath(path), x, y));
|
|
20908
|
+
};
|
|
20821
20909
|
var mod = (x, m) => {
|
|
20822
20910
|
return (x % m + m) % m;
|
|
20823
20911
|
};
|
|
@@ -21379,94 +21467,6 @@ var getLength = (path) => {
|
|
|
21379
21467
|
const constructucted = construct(path);
|
|
21380
21468
|
return constructucted.totalLength;
|
|
21381
21469
|
};
|
|
21382
|
-
var translateSegments = (segments, x, y) => {
|
|
21383
|
-
return segments.map((segment) => {
|
|
21384
|
-
if (segment.type === "a" || segment.type === "c" || segment.type === "v" || segment.type === "s" || segment.type === "h" || segment.type === "l" || segment.type === "m" || segment.type === "q" || segment.type === "t") {
|
|
21385
|
-
return segment;
|
|
21386
|
-
}
|
|
21387
|
-
if (segment.type === "V") {
|
|
21388
|
-
return {
|
|
21389
|
-
type: "V",
|
|
21390
|
-
y: segment.y + y
|
|
21391
|
-
};
|
|
21392
|
-
}
|
|
21393
|
-
if (segment.type === "H") {
|
|
21394
|
-
return {
|
|
21395
|
-
type: "H",
|
|
21396
|
-
x: segment.x + x
|
|
21397
|
-
};
|
|
21398
|
-
}
|
|
21399
|
-
if (segment.type === "A") {
|
|
21400
|
-
return {
|
|
21401
|
-
type: "A",
|
|
21402
|
-
rx: segment.rx,
|
|
21403
|
-
ry: segment.ry,
|
|
21404
|
-
largeArcFlag: segment.largeArcFlag,
|
|
21405
|
-
sweepFlag: segment.sweepFlag,
|
|
21406
|
-
xAxisRotation: segment.xAxisRotation,
|
|
21407
|
-
x: segment.x + x,
|
|
21408
|
-
y: segment.y + y
|
|
21409
|
-
};
|
|
21410
|
-
}
|
|
21411
|
-
if (segment.type === "Z") {
|
|
21412
|
-
return segment;
|
|
21413
|
-
}
|
|
21414
|
-
if (segment.type === "C") {
|
|
21415
|
-
return {
|
|
21416
|
-
type: "C",
|
|
21417
|
-
cp1x: segment.cp1x + x,
|
|
21418
|
-
cp1y: segment.cp1y + y,
|
|
21419
|
-
cp2x: segment.cp2x + x,
|
|
21420
|
-
cp2y: segment.cp2y + y,
|
|
21421
|
-
x: segment.x + x,
|
|
21422
|
-
y: segment.y + y
|
|
21423
|
-
};
|
|
21424
|
-
}
|
|
21425
|
-
if (segment.type === "Q") {
|
|
21426
|
-
return {
|
|
21427
|
-
type: "Q",
|
|
21428
|
-
cpx: segment.cpx + x,
|
|
21429
|
-
cpy: segment.cpy + y,
|
|
21430
|
-
x: segment.x + x,
|
|
21431
|
-
y: segment.y + y
|
|
21432
|
-
};
|
|
21433
|
-
}
|
|
21434
|
-
if (segment.type === "S") {
|
|
21435
|
-
return {
|
|
21436
|
-
type: "S",
|
|
21437
|
-
cpx: segment.cpx + x,
|
|
21438
|
-
cpy: segment.cpy + y,
|
|
21439
|
-
x: segment.x + x,
|
|
21440
|
-
y: segment.y + y
|
|
21441
|
-
};
|
|
21442
|
-
}
|
|
21443
|
-
if (segment.type === "T") {
|
|
21444
|
-
return {
|
|
21445
|
-
type: "T",
|
|
21446
|
-
x: segment.x + x,
|
|
21447
|
-
y: segment.y + y
|
|
21448
|
-
};
|
|
21449
|
-
}
|
|
21450
|
-
if (segment.type === "L") {
|
|
21451
|
-
return {
|
|
21452
|
-
type: "L",
|
|
21453
|
-
x: segment.x + x,
|
|
21454
|
-
y: segment.y + y
|
|
21455
|
-
};
|
|
21456
|
-
}
|
|
21457
|
-
if (segment.type === "M") {
|
|
21458
|
-
return {
|
|
21459
|
-
type: "M",
|
|
21460
|
-
x: segment.x + x,
|
|
21461
|
-
y: segment.y + y
|
|
21462
|
-
};
|
|
21463
|
-
}
|
|
21464
|
-
throw new Error(`Unknown segment type: ${segment.type}`);
|
|
21465
|
-
});
|
|
21466
|
-
};
|
|
21467
|
-
var translatePath = (path, x, y) => {
|
|
21468
|
-
return serializeInstructions(translateSegments(parsePath(path), x, y));
|
|
21469
|
-
};
|
|
21470
21470
|
var resetPath = (d) => {
|
|
21471
21471
|
const box = getBoundingBox(d);
|
|
21472
21472
|
return translatePath(d, -box.x1, -box.y1);
|
|
@@ -21655,8 +21655,8 @@ import {
|
|
|
21655
21655
|
forwardRef as forwardRef10,
|
|
21656
21656
|
useCallback as useCallback17,
|
|
21657
21657
|
useContext as useContext32,
|
|
21658
|
-
useEffect as useEffect17,
|
|
21659
21658
|
useImperativeHandle as useImperativeHandle7,
|
|
21659
|
+
useLayoutEffect as useLayoutEffect10,
|
|
21660
21660
|
useMemo as useMemo31,
|
|
21661
21661
|
useRef as useRef23,
|
|
21662
21662
|
useState as useState16
|
|
@@ -21664,7 +21664,7 @@ import {
|
|
|
21664
21664
|
import { jsx as jsx26 } from "react/jsx-runtime";
|
|
21665
21665
|
import { forwardRef as forwardRef11, useCallback as useCallback18, useState as useState17 } from "react";
|
|
21666
21666
|
import { jsx as jsx27 } from "react/jsx-runtime";
|
|
21667
|
-
import { useCallback as useCallback19, useContext as useContext33, useLayoutEffect as
|
|
21667
|
+
import { useCallback as useCallback19, useContext as useContext33, useLayoutEffect as useLayoutEffect11, useRef as useRef24 } from "react";
|
|
21668
21668
|
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
21669
21669
|
import React29, { forwardRef as forwardRef12, useCallback as useCallback20, useRef as useRef25 } from "react";
|
|
21670
21670
|
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
@@ -21690,8 +21690,8 @@ import { useCallback as useCallback24 } from "react";
|
|
|
21690
21690
|
import {
|
|
21691
21691
|
useCallback as useCallback22,
|
|
21692
21692
|
useContext as useContext36,
|
|
21693
|
-
useEffect as
|
|
21694
|
-
useLayoutEffect as
|
|
21693
|
+
useEffect as useEffect17,
|
|
21694
|
+
useLayoutEffect as useLayoutEffect12,
|
|
21695
21695
|
useMemo as useMemo35,
|
|
21696
21696
|
useState as useState19
|
|
21697
21697
|
} from "react";
|
|
@@ -21700,13 +21700,13 @@ import React37, {
|
|
|
21700
21700
|
forwardRef as forwardRef13,
|
|
21701
21701
|
useCallback as useCallback23,
|
|
21702
21702
|
useContext as useContext37,
|
|
21703
|
-
useEffect as
|
|
21703
|
+
useEffect as useEffect19,
|
|
21704
21704
|
useImperativeHandle as useImperativeHandle9,
|
|
21705
21705
|
useMemo as useMemo36,
|
|
21706
21706
|
useRef as useRef27,
|
|
21707
21707
|
useState as useState20
|
|
21708
21708
|
} from "react";
|
|
21709
|
-
import { useEffect as
|
|
21709
|
+
import { useEffect as useEffect18 } from "react";
|
|
21710
21710
|
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
21711
21711
|
import { jsx as jsx35 } from "react/jsx-runtime";
|
|
21712
21712
|
import React39, { useMemo as useMemo37 } from "react";
|
|
@@ -21723,9 +21723,9 @@ import { forwardRef as forwardRef16, useCallback as useCallback25, useContext as
|
|
|
21723
21723
|
import {
|
|
21724
21724
|
forwardRef as forwardRef15,
|
|
21725
21725
|
useContext as useContext38,
|
|
21726
|
-
useEffect as
|
|
21726
|
+
useEffect as useEffect20,
|
|
21727
21727
|
useImperativeHandle as useImperativeHandle10,
|
|
21728
|
-
useLayoutEffect as
|
|
21728
|
+
useLayoutEffect as useLayoutEffect13,
|
|
21729
21729
|
useMemo as useMemo39,
|
|
21730
21730
|
useRef as useRef28
|
|
21731
21731
|
} from "react";
|
|
@@ -22899,7 +22899,7 @@ var getComponentsToAddStacksTo = () => componentsToAddStacksTo;
|
|
|
22899
22899
|
var addSequenceStackTraces = (component) => {
|
|
22900
22900
|
componentsToAddStacksTo.push(component);
|
|
22901
22901
|
};
|
|
22902
|
-
var VERSION = "4.0.
|
|
22902
|
+
var VERSION = "4.0.487";
|
|
22903
22903
|
var checkMultipleRemotionVersions = () => {
|
|
22904
22904
|
if (typeof globalThis === "undefined") {
|
|
22905
22905
|
return;
|
|
@@ -23305,6 +23305,12 @@ var textSchema = {
|
|
|
23305
23305
|
default: undefined,
|
|
23306
23306
|
description: "Color"
|
|
23307
23307
|
},
|
|
23308
|
+
"style.fontFamily": {
|
|
23309
|
+
type: "font-family",
|
|
23310
|
+
default: undefined,
|
|
23311
|
+
description: "Font family",
|
|
23312
|
+
keyframable: false
|
|
23313
|
+
},
|
|
23308
23314
|
"style.fontSize": {
|
|
23309
23315
|
type: "number",
|
|
23310
23316
|
default: undefined,
|
|
@@ -28763,7 +28769,8 @@ var useBufferManager = (logLevel, mountTime) => {
|
|
|
28763
28769
|
if (rendering) {
|
|
28764
28770
|
return;
|
|
28765
28771
|
}
|
|
28766
|
-
if (blocks.length > 0) {
|
|
28772
|
+
if (blocks.length > 0 && !buffering.current) {
|
|
28773
|
+
buffering.current = true;
|
|
28767
28774
|
onBufferingCallbacks.forEach((c2) => c2());
|
|
28768
28775
|
playbackLogging({
|
|
28769
28776
|
logLevel,
|
|
@@ -28778,7 +28785,8 @@ var useBufferManager = (logLevel, mountTime) => {
|
|
|
28778
28785
|
if (rendering) {
|
|
28779
28786
|
return;
|
|
28780
28787
|
}
|
|
28781
|
-
if (blocks.length === 0) {
|
|
28788
|
+
if (blocks.length === 0 && buffering.current) {
|
|
28789
|
+
buffering.current = false;
|
|
28782
28790
|
onResumeCallbacks.forEach((c2) => c2());
|
|
28783
28791
|
playbackLogging({
|
|
28784
28792
|
logLevel,
|
|
@@ -28811,15 +28819,11 @@ var useIsPlayerBuffering = (bufferManager) => {
|
|
|
28811
28819
|
const onResume = () => {
|
|
28812
28820
|
setIsBuffering(false);
|
|
28813
28821
|
};
|
|
28814
|
-
bufferManager.listenForBuffering(onBuffer);
|
|
28815
|
-
bufferManager.listenForResume(onResume);
|
|
28822
|
+
const buffer = bufferManager.listenForBuffering(onBuffer);
|
|
28823
|
+
const resume = bufferManager.listenForResume(onResume);
|
|
28816
28824
|
return () => {
|
|
28817
|
-
|
|
28818
|
-
|
|
28819
|
-
});
|
|
28820
|
-
bufferManager.listenForResume(() => {
|
|
28821
|
-
return;
|
|
28822
|
-
});
|
|
28825
|
+
buffer.remove();
|
|
28826
|
+
resume.remove();
|
|
28823
28827
|
};
|
|
28824
28828
|
}, [bufferManager]);
|
|
28825
28829
|
return isBuffering;
|
|
@@ -28943,6 +28947,72 @@ var useBufferUntilFirstFrame = ({
|
|
|
28943
28947
|
};
|
|
28944
28948
|
}, [bufferUntilFirstFrame]);
|
|
28945
28949
|
};
|
|
28950
|
+
var getMediaSyncAction = (input) => {
|
|
28951
|
+
const {
|
|
28952
|
+
duration,
|
|
28953
|
+
currentTime,
|
|
28954
|
+
paused,
|
|
28955
|
+
ended,
|
|
28956
|
+
desiredUnclampedTime,
|
|
28957
|
+
mediaTagTime,
|
|
28958
|
+
mediaTagLastUpdate,
|
|
28959
|
+
rvcTime,
|
|
28960
|
+
rvcLastUpdate,
|
|
28961
|
+
isVariableFpsVideo,
|
|
28962
|
+
acceptableTimeShift,
|
|
28963
|
+
lastSeekDueToShift,
|
|
28964
|
+
playing,
|
|
28965
|
+
playbackRate,
|
|
28966
|
+
mediaTagBufferingOrStalled,
|
|
28967
|
+
playerBuffering,
|
|
28968
|
+
absoluteFrame,
|
|
28969
|
+
onlyWarnForMediaSeekingError,
|
|
28970
|
+
isPremounting,
|
|
28971
|
+
isPostmounting,
|
|
28972
|
+
pauseWhenBuffering
|
|
28973
|
+
} = input;
|
|
28974
|
+
const shouldBeTime = !Number.isNaN(duration) && Number.isFinite(duration) ? Math.min(duration, desiredUnclampedTime) : desiredUnclampedTime;
|
|
28975
|
+
const timeShiftMediaTag = Math.abs(shouldBeTime - mediaTagTime);
|
|
28976
|
+
const timeShiftRvcTag = rvcTime ? Math.abs(shouldBeTime - rvcTime) : null;
|
|
28977
|
+
const mostRecentTimeshift = rvcLastUpdate && rvcTime > mediaTagLastUpdate ? timeShiftRvcTag : timeShiftMediaTag;
|
|
28978
|
+
const timeShift = timeShiftRvcTag && !isVariableFpsVideo ? mostRecentTimeshift : timeShiftMediaTag;
|
|
28979
|
+
if (timeShift > acceptableTimeShift && lastSeekDueToShift !== shouldBeTime) {
|
|
28980
|
+
return {
|
|
28981
|
+
type: "seek-due-to-shift",
|
|
28982
|
+
shouldBeTime,
|
|
28983
|
+
why: `because time shift is too big. shouldBeTime = ${shouldBeTime}, isTime = ${mediaTagTime}, requestVideoCallbackTime = ${rvcTime}, timeShift = ${timeShift}${isVariableFpsVideo ? ", isVariableFpsVideo = true" : ""}, isPremounting = ${isPremounting}, isPostmounting = ${isPostmounting}, pauseWhenBuffering = ${pauseWhenBuffering}`,
|
|
28984
|
+
bufferUntilFirstFrame: playing && playbackRate > 0,
|
|
28985
|
+
playReason: playing && paused ? "player is playing but media tag is paused, and just seeked" : null,
|
|
28986
|
+
warnAboutNonSeekable: !onlyWarnForMediaSeekingError
|
|
28987
|
+
};
|
|
28988
|
+
}
|
|
28989
|
+
const seekThreshold = playing ? 0.15 : 0.01;
|
|
28990
|
+
const makesSenseToSeek = Math.abs(currentTime - shouldBeTime) > seekThreshold;
|
|
28991
|
+
const isSomethingElseBuffering = playerBuffering && !mediaTagBufferingOrStalled;
|
|
28992
|
+
if (!playing || isSomethingElseBuffering) {
|
|
28993
|
+
return {
|
|
28994
|
+
type: "seek-if-not-playing",
|
|
28995
|
+
shouldBeTime,
|
|
28996
|
+
why: makesSenseToSeek ? `not playing or something else is buffering. time offset is over seek threshold (${seekThreshold})` : null
|
|
28997
|
+
};
|
|
28998
|
+
}
|
|
28999
|
+
if (!playing || playerBuffering) {
|
|
29000
|
+
return { type: "none" };
|
|
29001
|
+
}
|
|
29002
|
+
const pausedCondition = paused && !ended;
|
|
29003
|
+
const firstFrameCondition = absoluteFrame === 0;
|
|
29004
|
+
if (pausedCondition || firstFrameCondition) {
|
|
29005
|
+
const reason = pausedCondition ? "media tag is paused" : "absolute frame is 0";
|
|
29006
|
+
return {
|
|
29007
|
+
type: "play-and-seek",
|
|
29008
|
+
shouldBeTime,
|
|
29009
|
+
why: makesSenseToSeek ? `is over timeshift threshold (threshold = ${seekThreshold}) and ${reason}` : null,
|
|
29010
|
+
playReason: `player is playing and ${reason}`,
|
|
29011
|
+
bufferUntilFirstFrame: !isVariableFpsVideo && playbackRate > 0
|
|
29012
|
+
};
|
|
29013
|
+
}
|
|
29014
|
+
return { type: "none" };
|
|
29015
|
+
};
|
|
28946
29016
|
var useCurrentTimeOfMediaTagWithUpdateTimeStamp = (mediaRef) => {
|
|
28947
29017
|
const lastUpdate = React21.useRef({
|
|
28948
29018
|
time: mediaRef.current?.currentTime ?? 0,
|
|
@@ -29362,89 +29432,93 @@ var useMediaPlayback = ({
|
|
|
29362
29432
|
if (!src) {
|
|
29363
29433
|
throw new Error(`No 'src' attribute was passed to the ${tagName} element.`);
|
|
29364
29434
|
}
|
|
29365
|
-
const {
|
|
29366
|
-
const
|
|
29367
|
-
|
|
29368
|
-
|
|
29369
|
-
|
|
29370
|
-
|
|
29371
|
-
|
|
29372
|
-
|
|
29373
|
-
|
|
29374
|
-
|
|
29435
|
+
const { current } = mediaRef;
|
|
29436
|
+
const action = getMediaSyncAction({
|
|
29437
|
+
duration: current.duration,
|
|
29438
|
+
currentTime: current.currentTime,
|
|
29439
|
+
paused: current.paused,
|
|
29440
|
+
ended: current.ended,
|
|
29441
|
+
desiredUnclampedTime,
|
|
29442
|
+
mediaTagTime: mediaTagCurrentTime.current.time,
|
|
29443
|
+
mediaTagLastUpdate: mediaTagCurrentTime.current.lastUpdate,
|
|
29444
|
+
rvcTime: rvcCurrentTime.current?.time ?? null,
|
|
29445
|
+
rvcLastUpdate: rvcCurrentTime.current?.lastUpdate ?? null,
|
|
29446
|
+
isVariableFpsVideo: Boolean(isVariableFpsVideoMap.current[src]),
|
|
29447
|
+
acceptableTimeShift: acceptableTimeShiftButLessThanDuration,
|
|
29448
|
+
lastSeekDueToShift: lastSeekDueToShift.current,
|
|
29449
|
+
playing,
|
|
29450
|
+
playbackRate,
|
|
29451
|
+
mediaTagBufferingOrStalled: isMediaTagBuffering || isBuffering(),
|
|
29452
|
+
playerBuffering: buffering.buffering.current,
|
|
29453
|
+
absoluteFrame,
|
|
29454
|
+
onlyWarnForMediaSeekingError,
|
|
29455
|
+
isPremounting,
|
|
29456
|
+
isPostmounting,
|
|
29457
|
+
pauseWhenBuffering
|
|
29458
|
+
});
|
|
29459
|
+
if (action.type === "none") {
|
|
29460
|
+
return;
|
|
29461
|
+
}
|
|
29462
|
+
if (action.type === "seek-due-to-shift") {
|
|
29375
29463
|
lastSeek.current = seek({
|
|
29376
|
-
mediaRef:
|
|
29377
|
-
time: shouldBeTime,
|
|
29464
|
+
mediaRef: current,
|
|
29465
|
+
time: action.shouldBeTime,
|
|
29378
29466
|
logLevel,
|
|
29379
|
-
why:
|
|
29467
|
+
why: action.why,
|
|
29380
29468
|
mountTime
|
|
29381
29469
|
});
|
|
29382
29470
|
lastSeekDueToShift.current = lastSeek.current;
|
|
29383
|
-
if (
|
|
29384
|
-
|
|
29385
|
-
bufferUntilFirstFrame(shouldBeTime);
|
|
29386
|
-
}
|
|
29387
|
-
if (mediaRef.current.paused) {
|
|
29388
|
-
playAndHandleNotAllowedError({
|
|
29389
|
-
mediaRef,
|
|
29390
|
-
mediaType,
|
|
29391
|
-
onAutoPlayError,
|
|
29392
|
-
logLevel,
|
|
29393
|
-
mountTime,
|
|
29394
|
-
reason: "player is playing but media tag is paused, and just seeked",
|
|
29395
|
-
isPlayer: env.isPlayer
|
|
29396
|
-
});
|
|
29397
|
-
}
|
|
29471
|
+
if (action.bufferUntilFirstFrame) {
|
|
29472
|
+
bufferUntilFirstFrame(action.shouldBeTime);
|
|
29398
29473
|
}
|
|
29399
|
-
if (
|
|
29400
|
-
|
|
29401
|
-
|
|
29402
|
-
|
|
29403
|
-
|
|
29404
|
-
const seekThreshold = playing ? 0.15 : 0.01;
|
|
29405
|
-
const makesSenseToSeek = Math.abs(mediaRef.current.currentTime - shouldBeTime) > seekThreshold;
|
|
29406
|
-
const isMediaTagBufferingOrStalled = isMediaTagBuffering || isBuffering();
|
|
29407
|
-
const isSomethingElseBuffering = buffering.buffering.current && !isMediaTagBufferingOrStalled;
|
|
29408
|
-
if (!playing || isSomethingElseBuffering) {
|
|
29409
|
-
if (makesSenseToSeek) {
|
|
29410
|
-
lastSeek.current = seek({
|
|
29411
|
-
mediaRef: mediaRef.current,
|
|
29412
|
-
time: shouldBeTime,
|
|
29474
|
+
if (action.playReason !== null) {
|
|
29475
|
+
playAndHandleNotAllowedError({
|
|
29476
|
+
mediaRef,
|
|
29477
|
+
mediaType,
|
|
29478
|
+
onAutoPlayError,
|
|
29413
29479
|
logLevel,
|
|
29414
|
-
|
|
29415
|
-
|
|
29480
|
+
mountTime,
|
|
29481
|
+
reason: action.playReason,
|
|
29482
|
+
isPlayer: env.isPlayer
|
|
29416
29483
|
});
|
|
29417
29484
|
}
|
|
29485
|
+
if (action.warnAboutNonSeekable) {
|
|
29486
|
+
warnAboutNonSeekableMedia(current, "console-error");
|
|
29487
|
+
}
|
|
29418
29488
|
return;
|
|
29419
29489
|
}
|
|
29420
|
-
if (
|
|
29421
|
-
|
|
29422
|
-
}
|
|
29423
|
-
const pausedCondition = mediaRef.current.paused && !mediaRef.current.ended;
|
|
29424
|
-
const firstFrameCondition = absoluteFrame === 0;
|
|
29425
|
-
if (pausedCondition || firstFrameCondition) {
|
|
29426
|
-
const reason = pausedCondition ? "media tag is paused" : "absolute frame is 0";
|
|
29427
|
-
if (makesSenseToSeek) {
|
|
29490
|
+
if (action.type === "seek-if-not-playing") {
|
|
29491
|
+
if (action.why !== null) {
|
|
29428
29492
|
lastSeek.current = seek({
|
|
29429
|
-
mediaRef:
|
|
29430
|
-
time: shouldBeTime,
|
|
29493
|
+
mediaRef: current,
|
|
29494
|
+
time: action.shouldBeTime,
|
|
29431
29495
|
logLevel,
|
|
29432
|
-
why:
|
|
29496
|
+
why: action.why,
|
|
29433
29497
|
mountTime
|
|
29434
29498
|
});
|
|
29435
29499
|
}
|
|
29436
|
-
|
|
29437
|
-
|
|
29438
|
-
|
|
29439
|
-
|
|
29500
|
+
return;
|
|
29501
|
+
}
|
|
29502
|
+
if (action.why !== null) {
|
|
29503
|
+
lastSeek.current = seek({
|
|
29504
|
+
mediaRef: current,
|
|
29505
|
+
time: action.shouldBeTime,
|
|
29440
29506
|
logLevel,
|
|
29441
|
-
|
|
29442
|
-
|
|
29443
|
-
isPlayer: env.isPlayer
|
|
29507
|
+
why: action.why,
|
|
29508
|
+
mountTime
|
|
29444
29509
|
});
|
|
29445
|
-
|
|
29446
|
-
|
|
29447
|
-
|
|
29510
|
+
}
|
|
29511
|
+
playAndHandleNotAllowedError({
|
|
29512
|
+
mediaRef,
|
|
29513
|
+
mediaType,
|
|
29514
|
+
onAutoPlayError,
|
|
29515
|
+
logLevel,
|
|
29516
|
+
mountTime,
|
|
29517
|
+
reason: action.playReason,
|
|
29518
|
+
isPlayer: env.isPlayer
|
|
29519
|
+
});
|
|
29520
|
+
if (action.bufferUntilFirstFrame) {
|
|
29521
|
+
bufferUntilFirstFrame(action.shouldBeTime);
|
|
29448
29522
|
}
|
|
29449
29523
|
}, [
|
|
29450
29524
|
absoluteFrame,
|
|
@@ -30635,6 +30709,18 @@ var loadImage = ({
|
|
|
30635
30709
|
function exponentialBackoff(errorCount) {
|
|
30636
30710
|
return 1000 * 2 ** (errorCount - 1);
|
|
30637
30711
|
}
|
|
30712
|
+
var waitForNextFrame = ({
|
|
30713
|
+
onFrame
|
|
30714
|
+
}) => {
|
|
30715
|
+
if (typeof requestAnimationFrame === "undefined") {
|
|
30716
|
+
onFrame();
|
|
30717
|
+
return () => {
|
|
30718
|
+
return;
|
|
30719
|
+
};
|
|
30720
|
+
}
|
|
30721
|
+
const frame = requestAnimationFrame(onFrame);
|
|
30722
|
+
return () => cancelAnimationFrame(frame);
|
|
30723
|
+
};
|
|
30638
30724
|
var CanvasImageContent = forwardRef10(({
|
|
30639
30725
|
src,
|
|
30640
30726
|
width,
|
|
@@ -30664,6 +30750,17 @@ var CanvasImageContent = forwardRef10(({
|
|
|
30664
30750
|
overrideId: controls?.overrideId ?? null
|
|
30665
30751
|
});
|
|
30666
30752
|
const sequenceContext = useContext32(SequenceContext);
|
|
30753
|
+
const pendingLoadDelayRef = useRef23(null);
|
|
30754
|
+
const continuePendingLoadDelay = useCallback17(() => {
|
|
30755
|
+
const pending = pendingLoadDelayRef.current;
|
|
30756
|
+
if (!pending || pending.continued) {
|
|
30757
|
+
return;
|
|
30758
|
+
}
|
|
30759
|
+
pending.continued = true;
|
|
30760
|
+
pending.unblock();
|
|
30761
|
+
continueRender2(pending.handle);
|
|
30762
|
+
pendingLoadDelayRef.current = null;
|
|
30763
|
+
}, [continueRender2]);
|
|
30667
30764
|
const sourceCanvas = useMemo31(() => {
|
|
30668
30765
|
if (typeof document === "undefined") {
|
|
30669
30766
|
return null;
|
|
@@ -30681,7 +30778,7 @@ var CanvasImageContent = forwardRef10(({
|
|
|
30681
30778
|
ref.current = canvas;
|
|
30682
30779
|
}
|
|
30683
30780
|
}, [ref, refForOutline]);
|
|
30684
|
-
|
|
30781
|
+
useLayoutEffect10(() => {
|
|
30685
30782
|
const isPremounting = Boolean(sequenceContext?.premounting);
|
|
30686
30783
|
const isPostmounting = Boolean(sequenceContext?.postmounting);
|
|
30687
30784
|
const handle = delayRender2(`Rendering <CanvasImage> with src="${truncateSrcForLabel(actualSrc)}"`, {
|
|
@@ -30693,17 +30790,13 @@ var CanvasImageContent = forwardRef10(({
|
|
|
30693
30790
|
};
|
|
30694
30791
|
const controller = new AbortController;
|
|
30695
30792
|
let cancelled = false;
|
|
30696
|
-
let continued = false;
|
|
30697
30793
|
let errorCount = 0;
|
|
30698
30794
|
let timeoutId = null;
|
|
30699
30795
|
setLoadedImage(null);
|
|
30700
|
-
|
|
30701
|
-
|
|
30702
|
-
|
|
30703
|
-
|
|
30704
|
-
continued = true;
|
|
30705
|
-
unblock();
|
|
30706
|
-
continueRender2(handle);
|
|
30796
|
+
pendingLoadDelayRef.current = {
|
|
30797
|
+
handle,
|
|
30798
|
+
unblock,
|
|
30799
|
+
continued: false
|
|
30707
30800
|
};
|
|
30708
30801
|
const attemptLoad = () => {
|
|
30709
30802
|
loadImage({ src: actualSrc, signal: controller.signal }).then((image) => {
|
|
@@ -30711,13 +30804,9 @@ var CanvasImageContent = forwardRef10(({
|
|
|
30711
30804
|
return;
|
|
30712
30805
|
}
|
|
30713
30806
|
setLoadedImage(image);
|
|
30714
|
-
}).then(() => {
|
|
30715
|
-
if (!cancelled) {
|
|
30716
|
-
continueRenderOnce();
|
|
30717
|
-
}
|
|
30718
30807
|
}).catch((err) => {
|
|
30719
30808
|
if (err.name === "AbortError") {
|
|
30720
|
-
|
|
30809
|
+
continuePendingLoadDelay();
|
|
30721
30810
|
return;
|
|
30722
30811
|
}
|
|
30723
30812
|
errorCount++;
|
|
@@ -30731,7 +30820,7 @@ var CanvasImageContent = forwardRef10(({
|
|
|
30731
30820
|
}, backoff);
|
|
30732
30821
|
} else if (onError) {
|
|
30733
30822
|
onError(err);
|
|
30734
|
-
|
|
30823
|
+
continuePendingLoadDelay();
|
|
30735
30824
|
} else {
|
|
30736
30825
|
cancelRender2(err);
|
|
30737
30826
|
}
|
|
@@ -30744,12 +30833,12 @@ var CanvasImageContent = forwardRef10(({
|
|
|
30744
30833
|
clearTimeout(timeoutId);
|
|
30745
30834
|
}
|
|
30746
30835
|
controller.abort();
|
|
30747
|
-
|
|
30836
|
+
continuePendingLoadDelay();
|
|
30748
30837
|
};
|
|
30749
30838
|
}, [
|
|
30750
30839
|
actualSrc,
|
|
30751
30840
|
cancelRender2,
|
|
30752
|
-
|
|
30841
|
+
continuePendingLoadDelay,
|
|
30753
30842
|
delayPlayback,
|
|
30754
30843
|
delayRender2,
|
|
30755
30844
|
delayRenderRetries,
|
|
@@ -30760,13 +30849,16 @@ var CanvasImageContent = forwardRef10(({
|
|
|
30760
30849
|
sequenceContext?.postmounting,
|
|
30761
30850
|
sequenceContext?.premounting
|
|
30762
30851
|
]);
|
|
30763
|
-
|
|
30852
|
+
useLayoutEffect10(() => {
|
|
30764
30853
|
if (!loadedImage || !outputCanvas || !sourceCanvas) {
|
|
30765
30854
|
return;
|
|
30766
30855
|
}
|
|
30767
30856
|
const handle = delayRender2(`Applying effects to <CanvasImage> with src="${truncateSrcForLabel(actualSrc)}"`);
|
|
30768
30857
|
let cancelled = false;
|
|
30769
30858
|
let continued = false;
|
|
30859
|
+
let cancelWaitForNextFrame = () => {
|
|
30860
|
+
return;
|
|
30861
|
+
};
|
|
30770
30862
|
const continueRenderOnce = () => {
|
|
30771
30863
|
if (continued) {
|
|
30772
30864
|
return;
|
|
@@ -30801,7 +30893,15 @@ var CanvasImageContent = forwardRef10(({
|
|
|
30801
30893
|
height: canvasHeight
|
|
30802
30894
|
}).then((completed) => {
|
|
30803
30895
|
if (completed && !cancelled) {
|
|
30804
|
-
|
|
30896
|
+
cancelWaitForNextFrame = waitForNextFrame({
|
|
30897
|
+
onFrame: () => {
|
|
30898
|
+
if (cancelled) {
|
|
30899
|
+
return;
|
|
30900
|
+
}
|
|
30901
|
+
continueRenderOnce();
|
|
30902
|
+
continuePendingLoadDelay();
|
|
30903
|
+
}
|
|
30904
|
+
});
|
|
30805
30905
|
}
|
|
30806
30906
|
}).catch((err) => {
|
|
30807
30907
|
if (cancelled) {
|
|
@@ -30810,12 +30910,14 @@ var CanvasImageContent = forwardRef10(({
|
|
|
30810
30910
|
if (onError) {
|
|
30811
30911
|
onError(err);
|
|
30812
30912
|
continueRenderOnce();
|
|
30913
|
+
continuePendingLoadDelay();
|
|
30813
30914
|
} else {
|
|
30814
30915
|
cancelRender2(err);
|
|
30815
30916
|
}
|
|
30816
30917
|
});
|
|
30817
30918
|
return () => {
|
|
30818
30919
|
cancelled = true;
|
|
30920
|
+
cancelWaitForNextFrame();
|
|
30819
30921
|
continueRenderOnce();
|
|
30820
30922
|
};
|
|
30821
30923
|
}, [
|
|
@@ -30823,6 +30925,7 @@ var CanvasImageContent = forwardRef10(({
|
|
|
30823
30925
|
cancelRender2,
|
|
30824
30926
|
chainState,
|
|
30825
30927
|
continueRender2,
|
|
30928
|
+
continuePendingLoadDelay,
|
|
30826
30929
|
delayRender2,
|
|
30827
30930
|
fit,
|
|
30828
30931
|
height,
|
|
@@ -31032,7 +31135,7 @@ var ImgContent = ({
|
|
|
31032
31135
|
if (typeof window !== "undefined") {
|
|
31033
31136
|
const isPremounting = Boolean(sequenceContext?.premounting);
|
|
31034
31137
|
const isPostmounting = Boolean(sequenceContext?.postmounting);
|
|
31035
|
-
|
|
31138
|
+
useLayoutEffect11(() => {
|
|
31036
31139
|
if (window.process?.env?.NODE_ENV === "test") {
|
|
31037
31140
|
if (imageRef.current) {
|
|
31038
31141
|
imageRef.current.src = actualSrc;
|
|
@@ -31928,7 +32031,7 @@ var OffthreadVideoForRendering = ({
|
|
|
31928
32031
|
mediaVolume: 1
|
|
31929
32032
|
});
|
|
31930
32033
|
warnAboutTooHighVolume(volume);
|
|
31931
|
-
|
|
32034
|
+
useEffect17(() => {
|
|
31932
32035
|
if (!src) {
|
|
31933
32036
|
throw new Error("No src passed");
|
|
31934
32037
|
}
|
|
@@ -31985,7 +32088,7 @@ var OffthreadVideoForRendering = ({
|
|
|
31985
32088
|
}, [toneMapped, currentTime, src, transparent]);
|
|
31986
32089
|
const [imageSrc, setImageSrc] = useState19(null);
|
|
31987
32090
|
const { delayRender: delayRender2, continueRender: continueRender2 } = useDelayRender();
|
|
31988
|
-
|
|
32091
|
+
useLayoutEffect12(() => {
|
|
31989
32092
|
if (!window.remotion_videoEnabled) {
|
|
31990
32093
|
return;
|
|
31991
32094
|
}
|
|
@@ -32089,7 +32192,7 @@ var useEmitVideoFrame = ({
|
|
|
32089
32192
|
ref,
|
|
32090
32193
|
onVideoFrame
|
|
32091
32194
|
}) => {
|
|
32092
|
-
|
|
32195
|
+
useEffect18(() => {
|
|
32093
32196
|
const { current } = ref;
|
|
32094
32197
|
if (!current) {
|
|
32095
32198
|
return;
|
|
@@ -32264,7 +32367,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
32264
32367
|
tag: "video",
|
|
32265
32368
|
mountTime
|
|
32266
32369
|
}));
|
|
32267
|
-
|
|
32370
|
+
useEffect19(() => {
|
|
32268
32371
|
const { current } = videoRef;
|
|
32269
32372
|
if (!current) {
|
|
32270
32373
|
return;
|
|
@@ -32307,7 +32410,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
32307
32410
|
const currentOnDurationCallback = useRef27(onDuration);
|
|
32308
32411
|
currentOnDurationCallback.current = onDuration;
|
|
32309
32412
|
useEmitVideoFrame({ ref: videoRef, onVideoFrame });
|
|
32310
|
-
|
|
32413
|
+
useEffect19(() => {
|
|
32311
32414
|
const { current } = videoRef;
|
|
32312
32415
|
if (!current) {
|
|
32313
32416
|
return;
|
|
@@ -32324,7 +32427,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
32324
32427
|
current.removeEventListener("loadedmetadata", onLoadedMetadata);
|
|
32325
32428
|
};
|
|
32326
32429
|
}, [src]);
|
|
32327
|
-
|
|
32430
|
+
useEffect19(() => {
|
|
32328
32431
|
const { current } = videoRef;
|
|
32329
32432
|
if (!current) {
|
|
32330
32433
|
return;
|
|
@@ -32939,6 +33042,15 @@ var staticFile = (path) => {
|
|
|
32939
33042
|
}
|
|
32940
33043
|
return preparsed;
|
|
32941
33044
|
};
|
|
33045
|
+
var Still = (props2) => {
|
|
33046
|
+
const newProps = {
|
|
33047
|
+
...props2,
|
|
33048
|
+
durationInFrames: 1,
|
|
33049
|
+
fps: 1
|
|
33050
|
+
};
|
|
33051
|
+
return React42.createElement(Composition, newProps);
|
|
33052
|
+
};
|
|
33053
|
+
addSequenceStackTraces(Still);
|
|
32942
33054
|
var roundTo6Commas = (num) => {
|
|
32943
33055
|
return Math.round(num * 1e5) / 1e5;
|
|
32944
33056
|
};
|
|
@@ -33105,7 +33217,7 @@ var VideoForRenderingForwardFunction = ({
|
|
|
33105
33217
|
mediaVolume: 1
|
|
33106
33218
|
});
|
|
33107
33219
|
warnAboutTooHighVolume(volume);
|
|
33108
|
-
|
|
33220
|
+
useEffect20(() => {
|
|
33109
33221
|
if (!props2.src) {
|
|
33110
33222
|
throw new Error("No src passed");
|
|
33111
33223
|
}
|
|
@@ -33149,7 +33261,7 @@ var VideoForRenderingForwardFunction = ({
|
|
|
33149
33261
|
return videoRef.current;
|
|
33150
33262
|
}, []);
|
|
33151
33263
|
useEmitVideoFrame({ ref: videoRef, onVideoFrame });
|
|
33152
|
-
|
|
33264
|
+
useEffect20(() => {
|
|
33153
33265
|
if (!window.remotion_videoEnabled) {
|
|
33154
33266
|
return;
|
|
33155
33267
|
}
|
|
@@ -33239,7 +33351,7 @@ var VideoForRenderingForwardFunction = ({
|
|
|
33239
33351
|
]);
|
|
33240
33352
|
const { src } = props2;
|
|
33241
33353
|
if (environment.isRendering) {
|
|
33242
|
-
|
|
33354
|
+
useLayoutEffect13(() => {
|
|
33243
33355
|
if (window.process?.env?.NODE_ENV === "test") {
|
|
33244
33356
|
return;
|
|
33245
33357
|
}
|
|
@@ -36343,7 +36455,7 @@ var extrudeAndTransformElement = (options) => {
|
|
|
36343
36455
|
// ../design/dist/esm/index.mjs
|
|
36344
36456
|
import { jsx as jsx212, Fragment as Fragment3 } from "react/jsx-runtime";
|
|
36345
36457
|
import { jsx as jsx312, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
36346
|
-
import { useEffect as
|
|
36458
|
+
import { useEffect as useEffect22, useMemo as useMemo210, useRef as useRef31 } from "react";
|
|
36347
36459
|
import { jsx as jsx44 } from "react/jsx-runtime";
|
|
36348
36460
|
import { jsx as jsx53, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
36349
36461
|
import React62 from "react";
|
|
@@ -36598,7 +36710,7 @@ var useHoverTransforms = (ref, disabled) => {
|
|
|
36598
36710
|
isActive: false
|
|
36599
36711
|
});
|
|
36600
36712
|
const eventTarget = useMemo42(() => new EventTarget, []);
|
|
36601
|
-
|
|
36713
|
+
useEffect21(() => {
|
|
36602
36714
|
if (disabled) {
|
|
36603
36715
|
eventTarget.dispatchEvent(new Event("disabled"));
|
|
36604
36716
|
} else {
|
|
@@ -36745,7 +36857,7 @@ var getAngle = (ref, coordinates) => {
|
|
|
36745
36857
|
var lastCoordinates = null;
|
|
36746
36858
|
var useMousePosition = (ref) => {
|
|
36747
36859
|
const [angle, setAngle] = useState21(getAngle(ref.current, lastCoordinates));
|
|
36748
|
-
|
|
36860
|
+
useEffect21(() => {
|
|
36749
36861
|
const element = ref.current;
|
|
36750
36862
|
if (!element) {
|
|
36751
36863
|
return;
|
|
@@ -36866,7 +36978,7 @@ var Spinner = ({ size, duration }) => {
|
|
|
36866
36978
|
};
|
|
36867
36979
|
}, [size]);
|
|
36868
36980
|
const pathsRef = useRef31([]);
|
|
36869
|
-
|
|
36981
|
+
useEffect22(() => {
|
|
36870
36982
|
const animate = () => {
|
|
36871
36983
|
const now = performance.now();
|
|
36872
36984
|
for (let index = 0;index < lines; index++) {
|
|
@@ -43094,7 +43206,7 @@ var CopyPromptButton = ({ prompt }) => {
|
|
|
43094
43206
|
};
|
|
43095
43207
|
|
|
43096
43208
|
// src/components/prompts/LikeButton.tsx
|
|
43097
|
-
import { useCallback as useCallback40, useEffect as
|
|
43209
|
+
import { useCallback as useCallback40, useEffect as useEffect40, useState as useState40 } from "react";
|
|
43098
43210
|
|
|
43099
43211
|
// src/components/prompts/config.ts
|
|
43100
43212
|
var REMOTION_PRO_ORIGIN = "https://www.remotion.pro";
|
|
@@ -43205,7 +43317,7 @@ var LikeButton = ({ submissionId, initialLikeCount }) => {
|
|
|
43205
43317
|
const [liked, setLiked] = useState40(false);
|
|
43206
43318
|
const [likeCount, setLikeCount] = useState40(initialLikeCount);
|
|
43207
43319
|
const { scale, roundness, animate } = useHeartAnimation();
|
|
43208
|
-
|
|
43320
|
+
useEffect40(() => {
|
|
43209
43321
|
setLiked(getLikedIds().has(submissionId));
|
|
43210
43322
|
}, [submissionId]);
|
|
43211
43323
|
const onClick = useCallback40(async () => {
|