@remotion/studio 4.0.460 → 4.0.461

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 (70) hide show
  1. package/dist/Studio.d.ts +0 -1
  2. package/dist/Studio.js +4 -4
  3. package/dist/components/AudioWaveform.js +17 -9
  4. package/dist/components/MenuBuildIndicator.js +1 -1
  5. package/dist/components/MenuCompositionName.js +1 -0
  6. package/dist/components/RenderButton.js +1 -1
  7. package/dist/components/Timeline/SequencePropsObserver.js +1 -1
  8. package/dist/components/Timeline/Timeline.js +11 -10
  9. package/dist/components/Timeline/TimelineBooleanField.d.ts +4 -4
  10. package/dist/components/Timeline/TimelineBooleanField.js +5 -5
  11. package/dist/components/Timeline/TimelineDragHandler.js +37 -3
  12. package/dist/components/Timeline/TimelineEnumField.d.ts +5 -5
  13. package/dist/components/Timeline/TimelineEnumField.js +7 -7
  14. package/dist/components/Timeline/TimelineExpandArrowButton.js +1 -1
  15. package/dist/components/Timeline/TimelineExpandedSection.js +3 -3
  16. package/dist/components/Timeline/TimelineFieldRow.js +49 -16
  17. package/dist/components/Timeline/TimelineHeightContainer.d.ts +1 -1
  18. package/dist/components/Timeline/TimelineHeightContainer.js +36 -3
  19. package/dist/components/Timeline/TimelineListItem.js +15 -14
  20. package/dist/components/Timeline/TimelineNumberField.d.ts +5 -5
  21. package/dist/components/Timeline/TimelineNumberField.js +12 -10
  22. package/dist/components/Timeline/TimelineRotationField.d.ts +5 -5
  23. package/dist/components/Timeline/TimelineRotationField.js +10 -10
  24. package/dist/components/Timeline/TimelineSchemaField.d.ts +4 -6
  25. package/dist/components/Timeline/TimelineSchemaField.js +8 -11
  26. package/dist/components/Timeline/TimelineSequence.js +2 -2
  27. package/dist/components/Timeline/TimelineSlider.js +2 -2
  28. package/dist/components/Timeline/TimelineStack/get-stack.js +17 -31
  29. package/dist/components/Timeline/TimelineStack/index.js +0 -10
  30. package/dist/components/Timeline/TimelineTimeIndicators.js +2 -2
  31. package/dist/components/Timeline/TimelineTracks.d.ts +1 -1
  32. package/dist/components/Timeline/TimelineTracks.js +40 -10
  33. package/dist/components/Timeline/TimelineTranslateField.d.ts +5 -5
  34. package/dist/components/Timeline/TimelineTranslateField.js +19 -37
  35. package/dist/components/Timeline/sequence-props-subscription-store.js +1 -1
  36. package/dist/components/Timeline/use-sequence-props-subscription.js +3 -3
  37. package/dist/components/Timeline/use-timeline-height.js +4 -13
  38. package/dist/error-overlay/react-overlay/utils/get-source-map.d.ts +3 -3
  39. package/dist/error-overlay/react-overlay/utils/get-source-map.js +5 -5
  40. package/dist/error-overlay/react-overlay/utils/unmapper.d.ts +0 -6
  41. package/dist/error-overlay/react-overlay/utils/unmapper.js +8 -1
  42. package/dist/esm/{chunk-nrgs0ad5.js → chunk-yzh34sp0.js} +286 -538
  43. package/dist/esm/internals.mjs +286 -538
  44. package/dist/esm/previewEntry.mjs +289 -542
  45. package/dist/esm/renderEntry.mjs +2 -5
  46. package/dist/helpers/calculate-timeline.js +26 -4
  47. package/dist/helpers/get-timeline-sequence-sort-key.d.ts +1 -0
  48. package/dist/helpers/timeline-layout.d.ts +3 -2
  49. package/dist/helpers/timeline-layout.js +31 -9
  50. package/dist/internals.d.ts +0 -1
  51. package/dist/previewEntry.js +1 -1
  52. package/dist/renderEntry.js +3 -3
  53. package/package.json +13 -22
  54. package/dist/audio-waveform-worker.d.ts +0 -1
  55. package/dist/audio-waveform-worker.js +0 -102
  56. package/dist/components/audio-waveform-worker-types.d.ts +0 -28
  57. package/dist/components/audio-waveform-worker-types.js +0 -2
  58. package/dist/components/draw-peaks.d.ts +0 -1
  59. package/dist/components/draw-peaks.js +0 -68
  60. package/dist/components/load-waveform-peaks.d.ts +0 -13
  61. package/dist/components/load-waveform-peaks.js +0 -76
  62. package/dist/components/parse-color.d.ts +0 -1
  63. package/dist/components/parse-color.js +0 -17
  64. package/dist/components/slice-waveform-peaks.d.ts +0 -7
  65. package/dist/components/slice-waveform-peaks.js +0 -15
  66. package/dist/components/waveform-peak-processor.d.ts +0 -23
  67. package/dist/components/waveform-peak-processor.js +0 -77
  68. package/dist/esm/audio-waveform-worker.mjs +0 -346
  69. package/dist/make-audio-waveform-worker.d.ts +0 -1
  70. package/dist/make-audio-waveform-worker.js +0 -10
@@ -104,6 +104,7 @@ import { interpolate } from "remotion";
104
104
  import {
105
105
  getFieldsToShow
106
106
  } from "@remotion/studio-shared";
107
+ import { NoReactInternals } from "remotion/no-react";
107
108
  import {
108
109
  SCHEMA_FIELD_ROW_HEIGHT,
109
110
  UNSUPPORTED_FIELD_ROW_HEIGHT,
@@ -120,10 +121,15 @@ var getEffectSchemaLabels = (effect) => {
120
121
  if (!effect.definition.schema) {
121
122
  return [];
122
123
  }
123
- return Object.entries(effect.definition.schema).map(([key, fieldSchema]) => ({
124
- key,
125
- description: fieldSchema.description
126
- }));
124
+ return Object.entries(effect.definition.schema).map(([key, fieldSchema]) => {
125
+ if (fieldSchema.type === "hidden") {
126
+ return null;
127
+ }
128
+ return {
129
+ key,
130
+ description: fieldSchema.description
131
+ };
132
+ }).filter(NoReactInternals.truthy);
127
133
  };
128
134
  var buildTimelineTree = ({
129
135
  sequence,
@@ -136,19 +142,28 @@ var buildTimelineTree = ({
136
142
  if (sequence.effects.length > 0) {
137
143
  roots.push({
138
144
  kind: "group",
139
- nodePathInfo: { nodePath: [...nodePath, "effects"], index },
145
+ nodePathInfo: {
146
+ nodePath: [...nodePath, "effects"],
147
+ index,
148
+ numberOfSequencesWithThisNodePath: 0
149
+ },
140
150
  label: "Effects",
141
151
  children: sequence.effects.map((effect, i) => {
142
152
  const effectNodePath = [...nodePath, "effects", i];
143
153
  return {
144
154
  kind: "group",
145
- nodePathInfo: { nodePath: effectNodePath, index },
155
+ nodePathInfo: {
156
+ nodePath: effectNodePath,
157
+ index,
158
+ numberOfSequencesWithThisNodePath: 0
159
+ },
146
160
  label: effect.definition.label,
147
161
  children: getEffectSchemaLabels(effect).map((label) => ({
148
162
  kind: "field",
149
163
  nodePathInfo: {
150
164
  nodePath: [...effectNodePath, label.key],
151
- index
165
+ index,
166
+ numberOfSequencesWithThisNodePath: 0
152
167
  },
153
168
  label: label.description ?? label.key,
154
169
  field: null
@@ -168,7 +183,11 @@ var buildTimelineTree = ({
168
183
  for (const f of controlFields) {
169
184
  roots.push({
170
185
  kind: "field",
171
- nodePathInfo: { nodePath: [...nodePath, "controls", f.key], index },
186
+ nodePathInfo: {
187
+ nodePath: [...nodePath, "controls", f.key],
188
+ index,
189
+ numberOfSequencesWithThisNodePath: 0
190
+ },
172
191
  label: f.description ?? f.key,
173
192
  field: f
174
193
  });
@@ -204,13 +223,12 @@ var getExpandedTrackHeight = ({
204
223
  sequence,
205
224
  nodePathInfo,
206
225
  getIsExpanded,
207
- getDragOverrides,
208
226
  getCodeValues
209
227
  }) => {
210
228
  const tree = buildTimelineTree({
211
229
  sequence,
212
230
  nodePathInfo,
213
- getDragOverrides,
231
+ getDragOverrides: () => ({}),
214
232
  getCodeValues
215
233
  });
216
234
  const flat = flattenVisibleTreeNodes({ nodes: tree, getIsExpanded });
@@ -316,9 +334,9 @@ var TimelineSlider = () => {
316
334
  if (videoConfig === null || timelineWidth === null) {
317
335
  return null;
318
336
  }
319
- return /* @__PURE__ */ jsx3(Inner, {});
337
+ return /* @__PURE__ */ jsx3(TimelineSliderInner, {});
320
338
  };
321
- var Inner = () => {
339
+ var TimelineSliderInner = () => {
322
340
  const videoConfig = useVideoConfig();
323
341
  const timelinePosition = Internals.Timeline.useTimelinePosition();
324
342
  const ref = useRef(null);
@@ -1855,7 +1873,7 @@ var PreviewServerConnection = ({ children, readOnlyStudio }) => {
1855
1873
 
1856
1874
  // src/helpers/use-asset-drag-events.ts
1857
1875
  import { useCallback as useCallback8, useEffect as useEffect9, useMemo as useMemo10, useRef as useRef7 } from "react";
1858
- import { NoReactInternals } from "remotion/no-react";
1876
+ import { NoReactInternals as NoReactInternals2 } from "remotion/no-react";
1859
1877
  function useAssetDragEvents({
1860
1878
  name,
1861
1879
  parentFolder,
@@ -1864,7 +1882,7 @@ function useAssetDragEvents({
1864
1882
  }) {
1865
1883
  const dragDepthRef = useRef7(0);
1866
1884
  const combinedParents = useMemo10(() => {
1867
- return [parentFolder, name].filter(NoReactInternals.truthy).join("/");
1885
+ return [parentFolder, name].filter(NoReactInternals2.truthy).join("/");
1868
1886
  }, [name, parentFolder]);
1869
1887
  const isDropDiv = useMemo10(() => {
1870
1888
  return dropLocation === combinedParents;
@@ -1904,7 +1922,7 @@ import React15, {
1904
1922
  useState as useState10
1905
1923
  } from "react";
1906
1924
  import { Internals as Internals5 } from "remotion";
1907
- import { NoReactInternals as NoReactInternals3 } from "remotion/no-react";
1925
+ import { NoReactInternals as NoReactInternals4 } from "remotion/no-react";
1908
1926
 
1909
1927
  // src/helpers/copy-text.ts
1910
1928
  var copyText = (cmd) => {
@@ -2164,7 +2182,7 @@ var Column = ({ children, justify, className, align, style = {} }) => {
2164
2182
  };
2165
2183
 
2166
2184
  // src/components/RenderQueue/actions.ts
2167
- import { NoReactInternals as NoReactInternals2 } from "remotion/no-react";
2185
+ import { NoReactInternals as NoReactInternals3 } from "remotion/no-react";
2168
2186
 
2169
2187
  // src/components/call-api.ts
2170
2188
  var callApi = (endpoint, body, signal) => {
@@ -2221,7 +2239,7 @@ var addStillRenderJob = ({
2221
2239
  chromiumOptions,
2222
2240
  delayRenderTimeout,
2223
2241
  envVariables,
2224
- serializedInputPropsWithCustomSchema: NoReactInternals2.serializeJSONWithSpecialTypes({
2242
+ serializedInputPropsWithCustomSchema: NoReactInternals3.serializeJSONWithSpecialTypes({
2225
2243
  data: inputProps,
2226
2244
  staticBase: window.remotion_staticBase,
2227
2245
  indent: undefined
@@ -2273,7 +2291,7 @@ var addSequenceRenderJob = ({
2273
2291
  delayRenderTimeout,
2274
2292
  envVariables,
2275
2293
  concurrency,
2276
- serializedInputPropsWithCustomSchema: NoReactInternals2.serializeJSONWithSpecialTypes({
2294
+ serializedInputPropsWithCustomSchema: NoReactInternals3.serializeJSONWithSpecialTypes({
2277
2295
  data: inputProps,
2278
2296
  staticBase: window.remotion_staticBase,
2279
2297
  indent: undefined
@@ -2359,7 +2377,7 @@ var addVideoRenderJob = ({
2359
2377
  disallowParallelEncoding,
2360
2378
  chromiumOptions,
2361
2379
  envVariables,
2362
- serializedInputPropsWithCustomSchema: NoReactInternals2.serializeJSONWithSpecialTypes({
2380
+ serializedInputPropsWithCustomSchema: NoReactInternals3.serializeJSONWithSpecialTypes({
2363
2381
  data: inputProps,
2364
2382
  staticBase: window.remotion_staticBase,
2365
2383
  indent: undefined
@@ -2433,7 +2451,7 @@ var getProjectInfo = (signal) => {
2433
2451
  var callUpdateDefaultPropsApi = (compositionId, defaultProps, enumPaths) => {
2434
2452
  return callApi("/api/update-default-props", {
2435
2453
  compositionId,
2436
- defaultProps: NoReactInternals2.serializeJSONWithSpecialTypes({
2454
+ defaultProps: NoReactInternals3.serializeJSONWithSpecialTypes({
2437
2455
  data: defaultProps,
2438
2456
  indent: undefined,
2439
2457
  staticBase: window.remotion_staticBase
@@ -2600,7 +2618,7 @@ var AssetFolderTree = ({
2600
2618
  readOnlyStudio
2601
2619
  }) => {
2602
2620
  const combinedParents = useMemo13(() => {
2603
- return [parentFolder, name].filter(NoReactInternals3.truthy).join("/");
2621
+ return [parentFolder, name].filter(NoReactInternals4.truthy).join("/");
2604
2622
  }, [name, parentFolder]);
2605
2623
  return /* @__PURE__ */ jsxs3("div", {
2606
2624
  children: [
@@ -5166,7 +5184,7 @@ import { useCallback as useCallback99, useMemo as useMemo105, useState as useSta
5166
5184
  // src/helpers/use-menu-structure.tsx
5167
5185
  import { useContext as useContext22, useMemo as useMemo42 } from "react";
5168
5186
  import { Internals as Internals19 } from "remotion";
5169
- import { NoReactInternals as NoReactInternals5 } from "remotion/no-react";
5187
+ import { NoReactInternals as NoReactInternals6 } from "remotion/no-react";
5170
5188
 
5171
5189
  // src/api/restart-studio.ts
5172
5190
  import { getRemotionEnvironment as getRemotionEnvironment2 } from "remotion";
@@ -5781,6 +5799,7 @@ var parseError = async (error, contextLines) => {
5781
5799
  };
5782
5800
 
5783
5801
  // src/error-overlay/react-overlay/utils/unmapper.ts
5802
+ import { sourceContentFor } from "@jridgewell/trace-mapping";
5784
5803
  import { Internals as Internals13 } from "remotion";
5785
5804
 
5786
5805
  // src/error-overlay/react-overlay/utils/get-lines-around.ts
@@ -5797,9 +5816,9 @@ function getLinesAround(line2, count, lines) {
5797
5816
  }
5798
5817
 
5799
5818
  // src/error-overlay/react-overlay/utils/get-source-map.ts
5800
- import { SourceMapConsumer } from "source-map";
5801
- var getOriginalPosition = (source_map, line2, column) => {
5802
- const result = source_map.originalPositionFor({
5819
+ import { TraceMap, originalPositionFor } from "@jridgewell/trace-mapping";
5820
+ var getOriginalPosition = (sourceMap, line2, column) => {
5821
+ const result = originalPositionFor(sourceMap, {
5803
5822
  line: line2,
5804
5823
  column
5805
5824
  });
@@ -5832,12 +5851,12 @@ async function getSourceMap(fileUri, fileContents) {
5832
5851
  throw new Error("Sorry, non-base64 inline source-map encoding is not supported.");
5833
5852
  }
5834
5853
  const converted = window.atob(sm.substring(match2[0].length));
5835
- return new SourceMapConsumer(JSON.parse(converted));
5854
+ return new TraceMap(JSON.parse(converted));
5836
5855
  }
5837
5856
  const index = fileUri.lastIndexOf("/");
5838
5857
  const url = fileUri.substring(0, index + 1) + sm;
5839
5858
  const obj = await fetch(url).then((res) => res.json());
5840
- return new SourceMapConsumer(obj);
5859
+ return new TraceMap(obj);
5841
5860
  }
5842
5861
 
5843
5862
  // src/error-overlay/react-overlay/utils/unmapper.ts
@@ -5870,7 +5889,7 @@ var unmap = async (frames, contextLines) => {
5870
5889
  const pos = getOriginalPosition(map, frame.frame.lineNumber, frame.frame.columnNumber);
5871
5890
  const { functionName } = frame.frame;
5872
5891
  let hasSource = null;
5873
- hasSource = pos.source ? map.sourceContentFor(pos.source, false) : null;
5892
+ hasSource = pos.source ? sourceContentFor(map, pos.source) : null;
5874
5893
  const scriptCode = hasSource && pos.line ? getLinesAround(pos.line, contextLines, hasSource.split(`
5875
5894
  `)) : null;
5876
5895
  return {
@@ -8234,7 +8253,7 @@ import {
8234
8253
  useImperativeHandle as useImperativeHandle9
8235
8254
  } from "react";
8236
8255
  import { Internals as Internals18 } from "remotion";
8237
- import { NoReactInternals as NoReactInternals4 } from "remotion/no-react";
8256
+ import { NoReactInternals as NoReactInternals5 } from "remotion/no-react";
8238
8257
 
8239
8258
  // src/icons/timelineInOutPointer.tsx
8240
8259
  import { jsx as jsx76 } from "react/jsx-runtime";
@@ -8305,7 +8324,7 @@ var getTooltipText = (pointType, key) => [
8305
8324
  `Mark ${pointType}`,
8306
8325
  areKeyboardShortcutsDisabled() ? null : `(${key})`,
8307
8326
  "- right click to clear"
8308
- ].filter(NoReactInternals4.truthy).join(" ");
8327
+ ].filter(NoReactInternals5.truthy).join(" ");
8309
8328
  var style4 = {
8310
8329
  width: 16,
8311
8330
  height: 16
@@ -8826,7 +8845,7 @@ var getFileMenu = ({
8826
8845
  quickSwitcherLabel: "Open in editor..."
8827
8846
  } : null,
8828
8847
  getGitMenuItem()
8829
- ].filter(NoReactInternals5.truthy);
8848
+ ].filter(NoReactInternals6.truthy);
8830
8849
  if (items.length === 0) {
8831
8850
  return null;
8832
8851
  }
@@ -9569,7 +9588,7 @@ var itemToSearchResult = (item, setSelectedModal, prefixes) => {
9569
9588
  ...prefixes,
9570
9589
  getItemLabel(item)
9571
9590
  ]);
9572
- }).flat(1).filter(NoReactInternals5.truthy);
9591
+ }).flat(1).filter(NoReactInternals6.truthy);
9573
9592
  }
9574
9593
  return [
9575
9594
  {
@@ -9591,7 +9610,7 @@ var makeSearchResults = (actions, setSelectedModal) => {
9591
9610
  }
9592
9611
  return itemToSearchResult(item, setSelectedModal, []);
9593
9612
  });
9594
- }).flat(Infinity).filter(NoReactInternals5.truthy);
9613
+ }).flat(Infinity).filter(NoReactInternals6.truthy);
9595
9614
  return items;
9596
9615
  };
9597
9616
 
@@ -9743,7 +9762,7 @@ import { useContext as useContext23, useEffect as useEffect31, useState as useSt
9743
9762
  import { Internals as Internals20 } from "remotion";
9744
9763
 
9745
9764
  // src/components/Timeline/TimelineStack/get-stack.ts
9746
- import { SourceMapConsumer as SourceMapConsumer2 } from "source-map";
9765
+ import { TraceMap as TraceMap2 } from "@jridgewell/trace-mapping";
9747
9766
 
9748
9767
  // src/helpers/get-location-of-sequence.ts
9749
9768
  var getLocationOfSequence = (stack2) => {
@@ -9782,40 +9801,23 @@ var getLocationOfFunctionCall = (stack2, functionName) => {
9782
9801
  };
9783
9802
 
9784
9803
  // src/components/Timeline/TimelineStack/get-stack.ts
9785
- var waiters = [];
9786
- var sourceMapConsumerCache = {};
9787
- var isCreating = {};
9804
+ var traceMapCache = {};
9805
+ var traceMapPromises = {};
9788
9806
  var getSourceMapCache = async (fileName) => {
9789
- if (sourceMapConsumerCache[fileName]) {
9790
- return sourceMapConsumerCache[fileName];
9791
- }
9792
- if (isCreating[fileName]) {
9793
- return new Promise((resolve) => {
9794
- waiters.push({
9795
- id: String(Math.random()),
9796
- forFileName: fileName,
9797
- resolve
9798
- });
9799
- });
9807
+ if (traceMapCache[fileName]) {
9808
+ return traceMapCache[fileName];
9800
9809
  }
9801
- isCreating[fileName] = true;
9802
- const res = await fetch(`${fileName}.map`);
9803
- const json = await res.json();
9804
- const map = await new Promise((resolve) => {
9805
- SourceMapConsumer2.with(json, null, (consumer) => {
9806
- resolve(consumer);
9807
- });
9808
- });
9809
- waiters.filter((w) => {
9810
- if (w.forFileName === fileName) {
9811
- w.resolve(map);
9812
- return false;
9813
- }
9814
- return true;
9810
+ if (traceMapPromises[fileName]) {
9811
+ return traceMapPromises[fileName];
9812
+ }
9813
+ traceMapPromises[fileName] = fetch(`${fileName}.map`).then((res) => res.json()).then((json) => {
9814
+ const map = new TraceMap2(json);
9815
+ traceMapCache[fileName] = map;
9816
+ return map;
9817
+ }).finally(() => {
9818
+ delete traceMapPromises[fileName];
9815
9819
  });
9816
- sourceMapConsumerCache[fileName] = map;
9817
- isCreating[fileName] = false;
9818
- return map;
9820
+ return traceMapPromises[fileName];
9819
9821
  };
9820
9822
  var getOriginalLocationFromStack = async (stack2, type) => {
9821
9823
  const location2 = type === "sequence" ? getLocationOfSequence(stack2) : getLocationOfFunctionCall(stack2, "visualControl");
@@ -9877,7 +9879,8 @@ var baseStyle = {
9877
9879
  color: "inherit",
9878
9880
  textDecoration: "none",
9879
9881
  fontSize: "inherit",
9880
- textUnderlineOffset: 2
9882
+ textUnderlineOffset: 2,
9883
+ whiteSpace: "nowrap"
9881
9884
  };
9882
9885
  var compositionNameStyle = {
9883
9886
  ...baseStyle,
@@ -10041,9 +10044,9 @@ var MenuBuildIndicator = () => {
10041
10044
  }) : /* @__PURE__ */ jsx83("div", {
10042
10045
  style: noSpinner
10043
10046
  }),
10044
- isClickable ? /* @__PURE__ */ jsx83(Spacing, {
10047
+ /* @__PURE__ */ jsx83(Spacing, {
10045
10048
  x: 0.5
10046
- }) : null,
10049
+ }),
10047
10050
  isClickable ? /* @__PURE__ */ jsx83("a", {
10048
10051
  style: projectNameHovered ? projectNameLinkHovered : projectNameLink,
10049
10052
  title: projectNameTitle,
@@ -10293,7 +10296,7 @@ var useStudioCanvasDimensions = ({
10293
10296
 
10294
10297
  // src/components/EditorGuides/Guide.tsx
10295
10298
  import { memo, useCallback as useCallback40, useContext as useContext27, useMemo as useMemo48 } from "react";
10296
- import { NoReactInternals as NoReactInternals6 } from "remotion/no-react";
10299
+ import { NoReactInternals as NoReactInternals7 } from "remotion/no-react";
10297
10300
 
10298
10301
  // src/components/ForceSpecificCursor.tsx
10299
10302
  import React58, { useMemo as useMemo47 } from "react";
@@ -10417,7 +10420,7 @@ var GuideComp = ({ guide, canvasDimensions, scale }) => {
10417
10420
  className: [
10418
10421
  "__remotion_editor_guide_content",
10419
10422
  selectedGuideId === guide.id || hoveredGuideId === guide.id ? "__remotion_editor_guide_selected" : null
10420
- ].filter(NoReactInternals6.truthy).join(" ")
10423
+ ].filter(NoReactInternals7.truthy).join(" ")
10421
10424
  })
10422
10425
  })
10423
10426
  });
@@ -11657,7 +11660,7 @@ import { useCallback as useCallback44, useContext as useContext35, useEffect as
11657
11660
  import { Internals as Internals31 } from "remotion";
11658
11661
 
11659
11662
  // src/helpers/document-title.ts
11660
- import { NoReactInternals as NoReactInternals7 } from "remotion/no-react";
11663
+ import { NoReactInternals as NoReactInternals8 } from "remotion/no-react";
11661
11664
  var currentItemName = null;
11662
11665
  var renderJobs = [];
11663
11666
  var setCurrentCanvasContentId = (id) => {
@@ -11685,7 +11688,7 @@ var updateTitle = () => {
11685
11688
  document.title = [
11686
11689
  getProgressInBrackets(currentItemName, renderJobs),
11687
11690
  `${currentCompTitle} ${suffix}`
11688
- ].filter(NoReactInternals7.truthy).join(" ");
11691
+ ].filter(NoReactInternals8.truthy).join(" ");
11689
11692
  };
11690
11693
  var getProgressInBrackets = (selectedCompositionId, jobs) => {
11691
11694
  const currentRender = jobs.find((job) => job.status === "running");
@@ -12161,7 +12164,7 @@ import { useContext as useContext41 } from "react";
12161
12164
  // src/components/RenderModal/DataEditor.tsx
12162
12165
  import React94, { useCallback as useCallback71, useContext as useContext40, useMemo as useMemo86, useState as useState53 } from "react";
12163
12166
  import { getInputProps } from "remotion";
12164
- import { NoReactInternals as NoReactInternals10 } from "remotion/no-react";
12167
+ import { NoReactInternals as NoReactInternals11 } from "remotion/no-react";
12165
12168
 
12166
12169
  // src/components/NewComposition/ValidationMessage.tsx
12167
12170
  import { useMemo as useMemo57 } from "react";
@@ -12293,7 +12296,7 @@ var Item = ({ selected, onClick, children }) => {
12293
12296
  };
12294
12297
 
12295
12298
  // src/components/RenderModal/get-render-modal-warnings.ts
12296
- import { NoReactInternals as NoReactInternals8 } from "remotion/no-react";
12299
+ import { NoReactInternals as NoReactInternals9 } from "remotion/no-react";
12297
12300
  var getInputPropsWarning = ({
12298
12301
  cliProps,
12299
12302
  propsEditType
@@ -12356,13 +12359,13 @@ var getRenderModalWarnings = ({
12356
12359
  staticFileUsed(customFileUsed, inJSONEditor),
12357
12360
  mapUsed(jsMapUsed, inJSONEditor),
12358
12361
  setUsed(jsSetUsed, inJSONEditor)
12359
- ].filter(NoReactInternals8.truthy);
12362
+ ].filter(NoReactInternals9.truthy);
12360
12363
  };
12361
12364
 
12362
12365
  // src/components/RenderModal/RenderModalJSONPropsEditor.tsx
12363
12366
  import React69, { useCallback as useCallback48, useEffect as useEffect43, useMemo as useMemo60 } from "react";
12364
12367
  import { useContext as useContext38 } from "react";
12365
- import { NoReactInternals as NoReactInternals9 } from "remotion/no-react";
12368
+ import { NoReactInternals as NoReactInternals10 } from "remotion/no-react";
12366
12369
 
12367
12370
  // src/components/RenderModal/SchemaEditor/deep-equal.ts
12368
12371
  function deepEqual(a, b) {
@@ -12670,7 +12673,7 @@ var parseJS = (value, schema) => {
12670
12673
  };
12671
12674
  var parseJSON = (str, schema) => {
12672
12675
  try {
12673
- const value = NoReactInternals9.deserializeJSONWithSpecialTypes(str);
12676
+ const value = NoReactInternals10.deserializeJSONWithSpecialTypes(str);
12674
12677
  const zodValidation = zodSafeParse(schema, value);
12675
12678
  return { str, value, validJSON: true, zodValidation };
12676
12679
  } catch (e) {
@@ -15832,7 +15835,7 @@ var DataEditor = ({
15832
15835
  return null;
15833
15836
  }
15834
15837
  const value = defaultProps;
15835
- return NoReactInternals10.serializeJSONWithSpecialTypes({
15838
+ return NoReactInternals11.serializeJSONWithSpecialTypes({
15836
15839
  data: value,
15837
15840
  indent: 2,
15838
15841
  staticBase: window.remotion_staticBase
@@ -16964,7 +16967,7 @@ var RenderQueueRemoveItem = ({ job }) => {
16964
16967
  import { useCallback as useCallback82, useContext as useContext48, useMemo as useMemo92 } from "react";
16965
16968
 
16966
16969
  // src/helpers/retry-payload.ts
16967
- import { NoReactInternals as NoReactInternals11 } from "remotion/no-react";
16970
+ import { NoReactInternals as NoReactInternals12 } from "remotion/no-react";
16968
16971
  var makeRetryPayload = (job) => {
16969
16972
  const defaults = window.remotion_renderDefaults;
16970
16973
  if (!defaults) {
@@ -17000,7 +17003,7 @@ var makeRetryPayload = (job) => {
17000
17003
  initialHeadless: job.chromiumOptions.headless,
17001
17004
  initialIgnoreCertificateErrors: job.chromiumOptions.ignoreCertificateErrors,
17002
17005
  initialDarkMode: job.chromiumOptions.darkMode,
17003
- defaultProps: NoReactInternals11.deserializeJSONWithSpecialTypes(job.serializedInputPropsWithCustomSchema),
17006
+ defaultProps: NoReactInternals12.deserializeJSONWithSpecialTypes(job.serializedInputPropsWithCustomSchema),
17004
17007
  inFrameMark: null,
17005
17008
  outFrameMark: null,
17006
17009
  initialOffthreadVideoCacheSizeInBytes: job.offthreadVideoCacheSizeInBytes,
@@ -17052,7 +17055,7 @@ var makeRetryPayload = (job) => {
17052
17055
  initialHeadless: job.chromiumOptions.headless,
17053
17056
  initialIgnoreCertificateErrors: job.chromiumOptions.ignoreCertificateErrors,
17054
17057
  initialDarkMode: job.chromiumOptions.darkMode,
17055
- defaultProps: NoReactInternals11.deserializeJSONWithSpecialTypes(job.serializedInputPropsWithCustomSchema),
17058
+ defaultProps: NoReactInternals12.deserializeJSONWithSpecialTypes(job.serializedInputPropsWithCustomSchema),
17056
17059
  initialStillImageFormat: defaults.stillImageFormat,
17057
17060
  inFrameMark: job.startFrame,
17058
17061
  outFrameMark: job.endFrame,
@@ -17107,7 +17110,7 @@ var makeRetryPayload = (job) => {
17107
17110
  initialHeadless: job.chromiumOptions.headless,
17108
17111
  initialIgnoreCertificateErrors: job.chromiumOptions.ignoreCertificateErrors,
17109
17112
  initialDarkMode: job.chromiumOptions.darkMode,
17110
- defaultProps: NoReactInternals11.deserializeJSONWithSpecialTypes(job.serializedInputPropsWithCustomSchema),
17113
+ defaultProps: NoReactInternals12.deserializeJSONWithSpecialTypes(job.serializedInputPropsWithCustomSchema),
17111
17114
  inFrameMark: job.startFrame,
17112
17115
  outFrameMark: job.endFrame,
17113
17116
  initialOffthreadVideoCacheSizeInBytes: job.offthreadVideoCacheSizeInBytes,
@@ -17561,7 +17564,7 @@ import React109, { useContext as useContext53 } from "react";
17561
17564
 
17562
17565
  // src/components/VisualControls/VisualControlHandle.tsx
17563
17566
  import { useCallback as useCallback85, useContext as useContext52, useEffect as useEffect52, useState as useState57 } from "react";
17564
- import { NoReactInternals as NoReactInternals12 } from "remotion/no-react";
17567
+ import { NoReactInternals as NoReactInternals13 } from "remotion/no-react";
17565
17568
 
17566
17569
  // src/fast-refresh-context.ts
17567
17570
  import { createContext as createContext20 } from "react";
@@ -17703,7 +17706,7 @@ var VisualControlHandle = ({ value, keyName }) => {
17703
17706
  changes: [
17704
17707
  {
17705
17708
  id: keyName,
17706
- newValueSerialized: val === undefined ? "" : NoReactInternals12.serializeJSONWithSpecialTypes({
17709
+ newValueSerialized: val === undefined ? "" : NoReactInternals13.serializeJSONWithSpecialTypes({
17707
17710
  data: val,
17708
17711
  indent: 2,
17709
17712
  staticBase: window.remotion_staticBase
@@ -17991,12 +17994,12 @@ var loadLoopOption = () => {
17991
17994
 
17992
17995
  // src/components/CheckboardToggle.tsx
17993
17996
  import { useCallback as useCallback87, useContext as useContext55 } from "react";
17994
- import { NoReactInternals as NoReactInternals13 } from "remotion/no-react";
17997
+ import { NoReactInternals as NoReactInternals14 } from "remotion/no-react";
17995
17998
  import { jsx as jsx165 } from "react/jsx-runtime";
17996
17999
  var accessibilityLabel2 = [
17997
18000
  "Show transparency as checkerboard",
17998
18001
  areKeyboardShortcutsDisabled() ? null : "(T)"
17999
- ].filter(NoReactInternals13.truthy).join(" ");
18002
+ ].filter(NoReactInternals14.truthy).join(" ");
18000
18003
  var CheckboardToggle = () => {
18001
18004
  const { checkerboard, setCheckerboard } = useContext55(CheckerboardContext);
18002
18005
  const onClick = useCallback87(() => {
@@ -18112,12 +18115,12 @@ var FpsCounter = ({ playbackSpeed }) => {
18112
18115
  // src/components/FullscreenToggle.tsx
18113
18116
  import { useCallback as useCallback88, useContext as useContext56, useEffect as useEffect54 } from "react";
18114
18117
  import { Internals as Internals38 } from "remotion";
18115
- import { NoReactInternals as NoReactInternals14 } from "remotion/no-react";
18118
+ import { NoReactInternals as NoReactInternals15 } from "remotion/no-react";
18116
18119
  import { jsx as jsx166 } from "react/jsx-runtime";
18117
18120
  var accessibilityLabel3 = [
18118
18121
  "Enter fullscreen preview",
18119
18122
  areKeyboardShortcutsDisabled() ? null : "(F)"
18120
- ].filter(NoReactInternals14.truthy).join(" ");
18123
+ ].filter(NoReactInternals15.truthy).join(" ");
18121
18124
  var FullScreenToggle = () => {
18122
18125
  const keybindings = useKeybinding();
18123
18126
  const { setSize } = useContext56(Internals38.PreviewSizeContext);
@@ -18925,7 +18928,7 @@ var RenderButton = ({
18925
18928
  };
18926
18929
  }, []);
18927
18930
  const video = Internals42.useVideo();
18928
- const getCurrentFrame2 = PlayerInternals14.useFrameImperative();
18931
+ const { getCurrentFrame: getCurrentFrame2 } = PlayerInternals14.usePlayer();
18929
18932
  const { props } = useContext58(Internals42.EditorPropsContext);
18930
18933
  const openServerRenderModal = useCallback93((copyCommandOnly) => {
18931
18934
  if (!video) {
@@ -20662,7 +20665,7 @@ var calculateTimeline = ({
20662
20665
  hash: actualHash,
20663
20666
  cascadedStart,
20664
20667
  cascadedDuration: sequence.duration,
20665
- nodePathInfo: nodePath ? { nodePath, index: 0 } : null
20668
+ nodePathInfo: nodePath ? { nodePath, index: 0, numberOfSequencesWithThisNodePath: 0 } : null
20666
20669
  });
20667
20670
  }
20668
20671
  const uniqueTracks = [];
@@ -20686,12 +20689,29 @@ var calculateTimeline = ({
20686
20689
  if (track.nodePathInfo === null) {
20687
20690
  return track;
20688
20691
  }
20689
- const key4 = JSON.stringify(track.nodePathInfo.nodePath);
20692
+ const key4 = track.nodePathInfo.nodePath.join(".");
20690
20693
  const index = nodePathIndexCounters.get(key4) ?? 0;
20691
20694
  nodePathIndexCounters.set(key4, index + 1);
20692
20695
  return {
20693
20696
  ...track,
20694
- nodePathInfo: { nodePath: track.nodePathInfo.nodePath, index }
20697
+ nodePathInfo: {
20698
+ nodePath: track.nodePathInfo.nodePath,
20699
+ index,
20700
+ numberOfSequencesWithThisNodePath: 0
20701
+ }
20702
+ };
20703
+ }).map((track) => {
20704
+ if (track.nodePathInfo === null) {
20705
+ return track;
20706
+ }
20707
+ const key4 = track.nodePathInfo.nodePath.join(".");
20708
+ return {
20709
+ ...track,
20710
+ nodePathInfo: {
20711
+ nodePath: track.nodePathInfo.nodePath,
20712
+ index: track.nodePathInfo.index,
20713
+ numberOfSequencesWithThisNodePath: nodePathIndexCounters.get(key4) ?? 0
20714
+ }
20695
20715
  };
20696
20716
  });
20697
20717
  };
@@ -20743,7 +20763,7 @@ var SequencePropsObserver = () => {
20743
20763
  if (event.type !== "sequence-props-updated") {
20744
20764
  return;
20745
20765
  }
20746
- setCodeValues(event.nodePath, event.result);
20766
+ setCodeValues(event.nodePath, () => event.result);
20747
20767
  };
20748
20768
  const unsubscribe = subscribeToEvent("sequence-props-updated", handleEvent);
20749
20769
  return () => {
@@ -20824,7 +20844,7 @@ var acquireSequencePropsSubscription = ({
20824
20844
  entries.delete(key4);
20825
20845
  }
20826
20846
  acquired.promise.then((result) => {
20827
- if (!result.canUpdate) {
20847
+ if (!result.success) {
20828
20848
  return;
20829
20849
  }
20830
20850
  return callApi("/api/unsubscribe-from-sequence-props", {
@@ -20871,13 +20891,13 @@ var useSequencePropsSubscription = ({
20871
20891
  schema,
20872
20892
  clientId,
20873
20893
  applyOnce: (result) => {
20874
- if (!result.canUpdate) {
20894
+ if (!result.success) {
20875
20895
  return;
20876
20896
  }
20877
- setCodeValues(result.nodePath, result);
20897
+ setCodeValues(result.nodePath, () => result.status);
20878
20898
  },
20879
20899
  applyEach: (result) => {
20880
- if (!result.canUpdate) {
20900
+ if (!result.success) {
20881
20901
  return;
20882
20902
  }
20883
20903
  setOverrideIdToNodePath(overrideId, result.nodePath);
@@ -20911,7 +20931,7 @@ var SubscribeToNodePaths = ({ overrideId, schema, stack: stack2 }) => {
20911
20931
 
20912
20932
  // src/components/Timeline/TimelineDragHandler.tsx
20913
20933
  import { PlayerInternals as PlayerInternals16 } from "@remotion/player";
20914
- import {
20934
+ import React130, {
20915
20935
  useCallback as useCallback100,
20916
20936
  useContext as useContext71,
20917
20937
  useEffect as useEffect66,
@@ -21051,10 +21071,10 @@ var TimelineDragHandler = () => {
21051
21071
  return /* @__PURE__ */ jsx193("div", {
21052
21072
  ref: sliderAreaRef,
21053
21073
  style: containerStyle2,
21054
- children: video ? /* @__PURE__ */ jsx193(Inner2, {}) : null
21074
+ children: video ? /* @__PURE__ */ jsx193(TimelineDragHandlerInnerMemo, {}) : null
21055
21075
  });
21056
21076
  };
21057
- var Inner2 = () => {
21077
+ var TimelineDragHandlerInner = () => {
21058
21078
  const videoConfig = useVideoConfig4();
21059
21079
  const size3 = PlayerInternals16.useElementSize(scrollableRef, {
21060
21080
  triggerOnWindowResize: true,
@@ -21453,9 +21473,10 @@ var Inner2 = () => {
21453
21473
  ]
21454
21474
  });
21455
21475
  };
21476
+ var TimelineDragHandlerInnerMemo = React130.memo(TimelineDragHandlerInner);
21456
21477
 
21457
21478
  // src/components/Timeline/TimelineHeightContainer.tsx
21458
- import { useMemo as useMemo112 } from "react";
21479
+ import React134, { useMemo as useMemo112 } from "react";
21459
21480
 
21460
21481
  // src/components/Timeline/use-timeline-height.ts
21461
21482
  import { useContext as useContext73, useMemo as useMemo111 } from "react";
@@ -21684,13 +21705,13 @@ var TimelineTimeIndicators = () => {
21684
21705
  if (video === null) {
21685
21706
  return null;
21686
21707
  }
21687
- return /* @__PURE__ */ jsx196(Inner3, {
21708
+ return /* @__PURE__ */ jsx196(TimelineTimeIndicatorsInner, {
21688
21709
  durationInFrames: video.durationInFrames,
21689
21710
  fps: video.fps,
21690
21711
  windowWidth: sliderTrack
21691
21712
  });
21692
21713
  };
21693
- var Inner3 = ({ windowWidth, durationInFrames, fps }) => {
21714
+ var TimelineTimeIndicatorsInner = ({ windowWidth, durationInFrames, fps }) => {
21694
21715
  const ref2 = useRef39(null);
21695
21716
  useEffect68(() => {
21696
21717
  const currentRef = ref2.current;
@@ -21776,30 +21797,22 @@ var useTimelineHeight = ({
21776
21797
  }) => {
21777
21798
  const { getIsExpanded } = useContext73(ExpandedTracksGetterContext);
21778
21799
  const { previewServerState } = useContext73(StudioServerConnectionCtx);
21779
- const { getDragOverrides, getCodeValues } = useContext73(Internals53.VisualModeGettersContext);
21780
- const visualModeEnabled = Boolean(process.env.EXPERIMENTAL_VISUAL_MODE_ENABLED) && previewServerState.type === "connected";
21800
+ const { getCodeValues } = useContext73(Internals53.VisualModeCodeValuesContext);
21801
+ const previewServerConnected = previewServerState.type === "connected";
21781
21802
  return useMemo111(() => {
21782
21803
  const tracksHeight = shown.reduce((acc, track) => {
21783
- const isExpanded = visualModeEnabled && track.nodePathInfo !== null && getIsExpanded(track.nodePathInfo);
21804
+ const isExpanded = previewServerConnected && track.nodePathInfo !== null && getIsExpanded(track.nodePathInfo);
21784
21805
  const layerHeight = getTimelineLayerHeight(track.sequence.type) + TIMELINE_ITEM_BORDER_BOTTOM;
21785
21806
  const expandedHeight = isExpanded && track.nodePathInfo ? getExpandedTrackHeight({
21786
21807
  sequence: track.sequence,
21787
21808
  nodePathInfo: track.nodePathInfo,
21788
21809
  getIsExpanded,
21789
- getDragOverrides,
21790
21810
  getCodeValues
21791
21811
  }) + TIMELINE_ITEM_BORDER_BOTTOM : 0;
21792
21812
  return acc + layerHeight + expandedHeight;
21793
21813
  }, 0);
21794
21814
  return tracksHeight + TIMELINE_ITEM_BORDER_BOTTOM + (hasBeenCut ? MAX_TIMELINE_TRACKS_NOTICE_HEIGHT : 0) + TIMELINE_TIME_INDICATOR_HEIGHT;
21795
- }, [
21796
- shown,
21797
- hasBeenCut,
21798
- visualModeEnabled,
21799
- getIsExpanded,
21800
- getDragOverrides,
21801
- getCodeValues
21802
- ]);
21815
+ }, [shown, hasBeenCut, previewServerConnected, getIsExpanded, getCodeValues]);
21803
21816
  };
21804
21817
 
21805
21818
  // src/components/Timeline/TimelineHeightContainer.tsx
@@ -21810,7 +21823,7 @@ var baseStyle2 = {
21810
21823
  minHeight: "100%",
21811
21824
  overflowX: "hidden"
21812
21825
  };
21813
- var TimelineHeightContainer = ({ shown, hasBeenCut, children }) => {
21826
+ var TimelineHeightContainerInner = ({ shown, hasBeenCut, children }) => {
21814
21827
  const height = useTimelineHeight({ shown, hasBeenCut });
21815
21828
  const style10 = useMemo112(() => ({ ...baseStyle2, height }), [height]);
21816
21829
  return /* @__PURE__ */ jsx197("div", {
@@ -21818,6 +21831,7 @@ var TimelineHeightContainer = ({ shown, hasBeenCut, children }) => {
21818
21831
  children
21819
21832
  });
21820
21833
  };
21834
+ var TimelineHeightContainer = React134.memo(TimelineHeightContainerInner);
21821
21835
 
21822
21836
  // src/components/Timeline/TimelineList.tsx
21823
21837
  import { PlayerInternals as PlayerInternals18 } from "@remotion/player";
@@ -21885,7 +21899,7 @@ var TimelineExpandArrowButton = ({ isExpanded, onClick, label: label8, disabled
21885
21899
  style: svgStyle,
21886
21900
  children: /* @__PURE__ */ jsx199("path", {
21887
21901
  d: "M2 1L6 4L2 7Z",
21888
- fill: "white"
21902
+ fill: "#ccc"
21889
21903
  })
21890
21904
  })
21891
21905
  });
@@ -21904,6 +21918,7 @@ import { Internals as Internals55 } from "remotion";
21904
21918
  import { useMemo as useMemo120 } from "react";
21905
21919
 
21906
21920
  // src/components/Timeline/TimelineFieldRow.tsx
21921
+ import { optimisticUpdateForCodeValues } from "@remotion/studio-shared";
21907
21922
  import { useCallback as useCallback108, useContext as useContext74, useMemo as useMemo119 } from "react";
21908
21923
  import { Internals as Internals54 } from "remotion";
21909
21924
 
@@ -21913,21 +21928,21 @@ import { jsx as jsx200 } from "react/jsx-runtime";
21913
21928
  var checkboxContainer = {
21914
21929
  marginLeft: 8
21915
21930
  };
21916
- var TimelineBooleanField = ({ field, codeValue, effectiveValue, canUpdate, onSave }) => {
21931
+ var TimelineBooleanField = ({ field, propStatus, effectiveValue, onSave }) => {
21917
21932
  const checked = Boolean(effectiveValue);
21918
21933
  const onChange = useCallback103(() => {
21919
21934
  const newValue = !checked;
21920
- if (canUpdate && newValue !== codeValue) {
21921
- onSave(field.key, newValue);
21935
+ if (propStatus.canUpdate && newValue !== propStatus.codeValue) {
21936
+ onSave(newValue);
21922
21937
  }
21923
- }, [canUpdate, onSave, field.key, checked, codeValue]);
21938
+ }, [propStatus, onSave, checked]);
21924
21939
  return /* @__PURE__ */ jsx200("div", {
21925
21940
  style: checkboxContainer,
21926
21941
  children: /* @__PURE__ */ jsx200(Checkbox, {
21927
21942
  checked,
21928
21943
  onChange,
21929
21944
  name: field.key,
21930
- disabled: !canUpdate,
21945
+ disabled: !propStatus.canUpdate,
21931
21946
  variant: "small"
21932
21947
  })
21933
21948
  });
@@ -21941,9 +21956,8 @@ var comboboxStyle = {
21941
21956
  };
21942
21957
  var TimelineEnumField = ({
21943
21958
  field,
21944
- codeValue,
21959
+ propStatus,
21945
21960
  effectiveValue,
21946
- canUpdate,
21947
21961
  onSave,
21948
21962
  onDragValueChange,
21949
21963
  onDragEnd
@@ -21955,14 +21969,14 @@ var TimelineEnumField = ({
21955
21969
  const variantKeys = Object.keys(fieldSchema.variants);
21956
21970
  const current = String(effectiveValue ?? fieldSchema.default);
21957
21971
  const onSelect = useCallback104((newValue) => {
21958
- if (!canUpdate || newValue === codeValue) {
21972
+ if (!propStatus.canUpdate || newValue === propStatus.codeValue) {
21959
21973
  return;
21960
21974
  }
21961
- onDragValueChange(field.key, newValue);
21962
- onSave(field.key, newValue).finally(() => {
21975
+ onDragValueChange(newValue);
21976
+ onSave(newValue).finally(() => {
21963
21977
  onDragEnd();
21964
21978
  });
21965
- }, [canUpdate, codeValue, field.key, onSave, onDragValueChange, onDragEnd]);
21979
+ }, [propStatus, onSave, onDragValueChange, onDragEnd]);
21966
21980
  const items = useMemo115(() => {
21967
21981
  return variantKeys.map((key4) => ({
21968
21982
  type: "item",
@@ -21974,9 +21988,9 @@ var TimelineEnumField = ({
21974
21988
  leftItem: null,
21975
21989
  subMenu: null,
21976
21990
  quickSwitcherLabel: null,
21977
- disabled: !canUpdate
21991
+ disabled: !propStatus.canUpdate
21978
21992
  }));
21979
- }, [variantKeys, onSelect, canUpdate]);
21993
+ }, [variantKeys, onSelect, propStatus]);
21980
21994
  return /* @__PURE__ */ jsx201(Combobox, {
21981
21995
  small: true,
21982
21996
  title: field.key,
@@ -22004,20 +22018,19 @@ import { jsx as jsx202 } from "react/jsx-runtime";
22004
22018
  var TimelineNumberField = ({
22005
22019
  field,
22006
22020
  effectiveValue,
22007
- canUpdate,
22008
22021
  onSave,
22009
22022
  onDragValueChange,
22010
22023
  onDragEnd,
22011
- codeValue
22024
+ propStatus
22012
22025
  }) => {
22013
22026
  const [dragValue, setDragValue] = useState70(null);
22014
22027
  const onValueChange = useCallback105((newVal) => {
22015
22028
  setDragValue(newVal);
22016
- onDragValueChange(field.key, newVal);
22017
- }, [onDragValueChange, field.key]);
22029
+ onDragValueChange(newVal);
22030
+ }, [onDragValueChange]);
22018
22031
  const onValueChangeEnd = useCallback105((newVal) => {
22019
- if (canUpdate && newVal !== codeValue) {
22020
- onSave(field.key, newVal).finally(() => {
22032
+ if (propStatus.canUpdate && newVal !== propStatus.codeValue) {
22033
+ onSave(newVal).finally(() => {
22021
22034
  setDragValue(null);
22022
22035
  onDragEnd();
22023
22036
  });
@@ -22025,18 +22038,18 @@ var TimelineNumberField = ({
22025
22038
  setDragValue(null);
22026
22039
  onDragEnd();
22027
22040
  }
22028
- }, [canUpdate, onSave, field.key, codeValue, onDragEnd]);
22041
+ }, [onSave, propStatus, onDragEnd]);
22029
22042
  const onTextChange = useCallback105((newVal) => {
22030
- if (canUpdate) {
22043
+ if (propStatus.canUpdate) {
22031
22044
  const parsed = Number(newVal);
22032
- if (!Number.isNaN(parsed) && parsed !== codeValue) {
22045
+ if (!Number.isNaN(parsed) && propStatus.canUpdate && parsed !== propStatus.codeValue) {
22033
22046
  setDragValue(parsed);
22034
- onSave(field.key, parsed).catch(() => {
22047
+ onSave(parsed).catch(() => {
22035
22048
  setDragValue(null);
22036
22049
  });
22037
22050
  }
22038
22051
  }
22039
- }, [canUpdate, onSave, field.key, codeValue]);
22052
+ }, [onSave, propStatus]);
22040
22053
  const step = field.fieldSchema.type === "number" ? field.fieldSchema.step ?? 1 : 1;
22041
22054
  const stepDecimals = useMemo116(() => getDecimalPlaces(step), [step]);
22042
22055
  const formatter = useCallback105((v) => {
@@ -22086,8 +22099,7 @@ var parseCssRotationToDegrees = (value) => {
22086
22099
  var TimelineRotationField = ({
22087
22100
  field,
22088
22101
  effectiveValue,
22089
- codeValue,
22090
- canUpdate,
22102
+ propStatus,
22091
22103
  onSave,
22092
22104
  onDragValueChange,
22093
22105
  onDragEnd
@@ -22096,12 +22108,12 @@ var TimelineRotationField = ({
22096
22108
  const degrees = useMemo117(() => parseCssRotationToDegrees(String(effectiveValue ?? "0deg")), [effectiveValue]);
22097
22109
  const onValueChange = useCallback106((newVal) => {
22098
22110
  setDragValue(newVal);
22099
- onDragValueChange(field.key, `${newVal}deg`);
22100
- }, [onDragValueChange, field.key]);
22111
+ onDragValueChange(`${newVal}deg`);
22112
+ }, [onDragValueChange]);
22101
22113
  const onValueChangeEnd = useCallback106((newVal) => {
22102
22114
  const newStr = `${newVal}deg`;
22103
- if (canUpdate && newStr !== codeValue) {
22104
- onSave(field.key, newStr).finally(() => {
22115
+ if (propStatus.canUpdate && newStr !== propStatus.codeValue) {
22116
+ onSave(newStr).finally(() => {
22105
22117
  setDragValue(null);
22106
22118
  onDragEnd();
22107
22119
  });
@@ -22109,21 +22121,21 @@ var TimelineRotationField = ({
22109
22121
  setDragValue(null);
22110
22122
  onDragEnd();
22111
22123
  }
22112
- }, [canUpdate, onSave, field.key, codeValue, onDragEnd]);
22124
+ }, [propStatus, onSave, onDragEnd]);
22113
22125
  const onTextChange = useCallback106((newVal) => {
22114
- if (canUpdate) {
22126
+ if (propStatus.canUpdate) {
22115
22127
  const parsed = Number(newVal);
22116
22128
  if (!Number.isNaN(parsed)) {
22117
22129
  const newStr = `${parsed}deg`;
22118
- if (newStr !== codeValue) {
22130
+ if (newStr !== propStatus.codeValue) {
22119
22131
  setDragValue(parsed);
22120
- onSave(field.key, newStr).catch(() => {
22132
+ onSave(newStr).catch(() => {
22121
22133
  setDragValue(null);
22122
22134
  });
22123
22135
  }
22124
22136
  }
22125
22137
  }
22126
- }, [canUpdate, onSave, field.key, codeValue]);
22138
+ }, [propStatus, onSave]);
22127
22139
  const step = field.fieldSchema.type === "rotation" ? field.fieldSchema.step ?? 1 : 1;
22128
22140
  const stepDecimals = useMemo117(() => getDecimalPlaces(step), [step]);
22129
22141
  const formatter = useCallback106((v) => {
@@ -22172,9 +22184,8 @@ var containerStyle2 = {
22172
22184
  };
22173
22185
  var TimelineTranslateField = ({
22174
22186
  field,
22175
- codeValue,
22187
+ propStatus,
22176
22188
  effectiveValue,
22177
- canUpdate,
22178
22189
  onSave,
22179
22190
  onDragValueChange,
22180
22191
  onDragEnd
@@ -22194,13 +22205,13 @@ var TimelineTranslateField = ({
22194
22205
  const onXChange = useCallback107((newVal) => {
22195
22206
  setDragX(newVal);
22196
22207
  const currentY = dragY ?? codeY;
22197
- onDragValueChange(field.key, makeString(newVal, currentY));
22198
- }, [onDragValueChange, field.key, dragY, codeY, makeString]);
22208
+ onDragValueChange(makeString(newVal, currentY));
22209
+ }, [onDragValueChange, dragY, codeY, makeString]);
22199
22210
  const onXChangeEnd = useCallback107((newVal) => {
22200
22211
  const currentY = dragY ?? codeY;
22201
22212
  const newStr = makeString(newVal, currentY);
22202
- if (canUpdate && newStr !== codeValue) {
22203
- onSave(field.key, newStr).finally(() => {
22213
+ if (propStatus.canUpdate && newStr !== propStatus.codeValue) {
22214
+ onSave(newStr).finally(() => {
22204
22215
  setDragX(null);
22205
22216
  onDragEnd();
22206
22217
  });
@@ -22208,39 +22219,30 @@ var TimelineTranslateField = ({
22208
22219
  setDragX(null);
22209
22220
  onDragEnd();
22210
22221
  }
22211
- }, [
22212
- dragY,
22213
- codeY,
22214
- makeString,
22215
- canUpdate,
22216
- codeValue,
22217
- onSave,
22218
- field.key,
22219
- onDragEnd
22220
- ]);
22222
+ }, [dragY, codeY, makeString, propStatus, onSave, onDragEnd]);
22221
22223
  const onXTextChange = useCallback107((newVal) => {
22222
- if (canUpdate) {
22224
+ if (propStatus.canUpdate) {
22223
22225
  const parsed = Number(newVal);
22224
22226
  if (!Number.isNaN(parsed)) {
22225
22227
  const currentY = dragY ?? codeY;
22226
22228
  const newStr = makeString(parsed, currentY);
22227
- if (newStr !== codeValue) {
22229
+ if (newStr !== propStatus.codeValue) {
22228
22230
  setDragX(parsed);
22229
- onSave(field.key, newStr);
22231
+ onSave(newStr);
22230
22232
  }
22231
22233
  }
22232
22234
  }
22233
- }, [canUpdate, dragY, codeY, makeString, codeValue, onSave, field.key]);
22235
+ }, [propStatus, dragY, codeY, makeString, onSave]);
22234
22236
  const onYChange = useCallback107((newVal) => {
22235
22237
  setDragY(newVal);
22236
22238
  const currentX = dragX ?? codeX;
22237
- onDragValueChange(field.key, makeString(currentX, newVal));
22238
- }, [onDragValueChange, field.key, dragX, codeX, makeString]);
22239
+ onDragValueChange(makeString(currentX, newVal));
22240
+ }, [onDragValueChange, dragX, codeX, makeString]);
22239
22241
  const onYChangeEnd = useCallback107((newVal) => {
22240
22242
  const currentX = dragX ?? codeX;
22241
22243
  const newStr = makeString(currentX, newVal);
22242
- if (canUpdate && newStr !== codeValue) {
22243
- onSave(field.key, newStr).finally(() => {
22244
+ if (propStatus.canUpdate && newStr !== propStatus.codeValue) {
22245
+ onSave(newStr).finally(() => {
22244
22246
  setDragY(null);
22245
22247
  onDragEnd();
22246
22248
  });
@@ -22248,31 +22250,22 @@ var TimelineTranslateField = ({
22248
22250
  setDragY(null);
22249
22251
  onDragEnd();
22250
22252
  }
22251
- }, [
22252
- dragX,
22253
- codeX,
22254
- makeString,
22255
- canUpdate,
22256
- codeValue,
22257
- onSave,
22258
- field.key,
22259
- onDragEnd
22260
- ]);
22253
+ }, [dragX, codeX, makeString, propStatus, onSave, onDragEnd]);
22261
22254
  const onYTextChange = useCallback107((newVal) => {
22262
- if (canUpdate) {
22255
+ if (propStatus.canUpdate) {
22263
22256
  const parsed = Number(newVal);
22264
22257
  if (!Number.isNaN(parsed)) {
22265
22258
  const currentX = dragX ?? codeX;
22266
22259
  const newStr = makeString(currentX, parsed);
22267
- if (newStr !== codeValue) {
22260
+ if (newStr !== propStatus.codeValue) {
22268
22261
  setDragY(parsed);
22269
- onSave(field.key, newStr).catch(() => {
22262
+ onSave(newStr).catch(() => {
22270
22263
  setDragY(null);
22271
22264
  });
22272
22265
  }
22273
22266
  }
22274
22267
  }
22275
- }, [canUpdate, onSave, field.key, codeValue, dragX, codeX, makeString]);
22268
+ }, [propStatus, onSave, dragX, codeX, makeString]);
22276
22269
  return /* @__PURE__ */ jsxs94("span", {
22277
22270
  style: containerStyle2,
22278
22271
  children: [
@@ -22334,18 +22327,16 @@ var TimelineFieldValue = ({
22334
22327
  onDragValueChange,
22335
22328
  onDragEnd,
22336
22329
  propStatus,
22337
- canUpdate,
22338
- effectiveValue,
22339
- codeValue
22330
+ effectiveValue
22340
22331
  }) => {
22341
- const wrapperStyle = canUpdate === null || canUpdate === false ? notEditableBackground : undefined;
22332
+ const wrapperStyle = !propStatus.canUpdate ? notEditableBackground : undefined;
22342
22333
  if (!field.supported) {
22343
22334
  return /* @__PURE__ */ jsx205("span", {
22344
22335
  style: unsupportedLabel,
22345
22336
  children: "unsupported"
22346
22337
  });
22347
22338
  }
22348
- if (propStatus !== null && !propStatus.canUpdate) {
22339
+ if (!propStatus.canUpdate) {
22349
22340
  if (propStatus.reason === "computed") {
22350
22341
  return /* @__PURE__ */ jsx205("span", {
22351
22342
  style: unsupportedLabel,
@@ -22354,24 +22345,14 @@ var TimelineFieldValue = ({
22354
22345
  }
22355
22346
  throw new Error(`Unsupported prop status: ${propStatus.reason}`);
22356
22347
  }
22357
- if (propStatus === null) {
22358
- return /* @__PURE__ */ jsx205("span", {
22359
- style: notEditableBackground,
22360
- children: /* @__PURE__ */ jsx205("span", {
22361
- style: unsupportedLabel,
22362
- children: "error"
22363
- })
22364
- });
22365
- }
22366
22348
  if (field.typeName === "number") {
22367
22349
  return /* @__PURE__ */ jsx205("span", {
22368
22350
  style: wrapperStyle,
22369
22351
  children: /* @__PURE__ */ jsx205(TimelineNumberField, {
22370
22352
  field,
22371
22353
  effectiveValue,
22372
- canUpdate,
22373
22354
  onSave,
22374
- codeValue,
22355
+ propStatus,
22375
22356
  onDragValueChange,
22376
22357
  onDragEnd
22377
22358
  })
@@ -22383,8 +22364,7 @@ var TimelineFieldValue = ({
22383
22364
  children: /* @__PURE__ */ jsx205(TimelineRotationField, {
22384
22365
  field,
22385
22366
  effectiveValue,
22386
- codeValue,
22387
- canUpdate,
22367
+ propStatus,
22388
22368
  onSave,
22389
22369
  onDragValueChange,
22390
22370
  onDragEnd
@@ -22397,8 +22377,7 @@ var TimelineFieldValue = ({
22397
22377
  children: /* @__PURE__ */ jsx205(TimelineTranslateField, {
22398
22378
  field,
22399
22379
  effectiveValue,
22400
- codeValue,
22401
- canUpdate,
22380
+ propStatus,
22402
22381
  onSave,
22403
22382
  onDragValueChange,
22404
22383
  onDragEnd
@@ -22410,8 +22389,7 @@ var TimelineFieldValue = ({
22410
22389
  style: wrapperStyle,
22411
22390
  children: /* @__PURE__ */ jsx205(TimelineBooleanField, {
22412
22391
  field,
22413
- codeValue,
22414
- canUpdate,
22392
+ propStatus,
22415
22393
  onSave,
22416
22394
  effectiveValue
22417
22395
  })
@@ -22422,8 +22400,7 @@ var TimelineFieldValue = ({
22422
22400
  style: inlineWrapper,
22423
22401
  children: /* @__PURE__ */ jsx205(TimelineEnumField, {
22424
22402
  field,
22425
- codeValue,
22426
- canUpdate,
22403
+ propStatus,
22427
22404
  onSave,
22428
22405
  effectiveValue,
22429
22406
  onDragValueChange,
@@ -22465,10 +22442,14 @@ var TimelineFieldRow = ({
22465
22442
  nodePath,
22466
22443
  schema
22467
22444
  }) => {
22468
- const { getDragOverrides, getCodeValues } = useContext74(Internals54.VisualModeGettersContext);
22445
+ const { getCodeValues } = useContext74(Internals54.VisualModeCodeValuesContext);
22446
+ const { getDragOverrides } = useContext74(Internals54.VisualModeDragOverridesContext);
22469
22447
  const { setDragOverrides, clearDragOverrides } = useContext74(Internals54.VisualModeSettersContext);
22470
22448
  const codeValuesForOverride = getCodeValues(nodePath);
22471
22449
  const codeValue = codeValuesForOverride?.[field.key] ?? null;
22450
+ if (codeValue === null) {
22451
+ throw new Error("Unexpectedly got null code value for field" + field.key);
22452
+ }
22472
22453
  const dragOverrideValue = useMemo119(() => {
22473
22454
  return nodePath === null ? undefined : (getDragOverrides(nodePath) ?? {})[field.key];
22474
22455
  }, [getDragOverrides, nodePath, field.key]);
@@ -22480,43 +22461,66 @@ var TimelineFieldRow = ({
22480
22461
  shouldResortToDefaultValueIfUndefined: true
22481
22462
  });
22482
22463
  const { setCodeValues } = useContext74(Internals54.VisualModeSettersContext);
22483
- const onSave = useCallback108((key4, value) => {
22464
+ const onSave = useCallback108((value) => {
22484
22465
  if (!codeValuesForOverride || !validatedLocation || !nodePath) {
22485
22466
  return Promise.reject(new Error("Cannot save"));
22486
22467
  }
22487
- const status = codeValuesForOverride[key4];
22488
- if (!status || !status.canUpdate) {
22468
+ if (!codeValue || !codeValue.canUpdate) {
22489
22469
  return Promise.reject(new Error("Cannot save"));
22490
22470
  }
22491
22471
  const defaultValue = field.fieldSchema.default !== undefined ? JSON.stringify(field.fieldSchema.default) : null;
22472
+ const stringifiedValue = JSON.stringify(value);
22473
+ if (value === codeValue.codeValue) {
22474
+ return Promise.resolve();
22475
+ }
22476
+ if (defaultValue === stringifiedValue && codeValue.codeValue === undefined) {
22477
+ return Promise.resolve();
22478
+ }
22479
+ let previousUpdate;
22480
+ setCodeValues(nodePath, (prev) => {
22481
+ previousUpdate = prev;
22482
+ return optimisticUpdateForCodeValues({
22483
+ previous: prev,
22484
+ fieldKey: field.key,
22485
+ value,
22486
+ schema
22487
+ });
22488
+ });
22492
22489
  return callApi("/api/save-sequence-props", {
22493
22490
  fileName: validatedLocation.source,
22494
22491
  nodePath,
22495
- key: key4,
22496
- value: JSON.stringify(value),
22492
+ key: field.key,
22493
+ value: stringifiedValue,
22497
22494
  defaultValue,
22498
22495
  schema
22499
22496
  }).then((data) => {
22500
- if (data.success) {
22501
- setCodeValues(nodePath, data.newStatus);
22502
- return;
22497
+ setCodeValues(nodePath, () => data);
22498
+ }).catch(() => {
22499
+ if (previousUpdate) {
22500
+ setCodeValues(nodePath, (current) => {
22501
+ if (previousUpdate) {
22502
+ return previousUpdate;
22503
+ }
22504
+ return current;
22505
+ });
22503
22506
  }
22504
- return Promise.reject(new Error(data.reason));
22505
22507
  });
22506
22508
  }, [
22509
+ codeValue,
22507
22510
  codeValuesForOverride,
22508
22511
  field.fieldSchema.default,
22512
+ field.key,
22509
22513
  nodePath,
22510
22514
  schema,
22511
22515
  setCodeValues,
22512
22516
  validatedLocation
22513
22517
  ]);
22514
- const onDragValueChange = useCallback108((key4, value) => {
22518
+ const onDragValueChange = useCallback108((value) => {
22515
22519
  if (nodePath === null) {
22516
22520
  throw new Error("Cannot drag value");
22517
22521
  }
22518
- setDragOverrides(nodePath, key4, value);
22519
- }, [setDragOverrides, nodePath]);
22522
+ setDragOverrides(nodePath, field.key, value);
22523
+ }, [setDragOverrides, nodePath, field.key]);
22520
22524
  const onDragEnd = useCallback108(() => {
22521
22525
  if (nodePath === null) {
22522
22526
  throw new Error("Cannot clear drag value");
@@ -22549,9 +22553,7 @@ var TimelineFieldRow = ({
22549
22553
  onSave,
22550
22554
  onDragValueChange,
22551
22555
  onDragEnd,
22552
- canUpdate: codeValue?.canUpdate ?? false,
22553
- effectiveValue,
22554
- codeValue
22556
+ effectiveValue
22555
22557
  })
22556
22558
  ]
22557
22559
  });
@@ -22654,7 +22656,8 @@ var separator = {
22654
22656
  var TimelineExpandedSection = ({ sequence, originalLocation, nodePathInfo, nestedDepth }) => {
22655
22657
  const { getIsExpanded } = useContext75(ExpandedTracksGetterContext);
22656
22658
  const { toggleTrack } = useContext75(ExpandedTracksSetterContext);
22657
- const { getDragOverrides, getCodeValues } = useContext75(Internals55.VisualModeGettersContext);
22659
+ const { getCodeValues } = useContext75(Internals55.VisualModeCodeValuesContext);
22660
+ const { getDragOverrides } = useContext75(Internals55.VisualModeDragOverridesContext);
22658
22661
  const validatedLocation = useMemo121(() => {
22659
22662
  if (!originalLocation || !originalLocation.source || !originalLocation.line) {
22660
22663
  return null;
@@ -22676,9 +22679,8 @@ var TimelineExpandedSection = ({ sequence, originalLocation, nodePathInfo, neste
22676
22679
  sequence,
22677
22680
  nodePathInfo,
22678
22681
  getIsExpanded,
22679
- getDragOverrides,
22680
22682
  getCodeValues
22681
- }), [sequence, nodePathInfo, getIsExpanded, getDragOverrides, getCodeValues]);
22683
+ }), [sequence, nodePathInfo, getIsExpanded, getCodeValues]);
22682
22684
  const style10 = useMemo121(() => {
22683
22685
  return {
22684
22686
  ...expandedSectionBase,
@@ -22791,15 +22793,8 @@ var TimelineLayerEye = ({ onInvoked, hidden, type }) => {
22791
22793
  };
22792
22794
 
22793
22795
  // src/components/Timeline/TimelineStack/index.tsx
22794
- import { SOURCE_MAP_ENDPOINT } from "@remotion/studio-shared";
22795
22796
  import { useCallback as useCallback110, useContext as useContext76, useMemo as useMemo122, useState as useState73 } from "react";
22796
- import { SourceMapConsumer as SourceMapConsumer3 } from "source-map";
22797
22797
  import { jsx as jsx210, jsxs as jsxs98, Fragment as Fragment31 } from "react/jsx-runtime";
22798
- var publicPath = window.remotion_publicPath === "/" ? "" : window.remotion_publicPath;
22799
- var withoutSlashInTheEnd = publicPath.endsWith("/") ? publicPath.slice(0, -1) : publicPath;
22800
- SourceMapConsumer3.initialize({
22801
- "lib/mappings.wasm": withoutSlashInTheEnd + SOURCE_MAP_ENDPOINT
22802
- });
22803
22798
  var TimelineStack = ({ isCompact, sequence, originalLocation }) => {
22804
22799
  const [stackHovered, setStackHovered] = useState73(false);
22805
22800
  const [titleHovered, setTitleHovered] = useState73(false);
@@ -22961,13 +22956,10 @@ var INDENT = 10;
22961
22956
  var TimelineListItem = ({ nestedDepth, sequence, isCompact, nodePathInfo }) => {
22962
22957
  const nodePath = nodePathInfo?.nodePath ?? null;
22963
22958
  const { previewServerState } = useContext77(StudioServerConnectionCtx);
22964
- const visualModeEnvEnabled = Boolean(process.env.EXPERIMENTAL_VISUAL_MODE_ENABLED);
22965
22959
  const previewConnected = previewServerState.type === "connected";
22966
- const visualModeActive = visualModeEnvEnabled && previewConnected;
22967
22960
  const { hidden, setHidden } = useContext77(Internals56.SequenceVisibilityToggleContext);
22968
22961
  const { getIsExpanded } = useContext77(ExpandedTracksGetterContext);
22969
22962
  const { toggleTrack } = useContext77(ExpandedTracksSetterContext);
22970
- const { getIsJsxInMapCallback } = useContext77(Internals56.VisualModeGettersContext);
22971
22963
  const originalLocation = useResolvedStack(sequence.stack ?? null);
22972
22964
  const validatedLocation = useMemo123(() => {
22973
22965
  if (!originalLocation || !originalLocation.source || !originalLocation.line) {
@@ -22986,8 +22978,8 @@ var TimelineListItem = ({ nestedDepth, sequence, isCompact, nodePathInfo }) => {
22986
22978
  if (!validatedLocation?.source || !nodePath) {
22987
22979
  return;
22988
22980
  }
22989
- if (getIsJsxInMapCallback(nodePath)) {
22990
- const message = "This sequence is rendered inside a .map() callback. Duplicating inserts another copy in that callback (affecting each list item). Continue?";
22981
+ if (nodePathInfo && nodePathInfo.numberOfSequencesWithThisNodePath > 1) {
22982
+ const message = "This sequence is programmatically duplicated " + nodePathInfo.numberOfSequencesWithThisNodePath + " times in the code. Duplicating inserts another copy. Continue?";
22991
22983
  if (!window.confirm(message)) {
22992
22984
  return;
22993
22985
  }
@@ -23005,13 +22997,13 @@ var TimelineListItem = ({ nestedDepth, sequence, isCompact, nodePathInfo }) => {
23005
22997
  } catch (err) {
23006
22998
  showNotification(err.message, 4000);
23007
22999
  }
23008
- }, [nodePath, validatedLocation?.source, getIsJsxInMapCallback]);
23000
+ }, [nodePath, validatedLocation?.source, nodePathInfo]);
23009
23001
  const onDeleteSequenceFromSource = useCallback111(async () => {
23010
23002
  if (!validatedLocation?.source || !nodePath) {
23011
23003
  return;
23012
23004
  }
23013
- if (getIsJsxInMapCallback(nodePath)) {
23014
- const message = "This sequence is rendered inside a .map() callback. Deleting removes all sequences in that callback. Continue?";
23005
+ if (nodePathInfo && nodePathInfo.numberOfSequencesWithThisNodePath > 1) {
23006
+ const message = "This sequence is programmatically duplicated " + nodePathInfo.numberOfSequencesWithThisNodePath + " times in the code. Deleting removes all instances. Continue?";
23015
23007
  if (!window.confirm(message)) {
23016
23008
  return;
23017
23009
  }
@@ -23029,9 +23021,9 @@ var TimelineListItem = ({ nestedDepth, sequence, isCompact, nodePathInfo }) => {
23029
23021
  } catch (err) {
23030
23022
  showNotification(err.message, 4000);
23031
23023
  }
23032
- }, [nodePath, validatedLocation?.source, getIsJsxInMapCallback]);
23024
+ }, [nodePath, validatedLocation?.source, nodePathInfo]);
23033
23025
  const contextMenuValues = useMemo123(() => {
23034
- if (!visualModeEnvEnabled) {
23026
+ if (!previewConnected) {
23035
23027
  return [];
23036
23028
  }
23037
23029
  return [
@@ -23075,9 +23067,9 @@ var TimelineListItem = ({ nestedDepth, sequence, isCompact, nodePathInfo }) => {
23075
23067
  duplicateDisabled,
23076
23068
  onDeleteSequenceFromSource,
23077
23069
  onDuplicateSequenceFromSource,
23078
- visualModeEnvEnabled
23070
+ previewConnected
23079
23071
  ]);
23080
- const isExpanded = visualModeActive && nodePathInfo !== null && getIsExpanded(nodePathInfo);
23072
+ const isExpanded = previewConnected && nodePathInfo !== null && getIsExpanded(nodePathInfo);
23081
23073
  const onToggleExpand = useCallback111(() => {
23082
23074
  if (nodePathInfo === null) {
23083
23075
  return;
@@ -23128,7 +23120,7 @@ var TimelineListItem = ({ nestedDepth, sequence, isCompact, nodePathInfo }) => {
23128
23120
  /* @__PURE__ */ jsx211(Padder, {
23129
23121
  depth: nestedDepth
23130
23122
  }),
23131
- visualModeActive ? hasExpandableContent ? /* @__PURE__ */ jsx211(TimelineExpandArrowButton, {
23123
+ previewConnected ? hasExpandableContent ? /* @__PURE__ */ jsx211(TimelineExpandArrowButton, {
23132
23124
  isExpanded,
23133
23125
  onClick: onToggleExpand,
23134
23126
  label: "track properties",
@@ -23144,11 +23136,11 @@ var TimelineListItem = ({ nestedDepth, sequence, isCompact, nodePathInfo }) => {
23144
23136
  });
23145
23137
  return /* @__PURE__ */ jsxs99(Fragment32, {
23146
23138
  children: [
23147
- visualModeEnvEnabled ? /* @__PURE__ */ jsx211(ContextMenu, {
23139
+ previewConnected ? /* @__PURE__ */ jsx211(ContextMenu, {
23148
23140
  values: contextMenuValues,
23149
23141
  children: trackRow
23150
23142
  }) : trackRow,
23151
- visualModeActive && isExpanded && hasExpandableContent && nodePathInfo ? /* @__PURE__ */ jsx211(TimelineExpandedSection, {
23143
+ previewConnected && isExpanded && hasExpandableContent && nodePathInfo ? /* @__PURE__ */ jsx211(TimelineExpandedSection, {
23152
23144
  sequence,
23153
23145
  originalLocation,
23154
23146
  nodePathInfo,
@@ -23502,7 +23494,7 @@ var TimelineScrollable = ({ children }) => {
23502
23494
  };
23503
23495
 
23504
23496
  // src/components/Timeline/TimelineTracks.tsx
23505
- import { useContext as useContext81, useMemo as useMemo128 } from "react";
23497
+ import React154, { useContext as useContext81, useMemo as useMemo128 } from "react";
23506
23498
  import { Internals as Internals61 } from "remotion";
23507
23499
 
23508
23500
  // src/components/Timeline/TimelineSequence.tsx
@@ -23625,268 +23617,15 @@ var useMaxMediaDuration = (s, fps) => {
23625
23617
 
23626
23618
  // src/components/AudioWaveform.tsx
23627
23619
  import {
23620
+ drawBars,
23628
23621
  getLoopDisplayWidth,
23629
- shouldTileLoopDisplay
23622
+ loadWaveformPeaks,
23623
+ makeAudioWaveformWorker,
23624
+ shouldTileLoopDisplay,
23625
+ sliceWaveformPeaks
23630
23626
  } from "@remotion/timeline-utils";
23631
23627
  import { useEffect as useEffect72, useMemo as useMemo125, useRef as useRef42, useState as useState75 } from "react";
23632
23628
  import { Internals as Internals59 } from "remotion";
23633
-
23634
- // src/make-audio-waveform-worker.ts
23635
- var makeAudioWaveformWorker = () => {
23636
- return new Worker(new URL("./audio-waveform-worker.mjs", import.meta.url), {
23637
- type: "module"
23638
- });
23639
- };
23640
-
23641
- // src/components/parse-color.ts
23642
- var colorCache = new Map;
23643
- var parseColor = (color) => {
23644
- const cached = colorCache.get(color);
23645
- if (cached)
23646
- return cached;
23647
- const ctx = new OffscreenCanvas(1, 1).getContext("2d");
23648
- ctx.fillStyle = color;
23649
- ctx.fillRect(0, 0, 1, 1);
23650
- const [r, g, b, a] = ctx.getImageData(0, 0, 1, 1).data;
23651
- const result = [r, g, b, a];
23652
- colorCache.set(color, result);
23653
- return result;
23654
- };
23655
-
23656
- // src/components/draw-peaks.ts
23657
- var CLIPPING_COLOR = "#FF7F50";
23658
- var drawBars = (canvas, peaks, color, volume, width) => {
23659
- const ctx = canvas.getContext("2d");
23660
- if (!ctx) {
23661
- throw new Error("Failed to get canvas context");
23662
- }
23663
- const { height } = canvas;
23664
- const w = canvas.width;
23665
- if (w === 0 || height === 0) {
23666
- return;
23667
- }
23668
- ctx.clearRect(0, 0, w, height);
23669
- if (volume === 0)
23670
- return;
23671
- const [r, g, b, a] = parseColor(color);
23672
- const [cr, cg, cb, ca] = parseColor(CLIPPING_COLOR);
23673
- const imageData = ctx.createImageData(w, height);
23674
- const { data } = imageData;
23675
- const numBars = width;
23676
- for (let barIndex = 0;barIndex < numBars; barIndex++) {
23677
- const x = barIndex;
23678
- if (x >= w)
23679
- break;
23680
- const peakIndex = Math.floor(barIndex / numBars * peaks.length);
23681
- const peak = peaks[peakIndex] || 0;
23682
- const scaledPeak = peak * volume;
23683
- const halfBar = Math.max(0, Math.min(height / 2, scaledPeak * height / 2));
23684
- if (halfBar === 0)
23685
- continue;
23686
- const mid = height / 2;
23687
- const barY = Math.round(mid - halfBar);
23688
- const barEnd = Math.round(mid + halfBar);
23689
- const isClipping = scaledPeak > 1;
23690
- const clipTopEnd = isClipping ? Math.min(barY + 2, barEnd) : barY;
23691
- const clipBotStart = isClipping ? Math.max(barEnd - 2, barY) : barEnd;
23692
- for (let y = barY;y < clipTopEnd; y++) {
23693
- const idx = (y * w + x) * 4;
23694
- data[idx] = cr;
23695
- data[idx + 1] = cg;
23696
- data[idx + 2] = cb;
23697
- data[idx + 3] = ca;
23698
- }
23699
- for (let y = clipTopEnd;y < clipBotStart; y++) {
23700
- const idx = (y * w + x) * 4;
23701
- data[idx] = r;
23702
- data[idx + 1] = g;
23703
- data[idx + 2] = b;
23704
- data[idx + 3] = a;
23705
- }
23706
- for (let y = clipBotStart;y < barEnd; y++) {
23707
- const idx = (y * w + x) * 4;
23708
- data[idx] = cr;
23709
- data[idx + 1] = cg;
23710
- data[idx + 2] = cb;
23711
- data[idx + 3] = ca;
23712
- }
23713
- }
23714
- ctx.putImageData(imageData, 0, 0);
23715
- };
23716
-
23717
- // src/components/load-waveform-peaks.ts
23718
- import { ALL_FORMATS as ALL_FORMATS3, AudioSampleSink, Input as Input3, UrlSource as UrlSource3 } from "mediabunny";
23719
-
23720
- // src/components/waveform-peak-processor.ts
23721
- var emitWaveformProgress = ({
23722
- completedPeaks,
23723
- final,
23724
- onProgress,
23725
- peaks,
23726
- totalPeaks
23727
- }) => {
23728
- onProgress?.({
23729
- peaks,
23730
- completedPeaks,
23731
- totalPeaks,
23732
- final
23733
- });
23734
- };
23735
- var createWaveformPeakProcessor = ({
23736
- totalPeaks,
23737
- samplesPerPeak,
23738
- onProgress,
23739
- progressIntervalInMs,
23740
- now
23741
- }) => {
23742
- const peaks = new Float32Array(totalPeaks);
23743
- let peakIndex = 0;
23744
- let peakMax = 0;
23745
- let sampleInPeak = 0;
23746
- let lastProgressAt = 0;
23747
- let lastProgressPeak = 0;
23748
- const emitProgress = (force) => {
23749
- const timestamp = now();
23750
- if (!force && peakIndex === lastProgressPeak && sampleInPeak === 0) {
23751
- return;
23752
- }
23753
- if (!force && timestamp - lastProgressAt < progressIntervalInMs) {
23754
- return;
23755
- }
23756
- lastProgressAt = timestamp;
23757
- lastProgressPeak = peakIndex;
23758
- emitWaveformProgress({
23759
- peaks,
23760
- completedPeaks: peakIndex,
23761
- totalPeaks,
23762
- final: force,
23763
- onProgress
23764
- });
23765
- };
23766
- return {
23767
- peaks,
23768
- processSampleChunk: (floats, channels) => {
23769
- const frameCount = Math.floor(floats.length / Math.max(1, channels));
23770
- for (let frame2 = 0;frame2 < frameCount; frame2++) {
23771
- let framePeak = 0;
23772
- for (let channel = 0;channel < channels; channel++) {
23773
- const sampleIndex = frame2 * channels + channel;
23774
- const abs = Math.abs(floats[sampleIndex] ?? 0);
23775
- if (abs > framePeak) {
23776
- framePeak = abs;
23777
- }
23778
- }
23779
- if (framePeak > peakMax) {
23780
- peakMax = framePeak;
23781
- }
23782
- sampleInPeak++;
23783
- if (sampleInPeak >= samplesPerPeak) {
23784
- if (peakIndex < totalPeaks) {
23785
- peaks[peakIndex] = peakMax;
23786
- }
23787
- peakIndex++;
23788
- peakMax = 0;
23789
- sampleInPeak = 0;
23790
- }
23791
- }
23792
- emitProgress(false);
23793
- },
23794
- finalize: () => {
23795
- if (sampleInPeak > 0 && peakIndex < totalPeaks) {
23796
- peaks[peakIndex] = peakMax;
23797
- peakIndex++;
23798
- }
23799
- emitProgress(true);
23800
- }
23801
- };
23802
- };
23803
-
23804
- // src/components/load-waveform-peaks.ts
23805
- var TARGET_SAMPLE_RATE = 100;
23806
- var DEFAULT_PROGRESS_INTERVAL_IN_MS = 50;
23807
- var peaksCache = new Map;
23808
- async function loadWaveformPeaks(url, signal, options) {
23809
- const cached = peaksCache.get(url);
23810
- if (cached) {
23811
- emitWaveformProgress({
23812
- peaks: cached,
23813
- completedPeaks: cached.length,
23814
- totalPeaks: cached.length,
23815
- final: true,
23816
- onProgress: options?.onProgress
23817
- });
23818
- return cached;
23819
- }
23820
- const input2 = new Input3({
23821
- formats: ALL_FORMATS3,
23822
- source: new UrlSource3(url)
23823
- });
23824
- try {
23825
- const audioTrack = await input2.getPrimaryAudioTrack();
23826
- if (!audioTrack) {
23827
- return new Float32Array(0);
23828
- }
23829
- if (await audioTrack.isLive()) {
23830
- throw new Error("Live streams are not currently supported by Remotion. Sorry! Source: " + url);
23831
- }
23832
- if (await audioTrack.isRelativeToUnixEpoch()) {
23833
- throw new Error("Streams with UNIX timestamps are not currently supported by Remotion. Sorry! Source: " + url);
23834
- }
23835
- const sampleRate = await audioTrack.getSampleRate();
23836
- const durationInSeconds = await audioTrack.getDurationFromMetadata({ skipLiveWait: true }) ?? await audioTrack.computeDuration({ skipLiveWait: true });
23837
- const totalPeaks = Math.ceil(durationInSeconds * TARGET_SAMPLE_RATE);
23838
- const samplesPerPeak = Math.max(1, Math.floor(sampleRate / TARGET_SAMPLE_RATE));
23839
- const sink = new AudioSampleSink(audioTrack);
23840
- const processor = createWaveformPeakProcessor({
23841
- totalPeaks,
23842
- samplesPerPeak,
23843
- onProgress: options?.onProgress,
23844
- progressIntervalInMs: options?.progressIntervalInMs ?? DEFAULT_PROGRESS_INTERVAL_IN_MS,
23845
- now: () => Date.now()
23846
- });
23847
- for await (const sample of sink.samples()) {
23848
- if (signal.aborted) {
23849
- sample.close();
23850
- return new Float32Array(0);
23851
- }
23852
- const bytesNeeded = sample.allocationSize({
23853
- format: "f32",
23854
- planeIndex: 0
23855
- });
23856
- const floats = new Float32Array(bytesNeeded / 4);
23857
- sample.copyTo(floats, { format: "f32", planeIndex: 0 });
23858
- const channels = Math.max(1, sample.numberOfChannels);
23859
- sample.close();
23860
- processor.processSampleChunk(floats, channels);
23861
- }
23862
- processor.finalize();
23863
- const { peaks } = processor;
23864
- peaksCache.set(url, peaks);
23865
- return peaks;
23866
- } finally {
23867
- input2.dispose();
23868
- }
23869
- }
23870
-
23871
- // src/components/slice-waveform-peaks.ts
23872
- var sliceWaveformPeaks = ({
23873
- durationInFrames,
23874
- fps,
23875
- peaks,
23876
- playbackRate,
23877
- startFrom
23878
- }) => {
23879
- if (peaks.length === 0) {
23880
- return peaks;
23881
- }
23882
- const startTimeInSeconds = startFrom / fps;
23883
- const durationInSeconds = durationInFrames / fps * playbackRate;
23884
- const startPeakIndex = Math.floor(startTimeInSeconds * TARGET_SAMPLE_RATE);
23885
- const endPeakIndex = Math.ceil((startTimeInSeconds + durationInSeconds) * TARGET_SAMPLE_RATE);
23886
- return peaks.subarray(Math.max(0, startPeakIndex), Math.min(peaks.length, endPeakIndex));
23887
- };
23888
-
23889
- // src/components/AudioWaveform.tsx
23890
23629
  import { jsx as jsx214, jsxs as jsxs101 } from "react/jsx-runtime";
23891
23630
  var EMPTY_PEAKS = new Float32Array(0);
23892
23631
  var canRetryCanvasTransfer = (err) => {
@@ -23935,7 +23674,13 @@ var drawLoopedWaveform = ({
23935
23674
  const targetCanvas = document.createElement("canvas");
23936
23675
  targetCanvas.width = Math.max(1, Math.ceil(loopWidth));
23937
23676
  targetCanvas.height = h;
23938
- drawBars(targetCanvas, peaks, "rgba(255, 255, 255, 0.6)", volume, targetCanvas.width);
23677
+ drawBars({
23678
+ canvas: targetCanvas,
23679
+ peaks,
23680
+ color: "rgba(255, 255, 255, 0.6)",
23681
+ volume,
23682
+ width: targetCanvas.width
23683
+ });
23939
23684
  canvas.width = w;
23940
23685
  canvas.height = h;
23941
23686
  const ctx = canvas.getContext("2d");
@@ -24098,7 +23843,13 @@ var AudioWaveform = ({
24098
23843
  })
24099
23844
  });
24100
23845
  } else {
24101
- drawBars(canvasElement, portionPeaks ?? EMPTY_PEAKS, "rgba(255, 255, 255, 0.6)", vol, w);
23846
+ drawBars({
23847
+ canvas: canvasElement,
23848
+ peaks: portionPeaks ?? EMPTY_PEAKS,
23849
+ color: "rgba(255, 255, 255, 0.6)",
23850
+ volume: vol,
23851
+ width: w
23852
+ });
24102
23853
  }
24103
23854
  }, [
24104
23855
  canUseWorkerPath,
@@ -24594,7 +24345,7 @@ var TimelineSequenceFn = ({ s }) => {
24594
24345
  if (windowWidth === null) {
24595
24346
  return null;
24596
24347
  }
24597
- return /* @__PURE__ */ jsx220(Inner4, {
24348
+ return /* @__PURE__ */ jsx220(TimelineSequenceInner, {
24598
24349
  windowWidth,
24599
24350
  s
24600
24351
  });
@@ -24671,7 +24422,7 @@ var TimelineSequenceCurrentFrame = ({
24671
24422
  ]
24672
24423
  });
24673
24424
  };
24674
- var Inner4 = ({ s, windowWidth }) => {
24425
+ var TimelineSequenceInner = ({ s, windowWidth }) => {
24675
24426
  const video = Internals60.useVideo();
24676
24427
  const maxMediaDuration = useMaxMediaDuration(s, video?.fps ?? 30);
24677
24428
  const effectiveMaxMediaDuration = s.loopDisplay ? null : maxMediaDuration;
@@ -24769,22 +24520,20 @@ var getExpandedPlaceholderStyle = ({
24769
24520
  sequence,
24770
24521
  nodePathInfo,
24771
24522
  getIsExpanded,
24772
- getDragOverrides,
24773
24523
  getCodeValues
24774
24524
  }) => ({
24775
24525
  height: getExpandedTrackHeight({
24776
24526
  sequence,
24777
24527
  nodePathInfo,
24778
24528
  getIsExpanded,
24779
- getDragOverrides,
24780
24529
  getCodeValues
24781
24530
  }) + TIMELINE_ITEM_BORDER_BOTTOM
24782
24531
  });
24783
- var TimelineTracks = ({ timeline, hasBeenCut }) => {
24532
+ var TimelineTracksInner = ({ timeline, hasBeenCut }) => {
24784
24533
  const { getIsExpanded } = useContext81(ExpandedTracksGetterContext);
24785
24534
  const { previewServerState } = useContext81(StudioServerConnectionCtx);
24786
- const { getDragOverrides, getCodeValues } = useContext81(Internals61.VisualModeGettersContext);
24787
- const visualModeEnabled = Boolean(process.env.EXPERIMENTAL_VISUAL_MODE_ENABLED) && previewServerState.type === "connected";
24535
+ const { getCodeValues } = useContext81(Internals61.VisualModeCodeValuesContext);
24536
+ const previewServerConnected = previewServerState.type === "connected";
24788
24537
  const timelineStyle = useMemo128(() => {
24789
24538
  return {
24790
24539
  ...timelineContent,
@@ -24814,12 +24563,11 @@ var TimelineTracks = ({ timeline, hasBeenCut }) => {
24814
24563
  s: track.sequence
24815
24564
  })
24816
24565
  }),
24817
- visualModeEnabled && isExpanded && track.nodePathInfo ? /* @__PURE__ */ jsx221("div", {
24566
+ isExpanded && track.nodePathInfo && previewServerConnected ? /* @__PURE__ */ jsx221("div", {
24818
24567
  style: getExpandedPlaceholderStyle({
24819
24568
  sequence: track.sequence,
24820
24569
  nodePathInfo: track.nodePathInfo,
24821
24570
  getIsExpanded,
24822
- getDragOverrides,
24823
24571
  getCodeValues
24824
24572
  })
24825
24573
  }) : null
@@ -24832,6 +24580,7 @@ var TimelineTracks = ({ timeline, hasBeenCut }) => {
24832
24580
  ]
24833
24581
  });
24834
24582
  };
24583
+ var TimelineTracks = React154.memo(TimelineTracksInner);
24835
24584
 
24836
24585
  // src/components/Timeline/Timeline.tsx
24837
24586
  import { jsx as jsx222, jsxs as jsxs107 } from "react/jsx-runtime";
@@ -24866,15 +24615,16 @@ var TimelineInner = () => {
24866
24615
  const filtered = useMemo129(() => {
24867
24616
  return timeline.filter((t) => !isTrackHidden(t) && t.sequence.from <= durationInFrames && t.sequence.duration > 0 && t.sequence.showInTimeline);
24868
24617
  }, [durationInFrames, timeline]);
24869
- const shown = filtered.slice(0, MAX_TIMELINE_TRACKS);
24618
+ const shown = useMemo129(() => {
24619
+ return filtered.length > MAX_TIMELINE_TRACKS ? filtered.slice(0, MAX_TIMELINE_TRACKS) : filtered;
24620
+ }, [filtered]);
24870
24621
  const hasBeenCut = filtered.length > shown.length;
24871
- const visualModeEnvEnabled = Boolean(process.env.EXPERIMENTAL_VISUAL_MODE_ENABLED);
24872
24622
  return /* @__PURE__ */ jsxs107("div", {
24873
24623
  ref: timelineVerticalScroll,
24874
24624
  style: container43,
24875
24625
  className: "css-reset " + VERTICAL_SCROLLBAR_CLASSNAME,
24876
24626
  children: [
24877
- visualModeEnvEnabled ? sequences.map((sequence) => {
24627
+ sequences.map((sequence) => {
24878
24628
  if (!sequence.controls || !previewConnected || !sequence.stack) {
24879
24629
  return null;
24880
24630
  }
@@ -24883,7 +24633,7 @@ var TimelineInner = () => {
24883
24633
  schema: sequence.controls.schema,
24884
24634
  stack: sequence.stack
24885
24635
  }, sequence.id);
24886
- }) : null,
24636
+ }),
24887
24637
  /* @__PURE__ */ jsx222(SequencePropsObserver, {}),
24888
24638
  /* @__PURE__ */ jsxs107(TimelineWidthProvider, {
24889
24639
  children: [
@@ -26357,7 +26107,7 @@ var isValidJSON = (value) => {
26357
26107
  return false;
26358
26108
  }
26359
26109
  };
26360
- var Inner5 = () => {
26110
+ var Inner = () => {
26361
26111
  const [value, setValue] = useState80(() => {
26362
26112
  const override = Internals68.getInputPropsOverride();
26363
26113
  if (override) {
@@ -26439,7 +26189,7 @@ var Inner5 = () => {
26439
26189
  };
26440
26190
  var OverrideInputPropsModal = () => {
26441
26191
  return /* @__PURE__ */ jsx237(DismissableModal, {
26442
- children: /* @__PURE__ */ jsx237(Inner5, {})
26192
+ children: /* @__PURE__ */ jsx237(Inner, {})
26443
26193
  });
26444
26194
  };
26445
26195
 
@@ -27220,7 +26970,7 @@ var KeyboardShortcutsExplainer = () => {
27220
26970
  };
27221
26971
 
27222
26972
  // src/components/QuickSwitcher/algolia-search.ts
27223
- import { NoReactInternals as NoReactInternals15 } from "remotion/no-react";
26973
+ import { NoReactInternals as NoReactInternals16 } from "remotion/no-react";
27224
26974
  var ALGOLIA_API_KEY = "3e42dbd4f895fe93ff5cf40d860c4a85";
27225
26975
  var ALGOLIA_APPLICATION_ID = "PLSDUOL1CA";
27226
26976
  var AGOLIA_SEARCH_URL = "https://plsduol1ca-dsn.algolia.net/1/indexes/*/queries";
@@ -27262,7 +27012,7 @@ var algoliaSearch = async (query) => {
27262
27012
  window.open(hit.url);
27263
27013
  }
27264
27014
  };
27265
- }).filter(NoReactInternals15.truthy);
27015
+ }).filter(NoReactInternals16.truthy);
27266
27016
  };
27267
27017
  var splitMatchIntoTitleAndSubtitle = (match) => {
27268
27018
  const main = match.type === "content" ? match._highlightResult.content : match._highlightResult.hierarchy[match.type];
@@ -36122,14 +35872,13 @@ import { jsx as jsx308, jsxs as jsxs159 } from "react/jsx-runtime";
36122
35872
  var getServerDisconnectedDomElement = () => {
36123
35873
  return document.getElementById("server-disconnected-overlay");
36124
35874
  };
36125
- var StudioInner = ({ rootComponent, readOnly, visualModeEnabled }) => {
35875
+ var StudioInner = ({ rootComponent, readOnly }) => {
36126
35876
  return /* @__PURE__ */ jsx308(Internals76.CompositionManagerProvider, {
36127
35877
  onlyRenderComposition: null,
36128
35878
  currentCompositionMetadata: null,
36129
35879
  initialCompositions: [],
36130
35880
  initialCanvasContent: null,
36131
35881
  children: /* @__PURE__ */ jsx308(Internals76.RemotionRootContexts, {
36132
- visualModeEnabled,
36133
35882
  frameState: null,
36134
35883
  audioEnabled: window.remotion_audioEnabled,
36135
35884
  videoEnabled: window.remotion_videoEnabled,
@@ -36153,15 +35902,14 @@ var StudioInner = ({ rootComponent, readOnly, visualModeEnabled }) => {
36153
35902
  })
36154
35903
  });
36155
35904
  };
36156
- var Studio = ({ rootComponent, readOnly, visualModeEnabled }) => {
35905
+ var Studio = ({ rootComponent, readOnly }) => {
36157
35906
  useLayoutEffect5(() => {
36158
35907
  injectCSS();
36159
35908
  }, []);
36160
35909
  return /* @__PURE__ */ jsx308(FastRefreshProvider, {
36161
35910
  children: /* @__PURE__ */ jsx308(StudioInner, {
36162
35911
  rootComponent,
36163
- readOnly,
36164
- visualModeEnabled
35912
+ readOnly
36165
35913
  })
36166
35914
  });
36167
35915
  };