@remotion/studio 4.0.522 → 4.0.524
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/install-package.js +4 -2
- package/dist/components/ActionTooltip.d.ts +9 -0
- package/dist/components/ActionTooltip.js +143 -0
- package/dist/components/AssetAudioVolume.d.ts +5 -0
- package/dist/components/AssetAudioVolume.js +33 -0
- package/dist/components/Canvas.js +8 -8
- package/dist/components/CaptionInspector.js +74 -20
- package/dist/components/CheckboardToggle.js +9 -10
- package/dist/components/Checkbox.d.ts +1 -0
- package/dist/components/Checkbox.js +2 -2
- package/dist/components/CompositionContextButton.js +4 -1
- package/dist/components/CompositionSelectorItem.js +2 -2
- package/dist/components/ConfigureLicenseModal.js +1 -1
- package/dist/components/CurrentAsset.js +40 -6
- package/dist/components/EditorContexts.js +3 -1
- package/dist/components/ElementInstallConfirmation.js +254 -137
- package/dist/components/FixComputedValueModal.js +38 -8
- package/dist/components/FullscreenToggle.js +8 -10
- package/dist/components/GlobalKeybindings.js +107 -49
- package/dist/components/InspectorPanel/MultiSequenceField.d.ts +12 -0
- package/dist/components/InspectorPanel/MultiSequenceField.js +131 -0
- package/dist/components/InspectorPanel/MultiSequenceInspector.d.ts +8 -0
- package/dist/components/InspectorPanel/MultiSequenceInspector.js +102 -0
- package/dist/components/InspectorPanel/MultiSequenceNumberField.d.ts +9 -0
- package/dist/components/InspectorPanel/MultiSequenceNumberField.js +88 -0
- package/dist/components/InspectorPanel.js +4 -0
- package/dist/components/InspectorSequenceSection.js +69 -6
- package/dist/components/InstallPackage.js +4 -5
- package/dist/components/KeyboardShortcutsSettings.js +212 -33
- package/dist/components/LazySyntaxHighlightedSource.d.ts +4 -0
- package/dist/components/LazySyntaxHighlightedSource.js +43 -0
- package/dist/components/LoopToggle.js +8 -2
- package/dist/components/MenuToolbar.js +11 -7
- package/dist/components/ModalContainer.d.ts +1 -0
- package/dist/components/ModalContainer.js +2 -2
- package/dist/components/Modals.js +3 -1
- package/dist/components/ModelManager.d.ts +16 -0
- package/dist/components/ModelManager.js +200 -0
- package/dist/components/ModelsSettings.d.ts +2 -0
- package/dist/components/ModelsSettings.js +133 -0
- package/dist/components/MuteToggle.d.ts +1 -0
- package/dist/components/MuteToggle.js +16 -6
- package/dist/components/NewComposition/DismissableModal.d.ts +1 -0
- package/dist/components/NewComposition/DismissableModal.js +2 -2
- package/dist/components/NewComposition/InputDragger.d.ts +2 -2
- package/dist/components/NewComposition/InputDragger.js +6 -6
- package/dist/components/NewComposition/NewComposition.d.ts +1 -0
- package/dist/components/NewComposition/NewComposition.js +5 -4
- package/dist/components/NewComposition/NewFolder.js +9 -8
- package/dist/components/NewComposition/RenameComposition.js +3 -2
- package/dist/components/NewComposition/RenameFolder.js +15 -10
- package/dist/components/NewComposition/SlugPreview.d.ts +7 -0
- package/dist/components/NewComposition/SlugPreview.js +18 -0
- package/dist/components/OptionalPackageModal.d.ts +11 -0
- package/dist/components/OptionalPackageModal.js +155 -0
- package/dist/components/OutlineToggle.js +16 -10
- package/dist/components/PlayPause.js +11 -9
- package/dist/components/PlaybackKeyboardShortcutsManager.d.ts +2 -0
- package/dist/components/PlaybackKeyboardShortcutsManager.js +39 -7
- package/dist/components/PlaybackRateSelector.js +2 -2
- package/dist/components/PreviewToolbar.js +1 -1
- package/dist/components/PreviewToolbarOverflowButton.js +19 -4
- package/dist/components/QuickSwitcher/ExplorerQuickSwitcherTrigger.js +5 -2
- package/dist/components/RadioButton.d.ts +1 -0
- package/dist/components/RadioButton.js +2 -2
- package/dist/components/RenderButton.js +5 -1
- package/dist/components/RenderModal/NumberSetting.d.ts +6 -1
- package/dist/components/RenderModal/NumberSetting.js +2 -2
- package/dist/components/RenderModal/RenderModalBasic.js +1 -1
- package/dist/components/RenderModal/RenderModalOutputName.d.ts +3 -1
- package/dist/components/RenderModal/RenderModalOutputName.js +4 -4
- package/dist/components/RenderModal/SeparateAudioOption.js +1 -1
- package/dist/components/RenderModal/WebRenderModalBasic.js +1 -1
- package/dist/components/RenderQueue/CaptionQueueItem.d.ts +6 -0
- package/dist/components/RenderQueue/CaptionQueueItem.js +130 -0
- package/dist/components/RenderQueue/CaptionQueueProcessor.d.ts +1 -0
- package/dist/components/RenderQueue/CaptionQueueProcessor.js +110 -0
- package/dist/components/RenderQueue/CaptionQueueProcessorLoader.d.ts +2 -0
- package/dist/components/RenderQueue/CaptionQueueProcessorLoader.js +54 -0
- package/dist/components/RenderQueue/RenderQueueCopyToClipboard.js +2 -1
- package/dist/components/RenderQueue/RenderQueueDownloadItem.js +2 -1
- package/dist/components/RenderQueue/RenderQueueItem.js +3 -3
- package/dist/components/RenderQueue/RenderQueueItemCancelButton.js +2 -1
- package/dist/components/RenderQueue/RenderQueueOpenInFolder.js +2 -1
- package/dist/components/RenderQueue/RenderQueueRemoveItem.js +2 -1
- package/dist/components/RenderQueue/RenderQueueRepeat.js +2 -1
- package/dist/components/RenderQueue/VideoMattingQueueItem.d.ts +6 -0
- package/dist/components/RenderQueue/VideoMattingQueueItem.js +130 -0
- package/dist/components/RenderQueue/VideoMattingQueueProcessor.d.ts +1 -0
- package/dist/components/RenderQueue/VideoMattingQueueProcessor.js +105 -0
- package/dist/components/RenderQueue/VideoMattingQueueProcessorLoader.d.ts +2 -0
- package/dist/components/RenderQueue/VideoMattingQueueProcessorLoader.js +54 -0
- package/dist/components/RenderQueue/caption-job-types.d.ts +47 -0
- package/dist/components/RenderQueue/caption-job-types.js +7 -0
- package/dist/components/RenderQueue/context.d.ts +16 -0
- package/dist/components/RenderQueue/context.js +224 -11
- package/dist/components/RenderQueue/index.js +34 -10
- package/dist/components/RenderQueue/item-style.d.ts +1 -0
- package/dist/components/RenderQueue/item-style.js +2 -1
- package/dist/components/RenderQueue/load-model-for-job.d.ts +11 -0
- package/dist/components/RenderQueue/load-model-for-job.js +14 -0
- package/dist/components/RenderQueue/video-matting-job-types.d.ts +38 -0
- package/dist/components/RenderQueue/video-matting-job-types.js +5 -0
- package/dist/components/RendersTab.js +4 -4
- package/dist/components/RulersAndGuidesToggle.js +7 -1
- package/dist/components/SegmentedControl.d.ts +2 -2
- package/dist/components/SegmentedControl.js +38 -13
- package/dist/components/SelectedOutlinePolygon.js +8 -2
- package/dist/components/SettingsButton.d.ts +4 -0
- package/dist/components/SettingsButton.js +51 -0
- package/dist/components/SettingsModal.d.ts +1 -1
- package/dist/components/SettingsModal.js +3 -1
- package/dist/components/ShowOutlinesProvider.js +12 -0
- package/dist/components/SidebarCollapserControls.js +17 -21
- package/dist/components/SizeSelector.js +12 -4
- package/dist/components/SkillsSettings.js +2 -3
- package/dist/components/SnappingToggle.js +9 -8
- package/dist/components/StudioSettings.js +32 -18
- package/dist/components/SyntaxHighlightedSource.d.ts +5 -0
- package/dist/components/SyntaxHighlightedSource.js +78 -0
- package/dist/components/Tabs/vertical.d.ts +1 -0
- package/dist/components/Tabs/vertical.js +2 -2
- package/dist/components/TimeValue.js +2 -3
- package/dist/components/Timeline/SequencePropsObserver.js +4 -0
- package/dist/components/Timeline/Timeline.js +49 -81
- package/dist/components/Timeline/TimelineClipboardKeybindings.js +2 -4
- package/dist/components/Timeline/TimelineDeleteKeybindings.js +3 -18
- package/dist/components/Timeline/TimelineDragHandler.js +2 -2
- package/dist/components/Timeline/TimelineExpandedKeyframeRow.js +1 -0
- package/dist/components/Timeline/TimelineLayerChildren.js +12 -9
- package/dist/components/Timeline/TimelineRowChrome.js +11 -3
- package/dist/components/Timeline/TimelineSchemaField.js +8 -4
- package/dist/components/Timeline/TimelineSelection.d.ts +2 -0
- package/dist/components/Timeline/TimelineSelection.js +55 -2
- package/dist/components/Timeline/TimelineSequence.js +75 -17
- package/dist/components/Timeline/TimelineSequenceItem.d.ts +0 -1
- package/dist/components/Timeline/TimelineSequenceItem.js +208 -111
- package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.d.ts +23 -3
- package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.js +73 -25
- package/dist/components/Timeline/TimelineTimeIndicators.js +1 -0
- package/dist/components/Timeline/TimelineZoomControls.js +2 -1
- package/dist/components/Timeline/timeline-field-display-utils.js +8 -5
- package/dist/components/Timeline/use-asset-timeline-context-menu.d.ts +2 -0
- package/dist/components/Timeline/use-asset-timeline-context-menu.js +52 -0
- package/dist/components/TimelineCombobox.d.ts +1 -0
- package/dist/components/TimelineCombobox.js +8 -4
- package/dist/components/TimelineInOutToggle.js +14 -18
- package/dist/components/Transcription/LazyModels.d.ts +1 -0
- package/dist/components/Transcription/LazyModels.js +5 -0
- package/dist/components/Transcription/Models.d.ts +6 -0
- package/dist/components/Transcription/Models.js +18 -0
- package/dist/components/Transcription/TranscriptionModal.d.ts +3 -0
- package/dist/components/Transcription/TranscriptionModal.js +428 -0
- package/dist/components/Transcription/TranscriptionModalWithOptionalWhisper.d.ts +5 -0
- package/dist/components/Transcription/TranscriptionModalWithOptionalWhisper.js +48 -0
- package/dist/components/Transcription/caption-output-name.d.ts +2 -0
- package/dist/components/Transcription/caption-output-name.js +10 -0
- package/dist/components/Transcription/resample-media-to-16-khz.d.ts +6 -0
- package/dist/components/Transcription/resample-media-to-16-khz.js +82 -0
- package/dist/components/Transcription/whisper-languages.d.ts +2 -0
- package/dist/components/Transcription/whisper-languages.js +104 -0
- package/dist/components/Transcription/whisper-webgpu-capability.d.ts +2 -0
- package/dist/components/Transcription/whisper-webgpu-capability.js +7 -0
- package/dist/components/UndoRedoButtons.js +13 -38
- package/dist/components/UpdatesSettings.js +8 -12
- package/dist/components/VideoMatting/LazyModels.d.ts +1 -0
- package/dist/components/VideoMatting/LazyModels.js +5 -0
- package/dist/components/VideoMatting/Models.d.ts +6 -0
- package/dist/components/VideoMatting/Models.js +18 -0
- package/dist/components/VideoMatting/VideoMattingModal.d.ts +3 -0
- package/dist/components/VideoMatting/VideoMattingModal.js +207 -0
- package/dist/components/VideoMatting/VideoMattingModalWithOptionalPackage.d.ts +5 -0
- package/dist/components/VideoMatting/VideoMattingModalWithOptionalPackage.js +46 -0
- package/dist/components/VideoMatting/video-matting-capability.d.ts +2 -0
- package/dist/components/VideoMatting/video-matting-capability.js +7 -0
- package/dist/components/WebMcp.js +439 -22
- package/dist/components/handle-drop.js +3 -2
- package/dist/components/import-assets.d.ts +3 -2
- package/dist/components/import-assets.js +5 -9
- package/dist/components/keyboard-shortcuts.d.ts +17 -1
- package/dist/components/keyboard-shortcuts.js +191 -89
- package/dist/components/public-output-name.d.ts +5 -0
- package/dist/components/public-output-name.js +60 -0
- package/dist/components/use-model-cache-status.d.ts +7 -0
- package/dist/components/use-model-cache-status.js +35 -0
- package/dist/error-overlay/remotion-overlay/CodeFrame.js +29 -18
- package/dist/esm/CaptionQueueProcessor-k0yrm3dj.mjs +211 -0
- package/dist/esm/LazyModels-hc33szyn.mjs +11 -0
- package/dist/esm/LazyModels-sg40rjw6.mjs +11 -0
- package/dist/esm/SyntaxHighlightedSource-3xks91rz.mjs +1236 -0
- package/dist/esm/TranscriptionModal-3ctnxpt6.mjs +1011 -0
- package/dist/esm/VideoMattingModal-b0r7e60n.mjs +374 -0
- package/dist/esm/VideoMattingQueueProcessor-t1hgm2rm.mjs +109 -0
- package/dist/esm/index-1b9skrrd.mjs +142 -0
- package/dist/esm/index-2j3d1g81.mjs +261 -0
- package/dist/esm/index-5zrb1ft4.mjs +39 -0
- package/dist/esm/index-7tt71e8n.mjs +36 -0
- package/dist/esm/index-9qtvmwtx.mjs +1366 -0
- package/dist/esm/index-9x6e1dq0.mjs +428 -0
- package/dist/esm/index-c37kme2v.mjs +46209 -0
- package/dist/esm/index-cw0pnpg5.mjs +50 -0
- package/dist/esm/index-e3zwf3e7.mjs +36 -0
- package/dist/esm/index-er3mh6em.mjs +54688 -0
- package/dist/esm/{chunk-je0h1bgt.js → index-k426ye99.mjs} +4 -1
- package/dist/esm/index-q2epbw93.mjs +423 -0
- package/dist/esm/index-q5xv20xx.mjs +41 -0
- package/dist/esm/{chunk-6jf1natv.js → index-rcv7qkt5.mjs} +18 -1
- package/dist/esm/index-v4tr1bft.mjs +20 -0
- package/dist/esm/index-wbmp5srk.mjs +35 -0
- package/dist/esm/index-yfrysr5f.mjs +1154 -0
- package/dist/esm/index.mjs +45 -933
- package/dist/esm/internals.mjs +13 -114393
- package/dist/esm/previewEntry.mjs +387 -115050
- package/dist/esm/renderEntry.mjs +5 -5
- package/dist/esm/{chunk-m0jqdbkr.js → resolve-composition-component-location-bt2d6qxq.mjs} +1 -1
- package/dist/helpers/colors.d.ts +1 -0
- package/dist/helpers/colors.js +4 -3
- package/dist/helpers/drag-aware-double-click.d.ts +2 -1
- package/dist/helpers/drag-aware-double-click.js +12 -1
- package/dist/helpers/get-asset-metadata.d.ts +1 -0
- package/dist/helpers/get-asset-metadata.js +4 -0
- package/dist/helpers/hoverable.js +8 -0
- package/dist/helpers/inject-css.js +2 -0
- package/dist/helpers/optional-package-dependencies.d.ts +3 -0
- package/dist/helpers/optional-package-dependencies.js +24 -0
- package/dist/helpers/pointer-session.d.ts +6 -0
- package/dist/helpers/pointer-session.js +36 -14
- package/dist/helpers/prism-vsc-dark-plus.d.ts +1 -0
- package/dist/helpers/prism-vsc-dark-plus.js +305 -0
- package/dist/helpers/sequence-node-path-mutations.js +11 -0
- package/dist/helpers/slugify-name.d.ts +1 -0
- package/dist/helpers/slugify-name.js +14 -0
- package/dist/helpers/studio-runtime-config.d.ts +1 -0
- package/dist/helpers/studio-runtime-config.js +6 -1
- package/dist/helpers/use-create-composition.d.ts +1 -0
- package/dist/helpers/use-create-composition.js +12 -7
- package/dist/helpers/use-keybinding.d.ts +9 -3
- package/dist/helpers/use-keybinding.js +8 -9
- package/dist/helpers/use-keyboard-shortcut-label.d.ts +2 -0
- package/dist/helpers/use-keyboard-shortcut-label.js +15 -0
- package/dist/helpers/use-menu-structure.js +59 -14
- package/dist/helpers/use-rename-composition.d.ts +1 -0
- package/dist/helpers/use-rename-composition.js +11 -5
- package/dist/icons/input-props.d.ts +1 -1
- package/dist/icons/input-props.js +2 -2
- package/dist/icons/models.d.ts +4 -0
- package/dist/icons/models.js +7 -0
- package/dist/icons/separation.d.ts +4 -0
- package/dist/icons/separation.js +7 -0
- package/dist/icons/skills.js +1 -1
- package/dist/icons/transcription.d.ts +4 -0
- package/dist/icons/transcription.js +7 -0
- package/dist/icons/upload.js +1 -1
- package/dist/renderEntry.js +2 -2
- package/dist/state/modals.d.ts +14 -2
- package/package.json +35 -21
- package/dist/components/UpdateCheck.d.ts +0 -1
- package/dist/components/UpdateCheck.js +0 -79
- package/dist/esm/chunk-3netyjd9.js +0 -99793
|
@@ -4,14 +4,16 @@ exports.installPackages = void 0;
|
|
|
4
4
|
const remotion_1 = require("remotion");
|
|
5
5
|
const call_api_1 = require("../components/call-api");
|
|
6
6
|
const browser_studio_operations_1 = require("../helpers/browser-studio-operations");
|
|
7
|
+
const optional_package_dependencies_1 = require("../helpers/optional-package-dependencies");
|
|
7
8
|
const installPackages = async (dependencies) => {
|
|
8
9
|
if (!(0, remotion_1.getRemotionEnvironment)().isStudio) {
|
|
9
10
|
throw new Error('installPackages() is only available in the Studio');
|
|
10
11
|
}
|
|
12
|
+
const dependenciesWithAuxiliaryPackages = (0, optional_package_dependencies_1.withRequiredAuxiliaryPackages)(dependencies);
|
|
11
13
|
const browserStudioOperations = (0, browser_studio_operations_1.getBrowserStudioOperations)();
|
|
12
14
|
if (browserStudioOperations !== null) {
|
|
13
15
|
const response = await browserStudioOperations.packageInstallation.installPackages({
|
|
14
|
-
dependencies:
|
|
16
|
+
dependencies: dependenciesWithAuxiliaryPackages,
|
|
15
17
|
});
|
|
16
18
|
if (!response.success) {
|
|
17
19
|
const error = new Error(response.reason);
|
|
@@ -24,7 +26,7 @@ const installPackages = async (dependencies) => {
|
|
|
24
26
|
throw new Error('installPackages() is not available in Read-Only Studio');
|
|
25
27
|
}
|
|
26
28
|
return (0, call_api_1.callApi)('/api/install-package', {
|
|
27
|
-
dependencies:
|
|
29
|
+
dependencies: dependenciesWithAuxiliaryPackages,
|
|
28
30
|
});
|
|
29
31
|
};
|
|
30
32
|
exports.installPackages = installPackages;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare const ActionTooltip: React.FC<{
|
|
3
|
+
readonly label: string;
|
|
4
|
+
readonly shortcut: string | null;
|
|
5
|
+
/** Hover delay in milliseconds. Pass null to show immediately. */
|
|
6
|
+
readonly delay: number | null;
|
|
7
|
+
readonly dismissOnClick: boolean;
|
|
8
|
+
readonly children: React.ReactNode;
|
|
9
|
+
}>;
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ActionTooltip = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_1 = require("react");
|
|
6
|
+
const react_dom_1 = require("react-dom");
|
|
7
|
+
const colors_1 = require("../helpers/colors");
|
|
8
|
+
const z_index_1 = require("../state/z-index");
|
|
9
|
+
const portals_1 = require("./Menu/portals");
|
|
10
|
+
const styles_1 = require("./Menu/styles");
|
|
11
|
+
const triggerStyle = { display: 'inline-flex' };
|
|
12
|
+
const tooltipStyle = {
|
|
13
|
+
position: 'fixed',
|
|
14
|
+
display: 'flex',
|
|
15
|
+
alignItems: 'center',
|
|
16
|
+
gap: 6,
|
|
17
|
+
backgroundColor: colors_1.TIMELINE_BACKGROUND_COLOR,
|
|
18
|
+
color: colors_1.WHITE_ALPHA_90,
|
|
19
|
+
borderRadius: 6,
|
|
20
|
+
padding: '6px 8px',
|
|
21
|
+
fontSize: 12,
|
|
22
|
+
lineHeight: '16px',
|
|
23
|
+
whiteSpace: 'pre-wrap',
|
|
24
|
+
overflowWrap: 'anywhere',
|
|
25
|
+
maxWidth: 'calc(100vw - 16px)',
|
|
26
|
+
boxShadow: styles_1.SHADOW_TOWARDS_TOP,
|
|
27
|
+
pointerEvents: 'none',
|
|
28
|
+
};
|
|
29
|
+
const labelStyle = {
|
|
30
|
+
font: 'inherit',
|
|
31
|
+
color: 'inherit',
|
|
32
|
+
minWidth: 0,
|
|
33
|
+
};
|
|
34
|
+
const shortcutStyle = {
|
|
35
|
+
...labelStyle,
|
|
36
|
+
backgroundColor: colors_1.WHITE_ALPHA_10,
|
|
37
|
+
borderRadius: 3,
|
|
38
|
+
padding: '0 4px',
|
|
39
|
+
minWidth: 16,
|
|
40
|
+
textAlign: 'center',
|
|
41
|
+
whiteSpace: 'nowrap',
|
|
42
|
+
flexShrink: 0,
|
|
43
|
+
};
|
|
44
|
+
let visibleTooltipCount = 0;
|
|
45
|
+
let lastTooltipHiddenAt = null;
|
|
46
|
+
const TOOLTIP_SKIP_DELAY_WINDOW = 300;
|
|
47
|
+
const ActionTooltip = ({ label, shortcut, delay, dismissOnClick, children }) => {
|
|
48
|
+
var _a, _b;
|
|
49
|
+
const triggerRef = (0, react_1.useRef)(null);
|
|
50
|
+
const tooltipRef = (0, react_1.useRef)(null);
|
|
51
|
+
const timer = (0, react_1.useRef)(null);
|
|
52
|
+
const [visible, setVisible] = (0, react_1.useState)(false);
|
|
53
|
+
const [position, setPosition] = (0, react_1.useState)(null);
|
|
54
|
+
const { currentZIndex } = (0, z_index_1.useZIndex)();
|
|
55
|
+
(0, react_1.useLayoutEffect)(() => {
|
|
56
|
+
if (!visible) {
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
visibleTooltipCount++;
|
|
60
|
+
return () => {
|
|
61
|
+
visibleTooltipCount--;
|
|
62
|
+
lastTooltipHiddenAt = Date.now();
|
|
63
|
+
};
|
|
64
|
+
}, [visible]);
|
|
65
|
+
const hide = (0, react_1.useCallback)(() => {
|
|
66
|
+
if (timer.current !== null) {
|
|
67
|
+
clearTimeout(timer.current);
|
|
68
|
+
timer.current = null;
|
|
69
|
+
}
|
|
70
|
+
setVisible(false);
|
|
71
|
+
setPosition(null);
|
|
72
|
+
}, []);
|
|
73
|
+
const show = (0, react_1.useCallback)(() => {
|
|
74
|
+
if (timer.current !== null) {
|
|
75
|
+
clearTimeout(timer.current);
|
|
76
|
+
timer.current = null;
|
|
77
|
+
}
|
|
78
|
+
setVisible(true);
|
|
79
|
+
}, []);
|
|
80
|
+
const onPointerEnter = (0, react_1.useCallback)((event) => {
|
|
81
|
+
if (event.pointerType === 'touch' ||
|
|
82
|
+
timer.current !== null ||
|
|
83
|
+
!event.currentTarget.contains(event.target)) {
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
// Keep adjacent controls instant, including crossing the gap between them.
|
|
87
|
+
if (!delay ||
|
|
88
|
+
visibleTooltipCount > 0 ||
|
|
89
|
+
(lastTooltipHiddenAt !== null &&
|
|
90
|
+
Date.now() - lastTooltipHiddenAt < TOOLTIP_SKIP_DELAY_WINDOW)) {
|
|
91
|
+
show();
|
|
92
|
+
return;
|
|
93
|
+
}
|
|
94
|
+
timer.current = setTimeout(show, delay);
|
|
95
|
+
}, [delay, show]);
|
|
96
|
+
(0, react_1.useEffect)(() => {
|
|
97
|
+
const onKeyDown = (event) => {
|
|
98
|
+
if (event.key === 'Escape') {
|
|
99
|
+
hide();
|
|
100
|
+
}
|
|
101
|
+
};
|
|
102
|
+
window.addEventListener('keydown', onKeyDown);
|
|
103
|
+
window.addEventListener('blur', hide);
|
|
104
|
+
window.addEventListener('resize', hide);
|
|
105
|
+
window.addEventListener('scroll', hide, true);
|
|
106
|
+
return () => {
|
|
107
|
+
if (timer.current !== null) {
|
|
108
|
+
clearTimeout(timer.current);
|
|
109
|
+
}
|
|
110
|
+
window.removeEventListener('keydown', onKeyDown);
|
|
111
|
+
window.removeEventListener('blur', hide);
|
|
112
|
+
window.removeEventListener('resize', hide);
|
|
113
|
+
window.removeEventListener('scroll', hide, true);
|
|
114
|
+
};
|
|
115
|
+
}, [hide]);
|
|
116
|
+
(0, react_1.useLayoutEffect)(() => {
|
|
117
|
+
if (!visible || !triggerRef.current || !tooltipRef.current) {
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
120
|
+
const trigger = triggerRef.current.getBoundingClientRect();
|
|
121
|
+
const tooltip = tooltipRef.current.getBoundingClientRect();
|
|
122
|
+
const above = trigger.top - tooltip.height - 4;
|
|
123
|
+
setPosition({
|
|
124
|
+
left: Math.max(8, Math.min(trigger.left + (trigger.width - tooltip.width) / 2, window.innerWidth - tooltip.width - 8)),
|
|
125
|
+
top: Math.max(8, Math.min(above >= 8 ? above : trigger.bottom + 4, window.innerHeight - tooltip.height - 8)),
|
|
126
|
+
});
|
|
127
|
+
}, [label, shortcut, visible]);
|
|
128
|
+
return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
129
|
+
jsx_runtime_1.jsx("span", { ref: triggerRef, style: triggerStyle, onPointerEnter: onPointerEnter, onPointerLeave: hide, onPointerDownCapture: dismissOnClick ? hide : undefined, onClickCapture: dismissOnClick ? hide : undefined, onFocus: (event) => {
|
|
130
|
+
if (event.currentTarget.contains(event.target)) {
|
|
131
|
+
show();
|
|
132
|
+
}
|
|
133
|
+
}, onBlur: hide, children: children }), visible
|
|
134
|
+
? (0, react_dom_1.createPortal)(jsx_runtime_1.jsxs("div", { ref: tooltipRef, role: "tooltip", className: "css-reset", style: {
|
|
135
|
+
...tooltipStyle,
|
|
136
|
+
left: (_a = position === null || position === void 0 ? void 0 : position.left) !== null && _a !== void 0 ? _a : 0,
|
|
137
|
+
top: (_b = position === null || position === void 0 ? void 0 : position.top) !== null && _b !== void 0 ? _b : 0,
|
|
138
|
+
visibility: position ? 'visible' : 'hidden',
|
|
139
|
+
}, children: [
|
|
140
|
+
jsx_runtime_1.jsx("span", { style: labelStyle, children: label }), shortcut ? jsx_runtime_1.jsx("kbd", { style: shortcutStyle, children: shortcut }) : null] }), (0, portals_1.getPortal)(currentZIndex))
|
|
141
|
+
: null] }));
|
|
142
|
+
};
|
|
143
|
+
exports.ActionTooltip = ActionTooltip;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AssetAudioVolume = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const timeline_utils_1 = require("@remotion/timeline-utils");
|
|
6
|
+
const react_1 = require("react");
|
|
7
|
+
const colors_1 = require("../helpers/colors");
|
|
8
|
+
const AssetAudioVolume = ({ src, waveformSampleRate }) => {
|
|
9
|
+
const [value, setValue] = (0, react_1.useState)('Calculating…');
|
|
10
|
+
(0, react_1.useEffect)(() => {
|
|
11
|
+
setValue('Calculating…');
|
|
12
|
+
if (src === null || waveformSampleRate === null) {
|
|
13
|
+
return;
|
|
14
|
+
}
|
|
15
|
+
return (0, timeline_utils_1.subscribeToWaveformPeaks)({
|
|
16
|
+
src,
|
|
17
|
+
waveformSampleRate,
|
|
18
|
+
onPeaks: (_peaks, final, averageVolume) => {
|
|
19
|
+
if (final) {
|
|
20
|
+
setValue((0, timeline_utils_1.formatAverageAudioVolume)(averageVolume));
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
onError: () => setValue('Unavailable'),
|
|
24
|
+
});
|
|
25
|
+
}, [src, waveformSampleRate]);
|
|
26
|
+
return (jsx_runtime_1.jsx("span", { style: {
|
|
27
|
+
fontFamily: 'sans-serif',
|
|
28
|
+
fontSize: 13,
|
|
29
|
+
lineHeight: '20px',
|
|
30
|
+
color: colors_1.LIGHT_TEXT,
|
|
31
|
+
}, title: "RMS level across all channels over the full audio track, including silence.", children: value }));
|
|
32
|
+
};
|
|
33
|
+
exports.AssetAudioVolume = AssetAudioVolume;
|
|
@@ -510,8 +510,7 @@ const Canvas = ({ canvasContent, size }) => {
|
|
|
510
510
|
(0, react_1.useEffect)(() => {
|
|
511
511
|
const resetBinding = keybindings.registerKeybinding({
|
|
512
512
|
event: 'keydown',
|
|
513
|
-
|
|
514
|
-
commandCtrlKey: false,
|
|
513
|
+
action: 'resetZoom',
|
|
515
514
|
callback: onReset,
|
|
516
515
|
preventDefault: true,
|
|
517
516
|
triggerIfInputFieldFocused: false,
|
|
@@ -519,8 +518,7 @@ const Canvas = ({ canvasContent, size }) => {
|
|
|
519
518
|
});
|
|
520
519
|
const zoomIn = keybindings.registerKeybinding({
|
|
521
520
|
event: 'keydown',
|
|
522
|
-
|
|
523
|
-
commandCtrlKey: false,
|
|
521
|
+
action: 'zoomIn',
|
|
524
522
|
callback: onZoomIn,
|
|
525
523
|
preventDefault: true,
|
|
526
524
|
triggerIfInputFieldFocused: false,
|
|
@@ -528,8 +526,7 @@ const Canvas = ({ canvasContent, size }) => {
|
|
|
528
526
|
});
|
|
529
527
|
const zoomOut = keybindings.registerKeybinding({
|
|
530
528
|
event: 'keydown',
|
|
531
|
-
|
|
532
|
-
commandCtrlKey: false,
|
|
529
|
+
action: 'zoomOut',
|
|
533
530
|
callback: onZoomOut,
|
|
534
531
|
preventDefault: true,
|
|
535
532
|
triggerIfInputFieldFocused: false,
|
|
@@ -625,7 +622,7 @@ const Canvas = ({ canvasContent, size }) => {
|
|
|
625
622
|
}, [previewServerClientId, subscribeToEvent]);
|
|
626
623
|
(0, react_1.useEffect)(() => {
|
|
627
624
|
const onMessage = (event) => {
|
|
628
|
-
var _a, _b;
|
|
625
|
+
var _a, _b, _c;
|
|
629
626
|
const elementLibrary = document.querySelector('iframe[data-remotion-element-library]');
|
|
630
627
|
if (event.source !== (elementLibrary === null || elementLibrary === void 0 ? void 0 : elementLibrary.contentWindow) ||
|
|
631
628
|
!studio_protocol_1.StudioProtocolInternals.isAllowedStudioProtocolPageOrigin(event.origin)) {
|
|
@@ -649,7 +646,8 @@ const Canvas = ({ canvasContent, size }) => {
|
|
|
649
646
|
element: {
|
|
650
647
|
...payload.element,
|
|
651
648
|
durationInFrames: (_a = payload.element.durationInFrames) !== null && _a !== void 0 ? _a : null,
|
|
652
|
-
|
|
649
|
+
initialProps: (_b = payload.element.initialProps) !== null && _b !== void 0 ? _b : null,
|
|
650
|
+
installationMode: (_c = payload.element.installationMode) !== null && _c !== void 0 ? _c : null,
|
|
653
651
|
},
|
|
654
652
|
from: null,
|
|
655
653
|
id: crypto.randomUUID(),
|
|
@@ -773,6 +771,7 @@ const Canvas = ({ canvasContent, size }) => {
|
|
|
773
771
|
try {
|
|
774
772
|
const [newPreflight, currentPreflight] = await Promise.all([
|
|
775
773
|
(0, element_install_api_1.prepareElementInstall)({
|
|
774
|
+
installationName: null,
|
|
776
775
|
destination: {
|
|
777
776
|
type: 'new-composition',
|
|
778
777
|
compositionFile: null,
|
|
@@ -780,6 +779,7 @@ const Canvas = ({ canvasContent, size }) => {
|
|
|
780
779
|
element: activeElementInstallRequest.element,
|
|
781
780
|
}),
|
|
782
781
|
(0, element_install_api_1.prepareElementInstall)({
|
|
782
|
+
installationName: null,
|
|
783
783
|
destination: {
|
|
784
784
|
type: 'current-composition',
|
|
785
785
|
compositionFile: activeElementInstallRequest.compositionFile,
|
|
@@ -1,12 +1,47 @@
|
|
|
1
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
|
+
})();
|
|
2
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
36
|
exports.CaptionInspector = void 0;
|
|
4
37
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const react_1 = require("react");
|
|
38
|
+
const react_1 = __importStar(require("react"));
|
|
6
39
|
const colors_1 = require("../helpers/colors");
|
|
40
|
+
const hoverable_1 = require("../helpers/hoverable");
|
|
7
41
|
const upload_1 = require("../icons/upload");
|
|
8
|
-
const
|
|
42
|
+
const modals_1 = require("../state/modals");
|
|
9
43
|
const CaptionTextEditor_1 = require("./CaptionTextEditor");
|
|
44
|
+
const InlineAction_1 = require("./InlineAction");
|
|
10
45
|
const CollapsibleInspectorSectionHeader_1 = require("./InspectorPanel/CollapsibleInspectorSectionHeader");
|
|
11
46
|
const common_1 = require("./InspectorPanel/common");
|
|
12
47
|
const styles_1 = require("./InspectorPanel/styles");
|
|
@@ -26,38 +61,57 @@ const readOnlyStatus = {
|
|
|
26
61
|
const CaptionInspector = ({ captions, expanded, onTextChange, onTextSave, onTextCancel, onReplaceCaptions, onToggle, readOnly, readOnlyTitle, }) => {
|
|
27
62
|
const fileInput = (0, react_1.useRef)(null);
|
|
28
63
|
const [isImporting, setIsImporting] = (0, react_1.useState)(false);
|
|
29
|
-
const
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
event.currentTarget.value = '';
|
|
33
|
-
if (!file || onReplaceCaptions === null) {
|
|
64
|
+
const { setSelectedModal } = react_1.default.useContext(modals_1.SetSelectedModalContext);
|
|
65
|
+
const importCaptions = (0, react_1.useCallback)(async ({ fileName, contents, }) => {
|
|
66
|
+
if (onReplaceCaptions === null) {
|
|
34
67
|
return;
|
|
35
68
|
}
|
|
36
69
|
setIsImporting(true);
|
|
37
70
|
try {
|
|
38
71
|
onReplaceCaptions((0, parse_caption_file_1.parseCaptionFile)({
|
|
39
|
-
fileName
|
|
40
|
-
contents: await
|
|
72
|
+
fileName,
|
|
73
|
+
contents: await contents,
|
|
41
74
|
}));
|
|
42
75
|
}
|
|
43
76
|
catch (error) {
|
|
44
|
-
(0, NotificationCenter_1.showNotification)(`Could not import ${
|
|
77
|
+
(0, NotificationCenter_1.showNotification)(`Could not import ${fileName}: ${error instanceof Error ? error.message : String(error)}`, 5000);
|
|
45
78
|
}
|
|
46
79
|
finally {
|
|
47
80
|
setIsImporting(false);
|
|
48
81
|
}
|
|
49
82
|
}, [onReplaceCaptions]);
|
|
83
|
+
const onFileSelected = (0, react_1.useCallback)((event) => {
|
|
84
|
+
var _a;
|
|
85
|
+
const file = (_a = event.currentTarget.files) === null || _a === void 0 ? void 0 : _a[0];
|
|
86
|
+
event.currentTarget.value = '';
|
|
87
|
+
if (!file) {
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
90
|
+
importCaptions({ fileName: file.name, contents: file.text() }).catch(() => undefined);
|
|
91
|
+
}, [importCaptions]);
|
|
92
|
+
const openCaptionSelection = (0, react_1.useCallback)(() => {
|
|
93
|
+
setSelectedModal({
|
|
94
|
+
type: 'quick-switcher',
|
|
95
|
+
mode: 'assets',
|
|
96
|
+
invocationTimestamp: Date.now(),
|
|
97
|
+
assetSelection: {
|
|
98
|
+
initialQuery: 'type:json',
|
|
99
|
+
onSelectFile: () => {
|
|
100
|
+
var _a;
|
|
101
|
+
return (_a = fileInput.current) === null || _a === void 0 ? void 0 : _a.click();
|
|
102
|
+
},
|
|
103
|
+
onSelected: (asset) => {
|
|
104
|
+
return importCaptions({
|
|
105
|
+
fileName: asset.name,
|
|
106
|
+
contents: fetch(asset.src).then((response) => response.text()),
|
|
107
|
+
}).catch(() => undefined);
|
|
108
|
+
},
|
|
109
|
+
},
|
|
110
|
+
compositionSelection: null,
|
|
111
|
+
});
|
|
112
|
+
}, [importCaptions, setSelectedModal]);
|
|
50
113
|
return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
51
114
|
jsx_runtime_1.jsx(common_1.InspectorSectionHeader, { children: jsx_runtime_1.jsx(CollapsibleInspectorSectionHeader_1.CollapsibleInspectorSectionHeader, { action: jsx_runtime_1.jsxs("div", { style: styles_1.sectionHeaderEnd, children: [onReplaceCaptions === null ? null : (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
52
|
-
jsx_runtime_1.jsx("input", { ref: fileInput, accept: ".json", "aria-label": "Import captions file", hidden: true, onChange:
|
|
53
|
-
alignItems: 'center',
|
|
54
|
-
display: 'flex',
|
|
55
|
-
gap: 4,
|
|
56
|
-
}, disabled: isImporting, onClick: () => {
|
|
57
|
-
var _a;
|
|
58
|
-
return (_a = fileInput.current) === null || _a === void 0 ? void 0 : _a.click();
|
|
59
|
-
}, size: "condensed", title: importTooltip, children: [
|
|
60
|
-
jsx_runtime_1.jsx(upload_1.UploadIcon, { "aria-hidden": "true", color: colors_1.CURRENT_COLOR, focusable: "false", style: { height: 12, width: 12 } }), isImporting ? 'Importing…' : 'Import'] })
|
|
61
|
-
] })), readOnly ? (jsx_runtime_1.jsx("div", { style: readOnlyStatus, title: readOnlyTitle !== null && readOnlyTitle !== void 0 ? readOnlyTitle : undefined, children: "Read only" })) : null] }), expanded: expanded, label: "Captions", onToggle: onToggle }) }), expanded ? (jsx_runtime_1.jsx(CaptionTextEditor_1.CaptionTextEditor, { captions: captions, onChange: onTextChange, onSave: onTextSave, onCancel: onTextCancel, readOnly: readOnly })) : null] }));
|
|
115
|
+
jsx_runtime_1.jsx("input", { ref: fileInput, accept: ".json", "aria-label": "Import captions file", hidden: true, onChange: onFileSelected, type: "file" }), jsx_runtime_1.jsx(InlineAction_1.InlineAction, { "aria-label": "Import captions", className: hoverable_1.FOCUS_VISIBLE_ONLY_CLASS_NAME, disabled: isImporting, onClick: openCaptionSelection, renderAction: (color) => (jsx_runtime_1.jsx(upload_1.UploadIcon, { "aria-hidden": "true", color: color, focusable: "false", style: { height: 14, width: 14 } })), title: importTooltip, variant: null })] })), readOnly ? (jsx_runtime_1.jsx("div", { style: readOnlyStatus, title: readOnlyTitle !== null && readOnlyTitle !== void 0 ? readOnlyTitle : undefined, children: "Read only" })) : null] }), expanded: expanded, label: "Captions", onToggle: onToggle }) }), expanded ? (jsx_runtime_1.jsx(CaptionTextEditor_1.CaptionTextEditor, { captions: captions, onChange: onTextChange, onSave: onTextSave, onCancel: onTextCancel, readOnly: readOnly })) : null] }));
|
|
62
116
|
};
|
|
63
117
|
exports.CaptionInspector = CaptionInspector;
|
|
@@ -3,17 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.CheckboardToggle = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("react");
|
|
6
|
-
const no_react_1 = require("remotion/no-react");
|
|
7
6
|
const colors_1 = require("../helpers/colors");
|
|
8
7
|
const use_keybinding_1 = require("../helpers/use-keybinding");
|
|
8
|
+
const use_keyboard_shortcut_label_1 = require("../helpers/use-keyboard-shortcut-label");
|
|
9
9
|
const checkerboard_1 = require("../state/checkerboard");
|
|
10
|
+
const ActionTooltip_1 = require("./ActionTooltip");
|
|
10
11
|
const ControlButton_1 = require("./ControlButton");
|
|
11
|
-
const accessibilityLabel = [
|
|
12
|
-
'Show transparency as checkerboard',
|
|
13
|
-
(0, use_keybinding_1.areKeyboardShortcutsDisabled)() ? null : '(T)',
|
|
14
|
-
]
|
|
15
|
-
.filter(no_react_1.NoReactInternals.truthy)
|
|
16
|
-
.join(' ');
|
|
17
12
|
const CheckboardToggle = () => {
|
|
18
13
|
const { checkerboard, setCheckerboard } = (0, react_1.useContext)(checkerboard_1.CheckerboardContext);
|
|
19
14
|
const onClick = (0, react_1.useCallback)(() => {
|
|
@@ -21,8 +16,12 @@ const CheckboardToggle = () => {
|
|
|
21
16
|
return !c;
|
|
22
17
|
});
|
|
23
18
|
}, [setCheckerboard]);
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
19
|
+
const shortcut = (0, use_keyboard_shortcut_label_1.useKeyboardShortcutLabel)('toggleCheckerboard');
|
|
20
|
+
const ariaKeyShortcuts = (0, use_keyboard_shortcut_label_1.useKeyboardShortcutAriaKeyShortcuts)('toggleCheckerboard');
|
|
21
|
+
const accessibilityLabel = 'Show transparency as checkerboard';
|
|
22
|
+
const shortcutsDisabled = (0, use_keybinding_1.areKeyboardShortcutsDisabled)();
|
|
23
|
+
return (jsx_runtime_1.jsx(ActionTooltip_1.ActionTooltip, { label: accessibilityLabel, shortcut: shortcutsDisabled ? null : shortcut, delay: 800, dismissOnClick: false, children: jsx_runtime_1.jsx(ControlButton_1.ControlButton, { title: "", "aria-label": accessibilityLabel, "aria-pressed": checkerboard, "aria-keyshortcuts": shortcutsDisabled ? undefined : ariaKeyShortcuts || undefined, onClick: onClick, children: (color) => (jsx_runtime_1.jsxs("svg", { "aria-hidden": "true", focusable: "false", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 512 512", style: { width: 18, height: 18 }, fill: "none", children: [
|
|
24
|
+
jsx_runtime_1.jsx("path", { fill: checkerboard ? colors_1.BLUE : color, d: "M256 48h184c13.3 0 24 10.7 24 24v184H256V48zM48 256h208v208H72c-13.3 0-24-10.7-24-24V256z" }), jsx_runtime_1.jsx("rect", { x: "48", y: "48", width: "416", height: "416", rx: "24", stroke: checkerboard ? colors_1.BLUE : color, strokeWidth: "32" }), jsx_runtime_1.jsx("path", { d: "M256 48v416M48 256h416", stroke: checkerboard ? colors_1.BLUE : color, strokeWidth: "32" })
|
|
25
|
+
] })) }) }));
|
|
27
26
|
};
|
|
28
27
|
exports.CheckboardToggle = CheckboardToggle;
|
|
@@ -8,6 +8,7 @@ export declare const Checkbox: React.FC<{
|
|
|
8
8
|
readonly checked: boolean;
|
|
9
9
|
readonly onChange: React.ChangeEventHandler<HTMLInputElement>;
|
|
10
10
|
readonly name: string;
|
|
11
|
+
readonly inputId?: string;
|
|
11
12
|
readonly disabled?: boolean;
|
|
12
13
|
readonly variant?: CheckboxVariant;
|
|
13
14
|
}>;
|
|
@@ -13,7 +13,7 @@ const CHECKMARK_SIZES = {
|
|
|
13
13
|
default: 14,
|
|
14
14
|
small: 13,
|
|
15
15
|
};
|
|
16
|
-
const Checkbox = ({ checked, onChange, disabled, name, variant = 'default' }) => {
|
|
16
|
+
const Checkbox = ({ checked, onChange, disabled, inputId, name, variant = 'default' }) => {
|
|
17
17
|
const size = SIZES[variant];
|
|
18
18
|
const checkmarkSize = CHECKMARK_SIZES[variant];
|
|
19
19
|
const background = (0, react_1.useMemo)(() => ({
|
|
@@ -47,7 +47,7 @@ const Checkbox = ({ checked, onChange, disabled, name, variant = 'default' }) =>
|
|
|
47
47
|
};
|
|
48
48
|
}, [disabled, size]);
|
|
49
49
|
return (jsx_runtime_1.jsxs("div", { style: background, children: [
|
|
50
|
-
jsx_runtime_1.jsx("input", { style: input, type: 'checkbox', checked: checked, onChange: onChange, disabled: disabled, name: name }), jsx_runtime_1.jsx("div", { style: box, children: checked ? jsx_runtime_1.jsx(Checkmark_1.Checkmark, { size: checkmarkSize }) : null })
|
|
50
|
+
jsx_runtime_1.jsx("input", { id: inputId, style: input, type: 'checkbox', checked: checked, onChange: onChange, disabled: disabled, name: name }), jsx_runtime_1.jsx("div", { style: box, children: checked ? jsx_runtime_1.jsx(Checkmark_1.Checkmark, { size: checkmarkSize }) : null })
|
|
51
51
|
] }));
|
|
52
52
|
};
|
|
53
53
|
exports.Checkbox = Checkbox;
|
|
@@ -7,6 +7,7 @@ const client_id_1 = require("../helpers/client-id");
|
|
|
7
7
|
const hoverable_1 = require("../helpers/hoverable");
|
|
8
8
|
const ellipsis_1 = require("../icons/ellipsis");
|
|
9
9
|
const InlineDropdown_1 = require("./InlineDropdown");
|
|
10
|
+
const layout_1 = require("./layout");
|
|
10
11
|
const revealStyle = {
|
|
11
12
|
display: 'flex',
|
|
12
13
|
};
|
|
@@ -26,6 +27,8 @@ const CompositionContextButton = ({ visible, getItems, readOnlyStudio }) => {
|
|
|
26
27
|
if (!visible || (connectionStatus !== 'connected' && !readOnlyStudio)) {
|
|
27
28
|
return null;
|
|
28
29
|
}
|
|
29
|
-
return (jsx_runtime_1.
|
|
30
|
+
return (jsx_runtime_1.jsxs("div", { className: hoverable_1.HOVER_GROUP_REVEAL_CLASS_NAME, style: revealStyle, children: [
|
|
31
|
+
jsx_runtime_1.jsx(layout_1.Spacing, { x: 0.5 }), jsx_runtime_1.jsx(InlineDropdown_1.InlineDropdown, { renderAction: renderAction, getItems: getItems, variant: null, style: hoverable_1.NO_HOVER_BACKGROUND_STYLE, className: hoverable_1.FOCUS_VISIBLE_ONLY_CLASS_NAME })
|
|
32
|
+
] }));
|
|
30
33
|
};
|
|
31
34
|
exports.CompositionContextButton = CompositionContextButton;
|
|
@@ -513,7 +513,7 @@ const CompositionSelectorItem = ({ item, level, currentComposition, tabIndex, se
|
|
|
513
513
|
if (item.type === 'folder') {
|
|
514
514
|
const folderPath = getFolderPath(item);
|
|
515
515
|
return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
516
|
-
jsx_runtime_1.jsx(ContextMenu_1.ContextMenu, { getItems: getContextMenuItems, children: jsx_runtime_1.jsxs("div", { style: reorderWrapper, children: [reorderLineStyle ? (jsx_runtime_1.jsx("div", { "data-composition-reorder-line": true, style: reorderLineStyle })) : null, jsx_runtime_1.jsx(layout_1.Row, { align: "center", children: jsx_runtime_1.jsxs("div", { style: style, className: `__remotion-composition-selector-item ${hoverable_1.HOVERABLE_CLASS_NAME} ${hoverable_1.HOVER_GROUP_CLASS_NAME}`, tabIndex: tabIndex, onClick: onClick, onKeyDown: onKeyDown, draggable: !window.remotion_isReadOnlyStudio, onDragStart: onItemDragStart, onDragEnd: onItemDragEnd, onDragOver: onRowDragOver, onDragLeave: onRowDragLeave, onDrop: onRowDrop, title: item.folderName, role: "button", "aria-expanded": item.expanded, children: [item.expanded ? (jsx_runtime_1.jsx(folder_1.ExpandedFolderIcon, { style: iconStyle, color: colors_1.CURRENT_COLOR })) : (jsx_runtime_1.jsx(folder_1.CollapsedFolderIcon, { color: colors_1.CURRENT_COLOR, style: iconStyle })), jsx_runtime_1.jsx(layout_1.Spacing, { x: 1 }), jsx_runtime_1.jsx("div", { style: labelStyle, children: item.folderName }), jsx_runtime_1.jsx(
|
|
516
|
+
jsx_runtime_1.jsx(ContextMenu_1.ContextMenu, { getItems: getContextMenuItems, children: jsx_runtime_1.jsxs("div", { style: reorderWrapper, children: [reorderLineStyle ? (jsx_runtime_1.jsx("div", { "data-composition-reorder-line": true, style: reorderLineStyle })) : null, jsx_runtime_1.jsx(layout_1.Row, { align: "center", children: jsx_runtime_1.jsxs("div", { style: style, className: `__remotion-composition-selector-item ${hoverable_1.HOVERABLE_CLASS_NAME} ${hoverable_1.HOVER_GROUP_CLASS_NAME}`, tabIndex: tabIndex, onClick: onClick, onKeyDown: onKeyDown, draggable: !window.remotion_isReadOnlyStudio, onDragStart: onItemDragStart, onDragEnd: onItemDragEnd, onDragOver: onRowDragOver, onDragLeave: onRowDragLeave, onDrop: onRowDrop, title: item.folderName, role: "button", "aria-expanded": item.expanded, children: [item.expanded ? (jsx_runtime_1.jsx(folder_1.ExpandedFolderIcon, { style: iconStyle, color: colors_1.CURRENT_COLOR })) : (jsx_runtime_1.jsx(folder_1.CollapsedFolderIcon, { color: colors_1.CURRENT_COLOR, style: iconStyle })), jsx_runtime_1.jsx(layout_1.Spacing, { x: 1 }), jsx_runtime_1.jsx("div", { style: labelStyle, children: item.folderName }), jsx_runtime_1.jsx(CompositionContextButton_1.CompositionContextButton, { getItems: getContextMenuItems, visible: true, readOnlyStudio: window.remotion_isReadOnlyStudio })
|
|
517
517
|
] }) })
|
|
518
518
|
] }) }), item.expanded ? (jsx_runtime_1.jsx("div", { onDragOver: onFolderChildListDragOver, onDrop: onFolderChildListDrop, children: item.items.map((childItem, index) => {
|
|
519
519
|
return (jsx_runtime_1.jsx(exports.CompositionSelectorItem, { currentComposition: currentComposition, selectComposition: selectComposition, item: childItem, tabIndex: tabIndex, level: level + 1, toggleFolder: toggleFolder, clearRootDragHover: clearRootDragHover, canReorder: canReorder, activeDragRef: activeDragRef, parentFolderPath: folderPath, previousSibling: index === 0 ? null : item.items[index - 1], nextSibling: index === item.items.length - 1
|
|
@@ -522,7 +522,7 @@ const CompositionSelectorItem = ({ item, level, currentComposition, tabIndex, se
|
|
|
522
522
|
}) })) : null] }));
|
|
523
523
|
}
|
|
524
524
|
return (jsx_runtime_1.jsx(ContextMenu_1.ContextMenu, { getItems: getContextMenuItems, children: jsx_runtime_1.jsxs("div", { style: reorderWrapper, children: [reorderLineStyle ? (jsx_runtime_1.jsx("div", { "data-composition-reorder-line": true, style: reorderLineStyle })) : null, jsx_runtime_1.jsx(layout_1.Row, { align: "center", children: jsx_runtime_1.jsxs("a", { ref: compositionRowRef, style: style, tabIndex: tabIndex, onClick: onClick, onKeyDown: onKeyDown, draggable: !window.remotion_isReadOnlyStudio, onDragStart: onItemDragStart, onDragEnd: onItemDragEnd, onDragOver: onRowDragOver, onDragLeave: onRowDragLeave, onDrop: onRowDrop, type: "button", title: item.composition.id, className: `__remotion-composition __remotion-composition-selector-item ${hoverable_1.HOVERABLE_CLASS_NAME} ${hoverable_1.HOVER_GROUP_CLASS_NAME}`, "data-compname": item.composition.id, children: [
|
|
525
|
-
jsx_runtime_1.jsx(CompositionOrStillIcon_1.CompositionOrStillIcon, { composition: item.composition, color: colors_1.CURRENT_COLOR, style: iconStyle }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 1 }), jsx_runtime_1.jsx("div", { style: labelStyle, children: item.composition.id }), jsx_runtime_1.jsx(
|
|
525
|
+
jsx_runtime_1.jsx(CompositionOrStillIcon_1.CompositionOrStillIcon, { composition: item.composition, color: colors_1.CURRENT_COLOR, style: iconStyle }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 1 }), jsx_runtime_1.jsx("div", { style: labelStyle, children: item.composition.id }), jsx_runtime_1.jsx(CompositionContextButton_1.CompositionContextButton, { getItems: getContextMenuItems, visible: !isDragging, readOnlyStudio: window.remotion_isReadOnlyStudio }), jsx_runtime_1.jsx(SidebarRenderButton_1.SidebarRenderButton, { visible: !isDragging, composition: item.composition, readOnlyStudio: window.remotion_isReadOnlyStudio })
|
|
526
526
|
] }) })
|
|
527
527
|
] }) }));
|
|
528
528
|
};
|
|
@@ -171,7 +171,7 @@ const LicenseSettings = () => {
|
|
|
171
171
|
const displayedError = error !== null && error !== void 0 ? error : settingsError;
|
|
172
172
|
return (jsx_runtime_1.jsx("div", { style: container, children: jsx_runtime_1.jsxs("div", { style: content, children: [
|
|
173
173
|
jsx_runtime_1.jsx(LicenseExplanation_1.LicenseExplanation, {}), jsx_runtime_1.jsx(layout_1.Spacing, { y: 2 }), jsx_runtime_1.jsxs("div", { "aria-label": "License type", role: "radiogroup", children: [
|
|
174
|
-
jsx_runtime_1.jsx(RadioButton_1.RadioButton, { checked: licenseType === 'free', onClick: toggleFreeLicense, children: "I am eligible for the Free License" }), licenseType === 'free' ? (jsx_runtime_1.jsx("p", { style: freeLicenseMessage, children: "That's it! Enjoy Remotion." })) : null, jsx_runtime_1.jsx(RadioButton_1.RadioButton, { checked: licenseType === 'company', onClick: toggleCompanyLicense, children: "I need a Company License" }), licenseType === 'company' ? (jsx_runtime_1.jsxs("div", { style: companyLicenseContent, children: [
|
|
174
|
+
jsx_runtime_1.jsx(RadioButton_1.RadioButton, { checked: licenseType === 'free', disabled: false, onClick: toggleFreeLicense, children: "I am eligible for the Free License" }), licenseType === 'free' ? (jsx_runtime_1.jsx("p", { style: freeLicenseMessage, children: "That's it! Enjoy Remotion." })) : null, jsx_runtime_1.jsx(RadioButton_1.RadioButton, { checked: licenseType === 'company', disabled: false, onClick: toggleCompanyLicense, children: "I need a Company License" }), licenseType === 'company' ? (jsx_runtime_1.jsxs("div", { style: companyLicenseContent, children: [
|
|
175
175
|
jsx_runtime_1.jsxs("p", { style: description, children: ["Visit", ' ', jsx_runtime_1.jsxs("a", { style: externalDescriptionLink, href: "https://remotion.pro/license", target: "_blank", rel: "noopener noreferrer", children: ["remotion.pro/license",
|
|
176
176
|
jsx_runtime_1.jsx("svg", { "aria-hidden": "true", viewBox: "0 0 16 16", style: externalLinkIndicator, children: jsx_runtime_1.jsx("path", { d: "M4 12 12 4M6 4h6v6", fill: "none", stroke: colors_1.BLUE, strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.5" }) })
|
|
177
177
|
] }), ' ', "to obtain a license key. Then enter it here."] }), jsx_runtime_1.jsxs("label", { style: inputLabel, children: ["Public license key",
|