@remotion/studio 4.0.527 → 4.0.528

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 (258) hide show
  1. package/dist/components/AgentPrompt.js +1 -2
  2. package/dist/components/AudioWaveform.d.ts +1 -0
  3. package/dist/components/AudioWaveform.js +10 -14
  4. package/dist/components/CodeFrame.js +1 -1
  5. package/dist/components/ColorPicker/checker.d.ts +1 -1
  6. package/dist/components/CurrentAsset.js +3 -2
  7. package/dist/components/EditorRuler/Ruler.js +6 -3
  8. package/dist/components/EffectPickerModal.js +69 -43
  9. package/dist/components/ElementInstallConfirmation.js +3 -3
  10. package/dist/components/ElementLibrariesSettings.d.ts +2 -0
  11. package/dist/components/ElementLibrariesSettings.js +200 -0
  12. package/dist/components/InitialCompositionLoader.js +3 -1
  13. package/dist/components/InspectorOpenInEditor.js +13 -0
  14. package/dist/components/InspectorPanel/AlignmentControls.js +28 -9
  15. package/dist/components/InspectorPanel/CollapsibleInspectorSectionHeader.js +1 -1
  16. package/dist/components/InspectorPanel/EasingInspector.js +6 -2
  17. package/dist/components/InspectorPanel/ElementLibraryButton.js +1 -1
  18. package/dist/components/InspectorPanel/KeyframeEasingNavigator.js +1 -1
  19. package/dist/components/InspectorPanel/KeyframeInspector.js +28 -24
  20. package/dist/components/InspectorPanel/MultiSequenceNumberField.js +1 -1
  21. package/dist/components/InspectorPanel/SequenceInspectorHeader.d.ts +3 -1
  22. package/dist/components/InspectorPanel/SequenceSelectionInspector.js +30 -2
  23. package/dist/components/InspectorPanel/SequenceWrapAction.d.ts +8 -0
  24. package/dist/components/InspectorPanel/SequenceWrapAction.js +151 -0
  25. package/dist/components/InspectorPanel/easing-inspector-selection.d.ts +2 -1
  26. package/dist/components/InspectorPanel/easing-inspector-selection.js +4 -3
  27. package/dist/components/InspectorPanel/keyframe-inspector-frame.d.ts +2 -1
  28. package/dist/components/InspectorPanel/keyframe-inspector-frame.js +2 -2
  29. package/dist/components/InspectorSequenceSection.d.ts +1 -0
  30. package/dist/components/InspectorSequenceSection.js +7 -5
  31. package/dist/components/KeyboardShortcutsSettings.js +1 -1
  32. package/dist/components/Menu/styles.d.ts +2 -2
  33. package/dist/components/Modals.js +7 -6
  34. package/dist/components/ModelManager.js +10 -9
  35. package/dist/components/NewComposition/CancelButton.js +10 -4
  36. package/dist/components/NewComposition/InputDragger.d.ts +3 -1
  37. package/dist/components/NewComposition/InputDragger.js +28 -9
  38. package/dist/components/NewComposition/NewComposition.js +7 -6
  39. package/dist/components/NewComposition/RemInput.d.ts +1 -1
  40. package/dist/components/NewComposition/menu-typeahead.js +1 -1
  41. package/dist/components/Preview.js +3 -2
  42. package/dist/components/RenderModal/SchemaEditor/create-zod-values.js +1 -2
  43. package/dist/components/RenderModal/WebRenderModalPicture.js +1 -2
  44. package/dist/components/RenderQueue/CaptionQueueItem.js +14 -5
  45. package/dist/components/RenderQueue/CaptionQueueProcessor.js +30 -7
  46. package/dist/components/RenderQueue/QueueJobError.d.ts +8 -0
  47. package/dist/components/RenderQueue/QueueJobError.js +24 -0
  48. package/dist/components/RenderQueue/QueueJobErrorModal.d.ts +8 -0
  49. package/dist/components/RenderQueue/QueueJobErrorModal.js +63 -0
  50. package/dist/components/RenderQueue/RenderQueueItemCancelButton.d.ts +3 -1
  51. package/dist/components/RenderQueue/RenderQueueItemCancelButton.js +11 -4
  52. package/dist/components/RenderQueue/RenderQueueRepeat.d.ts +3 -1
  53. package/dist/components/RenderQueue/RenderQueueRepeat.js +20 -3
  54. package/dist/components/RenderQueue/VideoMattingQueueItem.js +24 -27
  55. package/dist/components/RenderQueue/VideoMattingQueueProcessor.js +68 -28
  56. package/dist/components/RenderQueue/caption-job-types.d.ts +3 -1
  57. package/dist/components/RenderQueue/context.d.ts +4 -0
  58. package/dist/components/RenderQueue/context.js +58 -8
  59. package/dist/components/RenderQueue/index.js +2 -3
  60. package/dist/components/RenderQueue/load-model-for-job.d.ts +2 -1
  61. package/dist/components/RenderQueue/load-model-for-job.js +5 -1
  62. package/dist/components/RenderQueue/video-matting-job-types.d.ts +13 -6
  63. package/dist/components/SelectedOutlineCropControls.js +2 -1
  64. package/dist/components/SelectedOutlineEditingHandles.js +9 -2
  65. package/dist/components/SelectedOutlineElement.js +9 -3
  66. package/dist/components/SelectedOutlineKeyboardControls.d.ts +2 -4
  67. package/dist/components/SelectedOutlineKeyboardControls.js +4 -22
  68. package/dist/components/SelectedOutlineOverlay.js +152 -106
  69. package/dist/components/SelectedOutlinePathPoints.d.ts +8 -0
  70. package/dist/components/SelectedOutlinePathPoints.js +433 -0
  71. package/dist/components/SelectedOutlinePolygon.js +21 -46
  72. package/dist/components/SelectedOutlineRenderer.d.ts +3 -5
  73. package/dist/components/SelectedOutlineRenderer.js +32 -136
  74. package/dist/components/SelectedOutlineTransformOriginHandle.js +3 -2
  75. package/dist/components/SelectedOutlineUvControls.js +12 -7
  76. package/dist/components/SettingsModal.js +30 -3
  77. package/dist/components/SettingsModalFooter.d.ts +1 -0
  78. package/dist/components/SettingsModalFooter.js +7 -3
  79. package/dist/components/ShowOutlinesProvider.js +1 -1
  80. package/dist/components/SkillsSettings.d.ts +0 -1
  81. package/dist/components/SkillsSettings.js +13 -14
  82. package/dist/components/Splitter/SplitterElement.js +1 -2
  83. package/dist/components/TimeValue.js +1 -1
  84. package/dist/components/Timeline/LoopedTimelineIndicators.d.ts +1 -0
  85. package/dist/components/Timeline/LoopedTimelineIndicators.js +7 -6
  86. package/dist/components/Timeline/TimelineArrayField.js +1 -1
  87. package/dist/components/Timeline/TimelineClipboardKeybindings.js +0 -1
  88. package/dist/components/Timeline/TimelineColorField.js +1 -1
  89. package/dist/components/Timeline/TimelineDragHandler.js +1 -1
  90. package/dist/components/Timeline/TimelineEffectPropItem.d.ts +1 -0
  91. package/dist/components/Timeline/TimelineEffectPropItem.js +12 -5
  92. package/dist/components/Timeline/TimelineExpandedRow.d.ts +1 -0
  93. package/dist/components/Timeline/TimelineExpandedRow.js +5 -4
  94. package/dist/components/Timeline/TimelineExpandedSection.d.ts +1 -0
  95. package/dist/components/Timeline/TimelineExpandedSection.js +2 -2
  96. package/dist/components/Timeline/TimelineExpandedTrackKeyframes.d.ts +1 -0
  97. package/dist/components/Timeline/TimelineExpandedTrackKeyframes.js +3 -1
  98. package/dist/components/Timeline/TimelineFontFamilyField.js +12 -12
  99. package/dist/components/Timeline/TimelineKeyframeControls.d.ts +1 -0
  100. package/dist/components/Timeline/TimelineKeyframeControls.js +39 -28
  101. package/dist/components/Timeline/TimelineLayerChildren.js +1 -1
  102. package/dist/components/Timeline/TimelineList.js +1 -1
  103. package/dist/components/Timeline/TimelineNumberField.js +2 -4
  104. package/dist/components/Timeline/TimelinePrimitiveFieldValue.js +1 -1
  105. package/dist/components/Timeline/TimelineSelection.d.ts +9 -9
  106. package/dist/components/Timeline/TimelineSelection.js +16 -9
  107. package/dist/components/Timeline/TimelineSequence.d.ts +3 -1
  108. package/dist/components/Timeline/TimelineSequence.js +39 -21
  109. package/dist/components/Timeline/TimelineSequenceItem.d.ts +1 -0
  110. package/dist/components/Timeline/TimelineSequenceItem.js +18 -8
  111. package/dist/components/Timeline/TimelineSequencePropItem.d.ts +3 -0
  112. package/dist/components/Timeline/TimelineSequencePropItem.js +262 -25
  113. package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.d.ts +11 -13
  114. package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.js +98 -77
  115. package/dist/components/Timeline/TimelineTextContentField.js +27 -4
  116. package/dist/components/Timeline/TimelineTimeIndicators.js +10 -5
  117. package/dist/components/Timeline/TimelineTrack.js +1 -1
  118. package/dist/components/Timeline/TimelineTrimTooltip.d.ts +11 -0
  119. package/dist/components/Timeline/TimelineTrimTooltip.js +41 -0
  120. package/dist/components/Timeline/TimelineVideoInfo.d.ts +1 -0
  121. package/dist/components/Timeline/TimelineVideoInfo.js +13 -10
  122. package/dist/components/Timeline/delete-selected-keyframe.js +22 -8
  123. package/dist/components/Timeline/delete-selected-timeline-item.d.ts +1 -5
  124. package/dist/components/Timeline/delete-selected-timeline-item.js +7 -93
  125. package/dist/components/Timeline/get-animation-item-selection-for-frame.d.ts +2 -1
  126. package/dist/components/Timeline/get-animation-item-selection-for-frame.js +7 -5
  127. package/dist/components/Timeline/get-keyframed-sequence-drag-targets.d.ts +23 -0
  128. package/dist/components/Timeline/get-keyframed-sequence-drag-targets.js +57 -0
  129. package/dist/components/Timeline/get-node-keyframes.d.ts +2 -1
  130. package/dist/components/Timeline/get-node-keyframes.js +6 -4
  131. package/dist/components/Timeline/get-playback-rate-keyframe-changes.d.ts +21 -0
  132. package/dist/components/Timeline/get-playback-rate-keyframe-changes.js +142 -0
  133. package/dist/components/Timeline/get-timeline-keyframes.d.ts +15 -2
  134. package/dist/components/Timeline/get-timeline-keyframes.js +44 -6
  135. package/dist/components/Timeline/keyframe-clipboard.js +17 -3
  136. package/dist/components/Timeline/split-selected-timeline-item.js +4 -1
  137. package/dist/components/Timeline/timeline-field-display-utils.js +1 -0
  138. package/dist/components/Timeline/timeline-field-row-layout.js +1 -0
  139. package/dist/components/Timeline/use-delete-timeline-items.js +17 -11
  140. package/dist/components/Timeline/use-expanded-track-keyframe-rows.d.ts +2 -1
  141. package/dist/components/Timeline/use-expanded-track-keyframe-rows.js +3 -1
  142. package/dist/components/Timeline/use-sequence-freeze-frame-menu-item.js +7 -3
  143. package/dist/components/Timeline/use-timeline-keyframe-drag.js +28 -19
  144. package/dist/components/Transcription/Models.js +1 -1
  145. package/dist/components/Transcription/TranscriptionModal.js +3 -1
  146. package/dist/components/Transcription/resample-media-to-16-khz.d.ts +2 -1
  147. package/dist/components/Transcription/resample-media-to-16-khz.js +20 -2
  148. package/dist/components/UpdatesSettings.js +2 -0
  149. package/dist/components/VideoMatting/Models.js +1 -1
  150. package/dist/components/VideoMatting/VideoMattingModal.js +30 -47
  151. package/dist/components/VideoMatting/VideoMattingModalWithOptionalPackage.js +1 -1
  152. package/dist/components/WebMcp.js +22 -40
  153. package/dist/components/composition-drop-preview.js +1 -0
  154. package/dist/components/effect-drag-and-drop.d.ts +13 -5
  155. package/dist/components/effect-drag-and-drop.js +19 -4
  156. package/dist/components/get-open-in-menu-items.d.ts +2 -1
  157. package/dist/components/get-open-in-menu-items.js +17 -1
  158. package/dist/components/selected-outline-drag.d.ts +1 -6
  159. package/dist/components/selected-outline-drag.js +22 -6
  160. package/dist/components/selected-outline-geometry.d.ts +2 -18
  161. package/dist/components/selected-outline-measurement.d.ts +23 -41
  162. package/dist/components/selected-outline-measurement.js +14 -252
  163. package/dist/components/selected-outline-order.d.ts +4 -11
  164. package/dist/components/selected-outline-order.js +2 -254
  165. package/dist/components/selected-outline-snap.d.ts +1 -1
  166. package/dist/components/selected-outline-snap.js +2 -1
  167. package/dist/components/selected-outline-types.d.ts +18 -28
  168. package/dist/components/selected-outline-uv.d.ts +4 -4
  169. package/dist/components/selected-outline-uv.js +6 -111
  170. package/dist/components/sequence-props-api.js +0 -10
  171. package/dist/components/use-selected-outline-control-target.js +12 -21
  172. package/dist/components/wrap-jsx-node-api.d.ts +2 -0
  173. package/dist/components/wrap-jsx-node-api.js +13 -0
  174. package/dist/error-overlay/remotion-overlay/OpenInEditor.js +45 -2
  175. package/dist/error-overlay/remotion-overlay/StackFrame.js +32 -3
  176. package/dist/esm/{CaptionQueueProcessor-npa6szn1.mjs → CaptionQueueProcessor-nr7hjcga.mjs} +63 -17
  177. package/dist/esm/LazyModels-ajkn7fs3.mjs +12 -0
  178. package/dist/esm/LazyModels-g1g7cf4e.mjs +12 -0
  179. package/dist/esm/{TranscriptionModal-79m5wgcj.mjs → TranscriptionModal-e18bzbkb.mjs} +15 -15
  180. package/dist/esm/{VideoMattingModal-31pew0xj.mjs → VideoMattingModal-5bz2s4rs.mjs} +47 -65
  181. package/dist/esm/{VideoMattingQueueProcessor-t1hgm2rm.mjs → VideoMattingQueueProcessor-4tkj0f4k.mjs} +69 -26
  182. package/dist/esm/{index-v4tr1bft.mjs → index-09txs1bj.mjs} +5 -0
  183. package/dist/esm/{index-n5gmcvhz.mjs → index-5ycb9e9q.mjs} +2 -4
  184. package/dist/esm/{index-5t2dwxsk.mjs → index-890dd9b3.mjs} +259 -21
  185. package/dist/esm/{index-ac5550e7.mjs → index-8nt6a0mw.mjs} +3 -3
  186. package/dist/esm/{index-614tdz2q.mjs → index-9q9w8v9p.mjs} +3 -3
  187. package/dist/esm/{index-s7qa3xbw.mjs → index-c2wabcdt.mjs} +6 -6
  188. package/dist/esm/{index-r1gr3j3a.mjs → index-dfy1t576.mjs} +50 -1
  189. package/dist/esm/{index-21hxsfaa.mjs → index-dh3zk2hv.mjs} +6 -25
  190. package/dist/esm/{index-4zen9prq.mjs → index-dpyss74p.mjs} +6563 -5485
  191. package/dist/esm/{index-9x6e1dq0.mjs → index-hqxc6tzp.mjs} +40 -6
  192. package/dist/esm/{index-9xxg6218.mjs → index-qve7mdfp.mjs} +19 -1
  193. package/dist/esm/{index-e855w59j.mjs → index-s6qya2gg.mjs} +3 -5
  194. package/dist/esm/index-t7tbt980.mjs +103 -0
  195. package/dist/esm/{index-r0ejh5sy.mjs → index-t7xnxdf8.mjs} +44 -26
  196. package/dist/esm/index-wqc43mw0.mjs +158 -0
  197. package/dist/esm/{index-ppspzgn9.mjs → index-x6r9bn12.mjs} +4026 -4761
  198. package/dist/esm/{index-vxwg66ar.mjs → index-xac20sv4.mjs} +44 -57
  199. package/dist/esm/index.mjs +4 -5
  200. package/dist/esm/internals.mjs +13 -13
  201. package/dist/esm/previewEntry.mjs +18 -15
  202. package/dist/esm/renderEntry.mjs +5 -1
  203. package/dist/helpers/calculate-timeline.d.ts +5 -1
  204. package/dist/helpers/calculate-timeline.js +1 -1
  205. package/dist/helpers/checkerboard-background.d.ts +2 -2
  206. package/dist/helpers/colors.d.ts +132 -112
  207. package/dist/helpers/colors.js +117 -95
  208. package/dist/helpers/create-folder-tree.js +2 -1
  209. package/dist/helpers/editor-guide-selection.d.ts +1 -1
  210. package/dist/helpers/editor-ruler.js +23 -12
  211. package/dist/helpers/get-connected-compositions.d.ts +6 -1
  212. package/dist/helpers/get-connected-compositions.js +1 -1
  213. package/dist/helpers/get-sequence-double-click-action.js +1 -1
  214. package/dist/helpers/get-sequence-visible-range.d.ts +1 -1
  215. package/dist/helpers/get-sequence-visible-range.js +2 -5
  216. package/dist/helpers/get-timeline-nestedness.d.ts +1 -1
  217. package/dist/helpers/get-timeline-nestedness.js +1 -1
  218. package/dist/helpers/get-timeline-sequence-sort-key.d.ts +1 -1
  219. package/dist/helpers/get-timeline-sequence-sort-key.js +1 -1
  220. package/dist/helpers/hoverable.js +4 -4
  221. package/dist/helpers/inject-css.js +5 -7
  222. package/dist/helpers/prism-vsc-dark-plus.d.ts +1 -1
  223. package/dist/helpers/prism-vsc-dark-plus.js +52 -51
  224. package/dist/helpers/resolve-studio-color.d.ts +1 -0
  225. package/dist/helpers/resolve-studio-color.js +11 -0
  226. package/dist/helpers/studio-css-variables.d.ts +1 -0
  227. package/dist/helpers/studio-css-variables.js +105 -0
  228. package/dist/helpers/studio-pixel-ratio.d.ts +1 -0
  229. package/dist/helpers/studio-pixel-ratio.js +7 -0
  230. package/dist/helpers/timeline-node-path-key.d.ts +1 -1
  231. package/dist/helpers/timeline-node-path-key.js +2 -2
  232. package/dist/helpers/use-runtime-values.js +2 -28
  233. package/dist/hot-middleware-client/client.js +5 -3
  234. package/dist/icons/align-center-horizontal.js +2 -1
  235. package/dist/icons/align-left.js +2 -1
  236. package/dist/icons/align-right.js +2 -1
  237. package/dist/icons/{separation.d.ts → background-removal.d.ts} +1 -1
  238. package/dist/icons/background-removal.js +9 -0
  239. package/dist/icons/wrap.d.ts +4 -0
  240. package/dist/icons/wrap.js +10 -0
  241. package/dist/previewEntry.js +2 -0
  242. package/dist/renderEntry.js +2 -0
  243. package/dist/state/modals.d.ts +15 -1
  244. package/dist/state/timeline-sequence-hover.d.ts +6 -16
  245. package/dist/state/timeline-sequence-hover.js +6 -67
  246. package/package.json +20 -19
  247. package/dist/components/Timeline/get-easing-selection-after-keyframe-delete.d.ts +0 -15
  248. package/dist/components/Timeline/get-easing-selection-after-keyframe-delete.js +0 -31
  249. package/dist/esm/LazyModels-nh3c8h9p.mjs +0 -12
  250. package/dist/esm/LazyModels-rr5v8h5y.mjs +0 -12
  251. package/dist/esm/index-cw0pnpg5.mjs +0 -50
  252. package/dist/esm/index-k426ye99.mjs +0 -139
  253. package/dist/helpers/get-box-quads-polyfill-internals.d.ts +0 -82
  254. package/dist/helpers/get-box-quads-polyfill-internals.js +0 -2403
  255. package/dist/helpers/get-box-quads-ponyfill.d.ts +0 -10
  256. package/dist/helpers/get-box-quads-ponyfill.js +0 -23
  257. package/dist/icons/separation.js +0 -7
  258. /package/dist/esm/{resolve-composition-component-location-qrp05g62.mjs → resolve-composition-component-location-2hgf6g0a.mjs} +0 -0
@@ -14,6 +14,7 @@ export declare const TimelineVideoInfo: React.NamedExoticComponent<{
14
14
  readonly muted: boolean;
15
15
  readonly marginLeft: number;
16
16
  readonly loopDisplay: LoopDisplay | undefined;
17
+ readonly loopDisplayOffsetInFrames: number;
17
18
  readonly frozenMediaFrame: number | null;
18
19
  readonly extendLastFrame: boolean;
19
20
  }>;
@@ -39,6 +39,7 @@ const timeline_utils_1 = require("@remotion/timeline-utils");
39
39
  const react_1 = __importStar(require("react"));
40
40
  const remotion_1 = require("remotion");
41
41
  const colors_1 = require("../../helpers/colors");
42
+ const studio_pixel_ratio_1 = require("../../helpers/studio-pixel-ratio");
42
43
  const timeline_layout_1 = require("../../helpers/timeline-layout");
43
44
  const AudioWaveform_1 = require("../AudioWaveform");
44
45
  const get_timeline_media_start_frame_1 = require("./get-timeline-media-start-frame");
@@ -60,7 +61,7 @@ const filmstripContainerStyle = {
60
61
  };
61
62
  const MAX_FROZEN_FRAME_CACHE_DEVIATION = timeline_utils_1.WEBCODECS_TIMESCALE * 0.05;
62
63
  const TimelineVideoInfoSegment = ({ src, visualizationWidth, startMediaFrom, mediaFrameAtSequenceZero, sequenceFrameOffset, durationInFrames, sourceOffsetInFrames, tiledLoop, playbackRate, volume, doesVolumeChange, muted, frozenMediaFrame, extendLastFrame, }) => {
63
- var _a, _b;
64
+ var _a, _b, _c;
64
65
  const { fps } = (0, remotion_1.useVideoConfig)();
65
66
  const resolvedSrc = remotion_1.Internals.usePreload(src);
66
67
  const ref = (0, react_1.useRef)(null);
@@ -83,7 +84,7 @@ const TimelineVideoInfoSegment = ({ src, visualizationWidth, startMediaFrom, med
83
84
  return;
84
85
  }
85
86
  const controller = new AbortController();
86
- const pixelRatio = window.devicePixelRatio;
87
+ const pixelRatio = (0, studio_pixel_ratio_1.getStudioPixelRatio)();
87
88
  const canvas = document.createElement('canvas');
88
89
  canvas.width = Math.ceil(visualizationWidth * pixelRatio);
89
90
  canvas.height = Math.ceil(timeline_layout_1.TIMELINE_LAYER_FILMSTRIP_HEIGHT * pixelRatio);
@@ -207,7 +208,8 @@ const TimelineVideoInfoSegment = ({ src, visualizationWidth, startMediaFrom, med
207
208
  if (!pattern) {
208
209
  return;
209
210
  }
210
- const phase = (tiledLoop.displayOffsetInFrames %
211
+ const phase = ((tiledLoop.displayOffsetInFrames +
212
+ tiledLoop.loopDisplayOffsetInFrames) %
211
213
  tiledLoop.loopDisplay.durationInFrames) *
212
214
  ((tiledLoop.loopWidth * pixelRatio) /
213
215
  tiledLoop.loopDisplay.durationInFrames);
@@ -387,13 +389,11 @@ const TimelineVideoInfoSegment = ({ src, visualizationWidth, startMediaFrom, med
387
389
  };
388
390
  }, [visualizationWidth]);
389
391
  return (jsx_runtime_1.jsxs("div", { style: segmentStyle, children: [
390
- 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, displayOffsetInFrames: (_a = tiledLoop === null || tiledLoop === void 0 ? void 0 : tiledLoop.displayOffsetInFrames) !== null && _a !== void 0 ? _a : 0, displayDurationInFrames: (_b = tiledLoop === null || tiledLoop === void 0 ? void 0 : tiledLoop.displayDurationInFrames) !== null && _b !== void 0 ? _b : durationInFrames, volume: volume, doesVolumeChange: doesVolumeChange, muted: muted, playbackRate: playbackRate, loopDisplay: tiledLoop === null || tiledLoop === void 0 ? void 0 : tiledLoop.loopDisplay }) })
392
+ 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, displayOffsetInFrames: (_a = tiledLoop === null || tiledLoop === void 0 ? void 0 : tiledLoop.displayOffsetInFrames) !== null && _a !== void 0 ? _a : 0, loopDisplayOffsetInFrames: (_b = tiledLoop === null || tiledLoop === void 0 ? void 0 : tiledLoop.loopDisplayOffsetInFrames) !== null && _b !== void 0 ? _b : 0, displayDurationInFrames: (_c = tiledLoop === null || tiledLoop === void 0 ? void 0 : tiledLoop.displayDurationInFrames) !== null && _c !== void 0 ? _c : durationInFrames, volume: volume, doesVolumeChange: doesVolumeChange, muted: muted, playbackRate: playbackRate, loopDisplay: tiledLoop === null || tiledLoop === void 0 ? void 0 : tiledLoop.loopDisplay }) })
391
393
  ] }));
392
394
  };
393
395
  const getVisibleSegments = ({ displayDurationInFrames, displayOffsetInFrames, loopDisplay, }) => {
394
- if (!loopDisplay ||
395
- loopDisplay.numberOfTimes <= 1 ||
396
- loopDisplay.durationInFrames <= 0) {
396
+ if (!loopDisplay || loopDisplay.durationInFrames <= 0) {
397
397
  return [
398
398
  {
399
399
  key: 'single',
@@ -416,7 +416,7 @@ const getVisibleSegments = ({ displayDurationInFrames, displayOffsetInFrames, lo
416
416
  };
417
417
  });
418
418
  };
419
- const TimelineVideoInfoInner = ({ src, visualizationWidth, displayOffsetInFrames, displayDurationInFrames, startMediaFrom, mediaFrameAtSequenceZero, sequenceFrameOffset, playbackRate, volume, doesVolumeChange, muted, marginLeft, loopDisplay, frozenMediaFrame, extendLastFrame, }) => {
419
+ const TimelineVideoInfoInner = ({ src, visualizationWidth, displayOffsetInFrames, displayDurationInFrames, startMediaFrom, mediaFrameAtSequenceZero, sequenceFrameOffset, playbackRate, volume, doesVolumeChange, muted, marginLeft, loopDisplay, loopDisplayOffsetInFrames, frozenMediaFrame, extendLastFrame, }) => {
420
420
  const pixelsPerFrame = visualizationWidth / displayDurationInFrames;
421
421
  const loopWidth = loopDisplay
422
422
  ? loopDisplay.durationInFrames * pixelsPerFrame
@@ -431,12 +431,14 @@ const TimelineVideoInfoInner = ({ src, visualizationWidth, displayOffsetInFrames
431
431
  return {
432
432
  displayDurationInFrames,
433
433
  displayOffsetInFrames,
434
+ loopDisplayOffsetInFrames,
434
435
  loopDisplay,
435
436
  loopWidth,
436
437
  };
437
438
  }, [
438
439
  displayDurationInFrames,
439
440
  displayOffsetInFrames,
441
+ loopDisplayOffsetInFrames,
440
442
  loopDisplay,
441
443
  loopWidth,
442
444
  shouldTileLoop,
@@ -447,12 +449,13 @@ const TimelineVideoInfoInner = ({ src, visualizationWidth, displayOffsetInFrames
447
449
  }
448
450
  return getVisibleSegments({
449
451
  displayDurationInFrames,
450
- displayOffsetInFrames,
452
+ displayOffsetInFrames: displayOffsetInFrames + loopDisplayOffsetInFrames,
451
453
  loopDisplay,
452
454
  });
453
455
  }, [
454
456
  displayDurationInFrames,
455
457
  displayOffsetInFrames,
458
+ loopDisplayOffsetInFrames,
456
459
  loopDisplay,
457
460
  shouldTileLoop,
458
461
  ]);
@@ -465,6 +468,6 @@ const TimelineVideoInfoInner = ({ src, visualizationWidth, displayOffsetInFrames
465
468
  .slice(Math.max(0, Math.floor(segmentDisplayOffsetInFrames)), Math.min(values.length, Math.ceil(segmentDisplayOffsetInFrames + segmentDurationInFrames)))
466
469
  .join(',');
467
470
  };
468
- return (jsx_runtime_1.jsx("div", { style: { display: 'flex', marginLeft, height: '100%' }, children: tiledLoop ? (jsx_runtime_1.jsx(TimelineVideoInfoSegment, { src: src, visualizationWidth: visualizationWidth, startMediaFrom: startMediaFrom, mediaFrameAtSequenceZero: mediaFrameAtSequenceZero, sequenceFrameOffset: sequenceFrameOffset, durationInFrames: tiledLoop.loopDisplay.durationInFrames, sourceOffsetInFrames: 0, tiledLoop: tiledLoop, playbackRate: playbackRate, volume: volume, doesVolumeChange: doesVolumeChange, muted: muted, frozenMediaFrame: frozenMediaFrame, extendLastFrame: extendLastFrame })) : (segments.map((segment) => (jsx_runtime_1.jsx(TimelineVideoInfoSegment, { src: src, visualizationWidth: segment.durationInFrames * pixelsPerFrame, startMediaFrom: startMediaFrom, mediaFrameAtSequenceZero: mediaFrameAtSequenceZero, sequenceFrameOffset: sequenceFrameOffset, durationInFrames: segment.durationInFrames, sourceOffsetInFrames: segment.sourceOffsetInFrames, tiledLoop: null, playbackRate: playbackRate, volume: getSegmentVolume(segment.sourceOffsetInFrames, segment.durationInFrames), doesVolumeChange: doesVolumeChange, muted: muted, frozenMediaFrame: frozenMediaFrame, extendLastFrame: extendLastFrame }, segment.key)))) }));
471
+ return (jsx_runtime_1.jsx("div", { style: { display: 'flex', marginLeft, height: '100%' }, children: tiledLoop ? (jsx_runtime_1.jsx(TimelineVideoInfoSegment, { src: src, visualizationWidth: visualizationWidth, startMediaFrom: startMediaFrom, mediaFrameAtSequenceZero: mediaFrameAtSequenceZero, sequenceFrameOffset: sequenceFrameOffset, durationInFrames: tiledLoop.loopDisplay.durationInFrames, sourceOffsetInFrames: 0, tiledLoop: tiledLoop, playbackRate: playbackRate, volume: volume, doesVolumeChange: doesVolumeChange, muted: muted, frozenMediaFrame: frozenMediaFrame, extendLastFrame: extendLastFrame })) : (segments.map((segment) => (jsx_runtime_1.jsx(TimelineVideoInfoSegment, { src: src, visualizationWidth: segment.durationInFrames * pixelsPerFrame, startMediaFrom: startMediaFrom, mediaFrameAtSequenceZero: mediaFrameAtSequenceZero, sequenceFrameOffset: sequenceFrameOffset, durationInFrames: segment.durationInFrames, sourceOffsetInFrames: segment.sourceOffsetInFrames, tiledLoop: null, playbackRate: playbackRate, volume: getSegmentVolume(segment.displayOffsetInFrames - loopDisplayOffsetInFrames, segment.durationInFrames), doesVolumeChange: doesVolumeChange, muted: muted, frozenMediaFrame: frozenMediaFrame, extendLastFrame: extendLastFrame }, segment.key)))) }));
469
472
  };
470
473
  exports.TimelineVideoInfo = react_1.default.memo(TimelineVideoInfoInner);
@@ -19,7 +19,7 @@ const getValueWhenLastKeyframeDeleted = ({ propStatus, playheadSourceFrame, }) =
19
19
  };
20
20
  const getSelectedKeyframeDeletion = ({ nodePathInfo, frame, sequences, overrideIdsToNodePaths, propStatuses, timelinePosition, }) => {
21
21
  var _a;
22
- var _b, _c, _d;
22
+ var _b, _c, _d, _e, _f, _g, _h, _j, _k;
23
23
  const field = (0, parse_keyframe_field_from_node_path_1.parseKeyframeFieldFromNodePath)(nodePathInfo.auxiliaryKeys);
24
24
  if (field === null) {
25
25
  return null;
@@ -51,9 +51,16 @@ const getSelectedKeyframeDeletion = ({ nodePathInfo, frame, sequences, overrideI
51
51
  const effectKeyframeDisplayOffset = (0, get_timeline_keyframes_1.getKeyframeDisplayOffset)({
52
52
  propStatus: effectPropStatus,
53
53
  keyframeDisplayOffset: (_c = track === null || track === void 0 ? void 0 : track.keyframeDisplayOffset) !== null && _c !== void 0 ? _c : 0,
54
+ keyframePlaybackRate: (_d = track === null || track === void 0 ? void 0 : track.keyframePlaybackRate) !== null && _d !== void 0 ? _d : 1,
54
55
  });
55
- const effectSourceFrame = frame - effectKeyframeDisplayOffset;
56
- const effectPlayheadSourceFrame = timelinePosition - effectKeyframeDisplayOffset;
56
+ const effectSourceFrame = (0, get_timeline_keyframes_1.getKeyframeSourceFrame)({
57
+ displayFrame: frame,
58
+ keyframeDisplayOffset: effectKeyframeDisplayOffset,
59
+ keyframePlaybackRate: (_e = track === null || track === void 0 ? void 0 : track.keyframePlaybackRate) !== null && _e !== void 0 ? _e : 1,
60
+ propStatus: effectPropStatus,
61
+ });
62
+ const effectPlayheadSourceFrame = (timelinePosition - effectKeyframeDisplayOffset) *
63
+ ((_f = track === null || track === void 0 ? void 0 : track.keyframePlaybackRate) !== null && _f !== void 0 ? _f : 1);
57
64
  const effectValueWhenLastKeyframeDeleted = getValueWhenLastKeyframeDeleted({
58
65
  propStatus: effectPropStatus,
59
66
  playheadSourceFrame: effectPlayheadSourceFrame,
@@ -71,13 +78,20 @@ const getSelectedKeyframeDeletion = ({ nodePathInfo, frame, sequences, overrideI
71
78
  }
72
79
  const sequencePropStatus = (_a = remotion_1.Internals.getPropStatusesCtx(propStatuses, nodePath)) === null || _a === void 0 ? void 0 : _a[field.fieldKey];
73
80
  const keyframeDisplayOffset = (0, get_timeline_keyframes_1.getKeyframeDisplayOffset)({
74
- propStatus: sequencePropStatus,
75
- keyframeDisplayOffset: (_d = track === null || track === void 0 ? void 0 : track.keyframeDisplayOffset) !== null && _d !== void 0 ? _d : 0,
81
+ propStatus: sequencePropStatus !== null && sequencePropStatus !== void 0 ? sequencePropStatus : null,
82
+ keyframeDisplayOffset: (_g = track === null || track === void 0 ? void 0 : track.keyframeDisplayOffset) !== null && _g !== void 0 ? _g : 0,
83
+ keyframePlaybackRate: (_h = track === null || track === void 0 ? void 0 : track.keyframePlaybackRate) !== null && _h !== void 0 ? _h : 1,
84
+ });
85
+ const sourceFrame = (0, get_timeline_keyframes_1.getKeyframeSourceFrame)({
86
+ displayFrame: frame,
87
+ keyframeDisplayOffset,
88
+ keyframePlaybackRate: (_j = track === null || track === void 0 ? void 0 : track.keyframePlaybackRate) !== null && _j !== void 0 ? _j : 1,
89
+ propStatus: sequencePropStatus !== null && sequencePropStatus !== void 0 ? sequencePropStatus : null,
76
90
  });
77
- const sourceFrame = frame - keyframeDisplayOffset;
78
- const playheadSourceFrame = timelinePosition - keyframeDisplayOffset;
91
+ const playheadSourceFrame = (timelinePosition - keyframeDisplayOffset) *
92
+ ((_k = track === null || track === void 0 ? void 0 : track.keyframePlaybackRate) !== null && _k !== void 0 ? _k : 1);
79
93
  const sequenceValueWhenLastKeyframeDeleted = getValueWhenLastKeyframeDeleted({
80
- propStatus: sequencePropStatus,
94
+ propStatus: sequencePropStatus !== null && sequencePropStatus !== void 0 ? sequencePropStatus : null,
81
95
  playheadSourceFrame,
82
96
  });
83
97
  return {
@@ -3,12 +3,8 @@ import type { SequenceNodePathInfo } from '../../helpers/get-timeline-sequence-s
3
3
  import type { ConfirmationDialogFunction } from '../ConfirmationDialog-types';
4
4
  import type { SetPropStatuses } from './save-sequence-prop';
5
5
  export declare const deleteSequencesFromSource: (nodePathInfos: SequenceNodePathInfo[], confirm: ConfirmationDialogFunction) => Promise<boolean>;
6
- export declare const getTimelineSelectionAfterDeletingItems: ({ selections, sequences, overrideIdsToNodePaths, propStatuses, timelinePosition, }: {
6
+ export declare const getTimelineSelectionAfterDeletingItems: ({ selections, }: {
7
7
  readonly selections: readonly import("@remotion/canvas").CanvasSelectionItem[];
8
- readonly sequences?: TSequence[] | undefined;
9
- readonly overrideIdsToNodePaths?: OverrideIdToNodePaths | undefined;
10
- readonly propStatuses?: PropStatuses | undefined;
11
- readonly timelinePosition?: number | undefined;
12
8
  }) => readonly import("@remotion/canvas").CanvasSelectionItem[];
13
9
  export declare const deleteSelectedTimelineItems: ({ selections, sequences, overrideIdsToNodePaths, setPropStatuses, clientId, confirm, propStatuses, timelinePosition, }: {
14
10
  selections: readonly import("@remotion/canvas").CanvasSelectionItem[];
@@ -1,18 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.deleteSelectedTimelineItems = exports.getTimelineSelectionAfterDeletingItems = exports.deleteSequencesFromSource = void 0;
4
- const remotion_1 = require("remotion");
5
4
  const browser_studio_operations_1 = require("../../helpers/browser-studio-operations");
6
5
  const delete_jsx_nodes_api_1 = require("../delete-jsx-nodes-api");
7
6
  const effect_operations_api_1 = require("../effect-operations-api");
8
7
  const NotificationCenter_1 = require("../Notifications/NotificationCenter");
9
8
  const delete_selected_keyframe_1 = require("./delete-selected-keyframe");
10
- const find_track_for_node_path_info_1 = require("./find-track-for-node-path-info");
11
- const get_easing_selection_after_keyframe_delete_1 = require("./get-easing-selection-after-keyframe-delete");
12
- const get_timeline_keyframes_1 = require("./get-timeline-keyframes");
13
- const parse_keyframe_field_from_node_path_1 = require("./parse-keyframe-field-from-node-path");
14
9
  const TimelineSelection_1 = require("./TimelineSelection");
15
- const update_selected_easing_1 = require("./update-selected-easing");
16
10
  const confirmDeletingDuplicatedSequences = (nodePathInfos, confirm) => {
17
11
  const duplicatedNodePathInfos = nodePathInfos.filter((nodePathInfo) => nodePathInfo.numberOfSequencesWithThisNodePath > 1);
18
12
  if (duplicatedNodePathInfos.length === 0) {
@@ -111,95 +105,15 @@ const getSequenceSelectionAfterDeletingEffect = (selection) => {
111
105
  },
112
106
  };
113
107
  };
114
- const getEasingSelectionAfterDeletingKeyframes = ({ selections, sequences, overrideIdsToNodePaths, propStatuses, timelinePosition, }) => {
115
- var _a;
116
- if (sequences === undefined ||
117
- overrideIdsToNodePaths === undefined ||
118
- propStatuses === undefined ||
119
- timelinePosition === undefined) {
120
- return null;
121
- }
122
- const keyframeSelections = selections.filter(isKeyframeSelection);
123
- if (keyframeSelections.length !== 1) {
124
- return null;
125
- }
126
- const [selection] = keyframeSelections;
127
- if (!selection) {
128
- return null;
129
- }
130
- const field = (0, parse_keyframe_field_from_node_path_1.parseKeyframeFieldFromNodePath)(selection.nodePathInfo.auxiliaryKeys);
131
- if (field === null) {
132
- return null;
133
- }
134
- const track = (0, find_track_for_node_path_info_1.findTrackForNodePathInfo)({
135
- sequences,
136
- overrideIdsToNodePaths,
137
- nodePathInfo: selection.nodePathInfo,
138
- });
139
- if (!track || !track.sequence.controls) {
140
- return null;
141
- }
142
- const nodePath = selection.nodePathInfo.sequenceSubscriptionKey;
143
- if (field.type === 'sequence') {
144
- const sequencePropStatus = (_a = remotion_1.Internals.getPropStatusesCtx(propStatuses, nodePath)) === null || _a === void 0 ? void 0 : _a[field.fieldKey];
145
- if ((sequencePropStatus === null || sequencePropStatus === void 0 ? void 0 : sequencePropStatus.status) !== 'keyframed' ||
146
- !(0, update_selected_easing_1.canEditEasingForInterpolationFunction)(sequencePropStatus.interpolationFunction)) {
147
- return null;
148
- }
149
- return (0, get_easing_selection_after_keyframe_delete_1.getEasingSelectionAfterKeyframeDelete)({
150
- deletedSourceFrames: [
151
- selection.frame -
152
- (0, get_timeline_keyframes_1.getKeyframeDisplayOffset)({
153
- propStatus: sequencePropStatus,
154
- keyframeDisplayOffset: track.keyframeDisplayOffset,
155
- }),
156
- ],
157
- keyframeDisplayOffset: track.keyframeDisplayOffset,
158
- nodePathInfo: selection.nodePathInfo,
159
- propStatus: sequencePropStatus,
160
- timelinePosition,
161
- });
162
- }
163
- const effectStatus = remotion_1.Internals.getEffectPropStatusesCtx({
164
- propStatuses,
165
- nodePath,
166
- effectIndex: field.effectIndex,
167
- });
168
- const effectPropStatus = effectStatus.type === 'can-update-effect'
169
- ? effectStatus.props[field.fieldKey]
170
- : null;
171
- if ((effectPropStatus === null || effectPropStatus === void 0 ? void 0 : effectPropStatus.status) !== 'keyframed' ||
172
- !(0, update_selected_easing_1.canEditEasingForInterpolationFunction)(effectPropStatus.interpolationFunction)) {
173
- return null;
174
- }
175
- return (0, get_easing_selection_after_keyframe_delete_1.getEasingSelectionAfterKeyframeDelete)({
176
- deletedSourceFrames: [
177
- selection.frame -
178
- (0, get_timeline_keyframes_1.getKeyframeDisplayOffset)({
179
- propStatus: effectPropStatus,
180
- keyframeDisplayOffset: track.keyframeDisplayOffset,
181
- }),
182
- ],
183
- keyframeDisplayOffset: track.keyframeDisplayOffset,
184
- nodePathInfo: selection.nodePathInfo,
185
- propStatus: effectPropStatus,
186
- timelinePosition,
187
- });
188
- };
189
- const getTimelineSelectionAfterDeletingItems = ({ selections, sequences, overrideIdsToNodePaths, propStatuses, timelinePosition, }) => {
190
- const easingSelection = getEasingSelectionAfterDeletingKeyframes({
191
- selections,
192
- sequences,
193
- overrideIdsToNodePaths,
194
- propStatuses,
195
- timelinePosition,
196
- });
197
- if (easingSelection !== null) {
198
- return [easingSelection];
199
- }
108
+ const getTimelineSelectionAfterDeletingItems = ({ selections, }) => {
200
109
  const nextSelections = new Map();
201
110
  for (const selection of selections) {
202
- const nextSelection = getSequenceSelectionAfterDeletingEffect(selection);
111
+ if (selection.type === 'easing') {
112
+ continue;
113
+ }
114
+ const nextSelection = selection.type === 'keyframe'
115
+ ? (0, TimelineSelection_1.getTimelineSelectionFromNodePathInfo)(selection.nodePathInfo)
116
+ : getSequenceSelectionAfterDeletingEffect(selection);
203
117
  if (!nextSelection) {
204
118
  return [];
205
119
  }
@@ -8,9 +8,10 @@ type AnimationItemSelection = Extract<TimelineSelection, {
8
8
  type AnimationKeyframe = {
9
9
  readonly frame: number;
10
10
  };
11
- export declare const getAnimationItemSelectionForSourceFrame: ({ includeEasings, keyframeDisplayOffset, keyframes, nodePathInfo, sourceFrame, }: {
11
+ export declare const getAnimationItemSelectionForSourceFrame: ({ includeEasings, keyframeDisplayOffset, keyframePlaybackRate, keyframes, nodePathInfo, sourceFrame, }: {
12
12
  readonly includeEasings: boolean;
13
13
  readonly keyframeDisplayOffset: number;
14
+ readonly keyframePlaybackRate: number;
14
15
  readonly keyframes: readonly AnimationKeyframe[];
15
16
  readonly nodePathInfo: SequenceNodePathInfo;
16
17
  readonly sourceFrame: number;
@@ -1,14 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getAnimationItemSelectionForSourceFrame = void 0;
4
- const getKeyframeSelection = ({ keyframe, keyframeDisplayOffset, nodePathInfo, }) => {
4
+ const getKeyframeSelection = ({ keyframe, keyframeDisplayOffset, keyframePlaybackRate, nodePathInfo, }) => {
5
5
  return {
6
6
  type: 'keyframe',
7
7
  nodePathInfo,
8
- frame: keyframe.frame + keyframeDisplayOffset,
8
+ frame: keyframe.frame / keyframePlaybackRate + keyframeDisplayOffset,
9
9
  };
10
10
  };
11
- const getAnimationItemSelectionForSourceFrame = ({ includeEasings, keyframeDisplayOffset, keyframes, nodePathInfo, sourceFrame, }) => {
11
+ const getAnimationItemSelectionForSourceFrame = ({ includeEasings, keyframeDisplayOffset, keyframePlaybackRate, keyframes, nodePathInfo, sourceFrame, }) => {
12
12
  const firstKeyframe = keyframes[0];
13
13
  if (!firstKeyframe) {
14
14
  return null;
@@ -19,6 +19,7 @@ const getAnimationItemSelectionForSourceFrame = ({ includeEasings, keyframeDispl
19
19
  return getKeyframeSelection({
20
20
  keyframe,
21
21
  keyframeDisplayOffset,
22
+ keyframePlaybackRate,
22
23
  nodePathInfo,
23
24
  });
24
25
  }
@@ -33,8 +34,8 @@ const getAnimationItemSelectionForSourceFrame = ({ includeEasings, keyframeDispl
33
34
  return {
34
35
  type: 'easing',
35
36
  nodePathInfo,
36
- fromFrame: keyframe.frame + keyframeDisplayOffset,
37
- toFrame: nextKeyframe.frame + keyframeDisplayOffset,
37
+ fromFrame: keyframe.frame / keyframePlaybackRate + keyframeDisplayOffset,
38
+ toFrame: nextKeyframe.frame / keyframePlaybackRate + keyframeDisplayOffset,
38
39
  segmentIndex: i,
39
40
  };
40
41
  }
@@ -43,6 +44,7 @@ const getAnimationItemSelectionForSourceFrame = ({ includeEasings, keyframeDispl
43
44
  return getKeyframeSelection({
44
45
  keyframe: sourceFrame < firstKeyframe.frame ? firstKeyframe : lastKeyframe,
45
46
  keyframeDisplayOffset,
47
+ keyframePlaybackRate,
46
48
  nodePathInfo,
47
49
  });
48
50
  };
@@ -0,0 +1,23 @@
1
+ import type { CanUpdateSequencePropStatusKeyframed, InteractivitySchema, PropStatuses, SequencePropsSubscriptionKey, TSequence } from 'remotion';
2
+ export type TimelineSequenceKeyframeDragTarget = {
3
+ readonly parentPlaybackRate: number;
4
+ readonly fileName: string;
5
+ readonly fieldKey: string;
6
+ readonly isDescendant: boolean;
7
+ readonly nodePath: SequencePropsSubscriptionKey;
8
+ readonly schema: InteractivitySchema;
9
+ readonly status: CanUpdateSequencePropStatusKeyframed;
10
+ };
11
+ export type TimelineSequenceEffectKeyframeDragTarget = TimelineSequenceKeyframeDragTarget & {
12
+ readonly effectIndex: number;
13
+ };
14
+ export declare const getKeyframedSequenceDragTargets: ({ nodePath, sequence, sequences, propStatuses, isDescendant, }: {
15
+ readonly nodePath: SequencePropsSubscriptionKey;
16
+ readonly sequence: TSequence;
17
+ readonly sequences: TSequence[];
18
+ readonly propStatuses: PropStatuses;
19
+ readonly isDescendant: boolean;
20
+ }) => {
21
+ readonly effectKeyframes: TimelineSequenceEffectKeyframeDragTarget[];
22
+ readonly sequenceKeyframes: TimelineSequenceKeyframeDragTarget[];
23
+ };
@@ -0,0 +1,57 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getKeyframedSequenceDragTargets = void 0;
4
+ const canvas_1 = require("@remotion/canvas");
5
+ const remotion_1 = require("remotion");
6
+ const { getParentSequencePlaybackRate } = canvas_1.CanvasInternals;
7
+ const getKeyframedSequenceDragTargets = ({ nodePath, sequence, sequences, propStatuses, isDescendant, }) => {
8
+ var _a;
9
+ const status = propStatuses[remotion_1.Internals.makeSequencePropsSubscriptionKey(nodePath)];
10
+ if (status === null || status === undefined || !status.canUpdate) {
11
+ return { effectKeyframes: [], sequenceKeyframes: [] };
12
+ }
13
+ const sequenceSchema = (_a = sequence.controls) === null || _a === void 0 ? void 0 : _a.schema;
14
+ const sequenceKeyframes = sequenceSchema === undefined
15
+ ? []
16
+ : Object.entries(status.props).flatMap(([fieldKey, propStatus]) => propStatus.status === 'keyframed' &&
17
+ (!isDescendant || propStatus.keyframeDisplayOffsetAdjustment !== null)
18
+ ? [
19
+ {
20
+ parentPlaybackRate: getParentSequencePlaybackRate(sequence, sequences),
21
+ fileName: nodePath.absolutePath,
22
+ fieldKey,
23
+ isDescendant,
24
+ nodePath,
25
+ schema: sequenceSchema,
26
+ status: propStatus,
27
+ },
28
+ ]
29
+ : []);
30
+ const effectKeyframes = status.effects.flatMap((effectStatus) => {
31
+ var _a;
32
+ if (!effectStatus.canUpdate) {
33
+ return [];
34
+ }
35
+ const effectSchema = (_a = sequence.effects[effectStatus.effectIndex]) === null || _a === void 0 ? void 0 : _a.schema;
36
+ if (effectSchema === undefined) {
37
+ return [];
38
+ }
39
+ return Object.entries(effectStatus.props).flatMap(([fieldKey, propStatus]) => propStatus.status === 'keyframed' &&
40
+ (!isDescendant || propStatus.keyframeDisplayOffsetAdjustment !== null)
41
+ ? [
42
+ {
43
+ effectIndex: effectStatus.effectIndex,
44
+ parentPlaybackRate: getParentSequencePlaybackRate(sequence, sequences),
45
+ fileName: nodePath.absolutePath,
46
+ fieldKey,
47
+ isDescendant,
48
+ nodePath,
49
+ schema: effectSchema,
50
+ status: propStatus,
51
+ },
52
+ ]
53
+ : []);
54
+ });
55
+ return { effectKeyframes, sequenceKeyframes };
56
+ };
57
+ exports.getKeyframedSequenceDragTargets = getKeyframedSequenceDragTargets;
@@ -1,10 +1,11 @@
1
1
  import { type GetDragOverrides, type GetEffectDragOverrides, type PropStatuses, type SequencePropsSubscriptionKey } from 'remotion';
2
2
  import type { TimelineTreeNode } from '../../helpers/timeline-layout';
3
- export declare const getNodeKeyframes: ({ node, nodePath, propStatuses, keyframeDisplayOffset, getDragOverrides, getEffectDragOverrides, timelinePosition, }: {
3
+ export declare const getNodeKeyframes: ({ node, nodePath, propStatuses, keyframeDisplayOffset, keyframePlaybackRate, getDragOverrides, getEffectDragOverrides, timelinePosition, }: {
4
4
  node: TimelineTreeNode;
5
5
  nodePath: SequencePropsSubscriptionKey;
6
6
  propStatuses: PropStatuses;
7
7
  keyframeDisplayOffset: number;
8
+ keyframePlaybackRate: number;
8
9
  getDragOverrides: GetDragOverrides;
9
10
  getEffectDragOverrides: GetEffectDragOverrides;
10
11
  timelinePosition: number;
@@ -4,11 +4,11 @@ exports.getNodeHasKeyframes = exports.getNodeKeyframes = void 0;
4
4
  const remotion_1 = require("remotion");
5
5
  const get_timeline_keyframes_1 = require("./get-timeline-keyframes");
6
6
  const hasOverride = (overrides, key) => Object.prototype.hasOwnProperty.call(overrides, key);
7
- const withDragOverrideKeyframe = ({ propStatus, keyframeDisplayOffset, timelinePosition, dragOverrideValue, hasDragOverride, }) => {
7
+ const withDragOverrideKeyframe = ({ propStatus, keyframeDisplayOffset, keyframePlaybackRate, timelinePosition, dragOverrideValue, hasDragOverride, }) => {
8
8
  if ((dragOverrideValue === null || dragOverrideValue === void 0 ? void 0 : dragOverrideValue.type) === 'keyframed') {
9
- return (0, get_timeline_keyframes_1.getTimelineKeyframes)(dragOverrideValue.status, keyframeDisplayOffset);
9
+ return (0, get_timeline_keyframes_1.getTimelineKeyframes)(dragOverrideValue.status, keyframeDisplayOffset, keyframePlaybackRate);
10
10
  }
11
- const keyframes = (0, get_timeline_keyframes_1.getTimelineKeyframes)(propStatus, keyframeDisplayOffset);
11
+ const keyframes = (0, get_timeline_keyframes_1.getTimelineKeyframes)(propStatus, keyframeDisplayOffset, keyframePlaybackRate);
12
12
  if (!hasDragOverride || (propStatus === null || propStatus === void 0 ? void 0 : propStatus.status) !== 'keyframed') {
13
13
  return keyframes;
14
14
  }
@@ -22,7 +22,7 @@ const withDragOverrideKeyframe = ({ propStatus, keyframeDisplayOffset, timelineP
22
22
  }
23
23
  return [...keyframes, dragKeyframe].sort((first, second) => first.frame - second.frame);
24
24
  };
25
- const getNodeKeyframes = ({ node, nodePath, propStatuses, keyframeDisplayOffset, getDragOverrides, getEffectDragOverrides, timelinePosition, }) => {
25
+ const getNodeKeyframes = ({ node, nodePath, propStatuses, keyframeDisplayOffset, keyframePlaybackRate, getDragOverrides, getEffectDragOverrides, timelinePosition, }) => {
26
26
  var _a, _b;
27
27
  if (node.kind !== 'field' || node.field === null) {
28
28
  return [];
@@ -32,6 +32,7 @@ const getNodeKeyframes = ({ node, nodePath, propStatuses, keyframeDisplayOffset,
32
32
  return withDragOverrideKeyframe({
33
33
  propStatus: (_a = remotion_1.Internals.getPropStatusesCtx(propStatuses, nodePath)) === null || _a === void 0 ? void 0 : _a[node.field.key],
34
34
  keyframeDisplayOffset,
35
+ keyframePlaybackRate,
35
36
  timelinePosition,
36
37
  dragOverrideValue: dragOverrides[node.field.key],
37
38
  hasDragOverride: hasOverride(dragOverrides, node.field.key),
@@ -48,6 +49,7 @@ const getNodeKeyframes = ({ node, nodePath, propStatuses, keyframeDisplayOffset,
48
49
  ? (_b = effectStatus.props) === null || _b === void 0 ? void 0 : _b[node.field.key]
49
50
  : null,
50
51
  keyframeDisplayOffset,
52
+ keyframePlaybackRate,
51
53
  timelinePosition,
52
54
  dragOverrideValue: effectDragOverrides[node.field.key],
53
55
  hasDragOverride: hasOverride(effectDragOverrides, node.field.key),
@@ -0,0 +1,21 @@
1
+ import type { CanUpdateSequencePropStatusKeyframed, OverrideIdToNodePaths, PropStatuses, SequencePropsSubscriptionKey, TSequence } from 'remotion';
2
+ import type { MoveEffectKeyframeChange, MoveSequenceKeyframeChange } from './call-move-keyframe';
3
+ type KeyframePreview = {
4
+ readonly nodePath: SequencePropsSubscriptionKey;
5
+ readonly fieldKey: string;
6
+ readonly effectIndex: number | null;
7
+ readonly status: CanUpdateSequencePropStatusKeyframed;
8
+ };
9
+ export declare const getPlaybackRateKeyframeChanges: ({ nodePath, sequences, overrideIdsToNodePaths, propStatuses, previousPlaybackRate, playbackRate, }: {
10
+ readonly nodePath: SequencePropsSubscriptionKey;
11
+ readonly sequences: TSequence[];
12
+ readonly overrideIdsToNodePaths: OverrideIdToNodePaths;
13
+ readonly propStatuses: PropStatuses;
14
+ readonly previousPlaybackRate: number;
15
+ readonly playbackRate: number;
16
+ }) => {
17
+ readonly sequenceKeyframes: MoveSequenceKeyframeChange[];
18
+ readonly effectKeyframes: MoveEffectKeyframeChange[];
19
+ readonly previews: KeyframePreview[];
20
+ };
21
+ export {};