@remotion/studio 4.0.495 → 4.0.496
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/AssetSelectorItem.js +7 -7
- package/dist/components/CompositionSelectorItem.js +5 -23
- package/dist/components/CurrentAsset.js +4 -3
- package/dist/components/InlineCompositionName.js +1 -1
- package/dist/components/InlineEditableTitle.d.ts +1 -0
- package/dist/components/InlineEditableTitle.js +56 -11
- package/dist/components/InspectorInfoHeader.d.ts +2 -0
- package/dist/components/InspectorInfoHeader.js +16 -4
- package/dist/components/InspectorLocationCopy.js +2 -2
- package/dist/components/InspectorPanel/CompositionInspectorHeader.js +11 -6
- package/dist/components/InspectorPanel/EasingInspector.js +1 -1
- package/dist/components/InspectorPanel/KeyframeInspector.js +7 -8
- package/dist/components/InspectorPanel/KeyframeSettings.js +1 -1
- package/dist/components/InspectorPanel/SequenceInspectorHeader.js +28 -3
- package/dist/components/InspectorPanel/SequenceSelectionInspector.js +2 -2
- package/dist/components/InspectorPanel/common.d.ts +4 -2
- package/dist/components/InspectorPanel/common.js +18 -18
- package/dist/components/InspectorPanel/styles.d.ts +0 -3
- package/dist/components/InspectorPanel/styles.js +5 -40
- package/dist/components/InspectorSequenceSection.js +12 -2
- package/dist/components/InspectorSourceLocation.d.ts +1 -0
- package/dist/components/InspectorSourceLocation.js +5 -1
- package/dist/components/NewComposition/ComboBox.d.ts +2 -1
- package/dist/components/NewComposition/ComboBox.js +32 -7
- package/dist/components/PlaybackRateSelector.js +3 -3
- package/dist/components/PreviewToolbar.js +3 -3
- package/dist/components/RenderButton.d.ts +1 -0
- package/dist/components/RenderButton.js +51 -7
- package/dist/components/RenderModal/SchemaEditor/ZodDiscriminatedUnionEditor.js +1 -1
- package/dist/components/RenderModal/SchemaEditor/ZodEnumEditor.js +1 -1
- package/dist/components/RenderModal/SchemaEditor/ZodStaticFileEditor.js +1 -1
- package/dist/components/SizeSelector.js +3 -3
- package/dist/components/Timeline/TimelineAssetField.js +1 -1
- package/dist/components/Timeline/TimelineEnumField.js +1 -1
- package/dist/components/Timeline/TimelineFieldLabel.js +3 -3
- package/dist/components/Timeline/TimelineKeyframeControls.js +26 -6
- package/dist/components/Timeline/TimelineRowChrome.js +10 -2
- package/dist/components/Timeline/TimelineRowLayoutContext.d.ts +3 -0
- package/dist/components/Timeline/TimelineRowLayoutContext.js +6 -0
- package/dist/components/layout.d.ts +1 -0
- package/dist/components/layout.js +2 -1
- package/dist/components/open-in-new-window.d.ts +2 -0
- package/dist/components/open-in-new-window.js +28 -0
- package/dist/esm/{chunk-784jbkzs.js → chunk-0v4n7nkh.js} +565 -376
- package/dist/esm/internals.mjs +565 -376
- package/dist/esm/previewEntry.mjs +565 -376
- package/dist/esm/renderEntry.mjs +1 -1
- package/dist/helpers/inject-css.js +4 -2
- package/dist/icons/scissors.js +1 -1
- package/package.json +11 -11
|
@@ -61,6 +61,7 @@ const InlineAction_1 = require("./InlineAction");
|
|
|
61
61
|
const layout_1 = require("./layout");
|
|
62
62
|
const styles_1 = require("./Menu/styles");
|
|
63
63
|
const NotificationCenter_1 = require("./Notifications/NotificationCenter");
|
|
64
|
+
const open_in_new_window_1 = require("./open-in-new-window");
|
|
64
65
|
const actions_1 = require("./RenderQueue/actions");
|
|
65
66
|
const iconStyle = {
|
|
66
67
|
width: 18,
|
|
@@ -238,13 +239,7 @@ const AssetSelectorItem = ({ item, tabIndex, level, parentFolder, readOnlyStudio
|
|
|
238
239
|
return {
|
|
239
240
|
...itemStyle,
|
|
240
241
|
color: hovered || selected ? colors_1.WHITE : colors_1.LIGHT_TEXT,
|
|
241
|
-
backgroundColor: hovered
|
|
242
|
-
? selected
|
|
243
|
-
? colors_1.SELECTED_BACKGROUND
|
|
244
|
-
: colors_1.WHITE_ALPHA_06
|
|
245
|
-
: selected
|
|
246
|
-
? colors_1.SELECTED_BACKGROUND
|
|
247
|
-
: colors_1.TRANSPARENT,
|
|
242
|
+
backgroundColor: hovered || selected ? colors_1.WHITE_ALPHA_06 : colors_1.TRANSPARENT,
|
|
248
243
|
paddingLeft: 12 + level * 8,
|
|
249
244
|
};
|
|
250
245
|
}, [hovered, level, selected]);
|
|
@@ -317,6 +312,11 @@ const AssetSelectorItem = ({ item, tabIndex, level, parentFolder, readOnlyStudio
|
|
|
317
312
|
}, [confirm, relativePath]);
|
|
318
313
|
const contextMenu = (0, react_1.useMemo)(() => {
|
|
319
314
|
return [
|
|
315
|
+
(0, open_in_new_window_1.getOpenInNewWindowMenuItem)(`/assets/${relativePath}`),
|
|
316
|
+
{
|
|
317
|
+
type: 'divider',
|
|
318
|
+
id: 'open-in-new-window-divider',
|
|
319
|
+
},
|
|
320
320
|
{
|
|
321
321
|
id: 'copy-asset-file-name',
|
|
322
322
|
keyHint: null,
|
|
@@ -9,7 +9,6 @@ const colors_1 = require("../helpers/colors");
|
|
|
9
9
|
const get_folder_id_1 = require("../helpers/get-folder-id");
|
|
10
10
|
const noop_1 = require("../helpers/noop");
|
|
11
11
|
const sidebar_scroll_into_view_1 = require("../helpers/sidebar-scroll-into-view");
|
|
12
|
-
const url_state_1 = require("../helpers/url-state");
|
|
13
12
|
const folder_1 = require("../icons/folder");
|
|
14
13
|
const modals_1 = require("../state/modals");
|
|
15
14
|
const composition_menu_items_1 = require("./composition-menu-items");
|
|
@@ -19,6 +18,7 @@ const ContextMenu_1 = require("./ContextMenu");
|
|
|
19
18
|
const folder_menu_items_1 = require("./folder-menu-items");
|
|
20
19
|
const layout_1 = require("./layout");
|
|
21
20
|
const NotificationCenter_1 = require("./Notifications/NotificationCenter");
|
|
21
|
+
const open_in_new_window_1 = require("./open-in-new-window");
|
|
22
22
|
const actions_1 = require("./RenderQueue/actions");
|
|
23
23
|
const SidebarRenderButton_1 = require("./SidebarRenderButton");
|
|
24
24
|
const use_resolved_stack_1 = require("./Timeline/use-resolved-stack");
|
|
@@ -90,7 +90,9 @@ const CompositionSelectorItem = ({ item, level, currentComposition, tabIndex, se
|
|
|
90
90
|
...itemStyle,
|
|
91
91
|
backgroundColor: dragHovered
|
|
92
92
|
? colors_1.WHITE_ALPHA_12
|
|
93
|
-
:
|
|
93
|
+
: hovered || selected
|
|
94
|
+
? colors_1.WHITE_ALPHA_06
|
|
95
|
+
: colors_1.TRANSPARENT,
|
|
94
96
|
paddingLeft: 12 + level * 8,
|
|
95
97
|
};
|
|
96
98
|
}, [dragHovered, hovered, level, selected]);
|
|
@@ -130,27 +132,7 @@ const CompositionSelectorItem = ({ item, level, currentComposition, tabIndex, se
|
|
|
130
132
|
readOnlyStudio: window.remotion_isReadOnlyStudio,
|
|
131
133
|
});
|
|
132
134
|
return [
|
|
133
|
-
{
|
|
134
|
-
id: 'open-in-new-window',
|
|
135
|
-
keyHint: null,
|
|
136
|
-
label: 'Open in new window',
|
|
137
|
-
leftItem: null,
|
|
138
|
-
onClick: () => {
|
|
139
|
-
var _a, _b;
|
|
140
|
-
const screen = window.screen;
|
|
141
|
-
const width = Math.min(1200, Math.floor(screen.availWidth * 0.8));
|
|
142
|
-
const height = Math.min(800, Math.floor(screen.availHeight * 0.8));
|
|
143
|
-
const displayLeft = (_a = screen.availLeft) !== null && _a !== void 0 ? _a : 0;
|
|
144
|
-
const displayTop = (_b = screen.availTop) !== null && _b !== void 0 ? _b : 0;
|
|
145
|
-
const left = Math.round(Math.min(Math.max(window.screenX + (window.outerWidth - width) / 2, displayLeft), displayLeft + screen.availWidth - width));
|
|
146
|
-
const top = Math.round(Math.min(Math.max(window.screenY + (window.outerHeight - height) / 2, displayTop), displayTop + screen.availHeight - height));
|
|
147
|
-
window.open((0, url_state_1.getUrlForRoute)(`/${item.composition.id}`), '_blank', `popup,width=${width},height=${height},left=${left},top=${top}`);
|
|
148
|
-
},
|
|
149
|
-
quickSwitcherLabel: null,
|
|
150
|
-
subMenu: null,
|
|
151
|
-
type: 'item',
|
|
152
|
-
value: 'open-in-new-window',
|
|
153
|
-
},
|
|
135
|
+
(0, open_in_new_window_1.getOpenInNewWindowMenuItem)(`/${item.composition.id}`),
|
|
154
136
|
{
|
|
155
137
|
type: 'divider',
|
|
156
138
|
id: 'open-in-new-window-divider',
|
|
@@ -13,6 +13,7 @@ const use_image_metadata_1 = require("../helpers/use-image-metadata");
|
|
|
13
13
|
const use_media_metadata_1 = require("../helpers/use-media-metadata");
|
|
14
14
|
const InlineEditableTitle_1 = require("./InlineEditableTitle");
|
|
15
15
|
const InspectorInfoHeader_1 = require("./InspectorInfoHeader");
|
|
16
|
+
const InspectorPanelLayout_1 = require("./InspectorPanelLayout");
|
|
16
17
|
const use_rename_static_file_1 = require("./NewComposition/use-rename-static-file");
|
|
17
18
|
const use_static_files_1 = require("./use-static-files");
|
|
18
19
|
exports.CURRENT_ASSET_HEIGHT = InspectorInfoHeader_1.INSPECTOR_INFO_HEADER_MIN_HEIGHT;
|
|
@@ -115,9 +116,9 @@ const AssetInfo = ({ assetName, contentSized = false, onAssetClick, readOnlyStud
|
|
|
115
116
|
const mediaDetailLines = mediaMetadata
|
|
116
117
|
? (0, exports.getCurrentAssetMediaDetailLines)(mediaMetadata)
|
|
117
118
|
: [];
|
|
118
|
-
return (jsx_runtime_1.jsxs(InspectorInfoHeader_1.InspectorInfoHeader, { contentSized: contentSized, children: [
|
|
119
|
-
jsx_runtime_1.jsx(InlineEditableTitle_1.InlineEditableTitle, { value: fileName, canRename: canRename, getInitialSelection: use_rename_static_file_1.getStaticFileRenameSelection, onClick: onAssetClick, onCommit: onRename, title: assetName }), subtitleParts.length > 0 ? (jsx_runtime_1.jsx(InspectorInfoHeader_1.InspectorInfoSubtitle, { children: subtitleParts.join(' · ') })) : null, mediaMetadata ? (jsx_runtime_1.jsx(InspectorInfoHeader_1.InspectorInfoSubtitle, { children: (0, format_media_duration_1.formatMediaDuration)(mediaMetadata.duration) })) : null, mediaDetailLines.map((line) => {
|
|
120
|
-
return jsx_runtime_1.jsx(InspectorInfoHeader_1.InspectorInfoSubtitle, { children: line }, line);
|
|
119
|
+
return (jsx_runtime_1.jsxs(InspectorInfoHeader_1.InspectorInfoHeader, { contentSized: contentSized, padding: contentSized ? `0 ${InspectorPanelLayout_1.INSPECTOR_PANEL_HORIZONTAL_PADDING}px 6px` : '4px 0', children: [
|
|
120
|
+
jsx_runtime_1.jsx(InlineEditableTitle_1.InlineEditableTitle, { value: fileName, canRename: canRename, getInitialSelection: use_rename_static_file_1.getStaticFileRenameSelection, onClick: onAssetClick, onCommit: onRename, size: contentSized ? 'default' : 'inspector', title: assetName }), subtitleParts.length > 0 ? (jsx_runtime_1.jsx(InspectorInfoHeader_1.InspectorInfoSubtitle, { size: contentSized ? 'default' : 'inspector', children: subtitleParts.join(' · ') })) : null, mediaMetadata ? (jsx_runtime_1.jsx(InspectorInfoHeader_1.InspectorInfoSubtitle, { size: contentSized ? 'default' : 'inspector', children: (0, format_media_duration_1.formatMediaDuration)(mediaMetadata.duration) })) : null, mediaDetailLines.map((line) => {
|
|
121
|
+
return (jsx_runtime_1.jsx(InspectorInfoHeader_1.InspectorInfoSubtitle, { size: contentSized ? 'default' : 'inspector', children: line }, line));
|
|
121
122
|
})] }));
|
|
122
123
|
};
|
|
123
124
|
exports.AssetInfo = AssetInfo;
|
|
@@ -53,6 +53,6 @@ const InlineCompositionName = ({ compositionId, stack, compositions }) => {
|
|
|
53
53
|
stack,
|
|
54
54
|
symbolicatedStack,
|
|
55
55
|
]);
|
|
56
|
-
return (jsx_runtime_1.jsx(InlineEditableTitle_1.InlineEditableTitle, { value: compositionId, canRename: canRename, onCommit: commit }));
|
|
56
|
+
return (jsx_runtime_1.jsx(InlineEditableTitle_1.InlineEditableTitle, { value: compositionId, canRename: canRename, onCommit: commit, size: "inspector" }));
|
|
57
57
|
};
|
|
58
58
|
exports.InlineCompositionName = InlineCompositionName;
|
|
@@ -5,5 +5,6 @@ export declare const InlineEditableTitle: React.FC<{
|
|
|
5
5
|
readonly getInitialSelection?: (value: string) => [number, number];
|
|
6
6
|
readonly onClick?: () => void;
|
|
7
7
|
readonly onCommit: (newValue: string) => void;
|
|
8
|
+
readonly size?: 'default' | 'inspector';
|
|
8
9
|
readonly title?: string;
|
|
9
10
|
}>;
|
|
@@ -4,6 +4,7 @@ exports.InlineEditableTitle = 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 layout_1 = require("./layout");
|
|
7
8
|
const titleWrapper = {
|
|
8
9
|
boxSizing: 'border-box',
|
|
9
10
|
color: colors_1.WHITE,
|
|
@@ -53,7 +54,39 @@ const titleInput = {
|
|
|
53
54
|
WebkitAppearance: 'none',
|
|
54
55
|
width: '100%',
|
|
55
56
|
};
|
|
56
|
-
const
|
|
57
|
+
const inspectorTitleWrapper = {
|
|
58
|
+
...titleWrapper,
|
|
59
|
+
fontFamily: 'sans-serif',
|
|
60
|
+
fontSize: 13,
|
|
61
|
+
height: layout_1.COMPACT_INLINE_ROW_HEIGHT,
|
|
62
|
+
margin: '0 4px',
|
|
63
|
+
width: 'calc(100% - 8px)',
|
|
64
|
+
};
|
|
65
|
+
const inspectorTitleInner = {
|
|
66
|
+
...titleInner,
|
|
67
|
+
alignItems: 'center',
|
|
68
|
+
fontFamily: 'sans-serif',
|
|
69
|
+
fontSize: 13,
|
|
70
|
+
height: layout_1.COMPACT_INLINE_ROW_HEIGHT,
|
|
71
|
+
paddingBottom: 0,
|
|
72
|
+
paddingLeft: 8,
|
|
73
|
+
paddingRight: 8,
|
|
74
|
+
paddingTop: 0,
|
|
75
|
+
width: '100%',
|
|
76
|
+
};
|
|
77
|
+
const inspectorTitleGridItem = {
|
|
78
|
+
...titleGridItem,
|
|
79
|
+
color: 'inherit',
|
|
80
|
+
fontFamily: 'sans-serif',
|
|
81
|
+
fontSize: 13,
|
|
82
|
+
lineHeight: '18px',
|
|
83
|
+
};
|
|
84
|
+
const inspectorTitleInput = {
|
|
85
|
+
...titleInput,
|
|
86
|
+
fontFamily: 'sans-serif',
|
|
87
|
+
fontSize: 13,
|
|
88
|
+
};
|
|
89
|
+
const InlineEditableTitle = ({ value, canRename, getInitialSelection, onClick, onCommit, size = 'default', title, }) => {
|
|
57
90
|
const [isEditing, setIsEditing] = (0, react_1.useState)(false);
|
|
58
91
|
const [isHovered, setIsHovered] = (0, react_1.useState)(false);
|
|
59
92
|
const [draftValue, setDraftValue] = (0, react_1.useState)(value);
|
|
@@ -118,22 +151,34 @@ const InlineEditableTitle = ({ value, canRename, getInitialSelection, onClick, o
|
|
|
118
151
|
const isInteractive = canRename || onClick !== undefined;
|
|
119
152
|
const backgroundColor = isEditing
|
|
120
153
|
? colors_1.INPUT_BACKGROUND
|
|
121
|
-
:
|
|
122
|
-
|
|
123
|
-
:
|
|
154
|
+
: (0, colors_1.getBackgroundFromHoverState)({
|
|
155
|
+
hovered: isHovered && isInteractive,
|
|
156
|
+
selected: false,
|
|
157
|
+
});
|
|
158
|
+
const isInspectorSize = size === 'inspector';
|
|
124
159
|
const innerStyle = (0, react_1.useMemo)(() => {
|
|
125
160
|
return {
|
|
126
|
-
...titleInner,
|
|
161
|
+
...(isInspectorSize ? inspectorTitleInner : titleInner),
|
|
127
162
|
backgroundColor,
|
|
128
|
-
cursor: isEditing
|
|
163
|
+
cursor: isEditing
|
|
164
|
+
? 'text'
|
|
165
|
+
: isInspectorSize
|
|
166
|
+
? 'text'
|
|
167
|
+
: isInteractive
|
|
168
|
+
? 'pointer'
|
|
169
|
+
: 'default',
|
|
129
170
|
userSelect: isEditing ? 'text' : 'none',
|
|
130
|
-
width: isEditing ? '100%' : undefined,
|
|
171
|
+
width: isEditing || isInspectorSize ? '100%' : undefined,
|
|
131
172
|
};
|
|
132
|
-
}, [backgroundColor, isEditing, isInteractive]);
|
|
133
|
-
|
|
173
|
+
}, [backgroundColor, isEditing, isInspectorSize, isInteractive]);
|
|
174
|
+
const gridItemStyle = isInspectorSize
|
|
175
|
+
? inspectorTitleGridItem
|
|
176
|
+
: titleGridItem;
|
|
177
|
+
const inputStyle = isInspectorSize ? inspectorTitleInput : titleInput;
|
|
178
|
+
return (jsx_runtime_1.jsx("div", { style: isInspectorSize ? inspectorTitleWrapper : titleWrapper, title: title !== null && title !== void 0 ? title : value, children: jsx_runtime_1.jsxs("span", { style: innerStyle, onMouseEnter: () => setIsHovered(true), onMouseLeave: () => setIsHovered(false), onClick: isEditing || !isInteractive ? undefined : handleClick, children: [
|
|
134
179
|
jsx_runtime_1.jsx("span", { "aria-hidden": isEditing, style: {
|
|
135
|
-
...
|
|
180
|
+
...gridItemStyle,
|
|
136
181
|
visibility: isEditing ? 'hidden' : 'visible',
|
|
137
|
-
}, children: value }), isEditing ? (jsx_runtime_1.jsx("input", { ref: focusInput, style: { ...
|
|
182
|
+
}, children: value }), isEditing ? (jsx_runtime_1.jsx("input", { ref: focusInput, style: { ...gridItemStyle, ...inputStyle }, value: draftValue, onChange: onChange, onBlur: onBlur, onKeyDown: onKeyDown })) : null] }) }));
|
|
138
183
|
};
|
|
139
184
|
exports.InlineEditableTitle = InlineEditableTitle;
|
|
@@ -4,10 +4,12 @@ export declare const InspectorInfoHeader: React.FC<{
|
|
|
4
4
|
readonly children?: React.ReactNode;
|
|
5
5
|
readonly contentSized?: boolean;
|
|
6
6
|
readonly minHeight?: number;
|
|
7
|
+
readonly padding?: React.CSSProperties['padding'];
|
|
7
8
|
}>;
|
|
8
9
|
export declare const InspectorInfoTitle: React.FC<{
|
|
9
10
|
readonly children: React.ReactNode;
|
|
10
11
|
}>;
|
|
11
12
|
export declare const InspectorInfoSubtitle: React.FC<{
|
|
12
13
|
readonly children: React.ReactNode;
|
|
14
|
+
readonly size?: 'default' | 'inspector';
|
|
13
15
|
}>;
|
|
@@ -44,12 +44,24 @@ const subtitle = {
|
|
|
44
44
|
textOverflow: 'ellipsis',
|
|
45
45
|
whiteSpace: 'nowrap',
|
|
46
46
|
};
|
|
47
|
-
const
|
|
48
|
-
|
|
47
|
+
const inspectorSubtitle = {
|
|
48
|
+
...subtitle,
|
|
49
|
+
boxSizing: 'border-box',
|
|
50
|
+
fontFamily: 'sans-serif',
|
|
51
|
+
fontSize: 13,
|
|
52
|
+
height: 28,
|
|
53
|
+
lineHeight: '18px',
|
|
54
|
+
margin: '0 4px',
|
|
55
|
+
padding: '5px 8px',
|
|
56
|
+
width: 'calc(100% - 8px)',
|
|
57
|
+
};
|
|
58
|
+
const InspectorInfoHeader = ({ children, contentSized = false, minHeight, padding }) => {
|
|
59
|
+
const sizeStyle = contentSized
|
|
49
60
|
? containerBase
|
|
50
61
|
: minHeight === undefined
|
|
51
62
|
? container
|
|
52
63
|
: { ...containerBase, minHeight };
|
|
64
|
+
const style = padding === undefined ? sizeStyle : { ...sizeStyle, padding };
|
|
53
65
|
return (jsx_runtime_1.jsx("div", { style: style, children: children === undefined || children === null ? null : (jsx_runtime_1.jsx("div", { style: row, children: jsx_runtime_1.jsx("div", { style: content, children: children }) })) }));
|
|
54
66
|
};
|
|
55
67
|
exports.InspectorInfoHeader = InspectorInfoHeader;
|
|
@@ -57,7 +69,7 @@ const InspectorInfoTitle = ({ children }) => {
|
|
|
57
69
|
return jsx_runtime_1.jsx("div", { style: title, children: children });
|
|
58
70
|
};
|
|
59
71
|
exports.InspectorInfoTitle = InspectorInfoTitle;
|
|
60
|
-
const InspectorInfoSubtitle = ({ children }) => {
|
|
61
|
-
return jsx_runtime_1.jsx("div", { style: subtitle, children: children });
|
|
72
|
+
const InspectorInfoSubtitle = ({ children, size = 'default' }) => {
|
|
73
|
+
return (jsx_runtime_1.jsx("div", { style: size === 'inspector' ? inspectorSubtitle : subtitle, children: children }));
|
|
62
74
|
};
|
|
63
75
|
exports.InspectorInfoSubtitle = InspectorInfoSubtitle;
|
|
@@ -13,13 +13,18 @@ const InlineCompositionName_1 = require("../InlineCompositionName");
|
|
|
13
13
|
const InspectorInfoHeader_1 = require("../InspectorInfoHeader");
|
|
14
14
|
const InspectorLocationCopy_1 = require("../InspectorLocationCopy");
|
|
15
15
|
const InspectorSourceLocation_1 = require("../InspectorSourceLocation");
|
|
16
|
+
const layout_1 = require("../layout");
|
|
16
17
|
const NotificationCenter_1 = require("../Notifications/NotificationCenter");
|
|
17
18
|
const use_resolved_stack_1 = require("../Timeline/use-resolved-stack");
|
|
18
19
|
const COMPOSITION_INSPECTOR_HEADER_HEIGHT = 66;
|
|
19
20
|
const sourceLocationIconStyle = {
|
|
20
21
|
flexShrink: 0,
|
|
21
|
-
height:
|
|
22
|
-
width:
|
|
22
|
+
height: 18,
|
|
23
|
+
width: 18,
|
|
24
|
+
};
|
|
25
|
+
const componentLocationPlaceholder = {
|
|
26
|
+
flexShrink: 0,
|
|
27
|
+
height: layout_1.COMPACT_INLINE_ROW_HEIGHT,
|
|
23
28
|
};
|
|
24
29
|
const renderReactIcon = (color) => {
|
|
25
30
|
return jsx_runtime_1.jsx(react_2.ReactIcon, { color: color, style: sourceLocationIconStyle });
|
|
@@ -85,9 +90,9 @@ const CompositionInspectorHeader = () => {
|
|
|
85
90
|
}
|
|
86
91
|
return (0, is_composition_still_1.isCompositionStill)(video) ? (jsx_runtime_1.jsx(still_1.StillIcon, { color: color, style: sourceLocationIconStyle })) : (jsx_runtime_1.jsx(video_1.FilmIcon, { color: color, style: sourceLocationIconStyle }));
|
|
87
92
|
}, [video]);
|
|
88
|
-
return (jsx_runtime_1.jsx(InspectorInfoHeader_1.InspectorInfoHeader, { minHeight: COMPOSITION_INSPECTOR_HEADER_HEIGHT, children: video ? (jsx_runtime_1.jsxs(
|
|
89
|
-
jsx_runtime_1.
|
|
90
|
-
|
|
91
|
-
|
|
93
|
+
return (jsx_runtime_1.jsx(InspectorInfoHeader_1.InspectorInfoHeader, { minHeight: COMPOSITION_INSPECTOR_HEADER_HEIGHT, padding: "4px 0", children: video ? (jsx_runtime_1.jsxs(InspectorLocationCopy_1.InspectorLocationCopy, { location: validatedLocation, name: video.id, children: [
|
|
94
|
+
jsx_runtime_1.jsx(InlineCompositionName_1.InlineCompositionName, { compositionId: video.id, stack: (_e = currentComposition === null || currentComposition === void 0 ? void 0 : currentComposition.stack) !== null && _e !== void 0 ? _e : null, compositions: compositions }, video.id), jsx_runtime_1.jsx(InspectorSourceLocation_1.InspectorSourceLocation, { location: validatedLocation, canOpen: validatedLocation !== null, onOpen: openFileLocation, renderIcon: renderCompositionIcon, size: "inline-action" }), compositionComponentInfo === null &&
|
|
95
|
+
compositionFile !== null &&
|
|
96
|
+
compositionId !== null ? (jsx_runtime_1.jsx("div", { "aria-hidden": true, style: componentLocationPlaceholder })) : (jsx_runtime_1.jsx(InspectorSourceLocation_1.InspectorSourceLocation, { location: componentLocation, canOpen: componentLocation !== null, onOpen: openComponentLocation, renderIcon: renderReactIcon, size: "inline-action" }))] })) : null }));
|
|
92
97
|
};
|
|
93
98
|
exports.CompositionInspectorHeader = CompositionInspectorHeader;
|
|
@@ -195,7 +195,7 @@ const EasingInspector = ({ selection }) => {
|
|
|
195
195
|
track,
|
|
196
196
|
]);
|
|
197
197
|
const renderHeader = (0, react_1.useCallback)(() => (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
198
|
-
jsx_runtime_1.jsx(common_1.
|
|
198
|
+
jsx_runtime_1.jsx(common_1.InspectorBackAction, { disabled: parentSelection === null, onClick: onSelectParent, title: "Back to property", children: fieldLabel }), jsx_runtime_1.jsx(common_1.InspectorSectionDivider, {}), 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) => ({
|
|
199
199
|
...keyframe,
|
|
200
200
|
frame: keyframe.frame + track.keyframeDisplayOffset,
|
|
201
201
|
})), nodePathInfo: selection.nodePathInfo }))] })), [
|
|
@@ -45,11 +45,11 @@ const makeMovedKeyframedDragOverride = ({ details, toFrame, }) => {
|
|
|
45
45
|
const removeKeyframeIcon = {
|
|
46
46
|
display: 'block',
|
|
47
47
|
flexShrink: 0,
|
|
48
|
-
height:
|
|
49
|
-
width:
|
|
48
|
+
height: 16,
|
|
49
|
+
width: 16,
|
|
50
50
|
};
|
|
51
51
|
const TrashIcon = ({ color }) => {
|
|
52
|
-
return (jsx_runtime_1.jsx("svg", { viewBox: "0 0 448 512", style: removeKeyframeIcon, children: jsx_runtime_1.jsx("path", { fill: color, d: "
|
|
52
|
+
return (jsx_runtime_1.jsx("svg", { viewBox: "0 0 448 512", style: removeKeyframeIcon, children: jsx_runtime_1.jsx("path", { fill: color, d: "M160.5 27.4c2-6.8 8.3-11.4 15.3-11.4l96.4 0c7.1 0 13.3 4.6 15.3 11.4l11 36.6-149 0 11-36.6zM116.1 64L16 64C7.2 64 0 71.2 0 80S7.2 96 16 96l416 0c8.8 0 16-7.2 16-16s-7.2-16-16-16l-100.1 0-13.7-45.8C312.1-2.1 293.4-16 272.2-16l-96.4 0c-21.2 0-39.9 13.9-46 34.2L116.1 64zM28.7 144L51.6 452.7c2.5 33.4 30.3 59.3 63.8 59.3l217.1 0c33.5 0 61.3-25.9 63.8-59.3l22.9-308.7-32.1 0-22.7 306.4c-1.2 16.7-15.2 29.6-31.9 29.6l-217.1 0c-16.8 0-30.7-12.9-31.9-29.6L60.8 144 28.7 144z" }) }));
|
|
53
53
|
};
|
|
54
54
|
const KeyframeInspector = ({ selection }) => {
|
|
55
55
|
const track = (0, use_track_for_selection_1.useTrackForSelection)(selection);
|
|
@@ -321,15 +321,14 @@ const KeyframeInspector = ({ selection }) => {
|
|
|
321
321
|
return jsx_runtime_1.jsx(common_1.InspectorMessage, { children: "Keyframe unavailable" });
|
|
322
322
|
}
|
|
323
323
|
return (jsx_runtime_1.jsxs("div", { style: styles_1.selectedContainer, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, children: [
|
|
324
|
-
jsx_runtime_1.jsx(SequenceInspectorHeader_1.SequenceInspectorSections, { track: track }), jsx_runtime_1.jsx(common_1.InspectorSectionDivider, {}), jsx_runtime_1.jsx(common_1.
|
|
324
|
+
jsx_runtime_1.jsx(SequenceInspectorHeader_1.SequenceInspectorSections, { track: track }), jsx_runtime_1.jsx(common_1.InspectorSectionDivider, {}), jsx_runtime_1.jsx(common_1.InspectorBackAction, { disabled: parentSelection === null, onClick: onSelectParent, title: "Back to property", children: details.fieldLabel }), jsx_runtime_1.jsx(common_1.InspectorSectionDivider, {}), 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) => ({
|
|
325
325
|
...keyframe,
|
|
326
326
|
frame: keyframe.frame + details.keyframeDisplayOffset,
|
|
327
327
|
})), nodePathInfo: selection.nodePathInfo }), jsx_runtime_1.jsxs("div", { style: styles_1.detailsWithInlineAction, children: [
|
|
328
328
|
jsx_runtime_1.jsxs("div", { style: styles_1.detailsBeforeInlineAction, children: [
|
|
329
|
-
jsx_runtime_1.jsx(common_1.InspectorDetailRow, { label: "Frame", children: jsx_runtime_1.jsx(InputDragger_1.InputDragger, { type: "number", value: draftFrame, status: "ok", onValueChange: onFrameChange, onValueChangeEnd: onFrameChangeEnd, onTextChange: () => undefined, min: 0, max: Math.max(0, videoConfig.durationInFrames - 1), step: 1, formatter: (value) => String(Math.round(Number(value))), rightAlign: true, small: true }) }), jsx_runtime_1.
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
] }), jsx_runtime_1.jsx(common_1.InspectorInlineAction, { disabled: removeDisabled, onClick: onRemoveKeyframe, renderIcon: (color) => jsx_runtime_1.jsx(TrashIcon, { color: color }), children: "Remove keyframe" })] })
|
|
329
|
+
jsx_runtime_1.jsx(common_1.InspectorDetailRow, { label: "Frame", children: jsx_runtime_1.jsx(InputDragger_1.InputDragger, { type: "number", value: draftFrame, status: "ok", onValueChange: onFrameChange, onValueChangeEnd: onFrameChangeEnd, onTextChange: () => undefined, min: 0, max: Math.max(0, videoConfig.durationInFrames - 1), step: 1, formatter: (value) => String(Math.round(Number(value))), rightAlign: true, small: true }) }), jsx_runtime_1.jsx("div", { style: styles_1.keyframeEditorRow, children: jsx_runtime_1.jsx(common_1.InspectorDetailRow, { label: details.fieldLabel, children: jsx_runtime_1.jsx("div", { style: styles_1.keyframeEditorValue, children: details.type === 'sequence' ? (jsx_runtime_1.jsx(TimelineSequencePropItem_1.TimelineSequenceKeyframedValue, { field: details.field, fileName: details.fileName, nodePath: details.nodePath, schema: details.schema, propStatus: details.propStatus, sourceFrame: details.sourceFrame })) : (jsx_runtime_1.jsx(TimelineEffectPropItem_1.TimelineEffectPropValue, { field: details.field, nodePath: details.nodePath, validatedLocation: details.validatedLocation, sourceFrame: details.sourceFrame })) }) }) })
|
|
330
|
+
] }), jsx_runtime_1.jsx(common_1.InspectorActionSection, { children: jsx_runtime_1.jsx(common_1.InspectorInlineAction, { disabled: removeDisabled, onClick: onRemoveKeyframe, renderIcon: (color) => jsx_runtime_1.jsx(TrashIcon, { color: color }), children: "Remove keyframe" }) })
|
|
331
|
+
] })
|
|
333
332
|
] }));
|
|
334
333
|
};
|
|
335
334
|
exports.KeyframeInspector = KeyframeInspector;
|
|
@@ -134,7 +134,7 @@ const KeyframeSettings = ({ update }) => {
|
|
|
134
134
|
}, []);
|
|
135
135
|
return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
136
136
|
jsx_runtime_1.jsx(common_1.InspectorSectionHeader, { children: "Keyframe settings" }), jsx_runtime_1.jsxs("div", { style: keyframeSettingsContainer, children: [canEditInterpolationSettings ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
137
|
-
jsx_runtime_1.jsx(common_1.InspectorDetailRow, { label: "Extrapolate left", children: jsx_runtime_1.jsx(ComboBox_1.Combobox, { values: leftValues, selectedId: propStatus.clamping.left, title: "Extrapolate left", style: comboStyle,
|
|
137
|
+
jsx_runtime_1.jsx(common_1.InspectorDetailRow, { label: "Extrapolate left", children: jsx_runtime_1.jsx(ComboBox_1.Combobox, { values: leftValues, selectedId: propStatus.clamping.left, title: "Extrapolate left", style: comboStyle, size: "small" }) }), jsx_runtime_1.jsx(common_1.InspectorDetailRow, { label: "Extrapolate right", children: jsx_runtime_1.jsx(ComboBox_1.Combobox, { values: rightValues, selectedId: propStatus.clamping.right, title: "Extrapolate right", style: comboStyle, size: "small" }) }), jsx_runtime_1.jsx(common_1.InspectorDetailRow, { label: "Output", children: jsx_runtime_1.jsx(ComboBox_1.Combobox, { values: outputValues, selectedId: (_b = propStatus.output) !== null && _b !== void 0 ? _b : 'linear', title: "Output", style: comboStyle, size: "small" }) })
|
|
138
138
|
] })) : null, jsx_runtime_1.jsx(common_1.InspectorDetailRow, { label: "Posterize", children: jsx_runtime_1.jsx(InputDragger_1.InputDragger, { type: "number", value: posterize, status: "ok", onValueChange: onPosterizeChange, onValueChangeEnd: onPosterizeChangeEnd, onTextChange: () => undefined, min: 0, step: 1, formatter: posterizeFormatter, rightAlign: true, small: true, disabled: disabled }) })
|
|
139
139
|
] })
|
|
140
140
|
] }));
|
|
@@ -4,14 +4,39 @@ exports.SequenceInspectorSections = exports.SequenceInspectorHeader = exports.us
|
|
|
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 react_2 = require("../../icons/react");
|
|
7
8
|
const InlineEditableTitle_1 = require("../InlineEditableTitle");
|
|
9
|
+
const InspectorInfoHeader_1 = require("../InspectorInfoHeader");
|
|
8
10
|
const InspectorLocationCopy_1 = require("../InspectorLocationCopy");
|
|
9
11
|
const InspectorSourceLocation_1 = require("../InspectorSourceLocation");
|
|
12
|
+
const layout_1 = require("../layout");
|
|
10
13
|
const use_open_sequence_in_editor_1 = require("../Timeline/use-open-sequence-in-editor");
|
|
11
14
|
const use_rename_sequence_1 = require("../Timeline/use-rename-sequence");
|
|
12
15
|
const common_1 = require("./common");
|
|
13
16
|
const ConnectedCompositionsSection_1 = require("./ConnectedCompositionsSection");
|
|
14
17
|
const styles_1 = require("./styles");
|
|
18
|
+
const sourceLocationIconStyle = {
|
|
19
|
+
flexShrink: 0,
|
|
20
|
+
height: 18,
|
|
21
|
+
width: 18,
|
|
22
|
+
};
|
|
23
|
+
const renderReactIcon = (color) => {
|
|
24
|
+
return jsx_runtime_1.jsx(react_2.ReactIcon, { color: color, style: sourceLocationIconStyle });
|
|
25
|
+
};
|
|
26
|
+
const sequenceInspectorSubtitle = {
|
|
27
|
+
...styles_1.sequenceHeaderSubtitle,
|
|
28
|
+
alignItems: 'center',
|
|
29
|
+
boxSizing: 'border-box',
|
|
30
|
+
fontSize: 13,
|
|
31
|
+
height: layout_1.COMPACT_INLINE_ROW_HEIGHT,
|
|
32
|
+
lineHeight: '18px',
|
|
33
|
+
margin: '0 4px',
|
|
34
|
+
padding: '0 8px',
|
|
35
|
+
width: 'calc(100% - 8px)',
|
|
36
|
+
};
|
|
37
|
+
const defaultCursor = {
|
|
38
|
+
cursor: 'default',
|
|
39
|
+
};
|
|
15
40
|
const useSequenceInspectorSourceLocation = (sequence) => {
|
|
16
41
|
const { canOpenInEditor, openInEditor, originalLocation } = (0, use_open_sequence_in_editor_1.useOpenSequenceInEditor)(sequence);
|
|
17
42
|
const validatedLocation = (0, react_1.useMemo)(() => {
|
|
@@ -61,7 +86,7 @@ const SequenceInspectorHeader = ({ sourceLocation, track }) => {
|
|
|
61
86
|
}, [documentationLink]);
|
|
62
87
|
const subtitleStyle = (0, react_1.useMemo)(() => {
|
|
63
88
|
return {
|
|
64
|
-
...
|
|
89
|
+
...sequenceInspectorSubtitle,
|
|
65
90
|
cursor: documentationLink ? 'pointer' : 'default',
|
|
66
91
|
};
|
|
67
92
|
}, [documentationLink]);
|
|
@@ -69,8 +94,8 @@ const SequenceInspectorHeader = ({ sourceLocation, track }) => {
|
|
|
69
94
|
const onRename = (0, react_1.useCallback)((newName) => {
|
|
70
95
|
saveName(newName).catch(() => undefined);
|
|
71
96
|
}, [saveName]);
|
|
72
|
-
return (jsx_runtime_1.jsx(
|
|
73
|
-
jsx_runtime_1.jsx(
|
|
97
|
+
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, children: [
|
|
98
|
+
jsx_runtime_1.jsx(InlineEditableTitle_1.InlineEditableTitle, { value: sequenceDisplayName, canRename: canRename, onCommit: onRename, size: "inspector" }), documentationLink ? (jsx_runtime_1.jsx(common_1.InspectorInlineAction, { disabled: false, style: defaultCursor, size: "compact", title: "Open component docs", onClick: openDocumentationLink, children: componentName })) : (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: "inline-action" })
|
|
74
99
|
] }) }));
|
|
75
100
|
};
|
|
76
101
|
exports.SequenceInspectorHeader = SequenceInspectorHeader;
|
|
@@ -17,8 +17,8 @@ const SequenceInspectorHeader_1 = require("./SequenceInspectorHeader");
|
|
|
17
17
|
const styles_1 = require("./styles");
|
|
18
18
|
const use_track_for_selection_1 = require("./use-track-for-selection");
|
|
19
19
|
const splitIconStyle = {
|
|
20
|
-
height:
|
|
21
|
-
width:
|
|
20
|
+
height: 16,
|
|
21
|
+
width: 16,
|
|
22
22
|
};
|
|
23
23
|
const SplitSequenceAction = ({ selection, track }) => {
|
|
24
24
|
const timelinePosition = remotion_1.Internals.Timeline.useTimelinePosition();
|
|
@@ -11,7 +11,7 @@ export declare const InspectorSection: React.FC<{
|
|
|
11
11
|
readonly children: React.ReactNode;
|
|
12
12
|
readonly header: React.ReactNode;
|
|
13
13
|
}>;
|
|
14
|
-
export declare const
|
|
14
|
+
export declare const InspectorBackAction: React.FC<{
|
|
15
15
|
readonly children: React.ReactNode;
|
|
16
16
|
readonly disabled: boolean;
|
|
17
17
|
readonly onClick: React.MouseEventHandler<HTMLButtonElement>;
|
|
@@ -28,8 +28,10 @@ export declare const InspectorInlineAction: React.FC<{
|
|
|
28
28
|
readonly children: React.ReactNode;
|
|
29
29
|
readonly disabled: boolean;
|
|
30
30
|
readonly onClick: React.MouseEventHandler<HTMLButtonElement>;
|
|
31
|
-
readonly renderIcon
|
|
31
|
+
readonly renderIcon?: (color: string) => React.ReactNode;
|
|
32
|
+
readonly size?: 'default' | 'compact';
|
|
32
33
|
readonly style?: React.CSSProperties;
|
|
34
|
+
readonly title?: string;
|
|
33
35
|
}>;
|
|
34
36
|
export declare const InspectorDefaultPropsWarnings: React.FC<{
|
|
35
37
|
readonly warnings: RenderModalWarning[];
|
|
@@ -3,11 +3,10 @@ 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.InspectorInlineAction = exports.InspectorDetailRow = exports.InspectorMessage = exports.
|
|
6
|
+
exports.InspectorDefaultPropsWarnings = exports.InspectorInlineAction = exports.InspectorDetailRow = exports.InspectorMessage = exports.InspectorBackAction = exports.InspectorSection = exports.InspectorActionSection = exports.InspectorSectionDivider = 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");
|
|
10
|
-
const InlineAction_1 = require("../InlineAction");
|
|
11
10
|
const InspectorPanelLayout_1 = require("../InspectorPanelLayout");
|
|
12
11
|
const layout_1 = require("../layout");
|
|
13
12
|
const ValidationMessage_1 = require("../NewComposition/ValidationMessage");
|
|
@@ -25,20 +24,18 @@ const InspectorSection = ({ children, header }) => {
|
|
|
25
24
|
jsx_runtime_1.jsx(exports.InspectorSectionDivider, {}), jsx_runtime_1.jsx(exports.InspectorSectionHeader, { children: header }), children === null ? null : (jsx_runtime_1.jsx("div", { style: styles_1.inspectorSectionBody, children: children }))] }));
|
|
26
25
|
};
|
|
27
26
|
exports.InspectorSection = InspectorSection;
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
justifyContent: 'center',
|
|
33
|
-
width: 12,
|
|
27
|
+
const backArrowIcon = {
|
|
28
|
+
display: 'block',
|
|
29
|
+
height: 15,
|
|
30
|
+
width: 15,
|
|
34
31
|
};
|
|
35
|
-
const
|
|
36
|
-
return (jsx_runtime_1.jsx("svg", { viewBox: "0 0
|
|
32
|
+
const BackArrow = ({ color }) => {
|
|
33
|
+
return (jsx_runtime_1.jsx("svg", { viewBox: "0 0 512 512", style: backArrowIcon, children: jsx_runtime_1.jsx("path", { d: "M7 239c-9.4 9.4-9.4 24.6 0 33.9L175 441c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9L81.9 280 488 280c13.3 0 24-10.7 24-24s-10.7-24-24-24L81.9 232 209 105c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0L7 239z", fill: color }) }));
|
|
37
34
|
};
|
|
38
|
-
const
|
|
39
|
-
return (jsx_runtime_1.jsx(
|
|
35
|
+
const InspectorBackAction = ({ children, disabled, onClick, title }) => {
|
|
36
|
+
return (jsx_runtime_1.jsx("div", { style: styles_1.inspectorActionSection, children: jsx_runtime_1.jsx(exports.InspectorInlineAction, { disabled: disabled, onClick: onClick, renderIcon: (color) => jsx_runtime_1.jsx(BackArrow, { color: color }), title: title, children: children }) }));
|
|
40
37
|
};
|
|
41
|
-
exports.
|
|
38
|
+
exports.InspectorBackAction = InspectorBackAction;
|
|
42
39
|
const InspectorMessage = ({ children }) => jsx_runtime_1.jsx("div", { style: styles_1.centeredMessage, children: children });
|
|
43
40
|
exports.InspectorMessage = InspectorMessage;
|
|
44
41
|
const InspectorDetailRow = ({ label, children }) => (jsx_runtime_1.jsxs("div", { style: styles_1.detailRow, children: [
|
|
@@ -62,7 +59,7 @@ const inlineLabelButton = {
|
|
|
62
59
|
height: layout_1.COMPACT_CONTROL_ROW_HEIGHT,
|
|
63
60
|
lineHeight: '18px',
|
|
64
61
|
margin: `0 ${INLINE_LABEL_BUTTON_MARGIN}px`,
|
|
65
|
-
padding: `
|
|
62
|
+
padding: `0 ${InspectorPanelLayout_1.INSPECTOR_PANEL_HORIZONTAL_PADDING - INLINE_LABEL_BUTTON_MARGIN}px`,
|
|
66
63
|
textAlign: 'left',
|
|
67
64
|
width: `calc(100% - ${INLINE_LABEL_BUTTON_MARGIN * 2}px)`,
|
|
68
65
|
};
|
|
@@ -70,6 +67,9 @@ const inlineLabelButtonDisabled = {
|
|
|
70
67
|
...inlineLabelButton,
|
|
71
68
|
opacity: 0.35,
|
|
72
69
|
};
|
|
70
|
+
const compactInlineLabelButton = {
|
|
71
|
+
height: layout_1.COMPACT_INLINE_ROW_HEIGHT,
|
|
72
|
+
};
|
|
73
73
|
const inlineLabelText = {
|
|
74
74
|
color: colors_1.LIGHT_TEXT,
|
|
75
75
|
flex: 1,
|
|
@@ -89,7 +89,7 @@ const inlineLabelIcon = {
|
|
|
89
89
|
justifyContent: 'center',
|
|
90
90
|
width: 18,
|
|
91
91
|
};
|
|
92
|
-
const InspectorInlineAction = ({ children, disabled, onClick, renderIcon, style }) => {
|
|
92
|
+
const InspectorInlineAction = ({ children, disabled, onClick, renderIcon, size = 'default', style, title, }) => {
|
|
93
93
|
const [hovered, setHovered] = react_1.default.useState(false);
|
|
94
94
|
const color = hovered && !disabled ? colors_1.WHITE : colors_1.LIGHT_TEXT;
|
|
95
95
|
const buttonStyle = react_1.default.useMemo(() => ({
|
|
@@ -99,8 +99,9 @@ const InspectorInlineAction = ({ children, disabled, onClick, renderIcon, style
|
|
|
99
99
|
selected: false,
|
|
100
100
|
}),
|
|
101
101
|
color,
|
|
102
|
+
...(size === 'compact' ? compactInlineLabelButton : null),
|
|
102
103
|
...style,
|
|
103
|
-
}), [color, disabled, hovered, style]);
|
|
104
|
+
}), [color, disabled, hovered, size, style]);
|
|
104
105
|
const textStyle = react_1.default.useMemo(() => ({
|
|
105
106
|
...inlineLabelText,
|
|
106
107
|
color,
|
|
@@ -111,8 +112,7 @@ const InspectorInlineAction = ({ children, disabled, onClick, renderIcon, style
|
|
|
111
112
|
const onPointerLeave = react_1.default.useCallback(() => {
|
|
112
113
|
setHovered(false);
|
|
113
114
|
}, []);
|
|
114
|
-
return (jsx_runtime_1.jsxs("button", { type: "button", disabled: disabled, style: buttonStyle, onClick: onClick, onPointerEnter: disabled ? undefined : onPointerEnter, onPointerLeave: onPointerLeave, children: [
|
|
115
|
-
jsx_runtime_1.jsx("span", { style: inlineLabelIcon, children: renderIcon(color) }), jsx_runtime_1.jsx("span", { style: textStyle, children: children })
|
|
115
|
+
return (jsx_runtime_1.jsxs("button", { className: "__remotion-inspector-inline-action", type: "button", disabled: disabled, style: buttonStyle, title: title, onClick: onClick, onPointerEnter: disabled ? undefined : onPointerEnter, onPointerLeave: onPointerLeave, children: [renderIcon ? (jsx_runtime_1.jsx("span", { style: inlineLabelIcon, children: renderIcon(color) })) : null, jsx_runtime_1.jsx("span", { style: textStyle, children: children })
|
|
116
116
|
] }));
|
|
117
117
|
};
|
|
118
118
|
exports.InspectorInlineAction = InspectorInlineAction;
|
|
@@ -8,8 +8,6 @@ export declare const inspectorSectionDivider: React.CSSProperties;
|
|
|
8
8
|
export declare const sequenceHeaderDivider: React.CSSProperties;
|
|
9
9
|
export declare const sectionHeader: React.CSSProperties;
|
|
10
10
|
export declare const inspectorSectionBody: React.CSSProperties;
|
|
11
|
-
export declare const sequenceHeader: React.CSSProperties;
|
|
12
|
-
export declare const sequenceHeaderTitle: React.CSSProperties;
|
|
13
11
|
export declare const sequenceHeaderSubtitle: React.CSSProperties;
|
|
14
12
|
export declare const sectionHeaderRow: React.CSSProperties;
|
|
15
13
|
export declare const sectionHeaderTitle: React.CSSProperties;
|
|
@@ -29,5 +27,4 @@ export declare const detailRow: React.CSSProperties;
|
|
|
29
27
|
export declare const detailLabel: React.CSSProperties;
|
|
30
28
|
export declare const detailValue: React.CSSProperties;
|
|
31
29
|
export declare const keyframeEditorRow: React.CSSProperties;
|
|
32
|
-
export declare const keyframeEditorLabel: React.CSSProperties;
|
|
33
30
|
export declare const keyframeEditorValue: React.CSSProperties;
|