@remotion/studio 4.0.526 → 4.0.528
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.
- package/dist/components/AgentPrompt.js +1 -2
- package/dist/components/AudioWaveform.d.ts +1 -0
- package/dist/components/AudioWaveform.js +10 -14
- package/dist/components/Canvas.js +88 -26
- package/dist/components/CanvasCaptureDropHandler.js +63 -0
- package/dist/components/CanvasOrLoading.js +10 -2
- package/dist/components/CodeFrame.js +1 -1
- package/dist/components/ColorPicker/checker.d.ts +1 -1
- package/dist/components/CompositionSelectorItem.js +1 -0
- package/dist/components/CurrentAsset.js +4 -2
- package/dist/components/EditorRuler/Ruler.js +6 -3
- package/dist/components/EffectPickerModal.js +69 -43
- package/dist/components/ElementInstallConfirmation.js +3 -3
- package/dist/components/ElementLibrariesSettings.d.ts +2 -0
- package/dist/components/ElementLibrariesSettings.js +200 -0
- package/dist/components/InitialCompositionLoader.js +4 -2
- package/dist/components/InlineDropdown.js +26 -2
- package/dist/components/InlineEditableTitle.js +1 -0
- package/dist/components/InspectorOpenInEditor.js +13 -0
- package/dist/components/InspectorPanel/AlignmentControls.js +28 -9
- package/dist/components/InspectorPanel/CollapsibleInspectorSectionHeader.js +2 -1
- package/dist/components/InspectorPanel/CompositionInspector.js +3 -3
- package/dist/components/InspectorPanel/CompositionMetadata.js +4 -0
- package/dist/components/InspectorPanel/EasingInspector.js +6 -2
- package/dist/components/InspectorPanel/ElementLibraryButton.js +2 -1
- package/dist/components/InspectorPanel/KeyframeEasingNavigator.js +1 -1
- package/dist/components/InspectorPanel/KeyframeInspector.js +28 -24
- package/dist/components/InspectorPanel/MultiSequenceInspector.js +32 -1
- package/dist/components/InspectorPanel/MultiSequenceNumberField.js +1 -1
- package/dist/components/InspectorPanel/SequenceInspectorHeader.d.ts +3 -1
- package/dist/components/InspectorPanel/SequenceSelectionInspector.js +70 -2
- package/dist/components/InspectorPanel/SequenceWrapAction.d.ts +8 -0
- package/dist/components/InspectorPanel/SequenceWrapAction.js +151 -0
- package/dist/components/InspectorPanel/common.js +1 -0
- package/dist/components/InspectorPanel/easing-inspector-selection.d.ts +2 -1
- package/dist/components/InspectorPanel/easing-inspector-selection.js +4 -3
- package/dist/components/InspectorPanel/keyframe-inspector-frame.d.ts +2 -1
- package/dist/components/InspectorPanel/keyframe-inspector-frame.js +2 -2
- package/dist/components/InspectorPanel/styles.js +2 -0
- package/dist/components/InspectorPanel/use-composition-actions.js +1 -0
- package/dist/components/InspectorSequenceSection.d.ts +1 -0
- package/dist/components/InspectorSequenceSection.js +7 -5
- package/dist/components/InspectorSourceLocation.js +3 -0
- package/dist/components/KeyboardShortcutsSettings.js +1 -1
- package/dist/components/Menu/styles.d.ts +2 -2
- package/dist/components/MenuBuildIndicator.js +1 -0
- package/dist/components/Modals.js +7 -6
- package/dist/components/ModelManager.js +10 -9
- package/dist/components/NewComposition/CancelButton.js +11 -5
- package/dist/components/NewComposition/InputDragger.d.ts +3 -1
- package/dist/components/NewComposition/InputDragger.js +28 -9
- package/dist/components/NewComposition/NewComposition.js +7 -6
- package/dist/components/NewComposition/RemInput.d.ts +1 -1
- package/dist/components/NewComposition/menu-typeahead.js +1 -1
- package/dist/components/Preview.js +4 -0
- package/dist/components/QuickSwitcher/ExplorerQuickSwitcherTrigger.js +1 -0
- package/dist/components/QuickSwitcher/QuickSwitcherContent.js +1 -0
- package/dist/components/RadioButton.js +1 -0
- package/dist/components/RenderModal/DataEditor.js +4 -1
- package/dist/components/RenderModal/SchemaEditor/create-zod-values.js +1 -2
- package/dist/components/RenderModal/WebRenderModalPicture.js +1 -2
- package/dist/components/RenderQueue/CaptionQueueItem.js +19 -7
- package/dist/components/RenderQueue/CaptionQueueProcessor.js +65 -15
- package/dist/components/RenderQueue/QueueJobError.d.ts +8 -0
- package/dist/components/RenderQueue/QueueJobError.js +24 -0
- package/dist/components/RenderQueue/QueueJobErrorModal.d.ts +8 -0
- package/dist/components/RenderQueue/QueueJobErrorModal.js +63 -0
- package/dist/components/RenderQueue/RenderQueueItemCancelButton.d.ts +3 -1
- package/dist/components/RenderQueue/RenderQueueItemCancelButton.js +11 -4
- package/dist/components/RenderQueue/RenderQueueRepeat.d.ts +3 -1
- package/dist/components/RenderQueue/RenderQueueRepeat.js +20 -3
- package/dist/components/RenderQueue/VideoMattingQueueItem.js +25 -27
- package/dist/components/RenderQueue/VideoMattingQueueProcessor.js +68 -28
- package/dist/components/RenderQueue/caption-job-types.d.ts +9 -1
- package/dist/components/RenderQueue/context.d.ts +4 -0
- package/dist/components/RenderQueue/context.js +58 -8
- package/dist/components/RenderQueue/index.js +3 -3
- package/dist/components/RenderQueue/load-model-for-job.d.ts +2 -1
- package/dist/components/RenderQueue/load-model-for-job.js +5 -1
- package/dist/components/RenderQueue/video-matting-job-types.d.ts +13 -6
- package/dist/components/RendersTab.js +2 -0
- package/dist/components/SelectedOutlineCropControls.js +2 -1
- package/dist/components/SelectedOutlineEditingHandles.js +9 -2
- package/dist/components/SelectedOutlineElement.js +9 -3
- package/dist/components/SelectedOutlineKeyboardControls.d.ts +2 -4
- package/dist/components/SelectedOutlineKeyboardControls.js +4 -22
- package/dist/components/SelectedOutlineOverlay.js +152 -106
- package/dist/components/SelectedOutlinePathPoints.d.ts +8 -0
- package/dist/components/SelectedOutlinePathPoints.js +433 -0
- package/dist/components/SelectedOutlinePolygon.js +21 -46
- package/dist/components/SelectedOutlineRenderer.d.ts +3 -5
- package/dist/components/SelectedOutlineRenderer.js +32 -136
- package/dist/components/SelectedOutlineSnapIndicators.d.ts +6 -0
- package/dist/components/SelectedOutlineSnapIndicators.js +16 -12
- package/dist/components/SelectedOutlineTransformOriginHandle.js +3 -2
- package/dist/components/SelectedOutlineUvControls.js +12 -7
- package/dist/components/SequencePropsSubscriptionProvider.d.ts +3 -0
- package/dist/components/SequencePropsSubscriptionProvider.js +8 -6
- package/dist/components/SettingsModal.js +30 -3
- package/dist/components/SettingsModalFooter.d.ts +1 -0
- package/dist/components/SettingsModalFooter.js +7 -3
- package/dist/components/ShowOutlinesProvider.js +1 -1
- package/dist/components/SkillsSettings.d.ts +0 -1
- package/dist/components/SkillsSettings.js +13 -14
- package/dist/components/Splitter/SplitterElement.js +1 -2
- package/dist/components/TimeValue.js +1 -1
- package/dist/components/Timeline/LoopedTimelineIndicators.d.ts +1 -0
- package/dist/components/Timeline/LoopedTimelineIndicators.js +7 -6
- package/dist/components/Timeline/TimelineArrayField.js +1 -1
- package/dist/components/Timeline/TimelineClipboardKeybindings.js +0 -1
- package/dist/components/Timeline/TimelineColorField.js +1 -1
- package/dist/components/Timeline/TimelineDeleteKeybindings.js +6 -9
- package/dist/components/Timeline/TimelineDragHandler.js +1 -1
- package/dist/components/Timeline/TimelineEffectItem.js +1 -0
- package/dist/components/Timeline/TimelineEffectPropItem.d.ts +1 -0
- package/dist/components/Timeline/TimelineEffectPropItem.js +12 -5
- package/dist/components/Timeline/TimelineExpandArrowButton.js +1 -0
- package/dist/components/Timeline/TimelineExpandedRow.d.ts +1 -0
- package/dist/components/Timeline/TimelineExpandedRow.js +6 -4
- package/dist/components/Timeline/TimelineExpandedSection.d.ts +1 -0
- package/dist/components/Timeline/TimelineExpandedSection.js +2 -2
- package/dist/components/Timeline/TimelineExpandedTrackKeyframes.d.ts +1 -0
- package/dist/components/Timeline/TimelineExpandedTrackKeyframes.js +3 -1
- package/dist/components/Timeline/TimelineFieldLabel.js +1 -0
- package/dist/components/Timeline/TimelineFontFamilyField.js +12 -12
- package/dist/components/Timeline/TimelineKeyframeControls.d.ts +1 -0
- package/dist/components/Timeline/TimelineKeyframeControls.js +40 -28
- package/dist/components/Timeline/TimelineLayerChildren.js +1 -1
- package/dist/components/Timeline/TimelineList.js +1 -1
- package/dist/components/Timeline/TimelineNumberField.js +2 -4
- package/dist/components/Timeline/TimelinePrimitiveFieldValue.js +1 -1
- package/dist/components/Timeline/TimelineSelection.d.ts +9 -9
- package/dist/components/Timeline/TimelineSelection.js +16 -9
- package/dist/components/Timeline/TimelineSequence.d.ts +3 -1
- package/dist/components/Timeline/TimelineSequence.js +65 -21
- package/dist/components/Timeline/TimelineSequenceFrame.js +1 -0
- package/dist/components/Timeline/TimelineSequenceItem.d.ts +1 -0
- package/dist/components/Timeline/TimelineSequenceItem.js +46 -8
- package/dist/components/Timeline/TimelineSequencePropItem.d.ts +3 -0
- package/dist/components/Timeline/TimelineSequencePropItem.js +262 -25
- package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.d.ts +11 -13
- package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.js +98 -77
- package/dist/components/Timeline/TimelineTextContentField.js +27 -4
- package/dist/components/Timeline/TimelineTimeIndicators.js +10 -5
- package/dist/components/Timeline/TimelineTrack.js +1 -1
- package/dist/components/Timeline/TimelineTrimTooltip.d.ts +11 -0
- package/dist/components/Timeline/TimelineTrimTooltip.js +41 -0
- package/dist/components/Timeline/TimelineVideoInfo.d.ts +1 -0
- package/dist/components/Timeline/TimelineVideoInfo.js +13 -10
- package/dist/components/Timeline/TimelineViewport.d.ts +1 -0
- package/dist/components/Timeline/TimelineViewport.js +10 -1
- package/dist/components/Timeline/delete-selected-keyframe.js +22 -8
- package/dist/components/Timeline/delete-selected-timeline-item.d.ts +1 -5
- package/dist/components/Timeline/delete-selected-timeline-item.js +9 -95
- package/dist/components/Timeline/get-animation-item-selection-for-frame.d.ts +2 -1
- package/dist/components/Timeline/get-animation-item-selection-for-frame.js +7 -5
- package/dist/components/Timeline/get-keyframed-sequence-drag-targets.d.ts +23 -0
- package/dist/components/Timeline/get-keyframed-sequence-drag-targets.js +57 -0
- package/dist/components/Timeline/get-node-keyframes.d.ts +2 -1
- package/dist/components/Timeline/get-node-keyframes.js +6 -4
- package/dist/components/Timeline/get-playback-rate-keyframe-changes.d.ts +21 -0
- package/dist/components/Timeline/get-playback-rate-keyframe-changes.js +142 -0
- package/dist/components/Timeline/get-sequence-context-menu-items.d.ts +3 -1
- package/dist/components/Timeline/get-sequence-context-menu-items.js +13 -1
- package/dist/components/Timeline/get-timeline-keyframes.d.ts +15 -2
- package/dist/components/Timeline/get-timeline-keyframes.js +44 -6
- package/dist/components/Timeline/keyframe-clipboard.js +17 -3
- package/dist/components/Timeline/split-selected-timeline-item.d.ts +13 -10
- package/dist/components/Timeline/split-selected-timeline-item.js +61 -35
- package/dist/components/Timeline/timeline-field-display-utils.js +1 -0
- package/dist/components/Timeline/timeline-field-row-layout.js +1 -0
- package/dist/components/Timeline/use-delete-timeline-items.js +17 -11
- package/dist/components/Timeline/use-expanded-track-keyframe-rows.d.ts +2 -1
- package/dist/components/Timeline/use-expanded-track-keyframe-rows.js +3 -1
- package/dist/components/Timeline/use-sequence-freeze-frame-menu-item.js +7 -3
- package/dist/components/Timeline/use-timeline-keyframe-drag.js +28 -19
- package/dist/components/TimelineCombobox.js +1 -0
- package/dist/components/Transcription/Models.js +1 -1
- package/dist/components/Transcription/TranscriptionModal.js +18 -11
- package/dist/components/Transcription/TranscriptionModalWithOptionalWhisper.js +1 -1
- package/dist/components/Transcription/resample-media-to-16-khz.d.ts +2 -1
- package/dist/components/Transcription/resample-media-to-16-khz.js +20 -2
- package/dist/components/UpdatesSettings.js +2 -0
- package/dist/components/VideoMatting/Models.js +1 -1
- package/dist/components/VideoMatting/VideoMattingModal.js +30 -47
- package/dist/components/VideoMatting/VideoMattingModalWithOptionalPackage.js +1 -1
- package/dist/components/WebMcp.js +23 -40
- package/dist/components/composition-drop-preview.d.ts +9 -2
- package/dist/components/composition-drop-preview.js +8 -4
- package/dist/components/composition-menu-items.js +4 -4
- package/dist/components/delete-jsx-nodes-api.d.ts +2 -0
- package/dist/components/{delete-jsx-node-api.js → delete-jsx-nodes-api.js} +5 -5
- package/dist/components/effect-drag-and-drop.d.ts +13 -5
- package/dist/components/effect-drag-and-drop.js +19 -4
- package/dist/components/get-open-in-menu-items.d.ts +2 -1
- package/dist/components/get-open-in-menu-items.js +24 -8
- package/dist/components/keyboard-shortcuts.d.ts +4 -4
- package/dist/components/keyboard-shortcuts.js +3 -1
- package/dist/components/public-output-name.d.ts +1 -0
- package/dist/components/public-output-name.js +7 -3
- package/dist/components/selected-outline-drag.d.ts +1 -6
- package/dist/components/selected-outline-drag.js +22 -6
- package/dist/components/selected-outline-geometry.d.ts +2 -18
- package/dist/components/selected-outline-measurement.d.ts +23 -41
- package/dist/components/selected-outline-measurement.js +14 -252
- package/dist/components/selected-outline-order.d.ts +4 -11
- package/dist/components/selected-outline-order.js +2 -254
- package/dist/components/selected-outline-snap.d.ts +1 -1
- package/dist/components/selected-outline-snap.js +2 -1
- package/dist/components/selected-outline-types.d.ts +18 -28
- package/dist/components/selected-outline-uv.d.ts +4 -4
- package/dist/components/selected-outline-uv.js +6 -111
- package/dist/components/sequence-props-api.js +0 -10
- package/dist/components/use-selected-outline-control-target.js +12 -21
- package/dist/components/wrap-jsx-node-api.d.ts +2 -0
- package/dist/components/wrap-jsx-node-api.js +13 -0
- package/dist/error-overlay/remotion-overlay/OpenInEditor.js +45 -2
- package/dist/error-overlay/remotion-overlay/StackFrame.js +32 -3
- package/dist/esm/{CaptionQueueProcessor-k0yrm3dj.mjs → CaptionQueueProcessor-nr7hjcga.mjs} +96 -19
- package/dist/esm/LazyModels-ajkn7fs3.mjs +12 -0
- package/dist/esm/LazyModels-g1g7cf4e.mjs +12 -0
- package/dist/esm/{TranscriptionModal-ymnx1c7m.mjs → TranscriptionModal-e18bzbkb.mjs} +30 -22
- package/dist/esm/{VideoMattingModal-05vpczks.mjs → VideoMattingModal-5bz2s4rs.mjs} +47 -62
- package/dist/esm/{VideoMattingQueueProcessor-t1hgm2rm.mjs → VideoMattingQueueProcessor-4tkj0f4k.mjs} +69 -26
- package/dist/esm/{index-v4tr1bft.mjs → index-09txs1bj.mjs} +5 -0
- package/dist/esm/{index-4dsz9035.mjs → index-5ycb9e9q.mjs} +2 -4
- package/dist/esm/index-890dd9b3.mjs +768 -0
- package/dist/esm/{index-5bfxbpca.mjs → index-8nt6a0mw.mjs} +3 -3
- package/dist/esm/{index-5gd8k9yv.mjs → index-9q9w8v9p.mjs} +3 -3
- package/dist/esm/{index-x40wwfmt.mjs → index-c2wabcdt.mjs} +8 -6
- package/dist/esm/index-dfy1t576.mjs +129 -0
- package/dist/esm/index-dh3zk2hv.mjs +220 -0
- package/dist/esm/{index-0gewwxse.mjs → index-dpyss74p.mjs} +6179 -5011
- package/dist/esm/{index-9x6e1dq0.mjs → index-hqxc6tzp.mjs} +40 -6
- package/dist/esm/{index-cdy8v54v.mjs → index-qve7mdfp.mjs} +36 -539
- package/dist/esm/{index-eb5txqp6.mjs → index-s6qya2gg.mjs} +8 -88
- package/dist/esm/index-t7tbt980.mjs +103 -0
- package/dist/esm/{index-g7k2dvar.mjs → index-t7xnxdf8.mjs} +44 -26
- package/dist/esm/index-wqc43mw0.mjs +158 -0
- package/dist/esm/{index-bs39wngg.mjs → index-x6r9bn12.mjs} +5623 -6218
- package/dist/esm/{index-f97r9e2g.mjs → index-xac20sv4.mjs} +46 -57
- package/dist/esm/index.mjs +4 -4
- package/dist/esm/internals.mjs +13 -10
- package/dist/esm/previewEntry.mjs +18 -12
- package/dist/esm/renderEntry.mjs +5 -1
- package/dist/esm/{resolve-composition-component-location-bt2d6qxq.mjs → resolve-composition-component-location-2hgf6g0a.mjs} +1 -1
- package/dist/helpers/calculate-timeline.d.ts +5 -1
- package/dist/helpers/calculate-timeline.js +1 -1
- package/dist/helpers/checkerboard-background.d.ts +2 -2
- package/dist/helpers/colors.d.ts +132 -112
- package/dist/helpers/colors.js +117 -95
- package/dist/helpers/copy-text.js +1 -16
- package/dist/helpers/create-folder-tree.js +2 -1
- package/dist/helpers/editor-guide-selection.d.ts +1 -1
- package/dist/helpers/editor-ruler.js +23 -12
- package/dist/helpers/get-connected-compositions.d.ts +6 -1
- package/dist/helpers/get-connected-compositions.js +1 -1
- package/dist/helpers/get-sequence-double-click-action.js +1 -1
- package/dist/helpers/get-sequence-visible-range.d.ts +1 -1
- package/dist/helpers/get-sequence-visible-range.js +2 -5
- package/dist/helpers/get-timeline-nestedness.d.ts +1 -1
- package/dist/helpers/get-timeline-nestedness.js +1 -1
- package/dist/helpers/get-timeline-sequence-sort-key.d.ts +1 -1
- package/dist/helpers/get-timeline-sequence-sort-key.js +1 -1
- package/dist/helpers/hoverable.js +6 -5
- package/dist/helpers/inject-css.js +5 -7
- package/dist/helpers/open-in-editor.js +1 -1
- package/dist/helpers/prism-vsc-dark-plus.d.ts +1 -1
- package/dist/helpers/prism-vsc-dark-plus.js +52 -51
- package/dist/helpers/resolve-studio-color.d.ts +1 -0
- package/dist/helpers/resolve-studio-color.js +11 -0
- package/dist/helpers/studio-css-variables.d.ts +1 -0
- package/dist/helpers/studio-css-variables.js +105 -0
- package/dist/helpers/studio-pixel-ratio.d.ts +1 -0
- package/dist/helpers/studio-pixel-ratio.js +7 -0
- package/dist/helpers/studio-runtime-config.d.ts +1 -1
- package/dist/helpers/timeline-node-path-key.d.ts +1 -1
- package/dist/helpers/timeline-node-path-key.js +2 -2
- package/dist/helpers/use-keybinding.d.ts +1 -1
- package/dist/helpers/use-keyboard-shortcut-label.d.ts +2 -2
- package/dist/helpers/use-menu-structure.js +15 -9
- package/dist/helpers/use-runtime-values.js +2 -28
- package/dist/hot-middleware-client/client.js +5 -3
- package/dist/icons/align-center-horizontal.js +2 -1
- package/dist/icons/align-left.js +2 -1
- package/dist/icons/align-right.js +2 -1
- package/dist/icons/{separation.d.ts → background-removal.d.ts} +1 -1
- package/dist/icons/background-removal.js +9 -0
- package/dist/icons/wrap.d.ts +4 -0
- package/dist/icons/wrap.js +10 -0
- package/dist/previewEntry.js +2 -0
- package/dist/renderEntry.js +2 -0
- package/dist/state/modals.d.ts +20 -1
- package/dist/state/timeline-sequence-hover.d.ts +6 -16
- package/dist/state/timeline-sequence-hover.js +6 -67
- package/dist/state/timeline-zoom.js +4 -0
- package/package.json +20 -19
- package/dist/components/Timeline/get-easing-selection-after-keyframe-delete.d.ts +0 -15
- package/dist/components/Timeline/get-easing-selection-after-keyframe-delete.js +0 -31
- package/dist/components/delete-jsx-node-api.d.ts +0 -2
- package/dist/esm/LazyModels-mtggyjye.mjs +0 -11
- package/dist/esm/LazyModels-nk7py0zt.mjs +0 -11
- package/dist/esm/index-cw0pnpg5.mjs +0 -50
- package/dist/esm/index-k426ye99.mjs +0 -139
- package/dist/helpers/get-box-quads-polyfill-internals.d.ts +0 -82
- package/dist/helpers/get-box-quads-polyfill-internals.js +0 -2403
- package/dist/helpers/get-box-quads-ponyfill.d.ts +0 -10
- package/dist/helpers/get-box-quads-ponyfill.js +0 -23
- package/dist/icons/separation.js +0 -7
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.wrapJsxNode = void 0;
|
|
4
|
+
const browser_studio_operations_1 = require("../helpers/browser-studio-operations");
|
|
5
|
+
const call_api_1 = require("./call-api");
|
|
6
|
+
const wrapJsxNode = (request) => {
|
|
7
|
+
const browserStudioOperations = (0, browser_studio_operations_1.getBrowserStudioOperations)();
|
|
8
|
+
if (browserStudioOperations) {
|
|
9
|
+
return browserStudioOperations.wrapJsxNode(request);
|
|
10
|
+
}
|
|
11
|
+
return (0, call_api_1.callApi)('/api/wrap-jsx-node', request);
|
|
12
|
+
};
|
|
13
|
+
exports.wrapJsxNode = wrapJsxNode;
|
|
@@ -7,9 +7,13 @@ const AppLaunchButton_1 = require("../../components/AppLaunchButton");
|
|
|
7
7
|
const NotificationCenter_1 = require("../../components/Notifications/NotificationCenter");
|
|
8
8
|
const SettingsContext_1 = require("../../components/SettingsContext");
|
|
9
9
|
const use_configure_default_apps_1 = require("../../components/use-configure-default-apps");
|
|
10
|
+
const colors_1 = require("../../helpers/colors");
|
|
11
|
+
const copy_text_1 = require("../../helpers/copy-text");
|
|
10
12
|
const open_in_editor_1 = require("../../helpers/open-in-editor");
|
|
11
13
|
const use_keybinding_1 = require("../../helpers/use-keybinding");
|
|
14
|
+
const clipboard_1 = require("../../icons/clipboard");
|
|
12
15
|
const editor_1 = require("../../icons/editor");
|
|
16
|
+
const format_location_1 = require("./format-location");
|
|
13
17
|
const ShortcutHint_1 = require("./ShortcutHint");
|
|
14
18
|
const menuLabel = {
|
|
15
19
|
color: 'inherit',
|
|
@@ -17,10 +21,14 @@ const menuLabel = {
|
|
|
17
21
|
fontSize: 13,
|
|
18
22
|
lineHeight: '16px',
|
|
19
23
|
};
|
|
24
|
+
const copyIcon = { height: 16, width: 16 };
|
|
20
25
|
const OpenInEditor = ({ stack, canHaveKeyboardShortcuts, editorId, editorName, size }) => {
|
|
21
26
|
const { editorInfo } = (0, SettingsContext_1.useSettings)();
|
|
22
27
|
const configureDefaultApps = (0, use_configure_default_apps_1.useConfigureDefaultApps)();
|
|
23
28
|
const { registerKeybinding } = (0, use_keybinding_1.useKeybinding)();
|
|
29
|
+
const sourcePath = stack.originalFileName
|
|
30
|
+
? (0, format_location_1.formatLocation)(stack.originalFileName)
|
|
31
|
+
: null;
|
|
24
32
|
const openWithEditor = (0, react_1.useCallback)(async (selectedEditorId, selectedEditorName) => {
|
|
25
33
|
try {
|
|
26
34
|
const response = await (0, open_in_editor_1.openInEditor)(stack, selectedEditorId);
|
|
@@ -35,6 +43,16 @@ const OpenInEditor = ({ stack, canHaveKeyboardShortcuts, editorId, editorName, s
|
|
|
35
43
|
const openPreferredEditor = (0, react_1.useCallback)(() => {
|
|
36
44
|
openWithEditor(editorId, editorName).catch(() => undefined);
|
|
37
45
|
}, [editorId, editorName, openWithEditor]);
|
|
46
|
+
const copyPath = (0, react_1.useCallback)(() => {
|
|
47
|
+
if (sourcePath === null) {
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
(0, copy_text_1.copyText)(sourcePath)
|
|
51
|
+
.then(() => (0, NotificationCenter_1.showNotification)('Copied path', 1500))
|
|
52
|
+
.catch((err) => {
|
|
53
|
+
(0, NotificationCenter_1.showNotification)(`Could not copy path: ${err.message}`, 2000);
|
|
54
|
+
});
|
|
55
|
+
}, [sourcePath]);
|
|
38
56
|
(0, react_1.useEffect)(() => {
|
|
39
57
|
if (!canHaveKeyboardShortcuts) {
|
|
40
58
|
return;
|
|
@@ -66,8 +84,33 @@ const OpenInEditor = ({ stack, canHaveKeyboardShortcuts, editorId, editorName, s
|
|
|
66
84
|
type: 'item',
|
|
67
85
|
value: editor.id,
|
|
68
86
|
}));
|
|
69
|
-
|
|
70
|
-
|
|
87
|
+
if (sourcePath === null) {
|
|
88
|
+
return editorItems;
|
|
89
|
+
}
|
|
90
|
+
return [
|
|
91
|
+
...editorItems,
|
|
92
|
+
...(editorItems.length > 0
|
|
93
|
+
? [{ type: 'divider', id: 'copy-path-divider' }]
|
|
94
|
+
: []),
|
|
95
|
+
{
|
|
96
|
+
id: 'copy-path',
|
|
97
|
+
keyHint: null,
|
|
98
|
+
label: jsx_runtime_1.jsx("span", { style: menuLabel, children: "Copy path" }),
|
|
99
|
+
leftItem: jsx_runtime_1.jsx(clipboard_1.ClipboardIcon, { color: colors_1.LIGHT_TEXT, style: copyIcon }),
|
|
100
|
+
onClick: copyPath,
|
|
101
|
+
quickSwitcherLabel: null,
|
|
102
|
+
subMenu: null,
|
|
103
|
+
type: 'item',
|
|
104
|
+
value: 'copy-path',
|
|
105
|
+
},
|
|
106
|
+
];
|
|
107
|
+
}, [
|
|
108
|
+
copyPath,
|
|
109
|
+
editorId,
|
|
110
|
+
editorInfo === null || editorInfo === void 0 ? void 0 : editorInfo.installedEditors,
|
|
111
|
+
openWithEditor,
|
|
112
|
+
sourcePath,
|
|
113
|
+
]);
|
|
71
114
|
return (jsx_runtime_1.jsxs(AppLaunchButton_1.AppLaunchButton, { actionButtonId: "error-overlay-open-in-editor", ariaLabel: `Open in ${editorName}`, disabled: false, menuAriaLabel: "Open in another app", menuButtonId: "error-overlay-open-in-another-app", menuItems: menuItems, onConfigureApps: configureDefaultApps, onClick: openPreferredEditor, size: size, style: null, title: `Open in ${editorName}`, children: [
|
|
72
115
|
jsx_runtime_1.jsx(editor_1.EditorIcon, { editorId: editorId, size: size === 'default' ? 14 : 18 }),
|
|
73
116
|
"Open in ", editorName, canHaveKeyboardShortcuts ? (jsx_runtime_1.jsx(ShortcutHint_1.ShortcutHint, { keyToPress: "o", cmdOrCtrl: true })) : null] }));
|
|
@@ -13,7 +13,15 @@ const format_location_1 = require("./format-location");
|
|
|
13
13
|
const location = {
|
|
14
14
|
color: colors_1.LIGHT_TEXT,
|
|
15
15
|
fontFamily: 'monospace',
|
|
16
|
-
|
|
16
|
+
textAlign: 'left',
|
|
17
|
+
whiteSpace: 'nowrap',
|
|
18
|
+
};
|
|
19
|
+
const locationMask = 'linear-gradient(to right, black calc(100% - 20px), transparent)';
|
|
20
|
+
const locationContainer = {
|
|
21
|
+
...location,
|
|
22
|
+
maskImage: locationMask,
|
|
23
|
+
overflow: 'hidden',
|
|
24
|
+
WebkitMaskImage: locationMask,
|
|
17
25
|
};
|
|
18
26
|
const header = {
|
|
19
27
|
paddingTop: 10,
|
|
@@ -39,6 +47,27 @@ const StackElement = ({ s, lineNumberWidth, isFirst, defaultFunctionName, editor
|
|
|
39
47
|
!((_b = s.originalFileName) === null || _b === void 0 ? void 0 : _b.startsWith('webpack/'))) ||
|
|
40
48
|
isFirst;
|
|
41
49
|
});
|
|
50
|
+
const locationRef = (0, react_1.useRef)(null);
|
|
51
|
+
const [locationOverflows, setLocationOverflows] = (0, react_1.useState)(false);
|
|
52
|
+
const fileLocation = s.originalFileName
|
|
53
|
+
? `${(0, format_location_1.formatLocation)(s.originalFileName)}:${s.originalLineNumber}`
|
|
54
|
+
: null;
|
|
55
|
+
(0, react_1.useLayoutEffect)(() => {
|
|
56
|
+
const element = locationRef.current;
|
|
57
|
+
if (!element) {
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
const update = () => {
|
|
61
|
+
setLocationOverflows(element.scrollWidth > element.clientWidth);
|
|
62
|
+
};
|
|
63
|
+
update();
|
|
64
|
+
const observer = new ResizeObserver(update);
|
|
65
|
+
observer.observe(element);
|
|
66
|
+
if (element.firstElementChild) {
|
|
67
|
+
observer.observe(element.firstElementChild);
|
|
68
|
+
}
|
|
69
|
+
return () => observer.disconnect();
|
|
70
|
+
}, [fileLocation, fontSize]);
|
|
42
71
|
const canOpenFileLocation = Boolean(editorId && s.originalFileName);
|
|
43
72
|
const onOpenFileLocation = (0, react_1.useCallback)(() => {
|
|
44
73
|
if (!canOpenFileLocation) {
|
|
@@ -64,7 +93,7 @@ const StackElement = ({ s, lineNumberWidth, isFirst, defaultFunctionName, editor
|
|
|
64
93
|
paddingLeft: horizontalSpacing,
|
|
65
94
|
paddingRight: horizontalSpacing,
|
|
66
95
|
}, children: [
|
|
67
|
-
jsx_runtime_1.jsxs("div", { style: left, children: [functionName === null ? null : (jsx_runtime_1.jsx("div", { style: { ...fnName, fontSize }, children: functionName })),
|
|
96
|
+
jsx_runtime_1.jsxs("div", { style: left, children: [functionName === null ? null : (jsx_runtime_1.jsx("div", { style: { ...fnName, fontSize }, children: functionName })), fileLocation ? (jsx_runtime_1.jsx("div", { ref: locationRef, style: { ...locationContainer, fontSize }, title: locationOverflows ? fileLocation : undefined, children: canOpenFileLocation ? (jsx_runtime_1.jsx("button", { type: "button", className: `${hoverable_1.HOVERABLE_CLASS_NAME} ${hoverable_1.FOCUS_VISIBLE_ONLY_CLASS_NAME}`, onClick: onOpenFileLocation, style: {
|
|
68
97
|
...location,
|
|
69
98
|
...(0, hoverable_1.hoverableStyle)({
|
|
70
99
|
idleBackground: colors_1.TRANSPARENT,
|
|
@@ -78,7 +107,7 @@ const StackElement = ({ s, lineNumberWidth, isFirst, defaultFunctionName, editor
|
|
|
78
107
|
cursor: 'default',
|
|
79
108
|
fontSize,
|
|
80
109
|
padding: 0,
|
|
81
|
-
}, children:
|
|
110
|
+
}, children: fileLocation })) : (fileLocation) })) : null] }), headerAction, collapsible &&
|
|
82
111
|
s.originalScriptCode &&
|
|
83
112
|
s.originalScriptCode.length > 0 ? (jsx_runtime_1.jsx(Button_1.Button, { onClick: toggleCodeFrame, children: jsx_runtime_1.jsx("div", { style: {
|
|
84
113
|
display: 'flex',
|
|
@@ -1,12 +1,20 @@
|
|
|
1
1
|
import {
|
|
2
2
|
loadModelForJob
|
|
3
|
-
} from "./index-
|
|
3
|
+
} from "./index-09txs1bj.mjs";
|
|
4
|
+
import {
|
|
5
|
+
installRequiredPackages
|
|
6
|
+
} from "./index-dh3zk2hv.mjs";
|
|
4
7
|
import {
|
|
5
8
|
RenderQueueContext
|
|
6
|
-
} from "./index-
|
|
9
|
+
} from "./index-hqxc6tzp.mjs";
|
|
7
10
|
import {
|
|
11
|
+
callApi,
|
|
12
|
+
getBrowserStudioOperations,
|
|
8
13
|
writeStaticFile
|
|
9
|
-
} from "./index-
|
|
14
|
+
} from "./index-dfy1t576.mjs";
|
|
15
|
+
import"./index-qve7mdfp.mjs";
|
|
16
|
+
import"./index-5zrb1ft4.mjs";
|
|
17
|
+
import"./index-wqc43mw0.mjs";
|
|
10
18
|
import"./index-rcv7qkt5.mjs";
|
|
11
19
|
|
|
12
20
|
// src/components/RenderQueue/CaptionQueueProcessor.tsx
|
|
@@ -14,6 +22,7 @@ import {
|
|
|
14
22
|
canUseWhisperWebGpu,
|
|
15
23
|
clearStaleModels,
|
|
16
24
|
disposeWhisperModel,
|
|
25
|
+
downloadWhisperModel,
|
|
17
26
|
isWhisperModelCached,
|
|
18
27
|
loadWhisperModel,
|
|
19
28
|
toCaptions,
|
|
@@ -36,13 +45,24 @@ var resampleMediaTo16Khz = async ({
|
|
|
36
45
|
src,
|
|
37
46
|
audioStreamIndex,
|
|
38
47
|
requestInit,
|
|
39
|
-
onProgress
|
|
48
|
+
onProgress,
|
|
49
|
+
signal
|
|
40
50
|
}) => {
|
|
51
|
+
signal.throwIfAborted();
|
|
41
52
|
const input = new Input({
|
|
42
53
|
formats: ALL_FORMATS,
|
|
43
54
|
source: new UrlSource(src, requestInit === null ? {} : { requestInit })
|
|
44
55
|
});
|
|
45
56
|
const waveformChunks = [];
|
|
57
|
+
let conversion = null;
|
|
58
|
+
let cancellation = null;
|
|
59
|
+
const onAbort = () => {
|
|
60
|
+
cancellation = conversion?.cancel().catch(() => {
|
|
61
|
+
return;
|
|
62
|
+
}) ?? null;
|
|
63
|
+
input.dispose();
|
|
64
|
+
};
|
|
65
|
+
signal.addEventListener("abort", onAbort, { once: true });
|
|
46
66
|
try {
|
|
47
67
|
onProgress(0);
|
|
48
68
|
const audioTracks = await input.getAudioTracks();
|
|
@@ -58,7 +78,8 @@ var resampleMediaTo16Khz = async ({
|
|
|
58
78
|
format: new WavOutputFormat,
|
|
59
79
|
target: new NullTarget
|
|
60
80
|
});
|
|
61
|
-
|
|
81
|
+
signal.throwIfAborted();
|
|
82
|
+
conversion = await Conversion.init({
|
|
62
83
|
input,
|
|
63
84
|
output,
|
|
64
85
|
tracks: "all",
|
|
@@ -72,6 +93,7 @@ var resampleMediaTo16Khz = async ({
|
|
|
72
93
|
forceTranscode: true,
|
|
73
94
|
numberOfChannels: 1,
|
|
74
95
|
process: (sample) => {
|
|
96
|
+
signal.throwIfAborted();
|
|
75
97
|
const floats = new Float32Array(sample.allocationSize({ format: "f32", planeIndex: 0 }) / Float32Array.BYTES_PER_ELEMENT);
|
|
76
98
|
sample.copyTo(floats, { format: "f32", planeIndex: 0 });
|
|
77
99
|
waveformChunks.push({
|
|
@@ -85,13 +107,22 @@ var resampleMediaTo16Khz = async ({
|
|
|
85
107
|
};
|
|
86
108
|
}
|
|
87
109
|
});
|
|
110
|
+
signal.throwIfAborted();
|
|
88
111
|
if (!conversion.isValid) {
|
|
89
112
|
throw new Error("The audio track cannot be decoded in this browser. Try converting the media to WAV first.");
|
|
90
113
|
}
|
|
91
114
|
conversion.onProgress = (progress) => onProgress(progress);
|
|
92
115
|
await conversion.execute();
|
|
116
|
+
signal.throwIfAborted();
|
|
93
117
|
onProgress(1);
|
|
94
118
|
} finally {
|
|
119
|
+
signal.removeEventListener("abort", onAbort);
|
|
120
|
+
await cancellation;
|
|
121
|
+
if (signal.aborted && conversion && cancellation === null) {
|
|
122
|
+
await conversion.cancel().catch(() => {
|
|
123
|
+
return;
|
|
124
|
+
});
|
|
125
|
+
}
|
|
95
126
|
input.dispose();
|
|
96
127
|
}
|
|
97
128
|
const waveformLength = waveformChunks.reduce((maximum, chunk) => Math.max(maximum, chunk.startFrame + chunk.waveform.length), 0);
|
|
@@ -113,17 +144,23 @@ var CaptionQueueProcessor = () => {
|
|
|
113
144
|
updateCaptionJobProgress,
|
|
114
145
|
markCaptionJobDone,
|
|
115
146
|
markCaptionJobFailed,
|
|
147
|
+
markCaptionJobCancelled,
|
|
148
|
+
markCaptionJobSaving,
|
|
149
|
+
getAbortController,
|
|
116
150
|
setProcessCaptionJobCallback
|
|
117
151
|
} = useContext(RenderQueueContext);
|
|
118
152
|
const processJob = useCallback(async (job) => {
|
|
153
|
+
const { signal } = getAbortController(job.id);
|
|
119
154
|
let captionCount = null;
|
|
120
155
|
let processingError = null;
|
|
121
156
|
try {
|
|
157
|
+
signal.throwIfAborted();
|
|
122
158
|
updateCaptionJobProgress(job.id, {
|
|
123
159
|
message: "Checking WebGPU support...",
|
|
124
160
|
value: 0
|
|
125
161
|
});
|
|
126
162
|
const support = await canUseWhisperWebGpu();
|
|
163
|
+
signal.throwIfAborted();
|
|
127
164
|
if (!support.supported) {
|
|
128
165
|
throw new Error(support.detailedReason);
|
|
129
166
|
}
|
|
@@ -132,15 +169,21 @@ var CaptionQueueProcessor = () => {
|
|
|
132
169
|
value: 0.02
|
|
133
170
|
});
|
|
134
171
|
await clearStaleModels();
|
|
172
|
+
signal.throwIfAborted();
|
|
135
173
|
await loadModelForJob({
|
|
174
|
+
signal,
|
|
136
175
|
model: job.model,
|
|
137
176
|
progressStart: 0.03,
|
|
138
177
|
progressSpan: 0.27,
|
|
139
178
|
isModelCached: (model) => isWhisperModelCached({ model }),
|
|
140
|
-
loadModel: (model, onProgress) =>
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
179
|
+
loadModel: async (model, onProgress) => {
|
|
180
|
+
await downloadWhisperModel({
|
|
181
|
+
signal,
|
|
182
|
+
model,
|
|
183
|
+
onProgress: (progress) => onProgress(progress.progress)
|
|
184
|
+
});
|
|
185
|
+
await loadWhisperModel({ model, signal });
|
|
186
|
+
},
|
|
144
187
|
updateProgress: (progress) => updateCaptionJobProgress(job.id, progress)
|
|
145
188
|
});
|
|
146
189
|
updateCaptionJobProgress(job.id, {
|
|
@@ -148,6 +191,7 @@ var CaptionQueueProcessor = () => {
|
|
|
148
191
|
value: 0.3
|
|
149
192
|
});
|
|
150
193
|
const channelWaveform = await resampleMediaTo16Khz({
|
|
194
|
+
signal,
|
|
151
195
|
src: job.src,
|
|
152
196
|
audioStreamIndex: job.audioStreamIndex,
|
|
153
197
|
requestInit: job.requestInit,
|
|
@@ -163,6 +207,7 @@ var CaptionQueueProcessor = () => {
|
|
|
163
207
|
value: 0.5
|
|
164
208
|
});
|
|
165
209
|
const transcription = await transcribe({
|
|
210
|
+
signal,
|
|
166
211
|
channelWaveform,
|
|
167
212
|
model: job.model,
|
|
168
213
|
task: job.task,
|
|
@@ -179,14 +224,37 @@ var CaptionQueueProcessor = () => {
|
|
|
179
224
|
const { captions } = toCaptions({
|
|
180
225
|
whisperWebGpuOutput: transcription
|
|
181
226
|
});
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
227
|
+
signal.throwIfAborted();
|
|
228
|
+
markCaptionJobSaving(job.id);
|
|
229
|
+
if (job.target === null) {
|
|
230
|
+
updateCaptionJobProgress(job.id, {
|
|
231
|
+
message: `Saving ${job.outName}...`,
|
|
232
|
+
value: 0.95
|
|
233
|
+
});
|
|
234
|
+
await writeStaticFile({
|
|
235
|
+
contents: JSON.stringify(captions, null, 2),
|
|
236
|
+
filePath: job.outName
|
|
237
|
+
});
|
|
238
|
+
} else {
|
|
239
|
+
updateCaptionJobProgress(job.id, {
|
|
240
|
+
message: "Adding Basic captions...",
|
|
241
|
+
value: 0.95
|
|
242
|
+
});
|
|
243
|
+
await installRequiredPackages([
|
|
244
|
+
{ name: "@remotion/captions", version: null }
|
|
245
|
+
]);
|
|
246
|
+
const request = {
|
|
247
|
+
fileName: job.target.fileName,
|
|
248
|
+
nodePath: job.target.nodePath.nodePath,
|
|
249
|
+
durationInFrames: job.target.durationInFrames,
|
|
250
|
+
captions
|
|
251
|
+
};
|
|
252
|
+
const browserStudioOperations = getBrowserStudioOperations();
|
|
253
|
+
const response = browserStudioOperations ? await browserStudioOperations.insertBasicCaptions(request) : await callApi("/api/insert-basic-captions", request);
|
|
254
|
+
if (!response.success) {
|
|
255
|
+
throw new Error(response.reason);
|
|
256
|
+
}
|
|
257
|
+
}
|
|
190
258
|
captionCount = captions.length;
|
|
191
259
|
} catch (error) {
|
|
192
260
|
processingError = error instanceof Error ? error : new Error(String(error));
|
|
@@ -194,12 +262,21 @@ var CaptionQueueProcessor = () => {
|
|
|
194
262
|
try {
|
|
195
263
|
await disposeWhisperModel({ model: job.model });
|
|
196
264
|
} catch {}
|
|
197
|
-
if (
|
|
265
|
+
if (signal.aborted) {
|
|
266
|
+
markCaptionJobCancelled(job.id);
|
|
267
|
+
} else if (processingError) {
|
|
198
268
|
markCaptionJobFailed(job.id, processingError);
|
|
199
269
|
} else {
|
|
200
270
|
markCaptionJobDone(job.id, captionCount ?? 0);
|
|
201
271
|
}
|
|
202
|
-
}, [
|
|
272
|
+
}, [
|
|
273
|
+
getAbortController,
|
|
274
|
+
markCaptionJobCancelled,
|
|
275
|
+
markCaptionJobDone,
|
|
276
|
+
markCaptionJobFailed,
|
|
277
|
+
markCaptionJobSaving,
|
|
278
|
+
updateCaptionJobProgress
|
|
279
|
+
]);
|
|
203
280
|
useEffect(() => {
|
|
204
281
|
setProcessCaptionJobCallback(processJob);
|
|
205
282
|
return () => setProcessCaptionJobCallback(null);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Models
|
|
3
|
+
} from "./index-9q9w8v9p.mjs";
|
|
4
|
+
import"./index-t7xnxdf8.mjs";
|
|
5
|
+
import"./index-890dd9b3.mjs";
|
|
6
|
+
import"./index-qve7mdfp.mjs";
|
|
7
|
+
import"./index-5zrb1ft4.mjs";
|
|
8
|
+
import"./index-wqc43mw0.mjs";
|
|
9
|
+
import"./index-rcv7qkt5.mjs";
|
|
10
|
+
export {
|
|
11
|
+
Models as default
|
|
12
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Models
|
|
3
|
+
} from "./index-8nt6a0mw.mjs";
|
|
4
|
+
import"./index-t7xnxdf8.mjs";
|
|
5
|
+
import"./index-890dd9b3.mjs";
|
|
6
|
+
import"./index-qve7mdfp.mjs";
|
|
7
|
+
import"./index-5zrb1ft4.mjs";
|
|
8
|
+
import"./index-wqc43mw0.mjs";
|
|
9
|
+
import"./index-rcv7qkt5.mjs";
|
|
10
|
+
export {
|
|
11
|
+
Models as default
|
|
12
|
+
};
|
|
@@ -2,11 +2,10 @@ import {
|
|
|
2
2
|
useModelCacheStatus
|
|
3
3
|
} from "./index-7tt71e8n.mjs";
|
|
4
4
|
import {
|
|
5
|
-
GearIcon,
|
|
6
5
|
NumberSetting,
|
|
7
6
|
getDefaultCaptionOutputName,
|
|
8
7
|
validateCaptionOutputName
|
|
9
|
-
} from "./index-
|
|
8
|
+
} from "./index-xac20sv4.mjs";
|
|
10
9
|
import {
|
|
11
10
|
Button,
|
|
12
11
|
Checkbox,
|
|
@@ -14,9 +13,9 @@ import {
|
|
|
14
13
|
Combobox,
|
|
15
14
|
DismissableModal,
|
|
16
15
|
ExpandedFolderIconSolid,
|
|
16
|
+
GearIcon,
|
|
17
17
|
InfoBubble,
|
|
18
18
|
ModalHeader,
|
|
19
|
-
ModelsIcon,
|
|
20
19
|
RemotionInput,
|
|
21
20
|
RenderModalHr,
|
|
22
21
|
SetSelectedModalContext,
|
|
@@ -30,24 +29,28 @@ import {
|
|
|
30
29
|
optionsSidebarTabs,
|
|
31
30
|
persistSelectedOptionsSidebarPanel,
|
|
32
31
|
rightRow,
|
|
33
|
-
showNotification,
|
|
34
32
|
useStaticFiles
|
|
35
|
-
} from "./index-
|
|
33
|
+
} from "./index-x6r9bn12.mjs";
|
|
34
|
+
import {
|
|
35
|
+
showNotification
|
|
36
|
+
} from "./index-dh3zk2hv.mjs";
|
|
36
37
|
import {
|
|
37
38
|
RenderQueueContext
|
|
38
|
-
} from "./index-
|
|
39
|
+
} from "./index-hqxc6tzp.mjs";
|
|
39
40
|
import {
|
|
40
41
|
openInFileExplorer
|
|
41
|
-
} from "./index-
|
|
42
|
+
} from "./index-s6qya2gg.mjs";
|
|
42
43
|
import {
|
|
43
44
|
getBrowserStudioOperations
|
|
44
|
-
} from "./index-
|
|
45
|
+
} from "./index-dfy1t576.mjs";
|
|
46
|
+
import"./index-t7tbt980.mjs";
|
|
45
47
|
import {
|
|
46
48
|
Models
|
|
47
|
-
} from "./index-
|
|
48
|
-
import"./index-
|
|
49
|
+
} from "./index-9q9w8v9p.mjs";
|
|
50
|
+
import"./index-t7xnxdf8.mjs";
|
|
49
51
|
import {
|
|
50
52
|
InlineAction,
|
|
53
|
+
ModelsIcon,
|
|
51
54
|
Spacing,
|
|
52
55
|
VERTICAL_SCROLLBAR_CLASSNAME,
|
|
53
56
|
ValidationMessage,
|
|
@@ -61,13 +64,14 @@ import {
|
|
|
61
64
|
leftSidebar,
|
|
62
65
|
optionsPanel,
|
|
63
66
|
outerModalStyle
|
|
64
|
-
} from "./index-
|
|
67
|
+
} from "./index-890dd9b3.mjs";
|
|
68
|
+
import"./index-qve7mdfp.mjs";
|
|
65
69
|
import"./index-5zrb1ft4.mjs";
|
|
66
70
|
import {
|
|
67
71
|
BLUE_DISABLED,
|
|
68
72
|
LIGHT_TEXT,
|
|
69
73
|
WHITE
|
|
70
|
-
} from "./index-
|
|
74
|
+
} from "./index-wqc43mw0.mjs";
|
|
71
75
|
import"./index-rcv7qkt5.mjs";
|
|
72
76
|
|
|
73
77
|
// src/components/Transcription/TranscriptionModal.tsx
|
|
@@ -770,7 +774,8 @@ var TranscriptionModal = ({
|
|
|
770
774
|
audioStreamIndex,
|
|
771
775
|
displayName,
|
|
772
776
|
requestInit,
|
|
773
|
-
src
|
|
777
|
+
src,
|
|
778
|
+
target
|
|
774
779
|
}) => {
|
|
775
780
|
const [tab, setTab] = useState("transcribe");
|
|
776
781
|
const isModelCached = useCallback((model) => isWhisperModelCached({ model }), []);
|
|
@@ -811,8 +816,8 @@ var TranscriptionModal = ({
|
|
|
811
816
|
};
|
|
812
817
|
}, []);
|
|
813
818
|
const normalizedOutName = outName.normalize("NFC").toLowerCase();
|
|
814
|
-
const queuedOutputExists = captionJobs.some((job) => (job.status === "idle" || job.status === "running") && job.outName.normalize("NFC").toLowerCase() === normalizedOutName);
|
|
815
|
-
const outputValidationMessage = validateCaptionOutputName(outName) ?? (queuedOutputExists ? "Another caption job is already using this output file" : null);
|
|
819
|
+
const queuedOutputExists = captionJobs.some((job) => job.target === null && (job.status === "idle" || job.status === "running" || job.status === "saving") && job.outName.normalize("NFC").toLowerCase() === normalizedOutName);
|
|
820
|
+
const outputValidationMessage = target === null ? validateCaptionOutputName(outName) ?? (queuedOutputExists ? "Another caption job is already using this output file" : null) : null;
|
|
816
821
|
const exists = staticFiles.some((file) => file.name.normalize("NFC").toLowerCase() === normalizedOutName);
|
|
817
822
|
const chunkValidationMessage = strideLengthInSeconds * 2 >= chunkLengthInSeconds ? "Stride length must be less than half of chunk length" : null;
|
|
818
823
|
const decodingValidationMessage = !Number.isFinite(temperature) ? "Temperature must be a finite number greater than 0" : temperature <= 0 ? "Temperature must be greater than 0" : !Number.isInteger(topK) || topK < 0 ? "Top K must be a non-negative integer" : !Number.isFinite(repetitionPenalty) ? "Repetition penalty must be a finite number greater than 0" : repetitionPenalty <= 0 ? "Repetition penalty must be greater than 0" : !Number.isInteger(noRepeatNgramSize) || noRepeatNgramSize < 0 ? "No-repeat n-gram size must be a non-negative integer" : null;
|
|
@@ -834,7 +839,8 @@ var TranscriptionModal = ({
|
|
|
834
839
|
displayName,
|
|
835
840
|
audioStreamIndex,
|
|
836
841
|
requestInit,
|
|
837
|
-
outName,
|
|
842
|
+
outName: target === null ? outName : "Basic captions",
|
|
843
|
+
target,
|
|
838
844
|
model: selectedModel,
|
|
839
845
|
language: modelInfo.multilingual ? selectedLanguage : null,
|
|
840
846
|
task: modelInfo.supportsTranslation ? selectedTask : "transcribe",
|
|
@@ -861,6 +867,7 @@ var TranscriptionModal = ({
|
|
|
861
867
|
forceFullSequences,
|
|
862
868
|
noRepeatNgramSize,
|
|
863
869
|
outName,
|
|
870
|
+
target,
|
|
864
871
|
repetitionPenalty,
|
|
865
872
|
requestInit,
|
|
866
873
|
src,
|
|
@@ -873,13 +880,14 @@ var TranscriptionModal = ({
|
|
|
873
880
|
temperature,
|
|
874
881
|
topK
|
|
875
882
|
]);
|
|
883
|
+
const title = target === null ? `Transcribe ${displayName}` : "Generate captions";
|
|
876
884
|
return /* @__PURE__ */ jsx(DismissableModal, {
|
|
877
|
-
ariaLabel:
|
|
885
|
+
ariaLabel: title,
|
|
878
886
|
children: /* @__PURE__ */ jsxs("div", {
|
|
879
887
|
style: transcriptionModalStyle,
|
|
880
888
|
children: [
|
|
881
889
|
/* @__PURE__ */ jsx(ModalHeader, {
|
|
882
|
-
title
|
|
890
|
+
title
|
|
883
891
|
}),
|
|
884
892
|
/* @__PURE__ */ jsxs("div", {
|
|
885
893
|
style: container,
|
|
@@ -895,7 +903,7 @@ var TranscriptionModal = ({
|
|
|
895
903
|
...buttonStyle,
|
|
896
904
|
backgroundColor: canTranscribe ? buttonStyle.backgroundColor : BLUE_DISABLED
|
|
897
905
|
},
|
|
898
|
-
children: "Transcribe"
|
|
906
|
+
children: target === null ? "Transcribe" : "Generate captions"
|
|
899
907
|
})
|
|
900
908
|
]
|
|
901
909
|
}),
|
|
@@ -951,13 +959,13 @@ var TranscriptionModal = ({
|
|
|
951
959
|
style: tab === "transcribe" ? settingsPanel : hiddenPanel,
|
|
952
960
|
className: VERTICAL_SCROLLBAR_CLASSNAME,
|
|
953
961
|
children: [
|
|
954
|
-
/* @__PURE__ */ jsx(OutputSettings, {
|
|
962
|
+
target === null ? /* @__PURE__ */ jsx(OutputSettings, {
|
|
955
963
|
exists,
|
|
956
964
|
onOutNameChange,
|
|
957
965
|
outName,
|
|
958
966
|
validationMessage: outputValidationMessage
|
|
959
|
-
}),
|
|
960
|
-
/* @__PURE__ */ jsx(RenderModalHr, {}),
|
|
967
|
+
}) : null,
|
|
968
|
+
target === null ? /* @__PURE__ */ jsx(RenderModalHr, {}) : null,
|
|
961
969
|
/* @__PURE__ */ jsx(ModelSettings, {
|
|
962
970
|
cachedModels,
|
|
963
971
|
selectedLanguage,
|