@remotion/promo-pages 4.0.476 → 4.0.477
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 +984 -587
- package/dist/components/Homepage.js +3 -3
- package/dist/components/homepage/CommunityStatsItems.js +1 -1
- package/dist/components/homepage/Demo/Comp.js +1 -1
- package/dist/components/homepage/Demo/DownloadNudge.js +2 -2
- package/dist/components/homepage/Demo/DragAndDropNudge.js +1 -1
- package/dist/components/homepage/Demo/ThemeNudge.js +6 -6
- package/dist/components/homepage/Demo/index.js +9 -9
- 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/VideoAppsShowcase.d.ts +2 -1
- package/dist/components/homepage/VideoAppsShowcase.js +5 -5
- package/dist/components/team/TrustSection.js +1 -1
- package/dist/design.js +591 -214
- package/dist/experts.js +130 -66
- package/dist/homepage/Pricing.js +585 -208
- package/dist/prompts/PromptsGallery.js +587 -210
- package/dist/prompts/PromptsShow.js +591 -214
- package/dist/prompts/PromptsSubmit.js +593 -216
- package/dist/team.js +583 -206
- package/dist/template-modal-content.js +590 -213
- package/dist/templates.js +583 -206
- 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.477";
|
|
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]);
|
|
@@ -25855,7 +25880,19 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
25855
25880
|
]);
|
|
25856
25881
|
const endThreshold = Math.ceil(cumulatedFrom + from + durationInFrames - 1);
|
|
25857
25882
|
const content = absoluteFrame < cumulatedFrom + from ? null : absoluteFrame > endThreshold ? null : children;
|
|
25883
|
+
const frozenContent = content === null || typeof freeze === "undefined" || freeze === null ? content : /* @__PURE__ */ jsx12(Freeze, {
|
|
25884
|
+
frame: freeze,
|
|
25885
|
+
children: content
|
|
25886
|
+
});
|
|
25858
25887
|
const styleIfThere = other.layout === "none" ? undefined : other.style;
|
|
25888
|
+
const sequenceRef = useCallback6((node) => {
|
|
25889
|
+
wrapperRefForOutline.current = node;
|
|
25890
|
+
if (typeof ref === "function") {
|
|
25891
|
+
ref(node);
|
|
25892
|
+
} else if (ref) {
|
|
25893
|
+
ref.current = node;
|
|
25894
|
+
}
|
|
25895
|
+
}, [ref]);
|
|
25859
25896
|
const defaultStyle = useMemo14(() => {
|
|
25860
25897
|
return {
|
|
25861
25898
|
flexDirection: undefined,
|
|
@@ -25872,11 +25909,11 @@ var RegularSequenceRefForwardingFunction = ({
|
|
|
25872
25909
|
}
|
|
25873
25910
|
return /* @__PURE__ */ jsx12(SequenceContext.Provider, {
|
|
25874
25911
|
value: contextValue,
|
|
25875
|
-
children:
|
|
25876
|
-
ref,
|
|
25912
|
+
children: frozenContent === null ? null : other.layout === "none" ? frozenContent : /* @__PURE__ */ jsx12(AbsoluteFill, {
|
|
25913
|
+
ref: sequenceRef,
|
|
25877
25914
|
style: defaultStyle,
|
|
25878
25915
|
className: other.className,
|
|
25879
|
-
children:
|
|
25916
|
+
children: frozenContent
|
|
25880
25917
|
})
|
|
25881
25918
|
});
|
|
25882
25919
|
};
|
|
@@ -25956,11 +25993,13 @@ var SequenceInner = forwardRef3(SequenceRefForwardingFunction);
|
|
|
25956
25993
|
var SequenceWithoutSchema = SequenceInner;
|
|
25957
25994
|
var Sequence = wrapInSchema({
|
|
25958
25995
|
Component: SequenceInner,
|
|
25996
|
+
componentIdentity: "dev.remotion.remotion.Sequence",
|
|
25959
25997
|
schema: sequenceSchema,
|
|
25960
25998
|
supportsEffects: false
|
|
25961
25999
|
});
|
|
25962
26000
|
var SequenceWithoutFrom = wrapInSchema({
|
|
25963
26001
|
Component: SequenceInner,
|
|
26002
|
+
componentIdentity: null,
|
|
25964
26003
|
schema: sequenceSchemaWithoutFrom,
|
|
25965
26004
|
supportsEffects: false
|
|
25966
26005
|
});
|
|
@@ -26278,7 +26317,7 @@ var CanvasRefForwardingFunction = ({ width, height, fit, className, style, effec
|
|
|
26278
26317
|
}
|
|
26279
26318
|
return document.createElement("canvas");
|
|
26280
26319
|
}, []);
|
|
26281
|
-
const draw =
|
|
26320
|
+
const draw = useCallback7((imageData) => {
|
|
26282
26321
|
const canvas = canvasRef.current;
|
|
26283
26322
|
const canvasWidth = width ?? imageData.displayWidth;
|
|
26284
26323
|
const canvasHeight = height ?? imageData.displayHeight;
|
|
@@ -26499,6 +26538,7 @@ var resolveAnimatedImageSource = (src) => {
|
|
|
26499
26538
|
var animatedImageSchema = {
|
|
26500
26539
|
durationInFrames: durationInFramesField,
|
|
26501
26540
|
from: fromField,
|
|
26541
|
+
freeze: freezeField,
|
|
26502
26542
|
playbackRate: {
|
|
26503
26543
|
type: "number",
|
|
26504
26544
|
min: 0,
|
|
@@ -26698,6 +26738,7 @@ var AnimatedImageInner = ({
|
|
|
26698
26738
|
};
|
|
26699
26739
|
var AnimatedImage = wrapInSchema({
|
|
26700
26740
|
Component: AnimatedImageInner,
|
|
26741
|
+
componentIdentity: "dev.remotion.remotion.AnimatedImage",
|
|
26701
26742
|
schema: animatedImageSchema,
|
|
26702
26743
|
supportsEffects: true
|
|
26703
26744
|
});
|
|
@@ -26744,7 +26785,7 @@ var RenderAssetManager = createContext17({
|
|
|
26744
26785
|
var RenderAssetManagerProvider = ({ children, collectAssets }) => {
|
|
26745
26786
|
const [renderAssets, setRenderAssets] = useState7([]);
|
|
26746
26787
|
const renderAssetsRef = useRef10([]);
|
|
26747
|
-
const registerRenderAsset =
|
|
26788
|
+
const registerRenderAsset = useCallback8((renderAsset) => {
|
|
26748
26789
|
validateRenderAsset(renderAsset);
|
|
26749
26790
|
renderAssetsRef.current = [...renderAssetsRef.current, renderAsset];
|
|
26750
26791
|
setRenderAssets(renderAssetsRef.current);
|
|
@@ -26761,7 +26802,7 @@ var RenderAssetManagerProvider = ({ children, collectAssets }) => {
|
|
|
26761
26802
|
};
|
|
26762
26803
|
}, []);
|
|
26763
26804
|
}
|
|
26764
|
-
const unregisterRenderAsset =
|
|
26805
|
+
const unregisterRenderAsset = useCallback8((id) => {
|
|
26765
26806
|
renderAssetsRef.current = renderAssetsRef.current.filter((a2) => a2.id !== id);
|
|
26766
26807
|
setRenderAssets(renderAssetsRef.current);
|
|
26767
26808
|
}, []);
|
|
@@ -27566,7 +27607,7 @@ var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled, pr
|
|
|
27566
27607
|
}, []);
|
|
27567
27608
|
const prevEndTimes = useRef12({ scheduledEndTime: null, mediaEndTime: null });
|
|
27568
27609
|
const nodesToResume = useRef12(new Map);
|
|
27569
|
-
const unscheduleAudioNode =
|
|
27610
|
+
const unscheduleAudioNode = useCallback9((node) => {
|
|
27570
27611
|
nodesToResume.current.delete(node);
|
|
27571
27612
|
}, []);
|
|
27572
27613
|
const scheduleAudioNode = useMemo21(() => {
|
|
@@ -27620,7 +27661,7 @@ var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled, pr
|
|
|
27620
27661
|
};
|
|
27621
27662
|
};
|
|
27622
27663
|
}, [ctxAndGain, logLevel]);
|
|
27623
|
-
const resume =
|
|
27664
|
+
const resume = useCallback9(() => {
|
|
27624
27665
|
if (!ctxAndGain) {
|
|
27625
27666
|
return Promise.resolve();
|
|
27626
27667
|
}
|
|
@@ -27647,10 +27688,10 @@ var SharedAudioContextProvider = ({ children, audioLatencyHint, audioEnabled, pr
|
|
|
27647
27688
|
});
|
|
27648
27689
|
return resumePromise.catch(() => {});
|
|
27649
27690
|
}, [ctxAndGain, logLevel]);
|
|
27650
|
-
const getIsResumingAudioContext =
|
|
27691
|
+
const getIsResumingAudioContext = useCallback9(() => {
|
|
27651
27692
|
return isResuming.current;
|
|
27652
27693
|
}, []);
|
|
27653
|
-
const suspend =
|
|
27694
|
+
const suspend = useCallback9(() => {
|
|
27654
27695
|
if (!ctxAndGain) {
|
|
27655
27696
|
return Promise.resolve();
|
|
27656
27697
|
}
|
|
@@ -27724,7 +27765,7 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
|
|
|
27724
27765
|
};
|
|
27725
27766
|
}, [refs]);
|
|
27726
27767
|
const takenAudios = useRef12(new Array(numberOfAudioTags).fill(false));
|
|
27727
|
-
const rerenderAudios =
|
|
27768
|
+
const rerenderAudios = useCallback9(() => {
|
|
27728
27769
|
refs.forEach(({ ref, id }) => {
|
|
27729
27770
|
const data = audios.current?.find((a2) => a2.id === id);
|
|
27730
27771
|
const { current } = ref;
|
|
@@ -27745,7 +27786,7 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
|
|
|
27745
27786
|
});
|
|
27746
27787
|
});
|
|
27747
27788
|
}, [refs]);
|
|
27748
|
-
const registerAudio =
|
|
27789
|
+
const registerAudio = useCallback9((options) => {
|
|
27749
27790
|
const { aud, audioId, premounting, postmounting } = options;
|
|
27750
27791
|
const found = audios.current?.find((a2) => a2.audioId === audioId);
|
|
27751
27792
|
if (found) {
|
|
@@ -27774,7 +27815,7 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
|
|
|
27774
27815
|
rerenderAudios();
|
|
27775
27816
|
return newElem;
|
|
27776
27817
|
}, [numberOfAudioTags, refs, rerenderAudios]);
|
|
27777
|
-
const unregisterAudio =
|
|
27818
|
+
const unregisterAudio = useCallback9((id) => {
|
|
27778
27819
|
const cloned = [...takenAudios.current];
|
|
27779
27820
|
const index = refs.findIndex((r2) => r2.id === id);
|
|
27780
27821
|
if (index === -1) {
|
|
@@ -27785,7 +27826,7 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
|
|
|
27785
27826
|
audios.current = audios.current?.filter((a2) => a2.id !== id);
|
|
27786
27827
|
rerenderAudios();
|
|
27787
27828
|
}, [refs, rerenderAudios]);
|
|
27788
|
-
const updateAudio =
|
|
27829
|
+
const updateAudio = useCallback9(({
|
|
27789
27830
|
aud,
|
|
27790
27831
|
audioId,
|
|
27791
27832
|
id,
|
|
@@ -27819,7 +27860,7 @@ var SharedAudioTagsContextProvider = ({ children, numberOfAudioTags }) => {
|
|
|
27819
27860
|
rerenderAudios();
|
|
27820
27861
|
}
|
|
27821
27862
|
}, [rerenderAudios]);
|
|
27822
|
-
const playAllAudios =
|
|
27863
|
+
const playAllAudios = useCallback9(() => {
|
|
27823
27864
|
refs.forEach((ref) => {
|
|
27824
27865
|
const audio = audios.current.find((a2) => a2.el === ref.ref);
|
|
27825
27866
|
if (audio?.premounting) {
|
|
@@ -28367,7 +28408,7 @@ var useBufferManager = (logLevel, mountTime) => {
|
|
|
28367
28408
|
const env = useRemotionEnvironment();
|
|
28368
28409
|
const rendering = env.isRendering;
|
|
28369
28410
|
const buffering = useRef15(false);
|
|
28370
|
-
const addBlock =
|
|
28411
|
+
const addBlock = useCallback10((block) => {
|
|
28371
28412
|
if (rendering) {
|
|
28372
28413
|
return {
|
|
28373
28414
|
unblock: () => {
|
|
@@ -28393,7 +28434,7 @@ var useBufferManager = (logLevel, mountTime) => {
|
|
|
28393
28434
|
}
|
|
28394
28435
|
};
|
|
28395
28436
|
}, [rendering]);
|
|
28396
|
-
const listenForBuffering =
|
|
28437
|
+
const listenForBuffering = useCallback10((callback) => {
|
|
28397
28438
|
setOnBufferingCallbacks((c2) => [...c2, callback]);
|
|
28398
28439
|
return {
|
|
28399
28440
|
remove: () => {
|
|
@@ -28401,7 +28442,7 @@ var useBufferManager = (logLevel, mountTime) => {
|
|
|
28401
28442
|
}
|
|
28402
28443
|
};
|
|
28403
28444
|
}, []);
|
|
28404
|
-
const listenForResume =
|
|
28445
|
+
const listenForResume = useCallback10((callback) => {
|
|
28405
28446
|
setOnResumeCallbacks((c2) => [...c2, callback]);
|
|
28406
28447
|
return {
|
|
28407
28448
|
remove: () => {
|
|
@@ -28515,7 +28556,7 @@ var useBufferUntilFirstFrame = ({
|
|
|
28515
28556
|
}) => {
|
|
28516
28557
|
const bufferingRef = useRef16(false);
|
|
28517
28558
|
const { delayPlayback } = useBufferState();
|
|
28518
|
-
const bufferUntilFirstFrame =
|
|
28559
|
+
const bufferUntilFirstFrame = useCallback11((requestedTime) => {
|
|
28519
28560
|
if (mediaType !== "video") {
|
|
28520
28561
|
return;
|
|
28521
28562
|
}
|
|
@@ -28905,7 +28946,7 @@ var useMediaPlayback = ({
|
|
|
28905
28946
|
throw new Error("useMediaPlayback must be used inside a <BufferingContext>");
|
|
28906
28947
|
}
|
|
28907
28948
|
const isVariableFpsVideoMap = useRef18({});
|
|
28908
|
-
const onVariableFpsVideoDetected =
|
|
28949
|
+
const onVariableFpsVideoDetected = useCallback12(() => {
|
|
28909
28950
|
if (!src) {
|
|
28910
28951
|
return;
|
|
28911
28952
|
}
|
|
@@ -29296,7 +29337,7 @@ var AudioForDevelopmentForwardRefFunction = (props, ref) => {
|
|
|
29296
29337
|
premounting: Boolean(sequenceContext?.premounting),
|
|
29297
29338
|
postmounting: Boolean(sequenceContext?.postmounting)
|
|
29298
29339
|
});
|
|
29299
|
-
const getStack =
|
|
29340
|
+
const getStack = useCallback13(() => {
|
|
29300
29341
|
return _remotionInternalStack ?? null;
|
|
29301
29342
|
}, [_remotionInternalStack]);
|
|
29302
29343
|
useMediaInTimeline({
|
|
@@ -29542,7 +29583,7 @@ var AudioRefForwardingFunction = (props, ref) => {
|
|
|
29542
29583
|
throw new TypeError(`The \`<Html5Audio>\` tag requires a string for \`src\`, but got ${JSON.stringify(props.src)} instead.`);
|
|
29543
29584
|
}
|
|
29544
29585
|
const preloadedSrc = usePreload(props.src);
|
|
29545
|
-
const onError =
|
|
29586
|
+
const onError = useCallback14((e) => {
|
|
29546
29587
|
console.log(e.currentTarget.error);
|
|
29547
29588
|
const errMessage = `Could not play audio with src ${preloadedSrc}: ${e.currentTarget.error}. See https://remotion.dev/docs/media-playback-error for help.`;
|
|
29548
29589
|
if (loop) {
|
|
@@ -29556,7 +29597,7 @@ var AudioRefForwardingFunction = (props, ref) => {
|
|
|
29556
29597
|
console.warn(errMessage);
|
|
29557
29598
|
}
|
|
29558
29599
|
}, [loop, onRemotionError, preloadedSrc]);
|
|
29559
|
-
const onDuration =
|
|
29600
|
+
const onDuration = useCallback14((src, durationInSeconds) => {
|
|
29560
29601
|
setDurations({ type: "got-duration", durationInSeconds, src });
|
|
29561
29602
|
}, [setDurations]);
|
|
29562
29603
|
const durationFetched = durations[getAbsoluteSrc(preloadedSrc)] ?? durations[getAbsoluteSrc(props.src)];
|
|
@@ -29648,6 +29689,7 @@ var resolveSolidPixelDensity = (pixelDensity) => {
|
|
|
29648
29689
|
var solidSchema = {
|
|
29649
29690
|
durationInFrames: durationInFramesField,
|
|
29650
29691
|
from: fromField,
|
|
29692
|
+
freeze: freezeField,
|
|
29651
29693
|
color: {
|
|
29652
29694
|
type: "color",
|
|
29653
29695
|
default: "transparent",
|
|
@@ -29702,7 +29744,7 @@ var SolidInner = ({
|
|
|
29702
29744
|
return canvas;
|
|
29703
29745
|
}, []);
|
|
29704
29746
|
const chainState = useEffectChainState();
|
|
29705
|
-
const canvasRef =
|
|
29747
|
+
const canvasRef = useCallback15((canvas) => {
|
|
29706
29748
|
setOutputCanvas(canvas);
|
|
29707
29749
|
if (typeof reference === "function") {
|
|
29708
29750
|
reference(canvas);
|
|
@@ -29786,6 +29828,7 @@ var SolidOuter = forwardRef8(({
|
|
|
29786
29828
|
style,
|
|
29787
29829
|
name,
|
|
29788
29830
|
from,
|
|
29831
|
+
freeze,
|
|
29789
29832
|
hidden,
|
|
29790
29833
|
showInTimeline,
|
|
29791
29834
|
pixelDensity,
|
|
@@ -29799,6 +29842,7 @@ var SolidOuter = forwardRef8(({
|
|
|
29799
29842
|
return /* @__PURE__ */ jsx24(Sequence, {
|
|
29800
29843
|
layout: "none",
|
|
29801
29844
|
from,
|
|
29845
|
+
freeze,
|
|
29802
29846
|
hidden,
|
|
29803
29847
|
showInTimeline,
|
|
29804
29848
|
_experimentalControls: controls,
|
|
@@ -29823,6 +29867,7 @@ var SolidOuter = forwardRef8(({
|
|
|
29823
29867
|
});
|
|
29824
29868
|
var Solid = wrapInSchema({
|
|
29825
29869
|
Component: SolidOuter,
|
|
29870
|
+
componentIdentity: "dev.remotion.remotion.Solid",
|
|
29826
29871
|
schema: solidSchema,
|
|
29827
29872
|
supportsEffects: true
|
|
29828
29873
|
});
|
|
@@ -29912,7 +29957,7 @@ var HtmlInCanvasContent = forwardRef9(({
|
|
|
29912
29957
|
const offscreenRef = useRef22(null);
|
|
29913
29958
|
const divRef = useRef22(null);
|
|
29914
29959
|
const canvasSizeKey = `${width}x${height}@${resolvedPixelDensity}`;
|
|
29915
|
-
const setLayoutCanvasRef =
|
|
29960
|
+
const setLayoutCanvasRef = useCallback16((node) => {
|
|
29916
29961
|
canvas2dRef.current = node;
|
|
29917
29962
|
if (typeof ref === "function") {
|
|
29918
29963
|
ref(node);
|
|
@@ -29934,7 +29979,7 @@ var HtmlInCanvasContent = forwardRef9(({
|
|
|
29934
29979
|
const initializedRef = useRef22(false);
|
|
29935
29980
|
const onInitCleanupRef = useRef22(null);
|
|
29936
29981
|
const unmountedRef = useRef22(false);
|
|
29937
|
-
const onPaintCb =
|
|
29982
|
+
const onPaintCb = useCallback16(async () => {
|
|
29938
29983
|
const element = divRef.current;
|
|
29939
29984
|
if (!element) {
|
|
29940
29985
|
throw new Error("Canvas or scene element not found");
|
|
@@ -30107,7 +30152,7 @@ var HtmlInCanvasInner = forwardRef9(({
|
|
|
30107
30152
|
const resolvedDuration = durationInFrames ?? videoDuration;
|
|
30108
30153
|
const memoizedEffectDefinitions = useMemoizedEffectDefinitions(effects);
|
|
30109
30154
|
const actualRef = useRef22(null);
|
|
30110
|
-
const setCanvasRef =
|
|
30155
|
+
const setCanvasRef = useCallback16((node) => {
|
|
30111
30156
|
actualRef.current = node;
|
|
30112
30157
|
if (typeof ref === "function") {
|
|
30113
30158
|
ref(node);
|
|
@@ -30142,11 +30187,13 @@ HtmlInCanvasInner.displayName = "HtmlInCanvas";
|
|
|
30142
30187
|
var htmlInCanvasSchema = {
|
|
30143
30188
|
durationInFrames: durationInFramesField,
|
|
30144
30189
|
from: fromField,
|
|
30190
|
+
freeze: freezeField,
|
|
30145
30191
|
...sequenceVisualStyleSchema,
|
|
30146
30192
|
hidden: hiddenField
|
|
30147
30193
|
};
|
|
30148
30194
|
var HtmlInCanvasWrapped = wrapInSchema({
|
|
30149
30195
|
Component: HtmlInCanvasInner,
|
|
30196
|
+
componentIdentity: "dev.remotion.remotion.HtmlInCanvas",
|
|
30150
30197
|
schema: htmlInCanvasSchema,
|
|
30151
30198
|
supportsEffects: true
|
|
30152
30199
|
});
|
|
@@ -30164,6 +30211,7 @@ function truncateSrcForLabel(src) {
|
|
|
30164
30211
|
var canvasImageSchema = {
|
|
30165
30212
|
durationInFrames: durationInFramesField,
|
|
30166
30213
|
from: fromField,
|
|
30214
|
+
freeze: freezeField,
|
|
30167
30215
|
fit: {
|
|
30168
30216
|
type: "enum",
|
|
30169
30217
|
default: "fill",
|
|
@@ -30269,7 +30317,7 @@ var CanvasImageContent = forwardRef10(({
|
|
|
30269
30317
|
}
|
|
30270
30318
|
return document.createElement("canvas");
|
|
30271
30319
|
}, []);
|
|
30272
|
-
const canvasRef =
|
|
30320
|
+
const canvasRef = useCallback17((canvas) => {
|
|
30273
30321
|
setOutputCanvas(canvas);
|
|
30274
30322
|
if (refForOutline) {
|
|
30275
30323
|
refForOutline.current = canvas;
|
|
@@ -30416,6 +30464,7 @@ var CanvasImageInner = forwardRef10(({
|
|
|
30416
30464
|
delayRenderTimeoutInMilliseconds,
|
|
30417
30465
|
durationInFrames,
|
|
30418
30466
|
from,
|
|
30467
|
+
freeze,
|
|
30419
30468
|
hidden,
|
|
30420
30469
|
name,
|
|
30421
30470
|
showInTimeline,
|
|
@@ -30437,6 +30486,7 @@ var CanvasImageInner = forwardRef10(({
|
|
|
30437
30486
|
layout: "none",
|
|
30438
30487
|
from: from ?? 0,
|
|
30439
30488
|
durationInFrames: durationInFrames ?? Infinity,
|
|
30489
|
+
freeze,
|
|
30440
30490
|
hidden,
|
|
30441
30491
|
showInTimeline: showInTimeline ?? true,
|
|
30442
30492
|
name: name ?? "<CanvasImage>",
|
|
@@ -30469,6 +30519,7 @@ var CanvasImageInner = forwardRef10(({
|
|
|
30469
30519
|
});
|
|
30470
30520
|
var CanvasImage = wrapInSchema({
|
|
30471
30521
|
Component: CanvasImageInner,
|
|
30522
|
+
componentIdentity: "dev.remotion.remotion.CanvasImage",
|
|
30472
30523
|
schema: canvasImageSchema,
|
|
30473
30524
|
supportsEffects: true
|
|
30474
30525
|
});
|
|
@@ -30486,11 +30537,11 @@ var IFrameRefForwarding = ({
|
|
|
30486
30537
|
retries: delayRenderRetries ?? undefined,
|
|
30487
30538
|
timeoutInMilliseconds: delayRenderTimeoutInMilliseconds ?? undefined
|
|
30488
30539
|
}));
|
|
30489
|
-
const didLoad =
|
|
30540
|
+
const didLoad = useCallback18((e) => {
|
|
30490
30541
|
continueRender2(handle);
|
|
30491
30542
|
onLoad?.(e);
|
|
30492
30543
|
}, [handle, onLoad, continueRender2]);
|
|
30493
|
-
const didGetError =
|
|
30544
|
+
const didGetError = useCallback18((e) => {
|
|
30494
30545
|
continueRender2(handle);
|
|
30495
30546
|
if (onError) {
|
|
30496
30547
|
onError(e);
|
|
@@ -30532,7 +30583,7 @@ var ImgContent = ({
|
|
|
30532
30583
|
if (!_propsValid) {
|
|
30533
30584
|
throw new Error("typecheck error");
|
|
30534
30585
|
}
|
|
30535
|
-
const imageCallbackRef =
|
|
30586
|
+
const imageCallbackRef = useCallback19((img) => {
|
|
30536
30587
|
imageRef.current = img;
|
|
30537
30588
|
refForOutline.current = img;
|
|
30538
30589
|
if (typeof ref === "function") {
|
|
@@ -30542,7 +30593,7 @@ var ImgContent = ({
|
|
|
30542
30593
|
}
|
|
30543
30594
|
}, [ref, refForOutline]);
|
|
30544
30595
|
const actualSrc = usePreload(src);
|
|
30545
|
-
const retryIn =
|
|
30596
|
+
const retryIn = useCallback19((timeout) => {
|
|
30546
30597
|
if (!imageRef.current) {
|
|
30547
30598
|
return;
|
|
30548
30599
|
}
|
|
@@ -30560,7 +30611,7 @@ var ImgContent = ({
|
|
|
30560
30611
|
}, timeout);
|
|
30561
30612
|
}, []);
|
|
30562
30613
|
const { delayRender: delayRender2, continueRender: continueRender2, cancelRender: cancelRender2 } = useDelayRender();
|
|
30563
|
-
const didGetError =
|
|
30614
|
+
const didGetError = useCallback19((e) => {
|
|
30564
30615
|
if (!errors.current) {
|
|
30565
30616
|
return;
|
|
30566
30617
|
}
|
|
@@ -30670,6 +30721,7 @@ var NativeImgInner = ({
|
|
|
30670
30721
|
src,
|
|
30671
30722
|
from,
|
|
30672
30723
|
durationInFrames,
|
|
30724
|
+
freeze,
|
|
30673
30725
|
_experimentalControls: controls,
|
|
30674
30726
|
_remotionInternalRefForOutline: refForOutline,
|
|
30675
30727
|
...props2
|
|
@@ -30681,6 +30733,7 @@ var NativeImgInner = ({
|
|
|
30681
30733
|
layout: "none",
|
|
30682
30734
|
from: from ?? 0,
|
|
30683
30735
|
durationInFrames: durationInFrames ?? Infinity,
|
|
30736
|
+
freeze,
|
|
30684
30737
|
_remotionInternalStack: stack,
|
|
30685
30738
|
_remotionInternalDocumentationLink: "https://www.remotion.dev/docs/img",
|
|
30686
30739
|
_remotionInternalIsMedia: { type: "image", src },
|
|
@@ -30700,6 +30753,7 @@ var CanvasImageWithPrivateProps = CanvasImage;
|
|
|
30700
30753
|
var imgSchema = {
|
|
30701
30754
|
durationInFrames: durationInFramesField,
|
|
30702
30755
|
from: fromField,
|
|
30756
|
+
freeze: freezeField,
|
|
30703
30757
|
...sequenceVisualStyleSchema,
|
|
30704
30758
|
hidden: hiddenField
|
|
30705
30759
|
};
|
|
@@ -30755,6 +30809,7 @@ var ImgInner = ({
|
|
|
30755
30809
|
src,
|
|
30756
30810
|
from,
|
|
30757
30811
|
durationInFrames,
|
|
30812
|
+
freeze,
|
|
30758
30813
|
_experimentalControls: controls,
|
|
30759
30814
|
width,
|
|
30760
30815
|
height,
|
|
@@ -30779,6 +30834,7 @@ var ImgInner = ({
|
|
|
30779
30834
|
src,
|
|
30780
30835
|
from,
|
|
30781
30836
|
durationInFrames,
|
|
30837
|
+
freeze,
|
|
30782
30838
|
_experimentalControls: controls,
|
|
30783
30839
|
width,
|
|
30784
30840
|
height,
|
|
@@ -30820,6 +30876,7 @@ var ImgInner = ({
|
|
|
30820
30876
|
delayRenderTimeoutInMilliseconds,
|
|
30821
30877
|
from,
|
|
30822
30878
|
durationInFrames,
|
|
30879
|
+
freeze,
|
|
30823
30880
|
hidden,
|
|
30824
30881
|
name: name ?? "<Img>",
|
|
30825
30882
|
showInTimeline,
|
|
@@ -30832,6 +30889,7 @@ var ImgInner = ({
|
|
|
30832
30889
|
};
|
|
30833
30890
|
var Img = wrapInSchema({
|
|
30834
30891
|
Component: ImgInner,
|
|
30892
|
+
componentIdentity: "dev.remotion.remotion.Img",
|
|
30835
30893
|
schema: imgSchema,
|
|
30836
30894
|
supportsEffects: true
|
|
30837
30895
|
});
|
|
@@ -30839,6 +30897,7 @@ addSequenceStackTraces(Img);
|
|
|
30839
30897
|
var interactiveElementSchema = {
|
|
30840
30898
|
durationInFrames: durationInFramesField,
|
|
30841
30899
|
from: fromField,
|
|
30900
|
+
freeze: freezeField,
|
|
30842
30901
|
...sequenceVisualStyleSchema,
|
|
30843
30902
|
hidden: hiddenField
|
|
30844
30903
|
};
|
|
@@ -30854,6 +30913,7 @@ var makeInteractiveElement = (tag, displayName) => {
|
|
|
30854
30913
|
const {
|
|
30855
30914
|
durationInFrames,
|
|
30856
30915
|
from,
|
|
30916
|
+
freeze,
|
|
30857
30917
|
hidden,
|
|
30858
30918
|
name,
|
|
30859
30919
|
showInTimeline,
|
|
@@ -30862,7 +30922,7 @@ var makeInteractiveElement = (tag, displayName) => {
|
|
|
30862
30922
|
...props2
|
|
30863
30923
|
} = propsWithControls;
|
|
30864
30924
|
const refForOutline = useRef25(null);
|
|
30865
|
-
const callbackRef =
|
|
30925
|
+
const callbackRef = useCallback20((element) => {
|
|
30866
30926
|
refForOutline.current = element;
|
|
30867
30927
|
setRef(ref, element);
|
|
30868
30928
|
}, [ref]);
|
|
@@ -30870,6 +30930,7 @@ var makeInteractiveElement = (tag, displayName) => {
|
|
|
30870
30930
|
layout: "none",
|
|
30871
30931
|
from: from ?? 0,
|
|
30872
30932
|
durationInFrames: durationInFrames ?? Infinity,
|
|
30933
|
+
freeze,
|
|
30873
30934
|
hidden,
|
|
30874
30935
|
name: name ?? displayName,
|
|
30875
30936
|
showInTimeline: showInTimeline ?? true,
|
|
@@ -30886,6 +30947,7 @@ var makeInteractiveElement = (tag, displayName) => {
|
|
|
30886
30947
|
Inner.displayName = displayName;
|
|
30887
30948
|
const Wrapped = wrapInSchema({
|
|
30888
30949
|
Component: Inner,
|
|
30950
|
+
componentIdentity: `dev.remotion.remotion.${displayName.slice(1, -1)}`,
|
|
30889
30951
|
schema: interactiveElementSchema,
|
|
30890
30952
|
supportsEffects: false
|
|
30891
30953
|
});
|
|
@@ -30942,14 +31004,14 @@ var CompositionManagerProvider = ({
|
|
|
30942
31004
|
const [canvasContent, setCanvasContent] = useState18(initialCanvasContent);
|
|
30943
31005
|
const [compositions, setCompositions] = useState18(initialCompositions);
|
|
30944
31006
|
const currentcompositionsRef = useRef26(compositions);
|
|
30945
|
-
const updateCompositions =
|
|
31007
|
+
const updateCompositions = useCallback21((updateComps) => {
|
|
30946
31008
|
setCompositions((comps) => {
|
|
30947
31009
|
const updated = updateComps(comps);
|
|
30948
31010
|
currentcompositionsRef.current = updated;
|
|
30949
31011
|
return updated;
|
|
30950
31012
|
});
|
|
30951
31013
|
}, []);
|
|
30952
|
-
const registerComposition =
|
|
31014
|
+
const registerComposition = useCallback21((comp) => {
|
|
30953
31015
|
updateCompositions((comps) => {
|
|
30954
31016
|
if (comps.find((c2) => c2.id === comp.id)) {
|
|
30955
31017
|
throw new Error(`Multiple composition with id ${comp.id} are registered.`);
|
|
@@ -30957,12 +31019,12 @@ var CompositionManagerProvider = ({
|
|
|
30957
31019
|
return [...comps, comp];
|
|
30958
31020
|
});
|
|
30959
31021
|
}, [updateCompositions]);
|
|
30960
|
-
const unregisterComposition =
|
|
31022
|
+
const unregisterComposition = useCallback21((id) => {
|
|
30961
31023
|
setCompositions((comps) => {
|
|
30962
31024
|
return comps.filter((c2) => c2.id !== id);
|
|
30963
31025
|
});
|
|
30964
31026
|
}, []);
|
|
30965
|
-
const registerFolder =
|
|
31027
|
+
const registerFolder = useCallback21((name, parent, nonce, stack) => {
|
|
30966
31028
|
setFolders((prevFolders) => {
|
|
30967
31029
|
return [
|
|
30968
31030
|
...prevFolders,
|
|
@@ -30975,7 +31037,7 @@ var CompositionManagerProvider = ({
|
|
|
30975
31037
|
];
|
|
30976
31038
|
});
|
|
30977
31039
|
}, []);
|
|
30978
|
-
const unregisterFolder =
|
|
31040
|
+
const unregisterFolder = useCallback21((name, parent) => {
|
|
30979
31041
|
setFolders((prevFolders) => {
|
|
30980
31042
|
return prevFolders.filter((p) => !(p.name === name && p.parent === parent));
|
|
30981
31043
|
});
|
|
@@ -31614,7 +31676,7 @@ var OffthreadVideoForRendering = ({
|
|
|
31614
31676
|
continueRender2,
|
|
31615
31677
|
delayRender2
|
|
31616
31678
|
]);
|
|
31617
|
-
const onErr =
|
|
31679
|
+
const onErr = useCallback22(() => {
|
|
31618
31680
|
if (onError) {
|
|
31619
31681
|
onError?.(new Error("Failed to load image with src " + imageSrc));
|
|
31620
31682
|
} else {
|
|
@@ -31624,7 +31686,7 @@ var OffthreadVideoForRendering = ({
|
|
|
31624
31686
|
const className = useMemo35(() => {
|
|
31625
31687
|
return [OBJECTFIT_CONTAIN_CLASS_NAME, props2.className].filter(truthy).join(" ");
|
|
31626
31688
|
}, [props2.className]);
|
|
31627
|
-
const onImageFrame =
|
|
31689
|
+
const onImageFrame = useCallback22((img) => {
|
|
31628
31690
|
if (onVideoFrame) {
|
|
31629
31691
|
onVideoFrame(img);
|
|
31630
31692
|
}
|
|
@@ -31757,7 +31819,7 @@ var VideoForDevelopmentRefForwardingFunction = (props2, ref) => {
|
|
|
31757
31819
|
mediaVolume
|
|
31758
31820
|
});
|
|
31759
31821
|
warnAboutTooHighVolume(userPreferredVolume);
|
|
31760
|
-
const getStack =
|
|
31822
|
+
const getStack = useCallback23(() => {
|
|
31761
31823
|
return _remotionInternalStack ?? null;
|
|
31762
31824
|
}, [_remotionInternalStack]);
|
|
31763
31825
|
useMediaInTimeline({
|
|
@@ -31933,7 +31995,7 @@ var InnerOffthreadVideo = (props2) => {
|
|
|
31933
31995
|
if (environment.isClientSideRendering) {
|
|
31934
31996
|
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
31997
|
}
|
|
31936
|
-
const onDuration =
|
|
31998
|
+
const onDuration = useCallback24(() => {
|
|
31937
31999
|
return;
|
|
31938
32000
|
}, []);
|
|
31939
32001
|
if (typeof props2.src !== "string") {
|
|
@@ -32312,6 +32374,7 @@ var Internals = {
|
|
|
32312
32374
|
getEffectPropStatusesCtx,
|
|
32313
32375
|
hiddenField,
|
|
32314
32376
|
durationInFramesField,
|
|
32377
|
+
freezeField,
|
|
32315
32378
|
fromField
|
|
32316
32379
|
};
|
|
32317
32380
|
var flattenChildren = (children) => {
|
|
@@ -32397,6 +32460,7 @@ var SeriesInner = (props2) => {
|
|
|
32397
32460
|
};
|
|
32398
32461
|
var Series = Object.assign(wrapInSchema({
|
|
32399
32462
|
Component: SeriesInner,
|
|
32463
|
+
componentIdentity: "dev.remotion.remotion.Series",
|
|
32400
32464
|
schema: sequenceSchemaDefaultLayoutNone,
|
|
32401
32465
|
supportsEffects: false
|
|
32402
32466
|
}), {
|
|
@@ -32861,7 +32925,7 @@ var VideoForwardingFunction = (props2, ref) => {
|
|
|
32861
32925
|
throw new TypeError(`The \`<Html5Video>\` tag requires a string for \`src\`, but got ${JSON.stringify(props2.src)} instead.`);
|
|
32862
32926
|
}
|
|
32863
32927
|
const preloadedSrc = usePreload(props2.src);
|
|
32864
|
-
const onDuration =
|
|
32928
|
+
const onDuration = useCallback25((src, durationInSeconds) => {
|
|
32865
32929
|
setDurations({ type: "got-duration", durationInSeconds, src });
|
|
32866
32930
|
}, [setDurations]);
|
|
32867
32931
|
const durationFetched = durations[getAbsoluteSrc(preloadedSrc)] ?? durations[getAbsoluteSrc(props2.src)];
|
|
@@ -32971,7 +33035,7 @@ addSequenceStackTraces(Composition);
|
|
|
32971
33035
|
addSequenceStackTraces(Folder);
|
|
32972
33036
|
|
|
32973
33037
|
// ../shapes/dist/esm/index.mjs
|
|
32974
|
-
import React, { useCallback as
|
|
33038
|
+
import React, { useCallback as useCallback26, useMemo as useMemo40, useRef as useRef29 } from "react";
|
|
32975
33039
|
import { version } from "react-dom";
|
|
32976
33040
|
import { jsx as jsx40, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
32977
33041
|
import { jsx as jsx210 } from "react/jsx-runtime";
|
|
@@ -32983,6 +33047,7 @@ import { jsx as jsx72 } from "react/jsx-runtime";
|
|
|
32983
33047
|
import { jsx as jsx82 } from "react/jsx-runtime";
|
|
32984
33048
|
import { jsx as jsx92 } from "react/jsx-runtime";
|
|
32985
33049
|
import { jsx as jsx102 } from "react/jsx-runtime";
|
|
33050
|
+
import { jsx as jsx112 } from "react/jsx-runtime";
|
|
32986
33051
|
var unitDir = (from, to) => {
|
|
32987
33052
|
const dx = to[0] - from[0];
|
|
32988
33053
|
const dy = to[1] - from[1];
|
|
@@ -33141,6 +33206,7 @@ var RenderSvg = ({
|
|
|
33141
33206
|
pixelDensity,
|
|
33142
33207
|
durationInFrames,
|
|
33143
33208
|
from,
|
|
33209
|
+
freeze,
|
|
33144
33210
|
hidden,
|
|
33145
33211
|
name,
|
|
33146
33212
|
showInTimeline,
|
|
@@ -33161,10 +33227,10 @@ var RenderSvg = ({
|
|
|
33161
33227
|
};
|
|
33162
33228
|
}, [pathStyle]);
|
|
33163
33229
|
const outlineRef = useRef29(null);
|
|
33164
|
-
const setSvgRef =
|
|
33230
|
+
const setSvgRef = useCallback26((node) => {
|
|
33165
33231
|
outlineRef.current = node;
|
|
33166
33232
|
}, []);
|
|
33167
|
-
const setCanvasRef =
|
|
33233
|
+
const setCanvasRef = useCallback26((canvas) => {
|
|
33168
33234
|
outlineRef.current = canvas;
|
|
33169
33235
|
}, []);
|
|
33170
33236
|
const memoizedEffectDefinitions = Internals.useMemoizedEffectDefinitions(effects);
|
|
@@ -33249,6 +33315,7 @@ var RenderSvg = ({
|
|
|
33249
33315
|
return /* @__PURE__ */ jsx40(Sequence, {
|
|
33250
33316
|
layout: "none",
|
|
33251
33317
|
from,
|
|
33318
|
+
freeze,
|
|
33252
33319
|
hidden,
|
|
33253
33320
|
showInTimeline,
|
|
33254
33321
|
_experimentalControls: controls,
|
|
@@ -33314,6 +33381,7 @@ var enumField = ({
|
|
|
33314
33381
|
var makeShapeSchema = (shapeFields) => {
|
|
33315
33382
|
return {
|
|
33316
33383
|
from: Internals.sequenceSchema.from,
|
|
33384
|
+
freeze: Internals.sequenceSchema.freeze,
|
|
33317
33385
|
durationInFrames: Internals.sequenceSchema.durationInFrames,
|
|
33318
33386
|
...shapeFields,
|
|
33319
33387
|
fill: colorField({
|
|
@@ -33381,10 +33449,435 @@ var ArrowInner = ({
|
|
|
33381
33449
|
};
|
|
33382
33450
|
var Arrow = Internals.wrapInSchema({
|
|
33383
33451
|
Component: ArrowInner,
|
|
33452
|
+
componentIdentity: "dev.remotion.shapes.Arrow",
|
|
33384
33453
|
schema: arrowSchema,
|
|
33385
33454
|
supportsEffects: true
|
|
33386
33455
|
});
|
|
33387
33456
|
Internals.addSequenceStackTraces(Arrow);
|
|
33457
|
+
var shortenVector = (vector, radius) => {
|
|
33458
|
+
const [x, y] = vector;
|
|
33459
|
+
const currentLength = Math.sqrt(x * x + y * y);
|
|
33460
|
+
const scalingFactor = (currentLength - radius) / currentLength;
|
|
33461
|
+
return [x * scalingFactor, y * scalingFactor];
|
|
33462
|
+
};
|
|
33463
|
+
var scaleVectorToLength = (vector, length2) => {
|
|
33464
|
+
const [x, y] = vector;
|
|
33465
|
+
const currentLength = Math.sqrt(x * x + y * y);
|
|
33466
|
+
const scalingFactor = length2 / currentLength;
|
|
33467
|
+
return [x * scalingFactor, y * scalingFactor];
|
|
33468
|
+
};
|
|
33469
|
+
var joinPoints = (points, {
|
|
33470
|
+
edgeRoundness,
|
|
33471
|
+
cornerRadius,
|
|
33472
|
+
roundCornerStrategy
|
|
33473
|
+
}) => {
|
|
33474
|
+
return points.map(([x, y], i) => {
|
|
33475
|
+
const prevPointIndex = i === 0 ? points.length - 2 : i - 1;
|
|
33476
|
+
const prevPoint = points[prevPointIndex];
|
|
33477
|
+
const nextPointIndex = i === points.length - 1 ? 1 : i + 1;
|
|
33478
|
+
const nextPoint = points[nextPointIndex];
|
|
33479
|
+
const middleOfLine = [(x + nextPoint[0]) / 2, (y + nextPoint[1]) / 2];
|
|
33480
|
+
const prevPointMiddleOfLine = [
|
|
33481
|
+
(x + prevPoint[0]) / 2,
|
|
33482
|
+
(y + prevPoint[1]) / 2
|
|
33483
|
+
];
|
|
33484
|
+
const prevVector = [x - prevPoint[0], y - prevPoint[1]];
|
|
33485
|
+
const nextVector = [nextPoint[0] - x, nextPoint[1] - y];
|
|
33486
|
+
if (i === 0) {
|
|
33487
|
+
if (edgeRoundness !== null) {
|
|
33488
|
+
return [
|
|
33489
|
+
{
|
|
33490
|
+
type: "M",
|
|
33491
|
+
x: middleOfLine[0],
|
|
33492
|
+
y: middleOfLine[1]
|
|
33493
|
+
}
|
|
33494
|
+
];
|
|
33495
|
+
}
|
|
33496
|
+
if (cornerRadius !== 0) {
|
|
33497
|
+
const computeRadius = shortenVector(nextVector, cornerRadius);
|
|
33498
|
+
return [
|
|
33499
|
+
{
|
|
33500
|
+
type: "M",
|
|
33501
|
+
x: computeRadius[0] + x,
|
|
33502
|
+
y: computeRadius[1] + y
|
|
33503
|
+
}
|
|
33504
|
+
];
|
|
33505
|
+
}
|
|
33506
|
+
return [
|
|
33507
|
+
{
|
|
33508
|
+
type: "M",
|
|
33509
|
+
x,
|
|
33510
|
+
y
|
|
33511
|
+
}
|
|
33512
|
+
];
|
|
33513
|
+
}
|
|
33514
|
+
if (cornerRadius && edgeRoundness !== null) {
|
|
33515
|
+
throw new Error(`"cornerRadius" and "edgeRoundness" cannot be specified at the same time.`);
|
|
33516
|
+
}
|
|
33517
|
+
if (edgeRoundness === null) {
|
|
33518
|
+
if (cornerRadius === 0) {
|
|
33519
|
+
return [
|
|
33520
|
+
{
|
|
33521
|
+
type: "L",
|
|
33522
|
+
x,
|
|
33523
|
+
y
|
|
33524
|
+
}
|
|
33525
|
+
];
|
|
33526
|
+
}
|
|
33527
|
+
const prevVectorMinusRadius = shortenVector(prevVector, cornerRadius);
|
|
33528
|
+
const prevVectorLength = scaleVectorToLength(prevVector, cornerRadius);
|
|
33529
|
+
const nextVectorMinusRadius = scaleVectorToLength(nextVector, cornerRadius);
|
|
33530
|
+
const firstDraw = [
|
|
33531
|
+
prevPoint[0] + prevVectorMinusRadius[0],
|
|
33532
|
+
prevPoint[1] + prevVectorMinusRadius[1]
|
|
33533
|
+
];
|
|
33534
|
+
return [
|
|
33535
|
+
{
|
|
33536
|
+
type: "L",
|
|
33537
|
+
x: firstDraw[0],
|
|
33538
|
+
y: firstDraw[1]
|
|
33539
|
+
},
|
|
33540
|
+
roundCornerStrategy === "arc" ? {
|
|
33541
|
+
type: "a",
|
|
33542
|
+
rx: cornerRadius,
|
|
33543
|
+
ry: cornerRadius,
|
|
33544
|
+
xAxisRotation: 0,
|
|
33545
|
+
dx: prevVectorLength[0] + nextVectorMinusRadius[0],
|
|
33546
|
+
dy: prevVectorLength[1] + nextVectorMinusRadius[1],
|
|
33547
|
+
largeArcFlag: false,
|
|
33548
|
+
sweepFlag: true
|
|
33549
|
+
} : {
|
|
33550
|
+
type: "C",
|
|
33551
|
+
x: firstDraw[0] + prevVectorLength[0] + nextVectorMinusRadius[0],
|
|
33552
|
+
y: firstDraw[1] + prevVectorLength[1] + nextVectorMinusRadius[1],
|
|
33553
|
+
cp1x: x,
|
|
33554
|
+
cp1y: y,
|
|
33555
|
+
cp2x: x,
|
|
33556
|
+
cp2y: y
|
|
33557
|
+
}
|
|
33558
|
+
];
|
|
33559
|
+
}
|
|
33560
|
+
const controlPoint1 = [
|
|
33561
|
+
prevPointMiddleOfLine[0] + prevVector[0] * edgeRoundness * 0.5,
|
|
33562
|
+
prevPointMiddleOfLine[1] + prevVector[1] * edgeRoundness * 0.5
|
|
33563
|
+
];
|
|
33564
|
+
const controlPoint2 = [
|
|
33565
|
+
middleOfLine[0] - nextVector[0] * edgeRoundness * 0.5,
|
|
33566
|
+
middleOfLine[1] - nextVector[1] * edgeRoundness * 0.5
|
|
33567
|
+
];
|
|
33568
|
+
return [
|
|
33569
|
+
{
|
|
33570
|
+
type: "C",
|
|
33571
|
+
cp1x: controlPoint1[0],
|
|
33572
|
+
cp1y: controlPoint1[1],
|
|
33573
|
+
cp2x: controlPoint2[0],
|
|
33574
|
+
cp2y: controlPoint2[1],
|
|
33575
|
+
x: middleOfLine[0],
|
|
33576
|
+
y: middleOfLine[1]
|
|
33577
|
+
}
|
|
33578
|
+
];
|
|
33579
|
+
}).flat(1);
|
|
33580
|
+
};
|
|
33581
|
+
var ensurePositive = (name, value) => {
|
|
33582
|
+
if (typeof value !== "number" || value <= 0) {
|
|
33583
|
+
throw new Error(`"${name}" must be a positive number, got ${value}`);
|
|
33584
|
+
}
|
|
33585
|
+
};
|
|
33586
|
+
var pointerInterval = ({
|
|
33587
|
+
availableLength,
|
|
33588
|
+
pointerBaseWidth,
|
|
33589
|
+
pointerPosition
|
|
33590
|
+
}) => {
|
|
33591
|
+
const center = availableLength * pointerPosition;
|
|
33592
|
+
const half = pointerBaseWidth / 2;
|
|
33593
|
+
return {
|
|
33594
|
+
center,
|
|
33595
|
+
start: Math.max(0, center - half),
|
|
33596
|
+
end: Math.min(availableLength, center + half)
|
|
33597
|
+
};
|
|
33598
|
+
};
|
|
33599
|
+
var areSamePoint = (a2, b2) => {
|
|
33600
|
+
return a2[0] === b2[0] && a2[1] === b2[1];
|
|
33601
|
+
};
|
|
33602
|
+
var normalizeClosedPoints = (points) => {
|
|
33603
|
+
const deduplicated = points.reduce((acc, entry) => {
|
|
33604
|
+
const previous = acc[acc.length - 1];
|
|
33605
|
+
if (previous && areSamePoint(previous.point, entry.point)) {
|
|
33606
|
+
acc[acc.length - 1] = {
|
|
33607
|
+
point: previous.point,
|
|
33608
|
+
round: previous.round && entry.round
|
|
33609
|
+
};
|
|
33610
|
+
return acc;
|
|
33611
|
+
}
|
|
33612
|
+
return [...acc, entry];
|
|
33613
|
+
}, []);
|
|
33614
|
+
if (deduplicated.length === 0) {
|
|
33615
|
+
return deduplicated;
|
|
33616
|
+
}
|
|
33617
|
+
const first = deduplicated[0];
|
|
33618
|
+
const last = deduplicated[deduplicated.length - 1];
|
|
33619
|
+
if (areSamePoint(first.point, last.point)) {
|
|
33620
|
+
const [firstEntry, ...rest] = deduplicated;
|
|
33621
|
+
const withoutLast = rest.slice(0, -1);
|
|
33622
|
+
const mergedFirst = {
|
|
33623
|
+
point: firstEntry.point,
|
|
33624
|
+
round: firstEntry.round && last.round
|
|
33625
|
+
};
|
|
33626
|
+
return [mergedFirst, ...withoutLast, mergedFirst];
|
|
33627
|
+
}
|
|
33628
|
+
return [...deduplicated, first];
|
|
33629
|
+
};
|
|
33630
|
+
var unitDir2 = (from, to) => {
|
|
33631
|
+
const dx = to[0] - from[0];
|
|
33632
|
+
const dy = to[1] - from[1];
|
|
33633
|
+
const len = Math.sqrt(dx * dx + dy * dy);
|
|
33634
|
+
if (len === 0) {
|
|
33635
|
+
return [0, 0];
|
|
33636
|
+
}
|
|
33637
|
+
return [dx / len, dy / len];
|
|
33638
|
+
};
|
|
33639
|
+
var makeInstructions2 = ({
|
|
33640
|
+
points,
|
|
33641
|
+
edgeRoundness,
|
|
33642
|
+
cornerRadius
|
|
33643
|
+
}) => {
|
|
33644
|
+
const rawPoints = points.map((p) => p.point);
|
|
33645
|
+
if (edgeRoundness !== null || cornerRadius === 0) {
|
|
33646
|
+
return [
|
|
33647
|
+
...joinPoints(rawPoints, {
|
|
33648
|
+
edgeRoundness,
|
|
33649
|
+
cornerRadius,
|
|
33650
|
+
roundCornerStrategy: "arc"
|
|
33651
|
+
}),
|
|
33652
|
+
{
|
|
33653
|
+
type: "Z"
|
|
33654
|
+
}
|
|
33655
|
+
];
|
|
33656
|
+
}
|
|
33657
|
+
const uniquePoints = areSamePoint(points[0].point, points[points.length - 1].point) ? points.slice(0, -1) : points;
|
|
33658
|
+
const firstPoint = uniquePoints[0];
|
|
33659
|
+
const startDir = firstPoint.round ? unitDir2(uniquePoints[0].point, uniquePoints[1].point) : null;
|
|
33660
|
+
const startPoint = startDir ? [
|
|
33661
|
+
firstPoint.point[0] + startDir[0] * cornerRadius,
|
|
33662
|
+
firstPoint.point[1] + startDir[1] * cornerRadius
|
|
33663
|
+
] : firstPoint.point;
|
|
33664
|
+
const instructions = [
|
|
33665
|
+
{ type: "M", x: startPoint[0], y: startPoint[1] }
|
|
33666
|
+
];
|
|
33667
|
+
for (let i = 1;i < uniquePoints.length; i++) {
|
|
33668
|
+
const current = uniquePoints[i];
|
|
33669
|
+
if (!current.round) {
|
|
33670
|
+
instructions.push({
|
|
33671
|
+
type: "L",
|
|
33672
|
+
x: current.point[0],
|
|
33673
|
+
y: current.point[1]
|
|
33674
|
+
});
|
|
33675
|
+
continue;
|
|
33676
|
+
}
|
|
33677
|
+
const previous = uniquePoints[i - 1].point;
|
|
33678
|
+
const next = uniquePoints[(i + 1) % uniquePoints.length].point;
|
|
33679
|
+
const incoming = unitDir2(previous, current.point);
|
|
33680
|
+
const outgoing = unitDir2(current.point, next);
|
|
33681
|
+
const arcStart = [
|
|
33682
|
+
current.point[0] - incoming[0] * cornerRadius,
|
|
33683
|
+
current.point[1] - incoming[1] * cornerRadius
|
|
33684
|
+
];
|
|
33685
|
+
instructions.push({
|
|
33686
|
+
type: "L",
|
|
33687
|
+
x: arcStart[0],
|
|
33688
|
+
y: arcStart[1]
|
|
33689
|
+
}, {
|
|
33690
|
+
type: "a",
|
|
33691
|
+
rx: cornerRadius,
|
|
33692
|
+
ry: cornerRadius,
|
|
33693
|
+
xAxisRotation: 0,
|
|
33694
|
+
dx: incoming[0] * cornerRadius + outgoing[0] * cornerRadius,
|
|
33695
|
+
dy: incoming[1] * cornerRadius + outgoing[1] * cornerRadius,
|
|
33696
|
+
largeArcFlag: false,
|
|
33697
|
+
sweepFlag: true
|
|
33698
|
+
});
|
|
33699
|
+
}
|
|
33700
|
+
if (firstPoint.round) {
|
|
33701
|
+
const previous = uniquePoints[uniquePoints.length - 1].point;
|
|
33702
|
+
const incoming = unitDir2(previous, firstPoint.point);
|
|
33703
|
+
instructions.push({
|
|
33704
|
+
type: "L",
|
|
33705
|
+
x: firstPoint.point[0] - incoming[0] * cornerRadius,
|
|
33706
|
+
y: firstPoint.point[1] - incoming[1] * cornerRadius
|
|
33707
|
+
}, {
|
|
33708
|
+
type: "a",
|
|
33709
|
+
rx: cornerRadius,
|
|
33710
|
+
ry: cornerRadius,
|
|
33711
|
+
xAxisRotation: 0,
|
|
33712
|
+
dx: incoming[0] * cornerRadius + startDir[0] * cornerRadius,
|
|
33713
|
+
dy: incoming[1] * cornerRadius + startDir[1] * cornerRadius,
|
|
33714
|
+
largeArcFlag: false,
|
|
33715
|
+
sweepFlag: true
|
|
33716
|
+
});
|
|
33717
|
+
}
|
|
33718
|
+
instructions.push({ type: "Z" });
|
|
33719
|
+
return instructions;
|
|
33720
|
+
};
|
|
33721
|
+
var makeCallout = ({
|
|
33722
|
+
width = 500,
|
|
33723
|
+
height = 200,
|
|
33724
|
+
pointerLength = 40,
|
|
33725
|
+
pointerBaseWidth = 60,
|
|
33726
|
+
pointerPosition = 0.5,
|
|
33727
|
+
pointerDirection = "down",
|
|
33728
|
+
edgeRoundness = null,
|
|
33729
|
+
cornerRadius = 0
|
|
33730
|
+
}) => {
|
|
33731
|
+
ensurePositive("width", width);
|
|
33732
|
+
ensurePositive("height", height);
|
|
33733
|
+
ensurePositive("pointerLength", pointerLength);
|
|
33734
|
+
ensurePositive("pointerBaseWidth", pointerBaseWidth);
|
|
33735
|
+
if (typeof pointerPosition !== "number" || pointerPosition < 0 || pointerPosition > 1) {
|
|
33736
|
+
throw new Error(`"pointerPosition" must be a number between 0 and 1, got ${pointerPosition}`);
|
|
33737
|
+
}
|
|
33738
|
+
const horizontalInterval = pointerInterval({
|
|
33739
|
+
availableLength: width,
|
|
33740
|
+
pointerBaseWidth,
|
|
33741
|
+
pointerPosition
|
|
33742
|
+
});
|
|
33743
|
+
const verticalInterval = pointerInterval({
|
|
33744
|
+
availableLength: height,
|
|
33745
|
+
pointerBaseWidth,
|
|
33746
|
+
pointerPosition
|
|
33747
|
+
});
|
|
33748
|
+
const pointsByDirection = {
|
|
33749
|
+
up: [
|
|
33750
|
+
{ point: [0, pointerLength], round: true },
|
|
33751
|
+
{ point: [horizontalInterval.start, pointerLength], round: false },
|
|
33752
|
+
{ point: [horizontalInterval.center, 0], round: false },
|
|
33753
|
+
{ point: [horizontalInterval.end, pointerLength], round: false },
|
|
33754
|
+
{ point: [width, pointerLength], round: true },
|
|
33755
|
+
{ point: [width, height + pointerLength], round: true },
|
|
33756
|
+
{ point: [0, height + pointerLength], round: true },
|
|
33757
|
+
{ point: [0, pointerLength], round: true }
|
|
33758
|
+
],
|
|
33759
|
+
down: [
|
|
33760
|
+
{ point: [0, 0], round: true },
|
|
33761
|
+
{ point: [width, 0], round: true },
|
|
33762
|
+
{ point: [width, height], round: true },
|
|
33763
|
+
{ point: [horizontalInterval.end, height], round: false },
|
|
33764
|
+
{
|
|
33765
|
+
point: [horizontalInterval.center, height + pointerLength],
|
|
33766
|
+
round: false
|
|
33767
|
+
},
|
|
33768
|
+
{ point: [horizontalInterval.start, height], round: false },
|
|
33769
|
+
{ point: [0, height], round: true },
|
|
33770
|
+
{ point: [0, 0], round: true }
|
|
33771
|
+
],
|
|
33772
|
+
left: [
|
|
33773
|
+
{ point: [pointerLength, 0], round: true },
|
|
33774
|
+
{ point: [width + pointerLength, 0], round: true },
|
|
33775
|
+
{ point: [width + pointerLength, height], round: true },
|
|
33776
|
+
{ point: [pointerLength, height], round: true },
|
|
33777
|
+
{ point: [pointerLength, verticalInterval.end], round: false },
|
|
33778
|
+
{ point: [0, verticalInterval.center], round: false },
|
|
33779
|
+
{ point: [pointerLength, verticalInterval.start], round: false },
|
|
33780
|
+
{ point: [pointerLength, 0], round: true }
|
|
33781
|
+
],
|
|
33782
|
+
right: [
|
|
33783
|
+
{ point: [0, 0], round: true },
|
|
33784
|
+
{ point: [width, 0], round: true },
|
|
33785
|
+
{ point: [width, verticalInterval.start], round: false },
|
|
33786
|
+
{ point: [width + pointerLength, verticalInterval.center], round: false },
|
|
33787
|
+
{ point: [width, verticalInterval.end], round: false },
|
|
33788
|
+
{ point: [width, height], round: true },
|
|
33789
|
+
{ point: [0, height], round: true },
|
|
33790
|
+
{ point: [0, 0], round: true }
|
|
33791
|
+
]
|
|
33792
|
+
};
|
|
33793
|
+
const points = normalizeClosedPoints(pointsByDirection[pointerDirection]);
|
|
33794
|
+
const instructions = makeInstructions2({ points, edgeRoundness, cornerRadius });
|
|
33795
|
+
const path = serializeInstructions(instructions);
|
|
33796
|
+
const shapeWidth = pointerDirection === "left" || pointerDirection === "right" ? width + pointerLength : width;
|
|
33797
|
+
const shapeHeight = pointerDirection === "up" || pointerDirection === "down" ? height + pointerLength : height;
|
|
33798
|
+
const bodyX = pointerDirection === "left" ? pointerLength : 0;
|
|
33799
|
+
const bodyY = pointerDirection === "up" ? pointerLength : 0;
|
|
33800
|
+
return {
|
|
33801
|
+
width: shapeWidth,
|
|
33802
|
+
height: shapeHeight,
|
|
33803
|
+
instructions,
|
|
33804
|
+
path,
|
|
33805
|
+
transformOrigin: `${bodyX + width / 2} ${bodyY + height / 2}`
|
|
33806
|
+
};
|
|
33807
|
+
};
|
|
33808
|
+
var calloutSchema = makeShapeSchema({
|
|
33809
|
+
width: numberField({
|
|
33810
|
+
defaultValue: 500,
|
|
33811
|
+
description: "Width",
|
|
33812
|
+
min: 1
|
|
33813
|
+
}),
|
|
33814
|
+
height: numberField({
|
|
33815
|
+
defaultValue: 200,
|
|
33816
|
+
description: "Height",
|
|
33817
|
+
min: 1
|
|
33818
|
+
}),
|
|
33819
|
+
pointerLength: numberField({
|
|
33820
|
+
defaultValue: 40,
|
|
33821
|
+
description: "Pointer Length",
|
|
33822
|
+
min: 1
|
|
33823
|
+
}),
|
|
33824
|
+
pointerBaseWidth: numberField({
|
|
33825
|
+
defaultValue: 60,
|
|
33826
|
+
description: "Pointer Base Width",
|
|
33827
|
+
min: 1
|
|
33828
|
+
}),
|
|
33829
|
+
pointerPosition: numberField({
|
|
33830
|
+
defaultValue: 0.5,
|
|
33831
|
+
description: "Pointer Position",
|
|
33832
|
+
min: 0,
|
|
33833
|
+
max: 1,
|
|
33834
|
+
step: 0.01
|
|
33835
|
+
}),
|
|
33836
|
+
pointerDirection: enumField({
|
|
33837
|
+
defaultValue: "down",
|
|
33838
|
+
description: "Pointer Direction",
|
|
33839
|
+
variants: ["up", "down", "left", "right"]
|
|
33840
|
+
}),
|
|
33841
|
+
cornerRadius: numberField({
|
|
33842
|
+
defaultValue: 0,
|
|
33843
|
+
description: "Corner Radius",
|
|
33844
|
+
min: 0
|
|
33845
|
+
})
|
|
33846
|
+
});
|
|
33847
|
+
var CalloutInner = ({
|
|
33848
|
+
width,
|
|
33849
|
+
height,
|
|
33850
|
+
pointerLength,
|
|
33851
|
+
pointerBaseWidth,
|
|
33852
|
+
pointerPosition,
|
|
33853
|
+
pointerDirection,
|
|
33854
|
+
edgeRoundness,
|
|
33855
|
+
cornerRadius,
|
|
33856
|
+
...props
|
|
33857
|
+
}) => {
|
|
33858
|
+
return /* @__PURE__ */ jsx310(RenderSvg, {
|
|
33859
|
+
defaultName: "<Callout>",
|
|
33860
|
+
documentationLink: "https://www.remotion.dev/docs/shapes/callout",
|
|
33861
|
+
...makeCallout({
|
|
33862
|
+
width,
|
|
33863
|
+
height,
|
|
33864
|
+
pointerLength,
|
|
33865
|
+
pointerBaseWidth,
|
|
33866
|
+
pointerPosition,
|
|
33867
|
+
pointerDirection,
|
|
33868
|
+
edgeRoundness,
|
|
33869
|
+
cornerRadius
|
|
33870
|
+
}),
|
|
33871
|
+
...props
|
|
33872
|
+
});
|
|
33873
|
+
};
|
|
33874
|
+
var Callout = Internals.wrapInSchema({
|
|
33875
|
+
Component: CalloutInner,
|
|
33876
|
+
componentIdentity: "dev.remotion.shapes.Callout",
|
|
33877
|
+
schema: calloutSchema,
|
|
33878
|
+
supportsEffects: true
|
|
33879
|
+
});
|
|
33880
|
+
Internals.addSequenceStackTraces(Callout);
|
|
33388
33881
|
var makeCircle = ({ radius }) => {
|
|
33389
33882
|
const instructions = [
|
|
33390
33883
|
{
|
|
@@ -33433,7 +33926,7 @@ var circleSchema = makeShapeSchema({
|
|
|
33433
33926
|
})
|
|
33434
33927
|
});
|
|
33435
33928
|
var CircleInner = ({ radius, ...props }) => {
|
|
33436
|
-
return /* @__PURE__ */
|
|
33929
|
+
return /* @__PURE__ */ jsx42(RenderSvg, {
|
|
33437
33930
|
defaultName: "<Circle>",
|
|
33438
33931
|
documentationLink: "https://www.remotion.dev/docs/shapes/circle",
|
|
33439
33932
|
...makeCircle({ radius }),
|
|
@@ -33442,6 +33935,7 @@ var CircleInner = ({ radius, ...props }) => {
|
|
|
33442
33935
|
};
|
|
33443
33936
|
var Circle = Internals.wrapInSchema({
|
|
33444
33937
|
Component: CircleInner,
|
|
33938
|
+
componentIdentity: "dev.remotion.shapes.Circle",
|
|
33445
33939
|
schema: circleSchema,
|
|
33446
33940
|
supportsEffects: true
|
|
33447
33941
|
});
|
|
@@ -33489,7 +33983,7 @@ var ellipseSchema = makeShapeSchema({
|
|
|
33489
33983
|
})
|
|
33490
33984
|
});
|
|
33491
33985
|
var EllipseInner = ({ rx, ry, ...props }) => {
|
|
33492
|
-
return /* @__PURE__ */
|
|
33986
|
+
return /* @__PURE__ */ jsx52(RenderSvg, {
|
|
33493
33987
|
defaultName: "<Ellipse>",
|
|
33494
33988
|
documentationLink: "https://www.remotion.dev/docs/shapes/ellipse",
|
|
33495
33989
|
...makeEllipse({ rx, ry }),
|
|
@@ -33498,6 +33992,7 @@ var EllipseInner = ({ rx, ry, ...props }) => {
|
|
|
33498
33992
|
};
|
|
33499
33993
|
var Ellipse = Internals.wrapInSchema({
|
|
33500
33994
|
Component: EllipseInner,
|
|
33995
|
+
componentIdentity: "dev.remotion.shapes.Ellipse",
|
|
33501
33996
|
schema: ellipseSchema,
|
|
33502
33997
|
supportsEffects: true
|
|
33503
33998
|
});
|
|
@@ -33621,7 +34116,7 @@ var HeartInner = ({
|
|
|
33621
34116
|
depthAdjustment = 0,
|
|
33622
34117
|
...props
|
|
33623
34118
|
}) => {
|
|
33624
|
-
return /* @__PURE__ */
|
|
34119
|
+
return /* @__PURE__ */ jsx62(RenderSvg, {
|
|
33625
34120
|
defaultName: "<Heart>",
|
|
33626
34121
|
documentationLink: "https://www.remotion.dev/docs/shapes/heart",
|
|
33627
34122
|
...makeHeart({
|
|
@@ -33635,6 +34130,7 @@ var HeartInner = ({
|
|
|
33635
34130
|
};
|
|
33636
34131
|
var Heart = Internals.wrapInSchema({
|
|
33637
34132
|
Component: HeartInner,
|
|
34133
|
+
componentIdentity: "dev.remotion.shapes.Heart",
|
|
33638
34134
|
schema: heartSchema,
|
|
33639
34135
|
supportsEffects: true
|
|
33640
34136
|
});
|
|
@@ -33779,7 +34275,7 @@ var PieInner = ({
|
|
|
33779
34275
|
rotation,
|
|
33780
34276
|
...props
|
|
33781
34277
|
}) => {
|
|
33782
|
-
return /* @__PURE__ */
|
|
34278
|
+
return /* @__PURE__ */ jsx72(RenderSvg, {
|
|
33783
34279
|
defaultName: "<Pie>",
|
|
33784
34280
|
documentationLink: "https://www.remotion.dev/docs/shapes/pie",
|
|
33785
34281
|
...makePie({ radius, progress, closePath, counterClockwise, rotation }),
|
|
@@ -33788,134 +34284,11 @@ var PieInner = ({
|
|
|
33788
34284
|
};
|
|
33789
34285
|
var Pie = Internals.wrapInSchema({
|
|
33790
34286
|
Component: PieInner,
|
|
34287
|
+
componentIdentity: "dev.remotion.shapes.Pie",
|
|
33791
34288
|
schema: pieSchema,
|
|
33792
34289
|
supportsEffects: true
|
|
33793
34290
|
});
|
|
33794
34291
|
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
34292
|
function polygon({
|
|
33920
34293
|
points,
|
|
33921
34294
|
radius,
|
|
@@ -33996,7 +34369,7 @@ var PolygonInner = ({
|
|
|
33996
34369
|
edgeRoundness,
|
|
33997
34370
|
...props
|
|
33998
34371
|
}) => {
|
|
33999
|
-
return /* @__PURE__ */
|
|
34372
|
+
return /* @__PURE__ */ jsx82(RenderSvg, {
|
|
34000
34373
|
defaultName: "<Polygon>",
|
|
34001
34374
|
documentationLink: "https://www.remotion.dev/docs/shapes/polygon",
|
|
34002
34375
|
...makePolygon({
|
|
@@ -34010,6 +34383,7 @@ var PolygonInner = ({
|
|
|
34010
34383
|
};
|
|
34011
34384
|
var Polygon = Internals.wrapInSchema({
|
|
34012
34385
|
Component: PolygonInner,
|
|
34386
|
+
componentIdentity: "dev.remotion.shapes.Polygon",
|
|
34013
34387
|
schema: polygonSchema,
|
|
34014
34388
|
supportsEffects: true
|
|
34015
34389
|
});
|
|
@@ -34066,7 +34440,7 @@ var RectInner = ({
|
|
|
34066
34440
|
cornerRadius,
|
|
34067
34441
|
...props
|
|
34068
34442
|
}) => {
|
|
34069
|
-
return /* @__PURE__ */
|
|
34443
|
+
return /* @__PURE__ */ jsx92(RenderSvg, {
|
|
34070
34444
|
defaultName: "<Rect>",
|
|
34071
34445
|
documentationLink: "https://www.remotion.dev/docs/shapes/rect",
|
|
34072
34446
|
...makeRect({ height, width, edgeRoundness, cornerRadius }),
|
|
@@ -34075,6 +34449,7 @@ var RectInner = ({
|
|
|
34075
34449
|
};
|
|
34076
34450
|
var Rect = Internals.wrapInSchema({
|
|
34077
34451
|
Component: RectInner,
|
|
34452
|
+
componentIdentity: "dev.remotion.shapes.Rect",
|
|
34078
34453
|
schema: rectSchema,
|
|
34079
34454
|
supportsEffects: true
|
|
34080
34455
|
});
|
|
@@ -34169,7 +34544,7 @@ var StarInner = ({
|
|
|
34169
34544
|
edgeRoundness,
|
|
34170
34545
|
...props
|
|
34171
34546
|
}) => {
|
|
34172
|
-
return /* @__PURE__ */
|
|
34547
|
+
return /* @__PURE__ */ jsx102(RenderSvg, {
|
|
34173
34548
|
defaultName: "<Star>",
|
|
34174
34549
|
documentationLink: "https://www.remotion.dev/docs/shapes/star",
|
|
34175
34550
|
...makeStar({
|
|
@@ -34184,6 +34559,7 @@ var StarInner = ({
|
|
|
34184
34559
|
};
|
|
34185
34560
|
var Star = Internals.wrapInSchema({
|
|
34186
34561
|
Component: StarInner,
|
|
34562
|
+
componentIdentity: "dev.remotion.shapes.Star",
|
|
34187
34563
|
schema: starSchema,
|
|
34188
34564
|
supportsEffects: true
|
|
34189
34565
|
});
|
|
@@ -34280,7 +34656,7 @@ var TriangleInner = ({
|
|
|
34280
34656
|
cornerRadius,
|
|
34281
34657
|
...props
|
|
34282
34658
|
}) => {
|
|
34283
|
-
return /* @__PURE__ */
|
|
34659
|
+
return /* @__PURE__ */ jsx112(RenderSvg, {
|
|
34284
34660
|
defaultName: "<Triangle>",
|
|
34285
34661
|
documentationLink: "https://www.remotion.dev/docs/shapes/triangle",
|
|
34286
34662
|
...makeTriangle({ length: length2, direction, edgeRoundness, cornerRadius }),
|
|
@@ -34289,6 +34665,7 @@ var TriangleInner = ({
|
|
|
34289
34665
|
};
|
|
34290
34666
|
var Triangle = Internals.wrapInSchema({
|
|
34291
34667
|
Component: TriangleInner,
|
|
34668
|
+
componentIdentity: "dev.remotion.shapes.Triangle",
|
|
34292
34669
|
schema: triangleSchema,
|
|
34293
34670
|
supportsEffects: true
|
|
34294
34671
|
});
|
|
@@ -35369,7 +35746,7 @@ import { jsx as jsx83, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
|
35369
35746
|
import { jsx as jsx93 } from "react/jsx-runtime";
|
|
35370
35747
|
import React72 from "react";
|
|
35371
35748
|
import { jsx as jsx103 } from "react/jsx-runtime";
|
|
35372
|
-
import { jsx as
|
|
35749
|
+
import { jsx as jsx113 } from "react/jsx-runtime";
|
|
35373
35750
|
import { jsx as jsx122 } from "react/jsx-runtime";
|
|
35374
35751
|
import * as React36 from "react";
|
|
35375
35752
|
import * as ReactDOM4 from "react-dom";
|
|
@@ -35929,7 +36306,7 @@ var Button = ({
|
|
|
35929
36306
|
const [dimensions, setDimensions] = useState22(null);
|
|
35930
36307
|
const ref = useRef210(null);
|
|
35931
36308
|
const { isActive, progress } = useHoverTransforms(ref, Boolean(disabled || loading));
|
|
35932
|
-
const onPointerEnter =
|
|
36309
|
+
const onPointerEnter = useCallback27((e) => {
|
|
35933
36310
|
if (e.pointerType !== "mouse") {
|
|
35934
36311
|
return;
|
|
35935
36312
|
}
|
|
@@ -35966,7 +36343,7 @@ var Button = ({
|
|
|
35966
36343
|
const isDisabled = disabled || loading;
|
|
35967
36344
|
const isAnchor = !asChild && "href" in rest && rest.href !== undefined;
|
|
35968
36345
|
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 =
|
|
36346
|
+
const preventInteraction = useCallback27((e) => {
|
|
35970
36347
|
e.preventDefault();
|
|
35971
36348
|
e.stopPropagation();
|
|
35972
36349
|
}, []);
|
|
@@ -36177,7 +36554,7 @@ var Link = ({
|
|
|
36177
36554
|
className,
|
|
36178
36555
|
...props
|
|
36179
36556
|
}) => {
|
|
36180
|
-
return /* @__PURE__ */
|
|
36557
|
+
return /* @__PURE__ */ jsx113("a", {
|
|
36181
36558
|
...props,
|
|
36182
36559
|
className: cn(className, "text-brand underline underline-offset-4"),
|
|
36183
36560
|
children: props.children
|
|
@@ -42060,7 +42437,7 @@ var Triangle22 = (props) => {
|
|
|
42060
42437
|
};
|
|
42061
42438
|
|
|
42062
42439
|
// src/components/prompts/PromptsSubmit.tsx
|
|
42063
|
-
import { useCallback as
|
|
42440
|
+
import { useCallback as useCallback40, useEffect as useEffect47, useRef as useRef50, useState as useState45 } from "react";
|
|
42064
42441
|
|
|
42065
42442
|
// src/components/prompts/config.ts
|
|
42066
42443
|
var REMOTION_PRO_ORIGIN = "https://www.remotion.pro";
|
|
@@ -44536,10 +44913,10 @@ import"react-dom";
|
|
|
44536
44913
|
"use client";
|
|
44537
44914
|
|
|
44538
44915
|
// src/components/prompts/MuxPlayer.tsx
|
|
44539
|
-
import { useCallback as
|
|
44916
|
+
import { useCallback as useCallback39 } from "react";
|
|
44540
44917
|
import { jsx as jsx45, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
44541
44918
|
var MuxPlayer = ({ playbackId, title, rounded = true }) => {
|
|
44542
|
-
const onProviderChange =
|
|
44919
|
+
const onProviderChange = useCallback39((provider2, _e) => {
|
|
44543
44920
|
if (isHLSProvider(provider2)) {
|
|
44544
44921
|
provider2.library = () => import("hls.js");
|
|
44545
44922
|
}
|
|
@@ -44636,7 +45013,7 @@ var PromptsSubmitPage = () => {
|
|
|
44636
45013
|
};
|
|
44637
45014
|
}, []);
|
|
44638
45015
|
const fileInputRef = useRef50(null);
|
|
44639
|
-
const startUpload =
|
|
45016
|
+
const startUpload = useCallback40(async (file) => {
|
|
44640
45017
|
setUploadState({ type: "uploading", progress: 0 });
|
|
44641
45018
|
try {
|
|
44642
45019
|
const res = await fetch(`${REMOTION_PRO_ORIGIN}/api/prompts/upload`, {
|
|
@@ -44685,13 +45062,13 @@ var PromptsSubmitPage = () => {
|
|
|
44685
45062
|
});
|
|
44686
45063
|
}
|
|
44687
45064
|
}, []);
|
|
44688
|
-
const onFileSelect =
|
|
45065
|
+
const onFileSelect = useCallback40((e2) => {
|
|
44689
45066
|
const file = e2.target.files?.[0];
|
|
44690
45067
|
if (!file)
|
|
44691
45068
|
return;
|
|
44692
45069
|
startUpload(file);
|
|
44693
45070
|
}, [startUpload]);
|
|
44694
|
-
const onDrop =
|
|
45071
|
+
const onDrop = useCallback40((e2) => {
|
|
44695
45072
|
e2.preventDefault();
|
|
44696
45073
|
setIsDragging(false);
|
|
44697
45074
|
if (uploadState.type !== "idle")
|
|
@@ -44703,21 +45080,21 @@ var PromptsSubmitPage = () => {
|
|
|
44703
45080
|
return;
|
|
44704
45081
|
startUpload(file);
|
|
44705
45082
|
}, [startUpload, uploadState.type]);
|
|
44706
|
-
const onDragOver =
|
|
45083
|
+
const onDragOver = useCallback40((e2) => {
|
|
44707
45084
|
e2.preventDefault();
|
|
44708
45085
|
}, []);
|
|
44709
|
-
const onDragEnter =
|
|
45086
|
+
const onDragEnter = useCallback40(() => {
|
|
44710
45087
|
if (uploadState.type === "idle") {
|
|
44711
45088
|
setIsDragging(true);
|
|
44712
45089
|
}
|
|
44713
45090
|
}, [uploadState.type]);
|
|
44714
|
-
const onDragLeave =
|
|
45091
|
+
const onDragLeave = useCallback40((e2) => {
|
|
44715
45092
|
if (e2.currentTarget === e2.target) {
|
|
44716
45093
|
setIsDragging(false);
|
|
44717
45094
|
}
|
|
44718
45095
|
}, []);
|
|
44719
45096
|
const submitPossible = title.length > 0 && title.length <= 80 && prompt.length > 0 && usernameType && username.length > 0 && uploadState.type === "ready" && (submitStatus.type === "idle" || submitStatus.type === "error");
|
|
44720
|
-
const submit =
|
|
45097
|
+
const submit = useCallback40(async () => {
|
|
44721
45098
|
if (!submitPossible || uploadState.type !== "ready")
|
|
44722
45099
|
return;
|
|
44723
45100
|
setSubmitStatus({ type: "submitting" });
|