@remotion/studio 4.0.473 → 4.0.475

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 (123) hide show
  1. package/dist/components/AssetSelectorItem.js +30 -6
  2. package/dist/components/Canvas.js +77 -0
  3. package/dist/components/ColorPicker/ColorPicker.js +4 -31
  4. package/dist/components/CompositionSelectorItem.js +4 -4
  5. package/dist/components/Editor.js +4 -1
  6. package/dist/components/Modals.js +2 -2
  7. package/dist/components/NewComposition/ComboBox.js +1 -0
  8. package/dist/components/NewComposition/InputDragger.d.ts +1 -0
  9. package/dist/components/NewComposition/InputDragger.js +9 -6
  10. package/dist/components/PreviewToolbar.js +2 -2
  11. package/dist/components/SelectedOutlineOverlay.d.ts +61 -33
  12. package/dist/components/SelectedOutlineOverlay.js +813 -351
  13. package/dist/components/SelectedOutlineUvControls.d.ts +17 -0
  14. package/dist/components/SelectedOutlineUvControls.js +167 -0
  15. package/dist/components/StudioCanvasCapture.d.ts +5 -0
  16. package/dist/components/StudioCanvasCapture.js +40 -0
  17. package/dist/components/Timeline/EasingEditorModal.d.ts +11 -0
  18. package/dist/components/Timeline/EasingEditorModal.js +247 -0
  19. package/dist/components/Timeline/KeyframeSettingsModal.js +5 -4
  20. package/dist/components/Timeline/SequencePropsObserver.js +3 -3
  21. package/dist/components/Timeline/Timeline.js +10 -7
  22. package/dist/components/Timeline/TimelineClipboardKeybindings.d.ts +7 -7
  23. package/dist/components/Timeline/TimelineClipboardKeybindings.js +19 -16
  24. package/dist/components/Timeline/TimelineDeleteKeybindings.js +71 -40
  25. package/dist/components/Timeline/TimelineDragHandler.js +2 -2
  26. package/dist/components/Timeline/TimelineEffectItem.js +8 -9
  27. package/dist/components/Timeline/TimelineEffectPropItem.js +18 -18
  28. package/dist/components/Timeline/TimelineExpandedKeyframeRow.d.ts +1 -0
  29. package/dist/components/Timeline/TimelineExpandedKeyframeRow.js +7 -2
  30. package/dist/components/Timeline/TimelineExpandedSection.js +5 -5
  31. package/dist/components/Timeline/TimelineExpandedTrackKeyframes.js +1 -1
  32. package/dist/components/Timeline/TimelineHeightContainer.js +2 -0
  33. package/dist/components/Timeline/TimelineItemStack.js +3 -56
  34. package/dist/components/Timeline/TimelineKeyframeControls.d.ts +7 -0
  35. package/dist/components/Timeline/TimelineKeyframeControls.js +265 -68
  36. package/dist/components/Timeline/TimelineKeyframeDiamond.js +4 -3
  37. package/dist/components/Timeline/TimelineKeyframeEasingLine.d.ts +9 -0
  38. package/dist/components/Timeline/TimelineKeyframeEasingLine.js +245 -0
  39. package/dist/components/Timeline/TimelineKeyframeTracksContext.d.ts +7 -0
  40. package/dist/components/Timeline/TimelineKeyframeTracksContext.js +17 -0
  41. package/dist/components/Timeline/TimelineKeyframedValue.js +1 -1
  42. package/dist/components/Timeline/TimelineMediaInfo.js +4 -24
  43. package/dist/components/Timeline/TimelineNumberField.js +15 -7
  44. package/dist/components/Timeline/TimelinePrimitiveFieldValue.js +4 -0
  45. package/dist/components/Timeline/TimelineRotationField.js +22 -34
  46. package/dist/components/Timeline/TimelineScaleField.js +16 -12
  47. package/dist/components/Timeline/TimelineScrollable.js +19 -3
  48. package/dist/components/Timeline/TimelineSelection.d.ts +82 -3
  49. package/dist/components/Timeline/TimelineSelection.js +312 -30
  50. package/dist/components/Timeline/TimelineSequence.js +23 -15
  51. package/dist/components/Timeline/TimelineSequenceItem.js +48 -73
  52. package/dist/components/Timeline/TimelineSequenceName.js +3 -17
  53. package/dist/components/Timeline/TimelineSequencePropItem.js +37 -37
  54. package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.d.ts +5 -5
  55. package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.js +46 -44
  56. package/dist/components/Timeline/TimelineTimeIndicators.js +4 -2
  57. package/dist/components/Timeline/TimelineTransformOriginField.d.ts +11 -0
  58. package/dist/components/Timeline/TimelineTransformOriginField.js +138 -0
  59. package/dist/components/Timeline/TimelineTranslateField.js +24 -19
  60. package/dist/components/Timeline/TimelineUvCoordinateField.js +18 -12
  61. package/dist/components/Timeline/{apply-effect-response-to-code-values.d.ts → apply-effect-response-to-prop-statuses.d.ts} +1 -1
  62. package/dist/components/Timeline/{apply-effect-response-to-code-values.js → apply-effect-response-to-prop-statuses.js} +3 -3
  63. package/dist/components/Timeline/call-add-keyframe.d.ts +22 -5
  64. package/dist/components/Timeline/call-add-keyframe.js +71 -7
  65. package/dist/components/Timeline/call-delete-keyframe.d.ts +7 -7
  66. package/dist/components/Timeline/call-delete-keyframe.js +7 -7
  67. package/dist/components/Timeline/call-move-keyframe.d.ts +3 -3
  68. package/dist/components/Timeline/call-move-keyframe.js +3 -3
  69. package/dist/components/Timeline/call-update-keyframe-settings.d.ts +5 -5
  70. package/dist/components/Timeline/call-update-keyframe-settings.js +6 -6
  71. package/dist/components/Timeline/delete-selected-keyframe.d.ts +5 -5
  72. package/dist/components/Timeline/delete-selected-keyframe.js +5 -5
  73. package/dist/components/Timeline/delete-selected-timeline-item.d.ts +5 -5
  74. package/dist/components/Timeline/delete-selected-timeline-item.js +28 -16
  75. package/dist/components/Timeline/get-node-keyframes.d.ts +3 -3
  76. package/dist/components/Timeline/get-node-keyframes.js +4 -4
  77. package/dist/components/Timeline/get-timeline-easing-segments.d.ts +9 -0
  78. package/dist/components/Timeline/get-timeline-easing-segments.js +19 -0
  79. package/dist/components/Timeline/reset-selected-timeline-props.d.ts +7 -7
  80. package/dist/components/Timeline/reset-selected-timeline-props.js +23 -15
  81. package/dist/components/Timeline/save-effect-prop.d.ts +2 -2
  82. package/dist/components/Timeline/save-effect-prop.js +5 -5
  83. package/dist/components/Timeline/save-prop-queue.d.ts +3 -3
  84. package/dist/components/Timeline/save-prop-queue.js +3 -3
  85. package/dist/components/Timeline/save-sequence-prop.d.ts +3 -3
  86. package/dist/components/Timeline/save-sequence-prop.js +4 -4
  87. package/dist/components/Timeline/timeline-field-utils.d.ts +10 -0
  88. package/dist/components/Timeline/timeline-field-utils.js +26 -5
  89. package/dist/components/Timeline/timeline-rotation-utils.d.ts +2 -0
  90. package/dist/components/Timeline/timeline-rotation-utils.js +32 -0
  91. package/dist/components/Timeline/timeline-translate-utils.d.ts +1 -1
  92. package/dist/components/Timeline/timeline-translate-utils.js +4 -5
  93. package/dist/components/Timeline/transform-origin-utils.d.ts +24 -0
  94. package/dist/components/Timeline/transform-origin-utils.js +170 -0
  95. package/dist/components/Timeline/update-selected-easing.d.ts +35 -0
  96. package/dist/components/Timeline/update-selected-easing.js +133 -0
  97. package/dist/components/Timeline/use-expanded-track-keyframe-rows.d.ts +1 -0
  98. package/dist/components/Timeline/use-expanded-track-keyframe-rows.js +35 -7
  99. package/dist/components/Timeline/use-sequence-props-subscription.js +3 -3
  100. package/dist/components/Timeline/use-timeline-height.js +3 -3
  101. package/dist/components/Timeline/use-timeline-keyframe-drag.js +13 -11
  102. package/dist/components/canvas-capture-enabled.d.ts +1 -0
  103. package/dist/components/canvas-capture-enabled.js +4 -0
  104. package/dist/components/effect-drag-and-drop.d.ts +11 -0
  105. package/dist/components/effect-drag-and-drop.js +73 -0
  106. package/dist/components/import-assets.d.ts +15 -0
  107. package/dist/components/import-assets.js +63 -1
  108. package/dist/components/selected-outline-geometry.d.ts +20 -0
  109. package/dist/components/selected-outline-geometry.js +18 -0
  110. package/dist/components/selected-outline-uv.d.ts +46 -0
  111. package/dist/components/selected-outline-uv.js +240 -0
  112. package/dist/esm/{chunk-q0jkt0zq.js → chunk-qaqqvw4q.js} +8096 -5307
  113. package/dist/esm/internals.mjs +8096 -5307
  114. package/dist/esm/previewEntry.mjs +8106 -5317
  115. package/dist/esm/renderEntry.mjs +1 -1
  116. package/dist/helpers/colors.d.ts +0 -1
  117. package/dist/helpers/colors.js +1 -2
  118. package/dist/helpers/timeline-layout.d.ts +6 -6
  119. package/dist/helpers/timeline-layout.js +5 -5
  120. package/dist/state/modals.d.ts +2 -4
  121. package/package.json +11 -10
  122. package/dist/components/NewComposition/DeleteStaticFile.d.ts +0 -4
  123. package/dist/components/NewComposition/DeleteStaticFile.js +0 -44
@@ -22,14 +22,14 @@ const baseStyle = {
22
22
  zIndex: 1,
23
23
  touchAction: 'none',
24
24
  };
25
- const canUpdateDurationInFrames = ({ codeValues, nodePath, }) => {
25
+ const canUpdateDurationInFrames = ({ propStatuses, nodePath, }) => {
26
26
  var _a, _b;
27
- const status = (_b = (_a = remotion_1.Internals.getCodeValuesCtx(codeValues, nodePath)) === null || _a === void 0 ? void 0 : _a.durationInFrames) === null || _b === void 0 ? void 0 : _b.status;
27
+ 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;
28
28
  return status === 'static';
29
29
  };
30
- const canUpdateFrom = ({ codeValues, nodePath, }) => {
30
+ const canUpdateFrom = ({ propStatuses, nodePath, }) => {
31
31
  var _a, _b;
32
- const status = (_b = (_a = remotion_1.Internals.getCodeValuesCtx(codeValues, nodePath)) === null || _a === void 0 ? void 0 : _a.from) === null || _b === void 0 ? void 0 : _b.status;
32
+ const status = (_b = (_a = remotion_1.Internals.getPropStatusesCtx(propStatuses, nodePath)) === null || _a === void 0 ? void 0 : _a.from) === null || _b === void 0 ? void 0 : _b.status;
33
33
  return status === 'static';
34
34
  };
35
35
  const isDurationDraggableSequence = (sequence) => {
@@ -100,7 +100,7 @@ const findSequenceTrack = ({ tracks, nodePathInfo, }) => {
100
100
  return ((0, studio_shared_1.stringifySequenceSubscriptionKey)(candidate.nodePathInfo.sequenceSubscriptionKey) === key && candidate.nodePathInfo.index === nodePathInfo.index);
101
101
  });
102
102
  };
103
- const getTimelineSequenceDurationDragTargets = ({ draggedNodePathInfo, selectedItems, sequences, overrideIdsToNodePaths, codeValues, }) => {
103
+ const getTimelineSequenceDurationDragTargets = ({ draggedNodePathInfo, selectedItems, sequences, overrideIdsToNodePaths, propStatuses, }) => {
104
104
  const draggedSelectionKey = (0, TimelineSelection_1.getTimelineSequenceSelectionKey)(draggedNodePathInfo);
105
105
  const selectedSequenceItems = selectedItems.filter((item) => item.type === 'sequence');
106
106
  const draggedItemIsSelected = selectedSequenceItems.some((item) => (0, TimelineSelection_1.getTimelineSequenceSelectionKey)(item.nodePathInfo) ===
@@ -125,7 +125,7 @@ const getTimelineSequenceDurationDragTargets = ({ draggedNodePathInfo, selectedI
125
125
  return null;
126
126
  }
127
127
  const nodePath = nodePathInfo.sequenceSubscriptionKey;
128
- if (!canUpdateDurationInFrames({ codeValues, nodePath })) {
128
+ if (!canUpdateDurationInFrames({ propStatuses, nodePath })) {
129
129
  return null;
130
130
  }
131
131
  const key = (0, studio_shared_1.stringifySequenceSubscriptionKey)(nodePath);
@@ -140,7 +140,7 @@ const getTimelineSequenceDurationDragTargets = ({ draggedNodePathInfo, selectedI
140
140
  return [...targets.values()];
141
141
  };
142
142
  exports.getTimelineSequenceDurationDragTargets = getTimelineSequenceDurationDragTargets;
143
- const getTimelineSequenceFromDragTargets = ({ draggedNodePathInfo, selectedItems, sequences, overrideIdsToNodePaths, codeValues, }) => {
143
+ const getTimelineSequenceFromDragTargets = ({ draggedNodePathInfo, selectedItems, sequences, overrideIdsToNodePaths, propStatuses, }) => {
144
144
  const draggedSelectionKey = (0, TimelineSelection_1.getTimelineSequenceSelectionKey)(draggedNodePathInfo);
145
145
  const selectedSequenceItems = selectedItems.filter((item) => item.type === 'sequence');
146
146
  const draggedItemIsSelected = selectedSequenceItems.some((item) => (0, TimelineSelection_1.getTimelineSequenceSelectionKey)(item.nodePathInfo) ===
@@ -165,7 +165,7 @@ const getTimelineSequenceFromDragTargets = ({ draggedNodePathInfo, selectedItems
165
165
  return null;
166
166
  }
167
167
  const nodePath = nodePathInfo.sequenceSubscriptionKey;
168
- if (!canUpdateFrom({ codeValues, nodePath })) {
168
+ if (!canUpdateFrom({ propStatuses, nodePath })) {
169
169
  return null;
170
170
  }
171
171
  const key = (0, studio_shared_1.stringifySequenceSubscriptionKey)(nodePath);
@@ -191,35 +191,29 @@ const clearFromDragOverrides = ({ clearDragOverrides, targets, }) => {
191
191
  }
192
192
  };
193
193
  const useTimelineSequenceFromDrag = ({ nodePathInfo, windowWidth, timelineDurationInFrames, }) => {
194
- const { setCodeValues, setDragOverrides, clearDragOverrides } = (0, react_1.useContext)(remotion_1.Internals.VisualModeSettersContext);
195
- const { codeValues } = (0, react_1.useContext)(remotion_1.Internals.VisualModeCodeValuesContext);
196
- const { sequences } = (0, react_1.useContext)(remotion_1.Internals.SequenceManager);
194
+ const { setPropStatuses, setDragOverrides, clearDragOverrides } = (0, react_1.useContext)(remotion_1.Internals.VisualModeSettersContext);
195
+ const propStatusesRef = (0, react_1.useContext)(remotion_1.Internals.VisualModePropStatusesRefContext);
196
+ const sequencesRef = (0, react_1.useContext)(remotion_1.Internals.SequenceManagerRefContext);
197
197
  const { overrideIdToNodePathMappings } = (0, react_1.useContext)(remotion_1.Internals.OverrideIdsToNodePathsGettersContext);
198
198
  const { previewServerState } = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx);
199
- const { selectedItems } = (0, TimelineSelection_1.useTimelineSelection)();
199
+ const currentSelection = (0, TimelineSelection_1.useCurrentTimelineSelectionStateAsRef)();
200
200
  const [dragging, setDragging] = (0, react_1.useState)(false);
201
201
  const dragStateRef = (0, react_1.useRef)(null);
202
202
  const latestRef = (0, react_1.useRef)({
203
203
  nodePathInfo,
204
- setCodeValues,
204
+ setPropStatuses,
205
205
  setDragOverrides,
206
206
  clearDragOverrides,
207
207
  previewServerState,
208
- codeValues,
209
- sequences,
210
208
  overrideIdToNodePathMappings,
211
- selectedItems,
212
209
  });
213
210
  latestRef.current = {
214
211
  nodePathInfo,
215
- setCodeValues,
212
+ setPropStatuses,
216
213
  setDragOverrides,
217
214
  clearDragOverrides,
218
215
  previewServerState,
219
- codeValues,
220
- sequences,
221
216
  overrideIdToNodePathMappings,
222
- selectedItems,
223
217
  };
224
218
  const finishDrag = (0, react_1.useCallback)((commit) => {
225
219
  const dragState = dragStateRef.current;
@@ -230,7 +224,7 @@ const useTimelineSequenceFromDrag = ({ nodePathInfo, windowWidth, timelineDurati
230
224
  if (!dragState) {
231
225
  return;
232
226
  }
233
- const { setCodeValues: latestSetCodeValues, clearDragOverrides: latestClear, previewServerState: latestServerState, } = latestRef.current;
227
+ const { setPropStatuses: latestSetPropStatuses, clearDragOverrides: latestClear, previewServerState: latestServerState, } = latestRef.current;
234
228
  const changes = (0, exports.getTimelineSequenceFromDragChanges)({
235
229
  targets: dragState.targets,
236
230
  deltaFrames: dragState.latestDeltaFrames,
@@ -246,7 +240,7 @@ const useTimelineSequenceFromDrag = ({ nodePathInfo, windowWidth, timelineDurati
246
240
  }
247
241
  const savePromise = (0, save_sequence_prop_1.saveSequenceProps)({
248
242
  changes,
249
- setCodeValues: latestSetCodeValues,
243
+ setPropStatuses: latestSetPropStatuses,
250
244
  clientId: latestServerState.clientId,
251
245
  undoLabel: changes.length > 1 ? 'Move selected sequences' : 'Move sequence',
252
246
  redoLabel: changes.length > 1
@@ -274,16 +268,17 @@ const useTimelineSequenceFromDrag = ({ nodePathInfo, windowWidth, timelineDurati
274
268
  if (pxPerFrame <= 0) {
275
269
  return;
276
270
  }
277
- const { nodePathInfo: latestNodePathInfo, selectedItems: latestSelectedItems, sequences: latestSequences, overrideIdToNodePathMappings: latestOverrideIdsToNodePaths, codeValues: latestCodeValues, } = latestRef.current;
271
+ const { nodePathInfo: latestNodePathInfo, overrideIdToNodePathMappings: latestOverrideIdsToNodePaths, } = latestRef.current;
272
+ const { selectedItems: latestSelectedItems } = currentSelection.current;
278
273
  if (latestNodePathInfo === null) {
279
274
  return;
280
275
  }
281
276
  const targets = (0, exports.getTimelineSequenceFromDragTargets)({
282
277
  draggedNodePathInfo: latestNodePathInfo,
283
278
  selectedItems: latestSelectedItems,
284
- sequences: latestSequences,
279
+ sequences: sequencesRef.current,
285
280
  overrideIdsToNodePaths: latestOverrideIdsToNodePaths,
286
- codeValues: latestCodeValues,
281
+ propStatuses: propStatusesRef.current,
287
282
  });
288
283
  if (targets === null || targets.length === 0) {
289
284
  return;
@@ -299,7 +294,13 @@ const useTimelineSequenceFromDrag = ({ nodePathInfo, windowWidth, timelineDurati
299
294
  document.body.style.userSelect = 'none';
300
295
  document.body.style.webkitUserSelect = 'none';
301
296
  setDragging(true);
302
- }, [timelineDurationInFrames, windowWidth]);
297
+ }, [
298
+ currentSelection,
299
+ propStatusesRef,
300
+ sequencesRef,
301
+ timelineDurationInFrames,
302
+ windowWidth,
303
+ ]);
303
304
  (0, react_1.useEffect)(() => {
304
305
  if (!dragging) {
305
306
  return;
@@ -354,36 +355,30 @@ const useTimelineSequenceFromDrag = ({ nodePathInfo, windowWidth, timelineDurati
354
355
  };
355
356
  exports.useTimelineSequenceFromDrag = useTimelineSequenceFromDrag;
356
357
  const TimelineSequenceRightEdgeDragHandle = ({ nodePathInfo, windowWidth, timelineDurationInFrames }) => {
357
- const { setCodeValues, setDragOverrides, clearDragOverrides } = (0, react_1.useContext)(remotion_1.Internals.VisualModeSettersContext);
358
- const { codeValues } = (0, react_1.useContext)(remotion_1.Internals.VisualModeCodeValuesContext);
359
- const { sequences } = (0, react_1.useContext)(remotion_1.Internals.SequenceManager);
358
+ const { setPropStatuses, setDragOverrides, clearDragOverrides } = (0, react_1.useContext)(remotion_1.Internals.VisualModeSettersContext);
359
+ const propStatusesRef = (0, react_1.useContext)(remotion_1.Internals.VisualModePropStatusesRefContext);
360
+ const sequencesRef = (0, react_1.useContext)(remotion_1.Internals.SequenceManagerRefContext);
360
361
  const { overrideIdToNodePathMappings } = (0, react_1.useContext)(remotion_1.Internals.OverrideIdsToNodePathsGettersContext);
361
362
  const { previewServerState } = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx);
362
- const { selectedItems } = (0, TimelineSelection_1.useTimelineSelection)();
363
+ const currentSelection = (0, TimelineSelection_1.useCurrentTimelineSelectionStateAsRef)();
363
364
  const [dragging, setDragging] = (0, react_1.useState)(false);
364
365
  const dragStateRef = (0, react_1.useRef)(null);
365
366
  // Keep latest props/setters available to window listeners installed once at pointerdown.
366
367
  const latestRef = (0, react_1.useRef)({
367
368
  nodePathInfo,
368
- setCodeValues,
369
+ setPropStatuses,
369
370
  setDragOverrides,
370
371
  clearDragOverrides,
371
372
  previewServerState,
372
- codeValues,
373
- sequences,
374
373
  overrideIdToNodePathMappings,
375
- selectedItems,
376
374
  });
377
375
  latestRef.current = {
378
376
  nodePathInfo,
379
- setCodeValues,
377
+ setPropStatuses,
380
378
  setDragOverrides,
381
379
  clearDragOverrides,
382
380
  previewServerState,
383
- codeValues,
384
- sequences,
385
381
  overrideIdToNodePathMappings,
386
- selectedItems,
387
382
  };
388
383
  const finishDrag = (0, react_1.useCallback)((commit) => {
389
384
  const dragState = dragStateRef.current;
@@ -395,7 +390,7 @@ const TimelineSequenceRightEdgeDragHandle = ({ nodePathInfo, windowWidth, timeli
395
390
  if (!dragState) {
396
391
  return;
397
392
  }
398
- const { setCodeValues: latestSetCodeValues, clearDragOverrides: latestClear, previewServerState: latestServerState, } = latestRef.current;
393
+ const { setPropStatuses: latestSetPropStatuses, clearDragOverrides: latestClear, previewServerState: latestServerState, } = latestRef.current;
399
394
  const changes = (0, exports.getTimelineSequenceDurationDragChanges)({
400
395
  targets: dragState.targets,
401
396
  deltaFrames: dragState.latestDeltaFrames,
@@ -411,7 +406,7 @@ const TimelineSequenceRightEdgeDragHandle = ({ nodePathInfo, windowWidth, timeli
411
406
  }
412
407
  const savePromise = (0, save_sequence_prop_1.saveSequenceProps)({
413
408
  changes,
414
- setCodeValues: latestSetCodeValues,
409
+ setPropStatuses: latestSetPropStatuses,
415
410
  clientId: latestServerState.clientId,
416
411
  undoLabel: changes.length > 1 ? 'Resize selected sequences' : 'Resize sequence',
417
412
  redoLabel: changes.length > 1
@@ -439,13 +434,14 @@ const TimelineSequenceRightEdgeDragHandle = ({ nodePathInfo, windowWidth, timeli
439
434
  if (pxPerFrame <= 0) {
440
435
  return;
441
436
  }
442
- const { nodePathInfo: latestNodePathInfo, selectedItems: latestSelectedItems, sequences: latestSequences, overrideIdToNodePathMappings: latestOverrideIdsToNodePaths, codeValues: latestCodeValues, } = latestRef.current;
437
+ const { nodePathInfo: latestNodePathInfo, overrideIdToNodePathMappings: latestOverrideIdsToNodePaths, } = latestRef.current;
438
+ const { selectedItems: latestSelectedItems } = currentSelection.current;
443
439
  const targets = (0, exports.getTimelineSequenceDurationDragTargets)({
444
440
  draggedNodePathInfo: latestNodePathInfo,
445
441
  selectedItems: latestSelectedItems,
446
- sequences: latestSequences,
442
+ sequences: sequencesRef.current,
447
443
  overrideIdsToNodePaths: latestOverrideIdsToNodePaths,
448
- codeValues: latestCodeValues,
444
+ propStatuses: propStatusesRef.current,
449
445
  });
450
446
  if (targets === null || targets.length === 0) {
451
447
  return;
@@ -463,7 +459,13 @@ const TimelineSequenceRightEdgeDragHandle = ({ nodePathInfo, windowWidth, timeli
463
459
  document.body.style.webkitUserSelect = 'none';
464
460
  (0, ForceSpecificCursor_1.forceSpecificCursor)('ew-resize');
465
461
  setDragging(true);
466
- }, [timelineDurationInFrames, windowWidth]);
462
+ }, [
463
+ currentSelection,
464
+ propStatusesRef,
465
+ sequencesRef,
466
+ timelineDurationInFrames,
467
+ windowWidth,
468
+ ]);
467
469
  // Install global pointer listeners while dragging. They survive parent re-renders
468
470
  // and element remounts that would otherwise drop React's synthetic handlers or
469
471
  // pointer capture.
@@ -10,13 +10,15 @@ const render_frame_1 = require("../../state/render-frame");
10
10
  const TimeValue_1 = require("../TimeValue");
11
11
  const timeline_refs_1 = require("./timeline-refs");
12
12
  const timeline_scroll_logic_1 = require("./timeline-scroll-logic");
13
+ const TimelineSelection_1 = require("./TimelineSelection");
13
14
  const TimelineWidthProvider_1 = require("./TimelineWidthProvider");
14
15
  exports.TIMELINE_TIME_INDICATOR_HEIGHT = 39;
15
16
  const container = {
16
17
  height: exports.TIMELINE_TIME_INDICATOR_HEIGHT,
17
18
  position: 'absolute',
18
- backgroundColor: colors_1.TIMELINE_BACKGROUND,
19
+ backgroundColor: TimelineSelection_1.TIMELINE_TICKS_BACKGROUND,
19
20
  top: 0,
21
+ borderBottom: `${timeline_layout_1.TIMELINE_ITEM_BORDER_BOTTOM}px solid ${colors_1.TIMELINE_TRACK_SEPARATOR}`,
20
22
  };
21
23
  const tick = {
22
24
  width: 1,
@@ -41,7 +43,7 @@ const timeValue = {
41
43
  height: exports.TIMELINE_TIME_INDICATOR_HEIGHT,
42
44
  position: 'absolute',
43
45
  top: 0,
44
- width: '100%',
46
+ width: 'calc(100% + 1.5px)',
45
47
  paddingLeft: 10,
46
48
  display: 'flex',
47
49
  alignItems: 'center',
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ import type { CanUpdateSequencePropStatusStatic } from 'remotion';
3
+ import type { SchemaFieldInfo, TimelineFieldOnDragValueChange, TimelineFieldOnSave } from '../../helpers/timeline-layout';
4
+ export declare const TimelineTransformOriginField: React.FC<{
5
+ readonly field: SchemaFieldInfo;
6
+ readonly propStatus: CanUpdateSequencePropStatusStatic;
7
+ readonly effectiveValue: unknown;
8
+ readonly onSave: TimelineFieldOnSave;
9
+ readonly onDragValueChange: TimelineFieldOnDragValueChange;
10
+ readonly onDragEnd: () => void;
11
+ }>;
@@ -0,0 +1,138 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TimelineTransformOriginField = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const react_1 = require("react");
6
+ const InputDragger_1 = require("../NewComposition/InputDragger");
7
+ const timeline_field_utils_1 = require("./timeline-field-utils");
8
+ const TimelineSchemaField_1 = require("./TimelineSchemaField");
9
+ const transform_origin_utils_1 = require("./transform-origin-utils");
10
+ const leftDraggerStyle = {
11
+ paddingLeft: 0,
12
+ };
13
+ const rightDraggerStyle = {
14
+ paddingRight: 0,
15
+ };
16
+ const containerStyle = {
17
+ display: 'flex',
18
+ gap: 4,
19
+ };
20
+ const TimelineTransformOriginField = ({ field, propStatus, effectiveValue, onSave, onDragValueChange, onDragEnd, }) => {
21
+ const [dragX, setDragX] = (0, react_1.useState)(null);
22
+ const [dragY, setDragY] = (0, react_1.useState)(null);
23
+ const parsed = (0, react_1.useMemo)(() => (0, transform_origin_utils_1.parseTransformOrigin)(effectiveValue), [effectiveValue]);
24
+ const percent = (0, react_1.useMemo)(() => (parsed === null ? null : (0, transform_origin_utils_1.parsedTransformOriginToPercent)(parsed)), [parsed]);
25
+ const configuredStep = field.fieldSchema.type === 'transform-origin'
26
+ ? field.fieldSchema.step
27
+ : undefined;
28
+ const step = configuredStep !== null && configuredStep !== void 0 ? configuredStep : 1;
29
+ const decimalPlaces = (0, react_1.useMemo)(() => (0, timeline_field_utils_1.getTimelineDisplayDecimalPlaces)({
30
+ defaultDecimalPlaces: 2,
31
+ step: configuredStep,
32
+ }), [configuredStep]);
33
+ const formatter = (0, react_1.useCallback)((v) => {
34
+ const formatted = (0, timeline_field_utils_1.formatTimelineNumber)({
35
+ decimalPlaces,
36
+ fixed: false,
37
+ value: v,
38
+ });
39
+ return `${formatted}%`;
40
+ }, [decimalPlaces]);
41
+ const serialize = (0, react_1.useCallback)((x, y) => {
42
+ var _a;
43
+ return (0, transform_origin_utils_1.serializeTransformOrigin)({
44
+ uv: (0, transform_origin_utils_1.transformOriginPercentToUv)([x, y]),
45
+ z: (_a = parsed === null || parsed === void 0 ? void 0 : parsed.z) !== null && _a !== void 0 ? _a : null,
46
+ decimalPlaces,
47
+ });
48
+ }, [decimalPlaces, parsed === null || parsed === void 0 ? void 0 : parsed.z]);
49
+ const onXChange = (0, react_1.useCallback)((newVal) => {
50
+ if (percent === null) {
51
+ return;
52
+ }
53
+ setDragX(newVal);
54
+ const currentY = dragY !== null && dragY !== void 0 ? dragY : percent[1];
55
+ onDragValueChange(serialize(newVal, currentY));
56
+ }, [dragY, onDragValueChange, percent, serialize]);
57
+ const onXChangeEnd = (0, react_1.useCallback)((newVal) => {
58
+ if (percent === null) {
59
+ return;
60
+ }
61
+ const currentY = dragY !== null && dragY !== void 0 ? dragY : percent[1];
62
+ const value = serialize(newVal, currentY);
63
+ if (value !== propStatus.codeValue) {
64
+ onSave(value).finally(() => {
65
+ setDragX(null);
66
+ onDragEnd();
67
+ });
68
+ }
69
+ else {
70
+ setDragX(null);
71
+ onDragEnd();
72
+ }
73
+ }, [dragY, onDragEnd, onSave, percent, propStatus.codeValue, serialize]);
74
+ const onXTextChange = (0, react_1.useCallback)((newVal) => {
75
+ if (percent === null) {
76
+ return;
77
+ }
78
+ const parsedValue = Number(newVal);
79
+ if (!Number.isNaN(parsedValue)) {
80
+ const currentY = dragY !== null && dragY !== void 0 ? dragY : percent[1];
81
+ const value = serialize(parsedValue, currentY);
82
+ if (value !== propStatus.codeValue) {
83
+ setDragX(parsedValue);
84
+ onSave(value).finally(() => {
85
+ setDragX(null);
86
+ });
87
+ }
88
+ }
89
+ }, [dragY, onSave, percent, propStatus.codeValue, serialize]);
90
+ const onYChange = (0, react_1.useCallback)((newVal) => {
91
+ if (percent === null) {
92
+ return;
93
+ }
94
+ setDragY(newVal);
95
+ const currentX = dragX !== null && dragX !== void 0 ? dragX : percent[0];
96
+ onDragValueChange(serialize(currentX, newVal));
97
+ }, [dragX, onDragValueChange, percent, serialize]);
98
+ const onYChangeEnd = (0, react_1.useCallback)((newVal) => {
99
+ if (percent === null) {
100
+ return;
101
+ }
102
+ const currentX = dragX !== null && dragX !== void 0 ? dragX : percent[0];
103
+ const value = serialize(currentX, newVal);
104
+ if (value !== propStatus.codeValue) {
105
+ onSave(value).finally(() => {
106
+ setDragY(null);
107
+ onDragEnd();
108
+ });
109
+ }
110
+ else {
111
+ setDragY(null);
112
+ onDragEnd();
113
+ }
114
+ }, [dragX, onDragEnd, onSave, percent, propStatus.codeValue, serialize]);
115
+ const onYTextChange = (0, react_1.useCallback)((newVal) => {
116
+ if (percent === null) {
117
+ return;
118
+ }
119
+ const parsedValue = Number(newVal);
120
+ if (!Number.isNaN(parsedValue)) {
121
+ const currentX = dragX !== null && dragX !== void 0 ? dragX : percent[0];
122
+ const value = serialize(currentX, parsedValue);
123
+ if (value !== propStatus.codeValue) {
124
+ setDragY(parsedValue);
125
+ onSave(value).finally(() => {
126
+ setDragY(null);
127
+ });
128
+ }
129
+ }
130
+ }, [dragX, onSave, percent, propStatus.codeValue, serialize]);
131
+ if (percent === null) {
132
+ return jsx_runtime_1.jsx(TimelineSchemaField_1.UnsupportedStatus, { label: "unsupported origin" });
133
+ }
134
+ return (jsx_runtime_1.jsxs("span", { style: containerStyle, children: [
135
+ jsx_runtime_1.jsx(InputDragger_1.InputDragger, { type: "number", value: dragX !== null && dragX !== void 0 ? dragX : percent[0], style: leftDraggerStyle, status: "ok", small: true, onValueChange: onXChange, onValueChangeEnd: onXChangeEnd, onTextChange: onXTextChange, min: -Infinity, max: Infinity, step: step, formatter: formatter, rightAlign: false, snapToStep: false }), jsx_runtime_1.jsx("div", { style: { marginLeft: -6, marginRight: -6 } }), jsx_runtime_1.jsx(InputDragger_1.InputDragger, { type: "number", value: dragY !== null && dragY !== void 0 ? dragY : percent[1], style: rightDraggerStyle, status: "ok", small: true, onValueChange: onYChange, onValueChangeEnd: onYChangeEnd, onTextChange: onYTextChange, min: -Infinity, max: Infinity, step: step, formatter: formatter, rightAlign: false, snapToStep: false })
136
+ ] }));
137
+ };
138
+ exports.TimelineTransformOriginField = TimelineTransformOriginField;
@@ -17,27 +17,32 @@ const containerStyle = {
17
17
  gap: 4,
18
18
  };
19
19
  const TimelineTranslateField = ({ field, propStatus, effectiveValue, onSave, onDragValueChange, onDragEnd, }) => {
20
- var _a;
21
20
  const [dragX, setDragX] = (0, react_1.useState)(null);
22
21
  const [dragY, setDragY] = (0, react_1.useState)(null);
23
22
  const [codeX, codeY] = (0, react_1.useMemo)(() => (0, timeline_translate_utils_1.parseTranslate)(String(effectiveValue !== null && effectiveValue !== void 0 ? effectiveValue : '0px 0px')), [effectiveValue]);
24
- const step = field.fieldSchema.type === 'translate' ? ((_a = field.fieldSchema.step) !== null && _a !== void 0 ? _a : 1) : 1;
25
- const stepDecimals = (0, react_1.useMemo)(() => (0, timeline_field_utils_1.getDecimalPlaces)(step), [step]);
23
+ const configuredStep = field.fieldSchema.type === 'translate' ? field.fieldSchema.step : undefined;
24
+ const step = configuredStep !== null && configuredStep !== void 0 ? configuredStep : 1;
25
+ const decimalPlaces = (0, react_1.useMemo)(() => (0, timeline_field_utils_1.getTimelineDisplayDecimalPlaces)({
26
+ defaultDecimalPlaces: 1,
27
+ step: configuredStep,
28
+ }), [configuredStep]);
26
29
  const formatter = (0, react_1.useCallback)((v) => {
27
- const num = (0, timeline_field_utils_1.normalizeTimelineNumber)(Number(v));
28
- const digits = Math.max(stepDecimals, (0, timeline_field_utils_1.getDecimalPlaces)(num));
29
- const formatted = digits === 0 ? String(num) : num.toFixed(digits);
30
+ const formatted = (0, timeline_field_utils_1.formatTimelineNumber)({
31
+ decimalPlaces,
32
+ fixed: false,
33
+ value: v,
34
+ });
30
35
  return `${formatted}px`;
31
- }, [stepDecimals]);
36
+ }, [decimalPlaces]);
32
37
  // --- X callbacks ---
33
38
  const onXChange = (0, react_1.useCallback)((newVal) => {
34
39
  setDragX(newVal);
35
40
  const currentY = dragY !== null && dragY !== void 0 ? dragY : codeY;
36
- onDragValueChange((0, timeline_translate_utils_1.serializeTranslate)(newVal, currentY));
37
- }, [onDragValueChange, dragY, codeY]);
41
+ onDragValueChange((0, timeline_translate_utils_1.serializeTranslate)(newVal, currentY, decimalPlaces));
42
+ }, [onDragValueChange, dragY, codeY, decimalPlaces]);
38
43
  const onXChangeEnd = (0, react_1.useCallback)((newVal) => {
39
44
  const currentY = dragY !== null && dragY !== void 0 ? dragY : codeY;
40
- const newStr = (0, timeline_translate_utils_1.serializeTranslate)(newVal, currentY);
45
+ const newStr = (0, timeline_translate_utils_1.serializeTranslate)(newVal, currentY, decimalPlaces);
41
46
  if (newStr !== propStatus.codeValue) {
42
47
  onSave(newStr).finally(() => {
43
48
  setDragX(null);
@@ -48,12 +53,12 @@ const TimelineTranslateField = ({ field, propStatus, effectiveValue, onSave, onD
48
53
  setDragX(null);
49
54
  onDragEnd();
50
55
  }
51
- }, [dragY, codeY, propStatus, onSave, onDragEnd]);
56
+ }, [dragY, codeY, decimalPlaces, propStatus, onSave, onDragEnd]);
52
57
  const onXTextChange = (0, react_1.useCallback)((newVal) => {
53
58
  const parsed = Number(newVal);
54
59
  if (!Number.isNaN(parsed)) {
55
60
  const currentY = dragY !== null && dragY !== void 0 ? dragY : codeY;
56
- const newStr = (0, timeline_translate_utils_1.serializeTranslate)(parsed, currentY);
61
+ const newStr = (0, timeline_translate_utils_1.serializeTranslate)(parsed, currentY, decimalPlaces);
57
62
  if (newStr !== propStatus.codeValue) {
58
63
  setDragX(parsed);
59
64
  onSave(newStr).finally(() => {
@@ -61,16 +66,16 @@ const TimelineTranslateField = ({ field, propStatus, effectiveValue, onSave, onD
61
66
  });
62
67
  }
63
68
  }
64
- }, [propStatus, dragY, codeY, onSave]);
69
+ }, [propStatus, dragY, codeY, decimalPlaces, onSave]);
65
70
  // --- Y callbacks ---
66
71
  const onYChange = (0, react_1.useCallback)((newVal) => {
67
72
  setDragY(newVal);
68
73
  const currentX = dragX !== null && dragX !== void 0 ? dragX : codeX;
69
- onDragValueChange((0, timeline_translate_utils_1.serializeTranslate)(currentX, newVal));
70
- }, [onDragValueChange, dragX, codeX]);
74
+ onDragValueChange((0, timeline_translate_utils_1.serializeTranslate)(currentX, newVal, decimalPlaces));
75
+ }, [onDragValueChange, dragX, codeX, decimalPlaces]);
71
76
  const onYChangeEnd = (0, react_1.useCallback)((newVal) => {
72
77
  const currentX = dragX !== null && dragX !== void 0 ? dragX : codeX;
73
- const newStr = (0, timeline_translate_utils_1.serializeTranslate)(currentX, newVal);
78
+ const newStr = (0, timeline_translate_utils_1.serializeTranslate)(currentX, newVal, decimalPlaces);
74
79
  if (newStr !== propStatus.codeValue) {
75
80
  onSave(newStr).finally(() => {
76
81
  setDragY(null);
@@ -81,12 +86,12 @@ const TimelineTranslateField = ({ field, propStatus, effectiveValue, onSave, onD
81
86
  setDragY(null);
82
87
  onDragEnd();
83
88
  }
84
- }, [dragX, codeX, propStatus, onSave, onDragEnd]);
89
+ }, [dragX, codeX, decimalPlaces, propStatus, onSave, onDragEnd]);
85
90
  const onYTextChange = (0, react_1.useCallback)((newVal) => {
86
91
  const parsed = Number(newVal);
87
92
  if (!Number.isNaN(parsed)) {
88
93
  const currentX = dragX !== null && dragX !== void 0 ? dragX : codeX;
89
- const newStr = (0, timeline_translate_utils_1.serializeTranslate)(currentX, parsed);
94
+ const newStr = (0, timeline_translate_utils_1.serializeTranslate)(currentX, parsed, decimalPlaces);
90
95
  if (newStr !== propStatus.codeValue) {
91
96
  setDragY(parsed);
92
97
  onSave(newStr).finally(() => {
@@ -94,7 +99,7 @@ const TimelineTranslateField = ({ field, propStatus, effectiveValue, onSave, onD
94
99
  });
95
100
  }
96
101
  }
97
- }, [propStatus, onSave, dragX, codeX]);
102
+ }, [propStatus, onSave, dragX, codeX, decimalPlaces]);
98
103
  return (jsx_runtime_1.jsxs("span", { style: containerStyle, children: [
99
104
  jsx_runtime_1.jsx(InputDragger_1.InputDragger, { type: "number", value: dragX !== null && dragX !== void 0 ? dragX : codeX, style: leftDraggerStyle, status: "ok", small: true, onValueChange: onXChange, onValueChangeEnd: onXChangeEnd, onTextChange: onXTextChange, min: -Infinity, max: Infinity, step: step, formatter: formatter, rightAlign: false }), jsx_runtime_1.jsx("div", { style: { marginLeft: -6, marginRight: -6 } }), jsx_runtime_1.jsx(InputDragger_1.InputDragger, { type: "number", value: dragY !== null && dragY !== void 0 ? dragY : codeY, style: rightDraggerStyle, status: "ok", small: true, onValueChange: onYChange, onValueChangeEnd: onYChangeEnd, onTextChange: onYTextChange, min: -Infinity, max: Infinity, step: step, formatter: formatter, rightAlign: false })
100
105
  ] }));
@@ -30,25 +30,31 @@ const tuplesEqual = (left, right) => {
30
30
  return left[0] === right[0] && left[1] === right[1];
31
31
  };
32
32
  const TimelineUvCoordinateField = ({ field, propStatus, effectiveValue, onSave, onDragValueChange, onDragEnd, }) => {
33
- var _a, _b, _c;
33
+ var _a, _b;
34
34
  const [dragX, setDragX] = (0, react_1.useState)(null);
35
35
  const [dragY, setDragY] = (0, react_1.useState)(null);
36
36
  const [codeX, codeY] = (0, react_1.useMemo)(() => parseUvCoordinate(effectiveValue), [effectiveValue]);
37
- const step = field.fieldSchema.type === 'uv-coordinate'
38
- ? ((_a = field.fieldSchema.step) !== null && _a !== void 0 ? _a : 0.01)
39
- : 0.01;
37
+ const configuredStep = field.fieldSchema.type === 'uv-coordinate'
38
+ ? field.fieldSchema.step
39
+ : undefined;
40
+ const step = configuredStep !== null && configuredStep !== void 0 ? configuredStep : 0.01;
40
41
  const min = field.fieldSchema.type === 'uv-coordinate'
41
- ? ((_b = field.fieldSchema.min) !== null && _b !== void 0 ? _b : -Infinity)
42
+ ? ((_a = field.fieldSchema.min) !== null && _a !== void 0 ? _a : -Infinity)
42
43
  : -Infinity;
43
44
  const max = field.fieldSchema.type === 'uv-coordinate'
44
- ? ((_c = field.fieldSchema.max) !== null && _c !== void 0 ? _c : Infinity)
45
+ ? ((_b = field.fieldSchema.max) !== null && _b !== void 0 ? _b : Infinity)
45
46
  : Infinity;
46
- const stepDecimals = (0, react_1.useMemo)(() => (0, timeline_field_utils_1.getDecimalPlaces)(step), [step]);
47
+ const decimalPlaces = (0, react_1.useMemo)(() => (0, timeline_field_utils_1.getTimelineDisplayDecimalPlaces)({
48
+ defaultDecimalPlaces: 2,
49
+ step: configuredStep,
50
+ }), [configuredStep]);
47
51
  const formatter = (0, react_1.useCallback)((v) => {
48
- const num = Number(v);
49
- const digits = Math.max(stepDecimals, (0, timeline_field_utils_1.getDecimalPlaces)(num));
50
- return digits === 0 ? String(num) : num.toFixed(digits);
51
- }, [stepDecimals]);
52
+ return (0, timeline_field_utils_1.formatTimelineNumber)({
53
+ decimalPlaces,
54
+ fixed: true,
55
+ value: v,
56
+ });
57
+ }, [decimalPlaces]);
52
58
  const onXChange = (0, react_1.useCallback)((newVal) => {
53
59
  setDragX(newVal);
54
60
  const currentY = dragY !== null && dragY !== void 0 ? dragY : codeY;
@@ -114,7 +120,7 @@ const TimelineUvCoordinateField = ({ field, propStatus, effectiveValue, onSave,
114
120
  }
115
121
  }, [propStatus, onSave, dragX, codeX]);
116
122
  return (jsx_runtime_1.jsxs("span", { style: containerStyle, children: [
117
- jsx_runtime_1.jsx(InputDragger_1.InputDragger, { type: "number", value: dragX !== null && dragX !== void 0 ? dragX : codeX, style: leftDraggerStyle, status: "ok", small: true, onValueChange: onXChange, onValueChangeEnd: onXChangeEnd, onTextChange: onXTextChange, min: min, max: max, step: step, formatter: formatter, rightAlign: false }), jsx_runtime_1.jsx("div", { style: { marginLeft: -6, marginRight: -6 } }), jsx_runtime_1.jsx(InputDragger_1.InputDragger, { type: "number", value: dragY !== null && dragY !== void 0 ? dragY : codeY, style: rightDraggerStyle, status: "ok", small: true, onValueChange: onYChange, onValueChangeEnd: onYChangeEnd, onTextChange: onYTextChange, min: min, max: max, step: step, formatter: formatter, rightAlign: false })
123
+ jsx_runtime_1.jsx(InputDragger_1.InputDragger, { type: "number", value: dragX !== null && dragX !== void 0 ? dragX : codeX, style: leftDraggerStyle, status: "ok", small: true, onValueChange: onXChange, onValueChangeEnd: onXChangeEnd, onTextChange: onXTextChange, min: min, max: max, step: step, formatter: formatter, rightAlign: false, snapToStep: false }), jsx_runtime_1.jsx("div", { style: { marginLeft: -6, marginRight: -6 } }), jsx_runtime_1.jsx(InputDragger_1.InputDragger, { type: "number", value: dragY !== null && dragY !== void 0 ? dragY : codeY, style: rightDraggerStyle, status: "ok", small: true, onValueChange: onYChange, onValueChangeEnd: onYChangeEnd, onTextChange: onYTextChange, min: min, max: max, step: step, formatter: formatter, rightAlign: false, snapToStep: false })
118
124
  ] }));
119
125
  };
120
126
  exports.TimelineUvCoordinateField = TimelineUvCoordinateField;
@@ -1,5 +1,5 @@
1
1
  import type { CanUpdateEffectPropsResponse, CanUpdateSequencePropsResponse } from 'remotion';
2
- export declare const applyEffectResponseToCodeValues: ({ previous, response, }: {
2
+ export declare const applyEffectResponseToPropStatuses: ({ previous, response, }: {
3
3
  previous: CanUpdateSequencePropsResponse;
4
4
  response: CanUpdateEffectPropsResponse;
5
5
  }) => CanUpdateSequencePropsResponse;
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.applyEffectResponseToCodeValues = void 0;
4
- const applyEffectResponseToCodeValues = ({ previous, response, }) => {
3
+ exports.applyEffectResponseToPropStatuses = void 0;
4
+ const applyEffectResponseToPropStatuses = ({ previous, response, }) => {
5
5
  if (!previous.canUpdate) {
6
6
  return previous;
7
7
  }
@@ -16,4 +16,4 @@ const applyEffectResponseToCodeValues = ({ previous, response, }) => {
16
16
  effects,
17
17
  };
18
18
  };
19
- exports.applyEffectResponseToCodeValues = applyEffectResponseToCodeValues;
19
+ exports.applyEffectResponseToPropStatuses = applyEffectResponseToPropStatuses;
@@ -1,16 +1,33 @@
1
1
  import type { SequencePropsSubscriptionKey, SequenceSchema } from 'remotion';
2
- import type { SetCodeValues } from './save-sequence-prop';
3
- export declare const callAddSequenceKeyframe: ({ fileName, nodePath, fieldKey, sourceFrame, value, schema, setCodeValues, clientId, }: {
2
+ import type { SetPropStatuses } from './save-sequence-prop';
3
+ export type AddSequenceKeyframeChange = {
4
4
  fileName: string;
5
5
  nodePath: SequencePropsSubscriptionKey;
6
6
  fieldKey: string;
7
7
  sourceFrame: number;
8
8
  value: unknown;
9
9
  schema: SequenceSchema;
10
- setCodeValues: SetCodeValues;
10
+ };
11
+ export type AddEffectKeyframeChange = AddSequenceKeyframeChange & {
12
+ effectIndex: number;
13
+ };
14
+ export declare const callAddSequenceKeyframe: ({ fileName, nodePath, fieldKey, sourceFrame, value, schema, setPropStatuses, clientId, }: {
15
+ fileName: string;
16
+ nodePath: SequencePropsSubscriptionKey;
17
+ fieldKey: string;
18
+ sourceFrame: number;
19
+ value: unknown;
20
+ schema: SequenceSchema;
21
+ setPropStatuses: SetPropStatuses;
22
+ clientId: string;
23
+ }) => Promise<void>;
24
+ export declare const callAddKeyframes: ({ sequenceKeyframes, effectKeyframes, setPropStatuses, clientId, }: {
25
+ sequenceKeyframes: AddSequenceKeyframeChange[];
26
+ effectKeyframes: AddEffectKeyframeChange[];
27
+ setPropStatuses: SetPropStatuses;
11
28
  clientId: string;
12
29
  }) => Promise<void>;
13
- export declare const callAddEffectKeyframe: ({ fileName, nodePath, effectIndex, fieldKey, sourceFrame, value, schema, setCodeValues, clientId, }: {
30
+ export declare const callAddEffectKeyframe: ({ fileName, nodePath, effectIndex, fieldKey, sourceFrame, value, schema, setPropStatuses, clientId, }: {
14
31
  fileName: string;
15
32
  nodePath: SequencePropsSubscriptionKey;
16
33
  effectIndex: number;
@@ -18,6 +35,6 @@ export declare const callAddEffectKeyframe: ({ fileName, nodePath, effectIndex,
18
35
  sourceFrame: number;
19
36
  value: unknown;
20
37
  schema: SequenceSchema;
21
- setCodeValues: SetCodeValues;
38
+ setPropStatuses: SetPropStatuses;
22
39
  clientId: string;
23
40
  }) => Promise<void>;