@remotion/studio 4.0.523 → 4.0.525
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/ActionTooltip.d.ts +11 -0
- package/dist/components/ActionTooltip.js +153 -0
- package/dist/components/AppLaunchButton.js +2 -0
- package/dist/components/AssetSelectorModal.d.ts +6 -0
- package/dist/components/AssetSelectorModal.js +174 -0
- package/dist/components/Canvas.js +18 -3
- package/dist/components/CheckboardToggle.js +8 -10
- package/dist/components/ColorPicker/AlphaSlider.js +1 -1
- package/dist/components/ColorPicker/HueSlider.js +1 -1
- package/dist/components/ColorPicker/SaturationValueArea.js +1 -1
- package/dist/components/CompositionSelector.js +1 -0
- package/dist/components/CompositionSelectorItem.js +1 -0
- package/dist/components/EditorGuides/Guide.js +1 -1
- package/dist/components/ElementInstallConfirmation.js +35 -62
- package/dist/components/FullscreenToggle.js +5 -8
- package/dist/components/GlobalKeybindings.js +71 -0
- package/dist/components/InspectorLocationCopy.js +1 -1
- package/dist/components/InspectorOpenInEditor.d.ts +1 -0
- package/dist/components/InspectorOpenInEditor.js +18 -15
- package/dist/components/InspectorPanel/CompositionInspectorHeader.js +6 -7
- package/dist/components/InspectorPanel/CompositionMetadata.js +1 -0
- package/dist/components/InspectorPanel/ElementLibraryButton.js +1 -0
- package/dist/components/InspectorPanel/SequenceInspectorHeader.js +4 -12
- package/dist/components/InspectorSequenceSection.js +23 -14
- package/dist/components/LazySyntaxHighlightedSource.d.ts +4 -0
- package/dist/components/LazySyntaxHighlightedSource.js +43 -0
- package/dist/components/LoopToggle.js +9 -2
- package/dist/components/Menu/MenuItem.js +1 -2
- package/dist/components/MenuBuildIndicator.js +1 -1
- package/dist/components/MenuToolbar.js +6 -4
- package/dist/components/Modals.js +2 -1
- package/dist/components/MuteToggle.d.ts +1 -0
- package/dist/components/MuteToggle.js +17 -6
- package/dist/components/NewComposition/CodemodFooter.js +1 -0
- package/dist/components/NewComposition/DeleteComposition.js +42 -6
- package/dist/components/NewComposition/DeleteFolder.js +1 -0
- package/dist/components/NewComposition/DuplicateComposition.js +5 -0
- package/dist/components/NewComposition/InputDragger.js +2 -2
- package/dist/components/NewComposition/NewComposition.d.ts +1 -0
- package/dist/components/NewComposition/NewComposition.js +5 -4
- package/dist/components/NewComposition/NewFolder.js +31 -6
- package/dist/components/NewComposition/RenameComposition.js +3 -2
- package/dist/components/NewComposition/RenameFolder.js +3 -4
- package/dist/components/NewComposition/SlugPreview.d.ts +7 -0
- package/dist/components/NewComposition/SlugPreview.js +18 -0
- package/dist/components/NewComposition/duplicate-composition-api.d.ts +3 -2
- package/dist/components/NewComposition/duplicate-composition-api.js +9 -2
- package/dist/components/Notifications/NotificationCenter.d.ts +1 -0
- package/dist/components/Notifications/NotificationCenter.js +22 -1
- package/dist/components/OutlineToggle.js +17 -10
- package/dist/components/PlayPause.js +7 -1
- package/dist/components/PlaybackKeyboardShortcutsManager.d.ts +2 -0
- package/dist/components/PlaybackKeyboardShortcutsManager.js +36 -1
- package/dist/components/PlaybackRateSelector.js +2 -2
- package/dist/components/Preview.js +0 -3
- package/dist/components/PreviewToolbar.js +4 -7
- package/dist/components/PreviewToolbarOverflowButton.js +10 -3
- package/dist/components/QuickSwitcher/QuickSwitcherContent.js +1 -1
- package/dist/components/RenderButton.js +40 -4
- package/dist/components/RenderModal/WebRenderModalBasic.js +1 -1
- package/dist/components/RenderModal/render-modals.js +3 -0
- package/dist/components/RenderQueue/CaptionQueueItem.js +2 -1
- package/dist/components/RenderQueue/RenderQueueCopyToClipboard.js +2 -1
- package/dist/components/RenderQueue/RenderQueueDownloadItem.js +2 -1
- package/dist/components/RenderQueue/RenderQueueItemCancelButton.js +2 -1
- package/dist/components/RenderQueue/RenderQueueOpenInFolder.js +2 -1
- package/dist/components/RenderQueue/RenderQueueRemoveItem.js +2 -1
- package/dist/components/RenderQueue/RenderQueueRepeat.js +2 -1
- package/dist/components/RenderQueue/VideoMattingQueueItem.js +2 -1
- package/dist/components/RenderQueue/actions.d.ts +2 -1
- package/dist/components/RenderQueue/actions.js +2 -1
- package/dist/components/RulersAndGuidesToggle.js +8 -1
- package/dist/components/SegmentedButton.d.ts +1 -0
- package/dist/components/SegmentedButton.js +9 -3
- package/dist/components/SelectedOutlineElement.js +16 -6
- package/dist/components/SelectedOutlinePolygon.js +4 -2
- package/dist/components/SettingsButton.js +8 -6
- package/dist/components/SettingsContext.d.ts +8 -0
- package/dist/components/SettingsContext.js +57 -2
- package/dist/components/SettingsModal.js +4 -1
- package/dist/components/SettingsModalFooter.js +1 -1
- package/dist/components/SidebarCollapserControls.js +13 -16
- package/dist/components/SizeSelector.js +2 -2
- package/dist/components/SkillsSettings.js +35 -4
- package/dist/components/SnappingToggle.js +7 -8
- package/dist/components/Splitter/SplitterHandle.js +1 -2
- package/dist/components/StudioSettings.js +32 -18
- package/dist/components/SyntaxHighlightedSource.d.ts +5 -0
- package/dist/components/{HighlightedElementSource.js → SyntaxHighlightedSource.js} +2 -2
- package/dist/components/Tabs/vertical.d.ts +1 -1
- package/dist/components/Tabs/vertical.js +16 -2
- package/dist/components/Timeline/EasingEditorModal.js +2 -2
- package/dist/components/Timeline/Timeline.js +47 -39
- package/dist/components/Timeline/TimelineAssetField.js +148 -9
- package/dist/components/Timeline/TimelineDragHandler.js +1 -2
- package/dist/components/Timeline/TimelineEffectItem.d.ts +1 -0
- package/dist/components/Timeline/TimelineEffectItem.js +2 -2
- package/dist/components/Timeline/TimelineEffectPropItem.d.ts +1 -0
- package/dist/components/Timeline/TimelineEffectPropItem.js +2 -2
- package/dist/components/Timeline/TimelineExpandedRow.js +2 -2
- package/dist/components/Timeline/TimelineInOutDragHandler.js +1 -2
- package/dist/components/Timeline/TimelineLayerChildren.js +12 -9
- package/dist/components/Timeline/TimelineSchemaField.js +8 -1
- package/dist/components/Timeline/TimelineSelection.d.ts +3 -1
- package/dist/components/Timeline/TimelineSelection.js +32 -5
- package/dist/components/Timeline/TimelineSequence.js +6 -6
- package/dist/components/Timeline/TimelineSequenceItem.js +12 -10
- package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.js +3 -12
- package/dist/components/Timeline/TimelineTranslateField.js +25 -12
- package/dist/components/Timeline/TimelineZoomControls.js +2 -1
- package/dist/components/Timeline/get-sequence-context-menu-items.js +22 -6
- package/dist/components/Timeline/timeline-field-display-utils.js +12 -7
- package/dist/components/Timeline/timeline-translate-utils.d.ts +17 -0
- package/dist/components/Timeline/timeline-translate-utils.js +53 -12
- package/dist/components/Timeline/use-open-sequence-in-apps.d.ts +2 -0
- package/dist/components/Timeline/use-open-sequence-in-apps.js +17 -0
- package/dist/components/Timeline/use-timeline-asset-drop.js +17 -3
- package/dist/components/Timeline/use-timeline-keyframe-drag.js +4 -4
- package/dist/components/TimelineCombobox.d.ts +1 -0
- package/dist/components/TimelineCombobox.js +9 -4
- package/dist/components/TimelineInOutToggle.js +8 -15
- package/dist/components/UndoRedoButtons.js +11 -0
- package/dist/components/composition-menu-items.js +56 -2
- package/dist/components/folder-menu-items.js +44 -0
- package/dist/components/get-open-in-menu-items.js +1 -1
- package/dist/components/handle-drop.js +3 -2
- package/dist/components/import-assets.d.ts +24 -1
- package/dist/components/import-assets.js +3 -1
- package/dist/components/keyboard-shortcuts.d.ts +4 -4
- package/dist/components/keyboard-shortcuts.js +28 -9
- package/dist/error-overlay/remotion-overlay/CodeFrame.js +29 -18
- package/dist/esm/LazyModels-gfmpcy4h.mjs +11 -0
- package/dist/esm/LazyModels-m1rf06wh.mjs +11 -0
- package/dist/esm/{HighlightedElementSource-jfc66k4p.mjs → SyntaxHighlightedSource-3xks91rz.mjs} +4 -4
- package/dist/esm/{TranscriptionModal-916jqhry.mjs → TranscriptionModal-8pvrehg4.mjs} +7 -7
- package/dist/esm/{VideoMattingModal-2tm79s9b.mjs → VideoMattingModal-fefbzgka.mjs} +7 -7
- package/dist/esm/{index-xhe2m2qr.mjs → index-0x13f28h.mjs} +35 -13
- package/dist/esm/{index-sgtmgc4h.mjs → index-1089795y.mjs} +3 -3
- package/dist/esm/{index-hy4xcgty.mjs → index-41kqns5c.mjs} +5 -3
- package/dist/esm/{index-6cvm9a65.mjs → index-ggqpre9v.mjs} +2868 -2099
- package/dist/esm/{index-czwvnn9g.mjs → index-hbezgbbq.mjs} +1 -1
- package/dist/esm/{index-1x7bsdh6.mjs → index-jrw61pkj.mjs} +2 -2
- package/dist/esm/{index-jg13hf2g.mjs → index-k426ye99.mjs} +2 -1
- package/dist/esm/{index-te66vvrp.mjs → index-mww32xc8.mjs} +4 -4
- package/dist/esm/{index-x7t2y7ws.mjs → index-s848rffx.mjs} +6985 -5956
- package/dist/esm/{index-3hgr6gjx.mjs → index-tzxb8808.mjs} +1 -1
- package/dist/esm/{index-5qddp5h7.mjs → index-vsxrxfpj.mjs} +1 -1
- package/dist/esm/index.mjs +3 -3
- package/dist/esm/internals.mjs +8 -8
- package/dist/esm/previewEntry.mjs +8 -8
- package/dist/esm/renderEntry.mjs +3 -3
- package/dist/helpers/colors.d.ts +1 -0
- package/dist/helpers/colors.js +4 -3
- package/dist/helpers/get-git-menu-item.d.ts +4 -0
- package/dist/helpers/get-git-menu-item.js +8 -1
- package/dist/helpers/get-sequence-double-click-action.d.ts +3 -3
- package/dist/helpers/get-sequence-double-click-action.js +2 -2
- package/dist/helpers/inject-css.js +2 -2
- package/dist/helpers/pointer-session.d.ts +1 -0
- package/dist/helpers/pointer-session.js +10 -1
- package/dist/helpers/prism-vsc-dark-plus.d.ts +1 -0
- package/dist/helpers/prism-vsc-dark-plus.js +305 -0
- package/dist/helpers/studio-runtime-config.d.ts +1 -1
- package/dist/helpers/use-create-composition.d.ts +1 -0
- package/dist/helpers/use-create-composition.js +17 -7
- package/dist/helpers/use-keybinding.d.ts +1 -1
- package/dist/helpers/use-keyboard-shortcut-label.d.ts +2 -2
- package/dist/helpers/use-media-metadata.js +5 -1
- package/dist/helpers/use-menu-structure.js +6 -2
- package/dist/helpers/use-rename-composition.d.ts +1 -0
- package/dist/helpers/use-rename-composition.js +16 -5
- package/dist/icons/skills.js +1 -1
- package/dist/renderEntry.js +2 -2
- package/dist/state/modals.d.ts +13 -1
- package/dist/state/z-index.js +1 -3
- package/package.json +20 -20
- package/dist/components/HighlightedElementSource.d.ts +0 -5
- package/dist/esm/LazyModels-2trdm224.mjs +0 -11
- package/dist/esm/LazyModels-fjb5ckaq.mjs +0 -11
- package/dist/helpers/prism-tomorrow.d.ts +0 -1
- package/dist/helpers/prism-tomorrow.js +0 -151
- /package/dist/esm/{resolve-composition-component-location-14148845.mjs → resolve-composition-component-location-bt2d6qxq.mjs} +0 -0
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.getCompositionContextMenuItems = exports.getCompositionMenuItems = void 0;
|
|
4
4
|
const no_react_1 = require("remotion/no-react");
|
|
5
5
|
const format_file_location_1 = require("../helpers/format-file-location");
|
|
6
|
+
const get_git_menu_item_1 = require("../helpers/get-git-menu-item");
|
|
6
7
|
const open_in_editor_1 = require("../helpers/open-in-editor");
|
|
7
8
|
const NotificationCenter_1 = require("./Notifications/NotificationCenter");
|
|
8
9
|
const open_in_new_window_1 = require("./open-in-new-window");
|
|
@@ -22,6 +23,13 @@ const getCompositionMenuItems = ({ composition, connectionStatus, resolvedLocati
|
|
|
22
23
|
connectionStatus !== 'connected' ||
|
|
23
24
|
!resolvedLocation;
|
|
24
25
|
const openComponentInEditorDisabled = showInEditorDisabled || !(resolvedLocation === null || resolvedLocation === void 0 ? void 0 : resolvedLocation.source);
|
|
26
|
+
const gitSourceName = window.remotion_gitSource
|
|
27
|
+
? (0, get_git_menu_item_1.getGitSourceName)(window.remotion_gitSource)
|
|
28
|
+
: null;
|
|
29
|
+
const openCompositionInGitSourceDisabled = !composition || !resolvedLocation;
|
|
30
|
+
const openComponentInGitSourceDisabled = openCompositionInGitSourceDisabled ||
|
|
31
|
+
!(resolvedLocation === null || resolvedLocation === void 0 ? void 0 : resolvedLocation.source) ||
|
|
32
|
+
(!readOnlyStudio && connectionStatus !== 'connected');
|
|
25
33
|
const copyFileLocationDisabled = !composition || !fileLocation;
|
|
26
34
|
return [
|
|
27
35
|
editorName
|
|
@@ -78,7 +86,53 @@ const getCompositionMenuItems = ({ composition, connectionStatus, resolvedLocati
|
|
|
78
86
|
disabled: openComponentInEditorDisabled,
|
|
79
87
|
}
|
|
80
88
|
: null,
|
|
81
|
-
|
|
89
|
+
gitSourceName
|
|
90
|
+
? {
|
|
91
|
+
id: 'open-composition-in-git-source',
|
|
92
|
+
keyHint: null,
|
|
93
|
+
label: `Open composition in ${gitSourceName}`,
|
|
94
|
+
leftItem: null,
|
|
95
|
+
onClick: () => {
|
|
96
|
+
closeMenu();
|
|
97
|
+
(0, get_git_menu_item_1.openGitSource)({ folder: false, location: resolvedLocation });
|
|
98
|
+
},
|
|
99
|
+
quickSwitcherLabel: `Open composition in ${gitSourceName}`,
|
|
100
|
+
subMenu: null,
|
|
101
|
+
type: 'item',
|
|
102
|
+
value: 'open-composition-in-git-source',
|
|
103
|
+
disabled: openCompositionInGitSourceDisabled,
|
|
104
|
+
}
|
|
105
|
+
: null,
|
|
106
|
+
gitSourceName
|
|
107
|
+
? {
|
|
108
|
+
id: 'open-component-in-git-source',
|
|
109
|
+
keyHint: null,
|
|
110
|
+
label: `Open component in ${gitSourceName}`,
|
|
111
|
+
leftItem: null,
|
|
112
|
+
onClick: async () => {
|
|
113
|
+
closeMenu();
|
|
114
|
+
if (!composition || !(resolvedLocation === null || resolvedLocation === void 0 ? void 0 : resolvedLocation.source)) {
|
|
115
|
+
return;
|
|
116
|
+
}
|
|
117
|
+
try {
|
|
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
|
+
}
|
|
127
|
+
},
|
|
128
|
+
quickSwitcherLabel: `Open composition component in ${gitSourceName}`,
|
|
129
|
+
subMenu: null,
|
|
130
|
+
type: 'item',
|
|
131
|
+
value: 'open-component-in-git-source',
|
|
132
|
+
disabled: openComponentInGitSourceDisabled,
|
|
133
|
+
}
|
|
134
|
+
: null,
|
|
135
|
+
(editorName || gitSourceName) && includeCompositionManagementItems
|
|
82
136
|
? {
|
|
83
137
|
type: 'divider',
|
|
84
138
|
id: 'show-in-editor-divider',
|
|
@@ -154,7 +208,7 @@ const getCompositionMenuItems = ({ composition, connectionStatus, resolvedLocati
|
|
|
154
208
|
disabled: !composition || readOnlyStudio,
|
|
155
209
|
}
|
|
156
210
|
: null,
|
|
157
|
-
editorName || includeCompositionManagementItems
|
|
211
|
+
editorName || gitSourceName || includeCompositionManagementItems
|
|
158
212
|
? {
|
|
159
213
|
type: 'divider',
|
|
160
214
|
id: 'copy-actions-divider',
|
|
@@ -15,6 +15,11 @@ const getFolderMenuItems = ({ closeMenu, connectionStatus, folder, readOnlyStudi
|
|
|
15
15
|
location: resolvedLocation,
|
|
16
16
|
root: window.remotion_cwd,
|
|
17
17
|
});
|
|
18
|
+
const contextForAgents = (0, format_file_location_1.formatContextForAgents)({
|
|
19
|
+
location: resolvedLocation,
|
|
20
|
+
name: folderId,
|
|
21
|
+
root: window.remotion_cwd,
|
|
22
|
+
});
|
|
18
23
|
const showInEditorDisabled = !editorId || connectionStatus !== 'connected' || !resolvedLocation;
|
|
19
24
|
const copyFileLocationDisabled = !fileLocation;
|
|
20
25
|
const codemodDisabled = readOnlyStudio || !folder.stack;
|
|
@@ -44,6 +49,26 @@ const getFolderMenuItems = ({ closeMenu, connectionStatus, folder, readOnlyStudi
|
|
|
44
49
|
disabled: showInEditorDisabled,
|
|
45
50
|
}
|
|
46
51
|
: null,
|
|
52
|
+
{
|
|
53
|
+
id: 'copy-context-for-agents',
|
|
54
|
+
keyHint: null,
|
|
55
|
+
label: `Copy context for agents`,
|
|
56
|
+
leftItem: null,
|
|
57
|
+
onClick: () => {
|
|
58
|
+
closeMenu();
|
|
59
|
+
if (!contextForAgents) {
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
navigator.clipboard.writeText(contextForAgents).catch((err) => {
|
|
63
|
+
(0, NotificationCenter_1.showNotification)(`Could not copy to clipboard: ${err.message}`, 1000);
|
|
64
|
+
});
|
|
65
|
+
},
|
|
66
|
+
quickSwitcherLabel: null,
|
|
67
|
+
subMenu: null,
|
|
68
|
+
type: 'item',
|
|
69
|
+
value: 'copy-context-for-agents',
|
|
70
|
+
disabled: !contextForAgents,
|
|
71
|
+
},
|
|
47
72
|
{
|
|
48
73
|
id: 'copy-folder-file-location',
|
|
49
74
|
keyHint: null,
|
|
@@ -96,6 +121,25 @@ const getFolderMenuItems = ({ closeMenu, connectionStatus, folder, readOnlyStudi
|
|
|
96
121
|
value: 'new-composition-in-folder',
|
|
97
122
|
disabled: codemodDisabled,
|
|
98
123
|
},
|
|
124
|
+
{
|
|
125
|
+
id: 'new-folder-in-folder',
|
|
126
|
+
keyHint: null,
|
|
127
|
+
label: `New folder...`,
|
|
128
|
+
leftItem: null,
|
|
129
|
+
onClick: () => {
|
|
130
|
+
closeMenu();
|
|
131
|
+
setSelectedModal({
|
|
132
|
+
type: 'new-folder',
|
|
133
|
+
parentName: folderId,
|
|
134
|
+
stack: folder.stack,
|
|
135
|
+
});
|
|
136
|
+
},
|
|
137
|
+
quickSwitcherLabel: 'New folder in folder...',
|
|
138
|
+
subMenu: null,
|
|
139
|
+
type: 'item',
|
|
140
|
+
value: 'new-folder-in-folder',
|
|
141
|
+
disabled: codemodDisabled,
|
|
142
|
+
},
|
|
99
143
|
{
|
|
100
144
|
id: 'rename-folder',
|
|
101
145
|
keyHint: null,
|
|
@@ -81,7 +81,7 @@ const getOpenInMenuItems = ({ codingAgentInfo, editorDisabled, editorInfo, exclu
|
|
|
81
81
|
id: 'open-in-github',
|
|
82
82
|
keyHint: null,
|
|
83
83
|
label: jsx_runtime_1.jsx("span", { style: menuLabel, children: "GitHub.com" }),
|
|
84
|
-
leftItem: jsx_runtime_1.jsx(github_1.GitHubIcon, { size:
|
|
84
|
+
leftItem: jsx_runtime_1.jsx(github_1.GitHubIcon, { size: 16 }),
|
|
85
85
|
onClick: () => {
|
|
86
86
|
(0, get_git_menu_item_1.openGitSource)({ folder, location });
|
|
87
87
|
},
|
|
@@ -8,7 +8,7 @@ const element_install_request_1 = require("./element-install-request");
|
|
|
8
8
|
const import_assets_1 = require("./import-assets");
|
|
9
9
|
const handleDrop = async ({ chooseSvgImportMode, compositionFile, compositionId, destinationDimensions, dropPosition, event, fps, from, localFiles, preferCompositionStart, }) => {
|
|
10
10
|
var _a;
|
|
11
|
-
var _b, _c, _d;
|
|
11
|
+
var _b, _c, _d, _e;
|
|
12
12
|
if (localFiles !== null || (0, drop_handler_data_1.isFileDragEvent)(event)) {
|
|
13
13
|
const files = localFiles !== null && localFiles !== void 0 ? localFiles : Array.from((_b = (_a = event.dataTransfer) === null || _a === void 0 ? void 0 : _a.files) !== null && _b !== void 0 ? _b : []);
|
|
14
14
|
if (files.length === 0) {
|
|
@@ -91,7 +91,8 @@ const handleDrop = async ({ chooseSvgImportMode, compositionFile, compositionId,
|
|
|
91
91
|
element: {
|
|
92
92
|
...element.element,
|
|
93
93
|
durationInFrames: (_c = element.element.durationInFrames) !== null && _c !== void 0 ? _c : null,
|
|
94
|
-
|
|
94
|
+
initialProps: (_d = element.element.initialProps) !== null && _d !== void 0 ? _d : null,
|
|
95
|
+
installationMode: (_e = element.element.installationMode) !== null && _e !== void 0 ? _e : null,
|
|
95
96
|
},
|
|
96
97
|
from: (0, import_assets_1.getFromForDrop)({
|
|
97
98
|
durationInFrames: element.element.durationInFrames,
|
|
@@ -156,7 +156,7 @@ export declare const insertComposition: ({ composition, compositionFile, composi
|
|
|
156
156
|
from: number | null;
|
|
157
157
|
preferCompositionStart: boolean | null;
|
|
158
158
|
}) => Promise<void>;
|
|
159
|
-
export declare const insertElement: ({ installationName, compositionFile, compositionId, element, expectedFileState, position, from, overwriteExisting, }: {
|
|
159
|
+
export declare const insertElement: ({ installationName, compositionFile, compositionId, element, expectedFileState, position, from, overwriteExisting, undoRedoNavigation, newComposition, }: {
|
|
160
160
|
installationName: string | null;
|
|
161
161
|
compositionFile: string;
|
|
162
162
|
compositionId: string;
|
|
@@ -165,4 +165,27 @@ export declare const insertElement: ({ installationName, compositionFile, compos
|
|
|
165
165
|
position: InsertableCompositionElementPosition | null;
|
|
166
166
|
from: number | null;
|
|
167
167
|
overwriteExisting: boolean;
|
|
168
|
+
undoRedoNavigation: import("@remotion/studio-shared").UndoRedoNavigation | null;
|
|
169
|
+
newComposition: {
|
|
170
|
+
codemod: {
|
|
171
|
+
type: "new-composition";
|
|
172
|
+
newId: string;
|
|
173
|
+
componentName: string;
|
|
174
|
+
componentImportPath: string;
|
|
175
|
+
folderName: string | null;
|
|
176
|
+
parentName: string | null;
|
|
177
|
+
newHeight: number;
|
|
178
|
+
newWidth: number;
|
|
179
|
+
newFps: number;
|
|
180
|
+
newDurationInFrames: number;
|
|
181
|
+
canvasCapture: {
|
|
182
|
+
readonly videoFileName: string;
|
|
183
|
+
readonly videoHeight: number;
|
|
184
|
+
readonly videoWidth: number;
|
|
185
|
+
readonly keyframeFps: number;
|
|
186
|
+
readonly data: import("@remotion/studio-shared").CanvasCaptureData;
|
|
187
|
+
} | null;
|
|
188
|
+
};
|
|
189
|
+
symbolicatedStack: import("@remotion/studio-shared").SymbolicatedStackFrame | null;
|
|
190
|
+
} | null;
|
|
168
191
|
}) => Promise<boolean>;
|
|
@@ -875,7 +875,7 @@ const insertComposition = async ({ composition, compositionFile, compositionId,
|
|
|
875
875
|
}
|
|
876
876
|
};
|
|
877
877
|
exports.insertComposition = insertComposition;
|
|
878
|
-
const insertElement = async ({ installationName, compositionFile, compositionId, element, expectedFileState, position, from, overwriteExisting, }) => {
|
|
878
|
+
const insertElement = async ({ installationName, compositionFile, compositionId, element, expectedFileState, position, from, overwriteExisting, undoRedoNavigation, newComposition, }) => {
|
|
879
879
|
try {
|
|
880
880
|
if ((0, browser_studio_operations_1.getBrowserStudioOperations)() === null) {
|
|
881
881
|
await (0, install_required_package_1.installRequiredPackages)(element.dependencies);
|
|
@@ -889,6 +889,8 @@ const insertElement = async ({ installationName, compositionFile, compositionId,
|
|
|
889
889
|
from,
|
|
890
890
|
overwriteExisting,
|
|
891
891
|
position,
|
|
892
|
+
undoRedoNavigation,
|
|
893
|
+
newComposition,
|
|
892
894
|
});
|
|
893
895
|
if (!response.success) {
|
|
894
896
|
const reason = response.type === 'error'
|
|
@@ -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" | "playForward" | "playPause" | "previousComposition" | "quickSwitcher" | "redo" | "render" | "resetZoom" | "reversePlayback" | "selectAllSequenceRows" | "selectOpacityProp" | "selectRotateProp" | "selectScaleProp" | "selectTranslateProp" | "setInPoint" | "setOutPoint" | "showKeyboardShortcuts" | "toggleBothSidebars" | "toggleCheckerboard" | "toggleLeftSidebar" | "toggleRightSidebar" | "toggleSnapping" | "undo" | "zoomIn" | "zoomOut", configured?: Partial<Record<"askAI" | "clearInOutPoints" | "copyEffectsAndValues" | "cutEffects" | "deleteSelection" | "duplicateSequences" | "enterFullscreen" | "goToFrame" | "jumpToBeginning" | "jumpToEnd" | "nextComposition" | "pauseAndReturnToPlaybackStart" | "pausePlayback" | "playForward" | "playPause" | "previousComposition" | "quickSwitcher" | "redo" | "render" | "resetZoom" | "reversePlayback" | "selectAllSequenceRows" | "selectOpacityProp" | "selectRotateProp" | "selectScaleProp" | "selectTranslateProp" | "setInPoint" | "setOutPoint" | "showKeyboardShortcuts" | "toggleBothSidebars" | "toggleCheckerboard" | "toggleLeftSidebar" | "toggleRightSidebar" | "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" | "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[];
|
|
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" | "playForward" | "playPause" | "previousComposition" | "quickSwitcher" | "redo" | "render" | "resetZoom" | "reversePlayback" | "selectAllSequenceRows" | "selectOpacityProp" | "selectRotateProp" | "selectScaleProp" | "selectTranslateProp" | "setInPoint" | "setOutPoint" | "showKeyboardShortcuts" | "toggleBothSidebars" | "toggleCheckerboard" | "toggleLeftSidebar" | "toggleRightSidebar" | "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" | "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" | "playForward" | "playPause" | "previousComposition" | "quickSwitcher" | "redo" | "render" | "resetZoom" | "reversePlayback" | "selectAllSequenceRows" | "selectOpacityProp" | "selectRotateProp" | "selectScaleProp" | "selectTranslateProp" | "setInPoint" | "setOutPoint" | "showKeyboardShortcuts" | "toggleBothSidebars" | "toggleCheckerboard" | "toggleLeftSidebar" | "toggleRightSidebar" | "toggleSnapping" | "undo" | "zoomIn" | "zoomOut") => string;
|
|
25
|
-
export declare const getKeyboardShortcutAriaKeyShortcuts: (action: "askAI" | "clearInOutPoints" | "copyEffectsAndValues" | "cutEffects" | "deleteSelection" | "duplicateSequences" | "enterFullscreen" | "goToFrame" | "jumpToBeginning" | "jumpToEnd" | "nextComposition" | "pauseAndReturnToPlaybackStart" | "pausePlayback" | "playForward" | "playPause" | "previousComposition" | "quickSwitcher" | "redo" | "render" | "resetZoom" | "reversePlayback" | "selectAllSequenceRows" | "selectOpacityProp" | "selectRotateProp" | "selectScaleProp" | "selectTranslateProp" | "setInPoint" | "setOutPoint" | "showKeyboardShortcuts" | "toggleBothSidebars" | "toggleCheckerboard" | "toggleLeftSidebar" | "toggleRightSidebar" | "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" | "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;
|
|
26
26
|
export declare const shortcutFromKeyboardEvent: (event: KeyboardEvent) => StudioKeyboardShortcut | null;
|
|
@@ -7,11 +7,13 @@ const shortcut = (action, actionId) => ({ action, actionId });
|
|
|
7
7
|
const fixedShortcut = (action, fixedChords, fixedReason) => ({ action, actionId: null, fixedChords, fixedReason });
|
|
8
8
|
exports.defaultKeyboardShortcuts = {
|
|
9
9
|
playPause: [{ key: 'Space' }],
|
|
10
|
+
toggleMute: [{ key: 'm', shift: false }],
|
|
11
|
+
toggleLoop: [{ key: 'l', shift: true }],
|
|
10
12
|
jumpToBeginning: [{ key: 'a' }],
|
|
11
13
|
jumpToEnd: [{ key: 'e' }],
|
|
12
14
|
reversePlayback: [{ key: 'j' }],
|
|
13
15
|
pausePlayback: [{ key: 'k' }],
|
|
14
|
-
playForward: [{ key: 'l' }],
|
|
16
|
+
playForward: [{ key: 'l', shift: false }],
|
|
15
17
|
goToFrame: [{ key: 'g' }],
|
|
16
18
|
pauseAndReturnToPlaybackStart: [{ key: 'Enter' }],
|
|
17
19
|
toggleLeftSidebar: [{ key: 'b', commandOrControl: true }],
|
|
@@ -19,14 +21,16 @@ exports.defaultKeyboardShortcuts = {
|
|
|
19
21
|
toggleBothSidebars: [{ key: 'g', commandOrControl: true }],
|
|
20
22
|
enterFullscreen: [{ key: 'f' }],
|
|
21
23
|
toggleSnapping: [{ key: 'm', shift: true }],
|
|
24
|
+
toggleOutlines: [{ key: 'o', shift: true }],
|
|
25
|
+
toggleRulersAndGuides: [{ key: 'r', shift: true }],
|
|
22
26
|
previousComposition: [{ key: 'PageUp' }],
|
|
23
27
|
nextComposition: [{ key: 'PageDown' }],
|
|
24
28
|
showKeyboardShortcuts: [{ key: '?', shift: true }],
|
|
25
29
|
quickSwitcher: [{ key: 'k', commandOrControl: true }],
|
|
26
|
-
render: [{ key: 'r' }],
|
|
30
|
+
render: [{ key: 'r', shift: false }],
|
|
27
31
|
toggleCheckerboard: [{ key: 't' }],
|
|
28
32
|
setInPoint: [{ key: 'i' }],
|
|
29
|
-
setOutPoint: [{ key: 'o' }],
|
|
33
|
+
setOutPoint: [{ key: 'o', shift: false }],
|
|
30
34
|
clearInOutPoints: [{ key: 'x' }],
|
|
31
35
|
zoomIn: [{ key: '+', shift: true }, { key: '+' }],
|
|
32
36
|
zoomOut: [{ key: '-' }],
|
|
@@ -39,13 +43,14 @@ exports.defaultKeyboardShortcuts = {
|
|
|
39
43
|
selectAllSequenceRows: [{ key: 'a', commandOrControl: true }],
|
|
40
44
|
selectTranslateProp: [{ key: 'p' }],
|
|
41
45
|
selectOpacityProp: [{ key: 't' }],
|
|
42
|
-
selectRotateProp: [{ key: 'r' }],
|
|
46
|
+
selectRotateProp: [{ key: 'r', shift: false }],
|
|
43
47
|
selectScaleProp: [{ key: 's' }],
|
|
44
48
|
duplicateSequences: [{ key: 'd', commandOrControl: true }],
|
|
45
49
|
copyEffectsAndValues: [{ key: 'c', commandOrControl: true }],
|
|
46
50
|
cutEffects: [{ key: 'x', commandOrControl: true }],
|
|
47
51
|
deleteSelection: [{ key: 'Backspace' }, { key: 'Delete' }],
|
|
48
52
|
askAI: [{ key: 'i', commandOrControl: true }],
|
|
53
|
+
pickColor: [{ key: 'c', shift: true }],
|
|
49
54
|
};
|
|
50
55
|
exports.keyboardShortcutGroups = [
|
|
51
56
|
{
|
|
@@ -54,6 +59,8 @@ exports.keyboardShortcutGroups = [
|
|
|
54
59
|
fixedShortcut('1 second back', [['Shift', '←']], 'Context-sensitive timeline control'),
|
|
55
60
|
fixedShortcut('Previous frame', [['←']], 'Context-sensitive timeline control'),
|
|
56
61
|
shortcut('Play / Pause', 'playPause'),
|
|
62
|
+
shortcut('Mute / Unmute', 'toggleMute'),
|
|
63
|
+
shortcut('Loop', 'toggleLoop'),
|
|
57
64
|
fixedShortcut('Next frame', [['→']], 'Context-sensitive timeline control'),
|
|
58
65
|
fixedShortcut('1 second forward', [['Shift', '→']], 'Context-sensitive timeline control'),
|
|
59
66
|
shortcut('Jump to beginning', 'jumpToBeginning'),
|
|
@@ -79,6 +86,8 @@ exports.keyboardShortcutGroups = [
|
|
|
79
86
|
shortcut('Enter fullscreen', 'enterFullscreen'),
|
|
80
87
|
fixedShortcut('Exit fullscreen', [['Esc']], 'Handled by the browser'),
|
|
81
88
|
shortcut('Enable snapping', 'toggleSnapping'),
|
|
89
|
+
shortcut('Outlines', 'toggleOutlines'),
|
|
90
|
+
shortcut('Rulers and guides', 'toggleRulersAndGuides'),
|
|
82
91
|
],
|
|
83
92
|
},
|
|
84
93
|
{
|
|
@@ -108,6 +117,10 @@ exports.keyboardShortcutGroups = [
|
|
|
108
117
|
shortcut('Reset zoom', 'resetZoom'),
|
|
109
118
|
],
|
|
110
119
|
},
|
|
120
|
+
{
|
|
121
|
+
name: 'Tools',
|
|
122
|
+
shortcuts: [shortcut('Color Picker', 'pickColor')],
|
|
123
|
+
},
|
|
111
124
|
{
|
|
112
125
|
name: 'Props Editor',
|
|
113
126
|
shortcuts: [shortcut('Undo', 'undo'), shortcut('Redo', 'redo')],
|
|
@@ -157,14 +170,20 @@ const keyboardEventMatchesShortcut = ({ event, shortcut: value, }) => {
|
|
|
157
170
|
return (event.key.toLowerCase() === normalizeKey(value.key).toLowerCase() &&
|
|
158
171
|
commandOrControl === ((_a = value.commandOrControl) !== null && _a !== void 0 ? _a : false) &&
|
|
159
172
|
(is_mac_1.isMac ? !event.ctrlKey : !event.metaKey) &&
|
|
160
|
-
(
|
|
161
|
-
(
|
|
173
|
+
(value.shift === undefined || event.shiftKey === value.shift) &&
|
|
174
|
+
(value.alt === undefined || event.altKey === value.alt));
|
|
162
175
|
};
|
|
163
176
|
exports.keyboardEventMatchesShortcut = keyboardEventMatchesShortcut;
|
|
164
177
|
const keyboardShortcutsOverlap = (first, second) => {
|
|
165
178
|
var _a, _b;
|
|
166
179
|
return first.key.toLowerCase() === second.key.toLowerCase() &&
|
|
167
|
-
((_a = first.commandOrControl) !== null && _a !== void 0 ? _a : false) === ((_b = second.commandOrControl) !== null && _b !== void 0 ? _b : false)
|
|
180
|
+
((_a = first.commandOrControl) !== null && _a !== void 0 ? _a : false) === ((_b = second.commandOrControl) !== null && _b !== void 0 ? _b : false) &&
|
|
181
|
+
(first.shift === undefined ||
|
|
182
|
+
second.shift === undefined ||
|
|
183
|
+
first.shift === second.shift) &&
|
|
184
|
+
(first.alt === undefined ||
|
|
185
|
+
second.alt === undefined ||
|
|
186
|
+
first.alt === second.alt);
|
|
168
187
|
};
|
|
169
188
|
exports.keyboardShortcutsOverlap = keyboardShortcutsOverlap;
|
|
170
189
|
const keyboardEventMatchesAction = (event, action) => (0, exports.getKeyboardShortcutsForAction)(action).some((value) => (0, exports.keyboardEventMatchesShortcut)({ event, shortcut: value }));
|
|
@@ -216,8 +235,8 @@ const shortcutFromKeyboardEvent = (event) => {
|
|
|
216
235
|
...((is_mac_1.isMac ? event.metaKey : event.ctrlKey)
|
|
217
236
|
? { commandOrControl: true }
|
|
218
237
|
: {}),
|
|
219
|
-
|
|
220
|
-
|
|
238
|
+
shift: event.shiftKey,
|
|
239
|
+
alt: event.altKey,
|
|
221
240
|
};
|
|
222
241
|
};
|
|
223
242
|
exports.shortcutFromKeyboardEvent = shortcutFromKeyboardEvent;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.CodeFrame = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const LazySyntaxHighlightedSource_1 = require("../../components/LazySyntaxHighlightedSource");
|
|
5
6
|
const is_menu_item_1 = require("../../components/Menu/is-menu-item");
|
|
6
7
|
const colors_1 = require("../../helpers/colors");
|
|
7
8
|
const container = {
|
|
@@ -13,6 +14,8 @@ const frame = {
|
|
|
13
14
|
backgroundColor: colors_1.ERROR_CODE_FRAME_BACKGROUND,
|
|
14
15
|
borderRadius: 6,
|
|
15
16
|
marginBottom: 20,
|
|
17
|
+
marginLeft: 14,
|
|
18
|
+
marginRight: 14,
|
|
16
19
|
overflowY: 'auto',
|
|
17
20
|
};
|
|
18
21
|
const lineNumber = {
|
|
@@ -29,23 +32,31 @@ const lineNumber = {
|
|
|
29
32
|
fontFamily: 'monospace',
|
|
30
33
|
};
|
|
31
34
|
const CodeFrame = ({ source, lineNumberWidth }) => {
|
|
32
|
-
return (jsx_runtime_1.jsx("div", { style: frame, className: is_menu_item_1.HORIZONTAL_SCROLLBAR_CLASSNAME, children: source.map((s, j) => {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
35
|
+
return (jsx_runtime_1.jsx("div", { style: frame, className: is_menu_item_1.HORIZONTAL_SCROLLBAR_CLASSNAME, children: jsx_runtime_1.jsx("div", { style: { minWidth: '100%', width: 'max-content' }, children: source.map((s, j) => {
|
|
36
|
+
return (jsx_runtime_1.jsxs("div", { style: {
|
|
37
|
+
...container,
|
|
38
|
+
backgroundColor: s.highlight
|
|
39
|
+
? colors_1.SELECTED_BACKGROUND
|
|
40
|
+
: colors_1.TRANSPARENT,
|
|
41
|
+
}, children: [
|
|
42
|
+
jsx_runtime_1.jsx("div", { style: {
|
|
43
|
+
...lineNumber,
|
|
44
|
+
backgroundColor: s.highlight
|
|
45
|
+
? colors_1.TRANSPARENT
|
|
46
|
+
: colors_1.ERROR_CODE_FRAME_LINE_BACKGROUND,
|
|
47
|
+
color: s.highlight ? colors_1.WHITE : colors_1.WHITE_ALPHA_40,
|
|
48
|
+
}, children: String(s.lineNumber).padStart(lineNumberWidth, ' ') }), jsx_runtime_1.jsx("code", { className: "language-tsx", style: {
|
|
49
|
+
fontFamily: 'monospace',
|
|
50
|
+
fontSize: 14,
|
|
51
|
+
color: '#9cdcfe',
|
|
52
|
+
whiteSpace: 'pre',
|
|
53
|
+
tabSize: 2,
|
|
54
|
+
backgroundColor: colors_1.TRANSPARENT,
|
|
55
|
+
lineHeight: 1.7,
|
|
56
|
+
paddingRight: 12,
|
|
57
|
+
paddingLeft: 12,
|
|
58
|
+
}, children: jsx_runtime_1.jsx(LazySyntaxHighlightedSource_1.LazySyntaxHighlightedSource, { source: s.content }) })
|
|
59
|
+
] }, j));
|
|
60
|
+
}) }) }));
|
|
50
61
|
};
|
|
51
62
|
exports.CodeFrame = CodeFrame;
|
package/dist/esm/{HighlightedElementSource-jfc66k4p.mjs → SyntaxHighlightedSource-3xks91rz.mjs}
RENAMED
|
@@ -1184,7 +1184,7 @@ var init_prism_tsx = __esm(() => {
|
|
|
1184
1184
|
})(Prism);
|
|
1185
1185
|
});
|
|
1186
1186
|
|
|
1187
|
-
// src/components/
|
|
1187
|
+
// src/components/SyntaxHighlightedSource.tsx
|
|
1188
1188
|
var import_prismjs = __toESM(require_prism(), 1);
|
|
1189
1189
|
import React, { useMemo } from "react";
|
|
1190
1190
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -1221,7 +1221,7 @@ var renderTokens = (tokens) => {
|
|
|
1221
1221
|
children: renderTokens(tokens.content)
|
|
1222
1222
|
});
|
|
1223
1223
|
};
|
|
1224
|
-
var
|
|
1224
|
+
var SyntaxHighlightedSource = ({
|
|
1225
1225
|
source
|
|
1226
1226
|
}) => {
|
|
1227
1227
|
const tokens = useMemo(() => import_prismjs.default.tokenize(source, import_prismjs.default.languages.tsx), [source]);
|
|
@@ -1230,7 +1230,7 @@ var HighlightedElementSource = ({
|
|
|
1230
1230
|
children: renderTokens(tokens)
|
|
1231
1231
|
});
|
|
1232
1232
|
};
|
|
1233
|
-
var
|
|
1233
|
+
var SyntaxHighlightedSource_default = SyntaxHighlightedSource;
|
|
1234
1234
|
export {
|
|
1235
|
-
|
|
1235
|
+
SyntaxHighlightedSource_default as default
|
|
1236
1236
|
};
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
NumberSetting,
|
|
7
7
|
getDefaultCaptionOutputName,
|
|
8
8
|
validateCaptionOutputName
|
|
9
|
-
} from "./index-
|
|
9
|
+
} from "./index-1089795y.mjs";
|
|
10
10
|
import {
|
|
11
11
|
Button,
|
|
12
12
|
Checkbox,
|
|
@@ -32,20 +32,20 @@ import {
|
|
|
32
32
|
rightRow,
|
|
33
33
|
showNotification,
|
|
34
34
|
useStaticFiles
|
|
35
|
-
} from "./index-
|
|
35
|
+
} from "./index-ggqpre9v.mjs";
|
|
36
36
|
import {
|
|
37
37
|
RenderQueueContext
|
|
38
38
|
} from "./index-9x6e1dq0.mjs";
|
|
39
39
|
import {
|
|
40
40
|
openInFileExplorer
|
|
41
|
-
} from "./index-
|
|
41
|
+
} from "./index-41kqns5c.mjs";
|
|
42
42
|
import {
|
|
43
43
|
getBrowserStudioOperations
|
|
44
44
|
} from "./index-cw0pnpg5.mjs";
|
|
45
45
|
import {
|
|
46
46
|
Models
|
|
47
|
-
} from "./index-
|
|
48
|
-
import"./index-
|
|
47
|
+
} from "./index-vsxrxfpj.mjs";
|
|
48
|
+
import"./index-jrw61pkj.mjs";
|
|
49
49
|
import {
|
|
50
50
|
InlineAction,
|
|
51
51
|
Spacing,
|
|
@@ -61,13 +61,13 @@ import {
|
|
|
61
61
|
leftSidebar,
|
|
62
62
|
optionsPanel,
|
|
63
63
|
outerModalStyle
|
|
64
|
-
} from "./index-
|
|
64
|
+
} from "./index-0x13f28h.mjs";
|
|
65
65
|
import"./index-5zrb1ft4.mjs";
|
|
66
66
|
import {
|
|
67
67
|
BLUE_DISABLED,
|
|
68
68
|
LIGHT_TEXT,
|
|
69
69
|
WHITE
|
|
70
|
-
} from "./index-
|
|
70
|
+
} from "./index-k426ye99.mjs";
|
|
71
71
|
import"./index-rcv7qkt5.mjs";
|
|
72
72
|
|
|
73
73
|
// src/components/Transcription/TranscriptionModal.tsx
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./index-7tt71e8n.mjs";
|
|
4
4
|
import {
|
|
5
5
|
RenderModalOutputName
|
|
6
|
-
} from "./index-
|
|
6
|
+
} from "./index-mww32xc8.mjs";
|
|
7
7
|
import {
|
|
8
8
|
Button,
|
|
9
9
|
Checkmark,
|
|
@@ -25,16 +25,16 @@ import {
|
|
|
25
25
|
rightRow,
|
|
26
26
|
useStaticFiles,
|
|
27
27
|
validatePublicOutputName
|
|
28
|
-
} from "./index-
|
|
28
|
+
} from "./index-ggqpre9v.mjs";
|
|
29
29
|
import {
|
|
30
30
|
RenderQueueContext
|
|
31
31
|
} from "./index-9x6e1dq0.mjs";
|
|
32
|
-
import"./index-
|
|
32
|
+
import"./index-41kqns5c.mjs";
|
|
33
33
|
import"./index-cw0pnpg5.mjs";
|
|
34
34
|
import {
|
|
35
35
|
Models
|
|
36
|
-
} from "./index-
|
|
37
|
-
import"./index-
|
|
36
|
+
} from "./index-hbezgbbq.mjs";
|
|
37
|
+
import"./index-jrw61pkj.mjs";
|
|
38
38
|
import {
|
|
39
39
|
VERTICAL_SCROLLBAR_CLASSNAME,
|
|
40
40
|
ValidationMessage,
|
|
@@ -48,11 +48,11 @@ import {
|
|
|
48
48
|
leftSidebar,
|
|
49
49
|
optionsPanel,
|
|
50
50
|
outerModalStyle
|
|
51
|
-
} from "./index-
|
|
51
|
+
} from "./index-0x13f28h.mjs";
|
|
52
52
|
import"./index-5zrb1ft4.mjs";
|
|
53
53
|
import {
|
|
54
54
|
BLUE_DISABLED
|
|
55
|
-
} from "./index-
|
|
55
|
+
} from "./index-k426ye99.mjs";
|
|
56
56
|
import"./index-rcv7qkt5.mjs";
|
|
57
57
|
|
|
58
58
|
// src/components/VideoMatting/VideoMattingModal.tsx
|