@remotion/studio 4.0.518 → 4.0.520
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/visual-control.js +2 -2
- package/dist/components/AppLaunchButton.d.ts +16 -0
- package/dist/components/AppLaunchButton.js +90 -0
- package/dist/components/AssetSelector.js +7 -6
- package/dist/components/AssetSelectorItem.d.ts +12 -0
- package/dist/components/AssetSelectorItem.js +180 -62
- package/dist/components/AudioWaveform.js +6 -1
- package/dist/components/Button.js +20 -7
- package/dist/components/Canvas.js +117 -92
- package/dist/components/CanvasOrLoading.js +7 -7
- package/dist/components/CodingAgentButton.d.ts +7 -0
- package/dist/components/CodingAgentButton.js +59 -0
- package/dist/components/CompositionContextButton.d.ts +1 -0
- package/dist/components/CompositionContextButton.js +6 -3
- package/dist/components/CompositionSelector.js +21 -20
- package/dist/components/CompositionSelectorItem.js +23 -35
- package/dist/components/ConfigureLicenseModal.js +4 -48
- package/dist/components/CurrentAsset.js +1 -1
- package/dist/components/CurrentCompositionSideEffects.js +5 -0
- package/dist/components/ElementInstallConfirmation.d.ts +2 -10
- package/dist/components/ElementInstallConfirmation.js +339 -32
- package/dist/components/FixComputedValueModal.js +5 -131
- package/dist/components/FpsCounter.js +1 -1
- package/dist/components/FramePersistor.js +1 -1
- package/dist/components/InitialCompositionLoader.js +3 -2
- package/dist/components/InspectorOpenInEditor.js +48 -33
- package/dist/components/InspectorPanel/CompositionInspector.js +35 -3
- package/dist/components/InspectorPanel/CompositionInspectorHeader.js +22 -14
- package/dist/components/InspectorPanel/ConnectedCompositionsSection.js +3 -1
- package/dist/components/InspectorPanel/SequenceInspectorHeader.d.ts +1 -1
- package/dist/components/InspectorPanel/SequenceInspectorHeader.js +10 -5
- package/dist/components/InspectorPanel/SequenceSelectionInspector.js +5 -4
- package/dist/components/InspectorPanel/common.js +1 -0
- package/dist/components/InspectorPanel/styles.js +1 -0
- package/dist/components/InspectorPanel/use-composition-actions.js +5 -8
- package/dist/components/InspectorSequenceSection.js +8 -3
- package/dist/components/InspectorSourceLocation.js +5 -1
- package/dist/components/KnownBugs.d.ts +1 -1
- package/dist/components/KnownBugs.js +1 -1
- package/dist/components/LicenseExplanation.d.ts +2 -0
- package/dist/components/LicenseExplanation.js +63 -0
- package/dist/components/MenuToolbar.js +7 -1
- package/dist/components/Modals.js +1 -2
- package/dist/components/NewComposition/InputDragger.js +29 -2
- package/dist/components/NewComposition/NewCompDuration.js +1 -1
- package/dist/components/NewComposition/NewComposition.d.ts +23 -0
- package/dist/components/NewComposition/NewComposition.js +217 -80
- package/dist/components/{UpdateModal/OpenIssueButton.js → OpenIssueButton.js} +1 -1
- package/dist/components/PlayPause.js +2 -13
- package/dist/components/PreviewToolbar.js +1 -1
- package/dist/components/QuickSwitcher/ExplorerQuickSwitcherTrigger.js +2 -1
- package/dist/components/QuickSwitcher/QuickSwitcherContent.js +50 -28
- package/dist/components/QuickSwitcher/QuickSwitcherResult.d.ts +14 -1
- package/dist/components/QuickSwitcher/QuickSwitcherResult.js +64 -9
- package/dist/components/QuickSwitcher/composition-search.d.ts +16 -0
- package/dist/components/QuickSwitcher/composition-search.js +136 -0
- package/dist/components/RenderQueue/actions.d.ts +1 -0
- package/dist/components/RenderQueue/actions.js +5 -1
- package/dist/components/ResetZoomButton.js +17 -2
- package/dist/components/SelectedOutlineCanvasRotation.js +27 -1
- package/dist/components/SelectedOutlineElement.js +12 -31
- package/dist/components/SelectedOutlineKeyboardControls.d.ts +2 -2
- package/dist/components/SelectedOutlineOverlay.d.ts +3 -1
- package/dist/components/SelectedOutlineOverlay.js +21 -26
- package/dist/components/SelectedOutlinePolygon.d.ts +1 -0
- package/dist/components/SelectedOutlinePolygon.js +12 -4
- package/dist/components/SelectedOutlineRenderer.js +88 -21
- package/dist/components/SettingsContext.js +2 -1
- package/dist/components/SettingsModal.d.ts +1 -1
- package/dist/components/SettingsModal.js +19 -3
- package/dist/components/SidebarRenderButton.d.ts +1 -0
- package/dist/components/SidebarRenderButton.js +14 -5
- package/dist/components/Timeline/SequencePropsObserver.js +29 -14
- package/dist/components/Timeline/Timeline.js +2 -1
- package/dist/components/Timeline/TimelineAssetField.js +1 -0
- package/dist/components/Timeline/TimelineDeleteKeybindings.js +5 -90
- package/dist/components/Timeline/TimelineDragHandler.js +18 -8
- package/dist/components/Timeline/TimelineInOutDragHandler.js +2 -3
- package/dist/components/Timeline/TimelineKeyframeControls.js +3 -1
- package/dist/components/Timeline/TimelinePinchZoom.js +14 -4
- package/dist/components/Timeline/TimelinePlayCursorSyncer.js +8 -4
- package/dist/components/Timeline/TimelineRowChrome.js +4 -2
- package/dist/components/Timeline/TimelineSequence.js +52 -45
- package/dist/components/Timeline/TimelineSequenceItem.js +44 -32
- package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.js +3 -3
- package/dist/components/Timeline/TimelineSlider.js +2 -2
- package/dist/components/Timeline/TimelineStack/get-stack.d.ts +1 -0
- package/dist/components/Timeline/TimelineStack/get-stack.js +35 -3
- package/dist/components/Timeline/TimelineWidthProvider.js +15 -8
- package/dist/components/Timeline/TimelineZoomControls.js +25 -8
- package/dist/components/Timeline/delete-selected-timeline-item.js +2 -2
- package/dist/components/Timeline/duplicate-selected-timeline-item.js +23 -25
- package/dist/components/Timeline/get-sequence-context-menu-items.d.ts +6 -0
- package/dist/components/Timeline/get-sequence-context-menu-items.js +34 -1
- package/dist/components/Timeline/sequence-props-subscription-store.d.ts +2 -0
- package/dist/components/Timeline/sequence-props-subscription-store.js +22 -1
- package/dist/components/Timeline/timeline-scroll-logic.d.ts +1 -0
- package/dist/components/Timeline/timeline-scroll-logic.js +21 -17
- package/dist/components/Timeline/use-delete-timeline-items.d.ts +1 -0
- package/dist/components/Timeline/use-delete-timeline-items.js +118 -0
- package/dist/components/Timeline/use-sequence-props-subscription.js +7 -0
- package/dist/components/Timeline/use-timeline-asset-drop.js +8 -14
- package/dist/components/TimelineCombobox.js +1 -0
- package/dist/components/UpdateCheck.d.ts +0 -8
- package/dist/components/UpdateCheck.js +7 -54
- package/dist/components/UpdateStatusContext.d.ts +18 -0
- package/dist/components/UpdateStatusContext.js +74 -0
- package/dist/components/UpdatesSettings.d.ts +2 -0
- package/dist/components/UpdatesSettings.js +251 -0
- package/dist/components/WebMcp.js +64 -11
- package/dist/components/ZoomPersistor.js +2 -2
- package/dist/components/composition-drag-data.d.ts +36 -0
- package/dist/components/composition-drag-data.js +232 -0
- package/dist/components/drop-handler-data.d.ts +2 -1
- package/dist/components/drop-handler-data.js +6 -4
- package/dist/components/effect-drag-and-drop.d.ts +2 -5
- package/dist/components/get-open-in-menu-items.d.ts +4 -0
- package/dist/components/get-open-in-menu-items.js +28 -24
- package/dist/components/handle-drop.js +6 -2
- package/dist/components/import-assets.d.ts +5 -13
- package/dist/components/root-composition-menu-items.d.ts +4 -1
- package/dist/components/root-composition-menu-items.js +38 -1
- package/dist/components/selected-outline-geometry.d.ts +21 -2
- package/dist/components/selected-outline-geometry.js +16 -5
- package/dist/components/selected-outline-measurement.d.ts +40 -1
- package/dist/components/selected-outline-measurement.js +239 -1
- package/dist/components/selected-outline-order.d.ts +12 -0
- package/dist/components/selected-outline-order.js +251 -0
- package/dist/components/selected-outline-types.d.ts +15 -2
- package/dist/components/selected-outline-uv.js +106 -3
- package/dist/components/use-configure-default-apps.d.ts +1 -0
- package/dist/components/use-configure-default-apps.js +24 -0
- package/dist/error-overlay/current-error.d.ts +13 -0
- package/dist/error-overlay/current-error.js +21 -0
- package/dist/error-overlay/remotion-overlay/CodeFrame.js +5 -6
- package/dist/error-overlay/remotion-overlay/CopyStackTrace.js +1 -1
- package/dist/error-overlay/remotion-overlay/ErrorDisplay.js +47 -18
- package/dist/error-overlay/remotion-overlay/ErrorLoader.js +6 -2
- package/dist/error-overlay/remotion-overlay/ErrorTitle.js +5 -4
- package/dist/error-overlay/remotion-overlay/OpenInEditor.js +48 -76
- package/dist/error-overlay/remotion-overlay/SearchGitHubIssues.js +1 -1
- package/dist/error-overlay/remotion-overlay/ShortcutHint.js +2 -2
- package/dist/error-overlay/remotion-overlay/StackFrame.js +13 -8
- package/dist/error-overlay/remotion-overlay/Symbolicating.js +1 -1
- package/dist/esm/chunk-6jf1natv.js +25 -0
- package/dist/esm/{chunk-4bxz1d3g.js → chunk-je0h1bgt.js} +1 -28
- package/dist/esm/chunk-m0jqdbkr.js +14571 -0
- package/dist/esm/{chunk-7prjt5n5.js → chunk-np6q13k5.js} +18637 -12189
- package/dist/esm/index.mjs +4 -3
- package/dist/esm/internals.mjs +35826 -14822
- package/dist/esm/previewEntry.mjs +40028 -18935
- package/dist/esm/renderEntry.mjs +6 -3
- package/dist/helpers/can-show-updates.d.ts +5 -0
- package/dist/helpers/can-show-updates.js +7 -0
- package/dist/helpers/colors.d.ts +0 -3
- package/dist/helpers/colors.js +2 -5
- package/dist/helpers/create-folder-tree.d.ts +5 -0
- package/dist/helpers/create-folder-tree.js +26 -6
- package/dist/helpers/document-title.d.ts +2 -0
- package/dist/helpers/document-title.js +14 -3
- package/dist/helpers/get-asset-metadata.js +1 -1
- package/dist/helpers/get-box-quads-polyfill-internals.d.ts +82 -0
- package/dist/helpers/get-box-quads-polyfill-internals.js +2403 -0
- package/dist/helpers/get-box-quads-ponyfill.d.ts +10 -0
- package/dist/helpers/get-box-quads-ponyfill.js +23 -0
- package/dist/helpers/get-git-menu-item.d.ts +5 -0
- package/dist/helpers/get-git-menu-item.js +15 -1
- package/dist/helpers/get-timeline-max-zoom.d.ts +34 -28
- package/dist/helpers/get-timeline-max-zoom.js +46 -29
- package/dist/helpers/hoverable.js +10 -5
- package/dist/helpers/install-fiber-sequence-order-observer.d.ts +37 -0
- package/dist/helpers/install-fiber-sequence-order-observer.js +109 -0
- package/dist/helpers/open-in-editor.js +53 -2
- package/dist/helpers/preview-server-events.js +3 -0
- package/dist/helpers/timeline-layout.d.ts +0 -1
- package/dist/helpers/timeline-layout.js +1 -5
- package/dist/helpers/url-state.d.ts +1 -0
- package/dist/helpers/url-state.js +12 -5
- package/dist/helpers/use-runtime-values.d.ts +1 -1
- package/dist/helpers/use-runtime-values.js +5 -4
- package/dist/helpers/use-sync-external-store.d.ts +3 -0
- package/dist/helpers/use-sync-external-store.js +5 -0
- package/dist/previewEntry.js +2 -0
- package/dist/renderEntry.js +2 -0
- package/dist/state/folders.d.ts +3 -0
- package/dist/state/folders.js +40 -1
- package/dist/state/modals.d.ts +19 -8
- package/dist/state/timeline-sequence-hover.js +3 -2
- package/dist/state/timeline-zoom.d.ts +0 -1
- package/dist/state/timeline-zoom.js +13 -6
- package/package.json +18 -15
- package/dist/components/UpdateModal/UpdateModal.d.ts +0 -6
- package/dist/components/UpdateModal/UpdateModal.js +0 -104
- package/dist/helpers/sort-by-nonce-history.d.ts +0 -1
- package/dist/helpers/sort-by-nonce-history.js +0 -6
- /package/dist/components/{UpdateModal/OpenIssueButton.d.ts → OpenIssueButton.d.ts} +0 -0
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LicenseExplanation = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const colors_1 = require("../helpers/colors");
|
|
6
|
+
const description = {
|
|
7
|
+
color: colors_1.LIGHT_TEXT,
|
|
8
|
+
fontFamily: 'sans-serif',
|
|
9
|
+
fontSize: 14,
|
|
10
|
+
lineHeight: 1.5,
|
|
11
|
+
margin: 0,
|
|
12
|
+
};
|
|
13
|
+
const descriptionLink = {
|
|
14
|
+
color: colors_1.LIGHT_TEXT,
|
|
15
|
+
fontFamily: 'sans-serif',
|
|
16
|
+
fontSize: 14,
|
|
17
|
+
lineHeight: '21px',
|
|
18
|
+
};
|
|
19
|
+
const licenseExplanation = {
|
|
20
|
+
display: 'flex',
|
|
21
|
+
flexDirection: 'column',
|
|
22
|
+
gap: 12,
|
|
23
|
+
};
|
|
24
|
+
const licenseExplanationRow = {
|
|
25
|
+
display: 'flex',
|
|
26
|
+
alignItems: 'center',
|
|
27
|
+
gap: 12,
|
|
28
|
+
};
|
|
29
|
+
const people = {
|
|
30
|
+
display: 'grid',
|
|
31
|
+
gridTemplateColumns: 'repeat(4, 9px)',
|
|
32
|
+
gap: 3,
|
|
33
|
+
flexShrink: 0,
|
|
34
|
+
};
|
|
35
|
+
const person = {
|
|
36
|
+
display: 'block',
|
|
37
|
+
height: 24,
|
|
38
|
+
overflow: 'visible',
|
|
39
|
+
width: 9,
|
|
40
|
+
};
|
|
41
|
+
const PersonIcon = ({ handsUp, opacity }) => {
|
|
42
|
+
return (jsx_runtime_1.jsxs("svg", { "aria-hidden": "true", opacity: opacity, style: person, viewBox: "0 0 192 512", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
43
|
+
jsx_runtime_1.jsx("path", { fill: colors_1.LIGHT_TEXT, d: "M128 64a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zM32 64A64 64 0 1 1 160 64 64 64 0 1 1 32 64zm0 128l0 128 128 0 0-128-128 0zM0 160l192 0 0 192-32 0 0 160-32 0 0-160-64 0 0 160-32 0 0-160-32 0 0-192z" }), handsUp ? (jsx_runtime_1.jsx("path", { d: "M10.667 192 0 -32 M181.333 192 192 -32", fill: "none", stroke: colors_1.LIGHT_TEXT, strokeWidth: "32" })) : null] }));
|
|
44
|
+
};
|
|
45
|
+
const LicenseExplanation = () => {
|
|
46
|
+
return (jsx_runtime_1.jsxs("div", { style: licenseExplanation, children: [
|
|
47
|
+
jsx_runtime_1.jsxs("div", { style: licenseExplanationRow, children: [
|
|
48
|
+
jsx_runtime_1.jsxs("div", { style: people, children: [
|
|
49
|
+
jsx_runtime_1.jsx(PersonIcon, { handsUp: true, opacity: 1 }), jsx_runtime_1.jsx(PersonIcon, { handsUp: true, opacity: 1 }), jsx_runtime_1.jsx(PersonIcon, { handsUp: true, opacity: 1 })
|
|
50
|
+
] }), jsx_runtime_1.jsx("p", { style: description, children: "Remotion is free to use if you are an individual or company of 3 or less." })
|
|
51
|
+
] }), jsx_runtime_1.jsxs("div", { style: licenseExplanationRow, children: [
|
|
52
|
+
jsx_runtime_1.jsxs("div", { style: people, children: [
|
|
53
|
+
jsx_runtime_1.jsx(PersonIcon, { handsUp: false, opacity: 1 }), jsx_runtime_1.jsx(PersonIcon, { handsUp: false, opacity: 1 }), jsx_runtime_1.jsx(PersonIcon, { handsUp: false, opacity: 1 }), jsx_runtime_1.jsx(PersonIcon, { handsUp: false, opacity: 1 })
|
|
54
|
+
] }), jsx_runtime_1.jsxs("p", { style: description, children: ["If used in an organization with 4+ people, you need a", ' ', jsx_runtime_1.jsx("a", { style: descriptionLink, href: "https://remotion.pro/license", children: "Company License" }),
|
|
55
|
+
"."] })
|
|
56
|
+
] }), jsx_runtime_1.jsxs("div", { style: licenseExplanationRow, children: [
|
|
57
|
+
jsx_runtime_1.jsxs("div", { style: people, children: [
|
|
58
|
+
jsx_runtime_1.jsx(PersonIcon, { handsUp: false, opacity: 1 }), jsx_runtime_1.jsx(PersonIcon, { handsUp: false, opacity: 0.3 }), jsx_runtime_1.jsx(PersonIcon, { handsUp: false, opacity: 0.3 }), jsx_runtime_1.jsx(PersonIcon, { handsUp: false, opacity: 0.3 })
|
|
59
|
+
] }), jsx_runtime_1.jsx("p", { style: description, children: "The total headcount matters, not the amount of people using Remotion." })
|
|
60
|
+
] })
|
|
61
|
+
] }));
|
|
62
|
+
};
|
|
63
|
+
exports.LicenseExplanation = LicenseExplanation;
|
|
@@ -5,6 +5,7 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
5
5
|
const react_1 = require("react");
|
|
6
6
|
const ShortcutHint_1 = require("../error-overlay/remotion-overlay/ShortcutHint");
|
|
7
7
|
const browser_studio_operations_1 = require("../helpers/browser-studio-operations");
|
|
8
|
+
const can_show_updates_1 = require("../helpers/can-show-updates");
|
|
8
9
|
const client_id_1 = require("../helpers/client-id");
|
|
9
10
|
const colors_1 = require("../helpers/colors");
|
|
10
11
|
const mobile_layout_1 = require("../helpers/mobile-layout");
|
|
@@ -48,6 +49,11 @@ const MenuToolbar = ({ readOnlyStudio }) => {
|
|
|
48
49
|
const canUndoAndRedo = !readOnlyStudio ||
|
|
49
50
|
(previewServerState.type === 'connected' &&
|
|
50
51
|
browserStudioOperations !== null);
|
|
52
|
+
const showUpdates = (0, can_show_updates_1.canShowUpdates)({
|
|
53
|
+
connectionStatus: previewServerState.type,
|
|
54
|
+
isBrowserStudio: browserStudioOperations !== null,
|
|
55
|
+
readOnlyStudio,
|
|
56
|
+
});
|
|
51
57
|
const mobileLayout = (0, mobile_layout_1.useMobileLayout)();
|
|
52
58
|
const fixedWidthRight = (0, react_1.useMemo)(() => {
|
|
53
59
|
return {
|
|
@@ -132,7 +138,7 @@ const MenuToolbar = ({ readOnlyStudio }) => {
|
|
|
132
138
|
return (jsx_runtime_1.jsxs(layout_1.Row, { align: "center", className: "css-reset", style: row, onPointerDown: onPointerDown, children: [
|
|
133
139
|
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
140
|
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
|
-
}) }),
|
|
141
|
+
}) }), showUpdates ? jsx_runtime_1.jsx(UpdateCheck_1.UpdateCheck, {}) : null] }), 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" })
|
|
136
142
|
] })
|
|
137
143
|
] }));
|
|
138
144
|
};
|
|
@@ -33,7 +33,6 @@ const ServerRenderModal_1 = require("./RenderModal/ServerRenderModal");
|
|
|
33
33
|
const WebRenderModal_1 = require("./RenderModal/WebRenderModal");
|
|
34
34
|
const SettingsModal_1 = require("./SettingsModal");
|
|
35
35
|
const SvgImportDialog_1 = require("./SvgImportDialog");
|
|
36
|
-
const UpdateModal_1 = require("./UpdateModal/UpdateModal");
|
|
37
36
|
const Modals = ({ readOnlyStudio }) => {
|
|
38
37
|
var _a;
|
|
39
38
|
const modalContextType = (0, react_1.useContext)(modals_1.SelectedModalContext);
|
|
@@ -108,6 +107,6 @@ const Modals = ({ readOnlyStudio }) => {
|
|
|
108
107
|
modalContextType.initialTab === 'packages' ||
|
|
109
108
|
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 &&
|
|
110
109
|
modalContextType.type === 'server-render' &&
|
|
111
|
-
(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 === '
|
|
110
|
+
(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 === '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 === 'element-install' && (jsx_runtime_1.jsx(ElementInstallConfirmation_1.ElementInstallConfirmation, { state: modalContextType })), 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, {})] }));
|
|
112
111
|
};
|
|
113
112
|
exports.Modals = Modals;
|
|
@@ -62,6 +62,26 @@ const compactInputDraggerContainerStyle = {
|
|
|
62
62
|
...exports.inputDraggerContainerStyle,
|
|
63
63
|
...compactInputDraggerStyle,
|
|
64
64
|
};
|
|
65
|
+
let activateInputDraggerOnNextFocus = false;
|
|
66
|
+
const clearInputDraggerActivationRequest = () => {
|
|
67
|
+
// Let the receiving dragger's React onFocus handler consume the request first.
|
|
68
|
+
setTimeout(() => {
|
|
69
|
+
activateInputDraggerOnNextFocus = false;
|
|
70
|
+
}, 0);
|
|
71
|
+
document.removeEventListener('focusin', clearInputDraggerActivationRequest, true);
|
|
72
|
+
};
|
|
73
|
+
const requestInputDraggerActivationOnNextFocus = () => {
|
|
74
|
+
activateInputDraggerOnNextFocus = true;
|
|
75
|
+
document.addEventListener('focusin', clearInputDraggerActivationRequest, true);
|
|
76
|
+
};
|
|
77
|
+
const consumeInputDraggerActivationRequest = () => {
|
|
78
|
+
if (!activateInputDraggerOnNextFocus) {
|
|
79
|
+
return false;
|
|
80
|
+
}
|
|
81
|
+
activateInputDraggerOnNextFocus = false;
|
|
82
|
+
document.removeEventListener('focusin', clearInputDraggerActivationRequest, true);
|
|
83
|
+
return true;
|
|
84
|
+
};
|
|
65
85
|
const isInt = (num) => {
|
|
66
86
|
return num % 1 === 0;
|
|
67
87
|
};
|
|
@@ -328,10 +348,13 @@ const InputDraggerForwardRefFn = ({ onValueChange, onValueChangeEnd, min: _min,
|
|
|
328
348
|
...formatterStyle,
|
|
329
349
|
}), [dragging, formatterStyle, small]);
|
|
330
350
|
const onFocus = (0, react_1.useCallback)(() => {
|
|
331
|
-
if (
|
|
351
|
+
if (pointerDownRef.current) {
|
|
332
352
|
return;
|
|
333
353
|
}
|
|
334
|
-
|
|
354
|
+
const wasActivatedByInputDragger = consumeInputDraggerActivationRequest();
|
|
355
|
+
if (small || wasActivatedByInputDragger) {
|
|
356
|
+
setInputFallback(true);
|
|
357
|
+
}
|
|
335
358
|
}, [small]);
|
|
336
359
|
const onClick = (0, react_1.useCallback)((e) => {
|
|
337
360
|
if (!(0, input_dragger_click_lock_1.getClickLock)()) {
|
|
@@ -392,6 +415,10 @@ const InputDraggerForwardRefFn = ({ onValueChange, onValueChangeEnd, min: _min,
|
|
|
392
415
|
}, [_max, _min, onEscape, onValueChangeEnd, validationStep]);
|
|
393
416
|
const onInputKeyDown = (0, react_1.useCallback)((e) => {
|
|
394
417
|
var _a;
|
|
418
|
+
if (e.key === 'Tab') {
|
|
419
|
+
requestInputDraggerActivationOnNextFocus();
|
|
420
|
+
return;
|
|
421
|
+
}
|
|
395
422
|
if (e.key === 'Enter') {
|
|
396
423
|
(_a = fallbackRef.current) === null || _a === void 0 ? void 0 : _a.blur();
|
|
397
424
|
return;
|
|
@@ -19,7 +19,7 @@ const NewCompDuration = ({ durationInFrames, setDurationInFrames }) => {
|
|
|
19
19
|
const compDurationErrMessage = (0, validate_new_comp_data_1.validateCompositionDuration)(durationInFrames);
|
|
20
20
|
return (jsx_runtime_1.jsxs("div", { style: layout_2.optionRow, children: [
|
|
21
21
|
jsx_runtime_1.jsx("div", { style: layout_2.label, children: "Duration in frames" }), jsx_runtime_1.jsx("div", { style: layout_2.rightRow, children: jsx_runtime_1.jsxs(InputAndValidationContainer_1.InputAndValidationContainer, { children: [
|
|
22
|
-
jsx_runtime_1.jsx(InputDragger_1.InputDragger, { type: "number", value: durationInFrames, onTextChange: onDurationInFramesChanged, placeholder: "Duration (frames)", name: "durationInFrames", min: 1, step: 1, required: true, status: "ok",
|
|
22
|
+
jsx_runtime_1.jsx(InputDragger_1.InputDragger, { "aria-label": "Duration in frames", type: "number", value: durationInFrames, onTextChange: onDurationInFramesChanged, placeholder: "Duration (frames)", name: "durationInFrames", min: 1, step: 1, required: true, status: "ok",
|
|
23
23
|
// Hitting Promise.all() limit in Chrome
|
|
24
24
|
max: 300000, onValueChange: onDurationChangedDirectly, rightAlign: false }), compDurationErrMessage ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
25
25
|
jsx_runtime_1.jsx(layout_1.Spacing, { y: 1, block: true }), jsx_runtime_1.jsx(ValidationMessage_1.ValidationMessage, { align: "flex-start", message: compDurationErrMessage, type: "error" })
|
|
@@ -1,5 +1,28 @@
|
|
|
1
|
+
import type { Dispatch, RefObject, SetStateAction } from 'react';
|
|
1
2
|
import React from 'react';
|
|
2
3
|
import type { CanvasCaptureImport } from '../../state/modals';
|
|
4
|
+
export type NewCompositionFormValues = {
|
|
5
|
+
readonly durationInFrames: number;
|
|
6
|
+
readonly folder: {
|
|
7
|
+
readonly folderName: string | null;
|
|
8
|
+
readonly parentName: string | null;
|
|
9
|
+
readonly stack: string | null;
|
|
10
|
+
};
|
|
11
|
+
readonly fps: number;
|
|
12
|
+
readonly id: string;
|
|
13
|
+
readonly size: {
|
|
14
|
+
readonly height: number;
|
|
15
|
+
readonly width: number;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
export declare const NewCompositionFields: React.FC<{
|
|
19
|
+
readonly heightValidationMessage: string | null;
|
|
20
|
+
readonly inputRef: RefObject<HTMLInputElement | null>;
|
|
21
|
+
readonly nameValidationMessage: string | null;
|
|
22
|
+
readonly setValues: Dispatch<SetStateAction<NewCompositionFormValues>>;
|
|
23
|
+
readonly values: NewCompositionFormValues;
|
|
24
|
+
readonly widthValidationMessage: string | null;
|
|
25
|
+
}>;
|
|
3
26
|
export declare const NewComposition: React.FC<{
|
|
4
27
|
readonly folderName: string | null;
|
|
5
28
|
readonly parentName: string | null;
|
|
@@ -1,18 +1,25 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.NewComposition = void 0;
|
|
3
|
+
exports.NewComposition = exports.NewCompositionFields = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const canvas_1 = require("@remotion/canvas");
|
|
5
6
|
const react_1 = require("react");
|
|
6
7
|
const remotion_1 = require("remotion");
|
|
7
8
|
const get_static_files_1 = require("../../api/get-static-files");
|
|
8
9
|
const write_static_file_1 = require("../../api/write-static-file");
|
|
10
|
+
const colors_1 = require("../../helpers/colors");
|
|
11
|
+
const get_folder_id_1 = require("../../helpers/get-folder-id");
|
|
9
12
|
const install_required_package_1 = require("../../helpers/install-required-package");
|
|
10
13
|
const use_create_composition_1 = require("../../helpers/use-create-composition");
|
|
14
|
+
const Checkmark_1 = require("../../icons/Checkmark");
|
|
15
|
+
const folder_1 = require("../../icons/folder");
|
|
16
|
+
const folders_1 = require("../../state/folders");
|
|
11
17
|
const layout_1 = require("../layout");
|
|
12
18
|
const ModalFooter_1 = require("../ModalFooter");
|
|
13
19
|
const ModalHeader_1 = require("../ModalHeader");
|
|
14
20
|
const layout_2 = require("../RenderModal/layout");
|
|
15
21
|
const CodemodFooter_1 = require("./CodemodFooter");
|
|
22
|
+
const ComboBox_1 = require("./ComboBox");
|
|
16
23
|
const DismissableModal_1 = require("./DismissableModal");
|
|
17
24
|
const get_new_composition_defaults_1 = require("./get-new-composition-defaults");
|
|
18
25
|
const InputAndValidationContainer_1 = require("./InputAndValidationContainer");
|
|
@@ -27,9 +34,198 @@ const content = {
|
|
|
27
34
|
fontSize: 13,
|
|
28
35
|
minWidth: 500,
|
|
29
36
|
};
|
|
30
|
-
const
|
|
31
|
-
|
|
37
|
+
const folderSelectStyle = {
|
|
38
|
+
boxSizing: 'border-box',
|
|
39
|
+
width: 250,
|
|
32
40
|
};
|
|
41
|
+
const folderIconStyle = {
|
|
42
|
+
flexShrink: 0,
|
|
43
|
+
height: 16,
|
|
44
|
+
width: 16,
|
|
45
|
+
};
|
|
46
|
+
const folderLabelStyle = {
|
|
47
|
+
alignItems: 'center',
|
|
48
|
+
color: 'inherit',
|
|
49
|
+
display: 'flex',
|
|
50
|
+
fontFamily: 'inherit',
|
|
51
|
+
fontSize: 'inherit',
|
|
52
|
+
lineHeight: 'normal',
|
|
53
|
+
minWidth: 0,
|
|
54
|
+
};
|
|
55
|
+
const folderLabelTextStyle = {
|
|
56
|
+
color: 'inherit',
|
|
57
|
+
fontFamily: 'inherit',
|
|
58
|
+
fontSize: 'inherit',
|
|
59
|
+
lineHeight: 'normal',
|
|
60
|
+
overflow: 'hidden',
|
|
61
|
+
textOverflow: 'ellipsis',
|
|
62
|
+
whiteSpace: 'nowrap',
|
|
63
|
+
};
|
|
64
|
+
const FolderDropdownLabel = ({ folderPath, indentation }) => {
|
|
65
|
+
return (jsx_runtime_1.jsxs("div", { style: folderLabelStyle, children: [
|
|
66
|
+
jsx_runtime_1.jsx(layout_1.Spacing, { x: indentation * 1.5 }), folderPath === null ? (jsx_runtime_1.jsx("div", { style: folderIconStyle })) : (jsx_runtime_1.jsx(folder_1.CollapsedFolderIcon, { color: colors_1.LIGHT_TEXT, style: folderIconStyle })), jsx_runtime_1.jsx(layout_1.Spacing, { x: 1 }), jsx_runtime_1.jsx("span", { style: folderLabelTextStyle, children: folderPath !== null && folderPath !== void 0 ? folderPath : 'None' })
|
|
67
|
+
] }));
|
|
68
|
+
};
|
|
69
|
+
const rootFolderId = 'new-composition-root-folder';
|
|
70
|
+
const folderSelectIdPrefix = 'new-composition-folder-';
|
|
71
|
+
const NewCompositionFields = ({ heightValidationMessage, inputRef, nameValidationMessage, setValues, values, widthValidationMessage, }) => {
|
|
72
|
+
const { folders } = (0, react_1.useContext)(remotion_1.Internals.CompositionManager);
|
|
73
|
+
const { compositionSortOrder } = (0, react_1.useContext)(folders_1.FolderContext);
|
|
74
|
+
const selectedFolderId = values.folder.folderName
|
|
75
|
+
? `${folderSelectIdPrefix}${(0, get_folder_id_1.getFolderId)({
|
|
76
|
+
folderName: values.folder.folderName,
|
|
77
|
+
parentName: values.folder.parentName,
|
|
78
|
+
})}`
|
|
79
|
+
: rootFolderId;
|
|
80
|
+
const folderValues = (0, react_1.useMemo)(() => {
|
|
81
|
+
const foldersInTreeOrder = [];
|
|
82
|
+
const sortedFolders = compositionSortOrder === 'alphabetical'
|
|
83
|
+
? folders
|
|
84
|
+
.slice()
|
|
85
|
+
.sort((a, b) => a.name.localeCompare(b.name, undefined, { numeric: true }))
|
|
86
|
+
: (0, canvas_1.sortItemsByCommitOrder)(folders, (folder) => folder.order);
|
|
87
|
+
const appendFolders = (parent) => {
|
|
88
|
+
sortedFolders
|
|
89
|
+
.filter((folder) => folder.parent === parent)
|
|
90
|
+
.forEach((folder) => {
|
|
91
|
+
foldersInTreeOrder.push(folder);
|
|
92
|
+
appendFolders((0, get_folder_id_1.getFolderId)({ folderName: folder.name, parentName: folder.parent }));
|
|
93
|
+
});
|
|
94
|
+
};
|
|
95
|
+
appendFolders(null);
|
|
96
|
+
return [
|
|
97
|
+
{
|
|
98
|
+
id: rootFolderId,
|
|
99
|
+
keyHint: null,
|
|
100
|
+
label: jsx_runtime_1.jsx(FolderDropdownLabel, { folderPath: null, indentation: 0 }),
|
|
101
|
+
leftItem: values.folder.folderName === null ? jsx_runtime_1.jsx(Checkmark_1.Checkmark, {}) : null,
|
|
102
|
+
onClick: () => {
|
|
103
|
+
setValues((current) => ({
|
|
104
|
+
...current,
|
|
105
|
+
folder: {
|
|
106
|
+
folderName: null,
|
|
107
|
+
parentName: null,
|
|
108
|
+
stack: null,
|
|
109
|
+
},
|
|
110
|
+
}));
|
|
111
|
+
},
|
|
112
|
+
quickSwitcherLabel: 'None',
|
|
113
|
+
subMenu: null,
|
|
114
|
+
type: 'item',
|
|
115
|
+
value: rootFolderId,
|
|
116
|
+
},
|
|
117
|
+
...(folders.length === 0
|
|
118
|
+
? []
|
|
119
|
+
: [
|
|
120
|
+
{
|
|
121
|
+
id: 'new-composition-root-folder-divider',
|
|
122
|
+
type: 'divider',
|
|
123
|
+
},
|
|
124
|
+
]),
|
|
125
|
+
...foldersInTreeOrder.map((folder) => {
|
|
126
|
+
var _a;
|
|
127
|
+
var _b;
|
|
128
|
+
const folderPath = (0, get_folder_id_1.getFolderId)({
|
|
129
|
+
folderName: folder.name,
|
|
130
|
+
parentName: folder.parent,
|
|
131
|
+
});
|
|
132
|
+
const indentation = (_b = (_a = folder.parent) === null || _a === void 0 ? void 0 : _a.split('/').length) !== null && _b !== void 0 ? _b : 0;
|
|
133
|
+
const id = `${folderSelectIdPrefix}${folderPath}`;
|
|
134
|
+
return {
|
|
135
|
+
id,
|
|
136
|
+
keyHint: null,
|
|
137
|
+
label: (jsx_runtime_1.jsx(FolderDropdownLabel, { folderPath: folderPath, indentation: indentation })),
|
|
138
|
+
leftItem: selectedFolderId === id ? jsx_runtime_1.jsx(Checkmark_1.Checkmark, {}) : null,
|
|
139
|
+
onClick: () => {
|
|
140
|
+
setValues((current) => ({
|
|
141
|
+
...current,
|
|
142
|
+
folder: {
|
|
143
|
+
folderName: folder.name,
|
|
144
|
+
parentName: folder.parent,
|
|
145
|
+
stack: folder.stack,
|
|
146
|
+
},
|
|
147
|
+
}));
|
|
148
|
+
},
|
|
149
|
+
quickSwitcherLabel: folderPath,
|
|
150
|
+
subMenu: null,
|
|
151
|
+
type: 'item',
|
|
152
|
+
value: id,
|
|
153
|
+
disabled: folder.stack === null,
|
|
154
|
+
};
|
|
155
|
+
}),
|
|
156
|
+
];
|
|
157
|
+
}, [
|
|
158
|
+
compositionSortOrder,
|
|
159
|
+
folders,
|
|
160
|
+
selectedFolderId,
|
|
161
|
+
setValues,
|
|
162
|
+
values.folder.folderName,
|
|
163
|
+
]);
|
|
164
|
+
const onWidthChanged = (0, react_1.useCallback)((newValue) => {
|
|
165
|
+
setValues((current) => ({
|
|
166
|
+
...current,
|
|
167
|
+
size: { height: current.size.height, width: Number(newValue) },
|
|
168
|
+
}));
|
|
169
|
+
}, [setValues]);
|
|
170
|
+
const onWidthDirectlyChanged = (0, react_1.useCallback)((newWidth) => {
|
|
171
|
+
setValues((current) => ({
|
|
172
|
+
...current,
|
|
173
|
+
size: { height: current.size.height, width: newWidth },
|
|
174
|
+
}));
|
|
175
|
+
}, [setValues]);
|
|
176
|
+
const onHeightChanged = (0, react_1.useCallback)((newValue) => {
|
|
177
|
+
setValues((current) => ({
|
|
178
|
+
...current,
|
|
179
|
+
size: { height: Number(newValue), width: current.size.width },
|
|
180
|
+
}));
|
|
181
|
+
}, [setValues]);
|
|
182
|
+
const onHeightDirectlyChanged = (0, react_1.useCallback)((newHeight) => {
|
|
183
|
+
setValues((current) => ({
|
|
184
|
+
...current,
|
|
185
|
+
size: { height: newHeight, width: current.size.width },
|
|
186
|
+
}));
|
|
187
|
+
}, [setValues]);
|
|
188
|
+
const onNameChange = (0, react_1.useCallback)((event) => {
|
|
189
|
+
setValues((current) => ({ ...current, id: event.target.value }));
|
|
190
|
+
}, [setValues]);
|
|
191
|
+
const onTextFpsChange = (0, react_1.useCallback)((newFps) => {
|
|
192
|
+
setValues((current) => ({ ...current, fps: Number(newFps) }));
|
|
193
|
+
}, [setValues]);
|
|
194
|
+
const onFpsChange = (0, react_1.useCallback)((newFps) => {
|
|
195
|
+
setValues((current) => ({ ...current, fps: newFps }));
|
|
196
|
+
}, [setValues]);
|
|
197
|
+
const setDurationInFrames = (0, react_1.useCallback)((update) => {
|
|
198
|
+
setValues((current) => ({
|
|
199
|
+
...current,
|
|
200
|
+
durationInFrames: typeof update === 'function'
|
|
201
|
+
? update(current.durationInFrames)
|
|
202
|
+
: update,
|
|
203
|
+
}));
|
|
204
|
+
}, [setValues]);
|
|
205
|
+
return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
206
|
+
jsx_runtime_1.jsxs("div", { style: layout_2.optionRow, children: [
|
|
207
|
+
jsx_runtime_1.jsx("div", { style: layout_2.label, children: "Folder" }), jsx_runtime_1.jsx("div", { style: layout_2.rightRow, children: jsx_runtime_1.jsx(ComboBox_1.Combobox, { values: folderValues, selectedId: selectedFolderId, style: folderSelectStyle, title: "Folder" }) })
|
|
208
|
+
] }), jsx_runtime_1.jsxs("div", { style: layout_2.optionRow, children: [
|
|
209
|
+
jsx_runtime_1.jsx("div", { style: layout_2.label, children: "ID" }), jsx_runtime_1.jsx("div", { style: layout_2.rightRow, children: jsx_runtime_1.jsxs(InputAndValidationContainer_1.InputAndValidationContainer, { children: [
|
|
210
|
+
jsx_runtime_1.jsx(RemInput_1.RemotionInput, { ref: inputRef, value: values.id, onChange: onNameChange, type: "text", autoFocus: true, placeholder: "Composition ID", status: "ok", rightAlign: true }), nameValidationMessage ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
211
|
+
jsx_runtime_1.jsx(layout_1.Spacing, { y: 1, block: true }), jsx_runtime_1.jsx(ValidationMessage_1.ValidationMessage, { align: "flex-start", message: nameValidationMessage, type: "error" })
|
|
212
|
+
] })) : null] }) })
|
|
213
|
+
] }), jsx_runtime_1.jsxs("div", { style: layout_2.optionRow, children: [
|
|
214
|
+
jsx_runtime_1.jsx("div", { style: layout_2.label, children: "Width" }), jsx_runtime_1.jsx("div", { style: layout_2.rightRow, children: jsx_runtime_1.jsxs(InputAndValidationContainer_1.InputAndValidationContainer, { children: [
|
|
215
|
+
jsx_runtime_1.jsx(InputDragger_1.InputDragger, { "aria-label": "Width", type: "number", value: values.size.width, placeholder: "Width", onTextChange: onWidthChanged, name: "width", step: 2, min: 2, required: true, status: "ok", formatter: (width) => `${width}px`, max: 100000000, onValueChange: onWidthDirectlyChanged, rightAlign: false }), widthValidationMessage ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
216
|
+
jsx_runtime_1.jsx(layout_1.Spacing, { y: 1, block: true }), jsx_runtime_1.jsx(ValidationMessage_1.ValidationMessage, { align: "flex-start", message: widthValidationMessage, type: "error" })
|
|
217
|
+
] })) : null] }) })
|
|
218
|
+
] }), jsx_runtime_1.jsxs("div", { style: layout_2.optionRow, children: [
|
|
219
|
+
jsx_runtime_1.jsx("div", { style: layout_2.label, children: "Height" }), jsx_runtime_1.jsx("div", { style: layout_2.rightRow, children: jsx_runtime_1.jsxs(InputAndValidationContainer_1.InputAndValidationContainer, { children: [
|
|
220
|
+
jsx_runtime_1.jsx(InputDragger_1.InputDragger, { "aria-label": "Height", type: "number", value: values.size.height, onTextChange: onHeightChanged, placeholder: "Height", name: "height", step: 2, required: true, formatter: (height) => `${height}px`, min: 2, status: "ok", max: 100000000, onValueChange: onHeightDirectlyChanged, rightAlign: false }), heightValidationMessage ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
221
|
+
jsx_runtime_1.jsx(layout_1.Spacing, { y: 1, block: true }), jsx_runtime_1.jsx(ValidationMessage_1.ValidationMessage, { align: "flex-start", message: heightValidationMessage, type: "error" })
|
|
222
|
+
] })) : null] }) })
|
|
223
|
+
] }), jsx_runtime_1.jsx(NewCompDuration_1.NewCompDuration, { durationInFrames: values.durationInFrames, setDurationInFrames: setDurationInFrames }), jsx_runtime_1.jsxs("div", { style: layout_2.optionRow, children: [
|
|
224
|
+
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, { "aria-label": "FPS", type: "number", value: values.fps, onTextChange: onTextFpsChange, placeholder: "Frame rate (fps)", name: "fps", min: 1, required: true, status: "ok", max: 240, step: 0.01, onValueChange: onFpsChange, rightAlign: false }) })
|
|
225
|
+
] })
|
|
226
|
+
] }));
|
|
227
|
+
};
|
|
228
|
+
exports.NewCompositionFields = NewCompositionFields;
|
|
33
229
|
const NewCompositionLoaded = ({ canvasCapture, folderName, parentName, stack }) => {
|
|
34
230
|
var _a;
|
|
35
231
|
const { compositions } = (0, react_1.useContext)(remotion_1.Internals.CompositionManager);
|
|
@@ -39,7 +235,16 @@ const NewCompositionLoaded = ({ canvasCapture, folderName, parentName, stack })
|
|
|
39
235
|
? resolvedComposition.result
|
|
40
236
|
: null;
|
|
41
237
|
const initialDimensions = (0, get_new_composition_defaults_1.getNewCompositionDefaults)(initialComposition, (_a = canvasCapture === null || canvasCapture === void 0 ? void 0 : canvasCapture.durationInSeconds) !== null && _a !== void 0 ? _a : null);
|
|
42
|
-
const [
|
|
238
|
+
const [values, setValues] = (0, react_1.useState)(() => ({
|
|
239
|
+
durationInFrames: initialDimensions.durationInFrames,
|
|
240
|
+
folder: { folderName, parentName, stack },
|
|
241
|
+
fps: initialDimensions.fps,
|
|
242
|
+
id: (0, use_create_composition_1.getUniqueCompositionName)(compositions),
|
|
243
|
+
size: {
|
|
244
|
+
height: initialDimensions.height,
|
|
245
|
+
width: initialDimensions.width,
|
|
246
|
+
},
|
|
247
|
+
}));
|
|
43
248
|
const inputRef = (0, react_1.useRef)(null);
|
|
44
249
|
(0, react_1.useEffect)(() => {
|
|
45
250
|
const input = inputRef.current;
|
|
@@ -47,61 +252,14 @@ const NewCompositionLoaded = ({ canvasCapture, folderName, parentName, stack })
|
|
|
47
252
|
return;
|
|
48
253
|
input.select();
|
|
49
254
|
}, []);
|
|
50
|
-
const
|
|
51
|
-
const [size, setSize] = (0, react_1.useState)(() => ({
|
|
52
|
-
width: initialDimensions.width,
|
|
53
|
-
height: initialDimensions.height,
|
|
54
|
-
}));
|
|
55
|
-
const [durationInFrames, setDurationInFrames] = (0, react_1.useState)(initialDimensions.durationInFrames);
|
|
56
|
-
const onWidthChanged = (0, react_1.useCallback)((newValue) => {
|
|
57
|
-
setSize((s) => {
|
|
58
|
-
return {
|
|
59
|
-
height: s.height,
|
|
60
|
-
width: Number(newValue),
|
|
61
|
-
};
|
|
62
|
-
});
|
|
63
|
-
}, []);
|
|
64
|
-
const onWidthDirectlyChanged = (0, react_1.useCallback)((newWidth) => {
|
|
65
|
-
setSize((s) => {
|
|
66
|
-
return {
|
|
67
|
-
height: s.height,
|
|
68
|
-
width: newWidth,
|
|
69
|
-
};
|
|
70
|
-
});
|
|
71
|
-
}, []);
|
|
72
|
-
const onHeightDirectlyChanged = (0, react_1.useCallback)((newHeight) => {
|
|
73
|
-
setSize((s) => {
|
|
74
|
-
return {
|
|
75
|
-
width: s.width,
|
|
76
|
-
height: newHeight,
|
|
77
|
-
};
|
|
78
|
-
});
|
|
79
|
-
}, []);
|
|
80
|
-
const onHeightChanged = (0, react_1.useCallback)((newValue) => {
|
|
81
|
-
setSize((s) => {
|
|
82
|
-
return {
|
|
83
|
-
width: s.width,
|
|
84
|
-
height: Number(newValue),
|
|
85
|
-
};
|
|
86
|
-
});
|
|
87
|
-
}, []);
|
|
88
|
-
const onNameChange = (0, react_1.useCallback)((e) => {
|
|
89
|
-
setName(e.target.value);
|
|
90
|
-
}, []);
|
|
91
|
-
const onTextFpsChange = (0, react_1.useCallback)((newFps) => {
|
|
92
|
-
setFrameRate(Number(newFps));
|
|
93
|
-
}, []);
|
|
94
|
-
const onFpsChange = (0, react_1.useCallback)((newFps) => {
|
|
95
|
-
setFrameRate(newFps);
|
|
96
|
-
}, []);
|
|
97
|
-
const { codemod, createComposition, heightValidationMessage: compHeightErrMessage, nameValidationMessage: compNameErrMessage, valid, widthValidationMessage: compWidthErrMessage, } = (0, use_create_composition_1.useCreateComposition)({
|
|
255
|
+
const { codemod, createComposition, heightValidationMessage, nameValidationMessage, valid, widthValidationMessage, } = (0, use_create_composition_1.useCreateComposition)({
|
|
98
256
|
compositions,
|
|
99
|
-
durationInFrames,
|
|
100
|
-
folderName,
|
|
101
|
-
newId,
|
|
102
|
-
parentName,
|
|
103
|
-
selectedFrameRate,
|
|
104
|
-
size,
|
|
257
|
+
durationInFrames: values.durationInFrames,
|
|
258
|
+
folderName: values.folder.folderName,
|
|
259
|
+
newId: values.id,
|
|
260
|
+
parentName: values.folder.parentName,
|
|
261
|
+
selectedFrameRate: values.fps,
|
|
262
|
+
size: values.size,
|
|
105
263
|
canvasCapture: canvasCapture === null
|
|
106
264
|
? null
|
|
107
265
|
: {
|
|
@@ -134,30 +292,9 @@ const NewCompositionLoaded = ({ canvasCapture, folderName, parentName, stack })
|
|
|
134
292
|
const onSubmit = (0, react_1.useCallback)((e) => {
|
|
135
293
|
e.preventDefault();
|
|
136
294
|
}, []);
|
|
137
|
-
const folderPath = [parentName, folderName].filter(Boolean).join('/');
|
|
138
295
|
return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
139
296
|
jsx_runtime_1.jsx(ModalHeader_1.ModalHeader, { title: canvasCapture === null ? 'New composition' : 'Import Canvas Capture' }), jsx_runtime_1.jsxs("form", { onSubmit: onSubmit, children: [
|
|
140
|
-
jsx_runtime_1.
|
|
141
|
-
jsx_runtime_1.jsx("div", { style: layout_2.label, children: "Folder" }), jsx_runtime_1.jsx("div", { style: layout_2.rightRow, children: jsx_runtime_1.jsx("span", { style: folderPathStyle, children: folderPath }) })
|
|
142
|
-
] })) : null, jsx_runtime_1.jsxs("div", { style: layout_2.optionRow, children: [
|
|
143
|
-
jsx_runtime_1.jsx("div", { style: layout_2.label, children: "ID" }), jsx_runtime_1.jsx("div", { style: layout_2.rightRow, children: jsx_runtime_1.jsxs(InputAndValidationContainer_1.InputAndValidationContainer, { children: [
|
|
144
|
-
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: [
|
|
145
|
-
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" })
|
|
146
|
-
] })) : null] }) })
|
|
147
|
-
] }), jsx_runtime_1.jsxs("div", { style: layout_2.optionRow, children: [
|
|
148
|
-
jsx_runtime_1.jsx("div", { style: layout_2.label, children: "Width" }), jsx_runtime_1.jsx("div", { style: layout_2.rightRow, children: jsx_runtime_1.jsxs(InputAndValidationContainer_1.InputAndValidationContainer, { children: [
|
|
149
|
-
jsx_runtime_1.jsx(InputDragger_1.InputDragger, { type: "number", value: size.width, placeholder: "Width", onTextChange: onWidthChanged, name: "width", step: 2, min: 2, required: true, status: "ok", formatter: (w) => `${w}px`, max: 100000000, onValueChange: onWidthDirectlyChanged, rightAlign: false }), compWidthErrMessage ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
150
|
-
jsx_runtime_1.jsx(layout_1.Spacing, { y: 1, block: true }), jsx_runtime_1.jsx(ValidationMessage_1.ValidationMessage, { align: "flex-start", message: compWidthErrMessage, type: "error" })
|
|
151
|
-
] })) : null] }) })
|
|
152
|
-
] }), jsx_runtime_1.jsxs("div", { style: layout_2.optionRow, children: [
|
|
153
|
-
jsx_runtime_1.jsx("div", { style: layout_2.label, children: "Height" }), jsx_runtime_1.jsx("div", { style: layout_2.rightRow, children: jsx_runtime_1.jsxs(InputAndValidationContainer_1.InputAndValidationContainer, { children: [
|
|
154
|
-
jsx_runtime_1.jsx(InputDragger_1.InputDragger, { type: "number", value: size.height, onTextChange: onHeightChanged, placeholder: "Height", name: "height", step: 2, required: true, formatter: (h) => `${h}px`, min: 2, status: "ok", max: 100000000, onValueChange: onHeightDirectlyChanged, rightAlign: false }), compHeightErrMessage ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
155
|
-
jsx_runtime_1.jsx(layout_1.Spacing, { y: 1, block: true }), jsx_runtime_1.jsx(ValidationMessage_1.ValidationMessage, { align: "flex-start", message: compHeightErrMessage, type: "error" })
|
|
156
|
-
] })) : null] }) })
|
|
157
|
-
] }), jsx_runtime_1.jsx(NewCompDuration_1.NewCompDuration, { durationInFrames: durationInFrames, setDurationInFrames: setDurationInFrames }), jsx_runtime_1.jsxs("div", { style: layout_2.optionRow, children: [
|
|
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
|
-
] })
|
|
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({
|
|
297
|
+
jsx_runtime_1.jsx("div", { style: content, children: jsx_runtime_1.jsx(exports.NewCompositionFields, { heightValidationMessage: heightValidationMessage, inputRef: inputRef, nameValidationMessage: nameValidationMessage, setValues: setValues, values: values, widthValidationMessage: widthValidationMessage }) }), 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: values.folder.stack, valid: valid, onSuccess: null, applyCodemod: ({ signal, symbolicatedStack }) => createCanvasCaptureComposition({
|
|
161
298
|
signal,
|
|
162
299
|
symbolicatedStack,
|
|
163
300
|
}), applyCodemodForPreview: null, fallbackToRootFile: true }) })
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.OpenIssueButton = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("react");
|
|
6
|
-
const colors_1 = require("
|
|
6
|
+
const colors_1 = require("../helpers/colors");
|
|
7
7
|
const svgStyle = {
|
|
8
8
|
width: '11px',
|
|
9
9
|
height: '11px',
|
|
@@ -79,19 +79,8 @@ const PlayPauseInner = ({ playbackRate, loop, bufferStateDelayInMilliseconds, mu
|
|
|
79
79
|
const { inFrame, outFrame } = (0, in_out_1.useTimelineInOutFramePosition)();
|
|
80
80
|
const videoConfig = remotion_1.Internals.useUnsafeVideoConfig();
|
|
81
81
|
const [showBufferIndicator, setShowBufferState] = (0, react_1.useState)(false);
|
|
82
|
-
const { play, pause, pauseAndReturnToPlayStart, frameBack, seek, frameForward, emitter, getCurrentFrame,
|
|
83
|
-
const
|
|
84
|
-
(0, react_1.useEffect)(() => {
|
|
85
|
-
const onPlay = () => setPlaying(true);
|
|
86
|
-
const onPause = () => setPlaying(false);
|
|
87
|
-
setPlaying(isPlaying());
|
|
88
|
-
emitter.addEventListener('play', onPlay);
|
|
89
|
-
emitter.addEventListener('pause', onPause);
|
|
90
|
-
return () => {
|
|
91
|
-
emitter.removeEventListener('play', onPlay);
|
|
92
|
-
emitter.removeEventListener('pause', onPause);
|
|
93
|
-
};
|
|
94
|
-
}, [emitter, isPlaying]);
|
|
82
|
+
const { play, pause, pauseAndReturnToPlayStart, frameBack, seek, frameForward, emitter, getCurrentFrame, } = player_1.PlayerInternals.usePlayerMethods();
|
|
83
|
+
const playing = remotion_1.Internals.usePlaying();
|
|
95
84
|
const isStill = (0, is_current_selected_still_1.useIsStill)();
|
|
96
85
|
(0, react_1.useEffect)(() => {
|
|
97
86
|
if (isStill) {
|
|
@@ -98,7 +98,7 @@ const PreviewToolbar = ({ readOnlyStudio, bufferStateDelayInMilliseconds }) => {
|
|
|
98
98
|
!showCompositionControls ? null : (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
99
99
|
jsx_runtime_1.jsx(layout_1.Spacing, { x: 0.25 }), jsx_runtime_1.jsx(PreviewToolbarControl, { children: jsx_runtime_1.jsx(SnappingToggle_1.SnappingToggle, {}) })
|
|
100
100
|
] }))] })) : null, jsx_runtime_1.jsx(layout_1.Spacing, { x: 2 }), canvasContent && isFullscreenSupported ? (jsx_runtime_1.jsx(PreviewToolbarControl, { children: jsx_runtime_1.jsx(FullscreenToggle_1.FullScreenToggle, { hidden: isMobileLayout }) })) : null, jsx_runtime_1.jsx(layout_1.Flex, {}), jsx_runtime_1.jsxs("div", { style: sideContainer, children: [
|
|
101
|
-
jsx_runtime_1.jsx(layout_1.Flex, {}), jsx_runtime_1.jsx(FpsCounter_1.FpsCounter, { playbackSpeed: playbackRate }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 2 }), jsx_runtime_1.jsx(PreviewToolbarControl, { children: jsx_runtime_1.jsx(RenderButton_1.RenderButton, { readOnlyStudio: readOnlyStudio, size: "compact", narrow: isMobileLayout }) }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 1.5 })
|
|
101
|
+
jsx_runtime_1.jsx(layout_1.Flex, {}), isMobileLayout ? null : jsx_runtime_1.jsx(FpsCounter_1.FpsCounter, { playbackSpeed: playbackRate }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 2 }), jsx_runtime_1.jsx(PreviewToolbarControl, { children: jsx_runtime_1.jsx(RenderButton_1.RenderButton, { readOnlyStudio: readOnlyStudio, size: "compact", narrow: isMobileLayout }) }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 1.5 })
|
|
102
102
|
] }), jsx_runtime_1.jsx(PlaybackKeyboardShortcutsManager_1.PlaybackKeyboardShortcutsManager, { setPlaybackRate: setPlaybackRate }), jsx_runtime_1.jsx(PlaybackRatePersistor_1.PlaybackRatePersistor, {})
|
|
103
103
|
] }));
|
|
104
104
|
};
|
|
@@ -11,7 +11,7 @@ const ellipsis_1 = require("../../icons/ellipsis");
|
|
|
11
11
|
const modals_1 = require("../../state/modals");
|
|
12
12
|
const InlineDropdown_1 = require("../InlineDropdown");
|
|
13
13
|
const quickSwitcherArea = {
|
|
14
|
-
padding: '4px 8px',
|
|
14
|
+
padding: '4px 4px 4px 8px',
|
|
15
15
|
borderBottom: `1px solid ${colors_1.BLACK_HEX}`,
|
|
16
16
|
display: 'flex',
|
|
17
17
|
alignItems: 'center',
|
|
@@ -28,6 +28,7 @@ const quickSwitcherTrigger = {
|
|
|
28
28
|
border: 'none',
|
|
29
29
|
flex: 1,
|
|
30
30
|
appearance: 'none',
|
|
31
|
+
userSelect: 'none',
|
|
31
32
|
...(0, hoverable_1.hoverableStyle)({
|
|
32
33
|
idleBackground: colors_1.WHITE_ALPHA_06,
|
|
33
34
|
hoverBackground: colors_1.WHITE_ALPHA_06,
|