@remotion/studio 4.0.528 → 4.0.529
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/Studio.js +2 -0
- package/dist/components/AgentPrompt.js +2 -2
- package/dist/components/AppLaunchButton.d.ts +0 -1
- package/dist/components/AppLaunchButton.js +2 -5
- package/dist/components/AssetAudioVolume.js +2 -2
- package/dist/components/AssetSelectorItem.js +5 -5
- package/dist/components/Button.d.ts +1 -1
- package/dist/components/Button.js +2 -2
- package/dist/components/CaptionInspector.js +1 -1
- package/dist/components/CaptionTextEditor.js +1 -1
- package/dist/components/CheckboardToggle.js +1 -1
- package/dist/components/CodingAgentButton.js +1 -1
- package/dist/components/ColorPicker/ColorPicker.d.ts +1 -1
- package/dist/components/ColorPicker/ColorPicker.js +2 -2
- package/dist/components/ColorPicker/ColorPickerPopup.js +1 -1
- package/dist/components/CompactExplanation.js +3 -3
- package/dist/components/CompositionSelectorItem.js +2 -2
- package/dist/components/ConfigSelect.js +1 -1
- package/dist/components/ConfigureDefaultEditorModal.js +2 -2
- package/dist/components/ControlButton.d.ts +0 -1
- package/dist/components/ControlButton.js +2 -2
- package/dist/components/CurrentAsset.js +1 -1
- package/dist/components/ElementLibrariesSettings.js +1 -1
- package/dist/components/ElementLibraryModal.js +1 -1
- package/dist/components/FramePersistor.js +3 -3
- package/dist/components/FullscreenToggle.js +1 -1
- package/dist/components/InitialCompositionLoader.js +3 -3
- package/dist/components/InlineAction.d.ts +2 -2
- package/dist/components/InlineAction.js +2 -3
- package/dist/components/InlineEditableTitle.d.ts +1 -1
- package/dist/components/InlineEditableTitle.js +3 -3
- package/dist/components/InspectorLocationCopy.js +1 -1
- package/dist/components/InspectorOpenInEditor.js +1 -3
- package/dist/components/InspectorPanel/AlignmentControls.js +3 -3
- package/dist/components/InspectorPanel/CompositionInspector.js +1 -5
- package/dist/components/InspectorPanel/CompositionMetadata.js +4 -4
- package/dist/components/InspectorPanel/EasingInspector.js +1 -1
- package/dist/components/InspectorPanel/ElementLibraryButton.js +3 -14
- package/dist/components/InspectorPanel/KeyframeEasingNavigator.js +6 -8
- package/dist/components/InspectorPanel/KeyframeInspector.js +1 -1
- package/dist/components/InspectorPanel/KeyframeSettings.js +16 -11
- package/dist/components/InspectorPanel/MultiSequenceField.js +1 -1
- package/dist/components/InspectorPanel/MultiSequenceInspector.js +2 -7
- package/dist/components/InspectorPanel/MultiSequenceNumberField.js +2 -2
- package/dist/components/InspectorPanel/SequenceInspectorHeader.js +1 -1
- package/dist/components/InspectorPanel/SequenceSelectionInspector.js +4 -13
- package/dist/components/InspectorPanel/SequenceWrapAction.js +6 -14
- package/dist/components/InspectorPanel/common.d.ts +6 -2
- package/dist/components/InspectorPanel/common.js +25 -9
- package/dist/components/InspectorSequenceSection.js +5 -5
- package/dist/components/InspectorSourceLocation.js +2 -2
- package/dist/components/KeyboardShortcutsSettings.js +1 -1
- package/dist/components/LicenseKeyValidation.js +2 -2
- package/dist/components/LoopToggle.js +1 -1
- package/dist/components/Menu/MenuSubItem.js +4 -2
- package/dist/components/MenuBuildIndicator.js +1 -1
- package/dist/components/MenuCompositionName.js +1 -1
- package/dist/components/ModelManager.js +1 -1
- package/dist/components/MuteToggle.js +1 -1
- package/dist/components/NewComposition/ComboBox.d.ts +1 -1
- package/dist/components/NewComposition/ComboBox.js +2 -2
- package/dist/components/NewComposition/DuplicateComposition.js +1 -1
- package/dist/components/NewComposition/InputDragger.d.ts +1 -1
- package/dist/components/NewComposition/InputDragger.js +1 -1
- package/dist/components/NewComposition/NewComposition.js +1 -1
- package/dist/components/OpenIssueButton.js +1 -1
- package/dist/components/OutlineToggle.js +1 -1
- package/dist/components/PlayPause.js +1 -1
- package/dist/components/PlaybackRateSelector.js +1 -1
- package/dist/components/Preview.js +2 -3
- package/dist/components/PreviewToolbarOverflowButton.js +1 -1
- package/dist/components/QuickSwitcher/ExplorerQuickSwitcherTrigger.js +1 -1
- package/dist/components/RenderButton.js +2 -4
- package/dist/components/RenderModal/InfoBubble.d.ts +1 -1
- package/dist/components/RenderModal/InfoBubble.js +2 -2
- package/dist/components/RenderModal/NumberSetting.js +1 -1
- package/dist/components/RenderModal/OptionExplainerBubble.js +2 -2
- package/dist/components/RenderModal/RenderModalAdvanced.js +2 -2
- package/dist/components/RenderModal/RenderModalAudio.js +2 -2
- package/dist/components/RenderModal/RenderModalBasic.js +3 -3
- package/dist/components/RenderModal/RenderModalEncoding.js +4 -4
- package/dist/components/RenderModal/RenderModalOutputName.js +1 -1
- package/dist/components/RenderModal/SchemaEditor/SchemaLabel.js +1 -1
- package/dist/components/RenderModal/SchemaEditor/ZodDiscriminatedUnionEditor.js +1 -1
- package/dist/components/RenderModal/SchemaEditor/ZodEnumEditor.js +1 -1
- package/dist/components/RenderModal/SchemaEditor/ZodFieldValidation.js +1 -1
- package/dist/components/RenderModal/SchemaEditor/ZodStaticFileEditor.js +1 -1
- package/dist/components/RenderModal/WebRenderModalAdvanced.js +2 -2
- package/dist/components/RenderModal/WebRenderModalAudio.js +2 -2
- package/dist/components/RenderModal/WebRenderModalBasic.js +3 -3
- package/dist/components/RenderModal/WebRenderModalPicture.js +1 -1
- package/dist/components/RenderQueue/CaptionQueueItem.js +1 -1
- package/dist/components/RenderQueue/QueueJobError.js +1 -1
- package/dist/components/RenderQueue/RenderQueueError.js +1 -1
- package/dist/components/RenderQueue/RenderQueueOutputName.js +1 -1
- package/dist/components/RenderQueue/RenderQueueProgressMessage.js +1 -1
- package/dist/components/RenderQueue/VideoMattingQueueItem.js +1 -1
- package/dist/components/RenderingSettings.js +6 -6
- package/dist/components/RulersAndGuidesToggle.js +1 -1
- package/dist/components/SegmentedButton.d.ts +0 -2
- package/dist/components/SegmentedButton.js +6 -6
- package/dist/components/SelectedOutlineOverlay.js +15 -2
- package/dist/components/SelectedOutlinePathPoints.js +45 -21
- package/dist/components/SelectedOutlineRenderer.js +1 -1
- package/dist/components/SettingsButton.js +1 -1
- package/dist/components/SettingsModalFooter.js +1 -1
- package/dist/components/SizeSelector.js +1 -1
- package/dist/components/SkillsSettings.js +2 -2
- package/dist/components/SnappingToggle.js +1 -1
- package/dist/components/StudioSettings.js +2 -2
- package/dist/components/TimeValue.js +1 -3
- package/dist/components/Timeline/EasingEditorModal.js +3 -3
- package/dist/components/Timeline/TimelineArrayField.js +2 -2
- package/dist/components/Timeline/TimelineAssetField.js +3 -3
- package/dist/components/Timeline/TimelineColorField.js +2 -2
- package/dist/components/Timeline/TimelineDragHandler.js +3 -3
- package/dist/components/Timeline/TimelineDuplicateCount.js +1 -1
- package/dist/components/Timeline/TimelineEffectItem.js +1 -1
- package/dist/components/Timeline/TimelineEnumField.js +1 -1
- package/dist/components/Timeline/TimelineFieldLabel.js +1 -1
- package/dist/components/Timeline/TimelineFontFamilyField.js +2 -2
- package/dist/components/Timeline/TimelineFontWeightField.js +1 -1
- package/dist/components/Timeline/TimelineKeyframeControls.js +4 -4
- package/dist/components/Timeline/TimelineKeyframeDiamond.js +1 -1
- package/dist/components/Timeline/TimelineKeyframeEasingLine.js +1 -1
- package/dist/components/Timeline/TimelineLayerChildren.js +1 -1
- package/dist/components/Timeline/TimelineList.js +15 -7
- package/dist/components/Timeline/TimelineMediaInfo.js +1 -1
- package/dist/components/Timeline/TimelineScaleField.js +1 -1
- package/dist/components/Timeline/TimelineSchemaField.js +2 -2
- package/dist/components/Timeline/TimelineSequence.js +1 -1
- package/dist/components/Timeline/TimelineSequenceItem.js +34 -16
- package/dist/components/Timeline/TimelineSequenceName.d.ts +1 -0
- package/dist/components/Timeline/TimelineSequenceName.js +38 -6
- package/dist/components/Timeline/TimelineSequencePropItem.js +6 -4
- package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.js +2 -2
- package/dist/components/Timeline/TimelineZoomControls.js +2 -2
- package/dist/components/Timeline/get-sequence-split-menu-item.js +2 -2
- package/dist/components/Timeline/use-timeline-expanded-tree.d.ts +1 -1
- package/dist/components/Timeline/use-timeline-expanded-tree.js +3 -0
- package/dist/components/TimelineCombobox.d.ts +1 -1
- package/dist/components/TimelineCombobox.js +5 -6
- package/dist/components/TimelineInOutToggle.js +1 -1
- package/dist/components/Transcription/TranscriptionModal.js +6 -6
- package/dist/components/UndoRedoButtons.js +1 -1
- package/dist/components/UpdatesSettings.js +2 -2
- package/dist/components/VideoMatting/VideoMattingModal.js +4 -4
- package/dist/components/selected-outline-types.d.ts +2 -0
- package/dist/error-overlay/remotion-overlay/CompositionIdListItem.js +1 -1
- package/dist/error-overlay/remotion-overlay/OpenInEditor.js +1 -1
- package/dist/error-overlay/remotion-overlay/StackFrame.js +1 -1
- package/dist/esm/{CaptionQueueProcessor-nr7hjcga.mjs → CaptionQueueProcessor-qj37c6r2.mjs} +2 -2
- package/dist/esm/{LazyModels-ajkn7fs3.mjs → LazyModels-rjsrgap5.mjs} +4 -4
- package/dist/esm/{LazyModels-g1g7cf4e.mjs → LazyModels-rnbjx98t.mjs} +4 -4
- package/dist/esm/{TranscriptionModal-e18bzbkb.mjs → TranscriptionModal-y7zeqj2d.mjs} +15 -15
- package/dist/esm/{VideoMattingModal-5bz2s4rs.mjs → VideoMattingModal-jzrkhah1.mjs} +13 -13
- package/dist/esm/{index-s6qya2gg.mjs → index-19d05w9e.mjs} +1 -1
- package/dist/esm/{index-t7tbt980.mjs → index-24wge6y5.mjs} +2 -3
- package/dist/esm/{index-wqc43mw0.mjs → index-3qb54r5j.mjs} +4 -5
- package/dist/esm/{index-c2wabcdt.mjs → index-cakcjjy2.mjs} +6 -6
- package/dist/esm/{index-9q9w8v9p.mjs → index-f9hxt5yh.mjs} +1 -1
- package/dist/esm/{index-8nt6a0mw.mjs → index-jc22b2wb.mjs} +1 -1
- package/dist/esm/{index-890dd9b3.mjs → index-m01zjph7.mjs} +3 -5
- package/dist/esm/{index-x6r9bn12.mjs → index-m2a95v3p.mjs} +925 -237
- package/dist/esm/{index-xac20sv4.mjs → index-r9bj4tta.mjs} +7 -7
- package/dist/esm/{index-t7xnxdf8.mjs → index-vnc2wdfd.mjs} +4 -5
- package/dist/esm/{index-dh3zk2hv.mjs → index-vtr5qzam.mjs} +1 -1
- package/dist/esm/{index-dpyss74p.mjs → index-x7kg7jqv.mjs} +814 -723
- package/dist/esm/index.mjs +2 -2
- package/dist/esm/internals.mjs +9 -9
- package/dist/esm/previewEntry.mjs +9 -9
- package/dist/esm/renderEntry.mjs +2 -2
- package/dist/helpers/checkerboard-background.d.ts +2 -2
- package/dist/helpers/checkerboard-background.js +1 -1
- package/dist/helpers/colors.d.ts +1 -2
- package/dist/helpers/colors.js +7 -8
- package/dist/helpers/studio-css-variables.d.ts +1 -1
- package/dist/helpers/studio-css-variables.js +2 -3
- package/dist/icons/snowflake.js +1 -3
- package/dist/icons/{scissors.d.ts → split.d.ts} +1 -1
- package/dist/icons/split.js +8 -0
- package/dist/icons/trash.js +2 -2
- package/dist/icons/wrap.js +1 -1
- package/package.json +20 -20
- package/dist/icons/scissors.js +0 -8
package/dist/Studio.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Studio = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const paths_1 = require("@remotion/paths");
|
|
5
6
|
const react_1 = require("react");
|
|
6
7
|
const react_dom_1 = require("react-dom");
|
|
7
8
|
const remotion_1 = require("remotion");
|
|
@@ -13,6 +14,7 @@ const FastRefreshProvider_1 = require("./FastRefreshProvider");
|
|
|
13
14
|
const inject_css_1 = require("./helpers/inject-css");
|
|
14
15
|
const ResolveCompositionConfigInStudio_1 = require("./ResolveCompositionConfigInStudio");
|
|
15
16
|
const composition_list_1 = require("./state/composition-list");
|
|
17
|
+
remotion_1.Internals.setInterpolatePaths(paths_1.interpolatePaths);
|
|
16
18
|
const getServerDisconnectedDomElement = () => {
|
|
17
19
|
return document.getElementById('server-disconnected-overlay');
|
|
18
20
|
};
|
|
@@ -87,7 +87,7 @@ const AgentPrompt = ({ availableText, promptDetails, skillId }) => {
|
|
|
87
87
|
const renderInstallCopy = (0, react_1.useCallback)((color) => (jsx_runtime_1.jsx(copy_1.CopyIcon, { copied: installCopied, color: color, style: copyIcon })), [installCopied]);
|
|
88
88
|
return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [skillAvailable ? null : (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
89
89
|
jsx_runtime_1.jsx("div", { style: text, children: "Install the Agent Skill first:" }), canInstallSkill && skill ? (jsx_runtime_1.jsx("div", { "aria-label": "Remotion Agent Skills", role: "list", style: skillRowContainer, children: jsx_runtime_1.jsx(SkillsSettings_1.SkillSettingsRow, { skill: skill }) })) : (jsx_runtime_1.jsxs("div", { style: commandField, children: [
|
|
90
|
-
jsx_runtime_1.jsx("pre", { style: code, children: installCommand }), jsx_runtime_1.jsx(InlineAction_1.InlineAction, { onClick: () => copy(installCommand, markInstallCopied), renderAction: renderInstallCopy, style: copyAction,
|
|
90
|
+
jsx_runtime_1.jsx("pre", { style: code, children: installCommand }), jsx_runtime_1.jsx(InlineAction_1.InlineAction, { onClick: () => copy(installCommand, markInstallCopied), renderAction: renderInstallCopy, style: copyAction, "aria-label": "Copy command", variant: null })
|
|
91
91
|
] })), skillActionError ? (jsx_runtime_1.jsx("div", { style: skillError, children: jsx_runtime_1.jsx(ValidationMessage_1.ValidationMessage, { align: "flex-start", message: skillActionError, type: "error" }) })) : null] })), jsx_runtime_1.jsxs("div", { style: { ...promptHeader, marginTop: skillAvailable ? 0 : 16 }, children: [
|
|
92
92
|
jsx_runtime_1.jsx("div", { style: text, children: skillAvailable
|
|
93
93
|
? availableText
|
|
@@ -99,7 +99,7 @@ const AgentPrompt = ({ availableText, promptDetails, skillId }) => {
|
|
|
99
99
|
fontSize: 'inherit',
|
|
100
100
|
fontWeight: 'inherit',
|
|
101
101
|
lineHeight: 'inherit',
|
|
102
|
-
}, children: skillName }), promptDetails] }), jsx_runtime_1.jsx(InlineAction_1.InlineAction, { onClick: () => copy(prompt, markPromptCopied), renderAction: renderPromptCopy, style: copyAction,
|
|
102
|
+
}, children: skillName }), promptDetails] }), jsx_runtime_1.jsx(InlineAction_1.InlineAction, { onClick: () => copy(prompt, markPromptCopied), renderAction: renderPromptCopy, style: copyAction, "aria-label": "Copy prompt", variant: null })
|
|
103
103
|
] })
|
|
104
104
|
] }));
|
|
105
105
|
};
|
|
@@ -26,7 +26,7 @@ const dropdownIconStyle = {
|
|
|
26
26
|
display: 'flex',
|
|
27
27
|
transform: 'translateY(-1px)',
|
|
28
28
|
};
|
|
29
|
-
const AppLaunchButton = ({ actionButtonId, ariaLabel, children, disabled, menuAriaLabel, menuButtonId, menuItems, onConfigureApps, onClick, size, style,
|
|
29
|
+
const AppLaunchButton = ({ actionButtonId, ariaLabel, children, disabled, menuAriaLabel, menuButtonId, menuItems, onConfigureApps, onClick, size, style, }) => {
|
|
30
30
|
const items = (0, react_1.useMemo)(() => {
|
|
31
31
|
return [
|
|
32
32
|
...menuItems,
|
|
@@ -50,7 +50,6 @@ const AppLaunchButton = ({ actionButtonId, ariaLabel, children, disabled, menuAr
|
|
|
50
50
|
style: size === 'default'
|
|
51
51
|
? defaultMainSegmentStyle
|
|
52
52
|
: compactMainSegmentStyle,
|
|
53
|
-
title,
|
|
54
53
|
tooltipLabel: null,
|
|
55
54
|
type: 'action',
|
|
56
55
|
},
|
|
@@ -67,7 +66,6 @@ const AppLaunchButton = ({ actionButtonId, ariaLabel, children, disabled, menuAr
|
|
|
67
66
|
segmentId: 'another-app',
|
|
68
67
|
selectedId: null,
|
|
69
68
|
style: dropdownSegmentStyle,
|
|
70
|
-
title: menuAriaLabel,
|
|
71
69
|
tooltipLabel: null,
|
|
72
70
|
type: 'menu',
|
|
73
71
|
values: items,
|
|
@@ -85,8 +83,7 @@ const AppLaunchButton = ({ actionButtonId, ariaLabel, children, disabled, menuAr
|
|
|
85
83
|
menuButtonId,
|
|
86
84
|
onClick,
|
|
87
85
|
size,
|
|
88
|
-
title,
|
|
89
86
|
]);
|
|
90
|
-
return (jsx_runtime_1.jsx(SegmentedButton_1.SegmentedButton, { segments: segments, style: { ...(size === 'default' ? { height: 41 } : null), ...style }
|
|
87
|
+
return (jsx_runtime_1.jsx(SegmentedButton_1.SegmentedButton, { segments: segments, style: { ...(size === 'default' ? { height: 41 } : null), ...style } }));
|
|
91
88
|
};
|
|
92
89
|
exports.AppLaunchButton = AppLaunchButton;
|
|
@@ -23,11 +23,11 @@ const AssetAudioVolume = ({ src, waveformSampleRate }) => {
|
|
|
23
23
|
onError: () => setValue('Unavailable'),
|
|
24
24
|
});
|
|
25
25
|
}, [src, waveformSampleRate]);
|
|
26
|
-
return (jsx_runtime_1.jsx("span", { style: {
|
|
26
|
+
return (jsx_runtime_1.jsx("span", { role: "group", style: {
|
|
27
27
|
fontFamily: 'sans-serif',
|
|
28
28
|
fontSize: 13,
|
|
29
29
|
lineHeight: '20px',
|
|
30
30
|
color: colors_1.LIGHT_TEXT,
|
|
31
|
-
},
|
|
31
|
+
}, "aria-label": "RMS level across all channels over the full audio track, including silence.", children: value }));
|
|
32
32
|
};
|
|
33
33
|
exports.AssetAudioVolume = AssetAudioVolume;
|
|
@@ -275,7 +275,7 @@ const AssetFolderItem = ({ tabIndex, item, level, parentFolder, toggleFolder, dr
|
|
|
275
275
|
return (jsx_runtime_1.jsxs("div", { onDragEnter: onDragEnter, onDragLeave: onDragLeave, style: {
|
|
276
276
|
backgroundColor: isDropDiv ? colors_1.WHITE_ALPHA_06 : colors_1.BACKGROUND,
|
|
277
277
|
}, children: [
|
|
278
|
-
jsx_runtime_1.jsx(ContextMenu_1.ContextMenu, { getItems: getContextMenuItems, children: jsx_runtime_1.jsx(layout_1.Row, { align: "center", children: jsx_runtime_1.jsxs("div", { style: folderStyle, className: `${hoverable_1.HOVERABLE_CLASS_NAME} ${hoverable_1.HOVER_GROUP_CLASS_NAME}`, tabIndex: tabIndex,
|
|
278
|
+
jsx_runtime_1.jsx(ContextMenu_1.ContextMenu, { getItems: getContextMenuItems, children: jsx_runtime_1.jsx(layout_1.Row, { align: "center", children: jsx_runtime_1.jsxs("div", { role: "group", style: folderStyle, className: `${hoverable_1.HOVERABLE_CLASS_NAME} ${hoverable_1.HOVER_GROUP_CLASS_NAME}`, tabIndex: tabIndex, "aria-label": item.name, onClick: onClick, onDragEnter: (event) => {
|
|
279
279
|
if (!(0, use_asset_drag_events_1.isAssetUploadDragEvent)(event)) {
|
|
280
280
|
return;
|
|
281
281
|
}
|
|
@@ -293,7 +293,7 @@ const AssetFolderItem = ({ tabIndex, item, level, parentFolder, toggleFolder, dr
|
|
|
293
293
|
}
|
|
294
294
|
}, children: [
|
|
295
295
|
jsx_runtime_1.jsx(Icon, { style: iconStyle, color: colors_1.CURRENT_COLOR }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 1 }), jsx_runtime_1.jsx("div", { style: labelStyle, children: item.name }), jsx_runtime_1.jsxs("div", { className: hoverable_1.HOVER_GROUP_REVEAL_CLASS_NAME, style: inlineActionsStyle, children: [
|
|
296
|
-
jsx_runtime_1.jsx(layout_1.Spacing, { x: 0.5 }), jsx_runtime_1.jsx(InlineDropdown_1.InlineDropdown, { variant: null,
|
|
296
|
+
jsx_runtime_1.jsx(layout_1.Spacing, { x: 0.5 }), jsx_runtime_1.jsx(InlineDropdown_1.InlineDropdown, { variant: null, "aria-label": "More actions", renderAction: renderContextMenuAction, getItems: getContextMenuItems, style: hoverable_1.NO_HOVER_BACKGROUND_STYLE, className: hoverable_1.FOCUS_VISIBLE_ONLY_CLASS_NAME })
|
|
297
297
|
] })
|
|
298
298
|
] }) }) }), item.expanded ? (jsx_runtime_1.jsx(exports.AssetFolderTree, { item: item.items, name: item.name, level: level, parentFolder: parentFolder, tabIndex: tabIndex, toggleFolder: toggleFolder, dropLocation: dropLocation, setDropLocation: setDropLocation, readOnlyStudio: readOnlyStudio, uploadAssets: uploadAssets }, item.name)) : null] }));
|
|
299
299
|
};
|
|
@@ -412,9 +412,9 @@ const AssetSelectorItem = ({ item, tabIndex, level, parentFolder, readOnlyStudio
|
|
|
412
412
|
e.stopPropagation();
|
|
413
413
|
openAssetInExplorer();
|
|
414
414
|
}, [openAssetInExplorer]);
|
|
415
|
-
return (jsx_runtime_1.jsx(ContextMenu_1.ContextMenu, { getItems: getContextMenuItems, children: jsx_runtime_1.jsx(layout_1.Row, { align: "center", children: jsx_runtime_1.jsxs("div", { ref: rowRef, style: style, className: `${hoverable_1.HOVERABLE_CLASS_NAME} ${hoverable_1.HOVER_GROUP_CLASS_NAME}`, onClick: onClick, draggable: canDragAsset, onDragStart: onDragStart, onDragEnd: onDragEnd, tabIndex: tabIndex,
|
|
415
|
+
return (jsx_runtime_1.jsx(ContextMenu_1.ContextMenu, { getItems: getContextMenuItems, children: jsx_runtime_1.jsx(layout_1.Row, { align: "center", children: jsx_runtime_1.jsxs("div", { ref: rowRef, role: "group", style: style, className: `${hoverable_1.HOVERABLE_CLASS_NAME} ${hoverable_1.HOVER_GROUP_CLASS_NAME}`, onClick: onClick, draggable: canDragAsset, onDragStart: onDragStart, onDragEnd: onDragEnd, tabIndex: tabIndex, "aria-label": item.name, children: [
|
|
416
416
|
jsx_runtime_1.jsx(AssetFileIcon_1.AssetFileIcon, { fileType: previewFileType, style: iconStyle, color: colors_1.CURRENT_COLOR }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 1 }), jsx_runtime_1.jsx("div", { style: labelStyle, children: item.name }), !isDragging ? (jsx_runtime_1.jsxs("div", { className: hoverable_1.HOVER_GROUP_REVEAL_CLASS_NAME, style: inlineActionsStyle, children: [
|
|
417
|
-
jsx_runtime_1.jsx(layout_1.Spacing, { x: 0.5 }), jsx_runtime_1.jsx(InlineDropdown_1.InlineDropdown, { variant: null,
|
|
418
|
-
jsx_runtime_1.jsx(layout_1.Spacing, { x: 0.5 }), jsx_runtime_1.jsx(InlineAction_1.InlineAction, { variant: null,
|
|
417
|
+
jsx_runtime_1.jsx(layout_1.Spacing, { x: 0.5 }), jsx_runtime_1.jsx(InlineDropdown_1.InlineDropdown, { variant: null, "aria-label": "More actions", renderAction: renderContextMenuAction, getItems: getContextMenuItems, style: hoverable_1.NO_HOVER_BACKGROUND_STYLE, className: hoverable_1.FOCUS_VISIBLE_ONLY_CLASS_NAME }), fileExplorerDisabled ? null : (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
418
|
+
jsx_runtime_1.jsx(layout_1.Spacing, { x: 0.5 }), jsx_runtime_1.jsx(InlineAction_1.InlineAction, { variant: null, "aria-label": `Show in ${fileManagerName}`, renderAction: renderFileExplorerAction, onClick: revealInExplorer, style: hoverable_1.NO_HOVER_BACKGROUND_STYLE, className: hoverable_1.FOCUS_VISIBLE_ONLY_CLASS_NAME })
|
|
419
419
|
] }))] })) : null] }) }) }));
|
|
420
420
|
};
|
|
@@ -7,7 +7,7 @@ export type ButtonProps = {
|
|
|
7
7
|
readonly style?: React.CSSProperties;
|
|
8
8
|
readonly buttonContainerStyle?: React.CSSProperties;
|
|
9
9
|
readonly autoFocus?: boolean;
|
|
10
|
-
readonly
|
|
10
|
+
readonly 'aria-label'?: string;
|
|
11
11
|
readonly id?: string;
|
|
12
12
|
readonly onPointerDown?: React.PointerEventHandler<HTMLButtonElement>;
|
|
13
13
|
};
|
|
@@ -16,7 +16,7 @@ const button = {
|
|
|
16
16
|
margin: 0,
|
|
17
17
|
padding: 0,
|
|
18
18
|
};
|
|
19
|
-
const ButtonRefForwardFunction = ({ children, onClick,
|
|
19
|
+
const ButtonRefForwardFunction = ({ children, onClick, 'aria-label': ariaLabel, disabled, size = 'default', style, id, autoFocus, buttonContainerStyle, onPointerDown, }, ref) => {
|
|
20
20
|
const combined = (0, react_1.useMemo)(() => {
|
|
21
21
|
var _a, _b;
|
|
22
22
|
const idleBackground = (_a = style === null || style === void 0 ? void 0 : style.backgroundColor) !== null && _a !== void 0 ? _a : colors_1.TRANSPARENT;
|
|
@@ -46,6 +46,6 @@ const ButtonRefForwardFunction = ({ children, onClick, title, disabled, size = '
|
|
|
46
46
|
...(buttonContainerStyle !== null && buttonContainerStyle !== void 0 ? buttonContainerStyle : {}),
|
|
47
47
|
};
|
|
48
48
|
}, [buttonContainerStyle, disabled, size]);
|
|
49
|
-
return (jsx_runtime_1.jsx("button", { ref: ref, className: `${hoverable_1.HOVERABLE_CLASS_NAME} ${hoverable_1.FOCUS_VISIBLE_ONLY_CLASS_NAME}`, id: id, style: combined, type: "button", disabled: disabled, onClick: onClick, onPointerDown: onPointerDown, autoFocus: autoFocus,
|
|
49
|
+
return (jsx_runtime_1.jsx("button", { ref: ref, className: `${hoverable_1.HOVERABLE_CLASS_NAME} ${hoverable_1.FOCUS_VISIBLE_ONLY_CLASS_NAME}`, id: id, style: combined, type: "button", disabled: disabled, onClick: onClick, onPointerDown: onPointerDown, autoFocus: autoFocus, "aria-label": ariaLabel, children: jsx_runtime_1.jsx("div", { className: "css-reset", style: buttonContainer, children: children }) }));
|
|
50
50
|
};
|
|
51
51
|
exports.Button = (0, react_1.forwardRef)(ButtonRefForwardFunction);
|
|
@@ -118,6 +118,6 @@ const CaptionInspector = ({ captions, expanded, onTextChange, onTextSave, onText
|
|
|
118
118
|
}, [importCaptions, setSelectedModal]);
|
|
119
119
|
return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
120
120
|
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: [
|
|
121
|
-
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 } })),
|
|
121
|
+
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", "aria-description": importTooltip, 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 } })), variant: null })] })), readOnly ? (jsx_runtime_1.jsx("div", { role: "group", style: readOnlyStatus, "aria-label": readOnlyTitle !== null && readOnlyTitle !== void 0 ? readOnlyTitle : undefined, children: "Read only" })) : null] }), expanded: expanded, label: "Captions", onToggle: captions.length > 0 ? onToggle : null }) }), expanded || captions.length === 0 ? (jsx_runtime_1.jsx(CaptionTextEditor_1.CaptionTextEditor, { captions: captions, onChange: onTextChange, onSave: onTextSave, onCancel: onTextCancel, readOnly: readOnly })) : null] }));
|
|
122
122
|
};
|
|
123
123
|
exports.CaptionInspector = CaptionInspector;
|
|
@@ -150,7 +150,7 @@ const CaptionTextEditor = ({ captions, onChange, onSave, onCancel, readOnly }) =
|
|
|
150
150
|
}, value: caption.text }), jsx_runtime_1.jsx(InlineAction_1.InlineAction, { "aria-pressed": hasPageBreakAfter, className: hoverable_1.FOCUS_VISIBLE_ONLY_CLASS_NAME, disabled: readOnly, onClick: () => {
|
|
151
151
|
updatePageBreakAfter(index, !hasPageBreakAfter);
|
|
152
152
|
commitPending();
|
|
153
|
-
}, renderAction: (color) => (jsx_runtime_1.jsx(enter_1.EnterIcon, { "aria-hidden": "true", color: hasPageBreakAfter ? colors_1.BLUE : color, focusable: "false", style: { height: 16, width: 16 } })),
|
|
153
|
+
}, renderAction: (color) => (jsx_runtime_1.jsx(enter_1.EnterIcon, { "aria-hidden": "true", color: hasPageBreakAfter ? colors_1.BLUE : color, focusable: "false", style: { height: 16, width: 16 } })), "aria-label": pageBreakTitle, variant: null })] }, key));
|
|
154
154
|
})] }) }));
|
|
155
155
|
};
|
|
156
156
|
exports.CaptionTextEditor = CaptionTextEditor;
|
|
@@ -21,7 +21,7 @@ const CheckboardToggle = () => {
|
|
|
21
21
|
const ariaKeyShortcuts = (0, use_keyboard_shortcut_label_1.useKeyboardShortcutAriaKeyShortcuts)('toggleCheckerboard');
|
|
22
22
|
const accessibilityLabel = 'Show transparency as checkerboard';
|
|
23
23
|
const shortcutsDisabled = (0, use_keybinding_1.areKeyboardShortcutsDisabled)();
|
|
24
|
-
return (jsx_runtime_1.jsx(ActionTooltip_1.ActionTooltip, { label: "Checkerboard", shortcut: shortcutsDisabled ? null : shortcut, delay: 800, dismissOnClick: false, children: jsx_runtime_1.jsx(ControlButton_1.ControlButton, {
|
|
24
|
+
return (jsx_runtime_1.jsx(ActionTooltip_1.ActionTooltip, { label: "Checkerboard", shortcut: shortcutsDisabled ? null : shortcut, delay: 800, dismissOnClick: false, children: jsx_runtime_1.jsx(ControlButton_1.ControlButton, { "aria-label": accessibilityLabel, "aria-pressed": checkerboard, "aria-keyshortcuts": shortcutsDisabled ? undefined : ariaKeyShortcuts || undefined, onClick: onClick, style: buttonStyle, 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: [
|
|
25
25
|
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" })
|
|
26
26
|
] })) }) }));
|
|
27
27
|
};
|
|
@@ -53,7 +53,7 @@ const CodingAgentButton = ({ label, prompt, size, style }) => {
|
|
|
53
53
|
}
|
|
54
54
|
return (jsx_runtime_1.jsxs(AppLaunchButton_1.AppLaunchButton, { actionButtonId: null, ariaLabel: `${label} ${defaultCodingAgent.nameWithType}`, disabled: false, menuAriaLabel: `${label} another coding agent`, menuButtonId: null, menuItems: agentMenuItems, onConfigureApps: configureDefaultApps, onClick: () => {
|
|
55
55
|
openWithCodingAgent(defaultCodingAgent.id, defaultCodingAgent.nameWithType).catch(() => undefined);
|
|
56
|
-
}, size: size, style: style,
|
|
56
|
+
}, size: size, style: style, children: [
|
|
57
57
|
jsx_runtime_1.jsx(CodingAgentIcon_1.CodingAgentIcon, { codingAgentId: defaultCodingAgent.id, size: size === 'default' ? 14 : 18 }), label, " ", defaultCodingAgent.name] }));
|
|
58
58
|
};
|
|
59
59
|
exports.CodingAgentButton = CodingAgentButton;
|
|
@@ -9,7 +9,7 @@ type Props = {
|
|
|
9
9
|
readonly width?: number;
|
|
10
10
|
readonly height?: number;
|
|
11
11
|
readonly borderRadius?: number;
|
|
12
|
-
readonly
|
|
12
|
+
readonly 'aria-label'?: string;
|
|
13
13
|
readonly name?: string;
|
|
14
14
|
readonly className?: string;
|
|
15
15
|
readonly style?: React.CSSProperties;
|
|
@@ -56,7 +56,7 @@ const eyedropperButtonBaseStyle = {
|
|
|
56
56
|
justifyContent: 'center',
|
|
57
57
|
flex: '0 0 auto',
|
|
58
58
|
};
|
|
59
|
-
const ColorPicker = ({ value, onChange, onChangeComplete, disabled, width = 45, height = 25, borderRadius = 3,
|
|
59
|
+
const ColorPicker = ({ value, onChange, onChangeComplete, disabled, width = 45, height = 25, borderRadius = 3, 'aria-label': ariaLabel, name, className, style: customStyle, }) => {
|
|
60
60
|
const [opened, setOpened] = (0, react_1.useState)(false);
|
|
61
61
|
const triggerRef = (0, react_1.useRef)(null);
|
|
62
62
|
const { tabIndex, currentZIndex } = (0, z_index_1.useZIndex)();
|
|
@@ -204,7 +204,7 @@ const ColorPicker = ({ value, onChange, onChangeComplete, disabled, width = 45,
|
|
|
204
204
|
jsx_runtime_1.jsxs("span", { style: controlStyle, children: [
|
|
205
205
|
jsx_runtime_1.jsx("button", { ref: triggerRef, type: "button", className: [is_menu_item_1.MENU_INITIATOR_CLASSNAME, SWATCH_CLASSNAME, className]
|
|
206
206
|
.filter(Boolean)
|
|
207
|
-
.join(' '), disabled: disabled, name: name,
|
|
207
|
+
.join(' '), disabled: disabled, name: name, "aria-label": ariaLabel !== null && ariaLabel !== void 0 ? ariaLabel : value, tabIndex: tabIndex, style: swatchStyle, onPointerDown: onTriggerPointerDown, onClick: onTriggerClick, children: jsx_runtime_1.jsx("span", { style: swatchFill }) }), showEyeDropper ? (jsx_runtime_1.jsx("button", { type: "button", disabled: disabled, style: eyedropperButtonStyle, onPointerDown: onEyeDropperPointerDown, onClick: onPickWithEyeDropper, tabIndex: tabIndex, "aria-label": "Pick color from screen", children: jsx_runtime_1.jsx(eyedropper_1.EyedropperIcon, { style: eyedropperIconStyle, color: colors_1.CURRENT_COLOR }) })) : null] }), portalStyle
|
|
208
208
|
? react_dom_1.default.createPortal(jsx_runtime_1.jsx("div", { style: styles_1.fullScreenOverlay, children: jsx_runtime_1.jsx("div", { style: styles_1.outerPortal, className: "css-reset", children: jsx_runtime_1.jsx(z_index_1.HigherZIndex, { onOutsideClick: onHide, onEscape: onHide, children: jsx_runtime_1.jsx("div", { style: portalStyle, children: jsx_runtime_1.jsx(ColorPickerPopup_1.ColorPickerPopup, { value: value, onChange: onChange, onChangeComplete: onChangeComplete }) }) }) }) }), (0, portals_1.getPortal)(currentZIndex))
|
|
209
209
|
: null] }));
|
|
210
210
|
};
|
|
@@ -271,7 +271,7 @@ const ColorPickerPopup = ({ value, onChange, onChangeComplete }) => {
|
|
|
271
271
|
}, [formatted]);
|
|
272
272
|
const showEyeDropper = (0, exports.hasEyeDropper)();
|
|
273
273
|
return (jsx_runtime_1.jsxs("div", { style: popupShellStyle, children: [
|
|
274
|
-
jsx_runtime_1.jsx(SaturationValueArea_1.SaturationValueArea, { hue: hsva.h, saturation: hsva.s, value: hsva.v, onChange: onSvChange, onChangeComplete: onSvComplete }), jsx_runtime_1.jsxs("div", { style: sliderRowStyle, children: [showEyeDropper ? (jsx_runtime_1.jsx("button", { type: "button", style: eyedropperButtonStyle, onClick: onPickWithEyeDropper, tabIndex: tabIndex,
|
|
274
|
+
jsx_runtime_1.jsx(SaturationValueArea_1.SaturationValueArea, { hue: hsva.h, saturation: hsva.s, value: hsva.v, onChange: onSvChange, onChangeComplete: onSvComplete }), jsx_runtime_1.jsxs("div", { style: sliderRowStyle, children: [showEyeDropper ? (jsx_runtime_1.jsx("button", { type: "button", style: eyedropperButtonStyle, onClick: onPickWithEyeDropper, tabIndex: tabIndex, "aria-label": "Pick color from screen", children: jsx_runtime_1.jsx(eyedropper_1.EyedropperIcon, { style: { width: 14, height: 14 }, color: colors_1.CURRENT_COLOR }) })) : null, jsx_runtime_1.jsx("div", { role: "group", style: previewSwatchStyle, "aria-label": formatted, children: jsx_runtime_1.jsx("div", { style: previewFill }) }), jsx_runtime_1.jsxs("div", { style: slidersColumnStyle, children: [
|
|
275
275
|
jsx_runtime_1.jsx(HueSlider_1.HueSlider, { hue: hsva.h, onChange: onHueChange, onChangeComplete: onHueComplete }), jsx_runtime_1.jsx(AlphaSlider_1.AlphaSlider, { hue: hsva.h, saturation: hsva.s, value: hsva.v, alpha: hsva.a, onChange: onAlphaChange, onChangeComplete: onAlphaComplete })
|
|
276
276
|
] })
|
|
277
277
|
] }), jsx_runtime_1.jsxs("div", { style: inputsRowStyle, children: [
|
|
@@ -38,12 +38,12 @@ const compactHelpIcon = {
|
|
|
38
38
|
const compactHelpIconPath = {
|
|
39
39
|
color: 'inherit',
|
|
40
40
|
};
|
|
41
|
-
const CompactHelpLink = ({ href, ariaLabel,
|
|
41
|
+
const CompactHelpLink = ({ href, ariaLabel, }) => {
|
|
42
42
|
const [hovered, setHovered] = (0, react_1.useState)(false);
|
|
43
|
-
return (jsx_runtime_1.jsx("a", { href: href, target: "_blank", rel: "noopener noreferrer", style: hovered ? compactHelpLinkHovered : compactHelpLink, "aria-label": ariaLabel,
|
|
43
|
+
return (jsx_runtime_1.jsx("a", { href: href, target: "_blank", rel: "noopener noreferrer", style: hovered ? compactHelpLinkHovered : compactHelpLink, "aria-label": ariaLabel, onMouseEnter: () => setHovered(true), onMouseLeave: () => setHovered(false), children: jsx_runtime_1.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 512 512", style: compactHelpIcon, "aria-hidden": "true", children: jsx_runtime_1.jsx("path", { style: compactHelpIconPath, fill: colors_1.CURRENT_COLOR, d: "M464 256a208 208 0 1 0 -416 0 208 208 0 1 0 416 0zM0 256a256 256 0 1 1 512 0 256 256 0 1 1 -512 0zm256-80c-17.7 0-32 14.3-32 32l-48 0c0-44.2 35.8-80 80-80s80 35.8 80 80c0 35.1-20.5 57.5-38.2 70-6.3 4.4-12.5 7.8-17.8 10.4l0 21.9-48 0 0-56.7c1.4-.4 2.7-.7 4.1-1.1 12.2-3.2 23.3-6.1 34.1-13.7 10.4-7.3 17.8-16.9 17.8-30.8 0-17.7-14.3-32-32-32zM232 344l48 0 0 48-48 0 0-48z" }) }) }));
|
|
44
44
|
};
|
|
45
45
|
const CompactExplanation = ({ children, learnMoreAriaLabel, learnMoreHref, learnMoreTitle = 'Learn more', }) => {
|
|
46
|
-
return (jsx_runtime_1.jsxs("div", { style: compactExplanation, children: [children, learnMoreHref ? (jsx_runtime_1.jsx(CompactHelpLink, { href: learnMoreHref, ariaLabel: learnMoreAriaLabel !== null && learnMoreAriaLabel !== void 0 ? learnMoreAriaLabel : learnMoreTitle
|
|
46
|
+
return (jsx_runtime_1.jsxs("div", { style: compactExplanation, children: [children, learnMoreHref ? (jsx_runtime_1.jsx(CompactHelpLink, { href: learnMoreHref, ariaLabel: learnMoreAriaLabel !== null && learnMoreAriaLabel !== void 0 ? learnMoreAriaLabel : learnMoreTitle })) : null] }));
|
|
47
47
|
};
|
|
48
48
|
exports.CompactExplanation = CompactExplanation;
|
|
49
49
|
const CompactNotSetUp = ({ learnMoreAriaLabel, learnMoreHref, learnMoreTitle, }) => {
|
|
@@ -504,7 +504,7 @@ const CompositionSelectorItem = ({ item, level, currentComposition, tabIndex, se
|
|
|
504
504
|
if (item.type === 'folder') {
|
|
505
505
|
const folderPath = getFolderPath(item);
|
|
506
506
|
return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
507
|
-
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,
|
|
507
|
+
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, "aria-label": 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 })
|
|
508
508
|
] }) })
|
|
509
509
|
] }) }), item.expanded ? (jsx_runtime_1.jsx("div", { onDragOver: onFolderChildListDragOver, onDrop: onFolderChildListDrop, children: item.items.map((childItem, index) => {
|
|
510
510
|
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
|
|
@@ -512,7 +512,7 @@ const CompositionSelectorItem = ({ item, level, currentComposition, tabIndex, se
|
|
|
512
512
|
: item.items[index + 1] }, childItem.key + childItem.type));
|
|
513
513
|
}) })) : null] }));
|
|
514
514
|
}
|
|
515
|
-
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",
|
|
515
|
+
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", "aria-label": 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: [
|
|
516
516
|
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 })
|
|
517
517
|
] }) })
|
|
518
518
|
] }) }));
|
|
@@ -44,7 +44,7 @@ const ConfigSelect = ({ defaultLabel, name, onChange, options, value, }) => {
|
|
|
44
44
|
}),
|
|
45
45
|
];
|
|
46
46
|
return (jsx_runtime_1.jsxs("div", { style: layout_1.optionRow, children: [
|
|
47
|
-
jsx_runtime_1.jsx("div", { style: layout_1.label, children: name }), jsx_runtime_1.jsx("div", { style: layout_1.rightRow, children: jsx_runtime_1.jsx(ComboBox_1.Combobox, { values: values, selectedId: value === null ? DEFAULT_VALUE : `${name}-${String(value)}`, style: controlWidth,
|
|
47
|
+
jsx_runtime_1.jsx("div", { style: layout_1.label, children: name }), jsx_runtime_1.jsx("div", { style: layout_1.rightRow, children: jsx_runtime_1.jsx(ComboBox_1.Combobox, { values: values, selectedId: value === null ? DEFAULT_VALUE : `${name}-${String(value)}`, style: controlWidth, "aria-label": name }) })
|
|
48
48
|
] }));
|
|
49
49
|
};
|
|
50
50
|
exports.ConfigSelect = ConfigSelect;
|
|
@@ -195,9 +195,9 @@ const DefaultEditorSettings = () => {
|
|
|
195
195
|
const displayedError = error !== null && error !== void 0 ? error : settingsError;
|
|
196
196
|
return (jsx_runtime_1.jsx("div", { style: container, children: jsx_runtime_1.jsxs("div", { style: content, children: [
|
|
197
197
|
jsx_runtime_1.jsxs("div", { style: layout_2.optionRow, children: [
|
|
198
|
-
jsx_runtime_1.jsx("div", { style: layout_2.label, children: "Default editor" }), jsx_runtime_1.jsxs("div", { style: rightColumn, children: [editorInfo === null && displayedError === null ? (jsx_runtime_1.jsx("p", { style: rightDescription, children: "Loading installed editors..." })) : null, (editorInfo === null || editorInfo === void 0 ? void 0 : editorInfo.installedEditors.length) === 0 ? (jsx_runtime_1.jsx("p", { style: rightDescription, children: "No supported editors were found on this computer." })) : null, editorInfo === null ? null : (jsx_runtime_1.jsx(ComboBox_1.Combobox, { values: editorValues, selectedId: selectedEditor !== null && selectedEditor !== void 0 ? selectedEditor : NO_PREFERENCE_ID, style: comboBoxStyle,
|
|
198
|
+
jsx_runtime_1.jsx("div", { style: layout_2.label, children: "Default editor" }), jsx_runtime_1.jsxs("div", { style: rightColumn, children: [editorInfo === null && displayedError === null ? (jsx_runtime_1.jsx("p", { style: rightDescription, children: "Loading installed editors..." })) : null, (editorInfo === null || editorInfo === void 0 ? void 0 : editorInfo.installedEditors.length) === 0 ? (jsx_runtime_1.jsx("p", { style: rightDescription, children: "No supported editors were found on this computer." })) : null, editorInfo === null ? null : (jsx_runtime_1.jsx(ComboBox_1.Combobox, { values: editorValues, selectedId: selectedEditor !== null && selectedEditor !== void 0 ? selectedEditor : NO_PREFERENCE_ID, style: comboBoxStyle, "aria-label": "Default editor" }))] })
|
|
199
199
|
] }), jsx_runtime_1.jsxs("div", { style: layout_2.optionRow, children: [
|
|
200
|
-
jsx_runtime_1.jsx("div", { style: layout_2.label, children: "Default coding agent" }), jsx_runtime_1.jsxs("div", { style: rightColumn, children: [codingAgentInfo === null && displayedError === null ? (jsx_runtime_1.jsx("p", { style: rightDescription, children: "Loading installed coding agents..." })) : null, (codingAgentInfo === null || codingAgentInfo === void 0 ? void 0 : codingAgentInfo.installedCodingAgents.length) === 0 ? (jsx_runtime_1.jsx("p", { style: rightDescription, children: "No supported coding agents were found on this computer." })) : null, codingAgentInfo === null ? null : (jsx_runtime_1.jsx(ComboBox_1.Combobox, { values: codingAgentValues, selectedId: selectedCodingAgent !== null && selectedCodingAgent !== void 0 ? selectedCodingAgent : NO_PREFERENCE_ID, style: comboBoxStyle,
|
|
200
|
+
jsx_runtime_1.jsx("div", { style: layout_2.label, children: "Default coding agent" }), jsx_runtime_1.jsxs("div", { style: rightColumn, children: [codingAgentInfo === null && displayedError === null ? (jsx_runtime_1.jsx("p", { style: rightDescription, children: "Loading installed coding agents..." })) : null, (codingAgentInfo === null || codingAgentInfo === void 0 ? void 0 : codingAgentInfo.installedCodingAgents.length) === 0 ? (jsx_runtime_1.jsx("p", { style: rightDescription, children: "No supported coding agents were found on this computer." })) : null, codingAgentInfo === null ? null : (jsx_runtime_1.jsx(ComboBox_1.Combobox, { values: codingAgentValues, selectedId: selectedCodingAgent !== null && selectedCodingAgent !== void 0 ? selectedCodingAgent : NO_PREFERENCE_ID, style: comboBoxStyle, "aria-label": "Default coding agent" }))] })
|
|
201
201
|
] }), displayedError ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
202
202
|
jsx_runtime_1.jsx(layout_1.Spacing, { y: 1.5 }), jsx_runtime_1.jsx("div", { style: { paddingLeft: 16, paddingRight: 16 }, children: jsx_runtime_1.jsx(ValidationMessage_1.ValidationMessage, { message: displayedError, align: "flex-start", type: "error" }) })
|
|
203
203
|
] })) : null] }) }));
|
|
@@ -2,7 +2,6 @@ import React from 'react';
|
|
|
2
2
|
import type { RenderInlineAction } from './InlineAction';
|
|
3
3
|
export declare const CONTROL_BUTTON_PADDING = 6;
|
|
4
4
|
export declare const ControlButton: (props: Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "children" | "onClick" | "title"> & {
|
|
5
|
-
readonly title: string;
|
|
6
5
|
readonly onClick: React.MouseEventHandler<HTMLButtonElement>;
|
|
7
6
|
readonly children: RenderInlineAction | React.ReactNode;
|
|
8
7
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -6,8 +6,8 @@ const colors_1 = require("../helpers/colors");
|
|
|
6
6
|
const InlineAction_1 = require("./InlineAction");
|
|
7
7
|
exports.CONTROL_BUTTON_PADDING = 6;
|
|
8
8
|
const ControlButton = (props) => {
|
|
9
|
-
const { children, onClick,
|
|
9
|
+
const { children, onClick, ...buttonProps } = props;
|
|
10
10
|
const renderAction = typeof children === 'function' ? children : () => children;
|
|
11
|
-
return (jsx_runtime_1.jsx(InlineAction_1.InlineAction, { ...buttonProps,
|
|
11
|
+
return (jsx_runtime_1.jsx(InlineAction_1.InlineAction, { ...buttonProps, onClick: onClick, renderAction: renderAction, variant: null, unhoveredColor: colors_1.WHITE_ALPHA_80 }));
|
|
12
12
|
};
|
|
13
13
|
exports.ControlButton = ControlButton;
|
|
@@ -249,7 +249,7 @@ const AssetInfo = ({ assetName, contentSized = false, onAssetClick, readOnlyStud
|
|
|
249
249
|
return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
250
250
|
jsx_runtime_1.jsx(InspectorInfoHeader_1.InspectorInfoHeader, { contentSized: contentSized, minHeight: exports.CURRENT_ASSET_HEIGHT, padding: contentSized
|
|
251
251
|
? `0 ${InspectorPanelLayout_1.INSPECTOR_PANEL_HORIZONTAL_PADDING}px 6px`
|
|
252
|
-
: '4px 0', children: jsx_runtime_1.jsx(InlineEditableTitle_1.InlineEditableTitle, { value: fileName, canRename: canRename, getInitialSelection: use_rename_static_file_1.getStaticFileRenameSelection, onClick: onAssetClick, onCommit: onRename, size: contentSized ? 'default' : 'inspector',
|
|
252
|
+
: '4px 0', children: jsx_runtime_1.jsx(InlineEditableTitle_1.InlineEditableTitle, { value: fileName, canRename: canRename, getInitialSelection: use_rename_static_file_1.getStaticFileRenameSelection, onClick: onAssetClick, onCommit: onRename, size: contentSized ? 'default' : 'inspector', "aria-label": assetName }) }), fileDetails.length > 0 ? (jsx_runtime_1.jsx(CollapsibleInspectorSection_1.CollapsibleInspectorSection, { collapsible: true, label: "File", sectionId: "asset-file", children: jsx_runtime_1.jsx("div", { style: assetMetadataStyle, children: fileDetails.map((detail) => (jsx_runtime_1.jsx(common_1.InspectorDetailRow, { label: detail.label, children: jsx_runtime_1.jsx("span", { style: assetMetadataValueStyle, children: detail.value }) }, detail.label))) }) })) : null, mediaSections && mediaSections.video ? (jsx_runtime_1.jsx(CollapsibleInspectorSection_1.CollapsibleInspectorSection, { collapsible: true, label: "Video", sectionId: "asset-video", children: jsx_runtime_1.jsx("div", { style: assetMetadataStyle, children: mediaSections.video.map((detail) => (jsx_runtime_1.jsx(common_1.InspectorDetailRow, { label: detail.label, children: jsx_runtime_1.jsx("span", { style: assetMetadataValueStyle, children: detail.value }) }, detail.label))) }) })) : null, mediaSections && mediaSections.audio !== null ? (jsx_runtime_1.jsx(CollapsibleInspectorSection_1.CollapsibleInspectorSection, { collapsible: mediaSections.audio.length > 0, label: "Audio", sectionId: "asset-audio", children: mediaSections.audio.length === 0 ? (jsx_runtime_1.jsx("div", { style: assetEmptyStateStyle, children: "None" })) : (jsx_runtime_1.jsxs("div", { style: assetMetadataStyle, children: [mediaSections.audio.map((detail) => (jsx_runtime_1.jsx(common_1.InspectorDetailRow, { label: detail.label, children: jsx_runtime_1.jsx("span", { style: assetMetadataValueStyle, children: detail.value }) }, detail.label))), src ? (jsx_runtime_1.jsx(common_1.InspectorDetailRow, { label: "Average volume", children: jsx_runtime_1.jsx("span", { style: assetMetadataValueStyle, children: jsx_runtime_1.jsx(AssetAudioVolume_1.AssetAudioVolume, { src: (_d = volumeMetadata === null || volumeMetadata === void 0 ? void 0 : volumeMetadata.src) !== null && _d !== void 0 ? _d : null, waveformSampleRate: volumeMetadata
|
|
253
253
|
? Math.ceil(volumeMetadata.fps *
|
|
254
254
|
get_timeline_max_zoom_1.TIMELINE_FRAME_WIDTH_AT_MAX_ZOOM)
|
|
255
255
|
: null }, (_e = volumeMetadata === null || volumeMetadata === void 0 ? void 0 : volumeMetadata.src) !== null && _e !== void 0 ? _e : src) }) })) : null] })) })) : null, jsx_runtime_1.jsx(CollapsibleInspectorSection_1.CollapsibleInspectorSection, { collapsible: true, label: "Actions", sectionId: "asset-actions", children: jsx_runtime_1.jsxs(common_1.InspectorQuickActionsSection, { children: [fileManagerAvailable ? (jsx_runtime_1.jsxs(common_1.InspectorQuickAction, { disabled: fileManagerDisabled, onClick: onShowInFileManager, renderIcon: (color) => (jsx_runtime_1.jsx(folder_1.ExpandedFolderIcon, { color: color, style: quickActionIconStyle })), children: ["Show in ", fileManagerName] })) : null, src && (mediaMetadata === null || mediaMetadata === void 0 ? void 0 : mediaMetadata.hasAudioTrack) !== false ? (jsx_runtime_1.jsx(common_1.InspectorQuickAction, { disabled: mutationsDisabled, onClick: onTranscribe, renderIcon: (color) => (jsx_runtime_1.jsx(transcription_1.TranscriptionIcon, { color: color, style: quickActionIconStyle })), children: "Transcribe" })) : null, fileType === 'video' ? (jsx_runtime_1.jsx(common_1.InspectorQuickAction, { disabled: mutationsDisabled, onClick: onTrackMatting, renderIcon: (color) => (jsx_runtime_1.jsx(background_removal_1.BackgroundRemovalIcon, { color: color, style: quickActionIconStyle })), children: "Remove background" })) : null, src ? (jsx_runtime_1.jsxs(common_1.InspectorQuickAction, { disabled: false, onClick: onOpenConvert, renderIcon: (color) => (jsx_runtime_1.jsx(remotion_convert_1.RemotionConvertIcon, { color: color, style: quickActionIconStyle })), children: ["Convert",
|
|
@@ -192,7 +192,7 @@ const ElementLibrariesSettings = () => {
|
|
|
192
192
|
...libraryUrlStyle,
|
|
193
193
|
color: hoveredUrl === library.url ? colors_1.WHITE : colors_1.LIGHT_TEXT,
|
|
194
194
|
}, onMouseEnter: () => setHoveredUrl(library.url), onMouseLeave: () => setHoveredUrl(null), children: library.url.replace(/^https?:\/\//, '') })
|
|
195
|
-
] }), busy === library.url ? (jsx_runtime_1.jsx(Spinner_1.Spinner, { duration: 0.5, size: 14 })) : (jsx_runtime_1.jsx(ActionTooltip_1.ActionTooltip, { label: "Remove", shortcut: null, delay: 800, dismissOnClick: true, children: jsx_runtime_1.jsx(InlineAction_1.InlineAction, { "aria-label": `Remove ${(_b = library.displayName) !== null && _b !== void 0 ? _b : library.url}`,
|
|
195
|
+
] }), busy === library.url ? (jsx_runtime_1.jsx(Spinner_1.Spinner, { duration: 0.5, size: 14 })) : (jsx_runtime_1.jsx(ActionTooltip_1.ActionTooltip, { label: "Remove", shortcut: null, delay: 800, dismissOnClick: true, children: jsx_runtime_1.jsx(InlineAction_1.InlineAction, { "aria-label": `Remove ${(_b = library.displayName) !== null && _b !== void 0 ? _b : library.url}`, disabled: !canSave, onClick: () => removeLibrary(library.url), renderAction: renderTrash, variant: null }) }))] }, library.url));
|
|
196
196
|
})] }), jsx_runtime_1.jsx("h3", { style: addLibraryHeading, children: "Add new library" }), jsx_runtime_1.jsxs("div", { style: inputRow, children: [
|
|
197
197
|
jsx_runtime_1.jsx(RemInput_1.RemotionInput, { "aria-label": "Element Library URL", placeholder: "https://example.com/elements", status: "ok", rightAlign: false, style: input, value: url, onChange: (event) => setUrl(event.target.value) }), jsx_runtime_1.jsx(RemInput_1.RemotionInput, { "aria-label": "Element Library name", placeholder: "Name (optional)", status: "ok", rightAlign: false, style: input, value: displayName, onChange: (event) => setDisplayName(event.target.value) })
|
|
198
198
|
] }), jsx_runtime_1.jsx("div", { style: inputRow, children: jsx_runtime_1.jsx(Button_1.Button, { disabled: !canSave || normalizedUrl === null || duplicate, onClick: addLibrary, size: "compact", children: busy === 'add' ? 'Adding…' : '+ Add Element Library' }) }), duplicate ? (jsx_runtime_1.jsx("div", { style: message, children: jsx_runtime_1.jsx(ValidationMessage_1.ValidationMessage, { align: "flex-start", type: "warning", message: "This library is already added." }) })) : null, error ? (jsx_runtime_1.jsx("div", { style: message, children: jsx_runtime_1.jsx(ValidationMessage_1.ValidationMessage, { align: "flex-start", type: "error", message: error }) })) : null] }));
|
|
@@ -36,7 +36,7 @@ const ElementLibraryModal = ({ name, url }) => {
|
|
|
36
36
|
iframe.src = iframeUrl.toString();
|
|
37
37
|
}, [url]);
|
|
38
38
|
return (jsx_runtime_1.jsxs(DismissableModal_1.DismissableModal, { panelStyle: panelStyle, children: [
|
|
39
|
-
jsx_runtime_1.jsx(ModalHeader_1.ModalHeader, { title: name }), jsx_runtime_1.jsx("iframe", { ref: iframeRef, allow: "local-network-access; loopback-network", "data-remotion-element-library": "", style: iframeStyle,
|
|
39
|
+
jsx_runtime_1.jsx(ModalHeader_1.ModalHeader, { title: name }), jsx_runtime_1.jsx("iframe", { ref: iframeRef, allow: "local-network-access; loopback-network", "data-remotion-element-library": "", style: iframeStyle, "aria-label": `${name} library` })
|
|
40
40
|
] }));
|
|
41
41
|
};
|
|
42
42
|
exports.ElementLibraryModal = ElementLibraryModal;
|
|
@@ -7,16 +7,16 @@ const FramePersistor = () => {
|
|
|
7
7
|
const playing = remotion_1.Internals.usePlaying();
|
|
8
8
|
const config = (0, remotion_1.useVideoConfig)();
|
|
9
9
|
const frame = remotion_1.Internals.Timeline.useTimelinePosition();
|
|
10
|
-
const
|
|
10
|
+
const setFrameWithoutSeek = remotion_1.Internals.useTimelineSetFrameWithoutSeek();
|
|
11
11
|
(0, react_1.useEffect)(() => {
|
|
12
12
|
if (!playing) {
|
|
13
|
-
|
|
13
|
+
setFrameWithoutSeek((f) => {
|
|
14
14
|
const newObj = f[config.id] === frame ? f : { ...f, [config.id]: frame };
|
|
15
15
|
remotion_1.Internals.persistCurrentFrame(newObj);
|
|
16
16
|
return newObj;
|
|
17
17
|
});
|
|
18
18
|
}
|
|
19
|
-
}, [config.id, frame, playing,
|
|
19
|
+
}, [config.id, frame, playing, setFrameWithoutSeek]);
|
|
20
20
|
return null;
|
|
21
21
|
};
|
|
22
22
|
exports.FramePersistor = FramePersistor;
|
|
@@ -42,6 +42,6 @@ const FullScreenToggle = ({ hidden }) => {
|
|
|
42
42
|
f.unregister();
|
|
43
43
|
};
|
|
44
44
|
}, [keybindings, onClick]);
|
|
45
|
-
return hidden ? (jsx_runtime_1.jsx("button", { id: "fullscreen-toggle", type: "button", style: { display: 'none' }, onClick: onClick })) : (jsx_runtime_1.jsx(ActionTooltip_1.ActionTooltip, { label: "Fullscreen", shortcut: shortcutsDisabled ? null : shortcut, delay: 800, dismissOnClick: true, children: jsx_runtime_1.jsx(ControlButton_1.ControlButton, { id: "fullscreen-toggle",
|
|
45
|
+
return hidden ? (jsx_runtime_1.jsx("button", { id: "fullscreen-toggle", type: "button", style: { display: 'none' }, onClick: onClick })) : (jsx_runtime_1.jsx(ActionTooltip_1.ActionTooltip, { label: "Fullscreen", shortcut: shortcutsDisabled ? null : shortcut, delay: 800, dismissOnClick: true, children: jsx_runtime_1.jsx(ControlButton_1.ControlButton, { id: "fullscreen-toggle", "aria-label": accessibilityLabel, "aria-keyshortcuts": shortcutsDisabled ? undefined : ariaKeyShortcuts || undefined, onClick: onClick, children: (color) => (jsx_runtime_1.jsx(fullscreen_1.FullscreenIcon, { color: color, style: { width: 18, height: 18 } })) }) }));
|
|
46
46
|
};
|
|
47
47
|
exports.FullScreenToggle = FullScreenToggle;
|
|
@@ -17,7 +17,7 @@ const useSelectComposition = () => {
|
|
|
17
17
|
const { setCanvasContent } = (0, react_1.useContext)(remotion_1.Internals.CompositionSetters);
|
|
18
18
|
// A supplied frame is explicit navigation (for example, opening a nested
|
|
19
19
|
// composition at its sequence's frame). Plain selection does not seek.
|
|
20
|
-
const
|
|
20
|
+
const seekFrame = remotion_1.Internals.Timeline.useTimelineSeekFrame();
|
|
21
21
|
return (0, react_1.useCallback)((c, push, frame = null) => {
|
|
22
22
|
var _a;
|
|
23
23
|
if (push) {
|
|
@@ -25,7 +25,7 @@ const useSelectComposition = () => {
|
|
|
25
25
|
}
|
|
26
26
|
(_a = ExplorerPanelRef_1.explorerSidebarTabs.current) === null || _a === void 0 ? void 0 : _a.selectCompositionPanel();
|
|
27
27
|
if (frame !== null) {
|
|
28
|
-
|
|
28
|
+
seekFrame((current) => ({ ...current, [c.id]: frame }));
|
|
29
29
|
}
|
|
30
30
|
setCanvasContent({ type: 'composition', compositionId: c.id });
|
|
31
31
|
const { folderName, parentFolderName } = c;
|
|
@@ -42,7 +42,7 @@ const useSelectComposition = () => {
|
|
|
42
42
|
return newState;
|
|
43
43
|
});
|
|
44
44
|
}
|
|
45
|
-
}, [setCanvasContent, setCompositionFoldersExpanded,
|
|
45
|
+
}, [setCanvasContent, setCompositionFoldersExpanded, seekFrame]);
|
|
46
46
|
};
|
|
47
47
|
exports.useSelectComposition = useSelectComposition;
|
|
48
48
|
const InitialCompositionLoader = () => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
export type RenderInlineAction = (color: string) => React.ReactNode;
|
|
3
|
-
export type InlineActionProps = Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'children' | 'onClick' | 'style'> & {
|
|
3
|
+
export type InlineActionProps = Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'children' | 'onClick' | 'style' | 'title'> & {
|
|
4
4
|
readonly onClick: React.MouseEventHandler<HTMLButtonElement>;
|
|
5
5
|
readonly renderAction: RenderInlineAction;
|
|
6
6
|
readonly hoveredColor?: string;
|
|
@@ -8,4 +8,4 @@ export type InlineActionProps = Omit<React.ButtonHTMLAttributes<HTMLButtonElemen
|
|
|
8
8
|
readonly variant: 'compact' | null;
|
|
9
9
|
readonly style?: React.CSSProperties;
|
|
10
10
|
};
|
|
11
|
-
export declare const InlineAction: ({ renderAction, onClick, disabled,
|
|
11
|
+
export declare const InlineAction: ({ renderAction, onClick, disabled, hoveredColor, unhoveredColor, variant, style: customStyle, className, onPointerDown: onPointerDownProp, ...buttonProps }: InlineActionProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -6,8 +6,7 @@ const react_1 = require("react");
|
|
|
6
6
|
const colors_1 = require("../helpers/colors");
|
|
7
7
|
const hoverable_1 = require("../helpers/hoverable");
|
|
8
8
|
const z_index_1 = require("../state/z-index");
|
|
9
|
-
const InlineAction = ({ renderAction, onClick, disabled,
|
|
10
|
-
var _a;
|
|
9
|
+
const InlineAction = ({ renderAction, onClick, disabled, hoveredColor = colors_1.WHITE, unhoveredColor = colors_1.LIGHT_TEXT, variant, style: customStyle, className, onPointerDown: onPointerDownProp, ...buttonProps }) => {
|
|
11
10
|
const { tabIndex } = (0, z_index_1.useZIndex)();
|
|
12
11
|
const onPointerDown = (0, react_1.useCallback)((event) => {
|
|
13
12
|
onPointerDownProp === null || onPointerDownProp === void 0 ? void 0 : onPointerDownProp(event);
|
|
@@ -44,6 +43,6 @@ const InlineAction = ({ renderAction, onClick, disabled, title, hoveredColor = c
|
|
|
44
43
|
}, [customStyle, disabled, hoveredColor, unhoveredColor, variant]);
|
|
45
44
|
return (jsx_runtime_1.jsx("button", { ...buttonProps, type: "button", className: className
|
|
46
45
|
? `${hoverable_1.HOVERABLE_CLASS_NAME} ${className}`
|
|
47
|
-
: hoverable_1.HOVERABLE_CLASS_NAME, disabled: disabled, onClick: onClick, onPointerDown: onPointerDown, style: style, tabIndex: tabIndex,
|
|
46
|
+
: hoverable_1.HOVERABLE_CLASS_NAME, disabled: disabled, onClick: onClick, onPointerDown: onPointerDown, style: style, tabIndex: tabIndex, children: renderAction(colors_1.CURRENT_COLOR) }));
|
|
48
47
|
};
|
|
49
48
|
exports.InlineAction = InlineAction;
|
|
@@ -90,7 +90,7 @@ const inspectorTitleInput = {
|
|
|
90
90
|
fontFamily: 'sans-serif',
|
|
91
91
|
fontSize: 13,
|
|
92
92
|
};
|
|
93
|
-
const InlineEditableTitle = ({ value, canRename, getInitialSelection, onClick, onCommit, size = 'default',
|
|
93
|
+
const InlineEditableTitle = ({ value, canRename, getInitialSelection, onClick, onCommit, size = 'default', 'aria-label': ariaLabel, }) => {
|
|
94
94
|
const [isEditing, setIsEditing] = (0, react_1.useState)(false);
|
|
95
95
|
const [isHovered, setIsHovered] = (0, react_1.useState)(false);
|
|
96
96
|
const [draftValue, setDraftValue] = (0, react_1.useState)(value);
|
|
@@ -179,10 +179,10 @@ const InlineEditableTitle = ({ value, canRename, getInitialSelection, onClick, o
|
|
|
179
179
|
? inspectorTitleGridItem
|
|
180
180
|
: titleGridItem;
|
|
181
181
|
const inputStyle = isInspectorSize ? inspectorTitleInput : titleInput;
|
|
182
|
-
return (jsx_runtime_1.jsx("div", { style: isInspectorSize ? inspectorTitleWrapper : titleWrapper,
|
|
182
|
+
return (jsx_runtime_1.jsx("div", { style: isInspectorSize ? inspectorTitleWrapper : titleWrapper, "aria-label": ariaLabel !== null && ariaLabel !== void 0 ? ariaLabel : value, role: "group", children: jsx_runtime_1.jsxs("span", { style: innerStyle, onMouseEnter: () => setIsHovered(true), onMouseLeave: () => setIsHovered(false), onClick: isEditing || !isInteractive ? undefined : handleClick, children: [
|
|
183
183
|
jsx_runtime_1.jsx("span", { "aria-hidden": isEditing, style: {
|
|
184
184
|
...gridItemStyle,
|
|
185
185
|
visibility: isEditing ? 'hidden' : 'visible',
|
|
186
|
-
}, children: value }), isEditing ? (jsx_runtime_1.jsx("input", { ref: focusInput, style: { ...gridItemStyle, ...inputStyle }, value: draftValue, onChange: onChange, onBlur: onBlur, onKeyDown: onKeyDown })) : null] }) }));
|
|
186
|
+
}, children: value }), isEditing ? (jsx_runtime_1.jsx("input", { ref: focusInput, "aria-label": ariaLabel !== null && ariaLabel !== void 0 ? ariaLabel : value, style: { ...gridItemStyle, ...inputStyle }, value: draftValue, onChange: onChange, onBlur: onBlur, onKeyDown: onKeyDown })) : null] }) }));
|
|
187
187
|
};
|
|
188
188
|
exports.InlineEditableTitle = InlineEditableTitle;
|
|
@@ -69,6 +69,6 @@ const InspectorLocationCopy = ({ children, location, name, openInEditorLocation
|
|
|
69
69
|
opacity: showAction ? 1 : 0,
|
|
70
70
|
pointerEvents: showAction ? 'auto' : 'none',
|
|
71
71
|
}, children: [
|
|
72
|
-
jsx_runtime_1.jsx(InspectorOpenInEditor_1.InspectorOpenInEditor, { locationType: null, contextForAgents: contextForAgents, location: openInEditorLocation, showTooltips: false }), contextForAgents ? (jsx_runtime_1.jsx(InlineAction_1.InlineAction, { variant: null, onClick: onCopy, renderAction: renderCopyAction,
|
|
72
|
+
jsx_runtime_1.jsx(InspectorOpenInEditor_1.InspectorOpenInEditor, { locationType: null, contextForAgents: contextForAgents, location: openInEditorLocation, showTooltips: false }), contextForAgents ? (jsx_runtime_1.jsx(InlineAction_1.InlineAction, { variant: null, onClick: onCopy, renderAction: renderCopyAction, "aria-label": "Copy context for agents" })) : null] })) : null] }));
|
|
73
73
|
};
|
|
74
74
|
exports.InspectorLocationCopy = InspectorLocationCopy;
|
|
@@ -172,7 +172,6 @@ const InspectorOpenInEditor = ({ contextForAgents = null, label, location, locat
|
|
|
172
172
|
renderContent: () => (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [label, defaultOpenInTarget === 'git-source' ? (jsx_runtime_1.jsx(github_1.GitHubIcon, { size: githubButtonIconSize })) : (jsx_runtime_1.jsx(editor_1.EditorIcon, { editorId: defaultEditorId, size: editorButtonIconSize }))] })),
|
|
173
173
|
segmentId: 'default-editor',
|
|
174
174
|
style: mainSegmentStyle,
|
|
175
|
-
title: showTooltips ? '' : `Open in ${defaultAppName}`,
|
|
176
175
|
tooltipLabel: showTooltips ? `Open in ${defaultAppName}` : null,
|
|
177
176
|
type: 'action',
|
|
178
177
|
},
|
|
@@ -189,7 +188,6 @@ const InspectorOpenInEditor = ({ contextForAgents = null, label, location, locat
|
|
|
189
188
|
segmentId: 'another-app',
|
|
190
189
|
selectedId: null,
|
|
191
190
|
style: dropdownSegmentStyle,
|
|
192
|
-
title: showTooltips ? '' : 'Open in another app',
|
|
193
191
|
tooltipLabel: showTooltips ? 'Open in another app' : null,
|
|
194
192
|
type: 'menu',
|
|
195
193
|
values: menuItems,
|
|
@@ -212,6 +210,6 @@ const InspectorOpenInEditor = ({ contextForAgents = null, label, location, locat
|
|
|
212
210
|
if (previewServerState.type !== 'connected' && defaultOpenInTarget === null) {
|
|
213
211
|
return null;
|
|
214
212
|
}
|
|
215
|
-
return jsx_runtime_1.jsx(SegmentedButton_1.SegmentedButton, { segments: segments, style: null
|
|
213
|
+
return jsx_runtime_1.jsx(SegmentedButton_1.SegmentedButton, { segments: segments, style: null });
|
|
216
214
|
};
|
|
217
215
|
exports.InspectorOpenInEditor = InspectorOpenInEditor;
|