@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,6 +4,7 @@ exports.SegmentedControl = void 0;
|
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("react");
|
|
6
6
|
const colors_1 = require("../helpers/colors");
|
|
7
|
+
const hoverable_1 = require("../helpers/hoverable");
|
|
7
8
|
const z_index_1 = require("../state/z-index");
|
|
8
9
|
const container = {
|
|
9
10
|
display: 'flex',
|
|
@@ -19,6 +20,7 @@ const item = {
|
|
|
19
20
|
fontSize: 15,
|
|
20
21
|
padding: '4px 12px',
|
|
21
22
|
appearance: 'none',
|
|
23
|
+
cursor: 'default',
|
|
22
24
|
border: 'none',
|
|
23
25
|
flex: 1,
|
|
24
26
|
justifyContent: 'center',
|
|
@@ -30,6 +32,12 @@ const compactItem = {
|
|
|
30
32
|
fontWeight: 400,
|
|
31
33
|
padding: '2px 7px',
|
|
32
34
|
};
|
|
35
|
+
const mediumItem = {
|
|
36
|
+
...item,
|
|
37
|
+
fontSize: 13,
|
|
38
|
+
fontWeight: 400,
|
|
39
|
+
padding: '3px 10px',
|
|
40
|
+
};
|
|
33
41
|
const SegmentedControl = ({ items, needsWrapping, size = 'default' }) => {
|
|
34
42
|
const controlStyle = (0, react_1.useMemo)(() => {
|
|
35
43
|
if (needsWrapping) {
|
|
@@ -45,26 +53,43 @@ const SegmentedControl = ({ items, needsWrapping, size = 'default' }) => {
|
|
|
45
53
|
...container,
|
|
46
54
|
};
|
|
47
55
|
}, [needsWrapping]);
|
|
48
|
-
|
|
56
|
+
const onKeyDown = (0, react_1.useCallback)((event) => {
|
|
57
|
+
if (!['ArrowLeft', 'ArrowRight', 'ArrowUp', 'ArrowDown'].includes(event.key)) {
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
const buttons = Array.from(event.currentTarget.querySelectorAll('button:not(:disabled)'));
|
|
61
|
+
const index = buttons.indexOf(event.target);
|
|
62
|
+
if (index === -1) {
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
event.preventDefault();
|
|
66
|
+
const direction = event.key === 'ArrowLeft' || event.key === 'ArrowUp' ? -1 : 1;
|
|
67
|
+
const next = buttons[(index + direction + buttons.length) % buttons.length];
|
|
68
|
+
next.click();
|
|
69
|
+
requestAnimationFrame(() => next.focus());
|
|
70
|
+
}, []);
|
|
71
|
+
return (jsx_runtime_1.jsx("div", { style: controlStyle, onKeyDown: onKeyDown, children: items.map((i) => {
|
|
49
72
|
return (jsx_runtime_1.jsx(Item, { onClick: i.onClick, selected: i.selected, size: size, children: i.label }, i.key));
|
|
50
73
|
}) }));
|
|
51
74
|
};
|
|
52
75
|
exports.SegmentedControl = SegmentedControl;
|
|
53
76
|
const Item = ({ selected, onClick, children, size }) => {
|
|
54
|
-
const [hovered, setHovered] = (0, react_1.useState)(false);
|
|
55
77
|
const { tabIndex } = (0, z_index_1.useZIndex)();
|
|
56
|
-
const onPointerEnter = (0, react_1.useCallback)(() => {
|
|
57
|
-
setHovered(true);
|
|
58
|
-
}, []);
|
|
59
|
-
const onPointerLeave = (0, react_1.useCallback)(() => {
|
|
60
|
-
setHovered(false);
|
|
61
|
-
}, []);
|
|
62
78
|
const itemStyle = (0, react_1.useMemo)(() => {
|
|
63
79
|
return {
|
|
64
|
-
...(size === 'compact'
|
|
65
|
-
|
|
66
|
-
|
|
80
|
+
...(size === 'compact'
|
|
81
|
+
? compactItem
|
|
82
|
+
: size === 'medium'
|
|
83
|
+
? mediumItem
|
|
84
|
+
: item),
|
|
85
|
+
opacity: onClick === null ? 0.5 : 1,
|
|
86
|
+
...(0, hoverable_1.hoverableStyle)({
|
|
87
|
+
idleBackground: selected ? colors_1.INPUT_BACKGROUND : colors_1.TRANSPARENT,
|
|
88
|
+
hoverBackground: selected ? colors_1.INPUT_BACKGROUND : colors_1.TRANSPARENT,
|
|
89
|
+
idleColor: selected ? colors_1.WHITE : colors_1.LIGHT_TEXT,
|
|
90
|
+
hoverColor: onClick === null ? colors_1.LIGHT_TEXT : colors_1.WHITE,
|
|
91
|
+
}),
|
|
67
92
|
};
|
|
68
|
-
}, [
|
|
69
|
-
return (jsx_runtime_1.jsx("button", { type: "button",
|
|
93
|
+
}, [onClick, selected, size]);
|
|
94
|
+
return (jsx_runtime_1.jsx("button", { type: "button", "aria-pressed": selected, disabled: onClick === null, className: `${hoverable_1.HOVERABLE_CLASS_NAME} ${hoverable_1.FOCUS_VISIBLE_ONLY_CLASS_NAME}`, style: itemStyle, tabIndex: tabIndex, onClick: onClick !== null && onClick !== void 0 ? onClick : undefined, children: children }));
|
|
70
95
|
};
|
|
@@ -345,7 +345,7 @@ const SelectedOutlinePolygonUnmemoized = ({ compositionHeight, compositionWidth,
|
|
|
345
345
|
setDragOverrides,
|
|
346
346
|
translateWithCommandKey,
|
|
347
347
|
]);
|
|
348
|
-
const
|
|
348
|
+
const performDoubleClick = react_1.default.useCallback((event) => {
|
|
349
349
|
const target = getTarget();
|
|
350
350
|
if (target === undefined) {
|
|
351
351
|
return;
|
|
@@ -356,6 +356,12 @@ const SelectedOutlinePolygonUnmemoized = ({ compositionHeight, compositionWidth,
|
|
|
356
356
|
event.preventDefault();
|
|
357
357
|
event.stopPropagation();
|
|
358
358
|
}, [dragAwareDoubleClick, getTarget, onDoubleClickTarget]);
|
|
359
|
+
const onClick = react_1.default.useCallback((event) => {
|
|
360
|
+
if (!dragAwareDoubleClick.acceptClickAsDoubleClick(event)) {
|
|
361
|
+
return;
|
|
362
|
+
}
|
|
363
|
+
performDoubleClick(event);
|
|
364
|
+
}, [dragAwareDoubleClick, performDoubleClick]);
|
|
359
365
|
const onEffectDragOver = react_1.default.useCallback((event) => {
|
|
360
366
|
if (!(0, effect_drag_and_drop_1.hasEffectDragType)(event.dataTransfer)) {
|
|
361
367
|
return;
|
|
@@ -411,6 +417,6 @@ const SelectedOutlinePolygonUnmemoized = ({ compositionHeight, compositionWidth,
|
|
|
411
417
|
if (!dragging) {
|
|
412
418
|
onHoverChange(null);
|
|
413
419
|
}
|
|
414
|
-
}, onPointerDown: onPointerDown, onPointerDownCapture: dragAwareDoubleClick.beginPointerGesture,
|
|
420
|
+
}, onPointerDown: onPointerDown, onPointerDownCapture: dragAwareDoubleClick.beginPointerGesture, onClick: onClick, onDragOver: onEffectDragOver, onDragLeave: onEffectDragLeave, onDrop: onEffectDrop }));
|
|
415
421
|
};
|
|
416
422
|
exports.SelectedOutlinePolygon = react_1.default.memo(SelectedOutlinePolygonUnmemoized);
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SettingsButton = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_1 = require("react");
|
|
6
|
+
const browser_studio_operations_1 = require("../helpers/browser-studio-operations");
|
|
7
|
+
const colors_1 = require("../helpers/colors");
|
|
8
|
+
const gear_1 = require("../icons/gear");
|
|
9
|
+
const modals_1 = require("../state/modals");
|
|
10
|
+
const ActionTooltip_1 = require("./ActionTooltip");
|
|
11
|
+
const InlineAction_1 = require("./InlineAction");
|
|
12
|
+
const UpdateStatusContext_1 = require("./UpdateStatusContext");
|
|
13
|
+
const SettingsButton = ({ showUpdates }) => {
|
|
14
|
+
const { setSelectedModal } = (0, react_1.useContext)(modals_1.SetSelectedModalContext);
|
|
15
|
+
const { info, knownBugs } = (0, UpdateStatusContext_1.useUpdateStatus)();
|
|
16
|
+
const updateAvailable = showUpdates &&
|
|
17
|
+
Boolean((info === null || info === void 0 ? void 0 : info.updateAvailable) || (info === null || info === void 0 ? void 0 : info.skillsUpdateAvailable));
|
|
18
|
+
const hasBugfixesAvailable = showUpdates &&
|
|
19
|
+
Boolean((info === null || info === void 0 ? void 0 : info.updateAvailable) && knownBugs && knownBugs.length > 0);
|
|
20
|
+
const openModal = (0, react_1.useCallback)(() => {
|
|
21
|
+
var _a;
|
|
22
|
+
var _b;
|
|
23
|
+
setSelectedModal({
|
|
24
|
+
type: 'settings',
|
|
25
|
+
initialTab: updateAvailable
|
|
26
|
+
? 'updates'
|
|
27
|
+
: (0, browser_studio_operations_1.getBrowserStudioOperations)() === null
|
|
28
|
+
? 'studio'
|
|
29
|
+
: 'shortcuts',
|
|
30
|
+
initialPublicLicenseKey: (_b = (_a = window.remotion_renderDefaults) === null || _a === void 0 ? void 0 : _a.publicLicenseKey) !== null && _b !== void 0 ? _b : null,
|
|
31
|
+
});
|
|
32
|
+
}, [setSelectedModal, updateAvailable]);
|
|
33
|
+
const renderGearIcon = (0, react_1.useCallback)((color) => {
|
|
34
|
+
return jsx_runtime_1.jsx(gear_1.GearIcon, { color: color, width: 16, height: 16 });
|
|
35
|
+
}, []);
|
|
36
|
+
const renderUpdateIcon = (0, react_1.useCallback)((color) => {
|
|
37
|
+
return (jsx_runtime_1.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", style: {
|
|
38
|
+
height: 16,
|
|
39
|
+
width: 16,
|
|
40
|
+
color,
|
|
41
|
+
flexShrink: 0,
|
|
42
|
+
}, viewBox: "0 0 512 512", children: jsx_runtime_1.jsx("path", { fill: color, d: "M256 32a224 224 0 1 1 0 448 224 224 0 1 1 0-448zm0 480a256 256 0 1 0 0-512 256 256 0 1 0 0 512zM377 231L273 127c-9.4-9.4-24.6-9.4-33.9 0L135 231c-6.9 6.9-8.9 17.2-5.2 26.2S142.3 272 152 272l40 0 0 72c0 22.1 17.9 40 40 40l48 0c22.1 0 40-17.9 40-40l0-72 40 0c9.7 0 18.5-5.8 22.2-14.8s1.7-19.3-5.2-26.2z" }) }));
|
|
43
|
+
}, []);
|
|
44
|
+
const label = hasBugfixesAvailable
|
|
45
|
+
? 'Bugfixes available'
|
|
46
|
+
: updateAvailable
|
|
47
|
+
? 'Update available'
|
|
48
|
+
: 'Settings';
|
|
49
|
+
return (jsx_runtime_1.jsx(ActionTooltip_1.ActionTooltip, { label: label, shortcut: null, delay: 800, dismissOnClick: true, children: jsx_runtime_1.jsx(InlineAction_1.InlineAction, { variant: null, onClick: openModal, renderAction: updateAvailable ? renderUpdateIcon : renderGearIcon, unhoveredColor: hasBugfixesAvailable ? colors_1.WARNING_COLOR : colors_1.WHITE_ALPHA_80, title: "", "aria-label": label }) }));
|
|
50
|
+
};
|
|
51
|
+
exports.SettingsButton = SettingsButton;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
type SettingsTab = 'apps' | 'rendering' | 'studio' | 'packages' | 'shortcuts' | 'skills' | 'license' | 'updates';
|
|
2
|
+
type SettingsTab = 'apps' | 'rendering' | 'studio' | 'packages' | 'models' | 'shortcuts' | 'skills' | 'license' | 'updates';
|
|
3
3
|
export declare const SettingsModal: React.FC<{
|
|
4
4
|
readonly initialTab: SettingsTab;
|
|
5
5
|
readonly initialPublicLicenseKey: string | null;
|
|
@@ -10,6 +10,7 @@ const apps_1 = require("../icons/apps");
|
|
|
10
10
|
const cloud_download_1 = require("../icons/cloud-download");
|
|
11
11
|
const keyboard_1 = require("../icons/keyboard");
|
|
12
12
|
const license_1 = require("../icons/license");
|
|
13
|
+
const models_1 = require("../icons/models");
|
|
13
14
|
const package_1 = require("../icons/package");
|
|
14
15
|
const remotion_triangle_1 = require("../icons/remotion-triangle");
|
|
15
16
|
const skills_1 = require("../icons/skills");
|
|
@@ -21,6 +22,7 @@ const InstallPackage_1 = require("./InstallPackage");
|
|
|
21
22
|
const KeyboardShortcutsSettings_1 = require("./KeyboardShortcutsSettings");
|
|
22
23
|
const is_menu_item_1 = require("./Menu/is-menu-item");
|
|
23
24
|
const ModalHeader_1 = require("./ModalHeader");
|
|
25
|
+
const ModelsSettings_1 = require("./ModelsSettings");
|
|
24
26
|
const DismissableModal_1 = require("./NewComposition/DismissableModal");
|
|
25
27
|
const RenderingSettings_1 = require("./RenderingSettings");
|
|
26
28
|
const render_modals_1 = require("./RenderModal/render-modals");
|
|
@@ -102,6 +104,6 @@ const SettingsModal = ({ initialPublicLicenseKey, initialTab }) => {
|
|
|
102
104
|
}, [initialPublicLicenseKey, setPublicLicenseKey]);
|
|
103
105
|
return (jsx_runtime_1.jsx(DismissableModal_1.DismissableModal, { panelStyle: render_modals_1.outerModalStyle, children: jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
104
106
|
jsx_runtime_1.jsx(ModalHeader_1.ModalHeader, { title: "Settings", onClose: dismiss }), jsx_runtime_1.jsxs("div", { style: render_modals_1.horizontalLayout, children: [
|
|
105
|
-
jsx_runtime_1.jsxs("div", { style: settingsLeftSidebar, children: [isBrowserStudio ? null : (jsx_runtime_1.jsx(vertical_1.VerticalTab, { style: render_modals_1.horizontalTab, selected: tab === '
|
|
107
|
+
jsx_runtime_1.jsxs("div", { style: settingsLeftSidebar, children: [isBrowserStudio ? null : (jsx_runtime_1.jsx(vertical_1.VerticalTab, { style: render_modals_1.horizontalTab, selected: tab === 'studio', onClick: () => selectTab('studio'), renderIcon: (color) => (jsx_runtime_1.jsx("div", { style: render_modals_1.iconContainer, children: jsx_runtime_1.jsx(remotion_triangle_1.RemotionTriangleIcon, { color: color, style: render_modals_1.icon }) })), children: "Studio" })), isBrowserStudio ? null : (jsx_runtime_1.jsx(vertical_1.VerticalTab, { style: render_modals_1.horizontalTab, selected: tab === 'rendering', onClick: () => selectTab('rendering'), renderIcon: (color) => (jsx_runtime_1.jsx("div", { style: render_modals_1.iconContainer, children: jsx_runtime_1.jsx(video_1.FilmIcon, { color: color, style: render_modals_1.icon }) })), children: "Defaults" })), jsx_runtime_1.jsx(vertical_1.VerticalTab, { style: render_modals_1.horizontalTab, selected: tab === 'shortcuts', onClick: () => selectTab('shortcuts'), renderIcon: (color) => (jsx_runtime_1.jsx("div", { style: render_modals_1.iconContainer, children: jsx_runtime_1.jsx(keyboard_1.KeyboardIcon, { color: color, style: keyboardIcon }) })), children: "Shortcuts" }), showPackages ? (jsx_runtime_1.jsx(vertical_1.VerticalTab, { style: render_modals_1.horizontalTab, selected: tab === 'packages', onClick: () => selectTab('packages'), renderIcon: (color) => (jsx_runtime_1.jsx("div", { style: render_modals_1.iconContainer, children: jsx_runtime_1.jsx(package_1.PackageIcon, { color: color, style: render_modals_1.icon }) })), children: "Packages" })) : null, isBrowserStudio ? null : (jsx_runtime_1.jsx(vertical_1.VerticalTab, { style: render_modals_1.horizontalTab, selected: tab === 'skills', onClick: () => selectTab('skills'), renderIcon: (color) => (jsx_runtime_1.jsx("div", { style: render_modals_1.iconContainer, children: jsx_runtime_1.jsx(skills_1.SkillsIcon, { color: color, style: skillsIcon }) })), children: "Skills" })), jsx_runtime_1.jsx(vertical_1.VerticalTab, { style: render_modals_1.horizontalTab, selected: tab === 'models', onClick: () => selectTab('models'), renderIcon: (color) => (jsx_runtime_1.jsx("div", { style: render_modals_1.iconContainer, children: jsx_runtime_1.jsx(models_1.ModelsIcon, { color: color, style: render_modals_1.icon }) })), children: "Models" }), isBrowserStudio ? null : (jsx_runtime_1.jsx(vertical_1.VerticalTab, { style: render_modals_1.horizontalTab, selected: tab === 'apps', onClick: () => selectTab('apps'), renderIcon: (color) => (jsx_runtime_1.jsx("div", { style: render_modals_1.iconContainer, children: jsx_runtime_1.jsx(apps_1.AppsIcon, { color: color, style: appsIcon }) })), children: "Apps" })), isBrowserStudio ? null : (jsx_runtime_1.jsx(vertical_1.VerticalTab, { style: render_modals_1.horizontalTab, selected: tab === 'license', onClick: () => selectTab('license'), renderIcon: (color) => (jsx_runtime_1.jsx("div", { style: render_modals_1.iconContainer, children: jsx_runtime_1.jsx(license_1.LicenseIcon, { color: color, style: render_modals_1.icon }) })), children: "License" })), showUpdates ? (jsx_runtime_1.jsx(vertical_1.VerticalTab, { style: render_modals_1.horizontalTab, selected: tab === 'updates', onClick: () => selectTab('updates'), renderIcon: (color) => (jsx_runtime_1.jsx("div", { style: render_modals_1.iconContainer, children: jsx_runtime_1.jsx(cloud_download_1.CloudDownloadIcon, { color: color, style: render_modals_1.icon }) })), children: "Updates" })) : null] }), openedTabs.includes('packages') ? (jsx_runtime_1.jsx("div", { style: tab === 'packages' ? render_modals_1.optionsPanel : hiddenPanel, children: jsx_runtime_1.jsx(InstallPackage_1.InstallPackageSettings, { footerContainer: packagesFooterContainer, packageManager: packageManager }) })) : null, openedTabs.includes('apps') ? (jsx_runtime_1.jsx("div", { style: tab === 'apps' ? settingsOptionsPanel : hiddenPanel, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, children: jsx_runtime_1.jsx(ConfigureDefaultEditorModal_1.DefaultEditorSettings, {}) })) : null, openedTabs.includes('models') ? (jsx_runtime_1.jsx("div", { style: tab === 'models' ? settingsOptionsPanel : hiddenPanel, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, children: jsx_runtime_1.jsx(ModelsSettings_1.ModelsSettings, {}) })) : null, openedTabs.includes('license') ? (jsx_runtime_1.jsx("div", { style: tab === 'license' ? settingsOptionsPanel : hiddenPanel, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, children: jsx_runtime_1.jsx(ConfigureLicenseModal_1.LicenseSettings, {}) })) : null, openedTabs.includes('skills') ? (jsx_runtime_1.jsx("div", { style: tab === 'skills' ? settingsOptionsPanel : hiddenPanel, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, children: jsx_runtime_1.jsx(SkillsSettings_1.SkillsSettings, {}) })) : null, openedTabs.includes('shortcuts') ? (jsx_runtime_1.jsx("div", { style: tab === 'shortcuts' ? settingsOptionsPanel : hiddenPanel, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, children: jsx_runtime_1.jsx(KeyboardShortcutsSettings_1.KeyboardShortcutsSettings, {}) })) : null, openedTabs.includes('rendering') ? (jsx_runtime_1.jsx("div", { style: tab === 'rendering' ? settingsOptionsPanel : hiddenPanel, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, children: jsx_runtime_1.jsx(RenderingSettings_1.RenderingSettings, {}) })) : null, openedTabs.includes('studio') ? (jsx_runtime_1.jsx("div", { style: tab === 'studio' ? settingsOptionsPanel : hiddenPanel, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, children: jsx_runtime_1.jsx(StudioSettings_1.StudioSettings, {}) })) : null, showUpdates && openedTabs.includes('updates') ? (jsx_runtime_1.jsx("div", { style: tab === 'updates' ? settingsOptionsPanel : hiddenPanel, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, children: jsx_runtime_1.jsx(UpdatesSettings_1.UpdatesSettings, {}) })) : null] }), tab === 'packages' ? (jsx_runtime_1.jsx("div", { ref: setPackagesFooterContainer })) : isBrowserStudio || tab === 'models' || tab === 'updates' ? null : (jsx_runtime_1.jsx(SettingsModalFooter_1.SettingsModalFooter, { showLicenseFaq: tab === 'license' }))] }) }));
|
|
106
108
|
};
|
|
107
109
|
exports.SettingsModal = SettingsModal;
|
|
@@ -5,9 +5,21 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
5
5
|
const react_1 = require("react");
|
|
6
6
|
const editor_outlines_1 = require("../state/editor-outlines");
|
|
7
7
|
const timeline_sequence_hover_1 = require("../state/timeline-sequence-hover");
|
|
8
|
+
const browserStudioPointerLeaveEvent = 'remotion-browser-studio-pointerleave';
|
|
8
9
|
const ShowOutlinesProvider = ({ children }) => {
|
|
9
10
|
const [editorShowOutlines, setEditorShowOutlinesState] = (0, react_1.useState)(() => (0, editor_outlines_1.loadEditorShowOutlinesOption)());
|
|
10
11
|
const timelineSequenceHoverStore = (0, react_1.useMemo)(() => (0, timeline_sequence_hover_1.createTimelineSequenceHoverStore)(), []);
|
|
12
|
+
(0, react_1.useEffect)(() => {
|
|
13
|
+
const onPointerLeave = () => {
|
|
14
|
+
timelineSequenceHoverStore.setHoveredSequence((hover) => (hover === null || hover === void 0 ? void 0 : hover.source) === 'timeline' ? null : hover);
|
|
15
|
+
};
|
|
16
|
+
window.addEventListener('pointerleave', onPointerLeave);
|
|
17
|
+
window.addEventListener(browserStudioPointerLeaveEvent, onPointerLeave);
|
|
18
|
+
return () => {
|
|
19
|
+
window.removeEventListener('pointerleave', onPointerLeave);
|
|
20
|
+
window.removeEventListener(browserStudioPointerLeaveEvent, onPointerLeave);
|
|
21
|
+
};
|
|
22
|
+
}, [timelineSequenceHoverStore]);
|
|
11
23
|
const setEditorShowOutlines = (0, react_1.useCallback)((newValue) => {
|
|
12
24
|
setEditorShowOutlinesState((prevState) => {
|
|
13
25
|
const newVal = newValue(prevState);
|
|
@@ -3,10 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.SidebarCollapserControl = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("react");
|
|
6
|
-
const ShortcutHint_1 = require("../error-overlay/remotion-overlay/ShortcutHint");
|
|
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 sidebar_1 = require("../state/sidebar");
|
|
10
|
+
const ActionTooltip_1 = require("./ActionTooltip");
|
|
10
11
|
const InlineAction_1 = require("./InlineAction");
|
|
11
12
|
const TopPanel_1 = require("./TopPanel");
|
|
12
13
|
const style = {
|
|
@@ -92,8 +93,7 @@ const SidebarCollapserControl = ({ side }) => {
|
|
|
92
93
|
if (side === 'left') {
|
|
93
94
|
const left = keybindings.registerKeybinding({
|
|
94
95
|
event: 'keydown',
|
|
95
|
-
|
|
96
|
-
commandCtrlKey: true,
|
|
96
|
+
action: 'toggleLeftSidebar',
|
|
97
97
|
callback: toggleLeft,
|
|
98
98
|
preventDefault: true,
|
|
99
99
|
triggerIfInputFieldFocused: false,
|
|
@@ -101,8 +101,7 @@ const SidebarCollapserControl = ({ side }) => {
|
|
|
101
101
|
});
|
|
102
102
|
const zen = keybindings.registerKeybinding({
|
|
103
103
|
event: 'keydown',
|
|
104
|
-
|
|
105
|
-
commandCtrlKey: true,
|
|
104
|
+
action: 'toggleBothSidebars',
|
|
106
105
|
callback: toggleBoth,
|
|
107
106
|
preventDefault: true,
|
|
108
107
|
triggerIfInputFieldFocused: false,
|
|
@@ -115,8 +114,7 @@ const SidebarCollapserControl = ({ side }) => {
|
|
|
115
114
|
}
|
|
116
115
|
const right = keybindings.registerKeybinding({
|
|
117
116
|
event: 'keydown',
|
|
118
|
-
|
|
119
|
-
commandCtrlKey: true,
|
|
117
|
+
action: 'toggleRightSidebar',
|
|
120
118
|
callback: toggleRight,
|
|
121
119
|
preventDefault: true,
|
|
122
120
|
triggerIfInputFieldFocused: false,
|
|
@@ -126,12 +124,13 @@ const SidebarCollapserControl = ({ side }) => {
|
|
|
126
124
|
right.unregister();
|
|
127
125
|
};
|
|
128
126
|
}, [keybindings, side, toggleBoth, toggleLeft, toggleRight]);
|
|
129
|
-
const
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
const
|
|
133
|
-
|
|
134
|
-
|
|
127
|
+
const action = side === 'left' ? 'toggleLeftSidebar' : 'toggleRightSidebar';
|
|
128
|
+
const shortcut = (0, use_keyboard_shortcut_label_1.useKeyboardShortcutLabel)(action);
|
|
129
|
+
const ariaShortcut = (0, use_keyboard_shortcut_label_1.useKeyboardShortcutAriaKeyShortcuts)(action);
|
|
130
|
+
const shortcutsDisabled = (0, use_keybinding_1.areKeyboardShortcutsDisabled)();
|
|
131
|
+
const expanded = (side === 'left' ? leftSidebarStatus : sidebarCollapsedStateRight) ===
|
|
132
|
+
'expanded' && sidebarCollapsedDuringDrag !== side;
|
|
133
|
+
const label = `${expanded ? 'Collapse' : 'Expand'} ${side} sidebar`;
|
|
135
134
|
const colorStyle = (0, react_1.useCallback)((color) => {
|
|
136
135
|
return {
|
|
137
136
|
...style,
|
|
@@ -139,14 +138,11 @@ const SidebarCollapserControl = ({ side }) => {
|
|
|
139
138
|
};
|
|
140
139
|
}, []);
|
|
141
140
|
const toggleLeftAction = (0, react_1.useCallback)((color) => {
|
|
142
|
-
return (jsx_runtime_1.jsx("div", { "data-sidebar-toggle": "left", style: colorStyle(color),
|
|
143
|
-
}, [colorStyle, leftIcon
|
|
141
|
+
return (jsx_runtime_1.jsx("div", { "data-sidebar-toggle": "left", style: colorStyle(color), children: jsx_runtime_1.jsx("div", { style: leftIcon(color) }) }));
|
|
142
|
+
}, [colorStyle, leftIcon]);
|
|
144
143
|
const toggleRightAction = (0, react_1.useCallback)((color) => {
|
|
145
|
-
return (jsx_runtime_1.jsx("div", { "data-sidebar-toggle": "right", style: colorStyle(color),
|
|
146
|
-
}, [colorStyle, rightIcon
|
|
147
|
-
|
|
148
|
-
return (jsx_runtime_1.jsx(InlineAction_1.InlineAction, { variant: null, onClick: toggleLeft, renderAction: toggleLeftAction, style: { marginRight: 4 } }));
|
|
149
|
-
}
|
|
150
|
-
return (jsx_runtime_1.jsx(InlineAction_1.InlineAction, { variant: null, onClick: toggleRight, renderAction: toggleRightAction }));
|
|
144
|
+
return (jsx_runtime_1.jsx("div", { "data-sidebar-toggle": "right", style: colorStyle(color), children: jsx_runtime_1.jsx("div", { style: rightIcon(color) }) }));
|
|
145
|
+
}, [colorStyle, rightIcon]);
|
|
146
|
+
return (jsx_runtime_1.jsx(ActionTooltip_1.ActionTooltip, { label: label, shortcut: shortcutsDisabled ? null : shortcut, delay: 800, dismissOnClick: true, children: jsx_runtime_1.jsx(InlineAction_1.InlineAction, { variant: null, onClick: side === 'left' ? toggleLeft : toggleRight, renderAction: side === 'left' ? toggleLeftAction : toggleRightAction, style: side === 'left' ? { marginRight: 4 } : undefined, "aria-label": label, "aria-expanded": expanded, "aria-keyshortcuts": shortcutsDisabled ? undefined : ariaShortcut || undefined }) }));
|
|
151
147
|
};
|
|
152
148
|
exports.SidebarCollapserControl = SidebarCollapserControl;
|
|
@@ -6,6 +6,8 @@ const react_1 = require("react");
|
|
|
6
6
|
const remotion_1 = require("remotion");
|
|
7
7
|
const colors_1 = require("../helpers/colors");
|
|
8
8
|
const get_preview_file_type_1 = require("../helpers/get-preview-file-type");
|
|
9
|
+
const use_keybinding_1 = require("../helpers/use-keybinding");
|
|
10
|
+
const use_keyboard_shortcut_label_1 = require("../helpers/use-keyboard-shortcut-label");
|
|
9
11
|
const canvas_zoom_1 = require("../icons/canvas-zoom");
|
|
10
12
|
const Checkmark_1 = require("../icons/Checkmark");
|
|
11
13
|
const TimelineCombobox_1 = require("./TimelineCombobox");
|
|
@@ -46,7 +48,7 @@ const getPreviewSizeLabel = (previewSize) => {
|
|
|
46
48
|
return `${(previewSize.size * 100).toFixed(0)}%`;
|
|
47
49
|
};
|
|
48
50
|
exports.getPreviewSizeLabel = getPreviewSizeLabel;
|
|
49
|
-
const accessibilityLabel = '
|
|
51
|
+
const accessibilityLabel = 'Zoom';
|
|
50
52
|
const getUniqueSizes = (size) => {
|
|
51
53
|
const customPreviewSizes = [size, ...commonPreviewSizes];
|
|
52
54
|
const uniqueSizes = [];
|
|
@@ -87,6 +89,10 @@ const usePreviewSizeMenuItems = () => {
|
|
|
87
89
|
}
|
|
88
90
|
return false;
|
|
89
91
|
}, [canvasContent]);
|
|
92
|
+
const configuredResetZoomShortcut = (0, use_keyboard_shortcut_label_1.useKeyboardShortcutLabel)('resetZoom');
|
|
93
|
+
const resetZoomShortcut = (0, use_keybinding_1.areKeyboardShortcutsDisabled)()
|
|
94
|
+
? ''
|
|
95
|
+
: configuredResetZoomShortcut;
|
|
90
96
|
const items = (0, react_1.useMemo)(() => {
|
|
91
97
|
return (0, exports.getUniqueSizes)(size).map((newSize) => {
|
|
92
98
|
return {
|
|
@@ -99,13 +105,15 @@ const usePreviewSizeMenuItems = () => {
|
|
|
99
105
|
},
|
|
100
106
|
type: 'item',
|
|
101
107
|
value: newSize.size,
|
|
102
|
-
keyHint: newSize.size === 'auto'
|
|
108
|
+
keyHint: newSize.size === 'auto' && resetZoomShortcut !== ''
|
|
109
|
+
? resetZoomShortcut
|
|
110
|
+
: null,
|
|
103
111
|
leftItem: String(size.size) === String(newSize.size) ? jsx_runtime_1.jsx(Checkmark_1.Checkmark, {}) : null,
|
|
104
112
|
subMenu: null,
|
|
105
113
|
quickSwitcherLabel: null,
|
|
106
114
|
};
|
|
107
115
|
});
|
|
108
|
-
}, [setSize, size]);
|
|
116
|
+
}, [resetZoomShortcut, setSize, size]);
|
|
109
117
|
return {
|
|
110
118
|
items,
|
|
111
119
|
selectedId: String(size.size),
|
|
@@ -118,6 +126,6 @@ const SizeSelector = () => {
|
|
|
118
126
|
if (!zoomable) {
|
|
119
127
|
return null;
|
|
120
128
|
}
|
|
121
|
-
return (jsx_runtime_1.jsx(TimelineCombobox_1.TimelineCombobox, { title: accessibilityLabel, selectedId: selectedId, values: items, renderLeftItem: (color) => selectedId === 'auto' ? (jsx_runtime_1.jsx(canvas_zoom_1.CanvasFitIcon, { color: color })) : Number(selectedId) < 1 ? (jsx_runtime_1.jsx(canvas_zoom_1.CanvasZoomOutIcon, { color: color })) : (jsx_runtime_1.jsx(canvas_zoom_1.CanvasZoomIcon, { color: color })), unhoveredIconColor: colors_1.WHITE_ALPHA_80 }));
|
|
129
|
+
return (jsx_runtime_1.jsx(TimelineCombobox_1.TimelineCombobox, { title: accessibilityLabel, tooltipDelay: 800, selectedId: selectedId, values: items, renderLeftItem: (color) => selectedId === 'auto' ? (jsx_runtime_1.jsx(canvas_zoom_1.CanvasFitIcon, { color: color })) : Number(selectedId) < 1 ? (jsx_runtime_1.jsx(canvas_zoom_1.CanvasZoomOutIcon, { color: color })) : (jsx_runtime_1.jsx(canvas_zoom_1.CanvasZoomIcon, { color: color })), unhoveredIconColor: colors_1.WHITE_ALPHA_80 }));
|
|
122
130
|
};
|
|
123
131
|
exports.SizeSelector = SizeSelector;
|
|
@@ -8,7 +8,6 @@ const copy_text_1 = require("../helpers/copy-text");
|
|
|
8
8
|
const use_copy_feedback_1 = require("../helpers/use-copy-feedback");
|
|
9
9
|
const check_circle_filled_1 = require("../icons/check-circle-filled");
|
|
10
10
|
const copy_1 = require("../icons/copy");
|
|
11
|
-
const minus_1 = require("../icons/minus");
|
|
12
11
|
const InlineAction_1 = require("./InlineAction");
|
|
13
12
|
const ValidationMessage_1 = require("./NewComposition/ValidationMessage");
|
|
14
13
|
const NotificationCenter_1 = require("./Notifications/NotificationCenter");
|
|
@@ -126,8 +125,8 @@ const SkillsSettings = () => {
|
|
|
126
125
|
: 'Not installed';
|
|
127
126
|
return (jsx_runtime_1.jsxs("div", { role: "listitem", style: index === remotionSkillsInfo.skills.length - 1
|
|
128
127
|
? lastSkillRow
|
|
129
|
-
: skillRow, children: [
|
|
130
|
-
|
|
128
|
+
: skillRow, children: [
|
|
129
|
+
jsx_runtime_1.jsxs("span", { style: skillName, children: ["/", skill.name] }), jsx_runtime_1.jsx("span", { style: status, children: installedLocation }), installed ? (jsx_runtime_1.jsx(check_circle_filled_1.CheckCircleFilled, { "aria-hidden": true, style: { ...statusIcon, fill: colors_1.BLUE } })) : null] }, skill.name));
|
|
131
130
|
}) })) : null] }));
|
|
132
131
|
};
|
|
133
132
|
exports.SkillsSettings = SkillsSettings;
|
|
@@ -3,23 +3,24 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.SnappingToggle = 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 magnet_1 = require("../icons/magnet");
|
|
10
10
|
const editor_snapping_1 = require("../state/editor-snapping");
|
|
11
|
+
const ActionTooltip_1 = require("./ActionTooltip");
|
|
11
12
|
const ControlButton_1 = require("./ControlButton");
|
|
12
13
|
const SnappingToggle = () => {
|
|
13
14
|
const { editorSnapping, setEditorSnapping } = (0, react_1.useContext)(editor_snapping_1.EditorSnappingContext);
|
|
14
15
|
const onClick = (0, react_1.useCallback)(() => {
|
|
15
16
|
setEditorSnapping((current) => !current);
|
|
16
17
|
}, [setEditorSnapping]);
|
|
17
|
-
const
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
return (jsx_runtime_1.jsx(ControlButton_1.ControlButton, { title:
|
|
18
|
+
const shortcut = (0, use_keyboard_shortcut_label_1.useKeyboardShortcutLabel)('toggleSnapping');
|
|
19
|
+
const ariaKeyShortcuts = (0, use_keyboard_shortcut_label_1.useKeyboardShortcutAriaKeyShortcuts)('toggleSnapping');
|
|
20
|
+
const accessibilityLabel = editorSnapping
|
|
21
|
+
? 'Disable snapping'
|
|
22
|
+
: 'Enable snapping';
|
|
23
|
+
const shortcutsDisabled = (0, use_keybinding_1.areKeyboardShortcutsDisabled)();
|
|
24
|
+
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": editorSnapping, "aria-keyshortcuts": shortcutsDisabled ? undefined : ariaKeyShortcuts || undefined, onClick: onClick, children: (color) => (jsx_runtime_1.jsx(magnet_1.MagnetIcon, { style: { width: 18, height: 18, transform: 'translateY(1px)' }, color: editorSnapping ? colors_1.BLUE : color, "aria-hidden": "true", focusable: "false" })) }) }));
|
|
24
25
|
};
|
|
25
26
|
exports.SnappingToggle = SnappingToggle;
|
|
@@ -3,20 +3,22 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.StudioSettings = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const client_1 = require("@remotion/renderer/client");
|
|
6
|
-
const studio_shared_1 = require("@remotion/studio-shared");
|
|
7
6
|
const react_1 = require("react");
|
|
8
7
|
const colors_1 = require("../helpers/colors");
|
|
9
8
|
const undo_1 = require("../icons/undo");
|
|
10
9
|
const Button_1 = require("./Button");
|
|
10
|
+
const Checkbox_1 = require("./Checkbox");
|
|
11
11
|
const ConfigSelect_1 = require("./ConfigSelect");
|
|
12
12
|
const styles_1 = require("./InspectorPanel/styles");
|
|
13
13
|
const layout_1 = require("./layout");
|
|
14
14
|
const InputDragger_1 = require("./NewComposition/InputDragger");
|
|
15
15
|
const ValidationMessage_1 = require("./NewComposition/ValidationMessage");
|
|
16
|
+
const InfoBubble_1 = require("./RenderModal/InfoBubble");
|
|
16
17
|
const layout_2 = require("./RenderModal/layout");
|
|
17
18
|
const SettingsContext_1 = require("./SettingsContext");
|
|
18
19
|
const use_auto_save_config_1 = require("./use-auto-save-config");
|
|
19
20
|
const container = {
|
|
21
|
+
alignSelf: 'flex-start',
|
|
20
22
|
display: 'flex',
|
|
21
23
|
flex: 1,
|
|
22
24
|
flexDirection: 'column',
|
|
@@ -47,11 +49,10 @@ const initialSettings = {
|
|
|
47
49
|
numberOfSharedAudioTags: null,
|
|
48
50
|
rspack: null,
|
|
49
51
|
};
|
|
50
|
-
const ConfigNumber = ({
|
|
51
|
-
const resolvedDefaultLabel = defaultLabel !== null && defaultLabel !== void 0 ? defaultLabel : String(defaultValue);
|
|
52
|
+
const ConfigNumber = ({ defaultValue, name, onChange, onChangeEnd, value, }) => {
|
|
52
53
|
return (jsx_runtime_1.jsxs("div", { style: layout_2.optionRow, children: [
|
|
53
54
|
jsx_runtime_1.jsx("div", { style: layout_2.label, children: name }), jsx_runtime_1.jsxs("div", { style: { ...layout_2.rightRow, gap: 6 }, children: [
|
|
54
|
-
jsx_runtime_1.jsx(InputDragger_1.InputDragger, { "aria-label": name, buttonStyle: { textAlign: 'right', width: 140 }, formatter: () => value === null ? `Default (${
|
|
55
|
+
jsx_runtime_1.jsx(InputDragger_1.InputDragger, { "aria-label": name, buttonStyle: { textAlign: 'right', width: 140 }, formatter: () => value === null ? `Default (${defaultValue})` : String(value), min: 0, onTextChange: () => undefined, onValueChange: onChange, onValueChangeEnd: onChangeEnd, placeholder: `Default (${defaultValue})`, rightAlign: true, status: "ok", step: 1, value: value !== null && value !== void 0 ? value : defaultValue }), jsx_runtime_1.jsx(Button_1.Button, { disabled: value === null, onClick: () => onChangeEnd(null), size: "compact", style: { color: colors_1.LIGHT_TEXT }, title: `Use default (${defaultValue})`, children: jsx_runtime_1.jsx(undo_1.UndoIcon, { style: resetIcon }) })
|
|
55
56
|
] })
|
|
56
57
|
] }));
|
|
57
58
|
};
|
|
@@ -59,20 +60,19 @@ const StudioSettings = () => {
|
|
|
59
60
|
var _a;
|
|
60
61
|
const { error: settingsError, revision, studioRuntimeConfig } = (0, SettingsContext_1.useSettings)();
|
|
61
62
|
const [settings, setSettings] = (0, react_1.useState)(initialSettings);
|
|
62
|
-
const [committedNumberSettings, setCommittedNumberSettings] = (0, react_1.useState)({
|
|
63
|
+
const [committedNumberSettings, setCommittedNumberSettings] = (0, react_1.useState)({ numberOfSharedAudioTags: null });
|
|
63
64
|
const [editedSetters, setEditedSetters] = (0, react_1.useState)(() => new Set());
|
|
64
65
|
const [syncedRevision, setSyncedRevision] = (0, react_1.useState)(-1);
|
|
65
66
|
const [error, setError] = (0, react_1.useState)(null);
|
|
66
67
|
(0, react_1.useEffect)(() => {
|
|
67
|
-
var _a
|
|
68
|
-
var
|
|
68
|
+
var _a;
|
|
69
|
+
var _b, _c;
|
|
69
70
|
if (studioRuntimeConfig === null) {
|
|
70
71
|
return;
|
|
71
72
|
}
|
|
72
|
-
setSettings((
|
|
73
|
+
setSettings((_b = studioRuntimeConfig.configFileStudioSettings) !== null && _b !== void 0 ? _b : initialSettings);
|
|
73
74
|
setCommittedNumberSettings({
|
|
74
|
-
|
|
75
|
-
numberOfSharedAudioTags: (_e = (_b = studioRuntimeConfig.configFileStudioSettings) === null || _b === void 0 ? void 0 : _b.numberOfSharedAudioTags) !== null && _e !== void 0 ? _e : null,
|
|
75
|
+
numberOfSharedAudioTags: (_c = (_a = studioRuntimeConfig.configFileStudioSettings) === null || _a === void 0 ? void 0 : _a.numberOfSharedAudioTags) !== null && _c !== void 0 ? _c : null,
|
|
76
76
|
});
|
|
77
77
|
setEditedSetters(new Set());
|
|
78
78
|
setSyncedRevision(revision);
|
|
@@ -96,7 +96,6 @@ const StudioSettings = () => {
|
|
|
96
96
|
update('setAskAIEnabled', settings.askAIEnabled),
|
|
97
97
|
update('setEnableCrossSiteIsolation', settings.enableCrossSiteIsolation),
|
|
98
98
|
update('setBeepOnFinish', settings.beepOnFinish),
|
|
99
|
-
update('setMaxTimelineTracks', committedNumberSettings.maxTimelineTracks),
|
|
100
99
|
update('setAudioLatencyHint', settings.audioLatencyHint),
|
|
101
100
|
update('setNumberOfSharedAudioTags', committedNumberSettings.numberOfSharedAudioTags),
|
|
102
101
|
update('setRspack', settings.rspack),
|
|
@@ -126,17 +125,32 @@ const StudioSettings = () => {
|
|
|
126
125
|
return null;
|
|
127
126
|
}
|
|
128
127
|
return (jsx_runtime_1.jsxs("div", { style: container, children: [
|
|
129
|
-
jsx_runtime_1.jsx("p", { style: dividerLabel, children: "
|
|
130
|
-
{ label: 'Interactive', value: 'interactive' },
|
|
131
|
-
{ label: 'Balanced', value: 'balanced' },
|
|
132
|
-
{ label: 'Playback', value: 'playback' },
|
|
133
|
-
], value: settings.audioLatencyHint }), jsx_runtime_1.jsx(ConfigNumber, { defaultValue: 0, name: "Number of shared audio tags", onChange: (value) => previewNumberSetting('numberOfSharedAudioTags', value), onChangeEnd: (value) => commitNumberSetting('numberOfSharedAudioTags', 'setNumberOfSharedAudioTags', value), value: settings.numberOfSharedAudioTags }), jsx_runtime_1.jsx(ConfigSelect_1.ConfigSelect, { defaultLabel: "Disabled", name: "Beep on finish", onChange: (value) => changeSetting('beepOnFinish', 'setBeepOnFinish', value), options: ConfigSelect_1.booleanOptions, value: settings.beepOnFinish }), jsx_runtime_1.jsx("p", { style: sectionTitle, children: "Development" }), jsx_runtime_1.jsx(ConfigSelect_1.ConfigSelect, { defaultLabel: "Webpack", name: "Bundler", onChange: (value) => changeSetting('rspack', 'setRspack', value), options: [
|
|
128
|
+
jsx_runtime_1.jsx("p", { style: dividerLabel, children: "Development" }), jsx_runtime_1.jsx(ConfigSelect_1.ConfigSelect, { defaultLabel: "Webpack", name: "Bundler", onChange: (value) => changeSetting('rspack', 'setRspack', value), options: [
|
|
134
129
|
{ label: 'Rspack', value: true },
|
|
135
130
|
{ label: 'Webpack', value: false },
|
|
136
|
-
], value: settings.rspack }), jsx_runtime_1.
|
|
131
|
+
], value: settings.rspack }), jsx_runtime_1.jsxs("div", { style: layout_2.optionRow, children: [
|
|
132
|
+
jsx_runtime_1.jsxs("div", { style: layout_2.label, children: ["Cross-site isolation",
|
|
133
|
+
jsx_runtime_1.jsx(InfoBubble_1.InfoBubble, { title: "About cross-site isolation", horizontalAlignment: "right", children: jsx_runtime_1.jsx("div", { style: {
|
|
134
|
+
padding: 12,
|
|
135
|
+
maxWidth: 280,
|
|
136
|
+
fontSize: 14,
|
|
137
|
+
lineHeight: 1.5,
|
|
138
|
+
}, children: "Isolates Studio from other websites to enable shared memory and multithreading. Required for @remotion/whisper-web and can speed up ProRes decoding. Media from other websites that requires cookies or authentication may not load. Disabled by default." }) })
|
|
139
|
+
] }), jsx_runtime_1.jsx("label", { style: layout_2.rightRow, "aria-label": "Cross-site isolation", children: jsx_runtime_1.jsx(Checkbox_1.Checkbox, { checked: settings.enableCrossSiteIsolation === true, name: "Cross-site isolation", onChange: (event) => changeSetting('enableCrossSiteIsolation', 'setEnableCrossSiteIsolation', event.target.checked ? true : null) }) })
|
|
140
|
+
] }), jsx_runtime_1.jsx(ConfigSelect_1.ConfigSelect, { defaultLabel: "Info", name: "Log level", onChange: (value) => changeSetting('logLevel', 'setLogLevel', value), options: client_1.BrowserSafeApis.logLevels.map((value) => ({
|
|
137
141
|
label: value[0].toUpperCase() + value.slice(1),
|
|
138
142
|
value,
|
|
139
|
-
})), value: settings.logLevel }), (
|
|
143
|
+
})), value: settings.logLevel }), jsx_runtime_1.jsx("p", { style: sectionTitle, children: "Interface" }), jsx_runtime_1.jsxs("label", { style: layout_2.optionRow, children: [
|
|
144
|
+
jsx_runtime_1.jsx("div", { style: layout_2.label, children: "Ask AI enabled" }), jsx_runtime_1.jsx("div", { style: layout_2.rightRow, children: jsx_runtime_1.jsx(Checkbox_1.Checkbox, { checked: settings.askAIEnabled !== false, name: "Ask AI enabled", onChange: (event) => changeSetting('askAIEnabled', 'setAskAIEnabled', event.target.checked ? null : false) }) })
|
|
145
|
+
] }), jsx_runtime_1.jsxs("label", { style: layout_2.optionRow, children: [
|
|
146
|
+
jsx_runtime_1.jsx("div", { style: layout_2.label, children: "Interactivity enabled" }), jsx_runtime_1.jsx("div", { style: layout_2.rightRow, children: jsx_runtime_1.jsx(Checkbox_1.Checkbox, { checked: settings.interactivityEnabled !== false, name: "Interactivity enabled", onChange: (event) => changeSetting('interactivityEnabled', 'setInteractivityEnabled', event.target.checked ? null : false) }) })
|
|
147
|
+
] }), jsx_runtime_1.jsx("p", { style: sectionTitle, children: "Audio" }), jsx_runtime_1.jsx(ConfigSelect_1.ConfigSelect, { defaultLabel: "Playback", name: "Audio latency hint", onChange: (value) => changeSetting('audioLatencyHint', 'setAudioLatencyHint', value), options: [
|
|
148
|
+
{ label: 'Interactive', value: 'interactive' },
|
|
149
|
+
{ label: 'Balanced', value: 'balanced' },
|
|
150
|
+
{ label: 'Playback', value: 'playback' },
|
|
151
|
+
], value: settings.audioLatencyHint }), jsx_runtime_1.jsx(ConfigNumber, { defaultValue: 0, name: "Number of shared audio tags", onChange: (value) => previewNumberSetting('numberOfSharedAudioTags', value), onChangeEnd: (value) => commitNumberSetting('numberOfSharedAudioTags', 'setNumberOfSharedAudioTags', value), value: settings.numberOfSharedAudioTags }), jsx_runtime_1.jsxs("label", { style: layout_2.optionRow, children: [
|
|
152
|
+
jsx_runtime_1.jsx("div", { style: layout_2.label, children: "Beep on finish" }), jsx_runtime_1.jsx("div", { style: layout_2.rightRow, children: jsx_runtime_1.jsx(Checkbox_1.Checkbox, { checked: settings.beepOnFinish === true, name: "Beep on finish", onChange: (event) => changeSetting('beepOnFinish', 'setBeepOnFinish', event.target.checked ? true : null) }) })
|
|
153
|
+
] }), (error !== null && error !== void 0 ? error : settingsError) ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
140
154
|
jsx_runtime_1.jsx(layout_1.Spacing, { y: 1, block: true }), jsx_runtime_1.jsx("div", { style: { paddingLeft: 16, paddingRight: 16 }, children: jsx_runtime_1.jsx(ValidationMessage_1.ValidationMessage, { align: "flex-start", message: (_a = error !== null && error !== void 0 ? error : settingsError) !== null && _a !== void 0 ? _a : '', type: "error" }) })
|
|
141
155
|
] })) : null, jsx_runtime_1.jsx(layout_1.Spacing, { y: 2, block: true })
|
|
142
156
|
] }));
|