@remotion/studio 4.0.506 → 4.0.508

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 (211) hide show
  1. package/dist/FastRefreshProvider.js +13 -9
  2. package/dist/api/copy-render-output-to-asset.d.ts +4 -0
  3. package/dist/api/copy-render-output-to-asset.js +11 -0
  4. package/dist/components/AssetSelector.js +19 -4
  5. package/dist/components/AssetSelectorItem.js +2 -2
  6. package/dist/components/CodingAgentIcon.d.ts +6 -0
  7. package/dist/components/CodingAgentIcon.js +12 -0
  8. package/dist/components/ConfigureDefaultEditorModal.d.ts +1 -3
  9. package/dist/components/ConfigureDefaultEditorModal.js +67 -77
  10. package/dist/components/ConfigureLicenseModal.d.ts +1 -4
  11. package/dist/components/ConfigureLicenseModal.js +89 -81
  12. package/dist/components/ContextMenu.d.ts +1 -0
  13. package/dist/components/ContextMenu.js +42 -13
  14. package/dist/components/EditorContent.js +4 -3
  15. package/dist/components/EditorContexts.js +6 -5
  16. package/dist/components/ExpandedTracksProvider.js +10 -53
  17. package/dist/components/InlineAction.d.ts +2 -1
  18. package/dist/components/InlineAction.js +3 -3
  19. package/dist/components/InspectorLocationCopy.js +8 -8
  20. package/dist/components/InspectorOpenInEditor.d.ts +2 -0
  21. package/dist/components/InspectorOpenInEditor.js +81 -50
  22. package/dist/components/InspectorPanel/AlignmentControls.js +2 -2
  23. package/dist/components/InspectorPanel/CompositionInspector.js +3 -1
  24. package/dist/components/InspectorPanel/SequenceInspectorHeader.d.ts +3 -0
  25. package/dist/components/InspectorPanel/SequenceInspectorHeader.js +22 -4
  26. package/dist/components/InspectorPanel/SequenceSelectionInspector.js +1 -1
  27. package/dist/components/InspectorPanel/styles.js +1 -1
  28. package/dist/components/InspectorSequenceSection.js +36 -4
  29. package/dist/components/Menu/MenuSectionHeader.d.ts +4 -0
  30. package/dist/components/Menu/MenuSectionHeader.js +20 -0
  31. package/dist/components/Menu/SubMenu.js +13 -2
  32. package/dist/components/Menu/menu-tree-context.d.ts +3 -0
  33. package/dist/components/Menu/menu-tree-context.js +13 -0
  34. package/dist/components/MenuBuildIndicator.js +1 -1
  35. package/dist/components/NewComposition/ComboBox.d.ts +6 -1
  36. package/dist/components/NewComposition/MenuContent.js +27 -19
  37. package/dist/components/NewComposition/menu-typeahead.js +2 -2
  38. package/dist/components/PlayPause.d.ts +1 -1
  39. package/dist/components/PlayPause.js +61 -12
  40. package/dist/components/Preview.js +29 -4
  41. package/dist/components/RenderButton.js +16 -12
  42. package/dist/components/RenderModal/GuiRenderStatus.js +23 -6
  43. package/dist/components/RenderModal/InfoBubble.d.ts +1 -0
  44. package/dist/components/RenderModal/InfoBubble.js +6 -4
  45. package/dist/components/RenderModal/InfoTooltip.d.ts +1 -0
  46. package/dist/components/RenderModal/InfoTooltip.js +12 -12
  47. package/dist/components/RenderModal/SchemaEditor/SchemaLabel.d.ts +5 -0
  48. package/dist/components/RenderModal/SchemaEditor/SchemaLabel.js +16 -3
  49. package/dist/components/RenderModal/SchemaEditor/ZodArrayEditor.js +1 -1
  50. package/dist/components/RenderModal/SchemaEditor/ZodBooleanEditor.d.ts +2 -0
  51. package/dist/components/RenderModal/SchemaEditor/ZodBooleanEditor.js +3 -2
  52. package/dist/components/RenderModal/SchemaEditor/ZodColorEditor.js +1 -1
  53. package/dist/components/RenderModal/SchemaEditor/ZodDateEditor.js +1 -1
  54. package/dist/components/RenderModal/SchemaEditor/ZodDiscriminatedUnionEditor.js +2 -1
  55. package/dist/components/RenderModal/SchemaEditor/ZodEnumEditor.d.ts +1 -0
  56. package/dist/components/RenderModal/SchemaEditor/ZodEnumEditor.js +3 -3
  57. package/dist/components/RenderModal/SchemaEditor/ZodMatrixEditor.js +1 -1
  58. package/dist/components/RenderModal/SchemaEditor/ZodNonEditableValue.js +1 -1
  59. package/dist/components/RenderModal/SchemaEditor/ZodNumberEditor.js +1 -1
  60. package/dist/components/RenderModal/SchemaEditor/ZodObjectEditor.js +1 -1
  61. package/dist/components/RenderModal/SchemaEditor/ZodOrNullishEditor.js +8 -3
  62. package/dist/components/RenderModal/SchemaEditor/ZodStaticFileEditor.js +1 -1
  63. package/dist/components/RenderModal/SchemaEditor/ZodStringEditor.js +1 -1
  64. package/dist/components/RenderModal/SchemaEditor/ZodSwitch.js +2 -2
  65. package/dist/components/RenderModal/SchemaEditor/ZodTextareaEditor.js +1 -1
  66. package/dist/components/RenderModal/SchemaEditor/ZodTupleEditor.js +1 -1
  67. package/dist/components/RenderModal/SchemaEditor/zod-schema-type.d.ts +1 -0
  68. package/dist/components/RenderModal/SchemaEditor/zod-schema-type.js +12 -1
  69. package/dist/components/RenderModal/ServerRenderModal.js +4 -0
  70. package/dist/components/RenderQueue/RenderQueueItem.js +8 -2
  71. package/dist/components/RenderQueue/actions.d.ts +4 -2
  72. package/dist/components/RenderQueue/actions.js +4 -2
  73. package/dist/components/RenderQueue/index.js +3 -4
  74. package/dist/components/RenderQueue/use-render-output-file-drag.d.ts +8 -0
  75. package/dist/components/RenderQueue/use-render-output-file-drag.js +121 -0
  76. package/dist/components/SegmentedControl.js +0 -1
  77. package/dist/components/SelectedOutlineCanvasRotation.d.ts +9 -0
  78. package/dist/components/SelectedOutlineCanvasRotation.js +237 -0
  79. package/dist/components/SelectedOutlineElement.d.ts +16 -18
  80. package/dist/components/SelectedOutlineElement.js +144 -931
  81. package/dist/components/SelectedOutlineKeyboardControls.d.ts +7 -0
  82. package/dist/components/SelectedOutlineKeyboardControls.js +261 -0
  83. package/dist/components/SelectedOutlineOverlay.d.ts +7 -14
  84. package/dist/components/SelectedOutlineOverlay.js +378 -864
  85. package/dist/components/SelectedOutlinePolygon.d.ts +26 -0
  86. package/dist/components/SelectedOutlinePolygon.js +360 -0
  87. package/dist/components/SelectedOutlineRenderer.d.ts +19 -0
  88. package/dist/components/SelectedOutlineRenderer.js +225 -0
  89. package/dist/components/SelectedOutlineRotationCornerHandle.d.ts +17 -0
  90. package/dist/components/SelectedOutlineRotationCornerHandle.js +271 -0
  91. package/dist/components/SelectedOutlineScaleEdgeLine.d.ts +17 -0
  92. package/dist/components/SelectedOutlineScaleEdgeLine.js +215 -0
  93. package/dist/components/SelectedOutlineSnapIndicators.d.ts +9 -0
  94. package/dist/components/SelectedOutlineSnapIndicators.js +29 -0
  95. package/dist/components/SelectedOutlineTransformOriginHandle.d.ts +9 -0
  96. package/dist/components/SelectedOutlineTransformOriginHandle.js +312 -0
  97. package/dist/components/SelectedOutlineUvControls.d.ts +3 -9
  98. package/dist/components/SelectedOutlineUvControls.js +57 -12
  99. package/dist/components/SequencePropsSubscriptionProvider.js +8 -0
  100. package/dist/components/SettingsContext.d.ts +15 -0
  101. package/dist/components/SettingsContext.js +116 -0
  102. package/dist/components/SettingsModal.js +10 -4
  103. package/dist/components/SettingsModalFooter.d.ts +1 -3
  104. package/dist/components/SettingsModalFooter.js +4 -6
  105. package/dist/components/ShowOutlinesProvider.js +2 -3
  106. package/dist/components/Timeline/EasingEditorModal.js +66 -22
  107. package/dist/components/Timeline/SequencePropsObserver.js +97 -1
  108. package/dist/components/Timeline/SubscribeToNodePaths.js +4 -2
  109. package/dist/components/Timeline/Timeline.js +22 -5
  110. package/dist/components/Timeline/TimelineDuplicateCount.d.ts +4 -0
  111. package/dist/components/Timeline/TimelineDuplicateCount.js +28 -0
  112. package/dist/components/Timeline/TimelineEffectItem.js +1 -4
  113. package/dist/components/Timeline/TimelineExpandedKeyframeRow.js +3 -23
  114. package/dist/components/Timeline/TimelineExpandedTrackKeyframes.d.ts +4 -2
  115. package/dist/components/Timeline/TimelineExpandedTrackKeyframes.js +11 -1
  116. package/dist/components/Timeline/TimelineFieldRowContent.js +10 -3
  117. package/dist/components/Timeline/TimelineRotationField.js +84 -12
  118. package/dist/components/Timeline/TimelineScaleField.js +58 -4
  119. package/dist/components/Timeline/TimelineSelection.d.ts +4 -0
  120. package/dist/components/Timeline/TimelineSelection.js +45 -2
  121. package/dist/components/Timeline/TimelineSequence.js +28 -25
  122. package/dist/components/Timeline/TimelineSequenceItem.js +91 -28
  123. package/dist/components/Timeline/TimelineSequencePropItem.js +5 -2
  124. package/dist/components/Timeline/TimelineTrack.js +2 -1
  125. package/dist/components/Timeline/TimelineTransformOriginField.js +78 -4
  126. package/dist/components/Timeline/TimelineTranslateField.js +55 -15
  127. package/dist/components/Timeline/Transform3DModeContext.d.ts +1 -0
  128. package/dist/components/Timeline/Transform3DModeContext.js +5 -0
  129. package/dist/components/Timeline/delete-selected-timeline-item.js +0 -6
  130. package/dist/components/Timeline/get-sequence-context-menu-items.d.ts +6 -3
  131. package/dist/components/Timeline/get-sequence-context-menu-items.js +69 -57
  132. package/dist/components/Timeline/sequence-props-subscription-store.d.ts +2 -1
  133. package/dist/components/Timeline/sequence-props-subscription-store.js +5 -2
  134. package/dist/components/Timeline/timeline-field-display-utils.js +2 -2
  135. package/dist/components/Timeline/timeline-field-row-layout.d.ts +6 -0
  136. package/dist/components/Timeline/timeline-field-row-layout.js +16 -1
  137. package/dist/components/Timeline/timeline-rotation-utils.d.ts +16 -0
  138. package/dist/components/Timeline/timeline-rotation-utils.js +145 -4
  139. package/dist/components/Timeline/timeline-translate-utils.d.ts +3 -2
  140. package/dist/components/Timeline/timeline-translate-utils.js +8 -4
  141. package/dist/components/Timeline/transform-3d-mode.d.ts +6 -0
  142. package/dist/components/Timeline/transform-3d-mode.js +36 -0
  143. package/dist/components/Timeline/transform-origin-utils.d.ts +4 -0
  144. package/dist/components/Timeline/transform-origin-utils.js +12 -6
  145. package/dist/components/Timeline/use-expanded-track-keyframe-rows.js +36 -4
  146. package/dist/components/Timeline/{use-open-sequence-in-editor.d.ts → use-open-sequence-in-apps.d.ts} +4 -1
  147. package/dist/components/Timeline/{use-open-sequence-in-editor.js → use-open-sequence-in-apps.js} +21 -5
  148. package/dist/components/Timeline/use-resolved-stack-react-to-change.d.ts +5 -1
  149. package/dist/components/Timeline/use-resolved-stack-react-to-change.js +45 -9
  150. package/dist/components/Timeline/use-sequence-props-subscription.d.ts +3 -1
  151. package/dist/components/Timeline/use-sequence-props-subscription.js +7 -2
  152. package/dist/components/Timeline/use-timeline-expanded-tree.d.ts +4 -0
  153. package/dist/components/Timeline/use-timeline-expanded-tree.js +45 -1
  154. package/dist/components/call-api.js +2 -0
  155. package/dist/components/canvas-rotation-cursor.d.ts +1 -0
  156. package/dist/components/canvas-rotation-cursor.js +14 -0
  157. package/dist/components/get-open-in-menu-items.d.ts +17 -0
  158. package/dist/components/get-open-in-menu-items.js +144 -0
  159. package/dist/components/selected-outline-drag.d.ts +11 -5
  160. package/dist/components/selected-outline-drag.js +80 -42
  161. package/dist/components/selected-outline-measurement.d.ts +7 -2
  162. package/dist/components/selected-outline-measurement.js +28 -1
  163. package/dist/components/selected-outline-order.d.ts +12 -0
  164. package/dist/components/selected-outline-order.js +251 -0
  165. package/dist/components/selected-outline-types.d.ts +15 -10
  166. package/dist/components/svg-point-to-client-point.d.ts +2 -0
  167. package/dist/components/svg-point-to-client-point.js +10 -0
  168. package/dist/components/use-auto-save-config.d.ts +8 -0
  169. package/dist/components/use-auto-save-config.js +74 -0
  170. package/dist/components/use-default-editor-info.d.ts +1 -0
  171. package/dist/components/use-default-editor-info.js +10 -30
  172. package/dist/esm/{chunk-jefhcs5z.js → chunk-fgedsvhb.js} +1 -2
  173. package/dist/esm/{chunk-b49ec3nz.js → chunk-zpn4m49r.js} +12924 -10139
  174. package/dist/esm/index.mjs +357 -2
  175. package/dist/esm/internals.mjs +12923 -10138
  176. package/dist/esm/previewEntry.mjs +12771 -9986
  177. package/dist/esm/renderEntry.mjs +2 -2
  178. package/dist/helpers/are-sequence-node-path-infos-equal.d.ts +2 -0
  179. package/dist/helpers/are-sequence-node-path-infos-equal.js +27 -0
  180. package/dist/helpers/calculate-timeline.js +3 -3
  181. package/dist/helpers/client-id.js +8 -1
  182. package/dist/helpers/format-file-location.d.ts +1 -1
  183. package/dist/helpers/format-file-location.js +3 -3
  184. package/dist/helpers/get-box-quads-polyfill-internals.js +10 -2
  185. package/dist/helpers/migrate-expanded-tracks-for-subscription-key.js +3 -3
  186. package/dist/helpers/open-in-editor.d.ts +4 -1
  187. package/dist/helpers/open-in-editor.js +9 -1
  188. package/dist/helpers/preview-server-events.js +4 -0
  189. package/dist/helpers/sequence-node-path-mutations.d.ts +4 -0
  190. package/dist/helpers/sequence-node-path-mutations.js +31 -0
  191. package/dist/helpers/studio-runtime-config.js +3 -0
  192. package/dist/helpers/timeline-node-path-key.d.ts +2 -0
  193. package/dist/helpers/timeline-node-path-key.js +3 -1
  194. package/dist/helpers/use-asset-drag-events.d.ts +2 -1
  195. package/dist/helpers/use-asset-drag-events.js +14 -6
  196. package/dist/helpers/use-menu-structure.js +2 -2
  197. package/dist/helpers/use-runtime-values.d.ts +1 -3
  198. package/dist/icons/cube.d.ts +4 -0
  199. package/dist/icons/cube.js +6 -0
  200. package/dist/icons/finder.d.ts +4 -0
  201. package/dist/icons/finder.js +8 -0
  202. package/dist/icons/terminal.d.ts +6 -0
  203. package/dist/icons/terminal.js +46 -0
  204. package/dist/index.d.ts +15 -0
  205. package/dist/index.js +8 -0
  206. package/dist/state/timeline-sequence-hover.d.ts +9 -3
  207. package/dist/state/timeline-sequence-hover.js +63 -12
  208. package/dist/state/transform-3d-mode.d.ts +10 -0
  209. package/dist/state/transform-3d-mode.js +27 -0
  210. package/dist/state/z-index.js +5 -8
  211. package/package.json +12 -12
@@ -7,16 +7,35 @@ const InputDragger_1 = require("../NewComposition/InputDragger");
7
7
  const timeline_field_utils_1 = require("./timeline-field-utils");
8
8
  const timeline_rotation_field_utils_1 = require("./timeline-rotation-field-utils");
9
9
  const timeline_rotation_utils_1 = require("./timeline-rotation-utils");
10
+ const Transform3DModeContext_1 = require("./Transform3DModeContext");
11
+ const containerStyle = {
12
+ alignItems: 'center',
13
+ display: 'flex',
14
+ gap: 4,
15
+ };
16
+ const compactDraggerStyle = {
17
+ paddingBottom: 2,
18
+ paddingLeft: 2,
19
+ paddingRight: 2,
20
+ paddingTop: 2,
21
+ };
22
+ const ROTATION_LABELS = ['X', 'Y', 'Z'];
10
23
  const TimelineRotationField = ({ field, effectiveValue, propStatus, onSave, onDragValueChange, onDragEnd, }) => {
11
24
  var _a, _b;
12
25
  const [dragValue, setDragValue] = (0, react_1.useState)(null);
26
+ const [dragRotation, setDragRotation] = (0, react_1.useState)(null);
27
+ const transform3DMode = (0, react_1.useContext)(Transform3DModeContext_1.Transform3DModeContext);
13
28
  const isCssRotation = field.fieldSchema.type === 'rotation-css';
14
- const degrees = (0, react_1.useMemo)(() => {
15
- if (isCssRotation) {
16
- return (0, timeline_rotation_utils_1.parseCssRotationToDegrees)(String(effectiveValue !== null && effectiveValue !== void 0 ? effectiveValue : '0deg'));
17
- }
18
- return typeof effectiveValue === 'number' ? effectiveValue : 0;
19
- }, [effectiveValue, isCssRotation]);
29
+ const cssRotation = (0, react_1.useMemo)(() => isCssRotation
30
+ ? (0, timeline_rotation_utils_1.parseCssRotationToEuler)(String(effectiveValue !== null && effectiveValue !== void 0 ? effectiveValue : '0deg'))
31
+ : [0, 0, 0], [effectiveValue, isCssRotation]);
32
+ const show3D = isCssRotation &&
33
+ (transform3DMode || cssRotation[0] !== 0 || cssRotation[1] !== 0);
34
+ const degrees = isCssRotation
35
+ ? cssRotation[2]
36
+ : typeof effectiveValue === 'number'
37
+ ? effectiveValue
38
+ : 0;
20
39
  const configuredStep = field.fieldSchema.type === 'rotation-css' ||
21
40
  field.fieldSchema.type === 'rotation-degrees'
22
41
  ? field.fieldSchema.step
@@ -32,11 +51,13 @@ const TimelineRotationField = ({ field, effectiveValue, propStatus, onSave, onDr
32
51
  defaultDecimalPlaces: 1,
33
52
  step: configuredStep,
34
53
  }), [configuredStep]);
35
- const serializeValue = (0, react_1.useCallback)((value) => {
36
- return isCssRotation
37
- ? (0, timeline_rotation_utils_1.serializeCssRotation)(value, decimalPlaces)
38
- : (0, timeline_field_utils_1.normalizeTimelineNumber)(value);
39
- }, [decimalPlaces, isCssRotation]);
54
+ const serializeValue = (0, react_1.useCallback)((value) => isCssRotation
55
+ ? (0, timeline_rotation_utils_1.serializeCssRotation)(value, decimalPlaces)
56
+ : (0, timeline_field_utils_1.normalizeTimelineNumber)(value), [decimalPlaces, isCssRotation]);
57
+ const serializeRotation = (0, react_1.useCallback)((rotation) => (0, timeline_rotation_utils_1.serializeCssRotationFromEuler)({
58
+ rotation,
59
+ decimalPlaces: Math.max(6, decimalPlaces),
60
+ }), [decimalPlaces]);
40
61
  const onValueChange = (0, react_1.useCallback)((newVal) => {
41
62
  setDragValue(newVal);
42
63
  onDragValueChange(serializeValue(newVal));
@@ -73,6 +94,57 @@ const TimelineRotationField = ({ field, effectiveValue, propStatus, onSave, onDr
73
94
  value: v,
74
95
  });
75
96
  }, [decimalPlaces, field.fieldSchema]);
76
- return (jsx_runtime_1.jsx(InputDragger_1.InputDragger, { type: "number", value: dragValue !== null && dragValue !== void 0 ? dragValue : degrees, style: timeline_field_utils_1.draggerStyle, status: "ok", small: true, onValueChange: onValueChange, onValueChangeEnd: onValueChangeEnd, onTextChange: onTextChange, min: min, max: max, step: step, formatter: formatter, rightAlign: false }));
97
+ const onRotationValueChange = (0, react_1.useCallback)((rotationIndex, newValue) => {
98
+ const nextRotation = [...(dragRotation !== null && dragRotation !== void 0 ? dragRotation : cssRotation)];
99
+ nextRotation[rotationIndex] = newValue;
100
+ setDragRotation(nextRotation);
101
+ onDragValueChange(serializeRotation(nextRotation));
102
+ }, [cssRotation, dragRotation, onDragValueChange, serializeRotation]);
103
+ const onRotationValueChangeEnd = (0, react_1.useCallback)((rotationIndex, newValue) => {
104
+ const nextRotation = [...(dragRotation !== null && dragRotation !== void 0 ? dragRotation : cssRotation)];
105
+ nextRotation[rotationIndex] = newValue;
106
+ const newRotation = serializeRotation(nextRotation);
107
+ const clearDragState = () => {
108
+ setDragRotation(null);
109
+ onDragEnd();
110
+ };
111
+ if (newRotation !== propStatus.codeValue) {
112
+ onSave(newRotation).finally(clearDragState);
113
+ }
114
+ else {
115
+ clearDragState();
116
+ }
117
+ }, [
118
+ cssRotation,
119
+ dragRotation,
120
+ onDragEnd,
121
+ onSave,
122
+ propStatus.codeValue,
123
+ serializeRotation,
124
+ ]);
125
+ const onRotationTextChange = (0, react_1.useCallback)((rotationIndex, newValue) => {
126
+ const parsed = Number(newValue);
127
+ if (Number.isNaN(parsed)) {
128
+ return;
129
+ }
130
+ const nextRotation = [...(dragRotation !== null && dragRotation !== void 0 ? dragRotation : cssRotation)];
131
+ nextRotation[rotationIndex] = parsed;
132
+ const newRotation = serializeRotation(nextRotation);
133
+ if (newRotation !== propStatus.codeValue) {
134
+ setDragRotation(nextRotation);
135
+ onSave(newRotation).finally(() => setDragRotation(null));
136
+ }
137
+ }, [
138
+ cssRotation,
139
+ dragRotation,
140
+ onSave,
141
+ propStatus.codeValue,
142
+ serializeRotation,
143
+ ]);
144
+ const angleDragger = (jsx_runtime_1.jsx(InputDragger_1.InputDragger, { type: "number", value: dragValue !== null && dragValue !== void 0 ? dragValue : degrees, style: timeline_field_utils_1.draggerStyle, status: "ok", small: true, onValueChange: onValueChange, onValueChangeEnd: onValueChangeEnd, onTextChange: onTextChange, min: min, max: max, step: step, formatter: formatter, rightAlign: false, "aria-label": isCssRotation ? 'Rotation Z' : 'Rotation angle' }));
145
+ if (show3D) {
146
+ return (jsx_runtime_1.jsx("span", { style: containerStyle, children: ROTATION_LABELS.map((rotationLabel, rotationIndex) => (jsx_runtime_1.jsx(InputDragger_1.InputDragger, { type: "number", value: (dragRotation !== null && dragRotation !== void 0 ? dragRotation : cssRotation)[rotationIndex], buttonStyle: compactDraggerStyle, status: "ok", small: true, onValueChange: (newValue) => onRotationValueChange(rotationIndex, newValue), onValueChangeEnd: (newValue) => onRotationValueChangeEnd(rotationIndex, newValue), onTextChange: (newValue) => onRotationTextChange(rotationIndex, newValue), min: -Infinity, max: Infinity, step: step, formatter: formatter, rightAlign: false, "aria-label": `Rotation ${rotationLabel}` }, rotationLabel))) }));
147
+ }
148
+ return angleDragger;
77
149
  };
78
150
  exports.TimelineRotationField = TimelineRotationField;
@@ -10,11 +10,16 @@ const InputDragger_1 = require("../NewComposition/InputDragger");
10
10
  const timeline_field_display_utils_1 = require("./timeline-field-display-utils");
11
11
  const timeline_field_utils_1 = require("./timeline-field-utils");
12
12
  const TimelineLayerEye_1 = require("./TimelineLayerEye");
13
+ const Transform3DModeContext_1 = require("./Transform3DModeContext");
13
14
  const leftDraggerStyle = {
15
+ paddingBottom: 2,
14
16
  paddingLeft: 0,
17
+ paddingTop: 2,
15
18
  };
16
19
  const rightDraggerStyle = {
20
+ paddingBottom: 2,
17
21
  paddingRight: 0,
22
+ paddingTop: 2,
18
23
  };
19
24
  const containerStyle = {
20
25
  alignItems: 'center',
@@ -82,9 +87,12 @@ const TimelineScaleField = ({ field, propStatus, effectiveValue, onSave, onDragV
82
87
  var _a, _b;
83
88
  const [dragX, setDragX] = (0, react_1.useState)(null);
84
89
  const [dragY, setDragY] = (0, react_1.useState)(null);
90
+ const [dragZ, setDragZ] = (0, react_1.useState)(null);
85
91
  const dragStartRef = (0, react_1.useRef)(null);
86
92
  const { getScaleLockState, setScaleLockState } = (0, react_1.useContext)(scale_lock_1.ScaleLockContext);
93
+ const transform3DMode = (0, react_1.useContext)(Transform3DModeContext_1.Transform3DModeContext);
87
94
  const [codeX, codeY, codeZ] = (0, react_1.useMemo)(() => no_react_1.NoReactInternals.parseScaleValue(effectiveValue), [effectiveValue]);
95
+ const show3D = transform3DMode || codeZ !== 1;
88
96
  const defaultLinked = codeX === codeY;
89
97
  const linked = getScaleLockState({
90
98
  nodePath: scaleLockNodePath,
@@ -111,9 +119,9 @@ const TimelineScaleField = ({ field, propStatus, effectiveValue, onSave, onDragV
111
119
  }
112
120
  return dragStartRef.current;
113
121
  }, [codeX, codeY, dragX, dragY]);
114
- const serialize = (0, react_1.useCallback)((x, y) => {
115
- return no_react_1.NoReactInternals.serializeScaleValue([x, y, codeZ]);
116
- }, [codeZ]);
122
+ const serialize = (0, react_1.useCallback)((x, y, z = dragZ !== null && dragZ !== void 0 ? dragZ : codeZ) => {
123
+ return no_react_1.NoReactInternals.serializeScaleValue([x, y, z]);
124
+ }, [codeZ, dragZ]);
117
125
  const onXChange = (0, react_1.useCallback)((newVal) => {
118
126
  if (linked) {
119
127
  const [baseX, baseY] = getDragStart();
@@ -161,6 +169,7 @@ const TimelineScaleField = ({ field, propStatus, effectiveValue, onSave, onDragV
161
169
  dragStartRef.current = null;
162
170
  setDragX(null);
163
171
  setDragY(null);
172
+ setDragZ(null);
164
173
  onDragEnd();
165
174
  };
166
175
  if (!valuesEqual(newScale, propStatus.codeValue)) {
@@ -204,6 +213,7 @@ const TimelineScaleField = ({ field, propStatus, effectiveValue, onSave, onDragV
204
213
  dragStartRef.current = null;
205
214
  setDragX(null);
206
215
  setDragY(null);
216
+ setDragZ(null);
207
217
  });
208
218
  }
209
219
  }, [codeX, codeY, dragY, linked, max, min, onSave, propStatus, serialize]);
@@ -254,6 +264,7 @@ const TimelineScaleField = ({ field, propStatus, effectiveValue, onSave, onDragV
254
264
  dragStartRef.current = null;
255
265
  setDragX(null);
256
266
  setDragY(null);
267
+ setDragZ(null);
257
268
  onDragEnd();
258
269
  };
259
270
  if (!valuesEqual(newScale, propStatus.codeValue)) {
@@ -297,6 +308,7 @@ const TimelineScaleField = ({ field, propStatus, effectiveValue, onSave, onDragV
297
308
  dragStartRef.current = null;
298
309
  setDragX(null);
299
310
  setDragY(null);
311
+ setDragZ(null);
300
312
  });
301
313
  }
302
314
  }, [codeX, codeY, dragX, linked, max, min, onSave, propStatus, serialize]);
@@ -307,8 +319,50 @@ const TimelineScaleField = ({ field, propStatus, effectiveValue, onSave, onDragV
307
319
  linked: !linked,
308
320
  });
309
321
  }, [field.key, linked, scaleLockNodePath, setScaleLockState]);
322
+ const onZChange = (0, react_1.useCallback)((newVal) => {
323
+ setDragZ(newVal);
324
+ onDragValueChange(serialize(dragX !== null && dragX !== void 0 ? dragX : codeX, dragY !== null && dragY !== void 0 ? dragY : codeY, newVal));
325
+ }, [codeX, codeY, dragX, dragY, onDragValueChange, serialize]);
326
+ const onZChangeEnd = (0, react_1.useCallback)((newVal) => {
327
+ const newScale = serialize(dragX !== null && dragX !== void 0 ? dragX : codeX, dragY !== null && dragY !== void 0 ? dragY : codeY, newVal);
328
+ const clearDragState = () => {
329
+ dragStartRef.current = null;
330
+ setDragX(null);
331
+ setDragY(null);
332
+ setDragZ(null);
333
+ onDragEnd();
334
+ };
335
+ if (!valuesEqual(newScale, propStatus.codeValue)) {
336
+ onSave(newScale).finally(clearDragState);
337
+ }
338
+ else {
339
+ clearDragState();
340
+ }
341
+ }, [
342
+ codeX,
343
+ codeY,
344
+ dragX,
345
+ dragY,
346
+ onDragEnd,
347
+ onSave,
348
+ propStatus.codeValue,
349
+ serialize,
350
+ ]);
351
+ const onZTextChange = (0, react_1.useCallback)((newVal) => {
352
+ const parsed = Number(newVal);
353
+ if (Number.isNaN(parsed)) {
354
+ return;
355
+ }
356
+ const newScale = serialize(dragX !== null && dragX !== void 0 ? dragX : codeX, dragY !== null && dragY !== void 0 ? dragY : codeY, parsed);
357
+ if (!valuesEqual(newScale, propStatus.codeValue)) {
358
+ setDragZ(parsed);
359
+ onSave(newScale).finally(() => setDragZ(null));
360
+ }
361
+ }, [codeX, codeY, dragX, dragY, onSave, propStatus.codeValue, serialize]);
310
362
  return (jsx_runtime_1.jsxs("span", { style: containerStyle, children: [
311
- 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, allowStepMismatch: true }), jsx_runtime_1.jsx("div", { style: gapStyle }), 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, allowStepMismatch: true }), jsx_runtime_1.jsx(LinkToggle, { linked: linked, onToggle: onToggleLink })
363
+ jsx_runtime_1.jsx(InputDragger_1.InputDragger, { type: "number", value: dragX !== null && dragX !== void 0 ? dragX : codeX, buttonStyle: leftDraggerStyle, style: leftDraggerStyle, status: "ok", small: true, onValueChange: onXChange, onValueChangeEnd: onXChangeEnd, onTextChange: onXTextChange, min: min, max: max, step: step, formatter: formatter, rightAlign: false, allowStepMismatch: true, "aria-label": "Scale X" }), jsx_runtime_1.jsx("div", { style: gapStyle }), jsx_runtime_1.jsx(InputDragger_1.InputDragger, { type: "number", value: dragY !== null && dragY !== void 0 ? dragY : codeY, buttonStyle: rightDraggerStyle, style: rightDraggerStyle, status: "ok", small: true, onValueChange: onYChange, onValueChangeEnd: onYChangeEnd, onTextChange: onYTextChange, min: min, max: max, step: step, formatter: formatter, rightAlign: false, allowStepMismatch: true, "aria-label": "Scale Y" }), show3D ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
364
+ jsx_runtime_1.jsx("div", { style: gapStyle }), jsx_runtime_1.jsx(InputDragger_1.InputDragger, { type: "number", value: dragZ !== null && dragZ !== void 0 ? dragZ : codeZ, buttonStyle: rightDraggerStyle, style: rightDraggerStyle, status: "ok", small: true, onValueChange: onZChange, onValueChangeEnd: onZChangeEnd, onTextChange: onZTextChange, min: min, max: max, step: step, formatter: formatter, rightAlign: false, allowStepMismatch: true, "aria-label": "Scale Z" })
365
+ ] })) : null, jsx_runtime_1.jsx(LinkToggle, { linked: linked, onToggle: onToggleLink })
312
366
  ] }));
313
367
  };
314
368
  exports.TimelineScaleField = TimelineScaleField;
@@ -161,6 +161,10 @@ export declare const getTimelineSequenceSelectionKey: (nodePathInfo: SequenceNod
161
161
  export declare const TimelineSelectAllKeybindings: React.FC<{
162
162
  readonly timeline: readonly TimelineTrackData[];
163
163
  }>;
164
+ export declare const getTimelineSequenceSelectionForEscape: (selectedItems: readonly TimelineSelection[]) => {
165
+ readonly type: "sequence";
166
+ readonly nodePathInfo: SequenceNodePathInfo;
167
+ } | null;
164
168
  export declare const TimelineSelectableItemsProvider: React.FC<{
165
169
  readonly children: React.ReactNode;
166
170
  readonly timeline: readonly TimelineTrackData[];
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.useTimelineRowHighlightBackground = exports.useTimelineRowContainsSelection = exports.useTimelineGuideSelection = exports.useTimelineEasingSelection = exports.useTimelineKeyframeSelection = exports.useTimelineRowSelection = exports.useTimelineFocusableItem = exports.useTimelineMarqueeSelectableItem = exports.useTimelineMarqueeSelection = exports.useCurrentTimelineSelectionStateAsRef = exports.TIMELINE_SCRUBBER_ATTR = exports.TIMELINE_MARQUEE_ITEM_ATTR = exports.useTimelineSelection = exports.TimelineSelectionProvider = exports.TimelineSelectableItemsProvider = exports.TimelineSelectAllKeybindings = exports.getTimelineSequenceSelectionKey = exports.getSelectableTimelineItems = exports.getSelectableTimelineSequenceSelections = exports.getTimelineSelectionKey = exports.getTimelineSelectionFromNodePathInfo = exports.TimelineSelectionOrderProvider = exports.extendTimelineMarqueeSelection = exports.getTimelineMarqueeSelection = exports.timelineMarqueeRectsIntersect = exports.getClampedTimelineMarqueePoint = exports.getNormalizedTimelineMarqueeRect = exports.getAvailableTimelineSelectionState = exports.getTimelineSelectionAfterInteraction = exports.EMPTY_TIMELINE_SELECTION_STATE = exports.shouldSelectTimelineRowOnPointerDown = exports.isTimelineSelectionModifierEvent = exports.TIMELINE_TICKS_BACKGROUND = exports.TIMELINE_BACKGROUND = exports.getTimelineRowHighlightBackground = exports.getTimelineSelectedTrackHighlightStyle = exports.getTimelineColor = exports.getTimelineSelectedLabelStyle = exports.TIMELINE_SELECTED_LABEL_HORIZONTAL_PADDING = exports.TIMELINE_SELECTED_LABEL_TEXT = exports.TIMELINE_SELECTED_LABEL_BACKGROUND = exports.TIMELINE_HOVER_BACKGROUND = exports.TIMELINE_SELECTED_BACKGROUND = void 0;
3
+ exports.useTimelineRowHighlightBackground = exports.useTimelineRowContainsSelection = exports.useTimelineGuideSelection = exports.useTimelineEasingSelection = exports.useTimelineKeyframeSelection = exports.useTimelineRowSelection = exports.useTimelineFocusableItem = exports.useTimelineMarqueeSelectableItem = exports.useTimelineMarqueeSelection = exports.useCurrentTimelineSelectionStateAsRef = exports.TIMELINE_SCRUBBER_ATTR = exports.TIMELINE_MARQUEE_ITEM_ATTR = exports.useTimelineSelection = exports.TimelineSelectionProvider = exports.TimelineSelectableItemsProvider = exports.getTimelineSequenceSelectionForEscape = exports.TimelineSelectAllKeybindings = exports.getTimelineSequenceSelectionKey = exports.getSelectableTimelineItems = exports.getSelectableTimelineSequenceSelections = exports.getTimelineSelectionKey = exports.getTimelineSelectionFromNodePathInfo = exports.TimelineSelectionOrderProvider = exports.extendTimelineMarqueeSelection = exports.getTimelineMarqueeSelection = exports.timelineMarqueeRectsIntersect = exports.getClampedTimelineMarqueePoint = exports.getNormalizedTimelineMarqueeRect = exports.getAvailableTimelineSelectionState = exports.getTimelineSelectionAfterInteraction = exports.EMPTY_TIMELINE_SELECTION_STATE = exports.shouldSelectTimelineRowOnPointerDown = exports.isTimelineSelectionModifierEvent = exports.TIMELINE_TICKS_BACKGROUND = exports.TIMELINE_BACKGROUND = exports.getTimelineRowHighlightBackground = exports.getTimelineSelectedTrackHighlightStyle = exports.getTimelineColor = exports.getTimelineSelectedLabelStyle = exports.TIMELINE_SELECTED_LABEL_HORIZONTAL_PADDING = exports.TIMELINE_SELECTED_LABEL_TEXT = exports.TIMELINE_SELECTED_LABEL_BACKGROUND = exports.TIMELINE_HOVER_BACKGROUND = exports.TIMELINE_SELECTED_BACKGROUND = 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");
@@ -18,6 +18,7 @@ const options_sidebar_tabs_1 = require("../options-sidebar-tabs");
18
18
  const get_node_keyframes_1 = require("./get-node-keyframes");
19
19
  const get_timeline_easing_segments_1 = require("./get-timeline-easing-segments");
20
20
  const imperative_state_1 = require("./imperative-state");
21
+ const parse_keyframe_field_from_node_path_1 = require("./parse-keyframe-field-from-node-path");
21
22
  const timeline_expanded_filter_1 = require("./timeline-expanded-filter");
22
23
  const timeline_refs_1 = require("./timeline-refs");
23
24
  const TimelineClipboardKeybindings_1 = require("./TimelineClipboardKeybindings");
@@ -543,6 +544,42 @@ const TimelineSelectAllKeybindings = ({ timeline }) => {
543
544
  return null;
544
545
  };
545
546
  exports.TimelineSelectAllKeybindings = TimelineSelectAllKeybindings;
547
+ const fieldsSelectingSequenceOnEscape = new Set([
548
+ 'cropLeft',
549
+ 'cropRight',
550
+ 'cropTop',
551
+ 'cropBottom',
552
+ 'style.rotate',
553
+ ]);
554
+ const getTimelineSequenceSelectionForEscape = (selectedItems) => {
555
+ if (selectedItems.length !== 1) {
556
+ return null;
557
+ }
558
+ const [selectedItem] = selectedItems;
559
+ let fieldKey = null;
560
+ if (selectedItem.type === 'sequence-prop') {
561
+ fieldKey = selectedItem.key;
562
+ }
563
+ else if (selectedItem.type === 'keyframe' ||
564
+ selectedItem.type === 'easing') {
565
+ const field = (0, parse_keyframe_field_from_node_path_1.parseKeyframeFieldFromNodePath)(selectedItem.nodePathInfo.auxiliaryKeys);
566
+ fieldKey = (field === null || field === void 0 ? void 0 : field.type) === 'sequence' ? field.fieldKey : null;
567
+ }
568
+ else {
569
+ return null;
570
+ }
571
+ if (!fieldsSelectingSequenceOnEscape.has(fieldKey !== null && fieldKey !== void 0 ? fieldKey : '')) {
572
+ return null;
573
+ }
574
+ return {
575
+ type: 'sequence',
576
+ nodePathInfo: {
577
+ ...selectedItem.nodePathInfo,
578
+ auxiliaryKeys: [],
579
+ },
580
+ };
581
+ };
582
+ exports.getTimelineSequenceSelectionForEscape = getTimelineSequenceSelectionForEscape;
546
583
  const TimelineEscapeKeybindings = () => {
547
584
  const keybindings = (0, use_keybinding_1.useKeybinding)();
548
585
  const currentSelection = (0, exports.useCurrentTimelineSelectionStateAsRef)();
@@ -551,10 +588,16 @@ const TimelineEscapeKeybindings = () => {
551
588
  event: 'keydown',
552
589
  key: 'Escape',
553
590
  callback: (event) => {
554
- const { selectedItems, clearSelection } = currentSelection.current;
591
+ const { selectedItems, clearSelection, selectItems } = currentSelection.current;
555
592
  if (selectedItems.length === 0) {
556
593
  return;
557
594
  }
595
+ const sequenceSelection = (0, exports.getTimelineSequenceSelectionForEscape)(selectedItems);
596
+ if (sequenceSelection) {
597
+ selectItems([sequenceSelection]);
598
+ event.preventDefault();
599
+ return;
600
+ }
558
601
  clearSelection();
559
602
  event.preventDefault();
560
603
  },
@@ -39,21 +39,19 @@ const react_1 = __importStar(require("react"));
39
39
  const remotion_1 = require("remotion");
40
40
  const client_id_1 = require("../../helpers/client-id");
41
41
  const colors_1 = require("../../helpers/colors");
42
- const format_file_location_1 = require("../../helpers/format-file-location");
43
42
  const get_sequence_double_click_action_1 = require("../../helpers/get-sequence-double-click-action");
44
43
  const get_timeline_sequence_layout_1 = require("../../helpers/get-timeline-sequence-layout");
45
44
  const interactivity_enabled_1 = require("../../helpers/interactivity-enabled");
46
45
  const is_video_with_last_frame_hold_1 = require("../../helpers/is-video-with-last-frame-hold");
47
- const open_in_editor_1 = require("../../helpers/open-in-editor");
48
46
  const timeline_layout_1 = require("../../helpers/timeline-layout");
49
47
  const use_max_media_duration_1 = require("../../helpers/use-max-media-duration");
48
+ const modals_1 = require("../../state/modals");
50
49
  const AudioWaveform_1 = require("../AudioWaveform");
51
50
  const call_api_1 = require("../call-api");
52
51
  const ConfirmationDialog_1 = require("../ConfirmationDialog");
53
52
  const ContextMenu_1 = require("../ContextMenu");
54
53
  const InitialCompositionLoader_1 = require("../InitialCompositionLoader");
55
54
  const NotificationCenter_1 = require("../Notifications/NotificationCenter");
56
- const use_default_editor_info_1 = require("../use-default-editor-info");
57
55
  const use_select_asset_1 = require("../use-select-asset");
58
56
  const disable_sequence_interactivity_1 = require("./disable-sequence-interactivity");
59
57
  const duplicate_selected_timeline_item_1 = require("./duplicate-selected-timeline-item");
@@ -68,7 +66,7 @@ const TimelineSequenceFrame_1 = require("./TimelineSequenceFrame");
68
66
  const TimelineSequenceRightEdgeDragHandle_1 = require("./TimelineSequenceRightEdgeDragHandle");
69
67
  const TimelineVideoInfo_1 = require("./TimelineVideoInfo");
70
68
  const TimelineWidthProvider_1 = require("./TimelineWidthProvider");
71
- const use_resolved_stack_react_to_change_1 = require("./use-resolved-stack-react-to-change");
69
+ const use_open_sequence_in_apps_1 = require("./use-open-sequence-in-apps");
72
70
  const use_sequence_freeze_frame_menu_item_1 = require("./use-sequence-freeze-frame-menu-item");
73
71
  const TimelineSequenceFn = ({ s, connectedCompositions, nodePathInfo, sequenceFrameOffset }) => {
74
72
  const windowWidth = (0, react_1.useContext)(TimelineWidthProvider_1.TimelineWidthContext);
@@ -159,12 +157,12 @@ const TimelineSequenceInner = ({ s, connectedCompositions, windowWidth, nodePath
159
157
  // Some compositions may not be longer than their media duration,
160
158
  // if that is the case, it needs to be asynchronously determined
161
159
  var _a, _b, _c;
162
- var _d, _e, _f, _g, _h;
160
+ var _d, _e, _f, _g, _h, _j;
163
161
  const video = remotion_1.Internals.useVideo();
164
162
  const maxMediaDuration = (0, use_max_media_duration_1.useMaxMediaDuration)(s, (_d = video === null || video === void 0 ? void 0 : video.fps) !== null && _d !== void 0 ? _d : 30);
165
163
  const effectiveMaxMediaDuration = s.loopDisplay ? null : maxMediaDuration;
166
164
  const extendVideoLastFrame = (0, is_video_with_last_frame_hold_1.isVideoWithLastFrameHold)(s);
167
- const originalLocation = (0, use_resolved_stack_react_to_change_1.useResolveStackAndReactToChange)(s.getStack);
165
+ const { canOpenInEditor, canConfigureApps, codingAgentInfo, editorInfo, openInCodingAgent, openInEditor, originalLocation, } = (0, use_open_sequence_in_apps_1.useOpenSequenceInApps)(s);
168
166
  const validatedLocation = (0, react_1.useMemo)(() => {
169
167
  var _a;
170
168
  if (!originalLocation ||
@@ -199,25 +197,12 @@ const TimelineSequenceInner = ({ s, connectedCompositions, windowWidth, nodePath
199
197
  const { previewServerState } = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx);
200
198
  const previewConnected = previewServerState.type === 'connected';
201
199
  const previewInteractive = previewConnected && (0, interactivity_enabled_1.isStudioInteractivityEnabled)();
202
- const editorInfo = (0, use_default_editor_info_1.useDefaultEditorInfo)((0, use_default_editor_info_1.canUseEditorPicker)(previewConnected));
203
200
  const { setPropStatuses } = (0, react_1.useContext)(remotion_1.Internals.VisualModeSettersContext);
201
+ const { setSelectedModal } = (0, react_1.useContext)(modals_1.SetSelectedModalContext);
204
202
  const selectAsset = (0, use_select_asset_1.useSelectAsset)();
205
203
  const selectComposition = (0, InitialCompositionLoader_1.useSelectComposition)();
206
204
  const confirm = (0, ConfirmationDialog_1.useConfirmationDialog)();
207
205
  const { onSelect, selectable } = (0, TimelineSelection_1.useTimelineRowSelection)(nodePathInfo);
208
- const fileLocation = (0, react_1.useMemo)(() => (0, format_file_location_1.formatFileLocation)({
209
- location: originalLocation,
210
- root: window.remotion_cwd,
211
- }), [originalLocation]);
212
- const canOpenInEditor = Boolean(window.remotion_editorName && previewConnected && originalLocation);
213
- const openInEditor = (0, react_1.useCallback)((editorId) => {
214
- if (!canOpenInEditor || !originalLocation) {
215
- return;
216
- }
217
- (0, open_in_editor_1.openOriginalPositionInEditor)(originalLocation, editorId).catch((err) => {
218
- (0, NotificationCenter_1.showNotification)(err.message, 2000);
219
- });
220
- }, [canOpenInEditor, originalLocation]);
221
206
  const onSequenceDoubleClick = (0, react_1.useCallback)((e) => {
222
207
  if ((0, TimelineSelection_1.isTimelineSelectionModifierEvent)(e)) {
223
208
  e.stopPropagation();
@@ -253,7 +238,8 @@ const TimelineSequenceInner = ({ s, connectedCompositions, windowWidth, nodePath
253
238
  const canHandleSequenceDoubleClick = connectedCompositions.length === 1 || canOpenInEditor;
254
239
  const canDeleteFromSource = Boolean(nodePath && (validatedLocation === null || validatedLocation === void 0 ? void 0 : validatedLocation.source));
255
240
  const deleteDisabled = !previewInteractive || !s.controls || !canDeleteFromSource;
256
- const duplicateDisabled = deleteDisabled;
241
+ const isProgrammaticallyDuplicated = ((_f = nodePathInfo === null || nodePathInfo === void 0 ? void 0 : nodePathInfo.numberOfSequencesWithThisNodePath) !== null && _f !== void 0 ? _f : 1) > 1;
242
+ const duplicateDisabled = deleteDisabled || isProgrammaticallyDuplicated;
257
243
  const disableInteractivityDisabled = !previewInteractive ||
258
244
  !s.showInTimeline ||
259
245
  !nodePath ||
@@ -346,15 +332,28 @@ const TimelineSequenceInner = ({ s, connectedCompositions, windowWidth, nodePath
346
332
  return (0, get_sequence_context_menu_items_1.getSequenceContextMenuItems)({
347
333
  assetLinkInfo: mediaSrc ? (0, timeline_asset_link_1.getTimelineAssetLinkInfo)(mediaSrc) : null,
348
334
  canOpenInEditor,
335
+ codingAgentInfo,
349
336
  deleteDisabled,
350
337
  disableInteractivityDisabled,
351
338
  duplicateDisabled,
352
339
  editorInfo,
353
- fileLocation,
354
340
  includeSourceEditItems: (0, interactivity_enabled_1.isStudioInteractivityEnabled)(),
341
+ isProgrammaticallyDuplicated,
342
+ onConfigureApps: canConfigureApps
343
+ ? () => {
344
+ var _a;
345
+ var _b;
346
+ setSelectedModal({
347
+ type: 'settings',
348
+ initialTab: 'apps',
349
+ initialPublicLicenseKey: (_b = (_a = window.remotion_renderDefaults) === null || _a === void 0 ? void 0 : _a.publicLicenseKey) !== null && _b !== void 0 ? _b : null,
350
+ });
351
+ }
352
+ : null,
355
353
  onDeleteSequenceFromSource,
356
354
  onDisableSequenceInteractivity,
357
355
  onDuplicateSequenceFromSource,
356
+ openInCodingAgent,
358
357
  openInEditor,
359
358
  originalLocation,
360
359
  selectAsset,
@@ -365,17 +364,20 @@ const TimelineSequenceInner = ({ s, connectedCompositions, windowWidth, nodePath
365
364
  });
366
365
  }, [
367
366
  canOpenInEditor,
367
+ canConfigureApps,
368
+ codingAgentInfo,
368
369
  deleteDisabled,
369
370
  disableInteractivityDisabled,
370
371
  duplicateDisabled,
371
372
  editorInfo,
372
- fileLocation,
373
+ isProgrammaticallyDuplicated,
373
374
  mediaSrc,
374
375
  nodePath,
375
376
  onSelect,
376
377
  onDeleteSequenceFromSource,
377
378
  onDisableSequenceInteractivity,
378
379
  onDuplicateSequenceFromSource,
380
+ openInCodingAgent,
379
381
  openInEditor,
380
382
  originalLocation,
381
383
  previewInteractive,
@@ -386,13 +388,14 @@ const TimelineSequenceInner = ({ s, connectedCompositions, windowWidth, nodePath
386
388
  selectable,
387
389
  sequenceFrameOffset,
388
390
  setPropStatuses,
391
+ setSelectedModal,
389
392
  validatedLocation === null || validatedLocation === void 0 ? void 0 : validatedLocation.source,
390
393
  ]);
391
394
  const { frozenFrame } = s;
392
395
  const { onPointerDown: onMoveDragPointerDown } = (0, TimelineSequenceRightEdgeDragHandle_1.useTimelineSequenceFromDrag)({
393
396
  nodePathInfo,
394
397
  windowWidth,
395
- timelineDurationInFrames: (_f = video === null || video === void 0 ? void 0 : video.durationInFrames) !== null && _f !== void 0 ? _f : 1,
398
+ timelineDurationInFrames: (_g = video === null || video === void 0 ? void 0 : video.durationInFrames) !== null && _g !== void 0 ? _g : 1,
396
399
  });
397
400
  if (!video) {
398
401
  throw new TypeError('Expected video config');
@@ -464,7 +467,7 @@ const TimelineSequenceInner = ({ s, connectedCompositions, windowWidth, nodePath
464
467
  if (maxMediaDuration === null && !s.loopDisplay) {
465
468
  return null;
466
469
  }
467
- const sequence = (jsx_runtime_1.jsxs(TimelineSequenceCurrentFrame, { s: s, displayDurationInFrames: displayDurationInFrames, premountWidth: premountWidth, postmountWidth: postmountWidth, style: style, nodePathInfo: nodePathInfo, sequenceFrameOffset: sequenceFrameOffset, fromCanUpdate: fromCanUpdate, frozenFrame: frozenFrame, onMoveDragPointerDown: onMoveDragPointerDown, onDoubleClick: canHandleSequenceDoubleClick ? onSequenceDoubleClick : undefined, children: [s.type === 'audio' ? (jsx_runtime_1.jsx("div", { style: mediaVisualizationStyle, children: jsx_runtime_1.jsx(AudioWaveform_1.AudioWaveform, { src: s.src, height: timeline_layout_1.TIMELINE_LAYER_HEIGHT_AUDIO, doesVolumeChange: s.doesVolumeChange, visualizationWidth: mediaVisualizationLayout.width, startFrom: s.startMediaFrom, durationInFrames: s.duration, volume: s.volume, playbackRate: s.playbackRate, loopDisplay: s.loopDisplay }) })) : null, s.type === 'video' ? (jsx_runtime_1.jsx(TimelineVideoInfo_1.TimelineVideoInfo, { src: s.src, visualizationWidth: width, naturalWidth: naturalWidth, startMediaFrom: s.startMediaFrom, mediaFrameAtSequenceZero: s.mediaFrameAtSequenceZero, sequenceFrameOffset: sequenceFrameOffset, durationInFrames: s.duration, playbackRate: s.playbackRate, volume: s.volume, doesVolumeChange: s.doesVolumeChange, premountWidth: premountWidth !== null && premountWidth !== void 0 ? premountWidth : 0, postmountWidth: postmountWidth !== null && postmountWidth !== void 0 ? postmountWidth : 0, loopDisplay: s.loopDisplay, frozenMediaFrame: s.frozenMediaFrame, extendLastFrame: extendVideoLastFrame })) : null, s.type === 'image' ? (jsx_runtime_1.jsx("div", { style: mediaVisualizationStyle, children: jsx_runtime_1.jsx(TimelineImageInfo_1.TimelineImageInfo, { src: s.src, visualizationWidth: mediaVisualizationLayout.width }) })) : null, s.loopDisplay === undefined ? null : (jsx_runtime_1.jsx(LoopedTimelineIndicators_1.LoopedTimelineIndicator, { loops: s.loopDisplay.numberOfTimes })), showLeftEdgeDragHandle && nodePathInfo && validatedLocation ? (jsx_runtime_1.jsx(TimelineSequenceRightEdgeDragHandle_1.TimelineSequenceLeftEdgeDragHandle, { nodePathInfo: nodePathInfo, windowWidth: windowWidth, timelineDurationInFrames: (_g = video.durationInFrames) !== null && _g !== void 0 ? _g : 1 })) : null, showRightEdgeDragHandle && nodePathInfo && validatedLocation ? (jsx_runtime_1.jsx(TimelineSequenceRightEdgeDragHandle_1.TimelineSequenceRightEdgeDragHandle, { nodePathInfo: nodePathInfo, windowWidth: windowWidth, timelineDurationInFrames: (_h = video.durationInFrames) !== null && _h !== void 0 ? _h : 1 })) : null] }));
470
+ const sequence = (jsx_runtime_1.jsxs(TimelineSequenceCurrentFrame, { s: s, displayDurationInFrames: displayDurationInFrames, premountWidth: premountWidth, postmountWidth: postmountWidth, style: style, nodePathInfo: nodePathInfo, sequenceFrameOffset: sequenceFrameOffset, fromCanUpdate: fromCanUpdate, frozenFrame: frozenFrame, onMoveDragPointerDown: onMoveDragPointerDown, onDoubleClick: canHandleSequenceDoubleClick ? onSequenceDoubleClick : undefined, children: [s.type === 'audio' ? (jsx_runtime_1.jsx("div", { style: mediaVisualizationStyle, children: jsx_runtime_1.jsx(AudioWaveform_1.AudioWaveform, { src: s.src, height: timeline_layout_1.TIMELINE_LAYER_HEIGHT_AUDIO, doesVolumeChange: s.doesVolumeChange, visualizationWidth: mediaVisualizationLayout.width, startFrom: s.startMediaFrom, durationInFrames: s.duration, volume: s.volume, playbackRate: s.playbackRate, loopDisplay: s.loopDisplay }) })) : null, s.type === 'video' ? (jsx_runtime_1.jsx(TimelineVideoInfo_1.TimelineVideoInfo, { src: s.src, visualizationWidth: width, naturalWidth: naturalWidth, startMediaFrom: s.startMediaFrom, mediaFrameAtSequenceZero: s.mediaFrameAtSequenceZero, sequenceFrameOffset: sequenceFrameOffset, durationInFrames: s.duration, playbackRate: s.playbackRate, volume: s.volume, doesVolumeChange: s.doesVolumeChange, premountWidth: premountWidth !== null && premountWidth !== void 0 ? premountWidth : 0, postmountWidth: postmountWidth !== null && postmountWidth !== void 0 ? postmountWidth : 0, loopDisplay: s.loopDisplay, frozenMediaFrame: s.frozenMediaFrame, extendLastFrame: extendVideoLastFrame })) : null, s.type === 'image' ? (jsx_runtime_1.jsx("div", { style: mediaVisualizationStyle, children: jsx_runtime_1.jsx(TimelineImageInfo_1.TimelineImageInfo, { src: s.src, visualizationWidth: mediaVisualizationLayout.width }) })) : null, s.loopDisplay === undefined ? null : (jsx_runtime_1.jsx(LoopedTimelineIndicators_1.LoopedTimelineIndicator, { loops: s.loopDisplay.numberOfTimes })), showLeftEdgeDragHandle && nodePathInfo && validatedLocation ? (jsx_runtime_1.jsx(TimelineSequenceRightEdgeDragHandle_1.TimelineSequenceLeftEdgeDragHandle, { nodePathInfo: nodePathInfo, windowWidth: windowWidth, timelineDurationInFrames: (_h = video.durationInFrames) !== null && _h !== void 0 ? _h : 1 })) : null, showRightEdgeDragHandle && nodePathInfo && validatedLocation ? (jsx_runtime_1.jsx(TimelineSequenceRightEdgeDragHandle_1.TimelineSequenceRightEdgeDragHandle, { nodePathInfo: nodePathInfo, windowWidth: windowWidth, timelineDurationInFrames: (_j = video.durationInFrames) !== null && _j !== void 0 ? _j : 1 })) : null] }));
468
471
  return previewConnected || window.remotion_isReadOnlyStudio ? (jsx_runtime_1.jsx(ContextMenu_1.ContextMenu, { getItems: getContextMenuItems, children: sequence })) : (sequence);
469
472
  };
470
473
  exports.TimelineSequence = react_1.default.memo(TimelineSequenceFn);