@remotion/studio 4.0.485 → 4.0.487

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 (275) hide show
  1. package/dist/ResolveCompositionConfigInStudio.js +42 -0
  2. package/dist/components/AssetSelector.js +1 -1
  3. package/dist/components/AssetSelectorItem.js +9 -9
  4. package/dist/components/AudioWaveform.js +3 -3
  5. package/dist/components/Button.js +2 -2
  6. package/dist/components/Canvas.js +28 -0
  7. package/dist/components/CanvasOrLoading.js +1 -1
  8. package/dist/components/CheckboardToggle.js +1 -1
  9. package/dist/components/Checkbox.js +3 -3
  10. package/dist/components/ColorPicker/AlphaSlider.js +4 -3
  11. package/dist/components/ColorPicker/ColorPicker.js +4 -4
  12. package/dist/components/ColorPicker/ColorPickerPopup.js +10 -10
  13. package/dist/components/ColorPicker/HueSlider.js +4 -3
  14. package/dist/components/ColorPicker/SaturationValueArea.js +5 -4
  15. package/dist/components/ColorPicker/checker.d.ts +1 -1
  16. package/dist/components/ColorPicker/checker.js +3 -3
  17. package/dist/components/CompactExplanation.js +3 -3
  18. package/dist/components/CompositionSelector.js +141 -5
  19. package/dist/components/CompositionSelectorItem.d.ts +1 -0
  20. package/dist/components/CompositionSelectorItem.js +103 -11
  21. package/dist/components/ContextMenu.js +2 -1
  22. package/dist/components/CopyButton.js +3 -2
  23. package/dist/components/CurrentAsset.d.ts +3 -1
  24. package/dist/components/CurrentAsset.js +15 -2
  25. package/dist/components/CurrentComposition.js +43 -2
  26. package/dist/components/EditorContexts.js +2 -1
  27. package/dist/components/EffectPickerModal.js +1 -1
  28. package/dist/components/FilePreview.js +2 -1
  29. package/dist/components/FpsCounter.js +3 -2
  30. package/dist/components/FullscreenToggle.js +2 -1
  31. package/dist/components/GlobalKeybindings.js +19 -12
  32. package/dist/components/InlineAction.js +2 -2
  33. package/dist/components/InlineEditableTitle.d.ts +1 -0
  34. package/dist/components/InlineEditableTitle.js +12 -7
  35. package/dist/components/InspectorInfoHeader.js +2 -2
  36. package/dist/components/InspectorPanel/DefaultInspector.d.ts +1 -0
  37. package/dist/components/InspectorPanel/DefaultInspector.js +2 -2
  38. package/dist/components/InspectorPanel/KeyframeEasingNavigator.js +1 -1
  39. package/dist/components/InspectorPanel/common.js +2 -2
  40. package/dist/components/InspectorPanel/styles.js +3 -3
  41. package/dist/components/InspectorPanel.d.ts +1 -0
  42. package/dist/components/InspectorPanel.js +2 -2
  43. package/dist/components/InspectorSequenceSection.js +1 -1
  44. package/dist/components/InspectorSourceLocation.d.ts +1 -0
  45. package/dist/components/InspectorSourceLocation.js +18 -3
  46. package/dist/components/InstallablePackage.js +1 -1
  47. package/dist/components/KeyboardShortcutsExplainer.js +9 -5
  48. package/dist/components/LoopToggle.js +1 -1
  49. package/dist/components/Menu/MenuDivider.js +1 -1
  50. package/dist/components/Menu/MenuItem.js +1 -1
  51. package/dist/components/Menu/MenuSubItem.js +1 -1
  52. package/dist/components/Menu/styles.js +3 -3
  53. package/dist/components/MenuToolbar.js +2 -2
  54. package/dist/components/ModalButton.js +1 -1
  55. package/dist/components/ModalContainer.js +3 -3
  56. package/dist/components/ModalFooter.js +2 -1
  57. package/dist/components/ModalHeader.js +3 -2
  58. package/dist/components/Modals.js +2 -1
  59. package/dist/components/NewComposition/CancelButton.js +4 -3
  60. package/dist/components/NewComposition/ComboBox.js +3 -3
  61. package/dist/components/NewComposition/InputDragger.js +11 -3
  62. package/dist/components/NewComposition/MenuContent.js +1 -1
  63. package/dist/components/NewComposition/NewComposition.js +4 -1
  64. package/dist/components/NewComposition/NewFolder.d.ts +5 -0
  65. package/dist/components/NewComposition/NewFolder.js +86 -0
  66. package/dist/components/NewComposition/RemInput.js +3 -3
  67. package/dist/components/NewComposition/RemTextarea.js +1 -1
  68. package/dist/components/NewComposition/RenameStaticFile.js +20 -59
  69. package/dist/components/NewComposition/ValidationMessage.js +1 -1
  70. package/dist/components/NewComposition/use-rename-static-file.d.ts +18 -0
  71. package/dist/components/NewComposition/use-rename-static-file.js +90 -0
  72. package/dist/components/NoRegisterRoot.js +3 -2
  73. package/dist/components/Notifications/ColorDot.js +3 -2
  74. package/dist/components/Notifications/Notification.js +4 -4
  75. package/dist/components/Notifications/NotificationCenter.js +2 -1
  76. package/dist/components/Notifications/ServerDisconnected.js +5 -4
  77. package/dist/components/OptionsPanel.js +1 -1
  78. package/dist/components/OutlineToggle.js +1 -1
  79. package/dist/components/PlayPause.js +4 -3
  80. package/dist/components/Preview.js +1 -1
  81. package/dist/components/PreviewToolbar.js +3 -2
  82. package/dist/components/QuickSwitcher/AlgoliaCredit.js +2 -1
  83. package/dist/components/QuickSwitcher/QuickSwitcherContent.js +1 -1
  84. package/dist/components/QuickSwitcher/QuickSwitcherResult.js +2 -2
  85. package/dist/components/RefreshCompositionOverlay.js +2 -1
  86. package/dist/components/RenderButton.js +10 -9
  87. package/dist/components/RenderModal/CliCopyButton.js +1 -1
  88. package/dist/components/RenderModal/ClientRenderProgress.js +1 -1
  89. package/dist/components/RenderModal/DataEditor.js +1 -1
  90. package/dist/components/RenderModal/GuiRenderStatus.js +1 -1
  91. package/dist/components/RenderModal/InfoBubble.js +2 -2
  92. package/dist/components/RenderModal/InfoTooltip.js +3 -3
  93. package/dist/components/RenderModal/InlineEyeIcon.js +2 -1
  94. package/dist/components/RenderModal/InlineRemoveButton.js +2 -1
  95. package/dist/components/RenderModal/MultiRangeSlider.js +1 -1
  96. package/dist/components/RenderModal/OptionExplainer.d.ts +11 -1
  97. package/dist/components/RenderModal/OptionExplainer.js +33 -13
  98. package/dist/components/RenderModal/OptionExplainerBubble.d.ts +15 -1
  99. package/dist/components/RenderModal/OptionExplainerBubble.js +17 -3
  100. package/dist/components/RenderModal/RenderModalHr.js +2 -1
  101. package/dist/components/RenderModal/RenderStatusModal.js +2 -1
  102. package/dist/components/RenderModal/SchemaEditor/Fieldset.d.ts +1 -0
  103. package/dist/components/RenderModal/SchemaEditor/Fieldset.js +6 -1
  104. package/dist/components/RenderModal/SchemaEditor/SchemaEditor.js +1 -2
  105. package/dist/components/RenderModal/SchemaEditor/SchemaLabel.js +1 -5
  106. package/dist/components/RenderModal/SchemaEditor/SchemaResetButton.js +2 -1
  107. package/dist/components/RenderModal/SchemaEditor/SchemaSeparationLine.js +1 -1
  108. package/dist/components/RenderModal/SchemaEditor/SchemaVerticalGuide.js +2 -1
  109. package/dist/components/RenderModal/SchemaEditor/ZodDateEditor.js +1 -1
  110. package/dist/components/RenderModal/SchemaEditor/ZodErrorMessages.js +1 -1
  111. package/dist/components/RenderModal/SchemaEditor/ZodNonEditableValue.js +1 -1
  112. package/dist/components/RenderModal/SchemaEditor/create-zod-values.js +2 -1
  113. package/dist/components/RenderModal/ServerRenderModal.js +1 -1
  114. package/dist/components/RenderModal/WarningIndicatorButton.js +4 -6
  115. package/dist/components/RenderModal/WebRenderModal.js +5 -2
  116. package/dist/components/RenderModal/WebRenderModalAdvanced.d.ts +3 -0
  117. package/dist/components/RenderModal/WebRenderModalAdvanced.js +92 -5
  118. package/dist/components/RenderModal/WebRenderModalAudio.js +4 -3
  119. package/dist/components/RenderModal/WebRenderModalBasic.js +2 -2
  120. package/dist/components/RenderModal/WebRenderModalLicense.js +2 -2
  121. package/dist/components/RenderModal/WebRenderModalPicture.js +2 -1
  122. package/dist/components/RenderModal/render-modals.js +3 -3
  123. package/dist/components/RenderPreview.js +1 -1
  124. package/dist/components/RenderQueue/ClientRenderQueueProcessor.js +1 -0
  125. package/dist/components/RenderQueue/RenderQueueCopyToClipboard.js +2 -1
  126. package/dist/components/RenderQueue/RenderQueueDownloadItem.js +2 -1
  127. package/dist/components/RenderQueue/RenderQueueItemCancelButton.js +2 -1
  128. package/dist/components/RenderQueue/RenderQueueItemStatus.js +1 -1
  129. package/dist/components/RenderQueue/RenderQueueOpenInFolder.js +2 -1
  130. package/dist/components/RenderQueue/RenderQueueRemoveItem.js +2 -1
  131. package/dist/components/RenderQueue/RenderQueueRepeat.js +2 -1
  132. package/dist/components/RenderQueue/client-side-render-types.d.ts +2 -1
  133. package/dist/components/RenderQueue/index.js +1 -1
  134. package/dist/components/RendersTab.js +2 -2
  135. package/dist/components/SegmentedControl.js +3 -3
  136. package/dist/components/SelectedOutlineElement.d.ts +9 -0
  137. package/dist/components/SelectedOutlineElement.js +63 -18
  138. package/dist/components/SelectedOutlineOverlay.d.ts +2 -0
  139. package/dist/components/SelectedOutlineOverlay.js +53 -2
  140. package/dist/components/SelectedOutlineUvControls.js +18 -11
  141. package/dist/components/SidebarCollapserControls.js +5 -4
  142. package/dist/components/SnappingProvider.d.ts +4 -0
  143. package/dist/components/SnappingProvider.js +24 -0
  144. package/dist/components/SnappingToggle.d.ts +2 -0
  145. package/dist/components/SnappingToggle.js +26 -0
  146. package/dist/components/Splitter/SplitterContext.d.ts +1 -1
  147. package/dist/components/Splitter/SplitterElement.js +2 -1
  148. package/dist/components/StaticFilePreview.js +1 -1
  149. package/dist/components/Tabs/index.js +3 -3
  150. package/dist/components/Tabs/vertical.js +3 -3
  151. package/dist/components/TextViewer.js +2 -1
  152. package/dist/components/TimeValue.js +1 -1
  153. package/dist/components/Timeline/EasingEditorModal.js +8 -8
  154. package/dist/components/Timeline/KeyframeSettingsModal.js +1 -1
  155. package/dist/components/Timeline/LoopedIndicator.js +2 -2
  156. package/dist/components/Timeline/MaxTimelineTracks.js +3 -2
  157. package/dist/components/Timeline/TimelineArrayField.js +6 -5
  158. package/dist/components/Timeline/TimelineColorField.js +2 -1
  159. package/dist/components/Timeline/TimelineEffectItem.js +3 -2
  160. package/dist/components/Timeline/TimelineEffectPropItem.js +2 -2
  161. package/dist/components/Timeline/TimelineExpandArrowButton.js +3 -2
  162. package/dist/components/Timeline/TimelineExpandedRow.js +2 -1
  163. package/dist/components/Timeline/TimelineExpandedSection.js +1 -1
  164. package/dist/components/Timeline/TimelineFieldLabel.js +2 -1
  165. package/dist/components/Timeline/TimelineFontFamilyField.d.ts +11 -0
  166. package/dist/components/Timeline/TimelineFontFamilyField.js +545 -0
  167. package/dist/components/Timeline/TimelineImageInfo.js +2 -1
  168. package/dist/components/Timeline/TimelineInOutPointer.js +2 -1
  169. package/dist/components/Timeline/TimelineInOutPointerHandle.js +2 -4
  170. package/dist/components/Timeline/TimelineKeyframeControls.js +2 -2
  171. package/dist/components/Timeline/TimelineKeyframeDiamondIcon.js +1 -1
  172. package/dist/components/Timeline/TimelineKeyframeEasingLine.js +1 -1
  173. package/dist/components/Timeline/TimelineLayerEye.js +3 -3
  174. package/dist/components/Timeline/TimelineMediaInfo.js +2 -2
  175. package/dist/components/Timeline/TimelinePrimitiveFieldValue.js +4 -0
  176. package/dist/components/Timeline/TimelineRotationField.js +4 -3
  177. package/dist/components/Timeline/TimelineScaleField.js +1 -1
  178. package/dist/components/Timeline/TimelineSchemaField.d.ts +2 -0
  179. package/dist/components/Timeline/TimelineSchemaField.js +47 -7
  180. package/dist/components/Timeline/TimelineScrollable.js +3 -2
  181. package/dist/components/Timeline/TimelineSelection.js +11 -6
  182. package/dist/components/Timeline/TimelineSequence.js +17 -20
  183. package/dist/components/Timeline/TimelineSequenceFrame.js +3 -2
  184. package/dist/components/Timeline/TimelineSequenceItem.js +8 -7
  185. package/dist/components/Timeline/TimelineSequenceName.js +3 -2
  186. package/dist/components/Timeline/TimelineSequencePropItem.js +2 -1
  187. package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.d.ts +20 -1
  188. package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.js +128 -11
  189. package/dist/components/Timeline/TimelineSlider.js +2 -1
  190. package/dist/components/Timeline/TimelineSliderHandle.js +2 -1
  191. package/dist/components/Timeline/TimelineTimeIndicators.js +1 -1
  192. package/dist/components/Timeline/TimelineVideoInfo.js +2 -1
  193. package/dist/components/Timeline/TimelineZoomControls.js +4 -3
  194. package/dist/components/Timeline/call-move-keyframe.d.ts +5 -0
  195. package/dist/components/Timeline/call-move-keyframe.js +14 -3
  196. package/dist/components/Timeline/google-fonts-list.d.ts +6 -0
  197. package/dist/components/Timeline/google-fonts-list.js +1512 -0
  198. package/dist/components/Timeline/save-sequence-prop.d.ts +8 -1
  199. package/dist/components/Timeline/save-sequence-prop.js +63 -19
  200. package/dist/components/Timeline/timeline-rotation-field-utils.d.ts +5 -0
  201. package/dist/components/Timeline/timeline-rotation-field-utils.js +16 -0
  202. package/dist/components/Timeline/timeline-scroll-logic.js +5 -2
  203. package/dist/components/TimelineInOutToggle.js +1 -1
  204. package/dist/components/UpdateCheck.js +2 -2
  205. package/dist/components/UpdateModal/OpenIssueButton.js +1 -1
  206. package/dist/components/VisualControls/ClickableFileName.js +4 -4
  207. package/dist/components/VisualControls/VisualControlsContent.js +9 -1
  208. package/dist/components/effect-drag-and-drop.js +30 -8
  209. package/dist/components/import-assets.d.ts +8 -2
  210. package/dist/components/import-assets.js +55 -1
  211. package/dist/components/options-sidebar-tabs.d.ts +1 -0
  212. package/dist/components/options-sidebar-tabs.js +6 -1
  213. package/dist/components/selected-outline-measurement.js +2 -1
  214. package/dist/components/selected-outline-snap.d.ts +36 -0
  215. package/dist/components/selected-outline-snap.js +158 -0
  216. package/dist/error-overlay/remotion-overlay/CalculateMetadataErrorExplainer.js +2 -2
  217. package/dist/error-overlay/remotion-overlay/CodeFrame.js +7 -5
  218. package/dist/error-overlay/remotion-overlay/CompositionIdListItem.js +2 -2
  219. package/dist/error-overlay/remotion-overlay/DismissButton.js +3 -2
  220. package/dist/error-overlay/remotion-overlay/ErrorLoader.js +3 -2
  221. package/dist/error-overlay/remotion-overlay/ErrorMessage.js +4 -4
  222. package/dist/error-overlay/remotion-overlay/HelpLink.js +1 -1
  223. package/dist/error-overlay/remotion-overlay/MediaPlaybackErrorExplainer.js +4 -4
  224. package/dist/error-overlay/remotion-overlay/Overlay.js +3 -2
  225. package/dist/error-overlay/remotion-overlay/StackFrame.js +4 -3
  226. package/dist/error-overlay/remotion-overlay/Symbolicating.js +2 -1
  227. package/dist/error-overlay/remotion-overlay/carets.js +3 -2
  228. package/dist/esm/chunk-jefhcs5z.js +164 -0
  229. package/dist/esm/{chunk-103pp4n7.js → chunk-y2t24cx0.js} +10754 -6829
  230. package/dist/esm/internals.mjs +10755 -6796
  231. package/dist/esm/previewEntry.mjs +10554 -6591
  232. package/dist/esm/renderEntry.mjs +8 -5
  233. package/dist/helpers/checkerboard-background.js +4 -12
  234. package/dist/helpers/colors.d.ts +99 -7
  235. package/dist/helpers/colors.js +118 -10
  236. package/dist/helpers/inject-css.js +85 -83
  237. package/dist/helpers/retry-payload.js +1 -0
  238. package/dist/helpers/timeline-layout.d.ts +4 -2
  239. package/dist/helpers/use-menu-structure.js +74 -5
  240. package/dist/helpers/validate-folder-rename.js +2 -10
  241. package/dist/helpers/validate-new-folder-name.d.ts +5 -0
  242. package/dist/helpers/validate-new-folder-name.js +16 -0
  243. package/dist/hot-middleware-client/client.js +3 -2
  244. package/dist/icons/Checkmark.js +2 -1
  245. package/dist/icons/audio.js +2 -1
  246. package/dist/icons/caret.js +2 -2
  247. package/dist/icons/certificate.js +2 -1
  248. package/dist/icons/data.js +2 -1
  249. package/dist/icons/eyedropper.js +2 -1
  250. package/dist/icons/file.js +2 -1
  251. package/dist/icons/frame.js +2 -1
  252. package/dist/icons/gear.js +2 -1
  253. package/dist/icons/gif.js +2 -1
  254. package/dist/icons/jump-to-start.js +2 -1
  255. package/dist/icons/keys.js +4 -3
  256. package/dist/icons/magnet.d.ts +3 -0
  257. package/dist/icons/magnet.js +8 -0
  258. package/dist/icons/media-volume.js +1 -1
  259. package/dist/icons/minus.js +2 -1
  260. package/dist/icons/pause.js +2 -1
  261. package/dist/icons/play.js +2 -1
  262. package/dist/icons/react.d.ts +5 -0
  263. package/dist/icons/react.js +8 -0
  264. package/dist/icons/redo.js +2 -1
  265. package/dist/icons/step-back.js +2 -1
  266. package/dist/icons/step-forward.js +2 -1
  267. package/dist/icons/undo.js +2 -1
  268. package/dist/previewEntry.js +2 -1
  269. package/dist/renderEntry.js +4 -3
  270. package/dist/state/editor-guides.d.ts +2 -2
  271. package/dist/state/editor-snapping.d.ts +8 -0
  272. package/dist/state/editor-snapping.js +18 -0
  273. package/dist/state/modals.d.ts +6 -1
  274. package/package.json +12 -12
  275. package/dist/esm/chunk-6jf1natv.js +0 -25
@@ -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.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 = 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");
@@ -8,6 +8,7 @@ const remotion_1 = require("remotion");
8
8
  const no_react_1 = require("remotion/no-react");
9
9
  const calculate_timeline_1 = require("../../helpers/calculate-timeline");
10
10
  const client_id_1 = require("../../helpers/client-id");
11
+ const colors_1 = require("../../helpers/colors");
11
12
  const timeline_layout_1 = require("../../helpers/timeline-layout");
12
13
  const ForceSpecificCursor_1 = require("../ForceSpecificCursor");
13
14
  const save_sequence_prop_1 = require("./save-sequence-prop");
@@ -22,6 +23,49 @@ const baseStyle = {
22
23
  zIndex: 1,
23
24
  touchAction: 'none',
24
25
  };
26
+ const getKeyframedSequenceDragTargets = ({ nodePath, sequence, propStatuses, }) => {
27
+ var _a;
28
+ const status = propStatuses[remotion_1.Internals.makeSequencePropsSubscriptionKey(nodePath)];
29
+ if (status === null || status === undefined || !status.canUpdate) {
30
+ return { effectKeyframes: [], sequenceKeyframes: [] };
31
+ }
32
+ const sequenceSchema = (_a = sequence.controls) === null || _a === void 0 ? void 0 : _a.schema;
33
+ const sequenceKeyframes = sequenceSchema === undefined
34
+ ? []
35
+ : Object.entries(status.props).flatMap(([fieldKey, propStatus]) => propStatus.status === 'keyframed'
36
+ ? [{ fieldKey, schema: sequenceSchema, status: propStatus }]
37
+ : []);
38
+ const effectKeyframes = status.effects.flatMap((effectStatus) => {
39
+ var _a;
40
+ if (!effectStatus.canUpdate) {
41
+ return [];
42
+ }
43
+ const effectSchema = (_a = sequence.effects[effectStatus.effectIndex]) === null || _a === void 0 ? void 0 : _a.schema;
44
+ if (effectSchema === undefined) {
45
+ return [];
46
+ }
47
+ return Object.entries(effectStatus.props).flatMap(([fieldKey, propStatus]) => propStatus.status === 'keyframed'
48
+ ? [
49
+ {
50
+ effectIndex: effectStatus.effectIndex,
51
+ fieldKey,
52
+ schema: effectSchema,
53
+ status: propStatus,
54
+ },
55
+ ]
56
+ : []);
57
+ });
58
+ return { effectKeyframes, sequenceKeyframes };
59
+ };
60
+ const shiftKeyframedStatus = ({ status, deltaFrames, }) => {
61
+ return {
62
+ ...status,
63
+ keyframes: status.keyframes.map((keyframe) => ({
64
+ ...keyframe,
65
+ frame: keyframe.frame + deltaFrames,
66
+ })),
67
+ };
68
+ };
25
69
  const canUpdateDurationInFrames = ({ propStatuses, nodePath, }) => {
26
70
  var _a, _b;
27
71
  const status = (_b = (_a = remotion_1.Internals.getPropStatusesCtx(propStatuses, nodePath)) === null || _a === void 0 ? void 0 : _a.durationInFrames) === null || _b === void 0 ? void 0 : _b.status;
@@ -166,6 +210,31 @@ const getTimelineSequenceFromDragChanges = ({ targets, deltaFrames, }) => {
166
210
  });
167
211
  };
168
212
  exports.getTimelineSequenceFromDragChanges = getTimelineSequenceFromDragChanges;
213
+ const getTimelineSequenceFromDragKeyframeMoves = ({ targets, deltaFrames, }) => {
214
+ if (deltaFrames === 0) {
215
+ return { effectKeyframes: [], sequenceKeyframes: [] };
216
+ }
217
+ return {
218
+ sequenceKeyframes: targets.flatMap((target) => target.sequenceKeyframes.flatMap((keyframeTarget) => keyframeTarget.status.keyframes.map((keyframe) => ({
219
+ fileName: target.fileName,
220
+ nodePath: target.nodePath,
221
+ fieldKey: keyframeTarget.fieldKey,
222
+ fromFrame: keyframe.frame,
223
+ toFrame: keyframe.frame + deltaFrames,
224
+ schema: keyframeTarget.schema,
225
+ })))),
226
+ effectKeyframes: targets.flatMap((target) => target.effectKeyframes.flatMap((keyframeTarget) => keyframeTarget.status.keyframes.map((keyframe) => ({
227
+ fileName: target.fileName,
228
+ nodePath: target.nodePath,
229
+ effectIndex: keyframeTarget.effectIndex,
230
+ fieldKey: keyframeTarget.fieldKey,
231
+ fromFrame: keyframe.frame,
232
+ toFrame: keyframe.frame + deltaFrames,
233
+ schema: keyframeTarget.schema,
234
+ })))),
235
+ };
236
+ };
237
+ exports.getTimelineSequenceFromDragKeyframeMoves = getTimelineSequenceFromDragKeyframeMoves;
169
238
  const findSequenceTrack = ({ tracks, nodePathInfo, }) => {
170
239
  const key = (0, studio_shared_1.stringifySequenceExpandedRowKey)(nodePathInfo.sequenceSubscriptionKey);
171
240
  return tracks.find((candidate) => {
@@ -301,10 +370,17 @@ const getTimelineSequenceFromDragTargets = ({ draggedNodePathInfo, selectedItems
301
370
  }
302
371
  const key = (0, studio_shared_1.stringifySequenceSubscriptionKey)(nodePath);
303
372
  if (!targets.has(key)) {
373
+ const { effectKeyframes, sequenceKeyframes } = getKeyframedSequenceDragTargets({
374
+ nodePath,
375
+ sequence: originalSequence,
376
+ propStatuses,
377
+ });
304
378
  targets.set(key, {
379
+ effectKeyframes,
305
380
  fileName: nodePath.absolutePath,
306
381
  initialFrom: originalSequence.from,
307
382
  nodePath,
383
+ sequenceKeyframes,
308
384
  });
309
385
  }
310
386
  }
@@ -321,9 +397,13 @@ const clearDurationDragOverrides = ({ clearDragOverrides, targets, }) => {
321
397
  clearDragOverrides(target.nodePath);
322
398
  }
323
399
  };
324
- const clearFromDragOverrides = ({ clearDragOverrides, targets, }) => {
400
+ const clearFromDragOverrides = ({ clearDragOverrides, clearEffectDragOverrides, targets, }) => {
325
401
  for (const target of targets) {
326
402
  clearDragOverrides(target.nodePath);
403
+ const effectIndexes = new Set(target.effectKeyframes.map((keyframe) => keyframe.effectIndex));
404
+ for (const effectIndex of effectIndexes) {
405
+ clearEffectDragOverrides(target.nodePath, effectIndex);
406
+ }
327
407
  }
328
408
  };
329
409
  const TimelineSequenceLeftEdgeDragHandle = ({ nodePathInfo, windowWidth, timelineDurationInFrames }) => {
@@ -494,13 +574,13 @@ const TimelineSequenceLeftEdgeDragHandle = ({ nodePathInfo, windowWidth, timelin
494
574
  const style = {
495
575
  ...baseStyle,
496
576
  left: 0,
497
- background: 'transparent',
577
+ background: colors_1.TRANSPARENT,
498
578
  };
499
579
  return (jsx_runtime_1.jsx("div", { role: "separator", "aria-orientation": "vertical", title: "Drag to trim start", style: style, onPointerDown: onPointerDown }));
500
580
  };
501
581
  exports.TimelineSequenceLeftEdgeDragHandle = TimelineSequenceLeftEdgeDragHandle;
502
582
  const useTimelineSequenceFromDrag = ({ nodePathInfo, windowWidth, timelineDurationInFrames, }) => {
503
- const { setPropStatuses, setDragOverrides, clearDragOverrides } = (0, react_1.useContext)(remotion_1.Internals.VisualModeSettersContext);
583
+ const { setPropStatuses, setDragOverrides, clearDragOverrides, setEffectDragOverrides, clearEffectDragOverrides, } = (0, react_1.useContext)(remotion_1.Internals.VisualModeSettersContext);
504
584
  const propStatusesRef = (0, react_1.useContext)(remotion_1.Internals.VisualModePropStatusesRefContext);
505
585
  const sequencesRef = (0, react_1.useContext)(remotion_1.Internals.SequenceManagerRefContext);
506
586
  const { overrideIdToNodePathMappings } = (0, react_1.useContext)(remotion_1.Internals.OverrideIdsToNodePathsGettersContext);
@@ -513,6 +593,8 @@ const useTimelineSequenceFromDrag = ({ nodePathInfo, windowWidth, timelineDurati
513
593
  setPropStatuses,
514
594
  setDragOverrides,
515
595
  clearDragOverrides,
596
+ setEffectDragOverrides,
597
+ clearEffectDragOverrides,
516
598
  previewServerState,
517
599
  overrideIdToNodePathMappings,
518
600
  });
@@ -521,6 +603,8 @@ const useTimelineSequenceFromDrag = ({ nodePathInfo, windowWidth, timelineDurati
521
603
  setPropStatuses,
522
604
  setDragOverrides,
523
605
  clearDragOverrides,
606
+ setEffectDragOverrides,
607
+ clearEffectDragOverrides,
524
608
  previewServerState,
525
609
  overrideIdToNodePathMappings,
526
610
  };
@@ -533,26 +617,39 @@ const useTimelineSequenceFromDrag = ({ nodePathInfo, windowWidth, timelineDurati
533
617
  if (!dragState) {
534
618
  return;
535
619
  }
536
- const { setPropStatuses: latestSetPropStatuses, clearDragOverrides: latestClear, previewServerState: latestServerState, } = latestRef.current;
620
+ const { setPropStatuses: latestSetPropStatuses, clearDragOverrides: latestClear, clearEffectDragOverrides: latestClearEffect, previewServerState: latestServerState, } = latestRef.current;
537
621
  const changes = (0, exports.getTimelineSequenceFromDragChanges)({
538
622
  targets: dragState.targets,
539
623
  deltaFrames: dragState.latestDeltaFrames,
540
624
  });
625
+ const keyframeMoves = (0, exports.getTimelineSequenceFromDragKeyframeMoves)({
626
+ targets: dragState.targets,
627
+ deltaFrames: dragState.latestDeltaFrames,
628
+ });
541
629
  if (!commit ||
542
630
  latestServerState.type !== 'connected' ||
543
- changes.length === 0) {
631
+ (changes.length === 0 &&
632
+ keyframeMoves.sequenceKeyframes.length === 0 &&
633
+ keyframeMoves.effectKeyframes.length === 0)) {
544
634
  clearFromDragOverrides({
545
635
  clearDragOverrides: latestClear,
636
+ clearEffectDragOverrides: latestClearEffect,
546
637
  targets: dragState.targets,
547
638
  });
548
639
  return;
549
640
  }
550
641
  const savePromise = (0, save_sequence_prop_1.saveSequenceProps)({
551
642
  changes,
643
+ movedKeyframes: {
644
+ sequenceKeyframes: keyframeMoves.sequenceKeyframes,
645
+ effectKeyframes: keyframeMoves.effectKeyframes,
646
+ },
552
647
  setPropStatuses: latestSetPropStatuses,
553
648
  clientId: latestServerState.clientId,
554
- undoLabel: changes.length > 1 ? 'Move selected sequences' : 'Move sequence',
555
- redoLabel: changes.length > 1
649
+ undoLabel: dragState.targets.length > 1
650
+ ? 'Move selected sequences'
651
+ : 'Move sequence',
652
+ redoLabel: dragState.targets.length > 1
556
653
  ? 'Move selected sequences back'
557
654
  : 'Move sequence back',
558
655
  });
@@ -563,6 +660,7 @@ const useTimelineSequenceFromDrag = ({ nodePathInfo, windowWidth, timelineDurati
563
660
  .finally(() => {
564
661
  clearFromDragOverrides({
565
662
  clearDragOverrides: latestClear,
663
+ clearEffectDragOverrides: latestClearEffect,
566
664
  targets: dragState.targets,
567
665
  });
568
666
  });
@@ -623,10 +721,29 @@ const useTimelineSequenceFromDrag = ({ nodePathInfo, windowWidth, timelineDurati
623
721
  const deltaFrames = Math.round(dx / dragState.pxPerFrame);
624
722
  dragState.latestDeltaFrames = deltaFrames;
625
723
  for (const target of dragState.targets) {
626
- latestRef.current.setDragOverrides(target.nodePath, 'from', remotion_1.Internals.makeStaticDragOverride((0, exports.getTimelineSequenceFromDragValue)({
724
+ const nextFrom = (0, exports.getTimelineSequenceFromDragValue)({
627
725
  initialFrom: target.initialFrom,
628
726
  deltaFrames,
629
- })));
727
+ });
728
+ latestRef.current.setDragOverrides(target.nodePath, 'from', remotion_1.Internals.makeStaticDragOverride(nextFrom));
729
+ for (const keyframeTarget of target.sequenceKeyframes) {
730
+ latestRef.current.setDragOverrides(target.nodePath, keyframeTarget.fieldKey, {
731
+ type: 'keyframed',
732
+ status: shiftKeyframedStatus({
733
+ status: keyframeTarget.status,
734
+ deltaFrames,
735
+ }),
736
+ });
737
+ }
738
+ for (const keyframeTarget of target.effectKeyframes) {
739
+ latestRef.current.setEffectDragOverrides(target.nodePath, keyframeTarget.effectIndex, keyframeTarget.fieldKey, {
740
+ type: 'keyframed',
741
+ status: shiftKeyframedStatus({
742
+ status: keyframeTarget.status,
743
+ deltaFrames,
744
+ }),
745
+ });
746
+ }
630
747
  }
631
748
  };
632
749
  const onUp = (e) => {
@@ -829,7 +946,7 @@ const TimelineSequenceRightEdgeDragHandle = ({ nodePathInfo, windowWidth, timeli
829
946
  const style = {
830
947
  ...baseStyle,
831
948
  right: 0,
832
- background: 'transparent',
949
+ background: colors_1.TRANSPARENT,
833
950
  };
834
951
  return (jsx_runtime_1.jsx("div", { role: "separator", "aria-orientation": "vertical", title: "Drag to change duration", style: style, onPointerDown: onPointerDown }));
835
952
  };
@@ -4,6 +4,7 @@ exports.TimelineSlider = exports.redrawTimelineSliderFast = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const react_1 = require("react");
6
6
  const remotion_1 = require("remotion");
7
+ const colors_1 = require("../../helpers/colors");
7
8
  const get_left_of_timeline_slider_1 = require("../../helpers/get-left-of-timeline-slider");
8
9
  const timeline_zoom_1 = require("../../state/timeline-zoom");
9
10
  const imperative_state_1 = require("./imperative-state");
@@ -21,7 +22,7 @@ const line = {
21
22
  height: '100vh',
22
23
  width: PLAYHEAD_LINE_WIDTH,
23
24
  position: 'fixed',
24
- backgroundColor: '#f02c00',
25
+ backgroundColor: colors_1.TIMELINE_PLAYHEAD_COLOR,
25
26
  };
26
27
  const PLAYHEAD_CENTER_OFFSET = PLAYHEAD_LINE_WIDTH / 2;
27
28
  const getTimelineSliderTransform = ({ durationInFrames, frame, width, }) => {
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.TimelineSliderHandle = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const colors_1 = require("../../helpers/colors");
5
6
  const container = {
6
7
  width: 20,
7
8
  height: 20,
@@ -9,6 +10,6 @@ const container = {
9
10
  marginLeft: -8,
10
11
  };
11
12
  const TimelineSliderHandle = () => {
12
- return (jsx_runtime_1.jsx("div", { style: container, children: jsx_runtime_1.jsx("svg", { width: 17, viewBox: "0 0 159 212", children: jsx_runtime_1.jsx("path", { d: "M17.0234375,1.07763419 L143.355469,1.07763419 C151.63974,1.07763419 158.355469,7.79336295 158.355469,16.0776342 L158.355469,69.390507 C158.355469,73.7938677 156.420655,77.9748242 153.064021,80.8248415 L89.3980057,134.881757 C83.7986799,139.635978 75.5802263,139.635978 69.9809005,134.881757 L6.66764807,81.1243622 C3.0872392,78.0843437 1.0234375,73.6246568 1.0234375,68.9277387 L1.0234375,17.0776342 C1.0234375,8.2410782 8.1868815,1.07763419 17.0234375,1.07763419 Z", fill: "#f02c00" }) }) }));
13
+ return (jsx_runtime_1.jsx("div", { style: container, children: jsx_runtime_1.jsx("svg", { width: 17, viewBox: "0 0 159 212", children: jsx_runtime_1.jsx("path", { d: "M17.0234375,1.07763419 L143.355469,1.07763419 C151.63974,1.07763419 158.355469,7.79336295 158.355469,16.0776342 L158.355469,69.390507 C158.355469,73.7938677 156.420655,77.9748242 153.064021,80.8248415 L89.3980057,134.881757 C83.7986799,139.635978 75.5802263,139.635978 69.9809005,134.881757 L6.66764807,81.1243622 C3.0872392,78.0843437 1.0234375,73.6246568 1.0234375,68.9277387 L1.0234375,17.0776342 C1.0234375,8.2410782 8.1868815,1.07763419 17.0234375,1.07763419 Z", fill: colors_1.TIMELINE_PLAYHEAD_COLOR }) }) }));
13
14
  };
14
15
  exports.TimelineSliderHandle = TimelineSliderHandle;
@@ -22,7 +22,7 @@ const container = {
22
22
  };
23
23
  const tick = {
24
24
  width: 1,
25
- backgroundColor: 'rgba(255, 255, 255, 0.15)',
25
+ backgroundColor: colors_1.WHITE_ALPHA_15,
26
26
  height: 20,
27
27
  position: 'absolute',
28
28
  };
@@ -5,6 +5,7 @@ const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const timeline_utils_1 = require("@remotion/timeline-utils");
6
6
  const react_1 = require("react");
7
7
  const remotion_1 = require("remotion");
8
+ const colors_1 = require("../../helpers/colors");
8
9
  const timeline_layout_1 = require("../../helpers/timeline-layout");
9
10
  const AudioWaveform_1 = require("../AudioWaveform");
10
11
  const get_timeline_video_info_widths_1 = require("./get-timeline-video-info-widths");
@@ -17,7 +18,7 @@ const outerStyle = {
17
18
  };
18
19
  const filmstripContainerStyle = {
19
20
  height: timeline_layout_1.TIMELINE_LAYER_FILMSTRIP_HEIGHT,
20
- backgroundColor: 'rgba(0, 0, 0, 0.3)',
21
+ backgroundColor: colors_1.BLACK_ALPHA_30,
21
22
  display: 'flex',
22
23
  borderTopLeftRadius: 2,
23
24
  fontSize: 10,
@@ -4,6 +4,7 @@ exports.TimelineZoomControls = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const react_1 = require("react");
6
6
  const remotion_1 = require("remotion");
7
+ const colors_1 = require("../../helpers/colors");
7
8
  const is_current_selected_still_1 = require("../../helpers/is-current-selected-still");
8
9
  const minus_1 = require("../../icons/minus");
9
10
  const plus_1 = require("../../icons/plus");
@@ -12,7 +13,7 @@ const z_index_1 = require("../../state/z-index");
12
13
  const ControlButton_1 = require("../ControlButton");
13
14
  const layout_1 = require("../layout");
14
15
  const container = {
15
- color: 'black',
16
+ color: colors_1.BLACK,
16
17
  flexDirection: 'row',
17
18
  display: 'flex',
18
19
  alignItems: 'center',
@@ -21,7 +22,7 @@ const buttonStyle = {
21
22
  fontSize: 24,
22
23
  };
23
24
  const iconStyle = {
24
- color: 'white',
25
+ color: colors_1.WHITE,
25
26
  width: 14,
26
27
  };
27
28
  const TimelineZoomControls = () => {
@@ -58,7 +59,7 @@ const TimelineZoomControls = () => {
58
59
  }
59
60
  const zoom = (_a = zoomMap[canvasContent.compositionId]) !== null && _a !== void 0 ? _a : timeline_zoom_1.TIMELINE_MIN_ZOOM;
60
61
  return (jsx_runtime_1.jsxs("div", { style: container, children: [
61
- jsx_runtime_1.jsx(ControlButton_1.ControlButton, { onClick: onMinusClicked, style: buttonStyle, title: "Zoom out timeline", role: 'ControlButton', type: "button", disabled: timeline_zoom_1.TIMELINE_MIN_ZOOM === zoom, children: jsx_runtime_1.jsx(minus_1.Minus, { style: iconStyle }) }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 0.5 }), jsx_runtime_1.jsx("input", { title: `Timeline zoom (${zoom}x)`, alt: `Timeline zoom (${zoom}x)`, type: 'range', min: timeline_zoom_1.TIMELINE_MIN_ZOOM, step: 0.1, value: zoom, max: timeline_zoom_1.TIMELINE_MAX_ZOOM, onChange: onChange, className: "__remotion-timeline-slider", tabIndex: tabIndex }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 0.5 }), jsx_runtime_1.jsx(ControlButton_1.ControlButton, { onClick: onPlusClicked, style: buttonStyle, title: "Zoom in timeline", role: 'button', type: "button", disabled: timeline_zoom_1.TIMELINE_MAX_ZOOM === zoom, children: jsx_runtime_1.jsx(plus_1.Plus, { color: "currentcolor", style: iconStyle }) })
62
+ jsx_runtime_1.jsx(ControlButton_1.ControlButton, { onClick: onMinusClicked, style: buttonStyle, title: "Zoom out timeline", role: 'ControlButton', type: "button", disabled: timeline_zoom_1.TIMELINE_MIN_ZOOM === zoom, children: jsx_runtime_1.jsx(minus_1.Minus, { style: iconStyle }) }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 0.5 }), jsx_runtime_1.jsx("input", { title: `Timeline zoom (${zoom}x)`, alt: `Timeline zoom (${zoom}x)`, type: 'range', min: timeline_zoom_1.TIMELINE_MIN_ZOOM, step: 0.1, value: zoom, max: timeline_zoom_1.TIMELINE_MAX_ZOOM, onChange: onChange, className: "__remotion-timeline-slider", tabIndex: tabIndex }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 0.5 }), jsx_runtime_1.jsx(ControlButton_1.ControlButton, { onClick: onPlusClicked, style: buttonStyle, title: "Zoom in timeline", role: 'button', type: "button", disabled: timeline_zoom_1.TIMELINE_MAX_ZOOM === zoom, children: jsx_runtime_1.jsx(plus_1.Plus, { color: colors_1.CURRENT_COLOR_LOWERCASE, style: iconStyle }) })
62
63
  ] }));
63
64
  };
64
65
  exports.TimelineZoomControls = TimelineZoomControls;
@@ -11,6 +11,11 @@ export type MoveSequenceKeyframeChange = {
11
11
  export type MoveEffectKeyframeChange = MoveSequenceKeyframeChange & {
12
12
  effectIndex: number;
13
13
  };
14
+ export declare const applyOptimisticKeyframeMoves: ({ sequenceKeyframes, effectKeyframes, setPropStatuses, }: {
15
+ sequenceKeyframes: MoveSequenceKeyframeChange[];
16
+ effectKeyframes: MoveEffectKeyframeChange[];
17
+ setPropStatuses: SetPropStatuses;
18
+ }) => void;
14
19
  export declare const callMoveKeyframes: ({ sequenceKeyframes, effectKeyframes, setPropStatuses, clientId, }: {
15
20
  sequenceKeyframes: MoveSequenceKeyframeChange[];
16
21
  effectKeyframes: MoveEffectKeyframeChange[];
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.callMoveKeyframes = void 0;
3
+ exports.callMoveKeyframes = exports.applyOptimisticKeyframeMoves = void 0;
4
4
  const studio_shared_1 = require("@remotion/studio-shared");
5
5
  const call_api_1 = require("../call-api");
6
6
  const groupByNodePath = (keyframes) => {
@@ -14,9 +14,9 @@ const groupByNodePath = (keyframes) => {
14
14
  }
15
15
  return [...groups.values()];
16
16
  };
17
- const callMoveKeyframes = ({ sequenceKeyframes, effectKeyframes, setPropStatuses, clientId, }) => {
17
+ const applyOptimisticKeyframeMoves = ({ sequenceKeyframes, effectKeyframes, setPropStatuses, }) => {
18
18
  if (sequenceKeyframes.length === 0 && effectKeyframes.length === 0) {
19
- return Promise.resolve();
19
+ return;
20
20
  }
21
21
  for (const keyframes of groupByNodePath(sequenceKeyframes)) {
22
22
  const [firstKeyframe] = keyframes;
@@ -47,6 +47,17 @@ const callMoveKeyframes = ({ sequenceKeyframes, effectKeyframes, setPropStatuses
47
47
  })),
48
48
  }));
49
49
  }
50
+ };
51
+ exports.applyOptimisticKeyframeMoves = applyOptimisticKeyframeMoves;
52
+ const callMoveKeyframes = ({ sequenceKeyframes, effectKeyframes, setPropStatuses, clientId, }) => {
53
+ if (sequenceKeyframes.length === 0 && effectKeyframes.length === 0) {
54
+ return Promise.resolve();
55
+ }
56
+ (0, exports.applyOptimisticKeyframeMoves)({
57
+ sequenceKeyframes,
58
+ effectKeyframes,
59
+ setPropStatuses,
60
+ });
50
61
  return (0, call_api_1.callApi)('/api/move-keyframes', {
51
62
  sequenceKeyframes: sequenceKeyframes.map((keyframe) => ({
52
63
  fileName: keyframe.fileName,
@@ -0,0 +1,6 @@
1
+ export declare const GOOGLE_FONTS_LIST: {
2
+ importName: string;
3
+ fontFamily: string;
4
+ previewUrl: string;
5
+ weights: string[];
6
+ }[];