@remotion/studio 4.0.515 → 4.0.517
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/restart-studio.js +4 -0
- package/dist/components/AssetSelector.js +4 -10
- package/dist/components/AssetSelectorItem.d.ts +2 -1
- package/dist/components/AssetSelectorItem.js +24 -29
- package/dist/components/Canvas.js +21 -15
- package/dist/components/CanvasCaptureDropHandler.d.ts +4 -0
- package/dist/components/CanvasCaptureDropHandler.js +42 -0
- package/dist/components/CanvasOrLoading.js +4 -3
- package/dist/components/CaptionInspector.d.ts +2 -0
- package/dist/components/CaptionInspector.js +3 -5
- package/dist/components/CheckboardToggle.js +1 -1
- package/dist/components/Checkbox.d.ts +0 -1
- package/dist/components/Checkbox.js +2 -19
- package/dist/components/CompositionSelector.js +6 -3
- package/dist/components/CompositionSelectorItem.js +9 -10
- package/dist/components/ConfigSelect.d.ts +17 -0
- package/dist/components/ConfigSelect.js +50 -0
- package/dist/components/ConfigureLicenseModal.js +79 -46
- package/dist/components/CurrentAsset.d.ts +10 -2
- package/dist/components/CurrentAsset.js +143 -45
- package/dist/components/Editor.js +2 -1
- package/dist/components/EditorContent.js +5 -2
- package/dist/components/EditorContexts.js +2 -1
- package/dist/components/EditorRuler/Ruler.d.ts +1 -0
- package/dist/components/EditorRuler/Ruler.js +9 -8
- package/dist/components/EditorRuler/index.d.ts +1 -0
- package/dist/components/EditorRuler/index.js +3 -4
- package/dist/components/EditorRuler/use-is-ruler-visible.d.ts +1 -1
- package/dist/components/EditorRuler/use-is-ruler-visible.js +8 -2
- package/dist/components/ElementLibraryModal.d.ts +5 -0
- package/dist/components/ElementLibraryModal.js +38 -0
- package/dist/components/FilePreview.js +71 -0
- package/dist/components/FixComputedValueModal.js +54 -51
- package/dist/components/GlobalKeybindings.js +5 -5
- package/dist/components/InlineAction.d.ts +1 -1
- package/dist/components/InlineAction.js +12 -2
- package/dist/components/InlineCaptionInspector.d.ts +2 -0
- package/dist/components/InlineCaptionInspector.js +2 -2
- package/dist/components/InlineCompositionName.js +1 -1
- package/dist/components/InlineEditableTitle.js +5 -4
- package/dist/components/InspectorInfoHeader.js +1 -1
- package/dist/components/InspectorOpenInEditor.js +48 -72
- package/dist/components/InspectorPanel/AlignmentControls.js +2 -3
- package/dist/components/InspectorPanel/CollapsibleInspectorSectionHeader.d.ts +7 -0
- package/dist/components/InspectorPanel/CollapsibleInspectorSectionHeader.js +39 -0
- package/dist/components/InspectorPanel/CompositionInspector.js +25 -45
- package/dist/components/InspectorPanel/CompositionInspectorHeader.js +2 -2
- package/dist/components/InspectorPanel/CompositionMetadata.js +11 -4
- package/dist/components/InspectorPanel/EasingInspector.js +2 -2
- package/dist/components/InspectorPanel/ElementLibraryButton.d.ts +2 -0
- package/dist/components/InspectorPanel/ElementLibraryButton.js +139 -0
- package/dist/components/InspectorPanel/KeyframeEasingNavigator.js +10 -4
- package/dist/components/InspectorPanel/KeyframeInspector.js +1 -1
- package/dist/components/InspectorPanel/SequenceInspectorHeader.js +14 -6
- package/dist/components/InspectorPanel/SequenceSelectionInspector.js +2 -7
- package/dist/components/InspectorPanel/common.d.ts +0 -13
- package/dist/components/InspectorPanel/common.js +6 -59
- package/dist/components/InspectorPanel/inspector-selection.d.ts +2 -2
- package/dist/components/InspectorPanel/styles.d.ts +0 -1
- package/dist/components/InspectorPanel/styles.js +3 -4
- package/dist/components/InspectorPanel/use-composition-actions.js +0 -1
- package/dist/components/InspectorPanel/use-track-for-selection.d.ts +1 -2
- package/dist/components/InspectorPanelLayout.d.ts +1 -1
- package/dist/components/InspectorPanelLayout.js +1 -1
- package/dist/components/InspectorSequenceSection.d.ts +1 -2
- package/dist/components/InspectorSequenceSection.js +40 -54
- package/dist/components/InspectorSourceLocation.js +1 -1
- package/dist/components/InstallPackage.d.ts +2 -1
- package/dist/components/InstallPackage.js +60 -30
- package/dist/components/InstallablePackage.js +37 -11
- package/dist/components/KeyboardShortcutsSettings.d.ts +2 -0
- package/dist/components/KeyboardShortcutsSettings.js +177 -0
- package/dist/components/Menu/MenuItem.js +15 -6
- package/dist/components/MenuBuildIndicator.js +1 -1
- package/dist/components/MenuToolbar.js +7 -3
- package/dist/components/Modals.js +7 -5
- package/dist/components/NewComposition/CodemodFooter.d.ts +0 -1
- package/dist/components/NewComposition/CodemodFooter.js +2 -8
- package/dist/components/NewComposition/DeleteComposition.js +1 -1
- package/dist/components/NewComposition/DeleteFolder.js +1 -1
- package/dist/components/NewComposition/DuplicateComposition.js +1 -1
- package/dist/components/NewComposition/InputDragger.js +27 -4
- package/dist/components/NewComposition/NewComposition.js +1 -1
- package/dist/components/NewComposition/NewFolder.js +1 -3
- package/dist/components/NewComposition/RenameComposition.js +1 -1
- package/dist/components/NewComposition/RenameFolder.js +1 -1
- package/dist/components/NewComposition/use-rename-static-file.js +1 -1
- package/dist/components/Notifications/NotificationCenter.d.ts +1 -0
- package/dist/components/Notifications/NotificationCenter.js +5 -0
- package/dist/components/OptionsPanel.js +9 -12
- package/dist/components/PlaybackRateSelector.js +1 -1
- package/dist/components/Preview.js +83 -5
- package/dist/components/PreviewToolbar.js +12 -3
- package/dist/components/PreviewToolbarOverflowButton.d.ts +1 -0
- package/dist/components/PreviewToolbarOverflowButton.js +39 -2
- package/dist/components/QuickSwitcher/ExplorerQuickSwitcherTrigger.js +2 -2
- package/dist/components/QuickSwitcher/QuickSwitcherContent.js +14 -30
- package/dist/components/RadioButton.d.ts +6 -0
- package/dist/components/RadioButton.js +62 -0
- package/dist/components/RenderButton.js +68 -184
- package/dist/components/RenderModal/DataEditor.js +15 -12
- package/dist/components/RenderModal/RenderStatusModal.js +0 -1
- package/dist/components/RenderModal/SchemaEditor/ZodSwitch.js +3 -1
- package/dist/components/RenderModal/SchemaEditor/infer-zod-schema-from-value.d.ts +15 -0
- package/dist/components/RenderModal/SchemaEditor/infer-zod-schema-from-value.js +95 -0
- package/dist/components/RenderQueue/RenderQueueRemoveItem.js +1 -6
- package/dist/components/RenderingSettings.js +7 -4
- package/dist/components/RulersAndGuidesToggle.d.ts +4 -0
- package/dist/components/RulersAndGuidesToggle.js +34 -0
- package/dist/components/SegmentedButton.d.ts +29 -0
- package/dist/components/SegmentedButton.js +226 -0
- package/dist/components/SelectedOutlineEditingHandles.d.ts +16 -0
- package/dist/components/SelectedOutlineEditingHandles.js +66 -0
- package/dist/components/SelectedOutlineElement.d.ts +2 -4
- package/dist/components/SelectedOutlineElement.js +15 -54
- package/dist/components/SelectedOutlineOverlay.js +32 -6
- package/dist/components/SelectedOutlinePolygon.d.ts +4 -6
- package/dist/components/SelectedOutlinePolygon.js +18 -16
- package/dist/components/SelectedOutlineRenderer.d.ts +1 -2
- package/dist/components/SelectedOutlineRenderer.js +66 -14
- package/dist/components/SelectedOutlineUvControls.d.ts +1 -1
- package/dist/components/SettingsModal.d.ts +1 -1
- package/dist/components/SettingsModal.js +30 -7
- package/dist/components/SettingsModalFooter.d.ts +3 -1
- package/dist/components/SettingsModalFooter.js +20 -4
- package/dist/components/ShowPixelGridProvider.d.ts +4 -0
- package/dist/components/ShowPixelGridProvider.js +24 -0
- package/dist/components/SidebarCollapserControls.js +2 -2
- package/dist/components/SkillsSettings.d.ts +2 -0
- package/dist/components/SkillsSettings.js +129 -0
- package/dist/components/StaticFilePreview.js +7 -1
- package/dist/components/StudioSettings.js +7 -48
- package/dist/components/Tabs/index.js +1 -1
- package/dist/components/Timeline/Timeline.js +41 -1
- package/dist/components/Timeline/TimelineAssetField.d.ts +1 -1
- package/dist/components/Timeline/TimelineAssetField.js +15 -9
- package/dist/components/Timeline/TimelineBooleanField.js +1 -4
- package/dist/components/Timeline/TimelineClipboardKeybindings.d.ts +6 -7
- package/dist/components/Timeline/TimelineClipboardKeybindings.js +7 -10
- package/dist/components/Timeline/TimelineDragHandler.js +11 -4
- package/dist/components/Timeline/TimelineEffectItem.d.ts +1 -0
- package/dist/components/Timeline/TimelineEffectItem.js +23 -10
- package/dist/components/Timeline/TimelineEffectPropItem.js +15 -2
- package/dist/components/Timeline/TimelineExpandedRow.js +5 -4
- package/dist/components/Timeline/TimelineFieldLabel.js +4 -2
- package/dist/components/Timeline/TimelineFieldRowContent.d.ts +1 -2
- package/dist/components/Timeline/TimelineFieldRowContent.js +8 -21
- package/dist/components/Timeline/TimelineImageInfo.d.ts +0 -1
- package/dist/components/Timeline/TimelineImageInfo.js +13 -32
- package/dist/components/Timeline/TimelineKeyframeControls.d.ts +1 -2
- package/dist/components/Timeline/TimelineKeyframeControls.js +10 -4
- package/dist/components/Timeline/TimelinePlayCursorSyncer.js +4 -2
- package/dist/components/Timeline/TimelinePrimitiveFieldValue.js +1 -1
- package/dist/components/Timeline/TimelineRotationField.js +0 -2
- package/dist/components/Timeline/TimelineRowChrome.d.ts +0 -1
- package/dist/components/Timeline/TimelineRowChrome.js +3 -4
- package/dist/components/Timeline/TimelineRowLayoutContext.d.ts +0 -1
- package/dist/components/Timeline/TimelineRowLayoutContext.js +1 -4
- package/dist/components/Timeline/TimelineScaleField.js +2 -6
- package/dist/components/Timeline/TimelineSchemaField.js +9 -3
- package/dist/components/Timeline/TimelineSelection.d.ts +29 -66
- package/dist/components/Timeline/TimelineSelection.js +31 -171
- package/dist/components/Timeline/TimelineSequence.d.ts +2 -0
- package/dist/components/Timeline/TimelineSequence.js +110 -19
- package/dist/components/Timeline/TimelineSequenceItem.d.ts +1 -0
- package/dist/components/Timeline/TimelineSequenceItem.js +13 -11
- package/dist/components/Timeline/TimelineSequencePropItem.js +15 -2
- package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.d.ts +7 -6
- package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.js +85 -91
- package/dist/components/Timeline/TimelineTrack.js +1 -1
- package/dist/components/Timeline/TimelineTransformOriginField.js +0 -4
- package/dist/components/Timeline/TimelineTranslateField.js +0 -4
- package/dist/components/Timeline/TimelineVirtualization.js +3 -1
- package/dist/components/Timeline/delete-selected-timeline-item.d.ts +3 -4
- package/dist/components/Timeline/duplicate-selected-timeline-item.d.ts +3 -4
- package/dist/components/Timeline/duplicate-selected-timeline-item.js +3 -12
- package/dist/components/Timeline/find-track-for-node-path-info.d.ts +1 -1
- package/dist/components/Timeline/get-copy-context-for-agents-menu-item.d.ts +4 -0
- package/dist/components/Timeline/get-copy-context-for-agents-menu-item.js +26 -0
- package/dist/components/Timeline/get-sequence-context-menu-items.js +2 -19
- package/dist/components/Timeline/get-timeline-sequence-visible-layout.d.ts +6 -1
- package/dist/components/Timeline/get-timeline-sequence-visible-layout.js +11 -4
- package/dist/components/Timeline/keyframe-clipboard.d.ts +2 -3
- package/dist/components/Timeline/reset-selected-timeline-props.d.ts +2 -3
- package/dist/components/Timeline/sequence-prop-clipboard.d.ts +2 -3
- package/dist/components/Timeline/split-selected-timeline-item.d.ts +2 -3
- package/dist/components/Timeline/split-selected-timeline-item.js +0 -1
- package/dist/components/Timeline/timeline-expanded-filter.d.ts +1 -2
- package/dist/components/Timeline/timeline-field-row-layout.d.ts +1 -1
- package/dist/components/Timeline/timeline-field-row-layout.js +4 -7
- package/dist/components/Timeline/timeline-field-utils.js +0 -2
- package/dist/components/Timeline/timeline-scroll-logic.d.ts +7 -5
- package/dist/components/Timeline/timeline-scroll-logic.js +12 -7
- package/dist/components/Timeline/update-selected-easing.d.ts +7 -7
- package/dist/components/Timeline/use-timeline-asset-drop.js +24 -0
- package/dist/components/Timeline/use-timeline-keyframe-drag.d.ts +6 -7
- package/dist/components/TimelineCombobox.js +25 -160
- package/dist/components/TimelineInOutToggle.js +4 -1
- package/dist/components/canvas-capture-drop.d.ts +4 -0
- package/dist/components/canvas-capture-drop.js +22 -0
- package/dist/components/duplicate-jsx-node-api.d.ts +2 -0
- package/dist/components/duplicate-jsx-node-api.js +12 -0
- package/dist/components/effect-drag-and-drop.js +1 -4
- package/dist/components/handle-drop.d.ts +2 -1
- package/dist/components/handle-drop.js +3 -3
- package/dist/components/import-assets.js +9 -65
- package/dist/components/keyboard-shortcuts.d.ts +10 -0
- package/dist/components/keyboard-shortcuts.js +135 -0
- package/dist/components/selected-outline-control-layout.js +2 -6
- package/dist/components/selected-outline-measurement.d.ts +8 -9
- package/dist/components/selected-outline-measurement.js +16 -3
- package/dist/components/use-delete-asset.d.ts +1 -0
- package/dist/components/use-delete-asset.js +40 -0
- package/dist/components/use-selected-outline-control-target.d.ts +11 -0
- package/dist/components/use-selected-outline-control-target.js +79 -0
- package/dist/esm/{chunk-s6k99gh2.js → chunk-4bxz1d3g.js} +3 -2
- package/dist/esm/{chunk-v5a8vpv4.js → chunk-gzqm3g2m.js} +47432 -40444
- package/dist/esm/index.mjs +3 -0
- package/dist/esm/internals.mjs +47431 -40443
- package/dist/esm/previewEntry.mjs +47169 -40181
- package/dist/esm/renderEntry.mjs +2 -2
- package/dist/helpers/add-asset-cache-bust.d.ts +4 -0
- package/dist/helpers/add-asset-cache-bust.js +10 -0
- package/dist/helpers/calculate-timeline.d.ts +1 -7
- package/dist/helpers/calculate-timeline.js +2 -145
- package/dist/helpers/colors.d.ts +2 -0
- package/dist/helpers/colors.js +6 -2
- package/dist/helpers/drag-aware-double-click.d.ts +6 -0
- package/dist/helpers/drag-aware-double-click.js +20 -0
- package/dist/helpers/editor-ruler.js +6 -5
- package/dist/helpers/get-asset-metadata.d.ts +19 -0
- package/dist/helpers/get-asset-metadata.js +75 -21
- package/dist/helpers/get-connected-compositions.d.ts +1 -6
- package/dist/helpers/get-connected-compositions.js +2 -8
- package/dist/helpers/get-sequence-double-click-action.d.ts +2 -1
- package/dist/helpers/get-sequence-double-click-action.js +7 -1
- package/dist/helpers/get-sequence-visible-range.d.ts +1 -5
- package/dist/helpers/get-sequence-visible-range.js +6 -51
- package/dist/helpers/get-timeline-nestedness.d.ts +1 -2
- package/dist/helpers/get-timeline-nestedness.js +2 -12
- package/dist/helpers/get-timeline-sequence-layout.d.ts +4 -1
- package/dist/helpers/get-timeline-sequence-layout.js +15 -6
- package/dist/helpers/get-timeline-sequence-sort-key.d.ts +2 -21
- package/dist/helpers/get-timeline-sequence-sort-key.js +2 -16
- package/dist/helpers/hoverable.d.ts +1 -0
- package/dist/helpers/hoverable.js +2 -1
- package/dist/helpers/inject-css.js +3 -1
- package/dist/helpers/is-current-selected-still.js +4 -2
- package/dist/helpers/open-in-remotion-convert.d.ts +7 -0
- package/dist/helpers/open-in-remotion-convert.js +18 -0
- package/dist/helpers/sort-by-nonce-history.d.ts +1 -5
- package/dist/helpers/sort-by-nonce-history.js +3 -148
- package/dist/helpers/timeline-node-path-key.d.ts +1 -2
- package/dist/helpers/timeline-node-path-key.js +2 -2
- package/dist/helpers/use-media-metadata.d.ts +2 -1
- package/dist/helpers/use-media-metadata.js +12 -5
- package/dist/helpers/use-menu-structure.js +52 -32
- package/dist/icons/align-center-horizontal.js +1 -1
- package/dist/icons/align-left.js +1 -1
- package/dist/icons/align-right.js +1 -1
- package/dist/icons/keyboard.d.ts +4 -0
- package/dist/icons/keyboard.js +10 -0
- package/dist/icons/license.d.ts +4 -0
- package/dist/icons/license.js +8 -0
- package/dist/icons/package.d.ts +4 -0
- package/dist/icons/package.js +8 -0
- package/dist/icons/react.js +1 -1
- package/dist/icons/remotion-convert.d.ts +4 -0
- package/dist/icons/remotion-convert.js +10 -0
- package/dist/icons/skills.d.ts +4 -0
- package/dist/icons/skills.js +10 -0
- package/dist/state/editor-pixel-grid.d.ts +8 -0
- package/dist/state/editor-pixel-grid.js +18 -0
- package/dist/state/modals.d.ts +6 -5
- package/package.json +14 -12
- package/dist/components/KeyboardShortcutsExplainer.d.ts +0 -2
- package/dist/components/KeyboardShortcutsExplainer.js +0 -194
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.KeyboardShortcutsSettings = void 0;
|
|
37
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
38
|
+
const react_1 = __importStar(require("react"));
|
|
39
|
+
const browser_studio_operations_1 = require("../helpers/browser-studio-operations");
|
|
40
|
+
const colors_1 = require("../helpers/colors");
|
|
41
|
+
const studio_runtime_config_1 = require("../helpers/studio-runtime-config");
|
|
42
|
+
const ConfigSelect_1 = require("./ConfigSelect");
|
|
43
|
+
const styles_1 = require("./InspectorPanel/styles");
|
|
44
|
+
const keyboard_shortcuts_1 = require("./keyboard-shortcuts");
|
|
45
|
+
const layout_1 = require("./layout");
|
|
46
|
+
const ValidationMessage_1 = require("./NewComposition/ValidationMessage");
|
|
47
|
+
const SettingsContext_1 = require("./SettingsContext");
|
|
48
|
+
const use_auto_save_config_1 = require("./use-auto-save-config");
|
|
49
|
+
const container = {
|
|
50
|
+
alignSelf: 'flex-start',
|
|
51
|
+
display: 'flex',
|
|
52
|
+
flex: 1,
|
|
53
|
+
flexDirection: 'column',
|
|
54
|
+
minWidth: 0,
|
|
55
|
+
};
|
|
56
|
+
const dividerLabel = {
|
|
57
|
+
...styles_1.sectionHeader,
|
|
58
|
+
margin: 0,
|
|
59
|
+
padding: '4px 16px',
|
|
60
|
+
};
|
|
61
|
+
const shortcutSectionTitle = {
|
|
62
|
+
...dividerLabel,
|
|
63
|
+
marginTop: 8,
|
|
64
|
+
};
|
|
65
|
+
const shortcutRow = {
|
|
66
|
+
alignItems: 'center',
|
|
67
|
+
borderBottom: colors_1.BORDER_WHITE_ALPHA_12,
|
|
68
|
+
display: 'flex',
|
|
69
|
+
gap: 16,
|
|
70
|
+
justifyContent: 'space-between',
|
|
71
|
+
margin: '0 16px',
|
|
72
|
+
minHeight: 38,
|
|
73
|
+
};
|
|
74
|
+
const lastShortcutRow = {
|
|
75
|
+
...shortcutRow,
|
|
76
|
+
borderBottom: 'none',
|
|
77
|
+
};
|
|
78
|
+
const actionName = {
|
|
79
|
+
color: colors_1.LIGHT_TEXT,
|
|
80
|
+
fontSize: 14,
|
|
81
|
+
lineHeight: 1.4,
|
|
82
|
+
minWidth: 0,
|
|
83
|
+
};
|
|
84
|
+
const chords = {
|
|
85
|
+
alignItems: 'center',
|
|
86
|
+
display: 'flex',
|
|
87
|
+
flexShrink: 0,
|
|
88
|
+
gap: 6,
|
|
89
|
+
};
|
|
90
|
+
const chord = {
|
|
91
|
+
alignItems: 'center',
|
|
92
|
+
display: 'flex',
|
|
93
|
+
gap: 4,
|
|
94
|
+
};
|
|
95
|
+
const key = {
|
|
96
|
+
background: colors_1.INPUT_BACKGROUND,
|
|
97
|
+
border: `1px solid ${colors_1.BLACK_ALPHA_60}`,
|
|
98
|
+
borderBottomWidth: 2,
|
|
99
|
+
borderRadius: 3,
|
|
100
|
+
color: colors_1.WHITE,
|
|
101
|
+
fontFamily: 'monospace',
|
|
102
|
+
fontSize: 12,
|
|
103
|
+
lineHeight: '18px',
|
|
104
|
+
minWidth: 18,
|
|
105
|
+
padding: '1px 5px',
|
|
106
|
+
textAlign: 'center',
|
|
107
|
+
};
|
|
108
|
+
const alternative = {
|
|
109
|
+
color: colors_1.LIGHT_TEXT,
|
|
110
|
+
fontSize: 11,
|
|
111
|
+
};
|
|
112
|
+
const KeyboardShortcutsSettings = () => {
|
|
113
|
+
var _a;
|
|
114
|
+
const { error: settingsError, revision, studioRuntimeConfig } = (0, SettingsContext_1.useSettings)();
|
|
115
|
+
const isBrowserStudio = (0, browser_studio_operations_1.getBrowserStudioOperations)() !== null;
|
|
116
|
+
const [enabled, setEnabled] = (0, react_1.useState)(null);
|
|
117
|
+
const [edited, setEdited] = (0, react_1.useState)(false);
|
|
118
|
+
const [syncedRevision, setSyncedRevision] = (0, react_1.useState)(-1);
|
|
119
|
+
const [error, setError] = (0, react_1.useState)(null);
|
|
120
|
+
const displayedShortcutGroups = (0, studio_runtime_config_1.getStudioAskAIEnabled)()
|
|
121
|
+
? [...keyboard_shortcuts_1.keyboardShortcutGroups, keyboard_shortcuts_1.askAIKeyboardShortcutGroup]
|
|
122
|
+
: keyboard_shortcuts_1.keyboardShortcutGroups;
|
|
123
|
+
(0, react_1.useEffect)(() => {
|
|
124
|
+
var _a;
|
|
125
|
+
var _b;
|
|
126
|
+
if (studioRuntimeConfig === null) {
|
|
127
|
+
return;
|
|
128
|
+
}
|
|
129
|
+
setEnabled((_b = (_a = studioRuntimeConfig.configFileStudioSettings) === null || _a === void 0 ? void 0 : _a.keyboardShortcutsEnabled) !== null && _b !== void 0 ? _b : null);
|
|
130
|
+
setEdited(false);
|
|
131
|
+
setSyncedRevision(revision);
|
|
132
|
+
setError(null);
|
|
133
|
+
}, [revision, studioRuntimeConfig]);
|
|
134
|
+
const onEnabledChange = (0, react_1.useCallback)((value) => {
|
|
135
|
+
setEnabled(value);
|
|
136
|
+
setEdited(true);
|
|
137
|
+
}, []);
|
|
138
|
+
const updates = (0, react_1.useMemo)(() => {
|
|
139
|
+
if (!edited) {
|
|
140
|
+
return [];
|
|
141
|
+
}
|
|
142
|
+
return enabled === null
|
|
143
|
+
? [{ setter: 'setKeyboardShortcutsEnabled', type: 'delete' }]
|
|
144
|
+
: [
|
|
145
|
+
{
|
|
146
|
+
setter: 'setKeyboardShortcutsEnabled',
|
|
147
|
+
type: 'set',
|
|
148
|
+
value: enabled,
|
|
149
|
+
},
|
|
150
|
+
];
|
|
151
|
+
}, [edited, enabled]);
|
|
152
|
+
const ready = studioRuntimeConfig !== null && syncedRevision === revision;
|
|
153
|
+
(0, use_auto_save_config_1.useAutoSaveConfig)({
|
|
154
|
+
enabled: ready && !isBrowserStudio,
|
|
155
|
+
onError: setError,
|
|
156
|
+
ready,
|
|
157
|
+
syncRevision: syncedRevision,
|
|
158
|
+
updates,
|
|
159
|
+
});
|
|
160
|
+
if (studioRuntimeConfig === null) {
|
|
161
|
+
return null;
|
|
162
|
+
}
|
|
163
|
+
return (jsx_runtime_1.jsxs("div", { style: container, children: [isBrowserStudio ? null : (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
164
|
+
jsx_runtime_1.jsx("p", { style: dividerLabel, children: "General" }), jsx_runtime_1.jsx(ConfigSelect_1.ConfigSelect, { defaultLabel: "Enabled", name: "Keyboard shortcuts", onChange: onEnabledChange, options: ConfigSelect_1.booleanOptions, value: enabled })
|
|
165
|
+
] })), displayedShortcutGroups.map((group, groupIndex) => (jsx_runtime_1.jsxs("div", { children: [
|
|
166
|
+
jsx_runtime_1.jsx("p", { style: shortcutSectionTitle, children: group.name }), jsx_runtime_1.jsx("div", { role: "list", "aria-label": group.name, children: group.shortcuts.map((shortcut, shortcutIndex) => (jsx_runtime_1.jsxs("div", { role: "listitem", style: groupIndex === displayedShortcutGroups.length - 1 &&
|
|
167
|
+
shortcutIndex === group.shortcuts.length - 1
|
|
168
|
+
? lastShortcutRow
|
|
169
|
+
: shortcutRow, children: [
|
|
170
|
+
jsx_runtime_1.jsx("span", { style: actionName, children: shortcut.action }), jsx_runtime_1.jsx("span", { style: chords, children: shortcut.chords.map((keys, chordIndex) => (jsx_runtime_1.jsxs(react_1.default.Fragment, { children: [chordIndex > 0 ? (jsx_runtime_1.jsx("span", { style: alternative, children: "or" })) : null, jsx_runtime_1.jsx("span", { style: chord, children: keys.map((keyboardKey) => (jsx_runtime_1.jsx("kbd", { style: key, children: keyboardKey }, keyboardKey))) })
|
|
171
|
+
] }, keys.join('-')))) })
|
|
172
|
+
] }, shortcut.action))) })
|
|
173
|
+
] }, group.name))), (error !== null && error !== void 0 ? error : settingsError) ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
174
|
+
jsx_runtime_1.jsx(layout_1.Spacing, { y: 1, block: true }), jsx_runtime_1.jsx("div", { style: { paddingLeft: 16, paddingRight: 16 }, children: jsx_runtime_1.jsx(ValidationMessage_1.ValidationMessage, { align: "flex-start", message: (_a = error !== null && error !== void 0 ? error : settingsError) !== null && _a !== void 0 ? _a : '', type: "error" }) })
|
|
175
|
+
] })) : null] }));
|
|
176
|
+
};
|
|
177
|
+
exports.KeyboardShortcutsSettings = KeyboardShortcutsSettings;
|
|
@@ -12,20 +12,29 @@ const colors_1 = require("../../helpers/colors");
|
|
|
12
12
|
const hoverable_1 = require("../../helpers/hoverable");
|
|
13
13
|
const pointer_session_1 = require("../../helpers/pointer-session");
|
|
14
14
|
const z_index_1 = require("../../state/z-index");
|
|
15
|
+
const menu_toolbar_height_1 = require("../menu-toolbar-height");
|
|
15
16
|
const MenuContent_1 = require("../NewComposition/MenuContent");
|
|
16
17
|
const is_menu_item_1 = require("./is-menu-item");
|
|
17
18
|
const portals_1 = require("./portals");
|
|
18
19
|
const styles_1 = require("./styles");
|
|
20
|
+
const MENU_ITEM_HEIGHT = 24;
|
|
21
|
+
const MENU_ITEM_VERTICAL_MARGIN = (menu_toolbar_height_1.MENU_TOOLBAR_HEIGHT - MENU_ITEM_HEIGHT) / 2;
|
|
19
22
|
const container = {
|
|
23
|
+
alignItems: 'center',
|
|
24
|
+
boxSizing: 'border-box',
|
|
25
|
+
display: 'inline-flex',
|
|
20
26
|
fontSize: 13,
|
|
21
|
-
|
|
22
|
-
|
|
27
|
+
height: MENU_ITEM_HEIGHT,
|
|
28
|
+
justifyContent: 'center',
|
|
29
|
+
paddingLeft: 8,
|
|
30
|
+
paddingRight: 8,
|
|
23
31
|
cursor: 'default',
|
|
24
|
-
paddingTop:
|
|
25
|
-
paddingBottom:
|
|
32
|
+
paddingTop: 0,
|
|
33
|
+
paddingBottom: 0,
|
|
26
34
|
userSelect: 'none',
|
|
27
35
|
WebkitUserSelect: 'none',
|
|
28
36
|
border: 'none',
|
|
37
|
+
borderRadius: 3,
|
|
29
38
|
};
|
|
30
39
|
const MenuItem = ({ label: itemName, selected, id, onItemSelected, onItemHovered, onItemQuit, onPreviousMenu, onNextMenu, menu, }) => {
|
|
31
40
|
const ref = (0, react_1.useRef)(null);
|
|
@@ -58,7 +67,7 @@ const MenuItem = ({ label: itemName, selected, id, onItemSelected, onItemHovered
|
|
|
58
67
|
return {
|
|
59
68
|
...styles_1.menuContainerTowardsBottom,
|
|
60
69
|
left: size.left,
|
|
61
|
-
top: size.top + size.height,
|
|
70
|
+
top: size.top + size.height + MENU_ITEM_VERTICAL_MARGIN,
|
|
62
71
|
};
|
|
63
72
|
}, [selected, size]);
|
|
64
73
|
// Not for styling (which is done via CSS :hover), but for switching
|
|
@@ -105,7 +114,7 @@ const MenuItem = ({ label: itemName, selected, id, onItemSelected, onItemHovered
|
|
|
105
114
|
var _a, _b;
|
|
106
115
|
return {
|
|
107
116
|
...styles_1.outerPortal,
|
|
108
|
-
top: ((_a = size === null || size === void 0 ? void 0 : size.top) !== null && _a !== void 0 ? _a : 0) + ((_b = size === null || size === void 0 ? void 0 : size.height) !== null && _b !== void 0 ? _b : 0),
|
|
117
|
+
top: ((_a = size === null || size === void 0 ? void 0 : size.top) !== null && _a !== void 0 ? _a : 0) + ((_b = size === null || size === void 0 ? void 0 : size.height) !== null && _b !== void 0 ? _b : 0) + MENU_ITEM_VERTICAL_MARGIN,
|
|
109
118
|
};
|
|
110
119
|
}, [size]);
|
|
111
120
|
return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
@@ -48,7 +48,7 @@ const MenuBuildIndicator = ({ mobileLayout }) => {
|
|
|
48
48
|
};
|
|
49
49
|
}, []);
|
|
50
50
|
return (jsx_runtime_1.jsxs("div", { style: cwd, title: window.remotion_cwd, children: [
|
|
51
|
-
jsx_runtime_1.jsx(layout_1.Spacing, { x: mobileLayout ? 0.5 : 2 }), window.remotion_projectName, jsx_runtime_1.jsx(MenuCompositionName_1.MenuCompositionName, {}), jsx_runtime_1.jsx(InspectorOpenInEditor_1.InspectorOpenInEditor, { location: folderLocation, locationType: "folder" }), mobileLayout ? null : jsx_runtime_1.jsx(layout_1.Spacing, { x: 0.5 }), mobileLayout ? (isBuilding ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
51
|
+
jsx_runtime_1.jsx(layout_1.Spacing, { x: mobileLayout ? 0.5 : 2 }), window.remotion_projectName, jsx_runtime_1.jsx(MenuCompositionName_1.MenuCompositionName, {}), jsx_runtime_1.jsx(layout_1.Spacing, { x: 1 }), jsx_runtime_1.jsx(InspectorOpenInEditor_1.InspectorOpenInEditor, { location: folderLocation, locationType: "folder" }), mobileLayout ? null : jsx_runtime_1.jsx(layout_1.Spacing, { x: 0.5 }), mobileLayout ? (isBuilding ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
52
52
|
jsx_runtime_1.jsx(layout_1.Spacing, { x: 0.5 }), jsx_runtime_1.jsx("div", { style: spinner, children: jsx_runtime_1.jsx(Spinner_1.Spinner, { duration: 0.5, size: spinnerSize, color: colors_1.WHITE_ALPHA_80 }) })
|
|
53
53
|
] })) : null) : isBuilding ? (jsx_runtime_1.jsx("div", { style: spinner, children: jsx_runtime_1.jsx(Spinner_1.Spinner, { duration: 0.5, size: spinnerSize, color: colors_1.WHITE_ALPHA_80 }) })) : (jsx_runtime_1.jsx("div", { style: noSpinner }))] }));
|
|
54
54
|
};
|
|
@@ -36,6 +36,10 @@ const row = {
|
|
|
36
36
|
const flex = {
|
|
37
37
|
flex: 1,
|
|
38
38
|
};
|
|
39
|
+
const menuItems = {
|
|
40
|
+
display: 'inline-flex',
|
|
41
|
+
height: 24,
|
|
42
|
+
};
|
|
39
43
|
const MenuToolbar = ({ readOnlyStudio }) => {
|
|
40
44
|
const [selected, setSelected] = (0, react_1.useState)(null);
|
|
41
45
|
const { previewServerState } = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx);
|
|
@@ -126,9 +130,9 @@ const MenuToolbar = ({ readOnlyStudio }) => {
|
|
|
126
130
|
? 'Quick Switcher'
|
|
127
131
|
: `Quick Switcher (${ShortcutHint_1.cmdOrCtrlCharacter}+K)`;
|
|
128
132
|
return (jsx_runtime_1.jsxs(layout_1.Row, { align: "center", className: "css-reset", style: row, onPointerDown: onPointerDown, children: [
|
|
129
|
-
jsx_runtime_1.jsxs("div", { style: fixedWidthLeft, children: [mobileLayout ? (jsx_runtime_1.jsx(InlineAction_1.InlineAction, { variant: null, onClick: openQuickSwitcher, renderAction: renderSearchIcon, title: searchTooltip })) : (jsx_runtime_1.jsx(SidebarCollapserControls_1.SidebarCollapserControl, { side: "left" })), structure.map((s) => {
|
|
130
|
-
|
|
131
|
-
|
|
133
|
+
jsx_runtime_1.jsxs("div", { style: fixedWidthLeft, children: [mobileLayout ? (jsx_runtime_1.jsx(InlineAction_1.InlineAction, { variant: null, onClick: openQuickSwitcher, renderAction: renderSearchIcon, title: searchTooltip })) : (jsx_runtime_1.jsx(SidebarCollapserControls_1.SidebarCollapserControl, { side: "left" })), jsx_runtime_1.jsx("div", { style: menuItems, children: structure.map((s) => {
|
|
134
|
+
return (jsx_runtime_1.jsx(MenuItem_1.MenuItem, { selected: selected === s.id, onItemSelected: itemClicked, onItemHovered: itemHovered, id: s.id, label: s.label, onItemQuit: onItemQuit, menu: s, onPreviousMenu: onPreviousMenu, onNextMenu: onNextMenu, leaveLeftPadding: s.leaveLeftPadding }, s.id));
|
|
135
|
+
}) }), readOnlyStudio || browserStudioOperations ? null : jsx_runtime_1.jsx(UpdateCheck_1.UpdateCheck, {})] }), mobileLayout ? null : jsx_runtime_1.jsx("div", { style: flex }), jsx_runtime_1.jsx(MenuBuildIndicator_1.MenuBuildIndicator, { mobileLayout: mobileLayout }), jsx_runtime_1.jsx("div", { style: flex }), jsx_runtime_1.jsxs("div", { style: fixedWidthRight, children: [canUndoAndRedo ? jsx_runtime_1.jsx(UndoRedoButtons_1.UndoRedoButtons, {}) : null, jsx_runtime_1.jsx(SidebarCollapserControls_1.SidebarCollapserControl, { side: "right" })
|
|
132
136
|
] })
|
|
133
137
|
] }));
|
|
134
138
|
};
|
|
@@ -13,8 +13,8 @@ const modals_1 = require("../state/modals");
|
|
|
13
13
|
const AskAiModal_1 = require("./AskAiModal");
|
|
14
14
|
const ConfirmationDialog_1 = require("./ConfirmationDialog");
|
|
15
15
|
const EffectPickerModal_1 = require("./EffectPickerModal");
|
|
16
|
+
const ElementLibraryModal_1 = require("./ElementLibraryModal");
|
|
16
17
|
const FixComputedValueModal_1 = require("./FixComputedValueModal");
|
|
17
|
-
const InstallPackage_1 = require("./InstallPackage");
|
|
18
18
|
const DeleteComposition_1 = require("./NewComposition/DeleteComposition");
|
|
19
19
|
const DeleteFolder_1 = require("./NewComposition/DeleteFolder");
|
|
20
20
|
const DuplicateComposition_1 = require("./NewComposition/DuplicateComposition");
|
|
@@ -53,10 +53,12 @@ const Modals = ({ readOnlyStudio }) => {
|
|
|
53
53
|
});
|
|
54
54
|
});
|
|
55
55
|
}, [isBrowserStudio, setSelectedModal, subscribeToEvent]);
|
|
56
|
-
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, canvasCapture: modalContextType.canvasCapture })), 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, {})),
|
|
57
|
-
modalContextType &&
|
|
58
|
-
|
|
56
|
+
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, canvasCapture: modalContextType.canvasCapture })), 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 &&
|
|
57
|
+
modalContextType.type === 'settings' &&
|
|
58
|
+
(!isBrowserStudio ||
|
|
59
|
+
modalContextType.initialTab === 'packages' ||
|
|
60
|
+
modalContextType.initialTab === 'shortcuts') ? (jsx_runtime_1.jsx(SettingsModal_1.SettingsModal, { initialTab: modalContextType.initialTab, initialPublicLicenseKey: modalContextType.initialPublicLicenseKey }, `${modalContextType.initialTab}-${modalContextType.initialPublicLicenseKey}`)) : null, modalContextType && modalContextType.type === 'web-render' && (jsx_runtime_1.jsx(WebRenderModal_1.WebRenderModalWithLoader, { ...modalContextType })), modalContextType &&
|
|
59
61
|
modalContextType.type === 'server-render' &&
|
|
60
|
-
(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 === 'fix-computed-value' && (jsx_runtime_1.jsx(FixComputedValueModal_1.FixComputedValueModal, { state: modalContextType })), modalContextType && modalContextType.type === '
|
|
62
|
+
(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 === 'fix-computed-value' && (jsx_runtime_1.jsx(FixComputedValueModal_1.FixComputedValueModal, { state: modalContextType })), modalContextType && modalContextType.type === 'quick-switcher' && (jsx_runtime_1.jsx(QuickSwitcher_1.default, { readOnlyStudio: readOnlyStudio, invocationTimestamp: modalContextType.invocationTimestamp, initialMode: modalContextType.mode, assetSelection: modalContextType.assetSelection, compositionSelection: modalContextType.compositionSelection })), modalContextType && modalContextType.type === 'element-library' && (jsx_runtime_1.jsx(ElementLibraryModal_1.ElementLibraryModal, { name: modalContextType.name, url: modalContextType.url })), 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 })), modalContextType && modalContextType.type === 'svg-import-dialog' && (jsx_runtime_1.jsx(SvgImportDialog_1.SvgImportDialog, { state: modalContextType })), (0, studio_runtime_config_1.getStudioAskAIEnabled)() && jsx_runtime_1.jsx(AskAiModal_1.AskAiModal, {})] }));
|
|
61
63
|
};
|
|
62
64
|
exports.Modals = Modals;
|
|
@@ -9,7 +9,6 @@ export declare const CodemodFooter: React.FC<{
|
|
|
9
9
|
readonly codemod: RecastCodemod;
|
|
10
10
|
readonly stack: string | null;
|
|
11
11
|
readonly loadingNotification: React.ReactNode | null;
|
|
12
|
-
readonly successNotification: React.ReactNode;
|
|
13
12
|
readonly errorNotification: string;
|
|
14
13
|
readonly genericSubmitLabel: string;
|
|
15
14
|
readonly submitLabel: (options: {
|
|
@@ -21,7 +21,7 @@ const CodemodFooterPresentation = ({ codemodStatus, disabled, genericSubmitLabel
|
|
|
21
21
|
] })
|
|
22
22
|
] }));
|
|
23
23
|
};
|
|
24
|
-
const CodemodFooter = ({ codemod, stack, valid, loadingNotification,
|
|
24
|
+
const CodemodFooter = ({ codemod, stack, valid, loadingNotification, errorNotification, genericSubmitLabel, submitLabel, onSuccess, fallbackToRootFile = false, applyCodemod, applyCodemodForPreview, }) => {
|
|
25
25
|
var _a;
|
|
26
26
|
const [submitting, setSubmitting] = (0, react_1.useState)(false);
|
|
27
27
|
const { setSelectedModal } = (0, react_1.useContext)(modals_1.SetSelectedModalContext);
|
|
@@ -52,12 +52,7 @@ const CodemodFooter = ({ codemod, stack, valid, loadingNotification, successNoti
|
|
|
52
52
|
}
|
|
53
53
|
return;
|
|
54
54
|
}
|
|
55
|
-
|
|
56
|
-
notification.replaceContent(successNotification, 2000);
|
|
57
|
-
}
|
|
58
|
-
else {
|
|
59
|
-
(0, NotificationCenter_1.showNotification)(successNotification, 2000);
|
|
60
|
-
}
|
|
55
|
+
notification === null || notification === void 0 ? void 0 : notification.dismiss();
|
|
61
56
|
onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess();
|
|
62
57
|
})
|
|
63
58
|
.catch((err) => {
|
|
@@ -75,7 +70,6 @@ const CodemodFooter = ({ codemod, stack, valid, loadingNotification, successNoti
|
|
|
75
70
|
loadingNotification,
|
|
76
71
|
onSuccess,
|
|
77
72
|
setSelectedModal,
|
|
78
|
-
successNotification,
|
|
79
73
|
symbolicatedStack,
|
|
80
74
|
]);
|
|
81
75
|
const getCanApplyCodemod = (0, react_1.useCallback)(async (signal) => {
|
|
@@ -39,7 +39,7 @@ const DeleteCompositionLoaded = ({ compositionId }) => {
|
|
|
39
39
|
jsx_runtime_1.jsx("br", {}),
|
|
40
40
|
"The associated ",
|
|
41
41
|
jsx_runtime_1.jsx("code", { style: styles_1.inlineCodeSnippet, children: "component" }),
|
|
42
|
-
" will remain in your code."] }), jsx_runtime_1.jsx(ModalFooter_1.ModalFooterContainer, { children: jsx_runtime_1.jsx(CodemodFooter_1.CodemodFooter, { errorNotification: `Could not delete composition`, loadingNotification: 'Deleting',
|
|
42
|
+
" will remain in your code."] }), jsx_runtime_1.jsx(ModalFooter_1.ModalFooterContainer, { children: jsx_runtime_1.jsx(CodemodFooter_1.CodemodFooter, { errorNotification: `Could not delete composition`, loadingNotification: 'Deleting', genericSubmitLabel: `Delete`, submitLabel: ({ relativeRootPath }) => `Delete from ${relativeRootPath}`, codemod: codemod, stack: compositionStack, valid: true, onSuccess: null, applyCodemod: ({ signal, symbolicatedStack }) => (0, actions_1.applyCodemod)({
|
|
43
43
|
codemod,
|
|
44
44
|
dryRun: false,
|
|
45
45
|
signal,
|
|
@@ -33,7 +33,7 @@ const DeleteFolder = ({ folderName, parentName, stack }) => {
|
|
|
33
33
|
jsx_runtime_1.jsxs("div", { style: content, children: ["Do you want to delete the", ' ', jsx_runtime_1.jsx("code", { style: styles_1.inlineCodeSnippet, children: "Folder" }),
|
|
34
34
|
" with ID ", '"', folderId, '"', "?",
|
|
35
35
|
jsx_runtime_1.jsx("br", {}),
|
|
36
|
-
"The compositions and nested folders inside it will stay in your code."] }), jsx_runtime_1.jsx(ModalFooter_1.ModalFooterContainer, { children: jsx_runtime_1.jsx(CodemodFooter_1.CodemodFooter, { errorNotification: `Could not delete folder`, loadingNotification: 'Deleting folder',
|
|
36
|
+
"The compositions and nested folders inside it will stay in your code."] }), jsx_runtime_1.jsx(ModalFooter_1.ModalFooterContainer, { children: jsx_runtime_1.jsx(CodemodFooter_1.CodemodFooter, { errorNotification: `Could not delete folder`, loadingNotification: 'Deleting folder', genericSubmitLabel: `Delete`, submitLabel: ({ relativeRootPath }) => `Delete from ${relativeRootPath}`, codemod: codemod, stack: stack, valid: true, onSuccess: null, applyCodemod: ({ signal, symbolicatedStack }) => (0, actions_1.applyCodemod)({
|
|
37
37
|
codemod,
|
|
38
38
|
dryRun: false,
|
|
39
39
|
signal,
|
|
@@ -203,7 +203,7 @@ const DuplicateCompositionLoaded = ({ initialType }) => {
|
|
|
203
203
|
] })
|
|
204
204
|
] })) : null, type === 'composition' && hadDurationDefined ? (jsx_runtime_1.jsx(NewCompDuration_1.NewCompDuration, { durationInFrames: durationInFrames, setDurationInFrames: setDurationInFrames })) : null, type === 'composition' && hadFpsDefined ? (jsx_runtime_1.jsxs("div", { style: layout_2.optionRow, children: [
|
|
205
205
|
jsx_runtime_1.jsx("div", { style: layout_2.label, children: "FPS" }), jsx_runtime_1.jsx("div", { style: layout_2.rightRow, children: jsx_runtime_1.jsx(InputDragger_1.InputDragger, { type: "number", value: selectedFrameRate, onTextChange: onTextFpsChange, placeholder: "Frame rate (fps)", name: "fps", min: 1, required: true, status: "ok", max: 240, step: 0.01, onValueChange: onFpsChange, rightAlign: false }) })
|
|
206
|
-
] })) : null] }), jsx_runtime_1.jsx(ModalFooter_1.ModalFooterContainer, { children: jsx_runtime_1.jsx(CodemodFooter_1.CodemodFooter, { loadingNotification: 'Duplicating...', errorNotification: 'Could not duplicate composition',
|
|
206
|
+
] })) : null] }), jsx_runtime_1.jsx(ModalFooter_1.ModalFooterContainer, { children: jsx_runtime_1.jsx(CodemodFooter_1.CodemodFooter, { loadingNotification: 'Duplicating...', errorNotification: 'Could not duplicate composition', genericSubmitLabel: 'Duplicate', submitLabel: ({ relativeRootPath }) => `Add to ${relativeRootPath}`, codemod: codemod, stack: compositionStack, valid: valid, onSuccess: onDuplicateSuccess, applyCodemod: ({ signal, symbolicatedStack }) => (0, duplicate_composition_api_1.duplicateComposition)({
|
|
207
207
|
codemod,
|
|
208
208
|
dryRun: false,
|
|
209
209
|
signal,
|
|
@@ -53,6 +53,15 @@ exports.inputDraggerContainerStyle = {
|
|
|
53
53
|
outline: 'none',
|
|
54
54
|
padding: '4px 6px',
|
|
55
55
|
};
|
|
56
|
+
const compactInputDraggerStyle = {
|
|
57
|
+
fontSize: 12,
|
|
58
|
+
lineHeight: '16px',
|
|
59
|
+
padding: '0 6px',
|
|
60
|
+
};
|
|
61
|
+
const compactInputDraggerContainerStyle = {
|
|
62
|
+
...exports.inputDraggerContainerStyle,
|
|
63
|
+
...compactInputDraggerStyle,
|
|
64
|
+
};
|
|
56
65
|
const isInt = (num) => {
|
|
57
66
|
return num % 1 === 0;
|
|
58
67
|
};
|
|
@@ -295,7 +304,7 @@ const deriveInputDraggerValueDiff = ({ dragSensitivity, step, xDistance, }) => {
|
|
|
295
304
|
return (0, remotion_1.interpolate)(xDistance, [-5, -4, 0, 4, 5], [-step * dragSensitivity, 0, 0, 0, step * dragSensitivity]);
|
|
296
305
|
};
|
|
297
306
|
exports.deriveInputDraggerValueDiff = deriveInputDraggerValueDiff;
|
|
298
|
-
const InputDraggerForwardRefFn = ({ onValueChange, onValueChangeEnd, min: _min, max: _max, step: _step, value, onTextChange, formatter = (q) => String(q), formatterStyle, formatterSubtitle, formatterSubtitleStyle, buttonStyle, status, rightAlign, small, allowStepMismatch = false, snapToStep = true, dragDecimalPlaces, dragSensitivity = 1, type: _type, ...props }, ref) => {
|
|
307
|
+
const InputDraggerForwardRefFn = ({ onValueChange, onValueChangeEnd, min: _min, max: _max, step: _step, value, onTextChange, formatter = (q) => String(q), formatterStyle, formatterSubtitle, formatterSubtitleStyle, buttonStyle, style: inputStyle, status, rightAlign, small, allowStepMismatch = false, snapToStep = true, dragDecimalPlaces, dragSensitivity = 1, type: _type, ...props }, ref) => {
|
|
299
308
|
const [inputFallback, setInputFallback] = (0, react_1.useState)(false);
|
|
300
309
|
const [dragging, setDragging] = (0, react_1.useState)(false);
|
|
301
310
|
const fallbackRef = (0, react_1.useRef)(null);
|
|
@@ -314,6 +323,7 @@ const InputDraggerForwardRefFn = ({ onValueChange, onValueChangeEnd, min: _min,
|
|
|
314
323
|
userSelect: 'none',
|
|
315
324
|
WebkitUserSelect: 'none',
|
|
316
325
|
fontSize: small ? 12 : 14,
|
|
326
|
+
lineHeight: small ? '16px' : undefined,
|
|
317
327
|
fontVariantNumeric: 'tabular-nums',
|
|
318
328
|
...formatterStyle,
|
|
319
329
|
}), [dragging, formatterStyle, small]);
|
|
@@ -484,11 +494,24 @@ const InputDraggerForwardRefFn = ({ onValueChange, onValueChangeEnd, min: _min,
|
|
|
484
494
|
}
|
|
485
495
|
}, [inputFallback]);
|
|
486
496
|
if (inputFallback) {
|
|
487
|
-
return (jsx_runtime_1.jsx(z_index_1.HigherZIndex, { onEscape: onEscape, onOutsideClick: noop_1.noop, children: jsx_runtime_1.jsx(RemInput_1.RemotionInput, { ref: fallbackRef, autoFocus: true, onKeyDown: onInputKeyDown, onBlur: onBlur, onChange: onInputChange, min: _min, max: _max, step: validationStep, defaultValue: value, status: status, rightAlign: rightAlign, small: small, ...props,
|
|
497
|
+
return (jsx_runtime_1.jsx(z_index_1.HigherZIndex, { onEscape: onEscape, onOutsideClick: noop_1.noop, children: jsx_runtime_1.jsx(RemInput_1.RemotionInput, { ref: fallbackRef, autoFocus: true, onKeyDown: onInputKeyDown, onBlur: onBlur, onChange: onInputChange, min: _min, max: _max, step: validationStep, defaultValue: value, status: status, rightAlign: rightAlign, small: small, ...props, style: small
|
|
498
|
+
? {
|
|
499
|
+
...compactInputDraggerStyle,
|
|
500
|
+
display: 'block',
|
|
501
|
+
...inputStyle,
|
|
502
|
+
}
|
|
503
|
+
: inputStyle, type: "text" }) }));
|
|
488
504
|
}
|
|
489
505
|
return (jsx_runtime_1.jsxs("button", { ref: ref, type: "button", "aria-label": props['aria-label'], className: '__remotion_input_dragger', style: buttonStyle
|
|
490
|
-
? {
|
|
491
|
-
|
|
506
|
+
? {
|
|
507
|
+
...(small
|
|
508
|
+
? compactInputDraggerContainerStyle
|
|
509
|
+
: exports.inputDraggerContainerStyle),
|
|
510
|
+
...buttonStyle,
|
|
511
|
+
}
|
|
512
|
+
: small
|
|
513
|
+
? compactInputDraggerContainerStyle
|
|
514
|
+
: exports.inputDraggerContainerStyle, onClick: onClick, onFocus: onFocus, onKeyDown: onKeyDown, onPointerDown: onPointerDown, children: [
|
|
492
515
|
jsx_runtime_1.jsx("span", { style: span, children: formatter(value) }), formatterSubtitle ? (jsx_runtime_1.jsx("span", { style: formatterSubtitleStyle, children: formatterSubtitle(value) })) : null] }));
|
|
493
516
|
};
|
|
494
517
|
exports.InputDragger = react_1.default.forwardRef(InputDraggerForwardRefFn);
|
|
@@ -157,7 +157,7 @@ const NewCompositionLoaded = ({ canvasCapture, folderName, parentName, stack })
|
|
|
157
157
|
] }), jsx_runtime_1.jsx(NewCompDuration_1.NewCompDuration, { durationInFrames: durationInFrames, setDurationInFrames: setDurationInFrames }), jsx_runtime_1.jsxs("div", { style: layout_2.optionRow, children: [
|
|
158
158
|
jsx_runtime_1.jsx("div", { style: layout_2.label, children: "FPS" }), jsx_runtime_1.jsx("div", { style: layout_2.rightRow, children: jsx_runtime_1.jsx(InputDragger_1.InputDragger, { type: "number", value: selectedFrameRate, onTextChange: onTextFpsChange, placeholder: "Frame rate (fps)", name: "fps", min: 1, required: true, status: "ok", max: 240, step: 0.01, onValueChange: onFpsChange, rightAlign: false }) })
|
|
159
159
|
] })
|
|
160
|
-
] }), jsx_runtime_1.jsx(ModalFooter_1.ModalFooterContainer, { children: jsx_runtime_1.jsx(CodemodFooter_1.CodemodFooter, { loadingNotification: null, errorNotification: "Could not create composition",
|
|
160
|
+
] }), jsx_runtime_1.jsx(ModalFooter_1.ModalFooterContainer, { children: jsx_runtime_1.jsx(CodemodFooter_1.CodemodFooter, { loadingNotification: null, errorNotification: "Could not create composition", genericSubmitLabel: "Add to root file", submitLabel: ({ relativeRootPath }) => `Add to ${relativeRootPath}`, codemod: codemod, stack: stack, valid: valid, onSuccess: null, applyCodemod: ({ signal, symbolicatedStack }) => createCanvasCaptureComposition({
|
|
161
161
|
signal,
|
|
162
162
|
symbolicatedStack,
|
|
163
163
|
}), applyCodemodForPreview: null, fallbackToRootFile: true }) })
|
|
@@ -4,7 +4,6 @@ exports.NewFolder = void 0;
|
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("react");
|
|
6
6
|
const remotion_1 = require("remotion");
|
|
7
|
-
const get_folder_id_1 = require("../../helpers/get-folder-id");
|
|
8
7
|
const validate_new_folder_name_1 = require("../../helpers/validate-new-folder-name");
|
|
9
8
|
const layout_1 = require("../layout");
|
|
10
9
|
const ModalFooter_1 = require("../ModalFooter");
|
|
@@ -63,7 +62,6 @@ const NewFolder = ({ parentName, stack }) => {
|
|
|
63
62
|
const onSubmit = (0, react_1.useCallback)((e) => {
|
|
64
63
|
e.preventDefault();
|
|
65
64
|
}, []);
|
|
66
|
-
const folderId = (0, get_folder_id_1.getFolderId)({ folderName: newName, parentName });
|
|
67
65
|
return (jsx_runtime_1.jsxs(DismissableModal_1.DismissableModal, { children: [
|
|
68
66
|
jsx_runtime_1.jsx(ModalHeader_1.ModalHeader, { title: "New folder" }), jsx_runtime_1.jsxs("form", { onSubmit: onSubmit, children: [
|
|
69
67
|
jsx_runtime_1.jsxs("div", { style: content, children: [parentName ? (jsx_runtime_1.jsxs("div", { style: layout_2.optionRow, children: [
|
|
@@ -74,7 +72,7 @@ const NewFolder = ({ parentName, stack }) => {
|
|
|
74
72
|
jsx_runtime_1.jsx(layout_1.Spacing, { y: 1, block: true }), jsx_runtime_1.jsx(ValidationMessage_1.ValidationMessage, { align: "flex-start", message: folderNameErrMessage, type: "error" })
|
|
75
73
|
] })) : null] }) })
|
|
76
74
|
] })
|
|
77
|
-
] }), jsx_runtime_1.jsx(ModalFooter_1.ModalFooterContainer, { children: jsx_runtime_1.jsx(CodemodFooter_1.CodemodFooter, { loadingNotification: 'Creating folder...', errorNotification: 'Could not create folder',
|
|
75
|
+
] }), jsx_runtime_1.jsx(ModalFooter_1.ModalFooterContainer, { children: jsx_runtime_1.jsx(CodemodFooter_1.CodemodFooter, { loadingNotification: 'Creating folder...', errorNotification: 'Could not create folder', genericSubmitLabel: 'Add to root file', submitLabel: ({ relativeRootPath }) => `Add to ${relativeRootPath}`, codemod: codemod, stack: stack, valid: valid, onSuccess: null, fallbackToRootFile: true, applyCodemod: ({ signal, symbolicatedStack }) => (0, actions_1.applyCodemod)({
|
|
78
76
|
codemod,
|
|
79
77
|
dryRun: false,
|
|
80
78
|
signal,
|
|
@@ -59,7 +59,7 @@ const RenameCompositionLoaded = () => {
|
|
|
59
59
|
jsx_runtime_1.jsx(RemInput_1.RemotionInput, { ref: inputRef, value: newId, onChange: onNameChange, type: "text", autoFocus: true, placeholder: "Composition ID", status: "ok", rightAlign: true }), compNameErrMessage ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
60
60
|
jsx_runtime_1.jsx(layout_1.Spacing, { y: 1, block: true }), jsx_runtime_1.jsx(ValidationMessage_1.ValidationMessage, { align: "flex-start", message: compNameErrMessage, type: "error" })
|
|
61
61
|
] })) : null] }) })
|
|
62
|
-
] }) }), jsx_runtime_1.jsx(ModalFooter_1.ModalFooterContainer, { children: jsx_runtime_1.jsx(CodemodFooter_1.CodemodFooter, { loadingNotification: 'Renaming...', errorNotification: 'Could not rename composition',
|
|
62
|
+
] }) }), jsx_runtime_1.jsx(ModalFooter_1.ModalFooterContainer, { children: jsx_runtime_1.jsx(CodemodFooter_1.CodemodFooter, { loadingNotification: 'Renaming...', errorNotification: 'Could not rename composition', genericSubmitLabel: 'Rename', submitLabel: ({ relativeRootPath }) => `Modify ${relativeRootPath}`, codemod: codemod, stack: compositionStack, valid: valid, onSuccess: null, applyCodemod: ({ signal, symbolicatedStack }) => renameComposition({
|
|
63
63
|
newCompositionId: newId,
|
|
64
64
|
signal,
|
|
65
65
|
symbolicatedStack,
|
|
@@ -62,7 +62,7 @@ const RenameFolder = ({ folderName, parentName, stack }) => {
|
|
|
62
62
|
jsx_runtime_1.jsx(RemInput_1.RemotionInput, { ref: inputRef, value: newName, onChange: onNameChange, type: "text", autoFocus: true, placeholder: "Folder name", status: "ok", rightAlign: true }), folderNameErrMessage ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
63
63
|
jsx_runtime_1.jsx(layout_1.Spacing, { y: 1, block: true }), jsx_runtime_1.jsx(ValidationMessage_1.ValidationMessage, { align: "flex-start", message: folderNameErrMessage, type: "error" })
|
|
64
64
|
] })) : null] }) })
|
|
65
|
-
] }) }), jsx_runtime_1.jsx(ModalFooter_1.ModalFooterContainer, { children: jsx_runtime_1.jsx(CodemodFooter_1.CodemodFooter, { loadingNotification: 'Renaming folder...', errorNotification: 'Could not rename folder',
|
|
65
|
+
] }) }), jsx_runtime_1.jsx(ModalFooter_1.ModalFooterContainer, { children: jsx_runtime_1.jsx(CodemodFooter_1.CodemodFooter, { loadingNotification: 'Renaming folder...', errorNotification: 'Could not rename folder', genericSubmitLabel: 'Rename', submitLabel: ({ relativeRootPath }) => `Modify ${relativeRootPath}`, codemod: codemod, stack: stack, valid: valid, onSuccess: null, applyCodemod: ({ signal, symbolicatedStack }) => (0, actions_1.applyCodemod)({
|
|
66
66
|
codemod,
|
|
67
67
|
dryRun: false,
|
|
68
68
|
signal,
|
|
@@ -78,7 +78,7 @@ const useRenameStaticFile = ({ relativePath, staticFiles, }) => {
|
|
|
78
78
|
setCanvasContent({ type: 'asset', asset: newRelativePath });
|
|
79
79
|
(0, url_state_1.replaceUrl)(`/assets/${newRelativePath}`);
|
|
80
80
|
}
|
|
81
|
-
notification.
|
|
81
|
+
notification.dismiss();
|
|
82
82
|
return true;
|
|
83
83
|
}
|
|
84
84
|
catch (err) {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
type CreatedNotification = {
|
|
3
|
+
dismiss: () => void;
|
|
3
4
|
replaceContent: (newContent: React.ReactNode, durationInMs: number | null) => void;
|
|
4
5
|
};
|
|
5
6
|
export declare const showNotification: (content: React.ReactNode, durationInMs: number | null) => CreatedNotification;
|
|
@@ -45,6 +45,11 @@ const NotificationCenter = () => {
|
|
|
45
45
|
return [...previousNotifications, notification];
|
|
46
46
|
});
|
|
47
47
|
return {
|
|
48
|
+
dismiss: () => {
|
|
49
|
+
setNotifications((oldNotifications) => {
|
|
50
|
+
return oldNotifications.filter((notificationToFilter) => notificationToFilter.id !== notification.id);
|
|
51
|
+
});
|
|
52
|
+
},
|
|
48
53
|
replaceContent: (newContent, durationInMs) => {
|
|
49
54
|
setNotifications((oldNotifications) => {
|
|
50
55
|
return oldNotifications.map((notificationToMap) => {
|
|
@@ -12,6 +12,7 @@ const NotificationCenter_1 = require("./Notifications/NotificationCenter");
|
|
|
12
12
|
const options_sidebar_tabs_1 = require("./options-sidebar-tabs");
|
|
13
13
|
const deep_equal_1 = require("./RenderModal/SchemaEditor/deep-equal");
|
|
14
14
|
const extract_enum_json_paths_1 = require("./RenderModal/SchemaEditor/extract-enum-json-paths");
|
|
15
|
+
const infer_zod_schema_from_value_1 = require("./RenderModal/SchemaEditor/infer-zod-schema-from-value");
|
|
15
16
|
const SchemaResetButton_1 = require("./RenderModal/SchemaEditor/SchemaResetButton");
|
|
16
17
|
const RenderQueue_1 = require("./RenderQueue");
|
|
17
18
|
const actions_1 = require("./RenderQueue/actions");
|
|
@@ -80,21 +81,17 @@ const OptionsPanel = ({ readOnlyStudio }) => {
|
|
|
80
81
|
const zodTypes = (0, get_zod_if_possible_1.useZodTypesIfPossible)();
|
|
81
82
|
const noComposition = !composition;
|
|
82
83
|
const schema = (0, react_1.useMemo)(() => {
|
|
83
|
-
|
|
84
|
-
return 'no-zod';
|
|
85
|
-
}
|
|
84
|
+
var _a;
|
|
86
85
|
if (noComposition) {
|
|
87
86
|
return 'no-composition';
|
|
88
87
|
}
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
return composition.schema;
|
|
97
|
-
}, [composition === null || composition === void 0 ? void 0 : composition.schema, noComposition, z]);
|
|
88
|
+
return (0, infer_zod_schema_from_value_1.resolveCompositionSchema)({
|
|
89
|
+
explicitSchema: composition.schema,
|
|
90
|
+
defaultProps: (_a = composition.defaultProps) !== null && _a !== void 0 ? _a : {},
|
|
91
|
+
z,
|
|
92
|
+
zodTypes,
|
|
93
|
+
});
|
|
94
|
+
}, [composition, noComposition, z, zodTypes]);
|
|
98
95
|
const currentDefaultProps = (0, react_1.useMemo)(() => {
|
|
99
96
|
var _a, _b;
|
|
100
97
|
if (composition === null) {
|
|
@@ -57,7 +57,7 @@ const PlaybackRateSelector = ({ playbackRate, setPlaybackRate, }) => {
|
|
|
57
57
|
playbackRate,
|
|
58
58
|
setPlaybackRate,
|
|
59
59
|
});
|
|
60
|
-
if (isStill || canvasContent === null
|
|
60
|
+
if (isStill || canvasContent === null) {
|
|
61
61
|
return null;
|
|
62
62
|
}
|
|
63
63
|
return (jsx_runtime_1.jsx(TimelineCombobox_1.TimelineCombobox, { title: accessibilityLabel, labelWidth: 30, selectedId: selectedId, values: items, renderLeftItem: (color) => (jsx_runtime_1.jsx(playback_rate_1.PlaybackRateIcon, { color: color, playbackRate: playbackRate })), unhoveredIconColor: colors_1.WHITE_ALPHA_80 }));
|