@remotion/studio 4.0.401 → 4.0.403
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/components/Menu/MenuSubItem.d.ts +1 -0
- package/dist/components/Menu/MenuSubItem.js +13 -5
- package/dist/components/NewComposition/ComboBox.d.ts +1 -0
- package/dist/components/NewComposition/MenuContent.js +18 -12
- package/dist/components/RenderModal/WebRenderModal.js +29 -4
- package/dist/components/RenderModal/WebRenderModalAudio.d.ts +9 -1
- package/dist/components/RenderModal/WebRenderModalAudio.js +51 -2
- package/dist/components/RenderModal/WebRenderModalBasic.d.ts +2 -1
- package/dist/components/RenderModal/WebRenderModalBasic.js +21 -60
- package/dist/components/RenderModal/WebRenderModalPicture.js +2 -60
- package/dist/components/RenderModal/quality-options.d.ts +3 -0
- package/dist/components/RenderModal/quality-options.js +26 -0
- package/dist/components/RenderModal/use-encodable-audio-codecs.d.ts +2 -0
- package/dist/components/RenderModal/use-encodable-audio-codecs.js +49 -0
- package/dist/components/RenderModal/use-encodable-video-codecs.d.ts +2 -0
- package/dist/components/RenderModal/use-encodable-video-codecs.js +49 -0
- package/dist/esm/{chunk-71hmw645.js → chunk-64385d31.js} +629 -453
- package/dist/esm/internals.mjs +629 -453
- package/dist/esm/previewEntry.mjs +643 -467
- package/dist/esm/renderEntry.mjs +1 -1
- package/package.json +9 -9
|
@@ -34,7 +34,7 @@ import { Internals as Internals65 } from "remotion";
|
|
|
34
34
|
|
|
35
35
|
// src/components/Editor.tsx
|
|
36
36
|
import { PlayerInternals as PlayerInternals19 } from "@remotion/player";
|
|
37
|
-
import
|
|
37
|
+
import React178, { useCallback as useCallback135, useEffect as useEffect82, useMemo as useMemo137 } from "react";
|
|
38
38
|
import { Internals as Internals61 } from "remotion";
|
|
39
39
|
|
|
40
40
|
// src/helpers/colors.ts
|
|
@@ -1899,7 +1899,8 @@ var MenuSubItem = ({
|
|
|
1899
1899
|
subMenu,
|
|
1900
1900
|
onQuitMenu,
|
|
1901
1901
|
subMenuActivated,
|
|
1902
|
-
setSubMenuActivated
|
|
1902
|
+
setSubMenuActivated,
|
|
1903
|
+
disabled
|
|
1903
1904
|
}) => {
|
|
1904
1905
|
const [hovered, setHovered] = useState10(false);
|
|
1905
1906
|
const ref = useRef6(null);
|
|
@@ -1912,21 +1913,29 @@ var MenuSubItem = ({
|
|
|
1912
1913
|
const style = useMemo14(() => {
|
|
1913
1914
|
return {
|
|
1914
1915
|
...container4,
|
|
1915
|
-
backgroundColor: selected ? CLEAR_HOVER : "transparent"
|
|
1916
|
+
backgroundColor: selected && !disabled ? CLEAR_HOVER : "transparent",
|
|
1917
|
+
opacity: disabled ? 0.5 : 1,
|
|
1918
|
+
cursor: disabled ? "not-allowed" : "default"
|
|
1916
1919
|
};
|
|
1917
|
-
}, [selected]);
|
|
1920
|
+
}, [selected, disabled]);
|
|
1918
1921
|
const onPointerUp = useCallback8((e) => {
|
|
1922
|
+
if (disabled) {
|
|
1923
|
+
return;
|
|
1924
|
+
}
|
|
1919
1925
|
if (subMenu) {
|
|
1920
1926
|
setSubMenuActivated("with-mouse");
|
|
1921
1927
|
setHovered(true);
|
|
1922
1928
|
return;
|
|
1923
1929
|
}
|
|
1924
1930
|
onActionChosen(id, e);
|
|
1925
|
-
}, [id, onActionChosen, setSubMenuActivated, subMenu]);
|
|
1931
|
+
}, [disabled, id, onActionChosen, setSubMenuActivated, subMenu]);
|
|
1926
1932
|
const onPointerEnter = useCallback8(() => {
|
|
1933
|
+
if (disabled) {
|
|
1934
|
+
return;
|
|
1935
|
+
}
|
|
1927
1936
|
onItemSelected(id);
|
|
1928
1937
|
setHovered(true);
|
|
1929
|
-
}, [id, onItemSelected]);
|
|
1938
|
+
}, [disabled, id, onItemSelected]);
|
|
1930
1939
|
const onPointerLeave = useCallback8(() => {
|
|
1931
1940
|
setHovered(false);
|
|
1932
1941
|
}, []);
|
|
@@ -2045,6 +2054,9 @@ var MenuContent = ({
|
|
|
2045
2054
|
const onItemSelected = useCallback9((id) => {
|
|
2046
2055
|
setSelectedItem(id);
|
|
2047
2056
|
}, []);
|
|
2057
|
+
const isItemSelectable = useCallback9((v) => {
|
|
2058
|
+
return v.type !== "divider" && !v.disabled;
|
|
2059
|
+
}, []);
|
|
2048
2060
|
const onArrowUp = useCallback9(() => {
|
|
2049
2061
|
setSelectedItem((prevItem) => {
|
|
2050
2062
|
if (prevItem === null) {
|
|
@@ -2054,31 +2066,31 @@ var MenuContent = ({
|
|
|
2054
2066
|
if (topItemCanBeUnselected && index === 0 || prevItem === null) {
|
|
2055
2067
|
return null;
|
|
2056
2068
|
}
|
|
2057
|
-
const previousItems = values.filter((v, i) => i < index && v
|
|
2069
|
+
const previousItems = values.filter((v, i) => i < index && isItemSelectable(v));
|
|
2058
2070
|
if (previousItems.length > 0) {
|
|
2059
2071
|
return previousItems[previousItems.length - 1].id;
|
|
2060
2072
|
}
|
|
2061
|
-
const
|
|
2062
|
-
if (
|
|
2063
|
-
return
|
|
2073
|
+
const firstSelectable = values.find((v) => isItemSelectable(v));
|
|
2074
|
+
if (firstSelectable) {
|
|
2075
|
+
return firstSelectable.id;
|
|
2064
2076
|
}
|
|
2065
2077
|
throw new Error("could not find previous item");
|
|
2066
2078
|
});
|
|
2067
|
-
}, [topItemCanBeUnselected, values]);
|
|
2079
|
+
}, [topItemCanBeUnselected, values, isItemSelectable]);
|
|
2068
2080
|
const onArrowDown = useCallback9(() => {
|
|
2069
2081
|
setSelectedItem((prevItem) => {
|
|
2070
2082
|
const index = values.findIndex((val) => val.id === prevItem);
|
|
2071
|
-
const nextItem = values.find((v, i) => i > index && v
|
|
2083
|
+
const nextItem = values.find((v, i) => i > index && isItemSelectable(v));
|
|
2072
2084
|
if (nextItem) {
|
|
2073
2085
|
return nextItem.id;
|
|
2074
2086
|
}
|
|
2075
|
-
const
|
|
2076
|
-
if (
|
|
2077
|
-
return
|
|
2087
|
+
const lastSelectable = values.slice().reverse().find((v) => isItemSelectable(v));
|
|
2088
|
+
if (lastSelectable) {
|
|
2089
|
+
return lastSelectable.id;
|
|
2078
2090
|
}
|
|
2079
2091
|
throw new Error("could not find next item");
|
|
2080
2092
|
});
|
|
2081
|
-
}, [values]);
|
|
2093
|
+
}, [values, isItemSelectable]);
|
|
2082
2094
|
const onEnter = useCallback9(() => {
|
|
2083
2095
|
if (selectedItem === null) {
|
|
2084
2096
|
return onHide();
|
|
@@ -2090,6 +2102,9 @@ var MenuContent = ({
|
|
|
2090
2102
|
if (item.type === "divider") {
|
|
2091
2103
|
throw new Error("cannot find divider");
|
|
2092
2104
|
}
|
|
2105
|
+
if (item.disabled) {
|
|
2106
|
+
return;
|
|
2107
|
+
}
|
|
2093
2108
|
if (item.subMenu) {
|
|
2094
2109
|
return setSubMenuActivated("without-mouse");
|
|
2095
2110
|
}
|
|
@@ -2267,7 +2282,8 @@ var MenuContent = ({
|
|
|
2267
2282
|
onQuitMenu: onHide,
|
|
2268
2283
|
onNextMenu,
|
|
2269
2284
|
subMenuActivated,
|
|
2270
|
-
setSubMenuActivated
|
|
2285
|
+
setSubMenuActivated,
|
|
2286
|
+
disabled: item.disabled
|
|
2271
2287
|
}, item.id);
|
|
2272
2288
|
})
|
|
2273
2289
|
});
|
|
@@ -42595,8 +42611,12 @@ var RenderModalWithLoader = (props) => {
|
|
|
42595
42611
|
|
|
42596
42612
|
// src/components/RenderModal/WebRenderModal.tsx
|
|
42597
42613
|
import { getDefaultOutLocation as getDefaultOutLocation2 } from "@remotion/studio-shared";
|
|
42598
|
-
import {
|
|
42599
|
-
|
|
42614
|
+
import {
|
|
42615
|
+
getDefaultAudioCodecForContainer,
|
|
42616
|
+
renderMediaOnWeb,
|
|
42617
|
+
renderStillOnWeb
|
|
42618
|
+
} from "@remotion/web-renderer";
|
|
42619
|
+
import { useCallback as useCallback131, useContext as useContext82, useMemo as useMemo134, useState as useState84 } from "react";
|
|
42600
42620
|
|
|
42601
42621
|
// src/icons/certificate.tsx
|
|
42602
42622
|
import { jsx as jsx257 } from "react/jsx-runtime";
|
|
@@ -42610,6 +42630,90 @@ var CertificateIcon = (props) => /* @__PURE__ */ jsx257("svg", {
|
|
|
42610
42630
|
})
|
|
42611
42631
|
});
|
|
42612
42632
|
|
|
42633
|
+
// src/components/RenderModal/use-encodable-audio-codecs.ts
|
|
42634
|
+
import {
|
|
42635
|
+
getEncodableAudioCodecs,
|
|
42636
|
+
getSupportedAudioCodecsForContainer
|
|
42637
|
+
} from "@remotion/web-renderer";
|
|
42638
|
+
import { useEffect as useEffect79, useRef as useRef44, useState as useState82 } from "react";
|
|
42639
|
+
var useEncodableAudioCodecs = (container60) => {
|
|
42640
|
+
const cacheRef = useRef44({});
|
|
42641
|
+
const [codecsByContainer, setCodecsByContainer] = useState82(() => {
|
|
42642
|
+
return {
|
|
42643
|
+
[container60]: getSupportedAudioCodecsForContainer(container60)
|
|
42644
|
+
};
|
|
42645
|
+
});
|
|
42646
|
+
useEffect79(() => {
|
|
42647
|
+
const cached = cacheRef.current[container60];
|
|
42648
|
+
if (cached) {
|
|
42649
|
+
return;
|
|
42650
|
+
}
|
|
42651
|
+
const supported = getSupportedAudioCodecsForContainer(container60);
|
|
42652
|
+
cacheRef.current[container60] = {
|
|
42653
|
+
codecs: supported,
|
|
42654
|
+
status: "fetching"
|
|
42655
|
+
};
|
|
42656
|
+
getEncodableAudioCodecs(container60).then((encodable) => {
|
|
42657
|
+
cacheRef.current[container60] = {
|
|
42658
|
+
codecs: encodable,
|
|
42659
|
+
status: "done"
|
|
42660
|
+
};
|
|
42661
|
+
setCodecsByContainer((prev) => ({
|
|
42662
|
+
...prev,
|
|
42663
|
+
[container60]: encodable
|
|
42664
|
+
}));
|
|
42665
|
+
}).catch(() => {
|
|
42666
|
+
cacheRef.current[container60] = {
|
|
42667
|
+
codecs: supported,
|
|
42668
|
+
status: "done"
|
|
42669
|
+
};
|
|
42670
|
+
});
|
|
42671
|
+
}, [container60]);
|
|
42672
|
+
return codecsByContainer[container60] ?? getSupportedAudioCodecsForContainer(container60);
|
|
42673
|
+
};
|
|
42674
|
+
|
|
42675
|
+
// src/components/RenderModal/use-encodable-video-codecs.ts
|
|
42676
|
+
import {
|
|
42677
|
+
getEncodableVideoCodecs,
|
|
42678
|
+
getSupportedVideoCodecsForContainer
|
|
42679
|
+
} from "@remotion/web-renderer";
|
|
42680
|
+
import { useEffect as useEffect80, useRef as useRef45, useState as useState83 } from "react";
|
|
42681
|
+
var useEncodableVideoCodecs = (container60) => {
|
|
42682
|
+
const cacheRef = useRef45({});
|
|
42683
|
+
const [codecsByContainer, setCodecsByContainer] = useState83(() => {
|
|
42684
|
+
return {
|
|
42685
|
+
[container60]: getSupportedVideoCodecsForContainer(container60)
|
|
42686
|
+
};
|
|
42687
|
+
});
|
|
42688
|
+
useEffect80(() => {
|
|
42689
|
+
const cached = cacheRef.current[container60];
|
|
42690
|
+
if (cached) {
|
|
42691
|
+
return;
|
|
42692
|
+
}
|
|
42693
|
+
const supported = getSupportedVideoCodecsForContainer(container60);
|
|
42694
|
+
cacheRef.current[container60] = {
|
|
42695
|
+
codecs: supported,
|
|
42696
|
+
status: "fetching"
|
|
42697
|
+
};
|
|
42698
|
+
getEncodableVideoCodecs(container60).then((encodable) => {
|
|
42699
|
+
cacheRef.current[container60] = {
|
|
42700
|
+
codecs: encodable,
|
|
42701
|
+
status: "done"
|
|
42702
|
+
};
|
|
42703
|
+
setCodecsByContainer((prev) => ({
|
|
42704
|
+
...prev,
|
|
42705
|
+
[container60]: encodable
|
|
42706
|
+
}));
|
|
42707
|
+
}).catch(() => {
|
|
42708
|
+
cacheRef.current[container60] = {
|
|
42709
|
+
codecs: supported,
|
|
42710
|
+
status: "done"
|
|
42711
|
+
};
|
|
42712
|
+
});
|
|
42713
|
+
}, [container60]);
|
|
42714
|
+
return codecsByContainer[container60] ?? getSupportedVideoCodecsForContainer(container60);
|
|
42715
|
+
};
|
|
42716
|
+
|
|
42613
42717
|
// src/components/RenderModal/WebRendererExperimentalBadge.tsx
|
|
42614
42718
|
import { jsx as jsx258, jsxs as jsxs135 } from "react/jsx-runtime";
|
|
42615
42719
|
var row8 = {
|
|
@@ -42813,26 +42917,165 @@ var WebRenderModalAdvanced = ({
|
|
|
42813
42917
|
};
|
|
42814
42918
|
|
|
42815
42919
|
// src/components/RenderModal/WebRenderModalAudio.tsx
|
|
42920
|
+
import { getSupportedAudioCodecsForContainer as getSupportedAudioCodecsForContainer2 } from "@remotion/web-renderer";
|
|
42921
|
+
import { useMemo as useMemo130 } from "react";
|
|
42922
|
+
|
|
42923
|
+
// src/components/RenderModal/quality-options.tsx
|
|
42816
42924
|
import { jsx as jsx260 } from "react/jsx-runtime";
|
|
42925
|
+
var QUALITY_OPTIONS = [
|
|
42926
|
+
{ value: "very-low", label: "Very Low" },
|
|
42927
|
+
{ value: "low", label: "Low" },
|
|
42928
|
+
{ value: "medium", label: "Medium" },
|
|
42929
|
+
{ value: "high", label: "High" },
|
|
42930
|
+
{ value: "very-high", label: "Very High" }
|
|
42931
|
+
];
|
|
42932
|
+
var getQualityOptions = (selectedQuality, setQuality) => {
|
|
42933
|
+
return QUALITY_OPTIONS.map(({ value, label: label11 }) => ({
|
|
42934
|
+
label: label11,
|
|
42935
|
+
onClick: () => setQuality(value),
|
|
42936
|
+
leftItem: selectedQuality === value ? /* @__PURE__ */ jsx260(Checkmark, {}) : null,
|
|
42937
|
+
id: value,
|
|
42938
|
+
keyHint: null,
|
|
42939
|
+
quickSwitcherLabel: null,
|
|
42940
|
+
subMenu: null,
|
|
42941
|
+
type: "item",
|
|
42942
|
+
value
|
|
42943
|
+
}));
|
|
42944
|
+
};
|
|
42945
|
+
|
|
42946
|
+
// src/components/RenderModal/WebRenderModalAudio.tsx
|
|
42947
|
+
import { jsx as jsx261, jsxs as jsxs137, Fragment as Fragment45 } from "react/jsx-runtime";
|
|
42817
42948
|
var container60 = {
|
|
42818
42949
|
flex: 1,
|
|
42819
42950
|
overflowY: "auto"
|
|
42820
42951
|
};
|
|
42821
|
-
var
|
|
42822
|
-
|
|
42952
|
+
var fallbackNoticeStyle = {
|
|
42953
|
+
backgroundColor: "rgba(59, 130, 246, 0.15)",
|
|
42954
|
+
border: "1px solid rgba(59, 130, 246, 0.4)",
|
|
42955
|
+
borderRadius: 4,
|
|
42956
|
+
padding: "8px 12px",
|
|
42957
|
+
marginLeft: 16,
|
|
42958
|
+
marginRight: 16,
|
|
42959
|
+
marginTop: 8,
|
|
42960
|
+
fontSize: 13,
|
|
42961
|
+
lineHeight: 1.4,
|
|
42962
|
+
color: "#60a5fa"
|
|
42963
|
+
};
|
|
42964
|
+
var humanReadableWebAudioCodec = (audioCodec) => {
|
|
42965
|
+
switch (audioCodec) {
|
|
42966
|
+
case "aac":
|
|
42967
|
+
return "AAC";
|
|
42968
|
+
case "opus":
|
|
42969
|
+
return "Opus";
|
|
42970
|
+
default:
|
|
42971
|
+
return audioCodec;
|
|
42972
|
+
}
|
|
42973
|
+
};
|
|
42974
|
+
var WebRenderModalAudio = ({
|
|
42975
|
+
muted,
|
|
42976
|
+
setMuted,
|
|
42977
|
+
audioCodec,
|
|
42978
|
+
setAudioCodec,
|
|
42979
|
+
audioBitrate,
|
|
42980
|
+
setAudioBitrate,
|
|
42981
|
+
container: videoContainer,
|
|
42982
|
+
encodableCodecs,
|
|
42983
|
+
effectiveAudioCodec
|
|
42984
|
+
}) => {
|
|
42985
|
+
const containerSupported = useMemo130(() => getSupportedAudioCodecsForContainer2(videoContainer), [videoContainer]);
|
|
42986
|
+
const audioCodecOptions = useMemo130(() => {
|
|
42987
|
+
return containerSupported.map((codec) => {
|
|
42988
|
+
const isEncodable = encodableCodecs.includes(codec);
|
|
42989
|
+
return {
|
|
42990
|
+
label: humanReadableWebAudioCodec(codec),
|
|
42991
|
+
onClick: () => setAudioCodec(codec),
|
|
42992
|
+
leftItem: audioCodec === codec ? /* @__PURE__ */ jsx261(Checkmark, {}) : null,
|
|
42993
|
+
id: codec,
|
|
42994
|
+
keyHint: null,
|
|
42995
|
+
quickSwitcherLabel: null,
|
|
42996
|
+
subMenu: null,
|
|
42997
|
+
type: "item",
|
|
42998
|
+
value: codec,
|
|
42999
|
+
disabled: !isEncodable
|
|
43000
|
+
};
|
|
43001
|
+
});
|
|
43002
|
+
}, [containerSupported, encodableCodecs, audioCodec, setAudioCodec]);
|
|
43003
|
+
const audioBitrateOptions = useMemo130(() => getQualityOptions(audioBitrate, setAudioBitrate), [audioBitrate, setAudioBitrate]);
|
|
43004
|
+
return /* @__PURE__ */ jsxs137("div", {
|
|
42823
43005
|
style: container60,
|
|
42824
43006
|
className: VERTICAL_SCROLLBAR_CLASSNAME,
|
|
42825
|
-
children:
|
|
42826
|
-
|
|
42827
|
-
|
|
42828
|
-
|
|
42829
|
-
|
|
43007
|
+
children: [
|
|
43008
|
+
/* @__PURE__ */ jsx261(MutedSetting, {
|
|
43009
|
+
enforceAudioTrack: false,
|
|
43010
|
+
muted,
|
|
43011
|
+
setMuted
|
|
43012
|
+
}),
|
|
43013
|
+
!muted ? /* @__PURE__ */ jsxs137(Fragment45, {
|
|
43014
|
+
children: [
|
|
43015
|
+
/* @__PURE__ */ jsx261(RenderModalHr, {}),
|
|
43016
|
+
/* @__PURE__ */ jsxs137("div", {
|
|
43017
|
+
style: optionRow,
|
|
43018
|
+
children: [
|
|
43019
|
+
/* @__PURE__ */ jsxs137("div", {
|
|
43020
|
+
style: label5,
|
|
43021
|
+
children: [
|
|
43022
|
+
"Audio Quality",
|
|
43023
|
+
/* @__PURE__ */ jsx261(Spacing, {
|
|
43024
|
+
x: 0.5
|
|
43025
|
+
})
|
|
43026
|
+
]
|
|
43027
|
+
}),
|
|
43028
|
+
/* @__PURE__ */ jsx261("div", {
|
|
43029
|
+
style: rightRow,
|
|
43030
|
+
children: /* @__PURE__ */ jsx261(Combobox, {
|
|
43031
|
+
values: audioBitrateOptions,
|
|
43032
|
+
selectedId: audioBitrate,
|
|
43033
|
+
title: "Audio Quality"
|
|
43034
|
+
})
|
|
43035
|
+
})
|
|
43036
|
+
]
|
|
43037
|
+
}),
|
|
43038
|
+
/* @__PURE__ */ jsxs137("div", {
|
|
43039
|
+
style: optionRow,
|
|
43040
|
+
children: [
|
|
43041
|
+
/* @__PURE__ */ jsxs137("div", {
|
|
43042
|
+
style: label5,
|
|
43043
|
+
children: [
|
|
43044
|
+
"Audio Codec",
|
|
43045
|
+
/* @__PURE__ */ jsx261(Spacing, {
|
|
43046
|
+
x: 0.5
|
|
43047
|
+
})
|
|
43048
|
+
]
|
|
43049
|
+
}),
|
|
43050
|
+
/* @__PURE__ */ jsx261("div", {
|
|
43051
|
+
style: rightRow,
|
|
43052
|
+
children: /* @__PURE__ */ jsx261(Combobox, {
|
|
43053
|
+
values: audioCodecOptions,
|
|
43054
|
+
selectedId: audioCodec,
|
|
43055
|
+
title: "Audio Codec"
|
|
43056
|
+
})
|
|
43057
|
+
})
|
|
43058
|
+
]
|
|
43059
|
+
}),
|
|
43060
|
+
effectiveAudioCodec !== audioCodec ? /* @__PURE__ */ jsxs137("div", {
|
|
43061
|
+
style: fallbackNoticeStyle,
|
|
43062
|
+
children: [
|
|
43063
|
+
humanReadableWebAudioCodec(audioCodec),
|
|
43064
|
+
" is not available in this browser. Using ",
|
|
43065
|
+
humanReadableWebAudioCodec(effectiveAudioCodec),
|
|
43066
|
+
" ",
|
|
43067
|
+
"instead."
|
|
43068
|
+
]
|
|
43069
|
+
}) : null
|
|
43070
|
+
]
|
|
43071
|
+
}) : null
|
|
43072
|
+
]
|
|
42830
43073
|
});
|
|
42831
43074
|
};
|
|
42832
43075
|
|
|
42833
43076
|
// src/components/RenderModal/WebRenderModalBasic.tsx
|
|
42834
|
-
import { useMemo as
|
|
42835
|
-
import { jsx as
|
|
43077
|
+
import { useMemo as useMemo131 } from "react";
|
|
43078
|
+
import { jsx as jsx262, jsxs as jsxs138, Fragment as Fragment46 } from "react/jsx-runtime";
|
|
42836
43079
|
var tabContainer2 = {
|
|
42837
43080
|
flex: 1
|
|
42838
43081
|
};
|
|
@@ -42846,8 +43089,9 @@ var WebRenderModalBasic = ({
|
|
|
42846
43089
|
onFrameSetDirectly,
|
|
42847
43090
|
container: container61,
|
|
42848
43091
|
setContainerFormat,
|
|
42849
|
-
codec,
|
|
42850
43092
|
setCodec,
|
|
43093
|
+
encodableVideoCodecs,
|
|
43094
|
+
effectiveVideoCodec,
|
|
42851
43095
|
startFrame,
|
|
42852
43096
|
setStartFrame,
|
|
42853
43097
|
endFrame,
|
|
@@ -42858,7 +43102,7 @@ var WebRenderModalBasic = ({
|
|
|
42858
43102
|
logLevel,
|
|
42859
43103
|
setLogLevel
|
|
42860
43104
|
}) => {
|
|
42861
|
-
const imageFormatOptions =
|
|
43105
|
+
const imageFormatOptions = useMemo131(() => {
|
|
42862
43106
|
return [
|
|
42863
43107
|
{
|
|
42864
43108
|
label: "PNG",
|
|
@@ -42880,12 +43124,12 @@ var WebRenderModalBasic = ({
|
|
|
42880
43124
|
}
|
|
42881
43125
|
];
|
|
42882
43126
|
}, [imageFormat, setStillFormat]);
|
|
42883
|
-
const logLevelOptions =
|
|
43127
|
+
const logLevelOptions = useMemo131(() => {
|
|
42884
43128
|
return ["trace", "verbose", "info", "warn", "error"].map((level) => {
|
|
42885
43129
|
return {
|
|
42886
43130
|
label: humanReadableLogLevel(level),
|
|
42887
43131
|
onClick: () => setLogLevel(level),
|
|
42888
|
-
leftItem: logLevel === level ? /* @__PURE__ */
|
|
43132
|
+
leftItem: logLevel === level ? /* @__PURE__ */ jsx262(Checkmark, {}) : null,
|
|
42889
43133
|
id: level,
|
|
42890
43134
|
keyHint: null,
|
|
42891
43135
|
quickSwitcherLabel: null,
|
|
@@ -42895,12 +43139,12 @@ var WebRenderModalBasic = ({
|
|
|
42895
43139
|
};
|
|
42896
43140
|
});
|
|
42897
43141
|
}, [logLevel, setLogLevel]);
|
|
42898
|
-
const containerOptions =
|
|
43142
|
+
const containerOptions = useMemo131(() => {
|
|
42899
43143
|
return [
|
|
42900
43144
|
{
|
|
42901
43145
|
label: "MP4",
|
|
42902
43146
|
onClick: () => setContainerFormat("mp4"),
|
|
42903
|
-
leftItem: container61 === "mp4" ? /* @__PURE__ */
|
|
43147
|
+
leftItem: container61 === "mp4" ? /* @__PURE__ */ jsx262(Checkmark, {}) : null,
|
|
42904
43148
|
id: "mp4",
|
|
42905
43149
|
keyHint: null,
|
|
42906
43150
|
quickSwitcherLabel: null,
|
|
@@ -42911,7 +43155,7 @@ var WebRenderModalBasic = ({
|
|
|
42911
43155
|
{
|
|
42912
43156
|
label: "WebM",
|
|
42913
43157
|
onClick: () => setContainerFormat("webm"),
|
|
42914
|
-
leftItem: container61 === "webm" ? /* @__PURE__ */
|
|
43158
|
+
leftItem: container61 === "webm" ? /* @__PURE__ */ jsx262(Checkmark, {}) : null,
|
|
42915
43159
|
id: "webm",
|
|
42916
43160
|
keyHint: null,
|
|
42917
43161
|
quickSwitcherLabel: null,
|
|
@@ -42921,97 +43165,58 @@ var WebRenderModalBasic = ({
|
|
|
42921
43165
|
}
|
|
42922
43166
|
];
|
|
42923
43167
|
}, [container61, setContainerFormat]);
|
|
42924
|
-
const
|
|
42925
|
-
|
|
42926
|
-
|
|
42927
|
-
|
|
42928
|
-
|
|
42929
|
-
|
|
42930
|
-
|
|
42931
|
-
|
|
42932
|
-
|
|
42933
|
-
|
|
42934
|
-
|
|
42935
|
-
|
|
42936
|
-
|
|
42937
|
-
|
|
42938
|
-
|
|
42939
|
-
|
|
42940
|
-
|
|
42941
|
-
|
|
42942
|
-
|
|
42943
|
-
|
|
42944
|
-
|
|
42945
|
-
type: "item",
|
|
42946
|
-
value: "h265"
|
|
42947
|
-
},
|
|
42948
|
-
{
|
|
42949
|
-
label: "VP8",
|
|
42950
|
-
onClick: () => setCodec("vp8"),
|
|
42951
|
-
leftItem: codec === "vp8" ? /* @__PURE__ */ jsx261(Checkmark, {}) : null,
|
|
42952
|
-
id: "vp8",
|
|
42953
|
-
keyHint: null,
|
|
42954
|
-
quickSwitcherLabel: null,
|
|
42955
|
-
subMenu: null,
|
|
42956
|
-
type: "item",
|
|
42957
|
-
value: "vp8"
|
|
42958
|
-
},
|
|
42959
|
-
{
|
|
42960
|
-
label: "VP9",
|
|
42961
|
-
onClick: () => setCodec("vp9"),
|
|
42962
|
-
leftItem: codec === "vp9" ? /* @__PURE__ */ jsx261(Checkmark, {}) : null,
|
|
42963
|
-
id: "vp9",
|
|
42964
|
-
keyHint: null,
|
|
42965
|
-
quickSwitcherLabel: null,
|
|
42966
|
-
subMenu: null,
|
|
42967
|
-
type: "item",
|
|
42968
|
-
value: "vp9"
|
|
42969
|
-
},
|
|
42970
|
-
{
|
|
42971
|
-
label: "AV1",
|
|
42972
|
-
onClick: () => setCodec("av1"),
|
|
42973
|
-
leftItem: codec === "av1" ? /* @__PURE__ */ jsx261(Checkmark, {}) : null,
|
|
42974
|
-
id: "av1",
|
|
42975
|
-
keyHint: null,
|
|
42976
|
-
quickSwitcherLabel: null,
|
|
42977
|
-
subMenu: null,
|
|
42978
|
-
type: "item",
|
|
42979
|
-
value: "av1"
|
|
42980
|
-
}
|
|
42981
|
-
];
|
|
42982
|
-
}, [codec, setCodec]);
|
|
42983
|
-
return /* @__PURE__ */ jsxs137("div", {
|
|
43168
|
+
const codecLabels = useMemo131(() => ({
|
|
43169
|
+
h264: "H.264",
|
|
43170
|
+
h265: "H.265",
|
|
43171
|
+
vp8: "VP8",
|
|
43172
|
+
vp9: "VP9",
|
|
43173
|
+
av1: "AV1"
|
|
43174
|
+
}), []);
|
|
43175
|
+
const codecOptions = useMemo131(() => {
|
|
43176
|
+
return encodableVideoCodecs.map((c) => ({
|
|
43177
|
+
label: codecLabels[c],
|
|
43178
|
+
onClick: () => setCodec(c),
|
|
43179
|
+
leftItem: effectiveVideoCodec === c ? /* @__PURE__ */ jsx262(Checkmark, {}) : null,
|
|
43180
|
+
id: c,
|
|
43181
|
+
keyHint: null,
|
|
43182
|
+
quickSwitcherLabel: null,
|
|
43183
|
+
subMenu: null,
|
|
43184
|
+
type: "item",
|
|
43185
|
+
value: c
|
|
43186
|
+
}));
|
|
43187
|
+
}, [encodableVideoCodecs, effectiveVideoCodec, setCodec, codecLabels]);
|
|
43188
|
+
return /* @__PURE__ */ jsxs138("div", {
|
|
42984
43189
|
style: tabContainer2,
|
|
42985
43190
|
children: [
|
|
42986
|
-
renderMode === "still" ? /* @__PURE__ */
|
|
43191
|
+
renderMode === "still" ? /* @__PURE__ */ jsxs138(Fragment46, {
|
|
42987
43192
|
children: [
|
|
42988
|
-
/* @__PURE__ */
|
|
43193
|
+
/* @__PURE__ */ jsxs138("div", {
|
|
42989
43194
|
style: optionRow,
|
|
42990
43195
|
children: [
|
|
42991
|
-
/* @__PURE__ */
|
|
43196
|
+
/* @__PURE__ */ jsx262("div", {
|
|
42992
43197
|
style: label5,
|
|
42993
43198
|
children: "Format"
|
|
42994
43199
|
}),
|
|
42995
|
-
/* @__PURE__ */
|
|
43200
|
+
/* @__PURE__ */ jsx262("div", {
|
|
42996
43201
|
style: rightRow,
|
|
42997
|
-
children: /* @__PURE__ */
|
|
43202
|
+
children: /* @__PURE__ */ jsx262(SegmentedControl, {
|
|
42998
43203
|
items: imageFormatOptions,
|
|
42999
43204
|
needsWrapping: true
|
|
43000
43205
|
})
|
|
43001
43206
|
})
|
|
43002
43207
|
]
|
|
43003
43208
|
}),
|
|
43004
|
-
resolvedComposition.durationInFrames > 1 ? /* @__PURE__ */
|
|
43209
|
+
resolvedComposition.durationInFrames > 1 ? /* @__PURE__ */ jsxs138("div", {
|
|
43005
43210
|
style: optionRow,
|
|
43006
43211
|
children: [
|
|
43007
|
-
/* @__PURE__ */
|
|
43212
|
+
/* @__PURE__ */ jsx262("div", {
|
|
43008
43213
|
style: label5,
|
|
43009
43214
|
children: "Frame"
|
|
43010
43215
|
}),
|
|
43011
|
-
/* @__PURE__ */
|
|
43216
|
+
/* @__PURE__ */ jsx262("div", {
|
|
43012
43217
|
style: rightRow,
|
|
43013
|
-
children: /* @__PURE__ */
|
|
43014
|
-
children: /* @__PURE__ */
|
|
43218
|
+
children: /* @__PURE__ */ jsx262(RightAlignInput, {
|
|
43219
|
+
children: /* @__PURE__ */ jsx262(InputDragger, {
|
|
43015
43220
|
value: frame2,
|
|
43016
43221
|
onTextChange: onFrameChanged,
|
|
43017
43222
|
placeholder: `0-${resolvedComposition.durationInFrames - 1}`,
|
|
@@ -43028,18 +43233,18 @@ var WebRenderModalBasic = ({
|
|
|
43028
43233
|
]
|
|
43029
43234
|
}) : null
|
|
43030
43235
|
]
|
|
43031
|
-
}) : /* @__PURE__ */
|
|
43236
|
+
}) : /* @__PURE__ */ jsxs138(Fragment46, {
|
|
43032
43237
|
children: [
|
|
43033
|
-
/* @__PURE__ */
|
|
43238
|
+
/* @__PURE__ */ jsxs138("div", {
|
|
43034
43239
|
style: optionRow,
|
|
43035
43240
|
children: [
|
|
43036
|
-
/* @__PURE__ */
|
|
43241
|
+
/* @__PURE__ */ jsx262("div", {
|
|
43037
43242
|
style: label5,
|
|
43038
43243
|
children: "Container"
|
|
43039
43244
|
}),
|
|
43040
|
-
/* @__PURE__ */
|
|
43245
|
+
/* @__PURE__ */ jsx262("div", {
|
|
43041
43246
|
style: rightRow,
|
|
43042
|
-
children: /* @__PURE__ */
|
|
43247
|
+
children: /* @__PURE__ */ jsx262(Combobox, {
|
|
43043
43248
|
values: containerOptions,
|
|
43044
43249
|
selectedId: container61,
|
|
43045
43250
|
title: "Container"
|
|
@@ -43047,32 +43252,32 @@ var WebRenderModalBasic = ({
|
|
|
43047
43252
|
})
|
|
43048
43253
|
]
|
|
43049
43254
|
}),
|
|
43050
|
-
/* @__PURE__ */
|
|
43255
|
+
/* @__PURE__ */ jsxs138("div", {
|
|
43051
43256
|
style: optionRow,
|
|
43052
43257
|
children: [
|
|
43053
|
-
/* @__PURE__ */
|
|
43258
|
+
/* @__PURE__ */ jsxs138("div", {
|
|
43054
43259
|
style: label5,
|
|
43055
43260
|
children: [
|
|
43056
43261
|
"Codec",
|
|
43057
|
-
/* @__PURE__ */
|
|
43262
|
+
/* @__PURE__ */ jsx262(Spacing, {
|
|
43058
43263
|
x: 0.5
|
|
43059
43264
|
}),
|
|
43060
|
-
/* @__PURE__ */
|
|
43265
|
+
/* @__PURE__ */ jsx262(OptionExplainerBubble, {
|
|
43061
43266
|
id: "videoCodecOption"
|
|
43062
43267
|
})
|
|
43063
43268
|
]
|
|
43064
43269
|
}),
|
|
43065
|
-
/* @__PURE__ */
|
|
43270
|
+
/* @__PURE__ */ jsx262("div", {
|
|
43066
43271
|
style: rightRow,
|
|
43067
|
-
children: /* @__PURE__ */
|
|
43272
|
+
children: /* @__PURE__ */ jsx262(Combobox, {
|
|
43068
43273
|
values: codecOptions,
|
|
43069
|
-
selectedId:
|
|
43274
|
+
selectedId: effectiveVideoCodec,
|
|
43070
43275
|
title: "Codec"
|
|
43071
43276
|
})
|
|
43072
43277
|
})
|
|
43073
43278
|
]
|
|
43074
43279
|
}),
|
|
43075
|
-
/* @__PURE__ */
|
|
43280
|
+
/* @__PURE__ */ jsx262(FrameRangeSetting, {
|
|
43076
43281
|
durationInFrames: resolvedComposition.durationInFrames,
|
|
43077
43282
|
startFrame: startFrame ?? 0,
|
|
43078
43283
|
endFrame: endFrame ?? resolvedComposition.durationInFrames - 1,
|
|
@@ -43081,7 +43286,7 @@ var WebRenderModalBasic = ({
|
|
|
43081
43286
|
})
|
|
43082
43287
|
]
|
|
43083
43288
|
}),
|
|
43084
|
-
/* @__PURE__ */
|
|
43289
|
+
/* @__PURE__ */ jsx262(RenderModalOutputName, {
|
|
43085
43290
|
existence: false,
|
|
43086
43291
|
inputStyle: input,
|
|
43087
43292
|
outName,
|
|
@@ -43089,24 +43294,24 @@ var WebRenderModalBasic = ({
|
|
|
43089
43294
|
validationMessage,
|
|
43090
43295
|
label: "Download name"
|
|
43091
43296
|
}),
|
|
43092
|
-
/* @__PURE__ */
|
|
43297
|
+
/* @__PURE__ */ jsxs138("div", {
|
|
43093
43298
|
style: optionRow,
|
|
43094
43299
|
children: [
|
|
43095
|
-
/* @__PURE__ */
|
|
43300
|
+
/* @__PURE__ */ jsxs138("div", {
|
|
43096
43301
|
style: label5,
|
|
43097
43302
|
children: [
|
|
43098
43303
|
"Log Level ",
|
|
43099
|
-
/* @__PURE__ */
|
|
43304
|
+
/* @__PURE__ */ jsx262(Spacing, {
|
|
43100
43305
|
x: 0.5
|
|
43101
43306
|
}),
|
|
43102
|
-
/* @__PURE__ */
|
|
43307
|
+
/* @__PURE__ */ jsx262(OptionExplainerBubble, {
|
|
43103
43308
|
id: "logLevelOption"
|
|
43104
43309
|
})
|
|
43105
43310
|
]
|
|
43106
43311
|
}),
|
|
43107
|
-
/* @__PURE__ */
|
|
43312
|
+
/* @__PURE__ */ jsx262("div", {
|
|
43108
43313
|
style: rightRow,
|
|
43109
|
-
children: /* @__PURE__ */
|
|
43314
|
+
children: /* @__PURE__ */ jsx262(Combobox, {
|
|
43110
43315
|
values: logLevelOptions,
|
|
43111
43316
|
selectedId: logLevel,
|
|
43112
43317
|
title: "Log Level"
|
|
@@ -43119,8 +43324,8 @@ var WebRenderModalBasic = ({
|
|
|
43119
43324
|
};
|
|
43120
43325
|
|
|
43121
43326
|
// src/components/RenderModal/WebRenderModalLicense.tsx
|
|
43122
|
-
import { useCallback as useCallback129, useMemo as
|
|
43123
|
-
import { jsx as
|
|
43327
|
+
import { useCallback as useCallback129, useMemo as useMemo132 } from "react";
|
|
43328
|
+
import { jsx as jsx263, jsxs as jsxs139, Fragment as Fragment47 } from "react/jsx-runtime";
|
|
43124
43329
|
var row9 = {
|
|
43125
43330
|
display: "flex",
|
|
43126
43331
|
flexDirection: "row",
|
|
@@ -43234,21 +43439,21 @@ var WebRenderModalLicense = ({
|
|
|
43234
43439
|
const onLicenseKeyChange = useCallback129((e) => {
|
|
43235
43440
|
setLicenseKey(e.target.value);
|
|
43236
43441
|
}, [setLicenseKey]);
|
|
43237
|
-
const licenseValidation =
|
|
43442
|
+
const licenseValidation = useMemo132(() => {
|
|
43238
43443
|
if (licenseKey === null || licenseKey === "free-license") {
|
|
43239
43444
|
return { valid: true, message: null };
|
|
43240
43445
|
}
|
|
43241
43446
|
return validateLicenseKey(licenseKey);
|
|
43242
43447
|
}, [licenseKey]);
|
|
43243
|
-
return /* @__PURE__ */
|
|
43448
|
+
return /* @__PURE__ */ jsxs139("div", {
|
|
43244
43449
|
style: tabContainer3,
|
|
43245
43450
|
children: [
|
|
43246
|
-
/* @__PURE__ */
|
|
43451
|
+
/* @__PURE__ */ jsxs139("div", {
|
|
43247
43452
|
style: descriptionStyle,
|
|
43248
43453
|
children: [
|
|
43249
43454
|
"Remotion is free if you are an individual or company with a headcount of 3 or less. See",
|
|
43250
43455
|
" ",
|
|
43251
|
-
/* @__PURE__ */
|
|
43456
|
+
/* @__PURE__ */ jsx263("a", {
|
|
43252
43457
|
style: descriptionLink,
|
|
43253
43458
|
href: "https://remotion.dev/license",
|
|
43254
43459
|
children: "LICENSE.md"
|
|
@@ -43256,18 +43461,18 @@ var WebRenderModalLicense = ({
|
|
|
43256
43461
|
"."
|
|
43257
43462
|
]
|
|
43258
43463
|
}),
|
|
43259
|
-
/* @__PURE__ */
|
|
43464
|
+
/* @__PURE__ */ jsx263("div", {
|
|
43260
43465
|
style: row9,
|
|
43261
|
-
children: /* @__PURE__ */
|
|
43466
|
+
children: /* @__PURE__ */ jsxs139("div", {
|
|
43262
43467
|
style: justifyCenter,
|
|
43263
43468
|
children: [
|
|
43264
|
-
/* @__PURE__ */
|
|
43469
|
+
/* @__PURE__ */ jsx263(Checkbox, {
|
|
43265
43470
|
checked: licenseKey === "free-license",
|
|
43266
43471
|
onChange: onFreeLicenseChange,
|
|
43267
43472
|
name: "free-license",
|
|
43268
43473
|
rounded: true
|
|
43269
43474
|
}),
|
|
43270
|
-
/* @__PURE__ */
|
|
43475
|
+
/* @__PURE__ */ jsxs139("div", {
|
|
43271
43476
|
style: checkboxLabel,
|
|
43272
43477
|
onClick: onFreeLicenseChange,
|
|
43273
43478
|
children: [
|
|
@@ -43279,34 +43484,34 @@ var WebRenderModalLicense = ({
|
|
|
43279
43484
|
]
|
|
43280
43485
|
})
|
|
43281
43486
|
}),
|
|
43282
|
-
licenseKey === "free-license" ? /* @__PURE__ */
|
|
43487
|
+
licenseKey === "free-license" ? /* @__PURE__ */ jsxs139("div", {
|
|
43283
43488
|
style: paddedDescriptionStyle,
|
|
43284
43489
|
children: [
|
|
43285
43490
|
"Enjoy Remotion! Add the following to",
|
|
43286
43491
|
" ",
|
|
43287
|
-
/* @__PURE__ */
|
|
43492
|
+
/* @__PURE__ */ jsx263("code", {
|
|
43288
43493
|
style: codeStyle,
|
|
43289
43494
|
children: "remotion.config.ts"
|
|
43290
43495
|
}),
|
|
43291
43496
|
" to persist this setting:",
|
|
43292
|
-
/* @__PURE__ */
|
|
43497
|
+
/* @__PURE__ */ jsx263("div", {
|
|
43293
43498
|
style: codeLine,
|
|
43294
43499
|
children: "Config.setPublicLicenseKey('free-license');"
|
|
43295
43500
|
})
|
|
43296
43501
|
]
|
|
43297
43502
|
}) : null,
|
|
43298
|
-
/* @__PURE__ */
|
|
43503
|
+
/* @__PURE__ */ jsx263("div", {
|
|
43299
43504
|
style: row9,
|
|
43300
|
-
children: /* @__PURE__ */
|
|
43505
|
+
children: /* @__PURE__ */ jsxs139("div", {
|
|
43301
43506
|
style: justifyCenter,
|
|
43302
43507
|
children: [
|
|
43303
|
-
/* @__PURE__ */
|
|
43508
|
+
/* @__PURE__ */ jsx263(Checkbox, {
|
|
43304
43509
|
checked: licenseKey !== "free-license" && licenseKey !== null,
|
|
43305
43510
|
onChange: onCompanyLicenseChange,
|
|
43306
43511
|
name: "company-license",
|
|
43307
43512
|
rounded: true
|
|
43308
43513
|
}),
|
|
43309
|
-
/* @__PURE__ */
|
|
43514
|
+
/* @__PURE__ */ jsx263("div", {
|
|
43310
43515
|
style: checkboxLabel,
|
|
43311
43516
|
onClick: onCompanyLicenseChange,
|
|
43312
43517
|
children: "I have a Company License"
|
|
@@ -43314,12 +43519,12 @@ var WebRenderModalLicense = ({
|
|
|
43314
43519
|
]
|
|
43315
43520
|
})
|
|
43316
43521
|
}),
|
|
43317
|
-
licenseKey !== "free-license" && licenseKey !== null ? /* @__PURE__ */
|
|
43522
|
+
licenseKey !== "free-license" && licenseKey !== null ? /* @__PURE__ */ jsxs139("div", {
|
|
43318
43523
|
style: paddedDescriptionStyle,
|
|
43319
43524
|
children: [
|
|
43320
43525
|
"Add your public license from",
|
|
43321
43526
|
" ",
|
|
43322
|
-
/* @__PURE__ */
|
|
43527
|
+
/* @__PURE__ */ jsx263("a", {
|
|
43323
43528
|
href: "https://remotion.pro/dashboard",
|
|
43324
43529
|
target: "_blank",
|
|
43325
43530
|
style: descriptionLink,
|
|
@@ -43327,11 +43532,11 @@ var WebRenderModalLicense = ({
|
|
|
43327
43532
|
}),
|
|
43328
43533
|
" ",
|
|
43329
43534
|
"key below.",
|
|
43330
|
-
/* @__PURE__ */
|
|
43535
|
+
/* @__PURE__ */ jsx263(Spacing, {
|
|
43331
43536
|
y: 1,
|
|
43332
43537
|
block: true
|
|
43333
43538
|
}),
|
|
43334
|
-
/* @__PURE__ */
|
|
43539
|
+
/* @__PURE__ */ jsx263(RemotionInput, {
|
|
43335
43540
|
value: licenseKey,
|
|
43336
43541
|
onChange: onLicenseKeyChange,
|
|
43337
43542
|
placeholder: "remotion.pro public license key (starts with rm_pub_)",
|
|
@@ -43340,33 +43545,33 @@ var WebRenderModalLicense = ({
|
|
|
43340
43545
|
style: inputStyle2,
|
|
43341
43546
|
autoFocus: true
|
|
43342
43547
|
}),
|
|
43343
|
-
licenseValidation.message ? /* @__PURE__ */
|
|
43548
|
+
licenseValidation.message ? /* @__PURE__ */ jsxs139(Fragment47, {
|
|
43344
43549
|
children: [
|
|
43345
|
-
/* @__PURE__ */
|
|
43550
|
+
/* @__PURE__ */ jsx263(Spacing, {
|
|
43346
43551
|
y: 1,
|
|
43347
43552
|
block: true
|
|
43348
43553
|
}),
|
|
43349
|
-
/* @__PURE__ */
|
|
43554
|
+
/* @__PURE__ */ jsx263(ValidationMessage, {
|
|
43350
43555
|
message: licenseValidation.message,
|
|
43351
43556
|
align: "flex-start",
|
|
43352
43557
|
type: "error"
|
|
43353
43558
|
})
|
|
43354
43559
|
]
|
|
43355
43560
|
}) : null,
|
|
43356
|
-
licenseValidation.valid && licenseKey.length > 0 ? /* @__PURE__ */
|
|
43561
|
+
licenseValidation.valid && licenseKey.length > 0 ? /* @__PURE__ */ jsxs139(Fragment47, {
|
|
43357
43562
|
children: [
|
|
43358
|
-
/* @__PURE__ */
|
|
43563
|
+
/* @__PURE__ */ jsx263(Spacing, {
|
|
43359
43564
|
y: 1,
|
|
43360
43565
|
block: true
|
|
43361
43566
|
}),
|
|
43362
43567
|
"Add the following to",
|
|
43363
43568
|
" ",
|
|
43364
|
-
/* @__PURE__ */
|
|
43569
|
+
/* @__PURE__ */ jsx263("code", {
|
|
43365
43570
|
style: codeStyle,
|
|
43366
43571
|
children: "remotion.config.ts"
|
|
43367
43572
|
}),
|
|
43368
43573
|
" to persist this setting:",
|
|
43369
|
-
/* @__PURE__ */
|
|
43574
|
+
/* @__PURE__ */ jsx263("div", {
|
|
43370
43575
|
style: codeLineSmall,
|
|
43371
43576
|
children: "Config.setPublicLicenseKey('" + licenseKey + "');"
|
|
43372
43577
|
})
|
|
@@ -43374,12 +43579,12 @@ var WebRenderModalLicense = ({
|
|
|
43374
43579
|
}) : null
|
|
43375
43580
|
]
|
|
43376
43581
|
}) : null,
|
|
43377
|
-
licenseKey === null ? /* @__PURE__ */
|
|
43582
|
+
licenseKey === null ? /* @__PURE__ */ jsxs139("div", {
|
|
43378
43583
|
style: descriptionStyle,
|
|
43379
43584
|
children: [
|
|
43380
43585
|
"If you are not eligible for the free license, you need to obtain a",
|
|
43381
43586
|
" ",
|
|
43382
|
-
/* @__PURE__ */
|
|
43587
|
+
/* @__PURE__ */ jsx263("a", {
|
|
43383
43588
|
style: descriptionLink,
|
|
43384
43589
|
target: "_blank",
|
|
43385
43590
|
href: "https://remotion.pro/license",
|
|
@@ -43393,8 +43598,8 @@ var WebRenderModalLicense = ({
|
|
|
43393
43598
|
};
|
|
43394
43599
|
|
|
43395
43600
|
// src/components/RenderModal/WebRenderModalPicture.tsx
|
|
43396
|
-
import { useCallback as useCallback130, useMemo as
|
|
43397
|
-
import { jsx as
|
|
43601
|
+
import { useCallback as useCallback130, useMemo as useMemo133 } from "react";
|
|
43602
|
+
import { jsx as jsx264, jsxs as jsxs140 } from "react/jsx-runtime";
|
|
43398
43603
|
var tabContainer4 = {
|
|
43399
43604
|
flex: 1
|
|
43400
43605
|
};
|
|
@@ -43407,84 +43612,26 @@ var WebRenderModalPicture = ({
|
|
|
43407
43612
|
transparent,
|
|
43408
43613
|
setTransparent
|
|
43409
43614
|
}) => {
|
|
43410
|
-
const qualityOptions =
|
|
43411
|
-
return [
|
|
43412
|
-
{
|
|
43413
|
-
label: "Very Low",
|
|
43414
|
-
onClick: () => setVideoBitrate("very-low"),
|
|
43415
|
-
leftItem: videoBitrate === "very-low" ? /* @__PURE__ */ jsx263(Checkmark, {}) : null,
|
|
43416
|
-
id: "very-low",
|
|
43417
|
-
keyHint: null,
|
|
43418
|
-
quickSwitcherLabel: null,
|
|
43419
|
-
subMenu: null,
|
|
43420
|
-
type: "item",
|
|
43421
|
-
value: "very-low"
|
|
43422
|
-
},
|
|
43423
|
-
{
|
|
43424
|
-
label: "Low",
|
|
43425
|
-
onClick: () => setVideoBitrate("low"),
|
|
43426
|
-
leftItem: videoBitrate === "low" ? /* @__PURE__ */ jsx263(Checkmark, {}) : null,
|
|
43427
|
-
id: "low",
|
|
43428
|
-
keyHint: null,
|
|
43429
|
-
quickSwitcherLabel: null,
|
|
43430
|
-
subMenu: null,
|
|
43431
|
-
type: "item",
|
|
43432
|
-
value: "low"
|
|
43433
|
-
},
|
|
43434
|
-
{
|
|
43435
|
-
label: "Medium",
|
|
43436
|
-
onClick: () => setVideoBitrate("medium"),
|
|
43437
|
-
leftItem: videoBitrate === "medium" ? /* @__PURE__ */ jsx263(Checkmark, {}) : null,
|
|
43438
|
-
id: "medium",
|
|
43439
|
-
keyHint: null,
|
|
43440
|
-
quickSwitcherLabel: null,
|
|
43441
|
-
subMenu: null,
|
|
43442
|
-
type: "item",
|
|
43443
|
-
value: "medium"
|
|
43444
|
-
},
|
|
43445
|
-
{
|
|
43446
|
-
label: "High",
|
|
43447
|
-
onClick: () => setVideoBitrate("high"),
|
|
43448
|
-
leftItem: videoBitrate === "high" ? /* @__PURE__ */ jsx263(Checkmark, {}) : null,
|
|
43449
|
-
id: "high",
|
|
43450
|
-
keyHint: null,
|
|
43451
|
-
quickSwitcherLabel: null,
|
|
43452
|
-
subMenu: null,
|
|
43453
|
-
type: "item",
|
|
43454
|
-
value: "high"
|
|
43455
|
-
},
|
|
43456
|
-
{
|
|
43457
|
-
label: "Very High",
|
|
43458
|
-
onClick: () => setVideoBitrate("very-high"),
|
|
43459
|
-
leftItem: videoBitrate === "very-high" ? /* @__PURE__ */ jsx263(Checkmark, {}) : null,
|
|
43460
|
-
id: "very-high",
|
|
43461
|
-
keyHint: null,
|
|
43462
|
-
quickSwitcherLabel: null,
|
|
43463
|
-
subMenu: null,
|
|
43464
|
-
type: "item",
|
|
43465
|
-
value: "very-high"
|
|
43466
|
-
}
|
|
43467
|
-
];
|
|
43468
|
-
}, [videoBitrate, setVideoBitrate]);
|
|
43615
|
+
const qualityOptions = useMemo133(() => getQualityOptions(videoBitrate, setVideoBitrate), [videoBitrate, setVideoBitrate]);
|
|
43469
43616
|
const onTransparentChanged = useCallback130((e) => {
|
|
43470
43617
|
setTransparent(e.target.checked);
|
|
43471
43618
|
}, [setTransparent]);
|
|
43472
43619
|
if (renderMode !== "video") {
|
|
43473
43620
|
return null;
|
|
43474
43621
|
}
|
|
43475
|
-
return /* @__PURE__ */
|
|
43622
|
+
return /* @__PURE__ */ jsxs140("div", {
|
|
43476
43623
|
style: tabContainer4,
|
|
43477
43624
|
children: [
|
|
43478
|
-
/* @__PURE__ */
|
|
43625
|
+
/* @__PURE__ */ jsxs140("div", {
|
|
43479
43626
|
style: optionRow,
|
|
43480
43627
|
children: [
|
|
43481
|
-
/* @__PURE__ */
|
|
43628
|
+
/* @__PURE__ */ jsx264("div", {
|
|
43482
43629
|
style: label5,
|
|
43483
43630
|
children: "Quality"
|
|
43484
43631
|
}),
|
|
43485
|
-
/* @__PURE__ */
|
|
43632
|
+
/* @__PURE__ */ jsx264("div", {
|
|
43486
43633
|
style: rightRow,
|
|
43487
|
-
children: /* @__PURE__ */
|
|
43634
|
+
children: /* @__PURE__ */ jsx264(Combobox, {
|
|
43488
43635
|
values: qualityOptions,
|
|
43489
43636
|
selectedId: videoBitrate,
|
|
43490
43637
|
title: "Quality"
|
|
@@ -43492,7 +43639,7 @@ var WebRenderModalPicture = ({
|
|
|
43492
43639
|
})
|
|
43493
43640
|
]
|
|
43494
43641
|
}),
|
|
43495
|
-
/* @__PURE__ */
|
|
43642
|
+
/* @__PURE__ */ jsx264(NumberSetting, {
|
|
43496
43643
|
name: "Keyframe Interval",
|
|
43497
43644
|
formatter: (v) => `${v}s`,
|
|
43498
43645
|
min: 1,
|
|
@@ -43501,16 +43648,16 @@ var WebRenderModalPicture = ({
|
|
|
43501
43648
|
value: keyframeIntervalInSeconds,
|
|
43502
43649
|
onValueChanged: setKeyframeIntervalInSeconds
|
|
43503
43650
|
}),
|
|
43504
|
-
/* @__PURE__ */
|
|
43651
|
+
/* @__PURE__ */ jsxs140("div", {
|
|
43505
43652
|
style: optionRow,
|
|
43506
43653
|
children: [
|
|
43507
|
-
/* @__PURE__ */
|
|
43654
|
+
/* @__PURE__ */ jsx264("div", {
|
|
43508
43655
|
style: label5,
|
|
43509
43656
|
children: "Transparent"
|
|
43510
43657
|
}),
|
|
43511
|
-
/* @__PURE__ */
|
|
43658
|
+
/* @__PURE__ */ jsx264("div", {
|
|
43512
43659
|
style: rightRow,
|
|
43513
|
-
children: /* @__PURE__ */
|
|
43660
|
+
children: /* @__PURE__ */ jsx264(Checkbox, {
|
|
43514
43661
|
checked: transparent,
|
|
43515
43662
|
onChange: onTransparentChanged,
|
|
43516
43663
|
name: "transparent"
|
|
@@ -43523,7 +43670,7 @@ var WebRenderModalPicture = ({
|
|
|
43523
43670
|
};
|
|
43524
43671
|
|
|
43525
43672
|
// src/components/RenderModal/WebRenderModal.tsx
|
|
43526
|
-
import { jsx as
|
|
43673
|
+
import { jsx as jsx265, jsxs as jsxs141 } from "react/jsx-runtime";
|
|
43527
43674
|
var invalidCharacters2 = ["?", "*", "+", ":", "%"];
|
|
43528
43675
|
var isValidStillExtension2 = (extension, stillImageFormat) => {
|
|
43529
43676
|
if (stillImageFormat === "jpeg" && extension === "jpg") {
|
|
@@ -43583,48 +43730,64 @@ var WebRenderModal = ({
|
|
|
43583
43730
|
resolved: { result: resolvedComposition },
|
|
43584
43731
|
unresolved: unresolvedComposition
|
|
43585
43732
|
} = context;
|
|
43586
|
-
const [isVideo] =
|
|
43733
|
+
const [isVideo] = useState84(() => {
|
|
43587
43734
|
return typeof resolvedComposition.durationInFrames === "undefined" ? true : resolvedComposition.durationInFrames > 1;
|
|
43588
43735
|
});
|
|
43589
|
-
const [renderMode, setRenderMode] =
|
|
43590
|
-
const [tab, setTab] =
|
|
43591
|
-
const [imageFormat, setImageFormat] =
|
|
43592
|
-
const [frame2, setFrame] =
|
|
43593
|
-
const [logLevel, setLogLevel] =
|
|
43594
|
-
const [inputProps, setInputProps] =
|
|
43595
|
-
const [delayRenderTimeout, setDelayRenderTimeout] =
|
|
43596
|
-
const [mediaCacheSizeInBytes, setMediaCacheSizeInBytes] =
|
|
43597
|
-
const [saving, setSaving] =
|
|
43598
|
-
const [codec, setCodec] =
|
|
43599
|
-
const [container61, setContainer] =
|
|
43600
|
-
const [
|
|
43601
|
-
const [
|
|
43602
|
-
const [
|
|
43603
|
-
const [
|
|
43604
|
-
const [
|
|
43605
|
-
const [
|
|
43606
|
-
const [
|
|
43607
|
-
const [
|
|
43608
|
-
const [
|
|
43609
|
-
const
|
|
43736
|
+
const [renderMode, setRenderMode] = useState84(isVideo ? "video" : "still");
|
|
43737
|
+
const [tab, setTab] = useState84("general");
|
|
43738
|
+
const [imageFormat, setImageFormat] = useState84("png");
|
|
43739
|
+
const [frame2, setFrame] = useState84(() => initialFrame);
|
|
43740
|
+
const [logLevel, setLogLevel] = useState84(() => initialLogLevel);
|
|
43741
|
+
const [inputProps, setInputProps] = useState84(() => defaultProps);
|
|
43742
|
+
const [delayRenderTimeout, setDelayRenderTimeout] = useState84(30000);
|
|
43743
|
+
const [mediaCacheSizeInBytes, setMediaCacheSizeInBytes] = useState84(null);
|
|
43744
|
+
const [saving, setSaving] = useState84(false);
|
|
43745
|
+
const [codec, setCodec] = useState84("h264");
|
|
43746
|
+
const [container61, setContainer] = useState84("mp4");
|
|
43747
|
+
const [audioCodec, setAudioCodec] = useState84("aac");
|
|
43748
|
+
const [audioBitrate, setAudioBitrate] = useState84("medium");
|
|
43749
|
+
const [videoBitrate, setVideoBitrate] = useState84("high");
|
|
43750
|
+
const [hardwareAcceleration, setHardwareAcceleration] = useState84("no-preference");
|
|
43751
|
+
const [keyframeIntervalInSeconds, setKeyframeIntervalInSeconds] = useState84(5);
|
|
43752
|
+
const [startFrame, setStartFrame] = useState84(() => inFrameMark ?? null);
|
|
43753
|
+
const [endFrame, setEndFrame] = useState84(() => outFrameMark ?? null);
|
|
43754
|
+
const [renderProgress, setRenderProgress] = useState84(null);
|
|
43755
|
+
const [transparent, setTransparent] = useState84(false);
|
|
43756
|
+
const [muted, setMuted] = useState84(false);
|
|
43757
|
+
const [licenseKey, setLicenseKey] = useState84(initialLicenseKey);
|
|
43758
|
+
const encodableAudioCodecs = useEncodableAudioCodecs(container61);
|
|
43759
|
+
const encodableVideoCodecs = useEncodableVideoCodecs(container61);
|
|
43760
|
+
const effectiveAudioCodec = useMemo134(() => {
|
|
43761
|
+
if (encodableAudioCodecs.includes(audioCodec)) {
|
|
43762
|
+
return audioCodec;
|
|
43763
|
+
}
|
|
43764
|
+
return encodableAudioCodecs[0] ?? audioCodec;
|
|
43765
|
+
}, [audioCodec, encodableAudioCodecs]);
|
|
43766
|
+
const effectiveVideoCodec = useMemo134(() => {
|
|
43767
|
+
if (encodableVideoCodecs.includes(codec)) {
|
|
43768
|
+
return codec;
|
|
43769
|
+
}
|
|
43770
|
+
return encodableVideoCodecs[0] ?? codec;
|
|
43771
|
+
}, [codec, encodableVideoCodecs]);
|
|
43772
|
+
const finalEndFrame = useMemo134(() => {
|
|
43610
43773
|
if (endFrame === null) {
|
|
43611
43774
|
return resolvedComposition.durationInFrames - 1;
|
|
43612
43775
|
}
|
|
43613
43776
|
return Math.max(0, Math.min(resolvedComposition.durationInFrames - 1, endFrame));
|
|
43614
43777
|
}, [endFrame, resolvedComposition.durationInFrames]);
|
|
43615
|
-
const finalStartFrame =
|
|
43778
|
+
const finalStartFrame = useMemo134(() => {
|
|
43616
43779
|
if (startFrame === null) {
|
|
43617
43780
|
return 0;
|
|
43618
43781
|
}
|
|
43619
43782
|
return Math.max(0, Math.min(finalEndFrame, startFrame));
|
|
43620
43783
|
}, [finalEndFrame, startFrame]);
|
|
43621
|
-
const frameRange =
|
|
43784
|
+
const frameRange = useMemo134(() => {
|
|
43622
43785
|
if (startFrame === null && endFrame === null) {
|
|
43623
43786
|
return null;
|
|
43624
43787
|
}
|
|
43625
43788
|
return [finalStartFrame, finalEndFrame];
|
|
43626
43789
|
}, [endFrame, finalEndFrame, finalStartFrame, startFrame]);
|
|
43627
|
-
const [initialOutName] =
|
|
43790
|
+
const [initialOutName] = useState84(() => {
|
|
43628
43791
|
return getDefaultOutLocation2({
|
|
43629
43792
|
compositionName: resolvedComposition.id,
|
|
43630
43793
|
defaultExtension: renderMode === "still" ? imageFormat : isVideo ? container61 : imageFormat,
|
|
@@ -43633,7 +43796,7 @@ var WebRenderModal = ({
|
|
|
43633
43796
|
clientSideRender: true
|
|
43634
43797
|
});
|
|
43635
43798
|
});
|
|
43636
|
-
const [outName, setOutName] =
|
|
43799
|
+
const [outName, setOutName] = useState84(() => initialOutName);
|
|
43637
43800
|
const setStillFormat = useCallback131((format) => {
|
|
43638
43801
|
setImageFormat(format);
|
|
43639
43802
|
setOutName((prev) => {
|
|
@@ -43643,6 +43806,7 @@ var WebRenderModal = ({
|
|
|
43643
43806
|
}, []);
|
|
43644
43807
|
const setContainerFormat = useCallback131((newContainer) => {
|
|
43645
43808
|
setContainer(newContainer);
|
|
43809
|
+
setAudioCodec(getDefaultAudioCodecForContainer(newContainer));
|
|
43646
43810
|
setOutName((prev) => {
|
|
43647
43811
|
const newFileName = getStringBeforeSuffix(prev) + "." + newContainer;
|
|
43648
43812
|
return newFileName;
|
|
@@ -43655,14 +43819,14 @@ var WebRenderModal = ({
|
|
|
43655
43819
|
const newFileName = getStringBeforeSuffix(prev) + "." + container61;
|
|
43656
43820
|
return newFileName;
|
|
43657
43821
|
});
|
|
43658
|
-
} else {
|
|
43822
|
+
} else if (newMode === "still") {
|
|
43659
43823
|
setOutName((prev) => {
|
|
43660
43824
|
const newFileName = getStringBeforeSuffix(prev) + "." + imageFormat;
|
|
43661
43825
|
return newFileName;
|
|
43662
43826
|
});
|
|
43663
43827
|
}
|
|
43664
43828
|
}, [container61, imageFormat]);
|
|
43665
|
-
const renderTabOptions =
|
|
43829
|
+
const renderTabOptions = useMemo134(() => {
|
|
43666
43830
|
const options = [
|
|
43667
43831
|
{
|
|
43668
43832
|
label: "Still",
|
|
@@ -43700,7 +43864,7 @@ var WebRenderModal = ({
|
|
|
43700
43864
|
const onOutNameChange = useCallback131((e) => {
|
|
43701
43865
|
setOutName(e.target.value);
|
|
43702
43866
|
}, []);
|
|
43703
|
-
const outnameValidation =
|
|
43867
|
+
const outnameValidation = useMemo134(() => {
|
|
43704
43868
|
if (renderMode === "still") {
|
|
43705
43869
|
return validateOutnameForStill({
|
|
43706
43870
|
outName,
|
|
@@ -43801,7 +43965,9 @@ var WebRenderModal = ({
|
|
|
43801
43965
|
delayRenderTimeoutInMilliseconds: delayRenderTimeout,
|
|
43802
43966
|
mediaCacheSizeInBytes,
|
|
43803
43967
|
logLevel,
|
|
43804
|
-
videoCodec:
|
|
43968
|
+
videoCodec: effectiveVideoCodec,
|
|
43969
|
+
audioCodec: effectiveAudioCodec,
|
|
43970
|
+
audioBitrate,
|
|
43805
43971
|
container: container61,
|
|
43806
43972
|
videoBitrate,
|
|
43807
43973
|
hardwareAcceleration,
|
|
@@ -43830,7 +43996,9 @@ var WebRenderModal = ({
|
|
|
43830
43996
|
delayRenderTimeout,
|
|
43831
43997
|
mediaCacheSizeInBytes,
|
|
43832
43998
|
logLevel,
|
|
43833
|
-
|
|
43999
|
+
effectiveVideoCodec,
|
|
44000
|
+
effectiveAudioCodec,
|
|
44001
|
+
audioBitrate,
|
|
43834
44002
|
container61,
|
|
43835
44003
|
videoBitrate,
|
|
43836
44004
|
hardwareAcceleration,
|
|
@@ -43855,30 +44023,30 @@ var WebRenderModal = ({
|
|
|
43855
44023
|
await onRenderVideo();
|
|
43856
44024
|
}
|
|
43857
44025
|
}, [renderMode, onRenderStill, onRenderVideo]);
|
|
43858
|
-
return /* @__PURE__ */
|
|
44026
|
+
return /* @__PURE__ */ jsxs141("div", {
|
|
43859
44027
|
style: outerModalStyle,
|
|
43860
44028
|
children: [
|
|
43861
|
-
/* @__PURE__ */
|
|
44029
|
+
/* @__PURE__ */ jsx265(ModalHeader, {
|
|
43862
44030
|
title: `Render ${resolvedComposition.id}`
|
|
43863
44031
|
}),
|
|
43864
|
-
/* @__PURE__ */
|
|
44032
|
+
/* @__PURE__ */ jsxs141("div", {
|
|
43865
44033
|
style: container59,
|
|
43866
44034
|
children: [
|
|
43867
|
-
/* @__PURE__ */
|
|
44035
|
+
/* @__PURE__ */ jsx265(SegmentedControl, {
|
|
43868
44036
|
items: renderTabOptions,
|
|
43869
44037
|
needsWrapping: false
|
|
43870
44038
|
}),
|
|
43871
|
-
/* @__PURE__ */
|
|
44039
|
+
/* @__PURE__ */ jsx265("div", {
|
|
43872
44040
|
style: flexer
|
|
43873
44041
|
}),
|
|
43874
|
-
/* @__PURE__ */
|
|
44042
|
+
/* @__PURE__ */ jsxs141(Button, {
|
|
43875
44043
|
autoFocus: true,
|
|
43876
44044
|
onClick: onRender,
|
|
43877
44045
|
style: buttonStyle7,
|
|
43878
44046
|
disabled: !outnameValidation.valid,
|
|
43879
44047
|
children: [
|
|
43880
44048
|
renderProgress ? `Rendering... ${renderProgress.renderedFrames}/${finalEndFrame}` : `Render ${renderMode}`,
|
|
43881
|
-
/* @__PURE__ */
|
|
44049
|
+
/* @__PURE__ */ jsx265(ShortcutHint, {
|
|
43882
44050
|
keyToPress: "↵",
|
|
43883
44051
|
cmdOrCtrl: true
|
|
43884
44052
|
})
|
|
@@ -43886,94 +44054,94 @@ var WebRenderModal = ({
|
|
|
43886
44054
|
})
|
|
43887
44055
|
]
|
|
43888
44056
|
}),
|
|
43889
|
-
/* @__PURE__ */
|
|
44057
|
+
/* @__PURE__ */ jsx265("div", {
|
|
43890
44058
|
style: container59,
|
|
43891
|
-
children: /* @__PURE__ */
|
|
44059
|
+
children: /* @__PURE__ */ jsx265(WebRendererExperimentalBadge, {})
|
|
43892
44060
|
}),
|
|
43893
|
-
/* @__PURE__ */
|
|
44061
|
+
/* @__PURE__ */ jsxs141("div", {
|
|
43894
44062
|
style: horizontalLayout,
|
|
43895
44063
|
children: [
|
|
43896
|
-
/* @__PURE__ */
|
|
44064
|
+
/* @__PURE__ */ jsxs141("div", {
|
|
43897
44065
|
style: leftSidebar,
|
|
43898
44066
|
children: [
|
|
43899
|
-
/* @__PURE__ */
|
|
44067
|
+
/* @__PURE__ */ jsxs141(VerticalTab, {
|
|
43900
44068
|
style: horizontalTab,
|
|
43901
44069
|
selected: tab === "general",
|
|
43902
44070
|
onClick: () => setTab("general"),
|
|
43903
44071
|
children: [
|
|
43904
|
-
/* @__PURE__ */
|
|
44072
|
+
/* @__PURE__ */ jsx265("div", {
|
|
43905
44073
|
style: iconContainer,
|
|
43906
|
-
children: /* @__PURE__ */
|
|
44074
|
+
children: /* @__PURE__ */ jsx265(FileIcon, {
|
|
43907
44075
|
style: icon6
|
|
43908
44076
|
})
|
|
43909
44077
|
}),
|
|
43910
44078
|
"General"
|
|
43911
44079
|
]
|
|
43912
44080
|
}),
|
|
43913
|
-
/* @__PURE__ */
|
|
44081
|
+
/* @__PURE__ */ jsxs141(VerticalTab, {
|
|
43914
44082
|
style: horizontalTab,
|
|
43915
44083
|
selected: tab === "data",
|
|
43916
44084
|
onClick: () => setTab("data"),
|
|
43917
44085
|
children: [
|
|
43918
|
-
/* @__PURE__ */
|
|
44086
|
+
/* @__PURE__ */ jsx265("div", {
|
|
43919
44087
|
style: iconContainer,
|
|
43920
|
-
children: /* @__PURE__ */
|
|
44088
|
+
children: /* @__PURE__ */ jsx265(DataIcon, {
|
|
43921
44089
|
style: icon6
|
|
43922
44090
|
})
|
|
43923
44091
|
}),
|
|
43924
44092
|
"Input Props"
|
|
43925
44093
|
]
|
|
43926
44094
|
}),
|
|
43927
|
-
renderMode === "video" ? /* @__PURE__ */
|
|
44095
|
+
renderMode === "video" ? /* @__PURE__ */ jsxs141(VerticalTab, {
|
|
43928
44096
|
style: horizontalTab,
|
|
43929
44097
|
selected: tab === "picture",
|
|
43930
44098
|
onClick: () => setTab("picture"),
|
|
43931
44099
|
children: [
|
|
43932
|
-
/* @__PURE__ */
|
|
44100
|
+
/* @__PURE__ */ jsx265("div", {
|
|
43933
44101
|
style: iconContainer,
|
|
43934
|
-
children: /* @__PURE__ */
|
|
44102
|
+
children: /* @__PURE__ */ jsx265(PicIcon, {
|
|
43935
44103
|
style: icon6
|
|
43936
44104
|
})
|
|
43937
44105
|
}),
|
|
43938
44106
|
"Picture"
|
|
43939
44107
|
]
|
|
43940
44108
|
}) : null,
|
|
43941
|
-
renderMode === "video" ? /* @__PURE__ */
|
|
44109
|
+
renderMode === "video" ? /* @__PURE__ */ jsxs141(VerticalTab, {
|
|
43942
44110
|
style: horizontalTab,
|
|
43943
44111
|
selected: tab === "audio",
|
|
43944
44112
|
onClick: () => setTab("audio"),
|
|
43945
44113
|
children: [
|
|
43946
|
-
/* @__PURE__ */
|
|
44114
|
+
/* @__PURE__ */ jsx265("div", {
|
|
43947
44115
|
style: iconContainer,
|
|
43948
|
-
children: /* @__PURE__ */
|
|
44116
|
+
children: /* @__PURE__ */ jsx265(AudioIcon, {
|
|
43949
44117
|
style: icon6
|
|
43950
44118
|
})
|
|
43951
44119
|
}),
|
|
43952
44120
|
"Audio"
|
|
43953
44121
|
]
|
|
43954
44122
|
}) : null,
|
|
43955
|
-
/* @__PURE__ */
|
|
44123
|
+
/* @__PURE__ */ jsxs141(VerticalTab, {
|
|
43956
44124
|
style: horizontalTab,
|
|
43957
44125
|
selected: tab === "advanced",
|
|
43958
44126
|
onClick: () => setTab("advanced"),
|
|
43959
44127
|
children: [
|
|
43960
|
-
/* @__PURE__ */
|
|
44128
|
+
/* @__PURE__ */ jsx265("div", {
|
|
43961
44129
|
style: iconContainer,
|
|
43962
|
-
children: /* @__PURE__ */
|
|
44130
|
+
children: /* @__PURE__ */ jsx265(GearIcon, {
|
|
43963
44131
|
style: icon6
|
|
43964
44132
|
})
|
|
43965
44133
|
}),
|
|
43966
44134
|
"Other"
|
|
43967
44135
|
]
|
|
43968
44136
|
}),
|
|
43969
|
-
/* @__PURE__ */
|
|
44137
|
+
/* @__PURE__ */ jsxs141(VerticalTab, {
|
|
43970
44138
|
style: horizontalTab,
|
|
43971
44139
|
selected: tab === "license",
|
|
43972
44140
|
onClick: () => setTab("license"),
|
|
43973
44141
|
children: [
|
|
43974
|
-
/* @__PURE__ */
|
|
44142
|
+
/* @__PURE__ */ jsx265("div", {
|
|
43975
44143
|
style: iconContainer,
|
|
43976
|
-
children: /* @__PURE__ */
|
|
44144
|
+
children: /* @__PURE__ */ jsx265(CertificateIcon, {
|
|
43977
44145
|
style: icon6
|
|
43978
44146
|
})
|
|
43979
44147
|
}),
|
|
@@ -43982,10 +44150,10 @@ var WebRenderModal = ({
|
|
|
43982
44150
|
})
|
|
43983
44151
|
]
|
|
43984
44152
|
}),
|
|
43985
|
-
/* @__PURE__ */
|
|
44153
|
+
/* @__PURE__ */ jsx265("div", {
|
|
43986
44154
|
style: optionsPanel,
|
|
43987
44155
|
className: VERTICAL_SCROLLBAR_CLASSNAME,
|
|
43988
|
-
children: tab === "general" ? /* @__PURE__ */
|
|
44156
|
+
children: tab === "general" ? /* @__PURE__ */ jsx265(WebRenderModalBasic, {
|
|
43989
44157
|
renderMode,
|
|
43990
44158
|
resolvedComposition,
|
|
43991
44159
|
imageFormat,
|
|
@@ -43995,8 +44163,9 @@ var WebRenderModal = ({
|
|
|
43995
44163
|
onFrameSetDirectly,
|
|
43996
44164
|
container: container61,
|
|
43997
44165
|
setContainerFormat,
|
|
43998
|
-
codec,
|
|
43999
44166
|
setCodec,
|
|
44167
|
+
encodableVideoCodecs,
|
|
44168
|
+
effectiveVideoCodec,
|
|
44000
44169
|
startFrame: finalStartFrame,
|
|
44001
44170
|
setStartFrame,
|
|
44002
44171
|
endFrame: finalEndFrame,
|
|
@@ -44006,7 +44175,7 @@ var WebRenderModal = ({
|
|
|
44006
44175
|
validationMessage: outnameValidation.valid ? null : outnameValidation.error.message,
|
|
44007
44176
|
logLevel,
|
|
44008
44177
|
setLogLevel
|
|
44009
|
-
}) : tab === "data" ? /* @__PURE__ */
|
|
44178
|
+
}) : tab === "data" ? /* @__PURE__ */ jsx265(DataEditor, {
|
|
44010
44179
|
defaultProps: inputProps,
|
|
44011
44180
|
setDefaultProps: setInputProps,
|
|
44012
44181
|
unresolvedComposition,
|
|
@@ -44015,7 +44184,7 @@ var WebRenderModal = ({
|
|
|
44015
44184
|
saving,
|
|
44016
44185
|
setSaving,
|
|
44017
44186
|
readOnlyStudio: false
|
|
44018
|
-
}) : tab === "picture" ? /* @__PURE__ */
|
|
44187
|
+
}) : tab === "picture" ? /* @__PURE__ */ jsx265(WebRenderModalPicture, {
|
|
44019
44188
|
renderMode,
|
|
44020
44189
|
videoBitrate,
|
|
44021
44190
|
setVideoBitrate,
|
|
@@ -44023,10 +44192,17 @@ var WebRenderModal = ({
|
|
|
44023
44192
|
setKeyframeIntervalInSeconds,
|
|
44024
44193
|
transparent,
|
|
44025
44194
|
setTransparent
|
|
44026
|
-
}) : tab === "audio" ? /* @__PURE__ */
|
|
44195
|
+
}) : tab === "audio" ? /* @__PURE__ */ jsx265(WebRenderModalAudio, {
|
|
44027
44196
|
muted,
|
|
44028
|
-
setMuted
|
|
44029
|
-
|
|
44197
|
+
setMuted,
|
|
44198
|
+
audioCodec,
|
|
44199
|
+
setAudioCodec,
|
|
44200
|
+
audioBitrate,
|
|
44201
|
+
setAudioBitrate,
|
|
44202
|
+
container: container61,
|
|
44203
|
+
encodableCodecs: encodableAudioCodecs,
|
|
44204
|
+
effectiveAudioCodec
|
|
44205
|
+
}) : tab === "advanced" ? /* @__PURE__ */ jsx265(WebRenderModalAdvanced, {
|
|
44030
44206
|
renderMode,
|
|
44031
44207
|
delayRenderTimeout,
|
|
44032
44208
|
setDelayRenderTimeout,
|
|
@@ -44034,7 +44210,7 @@ var WebRenderModal = ({
|
|
|
44034
44210
|
setMediaCacheSizeInBytes,
|
|
44035
44211
|
hardwareAcceleration,
|
|
44036
44212
|
setHardwareAcceleration
|
|
44037
|
-
}) : /* @__PURE__ */
|
|
44213
|
+
}) : /* @__PURE__ */ jsx265(WebRenderModalLicense, {
|
|
44038
44214
|
licenseKey,
|
|
44039
44215
|
setLicenseKey,
|
|
44040
44216
|
initialPublicLicenseKey: initialLicenseKey
|
|
@@ -44046,10 +44222,10 @@ var WebRenderModal = ({
|
|
|
44046
44222
|
});
|
|
44047
44223
|
};
|
|
44048
44224
|
var WebRenderModalWithLoader = (props) => {
|
|
44049
|
-
return /* @__PURE__ */
|
|
44050
|
-
children: /* @__PURE__ */
|
|
44225
|
+
return /* @__PURE__ */ jsx265(DismissableModal, {
|
|
44226
|
+
children: /* @__PURE__ */ jsx265(ResolveCompositionBeforeModal, {
|
|
44051
44227
|
compositionId: props.compositionId,
|
|
44052
|
-
children: /* @__PURE__ */
|
|
44228
|
+
children: /* @__PURE__ */ jsx265(WebRenderModal, {
|
|
44053
44229
|
...props
|
|
44054
44230
|
})
|
|
44055
44231
|
})
|
|
@@ -44057,11 +44233,11 @@ var WebRenderModalWithLoader = (props) => {
|
|
|
44057
44233
|
};
|
|
44058
44234
|
|
|
44059
44235
|
// src/components/UpdateModal/UpdateModal.tsx
|
|
44060
|
-
import { useCallback as useCallback134, useMemo as
|
|
44236
|
+
import { useCallback as useCallback134, useMemo as useMemo136 } from "react";
|
|
44061
44237
|
|
|
44062
44238
|
// src/components/CopyButton.tsx
|
|
44063
|
-
import { useCallback as useCallback132, useEffect as
|
|
44064
|
-
import { jsx as
|
|
44239
|
+
import { useCallback as useCallback132, useEffect as useEffect81, useState as useState85 } from "react";
|
|
44240
|
+
import { jsx as jsx266, jsxs as jsxs142 } from "react/jsx-runtime";
|
|
44065
44241
|
var iconStyle8 = {
|
|
44066
44242
|
width: 16,
|
|
44067
44243
|
height: 16,
|
|
@@ -44071,7 +44247,7 @@ var buttonContainerStyle = {
|
|
|
44071
44247
|
display: "flex",
|
|
44072
44248
|
minWidth: "114px"
|
|
44073
44249
|
};
|
|
44074
|
-
var copyIcon = /* @__PURE__ */
|
|
44250
|
+
var copyIcon = /* @__PURE__ */ jsx266("svg", {
|
|
44075
44251
|
"aria-hidden": "true",
|
|
44076
44252
|
focusable: "false",
|
|
44077
44253
|
"data-prefix": "far",
|
|
@@ -44081,7 +44257,7 @@ var copyIcon = /* @__PURE__ */ jsx265("svg", {
|
|
|
44081
44257
|
xmlns: "http://www.w3.org/2000/svg",
|
|
44082
44258
|
viewBox: "0 0 384 512",
|
|
44083
44259
|
style: iconStyle8,
|
|
44084
|
-
children: /* @__PURE__ */
|
|
44260
|
+
children: /* @__PURE__ */ jsx266("path", {
|
|
44085
44261
|
fill: "currentColor",
|
|
44086
44262
|
d: "M336 64h-80c0-35.3-28.7-64-64-64s-64 28.7-64 64H48C21.5 64 0 85.5 0 112v352c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48V112c0-26.5-21.5-48-48-48zM192 40c13.3 0 24 10.7 24 24s-10.7 24-24 24-24-10.7-24-24 10.7-24 24-24zm144 418c0 3.3-2.7 6-6 6H54c-3.3 0-6-2.7-6-6V118c0-3.3 2.7-6 6-6h42v36c0 6.6 5.4 12 12 12h168c6.6 0 12-5.4 12-12v-36h42c3.3 0 6 2.7 6 6z"
|
|
44087
44263
|
})
|
|
@@ -44090,7 +44266,7 @@ var labelStyle5 = {
|
|
|
44090
44266
|
fontSize: 14
|
|
44091
44267
|
};
|
|
44092
44268
|
var CopyButton = ({ textToCopy, label: label11, labelWhenCopied }) => {
|
|
44093
|
-
const [copied, setCopied] =
|
|
44269
|
+
const [copied, setCopied] = useState85(false);
|
|
44094
44270
|
const onClick = useCallback132(() => {
|
|
44095
44271
|
copyText(textToCopy).then(() => {
|
|
44096
44272
|
setCopied(Date.now());
|
|
@@ -44098,23 +44274,23 @@ var CopyButton = ({ textToCopy, label: label11, labelWhenCopied }) => {
|
|
|
44098
44274
|
showNotification(`Could not copy: ${err.message}`, 2000);
|
|
44099
44275
|
});
|
|
44100
44276
|
}, [textToCopy]);
|
|
44101
|
-
|
|
44277
|
+
useEffect81(() => {
|
|
44102
44278
|
if (!copied) {
|
|
44103
44279
|
return;
|
|
44104
44280
|
}
|
|
44105
44281
|
const to = setTimeout(() => setCopied(false), 2000);
|
|
44106
44282
|
return () => clearTimeout(to);
|
|
44107
44283
|
}, [copied]);
|
|
44108
|
-
return /* @__PURE__ */
|
|
44284
|
+
return /* @__PURE__ */ jsxs142(Button, {
|
|
44109
44285
|
onClick,
|
|
44110
44286
|
buttonContainerStyle,
|
|
44111
44287
|
children: [
|
|
44112
44288
|
copyIcon,
|
|
44113
|
-
/* @__PURE__ */
|
|
44289
|
+
/* @__PURE__ */ jsx266(Spacing, {
|
|
44114
44290
|
x: 1.5
|
|
44115
44291
|
}),
|
|
44116
44292
|
" ",
|
|
44117
|
-
/* @__PURE__ */
|
|
44293
|
+
/* @__PURE__ */ jsx266("span", {
|
|
44118
44294
|
style: labelStyle5,
|
|
44119
44295
|
children: copied ? labelWhenCopied : label11
|
|
44120
44296
|
})
|
|
@@ -44123,8 +44299,8 @@ var CopyButton = ({ textToCopy, label: label11, labelWhenCopied }) => {
|
|
|
44123
44299
|
};
|
|
44124
44300
|
|
|
44125
44301
|
// src/components/UpdateModal/OpenIssueButton.tsx
|
|
44126
|
-
import { useCallback as useCallback133, useMemo as
|
|
44127
|
-
import { jsx as
|
|
44302
|
+
import { useCallback as useCallback133, useMemo as useMemo135, useState as useState86 } from "react";
|
|
44303
|
+
import { jsx as jsx267 } from "react/jsx-runtime";
|
|
44128
44304
|
var svgStyle3 = {
|
|
44129
44305
|
width: "11px",
|
|
44130
44306
|
height: "11px"
|
|
@@ -44138,18 +44314,18 @@ var buttonStyle8 = {
|
|
|
44138
44314
|
alignItems: "center"
|
|
44139
44315
|
};
|
|
44140
44316
|
var OpenIssueButton = ({ link: link4 }) => {
|
|
44141
|
-
const [hovered, setHovered] =
|
|
44317
|
+
const [hovered, setHovered] = useState86(false);
|
|
44142
44318
|
const buttonTooltip = `Open GitHub issue in new Tab`;
|
|
44143
44319
|
const handleClick = useCallback133(() => {
|
|
44144
44320
|
window.open(link4, "_blank");
|
|
44145
44321
|
}, [link4]);
|
|
44146
|
-
const svgFillColor =
|
|
44322
|
+
const svgFillColor = useMemo135(() => {
|
|
44147
44323
|
return hovered ? "white" : LIGHT_TEXT;
|
|
44148
44324
|
}, [hovered]);
|
|
44149
|
-
const openInEditorSvg = /* @__PURE__ */
|
|
44325
|
+
const openInEditorSvg = /* @__PURE__ */ jsx267("svg", {
|
|
44150
44326
|
viewBox: "0 0 512 512",
|
|
44151
44327
|
style: svgStyle3,
|
|
44152
|
-
children: /* @__PURE__ */
|
|
44328
|
+
children: /* @__PURE__ */ jsx267("path", {
|
|
44153
44329
|
fill: svgFillColor,
|
|
44154
44330
|
d: "M320 0c-17.7 0-32 14.3-32 32s14.3 32 32 32h82.7L201.4 265.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L448 109.3V192c0 17.7 14.3 32 32 32s32-14.3 32-32V32c0-17.7-14.3-32-32-32H320zM80 32C35.8 32 0 67.8 0 112V432c0 44.2 35.8 80 80 80H400c44.2 0 80-35.8 80-80V320c0-17.7-14.3-32-32-32s-32 14.3-32 32V432c0 8.8-7.2 16-16 16H80c-8.8 0-16-7.2-16-16V112c0-8.8 7.2-16 16-16H192c17.7 0 32-14.3 32-32s-14.3-32-32-32H80z"
|
|
44155
44331
|
})
|
|
@@ -44160,7 +44336,7 @@ var OpenIssueButton = ({ link: link4 }) => {
|
|
|
44160
44336
|
const onPointerLeave = useCallback133(() => {
|
|
44161
44337
|
setHovered(false);
|
|
44162
44338
|
}, []);
|
|
44163
|
-
return /* @__PURE__ */
|
|
44339
|
+
return /* @__PURE__ */ jsx267("button", {
|
|
44164
44340
|
title: buttonTooltip,
|
|
44165
44341
|
type: "button",
|
|
44166
44342
|
onPointerEnter,
|
|
@@ -44172,7 +44348,7 @@ var OpenIssueButton = ({ link: link4 }) => {
|
|
|
44172
44348
|
};
|
|
44173
44349
|
|
|
44174
44350
|
// src/components/KnownBugs.tsx
|
|
44175
|
-
import { jsx as
|
|
44351
|
+
import { jsx as jsx268, jsxs as jsxs143 } from "react/jsx-runtime";
|
|
44176
44352
|
var container61 = {
|
|
44177
44353
|
display: "flex",
|
|
44178
44354
|
flexDirection: "row",
|
|
@@ -44184,29 +44360,29 @@ var text4 = {
|
|
|
44184
44360
|
};
|
|
44185
44361
|
var KnownBugs = ({ bugs }) => {
|
|
44186
44362
|
const bugElements = bugs.map((bug) => {
|
|
44187
|
-
return /* @__PURE__ */
|
|
44363
|
+
return /* @__PURE__ */ jsxs143("div", {
|
|
44188
44364
|
style: container61,
|
|
44189
44365
|
children: [
|
|
44190
|
-
/* @__PURE__ */
|
|
44366
|
+
/* @__PURE__ */ jsxs143("div", {
|
|
44191
44367
|
style: text4,
|
|
44192
44368
|
children: [
|
|
44193
44369
|
"\uD83E\uDEB2 ",
|
|
44194
44370
|
bug.title
|
|
44195
44371
|
]
|
|
44196
44372
|
}),
|
|
44197
|
-
/* @__PURE__ */
|
|
44373
|
+
/* @__PURE__ */ jsx268(OpenIssueButton, {
|
|
44198
44374
|
link: bug.link
|
|
44199
44375
|
})
|
|
44200
44376
|
]
|
|
44201
44377
|
}, bug.description + bug.link);
|
|
44202
44378
|
});
|
|
44203
|
-
return /* @__PURE__ */
|
|
44379
|
+
return /* @__PURE__ */ jsx268("div", {
|
|
44204
44380
|
children: bugElements
|
|
44205
44381
|
});
|
|
44206
44382
|
};
|
|
44207
44383
|
|
|
44208
44384
|
// src/components/UpdateModal/UpdateModal.tsx
|
|
44209
|
-
import { jsx as
|
|
44385
|
+
import { jsx as jsx269, jsxs as jsxs144, Fragment as Fragment48 } from "react/jsx-runtime";
|
|
44210
44386
|
var container62 = {
|
|
44211
44387
|
padding: 20,
|
|
44212
44388
|
paddingTop: 0
|
|
@@ -44240,7 +44416,7 @@ var commands = {
|
|
|
44240
44416
|
unknown: "npx remotion upgrade"
|
|
44241
44417
|
};
|
|
44242
44418
|
var UpdateModal = ({ info, knownBugs }) => {
|
|
44243
|
-
const hasKnownBugs =
|
|
44419
|
+
const hasKnownBugs = useMemo136(() => {
|
|
44244
44420
|
return knownBugs && knownBugs?.length > 0;
|
|
44245
44421
|
}, [knownBugs]);
|
|
44246
44422
|
const command = commands[info.packageManager];
|
|
@@ -44249,17 +44425,17 @@ var UpdateModal = ({ info, knownBugs }) => {
|
|
|
44249
44425
|
showNotification(`Could not copy: ${err.message}`, 2000);
|
|
44250
44426
|
});
|
|
44251
44427
|
}, [command]);
|
|
44252
|
-
return /* @__PURE__ */
|
|
44428
|
+
return /* @__PURE__ */ jsxs144(DismissableModal, {
|
|
44253
44429
|
children: [
|
|
44254
|
-
/* @__PURE__ */
|
|
44430
|
+
/* @__PURE__ */ jsx269(ModalHeader, {
|
|
44255
44431
|
title: "Update available"
|
|
44256
44432
|
}),
|
|
44257
|
-
/* @__PURE__ */
|
|
44433
|
+
/* @__PURE__ */ jsxs144("div", {
|
|
44258
44434
|
style: container62,
|
|
44259
44435
|
children: [
|
|
44260
|
-
hasKnownBugs ? /* @__PURE__ */
|
|
44436
|
+
hasKnownBugs ? /* @__PURE__ */ jsxs144(Fragment48, {
|
|
44261
44437
|
children: [
|
|
44262
|
-
/* @__PURE__ */
|
|
44438
|
+
/* @__PURE__ */ jsxs144("div", {
|
|
44263
44439
|
style: title7,
|
|
44264
44440
|
children: [
|
|
44265
44441
|
"The currently installed version ",
|
|
@@ -44267,42 +44443,42 @@ var UpdateModal = ({ info, knownBugs }) => {
|
|
|
44267
44443
|
" has the following known bugs:"
|
|
44268
44444
|
]
|
|
44269
44445
|
}),
|
|
44270
|
-
/* @__PURE__ */
|
|
44446
|
+
/* @__PURE__ */ jsx269(KnownBugs, {
|
|
44271
44447
|
bugs: knownBugs
|
|
44272
44448
|
}),
|
|
44273
|
-
/* @__PURE__ */
|
|
44449
|
+
/* @__PURE__ */ jsx269("div", {
|
|
44274
44450
|
style: { height: "20px" }
|
|
44275
44451
|
}),
|
|
44276
|
-
/* @__PURE__ */
|
|
44452
|
+
/* @__PURE__ */ jsx269("div", {
|
|
44277
44453
|
style: text5,
|
|
44278
44454
|
children: "To upgrade, run the following command:"
|
|
44279
44455
|
})
|
|
44280
44456
|
]
|
|
44281
|
-
}) : /* @__PURE__ */
|
|
44457
|
+
}) : /* @__PURE__ */ jsx269("div", {
|
|
44282
44458
|
style: title7,
|
|
44283
44459
|
children: "A new update for Remotion is available! Run the following command:"
|
|
44284
44460
|
}),
|
|
44285
|
-
/* @__PURE__ */
|
|
44461
|
+
/* @__PURE__ */ jsxs144(Row, {
|
|
44286
44462
|
align: "center",
|
|
44287
44463
|
children: [
|
|
44288
|
-
/* @__PURE__ */
|
|
44289
|
-
children: /* @__PURE__ */
|
|
44464
|
+
/* @__PURE__ */ jsx269(Flex, {
|
|
44465
|
+
children: /* @__PURE__ */ jsx269("pre", {
|
|
44290
44466
|
onClick,
|
|
44291
44467
|
style: code,
|
|
44292
44468
|
children: command
|
|
44293
44469
|
})
|
|
44294
44470
|
}),
|
|
44295
|
-
/* @__PURE__ */
|
|
44471
|
+
/* @__PURE__ */ jsx269(Spacing, {
|
|
44296
44472
|
x: 1
|
|
44297
44473
|
}),
|
|
44298
|
-
/* @__PURE__ */
|
|
44474
|
+
/* @__PURE__ */ jsx269(CopyButton, {
|
|
44299
44475
|
textToCopy: command,
|
|
44300
44476
|
label: "Copy",
|
|
44301
44477
|
labelWhenCopied: "Copied!"
|
|
44302
44478
|
})
|
|
44303
44479
|
]
|
|
44304
44480
|
}),
|
|
44305
|
-
/* @__PURE__ */
|
|
44481
|
+
/* @__PURE__ */ jsxs144("div", {
|
|
44306
44482
|
style: text5,
|
|
44307
44483
|
children: [
|
|
44308
44484
|
"This will upgrade Remotion from ",
|
|
@@ -44313,12 +44489,12 @@ var UpdateModal = ({ info, knownBugs }) => {
|
|
|
44313
44489
|
"."
|
|
44314
44490
|
]
|
|
44315
44491
|
}),
|
|
44316
|
-
/* @__PURE__ */
|
|
44492
|
+
/* @__PURE__ */ jsxs144("div", {
|
|
44317
44493
|
style: text5,
|
|
44318
44494
|
children: [
|
|
44319
44495
|
"Read the",
|
|
44320
44496
|
" ",
|
|
44321
|
-
/* @__PURE__ */
|
|
44497
|
+
/* @__PURE__ */ jsx269("a", {
|
|
44322
44498
|
style: link4,
|
|
44323
44499
|
target: "_blank",
|
|
44324
44500
|
href: "https://github.com/remotion-dev/remotion/releases",
|
|
@@ -44337,24 +44513,24 @@ var UpdateModal = ({ info, knownBugs }) => {
|
|
|
44337
44513
|
};
|
|
44338
44514
|
|
|
44339
44515
|
// src/components/Modals.tsx
|
|
44340
|
-
import { jsx as
|
|
44516
|
+
import { jsx as jsx270, jsxs as jsxs145, Fragment as Fragment49 } from "react/jsx-runtime";
|
|
44341
44517
|
var Modals = ({ readOnlyStudio }) => {
|
|
44342
44518
|
const { selectedModal: modalContextType } = useContext83(ModalsContext);
|
|
44343
44519
|
const canRender = useContext83(StudioServerConnectionCtx).previewServerState.type === "connected";
|
|
44344
|
-
return /* @__PURE__ */
|
|
44520
|
+
return /* @__PURE__ */ jsxs145(Fragment49, {
|
|
44345
44521
|
children: [
|
|
44346
|
-
modalContextType && modalContextType.type === "duplicate-comp" && /* @__PURE__ */
|
|
44522
|
+
modalContextType && modalContextType.type === "duplicate-comp" && /* @__PURE__ */ jsx270(DuplicateComposition, {
|
|
44347
44523
|
compositionType: modalContextType.compositionType,
|
|
44348
44524
|
compositionId: modalContextType.compositionId
|
|
44349
44525
|
}),
|
|
44350
|
-
modalContextType && modalContextType.type === "delete-comp" && /* @__PURE__ */
|
|
44526
|
+
modalContextType && modalContextType.type === "delete-comp" && /* @__PURE__ */ jsx270(DeleteComposition, {
|
|
44351
44527
|
compositionId: modalContextType.compositionId
|
|
44352
44528
|
}),
|
|
44353
|
-
modalContextType && modalContextType.type === "rename-comp" && /* @__PURE__ */
|
|
44529
|
+
modalContextType && modalContextType.type === "rename-comp" && /* @__PURE__ */ jsx270(RenameComposition, {
|
|
44354
44530
|
compositionId: modalContextType.compositionId
|
|
44355
44531
|
}),
|
|
44356
|
-
modalContextType && modalContextType.type === "input-props-override" && /* @__PURE__ */
|
|
44357
|
-
modalContextType && modalContextType.type === "web-render" && /* @__PURE__ */
|
|
44532
|
+
modalContextType && modalContextType.type === "input-props-override" && /* @__PURE__ */ jsx270(OverrideInputPropsModal, {}),
|
|
44533
|
+
modalContextType && modalContextType.type === "web-render" && /* @__PURE__ */ jsx270(WebRenderModalWithLoader, {
|
|
44358
44534
|
type: "web-render",
|
|
44359
44535
|
initialFrame: modalContextType.initialFrame,
|
|
44360
44536
|
compositionId: modalContextType.compositionId,
|
|
@@ -44364,7 +44540,7 @@ var Modals = ({ readOnlyStudio }) => {
|
|
|
44364
44540
|
initialLogLevel: modalContextType.initialLogLevel,
|
|
44365
44541
|
initialLicenseKey: modalContextType.initialLicenseKey
|
|
44366
44542
|
}),
|
|
44367
|
-
modalContextType && canRender && modalContextType.type === "server-render" && /* @__PURE__ */
|
|
44543
|
+
modalContextType && canRender && modalContextType.type === "server-render" && /* @__PURE__ */ jsx270(RenderModalWithLoader, {
|
|
44368
44544
|
initialFrame: modalContextType.initialFrame,
|
|
44369
44545
|
initialDarkMode: modalContextType.initialDarkMode,
|
|
44370
44546
|
compositionId: modalContextType.compositionId,
|
|
@@ -44413,28 +44589,28 @@ var Modals = ({ readOnlyStudio }) => {
|
|
|
44413
44589
|
initialChromeMode: modalContextType.initialChromeMode,
|
|
44414
44590
|
renderDefaults: modalContextType.renderDefaults
|
|
44415
44591
|
}),
|
|
44416
|
-
modalContextType && canRender && modalContextType.type === "render-progress" && /* @__PURE__ */
|
|
44592
|
+
modalContextType && canRender && modalContextType.type === "render-progress" && /* @__PURE__ */ jsx270(RenderStatusModal, {
|
|
44417
44593
|
jobId: modalContextType.jobId
|
|
44418
44594
|
}),
|
|
44419
|
-
modalContextType && modalContextType.type === "update" && /* @__PURE__ */
|
|
44595
|
+
modalContextType && modalContextType.type === "update" && /* @__PURE__ */ jsx270(UpdateModal, {
|
|
44420
44596
|
info: modalContextType.info,
|
|
44421
44597
|
knownBugs: modalContextType.knownBugs
|
|
44422
44598
|
}),
|
|
44423
|
-
modalContextType && modalContextType.type === "install-packages" && /* @__PURE__ */
|
|
44599
|
+
modalContextType && modalContextType.type === "install-packages" && /* @__PURE__ */ jsx270(InstallPackageModal, {
|
|
44424
44600
|
packageManager: modalContextType.packageManager
|
|
44425
44601
|
}),
|
|
44426
|
-
modalContextType && modalContextType.type === "quick-switcher" && /* @__PURE__ */
|
|
44602
|
+
modalContextType && modalContextType.type === "quick-switcher" && /* @__PURE__ */ jsx270(QuickSwitcher_default, {
|
|
44427
44603
|
readOnlyStudio,
|
|
44428
44604
|
invocationTimestamp: modalContextType.invocationTimestamp,
|
|
44429
44605
|
initialMode: modalContextType.mode
|
|
44430
44606
|
}),
|
|
44431
|
-
/* @__PURE__ */
|
|
44607
|
+
/* @__PURE__ */ jsx270(AskAiModal, {})
|
|
44432
44608
|
]
|
|
44433
44609
|
});
|
|
44434
44610
|
};
|
|
44435
44611
|
|
|
44436
44612
|
// src/components/Editor.tsx
|
|
44437
|
-
import { jsx as
|
|
44613
|
+
import { jsx as jsx271, jsxs as jsxs146 } from "react/jsx-runtime";
|
|
44438
44614
|
var background2 = {
|
|
44439
44615
|
backgroundColor: BACKGROUND,
|
|
44440
44616
|
display: "flex",
|
|
@@ -44450,7 +44626,7 @@ var Editor = ({ Root, readOnlyStudio }) => {
|
|
|
44450
44626
|
triggerOnWindowResize: false,
|
|
44451
44627
|
shouldApplyCssTransforms: true
|
|
44452
44628
|
});
|
|
44453
|
-
|
|
44629
|
+
useEffect82(() => {
|
|
44454
44630
|
if (readOnlyStudio) {
|
|
44455
44631
|
return;
|
|
44456
44632
|
}
|
|
@@ -44464,11 +44640,11 @@ var Editor = ({ Root, readOnlyStudio }) => {
|
|
|
44464
44640
|
window.removeEventListener("beforeunload", listenToChanges);
|
|
44465
44641
|
};
|
|
44466
44642
|
}, [readOnlyStudio]);
|
|
44467
|
-
const [canvasMounted, setCanvasMounted] =
|
|
44643
|
+
const [canvasMounted, setCanvasMounted] = React178.useState(false);
|
|
44468
44644
|
const onMounted = useCallback135(() => {
|
|
44469
44645
|
setCanvasMounted(true);
|
|
44470
44646
|
}, []);
|
|
44471
|
-
const value =
|
|
44647
|
+
const value = useMemo137(() => {
|
|
44472
44648
|
if (!size4) {
|
|
44473
44649
|
return null;
|
|
44474
44650
|
}
|
|
@@ -44477,41 +44653,41 @@ var Editor = ({ Root, readOnlyStudio }) => {
|
|
|
44477
44653
|
canvasSize: size4
|
|
44478
44654
|
};
|
|
44479
44655
|
}, [size4]);
|
|
44480
|
-
const MemoRoot =
|
|
44481
|
-
return
|
|
44656
|
+
const MemoRoot = useMemo137(() => {
|
|
44657
|
+
return React178.memo(Root);
|
|
44482
44658
|
}, [Root]);
|
|
44483
|
-
return /* @__PURE__ */
|
|
44659
|
+
return /* @__PURE__ */ jsx271(HigherZIndex, {
|
|
44484
44660
|
onEscape: noop,
|
|
44485
44661
|
onOutsideClick: noop,
|
|
44486
|
-
children: /* @__PURE__ */
|
|
44662
|
+
children: /* @__PURE__ */ jsxs146(TimelineZoomContext, {
|
|
44487
44663
|
children: [
|
|
44488
|
-
/* @__PURE__ */
|
|
44664
|
+
/* @__PURE__ */ jsx271(Internals61.CurrentScaleContext.Provider, {
|
|
44489
44665
|
value,
|
|
44490
|
-
children: /* @__PURE__ */
|
|
44666
|
+
children: /* @__PURE__ */ jsxs146("div", {
|
|
44491
44667
|
style: background2,
|
|
44492
44668
|
children: [
|
|
44493
|
-
canvasMounted ? /* @__PURE__ */
|
|
44494
|
-
/* @__PURE__ */
|
|
44669
|
+
canvasMounted ? /* @__PURE__ */ jsx271(MemoRoot, {}) : null,
|
|
44670
|
+
/* @__PURE__ */ jsxs146(Internals61.CanUseRemotionHooksProvider, {
|
|
44495
44671
|
children: [
|
|
44496
|
-
/* @__PURE__ */
|
|
44672
|
+
/* @__PURE__ */ jsx271(EditorContent, {
|
|
44497
44673
|
readOnlyStudio,
|
|
44498
|
-
children: /* @__PURE__ */
|
|
44674
|
+
children: /* @__PURE__ */ jsx271(TopPanel, {
|
|
44499
44675
|
drawRef,
|
|
44500
44676
|
bufferStateDelayInMilliseconds: BUFFER_STATE_DELAY_IN_MILLISECONDS,
|
|
44501
44677
|
onMounted,
|
|
44502
44678
|
readOnlyStudio
|
|
44503
44679
|
})
|
|
44504
44680
|
}),
|
|
44505
|
-
/* @__PURE__ */
|
|
44681
|
+
/* @__PURE__ */ jsx271(GlobalKeybindings, {})
|
|
44506
44682
|
]
|
|
44507
44683
|
})
|
|
44508
44684
|
]
|
|
44509
44685
|
})
|
|
44510
44686
|
}),
|
|
44511
|
-
/* @__PURE__ */
|
|
44687
|
+
/* @__PURE__ */ jsx271(Modals, {
|
|
44512
44688
|
readOnlyStudio
|
|
44513
44689
|
}),
|
|
44514
|
-
/* @__PURE__ */
|
|
44690
|
+
/* @__PURE__ */ jsx271(NotificationCenter, {})
|
|
44515
44691
|
]
|
|
44516
44692
|
})
|
|
44517
44693
|
});
|
|
@@ -44521,9 +44697,9 @@ var Editor = ({ Root, readOnlyStudio }) => {
|
|
|
44521
44697
|
import { PlayerInternals as PlayerInternals20 } from "@remotion/player";
|
|
44522
44698
|
|
|
44523
44699
|
// src/state/preview-size.tsx
|
|
44524
|
-
import { useCallback as useCallback136, useContext as useContext84, useMemo as
|
|
44700
|
+
import { useCallback as useCallback136, useContext as useContext84, useMemo as useMemo138, useState as useState87 } from "react";
|
|
44525
44701
|
import { Internals as Internals62 } from "remotion";
|
|
44526
|
-
import { jsx as
|
|
44702
|
+
import { jsx as jsx272 } from "react/jsx-runtime";
|
|
44527
44703
|
var key5 = "remotion.previewSize";
|
|
44528
44704
|
var persistPreviewSizeOption = (option) => {
|
|
44529
44705
|
localStorage.setItem(key5, JSON.stringify(option));
|
|
@@ -44542,8 +44718,8 @@ var loadPreviewSizeOption = () => {
|
|
|
44542
44718
|
return JSON.parse(item2);
|
|
44543
44719
|
};
|
|
44544
44720
|
var PreviewSizeProvider = ({ children }) => {
|
|
44545
|
-
const [size4, setSizeState] =
|
|
44546
|
-
const [translation, setTranslation] =
|
|
44721
|
+
const [size4, setSizeState] = useState87(() => loadPreviewSizeOption());
|
|
44722
|
+
const [translation, setTranslation] = useState87(() => {
|
|
44547
44723
|
return {
|
|
44548
44724
|
x: 0,
|
|
44549
44725
|
y: 0
|
|
@@ -44557,7 +44733,7 @@ var PreviewSizeProvider = ({ children }) => {
|
|
|
44557
44733
|
return newVal;
|
|
44558
44734
|
});
|
|
44559
44735
|
}, []);
|
|
44560
|
-
const previewSizeCtx =
|
|
44736
|
+
const previewSizeCtx = useMemo138(() => {
|
|
44561
44737
|
return {
|
|
44562
44738
|
size: editorZoomGestures ? size4 : {
|
|
44563
44739
|
size: size4.size,
|
|
@@ -44571,17 +44747,17 @@ var PreviewSizeProvider = ({ children }) => {
|
|
|
44571
44747
|
setTranslation
|
|
44572
44748
|
};
|
|
44573
44749
|
}, [editorZoomGestures, size4, setSize, translation]);
|
|
44574
|
-
return /* @__PURE__ */
|
|
44750
|
+
return /* @__PURE__ */ jsx272(Internals62.PreviewSizeContext.Provider, {
|
|
44575
44751
|
value: previewSizeCtx,
|
|
44576
44752
|
children
|
|
44577
44753
|
});
|
|
44578
44754
|
};
|
|
44579
44755
|
|
|
44580
44756
|
// src/components/CheckerboardProvider.tsx
|
|
44581
|
-
import { useCallback as useCallback137, useMemo as
|
|
44582
|
-
import { jsx as
|
|
44757
|
+
import { useCallback as useCallback137, useMemo as useMemo139, useState as useState88 } from "react";
|
|
44758
|
+
import { jsx as jsx273 } from "react/jsx-runtime";
|
|
44583
44759
|
var CheckerboardProvider = ({ children }) => {
|
|
44584
|
-
const [checkerboard, setCheckerboardState] =
|
|
44760
|
+
const [checkerboard, setCheckerboardState] = useState88(() => loadCheckerboardOption());
|
|
44585
44761
|
const setCheckerboard = useCallback137((newValue) => {
|
|
44586
44762
|
setCheckerboardState((prevState) => {
|
|
44587
44763
|
const newVal = newValue(prevState);
|
|
@@ -44589,40 +44765,40 @@ var CheckerboardProvider = ({ children }) => {
|
|
|
44589
44765
|
return newVal;
|
|
44590
44766
|
});
|
|
44591
44767
|
}, []);
|
|
44592
|
-
const checkerboardCtx =
|
|
44768
|
+
const checkerboardCtx = useMemo139(() => {
|
|
44593
44769
|
return {
|
|
44594
44770
|
checkerboard,
|
|
44595
44771
|
setCheckerboard
|
|
44596
44772
|
};
|
|
44597
44773
|
}, [checkerboard, setCheckerboard]);
|
|
44598
|
-
return /* @__PURE__ */
|
|
44774
|
+
return /* @__PURE__ */ jsx273(CheckerboardContext.Provider, {
|
|
44599
44775
|
value: checkerboardCtx,
|
|
44600
44776
|
children
|
|
44601
44777
|
});
|
|
44602
44778
|
};
|
|
44603
44779
|
|
|
44604
44780
|
// src/components/MediaVolumeProvider.tsx
|
|
44605
|
-
import { useMemo as
|
|
44781
|
+
import { useMemo as useMemo140, useState as useState89 } from "react";
|
|
44606
44782
|
import { Internals as Internals63 } from "remotion";
|
|
44607
|
-
import { jsx as
|
|
44783
|
+
import { jsx as jsx274 } from "react/jsx-runtime";
|
|
44608
44784
|
var MediaVolumeProvider = ({ children }) => {
|
|
44609
|
-
const [mediaMuted, setMediaMuted] =
|
|
44610
|
-
const [mediaVolume, setMediaVolume] =
|
|
44611
|
-
const mediaVolumeContextValue =
|
|
44785
|
+
const [mediaMuted, setMediaMuted] = useState89(() => loadMuteOption());
|
|
44786
|
+
const [mediaVolume, setMediaVolume] = useState89(1);
|
|
44787
|
+
const mediaVolumeContextValue = useMemo140(() => {
|
|
44612
44788
|
return {
|
|
44613
44789
|
mediaMuted,
|
|
44614
44790
|
mediaVolume
|
|
44615
44791
|
};
|
|
44616
44792
|
}, [mediaMuted, mediaVolume]);
|
|
44617
|
-
const setMediaVolumeContextValue =
|
|
44793
|
+
const setMediaVolumeContextValue = useMemo140(() => {
|
|
44618
44794
|
return {
|
|
44619
44795
|
setMediaMuted,
|
|
44620
44796
|
setMediaVolume
|
|
44621
44797
|
};
|
|
44622
44798
|
}, []);
|
|
44623
|
-
return /* @__PURE__ */
|
|
44799
|
+
return /* @__PURE__ */ jsx274(Internals63.MediaVolumeContext.Provider, {
|
|
44624
44800
|
value: mediaVolumeContextValue,
|
|
44625
|
-
children: /* @__PURE__ */
|
|
44801
|
+
children: /* @__PURE__ */ jsx274(Internals63.SetMediaVolumeContext.Provider, {
|
|
44626
44802
|
value: setMediaVolumeContextValue,
|
|
44627
44803
|
children
|
|
44628
44804
|
})
|
|
@@ -44630,24 +44806,24 @@ var MediaVolumeProvider = ({ children }) => {
|
|
|
44630
44806
|
};
|
|
44631
44807
|
|
|
44632
44808
|
// src/components/ModalsProvider.tsx
|
|
44633
|
-
import { useMemo as
|
|
44634
|
-
import { jsx as
|
|
44809
|
+
import { useMemo as useMemo141, useState as useState90 } from "react";
|
|
44810
|
+
import { jsx as jsx275 } from "react/jsx-runtime";
|
|
44635
44811
|
var ModalsProvider = ({ children }) => {
|
|
44636
|
-
const [modalContextType, setModalContextType] =
|
|
44637
|
-
const modalsContext =
|
|
44812
|
+
const [modalContextType, setModalContextType] = useState90(null);
|
|
44813
|
+
const modalsContext = useMemo141(() => {
|
|
44638
44814
|
return {
|
|
44639
44815
|
selectedModal: modalContextType,
|
|
44640
44816
|
setSelectedModal: setModalContextType
|
|
44641
44817
|
};
|
|
44642
44818
|
}, [modalContextType]);
|
|
44643
|
-
return /* @__PURE__ */
|
|
44819
|
+
return /* @__PURE__ */ jsx275(ModalsContext.Provider, {
|
|
44644
44820
|
value: modalsContext,
|
|
44645
44821
|
children
|
|
44646
44822
|
});
|
|
44647
44823
|
};
|
|
44648
44824
|
|
|
44649
44825
|
// src/components/SetTimelineInOutProvider.tsx
|
|
44650
|
-
import { useEffect as
|
|
44826
|
+
import { useEffect as useEffect83, useMemo as useMemo142, useState as useState91 } from "react";
|
|
44651
44827
|
|
|
44652
44828
|
// src/state/marks.ts
|
|
44653
44829
|
var localStorageKey5 = () => `remotion.editor.marksv2`;
|
|
@@ -44663,20 +44839,20 @@ var loadMarks = () => {
|
|
|
44663
44839
|
};
|
|
44664
44840
|
|
|
44665
44841
|
// src/components/SetTimelineInOutProvider.tsx
|
|
44666
|
-
import { jsx as
|
|
44842
|
+
import { jsx as jsx276 } from "react/jsx-runtime";
|
|
44667
44843
|
var SetTimelineInOutProvider = ({ children }) => {
|
|
44668
|
-
const [inAndOutFrames, setInAndOutFrames] =
|
|
44669
|
-
const setTimelineInOutContextValue =
|
|
44844
|
+
const [inAndOutFrames, setInAndOutFrames] = useState91(() => loadMarks());
|
|
44845
|
+
const setTimelineInOutContextValue = useMemo142(() => {
|
|
44670
44846
|
return {
|
|
44671
44847
|
setInAndOutFrames
|
|
44672
44848
|
};
|
|
44673
44849
|
}, []);
|
|
44674
|
-
|
|
44850
|
+
useEffect83(() => {
|
|
44675
44851
|
persistMarks(inAndOutFrames);
|
|
44676
44852
|
}, [inAndOutFrames]);
|
|
44677
|
-
return /* @__PURE__ */
|
|
44853
|
+
return /* @__PURE__ */ jsx276(TimelineInOutContext.Provider, {
|
|
44678
44854
|
value: inAndOutFrames,
|
|
44679
|
-
children: /* @__PURE__ */
|
|
44855
|
+
children: /* @__PURE__ */ jsx276(SetTimelineInOutContext.Provider, {
|
|
44680
44856
|
value: setTimelineInOutContextValue,
|
|
44681
44857
|
children
|
|
44682
44858
|
})
|
|
@@ -44684,15 +44860,15 @@ var SetTimelineInOutProvider = ({ children }) => {
|
|
|
44684
44860
|
};
|
|
44685
44861
|
|
|
44686
44862
|
// src/components/ShowGuidesProvider.tsx
|
|
44687
|
-
import { useCallback as useCallback138, useMemo as
|
|
44688
|
-
import { jsx as
|
|
44863
|
+
import { useCallback as useCallback138, useMemo as useMemo143, useRef as useRef46, useState as useState92 } from "react";
|
|
44864
|
+
import { jsx as jsx277 } from "react/jsx-runtime";
|
|
44689
44865
|
var ShowGuidesProvider = ({ children }) => {
|
|
44690
|
-
const [guidesList, setGuidesList] =
|
|
44691
|
-
const [selectedGuideId, setSelectedGuideId] =
|
|
44692
|
-
const [hoveredGuideId, setHoveredGuideId] =
|
|
44693
|
-
const [editorShowGuides, setEditorShowGuidesState] =
|
|
44694
|
-
const shouldCreateGuideRef =
|
|
44695
|
-
const shouldDeleteGuideRef =
|
|
44866
|
+
const [guidesList, setGuidesList] = useState92(() => loadGuidesList());
|
|
44867
|
+
const [selectedGuideId, setSelectedGuideId] = useState92(null);
|
|
44868
|
+
const [hoveredGuideId, setHoveredGuideId] = useState92(null);
|
|
44869
|
+
const [editorShowGuides, setEditorShowGuidesState] = useState92(() => loadEditorShowGuidesOption());
|
|
44870
|
+
const shouldCreateGuideRef = useRef46(false);
|
|
44871
|
+
const shouldDeleteGuideRef = useRef46(false);
|
|
44696
44872
|
const setEditorShowGuides = useCallback138((newValue) => {
|
|
44697
44873
|
setEditorShowGuidesState((prevState) => {
|
|
44698
44874
|
const newVal = newValue(prevState);
|
|
@@ -44700,7 +44876,7 @@ var ShowGuidesProvider = ({ children }) => {
|
|
|
44700
44876
|
return newVal;
|
|
44701
44877
|
});
|
|
44702
44878
|
}, []);
|
|
44703
|
-
const editorShowGuidesCtx =
|
|
44879
|
+
const editorShowGuidesCtx = useMemo143(() => {
|
|
44704
44880
|
return {
|
|
44705
44881
|
editorShowGuides,
|
|
44706
44882
|
setEditorShowGuides,
|
|
@@ -44720,17 +44896,17 @@ var ShowGuidesProvider = ({ children }) => {
|
|
|
44720
44896
|
selectedGuideId,
|
|
44721
44897
|
hoveredGuideId
|
|
44722
44898
|
]);
|
|
44723
|
-
return /* @__PURE__ */
|
|
44899
|
+
return /* @__PURE__ */ jsx277(EditorShowGuidesContext.Provider, {
|
|
44724
44900
|
value: editorShowGuidesCtx,
|
|
44725
44901
|
children
|
|
44726
44902
|
});
|
|
44727
44903
|
};
|
|
44728
44904
|
|
|
44729
44905
|
// src/components/ShowRulersProvider.tsx
|
|
44730
|
-
import { useCallback as useCallback139, useMemo as
|
|
44731
|
-
import { jsx as
|
|
44906
|
+
import { useCallback as useCallback139, useMemo as useMemo144, useState as useState93 } from "react";
|
|
44907
|
+
import { jsx as jsx278 } from "react/jsx-runtime";
|
|
44732
44908
|
var ShowRulersProvider = ({ children }) => {
|
|
44733
|
-
const [editorShowRulers, setEditorShowRulersState] =
|
|
44909
|
+
const [editorShowRulers, setEditorShowRulersState] = useState93(() => loadEditorShowRulersOption());
|
|
44734
44910
|
const setEditorShowRulers = useCallback139((newValue) => {
|
|
44735
44911
|
setEditorShowRulersState((prevState) => {
|
|
44736
44912
|
const newVal = newValue(prevState);
|
|
@@ -44738,23 +44914,23 @@ var ShowRulersProvider = ({ children }) => {
|
|
|
44738
44914
|
return newVal;
|
|
44739
44915
|
});
|
|
44740
44916
|
}, []);
|
|
44741
|
-
const editorShowRulersCtx =
|
|
44917
|
+
const editorShowRulersCtx = useMemo144(() => {
|
|
44742
44918
|
return {
|
|
44743
44919
|
editorShowRulers,
|
|
44744
44920
|
setEditorShowRulers
|
|
44745
44921
|
};
|
|
44746
44922
|
}, [editorShowRulers, setEditorShowRulers]);
|
|
44747
|
-
return /* @__PURE__ */
|
|
44923
|
+
return /* @__PURE__ */ jsx278(EditorShowRulersContext.Provider, {
|
|
44748
44924
|
value: editorShowRulersCtx,
|
|
44749
44925
|
children
|
|
44750
44926
|
});
|
|
44751
44927
|
};
|
|
44752
44928
|
|
|
44753
44929
|
// src/components/ZoomGesturesProvider.tsx
|
|
44754
|
-
import { useCallback as useCallback140, useMemo as
|
|
44755
|
-
import { jsx as
|
|
44930
|
+
import { useCallback as useCallback140, useMemo as useMemo145, useState as useState94 } from "react";
|
|
44931
|
+
import { jsx as jsx279 } from "react/jsx-runtime";
|
|
44756
44932
|
var ZoomGesturesProvider = ({ children }) => {
|
|
44757
|
-
const [editorZoomGestures, setEditorZoomGesturesState] =
|
|
44933
|
+
const [editorZoomGestures, setEditorZoomGesturesState] = useState94(() => loadEditorZoomGesturesOption());
|
|
44758
44934
|
const setEditorZoomGestures = useCallback140((newValue) => {
|
|
44759
44935
|
setEditorZoomGesturesState((prevState) => {
|
|
44760
44936
|
const newVal = newValue(prevState);
|
|
@@ -44762,40 +44938,40 @@ var ZoomGesturesProvider = ({ children }) => {
|
|
|
44762
44938
|
return newVal;
|
|
44763
44939
|
});
|
|
44764
44940
|
}, []);
|
|
44765
|
-
const editorZoomGesturesCtx =
|
|
44941
|
+
const editorZoomGesturesCtx = useMemo145(() => {
|
|
44766
44942
|
return {
|
|
44767
44943
|
editorZoomGestures,
|
|
44768
44944
|
setEditorZoomGestures
|
|
44769
44945
|
};
|
|
44770
44946
|
}, [editorZoomGestures, setEditorZoomGestures]);
|
|
44771
|
-
return /* @__PURE__ */
|
|
44947
|
+
return /* @__PURE__ */ jsx279(EditorZoomGesturesContext.Provider, {
|
|
44772
44948
|
value: editorZoomGesturesCtx,
|
|
44773
44949
|
children
|
|
44774
44950
|
});
|
|
44775
44951
|
};
|
|
44776
44952
|
|
|
44777
44953
|
// src/components/EditorContexts.tsx
|
|
44778
|
-
import { jsx as
|
|
44954
|
+
import { jsx as jsx280 } from "react/jsx-runtime";
|
|
44779
44955
|
var EditorContexts = ({ children, readOnlyStudio }) => {
|
|
44780
|
-
return /* @__PURE__ */
|
|
44781
|
-
children: /* @__PURE__ */
|
|
44782
|
-
children: /* @__PURE__ */
|
|
44956
|
+
return /* @__PURE__ */ jsx280(ZodProvider, {
|
|
44957
|
+
children: /* @__PURE__ */ jsx280(VisualControlsProvider, {
|
|
44958
|
+
children: /* @__PURE__ */ jsx280(PreviewServerConnection, {
|
|
44783
44959
|
readOnlyStudio,
|
|
44784
|
-
children: /* @__PURE__ */
|
|
44785
|
-
children: /* @__PURE__ */
|
|
44786
|
-
children: /* @__PURE__ */
|
|
44787
|
-
children: /* @__PURE__ */
|
|
44788
|
-
children: /* @__PURE__ */
|
|
44789
|
-
children: /* @__PURE__ */
|
|
44790
|
-
children: /* @__PURE__ */
|
|
44791
|
-
children: /* @__PURE__ */
|
|
44792
|
-
children: /* @__PURE__ */
|
|
44793
|
-
children: /* @__PURE__ */
|
|
44960
|
+
children: /* @__PURE__ */ jsx280(RenderQueueContextProvider, {
|
|
44961
|
+
children: /* @__PURE__ */ jsx280(KeybindingContextProvider, {
|
|
44962
|
+
children: /* @__PURE__ */ jsx280(CheckerboardProvider, {
|
|
44963
|
+
children: /* @__PURE__ */ jsx280(ZoomGesturesProvider, {
|
|
44964
|
+
children: /* @__PURE__ */ jsx280(ShowRulersProvider, {
|
|
44965
|
+
children: /* @__PURE__ */ jsx280(ShowGuidesProvider, {
|
|
44966
|
+
children: /* @__PURE__ */ jsx280(PreviewSizeProvider, {
|
|
44967
|
+
children: /* @__PURE__ */ jsx280(ModalsProvider, {
|
|
44968
|
+
children: /* @__PURE__ */ jsx280(MediaVolumeProvider, {
|
|
44969
|
+
children: /* @__PURE__ */ jsx280(PlayerInternals20.PlayerEmitterProvider, {
|
|
44794
44970
|
currentPlaybackRate: null,
|
|
44795
|
-
children: /* @__PURE__ */
|
|
44796
|
-
children: /* @__PURE__ */
|
|
44797
|
-
children: /* @__PURE__ */
|
|
44798
|
-
children: /* @__PURE__ */
|
|
44971
|
+
children: /* @__PURE__ */ jsx280(SidebarContextProvider, {
|
|
44972
|
+
children: /* @__PURE__ */ jsx280(FolderContextProvider, {
|
|
44973
|
+
children: /* @__PURE__ */ jsx280(HighestZIndexProvider, {
|
|
44974
|
+
children: /* @__PURE__ */ jsx280(SetTimelineInOutProvider, {
|
|
44799
44975
|
children
|
|
44800
44976
|
})
|
|
44801
44977
|
})
|
|
@@ -44818,7 +44994,7 @@ var EditorContexts = ({ children, readOnlyStudio }) => {
|
|
|
44818
44994
|
|
|
44819
44995
|
// src/components/Notifications/ServerDisconnected.tsx
|
|
44820
44996
|
import { useContext as useContext85 } from "react";
|
|
44821
|
-
import { jsx as
|
|
44997
|
+
import { jsx as jsx281, jsxs as jsxs147 } from "react/jsx-runtime";
|
|
44822
44998
|
var container63 = {
|
|
44823
44999
|
position: "fixed",
|
|
44824
45000
|
justifyContent: "flex-end",
|
|
@@ -44863,26 +45039,26 @@ var ServerDisconnected = () => {
|
|
|
44863
45039
|
}
|
|
44864
45040
|
const base64Favicon = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAARiSURBVHgB7d1NThRBFAfw/2tGgru5gXMD8QZ4AmVjAi6kN0TiAm8gnkBcGARNumcx4E48Ae0JaE9gewLHlQSZelaNgyHGL/RVd1X3+y10RQL58+rVx1QBKKWUUkoppZRSSimllFJKKVUjQs32stEiJcktZiwxzKL9Fvqzb6S0/44JVBKbtwa9aj29U6JjagtkJzsYzBEyBi9d5utsQIULCcxvelgo03R5jBarJZCXw/17E+bt82r4Hy4gtuEQekUbK8h7IHvDV5vMZht+VAlRfmYw3EhXKrSA10Ce2X7RIzpGDVzlgM1wPb2bI2JeA9nN99/b/waoV+XCmTAex1g13gLZyUZrdjjJ0CAbTB5bMN4C2ctHxwxaRABiCsZLIG6KmxC/R2BiCCaBBwn4NgJk10B2GOWj3Wz/IQLlpUL28oOjyy4AG1AZppuhVYt4hWRZ1o8gDGc6rL4YHjxCQMQDOcNCEI38bxnmLTc9d30PARAPZAITZP/4A1ctx3bjcw0NEw8koeQ64tRnu25qeggTb+q2/BmRcyv9K7yw3MTOsmiFuLMOtICblJzS5+Mm+opoIBOgFYHMuL5yVHcoooFQuwJxag9FNJCIG/rv1BqKaCDfzshbqbZQxAJxK3SJI9qATUPJstdef0axQGJbof+jwRc6eQ2PxAIx4DZXx3duSrybv3oCTyR7yACdYR762sIXDKQbFfId4ZGPJi8YCA3QLf05YvF+IhYIEV1Dx9hNu8XdbLQFQV6OcDuFaFNyKiwWiJ19DNBN/VN8XoMQrRABDFqCEJ32CiBisT08rRAZAwjRQAKjgcgQO+rVQARMb3gJ0UAkML+DEA1EwAQkdkNMcnOx1Zcxf8V9ol7y88GSm4tdDKRy1xsgSIes/0BM4ndN5HZ7OzZkMePperqSQ5jkkFWhO6r76WrYJ4b2N+YTumF60QeeSG6/d2DI4rHvW1eCPaT9Q9YZw/sVOMlZVoUWM8zpg/Su97dVJGdZFVrKhbFR05MdYoFcwWmF1rF9kbG8UeP7KaI3qBp628QTHrueUccwdZHw/ZDWNHY7tU1u1B2GIxqIYSO2Dd0Ud79wnq/eaOpBgR4EMVDW/oijINu87d7U6hYaJBrInA0k0iu4bvVtZ1KrBRrm4Vr06GNkF3cO7RCVhvK4pmiFOISkjOStk1lVrBQIiPh5SAyN3fWKWeMuEBjxCmEkh3bVvokAzd5idL2iQqDEA1nASXmK+XFIfeTCo5gFAudllvo8G20TUeNVElMQ58QrxLHD1jbB3GumSnhsz7qHE9BhTEGc87aOm16KJHi7rfqj8yfI53E1j/l9eK8L651stJUQeXx/iuzU1QztZLGIsRp+xvtOh3Qo3/qCedumEC6qZetpJztwz7O6UAa4FNsP7ELTfXbWbskUdjgq9M9VCJoFcwvTlfyPDd9t3XNJjA+2IZcGpmxi+7tpjW3OupurJziZhtKWPzWhlFJKKaWUUkoppZRSSiml/uwrgZ/Bfwo/wccAAAAASUVORK5CYII=";
|
|
44865
45041
|
fav.setAttribute("href", base64Favicon);
|
|
44866
|
-
return /* @__PURE__ */
|
|
45042
|
+
return /* @__PURE__ */ jsx281("div", {
|
|
44867
45043
|
style: container63,
|
|
44868
45044
|
className: "css-reset",
|
|
44869
|
-
children: /* @__PURE__ */
|
|
45045
|
+
children: /* @__PURE__ */ jsxs147("div", {
|
|
44870
45046
|
style: message,
|
|
44871
45047
|
children: [
|
|
44872
45048
|
"The studio server has disconnected. ",
|
|
44873
|
-
/* @__PURE__ */
|
|
44874
|
-
window.remotion_studioServerCommand ? /* @__PURE__ */
|
|
45049
|
+
/* @__PURE__ */ jsx281("br", {}),
|
|
45050
|
+
window.remotion_studioServerCommand ? /* @__PURE__ */ jsxs147("span", {
|
|
44875
45051
|
children: [
|
|
44876
45052
|
"Run",
|
|
44877
45053
|
" ",
|
|
44878
|
-
/* @__PURE__ */
|
|
45054
|
+
/* @__PURE__ */ jsx281("code", {
|
|
44879
45055
|
style: inlineCode,
|
|
44880
45056
|
children: window.remotion_studioServerCommand
|
|
44881
45057
|
}),
|
|
44882
45058
|
" ",
|
|
44883
45059
|
"to run it again."
|
|
44884
45060
|
]
|
|
44885
|
-
}) : /* @__PURE__ */
|
|
45061
|
+
}) : /* @__PURE__ */ jsx281("span", {
|
|
44886
45062
|
children: "Fast refresh will not work."
|
|
44887
45063
|
})
|
|
44888
45064
|
]
|
|
@@ -45047,7 +45223,7 @@ var injectCSS = () => {
|
|
|
45047
45223
|
};
|
|
45048
45224
|
|
|
45049
45225
|
// src/Studio.tsx
|
|
45050
|
-
import { jsx as
|
|
45226
|
+
import { jsx as jsx282, jsxs as jsxs148 } from "react/jsx-runtime";
|
|
45051
45227
|
var getServerDisconnectedDomElement = () => {
|
|
45052
45228
|
return document.getElementById("server-disconnected-overlay");
|
|
45053
45229
|
};
|
|
@@ -45055,27 +45231,27 @@ var Studio = ({ rootComponent, readOnly }) => {
|
|
|
45055
45231
|
useLayoutEffect2(() => {
|
|
45056
45232
|
injectCSS();
|
|
45057
45233
|
}, []);
|
|
45058
|
-
return /* @__PURE__ */
|
|
45234
|
+
return /* @__PURE__ */ jsx282(Internals65.CompositionManagerProvider, {
|
|
45059
45235
|
onlyRenderComposition: null,
|
|
45060
45236
|
currentCompositionMetadata: null,
|
|
45061
45237
|
initialCompositions: [],
|
|
45062
45238
|
initialCanvasContent: null,
|
|
45063
|
-
children: /* @__PURE__ */
|
|
45239
|
+
children: /* @__PURE__ */ jsx282(Internals65.RemotionRootContexts, {
|
|
45064
45240
|
frameState: null,
|
|
45065
45241
|
audioEnabled: window.remotion_audioEnabled,
|
|
45066
45242
|
videoEnabled: window.remotion_videoEnabled,
|
|
45067
45243
|
logLevel: window.remotion_logLevel,
|
|
45068
45244
|
numberOfAudioTags: window.remotion_numberOfAudioTags,
|
|
45069
45245
|
audioLatencyHint: window.remotion_audioLatencyHint ?? "interactive",
|
|
45070
|
-
children: /* @__PURE__ */
|
|
45071
|
-
children: /* @__PURE__ */
|
|
45246
|
+
children: /* @__PURE__ */ jsx282(Internals65.ResolveCompositionConfigInStudio, {
|
|
45247
|
+
children: /* @__PURE__ */ jsxs148(EditorContexts, {
|
|
45072
45248
|
readOnlyStudio: readOnly,
|
|
45073
45249
|
children: [
|
|
45074
|
-
/* @__PURE__ */
|
|
45250
|
+
/* @__PURE__ */ jsx282(Editor, {
|
|
45075
45251
|
readOnlyStudio: readOnly,
|
|
45076
45252
|
Root: rootComponent
|
|
45077
45253
|
}),
|
|
45078
|
-
readOnly ? null : createPortal(/* @__PURE__ */
|
|
45254
|
+
readOnly ? null : createPortal(/* @__PURE__ */ jsx282(ServerDisconnected, {}), getServerDisconnectedDomElement())
|
|
45079
45255
|
]
|
|
45080
45256
|
})
|
|
45081
45257
|
})
|
|
@@ -45084,9 +45260,9 @@ var Studio = ({ rootComponent, readOnly }) => {
|
|
|
45084
45260
|
};
|
|
45085
45261
|
|
|
45086
45262
|
// src/components/NoRegisterRoot.tsx
|
|
45087
|
-
import { useEffect as
|
|
45263
|
+
import { useEffect as useEffect84, useState as useState95 } from "react";
|
|
45088
45264
|
import { AbsoluteFill as AbsoluteFill6 } from "remotion";
|
|
45089
|
-
import { jsx as
|
|
45265
|
+
import { jsx as jsx283, jsxs as jsxs149 } from "react/jsx-runtime";
|
|
45090
45266
|
var label11 = {
|
|
45091
45267
|
fontSize: 13,
|
|
45092
45268
|
color: "white",
|
|
@@ -45105,8 +45281,8 @@ var link5 = {
|
|
|
45105
45281
|
borderBottom: "1px solid"
|
|
45106
45282
|
};
|
|
45107
45283
|
var NoRegisterRoot = () => {
|
|
45108
|
-
const [show, setShow] =
|
|
45109
|
-
|
|
45284
|
+
const [show, setShow] = useState95(() => false);
|
|
45285
|
+
useEffect84(() => {
|
|
45110
45286
|
const timeout = setTimeout(() => {
|
|
45111
45287
|
setShow(true);
|
|
45112
45288
|
}, 2000);
|
|
@@ -45117,19 +45293,19 @@ var NoRegisterRoot = () => {
|
|
|
45117
45293
|
if (!show) {
|
|
45118
45294
|
return null;
|
|
45119
45295
|
}
|
|
45120
|
-
return /* @__PURE__ */
|
|
45296
|
+
return /* @__PURE__ */ jsxs149(AbsoluteFill6, {
|
|
45121
45297
|
style: container64,
|
|
45122
45298
|
children: [
|
|
45123
|
-
/* @__PURE__ */
|
|
45299
|
+
/* @__PURE__ */ jsx283("div", {
|
|
45124
45300
|
style: label11,
|
|
45125
45301
|
children: "Waiting for registerRoot() to get called."
|
|
45126
45302
|
}),
|
|
45127
|
-
/* @__PURE__ */
|
|
45303
|
+
/* @__PURE__ */ jsxs149("div", {
|
|
45128
45304
|
style: label11,
|
|
45129
45305
|
children: [
|
|
45130
45306
|
"Learn more:",
|
|
45131
45307
|
" ",
|
|
45132
|
-
/* @__PURE__ */
|
|
45308
|
+
/* @__PURE__ */ jsx283("a", {
|
|
45133
45309
|
target: "_blank",
|
|
45134
45310
|
style: link5,
|
|
45135
45311
|
href: "https://www.remotion.dev/docs/register-root",
|
|
@@ -45143,12 +45319,12 @@ var NoRegisterRoot = () => {
|
|
|
45143
45319
|
|
|
45144
45320
|
// src/error-overlay/remotion-overlay/index.tsx
|
|
45145
45321
|
import ReactDOM9 from "react-dom/client";
|
|
45146
|
-
import { jsx as
|
|
45322
|
+
import { jsx as jsx284 } from "react/jsx-runtime";
|
|
45147
45323
|
var mountRemotionOverlay = () => {
|
|
45148
45324
|
if (ReactDOM9.createRoot) {
|
|
45149
|
-
ReactDOM9.createRoot(document.getElementById("remotion-error-overlay")).render(/* @__PURE__ */
|
|
45325
|
+
ReactDOM9.createRoot(document.getElementById("remotion-error-overlay")).render(/* @__PURE__ */ jsx284(Overlay, {}));
|
|
45150
45326
|
} else {
|
|
45151
|
-
ReactDOM9.render(/* @__PURE__ */
|
|
45327
|
+
ReactDOM9.render(/* @__PURE__ */ jsx284(Overlay, {}), document.getElementById("remotion-error-overlay"));
|
|
45152
45328
|
}
|
|
45153
45329
|
};
|
|
45154
45330
|
|
|
@@ -45453,7 +45629,7 @@ var enableHotMiddleware = () => {
|
|
|
45453
45629
|
};
|
|
45454
45630
|
|
|
45455
45631
|
// src/previewEntry.tsx
|
|
45456
|
-
import { jsx as
|
|
45632
|
+
import { jsx as jsx285 } from "react/jsx-runtime";
|
|
45457
45633
|
Internals66.CSSUtils.injectCSS(Internals66.CSSUtils.makeDefaultPreviewCSS(null, "#1f2428"));
|
|
45458
45634
|
var root = null;
|
|
45459
45635
|
var getRootForElement = () => {
|
|
@@ -45473,10 +45649,10 @@ var renderToDOM = (content7) => {
|
|
|
45473
45649
|
}
|
|
45474
45650
|
getRootForElement().render(content7);
|
|
45475
45651
|
};
|
|
45476
|
-
renderToDOM(/* @__PURE__ */
|
|
45652
|
+
renderToDOM(/* @__PURE__ */ jsx285(NoRegisterRoot, {}));
|
|
45477
45653
|
Internals66.waitForRoot((NewRoot) => {
|
|
45478
45654
|
Internals66.enableSequenceStackTraces();
|
|
45479
|
-
renderToDOM(/* @__PURE__ */
|
|
45655
|
+
renderToDOM(/* @__PURE__ */ jsx285(Studio, {
|
|
45480
45656
|
readOnly: false,
|
|
45481
45657
|
rootComponent: NewRoot
|
|
45482
45658
|
}));
|