@remotion/studio 4.0.433 → 4.0.435
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/CompositionSelector.js +36 -2
- package/dist/components/CompositionSelectorItem.js +1 -0
- package/dist/components/CurrentComposition.d.ts +1 -1
- package/dist/components/CurrentComposition.js +2 -3
- package/dist/components/CurrentCompositionSideEffects.js +2 -4
- package/dist/components/Modals.js +3 -2
- package/dist/components/PreviewToolbar.js +1 -2
- package/dist/components/RenderButton.d.ts +1 -1
- package/dist/components/RenderButton.js +64 -17
- package/dist/components/RenderModal/ClientRenderProgress.js +13 -9
- package/dist/components/RenderModal/RenderModalBasic.d.ts +1 -0
- package/dist/components/RenderModal/RenderModalBasic.js +2 -2
- package/dist/components/RenderModal/ServerRenderModal.d.ts +1 -0
- package/dist/components/RenderModal/ServerRenderModal.js +170 -5
- package/dist/components/RenderModal/WebRenderModalAudio.js +3 -2
- package/dist/components/RenderQueue/ClientRenderQueueProcessor.js +3 -0
- package/dist/components/RenderQueue/RenderQueueItemStatus.js +1 -2
- package/dist/components/RenderQueue/RenderQueueProgressMessage.js +2 -3
- package/dist/components/RenderQueue/client-render-progress.d.ts +3 -0
- package/dist/components/RenderQueue/client-render-progress.js +31 -0
- package/dist/components/RenderQueue/client-side-render-types.d.ts +3 -0
- package/dist/components/RenderQueue/context.js +7 -1
- package/dist/components/SidebarRenderButton.js +1 -0
- package/dist/esm/{chunk-bd1bkakk.js → chunk-x88z6n54.js} +1063 -535
- package/dist/esm/internals.mjs +1063 -535
- package/dist/esm/previewEntry.mjs +634 -106
- package/dist/esm/renderEntry.mjs +1 -1
- package/dist/helpers/make-render-command.d.ts +51 -0
- package/dist/helpers/make-render-command.js +201 -0
- package/dist/helpers/retry-payload.js +3 -0
- package/dist/state/modals.d.ts +1 -0
- package/package.json +9 -9
- package/dist/helpers/should-show-render-button.d.ts +0 -1
- package/dist/helpers/should-show-render-button.js +0 -11
package/dist/esm/internals.mjs
CHANGED
|
@@ -1105,9 +1105,46 @@ var SidebarContextProvider = ({ children }) => {
|
|
|
1105
1105
|
};
|
|
1106
1106
|
|
|
1107
1107
|
// src/components/CompositionSelector.tsx
|
|
1108
|
-
import { useCallback as useCallback16, useContext as useContext9, useMemo as
|
|
1108
|
+
import { useCallback as useCallback16, useContext as useContext9, useMemo as useMemo22 } from "react";
|
|
1109
1109
|
import { Internals as Internals7 } from "remotion";
|
|
1110
1110
|
|
|
1111
|
+
// src/error-overlay/remotion-overlay/ShortcutHint.tsx
|
|
1112
|
+
import { useMemo as useMemo9 } from "react";
|
|
1113
|
+
import { jsx as jsx10, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
1114
|
+
var cmdOrCtrlCharacter = window.navigator.platform.startsWith("Mac") ? "⌘" : "Ctrl";
|
|
1115
|
+
var container3 = {
|
|
1116
|
+
display: "inline-block",
|
|
1117
|
+
marginLeft: 6,
|
|
1118
|
+
opacity: 0.6,
|
|
1119
|
+
verticalAlign: "middle",
|
|
1120
|
+
fontSize: 14
|
|
1121
|
+
};
|
|
1122
|
+
var ShortcutHint = ({ keyToPress, cmdOrCtrl }) => {
|
|
1123
|
+
const style = useMemo9(() => {
|
|
1124
|
+
if (keyToPress === "↵") {
|
|
1125
|
+
return {
|
|
1126
|
+
display: "inline-block",
|
|
1127
|
+
transform: `translateY(2px)`,
|
|
1128
|
+
fontSize: 14
|
|
1129
|
+
};
|
|
1130
|
+
}
|
|
1131
|
+
return {};
|
|
1132
|
+
}, [keyToPress]);
|
|
1133
|
+
if (areKeyboardShortcutsDisabled()) {
|
|
1134
|
+
return null;
|
|
1135
|
+
}
|
|
1136
|
+
return /* @__PURE__ */ jsxs3("span", {
|
|
1137
|
+
style: container3,
|
|
1138
|
+
children: [
|
|
1139
|
+
cmdOrCtrl ? `${cmdOrCtrlCharacter}` : "",
|
|
1140
|
+
/* @__PURE__ */ jsx10("span", {
|
|
1141
|
+
style,
|
|
1142
|
+
children: keyToPress.toUpperCase()
|
|
1143
|
+
})
|
|
1144
|
+
]
|
|
1145
|
+
});
|
|
1146
|
+
};
|
|
1147
|
+
|
|
1111
1148
|
// src/helpers/create-folder-tree.ts
|
|
1112
1149
|
var buildAssetFolderStructure = (files, parentFolderName, foldersExpanded) => {
|
|
1113
1150
|
const notInFolder = files.filter((f) => !f.name.includes("/"));
|
|
@@ -1289,36 +1326,45 @@ var sortItemsByNonceHistory = (items) => {
|
|
|
1289
1326
|
return result;
|
|
1290
1327
|
};
|
|
1291
1328
|
|
|
1329
|
+
// src/state/modals.ts
|
|
1330
|
+
import { createContext as createContext9 } from "react";
|
|
1331
|
+
var ModalsContext = createContext9({
|
|
1332
|
+
selectedModal: null,
|
|
1333
|
+
setSelectedModal: () => {
|
|
1334
|
+
return;
|
|
1335
|
+
}
|
|
1336
|
+
});
|
|
1337
|
+
|
|
1292
1338
|
// src/components/CompositionSelectorItem.tsx
|
|
1293
|
-
import { useCallback as useCallback15, useContext as useContext8, useMemo as
|
|
1339
|
+
import { useCallback as useCallback15, useContext as useContext8, useMemo as useMemo21, useState as useState14 } from "react";
|
|
1294
1340
|
|
|
1295
1341
|
// src/icons/folder.tsx
|
|
1296
|
-
import { jsx as
|
|
1342
|
+
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
1297
1343
|
var CollapsedFolderIcon = ({ color, ...props }) => {
|
|
1298
|
-
return /* @__PURE__ */
|
|
1344
|
+
return /* @__PURE__ */ jsx11("svg", {
|
|
1299
1345
|
viewBox: "0 0 512 512",
|
|
1300
1346
|
...props,
|
|
1301
|
-
children: /* @__PURE__ */
|
|
1347
|
+
children: /* @__PURE__ */ jsx11("path", {
|
|
1302
1348
|
fill: color,
|
|
1303
1349
|
d: "M447.1 96H272L226.7 50.75C214.7 38.74 198.5 32 181.5 32H63.1c-35.35 0-64 28.65-64 64v320c0 35.35 28.65 64 64 64h384c35.35 0 64-28.65 64-64V160C511.1 124.7 483.3 96 447.1 96zM480 416c0 17.64-14.36 32-32 32H64c-17.64 0-32-14.36-32-32V96c0-17.64 14.36-32 32-32h117.5c8.549 0 16.58 3.328 22.63 9.375L258.7 128H448c17.64 0 32 14.36 32 32V416z"
|
|
1304
1350
|
})
|
|
1305
1351
|
});
|
|
1306
1352
|
};
|
|
1307
1353
|
var ExpandedFolderIcon = ({ color, ...props }) => {
|
|
1308
|
-
return /* @__PURE__ */
|
|
1354
|
+
return /* @__PURE__ */ jsx11("svg", {
|
|
1309
1355
|
viewBox: "0 0 576 512",
|
|
1310
1356
|
...props,
|
|
1311
|
-
children: /* @__PURE__ */
|
|
1357
|
+
children: /* @__PURE__ */ jsx11("path", {
|
|
1312
1358
|
fill: color,
|
|
1313
1359
|
d: "M566.6 211.6C557.5 199.1 543.4 192 527.1 192H134.2C114.3 192 96.2 204.5 89.23 223.1L32 375.8V96c0-17.64 14.36-32 32-32h117.5c8.549 0 16.58 3.328 22.63 9.375L258.7 128H448c17.64 0 32 14.36 32 32h32c0-35.35-28.65-64-64-64H272L226.7 50.75C214.7 38.74 198.5 32 181.5 32H64C28.65 32 0 60.65 0 96v320c0 35.35 28.65 64 64 64h403.1c21.11 0 39.53-13.53 45.81-33.69l60-192C578.4 239.6 575.8 224 566.6 211.6zM543.2 244.8l-60 192C481.1 443.5 475 448 467.1 448H64c-3.322 0-6.357-.9551-9.373-1.898c-2.184-1.17-4.109-2.832-5.596-4.977c-3.031-4.375-3.703-9.75-1.828-14.73l72-192C121.5 228.2 127.5 224 134.2 224h393.8c5.141 0 9.844 2.375 12.89 6.516C543.9 234.7 544.8 239.9 543.2 244.8z"
|
|
1314
1360
|
})
|
|
1315
1361
|
});
|
|
1316
1362
|
};
|
|
1317
1363
|
var ExpandedFolderIconSolid = ({ color, ...props }) => {
|
|
1318
|
-
return /* @__PURE__ */
|
|
1364
|
+
return /* @__PURE__ */ jsx11("svg", {
|
|
1319
1365
|
viewBox: "0 0 576 512",
|
|
1320
1366
|
...props,
|
|
1321
|
-
children: /* @__PURE__ */
|
|
1367
|
+
children: /* @__PURE__ */ jsx11("path", {
|
|
1322
1368
|
fill: color,
|
|
1323
1369
|
d: "M384 480h48c11.4 0 21.9-6 27.6-15.9l112-192c5.8-9.9 5.8-22.1 .1-32.1S555.5 224 544 224H144c-11.4 0-21.9 6-27.6 15.9L48 357.1V96c0-8.8 7.2-16 16-16H181.5c4.2 0 8.3 1.7 11.3 4.7l26.5 26.5c21 21 49.5 32.8 79.2 32.8H416c8.8 0 16 7.2 16 16v32h48V160c0-35.3-28.7-64-64-64H298.5c-17 0-33.3-6.7-45.3-18.7L226.7 50.7c-12-12-28.3-18.7-45.3-18.7H64C28.7 32 0 60.7 0 96V416c0 35.3 28.7 64 64 64H87.7 384z"
|
|
1324
1370
|
})
|
|
@@ -1326,12 +1372,12 @@ var ExpandedFolderIconSolid = ({ color, ...props }) => {
|
|
|
1326
1372
|
};
|
|
1327
1373
|
|
|
1328
1374
|
// src/icons/still.tsx
|
|
1329
|
-
import { jsx as
|
|
1375
|
+
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
1330
1376
|
var StillIcon = ({ color, ...props }) => {
|
|
1331
|
-
return /* @__PURE__ */
|
|
1377
|
+
return /* @__PURE__ */ jsx12("svg", {
|
|
1332
1378
|
...props,
|
|
1333
1379
|
viewBox: "0 0 512 512",
|
|
1334
|
-
children: /* @__PURE__ */
|
|
1380
|
+
children: /* @__PURE__ */ jsx12("path", {
|
|
1335
1381
|
fill: color,
|
|
1336
1382
|
d: "M144 288C144 226.1 194.1 176 256 176C317.9 176 368 226.1 368 288C368 349.9 317.9 400 256 400C194.1 400 144 349.9 144 288zM256 208C211.8 208 176 243.8 176 288C176 332.2 211.8 368 256 368C300.2 368 336 332.2 336 288C336 243.8 300.2 208 256 208zM362.9 64.82L373.3 96H448C483.3 96 512 124.7 512 160V416C512 451.3 483.3 480 448 480H64C28.65 480 0 451.3 0 416V160C0 124.7 28.65 96 64 96H138.7L149.1 64.82C155.6 45.22 173.9 32 194.6 32H317.4C338.1 32 356.4 45.22 362.9 64.82H362.9zM64 128C46.33 128 32 142.3 32 160V416C32 433.7 46.33 448 64 448H448C465.7 448 480 433.7 480 416V160C480 142.3 465.7 128 448 128H350.3L332.6 74.94C330.4 68.41 324.3 64 317.4 64H194.6C187.7 64 181.6 68.41 179.4 74.94L161.7 128H64z"
|
|
1337
1383
|
})
|
|
@@ -1339,33 +1385,24 @@ var StillIcon = ({ color, ...props }) => {
|
|
|
1339
1385
|
};
|
|
1340
1386
|
|
|
1341
1387
|
// src/icons/video.tsx
|
|
1342
|
-
import { jsx as
|
|
1388
|
+
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
1343
1389
|
var FilmIcon = ({ color, ...props }) => {
|
|
1344
|
-
return /* @__PURE__ */
|
|
1390
|
+
return /* @__PURE__ */ jsx13("svg", {
|
|
1345
1391
|
...props,
|
|
1346
1392
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1347
1393
|
viewBox: "0 0 512 512",
|
|
1348
|
-
children: /* @__PURE__ */
|
|
1394
|
+
children: /* @__PURE__ */ jsx13("path", {
|
|
1349
1395
|
fill: color,
|
|
1350
1396
|
d: "M448 32H64C28.65 32 0 60.65 0 96v320c0 35.35 28.65 64 64 64h384c35.35 0 64-28.65 64-64V96C512 60.65 483.3 32 448 32zM384 64v176H128V64H384zM32 96c0-17.64 14.36-32 32-32h32v80H32V96zM32 176h64v64H32V176zM32 272h64v64H32V272zM64 448c-17.64 0-32-14.36-32-32v-48h64V448H64zM128 448V272h256V448H128zM480 416c0 17.64-14.36 32-32 32h-32v-80h64V416zM480 336h-64v-64h64V336zM480 240h-64v-64h64V240zM480 144h-64V64h32c17.64 0 32 14.36 32 32V144z"
|
|
1351
1397
|
})
|
|
1352
1398
|
});
|
|
1353
1399
|
};
|
|
1354
1400
|
|
|
1355
|
-
// src/state/modals.ts
|
|
1356
|
-
import { createContext as createContext9 } from "react";
|
|
1357
|
-
var ModalsContext = createContext9({
|
|
1358
|
-
selectedModal: null,
|
|
1359
|
-
setSelectedModal: () => {
|
|
1360
|
-
return;
|
|
1361
|
-
}
|
|
1362
|
-
});
|
|
1363
|
-
|
|
1364
1401
|
// src/components/CompositionContextButton.tsx
|
|
1365
|
-
import { useCallback as useCallback12, useContext as useContext6, useMemo as
|
|
1402
|
+
import { useCallback as useCallback12, useContext as useContext6, useMemo as useMemo18 } from "react";
|
|
1366
1403
|
|
|
1367
1404
|
// src/helpers/client-id.tsx
|
|
1368
|
-
import
|
|
1405
|
+
import React13, { useCallback as useCallback6, useEffect as useEffect8, useMemo as useMemo11, useRef as useRef6 } from "react";
|
|
1369
1406
|
import { Internals as Internals4 } from "remotion";
|
|
1370
1407
|
|
|
1371
1408
|
// src/components/Notifications/NotificationCenter.tsx
|
|
@@ -1378,7 +1415,7 @@ import {
|
|
|
1378
1415
|
|
|
1379
1416
|
// src/components/Notifications/Notification.tsx
|
|
1380
1417
|
import { useEffect as useEffect6 } from "react";
|
|
1381
|
-
import { jsx as
|
|
1418
|
+
import { jsx as jsx14 } from "react/jsx-runtime";
|
|
1382
1419
|
var notification = {
|
|
1383
1420
|
backgroundColor: "#111111",
|
|
1384
1421
|
color: "white",
|
|
@@ -1405,7 +1442,7 @@ var Notification = ({ children, id, duration, created, onRemove }) => {
|
|
|
1405
1442
|
clearTimeout(timeout);
|
|
1406
1443
|
};
|
|
1407
1444
|
}, [created, duration, id, onRemove]);
|
|
1408
|
-
return /* @__PURE__ */
|
|
1445
|
+
return /* @__PURE__ */ jsx14("div", {
|
|
1409
1446
|
className: "css-reset",
|
|
1410
1447
|
style: notification,
|
|
1411
1448
|
children
|
|
@@ -1413,8 +1450,8 @@ var Notification = ({ children, id, duration, created, onRemove }) => {
|
|
|
1413
1450
|
};
|
|
1414
1451
|
|
|
1415
1452
|
// src/components/Notifications/NotificationCenter.tsx
|
|
1416
|
-
import { jsx as
|
|
1417
|
-
var
|
|
1453
|
+
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
1454
|
+
var container4 = {
|
|
1418
1455
|
position: "absolute",
|
|
1419
1456
|
justifyContent: "center",
|
|
1420
1457
|
alignItems: "center",
|
|
@@ -1468,10 +1505,10 @@ var NotificationCenter = () => {
|
|
|
1468
1505
|
addNotification
|
|
1469
1506
|
};
|
|
1470
1507
|
}, [addNotification]);
|
|
1471
|
-
return /* @__PURE__ */
|
|
1472
|
-
style:
|
|
1508
|
+
return /* @__PURE__ */ jsx15("div", {
|
|
1509
|
+
style: container4,
|
|
1473
1510
|
children: notifications.map((n) => {
|
|
1474
|
-
return /* @__PURE__ */
|
|
1511
|
+
return /* @__PURE__ */ jsx15(Notification, {
|
|
1475
1512
|
created: n.created,
|
|
1476
1513
|
duration: n.duration,
|
|
1477
1514
|
id: n.id,
|
|
@@ -1500,12 +1537,12 @@ var playBeepSound = async (renderId) => {
|
|
|
1500
1537
|
var PlayBeepSound_default = playBeepSound;
|
|
1501
1538
|
|
|
1502
1539
|
// src/components/RenderQueue/context.tsx
|
|
1503
|
-
import
|
|
1540
|
+
import React12, {
|
|
1504
1541
|
createRef as createRef4,
|
|
1505
1542
|
useCallback as useCallback5,
|
|
1506
1543
|
useEffect as useEffect7,
|
|
1507
1544
|
useImperativeHandle as useImperativeHandle3,
|
|
1508
|
-
useMemo as
|
|
1545
|
+
useMemo as useMemo10,
|
|
1509
1546
|
useRef as useRef5,
|
|
1510
1547
|
useState as useState8
|
|
1511
1548
|
} from "react";
|
|
@@ -1544,7 +1581,7 @@ var cancelAbortController = (jobId) => {
|
|
|
1544
1581
|
};
|
|
1545
1582
|
|
|
1546
1583
|
// src/components/RenderQueue/context.tsx
|
|
1547
|
-
import { jsx as
|
|
1584
|
+
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
1548
1585
|
var restorePersistedClientRenders = () => {
|
|
1549
1586
|
const persisted = window.remotion_initialClientRenders ?? [];
|
|
1550
1587
|
return persisted.map((r) => ({ ...r, status: "done" }));
|
|
@@ -1556,7 +1593,7 @@ var noopString = () => "";
|
|
|
1556
1593
|
var noop2 = () => {
|
|
1557
1594
|
return;
|
|
1558
1595
|
};
|
|
1559
|
-
var RenderQueueContext =
|
|
1596
|
+
var RenderQueueContext = React12.createContext({
|
|
1560
1597
|
jobs: [],
|
|
1561
1598
|
serverJobs: [],
|
|
1562
1599
|
clientJobs: [],
|
|
@@ -1593,7 +1630,13 @@ var RenderQueueContextProvider = ({ children }) => {
|
|
|
1593
1630
|
setClientJobs((prev) => prev.map((job) => job.id === nextJob.id ? {
|
|
1594
1631
|
...job,
|
|
1595
1632
|
status: "running",
|
|
1596
|
-
progress: {
|
|
1633
|
+
progress: {
|
|
1634
|
+
encodedFrames: 0,
|
|
1635
|
+
totalFrames: 0,
|
|
1636
|
+
doneIn: null,
|
|
1637
|
+
renderEstimatedTime: 0,
|
|
1638
|
+
progress: 0
|
|
1639
|
+
}
|
|
1597
1640
|
} : job));
|
|
1598
1641
|
processJobCallbackRef.current(nextJob);
|
|
1599
1642
|
}, [clientJobs, currentlyProcessing]);
|
|
@@ -1692,7 +1735,7 @@ var RenderQueueContextProvider = ({ children }) => {
|
|
|
1692
1735
|
});
|
|
1693
1736
|
}
|
|
1694
1737
|
}), []);
|
|
1695
|
-
const value =
|
|
1738
|
+
const value = useMemo10(() => {
|
|
1696
1739
|
return {
|
|
1697
1740
|
jobs: [...serverJobs, ...clientJobs].sort((a, b) => a.startedAt - b.startedAt),
|
|
1698
1741
|
serverJobs,
|
|
@@ -1724,15 +1767,15 @@ var RenderQueueContextProvider = ({ children }) => {
|
|
|
1724
1767
|
cancelClientJob,
|
|
1725
1768
|
setProcessJobCallback
|
|
1726
1769
|
]);
|
|
1727
|
-
return /* @__PURE__ */
|
|
1770
|
+
return /* @__PURE__ */ jsx16(RenderQueueContext.Provider, {
|
|
1728
1771
|
value,
|
|
1729
1772
|
children
|
|
1730
1773
|
});
|
|
1731
1774
|
};
|
|
1732
1775
|
|
|
1733
1776
|
// src/helpers/client-id.tsx
|
|
1734
|
-
import { jsx as
|
|
1735
|
-
var StudioServerConnectionCtx =
|
|
1777
|
+
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
1778
|
+
var StudioServerConnectionCtx = React13.createContext({
|
|
1736
1779
|
previewServerState: {
|
|
1737
1780
|
type: "init"
|
|
1738
1781
|
},
|
|
@@ -1816,28 +1859,28 @@ var PreviewServerConnection = ({ children, readOnlyStudio }) => {
|
|
|
1816
1859
|
close();
|
|
1817
1860
|
};
|
|
1818
1861
|
}, [openEventSource, readOnlyStudio]);
|
|
1819
|
-
const [state, setState] =
|
|
1862
|
+
const [state, setState] = React13.useState({
|
|
1820
1863
|
type: "init"
|
|
1821
1864
|
});
|
|
1822
|
-
const context =
|
|
1865
|
+
const context = useMemo11(() => {
|
|
1823
1866
|
return {
|
|
1824
1867
|
previewServerState: state,
|
|
1825
1868
|
subscribeToEvent
|
|
1826
1869
|
};
|
|
1827
1870
|
}, [state, subscribeToEvent]);
|
|
1828
|
-
return /* @__PURE__ */
|
|
1871
|
+
return /* @__PURE__ */ jsx17(StudioServerConnectionCtx.Provider, {
|
|
1829
1872
|
value: context,
|
|
1830
1873
|
children
|
|
1831
1874
|
});
|
|
1832
1875
|
};
|
|
1833
1876
|
|
|
1834
1877
|
// src/icons/ellipsis.tsx
|
|
1835
|
-
import { jsx as
|
|
1878
|
+
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
1836
1879
|
var EllipsisIcon = (props) => {
|
|
1837
|
-
return /* @__PURE__ */
|
|
1880
|
+
return /* @__PURE__ */ jsx18("svg", {
|
|
1838
1881
|
...props.svgProps,
|
|
1839
1882
|
viewBox: "0 0 448 512",
|
|
1840
|
-
children: /* @__PURE__ */
|
|
1883
|
+
children: /* @__PURE__ */ jsx18("path", {
|
|
1841
1884
|
fill: props.fill,
|
|
1842
1885
|
d: "M8 256a56 56 0 1 1 112 0A56 56 0 1 1 8 256zm160 0a56 56 0 1 1 112 0 56 56 0 1 1 -112 0zm216-56a56 56 0 1 1 0 112 56 56 0 1 1 0-112z"
|
|
1843
1886
|
})
|
|
@@ -1846,12 +1889,12 @@ var EllipsisIcon = (props) => {
|
|
|
1846
1889
|
|
|
1847
1890
|
// src/components/InlineDropdown.tsx
|
|
1848
1891
|
import { PlayerInternals as PlayerInternals3 } from "@remotion/player";
|
|
1849
|
-
import { useCallback as useCallback11, useMemo as
|
|
1892
|
+
import { useCallback as useCallback11, useMemo as useMemo17, useRef as useRef9, useState as useState12 } from "react";
|
|
1850
1893
|
import ReactDOM2 from "react-dom";
|
|
1851
1894
|
|
|
1852
1895
|
// src/components/InlineAction.tsx
|
|
1853
|
-
import { useCallback as useCallback7, useMemo as
|
|
1854
|
-
import { jsx as
|
|
1896
|
+
import { useCallback as useCallback7, useMemo as useMemo12, useState as useState9 } from "react";
|
|
1897
|
+
import { jsx as jsx19 } from "react/jsx-runtime";
|
|
1855
1898
|
var InlineAction = ({
|
|
1856
1899
|
renderAction,
|
|
1857
1900
|
onClick,
|
|
@@ -1866,7 +1909,7 @@ var InlineAction = ({
|
|
|
1866
1909
|
const onPointerLeave = useCallback7(() => {
|
|
1867
1910
|
setHovered(false);
|
|
1868
1911
|
}, []);
|
|
1869
|
-
const style =
|
|
1912
|
+
const style = useMemo12(() => {
|
|
1870
1913
|
return {
|
|
1871
1914
|
border: "none",
|
|
1872
1915
|
background: disabled ? "transparent" : getBackgroundFromHoverState({ hovered, selected: false }),
|
|
@@ -1879,7 +1922,7 @@ var InlineAction = ({
|
|
|
1879
1922
|
pointerEvents: disabled ? "none" : "auto"
|
|
1880
1923
|
};
|
|
1881
1924
|
}, [disabled, hovered]);
|
|
1882
|
-
return /* @__PURE__ */
|
|
1925
|
+
return /* @__PURE__ */ jsx19("button", {
|
|
1883
1926
|
type: "button",
|
|
1884
1927
|
onPointerEnter,
|
|
1885
1928
|
onPointerLeave,
|
|
@@ -1943,7 +1986,7 @@ var inlineCodeSnippet = {
|
|
|
1943
1986
|
};
|
|
1944
1987
|
|
|
1945
1988
|
// src/components/NewComposition/MenuContent.tsx
|
|
1946
|
-
import { useCallback as useCallback10, useEffect as useEffect10, useMemo as
|
|
1989
|
+
import { useCallback as useCallback10, useEffect as useEffect10, useMemo as useMemo16, useRef as useRef8, useState as useState11 } from "react";
|
|
1947
1990
|
|
|
1948
1991
|
// src/components/Menu/is-menu-item.tsx
|
|
1949
1992
|
var MENU_INITIATOR_CLASSNAME = "__remotion-studio-menu-initiator";
|
|
@@ -1955,7 +1998,7 @@ var isMenuItem = (el) => {
|
|
|
1955
1998
|
};
|
|
1956
1999
|
|
|
1957
2000
|
// src/components/Menu/MenuDivider.tsx
|
|
1958
|
-
import { jsx as
|
|
2001
|
+
import { jsx as jsx20 } from "react/jsx-runtime";
|
|
1959
2002
|
var menuDivider = {
|
|
1960
2003
|
marginTop: 4,
|
|
1961
2004
|
marginBottom: 4,
|
|
@@ -1963,19 +2006,19 @@ var menuDivider = {
|
|
|
1963
2006
|
backgroundColor: INPUT_BORDER_COLOR_HOVERED
|
|
1964
2007
|
};
|
|
1965
2008
|
var MenuDivider = () => {
|
|
1966
|
-
return /* @__PURE__ */
|
|
2009
|
+
return /* @__PURE__ */ jsx20("div", {
|
|
1967
2010
|
style: menuDivider
|
|
1968
2011
|
});
|
|
1969
2012
|
};
|
|
1970
2013
|
|
|
1971
2014
|
// src/components/Menu/MenuSubItem.tsx
|
|
1972
2015
|
import { PlayerInternals as PlayerInternals2 } from "@remotion/player";
|
|
1973
|
-
import { useCallback as useCallback9, useEffect as useEffect9, useMemo as
|
|
2016
|
+
import { useCallback as useCallback9, useEffect as useEffect9, useMemo as useMemo15, useRef as useRef7, useState as useState10 } from "react";
|
|
1974
2017
|
import ReactDOM from "react-dom";
|
|
1975
2018
|
|
|
1976
2019
|
// src/icons/caret.tsx
|
|
1977
|
-
import { useMemo as
|
|
1978
|
-
import { jsx as
|
|
2020
|
+
import { useMemo as useMemo13 } from "react";
|
|
2021
|
+
import { jsx as jsx21 } from "react/jsx-runtime";
|
|
1979
2022
|
var caret = {
|
|
1980
2023
|
height: 12
|
|
1981
2024
|
};
|
|
@@ -1985,36 +2028,36 @@ var caretDown = {
|
|
|
1985
2028
|
var angleDown = {
|
|
1986
2029
|
width: 10
|
|
1987
2030
|
};
|
|
1988
|
-
var CaretRight = () => /* @__PURE__ */
|
|
2031
|
+
var CaretRight = () => /* @__PURE__ */ jsx21("svg", {
|
|
1989
2032
|
viewBox: "0 0 192 512",
|
|
1990
2033
|
style: caret,
|
|
1991
|
-
children: /* @__PURE__ */
|
|
2034
|
+
children: /* @__PURE__ */ jsx21("path", {
|
|
1992
2035
|
fill: "currentColor",
|
|
1993
2036
|
d: "M0 384.662V127.338c0-17.818 21.543-26.741 34.142-14.142l128.662 128.662c7.81 7.81 7.81 20.474 0 28.284L34.142 398.804C21.543 411.404 0 402.48 0 384.662z"
|
|
1994
2037
|
})
|
|
1995
2038
|
});
|
|
1996
2039
|
var CaretDown = () => {
|
|
1997
|
-
return /* @__PURE__ */
|
|
2040
|
+
return /* @__PURE__ */ jsx21("svg", {
|
|
1998
2041
|
viewBox: "0 0 320 512",
|
|
1999
2042
|
style: caretDown,
|
|
2000
|
-
children: /* @__PURE__ */
|
|
2043
|
+
children: /* @__PURE__ */ jsx21("path", {
|
|
2001
2044
|
fill: "currentColor",
|
|
2002
2045
|
d: "M31.3 192h257.3c17.8 0 26.7 21.5 14.1 34.1L174.1 354.8c-7.8 7.8-20.5 7.8-28.3 0L17.2 226.1C4.6 213.5 13.5 192 31.3 192z"
|
|
2003
2046
|
})
|
|
2004
2047
|
});
|
|
2005
2048
|
};
|
|
2006
2049
|
var AngleDown = ({ down }) => {
|
|
2007
|
-
const style =
|
|
2050
|
+
const style = useMemo13(() => {
|
|
2008
2051
|
return {
|
|
2009
2052
|
...angleDown,
|
|
2010
2053
|
transform: down ? "rotate(180deg)" : "rotate(0deg)",
|
|
2011
2054
|
marginTop: 1
|
|
2012
2055
|
};
|
|
2013
2056
|
}, [down]);
|
|
2014
|
-
return /* @__PURE__ */
|
|
2057
|
+
return /* @__PURE__ */ jsx21("svg", {
|
|
2015
2058
|
style,
|
|
2016
2059
|
viewBox: "0 0 448 512",
|
|
2017
|
-
children: /* @__PURE__ */
|
|
2060
|
+
children: /* @__PURE__ */ jsx21("path", {
|
|
2018
2061
|
fill: LIGHT_TEXT,
|
|
2019
2062
|
d: "M201.4 342.6c12.5 12.5 32.8 12.5 45.3 0l160-160c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L224 274.7 86.6 137.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l160 160z"
|
|
2020
2063
|
})
|
|
@@ -2022,11 +2065,11 @@ var AngleDown = ({ down }) => {
|
|
|
2022
2065
|
};
|
|
2023
2066
|
|
|
2024
2067
|
// src/components/layout.tsx
|
|
2025
|
-
import { useMemo as
|
|
2026
|
-
import { jsx as
|
|
2068
|
+
import { useMemo as useMemo14 } from "react";
|
|
2069
|
+
import { jsx as jsx22 } from "react/jsx-runtime";
|
|
2027
2070
|
var SPACING_UNIT = 8;
|
|
2028
2071
|
var Spacing = ({ x = 0, y = 0, block = false }) => {
|
|
2029
|
-
const style =
|
|
2072
|
+
const style = useMemo14(() => {
|
|
2030
2073
|
return {
|
|
2031
2074
|
display: block ? "block" : "inline-block",
|
|
2032
2075
|
width: x * SPACING_UNIT,
|
|
@@ -2034,17 +2077,17 @@ var Spacing = ({ x = 0, y = 0, block = false }) => {
|
|
|
2034
2077
|
flexShrink: 0
|
|
2035
2078
|
};
|
|
2036
2079
|
}, [block, x, y]);
|
|
2037
|
-
return /* @__PURE__ */
|
|
2080
|
+
return /* @__PURE__ */ jsx22("div", {
|
|
2038
2081
|
style
|
|
2039
2082
|
});
|
|
2040
2083
|
};
|
|
2041
2084
|
var flexCss = { flex: 1 };
|
|
2042
|
-
var Flex = ({ children }) => /* @__PURE__ */
|
|
2085
|
+
var Flex = ({ children }) => /* @__PURE__ */ jsx22("div", {
|
|
2043
2086
|
style: flexCss,
|
|
2044
2087
|
children
|
|
2045
2088
|
});
|
|
2046
2089
|
var Row = ({ children, justify, className, align, flex, style = {}, ...other }) => {
|
|
2047
|
-
const finalStyle =
|
|
2090
|
+
const finalStyle = useMemo14(() => {
|
|
2048
2091
|
return {
|
|
2049
2092
|
...style,
|
|
2050
2093
|
display: "flex",
|
|
@@ -2054,7 +2097,7 @@ var Row = ({ children, justify, className, align, flex, style = {}, ...other })
|
|
|
2054
2097
|
flex: flex ?? undefined
|
|
2055
2098
|
};
|
|
2056
2099
|
}, [align, flex, justify, style]);
|
|
2057
|
-
return /* @__PURE__ */
|
|
2100
|
+
return /* @__PURE__ */ jsx22("div", {
|
|
2058
2101
|
className,
|
|
2059
2102
|
style: finalStyle,
|
|
2060
2103
|
...other,
|
|
@@ -2062,7 +2105,7 @@ var Row = ({ children, justify, className, align, flex, style = {}, ...other })
|
|
|
2062
2105
|
});
|
|
2063
2106
|
};
|
|
2064
2107
|
var Column = ({ children, justify, className, align, style = {} }) => {
|
|
2065
|
-
const finalStyle =
|
|
2108
|
+
const finalStyle = useMemo14(() => {
|
|
2066
2109
|
return {
|
|
2067
2110
|
...style,
|
|
2068
2111
|
display: "flex",
|
|
@@ -2071,7 +2114,7 @@ var Column = ({ children, justify, className, align, style = {} }) => {
|
|
|
2071
2114
|
alignItems: align ?? "flex-start"
|
|
2072
2115
|
};
|
|
2073
2116
|
}, [align, justify, style]);
|
|
2074
|
-
return /* @__PURE__ */
|
|
2117
|
+
return /* @__PURE__ */ jsx22("div", {
|
|
2075
2118
|
className,
|
|
2076
2119
|
style: finalStyle,
|
|
2077
2120
|
children
|
|
@@ -2080,7 +2123,7 @@ var Column = ({ children, justify, className, align, style = {} }) => {
|
|
|
2080
2123
|
|
|
2081
2124
|
// src/components/Menu/SubMenu.tsx
|
|
2082
2125
|
import { useCallback as useCallback8 } from "react";
|
|
2083
|
-
import { jsx as
|
|
2126
|
+
import { jsx as jsx23 } from "react/jsx-runtime";
|
|
2084
2127
|
var SubMenuComponent = ({
|
|
2085
2128
|
portalStyle,
|
|
2086
2129
|
subMenuActivated,
|
|
@@ -2096,13 +2139,13 @@ var SubMenuComponent = ({
|
|
|
2096
2139
|
onQuitFullMenu();
|
|
2097
2140
|
}
|
|
2098
2141
|
}, [mobileLayout, onQuitFullMenu, onQuitSubMenu]);
|
|
2099
|
-
return /* @__PURE__ */
|
|
2142
|
+
return /* @__PURE__ */ jsx23(HigherZIndex, {
|
|
2100
2143
|
onEscape: onQuitFullMenu,
|
|
2101
2144
|
onOutsideClick,
|
|
2102
|
-
children: /* @__PURE__ */
|
|
2145
|
+
children: /* @__PURE__ */ jsx23("div", {
|
|
2103
2146
|
style: portalStyle,
|
|
2104
2147
|
className: "css-reset",
|
|
2105
|
-
children: /* @__PURE__ */
|
|
2148
|
+
children: /* @__PURE__ */ jsx23(MenuContent, {
|
|
2106
2149
|
onNextMenu: noop,
|
|
2107
2150
|
onPreviousMenu: onQuitSubMenu,
|
|
2108
2151
|
values: subMenu.items,
|
|
@@ -2117,8 +2160,8 @@ var SubMenuComponent = ({
|
|
|
2117
2160
|
};
|
|
2118
2161
|
|
|
2119
2162
|
// src/components/Menu/MenuSubItem.tsx
|
|
2120
|
-
import { jsx as
|
|
2121
|
-
var
|
|
2163
|
+
import { jsx as jsx24, jsxs as jsxs4, Fragment } from "react/jsx-runtime";
|
|
2164
|
+
var container5 = {
|
|
2122
2165
|
paddingTop: 8,
|
|
2123
2166
|
paddingBottom: 8,
|
|
2124
2167
|
paddingLeft: 12,
|
|
@@ -2167,9 +2210,9 @@ var MenuSubItem = ({
|
|
|
2167
2210
|
});
|
|
2168
2211
|
const mobileLayout = useMobileLayout();
|
|
2169
2212
|
const { currentZIndex } = useZIndex();
|
|
2170
|
-
const style =
|
|
2213
|
+
const style = useMemo15(() => {
|
|
2171
2214
|
return {
|
|
2172
|
-
...
|
|
2215
|
+
...container5,
|
|
2173
2216
|
backgroundColor: selected && !disabled ? CLEAR_HOVER : "transparent",
|
|
2174
2217
|
opacity: disabled ? 0.5 : 1,
|
|
2175
2218
|
cursor: disabled ? "not-allowed" : "default"
|
|
@@ -2199,7 +2242,7 @@ var MenuSubItem = ({
|
|
|
2199
2242
|
const onQuitSubmenu = useCallback9(() => {
|
|
2200
2243
|
setSubMenuActivated(false);
|
|
2201
2244
|
}, [setSubMenuActivated]);
|
|
2202
|
-
const portalStyle =
|
|
2245
|
+
const portalStyle = useMemo15(() => {
|
|
2203
2246
|
if (!selected || !size || !subMenu || !subMenuActivated) {
|
|
2204
2247
|
return null;
|
|
2205
2248
|
}
|
|
@@ -2226,7 +2269,7 @@ var MenuSubItem = ({
|
|
|
2226
2269
|
});
|
|
2227
2270
|
}
|
|
2228
2271
|
}, [selected]);
|
|
2229
|
-
return /* @__PURE__ */
|
|
2272
|
+
return /* @__PURE__ */ jsx24("div", {
|
|
2230
2273
|
ref,
|
|
2231
2274
|
onPointerEnter,
|
|
2232
2275
|
onPointerLeave,
|
|
@@ -2234,35 +2277,35 @@ var MenuSubItem = ({
|
|
|
2234
2277
|
onPointerUp,
|
|
2235
2278
|
role: "button",
|
|
2236
2279
|
className: MENU_ITEM_CLASSNAME,
|
|
2237
|
-
children: /* @__PURE__ */
|
|
2280
|
+
children: /* @__PURE__ */ jsxs4(Row, {
|
|
2238
2281
|
align: "center",
|
|
2239
2282
|
children: [
|
|
2240
|
-
leaveLeftSpace ? /* @__PURE__ */
|
|
2283
|
+
leaveLeftSpace ? /* @__PURE__ */ jsxs4(Fragment, {
|
|
2241
2284
|
children: [
|
|
2242
|
-
/* @__PURE__ */
|
|
2285
|
+
/* @__PURE__ */ jsx24("div", {
|
|
2243
2286
|
style: leftSpace,
|
|
2244
2287
|
children: leftItem
|
|
2245
2288
|
}),
|
|
2246
|
-
/* @__PURE__ */
|
|
2289
|
+
/* @__PURE__ */ jsx24(Spacing, {
|
|
2247
2290
|
x: 1
|
|
2248
2291
|
})
|
|
2249
2292
|
]
|
|
2250
2293
|
}) : null,
|
|
2251
|
-
/* @__PURE__ */
|
|
2294
|
+
/* @__PURE__ */ jsx24("div", {
|
|
2252
2295
|
style: labelStyle,
|
|
2253
2296
|
...{ title: typeof label === "string" ? label : undefined },
|
|
2254
2297
|
children: label
|
|
2255
2298
|
}),
|
|
2256
2299
|
" ",
|
|
2257
|
-
/* @__PURE__ */
|
|
2300
|
+
/* @__PURE__ */ jsx24(Spacing, {
|
|
2258
2301
|
x: 2
|
|
2259
2302
|
}),
|
|
2260
|
-
subMenu ? /* @__PURE__ */
|
|
2261
|
-
keyHint && !areKeyboardShortcutsDisabled() ? /* @__PURE__ */
|
|
2303
|
+
subMenu ? /* @__PURE__ */ jsx24(CaretRight, {}) : null,
|
|
2304
|
+
keyHint && !areKeyboardShortcutsDisabled() ? /* @__PURE__ */ jsx24("span", {
|
|
2262
2305
|
style: keyHintCss,
|
|
2263
2306
|
children: keyHint
|
|
2264
2307
|
}) : null,
|
|
2265
|
-
portalStyle && subMenu ? ReactDOM.createPortal(/* @__PURE__ */
|
|
2308
|
+
portalStyle && subMenu ? ReactDOM.createPortal(/* @__PURE__ */ jsx24(SubMenuComponent, {
|
|
2266
2309
|
onQuitFullMenu: onQuitMenu,
|
|
2267
2310
|
subMenu,
|
|
2268
2311
|
onQuitSubMenu: onQuitSubmenu,
|
|
@@ -2275,9 +2318,9 @@ var MenuSubItem = ({
|
|
|
2275
2318
|
};
|
|
2276
2319
|
|
|
2277
2320
|
// src/components/NewComposition/MenuContent.tsx
|
|
2278
|
-
import { jsx as
|
|
2321
|
+
import { jsx as jsx25 } from "react/jsx-runtime";
|
|
2279
2322
|
var BORDER_SIZE = 1;
|
|
2280
|
-
var
|
|
2323
|
+
var container6 = {
|
|
2281
2324
|
paddingTop: MENU_VERTICAL_PADDING,
|
|
2282
2325
|
paddingBottom: MENU_VERTICAL_PADDING,
|
|
2283
2326
|
border: `${BORDER_SIZE}px solid ${INPUT_BORDER_COLOR_UNHOVERED}`,
|
|
@@ -2384,8 +2427,8 @@ var MenuContent = ({
|
|
|
2384
2427
|
}
|
|
2385
2428
|
setSubMenuActivated("without-mouse");
|
|
2386
2429
|
}, [onNextMenu, selectedItem, values]);
|
|
2387
|
-
const containerWithHeight =
|
|
2388
|
-
const containerStyles = { ...
|
|
2430
|
+
const containerWithHeight = useMemo16(() => {
|
|
2431
|
+
const containerStyles = { ...container6 };
|
|
2389
2432
|
if (fixedHeight === null) {
|
|
2390
2433
|
containerStyles.maxHeight = 600;
|
|
2391
2434
|
} else {
|
|
@@ -2511,13 +2554,13 @@ var MenuContent = ({
|
|
|
2511
2554
|
current.addEventListener("pointerleave", onPointerLeave);
|
|
2512
2555
|
return () => current.removeEventListener("pointerleave", onPointerLeave);
|
|
2513
2556
|
}, [onHide, subMenuActivated]);
|
|
2514
|
-
return /* @__PURE__ */
|
|
2557
|
+
return /* @__PURE__ */ jsx25("div", {
|
|
2515
2558
|
ref: containerRef,
|
|
2516
2559
|
style: containerWithHeight,
|
|
2517
2560
|
className: VERTICAL_SCROLLBAR_CLASSNAME,
|
|
2518
2561
|
children: values.map((item) => {
|
|
2519
2562
|
if (item.type === "divider") {
|
|
2520
|
-
return /* @__PURE__ */
|
|
2563
|
+
return /* @__PURE__ */ jsx25(MenuDivider, {}, item.id);
|
|
2521
2564
|
}
|
|
2522
2565
|
const onClick = (id, e) => {
|
|
2523
2566
|
item.onClick(id, e);
|
|
@@ -2526,7 +2569,7 @@ var MenuContent = ({
|
|
|
2526
2569
|
}
|
|
2527
2570
|
onHide();
|
|
2528
2571
|
};
|
|
2529
|
-
return /* @__PURE__ */
|
|
2572
|
+
return /* @__PURE__ */ jsx25(MenuSubItem, {
|
|
2530
2573
|
selected: item.id === selectedItem,
|
|
2531
2574
|
onActionChosen: onClick,
|
|
2532
2575
|
onItemSelected,
|
|
@@ -2547,7 +2590,7 @@ var MenuContent = ({
|
|
|
2547
2590
|
};
|
|
2548
2591
|
|
|
2549
2592
|
// src/components/InlineDropdown.tsx
|
|
2550
|
-
import { jsx as
|
|
2593
|
+
import { jsx as jsx26, jsxs as jsxs5, Fragment as Fragment2 } from "react/jsx-runtime";
|
|
2551
2594
|
var InlineDropdown = ({
|
|
2552
2595
|
values,
|
|
2553
2596
|
...props
|
|
@@ -2565,19 +2608,19 @@ var InlineDropdown = ({
|
|
|
2565
2608
|
e.stopPropagation();
|
|
2566
2609
|
setOpened({ type: "open", left: e.clientX, top: e.clientY });
|
|
2567
2610
|
}, []);
|
|
2568
|
-
const spaceToBottom =
|
|
2611
|
+
const spaceToBottom = useMemo17(() => {
|
|
2569
2612
|
if (size && opened.type === "open") {
|
|
2570
2613
|
return size.windowSize.height - opened.top;
|
|
2571
2614
|
}
|
|
2572
2615
|
return 0;
|
|
2573
2616
|
}, [opened, size]);
|
|
2574
|
-
const spaceToTop =
|
|
2617
|
+
const spaceToTop = useMemo17(() => {
|
|
2575
2618
|
if (size && opened.type === "open") {
|
|
2576
2619
|
return opened.top;
|
|
2577
2620
|
}
|
|
2578
2621
|
return 0;
|
|
2579
2622
|
}, [opened, size]);
|
|
2580
|
-
const portalStyle =
|
|
2623
|
+
const portalStyle = useMemo17(() => {
|
|
2581
2624
|
if (opened.type === "not-open") {
|
|
2582
2625
|
return;
|
|
2583
2626
|
}
|
|
@@ -2608,26 +2651,26 @@ var InlineDropdown = ({
|
|
|
2608
2651
|
const onHide = useCallback11(() => {
|
|
2609
2652
|
setOpened({ type: "not-open" });
|
|
2610
2653
|
}, []);
|
|
2611
|
-
return /* @__PURE__ */
|
|
2654
|
+
return /* @__PURE__ */ jsxs5(Fragment2, {
|
|
2612
2655
|
children: [
|
|
2613
|
-
/* @__PURE__ */
|
|
2656
|
+
/* @__PURE__ */ jsx26("div", {
|
|
2614
2657
|
ref,
|
|
2615
|
-
children: /* @__PURE__ */
|
|
2658
|
+
children: /* @__PURE__ */ jsx26(InlineAction, {
|
|
2616
2659
|
onClick,
|
|
2617
2660
|
...props
|
|
2618
2661
|
})
|
|
2619
2662
|
}),
|
|
2620
|
-
portalStyle ? ReactDOM2.createPortal(/* @__PURE__ */
|
|
2663
|
+
portalStyle ? ReactDOM2.createPortal(/* @__PURE__ */ jsx26("div", {
|
|
2621
2664
|
style: fullScreenOverlay,
|
|
2622
|
-
children: /* @__PURE__ */
|
|
2665
|
+
children: /* @__PURE__ */ jsx26("div", {
|
|
2623
2666
|
style: outerPortal,
|
|
2624
2667
|
className: "css-reset",
|
|
2625
|
-
children: /* @__PURE__ */
|
|
2668
|
+
children: /* @__PURE__ */ jsx26(HigherZIndex, {
|
|
2626
2669
|
onOutsideClick: onHide,
|
|
2627
2670
|
onEscape: onHide,
|
|
2628
|
-
children: /* @__PURE__ */
|
|
2671
|
+
children: /* @__PURE__ */ jsx26("div", {
|
|
2629
2672
|
style: portalStyle,
|
|
2630
|
-
children: /* @__PURE__ */
|
|
2673
|
+
children: /* @__PURE__ */ jsx26(MenuContent, {
|
|
2631
2674
|
onNextMenu: noop,
|
|
2632
2675
|
onPreviousMenu: noop,
|
|
2633
2676
|
values,
|
|
@@ -2646,9 +2689,9 @@ var InlineDropdown = ({
|
|
|
2646
2689
|
};
|
|
2647
2690
|
|
|
2648
2691
|
// src/components/CompositionContextButton.tsx
|
|
2649
|
-
import { jsx as
|
|
2692
|
+
import { jsx as jsx27 } from "react/jsx-runtime";
|
|
2650
2693
|
var CompositionContextButton = ({ visible, values }) => {
|
|
2651
|
-
const iconStyle =
|
|
2694
|
+
const iconStyle = useMemo18(() => {
|
|
2652
2695
|
return {
|
|
2653
2696
|
style: {
|
|
2654
2697
|
height: 12
|
|
@@ -2657,7 +2700,7 @@ var CompositionContextButton = ({ visible, values }) => {
|
|
|
2657
2700
|
}, []);
|
|
2658
2701
|
const connectionStatus = useContext6(StudioServerConnectionCtx).previewServerState.type;
|
|
2659
2702
|
const renderAction = useCallback12((color) => {
|
|
2660
|
-
return /* @__PURE__ */
|
|
2703
|
+
return /* @__PURE__ */ jsx27(EllipsisIcon, {
|
|
2661
2704
|
fill: color,
|
|
2662
2705
|
svgProps: iconStyle
|
|
2663
2706
|
});
|
|
@@ -2665,7 +2708,7 @@ var CompositionContextButton = ({ visible, values }) => {
|
|
|
2665
2708
|
if (!visible || connectionStatus !== "connected") {
|
|
2666
2709
|
return null;
|
|
2667
2710
|
}
|
|
2668
|
-
return /* @__PURE__ */
|
|
2711
|
+
return /* @__PURE__ */ jsx27(InlineDropdown, {
|
|
2669
2712
|
renderAction,
|
|
2670
2713
|
values
|
|
2671
2714
|
});
|
|
@@ -2673,14 +2716,14 @@ var CompositionContextButton = ({ visible, values }) => {
|
|
|
2673
2716
|
|
|
2674
2717
|
// src/components/ContextMenu.tsx
|
|
2675
2718
|
import { PlayerInternals as PlayerInternals4 } from "@remotion/player";
|
|
2676
|
-
import { useCallback as useCallback13, useEffect as useEffect11, useMemo as
|
|
2719
|
+
import { useCallback as useCallback13, useEffect as useEffect11, useMemo as useMemo19, useRef as useRef10, useState as useState13 } from "react";
|
|
2677
2720
|
import ReactDOM3 from "react-dom";
|
|
2678
|
-
import { jsx as
|
|
2721
|
+
import { jsx as jsx28, jsxs as jsxs6, Fragment as Fragment3 } from "react/jsx-runtime";
|
|
2679
2722
|
var ContextMenu = ({ children, values }) => {
|
|
2680
2723
|
const ref = useRef10(null);
|
|
2681
2724
|
const [opened, setOpened] = useState13({ type: "not-open" });
|
|
2682
2725
|
const { currentZIndex } = useZIndex();
|
|
2683
|
-
const style =
|
|
2726
|
+
const style = useMemo19(() => {
|
|
2684
2727
|
return {};
|
|
2685
2728
|
}, []);
|
|
2686
2729
|
const size = PlayerInternals4.useElementSize(ref, {
|
|
@@ -2704,19 +2747,19 @@ var ContextMenu = ({ children, values }) => {
|
|
|
2704
2747
|
current.removeEventListener("contextmenu", onClick);
|
|
2705
2748
|
};
|
|
2706
2749
|
}, [size]);
|
|
2707
|
-
const spaceToBottom =
|
|
2750
|
+
const spaceToBottom = useMemo19(() => {
|
|
2708
2751
|
if (size && opened.type === "open") {
|
|
2709
2752
|
return size.windowSize.height - opened.top;
|
|
2710
2753
|
}
|
|
2711
2754
|
return 0;
|
|
2712
2755
|
}, [opened, size]);
|
|
2713
|
-
const spaceToTop =
|
|
2756
|
+
const spaceToTop = useMemo19(() => {
|
|
2714
2757
|
if (size && opened.type === "open") {
|
|
2715
2758
|
return opened.top;
|
|
2716
2759
|
}
|
|
2717
2760
|
return 0;
|
|
2718
2761
|
}, [opened, size]);
|
|
2719
|
-
const portalStyle =
|
|
2762
|
+
const portalStyle = useMemo19(() => {
|
|
2720
2763
|
if (opened.type === "not-open") {
|
|
2721
2764
|
return;
|
|
2722
2765
|
}
|
|
@@ -2747,25 +2790,25 @@ var ContextMenu = ({ children, values }) => {
|
|
|
2747
2790
|
const onHide = useCallback13(() => {
|
|
2748
2791
|
setOpened({ type: "not-open" });
|
|
2749
2792
|
}, []);
|
|
2750
|
-
return /* @__PURE__ */
|
|
2793
|
+
return /* @__PURE__ */ jsxs6(Fragment3, {
|
|
2751
2794
|
children: [
|
|
2752
|
-
/* @__PURE__ */
|
|
2795
|
+
/* @__PURE__ */ jsx28("div", {
|
|
2753
2796
|
ref,
|
|
2754
2797
|
onContextMenu: () => false,
|
|
2755
2798
|
style,
|
|
2756
2799
|
children
|
|
2757
2800
|
}),
|
|
2758
|
-
portalStyle ? ReactDOM3.createPortal(/* @__PURE__ */
|
|
2801
|
+
portalStyle ? ReactDOM3.createPortal(/* @__PURE__ */ jsx28("div", {
|
|
2759
2802
|
style: fullScreenOverlay,
|
|
2760
|
-
children: /* @__PURE__ */
|
|
2803
|
+
children: /* @__PURE__ */ jsx28("div", {
|
|
2761
2804
|
style: outerPortal,
|
|
2762
2805
|
className: "css-reset",
|
|
2763
|
-
children: /* @__PURE__ */
|
|
2806
|
+
children: /* @__PURE__ */ jsx28(HigherZIndex, {
|
|
2764
2807
|
onOutsideClick: onHide,
|
|
2765
2808
|
onEscape: onHide,
|
|
2766
|
-
children: /* @__PURE__ */
|
|
2809
|
+
children: /* @__PURE__ */ jsx28("div", {
|
|
2767
2810
|
style: portalStyle,
|
|
2768
|
-
children: /* @__PURE__ */
|
|
2811
|
+
children: /* @__PURE__ */ jsx28(MenuContent, {
|
|
2769
2812
|
onNextMenu: noop,
|
|
2770
2813
|
onPreviousMenu: noop,
|
|
2771
2814
|
values,
|
|
@@ -2784,17 +2827,17 @@ var ContextMenu = ({ children, values }) => {
|
|
|
2784
2827
|
};
|
|
2785
2828
|
|
|
2786
2829
|
// src/components/SidebarRenderButton.tsx
|
|
2787
|
-
import { useCallback as useCallback14, useContext as useContext7, useMemo as
|
|
2830
|
+
import { useCallback as useCallback14, useContext as useContext7, useMemo as useMemo20 } from "react";
|
|
2788
2831
|
import { Internals as Internals5 } from "remotion";
|
|
2789
2832
|
|
|
2790
2833
|
// src/icons/render.tsx
|
|
2791
|
-
import { jsx as
|
|
2834
|
+
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
2792
2835
|
var ThinRenderIcon = (props) => {
|
|
2793
|
-
return /* @__PURE__ */
|
|
2836
|
+
return /* @__PURE__ */ jsx29("svg", {
|
|
2794
2837
|
...props.svgProps,
|
|
2795
2838
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2796
2839
|
viewBox: "0 0 512 512",
|
|
2797
|
-
children: /* @__PURE__ */
|
|
2840
|
+
children: /* @__PURE__ */ jsx29("path", {
|
|
2798
2841
|
fill: props.fill,
|
|
2799
2842
|
d: "M188.9 372l-50.4-50.4c18.6-42.6 61.7-137.7 95.1-187C304.6 30.1 409 24.6 475.7 36.3c11.7 66.7 6.2 171.1-98.4 242c-49.4 33.5-145.5 75.6-188.4 93.7zm-79.9-62.8c-5.2 11.9-2.5 25.7 6.7 34.9l50.7 50.7c9.1 9.1 22.7 11.9 34.5 6.9c6.5-2.7 14.3-6 23-9.8L224 496c0 5.5 2.9 10.7 7.6 13.6s10.6 3.2 15.6 .7l101.5-50.7c21.7-10.8 35.4-33 35.4-57.2V312.1c4-2.5 7.7-4.9 11.3-7.3C516.1 222.9 520.1 100.9 506.7 28.1c-2.1-11.6-11.2-20.6-22.8-22.8C411.1-8.1 289.1-4.1 207.2 116.7c-2.4 3.6-4.9 7.3-7.3 11.3l-90.2 0c-24.2 0-46.4 13.7-57.2 35.4L1.7 264.8c-2.5 5-2.2 10.8 .7 15.6s8.1 7.6 13.6 7.6H118.5c-3.6 8-6.8 15.2-9.4 21.2zM256 470.1l0-92.5c30.3-13.7 65.4-30.3 96-47v71.7c0 12.1-6.8 23.2-17.7 28.6L256 470.1zM109.7 160h71.5c-16.9 30.7-34 65.8-48.1 96H41.9L81 177.7c5.4-10.8 16.5-17.7 28.6-17.7zM392 144a24 24 0 1 1 -48 0 24 24 0 1 1 48 0zM368 88a56 56 0 1 0 0 112 56 56 0 1 0 0-112z"
|
|
2800
2843
|
})
|
|
@@ -2802,12 +2845,12 @@ var ThinRenderIcon = (props) => {
|
|
|
2802
2845
|
};
|
|
2803
2846
|
|
|
2804
2847
|
// src/components/SidebarRenderButton.tsx
|
|
2805
|
-
import { jsx as
|
|
2848
|
+
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
2806
2849
|
var SidebarRenderButton = ({ composition, visible }) => {
|
|
2807
2850
|
const { setSelectedModal } = useContext7(ModalsContext);
|
|
2808
2851
|
const { setSidebarCollapsedState } = useContext7(SidebarContext);
|
|
2809
2852
|
const isMobileLayout = useMobileLayout();
|
|
2810
|
-
const iconStyle =
|
|
2853
|
+
const iconStyle = useMemo20(() => {
|
|
2811
2854
|
return {
|
|
2812
2855
|
style: {
|
|
2813
2856
|
height: 12
|
|
@@ -2870,7 +2913,8 @@ var SidebarRenderButton = ({ composition, visible }) => {
|
|
|
2870
2913
|
initialChromeMode: defaults.chromeMode,
|
|
2871
2914
|
initialMediaCacheSizeInBytes: defaults.mediaCacheSizeInBytes,
|
|
2872
2915
|
renderDefaults: defaults,
|
|
2873
|
-
initialDarkMode: defaults.darkMode
|
|
2916
|
+
initialDarkMode: defaults.darkMode,
|
|
2917
|
+
readOnlyStudio: false
|
|
2874
2918
|
});
|
|
2875
2919
|
if (isMobileLayout) {
|
|
2876
2920
|
setSidebarCollapsedState({ left: "collapsed", right: "collapsed" });
|
|
@@ -2884,7 +2928,7 @@ var SidebarRenderButton = ({ composition, visible }) => {
|
|
|
2884
2928
|
setSidebarCollapsedState
|
|
2885
2929
|
]);
|
|
2886
2930
|
const renderAction = useCallback14((color) => {
|
|
2887
|
-
return /* @__PURE__ */
|
|
2931
|
+
return /* @__PURE__ */ jsx30(ThinRenderIcon, {
|
|
2888
2932
|
fill: color,
|
|
2889
2933
|
svgProps: iconStyle
|
|
2890
2934
|
});
|
|
@@ -2892,14 +2936,14 @@ var SidebarRenderButton = ({ composition, visible }) => {
|
|
|
2892
2936
|
if (!visible || connectionStatus !== "connected") {
|
|
2893
2937
|
return null;
|
|
2894
2938
|
}
|
|
2895
|
-
return /* @__PURE__ */
|
|
2939
|
+
return /* @__PURE__ */ jsx30(InlineAction, {
|
|
2896
2940
|
renderAction,
|
|
2897
2941
|
onClick
|
|
2898
2942
|
});
|
|
2899
2943
|
};
|
|
2900
2944
|
|
|
2901
2945
|
// src/components/CompositionSelectorItem.tsx
|
|
2902
|
-
import { jsx as
|
|
2946
|
+
import { jsx as jsx31, jsxs as jsxs7, Fragment as Fragment4 } from "react/jsx-runtime";
|
|
2903
2947
|
var COMPOSITION_ITEM_HEIGHT = 32;
|
|
2904
2948
|
var itemStyle = {
|
|
2905
2949
|
paddingRight: 10,
|
|
@@ -2916,7 +2960,8 @@ var itemStyle = {
|
|
|
2916
2960
|
width: "100%",
|
|
2917
2961
|
textAlign: "left",
|
|
2918
2962
|
backgroundColor: BACKGROUND,
|
|
2919
|
-
height: COMPOSITION_ITEM_HEIGHT
|
|
2963
|
+
height: COMPOSITION_ITEM_HEIGHT,
|
|
2964
|
+
userSelect: "none"
|
|
2920
2965
|
};
|
|
2921
2966
|
var labelStyle2 = {
|
|
2922
2967
|
textAlign: "left",
|
|
@@ -2940,7 +2985,7 @@ var CompositionSelectorItem = ({
|
|
|
2940
2985
|
selectComposition,
|
|
2941
2986
|
toggleFolder
|
|
2942
2987
|
}) => {
|
|
2943
|
-
const selected =
|
|
2988
|
+
const selected = useMemo21(() => {
|
|
2944
2989
|
if (item.type === "composition") {
|
|
2945
2990
|
return currentComposition === item.composition.id;
|
|
2946
2991
|
}
|
|
@@ -2953,14 +2998,14 @@ var CompositionSelectorItem = ({
|
|
|
2953
2998
|
const onPointerLeave = useCallback15(() => {
|
|
2954
2999
|
setHovered(false);
|
|
2955
3000
|
}, []);
|
|
2956
|
-
const style =
|
|
3001
|
+
const style = useMemo21(() => {
|
|
2957
3002
|
return {
|
|
2958
3003
|
...itemStyle,
|
|
2959
3004
|
backgroundColor: getBackgroundFromHoverState({ hovered, selected }),
|
|
2960
3005
|
paddingLeft: 12 + level * 8
|
|
2961
3006
|
};
|
|
2962
3007
|
}, [hovered, level, selected]);
|
|
2963
|
-
const label =
|
|
3008
|
+
const label = useMemo21(() => {
|
|
2964
3009
|
return {
|
|
2965
3010
|
...labelStyle2,
|
|
2966
3011
|
color: selected || hovered ? "white" : LIGHT_TEXT
|
|
@@ -2980,7 +3025,7 @@ var CompositionSelectorItem = ({
|
|
|
2980
3025
|
}
|
|
2981
3026
|
}, [onClick]);
|
|
2982
3027
|
const { setSelectedModal } = useContext8(ModalsContext);
|
|
2983
|
-
const contextMenu =
|
|
3028
|
+
const contextMenu = useMemo21(() => {
|
|
2984
3029
|
if (item.type === "composition") {
|
|
2985
3030
|
return [
|
|
2986
3031
|
{
|
|
@@ -3058,9 +3103,9 @@ var CompositionSelectorItem = ({
|
|
|
3058
3103
|
return [];
|
|
3059
3104
|
}, [item, setSelectedModal]);
|
|
3060
3105
|
if (item.type === "folder") {
|
|
3061
|
-
return /* @__PURE__ */
|
|
3106
|
+
return /* @__PURE__ */ jsxs7(Fragment4, {
|
|
3062
3107
|
children: [
|
|
3063
|
-
/* @__PURE__ */
|
|
3108
|
+
/* @__PURE__ */ jsxs7("button", {
|
|
3064
3109
|
style,
|
|
3065
3110
|
onPointerEnter,
|
|
3066
3111
|
onPointerLeave,
|
|
@@ -3069,24 +3114,24 @@ var CompositionSelectorItem = ({
|
|
|
3069
3114
|
type: "button",
|
|
3070
3115
|
title: item.folderName,
|
|
3071
3116
|
children: [
|
|
3072
|
-
item.expanded ? /* @__PURE__ */
|
|
3117
|
+
item.expanded ? /* @__PURE__ */ jsx31(ExpandedFolderIcon, {
|
|
3073
3118
|
style: iconStyle,
|
|
3074
3119
|
color: hovered || selected ? "white" : LIGHT_TEXT
|
|
3075
|
-
}) : /* @__PURE__ */
|
|
3120
|
+
}) : /* @__PURE__ */ jsx31(CollapsedFolderIcon, {
|
|
3076
3121
|
color: hovered || selected ? "white" : LIGHT_TEXT,
|
|
3077
3122
|
style: iconStyle
|
|
3078
3123
|
}),
|
|
3079
|
-
/* @__PURE__ */
|
|
3124
|
+
/* @__PURE__ */ jsx31(Spacing, {
|
|
3080
3125
|
x: 1
|
|
3081
3126
|
}),
|
|
3082
|
-
/* @__PURE__ */
|
|
3127
|
+
/* @__PURE__ */ jsx31("div", {
|
|
3083
3128
|
style: label,
|
|
3084
3129
|
children: item.folderName
|
|
3085
3130
|
})
|
|
3086
3131
|
]
|
|
3087
3132
|
}),
|
|
3088
3133
|
item.expanded ? item.items.map((childItem) => {
|
|
3089
|
-
return /* @__PURE__ */
|
|
3134
|
+
return /* @__PURE__ */ jsx31(CompositionSelectorItem, {
|
|
3090
3135
|
currentComposition,
|
|
3091
3136
|
selectComposition,
|
|
3092
3137
|
item: childItem,
|
|
@@ -3098,11 +3143,11 @@ var CompositionSelectorItem = ({
|
|
|
3098
3143
|
]
|
|
3099
3144
|
});
|
|
3100
3145
|
}
|
|
3101
|
-
return /* @__PURE__ */
|
|
3146
|
+
return /* @__PURE__ */ jsx31(ContextMenu, {
|
|
3102
3147
|
values: contextMenu,
|
|
3103
|
-
children: /* @__PURE__ */
|
|
3148
|
+
children: /* @__PURE__ */ jsx31(Row, {
|
|
3104
3149
|
align: "center",
|
|
3105
|
-
children: /* @__PURE__ */
|
|
3150
|
+
children: /* @__PURE__ */ jsxs7("a", {
|
|
3106
3151
|
style,
|
|
3107
3152
|
onPointerEnter,
|
|
3108
3153
|
onPointerLeave,
|
|
@@ -3114,28 +3159,28 @@ var CompositionSelectorItem = ({
|
|
|
3114
3159
|
className: "__remotion-composition",
|
|
3115
3160
|
"data-compname": item.composition.id,
|
|
3116
3161
|
children: [
|
|
3117
|
-
isCompositionStill(item.composition) ? /* @__PURE__ */
|
|
3162
|
+
isCompositionStill(item.composition) ? /* @__PURE__ */ jsx31(StillIcon, {
|
|
3118
3163
|
color: hovered || selected ? "white" : LIGHT_TEXT,
|
|
3119
3164
|
style: iconStyle
|
|
3120
|
-
}) : /* @__PURE__ */
|
|
3165
|
+
}) : /* @__PURE__ */ jsx31(FilmIcon, {
|
|
3121
3166
|
color: hovered || selected ? "white" : LIGHT_TEXT,
|
|
3122
3167
|
style: iconStyle
|
|
3123
3168
|
}),
|
|
3124
|
-
/* @__PURE__ */
|
|
3169
|
+
/* @__PURE__ */ jsx31(Spacing, {
|
|
3125
3170
|
x: 1
|
|
3126
3171
|
}),
|
|
3127
|
-
/* @__PURE__ */
|
|
3172
|
+
/* @__PURE__ */ jsx31("div", {
|
|
3128
3173
|
style: label,
|
|
3129
3174
|
children: item.composition.id
|
|
3130
3175
|
}),
|
|
3131
|
-
/* @__PURE__ */
|
|
3176
|
+
/* @__PURE__ */ jsx31(Spacing, {
|
|
3132
3177
|
x: 0.5
|
|
3133
3178
|
}),
|
|
3134
|
-
/* @__PURE__ */
|
|
3179
|
+
/* @__PURE__ */ jsx31(CompositionContextButton, {
|
|
3135
3180
|
values: contextMenu,
|
|
3136
3181
|
visible: hovered
|
|
3137
3182
|
}),
|
|
3138
|
-
/* @__PURE__ */
|
|
3183
|
+
/* @__PURE__ */ jsx31(SidebarRenderButton, {
|
|
3139
3184
|
visible: hovered,
|
|
3140
3185
|
composition: item.composition
|
|
3141
3186
|
})
|
|
@@ -3167,13 +3212,12 @@ var renderFrame = (frame, fps) => {
|
|
|
3167
3212
|
};
|
|
3168
3213
|
|
|
3169
3214
|
// src/components/CurrentComposition.tsx
|
|
3170
|
-
import { jsx as
|
|
3171
|
-
var CURRENT_COMPOSITION_HEIGHT =
|
|
3172
|
-
var
|
|
3215
|
+
import { jsx as jsx32, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
3216
|
+
var CURRENT_COMPOSITION_HEIGHT = 64;
|
|
3217
|
+
var container7 = {
|
|
3173
3218
|
height: CURRENT_COMPOSITION_HEIGHT,
|
|
3174
3219
|
display: "block",
|
|
3175
|
-
|
|
3176
|
-
padding: 12,
|
|
3220
|
+
padding: "6px 12px",
|
|
3177
3221
|
color: "white",
|
|
3178
3222
|
backgroundColor: BACKGROUND
|
|
3179
3223
|
};
|
|
@@ -3199,17 +3243,17 @@ var row = {
|
|
|
3199
3243
|
};
|
|
3200
3244
|
var CurrentComposition = () => {
|
|
3201
3245
|
const video = Internals6.useVideo();
|
|
3202
|
-
return /* @__PURE__ */
|
|
3203
|
-
style:
|
|
3204
|
-
children: video ? /* @__PURE__ */
|
|
3246
|
+
return /* @__PURE__ */ jsx32("div", {
|
|
3247
|
+
style: container7,
|
|
3248
|
+
children: video ? /* @__PURE__ */ jsx32("div", {
|
|
3205
3249
|
style: row,
|
|
3206
|
-
children: /* @__PURE__ */
|
|
3250
|
+
children: /* @__PURE__ */ jsxs8("div", {
|
|
3207
3251
|
children: [
|
|
3208
|
-
/* @__PURE__ */
|
|
3252
|
+
/* @__PURE__ */ jsx32("div", {
|
|
3209
3253
|
style: title,
|
|
3210
3254
|
children: video.id
|
|
3211
3255
|
}),
|
|
3212
|
-
/* @__PURE__ */
|
|
3256
|
+
/* @__PURE__ */ jsxs8("div", {
|
|
3213
3257
|
style: subtitle,
|
|
3214
3258
|
children: [
|
|
3215
3259
|
video.width,
|
|
@@ -3218,10 +3262,10 @@ var CurrentComposition = () => {
|
|
|
3218
3262
|
isCompositionStill(video) ? null : `, ${video.fps} FPS`
|
|
3219
3263
|
]
|
|
3220
3264
|
}),
|
|
3221
|
-
isCompositionStill(video) ? /* @__PURE__ */
|
|
3265
|
+
isCompositionStill(video) ? /* @__PURE__ */ jsx32("div", {
|
|
3222
3266
|
style: subtitle,
|
|
3223
3267
|
children: "Still"
|
|
3224
|
-
}) : /* @__PURE__ */
|
|
3268
|
+
}) : /* @__PURE__ */ jsxs8("div", {
|
|
3225
3269
|
style: subtitle,
|
|
3226
3270
|
children: [
|
|
3227
3271
|
"Duration ",
|
|
@@ -3235,7 +3279,7 @@ var CurrentComposition = () => {
|
|
|
3235
3279
|
};
|
|
3236
3280
|
|
|
3237
3281
|
// src/components/CompositionSelector.tsx
|
|
3238
|
-
import { jsx as
|
|
3282
|
+
import { jsx as jsx33, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
3239
3283
|
var useCompositionNavigation = () => {
|
|
3240
3284
|
const { compositions, canvasContent } = useContext9(Internals7.CompositionManager);
|
|
3241
3285
|
const selectComposition = useSelectComposition();
|
|
@@ -3263,18 +3307,41 @@ var useCompositionNavigation = () => {
|
|
|
3263
3307
|
const previousComposition = compositions[previousIndex];
|
|
3264
3308
|
selectComposition(previousComposition, true);
|
|
3265
3309
|
}, [canvasContent, compositions, selectComposition]);
|
|
3266
|
-
return
|
|
3310
|
+
return useMemo22(() => ({
|
|
3267
3311
|
navigateToNextComposition,
|
|
3268
3312
|
navigateToPreviousComposition
|
|
3269
3313
|
}), [navigateToNextComposition, navigateToPreviousComposition]);
|
|
3270
3314
|
};
|
|
3271
|
-
var
|
|
3315
|
+
var container8 = {
|
|
3272
3316
|
display: "flex",
|
|
3273
3317
|
flexDirection: "column",
|
|
3274
3318
|
flex: 1,
|
|
3275
3319
|
overflow: "hidden",
|
|
3276
3320
|
backgroundColor: BACKGROUND
|
|
3277
3321
|
};
|
|
3322
|
+
var QUICK_SWITCHER_TRIGGER_HEIGHT = 38;
|
|
3323
|
+
var quickSwitcherArea = {
|
|
3324
|
+
padding: "4px 12px",
|
|
3325
|
+
borderBottom: `1px solid ${BORDER_COLOR}`
|
|
3326
|
+
};
|
|
3327
|
+
var quickSwitcherTrigger = {
|
|
3328
|
+
backgroundColor: "rgba(255, 255, 255, 0.06)",
|
|
3329
|
+
borderRadius: 5,
|
|
3330
|
+
padding: "4px 10px",
|
|
3331
|
+
color: LIGHT_TEXT,
|
|
3332
|
+
fontSize: 12,
|
|
3333
|
+
cursor: "pointer",
|
|
3334
|
+
display: "flex",
|
|
3335
|
+
alignItems: "center",
|
|
3336
|
+
justifyContent: "space-between",
|
|
3337
|
+
border: "none",
|
|
3338
|
+
width: "100%",
|
|
3339
|
+
appearance: "none"
|
|
3340
|
+
};
|
|
3341
|
+
var shortcutLabel = {
|
|
3342
|
+
fontSize: 11,
|
|
3343
|
+
opacity: 0.6
|
|
3344
|
+
};
|
|
3278
3345
|
var getKeysToExpand = (initialFolderName, parentFolderName, initial = []) => {
|
|
3279
3346
|
initial.push(openFolderKey({
|
|
3280
3347
|
folderName: initialFolderName,
|
|
@@ -3289,35 +3356,62 @@ var getKeysToExpand = (initialFolderName, parentFolderName, initial = []) => {
|
|
|
3289
3356
|
var CompositionSelector = () => {
|
|
3290
3357
|
const { compositions, canvasContent, folders } = useContext9(Internals7.CompositionManager);
|
|
3291
3358
|
const { foldersExpanded } = useContext9(ExpandedFoldersContext);
|
|
3359
|
+
const { setSelectedModal } = useContext9(ModalsContext);
|
|
3292
3360
|
const { tabIndex } = useZIndex();
|
|
3293
3361
|
const selectComposition = useSelectComposition();
|
|
3294
|
-
const sortedCompositions =
|
|
3362
|
+
const sortedCompositions = useMemo22(() => {
|
|
3295
3363
|
return sortItemsByNonceHistory(compositions);
|
|
3296
3364
|
}, [compositions]);
|
|
3297
|
-
const sortedFolders =
|
|
3365
|
+
const sortedFolders = useMemo22(() => {
|
|
3298
3366
|
return sortItemsByNonceHistory(folders);
|
|
3299
3367
|
}, [folders]);
|
|
3300
|
-
const items =
|
|
3368
|
+
const items = useMemo22(() => {
|
|
3301
3369
|
return createFolderTree(sortedCompositions, sortedFolders, foldersExpanded);
|
|
3302
3370
|
}, [sortedCompositions, sortedFolders, foldersExpanded]);
|
|
3303
|
-
const list =
|
|
3371
|
+
const list = useMemo22(() => {
|
|
3304
3372
|
return {
|
|
3305
|
-
height: `calc(100% - ${CURRENT_COMPOSITION_HEIGHT}px)`,
|
|
3373
|
+
height: `calc(100% - ${CURRENT_COMPOSITION_HEIGHT}px - ${QUICK_SWITCHER_TRIGGER_HEIGHT}px)`,
|
|
3306
3374
|
overflowY: "auto"
|
|
3307
3375
|
};
|
|
3308
3376
|
}, []);
|
|
3309
3377
|
const toggleFolder = useCallback16((folderName, parentName) => {
|
|
3310
3378
|
Internals7.compositionSelectorRef.current?.toggleFolder(folderName, parentName);
|
|
3311
3379
|
}, []);
|
|
3312
|
-
|
|
3313
|
-
|
|
3380
|
+
const openQuickSwitcher = useCallback16(() => {
|
|
3381
|
+
setSelectedModal({
|
|
3382
|
+
type: "quick-switcher",
|
|
3383
|
+
mode: "compositions",
|
|
3384
|
+
invocationTimestamp: Date.now()
|
|
3385
|
+
});
|
|
3386
|
+
}, [setSelectedModal]);
|
|
3387
|
+
return /* @__PURE__ */ jsxs9("div", {
|
|
3388
|
+
style: container8,
|
|
3314
3389
|
children: [
|
|
3315
|
-
/* @__PURE__ */
|
|
3316
|
-
/* @__PURE__ */
|
|
3390
|
+
/* @__PURE__ */ jsx33(CurrentComposition, {}),
|
|
3391
|
+
/* @__PURE__ */ jsx33("div", {
|
|
3392
|
+
style: quickSwitcherArea,
|
|
3393
|
+
children: /* @__PURE__ */ jsxs9("button", {
|
|
3394
|
+
type: "button",
|
|
3395
|
+
style: quickSwitcherTrigger,
|
|
3396
|
+
onClick: openQuickSwitcher,
|
|
3397
|
+
tabIndex,
|
|
3398
|
+
children: [
|
|
3399
|
+
"Search...",
|
|
3400
|
+
areKeyboardShortcutsDisabled() ? null : /* @__PURE__ */ jsxs9("span", {
|
|
3401
|
+
style: shortcutLabel,
|
|
3402
|
+
children: [
|
|
3403
|
+
cmdOrCtrlCharacter,
|
|
3404
|
+
"+K"
|
|
3405
|
+
]
|
|
3406
|
+
})
|
|
3407
|
+
]
|
|
3408
|
+
})
|
|
3409
|
+
}),
|
|
3410
|
+
/* @__PURE__ */ jsx33("div", {
|
|
3317
3411
|
className: "__remotion-vertical-scrollbar",
|
|
3318
3412
|
style: list,
|
|
3319
3413
|
children: items.map((c) => {
|
|
3320
|
-
return /* @__PURE__ */
|
|
3414
|
+
return /* @__PURE__ */ jsx33(CompositionSelectorItem, {
|
|
3321
3415
|
level: 0,
|
|
3322
3416
|
currentComposition: canvasContent && canvasContent.type === "composition" ? canvasContent.compositionId : null,
|
|
3323
3417
|
selectComposition,
|
|
@@ -3335,7 +3429,7 @@ var CompositionSelector = () => {
|
|
|
3335
3429
|
import { createRef as createRef5, useCallback as useCallback22, useImperativeHandle as useImperativeHandle5, useState as useState21 } from "react";
|
|
3336
3430
|
|
|
3337
3431
|
// src/components/AssetSelector.tsx
|
|
3338
|
-
import { useCallback as useCallback19, useContext as useContext13, useMemo as
|
|
3432
|
+
import { useCallback as useCallback19, useContext as useContext13, useMemo as useMemo26, useState as useState18 } from "react";
|
|
3339
3433
|
import { Internals as Internals10 } from "remotion";
|
|
3340
3434
|
|
|
3341
3435
|
// src/api/write-static-file.ts
|
|
@@ -3364,7 +3458,7 @@ var writeStaticFile = async ({
|
|
|
3364
3458
|
};
|
|
3365
3459
|
|
|
3366
3460
|
// src/helpers/use-asset-drag-events.ts
|
|
3367
|
-
import { useCallback as useCallback17, useEffect as useEffect12, useMemo as
|
|
3461
|
+
import { useCallback as useCallback17, useEffect as useEffect12, useMemo as useMemo23, useRef as useRef11 } from "react";
|
|
3368
3462
|
import { NoReactInternals } from "remotion/no-react";
|
|
3369
3463
|
function useAssetDragEvents({
|
|
3370
3464
|
name,
|
|
@@ -3373,10 +3467,10 @@ function useAssetDragEvents({
|
|
|
3373
3467
|
setDropLocation
|
|
3374
3468
|
}) {
|
|
3375
3469
|
const dragDepthRef = useRef11(0);
|
|
3376
|
-
const combinedParents =
|
|
3470
|
+
const combinedParents = useMemo23(() => {
|
|
3377
3471
|
return [parentFolder, name].filter(NoReactInternals.truthy).join("/");
|
|
3378
3472
|
}, [name, parentFolder]);
|
|
3379
|
-
const isDropDiv =
|
|
3473
|
+
const isDropDiv = useMemo23(() => {
|
|
3380
3474
|
return dropLocation === combinedParents;
|
|
3381
3475
|
}, [combinedParents, dropLocation]);
|
|
3382
3476
|
const onDragEnter = useCallback17(() => {
|
|
@@ -3405,7 +3499,7 @@ function useAssetDragEvents({
|
|
|
3405
3499
|
var use_asset_drag_events_default = useAssetDragEvents;
|
|
3406
3500
|
|
|
3407
3501
|
// src/components/AssetSelectorItem.tsx
|
|
3408
|
-
import
|
|
3502
|
+
import React25, { useCallback as useCallback18, useContext as useContext10, useMemo as useMemo24, useRef as useRef12, useState as useState15 } from "react";
|
|
3409
3503
|
import { Internals as Internals8 } from "remotion";
|
|
3410
3504
|
import { NoReactInternals as NoReactInternals3 } from "remotion/no-react";
|
|
3411
3505
|
|
|
@@ -3427,26 +3521,26 @@ var copyText = (cmd) => {
|
|
|
3427
3521
|
};
|
|
3428
3522
|
|
|
3429
3523
|
// src/icons/clipboard.tsx
|
|
3430
|
-
import { jsx as
|
|
3431
|
-
var ClipboardIcon = ({ color, ...props }) => /* @__PURE__ */
|
|
3524
|
+
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
3525
|
+
var ClipboardIcon = ({ color, ...props }) => /* @__PURE__ */ jsx34("svg", {
|
|
3432
3526
|
viewBox: "0 0 384 512",
|
|
3433
3527
|
...props,
|
|
3434
|
-
children: /* @__PURE__ */
|
|
3528
|
+
children: /* @__PURE__ */ jsx34("path", {
|
|
3435
3529
|
fill: color,
|
|
3436
3530
|
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"
|
|
3437
3531
|
})
|
|
3438
3532
|
});
|
|
3439
3533
|
|
|
3440
3534
|
// src/icons/file.tsx
|
|
3441
|
-
import { jsx as
|
|
3535
|
+
import { jsx as jsx35 } from "react/jsx-runtime";
|
|
3442
3536
|
var FileIcon = ({
|
|
3443
3537
|
color,
|
|
3444
3538
|
...props
|
|
3445
|
-
}) => /* @__PURE__ */
|
|
3539
|
+
}) => /* @__PURE__ */ jsx35("svg", {
|
|
3446
3540
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3447
3541
|
viewBox: "0 0 384 512",
|
|
3448
3542
|
...props,
|
|
3449
|
-
children: /* @__PURE__ */
|
|
3543
|
+
children: /* @__PURE__ */ jsx35("path", {
|
|
3450
3544
|
fill: color ?? "currentColor",
|
|
3451
3545
|
d: "M0 64C0 28.65 28.65 0 64 0h156.1c12.7 0 25 5.057 34 14.06L369.9 129.9c9 9 14.1 21.3 14.1 34V448c0 35.3-28.7 64-64 64H64c-35.35 0-64-28.7-64-64V64zm352 128H240c-26.5 0-48-21.5-48-48V32H64c-17.67 0-32 14.33-32 32v384c0 17.7 14.33 32 32 32h256c17.7 0 32-14.3 32-32V192zm-4.7-39.4L231.4 36.69c-2-2.07-4.6-3.51-7.4-4.21V144c0 8.8 7.2 16 16 16h111.5c-.7-2.8-2.1-5.4-4.2-7.4z"
|
|
3452
3546
|
})
|
|
@@ -3750,7 +3844,7 @@ var applyVisualControlChange = ({
|
|
|
3750
3844
|
};
|
|
3751
3845
|
|
|
3752
3846
|
// src/components/AssetSelectorItem.tsx
|
|
3753
|
-
import { jsx as
|
|
3847
|
+
import { jsx as jsx36, jsxs as jsxs10, Fragment as Fragment5 } from "react/jsx-runtime";
|
|
3754
3848
|
var ASSET_ITEM_HEIGHT = 32;
|
|
3755
3849
|
var iconStyle2 = {
|
|
3756
3850
|
width: 18,
|
|
@@ -3813,14 +3907,14 @@ var AssetFolderItem = ({
|
|
|
3813
3907
|
const onPointerLeave = useCallback18(() => {
|
|
3814
3908
|
setHovered(false);
|
|
3815
3909
|
}, []);
|
|
3816
|
-
const folderStyle =
|
|
3910
|
+
const folderStyle = useMemo24(() => {
|
|
3817
3911
|
return {
|
|
3818
3912
|
...itemStyle2,
|
|
3819
3913
|
paddingLeft: 4 + level * 8,
|
|
3820
3914
|
backgroundColor: hovered ? CLEAR_HOVER : "transparent"
|
|
3821
3915
|
};
|
|
3822
3916
|
}, [hovered, level]);
|
|
3823
|
-
const label =
|
|
3917
|
+
const label = useMemo24(() => {
|
|
3824
3918
|
return {
|
|
3825
3919
|
...labelStyle3,
|
|
3826
3920
|
color: hovered ? "white" : LIGHT_TEXT
|
|
@@ -3830,14 +3924,14 @@ var AssetFolderItem = ({
|
|
|
3830
3924
|
toggleFolder(item.name, parentFolder);
|
|
3831
3925
|
}, [item.name, parentFolder, toggleFolder]);
|
|
3832
3926
|
const Icon = item.expanded ? ExpandedFolderIcon : CollapsedFolderIcon;
|
|
3833
|
-
return /* @__PURE__ */
|
|
3927
|
+
return /* @__PURE__ */ jsxs10("div", {
|
|
3834
3928
|
onDragEnter,
|
|
3835
3929
|
onDragLeave,
|
|
3836
3930
|
style: {
|
|
3837
3931
|
backgroundColor: isDropDiv ? CLEAR_HOVER : BACKGROUND
|
|
3838
3932
|
},
|
|
3839
3933
|
children: [
|
|
3840
|
-
/* @__PURE__ */
|
|
3934
|
+
/* @__PURE__ */ jsx36("div", {
|
|
3841
3935
|
style: folderStyle,
|
|
3842
3936
|
onPointerEnter,
|
|
3843
3937
|
onPointerLeave,
|
|
@@ -3856,23 +3950,23 @@ var AssetFolderItem = ({
|
|
|
3856
3950
|
clearTimeout(openFolderTimerRef.current);
|
|
3857
3951
|
}
|
|
3858
3952
|
},
|
|
3859
|
-
children: /* @__PURE__ */
|
|
3953
|
+
children: /* @__PURE__ */ jsxs10(Row, {
|
|
3860
3954
|
children: [
|
|
3861
|
-
/* @__PURE__ */
|
|
3955
|
+
/* @__PURE__ */ jsx36(Icon, {
|
|
3862
3956
|
style: iconStyle2,
|
|
3863
3957
|
color: hovered ? "white" : LIGHT_TEXT
|
|
3864
3958
|
}),
|
|
3865
|
-
/* @__PURE__ */
|
|
3959
|
+
/* @__PURE__ */ jsx36(Spacing, {
|
|
3866
3960
|
x: 1
|
|
3867
3961
|
}),
|
|
3868
|
-
/* @__PURE__ */
|
|
3962
|
+
/* @__PURE__ */ jsx36("div", {
|
|
3869
3963
|
style: label,
|
|
3870
3964
|
children: item.name
|
|
3871
3965
|
})
|
|
3872
3966
|
]
|
|
3873
3967
|
})
|
|
3874
3968
|
}),
|
|
3875
|
-
item.expanded ? /* @__PURE__ */
|
|
3969
|
+
item.expanded ? /* @__PURE__ */ jsx36(AssetFolderTree, {
|
|
3876
3970
|
item: item.items,
|
|
3877
3971
|
name: item.name,
|
|
3878
3972
|
level,
|
|
@@ -3897,13 +3991,13 @@ var AssetFolderTree = ({
|
|
|
3897
3991
|
setDropLocation,
|
|
3898
3992
|
readOnlyStudio
|
|
3899
3993
|
}) => {
|
|
3900
|
-
const combinedParents =
|
|
3994
|
+
const combinedParents = useMemo24(() => {
|
|
3901
3995
|
return [parentFolder, name].filter(NoReactInternals3.truthy).join("/");
|
|
3902
3996
|
}, [name, parentFolder]);
|
|
3903
|
-
return /* @__PURE__ */
|
|
3997
|
+
return /* @__PURE__ */ jsxs10("div", {
|
|
3904
3998
|
children: [
|
|
3905
3999
|
item.folders.map((folder) => {
|
|
3906
|
-
return /* @__PURE__ */
|
|
4000
|
+
return /* @__PURE__ */ jsx36(AssetFolderItem, {
|
|
3907
4001
|
item: folder,
|
|
3908
4002
|
tabIndex,
|
|
3909
4003
|
level: level + 1,
|
|
@@ -3915,7 +4009,7 @@ var AssetFolderTree = ({
|
|
|
3915
4009
|
}, folder.name);
|
|
3916
4010
|
}),
|
|
3917
4011
|
item.files.map((file) => {
|
|
3918
|
-
return /* @__PURE__ */
|
|
4012
|
+
return /* @__PURE__ */ jsx36(AssetSelectorItem, {
|
|
3919
4013
|
item: file,
|
|
3920
4014
|
tabIndex,
|
|
3921
4015
|
level,
|
|
@@ -3935,10 +4029,10 @@ var AssetSelectorItem = ({ item, tabIndex, level, parentFolder, readOnlyStudio }
|
|
|
3935
4029
|
}, []);
|
|
3936
4030
|
const { setCanvasContent } = useContext10(Internals8.CompositionSetters);
|
|
3937
4031
|
const { canvasContent } = useContext10(Internals8.CompositionManager);
|
|
3938
|
-
const relativePath =
|
|
4032
|
+
const relativePath = useMemo24(() => {
|
|
3939
4033
|
return parentFolder ? parentFolder + "/" + item.name : item.name;
|
|
3940
4034
|
}, [parentFolder, item.name]);
|
|
3941
|
-
const selected =
|
|
4035
|
+
const selected = useMemo24(() => {
|
|
3942
4036
|
if (canvasContent && canvasContent.type === "asset") {
|
|
3943
4037
|
return canvasContent.asset === relativePath;
|
|
3944
4038
|
}
|
|
@@ -3959,7 +4053,7 @@ var AssetSelectorItem = ({ item, tabIndex, level, parentFolder, readOnlyStudio }
|
|
|
3959
4053
|
setCanvasContent,
|
|
3960
4054
|
setSidebarCollapsedState
|
|
3961
4055
|
]);
|
|
3962
|
-
const style =
|
|
4056
|
+
const style = useMemo24(() => {
|
|
3963
4057
|
return {
|
|
3964
4058
|
...itemStyle2,
|
|
3965
4059
|
color: hovered || selected ? "white" : LIGHT_TEXT,
|
|
@@ -3967,25 +4061,25 @@ var AssetSelectorItem = ({ item, tabIndex, level, parentFolder, readOnlyStudio }
|
|
|
3967
4061
|
paddingLeft: 12 + level * 8
|
|
3968
4062
|
};
|
|
3969
4063
|
}, [hovered, level, selected]);
|
|
3970
|
-
const label =
|
|
4064
|
+
const label = useMemo24(() => {
|
|
3971
4065
|
return {
|
|
3972
4066
|
...labelStyle3,
|
|
3973
4067
|
color: hovered || selected ? "white" : LIGHT_TEXT
|
|
3974
4068
|
};
|
|
3975
4069
|
}, [hovered, selected]);
|
|
3976
4070
|
const renderFileExplorerAction = useCallback18((color) => {
|
|
3977
|
-
return /* @__PURE__ */
|
|
4071
|
+
return /* @__PURE__ */ jsx36(ExpandedFolderIcon, {
|
|
3978
4072
|
style: revealIconStyle,
|
|
3979
4073
|
color
|
|
3980
4074
|
});
|
|
3981
4075
|
}, []);
|
|
3982
4076
|
const renderCopyAction = useCallback18((color) => {
|
|
3983
|
-
return /* @__PURE__ */
|
|
4077
|
+
return /* @__PURE__ */ jsx36(ClipboardIcon, {
|
|
3984
4078
|
style: revealIconStyle,
|
|
3985
4079
|
color
|
|
3986
4080
|
});
|
|
3987
4081
|
}, []);
|
|
3988
|
-
const revealInExplorer =
|
|
4082
|
+
const revealInExplorer = React25.useCallback((e) => {
|
|
3989
4083
|
e.stopPropagation();
|
|
3990
4084
|
openInFileExplorer({
|
|
3991
4085
|
directory: window.remotion_publicFolderExists + "/" + parentFolder + "/" + item.name
|
|
@@ -4002,9 +4096,9 @@ var AssetSelectorItem = ({ item, tabIndex, level, parentFolder, readOnlyStudio }
|
|
|
4002
4096
|
showNotification(`Could not copy: ${err.message}`, 2000);
|
|
4003
4097
|
});
|
|
4004
4098
|
}, [item.name, parentFolder]);
|
|
4005
|
-
return /* @__PURE__ */
|
|
4099
|
+
return /* @__PURE__ */ jsx36(Row, {
|
|
4006
4100
|
align: "center",
|
|
4007
|
-
children: /* @__PURE__ */
|
|
4101
|
+
children: /* @__PURE__ */ jsxs10("div", {
|
|
4008
4102
|
style,
|
|
4009
4103
|
onPointerEnter,
|
|
4010
4104
|
onPointerLeave,
|
|
@@ -4012,33 +4106,33 @@ var AssetSelectorItem = ({ item, tabIndex, level, parentFolder, readOnlyStudio }
|
|
|
4012
4106
|
tabIndex,
|
|
4013
4107
|
title: item.name,
|
|
4014
4108
|
children: [
|
|
4015
|
-
/* @__PURE__ */
|
|
4109
|
+
/* @__PURE__ */ jsx36(FileIcon, {
|
|
4016
4110
|
style: iconStyle2,
|
|
4017
4111
|
color: LIGHT_TEXT
|
|
4018
4112
|
}),
|
|
4019
|
-
/* @__PURE__ */
|
|
4113
|
+
/* @__PURE__ */ jsx36(Spacing, {
|
|
4020
4114
|
x: 1
|
|
4021
4115
|
}),
|
|
4022
|
-
/* @__PURE__ */
|
|
4116
|
+
/* @__PURE__ */ jsx36("div", {
|
|
4023
4117
|
style: label,
|
|
4024
4118
|
children: item.name
|
|
4025
4119
|
}),
|
|
4026
|
-
hovered ? /* @__PURE__ */
|
|
4120
|
+
hovered ? /* @__PURE__ */ jsxs10(Fragment5, {
|
|
4027
4121
|
children: [
|
|
4028
|
-
/* @__PURE__ */
|
|
4122
|
+
/* @__PURE__ */ jsx36(Spacing, {
|
|
4029
4123
|
x: 0.5
|
|
4030
4124
|
}),
|
|
4031
|
-
/* @__PURE__ */
|
|
4125
|
+
/* @__PURE__ */ jsx36(InlineAction, {
|
|
4032
4126
|
title: "Copy staticFile() name",
|
|
4033
4127
|
renderAction: renderCopyAction,
|
|
4034
4128
|
onClick: copyToClipboard
|
|
4035
4129
|
}),
|
|
4036
|
-
readOnlyStudio ? null : /* @__PURE__ */
|
|
4130
|
+
readOnlyStudio ? null : /* @__PURE__ */ jsxs10(Fragment5, {
|
|
4037
4131
|
children: [
|
|
4038
|
-
/* @__PURE__ */
|
|
4132
|
+
/* @__PURE__ */ jsx36(Spacing, {
|
|
4039
4133
|
x: 0.5
|
|
4040
4134
|
}),
|
|
4041
|
-
/* @__PURE__ */
|
|
4135
|
+
/* @__PURE__ */ jsx36(InlineAction, {
|
|
4042
4136
|
title: "Open in Explorer",
|
|
4043
4137
|
renderAction: renderFileExplorerAction,
|
|
4044
4138
|
onClick: revealInExplorer
|
|
@@ -4055,11 +4149,11 @@ var AssetSelectorItem = ({ item, tabIndex, level, parentFolder, readOnlyStudio }
|
|
|
4055
4149
|
// src/components/CurrentAsset.tsx
|
|
4056
4150
|
import { formatBytes } from "@remotion/studio-shared";
|
|
4057
4151
|
import { ALL_FORMATS, Input, UrlSource } from "mediabunny";
|
|
4058
|
-
import { useContext as useContext12, useEffect as useEffect14, useMemo as
|
|
4152
|
+
import { useContext as useContext12, useEffect as useEffect14, useMemo as useMemo25, useState as useState17 } from "react";
|
|
4059
4153
|
import { Internals as Internals9, staticFile } from "remotion";
|
|
4060
4154
|
|
|
4061
4155
|
// src/components/use-static-files.ts
|
|
4062
|
-
import
|
|
4156
|
+
import React26, { createContext as createContext10, useContext as useContext11, useEffect as useEffect13, useState as useState16 } from "react";
|
|
4063
4157
|
import { useRemotionEnvironment } from "remotion";
|
|
4064
4158
|
|
|
4065
4159
|
// src/api/get-static-files.ts
|
|
@@ -4131,16 +4225,16 @@ var StaticFilesProvider = ({ children }) => {
|
|
|
4131
4225
|
});
|
|
4132
4226
|
return cancel;
|
|
4133
4227
|
}, [env.isStudio, env.isReadOnlyStudio]);
|
|
4134
|
-
return
|
|
4228
|
+
return React26.createElement(StaticFilesContext.Provider, { value: files }, children);
|
|
4135
4229
|
};
|
|
4136
4230
|
var useStaticFiles = () => {
|
|
4137
4231
|
return useContext11(StaticFilesContext);
|
|
4138
4232
|
};
|
|
4139
4233
|
|
|
4140
4234
|
// src/components/CurrentAsset.tsx
|
|
4141
|
-
import { jsx as
|
|
4235
|
+
import { jsx as jsx37, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
4142
4236
|
var CURRENT_ASSET_HEIGHT = 80;
|
|
4143
|
-
var
|
|
4237
|
+
var container9 = {
|
|
4144
4238
|
height: CURRENT_ASSET_HEIGHT,
|
|
4145
4239
|
display: "block",
|
|
4146
4240
|
borderBottom: `1px solid ${BORDER_COLOR}`,
|
|
@@ -4182,7 +4276,7 @@ var CurrentAsset = () => {
|
|
|
4182
4276
|
const { canvasContent } = useContext12(Internals9.CompositionManager);
|
|
4183
4277
|
const assetName = canvasContent?.type === "asset" ? canvasContent.asset : null;
|
|
4184
4278
|
const staticFiles = useStaticFiles();
|
|
4185
|
-
const sizeInBytes =
|
|
4279
|
+
const sizeInBytes = useMemo25(() => {
|
|
4186
4280
|
if (!assetName) {
|
|
4187
4281
|
return null;
|
|
4188
4282
|
}
|
|
@@ -4217,8 +4311,8 @@ var CurrentAsset = () => {
|
|
|
4217
4311
|
};
|
|
4218
4312
|
}, [assetName]);
|
|
4219
4313
|
if (!assetName) {
|
|
4220
|
-
return /* @__PURE__ */
|
|
4221
|
-
style:
|
|
4314
|
+
return /* @__PURE__ */ jsx37("div", {
|
|
4315
|
+
style: container9
|
|
4222
4316
|
});
|
|
4223
4317
|
}
|
|
4224
4318
|
const fileName = assetName.split("/").pop() ?? assetName;
|
|
@@ -4232,21 +4326,21 @@ var CurrentAsset = () => {
|
|
|
4232
4326
|
subtitleParts.push(`${mediaMetadata.width}x${mediaMetadata.height}`);
|
|
4233
4327
|
}
|
|
4234
4328
|
}
|
|
4235
|
-
return /* @__PURE__ */
|
|
4236
|
-
style:
|
|
4237
|
-
children: /* @__PURE__ */
|
|
4329
|
+
return /* @__PURE__ */ jsx37("div", {
|
|
4330
|
+
style: container9,
|
|
4331
|
+
children: /* @__PURE__ */ jsx37("div", {
|
|
4238
4332
|
style: row2,
|
|
4239
|
-
children: /* @__PURE__ */
|
|
4333
|
+
children: /* @__PURE__ */ jsxs11("div", {
|
|
4240
4334
|
children: [
|
|
4241
|
-
/* @__PURE__ */
|
|
4335
|
+
/* @__PURE__ */ jsx37("div", {
|
|
4242
4336
|
style: title2,
|
|
4243
4337
|
children: fileName
|
|
4244
4338
|
}),
|
|
4245
|
-
subtitleParts.length > 0 ? /* @__PURE__ */
|
|
4339
|
+
subtitleParts.length > 0 ? /* @__PURE__ */ jsx37("div", {
|
|
4246
4340
|
style: subtitle2,
|
|
4247
4341
|
children: subtitleParts.join(" · ")
|
|
4248
4342
|
}) : null,
|
|
4249
|
-
mediaMetadata ? /* @__PURE__ */
|
|
4343
|
+
mediaMetadata ? /* @__PURE__ */ jsx37("div", {
|
|
4250
4344
|
style: subtitle2,
|
|
4251
4345
|
children: formatDuration(mediaMetadata.duration)
|
|
4252
4346
|
}) : null
|
|
@@ -4257,8 +4351,8 @@ var CurrentAsset = () => {
|
|
|
4257
4351
|
};
|
|
4258
4352
|
|
|
4259
4353
|
// src/components/AssetSelector.tsx
|
|
4260
|
-
import { jsx as
|
|
4261
|
-
var
|
|
4354
|
+
import { jsx as jsx38, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
4355
|
+
var container10 = {
|
|
4262
4356
|
display: "flex",
|
|
4263
4357
|
flexDirection: "column",
|
|
4264
4358
|
flex: 1,
|
|
@@ -4289,7 +4383,7 @@ var AssetSelector = ({ readOnlyStudio }) => {
|
|
|
4289
4383
|
const connectionStatus = useContext13(StudioServerConnectionCtx).previewServerState.type;
|
|
4290
4384
|
const shouldAllowUpload = connectionStatus === "connected" && !readOnlyStudio;
|
|
4291
4385
|
const showCurrentAsset = canvasContent?.type === "asset";
|
|
4292
|
-
const list =
|
|
4386
|
+
const list = useMemo26(() => {
|
|
4293
4387
|
return {
|
|
4294
4388
|
...baseList,
|
|
4295
4389
|
height: showCurrentAsset ? `calc(100% - ${CURRENT_ASSET_HEIGHT}px)` : "100%"
|
|
@@ -4297,7 +4391,7 @@ var AssetSelector = ({ readOnlyStudio }) => {
|
|
|
4297
4391
|
}, [showCurrentAsset]);
|
|
4298
4392
|
const staticFiles = useStaticFiles();
|
|
4299
4393
|
const publicFolderExists = window.remotion_publicFolderExists;
|
|
4300
|
-
const assetTree =
|
|
4394
|
+
const assetTree = useMemo26(() => {
|
|
4301
4395
|
return buildAssetFolderStructure(staticFiles, null, assetFoldersExpanded);
|
|
4302
4396
|
}, [assetFoldersExpanded, staticFiles]);
|
|
4303
4397
|
const toggleFolder = useCallback19((folderName, parentName) => {
|
|
@@ -4348,41 +4442,41 @@ var AssetSelector = ({ readOnlyStudio }) => {
|
|
|
4348
4442
|
setDropLocation(null);
|
|
4349
4443
|
}
|
|
4350
4444
|
}, [dropLocation]);
|
|
4351
|
-
return /* @__PURE__ */
|
|
4352
|
-
style:
|
|
4445
|
+
return /* @__PURE__ */ jsxs12("div", {
|
|
4446
|
+
style: container10,
|
|
4353
4447
|
onDragOver: shouldAllowUpload ? onDragOver : undefined,
|
|
4354
4448
|
onDrop: shouldAllowUpload ? onDrop : undefined,
|
|
4355
4449
|
children: [
|
|
4356
|
-
showCurrentAsset ? /* @__PURE__ */
|
|
4357
|
-
staticFiles.length === 0 ? publicFolderExists ? /* @__PURE__ */
|
|
4450
|
+
showCurrentAsset ? /* @__PURE__ */ jsx38(CurrentAsset, {}) : null,
|
|
4451
|
+
staticFiles.length === 0 ? publicFolderExists ? /* @__PURE__ */ jsx38("div", {
|
|
4358
4452
|
style: emptyState,
|
|
4359
|
-
children: /* @__PURE__ */
|
|
4453
|
+
children: /* @__PURE__ */ jsxs12("div", {
|
|
4360
4454
|
style: label,
|
|
4361
4455
|
children: [
|
|
4362
4456
|
"To add assets, place a file in the",
|
|
4363
4457
|
" ",
|
|
4364
|
-
/* @__PURE__ */
|
|
4458
|
+
/* @__PURE__ */ jsx38("code", {
|
|
4365
4459
|
style: inlineCodeSnippet,
|
|
4366
4460
|
children: "public"
|
|
4367
4461
|
}),
|
|
4368
4462
|
" folder of your project or drag and drop a file here."
|
|
4369
4463
|
]
|
|
4370
4464
|
})
|
|
4371
|
-
}) : /* @__PURE__ */
|
|
4465
|
+
}) : /* @__PURE__ */ jsx38("div", {
|
|
4372
4466
|
style: emptyState,
|
|
4373
|
-
children: /* @__PURE__ */
|
|
4467
|
+
children: /* @__PURE__ */ jsxs12("div", {
|
|
4374
4468
|
style: label,
|
|
4375
4469
|
children: [
|
|
4376
4470
|
"To add assets, create a folder called",
|
|
4377
4471
|
" ",
|
|
4378
|
-
/* @__PURE__ */
|
|
4472
|
+
/* @__PURE__ */ jsx38("code", {
|
|
4379
4473
|
style: inlineCodeSnippet,
|
|
4380
4474
|
children: "public"
|
|
4381
4475
|
}),
|
|
4382
4476
|
" in the root of your project and place a file in it."
|
|
4383
4477
|
]
|
|
4384
4478
|
})
|
|
4385
|
-
}) : /* @__PURE__ */
|
|
4479
|
+
}) : /* @__PURE__ */ jsx38("div", {
|
|
4386
4480
|
className: "__remotion-vertical-scrollbar",
|
|
4387
4481
|
style: {
|
|
4388
4482
|
...list,
|
|
@@ -4390,7 +4484,7 @@ var AssetSelector = ({ readOnlyStudio }) => {
|
|
|
4390
4484
|
},
|
|
4391
4485
|
onDragEnter,
|
|
4392
4486
|
onDragLeave,
|
|
4393
|
-
children: /* @__PURE__ */
|
|
4487
|
+
children: /* @__PURE__ */ jsx38(AssetFolderTree, {
|
|
4394
4488
|
item: assetTree,
|
|
4395
4489
|
level: 0,
|
|
4396
4490
|
parentFolder: null,
|
|
@@ -4411,11 +4505,11 @@ import {
|
|
|
4411
4505
|
useCallback as useCallback20,
|
|
4412
4506
|
useContext as useContext14,
|
|
4413
4507
|
useImperativeHandle as useImperativeHandle4,
|
|
4414
|
-
useMemo as
|
|
4508
|
+
useMemo as useMemo27,
|
|
4415
4509
|
useState as useState19
|
|
4416
4510
|
} from "react";
|
|
4417
4511
|
import { Internals as Internals11 } from "remotion";
|
|
4418
|
-
import { jsx as
|
|
4512
|
+
import { jsx as jsx39 } from "react/jsx-runtime";
|
|
4419
4513
|
var CompSelectorRef = ({ children }) => {
|
|
4420
4514
|
const { compositions } = useContext14(Internals11.CompositionManager);
|
|
4421
4515
|
const [foldersExpanded, setFoldersExpanded] = useState19(loadExpandedFolders("compositions"));
|
|
@@ -4477,34 +4571,34 @@ var CompSelectorRef = ({ children }) => {
|
|
|
4477
4571
|
}
|
|
4478
4572
|
};
|
|
4479
4573
|
}, [compositions, selectComposition, toggleFolder]);
|
|
4480
|
-
const contextValue =
|
|
4574
|
+
const contextValue = useMemo27(() => {
|
|
4481
4575
|
return {
|
|
4482
4576
|
foldersExpanded,
|
|
4483
4577
|
setFoldersExpanded,
|
|
4484
4578
|
toggleFolder
|
|
4485
4579
|
};
|
|
4486
4580
|
}, [foldersExpanded, setFoldersExpanded, toggleFolder]);
|
|
4487
|
-
return /* @__PURE__ */
|
|
4581
|
+
return /* @__PURE__ */ jsx39(ExpandedFoldersContext.Provider, {
|
|
4488
4582
|
value: contextValue,
|
|
4489
4583
|
children
|
|
4490
4584
|
});
|
|
4491
4585
|
};
|
|
4492
4586
|
|
|
4493
4587
|
// src/components/Tabs/index.tsx
|
|
4494
|
-
import { useCallback as useCallback21, useMemo as
|
|
4495
|
-
import { jsx as
|
|
4588
|
+
import { useCallback as useCallback21, useMemo as useMemo28, useState as useState20 } from "react";
|
|
4589
|
+
import { jsx as jsx40 } from "react/jsx-runtime";
|
|
4496
4590
|
var tabsContainer = {
|
|
4497
4591
|
display: "flex",
|
|
4498
4592
|
flexDirection: "row"
|
|
4499
4593
|
};
|
|
4500
4594
|
var Tabs = ({ children, style }) => {
|
|
4501
|
-
const definiteStyle =
|
|
4595
|
+
const definiteStyle = useMemo28(() => {
|
|
4502
4596
|
return {
|
|
4503
4597
|
...tabsContainer,
|
|
4504
4598
|
...style
|
|
4505
4599
|
};
|
|
4506
4600
|
}, [style]);
|
|
4507
|
-
return /* @__PURE__ */
|
|
4601
|
+
return /* @__PURE__ */ jsx40("div", {
|
|
4508
4602
|
style: definiteStyle,
|
|
4509
4603
|
children
|
|
4510
4604
|
});
|
|
@@ -4533,7 +4627,7 @@ var Tab = ({ children, onClick, style, selected }) => {
|
|
|
4533
4627
|
const onPointerLeave = useCallback21(() => {
|
|
4534
4628
|
setHovered(false);
|
|
4535
4629
|
}, []);
|
|
4536
|
-
const definiteStyle =
|
|
4630
|
+
const definiteStyle = useMemo28(() => ({
|
|
4537
4631
|
...selectorButton,
|
|
4538
4632
|
backgroundColor: selected ? BACKGROUND : hovered ? CLEAR_HOVER : INPUT_BACKGROUND,
|
|
4539
4633
|
color: selected ? "white" : LIGHT_TEXT,
|
|
@@ -4541,7 +4635,7 @@ var Tab = ({ children, onClick, style, selected }) => {
|
|
|
4541
4635
|
boxShadow: selected ? "none" : undefined,
|
|
4542
4636
|
...style
|
|
4543
4637
|
}), [hovered, selected, style]);
|
|
4544
|
-
return /* @__PURE__ */
|
|
4638
|
+
return /* @__PURE__ */ jsx40("div", {
|
|
4545
4639
|
style: definiteStyle,
|
|
4546
4640
|
role: "button",
|
|
4547
4641
|
onClick,
|
|
@@ -4553,8 +4647,8 @@ var Tab = ({ children, onClick, style, selected }) => {
|
|
|
4553
4647
|
};
|
|
4554
4648
|
|
|
4555
4649
|
// src/components/ExplorerPanel.tsx
|
|
4556
|
-
import { jsx as
|
|
4557
|
-
var
|
|
4650
|
+
import { jsx as jsx41, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
4651
|
+
var container11 = {
|
|
4558
4652
|
height: "100%",
|
|
4559
4653
|
width: "100%",
|
|
4560
4654
|
maxWidth: "100%",
|
|
@@ -4599,21 +4693,21 @@ var ExplorerPanel = ({ readOnlyStudio }) => {
|
|
|
4599
4693
|
}
|
|
4600
4694
|
};
|
|
4601
4695
|
}, []);
|
|
4602
|
-
return /* @__PURE__ */
|
|
4603
|
-
children: /* @__PURE__ */
|
|
4604
|
-
style:
|
|
4696
|
+
return /* @__PURE__ */ jsx41(CompSelectorRef, {
|
|
4697
|
+
children: /* @__PURE__ */ jsxs13("div", {
|
|
4698
|
+
style: container11,
|
|
4605
4699
|
className: "css-reset",
|
|
4606
4700
|
children: [
|
|
4607
|
-
/* @__PURE__ */
|
|
4701
|
+
/* @__PURE__ */ jsx41("div", {
|
|
4608
4702
|
style: tabsContainer2,
|
|
4609
|
-
children: /* @__PURE__ */
|
|
4703
|
+
children: /* @__PURE__ */ jsxs13(Tabs, {
|
|
4610
4704
|
children: [
|
|
4611
|
-
/* @__PURE__ */
|
|
4705
|
+
/* @__PURE__ */ jsx41(Tab, {
|
|
4612
4706
|
selected: panel === "compositions",
|
|
4613
4707
|
onClick: onCompositionsSelected,
|
|
4614
4708
|
children: "Compositions"
|
|
4615
4709
|
}),
|
|
4616
|
-
/* @__PURE__ */
|
|
4710
|
+
/* @__PURE__ */ jsx41(Tab, {
|
|
4617
4711
|
selected: panel === "assets",
|
|
4618
4712
|
onClick: onAssetsSelected,
|
|
4619
4713
|
children: "Assets"
|
|
@@ -4621,7 +4715,7 @@ var ExplorerPanel = ({ readOnlyStudio }) => {
|
|
|
4621
4715
|
]
|
|
4622
4716
|
})
|
|
4623
4717
|
}),
|
|
4624
|
-
panel === "compositions" ? /* @__PURE__ */
|
|
4718
|
+
panel === "compositions" ? /* @__PURE__ */ jsx41(CompositionSelector, {}) : /* @__PURE__ */ jsx41(AssetSelector, {
|
|
4625
4719
|
readOnlyStudio
|
|
4626
4720
|
})
|
|
4627
4721
|
]
|
|
@@ -4787,7 +4881,7 @@ import {
|
|
|
4787
4881
|
import { AbsoluteFill } from "remotion";
|
|
4788
4882
|
|
|
4789
4883
|
// src/components/ModalContainer.tsx
|
|
4790
|
-
import { jsx as
|
|
4884
|
+
import { jsx as jsx42 } from "react/jsx-runtime";
|
|
4791
4885
|
var padding = 20;
|
|
4792
4886
|
var getMaxModalWidth = (width) => {
|
|
4793
4887
|
return `min(calc(100vw - ${padding * 2}px), calc(${width}px - ${padding * 2}px))`;
|
|
@@ -4811,16 +4905,16 @@ var panel = {
|
|
|
4811
4905
|
margin: "auto"
|
|
4812
4906
|
};
|
|
4813
4907
|
var ModalContainer = ({ children, onEscape, onOutsideClick, noZIndex }) => {
|
|
4814
|
-
return /* @__PURE__ */
|
|
4908
|
+
return /* @__PURE__ */ jsx42("div", {
|
|
4815
4909
|
className: "css-reset",
|
|
4816
4910
|
style: backgroundOverlay,
|
|
4817
4911
|
role: "dialog",
|
|
4818
4912
|
"aria-modal": "true",
|
|
4819
|
-
children: /* @__PURE__ */
|
|
4913
|
+
children: /* @__PURE__ */ jsx42(HigherZIndex, {
|
|
4820
4914
|
disabled: noZIndex,
|
|
4821
4915
|
onOutsideClick,
|
|
4822
4916
|
onEscape,
|
|
4823
|
-
children: /* @__PURE__ */
|
|
4917
|
+
children: /* @__PURE__ */ jsx42("div", {
|
|
4824
4918
|
style: panel,
|
|
4825
4919
|
children
|
|
4826
4920
|
})
|
|
@@ -4832,7 +4926,7 @@ var ModalContainer = ({ children, onEscape, onOutsideClick, noZIndex }) => {
|
|
|
4832
4926
|
import { useCallback as useCallback24, useContext as useContext16 } from "react";
|
|
4833
4927
|
|
|
4834
4928
|
// src/components/NewComposition/CancelButton.tsx
|
|
4835
|
-
import { jsx as
|
|
4929
|
+
import { jsx as jsx43 } from "react/jsx-runtime";
|
|
4836
4930
|
var style = {
|
|
4837
4931
|
appearance: "none",
|
|
4838
4932
|
border: "none",
|
|
@@ -4845,15 +4939,15 @@ var style = {
|
|
|
4845
4939
|
};
|
|
4846
4940
|
var CancelButton = ({ onPress, ...props }) => {
|
|
4847
4941
|
const { tabIndex } = useZIndex();
|
|
4848
|
-
return /* @__PURE__ */
|
|
4942
|
+
return /* @__PURE__ */ jsx43("button", {
|
|
4849
4943
|
tabIndex,
|
|
4850
4944
|
style,
|
|
4851
4945
|
type: "button",
|
|
4852
4946
|
onClick: onPress,
|
|
4853
|
-
children: /* @__PURE__ */
|
|
4947
|
+
children: /* @__PURE__ */ jsx43("svg", {
|
|
4854
4948
|
viewBox: "0 0 320 512",
|
|
4855
4949
|
...props,
|
|
4856
|
-
children: /* @__PURE__ */
|
|
4950
|
+
children: /* @__PURE__ */ jsx43("path", {
|
|
4857
4951
|
fill: "currentColor",
|
|
4858
4952
|
d: "M207.6 256l107.72-107.72c6.23-6.23 6.23-16.34 0-22.58l-25.03-25.03c-6.23-6.23-16.34-6.23-22.58 0L160 208.4 52.28 100.68c-6.23-6.23-16.34-6.23-22.58 0L4.68 125.7c-6.23 6.23-6.23 16.34 0 22.58L112.4 256 4.68 363.72c-6.23 6.23-6.23 16.34 0 22.58l25.03 25.03c6.23 6.23 16.34 6.23 22.58 0L160 303.6l107.72 107.72c6.23 6.23 16.34 6.23 22.58 0l25.03-25.03c6.23-6.23 6.23-16.34 0-22.58L207.6 256z"
|
|
4859
4953
|
})
|
|
@@ -4862,8 +4956,8 @@ var CancelButton = ({ onPress, ...props }) => {
|
|
|
4862
4956
|
};
|
|
4863
4957
|
|
|
4864
4958
|
// src/components/ModalHeader.tsx
|
|
4865
|
-
import { jsx as
|
|
4866
|
-
var
|
|
4959
|
+
import { jsx as jsx44, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
4960
|
+
var container12 = {
|
|
4867
4961
|
display: "flex",
|
|
4868
4962
|
flexDirection: "row",
|
|
4869
4963
|
alignItems: "center",
|
|
@@ -4884,15 +4978,15 @@ var ModalHeader = ({ title: title3, onClose }) => {
|
|
|
4884
4978
|
const onPress = useCallback24(() => {
|
|
4885
4979
|
setSelectedModal(null);
|
|
4886
4980
|
}, [setSelectedModal]);
|
|
4887
|
-
return /* @__PURE__ */
|
|
4888
|
-
style:
|
|
4981
|
+
return /* @__PURE__ */ jsxs14("div", {
|
|
4982
|
+
style: container12,
|
|
4889
4983
|
children: [
|
|
4890
|
-
/* @__PURE__ */
|
|
4984
|
+
/* @__PURE__ */ jsx44("div", {
|
|
4891
4985
|
style: titleStyle,
|
|
4892
4986
|
children: title3
|
|
4893
4987
|
}),
|
|
4894
|
-
/* @__PURE__ */
|
|
4895
|
-
/* @__PURE__ */
|
|
4988
|
+
/* @__PURE__ */ jsx44(Flex, {}),
|
|
4989
|
+
/* @__PURE__ */ jsx44(CancelButton, {
|
|
4896
4990
|
style: icon,
|
|
4897
4991
|
onPress: onClose ?? onPress
|
|
4898
4992
|
})
|
|
@@ -4901,8 +4995,8 @@ var ModalHeader = ({ title: title3, onClose }) => {
|
|
|
4901
4995
|
};
|
|
4902
4996
|
|
|
4903
4997
|
// src/components/AskAiModal.tsx
|
|
4904
|
-
import { jsx as
|
|
4905
|
-
var
|
|
4998
|
+
import { jsx as jsx45, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
4999
|
+
var container13 = {
|
|
4906
5000
|
height: "calc(100vh - 100px)",
|
|
4907
5001
|
width: "calc(100vw - 160px)",
|
|
4908
5002
|
maxWidth: 800,
|
|
@@ -4954,21 +5048,21 @@ var AskAiModal = () => {
|
|
|
4954
5048
|
if (state === "never-opened") {
|
|
4955
5049
|
return null;
|
|
4956
5050
|
}
|
|
4957
|
-
return /* @__PURE__ */
|
|
5051
|
+
return /* @__PURE__ */ jsx45(AbsoluteFill, {
|
|
4958
5052
|
style: { display: state === "visible" ? "block" : "none" },
|
|
4959
|
-
children: /* @__PURE__ */
|
|
5053
|
+
children: /* @__PURE__ */ jsxs15(ModalContainer, {
|
|
4960
5054
|
noZIndex: state === "hidden",
|
|
4961
5055
|
onOutsideClick: onQuit,
|
|
4962
5056
|
onEscape: onQuit,
|
|
4963
5057
|
children: [
|
|
4964
|
-
/* @__PURE__ */
|
|
5058
|
+
/* @__PURE__ */ jsx45(ModalHeader, {
|
|
4965
5059
|
title: "Ask AI",
|
|
4966
5060
|
onClose: onQuit
|
|
4967
5061
|
}),
|
|
4968
|
-
/* @__PURE__ */
|
|
5062
|
+
/* @__PURE__ */ jsx45("iframe", {
|
|
4969
5063
|
ref: iframe,
|
|
4970
5064
|
frameBorder: 0,
|
|
4971
|
-
style:
|
|
5065
|
+
style: container13,
|
|
4972
5066
|
src: "https://www.remotion.dev/ai-embed",
|
|
4973
5067
|
allow: "clipboard-read; clipboard-write"
|
|
4974
5068
|
})
|
|
@@ -4978,32 +5072,32 @@ var AskAiModal = () => {
|
|
|
4978
5072
|
};
|
|
4979
5073
|
|
|
4980
5074
|
// src/components/SizeSelector.tsx
|
|
4981
|
-
import { useContext as useContext20, useMemo as
|
|
5075
|
+
import { useContext as useContext20, useMemo as useMemo35 } from "react";
|
|
4982
5076
|
import { Internals as Internals14 } from "remotion";
|
|
4983
5077
|
|
|
4984
5078
|
// src/icons/Checkmark.tsx
|
|
4985
|
-
import { jsx as
|
|
5079
|
+
import { jsx as jsx46 } from "react/jsx-runtime";
|
|
4986
5080
|
var style2 = {
|
|
4987
5081
|
width: 14,
|
|
4988
5082
|
height: 14
|
|
4989
5083
|
};
|
|
4990
|
-
var Checkmark = () => /* @__PURE__ */
|
|
5084
|
+
var Checkmark = () => /* @__PURE__ */ jsx46("svg", {
|
|
4991
5085
|
focusable: "false",
|
|
4992
5086
|
role: "img",
|
|
4993
5087
|
viewBox: "0 0 512 512",
|
|
4994
5088
|
style: style2,
|
|
4995
|
-
children: /* @__PURE__ */
|
|
5089
|
+
children: /* @__PURE__ */ jsx46("path", {
|
|
4996
5090
|
fill: "currentColor",
|
|
4997
5091
|
d: "M435.848 83.466L172.804 346.51l-96.652-96.652c-4.686-4.686-12.284-4.686-16.971 0l-28.284 28.284c-4.686 4.686-4.686 12.284 0 16.971l133.421 133.421c4.686 4.686 12.284 4.686 16.971 0l299.813-299.813c4.686-4.686 4.686-12.284 0-16.971l-28.284-28.284c-4.686-4.686-12.284-4.686-16.97 0z"
|
|
4998
5092
|
})
|
|
4999
5093
|
});
|
|
5000
5094
|
|
|
5001
5095
|
// src/components/ControlButton.tsx
|
|
5002
|
-
import { useMemo as
|
|
5003
|
-
import { jsx as
|
|
5096
|
+
import { useMemo as useMemo29 } from "react";
|
|
5097
|
+
import { jsx as jsx47 } from "react/jsx-runtime";
|
|
5004
5098
|
var CONTROL_BUTTON_PADDING = 6;
|
|
5005
5099
|
var ControlButton = (props) => {
|
|
5006
|
-
const style3 =
|
|
5100
|
+
const style3 = useMemo29(() => {
|
|
5007
5101
|
return {
|
|
5008
5102
|
opacity: props.disabled ? 0.5 : 1,
|
|
5009
5103
|
display: "inline-flex",
|
|
@@ -5013,7 +5107,7 @@ var ControlButton = (props) => {
|
|
|
5013
5107
|
};
|
|
5014
5108
|
}, [props.disabled]);
|
|
5015
5109
|
const { tabIndex } = useZIndex();
|
|
5016
|
-
return /* @__PURE__ */
|
|
5110
|
+
return /* @__PURE__ */ jsx47("button", {
|
|
5017
5111
|
type: "button",
|
|
5018
5112
|
tabIndex,
|
|
5019
5113
|
...props,
|
|
@@ -5023,10 +5117,10 @@ var ControlButton = (props) => {
|
|
|
5023
5117
|
|
|
5024
5118
|
// src/components/NewComposition/ComboBox.tsx
|
|
5025
5119
|
import { PlayerInternals as PlayerInternals5 } from "@remotion/player";
|
|
5026
|
-
import { useCallback as useCallback26, useEffect as useEffect17, useMemo as
|
|
5120
|
+
import { useCallback as useCallback26, useEffect as useEffect17, useMemo as useMemo30, useRef as useRef14, useState as useState23 } from "react";
|
|
5027
5121
|
import ReactDOM4 from "react-dom";
|
|
5028
|
-
import { jsx as
|
|
5029
|
-
var
|
|
5122
|
+
import { jsx as jsx48, jsxs as jsxs16, Fragment as Fragment6 } from "react/jsx-runtime";
|
|
5123
|
+
var container14 = {
|
|
5030
5124
|
padding: "8px 10px",
|
|
5031
5125
|
display: "inline-block",
|
|
5032
5126
|
backgroundColor: INPUT_BACKGROUND,
|
|
@@ -5100,25 +5194,25 @@ var Combobox = ({ values, selectedId, style: customStyle, title: title3 }) => {
|
|
|
5100
5194
|
current.removeEventListener("click", onClick);
|
|
5101
5195
|
};
|
|
5102
5196
|
}, [refresh]);
|
|
5103
|
-
const spaceToBottom =
|
|
5197
|
+
const spaceToBottom = useMemo30(() => {
|
|
5104
5198
|
const margin2 = 10;
|
|
5105
5199
|
if (size && opened) {
|
|
5106
5200
|
return size.windowSize.height - (size.top + size.height) - margin2;
|
|
5107
5201
|
}
|
|
5108
5202
|
return 0;
|
|
5109
5203
|
}, [opened, size]);
|
|
5110
|
-
const spaceToTop =
|
|
5204
|
+
const spaceToTop = useMemo30(() => {
|
|
5111
5205
|
const margin2 = 10;
|
|
5112
5206
|
if (size && opened) {
|
|
5113
5207
|
return size.top - margin2;
|
|
5114
5208
|
}
|
|
5115
5209
|
return 0;
|
|
5116
5210
|
}, [opened, size]);
|
|
5117
|
-
const derivedMaxHeight =
|
|
5211
|
+
const derivedMaxHeight = useMemo30(() => {
|
|
5118
5212
|
return spaceToTop > spaceToBottom ? spaceToTop : spaceToBottom;
|
|
5119
5213
|
}, [spaceToBottom, spaceToTop]);
|
|
5120
5214
|
const isMobileLayout = useMobileLayout();
|
|
5121
|
-
const portalStyle =
|
|
5215
|
+
const portalStyle = useMemo30(() => {
|
|
5122
5216
|
if (!opened || !size) {
|
|
5123
5217
|
return null;
|
|
5124
5218
|
}
|
|
@@ -5145,9 +5239,9 @@ var Combobox = ({ values, selectedId, style: customStyle, title: title3 }) => {
|
|
|
5145
5239
|
};
|
|
5146
5240
|
}, [isMobileLayout, opened, size, spaceToBottom, spaceToTop]);
|
|
5147
5241
|
const selected = values.find((v) => v.id === selectedId);
|
|
5148
|
-
const style3 =
|
|
5242
|
+
const style3 = useMemo30(() => {
|
|
5149
5243
|
return {
|
|
5150
|
-
...
|
|
5244
|
+
...container14,
|
|
5151
5245
|
...customStyle ?? {},
|
|
5152
5246
|
userSelect: "none",
|
|
5153
5247
|
WebkitUserSelect: "none",
|
|
@@ -5158,9 +5252,9 @@ var Combobox = ({ values, selectedId, style: customStyle, title: title3 }) => {
|
|
|
5158
5252
|
borderColor: opened ? SELECTED_BACKGROUND : hovered ? INPUT_BORDER_COLOR_HOVERED : INPUT_BORDER_COLOR_UNHOVERED
|
|
5159
5253
|
};
|
|
5160
5254
|
}, [customStyle, hovered, opened]);
|
|
5161
|
-
return /* @__PURE__ */
|
|
5255
|
+
return /* @__PURE__ */ jsxs16(Fragment6, {
|
|
5162
5256
|
children: [
|
|
5163
|
-
/* @__PURE__ */
|
|
5257
|
+
/* @__PURE__ */ jsxs16("button", {
|
|
5164
5258
|
ref,
|
|
5165
5259
|
title: title3,
|
|
5166
5260
|
tabIndex,
|
|
@@ -5168,29 +5262,29 @@ var Combobox = ({ values, selectedId, style: customStyle, title: title3 }) => {
|
|
|
5168
5262
|
style: style3,
|
|
5169
5263
|
className: MENU_INITIATOR_CLASSNAME,
|
|
5170
5264
|
children: [
|
|
5171
|
-
selected ? /* @__PURE__ */
|
|
5265
|
+
selected ? /* @__PURE__ */ jsx48("div", {
|
|
5172
5266
|
title: typeof selected.label === "string" ? selected.label : undefined,
|
|
5173
5267
|
style: label2,
|
|
5174
5268
|
children: selected?.label
|
|
5175
5269
|
}) : null,
|
|
5176
|
-
/* @__PURE__ */
|
|
5270
|
+
/* @__PURE__ */ jsx48(Spacing, {
|
|
5177
5271
|
x: 1
|
|
5178
5272
|
}),
|
|
5179
5273
|
" ",
|
|
5180
|
-
/* @__PURE__ */
|
|
5274
|
+
/* @__PURE__ */ jsx48(CaretDown, {})
|
|
5181
5275
|
]
|
|
5182
5276
|
}),
|
|
5183
|
-
portalStyle ? ReactDOM4.createPortal(/* @__PURE__ */
|
|
5277
|
+
portalStyle ? ReactDOM4.createPortal(/* @__PURE__ */ jsx48("div", {
|
|
5184
5278
|
style: fullScreenOverlay,
|
|
5185
|
-
children: /* @__PURE__ */
|
|
5279
|
+
children: /* @__PURE__ */ jsx48("div", {
|
|
5186
5280
|
style: outerPortal,
|
|
5187
5281
|
className: "css-reset",
|
|
5188
|
-
children: /* @__PURE__ */
|
|
5282
|
+
children: /* @__PURE__ */ jsx48(HigherZIndex, {
|
|
5189
5283
|
onOutsideClick: onHide,
|
|
5190
5284
|
onEscape: onHide,
|
|
5191
|
-
children: /* @__PURE__ */
|
|
5285
|
+
children: /* @__PURE__ */ jsx48("div", {
|
|
5192
5286
|
style: portalStyle,
|
|
5193
|
-
children: /* @__PURE__ */
|
|
5287
|
+
children: /* @__PURE__ */ jsx48(MenuContent, {
|
|
5194
5288
|
onNextMenu: noop,
|
|
5195
5289
|
onPreviousMenu: noop,
|
|
5196
5290
|
values,
|
|
@@ -5210,7 +5304,7 @@ var Combobox = ({ values, selectedId, style: customStyle, title: title3 }) => {
|
|
|
5210
5304
|
|
|
5211
5305
|
// src/components/Preview.tsx
|
|
5212
5306
|
import { PlayerInternals as PlayerInternals6 } from "@remotion/player";
|
|
5213
|
-
import { useContext as useContext19, useEffect as useEffect23, useMemo as
|
|
5307
|
+
import { useContext as useContext19, useEffect as useEffect23, useMemo as useMemo34, useRef as useRef17 } from "react";
|
|
5214
5308
|
import { Internals as Internals13 } from "remotion";
|
|
5215
5309
|
|
|
5216
5310
|
// src/helpers/checkerboard-background.ts
|
|
@@ -5342,7 +5436,7 @@ import {
|
|
|
5342
5436
|
forwardRef as forwardRef2,
|
|
5343
5437
|
useEffect as useEffect19,
|
|
5344
5438
|
useImperativeHandle as useImperativeHandle8,
|
|
5345
|
-
useMemo as
|
|
5439
|
+
useMemo as useMemo32,
|
|
5346
5440
|
useRef as useRef16,
|
|
5347
5441
|
useState as useState25
|
|
5348
5442
|
} from "react";
|
|
@@ -5352,17 +5446,17 @@ import {
|
|
|
5352
5446
|
forwardRef,
|
|
5353
5447
|
useEffect as useEffect18,
|
|
5354
5448
|
useImperativeHandle as useImperativeHandle7,
|
|
5355
|
-
useMemo as
|
|
5449
|
+
useMemo as useMemo31,
|
|
5356
5450
|
useRef as useRef15,
|
|
5357
5451
|
useState as useState24
|
|
5358
5452
|
} from "react";
|
|
5359
|
-
import { jsx as
|
|
5453
|
+
import { jsx as jsx49 } from "react/jsx-runtime";
|
|
5360
5454
|
var INPUT_HORIZONTAL_PADDING = 8;
|
|
5361
5455
|
var aligner = {
|
|
5362
5456
|
marginRight: -INPUT_HORIZONTAL_PADDING
|
|
5363
5457
|
};
|
|
5364
5458
|
var RightAlignInput = ({ children }) => {
|
|
5365
|
-
return /* @__PURE__ */
|
|
5459
|
+
return /* @__PURE__ */ jsx49("div", {
|
|
5366
5460
|
style: aligner,
|
|
5367
5461
|
children
|
|
5368
5462
|
});
|
|
@@ -5384,7 +5478,7 @@ var RemInputForwardRef = ({ status, rightAlign, ...props }, ref) => {
|
|
|
5384
5478
|
const [isHovered, setIsHovered] = useState24(false);
|
|
5385
5479
|
const inputRef = useRef15(null);
|
|
5386
5480
|
const { tabIndex } = useZIndex();
|
|
5387
|
-
const style3 =
|
|
5481
|
+
const style3 = useMemo31(() => {
|
|
5388
5482
|
return {
|
|
5389
5483
|
backgroundColor: INPUT_BACKGROUND,
|
|
5390
5484
|
...inputBaseStyle,
|
|
@@ -5417,7 +5511,7 @@ var RemInputForwardRef = ({ status, rightAlign, ...props }, ref) => {
|
|
|
5417
5511
|
current.removeEventListener("mouseleave", onMouseLeave);
|
|
5418
5512
|
};
|
|
5419
5513
|
}, [inputRef]);
|
|
5420
|
-
return /* @__PURE__ */
|
|
5514
|
+
return /* @__PURE__ */ jsx49("input", {
|
|
5421
5515
|
ref: inputRef,
|
|
5422
5516
|
tabIndex,
|
|
5423
5517
|
...props,
|
|
@@ -5427,7 +5521,7 @@ var RemInputForwardRef = ({ status, rightAlign, ...props }, ref) => {
|
|
|
5427
5521
|
var RemotionInput = forwardRef(RemInputForwardRef);
|
|
5428
5522
|
|
|
5429
5523
|
// src/components/NewComposition/RemTextarea.tsx
|
|
5430
|
-
import { jsx as
|
|
5524
|
+
import { jsx as jsx50 } from "react/jsx-runtime";
|
|
5431
5525
|
var inputBaseStyle2 = {
|
|
5432
5526
|
padding: `${INPUT_HORIZONTAL_PADDING}px 10px`,
|
|
5433
5527
|
color: "white",
|
|
@@ -5445,7 +5539,7 @@ var RemTextareaFRFunction = ({ status, ...props }, ref) => {
|
|
|
5445
5539
|
useImperativeHandle8(ref, () => {
|
|
5446
5540
|
return inputRef.current;
|
|
5447
5541
|
}, []);
|
|
5448
|
-
const style3 =
|
|
5542
|
+
const style3 = useMemo32(() => {
|
|
5449
5543
|
return {
|
|
5450
5544
|
backgroundColor: INPUT_BACKGROUND,
|
|
5451
5545
|
...inputBaseStyle2,
|
|
@@ -5508,7 +5602,7 @@ var RemTextareaFRFunction = ({ status, ...props }, ref) => {
|
|
|
5508
5602
|
current.removeEventListener("keydown", onKeyDown);
|
|
5509
5603
|
};
|
|
5510
5604
|
}, [inputRef]);
|
|
5511
|
-
return /* @__PURE__ */
|
|
5605
|
+
return /* @__PURE__ */ jsx50("textarea", {
|
|
5512
5606
|
ref: inputRef,
|
|
5513
5607
|
tabIndex,
|
|
5514
5608
|
...props,
|
|
@@ -5519,7 +5613,7 @@ var RemTextareaFRFunction = ({ status, ...props }, ref) => {
|
|
|
5519
5613
|
var RemTextarea = forwardRef2(RemTextareaFRFunction);
|
|
5520
5614
|
|
|
5521
5615
|
// src/components/JSONViewer.tsx
|
|
5522
|
-
import { jsx as
|
|
5616
|
+
import { jsx as jsx51 } from "react/jsx-runtime";
|
|
5523
5617
|
var jsonStyle = {
|
|
5524
5618
|
marginTop: 14,
|
|
5525
5619
|
marginBottom: 14,
|
|
@@ -5533,7 +5627,7 @@ var JSONViewer = ({ src }) => {
|
|
|
5533
5627
|
setJson(JSON.stringify(jsonRes, null, 2));
|
|
5534
5628
|
});
|
|
5535
5629
|
}, [src]);
|
|
5536
|
-
return /* @__PURE__ */
|
|
5630
|
+
return /* @__PURE__ */ jsx51(RemTextarea, {
|
|
5537
5631
|
value: json ?? undefined,
|
|
5538
5632
|
status: "ok",
|
|
5539
5633
|
onChange: () => {
|
|
@@ -5545,7 +5639,7 @@ var JSONViewer = ({ src }) => {
|
|
|
5545
5639
|
|
|
5546
5640
|
// src/components/TextViewer.tsx
|
|
5547
5641
|
import { useEffect as useEffect21, useState as useState27 } from "react";
|
|
5548
|
-
import { jsxs as
|
|
5642
|
+
import { jsxs as jsxs17 } from "react/jsx-runtime";
|
|
5549
5643
|
var textStyle = {
|
|
5550
5644
|
margin: 14,
|
|
5551
5645
|
fontFamily: "monospace",
|
|
@@ -5564,7 +5658,7 @@ var TextViewer = ({ src }) => {
|
|
|
5564
5658
|
setTxt(text);
|
|
5565
5659
|
});
|
|
5566
5660
|
}, [src]);
|
|
5567
|
-
return /* @__PURE__ */
|
|
5661
|
+
return /* @__PURE__ */ jsxs17("div", {
|
|
5568
5662
|
style: textStyle,
|
|
5569
5663
|
children: [
|
|
5570
5664
|
txt,
|
|
@@ -5574,7 +5668,7 @@ var TextViewer = ({ src }) => {
|
|
|
5574
5668
|
};
|
|
5575
5669
|
|
|
5576
5670
|
// src/components/FilePreview.tsx
|
|
5577
|
-
import { jsx as
|
|
5671
|
+
import { jsx as jsx52, jsxs as jsxs18, Fragment as Fragment7 } from "react/jsx-runtime";
|
|
5578
5672
|
var msgStyle = {
|
|
5579
5673
|
fontSize: 13,
|
|
5580
5674
|
color: "white",
|
|
@@ -5590,42 +5684,42 @@ var FilePreview = ({ fileType, src, currentAsset, assetMetadata }) => {
|
|
|
5590
5684
|
throw new Error('expected to have assetMetadata, got "not-found"');
|
|
5591
5685
|
}
|
|
5592
5686
|
if (fileType === "audio") {
|
|
5593
|
-
return /* @__PURE__ */
|
|
5687
|
+
return /* @__PURE__ */ jsx52("audio", {
|
|
5594
5688
|
src,
|
|
5595
5689
|
controls: true
|
|
5596
5690
|
});
|
|
5597
5691
|
}
|
|
5598
5692
|
if (fileType === "video") {
|
|
5599
|
-
return /* @__PURE__ */
|
|
5693
|
+
return /* @__PURE__ */ jsx52("video", {
|
|
5600
5694
|
src,
|
|
5601
5695
|
controls: true
|
|
5602
5696
|
});
|
|
5603
5697
|
}
|
|
5604
5698
|
if (fileType === "image") {
|
|
5605
|
-
return /* @__PURE__ */
|
|
5699
|
+
return /* @__PURE__ */ jsx52("img", {
|
|
5606
5700
|
src
|
|
5607
5701
|
});
|
|
5608
5702
|
}
|
|
5609
5703
|
if (fileType === "json") {
|
|
5610
|
-
return /* @__PURE__ */
|
|
5704
|
+
return /* @__PURE__ */ jsx52(JSONViewer, {
|
|
5611
5705
|
src
|
|
5612
5706
|
});
|
|
5613
5707
|
}
|
|
5614
5708
|
if (fileType === "txt") {
|
|
5615
|
-
return /* @__PURE__ */
|
|
5709
|
+
return /* @__PURE__ */ jsx52(TextViewer, {
|
|
5616
5710
|
src
|
|
5617
5711
|
});
|
|
5618
5712
|
}
|
|
5619
|
-
return /* @__PURE__ */
|
|
5713
|
+
return /* @__PURE__ */ jsxs18(Fragment7, {
|
|
5620
5714
|
children: [
|
|
5621
|
-
/* @__PURE__ */
|
|
5715
|
+
/* @__PURE__ */ jsx52("div", {
|
|
5622
5716
|
style: msgStyle,
|
|
5623
5717
|
children: currentAsset
|
|
5624
5718
|
}),
|
|
5625
|
-
/* @__PURE__ */
|
|
5719
|
+
/* @__PURE__ */ jsx52(Spacing, {
|
|
5626
5720
|
y: 0.5
|
|
5627
5721
|
}),
|
|
5628
|
-
/* @__PURE__ */
|
|
5722
|
+
/* @__PURE__ */ jsxs18("div", {
|
|
5629
5723
|
style: msgStyle,
|
|
5630
5724
|
children: [
|
|
5631
5725
|
"Size: ",
|
|
@@ -5638,7 +5732,7 @@ var FilePreview = ({ fileType, src, currentAsset, assetMetadata }) => {
|
|
|
5638
5732
|
};
|
|
5639
5733
|
|
|
5640
5734
|
// src/components/RenderPreview.tsx
|
|
5641
|
-
import { jsx as
|
|
5735
|
+
import { jsx as jsx53, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
5642
5736
|
var msgStyle2 = {
|
|
5643
5737
|
fontSize: 13,
|
|
5644
5738
|
color: "white",
|
|
@@ -5687,13 +5781,13 @@ var RenderPreview = ({ path, assetMetadata, getBlob }) => {
|
|
|
5687
5781
|
}, [getBlob]);
|
|
5688
5782
|
const src = blobUrl ?? remotion_outputsBase + path;
|
|
5689
5783
|
if (connectionStatus === "disconnected") {
|
|
5690
|
-
return /* @__PURE__ */
|
|
5784
|
+
return /* @__PURE__ */ jsx53("div", {
|
|
5691
5785
|
style: errMsgStyle,
|
|
5692
5786
|
children: "Studio server disconnected"
|
|
5693
5787
|
});
|
|
5694
5788
|
}
|
|
5695
5789
|
if (getBlob && blobError) {
|
|
5696
|
-
return /* @__PURE__ */
|
|
5790
|
+
return /* @__PURE__ */ jsxs19("div", {
|
|
5697
5791
|
style: errMsgStyle,
|
|
5698
5792
|
children: [
|
|
5699
5793
|
"Failed to load preview: ",
|
|
@@ -5702,12 +5796,12 @@ var RenderPreview = ({ path, assetMetadata, getBlob }) => {
|
|
|
5702
5796
|
});
|
|
5703
5797
|
}
|
|
5704
5798
|
if (getBlob && !blobUrl) {
|
|
5705
|
-
return /* @__PURE__ */
|
|
5799
|
+
return /* @__PURE__ */ jsx53("div", {
|
|
5706
5800
|
style: msgStyle2,
|
|
5707
5801
|
children: "Loading preview..."
|
|
5708
5802
|
});
|
|
5709
5803
|
}
|
|
5710
|
-
return /* @__PURE__ */
|
|
5804
|
+
return /* @__PURE__ */ jsx53(FilePreview, {
|
|
5711
5805
|
assetMetadata,
|
|
5712
5806
|
currentAsset: path,
|
|
5713
5807
|
fileType,
|
|
@@ -5716,23 +5810,23 @@ var RenderPreview = ({ path, assetMetadata, getBlob }) => {
|
|
|
5716
5810
|
};
|
|
5717
5811
|
|
|
5718
5812
|
// src/components/Spinner.tsx
|
|
5719
|
-
import { useMemo as
|
|
5720
|
-
import { jsx as
|
|
5813
|
+
import { useMemo as useMemo33 } from "react";
|
|
5814
|
+
import { jsx as jsx54, jsxs as jsxs20, Fragment as Fragment8 } from "react/jsx-runtime";
|
|
5721
5815
|
var viewBox = 100;
|
|
5722
5816
|
var lines = 8;
|
|
5723
5817
|
var className = "__remotion_spinner_line";
|
|
5724
5818
|
var remotionSpinnerAnimation = "__remotion_spinner_animation";
|
|
5725
5819
|
var translated = "M 44 0 L 50 0 a 6 6 0 0 1 6 6 L 56 26 a 6 6 0 0 1 -6 6 L 50 32 a 6 6 0 0 1 -6 -6 L 44 6 a 6 6 0 0 1 6 -6 Z";
|
|
5726
5820
|
var Spinner = ({ size, duration }) => {
|
|
5727
|
-
const style3 =
|
|
5821
|
+
const style3 = useMemo33(() => {
|
|
5728
5822
|
return {
|
|
5729
5823
|
width: size,
|
|
5730
5824
|
height: size
|
|
5731
5825
|
};
|
|
5732
5826
|
}, [size]);
|
|
5733
|
-
return /* @__PURE__ */
|
|
5827
|
+
return /* @__PURE__ */ jsxs20(Fragment8, {
|
|
5734
5828
|
children: [
|
|
5735
|
-
/* @__PURE__ */
|
|
5829
|
+
/* @__PURE__ */ jsx54("style", {
|
|
5736
5830
|
type: "text/css",
|
|
5737
5831
|
children: `
|
|
5738
5832
|
@keyframes ${remotionSpinnerAnimation} {
|
|
@@ -5749,11 +5843,11 @@ var Spinner = ({ size, duration }) => {
|
|
|
5749
5843
|
}
|
|
5750
5844
|
`
|
|
5751
5845
|
}),
|
|
5752
|
-
/* @__PURE__ */
|
|
5846
|
+
/* @__PURE__ */ jsx54("svg", {
|
|
5753
5847
|
style: style3,
|
|
5754
5848
|
viewBox: `0 0 ${viewBox} ${viewBox}`,
|
|
5755
5849
|
children: new Array(lines).fill(true).map((_, index) => {
|
|
5756
|
-
return /* @__PURE__ */
|
|
5850
|
+
return /* @__PURE__ */ jsx54("path", {
|
|
5757
5851
|
className,
|
|
5758
5852
|
style: {
|
|
5759
5853
|
rotate: `${index * Math.PI * 2 / lines}rad`,
|
|
@@ -5772,7 +5866,7 @@ var Spinner = ({ size, duration }) => {
|
|
|
5772
5866
|
// src/components/StaticFilePreview.tsx
|
|
5773
5867
|
import { useContext as useContext18 } from "react";
|
|
5774
5868
|
import { staticFile as staticFile3 } from "remotion";
|
|
5775
|
-
import { jsx as
|
|
5869
|
+
import { jsx as jsx55, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
5776
5870
|
var msgStyle3 = {
|
|
5777
5871
|
fontSize: 13,
|
|
5778
5872
|
color: "white",
|
|
@@ -5791,13 +5885,13 @@ var StaticFilePreview = ({ currentAsset, assetMetadata }) => {
|
|
|
5791
5885
|
const connectionStatus = useContext18(StudioServerConnectionCtx).previewServerState.type;
|
|
5792
5886
|
const exists = staticFiles.find((file) => file.name === currentAsset);
|
|
5793
5887
|
if (connectionStatus === "disconnected") {
|
|
5794
|
-
return /* @__PURE__ */
|
|
5888
|
+
return /* @__PURE__ */ jsx55("div", {
|
|
5795
5889
|
style: errMsgStyle2,
|
|
5796
5890
|
children: "Studio server disconnected"
|
|
5797
5891
|
});
|
|
5798
5892
|
}
|
|
5799
5893
|
if (!exists) {
|
|
5800
|
-
return /* @__PURE__ */
|
|
5894
|
+
return /* @__PURE__ */ jsxs21("div", {
|
|
5801
5895
|
style: errMsgStyle2,
|
|
5802
5896
|
children: [
|
|
5803
5897
|
currentAsset,
|
|
@@ -5808,7 +5902,7 @@ var StaticFilePreview = ({ currentAsset, assetMetadata }) => {
|
|
|
5808
5902
|
if (!currentAsset) {
|
|
5809
5903
|
return null;
|
|
5810
5904
|
}
|
|
5811
|
-
return /* @__PURE__ */
|
|
5905
|
+
return /* @__PURE__ */ jsx55(FilePreview, {
|
|
5812
5906
|
currentAsset,
|
|
5813
5907
|
fileType,
|
|
5814
5908
|
src: `${staticFileSrc}?date=${assetMetadata && assetMetadata.type === "found" ? assetMetadata.fetchedAt : 0}`,
|
|
@@ -5817,7 +5911,7 @@ var StaticFilePreview = ({ currentAsset, assetMetadata }) => {
|
|
|
5817
5911
|
};
|
|
5818
5912
|
|
|
5819
5913
|
// src/components/Preview.tsx
|
|
5820
|
-
import { jsx as
|
|
5914
|
+
import { jsx as jsx56 } from "react/jsx-runtime";
|
|
5821
5915
|
var centeredContainer = {
|
|
5822
5916
|
display: "flex",
|
|
5823
5917
|
flex: 1,
|
|
@@ -5875,24 +5969,24 @@ var containerStyle = (options) => {
|
|
|
5875
5969
|
};
|
|
5876
5970
|
var VideoPreview = ({ canvasSize, contentDimensions, canvasContent, assetMetadata }) => {
|
|
5877
5971
|
if (assetMetadata && assetMetadata.type === "not-found") {
|
|
5878
|
-
return /* @__PURE__ */
|
|
5972
|
+
return /* @__PURE__ */ jsx56("div", {
|
|
5879
5973
|
style: centeredContainer,
|
|
5880
|
-
children: /* @__PURE__ */
|
|
5974
|
+
children: /* @__PURE__ */ jsx56("div", {
|
|
5881
5975
|
style: label3,
|
|
5882
5976
|
children: "File does not exist"
|
|
5883
5977
|
})
|
|
5884
5978
|
});
|
|
5885
5979
|
}
|
|
5886
5980
|
if (contentDimensions === null) {
|
|
5887
|
-
return /* @__PURE__ */
|
|
5981
|
+
return /* @__PURE__ */ jsx56("div", {
|
|
5888
5982
|
style: centeredContainer,
|
|
5889
|
-
children: /* @__PURE__ */
|
|
5983
|
+
children: /* @__PURE__ */ jsx56(Spinner, {
|
|
5890
5984
|
duration: 0.5,
|
|
5891
5985
|
size: 24
|
|
5892
5986
|
})
|
|
5893
5987
|
});
|
|
5894
5988
|
}
|
|
5895
|
-
return /* @__PURE__ */
|
|
5989
|
+
return /* @__PURE__ */ jsx56(CompWhenItHasDimensions, {
|
|
5896
5990
|
contentDimensions,
|
|
5897
5991
|
canvasSize,
|
|
5898
5992
|
canvasContent,
|
|
@@ -5901,7 +5995,7 @@ var VideoPreview = ({ canvasSize, contentDimensions, canvasContent, assetMetadat
|
|
|
5901
5995
|
};
|
|
5902
5996
|
var CompWhenItHasDimensions = ({ contentDimensions, canvasSize, canvasContent, assetMetadata }) => {
|
|
5903
5997
|
const { size: previewSize } = useContext19(Internals13.PreviewSizeContext);
|
|
5904
|
-
const { centerX, centerY, yCorrection, xCorrection, scale } =
|
|
5998
|
+
const { centerX, centerY, yCorrection, xCorrection, scale } = useMemo34(() => {
|
|
5905
5999
|
if (contentDimensions === "none") {
|
|
5906
6000
|
return {
|
|
5907
6001
|
centerX: 0,
|
|
@@ -5918,7 +6012,7 @@ var CompWhenItHasDimensions = ({ contentDimensions, canvasSize, canvasContent, a
|
|
|
5918
6012
|
previewSize: previewSize.size
|
|
5919
6013
|
});
|
|
5920
6014
|
}, [canvasSize, contentDimensions, previewSize.size]);
|
|
5921
|
-
const outer =
|
|
6015
|
+
const outer = useMemo34(() => {
|
|
5922
6016
|
return {
|
|
5923
6017
|
width: contentDimensions === "none" ? "100%" : contentDimensions.width * scale,
|
|
5924
6018
|
height: contentDimensions === "none" ? "100%" : contentDimensions.height * scale,
|
|
@@ -5941,36 +6035,36 @@ var CompWhenItHasDimensions = ({ contentDimensions, canvasSize, canvasContent, a
|
|
|
5941
6035
|
canvasContent
|
|
5942
6036
|
]);
|
|
5943
6037
|
if (canvasContent.type === "asset") {
|
|
5944
|
-
return /* @__PURE__ */
|
|
6038
|
+
return /* @__PURE__ */ jsx56("div", {
|
|
5945
6039
|
style: outer,
|
|
5946
|
-
children: /* @__PURE__ */
|
|
6040
|
+
children: /* @__PURE__ */ jsx56(StaticFilePreview, {
|
|
5947
6041
|
assetMetadata,
|
|
5948
6042
|
currentAsset: canvasContent.asset
|
|
5949
6043
|
})
|
|
5950
6044
|
});
|
|
5951
6045
|
}
|
|
5952
6046
|
if (canvasContent.type === "output") {
|
|
5953
|
-
return /* @__PURE__ */
|
|
6047
|
+
return /* @__PURE__ */ jsx56("div", {
|
|
5954
6048
|
style: outer,
|
|
5955
|
-
children: /* @__PURE__ */
|
|
6049
|
+
children: /* @__PURE__ */ jsx56(RenderPreview, {
|
|
5956
6050
|
path: canvasContent.path,
|
|
5957
6051
|
assetMetadata
|
|
5958
6052
|
})
|
|
5959
6053
|
});
|
|
5960
6054
|
}
|
|
5961
6055
|
if (canvasContent.type === "output-blob") {
|
|
5962
|
-
return /* @__PURE__ */
|
|
6056
|
+
return /* @__PURE__ */ jsx56("div", {
|
|
5963
6057
|
style: outer,
|
|
5964
|
-
children: /* @__PURE__ */
|
|
6058
|
+
children: /* @__PURE__ */ jsx56(RenderPreview, {
|
|
5965
6059
|
path: canvasContent.displayName,
|
|
5966
6060
|
assetMetadata,
|
|
5967
6061
|
getBlob: canvasContent.getBlob
|
|
5968
6062
|
})
|
|
5969
6063
|
});
|
|
5970
6064
|
}
|
|
5971
|
-
return /* @__PURE__ */
|
|
6065
|
+
return /* @__PURE__ */ jsx56("div", {
|
|
5972
6066
|
style: outer,
|
|
5973
|
-
children: /* @__PURE__ */
|
|
6067
|
+
children: /* @__PURE__ */ jsx56(PortalContainer, {
|
|
5974
6068
|
contentDimensions,
|
|
5975
6069
|
scale,
|
|
5976
6070
|
xCorrection,
|
|
@@ -5980,7 +6074,7 @@ var CompWhenItHasDimensions = ({ contentDimensions, canvasSize, canvasContent, a
|
|
|
5980
6074
|
};
|
|
5981
6075
|
var PortalContainer = ({ scale, xCorrection, yCorrection, contentDimensions }) => {
|
|
5982
6076
|
const { checkerboard } = useContext19(CheckerboardContext);
|
|
5983
|
-
const style3 =
|
|
6077
|
+
const style3 = useMemo34(() => {
|
|
5984
6078
|
return containerStyle({
|
|
5985
6079
|
checkerboard,
|
|
5986
6080
|
scale,
|
|
@@ -6005,14 +6099,14 @@ var PortalContainer = ({ scale, xCorrection, yCorrection, contentDimensions }) =
|
|
|
6005
6099
|
};
|
|
6006
6100
|
}, []);
|
|
6007
6101
|
const portalContainer = useRef17(null);
|
|
6008
|
-
return /* @__PURE__ */
|
|
6102
|
+
return /* @__PURE__ */ jsx56("div", {
|
|
6009
6103
|
ref: portalContainer,
|
|
6010
6104
|
style: style3
|
|
6011
6105
|
});
|
|
6012
6106
|
};
|
|
6013
6107
|
|
|
6014
6108
|
// src/components/SizeSelector.tsx
|
|
6015
|
-
import { jsx as
|
|
6109
|
+
import { jsx as jsx57 } from "react/jsx-runtime";
|
|
6016
6110
|
var commonPreviewSizes = [
|
|
6017
6111
|
{
|
|
6018
6112
|
size: "auto",
|
|
@@ -6073,12 +6167,12 @@ var zoomableFileTypes = ["video", "image"];
|
|
|
6073
6167
|
var SizeSelector = () => {
|
|
6074
6168
|
const { size, setSize } = useContext20(Internals14.PreviewSizeContext);
|
|
6075
6169
|
const { canvasContent } = useContext20(Internals14.CompositionManager);
|
|
6076
|
-
const style3 =
|
|
6170
|
+
const style3 = useMemo35(() => {
|
|
6077
6171
|
return {
|
|
6078
6172
|
padding: CONTROL_BUTTON_PADDING
|
|
6079
6173
|
};
|
|
6080
6174
|
}, []);
|
|
6081
|
-
const zoomable =
|
|
6175
|
+
const zoomable = useMemo35(() => {
|
|
6082
6176
|
if (!canvasContent) {
|
|
6083
6177
|
return null;
|
|
6084
6178
|
}
|
|
@@ -6093,7 +6187,7 @@ var SizeSelector = () => {
|
|
|
6093
6187
|
}
|
|
6094
6188
|
return false;
|
|
6095
6189
|
}, [canvasContent]);
|
|
6096
|
-
const items =
|
|
6190
|
+
const items = useMemo35(() => {
|
|
6097
6191
|
return getUniqueSizes(size).map((newSize) => {
|
|
6098
6192
|
return {
|
|
6099
6193
|
id: String(newSize.size),
|
|
@@ -6106,7 +6200,7 @@ var SizeSelector = () => {
|
|
|
6106
6200
|
type: "item",
|
|
6107
6201
|
value: newSize.size,
|
|
6108
6202
|
keyHint: newSize.size === "auto" ? "0" : null,
|
|
6109
|
-
leftItem: String(size.size) === String(newSize.size) ? /* @__PURE__ */
|
|
6203
|
+
leftItem: String(size.size) === String(newSize.size) ? /* @__PURE__ */ jsx57(Checkmark, {}) : null,
|
|
6110
6204
|
subMenu: null,
|
|
6111
6205
|
quickSwitcherLabel: null
|
|
6112
6206
|
};
|
|
@@ -6115,10 +6209,10 @@ var SizeSelector = () => {
|
|
|
6115
6209
|
if (!zoomable) {
|
|
6116
6210
|
return null;
|
|
6117
6211
|
}
|
|
6118
|
-
return /* @__PURE__ */
|
|
6212
|
+
return /* @__PURE__ */ jsx57("div", {
|
|
6119
6213
|
style: style3,
|
|
6120
6214
|
"aria-label": accessibilityLabel,
|
|
6121
|
-
children: /* @__PURE__ */
|
|
6215
|
+
children: /* @__PURE__ */ jsx57(Combobox, {
|
|
6122
6216
|
title: accessibilityLabel,
|
|
6123
6217
|
style: comboStyle,
|
|
6124
6218
|
selectedId: String(size.size),
|
|
@@ -6139,13 +6233,13 @@ import { Internals as Internals16 } from "remotion";
|
|
|
6139
6233
|
import { NoReactInternals as NoReactInternals4 } from "remotion/no-react";
|
|
6140
6234
|
|
|
6141
6235
|
// src/icons/timelineInOutPointer.tsx
|
|
6142
|
-
import { jsx as
|
|
6236
|
+
import { jsx as jsx58 } from "react/jsx-runtime";
|
|
6143
6237
|
var TimelineInPointer = (props) => {
|
|
6144
|
-
return /* @__PURE__ */
|
|
6238
|
+
return /* @__PURE__ */ jsx58("svg", {
|
|
6145
6239
|
viewBox: "0 0 256 256",
|
|
6146
6240
|
fill: "none",
|
|
6147
6241
|
...props,
|
|
6148
|
-
children: /* @__PURE__ */
|
|
6242
|
+
children: /* @__PURE__ */ jsx58("path", {
|
|
6149
6243
|
d: "M158 25H99V230.5H158",
|
|
6150
6244
|
stroke: props.color,
|
|
6151
6245
|
strokeWidth: "42",
|
|
@@ -6155,11 +6249,11 @@ var TimelineInPointer = (props) => {
|
|
|
6155
6249
|
});
|
|
6156
6250
|
};
|
|
6157
6251
|
var TimelineOutPointer = (props) => {
|
|
6158
|
-
return /* @__PURE__ */
|
|
6252
|
+
return /* @__PURE__ */ jsx58("svg", {
|
|
6159
6253
|
viewBox: "0 0 256 256",
|
|
6160
6254
|
fill: "none",
|
|
6161
6255
|
...props,
|
|
6162
|
-
children: /* @__PURE__ */
|
|
6256
|
+
children: /* @__PURE__ */ jsx58("path", {
|
|
6163
6257
|
d: "M98 25H157V230.5H98",
|
|
6164
6258
|
stroke: props.color,
|
|
6165
6259
|
strokeWidth: "42",
|
|
@@ -6170,7 +6264,7 @@ var TimelineOutPointer = (props) => {
|
|
|
6170
6264
|
};
|
|
6171
6265
|
|
|
6172
6266
|
// src/state/in-out.ts
|
|
6173
|
-
import { createContext as createContext12, useContext as useContext21, useMemo as
|
|
6267
|
+
import { createContext as createContext12, useContext as useContext21, useMemo as useMemo36 } from "react";
|
|
6174
6268
|
import { Internals as Internals15 } from "remotion";
|
|
6175
6269
|
var TimelineInOutContext = createContext12({});
|
|
6176
6270
|
var SetTimelineInOutContext = createContext12({
|
|
@@ -6183,7 +6277,7 @@ var useTimelineInOutFramePosition = () => {
|
|
|
6183
6277
|
const state = useContext21(TimelineInOutContext);
|
|
6184
6278
|
const id = videoConfig?.id;
|
|
6185
6279
|
const durationInFrames = videoConfig?.durationInFrames;
|
|
6186
|
-
return
|
|
6280
|
+
return useMemo36(() => {
|
|
6187
6281
|
if (!id || !durationInFrames) {
|
|
6188
6282
|
return { inFrame: null, outFrame: null };
|
|
6189
6283
|
}
|
|
@@ -6202,7 +6296,7 @@ var useTimelineSetInOutFramePosition = () => {
|
|
|
6202
6296
|
};
|
|
6203
6297
|
|
|
6204
6298
|
// src/components/TimelineInOutToggle.tsx
|
|
6205
|
-
import { jsx as
|
|
6299
|
+
import { jsx as jsx59, jsxs as jsxs22, Fragment as Fragment9 } from "react/jsx-runtime";
|
|
6206
6300
|
var getTooltipText = (pointType, key) => [
|
|
6207
6301
|
`Mark ${pointType}`,
|
|
6208
6302
|
areKeyboardShortcutsDisabled() ? null : `(${key})`,
|
|
@@ -6417,26 +6511,26 @@ var TimelineInOutPointToggle = () => {
|
|
|
6417
6511
|
outMarkClick: onOutMark
|
|
6418
6512
|
};
|
|
6419
6513
|
}, [confId, onInMark, onInOutClear, onOutMark]);
|
|
6420
|
-
return /* @__PURE__ */
|
|
6514
|
+
return /* @__PURE__ */ jsxs22(Fragment9, {
|
|
6421
6515
|
children: [
|
|
6422
|
-
/* @__PURE__ */
|
|
6516
|
+
/* @__PURE__ */ jsx59(ControlButton, {
|
|
6423
6517
|
title: getTooltipText("In", "I"),
|
|
6424
6518
|
"aria-label": getTooltipText("In", "I"),
|
|
6425
6519
|
onClick: onInMark,
|
|
6426
6520
|
onContextMenu: clearInMark,
|
|
6427
6521
|
disabled: !videoConfig || isFirstFrame,
|
|
6428
|
-
children: /* @__PURE__ */
|
|
6522
|
+
children: /* @__PURE__ */ jsx59(TimelineInPointer, {
|
|
6429
6523
|
color: inFrame === null ? "white" : BLUE,
|
|
6430
6524
|
style: style3
|
|
6431
6525
|
})
|
|
6432
6526
|
}),
|
|
6433
|
-
/* @__PURE__ */
|
|
6527
|
+
/* @__PURE__ */ jsx59(ControlButton, {
|
|
6434
6528
|
title: getTooltipText("Out", "O"),
|
|
6435
6529
|
"aria-label": getTooltipText("Out", "O"),
|
|
6436
6530
|
onClick: onOutMark,
|
|
6437
6531
|
onContextMenu: clearOutMark,
|
|
6438
6532
|
disabled: !videoConfig || isLastFrame,
|
|
6439
|
-
children: /* @__PURE__ */
|
|
6533
|
+
children: /* @__PURE__ */ jsx59(TimelineOutPointer, {
|
|
6440
6534
|
color: outFrame === null ? "white" : BLUE,
|
|
6441
6535
|
style: style3
|
|
6442
6536
|
})
|
|
@@ -6445,43 +6539,6 @@ var TimelineInOutPointToggle = () => {
|
|
|
6445
6539
|
});
|
|
6446
6540
|
};
|
|
6447
6541
|
|
|
6448
|
-
// src/error-overlay/remotion-overlay/ShortcutHint.tsx
|
|
6449
|
-
import { useMemo as useMemo36 } from "react";
|
|
6450
|
-
import { jsx as jsx59, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
6451
|
-
var cmdOrCtrlCharacter = window.navigator.platform.startsWith("Mac") ? "⌘" : "Ctrl";
|
|
6452
|
-
var container14 = {
|
|
6453
|
-
display: "inline-block",
|
|
6454
|
-
marginLeft: 6,
|
|
6455
|
-
opacity: 0.6,
|
|
6456
|
-
verticalAlign: "middle",
|
|
6457
|
-
fontSize: 14
|
|
6458
|
-
};
|
|
6459
|
-
var ShortcutHint = ({ keyToPress, cmdOrCtrl }) => {
|
|
6460
|
-
const style4 = useMemo36(() => {
|
|
6461
|
-
if (keyToPress === "↵") {
|
|
6462
|
-
return {
|
|
6463
|
-
display: "inline-block",
|
|
6464
|
-
transform: `translateY(2px)`,
|
|
6465
|
-
fontSize: 14
|
|
6466
|
-
};
|
|
6467
|
-
}
|
|
6468
|
-
return {};
|
|
6469
|
-
}, [keyToPress]);
|
|
6470
|
-
if (areKeyboardShortcutsDisabled()) {
|
|
6471
|
-
return null;
|
|
6472
|
-
}
|
|
6473
|
-
return /* @__PURE__ */ jsxs22("span", {
|
|
6474
|
-
style: container14,
|
|
6475
|
-
children: [
|
|
6476
|
-
cmdOrCtrl ? `${cmdOrCtrlCharacter}` : "",
|
|
6477
|
-
/* @__PURE__ */ jsx59("span", {
|
|
6478
|
-
style: style4,
|
|
6479
|
-
children: keyToPress.toUpperCase()
|
|
6480
|
-
})
|
|
6481
|
-
]
|
|
6482
|
-
});
|
|
6483
|
-
};
|
|
6484
|
-
|
|
6485
6542
|
// src/state/editor-guides.ts
|
|
6486
6543
|
import { createContext as createContext13 } from "react";
|
|
6487
6544
|
var persistEditorShowGuidesOption = (option) => {
|
|
@@ -10833,10 +10890,7 @@ var CurrentCompositionKeybindings = ({ readOnlyStudio }) => {
|
|
|
10833
10890
|
if (!video) {
|
|
10834
10891
|
return;
|
|
10835
10892
|
}
|
|
10836
|
-
if (readOnlyStudio) {
|
|
10837
|
-
return showNotification("Studio is read-only", 2000);
|
|
10838
|
-
}
|
|
10839
|
-
if (type !== "connected") {
|
|
10893
|
+
if (type !== "connected" && !SHOW_BROWSER_RENDERING && !readOnlyStudio) {
|
|
10840
10894
|
showNotification("Studio server is offline", 2000);
|
|
10841
10895
|
return;
|
|
10842
10896
|
}
|
|
@@ -16639,7 +16693,10 @@ var ClientRenderQueueProcessor = () => {
|
|
|
16639
16693
|
onProgress: (progress) => {
|
|
16640
16694
|
onProgress(job.id, {
|
|
16641
16695
|
encodedFrames: progress.encodedFrames,
|
|
16642
|
-
totalFrames
|
|
16696
|
+
totalFrames,
|
|
16697
|
+
doneIn: progress.doneIn,
|
|
16698
|
+
renderEstimatedTime: progress.renderEstimatedTime,
|
|
16699
|
+
progress: progress.progress
|
|
16643
16700
|
});
|
|
16644
16701
|
},
|
|
16645
16702
|
outputTarget: "web-fs",
|
|
@@ -16930,8 +16987,7 @@ var RenderQueueItemStatus = ({ job }) => {
|
|
|
16930
16987
|
if (job.status === "running") {
|
|
16931
16988
|
let progressValue;
|
|
16932
16989
|
if (isClientJob) {
|
|
16933
|
-
|
|
16934
|
-
progressValue = totalFrames > 0 ? encodedFrames / totalFrames : 0;
|
|
16990
|
+
progressValue = job.progress.progress;
|
|
16935
16991
|
} else {
|
|
16936
16992
|
progressValue = job.progress.value;
|
|
16937
16993
|
}
|
|
@@ -17023,6 +17079,34 @@ var RenderQueueOutputName = ({ job }) => {
|
|
|
17023
17079
|
|
|
17024
17080
|
// src/components/RenderQueue/RenderQueueProgressMessage.tsx
|
|
17025
17081
|
import { useCallback as useCallback77, useContext as useContext43 } from "react";
|
|
17082
|
+
|
|
17083
|
+
// src/components/RenderQueue/client-render-progress.ts
|
|
17084
|
+
var formatEtaString = (timeRemainingInMilliseconds) => {
|
|
17085
|
+
const remainingTime = timeRemainingInMilliseconds / 1000;
|
|
17086
|
+
const remainingTimeHours = Math.floor(remainingTime / 3600);
|
|
17087
|
+
const remainingTimeMinutes = Math.floor(remainingTime % 3600 / 60);
|
|
17088
|
+
const remainingTimeSeconds = Math.floor(remainingTime % 60);
|
|
17089
|
+
return [
|
|
17090
|
+
remainingTimeHours ? `${remainingTimeHours}h` : null,
|
|
17091
|
+
remainingTimeMinutes ? `${remainingTimeMinutes}m` : null,
|
|
17092
|
+
`${remainingTimeSeconds}s`
|
|
17093
|
+
].filter((value) => Boolean(value)).join(" ");
|
|
17094
|
+
};
|
|
17095
|
+
var getClientRenderProgressMessage = (progress) => {
|
|
17096
|
+
if (progress.totalFrames === 0) {
|
|
17097
|
+
return "Getting composition";
|
|
17098
|
+
}
|
|
17099
|
+
if (progress.doneIn !== null) {
|
|
17100
|
+
return `Encoded ${progress.totalFrames}/${progress.totalFrames}`;
|
|
17101
|
+
}
|
|
17102
|
+
if (progress.renderEstimatedTime > 0) {
|
|
17103
|
+
const etaString = `, time remaining: ${formatEtaString(progress.renderEstimatedTime)}`;
|
|
17104
|
+
return `Rendering ${progress.encodedFrames}/${progress.totalFrames}${etaString}`;
|
|
17105
|
+
}
|
|
17106
|
+
return `Encoded ${progress.encodedFrames}/${progress.totalFrames}`;
|
|
17107
|
+
};
|
|
17108
|
+
|
|
17109
|
+
// src/components/RenderQueue/RenderQueueProgressMessage.tsx
|
|
17026
17110
|
import { jsx as jsx153 } from "react/jsx-runtime";
|
|
17027
17111
|
var outputLocation2 = {
|
|
17028
17112
|
...renderQueueItemSubtitleStyle
|
|
@@ -17040,7 +17124,7 @@ var RenderQueueProgressMessage = ({ job }) => {
|
|
|
17040
17124
|
jobId: job.id
|
|
17041
17125
|
});
|
|
17042
17126
|
}, [job.id, setSelectedModal]);
|
|
17043
|
-
const message = isClientJob ? job.progress
|
|
17127
|
+
const message = isClientJob ? getClientRenderProgressMessage(job.progress) : job.progress.message;
|
|
17044
17128
|
return /* @__PURE__ */ jsx153("button", {
|
|
17045
17129
|
onClick,
|
|
17046
17130
|
type: "button",
|
|
@@ -17159,7 +17243,8 @@ var makeRetryPayload = (job) => {
|
|
|
17159
17243
|
initialHardwareAcceleration: defaults.hardwareAcceleration,
|
|
17160
17244
|
initialChromeMode: job.chromeMode,
|
|
17161
17245
|
initialMediaCacheSizeInBytes: job.mediaCacheSizeInBytes,
|
|
17162
|
-
renderDefaults: defaults
|
|
17246
|
+
renderDefaults: defaults,
|
|
17247
|
+
readOnlyStudio: false
|
|
17163
17248
|
};
|
|
17164
17249
|
}
|
|
17165
17250
|
if (job.type === "sequence") {
|
|
@@ -17211,7 +17296,8 @@ var makeRetryPayload = (job) => {
|
|
|
17211
17296
|
initialHardwareAcceleration: defaults.hardwareAcceleration,
|
|
17212
17297
|
initialChromeMode: job.chromeMode,
|
|
17213
17298
|
initialMediaCacheSizeInBytes: job.mediaCacheSizeInBytes,
|
|
17214
|
-
renderDefaults: defaults
|
|
17299
|
+
renderDefaults: defaults,
|
|
17300
|
+
readOnlyStudio: false
|
|
17215
17301
|
};
|
|
17216
17302
|
}
|
|
17217
17303
|
if (job.type === "video") {
|
|
@@ -17263,7 +17349,8 @@ var makeRetryPayload = (job) => {
|
|
|
17263
17349
|
initialHardwareAcceleration: job.hardwareAcceleration,
|
|
17264
17350
|
initialChromeMode: job.chromeMode,
|
|
17265
17351
|
initialMediaCacheSizeInBytes: job.mediaCacheSizeInBytes,
|
|
17266
|
-
renderDefaults: defaults
|
|
17352
|
+
renderDefaults: defaults,
|
|
17353
|
+
readOnlyStudio: false
|
|
17267
17354
|
};
|
|
17268
17355
|
}
|
|
17269
17356
|
throw new Error(`Job ${JSON.stringify(job)} Not implemented`);
|
|
@@ -18156,14 +18243,6 @@ var OptionsPanel = ({ readOnlyStudio }) => {
|
|
|
18156
18243
|
import { useContext as useContext57, useEffect as useEffect60, useRef as useRef32, useState as useState62 } from "react";
|
|
18157
18244
|
import { Internals as Internals45 } from "remotion";
|
|
18158
18245
|
|
|
18159
|
-
// src/helpers/should-show-render-button.ts
|
|
18160
|
-
var shouldShowRenderButton = (readOnlyStudio) => {
|
|
18161
|
-
if (readOnlyStudio) {
|
|
18162
|
-
return SHOW_BROWSER_RENDERING;
|
|
18163
|
-
}
|
|
18164
|
-
return true;
|
|
18165
|
-
};
|
|
18166
|
-
|
|
18167
18246
|
// src/state/loop.ts
|
|
18168
18247
|
var key = "remotion.loop";
|
|
18169
18248
|
var persistLoopOption = (option) => {
|
|
@@ -19024,7 +19103,7 @@ var label7 = {
|
|
|
19024
19103
|
var RENDER_TYPE_STORAGE_KEY = "remotion.renderType";
|
|
19025
19104
|
var getInitialRenderType = (readOnlyStudio) => {
|
|
19026
19105
|
if (!SHOW_BROWSER_RENDERING) {
|
|
19027
|
-
return "server-render";
|
|
19106
|
+
return readOnlyStudio ? "render-command" : "server-render";
|
|
19028
19107
|
}
|
|
19029
19108
|
if (readOnlyStudio) {
|
|
19030
19109
|
return "client-render";
|
|
@@ -19081,8 +19160,15 @@ var RenderButton = ({
|
|
|
19081
19160
|
});
|
|
19082
19161
|
}, [refresh]);
|
|
19083
19162
|
const connectionStatus = useContext55(StudioServerConnectionCtx).previewServerState.type;
|
|
19084
|
-
const
|
|
19163
|
+
const canServerRender = connectionStatus === "connected";
|
|
19164
|
+
const canRender = canServerRender || SHOW_BROWSER_RENDERING || readOnlyStudio;
|
|
19085
19165
|
const renderType = useMemo95(() => {
|
|
19166
|
+
if (readOnlyStudio) {
|
|
19167
|
+
if (!SHOW_BROWSER_RENDERING) {
|
|
19168
|
+
return "render-command";
|
|
19169
|
+
}
|
|
19170
|
+
return preferredRenderType === "render-command" ? "render-command" : "client-render";
|
|
19171
|
+
}
|
|
19086
19172
|
if (connectionStatus === "disconnected" && SHOW_BROWSER_RENDERING) {
|
|
19087
19173
|
return "client-render";
|
|
19088
19174
|
}
|
|
@@ -19090,9 +19176,9 @@ var RenderButton = ({
|
|
|
19090
19176
|
return "server-render";
|
|
19091
19177
|
}
|
|
19092
19178
|
return preferredRenderType;
|
|
19093
|
-
}, [connectionStatus, preferredRenderType]);
|
|
19179
|
+
}, [connectionStatus, preferredRenderType, readOnlyStudio]);
|
|
19094
19180
|
const shortcut = areKeyboardShortcutsDisabled() ? "" : "(R)";
|
|
19095
|
-
const tooltip = canRender ? "Export the current composition " + shortcut : "Connect to the Studio server to render";
|
|
19181
|
+
const tooltip = renderType === "render-command" ? "Copy a CLI command to render this composition " + shortcut : canRender ? "Export the current composition " + shortcut : "Connect to the Studio server to render";
|
|
19096
19182
|
const iconStyle4 = useMemo95(() => {
|
|
19097
19183
|
return {
|
|
19098
19184
|
style: {
|
|
@@ -19104,7 +19190,7 @@ var RenderButton = ({
|
|
|
19104
19190
|
const video = Internals43.useVideo();
|
|
19105
19191
|
const getCurrentFrame2 = PlayerInternals14.useFrameImperative();
|
|
19106
19192
|
const { props } = useContext55(Internals43.EditorPropsContext);
|
|
19107
|
-
const openServerRenderModal = useCallback90(() => {
|
|
19193
|
+
const openServerRenderModal = useCallback90((copyCommandOnly) => {
|
|
19108
19194
|
if (!video) {
|
|
19109
19195
|
return null;
|
|
19110
19196
|
}
|
|
@@ -19114,6 +19200,7 @@ var RenderButton = ({
|
|
|
19114
19200
|
}
|
|
19115
19201
|
setSelectedModal({
|
|
19116
19202
|
type: "server-render",
|
|
19203
|
+
readOnlyStudio: copyCommandOnly,
|
|
19117
19204
|
compositionId: video.id,
|
|
19118
19205
|
initialFrame: getCurrentFrame2(),
|
|
19119
19206
|
initialStillImageFormat: defaults.stillImageFormat,
|
|
@@ -19197,8 +19284,12 @@ var RenderButton = ({
|
|
|
19197
19284
|
});
|
|
19198
19285
|
}, [video, setSelectedModal, getCurrentFrame2, props, inFrame, outFrame]);
|
|
19199
19286
|
const onClick = useCallback90(() => {
|
|
19287
|
+
if (renderType === "render-command") {
|
|
19288
|
+
openServerRenderModal(true);
|
|
19289
|
+
return;
|
|
19290
|
+
}
|
|
19200
19291
|
if (!SHOW_BROWSER_RENDERING || renderType === "server-render") {
|
|
19201
|
-
openServerRenderModal();
|
|
19292
|
+
openServerRenderModal(false);
|
|
19202
19293
|
} else {
|
|
19203
19294
|
openClientRenderModal();
|
|
19204
19295
|
}
|
|
@@ -19213,12 +19304,40 @@ var RenderButton = ({
|
|
|
19213
19304
|
} catch {}
|
|
19214
19305
|
setDropdownOpened(false);
|
|
19215
19306
|
if (newType === "server-render") {
|
|
19216
|
-
openServerRenderModal();
|
|
19307
|
+
openServerRenderModal(false);
|
|
19308
|
+
} else if (newType === "render-command") {
|
|
19309
|
+
openServerRenderModal(true);
|
|
19217
19310
|
} else {
|
|
19218
19311
|
openClientRenderModal();
|
|
19219
19312
|
}
|
|
19220
|
-
}, [
|
|
19313
|
+
}, [openClientRenderModal, openServerRenderModal]);
|
|
19221
19314
|
const dropdownValues = useMemo95(() => {
|
|
19315
|
+
if (readOnlyStudio) {
|
|
19316
|
+
return [
|
|
19317
|
+
{
|
|
19318
|
+
type: "item",
|
|
19319
|
+
id: "client-render",
|
|
19320
|
+
label: "Render on web",
|
|
19321
|
+
value: "client-render",
|
|
19322
|
+
onClick: () => handleRenderTypeChange("client-render"),
|
|
19323
|
+
keyHint: null,
|
|
19324
|
+
leftItem: null,
|
|
19325
|
+
subMenu: null,
|
|
19326
|
+
quickSwitcherLabel: null
|
|
19327
|
+
},
|
|
19328
|
+
{
|
|
19329
|
+
type: "item",
|
|
19330
|
+
id: "render-command",
|
|
19331
|
+
label: "Render via CLI",
|
|
19332
|
+
value: "render-command",
|
|
19333
|
+
onClick: () => handleRenderTypeChange("render-command"),
|
|
19334
|
+
keyHint: null,
|
|
19335
|
+
leftItem: null,
|
|
19336
|
+
subMenu: null,
|
|
19337
|
+
quickSwitcherLabel: null
|
|
19338
|
+
}
|
|
19339
|
+
];
|
|
19340
|
+
}
|
|
19222
19341
|
return [
|
|
19223
19342
|
{
|
|
19224
19343
|
type: "item",
|
|
@@ -19243,7 +19362,7 @@ var RenderButton = ({
|
|
|
19243
19362
|
quickSwitcherLabel: null
|
|
19244
19363
|
}
|
|
19245
19364
|
];
|
|
19246
|
-
}, [handleRenderTypeChange]);
|
|
19365
|
+
}, [handleRenderTypeChange, readOnlyStudio]);
|
|
19247
19366
|
const spaceToBottom = useMemo95(() => {
|
|
19248
19367
|
const margin2 = 10;
|
|
19249
19368
|
if (size4 && dropdownOpened) {
|
|
@@ -19285,10 +19404,10 @@ var RenderButton = ({
|
|
|
19285
19404
|
cursor: canRender ? "pointer" : "inherit"
|
|
19286
19405
|
};
|
|
19287
19406
|
}, [canRender]);
|
|
19288
|
-
const renderLabel = renderType === "server-render" ? "Render" : "Render on web";
|
|
19407
|
+
const renderLabel = renderType === "server-render" ? "Render" : renderType === "render-command" ? "Render via CLI" : "Render on web";
|
|
19289
19408
|
const shouldShowDropdown = useMemo95(() => {
|
|
19290
19409
|
if (readOnlyStudio) {
|
|
19291
|
-
return
|
|
19410
|
+
return SHOW_BROWSER_RENDERING;
|
|
19292
19411
|
}
|
|
19293
19412
|
if (!SHOW_BROWSER_RENDERING) {
|
|
19294
19413
|
return false;
|
|
@@ -19303,8 +19422,8 @@ var RenderButton = ({
|
|
|
19303
19422
|
/* @__PURE__ */ jsx177("button", {
|
|
19304
19423
|
style: { display: "none" },
|
|
19305
19424
|
id: "render-modal-button-server",
|
|
19306
|
-
disabled: !
|
|
19307
|
-
onClick: openServerRenderModal,
|
|
19425
|
+
disabled: !canServerRender,
|
|
19426
|
+
onClick: () => openServerRenderModal(false),
|
|
19308
19427
|
type: "button"
|
|
19309
19428
|
}),
|
|
19310
19429
|
" ",
|
|
@@ -19352,7 +19471,7 @@ var RenderButton = ({
|
|
|
19352
19471
|
ref: dropdownRef,
|
|
19353
19472
|
type: "button",
|
|
19354
19473
|
style: dropdownTriggerStyle,
|
|
19355
|
-
disabled: connectionStatus !== "connected",
|
|
19474
|
+
disabled: !readOnlyStudio && connectionStatus !== "connected",
|
|
19356
19475
|
className: MENU_INITIATOR_CLASSNAME,
|
|
19357
19476
|
onPointerDown,
|
|
19358
19477
|
onClick: onClickDropdown,
|
|
@@ -19691,9 +19810,9 @@ var PreviewToolbar = ({ readOnlyStudio, bufferStateDelayInMilliseconds }) => {
|
|
|
19691
19810
|
/* @__PURE__ */ jsx180(Spacing, {
|
|
19692
19811
|
x: 2
|
|
19693
19812
|
}),
|
|
19694
|
-
|
|
19813
|
+
/* @__PURE__ */ jsx180(RenderButton, {
|
|
19695
19814
|
readOnlyStudio
|
|
19696
|
-
})
|
|
19815
|
+
}),
|
|
19697
19816
|
/* @__PURE__ */ jsx180(Spacing, {
|
|
19698
19817
|
x: 1.5
|
|
19699
19818
|
})
|
|
@@ -26857,9 +26976,15 @@ var right3 = {
|
|
|
26857
26976
|
textAlign: "right",
|
|
26858
26977
|
flex: 1
|
|
26859
26978
|
};
|
|
26860
|
-
var
|
|
26861
|
-
const done =
|
|
26862
|
-
const
|
|
26979
|
+
var ProgressStatus = ({ encodedFrames, totalFrames, doneIn, renderEstimatedTime, progress }) => {
|
|
26980
|
+
const done = doneIn !== null;
|
|
26981
|
+
const message = getClientRenderProgressMessage({
|
|
26982
|
+
encodedFrames,
|
|
26983
|
+
totalFrames,
|
|
26984
|
+
doneIn,
|
|
26985
|
+
renderEstimatedTime,
|
|
26986
|
+
progress
|
|
26987
|
+
});
|
|
26863
26988
|
return /* @__PURE__ */ jsxs120("div", {
|
|
26864
26989
|
style: progressItem,
|
|
26865
26990
|
children: [
|
|
@@ -26871,8 +26996,15 @@ var EncodingProgress = ({ encodedFrames, totalFrames }) => {
|
|
|
26871
26996
|
}),
|
|
26872
26997
|
/* @__PURE__ */ jsx237("div", {
|
|
26873
26998
|
style: label10,
|
|
26874
|
-
children:
|
|
26875
|
-
})
|
|
26999
|
+
children: message
|
|
27000
|
+
}),
|
|
27001
|
+
doneIn !== null ? /* @__PURE__ */ jsxs120("div", {
|
|
27002
|
+
style: right3,
|
|
27003
|
+
children: [
|
|
27004
|
+
doneIn,
|
|
27005
|
+
"ms"
|
|
27006
|
+
]
|
|
27007
|
+
}) : null
|
|
26876
27008
|
]
|
|
26877
27009
|
});
|
|
26878
27010
|
};
|
|
@@ -26930,15 +27062,18 @@ var ClientRenderProgress = ({ job }) => {
|
|
|
26930
27062
|
]
|
|
26931
27063
|
});
|
|
26932
27064
|
}
|
|
26933
|
-
const { encodedFrames, totalFrames } = job.progress;
|
|
27065
|
+
const { encodedFrames, totalFrames, doneIn, renderEstimatedTime, progress } = job.progress;
|
|
26934
27066
|
return /* @__PURE__ */ jsxs120("div", {
|
|
26935
27067
|
children: [
|
|
26936
27068
|
/* @__PURE__ */ jsx237(Spacing, {
|
|
26937
27069
|
y: 0.5
|
|
26938
27070
|
}),
|
|
26939
|
-
job.type === "client-video" && /* @__PURE__ */ jsx237(
|
|
27071
|
+
job.type === "client-video" && /* @__PURE__ */ jsx237(ProgressStatus, {
|
|
26940
27072
|
encodedFrames,
|
|
26941
|
-
totalFrames
|
|
27073
|
+
totalFrames,
|
|
27074
|
+
doneIn,
|
|
27075
|
+
renderEstimatedTime,
|
|
27076
|
+
progress
|
|
26942
27077
|
}),
|
|
26943
27078
|
/* @__PURE__ */ jsx237(Spacing, {
|
|
26944
27079
|
y: 1
|
|
@@ -27296,7 +27431,7 @@ var RenderStatusModal = ({
|
|
|
27296
27431
|
};
|
|
27297
27432
|
|
|
27298
27433
|
// src/components/RenderModal/ServerRenderModal.tsx
|
|
27299
|
-
import { BrowserSafeApis as
|
|
27434
|
+
import { BrowserSafeApis as BrowserSafeApis11 } from "@remotion/renderer/client";
|
|
27300
27435
|
import { getDefaultOutLocation } from "@remotion/studio-shared";
|
|
27301
27436
|
import {
|
|
27302
27437
|
useCallback as useCallback136,
|
|
@@ -27322,6 +27457,252 @@ var envVariablesArrayToObject = (envVariables) => {
|
|
|
27322
27457
|
}, {});
|
|
27323
27458
|
};
|
|
27324
27459
|
|
|
27460
|
+
// src/helpers/make-render-command.ts
|
|
27461
|
+
import { BrowserSafeApis } from "@remotion/renderer/client";
|
|
27462
|
+
var shellQuote = (value) => {
|
|
27463
|
+
return `'${value.replace(/'/g, "'\\''")}'`;
|
|
27464
|
+
};
|
|
27465
|
+
var addFlagWithValue = (flags, flag, value) => {
|
|
27466
|
+
if (value === null || value === undefined) {
|
|
27467
|
+
return;
|
|
27468
|
+
}
|
|
27469
|
+
flags.push(`--${flag}=${shellQuote(String(value))}`);
|
|
27470
|
+
};
|
|
27471
|
+
var addBooleanFlag = (flags, flag, value) => {
|
|
27472
|
+
if (value) {
|
|
27473
|
+
flags.push(`--${flag}`);
|
|
27474
|
+
}
|
|
27475
|
+
};
|
|
27476
|
+
var valueFlag = (flag, value, defaultValue) => {
|
|
27477
|
+
return { flag, value, defaultValue };
|
|
27478
|
+
};
|
|
27479
|
+
var booleanFlag = (flag, value, defaultValue) => {
|
|
27480
|
+
return { flag, value, defaultValue };
|
|
27481
|
+
};
|
|
27482
|
+
var addValueFlagsIfChanged = (flags, mappings) => {
|
|
27483
|
+
for (const mapping of mappings) {
|
|
27484
|
+
if (mapping.value !== mapping.defaultValue) {
|
|
27485
|
+
addFlagWithValue(flags, mapping.flag, mapping.value);
|
|
27486
|
+
}
|
|
27487
|
+
}
|
|
27488
|
+
};
|
|
27489
|
+
var addTrueBooleanFlagsIfChanged = (flags, mappings) => {
|
|
27490
|
+
for (const mapping of mappings) {
|
|
27491
|
+
if (mapping.value && mapping.value !== mapping.defaultValue) {
|
|
27492
|
+
addBooleanFlag(flags, mapping.flag, true);
|
|
27493
|
+
}
|
|
27494
|
+
}
|
|
27495
|
+
};
|
|
27496
|
+
var getNpmRemotionCommandPrefix = (version) => {
|
|
27497
|
+
return version.trim() === "" ? "bunx --yes --location=global -p @remotion/cli remotion" : `bunx --yes --location=global -p @remotion/cli@${version} remotion`;
|
|
27498
|
+
};
|
|
27499
|
+
var normalizeServeUrlForRenderCommand = ({
|
|
27500
|
+
locationHref,
|
|
27501
|
+
compositionId
|
|
27502
|
+
}) => {
|
|
27503
|
+
const parsed = new URL(locationHref);
|
|
27504
|
+
parsed.hash = "";
|
|
27505
|
+
parsed.search = "";
|
|
27506
|
+
const suffix2 = `/${compositionId}`;
|
|
27507
|
+
if (parsed.pathname === suffix2) {
|
|
27508
|
+
parsed.pathname = "/";
|
|
27509
|
+
} else if (parsed.pathname.endsWith(suffix2)) {
|
|
27510
|
+
const basePath = parsed.pathname.slice(0, -suffix2.length);
|
|
27511
|
+
parsed.pathname = basePath === "" ? "/" : basePath;
|
|
27512
|
+
}
|
|
27513
|
+
if (parsed.pathname !== "/" && parsed.pathname.endsWith("/")) {
|
|
27514
|
+
parsed.pathname = parsed.pathname.slice(0, -1);
|
|
27515
|
+
}
|
|
27516
|
+
return `${parsed.origin}${parsed.pathname === "/" ? "" : parsed.pathname}`;
|
|
27517
|
+
};
|
|
27518
|
+
var trimDefaultOutPrefix = (outName) => {
|
|
27519
|
+
if (outName.startsWith("out/")) {
|
|
27520
|
+
const trimmed = outName.slice("out/".length);
|
|
27521
|
+
return trimmed.length === 0 ? outName : trimmed;
|
|
27522
|
+
}
|
|
27523
|
+
if (outName.startsWith("./out/")) {
|
|
27524
|
+
const trimmed = outName.slice("./out/".length);
|
|
27525
|
+
return trimmed.length === 0 ? outName : trimmed;
|
|
27526
|
+
}
|
|
27527
|
+
return outName;
|
|
27528
|
+
};
|
|
27529
|
+
var getRenderMediaFlag = (option) => {
|
|
27530
|
+
return BrowserSafeApis.optionsMap.renderMedia[option].cliFlag;
|
|
27531
|
+
};
|
|
27532
|
+
var renderMediaValueFlag = (option, value, defaultValue) => {
|
|
27533
|
+
return valueFlag(getRenderMediaFlag(option), value, defaultValue);
|
|
27534
|
+
};
|
|
27535
|
+
var renderMediaBooleanFlag = (option, value, defaultValue) => {
|
|
27536
|
+
return booleanFlag(getRenderMediaFlag(option), value, defaultValue);
|
|
27537
|
+
};
|
|
27538
|
+
var makeReadOnlyStudioRenderCommand = ({
|
|
27539
|
+
remotionVersion,
|
|
27540
|
+
locationHref,
|
|
27541
|
+
compositionId,
|
|
27542
|
+
outName,
|
|
27543
|
+
renderMode,
|
|
27544
|
+
renderDefaults,
|
|
27545
|
+
durationInFrames,
|
|
27546
|
+
concurrency,
|
|
27547
|
+
frame: frame2,
|
|
27548
|
+
startFrame,
|
|
27549
|
+
endFrame,
|
|
27550
|
+
stillImageFormat,
|
|
27551
|
+
sequenceImageFormat,
|
|
27552
|
+
videoImageFormat,
|
|
27553
|
+
jpegQuality,
|
|
27554
|
+
codec,
|
|
27555
|
+
muted,
|
|
27556
|
+
enforceAudioTrack,
|
|
27557
|
+
proResProfile,
|
|
27558
|
+
x264Preset,
|
|
27559
|
+
pixelFormat,
|
|
27560
|
+
crf,
|
|
27561
|
+
videoBitrate,
|
|
27562
|
+
audioBitrate,
|
|
27563
|
+
audioCodec,
|
|
27564
|
+
everyNthFrame,
|
|
27565
|
+
numberOfGifLoops,
|
|
27566
|
+
disallowParallelEncoding,
|
|
27567
|
+
encodingBufferSize,
|
|
27568
|
+
encodingMaxRate,
|
|
27569
|
+
forSeamlessAacConcatenation,
|
|
27570
|
+
separateAudioTo,
|
|
27571
|
+
colorSpace,
|
|
27572
|
+
scale,
|
|
27573
|
+
logLevel,
|
|
27574
|
+
delayRenderTimeout,
|
|
27575
|
+
hardwareAcceleration,
|
|
27576
|
+
chromeMode,
|
|
27577
|
+
headless,
|
|
27578
|
+
disableWebSecurity,
|
|
27579
|
+
ignoreCertificateErrors,
|
|
27580
|
+
gl,
|
|
27581
|
+
userAgent,
|
|
27582
|
+
multiProcessOnLinux,
|
|
27583
|
+
darkMode,
|
|
27584
|
+
offthreadVideoCacheSizeInBytes,
|
|
27585
|
+
offthreadVideoThreads,
|
|
27586
|
+
mediaCacheSizeInBytes,
|
|
27587
|
+
beepOnFinish,
|
|
27588
|
+
repro,
|
|
27589
|
+
metadata,
|
|
27590
|
+
envVariables,
|
|
27591
|
+
inputProps
|
|
27592
|
+
}) => {
|
|
27593
|
+
const serveUrl = normalizeServeUrlForRenderCommand({
|
|
27594
|
+
locationHref,
|
|
27595
|
+
compositionId
|
|
27596
|
+
});
|
|
27597
|
+
const isStillRender = renderMode === "still";
|
|
27598
|
+
const isSequenceRender = renderMode === "sequence";
|
|
27599
|
+
const hasCodecSpecificOptions = !isSequenceRender;
|
|
27600
|
+
const commandType = isStillRender ? "still" : "render";
|
|
27601
|
+
const command = getNpmRemotionCommandPrefix(remotionVersion);
|
|
27602
|
+
const { options } = BrowserSafeApis;
|
|
27603
|
+
const flags = [];
|
|
27604
|
+
addValueFlagsIfChanged(flags, [
|
|
27605
|
+
valueFlag(options.scaleOption.cliFlag, scale, renderDefaults.scale),
|
|
27606
|
+
renderMediaValueFlag("logLevel", logLevel, renderDefaults.logLevel),
|
|
27607
|
+
renderMediaValueFlag("timeoutInMilliseconds", delayRenderTimeout, renderDefaults.delayRenderTimeout),
|
|
27608
|
+
renderMediaValueFlag("chromeMode", chromeMode, renderDefaults.chromeMode),
|
|
27609
|
+
valueFlag(options.glOption.cliFlag, gl, renderDefaults.openGlRenderer),
|
|
27610
|
+
valueFlag(options.userAgentOption.cliFlag, userAgent, renderDefaults.userAgent),
|
|
27611
|
+
renderMediaValueFlag("offthreadVideoCacheSizeInBytes", offthreadVideoCacheSizeInBytes, renderDefaults.offthreadVideoCacheSizeInBytes),
|
|
27612
|
+
renderMediaValueFlag("offthreadVideoThreads", offthreadVideoThreads, renderDefaults.offthreadVideoThreads),
|
|
27613
|
+
renderMediaValueFlag("mediaCacheSizeInBytes", mediaCacheSizeInBytes, renderDefaults.mediaCacheSizeInBytes)
|
|
27614
|
+
]);
|
|
27615
|
+
if (headless !== renderDefaults.headless) {
|
|
27616
|
+
addFlagWithValue(flags, options.headlessOption.cliFlag, !headless);
|
|
27617
|
+
}
|
|
27618
|
+
addTrueBooleanFlagsIfChanged(flags, [
|
|
27619
|
+
booleanFlag(options.disableWebSecurityOption.cliFlag, disableWebSecurity, renderDefaults.disableWebSecurity),
|
|
27620
|
+
booleanFlag(options.ignoreCertificateErrorsOption.cliFlag, ignoreCertificateErrors, renderDefaults.ignoreCertificateErrors),
|
|
27621
|
+
booleanFlag(options.enableMultiprocessOnLinuxOption.cliFlag, multiProcessOnLinux, renderDefaults.multiProcessOnLinux),
|
|
27622
|
+
booleanFlag(options.darkModeOption.cliFlag, darkMode, renderDefaults.darkMode),
|
|
27623
|
+
booleanFlag(options.beepOnFinishOption.cliFlag, beepOnFinish, renderDefaults.beepOnFinish)
|
|
27624
|
+
]);
|
|
27625
|
+
if (isStillRender) {
|
|
27626
|
+
addValueFlagsIfChanged(flags, [
|
|
27627
|
+
valueFlag(options.stillFrameOption.cliFlag, frame2, 0),
|
|
27628
|
+
valueFlag(options.stillImageFormatOption.cliFlag, stillImageFormat, renderDefaults.stillImageFormat),
|
|
27629
|
+
valueFlag(options.jpegQualityOption.cliFlag, jpegQuality, renderDefaults.jpegQuality)
|
|
27630
|
+
]);
|
|
27631
|
+
} else {
|
|
27632
|
+
addValueFlagsIfChanged(flags, [
|
|
27633
|
+
valueFlag(options.concurrencyOption.cliFlag, concurrency, renderDefaults.concurrency)
|
|
27634
|
+
]);
|
|
27635
|
+
if (isSequenceRender) {
|
|
27636
|
+
addBooleanFlag(flags, options.imageSequenceOption.cliFlag, true);
|
|
27637
|
+
if (sequenceImageFormat !== "jpeg") {
|
|
27638
|
+
addFlagWithValue(flags, options.videoImageFormatOption.cliFlag, sequenceImageFormat);
|
|
27639
|
+
}
|
|
27640
|
+
} else {
|
|
27641
|
+
addValueFlagsIfChanged(flags, [
|
|
27642
|
+
valueFlag(options.videoImageFormatOption.cliFlag, videoImageFormat, renderDefaults.videoImageFormat),
|
|
27643
|
+
renderMediaValueFlag("hardwareAcceleration", hardwareAcceleration, renderDefaults.hardwareAcceleration)
|
|
27644
|
+
]);
|
|
27645
|
+
}
|
|
27646
|
+
if (hasCodecSpecificOptions && codec !== renderDefaults.codec) {
|
|
27647
|
+
addFlagWithValue(flags, getRenderMediaFlag("codec"), codec);
|
|
27648
|
+
}
|
|
27649
|
+
if (startFrame !== 0 || endFrame !== durationInFrames - 1) {
|
|
27650
|
+
addFlagWithValue(flags, options.framesOption.cliFlag, `${startFrame}-${endFrame}`);
|
|
27651
|
+
}
|
|
27652
|
+
if (hasCodecSpecificOptions) {
|
|
27653
|
+
addTrueBooleanFlagsIfChanged(flags, [
|
|
27654
|
+
renderMediaBooleanFlag("muted", muted, renderDefaults.muted),
|
|
27655
|
+
booleanFlag(options.enforceAudioOption.cliFlag, enforceAudioTrack, renderDefaults.enforceAudioTrack),
|
|
27656
|
+
renderMediaBooleanFlag("forSeamlessAacConcatenation", forSeamlessAacConcatenation, renderDefaults.forSeamlessAacConcatenation)
|
|
27657
|
+
]);
|
|
27658
|
+
addValueFlagsIfChanged(flags, [
|
|
27659
|
+
valueFlag(options.pixelFormatOption.cliFlag, pixelFormat, renderDefaults.pixelFormat),
|
|
27660
|
+
renderMediaValueFlag("colorSpace", colorSpace, renderDefaults.colorSpace),
|
|
27661
|
+
valueFlag(options.proResProfileOption.cliFlag, proResProfile, renderDefaults.proResProfile),
|
|
27662
|
+
renderMediaValueFlag("x264Preset", x264Preset, renderDefaults.x264Preset),
|
|
27663
|
+
valueFlag(options.crfOption.cliFlag, crf, null),
|
|
27664
|
+
valueFlag(options.jpegQualityOption.cliFlag, jpegQuality, renderDefaults.jpegQuality),
|
|
27665
|
+
renderMediaValueFlag("videoBitrate", videoBitrate, renderDefaults.videoBitrate),
|
|
27666
|
+
renderMediaValueFlag("audioBitrate", audioBitrate, renderDefaults.audioBitrate),
|
|
27667
|
+
valueFlag(options.everyNthFrameOption.cliFlag, everyNthFrame, renderDefaults.everyNthFrame),
|
|
27668
|
+
renderMediaValueFlag("numberOfGifLoops", numberOfGifLoops, renderDefaults.numberOfGifLoops),
|
|
27669
|
+
renderMediaValueFlag("encodingBufferSize", encodingBufferSize, renderDefaults.encodingBufferSize),
|
|
27670
|
+
renderMediaValueFlag("encodingMaxRate", encodingMaxRate, renderDefaults.encodingMaxRate),
|
|
27671
|
+
renderMediaValueFlag("separateAudioTo", separateAudioTo, null)
|
|
27672
|
+
]);
|
|
27673
|
+
const defaultAudioCodec = BrowserSafeApis.defaultAudioCodecs[codec]?.compressed;
|
|
27674
|
+
if (audioCodec !== defaultAudioCodec) {
|
|
27675
|
+
addFlagWithValue(flags, getRenderMediaFlag("audioCodec"), audioCodec);
|
|
27676
|
+
}
|
|
27677
|
+
}
|
|
27678
|
+
addTrueBooleanFlagsIfChanged(flags, [
|
|
27679
|
+
renderMediaBooleanFlag("disallowParallelEncoding", disallowParallelEncoding, false),
|
|
27680
|
+
renderMediaBooleanFlag("repro", repro, renderDefaults.repro)
|
|
27681
|
+
]);
|
|
27682
|
+
}
|
|
27683
|
+
if (metadata) {
|
|
27684
|
+
for (const [key5, value] of Object.entries(metadata)) {
|
|
27685
|
+
addFlagWithValue(flags, options.metadataOption.cliFlag, `${key5}=${value}`);
|
|
27686
|
+
}
|
|
27687
|
+
}
|
|
27688
|
+
if (Object.keys(inputProps).length > 0) {
|
|
27689
|
+
addFlagWithValue(flags, options.propsOption.cliFlag, JSON.stringify(inputProps));
|
|
27690
|
+
}
|
|
27691
|
+
const envArgs = Object.entries(envVariables).sort(([a], [b]) => a.localeCompare(b)).map(([key5, value]) => shellQuote(`${key5}=${value}`));
|
|
27692
|
+
const renderCommand = [
|
|
27693
|
+
command,
|
|
27694
|
+
commandType,
|
|
27695
|
+
shellQuote(serveUrl),
|
|
27696
|
+
shellQuote(compositionId),
|
|
27697
|
+
shellQuote(trimDefaultOutPrefix(outName)),
|
|
27698
|
+
...flags
|
|
27699
|
+
].join(" ");
|
|
27700
|
+
if (envArgs.length === 0) {
|
|
27701
|
+
return renderCommand;
|
|
27702
|
+
}
|
|
27703
|
+
return ["env", ...envArgs, renderCommand].join(" ");
|
|
27704
|
+
};
|
|
27705
|
+
|
|
27325
27706
|
// src/helpers/render-modal-sections.ts
|
|
27326
27707
|
import { useMemo as useMemo128, useState as useState83 } from "react";
|
|
27327
27708
|
var useRenderModalSections = (renderMode, codec) => {
|
|
@@ -27463,14 +27844,14 @@ var VerticalTab = ({ children, onClick, style: style12, selected }) => {
|
|
|
27463
27844
|
};
|
|
27464
27845
|
|
|
27465
27846
|
// src/components/RenderModal/CrfSetting.tsx
|
|
27466
|
-
import { BrowserSafeApis as
|
|
27847
|
+
import { BrowserSafeApis as BrowserSafeApis3 } from "@remotion/renderer/client";
|
|
27467
27848
|
import { useState as useState86 } from "react";
|
|
27468
27849
|
|
|
27469
27850
|
// src/components/RenderModal/NumberSetting.tsx
|
|
27470
27851
|
import { useCallback as useCallback121 } from "react";
|
|
27471
27852
|
|
|
27472
27853
|
// src/components/RenderModal/OptionExplainerBubble.tsx
|
|
27473
|
-
import { BrowserSafeApis } from "@remotion/renderer/client";
|
|
27854
|
+
import { BrowserSafeApis as BrowserSafeApis2 } from "@remotion/renderer/client";
|
|
27474
27855
|
|
|
27475
27856
|
// src/components/RenderModal/CliCopyButton.tsx
|
|
27476
27857
|
import { useCallback as useCallback120, useEffect as useEffect83, useMemo as useMemo130, useState as useState85 } from "react";
|
|
@@ -27697,7 +28078,7 @@ var OptionExplainer = ({ option }) => {
|
|
|
27697
28078
|
// src/components/RenderModal/OptionExplainerBubble.tsx
|
|
27698
28079
|
import { jsx as jsx248 } from "react/jsx-runtime";
|
|
27699
28080
|
var OptionExplainerBubble = ({ id }) => {
|
|
27700
|
-
const option =
|
|
28081
|
+
const option = BrowserSafeApis2.options[id];
|
|
27701
28082
|
return /* @__PURE__ */ jsx248(InfoBubble, {
|
|
27702
28083
|
title: "Learn more about this option",
|
|
27703
28084
|
children: /* @__PURE__ */ jsx248(OptionExplainer, {
|
|
@@ -27765,8 +28146,8 @@ var NumberSetting = ({ name, value, step, hint, onValueChanged, max, min, format
|
|
|
27765
28146
|
// src/components/RenderModal/CrfSetting.tsx
|
|
27766
28147
|
import { jsx as jsx250 } from "react/jsx-runtime";
|
|
27767
28148
|
var getDefaultCrfState = () => {
|
|
27768
|
-
return
|
|
27769
|
-
return [c,
|
|
28149
|
+
return BrowserSafeApis3.validCodecs.map((c) => {
|
|
28150
|
+
return [c, BrowserSafeApis3.getDefaultCrfForCodec(c)];
|
|
27770
28151
|
}).reduce((acc, [codec, crf]) => {
|
|
27771
28152
|
return {
|
|
27772
28153
|
...acc,
|
|
@@ -27776,7 +28157,7 @@ var getDefaultCrfState = () => {
|
|
|
27776
28157
|
};
|
|
27777
28158
|
var useCrfState = (codec) => {
|
|
27778
28159
|
const [state, setState] = useState86(() => getDefaultCrfState());
|
|
27779
|
-
const range =
|
|
28160
|
+
const range = BrowserSafeApis3.getValidCrfRanges(codec);
|
|
27780
28161
|
const setCrf = (updater) => {
|
|
27781
28162
|
setState((q) => {
|
|
27782
28163
|
const val = q[codec];
|
|
@@ -27809,7 +28190,7 @@ var CrfSetting = ({ crf, setCrf, min, max, option }) => {
|
|
|
27809
28190
|
};
|
|
27810
28191
|
|
|
27811
28192
|
// src/components/RenderModal/get-default-codecs.ts
|
|
27812
|
-
import { BrowserSafeApis as
|
|
28193
|
+
import { BrowserSafeApis as BrowserSafeApis4 } from "@remotion/renderer/client";
|
|
27813
28194
|
import { NoReactAPIs } from "@remotion/renderer/pure";
|
|
27814
28195
|
var getDefaultCodecs = ({
|
|
27815
28196
|
defaultConfigurationVideoCodec,
|
|
@@ -27829,7 +28210,7 @@ var getDefaultCodecs = ({
|
|
|
27829
28210
|
initialVideoCodecForVideoTab: NoReactAPIs.isAudioCodec(defaultConfigurationVideoCodec) ? "h264" : defaultConfigurationVideoCodec
|
|
27830
28211
|
};
|
|
27831
28212
|
}
|
|
27832
|
-
const suitableAudioCodecForVideoCodec =
|
|
28213
|
+
const suitableAudioCodecForVideoCodec = BrowserSafeApis4.defaultAudioCodecs[userPreferredVideoCodec].compressed;
|
|
27833
28214
|
return {
|
|
27834
28215
|
initialAudioCodec: defaultConfigurationAudioCodec ?? suitableAudioCodecForVideoCodec,
|
|
27835
28216
|
initialVideoCodec: userPreferredVideoCodec,
|
|
@@ -27849,7 +28230,7 @@ var getStringBeforeSuffix = (fileName) => {
|
|
|
27849
28230
|
};
|
|
27850
28231
|
|
|
27851
28232
|
// src/components/RenderModal/out-name-checker.ts
|
|
27852
|
-
import { BrowserSafeApis as
|
|
28233
|
+
import { BrowserSafeApis as BrowserSafeApis5 } from "@remotion/renderer/client";
|
|
27853
28234
|
var invalidCharacters = ["?", "*", "+", ":", "%"];
|
|
27854
28235
|
var isValidStillExtension = (extension, stillImageFormat) => {
|
|
27855
28236
|
if (stillImageFormat === "jpeg" && extension === "jpg") {
|
|
@@ -27889,8 +28270,8 @@ var isValidOutName = ({
|
|
|
27889
28270
|
}) => {
|
|
27890
28271
|
const extension = outName.substring(outName.lastIndexOf(".") + 1);
|
|
27891
28272
|
const prefix = outName.substring(0, outName.lastIndexOf("."));
|
|
27892
|
-
const map =
|
|
27893
|
-
if (
|
|
28273
|
+
const map = BrowserSafeApis5.defaultFileExtensionMap[codec];
|
|
28274
|
+
if (BrowserSafeApis5.supportedAudioCodecs[codec].length > 0 && !(audioCodec in map.forAudioCodec)) {
|
|
27894
28275
|
throw new Error(`Audio codec ${audioCodec} is not supported for codec ${codec}`);
|
|
27895
28276
|
}
|
|
27896
28277
|
const hasDotAfterSlash = () => {
|
|
@@ -27906,7 +28287,7 @@ var isValidOutName = ({
|
|
|
27906
28287
|
return prefix.split("").some((char) => invalidCharacters.includes(char));
|
|
27907
28288
|
};
|
|
27908
28289
|
if (renderMode === "video" || renderMode === "audio") {
|
|
27909
|
-
|
|
28290
|
+
BrowserSafeApis5.validateOutputFilename({
|
|
27910
28291
|
codec,
|
|
27911
28292
|
audioCodecSetting: audioCodec ?? null,
|
|
27912
28293
|
extension,
|
|
@@ -27994,7 +28375,7 @@ var flexer = {
|
|
|
27994
28375
|
};
|
|
27995
28376
|
|
|
27996
28377
|
// src/components/RenderModal/RenderModalAdvanced.tsx
|
|
27997
|
-
import { BrowserSafeApis as
|
|
28378
|
+
import { BrowserSafeApis as BrowserSafeApis6 } from "@remotion/renderer/client";
|
|
27998
28379
|
import { useCallback as useCallback125, useMemo as useMemo131 } from "react";
|
|
27999
28380
|
|
|
28000
28381
|
// src/helpers/presets-labels.ts
|
|
@@ -28427,7 +28808,7 @@ var RenderModalAdvanced = ({
|
|
|
28427
28808
|
});
|
|
28428
28809
|
}, [extendedOpenGlOptions, openGlOption, setOpenGlOption]);
|
|
28429
28810
|
const chromeModeOptions = useMemo131(() => {
|
|
28430
|
-
return
|
|
28811
|
+
return BrowserSafeApis6.validChromeModeOptions.map((option) => {
|
|
28431
28812
|
return {
|
|
28432
28813
|
label: option,
|
|
28433
28814
|
onClick: () => setChromeModeOption(option),
|
|
@@ -28443,7 +28824,7 @@ var RenderModalAdvanced = ({
|
|
|
28443
28824
|
});
|
|
28444
28825
|
}, [chromeModeOption, setChromeModeOption]);
|
|
28445
28826
|
const x264PresetOptions = useMemo131(() => {
|
|
28446
|
-
return
|
|
28827
|
+
return BrowserSafeApis6.x264PresetOptions.map((option) => {
|
|
28447
28828
|
return {
|
|
28448
28829
|
label: labelx264Preset(option),
|
|
28449
28830
|
onClick: () => setx264Preset(option),
|
|
@@ -28459,7 +28840,7 @@ var RenderModalAdvanced = ({
|
|
|
28459
28840
|
});
|
|
28460
28841
|
}, [setx264Preset, x264Preset]);
|
|
28461
28842
|
const hardwareAccelerationValues = useMemo131(() => {
|
|
28462
|
-
return
|
|
28843
|
+
return BrowserSafeApis6.hardwareAccelerationOptions.map((option) => {
|
|
28463
28844
|
return {
|
|
28464
28845
|
label: option,
|
|
28465
28846
|
onClick: () => setHardwareAcceleration(option),
|
|
@@ -28950,7 +29331,7 @@ var RenderModalAdvanced = ({
|
|
|
28950
29331
|
};
|
|
28951
29332
|
|
|
28952
29333
|
// src/components/RenderModal/RenderModalAudio.tsx
|
|
28953
|
-
import { BrowserSafeApis as
|
|
29334
|
+
import { BrowserSafeApis as BrowserSafeApis8 } from "@remotion/renderer/client";
|
|
28954
29335
|
import { useCallback as useCallback129 } from "react";
|
|
28955
29336
|
|
|
28956
29337
|
// src/components/RenderModal/EnforceAudioTrackSetting.tsx
|
|
@@ -29043,7 +29424,7 @@ var MutedSetting = ({ muted, setMuted, enforceAudioTrack }) => {
|
|
|
29043
29424
|
};
|
|
29044
29425
|
|
|
29045
29426
|
// src/components/RenderModal/SeparateAudioOption.tsx
|
|
29046
|
-
import { BrowserSafeApis as
|
|
29427
|
+
import { BrowserSafeApis as BrowserSafeApis7 } from "@remotion/renderer/client";
|
|
29047
29428
|
import { useCallback as useCallback128, useMemo as useMemo132 } from "react";
|
|
29048
29429
|
|
|
29049
29430
|
// src/helpers/use-file-existence.ts
|
|
@@ -29178,7 +29559,7 @@ var SeparateAudioOptionInput = ({ separateAudioTo, setSeparateAudioTo, audioCode
|
|
|
29178
29559
|
setSeparateAudioTo(e.target.value);
|
|
29179
29560
|
}, [setSeparateAudioTo]);
|
|
29180
29561
|
const validationMessage = useMemo132(() => {
|
|
29181
|
-
const expectedExtension =
|
|
29562
|
+
const expectedExtension = BrowserSafeApis7.getExtensionFromAudioCodec(audioCodec);
|
|
29182
29563
|
const actualExtension = separateAudioTo.split(".").pop();
|
|
29183
29564
|
if (actualExtension !== expectedExtension) {
|
|
29184
29565
|
return `Expected extension: .${expectedExtension}`;
|
|
@@ -29197,7 +29578,7 @@ var SeparateAudioOptionInput = ({ separateAudioTo, setSeparateAudioTo, audioCode
|
|
|
29197
29578
|
var SeparateAudioOption = ({ separateAudioTo, setSeparateAudioTo, audioCodec, outName }) => {
|
|
29198
29579
|
const onSeparateAudioChange = useCallback128((e) => {
|
|
29199
29580
|
if (e.target.checked) {
|
|
29200
|
-
const extension =
|
|
29581
|
+
const extension = BrowserSafeApis7.getExtensionFromAudioCodec(audioCodec);
|
|
29201
29582
|
setSeparateAudioTo(`${getStringBeforeSuffix(outName)}.${extension}`);
|
|
29202
29583
|
} else {
|
|
29203
29584
|
setSeparateAudioTo(null);
|
|
@@ -29275,7 +29656,7 @@ var RenderModalAudio = ({
|
|
|
29275
29656
|
setForSeamlessAacConcatenation(e.target.checked);
|
|
29276
29657
|
}, [setForSeamlessAacConcatenation]);
|
|
29277
29658
|
const audioCodecOptions = useCallback129((currentCodec) => {
|
|
29278
|
-
return
|
|
29659
|
+
return BrowserSafeApis8.supportedAudioCodecs[currentCodec].map((audioCodecOption) => {
|
|
29279
29660
|
return {
|
|
29280
29661
|
label: humanReadableAudioCodec(audioCodecOption),
|
|
29281
29662
|
onClick: () => setAudioCodec(audioCodecOption),
|
|
@@ -29420,7 +29801,7 @@ var RenderModalAudio = ({
|
|
|
29420
29801
|
};
|
|
29421
29802
|
|
|
29422
29803
|
// src/components/RenderModal/RenderModalBasic.tsx
|
|
29423
|
-
import { BrowserSafeApis as
|
|
29804
|
+
import { BrowserSafeApis as BrowserSafeApis9 } from "@remotion/renderer/client";
|
|
29424
29805
|
import { NoReactAPIs as NoReactAPIs2 } from "@remotion/renderer/pure";
|
|
29425
29806
|
import { useCallback as useCallback132, useMemo as useMemo134 } from "react";
|
|
29426
29807
|
|
|
@@ -29681,11 +30062,12 @@ var RenderModalBasic = ({
|
|
|
29681
30062
|
startFrame,
|
|
29682
30063
|
validationMessage,
|
|
29683
30064
|
setVerboseLogging,
|
|
29684
|
-
logLevel
|
|
30065
|
+
logLevel,
|
|
30066
|
+
showOutputName
|
|
29685
30067
|
}) => {
|
|
29686
30068
|
const existence = useFileExistence(outName);
|
|
29687
30069
|
const videoCodecOptions = useMemo134(() => {
|
|
29688
|
-
return
|
|
30070
|
+
return BrowserSafeApis9.validCodecs.filter((c) => {
|
|
29689
30071
|
return NoReactAPIs2.isAudioCodec(c) === (renderMode === "audio");
|
|
29690
30072
|
}).map((codecOption) => {
|
|
29691
30073
|
return {
|
|
@@ -29703,7 +30085,7 @@ var RenderModalBasic = ({
|
|
|
29703
30085
|
});
|
|
29704
30086
|
}, [renderMode, setCodec, codec]);
|
|
29705
30087
|
const proResProfileOptions = useMemo134(() => {
|
|
29706
|
-
return
|
|
30088
|
+
return BrowserSafeApis9.proResProfileOptions.map((option) => {
|
|
29707
30089
|
return {
|
|
29708
30090
|
label: labelProResProfile(option),
|
|
29709
30091
|
onClick: () => setProResProfile(option),
|
|
@@ -29842,14 +30224,14 @@ var RenderModalBasic = ({
|
|
|
29842
30224
|
setStartFrame,
|
|
29843
30225
|
startFrame
|
|
29844
30226
|
}),
|
|
29845
|
-
/* @__PURE__ */ jsx263(RenderModalOutputName, {
|
|
30227
|
+
showOutputName ? /* @__PURE__ */ jsx263(RenderModalOutputName, {
|
|
29846
30228
|
existence,
|
|
29847
30229
|
inputStyle: input,
|
|
29848
30230
|
outName,
|
|
29849
30231
|
onValueChange,
|
|
29850
30232
|
validationMessage,
|
|
29851
30233
|
label: renderMode === "sequence" ? "Folder name" : "Output name"
|
|
29852
|
-
}),
|
|
30234
|
+
}) : null,
|
|
29853
30235
|
/* @__PURE__ */ jsxs135("div", {
|
|
29854
30236
|
style: optionRow,
|
|
29855
30237
|
children: [
|
|
@@ -29987,7 +30369,7 @@ var RenderModalGif = ({
|
|
|
29987
30369
|
};
|
|
29988
30370
|
|
|
29989
30371
|
// src/components/RenderModal/RenderModalPicture.tsx
|
|
29990
|
-
import { BrowserSafeApis as
|
|
30372
|
+
import { BrowserSafeApis as BrowserSafeApis10 } from "@remotion/renderer/client";
|
|
29991
30373
|
import { useCallback as useCallback135, useMemo as useMemo136 } from "react";
|
|
29992
30374
|
|
|
29993
30375
|
// src/components/RenderModal/JpegQualitySetting.tsx
|
|
@@ -30091,7 +30473,7 @@ var RenderModalPicture = ({
|
|
|
30091
30473
|
compositionHeight
|
|
30092
30474
|
}) => {
|
|
30093
30475
|
const colorSpaceOptions = useMemo136(() => {
|
|
30094
|
-
return
|
|
30476
|
+
return BrowserSafeApis10.validColorSpaces.map((option) => {
|
|
30095
30477
|
return {
|
|
30096
30478
|
label: option,
|
|
30097
30479
|
onClick: () => setColorSpace(option),
|
|
@@ -30384,6 +30766,7 @@ var reducer2 = (state, action) => {
|
|
|
30384
30766
|
return state;
|
|
30385
30767
|
};
|
|
30386
30768
|
var RenderModal = ({
|
|
30769
|
+
readOnlyStudio,
|
|
30387
30770
|
initialFrame,
|
|
30388
30771
|
initialVideoImageFormat,
|
|
30389
30772
|
initialStillImageFormat,
|
|
@@ -30474,7 +30857,7 @@ var RenderModal = ({
|
|
|
30474
30857
|
const [initialOutName] = useState88(() => {
|
|
30475
30858
|
return getDefaultOutLocation({
|
|
30476
30859
|
compositionName: resolvedComposition.id,
|
|
30477
|
-
defaultExtension: initialRenderType === "still" ? initialStillImageFormat : isVideo ?
|
|
30860
|
+
defaultExtension: initialRenderType === "still" ? initialStillImageFormat : isVideo ? BrowserSafeApis11.getFileExtensionFromCodec(initialVideoCodec, initialAudioCodec) : initialStillImageFormat,
|
|
30478
30861
|
type: "asset",
|
|
30479
30862
|
compositionDefaultOutName: resolvedComposition.defaultOutName,
|
|
30480
30863
|
outputLocation: renderDefaults.outputLocation
|
|
@@ -30559,8 +30942,8 @@ var RenderModal = ({
|
|
|
30559
30942
|
}
|
|
30560
30943
|
return null;
|
|
30561
30944
|
}, [customTargetAudioBitrate, shouldHaveCustomTargetAudioBitrate]);
|
|
30562
|
-
const supportsCrf =
|
|
30563
|
-
const supportsVideoBitrate =
|
|
30945
|
+
const supportsCrf = BrowserSafeApis11.codecSupportsCrf(codec);
|
|
30946
|
+
const supportsVideoBitrate = BrowserSafeApis11.codecSupportsVideoBitrate(codec);
|
|
30564
30947
|
const supportsBothQualityControls = useMemo137(() => {
|
|
30565
30948
|
return supportsCrf && supportsVideoBitrate && hardwareAcceleration !== "if-possible" && hardwareAcceleration !== "required";
|
|
30566
30949
|
}, [hardwareAcceleration, supportsCrf, supportsVideoBitrate]);
|
|
@@ -30646,10 +31029,10 @@ var RenderModal = ({
|
|
|
30646
31029
|
return Math.max(0, Math.min(resolvedComposition.durationInFrames - 1, parsed));
|
|
30647
31030
|
}, [resolvedComposition.durationInFrames, unclampedFrame]);
|
|
30648
31031
|
const deriveFinalAudioCodec = useCallback136((passedVideoCodec, passedAudioCodec) => {
|
|
30649
|
-
if (passedAudioCodec !== null &&
|
|
31032
|
+
if (passedAudioCodec !== null && BrowserSafeApis11.supportedAudioCodecs[passedVideoCodec].includes(passedAudioCodec)) {
|
|
30650
31033
|
return passedAudioCodec;
|
|
30651
31034
|
}
|
|
30652
|
-
return
|
|
31035
|
+
return BrowserSafeApis11.defaultAudioCodecs[passedVideoCodec].compressed;
|
|
30653
31036
|
}, []);
|
|
30654
31037
|
const setDefaultOutName = useCallback136((options) => {
|
|
30655
31038
|
if (options.type === "still") {
|
|
@@ -30664,7 +31047,7 @@ var RenderModal = ({
|
|
|
30664
31047
|
});
|
|
30665
31048
|
} else {
|
|
30666
31049
|
setOutName((prev) => {
|
|
30667
|
-
const codecSuffix =
|
|
31050
|
+
const codecSuffix = BrowserSafeApis11.getFileExtensionFromCodec(options.codec, deriveFinalAudioCodec(options.codec, options.audioCodec));
|
|
30668
31051
|
const newFileName = getStringBeforeSuffix(prev) + "." + codecSuffix;
|
|
30669
31052
|
return newFileName;
|
|
30670
31053
|
});
|
|
@@ -30681,7 +31064,7 @@ var RenderModal = ({
|
|
|
30681
31064
|
if (prev === null) {
|
|
30682
31065
|
return null;
|
|
30683
31066
|
}
|
|
30684
|
-
const newExtension =
|
|
31067
|
+
const newExtension = BrowserSafeApis11.getExtensionFromAudioCodec(newAudioCodec);
|
|
30685
31068
|
const newFileName = getStringBeforeSuffix(prev) + "." + newExtension;
|
|
30686
31069
|
return newFileName;
|
|
30687
31070
|
});
|
|
@@ -30770,7 +31153,7 @@ var RenderModal = ({
|
|
|
30770
31153
|
}, [codec, everyNthFrameSetting]);
|
|
30771
31154
|
const audioCodec = deriveFinalAudioCodec(codec, userSelectedAudioCodec);
|
|
30772
31155
|
const availablePixelFormats = useMemo137(() => {
|
|
30773
|
-
return
|
|
31156
|
+
return BrowserSafeApis11.validPixelFormatsForCodec(codec);
|
|
30774
31157
|
}, [codec]);
|
|
30775
31158
|
const pixelFormat = useMemo137(() => {
|
|
30776
31159
|
if (availablePixelFormats.includes(userPreferredPixelFormat)) {
|
|
@@ -31097,8 +31480,134 @@ var RenderModal = ({
|
|
|
31097
31480
|
});
|
|
31098
31481
|
const { tab, setTab, shownTabs } = useRenderModalSections(renderMode, codec);
|
|
31099
31482
|
const { registerKeybinding } = useKeybinding();
|
|
31100
|
-
const
|
|
31483
|
+
const readOnlyRenderCommand = useMemo137(() => {
|
|
31484
|
+
if (!readOnlyStudio) {
|
|
31485
|
+
return null;
|
|
31486
|
+
}
|
|
31487
|
+
return makeReadOnlyStudioRenderCommand({
|
|
31488
|
+
remotionVersion: window.remotion_version,
|
|
31489
|
+
locationHref: window.location.href,
|
|
31490
|
+
compositionId: resolvedComposition.id,
|
|
31491
|
+
outName,
|
|
31492
|
+
renderMode,
|
|
31493
|
+
renderDefaults,
|
|
31494
|
+
durationInFrames: resolvedComposition.durationInFrames,
|
|
31495
|
+
concurrency,
|
|
31496
|
+
frame: frame2,
|
|
31497
|
+
startFrame,
|
|
31498
|
+
endFrame,
|
|
31499
|
+
stillImageFormat,
|
|
31500
|
+
sequenceImageFormat,
|
|
31501
|
+
videoImageFormat,
|
|
31502
|
+
jpegQuality: renderMode === "video" ? stillImageFormat === "jpeg" ? jpegQuality : null : renderMode === "audio" ? null : jpegQuality,
|
|
31503
|
+
codec,
|
|
31504
|
+
muted,
|
|
31505
|
+
enforceAudioTrack,
|
|
31506
|
+
proResProfile,
|
|
31507
|
+
x264Preset,
|
|
31508
|
+
pixelFormat,
|
|
31509
|
+
crf: qualityControlType === "crf" && hardwareAcceleration !== "if-possible" && hardwareAcceleration !== "required" ? crf : null,
|
|
31510
|
+
videoBitrate,
|
|
31511
|
+
audioBitrate,
|
|
31512
|
+
audioCodec,
|
|
31513
|
+
everyNthFrame,
|
|
31514
|
+
numberOfGifLoops,
|
|
31515
|
+
disallowParallelEncoding,
|
|
31516
|
+
encodingBufferSize,
|
|
31517
|
+
encodingMaxRate,
|
|
31518
|
+
forSeamlessAacConcatenation,
|
|
31519
|
+
separateAudioTo,
|
|
31520
|
+
colorSpace,
|
|
31521
|
+
scale,
|
|
31522
|
+
logLevel,
|
|
31523
|
+
delayRenderTimeout,
|
|
31524
|
+
hardwareAcceleration,
|
|
31525
|
+
chromeMode,
|
|
31526
|
+
headless,
|
|
31527
|
+
disableWebSecurity,
|
|
31528
|
+
ignoreCertificateErrors,
|
|
31529
|
+
gl: openGlOption === "default" ? null : openGlOption,
|
|
31530
|
+
userAgent,
|
|
31531
|
+
multiProcessOnLinux,
|
|
31532
|
+
darkMode,
|
|
31533
|
+
offthreadVideoCacheSizeInBytes,
|
|
31534
|
+
offthreadVideoThreads,
|
|
31535
|
+
mediaCacheSizeInBytes,
|
|
31536
|
+
beepOnFinish,
|
|
31537
|
+
repro,
|
|
31538
|
+
metadata,
|
|
31539
|
+
envVariables: envVariablesArrayToObject(envVariables),
|
|
31540
|
+
inputProps
|
|
31541
|
+
});
|
|
31542
|
+
}, [
|
|
31543
|
+
audioBitrate,
|
|
31544
|
+
audioCodec,
|
|
31545
|
+
beepOnFinish,
|
|
31546
|
+
chromeMode,
|
|
31547
|
+
codec,
|
|
31548
|
+
colorSpace,
|
|
31549
|
+
concurrency,
|
|
31550
|
+
crf,
|
|
31551
|
+
darkMode,
|
|
31552
|
+
delayRenderTimeout,
|
|
31553
|
+
disableWebSecurity,
|
|
31554
|
+
disallowParallelEncoding,
|
|
31555
|
+
endFrame,
|
|
31556
|
+
encodingBufferSize,
|
|
31557
|
+
encodingMaxRate,
|
|
31558
|
+
enforceAudioTrack,
|
|
31559
|
+
envVariables,
|
|
31560
|
+
everyNthFrame,
|
|
31561
|
+
frame2,
|
|
31562
|
+
forSeamlessAacConcatenation,
|
|
31563
|
+
hardwareAcceleration,
|
|
31564
|
+
headless,
|
|
31565
|
+
ignoreCertificateErrors,
|
|
31566
|
+
inputProps,
|
|
31567
|
+
jpegQuality,
|
|
31568
|
+
logLevel,
|
|
31569
|
+
mediaCacheSizeInBytes,
|
|
31570
|
+
metadata,
|
|
31571
|
+
multiProcessOnLinux,
|
|
31572
|
+
muted,
|
|
31573
|
+
numberOfGifLoops,
|
|
31574
|
+
offthreadVideoCacheSizeInBytes,
|
|
31575
|
+
offthreadVideoThreads,
|
|
31576
|
+
openGlOption,
|
|
31577
|
+
outName,
|
|
31578
|
+
pixelFormat,
|
|
31579
|
+
proResProfile,
|
|
31580
|
+
qualityControlType,
|
|
31581
|
+
readOnlyStudio,
|
|
31582
|
+
renderDefaults,
|
|
31583
|
+
renderMode,
|
|
31584
|
+
repro,
|
|
31585
|
+
resolvedComposition.durationInFrames,
|
|
31586
|
+
resolvedComposition.id,
|
|
31587
|
+
scale,
|
|
31588
|
+
separateAudioTo,
|
|
31589
|
+
sequenceImageFormat,
|
|
31590
|
+
startFrame,
|
|
31591
|
+
stillImageFormat,
|
|
31592
|
+
userAgent,
|
|
31593
|
+
videoImageFormat,
|
|
31594
|
+
videoBitrate,
|
|
31595
|
+
x264Preset
|
|
31596
|
+
]);
|
|
31597
|
+
const [commandCopiedAt, setCommandCopiedAt] = useState88(null);
|
|
31598
|
+
const renderDisabled = readOnlyStudio ? false : !outnameValidation.valid || state.type === "load";
|
|
31101
31599
|
const trigger = useCallback136(() => {
|
|
31600
|
+
if (readOnlyStudio) {
|
|
31601
|
+
if (!readOnlyRenderCommand) {
|
|
31602
|
+
return;
|
|
31603
|
+
}
|
|
31604
|
+
copyText(readOnlyRenderCommand).then(() => {
|
|
31605
|
+
setCommandCopiedAt(Date.now());
|
|
31606
|
+
}).catch((err) => {
|
|
31607
|
+
showNotification(`Could not copy: ${err.message}`, 2000);
|
|
31608
|
+
});
|
|
31609
|
+
return;
|
|
31610
|
+
}
|
|
31102
31611
|
if (renderMode === "still") {
|
|
31103
31612
|
onClickStill();
|
|
31104
31613
|
} else if (renderMode === "sequence") {
|
|
@@ -31106,7 +31615,23 @@ var RenderModal = ({
|
|
|
31106
31615
|
} else {
|
|
31107
31616
|
onClickVideo();
|
|
31108
31617
|
}
|
|
31109
|
-
}, [
|
|
31618
|
+
}, [
|
|
31619
|
+
onClickSequence,
|
|
31620
|
+
onClickStill,
|
|
31621
|
+
onClickVideo,
|
|
31622
|
+
readOnlyRenderCommand,
|
|
31623
|
+
readOnlyStudio,
|
|
31624
|
+
renderMode
|
|
31625
|
+
]);
|
|
31626
|
+
useEffect85(() => {
|
|
31627
|
+
if (commandCopiedAt === null) {
|
|
31628
|
+
return;
|
|
31629
|
+
}
|
|
31630
|
+
const timeout = setTimeout(() => {
|
|
31631
|
+
setCommandCopiedAt(null);
|
|
31632
|
+
}, 2000);
|
|
31633
|
+
return () => clearTimeout(timeout);
|
|
31634
|
+
}, [commandCopiedAt]);
|
|
31110
31635
|
useEffect85(() => {
|
|
31111
31636
|
if (renderDisabled) {
|
|
31112
31637
|
return;
|
|
@@ -31167,7 +31692,7 @@ var RenderModal = ({
|
|
|
31167
31692
|
backgroundColor: outnameValidation.valid ? BLUE : BLUE_DISABLED
|
|
31168
31693
|
},
|
|
31169
31694
|
children: [
|
|
31170
|
-
state.type === "idle" ? `Render ${renderMode}` : "Rendering...",
|
|
31695
|
+
readOnlyStudio ? commandCopiedAt ? "Copied command!" : "Copy command" : state.type === "idle" ? `Render ${renderMode}` : "Rendering...",
|
|
31171
31696
|
/* @__PURE__ */ jsx269(ShortcutHint, {
|
|
31172
31697
|
keyToPress: "↵",
|
|
31173
31698
|
cmdOrCtrl: true
|
|
@@ -31288,6 +31813,7 @@ var RenderModal = ({
|
|
|
31288
31813
|
setStartFrame,
|
|
31289
31814
|
setVerboseLogging: setLogLevel,
|
|
31290
31815
|
logLevel,
|
|
31816
|
+
showOutputName: !readOnlyStudio,
|
|
31291
31817
|
startFrame,
|
|
31292
31818
|
validationMessage: outnameValidation.valid ? null : outnameValidation.error.message
|
|
31293
31819
|
}) : tab === "picture" ? /* @__PURE__ */ jsx269(RenderModalPicture, {
|
|
@@ -31351,7 +31877,7 @@ var RenderModal = ({
|
|
|
31351
31877
|
propsEditType: "input-props",
|
|
31352
31878
|
saving,
|
|
31353
31879
|
setSaving,
|
|
31354
|
-
readOnlyStudio
|
|
31880
|
+
readOnlyStudio
|
|
31355
31881
|
}) : /* @__PURE__ */ jsx269(RenderModalAdvanced, {
|
|
31356
31882
|
x264Preset,
|
|
31357
31883
|
setx264Preset,
|
|
@@ -31817,6 +32343,7 @@ var WebRenderModalAudio = ({
|
|
|
31817
32343
|
const audioBitrateOptions = useMemo139(() => getQualityOptions(audioBitrate, setAudioBitrate), [audioBitrate, setAudioBitrate]);
|
|
31818
32344
|
const isAudioOnly = renderMode === "audio";
|
|
31819
32345
|
const showAudioSettings = isAudioOnly || !muted;
|
|
32346
|
+
const showAudioCodecSetting = !isAudioOnly || containerSupported.length > 1;
|
|
31820
32347
|
return /* @__PURE__ */ jsxs143("div", {
|
|
31821
32348
|
style: container62,
|
|
31822
32349
|
className: VERTICAL_SCROLLBAR_CLASSNAME,
|
|
@@ -31851,7 +32378,7 @@ var WebRenderModalAudio = ({
|
|
|
31851
32378
|
})
|
|
31852
32379
|
]
|
|
31853
32380
|
}),
|
|
31854
|
-
/* @__PURE__ */ jsxs143("div", {
|
|
32381
|
+
showAudioCodecSetting ? /* @__PURE__ */ jsxs143("div", {
|
|
31855
32382
|
style: optionRow,
|
|
31856
32383
|
children: [
|
|
31857
32384
|
/* @__PURE__ */ jsxs143("div", {
|
|
@@ -31872,8 +32399,8 @@ var WebRenderModalAudio = ({
|
|
|
31872
32399
|
})
|
|
31873
32400
|
})
|
|
31874
32401
|
]
|
|
31875
|
-
}),
|
|
31876
|
-
effectiveAudioCodec !== audioCodec ? /* @__PURE__ */ jsxs143("div", {
|
|
32402
|
+
}) : null,
|
|
32403
|
+
showAudioCodecSetting && effectiveAudioCodec !== audioCodec ? /* @__PURE__ */ jsxs143("div", {
|
|
31877
32404
|
style: fallbackNoticeStyle,
|
|
31878
32405
|
children: [
|
|
31879
32406
|
humanReadableWebAudioCodec(audioCodec),
|
|
@@ -33543,7 +34070,8 @@ var Modals = ({ readOnlyStudio }) => {
|
|
|
33543
34070
|
modalContextType && modalContextType.type === "web-render" && /* @__PURE__ */ jsx285(WebRenderModalWithLoader, {
|
|
33544
34071
|
...modalContextType
|
|
33545
34072
|
}),
|
|
33546
|
-
modalContextType &&
|
|
34073
|
+
modalContextType && modalContextType.type === "server-render" && (canRender || modalContextType.readOnlyStudio) ? /* @__PURE__ */ jsx285(RenderModalWithLoader, {
|
|
34074
|
+
readOnlyStudio: modalContextType.readOnlyStudio ?? false,
|
|
33547
34075
|
initialFrame: modalContextType.initialFrame,
|
|
33548
34076
|
initialDarkMode: modalContextType.initialDarkMode,
|
|
33549
34077
|
compositionId: modalContextType.compositionId,
|
|
@@ -33591,7 +34119,7 @@ var Modals = ({ readOnlyStudio }) => {
|
|
|
33591
34119
|
initialHardwareAcceleration: modalContextType.initialHardwareAcceleration,
|
|
33592
34120
|
initialChromeMode: modalContextType.initialChromeMode,
|
|
33593
34121
|
renderDefaults: modalContextType.renderDefaults
|
|
33594
|
-
}),
|
|
34122
|
+
}) : null,
|
|
33595
34123
|
modalContextType && modalContextType.type === "render-progress" && /* @__PURE__ */ jsx285(RenderStatusModal, {
|
|
33596
34124
|
jobId: modalContextType.jobId
|
|
33597
34125
|
}),
|