@remotion/studio 4.0.522 → 4.0.523

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 (220) hide show
  1. package/dist/api/install-package.js +4 -2
  2. package/dist/components/AssetAudioVolume.d.ts +5 -0
  3. package/dist/components/AssetAudioVolume.js +33 -0
  4. package/dist/components/Canvas.js +5 -6
  5. package/dist/components/CaptionInspector.js +74 -20
  6. package/dist/components/CheckboardToggle.js +8 -6
  7. package/dist/components/Checkbox.d.ts +1 -0
  8. package/dist/components/Checkbox.js +2 -2
  9. package/dist/components/CompositionContextButton.js +4 -1
  10. package/dist/components/CompositionSelectorItem.js +2 -2
  11. package/dist/components/ConfigureLicenseModal.js +1 -1
  12. package/dist/components/CurrentAsset.js +40 -6
  13. package/dist/components/EditorContexts.js +3 -1
  14. package/dist/components/ElementInstallConfirmation.js +287 -135
  15. package/dist/components/FixComputedValueModal.js +38 -8
  16. package/dist/components/FullscreenToggle.js +9 -8
  17. package/dist/components/GlobalKeybindings.js +50 -49
  18. package/dist/components/HighlightedElementSource.d.ts +5 -0
  19. package/dist/components/HighlightedElementSource.js +78 -0
  20. package/dist/components/InspectorPanel/MultiSequenceField.d.ts +12 -0
  21. package/dist/components/InspectorPanel/MultiSequenceField.js +131 -0
  22. package/dist/components/InspectorPanel/MultiSequenceInspector.d.ts +8 -0
  23. package/dist/components/InspectorPanel/MultiSequenceInspector.js +102 -0
  24. package/dist/components/InspectorPanel/MultiSequenceNumberField.d.ts +9 -0
  25. package/dist/components/InspectorPanel/MultiSequenceNumberField.js +88 -0
  26. package/dist/components/InspectorPanel.js +4 -0
  27. package/dist/components/InspectorSequenceSection.js +64 -1
  28. package/dist/components/InstallPackage.js +4 -5
  29. package/dist/components/KeyboardShortcutsSettings.js +212 -33
  30. package/dist/components/MenuToolbar.js +7 -5
  31. package/dist/components/ModalContainer.d.ts +1 -0
  32. package/dist/components/ModalContainer.js +2 -2
  33. package/dist/components/Modals.js +3 -1
  34. package/dist/components/ModelManager.d.ts +16 -0
  35. package/dist/components/ModelManager.js +200 -0
  36. package/dist/components/ModelsSettings.d.ts +2 -0
  37. package/dist/components/ModelsSettings.js +133 -0
  38. package/dist/components/NewComposition/DismissableModal.d.ts +1 -0
  39. package/dist/components/NewComposition/DismissableModal.js +2 -2
  40. package/dist/components/NewComposition/InputDragger.d.ts +2 -2
  41. package/dist/components/NewComposition/InputDragger.js +6 -6
  42. package/dist/components/NewComposition/NewFolder.js +11 -8
  43. package/dist/components/NewComposition/RenameFolder.js +17 -10
  44. package/dist/components/OptionalPackageModal.d.ts +11 -0
  45. package/dist/components/OptionalPackageModal.js +155 -0
  46. package/dist/components/PlayPause.js +4 -8
  47. package/dist/components/PlaybackKeyboardShortcutsManager.js +3 -6
  48. package/dist/components/PreviewToolbarOverflowButton.js +11 -2
  49. package/dist/components/QuickSwitcher/ExplorerQuickSwitcherTrigger.js +5 -2
  50. package/dist/components/RadioButton.d.ts +1 -0
  51. package/dist/components/RadioButton.js +2 -2
  52. package/dist/components/RenderButton.js +5 -1
  53. package/dist/components/RenderModal/NumberSetting.d.ts +6 -1
  54. package/dist/components/RenderModal/NumberSetting.js +2 -2
  55. package/dist/components/RenderModal/RenderModalBasic.js +1 -1
  56. package/dist/components/RenderModal/RenderModalOutputName.d.ts +3 -1
  57. package/dist/components/RenderModal/RenderModalOutputName.js +4 -4
  58. package/dist/components/RenderModal/SeparateAudioOption.js +1 -1
  59. package/dist/components/RenderModal/WebRenderModalBasic.js +1 -1
  60. package/dist/components/RenderQueue/CaptionQueueItem.d.ts +6 -0
  61. package/dist/components/RenderQueue/CaptionQueueItem.js +129 -0
  62. package/dist/components/RenderQueue/CaptionQueueProcessor.d.ts +1 -0
  63. package/dist/components/RenderQueue/CaptionQueueProcessor.js +110 -0
  64. package/dist/components/RenderQueue/CaptionQueueProcessorLoader.d.ts +2 -0
  65. package/dist/components/RenderQueue/CaptionQueueProcessorLoader.js +54 -0
  66. package/dist/components/RenderQueue/RenderQueueItem.js +3 -3
  67. package/dist/components/RenderQueue/VideoMattingQueueItem.d.ts +6 -0
  68. package/dist/components/RenderQueue/VideoMattingQueueItem.js +129 -0
  69. package/dist/components/RenderQueue/VideoMattingQueueProcessor.d.ts +1 -0
  70. package/dist/components/RenderQueue/VideoMattingQueueProcessor.js +105 -0
  71. package/dist/components/RenderQueue/VideoMattingQueueProcessorLoader.d.ts +2 -0
  72. package/dist/components/RenderQueue/VideoMattingQueueProcessorLoader.js +54 -0
  73. package/dist/components/RenderQueue/caption-job-types.d.ts +47 -0
  74. package/dist/components/RenderQueue/caption-job-types.js +7 -0
  75. package/dist/components/RenderQueue/context.d.ts +16 -0
  76. package/dist/components/RenderQueue/context.js +224 -11
  77. package/dist/components/RenderQueue/index.js +34 -10
  78. package/dist/components/RenderQueue/item-style.d.ts +1 -0
  79. package/dist/components/RenderQueue/item-style.js +2 -1
  80. package/dist/components/RenderQueue/load-model-for-job.d.ts +11 -0
  81. package/dist/components/RenderQueue/load-model-for-job.js +14 -0
  82. package/dist/components/RenderQueue/video-matting-job-types.d.ts +38 -0
  83. package/dist/components/RenderQueue/video-matting-job-types.js +5 -0
  84. package/dist/components/RendersTab.js +4 -4
  85. package/dist/components/SegmentedControl.d.ts +2 -2
  86. package/dist/components/SegmentedControl.js +38 -13
  87. package/dist/components/SelectedOutlinePolygon.js +8 -2
  88. package/dist/components/SettingsButton.d.ts +4 -0
  89. package/dist/components/SettingsButton.js +49 -0
  90. package/dist/components/SettingsModal.d.ts +1 -1
  91. package/dist/components/SettingsModal.js +3 -1
  92. package/dist/components/ShowOutlinesProvider.js +12 -0
  93. package/dist/components/SidebarCollapserControls.js +10 -11
  94. package/dist/components/SizeSelector.js +10 -2
  95. package/dist/components/SkillsSettings.js +2 -3
  96. package/dist/components/SnappingToggle.js +5 -2
  97. package/dist/components/Tabs/vertical.d.ts +1 -0
  98. package/dist/components/Tabs/vertical.js +2 -2
  99. package/dist/components/TimeValue.js +2 -3
  100. package/dist/components/Timeline/SequencePropsObserver.js +4 -0
  101. package/dist/components/Timeline/Timeline.js +2 -42
  102. package/dist/components/Timeline/TimelineClipboardKeybindings.js +2 -4
  103. package/dist/components/Timeline/TimelineDeleteKeybindings.js +3 -18
  104. package/dist/components/Timeline/TimelineDragHandler.js +2 -2
  105. package/dist/components/Timeline/TimelineExpandedKeyframeRow.js +1 -0
  106. package/dist/components/Timeline/TimelineRowChrome.js +11 -3
  107. package/dist/components/Timeline/TimelineSchemaField.js +8 -4
  108. package/dist/components/Timeline/TimelineSelection.d.ts +2 -0
  109. package/dist/components/Timeline/TimelineSelection.js +55 -2
  110. package/dist/components/Timeline/TimelineSequence.js +75 -17
  111. package/dist/components/Timeline/TimelineSequenceItem.d.ts +0 -1
  112. package/dist/components/Timeline/TimelineSequenceItem.js +208 -111
  113. package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.d.ts +23 -3
  114. package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.js +73 -25
  115. package/dist/components/Timeline/TimelineTimeIndicators.js +1 -0
  116. package/dist/components/Timeline/use-asset-timeline-context-menu.d.ts +2 -0
  117. package/dist/components/Timeline/use-asset-timeline-context-menu.js +52 -0
  118. package/dist/components/TimelineInOutToggle.js +20 -17
  119. package/dist/components/Transcription/LazyModels.d.ts +1 -0
  120. package/dist/components/Transcription/LazyModels.js +5 -0
  121. package/dist/components/Transcription/Models.d.ts +6 -0
  122. package/dist/components/Transcription/Models.js +18 -0
  123. package/dist/components/Transcription/TranscriptionModal.d.ts +3 -0
  124. package/dist/components/Transcription/TranscriptionModal.js +428 -0
  125. package/dist/components/Transcription/TranscriptionModalWithOptionalWhisper.d.ts +5 -0
  126. package/dist/components/Transcription/TranscriptionModalWithOptionalWhisper.js +48 -0
  127. package/dist/components/Transcription/caption-output-name.d.ts +2 -0
  128. package/dist/components/Transcription/caption-output-name.js +10 -0
  129. package/dist/components/Transcription/resample-media-to-16-khz.d.ts +6 -0
  130. package/dist/components/Transcription/resample-media-to-16-khz.js +82 -0
  131. package/dist/components/Transcription/whisper-languages.d.ts +2 -0
  132. package/dist/components/Transcription/whisper-languages.js +104 -0
  133. package/dist/components/Transcription/whisper-webgpu-capability.d.ts +2 -0
  134. package/dist/components/Transcription/whisper-webgpu-capability.js +7 -0
  135. package/dist/components/UndoRedoButtons.js +13 -38
  136. package/dist/components/UpdatesSettings.js +8 -12
  137. package/dist/components/VideoMatting/LazyModels.d.ts +1 -0
  138. package/dist/components/VideoMatting/LazyModels.js +5 -0
  139. package/dist/components/VideoMatting/Models.d.ts +6 -0
  140. package/dist/components/VideoMatting/Models.js +18 -0
  141. package/dist/components/VideoMatting/VideoMattingModal.d.ts +3 -0
  142. package/dist/components/VideoMatting/VideoMattingModal.js +207 -0
  143. package/dist/components/VideoMatting/VideoMattingModalWithOptionalPackage.d.ts +5 -0
  144. package/dist/components/VideoMatting/VideoMattingModalWithOptionalPackage.js +46 -0
  145. package/dist/components/VideoMatting/video-matting-capability.d.ts +2 -0
  146. package/dist/components/VideoMatting/video-matting-capability.js +7 -0
  147. package/dist/components/WebMcp.js +439 -22
  148. package/dist/components/import-assets.d.ts +3 -2
  149. package/dist/components/import-assets.js +5 -9
  150. package/dist/components/keyboard-shortcuts.d.ts +17 -1
  151. package/dist/components/keyboard-shortcuts.js +177 -89
  152. package/dist/components/public-output-name.d.ts +5 -0
  153. package/dist/components/public-output-name.js +60 -0
  154. package/dist/components/use-model-cache-status.d.ts +7 -0
  155. package/dist/components/use-model-cache-status.js +35 -0
  156. package/dist/esm/CaptionQueueProcessor-k0yrm3dj.mjs +211 -0
  157. package/dist/esm/HighlightedElementSource-jfc66k4p.mjs +1236 -0
  158. package/dist/esm/LazyModels-2trdm224.mjs +11 -0
  159. package/dist/esm/LazyModels-fjb5ckaq.mjs +11 -0
  160. package/dist/esm/TranscriptionModal-916jqhry.mjs +1011 -0
  161. package/dist/esm/VideoMattingModal-2tm79s9b.mjs +374 -0
  162. package/dist/esm/VideoMattingQueueProcessor-t1hgm2rm.mjs +109 -0
  163. package/dist/esm/index-1x7bsdh6.mjs +261 -0
  164. package/dist/esm/index-3hgr6gjx.mjs +41 -0
  165. package/dist/esm/index-5qddp5h7.mjs +36 -0
  166. package/dist/esm/index-5zrb1ft4.mjs +39 -0
  167. package/dist/esm/index-6cvm9a65.mjs +45923 -0
  168. package/dist/esm/index-7tt71e8n.mjs +36 -0
  169. package/dist/esm/index-9x6e1dq0.mjs +428 -0
  170. package/dist/esm/index-cw0pnpg5.mjs +50 -0
  171. package/dist/esm/index-czwvnn9g.mjs +35 -0
  172. package/dist/esm/index-hy4xcgty.mjs +1366 -0
  173. package/dist/esm/{chunk-je0h1bgt.js → index-jg13hf2g.mjs} +3 -1
  174. package/dist/esm/{chunk-6jf1natv.js → index-rcv7qkt5.mjs} +18 -1
  175. package/dist/esm/index-sgtmgc4h.mjs +423 -0
  176. package/dist/esm/index-te66vvrp.mjs +142 -0
  177. package/dist/esm/index-v4tr1bft.mjs +20 -0
  178. package/dist/esm/index-x7t2y7ws.mjs +54194 -0
  179. package/dist/esm/index-xhe2m2qr.mjs +1146 -0
  180. package/dist/esm/index.mjs +45 -933
  181. package/dist/esm/internals.mjs +13 -114393
  182. package/dist/esm/previewEntry.mjs +387 -115050
  183. package/dist/esm/renderEntry.mjs +3 -3
  184. package/dist/esm/{chunk-m0jqdbkr.js → resolve-composition-component-location-14148845.mjs} +1 -1
  185. package/dist/helpers/drag-aware-double-click.d.ts +2 -1
  186. package/dist/helpers/drag-aware-double-click.js +12 -1
  187. package/dist/helpers/get-asset-metadata.d.ts +1 -0
  188. package/dist/helpers/get-asset-metadata.js +4 -0
  189. package/dist/helpers/hoverable.js +8 -0
  190. package/dist/helpers/inject-css.js +2 -0
  191. package/dist/helpers/optional-package-dependencies.d.ts +3 -0
  192. package/dist/helpers/optional-package-dependencies.js +24 -0
  193. package/dist/helpers/pointer-session.d.ts +6 -0
  194. package/dist/helpers/pointer-session.js +36 -14
  195. package/dist/helpers/prism-tomorrow.d.ts +1 -0
  196. package/dist/helpers/prism-tomorrow.js +151 -0
  197. package/dist/helpers/sequence-node-path-mutations.js +11 -0
  198. package/dist/helpers/slugify-name.d.ts +1 -0
  199. package/dist/helpers/slugify-name.js +14 -0
  200. package/dist/helpers/studio-runtime-config.d.ts +1 -0
  201. package/dist/helpers/studio-runtime-config.js +6 -1
  202. package/dist/helpers/use-keybinding.d.ts +9 -3
  203. package/dist/helpers/use-keybinding.js +8 -9
  204. package/dist/helpers/use-keyboard-shortcut-label.d.ts +2 -0
  205. package/dist/helpers/use-keyboard-shortcut-label.js +15 -0
  206. package/dist/helpers/use-menu-structure.js +58 -13
  207. package/dist/icons/input-props.d.ts +1 -1
  208. package/dist/icons/input-props.js +2 -2
  209. package/dist/icons/models.d.ts +4 -0
  210. package/dist/icons/models.js +7 -0
  211. package/dist/icons/separation.d.ts +4 -0
  212. package/dist/icons/separation.js +7 -0
  213. package/dist/icons/transcription.d.ts +4 -0
  214. package/dist/icons/transcription.js +7 -0
  215. package/dist/icons/upload.js +1 -1
  216. package/dist/state/modals.d.ts +14 -2
  217. package/package.json +34 -20
  218. package/dist/components/UpdateCheck.d.ts +0 -1
  219. package/dist/components/UpdateCheck.js +0 -79
  220. package/dist/esm/chunk-3netyjd9.js +0 -99793
@@ -0,0 +1,261 @@
1
+ import {
2
+ CheckCircleFilled,
3
+ CloudDownloadIcon,
4
+ InlineAction,
5
+ Spinner,
6
+ TrashIcon,
7
+ VERTICAL_SCROLLBAR_CLASSNAME,
8
+ ValidationMessage,
9
+ optionsPanel
10
+ } from "./index-xhe2m2qr.mjs";
11
+ import {
12
+ BLUE,
13
+ BORDER_WHITE_ALPHA_12,
14
+ LIGHT_TEXT,
15
+ WHITE
16
+ } from "./index-jg13hf2g.mjs";
17
+
18
+ // src/components/ModelManager.tsx
19
+ import { formatBytes } from "@remotion/studio-shared";
20
+ import { useCallback, useEffect, useRef, useState } from "react";
21
+ import { jsx, jsxs } from "react/jsx-runtime";
22
+ var modelPanel = {
23
+ ...optionsPanel,
24
+ flexDirection: "column"
25
+ };
26
+ var hiddenPanel = { display: "none" };
27
+ var container = {
28
+ boxSizing: "border-box",
29
+ flex: 1,
30
+ fontFamily: "sans-serif",
31
+ minWidth: 0,
32
+ padding: "16px 16px 0",
33
+ width: "100%"
34
+ };
35
+ var flushContainer = {
36
+ ...container,
37
+ padding: "16px 0 0"
38
+ };
39
+ var descriptionStyle = {
40
+ color: LIGHT_TEXT,
41
+ fontSize: 13,
42
+ lineHeight: 1.5,
43
+ margin: 0,
44
+ whiteSpace: "pre-line"
45
+ };
46
+ var list = { marginTop: 14 };
47
+ var modelRow = {
48
+ alignItems: "center",
49
+ borderBottom: BORDER_WHITE_ALPHA_12,
50
+ display: "flex",
51
+ gap: 10,
52
+ minHeight: 38,
53
+ padding: "0 10px"
54
+ };
55
+ var lastModelRow = {
56
+ ...modelRow,
57
+ borderBottom: "none"
58
+ };
59
+ var statusIcon = {
60
+ flexShrink: 0,
61
+ height: 14,
62
+ width: 14
63
+ };
64
+ var modelName = {
65
+ color: WHITE,
66
+ flex: 1,
67
+ fontFamily: "monospace",
68
+ fontSize: 13,
69
+ lineHeight: 1.4,
70
+ minWidth: 0,
71
+ overflow: "hidden",
72
+ textOverflow: "ellipsis",
73
+ whiteSpace: "nowrap"
74
+ };
75
+ var status = {
76
+ color: LIGHT_TEXT,
77
+ fontSize: 12,
78
+ fontVariantNumeric: "tabular-nums",
79
+ lineHeight: 1.4,
80
+ whiteSpace: "nowrap"
81
+ };
82
+ var actionIcon = { height: 14, width: 14 };
83
+ var actionSlot = {
84
+ alignItems: "center",
85
+ display: "inline-flex",
86
+ flexShrink: 0,
87
+ height: 24,
88
+ justifyContent: "center",
89
+ width: 24
90
+ };
91
+ var ModelManager = ({
92
+ ariaLabel,
93
+ availableModels,
94
+ description,
95
+ indent,
96
+ isModelCached,
97
+ loadModel,
98
+ prepare,
99
+ removeModel,
100
+ visible
101
+ }) => {
102
+ const mounted = useRef(true);
103
+ const initialized = useRef(false);
104
+ const [cachedModels, setCachedModels] = useState(null);
105
+ const [actionState, setActionState] = useState({
106
+ type: "idle"
107
+ });
108
+ const [cacheCheckError, setCacheCheckError] = useState(null);
109
+ useEffect(() => {
110
+ mounted.current = true;
111
+ return () => {
112
+ mounted.current = false;
113
+ };
114
+ }, []);
115
+ useEffect(() => {
116
+ if (!visible || initialized.current) {
117
+ return;
118
+ }
119
+ initialized.current = true;
120
+ Promise.resolve().then(() => prepare?.()).then(() => Promise.all(availableModels.map(async ({ name }) => await isModelCached(name) ? name : null))).then((models) => {
121
+ if (mounted.current) {
122
+ const cached = new Set;
123
+ for (const model of models) {
124
+ if (model !== null) {
125
+ cached.add(model);
126
+ }
127
+ }
128
+ setCachedModels(cached);
129
+ }
130
+ }).catch((error) => {
131
+ if (mounted.current) {
132
+ setCachedModels(new Set);
133
+ setCacheCheckError(error instanceof Error ? error.message : String(error));
134
+ }
135
+ });
136
+ }, [availableModels, isModelCached, prepare, visible]);
137
+ const downloadModel = useCallback((model) => {
138
+ setActionState({ type: "downloading", model, progress: 0 });
139
+ loadModel(model, (progress) => {
140
+ if (mounted.current) {
141
+ setActionState({ type: "downloading", model, progress });
142
+ }
143
+ }).then(() => {
144
+ if (mounted.current) {
145
+ setCachedModels((current) => new Set([...current ?? [], model]));
146
+ setActionState({ type: "idle" });
147
+ }
148
+ }).catch((error) => {
149
+ if (mounted.current) {
150
+ setActionState({
151
+ type: "error",
152
+ model,
153
+ message: error instanceof Error ? error.message : String(error)
154
+ });
155
+ }
156
+ });
157
+ }, [loadModel]);
158
+ const remove = useCallback((model) => {
159
+ setActionState({ type: "removing", model });
160
+ removeModel(model).then(() => {
161
+ if (mounted.current) {
162
+ setCachedModels((current) => {
163
+ const next = new Set(current ?? []);
164
+ next.delete(model);
165
+ return next;
166
+ });
167
+ setActionState({ type: "idle" });
168
+ }
169
+ }).catch((error) => {
170
+ if (mounted.current) {
171
+ setActionState({
172
+ type: "error",
173
+ model,
174
+ message: error instanceof Error ? error.message : String(error)
175
+ });
176
+ }
177
+ });
178
+ }, [removeModel]);
179
+ const renderDownloadIcon = useCallback((color) => {
180
+ return /* @__PURE__ */ jsx(CloudDownloadIcon, {
181
+ color,
182
+ style: actionIcon
183
+ });
184
+ }, []);
185
+ const renderRemoveIcon = useCallback((color) => {
186
+ return /* @__PURE__ */ jsx(TrashIcon, {
187
+ color,
188
+ style: actionIcon
189
+ });
190
+ }, []);
191
+ const actionInProgress = actionState.type === "downloading" || actionState.type === "removing";
192
+ return /* @__PURE__ */ jsx("div", {
193
+ style: visible ? modelPanel : hiddenPanel,
194
+ className: VERTICAL_SCROLLBAR_CLASSNAME,
195
+ children: /* @__PURE__ */ jsxs("div", {
196
+ style: indent ? container : flushContainer,
197
+ children: [
198
+ description === null ? null : /* @__PURE__ */ jsx("p", {
199
+ style: descriptionStyle,
200
+ children: description
201
+ }),
202
+ cacheCheckError ? /* @__PURE__ */ jsx(ValidationMessage, {
203
+ align: "flex-start",
204
+ message: cacheCheckError,
205
+ type: "error"
206
+ }) : null,
207
+ /* @__PURE__ */ jsx("div", {
208
+ style: description === null ? undefined : list,
209
+ role: "list",
210
+ "aria-label": ariaLabel,
211
+ children: availableModels.map((model, index) => {
212
+ const cached = cachedModels?.has(model.name) ?? false;
213
+ const processingThisModel = actionState.type !== "idle" && actionState.type !== "error" && actionState.model === model.name;
214
+ const progress = actionState.type === "downloading" && actionState.model === model.name ? actionState.progress : null;
215
+ const modelStatus = processingThisModel ? actionState.type === "removing" ? "Removing…" : `Downloading${progress === null ? "…" : ` ${Math.round(progress * 100)}%`}` : actionState.type === "error" && actionState.model === model.name ? actionState.message : formatBytes(model.webGpuDownloadSize);
216
+ return /* @__PURE__ */ jsxs("div", {
217
+ role: "listitem",
218
+ style: index === availableModels.length - 1 ? lastModelRow : modelRow,
219
+ children: [
220
+ /* @__PURE__ */ jsx("span", {
221
+ style: modelName,
222
+ children: model.name
223
+ }),
224
+ /* @__PURE__ */ jsx("span", {
225
+ style: status,
226
+ title: modelStatus,
227
+ children: modelStatus
228
+ }),
229
+ cached ? /* @__PURE__ */ jsx(CheckCircleFilled, {
230
+ "aria-hidden": true,
231
+ style: { ...statusIcon, fill: BLUE }
232
+ }) : null,
233
+ processingThisModel ? /* @__PURE__ */ jsx("span", {
234
+ style: actionSlot,
235
+ children: /* @__PURE__ */ jsx(Spinner, {
236
+ duration: 0.5,
237
+ size: 14
238
+ })
239
+ }) : cached ? /* @__PURE__ */ jsx(InlineAction, {
240
+ disabled: actionInProgress,
241
+ onClick: () => remove(model.name),
242
+ renderAction: renderRemoveIcon,
243
+ title: `Remove ${model.name}`,
244
+ variant: null
245
+ }) : /* @__PURE__ */ jsx(InlineAction, {
246
+ disabled: cachedModels === null || actionInProgress,
247
+ onClick: () => downloadModel(model.name),
248
+ renderAction: renderDownloadIcon,
249
+ title: `Download ${model.name}`,
250
+ variant: null
251
+ })
252
+ ]
253
+ }, model.name);
254
+ })
255
+ })
256
+ ]
257
+ })
258
+ });
259
+ };
260
+
261
+ export { ModelManager };
@@ -0,0 +1,41 @@
1
+ import {
2
+ callApi
3
+ } from "./index-hy4xcgty.mjs";
4
+ import {
5
+ getBrowserStudioOperations
6
+ } from "./index-cw0pnpg5.mjs";
7
+
8
+ // src/api/pause.ts
9
+ import { Internals } from "remotion";
10
+ var pause = () => {
11
+ Internals.timeValueRef.current?.pause();
12
+ };
13
+
14
+ // src/api/play.ts
15
+ import { Internals as Internals2 } from "remotion";
16
+ var play = (e) => {
17
+ Internals2.timeValueRef.current?.play(e);
18
+ };
19
+
20
+ // src/api/restart-studio.ts
21
+ import { getRemotionEnvironment } from "remotion";
22
+ var restartStudio = () => {
23
+ if (!getRemotionEnvironment().isStudio) {
24
+ throw new Error("restartStudio() is only available in the Studio");
25
+ }
26
+ if (getBrowserStudioOperations() !== null) {
27
+ throw new Error("restartStudio() is not supported in Browser Studio");
28
+ }
29
+ if (window.remotion_isReadOnlyStudio) {
30
+ throw new Error("restartStudio() is not available in read-only Studio");
31
+ }
32
+ return callApi("/api/restart-studio", {});
33
+ };
34
+
35
+ // src/api/seek.ts
36
+ import { Internals as Internals3 } from "remotion";
37
+ var seek = (frame) => {
38
+ Internals3.timeValueRef.current?.seek(Math.max(0, frame));
39
+ };
40
+
41
+ export { pause, play, restartStudio, seek };
@@ -0,0 +1,36 @@
1
+ import {
2
+ ModelManager
3
+ } from "./index-1x7bsdh6.mjs";
4
+
5
+ // src/components/Transcription/Models.tsx
6
+ import {
7
+ clearStaleModels,
8
+ getAvailableModels,
9
+ isWhisperModelCached,
10
+ loadWhisperModel,
11
+ removeWhisperModel
12
+ } from "@remotion/whisper-webgpu";
13
+ import { useCallback } from "react";
14
+ import { jsx } from "react/jsx-runtime";
15
+ var AVAILABLE_MODELS = getAvailableModels();
16
+ var Models = ({ description, indent, visible }) => {
17
+ const isModelCached = useCallback((model) => isWhisperModelCached({ model }), []);
18
+ const loadModel = useCallback((model, onProgress) => loadWhisperModel({
19
+ model,
20
+ onProgress: (progress) => onProgress(progress.progress)
21
+ }), []);
22
+ const removeModel = useCallback((model) => removeWhisperModel({ model }), []);
23
+ return /* @__PURE__ */ jsx(ModelManager, {
24
+ ariaLabel: "Whisper models",
25
+ availableModels: AVAILABLE_MODELS,
26
+ description,
27
+ indent,
28
+ isModelCached,
29
+ loadModel,
30
+ prepare: clearStaleModels,
31
+ removeModel,
32
+ visible
33
+ });
34
+ };
35
+
36
+ export { Models };
@@ -0,0 +1,39 @@
1
+ // src/helpers/studio-runtime-config.ts
2
+ var DEFAULT_BUFFER_STATE_DELAY_IN_MILLISECONDS = 300;
3
+ var defaultStudioRuntimeConfig = {
4
+ askAIEnabled: false,
5
+ bufferStateDelayInMilliseconds: null,
6
+ defaultCodingAgent: null,
7
+ defaultEditor: null,
8
+ interactivityEnabled: true,
9
+ keyboardShortcutsEnabled: true,
10
+ maxTimelineTracks: null,
11
+ publicLicenseKey: null,
12
+ configFileStudioSettings: null
13
+ };
14
+ var getStudioRuntimeConfig = () => {
15
+ if (typeof window === "undefined") {
16
+ return defaultStudioRuntimeConfig;
17
+ }
18
+ return window.remotion_studioConfig ?? defaultStudioRuntimeConfig;
19
+ };
20
+ var getStudioAskAIEnabled = () => {
21
+ return getStudioRuntimeConfig().askAIEnabled;
22
+ };
23
+ var getStudioInteractivityEnabled = () => {
24
+ return getStudioRuntimeConfig().interactivityEnabled;
25
+ };
26
+ var getStudioKeyboardShortcutsEnabled = () => {
27
+ return getStudioRuntimeConfig().keyboardShortcutsEnabled;
28
+ };
29
+ var getStudioKeyboardShortcuts = () => {
30
+ return getStudioRuntimeConfig().keyboardShortcuts ?? null;
31
+ };
32
+ var getStudioMaxTimelineTracks = () => {
33
+ return getStudioRuntimeConfig().maxTimelineTracks;
34
+ };
35
+ var getStudioBufferStateDelayInMilliseconds = () => {
36
+ return getStudioRuntimeConfig().bufferStateDelayInMilliseconds ?? DEFAULT_BUFFER_STATE_DELAY_IN_MILLISECONDS;
37
+ };
38
+
39
+ export { getStudioAskAIEnabled, getStudioInteractivityEnabled, getStudioKeyboardShortcutsEnabled, getStudioKeyboardShortcuts, getStudioMaxTimelineTracks, getStudioBufferStateDelayInMilliseconds };