@remotion/studio 4.0.525 → 4.0.527

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 (195) hide show
  1. package/dist/api/focus-default-props-path.js +7 -1
  2. package/dist/api/restart-studio.d.ts +1 -1
  3. package/dist/api/restart-studio.js +1 -1
  4. package/dist/components/AgentPrompt.d.ts +6 -0
  5. package/dist/components/AgentPrompt.js +107 -0
  6. package/dist/components/AssetFileIcon.js +2 -0
  7. package/dist/components/AssetSelectorItem.d.ts +1 -23
  8. package/dist/components/AssetSelectorItem.js +10 -200
  9. package/dist/components/Canvas.js +109 -44
  10. package/dist/components/CanvasCaptureDropHandler.js +63 -0
  11. package/dist/components/CanvasOrLoading.js +10 -2
  12. package/dist/components/CaptionInspector.js +9 -3
  13. package/dist/{error-overlay/remotion-overlay → components}/CodeFrame.d.ts +2 -0
  14. package/dist/components/CodeFrame.js +77 -0
  15. package/dist/components/CompositionSelectorItem.js +7 -17
  16. package/dist/components/CurrentAsset.js +6 -4
  17. package/dist/components/ElementInstallConfirmation.js +69 -38
  18. package/dist/components/FilePreview.js +4 -0
  19. package/dist/components/FixComputedValueModal.js +64 -96
  20. package/dist/components/GenerateWithAgentModal.d.ts +9 -0
  21. package/dist/components/GenerateWithAgentModal.js +39 -0
  22. package/dist/components/InitialCompositionLoader.js +1 -1
  23. package/dist/components/InlineDropdown.js +26 -2
  24. package/dist/components/InlineEditableTitle.js +3 -0
  25. package/dist/components/InspectorOpenInEditor.js +8 -4
  26. package/dist/components/InspectorPanel/CollapsibleInspectorSection.d.ts +7 -0
  27. package/dist/components/InspectorPanel/CollapsibleInspectorSection.js +14 -0
  28. package/dist/components/InspectorPanel/CollapsibleInspectorSectionHeader.d.ts +1 -1
  29. package/dist/components/InspectorPanel/CollapsibleInspectorSectionHeader.js +20 -8
  30. package/dist/components/InspectorPanel/CompositionInspector.js +32 -15
  31. package/dist/components/InspectorPanel/CompositionMetadata.js +7 -0
  32. package/dist/components/InspectorPanel/ConnectedCompositionsSection.js +6 -12
  33. package/dist/components/InspectorPanel/ElementLibraryButton.js +2 -0
  34. package/dist/components/InspectorPanel/GuideInspector.js +2 -3
  35. package/dist/components/InspectorPanel/KeyframeSettings.js +5 -6
  36. package/dist/components/InspectorPanel/MultiSequenceInspector.js +34 -2
  37. package/dist/components/InspectorPanel/SequenceSelectionInspector.js +45 -4
  38. package/dist/components/InspectorPanel/common.d.ts +4 -0
  39. package/dist/components/InspectorPanel/common.js +15 -2
  40. package/dist/components/InspectorPanel/styles.d.ts +0 -3
  41. package/dist/components/InspectorPanel/styles.js +3 -27
  42. package/dist/components/InspectorPanel/use-composition-actions.d.ts +2 -0
  43. package/dist/components/InspectorPanel/use-composition-actions.js +16 -0
  44. package/dist/components/InspectorPanel/use-inspector-section-expanded.d.ts +1 -0
  45. package/dist/components/InspectorPanel/use-inspector-section-expanded.js +21 -0
  46. package/dist/components/InspectorSequenceSection.js +44 -35
  47. package/dist/components/InspectorSourceLocation.js +4 -0
  48. package/dist/components/KeyboardShortcutsSettings.js +12 -4
  49. package/dist/components/LutPreview.d.ts +4 -0
  50. package/dist/components/LutPreview.js +192 -0
  51. package/dist/components/MenuBuildIndicator.js +1 -0
  52. package/dist/components/MenuCompositionName.js +4 -9
  53. package/dist/components/Modals.js +3 -6
  54. package/dist/components/ModelsSettings.js +15 -4
  55. package/dist/components/NewComposition/CancelButton.js +1 -1
  56. package/dist/components/Notifications/NotificationCenter.d.ts +0 -1
  57. package/dist/components/Notifications/NotificationCenter.js +1 -22
  58. package/dist/components/Preview.js +3 -0
  59. package/dist/components/QuickSwitcher/ExplorerQuickSwitcherTrigger.js +1 -0
  60. package/dist/components/QuickSwitcher/QuickSwitcherContent.js +1 -0
  61. package/dist/components/QuickSwitcher/QuickSwitcherResult.js +4 -9
  62. package/dist/components/RadioButton.js +1 -0
  63. package/dist/components/RenderModal/DataEditor.js +4 -1
  64. package/dist/components/RenderModal/SchemaEditor/scroll-to-default-props-path.d.ts +1 -0
  65. package/dist/components/RenderModal/SchemaEditor/scroll-to-default-props-path.js +2 -1
  66. package/dist/components/RenderModal/WebRenderModal.js +10 -2
  67. package/dist/components/RenderQueue/CaptionQueueItem.js +5 -2
  68. package/dist/components/RenderQueue/CaptionQueueProcessor.js +35 -8
  69. package/dist/components/RenderQueue/VideoMattingQueueItem.js +1 -0
  70. package/dist/components/RenderQueue/caption-job-types.d.ts +6 -0
  71. package/dist/components/RenderQueue/index.js +1 -0
  72. package/dist/components/RendersTab.js +4 -0
  73. package/dist/components/SelectedOutlineElement.js +6 -0
  74. package/dist/components/SelectedOutlineSnapIndicators.d.ts +6 -0
  75. package/dist/components/SelectedOutlineSnapIndicators.js +16 -12
  76. package/dist/components/SequencePropsSubscriptionProvider.d.ts +3 -0
  77. package/dist/components/SequencePropsSubscriptionProvider.js +8 -6
  78. package/dist/components/SettingsButton.js +11 -2
  79. package/dist/components/SettingsModal.d.ts +1 -2
  80. package/dist/components/SettingsModal.js +24 -6
  81. package/dist/components/SettingsModalFooter.js +17 -3
  82. package/dist/components/SkillsSettings.d.ts +5 -0
  83. package/dist/components/SkillsSettings.js +29 -26
  84. package/dist/components/Timeline/Timeline.js +10 -11
  85. package/dist/components/Timeline/TimelineAssetField.js +81 -51
  86. package/dist/components/Timeline/TimelineDeleteKeybindings.js +6 -9
  87. package/dist/components/Timeline/TimelineEffectItem.js +1 -0
  88. package/dist/components/Timeline/TimelineExpandArrowButton.js +1 -0
  89. package/dist/components/Timeline/TimelineExpandedRow.js +1 -0
  90. package/dist/components/Timeline/TimelineFieldLabel.js +1 -0
  91. package/dist/components/Timeline/TimelineHeightContainer.js +11 -1
  92. package/dist/components/Timeline/TimelineKeyframeControls.js +16 -1
  93. package/dist/components/Timeline/TimelineLayerChildren.d.ts +3 -3
  94. package/dist/components/Timeline/TimelineLayerChildren.js +11 -9
  95. package/dist/components/Timeline/TimelineLayerEye.d.ts +1 -1
  96. package/dist/components/Timeline/TimelineLayerEye.js +6 -3
  97. package/dist/components/Timeline/TimelineList.js +9 -3
  98. package/dist/components/Timeline/TimelineSchemaField.js +2 -6
  99. package/dist/components/Timeline/TimelineSelection.d.ts +14 -3
  100. package/dist/components/Timeline/TimelineSelection.js +91 -49
  101. package/dist/components/Timeline/TimelineSequence.js +28 -2
  102. package/dist/components/Timeline/TimelineSequenceFrame.js +1 -0
  103. package/dist/components/Timeline/TimelineSequenceItem.d.ts +2 -0
  104. package/dist/components/Timeline/TimelineSequenceItem.js +45 -13
  105. package/dist/components/Timeline/TimelineViewport.d.ts +1 -0
  106. package/dist/components/Timeline/TimelineViewport.js +10 -1
  107. package/dist/components/Timeline/TimelineVirtualization.d.ts +3 -3
  108. package/dist/components/Timeline/delete-selected-timeline-item.js +2 -2
  109. package/dist/components/Timeline/get-sequence-context-menu-items.d.ts +6 -2
  110. package/dist/components/Timeline/get-sequence-context-menu-items.js +143 -46
  111. package/dist/components/Timeline/normalize-font-weight-for-keyframe.d.ts +1 -0
  112. package/dist/components/Timeline/normalize-font-weight-for-keyframe.js +19 -0
  113. package/dist/components/Timeline/split-selected-timeline-item.d.ts +13 -10
  114. package/dist/components/Timeline/split-selected-timeline-item.js +58 -35
  115. package/dist/components/Timeline/timeline-display-groups.d.ts +9 -0
  116. package/dist/components/Timeline/timeline-display-groups.js +66 -0
  117. package/dist/components/Timeline/use-timeline-asset-drop.js +21 -21
  118. package/dist/components/Timeline/use-timeline-expanded-tree.d.ts +2 -1
  119. package/dist/components/Timeline/use-timeline-expanded-tree.js +1 -2
  120. package/dist/components/TimelineCombobox.js +1 -0
  121. package/dist/components/Transcription/TranscriptionModal.js +16 -11
  122. package/dist/components/Transcription/TranscriptionModalWithOptionalWhisper.js +1 -1
  123. package/dist/components/UpdateStatusContext.d.ts +2 -2
  124. package/dist/components/UpdateStatusContext.js +6 -7
  125. package/dist/components/UpdatesSettings.js +6 -6
  126. package/dist/components/WebMcp.js +41 -41
  127. package/dist/components/asset-context-menu.d.ts +32 -0
  128. package/dist/components/asset-context-menu.js +242 -0
  129. package/dist/components/composition-drop-preview.d.ts +9 -2
  130. package/dist/components/composition-drop-preview.js +7 -4
  131. package/dist/components/composition-menu-items.d.ts +4 -6
  132. package/dist/components/composition-menu-items.js +191 -75
  133. package/dist/components/delete-jsx-nodes-api.d.ts +2 -0
  134. package/dist/components/{delete-jsx-node-api.js → delete-jsx-nodes-api.js} +5 -5
  135. package/dist/components/get-open-in-menu-items.d.ts +6 -5
  136. package/dist/components/get-open-in-menu-items.js +22 -16
  137. package/dist/components/keyboard-shortcuts.d.ts +4 -4
  138. package/dist/components/keyboard-shortcuts.js +3 -1
  139. package/dist/components/public-output-name.d.ts +1 -0
  140. package/dist/components/public-output-name.js +7 -3
  141. package/dist/components/selected-outline-order.js +18 -12
  142. package/dist/components/use-open-in-menu-apps.d.ts +14 -0
  143. package/dist/components/use-open-in-menu-apps.js +33 -0
  144. package/dist/error-overlay/remotion-overlay/ErrorDisplay.js +2 -2
  145. package/dist/error-overlay/remotion-overlay/OpenInEditor.d.ts +1 -0
  146. package/dist/error-overlay/remotion-overlay/OpenInEditor.js +3 -3
  147. package/dist/error-overlay/remotion-overlay/StackFrame.d.ts +5 -1
  148. package/dist/error-overlay/remotion-overlay/StackFrame.js +26 -19
  149. package/dist/esm/{CaptionQueueProcessor-k0yrm3dj.mjs → CaptionQueueProcessor-npa6szn1.mjs} +39 -8
  150. package/dist/esm/{LazyModels-gfmpcy4h.mjs → LazyModels-nh3c8h9p.mjs} +4 -3
  151. package/dist/esm/{LazyModels-m1rf06wh.mjs → LazyModels-rr5v8h5y.mjs} +4 -3
  152. package/dist/esm/{TranscriptionModal-8pvrehg4.mjs → TranscriptionModal-79m5wgcj.mjs} +25 -17
  153. package/dist/esm/{VideoMattingModal-fefbzgka.mjs → VideoMattingModal-31pew0xj.mjs} +9 -6
  154. package/dist/esm/index-21hxsfaa.mjs +239 -0
  155. package/dist/esm/{index-s848rffx.mjs → index-4zen9prq.mjs} +5438 -4686
  156. package/dist/esm/index-5t2dwxsk.mjs +530 -0
  157. package/dist/esm/{index-vsxrxfpj.mjs → index-614tdz2q.mjs} +1 -1
  158. package/dist/esm/{index-0x13f28h.mjs → index-9xxg6218.mjs} +20 -541
  159. package/dist/esm/{index-hbezgbbq.mjs → index-ac5550e7.mjs} +1 -1
  160. package/dist/esm/{index-41kqns5c.mjs → index-e855w59j.mjs} +15 -92
  161. package/dist/esm/{index-tzxb8808.mjs → index-n5gmcvhz.mjs} +8 -8
  162. package/dist/esm/{index-ggqpre9v.mjs → index-ppspzgn9.mjs} +4963 -4178
  163. package/dist/esm/{index-jrw61pkj.mjs → index-r0ejh5sy.mjs} +1 -1
  164. package/dist/esm/index-r1gr3j3a.mjs +80 -0
  165. package/dist/esm/{index-mww32xc8.mjs → index-s7qa3xbw.mjs} +6 -4
  166. package/dist/esm/{index-1089795y.mjs → index-vxwg66ar.mjs} +7 -22
  167. package/dist/esm/index.mjs +13 -6
  168. package/dist/esm/internals.mjs +10 -7
  169. package/dist/esm/previewEntry.mjs +10 -7
  170. package/dist/esm/{resolve-composition-component-location-bt2d6qxq.mjs → resolve-composition-component-location-qrp05g62.mjs} +1 -1
  171. package/dist/helpers/client-id.d.ts +1 -0
  172. package/dist/helpers/client-id.js +8 -4
  173. package/dist/helpers/copy-text.js +1 -16
  174. package/dist/helpers/cube-lut.d.ts +12 -0
  175. package/dist/helpers/cube-lut.js +160 -0
  176. package/dist/helpers/get-preview-file-type.d.ts +1 -1
  177. package/dist/helpers/get-preview-file-type.js +3 -0
  178. package/dist/helpers/hoverable.js +2 -1
  179. package/dist/helpers/open-in-editor.d.ts +5 -2
  180. package/dist/helpers/open-in-editor.js +13 -5
  181. package/dist/helpers/settings-tab-availability.d.ts +14 -0
  182. package/dist/helpers/settings-tab-availability.js +35 -0
  183. package/dist/helpers/studio-runtime-config.d.ts +1 -1
  184. package/dist/helpers/use-keybinding.d.ts +1 -1
  185. package/dist/helpers/use-keyboard-shortcut-label.d.ts +2 -2
  186. package/dist/helpers/use-menu-structure.js +31 -21
  187. package/dist/icons/lut.d.ts +4 -0
  188. package/dist/icons/lut.js +6 -0
  189. package/dist/icons/sparkles.d.ts +4 -0
  190. package/dist/icons/sparkles.js +6 -0
  191. package/dist/state/modals.d.ts +17 -2
  192. package/dist/state/timeline-zoom.js +4 -0
  193. package/package.json +19 -19
  194. package/dist/components/delete-jsx-node-api.d.ts +0 -2
  195. package/dist/error-overlay/remotion-overlay/CodeFrame.js +0 -62
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.normalizeFontWeightForKeyframe = void 0;
4
+ const normalizeFontWeightForKeyframe = (value) => {
5
+ if (value === 'normal') {
6
+ return 400;
7
+ }
8
+ if (value === 'bold') {
9
+ return 700;
10
+ }
11
+ if (typeof value === 'number') {
12
+ return Number.isFinite(value) ? value : null;
13
+ }
14
+ if (typeof value === 'string' && /^\d+(?:\.\d+)?$/.test(value)) {
15
+ return Number(value);
16
+ }
17
+ return null;
18
+ };
19
+ exports.normalizeFontWeightForKeyframe = normalizeFontWeightForKeyframe;
@@ -17,20 +17,23 @@ export declare const splitTimelineSequenceFromSource: ({ nodePathInfo, splitFram
17
17
  nodePathInfo: SequenceNodePathInfo;
18
18
  splitFrame: number;
19
19
  }) => Promise<boolean>;
20
- export declare const shouldHandleTimelineDuplicateShortcut: ({ shiftKey, }: {
21
- readonly shiftKey: boolean;
22
- }) => boolean;
23
- export declare const shouldHandleTimelineSplitShortcut: ({ shiftKey, }: {
24
- readonly shiftKey: boolean;
25
- }) => boolean;
26
- export declare const splitSelectedTimelineItems: ({ selections, sequences, overrideIdsToNodePaths, propStatuses, splitFrame, splitSequence, }: {
20
+ export declare const splitTimelineSequencesFromSource: ({ sequences, }: {
21
+ sequences: {
22
+ nodePathInfo: SequenceNodePathInfo;
23
+ splitFrame: number;
24
+ }[];
25
+ }) => Promise<boolean>;
26
+ export declare const splitSelectedTimelineItems: ({ selections, sequences, overrideIdsToNodePaths, propStatuses, splitFrame, splitSequences, notify, }: {
27
27
  selections: readonly import("@remotion/canvas").CanvasSelectionItem[];
28
28
  sequences: TSequence[];
29
29
  overrideIdsToNodePaths: OverrideIdToNodePaths;
30
30
  propStatuses: PropStatuses | undefined;
31
31
  splitFrame: number;
32
- splitSequence?: ((options: {
33
- nodePathInfo: SequenceNodePathInfo;
34
- splitFrame: number;
32
+ splitSequences?: ((options: {
33
+ sequences: {
34
+ nodePathInfo: SequenceNodePathInfo;
35
+ splitFrame: number;
36
+ }[];
35
37
  }) => Promise<boolean>) | undefined;
38
+ notify?: ((message: string, durationInMs: number) => void) | undefined;
36
39
  }) => Promise<boolean> | null;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.splitSelectedTimelineItems = exports.shouldHandleTimelineSplitShortcut = exports.shouldHandleTimelineDuplicateShortcut = exports.splitTimelineSequenceFromSource = exports.getTimelineSequenceSplitEligibility = void 0;
3
+ exports.splitSelectedTimelineItems = exports.splitTimelineSequencesFromSource = exports.splitTimelineSequenceFromSource = exports.getTimelineSequenceSplitEligibility = void 0;
4
4
  const studio_shared_1 = require("@remotion/studio-shared");
5
5
  const remotion_1 = require("remotion");
6
6
  const NotificationCenter_1 = require("../Notifications/NotificationCenter");
@@ -88,12 +88,22 @@ const getTimelineSequenceSplitEligibility = ({ selection, sequence, splitFrame,
88
88
  };
89
89
  exports.getTimelineSequenceSplitEligibility = getTimelineSequenceSplitEligibility;
90
90
  const splitTimelineSequenceFromSource = ({ nodePathInfo, splitFrame, }) => {
91
- const nodePath = nodePathInfo.sequenceSubscriptionKey;
91
+ return (0, exports.splitTimelineSequencesFromSource)({
92
+ sequences: [{ nodePathInfo, splitFrame }],
93
+ });
94
+ };
95
+ exports.splitTimelineSequenceFromSource = splitTimelineSequenceFromSource;
96
+ const splitTimelineSequencesFromSource = ({ sequences, }) => {
92
97
  return (0, split_jsx_sequence_api_1.splitJsxSequence)({
93
- fileName: nodePath.absolutePath,
94
- nodePath: nodePath.nodePath,
95
- sequenceKeys: nodePath.sequenceKeys,
96
- splitFrame,
98
+ sequences: sequences.map(({ nodePathInfo, splitFrame }) => {
99
+ const nodePath = nodePathInfo.sequenceSubscriptionKey;
100
+ return {
101
+ fileName: nodePath.absolutePath,
102
+ nodePath: nodePath.nodePath,
103
+ sequenceKeys: nodePath.sequenceKeys,
104
+ splitFrame,
105
+ };
106
+ }),
97
107
  })
98
108
  .then((result) => {
99
109
  if (result.success) {
@@ -107,41 +117,54 @@ const splitTimelineSequenceFromSource = ({ nodePathInfo, splitFrame, }) => {
107
117
  return false;
108
118
  });
109
119
  };
110
- exports.splitTimelineSequenceFromSource = splitTimelineSequenceFromSource;
111
- const shouldHandleTimelineDuplicateShortcut = ({ shiftKey, }) => !shiftKey;
112
- exports.shouldHandleTimelineDuplicateShortcut = shouldHandleTimelineDuplicateShortcut;
113
- const shouldHandleTimelineSplitShortcut = ({ shiftKey, }) => shiftKey;
114
- exports.shouldHandleTimelineSplitShortcut = shouldHandleTimelineSplitShortcut;
115
- const splitSelectedTimelineItems = ({ selections, sequences, overrideIdsToNodePaths, propStatuses, splitFrame, splitSequence = exports.splitTimelineSequenceFromSource, }) => {
120
+ exports.splitTimelineSequencesFromSource = splitTimelineSequencesFromSource;
121
+ const splitSelectedTimelineItems = ({ selections, sequences, overrideIdsToNodePaths, propStatuses, splitFrame, splitSequences = exports.splitTimelineSequencesFromSource, notify = NotificationCenter_1.showNotification, }) => {
116
122
  var _a;
117
- if (selections.length !== 1) {
123
+ if (selections.length === 0 ||
124
+ selections.some((selection) => selection.type !== 'sequence')) {
118
125
  return null;
119
126
  }
120
- const [selection] = selections;
121
- if (selection.type !== 'sequence') {
122
- return null;
127
+ const eligible = [];
128
+ const skippedReasons = [];
129
+ for (const selection of selections) {
130
+ if (selection.type !== 'sequence') {
131
+ continue;
132
+ }
133
+ const track = (0, find_track_for_node_path_info_1.findTrackForNodePathInfo)({
134
+ sequences,
135
+ overrideIdsToNodePaths,
136
+ nodePathInfo: selection.nodePathInfo,
137
+ });
138
+ const sequencePropStatuses = propStatuses
139
+ ? remotion_1.Internals.getPropStatusesCtx(propStatuses, selection.nodePathInfo.sequenceSubscriptionKey)
140
+ : undefined;
141
+ const eligibility = (0, exports.getTimelineSequenceSplitEligibility)({
142
+ selection,
143
+ sequence: (_a = track === null || track === void 0 ? void 0 : track.sequence) !== null && _a !== void 0 ? _a : null,
144
+ splitFrame,
145
+ propStatuses: sequencePropStatuses,
146
+ });
147
+ if (eligibility.canSplit) {
148
+ eligible.push({
149
+ nodePathInfo: eligibility.nodePathInfo,
150
+ splitFrame,
151
+ });
152
+ }
153
+ else {
154
+ skippedReasons.push(eligibility.reason);
155
+ }
123
156
  }
124
- const track = (0, find_track_for_node_path_info_1.findTrackForNodePathInfo)({
125
- sequences,
126
- overrideIdsToNodePaths,
127
- nodePathInfo: selection.nodePathInfo,
128
- });
129
- const sequencePropStatuses = propStatuses
130
- ? remotion_1.Internals.getPropStatusesCtx(propStatuses, selection.nodePathInfo.sequenceSubscriptionKey)
131
- : undefined;
132
- const eligibility = (0, exports.getTimelineSequenceSplitEligibility)({
133
- selection,
134
- sequence: (_a = track === null || track === void 0 ? void 0 : track.sequence) !== null && _a !== void 0 ? _a : null,
135
- splitFrame,
136
- propStatuses: sequencePropStatuses,
137
- });
138
- if (!eligibility.canSplit) {
139
- (0, NotificationCenter_1.showNotification)(eligibility.reason, 4000);
157
+ if (eligible.length === 0) {
158
+ notify(selections.length === 1
159
+ ? skippedReasons[0]
160
+ : `None of the ${selections.length} selected clips can be split at the playhead`, 4000);
140
161
  return Promise.resolve(false);
141
162
  }
142
- return splitSequence({
143
- nodePathInfo: eligibility.nodePathInfo,
144
- splitFrame,
163
+ return splitSequences({ sequences: eligible }).then((success) => {
164
+ if (success && skippedReasons.length > 0) {
165
+ notify(`Split ${eligible.length} ${eligible.length === 1 ? 'clip' : 'clips'}. Skipped ${skippedReasons.length} ${skippedReasons.length === 1 ? 'clip' : 'clips'} that could not be split.`, 4000);
166
+ }
167
+ return success;
145
168
  });
146
169
  };
147
170
  exports.splitSelectedTimelineItems = splitSelectedTimelineItems;
@@ -0,0 +1,9 @@
1
+ import type { TimelineTrackData } from '../../helpers/get-timeline-sequence-sort-key';
2
+ export type TimelineDisplayGroup = {
3
+ readonly key: string;
4
+ readonly numberOfSequences: number;
5
+ };
6
+ export type TimelineTrackWithDisplayGroup = TimelineTrackData & {
7
+ readonly displayGroup: TimelineDisplayGroup | null;
8
+ };
9
+ export declare const addTimelineDisplayGroups: (tracks: readonly TimelineTrackData[]) => TimelineTrackWithDisplayGroup[];
@@ -0,0 +1,66 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.addTimelineDisplayGroups = void 0;
4
+ const timeline_node_path_key_1 = require("../../helpers/timeline-node-path-key");
5
+ const addTimelineDisplayGroups = (tracks) => {
6
+ var _a, _b;
7
+ const stacksBySequenceId = new Map();
8
+ const resolvedNodePathKeysByStack = new Map();
9
+ for (const track of tracks) {
10
+ // Only controlled sequences can eventually resolve to a source node.
11
+ const stack = track.sequence.controls === null ? null : track.sequence.getStack();
12
+ stacksBySequenceId.set(track.sequence.id, stack);
13
+ if (stack === null || track.nodePathInfo === null) {
14
+ continue;
15
+ }
16
+ const nodePathKey = `node-path:${(0, timeline_node_path_key_1.timelineSequenceNodePathToKey)(track.nodePathInfo.sequenceSubscriptionKey)}`;
17
+ const nodePathKeys = (_a = resolvedNodePathKeysByStack.get(stack)) !== null && _a !== void 0 ? _a : new Set();
18
+ nodePathKeys.add(nodePathKey);
19
+ resolvedNodePathKeysByStack.set(stack, nodePathKeys);
20
+ }
21
+ const displayKeys = tracks.map((track) => {
22
+ var _a;
23
+ if (track.nodePathInfo !== null) {
24
+ return `node-path:${(0, timeline_node_path_key_1.timelineSequenceNodePathToKey)(track.nodePathInfo.sequenceSubscriptionKey)}`;
25
+ }
26
+ const stack = (_a = stacksBySequenceId.get(track.sequence.id)) !== null && _a !== void 0 ? _a : null;
27
+ if (stack === null) {
28
+ return null;
29
+ }
30
+ const resolvedNodePathKeys = resolvedNodePathKeysByStack.get(stack);
31
+ if ((resolvedNodePathKeys === null || resolvedNodePathKeys === void 0 ? void 0 : resolvedNodePathKeys.size) === 1) {
32
+ const resolvedNodePathKey = resolvedNodePathKeys.values().next().value;
33
+ if (resolvedNodePathKey === undefined) {
34
+ throw new Error('Expected a resolved timeline node path key');
35
+ }
36
+ return resolvedNodePathKey;
37
+ }
38
+ // This identity is display-only. Source operations continue to require
39
+ // track.nodePathInfo.
40
+ return `stack:${stack}`;
41
+ });
42
+ const counts = new Map();
43
+ for (const key of displayKeys) {
44
+ if (key !== null) {
45
+ counts.set(key, ((_b = counts.get(key)) !== null && _b !== void 0 ? _b : 0) + 1);
46
+ }
47
+ }
48
+ return tracks.map((track, index) => {
49
+ const key = displayKeys[index];
50
+ if (key === null) {
51
+ return { ...track, displayGroup: null };
52
+ }
53
+ const numberOfSequences = counts.get(key);
54
+ if (numberOfSequences === undefined) {
55
+ throw new Error('Expected a timeline display group count');
56
+ }
57
+ return {
58
+ ...track,
59
+ displayGroup: {
60
+ key,
61
+ numberOfSequences,
62
+ },
63
+ };
64
+ });
65
+ };
66
+ exports.addTimelineDisplayGroups = addTimelineDisplayGroups;
@@ -10,6 +10,7 @@ const modals_1 = require("../../state/modals");
10
10
  const canvas_capture_drop_1 = require("../canvas-capture-drop");
11
11
  const drop_handler_data_1 = require("../drop-handler-data");
12
12
  const effect_drag_and_drop_1 = require("../effect-drag-and-drop");
13
+ const element_drag_and_drop_1 = require("../element-drag-and-drop");
13
14
  const handle_drop_1 = require("../handle-drop");
14
15
  const NotificationCenter_1 = require("../Notifications/NotificationCenter");
15
16
  const SvgImportDialog_1 = require("../SvgImportDialog");
@@ -29,7 +30,6 @@ const useTimelineAssetDrop = () => {
29
30
  const { previewServerState } = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx);
30
31
  const [isAddingAsset, setIsAddingAsset] = (0, react_1.useState)(false);
31
32
  const [assetDropFrame, setAssetDropFrame] = (0, react_1.useState)(null);
32
- const unsupportedDropNotifiedRef = (0, react_1.useRef)(false);
33
33
  const currentCompositionId = (canvasContent === null || canvasContent === void 0 ? void 0 : canvasContent.type) === 'composition' ? canvasContent.compositionId : null;
34
34
  const currentComposition = (0, react_1.useMemo)(() => {
35
35
  var _a;
@@ -42,13 +42,13 @@ const useTimelineAssetDrop = () => {
42
42
  compositionId: currentCompositionId,
43
43
  });
44
44
  const previewInteractive = previewServerState.type === 'connected' && (0, interactivity_enabled_1.isStudioInteractivityEnabled)();
45
- const canInsertAsset = previewInteractive &&
45
+ const canReceiveElementDrop = previewInteractive &&
46
46
  !window.remotion_isReadOnlyStudio &&
47
- (compositionComponentInfo === null || compositionComponentInfo === void 0 ? void 0 : compositionComponentInfo.canAddSequence) === true &&
48
47
  currentCompositionId !== null &&
49
48
  compositionFile !== null &&
50
49
  videoConfig !== null &&
51
50
  !isAddingAsset;
51
+ const canInsertAsset = canReceiveElementDrop && (compositionComponentInfo === null || compositionComponentInfo === void 0 ? void 0 : compositionComponentInfo.canAddSequence) === true;
52
52
  const getDropFrame = (0, react_1.useCallback)((event) => {
53
53
  if (videoConfig === null) {
54
54
  return null;
@@ -72,30 +72,28 @@ const useTimelineAssetDrop = () => {
72
72
  dataTransfer === null ||
73
73
  !(0, drop_handler_data_1.isSupportedDropEvent)(event) ||
74
74
  !isEventTargetInsideElement(event, timeline)) {
75
- unsupportedDropNotifiedRef.current = false;
76
75
  setAssetDropFrame(null);
77
76
  return;
78
77
  }
79
- const mayBeCanvasCapture = (0, drop_handler_data_1.isFileDragEvent)(event) && !window.remotion_isReadOnlyStudio;
80
- const shouldNotifyAboutUnsupportedDrop = (compositionComponentInfo === null || compositionComponentInfo === void 0 ? void 0 : compositionComponentInfo.canAddSequence) === false &&
81
- !mayBeCanvasCapture;
82
- if (shouldNotifyAboutUnsupportedDrop &&
83
- !unsupportedDropNotifiedRef.current) {
84
- (0, NotificationCenter_1.showCannotAddSequenceDropNotification)();
85
- }
86
- unsupportedDropNotifiedRef.current = shouldNotifyAboutUnsupportedDrop;
78
+ const canDropElementIntoNewComposition = (compositionComponentInfo === null || compositionComponentInfo === void 0 ? void 0 : compositionComponentInfo.canAddSequence) === false &&
79
+ canReceiveElementDrop &&
80
+ (0, element_drag_and_drop_1.hasElementDragType)(dataTransfer);
87
81
  event.preventDefault();
88
82
  event.stopPropagation();
89
- dataTransfer.dropEffect = canInsertAsset ? 'copy' : 'none';
83
+ dataTransfer.dropEffect =
84
+ canInsertAsset || canDropElementIntoNewComposition ? 'copy' : 'none';
90
85
  const scrollable = timeline_refs_1.scrollableRef.current;
91
86
  const shouldShowDropFrame = canInsertAsset &&
92
87
  scrollable !== null &&
93
88
  isEventTargetInsideElement(event, scrollable);
94
89
  setAssetDropFrame(shouldShowDropFrame ? getDropFrame(event) : null);
95
- }, [canInsertAsset, compositionComponentInfo === null || compositionComponentInfo === void 0 ? void 0 : compositionComponentInfo.canAddSequence, getDropFrame]);
90
+ }, [
91
+ canInsertAsset,
92
+ canReceiveElementDrop,
93
+ compositionComponentInfo === null || compositionComponentInfo === void 0 ? void 0 : compositionComponentInfo.canAddSequence,
94
+ getDropFrame,
95
+ ]);
96
96
  const onAssetDrop = (0, react_1.useCallback)(async (event) => {
97
- const unsupportedDropWasNotified = unsupportedDropNotifiedRef.current;
98
- unsupportedDropNotifiedRef.current = false;
99
97
  setAssetDropFrame(null);
100
98
  const timeline = timeline_refs_1.timelineVerticalScroll.current;
101
99
  const { dataTransfer } = event;
@@ -130,13 +128,15 @@ const useTimelineAssetDrop = () => {
130
128
  }
131
129
  event.preventDefault();
132
130
  event.stopPropagation();
133
- if (!canInsertAsset ||
131
+ const canDropElementIntoNewComposition = (compositionComponentInfo === null || compositionComponentInfo === void 0 ? void 0 : compositionComponentInfo.canAddSequence) === false &&
132
+ canReceiveElementDrop &&
133
+ (0, element_drag_and_drop_1.getElementDragData)(dataTransfer) !== null;
134
+ if ((!canInsertAsset && !canDropElementIntoNewComposition) ||
134
135
  currentCompositionId === null ||
135
136
  compositionFile === null ||
136
137
  videoConfig === null) {
137
- if ((compositionComponentInfo === null || compositionComponentInfo === void 0 ? void 0 : compositionComponentInfo.canAddSequence) === false &&
138
- !unsupportedDropWasNotified) {
139
- (0, NotificationCenter_1.showCannotAddSequenceDropNotification)();
138
+ if ((compositionComponentInfo === null || compositionComponentInfo === void 0 ? void 0 : compositionComponentInfo.canAddSequence) === false) {
139
+ (0, NotificationCenter_1.showNotification)('Cannot insert this item: This composition component cannot accept a new <Sequence>.', 3000);
140
140
  }
141
141
  return;
142
142
  }
@@ -170,6 +170,7 @@ const useTimelineAssetDrop = () => {
170
170
  }
171
171
  }, [
172
172
  canInsertAsset,
173
+ canReceiveElementDrop,
173
174
  chooseSvgImportMode,
174
175
  compositionComponentInfo === null || compositionComponentInfo === void 0 ? void 0 : compositionComponentInfo.canAddSequence,
175
176
  compositionFile,
@@ -179,7 +180,6 @@ const useTimelineAssetDrop = () => {
179
180
  videoConfig,
180
181
  ]);
181
182
  const clearAssetDropFrame = (0, react_1.useCallback)(() => {
182
- unsupportedDropNotifiedRef.current = false;
183
183
  setAssetDropFrame(null);
184
184
  }, []);
185
185
  (0, react_1.useEffect)(() => {
@@ -1,8 +1,9 @@
1
1
  import { type TSequence } from 'remotion';
2
2
  import type { SequenceNodePathInfo } from '../../helpers/get-timeline-sequence-sort-key';
3
- export declare const useTimelineSequenceHasExpandableContent: ({ sequence, nodePathInfo, }: {
3
+ export declare const useTimelineSequenceHasExpandableContent: ({ sequence, nodePathInfo, selectedItems, }: {
4
4
  readonly sequence: TSequence;
5
5
  readonly nodePathInfo: SequenceNodePathInfo;
6
+ readonly selectedItems: readonly import("@remotion/canvas").CanvasSelectionItem[];
6
7
  }) => boolean;
7
8
  export declare const useTimelineExpandedTree: ({ sequence, nodePathInfo, includeTextContent, includeSourceControls, }: {
8
9
  readonly sequence: TSequence;
@@ -9,10 +9,9 @@ const ExpandedTracksProvider_1 = require("../ExpandedTracksProvider");
9
9
  const get_node_keyframes_1 = require("./get-node-keyframes");
10
10
  const timeline_expanded_filter_1 = require("./timeline-expanded-filter");
11
11
  const TimelineSelection_1 = require("./TimelineSelection");
12
- const useTimelineSequenceHasExpandableContent = ({ sequence, nodePathInfo, }) => {
12
+ const useTimelineSequenceHasExpandableContent = ({ sequence, nodePathInfo, selectedItems, }) => {
13
13
  const { propStatuses: visualModePropStatuses } = (0, react_1.useContext)(remotion_1.Internals.VisualModePropStatusesContext);
14
14
  const { getDragOverrides, getEffectDragOverrides } = (0, react_1.useContext)(remotion_1.Internals.VisualModeDragOverridesContext);
15
- const { selectedItems } = (0, TimelineSelection_1.useTimelineSelection)();
16
15
  const selectedRowKeys = (0, react_1.useMemo)(() => (0, timeline_expanded_filter_1.getSelectedTimelineExpandedRowKeys)(selectedItems), [selectedItems]);
17
16
  const selectHasExpandableContent = (0, react_1.useCallback)((runtimeValues) => {
18
17
  const tree = (0, timeline_layout_1.buildTimelineTree)({
@@ -20,6 +20,7 @@ const label = {
20
20
  textAlign: 'left',
21
21
  textOverflow: 'ellipsis',
22
22
  userSelect: 'none',
23
+ WebkitUserSelect: 'none',
23
24
  whiteSpace: 'nowrap',
24
25
  };
25
26
  const TimelineCombobox = ({ values, selectedId, title, tooltipDelay, labelWidth = 32, renderLeftItem, unhoveredIconColor = colors_1.LIGHT_TEXT, }) => {
@@ -280,7 +280,7 @@ const AdvancedSettings = ({ chunkLengthInSeconds, doSample, forceFullSequences,
280
280
  title: 'Learn more about No-repeat n-gram size',
281
281
  }, min: 0, name: "No-repeat n-gram size", onValueChanged: setNoRepeatNgramSize, step: 1, value: noRepeatNgramSize })] }), decodingValidationMessage ? (jsx_runtime_1.jsx("div", { id: TRANSCRIPTION_DECODING_MESSAGE_ID, "aria-live": "polite", style: { padding: '0 16px' }, children: jsx_runtime_1.jsx(ValidationMessage_1.ValidationMessage, { align: "flex-end", message: decodingValidationMessage, type: "error" }) })) : null] }));
282
282
  };
283
- const TranscriptionModal = ({ audioStreamIndex, displayName, requestInit, src, }) => {
283
+ const TranscriptionModal = ({ audioStreamIndex, displayName, requestInit, src, target, }) => {
284
284
  var _a, _b, _c;
285
285
  const [tab, setTab] = (0, react_1.useState)('transcribe');
286
286
  const isModelCached = (0, react_1.useCallback)((model) => (0, whisper_webgpu_1.isWhisperModelCached)({ model }), []);
@@ -323,11 +323,14 @@ const TranscriptionModal = ({ audioStreamIndex, displayName, requestInit, src, }
323
323
  };
324
324
  }, []);
325
325
  const normalizedOutName = outName.normalize('NFC').toLowerCase();
326
- const queuedOutputExists = captionJobs.some((job) => (job.status === 'idle' || job.status === 'running') &&
326
+ const queuedOutputExists = captionJobs.some((job) => job.target === null &&
327
+ (job.status === 'idle' || job.status === 'running') &&
327
328
  job.outName.normalize('NFC').toLowerCase() === normalizedOutName);
328
- const outputValidationMessage = (_a = (0, caption_output_name_1.validateCaptionOutputName)(outName)) !== null && _a !== void 0 ? _a : (queuedOutputExists
329
- ? 'Another caption job is already using this output file'
330
- : null);
329
+ const outputValidationMessage = target === null
330
+ ? ((_a = (0, caption_output_name_1.validateCaptionOutputName)(outName)) !== null && _a !== void 0 ? _a : (queuedOutputExists
331
+ ? 'Another caption job is already using this output file'
332
+ : null))
333
+ : null;
331
334
  const exists = staticFiles.some((file) => file.name.normalize('NFC').toLowerCase() === normalizedOutName);
332
335
  const chunkValidationMessage = strideLengthInSeconds * 2 >= chunkLengthInSeconds
333
336
  ? 'Stride length must be less than half of chunk length'
@@ -371,7 +374,8 @@ const TranscriptionModal = ({ audioStreamIndex, displayName, requestInit, src, }
371
374
  displayName,
372
375
  audioStreamIndex,
373
376
  requestInit,
374
- outName,
377
+ outName: target === null ? outName : 'Basic captions',
378
+ target,
375
379
  model: selectedModel,
376
380
  language: modelInfo.multilingual ? selectedLanguage : null,
377
381
  task: modelInfo.supportsTranslation ? selectedTask : 'transcribe',
@@ -398,6 +402,7 @@ const TranscriptionModal = ({ audioStreamIndex, displayName, requestInit, src, }
398
402
  forceFullSequences,
399
403
  noRepeatNgramSize,
400
404
  outName,
405
+ target,
401
406
  repetitionPenalty,
402
407
  requestInit,
403
408
  src,
@@ -410,17 +415,17 @@ const TranscriptionModal = ({ audioStreamIndex, displayName, requestInit, src, }
410
415
  temperature,
411
416
  topK,
412
417
  ]);
413
- return (jsx_runtime_1.jsx(DismissableModal_1.DismissableModal, { ariaLabel: `Transcribe ${displayName}`, children: jsx_runtime_1.jsxs("div", { style: transcriptionModalStyle, children: [
414
- jsx_runtime_1.jsx(ModalHeader_1.ModalHeader, { title: `Transcribe ${displayName}` }), jsx_runtime_1.jsxs("div", { style: render_modals_1.container, children: [
418
+ const title = target === null ? `Transcribe ${displayName}` : 'Generate captions';
419
+ return (jsx_runtime_1.jsx(DismissableModal_1.DismissableModal, { ariaLabel: title, children: jsx_runtime_1.jsxs("div", { style: transcriptionModalStyle, children: [
420
+ jsx_runtime_1.jsx(ModalHeader_1.ModalHeader, { title: title }), jsx_runtime_1.jsxs("div", { style: render_modals_1.container, children: [
415
421
  jsx_runtime_1.jsx("div", { style: render_modals_1.flexer }), jsx_runtime_1.jsx(Button_1.Button, { onClick: onAddToQueue, disabled: !canTranscribe, title: transcribeDisabledReason, style: {
416
422
  ...render_modals_1.buttonStyle,
417
423
  backgroundColor: canTranscribe
418
424
  ? render_modals_1.buttonStyle.backgroundColor
419
425
  : colors_1.BLUE_DISABLED,
420
- }, children: "Transcribe" })
426
+ }, children: target === null ? 'Transcribe' : 'Generate captions' })
421
427
  ] }), jsx_runtime_1.jsxs("div", { style: transcriptionLayout, children: [
422
- jsx_runtime_1.jsxs("div", { style: render_modals_1.leftSidebar, children: [jsx_runtime_1.jsx(vertical_1.VerticalTab, { autoFocus: true, style: render_modals_1.horizontalTab, selected: tab === 'transcribe', onClick: () => setTab('transcribe'), renderIcon: (color) => (jsx_runtime_1.jsx("div", { style: render_modals_1.iconContainer, children: jsx_runtime_1.jsx(transcription_1.TranscriptionIcon, { color: color, style: render_modals_1.icon }) })), children: "Transcribe" }), jsx_runtime_1.jsx(vertical_1.VerticalTab, { style: render_modals_1.horizontalTab, selected: tab === 'models', onClick: () => setTab('models'), renderIcon: (color) => (jsx_runtime_1.jsx("div", { style: render_modals_1.iconContainer, children: jsx_runtime_1.jsx(models_1.ModelsIcon, { color: color, style: render_modals_1.icon }) })), children: "Models" }), jsx_runtime_1.jsx(vertical_1.VerticalTab, { style: render_modals_1.horizontalTab, selected: tab === 'advanced', onClick: () => setTab('advanced'), renderIcon: (color) => (jsx_runtime_1.jsx("div", { style: render_modals_1.iconContainer, children: jsx_runtime_1.jsx(gear_1.GearIcon, { color: color, style: render_modals_1.icon }) })), children: "Advanced" })] }), jsx_runtime_1.jsxs("div", { style: tab === 'transcribe' ? settingsPanel : hiddenPanel, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, children: [
423
- jsx_runtime_1.jsx(OutputSettings, { exists: exists, onOutNameChange: onOutNameChange, outName: outName, validationMessage: outputValidationMessage }), jsx_runtime_1.jsx(RenderModalHr_1.RenderModalHr, {}), jsx_runtime_1.jsx(ModelSettings, { cachedModels: cachedModels, selectedLanguage: selectedLanguage, selectedModel: selectedModel, selectedTask: selectedTask, setSelectedLanguage: setSelectedLanguage, setSelectedModel: setSelectedModel, setSelectedTask: setSelectedTask, supportState: supportState })
428
+ jsx_runtime_1.jsxs("div", { style: render_modals_1.leftSidebar, children: [jsx_runtime_1.jsx(vertical_1.VerticalTab, { autoFocus: true, style: render_modals_1.horizontalTab, selected: tab === 'transcribe', onClick: () => setTab('transcribe'), renderIcon: (color) => (jsx_runtime_1.jsx("div", { style: render_modals_1.iconContainer, children: jsx_runtime_1.jsx(transcription_1.TranscriptionIcon, { color: color, style: render_modals_1.icon }) })), children: "Transcribe" }), jsx_runtime_1.jsx(vertical_1.VerticalTab, { style: render_modals_1.horizontalTab, selected: tab === 'models', onClick: () => setTab('models'), renderIcon: (color) => (jsx_runtime_1.jsx("div", { style: render_modals_1.iconContainer, children: jsx_runtime_1.jsx(models_1.ModelsIcon, { color: color, style: render_modals_1.icon }) })), children: "Models" }), jsx_runtime_1.jsx(vertical_1.VerticalTab, { style: render_modals_1.horizontalTab, selected: tab === 'advanced', onClick: () => setTab('advanced'), renderIcon: (color) => (jsx_runtime_1.jsx("div", { style: render_modals_1.iconContainer, children: jsx_runtime_1.jsx(gear_1.GearIcon, { color: color, style: render_modals_1.icon }) })), children: "Advanced" })] }), jsx_runtime_1.jsxs("div", { style: tab === 'transcribe' ? settingsPanel : hiddenPanel, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, children: [target === null ? (jsx_runtime_1.jsx(OutputSettings, { exists: exists, onOutNameChange: onOutNameChange, outName: outName, validationMessage: outputValidationMessage })) : null, target === null ? jsx_runtime_1.jsx(RenderModalHr_1.RenderModalHr, {}) : null, jsx_runtime_1.jsx(ModelSettings, { cachedModels: cachedModels, selectedLanguage: selectedLanguage, selectedModel: selectedModel, selectedTask: selectedTask, setSelectedLanguage: setSelectedLanguage, setSelectedModel: setSelectedModel, setSelectedTask: setSelectedTask, supportState: supportState })
424
429
  ] }), jsx_runtime_1.jsx("div", { style: tab === 'advanced' ? advancedPanel : hiddenPanel, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, children: jsx_runtime_1.jsx(AdvancedSettings, { chunkLengthInSeconds: chunkLengthInSeconds, decodingValidationMessage: decodingValidationMessage, doSample: doSample, forceFullSequences: forceFullSequences, noRepeatNgramSize: noRepeatNgramSize, repetitionPenalty: repetitionPenalty, setChunkLengthInSeconds: setChunkLengthInSeconds, setDoSample: setDoSample, setForceFullSequences: setForceFullSequences, setNoRepeatNgramSize: setNoRepeatNgramSize, setRepetitionPenalty: setRepetitionPenalty, setStrideLengthInSeconds: setStrideLengthInSeconds, setTemperature: setTemperature, setTopK: setTopK, strideLengthInSeconds: strideLengthInSeconds, temperature: temperature, topK: topK, validationMessage: chunkValidationMessage }) }), jsx_runtime_1.jsx(Models_1.Models, { description: 'Models are downloaded automatically when needed.\nYou can also manage the browser cache here.', indent: true, visible: tab === 'models' })
425
430
  ] })
426
431
  ] }) }));
@@ -43,6 +43,6 @@ const LazyTranscriptionModal = react_1.default.lazy(async () => {
43
43
  return { default: TranscriptionModal };
44
44
  });
45
45
  const TranscriptionModalWithOptionalWhisper = ({ state }) => {
46
- return (jsx_runtime_1.jsx(OptionalPackageModal_1.OptionalPackageModal, { ariaLabel: "Install transcription package", packageName: whisper_webgpu_capability_1.WHISPER_WEBGPU_PACKAGE, title: "Transcribe", children: jsx_runtime_1.jsx(react_1.Suspense, { fallback: null, children: jsx_runtime_1.jsx(LazyTranscriptionModal, { ...state }) }) }));
46
+ return (jsx_runtime_1.jsx(OptionalPackageModal_1.OptionalPackageModal, { ariaLabel: "Install transcription package", packageName: whisper_webgpu_capability_1.WHISPER_WEBGPU_PACKAGE, title: state.target === null ? 'Transcribe' : 'Generate captions', children: jsx_runtime_1.jsx(react_1.Suspense, { fallback: null, children: jsx_runtime_1.jsx(LazyTranscriptionModal, { ...state }) }) }));
47
47
  };
48
48
  exports.TranscriptionModalWithOptionalWhisper = TranscriptionModalWithOptionalWhisper;
@@ -6,12 +6,12 @@ export type Bug = {
6
6
  link: string;
7
7
  versions: string[];
8
8
  };
9
- type UpgradeState = 'idle' | 'upgrading' | 'upgraded' | 'shutting-down' | 'shutdown';
9
+ type UpgradeState = 'idle' | 'upgrading' | 'upgraded' | 'restarting';
10
10
  type UpdateStatusContextValue = {
11
11
  readonly upgradeState: UpgradeState;
12
12
  readonly upgradeError: string | null;
13
13
  readonly upgrade: (version: string) => Promise<void>;
14
- readonly shutdown: () => Promise<void>;
14
+ readonly restart: () => Promise<void>;
15
15
  readonly error: string | null;
16
16
  readonly info: UpdateAvailableResponse | null;
17
17
  readonly knownBugs: Bug[] | null;
@@ -4,7 +4,7 @@ exports.useUpdateStatus = exports.UpdateStatusProvider = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const react_1 = require("react");
6
6
  const remotion_1 = require("remotion");
7
- const shut_down_studio_1 = require("../api/shut-down-studio");
7
+ const restart_studio_1 = require("../api/restart-studio");
8
8
  const browser_studio_operations_1 = require("../helpers/browser-studio-operations");
9
9
  const can_show_updates_1 = require("../helpers/can-show-updates");
10
10
  const client_id_1 = require("../helpers/client-id");
@@ -35,16 +35,15 @@ const UpdateStatusProvider = ({ children }) => {
35
35
  busy.current = false;
36
36
  }
37
37
  }, []);
38
- const shutdown = (0, react_1.useCallback)(async () => {
38
+ const restart = (0, react_1.useCallback)(async () => {
39
39
  if (busy.current) {
40
40
  return;
41
41
  }
42
42
  busy.current = true;
43
- setUpgradeState('shutting-down');
43
+ setUpgradeState('restarting');
44
44
  setUpgradeError(null);
45
45
  try {
46
- await (0, shut_down_studio_1.shutDownStudio)();
47
- setUpgradeState('shutdown');
46
+ await (0, restart_studio_1.restartStudio)();
48
47
  }
49
48
  catch (err) {
50
49
  setUpgradeError(err.message);
@@ -109,9 +108,9 @@ const UpdateStatusProvider = ({ children }) => {
109
108
  upgradeState,
110
109
  upgradeError,
111
110
  upgrade,
112
- shutdown,
111
+ restart,
113
112
  };
114
- }, [error, info, knownBugs, upgradeState, upgradeError, upgrade, shutdown]);
113
+ }, [error, info, knownBugs, upgradeState, upgradeError, upgrade, restart]);
115
114
  return (jsx_runtime_1.jsx(UpdateStatusContext.Provider, { value: value, children: children }));
116
115
  };
117
116
  exports.UpdateStatusProvider = UpdateStatusProvider;
@@ -173,7 +173,7 @@ const RenderedReleaseNotes = ({ release }) => {
173
173
  };
174
174
  const UpdatesSettings = () => {
175
175
  const { remotionSkillsInfo } = (0, SettingsContext_1.useSettings)();
176
- const { error, info, knownBugs, upgradeState, upgradeError, upgrade, shutdown, } = (0, UpdateStatusContext_1.useUpdateStatus)();
176
+ const { error, info, knownBugs, upgradeState, upgradeError, upgrade, restart } = (0, UpdateStatusContext_1.useUpdateStatus)();
177
177
  const [releaseNotes, setReleaseNotes] = (0, react_1.useState)(null);
178
178
  (0, react_1.useEffect)(() => {
179
179
  if (!(info === null || info === void 0 ? void 0 : info.updateAvailable)) {
@@ -239,11 +239,11 @@ const UpdatesSettings = () => {
239
239
  ? 'Upgrading Remotion...'
240
240
  : 'Remotion has been upgraded.' }), jsx_runtime_1.jsx("div", { style: text, children: upgradeState === 'upgrading'
241
241
  ? 'This may take a few minutes. You can follow the progress in your terminal.'
242
- : upgradeState === 'shutdown'
243
- ? 'Studio is shutting down. Run your Studio start command again in the terminal to use the new version.'
244
- : 'Restart Studio to use the new version. Shut down the server below, then run your Studio start command again in the terminal.' }), upgradeState === 'upgraded' || upgradeState === 'shutting-down' ? (jsx_runtime_1.jsx("div", { style: { marginTop: 12 }, children: jsx_runtime_1.jsx(ModalButton_1.ModalButton, { onClick: shutdown, disabled: upgradeState === 'shutting-down', children: upgradeState === 'shutting-down'
245
- ? 'Shutting down...'
246
- : 'Shut down Studio' }) })) : null, upgradeError ? (jsx_runtime_1.jsx(ValidationMessage_1.ValidationMessage, { message: upgradeError, type: "error", align: "flex-start" })) : null] }));
242
+ : upgradeState === 'restarting'
243
+ ? 'Studio is restarting with the new version.'
244
+ : 'Restart Studio to use the new version.' }), upgradeState === 'upgraded' || upgradeState === 'restarting' ? (jsx_runtime_1.jsx("div", { style: { marginTop: 12 }, children: jsx_runtime_1.jsx(ModalButton_1.ModalButton, { onClick: restart, disabled: upgradeState === 'restarting', children: upgradeState === 'restarting'
245
+ ? 'Restarting...'
246
+ : 'Restart Studio' }) })) : null, upgradeError ? (jsx_runtime_1.jsx(ValidationMessage_1.ValidationMessage, { message: upgradeError, type: "error", align: "flex-start" })) : null] }));
247
247
  }
248
248
  if (info === null) {
249
249
  return (jsx_runtime_1.jsx("div", { style: container, children: error ? (jsx_runtime_1.jsx("div", { style: { paddingTop: 12 }, children: jsx_runtime_1.jsx(ValidationMessage_1.ValidationMessage, { message: 'Could not check for updates: ' + error, align: "flex-start", type: "error" }) })) : (jsx_runtime_1.jsx("div", { style: title, children: "Checking for updates..." })) }));