@remotion/studio 4.0.495 → 4.0.497
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/AudioWaveform.js +1 -11
- package/dist/components/Canvas.js +22 -203
- package/dist/components/CompositionSelectorItem.js +5 -31
- 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/AlignmentControls.js +2 -0
- package/dist/components/InspectorPanel/CompositionInspectorHeader.js +11 -6
- package/dist/components/InspectorPanel/ConnectedCompositionsSection.js +27 -2
- 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 +67 -10
- 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/InspectorPanel/use-composition-actions.js +6 -2
- 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/CodemodFooter.d.ts +1 -1
- package/dist/components/NewComposition/CodemodFooter.js +23 -4
- package/dist/components/NewComposition/ComboBox.d.ts +2 -1
- package/dist/components/NewComposition/ComboBox.js +32 -7
- package/dist/components/NewComposition/InputDragger.d.ts +6 -0
- package/dist/components/NewComposition/InputDragger.js +12 -3
- package/dist/components/NewComposition/NewComposition.js +1 -1
- package/dist/components/NewComposition/use-rename-static-file.js +1 -1
- 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/SelectedOutlineElement.js +56 -88
- package/dist/components/SelectedOutlineOverlay.d.ts +1 -1
- package/dist/components/SelectedOutlineOverlay.js +9 -10
- package/dist/components/SizeSelector.js +3 -3
- package/dist/components/Timeline/Timeline.js +10 -3
- package/dist/components/Timeline/TimelineAssetDropIndicator.d.ts +2 -0
- package/dist/components/Timeline/TimelineAssetDropIndicator.js +37 -0
- package/dist/components/Timeline/TimelineAssetField.js +1 -1
- package/dist/components/Timeline/TimelineClipboardKeybindings.js +1 -7
- 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/Timeline/TimelineScrollable.js +3 -2
- package/dist/components/Timeline/TimelineSelection.d.ts +4 -0
- package/dist/components/Timeline/TimelineSelection.js +40 -5
- package/dist/components/Timeline/TimelineSequence.js +20 -8
- package/dist/components/Timeline/TimelineSequenceFrame.js +2 -4
- package/dist/components/Timeline/TimelineSequenceItem.js +2 -0
- package/dist/components/Timeline/TimelineSequencePropItem.js +4 -0
- package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.d.ts +15 -3
- package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.js +96 -18
- package/dist/components/Timeline/TimelineTimeIndicators.d.ts +16 -0
- package/dist/components/Timeline/TimelineTimeIndicators.js +154 -35
- package/dist/components/Timeline/TimelineTranslateField.js +2 -1
- package/dist/components/Timeline/TimelineVideoInfo.d.ts +1 -0
- package/dist/components/Timeline/TimelineVideoInfo.js +4 -1
- package/dist/components/Timeline/delete-selected-timeline-item.d.ts +2 -0
- package/dist/components/Timeline/delete-selected-timeline-item.js +5 -4
- package/dist/components/Timeline/disable-sequence-interactivity.js +2 -0
- package/dist/components/Timeline/get-timeline-media-visualization-layout.d.ts +8 -0
- package/dist/components/Timeline/get-timeline-media-visualization-layout.js +10 -0
- package/dist/components/Timeline/get-timeline-video-info-widths.js +11 -3
- package/dist/components/Timeline/keyframe-clipboard.js +21 -5
- package/dist/components/Timeline/reset-selected-timeline-props.js +2 -0
- package/dist/components/Timeline/save-sequence-prop.d.ts +5 -3
- package/dist/components/Timeline/save-sequence-prop.js +43 -18
- package/dist/components/Timeline/should-clear-selection-on-pointer-down.d.ts +2 -0
- package/dist/components/Timeline/should-clear-selection-on-pointer-down.js +1 -1
- package/dist/components/Timeline/timeline-asset-drop-context.d.ts +1 -0
- package/dist/components/Timeline/timeline-asset-drop-context.js +5 -0
- package/dist/components/Timeline/timeline-scroll-logic.d.ts +7 -0
- package/dist/components/Timeline/timeline-scroll-logic.js +10 -1
- package/dist/components/Timeline/use-rename-sequence.js +2 -0
- package/dist/components/Timeline/use-sequence-freeze-frame-menu-item.js +2 -0
- package/dist/components/Timeline/use-timeline-asset-drop.d.ts +1 -0
- package/dist/components/Timeline/use-timeline-asset-drop.js +168 -0
- package/dist/components/composition-menu-items.d.ts +15 -1
- package/dist/components/composition-menu-items.js +137 -107
- package/dist/components/drop-handler-data.d.ts +13 -0
- package/dist/components/drop-handler-data.js +117 -0
- package/dist/components/handle-drop.d.ts +13 -0
- package/dist/components/handle-drop.js +115 -0
- package/dist/components/import-assets.d.ts +26 -8
- package/dist/components/import-assets.js +161 -49
- 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/components/selected-outline-drag.d.ts +11 -1
- package/dist/components/selected-outline-drag.js +74 -1
- package/dist/esm/{chunk-784jbkzs.js → chunk-5wj95bdd.js} +4760 -3701
- package/dist/esm/internals.mjs +4760 -3701
- package/dist/esm/previewEntry.mjs +4962 -3903
- package/dist/esm/renderEntry.mjs +1 -1
- package/dist/helpers/inject-css.js +4 -2
- package/dist/helpers/is-video-with-last-frame-hold.d.ts +2 -0
- package/dist/helpers/is-video-with-last-frame-hold.js +9 -0
- package/dist/helpers/url-state.d.ts +1 -0
- package/dist/helpers/url-state.js +5 -1
- package/dist/helpers/use-max-media-duration.js +5 -3
- package/dist/helpers/use-menu-structure.js +2 -0
- package/dist/icons/duplicate.d.ts +5 -0
- package/dist/icons/duplicate.js +10 -0
- package/dist/icons/scissors.js +1 -1
- package/dist/icons/snowflake.d.ts +5 -0
- package/dist/icons/snowflake.js +10 -0
- package/dist/icons/trash.d.ts +5 -0
- package/dist/icons/trash.js +8 -0
- package/package.json +11 -11
|
@@ -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;
|
|
@@ -4,9 +4,15 @@ exports.ConnectedCompositionsSection = exports.useConnectedCompositions = void 0
|
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("react");
|
|
6
6
|
const remotion_1 = require("remotion");
|
|
7
|
+
const client_id_1 = require("../../helpers/client-id");
|
|
7
8
|
const get_connected_compositions_1 = require("../../helpers/get-connected-compositions");
|
|
9
|
+
const noop_1 = require("../../helpers/noop");
|
|
10
|
+
const modals_1 = require("../../state/modals");
|
|
11
|
+
const composition_menu_items_1 = require("../composition-menu-items");
|
|
8
12
|
const CompositionOrStillIcon_1 = require("../CompositionOrStillIcon");
|
|
13
|
+
const ContextMenu_1 = require("../ContextMenu");
|
|
9
14
|
const InitialCompositionLoader_1 = require("../InitialCompositionLoader");
|
|
15
|
+
const use_resolved_stack_1 = require("../Timeline/use-resolved-stack");
|
|
10
16
|
const common_1 = require("./common");
|
|
11
17
|
const compositionIconStyle = {
|
|
12
18
|
height: 18,
|
|
@@ -17,6 +23,9 @@ const compositionListStyle = {
|
|
|
17
23
|
flexDirection: 'column',
|
|
18
24
|
padding: '6px 0',
|
|
19
25
|
};
|
|
26
|
+
const compositionContextMenuStyle = {
|
|
27
|
+
width: '100%',
|
|
28
|
+
};
|
|
20
29
|
const useConnectedCompositions = ({ track, }) => {
|
|
21
30
|
const { compositions } = (0, react_1.useContext)(remotion_1.Internals.CompositionManager);
|
|
22
31
|
return (0, react_1.useMemo)(() => (0, get_connected_compositions_1.getConnectedCompositions)({
|
|
@@ -26,7 +35,23 @@ const useConnectedCompositions = ({ track, }) => {
|
|
|
26
35
|
};
|
|
27
36
|
exports.useConnectedCompositions = useConnectedCompositions;
|
|
28
37
|
const ConnectedCompositionsSection = ({ connectedCompositions }) => {
|
|
29
|
-
|
|
30
|
-
return (jsx_runtime_1.jsx("div", { style: compositionListStyle, children: connectedCompositions.map((composition) => (jsx_runtime_1.jsx(common_1.InspectorInlineAction, { disabled: false, onClick: () => selectComposition(composition, true), renderIcon: (color) => (jsx_runtime_1.jsx(CompositionOrStillIcon_1.CompositionOrStillIcon, { color: color, composition: composition, style: compositionIconStyle })), children: composition.id }, composition.id))) }));
|
|
38
|
+
return (jsx_runtime_1.jsx("div", { style: compositionListStyle, children: connectedCompositions.map((composition) => (jsx_runtime_1.jsx(ConnectedCompositionRow, { composition: composition }, composition.id))) }));
|
|
31
39
|
};
|
|
32
40
|
exports.ConnectedCompositionsSection = ConnectedCompositionsSection;
|
|
41
|
+
const ConnectedCompositionRow = ({ composition }) => {
|
|
42
|
+
const selectComposition = (0, InitialCompositionLoader_1.useSelectComposition)();
|
|
43
|
+
const { setSelectedModal } = (0, react_1.useContext)(modals_1.ModalsContext);
|
|
44
|
+
const connectionStatus = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx)
|
|
45
|
+
.previewServerState.type;
|
|
46
|
+
const resolvedLocation = (0, use_resolved_stack_1.useResolvedStack)(composition.stack);
|
|
47
|
+
const contextMenuItems = (0, react_1.useMemo)(() => (0, composition_menu_items_1.getCompositionContextMenuItems)({
|
|
48
|
+
closeMenu: noop_1.noop,
|
|
49
|
+
composition,
|
|
50
|
+
connectionStatus,
|
|
51
|
+
includeCompositionManagementItems: false,
|
|
52
|
+
readOnlyStudio: window.remotion_isReadOnlyStudio,
|
|
53
|
+
resolvedLocation,
|
|
54
|
+
setSelectedModal,
|
|
55
|
+
}), [composition, connectionStatus, resolvedLocation, setSelectedModal]);
|
|
56
|
+
return (jsx_runtime_1.jsx(ContextMenu_1.ContextMenu, { values: contextMenuItems, onOpen: null, style: compositionContextMenuStyle, children: jsx_runtime_1.jsx(common_1.InspectorInlineAction, { disabled: false, onClick: () => selectComposition(composition, true), renderIcon: (color) => (jsx_runtime_1.jsx(CompositionOrStillIcon_1.CompositionOrStillIcon, { color: color, composition: composition, style: compositionIconStyle })), children: composition.id }) }));
|
|
57
|
+
};
|
|
@@ -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;
|
|
@@ -5,20 +5,34 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
5
5
|
const react_1 = require("react");
|
|
6
6
|
const remotion_1 = require("remotion");
|
|
7
7
|
const client_id_1 = require("../../helpers/client-id");
|
|
8
|
+
const interactivity_enabled_1 = require("../../helpers/interactivity-enabled");
|
|
9
|
+
const duplicate_1 = require("../../icons/duplicate");
|
|
8
10
|
const scissors_1 = require("../../icons/scissors");
|
|
11
|
+
const snowflake_1 = require("../../icons/snowflake");
|
|
12
|
+
const trash_1 = require("../../icons/trash");
|
|
13
|
+
const ConfirmationDialog_1 = require("../ConfirmationDialog");
|
|
9
14
|
const InspectorSequenceSection_1 = require("../InspectorSequenceSection");
|
|
10
15
|
const is_menu_item_1 = require("../Menu/is-menu-item");
|
|
16
|
+
const delete_selected_timeline_item_1 = require("../Timeline/delete-selected-timeline-item");
|
|
17
|
+
const duplicate_selected_timeline_item_1 = require("../Timeline/duplicate-selected-timeline-item");
|
|
11
18
|
const split_selected_timeline_item_1 = require("../Timeline/split-selected-timeline-item");
|
|
12
19
|
const TimelineSelection_1 = require("../Timeline/TimelineSelection");
|
|
20
|
+
const use_sequence_freeze_frame_menu_item_1 = require("../Timeline/use-sequence-freeze-frame-menu-item");
|
|
13
21
|
const AlignmentControls_1 = require("./AlignmentControls");
|
|
14
22
|
const common_1 = require("./common");
|
|
15
23
|
const ConnectedCompositionsSection_1 = require("./ConnectedCompositionsSection");
|
|
16
24
|
const SequenceInspectorHeader_1 = require("./SequenceInspectorHeader");
|
|
17
25
|
const styles_1 = require("./styles");
|
|
18
26
|
const use_track_for_selection_1 = require("./use-track-for-selection");
|
|
19
|
-
const
|
|
20
|
-
|
|
21
|
-
|
|
27
|
+
const actionIconStyle = {
|
|
28
|
+
display: 'block',
|
|
29
|
+
height: 16,
|
|
30
|
+
width: 16,
|
|
31
|
+
};
|
|
32
|
+
const largeActionIconStyle = {
|
|
33
|
+
...actionIconStyle,
|
|
34
|
+
height: 20,
|
|
35
|
+
width: 20,
|
|
22
36
|
};
|
|
23
37
|
const SplitSequenceAction = ({ selection, track }) => {
|
|
24
38
|
const timelinePosition = remotion_1.Internals.Timeline.useTimelinePosition();
|
|
@@ -30,19 +44,60 @@ const SplitSequenceAction = ({ selection, track }) => {
|
|
|
30
44
|
splitFrame: timelinePosition,
|
|
31
45
|
propStatuses: sequencePropStatuses,
|
|
32
46
|
}), [selection, sequencePropStatuses, timelinePosition, track.sequence]);
|
|
47
|
+
const canSplit = interactivity_enabled_1.studioInteractivityEnabled &&
|
|
48
|
+
sequencePropStatuses !== undefined &&
|
|
49
|
+
eligibility.canSplit;
|
|
33
50
|
const onSplit = (0, react_1.useCallback)(() => {
|
|
34
|
-
if (!eligibility.canSplit) {
|
|
51
|
+
if (!canSplit || !eligibility.canSplit) {
|
|
35
52
|
return;
|
|
36
53
|
}
|
|
37
54
|
(0, split_selected_timeline_item_1.splitTimelineSequenceFromSource)({
|
|
38
55
|
nodePathInfo: eligibility.nodePathInfo,
|
|
39
56
|
splitFrame: timelinePosition,
|
|
40
57
|
}).catch(() => undefined);
|
|
41
|
-
}, [eligibility, timelinePosition]);
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
58
|
+
}, [canSplit, eligibility, timelinePosition]);
|
|
59
|
+
const disabledReason = !interactivity_enabled_1.studioInteractivityEnabled
|
|
60
|
+
? 'Studio is read-only'
|
|
61
|
+
: sequencePropStatuses === undefined
|
|
62
|
+
? 'Waiting for sequence prop status'
|
|
63
|
+
: eligibility.canSplit
|
|
64
|
+
? undefined
|
|
65
|
+
: eligibility.reason;
|
|
66
|
+
return (jsx_runtime_1.jsx(common_1.InspectorInlineAction, { disabled: !canSplit, onClick: onSplit, title: disabledReason, renderIcon: (color) => (jsx_runtime_1.jsx(scissors_1.ScissorsIcon, { style: actionIconStyle, color: color })), children: "Split clip" }));
|
|
67
|
+
};
|
|
68
|
+
const SequenceSourceActions = ({ selection, track, validatedSource }) => {
|
|
69
|
+
const timelinePosition = remotion_1.Internals.Timeline.useTimelinePosition();
|
|
70
|
+
const { previewServerState } = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx);
|
|
71
|
+
const { propStatuses } = (0, react_1.useContext)(remotion_1.Internals.VisualModePropStatusesContext);
|
|
72
|
+
const { setPropStatuses } = (0, react_1.useContext)(remotion_1.Internals.VisualModeSettersContext);
|
|
73
|
+
const confirm = (0, ConfirmationDialog_1.useConfirmationDialog)();
|
|
74
|
+
const propStatusesForOverride = (0, react_1.useMemo)(() => remotion_1.Internals.getPropStatusesCtx(propStatuses, selection.nodePathInfo.sequenceSubscriptionKey), [propStatuses, selection.nodePathInfo.sequenceSubscriptionKey]);
|
|
75
|
+
const freezeFrameMenuItem = (0, use_sequence_freeze_frame_menu_item_1.useSequenceFreezeFrameMenuItem)({
|
|
76
|
+
clientId: previewServerState.type === 'connected' && interactivity_enabled_1.studioInteractivityEnabled
|
|
77
|
+
? previewServerState.clientId
|
|
78
|
+
: null,
|
|
79
|
+
nodePath: selection.nodePathInfo.sequenceSubscriptionKey,
|
|
80
|
+
propStatusesForOverride,
|
|
81
|
+
sequence: track.sequence,
|
|
82
|
+
sequenceFrameOffset: track.sequenceFrameOffset,
|
|
83
|
+
setPropStatuses,
|
|
84
|
+
timelinePosition,
|
|
85
|
+
validatedSource,
|
|
86
|
+
});
|
|
87
|
+
const sourceActionsDisabled = previewServerState.type !== 'connected' || !interactivity_enabled_1.studioInteractivityEnabled;
|
|
88
|
+
const onDuplicate = (0, react_1.useCallback)(() => {
|
|
89
|
+
if (sourceActionsDisabled) {
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
(0, duplicate_selected_timeline_item_1.duplicateSequencesFromSource)([selection.nodePathInfo], confirm).catch(() => undefined);
|
|
93
|
+
}, [confirm, selection.nodePathInfo, sourceActionsDisabled]);
|
|
94
|
+
const onDelete = (0, react_1.useCallback)(() => {
|
|
95
|
+
if (sourceActionsDisabled) {
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
98
|
+
(0, delete_selected_timeline_item_1.deleteSequencesFromSource)([selection.nodePathInfo], confirm).catch(() => undefined);
|
|
99
|
+
}, [confirm, selection.nodePathInfo, sourceActionsDisabled]);
|
|
100
|
+
return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [(freezeFrameMenuItem === null || freezeFrameMenuItem === void 0 ? void 0 : freezeFrameMenuItem.type) === 'item' ? (jsx_runtime_1.jsx(common_1.InspectorInlineAction, { disabled: Boolean(freezeFrameMenuItem.disabled), onClick: () => freezeFrameMenuItem.onClick(freezeFrameMenuItem.id, null), renderIcon: (color) => (jsx_runtime_1.jsx(snowflake_1.SnowflakeIcon, { style: largeActionIconStyle, color: color })), children: freezeFrameMenuItem.label })) : null, jsx_runtime_1.jsx(common_1.InspectorInlineAction, { disabled: sourceActionsDisabled, onClick: onDuplicate, renderIcon: (color) => (jsx_runtime_1.jsx(duplicate_1.DuplicateIcon, { style: largeActionIconStyle, color: color })), children: "Duplicate" }), jsx_runtime_1.jsx(common_1.InspectorInlineAction, { disabled: sourceActionsDisabled, onClick: onDelete, renderIcon: (color) => (jsx_runtime_1.jsx(trash_1.TrashIcon, { style: actionIconStyle, color: color })), children: "Delete" })] }));
|
|
46
101
|
};
|
|
47
102
|
const SequenceExpandedInspector = ({ track }) => {
|
|
48
103
|
const { previewServerState } = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx);
|
|
@@ -88,7 +143,9 @@ const SequenceExpandedInspector = ({ track }) => {
|
|
|
88
143
|
return (jsx_runtime_1.jsxs("div", { style: styles_1.selectedContainer, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, onPointerDown: selectSequenceOnInspectorPointerDown, children: [
|
|
89
144
|
jsx_runtime_1.jsx(SequenceInspectorHeader_1.SequenceInspectorHeader, { sourceLocation: sourceLocation, track: track }), connectedCompositions.length > 0 ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
90
145
|
jsx_runtime_1.jsx(common_1.InspectorSectionDivider, {}), jsx_runtime_1.jsx(ConnectedCompositionsSection_1.ConnectedCompositionsSection, { connectedCompositions: connectedCompositions })
|
|
91
|
-
] })) : null, jsx_runtime_1.jsx(InspectorSequenceSection_1.InspectorSequenceSection, { sequence: track.sequence, validatedLocation: validatedLocation, nodePathInfo: track.nodePathInfo, keyframeDisplayOffset: track.keyframeDisplayOffset, renderTransformControls: () => jsx_runtime_1.jsx(AlignmentControls_1.AlignmentControls, { track: track }) }), jsx_runtime_1.
|
|
146
|
+
] })) : null, jsx_runtime_1.jsx(InspectorSequenceSection_1.InspectorSequenceSection, { sequence: track.sequence, validatedLocation: validatedLocation, nodePathInfo: track.nodePathInfo, keyframeDisplayOffset: track.keyframeDisplayOffset, renderTransformControls: () => jsx_runtime_1.jsx(AlignmentControls_1.AlignmentControls, { track: track }) }), jsx_runtime_1.jsxs(common_1.InspectorActionSection, { children: [
|
|
147
|
+
jsx_runtime_1.jsx(SplitSequenceAction, { selection: sequenceSelection, track: track }), jsx_runtime_1.jsx(SequenceSourceActions, { selection: sequenceSelection, track: track, validatedSource: validatedLocation.source })
|
|
148
|
+
] })
|
|
92
149
|
] }));
|
|
93
150
|
};
|
|
94
151
|
const SequenceSelectionInspector = ({ selection }) => {
|
|
@@ -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;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.keyframeEditorValue = exports.
|
|
3
|
+
exports.keyframeEditorValue = exports.keyframeEditorRow = exports.detailValue = exports.detailLabel = exports.detailRow = exports.guideDetailsContainer = exports.detailsBeforeInlineAction = exports.inspectorActionSection = 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.inspectorSectionDivider = 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
6
|
exports.container = {
|
|
@@ -50,31 +50,6 @@ exports.inspectorSectionBody = {
|
|
|
50
50
|
minWidth: 0,
|
|
51
51
|
paddingBottom: 8,
|
|
52
52
|
};
|
|
53
|
-
exports.sequenceHeader = {
|
|
54
|
-
backgroundColor: colors_1.BACKGROUND,
|
|
55
|
-
display: 'flex',
|
|
56
|
-
flexDirection: 'column',
|
|
57
|
-
minWidth: 0,
|
|
58
|
-
padding: `6px ${InspectorPanelLayout_1.INSPECTOR_PANEL_HORIZONTAL_PADDING}px 4px`,
|
|
59
|
-
};
|
|
60
|
-
exports.sequenceHeaderTitle = {
|
|
61
|
-
alignSelf: 'stretch',
|
|
62
|
-
backgroundColor: colors_1.BACKGROUND,
|
|
63
|
-
border: 'none',
|
|
64
|
-
color: colors_1.WHITE,
|
|
65
|
-
display: 'flex',
|
|
66
|
-
fontFamily: 'sans-serif',
|
|
67
|
-
fontSize: 12,
|
|
68
|
-
lineHeight: '18px',
|
|
69
|
-
margin: 0,
|
|
70
|
-
maxWidth: '100%',
|
|
71
|
-
minWidth: 0,
|
|
72
|
-
overflow: 'hidden',
|
|
73
|
-
padding: 0,
|
|
74
|
-
textAlign: 'left',
|
|
75
|
-
textOverflow: 'ellipsis',
|
|
76
|
-
whiteSpace: 'nowrap',
|
|
77
|
-
};
|
|
78
53
|
exports.sequenceHeaderSubtitle = {
|
|
79
54
|
alignSelf: 'flex-start',
|
|
80
55
|
backgroundColor: colors_1.BACKGROUND,
|
|
@@ -182,6 +157,10 @@ exports.detailRow = {
|
|
|
182
157
|
exports.detailLabel = {
|
|
183
158
|
color: colors_1.LIGHT_TEXT,
|
|
184
159
|
fontSize: 13,
|
|
160
|
+
minWidth: 0,
|
|
161
|
+
overflow: 'hidden',
|
|
162
|
+
textOverflow: 'ellipsis',
|
|
163
|
+
whiteSpace: 'nowrap',
|
|
185
164
|
};
|
|
186
165
|
exports.detailValue = {
|
|
187
166
|
color: colors_1.WHITE,
|
|
@@ -192,22 +171,8 @@ exports.detailValue = {
|
|
|
192
171
|
wordBreak: 'break-word',
|
|
193
172
|
};
|
|
194
173
|
exports.keyframeEditorRow = {
|
|
195
|
-
alignItems: 'flex-start',
|
|
196
|
-
display: 'flex',
|
|
197
|
-
gap: 12,
|
|
198
|
-
justifyContent: 'space-between',
|
|
199
|
-
minWidth: 0,
|
|
200
174
|
padding: '10px 0',
|
|
201
175
|
};
|
|
202
|
-
exports.keyframeEditorLabel = {
|
|
203
|
-
color: colors_1.LIGHT_TEXT,
|
|
204
|
-
fontSize: 13,
|
|
205
|
-
lineHeight: '22px',
|
|
206
|
-
minWidth: 0,
|
|
207
|
-
overflow: 'hidden',
|
|
208
|
-
textOverflow: 'ellipsis',
|
|
209
|
-
whiteSpace: 'nowrap',
|
|
210
|
-
};
|
|
211
176
|
exports.keyframeEditorValue = {
|
|
212
177
|
alignItems: 'center',
|
|
213
178
|
display: 'flex',
|
|
@@ -57,6 +57,7 @@ const useCompositionActions = () => {
|
|
|
57
57
|
const result = await (0, call_api_1.callApi)('/api/insert-jsx-element', {
|
|
58
58
|
compositionFile,
|
|
59
59
|
compositionId: currentCompositionId,
|
|
60
|
+
from: null,
|
|
60
61
|
element: {
|
|
61
62
|
type: 'solid',
|
|
62
63
|
width: videoConfig.width,
|
|
@@ -80,7 +81,8 @@ const useCompositionActions = () => {
|
|
|
80
81
|
const insertAsset = (0, react_1.useCallback)(async () => {
|
|
81
82
|
if (!canInsertAsset ||
|
|
82
83
|
currentCompositionId === null ||
|
|
83
|
-
compositionFile === null
|
|
84
|
+
compositionFile === null ||
|
|
85
|
+
videoConfig === null) {
|
|
84
86
|
return;
|
|
85
87
|
}
|
|
86
88
|
const files = await (0, import_assets_1.pickFilesToImport)();
|
|
@@ -91,17 +93,19 @@ const useCompositionActions = () => {
|
|
|
91
93
|
try {
|
|
92
94
|
await (0, import_assets_1.importAssets)({
|
|
93
95
|
files,
|
|
96
|
+
fps: videoConfig.fps,
|
|
94
97
|
compositionFile,
|
|
95
98
|
compositionId: currentCompositionId,
|
|
96
99
|
destinationDimensions: null,
|
|
97
100
|
dropPosition: null,
|
|
101
|
+
from: null,
|
|
98
102
|
svgImportMode: 'image',
|
|
99
103
|
});
|
|
100
104
|
}
|
|
101
105
|
finally {
|
|
102
106
|
setIsAddingAsset(false);
|
|
103
107
|
}
|
|
104
|
-
}, [canInsertAsset, compositionFile, currentCompositionId]);
|
|
108
|
+
}, [canInsertAsset, compositionFile, currentCompositionId, videoConfig]);
|
|
105
109
|
return {
|
|
106
110
|
canInsertAsset,
|
|
107
111
|
canInsertSolid,
|