@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
@@ -123,6 +123,7 @@ import { interpolate } from "remotion";
123
123
  import {
124
124
  getFieldsToShow
125
125
  } from "@remotion/studio-shared";
126
+ import { NoReactInternals } from "remotion/no-react";
126
127
  import {
127
128
  SCHEMA_FIELD_ROW_HEIGHT,
128
129
  UNSUPPORTED_FIELD_ROW_HEIGHT,
@@ -139,10 +140,15 @@ var getEffectSchemaLabels = (effect) => {
139
140
  if (!effect.definition.schema) {
140
141
  return [];
141
142
  }
142
- return Object.entries(effect.definition.schema).map(([key, fieldSchema]) => ({
143
- key,
144
- description: fieldSchema.description
145
- }));
143
+ return Object.entries(effect.definition.schema).map(([key, fieldSchema]) => {
144
+ if (fieldSchema.type === "hidden") {
145
+ return null;
146
+ }
147
+ return {
148
+ key,
149
+ description: fieldSchema.description
150
+ };
151
+ }).filter(NoReactInternals.truthy);
146
152
  };
147
153
  var buildTimelineTree = ({
148
154
  sequence,
@@ -155,19 +161,28 @@ var buildTimelineTree = ({
155
161
  if (sequence.effects.length > 0) {
156
162
  roots.push({
157
163
  kind: "group",
158
- nodePathInfo: { nodePath: [...nodePath, "effects"], index },
164
+ nodePathInfo: {
165
+ nodePath: [...nodePath, "effects"],
166
+ index,
167
+ numberOfSequencesWithThisNodePath: 0
168
+ },
159
169
  label: "Effects",
160
170
  children: sequence.effects.map((effect, i) => {
161
171
  const effectNodePath = [...nodePath, "effects", i];
162
172
  return {
163
173
  kind: "group",
164
- nodePathInfo: { nodePath: effectNodePath, index },
174
+ nodePathInfo: {
175
+ nodePath: effectNodePath,
176
+ index,
177
+ numberOfSequencesWithThisNodePath: 0
178
+ },
165
179
  label: effect.definition.label,
166
180
  children: getEffectSchemaLabels(effect).map((label) => ({
167
181
  kind: "field",
168
182
  nodePathInfo: {
169
183
  nodePath: [...effectNodePath, label.key],
170
- index
184
+ index,
185
+ numberOfSequencesWithThisNodePath: 0
171
186
  },
172
187
  label: label.description ?? label.key,
173
188
  field: null
@@ -187,7 +202,11 @@ var buildTimelineTree = ({
187
202
  for (const f of controlFields) {
188
203
  roots.push({
189
204
  kind: "field",
190
- nodePathInfo: { nodePath: [...nodePath, "controls", f.key], index },
205
+ nodePathInfo: {
206
+ nodePath: [...nodePath, "controls", f.key],
207
+ index,
208
+ numberOfSequencesWithThisNodePath: 0
209
+ },
191
210
  label: f.description ?? f.key,
192
211
  field: f
193
212
  });
@@ -223,13 +242,12 @@ var getExpandedTrackHeight = ({
223
242
  sequence,
224
243
  nodePathInfo,
225
244
  getIsExpanded,
226
- getDragOverrides,
227
245
  getCodeValues
228
246
  }) => {
229
247
  const tree = buildTimelineTree({
230
248
  sequence,
231
249
  nodePathInfo,
232
- getDragOverrides,
250
+ getDragOverrides: () => ({}),
233
251
  getCodeValues
234
252
  });
235
253
  const flat = flattenVisibleTreeNodes({ nodes: tree, getIsExpanded });
@@ -335,9 +353,9 @@ var TimelineSlider = () => {
335
353
  if (videoConfig === null || timelineWidth === null) {
336
354
  return null;
337
355
  }
338
- return /* @__PURE__ */ jsx3(Inner, {});
356
+ return /* @__PURE__ */ jsx3(TimelineSliderInner, {});
339
357
  };
340
- var Inner = () => {
358
+ var TimelineSliderInner = () => {
341
359
  const videoConfig = useVideoConfig();
342
360
  const timelinePosition = Internals.Timeline.useTimelinePosition();
343
361
  const ref = useRef(null);
@@ -1874,7 +1892,7 @@ var PreviewServerConnection = ({ children, readOnlyStudio }) => {
1874
1892
 
1875
1893
  // src/helpers/use-asset-drag-events.ts
1876
1894
  import { useCallback as useCallback8, useEffect as useEffect9, useMemo as useMemo10, useRef as useRef7 } from "react";
1877
- import { NoReactInternals } from "remotion/no-react";
1895
+ import { NoReactInternals as NoReactInternals2 } from "remotion/no-react";
1878
1896
  function useAssetDragEvents({
1879
1897
  name,
1880
1898
  parentFolder,
@@ -1883,7 +1901,7 @@ function useAssetDragEvents({
1883
1901
  }) {
1884
1902
  const dragDepthRef = useRef7(0);
1885
1903
  const combinedParents = useMemo10(() => {
1886
- return [parentFolder, name].filter(NoReactInternals.truthy).join("/");
1904
+ return [parentFolder, name].filter(NoReactInternals2.truthy).join("/");
1887
1905
  }, [name, parentFolder]);
1888
1906
  const isDropDiv = useMemo10(() => {
1889
1907
  return dropLocation === combinedParents;
@@ -1923,7 +1941,7 @@ import React15, {
1923
1941
  useState as useState10
1924
1942
  } from "react";
1925
1943
  import { Internals as Internals5 } from "remotion";
1926
- import { NoReactInternals as NoReactInternals3 } from "remotion/no-react";
1944
+ import { NoReactInternals as NoReactInternals4 } from "remotion/no-react";
1927
1945
 
1928
1946
  // src/helpers/copy-text.ts
1929
1947
  var copyText = (cmd) => {
@@ -2183,7 +2201,7 @@ var Column = ({ children, justify, className, align, style = {} }) => {
2183
2201
  };
2184
2202
 
2185
2203
  // src/components/RenderQueue/actions.ts
2186
- import { NoReactInternals as NoReactInternals2 } from "remotion/no-react";
2204
+ import { NoReactInternals as NoReactInternals3 } from "remotion/no-react";
2187
2205
 
2188
2206
  // src/components/call-api.ts
2189
2207
  var callApi = (endpoint, body, signal) => {
@@ -2240,7 +2258,7 @@ var addStillRenderJob = ({
2240
2258
  chromiumOptions,
2241
2259
  delayRenderTimeout,
2242
2260
  envVariables,
2243
- serializedInputPropsWithCustomSchema: NoReactInternals2.serializeJSONWithSpecialTypes({
2261
+ serializedInputPropsWithCustomSchema: NoReactInternals3.serializeJSONWithSpecialTypes({
2244
2262
  data: inputProps,
2245
2263
  staticBase: window.remotion_staticBase,
2246
2264
  indent: undefined
@@ -2292,7 +2310,7 @@ var addSequenceRenderJob = ({
2292
2310
  delayRenderTimeout,
2293
2311
  envVariables,
2294
2312
  concurrency,
2295
- serializedInputPropsWithCustomSchema: NoReactInternals2.serializeJSONWithSpecialTypes({
2313
+ serializedInputPropsWithCustomSchema: NoReactInternals3.serializeJSONWithSpecialTypes({
2296
2314
  data: inputProps,
2297
2315
  staticBase: window.remotion_staticBase,
2298
2316
  indent: undefined
@@ -2378,7 +2396,7 @@ var addVideoRenderJob = ({
2378
2396
  disallowParallelEncoding,
2379
2397
  chromiumOptions,
2380
2398
  envVariables,
2381
- serializedInputPropsWithCustomSchema: NoReactInternals2.serializeJSONWithSpecialTypes({
2399
+ serializedInputPropsWithCustomSchema: NoReactInternals3.serializeJSONWithSpecialTypes({
2382
2400
  data: inputProps,
2383
2401
  staticBase: window.remotion_staticBase,
2384
2402
  indent: undefined
@@ -2452,7 +2470,7 @@ var getProjectInfo = (signal) => {
2452
2470
  var callUpdateDefaultPropsApi = (compositionId, defaultProps, enumPaths) => {
2453
2471
  return callApi("/api/update-default-props", {
2454
2472
  compositionId,
2455
- defaultProps: NoReactInternals2.serializeJSONWithSpecialTypes({
2473
+ defaultProps: NoReactInternals3.serializeJSONWithSpecialTypes({
2456
2474
  data: defaultProps,
2457
2475
  indent: undefined,
2458
2476
  staticBase: window.remotion_staticBase
@@ -2619,7 +2637,7 @@ var AssetFolderTree = ({
2619
2637
  readOnlyStudio
2620
2638
  }) => {
2621
2639
  const combinedParents = useMemo13(() => {
2622
- return [parentFolder, name].filter(NoReactInternals3.truthy).join("/");
2640
+ return [parentFolder, name].filter(NoReactInternals4.truthy).join("/");
2623
2641
  }, [name, parentFolder]);
2624
2642
  return /* @__PURE__ */ jsxs3("div", {
2625
2643
  children: [
@@ -5185,7 +5203,7 @@ import { useCallback as useCallback99, useMemo as useMemo105, useState as useSta
5185
5203
  // src/helpers/use-menu-structure.tsx
5186
5204
  import { useContext as useContext22, useMemo as useMemo42 } from "react";
5187
5205
  import { Internals as Internals19 } from "remotion";
5188
- import { NoReactInternals as NoReactInternals5 } from "remotion/no-react";
5206
+ import { NoReactInternals as NoReactInternals6 } from "remotion/no-react";
5189
5207
 
5190
5208
  // src/api/restart-studio.ts
5191
5209
  import { getRemotionEnvironment as getRemotionEnvironment2 } from "remotion";
@@ -5800,6 +5818,7 @@ var parseError = async (error, contextLines) => {
5800
5818
  };
5801
5819
 
5802
5820
  // src/error-overlay/react-overlay/utils/unmapper.ts
5821
+ import { sourceContentFor } from "@jridgewell/trace-mapping";
5803
5822
  import { Internals as Internals13 } from "remotion";
5804
5823
 
5805
5824
  // src/error-overlay/react-overlay/utils/get-lines-around.ts
@@ -5816,9 +5835,9 @@ function getLinesAround(line2, count, lines) {
5816
5835
  }
5817
5836
 
5818
5837
  // src/error-overlay/react-overlay/utils/get-source-map.ts
5819
- import { SourceMapConsumer } from "source-map";
5820
- var getOriginalPosition = (source_map, line2, column) => {
5821
- const result = source_map.originalPositionFor({
5838
+ import { TraceMap, originalPositionFor } from "@jridgewell/trace-mapping";
5839
+ var getOriginalPosition = (sourceMap, line2, column) => {
5840
+ const result = originalPositionFor(sourceMap, {
5822
5841
  line: line2,
5823
5842
  column
5824
5843
  });
@@ -5851,12 +5870,12 @@ async function getSourceMap(fileUri, fileContents) {
5851
5870
  throw new Error("Sorry, non-base64 inline source-map encoding is not supported.");
5852
5871
  }
5853
5872
  const converted = window.atob(sm.substring(match2[0].length));
5854
- return new SourceMapConsumer(JSON.parse(converted));
5873
+ return new TraceMap(JSON.parse(converted));
5855
5874
  }
5856
5875
  const index = fileUri.lastIndexOf("/");
5857
5876
  const url = fileUri.substring(0, index + 1) + sm;
5858
5877
  const obj = await fetch(url).then((res) => res.json());
5859
- return new SourceMapConsumer(obj);
5878
+ return new TraceMap(obj);
5860
5879
  }
5861
5880
 
5862
5881
  // src/error-overlay/react-overlay/utils/unmapper.ts
@@ -5889,7 +5908,7 @@ var unmap = async (frames, contextLines) => {
5889
5908
  const pos = getOriginalPosition(map, frame.frame.lineNumber, frame.frame.columnNumber);
5890
5909
  const { functionName } = frame.frame;
5891
5910
  let hasSource = null;
5892
- hasSource = pos.source ? map.sourceContentFor(pos.source, false) : null;
5911
+ hasSource = pos.source ? sourceContentFor(map, pos.source) : null;
5893
5912
  const scriptCode = hasSource && pos.line ? getLinesAround(pos.line, contextLines, hasSource.split(`
5894
5913
  `)) : null;
5895
5914
  return {
@@ -8253,7 +8272,7 @@ import {
8253
8272
  useImperativeHandle as useImperativeHandle9
8254
8273
  } from "react";
8255
8274
  import { Internals as Internals18 } from "remotion";
8256
- import { NoReactInternals as NoReactInternals4 } from "remotion/no-react";
8275
+ import { NoReactInternals as NoReactInternals5 } from "remotion/no-react";
8257
8276
 
8258
8277
  // src/icons/timelineInOutPointer.tsx
8259
8278
  import { jsx as jsx76 } from "react/jsx-runtime";
@@ -8324,7 +8343,7 @@ var getTooltipText = (pointType, key) => [
8324
8343
  `Mark ${pointType}`,
8325
8344
  areKeyboardShortcutsDisabled() ? null : `(${key})`,
8326
8345
  "- right click to clear"
8327
- ].filter(NoReactInternals4.truthy).join(" ");
8346
+ ].filter(NoReactInternals5.truthy).join(" ");
8328
8347
  var style4 = {
8329
8348
  width: 16,
8330
8349
  height: 16
@@ -8845,7 +8864,7 @@ var getFileMenu = ({
8845
8864
  quickSwitcherLabel: "Open in editor..."
8846
8865
  } : null,
8847
8866
  getGitMenuItem()
8848
- ].filter(NoReactInternals5.truthy);
8867
+ ].filter(NoReactInternals6.truthy);
8849
8868
  if (items.length === 0) {
8850
8869
  return null;
8851
8870
  }
@@ -9588,7 +9607,7 @@ var itemToSearchResult = (item, setSelectedModal, prefixes) => {
9588
9607
  ...prefixes,
9589
9608
  getItemLabel(item)
9590
9609
  ]);
9591
- }).flat(1).filter(NoReactInternals5.truthy);
9610
+ }).flat(1).filter(NoReactInternals6.truthy);
9592
9611
  }
9593
9612
  return [
9594
9613
  {
@@ -9610,7 +9629,7 @@ var makeSearchResults = (actions, setSelectedModal) => {
9610
9629
  }
9611
9630
  return itemToSearchResult(item, setSelectedModal, []);
9612
9631
  });
9613
- }).flat(Infinity).filter(NoReactInternals5.truthy);
9632
+ }).flat(Infinity).filter(NoReactInternals6.truthy);
9614
9633
  return items;
9615
9634
  };
9616
9635
 
@@ -9762,7 +9781,7 @@ import { useContext as useContext23, useEffect as useEffect31, useState as useSt
9762
9781
  import { Internals as Internals20 } from "remotion";
9763
9782
 
9764
9783
  // src/components/Timeline/TimelineStack/get-stack.ts
9765
- import { SourceMapConsumer as SourceMapConsumer2 } from "source-map";
9784
+ import { TraceMap as TraceMap2 } from "@jridgewell/trace-mapping";
9766
9785
 
9767
9786
  // src/helpers/get-location-of-sequence.ts
9768
9787
  var getLocationOfSequence = (stack2) => {
@@ -9801,40 +9820,23 @@ var getLocationOfFunctionCall = (stack2, functionName) => {
9801
9820
  };
9802
9821
 
9803
9822
  // src/components/Timeline/TimelineStack/get-stack.ts
9804
- var waiters = [];
9805
- var sourceMapConsumerCache = {};
9806
- var isCreating = {};
9823
+ var traceMapCache = {};
9824
+ var traceMapPromises = {};
9807
9825
  var getSourceMapCache = async (fileName) => {
9808
- if (sourceMapConsumerCache[fileName]) {
9809
- return sourceMapConsumerCache[fileName];
9810
- }
9811
- if (isCreating[fileName]) {
9812
- return new Promise((resolve) => {
9813
- waiters.push({
9814
- id: String(Math.random()),
9815
- forFileName: fileName,
9816
- resolve
9817
- });
9818
- });
9826
+ if (traceMapCache[fileName]) {
9827
+ return traceMapCache[fileName];
9819
9828
  }
9820
- isCreating[fileName] = true;
9821
- const res = await fetch(`${fileName}.map`);
9822
- const json = await res.json();
9823
- const map = await new Promise((resolve) => {
9824
- SourceMapConsumer2.with(json, null, (consumer) => {
9825
- resolve(consumer);
9826
- });
9827
- });
9828
- waiters.filter((w) => {
9829
- if (w.forFileName === fileName) {
9830
- w.resolve(map);
9831
- return false;
9832
- }
9833
- return true;
9829
+ if (traceMapPromises[fileName]) {
9830
+ return traceMapPromises[fileName];
9831
+ }
9832
+ traceMapPromises[fileName] = fetch(`${fileName}.map`).then((res) => res.json()).then((json) => {
9833
+ const map = new TraceMap2(json);
9834
+ traceMapCache[fileName] = map;
9835
+ return map;
9836
+ }).finally(() => {
9837
+ delete traceMapPromises[fileName];
9834
9838
  });
9835
- sourceMapConsumerCache[fileName] = map;
9836
- isCreating[fileName] = false;
9837
- return map;
9839
+ return traceMapPromises[fileName];
9838
9840
  };
9839
9841
  var getOriginalLocationFromStack = async (stack2, type) => {
9840
9842
  const location2 = type === "sequence" ? getLocationOfSequence(stack2) : getLocationOfFunctionCall(stack2, "visualControl");
@@ -9896,7 +9898,8 @@ var baseStyle = {
9896
9898
  color: "inherit",
9897
9899
  textDecoration: "none",
9898
9900
  fontSize: "inherit",
9899
- textUnderlineOffset: 2
9901
+ textUnderlineOffset: 2,
9902
+ whiteSpace: "nowrap"
9900
9903
  };
9901
9904
  var compositionNameStyle = {
9902
9905
  ...baseStyle,
@@ -10060,9 +10063,9 @@ var MenuBuildIndicator = () => {
10060
10063
  }) : /* @__PURE__ */ jsx83("div", {
10061
10064
  style: noSpinner
10062
10065
  }),
10063
- isClickable ? /* @__PURE__ */ jsx83(Spacing, {
10066
+ /* @__PURE__ */ jsx83(Spacing, {
10064
10067
  x: 0.5
10065
- }) : null,
10068
+ }),
10066
10069
  isClickable ? /* @__PURE__ */ jsx83("a", {
10067
10070
  style: projectNameHovered ? projectNameLinkHovered : projectNameLink,
10068
10071
  title: projectNameTitle,
@@ -10312,7 +10315,7 @@ var useStudioCanvasDimensions = ({
10312
10315
 
10313
10316
  // src/components/EditorGuides/Guide.tsx
10314
10317
  import { memo, useCallback as useCallback40, useContext as useContext27, useMemo as useMemo48 } from "react";
10315
- import { NoReactInternals as NoReactInternals6 } from "remotion/no-react";
10318
+ import { NoReactInternals as NoReactInternals7 } from "remotion/no-react";
10316
10319
 
10317
10320
  // src/components/ForceSpecificCursor.tsx
10318
10321
  import React58, { useMemo as useMemo47 } from "react";
@@ -10436,7 +10439,7 @@ var GuideComp = ({ guide, canvasDimensions, scale }) => {
10436
10439
  className: [
10437
10440
  "__remotion_editor_guide_content",
10438
10441
  selectedGuideId === guide.id || hoveredGuideId === guide.id ? "__remotion_editor_guide_selected" : null
10439
- ].filter(NoReactInternals6.truthy).join(" ")
10442
+ ].filter(NoReactInternals7.truthy).join(" ")
10440
10443
  })
10441
10444
  })
10442
10445
  });
@@ -11676,7 +11679,7 @@ import { useCallback as useCallback44, useContext as useContext35, useEffect as
11676
11679
  import { Internals as Internals31 } from "remotion";
11677
11680
 
11678
11681
  // src/helpers/document-title.ts
11679
- import { NoReactInternals as NoReactInternals7 } from "remotion/no-react";
11682
+ import { NoReactInternals as NoReactInternals8 } from "remotion/no-react";
11680
11683
  var currentItemName = null;
11681
11684
  var renderJobs = [];
11682
11685
  var setCurrentCanvasContentId = (id) => {
@@ -11704,7 +11707,7 @@ var updateTitle = () => {
11704
11707
  document.title = [
11705
11708
  getProgressInBrackets(currentItemName, renderJobs),
11706
11709
  `${currentCompTitle} ${suffix}`
11707
- ].filter(NoReactInternals7.truthy).join(" ");
11710
+ ].filter(NoReactInternals8.truthy).join(" ");
11708
11711
  };
11709
11712
  var getProgressInBrackets = (selectedCompositionId, jobs) => {
11710
11713
  const currentRender = jobs.find((job) => job.status === "running");
@@ -12180,7 +12183,7 @@ import { useContext as useContext41 } from "react";
12180
12183
  // src/components/RenderModal/DataEditor.tsx
12181
12184
  import React94, { useCallback as useCallback71, useContext as useContext40, useMemo as useMemo86, useState as useState53 } from "react";
12182
12185
  import { getInputProps } from "remotion";
12183
- import { NoReactInternals as NoReactInternals10 } from "remotion/no-react";
12186
+ import { NoReactInternals as NoReactInternals11 } from "remotion/no-react";
12184
12187
 
12185
12188
  // src/components/NewComposition/ValidationMessage.tsx
12186
12189
  import { useMemo as useMemo57 } from "react";
@@ -12312,7 +12315,7 @@ var Item = ({ selected, onClick, children }) => {
12312
12315
  };
12313
12316
 
12314
12317
  // src/components/RenderModal/get-render-modal-warnings.ts
12315
- import { NoReactInternals as NoReactInternals8 } from "remotion/no-react";
12318
+ import { NoReactInternals as NoReactInternals9 } from "remotion/no-react";
12316
12319
  var getInputPropsWarning = ({
12317
12320
  cliProps,
12318
12321
  propsEditType
@@ -12375,13 +12378,13 @@ var getRenderModalWarnings = ({
12375
12378
  staticFileUsed(customFileUsed, inJSONEditor),
12376
12379
  mapUsed(jsMapUsed, inJSONEditor),
12377
12380
  setUsed(jsSetUsed, inJSONEditor)
12378
- ].filter(NoReactInternals8.truthy);
12381
+ ].filter(NoReactInternals9.truthy);
12379
12382
  };
12380
12383
 
12381
12384
  // src/components/RenderModal/RenderModalJSONPropsEditor.tsx
12382
12385
  import React69, { useCallback as useCallback48, useEffect as useEffect43, useMemo as useMemo60 } from "react";
12383
12386
  import { useContext as useContext38 } from "react";
12384
- import { NoReactInternals as NoReactInternals9 } from "remotion/no-react";
12387
+ import { NoReactInternals as NoReactInternals10 } from "remotion/no-react";
12385
12388
 
12386
12389
  // src/components/RenderModal/SchemaEditor/deep-equal.ts
12387
12390
  function deepEqual(a, b) {
@@ -12689,7 +12692,7 @@ var parseJS = (value, schema) => {
12689
12692
  };
12690
12693
  var parseJSON = (str, schema) => {
12691
12694
  try {
12692
- const value = NoReactInternals9.deserializeJSONWithSpecialTypes(str);
12695
+ const value = NoReactInternals10.deserializeJSONWithSpecialTypes(str);
12693
12696
  const zodValidation = zodSafeParse(schema, value);
12694
12697
  return { str, value, validJSON: true, zodValidation };
12695
12698
  } catch (e) {
@@ -15851,7 +15854,7 @@ var DataEditor = ({
15851
15854
  return null;
15852
15855
  }
15853
15856
  const value = defaultProps;
15854
- return NoReactInternals10.serializeJSONWithSpecialTypes({
15857
+ return NoReactInternals11.serializeJSONWithSpecialTypes({
15855
15858
  data: value,
15856
15859
  indent: 2,
15857
15860
  staticBase: window.remotion_staticBase
@@ -16983,7 +16986,7 @@ var RenderQueueRemoveItem = ({ job }) => {
16983
16986
  import { useCallback as useCallback82, useContext as useContext48, useMemo as useMemo92 } from "react";
16984
16987
 
16985
16988
  // src/helpers/retry-payload.ts
16986
- import { NoReactInternals as NoReactInternals11 } from "remotion/no-react";
16989
+ import { NoReactInternals as NoReactInternals12 } from "remotion/no-react";
16987
16990
  var makeRetryPayload = (job) => {
16988
16991
  const defaults = window.remotion_renderDefaults;
16989
16992
  if (!defaults) {
@@ -17019,7 +17022,7 @@ var makeRetryPayload = (job) => {
17019
17022
  initialHeadless: job.chromiumOptions.headless,
17020
17023
  initialIgnoreCertificateErrors: job.chromiumOptions.ignoreCertificateErrors,
17021
17024
  initialDarkMode: job.chromiumOptions.darkMode,
17022
- defaultProps: NoReactInternals11.deserializeJSONWithSpecialTypes(job.serializedInputPropsWithCustomSchema),
17025
+ defaultProps: NoReactInternals12.deserializeJSONWithSpecialTypes(job.serializedInputPropsWithCustomSchema),
17023
17026
  inFrameMark: null,
17024
17027
  outFrameMark: null,
17025
17028
  initialOffthreadVideoCacheSizeInBytes: job.offthreadVideoCacheSizeInBytes,
@@ -17071,7 +17074,7 @@ var makeRetryPayload = (job) => {
17071
17074
  initialHeadless: job.chromiumOptions.headless,
17072
17075
  initialIgnoreCertificateErrors: job.chromiumOptions.ignoreCertificateErrors,
17073
17076
  initialDarkMode: job.chromiumOptions.darkMode,
17074
- defaultProps: NoReactInternals11.deserializeJSONWithSpecialTypes(job.serializedInputPropsWithCustomSchema),
17077
+ defaultProps: NoReactInternals12.deserializeJSONWithSpecialTypes(job.serializedInputPropsWithCustomSchema),
17075
17078
  initialStillImageFormat: defaults.stillImageFormat,
17076
17079
  inFrameMark: job.startFrame,
17077
17080
  outFrameMark: job.endFrame,
@@ -17126,7 +17129,7 @@ var makeRetryPayload = (job) => {
17126
17129
  initialHeadless: job.chromiumOptions.headless,
17127
17130
  initialIgnoreCertificateErrors: job.chromiumOptions.ignoreCertificateErrors,
17128
17131
  initialDarkMode: job.chromiumOptions.darkMode,
17129
- defaultProps: NoReactInternals11.deserializeJSONWithSpecialTypes(job.serializedInputPropsWithCustomSchema),
17132
+ defaultProps: NoReactInternals12.deserializeJSONWithSpecialTypes(job.serializedInputPropsWithCustomSchema),
17130
17133
  inFrameMark: job.startFrame,
17131
17134
  outFrameMark: job.endFrame,
17132
17135
  initialOffthreadVideoCacheSizeInBytes: job.offthreadVideoCacheSizeInBytes,
@@ -17580,7 +17583,7 @@ import React109, { useContext as useContext53 } from "react";
17580
17583
 
17581
17584
  // src/components/VisualControls/VisualControlHandle.tsx
17582
17585
  import { useCallback as useCallback85, useContext as useContext52, useEffect as useEffect52, useState as useState57 } from "react";
17583
- import { NoReactInternals as NoReactInternals12 } from "remotion/no-react";
17586
+ import { NoReactInternals as NoReactInternals13 } from "remotion/no-react";
17584
17587
 
17585
17588
  // src/fast-refresh-context.ts
17586
17589
  import { createContext as createContext20 } from "react";
@@ -17722,7 +17725,7 @@ var VisualControlHandle = ({ value, keyName }) => {
17722
17725
  changes: [
17723
17726
  {
17724
17727
  id: keyName,
17725
- newValueSerialized: val === undefined ? "" : NoReactInternals12.serializeJSONWithSpecialTypes({
17728
+ newValueSerialized: val === undefined ? "" : NoReactInternals13.serializeJSONWithSpecialTypes({
17726
17729
  data: val,
17727
17730
  indent: 2,
17728
17731
  staticBase: window.remotion_staticBase
@@ -18010,12 +18013,12 @@ var loadLoopOption = () => {
18010
18013
 
18011
18014
  // src/components/CheckboardToggle.tsx
18012
18015
  import { useCallback as useCallback87, useContext as useContext55 } from "react";
18013
- import { NoReactInternals as NoReactInternals13 } from "remotion/no-react";
18016
+ import { NoReactInternals as NoReactInternals14 } from "remotion/no-react";
18014
18017
  import { jsx as jsx165 } from "react/jsx-runtime";
18015
18018
  var accessibilityLabel2 = [
18016
18019
  "Show transparency as checkerboard",
18017
18020
  areKeyboardShortcutsDisabled() ? null : "(T)"
18018
- ].filter(NoReactInternals13.truthy).join(" ");
18021
+ ].filter(NoReactInternals14.truthy).join(" ");
18019
18022
  var CheckboardToggle = () => {
18020
18023
  const { checkerboard, setCheckerboard } = useContext55(CheckerboardContext);
18021
18024
  const onClick = useCallback87(() => {
@@ -18131,12 +18134,12 @@ var FpsCounter = ({ playbackSpeed }) => {
18131
18134
  // src/components/FullscreenToggle.tsx
18132
18135
  import { useCallback as useCallback88, useContext as useContext56, useEffect as useEffect54 } from "react";
18133
18136
  import { Internals as Internals38 } from "remotion";
18134
- import { NoReactInternals as NoReactInternals14 } from "remotion/no-react";
18137
+ import { NoReactInternals as NoReactInternals15 } from "remotion/no-react";
18135
18138
  import { jsx as jsx166 } from "react/jsx-runtime";
18136
18139
  var accessibilityLabel3 = [
18137
18140
  "Enter fullscreen preview",
18138
18141
  areKeyboardShortcutsDisabled() ? null : "(F)"
18139
- ].filter(NoReactInternals14.truthy).join(" ");
18142
+ ].filter(NoReactInternals15.truthy).join(" ");
18140
18143
  var FullScreenToggle = () => {
18141
18144
  const keybindings = useKeybinding();
18142
18145
  const { setSize } = useContext56(Internals38.PreviewSizeContext);
@@ -18944,7 +18947,7 @@ var RenderButton = ({
18944
18947
  };
18945
18948
  }, []);
18946
18949
  const video = Internals42.useVideo();
18947
- const getCurrentFrame2 = PlayerInternals14.useFrameImperative();
18950
+ const { getCurrentFrame: getCurrentFrame2 } = PlayerInternals14.usePlayer();
18948
18951
  const { props } = useContext58(Internals42.EditorPropsContext);
18949
18952
  const openServerRenderModal = useCallback93((copyCommandOnly) => {
18950
18953
  if (!video) {
@@ -20681,7 +20684,7 @@ var calculateTimeline = ({
20681
20684
  hash: actualHash,
20682
20685
  cascadedStart,
20683
20686
  cascadedDuration: sequence.duration,
20684
- nodePathInfo: nodePath ? { nodePath, index: 0 } : null
20687
+ nodePathInfo: nodePath ? { nodePath, index: 0, numberOfSequencesWithThisNodePath: 0 } : null
20685
20688
  });
20686
20689
  }
20687
20690
  const uniqueTracks = [];
@@ -20705,12 +20708,29 @@ var calculateTimeline = ({
20705
20708
  if (track.nodePathInfo === null) {
20706
20709
  return track;
20707
20710
  }
20708
- const key4 = JSON.stringify(track.nodePathInfo.nodePath);
20711
+ const key4 = track.nodePathInfo.nodePath.join(".");
20709
20712
  const index = nodePathIndexCounters.get(key4) ?? 0;
20710
20713
  nodePathIndexCounters.set(key4, index + 1);
20711
20714
  return {
20712
20715
  ...track,
20713
- nodePathInfo: { nodePath: track.nodePathInfo.nodePath, index }
20716
+ nodePathInfo: {
20717
+ nodePath: track.nodePathInfo.nodePath,
20718
+ index,
20719
+ numberOfSequencesWithThisNodePath: 0
20720
+ }
20721
+ };
20722
+ }).map((track) => {
20723
+ if (track.nodePathInfo === null) {
20724
+ return track;
20725
+ }
20726
+ const key4 = track.nodePathInfo.nodePath.join(".");
20727
+ return {
20728
+ ...track,
20729
+ nodePathInfo: {
20730
+ nodePath: track.nodePathInfo.nodePath,
20731
+ index: track.nodePathInfo.index,
20732
+ numberOfSequencesWithThisNodePath: nodePathIndexCounters.get(key4) ?? 0
20733
+ }
20714
20734
  };
20715
20735
  });
20716
20736
  };
@@ -20762,7 +20782,7 @@ var SequencePropsObserver = () => {
20762
20782
  if (event.type !== "sequence-props-updated") {
20763
20783
  return;
20764
20784
  }
20765
- setCodeValues(event.nodePath, event.result);
20785
+ setCodeValues(event.nodePath, () => event.result);
20766
20786
  };
20767
20787
  const unsubscribe = subscribeToEvent("sequence-props-updated", handleEvent);
20768
20788
  return () => {
@@ -20843,7 +20863,7 @@ var acquireSequencePropsSubscription = ({
20843
20863
  entries.delete(key4);
20844
20864
  }
20845
20865
  acquired.promise.then((result) => {
20846
- if (!result.canUpdate) {
20866
+ if (!result.success) {
20847
20867
  return;
20848
20868
  }
20849
20869
  return callApi("/api/unsubscribe-from-sequence-props", {
@@ -20890,13 +20910,13 @@ var useSequencePropsSubscription = ({
20890
20910
  schema,
20891
20911
  clientId,
20892
20912
  applyOnce: (result) => {
20893
- if (!result.canUpdate) {
20913
+ if (!result.success) {
20894
20914
  return;
20895
20915
  }
20896
- setCodeValues(result.nodePath, result);
20916
+ setCodeValues(result.nodePath, () => result.status);
20897
20917
  },
20898
20918
  applyEach: (result) => {
20899
- if (!result.canUpdate) {
20919
+ if (!result.success) {
20900
20920
  return;
20901
20921
  }
20902
20922
  setOverrideIdToNodePath(overrideId, result.nodePath);
@@ -20930,7 +20950,7 @@ var SubscribeToNodePaths = ({ overrideId, schema, stack: stack2 }) => {
20930
20950
 
20931
20951
  // src/components/Timeline/TimelineDragHandler.tsx
20932
20952
  import { PlayerInternals as PlayerInternals16 } from "@remotion/player";
20933
- import {
20953
+ import React130, {
20934
20954
  useCallback as useCallback100,
20935
20955
  useContext as useContext71,
20936
20956
  useEffect as useEffect66,
@@ -21070,10 +21090,10 @@ var TimelineDragHandler = () => {
21070
21090
  return /* @__PURE__ */ jsx193("div", {
21071
21091
  ref: sliderAreaRef,
21072
21092
  style: containerStyle2,
21073
- children: video ? /* @__PURE__ */ jsx193(Inner2, {}) : null
21093
+ children: video ? /* @__PURE__ */ jsx193(TimelineDragHandlerInnerMemo, {}) : null
21074
21094
  });
21075
21095
  };
21076
- var Inner2 = () => {
21096
+ var TimelineDragHandlerInner = () => {
21077
21097
  const videoConfig = useVideoConfig4();
21078
21098
  const size3 = PlayerInternals16.useElementSize(scrollableRef, {
21079
21099
  triggerOnWindowResize: true,
@@ -21472,9 +21492,10 @@ var Inner2 = () => {
21472
21492
  ]
21473
21493
  });
21474
21494
  };
21495
+ var TimelineDragHandlerInnerMemo = React130.memo(TimelineDragHandlerInner);
21475
21496
 
21476
21497
  // src/components/Timeline/TimelineHeightContainer.tsx
21477
- import { useMemo as useMemo112 } from "react";
21498
+ import React134, { useMemo as useMemo112 } from "react";
21478
21499
 
21479
21500
  // src/components/Timeline/use-timeline-height.ts
21480
21501
  import { useContext as useContext73, useMemo as useMemo111 } from "react";
@@ -21703,13 +21724,13 @@ var TimelineTimeIndicators = () => {
21703
21724
  if (video === null) {
21704
21725
  return null;
21705
21726
  }
21706
- return /* @__PURE__ */ jsx196(Inner3, {
21727
+ return /* @__PURE__ */ jsx196(TimelineTimeIndicatorsInner, {
21707
21728
  durationInFrames: video.durationInFrames,
21708
21729
  fps: video.fps,
21709
21730
  windowWidth: sliderTrack
21710
21731
  });
21711
21732
  };
21712
- var Inner3 = ({ windowWidth, durationInFrames, fps }) => {
21733
+ var TimelineTimeIndicatorsInner = ({ windowWidth, durationInFrames, fps }) => {
21713
21734
  const ref2 = useRef39(null);
21714
21735
  useEffect68(() => {
21715
21736
  const currentRef = ref2.current;
@@ -21795,30 +21816,22 @@ var useTimelineHeight = ({
21795
21816
  }) => {
21796
21817
  const { getIsExpanded } = useContext73(ExpandedTracksGetterContext);
21797
21818
  const { previewServerState } = useContext73(StudioServerConnectionCtx);
21798
- const { getDragOverrides, getCodeValues } = useContext73(Internals53.VisualModeGettersContext);
21799
- const visualModeEnabled = Boolean(process.env.EXPERIMENTAL_VISUAL_MODE_ENABLED) && previewServerState.type === "connected";
21819
+ const { getCodeValues } = useContext73(Internals53.VisualModeCodeValuesContext);
21820
+ const previewServerConnected = previewServerState.type === "connected";
21800
21821
  return useMemo111(() => {
21801
21822
  const tracksHeight = shown.reduce((acc, track) => {
21802
- const isExpanded = visualModeEnabled && track.nodePathInfo !== null && getIsExpanded(track.nodePathInfo);
21823
+ const isExpanded = previewServerConnected && track.nodePathInfo !== null && getIsExpanded(track.nodePathInfo);
21803
21824
  const layerHeight = getTimelineLayerHeight(track.sequence.type) + TIMELINE_ITEM_BORDER_BOTTOM;
21804
21825
  const expandedHeight = isExpanded && track.nodePathInfo ? getExpandedTrackHeight({
21805
21826
  sequence: track.sequence,
21806
21827
  nodePathInfo: track.nodePathInfo,
21807
21828
  getIsExpanded,
21808
- getDragOverrides,
21809
21829
  getCodeValues
21810
21830
  }) + TIMELINE_ITEM_BORDER_BOTTOM : 0;
21811
21831
  return acc + layerHeight + expandedHeight;
21812
21832
  }, 0);
21813
21833
  return tracksHeight + TIMELINE_ITEM_BORDER_BOTTOM + (hasBeenCut ? MAX_TIMELINE_TRACKS_NOTICE_HEIGHT : 0) + TIMELINE_TIME_INDICATOR_HEIGHT;
21814
- }, [
21815
- shown,
21816
- hasBeenCut,
21817
- visualModeEnabled,
21818
- getIsExpanded,
21819
- getDragOverrides,
21820
- getCodeValues
21821
- ]);
21834
+ }, [shown, hasBeenCut, previewServerConnected, getIsExpanded, getCodeValues]);
21822
21835
  };
21823
21836
 
21824
21837
  // src/components/Timeline/TimelineHeightContainer.tsx
@@ -21829,7 +21842,7 @@ var baseStyle2 = {
21829
21842
  minHeight: "100%",
21830
21843
  overflowX: "hidden"
21831
21844
  };
21832
- var TimelineHeightContainer = ({ shown, hasBeenCut, children }) => {
21845
+ var TimelineHeightContainerInner = ({ shown, hasBeenCut, children }) => {
21833
21846
  const height = useTimelineHeight({ shown, hasBeenCut });
21834
21847
  const style10 = useMemo112(() => ({ ...baseStyle2, height }), [height]);
21835
21848
  return /* @__PURE__ */ jsx197("div", {
@@ -21837,6 +21850,7 @@ var TimelineHeightContainer = ({ shown, hasBeenCut, children }) => {
21837
21850
  children
21838
21851
  });
21839
21852
  };
21853
+ var TimelineHeightContainer = React134.memo(TimelineHeightContainerInner);
21840
21854
 
21841
21855
  // src/components/Timeline/TimelineList.tsx
21842
21856
  import { PlayerInternals as PlayerInternals18 } from "@remotion/player";
@@ -21904,7 +21918,7 @@ var TimelineExpandArrowButton = ({ isExpanded, onClick, label: label8, disabled
21904
21918
  style: svgStyle,
21905
21919
  children: /* @__PURE__ */ jsx199("path", {
21906
21920
  d: "M2 1L6 4L2 7Z",
21907
- fill: "white"
21921
+ fill: "#ccc"
21908
21922
  })
21909
21923
  })
21910
21924
  });
@@ -21923,6 +21937,7 @@ import { Internals as Internals55 } from "remotion";
21923
21937
  import { useMemo as useMemo120 } from "react";
21924
21938
 
21925
21939
  // src/components/Timeline/TimelineFieldRow.tsx
21940
+ import { optimisticUpdateForCodeValues } from "@remotion/studio-shared";
21926
21941
  import { useCallback as useCallback108, useContext as useContext74, useMemo as useMemo119 } from "react";
21927
21942
  import { Internals as Internals54 } from "remotion";
21928
21943
 
@@ -21932,21 +21947,21 @@ import { jsx as jsx200 } from "react/jsx-runtime";
21932
21947
  var checkboxContainer = {
21933
21948
  marginLeft: 8
21934
21949
  };
21935
- var TimelineBooleanField = ({ field, codeValue, effectiveValue, canUpdate, onSave }) => {
21950
+ var TimelineBooleanField = ({ field, propStatus, effectiveValue, onSave }) => {
21936
21951
  const checked = Boolean(effectiveValue);
21937
21952
  const onChange = useCallback103(() => {
21938
21953
  const newValue = !checked;
21939
- if (canUpdate && newValue !== codeValue) {
21940
- onSave(field.key, newValue);
21954
+ if (propStatus.canUpdate && newValue !== propStatus.codeValue) {
21955
+ onSave(newValue);
21941
21956
  }
21942
- }, [canUpdate, onSave, field.key, checked, codeValue]);
21957
+ }, [propStatus, onSave, checked]);
21943
21958
  return /* @__PURE__ */ jsx200("div", {
21944
21959
  style: checkboxContainer,
21945
21960
  children: /* @__PURE__ */ jsx200(Checkbox, {
21946
21961
  checked,
21947
21962
  onChange,
21948
21963
  name: field.key,
21949
- disabled: !canUpdate,
21964
+ disabled: !propStatus.canUpdate,
21950
21965
  variant: "small"
21951
21966
  })
21952
21967
  });
@@ -21960,9 +21975,8 @@ var comboboxStyle = {
21960
21975
  };
21961
21976
  var TimelineEnumField = ({
21962
21977
  field,
21963
- codeValue,
21978
+ propStatus,
21964
21979
  effectiveValue,
21965
- canUpdate,
21966
21980
  onSave,
21967
21981
  onDragValueChange,
21968
21982
  onDragEnd
@@ -21974,14 +21988,14 @@ var TimelineEnumField = ({
21974
21988
  const variantKeys = Object.keys(fieldSchema.variants);
21975
21989
  const current = String(effectiveValue ?? fieldSchema.default);
21976
21990
  const onSelect = useCallback104((newValue) => {
21977
- if (!canUpdate || newValue === codeValue) {
21991
+ if (!propStatus.canUpdate || newValue === propStatus.codeValue) {
21978
21992
  return;
21979
21993
  }
21980
- onDragValueChange(field.key, newValue);
21981
- onSave(field.key, newValue).finally(() => {
21994
+ onDragValueChange(newValue);
21995
+ onSave(newValue).finally(() => {
21982
21996
  onDragEnd();
21983
21997
  });
21984
- }, [canUpdate, codeValue, field.key, onSave, onDragValueChange, onDragEnd]);
21998
+ }, [propStatus, onSave, onDragValueChange, onDragEnd]);
21985
21999
  const items = useMemo115(() => {
21986
22000
  return variantKeys.map((key4) => ({
21987
22001
  type: "item",
@@ -21993,9 +22007,9 @@ var TimelineEnumField = ({
21993
22007
  leftItem: null,
21994
22008
  subMenu: null,
21995
22009
  quickSwitcherLabel: null,
21996
- disabled: !canUpdate
22010
+ disabled: !propStatus.canUpdate
21997
22011
  }));
21998
- }, [variantKeys, onSelect, canUpdate]);
22012
+ }, [variantKeys, onSelect, propStatus]);
21999
22013
  return /* @__PURE__ */ jsx201(Combobox, {
22000
22014
  small: true,
22001
22015
  title: field.key,
@@ -22023,20 +22037,19 @@ import { jsx as jsx202 } from "react/jsx-runtime";
22023
22037
  var TimelineNumberField = ({
22024
22038
  field,
22025
22039
  effectiveValue,
22026
- canUpdate,
22027
22040
  onSave,
22028
22041
  onDragValueChange,
22029
22042
  onDragEnd,
22030
- codeValue
22043
+ propStatus
22031
22044
  }) => {
22032
22045
  const [dragValue, setDragValue] = useState70(null);
22033
22046
  const onValueChange = useCallback105((newVal) => {
22034
22047
  setDragValue(newVal);
22035
- onDragValueChange(field.key, newVal);
22036
- }, [onDragValueChange, field.key]);
22048
+ onDragValueChange(newVal);
22049
+ }, [onDragValueChange]);
22037
22050
  const onValueChangeEnd = useCallback105((newVal) => {
22038
- if (canUpdate && newVal !== codeValue) {
22039
- onSave(field.key, newVal).finally(() => {
22051
+ if (propStatus.canUpdate && newVal !== propStatus.codeValue) {
22052
+ onSave(newVal).finally(() => {
22040
22053
  setDragValue(null);
22041
22054
  onDragEnd();
22042
22055
  });
@@ -22044,18 +22057,18 @@ var TimelineNumberField = ({
22044
22057
  setDragValue(null);
22045
22058
  onDragEnd();
22046
22059
  }
22047
- }, [canUpdate, onSave, field.key, codeValue, onDragEnd]);
22060
+ }, [onSave, propStatus, onDragEnd]);
22048
22061
  const onTextChange = useCallback105((newVal) => {
22049
- if (canUpdate) {
22062
+ if (propStatus.canUpdate) {
22050
22063
  const parsed = Number(newVal);
22051
- if (!Number.isNaN(parsed) && parsed !== codeValue) {
22064
+ if (!Number.isNaN(parsed) && propStatus.canUpdate && parsed !== propStatus.codeValue) {
22052
22065
  setDragValue(parsed);
22053
- onSave(field.key, parsed).catch(() => {
22066
+ onSave(parsed).catch(() => {
22054
22067
  setDragValue(null);
22055
22068
  });
22056
22069
  }
22057
22070
  }
22058
- }, [canUpdate, onSave, field.key, codeValue]);
22071
+ }, [onSave, propStatus]);
22059
22072
  const step = field.fieldSchema.type === "number" ? field.fieldSchema.step ?? 1 : 1;
22060
22073
  const stepDecimals = useMemo116(() => getDecimalPlaces(step), [step]);
22061
22074
  const formatter = useCallback105((v) => {
@@ -22105,8 +22118,7 @@ var parseCssRotationToDegrees = (value) => {
22105
22118
  var TimelineRotationField = ({
22106
22119
  field,
22107
22120
  effectiveValue,
22108
- codeValue,
22109
- canUpdate,
22121
+ propStatus,
22110
22122
  onSave,
22111
22123
  onDragValueChange,
22112
22124
  onDragEnd
@@ -22115,12 +22127,12 @@ var TimelineRotationField = ({
22115
22127
  const degrees = useMemo117(() => parseCssRotationToDegrees(String(effectiveValue ?? "0deg")), [effectiveValue]);
22116
22128
  const onValueChange = useCallback106((newVal) => {
22117
22129
  setDragValue(newVal);
22118
- onDragValueChange(field.key, `${newVal}deg`);
22119
- }, [onDragValueChange, field.key]);
22130
+ onDragValueChange(`${newVal}deg`);
22131
+ }, [onDragValueChange]);
22120
22132
  const onValueChangeEnd = useCallback106((newVal) => {
22121
22133
  const newStr = `${newVal}deg`;
22122
- if (canUpdate && newStr !== codeValue) {
22123
- onSave(field.key, newStr).finally(() => {
22134
+ if (propStatus.canUpdate && newStr !== propStatus.codeValue) {
22135
+ onSave(newStr).finally(() => {
22124
22136
  setDragValue(null);
22125
22137
  onDragEnd();
22126
22138
  });
@@ -22128,21 +22140,21 @@ var TimelineRotationField = ({
22128
22140
  setDragValue(null);
22129
22141
  onDragEnd();
22130
22142
  }
22131
- }, [canUpdate, onSave, field.key, codeValue, onDragEnd]);
22143
+ }, [propStatus, onSave, onDragEnd]);
22132
22144
  const onTextChange = useCallback106((newVal) => {
22133
- if (canUpdate) {
22145
+ if (propStatus.canUpdate) {
22134
22146
  const parsed = Number(newVal);
22135
22147
  if (!Number.isNaN(parsed)) {
22136
22148
  const newStr = `${parsed}deg`;
22137
- if (newStr !== codeValue) {
22149
+ if (newStr !== propStatus.codeValue) {
22138
22150
  setDragValue(parsed);
22139
- onSave(field.key, newStr).catch(() => {
22151
+ onSave(newStr).catch(() => {
22140
22152
  setDragValue(null);
22141
22153
  });
22142
22154
  }
22143
22155
  }
22144
22156
  }
22145
- }, [canUpdate, onSave, field.key, codeValue]);
22157
+ }, [propStatus, onSave]);
22146
22158
  const step = field.fieldSchema.type === "rotation" ? field.fieldSchema.step ?? 1 : 1;
22147
22159
  const stepDecimals = useMemo117(() => getDecimalPlaces(step), [step]);
22148
22160
  const formatter = useCallback106((v) => {
@@ -22191,9 +22203,8 @@ var containerStyle2 = {
22191
22203
  };
22192
22204
  var TimelineTranslateField = ({
22193
22205
  field,
22194
- codeValue,
22206
+ propStatus,
22195
22207
  effectiveValue,
22196
- canUpdate,
22197
22208
  onSave,
22198
22209
  onDragValueChange,
22199
22210
  onDragEnd
@@ -22213,13 +22224,13 @@ var TimelineTranslateField = ({
22213
22224
  const onXChange = useCallback107((newVal) => {
22214
22225
  setDragX(newVal);
22215
22226
  const currentY = dragY ?? codeY;
22216
- onDragValueChange(field.key, makeString(newVal, currentY));
22217
- }, [onDragValueChange, field.key, dragY, codeY, makeString]);
22227
+ onDragValueChange(makeString(newVal, currentY));
22228
+ }, [onDragValueChange, dragY, codeY, makeString]);
22218
22229
  const onXChangeEnd = useCallback107((newVal) => {
22219
22230
  const currentY = dragY ?? codeY;
22220
22231
  const newStr = makeString(newVal, currentY);
22221
- if (canUpdate && newStr !== codeValue) {
22222
- onSave(field.key, newStr).finally(() => {
22232
+ if (propStatus.canUpdate && newStr !== propStatus.codeValue) {
22233
+ onSave(newStr).finally(() => {
22223
22234
  setDragX(null);
22224
22235
  onDragEnd();
22225
22236
  });
@@ -22227,39 +22238,30 @@ var TimelineTranslateField = ({
22227
22238
  setDragX(null);
22228
22239
  onDragEnd();
22229
22240
  }
22230
- }, [
22231
- dragY,
22232
- codeY,
22233
- makeString,
22234
- canUpdate,
22235
- codeValue,
22236
- onSave,
22237
- field.key,
22238
- onDragEnd
22239
- ]);
22241
+ }, [dragY, codeY, makeString, propStatus, onSave, onDragEnd]);
22240
22242
  const onXTextChange = useCallback107((newVal) => {
22241
- if (canUpdate) {
22243
+ if (propStatus.canUpdate) {
22242
22244
  const parsed = Number(newVal);
22243
22245
  if (!Number.isNaN(parsed)) {
22244
22246
  const currentY = dragY ?? codeY;
22245
22247
  const newStr = makeString(parsed, currentY);
22246
- if (newStr !== codeValue) {
22248
+ if (newStr !== propStatus.codeValue) {
22247
22249
  setDragX(parsed);
22248
- onSave(field.key, newStr);
22250
+ onSave(newStr);
22249
22251
  }
22250
22252
  }
22251
22253
  }
22252
- }, [canUpdate, dragY, codeY, makeString, codeValue, onSave, field.key]);
22254
+ }, [propStatus, dragY, codeY, makeString, onSave]);
22253
22255
  const onYChange = useCallback107((newVal) => {
22254
22256
  setDragY(newVal);
22255
22257
  const currentX = dragX ?? codeX;
22256
- onDragValueChange(field.key, makeString(currentX, newVal));
22257
- }, [onDragValueChange, field.key, dragX, codeX, makeString]);
22258
+ onDragValueChange(makeString(currentX, newVal));
22259
+ }, [onDragValueChange, dragX, codeX, makeString]);
22258
22260
  const onYChangeEnd = useCallback107((newVal) => {
22259
22261
  const currentX = dragX ?? codeX;
22260
22262
  const newStr = makeString(currentX, newVal);
22261
- if (canUpdate && newStr !== codeValue) {
22262
- onSave(field.key, newStr).finally(() => {
22263
+ if (propStatus.canUpdate && newStr !== propStatus.codeValue) {
22264
+ onSave(newStr).finally(() => {
22263
22265
  setDragY(null);
22264
22266
  onDragEnd();
22265
22267
  });
@@ -22267,31 +22269,22 @@ var TimelineTranslateField = ({
22267
22269
  setDragY(null);
22268
22270
  onDragEnd();
22269
22271
  }
22270
- }, [
22271
- dragX,
22272
- codeX,
22273
- makeString,
22274
- canUpdate,
22275
- codeValue,
22276
- onSave,
22277
- field.key,
22278
- onDragEnd
22279
- ]);
22272
+ }, [dragX, codeX, makeString, propStatus, onSave, onDragEnd]);
22280
22273
  const onYTextChange = useCallback107((newVal) => {
22281
- if (canUpdate) {
22274
+ if (propStatus.canUpdate) {
22282
22275
  const parsed = Number(newVal);
22283
22276
  if (!Number.isNaN(parsed)) {
22284
22277
  const currentX = dragX ?? codeX;
22285
22278
  const newStr = makeString(currentX, parsed);
22286
- if (newStr !== codeValue) {
22279
+ if (newStr !== propStatus.codeValue) {
22287
22280
  setDragY(parsed);
22288
- onSave(field.key, newStr).catch(() => {
22281
+ onSave(newStr).catch(() => {
22289
22282
  setDragY(null);
22290
22283
  });
22291
22284
  }
22292
22285
  }
22293
22286
  }
22294
- }, [canUpdate, onSave, field.key, codeValue, dragX, codeX, makeString]);
22287
+ }, [propStatus, onSave, dragX, codeX, makeString]);
22295
22288
  return /* @__PURE__ */ jsxs94("span", {
22296
22289
  style: containerStyle2,
22297
22290
  children: [
@@ -22353,18 +22346,16 @@ var TimelineFieldValue = ({
22353
22346
  onDragValueChange,
22354
22347
  onDragEnd,
22355
22348
  propStatus,
22356
- canUpdate,
22357
- effectiveValue,
22358
- codeValue
22349
+ effectiveValue
22359
22350
  }) => {
22360
- const wrapperStyle = canUpdate === null || canUpdate === false ? notEditableBackground : undefined;
22351
+ const wrapperStyle = !propStatus.canUpdate ? notEditableBackground : undefined;
22361
22352
  if (!field.supported) {
22362
22353
  return /* @__PURE__ */ jsx205("span", {
22363
22354
  style: unsupportedLabel,
22364
22355
  children: "unsupported"
22365
22356
  });
22366
22357
  }
22367
- if (propStatus !== null && !propStatus.canUpdate) {
22358
+ if (!propStatus.canUpdate) {
22368
22359
  if (propStatus.reason === "computed") {
22369
22360
  return /* @__PURE__ */ jsx205("span", {
22370
22361
  style: unsupportedLabel,
@@ -22373,24 +22364,14 @@ var TimelineFieldValue = ({
22373
22364
  }
22374
22365
  throw new Error(`Unsupported prop status: ${propStatus.reason}`);
22375
22366
  }
22376
- if (propStatus === null) {
22377
- return /* @__PURE__ */ jsx205("span", {
22378
- style: notEditableBackground,
22379
- children: /* @__PURE__ */ jsx205("span", {
22380
- style: unsupportedLabel,
22381
- children: "error"
22382
- })
22383
- });
22384
- }
22385
22367
  if (field.typeName === "number") {
22386
22368
  return /* @__PURE__ */ jsx205("span", {
22387
22369
  style: wrapperStyle,
22388
22370
  children: /* @__PURE__ */ jsx205(TimelineNumberField, {
22389
22371
  field,
22390
22372
  effectiveValue,
22391
- canUpdate,
22392
22373
  onSave,
22393
- codeValue,
22374
+ propStatus,
22394
22375
  onDragValueChange,
22395
22376
  onDragEnd
22396
22377
  })
@@ -22402,8 +22383,7 @@ var TimelineFieldValue = ({
22402
22383
  children: /* @__PURE__ */ jsx205(TimelineRotationField, {
22403
22384
  field,
22404
22385
  effectiveValue,
22405
- codeValue,
22406
- canUpdate,
22386
+ propStatus,
22407
22387
  onSave,
22408
22388
  onDragValueChange,
22409
22389
  onDragEnd
@@ -22416,8 +22396,7 @@ var TimelineFieldValue = ({
22416
22396
  children: /* @__PURE__ */ jsx205(TimelineTranslateField, {
22417
22397
  field,
22418
22398
  effectiveValue,
22419
- codeValue,
22420
- canUpdate,
22399
+ propStatus,
22421
22400
  onSave,
22422
22401
  onDragValueChange,
22423
22402
  onDragEnd
@@ -22429,8 +22408,7 @@ var TimelineFieldValue = ({
22429
22408
  style: wrapperStyle,
22430
22409
  children: /* @__PURE__ */ jsx205(TimelineBooleanField, {
22431
22410
  field,
22432
- codeValue,
22433
- canUpdate,
22411
+ propStatus,
22434
22412
  onSave,
22435
22413
  effectiveValue
22436
22414
  })
@@ -22441,8 +22419,7 @@ var TimelineFieldValue = ({
22441
22419
  style: inlineWrapper,
22442
22420
  children: /* @__PURE__ */ jsx205(TimelineEnumField, {
22443
22421
  field,
22444
- codeValue,
22445
- canUpdate,
22422
+ propStatus,
22446
22423
  onSave,
22447
22424
  effectiveValue,
22448
22425
  onDragValueChange,
@@ -22484,10 +22461,14 @@ var TimelineFieldRow = ({
22484
22461
  nodePath,
22485
22462
  schema
22486
22463
  }) => {
22487
- const { getDragOverrides, getCodeValues } = useContext74(Internals54.VisualModeGettersContext);
22464
+ const { getCodeValues } = useContext74(Internals54.VisualModeCodeValuesContext);
22465
+ const { getDragOverrides } = useContext74(Internals54.VisualModeDragOverridesContext);
22488
22466
  const { setDragOverrides, clearDragOverrides } = useContext74(Internals54.VisualModeSettersContext);
22489
22467
  const codeValuesForOverride = getCodeValues(nodePath);
22490
22468
  const codeValue = codeValuesForOverride?.[field.key] ?? null;
22469
+ if (codeValue === null) {
22470
+ throw new Error("Unexpectedly got null code value for field" + field.key);
22471
+ }
22491
22472
  const dragOverrideValue = useMemo119(() => {
22492
22473
  return nodePath === null ? undefined : (getDragOverrides(nodePath) ?? {})[field.key];
22493
22474
  }, [getDragOverrides, nodePath, field.key]);
@@ -22499,43 +22480,66 @@ var TimelineFieldRow = ({
22499
22480
  shouldResortToDefaultValueIfUndefined: true
22500
22481
  });
22501
22482
  const { setCodeValues } = useContext74(Internals54.VisualModeSettersContext);
22502
- const onSave = useCallback108((key4, value) => {
22483
+ const onSave = useCallback108((value) => {
22503
22484
  if (!codeValuesForOverride || !validatedLocation || !nodePath) {
22504
22485
  return Promise.reject(new Error("Cannot save"));
22505
22486
  }
22506
- const status = codeValuesForOverride[key4];
22507
- if (!status || !status.canUpdate) {
22487
+ if (!codeValue || !codeValue.canUpdate) {
22508
22488
  return Promise.reject(new Error("Cannot save"));
22509
22489
  }
22510
22490
  const defaultValue = field.fieldSchema.default !== undefined ? JSON.stringify(field.fieldSchema.default) : null;
22491
+ const stringifiedValue = JSON.stringify(value);
22492
+ if (value === codeValue.codeValue) {
22493
+ return Promise.resolve();
22494
+ }
22495
+ if (defaultValue === stringifiedValue && codeValue.codeValue === undefined) {
22496
+ return Promise.resolve();
22497
+ }
22498
+ let previousUpdate;
22499
+ setCodeValues(nodePath, (prev) => {
22500
+ previousUpdate = prev;
22501
+ return optimisticUpdateForCodeValues({
22502
+ previous: prev,
22503
+ fieldKey: field.key,
22504
+ value,
22505
+ schema
22506
+ });
22507
+ });
22511
22508
  return callApi("/api/save-sequence-props", {
22512
22509
  fileName: validatedLocation.source,
22513
22510
  nodePath,
22514
- key: key4,
22515
- value: JSON.stringify(value),
22511
+ key: field.key,
22512
+ value: stringifiedValue,
22516
22513
  defaultValue,
22517
22514
  schema
22518
22515
  }).then((data) => {
22519
- if (data.success) {
22520
- setCodeValues(nodePath, data.newStatus);
22521
- return;
22516
+ setCodeValues(nodePath, () => data);
22517
+ }).catch(() => {
22518
+ if (previousUpdate) {
22519
+ setCodeValues(nodePath, (current) => {
22520
+ if (previousUpdate) {
22521
+ return previousUpdate;
22522
+ }
22523
+ return current;
22524
+ });
22522
22525
  }
22523
- return Promise.reject(new Error(data.reason));
22524
22526
  });
22525
22527
  }, [
22528
+ codeValue,
22526
22529
  codeValuesForOverride,
22527
22530
  field.fieldSchema.default,
22531
+ field.key,
22528
22532
  nodePath,
22529
22533
  schema,
22530
22534
  setCodeValues,
22531
22535
  validatedLocation
22532
22536
  ]);
22533
- const onDragValueChange = useCallback108((key4, value) => {
22537
+ const onDragValueChange = useCallback108((value) => {
22534
22538
  if (nodePath === null) {
22535
22539
  throw new Error("Cannot drag value");
22536
22540
  }
22537
- setDragOverrides(nodePath, key4, value);
22538
- }, [setDragOverrides, nodePath]);
22541
+ setDragOverrides(nodePath, field.key, value);
22542
+ }, [setDragOverrides, nodePath, field.key]);
22539
22543
  const onDragEnd = useCallback108(() => {
22540
22544
  if (nodePath === null) {
22541
22545
  throw new Error("Cannot clear drag value");
@@ -22568,9 +22572,7 @@ var TimelineFieldRow = ({
22568
22572
  onSave,
22569
22573
  onDragValueChange,
22570
22574
  onDragEnd,
22571
- canUpdate: codeValue?.canUpdate ?? false,
22572
- effectiveValue,
22573
- codeValue
22575
+ effectiveValue
22574
22576
  })
22575
22577
  ]
22576
22578
  });
@@ -22673,7 +22675,8 @@ var separator = {
22673
22675
  var TimelineExpandedSection = ({ sequence, originalLocation, nodePathInfo, nestedDepth }) => {
22674
22676
  const { getIsExpanded } = useContext75(ExpandedTracksGetterContext);
22675
22677
  const { toggleTrack } = useContext75(ExpandedTracksSetterContext);
22676
- const { getDragOverrides, getCodeValues } = useContext75(Internals55.VisualModeGettersContext);
22678
+ const { getCodeValues } = useContext75(Internals55.VisualModeCodeValuesContext);
22679
+ const { getDragOverrides } = useContext75(Internals55.VisualModeDragOverridesContext);
22677
22680
  const validatedLocation = useMemo121(() => {
22678
22681
  if (!originalLocation || !originalLocation.source || !originalLocation.line) {
22679
22682
  return null;
@@ -22695,9 +22698,8 @@ var TimelineExpandedSection = ({ sequence, originalLocation, nodePathInfo, neste
22695
22698
  sequence,
22696
22699
  nodePathInfo,
22697
22700
  getIsExpanded,
22698
- getDragOverrides,
22699
22701
  getCodeValues
22700
- }), [sequence, nodePathInfo, getIsExpanded, getDragOverrides, getCodeValues]);
22702
+ }), [sequence, nodePathInfo, getIsExpanded, getCodeValues]);
22701
22703
  const style10 = useMemo121(() => {
22702
22704
  return {
22703
22705
  ...expandedSectionBase,
@@ -22810,15 +22812,8 @@ var TimelineLayerEye = ({ onInvoked, hidden, type }) => {
22810
22812
  };
22811
22813
 
22812
22814
  // src/components/Timeline/TimelineStack/index.tsx
22813
- import { SOURCE_MAP_ENDPOINT } from "@remotion/studio-shared";
22814
22815
  import { useCallback as useCallback110, useContext as useContext76, useMemo as useMemo122, useState as useState73 } from "react";
22815
- import { SourceMapConsumer as SourceMapConsumer3 } from "source-map";
22816
22816
  import { jsx as jsx210, jsxs as jsxs98, Fragment as Fragment31 } from "react/jsx-runtime";
22817
- var publicPath = window.remotion_publicPath === "/" ? "" : window.remotion_publicPath;
22818
- var withoutSlashInTheEnd = publicPath.endsWith("/") ? publicPath.slice(0, -1) : publicPath;
22819
- SourceMapConsumer3.initialize({
22820
- "lib/mappings.wasm": withoutSlashInTheEnd + SOURCE_MAP_ENDPOINT
22821
- });
22822
22817
  var TimelineStack = ({ isCompact, sequence, originalLocation }) => {
22823
22818
  const [stackHovered, setStackHovered] = useState73(false);
22824
22819
  const [titleHovered, setTitleHovered] = useState73(false);
@@ -22980,13 +22975,10 @@ var INDENT = 10;
22980
22975
  var TimelineListItem = ({ nestedDepth, sequence, isCompact, nodePathInfo }) => {
22981
22976
  const nodePath = nodePathInfo?.nodePath ?? null;
22982
22977
  const { previewServerState } = useContext77(StudioServerConnectionCtx);
22983
- const visualModeEnvEnabled = Boolean(process.env.EXPERIMENTAL_VISUAL_MODE_ENABLED);
22984
22978
  const previewConnected = previewServerState.type === "connected";
22985
- const visualModeActive = visualModeEnvEnabled && previewConnected;
22986
22979
  const { hidden, setHidden } = useContext77(Internals56.SequenceVisibilityToggleContext);
22987
22980
  const { getIsExpanded } = useContext77(ExpandedTracksGetterContext);
22988
22981
  const { toggleTrack } = useContext77(ExpandedTracksSetterContext);
22989
- const { getIsJsxInMapCallback } = useContext77(Internals56.VisualModeGettersContext);
22990
22982
  const originalLocation = useResolvedStack(sequence.stack ?? null);
22991
22983
  const validatedLocation = useMemo123(() => {
22992
22984
  if (!originalLocation || !originalLocation.source || !originalLocation.line) {
@@ -23005,8 +22997,8 @@ var TimelineListItem = ({ nestedDepth, sequence, isCompact, nodePathInfo }) => {
23005
22997
  if (!validatedLocation?.source || !nodePath) {
23006
22998
  return;
23007
22999
  }
23008
- if (getIsJsxInMapCallback(nodePath)) {
23009
- const message = "This sequence is rendered inside a .map() callback. Duplicating inserts another copy in that callback (affecting each list item). Continue?";
23000
+ if (nodePathInfo && nodePathInfo.numberOfSequencesWithThisNodePath > 1) {
23001
+ const message = "This sequence is programmatically duplicated " + nodePathInfo.numberOfSequencesWithThisNodePath + " times in the code. Duplicating inserts another copy. Continue?";
23010
23002
  if (!window.confirm(message)) {
23011
23003
  return;
23012
23004
  }
@@ -23024,13 +23016,13 @@ var TimelineListItem = ({ nestedDepth, sequence, isCompact, nodePathInfo }) => {
23024
23016
  } catch (err) {
23025
23017
  showNotification(err.message, 4000);
23026
23018
  }
23027
- }, [nodePath, validatedLocation?.source, getIsJsxInMapCallback]);
23019
+ }, [nodePath, validatedLocation?.source, nodePathInfo]);
23028
23020
  const onDeleteSequenceFromSource = useCallback111(async () => {
23029
23021
  if (!validatedLocation?.source || !nodePath) {
23030
23022
  return;
23031
23023
  }
23032
- if (getIsJsxInMapCallback(nodePath)) {
23033
- const message = "This sequence is rendered inside a .map() callback. Deleting removes all sequences in that callback. Continue?";
23024
+ if (nodePathInfo && nodePathInfo.numberOfSequencesWithThisNodePath > 1) {
23025
+ const message = "This sequence is programmatically duplicated " + nodePathInfo.numberOfSequencesWithThisNodePath + " times in the code. Deleting removes all instances. Continue?";
23034
23026
  if (!window.confirm(message)) {
23035
23027
  return;
23036
23028
  }
@@ -23048,9 +23040,9 @@ var TimelineListItem = ({ nestedDepth, sequence, isCompact, nodePathInfo }) => {
23048
23040
  } catch (err) {
23049
23041
  showNotification(err.message, 4000);
23050
23042
  }
23051
- }, [nodePath, validatedLocation?.source, getIsJsxInMapCallback]);
23043
+ }, [nodePath, validatedLocation?.source, nodePathInfo]);
23052
23044
  const contextMenuValues = useMemo123(() => {
23053
- if (!visualModeEnvEnabled) {
23045
+ if (!previewConnected) {
23054
23046
  return [];
23055
23047
  }
23056
23048
  return [
@@ -23094,9 +23086,9 @@ var TimelineListItem = ({ nestedDepth, sequence, isCompact, nodePathInfo }) => {
23094
23086
  duplicateDisabled,
23095
23087
  onDeleteSequenceFromSource,
23096
23088
  onDuplicateSequenceFromSource,
23097
- visualModeEnvEnabled
23089
+ previewConnected
23098
23090
  ]);
23099
- const isExpanded = visualModeActive && nodePathInfo !== null && getIsExpanded(nodePathInfo);
23091
+ const isExpanded = previewConnected && nodePathInfo !== null && getIsExpanded(nodePathInfo);
23100
23092
  const onToggleExpand = useCallback111(() => {
23101
23093
  if (nodePathInfo === null) {
23102
23094
  return;
@@ -23147,7 +23139,7 @@ var TimelineListItem = ({ nestedDepth, sequence, isCompact, nodePathInfo }) => {
23147
23139
  /* @__PURE__ */ jsx211(Padder, {
23148
23140
  depth: nestedDepth
23149
23141
  }),
23150
- visualModeActive ? hasExpandableContent ? /* @__PURE__ */ jsx211(TimelineExpandArrowButton, {
23142
+ previewConnected ? hasExpandableContent ? /* @__PURE__ */ jsx211(TimelineExpandArrowButton, {
23151
23143
  isExpanded,
23152
23144
  onClick: onToggleExpand,
23153
23145
  label: "track properties",
@@ -23163,11 +23155,11 @@ var TimelineListItem = ({ nestedDepth, sequence, isCompact, nodePathInfo }) => {
23163
23155
  });
23164
23156
  return /* @__PURE__ */ jsxs99(Fragment32, {
23165
23157
  children: [
23166
- visualModeEnvEnabled ? /* @__PURE__ */ jsx211(ContextMenu, {
23158
+ previewConnected ? /* @__PURE__ */ jsx211(ContextMenu, {
23167
23159
  values: contextMenuValues,
23168
23160
  children: trackRow
23169
23161
  }) : trackRow,
23170
- visualModeActive && isExpanded && hasExpandableContent && nodePathInfo ? /* @__PURE__ */ jsx211(TimelineExpandedSection, {
23162
+ previewConnected && isExpanded && hasExpandableContent && nodePathInfo ? /* @__PURE__ */ jsx211(TimelineExpandedSection, {
23171
23163
  sequence,
23172
23164
  originalLocation,
23173
23165
  nodePathInfo,
@@ -23521,7 +23513,7 @@ var TimelineScrollable = ({ children }) => {
23521
23513
  };
23522
23514
 
23523
23515
  // src/components/Timeline/TimelineTracks.tsx
23524
- import { useContext as useContext81, useMemo as useMemo128 } from "react";
23516
+ import React154, { useContext as useContext81, useMemo as useMemo128 } from "react";
23525
23517
  import { Internals as Internals61 } from "remotion";
23526
23518
 
23527
23519
  // src/components/Timeline/TimelineSequence.tsx
@@ -23644,268 +23636,15 @@ var useMaxMediaDuration = (s, fps) => {
23644
23636
 
23645
23637
  // src/components/AudioWaveform.tsx
23646
23638
  import {
23639
+ drawBars,
23647
23640
  getLoopDisplayWidth,
23648
- shouldTileLoopDisplay
23641
+ loadWaveformPeaks,
23642
+ makeAudioWaveformWorker,
23643
+ shouldTileLoopDisplay,
23644
+ sliceWaveformPeaks
23649
23645
  } from "@remotion/timeline-utils";
23650
23646
  import { useEffect as useEffect72, useMemo as useMemo125, useRef as useRef42, useState as useState75 } from "react";
23651
23647
  import { Internals as Internals59 } from "remotion";
23652
-
23653
- // src/make-audio-waveform-worker.ts
23654
- var makeAudioWaveformWorker = () => {
23655
- return new Worker(new URL("./audio-waveform-worker.mjs", import.meta.url), {
23656
- type: "module"
23657
- });
23658
- };
23659
-
23660
- // src/components/parse-color.ts
23661
- var colorCache = new Map;
23662
- var parseColor = (color) => {
23663
- const cached = colorCache.get(color);
23664
- if (cached)
23665
- return cached;
23666
- const ctx = new OffscreenCanvas(1, 1).getContext("2d");
23667
- ctx.fillStyle = color;
23668
- ctx.fillRect(0, 0, 1, 1);
23669
- const [r, g, b, a] = ctx.getImageData(0, 0, 1, 1).data;
23670
- const result = [r, g, b, a];
23671
- colorCache.set(color, result);
23672
- return result;
23673
- };
23674
-
23675
- // src/components/draw-peaks.ts
23676
- var CLIPPING_COLOR = "#FF7F50";
23677
- var drawBars = (canvas, peaks, color, volume, width) => {
23678
- const ctx = canvas.getContext("2d");
23679
- if (!ctx) {
23680
- throw new Error("Failed to get canvas context");
23681
- }
23682
- const { height } = canvas;
23683
- const w = canvas.width;
23684
- if (w === 0 || height === 0) {
23685
- return;
23686
- }
23687
- ctx.clearRect(0, 0, w, height);
23688
- if (volume === 0)
23689
- return;
23690
- const [r, g, b, a] = parseColor(color);
23691
- const [cr, cg, cb, ca] = parseColor(CLIPPING_COLOR);
23692
- const imageData = ctx.createImageData(w, height);
23693
- const { data } = imageData;
23694
- const numBars = width;
23695
- for (let barIndex = 0;barIndex < numBars; barIndex++) {
23696
- const x = barIndex;
23697
- if (x >= w)
23698
- break;
23699
- const peakIndex = Math.floor(barIndex / numBars * peaks.length);
23700
- const peak = peaks[peakIndex] || 0;
23701
- const scaledPeak = peak * volume;
23702
- const halfBar = Math.max(0, Math.min(height / 2, scaledPeak * height / 2));
23703
- if (halfBar === 0)
23704
- continue;
23705
- const mid = height / 2;
23706
- const barY = Math.round(mid - halfBar);
23707
- const barEnd = Math.round(mid + halfBar);
23708
- const isClipping = scaledPeak > 1;
23709
- const clipTopEnd = isClipping ? Math.min(barY + 2, barEnd) : barY;
23710
- const clipBotStart = isClipping ? Math.max(barEnd - 2, barY) : barEnd;
23711
- for (let y = barY;y < clipTopEnd; y++) {
23712
- const idx = (y * w + x) * 4;
23713
- data[idx] = cr;
23714
- data[idx + 1] = cg;
23715
- data[idx + 2] = cb;
23716
- data[idx + 3] = ca;
23717
- }
23718
- for (let y = clipTopEnd;y < clipBotStart; y++) {
23719
- const idx = (y * w + x) * 4;
23720
- data[idx] = r;
23721
- data[idx + 1] = g;
23722
- data[idx + 2] = b;
23723
- data[idx + 3] = a;
23724
- }
23725
- for (let y = clipBotStart;y < barEnd; y++) {
23726
- const idx = (y * w + x) * 4;
23727
- data[idx] = cr;
23728
- data[idx + 1] = cg;
23729
- data[idx + 2] = cb;
23730
- data[idx + 3] = ca;
23731
- }
23732
- }
23733
- ctx.putImageData(imageData, 0, 0);
23734
- };
23735
-
23736
- // src/components/load-waveform-peaks.ts
23737
- import { ALL_FORMATS as ALL_FORMATS3, AudioSampleSink, Input as Input3, UrlSource as UrlSource3 } from "mediabunny";
23738
-
23739
- // src/components/waveform-peak-processor.ts
23740
- var emitWaveformProgress = ({
23741
- completedPeaks,
23742
- final,
23743
- onProgress,
23744
- peaks,
23745
- totalPeaks
23746
- }) => {
23747
- onProgress?.({
23748
- peaks,
23749
- completedPeaks,
23750
- totalPeaks,
23751
- final
23752
- });
23753
- };
23754
- var createWaveformPeakProcessor = ({
23755
- totalPeaks,
23756
- samplesPerPeak,
23757
- onProgress,
23758
- progressIntervalInMs,
23759
- now
23760
- }) => {
23761
- const peaks = new Float32Array(totalPeaks);
23762
- let peakIndex = 0;
23763
- let peakMax = 0;
23764
- let sampleInPeak = 0;
23765
- let lastProgressAt = 0;
23766
- let lastProgressPeak = 0;
23767
- const emitProgress = (force) => {
23768
- const timestamp = now();
23769
- if (!force && peakIndex === lastProgressPeak && sampleInPeak === 0) {
23770
- return;
23771
- }
23772
- if (!force && timestamp - lastProgressAt < progressIntervalInMs) {
23773
- return;
23774
- }
23775
- lastProgressAt = timestamp;
23776
- lastProgressPeak = peakIndex;
23777
- emitWaveformProgress({
23778
- peaks,
23779
- completedPeaks: peakIndex,
23780
- totalPeaks,
23781
- final: force,
23782
- onProgress
23783
- });
23784
- };
23785
- return {
23786
- peaks,
23787
- processSampleChunk: (floats, channels) => {
23788
- const frameCount = Math.floor(floats.length / Math.max(1, channels));
23789
- for (let frame2 = 0;frame2 < frameCount; frame2++) {
23790
- let framePeak = 0;
23791
- for (let channel = 0;channel < channels; channel++) {
23792
- const sampleIndex = frame2 * channels + channel;
23793
- const abs = Math.abs(floats[sampleIndex] ?? 0);
23794
- if (abs > framePeak) {
23795
- framePeak = abs;
23796
- }
23797
- }
23798
- if (framePeak > peakMax) {
23799
- peakMax = framePeak;
23800
- }
23801
- sampleInPeak++;
23802
- if (sampleInPeak >= samplesPerPeak) {
23803
- if (peakIndex < totalPeaks) {
23804
- peaks[peakIndex] = peakMax;
23805
- }
23806
- peakIndex++;
23807
- peakMax = 0;
23808
- sampleInPeak = 0;
23809
- }
23810
- }
23811
- emitProgress(false);
23812
- },
23813
- finalize: () => {
23814
- if (sampleInPeak > 0 && peakIndex < totalPeaks) {
23815
- peaks[peakIndex] = peakMax;
23816
- peakIndex++;
23817
- }
23818
- emitProgress(true);
23819
- }
23820
- };
23821
- };
23822
-
23823
- // src/components/load-waveform-peaks.ts
23824
- var TARGET_SAMPLE_RATE = 100;
23825
- var DEFAULT_PROGRESS_INTERVAL_IN_MS = 50;
23826
- var peaksCache = new Map;
23827
- async function loadWaveformPeaks(url, signal, options) {
23828
- const cached = peaksCache.get(url);
23829
- if (cached) {
23830
- emitWaveformProgress({
23831
- peaks: cached,
23832
- completedPeaks: cached.length,
23833
- totalPeaks: cached.length,
23834
- final: true,
23835
- onProgress: options?.onProgress
23836
- });
23837
- return cached;
23838
- }
23839
- const input2 = new Input3({
23840
- formats: ALL_FORMATS3,
23841
- source: new UrlSource3(url)
23842
- });
23843
- try {
23844
- const audioTrack = await input2.getPrimaryAudioTrack();
23845
- if (!audioTrack) {
23846
- return new Float32Array(0);
23847
- }
23848
- if (await audioTrack.isLive()) {
23849
- throw new Error("Live streams are not currently supported by Remotion. Sorry! Source: " + url);
23850
- }
23851
- if (await audioTrack.isRelativeToUnixEpoch()) {
23852
- throw new Error("Streams with UNIX timestamps are not currently supported by Remotion. Sorry! Source: " + url);
23853
- }
23854
- const sampleRate = await audioTrack.getSampleRate();
23855
- const durationInSeconds = await audioTrack.getDurationFromMetadata({ skipLiveWait: true }) ?? await audioTrack.computeDuration({ skipLiveWait: true });
23856
- const totalPeaks = Math.ceil(durationInSeconds * TARGET_SAMPLE_RATE);
23857
- const samplesPerPeak = Math.max(1, Math.floor(sampleRate / TARGET_SAMPLE_RATE));
23858
- const sink = new AudioSampleSink(audioTrack);
23859
- const processor = createWaveformPeakProcessor({
23860
- totalPeaks,
23861
- samplesPerPeak,
23862
- onProgress: options?.onProgress,
23863
- progressIntervalInMs: options?.progressIntervalInMs ?? DEFAULT_PROGRESS_INTERVAL_IN_MS,
23864
- now: () => Date.now()
23865
- });
23866
- for await (const sample of sink.samples()) {
23867
- if (signal.aborted) {
23868
- sample.close();
23869
- return new Float32Array(0);
23870
- }
23871
- const bytesNeeded = sample.allocationSize({
23872
- format: "f32",
23873
- planeIndex: 0
23874
- });
23875
- const floats = new Float32Array(bytesNeeded / 4);
23876
- sample.copyTo(floats, { format: "f32", planeIndex: 0 });
23877
- const channels = Math.max(1, sample.numberOfChannels);
23878
- sample.close();
23879
- processor.processSampleChunk(floats, channels);
23880
- }
23881
- processor.finalize();
23882
- const { peaks } = processor;
23883
- peaksCache.set(url, peaks);
23884
- return peaks;
23885
- } finally {
23886
- input2.dispose();
23887
- }
23888
- }
23889
-
23890
- // src/components/slice-waveform-peaks.ts
23891
- var sliceWaveformPeaks = ({
23892
- durationInFrames,
23893
- fps,
23894
- peaks,
23895
- playbackRate,
23896
- startFrom
23897
- }) => {
23898
- if (peaks.length === 0) {
23899
- return peaks;
23900
- }
23901
- const startTimeInSeconds = startFrom / fps;
23902
- const durationInSeconds = durationInFrames / fps * playbackRate;
23903
- const startPeakIndex = Math.floor(startTimeInSeconds * TARGET_SAMPLE_RATE);
23904
- const endPeakIndex = Math.ceil((startTimeInSeconds + durationInSeconds) * TARGET_SAMPLE_RATE);
23905
- return peaks.subarray(Math.max(0, startPeakIndex), Math.min(peaks.length, endPeakIndex));
23906
- };
23907
-
23908
- // src/components/AudioWaveform.tsx
23909
23648
  import { jsx as jsx214, jsxs as jsxs101 } from "react/jsx-runtime";
23910
23649
  var EMPTY_PEAKS = new Float32Array(0);
23911
23650
  var canRetryCanvasTransfer = (err) => {
@@ -23954,7 +23693,13 @@ var drawLoopedWaveform = ({
23954
23693
  const targetCanvas = document.createElement("canvas");
23955
23694
  targetCanvas.width = Math.max(1, Math.ceil(loopWidth));
23956
23695
  targetCanvas.height = h;
23957
- drawBars(targetCanvas, peaks, "rgba(255, 255, 255, 0.6)", volume, targetCanvas.width);
23696
+ drawBars({
23697
+ canvas: targetCanvas,
23698
+ peaks,
23699
+ color: "rgba(255, 255, 255, 0.6)",
23700
+ volume,
23701
+ width: targetCanvas.width
23702
+ });
23958
23703
  canvas.width = w;
23959
23704
  canvas.height = h;
23960
23705
  const ctx = canvas.getContext("2d");
@@ -24117,7 +23862,13 @@ var AudioWaveform = ({
24117
23862
  })
24118
23863
  });
24119
23864
  } else {
24120
- drawBars(canvasElement, portionPeaks ?? EMPTY_PEAKS, "rgba(255, 255, 255, 0.6)", vol, w);
23865
+ drawBars({
23866
+ canvas: canvasElement,
23867
+ peaks: portionPeaks ?? EMPTY_PEAKS,
23868
+ color: "rgba(255, 255, 255, 0.6)",
23869
+ volume: vol,
23870
+ width: w
23871
+ });
24121
23872
  }
24122
23873
  }, [
24123
23874
  canUseWorkerPath,
@@ -24613,7 +24364,7 @@ var TimelineSequenceFn = ({ s }) => {
24613
24364
  if (windowWidth === null) {
24614
24365
  return null;
24615
24366
  }
24616
- return /* @__PURE__ */ jsx220(Inner4, {
24367
+ return /* @__PURE__ */ jsx220(TimelineSequenceInner, {
24617
24368
  windowWidth,
24618
24369
  s
24619
24370
  });
@@ -24690,7 +24441,7 @@ var TimelineSequenceCurrentFrame = ({
24690
24441
  ]
24691
24442
  });
24692
24443
  };
24693
- var Inner4 = ({ s, windowWidth }) => {
24444
+ var TimelineSequenceInner = ({ s, windowWidth }) => {
24694
24445
  const video = Internals60.useVideo();
24695
24446
  const maxMediaDuration = useMaxMediaDuration(s, video?.fps ?? 30);
24696
24447
  const effectiveMaxMediaDuration = s.loopDisplay ? null : maxMediaDuration;
@@ -24788,22 +24539,20 @@ var getExpandedPlaceholderStyle = ({
24788
24539
  sequence,
24789
24540
  nodePathInfo,
24790
24541
  getIsExpanded,
24791
- getDragOverrides,
24792
24542
  getCodeValues
24793
24543
  }) => ({
24794
24544
  height: getExpandedTrackHeight({
24795
24545
  sequence,
24796
24546
  nodePathInfo,
24797
24547
  getIsExpanded,
24798
- getDragOverrides,
24799
24548
  getCodeValues
24800
24549
  }) + TIMELINE_ITEM_BORDER_BOTTOM
24801
24550
  });
24802
- var TimelineTracks = ({ timeline, hasBeenCut }) => {
24551
+ var TimelineTracksInner = ({ timeline, hasBeenCut }) => {
24803
24552
  const { getIsExpanded } = useContext81(ExpandedTracksGetterContext);
24804
24553
  const { previewServerState } = useContext81(StudioServerConnectionCtx);
24805
- const { getDragOverrides, getCodeValues } = useContext81(Internals61.VisualModeGettersContext);
24806
- const visualModeEnabled = Boolean(process.env.EXPERIMENTAL_VISUAL_MODE_ENABLED) && previewServerState.type === "connected";
24554
+ const { getCodeValues } = useContext81(Internals61.VisualModeCodeValuesContext);
24555
+ const previewServerConnected = previewServerState.type === "connected";
24807
24556
  const timelineStyle = useMemo128(() => {
24808
24557
  return {
24809
24558
  ...timelineContent,
@@ -24833,12 +24582,11 @@ var TimelineTracks = ({ timeline, hasBeenCut }) => {
24833
24582
  s: track.sequence
24834
24583
  })
24835
24584
  }),
24836
- visualModeEnabled && isExpanded && track.nodePathInfo ? /* @__PURE__ */ jsx221("div", {
24585
+ isExpanded && track.nodePathInfo && previewServerConnected ? /* @__PURE__ */ jsx221("div", {
24837
24586
  style: getExpandedPlaceholderStyle({
24838
24587
  sequence: track.sequence,
24839
24588
  nodePathInfo: track.nodePathInfo,
24840
24589
  getIsExpanded,
24841
- getDragOverrides,
24842
24590
  getCodeValues
24843
24591
  })
24844
24592
  }) : null
@@ -24851,6 +24599,7 @@ var TimelineTracks = ({ timeline, hasBeenCut }) => {
24851
24599
  ]
24852
24600
  });
24853
24601
  };
24602
+ var TimelineTracks = React154.memo(TimelineTracksInner);
24854
24603
 
24855
24604
  // src/components/Timeline/Timeline.tsx
24856
24605
  import { jsx as jsx222, jsxs as jsxs107 } from "react/jsx-runtime";
@@ -24885,15 +24634,16 @@ var TimelineInner = () => {
24885
24634
  const filtered = useMemo129(() => {
24886
24635
  return timeline.filter((t) => !isTrackHidden(t) && t.sequence.from <= durationInFrames && t.sequence.duration > 0 && t.sequence.showInTimeline);
24887
24636
  }, [durationInFrames, timeline]);
24888
- const shown = filtered.slice(0, MAX_TIMELINE_TRACKS);
24637
+ const shown = useMemo129(() => {
24638
+ return filtered.length > MAX_TIMELINE_TRACKS ? filtered.slice(0, MAX_TIMELINE_TRACKS) : filtered;
24639
+ }, [filtered]);
24889
24640
  const hasBeenCut = filtered.length > shown.length;
24890
- const visualModeEnvEnabled = Boolean(process.env.EXPERIMENTAL_VISUAL_MODE_ENABLED);
24891
24641
  return /* @__PURE__ */ jsxs107("div", {
24892
24642
  ref: timelineVerticalScroll,
24893
24643
  style: container43,
24894
24644
  className: "css-reset " + VERTICAL_SCROLLBAR_CLASSNAME,
24895
24645
  children: [
24896
- visualModeEnvEnabled ? sequences.map((sequence) => {
24646
+ sequences.map((sequence) => {
24897
24647
  if (!sequence.controls || !previewConnected || !sequence.stack) {
24898
24648
  return null;
24899
24649
  }
@@ -24902,7 +24652,7 @@ var TimelineInner = () => {
24902
24652
  schema: sequence.controls.schema,
24903
24653
  stack: sequence.stack
24904
24654
  }, sequence.id);
24905
- }) : null,
24655
+ }),
24906
24656
  /* @__PURE__ */ jsx222(SequencePropsObserver, {}),
24907
24657
  /* @__PURE__ */ jsxs107(TimelineWidthProvider, {
24908
24658
  children: [
@@ -26376,7 +26126,7 @@ var isValidJSON = (value) => {
26376
26126
  return false;
26377
26127
  }
26378
26128
  };
26379
- var Inner5 = () => {
26129
+ var Inner = () => {
26380
26130
  const [value, setValue] = useState80(() => {
26381
26131
  const override = Internals68.getInputPropsOverride();
26382
26132
  if (override) {
@@ -26458,7 +26208,7 @@ var Inner5 = () => {
26458
26208
  };
26459
26209
  var OverrideInputPropsModal = () => {
26460
26210
  return /* @__PURE__ */ jsx237(DismissableModal, {
26461
- children: /* @__PURE__ */ jsx237(Inner5, {})
26211
+ children: /* @__PURE__ */ jsx237(Inner, {})
26462
26212
  });
26463
26213
  };
26464
26214
 
@@ -27239,7 +26989,7 @@ var KeyboardShortcutsExplainer = () => {
27239
26989
  };
27240
26990
 
27241
26991
  // src/components/QuickSwitcher/algolia-search.ts
27242
- import { NoReactInternals as NoReactInternals15 } from "remotion/no-react";
26992
+ import { NoReactInternals as NoReactInternals16 } from "remotion/no-react";
27243
26993
  var ALGOLIA_API_KEY = "3e42dbd4f895fe93ff5cf40d860c4a85";
27244
26994
  var ALGOLIA_APPLICATION_ID = "PLSDUOL1CA";
27245
26995
  var AGOLIA_SEARCH_URL = "https://plsduol1ca-dsn.algolia.net/1/indexes/*/queries";
@@ -27281,7 +27031,7 @@ var algoliaSearch = async (query) => {
27281
27031
  window.open(hit.url);
27282
27032
  }
27283
27033
  };
27284
- }).filter(NoReactInternals15.truthy);
27034
+ }).filter(NoReactInternals16.truthy);
27285
27035
  };
27286
27036
  var splitMatchIntoTitleAndSubtitle = (match) => {
27287
27037
  const main = match.type === "content" ? match._highlightResult.content : match._highlightResult.hierarchy[match.type];
@@ -36141,14 +35891,13 @@ import { jsx as jsx308, jsxs as jsxs159 } from "react/jsx-runtime";
36141
35891
  var getServerDisconnectedDomElement = () => {
36142
35892
  return document.getElementById("server-disconnected-overlay");
36143
35893
  };
36144
- var StudioInner = ({ rootComponent, readOnly, visualModeEnabled }) => {
35894
+ var StudioInner = ({ rootComponent, readOnly }) => {
36145
35895
  return /* @__PURE__ */ jsx308(Internals76.CompositionManagerProvider, {
36146
35896
  onlyRenderComposition: null,
36147
35897
  currentCompositionMetadata: null,
36148
35898
  initialCompositions: [],
36149
35899
  initialCanvasContent: null,
36150
35900
  children: /* @__PURE__ */ jsx308(Internals76.RemotionRootContexts, {
36151
- visualModeEnabled,
36152
35901
  frameState: null,
36153
35902
  audioEnabled: window.remotion_audioEnabled,
36154
35903
  videoEnabled: window.remotion_videoEnabled,
@@ -36172,15 +35921,14 @@ var StudioInner = ({ rootComponent, readOnly, visualModeEnabled }) => {
36172
35921
  })
36173
35922
  });
36174
35923
  };
36175
- var Studio = ({ rootComponent, readOnly, visualModeEnabled }) => {
35924
+ var Studio = ({ rootComponent, readOnly }) => {
36176
35925
  useLayoutEffect5(() => {
36177
35926
  injectCSS();
36178
35927
  }, []);
36179
35928
  return /* @__PURE__ */ jsx308(FastRefreshProvider, {
36180
35929
  children: /* @__PURE__ */ jsx308(StudioInner, {
36181
35930
  rootComponent,
36182
- readOnly,
36183
- visualModeEnabled
35931
+ readOnly
36184
35932
  })
36185
35933
  });
36186
35934
  };