@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.
- package/dist/api/focus-default-props-path.js +7 -1
- package/dist/api/restart-studio.d.ts +1 -1
- package/dist/api/restart-studio.js +1 -1
- package/dist/components/AgentPrompt.d.ts +6 -0
- package/dist/components/AgentPrompt.js +107 -0
- package/dist/components/AssetFileIcon.js +2 -0
- package/dist/components/AssetSelectorItem.d.ts +1 -23
- package/dist/components/AssetSelectorItem.js +10 -200
- package/dist/components/Canvas.js +109 -44
- package/dist/components/CanvasCaptureDropHandler.js +63 -0
- package/dist/components/CanvasOrLoading.js +10 -2
- package/dist/components/CaptionInspector.js +9 -3
- package/dist/{error-overlay/remotion-overlay → components}/CodeFrame.d.ts +2 -0
- package/dist/components/CodeFrame.js +77 -0
- package/dist/components/CompositionSelectorItem.js +7 -17
- package/dist/components/CurrentAsset.js +6 -4
- package/dist/components/ElementInstallConfirmation.js +69 -38
- package/dist/components/FilePreview.js +4 -0
- package/dist/components/FixComputedValueModal.js +64 -96
- package/dist/components/GenerateWithAgentModal.d.ts +9 -0
- package/dist/components/GenerateWithAgentModal.js +39 -0
- package/dist/components/InitialCompositionLoader.js +1 -1
- package/dist/components/InlineDropdown.js +26 -2
- package/dist/components/InlineEditableTitle.js +3 -0
- package/dist/components/InspectorOpenInEditor.js +8 -4
- package/dist/components/InspectorPanel/CollapsibleInspectorSection.d.ts +7 -0
- package/dist/components/InspectorPanel/CollapsibleInspectorSection.js +14 -0
- package/dist/components/InspectorPanel/CollapsibleInspectorSectionHeader.d.ts +1 -1
- package/dist/components/InspectorPanel/CollapsibleInspectorSectionHeader.js +20 -8
- package/dist/components/InspectorPanel/CompositionInspector.js +32 -15
- package/dist/components/InspectorPanel/CompositionMetadata.js +7 -0
- package/dist/components/InspectorPanel/ConnectedCompositionsSection.js +6 -12
- package/dist/components/InspectorPanel/ElementLibraryButton.js +2 -0
- package/dist/components/InspectorPanel/GuideInspector.js +2 -3
- package/dist/components/InspectorPanel/KeyframeSettings.js +5 -6
- package/dist/components/InspectorPanel/MultiSequenceInspector.js +34 -2
- package/dist/components/InspectorPanel/SequenceSelectionInspector.js +45 -4
- package/dist/components/InspectorPanel/common.d.ts +4 -0
- package/dist/components/InspectorPanel/common.js +15 -2
- package/dist/components/InspectorPanel/styles.d.ts +0 -3
- package/dist/components/InspectorPanel/styles.js +3 -27
- package/dist/components/InspectorPanel/use-composition-actions.d.ts +2 -0
- package/dist/components/InspectorPanel/use-composition-actions.js +16 -0
- package/dist/components/InspectorPanel/use-inspector-section-expanded.d.ts +1 -0
- package/dist/components/InspectorPanel/use-inspector-section-expanded.js +21 -0
- package/dist/components/InspectorSequenceSection.js +44 -35
- package/dist/components/InspectorSourceLocation.js +4 -0
- package/dist/components/KeyboardShortcutsSettings.js +12 -4
- package/dist/components/LutPreview.d.ts +4 -0
- package/dist/components/LutPreview.js +192 -0
- package/dist/components/MenuBuildIndicator.js +1 -0
- package/dist/components/MenuCompositionName.js +4 -9
- package/dist/components/Modals.js +3 -6
- package/dist/components/ModelsSettings.js +15 -4
- package/dist/components/NewComposition/CancelButton.js +1 -1
- package/dist/components/Notifications/NotificationCenter.d.ts +0 -1
- package/dist/components/Notifications/NotificationCenter.js +1 -22
- package/dist/components/Preview.js +3 -0
- package/dist/components/QuickSwitcher/ExplorerQuickSwitcherTrigger.js +1 -0
- package/dist/components/QuickSwitcher/QuickSwitcherContent.js +1 -0
- package/dist/components/QuickSwitcher/QuickSwitcherResult.js +4 -9
- package/dist/components/RadioButton.js +1 -0
- package/dist/components/RenderModal/DataEditor.js +4 -1
- package/dist/components/RenderModal/SchemaEditor/scroll-to-default-props-path.d.ts +1 -0
- package/dist/components/RenderModal/SchemaEditor/scroll-to-default-props-path.js +2 -1
- package/dist/components/RenderModal/WebRenderModal.js +10 -2
- package/dist/components/RenderQueue/CaptionQueueItem.js +5 -2
- package/dist/components/RenderQueue/CaptionQueueProcessor.js +35 -8
- package/dist/components/RenderQueue/VideoMattingQueueItem.js +1 -0
- package/dist/components/RenderQueue/caption-job-types.d.ts +6 -0
- package/dist/components/RenderQueue/index.js +1 -0
- package/dist/components/RendersTab.js +4 -0
- package/dist/components/SelectedOutlineElement.js +6 -0
- package/dist/components/SelectedOutlineSnapIndicators.d.ts +6 -0
- package/dist/components/SelectedOutlineSnapIndicators.js +16 -12
- package/dist/components/SequencePropsSubscriptionProvider.d.ts +3 -0
- package/dist/components/SequencePropsSubscriptionProvider.js +8 -6
- package/dist/components/SettingsButton.js +11 -2
- package/dist/components/SettingsModal.d.ts +1 -2
- package/dist/components/SettingsModal.js +24 -6
- package/dist/components/SettingsModalFooter.js +17 -3
- package/dist/components/SkillsSettings.d.ts +5 -0
- package/dist/components/SkillsSettings.js +29 -26
- package/dist/components/Timeline/Timeline.js +10 -11
- package/dist/components/Timeline/TimelineAssetField.js +81 -51
- package/dist/components/Timeline/TimelineDeleteKeybindings.js +6 -9
- package/dist/components/Timeline/TimelineEffectItem.js +1 -0
- package/dist/components/Timeline/TimelineExpandArrowButton.js +1 -0
- package/dist/components/Timeline/TimelineExpandedRow.js +1 -0
- package/dist/components/Timeline/TimelineFieldLabel.js +1 -0
- package/dist/components/Timeline/TimelineHeightContainer.js +11 -1
- package/dist/components/Timeline/TimelineKeyframeControls.js +16 -1
- package/dist/components/Timeline/TimelineLayerChildren.d.ts +3 -3
- package/dist/components/Timeline/TimelineLayerChildren.js +11 -9
- package/dist/components/Timeline/TimelineLayerEye.d.ts +1 -1
- package/dist/components/Timeline/TimelineLayerEye.js +6 -3
- package/dist/components/Timeline/TimelineList.js +9 -3
- package/dist/components/Timeline/TimelineSchemaField.js +2 -6
- package/dist/components/Timeline/TimelineSelection.d.ts +14 -3
- package/dist/components/Timeline/TimelineSelection.js +91 -49
- package/dist/components/Timeline/TimelineSequence.js +28 -2
- package/dist/components/Timeline/TimelineSequenceFrame.js +1 -0
- package/dist/components/Timeline/TimelineSequenceItem.d.ts +2 -0
- package/dist/components/Timeline/TimelineSequenceItem.js +45 -13
- package/dist/components/Timeline/TimelineViewport.d.ts +1 -0
- package/dist/components/Timeline/TimelineViewport.js +10 -1
- package/dist/components/Timeline/TimelineVirtualization.d.ts +3 -3
- package/dist/components/Timeline/delete-selected-timeline-item.js +2 -2
- package/dist/components/Timeline/get-sequence-context-menu-items.d.ts +6 -2
- package/dist/components/Timeline/get-sequence-context-menu-items.js +143 -46
- package/dist/components/Timeline/normalize-font-weight-for-keyframe.d.ts +1 -0
- package/dist/components/Timeline/normalize-font-weight-for-keyframe.js +19 -0
- package/dist/components/Timeline/split-selected-timeline-item.d.ts +13 -10
- package/dist/components/Timeline/split-selected-timeline-item.js +58 -35
- package/dist/components/Timeline/timeline-display-groups.d.ts +9 -0
- package/dist/components/Timeline/timeline-display-groups.js +66 -0
- package/dist/components/Timeline/use-timeline-asset-drop.js +21 -21
- package/dist/components/Timeline/use-timeline-expanded-tree.d.ts +2 -1
- package/dist/components/Timeline/use-timeline-expanded-tree.js +1 -2
- package/dist/components/TimelineCombobox.js +1 -0
- package/dist/components/Transcription/TranscriptionModal.js +16 -11
- package/dist/components/Transcription/TranscriptionModalWithOptionalWhisper.js +1 -1
- package/dist/components/UpdateStatusContext.d.ts +2 -2
- package/dist/components/UpdateStatusContext.js +6 -7
- package/dist/components/UpdatesSettings.js +6 -6
- package/dist/components/WebMcp.js +41 -41
- package/dist/components/asset-context-menu.d.ts +32 -0
- package/dist/components/asset-context-menu.js +242 -0
- package/dist/components/composition-drop-preview.d.ts +9 -2
- package/dist/components/composition-drop-preview.js +7 -4
- package/dist/components/composition-menu-items.d.ts +4 -6
- package/dist/components/composition-menu-items.js +191 -75
- 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/get-open-in-menu-items.d.ts +6 -5
- package/dist/components/get-open-in-menu-items.js +22 -16
- 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-order.js +18 -12
- package/dist/components/use-open-in-menu-apps.d.ts +14 -0
- package/dist/components/use-open-in-menu-apps.js +33 -0
- package/dist/error-overlay/remotion-overlay/ErrorDisplay.js +2 -2
- package/dist/error-overlay/remotion-overlay/OpenInEditor.d.ts +1 -0
- package/dist/error-overlay/remotion-overlay/OpenInEditor.js +3 -3
- package/dist/error-overlay/remotion-overlay/StackFrame.d.ts +5 -1
- package/dist/error-overlay/remotion-overlay/StackFrame.js +26 -19
- package/dist/esm/{CaptionQueueProcessor-k0yrm3dj.mjs → CaptionQueueProcessor-npa6szn1.mjs} +39 -8
- package/dist/esm/{LazyModels-gfmpcy4h.mjs → LazyModels-nh3c8h9p.mjs} +4 -3
- package/dist/esm/{LazyModels-m1rf06wh.mjs → LazyModels-rr5v8h5y.mjs} +4 -3
- package/dist/esm/{TranscriptionModal-8pvrehg4.mjs → TranscriptionModal-79m5wgcj.mjs} +25 -17
- package/dist/esm/{VideoMattingModal-fefbzgka.mjs → VideoMattingModal-31pew0xj.mjs} +9 -6
- package/dist/esm/index-21hxsfaa.mjs +239 -0
- package/dist/esm/{index-s848rffx.mjs → index-4zen9prq.mjs} +5438 -4686
- package/dist/esm/index-5t2dwxsk.mjs +530 -0
- package/dist/esm/{index-vsxrxfpj.mjs → index-614tdz2q.mjs} +1 -1
- package/dist/esm/{index-0x13f28h.mjs → index-9xxg6218.mjs} +20 -541
- package/dist/esm/{index-hbezgbbq.mjs → index-ac5550e7.mjs} +1 -1
- package/dist/esm/{index-41kqns5c.mjs → index-e855w59j.mjs} +15 -92
- package/dist/esm/{index-tzxb8808.mjs → index-n5gmcvhz.mjs} +8 -8
- package/dist/esm/{index-ggqpre9v.mjs → index-ppspzgn9.mjs} +4963 -4178
- package/dist/esm/{index-jrw61pkj.mjs → index-r0ejh5sy.mjs} +1 -1
- package/dist/esm/index-r1gr3j3a.mjs +80 -0
- package/dist/esm/{index-mww32xc8.mjs → index-s7qa3xbw.mjs} +6 -4
- package/dist/esm/{index-1089795y.mjs → index-vxwg66ar.mjs} +7 -22
- package/dist/esm/index.mjs +13 -6
- package/dist/esm/internals.mjs +10 -7
- package/dist/esm/previewEntry.mjs +10 -7
- package/dist/esm/{resolve-composition-component-location-bt2d6qxq.mjs → resolve-composition-component-location-qrp05g62.mjs} +1 -1
- package/dist/helpers/client-id.d.ts +1 -0
- package/dist/helpers/client-id.js +8 -4
- package/dist/helpers/copy-text.js +1 -16
- package/dist/helpers/cube-lut.d.ts +12 -0
- package/dist/helpers/cube-lut.js +160 -0
- package/dist/helpers/get-preview-file-type.d.ts +1 -1
- package/dist/helpers/get-preview-file-type.js +3 -0
- package/dist/helpers/hoverable.js +2 -1
- package/dist/helpers/open-in-editor.d.ts +5 -2
- package/dist/helpers/open-in-editor.js +13 -5
- package/dist/helpers/settings-tab-availability.d.ts +14 -0
- package/dist/helpers/settings-tab-availability.js +35 -0
- package/dist/helpers/studio-runtime-config.d.ts +1 -1
- 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 +31 -21
- package/dist/icons/lut.d.ts +4 -0
- package/dist/icons/lut.js +6 -0
- package/dist/icons/sparkles.d.ts +4 -0
- package/dist/icons/sparkles.js +6 -0
- package/dist/state/modals.d.ts +17 -2
- package/dist/state/timeline-zoom.js +4 -0
- package/package.json +19 -19
- package/dist/components/delete-jsx-node-api.d.ts +0 -2
- package/dist/error-overlay/remotion-overlay/CodeFrame.js +0 -62
|
@@ -5,10 +5,13 @@ const no_react_1 = require("remotion/no-react");
|
|
|
5
5
|
const format_file_location_1 = require("../helpers/format-file-location");
|
|
6
6
|
const get_git_menu_item_1 = require("../helpers/get-git-menu-item");
|
|
7
7
|
const open_in_editor_1 = require("../helpers/open-in-editor");
|
|
8
|
+
const get_open_in_menu_items_1 = require("./get-open-in-menu-items");
|
|
8
9
|
const NotificationCenter_1 = require("./Notifications/NotificationCenter");
|
|
9
10
|
const open_in_new_window_1 = require("./open-in-new-window");
|
|
10
|
-
const
|
|
11
|
+
const actions_1 = require("./RenderQueue/actions");
|
|
12
|
+
const getCompositionMenuItems = ({ composition, connectionStatus, resolvedLocation, setSelectedModal, closeMenu, readOnlyStudio, includeCompositionManagementItems, openInApps, }) => {
|
|
11
13
|
var _a;
|
|
14
|
+
const { canOpenDesktopApps, canOpenInEditor, codingAgentInfo, defaultEditorId, defaultEditorName, editorInfo, onConfigureApps, } = openInApps;
|
|
12
15
|
const fileLocation = (0, format_file_location_1.formatFileLocation)({
|
|
13
16
|
location: resolvedLocation,
|
|
14
17
|
root: window.remotion_cwd,
|
|
@@ -18,121 +21,234 @@ const getCompositionMenuItems = ({ composition, connectionStatus, resolvedLocati
|
|
|
18
21
|
name: (_a = composition === null || composition === void 0 ? void 0 : composition.id) !== null && _a !== void 0 ? _a : null,
|
|
19
22
|
root: window.remotion_cwd,
|
|
20
23
|
});
|
|
21
|
-
const
|
|
22
|
-
|
|
23
|
-
connectionStatus !== 'connected' ||
|
|
24
|
-
!resolvedLocation;
|
|
25
|
-
const openComponentInEditorDisabled = showInEditorDisabled || !(resolvedLocation === null || resolvedLocation === void 0 ? void 0 : resolvedLocation.source);
|
|
24
|
+
const openCompositionInEditorDisabled = !defaultEditorId || !composition || !canOpenInEditor || !resolvedLocation;
|
|
25
|
+
const openComponentInEditorDisabled = openCompositionInEditorDisabled || !(resolvedLocation === null || resolvedLocation === void 0 ? void 0 : resolvedLocation.source);
|
|
26
26
|
const gitSourceName = window.remotion_gitSource
|
|
27
27
|
? (0, get_git_menu_item_1.getGitSourceName)(window.remotion_gitSource)
|
|
28
28
|
: null;
|
|
29
|
+
const defaultOpenInTarget = (0, get_git_menu_item_1.getDefaultOpenInTarget)({ canOpenInEditor });
|
|
30
|
+
const defaultOpenInName = defaultOpenInTarget === 'editor' ? defaultEditorName : gitSourceName;
|
|
29
31
|
const openCompositionInGitSourceDisabled = !composition || !resolvedLocation;
|
|
30
32
|
const openComponentInGitSourceDisabled = openCompositionInGitSourceDisabled ||
|
|
31
33
|
!(resolvedLocation === null || resolvedLocation === void 0 ? void 0 : resolvedLocation.source) ||
|
|
32
34
|
(!readOnlyStudio && connectionStatus !== 'connected');
|
|
33
35
|
const copyFileLocationDisabled = !composition || !fileLocation;
|
|
36
|
+
const openWithCodingAgent = async (codingAgentId, codingAgentName) => {
|
|
37
|
+
try {
|
|
38
|
+
const response = await (0, open_in_editor_1.openInCodingAgent)(codingAgentId, codingAgentId === 'copilot' ? null : contextForAgents);
|
|
39
|
+
if (!response.success) {
|
|
40
|
+
(0, NotificationCenter_1.showNotification)(`Could not open ${codingAgentName}`, 2000);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
catch (err) {
|
|
44
|
+
(0, NotificationCenter_1.showNotification)(err.message, 2000);
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
const openCompositionWithEditor = async (editorId) => {
|
|
48
|
+
closeMenu();
|
|
49
|
+
if (!composition || !resolvedLocation) {
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
try {
|
|
53
|
+
await (0, open_in_editor_1.openOriginalPositionInEditor)(resolvedLocation, editorId);
|
|
54
|
+
}
|
|
55
|
+
catch (err) {
|
|
56
|
+
(0, NotificationCenter_1.showNotification)(err.message, 2000);
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
const openComponentWithEditor = async (editorId) => {
|
|
60
|
+
closeMenu();
|
|
61
|
+
if (!composition || !(resolvedLocation === null || resolvedLocation === void 0 ? void 0 : resolvedLocation.source)) {
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
try {
|
|
65
|
+
await (0, open_in_editor_1.openCompositionComponentInEditor)({
|
|
66
|
+
compositionFile: resolvedLocation.source,
|
|
67
|
+
compositionId: composition.id,
|
|
68
|
+
editorId,
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
catch (err) {
|
|
72
|
+
(0, NotificationCenter_1.showNotification)(err.message, 2000);
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
const openComponentInGitSource = async () => {
|
|
76
|
+
closeMenu();
|
|
77
|
+
if (!composition || !(resolvedLocation === null || resolvedLocation === void 0 ? void 0 : resolvedLocation.source)) {
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
try {
|
|
81
|
+
const info = await (0, open_in_editor_1.loadCompositionComponentInfo)({
|
|
82
|
+
compositionFile: resolvedLocation.source,
|
|
83
|
+
compositionId: composition.id,
|
|
84
|
+
});
|
|
85
|
+
(0, get_git_menu_item_1.openGitSource)({ folder: false, location: info.location });
|
|
86
|
+
}
|
|
87
|
+
catch (err) {
|
|
88
|
+
(0, NotificationCenter_1.showNotification)(err.message, 2000);
|
|
89
|
+
}
|
|
90
|
+
};
|
|
91
|
+
const openCompositionInFileExplorer = () => {
|
|
92
|
+
if (!(resolvedLocation === null || resolvedLocation === void 0 ? void 0 : resolvedLocation.source)) {
|
|
93
|
+
return;
|
|
94
|
+
}
|
|
95
|
+
(0, actions_1.openInFileExplorer)({ directory: resolvedLocation.source }).catch((err) => {
|
|
96
|
+
(0, NotificationCenter_1.showNotification)(`Could not open file: ${err.message}`, 2000);
|
|
97
|
+
});
|
|
98
|
+
};
|
|
99
|
+
const openComponentInFileExplorer = async () => {
|
|
100
|
+
if (!composition || !(resolvedLocation === null || resolvedLocation === void 0 ? void 0 : resolvedLocation.source)) {
|
|
101
|
+
return;
|
|
102
|
+
}
|
|
103
|
+
try {
|
|
104
|
+
const info = await (0, open_in_editor_1.loadCompositionComponentInfo)({
|
|
105
|
+
compositionFile: resolvedLocation.source,
|
|
106
|
+
compositionId: composition.id,
|
|
107
|
+
});
|
|
108
|
+
await (0, actions_1.openInFileExplorer)({ directory: info.location.source });
|
|
109
|
+
}
|
|
110
|
+
catch (err) {
|
|
111
|
+
(0, NotificationCenter_1.showNotification)(`Could not open file: ${err.message}`, 2000);
|
|
112
|
+
}
|
|
113
|
+
};
|
|
114
|
+
const commonOpenInMenuItems = {
|
|
115
|
+
canOpenDesktopApps,
|
|
116
|
+
codingAgentInfo,
|
|
117
|
+
editorInfo,
|
|
118
|
+
excludeCodingAgentId: null,
|
|
119
|
+
excludeEditorId: defaultOpenInTarget === 'editor' ? defaultEditorId : null,
|
|
120
|
+
excludeGitSource: defaultOpenInTarget === 'git-source',
|
|
121
|
+
folder: false,
|
|
122
|
+
onConfigureApps,
|
|
123
|
+
onOpenInCodingAgent: (codingAgentId, name) => {
|
|
124
|
+
openWithCodingAgent(codingAgentId, name).catch(() => undefined);
|
|
125
|
+
},
|
|
126
|
+
onOpenInGitClient: () => undefined,
|
|
127
|
+
onOpenInTerminal: null,
|
|
128
|
+
};
|
|
129
|
+
const compositionOpenInMenuItems = (0, get_open_in_menu_items_1.getOpenInMenuItems)({
|
|
130
|
+
...commonOpenInMenuItems,
|
|
131
|
+
editorDisabled: openCompositionInEditorDisabled,
|
|
132
|
+
fileManagerDisabled: !(resolvedLocation === null || resolvedLocation === void 0 ? void 0 : resolvedLocation.source) || connectionStatus !== 'connected',
|
|
133
|
+
gitSourceDisabled: openCompositionInGitSourceDisabled,
|
|
134
|
+
onOpenInEditor: (editorId) => {
|
|
135
|
+
openCompositionWithEditor(editorId).catch(() => undefined);
|
|
136
|
+
},
|
|
137
|
+
onOpenInFileExplorer: openCompositionInFileExplorer,
|
|
138
|
+
onOpenInGitSource: () => {
|
|
139
|
+
closeMenu();
|
|
140
|
+
(0, get_git_menu_item_1.openGitSource)({ folder: false, location: resolvedLocation });
|
|
141
|
+
},
|
|
142
|
+
});
|
|
143
|
+
const componentOpenInMenuItems = (0, get_open_in_menu_items_1.getOpenInMenuItems)({
|
|
144
|
+
...commonOpenInMenuItems,
|
|
145
|
+
editorDisabled: openComponentInEditorDisabled,
|
|
146
|
+
fileManagerDisabled: !(resolvedLocation === null || resolvedLocation === void 0 ? void 0 : resolvedLocation.source) || connectionStatus !== 'connected',
|
|
147
|
+
gitSourceDisabled: openComponentInGitSourceDisabled,
|
|
148
|
+
onOpenInEditor: (editorId) => {
|
|
149
|
+
openComponentWithEditor(editorId).catch(() => undefined);
|
|
150
|
+
},
|
|
151
|
+
onOpenInFileExplorer: () => {
|
|
152
|
+
openComponentInFileExplorer().catch(() => undefined);
|
|
153
|
+
},
|
|
154
|
+
onOpenInGitSource: () => {
|
|
155
|
+
openComponentInGitSource().catch(() => undefined);
|
|
156
|
+
},
|
|
157
|
+
});
|
|
158
|
+
const hasOpenInItems = defaultOpenInName !== null ||
|
|
159
|
+
compositionOpenInMenuItems.length > 0 ||
|
|
160
|
+
componentOpenInMenuItems.length > 0;
|
|
34
161
|
return [
|
|
35
|
-
|
|
162
|
+
defaultOpenInTarget && defaultOpenInName
|
|
36
163
|
? {
|
|
37
|
-
id: '
|
|
164
|
+
id: defaultOpenInTarget === 'editor'
|
|
165
|
+
? 'show-in-editor'
|
|
166
|
+
: 'open-composition-in-git-source',
|
|
38
167
|
keyHint: null,
|
|
39
|
-
label: `Open composition in ${
|
|
168
|
+
label: `Open composition in ${defaultOpenInName}`,
|
|
40
169
|
leftItem: null,
|
|
41
|
-
onClick:
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
return;
|
|
45
|
-
}
|
|
46
|
-
try {
|
|
47
|
-
await (0, open_in_editor_1.openOriginalPositionInEditor)(resolvedLocation, editorId);
|
|
170
|
+
onClick: () => {
|
|
171
|
+
if (defaultOpenInTarget === 'editor' && defaultEditorId !== null) {
|
|
172
|
+
openCompositionWithEditor(defaultEditorId).catch(() => undefined);
|
|
48
173
|
}
|
|
49
|
-
|
|
50
|
-
(
|
|
174
|
+
else if (defaultOpenInTarget === 'git-source') {
|
|
175
|
+
closeMenu();
|
|
176
|
+
(0, get_git_menu_item_1.openGitSource)({ folder: false, location: resolvedLocation });
|
|
51
177
|
}
|
|
52
178
|
},
|
|
53
|
-
quickSwitcherLabel: `Open
|
|
179
|
+
quickSwitcherLabel: `Composition: Open in ${defaultOpenInName}`,
|
|
54
180
|
subMenu: null,
|
|
55
181
|
type: 'item',
|
|
56
|
-
value: '
|
|
57
|
-
|
|
182
|
+
value: defaultOpenInTarget === 'editor'
|
|
183
|
+
? 'show-in-editor'
|
|
184
|
+
: 'open-composition-in-git-source',
|
|
185
|
+
disabled: defaultOpenInTarget === 'editor'
|
|
186
|
+
? openCompositionInEditorDisabled
|
|
187
|
+
: openCompositionInGitSourceDisabled,
|
|
58
188
|
}
|
|
59
189
|
: null,
|
|
60
|
-
|
|
190
|
+
compositionOpenInMenuItems.length > 0
|
|
61
191
|
? {
|
|
62
|
-
id: 'open-
|
|
192
|
+
id: 'open-composition-in-another-app',
|
|
63
193
|
keyHint: null,
|
|
64
|
-
label:
|
|
194
|
+
label: 'Open composition in...',
|
|
65
195
|
leftItem: null,
|
|
66
|
-
onClick:
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
await (0, open_in_editor_1.openCompositionComponentInEditor)({
|
|
73
|
-
compositionFile: resolvedLocation.source,
|
|
74
|
-
compositionId: composition.id,
|
|
75
|
-
editorId,
|
|
76
|
-
});
|
|
77
|
-
}
|
|
78
|
-
catch (err) {
|
|
79
|
-
(0, NotificationCenter_1.showNotification)(err.message, 2000);
|
|
80
|
-
}
|
|
196
|
+
onClick: () => undefined,
|
|
197
|
+
quickSwitcherLabel: 'Composition',
|
|
198
|
+
subMenu: {
|
|
199
|
+
items: compositionOpenInMenuItems,
|
|
200
|
+
leaveLeftSpace: true,
|
|
201
|
+
preselectIndex: false,
|
|
81
202
|
},
|
|
82
|
-
quickSwitcherLabel: `Open composition component in ${editorName}`,
|
|
83
|
-
subMenu: null,
|
|
84
203
|
type: 'item',
|
|
85
|
-
value: 'open-
|
|
86
|
-
disabled: openComponentInEditorDisabled,
|
|
204
|
+
value: 'open-composition-in-another-app',
|
|
87
205
|
}
|
|
88
206
|
: null,
|
|
89
|
-
|
|
207
|
+
defaultOpenInTarget && defaultOpenInName
|
|
90
208
|
? {
|
|
91
|
-
id: '
|
|
209
|
+
id: defaultOpenInTarget === 'editor'
|
|
210
|
+
? 'open-component-in-editor'
|
|
211
|
+
: 'open-component-in-git-source',
|
|
92
212
|
keyHint: null,
|
|
93
|
-
label: `Open
|
|
213
|
+
label: `Open component in ${defaultOpenInName}`,
|
|
94
214
|
leftItem: null,
|
|
95
215
|
onClick: () => {
|
|
96
|
-
|
|
97
|
-
|
|
216
|
+
if (defaultOpenInTarget === 'editor' && defaultEditorId !== null) {
|
|
217
|
+
openComponentWithEditor(defaultEditorId).catch(() => undefined);
|
|
218
|
+
}
|
|
219
|
+
else if (defaultOpenInTarget === 'git-source') {
|
|
220
|
+
openComponentInGitSource().catch(() => undefined);
|
|
221
|
+
}
|
|
98
222
|
},
|
|
99
|
-
quickSwitcherLabel: `Open
|
|
223
|
+
quickSwitcherLabel: `Component: Open in ${defaultOpenInName}`,
|
|
100
224
|
subMenu: null,
|
|
101
225
|
type: 'item',
|
|
102
|
-
value: '
|
|
103
|
-
|
|
226
|
+
value: defaultOpenInTarget === 'editor'
|
|
227
|
+
? 'open-component-in-editor'
|
|
228
|
+
: 'open-component-in-git-source',
|
|
229
|
+
disabled: defaultOpenInTarget === 'editor'
|
|
230
|
+
? openComponentInEditorDisabled
|
|
231
|
+
: openComponentInGitSourceDisabled,
|
|
104
232
|
}
|
|
105
233
|
: null,
|
|
106
|
-
|
|
234
|
+
componentOpenInMenuItems.length > 0
|
|
107
235
|
? {
|
|
108
|
-
id: 'open-component-in-
|
|
236
|
+
id: 'open-component-in-another-app',
|
|
109
237
|
keyHint: null,
|
|
110
|
-
label:
|
|
238
|
+
label: 'Open component in...',
|
|
111
239
|
leftItem: null,
|
|
112
|
-
onClick:
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
const info = await (0, open_in_editor_1.loadCompositionComponentInfo)({
|
|
119
|
-
compositionFile: resolvedLocation.source,
|
|
120
|
-
compositionId: composition.id,
|
|
121
|
-
});
|
|
122
|
-
(0, get_git_menu_item_1.openGitSource)({ folder: false, location: info.location });
|
|
123
|
-
}
|
|
124
|
-
catch (err) {
|
|
125
|
-
(0, NotificationCenter_1.showNotification)(err.message, 2000);
|
|
126
|
-
}
|
|
240
|
+
onClick: () => undefined,
|
|
241
|
+
quickSwitcherLabel: 'Component',
|
|
242
|
+
subMenu: {
|
|
243
|
+
items: componentOpenInMenuItems,
|
|
244
|
+
leaveLeftSpace: true,
|
|
245
|
+
preselectIndex: false,
|
|
127
246
|
},
|
|
128
|
-
quickSwitcherLabel: `Open composition component in ${gitSourceName}`,
|
|
129
|
-
subMenu: null,
|
|
130
247
|
type: 'item',
|
|
131
|
-
value: 'open-component-in-
|
|
132
|
-
disabled: openComponentInGitSourceDisabled,
|
|
248
|
+
value: 'open-component-in-another-app',
|
|
133
249
|
}
|
|
134
250
|
: null,
|
|
135
|
-
|
|
251
|
+
hasOpenInItems && includeCompositionManagementItems
|
|
136
252
|
? {
|
|
137
253
|
type: 'divider',
|
|
138
254
|
id: 'show-in-editor-divider',
|
|
@@ -208,7 +324,7 @@ const getCompositionMenuItems = ({ composition, connectionStatus, resolvedLocati
|
|
|
208
324
|
disabled: !composition || readOnlyStudio,
|
|
209
325
|
}
|
|
210
326
|
: null,
|
|
211
|
-
|
|
327
|
+
hasOpenInItems || includeCompositionManagementItems
|
|
212
328
|
? {
|
|
213
329
|
type: 'divider',
|
|
214
330
|
id: 'copy-actions-divider',
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.deleteJsxNodes = void 0;
|
|
4
4
|
const browser_studio_operations_1 = require("../helpers/browser-studio-operations");
|
|
5
5
|
const call_api_1 = require("./call-api");
|
|
6
|
-
const
|
|
6
|
+
const deleteJsxNodes = (request) => {
|
|
7
7
|
const browserStudioOperations = (0, browser_studio_operations_1.getBrowserStudioOperations)();
|
|
8
8
|
return browserStudioOperations
|
|
9
|
-
? browserStudioOperations.
|
|
10
|
-
: (0, call_api_1.callApi)('/api/delete-jsx-
|
|
9
|
+
? browserStudioOperations.deleteJsxNodes(request)
|
|
10
|
+
: (0, call_api_1.callApi)('/api/delete-jsx-nodes', request);
|
|
11
11
|
};
|
|
12
|
-
exports.
|
|
12
|
+
exports.deleteJsxNodes = deleteJsxNodes;
|
|
@@ -1,24 +1,25 @@
|
|
|
1
|
-
import type { TerminalId } from '@remotion/studio-shared';
|
|
2
|
-
import type { EditorPickerId, GetDefaultCodingAgentInfoResponse, GetDefaultEditorInfoResponse } from '@remotion/studio-shared';
|
|
3
|
-
import type { OriginalPosition } from '../error-overlay/react-overlay/utils/get-source-map';
|
|
1
|
+
import type { EditorPickerId, GetDefaultCodingAgentInfoResponse, GetDefaultEditorInfoResponse, TerminalId } from '@remotion/studio-shared';
|
|
4
2
|
import type { ComboboxValue } from './NewComposition/ComboBox';
|
|
5
3
|
export declare const getConfigureDefaultAppsMenuItems: ({ hasPreviousItems, onConfigureApps, }: {
|
|
6
4
|
readonly hasPreviousItems: boolean;
|
|
7
5
|
readonly onConfigureApps: (() => void) | null;
|
|
8
6
|
}) => ComboboxValue[];
|
|
9
|
-
export declare const getOpenInMenuItems: ({ codingAgentInfo, editorDisabled, editorInfo, excludeCodingAgentId, excludeEditorId, fileManagerDisabled, folder,
|
|
7
|
+
export declare const getOpenInMenuItems: ({ canOpenDesktopApps, codingAgentInfo, editorDisabled, editorInfo, excludeCodingAgentId, excludeEditorId, excludeGitSource, fileManagerDisabled, folder, gitSourceDisabled, onConfigureApps, onOpenInCodingAgent, onOpenInEditor, onOpenInFileExplorer, onOpenInGitClient, onOpenInGitSource, onOpenInTerminal, }: {
|
|
8
|
+
readonly canOpenDesktopApps: boolean;
|
|
10
9
|
readonly codingAgentInfo: GetDefaultCodingAgentInfoResponse | null;
|
|
11
10
|
readonly editorDisabled: boolean;
|
|
12
11
|
readonly editorInfo: GetDefaultEditorInfoResponse | null;
|
|
13
12
|
readonly excludeCodingAgentId: "claude-code" | "codex" | "copilot" | "cursor" | null;
|
|
14
13
|
readonly excludeEditorId: EditorPickerId | null;
|
|
14
|
+
readonly excludeGitSource: boolean;
|
|
15
15
|
readonly fileManagerDisabled: boolean;
|
|
16
16
|
readonly folder: boolean;
|
|
17
|
-
readonly
|
|
17
|
+
readonly gitSourceDisabled: boolean;
|
|
18
18
|
readonly onConfigureApps: (() => void) | null;
|
|
19
19
|
readonly onOpenInCodingAgent: (codingAgentId: "claude-code" | "codex" | "copilot" | "cursor", codingAgentName: string) => void;
|
|
20
20
|
readonly onOpenInEditor: (editorId: EditorPickerId) => void;
|
|
21
21
|
readonly onOpenInFileExplorer: () => void;
|
|
22
22
|
readonly onOpenInGitClient: (gitClientId: "github-desktop") => void;
|
|
23
|
+
readonly onOpenInGitSource: () => void;
|
|
23
24
|
readonly onOpenInTerminal: ((terminalId: TerminalId) => void) | null;
|
|
24
25
|
}) => ComboboxValue[];
|
|
@@ -4,7 +4,6 @@ exports.getOpenInMenuItems = exports.getConfigureDefaultAppsMenuItems = void 0;
|
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const no_react_1 = require("remotion/no-react");
|
|
6
6
|
const get_file_manager_name_1 = require("../helpers/get-file-manager-name");
|
|
7
|
-
const get_git_menu_item_1 = require("../helpers/get-git-menu-item");
|
|
8
7
|
const editor_1 = require("../icons/editor");
|
|
9
8
|
const finder_1 = require("../icons/finder");
|
|
10
9
|
const git_client_1 = require("../icons/git-client");
|
|
@@ -31,7 +30,7 @@ const getConfigureDefaultAppsMenuItems = ({ hasPreviousItems, onConfigureApps, }
|
|
|
31
30
|
label: jsx_runtime_1.jsx("span", { style: menuLabel, children: "Configure default apps..." }),
|
|
32
31
|
leftItem: null,
|
|
33
32
|
onClick: onConfigureApps,
|
|
34
|
-
quickSwitcherLabel:
|
|
33
|
+
quickSwitcherLabel: 'Configure default apps...',
|
|
35
34
|
subMenu: null,
|
|
36
35
|
type: 'item',
|
|
37
36
|
value: 'change-default-apps',
|
|
@@ -39,11 +38,11 @@ const getConfigureDefaultAppsMenuItems = ({ hasPreviousItems, onConfigureApps, }
|
|
|
39
38
|
];
|
|
40
39
|
};
|
|
41
40
|
exports.getConfigureDefaultAppsMenuItems = getConfigureDefaultAppsMenuItems;
|
|
42
|
-
const getOpenInMenuItems = ({ codingAgentInfo, editorDisabled, editorInfo, excludeCodingAgentId, excludeEditorId, fileManagerDisabled, folder,
|
|
41
|
+
const getOpenInMenuItems = ({ canOpenDesktopApps, codingAgentInfo, editorDisabled, editorInfo, excludeCodingAgentId, excludeEditorId, excludeGitSource, fileManagerDisabled, folder, gitSourceDisabled, onConfigureApps, onOpenInCodingAgent, onOpenInEditor, onOpenInFileExplorer, onOpenInGitClient, onOpenInGitSource, onOpenInTerminal, }) => {
|
|
43
42
|
var _a, _b, _c, _d;
|
|
44
|
-
const showFinder = window.remotion_fileSystemPlatform === 'darwin';
|
|
43
|
+
const showFinder = canOpenDesktopApps && window.remotion_fileSystemPlatform === 'darwin';
|
|
45
44
|
const fileManagerName = (0, get_file_manager_name_1.getFileManagerName)(window.remotion_fileSystemPlatform);
|
|
46
|
-
const editors = ((_a = editorInfo === null || editorInfo === void 0 ? void 0 : editorInfo.installedEditors) !== null && _a !== void 0 ? _a : [])
|
|
45
|
+
const editors = (canOpenDesktopApps ? ((_a = editorInfo === null || editorInfo === void 0 ? void 0 : editorInfo.installedEditors) !== null && _a !== void 0 ? _a : []) : [])
|
|
47
46
|
.filter((editor) => editor.id !== excludeEditorId)
|
|
48
47
|
.map((editor) => ({
|
|
49
48
|
disabled: editorDisabled,
|
|
@@ -56,12 +55,12 @@ const getOpenInMenuItems = ({ codingAgentInfo, editorDisabled, editorInfo, exclu
|
|
|
56
55
|
onOpenInEditor(editor.id);
|
|
57
56
|
}
|
|
58
57
|
},
|
|
59
|
-
quickSwitcherLabel:
|
|
58
|
+
quickSwitcherLabel: `Open in ${editor.name}`,
|
|
60
59
|
subMenu: null,
|
|
61
60
|
type: 'item',
|
|
62
61
|
value: editor.id,
|
|
63
62
|
}));
|
|
64
|
-
const codingAgents = ((_b = codingAgentInfo === null || codingAgentInfo === void 0 ? void 0 : codingAgentInfo.installedCodingAgents) !== null && _b !== void 0 ? _b : [])
|
|
63
|
+
const codingAgents = (canOpenDesktopApps ? ((_b = codingAgentInfo === null || codingAgentInfo === void 0 ? void 0 : codingAgentInfo.installedCodingAgents) !== null && _b !== void 0 ? _b : []) : [])
|
|
65
64
|
.filter((codingAgent) => codingAgent.id !== excludeCodingAgentId)
|
|
66
65
|
.map((codingAgent) => ({
|
|
67
66
|
id: `open-in-coding-agent-${codingAgent.id}`,
|
|
@@ -69,23 +68,30 @@ const getOpenInMenuItems = ({ codingAgentInfo, editorDisabled, editorInfo, exclu
|
|
|
69
68
|
label: jsx_runtime_1.jsx("span", { style: menuLabel, children: codingAgent.name }),
|
|
70
69
|
leftItem: jsx_runtime_1.jsx(CodingAgentIcon_1.CodingAgentIcon, { codingAgentId: codingAgent.id, size: 18 }),
|
|
71
70
|
onClick: () => onOpenInCodingAgent(codingAgent.id, codingAgent.nameWithType),
|
|
72
|
-
quickSwitcherLabel:
|
|
71
|
+
quickSwitcherLabel: `Open in ${codingAgent.nameWithType}`,
|
|
73
72
|
subMenu: null,
|
|
74
73
|
type: 'item',
|
|
75
74
|
value: `coding-agent-${codingAgent.id}`,
|
|
76
75
|
}));
|
|
77
|
-
const terminals =
|
|
78
|
-
|
|
79
|
-
|
|
76
|
+
const terminals = canOpenDesktopApps && folder
|
|
77
|
+
? ((_c = codingAgentInfo === null || codingAgentInfo === void 0 ? void 0 : codingAgentInfo.installedTerminals) !== null && _c !== void 0 ? _c : [])
|
|
78
|
+
: [];
|
|
79
|
+
const gitClients = canOpenDesktopApps && folder
|
|
80
|
+
? ((_d = codingAgentInfo === null || codingAgentInfo === void 0 ? void 0 : codingAgentInfo.installedGitClients) !== null && _d !== void 0 ? _d : [])
|
|
81
|
+
: [];
|
|
82
|
+
const gitHubItem = window.remotion_gitSource && !excludeGitSource
|
|
80
83
|
? {
|
|
84
|
+
disabled: gitSourceDisabled,
|
|
81
85
|
id: 'open-in-github',
|
|
82
86
|
keyHint: null,
|
|
83
87
|
label: jsx_runtime_1.jsx("span", { style: menuLabel, children: "GitHub.com" }),
|
|
84
88
|
leftItem: jsx_runtime_1.jsx(github_1.GitHubIcon, { size: 16 }),
|
|
85
89
|
onClick: () => {
|
|
86
|
-
(
|
|
90
|
+
if (!gitSourceDisabled) {
|
|
91
|
+
onOpenInGitSource();
|
|
92
|
+
}
|
|
87
93
|
},
|
|
88
|
-
quickSwitcherLabel:
|
|
94
|
+
quickSwitcherLabel: 'Open in GitHub.com',
|
|
89
95
|
subMenu: null,
|
|
90
96
|
type: 'item',
|
|
91
97
|
value: 'github',
|
|
@@ -105,7 +111,7 @@ const getOpenInMenuItems = ({ codingAgentInfo, editorDisabled, editorInfo, exclu
|
|
|
105
111
|
onOpenInFileExplorer();
|
|
106
112
|
}
|
|
107
113
|
},
|
|
108
|
-
quickSwitcherLabel:
|
|
114
|
+
quickSwitcherLabel: `Open in ${fileManagerName}`,
|
|
109
115
|
subMenu: null,
|
|
110
116
|
type: 'item',
|
|
111
117
|
value: 'file-explorer',
|
|
@@ -150,7 +156,7 @@ const getOpenInMenuItems = ({ codingAgentInfo, editorDisabled, editorInfo, exclu
|
|
|
150
156
|
label: jsx_runtime_1.jsx("span", { style: menuLabel, children: terminal.name }),
|
|
151
157
|
leftItem: jsx_runtime_1.jsx(terminal_1.TerminalIcon, { terminalId: terminal.id, size: 18 }),
|
|
152
158
|
onClick: () => onOpenInTerminal === null || onOpenInTerminal === void 0 ? void 0 : onOpenInTerminal(terminal.id),
|
|
153
|
-
quickSwitcherLabel:
|
|
159
|
+
quickSwitcherLabel: `Open in ${terminal.name}`,
|
|
154
160
|
subMenu: null,
|
|
155
161
|
type: 'item',
|
|
156
162
|
value: `terminal-${terminal.id}`,
|
|
@@ -170,7 +176,7 @@ const getOpenInMenuItems = ({ codingAgentInfo, editorDisabled, editorInfo, exclu
|
|
|
170
176
|
label: jsx_runtime_1.jsx("span", { style: menuLabel, children: gitClient.name }),
|
|
171
177
|
leftItem: jsx_runtime_1.jsx(git_client_1.GitClientIcon, { gitClientId: gitClient.id, size: 18 }),
|
|
172
178
|
onClick: () => onOpenInGitClient(gitClient.id),
|
|
173
|
-
quickSwitcherLabel:
|
|
179
|
+
quickSwitcherLabel: `Open in ${gitClient.name}`,
|
|
174
180
|
subMenu: null,
|
|
175
181
|
type: 'item',
|
|
176
182
|
value: `git-client-${gitClient.id}`,
|
|
@@ -12,15 +12,15 @@ export type KeyboardShortcutGroup = {
|
|
|
12
12
|
export declare const defaultKeyboardShortcuts: Record<StudioKeyboardShortcutAction, readonly StudioKeyboardShortcut[]>;
|
|
13
13
|
export declare const keyboardShortcutGroups: readonly KeyboardShortcutGroup[];
|
|
14
14
|
export declare const askAIKeyboardShortcutGroup: KeyboardShortcutGroup;
|
|
15
|
-
export declare const getKeyboardShortcutsForAction: (action: "askAI" | "clearInOutPoints" | "copyEffectsAndValues" | "cutEffects" | "deleteSelection" | "duplicateSequences" | "enterFullscreen" | "goToFrame" | "jumpToBeginning" | "jumpToEnd" | "nextComposition" | "pauseAndReturnToPlaybackStart" | "pausePlayback" | "pickColor" | "playForward" | "playPause" | "previousComposition" | "quickSwitcher" | "redo" | "render" | "resetZoom" | "reversePlayback" | "selectAllSequenceRows" | "selectOpacityProp" | "selectRotateProp" | "selectScaleProp" | "selectTranslateProp" | "setInPoint" | "setOutPoint" | "showKeyboardShortcuts" | "toggleBothSidebars" | "toggleCheckerboard" | "toggleLeftSidebar" | "toggleLoop" | "toggleMute" | "toggleOutlines" | "toggleRightSidebar" | "toggleRulersAndGuides" | "toggleSnapping" | "undo" | "zoomIn" | "zoomOut", configured?: Partial<Record<"askAI" | "clearInOutPoints" | "copyEffectsAndValues" | "cutEffects" | "deleteSelection" | "duplicateSequences" | "enterFullscreen" | "goToFrame" | "jumpToBeginning" | "jumpToEnd" | "nextComposition" | "pauseAndReturnToPlaybackStart" | "pausePlayback" | "pickColor" | "playForward" | "playPause" | "previousComposition" | "quickSwitcher" | "redo" | "render" | "resetZoom" | "reversePlayback" | "selectAllSequenceRows" | "selectOpacityProp" | "selectRotateProp" | "selectScaleProp" | "selectTranslateProp" | "setInPoint" | "setOutPoint" | "showKeyboardShortcuts" | "toggleBothSidebars" | "toggleCheckerboard" | "toggleLeftSidebar" | "toggleLoop" | "toggleMute" | "toggleOutlines" | "toggleRightSidebar" | "toggleRulersAndGuides" | "toggleSnapping" | "undo" | "zoomIn" | "zoomOut", StudioKeyboardShortcutValue>> | null) => readonly StudioKeyboardShortcut[];
|
|
15
|
+
export declare const getKeyboardShortcutsForAction: (action: "askAI" | "clearInOutPoints" | "copyEffectsAndValues" | "cutEffects" | "deleteSelection" | "duplicateSequences" | "enterFullscreen" | "goToFrame" | "jumpToBeginning" | "jumpToEnd" | "nextComposition" | "pauseAndReturnToPlaybackStart" | "pausePlayback" | "pickColor" | "playForward" | "playPause" | "previousComposition" | "quickSwitcher" | "redo" | "render" | "resetZoom" | "reversePlayback" | "selectAllSequenceRows" | "selectOpacityProp" | "selectRotateProp" | "selectScaleProp" | "selectTranslateProp" | "setInPoint" | "setOutPoint" | "showKeyboardShortcuts" | "splitSequences" | "toggleBothSidebars" | "toggleCheckerboard" | "toggleLeftSidebar" | "toggleLoop" | "toggleMute" | "toggleOutlines" | "toggleRightSidebar" | "toggleRulersAndGuides" | "toggleSnapping" | "undo" | "zoomIn" | "zoomOut", configured?: Partial<Record<"askAI" | "clearInOutPoints" | "copyEffectsAndValues" | "cutEffects" | "deleteSelection" | "duplicateSequences" | "enterFullscreen" | "goToFrame" | "jumpToBeginning" | "jumpToEnd" | "nextComposition" | "pauseAndReturnToPlaybackStart" | "pausePlayback" | "pickColor" | "playForward" | "playPause" | "previousComposition" | "quickSwitcher" | "redo" | "render" | "resetZoom" | "reversePlayback" | "selectAllSequenceRows" | "selectOpacityProp" | "selectRotateProp" | "selectScaleProp" | "selectTranslateProp" | "setInPoint" | "setOutPoint" | "showKeyboardShortcuts" | "splitSequences" | "toggleBothSidebars" | "toggleCheckerboard" | "toggleLeftSidebar" | "toggleLoop" | "toggleMute" | "toggleOutlines" | "toggleRightSidebar" | "toggleRulersAndGuides" | "toggleSnapping" | "undo" | "zoomIn" | "zoomOut", StudioKeyboardShortcutValue>> | null) => readonly StudioKeyboardShortcut[];
|
|
16
16
|
export declare const keyboardEventMatchesShortcut: ({ event, shortcut: value, }: {
|
|
17
17
|
readonly event: KeyboardEvent;
|
|
18
18
|
readonly shortcut: StudioKeyboardShortcut;
|
|
19
19
|
}) => boolean;
|
|
20
20
|
export declare const keyboardShortcutsOverlap: (first: StudioKeyboardShortcut, second: StudioKeyboardShortcut) => boolean;
|
|
21
|
-
export declare const keyboardEventMatchesAction: (event: KeyboardEvent, action: "askAI" | "clearInOutPoints" | "copyEffectsAndValues" | "cutEffects" | "deleteSelection" | "duplicateSequences" | "enterFullscreen" | "goToFrame" | "jumpToBeginning" | "jumpToEnd" | "nextComposition" | "pauseAndReturnToPlaybackStart" | "pausePlayback" | "pickColor" | "playForward" | "playPause" | "previousComposition" | "quickSwitcher" | "redo" | "render" | "resetZoom" | "reversePlayback" | "selectAllSequenceRows" | "selectOpacityProp" | "selectRotateProp" | "selectScaleProp" | "selectTranslateProp" | "setInPoint" | "setOutPoint" | "showKeyboardShortcuts" | "toggleBothSidebars" | "toggleCheckerboard" | "toggleLeftSidebar" | "toggleLoop" | "toggleMute" | "toggleOutlines" | "toggleRightSidebar" | "toggleRulersAndGuides" | "toggleSnapping" | "undo" | "zoomIn" | "zoomOut") => boolean;
|
|
21
|
+
export declare const keyboardEventMatchesAction: (event: KeyboardEvent, action: "askAI" | "clearInOutPoints" | "copyEffectsAndValues" | "cutEffects" | "deleteSelection" | "duplicateSequences" | "enterFullscreen" | "goToFrame" | "jumpToBeginning" | "jumpToEnd" | "nextComposition" | "pauseAndReturnToPlaybackStart" | "pausePlayback" | "pickColor" | "playForward" | "playPause" | "previousComposition" | "quickSwitcher" | "redo" | "render" | "resetZoom" | "reversePlayback" | "selectAllSequenceRows" | "selectOpacityProp" | "selectRotateProp" | "selectScaleProp" | "selectTranslateProp" | "setInPoint" | "setOutPoint" | "showKeyboardShortcuts" | "splitSequences" | "toggleBothSidebars" | "toggleCheckerboard" | "toggleLeftSidebar" | "toggleLoop" | "toggleMute" | "toggleOutlines" | "toggleRightSidebar" | "toggleRulersAndGuides" | "toggleSnapping" | "undo" | "zoomIn" | "zoomOut") => boolean;
|
|
22
22
|
export declare const formatKeyboardShortcut: (value: StudioKeyboardShortcut) => readonly string[];
|
|
23
23
|
export declare const formatKeyboardShortcutForAria: (value: StudioKeyboardShortcut) => string;
|
|
24
|
-
export declare const getKeyboardShortcutLabel: (action: "askAI" | "clearInOutPoints" | "copyEffectsAndValues" | "cutEffects" | "deleteSelection" | "duplicateSequences" | "enterFullscreen" | "goToFrame" | "jumpToBeginning" | "jumpToEnd" | "nextComposition" | "pauseAndReturnToPlaybackStart" | "pausePlayback" | "pickColor" | "playForward" | "playPause" | "previousComposition" | "quickSwitcher" | "redo" | "render" | "resetZoom" | "reversePlayback" | "selectAllSequenceRows" | "selectOpacityProp" | "selectRotateProp" | "selectScaleProp" | "selectTranslateProp" | "setInPoint" | "setOutPoint" | "showKeyboardShortcuts" | "toggleBothSidebars" | "toggleCheckerboard" | "toggleLeftSidebar" | "toggleLoop" | "toggleMute" | "toggleOutlines" | "toggleRightSidebar" | "toggleRulersAndGuides" | "toggleSnapping" | "undo" | "zoomIn" | "zoomOut") => string;
|
|
25
|
-
export declare const getKeyboardShortcutAriaKeyShortcuts: (action: "askAI" | "clearInOutPoints" | "copyEffectsAndValues" | "cutEffects" | "deleteSelection" | "duplicateSequences" | "enterFullscreen" | "goToFrame" | "jumpToBeginning" | "jumpToEnd" | "nextComposition" | "pauseAndReturnToPlaybackStart" | "pausePlayback" | "pickColor" | "playForward" | "playPause" | "previousComposition" | "quickSwitcher" | "redo" | "render" | "resetZoom" | "reversePlayback" | "selectAllSequenceRows" | "selectOpacityProp" | "selectRotateProp" | "selectScaleProp" | "selectTranslateProp" | "setInPoint" | "setOutPoint" | "showKeyboardShortcuts" | "toggleBothSidebars" | "toggleCheckerboard" | "toggleLeftSidebar" | "toggleLoop" | "toggleMute" | "toggleOutlines" | "toggleRightSidebar" | "toggleRulersAndGuides" | "toggleSnapping" | "undo" | "zoomIn" | "zoomOut") => string;
|
|
24
|
+
export declare const getKeyboardShortcutLabel: (action: "askAI" | "clearInOutPoints" | "copyEffectsAndValues" | "cutEffects" | "deleteSelection" | "duplicateSequences" | "enterFullscreen" | "goToFrame" | "jumpToBeginning" | "jumpToEnd" | "nextComposition" | "pauseAndReturnToPlaybackStart" | "pausePlayback" | "pickColor" | "playForward" | "playPause" | "previousComposition" | "quickSwitcher" | "redo" | "render" | "resetZoom" | "reversePlayback" | "selectAllSequenceRows" | "selectOpacityProp" | "selectRotateProp" | "selectScaleProp" | "selectTranslateProp" | "setInPoint" | "setOutPoint" | "showKeyboardShortcuts" | "splitSequences" | "toggleBothSidebars" | "toggleCheckerboard" | "toggleLeftSidebar" | "toggleLoop" | "toggleMute" | "toggleOutlines" | "toggleRightSidebar" | "toggleRulersAndGuides" | "toggleSnapping" | "undo" | "zoomIn" | "zoomOut") => string;
|
|
25
|
+
export declare const getKeyboardShortcutAriaKeyShortcuts: (action: "askAI" | "clearInOutPoints" | "copyEffectsAndValues" | "cutEffects" | "deleteSelection" | "duplicateSequences" | "enterFullscreen" | "goToFrame" | "jumpToBeginning" | "jumpToEnd" | "nextComposition" | "pauseAndReturnToPlaybackStart" | "pausePlayback" | "pickColor" | "playForward" | "playPause" | "previousComposition" | "quickSwitcher" | "redo" | "render" | "resetZoom" | "reversePlayback" | "selectAllSequenceRows" | "selectOpacityProp" | "selectRotateProp" | "selectScaleProp" | "selectTranslateProp" | "setInPoint" | "setOutPoint" | "showKeyboardShortcuts" | "splitSequences" | "toggleBothSidebars" | "toggleCheckerboard" | "toggleLeftSidebar" | "toggleLoop" | "toggleMute" | "toggleOutlines" | "toggleRightSidebar" | "toggleRulersAndGuides" | "toggleSnapping" | "undo" | "zoomIn" | "zoomOut") => string;
|
|
26
26
|
export declare const shortcutFromKeyboardEvent: (event: KeyboardEvent) => StudioKeyboardShortcut | null;
|
|
@@ -45,7 +45,8 @@ exports.defaultKeyboardShortcuts = {
|
|
|
45
45
|
selectOpacityProp: [{ key: 't' }],
|
|
46
46
|
selectRotateProp: [{ key: 'r', shift: false }],
|
|
47
47
|
selectScaleProp: [{ key: 's' }],
|
|
48
|
-
duplicateSequences: [{ key: 'd', commandOrControl: true }],
|
|
48
|
+
duplicateSequences: [{ key: 'd', commandOrControl: true, shift: false }],
|
|
49
|
+
splitSequences: [{ key: 'd', commandOrControl: true, shift: true }],
|
|
49
50
|
copyEffectsAndValues: [{ key: 'c', commandOrControl: true }],
|
|
50
51
|
cutEffects: [{ key: 'x', commandOrControl: true }],
|
|
51
52
|
deleteSelection: [{ key: 'Backspace' }, { key: 'Delete' }],
|
|
@@ -136,6 +137,7 @@ exports.keyboardShortcutGroups = [
|
|
|
136
137
|
shortcut('Select rotate prop', 'selectRotateProp'),
|
|
137
138
|
shortcut('Select scale prop', 'selectScaleProp'),
|
|
138
139
|
shortcut('Duplicate sequences', 'duplicateSequences'),
|
|
140
|
+
shortcut('Split sequences at playhead', 'splitSequences'),
|
|
139
141
|
shortcut('Copy effects / values', 'copyEffectsAndValues'),
|
|
140
142
|
shortcut('Cut effects', 'cutEffects'),
|
|
141
143
|
fixedShortcut('Paste effects / values', [[is_mac_1.isMac ? '⌘' : 'Ctrl', 'V']], 'Handled by the browser clipboard event'),
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export declare const getMediaFileName: (src: string, displayName: string) => string;
|
|
1
2
|
export declare const getDefaultOutputBaseName: (src: string, displayName: string, fallbackName: string) => string;
|
|
2
3
|
export declare const validatePublicOutputName: ({ extension, outName, }: {
|
|
3
4
|
extension: string;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.validatePublicOutputName = exports.getDefaultOutputBaseName = void 0;
|
|
3
|
+
exports.validatePublicOutputName = exports.getDefaultOutputBaseName = exports.getMediaFileName = void 0;
|
|
4
4
|
const invalidCharacters = ['?', '*', '+', ':', '%'];
|
|
5
|
-
const
|
|
5
|
+
const getMediaFileName = (src, displayName) => {
|
|
6
6
|
var _a;
|
|
7
7
|
let pathname = displayName;
|
|
8
8
|
if (!/^(data|blob):/i.test(src.trimStart())) {
|
|
@@ -24,7 +24,11 @@ const getDefaultOutputBaseName = (src, displayName, fallbackName) => {
|
|
|
24
24
|
catch (_c) {
|
|
25
25
|
// Keep the encoded name if it contains an invalid escape sequence.
|
|
26
26
|
}
|
|
27
|
-
return
|
|
27
|
+
return decoded;
|
|
28
|
+
};
|
|
29
|
+
exports.getMediaFileName = getMediaFileName;
|
|
30
|
+
const getDefaultOutputBaseName = (src, displayName, fallbackName) => {
|
|
31
|
+
return ((0, exports.getMediaFileName)(src, displayName)
|
|
28
32
|
.replace(/\.[^/.]+$/, '')
|
|
29
33
|
.replace(/[^a-zA-Z0-9-_ ]/g, '-')
|
|
30
34
|
.trim()
|