@remotion/studio 4.0.478 → 4.0.479

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 (171) hide show
  1. package/dist/components/AssetSelector.js +8 -14
  2. package/dist/components/Button.d.ts +1 -0
  3. package/dist/components/Button.js +8 -5
  4. package/dist/components/CompactExplanation.d.ts +12 -0
  5. package/dist/components/CompactExplanation.js +52 -0
  6. package/dist/components/CompositionSelector.js +2 -4
  7. package/dist/components/CurrentAsset.d.ts +3 -1
  8. package/dist/components/CurrentAsset.js +42 -34
  9. package/dist/components/CurrentComposition.d.ts +1 -1
  10. package/dist/components/CurrentComposition.js +38 -31
  11. package/dist/components/DefaultPropsEditor.d.ts +12 -2
  12. package/dist/components/DefaultPropsEditor.js +2 -2
  13. package/dist/components/EffectPickerModal.d.ts +5 -0
  14. package/dist/components/EffectPickerModal.js +179 -0
  15. package/dist/components/InspectorInfoHeader.d.ts +11 -0
  16. package/dist/components/InspectorInfoHeader.js +55 -0
  17. package/dist/components/InspectorPanel/DefaultInspector.d.ts +8 -0
  18. package/dist/components/InspectorPanel/DefaultInspector.js +93 -0
  19. package/dist/components/InspectorPanel/EasingInspector.d.ts +5 -0
  20. package/dist/components/InspectorPanel/EasingInspector.js +41 -0
  21. package/dist/components/InspectorPanel/GuideInspector.d.ts +7 -0
  22. package/dist/components/InspectorPanel/GuideInspector.js +55 -0
  23. package/dist/components/InspectorPanel/KeyframeInspector.d.ts +7 -0
  24. package/dist/components/InspectorPanel/KeyframeInspector.js +109 -0
  25. package/dist/components/InspectorPanel/SelectedInspector.d.ts +5 -0
  26. package/dist/components/InspectorPanel/SelectedInspector.js +26 -0
  27. package/dist/components/InspectorPanel/SequenceSelectionInspector.d.ts +5 -0
  28. package/dist/components/InspectorPanel/SequenceSelectionInspector.js +116 -0
  29. package/dist/components/InspectorPanel/common.d.ts +15 -0
  30. package/dist/components/InspectorPanel/common.js +18 -0
  31. package/dist/components/InspectorPanel/inspector-selection.d.ts +10 -0
  32. package/dist/components/InspectorPanel/inspector-selection.js +34 -0
  33. package/dist/components/InspectorPanel/styles.d.ts +27 -0
  34. package/dist/components/InspectorPanel/styles.js +178 -0
  35. package/dist/components/InspectorPanel/use-track-for-selection.d.ts +2 -0
  36. package/dist/components/InspectorPanel/use-track-for-selection.js +22 -0
  37. package/dist/components/InspectorPanel.d.ts +8 -0
  38. package/dist/components/InspectorPanel.js +26 -0
  39. package/dist/components/InspectorPanelLayout.d.ts +1 -0
  40. package/dist/components/InspectorPanelLayout.js +4 -0
  41. package/dist/components/InspectorSequenceSection.d.ts +16 -0
  42. package/dist/components/InspectorSequenceSection.js +147 -0
  43. package/dist/components/InspectorSourceLocation.d.ts +7 -0
  44. package/dist/components/InspectorSourceLocation.js +71 -0
  45. package/dist/components/Modals.js +3 -3
  46. package/dist/components/NewComposition/InputDragger.js +1 -1
  47. package/dist/components/NewComposition/RemInput.d.ts +1 -0
  48. package/dist/components/NewComposition/RemInput.js +8 -2
  49. package/dist/components/NewComposition/RemTextarea.d.ts +1 -0
  50. package/dist/components/NewComposition/RemTextarea.js +8 -2
  51. package/dist/components/NewComposition/ValidationMessage.d.ts +3 -0
  52. package/dist/components/NewComposition/ValidationMessage.js +16 -5
  53. package/dist/components/OptionsPanel.d.ts +1 -1
  54. package/dist/components/OptionsPanel.js +8 -17
  55. package/dist/components/QuickSwitcher/QuickSwitcherContent.js +2 -7
  56. package/dist/components/QuickSwitcher/QuickSwitcherResult.js +3 -10
  57. package/dist/components/QuickSwitcher/shared.d.ts +4 -0
  58. package/dist/components/QuickSwitcher/shared.js +24 -0
  59. package/dist/components/RenderModal/DataEditor.d.ts +29 -2
  60. package/dist/components/RenderModal/DataEditor.js +107 -56
  61. package/dist/components/RenderModal/RenderModalJSONPropsEditor.d.ts +1 -0
  62. package/dist/components/RenderModal/RenderModalJSONPropsEditor.js +25 -7
  63. package/dist/components/RenderModal/SchemaEditor/Fieldset.d.ts +2 -1
  64. package/dist/components/RenderModal/SchemaEditor/Fieldset.js +10 -5
  65. package/dist/components/RenderModal/SchemaEditor/SchemaEditor.d.ts +4 -0
  66. package/dist/components/RenderModal/SchemaEditor/SchemaEditor.js +27 -4
  67. package/dist/components/RenderModal/SchemaEditor/SchemaErrorMessages.d.ts +12 -4
  68. package/dist/components/RenderModal/SchemaEditor/SchemaErrorMessages.js +23 -9
  69. package/dist/components/RenderModal/SchemaEditor/SchemaLabel.js +3 -3
  70. package/dist/components/RenderModal/SchemaEditor/SchemaSeparationLine.js +8 -1
  71. package/dist/components/RenderModal/SchemaEditor/ZodColorEditor.js +1 -1
  72. package/dist/components/RenderModal/SchemaEditor/ZodDateEditor.js +1 -1
  73. package/dist/components/RenderModal/SchemaEditor/ZodDiscriminatedUnionEditor.js +1 -1
  74. package/dist/components/RenderModal/SchemaEditor/ZodEnumEditor.js +1 -1
  75. package/dist/components/RenderModal/SchemaEditor/ZodErrorMessages.d.ts +1 -0
  76. package/dist/components/RenderModal/SchemaEditor/ZodErrorMessages.js +23 -6
  77. package/dist/components/RenderModal/SchemaEditor/ZodFieldValidation.js +2 -2
  78. package/dist/components/RenderModal/SchemaEditor/ZodNonEditableValue.js +2 -1
  79. package/dist/components/RenderModal/SchemaEditor/ZodNumberEditor.js +1 -1
  80. package/dist/components/RenderModal/SchemaEditor/ZodObjectEditor.js +9 -11
  81. package/dist/components/RenderModal/SchemaEditor/ZodOrNullishEditor.js +1 -1
  82. package/dist/components/RenderModal/SchemaEditor/ZodStaticFileEditor.js +1 -1
  83. package/dist/components/RenderModal/SchemaEditor/ZodStringEditor.js +1 -1
  84. package/dist/components/RenderModal/SchemaEditor/ZodTextareaEditor.js +1 -1
  85. package/dist/components/RenderModal/WarningIndicatorButton.d.ts +1 -0
  86. package/dist/components/RenderModal/WarningIndicatorButton.js +17 -4
  87. package/dist/components/RenderModal/get-render-modal-warnings.d.ts +2 -1
  88. package/dist/components/RenderModal/get-render-modal-warnings.js +6 -3
  89. package/dist/components/RendersTab.js +1 -1
  90. package/dist/components/SegmentedControl.d.ts +3 -0
  91. package/dist/components/SegmentedControl.js +11 -5
  92. package/dist/components/SelectedOutlineElement.js +57 -24
  93. package/dist/components/SelectedOutlineOverlay.d.ts +1 -1
  94. package/dist/components/SelectedOutlineOverlay.js +41 -29
  95. package/dist/components/SelectedOutlineUvControls.d.ts +9 -0
  96. package/dist/components/SelectedOutlineUvControls.js +64 -10
  97. package/dist/components/Tabs/index.js +4 -4
  98. package/dist/components/Timeline/EasingEditorModal.d.ts +5 -4
  99. package/dist/components/Timeline/EasingEditorModal.js +597 -124
  100. package/dist/components/Timeline/KeyframeSettingsModal.d.ts +2 -2
  101. package/dist/components/Timeline/SubscribeToNodePaths.d.ts +2 -2
  102. package/dist/components/Timeline/TimelineClipboardKeybindings.d.ts +15 -3
  103. package/dist/components/Timeline/TimelineClipboardKeybindings.js +85 -1
  104. package/dist/components/Timeline/TimelineDeleteKeybindings.js +10 -3
  105. package/dist/components/Timeline/TimelineEffectItem.d.ts +2 -2
  106. package/dist/components/Timeline/TimelineEffectPropItem.d.ts +8 -0
  107. package/dist/components/Timeline/TimelineEffectPropItem.js +24 -20
  108. package/dist/components/Timeline/TimelineExpandedRow.d.ts +5 -2
  109. package/dist/components/Timeline/TimelineExpandedRow.js +4 -4
  110. package/dist/components/Timeline/TimelineExpandedSection.d.ts +1 -1
  111. package/dist/components/Timeline/TimelineExpandedSection.js +5 -19
  112. package/dist/components/Timeline/TimelineKeyframeControls.d.ts +8 -2
  113. package/dist/components/Timeline/TimelineKeyframeControls.js +24 -3
  114. package/dist/components/Timeline/TimelineKeyframeEasingLine.js +2 -47
  115. package/dist/components/Timeline/TimelineKeyframedValue.d.ts +1 -1
  116. package/dist/components/Timeline/TimelineKeyframedValue.js +8 -10
  117. package/dist/components/Timeline/TimelineNumberField.js +5 -11
  118. package/dist/components/Timeline/TimelineRotationField.js +5 -6
  119. package/dist/components/Timeline/TimelineScaleField.js +4 -8
  120. package/dist/components/Timeline/TimelineSelection.d.ts +6 -0
  121. package/dist/components/Timeline/TimelineSelection.js +109 -14
  122. package/dist/components/Timeline/TimelineSequence.js +19 -3
  123. package/dist/components/Timeline/TimelineSequenceItem.js +12 -67
  124. package/dist/components/Timeline/TimelineSequencePropItem.d.ts +12 -2
  125. package/dist/components/Timeline/TimelineSequencePropItem.js +56 -52
  126. package/dist/components/Timeline/TimelineTransformOriginField.js +4 -5
  127. package/dist/components/Timeline/TimelineTranslateField.js +4 -5
  128. package/dist/components/Timeline/TimelineUvCoordinateField.js +4 -4
  129. package/dist/components/Timeline/call-add-keyframe.d.ts +4 -4
  130. package/dist/components/Timeline/call-delete-keyframe.d.ts +4 -4
  131. package/dist/components/Timeline/call-move-keyframe.d.ts +2 -2
  132. package/dist/components/Timeline/call-update-keyframe-settings.d.ts +3 -3
  133. package/dist/components/Timeline/delete-selected-timeline-item.d.ts +2 -1
  134. package/dist/components/Timeline/delete-selected-timeline-item.js +27 -1
  135. package/dist/components/Timeline/parse-keyframe-field-from-node-path.js +2 -2
  136. package/dist/components/Timeline/reset-selected-timeline-props.d.ts +3 -3
  137. package/dist/components/Timeline/reset-selected-timeline-props.js +19 -5
  138. package/dist/components/Timeline/save-effect-prop.d.ts +2 -2
  139. package/dist/components/Timeline/save-sequence-prop.d.ts +2 -2
  140. package/dist/components/Timeline/sequence-props-subscription-store.d.ts +3 -3
  141. package/dist/components/Timeline/timeline-field-display-utils.d.ts +5 -0
  142. package/dist/components/Timeline/timeline-field-display-utils.js +244 -0
  143. package/dist/components/Timeline/update-selected-easing.d.ts +47 -4
  144. package/dist/components/Timeline/update-selected-easing.js +40 -9
  145. package/dist/components/Timeline/use-sequence-freeze-frame-menu-item.d.ts +13 -0
  146. package/dist/components/Timeline/use-sequence-freeze-frame-menu-item.js +73 -0
  147. package/dist/components/Timeline/use-sequence-props-subscription.d.ts +3 -3
  148. package/dist/components/Timeline/use-timeline-expanded-tree.d.ts +11 -0
  149. package/dist/components/Timeline/use-timeline-expanded-tree.js +33 -0
  150. package/dist/components/VisualControls/VisualControlsContent.d.ts +1 -1
  151. package/dist/components/VisualControls/VisualControlsContent.js +4 -5
  152. package/dist/components/effect-drag-and-drop.d.ts +10 -0
  153. package/dist/components/effect-drag-and-drop.js +17 -8
  154. package/dist/components/effect-picker-search.d.ts +5 -0
  155. package/dist/components/effect-picker-search.js +77 -0
  156. package/dist/components/selected-outline-drag.d.ts +21 -2
  157. package/dist/components/selected-outline-drag.js +31 -6
  158. package/dist/components/selected-outline-types.d.ts +7 -7
  159. package/dist/components/selected-outline-uv.d.ts +4 -3
  160. package/dist/components/selected-outline-uv.js +6 -2
  161. package/dist/esm/{chunk-hrw9799x.js → chunk-fge2mq5p.js} +16535 -13311
  162. package/dist/esm/internals.mjs +16535 -13311
  163. package/dist/esm/previewEntry.mjs +17141 -13917
  164. package/dist/esm/renderEntry.mjs +1 -1
  165. package/dist/helpers/render-codec-label.d.ts +2 -0
  166. package/dist/helpers/render-codec-label.js +49 -0
  167. package/dist/helpers/timeline-layout.d.ts +4 -4
  168. package/dist/helpers/use-media-metadata.d.ts +8 -2
  169. package/dist/helpers/use-media-metadata.js +17 -4
  170. package/dist/state/modals.d.ts +9 -4
  171. package/package.json +12 -12
@@ -63,6 +63,7 @@ const TimelineRowChrome_1 = require("./TimelineRowChrome");
63
63
  const TimelineSelection_1 = require("./TimelineSelection");
64
64
  const TimelineSequenceName_1 = require("./TimelineSequenceName");
65
65
  const use_open_sequence_in_editor_1 = require("./use-open-sequence-in-editor");
66
+ const use_sequence_freeze_frame_menu_item_1 = require("./use-sequence-freeze-frame-menu-item");
66
67
  const labelContainerStyle = {
67
68
  alignItems: 'center',
68
69
  alignSelf: 'stretch',
@@ -139,7 +140,7 @@ const getDestinationIndex = ({ fromIndex, insertionIndex, }) => {
139
140
  };
140
141
  const TimelineSequenceItem = ({ nestedDepth, sequence, nodePathInfo, keyframeDisplayOffset, sequenceFrameOffset, trackIndex, }) => {
141
142
  var _a, _b, _c;
142
- var _d, _e;
143
+ var _d, _e, _f;
143
144
  const nodePath = (_d = nodePathInfo === null || nodePathInfo === void 0 ? void 0 : nodePathInfo.sequenceSubscriptionKey) !== null && _d !== void 0 ? _d : null;
144
145
  const { previewServerState } = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx);
145
146
  const previewConnected = previewServerState.type === 'connected';
@@ -616,59 +617,18 @@ const TimelineSequenceItem = ({ nestedDepth, sequence, nodePathInfo, keyframeDis
616
617
  }
617
618
  setIsRenaming(true);
618
619
  }, [canRenameThisSequence]);
619
- const freezeStatus = propStatusesForOverride === null || propStatusesForOverride === void 0 ? void 0 : propStatusesForOverride.freeze;
620
- const isFrozen = (freezeStatus === null || freezeStatus === void 0 ? void 0 : freezeStatus.status) === 'static' &&
621
- typeof freezeStatus.codeValue === 'number';
622
- const canToggleFreeze = previewConnected &&
623
- Boolean(sequence.controls) &&
624
- nodePath !== null &&
625
- validatedLocation !== null &&
626
- freezeStatus !== undefined &&
627
- freezeStatus !== null &&
628
- freezeStatus.status === 'static';
629
- const onToggleFreezeFrame = (0, react_1.useCallback)(() => {
630
- if (!canToggleFreeze ||
631
- !sequence.controls ||
632
- !nodePath ||
633
- !validatedLocation ||
634
- previewServerState.type !== 'connected') {
635
- return;
636
- }
637
- const rawFreezeFrame = Math.round(timelinePosition - sequence.from + sequenceFrameOffset);
638
- const maxFrame = Number.isFinite(sequence.duration)
639
- ? Math.max(0, sequence.duration - 1)
640
- : rawFreezeFrame;
641
- const freezeFrame = Math.min(Math.max(0, rawFreezeFrame), maxFrame);
642
- const remove = isFrozen;
643
- (0, save_sequence_prop_1.saveSequenceProps)({
644
- changes: [
645
- {
646
- fileName: validatedLocation.source,
647
- nodePath,
648
- fieldKey: 'freeze',
649
- value: remove ? null : freezeFrame,
650
- defaultValue: null,
651
- schema: sequence.controls.schema,
652
- },
653
- ],
654
- setPropStatuses,
655
- clientId: previewServerState.clientId,
656
- undoLabel: remove ? 'Unfreeze sequence' : 'Freeze sequence',
657
- redoLabel: remove ? 'Freeze sequence again' : 'Unfreeze sequence again',
658
- });
659
- }, [
660
- canToggleFreeze,
661
- isFrozen,
620
+ const freezeFrameMenuItem = (0, use_sequence_freeze_frame_menu_item_1.useSequenceFreezeFrameMenuItem)({
621
+ clientId: previewServerState.type === 'connected'
622
+ ? previewServerState.clientId
623
+ : null,
662
624
  nodePath,
663
- previewServerState,
664
- sequence.controls,
665
- sequence.duration,
666
- sequence.from,
625
+ propStatusesForOverride,
626
+ sequence,
667
627
  sequenceFrameOffset,
668
628
  setPropStatuses,
669
629
  timelinePosition,
670
- validatedLocation,
671
- ]);
630
+ validatedSource: (_f = validatedLocation === null || validatedLocation === void 0 ? void 0 : validatedLocation.source) !== null && _f !== void 0 ? _f : null,
631
+ });
672
632
  const contextMenuValues = (0, react_1.useMemo)(() => {
673
633
  if (!previewConnected) {
674
634
  return [];
@@ -703,37 +663,22 @@ const TimelineSequenceItem = ({ nestedDepth, sequence, nodePathInfo, keyframeDis
703
663
  subMenu: null,
704
664
  value: 'rename-sequence',
705
665
  },
706
- {
707
- type: 'item',
708
- id: 'toggle-freeze-frame',
709
- keyHint: null,
710
- label: isFrozen ? 'Unfreeze frame' : 'Freeze frame',
711
- leftItem: null,
712
- disabled: !canToggleFreeze,
713
- onClick: () => {
714
- onToggleFreezeFrame();
715
- },
716
- quickSwitcherLabel: null,
717
- subMenu: null,
718
- value: 'toggle-freeze-frame',
719
- },
666
+ freezeFrameMenuItem,
720
667
  ],
721
668
  });
722
669
  }, [
723
670
  assetLinkInfo,
724
671
  canOpenInEditor,
725
672
  canRenameThisSequence,
726
- canToggleFreeze,
727
673
  deleteDisabled,
728
674
  disableInteractivityDisabled,
729
675
  duplicateDisabled,
730
676
  fileLocation,
731
- isFrozen,
677
+ freezeFrameMenuItem,
732
678
  onDeleteSequenceFromSource,
733
679
  onDisableSequenceInteractivity,
734
680
  onDuplicateSequenceFromSource,
735
681
  onRenameSequence,
736
- onToggleFreezeFrame,
737
682
  openInEditor,
738
683
  originalLocation,
739
684
  previewConnected,
@@ -1,14 +1,24 @@
1
1
  import React from 'react';
2
- import type { SequencePropsSubscriptionKey, SequenceSchema } from 'remotion';
2
+ import type { CanUpdateSequencePropStatusKeyframed, SequencePropsSubscriptionKey, InteractivitySchema } from 'remotion';
3
3
  import type { CodePosition } from '../../error-overlay/react-overlay/utils/get-source-map';
4
4
  import type { SequenceNodePathInfo } from '../../helpers/get-timeline-sequence-sort-key';
5
5
  import type { SchemaFieldInfo } from '../../helpers/timeline-layout';
6
+ import { type TimelineKeyframeControlsMode } from './TimelineKeyframeControls';
7
+ export declare const TimelineSequenceKeyframedValue: React.FC<{
8
+ readonly field: SchemaFieldInfo;
9
+ readonly fileName: string;
10
+ readonly nodePath: SequencePropsSubscriptionKey;
11
+ readonly schema: InteractivitySchema;
12
+ readonly propStatus: CanUpdateSequencePropStatusKeyframed;
13
+ readonly sourceFrame: number;
14
+ }>;
6
15
  export declare const TimelineSequencePropItem: React.FC<{
7
16
  readonly field: SchemaFieldInfo;
8
17
  readonly validatedLocation: CodePosition;
9
18
  readonly rowDepth: number;
10
19
  readonly nodePath: SequencePropsSubscriptionKey;
11
20
  readonly nodePathInfo: SequenceNodePathInfo;
12
- readonly schema: SequenceSchema;
21
+ readonly schema: InteractivitySchema;
13
22
  readonly keyframeDisplayOffset: number;
23
+ readonly keyframeControlsMode?: TimelineKeyframeControlsMode;
14
24
  }>;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TimelineSequencePropItem = void 0;
3
+ exports.TimelineSequencePropItem = exports.TimelineSequenceKeyframedValue = 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");
@@ -115,34 +115,73 @@ const Value = ({ field, nodePath, validatedLocation, schema, propStatus }) => {
115
115
  }, [clearDragOverrides, nodePath]);
116
116
  return (jsx_runtime_1.jsx(TimelineSchemaField_1.TimelineFieldValue, { field: field, propStatus: propStatus, onSave: onSave, onDragValueChange: onDragValueChange, onDragEnd: onDragEnd, effectiveValue: effectiveValue, scaleLockNodePath: nodePath }));
117
117
  };
118
- const TimelineSequencePropItem = ({ field, validatedLocation, rowDepth, nodePath, nodePathInfo, schema, keyframeDisplayOffset, }) => {
119
- var _a, _b;
120
- const { propStatuses: visualModePropStatuses } = (0, react_1.useContext)(remotion_1.Internals.VisualModePropStatusesContext);
118
+ const TimelineSequenceKeyframedValue = ({ field, fileName, nodePath, schema, propStatus, sourceFrame }) => {
121
119
  const { getDragOverrides } = (0, react_1.useContext)(remotion_1.Internals.VisualModeDragOverridesContext);
122
120
  const { setPropStatuses, setDragOverrides, clearDragOverrides } = (0, react_1.useContext)(remotion_1.Internals.VisualModeSettersContext);
123
121
  const { previewServerState } = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx);
124
- const { setSelectedModal } = (0, react_1.useContext)(modals_1.ModalsContext);
125
- const selection = (0, TimelineSelection_1.useTimelineRowSelection)(nodePathInfo);
126
122
  const clientId = previewServerState.type === 'connected'
127
123
  ? previewServerState.clientId
128
124
  : null;
125
+ const dragOverrideValue = (0, react_1.useMemo)(() => {
126
+ var _a;
127
+ return ((_a = getDragOverrides(nodePath)) !== null && _a !== void 0 ? _a : {})[field.key];
128
+ }, [getDragOverrides, nodePath, field.key]);
129
+ const onSaveKeyframed = (0, react_1.useCallback)((value, frame) => {
130
+ if (!clientId) {
131
+ return Promise.reject(new Error('Not connected to studio server'));
132
+ }
133
+ return (0, call_add_keyframe_1.callAddSequenceKeyframe)({
134
+ fileName,
135
+ nodePath,
136
+ fieldKey: field.key,
137
+ sourceFrame: frame,
138
+ value,
139
+ schema,
140
+ setPropStatuses,
141
+ clientId,
142
+ });
143
+ }, [clientId, field.key, fileName, nodePath, schema, setPropStatuses]);
144
+ const onKeyframedDragValueChange = (0, react_1.useCallback)((value) => {
145
+ setDragOverrides(nodePath, field.key, remotion_1.Internals.makeKeyframedDragOverride({
146
+ status: propStatus,
147
+ frame: sourceFrame,
148
+ value,
149
+ }));
150
+ }, [propStatus, field.key, nodePath, setDragOverrides, sourceFrame]);
151
+ const onKeyframedDragEnd = (0, react_1.useCallback)(() => {
152
+ clearDragOverrides(nodePath);
153
+ }, [clearDragOverrides, nodePath]);
154
+ return (jsx_runtime_1.jsx(TimelineKeyframedValue_1.TimelineKeyframedValue, { field: field, propStatus: propStatus, sourceFrame: sourceFrame, dragOverrideValue: dragOverrideValue, onSave: onSaveKeyframed, onDragValueChange: onKeyframedDragValueChange, onDragEnd: onKeyframedDragEnd, scaleLockNodePath: nodePath }));
155
+ };
156
+ exports.TimelineSequenceKeyframedValue = TimelineSequenceKeyframedValue;
157
+ const TimelineSequencePropItem = ({ field, validatedLocation, rowDepth, nodePath, nodePathInfo, schema, keyframeDisplayOffset, keyframeControlsMode = 'timeline', }) => {
158
+ var _a, _b;
159
+ const { propStatuses: visualModePropStatuses } = (0, react_1.useContext)(remotion_1.Internals.VisualModePropStatusesContext);
160
+ const { getDragOverrides } = (0, react_1.useContext)(remotion_1.Internals.VisualModeDragOverridesContext);
161
+ const { setPropStatuses } = (0, react_1.useContext)(remotion_1.Internals.VisualModeSettersContext);
162
+ const { previewServerState } = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx);
163
+ const { setSelectedModal } = (0, react_1.useContext)(modals_1.ModalsContext);
164
+ const selection = (0, TimelineSelection_1.useTimelineRowSelection)(nodePathInfo);
165
+ const timelinePosition = remotion_1.Internals.Timeline.useTimelinePosition();
166
+ const sourceFrame = timelinePosition - keyframeDisplayOffset;
129
167
  const propStatusesForOverride = remotion_1.Internals.getPropStatusesCtx(visualModePropStatuses, nodePath);
130
168
  const propStatus = (_a = propStatusesForOverride === null || propStatusesForOverride === void 0 ? void 0 : propStatusesForOverride[field.key]) !== null && _a !== void 0 ? _a : null;
131
- const timelinePosition = remotion_1.Internals.Timeline.useTimelinePosition();
132
- const jsxFrame = timelinePosition - keyframeDisplayOffset;
133
169
  const dragOverrideValue = (0, react_1.useMemo)(() => {
134
170
  var _a;
135
171
  return ((_a = getDragOverrides(nodePath)) !== null && _a !== void 0 ? _a : {})[field.key];
136
172
  }, [getDragOverrides, nodePath, field.key]);
173
+ const keyframable = (0, studio_shared_1.isSchemaFieldKeyframable)({
174
+ schema,
175
+ key: field.key,
176
+ });
137
177
  const keyframeControls = propStatus !== null &&
138
- (0, TimelineKeyframeControls_1.shouldShowTimelineKeyframeControls)({
139
- propStatus,
140
- selected: selection.selected,
141
- keyframable: (0, studio_shared_1.isSchemaFieldKeyframable)({
142
- schema,
143
- key: field.key,
144
- }),
145
- }) ? (jsx_runtime_1.jsx(TimelineKeyframeControls_1.TimelineKeyframeControls, { fieldKey: field.key, propStatus: propStatus, nodePath: nodePath, fileName: validatedLocation.source, keyframeDisplayOffset: keyframeDisplayOffset, defaultValue: field.fieldSchema.default, dragOverrideValue: dragOverrideValue, schema: schema, effectIndex: null, nodePathInfo: nodePathInfo })) : null;
178
+ (keyframeControlsMode === 'inspector'
179
+ ? keyframable
180
+ : (0, TimelineKeyframeControls_1.shouldShowTimelineKeyframeControls)({
181
+ propStatus,
182
+ selected: selection.selected,
183
+ keyframable,
184
+ })) ? (jsx_runtime_1.jsx(TimelineKeyframeControls_1.TimelineKeyframeControls, { fieldKey: field.key, propStatus: propStatus, nodePath: nodePath, fileName: validatedLocation.source, keyframeDisplayOffset: keyframeDisplayOffset, defaultValue: field.fieldSchema.default, dragOverrideValue: dragOverrideValue, schema: schema, effectIndex: null, nodePathInfo: nodePathInfo, mode: keyframeControlsMode })) : null;
146
185
  const style = (0, react_1.useMemo)(() => {
147
186
  return {
148
187
  ...fieldRowBase,
@@ -203,41 +242,6 @@ const TimelineSequencePropItem = ({ field, validatedLocation, rowDepth, nodePath
203
242
  validatedLocation.source,
204
243
  propStatus,
205
244
  ]);
206
- const onSaveKeyframed = (0, react_1.useCallback)((value, sourceFrame) => {
207
- if (!clientId) {
208
- return Promise.reject(new Error('Not connected to studio server'));
209
- }
210
- return (0, call_add_keyframe_1.callAddSequenceKeyframe)({
211
- fileName: validatedLocation.source,
212
- nodePath,
213
- fieldKey: field.key,
214
- sourceFrame,
215
- value,
216
- schema,
217
- setPropStatuses,
218
- clientId,
219
- });
220
- }, [
221
- clientId,
222
- field.key,
223
- nodePath,
224
- schema,
225
- setPropStatuses,
226
- validatedLocation.source,
227
- ]);
228
- const onKeyframedDragValueChange = (0, react_1.useCallback)((value) => {
229
- if (propStatus === null || !isKeyframedStatus(propStatus)) {
230
- throw new Error('Expected keyframed status');
231
- }
232
- setDragOverrides(nodePath, field.key, remotion_1.Internals.makeKeyframedDragOverride({
233
- status: propStatus,
234
- frame: jsxFrame,
235
- value,
236
- }));
237
- }, [propStatus, field.key, jsxFrame, nodePath, setDragOverrides]);
238
- const onKeyframedDragEnd = (0, react_1.useCallback)(() => {
239
- clearDragOverrides(nodePath);
240
- }, [clearDragOverrides, nodePath]);
241
245
  const onOpenKeyframeSettings = (0, react_1.useCallback)(() => {
242
246
  var _a;
243
247
  if (propStatus === null || !isKeyframedStatus(propStatus)) {
@@ -303,7 +307,7 @@ const TimelineSequencePropItem = ({ field, validatedLocation, rowDepth, nodePath
303
307
  return null;
304
308
  }
305
309
  const row = (jsx_runtime_1.jsxs(TimelineRowChrome_1.TimelineRowChrome, { depth: rowDepth, eye: jsx_runtime_1.jsx(TimelineLayerEye_1.TimelineLayerEyeSpacer, {}), keyframeControls: keyframeControls, arrow: jsx_runtime_1.jsx(TimelineExpandArrowButton_1.TimelineExpandArrowSpacer, {}), style: style, selected: selection.selected, selectable: selection.selectable, onSelect: selection.onSelect, showSelectedBackground: true, containsSelection: false, outerHeight: null, children: [
306
- jsx_runtime_1.jsx(TimelineFieldLabel_1.TimelineFieldLabel, { rowDepth: rowDepth, selected: selection.selected, label: (_b = field.description) !== null && _b !== void 0 ? _b : field.key }), isKeyframedStatus(propStatus) ? (jsx_runtime_1.jsx("div", { style: timeline_field_row_layout_1.timelineFieldValueColumnStyle, children: jsx_runtime_1.jsx(TimelineKeyframedValue_1.TimelineKeyframedValue, { field: field, propStatus: propStatus, keyframeDisplayOffset: keyframeDisplayOffset, dragOverrideValue: dragOverrideValue, onSave: onSaveKeyframed, onDragValueChange: onKeyframedDragValueChange, onDragEnd: onKeyframedDragEnd, scaleLockNodePath: nodePath }) })) : propStatus.status === 'static' ? (jsx_runtime_1.jsx("div", { style: timeline_field_row_layout_1.timelineFieldValueColumnStyle, children: jsx_runtime_1.jsx(Value, { field: field, nodePath: nodePath, validatedLocation: validatedLocation, schema: schema, propStatus: propStatus }) })) : (jsx_runtime_1.jsx("div", { style: timeline_field_row_layout_1.timelineFieldValueColumnStyle, children: jsx_runtime_1.jsx(TimelineSchemaField_1.TimelineNonEditableStatus, { propStatus: propStatus }) }))] }));
310
+ jsx_runtime_1.jsx(TimelineFieldLabel_1.TimelineFieldLabel, { rowDepth: rowDepth, selected: selection.selected, label: (_b = field.description) !== null && _b !== void 0 ? _b : field.key }), isKeyframedStatus(propStatus) ? (jsx_runtime_1.jsx("div", { style: timeline_field_row_layout_1.timelineFieldValueColumnStyle, children: jsx_runtime_1.jsx(exports.TimelineSequenceKeyframedValue, { field: field, fileName: validatedLocation.source, nodePath: nodePath, schema: schema, propStatus: propStatus, sourceFrame: sourceFrame }) })) : propStatus.status === 'static' ? (jsx_runtime_1.jsx("div", { style: timeline_field_row_layout_1.timelineFieldValueColumnStyle, children: jsx_runtime_1.jsx(Value, { field: field, nodePath: nodePath, validatedLocation: validatedLocation, schema: schema, propStatus: propStatus }) })) : (jsx_runtime_1.jsx("div", { style: timeline_field_row_layout_1.timelineFieldValueColumnStyle, children: jsx_runtime_1.jsx(TimelineSchemaField_1.TimelineNonEditableStatus, { propStatus: propStatus }) }))] }));
307
311
  return (jsx_runtime_1.jsx(ContextMenu_1.ContextMenu, { values: contextMenuValues, onOpen: selection.selectable ? selection.onSelect : null, children: row }));
308
312
  };
309
313
  exports.TimelineSequencePropItem = TimelineSequencePropItem;
@@ -4,6 +4,7 @@ exports.TimelineTransformOriginField = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const react_1 = require("react");
6
6
  const InputDragger_1 = require("../NewComposition/InputDragger");
7
+ const timeline_field_display_utils_1 = require("./timeline-field-display-utils");
7
8
  const timeline_field_utils_1 = require("./timeline-field-utils");
8
9
  const TimelineSchemaField_1 = require("./TimelineSchemaField");
9
10
  const transform_origin_utils_1 = require("./transform-origin-utils");
@@ -31,13 +32,11 @@ const TimelineTransformOriginField = ({ field, propStatus, effectiveValue, onSav
31
32
  step: configuredStep,
32
33
  }), [configuredStep]);
33
34
  const formatter = (0, react_1.useCallback)((v) => {
34
- const formatted = (0, timeline_field_utils_1.formatTimelineNumber)({
35
- decimalPlaces,
36
- fixed: false,
35
+ return (0, timeline_field_display_utils_1.formatTimelineFieldValueForDisplay)({
36
+ fieldSchema: field.fieldSchema,
37
37
  value: v,
38
38
  });
39
- return `${formatted}%`;
40
- }, [decimalPlaces]);
39
+ }, [field.fieldSchema]);
41
40
  const serialize = (0, react_1.useCallback)((x, y) => {
42
41
  var _a;
43
42
  return (0, transform_origin_utils_1.serializeTransformOrigin)({
@@ -4,6 +4,7 @@ exports.TimelineTranslateField = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const react_1 = require("react");
6
6
  const InputDragger_1 = require("../NewComposition/InputDragger");
7
+ const timeline_field_display_utils_1 = require("./timeline-field-display-utils");
7
8
  const timeline_field_utils_1 = require("./timeline-field-utils");
8
9
  const timeline_translate_utils_1 = require("./timeline-translate-utils");
9
10
  const leftDraggerStyle = {
@@ -27,13 +28,11 @@ const TimelineTranslateField = ({ field, propStatus, effectiveValue, onSave, onD
27
28
  step: configuredStep,
28
29
  }), [configuredStep]);
29
30
  const formatter = (0, react_1.useCallback)((v) => {
30
- const formatted = (0, timeline_field_utils_1.formatTimelineNumber)({
31
- decimalPlaces,
32
- fixed: false,
31
+ return (0, timeline_field_display_utils_1.formatTimelineFieldValueForDisplay)({
32
+ fieldSchema: field.fieldSchema,
33
33
  value: v,
34
34
  });
35
- return `${formatted}px`;
36
- }, [decimalPlaces]);
35
+ }, [field.fieldSchema]);
37
36
  // --- X callbacks ---
38
37
  const onXChange = (0, react_1.useCallback)((newVal) => {
39
38
  setDragX(newVal);
@@ -4,6 +4,7 @@ exports.TimelineUvCoordinateField = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const react_1 = require("react");
6
6
  const InputDragger_1 = require("../NewComposition/InputDragger");
7
+ const timeline_field_display_utils_1 = require("./timeline-field-display-utils");
7
8
  const timeline_field_utils_1 = require("./timeline-field-utils");
8
9
  const leftDraggerStyle = {
9
10
  paddingLeft: 0,
@@ -49,12 +50,11 @@ const TimelineUvCoordinateField = ({ field, propStatus, effectiveValue, onSave,
49
50
  step: configuredStep,
50
51
  }), [configuredStep]);
51
52
  const formatter = (0, react_1.useCallback)((v) => {
52
- return (0, timeline_field_utils_1.formatTimelineNumber)({
53
- decimalPlaces,
54
- fixed: true,
53
+ return (0, timeline_field_display_utils_1.formatTimelineFieldValueForDisplay)({
54
+ fieldSchema: field.fieldSchema,
55
55
  value: v,
56
56
  });
57
- }, [decimalPlaces]);
57
+ }, [field.fieldSchema]);
58
58
  const onXChange = (0, react_1.useCallback)((newVal) => {
59
59
  setDragX(newVal);
60
60
  const currentY = dragY !== null && dragY !== void 0 ? dragY : codeY;
@@ -1,4 +1,4 @@
1
- import type { SequencePropsSubscriptionKey, SequenceSchema } from 'remotion';
1
+ import type { SequencePropsSubscriptionKey, InteractivitySchema } from 'remotion';
2
2
  import type { SetPropStatuses } from './save-sequence-prop';
3
3
  export type AddSequenceKeyframeChange = {
4
4
  fileName: string;
@@ -6,7 +6,7 @@ export type AddSequenceKeyframeChange = {
6
6
  fieldKey: string;
7
7
  sourceFrame: number;
8
8
  value: unknown;
9
- schema: SequenceSchema;
9
+ schema: InteractivitySchema;
10
10
  };
11
11
  export type AddEffectKeyframeChange = AddSequenceKeyframeChange & {
12
12
  effectIndex: number;
@@ -17,7 +17,7 @@ export declare const callAddSequenceKeyframe: ({ fileName, nodePath, fieldKey, s
17
17
  fieldKey: string;
18
18
  sourceFrame: number;
19
19
  value: unknown;
20
- schema: SequenceSchema;
20
+ schema: InteractivitySchema;
21
21
  setPropStatuses: SetPropStatuses;
22
22
  clientId: string;
23
23
  }) => Promise<void>;
@@ -34,7 +34,7 @@ export declare const callAddEffectKeyframe: ({ fileName, nodePath, effectIndex,
34
34
  fieldKey: string;
35
35
  sourceFrame: number;
36
36
  value: unknown;
37
- schema: SequenceSchema;
37
+ schema: InteractivitySchema;
38
38
  setPropStatuses: SetPropStatuses;
39
39
  clientId: string;
40
40
  }) => Promise<void>;
@@ -1,11 +1,11 @@
1
- import type { SequencePropsSubscriptionKey, SequenceSchema } from 'remotion';
1
+ import type { SequencePropsSubscriptionKey, InteractivitySchema } from 'remotion';
2
2
  import type { SetPropStatuses } from './save-sequence-prop';
3
3
  export type DeleteSequenceKeyframeChange = {
4
4
  fileName: string;
5
5
  nodePath: SequencePropsSubscriptionKey;
6
6
  fieldKey: string;
7
7
  sourceFrame: number;
8
- schema: SequenceSchema;
8
+ schema: InteractivitySchema;
9
9
  };
10
10
  export type DeleteEffectKeyframeChange = DeleteSequenceKeyframeChange & {
11
11
  effectIndex: number;
@@ -15,7 +15,7 @@ export declare const callDeleteSequenceKeyframe: ({ fileName, nodePath, fieldKey
15
15
  nodePath: SequencePropsSubscriptionKey;
16
16
  fieldKey: string;
17
17
  sourceFrame: number;
18
- schema: SequenceSchema;
18
+ schema: InteractivitySchema;
19
19
  setPropStatuses: SetPropStatuses;
20
20
  clientId: string;
21
21
  }) => Promise<void>;
@@ -25,7 +25,7 @@ export declare const callDeleteEffectKeyframe: ({ fileName, nodePath, effectInde
25
25
  effectIndex: number;
26
26
  fieldKey: string;
27
27
  sourceFrame: number;
28
- schema: SequenceSchema;
28
+ schema: InteractivitySchema;
29
29
  setPropStatuses: SetPropStatuses;
30
30
  clientId: string;
31
31
  }) => Promise<void>;
@@ -1,4 +1,4 @@
1
- import type { SequencePropsSubscriptionKey, SequenceSchema } from 'remotion';
1
+ import type { SequencePropsSubscriptionKey, InteractivitySchema } from 'remotion';
2
2
  import type { SetPropStatuses } from './save-sequence-prop';
3
3
  export type MoveSequenceKeyframeChange = {
4
4
  fileName: string;
@@ -6,7 +6,7 @@ export type MoveSequenceKeyframeChange = {
6
6
  fieldKey: string;
7
7
  fromFrame: number;
8
8
  toFrame: number;
9
- schema: SequenceSchema;
9
+ schema: InteractivitySchema;
10
10
  };
11
11
  export type MoveEffectKeyframeChange = MoveSequenceKeyframeChange & {
12
12
  effectIndex: number;
@@ -1,12 +1,12 @@
1
1
  import { type KeyframeSettings } from '@remotion/studio-shared';
2
- import type { SequencePropsSubscriptionKey, SequenceSchema } from 'remotion';
2
+ import type { SequencePropsSubscriptionKey, InteractivitySchema } from 'remotion';
3
3
  import type { SetPropStatuses } from './save-sequence-prop';
4
4
  export declare const callUpdateSequenceKeyframeSettings: ({ fileName, nodePath, fieldKey, settings, schema, setPropStatuses, clientId, }: {
5
5
  fileName: string;
6
6
  nodePath: SequencePropsSubscriptionKey;
7
7
  fieldKey: string;
8
8
  settings: KeyframeSettings;
9
- schema: SequenceSchema;
9
+ schema: InteractivitySchema;
10
10
  setPropStatuses: SetPropStatuses;
11
11
  clientId: string;
12
12
  }) => Promise<void>;
@@ -16,7 +16,7 @@ export declare const callUpdateEffectKeyframeSettings: ({ fileName, nodePath, ef
16
16
  effectIndex: number;
17
17
  fieldKey: string;
18
18
  settings: KeyframeSettings;
19
- schema: SequenceSchema;
19
+ schema: InteractivitySchema;
20
20
  setPropStatuses: SetPropStatuses;
21
21
  clientId: string;
22
22
  }) => Promise<void>;
@@ -1,7 +1,7 @@
1
1
  import type { OverrideIdToNodePaths, TSequence } from 'remotion';
2
2
  import type { ConfirmationDialogFunction } from '../ConfirmationDialog-types';
3
3
  import type { SetPropStatuses } from './save-sequence-prop';
4
- import type { TimelineSelection } from './TimelineSelection';
4
+ import { type TimelineSelection } from './TimelineSelection';
5
5
  export declare const deleteSelectedTimelineItem: ({ selection, sequences, overrideIdsToNodePaths, setPropStatuses, clientId, confirm, }: {
6
6
  selection: TimelineSelection;
7
7
  sequences: TSequence[];
@@ -10,6 +10,7 @@ export declare const deleteSelectedTimelineItem: ({ selection, sequences, overri
10
10
  clientId: string;
11
11
  confirm: ConfirmationDialogFunction;
12
12
  }) => Promise<boolean> | null;
13
+ export declare const getTimelineSelectionAfterDeletingItems: (selections: readonly TimelineSelection[]) => readonly TimelineSelection[];
13
14
  export declare const deleteSelectedTimelineItems: ({ selections, sequences, overrideIdsToNodePaths, setPropStatuses, clientId, confirm, }: {
14
15
  selections: readonly TimelineSelection[];
15
16
  sequences: TSequence[];
@@ -1,9 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.deleteSelectedTimelineItems = exports.deleteSelectedTimelineItem = void 0;
3
+ exports.deleteSelectedTimelineItems = exports.getTimelineSelectionAfterDeletingItems = exports.deleteSelectedTimelineItem = void 0;
4
4
  const call_api_1 = require("../call-api");
5
5
  const NotificationCenter_1 = require("../Notifications/NotificationCenter");
6
6
  const delete_selected_keyframe_1 = require("./delete-selected-keyframe");
7
+ const TimelineSelection_1 = require("./TimelineSelection");
7
8
  const confirmDeletingDuplicatedSequences = (nodePathInfos, confirm) => {
8
9
  const duplicatedNodePathInfos = nodePathInfos.filter((nodePathInfo) => nodePathInfo.numberOfSequencesWithThisNodePath > 1);
9
10
  if (duplicatedNodePathInfos.length === 0) {
@@ -136,6 +137,31 @@ const isSequenceRowSelection = (selection) => selection.type === 'sequence';
136
137
  const isSequenceEffectSelection = (selection) => selection.type === 'sequence-effect';
137
138
  const isSequenceAllEffectsSelection = (selection) => selection.type === 'sequence-all-effects';
138
139
  const isKeyframeSelection = (selection) => selection.type === 'keyframe';
140
+ const getSequenceSelectionAfterDeletingEffect = (selection) => {
141
+ if (selection.type !== 'sequence-effect' &&
142
+ selection.type !== 'sequence-all-effects') {
143
+ return null;
144
+ }
145
+ return {
146
+ type: 'sequence',
147
+ nodePathInfo: {
148
+ ...selection.nodePathInfo,
149
+ auxiliaryKeys: [],
150
+ },
151
+ };
152
+ };
153
+ const getTimelineSelectionAfterDeletingItems = (selections) => {
154
+ const nextSelections = new Map();
155
+ for (const selection of selections) {
156
+ const nextSelection = getSequenceSelectionAfterDeletingEffect(selection);
157
+ if (!nextSelection) {
158
+ return [];
159
+ }
160
+ nextSelections.set((0, TimelineSelection_1.getTimelineSelectionKey)(nextSelection), nextSelection);
161
+ }
162
+ return Array.from(nextSelections.values());
163
+ };
164
+ exports.getTimelineSelectionAfterDeletingItems = getTimelineSelectionAfterDeletingItems;
139
165
  const areSelectionsOnlyOfType = (selections, type) => selections.every((selection) => selection.type === type);
140
166
  const assertTimelineSelectionsHaveSameType = (selections) => {
141
167
  const firstSelection = selections[0];
@@ -6,7 +6,7 @@ const parseKeyframeFieldFromNodePath = (auxiliaryKeys) => {
6
6
  if (auxiliaryKeys[0] === 'controls' && auxiliaryKeys.length >= 2) {
7
7
  return {
8
8
  type: 'sequence',
9
- fieldKey: auxiliaryKeys[1],
9
+ fieldKey: auxiliaryKeys.slice(1).join('.'),
10
10
  };
11
11
  }
12
12
  // Effect field: ['effects', effectIndex, fieldKey]
@@ -18,7 +18,7 @@ const parseKeyframeFieldFromNodePath = (auxiliaryKeys) => {
18
18
  return {
19
19
  type: 'effect',
20
20
  effectIndex,
21
- fieldKey: auxiliaryKeys[2],
21
+ fieldKey: auxiliaryKeys.slice(2).join('.'),
22
22
  };
23
23
  }
24
24
  return null;
@@ -1,4 +1,4 @@
1
- import type { OverrideIdToNodePaths, PropStatuses, SequencePropsSubscriptionKey, SequenceSchema, TSequence } from 'remotion';
1
+ import type { OverrideIdToNodePaths, PropStatuses, SequencePropsSubscriptionKey, InteractivitySchema, TSequence } from 'remotion';
2
2
  import type { SetPropStatuses } from './save-sequence-prop';
3
3
  import type { TimelineSelection } from './TimelineSelection';
4
4
  type SequencePropResetTarget = {
@@ -8,7 +8,7 @@ type SequencePropResetTarget = {
8
8
  readonly fieldKey: string;
9
9
  readonly value: unknown;
10
10
  readonly defaultValue: string | null;
11
- readonly schema: SequenceSchema;
11
+ readonly schema: InteractivitySchema;
12
12
  };
13
13
  type EffectPropResetTarget = {
14
14
  readonly type: 'effect-prop';
@@ -18,7 +18,7 @@ type EffectPropResetTarget = {
18
18
  readonly fieldKey: string;
19
19
  readonly value: unknown;
20
20
  readonly defaultValue: string | null;
21
- readonly schema: SequenceSchema;
21
+ readonly schema: InteractivitySchema;
22
22
  };
23
23
  type TimelinePropResetTarget = SequencePropResetTarget | EffectPropResetTarget;
24
24
  export declare const getTimelinePropResetTargets: ({ selections, sequences, overrideIdsToNodePaths, propStatuses, }: {
@@ -34,9 +34,11 @@ const isResettablePropStatus = ({ propStatus, defaultValue, }) => {
34
34
  const getDefaultValue = (fieldSchema) => fieldSchema.default !== undefined
35
35
  ? JSON.stringify(fieldSchema.default)
36
36
  : null;
37
+ const getActiveFieldSchema = ({ schema, key, resolveValue, }) => {
38
+ return remotion_1.Internals.flattenActiveSchema(schema, resolveValue)[key];
39
+ };
37
40
  const getTimelinePropResetTargets = ({ selections, sequences, overrideIdsToNodePaths, propStatuses, }) => {
38
41
  var _a;
39
- var _b;
40
42
  const propSelections = selections.filter(isPropResetSelection);
41
43
  if (propSelections.length === 0) {
42
44
  return null;
@@ -52,7 +54,7 @@ const getTimelinePropResetTargets = ({ selections, sequences, overrideIdsToNodeP
52
54
  overrideIdsToNodePaths,
53
55
  nodePathInfo: selection.nodePathInfo,
54
56
  });
55
- const sequence = (_b = track === null || track === void 0 ? void 0 : track.sequence) !== null && _b !== void 0 ? _b : null;
57
+ const sequence = (_a = track === null || track === void 0 ? void 0 : track.sequence) !== null && _a !== void 0 ? _a : null;
56
58
  if (!sequence) {
57
59
  continue;
58
60
  }
@@ -61,11 +63,23 @@ const getTimelinePropResetTargets = ({ selections, sequences, overrideIdsToNodeP
61
63
  if (!sequence.controls) {
62
64
  continue;
63
65
  }
64
- const sequenceFieldSchema = sequence.controls.schema[selection.key];
65
- const sequencePropStatus = (_a = remotion_1.Internals.getPropStatusesCtx(propStatuses, nodePath)) === null || _a === void 0 ? void 0 : _a[selection.key];
66
+ const sequencePropStatus = remotion_1.Internals.getPropStatusesCtx(propStatuses, nodePath);
67
+ const { merged: sequenceValuesDotNotation } = remotion_1.Internals.computeEffectiveSchemaValuesDotNotation({
68
+ schema: sequence.controls.schema,
69
+ currentValue: sequence.controls.currentRuntimeValueDotNotation,
70
+ overrideValues: {},
71
+ propStatus: sequencePropStatus,
72
+ frame: null,
73
+ });
74
+ const sequenceFieldSchema = getActiveFieldSchema({
75
+ schema: sequence.controls.schema,
76
+ key: selection.key,
77
+ resolveValue: (key) => sequenceValuesDotNotation[key],
78
+ });
79
+ const selectedPropStatus = sequencePropStatus === null || sequencePropStatus === void 0 ? void 0 : sequencePropStatus[selection.key];
66
80
  if (!isVisibleFieldSchema(sequenceFieldSchema) ||
67
81
  !isResettablePropStatus({
68
- propStatus: sequencePropStatus,
82
+ propStatus: selectedPropStatus,
69
83
  defaultValue: sequenceFieldSchema.default,
70
84
  })) {
71
85
  continue;