@remotion/promo-pages 4.0.486 → 4.0.488
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 +1147 -2270
- package/dist/components/Homepage.js +21 -5
- package/dist/components/homepage/CanvasSectionTitle.d.ts +4 -0
- package/dist/components/homepage/CanvasSectionTitle.js +14 -0
- package/dist/components/homepage/CommunityStatsItems.js +2 -2
- package/dist/components/homepage/Demo/DemoRender.d.ts +1 -1
- package/dist/components/homepage/Demo/DisplayedEmoji.js +3 -5
- package/dist/components/homepage/Demo/math.d.ts +1 -1
- package/dist/components/homepage/EditorStarterSection.d.ts +3 -0
- package/dist/components/homepage/EditorStarterSection.js +8 -0
- package/dist/components/homepage/GitHubButton.js +1 -1
- package/dist/components/homepage/MakeVideosAgentically.d.ts +10 -0
- package/dist/components/homepage/MakeVideosAgentically.js +37 -0
- package/dist/components/homepage/MakeVideosInteractively.d.ts +9 -0
- package/dist/components/homepage/MakeVideosInteractively.js +16 -0
- package/dist/components/homepage/MakeVideosLinks.d.ts +9 -0
- package/dist/components/homepage/MakeVideosLinks.js +17 -0
- package/dist/components/homepage/MakeVideosProgrammatically.d.ts +9 -0
- package/dist/components/homepage/MakeVideosProgrammatically.js +8 -0
- package/dist/components/homepage/Pricing.d.ts +1 -3
- package/dist/components/homepage/Pricing.js +2 -6
- package/dist/components/homepage/WriteInReact.js +1 -2
- package/dist/components/team/TrustSection.js +1 -1
- package/dist/design.js +241 -130
- package/dist/experts.js +230 -119
- package/dist/homepage/Pricing.js +255 -128
- package/dist/prompts/PromptsGallery.js +241 -130
- package/dist/prompts/PromptsShow.js +247 -136
- package/dist/prompts/PromptsSubmit.js +232 -121
- package/dist/tailwind.css +21 -3
- package/dist/team.js +232 -121
- package/dist/template-modal-content.css +1 -1
- package/dist/template-modal-content.js +238 -127
- package/dist/templates.js +232 -121
- 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
|
@@ -40,7 +40,7 @@ __export(exports_vidstack_CZgUA94N, {
|
|
|
40
40
|
waitTimeout: () => waitTimeout,
|
|
41
41
|
waitIdlePeriod: () => waitIdlePeriod,
|
|
42
42
|
useStateContext: () => useStateContext,
|
|
43
|
-
useState: () =>
|
|
43
|
+
useState: () => useState44,
|
|
44
44
|
useSignalRecord: () => useSignalRecord,
|
|
45
45
|
useSignal: () => useSignal,
|
|
46
46
|
useReactScope: () => useReactScope,
|
|
@@ -678,7 +678,7 @@ class State {
|
|
|
678
678
|
}
|
|
679
679
|
}
|
|
680
680
|
}
|
|
681
|
-
function
|
|
681
|
+
function useState44(state) {
|
|
682
682
|
return useContext47(state);
|
|
683
683
|
}
|
|
684
684
|
function camelToKebabCase(str) {
|
|
@@ -15039,7 +15039,7 @@ var init_vidstack_D5Pzx_k5 = __esm(() => {
|
|
|
15039
15039
|
SliderThumbnail = class SliderThumbnail extends Thumbnail {
|
|
15040
15040
|
#slider;
|
|
15041
15041
|
onAttach(el) {
|
|
15042
|
-
this.#slider =
|
|
15042
|
+
this.#slider = useState44(Slider.state);
|
|
15043
15043
|
}
|
|
15044
15044
|
getTime() {
|
|
15045
15045
|
const { duration, clipStartTime } = this.media.$state;
|
|
@@ -15066,7 +15066,7 @@ var init_vidstack_D5Pzx_k5 = __esm(() => {
|
|
|
15066
15066
|
}
|
|
15067
15067
|
onSetup() {
|
|
15068
15068
|
this.#media = useMediaContext();
|
|
15069
|
-
this.#slider =
|
|
15069
|
+
this.#slider = useState44(Slider.state);
|
|
15070
15070
|
this.#watchCrossOrigin();
|
|
15071
15071
|
this.setAttributes({
|
|
15072
15072
|
"data-loading": this.#isLoading.bind(this),
|
|
@@ -15152,7 +15152,7 @@ var init_vidstack_D5Pzx_k5 = __esm(() => {
|
|
|
15152
15152
|
#text;
|
|
15153
15153
|
#slider;
|
|
15154
15154
|
onSetup() {
|
|
15155
|
-
this.#slider =
|
|
15155
|
+
this.#slider = useState44(Slider.state);
|
|
15156
15156
|
this.#format = useContext47(sliderValueFormatContext);
|
|
15157
15157
|
this.#text = computed(this.getValueText.bind(this));
|
|
15158
15158
|
}
|
|
@@ -15193,7 +15193,7 @@ var init_vidstack_D5Pzx_k5 = __esm(() => {
|
|
|
15193
15193
|
#slider;
|
|
15194
15194
|
onSetup() {
|
|
15195
15195
|
this.#slider = useContext47(sliderContext);
|
|
15196
|
-
const { active } =
|
|
15196
|
+
const { active } = useState44(Slider.state);
|
|
15197
15197
|
this.setAttributes({
|
|
15198
15198
|
"data-visible": active
|
|
15199
15199
|
});
|
|
@@ -15734,7 +15734,7 @@ var init_vidstack_D5Pzx_k5 = __esm(() => {
|
|
|
15734
15734
|
}
|
|
15735
15735
|
onSetup() {
|
|
15736
15736
|
this.#media = useMediaContext();
|
|
15737
|
-
this.#sliderState =
|
|
15737
|
+
this.#sliderState = useState44(TimeSlider.state);
|
|
15738
15738
|
}
|
|
15739
15739
|
onAttach(el) {
|
|
15740
15740
|
watchActiveTextTrack(this.#media.textTracks, "chapters", this.#setTrack.bind(this));
|
|
@@ -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 useEffect21, useMemo as useMemo42, useState as
|
|
18715
|
+
import React32, { useEffect as useEffect21, useMemo as useMemo42, useState as useState23 } from "react";
|
|
18716
18716
|
|
|
18717
18717
|
// ../paths/dist/esm/index.mjs
|
|
18718
18718
|
var cutLInstruction = ({
|
|
@@ -21664,7 +21664,13 @@ 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 {
|
|
21667
|
+
import {
|
|
21668
|
+
useCallback as useCallback19,
|
|
21669
|
+
useContext as useContext33,
|
|
21670
|
+
useLayoutEffect as useLayoutEffect11,
|
|
21671
|
+
useRef as useRef24,
|
|
21672
|
+
useState as useState18
|
|
21673
|
+
} from "react";
|
|
21668
21674
|
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
21669
21675
|
import React29, { forwardRef as forwardRef12, useCallback as useCallback20, useRef as useRef25 } from "react";
|
|
21670
21676
|
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
@@ -21675,7 +21681,7 @@ import {
|
|
|
21675
21681
|
useImperativeHandle as useImperativeHandle8,
|
|
21676
21682
|
useMemo as useMemo32,
|
|
21677
21683
|
useRef as useRef26,
|
|
21678
|
-
useState as
|
|
21684
|
+
useState as useState19
|
|
21679
21685
|
} from "react";
|
|
21680
21686
|
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
21681
21687
|
import React31 from "react";
|
|
@@ -21693,7 +21699,7 @@ import {
|
|
|
21693
21699
|
useEffect as useEffect17,
|
|
21694
21700
|
useLayoutEffect as useLayoutEffect12,
|
|
21695
21701
|
useMemo as useMemo35,
|
|
21696
|
-
useState as
|
|
21702
|
+
useState as useState20
|
|
21697
21703
|
} from "react";
|
|
21698
21704
|
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
21699
21705
|
import React37, {
|
|
@@ -21704,7 +21710,7 @@ import React37, {
|
|
|
21704
21710
|
useImperativeHandle as useImperativeHandle9,
|
|
21705
21711
|
useMemo as useMemo36,
|
|
21706
21712
|
useRef as useRef27,
|
|
21707
|
-
useState as
|
|
21713
|
+
useState as useState21
|
|
21708
21714
|
} from "react";
|
|
21709
21715
|
import { useEffect as useEffect18 } from "react";
|
|
21710
21716
|
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
@@ -22899,7 +22905,7 @@ var getComponentsToAddStacksTo = () => componentsToAddStacksTo;
|
|
|
22899
22905
|
var addSequenceStackTraces = (component) => {
|
|
22900
22906
|
componentsToAddStacksTo.push(component);
|
|
22901
22907
|
};
|
|
22902
|
-
var VERSION = "4.0.
|
|
22908
|
+
var VERSION = "4.0.488";
|
|
22903
22909
|
var checkMultipleRemotionVersions = () => {
|
|
22904
22910
|
if (typeof globalThis === "undefined") {
|
|
22905
22911
|
return;
|
|
@@ -26583,7 +26589,7 @@ var useEffectChainState = () => {
|
|
|
26583
26589
|
}
|
|
26584
26590
|
}), []);
|
|
26585
26591
|
};
|
|
26586
|
-
var CanvasRefForwardingFunction = ({ width, height, fit, className, style, effects }, ref) => {
|
|
26592
|
+
var CanvasRefForwardingFunction = ({ width, height, fit, className, style, effects, ...props }, ref) => {
|
|
26587
26593
|
const canvasRef = useRef8(null);
|
|
26588
26594
|
const chainState = useEffectChainState();
|
|
26589
26595
|
const sourceCanvas = useMemo16(() => {
|
|
@@ -26647,7 +26653,8 @@ var CanvasRefForwardingFunction = ({ width, height, fit, className, style, effec
|
|
|
26647
26653
|
return /* @__PURE__ */ jsx13("canvas", {
|
|
26648
26654
|
ref: canvasRef,
|
|
26649
26655
|
className,
|
|
26650
|
-
style
|
|
26656
|
+
style,
|
|
26657
|
+
...props
|
|
26651
26658
|
});
|
|
26652
26659
|
};
|
|
26653
26660
|
var Canvas = React15.forwardRef(CanvasRefForwardingFunction);
|
|
@@ -26824,6 +26831,16 @@ var animatedImageSchema = {
|
|
|
26824
26831
|
},
|
|
26825
26832
|
...transformSchema
|
|
26826
26833
|
};
|
|
26834
|
+
var getCanvasPropsFromSequenceProps = (props) => {
|
|
26835
|
+
const canvasProps = {};
|
|
26836
|
+
const mutableCanvasProps = canvasProps;
|
|
26837
|
+
for (const key in props) {
|
|
26838
|
+
if (Object.prototype.hasOwnProperty.call(props, key) && (key.startsWith("data-") || key.startsWith("aria-"))) {
|
|
26839
|
+
mutableCanvasProps[key] = props[key];
|
|
26840
|
+
}
|
|
26841
|
+
}
|
|
26842
|
+
return canvasProps;
|
|
26843
|
+
};
|
|
26827
26844
|
var AnimatedImageContent = forwardRef4(({
|
|
26828
26845
|
src,
|
|
26829
26846
|
width,
|
|
@@ -26978,6 +26995,7 @@ var AnimatedImageInner = ({
|
|
|
26978
26995
|
useImperativeHandle2(ref, () => {
|
|
26979
26996
|
return actualRef.current;
|
|
26980
26997
|
}, []);
|
|
26998
|
+
const canvasProps = getCanvasPropsFromSequenceProps(sequenceProps);
|
|
26981
26999
|
const animatedImageProps = {
|
|
26982
27000
|
src,
|
|
26983
27001
|
width,
|
|
@@ -26989,7 +27007,8 @@ var AnimatedImageInner = ({
|
|
|
26989
27007
|
id,
|
|
26990
27008
|
className,
|
|
26991
27009
|
style,
|
|
26992
|
-
requestInit
|
|
27010
|
+
requestInit,
|
|
27011
|
+
...canvasProps
|
|
26993
27012
|
};
|
|
26994
27013
|
return /* @__PURE__ */ jsx14(Sequence, {
|
|
26995
27014
|
layout: "none",
|
|
@@ -27926,6 +27945,7 @@ var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled, pr
|
|
|
27926
27945
|
return ({
|
|
27927
27946
|
node,
|
|
27928
27947
|
mediaTimestamp,
|
|
27948
|
+
sourceOffset,
|
|
27929
27949
|
scheduledTime,
|
|
27930
27950
|
duration,
|
|
27931
27951
|
offset,
|
|
@@ -27954,7 +27974,7 @@ var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled, pr
|
|
|
27954
27974
|
}
|
|
27955
27975
|
}
|
|
27956
27976
|
const scheduledEndTime = scheduledTime + duration / node.playbackRate.value;
|
|
27957
|
-
const mediaTime = mediaTimestamp + offset;
|
|
27977
|
+
const mediaTime = mediaTimestamp + offset - sourceOffset;
|
|
27958
27978
|
const mediaEndTime = mediaTime + duration;
|
|
27959
27979
|
const latency = ctxAndGain.audioContext.baseLatency + ctxAndGain.audioContext.outputLatency;
|
|
27960
27980
|
const timeDiff = scheduledTime - ctxAndGain.audioContext.currentTime;
|
|
@@ -28769,7 +28789,8 @@ var useBufferManager = (logLevel, mountTime) => {
|
|
|
28769
28789
|
if (rendering) {
|
|
28770
28790
|
return;
|
|
28771
28791
|
}
|
|
28772
|
-
if (blocks.length > 0) {
|
|
28792
|
+
if (blocks.length > 0 && !buffering.current) {
|
|
28793
|
+
buffering.current = true;
|
|
28773
28794
|
onBufferingCallbacks.forEach((c2) => c2());
|
|
28774
28795
|
playbackLogging({
|
|
28775
28796
|
logLevel,
|
|
@@ -28784,7 +28805,8 @@ var useBufferManager = (logLevel, mountTime) => {
|
|
|
28784
28805
|
if (rendering) {
|
|
28785
28806
|
return;
|
|
28786
28807
|
}
|
|
28787
|
-
if (blocks.length === 0) {
|
|
28808
|
+
if (blocks.length === 0 && buffering.current) {
|
|
28809
|
+
buffering.current = false;
|
|
28788
28810
|
onResumeCallbacks.forEach((c2) => c2());
|
|
28789
28811
|
playbackLogging({
|
|
28790
28812
|
logLevel,
|
|
@@ -28817,15 +28839,11 @@ var useIsPlayerBuffering = (bufferManager) => {
|
|
|
28817
28839
|
const onResume = () => {
|
|
28818
28840
|
setIsBuffering(false);
|
|
28819
28841
|
};
|
|
28820
|
-
bufferManager.listenForBuffering(onBuffer);
|
|
28821
|
-
bufferManager.listenForResume(onResume);
|
|
28842
|
+
const buffer = bufferManager.listenForBuffering(onBuffer);
|
|
28843
|
+
const resume = bufferManager.listenForResume(onResume);
|
|
28822
28844
|
return () => {
|
|
28823
|
-
|
|
28824
|
-
|
|
28825
|
-
});
|
|
28826
|
-
bufferManager.listenForResume(() => {
|
|
28827
|
-
return;
|
|
28828
|
-
});
|
|
28845
|
+
buffer.remove();
|
|
28846
|
+
resume.remove();
|
|
28829
28847
|
};
|
|
28830
28848
|
}, [bufferManager]);
|
|
28831
28849
|
return isBuffering;
|
|
@@ -28949,6 +28967,72 @@ var useBufferUntilFirstFrame = ({
|
|
|
28949
28967
|
};
|
|
28950
28968
|
}, [bufferUntilFirstFrame]);
|
|
28951
28969
|
};
|
|
28970
|
+
var getMediaSyncAction = (input) => {
|
|
28971
|
+
const {
|
|
28972
|
+
duration,
|
|
28973
|
+
currentTime,
|
|
28974
|
+
paused,
|
|
28975
|
+
ended,
|
|
28976
|
+
desiredUnclampedTime,
|
|
28977
|
+
mediaTagTime,
|
|
28978
|
+
mediaTagLastUpdate,
|
|
28979
|
+
rvcTime,
|
|
28980
|
+
rvcLastUpdate,
|
|
28981
|
+
isVariableFpsVideo,
|
|
28982
|
+
acceptableTimeShift,
|
|
28983
|
+
lastSeekDueToShift,
|
|
28984
|
+
playing,
|
|
28985
|
+
playbackRate,
|
|
28986
|
+
mediaTagBufferingOrStalled,
|
|
28987
|
+
playerBuffering,
|
|
28988
|
+
absoluteFrame,
|
|
28989
|
+
onlyWarnForMediaSeekingError,
|
|
28990
|
+
isPremounting,
|
|
28991
|
+
isPostmounting,
|
|
28992
|
+
pauseWhenBuffering
|
|
28993
|
+
} = input;
|
|
28994
|
+
const shouldBeTime = !Number.isNaN(duration) && Number.isFinite(duration) ? Math.min(duration, desiredUnclampedTime) : desiredUnclampedTime;
|
|
28995
|
+
const timeShiftMediaTag = Math.abs(shouldBeTime - mediaTagTime);
|
|
28996
|
+
const timeShiftRvcTag = rvcTime ? Math.abs(shouldBeTime - rvcTime) : null;
|
|
28997
|
+
const mostRecentTimeshift = rvcLastUpdate && rvcTime > mediaTagLastUpdate ? timeShiftRvcTag : timeShiftMediaTag;
|
|
28998
|
+
const timeShift = timeShiftRvcTag && !isVariableFpsVideo ? mostRecentTimeshift : timeShiftMediaTag;
|
|
28999
|
+
if (timeShift > acceptableTimeShift && lastSeekDueToShift !== shouldBeTime) {
|
|
29000
|
+
return {
|
|
29001
|
+
type: "seek-due-to-shift",
|
|
29002
|
+
shouldBeTime,
|
|
29003
|
+
why: `because time shift is too big. shouldBeTime = ${shouldBeTime}, isTime = ${mediaTagTime}, requestVideoCallbackTime = ${rvcTime}, timeShift = ${timeShift}${isVariableFpsVideo ? ", isVariableFpsVideo = true" : ""}, isPremounting = ${isPremounting}, isPostmounting = ${isPostmounting}, pauseWhenBuffering = ${pauseWhenBuffering}`,
|
|
29004
|
+
bufferUntilFirstFrame: playing && playbackRate > 0,
|
|
29005
|
+
playReason: playing && paused ? "player is playing but media tag is paused, and just seeked" : null,
|
|
29006
|
+
warnAboutNonSeekable: !onlyWarnForMediaSeekingError
|
|
29007
|
+
};
|
|
29008
|
+
}
|
|
29009
|
+
const seekThreshold = playing ? 0.15 : 0.01;
|
|
29010
|
+
const makesSenseToSeek = Math.abs(currentTime - shouldBeTime) > seekThreshold;
|
|
29011
|
+
const isSomethingElseBuffering = playerBuffering && !mediaTagBufferingOrStalled;
|
|
29012
|
+
if (!playing || isSomethingElseBuffering) {
|
|
29013
|
+
return {
|
|
29014
|
+
type: "seek-if-not-playing",
|
|
29015
|
+
shouldBeTime,
|
|
29016
|
+
why: makesSenseToSeek ? `not playing or something else is buffering. time offset is over seek threshold (${seekThreshold})` : null
|
|
29017
|
+
};
|
|
29018
|
+
}
|
|
29019
|
+
if (!playing || playerBuffering) {
|
|
29020
|
+
return { type: "none" };
|
|
29021
|
+
}
|
|
29022
|
+
const pausedCondition = paused && !ended;
|
|
29023
|
+
const firstFrameCondition = absoluteFrame === 0;
|
|
29024
|
+
if (pausedCondition || firstFrameCondition) {
|
|
29025
|
+
const reason = pausedCondition ? "media tag is paused" : "absolute frame is 0";
|
|
29026
|
+
return {
|
|
29027
|
+
type: "play-and-seek",
|
|
29028
|
+
shouldBeTime,
|
|
29029
|
+
why: makesSenseToSeek ? `is over timeshift threshold (threshold = ${seekThreshold}) and ${reason}` : null,
|
|
29030
|
+
playReason: `player is playing and ${reason}`,
|
|
29031
|
+
bufferUntilFirstFrame: !isVariableFpsVideo && playbackRate > 0
|
|
29032
|
+
};
|
|
29033
|
+
}
|
|
29034
|
+
return { type: "none" };
|
|
29035
|
+
};
|
|
28952
29036
|
var useCurrentTimeOfMediaTagWithUpdateTimeStamp = (mediaRef) => {
|
|
28953
29037
|
const lastUpdate = React21.useRef({
|
|
28954
29038
|
time: mediaRef.current?.currentTime ?? 0,
|
|
@@ -29368,89 +29452,93 @@ var useMediaPlayback = ({
|
|
|
29368
29452
|
if (!src) {
|
|
29369
29453
|
throw new Error(`No 'src' attribute was passed to the ${tagName} element.`);
|
|
29370
29454
|
}
|
|
29371
|
-
const {
|
|
29372
|
-
const
|
|
29373
|
-
|
|
29374
|
-
|
|
29375
|
-
|
|
29376
|
-
|
|
29377
|
-
|
|
29378
|
-
|
|
29379
|
-
|
|
29380
|
-
|
|
29455
|
+
const { current } = mediaRef;
|
|
29456
|
+
const action = getMediaSyncAction({
|
|
29457
|
+
duration: current.duration,
|
|
29458
|
+
currentTime: current.currentTime,
|
|
29459
|
+
paused: current.paused,
|
|
29460
|
+
ended: current.ended,
|
|
29461
|
+
desiredUnclampedTime,
|
|
29462
|
+
mediaTagTime: mediaTagCurrentTime.current.time,
|
|
29463
|
+
mediaTagLastUpdate: mediaTagCurrentTime.current.lastUpdate,
|
|
29464
|
+
rvcTime: rvcCurrentTime.current?.time ?? null,
|
|
29465
|
+
rvcLastUpdate: rvcCurrentTime.current?.lastUpdate ?? null,
|
|
29466
|
+
isVariableFpsVideo: Boolean(isVariableFpsVideoMap.current[src]),
|
|
29467
|
+
acceptableTimeShift: acceptableTimeShiftButLessThanDuration,
|
|
29468
|
+
lastSeekDueToShift: lastSeekDueToShift.current,
|
|
29469
|
+
playing,
|
|
29470
|
+
playbackRate,
|
|
29471
|
+
mediaTagBufferingOrStalled: isMediaTagBuffering || isBuffering(),
|
|
29472
|
+
playerBuffering: buffering.buffering.current,
|
|
29473
|
+
absoluteFrame,
|
|
29474
|
+
onlyWarnForMediaSeekingError,
|
|
29475
|
+
isPremounting,
|
|
29476
|
+
isPostmounting,
|
|
29477
|
+
pauseWhenBuffering
|
|
29478
|
+
});
|
|
29479
|
+
if (action.type === "none") {
|
|
29480
|
+
return;
|
|
29481
|
+
}
|
|
29482
|
+
if (action.type === "seek-due-to-shift") {
|
|
29381
29483
|
lastSeek.current = seek({
|
|
29382
|
-
mediaRef:
|
|
29383
|
-
time: shouldBeTime,
|
|
29484
|
+
mediaRef: current,
|
|
29485
|
+
time: action.shouldBeTime,
|
|
29384
29486
|
logLevel,
|
|
29385
|
-
why:
|
|
29487
|
+
why: action.why,
|
|
29386
29488
|
mountTime
|
|
29387
29489
|
});
|
|
29388
29490
|
lastSeekDueToShift.current = lastSeek.current;
|
|
29389
|
-
if (
|
|
29390
|
-
|
|
29391
|
-
bufferUntilFirstFrame(shouldBeTime);
|
|
29392
|
-
}
|
|
29393
|
-
if (mediaRef.current.paused) {
|
|
29394
|
-
playAndHandleNotAllowedError({
|
|
29395
|
-
mediaRef,
|
|
29396
|
-
mediaType,
|
|
29397
|
-
onAutoPlayError,
|
|
29398
|
-
logLevel,
|
|
29399
|
-
mountTime,
|
|
29400
|
-
reason: "player is playing but media tag is paused, and just seeked",
|
|
29401
|
-
isPlayer: env.isPlayer
|
|
29402
|
-
});
|
|
29403
|
-
}
|
|
29404
|
-
}
|
|
29405
|
-
if (!onlyWarnForMediaSeekingError) {
|
|
29406
|
-
warnAboutNonSeekableMedia(mediaRef.current, onlyWarnForMediaSeekingError ? "console-warning" : "console-error");
|
|
29491
|
+
if (action.bufferUntilFirstFrame) {
|
|
29492
|
+
bufferUntilFirstFrame(action.shouldBeTime);
|
|
29407
29493
|
}
|
|
29408
|
-
|
|
29409
|
-
|
|
29410
|
-
|
|
29411
|
-
|
|
29412
|
-
|
|
29413
|
-
const isSomethingElseBuffering = buffering.buffering.current && !isMediaTagBufferingOrStalled;
|
|
29414
|
-
if (!playing || isSomethingElseBuffering) {
|
|
29415
|
-
if (makesSenseToSeek) {
|
|
29416
|
-
lastSeek.current = seek({
|
|
29417
|
-
mediaRef: mediaRef.current,
|
|
29418
|
-
time: shouldBeTime,
|
|
29494
|
+
if (action.playReason !== null) {
|
|
29495
|
+
playAndHandleNotAllowedError({
|
|
29496
|
+
mediaRef,
|
|
29497
|
+
mediaType,
|
|
29498
|
+
onAutoPlayError,
|
|
29419
29499
|
logLevel,
|
|
29420
|
-
|
|
29421
|
-
|
|
29500
|
+
mountTime,
|
|
29501
|
+
reason: action.playReason,
|
|
29502
|
+
isPlayer: env.isPlayer
|
|
29422
29503
|
});
|
|
29423
29504
|
}
|
|
29505
|
+
if (action.warnAboutNonSeekable) {
|
|
29506
|
+
warnAboutNonSeekableMedia(current, "console-error");
|
|
29507
|
+
}
|
|
29424
29508
|
return;
|
|
29425
29509
|
}
|
|
29426
|
-
if (
|
|
29427
|
-
|
|
29428
|
-
}
|
|
29429
|
-
const pausedCondition = mediaRef.current.paused && !mediaRef.current.ended;
|
|
29430
|
-
const firstFrameCondition = absoluteFrame === 0;
|
|
29431
|
-
if (pausedCondition || firstFrameCondition) {
|
|
29432
|
-
const reason = pausedCondition ? "media tag is paused" : "absolute frame is 0";
|
|
29433
|
-
if (makesSenseToSeek) {
|
|
29510
|
+
if (action.type === "seek-if-not-playing") {
|
|
29511
|
+
if (action.why !== null) {
|
|
29434
29512
|
lastSeek.current = seek({
|
|
29435
|
-
mediaRef:
|
|
29436
|
-
time: shouldBeTime,
|
|
29513
|
+
mediaRef: current,
|
|
29514
|
+
time: action.shouldBeTime,
|
|
29437
29515
|
logLevel,
|
|
29438
|
-
why:
|
|
29516
|
+
why: action.why,
|
|
29439
29517
|
mountTime
|
|
29440
29518
|
});
|
|
29441
29519
|
}
|
|
29442
|
-
|
|
29443
|
-
|
|
29444
|
-
|
|
29445
|
-
|
|
29520
|
+
return;
|
|
29521
|
+
}
|
|
29522
|
+
if (action.why !== null) {
|
|
29523
|
+
lastSeek.current = seek({
|
|
29524
|
+
mediaRef: current,
|
|
29525
|
+
time: action.shouldBeTime,
|
|
29446
29526
|
logLevel,
|
|
29447
|
-
|
|
29448
|
-
|
|
29449
|
-
isPlayer: env.isPlayer
|
|
29527
|
+
why: action.why,
|
|
29528
|
+
mountTime
|
|
29450
29529
|
});
|
|
29451
|
-
|
|
29452
|
-
|
|
29453
|
-
|
|
29530
|
+
}
|
|
29531
|
+
playAndHandleNotAllowedError({
|
|
29532
|
+
mediaRef,
|
|
29533
|
+
mediaType,
|
|
29534
|
+
onAutoPlayError,
|
|
29535
|
+
logLevel,
|
|
29536
|
+
mountTime,
|
|
29537
|
+
reason: action.playReason,
|
|
29538
|
+
isPlayer: env.isPlayer
|
|
29539
|
+
});
|
|
29540
|
+
if (action.bufferUntilFirstFrame) {
|
|
29541
|
+
bufferUntilFirstFrame(action.shouldBeTime);
|
|
29454
29542
|
}
|
|
29455
29543
|
}, [
|
|
29456
29544
|
absoluteFrame,
|
|
@@ -30683,13 +30771,18 @@ var CanvasImageContent = forwardRef10(({
|
|
|
30683
30771
|
});
|
|
30684
30772
|
const sequenceContext = useContext32(SequenceContext);
|
|
30685
30773
|
const pendingLoadDelayRef = useRef23(null);
|
|
30686
|
-
const
|
|
30774
|
+
const [isLoadPending, setIsLoadPending] = useState16(false);
|
|
30775
|
+
const isPremounting = Boolean(sequenceContext?.premounting);
|
|
30776
|
+
const isPostmounting = Boolean(sequenceContext?.postmounting);
|
|
30777
|
+
const continuePendingLoadDelay = useCallback17(({ markAsReady }) => {
|
|
30687
30778
|
const pending = pendingLoadDelayRef.current;
|
|
30688
30779
|
if (!pending || pending.continued) {
|
|
30689
30780
|
return;
|
|
30690
30781
|
}
|
|
30691
30782
|
pending.continued = true;
|
|
30692
|
-
|
|
30783
|
+
if (markAsReady) {
|
|
30784
|
+
setIsLoadPending(false);
|
|
30785
|
+
}
|
|
30693
30786
|
continueRender2(pending.handle);
|
|
30694
30787
|
pendingLoadDelayRef.current = null;
|
|
30695
30788
|
}, [continueRender2]);
|
|
@@ -30711,23 +30804,30 @@ var CanvasImageContent = forwardRef10(({
|
|
|
30711
30804
|
}
|
|
30712
30805
|
}, [ref, refForOutline]);
|
|
30713
30806
|
useLayoutEffect10(() => {
|
|
30714
|
-
|
|
30715
|
-
|
|
30807
|
+
if (!pauseWhenLoading || !isLoadPending || isPremounting || isPostmounting) {
|
|
30808
|
+
return;
|
|
30809
|
+
}
|
|
30810
|
+
return delayPlayback().unblock;
|
|
30811
|
+
}, [
|
|
30812
|
+
delayPlayback,
|
|
30813
|
+
isLoadPending,
|
|
30814
|
+
isPostmounting,
|
|
30815
|
+
isPremounting,
|
|
30816
|
+
pauseWhenLoading
|
|
30817
|
+
]);
|
|
30818
|
+
useLayoutEffect10(() => {
|
|
30716
30819
|
const handle = delayRender2(`Rendering <CanvasImage> with src="${truncateSrcForLabel(actualSrc)}"`, {
|
|
30717
30820
|
retries: delayRenderRetries ?? undefined,
|
|
30718
30821
|
timeoutInMilliseconds: delayRenderTimeoutInMilliseconds ?? undefined
|
|
30719
30822
|
});
|
|
30720
|
-
const unblock = pauseWhenLoading && !isPremounting && !isPostmounting ? delayPlayback().unblock : () => {
|
|
30721
|
-
return;
|
|
30722
|
-
};
|
|
30723
30823
|
const controller = new AbortController;
|
|
30724
30824
|
let cancelled = false;
|
|
30725
30825
|
let errorCount = 0;
|
|
30726
30826
|
let timeoutId = null;
|
|
30727
30827
|
setLoadedImage(null);
|
|
30828
|
+
setIsLoadPending(true);
|
|
30728
30829
|
pendingLoadDelayRef.current = {
|
|
30729
30830
|
handle,
|
|
30730
|
-
unblock,
|
|
30731
30831
|
continued: false
|
|
30732
30832
|
};
|
|
30733
30833
|
const attemptLoad = () => {
|
|
@@ -30738,7 +30838,7 @@ var CanvasImageContent = forwardRef10(({
|
|
|
30738
30838
|
setLoadedImage(image);
|
|
30739
30839
|
}).catch((err) => {
|
|
30740
30840
|
if (err.name === "AbortError") {
|
|
30741
|
-
continuePendingLoadDelay();
|
|
30841
|
+
continuePendingLoadDelay({ markAsReady: false });
|
|
30742
30842
|
return;
|
|
30743
30843
|
}
|
|
30744
30844
|
errorCount++;
|
|
@@ -30752,7 +30852,7 @@ var CanvasImageContent = forwardRef10(({
|
|
|
30752
30852
|
}, backoff);
|
|
30753
30853
|
} else if (onError) {
|
|
30754
30854
|
onError(err);
|
|
30755
|
-
continuePendingLoadDelay();
|
|
30855
|
+
continuePendingLoadDelay({ markAsReady: true });
|
|
30756
30856
|
} else {
|
|
30757
30857
|
cancelRender2(err);
|
|
30758
30858
|
}
|
|
@@ -30765,21 +30865,17 @@ var CanvasImageContent = forwardRef10(({
|
|
|
30765
30865
|
clearTimeout(timeoutId);
|
|
30766
30866
|
}
|
|
30767
30867
|
controller.abort();
|
|
30768
|
-
continuePendingLoadDelay();
|
|
30868
|
+
continuePendingLoadDelay({ markAsReady: false });
|
|
30769
30869
|
};
|
|
30770
30870
|
}, [
|
|
30771
30871
|
actualSrc,
|
|
30772
30872
|
cancelRender2,
|
|
30773
30873
|
continuePendingLoadDelay,
|
|
30774
|
-
delayPlayback,
|
|
30775
30874
|
delayRender2,
|
|
30776
30875
|
delayRenderRetries,
|
|
30777
30876
|
delayRenderTimeoutInMilliseconds,
|
|
30778
30877
|
maxRetries,
|
|
30779
|
-
onError
|
|
30780
|
-
pauseWhenLoading,
|
|
30781
|
-
sequenceContext?.postmounting,
|
|
30782
|
-
sequenceContext?.premounting
|
|
30878
|
+
onError
|
|
30783
30879
|
]);
|
|
30784
30880
|
useLayoutEffect10(() => {
|
|
30785
30881
|
if (!loadedImage || !outputCanvas || !sourceCanvas) {
|
|
@@ -30831,7 +30927,7 @@ var CanvasImageContent = forwardRef10(({
|
|
|
30831
30927
|
return;
|
|
30832
30928
|
}
|
|
30833
30929
|
continueRenderOnce();
|
|
30834
|
-
continuePendingLoadDelay();
|
|
30930
|
+
continuePendingLoadDelay({ markAsReady: true });
|
|
30835
30931
|
}
|
|
30836
30932
|
});
|
|
30837
30933
|
}
|
|
@@ -30842,7 +30938,7 @@ var CanvasImageContent = forwardRef10(({
|
|
|
30842
30938
|
if (onError) {
|
|
30843
30939
|
onError(err);
|
|
30844
30940
|
continueRenderOnce();
|
|
30845
|
-
continuePendingLoadDelay();
|
|
30941
|
+
continuePendingLoadDelay({ markAsReady: true });
|
|
30846
30942
|
} else {
|
|
30847
30943
|
cancelRender2(err);
|
|
30848
30944
|
}
|
|
@@ -31013,6 +31109,7 @@ var ImgContent = ({
|
|
|
31013
31109
|
const errors = useRef24({});
|
|
31014
31110
|
const { delayPlayback } = useBufferState();
|
|
31015
31111
|
const sequenceContext = useContext33(SequenceContext);
|
|
31112
|
+
const [isLoading, setIsLoading] = useState18(false);
|
|
31016
31113
|
const _propsValid = true;
|
|
31017
31114
|
if (!_propsValid) {
|
|
31018
31115
|
throw new Error("typecheck error");
|
|
@@ -31045,6 +31142,8 @@ var ImgContent = ({
|
|
|
31045
31142
|
}, timeout);
|
|
31046
31143
|
}, []);
|
|
31047
31144
|
const { delayRender: delayRender2, continueRender: continueRender2, cancelRender: cancelRender2 } = useDelayRender();
|
|
31145
|
+
const isPremounting = Boolean(sequenceContext?.premounting);
|
|
31146
|
+
const isPostmounting = Boolean(sequenceContext?.postmounting);
|
|
31048
31147
|
const didGetError = useCallback19((e) => {
|
|
31049
31148
|
if (!errors.current) {
|
|
31050
31149
|
return;
|
|
@@ -31065,8 +31164,18 @@ var ImgContent = ({
|
|
|
31065
31164
|
} catch {}
|
|
31066
31165
|
}, [cancelRender2, maxRetries, onError, retryIn]);
|
|
31067
31166
|
if (typeof window !== "undefined") {
|
|
31068
|
-
|
|
31069
|
-
|
|
31167
|
+
useLayoutEffect11(() => {
|
|
31168
|
+
if (!pauseWhenLoading || !isLoading || isPremounting || isPostmounting) {
|
|
31169
|
+
return;
|
|
31170
|
+
}
|
|
31171
|
+
return delayPlayback().unblock;
|
|
31172
|
+
}, [
|
|
31173
|
+
delayPlayback,
|
|
31174
|
+
isLoading,
|
|
31175
|
+
isPostmounting,
|
|
31176
|
+
isPremounting,
|
|
31177
|
+
pauseWhenLoading
|
|
31178
|
+
]);
|
|
31070
31179
|
useLayoutEffect11(() => {
|
|
31071
31180
|
if (window.process?.env?.NODE_ENV === "test") {
|
|
31072
31181
|
if (imageRef.current) {
|
|
@@ -31078,13 +31187,11 @@ var ImgContent = ({
|
|
|
31078
31187
|
if (!current) {
|
|
31079
31188
|
return;
|
|
31080
31189
|
}
|
|
31190
|
+
setIsLoading(true);
|
|
31081
31191
|
const newHandle = delayRender2("Loading <Img> with src=" + truncateSrcForLabel(actualSrc), {
|
|
31082
31192
|
retries: delayRenderRetries ?? undefined,
|
|
31083
31193
|
timeoutInMilliseconds: delayRenderTimeoutInMilliseconds ?? undefined
|
|
31084
31194
|
});
|
|
31085
|
-
const unblock = pauseWhenLoading && !isPremounting && !isPostmounting ? delayPlayback().unblock : () => {
|
|
31086
|
-
return;
|
|
31087
|
-
};
|
|
31088
31195
|
let unmounted = false;
|
|
31089
31196
|
const onComplete = () => {
|
|
31090
31197
|
if (unmounted) {
|
|
@@ -31098,7 +31205,7 @@ var ImgContent = ({
|
|
|
31098
31205
|
if (current) {
|
|
31099
31206
|
onImageFrame?.(current);
|
|
31100
31207
|
}
|
|
31101
|
-
|
|
31208
|
+
setIsLoading(false);
|
|
31102
31209
|
continueRender2(newHandle);
|
|
31103
31210
|
};
|
|
31104
31211
|
if (!imageRef.current) {
|
|
@@ -31117,17 +31224,12 @@ var ImgContent = ({
|
|
|
31117
31224
|
return () => {
|
|
31118
31225
|
unmounted = true;
|
|
31119
31226
|
current.removeEventListener("load", onComplete);
|
|
31120
|
-
unblock();
|
|
31121
31227
|
continueRender2(newHandle);
|
|
31122
31228
|
};
|
|
31123
31229
|
}, [
|
|
31124
31230
|
actualSrc,
|
|
31125
|
-
delayPlayback,
|
|
31126
31231
|
delayRenderRetries,
|
|
31127
31232
|
delayRenderTimeoutInMilliseconds,
|
|
31128
|
-
pauseWhenLoading,
|
|
31129
|
-
isPremounting,
|
|
31130
|
-
isPostmounting,
|
|
31131
31233
|
onImageFrame,
|
|
31132
31234
|
continueRender2,
|
|
31133
31235
|
delayRender2
|
|
@@ -31445,9 +31547,9 @@ var CompositionManagerProvider = ({
|
|
|
31445
31547
|
initialCompositions,
|
|
31446
31548
|
initialCanvasContent
|
|
31447
31549
|
}) => {
|
|
31448
|
-
const [folders, setFolders] =
|
|
31449
|
-
const [canvasContent, setCanvasContent] =
|
|
31450
|
-
const [compositions, setCompositions] =
|
|
31550
|
+
const [folders, setFolders] = useState19([]);
|
|
31551
|
+
const [canvasContent, setCanvasContent] = useState19(initialCanvasContent);
|
|
31552
|
+
const [compositions, setCompositions] = useState19(initialCompositions);
|
|
31451
31553
|
const currentcompositionsRef = useRef26(compositions);
|
|
31452
31554
|
const updateCompositions = useCallback21((updateComps) => {
|
|
31453
31555
|
setCompositions((comps) => {
|
|
@@ -32018,7 +32120,7 @@ var OffthreadVideoForRendering = ({
|
|
|
32018
32120
|
toneMapped
|
|
32019
32121
|
});
|
|
32020
32122
|
}, [toneMapped, currentTime, src, transparent]);
|
|
32021
|
-
const [imageSrc, setImageSrc] =
|
|
32123
|
+
const [imageSrc, setImageSrc] = useState20(null);
|
|
32022
32124
|
const { delayRender: delayRender2, continueRender: continueRender2 } = useDelayRender();
|
|
32023
32125
|
useLayoutEffect12(() => {
|
|
32024
32126
|
if (!window.remotion_videoEnabled) {
|
|
@@ -32222,7 +32324,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
32222
32324
|
const parentSequence = useContext37(SequenceContext);
|
|
32223
32325
|
const logLevel = useLogLevel();
|
|
32224
32326
|
const mountTime = useMountTime();
|
|
32225
|
-
const [timelineId] =
|
|
32327
|
+
const [timelineId] = useState21(() => String(Math.random()));
|
|
32226
32328
|
if (typeof acceptableTimeShift !== "undefined") {
|
|
32227
32329
|
throw new Error("acceptableTimeShift has been removed. Use acceptableTimeShiftInSeconds instead.");
|
|
32228
32330
|
}
|
|
@@ -32293,7 +32395,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
32293
32395
|
useImperativeHandle9(ref, () => {
|
|
32294
32396
|
return videoRef.current;
|
|
32295
32397
|
}, []);
|
|
32296
|
-
|
|
32398
|
+
useState21(() => playbackLogging({
|
|
32297
32399
|
logLevel,
|
|
32298
32400
|
message: `Mounting video with source = ${actualSrc}, v=${VERSION}, user agent=${typeof navigator === "undefined" ? "server" : navigator.userAgent}`,
|
|
32299
32401
|
tag: "video",
|
|
@@ -32974,6 +33076,15 @@ var staticFile = (path) => {
|
|
|
32974
33076
|
}
|
|
32975
33077
|
return preparsed;
|
|
32976
33078
|
};
|
|
33079
|
+
var Still = (props2) => {
|
|
33080
|
+
const newProps = {
|
|
33081
|
+
...props2,
|
|
33082
|
+
durationInFrames: 1,
|
|
33083
|
+
fps: 1
|
|
33084
|
+
};
|
|
33085
|
+
return React42.createElement(Composition, newProps);
|
|
33086
|
+
};
|
|
33087
|
+
addSequenceStackTraces(Still);
|
|
32977
33088
|
var roundTo6Commas = (num) => {
|
|
32978
33089
|
return Math.round(num * 1e5) / 1e5;
|
|
32979
33090
|
};
|
|
@@ -36779,7 +36890,7 @@ var getAngle = (ref, coordinates) => {
|
|
|
36779
36890
|
};
|
|
36780
36891
|
var lastCoordinates = null;
|
|
36781
36892
|
var useMousePosition = (ref) => {
|
|
36782
|
-
const [angle, setAngle] =
|
|
36893
|
+
const [angle, setAngle] = useState23(getAngle(ref.current, lastCoordinates));
|
|
36783
36894
|
useEffect21(() => {
|
|
36784
36895
|
const element = ref.current;
|
|
36785
36896
|
if (!element) {
|
|
@@ -43079,7 +43190,7 @@ var Triangle22 = (props) => {
|
|
|
43079
43190
|
};
|
|
43080
43191
|
|
|
43081
43192
|
// src/components/prompts/CopyPromptButton.tsx
|
|
43082
|
-
import { useCallback as useCallback38, useState as
|
|
43193
|
+
import { useCallback as useCallback38, useState as useState40 } from "react";
|
|
43083
43194
|
|
|
43084
43195
|
// src/components/prompts/ClipboardIcon.tsx
|
|
43085
43196
|
import { jsx as jsx45 } from "react/jsx-runtime";
|
|
@@ -43099,7 +43210,7 @@ var ClipboardIcon = ({ size: size4 = 16, color = "currentColor" }) => {
|
|
|
43099
43210
|
// src/components/prompts/CopyPromptButton.tsx
|
|
43100
43211
|
import { jsx as jsx46, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
43101
43212
|
var CopyPromptButton = ({ prompt }) => {
|
|
43102
|
-
const [copied, setCopied] =
|
|
43213
|
+
const [copied, setCopied] = useState40(false);
|
|
43103
43214
|
const onCopy = useCallback38(() => {
|
|
43104
43215
|
navigator.clipboard.writeText(prompt);
|
|
43105
43216
|
setCopied(true);
|
|
@@ -43129,7 +43240,7 @@ var CopyPromptButton = ({ prompt }) => {
|
|
|
43129
43240
|
};
|
|
43130
43241
|
|
|
43131
43242
|
// src/components/prompts/LikeButton.tsx
|
|
43132
|
-
import { useCallback as useCallback40, useEffect as useEffect40, useState as
|
|
43243
|
+
import { useCallback as useCallback40, useEffect as useEffect40, useState as useState42 } from "react";
|
|
43133
43244
|
|
|
43134
43245
|
// src/components/prompts/config.ts
|
|
43135
43246
|
var REMOTION_PRO_ORIGIN = "https://www.remotion.pro";
|
|
@@ -43206,11 +43317,11 @@ var getRelativeTime = (dateStr) => {
|
|
|
43206
43317
|
};
|
|
43207
43318
|
|
|
43208
43319
|
// src/components/prompts/use-heart-animation.ts
|
|
43209
|
-
import { useCallback as useCallback39, useRef as useRef47, useState as
|
|
43320
|
+
import { useCallback as useCallback39, useRef as useRef47, useState as useState41 } from "react";
|
|
43210
43321
|
var DURATION = 300;
|
|
43211
43322
|
var useHeartAnimation = () => {
|
|
43212
|
-
const [scale, setScale] =
|
|
43213
|
-
const [roundness, setRoundness] =
|
|
43323
|
+
const [scale, setScale] = useState41(1);
|
|
43324
|
+
const [roundness, setRoundness] = useState41(0.09);
|
|
43214
43325
|
const rafRef = useRef47(0);
|
|
43215
43326
|
const animate = useCallback39(() => {
|
|
43216
43327
|
cancelAnimationFrame(rafRef.current);
|
|
@@ -43237,8 +43348,8 @@ var useHeartAnimation = () => {
|
|
|
43237
43348
|
// src/components/prompts/LikeButton.tsx
|
|
43238
43349
|
import { jsx as jsx47, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
43239
43350
|
var LikeButton = ({ submissionId, initialLikeCount }) => {
|
|
43240
|
-
const [liked, setLiked] =
|
|
43241
|
-
const [likeCount, setLikeCount] =
|
|
43351
|
+
const [liked, setLiked] = useState42(false);
|
|
43352
|
+
const [likeCount, setLikeCount] = useState42(initialLikeCount);
|
|
43242
43353
|
const { scale, roundness, animate } = useHeartAnimation();
|
|
43243
43354
|
useEffect40(() => {
|
|
43244
43355
|
setLiked(getLikedIds().has(submissionId));
|