@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.
Files changed (34) hide show
  1. package/dist/components/CompositionSelector.js +36 -2
  2. package/dist/components/CompositionSelectorItem.js +1 -0
  3. package/dist/components/CurrentComposition.d.ts +1 -1
  4. package/dist/components/CurrentComposition.js +2 -3
  5. package/dist/components/CurrentCompositionSideEffects.js +2 -4
  6. package/dist/components/Modals.js +3 -2
  7. package/dist/components/PreviewToolbar.js +1 -2
  8. package/dist/components/RenderButton.d.ts +1 -1
  9. package/dist/components/RenderButton.js +64 -17
  10. package/dist/components/RenderModal/ClientRenderProgress.js +13 -9
  11. package/dist/components/RenderModal/RenderModalBasic.d.ts +1 -0
  12. package/dist/components/RenderModal/RenderModalBasic.js +2 -2
  13. package/dist/components/RenderModal/ServerRenderModal.d.ts +1 -0
  14. package/dist/components/RenderModal/ServerRenderModal.js +170 -5
  15. package/dist/components/RenderModal/WebRenderModalAudio.js +3 -2
  16. package/dist/components/RenderQueue/ClientRenderQueueProcessor.js +3 -0
  17. package/dist/components/RenderQueue/RenderQueueItemStatus.js +1 -2
  18. package/dist/components/RenderQueue/RenderQueueProgressMessage.js +2 -3
  19. package/dist/components/RenderQueue/client-render-progress.d.ts +3 -0
  20. package/dist/components/RenderQueue/client-render-progress.js +31 -0
  21. package/dist/components/RenderQueue/client-side-render-types.d.ts +3 -0
  22. package/dist/components/RenderQueue/context.js +7 -1
  23. package/dist/components/SidebarRenderButton.js +1 -0
  24. package/dist/esm/{chunk-bd1bkakk.js → chunk-x88z6n54.js} +1063 -535
  25. package/dist/esm/internals.mjs +1063 -535
  26. package/dist/esm/previewEntry.mjs +634 -106
  27. package/dist/esm/renderEntry.mjs +1 -1
  28. package/dist/helpers/make-render-command.d.ts +51 -0
  29. package/dist/helpers/make-render-command.js +201 -0
  30. package/dist/helpers/retry-payload.js +3 -0
  31. package/dist/state/modals.d.ts +1 -0
  32. package/package.json +9 -9
  33. package/dist/helpers/should-show-render-button.d.ts +0 -1
  34. package/dist/helpers/should-show-render-button.js +0 -11
@@ -1086,9 +1086,46 @@ var SidebarContextProvider = ({ children }) => {
1086
1086
  };
1087
1087
 
1088
1088
  // src/components/CompositionSelector.tsx
1089
- import { useCallback as useCallback16, useContext as useContext9, useMemo as useMemo21 } from "react";
1089
+ import { useCallback as useCallback16, useContext as useContext9, useMemo as useMemo22 } from "react";
1090
1090
  import { Internals as Internals7 } from "remotion";
1091
1091
 
1092
+ // src/error-overlay/remotion-overlay/ShortcutHint.tsx
1093
+ import { useMemo as useMemo9 } from "react";
1094
+ import { jsx as jsx10, jsxs as jsxs3 } from "react/jsx-runtime";
1095
+ var cmdOrCtrlCharacter = window.navigator.platform.startsWith("Mac") ? "⌘" : "Ctrl";
1096
+ var container3 = {
1097
+ display: "inline-block",
1098
+ marginLeft: 6,
1099
+ opacity: 0.6,
1100
+ verticalAlign: "middle",
1101
+ fontSize: 14
1102
+ };
1103
+ var ShortcutHint = ({ keyToPress, cmdOrCtrl }) => {
1104
+ const style = useMemo9(() => {
1105
+ if (keyToPress === "↵") {
1106
+ return {
1107
+ display: "inline-block",
1108
+ transform: `translateY(2px)`,
1109
+ fontSize: 14
1110
+ };
1111
+ }
1112
+ return {};
1113
+ }, [keyToPress]);
1114
+ if (areKeyboardShortcutsDisabled()) {
1115
+ return null;
1116
+ }
1117
+ return /* @__PURE__ */ jsxs3("span", {
1118
+ style: container3,
1119
+ children: [
1120
+ cmdOrCtrl ? `${cmdOrCtrlCharacter}` : "",
1121
+ /* @__PURE__ */ jsx10("span", {
1122
+ style,
1123
+ children: keyToPress.toUpperCase()
1124
+ })
1125
+ ]
1126
+ });
1127
+ };
1128
+
1092
1129
  // src/helpers/create-folder-tree.ts
1093
1130
  var buildAssetFolderStructure = (files, parentFolderName, foldersExpanded) => {
1094
1131
  const notInFolder = files.filter((f) => !f.name.includes("/"));
@@ -1270,36 +1307,45 @@ var sortItemsByNonceHistory = (items) => {
1270
1307
  return result;
1271
1308
  };
1272
1309
 
1310
+ // src/state/modals.ts
1311
+ import { createContext as createContext9 } from "react";
1312
+ var ModalsContext = createContext9({
1313
+ selectedModal: null,
1314
+ setSelectedModal: () => {
1315
+ return;
1316
+ }
1317
+ });
1318
+
1273
1319
  // src/components/CompositionSelectorItem.tsx
1274
- import { useCallback as useCallback15, useContext as useContext8, useMemo as useMemo20, useState as useState14 } from "react";
1320
+ import { useCallback as useCallback15, useContext as useContext8, useMemo as useMemo21, useState as useState14 } from "react";
1275
1321
 
1276
1322
  // src/icons/folder.tsx
1277
- import { jsx as jsx10 } from "react/jsx-runtime";
1323
+ import { jsx as jsx11 } from "react/jsx-runtime";
1278
1324
  var CollapsedFolderIcon = ({ color, ...props }) => {
1279
- return /* @__PURE__ */ jsx10("svg", {
1325
+ return /* @__PURE__ */ jsx11("svg", {
1280
1326
  viewBox: "0 0 512 512",
1281
1327
  ...props,
1282
- children: /* @__PURE__ */ jsx10("path", {
1328
+ children: /* @__PURE__ */ jsx11("path", {
1283
1329
  fill: color,
1284
1330
  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"
1285
1331
  })
1286
1332
  });
1287
1333
  };
1288
1334
  var ExpandedFolderIcon = ({ color, ...props }) => {
1289
- return /* @__PURE__ */ jsx10("svg", {
1335
+ return /* @__PURE__ */ jsx11("svg", {
1290
1336
  viewBox: "0 0 576 512",
1291
1337
  ...props,
1292
- children: /* @__PURE__ */ jsx10("path", {
1338
+ children: /* @__PURE__ */ jsx11("path", {
1293
1339
  fill: color,
1294
1340
  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"
1295
1341
  })
1296
1342
  });
1297
1343
  };
1298
1344
  var ExpandedFolderIconSolid = ({ color, ...props }) => {
1299
- return /* @__PURE__ */ jsx10("svg", {
1345
+ return /* @__PURE__ */ jsx11("svg", {
1300
1346
  viewBox: "0 0 576 512",
1301
1347
  ...props,
1302
- children: /* @__PURE__ */ jsx10("path", {
1348
+ children: /* @__PURE__ */ jsx11("path", {
1303
1349
  fill: color,
1304
1350
  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"
1305
1351
  })
@@ -1307,12 +1353,12 @@ var ExpandedFolderIconSolid = ({ color, ...props }) => {
1307
1353
  };
1308
1354
 
1309
1355
  // src/icons/still.tsx
1310
- import { jsx as jsx11 } from "react/jsx-runtime";
1356
+ import { jsx as jsx12 } from "react/jsx-runtime";
1311
1357
  var StillIcon = ({ color, ...props }) => {
1312
- return /* @__PURE__ */ jsx11("svg", {
1358
+ return /* @__PURE__ */ jsx12("svg", {
1313
1359
  ...props,
1314
1360
  viewBox: "0 0 512 512",
1315
- children: /* @__PURE__ */ jsx11("path", {
1361
+ children: /* @__PURE__ */ jsx12("path", {
1316
1362
  fill: color,
1317
1363
  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"
1318
1364
  })
@@ -1320,33 +1366,24 @@ var StillIcon = ({ color, ...props }) => {
1320
1366
  };
1321
1367
 
1322
1368
  // src/icons/video.tsx
1323
- import { jsx as jsx12 } from "react/jsx-runtime";
1369
+ import { jsx as jsx13 } from "react/jsx-runtime";
1324
1370
  var FilmIcon = ({ color, ...props }) => {
1325
- return /* @__PURE__ */ jsx12("svg", {
1371
+ return /* @__PURE__ */ jsx13("svg", {
1326
1372
  ...props,
1327
1373
  xmlns: "http://www.w3.org/2000/svg",
1328
1374
  viewBox: "0 0 512 512",
1329
- children: /* @__PURE__ */ jsx12("path", {
1375
+ children: /* @__PURE__ */ jsx13("path", {
1330
1376
  fill: color,
1331
1377
  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"
1332
1378
  })
1333
1379
  });
1334
1380
  };
1335
1381
 
1336
- // src/state/modals.ts
1337
- import { createContext as createContext9 } from "react";
1338
- var ModalsContext = createContext9({
1339
- selectedModal: null,
1340
- setSelectedModal: () => {
1341
- return;
1342
- }
1343
- });
1344
-
1345
1382
  // src/components/CompositionContextButton.tsx
1346
- import { useCallback as useCallback12, useContext as useContext6, useMemo as useMemo17 } from "react";
1383
+ import { useCallback as useCallback12, useContext as useContext6, useMemo as useMemo18 } from "react";
1347
1384
 
1348
1385
  // src/helpers/client-id.tsx
1349
- import React12, { useCallback as useCallback6, useEffect as useEffect8, useMemo as useMemo10, useRef as useRef6 } from "react";
1386
+ import React13, { useCallback as useCallback6, useEffect as useEffect8, useMemo as useMemo11, useRef as useRef6 } from "react";
1350
1387
  import { Internals as Internals4 } from "remotion";
1351
1388
 
1352
1389
  // src/components/Notifications/NotificationCenter.tsx
@@ -1359,7 +1396,7 @@ import {
1359
1396
 
1360
1397
  // src/components/Notifications/Notification.tsx
1361
1398
  import { useEffect as useEffect6 } from "react";
1362
- import { jsx as jsx13 } from "react/jsx-runtime";
1399
+ import { jsx as jsx14 } from "react/jsx-runtime";
1363
1400
  var notification = {
1364
1401
  backgroundColor: "#111111",
1365
1402
  color: "white",
@@ -1386,7 +1423,7 @@ var Notification = ({ children, id, duration, created, onRemove }) => {
1386
1423
  clearTimeout(timeout);
1387
1424
  };
1388
1425
  }, [created, duration, id, onRemove]);
1389
- return /* @__PURE__ */ jsx13("div", {
1426
+ return /* @__PURE__ */ jsx14("div", {
1390
1427
  className: "css-reset",
1391
1428
  style: notification,
1392
1429
  children
@@ -1394,8 +1431,8 @@ var Notification = ({ children, id, duration, created, onRemove }) => {
1394
1431
  };
1395
1432
 
1396
1433
  // src/components/Notifications/NotificationCenter.tsx
1397
- import { jsx as jsx14 } from "react/jsx-runtime";
1398
- var container3 = {
1434
+ import { jsx as jsx15 } from "react/jsx-runtime";
1435
+ var container4 = {
1399
1436
  position: "absolute",
1400
1437
  justifyContent: "center",
1401
1438
  alignItems: "center",
@@ -1449,10 +1486,10 @@ var NotificationCenter = () => {
1449
1486
  addNotification
1450
1487
  };
1451
1488
  }, [addNotification]);
1452
- return /* @__PURE__ */ jsx14("div", {
1453
- style: container3,
1489
+ return /* @__PURE__ */ jsx15("div", {
1490
+ style: container4,
1454
1491
  children: notifications.map((n) => {
1455
- return /* @__PURE__ */ jsx14(Notification, {
1492
+ return /* @__PURE__ */ jsx15(Notification, {
1456
1493
  created: n.created,
1457
1494
  duration: n.duration,
1458
1495
  id: n.id,
@@ -1481,12 +1518,12 @@ var playBeepSound = async (renderId) => {
1481
1518
  var PlayBeepSound_default = playBeepSound;
1482
1519
 
1483
1520
  // src/components/RenderQueue/context.tsx
1484
- import React11, {
1521
+ import React12, {
1485
1522
  createRef as createRef4,
1486
1523
  useCallback as useCallback5,
1487
1524
  useEffect as useEffect7,
1488
1525
  useImperativeHandle as useImperativeHandle3,
1489
- useMemo as useMemo9,
1526
+ useMemo as useMemo10,
1490
1527
  useRef as useRef5,
1491
1528
  useState as useState8
1492
1529
  } from "react";
@@ -1525,7 +1562,7 @@ var cancelAbortController = (jobId) => {
1525
1562
  };
1526
1563
 
1527
1564
  // src/components/RenderQueue/context.tsx
1528
- import { jsx as jsx15 } from "react/jsx-runtime";
1565
+ import { jsx as jsx16 } from "react/jsx-runtime";
1529
1566
  var restorePersistedClientRenders = () => {
1530
1567
  const persisted = window.remotion_initialClientRenders ?? [];
1531
1568
  return persisted.map((r) => ({ ...r, status: "done" }));
@@ -1537,7 +1574,7 @@ var noopString = () => "";
1537
1574
  var noop2 = () => {
1538
1575
  return;
1539
1576
  };
1540
- var RenderQueueContext = React11.createContext({
1577
+ var RenderQueueContext = React12.createContext({
1541
1578
  jobs: [],
1542
1579
  serverJobs: [],
1543
1580
  clientJobs: [],
@@ -1574,7 +1611,13 @@ var RenderQueueContextProvider = ({ children }) => {
1574
1611
  setClientJobs((prev) => prev.map((job) => job.id === nextJob.id ? {
1575
1612
  ...job,
1576
1613
  status: "running",
1577
- progress: { encodedFrames: 0, totalFrames: 0 }
1614
+ progress: {
1615
+ encodedFrames: 0,
1616
+ totalFrames: 0,
1617
+ doneIn: null,
1618
+ renderEstimatedTime: 0,
1619
+ progress: 0
1620
+ }
1578
1621
  } : job));
1579
1622
  processJobCallbackRef.current(nextJob);
1580
1623
  }, [clientJobs, currentlyProcessing]);
@@ -1673,7 +1716,7 @@ var RenderQueueContextProvider = ({ children }) => {
1673
1716
  });
1674
1717
  }
1675
1718
  }), []);
1676
- const value = useMemo9(() => {
1719
+ const value = useMemo10(() => {
1677
1720
  return {
1678
1721
  jobs: [...serverJobs, ...clientJobs].sort((a, b) => a.startedAt - b.startedAt),
1679
1722
  serverJobs,
@@ -1705,15 +1748,15 @@ var RenderQueueContextProvider = ({ children }) => {
1705
1748
  cancelClientJob,
1706
1749
  setProcessJobCallback
1707
1750
  ]);
1708
- return /* @__PURE__ */ jsx15(RenderQueueContext.Provider, {
1751
+ return /* @__PURE__ */ jsx16(RenderQueueContext.Provider, {
1709
1752
  value,
1710
1753
  children
1711
1754
  });
1712
1755
  };
1713
1756
 
1714
1757
  // src/helpers/client-id.tsx
1715
- import { jsx as jsx16 } from "react/jsx-runtime";
1716
- var StudioServerConnectionCtx = React12.createContext({
1758
+ import { jsx as jsx17 } from "react/jsx-runtime";
1759
+ var StudioServerConnectionCtx = React13.createContext({
1717
1760
  previewServerState: {
1718
1761
  type: "init"
1719
1762
  },
@@ -1797,28 +1840,28 @@ var PreviewServerConnection = ({ children, readOnlyStudio }) => {
1797
1840
  close();
1798
1841
  };
1799
1842
  }, [openEventSource, readOnlyStudio]);
1800
- const [state, setState] = React12.useState({
1843
+ const [state, setState] = React13.useState({
1801
1844
  type: "init"
1802
1845
  });
1803
- const context = useMemo10(() => {
1846
+ const context = useMemo11(() => {
1804
1847
  return {
1805
1848
  previewServerState: state,
1806
1849
  subscribeToEvent
1807
1850
  };
1808
1851
  }, [state, subscribeToEvent]);
1809
- return /* @__PURE__ */ jsx16(StudioServerConnectionCtx.Provider, {
1852
+ return /* @__PURE__ */ jsx17(StudioServerConnectionCtx.Provider, {
1810
1853
  value: context,
1811
1854
  children
1812
1855
  });
1813
1856
  };
1814
1857
 
1815
1858
  // src/icons/ellipsis.tsx
1816
- import { jsx as jsx17 } from "react/jsx-runtime";
1859
+ import { jsx as jsx18 } from "react/jsx-runtime";
1817
1860
  var EllipsisIcon = (props) => {
1818
- return /* @__PURE__ */ jsx17("svg", {
1861
+ return /* @__PURE__ */ jsx18("svg", {
1819
1862
  ...props.svgProps,
1820
1863
  viewBox: "0 0 448 512",
1821
- children: /* @__PURE__ */ jsx17("path", {
1864
+ children: /* @__PURE__ */ jsx18("path", {
1822
1865
  fill: props.fill,
1823
1866
  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"
1824
1867
  })
@@ -1827,12 +1870,12 @@ var EllipsisIcon = (props) => {
1827
1870
 
1828
1871
  // src/components/InlineDropdown.tsx
1829
1872
  import { PlayerInternals as PlayerInternals3 } from "@remotion/player";
1830
- import { useCallback as useCallback11, useMemo as useMemo16, useRef as useRef9, useState as useState12 } from "react";
1873
+ import { useCallback as useCallback11, useMemo as useMemo17, useRef as useRef9, useState as useState12 } from "react";
1831
1874
  import ReactDOM2 from "react-dom";
1832
1875
 
1833
1876
  // src/components/InlineAction.tsx
1834
- import { useCallback as useCallback7, useMemo as useMemo11, useState as useState9 } from "react";
1835
- import { jsx as jsx18 } from "react/jsx-runtime";
1877
+ import { useCallback as useCallback7, useMemo as useMemo12, useState as useState9 } from "react";
1878
+ import { jsx as jsx19 } from "react/jsx-runtime";
1836
1879
  var InlineAction = ({
1837
1880
  renderAction,
1838
1881
  onClick,
@@ -1847,7 +1890,7 @@ var InlineAction = ({
1847
1890
  const onPointerLeave = useCallback7(() => {
1848
1891
  setHovered(false);
1849
1892
  }, []);
1850
- const style = useMemo11(() => {
1893
+ const style = useMemo12(() => {
1851
1894
  return {
1852
1895
  border: "none",
1853
1896
  background: disabled ? "transparent" : getBackgroundFromHoverState({ hovered, selected: false }),
@@ -1860,7 +1903,7 @@ var InlineAction = ({
1860
1903
  pointerEvents: disabled ? "none" : "auto"
1861
1904
  };
1862
1905
  }, [disabled, hovered]);
1863
- return /* @__PURE__ */ jsx18("button", {
1906
+ return /* @__PURE__ */ jsx19("button", {
1864
1907
  type: "button",
1865
1908
  onPointerEnter,
1866
1909
  onPointerLeave,
@@ -1924,7 +1967,7 @@ var inlineCodeSnippet = {
1924
1967
  };
1925
1968
 
1926
1969
  // src/components/NewComposition/MenuContent.tsx
1927
- import { useCallback as useCallback10, useEffect as useEffect10, useMemo as useMemo15, useRef as useRef8, useState as useState11 } from "react";
1970
+ import { useCallback as useCallback10, useEffect as useEffect10, useMemo as useMemo16, useRef as useRef8, useState as useState11 } from "react";
1928
1971
 
1929
1972
  // src/components/Menu/is-menu-item.tsx
1930
1973
  var MENU_INITIATOR_CLASSNAME = "__remotion-studio-menu-initiator";
@@ -1936,7 +1979,7 @@ var isMenuItem = (el) => {
1936
1979
  };
1937
1980
 
1938
1981
  // src/components/Menu/MenuDivider.tsx
1939
- import { jsx as jsx19 } from "react/jsx-runtime";
1982
+ import { jsx as jsx20 } from "react/jsx-runtime";
1940
1983
  var menuDivider = {
1941
1984
  marginTop: 4,
1942
1985
  marginBottom: 4,
@@ -1944,19 +1987,19 @@ var menuDivider = {
1944
1987
  backgroundColor: INPUT_BORDER_COLOR_HOVERED
1945
1988
  };
1946
1989
  var MenuDivider = () => {
1947
- return /* @__PURE__ */ jsx19("div", {
1990
+ return /* @__PURE__ */ jsx20("div", {
1948
1991
  style: menuDivider
1949
1992
  });
1950
1993
  };
1951
1994
 
1952
1995
  // src/components/Menu/MenuSubItem.tsx
1953
1996
  import { PlayerInternals as PlayerInternals2 } from "@remotion/player";
1954
- import { useCallback as useCallback9, useEffect as useEffect9, useMemo as useMemo14, useRef as useRef7, useState as useState10 } from "react";
1997
+ import { useCallback as useCallback9, useEffect as useEffect9, useMemo as useMemo15, useRef as useRef7, useState as useState10 } from "react";
1955
1998
  import ReactDOM from "react-dom";
1956
1999
 
1957
2000
  // src/icons/caret.tsx
1958
- import { useMemo as useMemo12 } from "react";
1959
- import { jsx as jsx20 } from "react/jsx-runtime";
2001
+ import { useMemo as useMemo13 } from "react";
2002
+ import { jsx as jsx21 } from "react/jsx-runtime";
1960
2003
  var caret = {
1961
2004
  height: 12
1962
2005
  };
@@ -1966,36 +2009,36 @@ var caretDown = {
1966
2009
  var angleDown = {
1967
2010
  width: 10
1968
2011
  };
1969
- var CaretRight = () => /* @__PURE__ */ jsx20("svg", {
2012
+ var CaretRight = () => /* @__PURE__ */ jsx21("svg", {
1970
2013
  viewBox: "0 0 192 512",
1971
2014
  style: caret,
1972
- children: /* @__PURE__ */ jsx20("path", {
2015
+ children: /* @__PURE__ */ jsx21("path", {
1973
2016
  fill: "currentColor",
1974
2017
  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"
1975
2018
  })
1976
2019
  });
1977
2020
  var CaretDown = () => {
1978
- return /* @__PURE__ */ jsx20("svg", {
2021
+ return /* @__PURE__ */ jsx21("svg", {
1979
2022
  viewBox: "0 0 320 512",
1980
2023
  style: caretDown,
1981
- children: /* @__PURE__ */ jsx20("path", {
2024
+ children: /* @__PURE__ */ jsx21("path", {
1982
2025
  fill: "currentColor",
1983
2026
  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"
1984
2027
  })
1985
2028
  });
1986
2029
  };
1987
2030
  var AngleDown = ({ down }) => {
1988
- const style = useMemo12(() => {
2031
+ const style = useMemo13(() => {
1989
2032
  return {
1990
2033
  ...angleDown,
1991
2034
  transform: down ? "rotate(180deg)" : "rotate(0deg)",
1992
2035
  marginTop: 1
1993
2036
  };
1994
2037
  }, [down]);
1995
- return /* @__PURE__ */ jsx20("svg", {
2038
+ return /* @__PURE__ */ jsx21("svg", {
1996
2039
  style,
1997
2040
  viewBox: "0 0 448 512",
1998
- children: /* @__PURE__ */ jsx20("path", {
2041
+ children: /* @__PURE__ */ jsx21("path", {
1999
2042
  fill: LIGHT_TEXT,
2000
2043
  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"
2001
2044
  })
@@ -2003,11 +2046,11 @@ var AngleDown = ({ down }) => {
2003
2046
  };
2004
2047
 
2005
2048
  // src/components/layout.tsx
2006
- import { useMemo as useMemo13 } from "react";
2007
- import { jsx as jsx21 } from "react/jsx-runtime";
2049
+ import { useMemo as useMemo14 } from "react";
2050
+ import { jsx as jsx22 } from "react/jsx-runtime";
2008
2051
  var SPACING_UNIT = 8;
2009
2052
  var Spacing = ({ x = 0, y = 0, block = false }) => {
2010
- const style = useMemo13(() => {
2053
+ const style = useMemo14(() => {
2011
2054
  return {
2012
2055
  display: block ? "block" : "inline-block",
2013
2056
  width: x * SPACING_UNIT,
@@ -2015,17 +2058,17 @@ var Spacing = ({ x = 0, y = 0, block = false }) => {
2015
2058
  flexShrink: 0
2016
2059
  };
2017
2060
  }, [block, x, y]);
2018
- return /* @__PURE__ */ jsx21("div", {
2061
+ return /* @__PURE__ */ jsx22("div", {
2019
2062
  style
2020
2063
  });
2021
2064
  };
2022
2065
  var flexCss = { flex: 1 };
2023
- var Flex = ({ children }) => /* @__PURE__ */ jsx21("div", {
2066
+ var Flex = ({ children }) => /* @__PURE__ */ jsx22("div", {
2024
2067
  style: flexCss,
2025
2068
  children
2026
2069
  });
2027
2070
  var Row = ({ children, justify, className, align, flex, style = {}, ...other }) => {
2028
- const finalStyle = useMemo13(() => {
2071
+ const finalStyle = useMemo14(() => {
2029
2072
  return {
2030
2073
  ...style,
2031
2074
  display: "flex",
@@ -2035,7 +2078,7 @@ var Row = ({ children, justify, className, align, flex, style = {}, ...other })
2035
2078
  flex: flex ?? undefined
2036
2079
  };
2037
2080
  }, [align, flex, justify, style]);
2038
- return /* @__PURE__ */ jsx21("div", {
2081
+ return /* @__PURE__ */ jsx22("div", {
2039
2082
  className,
2040
2083
  style: finalStyle,
2041
2084
  ...other,
@@ -2043,7 +2086,7 @@ var Row = ({ children, justify, className, align, flex, style = {}, ...other })
2043
2086
  });
2044
2087
  };
2045
2088
  var Column = ({ children, justify, className, align, style = {} }) => {
2046
- const finalStyle = useMemo13(() => {
2089
+ const finalStyle = useMemo14(() => {
2047
2090
  return {
2048
2091
  ...style,
2049
2092
  display: "flex",
@@ -2052,7 +2095,7 @@ var Column = ({ children, justify, className, align, style = {} }) => {
2052
2095
  alignItems: align ?? "flex-start"
2053
2096
  };
2054
2097
  }, [align, justify, style]);
2055
- return /* @__PURE__ */ jsx21("div", {
2098
+ return /* @__PURE__ */ jsx22("div", {
2056
2099
  className,
2057
2100
  style: finalStyle,
2058
2101
  children
@@ -2061,7 +2104,7 @@ var Column = ({ children, justify, className, align, style = {} }) => {
2061
2104
 
2062
2105
  // src/components/Menu/SubMenu.tsx
2063
2106
  import { useCallback as useCallback8 } from "react";
2064
- import { jsx as jsx22 } from "react/jsx-runtime";
2107
+ import { jsx as jsx23 } from "react/jsx-runtime";
2065
2108
  var SubMenuComponent = ({
2066
2109
  portalStyle,
2067
2110
  subMenuActivated,
@@ -2077,13 +2120,13 @@ var SubMenuComponent = ({
2077
2120
  onQuitFullMenu();
2078
2121
  }
2079
2122
  }, [mobileLayout, onQuitFullMenu, onQuitSubMenu]);
2080
- return /* @__PURE__ */ jsx22(HigherZIndex, {
2123
+ return /* @__PURE__ */ jsx23(HigherZIndex, {
2081
2124
  onEscape: onQuitFullMenu,
2082
2125
  onOutsideClick,
2083
- children: /* @__PURE__ */ jsx22("div", {
2126
+ children: /* @__PURE__ */ jsx23("div", {
2084
2127
  style: portalStyle,
2085
2128
  className: "css-reset",
2086
- children: /* @__PURE__ */ jsx22(MenuContent, {
2129
+ children: /* @__PURE__ */ jsx23(MenuContent, {
2087
2130
  onNextMenu: noop,
2088
2131
  onPreviousMenu: onQuitSubMenu,
2089
2132
  values: subMenu.items,
@@ -2098,8 +2141,8 @@ var SubMenuComponent = ({
2098
2141
  };
2099
2142
 
2100
2143
  // src/components/Menu/MenuSubItem.tsx
2101
- import { jsx as jsx23, jsxs as jsxs3, Fragment } from "react/jsx-runtime";
2102
- var container4 = {
2144
+ import { jsx as jsx24, jsxs as jsxs4, Fragment } from "react/jsx-runtime";
2145
+ var container5 = {
2103
2146
  paddingTop: 8,
2104
2147
  paddingBottom: 8,
2105
2148
  paddingLeft: 12,
@@ -2148,9 +2191,9 @@ var MenuSubItem = ({
2148
2191
  });
2149
2192
  const mobileLayout = useMobileLayout();
2150
2193
  const { currentZIndex } = useZIndex();
2151
- const style = useMemo14(() => {
2194
+ const style = useMemo15(() => {
2152
2195
  return {
2153
- ...container4,
2196
+ ...container5,
2154
2197
  backgroundColor: selected && !disabled ? CLEAR_HOVER : "transparent",
2155
2198
  opacity: disabled ? 0.5 : 1,
2156
2199
  cursor: disabled ? "not-allowed" : "default"
@@ -2180,7 +2223,7 @@ var MenuSubItem = ({
2180
2223
  const onQuitSubmenu = useCallback9(() => {
2181
2224
  setSubMenuActivated(false);
2182
2225
  }, [setSubMenuActivated]);
2183
- const portalStyle = useMemo14(() => {
2226
+ const portalStyle = useMemo15(() => {
2184
2227
  if (!selected || !size || !subMenu || !subMenuActivated) {
2185
2228
  return null;
2186
2229
  }
@@ -2207,7 +2250,7 @@ var MenuSubItem = ({
2207
2250
  });
2208
2251
  }
2209
2252
  }, [selected]);
2210
- return /* @__PURE__ */ jsx23("div", {
2253
+ return /* @__PURE__ */ jsx24("div", {
2211
2254
  ref,
2212
2255
  onPointerEnter,
2213
2256
  onPointerLeave,
@@ -2215,35 +2258,35 @@ var MenuSubItem = ({
2215
2258
  onPointerUp,
2216
2259
  role: "button",
2217
2260
  className: MENU_ITEM_CLASSNAME,
2218
- children: /* @__PURE__ */ jsxs3(Row, {
2261
+ children: /* @__PURE__ */ jsxs4(Row, {
2219
2262
  align: "center",
2220
2263
  children: [
2221
- leaveLeftSpace ? /* @__PURE__ */ jsxs3(Fragment, {
2264
+ leaveLeftSpace ? /* @__PURE__ */ jsxs4(Fragment, {
2222
2265
  children: [
2223
- /* @__PURE__ */ jsx23("div", {
2266
+ /* @__PURE__ */ jsx24("div", {
2224
2267
  style: leftSpace,
2225
2268
  children: leftItem
2226
2269
  }),
2227
- /* @__PURE__ */ jsx23(Spacing, {
2270
+ /* @__PURE__ */ jsx24(Spacing, {
2228
2271
  x: 1
2229
2272
  })
2230
2273
  ]
2231
2274
  }) : null,
2232
- /* @__PURE__ */ jsx23("div", {
2275
+ /* @__PURE__ */ jsx24("div", {
2233
2276
  style: labelStyle,
2234
2277
  ...{ title: typeof label === "string" ? label : undefined },
2235
2278
  children: label
2236
2279
  }),
2237
2280
  " ",
2238
- /* @__PURE__ */ jsx23(Spacing, {
2281
+ /* @__PURE__ */ jsx24(Spacing, {
2239
2282
  x: 2
2240
2283
  }),
2241
- subMenu ? /* @__PURE__ */ jsx23(CaretRight, {}) : null,
2242
- keyHint && !areKeyboardShortcutsDisabled() ? /* @__PURE__ */ jsx23("span", {
2284
+ subMenu ? /* @__PURE__ */ jsx24(CaretRight, {}) : null,
2285
+ keyHint && !areKeyboardShortcutsDisabled() ? /* @__PURE__ */ jsx24("span", {
2243
2286
  style: keyHintCss,
2244
2287
  children: keyHint
2245
2288
  }) : null,
2246
- portalStyle && subMenu ? ReactDOM.createPortal(/* @__PURE__ */ jsx23(SubMenuComponent, {
2289
+ portalStyle && subMenu ? ReactDOM.createPortal(/* @__PURE__ */ jsx24(SubMenuComponent, {
2247
2290
  onQuitFullMenu: onQuitMenu,
2248
2291
  subMenu,
2249
2292
  onQuitSubMenu: onQuitSubmenu,
@@ -2256,9 +2299,9 @@ var MenuSubItem = ({
2256
2299
  };
2257
2300
 
2258
2301
  // src/components/NewComposition/MenuContent.tsx
2259
- import { jsx as jsx24 } from "react/jsx-runtime";
2302
+ import { jsx as jsx25 } from "react/jsx-runtime";
2260
2303
  var BORDER_SIZE = 1;
2261
- var container5 = {
2304
+ var container6 = {
2262
2305
  paddingTop: MENU_VERTICAL_PADDING,
2263
2306
  paddingBottom: MENU_VERTICAL_PADDING,
2264
2307
  border: `${BORDER_SIZE}px solid ${INPUT_BORDER_COLOR_UNHOVERED}`,
@@ -2365,8 +2408,8 @@ var MenuContent = ({
2365
2408
  }
2366
2409
  setSubMenuActivated("without-mouse");
2367
2410
  }, [onNextMenu, selectedItem, values]);
2368
- const containerWithHeight = useMemo15(() => {
2369
- const containerStyles = { ...container5 };
2411
+ const containerWithHeight = useMemo16(() => {
2412
+ const containerStyles = { ...container6 };
2370
2413
  if (fixedHeight === null) {
2371
2414
  containerStyles.maxHeight = 600;
2372
2415
  } else {
@@ -2492,13 +2535,13 @@ var MenuContent = ({
2492
2535
  current.addEventListener("pointerleave", onPointerLeave);
2493
2536
  return () => current.removeEventListener("pointerleave", onPointerLeave);
2494
2537
  }, [onHide, subMenuActivated]);
2495
- return /* @__PURE__ */ jsx24("div", {
2538
+ return /* @__PURE__ */ jsx25("div", {
2496
2539
  ref: containerRef,
2497
2540
  style: containerWithHeight,
2498
2541
  className: VERTICAL_SCROLLBAR_CLASSNAME,
2499
2542
  children: values.map((item) => {
2500
2543
  if (item.type === "divider") {
2501
- return /* @__PURE__ */ jsx24(MenuDivider, {}, item.id);
2544
+ return /* @__PURE__ */ jsx25(MenuDivider, {}, item.id);
2502
2545
  }
2503
2546
  const onClick = (id, e) => {
2504
2547
  item.onClick(id, e);
@@ -2507,7 +2550,7 @@ var MenuContent = ({
2507
2550
  }
2508
2551
  onHide();
2509
2552
  };
2510
- return /* @__PURE__ */ jsx24(MenuSubItem, {
2553
+ return /* @__PURE__ */ jsx25(MenuSubItem, {
2511
2554
  selected: item.id === selectedItem,
2512
2555
  onActionChosen: onClick,
2513
2556
  onItemSelected,
@@ -2528,7 +2571,7 @@ var MenuContent = ({
2528
2571
  };
2529
2572
 
2530
2573
  // src/components/InlineDropdown.tsx
2531
- import { jsx as jsx25, jsxs as jsxs4, Fragment as Fragment2 } from "react/jsx-runtime";
2574
+ import { jsx as jsx26, jsxs as jsxs5, Fragment as Fragment2 } from "react/jsx-runtime";
2532
2575
  var InlineDropdown = ({
2533
2576
  values,
2534
2577
  ...props
@@ -2546,19 +2589,19 @@ var InlineDropdown = ({
2546
2589
  e.stopPropagation();
2547
2590
  setOpened({ type: "open", left: e.clientX, top: e.clientY });
2548
2591
  }, []);
2549
- const spaceToBottom = useMemo16(() => {
2592
+ const spaceToBottom = useMemo17(() => {
2550
2593
  if (size && opened.type === "open") {
2551
2594
  return size.windowSize.height - opened.top;
2552
2595
  }
2553
2596
  return 0;
2554
2597
  }, [opened, size]);
2555
- const spaceToTop = useMemo16(() => {
2598
+ const spaceToTop = useMemo17(() => {
2556
2599
  if (size && opened.type === "open") {
2557
2600
  return opened.top;
2558
2601
  }
2559
2602
  return 0;
2560
2603
  }, [opened, size]);
2561
- const portalStyle = useMemo16(() => {
2604
+ const portalStyle = useMemo17(() => {
2562
2605
  if (opened.type === "not-open") {
2563
2606
  return;
2564
2607
  }
@@ -2589,26 +2632,26 @@ var InlineDropdown = ({
2589
2632
  const onHide = useCallback11(() => {
2590
2633
  setOpened({ type: "not-open" });
2591
2634
  }, []);
2592
- return /* @__PURE__ */ jsxs4(Fragment2, {
2635
+ return /* @__PURE__ */ jsxs5(Fragment2, {
2593
2636
  children: [
2594
- /* @__PURE__ */ jsx25("div", {
2637
+ /* @__PURE__ */ jsx26("div", {
2595
2638
  ref,
2596
- children: /* @__PURE__ */ jsx25(InlineAction, {
2639
+ children: /* @__PURE__ */ jsx26(InlineAction, {
2597
2640
  onClick,
2598
2641
  ...props
2599
2642
  })
2600
2643
  }),
2601
- portalStyle ? ReactDOM2.createPortal(/* @__PURE__ */ jsx25("div", {
2644
+ portalStyle ? ReactDOM2.createPortal(/* @__PURE__ */ jsx26("div", {
2602
2645
  style: fullScreenOverlay,
2603
- children: /* @__PURE__ */ jsx25("div", {
2646
+ children: /* @__PURE__ */ jsx26("div", {
2604
2647
  style: outerPortal,
2605
2648
  className: "css-reset",
2606
- children: /* @__PURE__ */ jsx25(HigherZIndex, {
2649
+ children: /* @__PURE__ */ jsx26(HigherZIndex, {
2607
2650
  onOutsideClick: onHide,
2608
2651
  onEscape: onHide,
2609
- children: /* @__PURE__ */ jsx25("div", {
2652
+ children: /* @__PURE__ */ jsx26("div", {
2610
2653
  style: portalStyle,
2611
- children: /* @__PURE__ */ jsx25(MenuContent, {
2654
+ children: /* @__PURE__ */ jsx26(MenuContent, {
2612
2655
  onNextMenu: noop,
2613
2656
  onPreviousMenu: noop,
2614
2657
  values,
@@ -2627,9 +2670,9 @@ var InlineDropdown = ({
2627
2670
  };
2628
2671
 
2629
2672
  // src/components/CompositionContextButton.tsx
2630
- import { jsx as jsx26 } from "react/jsx-runtime";
2673
+ import { jsx as jsx27 } from "react/jsx-runtime";
2631
2674
  var CompositionContextButton = ({ visible, values }) => {
2632
- const iconStyle = useMemo17(() => {
2675
+ const iconStyle = useMemo18(() => {
2633
2676
  return {
2634
2677
  style: {
2635
2678
  height: 12
@@ -2638,7 +2681,7 @@ var CompositionContextButton = ({ visible, values }) => {
2638
2681
  }, []);
2639
2682
  const connectionStatus = useContext6(StudioServerConnectionCtx).previewServerState.type;
2640
2683
  const renderAction = useCallback12((color) => {
2641
- return /* @__PURE__ */ jsx26(EllipsisIcon, {
2684
+ return /* @__PURE__ */ jsx27(EllipsisIcon, {
2642
2685
  fill: color,
2643
2686
  svgProps: iconStyle
2644
2687
  });
@@ -2646,7 +2689,7 @@ var CompositionContextButton = ({ visible, values }) => {
2646
2689
  if (!visible || connectionStatus !== "connected") {
2647
2690
  return null;
2648
2691
  }
2649
- return /* @__PURE__ */ jsx26(InlineDropdown, {
2692
+ return /* @__PURE__ */ jsx27(InlineDropdown, {
2650
2693
  renderAction,
2651
2694
  values
2652
2695
  });
@@ -2654,14 +2697,14 @@ var CompositionContextButton = ({ visible, values }) => {
2654
2697
 
2655
2698
  // src/components/ContextMenu.tsx
2656
2699
  import { PlayerInternals as PlayerInternals4 } from "@remotion/player";
2657
- import { useCallback as useCallback13, useEffect as useEffect11, useMemo as useMemo18, useRef as useRef10, useState as useState13 } from "react";
2700
+ import { useCallback as useCallback13, useEffect as useEffect11, useMemo as useMemo19, useRef as useRef10, useState as useState13 } from "react";
2658
2701
  import ReactDOM3 from "react-dom";
2659
- import { jsx as jsx27, jsxs as jsxs5, Fragment as Fragment3 } from "react/jsx-runtime";
2702
+ import { jsx as jsx28, jsxs as jsxs6, Fragment as Fragment3 } from "react/jsx-runtime";
2660
2703
  var ContextMenu = ({ children, values }) => {
2661
2704
  const ref = useRef10(null);
2662
2705
  const [opened, setOpened] = useState13({ type: "not-open" });
2663
2706
  const { currentZIndex } = useZIndex();
2664
- const style = useMemo18(() => {
2707
+ const style = useMemo19(() => {
2665
2708
  return {};
2666
2709
  }, []);
2667
2710
  const size = PlayerInternals4.useElementSize(ref, {
@@ -2685,19 +2728,19 @@ var ContextMenu = ({ children, values }) => {
2685
2728
  current.removeEventListener("contextmenu", onClick);
2686
2729
  };
2687
2730
  }, [size]);
2688
- const spaceToBottom = useMemo18(() => {
2731
+ const spaceToBottom = useMemo19(() => {
2689
2732
  if (size && opened.type === "open") {
2690
2733
  return size.windowSize.height - opened.top;
2691
2734
  }
2692
2735
  return 0;
2693
2736
  }, [opened, size]);
2694
- const spaceToTop = useMemo18(() => {
2737
+ const spaceToTop = useMemo19(() => {
2695
2738
  if (size && opened.type === "open") {
2696
2739
  return opened.top;
2697
2740
  }
2698
2741
  return 0;
2699
2742
  }, [opened, size]);
2700
- const portalStyle = useMemo18(() => {
2743
+ const portalStyle = useMemo19(() => {
2701
2744
  if (opened.type === "not-open") {
2702
2745
  return;
2703
2746
  }
@@ -2728,25 +2771,25 @@ var ContextMenu = ({ children, values }) => {
2728
2771
  const onHide = useCallback13(() => {
2729
2772
  setOpened({ type: "not-open" });
2730
2773
  }, []);
2731
- return /* @__PURE__ */ jsxs5(Fragment3, {
2774
+ return /* @__PURE__ */ jsxs6(Fragment3, {
2732
2775
  children: [
2733
- /* @__PURE__ */ jsx27("div", {
2776
+ /* @__PURE__ */ jsx28("div", {
2734
2777
  ref,
2735
2778
  onContextMenu: () => false,
2736
2779
  style,
2737
2780
  children
2738
2781
  }),
2739
- portalStyle ? ReactDOM3.createPortal(/* @__PURE__ */ jsx27("div", {
2782
+ portalStyle ? ReactDOM3.createPortal(/* @__PURE__ */ jsx28("div", {
2740
2783
  style: fullScreenOverlay,
2741
- children: /* @__PURE__ */ jsx27("div", {
2784
+ children: /* @__PURE__ */ jsx28("div", {
2742
2785
  style: outerPortal,
2743
2786
  className: "css-reset",
2744
- children: /* @__PURE__ */ jsx27(HigherZIndex, {
2787
+ children: /* @__PURE__ */ jsx28(HigherZIndex, {
2745
2788
  onOutsideClick: onHide,
2746
2789
  onEscape: onHide,
2747
- children: /* @__PURE__ */ jsx27("div", {
2790
+ children: /* @__PURE__ */ jsx28("div", {
2748
2791
  style: portalStyle,
2749
- children: /* @__PURE__ */ jsx27(MenuContent, {
2792
+ children: /* @__PURE__ */ jsx28(MenuContent, {
2750
2793
  onNextMenu: noop,
2751
2794
  onPreviousMenu: noop,
2752
2795
  values,
@@ -2765,17 +2808,17 @@ var ContextMenu = ({ children, values }) => {
2765
2808
  };
2766
2809
 
2767
2810
  // src/components/SidebarRenderButton.tsx
2768
- import { useCallback as useCallback14, useContext as useContext7, useMemo as useMemo19 } from "react";
2811
+ import { useCallback as useCallback14, useContext as useContext7, useMemo as useMemo20 } from "react";
2769
2812
  import { Internals as Internals5 } from "remotion";
2770
2813
 
2771
2814
  // src/icons/render.tsx
2772
- import { jsx as jsx28 } from "react/jsx-runtime";
2815
+ import { jsx as jsx29 } from "react/jsx-runtime";
2773
2816
  var ThinRenderIcon = (props) => {
2774
- return /* @__PURE__ */ jsx28("svg", {
2817
+ return /* @__PURE__ */ jsx29("svg", {
2775
2818
  ...props.svgProps,
2776
2819
  xmlns: "http://www.w3.org/2000/svg",
2777
2820
  viewBox: "0 0 512 512",
2778
- children: /* @__PURE__ */ jsx28("path", {
2821
+ children: /* @__PURE__ */ jsx29("path", {
2779
2822
  fill: props.fill,
2780
2823
  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"
2781
2824
  })
@@ -2783,12 +2826,12 @@ var ThinRenderIcon = (props) => {
2783
2826
  };
2784
2827
 
2785
2828
  // src/components/SidebarRenderButton.tsx
2786
- import { jsx as jsx29 } from "react/jsx-runtime";
2829
+ import { jsx as jsx30 } from "react/jsx-runtime";
2787
2830
  var SidebarRenderButton = ({ composition, visible }) => {
2788
2831
  const { setSelectedModal } = useContext7(ModalsContext);
2789
2832
  const { setSidebarCollapsedState } = useContext7(SidebarContext);
2790
2833
  const isMobileLayout = useMobileLayout();
2791
- const iconStyle = useMemo19(() => {
2834
+ const iconStyle = useMemo20(() => {
2792
2835
  return {
2793
2836
  style: {
2794
2837
  height: 12
@@ -2851,7 +2894,8 @@ var SidebarRenderButton = ({ composition, visible }) => {
2851
2894
  initialChromeMode: defaults.chromeMode,
2852
2895
  initialMediaCacheSizeInBytes: defaults.mediaCacheSizeInBytes,
2853
2896
  renderDefaults: defaults,
2854
- initialDarkMode: defaults.darkMode
2897
+ initialDarkMode: defaults.darkMode,
2898
+ readOnlyStudio: false
2855
2899
  });
2856
2900
  if (isMobileLayout) {
2857
2901
  setSidebarCollapsedState({ left: "collapsed", right: "collapsed" });
@@ -2865,7 +2909,7 @@ var SidebarRenderButton = ({ composition, visible }) => {
2865
2909
  setSidebarCollapsedState
2866
2910
  ]);
2867
2911
  const renderAction = useCallback14((color) => {
2868
- return /* @__PURE__ */ jsx29(ThinRenderIcon, {
2912
+ return /* @__PURE__ */ jsx30(ThinRenderIcon, {
2869
2913
  fill: color,
2870
2914
  svgProps: iconStyle
2871
2915
  });
@@ -2873,14 +2917,14 @@ var SidebarRenderButton = ({ composition, visible }) => {
2873
2917
  if (!visible || connectionStatus !== "connected") {
2874
2918
  return null;
2875
2919
  }
2876
- return /* @__PURE__ */ jsx29(InlineAction, {
2920
+ return /* @__PURE__ */ jsx30(InlineAction, {
2877
2921
  renderAction,
2878
2922
  onClick
2879
2923
  });
2880
2924
  };
2881
2925
 
2882
2926
  // src/components/CompositionSelectorItem.tsx
2883
- import { jsx as jsx30, jsxs as jsxs6, Fragment as Fragment4 } from "react/jsx-runtime";
2927
+ import { jsx as jsx31, jsxs as jsxs7, Fragment as Fragment4 } from "react/jsx-runtime";
2884
2928
  var COMPOSITION_ITEM_HEIGHT = 32;
2885
2929
  var itemStyle = {
2886
2930
  paddingRight: 10,
@@ -2897,7 +2941,8 @@ var itemStyle = {
2897
2941
  width: "100%",
2898
2942
  textAlign: "left",
2899
2943
  backgroundColor: BACKGROUND,
2900
- height: COMPOSITION_ITEM_HEIGHT
2944
+ height: COMPOSITION_ITEM_HEIGHT,
2945
+ userSelect: "none"
2901
2946
  };
2902
2947
  var labelStyle2 = {
2903
2948
  textAlign: "left",
@@ -2921,7 +2966,7 @@ var CompositionSelectorItem = ({
2921
2966
  selectComposition,
2922
2967
  toggleFolder
2923
2968
  }) => {
2924
- const selected = useMemo20(() => {
2969
+ const selected = useMemo21(() => {
2925
2970
  if (item.type === "composition") {
2926
2971
  return currentComposition === item.composition.id;
2927
2972
  }
@@ -2934,14 +2979,14 @@ var CompositionSelectorItem = ({
2934
2979
  const onPointerLeave = useCallback15(() => {
2935
2980
  setHovered(false);
2936
2981
  }, []);
2937
- const style = useMemo20(() => {
2982
+ const style = useMemo21(() => {
2938
2983
  return {
2939
2984
  ...itemStyle,
2940
2985
  backgroundColor: getBackgroundFromHoverState({ hovered, selected }),
2941
2986
  paddingLeft: 12 + level * 8
2942
2987
  };
2943
2988
  }, [hovered, level, selected]);
2944
- const label = useMemo20(() => {
2989
+ const label = useMemo21(() => {
2945
2990
  return {
2946
2991
  ...labelStyle2,
2947
2992
  color: selected || hovered ? "white" : LIGHT_TEXT
@@ -2961,7 +3006,7 @@ var CompositionSelectorItem = ({
2961
3006
  }
2962
3007
  }, [onClick]);
2963
3008
  const { setSelectedModal } = useContext8(ModalsContext);
2964
- const contextMenu = useMemo20(() => {
3009
+ const contextMenu = useMemo21(() => {
2965
3010
  if (item.type === "composition") {
2966
3011
  return [
2967
3012
  {
@@ -3039,9 +3084,9 @@ var CompositionSelectorItem = ({
3039
3084
  return [];
3040
3085
  }, [item, setSelectedModal]);
3041
3086
  if (item.type === "folder") {
3042
- return /* @__PURE__ */ jsxs6(Fragment4, {
3087
+ return /* @__PURE__ */ jsxs7(Fragment4, {
3043
3088
  children: [
3044
- /* @__PURE__ */ jsxs6("button", {
3089
+ /* @__PURE__ */ jsxs7("button", {
3045
3090
  style,
3046
3091
  onPointerEnter,
3047
3092
  onPointerLeave,
@@ -3050,24 +3095,24 @@ var CompositionSelectorItem = ({
3050
3095
  type: "button",
3051
3096
  title: item.folderName,
3052
3097
  children: [
3053
- item.expanded ? /* @__PURE__ */ jsx30(ExpandedFolderIcon, {
3098
+ item.expanded ? /* @__PURE__ */ jsx31(ExpandedFolderIcon, {
3054
3099
  style: iconStyle,
3055
3100
  color: hovered || selected ? "white" : LIGHT_TEXT
3056
- }) : /* @__PURE__ */ jsx30(CollapsedFolderIcon, {
3101
+ }) : /* @__PURE__ */ jsx31(CollapsedFolderIcon, {
3057
3102
  color: hovered || selected ? "white" : LIGHT_TEXT,
3058
3103
  style: iconStyle
3059
3104
  }),
3060
- /* @__PURE__ */ jsx30(Spacing, {
3105
+ /* @__PURE__ */ jsx31(Spacing, {
3061
3106
  x: 1
3062
3107
  }),
3063
- /* @__PURE__ */ jsx30("div", {
3108
+ /* @__PURE__ */ jsx31("div", {
3064
3109
  style: label,
3065
3110
  children: item.folderName
3066
3111
  })
3067
3112
  ]
3068
3113
  }),
3069
3114
  item.expanded ? item.items.map((childItem) => {
3070
- return /* @__PURE__ */ jsx30(CompositionSelectorItem, {
3115
+ return /* @__PURE__ */ jsx31(CompositionSelectorItem, {
3071
3116
  currentComposition,
3072
3117
  selectComposition,
3073
3118
  item: childItem,
@@ -3079,11 +3124,11 @@ var CompositionSelectorItem = ({
3079
3124
  ]
3080
3125
  });
3081
3126
  }
3082
- return /* @__PURE__ */ jsx30(ContextMenu, {
3127
+ return /* @__PURE__ */ jsx31(ContextMenu, {
3083
3128
  values: contextMenu,
3084
- children: /* @__PURE__ */ jsx30(Row, {
3129
+ children: /* @__PURE__ */ jsx31(Row, {
3085
3130
  align: "center",
3086
- children: /* @__PURE__ */ jsxs6("a", {
3131
+ children: /* @__PURE__ */ jsxs7("a", {
3087
3132
  style,
3088
3133
  onPointerEnter,
3089
3134
  onPointerLeave,
@@ -3095,28 +3140,28 @@ var CompositionSelectorItem = ({
3095
3140
  className: "__remotion-composition",
3096
3141
  "data-compname": item.composition.id,
3097
3142
  children: [
3098
- isCompositionStill(item.composition) ? /* @__PURE__ */ jsx30(StillIcon, {
3143
+ isCompositionStill(item.composition) ? /* @__PURE__ */ jsx31(StillIcon, {
3099
3144
  color: hovered || selected ? "white" : LIGHT_TEXT,
3100
3145
  style: iconStyle
3101
- }) : /* @__PURE__ */ jsx30(FilmIcon, {
3146
+ }) : /* @__PURE__ */ jsx31(FilmIcon, {
3102
3147
  color: hovered || selected ? "white" : LIGHT_TEXT,
3103
3148
  style: iconStyle
3104
3149
  }),
3105
- /* @__PURE__ */ jsx30(Spacing, {
3150
+ /* @__PURE__ */ jsx31(Spacing, {
3106
3151
  x: 1
3107
3152
  }),
3108
- /* @__PURE__ */ jsx30("div", {
3153
+ /* @__PURE__ */ jsx31("div", {
3109
3154
  style: label,
3110
3155
  children: item.composition.id
3111
3156
  }),
3112
- /* @__PURE__ */ jsx30(Spacing, {
3157
+ /* @__PURE__ */ jsx31(Spacing, {
3113
3158
  x: 0.5
3114
3159
  }),
3115
- /* @__PURE__ */ jsx30(CompositionContextButton, {
3160
+ /* @__PURE__ */ jsx31(CompositionContextButton, {
3116
3161
  values: contextMenu,
3117
3162
  visible: hovered
3118
3163
  }),
3119
- /* @__PURE__ */ jsx30(SidebarRenderButton, {
3164
+ /* @__PURE__ */ jsx31(SidebarRenderButton, {
3120
3165
  visible: hovered,
3121
3166
  composition: item.composition
3122
3167
  })
@@ -3148,13 +3193,12 @@ var renderFrame = (frame, fps) => {
3148
3193
  };
3149
3194
 
3150
3195
  // src/components/CurrentComposition.tsx
3151
- import { jsx as jsx31, jsxs as jsxs7 } from "react/jsx-runtime";
3152
- var CURRENT_COMPOSITION_HEIGHT = 80;
3153
- var container6 = {
3196
+ import { jsx as jsx32, jsxs as jsxs8 } from "react/jsx-runtime";
3197
+ var CURRENT_COMPOSITION_HEIGHT = 64;
3198
+ var container7 = {
3154
3199
  height: CURRENT_COMPOSITION_HEIGHT,
3155
3200
  display: "block",
3156
- borderBottom: `1px solid ${BORDER_COLOR}`,
3157
- padding: 12,
3201
+ padding: "6px 12px",
3158
3202
  color: "white",
3159
3203
  backgroundColor: BACKGROUND
3160
3204
  };
@@ -3180,17 +3224,17 @@ var row = {
3180
3224
  };
3181
3225
  var CurrentComposition = () => {
3182
3226
  const video = Internals6.useVideo();
3183
- return /* @__PURE__ */ jsx31("div", {
3184
- style: container6,
3185
- children: video ? /* @__PURE__ */ jsx31("div", {
3227
+ return /* @__PURE__ */ jsx32("div", {
3228
+ style: container7,
3229
+ children: video ? /* @__PURE__ */ jsx32("div", {
3186
3230
  style: row,
3187
- children: /* @__PURE__ */ jsxs7("div", {
3231
+ children: /* @__PURE__ */ jsxs8("div", {
3188
3232
  children: [
3189
- /* @__PURE__ */ jsx31("div", {
3233
+ /* @__PURE__ */ jsx32("div", {
3190
3234
  style: title,
3191
3235
  children: video.id
3192
3236
  }),
3193
- /* @__PURE__ */ jsxs7("div", {
3237
+ /* @__PURE__ */ jsxs8("div", {
3194
3238
  style: subtitle,
3195
3239
  children: [
3196
3240
  video.width,
@@ -3199,10 +3243,10 @@ var CurrentComposition = () => {
3199
3243
  isCompositionStill(video) ? null : `, ${video.fps} FPS`
3200
3244
  ]
3201
3245
  }),
3202
- isCompositionStill(video) ? /* @__PURE__ */ jsx31("div", {
3246
+ isCompositionStill(video) ? /* @__PURE__ */ jsx32("div", {
3203
3247
  style: subtitle,
3204
3248
  children: "Still"
3205
- }) : /* @__PURE__ */ jsxs7("div", {
3249
+ }) : /* @__PURE__ */ jsxs8("div", {
3206
3250
  style: subtitle,
3207
3251
  children: [
3208
3252
  "Duration ",
@@ -3216,7 +3260,7 @@ var CurrentComposition = () => {
3216
3260
  };
3217
3261
 
3218
3262
  // src/components/CompositionSelector.tsx
3219
- import { jsx as jsx32, jsxs as jsxs8 } from "react/jsx-runtime";
3263
+ import { jsx as jsx33, jsxs as jsxs9 } from "react/jsx-runtime";
3220
3264
  var useCompositionNavigation = () => {
3221
3265
  const { compositions, canvasContent } = useContext9(Internals7.CompositionManager);
3222
3266
  const selectComposition = useSelectComposition();
@@ -3244,18 +3288,41 @@ var useCompositionNavigation = () => {
3244
3288
  const previousComposition = compositions[previousIndex];
3245
3289
  selectComposition(previousComposition, true);
3246
3290
  }, [canvasContent, compositions, selectComposition]);
3247
- return useMemo21(() => ({
3291
+ return useMemo22(() => ({
3248
3292
  navigateToNextComposition,
3249
3293
  navigateToPreviousComposition
3250
3294
  }), [navigateToNextComposition, navigateToPreviousComposition]);
3251
3295
  };
3252
- var container7 = {
3296
+ var container8 = {
3253
3297
  display: "flex",
3254
3298
  flexDirection: "column",
3255
3299
  flex: 1,
3256
3300
  overflow: "hidden",
3257
3301
  backgroundColor: BACKGROUND
3258
3302
  };
3303
+ var QUICK_SWITCHER_TRIGGER_HEIGHT = 38;
3304
+ var quickSwitcherArea = {
3305
+ padding: "4px 12px",
3306
+ borderBottom: `1px solid ${BORDER_COLOR}`
3307
+ };
3308
+ var quickSwitcherTrigger = {
3309
+ backgroundColor: "rgba(255, 255, 255, 0.06)",
3310
+ borderRadius: 5,
3311
+ padding: "4px 10px",
3312
+ color: LIGHT_TEXT,
3313
+ fontSize: 12,
3314
+ cursor: "pointer",
3315
+ display: "flex",
3316
+ alignItems: "center",
3317
+ justifyContent: "space-between",
3318
+ border: "none",
3319
+ width: "100%",
3320
+ appearance: "none"
3321
+ };
3322
+ var shortcutLabel = {
3323
+ fontSize: 11,
3324
+ opacity: 0.6
3325
+ };
3259
3326
  var getKeysToExpand = (initialFolderName, parentFolderName, initial = []) => {
3260
3327
  initial.push(openFolderKey({
3261
3328
  folderName: initialFolderName,
@@ -3270,35 +3337,62 @@ var getKeysToExpand = (initialFolderName, parentFolderName, initial = []) => {
3270
3337
  var CompositionSelector = () => {
3271
3338
  const { compositions, canvasContent, folders } = useContext9(Internals7.CompositionManager);
3272
3339
  const { foldersExpanded } = useContext9(ExpandedFoldersContext);
3340
+ const { setSelectedModal } = useContext9(ModalsContext);
3273
3341
  const { tabIndex } = useZIndex();
3274
3342
  const selectComposition = useSelectComposition();
3275
- const sortedCompositions = useMemo21(() => {
3343
+ const sortedCompositions = useMemo22(() => {
3276
3344
  return sortItemsByNonceHistory(compositions);
3277
3345
  }, [compositions]);
3278
- const sortedFolders = useMemo21(() => {
3346
+ const sortedFolders = useMemo22(() => {
3279
3347
  return sortItemsByNonceHistory(folders);
3280
3348
  }, [folders]);
3281
- const items = useMemo21(() => {
3349
+ const items = useMemo22(() => {
3282
3350
  return createFolderTree(sortedCompositions, sortedFolders, foldersExpanded);
3283
3351
  }, [sortedCompositions, sortedFolders, foldersExpanded]);
3284
- const list = useMemo21(() => {
3352
+ const list = useMemo22(() => {
3285
3353
  return {
3286
- height: `calc(100% - ${CURRENT_COMPOSITION_HEIGHT}px)`,
3354
+ height: `calc(100% - ${CURRENT_COMPOSITION_HEIGHT}px - ${QUICK_SWITCHER_TRIGGER_HEIGHT}px)`,
3287
3355
  overflowY: "auto"
3288
3356
  };
3289
3357
  }, []);
3290
3358
  const toggleFolder = useCallback16((folderName, parentName) => {
3291
3359
  Internals7.compositionSelectorRef.current?.toggleFolder(folderName, parentName);
3292
3360
  }, []);
3293
- return /* @__PURE__ */ jsxs8("div", {
3294
- style: container7,
3361
+ const openQuickSwitcher = useCallback16(() => {
3362
+ setSelectedModal({
3363
+ type: "quick-switcher",
3364
+ mode: "compositions",
3365
+ invocationTimestamp: Date.now()
3366
+ });
3367
+ }, [setSelectedModal]);
3368
+ return /* @__PURE__ */ jsxs9("div", {
3369
+ style: container8,
3295
3370
  children: [
3296
- /* @__PURE__ */ jsx32(CurrentComposition, {}),
3297
- /* @__PURE__ */ jsx32("div", {
3371
+ /* @__PURE__ */ jsx33(CurrentComposition, {}),
3372
+ /* @__PURE__ */ jsx33("div", {
3373
+ style: quickSwitcherArea,
3374
+ children: /* @__PURE__ */ jsxs9("button", {
3375
+ type: "button",
3376
+ style: quickSwitcherTrigger,
3377
+ onClick: openQuickSwitcher,
3378
+ tabIndex,
3379
+ children: [
3380
+ "Search...",
3381
+ areKeyboardShortcutsDisabled() ? null : /* @__PURE__ */ jsxs9("span", {
3382
+ style: shortcutLabel,
3383
+ children: [
3384
+ cmdOrCtrlCharacter,
3385
+ "+K"
3386
+ ]
3387
+ })
3388
+ ]
3389
+ })
3390
+ }),
3391
+ /* @__PURE__ */ jsx33("div", {
3298
3392
  className: "__remotion-vertical-scrollbar",
3299
3393
  style: list,
3300
3394
  children: items.map((c) => {
3301
- return /* @__PURE__ */ jsx32(CompositionSelectorItem, {
3395
+ return /* @__PURE__ */ jsx33(CompositionSelectorItem, {
3302
3396
  level: 0,
3303
3397
  currentComposition: canvasContent && canvasContent.type === "composition" ? canvasContent.compositionId : null,
3304
3398
  selectComposition,
@@ -3316,7 +3410,7 @@ var CompositionSelector = () => {
3316
3410
  import { createRef as createRef5, useCallback as useCallback22, useImperativeHandle as useImperativeHandle5, useState as useState21 } from "react";
3317
3411
 
3318
3412
  // src/components/AssetSelector.tsx
3319
- import { useCallback as useCallback19, useContext as useContext13, useMemo as useMemo25, useState as useState18 } from "react";
3413
+ import { useCallback as useCallback19, useContext as useContext13, useMemo as useMemo26, useState as useState18 } from "react";
3320
3414
  import { Internals as Internals10 } from "remotion";
3321
3415
 
3322
3416
  // src/api/write-static-file.ts
@@ -3345,7 +3439,7 @@ var writeStaticFile = async ({
3345
3439
  };
3346
3440
 
3347
3441
  // src/helpers/use-asset-drag-events.ts
3348
- import { useCallback as useCallback17, useEffect as useEffect12, useMemo as useMemo22, useRef as useRef11 } from "react";
3442
+ import { useCallback as useCallback17, useEffect as useEffect12, useMemo as useMemo23, useRef as useRef11 } from "react";
3349
3443
  import { NoReactInternals } from "remotion/no-react";
3350
3444
  function useAssetDragEvents({
3351
3445
  name,
@@ -3354,10 +3448,10 @@ function useAssetDragEvents({
3354
3448
  setDropLocation
3355
3449
  }) {
3356
3450
  const dragDepthRef = useRef11(0);
3357
- const combinedParents = useMemo22(() => {
3451
+ const combinedParents = useMemo23(() => {
3358
3452
  return [parentFolder, name].filter(NoReactInternals.truthy).join("/");
3359
3453
  }, [name, parentFolder]);
3360
- const isDropDiv = useMemo22(() => {
3454
+ const isDropDiv = useMemo23(() => {
3361
3455
  return dropLocation === combinedParents;
3362
3456
  }, [combinedParents, dropLocation]);
3363
3457
  const onDragEnter = useCallback17(() => {
@@ -3386,7 +3480,7 @@ function useAssetDragEvents({
3386
3480
  var use_asset_drag_events_default = useAssetDragEvents;
3387
3481
 
3388
3482
  // src/components/AssetSelectorItem.tsx
3389
- import React24, { useCallback as useCallback18, useContext as useContext10, useMemo as useMemo23, useRef as useRef12, useState as useState15 } from "react";
3483
+ import React25, { useCallback as useCallback18, useContext as useContext10, useMemo as useMemo24, useRef as useRef12, useState as useState15 } from "react";
3390
3484
  import { Internals as Internals8 } from "remotion";
3391
3485
  import { NoReactInternals as NoReactInternals3 } from "remotion/no-react";
3392
3486
 
@@ -3408,26 +3502,26 @@ var copyText = (cmd) => {
3408
3502
  };
3409
3503
 
3410
3504
  // src/icons/clipboard.tsx
3411
- import { jsx as jsx33 } from "react/jsx-runtime";
3412
- var ClipboardIcon = ({ color, ...props }) => /* @__PURE__ */ jsx33("svg", {
3505
+ import { jsx as jsx34 } from "react/jsx-runtime";
3506
+ var ClipboardIcon = ({ color, ...props }) => /* @__PURE__ */ jsx34("svg", {
3413
3507
  viewBox: "0 0 384 512",
3414
3508
  ...props,
3415
- children: /* @__PURE__ */ jsx33("path", {
3509
+ children: /* @__PURE__ */ jsx34("path", {
3416
3510
  fill: color,
3417
3511
  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"
3418
3512
  })
3419
3513
  });
3420
3514
 
3421
3515
  // src/icons/file.tsx
3422
- import { jsx as jsx34 } from "react/jsx-runtime";
3516
+ import { jsx as jsx35 } from "react/jsx-runtime";
3423
3517
  var FileIcon = ({
3424
3518
  color,
3425
3519
  ...props
3426
- }) => /* @__PURE__ */ jsx34("svg", {
3520
+ }) => /* @__PURE__ */ jsx35("svg", {
3427
3521
  xmlns: "http://www.w3.org/2000/svg",
3428
3522
  viewBox: "0 0 384 512",
3429
3523
  ...props,
3430
- children: /* @__PURE__ */ jsx34("path", {
3524
+ children: /* @__PURE__ */ jsx35("path", {
3431
3525
  fill: color ?? "currentColor",
3432
3526
  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"
3433
3527
  })
@@ -3731,7 +3825,7 @@ var applyVisualControlChange = ({
3731
3825
  };
3732
3826
 
3733
3827
  // src/components/AssetSelectorItem.tsx
3734
- import { jsx as jsx35, jsxs as jsxs9, Fragment as Fragment5 } from "react/jsx-runtime";
3828
+ import { jsx as jsx36, jsxs as jsxs10, Fragment as Fragment5 } from "react/jsx-runtime";
3735
3829
  var ASSET_ITEM_HEIGHT = 32;
3736
3830
  var iconStyle2 = {
3737
3831
  width: 18,
@@ -3794,14 +3888,14 @@ var AssetFolderItem = ({
3794
3888
  const onPointerLeave = useCallback18(() => {
3795
3889
  setHovered(false);
3796
3890
  }, []);
3797
- const folderStyle = useMemo23(() => {
3891
+ const folderStyle = useMemo24(() => {
3798
3892
  return {
3799
3893
  ...itemStyle2,
3800
3894
  paddingLeft: 4 + level * 8,
3801
3895
  backgroundColor: hovered ? CLEAR_HOVER : "transparent"
3802
3896
  };
3803
3897
  }, [hovered, level]);
3804
- const label = useMemo23(() => {
3898
+ const label = useMemo24(() => {
3805
3899
  return {
3806
3900
  ...labelStyle3,
3807
3901
  color: hovered ? "white" : LIGHT_TEXT
@@ -3811,14 +3905,14 @@ var AssetFolderItem = ({
3811
3905
  toggleFolder(item.name, parentFolder);
3812
3906
  }, [item.name, parentFolder, toggleFolder]);
3813
3907
  const Icon = item.expanded ? ExpandedFolderIcon : CollapsedFolderIcon;
3814
- return /* @__PURE__ */ jsxs9("div", {
3908
+ return /* @__PURE__ */ jsxs10("div", {
3815
3909
  onDragEnter,
3816
3910
  onDragLeave,
3817
3911
  style: {
3818
3912
  backgroundColor: isDropDiv ? CLEAR_HOVER : BACKGROUND
3819
3913
  },
3820
3914
  children: [
3821
- /* @__PURE__ */ jsx35("div", {
3915
+ /* @__PURE__ */ jsx36("div", {
3822
3916
  style: folderStyle,
3823
3917
  onPointerEnter,
3824
3918
  onPointerLeave,
@@ -3837,23 +3931,23 @@ var AssetFolderItem = ({
3837
3931
  clearTimeout(openFolderTimerRef.current);
3838
3932
  }
3839
3933
  },
3840
- children: /* @__PURE__ */ jsxs9(Row, {
3934
+ children: /* @__PURE__ */ jsxs10(Row, {
3841
3935
  children: [
3842
- /* @__PURE__ */ jsx35(Icon, {
3936
+ /* @__PURE__ */ jsx36(Icon, {
3843
3937
  style: iconStyle2,
3844
3938
  color: hovered ? "white" : LIGHT_TEXT
3845
3939
  }),
3846
- /* @__PURE__ */ jsx35(Spacing, {
3940
+ /* @__PURE__ */ jsx36(Spacing, {
3847
3941
  x: 1
3848
3942
  }),
3849
- /* @__PURE__ */ jsx35("div", {
3943
+ /* @__PURE__ */ jsx36("div", {
3850
3944
  style: label,
3851
3945
  children: item.name
3852
3946
  })
3853
3947
  ]
3854
3948
  })
3855
3949
  }),
3856
- item.expanded ? /* @__PURE__ */ jsx35(AssetFolderTree, {
3950
+ item.expanded ? /* @__PURE__ */ jsx36(AssetFolderTree, {
3857
3951
  item: item.items,
3858
3952
  name: item.name,
3859
3953
  level,
@@ -3878,13 +3972,13 @@ var AssetFolderTree = ({
3878
3972
  setDropLocation,
3879
3973
  readOnlyStudio
3880
3974
  }) => {
3881
- const combinedParents = useMemo23(() => {
3975
+ const combinedParents = useMemo24(() => {
3882
3976
  return [parentFolder, name].filter(NoReactInternals3.truthy).join("/");
3883
3977
  }, [name, parentFolder]);
3884
- return /* @__PURE__ */ jsxs9("div", {
3978
+ return /* @__PURE__ */ jsxs10("div", {
3885
3979
  children: [
3886
3980
  item.folders.map((folder) => {
3887
- return /* @__PURE__ */ jsx35(AssetFolderItem, {
3981
+ return /* @__PURE__ */ jsx36(AssetFolderItem, {
3888
3982
  item: folder,
3889
3983
  tabIndex,
3890
3984
  level: level + 1,
@@ -3896,7 +3990,7 @@ var AssetFolderTree = ({
3896
3990
  }, folder.name);
3897
3991
  }),
3898
3992
  item.files.map((file) => {
3899
- return /* @__PURE__ */ jsx35(AssetSelectorItem, {
3993
+ return /* @__PURE__ */ jsx36(AssetSelectorItem, {
3900
3994
  item: file,
3901
3995
  tabIndex,
3902
3996
  level,
@@ -3916,10 +4010,10 @@ var AssetSelectorItem = ({ item, tabIndex, level, parentFolder, readOnlyStudio }
3916
4010
  }, []);
3917
4011
  const { setCanvasContent } = useContext10(Internals8.CompositionSetters);
3918
4012
  const { canvasContent } = useContext10(Internals8.CompositionManager);
3919
- const relativePath = useMemo23(() => {
4013
+ const relativePath = useMemo24(() => {
3920
4014
  return parentFolder ? parentFolder + "/" + item.name : item.name;
3921
4015
  }, [parentFolder, item.name]);
3922
- const selected = useMemo23(() => {
4016
+ const selected = useMemo24(() => {
3923
4017
  if (canvasContent && canvasContent.type === "asset") {
3924
4018
  return canvasContent.asset === relativePath;
3925
4019
  }
@@ -3940,7 +4034,7 @@ var AssetSelectorItem = ({ item, tabIndex, level, parentFolder, readOnlyStudio }
3940
4034
  setCanvasContent,
3941
4035
  setSidebarCollapsedState
3942
4036
  ]);
3943
- const style = useMemo23(() => {
4037
+ const style = useMemo24(() => {
3944
4038
  return {
3945
4039
  ...itemStyle2,
3946
4040
  color: hovered || selected ? "white" : LIGHT_TEXT,
@@ -3948,25 +4042,25 @@ var AssetSelectorItem = ({ item, tabIndex, level, parentFolder, readOnlyStudio }
3948
4042
  paddingLeft: 12 + level * 8
3949
4043
  };
3950
4044
  }, [hovered, level, selected]);
3951
- const label = useMemo23(() => {
4045
+ const label = useMemo24(() => {
3952
4046
  return {
3953
4047
  ...labelStyle3,
3954
4048
  color: hovered || selected ? "white" : LIGHT_TEXT
3955
4049
  };
3956
4050
  }, [hovered, selected]);
3957
4051
  const renderFileExplorerAction = useCallback18((color) => {
3958
- return /* @__PURE__ */ jsx35(ExpandedFolderIcon, {
4052
+ return /* @__PURE__ */ jsx36(ExpandedFolderIcon, {
3959
4053
  style: revealIconStyle,
3960
4054
  color
3961
4055
  });
3962
4056
  }, []);
3963
4057
  const renderCopyAction = useCallback18((color) => {
3964
- return /* @__PURE__ */ jsx35(ClipboardIcon, {
4058
+ return /* @__PURE__ */ jsx36(ClipboardIcon, {
3965
4059
  style: revealIconStyle,
3966
4060
  color
3967
4061
  });
3968
4062
  }, []);
3969
- const revealInExplorer = React24.useCallback((e) => {
4063
+ const revealInExplorer = React25.useCallback((e) => {
3970
4064
  e.stopPropagation();
3971
4065
  openInFileExplorer({
3972
4066
  directory: window.remotion_publicFolderExists + "/" + parentFolder + "/" + item.name
@@ -3983,9 +4077,9 @@ var AssetSelectorItem = ({ item, tabIndex, level, parentFolder, readOnlyStudio }
3983
4077
  showNotification(`Could not copy: ${err.message}`, 2000);
3984
4078
  });
3985
4079
  }, [item.name, parentFolder]);
3986
- return /* @__PURE__ */ jsx35(Row, {
4080
+ return /* @__PURE__ */ jsx36(Row, {
3987
4081
  align: "center",
3988
- children: /* @__PURE__ */ jsxs9("div", {
4082
+ children: /* @__PURE__ */ jsxs10("div", {
3989
4083
  style,
3990
4084
  onPointerEnter,
3991
4085
  onPointerLeave,
@@ -3993,33 +4087,33 @@ var AssetSelectorItem = ({ item, tabIndex, level, parentFolder, readOnlyStudio }
3993
4087
  tabIndex,
3994
4088
  title: item.name,
3995
4089
  children: [
3996
- /* @__PURE__ */ jsx35(FileIcon, {
4090
+ /* @__PURE__ */ jsx36(FileIcon, {
3997
4091
  style: iconStyle2,
3998
4092
  color: LIGHT_TEXT
3999
4093
  }),
4000
- /* @__PURE__ */ jsx35(Spacing, {
4094
+ /* @__PURE__ */ jsx36(Spacing, {
4001
4095
  x: 1
4002
4096
  }),
4003
- /* @__PURE__ */ jsx35("div", {
4097
+ /* @__PURE__ */ jsx36("div", {
4004
4098
  style: label,
4005
4099
  children: item.name
4006
4100
  }),
4007
- hovered ? /* @__PURE__ */ jsxs9(Fragment5, {
4101
+ hovered ? /* @__PURE__ */ jsxs10(Fragment5, {
4008
4102
  children: [
4009
- /* @__PURE__ */ jsx35(Spacing, {
4103
+ /* @__PURE__ */ jsx36(Spacing, {
4010
4104
  x: 0.5
4011
4105
  }),
4012
- /* @__PURE__ */ jsx35(InlineAction, {
4106
+ /* @__PURE__ */ jsx36(InlineAction, {
4013
4107
  title: "Copy staticFile() name",
4014
4108
  renderAction: renderCopyAction,
4015
4109
  onClick: copyToClipboard
4016
4110
  }),
4017
- readOnlyStudio ? null : /* @__PURE__ */ jsxs9(Fragment5, {
4111
+ readOnlyStudio ? null : /* @__PURE__ */ jsxs10(Fragment5, {
4018
4112
  children: [
4019
- /* @__PURE__ */ jsx35(Spacing, {
4113
+ /* @__PURE__ */ jsx36(Spacing, {
4020
4114
  x: 0.5
4021
4115
  }),
4022
- /* @__PURE__ */ jsx35(InlineAction, {
4116
+ /* @__PURE__ */ jsx36(InlineAction, {
4023
4117
  title: "Open in Explorer",
4024
4118
  renderAction: renderFileExplorerAction,
4025
4119
  onClick: revealInExplorer
@@ -4036,11 +4130,11 @@ var AssetSelectorItem = ({ item, tabIndex, level, parentFolder, readOnlyStudio }
4036
4130
  // src/components/CurrentAsset.tsx
4037
4131
  import { formatBytes } from "@remotion/studio-shared";
4038
4132
  import { ALL_FORMATS, Input, UrlSource } from "mediabunny";
4039
- import { useContext as useContext12, useEffect as useEffect14, useMemo as useMemo24, useState as useState17 } from "react";
4133
+ import { useContext as useContext12, useEffect as useEffect14, useMemo as useMemo25, useState as useState17 } from "react";
4040
4134
  import { Internals as Internals9, staticFile } from "remotion";
4041
4135
 
4042
4136
  // src/components/use-static-files.ts
4043
- import React25, { createContext as createContext10, useContext as useContext11, useEffect as useEffect13, useState as useState16 } from "react";
4137
+ import React26, { createContext as createContext10, useContext as useContext11, useEffect as useEffect13, useState as useState16 } from "react";
4044
4138
  import { useRemotionEnvironment } from "remotion";
4045
4139
 
4046
4140
  // src/api/get-static-files.ts
@@ -4112,16 +4206,16 @@ var StaticFilesProvider = ({ children }) => {
4112
4206
  });
4113
4207
  return cancel;
4114
4208
  }, [env.isStudio, env.isReadOnlyStudio]);
4115
- return React25.createElement(StaticFilesContext.Provider, { value: files }, children);
4209
+ return React26.createElement(StaticFilesContext.Provider, { value: files }, children);
4116
4210
  };
4117
4211
  var useStaticFiles = () => {
4118
4212
  return useContext11(StaticFilesContext);
4119
4213
  };
4120
4214
 
4121
4215
  // src/components/CurrentAsset.tsx
4122
- import { jsx as jsx36, jsxs as jsxs10 } from "react/jsx-runtime";
4216
+ import { jsx as jsx37, jsxs as jsxs11 } from "react/jsx-runtime";
4123
4217
  var CURRENT_ASSET_HEIGHT = 80;
4124
- var container8 = {
4218
+ var container9 = {
4125
4219
  height: CURRENT_ASSET_HEIGHT,
4126
4220
  display: "block",
4127
4221
  borderBottom: `1px solid ${BORDER_COLOR}`,
@@ -4163,7 +4257,7 @@ var CurrentAsset = () => {
4163
4257
  const { canvasContent } = useContext12(Internals9.CompositionManager);
4164
4258
  const assetName = canvasContent?.type === "asset" ? canvasContent.asset : null;
4165
4259
  const staticFiles = useStaticFiles();
4166
- const sizeInBytes = useMemo24(() => {
4260
+ const sizeInBytes = useMemo25(() => {
4167
4261
  if (!assetName) {
4168
4262
  return null;
4169
4263
  }
@@ -4198,8 +4292,8 @@ var CurrentAsset = () => {
4198
4292
  };
4199
4293
  }, [assetName]);
4200
4294
  if (!assetName) {
4201
- return /* @__PURE__ */ jsx36("div", {
4202
- style: container8
4295
+ return /* @__PURE__ */ jsx37("div", {
4296
+ style: container9
4203
4297
  });
4204
4298
  }
4205
4299
  const fileName = assetName.split("/").pop() ?? assetName;
@@ -4213,21 +4307,21 @@ var CurrentAsset = () => {
4213
4307
  subtitleParts.push(`${mediaMetadata.width}x${mediaMetadata.height}`);
4214
4308
  }
4215
4309
  }
4216
- return /* @__PURE__ */ jsx36("div", {
4217
- style: container8,
4218
- children: /* @__PURE__ */ jsx36("div", {
4310
+ return /* @__PURE__ */ jsx37("div", {
4311
+ style: container9,
4312
+ children: /* @__PURE__ */ jsx37("div", {
4219
4313
  style: row2,
4220
- children: /* @__PURE__ */ jsxs10("div", {
4314
+ children: /* @__PURE__ */ jsxs11("div", {
4221
4315
  children: [
4222
- /* @__PURE__ */ jsx36("div", {
4316
+ /* @__PURE__ */ jsx37("div", {
4223
4317
  style: title2,
4224
4318
  children: fileName
4225
4319
  }),
4226
- subtitleParts.length > 0 ? /* @__PURE__ */ jsx36("div", {
4320
+ subtitleParts.length > 0 ? /* @__PURE__ */ jsx37("div", {
4227
4321
  style: subtitle2,
4228
4322
  children: subtitleParts.join(" · ")
4229
4323
  }) : null,
4230
- mediaMetadata ? /* @__PURE__ */ jsx36("div", {
4324
+ mediaMetadata ? /* @__PURE__ */ jsx37("div", {
4231
4325
  style: subtitle2,
4232
4326
  children: formatDuration(mediaMetadata.duration)
4233
4327
  }) : null
@@ -4238,8 +4332,8 @@ var CurrentAsset = () => {
4238
4332
  };
4239
4333
 
4240
4334
  // src/components/AssetSelector.tsx
4241
- import { jsx as jsx37, jsxs as jsxs11 } from "react/jsx-runtime";
4242
- var container9 = {
4335
+ import { jsx as jsx38, jsxs as jsxs12 } from "react/jsx-runtime";
4336
+ var container10 = {
4243
4337
  display: "flex",
4244
4338
  flexDirection: "column",
4245
4339
  flex: 1,
@@ -4270,7 +4364,7 @@ var AssetSelector = ({ readOnlyStudio }) => {
4270
4364
  const connectionStatus = useContext13(StudioServerConnectionCtx).previewServerState.type;
4271
4365
  const shouldAllowUpload = connectionStatus === "connected" && !readOnlyStudio;
4272
4366
  const showCurrentAsset = canvasContent?.type === "asset";
4273
- const list = useMemo25(() => {
4367
+ const list = useMemo26(() => {
4274
4368
  return {
4275
4369
  ...baseList,
4276
4370
  height: showCurrentAsset ? `calc(100% - ${CURRENT_ASSET_HEIGHT}px)` : "100%"
@@ -4278,7 +4372,7 @@ var AssetSelector = ({ readOnlyStudio }) => {
4278
4372
  }, [showCurrentAsset]);
4279
4373
  const staticFiles = useStaticFiles();
4280
4374
  const publicFolderExists = window.remotion_publicFolderExists;
4281
- const assetTree = useMemo25(() => {
4375
+ const assetTree = useMemo26(() => {
4282
4376
  return buildAssetFolderStructure(staticFiles, null, assetFoldersExpanded);
4283
4377
  }, [assetFoldersExpanded, staticFiles]);
4284
4378
  const toggleFolder = useCallback19((folderName, parentName) => {
@@ -4329,41 +4423,41 @@ var AssetSelector = ({ readOnlyStudio }) => {
4329
4423
  setDropLocation(null);
4330
4424
  }
4331
4425
  }, [dropLocation]);
4332
- return /* @__PURE__ */ jsxs11("div", {
4333
- style: container9,
4426
+ return /* @__PURE__ */ jsxs12("div", {
4427
+ style: container10,
4334
4428
  onDragOver: shouldAllowUpload ? onDragOver : undefined,
4335
4429
  onDrop: shouldAllowUpload ? onDrop : undefined,
4336
4430
  children: [
4337
- showCurrentAsset ? /* @__PURE__ */ jsx37(CurrentAsset, {}) : null,
4338
- staticFiles.length === 0 ? publicFolderExists ? /* @__PURE__ */ jsx37("div", {
4431
+ showCurrentAsset ? /* @__PURE__ */ jsx38(CurrentAsset, {}) : null,
4432
+ staticFiles.length === 0 ? publicFolderExists ? /* @__PURE__ */ jsx38("div", {
4339
4433
  style: emptyState,
4340
- children: /* @__PURE__ */ jsxs11("div", {
4434
+ children: /* @__PURE__ */ jsxs12("div", {
4341
4435
  style: label,
4342
4436
  children: [
4343
4437
  "To add assets, place a file in the",
4344
4438
  " ",
4345
- /* @__PURE__ */ jsx37("code", {
4439
+ /* @__PURE__ */ jsx38("code", {
4346
4440
  style: inlineCodeSnippet,
4347
4441
  children: "public"
4348
4442
  }),
4349
4443
  " folder of your project or drag and drop a file here."
4350
4444
  ]
4351
4445
  })
4352
- }) : /* @__PURE__ */ jsx37("div", {
4446
+ }) : /* @__PURE__ */ jsx38("div", {
4353
4447
  style: emptyState,
4354
- children: /* @__PURE__ */ jsxs11("div", {
4448
+ children: /* @__PURE__ */ jsxs12("div", {
4355
4449
  style: label,
4356
4450
  children: [
4357
4451
  "To add assets, create a folder called",
4358
4452
  " ",
4359
- /* @__PURE__ */ jsx37("code", {
4453
+ /* @__PURE__ */ jsx38("code", {
4360
4454
  style: inlineCodeSnippet,
4361
4455
  children: "public"
4362
4456
  }),
4363
4457
  " in the root of your project and place a file in it."
4364
4458
  ]
4365
4459
  })
4366
- }) : /* @__PURE__ */ jsx37("div", {
4460
+ }) : /* @__PURE__ */ jsx38("div", {
4367
4461
  className: "__remotion-vertical-scrollbar",
4368
4462
  style: {
4369
4463
  ...list,
@@ -4371,7 +4465,7 @@ var AssetSelector = ({ readOnlyStudio }) => {
4371
4465
  },
4372
4466
  onDragEnter,
4373
4467
  onDragLeave,
4374
- children: /* @__PURE__ */ jsx37(AssetFolderTree, {
4468
+ children: /* @__PURE__ */ jsx38(AssetFolderTree, {
4375
4469
  item: assetTree,
4376
4470
  level: 0,
4377
4471
  parentFolder: null,
@@ -4392,11 +4486,11 @@ import {
4392
4486
  useCallback as useCallback20,
4393
4487
  useContext as useContext14,
4394
4488
  useImperativeHandle as useImperativeHandle4,
4395
- useMemo as useMemo26,
4489
+ useMemo as useMemo27,
4396
4490
  useState as useState19
4397
4491
  } from "react";
4398
4492
  import { Internals as Internals11 } from "remotion";
4399
- import { jsx as jsx38 } from "react/jsx-runtime";
4493
+ import { jsx as jsx39 } from "react/jsx-runtime";
4400
4494
  var CompSelectorRef = ({ children }) => {
4401
4495
  const { compositions } = useContext14(Internals11.CompositionManager);
4402
4496
  const [foldersExpanded, setFoldersExpanded] = useState19(loadExpandedFolders("compositions"));
@@ -4458,34 +4552,34 @@ var CompSelectorRef = ({ children }) => {
4458
4552
  }
4459
4553
  };
4460
4554
  }, [compositions, selectComposition, toggleFolder]);
4461
- const contextValue = useMemo26(() => {
4555
+ const contextValue = useMemo27(() => {
4462
4556
  return {
4463
4557
  foldersExpanded,
4464
4558
  setFoldersExpanded,
4465
4559
  toggleFolder
4466
4560
  };
4467
4561
  }, [foldersExpanded, setFoldersExpanded, toggleFolder]);
4468
- return /* @__PURE__ */ jsx38(ExpandedFoldersContext.Provider, {
4562
+ return /* @__PURE__ */ jsx39(ExpandedFoldersContext.Provider, {
4469
4563
  value: contextValue,
4470
4564
  children
4471
4565
  });
4472
4566
  };
4473
4567
 
4474
4568
  // src/components/Tabs/index.tsx
4475
- import { useCallback as useCallback21, useMemo as useMemo27, useState as useState20 } from "react";
4476
- import { jsx as jsx39 } from "react/jsx-runtime";
4569
+ import { useCallback as useCallback21, useMemo as useMemo28, useState as useState20 } from "react";
4570
+ import { jsx as jsx40 } from "react/jsx-runtime";
4477
4571
  var tabsContainer = {
4478
4572
  display: "flex",
4479
4573
  flexDirection: "row"
4480
4574
  };
4481
4575
  var Tabs = ({ children, style }) => {
4482
- const definiteStyle = useMemo27(() => {
4576
+ const definiteStyle = useMemo28(() => {
4483
4577
  return {
4484
4578
  ...tabsContainer,
4485
4579
  ...style
4486
4580
  };
4487
4581
  }, [style]);
4488
- return /* @__PURE__ */ jsx39("div", {
4582
+ return /* @__PURE__ */ jsx40("div", {
4489
4583
  style: definiteStyle,
4490
4584
  children
4491
4585
  });
@@ -4514,7 +4608,7 @@ var Tab = ({ children, onClick, style, selected }) => {
4514
4608
  const onPointerLeave = useCallback21(() => {
4515
4609
  setHovered(false);
4516
4610
  }, []);
4517
- const definiteStyle = useMemo27(() => ({
4611
+ const definiteStyle = useMemo28(() => ({
4518
4612
  ...selectorButton,
4519
4613
  backgroundColor: selected ? BACKGROUND : hovered ? CLEAR_HOVER : INPUT_BACKGROUND,
4520
4614
  color: selected ? "white" : LIGHT_TEXT,
@@ -4522,7 +4616,7 @@ var Tab = ({ children, onClick, style, selected }) => {
4522
4616
  boxShadow: selected ? "none" : undefined,
4523
4617
  ...style
4524
4618
  }), [hovered, selected, style]);
4525
- return /* @__PURE__ */ jsx39("div", {
4619
+ return /* @__PURE__ */ jsx40("div", {
4526
4620
  style: definiteStyle,
4527
4621
  role: "button",
4528
4622
  onClick,
@@ -4534,8 +4628,8 @@ var Tab = ({ children, onClick, style, selected }) => {
4534
4628
  };
4535
4629
 
4536
4630
  // src/components/ExplorerPanel.tsx
4537
- import { jsx as jsx40, jsxs as jsxs12 } from "react/jsx-runtime";
4538
- var container10 = {
4631
+ import { jsx as jsx41, jsxs as jsxs13 } from "react/jsx-runtime";
4632
+ var container11 = {
4539
4633
  height: "100%",
4540
4634
  width: "100%",
4541
4635
  maxWidth: "100%",
@@ -4580,21 +4674,21 @@ var ExplorerPanel = ({ readOnlyStudio }) => {
4580
4674
  }
4581
4675
  };
4582
4676
  }, []);
4583
- return /* @__PURE__ */ jsx40(CompSelectorRef, {
4584
- children: /* @__PURE__ */ jsxs12("div", {
4585
- style: container10,
4677
+ return /* @__PURE__ */ jsx41(CompSelectorRef, {
4678
+ children: /* @__PURE__ */ jsxs13("div", {
4679
+ style: container11,
4586
4680
  className: "css-reset",
4587
4681
  children: [
4588
- /* @__PURE__ */ jsx40("div", {
4682
+ /* @__PURE__ */ jsx41("div", {
4589
4683
  style: tabsContainer2,
4590
- children: /* @__PURE__ */ jsxs12(Tabs, {
4684
+ children: /* @__PURE__ */ jsxs13(Tabs, {
4591
4685
  children: [
4592
- /* @__PURE__ */ jsx40(Tab, {
4686
+ /* @__PURE__ */ jsx41(Tab, {
4593
4687
  selected: panel === "compositions",
4594
4688
  onClick: onCompositionsSelected,
4595
4689
  children: "Compositions"
4596
4690
  }),
4597
- /* @__PURE__ */ jsx40(Tab, {
4691
+ /* @__PURE__ */ jsx41(Tab, {
4598
4692
  selected: panel === "assets",
4599
4693
  onClick: onAssetsSelected,
4600
4694
  children: "Assets"
@@ -4602,7 +4696,7 @@ var ExplorerPanel = ({ readOnlyStudio }) => {
4602
4696
  ]
4603
4697
  })
4604
4698
  }),
4605
- panel === "compositions" ? /* @__PURE__ */ jsx40(CompositionSelector, {}) : /* @__PURE__ */ jsx40(AssetSelector, {
4699
+ panel === "compositions" ? /* @__PURE__ */ jsx41(CompositionSelector, {}) : /* @__PURE__ */ jsx41(AssetSelector, {
4606
4700
  readOnlyStudio
4607
4701
  })
4608
4702
  ]
@@ -4768,7 +4862,7 @@ import {
4768
4862
  import { AbsoluteFill } from "remotion";
4769
4863
 
4770
4864
  // src/components/ModalContainer.tsx
4771
- import { jsx as jsx41 } from "react/jsx-runtime";
4865
+ import { jsx as jsx42 } from "react/jsx-runtime";
4772
4866
  var padding = 20;
4773
4867
  var getMaxModalWidth = (width) => {
4774
4868
  return `min(calc(100vw - ${padding * 2}px), calc(${width}px - ${padding * 2}px))`;
@@ -4792,16 +4886,16 @@ var panel = {
4792
4886
  margin: "auto"
4793
4887
  };
4794
4888
  var ModalContainer = ({ children, onEscape, onOutsideClick, noZIndex }) => {
4795
- return /* @__PURE__ */ jsx41("div", {
4889
+ return /* @__PURE__ */ jsx42("div", {
4796
4890
  className: "css-reset",
4797
4891
  style: backgroundOverlay,
4798
4892
  role: "dialog",
4799
4893
  "aria-modal": "true",
4800
- children: /* @__PURE__ */ jsx41(HigherZIndex, {
4894
+ children: /* @__PURE__ */ jsx42(HigherZIndex, {
4801
4895
  disabled: noZIndex,
4802
4896
  onOutsideClick,
4803
4897
  onEscape,
4804
- children: /* @__PURE__ */ jsx41("div", {
4898
+ children: /* @__PURE__ */ jsx42("div", {
4805
4899
  style: panel,
4806
4900
  children
4807
4901
  })
@@ -4813,7 +4907,7 @@ var ModalContainer = ({ children, onEscape, onOutsideClick, noZIndex }) => {
4813
4907
  import { useCallback as useCallback24, useContext as useContext16 } from "react";
4814
4908
 
4815
4909
  // src/components/NewComposition/CancelButton.tsx
4816
- import { jsx as jsx42 } from "react/jsx-runtime";
4910
+ import { jsx as jsx43 } from "react/jsx-runtime";
4817
4911
  var style = {
4818
4912
  appearance: "none",
4819
4913
  border: "none",
@@ -4826,15 +4920,15 @@ var style = {
4826
4920
  };
4827
4921
  var CancelButton = ({ onPress, ...props }) => {
4828
4922
  const { tabIndex } = useZIndex();
4829
- return /* @__PURE__ */ jsx42("button", {
4923
+ return /* @__PURE__ */ jsx43("button", {
4830
4924
  tabIndex,
4831
4925
  style,
4832
4926
  type: "button",
4833
4927
  onClick: onPress,
4834
- children: /* @__PURE__ */ jsx42("svg", {
4928
+ children: /* @__PURE__ */ jsx43("svg", {
4835
4929
  viewBox: "0 0 320 512",
4836
4930
  ...props,
4837
- children: /* @__PURE__ */ jsx42("path", {
4931
+ children: /* @__PURE__ */ jsx43("path", {
4838
4932
  fill: "currentColor",
4839
4933
  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"
4840
4934
  })
@@ -4843,8 +4937,8 @@ var CancelButton = ({ onPress, ...props }) => {
4843
4937
  };
4844
4938
 
4845
4939
  // src/components/ModalHeader.tsx
4846
- import { jsx as jsx43, jsxs as jsxs13 } from "react/jsx-runtime";
4847
- var container11 = {
4940
+ import { jsx as jsx44, jsxs as jsxs14 } from "react/jsx-runtime";
4941
+ var container12 = {
4848
4942
  display: "flex",
4849
4943
  flexDirection: "row",
4850
4944
  alignItems: "center",
@@ -4865,15 +4959,15 @@ var ModalHeader = ({ title: title3, onClose }) => {
4865
4959
  const onPress = useCallback24(() => {
4866
4960
  setSelectedModal(null);
4867
4961
  }, [setSelectedModal]);
4868
- return /* @__PURE__ */ jsxs13("div", {
4869
- style: container11,
4962
+ return /* @__PURE__ */ jsxs14("div", {
4963
+ style: container12,
4870
4964
  children: [
4871
- /* @__PURE__ */ jsx43("div", {
4965
+ /* @__PURE__ */ jsx44("div", {
4872
4966
  style: titleStyle,
4873
4967
  children: title3
4874
4968
  }),
4875
- /* @__PURE__ */ jsx43(Flex, {}),
4876
- /* @__PURE__ */ jsx43(CancelButton, {
4969
+ /* @__PURE__ */ jsx44(Flex, {}),
4970
+ /* @__PURE__ */ jsx44(CancelButton, {
4877
4971
  style: icon,
4878
4972
  onPress: onClose ?? onPress
4879
4973
  })
@@ -4882,8 +4976,8 @@ var ModalHeader = ({ title: title3, onClose }) => {
4882
4976
  };
4883
4977
 
4884
4978
  // src/components/AskAiModal.tsx
4885
- import { jsx as jsx44, jsxs as jsxs14 } from "react/jsx-runtime";
4886
- var container12 = {
4979
+ import { jsx as jsx45, jsxs as jsxs15 } from "react/jsx-runtime";
4980
+ var container13 = {
4887
4981
  height: "calc(100vh - 100px)",
4888
4982
  width: "calc(100vw - 160px)",
4889
4983
  maxWidth: 800,
@@ -4935,21 +5029,21 @@ var AskAiModal = () => {
4935
5029
  if (state === "never-opened") {
4936
5030
  return null;
4937
5031
  }
4938
- return /* @__PURE__ */ jsx44(AbsoluteFill, {
5032
+ return /* @__PURE__ */ jsx45(AbsoluteFill, {
4939
5033
  style: { display: state === "visible" ? "block" : "none" },
4940
- children: /* @__PURE__ */ jsxs14(ModalContainer, {
5034
+ children: /* @__PURE__ */ jsxs15(ModalContainer, {
4941
5035
  noZIndex: state === "hidden",
4942
5036
  onOutsideClick: onQuit,
4943
5037
  onEscape: onQuit,
4944
5038
  children: [
4945
- /* @__PURE__ */ jsx44(ModalHeader, {
5039
+ /* @__PURE__ */ jsx45(ModalHeader, {
4946
5040
  title: "Ask AI",
4947
5041
  onClose: onQuit
4948
5042
  }),
4949
- /* @__PURE__ */ jsx44("iframe", {
5043
+ /* @__PURE__ */ jsx45("iframe", {
4950
5044
  ref: iframe,
4951
5045
  frameBorder: 0,
4952
- style: container12,
5046
+ style: container13,
4953
5047
  src: "https://www.remotion.dev/ai-embed",
4954
5048
  allow: "clipboard-read; clipboard-write"
4955
5049
  })
@@ -4959,32 +5053,32 @@ var AskAiModal = () => {
4959
5053
  };
4960
5054
 
4961
5055
  // src/components/SizeSelector.tsx
4962
- import { useContext as useContext20, useMemo as useMemo34 } from "react";
5056
+ import { useContext as useContext20, useMemo as useMemo35 } from "react";
4963
5057
  import { Internals as Internals14 } from "remotion";
4964
5058
 
4965
5059
  // src/icons/Checkmark.tsx
4966
- import { jsx as jsx45 } from "react/jsx-runtime";
5060
+ import { jsx as jsx46 } from "react/jsx-runtime";
4967
5061
  var style2 = {
4968
5062
  width: 14,
4969
5063
  height: 14
4970
5064
  };
4971
- var Checkmark = () => /* @__PURE__ */ jsx45("svg", {
5065
+ var Checkmark = () => /* @__PURE__ */ jsx46("svg", {
4972
5066
  focusable: "false",
4973
5067
  role: "img",
4974
5068
  viewBox: "0 0 512 512",
4975
5069
  style: style2,
4976
- children: /* @__PURE__ */ jsx45("path", {
5070
+ children: /* @__PURE__ */ jsx46("path", {
4977
5071
  fill: "currentColor",
4978
5072
  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"
4979
5073
  })
4980
5074
  });
4981
5075
 
4982
5076
  // src/components/ControlButton.tsx
4983
- import { useMemo as useMemo28 } from "react";
4984
- import { jsx as jsx46 } from "react/jsx-runtime";
5077
+ import { useMemo as useMemo29 } from "react";
5078
+ import { jsx as jsx47 } from "react/jsx-runtime";
4985
5079
  var CONTROL_BUTTON_PADDING = 6;
4986
5080
  var ControlButton = (props) => {
4987
- const style3 = useMemo28(() => {
5081
+ const style3 = useMemo29(() => {
4988
5082
  return {
4989
5083
  opacity: props.disabled ? 0.5 : 1,
4990
5084
  display: "inline-flex",
@@ -4994,7 +5088,7 @@ var ControlButton = (props) => {
4994
5088
  };
4995
5089
  }, [props.disabled]);
4996
5090
  const { tabIndex } = useZIndex();
4997
- return /* @__PURE__ */ jsx46("button", {
5091
+ return /* @__PURE__ */ jsx47("button", {
4998
5092
  type: "button",
4999
5093
  tabIndex,
5000
5094
  ...props,
@@ -5004,10 +5098,10 @@ var ControlButton = (props) => {
5004
5098
 
5005
5099
  // src/components/NewComposition/ComboBox.tsx
5006
5100
  import { PlayerInternals as PlayerInternals5 } from "@remotion/player";
5007
- import { useCallback as useCallback26, useEffect as useEffect17, useMemo as useMemo29, useRef as useRef14, useState as useState23 } from "react";
5101
+ import { useCallback as useCallback26, useEffect as useEffect17, useMemo as useMemo30, useRef as useRef14, useState as useState23 } from "react";
5008
5102
  import ReactDOM4 from "react-dom";
5009
- import { jsx as jsx47, jsxs as jsxs15, Fragment as Fragment6 } from "react/jsx-runtime";
5010
- var container13 = {
5103
+ import { jsx as jsx48, jsxs as jsxs16, Fragment as Fragment6 } from "react/jsx-runtime";
5104
+ var container14 = {
5011
5105
  padding: "8px 10px",
5012
5106
  display: "inline-block",
5013
5107
  backgroundColor: INPUT_BACKGROUND,
@@ -5081,25 +5175,25 @@ var Combobox = ({ values, selectedId, style: customStyle, title: title3 }) => {
5081
5175
  current.removeEventListener("click", onClick);
5082
5176
  };
5083
5177
  }, [refresh]);
5084
- const spaceToBottom = useMemo29(() => {
5178
+ const spaceToBottom = useMemo30(() => {
5085
5179
  const margin2 = 10;
5086
5180
  if (size && opened) {
5087
5181
  return size.windowSize.height - (size.top + size.height) - margin2;
5088
5182
  }
5089
5183
  return 0;
5090
5184
  }, [opened, size]);
5091
- const spaceToTop = useMemo29(() => {
5185
+ const spaceToTop = useMemo30(() => {
5092
5186
  const margin2 = 10;
5093
5187
  if (size && opened) {
5094
5188
  return size.top - margin2;
5095
5189
  }
5096
5190
  return 0;
5097
5191
  }, [opened, size]);
5098
- const derivedMaxHeight = useMemo29(() => {
5192
+ const derivedMaxHeight = useMemo30(() => {
5099
5193
  return spaceToTop > spaceToBottom ? spaceToTop : spaceToBottom;
5100
5194
  }, [spaceToBottom, spaceToTop]);
5101
5195
  const isMobileLayout = useMobileLayout();
5102
- const portalStyle = useMemo29(() => {
5196
+ const portalStyle = useMemo30(() => {
5103
5197
  if (!opened || !size) {
5104
5198
  return null;
5105
5199
  }
@@ -5126,9 +5220,9 @@ var Combobox = ({ values, selectedId, style: customStyle, title: title3 }) => {
5126
5220
  };
5127
5221
  }, [isMobileLayout, opened, size, spaceToBottom, spaceToTop]);
5128
5222
  const selected = values.find((v) => v.id === selectedId);
5129
- const style3 = useMemo29(() => {
5223
+ const style3 = useMemo30(() => {
5130
5224
  return {
5131
- ...container13,
5225
+ ...container14,
5132
5226
  ...customStyle ?? {},
5133
5227
  userSelect: "none",
5134
5228
  WebkitUserSelect: "none",
@@ -5139,9 +5233,9 @@ var Combobox = ({ values, selectedId, style: customStyle, title: title3 }) => {
5139
5233
  borderColor: opened ? SELECTED_BACKGROUND : hovered ? INPUT_BORDER_COLOR_HOVERED : INPUT_BORDER_COLOR_UNHOVERED
5140
5234
  };
5141
5235
  }, [customStyle, hovered, opened]);
5142
- return /* @__PURE__ */ jsxs15(Fragment6, {
5236
+ return /* @__PURE__ */ jsxs16(Fragment6, {
5143
5237
  children: [
5144
- /* @__PURE__ */ jsxs15("button", {
5238
+ /* @__PURE__ */ jsxs16("button", {
5145
5239
  ref,
5146
5240
  title: title3,
5147
5241
  tabIndex,
@@ -5149,29 +5243,29 @@ var Combobox = ({ values, selectedId, style: customStyle, title: title3 }) => {
5149
5243
  style: style3,
5150
5244
  className: MENU_INITIATOR_CLASSNAME,
5151
5245
  children: [
5152
- selected ? /* @__PURE__ */ jsx47("div", {
5246
+ selected ? /* @__PURE__ */ jsx48("div", {
5153
5247
  title: typeof selected.label === "string" ? selected.label : undefined,
5154
5248
  style: label2,
5155
5249
  children: selected?.label
5156
5250
  }) : null,
5157
- /* @__PURE__ */ jsx47(Spacing, {
5251
+ /* @__PURE__ */ jsx48(Spacing, {
5158
5252
  x: 1
5159
5253
  }),
5160
5254
  " ",
5161
- /* @__PURE__ */ jsx47(CaretDown, {})
5255
+ /* @__PURE__ */ jsx48(CaretDown, {})
5162
5256
  ]
5163
5257
  }),
5164
- portalStyle ? ReactDOM4.createPortal(/* @__PURE__ */ jsx47("div", {
5258
+ portalStyle ? ReactDOM4.createPortal(/* @__PURE__ */ jsx48("div", {
5165
5259
  style: fullScreenOverlay,
5166
- children: /* @__PURE__ */ jsx47("div", {
5260
+ children: /* @__PURE__ */ jsx48("div", {
5167
5261
  style: outerPortal,
5168
5262
  className: "css-reset",
5169
- children: /* @__PURE__ */ jsx47(HigherZIndex, {
5263
+ children: /* @__PURE__ */ jsx48(HigherZIndex, {
5170
5264
  onOutsideClick: onHide,
5171
5265
  onEscape: onHide,
5172
- children: /* @__PURE__ */ jsx47("div", {
5266
+ children: /* @__PURE__ */ jsx48("div", {
5173
5267
  style: portalStyle,
5174
- children: /* @__PURE__ */ jsx47(MenuContent, {
5268
+ children: /* @__PURE__ */ jsx48(MenuContent, {
5175
5269
  onNextMenu: noop,
5176
5270
  onPreviousMenu: noop,
5177
5271
  values,
@@ -5191,7 +5285,7 @@ var Combobox = ({ values, selectedId, style: customStyle, title: title3 }) => {
5191
5285
 
5192
5286
  // src/components/Preview.tsx
5193
5287
  import { PlayerInternals as PlayerInternals6 } from "@remotion/player";
5194
- import { useContext as useContext19, useEffect as useEffect23, useMemo as useMemo33, useRef as useRef17 } from "react";
5288
+ import { useContext as useContext19, useEffect as useEffect23, useMemo as useMemo34, useRef as useRef17 } from "react";
5195
5289
  import { Internals as Internals13 } from "remotion";
5196
5290
 
5197
5291
  // src/helpers/checkerboard-background.ts
@@ -5323,7 +5417,7 @@ import {
5323
5417
  forwardRef as forwardRef2,
5324
5418
  useEffect as useEffect19,
5325
5419
  useImperativeHandle as useImperativeHandle8,
5326
- useMemo as useMemo31,
5420
+ useMemo as useMemo32,
5327
5421
  useRef as useRef16,
5328
5422
  useState as useState25
5329
5423
  } from "react";
@@ -5333,17 +5427,17 @@ import {
5333
5427
  forwardRef,
5334
5428
  useEffect as useEffect18,
5335
5429
  useImperativeHandle as useImperativeHandle7,
5336
- useMemo as useMemo30,
5430
+ useMemo as useMemo31,
5337
5431
  useRef as useRef15,
5338
5432
  useState as useState24
5339
5433
  } from "react";
5340
- import { jsx as jsx48 } from "react/jsx-runtime";
5434
+ import { jsx as jsx49 } from "react/jsx-runtime";
5341
5435
  var INPUT_HORIZONTAL_PADDING = 8;
5342
5436
  var aligner = {
5343
5437
  marginRight: -INPUT_HORIZONTAL_PADDING
5344
5438
  };
5345
5439
  var RightAlignInput = ({ children }) => {
5346
- return /* @__PURE__ */ jsx48("div", {
5440
+ return /* @__PURE__ */ jsx49("div", {
5347
5441
  style: aligner,
5348
5442
  children
5349
5443
  });
@@ -5365,7 +5459,7 @@ var RemInputForwardRef = ({ status, rightAlign, ...props }, ref) => {
5365
5459
  const [isHovered, setIsHovered] = useState24(false);
5366
5460
  const inputRef = useRef15(null);
5367
5461
  const { tabIndex } = useZIndex();
5368
- const style3 = useMemo30(() => {
5462
+ const style3 = useMemo31(() => {
5369
5463
  return {
5370
5464
  backgroundColor: INPUT_BACKGROUND,
5371
5465
  ...inputBaseStyle,
@@ -5398,7 +5492,7 @@ var RemInputForwardRef = ({ status, rightAlign, ...props }, ref) => {
5398
5492
  current.removeEventListener("mouseleave", onMouseLeave);
5399
5493
  };
5400
5494
  }, [inputRef]);
5401
- return /* @__PURE__ */ jsx48("input", {
5495
+ return /* @__PURE__ */ jsx49("input", {
5402
5496
  ref: inputRef,
5403
5497
  tabIndex,
5404
5498
  ...props,
@@ -5408,7 +5502,7 @@ var RemInputForwardRef = ({ status, rightAlign, ...props }, ref) => {
5408
5502
  var RemotionInput = forwardRef(RemInputForwardRef);
5409
5503
 
5410
5504
  // src/components/NewComposition/RemTextarea.tsx
5411
- import { jsx as jsx49 } from "react/jsx-runtime";
5505
+ import { jsx as jsx50 } from "react/jsx-runtime";
5412
5506
  var inputBaseStyle2 = {
5413
5507
  padding: `${INPUT_HORIZONTAL_PADDING}px 10px`,
5414
5508
  color: "white",
@@ -5426,7 +5520,7 @@ var RemTextareaFRFunction = ({ status, ...props }, ref) => {
5426
5520
  useImperativeHandle8(ref, () => {
5427
5521
  return inputRef.current;
5428
5522
  }, []);
5429
- const style3 = useMemo31(() => {
5523
+ const style3 = useMemo32(() => {
5430
5524
  return {
5431
5525
  backgroundColor: INPUT_BACKGROUND,
5432
5526
  ...inputBaseStyle2,
@@ -5489,7 +5583,7 @@ var RemTextareaFRFunction = ({ status, ...props }, ref) => {
5489
5583
  current.removeEventListener("keydown", onKeyDown);
5490
5584
  };
5491
5585
  }, [inputRef]);
5492
- return /* @__PURE__ */ jsx49("textarea", {
5586
+ return /* @__PURE__ */ jsx50("textarea", {
5493
5587
  ref: inputRef,
5494
5588
  tabIndex,
5495
5589
  ...props,
@@ -5500,7 +5594,7 @@ var RemTextareaFRFunction = ({ status, ...props }, ref) => {
5500
5594
  var RemTextarea = forwardRef2(RemTextareaFRFunction);
5501
5595
 
5502
5596
  // src/components/JSONViewer.tsx
5503
- import { jsx as jsx50 } from "react/jsx-runtime";
5597
+ import { jsx as jsx51 } from "react/jsx-runtime";
5504
5598
  var jsonStyle = {
5505
5599
  marginTop: 14,
5506
5600
  marginBottom: 14,
@@ -5514,7 +5608,7 @@ var JSONViewer = ({ src }) => {
5514
5608
  setJson(JSON.stringify(jsonRes, null, 2));
5515
5609
  });
5516
5610
  }, [src]);
5517
- return /* @__PURE__ */ jsx50(RemTextarea, {
5611
+ return /* @__PURE__ */ jsx51(RemTextarea, {
5518
5612
  value: json ?? undefined,
5519
5613
  status: "ok",
5520
5614
  onChange: () => {
@@ -5526,7 +5620,7 @@ var JSONViewer = ({ src }) => {
5526
5620
 
5527
5621
  // src/components/TextViewer.tsx
5528
5622
  import { useEffect as useEffect21, useState as useState27 } from "react";
5529
- import { jsxs as jsxs16 } from "react/jsx-runtime";
5623
+ import { jsxs as jsxs17 } from "react/jsx-runtime";
5530
5624
  var textStyle = {
5531
5625
  margin: 14,
5532
5626
  fontFamily: "monospace",
@@ -5545,7 +5639,7 @@ var TextViewer = ({ src }) => {
5545
5639
  setTxt(text);
5546
5640
  });
5547
5641
  }, [src]);
5548
- return /* @__PURE__ */ jsxs16("div", {
5642
+ return /* @__PURE__ */ jsxs17("div", {
5549
5643
  style: textStyle,
5550
5644
  children: [
5551
5645
  txt,
@@ -5555,7 +5649,7 @@ var TextViewer = ({ src }) => {
5555
5649
  };
5556
5650
 
5557
5651
  // src/components/FilePreview.tsx
5558
- import { jsx as jsx51, jsxs as jsxs17, Fragment as Fragment7 } from "react/jsx-runtime";
5652
+ import { jsx as jsx52, jsxs as jsxs18, Fragment as Fragment7 } from "react/jsx-runtime";
5559
5653
  var msgStyle = {
5560
5654
  fontSize: 13,
5561
5655
  color: "white",
@@ -5571,42 +5665,42 @@ var FilePreview = ({ fileType, src, currentAsset, assetMetadata }) => {
5571
5665
  throw new Error('expected to have assetMetadata, got "not-found"');
5572
5666
  }
5573
5667
  if (fileType === "audio") {
5574
- return /* @__PURE__ */ jsx51("audio", {
5668
+ return /* @__PURE__ */ jsx52("audio", {
5575
5669
  src,
5576
5670
  controls: true
5577
5671
  });
5578
5672
  }
5579
5673
  if (fileType === "video") {
5580
- return /* @__PURE__ */ jsx51("video", {
5674
+ return /* @__PURE__ */ jsx52("video", {
5581
5675
  src,
5582
5676
  controls: true
5583
5677
  });
5584
5678
  }
5585
5679
  if (fileType === "image") {
5586
- return /* @__PURE__ */ jsx51("img", {
5680
+ return /* @__PURE__ */ jsx52("img", {
5587
5681
  src
5588
5682
  });
5589
5683
  }
5590
5684
  if (fileType === "json") {
5591
- return /* @__PURE__ */ jsx51(JSONViewer, {
5685
+ return /* @__PURE__ */ jsx52(JSONViewer, {
5592
5686
  src
5593
5687
  });
5594
5688
  }
5595
5689
  if (fileType === "txt") {
5596
- return /* @__PURE__ */ jsx51(TextViewer, {
5690
+ return /* @__PURE__ */ jsx52(TextViewer, {
5597
5691
  src
5598
5692
  });
5599
5693
  }
5600
- return /* @__PURE__ */ jsxs17(Fragment7, {
5694
+ return /* @__PURE__ */ jsxs18(Fragment7, {
5601
5695
  children: [
5602
- /* @__PURE__ */ jsx51("div", {
5696
+ /* @__PURE__ */ jsx52("div", {
5603
5697
  style: msgStyle,
5604
5698
  children: currentAsset
5605
5699
  }),
5606
- /* @__PURE__ */ jsx51(Spacing, {
5700
+ /* @__PURE__ */ jsx52(Spacing, {
5607
5701
  y: 0.5
5608
5702
  }),
5609
- /* @__PURE__ */ jsxs17("div", {
5703
+ /* @__PURE__ */ jsxs18("div", {
5610
5704
  style: msgStyle,
5611
5705
  children: [
5612
5706
  "Size: ",
@@ -5619,7 +5713,7 @@ var FilePreview = ({ fileType, src, currentAsset, assetMetadata }) => {
5619
5713
  };
5620
5714
 
5621
5715
  // src/components/RenderPreview.tsx
5622
- import { jsx as jsx52, jsxs as jsxs18 } from "react/jsx-runtime";
5716
+ import { jsx as jsx53, jsxs as jsxs19 } from "react/jsx-runtime";
5623
5717
  var msgStyle2 = {
5624
5718
  fontSize: 13,
5625
5719
  color: "white",
@@ -5668,13 +5762,13 @@ var RenderPreview = ({ path, assetMetadata, getBlob }) => {
5668
5762
  }, [getBlob]);
5669
5763
  const src = blobUrl ?? remotion_outputsBase + path;
5670
5764
  if (connectionStatus === "disconnected") {
5671
- return /* @__PURE__ */ jsx52("div", {
5765
+ return /* @__PURE__ */ jsx53("div", {
5672
5766
  style: errMsgStyle,
5673
5767
  children: "Studio server disconnected"
5674
5768
  });
5675
5769
  }
5676
5770
  if (getBlob && blobError) {
5677
- return /* @__PURE__ */ jsxs18("div", {
5771
+ return /* @__PURE__ */ jsxs19("div", {
5678
5772
  style: errMsgStyle,
5679
5773
  children: [
5680
5774
  "Failed to load preview: ",
@@ -5683,12 +5777,12 @@ var RenderPreview = ({ path, assetMetadata, getBlob }) => {
5683
5777
  });
5684
5778
  }
5685
5779
  if (getBlob && !blobUrl) {
5686
- return /* @__PURE__ */ jsx52("div", {
5780
+ return /* @__PURE__ */ jsx53("div", {
5687
5781
  style: msgStyle2,
5688
5782
  children: "Loading preview..."
5689
5783
  });
5690
5784
  }
5691
- return /* @__PURE__ */ jsx52(FilePreview, {
5785
+ return /* @__PURE__ */ jsx53(FilePreview, {
5692
5786
  assetMetadata,
5693
5787
  currentAsset: path,
5694
5788
  fileType,
@@ -5697,23 +5791,23 @@ var RenderPreview = ({ path, assetMetadata, getBlob }) => {
5697
5791
  };
5698
5792
 
5699
5793
  // src/components/Spinner.tsx
5700
- import { useMemo as useMemo32 } from "react";
5701
- import { jsx as jsx53, jsxs as jsxs19, Fragment as Fragment8 } from "react/jsx-runtime";
5794
+ import { useMemo as useMemo33 } from "react";
5795
+ import { jsx as jsx54, jsxs as jsxs20, Fragment as Fragment8 } from "react/jsx-runtime";
5702
5796
  var viewBox = 100;
5703
5797
  var lines = 8;
5704
5798
  var className = "__remotion_spinner_line";
5705
5799
  var remotionSpinnerAnimation = "__remotion_spinner_animation";
5706
5800
  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";
5707
5801
  var Spinner = ({ size, duration }) => {
5708
- const style3 = useMemo32(() => {
5802
+ const style3 = useMemo33(() => {
5709
5803
  return {
5710
5804
  width: size,
5711
5805
  height: size
5712
5806
  };
5713
5807
  }, [size]);
5714
- return /* @__PURE__ */ jsxs19(Fragment8, {
5808
+ return /* @__PURE__ */ jsxs20(Fragment8, {
5715
5809
  children: [
5716
- /* @__PURE__ */ jsx53("style", {
5810
+ /* @__PURE__ */ jsx54("style", {
5717
5811
  type: "text/css",
5718
5812
  children: `
5719
5813
  @keyframes ${remotionSpinnerAnimation} {
@@ -5730,11 +5824,11 @@ var Spinner = ({ size, duration }) => {
5730
5824
  }
5731
5825
  `
5732
5826
  }),
5733
- /* @__PURE__ */ jsx53("svg", {
5827
+ /* @__PURE__ */ jsx54("svg", {
5734
5828
  style: style3,
5735
5829
  viewBox: `0 0 ${viewBox} ${viewBox}`,
5736
5830
  children: new Array(lines).fill(true).map((_, index) => {
5737
- return /* @__PURE__ */ jsx53("path", {
5831
+ return /* @__PURE__ */ jsx54("path", {
5738
5832
  className,
5739
5833
  style: {
5740
5834
  rotate: `${index * Math.PI * 2 / lines}rad`,
@@ -5753,7 +5847,7 @@ var Spinner = ({ size, duration }) => {
5753
5847
  // src/components/StaticFilePreview.tsx
5754
5848
  import { useContext as useContext18 } from "react";
5755
5849
  import { staticFile as staticFile3 } from "remotion";
5756
- import { jsx as jsx54, jsxs as jsxs20 } from "react/jsx-runtime";
5850
+ import { jsx as jsx55, jsxs as jsxs21 } from "react/jsx-runtime";
5757
5851
  var msgStyle3 = {
5758
5852
  fontSize: 13,
5759
5853
  color: "white",
@@ -5772,13 +5866,13 @@ var StaticFilePreview = ({ currentAsset, assetMetadata }) => {
5772
5866
  const connectionStatus = useContext18(StudioServerConnectionCtx).previewServerState.type;
5773
5867
  const exists = staticFiles.find((file) => file.name === currentAsset);
5774
5868
  if (connectionStatus === "disconnected") {
5775
- return /* @__PURE__ */ jsx54("div", {
5869
+ return /* @__PURE__ */ jsx55("div", {
5776
5870
  style: errMsgStyle2,
5777
5871
  children: "Studio server disconnected"
5778
5872
  });
5779
5873
  }
5780
5874
  if (!exists) {
5781
- return /* @__PURE__ */ jsxs20("div", {
5875
+ return /* @__PURE__ */ jsxs21("div", {
5782
5876
  style: errMsgStyle2,
5783
5877
  children: [
5784
5878
  currentAsset,
@@ -5789,7 +5883,7 @@ var StaticFilePreview = ({ currentAsset, assetMetadata }) => {
5789
5883
  if (!currentAsset) {
5790
5884
  return null;
5791
5885
  }
5792
- return /* @__PURE__ */ jsx54(FilePreview, {
5886
+ return /* @__PURE__ */ jsx55(FilePreview, {
5793
5887
  currentAsset,
5794
5888
  fileType,
5795
5889
  src: `${staticFileSrc}?date=${assetMetadata && assetMetadata.type === "found" ? assetMetadata.fetchedAt : 0}`,
@@ -5798,7 +5892,7 @@ var StaticFilePreview = ({ currentAsset, assetMetadata }) => {
5798
5892
  };
5799
5893
 
5800
5894
  // src/components/Preview.tsx
5801
- import { jsx as jsx55 } from "react/jsx-runtime";
5895
+ import { jsx as jsx56 } from "react/jsx-runtime";
5802
5896
  var centeredContainer = {
5803
5897
  display: "flex",
5804
5898
  flex: 1,
@@ -5856,24 +5950,24 @@ var containerStyle = (options) => {
5856
5950
  };
5857
5951
  var VideoPreview = ({ canvasSize, contentDimensions, canvasContent, assetMetadata }) => {
5858
5952
  if (assetMetadata && assetMetadata.type === "not-found") {
5859
- return /* @__PURE__ */ jsx55("div", {
5953
+ return /* @__PURE__ */ jsx56("div", {
5860
5954
  style: centeredContainer,
5861
- children: /* @__PURE__ */ jsx55("div", {
5955
+ children: /* @__PURE__ */ jsx56("div", {
5862
5956
  style: label3,
5863
5957
  children: "File does not exist"
5864
5958
  })
5865
5959
  });
5866
5960
  }
5867
5961
  if (contentDimensions === null) {
5868
- return /* @__PURE__ */ jsx55("div", {
5962
+ return /* @__PURE__ */ jsx56("div", {
5869
5963
  style: centeredContainer,
5870
- children: /* @__PURE__ */ jsx55(Spinner, {
5964
+ children: /* @__PURE__ */ jsx56(Spinner, {
5871
5965
  duration: 0.5,
5872
5966
  size: 24
5873
5967
  })
5874
5968
  });
5875
5969
  }
5876
- return /* @__PURE__ */ jsx55(CompWhenItHasDimensions, {
5970
+ return /* @__PURE__ */ jsx56(CompWhenItHasDimensions, {
5877
5971
  contentDimensions,
5878
5972
  canvasSize,
5879
5973
  canvasContent,
@@ -5882,7 +5976,7 @@ var VideoPreview = ({ canvasSize, contentDimensions, canvasContent, assetMetadat
5882
5976
  };
5883
5977
  var CompWhenItHasDimensions = ({ contentDimensions, canvasSize, canvasContent, assetMetadata }) => {
5884
5978
  const { size: previewSize } = useContext19(Internals13.PreviewSizeContext);
5885
- const { centerX, centerY, yCorrection, xCorrection, scale } = useMemo33(() => {
5979
+ const { centerX, centerY, yCorrection, xCorrection, scale } = useMemo34(() => {
5886
5980
  if (contentDimensions === "none") {
5887
5981
  return {
5888
5982
  centerX: 0,
@@ -5899,7 +5993,7 @@ var CompWhenItHasDimensions = ({ contentDimensions, canvasSize, canvasContent, a
5899
5993
  previewSize: previewSize.size
5900
5994
  });
5901
5995
  }, [canvasSize, contentDimensions, previewSize.size]);
5902
- const outer = useMemo33(() => {
5996
+ const outer = useMemo34(() => {
5903
5997
  return {
5904
5998
  width: contentDimensions === "none" ? "100%" : contentDimensions.width * scale,
5905
5999
  height: contentDimensions === "none" ? "100%" : contentDimensions.height * scale,
@@ -5922,36 +6016,36 @@ var CompWhenItHasDimensions = ({ contentDimensions, canvasSize, canvasContent, a
5922
6016
  canvasContent
5923
6017
  ]);
5924
6018
  if (canvasContent.type === "asset") {
5925
- return /* @__PURE__ */ jsx55("div", {
6019
+ return /* @__PURE__ */ jsx56("div", {
5926
6020
  style: outer,
5927
- children: /* @__PURE__ */ jsx55(StaticFilePreview, {
6021
+ children: /* @__PURE__ */ jsx56(StaticFilePreview, {
5928
6022
  assetMetadata,
5929
6023
  currentAsset: canvasContent.asset
5930
6024
  })
5931
6025
  });
5932
6026
  }
5933
6027
  if (canvasContent.type === "output") {
5934
- return /* @__PURE__ */ jsx55("div", {
6028
+ return /* @__PURE__ */ jsx56("div", {
5935
6029
  style: outer,
5936
- children: /* @__PURE__ */ jsx55(RenderPreview, {
6030
+ children: /* @__PURE__ */ jsx56(RenderPreview, {
5937
6031
  path: canvasContent.path,
5938
6032
  assetMetadata
5939
6033
  })
5940
6034
  });
5941
6035
  }
5942
6036
  if (canvasContent.type === "output-blob") {
5943
- return /* @__PURE__ */ jsx55("div", {
6037
+ return /* @__PURE__ */ jsx56("div", {
5944
6038
  style: outer,
5945
- children: /* @__PURE__ */ jsx55(RenderPreview, {
6039
+ children: /* @__PURE__ */ jsx56(RenderPreview, {
5946
6040
  path: canvasContent.displayName,
5947
6041
  assetMetadata,
5948
6042
  getBlob: canvasContent.getBlob
5949
6043
  })
5950
6044
  });
5951
6045
  }
5952
- return /* @__PURE__ */ jsx55("div", {
6046
+ return /* @__PURE__ */ jsx56("div", {
5953
6047
  style: outer,
5954
- children: /* @__PURE__ */ jsx55(PortalContainer, {
6048
+ children: /* @__PURE__ */ jsx56(PortalContainer, {
5955
6049
  contentDimensions,
5956
6050
  scale,
5957
6051
  xCorrection,
@@ -5961,7 +6055,7 @@ var CompWhenItHasDimensions = ({ contentDimensions, canvasSize, canvasContent, a
5961
6055
  };
5962
6056
  var PortalContainer = ({ scale, xCorrection, yCorrection, contentDimensions }) => {
5963
6057
  const { checkerboard } = useContext19(CheckerboardContext);
5964
- const style3 = useMemo33(() => {
6058
+ const style3 = useMemo34(() => {
5965
6059
  return containerStyle({
5966
6060
  checkerboard,
5967
6061
  scale,
@@ -5986,14 +6080,14 @@ var PortalContainer = ({ scale, xCorrection, yCorrection, contentDimensions }) =
5986
6080
  };
5987
6081
  }, []);
5988
6082
  const portalContainer = useRef17(null);
5989
- return /* @__PURE__ */ jsx55("div", {
6083
+ return /* @__PURE__ */ jsx56("div", {
5990
6084
  ref: portalContainer,
5991
6085
  style: style3
5992
6086
  });
5993
6087
  };
5994
6088
 
5995
6089
  // src/components/SizeSelector.tsx
5996
- import { jsx as jsx56 } from "react/jsx-runtime";
6090
+ import { jsx as jsx57 } from "react/jsx-runtime";
5997
6091
  var commonPreviewSizes = [
5998
6092
  {
5999
6093
  size: "auto",
@@ -6054,12 +6148,12 @@ var zoomableFileTypes = ["video", "image"];
6054
6148
  var SizeSelector = () => {
6055
6149
  const { size, setSize } = useContext20(Internals14.PreviewSizeContext);
6056
6150
  const { canvasContent } = useContext20(Internals14.CompositionManager);
6057
- const style3 = useMemo34(() => {
6151
+ const style3 = useMemo35(() => {
6058
6152
  return {
6059
6153
  padding: CONTROL_BUTTON_PADDING
6060
6154
  };
6061
6155
  }, []);
6062
- const zoomable = useMemo34(() => {
6156
+ const zoomable = useMemo35(() => {
6063
6157
  if (!canvasContent) {
6064
6158
  return null;
6065
6159
  }
@@ -6074,7 +6168,7 @@ var SizeSelector = () => {
6074
6168
  }
6075
6169
  return false;
6076
6170
  }, [canvasContent]);
6077
- const items = useMemo34(() => {
6171
+ const items = useMemo35(() => {
6078
6172
  return getUniqueSizes(size).map((newSize) => {
6079
6173
  return {
6080
6174
  id: String(newSize.size),
@@ -6087,7 +6181,7 @@ var SizeSelector = () => {
6087
6181
  type: "item",
6088
6182
  value: newSize.size,
6089
6183
  keyHint: newSize.size === "auto" ? "0" : null,
6090
- leftItem: String(size.size) === String(newSize.size) ? /* @__PURE__ */ jsx56(Checkmark, {}) : null,
6184
+ leftItem: String(size.size) === String(newSize.size) ? /* @__PURE__ */ jsx57(Checkmark, {}) : null,
6091
6185
  subMenu: null,
6092
6186
  quickSwitcherLabel: null
6093
6187
  };
@@ -6096,10 +6190,10 @@ var SizeSelector = () => {
6096
6190
  if (!zoomable) {
6097
6191
  return null;
6098
6192
  }
6099
- return /* @__PURE__ */ jsx56("div", {
6193
+ return /* @__PURE__ */ jsx57("div", {
6100
6194
  style: style3,
6101
6195
  "aria-label": accessibilityLabel,
6102
- children: /* @__PURE__ */ jsx56(Combobox, {
6196
+ children: /* @__PURE__ */ jsx57(Combobox, {
6103
6197
  title: accessibilityLabel,
6104
6198
  style: comboStyle,
6105
6199
  selectedId: String(size.size),
@@ -6120,13 +6214,13 @@ import { Internals as Internals16 } from "remotion";
6120
6214
  import { NoReactInternals as NoReactInternals4 } from "remotion/no-react";
6121
6215
 
6122
6216
  // src/icons/timelineInOutPointer.tsx
6123
- import { jsx as jsx57 } from "react/jsx-runtime";
6217
+ import { jsx as jsx58 } from "react/jsx-runtime";
6124
6218
  var TimelineInPointer = (props) => {
6125
- return /* @__PURE__ */ jsx57("svg", {
6219
+ return /* @__PURE__ */ jsx58("svg", {
6126
6220
  viewBox: "0 0 256 256",
6127
6221
  fill: "none",
6128
6222
  ...props,
6129
- children: /* @__PURE__ */ jsx57("path", {
6223
+ children: /* @__PURE__ */ jsx58("path", {
6130
6224
  d: "M158 25H99V230.5H158",
6131
6225
  stroke: props.color,
6132
6226
  strokeWidth: "42",
@@ -6136,11 +6230,11 @@ var TimelineInPointer = (props) => {
6136
6230
  });
6137
6231
  };
6138
6232
  var TimelineOutPointer = (props) => {
6139
- return /* @__PURE__ */ jsx57("svg", {
6233
+ return /* @__PURE__ */ jsx58("svg", {
6140
6234
  viewBox: "0 0 256 256",
6141
6235
  fill: "none",
6142
6236
  ...props,
6143
- children: /* @__PURE__ */ jsx57("path", {
6237
+ children: /* @__PURE__ */ jsx58("path", {
6144
6238
  d: "M98 25H157V230.5H98",
6145
6239
  stroke: props.color,
6146
6240
  strokeWidth: "42",
@@ -6151,7 +6245,7 @@ var TimelineOutPointer = (props) => {
6151
6245
  };
6152
6246
 
6153
6247
  // src/state/in-out.ts
6154
- import { createContext as createContext12, useContext as useContext21, useMemo as useMemo35 } from "react";
6248
+ import { createContext as createContext12, useContext as useContext21, useMemo as useMemo36 } from "react";
6155
6249
  import { Internals as Internals15 } from "remotion";
6156
6250
  var TimelineInOutContext = createContext12({});
6157
6251
  var SetTimelineInOutContext = createContext12({
@@ -6164,7 +6258,7 @@ var useTimelineInOutFramePosition = () => {
6164
6258
  const state = useContext21(TimelineInOutContext);
6165
6259
  const id = videoConfig?.id;
6166
6260
  const durationInFrames = videoConfig?.durationInFrames;
6167
- return useMemo35(() => {
6261
+ return useMemo36(() => {
6168
6262
  if (!id || !durationInFrames) {
6169
6263
  return { inFrame: null, outFrame: null };
6170
6264
  }
@@ -6183,7 +6277,7 @@ var useTimelineSetInOutFramePosition = () => {
6183
6277
  };
6184
6278
 
6185
6279
  // src/components/TimelineInOutToggle.tsx
6186
- import { jsx as jsx58, jsxs as jsxs21, Fragment as Fragment9 } from "react/jsx-runtime";
6280
+ import { jsx as jsx59, jsxs as jsxs22, Fragment as Fragment9 } from "react/jsx-runtime";
6187
6281
  var getTooltipText = (pointType, key) => [
6188
6282
  `Mark ${pointType}`,
6189
6283
  areKeyboardShortcutsDisabled() ? null : `(${key})`,
@@ -6398,26 +6492,26 @@ var TimelineInOutPointToggle = () => {
6398
6492
  outMarkClick: onOutMark
6399
6493
  };
6400
6494
  }, [confId, onInMark, onInOutClear, onOutMark]);
6401
- return /* @__PURE__ */ jsxs21(Fragment9, {
6495
+ return /* @__PURE__ */ jsxs22(Fragment9, {
6402
6496
  children: [
6403
- /* @__PURE__ */ jsx58(ControlButton, {
6497
+ /* @__PURE__ */ jsx59(ControlButton, {
6404
6498
  title: getTooltipText("In", "I"),
6405
6499
  "aria-label": getTooltipText("In", "I"),
6406
6500
  onClick: onInMark,
6407
6501
  onContextMenu: clearInMark,
6408
6502
  disabled: !videoConfig || isFirstFrame,
6409
- children: /* @__PURE__ */ jsx58(TimelineInPointer, {
6503
+ children: /* @__PURE__ */ jsx59(TimelineInPointer, {
6410
6504
  color: inFrame === null ? "white" : BLUE,
6411
6505
  style: style3
6412
6506
  })
6413
6507
  }),
6414
- /* @__PURE__ */ jsx58(ControlButton, {
6508
+ /* @__PURE__ */ jsx59(ControlButton, {
6415
6509
  title: getTooltipText("Out", "O"),
6416
6510
  "aria-label": getTooltipText("Out", "O"),
6417
6511
  onClick: onOutMark,
6418
6512
  onContextMenu: clearOutMark,
6419
6513
  disabled: !videoConfig || isLastFrame,
6420
- children: /* @__PURE__ */ jsx58(TimelineOutPointer, {
6514
+ children: /* @__PURE__ */ jsx59(TimelineOutPointer, {
6421
6515
  color: outFrame === null ? "white" : BLUE,
6422
6516
  style: style3
6423
6517
  })
@@ -6426,43 +6520,6 @@ var TimelineInOutPointToggle = () => {
6426
6520
  });
6427
6521
  };
6428
6522
 
6429
- // src/error-overlay/remotion-overlay/ShortcutHint.tsx
6430
- import { useMemo as useMemo36 } from "react";
6431
- import { jsx as jsx59, jsxs as jsxs22 } from "react/jsx-runtime";
6432
- var cmdOrCtrlCharacter = window.navigator.platform.startsWith("Mac") ? "⌘" : "Ctrl";
6433
- var container14 = {
6434
- display: "inline-block",
6435
- marginLeft: 6,
6436
- opacity: 0.6,
6437
- verticalAlign: "middle",
6438
- fontSize: 14
6439
- };
6440
- var ShortcutHint = ({ keyToPress, cmdOrCtrl }) => {
6441
- const style4 = useMemo36(() => {
6442
- if (keyToPress === "↵") {
6443
- return {
6444
- display: "inline-block",
6445
- transform: `translateY(2px)`,
6446
- fontSize: 14
6447
- };
6448
- }
6449
- return {};
6450
- }, [keyToPress]);
6451
- if (areKeyboardShortcutsDisabled()) {
6452
- return null;
6453
- }
6454
- return /* @__PURE__ */ jsxs22("span", {
6455
- style: container14,
6456
- children: [
6457
- cmdOrCtrl ? `${cmdOrCtrlCharacter}` : "",
6458
- /* @__PURE__ */ jsx59("span", {
6459
- style: style4,
6460
- children: keyToPress.toUpperCase()
6461
- })
6462
- ]
6463
- });
6464
- };
6465
-
6466
6523
  // src/state/editor-guides.ts
6467
6524
  import { createContext as createContext13 } from "react";
6468
6525
  var persistEditorShowGuidesOption = (option) => {
@@ -10814,10 +10871,7 @@ var CurrentCompositionKeybindings = ({ readOnlyStudio }) => {
10814
10871
  if (!video) {
10815
10872
  return;
10816
10873
  }
10817
- if (readOnlyStudio) {
10818
- return showNotification("Studio is read-only", 2000);
10819
- }
10820
- if (type !== "connected") {
10874
+ if (type !== "connected" && !SHOW_BROWSER_RENDERING && !readOnlyStudio) {
10821
10875
  showNotification("Studio server is offline", 2000);
10822
10876
  return;
10823
10877
  }
@@ -16620,7 +16674,10 @@ var ClientRenderQueueProcessor = () => {
16620
16674
  onProgress: (progress) => {
16621
16675
  onProgress(job.id, {
16622
16676
  encodedFrames: progress.encodedFrames,
16623
- totalFrames
16677
+ totalFrames,
16678
+ doneIn: progress.doneIn,
16679
+ renderEstimatedTime: progress.renderEstimatedTime,
16680
+ progress: progress.progress
16624
16681
  });
16625
16682
  },
16626
16683
  outputTarget: "web-fs",
@@ -16911,8 +16968,7 @@ var RenderQueueItemStatus = ({ job }) => {
16911
16968
  if (job.status === "running") {
16912
16969
  let progressValue;
16913
16970
  if (isClientJob) {
16914
- const { encodedFrames, totalFrames } = job.progress;
16915
- progressValue = totalFrames > 0 ? encodedFrames / totalFrames : 0;
16971
+ progressValue = job.progress.progress;
16916
16972
  } else {
16917
16973
  progressValue = job.progress.value;
16918
16974
  }
@@ -17004,6 +17060,34 @@ var RenderQueueOutputName = ({ job }) => {
17004
17060
 
17005
17061
  // src/components/RenderQueue/RenderQueueProgressMessage.tsx
17006
17062
  import { useCallback as useCallback77, useContext as useContext43 } from "react";
17063
+
17064
+ // src/components/RenderQueue/client-render-progress.ts
17065
+ var formatEtaString = (timeRemainingInMilliseconds) => {
17066
+ const remainingTime = timeRemainingInMilliseconds / 1000;
17067
+ const remainingTimeHours = Math.floor(remainingTime / 3600);
17068
+ const remainingTimeMinutes = Math.floor(remainingTime % 3600 / 60);
17069
+ const remainingTimeSeconds = Math.floor(remainingTime % 60);
17070
+ return [
17071
+ remainingTimeHours ? `${remainingTimeHours}h` : null,
17072
+ remainingTimeMinutes ? `${remainingTimeMinutes}m` : null,
17073
+ `${remainingTimeSeconds}s`
17074
+ ].filter((value) => Boolean(value)).join(" ");
17075
+ };
17076
+ var getClientRenderProgressMessage = (progress) => {
17077
+ if (progress.totalFrames === 0) {
17078
+ return "Getting composition";
17079
+ }
17080
+ if (progress.doneIn !== null) {
17081
+ return `Encoded ${progress.totalFrames}/${progress.totalFrames}`;
17082
+ }
17083
+ if (progress.renderEstimatedTime > 0) {
17084
+ const etaString = `, time remaining: ${formatEtaString(progress.renderEstimatedTime)}`;
17085
+ return `Rendering ${progress.encodedFrames}/${progress.totalFrames}${etaString}`;
17086
+ }
17087
+ return `Encoded ${progress.encodedFrames}/${progress.totalFrames}`;
17088
+ };
17089
+
17090
+ // src/components/RenderQueue/RenderQueueProgressMessage.tsx
17007
17091
  import { jsx as jsx153 } from "react/jsx-runtime";
17008
17092
  var outputLocation2 = {
17009
17093
  ...renderQueueItemSubtitleStyle
@@ -17021,7 +17105,7 @@ var RenderQueueProgressMessage = ({ job }) => {
17021
17105
  jobId: job.id
17022
17106
  });
17023
17107
  }, [job.id, setSelectedModal]);
17024
- const message = isClientJob ? job.progress.totalFrames === 0 ? "Getting composition" : `Encoding frame ${job.progress.encodedFrames}/${job.progress.totalFrames}` : job.progress.message;
17108
+ const message = isClientJob ? getClientRenderProgressMessage(job.progress) : job.progress.message;
17025
17109
  return /* @__PURE__ */ jsx153("button", {
17026
17110
  onClick,
17027
17111
  type: "button",
@@ -17140,7 +17224,8 @@ var makeRetryPayload = (job) => {
17140
17224
  initialHardwareAcceleration: defaults.hardwareAcceleration,
17141
17225
  initialChromeMode: job.chromeMode,
17142
17226
  initialMediaCacheSizeInBytes: job.mediaCacheSizeInBytes,
17143
- renderDefaults: defaults
17227
+ renderDefaults: defaults,
17228
+ readOnlyStudio: false
17144
17229
  };
17145
17230
  }
17146
17231
  if (job.type === "sequence") {
@@ -17192,7 +17277,8 @@ var makeRetryPayload = (job) => {
17192
17277
  initialHardwareAcceleration: defaults.hardwareAcceleration,
17193
17278
  initialChromeMode: job.chromeMode,
17194
17279
  initialMediaCacheSizeInBytes: job.mediaCacheSizeInBytes,
17195
- renderDefaults: defaults
17280
+ renderDefaults: defaults,
17281
+ readOnlyStudio: false
17196
17282
  };
17197
17283
  }
17198
17284
  if (job.type === "video") {
@@ -17244,7 +17330,8 @@ var makeRetryPayload = (job) => {
17244
17330
  initialHardwareAcceleration: job.hardwareAcceleration,
17245
17331
  initialChromeMode: job.chromeMode,
17246
17332
  initialMediaCacheSizeInBytes: job.mediaCacheSizeInBytes,
17247
- renderDefaults: defaults
17333
+ renderDefaults: defaults,
17334
+ readOnlyStudio: false
17248
17335
  };
17249
17336
  }
17250
17337
  throw new Error(`Job ${JSON.stringify(job)} Not implemented`);
@@ -18137,14 +18224,6 @@ var OptionsPanel = ({ readOnlyStudio }) => {
18137
18224
  import { useContext as useContext57, useEffect as useEffect60, useRef as useRef32, useState as useState62 } from "react";
18138
18225
  import { Internals as Internals45 } from "remotion";
18139
18226
 
18140
- // src/helpers/should-show-render-button.ts
18141
- var shouldShowRenderButton = (readOnlyStudio) => {
18142
- if (readOnlyStudio) {
18143
- return SHOW_BROWSER_RENDERING;
18144
- }
18145
- return true;
18146
- };
18147
-
18148
18227
  // src/state/loop.ts
18149
18228
  var key = "remotion.loop";
18150
18229
  var persistLoopOption = (option) => {
@@ -19005,7 +19084,7 @@ var label7 = {
19005
19084
  var RENDER_TYPE_STORAGE_KEY = "remotion.renderType";
19006
19085
  var getInitialRenderType = (readOnlyStudio) => {
19007
19086
  if (!SHOW_BROWSER_RENDERING) {
19008
- return "server-render";
19087
+ return readOnlyStudio ? "render-command" : "server-render";
19009
19088
  }
19010
19089
  if (readOnlyStudio) {
19011
19090
  return "client-render";
@@ -19062,8 +19141,15 @@ var RenderButton = ({
19062
19141
  });
19063
19142
  }, [refresh]);
19064
19143
  const connectionStatus = useContext55(StudioServerConnectionCtx).previewServerState.type;
19065
- const canRender = connectionStatus === "connected" || SHOW_BROWSER_RENDERING;
19144
+ const canServerRender = connectionStatus === "connected";
19145
+ const canRender = canServerRender || SHOW_BROWSER_RENDERING || readOnlyStudio;
19066
19146
  const renderType = useMemo95(() => {
19147
+ if (readOnlyStudio) {
19148
+ if (!SHOW_BROWSER_RENDERING) {
19149
+ return "render-command";
19150
+ }
19151
+ return preferredRenderType === "render-command" ? "render-command" : "client-render";
19152
+ }
19067
19153
  if (connectionStatus === "disconnected" && SHOW_BROWSER_RENDERING) {
19068
19154
  return "client-render";
19069
19155
  }
@@ -19071,9 +19157,9 @@ var RenderButton = ({
19071
19157
  return "server-render";
19072
19158
  }
19073
19159
  return preferredRenderType;
19074
- }, [connectionStatus, preferredRenderType]);
19160
+ }, [connectionStatus, preferredRenderType, readOnlyStudio]);
19075
19161
  const shortcut = areKeyboardShortcutsDisabled() ? "" : "(R)";
19076
- const tooltip = canRender ? "Export the current composition " + shortcut : "Connect to the Studio server to render";
19162
+ 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";
19077
19163
  const iconStyle4 = useMemo95(() => {
19078
19164
  return {
19079
19165
  style: {
@@ -19085,7 +19171,7 @@ var RenderButton = ({
19085
19171
  const video = Internals43.useVideo();
19086
19172
  const getCurrentFrame2 = PlayerInternals14.useFrameImperative();
19087
19173
  const { props } = useContext55(Internals43.EditorPropsContext);
19088
- const openServerRenderModal = useCallback90(() => {
19174
+ const openServerRenderModal = useCallback90((copyCommandOnly) => {
19089
19175
  if (!video) {
19090
19176
  return null;
19091
19177
  }
@@ -19095,6 +19181,7 @@ var RenderButton = ({
19095
19181
  }
19096
19182
  setSelectedModal({
19097
19183
  type: "server-render",
19184
+ readOnlyStudio: copyCommandOnly,
19098
19185
  compositionId: video.id,
19099
19186
  initialFrame: getCurrentFrame2(),
19100
19187
  initialStillImageFormat: defaults.stillImageFormat,
@@ -19178,8 +19265,12 @@ var RenderButton = ({
19178
19265
  });
19179
19266
  }, [video, setSelectedModal, getCurrentFrame2, props, inFrame, outFrame]);
19180
19267
  const onClick = useCallback90(() => {
19268
+ if (renderType === "render-command") {
19269
+ openServerRenderModal(true);
19270
+ return;
19271
+ }
19181
19272
  if (!SHOW_BROWSER_RENDERING || renderType === "server-render") {
19182
- openServerRenderModal();
19273
+ openServerRenderModal(false);
19183
19274
  } else {
19184
19275
  openClientRenderModal();
19185
19276
  }
@@ -19194,12 +19285,40 @@ var RenderButton = ({
19194
19285
  } catch {}
19195
19286
  setDropdownOpened(false);
19196
19287
  if (newType === "server-render") {
19197
- openServerRenderModal();
19288
+ openServerRenderModal(false);
19289
+ } else if (newType === "render-command") {
19290
+ openServerRenderModal(true);
19198
19291
  } else {
19199
19292
  openClientRenderModal();
19200
19293
  }
19201
- }, [openServerRenderModal, openClientRenderModal]);
19294
+ }, [openClientRenderModal, openServerRenderModal]);
19202
19295
  const dropdownValues = useMemo95(() => {
19296
+ if (readOnlyStudio) {
19297
+ return [
19298
+ {
19299
+ type: "item",
19300
+ id: "client-render",
19301
+ label: "Render on web",
19302
+ value: "client-render",
19303
+ onClick: () => handleRenderTypeChange("client-render"),
19304
+ keyHint: null,
19305
+ leftItem: null,
19306
+ subMenu: null,
19307
+ quickSwitcherLabel: null
19308
+ },
19309
+ {
19310
+ type: "item",
19311
+ id: "render-command",
19312
+ label: "Render via CLI",
19313
+ value: "render-command",
19314
+ onClick: () => handleRenderTypeChange("render-command"),
19315
+ keyHint: null,
19316
+ leftItem: null,
19317
+ subMenu: null,
19318
+ quickSwitcherLabel: null
19319
+ }
19320
+ ];
19321
+ }
19203
19322
  return [
19204
19323
  {
19205
19324
  type: "item",
@@ -19224,7 +19343,7 @@ var RenderButton = ({
19224
19343
  quickSwitcherLabel: null
19225
19344
  }
19226
19345
  ];
19227
- }, [handleRenderTypeChange]);
19346
+ }, [handleRenderTypeChange, readOnlyStudio]);
19228
19347
  const spaceToBottom = useMemo95(() => {
19229
19348
  const margin2 = 10;
19230
19349
  if (size4 && dropdownOpened) {
@@ -19266,10 +19385,10 @@ var RenderButton = ({
19266
19385
  cursor: canRender ? "pointer" : "inherit"
19267
19386
  };
19268
19387
  }, [canRender]);
19269
- const renderLabel = renderType === "server-render" ? "Render" : "Render on web";
19388
+ const renderLabel = renderType === "server-render" ? "Render" : renderType === "render-command" ? "Render via CLI" : "Render on web";
19270
19389
  const shouldShowDropdown = useMemo95(() => {
19271
19390
  if (readOnlyStudio) {
19272
- return false;
19391
+ return SHOW_BROWSER_RENDERING;
19273
19392
  }
19274
19393
  if (!SHOW_BROWSER_RENDERING) {
19275
19394
  return false;
@@ -19284,8 +19403,8 @@ var RenderButton = ({
19284
19403
  /* @__PURE__ */ jsx177("button", {
19285
19404
  style: { display: "none" },
19286
19405
  id: "render-modal-button-server",
19287
- disabled: !canRender,
19288
- onClick: openServerRenderModal,
19406
+ disabled: !canServerRender,
19407
+ onClick: () => openServerRenderModal(false),
19289
19408
  type: "button"
19290
19409
  }),
19291
19410
  " ",
@@ -19333,7 +19452,7 @@ var RenderButton = ({
19333
19452
  ref: dropdownRef,
19334
19453
  type: "button",
19335
19454
  style: dropdownTriggerStyle,
19336
- disabled: connectionStatus !== "connected",
19455
+ disabled: !readOnlyStudio && connectionStatus !== "connected",
19337
19456
  className: MENU_INITIATOR_CLASSNAME,
19338
19457
  onPointerDown,
19339
19458
  onClick: onClickDropdown,
@@ -19672,9 +19791,9 @@ var PreviewToolbar = ({ readOnlyStudio, bufferStateDelayInMilliseconds }) => {
19672
19791
  /* @__PURE__ */ jsx180(Spacing, {
19673
19792
  x: 2
19674
19793
  }),
19675
- shouldShowRenderButton(readOnlyStudio) ? /* @__PURE__ */ jsx180(RenderButton, {
19794
+ /* @__PURE__ */ jsx180(RenderButton, {
19676
19795
  readOnlyStudio
19677
- }) : null,
19796
+ }),
19678
19797
  /* @__PURE__ */ jsx180(Spacing, {
19679
19798
  x: 1.5
19680
19799
  })
@@ -26838,9 +26957,15 @@ var right3 = {
26838
26957
  textAlign: "right",
26839
26958
  flex: 1
26840
26959
  };
26841
- var EncodingProgress = ({ encodedFrames, totalFrames }) => {
26842
- const done = encodedFrames === totalFrames;
26843
- const progress = totalFrames > 0 ? encodedFrames / totalFrames : 0;
26960
+ var ProgressStatus = ({ encodedFrames, totalFrames, doneIn, renderEstimatedTime, progress }) => {
26961
+ const done = doneIn !== null;
26962
+ const message = getClientRenderProgressMessage({
26963
+ encodedFrames,
26964
+ totalFrames,
26965
+ doneIn,
26966
+ renderEstimatedTime,
26967
+ progress
26968
+ });
26844
26969
  return /* @__PURE__ */ jsxs120("div", {
26845
26970
  style: progressItem,
26846
26971
  children: [
@@ -26852,8 +26977,15 @@ var EncodingProgress = ({ encodedFrames, totalFrames }) => {
26852
26977
  }),
26853
26978
  /* @__PURE__ */ jsx237("div", {
26854
26979
  style: label10,
26855
- children: done ? `Encoded ${totalFrames} frames` : `Encoding ${encodedFrames} / ${totalFrames} frames`
26856
- })
26980
+ children: message
26981
+ }),
26982
+ doneIn !== null ? /* @__PURE__ */ jsxs120("div", {
26983
+ style: right3,
26984
+ children: [
26985
+ doneIn,
26986
+ "ms"
26987
+ ]
26988
+ }) : null
26857
26989
  ]
26858
26990
  });
26859
26991
  };
@@ -26911,15 +27043,18 @@ var ClientRenderProgress = ({ job }) => {
26911
27043
  ]
26912
27044
  });
26913
27045
  }
26914
- const { encodedFrames, totalFrames } = job.progress;
27046
+ const { encodedFrames, totalFrames, doneIn, renderEstimatedTime, progress } = job.progress;
26915
27047
  return /* @__PURE__ */ jsxs120("div", {
26916
27048
  children: [
26917
27049
  /* @__PURE__ */ jsx237(Spacing, {
26918
27050
  y: 0.5
26919
27051
  }),
26920
- job.type === "client-video" && /* @__PURE__ */ jsx237(EncodingProgress, {
27052
+ job.type === "client-video" && /* @__PURE__ */ jsx237(ProgressStatus, {
26921
27053
  encodedFrames,
26922
- totalFrames
27054
+ totalFrames,
27055
+ doneIn,
27056
+ renderEstimatedTime,
27057
+ progress
26923
27058
  }),
26924
27059
  /* @__PURE__ */ jsx237(Spacing, {
26925
27060
  y: 1
@@ -27277,7 +27412,7 @@ var RenderStatusModal = ({
27277
27412
  };
27278
27413
 
27279
27414
  // src/components/RenderModal/ServerRenderModal.tsx
27280
- import { BrowserSafeApis as BrowserSafeApis10 } from "@remotion/renderer/client";
27415
+ import { BrowserSafeApis as BrowserSafeApis11 } from "@remotion/renderer/client";
27281
27416
  import { getDefaultOutLocation } from "@remotion/studio-shared";
27282
27417
  import {
27283
27418
  useCallback as useCallback136,
@@ -27303,6 +27438,252 @@ var envVariablesArrayToObject = (envVariables) => {
27303
27438
  }, {});
27304
27439
  };
27305
27440
 
27441
+ // src/helpers/make-render-command.ts
27442
+ import { BrowserSafeApis } from "@remotion/renderer/client";
27443
+ var shellQuote = (value) => {
27444
+ return `'${value.replace(/'/g, "'\\''")}'`;
27445
+ };
27446
+ var addFlagWithValue = (flags, flag, value) => {
27447
+ if (value === null || value === undefined) {
27448
+ return;
27449
+ }
27450
+ flags.push(`--${flag}=${shellQuote(String(value))}`);
27451
+ };
27452
+ var addBooleanFlag = (flags, flag, value) => {
27453
+ if (value) {
27454
+ flags.push(`--${flag}`);
27455
+ }
27456
+ };
27457
+ var valueFlag = (flag, value, defaultValue) => {
27458
+ return { flag, value, defaultValue };
27459
+ };
27460
+ var booleanFlag = (flag, value, defaultValue) => {
27461
+ return { flag, value, defaultValue };
27462
+ };
27463
+ var addValueFlagsIfChanged = (flags, mappings) => {
27464
+ for (const mapping of mappings) {
27465
+ if (mapping.value !== mapping.defaultValue) {
27466
+ addFlagWithValue(flags, mapping.flag, mapping.value);
27467
+ }
27468
+ }
27469
+ };
27470
+ var addTrueBooleanFlagsIfChanged = (flags, mappings) => {
27471
+ for (const mapping of mappings) {
27472
+ if (mapping.value && mapping.value !== mapping.defaultValue) {
27473
+ addBooleanFlag(flags, mapping.flag, true);
27474
+ }
27475
+ }
27476
+ };
27477
+ var getNpmRemotionCommandPrefix = (version) => {
27478
+ return version.trim() === "" ? "bunx --yes --location=global -p @remotion/cli remotion" : `bunx --yes --location=global -p @remotion/cli@${version} remotion`;
27479
+ };
27480
+ var normalizeServeUrlForRenderCommand = ({
27481
+ locationHref,
27482
+ compositionId
27483
+ }) => {
27484
+ const parsed = new URL(locationHref);
27485
+ parsed.hash = "";
27486
+ parsed.search = "";
27487
+ const suffix2 = `/${compositionId}`;
27488
+ if (parsed.pathname === suffix2) {
27489
+ parsed.pathname = "/";
27490
+ } else if (parsed.pathname.endsWith(suffix2)) {
27491
+ const basePath = parsed.pathname.slice(0, -suffix2.length);
27492
+ parsed.pathname = basePath === "" ? "/" : basePath;
27493
+ }
27494
+ if (parsed.pathname !== "/" && parsed.pathname.endsWith("/")) {
27495
+ parsed.pathname = parsed.pathname.slice(0, -1);
27496
+ }
27497
+ return `${parsed.origin}${parsed.pathname === "/" ? "" : parsed.pathname}`;
27498
+ };
27499
+ var trimDefaultOutPrefix = (outName) => {
27500
+ if (outName.startsWith("out/")) {
27501
+ const trimmed = outName.slice("out/".length);
27502
+ return trimmed.length === 0 ? outName : trimmed;
27503
+ }
27504
+ if (outName.startsWith("./out/")) {
27505
+ const trimmed = outName.slice("./out/".length);
27506
+ return trimmed.length === 0 ? outName : trimmed;
27507
+ }
27508
+ return outName;
27509
+ };
27510
+ var getRenderMediaFlag = (option) => {
27511
+ return BrowserSafeApis.optionsMap.renderMedia[option].cliFlag;
27512
+ };
27513
+ var renderMediaValueFlag = (option, value, defaultValue) => {
27514
+ return valueFlag(getRenderMediaFlag(option), value, defaultValue);
27515
+ };
27516
+ var renderMediaBooleanFlag = (option, value, defaultValue) => {
27517
+ return booleanFlag(getRenderMediaFlag(option), value, defaultValue);
27518
+ };
27519
+ var makeReadOnlyStudioRenderCommand = ({
27520
+ remotionVersion,
27521
+ locationHref,
27522
+ compositionId,
27523
+ outName,
27524
+ renderMode,
27525
+ renderDefaults,
27526
+ durationInFrames,
27527
+ concurrency,
27528
+ frame: frame2,
27529
+ startFrame,
27530
+ endFrame,
27531
+ stillImageFormat,
27532
+ sequenceImageFormat,
27533
+ videoImageFormat,
27534
+ jpegQuality,
27535
+ codec,
27536
+ muted,
27537
+ enforceAudioTrack,
27538
+ proResProfile,
27539
+ x264Preset,
27540
+ pixelFormat,
27541
+ crf,
27542
+ videoBitrate,
27543
+ audioBitrate,
27544
+ audioCodec,
27545
+ everyNthFrame,
27546
+ numberOfGifLoops,
27547
+ disallowParallelEncoding,
27548
+ encodingBufferSize,
27549
+ encodingMaxRate,
27550
+ forSeamlessAacConcatenation,
27551
+ separateAudioTo,
27552
+ colorSpace,
27553
+ scale,
27554
+ logLevel,
27555
+ delayRenderTimeout,
27556
+ hardwareAcceleration,
27557
+ chromeMode,
27558
+ headless,
27559
+ disableWebSecurity,
27560
+ ignoreCertificateErrors,
27561
+ gl,
27562
+ userAgent,
27563
+ multiProcessOnLinux,
27564
+ darkMode,
27565
+ offthreadVideoCacheSizeInBytes,
27566
+ offthreadVideoThreads,
27567
+ mediaCacheSizeInBytes,
27568
+ beepOnFinish,
27569
+ repro,
27570
+ metadata,
27571
+ envVariables,
27572
+ inputProps
27573
+ }) => {
27574
+ const serveUrl = normalizeServeUrlForRenderCommand({
27575
+ locationHref,
27576
+ compositionId
27577
+ });
27578
+ const isStillRender = renderMode === "still";
27579
+ const isSequenceRender = renderMode === "sequence";
27580
+ const hasCodecSpecificOptions = !isSequenceRender;
27581
+ const commandType = isStillRender ? "still" : "render";
27582
+ const command = getNpmRemotionCommandPrefix(remotionVersion);
27583
+ const { options } = BrowserSafeApis;
27584
+ const flags = [];
27585
+ addValueFlagsIfChanged(flags, [
27586
+ valueFlag(options.scaleOption.cliFlag, scale, renderDefaults.scale),
27587
+ renderMediaValueFlag("logLevel", logLevel, renderDefaults.logLevel),
27588
+ renderMediaValueFlag("timeoutInMilliseconds", delayRenderTimeout, renderDefaults.delayRenderTimeout),
27589
+ renderMediaValueFlag("chromeMode", chromeMode, renderDefaults.chromeMode),
27590
+ valueFlag(options.glOption.cliFlag, gl, renderDefaults.openGlRenderer),
27591
+ valueFlag(options.userAgentOption.cliFlag, userAgent, renderDefaults.userAgent),
27592
+ renderMediaValueFlag("offthreadVideoCacheSizeInBytes", offthreadVideoCacheSizeInBytes, renderDefaults.offthreadVideoCacheSizeInBytes),
27593
+ renderMediaValueFlag("offthreadVideoThreads", offthreadVideoThreads, renderDefaults.offthreadVideoThreads),
27594
+ renderMediaValueFlag("mediaCacheSizeInBytes", mediaCacheSizeInBytes, renderDefaults.mediaCacheSizeInBytes)
27595
+ ]);
27596
+ if (headless !== renderDefaults.headless) {
27597
+ addFlagWithValue(flags, options.headlessOption.cliFlag, !headless);
27598
+ }
27599
+ addTrueBooleanFlagsIfChanged(flags, [
27600
+ booleanFlag(options.disableWebSecurityOption.cliFlag, disableWebSecurity, renderDefaults.disableWebSecurity),
27601
+ booleanFlag(options.ignoreCertificateErrorsOption.cliFlag, ignoreCertificateErrors, renderDefaults.ignoreCertificateErrors),
27602
+ booleanFlag(options.enableMultiprocessOnLinuxOption.cliFlag, multiProcessOnLinux, renderDefaults.multiProcessOnLinux),
27603
+ booleanFlag(options.darkModeOption.cliFlag, darkMode, renderDefaults.darkMode),
27604
+ booleanFlag(options.beepOnFinishOption.cliFlag, beepOnFinish, renderDefaults.beepOnFinish)
27605
+ ]);
27606
+ if (isStillRender) {
27607
+ addValueFlagsIfChanged(flags, [
27608
+ valueFlag(options.stillFrameOption.cliFlag, frame2, 0),
27609
+ valueFlag(options.stillImageFormatOption.cliFlag, stillImageFormat, renderDefaults.stillImageFormat),
27610
+ valueFlag(options.jpegQualityOption.cliFlag, jpegQuality, renderDefaults.jpegQuality)
27611
+ ]);
27612
+ } else {
27613
+ addValueFlagsIfChanged(flags, [
27614
+ valueFlag(options.concurrencyOption.cliFlag, concurrency, renderDefaults.concurrency)
27615
+ ]);
27616
+ if (isSequenceRender) {
27617
+ addBooleanFlag(flags, options.imageSequenceOption.cliFlag, true);
27618
+ if (sequenceImageFormat !== "jpeg") {
27619
+ addFlagWithValue(flags, options.videoImageFormatOption.cliFlag, sequenceImageFormat);
27620
+ }
27621
+ } else {
27622
+ addValueFlagsIfChanged(flags, [
27623
+ valueFlag(options.videoImageFormatOption.cliFlag, videoImageFormat, renderDefaults.videoImageFormat),
27624
+ renderMediaValueFlag("hardwareAcceleration", hardwareAcceleration, renderDefaults.hardwareAcceleration)
27625
+ ]);
27626
+ }
27627
+ if (hasCodecSpecificOptions && codec !== renderDefaults.codec) {
27628
+ addFlagWithValue(flags, getRenderMediaFlag("codec"), codec);
27629
+ }
27630
+ if (startFrame !== 0 || endFrame !== durationInFrames - 1) {
27631
+ addFlagWithValue(flags, options.framesOption.cliFlag, `${startFrame}-${endFrame}`);
27632
+ }
27633
+ if (hasCodecSpecificOptions) {
27634
+ addTrueBooleanFlagsIfChanged(flags, [
27635
+ renderMediaBooleanFlag("muted", muted, renderDefaults.muted),
27636
+ booleanFlag(options.enforceAudioOption.cliFlag, enforceAudioTrack, renderDefaults.enforceAudioTrack),
27637
+ renderMediaBooleanFlag("forSeamlessAacConcatenation", forSeamlessAacConcatenation, renderDefaults.forSeamlessAacConcatenation)
27638
+ ]);
27639
+ addValueFlagsIfChanged(flags, [
27640
+ valueFlag(options.pixelFormatOption.cliFlag, pixelFormat, renderDefaults.pixelFormat),
27641
+ renderMediaValueFlag("colorSpace", colorSpace, renderDefaults.colorSpace),
27642
+ valueFlag(options.proResProfileOption.cliFlag, proResProfile, renderDefaults.proResProfile),
27643
+ renderMediaValueFlag("x264Preset", x264Preset, renderDefaults.x264Preset),
27644
+ valueFlag(options.crfOption.cliFlag, crf, null),
27645
+ valueFlag(options.jpegQualityOption.cliFlag, jpegQuality, renderDefaults.jpegQuality),
27646
+ renderMediaValueFlag("videoBitrate", videoBitrate, renderDefaults.videoBitrate),
27647
+ renderMediaValueFlag("audioBitrate", audioBitrate, renderDefaults.audioBitrate),
27648
+ valueFlag(options.everyNthFrameOption.cliFlag, everyNthFrame, renderDefaults.everyNthFrame),
27649
+ renderMediaValueFlag("numberOfGifLoops", numberOfGifLoops, renderDefaults.numberOfGifLoops),
27650
+ renderMediaValueFlag("encodingBufferSize", encodingBufferSize, renderDefaults.encodingBufferSize),
27651
+ renderMediaValueFlag("encodingMaxRate", encodingMaxRate, renderDefaults.encodingMaxRate),
27652
+ renderMediaValueFlag("separateAudioTo", separateAudioTo, null)
27653
+ ]);
27654
+ const defaultAudioCodec = BrowserSafeApis.defaultAudioCodecs[codec]?.compressed;
27655
+ if (audioCodec !== defaultAudioCodec) {
27656
+ addFlagWithValue(flags, getRenderMediaFlag("audioCodec"), audioCodec);
27657
+ }
27658
+ }
27659
+ addTrueBooleanFlagsIfChanged(flags, [
27660
+ renderMediaBooleanFlag("disallowParallelEncoding", disallowParallelEncoding, false),
27661
+ renderMediaBooleanFlag("repro", repro, renderDefaults.repro)
27662
+ ]);
27663
+ }
27664
+ if (metadata) {
27665
+ for (const [key5, value] of Object.entries(metadata)) {
27666
+ addFlagWithValue(flags, options.metadataOption.cliFlag, `${key5}=${value}`);
27667
+ }
27668
+ }
27669
+ if (Object.keys(inputProps).length > 0) {
27670
+ addFlagWithValue(flags, options.propsOption.cliFlag, JSON.stringify(inputProps));
27671
+ }
27672
+ const envArgs = Object.entries(envVariables).sort(([a], [b]) => a.localeCompare(b)).map(([key5, value]) => shellQuote(`${key5}=${value}`));
27673
+ const renderCommand = [
27674
+ command,
27675
+ commandType,
27676
+ shellQuote(serveUrl),
27677
+ shellQuote(compositionId),
27678
+ shellQuote(trimDefaultOutPrefix(outName)),
27679
+ ...flags
27680
+ ].join(" ");
27681
+ if (envArgs.length === 0) {
27682
+ return renderCommand;
27683
+ }
27684
+ return ["env", ...envArgs, renderCommand].join(" ");
27685
+ };
27686
+
27306
27687
  // src/helpers/render-modal-sections.ts
27307
27688
  import { useMemo as useMemo128, useState as useState83 } from "react";
27308
27689
  var useRenderModalSections = (renderMode, codec) => {
@@ -27444,14 +27825,14 @@ var VerticalTab = ({ children, onClick, style: style12, selected }) => {
27444
27825
  };
27445
27826
 
27446
27827
  // src/components/RenderModal/CrfSetting.tsx
27447
- import { BrowserSafeApis as BrowserSafeApis2 } from "@remotion/renderer/client";
27828
+ import { BrowserSafeApis as BrowserSafeApis3 } from "@remotion/renderer/client";
27448
27829
  import { useState as useState86 } from "react";
27449
27830
 
27450
27831
  // src/components/RenderModal/NumberSetting.tsx
27451
27832
  import { useCallback as useCallback121 } from "react";
27452
27833
 
27453
27834
  // src/components/RenderModal/OptionExplainerBubble.tsx
27454
- import { BrowserSafeApis } from "@remotion/renderer/client";
27835
+ import { BrowserSafeApis as BrowserSafeApis2 } from "@remotion/renderer/client";
27455
27836
 
27456
27837
  // src/components/RenderModal/CliCopyButton.tsx
27457
27838
  import { useCallback as useCallback120, useEffect as useEffect83, useMemo as useMemo130, useState as useState85 } from "react";
@@ -27678,7 +28059,7 @@ var OptionExplainer = ({ option }) => {
27678
28059
  // src/components/RenderModal/OptionExplainerBubble.tsx
27679
28060
  import { jsx as jsx248 } from "react/jsx-runtime";
27680
28061
  var OptionExplainerBubble = ({ id }) => {
27681
- const option = BrowserSafeApis.options[id];
28062
+ const option = BrowserSafeApis2.options[id];
27682
28063
  return /* @__PURE__ */ jsx248(InfoBubble, {
27683
28064
  title: "Learn more about this option",
27684
28065
  children: /* @__PURE__ */ jsx248(OptionExplainer, {
@@ -27746,8 +28127,8 @@ var NumberSetting = ({ name, value, step, hint, onValueChanged, max, min, format
27746
28127
  // src/components/RenderModal/CrfSetting.tsx
27747
28128
  import { jsx as jsx250 } from "react/jsx-runtime";
27748
28129
  var getDefaultCrfState = () => {
27749
- return BrowserSafeApis2.validCodecs.map((c) => {
27750
- return [c, BrowserSafeApis2.getDefaultCrfForCodec(c)];
28130
+ return BrowserSafeApis3.validCodecs.map((c) => {
28131
+ return [c, BrowserSafeApis3.getDefaultCrfForCodec(c)];
27751
28132
  }).reduce((acc, [codec, crf]) => {
27752
28133
  return {
27753
28134
  ...acc,
@@ -27757,7 +28138,7 @@ var getDefaultCrfState = () => {
27757
28138
  };
27758
28139
  var useCrfState = (codec) => {
27759
28140
  const [state, setState] = useState86(() => getDefaultCrfState());
27760
- const range = BrowserSafeApis2.getValidCrfRanges(codec);
28141
+ const range = BrowserSafeApis3.getValidCrfRanges(codec);
27761
28142
  const setCrf = (updater) => {
27762
28143
  setState((q) => {
27763
28144
  const val = q[codec];
@@ -27790,7 +28171,7 @@ var CrfSetting = ({ crf, setCrf, min, max, option }) => {
27790
28171
  };
27791
28172
 
27792
28173
  // src/components/RenderModal/get-default-codecs.ts
27793
- import { BrowserSafeApis as BrowserSafeApis3 } from "@remotion/renderer/client";
28174
+ import { BrowserSafeApis as BrowserSafeApis4 } from "@remotion/renderer/client";
27794
28175
  import { NoReactAPIs } from "@remotion/renderer/pure";
27795
28176
  var getDefaultCodecs = ({
27796
28177
  defaultConfigurationVideoCodec,
@@ -27810,7 +28191,7 @@ var getDefaultCodecs = ({
27810
28191
  initialVideoCodecForVideoTab: NoReactAPIs.isAudioCodec(defaultConfigurationVideoCodec) ? "h264" : defaultConfigurationVideoCodec
27811
28192
  };
27812
28193
  }
27813
- const suitableAudioCodecForVideoCodec = BrowserSafeApis3.defaultAudioCodecs[userPreferredVideoCodec].compressed;
28194
+ const suitableAudioCodecForVideoCodec = BrowserSafeApis4.defaultAudioCodecs[userPreferredVideoCodec].compressed;
27814
28195
  return {
27815
28196
  initialAudioCodec: defaultConfigurationAudioCodec ?? suitableAudioCodecForVideoCodec,
27816
28197
  initialVideoCodec: userPreferredVideoCodec,
@@ -27830,7 +28211,7 @@ var getStringBeforeSuffix = (fileName) => {
27830
28211
  };
27831
28212
 
27832
28213
  // src/components/RenderModal/out-name-checker.ts
27833
- import { BrowserSafeApis as BrowserSafeApis4 } from "@remotion/renderer/client";
28214
+ import { BrowserSafeApis as BrowserSafeApis5 } from "@remotion/renderer/client";
27834
28215
  var invalidCharacters = ["?", "*", "+", ":", "%"];
27835
28216
  var isValidStillExtension = (extension, stillImageFormat) => {
27836
28217
  if (stillImageFormat === "jpeg" && extension === "jpg") {
@@ -27870,8 +28251,8 @@ var isValidOutName = ({
27870
28251
  }) => {
27871
28252
  const extension = outName.substring(outName.lastIndexOf(".") + 1);
27872
28253
  const prefix = outName.substring(0, outName.lastIndexOf("."));
27873
- const map = BrowserSafeApis4.defaultFileExtensionMap[codec];
27874
- if (BrowserSafeApis4.supportedAudioCodecs[codec].length > 0 && !(audioCodec in map.forAudioCodec)) {
28254
+ const map = BrowserSafeApis5.defaultFileExtensionMap[codec];
28255
+ if (BrowserSafeApis5.supportedAudioCodecs[codec].length > 0 && !(audioCodec in map.forAudioCodec)) {
27875
28256
  throw new Error(`Audio codec ${audioCodec} is not supported for codec ${codec}`);
27876
28257
  }
27877
28258
  const hasDotAfterSlash = () => {
@@ -27887,7 +28268,7 @@ var isValidOutName = ({
27887
28268
  return prefix.split("").some((char) => invalidCharacters.includes(char));
27888
28269
  };
27889
28270
  if (renderMode === "video" || renderMode === "audio") {
27890
- BrowserSafeApis4.validateOutputFilename({
28271
+ BrowserSafeApis5.validateOutputFilename({
27891
28272
  codec,
27892
28273
  audioCodecSetting: audioCodec ?? null,
27893
28274
  extension,
@@ -27975,7 +28356,7 @@ var flexer = {
27975
28356
  };
27976
28357
 
27977
28358
  // src/components/RenderModal/RenderModalAdvanced.tsx
27978
- import { BrowserSafeApis as BrowserSafeApis5 } from "@remotion/renderer/client";
28359
+ import { BrowserSafeApis as BrowserSafeApis6 } from "@remotion/renderer/client";
27979
28360
  import { useCallback as useCallback125, useMemo as useMemo131 } from "react";
27980
28361
 
27981
28362
  // src/helpers/presets-labels.ts
@@ -28408,7 +28789,7 @@ var RenderModalAdvanced = ({
28408
28789
  });
28409
28790
  }, [extendedOpenGlOptions, openGlOption, setOpenGlOption]);
28410
28791
  const chromeModeOptions = useMemo131(() => {
28411
- return BrowserSafeApis5.validChromeModeOptions.map((option) => {
28792
+ return BrowserSafeApis6.validChromeModeOptions.map((option) => {
28412
28793
  return {
28413
28794
  label: option,
28414
28795
  onClick: () => setChromeModeOption(option),
@@ -28424,7 +28805,7 @@ var RenderModalAdvanced = ({
28424
28805
  });
28425
28806
  }, [chromeModeOption, setChromeModeOption]);
28426
28807
  const x264PresetOptions = useMemo131(() => {
28427
- return BrowserSafeApis5.x264PresetOptions.map((option) => {
28808
+ return BrowserSafeApis6.x264PresetOptions.map((option) => {
28428
28809
  return {
28429
28810
  label: labelx264Preset(option),
28430
28811
  onClick: () => setx264Preset(option),
@@ -28440,7 +28821,7 @@ var RenderModalAdvanced = ({
28440
28821
  });
28441
28822
  }, [setx264Preset, x264Preset]);
28442
28823
  const hardwareAccelerationValues = useMemo131(() => {
28443
- return BrowserSafeApis5.hardwareAccelerationOptions.map((option) => {
28824
+ return BrowserSafeApis6.hardwareAccelerationOptions.map((option) => {
28444
28825
  return {
28445
28826
  label: option,
28446
28827
  onClick: () => setHardwareAcceleration(option),
@@ -28931,7 +29312,7 @@ var RenderModalAdvanced = ({
28931
29312
  };
28932
29313
 
28933
29314
  // src/components/RenderModal/RenderModalAudio.tsx
28934
- import { BrowserSafeApis as BrowserSafeApis7 } from "@remotion/renderer/client";
29315
+ import { BrowserSafeApis as BrowserSafeApis8 } from "@remotion/renderer/client";
28935
29316
  import { useCallback as useCallback129 } from "react";
28936
29317
 
28937
29318
  // src/components/RenderModal/EnforceAudioTrackSetting.tsx
@@ -29024,7 +29405,7 @@ var MutedSetting = ({ muted, setMuted, enforceAudioTrack }) => {
29024
29405
  };
29025
29406
 
29026
29407
  // src/components/RenderModal/SeparateAudioOption.tsx
29027
- import { BrowserSafeApis as BrowserSafeApis6 } from "@remotion/renderer/client";
29408
+ import { BrowserSafeApis as BrowserSafeApis7 } from "@remotion/renderer/client";
29028
29409
  import { useCallback as useCallback128, useMemo as useMemo132 } from "react";
29029
29410
 
29030
29411
  // src/helpers/use-file-existence.ts
@@ -29159,7 +29540,7 @@ var SeparateAudioOptionInput = ({ separateAudioTo, setSeparateAudioTo, audioCode
29159
29540
  setSeparateAudioTo(e.target.value);
29160
29541
  }, [setSeparateAudioTo]);
29161
29542
  const validationMessage = useMemo132(() => {
29162
- const expectedExtension = BrowserSafeApis6.getExtensionFromAudioCodec(audioCodec);
29543
+ const expectedExtension = BrowserSafeApis7.getExtensionFromAudioCodec(audioCodec);
29163
29544
  const actualExtension = separateAudioTo.split(".").pop();
29164
29545
  if (actualExtension !== expectedExtension) {
29165
29546
  return `Expected extension: .${expectedExtension}`;
@@ -29178,7 +29559,7 @@ var SeparateAudioOptionInput = ({ separateAudioTo, setSeparateAudioTo, audioCode
29178
29559
  var SeparateAudioOption = ({ separateAudioTo, setSeparateAudioTo, audioCodec, outName }) => {
29179
29560
  const onSeparateAudioChange = useCallback128((e) => {
29180
29561
  if (e.target.checked) {
29181
- const extension = BrowserSafeApis6.getExtensionFromAudioCodec(audioCodec);
29562
+ const extension = BrowserSafeApis7.getExtensionFromAudioCodec(audioCodec);
29182
29563
  setSeparateAudioTo(`${getStringBeforeSuffix(outName)}.${extension}`);
29183
29564
  } else {
29184
29565
  setSeparateAudioTo(null);
@@ -29256,7 +29637,7 @@ var RenderModalAudio = ({
29256
29637
  setForSeamlessAacConcatenation(e.target.checked);
29257
29638
  }, [setForSeamlessAacConcatenation]);
29258
29639
  const audioCodecOptions = useCallback129((currentCodec) => {
29259
- return BrowserSafeApis7.supportedAudioCodecs[currentCodec].map((audioCodecOption) => {
29640
+ return BrowserSafeApis8.supportedAudioCodecs[currentCodec].map((audioCodecOption) => {
29260
29641
  return {
29261
29642
  label: humanReadableAudioCodec(audioCodecOption),
29262
29643
  onClick: () => setAudioCodec(audioCodecOption),
@@ -29401,7 +29782,7 @@ var RenderModalAudio = ({
29401
29782
  };
29402
29783
 
29403
29784
  // src/components/RenderModal/RenderModalBasic.tsx
29404
- import { BrowserSafeApis as BrowserSafeApis8 } from "@remotion/renderer/client";
29785
+ import { BrowserSafeApis as BrowserSafeApis9 } from "@remotion/renderer/client";
29405
29786
  import { NoReactAPIs as NoReactAPIs2 } from "@remotion/renderer/pure";
29406
29787
  import { useCallback as useCallback132, useMemo as useMemo134 } from "react";
29407
29788
 
@@ -29662,11 +30043,12 @@ var RenderModalBasic = ({
29662
30043
  startFrame,
29663
30044
  validationMessage,
29664
30045
  setVerboseLogging,
29665
- logLevel
30046
+ logLevel,
30047
+ showOutputName
29666
30048
  }) => {
29667
30049
  const existence = useFileExistence(outName);
29668
30050
  const videoCodecOptions = useMemo134(() => {
29669
- return BrowserSafeApis8.validCodecs.filter((c) => {
30051
+ return BrowserSafeApis9.validCodecs.filter((c) => {
29670
30052
  return NoReactAPIs2.isAudioCodec(c) === (renderMode === "audio");
29671
30053
  }).map((codecOption) => {
29672
30054
  return {
@@ -29684,7 +30066,7 @@ var RenderModalBasic = ({
29684
30066
  });
29685
30067
  }, [renderMode, setCodec, codec]);
29686
30068
  const proResProfileOptions = useMemo134(() => {
29687
- return BrowserSafeApis8.proResProfileOptions.map((option) => {
30069
+ return BrowserSafeApis9.proResProfileOptions.map((option) => {
29688
30070
  return {
29689
30071
  label: labelProResProfile(option),
29690
30072
  onClick: () => setProResProfile(option),
@@ -29823,14 +30205,14 @@ var RenderModalBasic = ({
29823
30205
  setStartFrame,
29824
30206
  startFrame
29825
30207
  }),
29826
- /* @__PURE__ */ jsx263(RenderModalOutputName, {
30208
+ showOutputName ? /* @__PURE__ */ jsx263(RenderModalOutputName, {
29827
30209
  existence,
29828
30210
  inputStyle: input,
29829
30211
  outName,
29830
30212
  onValueChange,
29831
30213
  validationMessage,
29832
30214
  label: renderMode === "sequence" ? "Folder name" : "Output name"
29833
- }),
30215
+ }) : null,
29834
30216
  /* @__PURE__ */ jsxs135("div", {
29835
30217
  style: optionRow,
29836
30218
  children: [
@@ -29968,7 +30350,7 @@ var RenderModalGif = ({
29968
30350
  };
29969
30351
 
29970
30352
  // src/components/RenderModal/RenderModalPicture.tsx
29971
- import { BrowserSafeApis as BrowserSafeApis9 } from "@remotion/renderer/client";
30353
+ import { BrowserSafeApis as BrowserSafeApis10 } from "@remotion/renderer/client";
29972
30354
  import { useCallback as useCallback135, useMemo as useMemo136 } from "react";
29973
30355
 
29974
30356
  // src/components/RenderModal/JpegQualitySetting.tsx
@@ -30072,7 +30454,7 @@ var RenderModalPicture = ({
30072
30454
  compositionHeight
30073
30455
  }) => {
30074
30456
  const colorSpaceOptions = useMemo136(() => {
30075
- return BrowserSafeApis9.validColorSpaces.map((option) => {
30457
+ return BrowserSafeApis10.validColorSpaces.map((option) => {
30076
30458
  return {
30077
30459
  label: option,
30078
30460
  onClick: () => setColorSpace(option),
@@ -30365,6 +30747,7 @@ var reducer2 = (state, action) => {
30365
30747
  return state;
30366
30748
  };
30367
30749
  var RenderModal = ({
30750
+ readOnlyStudio,
30368
30751
  initialFrame,
30369
30752
  initialVideoImageFormat,
30370
30753
  initialStillImageFormat,
@@ -30455,7 +30838,7 @@ var RenderModal = ({
30455
30838
  const [initialOutName] = useState88(() => {
30456
30839
  return getDefaultOutLocation({
30457
30840
  compositionName: resolvedComposition.id,
30458
- defaultExtension: initialRenderType === "still" ? initialStillImageFormat : isVideo ? BrowserSafeApis10.getFileExtensionFromCodec(initialVideoCodec, initialAudioCodec) : initialStillImageFormat,
30841
+ defaultExtension: initialRenderType === "still" ? initialStillImageFormat : isVideo ? BrowserSafeApis11.getFileExtensionFromCodec(initialVideoCodec, initialAudioCodec) : initialStillImageFormat,
30459
30842
  type: "asset",
30460
30843
  compositionDefaultOutName: resolvedComposition.defaultOutName,
30461
30844
  outputLocation: renderDefaults.outputLocation
@@ -30540,8 +30923,8 @@ var RenderModal = ({
30540
30923
  }
30541
30924
  return null;
30542
30925
  }, [customTargetAudioBitrate, shouldHaveCustomTargetAudioBitrate]);
30543
- const supportsCrf = BrowserSafeApis10.codecSupportsCrf(codec);
30544
- const supportsVideoBitrate = BrowserSafeApis10.codecSupportsVideoBitrate(codec);
30926
+ const supportsCrf = BrowserSafeApis11.codecSupportsCrf(codec);
30927
+ const supportsVideoBitrate = BrowserSafeApis11.codecSupportsVideoBitrate(codec);
30545
30928
  const supportsBothQualityControls = useMemo137(() => {
30546
30929
  return supportsCrf && supportsVideoBitrate && hardwareAcceleration !== "if-possible" && hardwareAcceleration !== "required";
30547
30930
  }, [hardwareAcceleration, supportsCrf, supportsVideoBitrate]);
@@ -30627,10 +31010,10 @@ var RenderModal = ({
30627
31010
  return Math.max(0, Math.min(resolvedComposition.durationInFrames - 1, parsed));
30628
31011
  }, [resolvedComposition.durationInFrames, unclampedFrame]);
30629
31012
  const deriveFinalAudioCodec = useCallback136((passedVideoCodec, passedAudioCodec) => {
30630
- if (passedAudioCodec !== null && BrowserSafeApis10.supportedAudioCodecs[passedVideoCodec].includes(passedAudioCodec)) {
31013
+ if (passedAudioCodec !== null && BrowserSafeApis11.supportedAudioCodecs[passedVideoCodec].includes(passedAudioCodec)) {
30631
31014
  return passedAudioCodec;
30632
31015
  }
30633
- return BrowserSafeApis10.defaultAudioCodecs[passedVideoCodec].compressed;
31016
+ return BrowserSafeApis11.defaultAudioCodecs[passedVideoCodec].compressed;
30634
31017
  }, []);
30635
31018
  const setDefaultOutName = useCallback136((options) => {
30636
31019
  if (options.type === "still") {
@@ -30645,7 +31028,7 @@ var RenderModal = ({
30645
31028
  });
30646
31029
  } else {
30647
31030
  setOutName((prev) => {
30648
- const codecSuffix = BrowserSafeApis10.getFileExtensionFromCodec(options.codec, deriveFinalAudioCodec(options.codec, options.audioCodec));
31031
+ const codecSuffix = BrowserSafeApis11.getFileExtensionFromCodec(options.codec, deriveFinalAudioCodec(options.codec, options.audioCodec));
30649
31032
  const newFileName = getStringBeforeSuffix(prev) + "." + codecSuffix;
30650
31033
  return newFileName;
30651
31034
  });
@@ -30662,7 +31045,7 @@ var RenderModal = ({
30662
31045
  if (prev === null) {
30663
31046
  return null;
30664
31047
  }
30665
- const newExtension = BrowserSafeApis10.getExtensionFromAudioCodec(newAudioCodec);
31048
+ const newExtension = BrowserSafeApis11.getExtensionFromAudioCodec(newAudioCodec);
30666
31049
  const newFileName = getStringBeforeSuffix(prev) + "." + newExtension;
30667
31050
  return newFileName;
30668
31051
  });
@@ -30751,7 +31134,7 @@ var RenderModal = ({
30751
31134
  }, [codec, everyNthFrameSetting]);
30752
31135
  const audioCodec = deriveFinalAudioCodec(codec, userSelectedAudioCodec);
30753
31136
  const availablePixelFormats = useMemo137(() => {
30754
- return BrowserSafeApis10.validPixelFormatsForCodec(codec);
31137
+ return BrowserSafeApis11.validPixelFormatsForCodec(codec);
30755
31138
  }, [codec]);
30756
31139
  const pixelFormat = useMemo137(() => {
30757
31140
  if (availablePixelFormats.includes(userPreferredPixelFormat)) {
@@ -31078,8 +31461,134 @@ var RenderModal = ({
31078
31461
  });
31079
31462
  const { tab, setTab, shownTabs } = useRenderModalSections(renderMode, codec);
31080
31463
  const { registerKeybinding } = useKeybinding();
31081
- const renderDisabled = state.type === "load" || !outnameValidation.valid;
31464
+ const readOnlyRenderCommand = useMemo137(() => {
31465
+ if (!readOnlyStudio) {
31466
+ return null;
31467
+ }
31468
+ return makeReadOnlyStudioRenderCommand({
31469
+ remotionVersion: window.remotion_version,
31470
+ locationHref: window.location.href,
31471
+ compositionId: resolvedComposition.id,
31472
+ outName,
31473
+ renderMode,
31474
+ renderDefaults,
31475
+ durationInFrames: resolvedComposition.durationInFrames,
31476
+ concurrency,
31477
+ frame: frame2,
31478
+ startFrame,
31479
+ endFrame,
31480
+ stillImageFormat,
31481
+ sequenceImageFormat,
31482
+ videoImageFormat,
31483
+ jpegQuality: renderMode === "video" ? stillImageFormat === "jpeg" ? jpegQuality : null : renderMode === "audio" ? null : jpegQuality,
31484
+ codec,
31485
+ muted,
31486
+ enforceAudioTrack,
31487
+ proResProfile,
31488
+ x264Preset,
31489
+ pixelFormat,
31490
+ crf: qualityControlType === "crf" && hardwareAcceleration !== "if-possible" && hardwareAcceleration !== "required" ? crf : null,
31491
+ videoBitrate,
31492
+ audioBitrate,
31493
+ audioCodec,
31494
+ everyNthFrame,
31495
+ numberOfGifLoops,
31496
+ disallowParallelEncoding,
31497
+ encodingBufferSize,
31498
+ encodingMaxRate,
31499
+ forSeamlessAacConcatenation,
31500
+ separateAudioTo,
31501
+ colorSpace,
31502
+ scale,
31503
+ logLevel,
31504
+ delayRenderTimeout,
31505
+ hardwareAcceleration,
31506
+ chromeMode,
31507
+ headless,
31508
+ disableWebSecurity,
31509
+ ignoreCertificateErrors,
31510
+ gl: openGlOption === "default" ? null : openGlOption,
31511
+ userAgent,
31512
+ multiProcessOnLinux,
31513
+ darkMode,
31514
+ offthreadVideoCacheSizeInBytes,
31515
+ offthreadVideoThreads,
31516
+ mediaCacheSizeInBytes,
31517
+ beepOnFinish,
31518
+ repro,
31519
+ metadata,
31520
+ envVariables: envVariablesArrayToObject(envVariables),
31521
+ inputProps
31522
+ });
31523
+ }, [
31524
+ audioBitrate,
31525
+ audioCodec,
31526
+ beepOnFinish,
31527
+ chromeMode,
31528
+ codec,
31529
+ colorSpace,
31530
+ concurrency,
31531
+ crf,
31532
+ darkMode,
31533
+ delayRenderTimeout,
31534
+ disableWebSecurity,
31535
+ disallowParallelEncoding,
31536
+ endFrame,
31537
+ encodingBufferSize,
31538
+ encodingMaxRate,
31539
+ enforceAudioTrack,
31540
+ envVariables,
31541
+ everyNthFrame,
31542
+ frame2,
31543
+ forSeamlessAacConcatenation,
31544
+ hardwareAcceleration,
31545
+ headless,
31546
+ ignoreCertificateErrors,
31547
+ inputProps,
31548
+ jpegQuality,
31549
+ logLevel,
31550
+ mediaCacheSizeInBytes,
31551
+ metadata,
31552
+ multiProcessOnLinux,
31553
+ muted,
31554
+ numberOfGifLoops,
31555
+ offthreadVideoCacheSizeInBytes,
31556
+ offthreadVideoThreads,
31557
+ openGlOption,
31558
+ outName,
31559
+ pixelFormat,
31560
+ proResProfile,
31561
+ qualityControlType,
31562
+ readOnlyStudio,
31563
+ renderDefaults,
31564
+ renderMode,
31565
+ repro,
31566
+ resolvedComposition.durationInFrames,
31567
+ resolvedComposition.id,
31568
+ scale,
31569
+ separateAudioTo,
31570
+ sequenceImageFormat,
31571
+ startFrame,
31572
+ stillImageFormat,
31573
+ userAgent,
31574
+ videoImageFormat,
31575
+ videoBitrate,
31576
+ x264Preset
31577
+ ]);
31578
+ const [commandCopiedAt, setCommandCopiedAt] = useState88(null);
31579
+ const renderDisabled = readOnlyStudio ? false : !outnameValidation.valid || state.type === "load";
31082
31580
  const trigger = useCallback136(() => {
31581
+ if (readOnlyStudio) {
31582
+ if (!readOnlyRenderCommand) {
31583
+ return;
31584
+ }
31585
+ copyText(readOnlyRenderCommand).then(() => {
31586
+ setCommandCopiedAt(Date.now());
31587
+ }).catch((err) => {
31588
+ showNotification(`Could not copy: ${err.message}`, 2000);
31589
+ });
31590
+ return;
31591
+ }
31083
31592
  if (renderMode === "still") {
31084
31593
  onClickStill();
31085
31594
  } else if (renderMode === "sequence") {
@@ -31087,7 +31596,23 @@ var RenderModal = ({
31087
31596
  } else {
31088
31597
  onClickVideo();
31089
31598
  }
31090
- }, [renderMode, onClickStill, onClickSequence, onClickVideo]);
31599
+ }, [
31600
+ onClickSequence,
31601
+ onClickStill,
31602
+ onClickVideo,
31603
+ readOnlyRenderCommand,
31604
+ readOnlyStudio,
31605
+ renderMode
31606
+ ]);
31607
+ useEffect85(() => {
31608
+ if (commandCopiedAt === null) {
31609
+ return;
31610
+ }
31611
+ const timeout = setTimeout(() => {
31612
+ setCommandCopiedAt(null);
31613
+ }, 2000);
31614
+ return () => clearTimeout(timeout);
31615
+ }, [commandCopiedAt]);
31091
31616
  useEffect85(() => {
31092
31617
  if (renderDisabled) {
31093
31618
  return;
@@ -31148,7 +31673,7 @@ var RenderModal = ({
31148
31673
  backgroundColor: outnameValidation.valid ? BLUE : BLUE_DISABLED
31149
31674
  },
31150
31675
  children: [
31151
- state.type === "idle" ? `Render ${renderMode}` : "Rendering...",
31676
+ readOnlyStudio ? commandCopiedAt ? "Copied command!" : "Copy command" : state.type === "idle" ? `Render ${renderMode}` : "Rendering...",
31152
31677
  /* @__PURE__ */ jsx269(ShortcutHint, {
31153
31678
  keyToPress: "↵",
31154
31679
  cmdOrCtrl: true
@@ -31269,6 +31794,7 @@ var RenderModal = ({
31269
31794
  setStartFrame,
31270
31795
  setVerboseLogging: setLogLevel,
31271
31796
  logLevel,
31797
+ showOutputName: !readOnlyStudio,
31272
31798
  startFrame,
31273
31799
  validationMessage: outnameValidation.valid ? null : outnameValidation.error.message
31274
31800
  }) : tab === "picture" ? /* @__PURE__ */ jsx269(RenderModalPicture, {
@@ -31332,7 +31858,7 @@ var RenderModal = ({
31332
31858
  propsEditType: "input-props",
31333
31859
  saving,
31334
31860
  setSaving,
31335
- readOnlyStudio: false
31861
+ readOnlyStudio
31336
31862
  }) : /* @__PURE__ */ jsx269(RenderModalAdvanced, {
31337
31863
  x264Preset,
31338
31864
  setx264Preset,
@@ -31798,6 +32324,7 @@ var WebRenderModalAudio = ({
31798
32324
  const audioBitrateOptions = useMemo139(() => getQualityOptions(audioBitrate, setAudioBitrate), [audioBitrate, setAudioBitrate]);
31799
32325
  const isAudioOnly = renderMode === "audio";
31800
32326
  const showAudioSettings = isAudioOnly || !muted;
32327
+ const showAudioCodecSetting = !isAudioOnly || containerSupported.length > 1;
31801
32328
  return /* @__PURE__ */ jsxs143("div", {
31802
32329
  style: container62,
31803
32330
  className: VERTICAL_SCROLLBAR_CLASSNAME,
@@ -31832,7 +32359,7 @@ var WebRenderModalAudio = ({
31832
32359
  })
31833
32360
  ]
31834
32361
  }),
31835
- /* @__PURE__ */ jsxs143("div", {
32362
+ showAudioCodecSetting ? /* @__PURE__ */ jsxs143("div", {
31836
32363
  style: optionRow,
31837
32364
  children: [
31838
32365
  /* @__PURE__ */ jsxs143("div", {
@@ -31853,8 +32380,8 @@ var WebRenderModalAudio = ({
31853
32380
  })
31854
32381
  })
31855
32382
  ]
31856
- }),
31857
- effectiveAudioCodec !== audioCodec ? /* @__PURE__ */ jsxs143("div", {
32383
+ }) : null,
32384
+ showAudioCodecSetting && effectiveAudioCodec !== audioCodec ? /* @__PURE__ */ jsxs143("div", {
31858
32385
  style: fallbackNoticeStyle,
31859
32386
  children: [
31860
32387
  humanReadableWebAudioCodec(audioCodec),
@@ -33524,7 +34051,8 @@ var Modals = ({ readOnlyStudio }) => {
33524
34051
  modalContextType && modalContextType.type === "web-render" && /* @__PURE__ */ jsx285(WebRenderModalWithLoader, {
33525
34052
  ...modalContextType
33526
34053
  }),
33527
- modalContextType && canRender && modalContextType.type === "server-render" && /* @__PURE__ */ jsx285(RenderModalWithLoader, {
34054
+ modalContextType && modalContextType.type === "server-render" && (canRender || modalContextType.readOnlyStudio) ? /* @__PURE__ */ jsx285(RenderModalWithLoader, {
34055
+ readOnlyStudio: modalContextType.readOnlyStudio ?? false,
33528
34056
  initialFrame: modalContextType.initialFrame,
33529
34057
  initialDarkMode: modalContextType.initialDarkMode,
33530
34058
  compositionId: modalContextType.compositionId,
@@ -33572,7 +34100,7 @@ var Modals = ({ readOnlyStudio }) => {
33572
34100
  initialHardwareAcceleration: modalContextType.initialHardwareAcceleration,
33573
34101
  initialChromeMode: modalContextType.initialChromeMode,
33574
34102
  renderDefaults: modalContextType.renderDefaults
33575
- }),
34103
+ }) : null,
33576
34104
  modalContextType && modalContextType.type === "render-progress" && /* @__PURE__ */ jsx285(RenderStatusModal, {
33577
34105
  jobId: modalContextType.jobId
33578
34106
  }),