@remotion/studio 4.0.515 → 4.0.516
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/api/restart-studio.js +4 -0
- package/dist/components/AssetSelector.js +3 -9
- package/dist/components/AssetSelectorItem.d.ts +2 -1
- package/dist/components/AssetSelectorItem.js +24 -29
- package/dist/components/Canvas.js +7 -4
- package/dist/components/CaptionInspector.d.ts +2 -0
- package/dist/components/CaptionInspector.js +3 -5
- package/dist/components/CompositionSelector.js +6 -3
- package/dist/components/CompositionSelectorItem.js +9 -10
- package/dist/components/ConfigSelect.d.ts +17 -0
- package/dist/components/ConfigSelect.js +50 -0
- package/dist/components/CurrentAsset.d.ts +10 -2
- package/dist/components/CurrentAsset.js +139 -46
- package/dist/components/FixComputedValueModal.js +54 -51
- package/dist/components/GlobalKeybindings.js +5 -5
- package/dist/components/InlineAction.d.ts +1 -1
- package/dist/components/InlineAction.js +12 -2
- package/dist/components/InlineCaptionInspector.d.ts +2 -0
- package/dist/components/InlineCaptionInspector.js +2 -2
- package/dist/components/InlineCompositionName.js +1 -1
- package/dist/components/InlineEditableTitle.js +3 -2
- package/dist/components/InspectorInfoHeader.js +1 -1
- package/dist/components/InspectorOpenInEditor.js +48 -72
- package/dist/components/InspectorPanel/AlignmentControls.js +2 -3
- package/dist/components/InspectorPanel/CollapsibleInspectorSectionHeader.d.ts +7 -0
- package/dist/components/InspectorPanel/CollapsibleInspectorSectionHeader.js +39 -0
- package/dist/components/InspectorPanel/CompositionInspector.js +14 -7
- package/dist/components/InspectorPanel/KeyframeEasingNavigator.js +10 -4
- package/dist/components/InspectorPanel/SequenceInspectorHeader.js +2 -1
- package/dist/components/InspectorPanel/SequenceSelectionInspector.js +1 -4
- package/dist/components/InspectorPanel/common.d.ts +0 -12
- package/dist/components/InspectorPanel/common.js +3 -52
- package/dist/components/InspectorPanel/use-composition-actions.js +0 -1
- package/dist/components/InspectorPanelLayout.d.ts +1 -1
- package/dist/components/InspectorPanelLayout.js +1 -1
- package/dist/components/InspectorSequenceSection.js +40 -54
- package/dist/components/InstallPackage.d.ts +2 -1
- package/dist/components/InstallPackage.js +60 -30
- package/dist/components/InstallablePackage.js +37 -11
- package/dist/components/KeyboardShortcutsSettings.d.ts +2 -0
- package/dist/components/KeyboardShortcutsSettings.js +177 -0
- package/dist/components/MenuBuildIndicator.js +1 -1
- package/dist/components/Modals.js +6 -5
- package/dist/components/NewComposition/CodemodFooter.d.ts +0 -1
- package/dist/components/NewComposition/CodemodFooter.js +2 -8
- package/dist/components/NewComposition/DeleteComposition.js +1 -1
- package/dist/components/NewComposition/DeleteFolder.js +1 -1
- package/dist/components/NewComposition/DuplicateComposition.js +1 -1
- package/dist/components/NewComposition/InputDragger.js +27 -4
- package/dist/components/NewComposition/NewComposition.js +1 -1
- package/dist/components/NewComposition/NewFolder.js +1 -3
- package/dist/components/NewComposition/RenameComposition.js +1 -1
- package/dist/components/NewComposition/RenameFolder.js +1 -1
- package/dist/components/NewComposition/use-rename-static-file.js +1 -1
- package/dist/components/Notifications/NotificationCenter.d.ts +1 -0
- package/dist/components/Notifications/NotificationCenter.js +5 -0
- package/dist/components/OptionsPanel.js +9 -12
- package/dist/components/PreviewToolbar.js +5 -2
- package/dist/components/PreviewToolbarOverflowButton.js +30 -0
- package/dist/components/QuickSwitcher/ExplorerQuickSwitcherTrigger.js +2 -2
- package/dist/components/QuickSwitcher/QuickSwitcherContent.js +14 -30
- package/dist/components/RenderButton.js +66 -183
- package/dist/components/RenderModal/DataEditor.js +15 -12
- package/dist/components/RenderModal/RenderStatusModal.js +0 -1
- package/dist/components/RenderModal/SchemaEditor/ZodSwitch.js +3 -1
- package/dist/components/RenderModal/SchemaEditor/infer-zod-schema-from-value.d.ts +15 -0
- package/dist/components/RenderModal/SchemaEditor/infer-zod-schema-from-value.js +95 -0
- package/dist/components/RenderQueue/RenderQueueRemoveItem.js +1 -6
- package/dist/components/RenderingSettings.js +7 -4
- package/dist/components/RulersAndGuidesToggle.d.ts +2 -0
- package/dist/components/RulersAndGuidesToggle.js +23 -0
- package/dist/components/SegmentedButton.d.ts +29 -0
- package/dist/components/SegmentedButton.js +226 -0
- package/dist/components/SelectedOutlineEditingHandles.d.ts +16 -0
- package/dist/components/SelectedOutlineEditingHandles.js +66 -0
- package/dist/components/SelectedOutlineElement.d.ts +2 -4
- package/dist/components/SelectedOutlineElement.js +15 -54
- package/dist/components/SelectedOutlineOverlay.js +32 -6
- package/dist/components/SelectedOutlinePolygon.d.ts +3 -4
- package/dist/components/SelectedOutlinePolygon.js +18 -16
- package/dist/components/SelectedOutlineRenderer.js +66 -14
- package/dist/components/SettingsModal.d.ts +1 -1
- package/dist/components/SettingsModal.js +30 -7
- package/dist/components/SettingsModalFooter.js +2 -1
- package/dist/components/SkillsSettings.d.ts +2 -0
- package/dist/components/SkillsSettings.js +129 -0
- package/dist/components/StaticFilePreview.js +7 -1
- package/dist/components/StudioSettings.js +7 -48
- package/dist/components/Tabs/index.js +1 -1
- package/dist/components/Timeline/Timeline.js +0 -1
- package/dist/components/Timeline/TimelineAssetField.d.ts +1 -1
- package/dist/components/Timeline/TimelineAssetField.js +15 -9
- package/dist/components/Timeline/TimelineBooleanField.js +1 -4
- package/dist/components/Timeline/TimelineClipboardKeybindings.js +7 -10
- package/dist/components/Timeline/TimelineEffectItem.d.ts +1 -0
- package/dist/components/Timeline/TimelineEffectItem.js +23 -10
- package/dist/components/Timeline/TimelineEffectPropItem.js +15 -2
- package/dist/components/Timeline/TimelineExpandedRow.js +5 -4
- package/dist/components/Timeline/TimelineFieldLabel.js +4 -2
- package/dist/components/Timeline/TimelineFieldRowContent.d.ts +1 -2
- package/dist/components/Timeline/TimelineFieldRowContent.js +8 -21
- package/dist/components/Timeline/TimelineImageInfo.d.ts +0 -1
- package/dist/components/Timeline/TimelineImageInfo.js +13 -32
- package/dist/components/Timeline/TimelineKeyframeControls.js +10 -4
- package/dist/components/Timeline/TimelinePrimitiveFieldValue.js +1 -1
- package/dist/components/Timeline/TimelineRotationField.js +0 -2
- package/dist/components/Timeline/TimelineRowChrome.d.ts +0 -1
- package/dist/components/Timeline/TimelineRowChrome.js +3 -4
- package/dist/components/Timeline/TimelineRowLayoutContext.d.ts +0 -1
- package/dist/components/Timeline/TimelineRowLayoutContext.js +1 -4
- package/dist/components/Timeline/TimelineScaleField.js +2 -6
- package/dist/components/Timeline/TimelineSchemaField.js +9 -3
- package/dist/components/Timeline/TimelineSelection.js +1 -1
- package/dist/components/Timeline/TimelineSequence.d.ts +2 -0
- package/dist/components/Timeline/TimelineSequence.js +110 -19
- package/dist/components/Timeline/TimelineSequenceItem.js +5 -5
- package/dist/components/Timeline/TimelineSequencePropItem.js +15 -2
- package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.d.ts +4 -2
- package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.js +85 -91
- package/dist/components/Timeline/TimelineTrack.js +1 -1
- package/dist/components/Timeline/TimelineTransformOriginField.js +0 -4
- package/dist/components/Timeline/TimelineTranslateField.js +0 -4
- package/dist/components/Timeline/TimelineVirtualization.js +3 -1
- package/dist/components/Timeline/duplicate-selected-timeline-item.js +3 -12
- package/dist/components/Timeline/get-copy-context-for-agents-menu-item.d.ts +4 -0
- package/dist/components/Timeline/get-copy-context-for-agents-menu-item.js +26 -0
- package/dist/components/Timeline/get-sequence-context-menu-items.js +2 -19
- package/dist/components/Timeline/get-timeline-sequence-visible-layout.d.ts +6 -1
- package/dist/components/Timeline/get-timeline-sequence-visible-layout.js +11 -4
- package/dist/components/Timeline/split-selected-timeline-item.js +0 -1
- package/dist/components/Timeline/timeline-field-row-layout.d.ts +1 -1
- package/dist/components/Timeline/timeline-field-row-layout.js +4 -7
- package/dist/components/Timeline/timeline-field-utils.js +0 -2
- package/dist/components/Timeline/use-timeline-asset-drop.js +1 -0
- package/dist/components/TimelineCombobox.js +25 -160
- package/dist/components/TimelineInOutToggle.js +4 -1
- package/dist/components/duplicate-jsx-node-api.d.ts +2 -0
- package/dist/components/duplicate-jsx-node-api.js +12 -0
- package/dist/components/effect-drag-and-drop.js +1 -4
- package/dist/components/handle-drop.d.ts +2 -1
- package/dist/components/handle-drop.js +3 -3
- package/dist/components/import-assets.js +9 -65
- package/dist/components/keyboard-shortcuts.d.ts +10 -0
- package/dist/components/keyboard-shortcuts.js +135 -0
- package/dist/components/selected-outline-control-layout.js +2 -6
- package/dist/components/selected-outline-measurement.d.ts +1 -1
- package/dist/components/selected-outline-measurement.js +16 -3
- package/dist/components/use-delete-asset.d.ts +1 -0
- package/dist/components/use-delete-asset.js +40 -0
- package/dist/components/use-selected-outline-control-target.d.ts +11 -0
- package/dist/components/use-selected-outline-control-target.js +79 -0
- package/dist/esm/{chunk-s6k99gh2.js → chunk-4bxz1d3g.js} +3 -2
- package/dist/esm/{chunk-v5a8vpv4.js → chunk-w4244j4n.js} +17766 -17618
- package/dist/esm/index.mjs +3 -0
- package/dist/esm/internals.mjs +17765 -17617
- package/dist/esm/previewEntry.mjs +17570 -17422
- package/dist/esm/renderEntry.mjs +2 -2
- package/dist/helpers/add-asset-cache-bust.d.ts +4 -0
- package/dist/helpers/add-asset-cache-bust.js +10 -0
- package/dist/helpers/calculate-timeline.js +2 -1
- package/dist/helpers/colors.d.ts +2 -0
- package/dist/helpers/colors.js +6 -2
- package/dist/helpers/drag-aware-double-click.d.ts +6 -0
- package/dist/helpers/drag-aware-double-click.js +20 -0
- package/dist/helpers/get-asset-metadata.js +25 -16
- package/dist/helpers/get-sequence-double-click-action.d.ts +2 -1
- package/dist/helpers/get-sequence-double-click-action.js +7 -1
- package/dist/helpers/get-timeline-sequence-layout.d.ts +4 -1
- package/dist/helpers/get-timeline-sequence-layout.js +15 -6
- package/dist/helpers/get-timeline-sequence-sort-key.d.ts +2 -1
- package/dist/helpers/hoverable.d.ts +1 -0
- package/dist/helpers/hoverable.js +2 -1
- package/dist/helpers/inject-css.js +3 -1
- package/dist/helpers/open-in-remotion-convert.d.ts +7 -0
- package/dist/helpers/open-in-remotion-convert.js +18 -0
- package/dist/helpers/use-media-metadata.d.ts +2 -1
- package/dist/helpers/use-media-metadata.js +12 -5
- package/dist/helpers/use-menu-structure.js +32 -32
- package/dist/icons/align-center-horizontal.js +1 -1
- package/dist/icons/align-left.js +1 -1
- package/dist/icons/align-right.js +1 -1
- package/dist/icons/keyboard.d.ts +4 -0
- package/dist/icons/keyboard.js +10 -0
- package/dist/icons/license.d.ts +4 -0
- package/dist/icons/license.js +8 -0
- package/dist/icons/package.d.ts +4 -0
- package/dist/icons/package.js +8 -0
- package/dist/icons/react.js +1 -1
- package/dist/icons/remotion-convert.d.ts +4 -0
- package/dist/icons/remotion-convert.js +10 -0
- package/dist/icons/skills.d.ts +4 -0
- package/dist/icons/skills.js +10 -0
- package/dist/state/modals.d.ts +2 -5
- package/package.json +12 -12
- package/dist/components/KeyboardShortcutsExplainer.d.ts +0 -2
- package/dist/components/KeyboardShortcutsExplainer.js +0 -194
|
@@ -153,7 +153,6 @@ const TimelineContextMenuArea = ({ children }) => {
|
|
|
153
153
|
? await browserStudioOperations.insertSolid(request)
|
|
154
154
|
: await (0, call_api_1.callApi)('/api/insert-jsx-element', request);
|
|
155
155
|
if (result.success) {
|
|
156
|
-
(0, NotificationCenter_1.showNotification)('Added <Solid> to source file', 2000);
|
|
157
156
|
return;
|
|
158
157
|
}
|
|
159
158
|
(0, NotificationCenter_1.showNotification)(result.reason, 4000);
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { type CanUpdateSequencePropStatusStatic } from 'remotion';
|
|
3
3
|
import type { SchemaFieldInfo, TimelineFieldOnDragValueChange, TimelineFieldOnSave } from '../../helpers/timeline-layout';
|
|
4
4
|
import { type InspectorQuickActionProps } from '../InspectorPanel/common';
|
|
5
|
-
export type InspectorSourceAction =
|
|
5
|
+
export type InspectorSourceAction = InspectorQuickActionProps;
|
|
6
6
|
type AssetSelectionContextValue = {
|
|
7
7
|
readonly initialQuery: string;
|
|
8
8
|
readonly getSourceAction: (src: string) => InspectorSourceAction | null;
|
|
@@ -18,6 +18,19 @@ const penIcon = {
|
|
|
18
18
|
height: 14,
|
|
19
19
|
width: 14,
|
|
20
20
|
};
|
|
21
|
+
const sourceActions = {
|
|
22
|
+
alignItems: 'center',
|
|
23
|
+
display: 'flex',
|
|
24
|
+
flex: 1,
|
|
25
|
+
gap: 4,
|
|
26
|
+
minWidth: 0,
|
|
27
|
+
};
|
|
28
|
+
const standaloneSourceActionStyle = {
|
|
29
|
+
flex: 1,
|
|
30
|
+
margin: 0,
|
|
31
|
+
minWidth: 0,
|
|
32
|
+
width: 'auto',
|
|
33
|
+
};
|
|
21
34
|
exports.AssetSelectionContext = (0, react_1.createContext)({
|
|
22
35
|
getSourceAction: () => null,
|
|
23
36
|
initialQuery: '',
|
|
@@ -100,14 +113,7 @@ const TimelineAssetField = ({ field, effectiveValue, propStatus, onSave, onDragV
|
|
|
100
113
|
if (inlineSourceAction === null) {
|
|
101
114
|
return action;
|
|
102
115
|
}
|
|
103
|
-
return (jsx_runtime_1.
|
|
104
|
-
|
|
105
|
-
trailing: {
|
|
106
|
-
disabled: window.remotion_isReadOnlyStudio,
|
|
107
|
-
onClick: openAssetSelection,
|
|
108
|
-
renderIcon: (color) => jsx_runtime_1.jsx(pen_1.PenIcon, { color: color, style: penIcon }),
|
|
109
|
-
title: 'Change source',
|
|
110
|
-
},
|
|
111
|
-
} }));
|
|
116
|
+
return (jsx_runtime_1.jsxs("div", { style: sourceActions, children: [
|
|
117
|
+
jsx_runtime_1.jsx(common_1.InspectorQuickAction, { ...inlineSourceAction, size: "compact", style: standaloneSourceActionStyle }), action] }));
|
|
112
118
|
};
|
|
113
119
|
exports.TimelineAssetField = TimelineAssetField;
|
|
@@ -4,9 +4,6 @@ exports.TimelineBooleanField = void 0;
|
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("react");
|
|
6
6
|
const Checkbox_1 = require("../Checkbox");
|
|
7
|
-
const checkboxContainer = {
|
|
8
|
-
marginLeft: 8,
|
|
9
|
-
};
|
|
10
7
|
const TimelineBooleanField = ({ field, propStatus, effectiveValue, onSave }) => {
|
|
11
8
|
const checked = Boolean(effectiveValue);
|
|
12
9
|
const onChange = (0, react_1.useCallback)(() => {
|
|
@@ -15,6 +12,6 @@ const TimelineBooleanField = ({ field, propStatus, effectiveValue, onSave }) =>
|
|
|
15
12
|
onSave(newValue);
|
|
16
13
|
}
|
|
17
14
|
}, [propStatus, onSave, checked]);
|
|
18
|
-
return (jsx_runtime_1.jsx(
|
|
15
|
+
return (jsx_runtime_1.jsx(Checkbox_1.Checkbox, { checked: checked, onChange: onChange, name: field.key, disabled: false, variant: "small" }));
|
|
19
16
|
};
|
|
20
17
|
exports.TimelineBooleanField = TimelineBooleanField;
|
|
@@ -792,9 +792,9 @@ const TimelineClipboardKeybindings = () => {
|
|
|
792
792
|
? 'Reapply property paste onto selected sequences'
|
|
793
793
|
: 'Reapply property paste',
|
|
794
794
|
}).then(() => {
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
795
|
+
if (sequencePropTarget.targets.length > 1) {
|
|
796
|
+
(0, NotificationCenter_1.showNotification)('Pasted property onto selected sequences', 2000);
|
|
797
|
+
}
|
|
798
798
|
});
|
|
799
799
|
}
|
|
800
800
|
const effectPropResult = (0, studio_shared_1.parseEffectPropClipboardDataResult)(text);
|
|
@@ -859,9 +859,9 @@ const TimelineClipboardKeybindings = () => {
|
|
|
859
859
|
? 'Reapply effect prop paste onto selected effects'
|
|
860
860
|
: 'Reapply effect prop paste',
|
|
861
861
|
}).then(() => {
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
862
|
+
if (effectPropTarget.targets.length > 1) {
|
|
863
|
+
(0, NotificationCenter_1.showNotification)('Pasted effect prop onto selected effects', 2000);
|
|
864
|
+
}
|
|
865
865
|
});
|
|
866
866
|
}
|
|
867
867
|
const result = envelope === null
|
|
@@ -904,10 +904,7 @@ const TimelineClipboardKeybindings = () => {
|
|
|
904
904
|
clientId,
|
|
905
905
|
insertAtIndices,
|
|
906
906
|
}).then((pasteResult) => {
|
|
907
|
-
if (pasteResult.success) {
|
|
908
|
-
(0, NotificationCenter_1.showNotification)('Pasted effects', 2000);
|
|
909
|
-
}
|
|
910
|
-
else {
|
|
907
|
+
if (!pasteResult.success) {
|
|
911
908
|
(0, NotificationCenter_1.showNotification)(pasteResult.reason, 4000);
|
|
912
909
|
}
|
|
913
910
|
});
|
|
@@ -12,6 +12,7 @@ export declare const TimelineEffectItem: React.FC<{
|
|
|
12
12
|
readonly nodePath: SequencePropsSubscriptionKey;
|
|
13
13
|
readonly validatedLocation: CodePosition;
|
|
14
14
|
readonly rowDepth: number;
|
|
15
|
+
readonly labelNextToToggle: boolean;
|
|
15
16
|
readonly getIsExpanded: GetIsExpanded;
|
|
16
17
|
readonly toggleTrack: (nodePathInfo: SequenceNodePathInfo) => void;
|
|
17
18
|
}>;
|
|
@@ -7,10 +7,12 @@ const remotion_1 = require("remotion");
|
|
|
7
7
|
const browser_studio_operations_1 = require("../../helpers/browser-studio-operations");
|
|
8
8
|
const client_id_1 = require("../../helpers/client-id");
|
|
9
9
|
const colors_1 = require("../../helpers/colors");
|
|
10
|
+
const format_file_location_1 = require("../../helpers/format-file-location");
|
|
10
11
|
const timeline_layout_1 = require("../../helpers/timeline-layout");
|
|
11
12
|
const ContextMenu_1 = require("../ContextMenu");
|
|
12
13
|
const effect_operations_api_1 = require("../effect-operations-api");
|
|
13
14
|
const NotificationCenter_1 = require("../Notifications/NotificationCenter");
|
|
15
|
+
const get_copy_context_for_agents_menu_item_1 = require("./get-copy-context-for-agents-menu-item");
|
|
14
16
|
const save_effect_prop_1 = require("./save-effect-prop");
|
|
15
17
|
const TimelineExpandArrowButton_1 = require("./TimelineExpandArrowButton");
|
|
16
18
|
const TimelineLayerEye_1 = require("./TimelineLayerEye");
|
|
@@ -73,7 +75,7 @@ const getEffectReorderDragData = (dataTransfer) => {
|
|
|
73
75
|
const getDestinationIndex = ({ fromIndex, insertionIndex, }) => {
|
|
74
76
|
return insertionIndex > fromIndex ? insertionIndex - 1 : insertionIndex;
|
|
75
77
|
};
|
|
76
|
-
const TimelineEffectItem = ({ label, nodePathInfo, effectIndex, effectSchema, documentationLink, nodePath, validatedLocation, rowDepth, getIsExpanded, toggleTrack, }) => {
|
|
78
|
+
const TimelineEffectItem = ({ label, nodePathInfo, effectIndex, effectSchema, documentationLink, nodePath, validatedLocation, rowDepth, labelNextToToggle, getIsExpanded, toggleTrack, }) => {
|
|
77
79
|
var _a;
|
|
78
80
|
var _b;
|
|
79
81
|
const { previewServerState } = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx);
|
|
@@ -130,13 +132,25 @@ const TimelineEffectItem = ({ label, nodePathInfo, effectIndex, effectSchema, do
|
|
|
130
132
|
}
|
|
131
133
|
}, [deleteDisabled, effectIndex, nodePath, validatedLocation.source]);
|
|
132
134
|
const getContextMenuItems = (0, react_1.useCallback)(() => {
|
|
133
|
-
if (!previewConnected) {
|
|
134
|
-
return [];
|
|
135
|
-
}
|
|
136
135
|
if (selection.selectable) {
|
|
137
136
|
selection.onSelect({ shiftKey: false, toggleKey: false });
|
|
138
137
|
}
|
|
139
|
-
const items = [
|
|
138
|
+
const items = [
|
|
139
|
+
(0, get_copy_context_for_agents_menu_item_1.getCopyContextForAgentsMenuItem)({
|
|
140
|
+
contextForAgents: (0, format_file_location_1.formatContextForAgents)({
|
|
141
|
+
location: validatedLocation,
|
|
142
|
+
name: `Effect "${label}"`,
|
|
143
|
+
root: window.remotion_cwd,
|
|
144
|
+
}),
|
|
145
|
+
}),
|
|
146
|
+
];
|
|
147
|
+
if (!previewConnected) {
|
|
148
|
+
return items;
|
|
149
|
+
}
|
|
150
|
+
items.push({
|
|
151
|
+
type: 'divider',
|
|
152
|
+
id: 'copy-context-for-agents-divider',
|
|
153
|
+
});
|
|
140
154
|
if (documentationLink) {
|
|
141
155
|
items.push({
|
|
142
156
|
type: 'item',
|
|
@@ -178,9 +192,11 @@ const TimelineEffectItem = ({ label, nodePathInfo, effectIndex, effectSchema, do
|
|
|
178
192
|
}, [
|
|
179
193
|
deleteDisabled,
|
|
180
194
|
documentationLink,
|
|
195
|
+
label,
|
|
181
196
|
onDeleteEffectFromSource,
|
|
182
197
|
previewConnected,
|
|
183
198
|
selection,
|
|
199
|
+
validatedLocation,
|
|
184
200
|
]);
|
|
185
201
|
const onToggle = (0, react_1.useCallback)((type) => {
|
|
186
202
|
if (!canToggle || previewServerState.type !== 'connected') {
|
|
@@ -310,10 +326,7 @@ const TimelineEffectItem = ({ label, nodePathInfo, effectIndex, effectSchema, do
|
|
|
310
326
|
toIndex: dropTarget.toIndex,
|
|
311
327
|
clientId: previewServerState.clientId,
|
|
312
328
|
});
|
|
313
|
-
if (result.success) {
|
|
314
|
-
(0, NotificationCenter_1.showNotification)('Reordered effect', 2000);
|
|
315
|
-
}
|
|
316
|
-
else {
|
|
329
|
+
if (!result.success) {
|
|
317
330
|
(0, NotificationCenter_1.showNotification)(result.reason, 4000);
|
|
318
331
|
}
|
|
319
332
|
}
|
|
@@ -336,7 +349,7 @@ const TimelineEffectItem = ({ label, nodePathInfo, effectIndex, effectSchema, do
|
|
|
336
349
|
...(dropIndicator === 'before' ? { top: -1 } : { bottom: -1 }),
|
|
337
350
|
};
|
|
338
351
|
}, [dropIndicator]);
|
|
339
|
-
const row = (jsx_runtime_1.jsx(TimelineRowChrome_1.TimelineRowChrome, { depth: rowDepth, eye: canToggle ? (jsx_runtime_1.jsx(TimelineLayerEye_1.TimelineLayerEye, { type: "effect", hidden: isDisabled, onInvoked: onToggle })) : (jsx_runtime_1.jsx(TimelineLayerEye_1.TimelineLayerEyeSpacer, {})), arrow: jsx_runtime_1.jsx(TimelineExpandArrowButton_1.TimelineExpandArrowSpacer, {}), style: rowStyle, selected: selection.selected, selectable: selection.selectable, onSelect: selection.onSelect, showSelectedBackground: true, containsSelection: containsSelection,
|
|
352
|
+
const row = (jsx_runtime_1.jsx(TimelineRowChrome_1.TimelineRowChrome, { depth: rowDepth, eye: canToggle ? (jsx_runtime_1.jsx(TimelineLayerEye_1.TimelineLayerEye, { type: "effect", hidden: isDisabled, onInvoked: onToggle })) : (jsx_runtime_1.jsx(TimelineLayerEye_1.TimelineLayerEyeSpacer, {})), arrow: labelNextToToggle ? null : jsx_runtime_1.jsx(TimelineExpandArrowButton_1.TimelineExpandArrowSpacer, {}), style: rowStyle, selected: selection.selected, selectable: selection.selectable, onSelect: selection.onSelect, showSelectedBackground: true, containsSelection: containsSelection, outerHeight: null, children: jsx_runtime_1.jsxs("div", { style: labelContainerStyle, children: [
|
|
340
353
|
jsx_runtime_1.jsx("span", { title: label, style: labelStyle, children: label }), jsx_runtime_1.jsx(TimelineExpandArrowButton_1.TimelineExpandArrowButton, { isExpanded: isExpanded, onClick: () => toggleTrack(nodePathInfo), label: `${label} section`, disabled: false })
|
|
341
354
|
] }) }));
|
|
342
355
|
const draggableRow = canReorder ? (jsx_runtime_1.jsxs("div", { draggable: true, onDragStart: onDragStart, onDragEnd: onDragEnd, onDragOver: onDragOver, onDragLeave: onDragLeave, onDrop: onDrop, style: reorderWrapper, children: [reorderLineStyle ? jsx_runtime_1.jsx("div", { style: reorderLineStyle }) : null, row] })) : (row);
|
|
@@ -7,12 +7,14 @@ const react_1 = require("react");
|
|
|
7
7
|
const remotion_1 = require("remotion");
|
|
8
8
|
const browser_studio_operations_1 = require("../../helpers/browser-studio-operations");
|
|
9
9
|
const client_id_1 = require("../../helpers/client-id");
|
|
10
|
+
const format_file_location_1 = require("../../helpers/format-file-location");
|
|
10
11
|
const open_in_editor_1 = require("../../helpers/open-in-editor");
|
|
11
12
|
const use_runtime_values_1 = require("../../helpers/use-runtime-values");
|
|
12
13
|
const ContextMenu_1 = require("../ContextMenu");
|
|
13
14
|
const effect_operations_api_1 = require("../effect-operations-api");
|
|
14
15
|
const use_default_editor_info_1 = require("../use-default-editor-info");
|
|
15
16
|
const call_add_keyframe_1 = require("./call-add-keyframe");
|
|
17
|
+
const get_copy_context_for_agents_menu_item_1 = require("./get-copy-context-for-agents-menu-item");
|
|
16
18
|
const get_timeline_keyframes_1 = require("./get-timeline-keyframes");
|
|
17
19
|
const save_effect_prop_1 = require("./save-effect-prop");
|
|
18
20
|
const save_prop_queue_1 = require("./save-prop-queue");
|
|
@@ -323,6 +325,17 @@ const TimelineEffectPropItem = ({ field, validatedLocation, rowDepth, nodePath,
|
|
|
323
325
|
selection.onSelect({ shiftKey: false, toggleKey: false });
|
|
324
326
|
}
|
|
325
327
|
return [
|
|
328
|
+
(0, get_copy_context_for_agents_menu_item_1.getCopyContextForAgentsMenuItem)({
|
|
329
|
+
contextForAgents: (0, format_file_location_1.formatContextForAgents)({
|
|
330
|
+
location: validatedLocation,
|
|
331
|
+
name: `Effect property "${field.key}"`,
|
|
332
|
+
root: window.remotion_cwd,
|
|
333
|
+
}),
|
|
334
|
+
}),
|
|
335
|
+
{
|
|
336
|
+
type: 'divider',
|
|
337
|
+
id: 'copy-context-for-agents-divider',
|
|
338
|
+
},
|
|
326
339
|
{
|
|
327
340
|
type: 'item',
|
|
328
341
|
id: 'reset-effect-field',
|
|
@@ -336,7 +349,7 @@ const TimelineEffectPropItem = ({ field, validatedLocation, rowDepth, nodePath,
|
|
|
336
349
|
value: 'reset-effect-field',
|
|
337
350
|
},
|
|
338
351
|
];
|
|
339
|
-
}, [canShowReset, onReset, selection]);
|
|
352
|
+
}, [canShowReset, field.key, onReset, selection, validatedLocation]);
|
|
340
353
|
const onPropertyDoubleClick = (0, react_1.useCallback)((event) => {
|
|
341
354
|
if (!canOpenInEditor || !defaultEditorId) {
|
|
342
355
|
return;
|
|
@@ -348,7 +361,7 @@ const TimelineEffectPropItem = ({ field, validatedLocation, rowDepth, nodePath,
|
|
|
348
361
|
property: field.key,
|
|
349
362
|
}).catch(() => undefined);
|
|
350
363
|
}, [canOpenInEditor, defaultEditorId, field.key, validatedLocation]);
|
|
351
|
-
const row = (jsx_runtime_1.jsx(TimelineRowChrome_1.TimelineRowChrome, { depth: rowDepth, eye: jsx_runtime_1.jsx(TimelineLayerEye_1.TimelineLayerEyeSpacer, {}), keyframeControls: keyframeControls, arrow: jsx_runtime_1.jsx(TimelineExpandArrowButton_1.TimelineExpandArrowSpacer, {}), style: style, selected: selection.selected, selectable: selection.selectable, onSelect: selection.onSelect, onDoubleClick: onPropertyDoubleClick, showSelectedBackground: true, containsSelection: false,
|
|
364
|
+
const row = (jsx_runtime_1.jsx(TimelineRowChrome_1.TimelineRowChrome, { depth: rowDepth, eye: jsx_runtime_1.jsx(TimelineLayerEye_1.TimelineLayerEyeSpacer, {}), keyframeControls: keyframeControls, arrow: jsx_runtime_1.jsx(TimelineExpandArrowButton_1.TimelineExpandArrowSpacer, {}), style: style, selected: selection.selected, selectable: selection.selectable, onSelect: selection.onSelect, onDoubleClick: onPropertyDoubleClick, showSelectedBackground: true, containsSelection: false, outerHeight: null, children: jsx_runtime_1.jsx(TimelineFieldRowContent_1.TimelineFieldRowContent, { field: field, rowDepth: rowDepth, selected: selection.selected, children: jsx_runtime_1.jsx(TimelineEffectPropValueAtCurrentFrame, { field: field, nodePath: nodePath, validatedLocation: validatedLocation, keyframeDisplayOffset: resolvedKeyframeDisplayOffset, runtimeValueStore: runtimeValueStore }) }) }));
|
|
352
365
|
return jsx_runtime_1.jsx(ContextMenu_1.ContextMenu, { getItems: getContextMenuItems, children: row });
|
|
353
366
|
};
|
|
354
367
|
exports.TimelineEffectPropItem = TimelineEffectPropItem;
|
|
@@ -23,6 +23,7 @@ const rowLabel = {
|
|
|
23
23
|
};
|
|
24
24
|
const TimelineExpandedRowInner = ({ node, depth, nestedDepth, rowDepthBase, getIsExpanded, toggleTrack, validatedLocation, nodePath, schema, keyframeDisplayOffset, keyframeControlsMode, }) => {
|
|
25
25
|
const rowDepth = (rowDepthBase !== null && rowDepthBase !== void 0 ? rowDepthBase : (0, timeline_row_layout_1.getExpandedRowDepth)({ nestedDepth, treeDepth: 0 })) + depth;
|
|
26
|
+
const isInspector = keyframeControlsMode === 'inspector';
|
|
26
27
|
const selection = (0, TimelineSelection_1.useTimelineRowSelection)(node.nodePathInfo);
|
|
27
28
|
const labelStyle = react_1.default.useMemo(() => ({
|
|
28
29
|
...rowLabel,
|
|
@@ -39,17 +40,17 @@ const TimelineExpandedRowInner = ({ node, depth, nestedDepth, rowDepthBase, getI
|
|
|
39
40
|
if (node.effectInfo) {
|
|
40
41
|
return (
|
|
41
42
|
// A single effect
|
|
42
|
-
jsx_runtime_1.jsx(TimelineEffectItem_1.TimelineEffectItem, { label: node.label, nodePathInfo: node.nodePathInfo, effectIndex: node.effectInfo.effectIndex, effectSchema: node.effectInfo.effectSchema, documentationLink: node.effectInfo.documentationLink, nodePath: nodePath, validatedLocation: validatedLocation, rowDepth: rowDepth, getIsExpanded: getIsExpanded, toggleTrack: toggleTrack }));
|
|
43
|
+
jsx_runtime_1.jsx(TimelineEffectItem_1.TimelineEffectItem, { label: node.label, nodePathInfo: node.nodePathInfo, effectIndex: node.effectInfo.effectIndex, effectSchema: node.effectInfo.effectSchema, documentationLink: node.effectInfo.documentationLink, nodePath: nodePath, validatedLocation: validatedLocation, rowDepth: rowDepth, labelNextToToggle: isInspector, getIsExpanded: getIsExpanded, toggleTrack: toggleTrack }));
|
|
43
44
|
}
|
|
44
45
|
// Group like "Effects"
|
|
45
46
|
const isExpanded = getIsExpanded(node.nodePathInfo);
|
|
46
47
|
return (jsx_runtime_1.jsx(TimelineRowChrome_1.TimelineRowChrome, { depth: rowDepth, eye: jsx_runtime_1.jsx(TimelineLayerEye_1.TimelineLayerEyeSpacer, {}), arrow: jsx_runtime_1.jsx(TimelineExpandArrowButton_1.TimelineExpandArrowButton, { isExpanded: isExpanded, onClick: () => toggleTrack(node.nodePathInfo), label: `${node.label} section`, disabled: false }), style: {
|
|
47
48
|
height: timeline_layout_1.TREE_GROUP_ROW_HEIGHT,
|
|
48
|
-
}, selected: selection.selected, selectable: selection.selectable, onSelect: selection.onSelect, showSelectedBackground: true, containsSelection: false,
|
|
49
|
+
}, selected: selection.selected, selectable: selection.selectable, onSelect: selection.onSelect, showSelectedBackground: true, containsSelection: false, outerHeight: null, children: jsx_runtime_1.jsx("span", { style: labelStyle, children: node.label }) }));
|
|
49
50
|
}
|
|
50
51
|
if (node.field) {
|
|
51
52
|
if (node.field.kind === 'effect-field') {
|
|
52
|
-
return (jsx_runtime_1.jsx(TimelineEffectPropItem_1.TimelineEffectPropItem, { field: node.field, validatedLocation: validatedLocation, rowDepth: rowDepth, nodePath: nodePath, nodePathInfo: node.nodePathInfo, keyframeDisplayOffset: keyframeDisplayOffset, keyframeControlsMode: keyframeControlsMode, runtimeValueStore: node.runtimeValueStore }));
|
|
53
|
+
return (jsx_runtime_1.jsx(TimelineEffectPropItem_1.TimelineEffectPropItem, { field: node.field, validatedLocation: validatedLocation, rowDepth: isInspector ? rowDepth - 1 : rowDepth, nodePath: nodePath, nodePathInfo: node.nodePathInfo, keyframeDisplayOffset: keyframeDisplayOffset, keyframeControlsMode: keyframeControlsMode, runtimeValueStore: node.runtimeValueStore }));
|
|
53
54
|
}
|
|
54
55
|
if (node.field.kind === 'sequence-field') {
|
|
55
56
|
return (jsx_runtime_1.jsx(TimelineSequencePropItem_1.TimelineSequencePropItem, { field: node.field, validatedLocation: validatedLocation, rowDepth: rowDepth, nodePath: nodePath, nodePathInfo: node.nodePathInfo, schema: schema, keyframeDisplayOffset: keyframeDisplayOffset, keyframeControlsMode: keyframeControlsMode, runtimeValue: node.runtimeValue }));
|
|
@@ -58,6 +59,6 @@ const TimelineExpandedRowInner = ({ node, depth, nestedDepth, rowDepthBase, getI
|
|
|
58
59
|
}
|
|
59
60
|
return (jsx_runtime_1.jsx(TimelineRowChrome_1.TimelineRowChrome, { depth: rowDepth, eye: jsx_runtime_1.jsx(TimelineLayerEye_1.TimelineLayerEyeSpacer, {}), arrow: jsx_runtime_1.jsx(TimelineExpandArrowButton_1.TimelineExpandArrowSpacer, {}), style: {
|
|
60
61
|
height: (0, timeline_layout_1.getTreeRowHeight)(node),
|
|
61
|
-
}, selected: selection.selected, selectable: selection.selectable, onSelect: selection.onSelect, showSelectedBackground: true, containsSelection: false,
|
|
62
|
+
}, selected: selection.selected, selectable: selection.selectable, onSelect: selection.onSelect, showSelectedBackground: true, containsSelection: false, outerHeight: null, children: jsx_runtime_1.jsx("span", { style: labelStyle, children: node.label }) }));
|
|
62
63
|
};
|
|
63
64
|
exports.TimelineExpandedRow = react_1.default.memo(TimelineExpandedRowInner);
|
|
@@ -4,12 +4,12 @@ exports.TimelineFieldLabel = 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 timeline_layout_1 = require("../../helpers/timeline-layout");
|
|
8
7
|
const timeline_field_row_layout_1 = require("./timeline-field-row-layout");
|
|
9
8
|
const TimelineRowLayoutContext_1 = require("./TimelineRowLayoutContext");
|
|
10
9
|
const TimelineSelection_1 = require("./TimelineSelection");
|
|
11
10
|
const fieldNameBase = {
|
|
12
11
|
fontSize: 12,
|
|
12
|
+
lineHeight: `${timeline_field_row_layout_1.TIMELINE_STACKED_FIELD_HEADER_HEIGHT}px`,
|
|
13
13
|
color: colors_1.WHITE_ALPHA_80,
|
|
14
14
|
userSelect: 'none',
|
|
15
15
|
whiteSpace: 'nowrap',
|
|
@@ -23,7 +23,9 @@ const TimelineFieldLabel = ({ rowDepth, selected, label, stacked = false }) => {
|
|
|
23
23
|
const labelRowStyle = (0, react_1.useMemo)(() => ({
|
|
24
24
|
...(0, timeline_field_row_layout_1.getTimelineFieldLabelRowStyle)(rowDepth, basePadding),
|
|
25
25
|
...(0, TimelineSelection_1.getTimelineSelectedLabelStyle)(selected && highlightSelectedLabel, true),
|
|
26
|
-
...(stacked
|
|
26
|
+
...(stacked
|
|
27
|
+
? { flex: `0 0 ${timeline_field_row_layout_1.TIMELINE_STACKED_FIELD_HEADER_HEIGHT}px` }
|
|
28
|
+
: null),
|
|
27
29
|
alignSelf: 'stretch',
|
|
28
30
|
}), [basePadding, highlightSelectedLabel, rowDepth, selected, stacked]);
|
|
29
31
|
const fieldNameStyle = (0, react_1.useMemo)(() => ({
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import type { SchemaFieldInfo } from '../../helpers/timeline-layout';
|
|
3
3
|
export declare const TimelineFieldRowContent: React.FC<{
|
|
4
4
|
readonly field: SchemaFieldInfo;
|
|
5
5
|
readonly rowDepth: number;
|
|
6
6
|
readonly selected: boolean;
|
|
7
|
-
readonly keyframeControls: React.ReactNode;
|
|
8
7
|
readonly children: React.ReactNode;
|
|
9
8
|
}>;
|
|
@@ -3,36 +3,23 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.TimelineFieldRowContent = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("react");
|
|
6
|
-
const timeline_layout_1 = require("../../helpers/timeline-layout");
|
|
7
6
|
const timeline_field_row_layout_1 = require("./timeline-field-row-layout");
|
|
8
7
|
const TimelineFieldLabel_1 = require("./TimelineFieldLabel");
|
|
9
|
-
const
|
|
10
|
-
const TimelineRowLayoutContext_1 = require("./TimelineRowLayoutContext");
|
|
8
|
+
const TimelineSelection_1 = require("./TimelineSelection");
|
|
11
9
|
const Transform3DModeContext_1 = require("./Transform3DModeContext");
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
minWidth: 0,
|
|
10
|
+
const stackedValueStyle = {
|
|
11
|
+
...timeline_field_row_layout_1.timelineFieldValueColumnStyle,
|
|
12
|
+
paddingLeft: TimelineSelection_1.TIMELINE_SELECTED_LABEL_HORIZONTAL_PADDING,
|
|
16
13
|
};
|
|
17
|
-
const
|
|
18
|
-
flex: 1,
|
|
19
|
-
minWidth: 0,
|
|
20
|
-
};
|
|
21
|
-
const TimelineFieldRowContent = ({ field, rowDepth, selected, keyframeControls, children }) => {
|
|
14
|
+
const TimelineFieldRowContent = ({ field, rowDepth, selected, children }) => {
|
|
22
15
|
var _a;
|
|
23
16
|
const transform3DMode = (0, react_1.useContext)(Transform3DModeContext_1.Transform3DModeContext);
|
|
24
|
-
const { keyframeControlsPlacement } = (0, react_1.useContext)(TimelineRowLayoutContext_1.TimelineRowLayoutContext);
|
|
25
17
|
const stacked = (0, timeline_field_row_layout_1.isTimelineFieldStacked)({ field, transform3DMode });
|
|
26
|
-
const compactStacked = stacked && field.typeName !== 'text-content';
|
|
27
18
|
const label = (jsx_runtime_1.jsx(TimelineFieldLabel_1.TimelineFieldLabel, { rowDepth: rowDepth, selected: selected, label: (_a = field.description) !== null && _a !== void 0 ? _a : field.key, stacked: stacked }));
|
|
28
|
-
const value = (jsx_runtime_1.jsx("div", { style:
|
|
29
|
-
? timeline_field_row_layout_1.timelineCompactStackedFieldValueColumnStyle
|
|
30
|
-
: timeline_field_row_layout_1.timelineFieldValueColumnStyle, children: children }));
|
|
31
|
-
const controls = keyframeControlsPlacement === 'after-label' ? (jsx_runtime_1.jsx(TimelineRowChrome_1.TimelineRowKeyframeControlsColumn, { depth: rowDepth, children: keyframeControls })) : null;
|
|
19
|
+
const value = (jsx_runtime_1.jsx("div", { style: stacked ? stackedValueStyle : timeline_field_row_layout_1.timelineFieldValueColumnStyle, children: children }));
|
|
32
20
|
if (stacked) {
|
|
33
|
-
return (jsx_runtime_1.jsxs("div", { style: timeline_field_row_layout_1.timelineStackedFieldContentStyle, children: [
|
|
34
|
-
jsx_runtime_1.jsx("div", { style: stackedLabelStyle, children: label }), controls] })) : (label), value] }));
|
|
21
|
+
return (jsx_runtime_1.jsxs("div", { style: timeline_field_row_layout_1.timelineStackedFieldContentStyle, children: [label, value] }));
|
|
35
22
|
}
|
|
36
|
-
return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [label,
|
|
23
|
+
return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [label, value] }));
|
|
37
24
|
};
|
|
38
25
|
exports.TimelineFieldRowContent = TimelineFieldRowContent;
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.TimelineImageInfo = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const timeline_utils_1 = require("@remotion/timeline-utils");
|
|
6
5
|
const react_1 = require("react");
|
|
7
6
|
const colors_1 = require("../../helpers/colors");
|
|
8
7
|
const timeline_layout_1 = require("../../helpers/timeline-layout");
|
|
@@ -14,38 +13,20 @@ const containerStyle = {
|
|
|
14
13
|
display: 'flex',
|
|
15
14
|
borderTopLeftRadius: 2,
|
|
16
15
|
borderBottomLeftRadius: 2,
|
|
16
|
+
backgroundRepeat: 'repeat-x',
|
|
17
|
+
backgroundSize: 'auto 100%',
|
|
18
|
+
backgroundPositionY: 0,
|
|
17
19
|
};
|
|
18
|
-
const TimelineImageInfo = ({ src,
|
|
19
|
-
const
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
canvas.width = visualizationWidth * window.devicePixelRatio;
|
|
27
|
-
canvas.height = HEIGHT * window.devicePixelRatio;
|
|
28
|
-
canvas.style.width = visualizationWidth + 'px';
|
|
29
|
-
canvas.style.height = HEIGHT + 'px';
|
|
30
|
-
const ctx = canvas.getContext('2d');
|
|
31
|
-
if (!ctx) {
|
|
32
|
-
return;
|
|
33
|
-
}
|
|
34
|
-
current.appendChild(canvas);
|
|
35
|
-
const img = new Image();
|
|
36
|
-
img.crossOrigin = 'anonymous';
|
|
37
|
-
img.onload = () => {
|
|
38
|
-
(0, timeline_utils_1.drawRepeatingImageThumbnail)({
|
|
39
|
-
canvas,
|
|
40
|
-
image: img,
|
|
41
|
-
offsetInPixels: offsetInPixels * window.devicePixelRatio,
|
|
42
|
-
});
|
|
20
|
+
const TimelineImageInfo = ({ src, offsetInPixels }) => {
|
|
21
|
+
const style = (0, react_1.useMemo)(() => {
|
|
22
|
+
return {
|
|
23
|
+
...containerStyle,
|
|
24
|
+
// This is Studio UI, not a Remotion composition that needs to wait for
|
|
25
|
+
// background images before rendering.
|
|
26
|
+
backgroundImage: `url(${JSON.stringify(src)})`,
|
|
27
|
+
backgroundPositionX: -offsetInPixels,
|
|
43
28
|
};
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
current.removeChild(canvas);
|
|
47
|
-
};
|
|
48
|
-
}, [offsetInPixels, src, visualizationWidth]);
|
|
49
|
-
return jsx_runtime_1.jsx("div", { ref: ref, style: containerStyle });
|
|
29
|
+
}, [offsetInPixels, src]);
|
|
30
|
+
return jsx_runtime_1.jsx("div", { style: style });
|
|
50
31
|
};
|
|
51
32
|
exports.TimelineImageInfo = TimelineImageInfo;
|
|
@@ -15,6 +15,7 @@ const call_delete_keyframe_1 = require("./call-delete-keyframe");
|
|
|
15
15
|
const get_easing_selection_after_keyframe_delete_1 = require("./get-easing-selection-after-keyframe-delete");
|
|
16
16
|
const get_keyframe_navigation_1 = require("./get-keyframe-navigation");
|
|
17
17
|
const get_timeline_keyframes_1 = require("./get-timeline-keyframes");
|
|
18
|
+
const timeline_scroll_logic_1 = require("./timeline-scroll-logic");
|
|
18
19
|
const TimelineKeyframeDiamondIcon_1 = require("./TimelineKeyframeDiamondIcon");
|
|
19
20
|
const TimelineKeyframeTracksContext_1 = require("./TimelineKeyframeTracksContext");
|
|
20
21
|
const TimelineSelection_1 = require("./TimelineSelection");
|
|
@@ -405,23 +406,28 @@ const TimelineKeyframeControls = ({ fieldKey, propStatus, nodePath, fileName, ke
|
|
|
405
406
|
timelinePosition,
|
|
406
407
|
tracks,
|
|
407
408
|
]);
|
|
408
|
-
const seekToDisplayFrame = (0, react_1.useCallback)((frame) => {
|
|
409
|
+
const seekToDisplayFrame = (0, react_1.useCallback)((frame, direction) => {
|
|
409
410
|
setFrame((current) => {
|
|
410
411
|
const next = { ...current, [videoConfig.id]: frame };
|
|
411
412
|
remotion_1.Internals.persistCurrentFrame(next);
|
|
412
413
|
return next;
|
|
413
414
|
});
|
|
414
|
-
|
|
415
|
+
(0, timeline_scroll_logic_1.ensureFrameIsInViewport)({
|
|
416
|
+
direction,
|
|
417
|
+
durationInFrames: videoConfig.durationInFrames,
|
|
418
|
+
frame,
|
|
419
|
+
});
|
|
420
|
+
}, [setFrame, videoConfig.durationInFrames, videoConfig.id]);
|
|
415
421
|
const onPrevious = (0, react_1.useCallback)((e) => {
|
|
416
422
|
e.stopPropagation();
|
|
417
423
|
if (previousDisplayFrame !== null) {
|
|
418
|
-
seekToDisplayFrame(previousDisplayFrame);
|
|
424
|
+
seekToDisplayFrame(previousDisplayFrame, 'fit-left');
|
|
419
425
|
}
|
|
420
426
|
}, [previousDisplayFrame, seekToDisplayFrame]);
|
|
421
427
|
const onNext = (0, react_1.useCallback)((e) => {
|
|
422
428
|
e.stopPropagation();
|
|
423
429
|
if (nextDisplayFrame !== null) {
|
|
424
|
-
seekToDisplayFrame(nextDisplayFrame);
|
|
430
|
+
seekToDisplayFrame(nextDisplayFrame, 'fit-right');
|
|
425
431
|
}
|
|
426
432
|
}, [nextDisplayFrame, seekToDisplayFrame]);
|
|
427
433
|
const onToggleKeyframe = (0, react_1.useCallback)(async (e) => {
|
|
@@ -31,7 +31,7 @@ const isTimelinePrimitiveFieldInfo = (field) => {
|
|
|
31
31
|
exports.isTimelinePrimitiveFieldInfo = isTimelinePrimitiveFieldInfo;
|
|
32
32
|
const TimelinePrimitiveFieldValue = ({ field, onSave, onDragValueChange, onDragEnd, propStatus, effectiveValue, scaleLockNodePath, }) => {
|
|
33
33
|
if (field.typeName === 'number') {
|
|
34
|
-
return (jsx_runtime_1.jsx(
|
|
34
|
+
return (jsx_runtime_1.jsx(TimelineNumberField_1.TimelineNumberField, { effectiveValue: effectiveValue, field: field, onDragEnd: onDragEnd, onDragValueChange: onDragValueChange, onSave: onSave, propStatus: propStatus }));
|
|
35
35
|
}
|
|
36
36
|
if (field.typeName === 'rotation-css' ||
|
|
37
37
|
field.typeName === 'rotation-degrees') {
|
|
@@ -14,10 +14,8 @@ const containerStyle = {
|
|
|
14
14
|
gap: 4,
|
|
15
15
|
};
|
|
16
16
|
const compactDraggerStyle = {
|
|
17
|
-
paddingBottom: 2,
|
|
18
17
|
paddingLeft: 2,
|
|
19
18
|
paddingRight: 2,
|
|
20
|
-
paddingTop: 2,
|
|
21
19
|
};
|
|
22
20
|
const ROTATION_LABELS = ['X', 'Y', 'Z'];
|
|
23
21
|
const TimelineRotationField = ({ field, effectiveValue, propStatus, onSave, onDragValueChange, onDragEnd, }) => {
|
|
@@ -18,7 +18,6 @@ export declare const TimelineRowChrome: React.FC<{
|
|
|
18
18
|
readonly showSelectedBackground: boolean;
|
|
19
19
|
readonly containsSelection: boolean;
|
|
20
20
|
readonly hovered?: boolean;
|
|
21
|
-
readonly isFieldRow: boolean;
|
|
22
21
|
readonly outerHeight: number | null;
|
|
23
22
|
readonly onDragLeave?: (e: React.DragEvent<HTMLDivElement>) => void;
|
|
24
23
|
readonly onDragOver?: (e: React.DragEvent<HTMLDivElement>) => void;
|
|
@@ -69,8 +69,8 @@ const TimelineRowKeyframeControlsColumn = ({ children, depth }) => {
|
|
|
69
69
|
return (jsx_runtime_1.jsx("div", { style: leftChromeStyle, children: jsx_runtime_1.jsx("div", { style: style, children: children }) }));
|
|
70
70
|
};
|
|
71
71
|
exports.TimelineRowKeyframeControlsColumn = TimelineRowKeyframeControlsColumn;
|
|
72
|
-
const TimelineRowChrome = ({ depth, eye, keyframeControls, arrow, children, style, selected, selectable, onSelect, showSelectedBackground, containsSelection, hovered = false,
|
|
73
|
-
const { basePadding,
|
|
72
|
+
const TimelineRowChrome = ({ depth, eye, keyframeControls, arrow, children, style, selected, selectable, onSelect, showSelectedBackground, containsSelection, hovered = false, outerHeight, onDragLeave, onDragOver, onDrop, onDoubleClick, onPointerEnter, onPointerLeave, }) => {
|
|
73
|
+
const { basePadding, rowBorderRadius, rowHorizontalMargin } = (0, react_1.useContext)(TimelineRowLayoutContext_1.TimelineRowLayoutContext);
|
|
74
74
|
const selectedBackground = (0, react_1.useContext)(exports.TimelineRowSelectedBackgroundContext);
|
|
75
75
|
const indentWidth = (0, timeline_row_layout_1.getTimelineRowIndentWidth)(depth);
|
|
76
76
|
const chromeColumnStyle = (0, react_1.useMemo)(() => ({
|
|
@@ -135,8 +135,7 @@ const TimelineRowChrome = ({ depth, eye, keyframeControls, arrow, children, styl
|
|
|
135
135
|
backgroundColor: highlightBackground,
|
|
136
136
|
};
|
|
137
137
|
}, [outerHeight, highlightBackground]);
|
|
138
|
-
const
|
|
139
|
-
const chrome = (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [shouldRenderLeftChrome ? (keyframeControls ? (jsx_runtime_1.jsx(exports.TimelineRowKeyframeControlsColumn, { depth: depth, children: keyframeControls })) : (jsx_runtime_1.jsx("div", { style: leftChromeStyle, children: jsx_runtime_1.jsxs("div", { style: chromeColumnStyle, children: [eye, indentWidth > 0 ? jsx_runtime_1.jsx(Padder_1.Padder, { depth: depth }) : null, arrow] }) }))) : null, children] }));
|
|
138
|
+
const chrome = (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [keyframeControls ? (jsx_runtime_1.jsx(exports.TimelineRowKeyframeControlsColumn, { depth: depth, children: keyframeControls })) : (jsx_runtime_1.jsx("div", { style: leftChromeStyle, children: jsx_runtime_1.jsxs("div", { style: chromeColumnStyle, children: [eye, indentWidth > 0 ? jsx_runtime_1.jsx(Padder_1.Padder, { depth: depth }) : null, arrow] }) })), children] }));
|
|
140
139
|
if (outerStyle) {
|
|
141
140
|
return (jsx_runtime_1.jsx("div", { style: outerStyle, onDragLeave: onDragLeave, onDragOver: onDragOver, onDrop: onDrop, onPointerDown: selectable ? onPointerDown : undefined, onContextMenu: selectable ? onContextMenu : undefined, onDoubleClick: onDoubleClickIfNotInteractive, onPointerEnter: onPointerEnter, onPointerLeave: onPointerLeave, children: jsx_runtime_1.jsx("div", { style: innerRowStyle, children: chrome }) }));
|
|
142
141
|
}
|
|
@@ -2,7 +2,6 @@ type TimelineRowLayout = {
|
|
|
2
2
|
readonly basePadding: number;
|
|
3
3
|
readonly highlightSelectedLabel: boolean;
|
|
4
4
|
readonly keyframeControlsPadding: number;
|
|
5
|
-
readonly keyframeControlsPlacement: 'before-label' | 'after-label';
|
|
6
5
|
readonly rowBorderRadius: number;
|
|
7
6
|
readonly rowHorizontalMargin: number;
|
|
8
7
|
};
|
|
@@ -2,21 +2,18 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.TimelineRowLayoutContext = exports.INSPECTOR_TIMELINE_ROW_LAYOUT = void 0;
|
|
4
4
|
const react_1 = require("react");
|
|
5
|
-
const InspectorPanelLayout_1 = require("../InspectorPanelLayout");
|
|
6
5
|
const timeline_row_layout_1 = require("./timeline-row-layout");
|
|
7
6
|
exports.INSPECTOR_TIMELINE_ROW_LAYOUT = {
|
|
8
7
|
basePadding: timeline_row_layout_1.INSPECTOR_ROW_BASE_PADDING,
|
|
9
8
|
highlightSelectedLabel: false,
|
|
10
9
|
keyframeControlsPadding: 0,
|
|
11
|
-
keyframeControlsPlacement: 'after-label',
|
|
12
10
|
rowBorderRadius: 4,
|
|
13
|
-
rowHorizontalMargin:
|
|
11
|
+
rowHorizontalMargin: 4,
|
|
14
12
|
};
|
|
15
13
|
exports.TimelineRowLayoutContext = (0, react_1.createContext)({
|
|
16
14
|
basePadding: timeline_row_layout_1.TIMELINE_ROW_BASE_PADDING,
|
|
17
15
|
highlightSelectedLabel: true,
|
|
18
16
|
keyframeControlsPadding: timeline_row_layout_1.TIMELINE_ROW_BASE_PADDING,
|
|
19
|
-
keyframeControlsPlacement: 'before-label',
|
|
20
17
|
rowBorderRadius: 0,
|
|
21
18
|
rowHorizontalMargin: 0,
|
|
22
19
|
});
|
|
@@ -12,18 +12,14 @@ const timeline_field_utils_1 = require("./timeline-field-utils");
|
|
|
12
12
|
const TimelineLayerEye_1 = require("./TimelineLayerEye");
|
|
13
13
|
const Transform3DModeContext_1 = require("./Transform3DModeContext");
|
|
14
14
|
const leftDraggerStyle = {
|
|
15
|
-
paddingBottom: 2,
|
|
16
15
|
paddingLeft: 0,
|
|
17
|
-
paddingTop: 2,
|
|
18
16
|
textAlign: 'left',
|
|
19
|
-
width:
|
|
17
|
+
width: 40,
|
|
20
18
|
};
|
|
21
19
|
const rightDraggerStyle = {
|
|
22
|
-
paddingBottom: 2,
|
|
23
20
|
paddingRight: 0,
|
|
24
|
-
paddingTop: 2,
|
|
25
21
|
textAlign: 'left',
|
|
26
|
-
width:
|
|
22
|
+
width: 40,
|
|
27
23
|
};
|
|
28
24
|
const containerStyle = {
|
|
29
25
|
alignItems: 'center',
|