@remotion/studio 4.0.523 → 4.0.525
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/components/ActionTooltip.d.ts +11 -0
- package/dist/components/ActionTooltip.js +153 -0
- package/dist/components/AppLaunchButton.js +2 -0
- package/dist/components/AssetSelectorModal.d.ts +6 -0
- package/dist/components/AssetSelectorModal.js +174 -0
- package/dist/components/Canvas.js +18 -3
- package/dist/components/CheckboardToggle.js +8 -10
- package/dist/components/ColorPicker/AlphaSlider.js +1 -1
- package/dist/components/ColorPicker/HueSlider.js +1 -1
- package/dist/components/ColorPicker/SaturationValueArea.js +1 -1
- package/dist/components/CompositionSelector.js +1 -0
- package/dist/components/CompositionSelectorItem.js +1 -0
- package/dist/components/EditorGuides/Guide.js +1 -1
- package/dist/components/ElementInstallConfirmation.js +35 -62
- package/dist/components/FullscreenToggle.js +5 -8
- package/dist/components/GlobalKeybindings.js +71 -0
- package/dist/components/InspectorLocationCopy.js +1 -1
- package/dist/components/InspectorOpenInEditor.d.ts +1 -0
- package/dist/components/InspectorOpenInEditor.js +18 -15
- package/dist/components/InspectorPanel/CompositionInspectorHeader.js +6 -7
- package/dist/components/InspectorPanel/CompositionMetadata.js +1 -0
- package/dist/components/InspectorPanel/ElementLibraryButton.js +1 -0
- package/dist/components/InspectorPanel/SequenceInspectorHeader.js +4 -12
- package/dist/components/InspectorSequenceSection.js +23 -14
- package/dist/components/LazySyntaxHighlightedSource.d.ts +4 -0
- package/dist/components/LazySyntaxHighlightedSource.js +43 -0
- package/dist/components/LoopToggle.js +9 -2
- package/dist/components/Menu/MenuItem.js +1 -2
- package/dist/components/MenuBuildIndicator.js +1 -1
- package/dist/components/MenuToolbar.js +6 -4
- package/dist/components/Modals.js +2 -1
- package/dist/components/MuteToggle.d.ts +1 -0
- package/dist/components/MuteToggle.js +17 -6
- package/dist/components/NewComposition/CodemodFooter.js +1 -0
- package/dist/components/NewComposition/DeleteComposition.js +42 -6
- package/dist/components/NewComposition/DeleteFolder.js +1 -0
- package/dist/components/NewComposition/DuplicateComposition.js +5 -0
- package/dist/components/NewComposition/InputDragger.js +2 -2
- package/dist/components/NewComposition/NewComposition.d.ts +1 -0
- package/dist/components/NewComposition/NewComposition.js +5 -4
- package/dist/components/NewComposition/NewFolder.js +31 -6
- package/dist/components/NewComposition/RenameComposition.js +3 -2
- package/dist/components/NewComposition/RenameFolder.js +3 -4
- package/dist/components/NewComposition/SlugPreview.d.ts +7 -0
- package/dist/components/NewComposition/SlugPreview.js +18 -0
- package/dist/components/NewComposition/duplicate-composition-api.d.ts +3 -2
- package/dist/components/NewComposition/duplicate-composition-api.js +9 -2
- package/dist/components/Notifications/NotificationCenter.d.ts +1 -0
- package/dist/components/Notifications/NotificationCenter.js +22 -1
- package/dist/components/OutlineToggle.js +17 -10
- package/dist/components/PlayPause.js +7 -1
- package/dist/components/PlaybackKeyboardShortcutsManager.d.ts +2 -0
- package/dist/components/PlaybackKeyboardShortcutsManager.js +36 -1
- package/dist/components/PlaybackRateSelector.js +2 -2
- package/dist/components/Preview.js +0 -3
- package/dist/components/PreviewToolbar.js +4 -7
- package/dist/components/PreviewToolbarOverflowButton.js +10 -3
- package/dist/components/QuickSwitcher/QuickSwitcherContent.js +1 -1
- package/dist/components/RenderButton.js +40 -4
- package/dist/components/RenderModal/WebRenderModalBasic.js +1 -1
- package/dist/components/RenderModal/render-modals.js +3 -0
- package/dist/components/RenderQueue/CaptionQueueItem.js +2 -1
- package/dist/components/RenderQueue/RenderQueueCopyToClipboard.js +2 -1
- package/dist/components/RenderQueue/RenderQueueDownloadItem.js +2 -1
- 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.js +2 -1
- package/dist/components/RenderQueue/actions.d.ts +2 -1
- package/dist/components/RenderQueue/actions.js +2 -1
- package/dist/components/RulersAndGuidesToggle.js +8 -1
- package/dist/components/SegmentedButton.d.ts +1 -0
- package/dist/components/SegmentedButton.js +9 -3
- package/dist/components/SelectedOutlineElement.js +16 -6
- package/dist/components/SelectedOutlinePolygon.js +4 -2
- package/dist/components/SettingsButton.js +8 -6
- package/dist/components/SettingsContext.d.ts +8 -0
- package/dist/components/SettingsContext.js +57 -2
- package/dist/components/SettingsModal.js +4 -1
- package/dist/components/SettingsModalFooter.js +1 -1
- package/dist/components/SidebarCollapserControls.js +13 -16
- package/dist/components/SizeSelector.js +2 -2
- package/dist/components/SkillsSettings.js +35 -4
- package/dist/components/SnappingToggle.js +7 -8
- package/dist/components/Splitter/SplitterHandle.js +1 -2
- package/dist/components/StudioSettings.js +32 -18
- package/dist/components/SyntaxHighlightedSource.d.ts +5 -0
- package/dist/components/{HighlightedElementSource.js → SyntaxHighlightedSource.js} +2 -2
- package/dist/components/Tabs/vertical.d.ts +1 -1
- package/dist/components/Tabs/vertical.js +16 -2
- package/dist/components/Timeline/EasingEditorModal.js +2 -2
- package/dist/components/Timeline/Timeline.js +47 -39
- package/dist/components/Timeline/TimelineAssetField.js +148 -9
- package/dist/components/Timeline/TimelineDragHandler.js +1 -2
- package/dist/components/Timeline/TimelineEffectItem.d.ts +1 -0
- package/dist/components/Timeline/TimelineEffectItem.js +2 -2
- package/dist/components/Timeline/TimelineEffectPropItem.d.ts +1 -0
- package/dist/components/Timeline/TimelineEffectPropItem.js +2 -2
- package/dist/components/Timeline/TimelineExpandedRow.js +2 -2
- package/dist/components/Timeline/TimelineInOutDragHandler.js +1 -2
- package/dist/components/Timeline/TimelineLayerChildren.js +12 -9
- package/dist/components/Timeline/TimelineSchemaField.js +8 -1
- package/dist/components/Timeline/TimelineSelection.d.ts +3 -1
- package/dist/components/Timeline/TimelineSelection.js +32 -5
- package/dist/components/Timeline/TimelineSequence.js +6 -6
- package/dist/components/Timeline/TimelineSequenceItem.js +12 -10
- package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.js +3 -12
- package/dist/components/Timeline/TimelineTranslateField.js +25 -12
- package/dist/components/Timeline/TimelineZoomControls.js +2 -1
- package/dist/components/Timeline/get-sequence-context-menu-items.js +22 -6
- package/dist/components/Timeline/timeline-field-display-utils.js +12 -7
- package/dist/components/Timeline/timeline-translate-utils.d.ts +17 -0
- package/dist/components/Timeline/timeline-translate-utils.js +53 -12
- package/dist/components/Timeline/use-open-sequence-in-apps.d.ts +2 -0
- package/dist/components/Timeline/use-open-sequence-in-apps.js +17 -0
- package/dist/components/Timeline/use-timeline-asset-drop.js +17 -3
- package/dist/components/Timeline/use-timeline-keyframe-drag.js +4 -4
- package/dist/components/TimelineCombobox.d.ts +1 -0
- package/dist/components/TimelineCombobox.js +9 -4
- package/dist/components/TimelineInOutToggle.js +8 -15
- package/dist/components/UndoRedoButtons.js +11 -0
- package/dist/components/composition-menu-items.js +56 -2
- package/dist/components/folder-menu-items.js +44 -0
- package/dist/components/get-open-in-menu-items.js +1 -1
- package/dist/components/handle-drop.js +3 -2
- package/dist/components/import-assets.d.ts +24 -1
- package/dist/components/import-assets.js +3 -1
- package/dist/components/keyboard-shortcuts.d.ts +4 -4
- package/dist/components/keyboard-shortcuts.js +28 -9
- package/dist/error-overlay/remotion-overlay/CodeFrame.js +29 -18
- package/dist/esm/LazyModels-gfmpcy4h.mjs +11 -0
- package/dist/esm/LazyModels-m1rf06wh.mjs +11 -0
- package/dist/esm/{HighlightedElementSource-jfc66k4p.mjs → SyntaxHighlightedSource-3xks91rz.mjs} +4 -4
- package/dist/esm/{TranscriptionModal-916jqhry.mjs → TranscriptionModal-8pvrehg4.mjs} +7 -7
- package/dist/esm/{VideoMattingModal-2tm79s9b.mjs → VideoMattingModal-fefbzgka.mjs} +7 -7
- package/dist/esm/{index-xhe2m2qr.mjs → index-0x13f28h.mjs} +35 -13
- package/dist/esm/{index-sgtmgc4h.mjs → index-1089795y.mjs} +3 -3
- package/dist/esm/{index-hy4xcgty.mjs → index-41kqns5c.mjs} +5 -3
- package/dist/esm/{index-6cvm9a65.mjs → index-ggqpre9v.mjs} +2868 -2099
- package/dist/esm/{index-czwvnn9g.mjs → index-hbezgbbq.mjs} +1 -1
- package/dist/esm/{index-1x7bsdh6.mjs → index-jrw61pkj.mjs} +2 -2
- package/dist/esm/{index-jg13hf2g.mjs → index-k426ye99.mjs} +2 -1
- package/dist/esm/{index-te66vvrp.mjs → index-mww32xc8.mjs} +4 -4
- package/dist/esm/{index-x7t2y7ws.mjs → index-s848rffx.mjs} +6985 -5956
- package/dist/esm/{index-3hgr6gjx.mjs → index-tzxb8808.mjs} +1 -1
- package/dist/esm/{index-5qddp5h7.mjs → index-vsxrxfpj.mjs} +1 -1
- package/dist/esm/index.mjs +3 -3
- package/dist/esm/internals.mjs +8 -8
- package/dist/esm/previewEntry.mjs +8 -8
- package/dist/esm/renderEntry.mjs +3 -3
- package/dist/helpers/colors.d.ts +1 -0
- package/dist/helpers/colors.js +4 -3
- package/dist/helpers/get-git-menu-item.d.ts +4 -0
- package/dist/helpers/get-git-menu-item.js +8 -1
- package/dist/helpers/get-sequence-double-click-action.d.ts +3 -3
- package/dist/helpers/get-sequence-double-click-action.js +2 -2
- package/dist/helpers/inject-css.js +2 -2
- package/dist/helpers/pointer-session.d.ts +1 -0
- package/dist/helpers/pointer-session.js +10 -1
- package/dist/helpers/prism-vsc-dark-plus.d.ts +1 -0
- package/dist/helpers/prism-vsc-dark-plus.js +305 -0
- package/dist/helpers/studio-runtime-config.d.ts +1 -1
- package/dist/helpers/use-create-composition.d.ts +1 -0
- package/dist/helpers/use-create-composition.js +17 -7
- package/dist/helpers/use-keybinding.d.ts +1 -1
- package/dist/helpers/use-keyboard-shortcut-label.d.ts +2 -2
- package/dist/helpers/use-media-metadata.js +5 -1
- package/dist/helpers/use-menu-structure.js +6 -2
- package/dist/helpers/use-rename-composition.d.ts +1 -0
- package/dist/helpers/use-rename-composition.js +16 -5
- package/dist/icons/skills.js +1 -1
- package/dist/renderEntry.js +2 -2
- package/dist/state/modals.d.ts +13 -1
- package/dist/state/z-index.js +1 -3
- package/package.json +20 -20
- package/dist/components/HighlightedElementSource.d.ts +0 -5
- package/dist/esm/LazyModels-2trdm224.mjs +0 -11
- package/dist/esm/LazyModels-fjb5ckaq.mjs +0 -11
- package/dist/helpers/prism-tomorrow.d.ts +0 -1
- package/dist/helpers/prism-tomorrow.js +0 -151
- /package/dist/esm/{resolve-composition-component-location-14148845.mjs → resolve-composition-component-location-bt2d6qxq.mjs} +0 -0
|
@@ -6,6 +6,7 @@ const react_1 = require("react");
|
|
|
6
6
|
const browser_studio_operations_1 = require("../../helpers/browser-studio-operations");
|
|
7
7
|
const colors_1 = require("../../helpers/colors");
|
|
8
8
|
const folder_1 = require("../../icons/folder");
|
|
9
|
+
const ActionTooltip_1 = require("../ActionTooltip");
|
|
9
10
|
const InlineAction_1 = require("../InlineAction");
|
|
10
11
|
const NotificationCenter_1 = require("../Notifications/NotificationCenter");
|
|
11
12
|
const actions_1 = require("./actions");
|
|
@@ -26,6 +27,6 @@ const RenderQueueOpenInFinderItem = ({ job }) => {
|
|
|
26
27
|
const renderAction = (0, react_1.useCallback)((color) => {
|
|
27
28
|
return jsx_runtime_1.jsx(folder_1.ExpandedFolderIconSolid, { style: icon, color: color });
|
|
28
29
|
}, [icon]);
|
|
29
|
-
return isBrowserStudio ? null : (jsx_runtime_1.jsx(InlineAction_1.InlineAction, { renderAction: renderAction, onClick: onClick, variant: null }));
|
|
30
|
+
return isBrowserStudio ? null : (jsx_runtime_1.jsx(ActionTooltip_1.ActionTooltip, { label: "Open in Folder", shortcut: null, delay: 800, dismissOnClick: true, children: jsx_runtime_1.jsx(InlineAction_1.InlineAction, { "aria-label": "Open in Folder", renderAction: renderAction, onClick: onClick, variant: null }) }));
|
|
30
31
|
};
|
|
31
32
|
exports.RenderQueueOpenInFinderItem = RenderQueueOpenInFinderItem;
|
|
@@ -6,6 +6,7 @@ const react_1 = require("react");
|
|
|
6
6
|
const remotion_1 = require("remotion");
|
|
7
7
|
const save_render_output_1 = require("../../api/save-render-output");
|
|
8
8
|
const colors_1 = require("../../helpers/colors");
|
|
9
|
+
const ActionTooltip_1 = require("../ActionTooltip");
|
|
9
10
|
const InlineAction_1 = require("../InlineAction");
|
|
10
11
|
const NotificationCenter_1 = require("../Notifications/NotificationCenter");
|
|
11
12
|
const actions_1 = require("./actions");
|
|
@@ -41,6 +42,6 @@ const RenderQueueRemoveItem = ({ job }) => {
|
|
|
41
42
|
const renderAction = (0, react_1.useCallback)((color) => {
|
|
42
43
|
return (jsx_runtime_1.jsx("svg", { style: icon, xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 320 512", children: jsx_runtime_1.jsx("path", { fill: color, d: "M310.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L160 210.7 54.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L114.7 256 9.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L160 301.3 265.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L205.3 256 310.6 150.6z" }) }));
|
|
43
44
|
}, [icon]);
|
|
44
|
-
return (jsx_runtime_1.jsx(InlineAction_1.InlineAction, { renderAction: renderAction, onClick: onClick,
|
|
45
|
+
return (jsx_runtime_1.jsx(ActionTooltip_1.ActionTooltip, { label: "Clear", shortcut: null, delay: 800, dismissOnClick: true, children: jsx_runtime_1.jsx(InlineAction_1.InlineAction, { "aria-label": "Clear", renderAction: renderAction, onClick: onClick, variant: null }) }));
|
|
45
46
|
};
|
|
46
47
|
exports.RenderQueueRemoveItem = RenderQueueRemoveItem;
|
|
@@ -6,6 +6,7 @@ const react_1 = require("react");
|
|
|
6
6
|
const colors_1 = require("../../helpers/colors");
|
|
7
7
|
const retry_payload_1 = require("../../helpers/retry-payload");
|
|
8
8
|
const modals_1 = require("../../state/modals");
|
|
9
|
+
const ActionTooltip_1 = require("../ActionTooltip");
|
|
9
10
|
const InlineAction_1 = require("../InlineAction");
|
|
10
11
|
const context_1 = require("./context");
|
|
11
12
|
const RenderQueueRepeatItem = ({ job }) => {
|
|
@@ -31,6 +32,6 @@ const RenderQueueRepeatItem = ({ job }) => {
|
|
|
31
32
|
const renderAction = (0, react_1.useCallback)((color) => {
|
|
32
33
|
return (jsx_runtime_1.jsx("svg", { style: icon, viewBox: "0 0 512 512", children: jsx_runtime_1.jsx("path", { fill: color, d: "M386.3 160H336c-17.7 0-32 14.3-32 32s14.3 32 32 32H464c17.7 0 32-14.3 32-32V64c0-17.7-14.3-32-32-32s-32 14.3-32 32v51.2L414.4 97.6c-87.5-87.5-229.3-87.5-316.8 0s-87.5 229.3 0 316.8s229.3 87.5 316.8 0c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0c-62.5 62.5-163.8 62.5-226.3 0s-62.5-163.8 0-226.3s163.8-62.5 226.3 0L386.3 160z" }) }));
|
|
33
34
|
}, [icon]);
|
|
34
|
-
return (jsx_runtime_1.jsx(InlineAction_1.InlineAction, { onClick: onClick, renderAction: renderAction, variant: null }));
|
|
35
|
+
return (jsx_runtime_1.jsx(ActionTooltip_1.ActionTooltip, { label: "Retry", shortcut: null, delay: 800, dismissOnClick: true, children: jsx_runtime_1.jsx(InlineAction_1.InlineAction, { "aria-label": "Retry", onClick: onClick, renderAction: renderAction, variant: null }) }));
|
|
35
36
|
};
|
|
36
37
|
exports.RenderQueueRepeatItem = RenderQueueRepeatItem;
|
|
@@ -6,6 +6,7 @@ const react_1 = require("react");
|
|
|
6
6
|
const colors_1 = require("../../helpers/colors");
|
|
7
7
|
const url_state_1 = require("../../helpers/url-state");
|
|
8
8
|
const ellipsis_1 = require("../../icons/ellipsis");
|
|
9
|
+
const ActionTooltip_1 = require("../ActionTooltip");
|
|
9
10
|
const InlineAction_1 = require("../InlineAction");
|
|
10
11
|
const InlineDropdown_1 = require("../InlineDropdown");
|
|
11
12
|
const layout_1 = require("../layout");
|
|
@@ -124,6 +125,6 @@ const VideoMattingQueueItem = ({ job, selected }) => {
|
|
|
124
125
|
return (jsx_runtime_1.jsxs(layout_1.Row, { "data-render-queue-item": job.id, style: style, align: "center", onClick: onClick, onPointerEnter: () => setHovered(true), onPointerLeave: () => setHovered(false), children: [
|
|
125
126
|
jsx_runtime_1.jsx(Status, { job: job }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 1 }), jsx_runtime_1.jsxs("div", { style: right, children: [
|
|
126
127
|
jsx_runtime_1.jsx("div", { style: title, children: job.displayName }), jsx_runtime_1.jsx("div", { style: subtitles, title: tooltip, children: messages.map((message) => (jsx_runtime_1.jsx("span", { style: subtitle, children: message }, message))) })
|
|
127
|
-
] }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 1 }), done ? (jsx_runtime_1.jsx(InlineDropdown_1.InlineDropdown, { renderAction: (color) => (jsx_runtime_1.jsx(ellipsis_1.EllipsisIcon, { fill: color, svgProps: ellipsisIconStyle })),
|
|
128
|
+
] }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 1 }), done ? (jsx_runtime_1.jsx(ActionTooltip_1.ActionTooltip, { label: "Reveal video layer", shortcut: null, delay: 800, dismissOnClick: true, children: jsx_runtime_1.jsx(InlineDropdown_1.InlineDropdown, { renderAction: (color) => (jsx_runtime_1.jsx(ellipsis_1.EllipsisIcon, { fill: color, svgProps: ellipsisIconStyle })), "aria-label": "Reveal video layer", values: revealItems, variant: null }) })) : null, job.status === 'running' ? null : (jsx_runtime_1.jsx(ActionTooltip_1.ActionTooltip, { label: "Clear", shortcut: null, delay: 800, dismissOnClick: true, children: jsx_runtime_1.jsx(InlineAction_1.InlineAction, { renderAction: renderRemove, onClick: onRemove, "aria-label": "Clear", variant: null }) }))] }));
|
|
128
129
|
};
|
|
129
130
|
exports.VideoMattingQueueItem = VideoMattingQueueItem;
|
|
@@ -100,11 +100,12 @@ export declare const subscribeToFileExistenceWatcher: ({ file, clientId, }: {
|
|
|
100
100
|
export declare const openInFileExplorer: ({ directory }: {
|
|
101
101
|
directory: string;
|
|
102
102
|
}) => Promise<void>;
|
|
103
|
-
export declare const applyCodemod: ({ codemod, dryRun, symbolicatedStack, signal, }: {
|
|
103
|
+
export declare const applyCodemod: ({ codemod, dryRun, symbolicatedStack, signal, undoRedoNavigation, }: {
|
|
104
104
|
codemod: RecastCodemod;
|
|
105
105
|
dryRun: boolean;
|
|
106
106
|
symbolicatedStack: import("@remotion/studio-shared").SymbolicatedStackFrame | null;
|
|
107
107
|
signal: AbortSignal;
|
|
108
|
+
undoRedoNavigation: import("@remotion/studio-shared").UndoRedoNavigation | null;
|
|
108
109
|
}) => Promise<import("@remotion/studio-shared").ApplyCodemodResponse>;
|
|
109
110
|
export declare const removeRenderJob: (job: RenderJob) => Promise<undefined>;
|
|
110
111
|
export declare const cancelRenderJob: (job: RenderJob) => Promise<import("@remotion/studio-shared").CancelRenderResponse>;
|
|
@@ -137,11 +137,12 @@ const openInFileExplorer = ({ directory }) => {
|
|
|
137
137
|
return (0, call_api_1.callApi)('/api/open-in-file-explorer', body);
|
|
138
138
|
};
|
|
139
139
|
exports.openInFileExplorer = openInFileExplorer;
|
|
140
|
-
const applyCodemod = ({ codemod, dryRun, symbolicatedStack, signal, }) => {
|
|
140
|
+
const applyCodemod = ({ codemod, dryRun, symbolicatedStack, signal, undoRedoNavigation, }) => {
|
|
141
141
|
const body = {
|
|
142
142
|
codemod,
|
|
143
143
|
dryRun,
|
|
144
144
|
symbolicatedStack,
|
|
145
|
+
undoRedoNavigation,
|
|
145
146
|
};
|
|
146
147
|
const browserStudioOperations = (0, browser_studio_operations_1.getBrowserStudioOperations)();
|
|
147
148
|
if (browserStudioOperations !== null) {
|
|
@@ -4,9 +4,13 @@ exports.RulersAndGuidesToggle = 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 use_keybinding_1 = require("../helpers/use-keybinding");
|
|
8
|
+
const use_keyboard_shortcut_label_1 = require("../helpers/use-keyboard-shortcut-label");
|
|
7
9
|
const editor_guides_1 = require("../state/editor-guides");
|
|
8
10
|
const editor_rulers_1 = require("../state/editor-rulers");
|
|
11
|
+
const ActionTooltip_1 = require("./ActionTooltip");
|
|
9
12
|
const ControlButton_1 = require("./ControlButton");
|
|
13
|
+
const buttonStyle = { width: 26 };
|
|
10
14
|
const RulersAndGuidesToggle = ({ showGuides }) => {
|
|
11
15
|
const { editorShowGuides, setEditorShowGuides } = (0, react_1.useContext)(editor_guides_1.EditorShowGuidesContext);
|
|
12
16
|
const { editorShowRulers, setEditorShowRulers } = (0, react_1.useContext)(editor_rulers_1.EditorShowRulersContext);
|
|
@@ -22,6 +26,9 @@ const RulersAndGuidesToggle = ({ showGuides }) => {
|
|
|
22
26
|
setEditorShowRulers,
|
|
23
27
|
showGuides,
|
|
24
28
|
]);
|
|
29
|
+
const shortcut = (0, use_keyboard_shortcut_label_1.useKeyboardShortcutLabel)('toggleRulersAndGuides');
|
|
30
|
+
const ariaShortcut = (0, use_keyboard_shortcut_label_1.useKeyboardShortcutAriaKeyShortcuts)('toggleRulersAndGuides');
|
|
31
|
+
const shortcutsDisabled = (0, use_keybinding_1.areKeyboardShortcutsDisabled)();
|
|
25
32
|
const accessibilityLabel = showGuides
|
|
26
33
|
? rulersOrGuidesAreVisible
|
|
27
34
|
? 'Hide rulers and guides'
|
|
@@ -29,6 +36,6 @@ const RulersAndGuidesToggle = ({ showGuides }) => {
|
|
|
29
36
|
: editorShowRulers
|
|
30
37
|
? 'Hide rulers'
|
|
31
38
|
: 'Show rulers';
|
|
32
|
-
return (jsx_runtime_1.jsx(ControlButton_1.ControlButton, { title:
|
|
39
|
+
return (jsx_runtime_1.jsx(ActionTooltip_1.ActionTooltip, { label: showGuides ? 'Rulers and Guides' : 'Rulers', shortcut: shortcutsDisabled ? null : shortcut, delay: 800, dismissOnClick: false, children: jsx_runtime_1.jsx(ControlButton_1.ControlButton, { title: "", "aria-label": accessibilityLabel, "aria-keyshortcuts": shortcutsDisabled ? undefined : ariaShortcut || undefined, "aria-pressed": rulersOrGuidesAreVisible, onClick: onClick, style: buttonStyle, children: (color) => (jsx_runtime_1.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 576 512", style: { width: 18, height: 18 }, "aria-hidden": "true", focusable: "false", children: jsx_runtime_1.jsx("path", { fill: rulersOrGuidesAreVisible ? colors_1.BLUE : color, d: "M525.9 154.2L186.5 493.6c-6.2 6.2-16.4 6.2-22.6 0L50.7 380.5c-6.2-6.2-6.2-16.4 0-22.6l33.9-33.9 56.6 56.6c6.2 6.2 16.4 6.2 22.6 0s6.2-16.4 0-22.6l-56.6-56.6 39.6-39.6 33.9 33.9c6.2 6.2 16.4 6.2 22.6 0s6.2-16.4 0-22.6l-33.9-33.9 39.6-39.6 56.6 56.6c6.2 6.2 16.4 6.2 22.6 0s6.2-16.4 0-22.6l-56.6-56.6 39.6-39.6 33.9 33.9c6.2 6.2 16.4 6.2 22.6 0s6.2-16.4 0-22.6l-33.9-33.9 39.6-39.6 56.6 56.6c6.2 6.2 16.4 6.2 22.6 0s6.2-16.4 0-22.6l-56.6-56.6 33.9-33.9c6.2-6.2 16.4-6.2 22.6 0L525.9 131.5c6.2 6.2 6.2 16.4 0 22.6zM73.3 289.9L28.1 335.2c-18.7 18.7-18.7 49.1 0 67.9L141.2 516.2c18.7 18.7 49.1 18.7 67.9 0L548.5 176.8c18.7-18.7 18.7-49.1 0-67.9L435.4-4.2C416.6-23 386.2-23 367.5-4.2 77.1 286.2 140.3 223 73.3 289.9z" }) })) }) }));
|
|
33
40
|
};
|
|
34
41
|
exports.RulersAndGuidesToggle = RulersAndGuidesToggle;
|
|
@@ -9,6 +9,7 @@ type SegmentedButtonSegmentCommon = {
|
|
|
9
9
|
readonly segmentId: string;
|
|
10
10
|
readonly style: React.CSSProperties | null;
|
|
11
11
|
readonly title: string | null;
|
|
12
|
+
readonly tooltipLabel: string | null;
|
|
12
13
|
};
|
|
13
14
|
export type SegmentedButtonSegment = SegmentedButtonSegmentCommon & ({
|
|
14
15
|
readonly onClick: React.MouseEventHandler<HTMLButtonElement>;
|
|
@@ -13,6 +13,7 @@ const hoverable_1 = require("../helpers/hoverable");
|
|
|
13
13
|
const mobile_layout_1 = require("../helpers/mobile-layout");
|
|
14
14
|
const noop_1 = require("../helpers/noop");
|
|
15
15
|
const z_index_1 = require("../state/z-index");
|
|
16
|
+
const ActionTooltip_1 = require("./ActionTooltip");
|
|
16
17
|
const is_menu_item_1 = require("./Menu/is-menu-item");
|
|
17
18
|
const portals_1 = require("./Menu/portals");
|
|
18
19
|
const styles_1 = require("./Menu/styles");
|
|
@@ -46,6 +47,7 @@ const segmentStyle = {
|
|
|
46
47
|
padding: '0 6px',
|
|
47
48
|
whiteSpace: 'nowrap',
|
|
48
49
|
};
|
|
50
|
+
const tooltipTriggerStyle = { height: '100%' };
|
|
49
51
|
const getSegmentBorderRadius = ({ index, segmentCount, }) => {
|
|
50
52
|
if (segmentCount === 1) {
|
|
51
53
|
return SEGMENTED_BUTTON_BORDER_RADIUS;
|
|
@@ -106,7 +108,11 @@ const SegmentedButtonAction = ({ index, segment, segmentCount }) => {
|
|
|
106
108
|
(_a = segment.onPointerDown) === null || _a === void 0 ? void 0 : _a.call(segment, event);
|
|
107
109
|
preventPointerFocus(event);
|
|
108
110
|
}, [segment]);
|
|
109
|
-
|
|
111
|
+
const button = (jsx_runtime_1.jsx("button", { "aria-label": segment.ariaLabel, className: `${hoverable_1.HOVERABLE_CLASS_NAME} ${hoverable_1.FOCUS_VISIBLE_ONLY_CLASS_NAME}`, disabled: segment.disabled, id: (_a = segment.buttonId) !== null && _a !== void 0 ? _a : undefined, onClick: onClick, onMouseDown: preventMouseFocus, onPointerDown: onPointerDown, style: style, tabIndex: tabIndex, title: (_b = segment.title) !== null && _b !== void 0 ? _b : undefined, type: "button", children: segment.renderContent(colors_1.CURRENT_COLOR) }));
|
|
112
|
+
if (segment.tooltipLabel === null) {
|
|
113
|
+
return button;
|
|
114
|
+
}
|
|
115
|
+
return (jsx_runtime_1.jsx(ActionTooltip_1.ActionTooltip, { label: segment.tooltipLabel, shortcut: null, delay: 800, dismissOnClick: true, triggerStyle: tooltipTriggerStyle, children: button }));
|
|
110
116
|
};
|
|
111
117
|
const SegmentedButtonMenu = ({ index, segment, segmentCount }) => {
|
|
112
118
|
var _a, _b;
|
|
@@ -208,8 +214,8 @@ const SegmentedButtonMenu = ({ index, segment, segmentCount }) => {
|
|
|
208
214
|
...segment.style,
|
|
209
215
|
};
|
|
210
216
|
}, [index, opened, segment, segmentCount]);
|
|
211
|
-
|
|
212
|
-
|
|
217
|
+
const button = (jsx_runtime_1.jsx("button", { ref: ref, "aria-expanded": opened, "aria-haspopup": "menu", "aria-label": segment.ariaLabel, className: `${hoverable_1.HOVERABLE_CLASS_NAME} ${hoverable_1.FOCUS_VISIBLE_ONLY_CLASS_NAME} ${is_menu_item_1.MENU_INITIATOR_CLASSNAME}`, disabled: segment.disabled, id: (_a = segment.buttonId) !== null && _a !== void 0 ? _a : undefined, onClick: onClick, onMouseDown: preventMouseFocus, onPointerDown: onPointerDown, style: style, tabIndex: tabIndex, title: (_b = segment.title) !== null && _b !== void 0 ? _b : undefined, type: "button", children: segment.renderContent(colors_1.CURRENT_COLOR) }));
|
|
218
|
+
return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [segment.tooltipLabel === null ? (button) : (jsx_runtime_1.jsx(ActionTooltip_1.ActionTooltip, { label: segment.tooltipLabel, shortcut: null, delay: 800, dismissOnClick: true, triggerStyle: tooltipTriggerStyle, children: button })), portalStyle
|
|
213
219
|
? react_dom_1.default.createPortal(jsx_runtime_1.jsx("div", { style: styles_1.fullScreenOverlay, onPointerDown: (event) => event.stopPropagation(), children: jsx_runtime_1.jsx("div", { style: styles_1.outerPortal, className: "css-reset", children: jsx_runtime_1.jsx(z_index_1.HigherZIndex, { onOutsideClick: onOutsideClick, onEscape: onHide, children: jsx_runtime_1.jsx("div", { style: portalStyle, children: jsx_runtime_1.jsx(MenuContent_1.MenuContent, { fixedHeight: Math.max(spaceToBottom, spaceToTop), leaveLeftSpace: segment.leaveLeftSpace, onHide: onHide, onNextMenu: noop_1.noop, onPreviousMenu: noop_1.noop, preselectIndex: segment.selectedId === null
|
|
214
220
|
? false
|
|
215
221
|
: segment.values.findIndex((value) => value.id === segment.selectedId), topItemCanBeUnselected: false, values: segment.values }) }) }) }) }), (0, portals_1.getPortal)(currentZIndex))
|
|
@@ -39,6 +39,7 @@ const react_1 = __importStar(require("react"));
|
|
|
39
39
|
const remotion_1 = require("remotion");
|
|
40
40
|
const client_id_1 = require("../helpers/client-id");
|
|
41
41
|
const get_connected_compositions_1 = require("../helpers/get-connected-compositions");
|
|
42
|
+
const get_git_menu_item_1 = require("../helpers/get-git-menu-item");
|
|
42
43
|
const get_sequence_double_click_action_1 = require("../helpers/get-sequence-double-click-action");
|
|
43
44
|
const interactivity_enabled_1 = require("../helpers/interactivity-enabled");
|
|
44
45
|
const open_in_editor_1 = require("../helpers/open-in-editor");
|
|
@@ -65,6 +66,9 @@ const SelectedOutlineElementUnmemoized = ({ compositionHeight, compositionWidth,
|
|
|
65
66
|
const { previewServerState } = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx);
|
|
66
67
|
const { canConfigureApps, canOpenInEditor: editorAvailable, defaultEditorId, editorInfo, } = (0, use_default_editor_info_1.useEditorOpening)(previewServerState.type === 'connected');
|
|
67
68
|
const codingAgentInfo = (0, use_default_editor_info_1.useDefaultCodingAgentInfo)(canConfigureApps);
|
|
69
|
+
const defaultOpenInTarget = (0, get_git_menu_item_1.getDefaultOpenInTarget)({
|
|
70
|
+
canOpenInEditor: editorAvailable,
|
|
71
|
+
});
|
|
68
72
|
const { setPropStatuses } = (0, react_1.useContext)(remotion_1.Internals.VisualModeSettersContext);
|
|
69
73
|
const updateResolvedStackTrace = (0, react_1.useContext)(remotion_1.Internals.SequenceStackTracesUpdateContext);
|
|
70
74
|
const confirm = (0, ConfirmationDialog_1.useConfirmationDialog)();
|
|
@@ -100,7 +104,7 @@ const SelectedOutlineElementUnmemoized = ({ compositionHeight, compositionWidth,
|
|
|
100
104
|
});
|
|
101
105
|
const action = (0, get_sequence_double_click_action_1.getSequenceDoubleClickAction)({
|
|
102
106
|
button,
|
|
103
|
-
|
|
107
|
+
canOpenSource: defaultOpenInTarget !== null,
|
|
104
108
|
numberOfConnectedCompositions: connectedCompositions.length,
|
|
105
109
|
sequenceWasDragged,
|
|
106
110
|
});
|
|
@@ -111,21 +115,27 @@ const SelectedOutlineElementUnmemoized = ({ compositionHeight, compositionWidth,
|
|
|
111
115
|
selectComposition(connectedCompositions[0], true);
|
|
112
116
|
return true;
|
|
113
117
|
}
|
|
114
|
-
const
|
|
118
|
+
const openTargetSource = async () => {
|
|
115
119
|
const originalLocation = await resolveOriginalLocation(doubleClickTarget);
|
|
116
|
-
if (originalLocation === null
|
|
120
|
+
if (originalLocation === null) {
|
|
121
|
+
return;
|
|
122
|
+
}
|
|
123
|
+
if (defaultOpenInTarget === 'editor' && defaultEditorId !== null) {
|
|
124
|
+
await (0, open_in_editor_1.openOriginalPositionInEditor)(originalLocation, defaultEditorId);
|
|
117
125
|
return;
|
|
118
126
|
}
|
|
119
|
-
|
|
127
|
+
if (defaultOpenInTarget === 'git-source') {
|
|
128
|
+
(0, get_git_menu_item_1.openGitSource)({ folder: false, location: originalLocation });
|
|
129
|
+
}
|
|
120
130
|
};
|
|
121
|
-
|
|
131
|
+
openTargetSource().catch((err) => {
|
|
122
132
|
(0, NotificationCenter_1.showNotification)(err.message, 2000);
|
|
123
133
|
});
|
|
124
134
|
return true;
|
|
125
135
|
}, [
|
|
126
136
|
compositions,
|
|
127
137
|
defaultEditorId,
|
|
128
|
-
|
|
138
|
+
defaultOpenInTarget,
|
|
129
139
|
resolveOriginalLocation,
|
|
130
140
|
selectComposition,
|
|
131
141
|
]);
|
|
@@ -262,7 +262,7 @@ const SelectedOutlinePolygonUnmemoized = ({ compositionHeight, compositionWidth,
|
|
|
262
262
|
axisLocked = nextAxisLocked;
|
|
263
263
|
updateDragOverrides();
|
|
264
264
|
};
|
|
265
|
-
const onPointerUp = (reason) => {
|
|
265
|
+
const onPointerUp = (reason, endEvent) => {
|
|
266
266
|
dragAwareDoubleClick.endPointerGesture(dragStarted);
|
|
267
267
|
window.removeEventListener('keydown', onKeyChange);
|
|
268
268
|
window.removeEventListener('keyup', onKeyChange);
|
|
@@ -277,7 +277,9 @@ const SelectedOutlinePolygonUnmemoized = ({ compositionHeight, compositionWidth,
|
|
|
277
277
|
});
|
|
278
278
|
if (changes.length === 0) {
|
|
279
279
|
(0, selected_outline_drag_1.clearSelectedOutlineDragOverrides)({ clearDragOverrides, dragStates });
|
|
280
|
-
if (deferSelection &&
|
|
280
|
+
if (deferSelection &&
|
|
281
|
+
!dragStarted &&
|
|
282
|
+
(0, pointer_session_1.isPointerSessionRelease)(reason, endEvent)) {
|
|
281
283
|
onSelect(target.selection, interaction);
|
|
282
284
|
}
|
|
283
285
|
return;
|
|
@@ -7,6 +7,7 @@ const browser_studio_operations_1 = require("../helpers/browser-studio-operation
|
|
|
7
7
|
const colors_1 = require("../helpers/colors");
|
|
8
8
|
const gear_1 = require("../icons/gear");
|
|
9
9
|
const modals_1 = require("../state/modals");
|
|
10
|
+
const ActionTooltip_1 = require("./ActionTooltip");
|
|
10
11
|
const InlineAction_1 = require("./InlineAction");
|
|
11
12
|
const UpdateStatusContext_1 = require("./UpdateStatusContext");
|
|
12
13
|
const SettingsButton = ({ showUpdates }) => {
|
|
@@ -24,7 +25,7 @@ const SettingsButton = ({ showUpdates }) => {
|
|
|
24
25
|
initialTab: updateAvailable
|
|
25
26
|
? 'updates'
|
|
26
27
|
: (0, browser_studio_operations_1.getBrowserStudioOperations)() === null
|
|
27
|
-
? '
|
|
28
|
+
? 'studio'
|
|
28
29
|
: 'shortcuts',
|
|
29
30
|
initialPublicLicenseKey: (_b = (_a = window.remotion_renderDefaults) === null || _a === void 0 ? void 0 : _a.publicLicenseKey) !== null && _b !== void 0 ? _b : null,
|
|
30
31
|
});
|
|
@@ -40,10 +41,11 @@ const SettingsButton = ({ showUpdates }) => {
|
|
|
40
41
|
flexShrink: 0,
|
|
41
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" }) }));
|
|
42
43
|
}, []);
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
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 }) }));
|
|
48
50
|
};
|
|
49
51
|
exports.SettingsButton = SettingsButton;
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import type { GetDefaultCodingAgentInfoResponse, GetDefaultEditorInfoResponse, GetRemotionSkillsInfoResponse, RenderDefaults, StudioRuntimeConfig } from '@remotion/studio-shared';
|
|
2
2
|
import React from 'react';
|
|
3
|
+
type SkillAction = {
|
|
4
|
+
readonly skill: string;
|
|
5
|
+
readonly type: 'installing' | 'removing';
|
|
6
|
+
};
|
|
3
7
|
type SettingsContextValue = {
|
|
4
8
|
readonly codingAgentInfo: GetDefaultCodingAgentInfoResponse | null;
|
|
5
9
|
readonly editorInfo: GetDefaultEditorInfoResponse | null;
|
|
@@ -10,6 +14,10 @@ type SettingsContextValue = {
|
|
|
10
14
|
readonly studioRuntimeConfig: StudioRuntimeConfig | null;
|
|
11
15
|
readonly revision: number;
|
|
12
16
|
readonly setPublicLicenseKey: (publicLicenseKey: string | null) => void;
|
|
17
|
+
readonly installSkill: (skill: string) => Promise<void>;
|
|
18
|
+
readonly removeSkill: (skill: string) => Promise<void>;
|
|
19
|
+
readonly skillAction: SkillAction | null;
|
|
20
|
+
readonly skillActionError: string | null;
|
|
13
21
|
};
|
|
14
22
|
export declare const SettingsProvider: React.FC<{
|
|
15
23
|
readonly children: React.ReactNode;
|
|
@@ -6,6 +6,7 @@ const react_1 = require("react");
|
|
|
6
6
|
const browser_studio_operations_1 = require("../helpers/browser-studio-operations");
|
|
7
7
|
const client_id_1 = require("../helpers/client-id");
|
|
8
8
|
const call_api_1 = require("./call-api");
|
|
9
|
+
const NotificationCenter_1 = require("./Notifications/NotificationCenter");
|
|
9
10
|
const UpdateStatusContext_1 = require("./UpdateStatusContext");
|
|
10
11
|
const SettingsContext = (0, react_1.createContext)(null);
|
|
11
12
|
const SettingsProvider = ({ children }) => {
|
|
@@ -21,6 +22,8 @@ const SettingsProvider = ({ children }) => {
|
|
|
21
22
|
renderDefaults: (_c = window.remotion_renderDefaults) !== null && _c !== void 0 ? _c : null,
|
|
22
23
|
studioRuntimeConfig: (_d = window.remotion_studioConfig) !== null && _d !== void 0 ? _d : null,
|
|
23
24
|
revision: 0,
|
|
25
|
+
skillAction: null,
|
|
26
|
+
skillActionError: null,
|
|
24
27
|
});
|
|
25
28
|
(0, react_1.useEffect)(() => {
|
|
26
29
|
if (previewServerState.type !== 'connected' ||
|
|
@@ -108,9 +111,61 @@ const SettingsProvider = ({ children }) => {
|
|
|
108
111
|
};
|
|
109
112
|
});
|
|
110
113
|
}, []);
|
|
114
|
+
const installSkill = (0, react_1.useCallback)(async (skill) => {
|
|
115
|
+
setSettings((currentSettings) => ({
|
|
116
|
+
...currentSettings,
|
|
117
|
+
skillAction: { skill, type: 'installing' },
|
|
118
|
+
skillActionError: null,
|
|
119
|
+
}));
|
|
120
|
+
try {
|
|
121
|
+
const remotionSkillsInfo = await (0, call_api_1.callApi)('/api/install-remotion-skill', {
|
|
122
|
+
skill,
|
|
123
|
+
});
|
|
124
|
+
setSettings((currentSettings) => ({
|
|
125
|
+
...currentSettings,
|
|
126
|
+
remotionSkillsInfo,
|
|
127
|
+
skillAction: null,
|
|
128
|
+
revision: currentSettings.revision + 1,
|
|
129
|
+
}));
|
|
130
|
+
(0, NotificationCenter_1.showNotification)(`Installed ${skill}.`, 5000);
|
|
131
|
+
}
|
|
132
|
+
catch (err) {
|
|
133
|
+
setSettings((currentSettings) => ({
|
|
134
|
+
...currentSettings,
|
|
135
|
+
skillAction: null,
|
|
136
|
+
skillActionError: err.message,
|
|
137
|
+
}));
|
|
138
|
+
}
|
|
139
|
+
}, []);
|
|
140
|
+
const removeSkill = (0, react_1.useCallback)(async (skill) => {
|
|
141
|
+
setSettings((currentSettings) => ({
|
|
142
|
+
...currentSettings,
|
|
143
|
+
skillAction: { skill, type: 'removing' },
|
|
144
|
+
skillActionError: null,
|
|
145
|
+
}));
|
|
146
|
+
try {
|
|
147
|
+
const remotionSkillsInfo = await (0, call_api_1.callApi)('/api/remove-remotion-skill', {
|
|
148
|
+
skill,
|
|
149
|
+
});
|
|
150
|
+
setSettings((currentSettings) => ({
|
|
151
|
+
...currentSettings,
|
|
152
|
+
remotionSkillsInfo,
|
|
153
|
+
skillAction: null,
|
|
154
|
+
revision: currentSettings.revision + 1,
|
|
155
|
+
}));
|
|
156
|
+
(0, NotificationCenter_1.showNotification)(`Removed ${skill}.`, 5000);
|
|
157
|
+
}
|
|
158
|
+
catch (err) {
|
|
159
|
+
setSettings((currentSettings) => ({
|
|
160
|
+
...currentSettings,
|
|
161
|
+
skillAction: null,
|
|
162
|
+
skillActionError: err.message,
|
|
163
|
+
}));
|
|
164
|
+
}
|
|
165
|
+
}, []);
|
|
111
166
|
const value = (0, react_1.useMemo)(() => {
|
|
112
|
-
return { ...settings, setPublicLicenseKey };
|
|
113
|
-
}, [setPublicLicenseKey, settings]);
|
|
167
|
+
return { ...settings, setPublicLicenseKey, installSkill, removeSkill };
|
|
168
|
+
}, [installSkill, removeSkill, setPublicLicenseKey, settings]);
|
|
114
169
|
return (jsx_runtime_1.jsx(SettingsContext.Provider, { value: value, children: jsx_runtime_1.jsx(UpdateStatusContext_1.UpdateStatusProvider, { children: children }) }));
|
|
115
170
|
};
|
|
116
171
|
exports.SettingsProvider = SettingsProvider;
|
|
@@ -104,6 +104,9 @@ const SettingsModal = ({ initialPublicLicenseKey, initialTab }) => {
|
|
|
104
104
|
}, [initialPublicLicenseKey, setPublicLicenseKey]);
|
|
105
105
|
return (jsx_runtime_1.jsx(DismissableModal_1.DismissableModal, { panelStyle: render_modals_1.outerModalStyle, children: jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
106
106
|
jsx_runtime_1.jsx(ModalHeader_1.ModalHeader, { title: "Settings", onClose: dismiss }), jsx_runtime_1.jsxs("div", { style: render_modals_1.horizontalLayout, children: [
|
|
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 === '
|
|
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 ||
|
|
108
|
+
tab === 'models' ||
|
|
109
|
+
tab === 'updates' ||
|
|
110
|
+
tab === 'skills' ? null : (jsx_runtime_1.jsx(SettingsModalFooter_1.SettingsModalFooter, { showLicenseFaq: tab === 'license' }))] }) }));
|
|
108
111
|
};
|
|
109
112
|
exports.SettingsModal = SettingsModal;
|
|
@@ -52,7 +52,7 @@ const SettingsModalFooter = ({ showLicenseFaq }) => {
|
|
|
52
52
|
}, []);
|
|
53
53
|
return (jsx_runtime_1.jsx(ModalFooter_1.ModalFooterContainer, { style: footer, children: jsx_runtime_1.jsxs("div", { style: footerRow, children: [
|
|
54
54
|
jsx_runtime_1.jsxs("div", { style: configFileHint, children: ["Changes save to",
|
|
55
|
-
jsx_runtime_1.jsx(layout_1.Spacing, { x: 0.5 }), jsx_runtime_1.jsx(InspectorOpenInEditor_1.InspectorOpenInEditor, { locationType: null, location: configFileLocation, label: jsx_runtime_1.jsx("strong", { style: configFileName, children: "remotion.config.ts" }) })
|
|
55
|
+
jsx_runtime_1.jsx(layout_1.Spacing, { x: 0.5 }), jsx_runtime_1.jsx(InspectorOpenInEditor_1.InspectorOpenInEditor, { locationType: null, location: configFileLocation, label: jsx_runtime_1.jsx("strong", { style: configFileName, children: "remotion.config.ts" }), showTooltips: false })
|
|
56
56
|
] }), showLicenseFaq ? (jsx_runtime_1.jsxs(common_1.InspectorQuickAction, { disabled: false, onClick: openLicenseFaq, style: { flex: 'none', width: 'fit-content' }, title: "Open the Remotion License FAQ in a new tab", children: ["License FAQ",
|
|
57
57
|
jsx_runtime_1.jsx("svg", { "aria-hidden": "true", viewBox: "0 0 16 16", style: externalLinkIndicator, children: jsx_runtime_1.jsx("path", { d: "M4 12 12 4M6 4h6v6", fill: "none", stroke: colors_1.CURRENT_COLOR, strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.5" }) })
|
|
58
58
|
] })) : null] }) }));
|
|
@@ -7,6 +7,7 @@ const colors_1 = require("../helpers/colors");
|
|
|
7
7
|
const use_keybinding_1 = require("../helpers/use-keybinding");
|
|
8
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 = {
|
|
@@ -123,14 +124,13 @@ const SidebarCollapserControl = ({ side }) => {
|
|
|
123
124
|
right.unregister();
|
|
124
125
|
};
|
|
125
126
|
}, [keybindings, side, toggleBoth, toggleLeft, toggleRight]);
|
|
126
|
-
const
|
|
127
|
-
const
|
|
128
|
-
const
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
: `Toggle Right Sidebar (${rightShortcut})`;
|
|
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`;
|
|
134
134
|
const colorStyle = (0, react_1.useCallback)((color) => {
|
|
135
135
|
return {
|
|
136
136
|
...style,
|
|
@@ -138,14 +138,11 @@ const SidebarCollapserControl = ({ side }) => {
|
|
|
138
138
|
};
|
|
139
139
|
}, []);
|
|
140
140
|
const toggleLeftAction = (0, react_1.useCallback)((color) => {
|
|
141
|
-
return (jsx_runtime_1.jsx("div", { "data-sidebar-toggle": "left", style: colorStyle(color),
|
|
142
|
-
}, [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]);
|
|
143
143
|
const toggleRightAction = (0, react_1.useCallback)((color) => {
|
|
144
|
-
return (jsx_runtime_1.jsx("div", { "data-sidebar-toggle": "right", style: colorStyle(color),
|
|
145
|
-
}, [colorStyle, rightIcon
|
|
146
|
-
|
|
147
|
-
return (jsx_runtime_1.jsx(InlineAction_1.InlineAction, { variant: null, onClick: toggleLeft, renderAction: toggleLeftAction, style: { marginRight: 4 } }));
|
|
148
|
-
}
|
|
149
|
-
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, unhoveredColor: colors_1.WHITE_ALPHA_80, style: side === 'left' ? { marginRight: 4 } : undefined, "aria-label": label, "aria-expanded": expanded, "aria-keyshortcuts": shortcutsDisabled ? undefined : ariaShortcut || undefined }) }));
|
|
150
147
|
};
|
|
151
148
|
exports.SidebarCollapserControl = SidebarCollapserControl;
|
|
@@ -48,7 +48,7 @@ const getPreviewSizeLabel = (previewSize) => {
|
|
|
48
48
|
return `${(previewSize.size * 100).toFixed(0)}%`;
|
|
49
49
|
};
|
|
50
50
|
exports.getPreviewSizeLabel = getPreviewSizeLabel;
|
|
51
|
-
const accessibilityLabel = '
|
|
51
|
+
const accessibilityLabel = 'Zoom';
|
|
52
52
|
const getUniqueSizes = (size) => {
|
|
53
53
|
const customPreviewSizes = [size, ...commonPreviewSizes];
|
|
54
54
|
const uniqueSizes = [];
|
|
@@ -126,6 +126,6 @@ const SizeSelector = () => {
|
|
|
126
126
|
if (!zoomable) {
|
|
127
127
|
return null;
|
|
128
128
|
}
|
|
129
|
-
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 }));
|
|
130
130
|
};
|
|
131
131
|
exports.SizeSelector = SizeSelector;
|