@remotion/studio 4.0.516 → 4.0.518
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/AssetSelector.js +63 -22
- package/dist/components/AssetSelectorItem.d.ts +2 -1
- package/dist/components/AssetSelectorItem.js +41 -10
- package/dist/components/Canvas.js +15 -12
- package/dist/components/CanvasCaptureDropHandler.d.ts +4 -0
- package/dist/components/CanvasCaptureDropHandler.js +42 -0
- package/dist/components/CanvasOrLoading.js +4 -3
- package/dist/components/CaptionInspector.js +1 -1
- package/dist/components/CaptionTextEditor.js +32 -8
- package/dist/components/CheckboardToggle.js +1 -1
- package/dist/components/Checkbox.d.ts +0 -1
- package/dist/components/Checkbox.js +2 -19
- package/dist/components/CompositionContextButton.js +2 -1
- package/dist/components/CompositionSelector.js +1 -1
- package/dist/components/ConfigureLicenseModal.js +79 -46
- package/dist/components/CurrentAsset.d.ts +1 -1
- package/dist/components/CurrentAsset.js +9 -4
- package/dist/components/Editor.js +2 -1
- package/dist/components/EditorContent.js +11 -5
- package/dist/components/EditorContexts.js +2 -1
- package/dist/components/EditorRuler/Ruler.d.ts +1 -0
- package/dist/components/EditorRuler/Ruler.js +9 -8
- package/dist/components/EditorRuler/index.d.ts +1 -0
- package/dist/components/EditorRuler/index.js +3 -4
- package/dist/components/EditorRuler/use-is-ruler-visible.d.ts +1 -1
- package/dist/components/EditorRuler/use-is-ruler-visible.js +8 -2
- package/dist/components/ElementInstallConfirmation.d.ts +5 -0
- package/dist/components/ElementInstallConfirmation.js +25 -1
- package/dist/components/ElementLibraryModal.d.ts +5 -0
- package/dist/components/ElementLibraryModal.js +40 -0
- package/dist/components/FilePreview.js +71 -0
- package/dist/components/InlineCaptionInspector.js +13 -2
- package/dist/components/InlineEditableTitle.js +2 -2
- package/dist/components/InspectorPanel/CompositionInspector.js +11 -38
- package/dist/components/InspectorPanel/CompositionInspectorHeader.js +2 -2
- package/dist/components/InspectorPanel/CompositionMetadata.js +11 -4
- package/dist/components/InspectorPanel/EasingInspector.js +2 -2
- package/dist/components/InspectorPanel/ElementLibraryButton.d.ts +2 -0
- package/dist/components/InspectorPanel/ElementLibraryButton.js +139 -0
- package/dist/components/InspectorPanel/KeyframeInspector.js +1 -1
- package/dist/components/InspectorPanel/SequenceInspectorHeader.js +12 -5
- package/dist/components/InspectorPanel/SequenceSelectionInspector.js +1 -3
- package/dist/components/InspectorPanel/common.d.ts +0 -1
- package/dist/components/InspectorPanel/common.js +3 -7
- package/dist/components/InspectorPanel/inspector-selection.d.ts +2 -2
- package/dist/components/InspectorPanel/styles.d.ts +0 -1
- package/dist/components/InspectorPanel/styles.js +3 -4
- package/dist/components/InspectorPanel/use-track-for-selection.d.ts +1 -2
- package/dist/components/InspectorSequenceSection.d.ts +1 -2
- package/dist/components/InspectorSourceLocation.js +1 -1
- package/dist/components/Menu/MenuItem.js +15 -6
- package/dist/components/MenuToolbar.js +7 -3
- package/dist/components/Modals.js +51 -1
- package/dist/components/PlaybackRateSelector.js +3 -6
- package/dist/components/Preview.js +83 -5
- package/dist/components/PreviewToolbar.js +10 -4
- package/dist/components/PreviewToolbarOverflowButton.d.ts +1 -0
- package/dist/components/PreviewToolbarOverflowButton.js +9 -2
- package/dist/components/QuickSwitcher/ExplorerQuickSwitcherTrigger.d.ts +2 -0
- package/dist/components/QuickSwitcher/ExplorerQuickSwitcherTrigger.js +28 -8
- package/dist/components/RadioButton.d.ts +6 -0
- package/dist/components/RadioButton.js +62 -0
- package/dist/components/RenderButton.js +2 -1
- package/dist/components/RulersAndGuidesToggle.d.ts +3 -1
- package/dist/components/RulersAndGuidesToggle.js +18 -7
- package/dist/components/SelectedOutlineKeyboardControls.d.ts +2 -2
- package/dist/components/SelectedOutlineOverlay.d.ts +1 -3
- package/dist/components/SelectedOutlineOverlay.js +21 -17
- package/dist/components/SelectedOutlinePolygon.d.ts +1 -2
- package/dist/components/SelectedOutlineRenderer.d.ts +2 -3
- package/dist/components/SelectedOutlineRenderer.js +9 -78
- package/dist/components/SelectedOutlineUvControls.d.ts +1 -1
- package/dist/components/SettingsModal.js +1 -1
- package/dist/components/SettingsModalFooter.d.ts +3 -1
- package/dist/components/SettingsModalFooter.js +19 -4
- package/dist/components/ShowPixelGridProvider.d.ts +4 -0
- package/dist/components/ShowPixelGridProvider.js +24 -0
- package/dist/components/SidebarCollapserControls.js +2 -2
- package/dist/components/SidebarRenderButton.js +2 -1
- package/dist/components/Timeline/Timeline.js +41 -0
- package/dist/components/Timeline/TimelineClipboardKeybindings.d.ts +6 -7
- package/dist/components/Timeline/TimelineDragHandler.js +11 -4
- package/dist/components/Timeline/TimelineKeyframeControls.d.ts +1 -2
- package/dist/components/Timeline/TimelinePlayCursorSyncer.js +4 -2
- package/dist/components/Timeline/TimelineSelection.d.ts +29 -66
- package/dist/components/Timeline/TimelineSelection.js +30 -170
- package/dist/components/Timeline/TimelineSequenceItem.d.ts +1 -0
- package/dist/components/Timeline/TimelineSequenceItem.js +8 -6
- package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.d.ts +3 -4
- package/dist/components/Timeline/delete-selected-timeline-item.d.ts +3 -4
- package/dist/components/Timeline/duplicate-selected-timeline-item.d.ts +3 -4
- package/dist/components/Timeline/find-track-for-node-path-info.d.ts +1 -1
- package/dist/components/Timeline/keyframe-clipboard.d.ts +2 -3
- package/dist/components/Timeline/reset-selected-timeline-props.d.ts +2 -3
- package/dist/components/Timeline/sequence-prop-clipboard.d.ts +2 -3
- package/dist/components/Timeline/split-selected-timeline-item.d.ts +2 -3
- package/dist/components/Timeline/timeline-expanded-filter.d.ts +1 -2
- package/dist/components/Timeline/timeline-scroll-logic.d.ts +7 -5
- package/dist/components/Timeline/timeline-scroll-logic.js +12 -7
- package/dist/components/Timeline/update-selected-easing.d.ts +7 -7
- package/dist/components/Timeline/use-timeline-asset-drop.js +24 -1
- package/dist/components/Timeline/use-timeline-keyframe-drag.d.ts +6 -7
- package/dist/components/WebMcp.d.ts +2 -0
- package/dist/components/WebMcp.js +945 -0
- package/dist/components/canvas-capture-drop.d.ts +4 -0
- package/dist/components/canvas-capture-drop.js +22 -0
- package/dist/components/composition-menu-items.js +26 -0
- package/dist/components/selected-outline-geometry.d.ts +2 -21
- package/dist/components/selected-outline-geometry.js +5 -16
- package/dist/components/selected-outline-measurement.d.ts +8 -37
- package/dist/components/selected-outline-measurement.js +1 -231
- package/dist/components/selected-outline-types.d.ts +2 -15
- package/dist/components/selected-outline-uv.js +3 -106
- package/dist/esm/{chunk-w4244j4n.js → chunk-7prjt5n5.js} +32831 -26820
- package/dist/esm/internals.mjs +32831 -26820
- package/dist/esm/previewEntry.mjs +17304 -11293
- package/dist/esm/renderEntry.mjs +1 -1
- package/dist/helpers/calculate-timeline.d.ts +1 -7
- package/dist/helpers/calculate-timeline.js +2 -146
- package/dist/helpers/create-folder-tree.js +16 -1
- package/dist/helpers/editor-ruler.js +6 -5
- package/dist/helpers/format-file-location.d.ts +8 -0
- package/dist/helpers/format-file-location.js +14 -3
- package/dist/helpers/get-asset-metadata.d.ts +19 -0
- package/dist/helpers/get-asset-metadata.js +51 -6
- package/dist/helpers/get-connected-compositions.d.ts +1 -6
- package/dist/helpers/get-connected-compositions.js +2 -8
- package/dist/helpers/get-sequence-visible-range.d.ts +1 -5
- package/dist/helpers/get-sequence-visible-range.js +6 -51
- package/dist/helpers/get-timeline-max-zoom.d.ts +8 -0
- package/dist/helpers/get-timeline-max-zoom.js +17 -6
- package/dist/helpers/get-timeline-nestedness.d.ts +1 -2
- package/dist/helpers/get-timeline-nestedness.js +2 -12
- package/dist/helpers/get-timeline-sequence-sort-key.d.ts +2 -22
- package/dist/helpers/get-timeline-sequence-sort-key.js +2 -16
- package/dist/helpers/hoverable.d.ts +1 -0
- package/dist/helpers/hoverable.js +4 -1
- package/dist/helpers/is-current-selected-still.js +4 -2
- package/dist/helpers/sort-by-nonce-history.d.ts +1 -5
- package/dist/helpers/sort-by-nonce-history.js +3 -148
- package/dist/helpers/timeline-node-path-key.d.ts +1 -2
- package/dist/helpers/timeline-node-path-key.js +2 -2
- package/dist/helpers/use-menu-structure.js +20 -0
- package/dist/icons/enter.d.ts +4 -0
- package/dist/icons/enter.js +10 -0
- package/dist/state/editor-pixel-grid.d.ts +8 -0
- package/dist/state/editor-pixel-grid.js +18 -0
- package/dist/state/modals.d.ts +4 -0
- package/dist/state/playbackrate.d.ts +1 -0
- package/dist/state/playbackrate.js +4 -1
- package/package.json +14 -12
- package/dist/components/selected-outline-order.d.ts +0 -12
- package/dist/components/selected-outline-order.js +0 -251
- package/dist/helpers/get-box-quads-polyfill-internals.d.ts +0 -82
- package/dist/helpers/get-box-quads-polyfill-internals.js +0 -2403
- package/dist/helpers/get-box-quads-ponyfill.d.ts +0 -10
- package/dist/helpers/get-box-quads-ponyfill.js +0 -23
|
@@ -11,6 +11,7 @@ const serializeCaptions = (captions) => {
|
|
|
11
11
|
return JSON.stringify(captions);
|
|
12
12
|
};
|
|
13
13
|
const getCaptionPatches = ({ previous, next, }) => {
|
|
14
|
+
var _a;
|
|
14
15
|
if (previous.length !== next.length) {
|
|
15
16
|
return null;
|
|
16
17
|
}
|
|
@@ -20,11 +21,21 @@ const getCaptionPatches = ({ previous, next, }) => {
|
|
|
20
21
|
if (!after) {
|
|
21
22
|
return null;
|
|
22
23
|
}
|
|
24
|
+
const changes = {};
|
|
23
25
|
if (before.text !== after.text) {
|
|
26
|
+
changes.text = after.text;
|
|
27
|
+
}
|
|
28
|
+
if (Boolean(before.pageBreakAfter) !== Boolean(after.pageBreakAfter)) {
|
|
29
|
+
changes.pageBreakAfter = Boolean(after.pageBreakAfter);
|
|
30
|
+
}
|
|
31
|
+
if (Object.keys(changes).length > 0) {
|
|
24
32
|
patches.push({
|
|
25
33
|
index,
|
|
26
|
-
before
|
|
27
|
-
|
|
34
|
+
before: {
|
|
35
|
+
...before,
|
|
36
|
+
pageBreakAfter: (_a = before.pageBreakAfter) !== null && _a !== void 0 ? _a : null,
|
|
37
|
+
},
|
|
38
|
+
changes,
|
|
28
39
|
});
|
|
29
40
|
}
|
|
30
41
|
}
|
|
@@ -59,7 +59,7 @@ const inspectorTitleWrapper = {
|
|
|
59
59
|
...titleWrapper,
|
|
60
60
|
fontFamily: 'sans-serif',
|
|
61
61
|
fontSize: 13,
|
|
62
|
-
height: layout_1.
|
|
62
|
+
height: layout_1.COMPACT_CONTROL_ROW_HEIGHT,
|
|
63
63
|
margin: '0 4px',
|
|
64
64
|
width: 'calc(100% - 8px)',
|
|
65
65
|
};
|
|
@@ -68,7 +68,7 @@ const inspectorTitleInner = {
|
|
|
68
68
|
alignItems: 'center',
|
|
69
69
|
fontFamily: 'sans-serif',
|
|
70
70
|
fontSize: 13,
|
|
71
|
-
height: layout_1.
|
|
71
|
+
height: layout_1.COMPACT_CONTROL_ROW_HEIGHT,
|
|
72
72
|
paddingBottom: 0,
|
|
73
73
|
paddingLeft: InspectorPanelLayout_1.INSPECTOR_PANEL_HORIZONTAL_PADDING - 4,
|
|
74
74
|
paddingRight: InspectorPanelLayout_1.INSPECTOR_PANEL_HORIZONTAL_PADDING - 4,
|
|
@@ -5,10 +5,8 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
5
5
|
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
|
-
const colors_1 = require("../../helpers/colors");
|
|
9
8
|
const download_blob_1 = require("../../helpers/download-blob");
|
|
10
9
|
const interactivity_enabled_1 = require("../../helpers/interactivity-enabled");
|
|
11
|
-
const browse_elements_1 = require("../../icons/browse-elements");
|
|
12
10
|
const cloud_download_1 = require("../../icons/cloud-download");
|
|
13
11
|
const frame_1 = require("../../icons/frame");
|
|
14
12
|
const solid_1 = require("../../icons/solid");
|
|
@@ -28,29 +26,13 @@ const VisualControlsContent_1 = require("../VisualControls/VisualControlsContent
|
|
|
28
26
|
const common_1 = require("./common");
|
|
29
27
|
const CompositionInspectorHeader_1 = require("./CompositionInspectorHeader");
|
|
30
28
|
const CompositionMetadata_1 = require("./CompositionMetadata");
|
|
29
|
+
const ElementLibraryButton_1 = require("./ElementLibraryButton");
|
|
31
30
|
const styles_1 = require("./styles");
|
|
32
31
|
const use_composition_actions_1 = require("./use-composition-actions");
|
|
33
32
|
const actionIconStyle = {
|
|
34
33
|
height: 18,
|
|
35
34
|
width: 18,
|
|
36
35
|
};
|
|
37
|
-
const browseElementsIconStyle = {
|
|
38
|
-
height: 22,
|
|
39
|
-
width: 22,
|
|
40
|
-
};
|
|
41
|
-
const browseElementsIconContainerStyle = {
|
|
42
|
-
height: 22,
|
|
43
|
-
marginLeft: -2,
|
|
44
|
-
marginRight: -2,
|
|
45
|
-
width: 22,
|
|
46
|
-
};
|
|
47
|
-
const browseElementsArrowStyle = {
|
|
48
|
-
display: 'inline-block',
|
|
49
|
-
height: 12,
|
|
50
|
-
marginLeft: 4,
|
|
51
|
-
verticalAlign: -2,
|
|
52
|
-
width: 12,
|
|
53
|
-
};
|
|
54
36
|
const CompositionActions = () => {
|
|
55
37
|
var _a;
|
|
56
38
|
var _b;
|
|
@@ -69,18 +51,13 @@ const CompositionActions = () => {
|
|
|
69
51
|
(0, NotificationCenter_1.showNotification)(`Could not download project: ${error instanceof Error ? error.message : String(error)}`, 2000);
|
|
70
52
|
}
|
|
71
53
|
}, [downloadProject]);
|
|
72
|
-
const openElementsLibrary = (0, react_1.useCallback)(() => {
|
|
73
|
-
window.open('https://www.remotion.dev/elements', '_blank', 'noopener,noreferrer');
|
|
74
|
-
}, []);
|
|
75
54
|
if (!canShowInsertAsset &&
|
|
76
55
|
!canShowInsertComposition &&
|
|
77
56
|
!canShowInsertSolid &&
|
|
78
57
|
downloadProject === null) {
|
|
79
58
|
return null;
|
|
80
59
|
}
|
|
81
|
-
return (jsx_runtime_1.jsxs(common_1.InspectorQuickActionsSection, { children: [canShowInsertSolid ? (jsx_runtime_1.jsx(common_1.InspectorQuickAction, { disabled: !canInsertSolid, onClick: insertSolid, renderIcon: (color) => (jsx_runtime_1.jsx(solid_1.SolidIcon, { color: color, style: actionIconStyle })), children: "Add Solid" })) : null, canShowInsertAsset ? (jsx_runtime_1.jsx(common_1.InspectorQuickAction, { disabled: !canInsertAsset, onClick: insertAsset, renderIcon: (color) => (jsx_runtime_1.jsx(frame_1.PicIcon, { color: color, style: actionIconStyle })), children: "Add asset..." })) : null, canShowInsertComposition ? (jsx_runtime_1.jsx(common_1.InspectorQuickAction, { disabled: !canInsertComposition, onClick: insertComposition, renderIcon: (color) => (jsx_runtime_1.jsx(video_1.FilmIcon, { color: color, style: actionIconStyle })), children: "Add composition..." })) : null, canShowInsertAsset ? (jsx_runtime_1.
|
|
82
|
-
jsx_runtime_1.jsx("svg", { "aria-hidden": "true", viewBox: "0 0 16 16", style: browseElementsArrowStyle, 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" }) })
|
|
83
|
-
] })) : null, downloadProject ? (jsx_runtime_1.jsx(common_1.InspectorQuickAction, { disabled: false, onClick: onDownloadProject, renderIcon: (color) => (jsx_runtime_1.jsx(cloud_download_1.CloudDownloadIcon, { color: color, style: actionIconStyle })), children: "Download project" })) : null] }));
|
|
60
|
+
return (jsx_runtime_1.jsxs(common_1.InspectorQuickActionsSection, { children: [canShowInsertSolid ? (jsx_runtime_1.jsx(common_1.InspectorQuickAction, { disabled: !canInsertSolid, onClick: insertSolid, renderIcon: (color) => (jsx_runtime_1.jsx(solid_1.SolidIcon, { color: color, style: actionIconStyle })), children: "Add Solid" })) : null, canShowInsertAsset ? (jsx_runtime_1.jsx(common_1.InspectorQuickAction, { disabled: !canInsertAsset, onClick: insertAsset, renderIcon: (color) => (jsx_runtime_1.jsx(frame_1.PicIcon, { color: color, style: actionIconStyle })), children: "Add asset..." })) : null, canShowInsertComposition ? (jsx_runtime_1.jsx(common_1.InspectorQuickAction, { disabled: !canInsertComposition, onClick: insertComposition, renderIcon: (color) => (jsx_runtime_1.jsx(video_1.FilmIcon, { color: color, style: actionIconStyle })), children: "Add composition..." })) : null, canShowInsertAsset ? jsx_runtime_1.jsx(ElementLibraryButton_1.ElementLibraryButton, {}) : null, downloadProject ? (jsx_runtime_1.jsx(common_1.InspectorQuickAction, { disabled: false, onClick: onDownloadProject, renderIcon: (color) => (jsx_runtime_1.jsx(cloud_download_1.CloudDownloadIcon, { color: color, style: actionIconStyle })), children: "Download project" })) : null] }));
|
|
84
61
|
};
|
|
85
62
|
const CompositionDefaultPropsSection = ({ composition, currentDefaultProps, readOnlyStudio, setDefaultProps }) => {
|
|
86
63
|
var _a;
|
|
@@ -138,14 +115,12 @@ const CompositionDefaultPropsSection = ({ composition, currentDefaultProps, read
|
|
|
138
115
|
if (readOnlyStudio || !canShowDefaultPropsSection) {
|
|
139
116
|
return null;
|
|
140
117
|
}
|
|
141
|
-
return (jsx_runtime_1.jsxs(
|
|
142
|
-
jsx_runtime_1.jsx(common_1.
|
|
143
|
-
|
|
144
|
-
jsx_runtime_1.
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
] }) }), defaultPropsWarnings.length > 0 && showWarning ? (jsx_runtime_1.jsx("div", { style: styles_1.defaultPropsWarningContainer, children: jsx_runtime_1.jsx(common_1.InspectorDefaultPropsWarnings, { warnings: defaultPropsWarnings }) })) : null, jsx_runtime_1.jsx(DefaultPropsEditor_1.DefaultPropsEditor, { unresolvedComposition: composition, defaultProps: currentDefaultProps, setDefaultProps: setDefaultProps, propsEditType: "default-props", schemaErrorMode: "compact", layout: "inspector", mode: defaultPropsMode, onModeChange: setDefaultPropsMode, hideModeControls: canShowDefaultPropsSection, warnings: defaultPropsWarnings, showWarning: false, setShowWarning: setShowWarning, hideWarningButton: true }, composition.id)
|
|
148
|
-
] })
|
|
118
|
+
return (jsx_runtime_1.jsxs("div", { style: styles_1.compositionDefaultPropsSection, children: [
|
|
119
|
+
jsx_runtime_1.jsx(common_1.InspectorSectionHeader, { children: jsx_runtime_1.jsxs("div", { style: styles_1.sectionHeaderRow, children: [
|
|
120
|
+
jsx_runtime_1.jsxs("div", { style: styles_1.sectionHeaderStart, children: [
|
|
121
|
+
jsx_runtime_1.jsx("span", { style: styles_1.sectionHeaderTitle, children: "Default Props" }), jsx_runtime_1.jsx(SegmentedControl_1.SegmentedControl, { items: defaultPropsModeItems, needsWrapping: false, size: "compact" })
|
|
122
|
+
] }), jsx_runtime_1.jsx("div", { style: styles_1.sectionHeaderEnd, children: defaultPropsWarnings.length > 0 ? (jsx_runtime_1.jsx(WarningIndicatorButton_1.WarningIndicatorButton, { setShowWarning: setShowWarning, showWarning: showWarning, warningCount: defaultPropsWarnings.length, size: "compact" })) : null })
|
|
123
|
+
] }) }), defaultPropsWarnings.length > 0 && showWarning ? (jsx_runtime_1.jsx("div", { style: styles_1.defaultPropsWarningContainer, children: jsx_runtime_1.jsx(common_1.InspectorDefaultPropsWarnings, { warnings: defaultPropsWarnings }) })) : null, jsx_runtime_1.jsx(DefaultPropsEditor_1.DefaultPropsEditor, { unresolvedComposition: composition, defaultProps: currentDefaultProps, setDefaultProps: setDefaultProps, propsEditType: "default-props", schemaErrorMode: "compact", layout: "inspector", mode: defaultPropsMode, onModeChange: setDefaultPropsMode, hideModeControls: canShowDefaultPropsSection, warnings: defaultPropsWarnings, showWarning: false, setShowWarning: setShowWarning, hideWarningButton: true }, composition.id)
|
|
149
124
|
] }));
|
|
150
125
|
};
|
|
151
126
|
const CompositionVisualControlsSection = ({ readOnlyStudio }) => {
|
|
@@ -156,17 +131,15 @@ const CompositionVisualControlsSection = ({ readOnlyStudio }) => {
|
|
|
156
131
|
if (!hasVisualControls) {
|
|
157
132
|
return null;
|
|
158
133
|
}
|
|
159
|
-
return (jsx_runtime_1.jsxs(
|
|
160
|
-
jsx_runtime_1.jsx(common_1.
|
|
161
|
-
jsx_runtime_1.jsx(common_1.InspectorSectionHeader, { children: "Visual Controls" }), jsx_runtime_1.jsx(VisualControlsContent_1.VisualControlsContent, {})
|
|
162
|
-
] })
|
|
134
|
+
return (jsx_runtime_1.jsxs("div", { style: styles_1.compositionVisualControlsSection, children: [
|
|
135
|
+
jsx_runtime_1.jsx(common_1.InspectorSectionHeader, { children: "Visual Controls" }), jsx_runtime_1.jsx(VisualControlsContent_1.VisualControlsContent, {})
|
|
163
136
|
] }));
|
|
164
137
|
};
|
|
165
138
|
const CompositionInspector = ({ composition, currentDefaultProps, readOnlyStudio, setDefaultProps }) => {
|
|
166
139
|
const { previewServerState } = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx);
|
|
167
140
|
return (jsx_runtime_1.jsxs("div", { style: styles_1.scrollableContainer, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, children: [
|
|
168
141
|
jsx_runtime_1.jsxs("div", { style: styles_1.inspectorOverviewSection, children: [
|
|
169
|
-
jsx_runtime_1.jsx(CompositionInspectorHeader_1.CompositionInspectorHeader, {}), jsx_runtime_1.jsx(
|
|
142
|
+
jsx_runtime_1.jsx(CompositionInspectorHeader_1.CompositionInspectorHeader, {}), jsx_runtime_1.jsx(CompositionMetadata_1.CompositionMetadata, { compositionId: composition.id, disabled: readOnlyStudio || previewServerState.type !== 'connected', stack: composition.stack })
|
|
170
143
|
] }), jsx_runtime_1.jsx(CompositionDefaultPropsSection, { composition: composition, currentDefaultProps: currentDefaultProps, readOnlyStudio: readOnlyStudio, setDefaultProps: setDefaultProps }), jsx_runtime_1.jsx(CompositionVisualControlsSection, { readOnlyStudio: readOnlyStudio }), jsx_runtime_1.jsx(CompositionActions, {})
|
|
171
144
|
] }));
|
|
172
145
|
};
|
|
@@ -18,7 +18,7 @@ const layout_1 = require("../layout");
|
|
|
18
18
|
const NotificationCenter_1 = require("../Notifications/NotificationCenter");
|
|
19
19
|
const use_resolved_stack_1 = require("../Timeline/use-resolved-stack");
|
|
20
20
|
const use_default_editor_info_1 = require("../use-default-editor-info");
|
|
21
|
-
const COMPOSITION_INSPECTOR_HEADER_HEIGHT =
|
|
21
|
+
const COMPOSITION_INSPECTOR_HEADER_HEIGHT = layout_1.COMPACT_CONTROL_ROW_HEIGHT * 3;
|
|
22
22
|
const sourceLocationIconStyle = {
|
|
23
23
|
flexShrink: 0,
|
|
24
24
|
height: 18,
|
|
@@ -26,7 +26,7 @@ const sourceLocationIconStyle = {
|
|
|
26
26
|
};
|
|
27
27
|
const componentLocationPlaceholder = {
|
|
28
28
|
flexShrink: 0,
|
|
29
|
-
height: layout_1.
|
|
29
|
+
height: layout_1.COMPACT_CONTROL_ROW_HEIGHT,
|
|
30
30
|
};
|
|
31
31
|
const renderReactIcon = (color) => {
|
|
32
32
|
return jsx_runtime_1.jsx(react_2.ReactIcon, { color: color, style: sourceLocationIconStyle });
|
|
@@ -39,23 +39,30 @@ const computedValueStyle = {
|
|
|
39
39
|
fontStyle: 'italic',
|
|
40
40
|
lineHeight: '20px',
|
|
41
41
|
};
|
|
42
|
+
const metadataFormatterStyle = {
|
|
43
|
+
fontSize: 13,
|
|
44
|
+
};
|
|
42
45
|
const metadataDraggerStyles = {
|
|
43
46
|
durationInFrames: {
|
|
47
|
+
fontSize: 13,
|
|
44
48
|
padding: '2px 0 2px 6px',
|
|
45
49
|
textAlign: 'right',
|
|
46
|
-
width:
|
|
50
|
+
width: 104,
|
|
47
51
|
},
|
|
48
52
|
fps: {
|
|
53
|
+
fontSize: 13,
|
|
49
54
|
padding: '2px 0 2px 6px',
|
|
50
55
|
textAlign: 'right',
|
|
51
56
|
width: 72,
|
|
52
57
|
},
|
|
53
58
|
height: {
|
|
59
|
+
fontSize: 13,
|
|
54
60
|
padding: '2px 0 2px 6px',
|
|
55
61
|
textAlign: 'right',
|
|
56
62
|
width: 52,
|
|
57
63
|
},
|
|
58
64
|
width: {
|
|
65
|
+
fontSize: 13,
|
|
59
66
|
padding: '2px 0 2px 6px',
|
|
60
67
|
textAlign: 'right',
|
|
61
68
|
width: 52,
|
|
@@ -115,7 +122,7 @@ const dimensionPresets = [
|
|
|
115
122
|
const frameRatePresets = [23.976, 24, 25, 29.97, 30, 50, 60];
|
|
116
123
|
const PresetDropdown = ({ disabled, title, values, visible }) => {
|
|
117
124
|
const renderAction = (0, react_1.useCallback)((color) => {
|
|
118
|
-
return (jsx_runtime_1.jsx("span", { style: presetButtonIcon, children: jsx_runtime_1.jsx(caret_1.CaretDown, { color: color
|
|
125
|
+
return (jsx_runtime_1.jsx("span", { style: presetButtonIcon, children: jsx_runtime_1.jsx(caret_1.CaretDown, { color: color }) }));
|
|
119
126
|
}, []);
|
|
120
127
|
return (jsx_runtime_1.jsx("div", { style: {
|
|
121
128
|
...presetDropdownContainer,
|
|
@@ -146,7 +153,7 @@ const CompositionMetadataValue = ({ computed, disabled, field, onSave, pendingVa
|
|
|
146
153
|
}
|
|
147
154
|
return String(roundedValue);
|
|
148
155
|
}, [field]);
|
|
149
|
-
return computed ? (jsx_runtime_1.jsx("span", { style: computedContainerStyle, children: jsx_runtime_1.jsx("span", { style: computedValueStyle, children: formatValue(value) }) })) :
|
|
156
|
+
return computed || disabled ? (jsx_runtime_1.jsx("span", { style: computedContainerStyle, children: jsx_runtime_1.jsx("span", { style: computedValueStyle, children: formatValue(value) }) })) : (jsx_runtime_1.jsx(InputDragger_1.InputDragger, { "aria-label": fieldLabels[field], buttonStyle: metadataDraggerStyles[field], type: "number", value: (_a = dragValue !== null && dragValue !== void 0 ? dragValue : pendingValue === null || pendingValue === void 0 ? void 0 : pendingValue.value) !== null && _a !== void 0 ? _a : value, disabled: pendingValue !== null, status: "ok", onValueChange: setDragValue, onValueChangeEnd: save, onTextChange: () => undefined, min: isFps ? 0.01 : 1, step: isFps ? 0.01 : 1, dragDecimalPlaces: isFps ? 2 : 0, formatter: formatValue, formatterStyle: metadataFormatterStyle, rightAlign: true, style: metadataDraggerStyles[field] }));
|
|
150
157
|
};
|
|
151
158
|
const CompositionMetadata = ({ compositionId, disabled, stack }) => {
|
|
152
159
|
var _a, _b, _c, _d;
|
|
@@ -310,7 +317,7 @@ const CompositionMetadata = ({ compositionId, disabled, stack }) => {
|
|
|
310
317
|
return (jsx_runtime_1.jsxs("div", { style: compositionMetadataContainer, children: [jsx_runtime_1.jsx(common_1.InspectorDetailRow, { label: (hovered) => (jsx_runtime_1.jsxs("div", { style: metadataLabelControls, children: [
|
|
311
318
|
jsx_runtime_1.jsx("span", { style: metadataLabelText, children: "Dimensions" }), disabled || widthIsComputed || heightIsComputed ? null : (jsx_runtime_1.jsx(PresetDropdown, { disabled: pendingValues.width !== undefined ||
|
|
312
319
|
pendingValues.height !== undefined, title: "Choose dimension preset", values: dimensionPresetValues, visible: hovered }))] })), children: jsx_runtime_1.jsxs("div", { style: dimensionsControls, children: [
|
|
313
|
-
jsx_runtime_1.jsx(CompositionMetadataValue, { computed: widthIsComputed, disabled: disabled, field: "width", onSave: saveMetadata, pendingValue: (_a = pendingValues.width) !== null && _a !== void 0 ? _a : null, value: video.width }),
|
|
320
|
+
jsx_runtime_1.jsx(CompositionMetadataValue, { computed: widthIsComputed, disabled: disabled, field: "width", onSave: saveMetadata, pendingValue: (_a = pendingValues.width) !== null && _a !== void 0 ? _a : null, value: video.width }), jsx_runtime_1.jsx(CompositionMetadataValue, { computed: heightIsComputed, disabled: disabled, field: "height", onSave: saveMetadata, pendingValue: (_b = pendingValues.height) !== null && _b !== void 0 ? _b : null, value: video.height })
|
|
314
321
|
] }) }), isStill ? null : (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [jsx_runtime_1.jsx(common_1.InspectorDetailRow, { label: (hovered) => (jsx_runtime_1.jsxs("div", { style: metadataLabelControls, children: [
|
|
315
322
|
jsx_runtime_1.jsx("span", { style: metadataLabelText, children: "Frame rate" }), disabled || fpsIsComputed ? null : (jsx_runtime_1.jsx(PresetDropdown, { disabled: pendingValues.fps !== undefined, title: "Choose frame rate preset", values: frameRatePresetValues, visible: hovered }))] })), children: jsx_runtime_1.jsx("div", { style: dimensionsControls, children: jsx_runtime_1.jsx(CompositionMetadataValue, { computed: fpsIsComputed, disabled: disabled, field: "fps", onSave: saveMetadata, pendingValue: (_c = pendingValues.fps) !== null && _c !== void 0 ? _c : null, value: video.fps }) }) }), jsx_runtime_1.jsx(common_1.InspectorDetailRow, { label: "Duration", children: jsx_runtime_1.jsx(CompositionMetadataValue, { computed: durationIsComputed, disabled: disabled, field: "durationInFrames", onSave: saveMetadata, pendingValue: (_d = pendingValues.durationInFrames) !== null && _d !== void 0 ? _d : null, value: video.durationInFrames }) })
|
|
316
323
|
] }))] }));
|
|
@@ -206,7 +206,7 @@ const EasingInspector = ({ selection }) => {
|
|
|
206
206
|
easingKeyframeDisplayOffset,
|
|
207
207
|
]);
|
|
208
208
|
const renderHeader = (0, react_1.useCallback)(() => (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
209
|
-
jsx_runtime_1.jsx(common_1.InspectorBackAction, { disabled: parentSelection === null, onClick: onSelectParent, title: "Back to property", children: fieldLabel }),
|
|
209
|
+
jsx_runtime_1.jsx(common_1.InspectorBackAction, { disabled: parentSelection === null, onClick: onSelectParent, title: "Back to property", children: fieldLabel }), easingUpdate === null || track === null ? null : (jsx_runtime_1.jsx(KeyframeEasingNavigator_1.KeyframeEasingNavigator, { currentSelection: currentEasingSelection !== null && currentEasingSelection !== void 0 ? currentEasingSelection : selection, includeEasings: true, keyframes: easingUpdate.propStatus.keyframes.map((keyframe) => ({
|
|
210
210
|
...keyframe,
|
|
211
211
|
frame: keyframe.frame + easingKeyframeDisplayOffset,
|
|
212
212
|
})), nodePathInfo: selection.nodePathInfo }))] })), [
|
|
@@ -226,6 +226,6 @@ const EasingInspector = ({ selection }) => {
|
|
|
226
226
|
return jsx_runtime_1.jsx(common_1.InspectorMessage, { children: "Easing unavailable" });
|
|
227
227
|
}
|
|
228
228
|
return (jsx_runtime_1.jsxs("div", { style: styles_1.selectedContainer, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, children: [
|
|
229
|
-
jsx_runtime_1.jsx(SequenceInspectorHeader_1.SequenceInspectorSections, { track: track }), jsx_runtime_1.jsx(
|
|
229
|
+
jsx_runtime_1.jsx(SequenceInspectorHeader_1.SequenceInspectorSections, { track: track }), jsx_runtime_1.jsx(EasingEditorModal_1.EasingEditor, { state: state, renderHeader: renderHeader }, (0, TimelineSelection_1.getTimelineSelectionKey)(currentEasingSelection)), jsx_runtime_1.jsx(KeyframeSettings_1.KeyframeSettings, { update: easingUpdate }), canAddKeyframeAtPlayhead ? (jsx_runtime_1.jsx(common_1.InspectorQuickActionsSection, { children: jsx_runtime_1.jsx(common_1.InspectorQuickAction, { disabled: addKeyframeDisabled, onClick: onAddKeyframeAtPlayhead, renderIcon: (color) => (jsx_runtime_1.jsx(plus_1.Plus, { color: color, style: addKeyframeIcon })), children: `Add keyframe at ${addKeyframeTime}` }) })) : null] }));
|
|
230
230
|
};
|
|
231
231
|
exports.EasingInspector = EasingInspector;
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ElementLibraryButton = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_1 = require("react");
|
|
6
|
+
const browser_studio_operations_1 = require("../../helpers/browser-studio-operations");
|
|
7
|
+
const colors_1 = require("../../helpers/colors");
|
|
8
|
+
const browse_elements_1 = require("../../icons/browse-elements");
|
|
9
|
+
const caret_1 = require("../../icons/caret");
|
|
10
|
+
const modals_1 = require("../../state/modals");
|
|
11
|
+
const InspectorPanelLayout_1 = require("../InspectorPanelLayout");
|
|
12
|
+
const SegmentedButton_1 = require("../SegmentedButton");
|
|
13
|
+
const SettingsContext_1 = require("../SettingsContext");
|
|
14
|
+
const common_1 = require("./common");
|
|
15
|
+
const noElementLibraries = [];
|
|
16
|
+
const browseElementsIconStyle = {
|
|
17
|
+
height: 22,
|
|
18
|
+
width: 22,
|
|
19
|
+
};
|
|
20
|
+
const browseElementsIconContainerStyle = {
|
|
21
|
+
height: 22,
|
|
22
|
+
marginLeft: -2,
|
|
23
|
+
marginRight: -2,
|
|
24
|
+
width: 22,
|
|
25
|
+
};
|
|
26
|
+
const browseElementsArrowStyle = {
|
|
27
|
+
display: 'inline-block',
|
|
28
|
+
height: 12,
|
|
29
|
+
marginLeft: 4,
|
|
30
|
+
verticalAlign: -2,
|
|
31
|
+
width: 12,
|
|
32
|
+
};
|
|
33
|
+
const elementLibraryDropdownStyle = {
|
|
34
|
+
borderRadius: 4,
|
|
35
|
+
height: 28,
|
|
36
|
+
margin: '0 4px',
|
|
37
|
+
width: 'calc(100% - 8px)',
|
|
38
|
+
};
|
|
39
|
+
const elementLibraryDropdownSegmentStyle = {
|
|
40
|
+
fontSize: 13,
|
|
41
|
+
gap: 8,
|
|
42
|
+
justifyContent: 'flex-start',
|
|
43
|
+
padding: `0 ${InspectorPanelLayout_1.INSPECTOR_PANEL_HORIZONTAL_PADDING - 4}px`,
|
|
44
|
+
width: '100%',
|
|
45
|
+
};
|
|
46
|
+
const elementLibraryDropdownLabelStyle = {
|
|
47
|
+
flex: 1,
|
|
48
|
+
fontFamily: 'sans-serif',
|
|
49
|
+
fontSize: 13,
|
|
50
|
+
lineHeight: '18px',
|
|
51
|
+
minWidth: 0,
|
|
52
|
+
overflow: 'hidden',
|
|
53
|
+
textAlign: 'left',
|
|
54
|
+
textOverflow: 'ellipsis',
|
|
55
|
+
whiteSpace: 'nowrap',
|
|
56
|
+
};
|
|
57
|
+
const elementLibraryDropdownCaretStyle = {
|
|
58
|
+
display: 'flex',
|
|
59
|
+
height: 12,
|
|
60
|
+
width: 12,
|
|
61
|
+
};
|
|
62
|
+
const ElementLibraryButton = () => {
|
|
63
|
+
var _a;
|
|
64
|
+
const { setSelectedModal } = (0, react_1.useContext)(modals_1.SetSelectedModalContext);
|
|
65
|
+
const { studioRuntimeConfig } = (0, SettingsContext_1.useSettings)();
|
|
66
|
+
const isBrowserStudio = (0, browser_studio_operations_1.getBrowserStudioOperations)() !== null;
|
|
67
|
+
const elementLibraries = (_a = studioRuntimeConfig === null || studioRuntimeConfig === void 0 ? void 0 : studioRuntimeConfig.elementLibraries) !== null && _a !== void 0 ? _a : noElementLibraries;
|
|
68
|
+
const openElementLibrary = (0, react_1.useCallback)((name, url) => {
|
|
69
|
+
if (isBrowserStudio) {
|
|
70
|
+
window.open(url, '_blank', 'noopener,noreferrer');
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
setSelectedModal({
|
|
74
|
+
type: 'element-library',
|
|
75
|
+
name,
|
|
76
|
+
url,
|
|
77
|
+
});
|
|
78
|
+
}, [isBrowserStudio, setSelectedModal]);
|
|
79
|
+
const openElementsLibrary = (0, react_1.useCallback)(() => {
|
|
80
|
+
openElementLibrary('Remotion Elements', 'https://www.remotion.dev/elements');
|
|
81
|
+
}, [openElementLibrary]);
|
|
82
|
+
const elementLibraryDropdownSegments = (0, react_1.useMemo)(() => [
|
|
83
|
+
{
|
|
84
|
+
ariaLabel: 'Browse Elements',
|
|
85
|
+
buttonId: null,
|
|
86
|
+
disabled: false,
|
|
87
|
+
idleColor: colors_1.LIGHT_TEXT,
|
|
88
|
+
leaveLeftSpace: false,
|
|
89
|
+
onOpenChange: null,
|
|
90
|
+
renderContent: (color) => (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
91
|
+
jsx_runtime_1.jsx("span", { style: browseElementsIconContainerStyle, children: jsx_runtime_1.jsx(browse_elements_1.BrowseElementsIcon, { color: color, style: browseElementsIconStyle }) }), jsx_runtime_1.jsx("span", { style: elementLibraryDropdownLabelStyle, children: "Browse Elements" }), jsx_runtime_1.jsx("span", { style: elementLibraryDropdownCaretStyle, children: jsx_runtime_1.jsx(caret_1.CaretDown, { color: color }) })
|
|
92
|
+
] })),
|
|
93
|
+
segmentId: 'element-library',
|
|
94
|
+
selectedId: null,
|
|
95
|
+
style: elementLibraryDropdownSegmentStyle,
|
|
96
|
+
title: 'Choose an Element library to browse inside Studio.',
|
|
97
|
+
type: 'menu',
|
|
98
|
+
values: [
|
|
99
|
+
{
|
|
100
|
+
disabled: false,
|
|
101
|
+
id: 'remotion-elements',
|
|
102
|
+
keyHint: null,
|
|
103
|
+
label: 'Remotion Elements',
|
|
104
|
+
leftItem: null,
|
|
105
|
+
onClick: openElementsLibrary,
|
|
106
|
+
quickSwitcherLabel: null,
|
|
107
|
+
subMenu: null,
|
|
108
|
+
type: 'item',
|
|
109
|
+
value: 'https://www.remotion.dev/elements',
|
|
110
|
+
},
|
|
111
|
+
...elementLibraries.map((library, index) => {
|
|
112
|
+
var _a;
|
|
113
|
+
const parsedUrl = new URL(library.url);
|
|
114
|
+
const pathname = parsedUrl.pathname.replace(/\/$/, '');
|
|
115
|
+
const label = (_a = library.displayName) !== null && _a !== void 0 ? _a : `${parsedUrl.host}${pathname}`;
|
|
116
|
+
return {
|
|
117
|
+
disabled: false,
|
|
118
|
+
id: `external-element-library-${index}`,
|
|
119
|
+
keyHint: null,
|
|
120
|
+
label,
|
|
121
|
+
leftItem: null,
|
|
122
|
+
onClick: () => openElementLibrary(label, library.url),
|
|
123
|
+
quickSwitcherLabel: null,
|
|
124
|
+
subMenu: null,
|
|
125
|
+
type: 'item',
|
|
126
|
+
value: library.url,
|
|
127
|
+
};
|
|
128
|
+
}),
|
|
129
|
+
],
|
|
130
|
+
},
|
|
131
|
+
], [elementLibraries, openElementLibrary, openElementsLibrary]);
|
|
132
|
+
if (elementLibraries.length > 0 && !isBrowserStudio) {
|
|
133
|
+
return (jsx_runtime_1.jsx(SegmentedButton_1.SegmentedButton, { segments: elementLibraryDropdownSegments, style: elementLibraryDropdownStyle, title: null }));
|
|
134
|
+
}
|
|
135
|
+
return (jsx_runtime_1.jsxs(common_1.InspectorQuickAction, { disabled: false, iconContainerStyle: browseElementsIconContainerStyle, onClick: openElementsLibrary, renderIcon: (color) => (jsx_runtime_1.jsx(browse_elements_1.BrowseElementsIcon, { color: color, style: browseElementsIconStyle })), title: isBrowserStudio
|
|
136
|
+
? 'Open the Remotion Elements library in a new tab. Install an Element there to send it to this composition.'
|
|
137
|
+
: 'Browse the Remotion Elements library inside Studio.', children: ["Browse Elements", isBrowserStudio ? (jsx_runtime_1.jsx("svg", { "aria-hidden": "true", viewBox: "0 0 16 16", style: browseElementsArrowStyle, 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" }) })) : null] }));
|
|
138
|
+
};
|
|
139
|
+
exports.ElementLibraryButton = ElementLibraryButton;
|
|
@@ -338,7 +338,7 @@ const KeyframeInspector = ({ selection }) => {
|
|
|
338
338
|
return jsx_runtime_1.jsx(common_1.InspectorMessage, { children: "Keyframe unavailable" });
|
|
339
339
|
}
|
|
340
340
|
return (jsx_runtime_1.jsxs("div", { style: styles_1.selectedContainer, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, children: [
|
|
341
|
-
jsx_runtime_1.jsx(SequenceInspectorHeader_1.SequenceInspectorSections, { track: track }), jsx_runtime_1.jsx(common_1.
|
|
341
|
+
jsx_runtime_1.jsx(SequenceInspectorHeader_1.SequenceInspectorSections, { track: track }), jsx_runtime_1.jsx(common_1.InspectorBackAction, { disabled: parentSelection === null, onClick: onSelectParent, title: "Back to property", children: details.fieldLabel }), jsx_runtime_1.jsx(KeyframeEasingNavigator_1.KeyframeEasingNavigator, { currentSelection: selection, includeEasings: (0, update_selected_easing_1.canEditEasingForInterpolationFunction)(details.propStatus.interpolationFunction), keyframes: details.propStatus.keyframes.map((keyframe) => ({
|
|
342
342
|
...keyframe,
|
|
343
343
|
frame: keyframe.frame + details.keyframeDisplayOffset,
|
|
344
344
|
})), nodePathInfo: selection.nodePathInfo }), jsx_runtime_1.jsxs("div", { style: styles_1.detailsWithInlineAction, children: [
|
|
@@ -4,6 +4,7 @@ exports.SequenceInspectorSections = exports.SequenceInspectorDuplicationSection
|
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("react");
|
|
6
6
|
const client_id_1 = require("../../helpers/client-id");
|
|
7
|
+
const colors_1 = require("../../helpers/colors");
|
|
7
8
|
const react_2 = require("../../icons/react");
|
|
8
9
|
const InlineEditableTitle_1 = require("../InlineEditableTitle");
|
|
9
10
|
const InspectorInfoHeader_1 = require("../InspectorInfoHeader");
|
|
@@ -29,7 +30,7 @@ const sequenceInspectorSubtitle = {
|
|
|
29
30
|
alignItems: 'center',
|
|
30
31
|
boxSizing: 'border-box',
|
|
31
32
|
fontSize: 13,
|
|
32
|
-
height: layout_1.
|
|
33
|
+
height: layout_1.COMPACT_CONTROL_ROW_HEIGHT,
|
|
33
34
|
lineHeight: '18px',
|
|
34
35
|
margin: '0 4px',
|
|
35
36
|
padding: `0 ${InspectorPanelLayout_1.INSPECTOR_PANEL_HORIZONTAL_PADDING - 4}px`,
|
|
@@ -38,6 +39,13 @@ const sequenceInspectorSubtitle = {
|
|
|
38
39
|
const defaultCursor = {
|
|
39
40
|
cursor: 'default',
|
|
40
41
|
};
|
|
42
|
+
const externalTabIndicatorStyle = {
|
|
43
|
+
display: 'inline-block',
|
|
44
|
+
height: 12,
|
|
45
|
+
marginLeft: 4,
|
|
46
|
+
verticalAlign: -2,
|
|
47
|
+
width: 12,
|
|
48
|
+
};
|
|
41
49
|
const useSequenceInspectorSourceLocation = (sequence) => {
|
|
42
50
|
const { canOpenInEditor, openInEditor, originalLocation } = (0, use_open_sequence_in_apps_1.useOpenSequenceInApps)(sequence);
|
|
43
51
|
const validatedLocation = (0, react_1.useMemo)(() => {
|
|
@@ -96,7 +104,8 @@ const SequenceInspectorHeader = ({ sourceLocation, track }) => {
|
|
|
96
104
|
saveName(newName).catch(() => undefined);
|
|
97
105
|
}, [saveName]);
|
|
98
106
|
return (jsx_runtime_1.jsx(InspectorInfoHeader_1.InspectorInfoHeader, { contentSized: true, padding: "4px 0", children: jsx_runtime_1.jsxs(InspectorLocationCopy_1.InspectorLocationCopy, { location: sourceLocation.validatedLocation, name: componentName !== null && componentName !== void 0 ? componentName : null, openInEditorLocation: sourceLocation.validatedLocation, children: [
|
|
99
|
-
jsx_runtime_1.jsx(InlineEditableTitle_1.InlineEditableTitle, { value: sequenceDisplayName, canRename: canRename, onCommit: onRename, size: "inspector" }), documentationLink ? (jsx_runtime_1.
|
|
107
|
+
jsx_runtime_1.jsx(InlineEditableTitle_1.InlineEditableTitle, { value: sequenceDisplayName, canRename: canRename, onCommit: onRename, size: "inspector" }), documentationLink ? (jsx_runtime_1.jsxs(common_1.InspectorQuickAction, { disabled: false, style: defaultCursor, title: "Open component docs", onClick: openDocumentationLink, children: [componentName, jsx_runtime_1.jsx("svg", { "aria-hidden": "true", viewBox: "0 0 16 16", style: externalTabIndicatorStyle, 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" }) })
|
|
108
|
+
] })) : (jsx_runtime_1.jsx("div", { style: subtitleStyle, children: componentName })), jsx_runtime_1.jsx(InspectorSourceLocation_1.InspectorSourceLocation, { location: sourceLocation.validatedLocation, canOpen: sourceLocation.canOpenInEditor, onOpen: sourceLocation.openFileLocation, renderIcon: renderReactIcon, size: "quick-action" })
|
|
100
109
|
] }) }));
|
|
101
110
|
};
|
|
102
111
|
exports.SequenceInspectorHeader = SequenceInspectorHeader;
|
|
@@ -122,8 +131,6 @@ const SequenceInspectorSections = ({ track }) => {
|
|
|
122
131
|
const sourceLocation = (0, exports.useSequenceInspectorSourceLocation)(track.sequence);
|
|
123
132
|
const connectedCompositions = (0, ConnectedCompositionsSection_1.useConnectedCompositions)({ track });
|
|
124
133
|
return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
125
|
-
jsx_runtime_1.jsx(exports.SequenceInspectorHeader, { sourceLocation: sourceLocation, track: track }), jsx_runtime_1.jsx(exports.SequenceInspectorDuplicationSection, { track: track }), connectedCompositions.length > 0 ? (jsx_runtime_1.
|
|
126
|
-
jsx_runtime_1.jsx(common_1.InspectorSectionDivider, {}), jsx_runtime_1.jsx(ConnectedCompositionsSection_1.ConnectedCompositionsSection, { connectedCompositions: connectedCompositions })
|
|
127
|
-
] })) : null] }));
|
|
134
|
+
jsx_runtime_1.jsx(exports.SequenceInspectorHeader, { sourceLocation: sourceLocation, track: track }), jsx_runtime_1.jsx(exports.SequenceInspectorDuplicationSection, { track: track }), connectedCompositions.length > 0 ? (jsx_runtime_1.jsx(ConnectedCompositionsSection_1.ConnectedCompositionsSection, { connectedCompositions: connectedCompositions })) : null] }));
|
|
128
135
|
};
|
|
129
136
|
exports.SequenceInspectorSections = SequenceInspectorSections;
|
|
@@ -168,9 +168,7 @@ const SequenceExpandedInspector = ({ track, readOnlyStudio }) => {
|
|
|
168
168
|
return jsx_runtime_1.jsx(common_1.InspectorMessage, { children: "Sequence inspector unavailable" });
|
|
169
169
|
}
|
|
170
170
|
return (jsx_runtime_1.jsxs("div", { style: styles_1.selectedContainer, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, onPointerDown: selectSequenceOnInspectorPointerDown, children: [
|
|
171
|
-
jsx_runtime_1.jsx(SequenceInspectorHeader_1.SequenceInspectorHeader, { sourceLocation: sourceLocation, track: track }, stackKey !== null && stackKey !== void 0 ? stackKey : track.sequence.id), jsx_runtime_1.jsx(SequenceInspectorHeader_1.SequenceInspectorDuplicationSection, { track: track }), connectedCompositions.length > 0 ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
172
|
-
jsx_runtime_1.jsx(common_1.InspectorSectionDivider, {}), jsx_runtime_1.jsx(ConnectedCompositionsSection_1.ConnectedCompositionsSection, { connectedCompositions: connectedCompositions })
|
|
173
|
-
] })) : null, validatedLocation ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [jsx_runtime_1.jsx(InspectorSequenceSection_1.InspectorSequenceSection, { sequence: track.sequence, readOnlyStudio: readOnlyStudio, validatedLocation: validatedLocation, nodePathInfo: track.nodePathInfo, keyframeDisplayOffset: track.keyframeDisplayOffset, renderTransformControls: () => jsx_runtime_1.jsx(AlignmentControls_1.AlignmentControls, { track: track }) }), jsx_runtime_1.jsxs(common_1.InspectorQuickActionsSection, { children: [
|
|
171
|
+
jsx_runtime_1.jsx(SequenceInspectorHeader_1.SequenceInspectorHeader, { sourceLocation: sourceLocation, track: track }, stackKey !== null && stackKey !== void 0 ? stackKey : track.sequence.id), jsx_runtime_1.jsx(SequenceInspectorHeader_1.SequenceInspectorDuplicationSection, { track: track }), connectedCompositions.length > 0 ? (jsx_runtime_1.jsx(ConnectedCompositionsSection_1.ConnectedCompositionsSection, { connectedCompositions: connectedCompositions })) : null, validatedLocation ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [jsx_runtime_1.jsx(InspectorSequenceSection_1.InspectorSequenceSection, { sequence: track.sequence, readOnlyStudio: readOnlyStudio, validatedLocation: validatedLocation, nodePathInfo: track.nodePathInfo, keyframeDisplayOffset: track.keyframeDisplayOffset, renderTransformControls: () => jsx_runtime_1.jsx(AlignmentControls_1.AlignmentControls, { track: track }) }), jsx_runtime_1.jsxs(common_1.InspectorQuickActionsSection, { children: [
|
|
174
172
|
jsx_runtime_1.jsx(SplitSequenceQuickAction, { selection: sequenceSelection, track: track }), jsx_runtime_1.jsx(SequenceSourceQuickActions, { selection: sequenceSelection, track: track, validatedSource: validatedLocation.source })
|
|
175
173
|
] })
|
|
176
174
|
] })) : (jsx_runtime_1.jsx(common_1.InspectorMessage, { children: "Source controls unavailable" }))] }));
|
|
@@ -3,7 +3,6 @@ import type { RenderModalWarning } from '../RenderModal/DataEditor';
|
|
|
3
3
|
export declare const InspectorSectionHeader: React.FC<{
|
|
4
4
|
readonly children: React.ReactNode;
|
|
5
5
|
}>;
|
|
6
|
-
export declare const InspectorSectionDivider: React.FC;
|
|
7
6
|
export declare const InspectorQuickActionsSection: React.FC<{
|
|
8
7
|
readonly children: React.ReactNode;
|
|
9
8
|
}>;
|
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.InspectorDefaultPropsWarnings = exports.InspectorQuickAction = exports.InspectorDetailRow = exports.InspectorMessage = exports.InspectorBackAction = exports.InspectorSection = exports.InspectorQuickActionsSection = exports.
|
|
6
|
+
exports.InspectorDefaultPropsWarnings = exports.InspectorQuickAction = exports.InspectorDetailRow = exports.InspectorMessage = exports.InspectorBackAction = exports.InspectorSection = exports.InspectorQuickActionsSection = exports.InspectorSectionHeader = void 0;
|
|
7
7
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
8
|
const react_1 = __importDefault(require("react"));
|
|
9
9
|
const colors_1 = require("../../helpers/colors");
|
|
@@ -14,15 +14,11 @@ const ValidationMessage_1 = require("../NewComposition/ValidationMessage");
|
|
|
14
14
|
const styles_1 = require("./styles");
|
|
15
15
|
const InspectorSectionHeader = ({ children }) => jsx_runtime_1.jsx("div", { style: styles_1.sectionHeader, children: children });
|
|
16
16
|
exports.InspectorSectionHeader = InspectorSectionHeader;
|
|
17
|
-
const
|
|
18
|
-
exports.InspectorSectionDivider = InspectorSectionDivider;
|
|
19
|
-
const InspectorQuickActionsSection = ({ children }) => (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
20
|
-
jsx_runtime_1.jsx(exports.InspectorSectionDivider, {}), jsx_runtime_1.jsx("div", { style: styles_1.inspectorQuickActionsSection, children: children })
|
|
21
|
-
] }));
|
|
17
|
+
const InspectorQuickActionsSection = ({ children }) => jsx_runtime_1.jsx("div", { style: styles_1.inspectorQuickActionsSection, children: children });
|
|
22
18
|
exports.InspectorQuickActionsSection = InspectorQuickActionsSection;
|
|
23
19
|
const InspectorSection = ({ children, header }) => {
|
|
24
20
|
return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
25
|
-
jsx_runtime_1.jsx(exports.
|
|
21
|
+
jsx_runtime_1.jsx(exports.InspectorSectionHeader, { children: header }), children === null ? null : (jsx_runtime_1.jsx("div", { style: styles_1.inspectorSectionBody, children: children }))] }));
|
|
26
22
|
};
|
|
27
23
|
exports.InspectorSection = InspectorSection;
|
|
28
24
|
const backArrowIcon = {
|
|
@@ -2,9 +2,9 @@ import { type TimelineSelection } from '../Timeline/TimelineSelection';
|
|
|
2
2
|
export type SequenceSectionSelection = Extract<TimelineSelection, {
|
|
3
3
|
type: 'sequence' | 'sequence-prop' | 'sequence-all-effects' | 'sequence-effect' | 'sequence-effect-prop';
|
|
4
4
|
}>;
|
|
5
|
-
export declare const isSequenceSectionSelection: (selection:
|
|
5
|
+
export declare const isSequenceSectionSelection: (selection: import("@remotion/canvas").CanvasSelectionItem) => selection is SequenceSectionSelection;
|
|
6
6
|
type SameSequenceInspectorSelection = Extract<TimelineSelection, {
|
|
7
7
|
type: 'sequence-prop' | 'sequence-effect' | 'sequence-effect-prop';
|
|
8
8
|
}>;
|
|
9
|
-
export declare const getSameSequenceInspectorSelection: (selections: readonly
|
|
9
|
+
export declare const getSameSequenceInspectorSelection: (selections: readonly import("@remotion/canvas").CanvasSelectionItem[]) => SameSequenceInspectorSelection | null;
|
|
10
10
|
export {};
|
|
@@ -4,7 +4,6 @@ export declare const scrollableContainer: React.CSSProperties;
|
|
|
4
4
|
export declare const compositionDefaultPropsSection: React.CSSProperties;
|
|
5
5
|
export declare const compositionVisualControlsSection: React.CSSProperties;
|
|
6
6
|
export declare const inspectorOverviewSection: React.CSSProperties;
|
|
7
|
-
export declare const inspectorSectionDivider: React.CSSProperties;
|
|
8
7
|
export declare const sequenceHeaderDivider: React.CSSProperties;
|
|
9
8
|
export declare const sectionHeader: React.CSSProperties;
|
|
10
9
|
export declare const inspectorSectionBody: React.CSSProperties;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.keyframeEditorValue = exports.keyframeEditorRow = exports.detailValue = exports.detailLabel = exports.detailRow = exports.guideDetailsContainer = exports.detailsBeforeInlineAction = exports.inspectorQuickActionsSection = exports.detailsWithInlineAction = exports.detailsContainer = exports.centeredMessage = exports.selectedContainer = exports.resolveLinkStyle = exports.defaultPropsWarningMessages = exports.defaultPropsWarningContainer = exports.sectionHeaderEnd = exports.sectionHeaderStart = exports.sectionHeaderTitle = exports.sectionHeaderRow = exports.sequenceHeaderSubtitle = exports.inspectorSectionBody = exports.sectionHeader = exports.sequenceHeaderDivider = exports.
|
|
3
|
+
exports.keyframeEditorValue = exports.keyframeEditorRow = exports.detailValue = exports.detailLabel = exports.detailRow = exports.guideDetailsContainer = exports.detailsBeforeInlineAction = exports.inspectorQuickActionsSection = exports.detailsWithInlineAction = exports.detailsContainer = exports.centeredMessage = exports.selectedContainer = exports.resolveLinkStyle = exports.defaultPropsWarningMessages = exports.defaultPropsWarningContainer = exports.sectionHeaderEnd = exports.sectionHeaderStart = exports.sectionHeaderTitle = exports.sectionHeaderRow = exports.sequenceHeaderSubtitle = exports.inspectorSectionBody = exports.sectionHeader = exports.sequenceHeaderDivider = exports.inspectorOverviewSection = exports.compositionVisualControlsSection = exports.compositionDefaultPropsSection = exports.scrollableContainer = exports.container = void 0;
|
|
4
4
|
const colors_1 = require("../../helpers/colors");
|
|
5
5
|
const InspectorPanelLayout_1 = require("../InspectorPanelLayout");
|
|
6
|
+
const layout_1 = require("../layout");
|
|
6
7
|
exports.container = {
|
|
7
8
|
backgroundColor: colors_1.BACKGROUND,
|
|
8
9
|
color: colors_1.WHITE,
|
|
@@ -29,9 +30,6 @@ exports.inspectorOverviewSection = {
|
|
|
29
30
|
display: 'flex',
|
|
30
31
|
flexDirection: 'column',
|
|
31
32
|
};
|
|
32
|
-
exports.inspectorSectionDivider = {
|
|
33
|
-
borderBottom: `1px solid ${colors_1.LINE_COLOR}`,
|
|
34
|
-
};
|
|
35
33
|
exports.sequenceHeaderDivider = {
|
|
36
34
|
backgroundColor: colors_1.LINE_COLOR,
|
|
37
35
|
flexShrink: 0,
|
|
@@ -161,6 +159,7 @@ exports.detailRow = {
|
|
|
161
159
|
display: 'flex',
|
|
162
160
|
gap: 12,
|
|
163
161
|
justifyContent: 'space-between',
|
|
162
|
+
minHeight: layout_1.COMPACT_CONTROL_ROW_HEIGHT,
|
|
164
163
|
};
|
|
165
164
|
exports.detailLabel = {
|
|
166
165
|
color: colors_1.LIGHT_TEXT,
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const useTrackForSelection: (selection: TimelineSelection) => import("../../helpers/get-timeline-sequence-sort-key").TimelineTrackData | null;
|
|
1
|
+
export declare const useTrackForSelection: (selection: import("@remotion/canvas").CanvasSelectionItem) => import("@remotion/canvas").TimelineTrackData | null;
|
|
@@ -3,11 +3,10 @@ import { type TSequence } from 'remotion';
|
|
|
3
3
|
import type { CodePosition } from '../error-overlay/react-overlay/utils/get-source-map';
|
|
4
4
|
import type { SequenceNodePathInfo } from '../helpers/get-timeline-sequence-sort-key';
|
|
5
5
|
import { type FlatTreeRow } from '../helpers/timeline-layout';
|
|
6
|
-
import { type TimelineSelection } from './Timeline/TimelineSelection';
|
|
7
6
|
type SequenceWithControls = TSequence & {
|
|
8
7
|
readonly controls: NonNullable<TSequence['controls']>;
|
|
9
8
|
};
|
|
10
|
-
export declare const getInspectorSelectableItems: (rows: readonly FlatTreeRow[]) =>
|
|
9
|
+
export declare const getInspectorSelectableItems: (rows: readonly FlatTreeRow[]) => import("@remotion/canvas").CanvasSelectionItem[];
|
|
11
10
|
export declare const hasSequenceControls: (sequence: TSequence) => sequence is SequenceWithControls;
|
|
12
11
|
export declare const InspectorSequenceSection: React.FC<{
|
|
13
12
|
readonly sequence: SequenceWithControls;
|
|
@@ -82,7 +82,7 @@ const InspectorSourceLocation = ({ location, canOpen, onOpen, renderIcon, size =
|
|
|
82
82
|
return null;
|
|
83
83
|
}
|
|
84
84
|
if (size === 'quick-action') {
|
|
85
|
-
return (jsx_runtime_1.jsx(common_1.InspectorQuickAction, { disabled: !canOpen, onClick: onClick, renderIcon: (iconColor) => renderIcon === null || renderIcon === void 0 ? void 0 : renderIcon(iconColor),
|
|
85
|
+
return (jsx_runtime_1.jsx(common_1.InspectorQuickAction, { disabled: !canOpen, onClick: onClick, renderIcon: (iconColor) => renderIcon === null || renderIcon === void 0 ? void 0 : renderIcon(iconColor), title: fileLocation !== null && fileLocation !== void 0 ? fileLocation : undefined, children: label }));
|
|
86
86
|
}
|
|
87
87
|
return (jsx_runtime_1.jsxs("button", { type: "button", style: style, title: fileLocation !== null && fileLocation !== void 0 ? fileLocation : undefined, onClick: onClick, onPointerEnter: () => setHovered(true), onPointerLeave: () => setHovered(false), children: [renderIcon ? renderIcon(color) : null, jsx_runtime_1.jsx("span", { style: sourceLocationLabelStyle, children: label })
|
|
88
88
|
] }));
|