@remotion/studio 4.0.477 → 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 (191) 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/CanvasIfSizeIsAvailable.js +2 -6
  5. package/dist/components/CompactExplanation.d.ts +12 -0
  6. package/dist/components/CompactExplanation.js +52 -0
  7. package/dist/components/CompositionSelector.js +2 -4
  8. package/dist/components/CurrentAsset.d.ts +3 -1
  9. package/dist/components/CurrentAsset.js +42 -34
  10. package/dist/components/CurrentComposition.d.ts +1 -1
  11. package/dist/components/CurrentComposition.js +38 -31
  12. package/dist/components/DefaultPropsEditor.d.ts +12 -2
  13. package/dist/components/DefaultPropsEditor.js +2 -2
  14. package/dist/components/EditorGuides/Guide.js +37 -9
  15. package/dist/components/EditorRuler/Ruler.js +4 -14
  16. package/dist/components/EditorRuler/index.js +9 -4
  17. package/dist/components/EffectPickerModal.d.ts +5 -0
  18. package/dist/components/EffectPickerModal.js +179 -0
  19. package/dist/components/InlineAction.js +1 -0
  20. package/dist/components/InspectorInfoHeader.d.ts +11 -0
  21. package/dist/components/InspectorInfoHeader.js +55 -0
  22. package/dist/components/InspectorPanel/DefaultInspector.d.ts +8 -0
  23. package/dist/components/InspectorPanel/DefaultInspector.js +93 -0
  24. package/dist/components/InspectorPanel/EasingInspector.d.ts +5 -0
  25. package/dist/components/InspectorPanel/EasingInspector.js +41 -0
  26. package/dist/components/InspectorPanel/GuideInspector.d.ts +7 -0
  27. package/dist/components/InspectorPanel/GuideInspector.js +55 -0
  28. package/dist/components/InspectorPanel/KeyframeInspector.d.ts +7 -0
  29. package/dist/components/InspectorPanel/KeyframeInspector.js +109 -0
  30. package/dist/components/InspectorPanel/SelectedInspector.d.ts +5 -0
  31. package/dist/components/InspectorPanel/SelectedInspector.js +26 -0
  32. package/dist/components/InspectorPanel/SequenceSelectionInspector.d.ts +5 -0
  33. package/dist/components/InspectorPanel/SequenceSelectionInspector.js +116 -0
  34. package/dist/components/InspectorPanel/common.d.ts +15 -0
  35. package/dist/components/InspectorPanel/common.js +18 -0
  36. package/dist/components/InspectorPanel/inspector-selection.d.ts +10 -0
  37. package/dist/components/InspectorPanel/inspector-selection.js +34 -0
  38. package/dist/components/InspectorPanel/styles.d.ts +27 -0
  39. package/dist/components/InspectorPanel/styles.js +178 -0
  40. package/dist/components/InspectorPanel/use-track-for-selection.d.ts +2 -0
  41. package/dist/components/InspectorPanel/use-track-for-selection.js +22 -0
  42. package/dist/components/InspectorPanel.d.ts +8 -0
  43. package/dist/components/InspectorPanel.js +26 -0
  44. package/dist/components/InspectorPanelLayout.d.ts +1 -0
  45. package/dist/components/InspectorPanelLayout.js +4 -0
  46. package/dist/components/InspectorSequenceSection.d.ts +16 -0
  47. package/dist/components/InspectorSequenceSection.js +147 -0
  48. package/dist/components/InspectorSourceLocation.d.ts +7 -0
  49. package/dist/components/InspectorSourceLocation.js +71 -0
  50. package/dist/components/MenuToolbar.d.ts +1 -0
  51. package/dist/components/MenuToolbar.js +4 -1
  52. package/dist/components/Modals.js +3 -3
  53. package/dist/components/NewComposition/InputDragger.js +1 -1
  54. package/dist/components/NewComposition/RemInput.d.ts +1 -0
  55. package/dist/components/NewComposition/RemInput.js +8 -2
  56. package/dist/components/NewComposition/RemTextarea.d.ts +1 -0
  57. package/dist/components/NewComposition/RemTextarea.js +8 -2
  58. package/dist/components/NewComposition/ValidationMessage.d.ts +3 -0
  59. package/dist/components/NewComposition/ValidationMessage.js +16 -5
  60. package/dist/components/OptionsPanel.d.ts +1 -1
  61. package/dist/components/OptionsPanel.js +8 -17
  62. package/dist/components/QuickSwitcher/QuickSwitcherContent.js +2 -7
  63. package/dist/components/QuickSwitcher/QuickSwitcherResult.js +3 -10
  64. package/dist/components/QuickSwitcher/shared.d.ts +4 -0
  65. package/dist/components/QuickSwitcher/shared.js +24 -0
  66. package/dist/components/RenderModal/DataEditor.d.ts +29 -2
  67. package/dist/components/RenderModal/DataEditor.js +107 -56
  68. package/dist/components/RenderModal/RenderModalJSONPropsEditor.d.ts +1 -0
  69. package/dist/components/RenderModal/RenderModalJSONPropsEditor.js +25 -7
  70. package/dist/components/RenderModal/SchemaEditor/Fieldset.d.ts +2 -1
  71. package/dist/components/RenderModal/SchemaEditor/Fieldset.js +10 -5
  72. package/dist/components/RenderModal/SchemaEditor/SchemaEditor.d.ts +4 -0
  73. package/dist/components/RenderModal/SchemaEditor/SchemaEditor.js +27 -4
  74. package/dist/components/RenderModal/SchemaEditor/SchemaErrorMessages.d.ts +12 -4
  75. package/dist/components/RenderModal/SchemaEditor/SchemaErrorMessages.js +23 -9
  76. package/dist/components/RenderModal/SchemaEditor/SchemaLabel.js +3 -3
  77. package/dist/components/RenderModal/SchemaEditor/SchemaSeparationLine.js +8 -1
  78. package/dist/components/RenderModal/SchemaEditor/ZodColorEditor.js +1 -1
  79. package/dist/components/RenderModal/SchemaEditor/ZodDateEditor.js +1 -1
  80. package/dist/components/RenderModal/SchemaEditor/ZodDiscriminatedUnionEditor.js +1 -1
  81. package/dist/components/RenderModal/SchemaEditor/ZodEnumEditor.js +1 -1
  82. package/dist/components/RenderModal/SchemaEditor/ZodErrorMessages.d.ts +1 -0
  83. package/dist/components/RenderModal/SchemaEditor/ZodErrorMessages.js +23 -6
  84. package/dist/components/RenderModal/SchemaEditor/ZodFieldValidation.js +2 -2
  85. package/dist/components/RenderModal/SchemaEditor/ZodNonEditableValue.js +2 -1
  86. package/dist/components/RenderModal/SchemaEditor/ZodNumberEditor.js +1 -1
  87. package/dist/components/RenderModal/SchemaEditor/ZodObjectEditor.js +9 -11
  88. package/dist/components/RenderModal/SchemaEditor/ZodOrNullishEditor.js +1 -1
  89. package/dist/components/RenderModal/SchemaEditor/ZodStaticFileEditor.js +1 -1
  90. package/dist/components/RenderModal/SchemaEditor/ZodStringEditor.js +1 -1
  91. package/dist/components/RenderModal/SchemaEditor/ZodTextareaEditor.js +1 -1
  92. package/dist/components/RenderModal/WarningIndicatorButton.d.ts +1 -0
  93. package/dist/components/RenderModal/WarningIndicatorButton.js +17 -4
  94. package/dist/components/RenderModal/get-render-modal-warnings.d.ts +2 -1
  95. package/dist/components/RenderModal/get-render-modal-warnings.js +6 -3
  96. package/dist/components/RendersTab.js +1 -1
  97. package/dist/components/SegmentedControl.d.ts +3 -0
  98. package/dist/components/SegmentedControl.js +11 -5
  99. package/dist/components/SelectedOutlineElement.js +135 -31
  100. package/dist/components/SelectedOutlineOverlay.d.ts +1 -1
  101. package/dist/components/SelectedOutlineOverlay.js +45 -29
  102. package/dist/components/SelectedOutlineUvControls.d.ts +9 -0
  103. package/dist/components/SelectedOutlineUvControls.js +64 -10
  104. package/dist/components/Tabs/index.js +4 -4
  105. package/dist/components/Timeline/EasingEditorModal.d.ts +5 -4
  106. package/dist/components/Timeline/EasingEditorModal.js +597 -124
  107. package/dist/components/Timeline/KeyframeSettingsModal.d.ts +2 -2
  108. package/dist/components/Timeline/SubscribeToNodePaths.d.ts +2 -2
  109. package/dist/components/Timeline/TimelineClipboardKeybindings.d.ts +15 -3
  110. package/dist/components/Timeline/TimelineClipboardKeybindings.js +85 -1
  111. package/dist/components/Timeline/TimelineDeleteKeybindings.js +10 -3
  112. package/dist/components/Timeline/TimelineEffectItem.d.ts +2 -2
  113. package/dist/components/Timeline/TimelineEffectPropItem.d.ts +8 -0
  114. package/dist/components/Timeline/TimelineEffectPropItem.js +24 -20
  115. package/dist/components/Timeline/TimelineExpandedRow.d.ts +5 -2
  116. package/dist/components/Timeline/TimelineExpandedRow.js +4 -4
  117. package/dist/components/Timeline/TimelineExpandedSection.d.ts +1 -1
  118. package/dist/components/Timeline/TimelineExpandedSection.js +5 -19
  119. package/dist/components/Timeline/TimelineKeyframeControls.d.ts +8 -2
  120. package/dist/components/Timeline/TimelineKeyframeControls.js +24 -3
  121. package/dist/components/Timeline/TimelineKeyframeEasingLine.js +2 -47
  122. package/dist/components/Timeline/TimelineKeyframedValue.d.ts +1 -1
  123. package/dist/components/Timeline/TimelineKeyframedValue.js +8 -10
  124. package/dist/components/Timeline/TimelineNumberField.js +5 -11
  125. package/dist/components/Timeline/TimelineRotationField.js +5 -6
  126. package/dist/components/Timeline/TimelineScaleField.js +4 -8
  127. package/dist/components/Timeline/TimelineSelection.d.ts +6 -0
  128. package/dist/components/Timeline/TimelineSelection.js +109 -14
  129. package/dist/components/Timeline/TimelineSequence.js +22 -14
  130. package/dist/components/Timeline/TimelineSequenceItem.js +12 -67
  131. package/dist/components/Timeline/TimelineSequencePropItem.d.ts +12 -2
  132. package/dist/components/Timeline/TimelineSequencePropItem.js +56 -52
  133. package/dist/components/Timeline/TimelineTransformOriginField.js +4 -5
  134. package/dist/components/Timeline/TimelineTranslateField.js +4 -5
  135. package/dist/components/Timeline/TimelineUvCoordinateField.js +4 -4
  136. package/dist/components/Timeline/TimelineVideoInfo.d.ts +1 -0
  137. package/dist/components/Timeline/TimelineVideoInfo.js +93 -8
  138. package/dist/components/Timeline/call-add-keyframe.d.ts +4 -4
  139. package/dist/components/Timeline/call-delete-keyframe.d.ts +4 -4
  140. package/dist/components/Timeline/call-move-keyframe.d.ts +2 -2
  141. package/dist/components/Timeline/call-update-keyframe-settings.d.ts +3 -3
  142. package/dist/components/Timeline/delete-selected-timeline-item.d.ts +2 -1
  143. package/dist/components/Timeline/delete-selected-timeline-item.js +27 -1
  144. package/dist/components/Timeline/duplicate-selected-timeline-item.d.ts +7 -0
  145. package/dist/components/Timeline/duplicate-selected-timeline-item.js +32 -3
  146. package/dist/components/Timeline/parse-keyframe-field-from-node-path.js +2 -2
  147. package/dist/components/Timeline/reset-selected-timeline-props.d.ts +3 -3
  148. package/dist/components/Timeline/reset-selected-timeline-props.js +19 -5
  149. package/dist/components/Timeline/save-effect-prop.d.ts +2 -2
  150. package/dist/components/Timeline/save-sequence-prop.d.ts +2 -2
  151. package/dist/components/Timeline/sequence-props-subscription-store.d.ts +3 -3
  152. package/dist/components/Timeline/timeline-field-display-utils.d.ts +5 -0
  153. package/dist/components/Timeline/timeline-field-display-utils.js +244 -0
  154. package/dist/components/Timeline/timeline-video-filmstrip-times.d.ts +17 -0
  155. package/dist/components/Timeline/timeline-video-filmstrip-times.js +22 -0
  156. package/dist/components/Timeline/update-selected-easing.d.ts +47 -4
  157. package/dist/components/Timeline/update-selected-easing.js +40 -9
  158. package/dist/components/Timeline/use-sequence-freeze-frame-menu-item.d.ts +13 -0
  159. package/dist/components/Timeline/use-sequence-freeze-frame-menu-item.js +73 -0
  160. package/dist/components/Timeline/use-sequence-props-subscription.d.ts +3 -3
  161. package/dist/components/Timeline/use-timeline-expanded-tree.d.ts +11 -0
  162. package/dist/components/Timeline/use-timeline-expanded-tree.js +33 -0
  163. package/dist/components/VisualControls/VisualControlsContent.d.ts +1 -1
  164. package/dist/components/VisualControls/VisualControlsContent.js +4 -5
  165. package/dist/components/effect-drag-and-drop.d.ts +10 -0
  166. package/dist/components/effect-drag-and-drop.js +17 -8
  167. package/dist/components/effect-picker-search.d.ts +5 -0
  168. package/dist/components/effect-picker-search.js +77 -0
  169. package/dist/components/import-assets.d.ts +11 -2
  170. package/dist/components/import-assets.js +61 -6
  171. package/dist/components/selected-outline-drag.d.ts +44 -2
  172. package/dist/components/selected-outline-drag.js +74 -1
  173. package/dist/components/selected-outline-types.d.ts +7 -7
  174. package/dist/components/selected-outline-uv.d.ts +4 -3
  175. package/dist/components/selected-outline-uv.js +6 -2
  176. package/dist/error-overlay/remotion-overlay/Overlay.js +3 -0
  177. package/dist/esm/{chunk-t8fjnw2d.js → chunk-fge2mq5p.js} +17004 -13432
  178. package/dist/esm/internals.mjs +17004 -13432
  179. package/dist/esm/previewEntry.mjs +26617 -23041
  180. package/dist/esm/renderEntry.mjs +1 -1
  181. package/dist/helpers/editor-guide-selection.js +1 -1
  182. package/dist/helpers/get-preview-file-type.js +1 -1
  183. package/dist/helpers/render-codec-label.d.ts +2 -0
  184. package/dist/helpers/render-codec-label.js +49 -0
  185. package/dist/helpers/ruler-canvas-size.d.ts +5 -0
  186. package/dist/helpers/ruler-canvas-size.js +17 -0
  187. package/dist/helpers/timeline-layout.d.ts +4 -4
  188. package/dist/helpers/use-media-metadata.d.ts +8 -2
  189. package/dist/helpers/use-media-metadata.js +17 -4
  190. package/dist/state/modals.d.ts +9 -4
  191. package/package.json +12 -12
@@ -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];
@@ -8,6 +8,13 @@ export declare const isDuplicatableSequenceRowSelection: (selection: TimelineSel
8
8
  } & {
9
9
  type: "sequence";
10
10
  };
11
+ export declare const isDuplicatableEffectSelection: (selection: TimelineSelection) => selection is {
12
+ readonly type: "sequence-effect";
13
+ readonly nodePathInfo: SequenceNodePathInfo;
14
+ readonly i: number;
15
+ } & {
16
+ type: "sequence-effect";
17
+ };
11
18
  export declare const duplicateSelectedTimelineItems: ({ selections, confirm, }: {
12
19
  selections: readonly TimelineSelection[];
13
20
  confirm: ConfirmationDialogFunction;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.duplicateSelectedTimelineItems = exports.isDuplicatableSequenceRowSelection = exports.duplicateSequencesFromSource = void 0;
3
+ exports.duplicateSelectedTimelineItems = exports.isDuplicatableEffectSelection = exports.isDuplicatableSequenceRowSelection = exports.duplicateSequencesFromSource = void 0;
4
4
  const call_api_1 = require("../call-api");
5
5
  const NotificationCenter_1 = require("../Notifications/NotificationCenter");
6
6
  const confirmDuplicatingProgrammaticallyDuplicatedSequences = (nodePathInfos, confirm) => {
@@ -61,11 +61,40 @@ const duplicateSequencesFromSource = (nodePathInfos, confirm) => {
61
61
  exports.duplicateSequencesFromSource = duplicateSequencesFromSource;
62
62
  const isDuplicatableSequenceRowSelection = (selection) => selection.type === 'sequence';
63
63
  exports.isDuplicatableSequenceRowSelection = isDuplicatableSequenceRowSelection;
64
+ const isDuplicatableEffectSelection = (selection) => selection.type === 'sequence-effect';
65
+ exports.isDuplicatableEffectSelection = isDuplicatableEffectSelection;
66
+ const duplicateEffectsFromSource = (effects) => {
67
+ return (0, call_api_1.callApi)('/api/duplicate-effect', effects.map((effect) => {
68
+ const nodePath = effect.nodePathInfo.sequenceSubscriptionKey;
69
+ return {
70
+ fileName: nodePath.absolutePath,
71
+ sequenceNodePath: nodePath,
72
+ effectIndex: effect.i,
73
+ };
74
+ }))
75
+ .then((result) => {
76
+ if (result.success) {
77
+ (0, NotificationCenter_1.showNotification)(effects.length === 1
78
+ ? 'Duplicated effect in source file'
79
+ : 'Duplicated effects in source files', 2000);
80
+ }
81
+ else {
82
+ (0, NotificationCenter_1.showNotification)(result.reason, 4000);
83
+ }
84
+ })
85
+ .catch((err) => {
86
+ (0, NotificationCenter_1.showNotification)(err.message, 4000);
87
+ });
88
+ };
64
89
  const duplicateSelectedTimelineItems = ({ selections, confirm, }) => {
65
90
  const sequenceSelections = selections.filter(exports.isDuplicatableSequenceRowSelection);
66
- if (sequenceSelections.length === 0) {
91
+ if (sequenceSelections.length > 0) {
92
+ return (0, exports.duplicateSequencesFromSource)(sequenceSelections.map((selection) => selection.nodePathInfo), confirm);
93
+ }
94
+ const effectSelections = selections.filter(exports.isDuplicatableEffectSelection);
95
+ if (effectSelections.length === 0) {
67
96
  return null;
68
97
  }
69
- return (0, exports.duplicateSequencesFromSource)(sequenceSelections.map((selection) => selection.nodePathInfo), confirm);
98
+ return duplicateEffectsFromSource(effectSelections);
70
99
  };
71
100
  exports.duplicateSelectedTimelineItems = duplicateSelectedTimelineItems;
@@ -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;
@@ -1,5 +1,5 @@
1
1
  import { type EffectClipboardParam } 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
  type SaveEffectPropBase = {
5
5
  fileName: string;
@@ -7,7 +7,7 @@ type SaveEffectPropBase = {
7
7
  effectIndex: number;
8
8
  fieldKey: string;
9
9
  defaultValue: string | null;
10
- schema: SequenceSchema;
10
+ schema: InteractivitySchema;
11
11
  setPropStatuses: SetPropStatuses;
12
12
  clientId: string;
13
13
  };
@@ -1,4 +1,4 @@
1
- import type { CanUpdateSequencePropsResponse, SequencePropsSubscriptionKey, SequenceSchema } from 'remotion';
1
+ import type { CanUpdateSequencePropsResponse, SequencePropsSubscriptionKey, InteractivitySchema } from 'remotion';
2
2
  export type SetPropStatuses = (nodePath: SequencePropsSubscriptionKey, values: (prev: CanUpdateSequencePropsResponse) => CanUpdateSequencePropsResponse) => void;
3
3
  export type SaveSequencePropChange = {
4
4
  fileName: string;
@@ -6,7 +6,7 @@ export type SaveSequencePropChange = {
6
6
  fieldKey: string;
7
7
  value: unknown;
8
8
  defaultValue: string | null;
9
- schema: SequenceSchema;
9
+ schema: InteractivitySchema;
10
10
  };
11
11
  type SaveSequencePropsOptions = {
12
12
  changes: SaveSequencePropChange[];
@@ -1,4 +1,4 @@
1
- import type { SequenceNodePath, SequenceSchema } from 'remotion';
1
+ import type { SequenceNodePath, InteractivitySchema } from 'remotion';
2
2
  import { callApi } from '../call-api';
3
3
  type SubscribeResult = Awaited<ReturnType<typeof callApi<'/api/subscribe-to-sequence-props'>>>;
4
4
  type ApplyResult = (result: SubscribeResult) => void;
@@ -6,9 +6,9 @@ export declare const acquireSequencePropsSubscription: ({ fileName, line, column
6
6
  fileName: string;
7
7
  line: number;
8
8
  column: number;
9
- schema: SequenceSchema;
9
+ schema: InteractivitySchema;
10
10
  componentIdentity: string | null;
11
- effects: SequenceSchema[];
11
+ effects: InteractivitySchema[];
12
12
  nodePath: SequenceNodePath | null;
13
13
  clientId: string;
14
14
  applyOnce: ApplyResult;
@@ -0,0 +1,5 @@
1
+ import type { InteractivitySchemaField } from 'remotion';
2
+ export declare const formatTimelineFieldValueForDisplay: ({ fieldSchema, value, }: {
3
+ readonly fieldSchema: InteractivitySchemaField | undefined;
4
+ readonly value: unknown;
5
+ }) => string;
@@ -0,0 +1,244 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.formatTimelineFieldValueForDisplay = void 0;
4
+ const timeline_field_utils_1 = require("./timeline-field-utils");
5
+ const timeline_rotation_utils_1 = require("./timeline-rotation-utils");
6
+ const timeline_translate_utils_1 = require("./timeline-translate-utils");
7
+ const transform_origin_utils_1 = require("./transform-origin-utils");
8
+ const DISPLAY_FALLBACK_DECIMAL_PLACES = 3;
9
+ const DEFAULT_SCALE_VALUE = [1, 1, 1];
10
+ const getFiniteNumericValue = (value) => {
11
+ if (typeof value !== 'number' && typeof value !== 'string') {
12
+ return null;
13
+ }
14
+ const numericValue = Number(value);
15
+ return Number.isFinite(numericValue) ? numericValue : null;
16
+ };
17
+ const parseScaleStringForDisplay = (value) => {
18
+ var _a, _b;
19
+ const parts = value.trim().split(/\s+/);
20
+ if (parts.length < 1 || parts.length > 3 || parts[0] === '') {
21
+ return null;
22
+ }
23
+ const parsed = parts.map((part) => Number(part));
24
+ if (!parsed.every((part) => Number.isFinite(part))) {
25
+ return null;
26
+ }
27
+ const x = parsed[0];
28
+ const y = (_a = parsed[1]) !== null && _a !== void 0 ? _a : x;
29
+ const z = (_b = parsed[2]) !== null && _b !== void 0 ? _b : 1;
30
+ return [x, y, z];
31
+ };
32
+ const parseScaleValueForDisplay = (value) => {
33
+ var _a;
34
+ if (typeof value === 'number') {
35
+ return Number.isFinite(value) ? [value, value, 1] : DEFAULT_SCALE_VALUE;
36
+ }
37
+ if (typeof value === 'string') {
38
+ return (_a = parseScaleStringForDisplay(value)) !== null && _a !== void 0 ? _a : DEFAULT_SCALE_VALUE;
39
+ }
40
+ return DEFAULT_SCALE_VALUE;
41
+ };
42
+ const formatUnknownNumberForDisplay = (value) => {
43
+ if (!Number.isFinite(value)) {
44
+ return String(value);
45
+ }
46
+ return (0, timeline_field_utils_1.formatTimelineNumber)({
47
+ decimalPlaces: DISPLAY_FALLBACK_DECIMAL_PLACES,
48
+ fixed: false,
49
+ value: (0, timeline_field_utils_1.normalizeTimelineNumber)(value),
50
+ });
51
+ };
52
+ const normalizeUnknownForDisplay = (value) => {
53
+ if (typeof value === 'number' && Number.isFinite(value)) {
54
+ return (0, timeline_field_utils_1.roundToDecimalPlaces)((0, timeline_field_utils_1.normalizeTimelineNumber)(value), DISPLAY_FALLBACK_DECIMAL_PLACES);
55
+ }
56
+ if (Array.isArray(value)) {
57
+ return value.map(normalizeUnknownForDisplay);
58
+ }
59
+ if (value && typeof value === 'object') {
60
+ return Object.fromEntries(Object.entries(value).map(([key, item]) => [
61
+ key,
62
+ normalizeUnknownForDisplay(item),
63
+ ]));
64
+ }
65
+ return value;
66
+ };
67
+ const formatUnknownTimelineValueForDisplay = (value) => {
68
+ var _a;
69
+ if (typeof value === 'number') {
70
+ return formatUnknownNumberForDisplay(value);
71
+ }
72
+ if (value === null ||
73
+ typeof value === 'string' ||
74
+ typeof value === 'boolean' ||
75
+ typeof value === 'bigint') {
76
+ return String(value);
77
+ }
78
+ if (value === undefined) {
79
+ return 'undefined';
80
+ }
81
+ try {
82
+ return (_a = JSON.stringify(normalizeUnknownForDisplay(value))) !== null && _a !== void 0 ? _a : String(value);
83
+ }
84
+ catch (_b) {
85
+ return String(value);
86
+ }
87
+ };
88
+ const formatNumberTimelineFieldValueForDisplay = ({ fieldSchema, value, }) => {
89
+ const numericValue = getFiniteNumericValue(value);
90
+ if (numericValue === null) {
91
+ return null;
92
+ }
93
+ const stepDecimals = fieldSchema.step === undefined ? null : (0, timeline_field_utils_1.getDecimalPlaces)(fieldSchema.step);
94
+ if (stepDecimals === null) {
95
+ const digits = (0, timeline_field_utils_1.getDecimalPlaces)(numericValue);
96
+ return digits === 0 ? String(numericValue) : numericValue.toFixed(digits);
97
+ }
98
+ return (0, timeline_field_utils_1.formatTimelineNumber)({
99
+ decimalPlaces: stepDecimals,
100
+ fixed: true,
101
+ value: numericValue,
102
+ });
103
+ };
104
+ const formatRotationTimelineFieldValueForDisplay = ({ fieldSchema, value, }) => {
105
+ const configuredStep = fieldSchema.type === 'rotation-css' ||
106
+ fieldSchema.type === 'rotation-degrees'
107
+ ? fieldSchema.step
108
+ : undefined;
109
+ const decimalPlaces = (0, timeline_field_utils_1.getTimelineDisplayDecimalPlaces)({
110
+ defaultDecimalPlaces: 1,
111
+ step: configuredStep,
112
+ });
113
+ const degrees = fieldSchema.type === 'rotation-css'
114
+ ? (0, timeline_rotation_utils_1.parseCssRotationToDegrees)(String(value !== null && value !== void 0 ? value : '0deg'))
115
+ : getFiniteNumericValue(value);
116
+ if (degrees === null || !Number.isFinite(degrees)) {
117
+ return null;
118
+ }
119
+ return `${(0, timeline_field_utils_1.formatTimelineNumber)({
120
+ decimalPlaces,
121
+ fixed: false,
122
+ value: (0, timeline_field_utils_1.normalizeTimelineNumber)(degrees),
123
+ })}\u00B0`;
124
+ };
125
+ const formatScaleTimelineFieldValueForDisplay = ({ fieldSchema, value, }) => {
126
+ const decimalPlaces = (0, timeline_field_utils_1.getTimelineDisplayDecimalPlaces)({
127
+ defaultDecimalPlaces: 3,
128
+ step: fieldSchema.step,
129
+ });
130
+ const formatScalePart = (part) => (0, timeline_field_utils_1.formatTimelineNumber)({
131
+ decimalPlaces,
132
+ fixed: true,
133
+ value: part,
134
+ });
135
+ const [x, y, z] = parseScaleValueForDisplay(value);
136
+ const parts = x === y && z === 1 ? [x] : z === 1 ? [x, y] : [x, y, z];
137
+ return parts.map(formatScalePart).join(' ');
138
+ };
139
+ const formatTranslateCoordinateForDisplay = (value, decimalPlaces) => `${(0, timeline_field_utils_1.formatTimelineNumber)({
140
+ decimalPlaces,
141
+ fixed: false,
142
+ value,
143
+ })}px`;
144
+ const formatTranslateTimelineFieldValueForDisplay = ({ fieldSchema, value, }) => {
145
+ const decimalPlaces = (0, timeline_field_utils_1.getTimelineDisplayDecimalPlaces)({
146
+ defaultDecimalPlaces: 1,
147
+ step: fieldSchema.step,
148
+ });
149
+ const numericValue = getFiniteNumericValue(value);
150
+ if (numericValue !== null) {
151
+ return formatTranslateCoordinateForDisplay(numericValue, decimalPlaces);
152
+ }
153
+ const [x, y] = (0, timeline_translate_utils_1.parseTranslate)(String(value !== null && value !== void 0 ? value : '0px 0px'));
154
+ return (0, timeline_translate_utils_1.serializeTranslate)(x, y, decimalPlaces);
155
+ };
156
+ const formatTransformOriginAxisValueForDisplay = ({ decimalPlaces, unit, value, }) => {
157
+ return `${(0, timeline_field_utils_1.formatTimelineNumber)({
158
+ decimalPlaces,
159
+ fixed: false,
160
+ value,
161
+ })}${unit}`;
162
+ };
163
+ const formatTransformOriginTimelineFieldValueForDisplay = ({ fieldSchema, value, }) => {
164
+ const decimalPlaces = (0, timeline_field_utils_1.getTimelineDisplayDecimalPlaces)({
165
+ defaultDecimalPlaces: 2,
166
+ step: fieldSchema.step,
167
+ });
168
+ const numericValue = getFiniteNumericValue(value);
169
+ if (numericValue !== null) {
170
+ return formatTransformOriginAxisValueForDisplay({
171
+ decimalPlaces,
172
+ unit: '%',
173
+ value: numericValue,
174
+ });
175
+ }
176
+ const parsed = (0, transform_origin_utils_1.parseTransformOrigin)(value);
177
+ if (parsed === null) {
178
+ return null;
179
+ }
180
+ const xy = `${formatTransformOriginAxisValueForDisplay({
181
+ decimalPlaces,
182
+ unit: parsed.x.unit,
183
+ value: parsed.x.value,
184
+ })} ${formatTransformOriginAxisValueForDisplay({
185
+ decimalPlaces,
186
+ unit: parsed.y.unit,
187
+ value: parsed.y.value,
188
+ })}`;
189
+ return parsed.z === null ? xy : `${xy} ${parsed.z}`;
190
+ };
191
+ const formatUvCoordinatePartForDisplay = (value, decimalPlaces) => (0, timeline_field_utils_1.formatTimelineNumber)({
192
+ decimalPlaces,
193
+ fixed: true,
194
+ value,
195
+ });
196
+ const formatUvCoordinateTimelineFieldValueForDisplay = ({ fieldSchema, value, }) => {
197
+ const decimalPlaces = (0, timeline_field_utils_1.getTimelineDisplayDecimalPlaces)({
198
+ defaultDecimalPlaces: 2,
199
+ step: fieldSchema.step,
200
+ });
201
+ const numericValue = getFiniteNumericValue(value);
202
+ if (numericValue !== null) {
203
+ return formatUvCoordinatePartForDisplay(numericValue, decimalPlaces);
204
+ }
205
+ if (!Array.isArray(value) ||
206
+ value.length !== 2 ||
207
+ !value.every((item) => typeof item === 'number' && Number.isFinite(item))) {
208
+ return null;
209
+ }
210
+ return `${formatUvCoordinatePartForDisplay(value[0], decimalPlaces)}, ${formatUvCoordinatePartForDisplay(value[1], decimalPlaces)}`;
211
+ };
212
+ const formatTimelineFieldValueForDisplay = ({ fieldSchema, value, }) => {
213
+ var _a, _b, _c, _d, _e;
214
+ if (!fieldSchema) {
215
+ return formatUnknownTimelineValueForDisplay(value);
216
+ }
217
+ switch (fieldSchema.type) {
218
+ case 'number':
219
+ return ((_a = formatNumberTimelineFieldValueForDisplay({ fieldSchema, value })) !== null && _a !== void 0 ? _a : formatUnknownTimelineValueForDisplay(value));
220
+ case 'rotation-css':
221
+ case 'rotation-degrees':
222
+ return ((_b = formatRotationTimelineFieldValueForDisplay({ fieldSchema, value })) !== null && _b !== void 0 ? _b : formatUnknownTimelineValueForDisplay(value));
223
+ case 'scale':
224
+ return formatScaleTimelineFieldValueForDisplay({ fieldSchema, value });
225
+ case 'translate':
226
+ return ((_c = formatTranslateTimelineFieldValueForDisplay({ fieldSchema, value })) !== null && _c !== void 0 ? _c : formatUnknownTimelineValueForDisplay(value));
227
+ case 'transform-origin':
228
+ return ((_d = formatTransformOriginTimelineFieldValueForDisplay({
229
+ fieldSchema,
230
+ value,
231
+ })) !== null && _d !== void 0 ? _d : formatUnknownTimelineValueForDisplay(value));
232
+ case 'uv-coordinate':
233
+ return ((_e = formatUvCoordinateTimelineFieldValueForDisplay({ fieldSchema, value })) !== null && _e !== void 0 ? _e : formatUnknownTimelineValueForDisplay(value));
234
+ case 'array':
235
+ case 'boolean':
236
+ case 'color':
237
+ case 'enum':
238
+ case 'hidden':
239
+ return formatUnknownTimelineValueForDisplay(value);
240
+ default:
241
+ return formatUnknownTimelineValueForDisplay(value);
242
+ }
243
+ };
244
+ exports.formatTimelineFieldValueForDisplay = formatTimelineFieldValueForDisplay;
@@ -0,0 +1,17 @@
1
+ import type { LoopDisplay } from 'remotion';
2
+ export type TimelineVideoFilmstripTimes = {
3
+ type: 'frozen';
4
+ timestampInSeconds: number;
5
+ } | {
6
+ type: 'range';
7
+ fromSeconds: number;
8
+ toSeconds: number;
9
+ };
10
+ export declare const getTimelineVideoFilmstripTimes: ({ trimBefore, durationInFrames, playbackRate, fps, loopDisplay, frozenMediaFrame, }: {
11
+ trimBefore: number;
12
+ durationInFrames: number;
13
+ playbackRate: number;
14
+ fps: number;
15
+ loopDisplay: LoopDisplay | undefined;
16
+ frozenMediaFrame: number | null;
17
+ }) => TimelineVideoFilmstripTimes;
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getTimelineVideoFilmstripTimes = void 0;
4
+ const timeline_utils_1 = require("@remotion/timeline-utils");
5
+ const getTimelineVideoFilmstripTimes = ({ trimBefore, durationInFrames, playbackRate, fps, loopDisplay, frozenMediaFrame, }) => {
6
+ if (frozenMediaFrame !== null) {
7
+ return {
8
+ type: 'frozen',
9
+ timestampInSeconds: Math.max(0, frozenMediaFrame / fps),
10
+ };
11
+ }
12
+ const fromSeconds = trimBefore / fps;
13
+ const visibleDurationInFrames = (0, timeline_utils_1.shouldTileLoopDisplay)(loopDisplay) && loopDisplay
14
+ ? loopDisplay.durationInFrames
15
+ : durationInFrames;
16
+ return {
17
+ type: 'range',
18
+ fromSeconds,
19
+ toSeconds: fromSeconds + (visibleDurationInFrames * playbackRate) / fps,
20
+ };
21
+ };
22
+ exports.getTimelineVideoFilmstripTimes = getTimelineVideoFilmstripTimes;
@@ -1,8 +1,51 @@
1
- import type { OverrideIdToNodePaths, PropStatuses, TSequence } from 'remotion';
1
+ import type { CanUpdateSequencePropStatusKeyframed, CanUpdateSequencePropStatusEasing, DragOverrideValue, OverrideIdToNodePaths, PropStatuses, SequencePropsSubscriptionKey, InteractivitySchema, TSequence } from 'remotion';
2
2
  import type { SetPropStatuses } from './save-sequence-prop';
3
3
  import type { TimelineEasingSelection, TimelineSelection } from './TimelineSelection';
4
4
  export type EasingSelection = TimelineEasingSelection;
5
- export type TimelineEasingValue = 'linear' | [number, number, number, number];
5
+ export type TimelineEasingValue = CanUpdateSequencePropStatusEasing;
6
+ export type SelectedEasingUpdate = {
7
+ readonly type: 'sequence';
8
+ readonly fileName: string;
9
+ readonly nodePath: SequencePropsSubscriptionKey;
10
+ readonly fieldKey: string;
11
+ readonly schema: InteractivitySchema;
12
+ readonly segmentIndex: number;
13
+ readonly currentEasing: TimelineEasingValue;
14
+ readonly propStatus: CanUpdateSequencePropStatusKeyframed;
15
+ } | {
16
+ readonly type: 'effect';
17
+ readonly fileName: string;
18
+ readonly nodePath: SequencePropsSubscriptionKey;
19
+ readonly effectIndex: number;
20
+ readonly fieldKey: string;
21
+ readonly schema: InteractivitySchema;
22
+ readonly segmentIndex: number;
23
+ readonly currentEasing: TimelineEasingValue;
24
+ readonly propStatus: CanUpdateSequencePropStatusKeyframed;
25
+ };
26
+ export declare const getSelectedEasingUpdate: ({ selection, sequences, overrideIdsToNodePaths, propStatuses, }: {
27
+ selection: {
28
+ readonly type: "easing";
29
+ readonly nodePathInfo: import("../../helpers/get-timeline-sequence-sort-key").SequenceNodePathInfo;
30
+ readonly fromFrame: number;
31
+ readonly toFrame: number;
32
+ readonly segmentIndex: number;
33
+ };
34
+ sequences: TSequence[];
35
+ overrideIdsToNodePaths: OverrideIdToNodePaths;
36
+ propStatuses: PropStatuses;
37
+ }) => SelectedEasingUpdate | null;
38
+ export declare const getSelectedEasingUpdates: ({ selections, sequences, overrideIdsToNodePaths, propStatuses, }: {
39
+ readonly selections: readonly TimelineSelection[];
40
+ readonly sequences: TSequence[];
41
+ readonly overrideIdsToNodePaths: OverrideIdToNodePaths;
42
+ readonly propStatuses: PropStatuses;
43
+ }) => SelectedEasingUpdate[];
44
+ export declare const makeEasingDragOverride: ({ status, segmentIndex, easing, }: {
45
+ readonly status: CanUpdateSequencePropStatusKeyframed;
46
+ readonly segmentIndex: number;
47
+ readonly easing: CanUpdateSequencePropStatusEasing;
48
+ }) => DragOverrideValue;
6
49
  export declare const getEasingSelections: (selections: readonly TimelineSelection[]) => {
7
50
  readonly type: "easing";
8
51
  readonly nodePathInfo: import("../../helpers/get-timeline-sequence-sort-key").SequenceNodePathInfo;
@@ -21,7 +64,7 @@ export declare const getTimelineEasingValueForSelection: ({ selection, sequences
21
64
  sequences: TSequence[];
22
65
  overrideIdsToNodePaths: OverrideIdToNodePaths;
23
66
  propStatuses: PropStatuses;
24
- }) => TimelineEasingValue | null;
67
+ }) => CanUpdateSequencePropStatusEasing | null;
25
68
  export declare const updateSelectedTimelineEasings: ({ selections, sequences, overrideIdsToNodePaths, propStatuses, setPropStatuses, clientId, easing, }: {
26
69
  selections: readonly TimelineSelection[];
27
70
  sequences: TSequence[];
@@ -29,5 +72,5 @@ export declare const updateSelectedTimelineEasings: ({ selections, sequences, ov
29
72
  propStatuses: PropStatuses;
30
73
  setPropStatuses: SetPropStatuses;
31
74
  clientId: string;
32
- easing: TimelineEasingValue;
75
+ easing: CanUpdateSequencePropStatusEasing;
33
76
  }) => Promise<void> | null;