@remotion/studio 4.0.485 → 4.0.487
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/ResolveCompositionConfigInStudio.js +42 -0
- package/dist/components/AssetSelector.js +1 -1
- package/dist/components/AssetSelectorItem.js +9 -9
- package/dist/components/AudioWaveform.js +3 -3
- package/dist/components/Button.js +2 -2
- package/dist/components/Canvas.js +28 -0
- package/dist/components/CanvasOrLoading.js +1 -1
- package/dist/components/CheckboardToggle.js +1 -1
- package/dist/components/Checkbox.js +3 -3
- package/dist/components/ColorPicker/AlphaSlider.js +4 -3
- package/dist/components/ColorPicker/ColorPicker.js +4 -4
- package/dist/components/ColorPicker/ColorPickerPopup.js +10 -10
- package/dist/components/ColorPicker/HueSlider.js +4 -3
- package/dist/components/ColorPicker/SaturationValueArea.js +5 -4
- package/dist/components/ColorPicker/checker.d.ts +1 -1
- package/dist/components/ColorPicker/checker.js +3 -3
- package/dist/components/CompactExplanation.js +3 -3
- package/dist/components/CompositionSelector.js +141 -5
- package/dist/components/CompositionSelectorItem.d.ts +1 -0
- package/dist/components/CompositionSelectorItem.js +103 -11
- package/dist/components/ContextMenu.js +2 -1
- package/dist/components/CopyButton.js +3 -2
- package/dist/components/CurrentAsset.d.ts +3 -1
- package/dist/components/CurrentAsset.js +15 -2
- package/dist/components/CurrentComposition.js +43 -2
- package/dist/components/EditorContexts.js +2 -1
- package/dist/components/EffectPickerModal.js +1 -1
- package/dist/components/FilePreview.js +2 -1
- package/dist/components/FpsCounter.js +3 -2
- package/dist/components/FullscreenToggle.js +2 -1
- package/dist/components/GlobalKeybindings.js +19 -12
- package/dist/components/InlineAction.js +2 -2
- package/dist/components/InlineEditableTitle.d.ts +1 -0
- package/dist/components/InlineEditableTitle.js +12 -7
- package/dist/components/InspectorInfoHeader.js +2 -2
- package/dist/components/InspectorPanel/DefaultInspector.d.ts +1 -0
- package/dist/components/InspectorPanel/DefaultInspector.js +2 -2
- package/dist/components/InspectorPanel/KeyframeEasingNavigator.js +1 -1
- package/dist/components/InspectorPanel/common.js +2 -2
- package/dist/components/InspectorPanel/styles.js +3 -3
- package/dist/components/InspectorPanel.d.ts +1 -0
- package/dist/components/InspectorPanel.js +2 -2
- package/dist/components/InspectorSequenceSection.js +1 -1
- package/dist/components/InspectorSourceLocation.d.ts +1 -0
- package/dist/components/InspectorSourceLocation.js +18 -3
- package/dist/components/InstallablePackage.js +1 -1
- package/dist/components/KeyboardShortcutsExplainer.js +9 -5
- package/dist/components/LoopToggle.js +1 -1
- package/dist/components/Menu/MenuDivider.js +1 -1
- package/dist/components/Menu/MenuItem.js +1 -1
- package/dist/components/Menu/MenuSubItem.js +1 -1
- package/dist/components/Menu/styles.js +3 -3
- package/dist/components/MenuToolbar.js +2 -2
- package/dist/components/ModalButton.js +1 -1
- package/dist/components/ModalContainer.js +3 -3
- package/dist/components/ModalFooter.js +2 -1
- package/dist/components/ModalHeader.js +3 -2
- package/dist/components/Modals.js +2 -1
- package/dist/components/NewComposition/CancelButton.js +4 -3
- package/dist/components/NewComposition/ComboBox.js +3 -3
- package/dist/components/NewComposition/InputDragger.js +11 -3
- package/dist/components/NewComposition/MenuContent.js +1 -1
- package/dist/components/NewComposition/NewComposition.js +4 -1
- package/dist/components/NewComposition/NewFolder.d.ts +5 -0
- package/dist/components/NewComposition/NewFolder.js +86 -0
- package/dist/components/NewComposition/RemInput.js +3 -3
- package/dist/components/NewComposition/RemTextarea.js +1 -1
- package/dist/components/NewComposition/RenameStaticFile.js +20 -59
- package/dist/components/NewComposition/ValidationMessage.js +1 -1
- package/dist/components/NewComposition/use-rename-static-file.d.ts +18 -0
- package/dist/components/NewComposition/use-rename-static-file.js +90 -0
- package/dist/components/NoRegisterRoot.js +3 -2
- package/dist/components/Notifications/ColorDot.js +3 -2
- package/dist/components/Notifications/Notification.js +4 -4
- package/dist/components/Notifications/NotificationCenter.js +2 -1
- package/dist/components/Notifications/ServerDisconnected.js +5 -4
- package/dist/components/OptionsPanel.js +1 -1
- package/dist/components/OutlineToggle.js +1 -1
- package/dist/components/PlayPause.js +4 -3
- package/dist/components/Preview.js +1 -1
- package/dist/components/PreviewToolbar.js +3 -2
- package/dist/components/QuickSwitcher/AlgoliaCredit.js +2 -1
- package/dist/components/QuickSwitcher/QuickSwitcherContent.js +1 -1
- package/dist/components/QuickSwitcher/QuickSwitcherResult.js +2 -2
- package/dist/components/RefreshCompositionOverlay.js +2 -1
- package/dist/components/RenderButton.js +10 -9
- package/dist/components/RenderModal/CliCopyButton.js +1 -1
- package/dist/components/RenderModal/ClientRenderProgress.js +1 -1
- package/dist/components/RenderModal/DataEditor.js +1 -1
- package/dist/components/RenderModal/GuiRenderStatus.js +1 -1
- package/dist/components/RenderModal/InfoBubble.js +2 -2
- package/dist/components/RenderModal/InfoTooltip.js +3 -3
- package/dist/components/RenderModal/InlineEyeIcon.js +2 -1
- package/dist/components/RenderModal/InlineRemoveButton.js +2 -1
- package/dist/components/RenderModal/MultiRangeSlider.js +1 -1
- package/dist/components/RenderModal/OptionExplainer.d.ts +11 -1
- package/dist/components/RenderModal/OptionExplainer.js +33 -13
- package/dist/components/RenderModal/OptionExplainerBubble.d.ts +15 -1
- package/dist/components/RenderModal/OptionExplainerBubble.js +17 -3
- package/dist/components/RenderModal/RenderModalHr.js +2 -1
- package/dist/components/RenderModal/RenderStatusModal.js +2 -1
- package/dist/components/RenderModal/SchemaEditor/Fieldset.d.ts +1 -0
- package/dist/components/RenderModal/SchemaEditor/Fieldset.js +6 -1
- package/dist/components/RenderModal/SchemaEditor/SchemaEditor.js +1 -2
- package/dist/components/RenderModal/SchemaEditor/SchemaLabel.js +1 -5
- package/dist/components/RenderModal/SchemaEditor/SchemaResetButton.js +2 -1
- package/dist/components/RenderModal/SchemaEditor/SchemaSeparationLine.js +1 -1
- package/dist/components/RenderModal/SchemaEditor/SchemaVerticalGuide.js +2 -1
- package/dist/components/RenderModal/SchemaEditor/ZodDateEditor.js +1 -1
- package/dist/components/RenderModal/SchemaEditor/ZodErrorMessages.js +1 -1
- package/dist/components/RenderModal/SchemaEditor/ZodNonEditableValue.js +1 -1
- package/dist/components/RenderModal/SchemaEditor/create-zod-values.js +2 -1
- package/dist/components/RenderModal/ServerRenderModal.js +1 -1
- package/dist/components/RenderModal/WarningIndicatorButton.js +4 -6
- package/dist/components/RenderModal/WebRenderModal.js +5 -2
- package/dist/components/RenderModal/WebRenderModalAdvanced.d.ts +3 -0
- package/dist/components/RenderModal/WebRenderModalAdvanced.js +92 -5
- package/dist/components/RenderModal/WebRenderModalAudio.js +4 -3
- package/dist/components/RenderModal/WebRenderModalBasic.js +2 -2
- package/dist/components/RenderModal/WebRenderModalLicense.js +2 -2
- package/dist/components/RenderModal/WebRenderModalPicture.js +2 -1
- package/dist/components/RenderModal/render-modals.js +3 -3
- package/dist/components/RenderPreview.js +1 -1
- package/dist/components/RenderQueue/ClientRenderQueueProcessor.js +1 -0
- 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/RenderQueueItemStatus.js +1 -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/client-side-render-types.d.ts +2 -1
- package/dist/components/RenderQueue/index.js +1 -1
- package/dist/components/RendersTab.js +2 -2
- package/dist/components/SegmentedControl.js +3 -3
- package/dist/components/SelectedOutlineElement.d.ts +9 -0
- package/dist/components/SelectedOutlineElement.js +63 -18
- package/dist/components/SelectedOutlineOverlay.d.ts +2 -0
- package/dist/components/SelectedOutlineOverlay.js +53 -2
- package/dist/components/SelectedOutlineUvControls.js +18 -11
- package/dist/components/SidebarCollapserControls.js +5 -4
- package/dist/components/SnappingProvider.d.ts +4 -0
- package/dist/components/SnappingProvider.js +24 -0
- package/dist/components/SnappingToggle.d.ts +2 -0
- package/dist/components/SnappingToggle.js +26 -0
- package/dist/components/Splitter/SplitterContext.d.ts +1 -1
- package/dist/components/Splitter/SplitterElement.js +2 -1
- package/dist/components/StaticFilePreview.js +1 -1
- package/dist/components/Tabs/index.js +3 -3
- package/dist/components/Tabs/vertical.js +3 -3
- package/dist/components/TextViewer.js +2 -1
- package/dist/components/TimeValue.js +1 -1
- package/dist/components/Timeline/EasingEditorModal.js +8 -8
- package/dist/components/Timeline/KeyframeSettingsModal.js +1 -1
- package/dist/components/Timeline/LoopedIndicator.js +2 -2
- package/dist/components/Timeline/MaxTimelineTracks.js +3 -2
- package/dist/components/Timeline/TimelineArrayField.js +6 -5
- package/dist/components/Timeline/TimelineColorField.js +2 -1
- package/dist/components/Timeline/TimelineEffectItem.js +3 -2
- package/dist/components/Timeline/TimelineEffectPropItem.js +2 -2
- package/dist/components/Timeline/TimelineExpandArrowButton.js +3 -2
- package/dist/components/Timeline/TimelineExpandedRow.js +2 -1
- package/dist/components/Timeline/TimelineExpandedSection.js +1 -1
- package/dist/components/Timeline/TimelineFieldLabel.js +2 -1
- package/dist/components/Timeline/TimelineFontFamilyField.d.ts +11 -0
- package/dist/components/Timeline/TimelineFontFamilyField.js +545 -0
- package/dist/components/Timeline/TimelineImageInfo.js +2 -1
- package/dist/components/Timeline/TimelineInOutPointer.js +2 -1
- package/dist/components/Timeline/TimelineInOutPointerHandle.js +2 -4
- package/dist/components/Timeline/TimelineKeyframeControls.js +2 -2
- package/dist/components/Timeline/TimelineKeyframeDiamondIcon.js +1 -1
- package/dist/components/Timeline/TimelineKeyframeEasingLine.js +1 -1
- package/dist/components/Timeline/TimelineLayerEye.js +3 -3
- package/dist/components/Timeline/TimelineMediaInfo.js +2 -2
- package/dist/components/Timeline/TimelinePrimitiveFieldValue.js +4 -0
- package/dist/components/Timeline/TimelineRotationField.js +4 -3
- package/dist/components/Timeline/TimelineScaleField.js +1 -1
- package/dist/components/Timeline/TimelineSchemaField.d.ts +2 -0
- package/dist/components/Timeline/TimelineSchemaField.js +47 -7
- package/dist/components/Timeline/TimelineScrollable.js +3 -2
- package/dist/components/Timeline/TimelineSelection.js +11 -6
- package/dist/components/Timeline/TimelineSequence.js +17 -20
- package/dist/components/Timeline/TimelineSequenceFrame.js +3 -2
- package/dist/components/Timeline/TimelineSequenceItem.js +8 -7
- package/dist/components/Timeline/TimelineSequenceName.js +3 -2
- package/dist/components/Timeline/TimelineSequencePropItem.js +2 -1
- package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.d.ts +20 -1
- package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.js +128 -11
- package/dist/components/Timeline/TimelineSlider.js +2 -1
- package/dist/components/Timeline/TimelineSliderHandle.js +2 -1
- package/dist/components/Timeline/TimelineTimeIndicators.js +1 -1
- package/dist/components/Timeline/TimelineVideoInfo.js +2 -1
- package/dist/components/Timeline/TimelineZoomControls.js +4 -3
- package/dist/components/Timeline/call-move-keyframe.d.ts +5 -0
- package/dist/components/Timeline/call-move-keyframe.js +14 -3
- package/dist/components/Timeline/google-fonts-list.d.ts +6 -0
- package/dist/components/Timeline/google-fonts-list.js +1512 -0
- package/dist/components/Timeline/save-sequence-prop.d.ts +8 -1
- package/dist/components/Timeline/save-sequence-prop.js +63 -19
- package/dist/components/Timeline/timeline-rotation-field-utils.d.ts +5 -0
- package/dist/components/Timeline/timeline-rotation-field-utils.js +16 -0
- package/dist/components/Timeline/timeline-scroll-logic.js +5 -2
- package/dist/components/TimelineInOutToggle.js +1 -1
- package/dist/components/UpdateCheck.js +2 -2
- package/dist/components/UpdateModal/OpenIssueButton.js +1 -1
- package/dist/components/VisualControls/ClickableFileName.js +4 -4
- package/dist/components/VisualControls/VisualControlsContent.js +9 -1
- package/dist/components/effect-drag-and-drop.js +30 -8
- package/dist/components/import-assets.d.ts +8 -2
- package/dist/components/import-assets.js +55 -1
- package/dist/components/options-sidebar-tabs.d.ts +1 -0
- package/dist/components/options-sidebar-tabs.js +6 -1
- package/dist/components/selected-outline-measurement.js +2 -1
- package/dist/components/selected-outline-snap.d.ts +36 -0
- package/dist/components/selected-outline-snap.js +158 -0
- package/dist/error-overlay/remotion-overlay/CalculateMetadataErrorExplainer.js +2 -2
- package/dist/error-overlay/remotion-overlay/CodeFrame.js +7 -5
- package/dist/error-overlay/remotion-overlay/CompositionIdListItem.js +2 -2
- package/dist/error-overlay/remotion-overlay/DismissButton.js +3 -2
- package/dist/error-overlay/remotion-overlay/ErrorLoader.js +3 -2
- package/dist/error-overlay/remotion-overlay/ErrorMessage.js +4 -4
- package/dist/error-overlay/remotion-overlay/HelpLink.js +1 -1
- package/dist/error-overlay/remotion-overlay/MediaPlaybackErrorExplainer.js +4 -4
- package/dist/error-overlay/remotion-overlay/Overlay.js +3 -2
- package/dist/error-overlay/remotion-overlay/StackFrame.js +4 -3
- package/dist/error-overlay/remotion-overlay/Symbolicating.js +2 -1
- package/dist/error-overlay/remotion-overlay/carets.js +3 -2
- package/dist/esm/chunk-jefhcs5z.js +164 -0
- package/dist/esm/{chunk-103pp4n7.js → chunk-y2t24cx0.js} +10754 -6829
- package/dist/esm/internals.mjs +10755 -6796
- package/dist/esm/previewEntry.mjs +10554 -6591
- package/dist/esm/renderEntry.mjs +8 -5
- package/dist/helpers/checkerboard-background.js +4 -12
- package/dist/helpers/colors.d.ts +99 -7
- package/dist/helpers/colors.js +118 -10
- package/dist/helpers/inject-css.js +85 -83
- package/dist/helpers/retry-payload.js +1 -0
- package/dist/helpers/timeline-layout.d.ts +4 -2
- package/dist/helpers/use-menu-structure.js +74 -5
- package/dist/helpers/validate-folder-rename.js +2 -10
- package/dist/helpers/validate-new-folder-name.d.ts +5 -0
- package/dist/helpers/validate-new-folder-name.js +16 -0
- package/dist/hot-middleware-client/client.js +3 -2
- package/dist/icons/Checkmark.js +2 -1
- package/dist/icons/audio.js +2 -1
- package/dist/icons/caret.js +2 -2
- package/dist/icons/certificate.js +2 -1
- package/dist/icons/data.js +2 -1
- package/dist/icons/eyedropper.js +2 -1
- package/dist/icons/file.js +2 -1
- package/dist/icons/frame.js +2 -1
- package/dist/icons/gear.js +2 -1
- package/dist/icons/gif.js +2 -1
- package/dist/icons/jump-to-start.js +2 -1
- package/dist/icons/keys.js +4 -3
- package/dist/icons/magnet.d.ts +3 -0
- package/dist/icons/magnet.js +8 -0
- package/dist/icons/media-volume.js +1 -1
- package/dist/icons/minus.js +2 -1
- package/dist/icons/pause.js +2 -1
- package/dist/icons/play.js +2 -1
- package/dist/icons/react.d.ts +5 -0
- package/dist/icons/react.js +8 -0
- package/dist/icons/redo.js +2 -1
- package/dist/icons/step-back.js +2 -1
- package/dist/icons/step-forward.js +2 -1
- package/dist/icons/undo.js +2 -1
- package/dist/previewEntry.js +2 -1
- package/dist/renderEntry.js +4 -3
- package/dist/state/editor-guides.d.ts +2 -2
- package/dist/state/editor-snapping.d.ts +8 -0
- package/dist/state/editor-snapping.js +18 -0
- package/dist/state/modals.d.ts +6 -1
- package/package.json +12 -12
- package/dist/esm/chunk-6jf1natv.js +0 -25
|
@@ -9,6 +9,7 @@ const show_browser_rendering_1 = require("../helpers/show-browser-rendering");
|
|
|
9
9
|
const timeline_node_path_key_1 = require("../helpers/timeline-node-path-key");
|
|
10
10
|
const use_keybinding_1 = require("../helpers/use-keybinding");
|
|
11
11
|
const checkerboard_1 = require("../state/checkerboard");
|
|
12
|
+
const editor_snapping_1 = require("../state/editor-snapping");
|
|
12
13
|
const modals_1 = require("../state/modals");
|
|
13
14
|
const AskAiModal_1 = require("./AskAiModal");
|
|
14
15
|
const CompositionSelector_1 = require("./CompositionSelector");
|
|
@@ -25,6 +26,7 @@ const GlobalKeybindings = ({ readOnlyStudio }) => {
|
|
|
25
26
|
const keybindings = (0, use_keybinding_1.useKeybinding)();
|
|
26
27
|
const { setSelectedModal } = (0, react_1.useContext)(modals_1.ModalsContext);
|
|
27
28
|
const { setCheckerboard } = (0, react_1.useContext)(checkerboard_1.CheckerboardContext);
|
|
29
|
+
const { setEditorSnapping } = (0, react_1.useContext)(editor_snapping_1.EditorSnappingContext);
|
|
28
30
|
const currentSelection = (0, TimelineSelection_1.useCurrentTimelineSelectionStateAsRef)();
|
|
29
31
|
const { sequences } = (0, react_1.useContext)(remotion_1.Internals.SequenceManager);
|
|
30
32
|
const videoConfig = remotion_1.Internals.useUnsafeVideoConfig();
|
|
@@ -106,17 +108,6 @@ const GlobalKeybindings = ({ readOnlyStudio }) => {
|
|
|
106
108
|
event.preventDefault();
|
|
107
109
|
}
|
|
108
110
|
};
|
|
109
|
-
const nKey = keybindings.registerKeybinding({
|
|
110
|
-
event: 'keypress',
|
|
111
|
-
key: 'n',
|
|
112
|
-
callback: () => {
|
|
113
|
-
(0, NotificationCenter_1.showNotification)(`To make a new composition, right-click an existing one and select "Duplicate"`, 5000);
|
|
114
|
-
},
|
|
115
|
-
commandCtrlKey: false,
|
|
116
|
-
preventDefault: true,
|
|
117
|
-
triggerIfInputFieldFocused: false,
|
|
118
|
-
keepRegisteredWhenNotHighestContext: false,
|
|
119
|
-
});
|
|
120
111
|
const cmdKKey = keybindings.registerKeybinding({
|
|
121
112
|
event: 'keydown',
|
|
122
113
|
key: 'k',
|
|
@@ -199,8 +190,22 @@ const GlobalKeybindings = ({ readOnlyStudio }) => {
|
|
|
199
190
|
triggerIfInputFieldFocused: false,
|
|
200
191
|
keepRegisteredWhenNotHighestContext: false,
|
|
201
192
|
});
|
|
193
|
+
const shiftMKey = keybindings.registerKeybinding({
|
|
194
|
+
event: 'keydown',
|
|
195
|
+
key: 'm',
|
|
196
|
+
callback: (event) => {
|
|
197
|
+
if (!event.shiftKey) {
|
|
198
|
+
return;
|
|
199
|
+
}
|
|
200
|
+
setEditorSnapping((current) => !current);
|
|
201
|
+
event.preventDefault();
|
|
202
|
+
},
|
|
203
|
+
commandCtrlKey: false,
|
|
204
|
+
preventDefault: false,
|
|
205
|
+
triggerIfInputFieldFocused: false,
|
|
206
|
+
keepRegisteredWhenNotHighestContext: false,
|
|
207
|
+
});
|
|
202
208
|
return () => {
|
|
203
|
-
nKey.unregister();
|
|
204
209
|
for (const sequencePropKey of sequencePropKeys) {
|
|
205
210
|
sequencePropKey.unregister();
|
|
206
211
|
}
|
|
@@ -210,12 +215,14 @@ const GlobalKeybindings = ({ readOnlyStudio }) => {
|
|
|
210
215
|
cmdIKey === null || cmdIKey === void 0 ? void 0 : cmdIKey.unregister();
|
|
211
216
|
pageDown.unregister();
|
|
212
217
|
pageUp.unregister();
|
|
218
|
+
shiftMKey.unregister();
|
|
213
219
|
};
|
|
214
220
|
}, [
|
|
215
221
|
keybindings,
|
|
216
222
|
openRenderModal,
|
|
217
223
|
selectSequenceProp,
|
|
218
224
|
setCheckerboard,
|
|
225
|
+
setEditorSnapping,
|
|
219
226
|
setSelectedModal,
|
|
220
227
|
navigateToNextComposition,
|
|
221
228
|
navigateToPreviousComposition,
|
|
@@ -18,7 +18,7 @@ const InlineAction = ({ renderAction, onClick, disabled, title, }) => {
|
|
|
18
18
|
return {
|
|
19
19
|
border: 'none',
|
|
20
20
|
background: disabled
|
|
21
|
-
?
|
|
21
|
+
? colors_1.TRANSPARENT
|
|
22
22
|
: (0, colors_1.getBackgroundFromHoverState)({ hovered, selected: false }),
|
|
23
23
|
height: 24,
|
|
24
24
|
width: 24,
|
|
@@ -30,6 +30,6 @@ const InlineAction = ({ renderAction, onClick, disabled, title, }) => {
|
|
|
30
30
|
pointerEvents: disabled ? 'none' : 'auto',
|
|
31
31
|
};
|
|
32
32
|
}, [disabled, hovered]);
|
|
33
|
-
return (jsx_runtime_1.jsx("button", { type: "button", onPointerEnter: onPointerEnter, onPointerLeave: onPointerLeave, onClick: onClick, style: style, tabIndex: tabIndex, title: title, children: renderAction(hovered ?
|
|
33
|
+
return (jsx_runtime_1.jsx("button", { type: "button", onPointerEnter: onPointerEnter, onPointerLeave: onPointerLeave, onClick: onClick, style: style, tabIndex: tabIndex, title: title, children: renderAction(hovered ? colors_1.WHITE : colors_1.LIGHT_TEXT) }));
|
|
34
34
|
};
|
|
35
35
|
exports.InlineAction = InlineAction;
|
|
@@ -2,6 +2,7 @@ import type * as React from 'react';
|
|
|
2
2
|
export declare const InlineEditableTitle: React.FC<{
|
|
3
3
|
readonly value: string;
|
|
4
4
|
readonly canRename: boolean;
|
|
5
|
+
readonly getInitialSelection?: (value: string) => [number, number];
|
|
5
6
|
readonly onCommit: (newValue: string) => void;
|
|
6
7
|
readonly title?: string;
|
|
7
8
|
}>;
|
|
@@ -6,7 +6,7 @@ const react_1 = require("react");
|
|
|
6
6
|
const colors_1 = require("../helpers/colors");
|
|
7
7
|
const titleWrapper = {
|
|
8
8
|
boxSizing: 'border-box',
|
|
9
|
-
color:
|
|
9
|
+
color: colors_1.WHITE,
|
|
10
10
|
fontSize: 12,
|
|
11
11
|
height: 18,
|
|
12
12
|
lineHeight: '18px',
|
|
@@ -37,10 +37,10 @@ const titleGridItem = {
|
|
|
37
37
|
};
|
|
38
38
|
const titleInput = {
|
|
39
39
|
appearance: 'none',
|
|
40
|
-
backgroundColor:
|
|
40
|
+
backgroundColor: colors_1.TRANSPARENT,
|
|
41
41
|
border: 'none',
|
|
42
42
|
boxShadow: 'none',
|
|
43
|
-
color:
|
|
43
|
+
color: colors_1.WHITE,
|
|
44
44
|
fontFamily: 'inherit',
|
|
45
45
|
fontSize: 12,
|
|
46
46
|
height: 18,
|
|
@@ -53,7 +53,7 @@ const titleInput = {
|
|
|
53
53
|
WebkitAppearance: 'none',
|
|
54
54
|
width: '100%',
|
|
55
55
|
};
|
|
56
|
-
const InlineEditableTitle = ({ value, canRename, onCommit, title }) => {
|
|
56
|
+
const InlineEditableTitle = ({ value, canRename, getInitialSelection, onCommit, title }) => {
|
|
57
57
|
const [isEditing, setIsEditing] = (0, react_1.useState)(false);
|
|
58
58
|
const [isHovered, setIsHovered] = (0, react_1.useState)(false);
|
|
59
59
|
const [draftValue, setDraftValue] = (0, react_1.useState)(value);
|
|
@@ -70,8 +70,13 @@ const InlineEditableTitle = ({ value, canRename, onCommit, title }) => {
|
|
|
70
70
|
return;
|
|
71
71
|
}
|
|
72
72
|
input.focus();
|
|
73
|
+
if (getInitialSelection) {
|
|
74
|
+
const [start, end] = getInitialSelection(value);
|
|
75
|
+
input.setSelectionRange(start, end);
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
73
78
|
input.select();
|
|
74
|
-
}, []);
|
|
79
|
+
}, [getInitialSelection, value]);
|
|
75
80
|
const commit = (0, react_1.useCallback)((newValue) => {
|
|
76
81
|
if (cancelledRef.current) {
|
|
77
82
|
return;
|
|
@@ -109,8 +114,8 @@ const InlineEditableTitle = ({ value, canRename, onCommit, title }) => {
|
|
|
109
114
|
const backgroundColor = isEditing
|
|
110
115
|
? colors_1.INPUT_BACKGROUND
|
|
111
116
|
: isHovered && canRename
|
|
112
|
-
? colors_1.
|
|
113
|
-
:
|
|
117
|
+
? colors_1.WHITE_ALPHA_06
|
|
118
|
+
: colors_1.TRANSPARENT;
|
|
114
119
|
const innerStyle = (0, react_1.useMemo)(() => {
|
|
115
120
|
return {
|
|
116
121
|
...titleInner,
|
|
@@ -7,7 +7,7 @@ const InspectorPanelLayout_1 = require("./InspectorPanelLayout");
|
|
|
7
7
|
exports.INSPECTOR_INFO_HEADER_MIN_HEIGHT = 84;
|
|
8
8
|
const container = {
|
|
9
9
|
backgroundColor: colors_1.BACKGROUND,
|
|
10
|
-
color:
|
|
10
|
+
color: colors_1.WHITE,
|
|
11
11
|
display: 'block',
|
|
12
12
|
minHeight: exports.INSPECTOR_INFO_HEADER_MIN_HEIGHT,
|
|
13
13
|
padding: `6px ${InspectorPanelLayout_1.INSPECTOR_PANEL_HORIZONTAL_PADDING}px`,
|
|
@@ -25,7 +25,7 @@ const content = {
|
|
|
25
25
|
};
|
|
26
26
|
const title = {
|
|
27
27
|
backgroundColor: colors_1.BACKGROUND,
|
|
28
|
-
color:
|
|
28
|
+
color: colors_1.WHITE,
|
|
29
29
|
fontSize: 12,
|
|
30
30
|
lineHeight: '18px',
|
|
31
31
|
overflow: 'hidden',
|
|
@@ -4,5 +4,6 @@ import type { UpdaterFunction } from '../RenderModal/SchemaEditor/ZodSwitch';
|
|
|
4
4
|
export declare const DefaultInspector: React.FC<{
|
|
5
5
|
readonly composition: _InternalTypes['AnyComposition'] | null;
|
|
6
6
|
readonly currentDefaultProps: Record<string, unknown>;
|
|
7
|
+
readonly readOnlyStudio: boolean;
|
|
7
8
|
readonly setDefaultProps: UpdaterFunction<Record<string, unknown>>;
|
|
8
9
|
}>;
|
|
@@ -18,7 +18,7 @@ const SegmentedControl_1 = require("../SegmentedControl");
|
|
|
18
18
|
const VisualControlsContent_1 = require("../VisualControls/VisualControlsContent");
|
|
19
19
|
const common_1 = require("./common");
|
|
20
20
|
const styles_1 = require("./styles");
|
|
21
|
-
const DefaultInspector = ({ composition, currentDefaultProps, setDefaultProps }) => {
|
|
21
|
+
const DefaultInspector = ({ composition, currentDefaultProps, readOnlyStudio, setDefaultProps }) => {
|
|
22
22
|
var _a, _b;
|
|
23
23
|
const { canvasContent } = (0, react_1.useContext)(remotion_1.Internals.CompositionManager);
|
|
24
24
|
const hasSelectedAsset = (canvasContent === null || canvasContent === void 0 ? void 0 : canvasContent.type) === 'asset';
|
|
@@ -70,7 +70,7 @@ const DefaultInspector = ({ composition, currentDefaultProps, setDefaultProps })
|
|
|
70
70
|
showCannotSaveDefaultPropsWarning: canShowDefaultPropsSection,
|
|
71
71
|
});
|
|
72
72
|
if (hasSelectedAsset) {
|
|
73
|
-
return (jsx_runtime_1.jsx("div", { style: styles_1.scrollableContainer, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, children: jsx_runtime_1.jsx("div", { style: styles_1.compositionSection, children: jsx_runtime_1.jsx(CurrentAsset_1.CurrentAsset, {}) }) }));
|
|
73
|
+
return (jsx_runtime_1.jsx("div", { style: styles_1.scrollableContainer, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, children: jsx_runtime_1.jsx("div", { style: styles_1.compositionSection, children: jsx_runtime_1.jsx(CurrentAsset_1.CurrentAsset, { readOnlyStudio: readOnlyStudio }) }) }));
|
|
74
74
|
}
|
|
75
75
|
if (composition === null) {
|
|
76
76
|
return jsx_runtime_1.jsx("div", { style: styles_1.container });
|
|
@@ -64,7 +64,7 @@ const chevronIcon = {
|
|
|
64
64
|
height: 12,
|
|
65
65
|
width: 8,
|
|
66
66
|
};
|
|
67
|
-
const disabledChevronColor =
|
|
67
|
+
const disabledChevronColor = colors_1.WHITE_ALPHA_25;
|
|
68
68
|
const NavigationChevron = ({ color, direction }) => {
|
|
69
69
|
const path = direction === 'left' ? 'M6 1L2 6L6 11' : 'M2 1L6 6L2 11';
|
|
70
70
|
return (jsx_runtime_1.jsx("svg", { viewBox: "0 0 8 12", style: chevronIcon, children: jsx_runtime_1.jsx("path", { d: path, fill: "none", stroke: color, strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.5" }) }));
|
|
@@ -37,7 +37,7 @@ exports.InspectorDetailRow = InspectorDetailRow;
|
|
|
37
37
|
const inlineLabelButton = {
|
|
38
38
|
alignItems: 'center',
|
|
39
39
|
appearance: 'none',
|
|
40
|
-
backgroundColor:
|
|
40
|
+
backgroundColor: colors_1.TRANSPARENT,
|
|
41
41
|
border: 'none',
|
|
42
42
|
color: colors_1.LIGHT_TEXT,
|
|
43
43
|
cursor: 'default',
|
|
@@ -69,7 +69,7 @@ const inlineLabelIcon = {
|
|
|
69
69
|
};
|
|
70
70
|
const InspectorInlineAction = ({ children, disabled, onClick, renderIcon }) => {
|
|
71
71
|
const [hovered, setHovered] = react_1.default.useState(false);
|
|
72
|
-
const color = hovered && !disabled ?
|
|
72
|
+
const color = hovered && !disabled ? colors_1.WHITE : colors_1.LIGHT_TEXT;
|
|
73
73
|
const buttonStyle = react_1.default.useMemo(() => ({
|
|
74
74
|
...(disabled ? inlineLabelButtonDisabled : inlineLabelButton),
|
|
75
75
|
color,
|
|
@@ -5,7 +5,7 @@ const colors_1 = require("../../helpers/colors");
|
|
|
5
5
|
const InspectorPanelLayout_1 = require("../InspectorPanelLayout");
|
|
6
6
|
exports.container = {
|
|
7
7
|
backgroundColor: colors_1.BACKGROUND,
|
|
8
|
-
color:
|
|
8
|
+
color: colors_1.WHITE,
|
|
9
9
|
display: 'flex',
|
|
10
10
|
flex: 1,
|
|
11
11
|
flexDirection: 'column',
|
|
@@ -55,7 +55,7 @@ exports.sequenceHeaderTitle = {
|
|
|
55
55
|
alignSelf: 'stretch',
|
|
56
56
|
backgroundColor: colors_1.BACKGROUND,
|
|
57
57
|
border: 'none',
|
|
58
|
-
color:
|
|
58
|
+
color: colors_1.WHITE,
|
|
59
59
|
display: 'flex',
|
|
60
60
|
fontFamily: 'sans-serif',
|
|
61
61
|
fontSize: 12,
|
|
@@ -170,7 +170,7 @@ exports.detailLabel = {
|
|
|
170
170
|
fontSize: 13,
|
|
171
171
|
};
|
|
172
172
|
exports.detailValue = {
|
|
173
|
-
color:
|
|
173
|
+
color: colors_1.WHITE,
|
|
174
174
|
fontSize: 13,
|
|
175
175
|
fontVariantNumeric: 'tabular-nums',
|
|
176
176
|
minWidth: 0,
|
|
@@ -4,5 +4,6 @@ import type { UpdaterFunction } from './RenderModal/SchemaEditor/ZodSwitch';
|
|
|
4
4
|
export declare const InspectorPanel: React.FC<{
|
|
5
5
|
readonly composition: _InternalTypes['AnyComposition'] | null;
|
|
6
6
|
readonly currentDefaultProps: Record<string, unknown>;
|
|
7
|
+
readonly readOnlyStudio: boolean;
|
|
7
8
|
readonly setDefaultProps: UpdaterFunction<Record<string, unknown>>;
|
|
8
9
|
}>;
|
|
@@ -9,11 +9,11 @@ const inspector_selection_1 = require("./InspectorPanel/inspector-selection");
|
|
|
9
9
|
const SelectedInspector_1 = require("./InspectorPanel/SelectedInspector");
|
|
10
10
|
const styles_1 = require("./InspectorPanel/styles");
|
|
11
11
|
const TimelineSelection_1 = require("./Timeline/TimelineSelection");
|
|
12
|
-
const InspectorPanel = ({ composition, currentDefaultProps, setDefaultProps }) => {
|
|
12
|
+
const InspectorPanel = ({ composition, currentDefaultProps, readOnlyStudio, setDefaultProps }) => {
|
|
13
13
|
const { selectedItems } = (0, TimelineSelection_1.useTimelineSelection)();
|
|
14
14
|
const sameSequenceInspectorSelection = (0, react_1.useMemo)(() => (0, inspector_selection_1.getSameSequenceInspectorSelection)(selectedItems), [selectedItems]);
|
|
15
15
|
if (selectedItems.length === 0) {
|
|
16
|
-
return (jsx_runtime_1.jsx(DefaultInspector_1.DefaultInspector, { composition: composition, currentDefaultProps: currentDefaultProps, setDefaultProps: setDefaultProps }));
|
|
16
|
+
return (jsx_runtime_1.jsx(DefaultInspector_1.DefaultInspector, { composition: composition, currentDefaultProps: currentDefaultProps, readOnlyStudio: readOnlyStudio, setDefaultProps: setDefaultProps }));
|
|
17
17
|
}
|
|
18
18
|
if (selectedItems.length > 1) {
|
|
19
19
|
if (sameSequenceInspectorSelection) {
|
|
@@ -47,7 +47,7 @@ const TimelineExpandedRow_1 = require("./Timeline/TimelineExpandedRow");
|
|
|
47
47
|
const TimelineSelection_1 = require("./Timeline/TimelineSelection");
|
|
48
48
|
const use_timeline_expanded_tree_1 = require("./Timeline/use-timeline-expanded-tree");
|
|
49
49
|
const container = {
|
|
50
|
-
color:
|
|
50
|
+
color: colors_1.WHITE,
|
|
51
51
|
display: 'flex',
|
|
52
52
|
flexDirection: 'column',
|
|
53
53
|
fontFamily: 'Arial, Helvetica, sans-serif',
|
|
@@ -12,7 +12,9 @@ const sourceLocationStyle = {
|
|
|
12
12
|
backgroundColor: colors_1.BACKGROUND,
|
|
13
13
|
border: 'none',
|
|
14
14
|
boxSizing: 'border-box',
|
|
15
|
-
display: '
|
|
15
|
+
display: 'flex',
|
|
16
|
+
alignItems: 'center',
|
|
17
|
+
gap: 4,
|
|
16
18
|
fontFamily: 'sans-serif',
|
|
17
19
|
fontSize: 12,
|
|
18
20
|
height: 18,
|
|
@@ -27,7 +29,18 @@ const sourceLocationStyle = {
|
|
|
27
29
|
whiteSpace: 'nowrap',
|
|
28
30
|
width: 'fit-content',
|
|
29
31
|
};
|
|
30
|
-
const
|
|
32
|
+
const sourceLocationLabelStyle = {
|
|
33
|
+
color: 'inherit',
|
|
34
|
+
display: 'block',
|
|
35
|
+
fontFamily: 'sans-serif',
|
|
36
|
+
fontSize: 12,
|
|
37
|
+
lineHeight: '18px',
|
|
38
|
+
minWidth: 0,
|
|
39
|
+
overflow: 'hidden',
|
|
40
|
+
textOverflow: 'ellipsis',
|
|
41
|
+
whiteSpace: 'nowrap',
|
|
42
|
+
};
|
|
43
|
+
const InspectorSourceLocation = ({ location, canOpen, onOpen, renderIcon }) => {
|
|
31
44
|
const [hovered, setHovered] = (0, react_1.useState)(false);
|
|
32
45
|
const validLocation = (0, react_1.useMemo)(() => {
|
|
33
46
|
if (!(location === null || location === void 0 ? void 0 : location.source) || location.line === null) {
|
|
@@ -57,6 +70,7 @@ const InspectorSourceLocation = ({ location, canOpen, onOpen }) => {
|
|
|
57
70
|
cursor: canOpen ? 'pointer' : 'default',
|
|
58
71
|
};
|
|
59
72
|
}, [canOpen, hovered]);
|
|
73
|
+
const color = hovered ? colors_1.LIGHT_COLOR : colors_1.LIGHT_TEXT;
|
|
60
74
|
const onClick = (0, react_1.useCallback)(() => {
|
|
61
75
|
if (!canOpen) {
|
|
62
76
|
return;
|
|
@@ -66,6 +80,7 @@ const InspectorSourceLocation = ({ location, canOpen, onOpen }) => {
|
|
|
66
80
|
if (!label) {
|
|
67
81
|
return null;
|
|
68
82
|
}
|
|
69
|
-
return (jsx_runtime_1.
|
|
83
|
+
return (jsx_runtime_1.jsxs("button", { type: "button", style: style, title: fileLocation !== null && fileLocation !== void 0 ? fileLocation : undefined, onClick: onClick, onPointerEnter: () => setHovered(true), onPointerLeave: () => setHovered(false), children: [renderIcon ? renderIcon(color) : null, jsx_runtime_1.jsx("span", { style: sourceLocationLabelStyle, children: label })
|
|
84
|
+
] }));
|
|
70
85
|
};
|
|
71
86
|
exports.InspectorSourceLocation = InspectorSourceLocation;
|
|
@@ -13,7 +13,7 @@ const InstallablePackageComp = ({ isInstalled, pkg, link, description }) => {
|
|
|
13
13
|
}, children: [
|
|
14
14
|
jsx_runtime_1.jsx("a", { href: link, style: {
|
|
15
15
|
fontSize: FONT_SIZE,
|
|
16
|
-
color: colors_1.
|
|
16
|
+
color: colors_1.WHITE_HEX,
|
|
17
17
|
textDecoration: 'none',
|
|
18
18
|
}, target: "_blank", children: pkg }), ' ', isInstalled ? (jsx_runtime_1.jsx("span", { style: { opacity: 0.3, fontSize: 'inherit' }, children: "(installed)" })) : null, jsx_runtime_1.jsx("br", {}), jsx_runtime_1.jsx("span", { style: { color: colors_1.LIGHT_TEXT, fontSize: FONT_SIZE }, children: description })
|
|
19
19
|
] }));
|
|
@@ -15,16 +15,16 @@ const left = {
|
|
|
15
15
|
const key = {
|
|
16
16
|
background: colors_1.INPUT_BACKGROUND,
|
|
17
17
|
padding: '3px 6px',
|
|
18
|
-
color:
|
|
18
|
+
color: colors_1.WHITE,
|
|
19
19
|
borderRadius: 3,
|
|
20
|
-
border: '1px solid ' + colors_1.
|
|
20
|
+
border: '1px solid ' + colors_1.BLACK_ALPHA_60,
|
|
21
21
|
borderBottomWidth: 3,
|
|
22
22
|
fontSize: 14,
|
|
23
23
|
fontFamily: 'monospace',
|
|
24
24
|
};
|
|
25
25
|
const right = {
|
|
26
26
|
fontSize: 14,
|
|
27
|
-
color:
|
|
27
|
+
color: colors_1.KEYBOARD_SHORTCUT_KEY_COLOR,
|
|
28
28
|
};
|
|
29
29
|
const container = {
|
|
30
30
|
paddingLeft: 20,
|
|
@@ -34,7 +34,7 @@ const container = {
|
|
|
34
34
|
};
|
|
35
35
|
const title = {
|
|
36
36
|
fontWeight: 'bold',
|
|
37
|
-
color:
|
|
37
|
+
color: colors_1.WHITE,
|
|
38
38
|
fontSize: 14,
|
|
39
39
|
marginBottom: 10,
|
|
40
40
|
};
|
|
@@ -42,7 +42,7 @@ const keyboardShortcutsDisabled = {
|
|
|
42
42
|
padding: 12,
|
|
43
43
|
width: '100%',
|
|
44
44
|
fontSize: 14,
|
|
45
|
-
backgroundColor:
|
|
45
|
+
backgroundColor: colors_1.WHITE_ALPHA_10,
|
|
46
46
|
};
|
|
47
47
|
const ul = {
|
|
48
48
|
marginTop: 0,
|
|
@@ -102,6 +102,10 @@ const KeyboardShortcutsExplainer = () => {
|
|
|
102
102
|
jsx_runtime_1.jsx("div", { style: left, children: jsx_runtime_1.jsx("kbd", { style: key, children: "F" }) }), jsx_runtime_1.jsx("div", { style: right, children: "Enter fullscreen" })
|
|
103
103
|
] }), jsx_runtime_1.jsxs(layout_1.Row, { align: "center", children: [
|
|
104
104
|
jsx_runtime_1.jsx("div", { style: left, children: jsx_runtime_1.jsx("kbd", { style: key, children: "Esc" }) }), jsx_runtime_1.jsx("div", { style: right, children: "Exit fullscreen" })
|
|
105
|
+
] }), jsx_runtime_1.jsxs(layout_1.Row, { align: "center", children: [
|
|
106
|
+
jsx_runtime_1.jsxs("div", { style: left, children: [
|
|
107
|
+
jsx_runtime_1.jsx("kbd", { style: key, children: jsx_runtime_1.jsx(keys_1.ShiftIcon, {}) }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 0.3 }), jsx_runtime_1.jsx("kbd", { style: key, children: "M" })
|
|
108
|
+
] }), jsx_runtime_1.jsx("div", { style: right, children: "Enable snapping" })
|
|
105
109
|
] })
|
|
106
110
|
] }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 8 }), jsx_runtime_1.jsxs(layout_1.Column, { children: [
|
|
107
111
|
jsx_runtime_1.jsx("div", { style: title, children: "Navigation" }), jsx_runtime_1.jsxs(layout_1.Row, { align: "center", children: [
|
|
@@ -14,6 +14,6 @@ const LoopToggle = ({ loop, setLoop }) => {
|
|
|
14
14
|
return !c;
|
|
15
15
|
});
|
|
16
16
|
}, [setLoop]);
|
|
17
|
-
return (jsx_runtime_1.jsx(ControlButton_1.ControlButton, { title: accessibilityLabel, "aria-label": accessibilityLabel, onClick: onClick, children: jsx_runtime_1.jsx("svg", { viewBox: "0 0 512 512", style: { width: 18, height: 18 }, children: jsx_runtime_1.jsx("path", { fill: loop ? colors_1.BLUE :
|
|
17
|
+
return (jsx_runtime_1.jsx(ControlButton_1.ControlButton, { title: accessibilityLabel, "aria-label": accessibilityLabel, onClick: onClick, children: jsx_runtime_1.jsx("svg", { viewBox: "0 0 512 512", style: { width: 18, height: 18 }, children: jsx_runtime_1.jsx("path", { fill: loop ? colors_1.BLUE : colors_1.WHITE, d: "M493.544 181.463c11.956 22.605 18.655 48.4 18.452 75.75C511.339 345.365 438.56 416 350.404 416H192v47.495c0 22.475-26.177 32.268-40.971 17.475l-80-80c-9.372-9.373-9.372-24.569 0-33.941l80-80C166.138 271.92 192 282.686 192 304v48h158.875c52.812 0 96.575-42.182 97.12-94.992.155-15.045-3.17-29.312-9.218-42.046-4.362-9.185-2.421-20.124 4.8-27.284 4.745-4.706 8.641-8.555 11.876-11.786 11.368-11.352 30.579-8.631 38.091 5.571zM64.005 254.992c.545-52.81 44.308-94.992 97.12-94.992H320v47.505c0 22.374 26.121 32.312 40.971 17.465l80-80c9.372-9.373 9.372-24.569 0-33.941l-80-80C346.014 16.077 320 26.256 320 48.545V96H161.596C73.44 96 .661 166.635.005 254.788c-.204 27.35 6.495 53.145 18.452 75.75 7.512 14.202 26.723 16.923 38.091 5.57 3.235-3.231 7.13-7.08 11.876-11.786 7.22-7.16 9.162-18.098 4.8-27.284-6.049-12.735-9.374-27.001-9.219-42.046z" }) }) }));
|
|
18
18
|
};
|
|
19
19
|
exports.LoopToggle = LoopToggle;
|
|
@@ -7,7 +7,7 @@ const menuDivider = {
|
|
|
7
7
|
marginTop: 4,
|
|
8
8
|
marginBottom: 4,
|
|
9
9
|
height: 1,
|
|
10
|
-
backgroundColor: colors_1.
|
|
10
|
+
backgroundColor: colors_1.WHITE_ALPHA_05,
|
|
11
11
|
};
|
|
12
12
|
const MenuDivider = () => {
|
|
13
13
|
return jsx_runtime_1.jsx("div", { style: menuDivider });
|
|
@@ -56,7 +56,7 @@ const MenuSubItem = ({ label, leaveLeftSpace, leftItem, onActionChosen, id, sele
|
|
|
56
56
|
const style = (0, react_1.useMemo)(() => {
|
|
57
57
|
return {
|
|
58
58
|
...container,
|
|
59
|
-
backgroundColor: selected && !disabled ? colors_1.
|
|
59
|
+
backgroundColor: selected && !disabled ? colors_1.WHITE_ALPHA_06 : colors_1.TRANSPARENT,
|
|
60
60
|
opacity: disabled ? 0.5 : 1,
|
|
61
61
|
cursor: disabled ? 'not-allowed' : 'default',
|
|
62
62
|
};
|
|
@@ -9,12 +9,12 @@ exports.MAX_MOBILE_MENU_WIDTH = 300;
|
|
|
9
9
|
const menuContainer = {
|
|
10
10
|
backgroundColor: colors_1.BACKGROUND,
|
|
11
11
|
position: 'fixed',
|
|
12
|
-
color:
|
|
12
|
+
color: colors_1.WHITE,
|
|
13
13
|
userSelect: 'none',
|
|
14
14
|
WebkitUserSelect: 'none',
|
|
15
15
|
};
|
|
16
|
-
exports.SHADOW_TOWARDS_BOTTOM =
|
|
17
|
-
exports.SHADOW_TOWARDS_TOP =
|
|
16
|
+
exports.SHADOW_TOWARDS_BOTTOM = colors_1.SHADOW_BLACK_ALPHA_50_TOWARDS_BOTTOM;
|
|
17
|
+
exports.SHADOW_TOWARDS_TOP = colors_1.SHADOW_BLACK_ALPHA_50_TOWARDS_TOP;
|
|
18
18
|
exports.menuContainerTowardsBottom = {
|
|
19
19
|
...menuContainer,
|
|
20
20
|
boxShadow: exports.SHADOW_TOWARDS_BOTTOM,
|
|
@@ -17,8 +17,8 @@ const row = {
|
|
|
17
17
|
alignItems: 'center',
|
|
18
18
|
flexDirection: 'row',
|
|
19
19
|
display: 'flex',
|
|
20
|
-
color:
|
|
21
|
-
borderBottom:
|
|
20
|
+
color: colors_1.WHITE,
|
|
21
|
+
borderBottom: colors_1.BORDER_BLACK,
|
|
22
22
|
boxSizing: 'border-box',
|
|
23
23
|
fontSize: 13,
|
|
24
24
|
height: exports.MENU_TOOLBAR_HEIGHT,
|
|
@@ -7,7 +7,7 @@ const colors_1 = require("../helpers/colors");
|
|
|
7
7
|
const Button_1 = require("./Button");
|
|
8
8
|
const buttonStyle = {
|
|
9
9
|
backgroundColor: colors_1.BLUE,
|
|
10
|
-
color:
|
|
10
|
+
color: colors_1.WHITE,
|
|
11
11
|
};
|
|
12
12
|
const ModalButton = (props) => {
|
|
13
13
|
const style = (0, react_1.useMemo)(() => {
|
|
@@ -15,7 +15,7 @@ const getMaxModalHeight = (height) => {
|
|
|
15
15
|
};
|
|
16
16
|
exports.getMaxModalHeight = getMaxModalHeight;
|
|
17
17
|
const backgroundOverlay = {
|
|
18
|
-
backgroundColor:
|
|
18
|
+
backgroundColor: colors_1.WHITE_ALPHA_20,
|
|
19
19
|
backdropFilter: `blur(1px)`,
|
|
20
20
|
position: 'fixed',
|
|
21
21
|
height: '100%',
|
|
@@ -25,8 +25,8 @@ const backgroundOverlay = {
|
|
|
25
25
|
};
|
|
26
26
|
const panel = {
|
|
27
27
|
backgroundColor: colors_1.BACKGROUND,
|
|
28
|
-
boxShadow:
|
|
29
|
-
color:
|
|
28
|
+
boxShadow: colors_1.SHADOW_BLACK,
|
|
29
|
+
color: colors_1.WHITE,
|
|
30
30
|
margin: 'auto',
|
|
31
31
|
};
|
|
32
32
|
const ModalContainer = ({ children, onEscape, onOutsideClick, noZIndex }) => {
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ModalFooterContainer = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const colors_1 = require("../helpers/colors");
|
|
5
6
|
const content = {
|
|
6
7
|
padding: 12,
|
|
7
8
|
paddingRight: 12,
|
|
@@ -10,6 +11,6 @@ const content = {
|
|
|
10
11
|
minWidth: 500,
|
|
11
12
|
};
|
|
12
13
|
const ModalFooterContainer = ({ children }) => {
|
|
13
|
-
return
|
|
14
|
+
return jsx_runtime_1.jsx("div", { style: { ...content, borderTop: colors_1.BORDER_BLACK }, children: children });
|
|
14
15
|
};
|
|
15
16
|
exports.ModalFooterContainer = ModalFooterContainer;
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.ModalHeader = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("react");
|
|
6
|
+
const colors_1 = require("../helpers/colors");
|
|
6
7
|
const modals_1 = require("../state/modals");
|
|
7
8
|
const layout_1 = require("./layout");
|
|
8
9
|
const CancelButton_1 = require("./NewComposition/CancelButton");
|
|
@@ -12,11 +13,11 @@ const container = {
|
|
|
12
13
|
alignItems: 'center',
|
|
13
14
|
padding: '12px 16px',
|
|
14
15
|
width: '100%',
|
|
15
|
-
borderBottom:
|
|
16
|
+
borderBottom: colors_1.BORDER_BLACK,
|
|
16
17
|
};
|
|
17
18
|
const titleStyle = {
|
|
18
19
|
fontSize: 14,
|
|
19
|
-
color:
|
|
20
|
+
color: colors_1.WHITE,
|
|
20
21
|
};
|
|
21
22
|
const icon = {
|
|
22
23
|
height: 20,
|
|
@@ -16,6 +16,7 @@ const DeleteComposition_1 = require("./NewComposition/DeleteComposition");
|
|
|
16
16
|
const DeleteFolder_1 = require("./NewComposition/DeleteFolder");
|
|
17
17
|
const DuplicateComposition_1 = require("./NewComposition/DuplicateComposition");
|
|
18
18
|
const NewComposition_1 = require("./NewComposition/NewComposition");
|
|
19
|
+
const NewFolder_1 = require("./NewComposition/NewFolder");
|
|
19
20
|
const RenameComposition_1 = require("./NewComposition/RenameComposition");
|
|
20
21
|
const RenameFolder_1 = require("./NewComposition/RenameFolder");
|
|
21
22
|
const RenameStaticFile_1 = require("./NewComposition/RenameStaticFile");
|
|
@@ -31,7 +32,7 @@ const Modals = ({ readOnlyStudio }) => {
|
|
|
31
32
|
const { selectedModal: modalContextType } = (0, react_1.useContext)(modals_1.ModalsContext);
|
|
32
33
|
const canRender = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx).previewServerState.type ===
|
|
33
34
|
'connected';
|
|
34
|
-
return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [modalContextType && modalContextType.type === 'new-comp' && (jsx_runtime_1.jsx(NewComposition_1.NewComposition, { folderName: modalContextType.folderName, parentName: modalContextType.parentName, stack: modalContextType.stack })), modalContextType && modalContextType.type === 'duplicate-comp' && (jsx_runtime_1.jsx(DuplicateComposition_1.DuplicateComposition, { compositionType: modalContextType.compositionType, compositionId: modalContextType.compositionId })), modalContextType && modalContextType.type === 'delete-comp' && (jsx_runtime_1.jsx(DeleteComposition_1.DeleteComposition, { compositionId: modalContextType.compositionId })), modalContextType && modalContextType.type === 'rename-comp' && (jsx_runtime_1.jsx(RenameComposition_1.RenameComposition, { compositionId: modalContextType.compositionId })), modalContextType && modalContextType.type === 'delete-folder' && (jsx_runtime_1.jsx(DeleteFolder_1.DeleteFolder, { folderName: modalContextType.folderName, parentName: modalContextType.parentName, stack: modalContextType.stack })), modalContextType && modalContextType.type === 'rename-folder' && (jsx_runtime_1.jsx(RenameFolder_1.RenameFolder, { folderName: modalContextType.folderName, parentName: modalContextType.parentName, stack: modalContextType.stack })), modalContextType && modalContextType.type === 'rename-static-file' && (jsx_runtime_1.jsx(RenameStaticFile_1.RenameStaticFileModal, { relativePath: modalContextType.relativePath })), modalContextType && modalContextType.type === 'input-props-override' && (jsx_runtime_1.jsx(OverrideInputProps_1.OverrideInputPropsModal, {})), modalContextType && modalContextType.type === 'keyframe-settings' && (jsx_runtime_1.jsx(KeyframeSettingsModal_1.KeyframeSettingsModal, { state: modalContextType })), modalContextType && modalContextType.type === 'web-render' && (jsx_runtime_1.jsx(WebRenderModal_1.WebRenderModalWithLoader, { ...modalContextType })), modalContextType &&
|
|
35
|
+
return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [modalContextType && modalContextType.type === 'new-comp' && (jsx_runtime_1.jsx(NewComposition_1.NewComposition, { folderName: modalContextType.folderName, parentName: modalContextType.parentName, stack: modalContextType.stack })), modalContextType && modalContextType.type === 'new-folder' && (jsx_runtime_1.jsx(NewFolder_1.NewFolder, { parentName: modalContextType.parentName, stack: modalContextType.stack })), modalContextType && modalContextType.type === 'duplicate-comp' && (jsx_runtime_1.jsx(DuplicateComposition_1.DuplicateComposition, { compositionType: modalContextType.compositionType, compositionId: modalContextType.compositionId })), modalContextType && modalContextType.type === 'delete-comp' && (jsx_runtime_1.jsx(DeleteComposition_1.DeleteComposition, { compositionId: modalContextType.compositionId })), modalContextType && modalContextType.type === 'rename-comp' && (jsx_runtime_1.jsx(RenameComposition_1.RenameComposition, { compositionId: modalContextType.compositionId })), modalContextType && modalContextType.type === 'delete-folder' && (jsx_runtime_1.jsx(DeleteFolder_1.DeleteFolder, { folderName: modalContextType.folderName, parentName: modalContextType.parentName, stack: modalContextType.stack })), modalContextType && modalContextType.type === 'rename-folder' && (jsx_runtime_1.jsx(RenameFolder_1.RenameFolder, { folderName: modalContextType.folderName, parentName: modalContextType.parentName, stack: modalContextType.stack })), modalContextType && modalContextType.type === 'rename-static-file' && (jsx_runtime_1.jsx(RenameStaticFile_1.RenameStaticFileModal, { relativePath: modalContextType.relativePath })), modalContextType && modalContextType.type === 'input-props-override' && (jsx_runtime_1.jsx(OverrideInputProps_1.OverrideInputPropsModal, {})), modalContextType && modalContextType.type === 'keyframe-settings' && (jsx_runtime_1.jsx(KeyframeSettingsModal_1.KeyframeSettingsModal, { state: modalContextType })), modalContextType && modalContextType.type === 'web-render' && (jsx_runtime_1.jsx(WebRenderModal_1.WebRenderModalWithLoader, { ...modalContextType })), modalContextType &&
|
|
35
36
|
modalContextType.type === 'server-render' &&
|
|
36
37
|
(canRender || modalContextType.readOnlyStudio) ? (jsx_runtime_1.jsx(ServerRenderModal_1.RenderModalWithLoader, { readOnlyStudio: (_a = modalContextType.readOnlyStudio) !== null && _a !== void 0 ? _a : false, initialFrame: modalContextType.initialFrame, initialDarkMode: modalContextType.initialDarkMode, compositionId: modalContextType.compositionId, initialVideoImageFormat: modalContextType.initialVideoImageFormat, initialJpegQuality: modalContextType.initialJpegQuality, initialScale: modalContextType.initialScale, initialLogLevel: modalContextType.initialLogLevel, initialOffthreadVideoCacheSizeInBytes: modalContextType.initialOffthreadVideoCacheSizeInBytes, initialOffthreadVideoThreads: modalContextType.initialOffthreadVideoThreads, initialMediaCacheSizeInBytes: modalContextType.initialMediaCacheSizeInBytes, initialConcurrency: modalContextType.initialConcurrency, maxConcurrency: modalContextType.maxConcurrency, minConcurrency: modalContextType.minConcurrency, initialStillImageFormat: modalContextType.initialStillImageFormat, initialMuted: modalContextType.initialMuted, initialEnforceAudioTrack: modalContextType.initialEnforceAudioTrack, initialProResProfile: modalContextType.initialProResProfile, initialx264Preset: modalContextType.initialx264Preset, initialGopSize: modalContextType.initialGopSize, initialPixelFormat: modalContextType.initialPixelFormat, initialAudioBitrate: modalContextType.initialAudioBitrate, initialVideoBitrate: modalContextType.initialVideoBitrate, initialEveryNthFrame: modalContextType.initialEveryNthFrame, initialNumberOfGifLoops: modalContextType.initialNumberOfGifLoops, initialDelayRenderTimeout: modalContextType.initialDelayRenderTimeout, initialEnvVariables: modalContextType.initialEnvVariables, initialDisableWebSecurity: modalContextType.initialDisableWebSecurity, initialGl: modalContextType.initialOpenGlRenderer, initialHeadless: modalContextType.initialHeadless, initialIgnoreCertificateErrors: modalContextType.initialIgnoreCertificateErrors, initialEncodingBufferSize: modalContextType.initialEncodingBufferSize, initialEncodingMaxRate: modalContextType.initialEncodingMaxRate, initialUserAgent: modalContextType.initialUserAgent, initialColorSpace: modalContextType.initialColorSpace, initialMultiProcessOnLinux: modalContextType.initialMultiProcessOnLinux, initialRepro: modalContextType.initialRepro, initialBeep: modalContextType.initialBeep, initialForSeamlessAacConcatenation: modalContextType.initialForSeamlessAacConcatenation, defaultProps: modalContextType.defaultProps, inFrameMark: modalContextType.inFrameMark, outFrameMark: modalContextType.outFrameMark, defaultConfigurationAudioCodec: modalContextType.defaultConfigurationAudioCodec, defaultConfigurationVideoCodec: modalContextType.defaultConfigurationVideoCodec, renderTypeOfLastRender: modalContextType.renderTypeOfLastRender, defaultMetadata: modalContextType.defaulMetadata, initialHardwareAcceleration: modalContextType.initialHardwareAcceleration, initialSampleRate: modalContextType.initialSampleRate, initialChromeMode: modalContextType.initialChromeMode, renderDefaults: modalContextType.renderDefaults })) : null, modalContextType && modalContextType.type === 'render-progress' && (jsx_runtime_1.jsx(RenderStatusModal_1.RenderStatusModal, { jobId: modalContextType.jobId })), modalContextType && modalContextType.type === 'update' && (jsx_runtime_1.jsx(UpdateModal_1.UpdateModal, { info: modalContextType.info, knownBugs: modalContextType.knownBugs })), modalContextType && modalContextType.type === 'install-packages' && (jsx_runtime_1.jsx(InstallPackage_1.InstallPackageModal, { packageManager: modalContextType.packageManager })), modalContextType && modalContextType.type === 'quick-switcher' && (jsx_runtime_1.jsx(QuickSwitcher_1.default, { readOnlyStudio: readOnlyStudio, invocationTimestamp: modalContextType.invocationTimestamp, initialMode: modalContextType.mode })), modalContextType && modalContextType.type === 'add-effect' && (jsx_runtime_1.jsx(EffectPickerModal_1.EffectPickerModal, { state: modalContextType })), modalContextType && modalContextType.type === 'confirmation-dialog' && (jsx_runtime_1.jsx(ConfirmationDialog_1.ConfirmationDialog, { state: modalContextType })), process.env.ASK_AI_ENABLED && jsx_runtime_1.jsx(AskAiModal_1.AskAiModal, {})] }));
|
|
37
38
|
};
|
|
@@ -2,12 +2,13 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.CancelButton = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const colors_1 = require("../../helpers/colors");
|
|
5
6
|
const z_index_1 = require("../../state/z-index");
|
|
6
7
|
const style = {
|
|
7
8
|
appearance: 'none',
|
|
8
9
|
border: 'none',
|
|
9
|
-
backgroundColor:
|
|
10
|
-
color:
|
|
10
|
+
backgroundColor: colors_1.TRANSPARENT,
|
|
11
|
+
color: colors_1.WHITE,
|
|
11
12
|
cursor: 'pointer',
|
|
12
13
|
display: 'inline-flex',
|
|
13
14
|
justifyContent: 'center',
|
|
@@ -15,6 +16,6 @@ const style = {
|
|
|
15
16
|
};
|
|
16
17
|
const CancelButton = ({ onPress, ...props }) => {
|
|
17
18
|
const { tabIndex } = (0, z_index_1.useZIndex)();
|
|
18
|
-
return (jsx_runtime_1.jsx("button", { tabIndex: tabIndex, style: style, type: "button", onClick: onPress, children: jsx_runtime_1.jsx("svg", { viewBox: "0 0 320 512", ...props, children: jsx_runtime_1.jsx("path", { fill:
|
|
19
|
+
return (jsx_runtime_1.jsx("button", { tabIndex: tabIndex, style: style, type: "button", onClick: onPress, children: jsx_runtime_1.jsx("svg", { viewBox: "0 0 320 512", ...props, children: jsx_runtime_1.jsx("path", { fill: colors_1.CURRENT_COLOR, d: "M207.6 256l107.72-107.72c6.23-6.23 6.23-16.34 0-22.58l-25.03-25.03c-6.23-6.23-16.34-6.23-22.58 0L160 208.4 52.28 100.68c-6.23-6.23-16.34-6.23-22.58 0L4.68 125.7c-6.23 6.23-6.23 16.34 0 22.58L112.4 256 4.68 363.72c-6.23 6.23-6.23 16.34 0 22.58l25.03 25.03c6.23 6.23 16.34 6.23 22.58 0L160 303.6l107.72 107.72c6.23 6.23 16.34 6.23 22.58 0l25.03-25.03c6.23-6.23 6.23-16.34 0-22.58L207.6 256z" }) }) }));
|
|
19
20
|
};
|
|
20
21
|
exports.CancelButton = CancelButton;
|
|
@@ -167,15 +167,15 @@ const Combobox = ({ values, selectedId, style: customStyle, title, small = false
|
|
|
167
167
|
...(customStyle !== null && customStyle !== void 0 ? customStyle : {}),
|
|
168
168
|
userSelect: 'none',
|
|
169
169
|
WebkitUserSelect: 'none',
|
|
170
|
-
color:
|
|
170
|
+
color: colors_1.WHITE,
|
|
171
171
|
display: 'inline-flex',
|
|
172
172
|
flexDirection: 'row',
|
|
173
173
|
alignItems: 'center',
|
|
174
174
|
borderColor: opened
|
|
175
175
|
? colors_1.SELECTED_BACKGROUND
|
|
176
176
|
: hovered
|
|
177
|
-
? colors_1.
|
|
178
|
-
: colors_1.
|
|
177
|
+
? colors_1.WHITE_ALPHA_05
|
|
178
|
+
: colors_1.BLACK_ALPHA_60,
|
|
179
179
|
};
|
|
180
180
|
}, [customStyle, hovered, opened, small]);
|
|
181
181
|
return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|