@remotion/studio 4.0.490 → 4.0.492

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 (120) hide show
  1. package/dist/components/AssetSelectorItem.js +7 -4
  2. package/dist/components/Canvas.js +2 -0
  3. package/dist/components/CompositionOrStillIcon.d.ts +7 -0
  4. package/dist/components/CompositionOrStillIcon.js +11 -0
  5. package/dist/components/CompositionSelector.js +13 -1
  6. package/dist/components/CompositionSelectorItem.js +33 -5
  7. package/dist/components/CurrentAsset.d.ts +6 -0
  8. package/dist/components/CurrentAsset.js +14 -8
  9. package/dist/components/CurrentComposition.js +4 -1
  10. package/dist/components/EditorContent.js +1 -1
  11. package/dist/components/GlobalKeybindings.d.ts +1 -3
  12. package/dist/components/GlobalKeybindings.js +2 -9
  13. package/dist/components/InlineEditableTitle.d.ts +1 -0
  14. package/dist/components/InlineEditableTitle.js +12 -7
  15. package/dist/components/InspectorInfoHeader.d.ts +1 -0
  16. package/dist/components/InspectorInfoHeader.js +7 -4
  17. package/dist/components/InspectorLocationCopy.d.ts +7 -0
  18. package/dist/components/InspectorLocationCopy.js +65 -0
  19. package/dist/components/InspectorPanel/SequenceCompositionsSection.d.ts +5 -0
  20. package/dist/components/InspectorPanel/SequenceCompositionsSection.js +37 -0
  21. package/dist/components/InspectorPanel/SequenceInspectorHeader.js +6 -4
  22. package/dist/components/InspectorPanel/SequenceSelectionInspector.js +2 -1
  23. package/dist/components/InspectorPanel/common.js +1 -1
  24. package/dist/components/InspectorPanel/get-compositions-matching-single-child.d.ts +6 -0
  25. package/dist/components/InspectorPanel/get-compositions-matching-single-child.js +11 -0
  26. package/dist/components/InspectorSequenceSection.js +57 -3
  27. package/dist/components/KeyboardShortcutsExplainer.js +4 -0
  28. package/dist/components/NewComposition/NewComposition.js +11 -4
  29. package/dist/components/NewComposition/get-new-composition-defaults.d.ts +4 -0
  30. package/dist/components/NewComposition/get-new-composition-defaults.js +13 -0
  31. package/dist/components/OptionsPanel.js +4 -8
  32. package/dist/components/OutlineToggle.d.ts +3 -1
  33. package/dist/components/OutlineToggle.js +2 -2
  34. package/dist/components/PreviewToolbar.js +1 -1
  35. package/dist/components/RenderButton.js +9 -33
  36. package/dist/components/RenderModal/WebRenderModal.js +3 -8
  37. package/dist/components/RenderModal/WebRenderModalAdvanced.d.ts +0 -2
  38. package/dist/components/RenderModal/WebRenderModalAdvanced.js +2 -9
  39. package/dist/components/RenderQueue/ClientRenderQueueProcessor.js +0 -2
  40. package/dist/components/RenderQueue/client-side-render-types.d.ts +0 -1
  41. package/dist/components/RenderQueue/index.js +0 -9
  42. package/dist/components/SelectedOutlineElement.js +40 -38
  43. package/dist/components/SelectedOutlineOverlay.d.ts +1 -1
  44. package/dist/components/SelectedOutlineOverlay.js +2 -13
  45. package/dist/components/SnappingToggle.d.ts +3 -1
  46. package/dist/components/SnappingToggle.js +2 -2
  47. package/dist/components/Timeline/TimelineAssetField.d.ts +14 -0
  48. package/dist/components/Timeline/TimelineAssetField.js +125 -0
  49. package/dist/components/Timeline/TimelineClipboardKeybindings.d.ts +20 -1
  50. package/dist/components/Timeline/TimelineClipboardKeybindings.js +301 -155
  51. package/dist/components/Timeline/TimelineEffectPropItem.js +7 -11
  52. package/dist/components/Timeline/TimelineExpandedSection.js +1 -0
  53. package/dist/components/Timeline/TimelineFieldLabel.d.ts +1 -0
  54. package/dist/components/Timeline/TimelineFieldLabel.js +7 -3
  55. package/dist/components/Timeline/TimelineFieldRowContent.d.ts +8 -0
  56. package/dist/components/Timeline/TimelineFieldRowContent.js +16 -0
  57. package/dist/components/Timeline/TimelineKeyframeControls.js +1 -0
  58. package/dist/components/Timeline/TimelinePrimitiveFieldValue.js +5 -1
  59. package/dist/components/Timeline/TimelineRowChrome.js +8 -4
  60. package/dist/components/Timeline/TimelineRowLayoutContext.d.ts +7 -0
  61. package/dist/components/Timeline/TimelineRowLayoutContext.js +13 -0
  62. package/dist/components/Timeline/TimelineSelection.js +1 -0
  63. package/dist/components/Timeline/TimelineSequence.js +2 -4
  64. package/dist/components/Timeline/TimelineSequenceItem.js +1 -0
  65. package/dist/components/Timeline/TimelineSequencePropItem.js +8 -10
  66. package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.d.ts +2 -0
  67. package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.js +18 -6
  68. package/dist/components/Timeline/TimelineTextContentField.js +12 -5
  69. package/dist/components/Timeline/TimelineVideoInfo.d.ts +3 -1
  70. package/dist/components/Timeline/TimelineVideoInfo.js +11 -4
  71. package/dist/components/Timeline/delete-selected-timeline-item.js +4 -5
  72. package/dist/components/Timeline/effects-clipboard.d.ts +14 -0
  73. package/dist/components/Timeline/effects-clipboard.js +68 -0
  74. package/dist/components/Timeline/get-sequence-context-menu-items.js +40 -3
  75. package/dist/components/Timeline/get-timeline-media-start-frame.d.ts +6 -0
  76. package/dist/components/Timeline/get-timeline-media-start-frame.js +15 -0
  77. package/dist/components/Timeline/sequence-props-subscription-store.d.ts +3 -2
  78. package/dist/components/Timeline/sequence-props-subscription-store.js +8 -2
  79. package/dist/components/Timeline/timeline-asset-link.d.ts +6 -0
  80. package/dist/components/Timeline/timeline-asset-link.js +27 -1
  81. package/dist/components/Timeline/timeline-field-display-utils.js +1 -0
  82. package/dist/components/Timeline/timeline-field-row-layout.d.ts +2 -1
  83. package/dist/components/Timeline/timeline-field-row-layout.js +10 -3
  84. package/dist/components/Timeline/timeline-row-layout.d.ts +4 -3
  85. package/dist/components/Timeline/timeline-row-layout.js +7 -6
  86. package/dist/components/Timeline/use-expanded-track-keyframe-rows.js +1 -0
  87. package/dist/components/Timeline/use-sequence-props-subscription.js +10 -1
  88. package/dist/components/Timeline/use-timeline-expanded-tree.d.ts +2 -1
  89. package/dist/components/Timeline/use-timeline-expanded-tree.js +3 -1
  90. package/dist/components/Timeline/use-timeline-height.js +1 -0
  91. package/dist/components/import-assets.d.ts +14 -2
  92. package/dist/components/import-assets.js +28 -7
  93. package/dist/components/root-composition-menu-items.d.ts +8 -0
  94. package/dist/components/root-composition-menu-items.js +45 -0
  95. package/dist/components/selected-outline-measurement.d.ts +4 -0
  96. package/dist/components/selected-outline-measurement.js +3 -1
  97. package/dist/components/selected-outline-types.d.ts +1 -6
  98. package/dist/esm/{chunk-16nwrbrm.js → chunk-ewx0568t.js} +7962 -7216
  99. package/dist/esm/index.mjs +0 -1
  100. package/dist/esm/internals.mjs +7962 -7216
  101. package/dist/esm/previewEntry.mjs +7332 -6586
  102. package/dist/esm/renderEntry.mjs +1 -1
  103. package/dist/helpers/format-file-location.d.ts +5 -0
  104. package/dist/helpers/format-file-location.js +9 -1
  105. package/dist/helpers/get-file-manager-name.d.ts +1 -0
  106. package/dist/helpers/get-file-manager-name.js +13 -0
  107. package/dist/helpers/retry-payload.js +0 -1
  108. package/dist/helpers/studio-runtime-config.d.ts +0 -1
  109. package/dist/helpers/studio-runtime-config.js +1 -6
  110. package/dist/helpers/timeline-layout.d.ts +2 -1
  111. package/dist/helpers/timeline-layout.js +5 -1
  112. package/dist/helpers/url-state.d.ts +1 -0
  113. package/dist/helpers/url-state.js +8 -6
  114. package/dist/helpers/use-menu-structure.js +19 -20
  115. package/dist/state/modals.d.ts +0 -1
  116. package/package.json +11 -11
  117. package/dist/components/RenderModal/WebRendererExperimentalBadge.d.ts +0 -1
  118. package/dist/components/RenderModal/WebRendererExperimentalBadge.js +0 -35
  119. package/dist/helpers/show-browser-rendering.d.ts +0 -1
  120. package/dist/helpers/show-browser-rendering.js +0 -5
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TimelineFieldRowContent = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const timeline_field_row_layout_1 = require("./timeline-field-row-layout");
6
+ const TimelineFieldLabel_1 = require("./TimelineFieldLabel");
7
+ const TimelineFieldRowContent = ({ field, rowDepth, selected, children }) => {
8
+ var _a;
9
+ const label = (jsx_runtime_1.jsx(TimelineFieldLabel_1.TimelineFieldLabel, { rowDepth: rowDepth, selected: selected, label: (_a = field.description) !== null && _a !== void 0 ? _a : field.key, stacked: field.typeName === 'text-content' }));
10
+ const value = jsx_runtime_1.jsx("div", { style: timeline_field_row_layout_1.timelineFieldValueColumnStyle, children: children });
11
+ if (field.typeName === 'text-content') {
12
+ return (jsx_runtime_1.jsxs("div", { style: timeline_field_row_layout_1.timelineStackedFieldContentStyle, children: [label, value] }));
13
+ }
14
+ return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [label, value] }));
15
+ };
16
+ exports.TimelineFieldRowContent = TimelineFieldRowContent;
@@ -114,6 +114,7 @@ const resolveKeyframeControlTarget = ({ nodePathInfo, tracks, propStatuses, getD
114
114
  getEffectDragOverrides,
115
115
  propStatuses,
116
116
  includeTextContent: false,
117
+ includeSourceControls: false,
117
118
  });
118
119
  const fieldNode = findFieldNode(tree, (0, timeline_node_path_key_1.timelineNodePathInfoToKey)(nodePathInfo));
119
120
  if (fieldNode === null || fieldNode.field === null) {
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.TimelinePrimitiveFieldValue = exports.isTimelinePrimitiveFieldInfo = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const TimelineAssetField_1 = require("./TimelineAssetField");
5
6
  const TimelineBooleanField_1 = require("./TimelineBooleanField");
6
7
  const TimelineColorField_1 = require("./TimelineColorField");
7
8
  const TimelineEnumField_1 = require("./TimelineEnumField");
@@ -55,11 +56,14 @@ const TimelinePrimitiveFieldValue = ({ field, onSave, onDragValueChange, onDragE
55
56
  return (jsx_runtime_1.jsx("span", { style: inlineWrapper, children: jsx_runtime_1.jsx(TimelineEnumField_1.TimelineEnumField, { effectiveValue: effectiveValue, field: field, onDragEnd: onDragEnd, onDragValueChange: onDragValueChange, onSave: onSave, propStatus: propStatus }) }));
56
57
  }
57
58
  if (field.typeName === 'text-content') {
58
- return (jsx_runtime_1.jsx("span", { style: inlineWrapper, children: jsx_runtime_1.jsx(TimelineTextContentField_1.TimelineTextContentField, { effectiveValue: effectiveValue, field: field, nodePath: scaleLockNodePath, onDragEnd: onDragEnd, onDragValueChange: onDragValueChange, onSave: onSave, propStatus: propStatus }) }));
59
+ return (jsx_runtime_1.jsx(TimelineTextContentField_1.TimelineTextContentField, { effectiveValue: effectiveValue, field: field, nodePath: scaleLockNodePath, onDragEnd: onDragEnd, onDragValueChange: onDragValueChange, onSave: onSave, propStatus: propStatus }));
59
60
  }
60
61
  if (field.typeName === 'font-family') {
61
62
  return (jsx_runtime_1.jsx("span", { style: inlineWrapper, children: jsx_runtime_1.jsx(TimelineFontFamilyField_1.TimelineFontFamilyField, { effectiveValue: effectiveValue, field: field, onDragEnd: onDragEnd, onDragValueChange: onDragValueChange, onSave: onSave, propStatus: propStatus }) }));
62
63
  }
64
+ if (field.typeName === 'asset') {
65
+ return (jsx_runtime_1.jsx("span", { style: inlineWrapper, children: jsx_runtime_1.jsx(TimelineAssetField_1.TimelineAssetField, { effectiveValue: effectiveValue, field: field, onDragEnd: onDragEnd, onDragValueChange: onDragValueChange, onSave: onSave, propStatus: propStatus }) }));
66
+ }
63
67
  throw new Error(`Unsupported field type: ${field.typeName}`);
64
68
  };
65
69
  exports.TimelinePrimitiveFieldValue = TimelinePrimitiveFieldValue;
@@ -6,6 +6,7 @@ const react_1 = require("react");
6
6
  const colors_1 = require("../../helpers/colors");
7
7
  const Padder_1 = require("./Padder");
8
8
  const timeline_row_layout_1 = require("./timeline-row-layout");
9
+ const TimelineRowLayoutContext_1 = require("./TimelineRowLayoutContext");
9
10
  const TimelineSelection_1 = require("./TimelineSelection");
10
11
  const rowBase = {
11
12
  alignItems: 'stretch',
@@ -25,19 +26,22 @@ const keyframeControlsColumnBaseStyle = {
25
26
  };
26
27
  const TimelineRowChrome = ({ depth, eye, keyframeControls, arrow, children, style, selected, selectable, selectionItem, onSelect, showSelectedBackground, containsSelection, outerHeight, onDragLeave, onDragOver, onDrop, onDoubleClick, }) => {
27
28
  const ref = (0, react_1.useRef)(null);
29
+ const { basePadding, keyframeControlsPadding } = (0, react_1.useContext)(TimelineRowLayoutContext_1.TimelineRowLayoutContext);
28
30
  const indentWidth = (0, timeline_row_layout_1.getTimelineRowIndentWidth)(depth);
29
31
  (0, TimelineSelection_1.useTimelineFocusableItem)(selectionItem, ref);
30
32
  const keyframeControlsColumnStyle = (0, react_1.useMemo)(() => ({
31
33
  ...keyframeControlsColumnBaseStyle,
32
- width: (0, timeline_row_layout_1.getTimelineRowLeftChromeWidth)(depth),
33
- }), [depth]);
34
+ boxSizing: keyframeControlsPadding === 0 ? undefined : 'border-box',
35
+ paddingLeft: keyframeControlsPadding,
36
+ width: (0, timeline_row_layout_1.getTimelineRowLeftChromeWidth)(depth, basePadding),
37
+ }), [basePadding, depth, keyframeControlsPadding]);
34
38
  const chromeColumnStyle = (0, react_1.useMemo)(() => ({
35
39
  alignItems: 'center',
36
40
  alignSelf: 'stretch',
37
41
  display: 'flex',
38
42
  flexShrink: 0,
39
- paddingLeft: timeline_row_layout_1.TIMELINE_ROW_BASE_PADDING,
40
- }), []);
43
+ paddingLeft: basePadding,
44
+ }), [basePadding]);
41
45
  const onPointerDown = (0, react_1.useCallback)((e) => {
42
46
  if (e.button === 0) {
43
47
  e.stopPropagation();
@@ -0,0 +1,7 @@
1
+ type TimelineRowLayout = {
2
+ readonly basePadding: number;
3
+ readonly keyframeControlsPadding: number;
4
+ };
5
+ export declare const INSPECTOR_TIMELINE_ROW_LAYOUT: TimelineRowLayout;
6
+ export declare const TimelineRowLayoutContext: import("react").Context<TimelineRowLayout>;
7
+ export {};
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TimelineRowLayoutContext = exports.INSPECTOR_TIMELINE_ROW_LAYOUT = void 0;
4
+ const react_1 = require("react");
5
+ const timeline_row_layout_1 = require("./timeline-row-layout");
6
+ exports.INSPECTOR_TIMELINE_ROW_LAYOUT = {
7
+ basePadding: timeline_row_layout_1.INSPECTOR_ROW_BASE_PADDING,
8
+ keyframeControlsPadding: 0,
9
+ };
10
+ exports.TimelineRowLayoutContext = (0, react_1.createContext)({
11
+ basePadding: timeline_row_layout_1.TIMELINE_ROW_BASE_PADDING,
12
+ keyframeControlsPadding: timeline_row_layout_1.TIMELINE_ROW_BASE_PADDING,
13
+ });
@@ -407,6 +407,7 @@ const getSelectableTimelineItems = ({ getDragOverrides, getEffectDragOverrides,
407
407
  getEffectDragOverrides,
408
408
  propStatuses,
409
409
  includeTextContent: false,
410
+ includeSourceControls: false,
410
411
  });
411
412
  const filteredTree = (0, timeline_expanded_filter_1.filterTimelineExpandedTree)({
412
413
  nodes: tree,
@@ -390,9 +390,7 @@ const TimelineSequenceInner = ({ s, windowWidth, nodePathInfo, sequenceFrameOffs
390
390
  overflow: 'hidden',
391
391
  };
392
392
  }, [marginLeft, s.type, width]);
393
- const showRightEdgeDragHandle = (s.type === 'sequence' || s.type === 'image') &&
394
- !s.loopDisplay &&
395
- !s.isInsideSeries &&
393
+ const showRightEdgeDragHandle = (0, TimelineSequenceRightEdgeDragHandle_1.isTimelineSequenceDurationDraggable)(s) &&
396
394
  nodePath !== null &&
397
395
  validatedLocation !== null &&
398
396
  durationCanUpdate;
@@ -410,7 +408,7 @@ const TimelineSequenceInner = ({ s, windowWidth, nodePathInfo, sequenceFrameOffs
410
408
  if (maxMediaDuration === null && !s.loopDisplay) {
411
409
  return null;
412
410
  }
413
- const sequence = (jsx_runtime_1.jsxs(TimelineSequenceCurrentFrame, { s: s, displayDurationInFrames: displayDurationInFrames, premountWidth: premountWidth, postmountWidth: postmountWidth, style: style, nodePathInfo: nodePathInfo, sequenceFrameOffset: sequenceFrameOffset, fromCanUpdate: fromCanUpdate, frozenFrame: frozenFrame, onMoveDragPointerDown: onMoveDragPointerDown, children: [s.type === 'audio' ? (jsx_runtime_1.jsx(AudioWaveform_1.AudioWaveform, { src: s.src, height: timeline_layout_1.TIMELINE_LAYER_HEIGHT_AUDIO, doesVolumeChange: s.doesVolumeChange, visualizationWidth: width, startFrom: s.startMediaFrom, durationInFrames: s.duration, volume: s.volume, playbackRate: s.playbackRate, loopDisplay: s.loopDisplay })) : null, s.type === 'video' ? (jsx_runtime_1.jsx(TimelineVideoInfo_1.TimelineVideoInfo, { src: s.src, visualizationWidth: width, naturalWidth: naturalWidth, trimBefore: s.startMediaFrom, durationInFrames: s.duration, playbackRate: s.playbackRate, volume: s.volume, doesVolumeChange: s.doesVolumeChange, premountWidth: premountWidth !== null && premountWidth !== void 0 ? premountWidth : 0, postmountWidth: postmountWidth !== null && postmountWidth !== void 0 ? postmountWidth : 0, loopDisplay: s.loopDisplay, frozenMediaFrame: s.frozenMediaFrame })) : null, s.type === 'image' ? (jsx_runtime_1.jsx(TimelineImageInfo_1.TimelineImageInfo, { src: s.src, visualizationWidth: width })) : null, s.loopDisplay === undefined ? null : (jsx_runtime_1.jsx(LoopedTimelineIndicators_1.LoopedTimelineIndicator, { loops: s.loopDisplay.numberOfTimes })), showLeftEdgeDragHandle && nodePathInfo && validatedLocation ? (jsx_runtime_1.jsx(TimelineSequenceRightEdgeDragHandle_1.TimelineSequenceLeftEdgeDragHandle, { nodePathInfo: nodePathInfo, windowWidth: windowWidth, timelineDurationInFrames: (_h = video.durationInFrames) !== null && _h !== void 0 ? _h : 1 })) : null, showRightEdgeDragHandle && nodePathInfo && validatedLocation ? (jsx_runtime_1.jsx(TimelineSequenceRightEdgeDragHandle_1.TimelineSequenceRightEdgeDragHandle, { nodePathInfo: nodePathInfo, windowWidth: windowWidth, timelineDurationInFrames: (_j = video.durationInFrames) !== null && _j !== void 0 ? _j : 1 })) : null] }));
411
+ const sequence = (jsx_runtime_1.jsxs(TimelineSequenceCurrentFrame, { s: s, displayDurationInFrames: displayDurationInFrames, premountWidth: premountWidth, postmountWidth: postmountWidth, style: style, nodePathInfo: nodePathInfo, sequenceFrameOffset: sequenceFrameOffset, fromCanUpdate: fromCanUpdate, frozenFrame: frozenFrame, onMoveDragPointerDown: onMoveDragPointerDown, children: [s.type === 'audio' ? (jsx_runtime_1.jsx(AudioWaveform_1.AudioWaveform, { src: s.src, height: timeline_layout_1.TIMELINE_LAYER_HEIGHT_AUDIO, doesVolumeChange: s.doesVolumeChange, visualizationWidth: width, startFrom: s.startMediaFrom, durationInFrames: s.duration, volume: s.volume, playbackRate: s.playbackRate, loopDisplay: s.loopDisplay })) : null, s.type === 'video' ? (jsx_runtime_1.jsx(TimelineVideoInfo_1.TimelineVideoInfo, { src: s.src, visualizationWidth: width, naturalWidth: naturalWidth, startMediaFrom: s.startMediaFrom, mediaFrameAtSequenceZero: s.mediaFrameAtSequenceZero, sequenceFrameOffset: sequenceFrameOffset, durationInFrames: s.duration, playbackRate: s.playbackRate, volume: s.volume, doesVolumeChange: s.doesVolumeChange, premountWidth: premountWidth !== null && premountWidth !== void 0 ? premountWidth : 0, postmountWidth: postmountWidth !== null && postmountWidth !== void 0 ? postmountWidth : 0, loopDisplay: s.loopDisplay, frozenMediaFrame: s.frozenMediaFrame })) : null, s.type === 'image' ? (jsx_runtime_1.jsx(TimelineImageInfo_1.TimelineImageInfo, { src: s.src, visualizationWidth: width })) : null, s.loopDisplay === undefined ? null : (jsx_runtime_1.jsx(LoopedTimelineIndicators_1.LoopedTimelineIndicator, { loops: s.loopDisplay.numberOfTimes })), showLeftEdgeDragHandle && nodePathInfo && validatedLocation ? (jsx_runtime_1.jsx(TimelineSequenceRightEdgeDragHandle_1.TimelineSequenceLeftEdgeDragHandle, { nodePathInfo: nodePathInfo, windowWidth: windowWidth, timelineDurationInFrames: (_h = video.durationInFrames) !== null && _h !== void 0 ? _h : 1 })) : null, showRightEdgeDragHandle && nodePathInfo && validatedLocation ? (jsx_runtime_1.jsx(TimelineSequenceRightEdgeDragHandle_1.TimelineSequenceRightEdgeDragHandle, { nodePathInfo: nodePathInfo, windowWidth: windowWidth, timelineDurationInFrames: (_j = video.durationInFrames) !== null && _j !== void 0 ? _j : 1 })) : null] }));
414
412
  return previewConnected ? (jsx_runtime_1.jsx(ContextMenu_1.ContextMenu, { values: contextMenuValues, onOpen: onContextMenuOpen, children: sequence })) : (sequence);
415
413
  };
416
414
  exports.TimelineSequence = react_1.default.memo(TimelineSequenceFn);
@@ -88,6 +88,7 @@ const TimelineSequenceExpandArrow = ({ disabled, isExpanded, nodePathInfo, onTog
88
88
  sequence,
89
89
  nodePathInfo,
90
90
  includeTextContent: false,
91
+ includeSourceControls: false,
91
92
  });
92
93
  if (filteredTree.length === 0) {
93
94
  return jsx_runtime_1.jsx(TimelineExpandArrowButton_1.TimelineExpandArrowSpacer, {});
@@ -10,9 +10,8 @@ const ContextMenu_1 = require("../ContextMenu");
10
10
  const call_add_keyframe_1 = require("./call-add-keyframe");
11
11
  const get_animation_item_selection_for_frame_1 = require("./get-animation-item-selection-for-frame");
12
12
  const save_sequence_prop_1 = require("./save-sequence-prop");
13
- const timeline_field_row_layout_1 = require("./timeline-field-row-layout");
14
13
  const TimelineExpandArrowButton_1 = require("./TimelineExpandArrowButton");
15
- const TimelineFieldLabel_1 = require("./TimelineFieldLabel");
14
+ const TimelineFieldRowContent_1 = require("./TimelineFieldRowContent");
16
15
  const TimelineKeyframeControls_1 = require("./TimelineKeyframeControls");
17
16
  const TimelineKeyframedValue_1 = require("./TimelineKeyframedValue");
18
17
  const TimelineLayerEye_1 = require("./TimelineLayerEye");
@@ -160,7 +159,7 @@ const TimelineSequenceKeyframedValue = ({ field, fileName, nodePath, schema, pro
160
159
  };
161
160
  exports.TimelineSequenceKeyframedValue = TimelineSequenceKeyframedValue;
162
161
  const TimelineSequencePropItem = ({ field, validatedLocation, rowDepth, nodePath, nodePathInfo, schema, keyframeDisplayOffset, keyframeControlsMode = 'timeline', }) => {
163
- var _a, _b;
162
+ var _a;
164
163
  const { propStatuses: visualModePropStatuses } = (0, react_1.useContext)(remotion_1.Internals.VisualModePropStatusesContext);
165
164
  const { getDragOverrides } = (0, react_1.useContext)(remotion_1.Internals.VisualModeDragOverridesContext);
166
165
  const { setPropStatuses } = (0, react_1.useContext)(remotion_1.Internals.VisualModeSettersContext);
@@ -190,11 +189,10 @@ const TimelineSequencePropItem = ({ field, validatedLocation, rowDepth, nodePath
190
189
  keyframable,
191
190
  })) ? (jsx_runtime_1.jsx(TimelineKeyframeControls_1.TimelineKeyframeControls, { fieldKey: field.key, propStatus: propStatus, nodePath: nodePath, fileName: validatedLocation.source, keyframeDisplayOffset: keyframeDisplayOffset, defaultValue: field.fieldSchema.default, dragOverrideValue: dragOverrideValue, schema: schema, effectIndex: null, nodePathInfo: nodePathInfo, mode: keyframeControlsMode })) : null;
192
191
  const style = (0, react_1.useMemo)(() => {
193
- return {
194
- ...fieldRowBase,
195
- height: field.rowHeight,
196
- };
197
- }, [field.rowHeight]);
192
+ return field.typeName === 'text-content'
193
+ ? fieldRowBase
194
+ : { ...fieldRowBase, height: field.rowHeight };
195
+ }, [field.rowHeight, field.typeName]);
198
196
  const canResetToDefault = (0, react_1.useMemo)(() => {
199
197
  if (!propStatus || propStatus.status === 'computed') {
200
198
  return false;
@@ -342,8 +340,8 @@ const TimelineSequencePropItem = ({ field, validatedLocation, rowDepth, nodePath
342
340
  if (propStatus === null) {
343
341
  return null;
344
342
  }
345
- const row = (jsx_runtime_1.jsxs(TimelineRowChrome_1.TimelineRowChrome, { depth: rowDepth, eye: jsx_runtime_1.jsx(TimelineLayerEye_1.TimelineLayerEyeSpacer, {}), keyframeControls: keyframeControls, arrow: jsx_runtime_1.jsx(TimelineExpandArrowButton_1.TimelineExpandArrowSpacer, {}), style: style, selected: selection.selected, selectable: selection.selectable, selectionItem: selection.selectionItem, onSelect: selection.onSelect, onDoubleClick: onPropertyDoubleClick, showSelectedBackground: true, containsSelection: false, outerHeight: null, children: [
346
- jsx_runtime_1.jsx(TimelineFieldLabel_1.TimelineFieldLabel, { rowDepth: rowDepth, selected: selection.selected, label: (_b = field.description) !== null && _b !== void 0 ? _b : field.key }), isKeyframedStatus(propStatus) ? (jsx_runtime_1.jsx("div", { style: timeline_field_row_layout_1.timelineFieldValueColumnStyle, children: jsx_runtime_1.jsx(exports.TimelineSequenceKeyframedValue, { field: field, fileName: validatedLocation.source, nodePath: nodePath, schema: schema, propStatus: propStatus, sourceFrame: sourceFrame }) })) : propStatus.status === 'static' ? (jsx_runtime_1.jsx("div", { style: timeline_field_row_layout_1.timelineFieldValueColumnStyle, children: jsx_runtime_1.jsx(Value, { field: field, nodePath: nodePath, validatedLocation: validatedLocation, schema: schema, propStatus: propStatus }) })) : (jsx_runtime_1.jsx("div", { style: timeline_field_row_layout_1.timelineFieldValueColumnStyle, children: jsx_runtime_1.jsx(TimelineSchemaField_1.TimelineNonEditableStatus, { propStatus: propStatus }) }))] }));
343
+ const fieldValue = isKeyframedStatus(propStatus) ? (jsx_runtime_1.jsx(exports.TimelineSequenceKeyframedValue, { field: field, fileName: validatedLocation.source, nodePath: nodePath, schema: schema, propStatus: propStatus, sourceFrame: sourceFrame })) : propStatus.status === 'static' ? (jsx_runtime_1.jsx(Value, { field: field, nodePath: nodePath, validatedLocation: validatedLocation, schema: schema, propStatus: propStatus })) : (jsx_runtime_1.jsx(TimelineSchemaField_1.TimelineNonEditableStatus, { propStatus: propStatus }));
344
+ const row = (jsx_runtime_1.jsx(TimelineRowChrome_1.TimelineRowChrome, { depth: rowDepth, eye: jsx_runtime_1.jsx(TimelineLayerEye_1.TimelineLayerEyeSpacer, {}), keyframeControls: keyframeControls, arrow: jsx_runtime_1.jsx(TimelineExpandArrowButton_1.TimelineExpandArrowSpacer, {}), style: style, selected: selection.selected, selectable: selection.selectable, selectionItem: selection.selectionItem, onSelect: selection.onSelect, onDoubleClick: onPropertyDoubleClick, showSelectedBackground: true, containsSelection: false, outerHeight: null, children: jsx_runtime_1.jsx(TimelineFieldRowContent_1.TimelineFieldRowContent, { field: field, rowDepth: rowDepth, selected: selection.selected, children: fieldValue }) }));
347
345
  return (jsx_runtime_1.jsx(ContextMenu_1.ContextMenu, { values: contextMenuValues, onOpen: selection.selectable ? selection.onSelect : null, children: row }));
348
346
  };
349
347
  exports.TimelineSequencePropItem = TimelineSequencePropItem;
@@ -8,6 +8,7 @@ export type TimelineSequenceDurationDragTarget = {
8
8
  readonly fileName: string;
9
9
  readonly initialDuration: number;
10
10
  readonly nodePath: SequencePropsSubscriptionKey;
11
+ readonly schema: InteractivitySchema;
11
12
  };
12
13
  export type TimelineSequenceLeftEdgeDragTarget = {
13
14
  readonly fileName: string;
@@ -32,6 +33,7 @@ type TimelineSequenceKeyframeDragTarget = {
32
33
  type TimelineSequenceEffectKeyframeDragTarget = TimelineSequenceKeyframeDragTarget & {
33
34
  readonly effectIndex: number;
34
35
  };
36
+ export declare const isTimelineSequenceDurationDraggable: (sequence: TSequence) => boolean;
35
37
  export declare const getTimelineSequenceDurationDragValue: ({ initialDuration, deltaFrames, }: {
36
38
  readonly initialDuration: number;
37
39
  readonly deltaFrames: number;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TimelineSequenceRightEdgeDragHandle = exports.useTimelineSequenceFromDrag = exports.TimelineSequenceLeftEdgeDragHandle = exports.getTimelineSequenceFromDragTargets = exports.getTimelineSequenceLeftEdgeDragTargets = exports.getTimelineSequenceDurationDragTargets = exports.getTimelineSequenceFromDragKeyframeMoves = exports.getTimelineSequenceFromDragChanges = exports.getTimelineSequenceFromDragValue = exports.getTimelineSequenceDurationDragChanges = exports.getTimelineSequenceLeftEdgeDragChanges = exports.getTimelineSequenceLeftEdgeDragValues = exports.getTimelineSequenceLeftEdgeDragDelta = exports.getTimelineSequenceDurationDragValue = void 0;
3
+ exports.TimelineSequenceRightEdgeDragHandle = exports.useTimelineSequenceFromDrag = exports.TimelineSequenceLeftEdgeDragHandle = exports.getTimelineSequenceFromDragTargets = exports.getTimelineSequenceLeftEdgeDragTargets = exports.getTimelineSequenceDurationDragTargets = exports.getTimelineSequenceFromDragKeyframeMoves = exports.getTimelineSequenceFromDragChanges = exports.getTimelineSequenceFromDragValue = exports.getTimelineSequenceDurationDragChanges = exports.getTimelineSequenceLeftEdgeDragChanges = exports.getTimelineSequenceLeftEdgeDragValues = exports.getTimelineSequenceLeftEdgeDragDelta = exports.getTimelineSequenceDurationDragValue = exports.isTimelineSequenceDurationDraggable = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const studio_shared_1 = require("@remotion/studio-shared");
6
6
  const react_1 = require("react");
@@ -81,12 +81,19 @@ const canUpdateTrimBefore = ({ propStatuses, nodePath, }) => {
81
81
  const status = (_b = (_a = remotion_1.Internals.getPropStatusesCtx(propStatuses, nodePath)) === null || _a === void 0 ? void 0 : _a.trimBefore) === null || _b === void 0 ? void 0 : _b.status;
82
82
  return status === 'static';
83
83
  };
84
- const isDurationDraggableSequence = (sequence) => {
85
- return ((sequence.type === 'sequence' || sequence.type === 'image') &&
84
+ const isTimelineSequenceDurationDraggable = (sequence) => {
85
+ var _a;
86
+ const isInteractiveSeriesSequence = ((_a = sequence.controls) === null || _a === void 0 ? void 0 : _a.componentIdentity) ===
87
+ 'dev.remotion.remotion.Series.Sequence';
88
+ return ((sequence.type === 'sequence' ||
89
+ sequence.type === 'image' ||
90
+ sequence.type === 'audio' ||
91
+ sequence.type === 'video') &&
86
92
  !sequence.loopDisplay &&
87
- !sequence.isInsideSeries &&
93
+ (!sequence.isInsideSeries || isInteractiveSeriesSequence) &&
88
94
  Boolean(sequence.controls));
89
95
  };
96
+ exports.isTimelineSequenceDurationDraggable = isTimelineSequenceDurationDraggable;
90
97
  const isLeftEdgeDraggableSequence = (sequence) => {
91
98
  return (!sequence.isInsideSeries &&
92
99
  Boolean(sequence.controls) &&
@@ -180,7 +187,7 @@ const getTimelineSequenceDurationDragChanges = ({ targets, deltaFrames, }) => {
180
187
  fieldKey: 'durationInFrames',
181
188
  value: nextValue,
182
189
  defaultValue: null,
183
- schema: no_react_1.NoReactInternals.sequenceSchema,
190
+ schema: target.schema,
184
191
  },
185
192
  ];
186
193
  });
@@ -266,19 +273,24 @@ const getTimelineSequenceDurationDragTargets = ({ draggedNodePathInfo, selectedI
266
273
  if (!track ||
267
274
  !track.nodePathInfo ||
268
275
  !originalSequence ||
269
- !isDurationDraggableSequence(originalSequence)) {
276
+ !(0, exports.isTimelineSequenceDurationDraggable)(originalSequence)) {
270
277
  return null;
271
278
  }
272
279
  const nodePath = track.nodePathInfo.sequenceSubscriptionKey;
273
280
  if (!canUpdateDurationInFrames({ propStatuses, nodePath })) {
274
281
  return null;
275
282
  }
283
+ const { controls } = originalSequence;
284
+ if (!controls) {
285
+ return null;
286
+ }
276
287
  const key = (0, studio_shared_1.stringifySequenceSubscriptionKey)(nodePath);
277
288
  if (!targets.has(key)) {
278
289
  targets.set(key, {
279
290
  fileName: nodePath.absolutePath,
280
291
  initialDuration: originalSequence.duration,
281
292
  nodePath,
293
+ schema: controls.schema,
282
294
  });
283
295
  }
284
296
  }
@@ -5,6 +5,17 @@ const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const react_1 = require("react");
6
6
  const RemTextarea_1 = require("../NewComposition/RemTextarea");
7
7
  const focus_inspector_field_1 = require("./focus-inspector-field");
8
+ const textAreaStyle = {
9
+ boxSizing: 'border-box',
10
+ maxHeight: 160,
11
+ minHeight: 40,
12
+ minWidth: 0,
13
+ overflowY: 'auto',
14
+ width: '100%',
15
+ ...{
16
+ fieldSizing: 'content',
17
+ },
18
+ };
8
19
  const TimelineTextContentField = ({ effectiveValue, field, nodePath, onDragEnd, onDragValueChange, onSave, propStatus, }) => {
9
20
  var _a;
10
21
  const inputRef = (0, react_1.useRef)(null);
@@ -91,10 +102,6 @@ const TimelineTextContentField = ({ effectiveValue, field, nodePath, onDragEnd,
91
102
  event.currentTarget.blur();
92
103
  }
93
104
  }, []);
94
- return (jsx_runtime_1.jsx(RemTextarea_1.RemTextarea, { ref: setInputRef, status: "ok", small: true, defaultValue: currentValue, onBlur: commitPending, onChange: onChange, onKeyDownCapture: onKeyDownCapture, style: {
95
- boxSizing: 'border-box',
96
- height: 40,
97
- width: 160,
98
- } }, String((_a = propStatus.codeValue) !== null && _a !== void 0 ? _a : '')));
105
+ return (jsx_runtime_1.jsx(RemTextarea_1.RemTextarea, { ref: setInputRef, status: "ok", small: true, defaultValue: currentValue, onBlur: commitPending, onChange: onChange, onKeyDownCapture: onKeyDownCapture, style: textAreaStyle }, String((_a = propStatus.codeValue) !== null && _a !== void 0 ? _a : '')));
99
106
  };
100
107
  exports.TimelineTextContentField = TimelineTextContentField;
@@ -4,7 +4,9 @@ export declare const TimelineVideoInfo: React.FC<{
4
4
  readonly src: string;
5
5
  readonly visualizationWidth: number;
6
6
  readonly naturalWidth: number;
7
- readonly trimBefore: number;
7
+ readonly startMediaFrom: number;
8
+ readonly mediaFrameAtSequenceZero: number | null;
9
+ readonly sequenceFrameOffset: number;
8
10
  readonly durationInFrames: number;
9
11
  readonly playbackRate: number;
10
12
  readonly volume: string | number;
@@ -8,6 +8,7 @@ const remotion_1 = require("remotion");
8
8
  const colors_1 = require("../../helpers/colors");
9
9
  const timeline_layout_1 = require("../../helpers/timeline-layout");
10
10
  const AudioWaveform_1 = require("../AudioWaveform");
11
+ const get_timeline_media_start_frame_1 = require("./get-timeline-media-start-frame");
11
12
  const get_timeline_video_info_widths_1 = require("./get-timeline-video-info-widths");
12
13
  const timeline_video_filmstrip_times_1 = require("./timeline-video-filmstrip-times");
13
14
  const outerStyle = {
@@ -25,11 +26,17 @@ const filmstripContainerStyle = {
25
26
  fontFamily: 'Arial, Helvetica',
26
27
  };
27
28
  const MAX_FROZEN_FRAME_CACHE_DEVIATION = timeline_utils_1.WEBCODECS_TIMESCALE * 0.05;
28
- const TimelineVideoInfo = ({ src, visualizationWidth, naturalWidth, trimBefore, durationInFrames, playbackRate, volume, doesVolumeChange, premountWidth, postmountWidth, loopDisplay, frozenMediaFrame, }) => {
29
+ const TimelineVideoInfo = ({ src, visualizationWidth, naturalWidth, startMediaFrom, mediaFrameAtSequenceZero, sequenceFrameOffset, durationInFrames, playbackRate, volume, doesVolumeChange, premountWidth, postmountWidth, loopDisplay, frozenMediaFrame, }) => {
29
30
  const { fps } = (0, remotion_1.useVideoConfig)();
30
31
  const ref = (0, react_1.useRef)(null);
31
32
  const [error, setError] = (0, react_1.useState)(null);
32
33
  const aspectRatio = (0, react_1.useRef)((0, timeline_utils_1.getAspectRatioFromCache)(src));
34
+ const mediaStartFrame = (0, get_timeline_media_start_frame_1.getTimelineMediaStartFrame)({
35
+ startMediaFrom,
36
+ mediaFrameAtSequenceZero,
37
+ sequenceFrameOffset,
38
+ playbackRate,
39
+ });
33
40
  const { mediaVisualizationWidth, mediaNaturalWidth } = (0, react_1.useMemo)(() => {
34
41
  return (0, get_timeline_video_info_widths_1.getTimelineVideoInfoWidths)({
35
42
  visualizationWidth,
@@ -84,7 +91,7 @@ const TimelineVideoInfo = ({ src, visualizationWidth, naturalWidth, trimBefore,
84
91
  : null;
85
92
  };
86
93
  const times = (0, timeline_video_filmstrip_times_1.getTimelineVideoFilmstripTimes)({
87
- trimBefore,
94
+ trimBefore: mediaStartFrame,
88
95
  durationInFrames,
89
96
  playbackRate,
90
97
  fps,
@@ -305,9 +312,9 @@ const TimelineVideoInfo = ({ src, visualizationWidth, naturalWidth, trimBefore,
305
312
  loopDisplay,
306
313
  mediaNaturalWidth,
307
314
  mediaVisualizationWidth,
315
+ mediaStartFrame,
308
316
  playbackRate,
309
317
  src,
310
- trimBefore,
311
318
  ]);
312
319
  const audioWidth = mediaVisualizationWidth;
313
320
  const filmstripStyle = (0, react_1.useMemo)(() => {
@@ -325,7 +332,7 @@ const TimelineVideoInfo = ({ src, visualizationWidth, naturalWidth, trimBefore,
325
332
  };
326
333
  }, [audioWidth, premountWidth]);
327
334
  return (jsx_runtime_1.jsxs("div", { style: outerStyle, children: [
328
- jsx_runtime_1.jsx("div", { ref: ref, style: filmstripStyle }), jsx_runtime_1.jsx("div", { style: audioStyle, children: jsx_runtime_1.jsx(AudioWaveform_1.AudioWaveform, { src: src, height: timeline_layout_1.TIMELINE_VIDEO_INFO_WAVEFORM_HEIGHT, visualizationWidth: audioWidth, startFrom: trimBefore, durationInFrames: durationInFrames, volume: volume, doesVolumeChange: doesVolumeChange, playbackRate: playbackRate, loopDisplay: loopDisplay }) })
335
+ jsx_runtime_1.jsx("div", { ref: ref, style: filmstripStyle }), jsx_runtime_1.jsx("div", { style: audioStyle, children: jsx_runtime_1.jsx(AudioWaveform_1.AudioWaveform, { src: src, height: timeline_layout_1.TIMELINE_VIDEO_INFO_WAVEFORM_HEIGHT, visualizationWidth: audioWidth, startFrom: mediaStartFrame, durationInFrames: durationInFrames, volume: volume, doesVolumeChange: doesVolumeChange, playbackRate: playbackRate, loopDisplay: loopDisplay }) })
329
336
  ] }));
330
337
  };
331
338
  exports.TimelineVideoInfo = TimelineVideoInfo;
@@ -88,15 +88,14 @@ const deleteEffects = (effects) => {
88
88
  : effects.length === 1
89
89
  ? 'Removed effects from source file'
90
90
  : 'Removed effects from source files', 2000);
91
+ return true;
91
92
  }
92
- else {
93
- (0, NotificationCenter_1.showNotification)(result.reason, 4000);
94
- }
95
- return true;
93
+ (0, NotificationCenter_1.showNotification)(result.reason, 4000);
94
+ return false;
96
95
  })
97
96
  .catch((err) => {
98
97
  (0, NotificationCenter_1.showNotification)(err.message, 4000);
99
- return true;
98
+ return false;
100
99
  });
101
100
  };
102
101
  const deleteSelectedTimelineItem = ({ selection, sequences, overrideIdsToNodePaths, setPropStatuses, clientId, confirm, }) => {
@@ -0,0 +1,14 @@
1
+ import { type EffectClipboardData } from '@remotion/studio-shared';
2
+ export type EffectsClipboardEnvelope = {
3
+ readonly envelopeVersion: 1;
4
+ readonly payload: EffectClipboardData;
5
+ readonly sourceIdentity: string | null;
6
+ readonly originalEffectIndices: number[];
7
+ };
8
+ export declare const makeEffectsClipboardHtml: (envelope: EffectsClipboardEnvelope) => string;
9
+ export declare const parseEffectsClipboardHtml: (html: string) => EffectsClipboardEnvelope | null;
10
+ export declare const writeEffectsClipboardEnvelope: (envelope: EffectsClipboardEnvelope) => Promise<void>;
11
+ export declare const readClipboardTextAndEffectsEnvelope: (clipboardData: DataTransfer) => {
12
+ readonly text: string;
13
+ readonly envelope: EffectsClipboardEnvelope | null;
14
+ };
@@ -0,0 +1,68 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.readClipboardTextAndEffectsEnvelope = exports.writeEffectsClipboardEnvelope = exports.parseEffectsClipboardHtml = exports.makeEffectsClipboardHtml = void 0;
4
+ const studio_shared_1 = require("@remotion/studio-shared");
5
+ const attribute = 'data-remotion-effects-clipboard';
6
+ const getClipboardLabel = (effects) => effects === 1 ? 'Remotion effect' : `${effects} Remotion effects`;
7
+ const makeEffectsClipboardHtml = (envelope) => `<span ${attribute}="${encodeURIComponent(JSON.stringify(envelope))}">${getClipboardLabel(envelope.payload.effects.length)}</span>`;
8
+ exports.makeEffectsClipboardHtml = makeEffectsClipboardHtml;
9
+ const parseEffectsClipboardHtml = (html) => {
10
+ const match = html.match(new RegExp(`${attribute}=["']([^"']+)["']`, 'i'));
11
+ if (!(match === null || match === void 0 ? void 0 : match[1])) {
12
+ return null;
13
+ }
14
+ try {
15
+ const candidate = JSON.parse(decodeURIComponent(match[1]));
16
+ if (candidate.envelopeVersion !== 1 ||
17
+ (candidate.sourceIdentity !== null &&
18
+ typeof candidate.sourceIdentity !== 'string') ||
19
+ !Array.isArray(candidate.originalEffectIndices) ||
20
+ !candidate.originalEffectIndices.every((index) => Number.isInteger(index) && index >= 0)) {
21
+ return null;
22
+ }
23
+ const result = (0, studio_shared_1.parseEffectClipboardDataResult)(JSON.stringify(candidate.payload));
24
+ if (result.status !== 'valid') {
25
+ return null;
26
+ }
27
+ const originalEffectIndices = candidate.originalEffectIndices;
28
+ const sourceIdentity = candidate.sourceIdentity;
29
+ if ((sourceIdentity === null && originalEffectIndices.length !== 0) ||
30
+ (sourceIdentity !== null &&
31
+ (originalEffectIndices.length !== result.data.effects.length ||
32
+ new Set(originalEffectIndices).size !== originalEffectIndices.length))) {
33
+ return null;
34
+ }
35
+ return {
36
+ envelopeVersion: 1,
37
+ payload: result.data,
38
+ sourceIdentity,
39
+ originalEffectIndices,
40
+ };
41
+ }
42
+ catch (_a) {
43
+ return null;
44
+ }
45
+ };
46
+ exports.parseEffectsClipboardHtml = parseEffectsClipboardHtml;
47
+ const writeEffectsClipboardEnvelope = async (envelope) => {
48
+ const label = getClipboardLabel(envelope.payload.effects.length);
49
+ await navigator.clipboard.write([
50
+ new ClipboardItem({
51
+ 'text/html': new Blob([(0, exports.makeEffectsClipboardHtml)(envelope)], {
52
+ type: 'text/html',
53
+ }),
54
+ 'text/plain': new Blob([label], { type: 'text/plain' }),
55
+ }),
56
+ ]);
57
+ };
58
+ exports.writeEffectsClipboardEnvelope = writeEffectsClipboardEnvelope;
59
+ const readClipboardTextAndEffectsEnvelope = (clipboardData) => {
60
+ const html = clipboardData.types.includes('text/html')
61
+ ? clipboardData.getData('text/html')
62
+ : '';
63
+ return {
64
+ text: clipboardData.getData('text/plain'),
65
+ envelope: html === '' ? null : (0, exports.parseEffectsClipboardHtml)(html),
66
+ };
67
+ };
68
+ exports.readClipboardTextAndEffectsEnvelope = readClipboardTextAndEffectsEnvelope;
@@ -21,22 +21,25 @@ const normalizeMenuDividers = (items) => {
21
21
  }
22
22
  return normalized;
23
23
  };
24
+ const interactiveSvgComponentIdentity = 'dev.remotion.remotion.Interactive.Svg';
24
25
  const getSequenceContextMenuItems = ({ assetLinkInfo, canOpenInEditor, deleteDisabled, disableInteractivityDisabled, duplicateDisabled, fileLocation, includeSourceEditItems, onDeleteSequenceFromSource, onDisableSequenceInteractivity, onDuplicateSequenceFromSource, openInEditor, originalLocation, selectAsset, sequence, sourceActions = [], }) => {
26
+ var _a, _b;
25
27
  const editorName = window.remotion_editorName;
26
28
  const { documentationLink } = sequence;
29
+ const isInteractiveSvg = ((_a = sequence.controls) === null || _a === void 0 ? void 0 : _a.componentIdentity) === interactiveSvgComponentIdentity;
27
30
  const items = [
28
31
  editorName
29
32
  ? {
30
33
  type: 'item',
31
- id: 'show-in-editor',
34
+ id: 'open-in-editor',
32
35
  keyHint: null,
33
- label: `Show in ${editorName}`,
36
+ label: `Open in ${editorName}`,
34
37
  leftItem: null,
35
38
  disabled: !canOpenInEditor || !originalLocation,
36
39
  onClick: openInEditor,
37
40
  quickSwitcherLabel: null,
38
41
  subMenu: null,
39
- value: 'show-in-editor',
42
+ value: 'open-in-editor',
40
43
  }
41
44
  : null,
42
45
  {
@@ -101,6 +104,40 @@ const getSequenceContextMenuItems = ({ assetLinkInfo, canOpenInEditor, deleteDis
101
104
  id: 'sequence-link-divider',
102
105
  }
103
106
  : null,
107
+ isInteractiveSvg
108
+ ? {
109
+ type: 'item',
110
+ id: 'copy-svg',
111
+ keyHint: null,
112
+ label: 'Copy SVG',
113
+ leftItem: null,
114
+ disabled: !((_b = sequence.refForOutline) === null || _b === void 0 ? void 0 : _b.current),
115
+ onClick: () => {
116
+ var _a;
117
+ const svg = (_a = sequence.refForOutline) === null || _a === void 0 ? void 0 : _a.current;
118
+ if (!svg) {
119
+ return;
120
+ }
121
+ navigator.clipboard
122
+ .writeText(svg.outerHTML)
123
+ .then(() => {
124
+ (0, NotificationCenter_1.showNotification)('Copied SVG to clipboard', 1000);
125
+ })
126
+ .catch((err) => {
127
+ (0, NotificationCenter_1.showNotification)(`Could not copy to clipboard: ${err.message}`, 1000);
128
+ });
129
+ },
130
+ quickSwitcherLabel: null,
131
+ subMenu: null,
132
+ value: 'copy-svg',
133
+ }
134
+ : null,
135
+ isInteractiveSvg
136
+ ? {
137
+ type: 'divider',
138
+ id: 'copy-svg-divider',
139
+ }
140
+ : null,
104
141
  sourceActions.length > 0
105
142
  ? {
106
143
  type: 'divider',
@@ -0,0 +1,6 @@
1
+ export declare const getTimelineMediaStartFrame: ({ startMediaFrom, mediaFrameAtSequenceZero, sequenceFrameOffset, playbackRate, }: {
2
+ startMediaFrom: number;
3
+ mediaFrameAtSequenceZero: number | null;
4
+ sequenceFrameOffset: number;
5
+ playbackRate: number;
6
+ }) => number;
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getTimelineMediaStartFrame = void 0;
4
+ const no_react_1 = require("remotion/no-react");
5
+ const getTimelineMediaStartFrame = ({ startMediaFrom, mediaFrameAtSequenceZero, sequenceFrameOffset, playbackRate, }) => {
6
+ if (mediaFrameAtSequenceZero !== null) {
7
+ return mediaFrameAtSequenceZero + sequenceFrameOffset * playbackRate;
8
+ }
9
+ return no_react_1.NoReactInternals.getExpectedMediaFrameUncorrected({
10
+ frame: sequenceFrameOffset,
11
+ startFrom: startMediaFrom,
12
+ playbackRate,
13
+ });
14
+ };
15
+ exports.getTimelineMediaStartFrame = getTimelineMediaStartFrame;
@@ -1,8 +1,8 @@
1
- import type { SequenceNodePath, InteractivitySchema } from 'remotion';
1
+ import type { SequenceNodePath, InteractivitySchema, VideoConfigValues } 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, componentIdentity, effects, nodePath, clientId, applyOnce, applyEach, }: {
5
+ export declare const acquireSequencePropsSubscription: ({ fileName, line, column, schema, componentIdentity, effects, nodePath, clientId, applyOnce, applyEach, videoConfigValues, }: {
6
6
  fileName: string;
7
7
  line: number;
8
8
  column: number;
@@ -13,6 +13,7 @@ export declare const acquireSequencePropsSubscription: ({ fileName, line, column
13
13
  clientId: string;
14
14
  applyOnce: ApplyResult;
15
15
  applyEach: ApplyResult;
16
+ videoConfigValues: VideoConfigValues;
16
17
  }) => {
17
18
  release: () => void;
18
19
  };