@remotion/promo-pages 4.0.476 → 4.0.478
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.js +1012 -599
- package/dist/components/homepage/CommunityStatsItems.js +4 -4
- package/dist/components/homepage/GitHubButton.js +1 -1
- package/dist/components/team/TrustSection.js +1 -1
- package/dist/design.js +611 -220
- package/dist/experts.js +150 -72
- package/dist/homepage/Pricing.js +605 -214
- package/dist/prompts/PromptsGallery.js +607 -216
- package/dist/prompts/PromptsShow.js +611 -220
- package/dist/prompts/PromptsSubmit.js +613 -222
- package/dist/team.js +608 -217
- package/dist/template-modal-content.js +610 -219
- package/dist/templates.js +603 -212
- package/package.json +13 -13
|
@@ -17370,7 +17370,7 @@ var init_vidstack_D5Pzx_k5 = __esm(() => {
|
|
|
17370
17370
|
import * as React23 from "react";
|
|
17371
17371
|
import * as React3 from "react";
|
|
17372
17372
|
import { Fragment as Fragment2, jsx as jsx43 } from "react/jsx-runtime";
|
|
17373
|
-
import React52, { useCallback as
|
|
17373
|
+
import React52, { useCallback as useCallback27, useRef as useRef210, useState as useState22 } from "react";
|
|
17374
17374
|
|
|
17375
17375
|
// ../../node_modules/.bun/clsx@2.1.1/node_modules/clsx/dist/clsx.mjs
|
|
17376
17376
|
function r(e) {
|
|
@@ -21507,6 +21507,7 @@ import { useContext as useContext8, useMemo as useMemo7 } from "react";
|
|
|
21507
21507
|
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
21508
21508
|
import {
|
|
21509
21509
|
forwardRef as forwardRef3,
|
|
21510
|
+
useCallback as useCallback6,
|
|
21510
21511
|
useContext as useContext17,
|
|
21511
21512
|
useEffect as useEffect3,
|
|
21512
21513
|
useMemo as useMemo14,
|
|
@@ -21545,14 +21546,14 @@ import {
|
|
|
21545
21546
|
useRef as useRef9,
|
|
21546
21547
|
useState as useState6
|
|
21547
21548
|
} from "react";
|
|
21548
|
-
import React15, { useCallback as
|
|
21549
|
+
import React15, { useCallback as useCallback7, useImperativeHandle, useMemo as useMemo16, useRef as useRef8 } from "react";
|
|
21549
21550
|
import { useEffect as useEffect4, useMemo as useMemo15, useRef as useRef7 } from "react";
|
|
21550
21551
|
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
21551
21552
|
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
21552
21553
|
import { useContext as useContext18, useLayoutEffect as useLayoutEffect4, useState as useState8 } from "react";
|
|
21553
21554
|
import {
|
|
21554
21555
|
createContext as createContext17,
|
|
21555
|
-
useCallback as
|
|
21556
|
+
useCallback as useCallback8,
|
|
21556
21557
|
useImperativeHandle as useImperativeHandle3,
|
|
21557
21558
|
useLayoutEffect as useLayoutEffect3,
|
|
21558
21559
|
useMemo as useMemo17,
|
|
@@ -21560,7 +21561,7 @@ import {
|
|
|
21560
21561
|
useState as useState7
|
|
21561
21562
|
} from "react";
|
|
21562
21563
|
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
21563
|
-
import { forwardRef as forwardRef7, useCallback as
|
|
21564
|
+
import { forwardRef as forwardRef7, useCallback as useCallback14, useContext as useContext30 } from "react";
|
|
21564
21565
|
import React16, { createContext as createContext18, useMemo as useMemo18 } from "react";
|
|
21565
21566
|
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
21566
21567
|
import { useContext as useContext19 } from "react";
|
|
@@ -21568,7 +21569,7 @@ import { createContext as createContext19, useEffect as useEffect6, useState as
|
|
|
21568
21569
|
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
21569
21570
|
import { createContext as createContext20, useMemo as useMemo19, useReducer } from "react";
|
|
21570
21571
|
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
21571
|
-
import { useCallback as
|
|
21572
|
+
import { useCallback as useCallback13 } from "react";
|
|
21572
21573
|
import React22, {
|
|
21573
21574
|
forwardRef as forwardRef5,
|
|
21574
21575
|
useContext as useContext28,
|
|
@@ -21582,7 +21583,7 @@ import { useContext as useContext21, useLayoutEffect as useLayoutEffect5, useRef
|
|
|
21582
21583
|
import React19, {
|
|
21583
21584
|
createContext as createContext21,
|
|
21584
21585
|
createRef as createRef2,
|
|
21585
|
-
useCallback as
|
|
21586
|
+
useCallback as useCallback9,
|
|
21586
21587
|
useContext as useContext20,
|
|
21587
21588
|
useEffect as useEffect7,
|
|
21588
21589
|
useMemo as useMemo21,
|
|
@@ -21595,16 +21596,16 @@ import { useRef as useRef13 } from "react";
|
|
|
21595
21596
|
import { useContext as useContext23, useEffect as useEffect8, useMemo as useMemo22, useState as useState11 } from "react";
|
|
21596
21597
|
import { useContext as useContext22 } from "react";
|
|
21597
21598
|
import {
|
|
21598
|
-
useCallback as
|
|
21599
|
+
useCallback as useCallback12,
|
|
21599
21600
|
useContext as useContext26,
|
|
21600
21601
|
useEffect as useEffect12,
|
|
21601
21602
|
useLayoutEffect as useLayoutEffect7,
|
|
21602
21603
|
useRef as useRef18
|
|
21603
21604
|
} from "react";
|
|
21604
|
-
import { useCallback as
|
|
21605
|
+
import { useCallback as useCallback11, useMemo as useMemo25, useRef as useRef16 } from "react";
|
|
21605
21606
|
import { useContext as useContext25, useMemo as useMemo24 } from "react";
|
|
21606
21607
|
import React20, {
|
|
21607
|
-
useCallback as
|
|
21608
|
+
useCallback as useCallback10,
|
|
21608
21609
|
useContext as useContext24,
|
|
21609
21610
|
useEffect as useEffect9,
|
|
21610
21611
|
useLayoutEffect as useLayoutEffect6,
|
|
@@ -21632,7 +21633,7 @@ import { jsx as jsx22 } from "react/jsx-runtime";
|
|
|
21632
21633
|
import { jsx as jsx23 } from "react/jsx-runtime";
|
|
21633
21634
|
import {
|
|
21634
21635
|
forwardRef as forwardRef8,
|
|
21635
|
-
useCallback as
|
|
21636
|
+
useCallback as useCallback15,
|
|
21636
21637
|
useEffect as useEffect16,
|
|
21637
21638
|
useImperativeHandle as useImperativeHandle6,
|
|
21638
21639
|
useMemo as useMemo29,
|
|
@@ -21643,7 +21644,7 @@ import { jsx as jsx24 } from "react/jsx-runtime";
|
|
|
21643
21644
|
import {
|
|
21644
21645
|
createContext as createContext23,
|
|
21645
21646
|
forwardRef as forwardRef9,
|
|
21646
|
-
useCallback as
|
|
21647
|
+
useCallback as useCallback16,
|
|
21647
21648
|
useContext as useContext31,
|
|
21648
21649
|
useLayoutEffect as useLayoutEffect9,
|
|
21649
21650
|
useMemo as useMemo30,
|
|
@@ -21652,7 +21653,7 @@ import {
|
|
|
21652
21653
|
import { jsx as jsx25 } from "react/jsx-runtime";
|
|
21653
21654
|
import {
|
|
21654
21655
|
forwardRef as forwardRef10,
|
|
21655
|
-
useCallback as
|
|
21656
|
+
useCallback as useCallback17,
|
|
21656
21657
|
useContext as useContext32,
|
|
21657
21658
|
useEffect as useEffect17,
|
|
21658
21659
|
useImperativeHandle as useImperativeHandle7,
|
|
@@ -21661,16 +21662,16 @@ import {
|
|
|
21661
21662
|
useState as useState16
|
|
21662
21663
|
} from "react";
|
|
21663
21664
|
import { jsx as jsx26 } from "react/jsx-runtime";
|
|
21664
|
-
import { forwardRef as forwardRef11, useCallback as
|
|
21665
|
+
import { forwardRef as forwardRef11, useCallback as useCallback18, useState as useState17 } from "react";
|
|
21665
21666
|
import { jsx as jsx27 } from "react/jsx-runtime";
|
|
21666
|
-
import { useCallback as
|
|
21667
|
+
import { useCallback as useCallback19, useContext as useContext33, useLayoutEffect as useLayoutEffect10, useRef as useRef24 } from "react";
|
|
21667
21668
|
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
21668
|
-
import React29, { forwardRef as forwardRef12, useCallback as
|
|
21669
|
+
import React29, { forwardRef as forwardRef12, useCallback as useCallback20, useRef as useRef25 } from "react";
|
|
21669
21670
|
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
21670
21671
|
import { createRef as createRef3 } from "react";
|
|
21671
21672
|
import React30 from "react";
|
|
21672
21673
|
import {
|
|
21673
|
-
useCallback as
|
|
21674
|
+
useCallback as useCallback21,
|
|
21674
21675
|
useImperativeHandle as useImperativeHandle8,
|
|
21675
21676
|
useMemo as useMemo32,
|
|
21676
21677
|
useRef as useRef26,
|
|
@@ -21685,9 +21686,9 @@ import { jsx as jsx32 } from "react/jsx-runtime";
|
|
|
21685
21686
|
import React33 from "react";
|
|
21686
21687
|
import React34, { createContext as createContext25 } from "react";
|
|
21687
21688
|
import React35, { useContext as useContext35 } from "react";
|
|
21688
|
-
import { useCallback as
|
|
21689
|
+
import { useCallback as useCallback24 } from "react";
|
|
21689
21690
|
import {
|
|
21690
|
-
useCallback as
|
|
21691
|
+
useCallback as useCallback22,
|
|
21691
21692
|
useContext as useContext36,
|
|
21692
21693
|
useEffect as useEffect18,
|
|
21693
21694
|
useLayoutEffect as useLayoutEffect11,
|
|
@@ -21697,7 +21698,7 @@ import {
|
|
|
21697
21698
|
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
21698
21699
|
import React37, {
|
|
21699
21700
|
forwardRef as forwardRef13,
|
|
21700
|
-
useCallback as
|
|
21701
|
+
useCallback as useCallback23,
|
|
21701
21702
|
useContext as useContext37,
|
|
21702
21703
|
useEffect as useEffect20,
|
|
21703
21704
|
useImperativeHandle as useImperativeHandle9,
|
|
@@ -21718,7 +21719,7 @@ import {
|
|
|
21718
21719
|
import React40 from "react";
|
|
21719
21720
|
import { jsx as jsx37 } from "react/jsx-runtime";
|
|
21720
21721
|
import React42 from "react";
|
|
21721
|
-
import { forwardRef as forwardRef16, useCallback as
|
|
21722
|
+
import { forwardRef as forwardRef16, useCallback as useCallback25, useContext as useContext39 } from "react";
|
|
21722
21723
|
import {
|
|
21723
21724
|
forwardRef as forwardRef15,
|
|
21724
21725
|
useContext as useContext38,
|
|
@@ -22898,7 +22899,7 @@ var getComponentsToAddStacksTo = () => componentsToAddStacksTo;
|
|
|
22898
22899
|
var addSequenceStackTraces = (component) => {
|
|
22899
22900
|
componentsToAddStacksTo.push(component);
|
|
22900
22901
|
};
|
|
22901
|
-
var VERSION = "4.0.
|
|
22902
|
+
var VERSION = "4.0.478";
|
|
22902
22903
|
var checkMultipleRemotionVersions = () => {
|
|
22903
22904
|
if (typeof globalThis === "undefined") {
|
|
22904
22905
|
return;
|
|
@@ -23357,10 +23358,17 @@ var fromField = {
|
|
|
23357
23358
|
step: 1,
|
|
23358
23359
|
hiddenFromList: true
|
|
23359
23360
|
};
|
|
23361
|
+
var freezeField = {
|
|
23362
|
+
type: "number",
|
|
23363
|
+
default: null,
|
|
23364
|
+
step: 1,
|
|
23365
|
+
hiddenFromList: true
|
|
23366
|
+
};
|
|
23360
23367
|
var sequenceSchema = extendSchemaWithSequenceName({
|
|
23361
23368
|
hidden: hiddenField,
|
|
23362
23369
|
showInTimeline: showInTimelineField,
|
|
23363
23370
|
from: fromField,
|
|
23371
|
+
freeze: freezeField,
|
|
23364
23372
|
durationInFrames: durationInFramesField,
|
|
23365
23373
|
layout: {
|
|
23366
23374
|
type: "enum",
|
|
@@ -23375,6 +23383,7 @@ var sequenceSchema = extendSchemaWithSequenceName({
|
|
|
23375
23383
|
var sequenceSchemaWithoutFrom = extendSchemaWithSequenceName({
|
|
23376
23384
|
hidden: hiddenField,
|
|
23377
23385
|
showInTimeline: showInTimelineField,
|
|
23386
|
+
freeze: freezeField,
|
|
23378
23387
|
durationInFrames: durationInFramesField,
|
|
23379
23388
|
layout: sequenceSchema.layout
|
|
23380
23389
|
});
|
|
@@ -25566,6 +25575,7 @@ var mergeValues = ({
|
|
|
25566
25575
|
var stackToOverrideMap = {};
|
|
25567
25576
|
var wrapInSchema = ({
|
|
25568
25577
|
Component,
|
|
25578
|
+
componentIdentity,
|
|
25569
25579
|
schema,
|
|
25570
25580
|
supportsEffects
|
|
25571
25581
|
}) => {
|
|
@@ -25612,7 +25622,8 @@ var wrapInSchema = ({
|
|
|
25612
25622
|
schema: schemaWithSequenceName,
|
|
25613
25623
|
currentRuntimeValueDotNotation,
|
|
25614
25624
|
overrideId,
|
|
25615
|
-
supportsEffects
|
|
25625
|
+
supportsEffects,
|
|
25626
|
+
componentIdentity
|
|
25616
25627
|
};
|
|
25617
25628
|
}, [currentRuntimeValueDotNotation, overrideId]);
|
|
25618
25629
|
const { merged: valuesDotNotation, propsToDelete } = useMemo13(() => {
|
|
@@ -25649,6 +25660,7 @@ var wrapInSchema = ({
|
|
|
25649
25660
|
var EMPTY_EFFECTS = [];
|
|
25650
25661
|
var RegularSequenceRefForwardingFunction = ({
|
|
25651
25662
|
from = 0,
|
|
25663
|
+
freeze,
|
|
25652
25664
|
durationInFrames = Infinity,
|
|
25653
25665
|
children,
|
|
25654
25666
|
name,
|
|
@@ -25664,7 +25676,7 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
25664
25676
|
_remotionInternalPremountDisplay: premountDisplay,
|
|
25665
25677
|
_remotionInternalPostmountDisplay: postmountDisplay,
|
|
25666
25678
|
_remotionInternalIsMedia: isMedia,
|
|
25667
|
-
_remotionInternalRefForOutline:
|
|
25679
|
+
_remotionInternalRefForOutline: passedRefForOutline,
|
|
25668
25680
|
...other
|
|
25669
25681
|
}, ref) => {
|
|
25670
25682
|
const { layout = "absolute-fill" } = other;
|
|
@@ -25692,11 +25704,24 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
25692
25704
|
if (!Number.isFinite(from)) {
|
|
25693
25705
|
throw new TypeError(`The "from" prop of a sequence must be finite, but got ${from}.`);
|
|
25694
25706
|
}
|
|
25707
|
+
if (typeof freeze !== "undefined" && freeze !== null) {
|
|
25708
|
+
if (typeof freeze !== "number") {
|
|
25709
|
+
throw new TypeError(`The "freeze" prop of <Sequence /> must be a number, but is of type ${typeof freeze}.`);
|
|
25710
|
+
}
|
|
25711
|
+
if (Number.isNaN(freeze)) {
|
|
25712
|
+
throw new TypeError(`The "freeze" prop of <Sequence /> must be a real number, but it is NaN.`);
|
|
25713
|
+
}
|
|
25714
|
+
if (!Number.isFinite(freeze)) {
|
|
25715
|
+
throw new TypeError(`The "freeze" prop of <Sequence /> must be finite, but it is ${freeze}.`);
|
|
25716
|
+
}
|
|
25717
|
+
}
|
|
25695
25718
|
const absoluteFrame = useTimelinePosition();
|
|
25696
25719
|
const videoConfig = useVideoConfig();
|
|
25697
25720
|
const parentSequenceDuration = parentSequence ? Math.min(parentSequence.durationInFrames - from, durationInFrames) : durationInFrames;
|
|
25698
25721
|
const actualDurationInFrames = Math.max(0, Math.min(videoConfig.durationInFrames - from, parentSequenceDuration));
|
|
25699
25722
|
const { registerSequence, unregisterSequence } = useContext17(SequenceManager);
|
|
25723
|
+
const wrapperRefForOutline = useRef6(null);
|
|
25724
|
+
const refForOutline = other.layout === "none" ? passedRefForOutline ?? null : passedRefForOutline ?? wrapperRefForOutline;
|
|
25700
25725
|
const premounting = useMemo14(() => {
|
|
25701
25726
|
return parentSequence?.premounting || Boolean(other._remotionInternalIsPremounting);
|
|
25702
25727
|
}, [other._remotionInternalIsPremounting, parentSequence?.premounting]);
|
|
@@ -25748,6 +25773,11 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
25748
25773
|
const inheritedStack = other?.stack ?? null;
|
|
25749
25774
|
const stackRef = useRef6(null);
|
|
25750
25775
|
stackRef.current = stack ?? inheritedStack;
|
|
25776
|
+
const registeredFrozenFrame = typeof freeze === "number" ? freeze : null;
|
|
25777
|
+
const parentCumulatedNegativeFrom = parentSequence?.cumulatedNegativeFrom ?? 0;
|
|
25778
|
+
const startMediaFrom = isMedia && isMedia.type !== "image" ? isMedia.data.startMediaFrom + parentCumulatedNegativeFrom - cumulatedNegativeFrom : null;
|
|
25779
|
+
const mediaFrameAtSequenceZero = isMedia && isMedia.type !== "image" ? isMedia.data.startMediaFrom + parentCumulatedNegativeFrom : null;
|
|
25780
|
+
const frozenMediaFrame = isMedia && isMedia.type !== "image" && mediaFrameAtSequenceZero !== null ? registeredFrozenFrame === null ? null : mediaFrameAtSequenceZero + (loopDisplay ? registeredFrozenFrame % loopDisplay.durationInFrames : registeredFrozenFrame) * isMedia.data.playbackRate : null;
|
|
25751
25781
|
useEffect3(() => {
|
|
25752
25782
|
if (!env.isStudio) {
|
|
25753
25783
|
return;
|
|
@@ -25773,7 +25803,8 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
25773
25803
|
src: isMedia.src,
|
|
25774
25804
|
getStack: () => stackRef.current,
|
|
25775
25805
|
refForOutline: refForOutline ?? null,
|
|
25776
|
-
isInsideSeries
|
|
25806
|
+
isInsideSeries,
|
|
25807
|
+
frozenFrame: registeredFrozenFrame
|
|
25777
25808
|
});
|
|
25778
25809
|
} else {
|
|
25779
25810
|
registerSequence({
|
|
@@ -25796,10 +25827,12 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
25796
25827
|
showInTimeline,
|
|
25797
25828
|
src: isMedia.data.src,
|
|
25798
25829
|
getStack: () => stackRef.current,
|
|
25799
|
-
startMediaFrom: isMedia.data.startMediaFrom,
|
|
25830
|
+
startMediaFrom: startMediaFrom ?? isMedia.data.startMediaFrom,
|
|
25800
25831
|
volume: isMedia.data.volumes,
|
|
25801
25832
|
refForOutline: refForOutline ?? null,
|
|
25802
|
-
isInsideSeries
|
|
25833
|
+
isInsideSeries,
|
|
25834
|
+
frozenFrame: registeredFrozenFrame,
|
|
25835
|
+
frozenMediaFrame
|
|
25803
25836
|
});
|
|
25804
25837
|
}
|
|
25805
25838
|
return () => {
|
|
@@ -25824,7 +25857,8 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
25824
25857
|
controls: controls ?? null,
|
|
25825
25858
|
effects: _remotionInternalEffects ?? EMPTY_EFFECTS,
|
|
25826
25859
|
refForOutline: refForOutline ?? null,
|
|
25827
|
-
isInsideSeries
|
|
25860
|
+
isInsideSeries,
|
|
25861
|
+
frozenFrame: registeredFrozenFrame
|
|
25828
25862
|
});
|
|
25829
25863
|
return () => {
|
|
25830
25864
|
unregisterSequence(id);
|
|
@@ -25851,11 +25885,26 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
25851
25885
|
isMedia,
|
|
25852
25886
|
resolvedDocumentationLink,
|
|
25853
25887
|
refForOutline,
|
|
25854
|
-
isInsideSeries
|
|
25888
|
+
isInsideSeries,
|
|
25889
|
+
registeredFrozenFrame,
|
|
25890
|
+
startMediaFrom,
|
|
25891
|
+
frozenMediaFrame
|
|
25855
25892
|
]);
|
|
25856
25893
|
const endThreshold = Math.ceil(cumulatedFrom + from + durationInFrames - 1);
|
|
25857
25894
|
const content = absoluteFrame < cumulatedFrom + from ? null : absoluteFrame > endThreshold ? null : children;
|
|
25895
|
+
const frozenContent = content === null || typeof freeze === "undefined" || freeze === null ? content : /* @__PURE__ */ jsx12(Freeze, {
|
|
25896
|
+
frame: freeze,
|
|
25897
|
+
children: content
|
|
25898
|
+
});
|
|
25858
25899
|
const styleIfThere = other.layout === "none" ? undefined : other.style;
|
|
25900
|
+
const sequenceRef = useCallback6((node) => {
|
|
25901
|
+
wrapperRefForOutline.current = node;
|
|
25902
|
+
if (typeof ref === "function") {
|
|
25903
|
+
ref(node);
|
|
25904
|
+
} else if (ref) {
|
|
25905
|
+
ref.current = node;
|
|
25906
|
+
}
|
|
25907
|
+
}, [ref]);
|
|
25859
25908
|
const defaultStyle = useMemo14(() => {
|
|
25860
25909
|
return {
|
|
25861
25910
|
flexDirection: undefined,
|
|
@@ -25872,11 +25921,11 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
25872
25921
|
}
|
|
25873
25922
|
return /* @__PURE__ */ jsx12(SequenceContext.Provider, {
|
|
25874
25923
|
value: contextValue,
|
|
25875
|
-
children:
|
|
25876
|
-
ref,
|
|
25924
|
+
children: frozenContent === null ? null : other.layout === "none" ? frozenContent : /* @__PURE__ */ jsx12(AbsoluteFill, {
|
|
25925
|
+
ref: sequenceRef,
|
|
25877
25926
|
style: defaultStyle,
|
|
25878
25927
|
className: other.className,
|
|
25879
|
-
children:
|
|
25928
|
+
children: frozenContent
|
|
25880
25929
|
})
|
|
25881
25930
|
});
|
|
25882
25931
|
};
|
|
@@ -25956,11 +26005,13 @@ var SequenceInner = forwardRef3(SequenceRefForwardingFunction);
|
|
|
25956
26005
|
var SequenceWithoutSchema = SequenceInner;
|
|
25957
26006
|
var Sequence = wrapInSchema({
|
|
25958
26007
|
Component: SequenceInner,
|
|
26008
|
+
componentIdentity: "dev.remotion.remotion.Sequence",
|
|
25959
26009
|
schema: sequenceSchema,
|
|
25960
26010
|
supportsEffects: false
|
|
25961
26011
|
});
|
|
25962
26012
|
var SequenceWithoutFrom = wrapInSchema({
|
|
25963
26013
|
Component: SequenceInner,
|
|
26014
|
+
componentIdentity: null,
|
|
25964
26015
|
schema: sequenceSchemaWithoutFrom,
|
|
25965
26016
|
supportsEffects: false
|
|
25966
26017
|
});
|
|
@@ -26278,7 +26329,7 @@ var CanvasRefForwardingFunction = ({ width, height, fit, className, style, effec
|
|
|
26278
26329
|
}
|
|
26279
26330
|
return document.createElement("canvas");
|
|
26280
26331
|
}, []);
|
|
26281
|
-
const draw =
|
|
26332
|
+
const draw = useCallback7((imageData) => {
|
|
26282
26333
|
const canvas = canvasRef.current;
|
|
26283
26334
|
const canvasWidth = width ?? imageData.displayWidth;
|
|
26284
26335
|
const canvasHeight = height ?? imageData.displayHeight;
|
|
@@ -26499,6 +26550,7 @@ var resolveAnimatedImageSource = (src) => {
|
|
|
26499
26550
|
var animatedImageSchema = {
|
|
26500
26551
|
durationInFrames: durationInFramesField,
|
|
26501
26552
|
from: fromField,
|
|
26553
|
+
freeze: freezeField,
|
|
26502
26554
|
playbackRate: {
|
|
26503
26555
|
type: "number",
|
|
26504
26556
|
min: 0,
|
|
@@ -26698,6 +26750,7 @@ var AnimatedImageInner = ({
|
|
|
26698
26750
|
};
|
|
26699
26751
|
var AnimatedImage = wrapInSchema({
|
|
26700
26752
|
Component: AnimatedImageInner,
|
|
26753
|
+
componentIdentity: "dev.remotion.remotion.AnimatedImage",
|
|
26701
26754
|
schema: animatedImageSchema,
|
|
26702
26755
|
supportsEffects: true
|
|
26703
26756
|
});
|
|
@@ -26744,7 +26797,7 @@ var RenderAssetManager = createContext17({
|
|
|
26744
26797
|
var RenderAssetManagerProvider = ({ children, collectAssets }) => {
|
|
26745
26798
|
const [renderAssets, setRenderAssets] = useState7([]);
|
|
26746
26799
|
const renderAssetsRef = useRef10([]);
|
|
26747
|
-
const registerRenderAsset =
|
|
26800
|
+
const registerRenderAsset = useCallback8((renderAsset) => {
|
|
26748
26801
|
validateRenderAsset(renderAsset);
|
|
26749
26802
|
renderAssetsRef.current = [...renderAssetsRef.current, renderAsset];
|
|
26750
26803
|
setRenderAssets(renderAssetsRef.current);
|
|
@@ -26761,7 +26814,7 @@ var RenderAssetManagerProvider = ({ children, collectAssets }) => {
|
|
|
26761
26814
|
};
|
|
26762
26815
|
}, []);
|
|
26763
26816
|
}
|
|
26764
|
-
const unregisterRenderAsset =
|
|
26817
|
+
const unregisterRenderAsset = useCallback8((id) => {
|
|
26765
26818
|
renderAssetsRef.current = renderAssetsRef.current.filter((a2) => a2.id !== id);
|
|
26766
26819
|
setRenderAssets(renderAssetsRef.current);
|
|
26767
26820
|
}, []);
|
|
@@ -27566,7 +27619,7 @@ var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled, pr
|
|
|
27566
27619
|
}, []);
|
|
27567
27620
|
const prevEndTimes = useRef12({ scheduledEndTime: null, mediaEndTime: null });
|
|
27568
27621
|
const nodesToResume = useRef12(new Map);
|
|
27569
|
-
const unscheduleAudioNode =
|
|
27622
|
+
const unscheduleAudioNode = useCallback9((node) => {
|
|
27570
27623
|
nodesToResume.current.delete(node);
|
|
27571
27624
|
}, []);
|
|
27572
27625
|
const scheduleAudioNode = useMemo21(() => {
|
|
@@ -27620,7 +27673,7 @@ var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled, pr
|
|
|
27620
27673
|
};
|
|
27621
27674
|
};
|
|
27622
27675
|
}, [ctxAndGain, logLevel]);
|
|
27623
|
-
const resume =
|
|
27676
|
+
const resume = useCallback9(() => {
|
|
27624
27677
|
if (!ctxAndGain) {
|
|
27625
27678
|
return Promise.resolve();
|
|
27626
27679
|
}
|
|
@@ -27647,10 +27700,10 @@ var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled, pr
|
|
|
27647
27700
|
});
|
|
27648
27701
|
return resumePromise.catch(() => {});
|
|
27649
27702
|
}, [ctxAndGain, logLevel]);
|
|
27650
|
-
const getIsResumingAudioContext =
|
|
27703
|
+
const getIsResumingAudioContext = useCallback9(() => {
|
|
27651
27704
|
return isResuming.current;
|
|
27652
27705
|
}, []);
|
|
27653
|
-
const suspend =
|
|
27706
|
+
const suspend = useCallback9(() => {
|
|
27654
27707
|
if (!ctxAndGain) {
|
|
27655
27708
|
return Promise.resolve();
|
|
27656
27709
|
}
|
|
@@ -27724,7 +27777,7 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
|
|
|
27724
27777
|
};
|
|
27725
27778
|
}, [refs]);
|
|
27726
27779
|
const takenAudios = useRef12(new Array(numberOfAudioTags).fill(false));
|
|
27727
|
-
const rerenderAudios =
|
|
27780
|
+
const rerenderAudios = useCallback9(() => {
|
|
27728
27781
|
refs.forEach(({ ref, id }) => {
|
|
27729
27782
|
const data = audios.current?.find((a2) => a2.id === id);
|
|
27730
27783
|
const { current } = ref;
|
|
@@ -27745,7 +27798,7 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
|
|
|
27745
27798
|
});
|
|
27746
27799
|
});
|
|
27747
27800
|
}, [refs]);
|
|
27748
|
-
const registerAudio =
|
|
27801
|
+
const registerAudio = useCallback9((options) => {
|
|
27749
27802
|
const { aud, audioId, premounting, postmounting } = options;
|
|
27750
27803
|
const found = audios.current?.find((a2) => a2.audioId === audioId);
|
|
27751
27804
|
if (found) {
|
|
@@ -27774,7 +27827,7 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
|
|
|
27774
27827
|
rerenderAudios();
|
|
27775
27828
|
return newElem;
|
|
27776
27829
|
}, [numberOfAudioTags, refs, rerenderAudios]);
|
|
27777
|
-
const unregisterAudio =
|
|
27830
|
+
const unregisterAudio = useCallback9((id) => {
|
|
27778
27831
|
const cloned = [...takenAudios.current];
|
|
27779
27832
|
const index = refs.findIndex((r2) => r2.id === id);
|
|
27780
27833
|
if (index === -1) {
|
|
@@ -27785,7 +27838,7 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
|
|
|
27785
27838
|
audios.current = audios.current?.filter((a2) => a2.id !== id);
|
|
27786
27839
|
rerenderAudios();
|
|
27787
27840
|
}, [refs, rerenderAudios]);
|
|
27788
|
-
const updateAudio =
|
|
27841
|
+
const updateAudio = useCallback9(({
|
|
27789
27842
|
aud,
|
|
27790
27843
|
audioId,
|
|
27791
27844
|
id,
|
|
@@ -27819,7 +27872,7 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
|
|
|
27819
27872
|
rerenderAudios();
|
|
27820
27873
|
}
|
|
27821
27874
|
}, [rerenderAudios]);
|
|
27822
|
-
const playAllAudios =
|
|
27875
|
+
const playAllAudios = useCallback9(() => {
|
|
27823
27876
|
refs.forEach((ref) => {
|
|
27824
27877
|
const audio = audios.current.find((a2) => a2.el === ref.ref);
|
|
27825
27878
|
if (audio?.premounting) {
|
|
@@ -28330,7 +28383,9 @@ var useMediaInTimeline = ({
|
|
|
28330
28383
|
controls: null,
|
|
28331
28384
|
effects: [],
|
|
28332
28385
|
refForOutline,
|
|
28333
|
-
isInsideSeries: false
|
|
28386
|
+
isInsideSeries: false,
|
|
28387
|
+
frozenFrame: null,
|
|
28388
|
+
frozenMediaFrame: null
|
|
28334
28389
|
});
|
|
28335
28390
|
return () => {
|
|
28336
28391
|
unregisterSequence(id);
|
|
@@ -28367,7 +28422,7 @@ var useBufferManager = (logLevel, mountTime) => {
|
|
|
28367
28422
|
const env = useRemotionEnvironment();
|
|
28368
28423
|
const rendering = env.isRendering;
|
|
28369
28424
|
const buffering = useRef15(false);
|
|
28370
|
-
const addBlock =
|
|
28425
|
+
const addBlock = useCallback10((block) => {
|
|
28371
28426
|
if (rendering) {
|
|
28372
28427
|
return {
|
|
28373
28428
|
unblock: () => {
|
|
@@ -28393,7 +28448,7 @@ var useBufferManager = (logLevel, mountTime) => {
|
|
|
28393
28448
|
}
|
|
28394
28449
|
};
|
|
28395
28450
|
}, [rendering]);
|
|
28396
|
-
const listenForBuffering =
|
|
28451
|
+
const listenForBuffering = useCallback10((callback) => {
|
|
28397
28452
|
setOnBufferingCallbacks((c2) => [...c2, callback]);
|
|
28398
28453
|
return {
|
|
28399
28454
|
remove: () => {
|
|
@@ -28401,7 +28456,7 @@ var useBufferManager = (logLevel, mountTime) => {
|
|
|
28401
28456
|
}
|
|
28402
28457
|
};
|
|
28403
28458
|
}, []);
|
|
28404
|
-
const listenForResume =
|
|
28459
|
+
const listenForResume = useCallback10((callback) => {
|
|
28405
28460
|
setOnResumeCallbacks((c2) => [...c2, callback]);
|
|
28406
28461
|
return {
|
|
28407
28462
|
remove: () => {
|
|
@@ -28515,7 +28570,7 @@ var useBufferUntilFirstFrame = ({
|
|
|
28515
28570
|
}) => {
|
|
28516
28571
|
const bufferingRef = useRef16(false);
|
|
28517
28572
|
const { delayPlayback } = useBufferState();
|
|
28518
|
-
const bufferUntilFirstFrame =
|
|
28573
|
+
const bufferUntilFirstFrame = useCallback11((requestedTime) => {
|
|
28519
28574
|
if (mediaType !== "video") {
|
|
28520
28575
|
return;
|
|
28521
28576
|
}
|
|
@@ -28905,7 +28960,7 @@ var useMediaPlayback = ({
|
|
|
28905
28960
|
throw new Error("useMediaPlayback must be used inside a <BufferingContext>");
|
|
28906
28961
|
}
|
|
28907
28962
|
const isVariableFpsVideoMap = useRef18({});
|
|
28908
|
-
const onVariableFpsVideoDetected =
|
|
28963
|
+
const onVariableFpsVideoDetected = useCallback12(() => {
|
|
28909
28964
|
if (!src) {
|
|
28910
28965
|
return;
|
|
28911
28966
|
}
|
|
@@ -29296,7 +29351,7 @@ var AudioForDevelopmentForwardRefFunction = (props, ref) => {
|
|
|
29296
29351
|
premounting: Boolean(sequenceContext?.premounting),
|
|
29297
29352
|
postmounting: Boolean(sequenceContext?.postmounting)
|
|
29298
29353
|
});
|
|
29299
|
-
const getStack =
|
|
29354
|
+
const getStack = useCallback13(() => {
|
|
29300
29355
|
return _remotionInternalStack ?? null;
|
|
29301
29356
|
}, [_remotionInternalStack]);
|
|
29302
29357
|
useMediaInTimeline({
|
|
@@ -29542,7 +29597,7 @@ var AudioRefForwardingFunction = (props, ref) => {
|
|
|
29542
29597
|
throw new TypeError(`The \`<Html5Audio>\` tag requires a string for \`src\`, but got ${JSON.stringify(props.src)} instead.`);
|
|
29543
29598
|
}
|
|
29544
29599
|
const preloadedSrc = usePreload(props.src);
|
|
29545
|
-
const onError =
|
|
29600
|
+
const onError = useCallback14((e) => {
|
|
29546
29601
|
console.log(e.currentTarget.error);
|
|
29547
29602
|
const errMessage = `Could not play audio with src ${preloadedSrc}: ${e.currentTarget.error}. See https://remotion.dev/docs/media-playback-error for help.`;
|
|
29548
29603
|
if (loop) {
|
|
@@ -29556,7 +29611,7 @@ var AudioRefForwardingFunction = (props, ref) => {
|
|
|
29556
29611
|
console.warn(errMessage);
|
|
29557
29612
|
}
|
|
29558
29613
|
}, [loop, onRemotionError, preloadedSrc]);
|
|
29559
|
-
const onDuration =
|
|
29614
|
+
const onDuration = useCallback14((src, durationInSeconds) => {
|
|
29560
29615
|
setDurations({ type: "got-duration", durationInSeconds, src });
|
|
29561
29616
|
}, [setDurations]);
|
|
29562
29617
|
const durationFetched = durations[getAbsoluteSrc(preloadedSrc)] ?? durations[getAbsoluteSrc(props.src)];
|
|
@@ -29648,6 +29703,7 @@ var resolveSolidPixelDensity = (pixelDensity) => {
|
|
|
29648
29703
|
var solidSchema = {
|
|
29649
29704
|
durationInFrames: durationInFramesField,
|
|
29650
29705
|
from: fromField,
|
|
29706
|
+
freeze: freezeField,
|
|
29651
29707
|
color: {
|
|
29652
29708
|
type: "color",
|
|
29653
29709
|
default: "transparent",
|
|
@@ -29702,7 +29758,7 @@ var SolidInner = ({
|
|
|
29702
29758
|
return canvas;
|
|
29703
29759
|
}, []);
|
|
29704
29760
|
const chainState = useEffectChainState();
|
|
29705
|
-
const canvasRef =
|
|
29761
|
+
const canvasRef = useCallback15((canvas) => {
|
|
29706
29762
|
setOutputCanvas(canvas);
|
|
29707
29763
|
if (typeof reference === "function") {
|
|
29708
29764
|
reference(canvas);
|
|
@@ -29786,6 +29842,7 @@ var SolidOuter = forwardRef8(({
|
|
|
29786
29842
|
style,
|
|
29787
29843
|
name,
|
|
29788
29844
|
from,
|
|
29845
|
+
freeze,
|
|
29789
29846
|
hidden,
|
|
29790
29847
|
showInTimeline,
|
|
29791
29848
|
pixelDensity,
|
|
@@ -29799,6 +29856,7 @@ var SolidOuter = forwardRef8(({
|
|
|
29799
29856
|
return /* @__PURE__ */ jsx24(Sequence, {
|
|
29800
29857
|
layout: "none",
|
|
29801
29858
|
from,
|
|
29859
|
+
freeze,
|
|
29802
29860
|
hidden,
|
|
29803
29861
|
showInTimeline,
|
|
29804
29862
|
_experimentalControls: controls,
|
|
@@ -29823,6 +29881,7 @@ var SolidOuter = forwardRef8(({
|
|
|
29823
29881
|
});
|
|
29824
29882
|
var Solid = wrapInSchema({
|
|
29825
29883
|
Component: SolidOuter,
|
|
29884
|
+
componentIdentity: "dev.remotion.remotion.Solid",
|
|
29826
29885
|
schema: solidSchema,
|
|
29827
29886
|
supportsEffects: true
|
|
29828
29887
|
});
|
|
@@ -29912,7 +29971,7 @@ var HtmlInCanvasContent = forwardRef9(({
|
|
|
29912
29971
|
const offscreenRef = useRef22(null);
|
|
29913
29972
|
const divRef = useRef22(null);
|
|
29914
29973
|
const canvasSizeKey = `${width}x${height}@${resolvedPixelDensity}`;
|
|
29915
|
-
const setLayoutCanvasRef =
|
|
29974
|
+
const setLayoutCanvasRef = useCallback16((node) => {
|
|
29916
29975
|
canvas2dRef.current = node;
|
|
29917
29976
|
if (typeof ref === "function") {
|
|
29918
29977
|
ref(node);
|
|
@@ -29934,7 +29993,7 @@ var HtmlInCanvasContent = forwardRef9(({
|
|
|
29934
29993
|
const initializedRef = useRef22(false);
|
|
29935
29994
|
const onInitCleanupRef = useRef22(null);
|
|
29936
29995
|
const unmountedRef = useRef22(false);
|
|
29937
|
-
const onPaintCb =
|
|
29996
|
+
const onPaintCb = useCallback16(async () => {
|
|
29938
29997
|
const element = divRef.current;
|
|
29939
29998
|
if (!element) {
|
|
29940
29999
|
throw new Error("Canvas or scene element not found");
|
|
@@ -30107,7 +30166,7 @@ var HtmlInCanvasInner = forwardRef9(({
|
|
|
30107
30166
|
const resolvedDuration = durationInFrames ?? videoDuration;
|
|
30108
30167
|
const memoizedEffectDefinitions = useMemoizedEffectDefinitions(effects);
|
|
30109
30168
|
const actualRef = useRef22(null);
|
|
30110
|
-
const setCanvasRef =
|
|
30169
|
+
const setCanvasRef = useCallback16((node) => {
|
|
30111
30170
|
actualRef.current = node;
|
|
30112
30171
|
if (typeof ref === "function") {
|
|
30113
30172
|
ref(node);
|
|
@@ -30142,11 +30201,13 @@ HtmlInCanvasInner.displayName = "HtmlInCanvas";
|
|
|
30142
30201
|
var htmlInCanvasSchema = {
|
|
30143
30202
|
durationInFrames: durationInFramesField,
|
|
30144
30203
|
from: fromField,
|
|
30204
|
+
freeze: freezeField,
|
|
30145
30205
|
...sequenceVisualStyleSchema,
|
|
30146
30206
|
hidden: hiddenField
|
|
30147
30207
|
};
|
|
30148
30208
|
var HtmlInCanvasWrapped = wrapInSchema({
|
|
30149
30209
|
Component: HtmlInCanvasInner,
|
|
30210
|
+
componentIdentity: "dev.remotion.remotion.HtmlInCanvas",
|
|
30150
30211
|
schema: htmlInCanvasSchema,
|
|
30151
30212
|
supportsEffects: true
|
|
30152
30213
|
});
|
|
@@ -30164,6 +30225,7 @@ function truncateSrcForLabel(src) {
|
|
|
30164
30225
|
var canvasImageSchema = {
|
|
30165
30226
|
durationInFrames: durationInFramesField,
|
|
30166
30227
|
from: fromField,
|
|
30228
|
+
freeze: freezeField,
|
|
30167
30229
|
fit: {
|
|
30168
30230
|
type: "enum",
|
|
30169
30231
|
default: "fill",
|
|
@@ -30269,7 +30331,7 @@ var CanvasImageContent = forwardRef10(({
|
|
|
30269
30331
|
}
|
|
30270
30332
|
return document.createElement("canvas");
|
|
30271
30333
|
}, []);
|
|
30272
|
-
const canvasRef =
|
|
30334
|
+
const canvasRef = useCallback17((canvas) => {
|
|
30273
30335
|
setOutputCanvas(canvas);
|
|
30274
30336
|
if (refForOutline) {
|
|
30275
30337
|
refForOutline.current = canvas;
|
|
@@ -30416,6 +30478,7 @@ var CanvasImageInner = forwardRef10(({
|
|
|
30416
30478
|
delayRenderTimeoutInMilliseconds,
|
|
30417
30479
|
durationInFrames,
|
|
30418
30480
|
from,
|
|
30481
|
+
freeze,
|
|
30419
30482
|
hidden,
|
|
30420
30483
|
name,
|
|
30421
30484
|
showInTimeline,
|
|
@@ -30437,6 +30500,7 @@ var CanvasImageInner = forwardRef10(({
|
|
|
30437
30500
|
layout: "none",
|
|
30438
30501
|
from: from ?? 0,
|
|
30439
30502
|
durationInFrames: durationInFrames ?? Infinity,
|
|
30503
|
+
freeze,
|
|
30440
30504
|
hidden,
|
|
30441
30505
|
showInTimeline: showInTimeline ?? true,
|
|
30442
30506
|
name: name ?? "<CanvasImage>",
|
|
@@ -30469,6 +30533,7 @@ var CanvasImageInner = forwardRef10(({
|
|
|
30469
30533
|
});
|
|
30470
30534
|
var CanvasImage = wrapInSchema({
|
|
30471
30535
|
Component: CanvasImageInner,
|
|
30536
|
+
componentIdentity: "dev.remotion.remotion.CanvasImage",
|
|
30472
30537
|
schema: canvasImageSchema,
|
|
30473
30538
|
supportsEffects: true
|
|
30474
30539
|
});
|
|
@@ -30486,11 +30551,11 @@ var IFrameRefForwarding = ({
|
|
|
30486
30551
|
retries: delayRenderRetries ?? undefined,
|
|
30487
30552
|
timeoutInMilliseconds: delayRenderTimeoutInMilliseconds ?? undefined
|
|
30488
30553
|
}));
|
|
30489
|
-
const didLoad =
|
|
30554
|
+
const didLoad = useCallback18((e) => {
|
|
30490
30555
|
continueRender2(handle);
|
|
30491
30556
|
onLoad?.(e);
|
|
30492
30557
|
}, [handle, onLoad, continueRender2]);
|
|
30493
|
-
const didGetError =
|
|
30558
|
+
const didGetError = useCallback18((e) => {
|
|
30494
30559
|
continueRender2(handle);
|
|
30495
30560
|
if (onError) {
|
|
30496
30561
|
onError(e);
|
|
@@ -30532,7 +30597,7 @@ var ImgContent = ({
|
|
|
30532
30597
|
if (!_propsValid) {
|
|
30533
30598
|
throw new Error("typecheck error");
|
|
30534
30599
|
}
|
|
30535
|
-
const imageCallbackRef =
|
|
30600
|
+
const imageCallbackRef = useCallback19((img) => {
|
|
30536
30601
|
imageRef.current = img;
|
|
30537
30602
|
refForOutline.current = img;
|
|
30538
30603
|
if (typeof ref === "function") {
|
|
@@ -30542,7 +30607,7 @@ var ImgContent = ({
|
|
|
30542
30607
|
}
|
|
30543
30608
|
}, [ref, refForOutline]);
|
|
30544
30609
|
const actualSrc = usePreload(src);
|
|
30545
|
-
const retryIn =
|
|
30610
|
+
const retryIn = useCallback19((timeout) => {
|
|
30546
30611
|
if (!imageRef.current) {
|
|
30547
30612
|
return;
|
|
30548
30613
|
}
|
|
@@ -30560,7 +30625,7 @@ var ImgContent = ({
|
|
|
30560
30625
|
}, timeout);
|
|
30561
30626
|
}, []);
|
|
30562
30627
|
const { delayRender: delayRender2, continueRender: continueRender2, cancelRender: cancelRender2 } = useDelayRender();
|
|
30563
|
-
const didGetError =
|
|
30628
|
+
const didGetError = useCallback19((e) => {
|
|
30564
30629
|
if (!errors.current) {
|
|
30565
30630
|
return;
|
|
30566
30631
|
}
|
|
@@ -30670,6 +30735,7 @@ var NativeImgInner = ({
|
|
|
30670
30735
|
src,
|
|
30671
30736
|
from,
|
|
30672
30737
|
durationInFrames,
|
|
30738
|
+
freeze,
|
|
30673
30739
|
_experimentalControls: controls,
|
|
30674
30740
|
_remotionInternalRefForOutline: refForOutline,
|
|
30675
30741
|
...props2
|
|
@@ -30681,6 +30747,7 @@ var NativeImgInner = ({
|
|
|
30681
30747
|
layout: "none",
|
|
30682
30748
|
from: from ?? 0,
|
|
30683
30749
|
durationInFrames: durationInFrames ?? Infinity,
|
|
30750
|
+
freeze,
|
|
30684
30751
|
_remotionInternalStack: stack,
|
|
30685
30752
|
_remotionInternalDocumentationLink: "https://www.remotion.dev/docs/img",
|
|
30686
30753
|
_remotionInternalIsMedia: { type: "image", src },
|
|
@@ -30700,6 +30767,7 @@ var CanvasImageWithPrivateProps = CanvasImage;
|
|
|
30700
30767
|
var imgSchema = {
|
|
30701
30768
|
durationInFrames: durationInFramesField,
|
|
30702
30769
|
from: fromField,
|
|
30770
|
+
freeze: freezeField,
|
|
30703
30771
|
...sequenceVisualStyleSchema,
|
|
30704
30772
|
hidden: hiddenField
|
|
30705
30773
|
};
|
|
@@ -30755,6 +30823,7 @@ var ImgInner = ({
|
|
|
30755
30823
|
src,
|
|
30756
30824
|
from,
|
|
30757
30825
|
durationInFrames,
|
|
30826
|
+
freeze,
|
|
30758
30827
|
_experimentalControls: controls,
|
|
30759
30828
|
width,
|
|
30760
30829
|
height,
|
|
@@ -30779,6 +30848,7 @@ var ImgInner = ({
|
|
|
30779
30848
|
src,
|
|
30780
30849
|
from,
|
|
30781
30850
|
durationInFrames,
|
|
30851
|
+
freeze,
|
|
30782
30852
|
_experimentalControls: controls,
|
|
30783
30853
|
width,
|
|
30784
30854
|
height,
|
|
@@ -30820,6 +30890,7 @@ var ImgInner = ({
|
|
|
30820
30890
|
delayRenderTimeoutInMilliseconds,
|
|
30821
30891
|
from,
|
|
30822
30892
|
durationInFrames,
|
|
30893
|
+
freeze,
|
|
30823
30894
|
hidden,
|
|
30824
30895
|
name: name ?? "<Img>",
|
|
30825
30896
|
showInTimeline,
|
|
@@ -30832,6 +30903,7 @@ var ImgInner = ({
|
|
|
30832
30903
|
};
|
|
30833
30904
|
var Img = wrapInSchema({
|
|
30834
30905
|
Component: ImgInner,
|
|
30906
|
+
componentIdentity: "dev.remotion.remotion.Img",
|
|
30835
30907
|
schema: imgSchema,
|
|
30836
30908
|
supportsEffects: true
|
|
30837
30909
|
});
|
|
@@ -30839,6 +30911,7 @@ addSequenceStackTraces(Img);
|
|
|
30839
30911
|
var interactiveElementSchema = {
|
|
30840
30912
|
durationInFrames: durationInFramesField,
|
|
30841
30913
|
from: fromField,
|
|
30914
|
+
freeze: freezeField,
|
|
30842
30915
|
...sequenceVisualStyleSchema,
|
|
30843
30916
|
hidden: hiddenField
|
|
30844
30917
|
};
|
|
@@ -30854,6 +30927,7 @@ var makeInteractiveElement = (tag, displayName) => {
|
|
|
30854
30927
|
const {
|
|
30855
30928
|
durationInFrames,
|
|
30856
30929
|
from,
|
|
30930
|
+
freeze,
|
|
30857
30931
|
hidden,
|
|
30858
30932
|
name,
|
|
30859
30933
|
showInTimeline,
|
|
@@ -30862,7 +30936,7 @@ var makeInteractiveElement = (tag, displayName) => {
|
|
|
30862
30936
|
...props2
|
|
30863
30937
|
} = propsWithControls;
|
|
30864
30938
|
const refForOutline = useRef25(null);
|
|
30865
|
-
const callbackRef =
|
|
30939
|
+
const callbackRef = useCallback20((element) => {
|
|
30866
30940
|
refForOutline.current = element;
|
|
30867
30941
|
setRef(ref, element);
|
|
30868
30942
|
}, [ref]);
|
|
@@ -30870,6 +30944,7 @@ var makeInteractiveElement = (tag, displayName) => {
|
|
|
30870
30944
|
layout: "none",
|
|
30871
30945
|
from: from ?? 0,
|
|
30872
30946
|
durationInFrames: durationInFrames ?? Infinity,
|
|
30947
|
+
freeze,
|
|
30873
30948
|
hidden,
|
|
30874
30949
|
name: name ?? displayName,
|
|
30875
30950
|
showInTimeline: showInTimeline ?? true,
|
|
@@ -30886,6 +30961,7 @@ var makeInteractiveElement = (tag, displayName) => {
|
|
|
30886
30961
|
Inner.displayName = displayName;
|
|
30887
30962
|
const Wrapped = wrapInSchema({
|
|
30888
30963
|
Component: Inner,
|
|
30964
|
+
componentIdentity: `dev.remotion.remotion.${displayName.slice(1, -1)}`,
|
|
30889
30965
|
schema: interactiveElementSchema,
|
|
30890
30966
|
supportsEffects: false
|
|
30891
30967
|
});
|
|
@@ -30942,14 +31018,14 @@ var CompositionManagerProvider = ({
|
|
|
30942
31018
|
const [canvasContent, setCanvasContent] = useState18(initialCanvasContent);
|
|
30943
31019
|
const [compositions, setCompositions] = useState18(initialCompositions);
|
|
30944
31020
|
const currentcompositionsRef = useRef26(compositions);
|
|
30945
|
-
const updateCompositions =
|
|
31021
|
+
const updateCompositions = useCallback21((updateComps) => {
|
|
30946
31022
|
setCompositions((comps) => {
|
|
30947
31023
|
const updated = updateComps(comps);
|
|
30948
31024
|
currentcompositionsRef.current = updated;
|
|
30949
31025
|
return updated;
|
|
30950
31026
|
});
|
|
30951
31027
|
}, []);
|
|
30952
|
-
const registerComposition =
|
|
31028
|
+
const registerComposition = useCallback21((comp) => {
|
|
30953
31029
|
updateCompositions((comps) => {
|
|
30954
31030
|
if (comps.find((c2) => c2.id === comp.id)) {
|
|
30955
31031
|
throw new Error(`Multiple composition with id ${comp.id} are registered.`);
|
|
@@ -30957,12 +31033,12 @@ var CompositionManagerProvider = ({
|
|
|
30957
31033
|
return [...comps, comp];
|
|
30958
31034
|
});
|
|
30959
31035
|
}, [updateCompositions]);
|
|
30960
|
-
const unregisterComposition =
|
|
31036
|
+
const unregisterComposition = useCallback21((id) => {
|
|
30961
31037
|
setCompositions((comps) => {
|
|
30962
31038
|
return comps.filter((c2) => c2.id !== id);
|
|
30963
31039
|
});
|
|
30964
31040
|
}, []);
|
|
30965
|
-
const registerFolder =
|
|
31041
|
+
const registerFolder = useCallback21((name, parent, nonce, stack) => {
|
|
30966
31042
|
setFolders((prevFolders) => {
|
|
30967
31043
|
return [
|
|
30968
31044
|
...prevFolders,
|
|
@@ -30975,7 +31051,7 @@ var CompositionManagerProvider = ({
|
|
|
30975
31051
|
];
|
|
30976
31052
|
});
|
|
30977
31053
|
}, []);
|
|
30978
|
-
const unregisterFolder =
|
|
31054
|
+
const unregisterFolder = useCallback21((name, parent) => {
|
|
30979
31055
|
setFolders((prevFolders) => {
|
|
30980
31056
|
return prevFolders.filter((p) => !(p.name === name && p.parent === parent));
|
|
30981
31057
|
});
|
|
@@ -31614,7 +31690,7 @@ var OffthreadVideoForRendering = ({
|
|
|
31614
31690
|
continueRender2,
|
|
31615
31691
|
delayRender2
|
|
31616
31692
|
]);
|
|
31617
|
-
const onErr =
|
|
31693
|
+
const onErr = useCallback22(() => {
|
|
31618
31694
|
if (onError) {
|
|
31619
31695
|
onError?.(new Error("Failed to load image with src " + imageSrc));
|
|
31620
31696
|
} else {
|
|
@@ -31624,7 +31700,7 @@ var OffthreadVideoForRendering = ({
|
|
|
31624
31700
|
const className = useMemo35(() => {
|
|
31625
31701
|
return [OBJECTFIT_CONTAIN_CLASS_NAME, props2.className].filter(truthy).join(" ");
|
|
31626
31702
|
}, [props2.className]);
|
|
31627
|
-
const onImageFrame =
|
|
31703
|
+
const onImageFrame = useCallback22((img) => {
|
|
31628
31704
|
if (onVideoFrame) {
|
|
31629
31705
|
onVideoFrame(img);
|
|
31630
31706
|
}
|
|
@@ -31757,7 +31833,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
31757
31833
|
mediaVolume
|
|
31758
31834
|
});
|
|
31759
31835
|
warnAboutTooHighVolume(userPreferredVolume);
|
|
31760
|
-
const getStack =
|
|
31836
|
+
const getStack = useCallback23(() => {
|
|
31761
31837
|
return _remotionInternalStack ?? null;
|
|
31762
31838
|
}, [_remotionInternalStack]);
|
|
31763
31839
|
useMediaInTimeline({
|
|
@@ -31933,7 +32009,7 @@ var InnerOffthreadVideo = (props2) => {
|
|
|
31933
32009
|
if (environment.isClientSideRendering) {
|
|
31934
32010
|
throw new Error("<OffthreadVideo> is not supported in @remotion/web-renderer. Use <Video> from @remotion/media instead. See https://remotion.dev/docs/client-side-rendering/limitations");
|
|
31935
32011
|
}
|
|
31936
|
-
const onDuration =
|
|
32012
|
+
const onDuration = useCallback24(() => {
|
|
31937
32013
|
return;
|
|
31938
32014
|
}, []);
|
|
31939
32015
|
if (typeof props2.src !== "string") {
|
|
@@ -32312,6 +32388,7 @@ var Internals = {
|
|
|
32312
32388
|
getEffectPropStatusesCtx,
|
|
32313
32389
|
hiddenField,
|
|
32314
32390
|
durationInFramesField,
|
|
32391
|
+
freezeField,
|
|
32315
32392
|
fromField
|
|
32316
32393
|
};
|
|
32317
32394
|
var flattenChildren = (children) => {
|
|
@@ -32397,6 +32474,7 @@ var SeriesInner = (props2) => {
|
|
|
32397
32474
|
};
|
|
32398
32475
|
var Series = Object.assign(wrapInSchema({
|
|
32399
32476
|
Component: SeriesInner,
|
|
32477
|
+
componentIdentity: "dev.remotion.remotion.Series",
|
|
32400
32478
|
schema: sequenceSchemaDefaultLayoutNone,
|
|
32401
32479
|
supportsEffects: false
|
|
32402
32480
|
}), {
|
|
@@ -32861,7 +32939,7 @@ var VideoForwardingFunction = (props2, ref) => {
|
|
|
32861
32939
|
throw new TypeError(`The \`<Html5Video>\` tag requires a string for \`src\`, but got ${JSON.stringify(props2.src)} instead.`);
|
|
32862
32940
|
}
|
|
32863
32941
|
const preloadedSrc = usePreload(props2.src);
|
|
32864
|
-
const onDuration =
|
|
32942
|
+
const onDuration = useCallback25((src, durationInSeconds) => {
|
|
32865
32943
|
setDurations({ type: "got-duration", durationInSeconds, src });
|
|
32866
32944
|
}, [setDurations]);
|
|
32867
32945
|
const durationFetched = durations[getAbsoluteSrc(preloadedSrc)] ?? durations[getAbsoluteSrc(props2.src)];
|
|
@@ -32971,7 +33049,7 @@ addSequenceStackTraces(Composition);
|
|
|
32971
33049
|
addSequenceStackTraces(Folder);
|
|
32972
33050
|
|
|
32973
33051
|
// ../shapes/dist/esm/index.mjs
|
|
32974
|
-
import React, { useCallback as
|
|
33052
|
+
import React, { useCallback as useCallback26, useMemo as useMemo40, useRef as useRef29 } from "react";
|
|
32975
33053
|
import { version } from "react-dom";
|
|
32976
33054
|
import { jsx as jsx40, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
32977
33055
|
import { jsx as jsx210 } from "react/jsx-runtime";
|
|
@@ -32983,6 +33061,7 @@ import { jsx as jsx72 } from "react/jsx-runtime";
|
|
|
32983
33061
|
import { jsx as jsx82 } from "react/jsx-runtime";
|
|
32984
33062
|
import { jsx as jsx92 } from "react/jsx-runtime";
|
|
32985
33063
|
import { jsx as jsx102 } from "react/jsx-runtime";
|
|
33064
|
+
import { jsx as jsx112 } from "react/jsx-runtime";
|
|
32986
33065
|
var unitDir = (from, to) => {
|
|
32987
33066
|
const dx = to[0] - from[0];
|
|
32988
33067
|
const dy = to[1] - from[1];
|
|
@@ -33141,6 +33220,7 @@ var RenderSvg = ({
|
|
|
33141
33220
|
pixelDensity,
|
|
33142
33221
|
durationInFrames,
|
|
33143
33222
|
from,
|
|
33223
|
+
freeze,
|
|
33144
33224
|
hidden,
|
|
33145
33225
|
name,
|
|
33146
33226
|
showInTimeline,
|
|
@@ -33161,10 +33241,10 @@ var RenderSvg = ({
|
|
|
33161
33241
|
};
|
|
33162
33242
|
}, [pathStyle]);
|
|
33163
33243
|
const outlineRef = useRef29(null);
|
|
33164
|
-
const setSvgRef =
|
|
33244
|
+
const setSvgRef = useCallback26((node) => {
|
|
33165
33245
|
outlineRef.current = node;
|
|
33166
33246
|
}, []);
|
|
33167
|
-
const setCanvasRef =
|
|
33247
|
+
const setCanvasRef = useCallback26((canvas) => {
|
|
33168
33248
|
outlineRef.current = canvas;
|
|
33169
33249
|
}, []);
|
|
33170
33250
|
const memoizedEffectDefinitions = Internals.useMemoizedEffectDefinitions(effects);
|
|
@@ -33249,6 +33329,7 @@ var RenderSvg = ({
|
|
|
33249
33329
|
return /* @__PURE__ */ jsx40(Sequence, {
|
|
33250
33330
|
layout: "none",
|
|
33251
33331
|
from,
|
|
33332
|
+
freeze,
|
|
33252
33333
|
hidden,
|
|
33253
33334
|
showInTimeline,
|
|
33254
33335
|
_experimentalControls: controls,
|
|
@@ -33314,6 +33395,7 @@ var enumField = ({
|
|
|
33314
33395
|
var makeShapeSchema = (shapeFields) => {
|
|
33315
33396
|
return {
|
|
33316
33397
|
from: Internals.sequenceSchema.from,
|
|
33398
|
+
freeze: Internals.sequenceSchema.freeze,
|
|
33317
33399
|
durationInFrames: Internals.sequenceSchema.durationInFrames,
|
|
33318
33400
|
...shapeFields,
|
|
33319
33401
|
fill: colorField({
|
|
@@ -33381,10 +33463,435 @@ var ArrowInner = ({
|
|
|
33381
33463
|
};
|
|
33382
33464
|
var Arrow = Internals.wrapInSchema({
|
|
33383
33465
|
Component: ArrowInner,
|
|
33466
|
+
componentIdentity: "dev.remotion.shapes.Arrow",
|
|
33384
33467
|
schema: arrowSchema,
|
|
33385
33468
|
supportsEffects: true
|
|
33386
33469
|
});
|
|
33387
33470
|
Internals.addSequenceStackTraces(Arrow);
|
|
33471
|
+
var shortenVector = (vector, radius) => {
|
|
33472
|
+
const [x, y] = vector;
|
|
33473
|
+
const currentLength = Math.sqrt(x * x + y * y);
|
|
33474
|
+
const scalingFactor = (currentLength - radius) / currentLength;
|
|
33475
|
+
return [x * scalingFactor, y * scalingFactor];
|
|
33476
|
+
};
|
|
33477
|
+
var scaleVectorToLength = (vector, length2) => {
|
|
33478
|
+
const [x, y] = vector;
|
|
33479
|
+
const currentLength = Math.sqrt(x * x + y * y);
|
|
33480
|
+
const scalingFactor = length2 / currentLength;
|
|
33481
|
+
return [x * scalingFactor, y * scalingFactor];
|
|
33482
|
+
};
|
|
33483
|
+
var joinPoints = (points, {
|
|
33484
|
+
edgeRoundness,
|
|
33485
|
+
cornerRadius,
|
|
33486
|
+
roundCornerStrategy
|
|
33487
|
+
}) => {
|
|
33488
|
+
return points.map(([x, y], i) => {
|
|
33489
|
+
const prevPointIndex = i === 0 ? points.length - 2 : i - 1;
|
|
33490
|
+
const prevPoint = points[prevPointIndex];
|
|
33491
|
+
const nextPointIndex = i === points.length - 1 ? 1 : i + 1;
|
|
33492
|
+
const nextPoint = points[nextPointIndex];
|
|
33493
|
+
const middleOfLine = [(x + nextPoint[0]) / 2, (y + nextPoint[1]) / 2];
|
|
33494
|
+
const prevPointMiddleOfLine = [
|
|
33495
|
+
(x + prevPoint[0]) / 2,
|
|
33496
|
+
(y + prevPoint[1]) / 2
|
|
33497
|
+
];
|
|
33498
|
+
const prevVector = [x - prevPoint[0], y - prevPoint[1]];
|
|
33499
|
+
const nextVector = [nextPoint[0] - x, nextPoint[1] - y];
|
|
33500
|
+
if (i === 0) {
|
|
33501
|
+
if (edgeRoundness !== null) {
|
|
33502
|
+
return [
|
|
33503
|
+
{
|
|
33504
|
+
type: "M",
|
|
33505
|
+
x: middleOfLine[0],
|
|
33506
|
+
y: middleOfLine[1]
|
|
33507
|
+
}
|
|
33508
|
+
];
|
|
33509
|
+
}
|
|
33510
|
+
if (cornerRadius !== 0) {
|
|
33511
|
+
const computeRadius = shortenVector(nextVector, cornerRadius);
|
|
33512
|
+
return [
|
|
33513
|
+
{
|
|
33514
|
+
type: "M",
|
|
33515
|
+
x: computeRadius[0] + x,
|
|
33516
|
+
y: computeRadius[1] + y
|
|
33517
|
+
}
|
|
33518
|
+
];
|
|
33519
|
+
}
|
|
33520
|
+
return [
|
|
33521
|
+
{
|
|
33522
|
+
type: "M",
|
|
33523
|
+
x,
|
|
33524
|
+
y
|
|
33525
|
+
}
|
|
33526
|
+
];
|
|
33527
|
+
}
|
|
33528
|
+
if (cornerRadius && edgeRoundness !== null) {
|
|
33529
|
+
throw new Error(`"cornerRadius" and "edgeRoundness" cannot be specified at the same time.`);
|
|
33530
|
+
}
|
|
33531
|
+
if (edgeRoundness === null) {
|
|
33532
|
+
if (cornerRadius === 0) {
|
|
33533
|
+
return [
|
|
33534
|
+
{
|
|
33535
|
+
type: "L",
|
|
33536
|
+
x,
|
|
33537
|
+
y
|
|
33538
|
+
}
|
|
33539
|
+
];
|
|
33540
|
+
}
|
|
33541
|
+
const prevVectorMinusRadius = shortenVector(prevVector, cornerRadius);
|
|
33542
|
+
const prevVectorLength = scaleVectorToLength(prevVector, cornerRadius);
|
|
33543
|
+
const nextVectorMinusRadius = scaleVectorToLength(nextVector, cornerRadius);
|
|
33544
|
+
const firstDraw = [
|
|
33545
|
+
prevPoint[0] + prevVectorMinusRadius[0],
|
|
33546
|
+
prevPoint[1] + prevVectorMinusRadius[1]
|
|
33547
|
+
];
|
|
33548
|
+
return [
|
|
33549
|
+
{
|
|
33550
|
+
type: "L",
|
|
33551
|
+
x: firstDraw[0],
|
|
33552
|
+
y: firstDraw[1]
|
|
33553
|
+
},
|
|
33554
|
+
roundCornerStrategy === "arc" ? {
|
|
33555
|
+
type: "a",
|
|
33556
|
+
rx: cornerRadius,
|
|
33557
|
+
ry: cornerRadius,
|
|
33558
|
+
xAxisRotation: 0,
|
|
33559
|
+
dx: prevVectorLength[0] + nextVectorMinusRadius[0],
|
|
33560
|
+
dy: prevVectorLength[1] + nextVectorMinusRadius[1],
|
|
33561
|
+
largeArcFlag: false,
|
|
33562
|
+
sweepFlag: true
|
|
33563
|
+
} : {
|
|
33564
|
+
type: "C",
|
|
33565
|
+
x: firstDraw[0] + prevVectorLength[0] + nextVectorMinusRadius[0],
|
|
33566
|
+
y: firstDraw[1] + prevVectorLength[1] + nextVectorMinusRadius[1],
|
|
33567
|
+
cp1x: x,
|
|
33568
|
+
cp1y: y,
|
|
33569
|
+
cp2x: x,
|
|
33570
|
+
cp2y: y
|
|
33571
|
+
}
|
|
33572
|
+
];
|
|
33573
|
+
}
|
|
33574
|
+
const controlPoint1 = [
|
|
33575
|
+
prevPointMiddleOfLine[0] + prevVector[0] * edgeRoundness * 0.5,
|
|
33576
|
+
prevPointMiddleOfLine[1] + prevVector[1] * edgeRoundness * 0.5
|
|
33577
|
+
];
|
|
33578
|
+
const controlPoint2 = [
|
|
33579
|
+
middleOfLine[0] - nextVector[0] * edgeRoundness * 0.5,
|
|
33580
|
+
middleOfLine[1] - nextVector[1] * edgeRoundness * 0.5
|
|
33581
|
+
];
|
|
33582
|
+
return [
|
|
33583
|
+
{
|
|
33584
|
+
type: "C",
|
|
33585
|
+
cp1x: controlPoint1[0],
|
|
33586
|
+
cp1y: controlPoint1[1],
|
|
33587
|
+
cp2x: controlPoint2[0],
|
|
33588
|
+
cp2y: controlPoint2[1],
|
|
33589
|
+
x: middleOfLine[0],
|
|
33590
|
+
y: middleOfLine[1]
|
|
33591
|
+
}
|
|
33592
|
+
];
|
|
33593
|
+
}).flat(1);
|
|
33594
|
+
};
|
|
33595
|
+
var ensurePositive = (name, value) => {
|
|
33596
|
+
if (typeof value !== "number" || value <= 0) {
|
|
33597
|
+
throw new Error(`"${name}" must be a positive number, got ${value}`);
|
|
33598
|
+
}
|
|
33599
|
+
};
|
|
33600
|
+
var pointerInterval = ({
|
|
33601
|
+
availableLength,
|
|
33602
|
+
pointerBaseWidth,
|
|
33603
|
+
pointerPosition
|
|
33604
|
+
}) => {
|
|
33605
|
+
const center = availableLength * pointerPosition;
|
|
33606
|
+
const half = pointerBaseWidth / 2;
|
|
33607
|
+
return {
|
|
33608
|
+
center,
|
|
33609
|
+
start: Math.max(0, center - half),
|
|
33610
|
+
end: Math.min(availableLength, center + half)
|
|
33611
|
+
};
|
|
33612
|
+
};
|
|
33613
|
+
var areSamePoint = (a2, b2) => {
|
|
33614
|
+
return a2[0] === b2[0] && a2[1] === b2[1];
|
|
33615
|
+
};
|
|
33616
|
+
var normalizeClosedPoints = (points) => {
|
|
33617
|
+
const deduplicated = points.reduce((acc, entry) => {
|
|
33618
|
+
const previous = acc[acc.length - 1];
|
|
33619
|
+
if (previous && areSamePoint(previous.point, entry.point)) {
|
|
33620
|
+
acc[acc.length - 1] = {
|
|
33621
|
+
point: previous.point,
|
|
33622
|
+
round: previous.round && entry.round
|
|
33623
|
+
};
|
|
33624
|
+
return acc;
|
|
33625
|
+
}
|
|
33626
|
+
return [...acc, entry];
|
|
33627
|
+
}, []);
|
|
33628
|
+
if (deduplicated.length === 0) {
|
|
33629
|
+
return deduplicated;
|
|
33630
|
+
}
|
|
33631
|
+
const first = deduplicated[0];
|
|
33632
|
+
const last = deduplicated[deduplicated.length - 1];
|
|
33633
|
+
if (areSamePoint(first.point, last.point)) {
|
|
33634
|
+
const [firstEntry, ...rest] = deduplicated;
|
|
33635
|
+
const withoutLast = rest.slice(0, -1);
|
|
33636
|
+
const mergedFirst = {
|
|
33637
|
+
point: firstEntry.point,
|
|
33638
|
+
round: firstEntry.round && last.round
|
|
33639
|
+
};
|
|
33640
|
+
return [mergedFirst, ...withoutLast, mergedFirst];
|
|
33641
|
+
}
|
|
33642
|
+
return [...deduplicated, first];
|
|
33643
|
+
};
|
|
33644
|
+
var unitDir2 = (from, to) => {
|
|
33645
|
+
const dx = to[0] - from[0];
|
|
33646
|
+
const dy = to[1] - from[1];
|
|
33647
|
+
const len = Math.sqrt(dx * dx + dy * dy);
|
|
33648
|
+
if (len === 0) {
|
|
33649
|
+
return [0, 0];
|
|
33650
|
+
}
|
|
33651
|
+
return [dx / len, dy / len];
|
|
33652
|
+
};
|
|
33653
|
+
var makeInstructions2 = ({
|
|
33654
|
+
points,
|
|
33655
|
+
edgeRoundness,
|
|
33656
|
+
cornerRadius
|
|
33657
|
+
}) => {
|
|
33658
|
+
const rawPoints = points.map((p) => p.point);
|
|
33659
|
+
if (edgeRoundness !== null || cornerRadius === 0) {
|
|
33660
|
+
return [
|
|
33661
|
+
...joinPoints(rawPoints, {
|
|
33662
|
+
edgeRoundness,
|
|
33663
|
+
cornerRadius,
|
|
33664
|
+
roundCornerStrategy: "arc"
|
|
33665
|
+
}),
|
|
33666
|
+
{
|
|
33667
|
+
type: "Z"
|
|
33668
|
+
}
|
|
33669
|
+
];
|
|
33670
|
+
}
|
|
33671
|
+
const uniquePoints = areSamePoint(points[0].point, points[points.length - 1].point) ? points.slice(0, -1) : points;
|
|
33672
|
+
const firstPoint = uniquePoints[0];
|
|
33673
|
+
const startDir = firstPoint.round ? unitDir2(uniquePoints[0].point, uniquePoints[1].point) : null;
|
|
33674
|
+
const startPoint = startDir ? [
|
|
33675
|
+
firstPoint.point[0] + startDir[0] * cornerRadius,
|
|
33676
|
+
firstPoint.point[1] + startDir[1] * cornerRadius
|
|
33677
|
+
] : firstPoint.point;
|
|
33678
|
+
const instructions = [
|
|
33679
|
+
{ type: "M", x: startPoint[0], y: startPoint[1] }
|
|
33680
|
+
];
|
|
33681
|
+
for (let i = 1;i < uniquePoints.length; i++) {
|
|
33682
|
+
const current = uniquePoints[i];
|
|
33683
|
+
if (!current.round) {
|
|
33684
|
+
instructions.push({
|
|
33685
|
+
type: "L",
|
|
33686
|
+
x: current.point[0],
|
|
33687
|
+
y: current.point[1]
|
|
33688
|
+
});
|
|
33689
|
+
continue;
|
|
33690
|
+
}
|
|
33691
|
+
const previous = uniquePoints[i - 1].point;
|
|
33692
|
+
const next = uniquePoints[(i + 1) % uniquePoints.length].point;
|
|
33693
|
+
const incoming = unitDir2(previous, current.point);
|
|
33694
|
+
const outgoing = unitDir2(current.point, next);
|
|
33695
|
+
const arcStart = [
|
|
33696
|
+
current.point[0] - incoming[0] * cornerRadius,
|
|
33697
|
+
current.point[1] - incoming[1] * cornerRadius
|
|
33698
|
+
];
|
|
33699
|
+
instructions.push({
|
|
33700
|
+
type: "L",
|
|
33701
|
+
x: arcStart[0],
|
|
33702
|
+
y: arcStart[1]
|
|
33703
|
+
}, {
|
|
33704
|
+
type: "a",
|
|
33705
|
+
rx: cornerRadius,
|
|
33706
|
+
ry: cornerRadius,
|
|
33707
|
+
xAxisRotation: 0,
|
|
33708
|
+
dx: incoming[0] * cornerRadius + outgoing[0] * cornerRadius,
|
|
33709
|
+
dy: incoming[1] * cornerRadius + outgoing[1] * cornerRadius,
|
|
33710
|
+
largeArcFlag: false,
|
|
33711
|
+
sweepFlag: true
|
|
33712
|
+
});
|
|
33713
|
+
}
|
|
33714
|
+
if (firstPoint.round) {
|
|
33715
|
+
const previous = uniquePoints[uniquePoints.length - 1].point;
|
|
33716
|
+
const incoming = unitDir2(previous, firstPoint.point);
|
|
33717
|
+
instructions.push({
|
|
33718
|
+
type: "L",
|
|
33719
|
+
x: firstPoint.point[0] - incoming[0] * cornerRadius,
|
|
33720
|
+
y: firstPoint.point[1] - incoming[1] * cornerRadius
|
|
33721
|
+
}, {
|
|
33722
|
+
type: "a",
|
|
33723
|
+
rx: cornerRadius,
|
|
33724
|
+
ry: cornerRadius,
|
|
33725
|
+
xAxisRotation: 0,
|
|
33726
|
+
dx: incoming[0] * cornerRadius + startDir[0] * cornerRadius,
|
|
33727
|
+
dy: incoming[1] * cornerRadius + startDir[1] * cornerRadius,
|
|
33728
|
+
largeArcFlag: false,
|
|
33729
|
+
sweepFlag: true
|
|
33730
|
+
});
|
|
33731
|
+
}
|
|
33732
|
+
instructions.push({ type: "Z" });
|
|
33733
|
+
return instructions;
|
|
33734
|
+
};
|
|
33735
|
+
var makeCallout = ({
|
|
33736
|
+
width = 500,
|
|
33737
|
+
height = 200,
|
|
33738
|
+
pointerLength = 40,
|
|
33739
|
+
pointerBaseWidth = 60,
|
|
33740
|
+
pointerPosition = 0.5,
|
|
33741
|
+
pointerDirection = "down",
|
|
33742
|
+
edgeRoundness = null,
|
|
33743
|
+
cornerRadius = 0
|
|
33744
|
+
}) => {
|
|
33745
|
+
ensurePositive("width", width);
|
|
33746
|
+
ensurePositive("height", height);
|
|
33747
|
+
ensurePositive("pointerLength", pointerLength);
|
|
33748
|
+
ensurePositive("pointerBaseWidth", pointerBaseWidth);
|
|
33749
|
+
if (typeof pointerPosition !== "number" || pointerPosition < 0 || pointerPosition > 1) {
|
|
33750
|
+
throw new Error(`"pointerPosition" must be a number between 0 and 1, got ${pointerPosition}`);
|
|
33751
|
+
}
|
|
33752
|
+
const horizontalInterval = pointerInterval({
|
|
33753
|
+
availableLength: width,
|
|
33754
|
+
pointerBaseWidth,
|
|
33755
|
+
pointerPosition
|
|
33756
|
+
});
|
|
33757
|
+
const verticalInterval = pointerInterval({
|
|
33758
|
+
availableLength: height,
|
|
33759
|
+
pointerBaseWidth,
|
|
33760
|
+
pointerPosition
|
|
33761
|
+
});
|
|
33762
|
+
const pointsByDirection = {
|
|
33763
|
+
up: [
|
|
33764
|
+
{ point: [0, pointerLength], round: true },
|
|
33765
|
+
{ point: [horizontalInterval.start, pointerLength], round: false },
|
|
33766
|
+
{ point: [horizontalInterval.center, 0], round: false },
|
|
33767
|
+
{ point: [horizontalInterval.end, pointerLength], round: false },
|
|
33768
|
+
{ point: [width, pointerLength], round: true },
|
|
33769
|
+
{ point: [width, height + pointerLength], round: true },
|
|
33770
|
+
{ point: [0, height + pointerLength], round: true },
|
|
33771
|
+
{ point: [0, pointerLength], round: true }
|
|
33772
|
+
],
|
|
33773
|
+
down: [
|
|
33774
|
+
{ point: [0, 0], round: true },
|
|
33775
|
+
{ point: [width, 0], round: true },
|
|
33776
|
+
{ point: [width, height], round: true },
|
|
33777
|
+
{ point: [horizontalInterval.end, height], round: false },
|
|
33778
|
+
{
|
|
33779
|
+
point: [horizontalInterval.center, height + pointerLength],
|
|
33780
|
+
round: false
|
|
33781
|
+
},
|
|
33782
|
+
{ point: [horizontalInterval.start, height], round: false },
|
|
33783
|
+
{ point: [0, height], round: true },
|
|
33784
|
+
{ point: [0, 0], round: true }
|
|
33785
|
+
],
|
|
33786
|
+
left: [
|
|
33787
|
+
{ point: [pointerLength, 0], round: true },
|
|
33788
|
+
{ point: [width + pointerLength, 0], round: true },
|
|
33789
|
+
{ point: [width + pointerLength, height], round: true },
|
|
33790
|
+
{ point: [pointerLength, height], round: true },
|
|
33791
|
+
{ point: [pointerLength, verticalInterval.end], round: false },
|
|
33792
|
+
{ point: [0, verticalInterval.center], round: false },
|
|
33793
|
+
{ point: [pointerLength, verticalInterval.start], round: false },
|
|
33794
|
+
{ point: [pointerLength, 0], round: true }
|
|
33795
|
+
],
|
|
33796
|
+
right: [
|
|
33797
|
+
{ point: [0, 0], round: true },
|
|
33798
|
+
{ point: [width, 0], round: true },
|
|
33799
|
+
{ point: [width, verticalInterval.start], round: false },
|
|
33800
|
+
{ point: [width + pointerLength, verticalInterval.center], round: false },
|
|
33801
|
+
{ point: [width, verticalInterval.end], round: false },
|
|
33802
|
+
{ point: [width, height], round: true },
|
|
33803
|
+
{ point: [0, height], round: true },
|
|
33804
|
+
{ point: [0, 0], round: true }
|
|
33805
|
+
]
|
|
33806
|
+
};
|
|
33807
|
+
const points = normalizeClosedPoints(pointsByDirection[pointerDirection]);
|
|
33808
|
+
const instructions = makeInstructions2({ points, edgeRoundness, cornerRadius });
|
|
33809
|
+
const path = serializeInstructions(instructions);
|
|
33810
|
+
const shapeWidth = pointerDirection === "left" || pointerDirection === "right" ? width + pointerLength : width;
|
|
33811
|
+
const shapeHeight = pointerDirection === "up" || pointerDirection === "down" ? height + pointerLength : height;
|
|
33812
|
+
const bodyX = pointerDirection === "left" ? pointerLength : 0;
|
|
33813
|
+
const bodyY = pointerDirection === "up" ? pointerLength : 0;
|
|
33814
|
+
return {
|
|
33815
|
+
width: shapeWidth,
|
|
33816
|
+
height: shapeHeight,
|
|
33817
|
+
instructions,
|
|
33818
|
+
path,
|
|
33819
|
+
transformOrigin: `${bodyX + width / 2} ${bodyY + height / 2}`
|
|
33820
|
+
};
|
|
33821
|
+
};
|
|
33822
|
+
var calloutSchema = makeShapeSchema({
|
|
33823
|
+
width: numberField({
|
|
33824
|
+
defaultValue: 500,
|
|
33825
|
+
description: "Width",
|
|
33826
|
+
min: 1
|
|
33827
|
+
}),
|
|
33828
|
+
height: numberField({
|
|
33829
|
+
defaultValue: 200,
|
|
33830
|
+
description: "Height",
|
|
33831
|
+
min: 1
|
|
33832
|
+
}),
|
|
33833
|
+
pointerLength: numberField({
|
|
33834
|
+
defaultValue: 40,
|
|
33835
|
+
description: "Pointer Length",
|
|
33836
|
+
min: 1
|
|
33837
|
+
}),
|
|
33838
|
+
pointerBaseWidth: numberField({
|
|
33839
|
+
defaultValue: 60,
|
|
33840
|
+
description: "Pointer Base Width",
|
|
33841
|
+
min: 1
|
|
33842
|
+
}),
|
|
33843
|
+
pointerPosition: numberField({
|
|
33844
|
+
defaultValue: 0.5,
|
|
33845
|
+
description: "Pointer Position",
|
|
33846
|
+
min: 0,
|
|
33847
|
+
max: 1,
|
|
33848
|
+
step: 0.01
|
|
33849
|
+
}),
|
|
33850
|
+
pointerDirection: enumField({
|
|
33851
|
+
defaultValue: "down",
|
|
33852
|
+
description: "Pointer Direction",
|
|
33853
|
+
variants: ["up", "down", "left", "right"]
|
|
33854
|
+
}),
|
|
33855
|
+
cornerRadius: numberField({
|
|
33856
|
+
defaultValue: 0,
|
|
33857
|
+
description: "Corner Radius",
|
|
33858
|
+
min: 0
|
|
33859
|
+
})
|
|
33860
|
+
});
|
|
33861
|
+
var CalloutInner = ({
|
|
33862
|
+
width,
|
|
33863
|
+
height,
|
|
33864
|
+
pointerLength,
|
|
33865
|
+
pointerBaseWidth,
|
|
33866
|
+
pointerPosition,
|
|
33867
|
+
pointerDirection,
|
|
33868
|
+
edgeRoundness,
|
|
33869
|
+
cornerRadius,
|
|
33870
|
+
...props
|
|
33871
|
+
}) => {
|
|
33872
|
+
return /* @__PURE__ */ jsx310(RenderSvg, {
|
|
33873
|
+
defaultName: "<Callout>",
|
|
33874
|
+
documentationLink: "https://www.remotion.dev/docs/shapes/callout",
|
|
33875
|
+
...makeCallout({
|
|
33876
|
+
width,
|
|
33877
|
+
height,
|
|
33878
|
+
pointerLength,
|
|
33879
|
+
pointerBaseWidth,
|
|
33880
|
+
pointerPosition,
|
|
33881
|
+
pointerDirection,
|
|
33882
|
+
edgeRoundness,
|
|
33883
|
+
cornerRadius
|
|
33884
|
+
}),
|
|
33885
|
+
...props
|
|
33886
|
+
});
|
|
33887
|
+
};
|
|
33888
|
+
var Callout = Internals.wrapInSchema({
|
|
33889
|
+
Component: CalloutInner,
|
|
33890
|
+
componentIdentity: "dev.remotion.shapes.Callout",
|
|
33891
|
+
schema: calloutSchema,
|
|
33892
|
+
supportsEffects: true
|
|
33893
|
+
});
|
|
33894
|
+
Internals.addSequenceStackTraces(Callout);
|
|
33388
33895
|
var makeCircle = ({ radius }) => {
|
|
33389
33896
|
const instructions = [
|
|
33390
33897
|
{
|
|
@@ -33433,7 +33940,7 @@ var circleSchema = makeShapeSchema({
|
|
|
33433
33940
|
})
|
|
33434
33941
|
});
|
|
33435
33942
|
var CircleInner = ({ radius, ...props }) => {
|
|
33436
|
-
return /* @__PURE__ */
|
|
33943
|
+
return /* @__PURE__ */ jsx42(RenderSvg, {
|
|
33437
33944
|
defaultName: "<Circle>",
|
|
33438
33945
|
documentationLink: "https://www.remotion.dev/docs/shapes/circle",
|
|
33439
33946
|
...makeCircle({ radius }),
|
|
@@ -33442,6 +33949,7 @@ var CircleInner = ({ radius, ...props }) => {
|
|
|
33442
33949
|
};
|
|
33443
33950
|
var Circle = Internals.wrapInSchema({
|
|
33444
33951
|
Component: CircleInner,
|
|
33952
|
+
componentIdentity: "dev.remotion.shapes.Circle",
|
|
33445
33953
|
schema: circleSchema,
|
|
33446
33954
|
supportsEffects: true
|
|
33447
33955
|
});
|
|
@@ -33489,7 +33997,7 @@ var ellipseSchema = makeShapeSchema({
|
|
|
33489
33997
|
})
|
|
33490
33998
|
});
|
|
33491
33999
|
var EllipseInner = ({ rx, ry, ...props }) => {
|
|
33492
|
-
return /* @__PURE__ */
|
|
34000
|
+
return /* @__PURE__ */ jsx52(RenderSvg, {
|
|
33493
34001
|
defaultName: "<Ellipse>",
|
|
33494
34002
|
documentationLink: "https://www.remotion.dev/docs/shapes/ellipse",
|
|
33495
34003
|
...makeEllipse({ rx, ry }),
|
|
@@ -33498,6 +34006,7 @@ var EllipseInner = ({ rx, ry, ...props }) => {
|
|
|
33498
34006
|
};
|
|
33499
34007
|
var Ellipse = Internals.wrapInSchema({
|
|
33500
34008
|
Component: EllipseInner,
|
|
34009
|
+
componentIdentity: "dev.remotion.shapes.Ellipse",
|
|
33501
34010
|
schema: ellipseSchema,
|
|
33502
34011
|
supportsEffects: true
|
|
33503
34012
|
});
|
|
@@ -33621,7 +34130,7 @@ var HeartInner = ({
|
|
|
33621
34130
|
depthAdjustment = 0,
|
|
33622
34131
|
...props
|
|
33623
34132
|
}) => {
|
|
33624
|
-
return /* @__PURE__ */
|
|
34133
|
+
return /* @__PURE__ */ jsx62(RenderSvg, {
|
|
33625
34134
|
defaultName: "<Heart>",
|
|
33626
34135
|
documentationLink: "https://www.remotion.dev/docs/shapes/heart",
|
|
33627
34136
|
...makeHeart({
|
|
@@ -33635,6 +34144,7 @@ var HeartInner = ({
|
|
|
33635
34144
|
};
|
|
33636
34145
|
var Heart = Internals.wrapInSchema({
|
|
33637
34146
|
Component: HeartInner,
|
|
34147
|
+
componentIdentity: "dev.remotion.shapes.Heart",
|
|
33638
34148
|
schema: heartSchema,
|
|
33639
34149
|
supportsEffects: true
|
|
33640
34150
|
});
|
|
@@ -33779,7 +34289,7 @@ var PieInner = ({
|
|
|
33779
34289
|
rotation,
|
|
33780
34290
|
...props
|
|
33781
34291
|
}) => {
|
|
33782
|
-
return /* @__PURE__ */
|
|
34292
|
+
return /* @__PURE__ */ jsx72(RenderSvg, {
|
|
33783
34293
|
defaultName: "<Pie>",
|
|
33784
34294
|
documentationLink: "https://www.remotion.dev/docs/shapes/pie",
|
|
33785
34295
|
...makePie({ radius, progress, closePath, counterClockwise, rotation }),
|
|
@@ -33788,134 +34298,11 @@ var PieInner = ({
|
|
|
33788
34298
|
};
|
|
33789
34299
|
var Pie = Internals.wrapInSchema({
|
|
33790
34300
|
Component: PieInner,
|
|
34301
|
+
componentIdentity: "dev.remotion.shapes.Pie",
|
|
33791
34302
|
schema: pieSchema,
|
|
33792
34303
|
supportsEffects: true
|
|
33793
34304
|
});
|
|
33794
34305
|
Internals.addSequenceStackTraces(Pie);
|
|
33795
|
-
var shortenVector = (vector, radius) => {
|
|
33796
|
-
const [x, y] = vector;
|
|
33797
|
-
const currentLength = Math.sqrt(x * x + y * y);
|
|
33798
|
-
const scalingFactor = (currentLength - radius) / currentLength;
|
|
33799
|
-
return [x * scalingFactor, y * scalingFactor];
|
|
33800
|
-
};
|
|
33801
|
-
var scaleVectorToLength = (vector, length2) => {
|
|
33802
|
-
const [x, y] = vector;
|
|
33803
|
-
const currentLength = Math.sqrt(x * x + y * y);
|
|
33804
|
-
const scalingFactor = length2 / currentLength;
|
|
33805
|
-
return [x * scalingFactor, y * scalingFactor];
|
|
33806
|
-
};
|
|
33807
|
-
var joinPoints = (points, {
|
|
33808
|
-
edgeRoundness,
|
|
33809
|
-
cornerRadius,
|
|
33810
|
-
roundCornerStrategy
|
|
33811
|
-
}) => {
|
|
33812
|
-
return points.map(([x, y], i) => {
|
|
33813
|
-
const prevPointIndex = i === 0 ? points.length - 2 : i - 1;
|
|
33814
|
-
const prevPoint = points[prevPointIndex];
|
|
33815
|
-
const nextPointIndex = i === points.length - 1 ? 1 : i + 1;
|
|
33816
|
-
const nextPoint = points[nextPointIndex];
|
|
33817
|
-
const middleOfLine = [(x + nextPoint[0]) / 2, (y + nextPoint[1]) / 2];
|
|
33818
|
-
const prevPointMiddleOfLine = [
|
|
33819
|
-
(x + prevPoint[0]) / 2,
|
|
33820
|
-
(y + prevPoint[1]) / 2
|
|
33821
|
-
];
|
|
33822
|
-
const prevVector = [x - prevPoint[0], y - prevPoint[1]];
|
|
33823
|
-
const nextVector = [nextPoint[0] - x, nextPoint[1] - y];
|
|
33824
|
-
if (i === 0) {
|
|
33825
|
-
if (edgeRoundness !== null) {
|
|
33826
|
-
return [
|
|
33827
|
-
{
|
|
33828
|
-
type: "M",
|
|
33829
|
-
x: middleOfLine[0],
|
|
33830
|
-
y: middleOfLine[1]
|
|
33831
|
-
}
|
|
33832
|
-
];
|
|
33833
|
-
}
|
|
33834
|
-
if (cornerRadius !== 0) {
|
|
33835
|
-
const computeRadius = shortenVector(nextVector, cornerRadius);
|
|
33836
|
-
return [
|
|
33837
|
-
{
|
|
33838
|
-
type: "M",
|
|
33839
|
-
x: computeRadius[0] + x,
|
|
33840
|
-
y: computeRadius[1] + y
|
|
33841
|
-
}
|
|
33842
|
-
];
|
|
33843
|
-
}
|
|
33844
|
-
return [
|
|
33845
|
-
{
|
|
33846
|
-
type: "M",
|
|
33847
|
-
x,
|
|
33848
|
-
y
|
|
33849
|
-
}
|
|
33850
|
-
];
|
|
33851
|
-
}
|
|
33852
|
-
if (cornerRadius && edgeRoundness !== null) {
|
|
33853
|
-
throw new Error(`"cornerRadius" and "edgeRoundness" cannot be specified at the same time.`);
|
|
33854
|
-
}
|
|
33855
|
-
if (edgeRoundness === null) {
|
|
33856
|
-
if (cornerRadius === 0) {
|
|
33857
|
-
return [
|
|
33858
|
-
{
|
|
33859
|
-
type: "L",
|
|
33860
|
-
x,
|
|
33861
|
-
y
|
|
33862
|
-
}
|
|
33863
|
-
];
|
|
33864
|
-
}
|
|
33865
|
-
const prevVectorMinusRadius = shortenVector(prevVector, cornerRadius);
|
|
33866
|
-
const prevVectorLength = scaleVectorToLength(prevVector, cornerRadius);
|
|
33867
|
-
const nextVectorMinusRadius = scaleVectorToLength(nextVector, cornerRadius);
|
|
33868
|
-
const firstDraw = [
|
|
33869
|
-
prevPoint[0] + prevVectorMinusRadius[0],
|
|
33870
|
-
prevPoint[1] + prevVectorMinusRadius[1]
|
|
33871
|
-
];
|
|
33872
|
-
return [
|
|
33873
|
-
{
|
|
33874
|
-
type: "L",
|
|
33875
|
-
x: firstDraw[0],
|
|
33876
|
-
y: firstDraw[1]
|
|
33877
|
-
},
|
|
33878
|
-
roundCornerStrategy === "arc" ? {
|
|
33879
|
-
type: "a",
|
|
33880
|
-
rx: cornerRadius,
|
|
33881
|
-
ry: cornerRadius,
|
|
33882
|
-
xAxisRotation: 0,
|
|
33883
|
-
dx: prevVectorLength[0] + nextVectorMinusRadius[0],
|
|
33884
|
-
dy: prevVectorLength[1] + nextVectorMinusRadius[1],
|
|
33885
|
-
largeArcFlag: false,
|
|
33886
|
-
sweepFlag: true
|
|
33887
|
-
} : {
|
|
33888
|
-
type: "C",
|
|
33889
|
-
x: firstDraw[0] + prevVectorLength[0] + nextVectorMinusRadius[0],
|
|
33890
|
-
y: firstDraw[1] + prevVectorLength[1] + nextVectorMinusRadius[1],
|
|
33891
|
-
cp1x: x,
|
|
33892
|
-
cp1y: y,
|
|
33893
|
-
cp2x: x,
|
|
33894
|
-
cp2y: y
|
|
33895
|
-
}
|
|
33896
|
-
];
|
|
33897
|
-
}
|
|
33898
|
-
const controlPoint1 = [
|
|
33899
|
-
prevPointMiddleOfLine[0] + prevVector[0] * edgeRoundness * 0.5,
|
|
33900
|
-
prevPointMiddleOfLine[1] + prevVector[1] * edgeRoundness * 0.5
|
|
33901
|
-
];
|
|
33902
|
-
const controlPoint2 = [
|
|
33903
|
-
middleOfLine[0] - nextVector[0] * edgeRoundness * 0.5,
|
|
33904
|
-
middleOfLine[1] - nextVector[1] * edgeRoundness * 0.5
|
|
33905
|
-
];
|
|
33906
|
-
return [
|
|
33907
|
-
{
|
|
33908
|
-
type: "C",
|
|
33909
|
-
cp1x: controlPoint1[0],
|
|
33910
|
-
cp1y: controlPoint1[1],
|
|
33911
|
-
cp2x: controlPoint2[0],
|
|
33912
|
-
cp2y: controlPoint2[1],
|
|
33913
|
-
x: middleOfLine[0],
|
|
33914
|
-
y: middleOfLine[1]
|
|
33915
|
-
}
|
|
33916
|
-
];
|
|
33917
|
-
}).flat(1);
|
|
33918
|
-
};
|
|
33919
34306
|
function polygon({
|
|
33920
34307
|
points,
|
|
33921
34308
|
radius,
|
|
@@ -33996,7 +34383,7 @@ var PolygonInner = ({
|
|
|
33996
34383
|
edgeRoundness,
|
|
33997
34384
|
...props
|
|
33998
34385
|
}) => {
|
|
33999
|
-
return /* @__PURE__ */
|
|
34386
|
+
return /* @__PURE__ */ jsx82(RenderSvg, {
|
|
34000
34387
|
defaultName: "<Polygon>",
|
|
34001
34388
|
documentationLink: "https://www.remotion.dev/docs/shapes/polygon",
|
|
34002
34389
|
...makePolygon({
|
|
@@ -34010,6 +34397,7 @@ var PolygonInner = ({
|
|
|
34010
34397
|
};
|
|
34011
34398
|
var Polygon = Internals.wrapInSchema({
|
|
34012
34399
|
Component: PolygonInner,
|
|
34400
|
+
componentIdentity: "dev.remotion.shapes.Polygon",
|
|
34013
34401
|
schema: polygonSchema,
|
|
34014
34402
|
supportsEffects: true
|
|
34015
34403
|
});
|
|
@@ -34066,7 +34454,7 @@ var RectInner = ({
|
|
|
34066
34454
|
cornerRadius,
|
|
34067
34455
|
...props
|
|
34068
34456
|
}) => {
|
|
34069
|
-
return /* @__PURE__ */
|
|
34457
|
+
return /* @__PURE__ */ jsx92(RenderSvg, {
|
|
34070
34458
|
defaultName: "<Rect>",
|
|
34071
34459
|
documentationLink: "https://www.remotion.dev/docs/shapes/rect",
|
|
34072
34460
|
...makeRect({ height, width, edgeRoundness, cornerRadius }),
|
|
@@ -34075,6 +34463,7 @@ var RectInner = ({
|
|
|
34075
34463
|
};
|
|
34076
34464
|
var Rect = Internals.wrapInSchema({
|
|
34077
34465
|
Component: RectInner,
|
|
34466
|
+
componentIdentity: "dev.remotion.shapes.Rect",
|
|
34078
34467
|
schema: rectSchema,
|
|
34079
34468
|
supportsEffects: true
|
|
34080
34469
|
});
|
|
@@ -34169,7 +34558,7 @@ var StarInner = ({
|
|
|
34169
34558
|
edgeRoundness,
|
|
34170
34559
|
...props
|
|
34171
34560
|
}) => {
|
|
34172
|
-
return /* @__PURE__ */
|
|
34561
|
+
return /* @__PURE__ */ jsx102(RenderSvg, {
|
|
34173
34562
|
defaultName: "<Star>",
|
|
34174
34563
|
documentationLink: "https://www.remotion.dev/docs/shapes/star",
|
|
34175
34564
|
...makeStar({
|
|
@@ -34184,6 +34573,7 @@ var StarInner = ({
|
|
|
34184
34573
|
};
|
|
34185
34574
|
var Star = Internals.wrapInSchema({
|
|
34186
34575
|
Component: StarInner,
|
|
34576
|
+
componentIdentity: "dev.remotion.shapes.Star",
|
|
34187
34577
|
schema: starSchema,
|
|
34188
34578
|
supportsEffects: true
|
|
34189
34579
|
});
|
|
@@ -34280,7 +34670,7 @@ var TriangleInner = ({
|
|
|
34280
34670
|
cornerRadius,
|
|
34281
34671
|
...props
|
|
34282
34672
|
}) => {
|
|
34283
|
-
return /* @__PURE__ */
|
|
34673
|
+
return /* @__PURE__ */ jsx112(RenderSvg, {
|
|
34284
34674
|
defaultName: "<Triangle>",
|
|
34285
34675
|
documentationLink: "https://www.remotion.dev/docs/shapes/triangle",
|
|
34286
34676
|
...makeTriangle({ length: length2, direction, edgeRoundness, cornerRadius }),
|
|
@@ -34289,6 +34679,7 @@ var TriangleInner = ({
|
|
|
34289
34679
|
};
|
|
34290
34680
|
var Triangle = Internals.wrapInSchema({
|
|
34291
34681
|
Component: TriangleInner,
|
|
34682
|
+
componentIdentity: "dev.remotion.shapes.Triangle",
|
|
34292
34683
|
schema: triangleSchema,
|
|
34293
34684
|
supportsEffects: true
|
|
34294
34685
|
});
|
|
@@ -35369,7 +35760,7 @@ import { jsx as jsx83, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
|
35369
35760
|
import { jsx as jsx93 } from "react/jsx-runtime";
|
|
35370
35761
|
import React72 from "react";
|
|
35371
35762
|
import { jsx as jsx103 } from "react/jsx-runtime";
|
|
35372
|
-
import { jsx as
|
|
35763
|
+
import { jsx as jsx113 } from "react/jsx-runtime";
|
|
35373
35764
|
import { jsx as jsx122 } from "react/jsx-runtime";
|
|
35374
35765
|
import * as React36 from "react";
|
|
35375
35766
|
import * as ReactDOM4 from "react-dom";
|
|
@@ -35929,7 +36320,7 @@ var Button = ({
|
|
|
35929
36320
|
const [dimensions, setDimensions] = useState22(null);
|
|
35930
36321
|
const ref = useRef210(null);
|
|
35931
36322
|
const { isActive, progress } = useHoverTransforms(ref, Boolean(disabled || loading));
|
|
35932
|
-
const onPointerEnter =
|
|
36323
|
+
const onPointerEnter = useCallback27((e) => {
|
|
35933
36324
|
if (e.pointerType !== "mouse") {
|
|
35934
36325
|
return;
|
|
35935
36326
|
}
|
|
@@ -35966,7 +36357,7 @@ var Button = ({
|
|
|
35966
36357
|
const isDisabled = disabled || loading;
|
|
35967
36358
|
const isAnchor = !asChild && "href" in rest && rest.href !== undefined;
|
|
35968
36359
|
const sharedClasses = cn("text-text", "inline-flex", "justify-center", "bg-button-bg", "items-center", "font-brand", "border-solid", "text-[1em]", "rounded-lg", "border-black", "border-2", "border-b-4", "cursor-pointer", "px-4", "h-12", "flex-row", "items-center", "relative", "overflow-hidden", isDisabled && "cursor-default opacity-50", className);
|
|
35969
|
-
const preventInteraction =
|
|
36360
|
+
const preventInteraction = useCallback27((e) => {
|
|
35970
36361
|
e.preventDefault();
|
|
35971
36362
|
e.stopPropagation();
|
|
35972
36363
|
}, []);
|
|
@@ -36177,7 +36568,7 @@ var Link = ({
|
|
|
36177
36568
|
className,
|
|
36178
36569
|
...props
|
|
36179
36570
|
}) => {
|
|
36180
|
-
return /* @__PURE__ */
|
|
36571
|
+
return /* @__PURE__ */ jsx113("a", {
|
|
36181
36572
|
...props,
|
|
36182
36573
|
className: cn(className, "text-brand underline underline-offset-4"),
|
|
36183
36574
|
children: props.children
|
|
@@ -42060,7 +42451,7 @@ var Triangle22 = (props) => {
|
|
|
42060
42451
|
};
|
|
42061
42452
|
|
|
42062
42453
|
// src/components/prompts/CopyPromptButton.tsx
|
|
42063
|
-
import { useCallback as
|
|
42454
|
+
import { useCallback as useCallback38, useState as useState38 } from "react";
|
|
42064
42455
|
|
|
42065
42456
|
// src/components/prompts/ClipboardIcon.tsx
|
|
42066
42457
|
import { jsx as jsx45 } from "react/jsx-runtime";
|
|
@@ -42081,7 +42472,7 @@ var ClipboardIcon = ({ size: size4 = 16, color = "currentColor" }) => {
|
|
|
42081
42472
|
import { jsx as jsx46, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
42082
42473
|
var CopyPromptButton = ({ prompt }) => {
|
|
42083
42474
|
const [copied, setCopied] = useState38(false);
|
|
42084
|
-
const onCopy =
|
|
42475
|
+
const onCopy = useCallback38(() => {
|
|
42085
42476
|
navigator.clipboard.writeText(prompt);
|
|
42086
42477
|
setCopied(true);
|
|
42087
42478
|
setTimeout(() => setCopied(false), 2000);
|
|
@@ -42110,7 +42501,7 @@ var CopyPromptButton = ({ prompt }) => {
|
|
|
42110
42501
|
};
|
|
42111
42502
|
|
|
42112
42503
|
// src/components/prompts/LikeButton.tsx
|
|
42113
|
-
import { useCallback as
|
|
42504
|
+
import { useCallback as useCallback40, useEffect as useEffect41, useState as useState40 } from "react";
|
|
42114
42505
|
|
|
42115
42506
|
// src/components/prompts/config.ts
|
|
42116
42507
|
var REMOTION_PRO_ORIGIN = "https://www.remotion.pro";
|
|
@@ -42187,13 +42578,13 @@ var getRelativeTime = (dateStr) => {
|
|
|
42187
42578
|
};
|
|
42188
42579
|
|
|
42189
42580
|
// src/components/prompts/use-heart-animation.ts
|
|
42190
|
-
import { useCallback as
|
|
42581
|
+
import { useCallback as useCallback39, useRef as useRef47, useState as useState39 } from "react";
|
|
42191
42582
|
var DURATION = 300;
|
|
42192
42583
|
var useHeartAnimation = () => {
|
|
42193
42584
|
const [scale, setScale] = useState39(1);
|
|
42194
42585
|
const [roundness, setRoundness] = useState39(0.09);
|
|
42195
42586
|
const rafRef = useRef47(0);
|
|
42196
|
-
const animate =
|
|
42587
|
+
const animate = useCallback39(() => {
|
|
42197
42588
|
cancelAnimationFrame(rafRef.current);
|
|
42198
42589
|
const start = performance.now();
|
|
42199
42590
|
const tick = (now) => {
|
|
@@ -42224,7 +42615,7 @@ var LikeButton = ({ submissionId, initialLikeCount }) => {
|
|
|
42224
42615
|
useEffect41(() => {
|
|
42225
42616
|
setLiked(getLikedIds().has(submissionId));
|
|
42226
42617
|
}, [submissionId]);
|
|
42227
|
-
const onClick =
|
|
42618
|
+
const onClick = useCallback40(async () => {
|
|
42228
42619
|
if (liked) {
|
|
42229
42620
|
setLiked(false);
|
|
42230
42621
|
setLikeCount((c2) => c2 - 1);
|
|
@@ -44745,10 +45136,10 @@ import"react-dom";
|
|
|
44745
45136
|
"use client";
|
|
44746
45137
|
|
|
44747
45138
|
// src/components/prompts/MuxPlayer.tsx
|
|
44748
|
-
import { useCallback as
|
|
45139
|
+
import { useCallback as useCallback42 } from "react";
|
|
44749
45140
|
import { jsx as jsx48, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
44750
45141
|
var MuxPlayer = ({ playbackId, title, rounded = true }) => {
|
|
44751
|
-
const onProviderChange =
|
|
45142
|
+
const onProviderChange = useCallback42((provider2, _e) => {
|
|
44752
45143
|
if (isHLSProvider(provider2)) {
|
|
44753
45144
|
provider2.library = () => import("hls.js");
|
|
44754
45145
|
}
|