@remotion/studio 4.0.460 → 4.0.462

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 (86) 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/ExpandedTracksProvider.js +8 -3
  5. package/dist/components/MenuBuildIndicator.js +1 -1
  6. package/dist/components/MenuCompositionName.js +1 -0
  7. package/dist/components/RenderButton.js +1 -1
  8. package/dist/components/Timeline/SequencePropsObserver.js +1 -1
  9. package/dist/components/Timeline/SubscribeToNodePaths.d.ts +4 -3
  10. package/dist/components/Timeline/SubscribeToNodePaths.js +11 -1
  11. package/dist/components/Timeline/Timeline.js +11 -10
  12. package/dist/components/Timeline/TimelineBooleanField.d.ts +4 -4
  13. package/dist/components/Timeline/TimelineBooleanField.js +5 -5
  14. package/dist/components/Timeline/TimelineColorField.d.ts +11 -0
  15. package/dist/components/Timeline/TimelineColorField.js +181 -0
  16. package/dist/components/Timeline/TimelineDragHandler.js +37 -3
  17. package/dist/components/Timeline/TimelineEffectFieldRow.d.ts +11 -0
  18. package/dist/components/Timeline/TimelineEffectFieldRow.js +177 -0
  19. package/dist/components/Timeline/TimelineEnumField.d.ts +5 -5
  20. package/dist/components/Timeline/TimelineEnumField.js +7 -7
  21. package/dist/components/Timeline/TimelineExpandArrowButton.js +1 -1
  22. package/dist/components/Timeline/TimelineExpandedRow.d.ts +3 -3
  23. package/dist/components/Timeline/TimelineExpandedRow.js +8 -1
  24. package/dist/components/Timeline/TimelineExpandedSection.d.ts +2 -2
  25. package/dist/components/Timeline/TimelineExpandedSection.js +8 -21
  26. package/dist/components/Timeline/TimelineFieldRow.d.ts +3 -3
  27. package/dist/components/Timeline/TimelineFieldRow.js +65 -26
  28. package/dist/components/Timeline/TimelineHeightContainer.d.ts +1 -1
  29. package/dist/components/Timeline/TimelineHeightContainer.js +36 -3
  30. package/dist/components/Timeline/TimelineListItem.js +20 -18
  31. package/dist/components/Timeline/TimelineNumberField.d.ts +5 -5
  32. package/dist/components/Timeline/TimelineNumberField.js +12 -10
  33. package/dist/components/Timeline/TimelineRotationField.d.ts +5 -5
  34. package/dist/components/Timeline/TimelineRotationField.js +10 -10
  35. package/dist/components/Timeline/TimelineSchemaField.d.ts +11 -7
  36. package/dist/components/Timeline/TimelineSchemaField.js +27 -21
  37. package/dist/components/Timeline/TimelineSequence.js +2 -2
  38. package/dist/components/Timeline/TimelineSlider.js +2 -2
  39. package/dist/components/Timeline/TimelineStack/get-stack.js +17 -31
  40. package/dist/components/Timeline/TimelineStack/index.js +0 -10
  41. package/dist/components/Timeline/TimelineTimeIndicators.js +2 -2
  42. package/dist/components/Timeline/TimelineTracks.d.ts +1 -1
  43. package/dist/components/Timeline/TimelineTracks.js +42 -12
  44. package/dist/components/Timeline/TimelineTranslateField.d.ts +5 -5
  45. package/dist/components/Timeline/TimelineTranslateField.js +21 -37
  46. package/dist/components/Timeline/sequence-props-subscription-store.d.ts +2 -1
  47. package/dist/components/Timeline/sequence-props-subscription-store.js +11 -5
  48. package/dist/components/Timeline/use-sequence-props-subscription.d.ts +2 -1
  49. package/dist/components/Timeline/use-sequence-props-subscription.js +6 -4
  50. package/dist/components/Timeline/use-timeline-height.js +5 -14
  51. package/dist/error-overlay/react-overlay/utils/get-source-map.d.ts +3 -3
  52. package/dist/error-overlay/react-overlay/utils/get-source-map.js +5 -5
  53. package/dist/error-overlay/react-overlay/utils/unmapper.d.ts +0 -6
  54. package/dist/error-overlay/react-overlay/utils/unmapper.js +8 -1
  55. package/dist/esm/{chunk-nrgs0ad5.js → chunk-yvg1f56k.js} +4168 -3948
  56. package/dist/esm/index.mjs +20 -8
  57. package/dist/esm/internals.mjs +4168 -3948
  58. package/dist/esm/previewEntry.mjs +2913 -2705
  59. package/dist/esm/renderEntry.mjs +2 -5
  60. package/dist/helpers/calculate-timeline.js +34 -4
  61. package/dist/helpers/get-timeline-sequence-sort-key.d.ts +4 -2
  62. package/dist/helpers/timeline-layout.d.ts +11 -15
  63. package/dist/helpers/timeline-layout.js +36 -28
  64. package/dist/icons/eyedropper.d.ts +4 -0
  65. package/dist/icons/eyedropper.js +6 -0
  66. package/dist/internals.d.ts +0 -1
  67. package/dist/previewEntry.js +1 -1
  68. package/dist/renderEntry.js +3 -3
  69. package/package.json +14 -24
  70. package/dist/audio-waveform-worker.d.ts +0 -1
  71. package/dist/audio-waveform-worker.js +0 -102
  72. package/dist/components/audio-waveform-worker-types.d.ts +0 -28
  73. package/dist/components/audio-waveform-worker-types.js +0 -2
  74. package/dist/components/draw-peaks.d.ts +0 -1
  75. package/dist/components/draw-peaks.js +0 -68
  76. package/dist/components/load-waveform-peaks.d.ts +0 -13
  77. package/dist/components/load-waveform-peaks.js +0 -76
  78. package/dist/components/parse-color.d.ts +0 -1
  79. package/dist/components/parse-color.js +0 -17
  80. package/dist/components/slice-waveform-peaks.d.ts +0 -7
  81. package/dist/components/slice-waveform-peaks.js +0 -15
  82. package/dist/components/waveform-peak-processor.d.ts +0 -23
  83. package/dist/components/waveform-peak-processor.js +0 -77
  84. package/dist/esm/audio-waveform-worker.mjs +0 -346
  85. package/dist/make-audio-waveform-worker.d.ts +0 -1
  86. package/dist/make-audio-waveform-worker.js +0 -10
@@ -23,7 +23,7 @@ const containerStyle = {
23
23
  display: 'flex',
24
24
  gap: 4,
25
25
  };
26
- const TimelineTranslateField = ({ field, codeValue, effectiveValue, canUpdate, onSave, onDragValueChange, onDragEnd, }) => {
26
+ const TimelineTranslateField = ({ field, propStatus, effectiveValue, onSave, onDragValueChange, onDragEnd, }) => {
27
27
  var _a;
28
28
  const [dragX, setDragX] = (0, react_1.useState)(null);
29
29
  const [dragY, setDragY] = (0, react_1.useState)(null);
@@ -41,13 +41,13 @@ const TimelineTranslateField = ({ field, codeValue, effectiveValue, canUpdate, o
41
41
  const onXChange = (0, react_1.useCallback)((newVal) => {
42
42
  setDragX(newVal);
43
43
  const currentY = dragY !== null && dragY !== void 0 ? dragY : codeY;
44
- onDragValueChange(field.key, makeString(newVal, currentY));
45
- }, [onDragValueChange, field.key, dragY, codeY, makeString]);
44
+ onDragValueChange(makeString(newVal, currentY));
45
+ }, [onDragValueChange, dragY, codeY, makeString]);
46
46
  const onXChangeEnd = (0, react_1.useCallback)((newVal) => {
47
47
  const currentY = dragY !== null && dragY !== void 0 ? dragY : codeY;
48
48
  const newStr = makeString(newVal, currentY);
49
- if (canUpdate && newStr !== codeValue) {
50
- onSave(field.key, newStr).finally(() => {
49
+ if (propStatus.canUpdate && newStr !== propStatus.codeValue) {
50
+ onSave(newStr).finally(() => {
51
51
  setDragX(null);
52
52
  onDragEnd();
53
53
  });
@@ -56,40 +56,33 @@ const TimelineTranslateField = ({ field, codeValue, effectiveValue, canUpdate, o
56
56
  setDragX(null);
57
57
  onDragEnd();
58
58
  }
59
- }, [
60
- dragY,
61
- codeY,
62
- makeString,
63
- canUpdate,
64
- codeValue,
65
- onSave,
66
- field.key,
67
- onDragEnd,
68
- ]);
59
+ }, [dragY, codeY, makeString, propStatus, onSave, onDragEnd]);
69
60
  const onXTextChange = (0, react_1.useCallback)((newVal) => {
70
- if (canUpdate) {
61
+ if (propStatus.canUpdate) {
71
62
  const parsed = Number(newVal);
72
63
  if (!Number.isNaN(parsed)) {
73
64
  const currentY = dragY !== null && dragY !== void 0 ? dragY : codeY;
74
65
  const newStr = makeString(parsed, currentY);
75
- if (newStr !== codeValue) {
66
+ if (newStr !== propStatus.codeValue) {
76
67
  setDragX(parsed);
77
- onSave(field.key, newStr);
68
+ onSave(newStr).finally(() => {
69
+ setDragX(null);
70
+ });
78
71
  }
79
72
  }
80
73
  }
81
- }, [canUpdate, dragY, codeY, makeString, codeValue, onSave, field.key]);
74
+ }, [propStatus, dragY, codeY, makeString, onSave]);
82
75
  // --- Y callbacks ---
83
76
  const onYChange = (0, react_1.useCallback)((newVal) => {
84
77
  setDragY(newVal);
85
78
  const currentX = dragX !== null && dragX !== void 0 ? dragX : codeX;
86
- onDragValueChange(field.key, makeString(currentX, newVal));
87
- }, [onDragValueChange, field.key, dragX, codeX, makeString]);
79
+ onDragValueChange(makeString(currentX, newVal));
80
+ }, [onDragValueChange, dragX, codeX, makeString]);
88
81
  const onYChangeEnd = (0, react_1.useCallback)((newVal) => {
89
82
  const currentX = dragX !== null && dragX !== void 0 ? dragX : codeX;
90
83
  const newStr = makeString(currentX, newVal);
91
- if (canUpdate && newStr !== codeValue) {
92
- onSave(field.key, newStr).finally(() => {
84
+ if (propStatus.canUpdate && newStr !== propStatus.codeValue) {
85
+ onSave(newStr).finally(() => {
93
86
  setDragY(null);
94
87
  onDragEnd();
95
88
  });
@@ -98,31 +91,22 @@ const TimelineTranslateField = ({ field, codeValue, effectiveValue, canUpdate, o
98
91
  setDragY(null);
99
92
  onDragEnd();
100
93
  }
101
- }, [
102
- dragX,
103
- codeX,
104
- makeString,
105
- canUpdate,
106
- codeValue,
107
- onSave,
108
- field.key,
109
- onDragEnd,
110
- ]);
94
+ }, [dragX, codeX, makeString, propStatus, onSave, onDragEnd]);
111
95
  const onYTextChange = (0, react_1.useCallback)((newVal) => {
112
- if (canUpdate) {
96
+ if (propStatus.canUpdate) {
113
97
  const parsed = Number(newVal);
114
98
  if (!Number.isNaN(parsed)) {
115
99
  const currentX = dragX !== null && dragX !== void 0 ? dragX : codeX;
116
100
  const newStr = makeString(currentX, parsed);
117
- if (newStr !== codeValue) {
101
+ if (newStr !== propStatus.codeValue) {
118
102
  setDragY(parsed);
119
- onSave(field.key, newStr).catch(() => {
103
+ onSave(newStr).finally(() => {
120
104
  setDragY(null);
121
105
  });
122
106
  }
123
107
  }
124
108
  }
125
- }, [canUpdate, onSave, field.key, codeValue, dragX, codeX, makeString]);
109
+ }, [propStatus, onSave, dragX, codeX, makeString]);
126
110
  return (jsx_runtime_1.jsxs("span", { style: containerStyle, children: [
127
111
  jsx_runtime_1.jsx(InputDragger_1.InputDragger, { type: "number", value: dragX !== null && dragX !== void 0 ? dragX : codeX, style: leftDraggerStyle, status: "ok", small: true, onValueChange: onXChange, onValueChangeEnd: onXChangeEnd, onTextChange: onXTextChange, min: -Infinity, max: Infinity, step: step, formatter: formatter, rightAlign: false }), jsx_runtime_1.jsx("div", { style: { marginLeft: -6, marginRight: -6 } }), jsx_runtime_1.jsx(InputDragger_1.InputDragger, { type: "number", value: dragY !== null && dragY !== void 0 ? dragY : codeY, style: rightDraggerStyle, status: "ok", small: true, onValueChange: onYChange, onValueChangeEnd: onYChangeEnd, onTextChange: onYTextChange, min: -Infinity, max: Infinity, step: step, formatter: formatter, rightAlign: false })
128
112
  ] }));
@@ -2,11 +2,12 @@ import type { SequenceSchema } from 'remotion';
2
2
  import { callApi } from '../call-api';
3
3
  type SubscribeResult = Awaited<ReturnType<typeof callApi<'/api/subscribe-to-sequence-props'>>>;
4
4
  type ApplyResult = (result: SubscribeResult) => void;
5
- export declare const acquireSequencePropsSubscription: ({ fileName, line, column, schema, clientId, applyOnce, applyEach, }: {
5
+ export declare const acquireSequencePropsSubscription: ({ fileName, line, column, schema, effects, clientId, applyOnce, applyEach, }: {
6
6
  fileName: string;
7
7
  line: number;
8
8
  column: number;
9
9
  schema: SequenceSchema;
10
+ effects: SequenceSchema[];
10
11
  clientId: string;
11
12
  applyOnce: ApplyResult;
12
13
  applyEach: ApplyResult;
@@ -1,19 +1,23 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.acquireSequencePropsSubscription = void 0;
4
+ const studio_shared_1 = require("@remotion/studio-shared");
4
5
  const remotion_1 = require("remotion");
5
6
  const call_api_1 = require("../call-api");
6
- const makeKey = (fileName, line, column) => `${fileName}\0${line}\0${column}`;
7
+ const makeKey = (fileName, line, column, sequenceKeys, effectKeys) => `${fileName}\0${line}\0${column}\0${sequenceKeys.join('\0')}\0${effectKeys.map((keys) => keys.join('\0')).join('\0\0')}`;
7
8
  const entries = new Map();
8
- const acquireSequencePropsSubscription = ({ fileName, line, column, schema, clientId, applyOnce, applyEach, }) => {
9
- const key = makeKey(fileName, line, column);
9
+ const acquireSequencePropsSubscription = ({ fileName, line, column, schema, effects, clientId, applyOnce, applyEach, }) => {
10
+ const sequenceKeys = (0, studio_shared_1.getAllSchemaKeys)(schema);
11
+ const effectKeys = effects.map((effect) => (0, studio_shared_1.getAllSchemaKeys)(effect));
12
+ const key = makeKey(fileName, line, column, sequenceKeys, effectKeys);
10
13
  let entry = entries.get(key);
11
14
  if (!entry) {
12
15
  const promise = (0, call_api_1.callApi)('/api/subscribe-to-sequence-props', {
13
16
  fileName,
14
17
  line,
15
18
  column,
16
- schema,
19
+ keys: (0, studio_shared_1.getAllSchemaKeys)(schema),
20
+ effects: effectKeys,
17
21
  clientId,
18
22
  });
19
23
  const created = {
@@ -65,13 +69,15 @@ const acquireSequencePropsSubscription = ({ fileName, line, column, schema, clie
65
69
  }
66
70
  acquired.promise
67
71
  .then((result) => {
68
- if (!result.canUpdate) {
72
+ if (!result.success) {
69
73
  return;
70
74
  }
71
75
  return (0, call_api_1.callApi)('/api/unsubscribe-from-sequence-props', {
72
76
  fileName: acquired.fileName,
73
77
  nodePath: result.nodePath,
74
78
  clientId: acquired.clientId,
79
+ sequenceKeys,
80
+ effectKeys,
75
81
  });
76
82
  })
77
83
  .catch(() => {
@@ -1,7 +1,8 @@
1
1
  import type { SequenceSchema } from 'remotion';
2
2
  import type { OriginalPosition } from '../../error-overlay/react-overlay/utils/get-source-map';
3
- export declare const useSequencePropsSubscription: ({ originalLocation, overrideId, schema, }: {
3
+ export declare const useSequencePropsSubscription: ({ originalLocation, overrideId, schema, effects, }: {
4
4
  overrideId: string;
5
5
  schema: SequenceSchema;
6
+ effects: SequenceSchema[];
6
7
  originalLocation: OriginalPosition | null;
7
8
  }) => void;
@@ -5,7 +5,7 @@ const react_1 = require("react");
5
5
  const remotion_1 = require("remotion");
6
6
  const client_id_1 = require("../../helpers/client-id");
7
7
  const sequence_props_subscription_store_1 = require("./sequence-props-subscription-store");
8
- const useSequencePropsSubscription = ({ originalLocation, overrideId, schema, }) => {
8
+ const useSequencePropsSubscription = ({ originalLocation, overrideId, schema, effects, }) => {
9
9
  var _a, _b, _c;
10
10
  const { setCodeValues } = (0, react_1.useContext)(remotion_1.Internals.VisualModeSettersContext);
11
11
  const { setOverrideIdToNodePath } = (0, react_1.useContext)(remotion_1.Internals.OverrideIdsToNodePathsSettersContext);
@@ -40,15 +40,16 @@ const useSequencePropsSubscription = ({ originalLocation, overrideId, schema, })
40
40
  line: locationLine,
41
41
  column: locationColumn,
42
42
  schema,
43
+ effects,
43
44
  clientId,
44
45
  applyOnce: (result) => {
45
- if (!result.canUpdate) {
46
+ if (!result.success) {
46
47
  return;
47
48
  }
48
- setCodeValues(result.nodePath, result);
49
+ setCodeValues(result.nodePath, () => result.status);
49
50
  },
50
51
  applyEach: (result) => {
51
- if (!result.canUpdate) {
52
+ if (!result.success) {
52
53
  return;
53
54
  }
54
55
  setOverrideIdToNodePath(overrideId, result.nodePath);
@@ -59,6 +60,7 @@ const useSequencePropsSubscription = ({ originalLocation, overrideId, schema, })
59
60
  };
60
61
  }, [
61
62
  clientId,
63
+ effects,
62
64
  locationColumn,
63
65
  locationLine,
64
66
  locationSource,
@@ -11,12 +11,11 @@ const TimelineTimeIndicators_1 = require("./TimelineTimeIndicators");
11
11
  const useTimelineHeight = ({ shown, hasBeenCut, }) => {
12
12
  const { getIsExpanded } = (0, react_1.useContext)(ExpandedTracksProvider_1.ExpandedTracksGetterContext);
13
13
  const { previewServerState } = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx);
14
- const { getDragOverrides, getCodeValues } = (0, react_1.useContext)(remotion_1.Internals.VisualModeGettersContext);
15
- const visualModeEnabled = Boolean(process.env.EXPERIMENTAL_VISUAL_MODE_ENABLED) &&
16
- previewServerState.type === 'connected';
14
+ const { codeValues } = (0, react_1.useContext)(remotion_1.Internals.VisualModeCodeValuesContext);
15
+ const previewServerConnected = previewServerState.type === 'connected';
17
16
  return (0, react_1.useMemo)(() => {
18
17
  const tracksHeight = shown.reduce((acc, track) => {
19
- const isExpanded = visualModeEnabled &&
18
+ const isExpanded = previewServerConnected &&
20
19
  track.nodePathInfo !== null &&
21
20
  getIsExpanded(track.nodePathInfo);
22
21
  const layerHeight = (0, timeline_layout_1.getTimelineLayerHeight)(track.sequence.type) +
@@ -26,8 +25,7 @@ const useTimelineHeight = ({ shown, hasBeenCut, }) => {
26
25
  sequence: track.sequence,
27
26
  nodePathInfo: track.nodePathInfo,
28
27
  getIsExpanded,
29
- getDragOverrides,
30
- getCodeValues,
28
+ codeValues,
31
29
  }) + timeline_layout_1.TIMELINE_ITEM_BORDER_BOTTOM
32
30
  : 0;
33
31
  return acc + layerHeight + expandedHeight;
@@ -36,13 +34,6 @@ const useTimelineHeight = ({ shown, hasBeenCut, }) => {
36
34
  timeline_layout_1.TIMELINE_ITEM_BORDER_BOTTOM +
37
35
  (hasBeenCut ? MaxTimelineTracks_1.MAX_TIMELINE_TRACKS_NOTICE_HEIGHT : 0) +
38
36
  TimelineTimeIndicators_1.TIMELINE_TIME_INDICATOR_HEIGHT);
39
- }, [
40
- shown,
41
- hasBeenCut,
42
- visualModeEnabled,
43
- getIsExpanded,
44
- getDragOverrides,
45
- getCodeValues,
46
- ]);
37
+ }, [shown, hasBeenCut, previewServerConnected, getIsExpanded, codeValues]);
47
38
  };
48
39
  exports.useTimelineHeight = useTimelineHeight;
@@ -1,4 +1,4 @@
1
- import { SourceMapConsumer } from 'source-map';
1
+ import { TraceMap } from '@jridgewell/trace-mapping';
2
2
  export type OriginalPosition = {
3
3
  line: number | null;
4
4
  column: number | null;
@@ -9,5 +9,5 @@ export type CodePosition = {
9
9
  column: number;
10
10
  source: string;
11
11
  };
12
- export declare const getOriginalPosition: (source_map: SourceMapConsumer, line: number, column: number) => OriginalPosition;
13
- export declare function getSourceMap(fileUri: string, fileContents: string): Promise<SourceMapConsumer | null>;
12
+ export declare const getOriginalPosition: (sourceMap: TraceMap, line: number, column: number) => OriginalPosition;
13
+ export declare function getSourceMap(fileUri: string, fileContents: string): Promise<TraceMap | null>;
@@ -5,9 +5,9 @@
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.getOriginalPosition = void 0;
7
7
  exports.getSourceMap = getSourceMap;
8
- const source_map_1 = require("source-map");
9
- const getOriginalPosition = (source_map, line, column) => {
10
- const result = source_map.originalPositionFor({
8
+ const trace_mapping_1 = require("@jridgewell/trace-mapping");
9
+ const getOriginalPosition = (sourceMap, line, column) => {
10
+ const result = (0, trace_mapping_1.originalPositionFor)(sourceMap, {
11
11
  line,
12
12
  column,
13
13
  });
@@ -42,10 +42,10 @@ async function getSourceMap(fileUri, fileContents) {
42
42
  throw new Error('Sorry, non-base64 inline source-map encoding is not supported.');
43
43
  }
44
44
  const converted = window.atob(sm.substring(match2[0].length));
45
- return new source_map_1.SourceMapConsumer(JSON.parse(converted));
45
+ return new trace_mapping_1.TraceMap(JSON.parse(converted));
46
46
  }
47
47
  const index = fileUri.lastIndexOf('/');
48
48
  const url = fileUri.substring(0, index + 1) + sm;
49
49
  const obj = await fetch(url).then((res) => res.json());
50
- return new source_map_1.SourceMapConsumer(obj);
50
+ return new trace_mapping_1.TraceMap(obj);
51
51
  }
@@ -1,9 +1,3 @@
1
- /**
2
- * Copyright (c) 2015-present, Facebook, Inc.
3
- *
4
- * This source code is licensed under the MIT license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- */
7
1
  import type { SomeStackFrame, SymbolicatedStackFrame } from '@remotion/studio-shared';
8
2
  export declare const getFileContents: (fileName: string) => Promise<string>;
9
3
  export declare const unmap: (frames: SomeStackFrame[], contextLines: number) => Promise<SymbolicatedStackFrame[]>;
@@ -4,6 +4,13 @@
4
4
  */
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.unmap = exports.getFileContents = void 0;
7
+ /**
8
+ * Copyright (c) 2015-present, Facebook, Inc.
9
+ *
10
+ * This source code is licensed under the MIT license found in the
11
+ * LICENSE file in the root directory of this source tree.
12
+ */
13
+ const trace_mapping_1 = require("@jridgewell/trace-mapping");
7
14
  const remotion_1 = require("remotion");
8
15
  const get_lines_around_1 = require("./get-lines-around");
9
16
  const get_source_map_1 = require("./get-source-map");
@@ -40,7 +47,7 @@ const unmap = async (frames, contextLines) => {
40
47
  const pos = (0, get_source_map_1.getOriginalPosition)(map, frame.frame.lineNumber, frame.frame.columnNumber);
41
48
  const { functionName } = frame.frame;
42
49
  let hasSource = null;
43
- hasSource = pos.source ? map.sourceContentFor(pos.source, false) : null;
50
+ hasSource = pos.source ? (0, trace_mapping_1.sourceContentFor)(map, pos.source) : null;
44
51
  const scriptCode = hasSource && pos.line
45
52
  ? (0, get_lines_around_1.getLinesAround)(pos.line, contextLines, hasSource.split('\n'))
46
53
  : null;