@remotion/studio 4.0.478 → 4.0.481
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/AssetSelector.js +8 -14
- package/dist/components/AudioWaveform.js +19 -11
- package/dist/components/Button.d.ts +2 -0
- package/dist/components/Button.js +9 -6
- package/dist/components/CompactExplanation.d.ts +12 -0
- package/dist/components/CompactExplanation.js +52 -0
- package/dist/components/CompositionSelector.js +2 -4
- package/dist/components/CurrentAsset.d.ts +3 -1
- package/dist/components/CurrentAsset.js +42 -34
- package/dist/components/CurrentComposition.d.ts +1 -1
- package/dist/components/CurrentComposition.js +38 -31
- package/dist/components/CurrentCompositionSideEffects.d.ts +0 -3
- package/dist/components/CurrentCompositionSideEffects.js +1 -37
- package/dist/components/DefaultPropsEditor.d.ts +12 -2
- package/dist/components/DefaultPropsEditor.js +2 -2
- package/dist/components/Editor.js +2 -5
- package/dist/components/EditorContent.js +2 -1
- package/dist/components/EffectPickerModal.d.ts +5 -0
- package/dist/components/EffectPickerModal.js +179 -0
- package/dist/components/ExpandedTracksProvider.d.ts +1 -0
- package/dist/components/ExpandedTracksProvider.js +81 -7
- package/dist/components/GlobalKeybindings.d.ts +3 -1
- package/dist/components/GlobalKeybindings.js +104 -10
- package/dist/components/InspectorInfoHeader.d.ts +11 -0
- package/dist/components/InspectorInfoHeader.js +55 -0
- package/dist/components/InspectorPanel/DefaultInspector.d.ts +8 -0
- package/dist/components/InspectorPanel/DefaultInspector.js +93 -0
- package/dist/components/InspectorPanel/EasingInspector.d.ts +5 -0
- package/dist/components/InspectorPanel/EasingInspector.js +41 -0
- package/dist/components/InspectorPanel/GuideInspector.d.ts +7 -0
- package/dist/components/InspectorPanel/GuideInspector.js +55 -0
- package/dist/components/InspectorPanel/KeyframeInspector.d.ts +7 -0
- package/dist/components/InspectorPanel/KeyframeInspector.js +109 -0
- package/dist/components/InspectorPanel/SelectedInspector.d.ts +5 -0
- package/dist/components/InspectorPanel/SelectedInspector.js +26 -0
- package/dist/components/InspectorPanel/SequenceSelectionInspector.d.ts +5 -0
- package/dist/components/InspectorPanel/SequenceSelectionInspector.js +117 -0
- package/dist/components/InspectorPanel/common.d.ts +15 -0
- package/dist/components/InspectorPanel/common.js +18 -0
- package/dist/components/InspectorPanel/inspector-selection.d.ts +10 -0
- package/dist/components/InspectorPanel/inspector-selection.js +35 -0
- package/dist/components/InspectorPanel/styles.d.ts +28 -0
- package/dist/components/InspectorPanel/styles.js +196 -0
- package/dist/components/InspectorPanel/use-track-for-selection.d.ts +2 -0
- package/dist/components/InspectorPanel/use-track-for-selection.js +22 -0
- package/dist/components/InspectorPanel.d.ts +8 -0
- package/dist/components/InspectorPanel.js +26 -0
- package/dist/components/InspectorPanelLayout.d.ts +1 -0
- package/dist/components/InspectorPanelLayout.js +4 -0
- package/dist/components/InspectorSequenceSection.d.ts +19 -0
- package/dist/components/InspectorSequenceSection.js +157 -0
- package/dist/components/InspectorSourceLocation.d.ts +7 -0
- package/dist/components/InspectorSourceLocation.js +71 -0
- package/dist/components/KeyboardShortcutsExplainer.js +10 -2
- package/dist/components/Modals.js +3 -3
- package/dist/components/NewComposition/InputDragger.js +1 -1
- package/dist/components/NewComposition/RemInput.d.ts +1 -0
- package/dist/components/NewComposition/RemInput.js +8 -2
- package/dist/components/NewComposition/RemTextarea.d.ts +1 -0
- package/dist/components/NewComposition/RemTextarea.js +8 -2
- package/dist/components/NewComposition/ValidationMessage.d.ts +3 -0
- package/dist/components/NewComposition/ValidationMessage.js +16 -5
- package/dist/components/OptionsPanel.d.ts +1 -1
- package/dist/components/OptionsPanel.js +8 -17
- package/dist/components/QuickSwitcher/QuickSwitcherContent.js +2 -7
- package/dist/components/QuickSwitcher/QuickSwitcherResult.js +3 -10
- package/dist/components/QuickSwitcher/shared.d.ts +4 -0
- package/dist/components/QuickSwitcher/shared.js +24 -0
- package/dist/components/RenderModal/DataEditor.d.ts +29 -2
- package/dist/components/RenderModal/DataEditor.js +107 -56
- package/dist/components/RenderModal/RenderModalJSONPropsEditor.d.ts +1 -0
- package/dist/components/RenderModal/RenderModalJSONPropsEditor.js +25 -7
- package/dist/components/RenderModal/SchemaEditor/Fieldset.d.ts +2 -1
- package/dist/components/RenderModal/SchemaEditor/Fieldset.js +10 -5
- package/dist/components/RenderModal/SchemaEditor/SchemaEditor.d.ts +4 -0
- package/dist/components/RenderModal/SchemaEditor/SchemaEditor.js +27 -4
- package/dist/components/RenderModal/SchemaEditor/SchemaErrorMessages.d.ts +12 -4
- package/dist/components/RenderModal/SchemaEditor/SchemaErrorMessages.js +23 -9
- package/dist/components/RenderModal/SchemaEditor/SchemaLabel.js +3 -3
- package/dist/components/RenderModal/SchemaEditor/SchemaSeparationLine.js +8 -1
- package/dist/components/RenderModal/SchemaEditor/ZodColorEditor.js +1 -1
- package/dist/components/RenderModal/SchemaEditor/ZodDateEditor.js +1 -1
- package/dist/components/RenderModal/SchemaEditor/ZodDiscriminatedUnionEditor.js +1 -1
- package/dist/components/RenderModal/SchemaEditor/ZodEnumEditor.js +1 -1
- package/dist/components/RenderModal/SchemaEditor/ZodErrorMessages.d.ts +1 -0
- package/dist/components/RenderModal/SchemaEditor/ZodErrorMessages.js +23 -6
- package/dist/components/RenderModal/SchemaEditor/ZodFieldValidation.js +2 -2
- package/dist/components/RenderModal/SchemaEditor/ZodNonEditableValue.js +2 -1
- package/dist/components/RenderModal/SchemaEditor/ZodNumberEditor.js +1 -1
- package/dist/components/RenderModal/SchemaEditor/ZodObjectEditor.js +9 -11
- package/dist/components/RenderModal/SchemaEditor/ZodOrNullishEditor.js +1 -1
- package/dist/components/RenderModal/SchemaEditor/ZodStaticFileEditor.js +1 -1
- package/dist/components/RenderModal/SchemaEditor/ZodStringEditor.js +1 -1
- package/dist/components/RenderModal/SchemaEditor/ZodTextareaEditor.js +1 -1
- package/dist/components/RenderModal/WarningIndicatorButton.d.ts +1 -0
- package/dist/components/RenderModal/WarningIndicatorButton.js +17 -4
- package/dist/components/RenderModal/get-render-modal-warnings.d.ts +2 -1
- package/dist/components/RenderModal/get-render-modal-warnings.js +6 -3
- package/dist/components/RendersTab.js +1 -1
- package/dist/components/ResetZoomButton.d.ts +2 -1
- package/dist/components/ResetZoomButton.js +5 -1
- package/dist/components/SegmentedControl.d.ts +3 -0
- package/dist/components/SegmentedControl.js +11 -5
- package/dist/components/SelectedOutlineElement.js +96 -24
- package/dist/components/SelectedOutlineOverlay.d.ts +1 -1
- package/dist/components/SelectedOutlineOverlay.js +44 -30
- package/dist/components/SelectedOutlineUvControls.d.ts +9 -0
- package/dist/components/SelectedOutlineUvControls.js +64 -10
- package/dist/components/Tabs/index.js +4 -4
- package/dist/components/Timeline/EasingEditorModal.d.ts +5 -4
- package/dist/components/Timeline/EasingEditorModal.js +597 -124
- package/dist/components/Timeline/KeyframeSettingsModal.d.ts +2 -2
- package/dist/components/Timeline/SubscribeToNodePaths.d.ts +2 -2
- package/dist/components/Timeline/Timeline.js +9 -9
- package/dist/components/Timeline/TimelineClipboardKeybindings.d.ts +15 -3
- package/dist/components/Timeline/TimelineClipboardKeybindings.js +85 -1
- package/dist/components/Timeline/TimelineDeleteKeybindings.js +10 -3
- package/dist/components/Timeline/TimelineEffectItem.d.ts +2 -2
- package/dist/components/Timeline/TimelineEffectItem.js +1 -1
- package/dist/components/Timeline/TimelineEffectPropItem.d.ts +8 -0
- package/dist/components/Timeline/TimelineEffectPropItem.js +25 -21
- package/dist/components/Timeline/TimelineExpandArrowButton.js +42 -2
- package/dist/components/Timeline/TimelineExpandedRow.d.ts +5 -2
- package/dist/components/Timeline/TimelineExpandedRow.js +6 -6
- package/dist/components/Timeline/TimelineExpandedSection.d.ts +1 -1
- package/dist/components/Timeline/TimelineExpandedSection.js +10 -25
- package/dist/components/Timeline/TimelineKeyframeControls.d.ts +8 -2
- package/dist/components/Timeline/TimelineKeyframeControls.js +24 -3
- package/dist/components/Timeline/TimelineKeyframeEasingLine.js +2 -47
- package/dist/components/Timeline/TimelineKeyframedValue.d.ts +1 -1
- package/dist/components/Timeline/TimelineKeyframedValue.js +8 -10
- package/dist/components/Timeline/TimelineNumberField.js +5 -11
- package/dist/components/Timeline/TimelineRotationField.js +5 -6
- package/dist/components/Timeline/TimelineRowChrome.d.ts +2 -0
- package/dist/components/Timeline/TimelineRowChrome.js +5 -3
- package/dist/components/Timeline/TimelineScaleField.js +4 -8
- package/dist/components/Timeline/TimelineSelection.d.ts +28 -2
- package/dist/components/Timeline/TimelineSelection.js +342 -61
- package/dist/components/Timeline/TimelineSequence.js +19 -3
- package/dist/components/Timeline/TimelineSequenceItem.js +68 -64
- package/dist/components/Timeline/TimelineSequencePropItem.d.ts +12 -2
- package/dist/components/Timeline/TimelineSequencePropItem.js +57 -53
- package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.js +6 -4
- package/dist/components/Timeline/TimelineTransformOriginField.js +4 -5
- package/dist/components/Timeline/TimelineTranslateField.js +4 -5
- package/dist/components/Timeline/TimelineUvCoordinateField.js +4 -4
- package/dist/components/Timeline/call-add-keyframe.d.ts +4 -4
- package/dist/components/Timeline/call-delete-keyframe.d.ts +4 -4
- package/dist/components/Timeline/call-move-keyframe.d.ts +2 -2
- package/dist/components/Timeline/call-update-keyframe-settings.d.ts +3 -3
- package/dist/components/Timeline/delete-selected-timeline-item.d.ts +2 -1
- package/dist/components/Timeline/delete-selected-timeline-item.js +27 -1
- package/dist/components/Timeline/find-track-for-node-path-info.js +2 -2
- package/dist/components/Timeline/get-node-keyframes.d.ts +7 -0
- package/dist/components/Timeline/get-node-keyframes.js +26 -1
- package/dist/components/Timeline/parse-keyframe-field-from-node-path.js +2 -2
- package/dist/components/Timeline/reset-selected-timeline-props.d.ts +3 -3
- package/dist/components/Timeline/reset-selected-timeline-props.js +34 -7
- package/dist/components/Timeline/save-effect-prop.d.ts +2 -2
- package/dist/components/Timeline/save-sequence-prop.d.ts +2 -2
- package/dist/components/Timeline/sequence-props-subscription-store.d.ts +3 -3
- package/dist/components/Timeline/timeline-expanded-filter.d.ts +12 -0
- package/dist/components/Timeline/timeline-expanded-filter.js +38 -0
- package/dist/components/Timeline/timeline-field-display-utils.d.ts +5 -0
- package/dist/components/Timeline/timeline-field-display-utils.js +244 -0
- package/dist/components/Timeline/update-selected-easing.d.ts +47 -4
- package/dist/components/Timeline/update-selected-easing.js +40 -9
- package/dist/components/Timeline/use-expanded-track-keyframe-rows.js +50 -18
- package/dist/components/Timeline/use-sequence-freeze-frame-menu-item.d.ts +13 -0
- package/dist/components/Timeline/use-sequence-freeze-frame-menu-item.js +73 -0
- package/dist/components/Timeline/use-sequence-props-subscription.d.ts +3 -3
- package/dist/components/Timeline/use-timeline-expanded-tree.d.ts +12 -0
- package/dist/components/Timeline/use-timeline-expanded-tree.js +60 -0
- package/dist/components/Timeline/use-timeline-height.js +51 -7
- package/dist/components/Timeline/use-timeline-keyframe-drag.js +12 -6
- package/dist/components/TopPanel.js +1 -1
- package/dist/components/VisualControls/VisualControlsContent.d.ts +1 -1
- package/dist/components/VisualControls/VisualControlsContent.js +4 -5
- package/dist/components/effect-drag-and-drop.d.ts +10 -0
- package/dist/components/effect-drag-and-drop.js +17 -8
- package/dist/components/effect-picker-search.d.ts +5 -0
- package/dist/components/effect-picker-search.js +77 -0
- package/dist/components/selected-outline-drag.d.ts +21 -2
- package/dist/components/selected-outline-drag.js +31 -6
- package/dist/components/selected-outline-measurement.js +48 -14
- package/dist/components/selected-outline-types.d.ts +7 -7
- package/dist/components/selected-outline-uv.d.ts +4 -3
- package/dist/components/selected-outline-uv.js +6 -2
- package/dist/error-overlay/remotion-overlay/ErrorLoader.js +8 -1
- package/dist/esm/{chunk-hrw9799x.js → chunk-4rq5gt8c.js} +30557 -26640
- package/dist/esm/internals.mjs +30557 -26640
- package/dist/esm/previewEntry.mjs +18584 -14665
- package/dist/esm/renderEntry.mjs +1 -1
- package/dist/helpers/migrate-expanded-tracks-for-subscription-key.js +3 -3
- package/dist/helpers/render-codec-label.d.ts +2 -0
- package/dist/helpers/render-codec-label.js +49 -0
- package/dist/helpers/timeline-layout.d.ts +4 -4
- package/dist/helpers/use-media-metadata.d.ts +8 -2
- package/dist/helpers/use-media-metadata.js +17 -4
- package/dist/state/modals.d.ts +9 -4
- package/package.json +12 -12
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { CanUpdateSequencePropStatusKeyframed, SequencePropsSubscriptionKey,
|
|
2
|
+
import type { CanUpdateSequencePropStatusKeyframed, SequencePropsSubscriptionKey, InteractivitySchema } from 'remotion';
|
|
3
3
|
export type KeyframeSettingsModalState = {
|
|
4
4
|
type: 'keyframe-settings';
|
|
5
5
|
fileName: string;
|
|
@@ -7,7 +7,7 @@ export type KeyframeSettingsModalState = {
|
|
|
7
7
|
fieldKey: string;
|
|
8
8
|
fieldLabel: string;
|
|
9
9
|
status: CanUpdateSequencePropStatusKeyframed;
|
|
10
|
-
schema:
|
|
10
|
+
schema: InteractivitySchema;
|
|
11
11
|
effectIndex: number | null;
|
|
12
12
|
};
|
|
13
13
|
export declare const KeyframeSettingsModal: React.FC<{
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { type FC } from 'react';
|
|
2
|
-
import type { EffectDefinition, JsxComponentIdentity,
|
|
2
|
+
import type { EffectDefinition, JsxComponentIdentity, InteractivitySchema } from 'remotion';
|
|
3
3
|
export declare const SubscribeToNodePaths: FC<{
|
|
4
4
|
readonly overrideId: string;
|
|
5
5
|
readonly componentIdentity: JsxComponentIdentity | null;
|
|
6
|
-
readonly schema:
|
|
6
|
+
readonly schema: InteractivitySchema;
|
|
7
7
|
readonly getStack: () => string | null;
|
|
8
8
|
readonly effects: readonly EffectDefinition<unknown>[];
|
|
9
9
|
}>;
|
|
@@ -231,15 +231,15 @@ const TimelineInner = () => {
|
|
|
231
231
|
return null;
|
|
232
232
|
}
|
|
233
233
|
return (jsx_runtime_1.jsx(SubscribeToNodePaths_1.SubscribeToNodePaths, { overrideId: sequence.controls.overrideId, componentIdentity: sequence.controls.componentIdentity, schema: sequence.controls.schema, getStack: sequence.getStack, effects: sequence.effects }, sequence.id));
|
|
234
|
-
}), jsx_runtime_1.jsx(SequencePropsObserver_1.SequencePropsObserver, {}), jsx_runtime_1.
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
234
|
+
}), jsx_runtime_1.jsx(SequencePropsObserver_1.SequencePropsObserver, {}), jsx_runtime_1.jsx(TimelineKeyframeTracksContext_1.TimelineKeyframeTracksProvider, { tracks: filtered, children: jsx_runtime_1.jsxs(TimelineSelection_1.TimelineSelectableItemsProvider, { timeline: shown, children: [
|
|
235
|
+
jsx_runtime_1.jsx(TimelineSelection_1.TimelineSelectAllKeybindings, { timeline: shown }), jsx_runtime_1.jsx(TimelineHeightContainer_1.TimelineHeightContainer, { shown: shown, hasBeenCut: hasBeenCut, children: isStill ? (jsx_runtime_1.jsx(TimelineList_1.TimelineList, { timeline: shown })) : (jsx_runtime_1.jsxs(TimelineWidthProvider_1.TimelineWidthProvider, { children: [
|
|
236
|
+
jsx_runtime_1.jsx(TimelinePinchZoom_1.TimelinePinchZoom, {}), jsx_runtime_1.jsxs(SplitterContainer_1.SplitterContainer, { orientation: "vertical", defaultFlex: 0.2, id: "names-to-timeline", maxFlex: 0.5, minFlex: 0.15, children: [
|
|
237
|
+
jsx_runtime_1.jsx(SplitterElement_1.SplitterElement, { type: "flexer", sticky: jsx_runtime_1.jsx(TimelineTimeIndicators_1.TimelineTimePlaceholders, {}), children: jsx_runtime_1.jsx(TimelineList_1.TimelineList, { timeline: shown }) }), jsx_runtime_1.jsx(SplitterHandle_1.SplitterHandle, { onCollapse: noop, allowToCollapse: "none" }), jsx_runtime_1.jsx(SplitterElement_1.SplitterElement, { type: "anti-flexer", sticky: null, children: jsx_runtime_1.jsxs(TimelineScrollable_1.TimelineScrollable, { children: [
|
|
238
|
+
jsx_runtime_1.jsx(TimelineTracks_1.TimelineTracks, { timeline: shown, hasBeenCut: hasBeenCut }), jsx_runtime_1.jsx(TimelinePlayCursorSyncer_1.TimelinePlayCursorSyncer, {}), jsx_runtime_1.jsx(TimelineInOutPointer_1.TimelineInOutPointer, {}), jsx_runtime_1.jsx(TimelineTimeIndicators_1.TimelineTimeIndicators, {}), jsx_runtime_1.jsx(TimelineDragHandler_1.TimelineDragHandler, {}), jsx_runtime_1.jsx(TimelineInOutDragHandler_1.TimelineInOutDragHandler, {}), jsx_runtime_1.jsx(TimelineSlider_1.TimelineSlider, {})
|
|
239
|
+
] }) })
|
|
240
|
+
] })
|
|
241
|
+
] })) })
|
|
242
|
+
] }) })
|
|
243
243
|
] }));
|
|
244
244
|
};
|
|
245
245
|
exports.Timeline = react_1.default.memo(TimelineInner);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { type EffectClipboardSnapshot, type EffectPropClipboardData } from '@remotion/studio-shared';
|
|
1
|
+
import { type EasingClipboardData, type EffectClipboardSnapshot, type EffectPropClipboardData } from '@remotion/studio-shared';
|
|
2
2
|
import type React from 'react';
|
|
3
|
-
import { type OverrideIdToNodePaths, type PropStatuses, type SequencePropsSubscriptionKey, type
|
|
3
|
+
import { type OverrideIdToNodePaths, type PropStatuses, type SequencePropsSubscriptionKey, type InteractivitySchema, type TSequence } from 'remotion';
|
|
4
4
|
import type { SequenceNodePathInfo } from '../../helpers/get-timeline-sequence-sort-key';
|
|
5
5
|
import { type TimelineSelection } from './TimelineSelection';
|
|
6
6
|
export type PasteEffectsTarget = {
|
|
@@ -20,7 +20,7 @@ export type PasteEffectPropTarget = {
|
|
|
20
20
|
readonly effectIndex: number;
|
|
21
21
|
readonly fieldKey: string;
|
|
22
22
|
readonly defaultValue: string | null;
|
|
23
|
-
readonly schema:
|
|
23
|
+
readonly schema: InteractivitySchema;
|
|
24
24
|
} | {
|
|
25
25
|
readonly type: 'none' | 'multiple' | 'unsupported' | 'effect-type-mismatch' | 'prop-mismatch' | 'uncopyable';
|
|
26
26
|
};
|
|
@@ -33,6 +33,18 @@ export declare const getEffectPropClipboardDataFromSelection: ({ selection, prop
|
|
|
33
33
|
selection: TimelineSelection;
|
|
34
34
|
propStatuses: PropStatuses;
|
|
35
35
|
}) => EffectPropClipboardData | null;
|
|
36
|
+
export declare const getEasingClipboardDataFromSelection: ({ selection, sequences, overrideIdsToNodePaths, propStatuses, }: {
|
|
37
|
+
selection: {
|
|
38
|
+
readonly type: "easing";
|
|
39
|
+
readonly nodePathInfo: SequenceNodePathInfo;
|
|
40
|
+
readonly fromFrame: number;
|
|
41
|
+
readonly toFrame: number;
|
|
42
|
+
readonly segmentIndex: number;
|
|
43
|
+
};
|
|
44
|
+
sequences: TSequence[];
|
|
45
|
+
overrideIdsToNodePaths: OverrideIdToNodePaths;
|
|
46
|
+
propStatuses: PropStatuses;
|
|
47
|
+
}) => EasingClipboardData | null;
|
|
36
48
|
export declare const getPasteEffectPropTarget: ({ selectedItems, payload, propStatuses, sequences, overrideIdsToNodePaths, }: {
|
|
37
49
|
readonly selectedItems: readonly TimelineSelection[];
|
|
38
50
|
readonly payload: EffectPropClipboardData;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TimelineClipboardKeybindings = exports.getPasteEffectPropTarget = exports.getEffectPropClipboardDataFromSelection = exports.getSnapshotsFromSelection = exports.getPasteEffectsTarget = void 0;
|
|
3
|
+
exports.TimelineClipboardKeybindings = exports.getPasteEffectPropTarget = exports.getEasingClipboardDataFromSelection = exports.getEffectPropClipboardDataFromSelection = exports.getSnapshotsFromSelection = exports.getPasteEffectsTarget = void 0;
|
|
4
4
|
const studio_shared_1 = require("@remotion/studio-shared");
|
|
5
5
|
const react_1 = require("react");
|
|
6
6
|
const remotion_1 = require("remotion");
|
|
@@ -11,6 +11,7 @@ const NotificationCenter_1 = require("../Notifications/NotificationCenter");
|
|
|
11
11
|
const find_track_for_node_path_info_1 = require("./find-track-for-node-path-info");
|
|
12
12
|
const save_effect_prop_1 = require("./save-effect-prop");
|
|
13
13
|
const TimelineSelection_1 = require("./TimelineSelection");
|
|
14
|
+
const update_selected_easing_1 = require("./update-selected-easing");
|
|
14
15
|
const makeClipboardText = (payload) => JSON.stringify(payload);
|
|
15
16
|
const makeTargetKey = (nodePath) => {
|
|
16
17
|
return JSON.stringify({
|
|
@@ -176,6 +177,24 @@ const getEffectPropClipboardDataFromSelection = ({ selection, propStatuses, }) =
|
|
|
176
177
|
};
|
|
177
178
|
};
|
|
178
179
|
exports.getEffectPropClipboardDataFromSelection = getEffectPropClipboardDataFromSelection;
|
|
180
|
+
const getEasingClipboardDataFromSelection = ({ selection, sequences, overrideIdsToNodePaths, propStatuses, }) => {
|
|
181
|
+
const easing = (0, update_selected_easing_1.getTimelineEasingValueForSelection)({
|
|
182
|
+
selection,
|
|
183
|
+
sequences,
|
|
184
|
+
overrideIdsToNodePaths,
|
|
185
|
+
propStatuses,
|
|
186
|
+
});
|
|
187
|
+
if (easing === null) {
|
|
188
|
+
return null;
|
|
189
|
+
}
|
|
190
|
+
return {
|
|
191
|
+
type: 'easing',
|
|
192
|
+
version: 1,
|
|
193
|
+
remotionClipboard: 'easing',
|
|
194
|
+
easing,
|
|
195
|
+
};
|
|
196
|
+
};
|
|
197
|
+
exports.getEasingClipboardDataFromSelection = getEasingClipboardDataFromSelection;
|
|
179
198
|
const getPasteEffectPropTarget = ({ selectedItems, payload, propStatuses, sequences, overrideIdsToNodePaths, }) => {
|
|
180
199
|
var _a;
|
|
181
200
|
if (selectedItems.length === 0) {
|
|
@@ -269,9 +288,38 @@ const TimelineClipboardKeybindings = () => {
|
|
|
269
288
|
var _a;
|
|
270
289
|
const { selectedItems } = currentSelection.current;
|
|
271
290
|
const propStatuses = propStatusesRef.current;
|
|
291
|
+
const sequences = sequencesRef.current;
|
|
272
292
|
if (selectedItems.length === 0) {
|
|
273
293
|
return;
|
|
274
294
|
}
|
|
295
|
+
const easingSelections = (0, update_selected_easing_1.getEasingSelections)(selectedItems);
|
|
296
|
+
if (easingSelections.length > 0) {
|
|
297
|
+
e.preventDefault();
|
|
298
|
+
if (easingSelections.length !== 1 ||
|
|
299
|
+
easingSelections.length !== selectedItems.length) {
|
|
300
|
+
(0, NotificationCenter_1.showNotification)('Select one easing to copy', 3000);
|
|
301
|
+
return;
|
|
302
|
+
}
|
|
303
|
+
const payload = (0, exports.getEasingClipboardDataFromSelection)({
|
|
304
|
+
selection: easingSelections[0],
|
|
305
|
+
sequences,
|
|
306
|
+
overrideIdsToNodePaths: overrideIdToNodePathMappings,
|
|
307
|
+
propStatuses,
|
|
308
|
+
});
|
|
309
|
+
if (payload === null) {
|
|
310
|
+
(0, NotificationCenter_1.showNotification)('Cannot copy easing because it cannot be read', 3000);
|
|
311
|
+
return;
|
|
312
|
+
}
|
|
313
|
+
navigator.clipboard
|
|
314
|
+
.writeText(makeClipboardText(payload))
|
|
315
|
+
.then(() => {
|
|
316
|
+
(0, NotificationCenter_1.showNotification)('Copied easing to clipboard', 1000);
|
|
317
|
+
})
|
|
318
|
+
.catch((err) => {
|
|
319
|
+
(0, NotificationCenter_1.showNotification)(`Could not copy easing: ${err.message}`, 2000);
|
|
320
|
+
});
|
|
321
|
+
return;
|
|
322
|
+
}
|
|
275
323
|
if (selectedItems.some((selection) => selection.type === 'sequence-effect-prop')) {
|
|
276
324
|
e.preventDefault();
|
|
277
325
|
if (selectedItems.length !== 1 ||
|
|
@@ -354,6 +402,42 @@ const TimelineClipboardKeybindings = () => {
|
|
|
354
402
|
.then((text) => {
|
|
355
403
|
const propStatuses = propStatusesRef.current;
|
|
356
404
|
const sequences = sequencesRef.current;
|
|
405
|
+
const easingResult = (0, studio_shared_1.parseEasingClipboardDataResult)(text);
|
|
406
|
+
if (easingResult.status !== 'invalid') {
|
|
407
|
+
e.preventDefault();
|
|
408
|
+
if (easingResult.status === 'unsupported-version') {
|
|
409
|
+
(0, NotificationCenter_1.showNotification)('Cannot paste easing copied from a different Remotion Studio version', 4000);
|
|
410
|
+
return;
|
|
411
|
+
}
|
|
412
|
+
const easingSelections = (0, update_selected_easing_1.getEasingSelections)(selectedItems);
|
|
413
|
+
if (easingSelections.length === 0 ||
|
|
414
|
+
easingSelections.length !== selectedItems.length) {
|
|
415
|
+
(0, NotificationCenter_1.showNotification)('Select an easing to paste onto', 3000);
|
|
416
|
+
return;
|
|
417
|
+
}
|
|
418
|
+
const updatePromise = (0, update_selected_easing_1.updateSelectedTimelineEasings)({
|
|
419
|
+
selections: easingSelections,
|
|
420
|
+
sequences,
|
|
421
|
+
overrideIdsToNodePaths: overrideIdToNodePathMappings,
|
|
422
|
+
propStatuses,
|
|
423
|
+
setPropStatuses,
|
|
424
|
+
clientId,
|
|
425
|
+
easing: easingResult.data.easing,
|
|
426
|
+
});
|
|
427
|
+
if (updatePromise === null) {
|
|
428
|
+
(0, NotificationCenter_1.showNotification)('Cannot paste onto an easing that cannot be updated', 3000);
|
|
429
|
+
return;
|
|
430
|
+
}
|
|
431
|
+
return updatePromise
|
|
432
|
+
.then(() => {
|
|
433
|
+
(0, NotificationCenter_1.showNotification)(easingSelections.length === 1
|
|
434
|
+
? 'Pasted easing'
|
|
435
|
+
: 'Pasted easing to selected segments', 2000);
|
|
436
|
+
})
|
|
437
|
+
.catch((err) => {
|
|
438
|
+
(0, NotificationCenter_1.showNotification)(`Could not paste easing: ${err.message}`, 3000);
|
|
439
|
+
});
|
|
440
|
+
}
|
|
357
441
|
const effectPropResult = (0, studio_shared_1.parseEffectPropClipboardDataResult)(text);
|
|
358
442
|
if (effectPropResult.status !== 'invalid') {
|
|
359
443
|
e.preventDefault();
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.TimelineDeleteKeybindings = void 0;
|
|
4
|
+
const studio_shared_1 = require("@remotion/studio-shared");
|
|
4
5
|
const react_1 = require("react");
|
|
5
6
|
const remotion_1 = require("remotion");
|
|
6
7
|
const client_id_1 = require("../../helpers/client-id");
|
|
@@ -29,7 +30,7 @@ const TimelineDeleteKeybindings = () => {
|
|
|
29
30
|
}
|
|
30
31
|
const { clientId } = previewServerState;
|
|
31
32
|
const handleDelete = () => {
|
|
32
|
-
const { selectedItems, clearSelection } = currentSelection.current;
|
|
33
|
+
const { selectedItems, clearSelection, selectItems } = currentSelection.current;
|
|
33
34
|
const sequences = sequencesRef.current;
|
|
34
35
|
const propStatuses = propStatusesRef.current;
|
|
35
36
|
if (selectedItems.length === 0) {
|
|
@@ -57,7 +58,13 @@ const TimelineDeleteKeybindings = () => {
|
|
|
57
58
|
deletePromise
|
|
58
59
|
.then((deleted) => {
|
|
59
60
|
if (deleted) {
|
|
60
|
-
|
|
61
|
+
const nextSelection = (0, delete_selected_timeline_item_1.getTimelineSelectionAfterDeletingItems)(selectedItems);
|
|
62
|
+
if (nextSelection.length === 0) {
|
|
63
|
+
clearSelection();
|
|
64
|
+
}
|
|
65
|
+
else {
|
|
66
|
+
selectItems(nextSelection);
|
|
67
|
+
}
|
|
61
68
|
}
|
|
62
69
|
})
|
|
63
70
|
.catch(() => undefined);
|
|
@@ -72,7 +79,7 @@ const TimelineDeleteKeybindings = () => {
|
|
|
72
79
|
propStatuses,
|
|
73
80
|
setPropStatuses,
|
|
74
81
|
clientId,
|
|
75
|
-
easing:
|
|
82
|
+
easing: studio_shared_1.LINEAR_KEYFRAME_EASING,
|
|
76
83
|
});
|
|
77
84
|
if (resetEasingPromise !== null) {
|
|
78
85
|
resetEasingPromise.catch(() => undefined);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { SequencePropsSubscriptionKey,
|
|
2
|
+
import type { SequencePropsSubscriptionKey, InteractivitySchema } from 'remotion';
|
|
3
3
|
import type { CodePosition } from '../../error-overlay/react-overlay/utils/get-source-map';
|
|
4
4
|
import type { SequenceNodePathInfo } from '../../helpers/get-timeline-sequence-sort-key';
|
|
5
5
|
import type { GetIsExpanded } from '../ExpandedTracksProvider';
|
|
@@ -7,7 +7,7 @@ export declare const TimelineEffectItem: React.FC<{
|
|
|
7
7
|
readonly label: string;
|
|
8
8
|
readonly nodePathInfo: SequenceNodePathInfo;
|
|
9
9
|
readonly effectIndex: number;
|
|
10
|
-
readonly effectSchema:
|
|
10
|
+
readonly effectSchema: InteractivitySchema;
|
|
11
11
|
readonly documentationLink: string | null;
|
|
12
12
|
readonly nodePath: SequencePropsSubscriptionKey;
|
|
13
13
|
readonly validatedLocation: CodePosition;
|
|
@@ -316,7 +316,7 @@ const TimelineEffectItem = ({ label, nodePathInfo, effectIndex, effectSchema, do
|
|
|
316
316
|
...(dropIndicator === 'before' ? { top: -1 } : { bottom: -1 }),
|
|
317
317
|
};
|
|
318
318
|
}, [dropIndicator]);
|
|
319
|
-
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.TimelineExpandArrowButton, { isExpanded: isExpanded, onClick: () => toggleTrack(nodePathInfo), label: `${label} section`, disabled: false }), style: rowStyle, selected: selection.selected, selectable: selection.selectable, onSelect: selection.onSelect, showSelectedBackground: true, containsSelection: false, outerHeight: null, children: jsx_runtime_1.jsx("span", { title: label, style: labelStyle, children: label }) }));
|
|
319
|
+
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.TimelineExpandArrowButton, { isExpanded: isExpanded, onClick: () => toggleTrack(nodePathInfo), label: `${label} section`, disabled: false }), style: rowStyle, selected: selection.selected, selectable: selection.selectable, selectionItem: selection.selectionItem, onSelect: selection.onSelect, showSelectedBackground: true, containsSelection: false, outerHeight: null, children: jsx_runtime_1.jsx("span", { title: label, style: labelStyle, children: label }) }));
|
|
320
320
|
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);
|
|
321
321
|
return previewConnected ? (jsx_runtime_1.jsx(ContextMenu_1.ContextMenu, { values: contextMenuValues, onOpen: selection.selectable ? selection.onSelect : null, children: draggableRow })) : (draggableRow);
|
|
322
322
|
};
|
|
@@ -3,6 +3,13 @@ import type { SequencePropsSubscriptionKey } from 'remotion';
|
|
|
3
3
|
import type { CodePosition } from '../../error-overlay/react-overlay/utils/get-source-map';
|
|
4
4
|
import type { SequenceNodePathInfo } from '../../helpers/get-timeline-sequence-sort-key';
|
|
5
5
|
import type { EffectSchemaFieldInfo } from '../../helpers/timeline-layout';
|
|
6
|
+
import { type TimelineKeyframeControlsMode } from './TimelineKeyframeControls';
|
|
7
|
+
export declare const TimelineEffectPropValue: React.FC<{
|
|
8
|
+
readonly field: EffectSchemaFieldInfo;
|
|
9
|
+
readonly nodePath: SequencePropsSubscriptionKey;
|
|
10
|
+
readonly validatedLocation: CodePosition;
|
|
11
|
+
readonly sourceFrame: number;
|
|
12
|
+
}>;
|
|
6
13
|
export declare const TimelineEffectPropItem: React.FC<{
|
|
7
14
|
readonly field: EffectSchemaFieldInfo;
|
|
8
15
|
readonly validatedLocation: CodePosition;
|
|
@@ -10,4 +17,5 @@ export declare const TimelineEffectPropItem: React.FC<{
|
|
|
10
17
|
readonly nodePath: SequencePropsSubscriptionKey;
|
|
11
18
|
readonly nodePathInfo: SequenceNodePathInfo;
|
|
12
19
|
readonly keyframeDisplayOffset: number;
|
|
20
|
+
readonly keyframeControlsMode?: TimelineKeyframeControlsMode;
|
|
13
21
|
}>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TimelineEffectPropItem = void 0;
|
|
3
|
+
exports.TimelineEffectPropItem = exports.TimelineEffectPropValue = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const studio_shared_1 = require("@remotion/studio-shared");
|
|
6
6
|
const react_1 = require("react");
|
|
@@ -40,7 +40,7 @@ const isResettableStatus = ({ status, defaultValue, }) => {
|
|
|
40
40
|
const effectiveCodeValue = (_a = status.codeValue) !== null && _a !== void 0 ? _a : defaultValue;
|
|
41
41
|
return JSON.stringify(effectiveCodeValue) !== JSON.stringify(defaultValue);
|
|
42
42
|
};
|
|
43
|
-
const
|
|
43
|
+
const TimelineEffectPropValue = ({ field, nodePath, validatedLocation, sourceFrame }) => {
|
|
44
44
|
var _a;
|
|
45
45
|
var _b;
|
|
46
46
|
const { setEffectDragOverrides, clearEffectDragOverrides, setPropStatuses } = (0, react_1.useContext)(remotion_1.Internals.VisualModeSettersContext);
|
|
@@ -58,13 +58,11 @@ const Value = ({ field, nodePath, validatedLocation, keyframeDisplayOffset }) =>
|
|
|
58
58
|
const propStatus = effectStatus.type === 'can-update-effect'
|
|
59
59
|
? ((_b = (_a = effectStatus.props) === null || _a === void 0 ? void 0 : _a[field.key]) !== null && _b !== void 0 ? _b : null)
|
|
60
60
|
: null;
|
|
61
|
-
const timelinePosition = remotion_1.Internals.Timeline.useTimelinePosition();
|
|
62
|
-
const jsxFrame = timelinePosition - keyframeDisplayOffset;
|
|
63
61
|
const onDragValueChange = (0, react_1.useCallback)((value) => {
|
|
64
62
|
const nextDragOverrideValue = propStatus !== null && isKeyframedStatus(propStatus)
|
|
65
63
|
? remotion_1.Internals.makeKeyframedDragOverride({
|
|
66
64
|
status: propStatus,
|
|
67
|
-
frame:
|
|
65
|
+
frame: sourceFrame,
|
|
68
66
|
value,
|
|
69
67
|
})
|
|
70
68
|
: remotion_1.Internals.makeStaticDragOverride(value);
|
|
@@ -72,10 +70,10 @@ const Value = ({ field, nodePath, validatedLocation, keyframeDisplayOffset }) =>
|
|
|
72
70
|
}, [
|
|
73
71
|
field.effectIndex,
|
|
74
72
|
field.key,
|
|
75
|
-
jsxFrame,
|
|
76
73
|
nodePath,
|
|
77
74
|
propStatus,
|
|
78
75
|
setEffectDragOverrides,
|
|
76
|
+
sourceFrame,
|
|
79
77
|
]);
|
|
80
78
|
const onDragEnd = (0, react_1.useCallback)(() => {
|
|
81
79
|
clearEffectDragOverrides(nodePath, field.effectIndex);
|
|
@@ -142,7 +140,7 @@ const Value = ({ field, nodePath, validatedLocation, keyframeDisplayOffset }) =>
|
|
|
142
140
|
setPropStatuses,
|
|
143
141
|
validatedLocation,
|
|
144
142
|
]);
|
|
145
|
-
const onSaveKeyframed = (0, react_1.useCallback)((value,
|
|
143
|
+
const onSaveKeyframed = (0, react_1.useCallback)((value, frame) => {
|
|
146
144
|
if (!validatedLocation) {
|
|
147
145
|
return Promise.reject(new Error('Cannot save'));
|
|
148
146
|
}
|
|
@@ -154,7 +152,7 @@ const Value = ({ field, nodePath, validatedLocation, keyframeDisplayOffset }) =>
|
|
|
154
152
|
nodePath,
|
|
155
153
|
effectIndex: field.effectIndex,
|
|
156
154
|
fieldKey: field.key,
|
|
157
|
-
sourceFrame,
|
|
155
|
+
sourceFrame: frame,
|
|
158
156
|
value,
|
|
159
157
|
schema: field.effectSchema,
|
|
160
158
|
setPropStatuses,
|
|
@@ -197,7 +195,7 @@ const Value = ({ field, nodePath, validatedLocation, keyframeDisplayOffset }) =>
|
|
|
197
195
|
return null;
|
|
198
196
|
}
|
|
199
197
|
if (isKeyframedStatus(propStatus)) {
|
|
200
|
-
return (jsx_runtime_1.jsx(TimelineKeyframedValue_1.TimelineKeyframedValue, { field: field, propStatus: propStatus,
|
|
198
|
+
return (jsx_runtime_1.jsx(TimelineKeyframedValue_1.TimelineKeyframedValue, { field: field, propStatus: propStatus, sourceFrame: sourceFrame, dragOverrideValue: dragOverrideValue, onSave: onSaveKeyframed, onDragValueChange: onDragValueChange, onDragEnd: onDragEnd, scaleLockNodePath: nodePath }));
|
|
201
199
|
}
|
|
202
200
|
if (propStatus.status === 'computed') {
|
|
203
201
|
return jsx_runtime_1.jsx(TimelineSchemaField_1.UnsupportedStatus, { label: (0, get_timeline_keyframes_1.getComputedStatusLabel)(propStatus) });
|
|
@@ -206,12 +204,13 @@ const Value = ({ field, nodePath, validatedLocation, keyframeDisplayOffset }) =>
|
|
|
206
204
|
propStatus,
|
|
207
205
|
dragOverrideValue,
|
|
208
206
|
defaultValue: field.fieldSchema.default,
|
|
209
|
-
frame:
|
|
207
|
+
frame: sourceFrame,
|
|
210
208
|
shouldResortToDefaultValueIfUndefined: true,
|
|
211
209
|
});
|
|
212
210
|
return (jsx_runtime_1.jsx(TimelineSchemaField_1.TimelineFieldValue, { field: field, propStatus: propStatus, onSave: onSave, onDragValueChange: onDragValueChange, onDragEnd: onDragEnd, effectiveValue: effectiveValue, scaleLockNodePath: null }));
|
|
213
211
|
};
|
|
214
|
-
|
|
212
|
+
exports.TimelineEffectPropValue = TimelineEffectPropValue;
|
|
213
|
+
const TimelineEffectPropItem = ({ field, validatedLocation, rowDepth, nodePath, nodePathInfo, keyframeDisplayOffset, keyframeControlsMode = 'timeline', }) => {
|
|
215
214
|
var _a;
|
|
216
215
|
var _b, _c;
|
|
217
216
|
const { previewServerState } = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx);
|
|
@@ -220,6 +219,8 @@ const TimelineEffectPropItem = ({ field, validatedLocation, rowDepth, nodePath,
|
|
|
220
219
|
const { propStatuses } = (0, react_1.useContext)(remotion_1.Internals.VisualModePropStatusesContext);
|
|
221
220
|
const { getEffectDragOverrides } = (0, react_1.useContext)(remotion_1.Internals.VisualModeDragOverridesContext);
|
|
222
221
|
const selection = (0, TimelineSelection_1.useTimelineRowSelection)(nodePathInfo);
|
|
222
|
+
const timelinePosition = remotion_1.Internals.Timeline.useTimelinePosition();
|
|
223
|
+
const sourceFrame = timelinePosition - keyframeDisplayOffset;
|
|
223
224
|
const style = (0, react_1.useMemo)(() => {
|
|
224
225
|
return {
|
|
225
226
|
...fieldRowBase,
|
|
@@ -238,15 +239,18 @@ const TimelineEffectPropItem = ({ field, validatedLocation, rowDepth, nodePath,
|
|
|
238
239
|
const overrides = getEffectDragOverrides(nodePath, field.effectIndex);
|
|
239
240
|
return overrides[field.key];
|
|
240
241
|
}, [getEffectDragOverrides, nodePath, field.effectIndex, field.key]);
|
|
242
|
+
const keyframable = (0, studio_shared_1.isSchemaFieldKeyframable)({
|
|
243
|
+
schema: field.effectSchema,
|
|
244
|
+
key: field.key,
|
|
245
|
+
});
|
|
241
246
|
const keyframeControls = propStatus !== null &&
|
|
242
|
-
(
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
}),
|
|
249
|
-
}) ? (jsx_runtime_1.jsx(TimelineKeyframeControls_1.TimelineKeyframeControls, { fieldKey: field.key, propStatus: propStatus, nodePath: nodePath, fileName: validatedLocation.source, keyframeDisplayOffset: keyframeDisplayOffset, defaultValue: field.fieldSchema.default, dragOverrideValue: dragOverrideValue, schema: field.effectSchema, effectIndex: field.effectIndex, nodePathInfo: nodePathInfo })) : null;
|
|
247
|
+
(keyframeControlsMode === 'inspector'
|
|
248
|
+
? keyframable
|
|
249
|
+
: (0, TimelineKeyframeControls_1.shouldShowTimelineKeyframeControls)({
|
|
250
|
+
propStatus,
|
|
251
|
+
selected: selection.selected,
|
|
252
|
+
keyframable,
|
|
253
|
+
})) ? (jsx_runtime_1.jsx(TimelineKeyframeControls_1.TimelineKeyframeControls, { fieldKey: field.key, propStatus: propStatus, nodePath: nodePath, fileName: validatedLocation.source, keyframeDisplayOffset: keyframeDisplayOffset, defaultValue: field.fieldSchema.default, dragOverrideValue: dragOverrideValue, schema: field.effectSchema, effectIndex: field.effectIndex, nodePathInfo: nodePathInfo, mode: keyframeControlsMode })) : null;
|
|
250
254
|
const canResetToDefault = (0, react_1.useMemo)(() => {
|
|
251
255
|
if (!propStatus || propStatus.status === 'computed') {
|
|
252
256
|
return false;
|
|
@@ -355,8 +359,8 @@ const TimelineEffectPropItem = ({ field, validatedLocation, rowDepth, nodePath,
|
|
|
355
359
|
previewServerState,
|
|
356
360
|
propStatus,
|
|
357
361
|
]);
|
|
358
|
-
const row = (jsx_runtime_1.jsxs(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, showSelectedBackground: true, containsSelection: false, outerHeight: null, children: [
|
|
359
|
-
jsx_runtime_1.jsx(TimelineFieldLabel_1.TimelineFieldLabel, { rowDepth: rowDepth, selected: selection.selected, label: (_c = field.description) !== null && _c !== void 0 ? _c : field.key }), jsx_runtime_1.jsx("div", { style: timeline_field_row_layout_1.timelineFieldValueColumnStyle, children: jsx_runtime_1.jsx(
|
|
362
|
+
const row = (jsx_runtime_1.jsxs(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, selectionItem: selection.selectionItem, onSelect: selection.onSelect, showSelectedBackground: true, containsSelection: false, outerHeight: null, children: [
|
|
363
|
+
jsx_runtime_1.jsx(TimelineFieldLabel_1.TimelineFieldLabel, { rowDepth: rowDepth, selected: selection.selected, label: (_c = field.description) !== null && _c !== void 0 ? _c : field.key }), jsx_runtime_1.jsx("div", { style: timeline_field_row_layout_1.timelineFieldValueColumnStyle, children: jsx_runtime_1.jsx(exports.TimelineEffectPropValue, { field: field, nodePath: nodePath, validatedLocation: validatedLocation, sourceFrame: sourceFrame }) })
|
|
360
364
|
] }));
|
|
361
365
|
return (jsx_runtime_1.jsx(ContextMenu_1.ContextMenu, { values: contextMenuValues, onOpen: selection.selectable ? selection.onSelect : null, children: row }));
|
|
362
366
|
};
|
|
@@ -1,8 +1,41 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
2
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
36
|
exports.TimelineExpandArrowSpacer = exports.TimelineExpandArrowButton = void 0;
|
|
4
37
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const react_1 = require("react");
|
|
38
|
+
const react_1 = __importStar(require("react"));
|
|
6
39
|
const arrowButton = {
|
|
7
40
|
background: 'none',
|
|
8
41
|
border: 'none',
|
|
@@ -27,6 +60,13 @@ const arrowSpacer = {
|
|
|
27
60
|
};
|
|
28
61
|
const svgStyle = { display: 'block' };
|
|
29
62
|
const TimelineExpandArrowButton = ({ isExpanded, onClick, label, disabled = false }) => {
|
|
63
|
+
const handleClick = react_1.default.useCallback((e) => {
|
|
64
|
+
e.stopPropagation();
|
|
65
|
+
onClick();
|
|
66
|
+
}, [onClick]);
|
|
67
|
+
const stopPropagation = react_1.default.useCallback((e) => {
|
|
68
|
+
e.stopPropagation();
|
|
69
|
+
}, []);
|
|
30
70
|
const style = (0, react_1.useMemo)(() => {
|
|
31
71
|
return {
|
|
32
72
|
...arrowButton,
|
|
@@ -35,7 +75,7 @@ const TimelineExpandArrowButton = ({ isExpanded, onClick, label, disabled = fals
|
|
|
35
75
|
opacity: disabled ? 0.5 : 1,
|
|
36
76
|
};
|
|
37
77
|
}, [isExpanded, disabled]);
|
|
38
|
-
return (jsx_runtime_1.jsx("button", { type: "button", style: style, onClick:
|
|
78
|
+
return (jsx_runtime_1.jsx("button", { type: "button", style: style, onClick: handleClick, onDoubleClick: stopPropagation, onPointerDown: stopPropagation, disabled: disabled, "aria-expanded": isExpanded, "aria-label": `${isExpanded ? 'Collapse' : 'Expand'} ${label}`, children: jsx_runtime_1.jsx("svg", { width: "12", height: "12", viewBox: "0 0 8 8", style: svgStyle, children: jsx_runtime_1.jsx("path", { d: "M2 1L6 4L2 7Z", fill: "#ccc" }) }) }));
|
|
39
79
|
};
|
|
40
80
|
exports.TimelineExpandArrowButton = TimelineExpandArrowButton;
|
|
41
81
|
const TimelineExpandArrowSpacer = () => {
|
|
@@ -1,17 +1,20 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { SequencePropsSubscriptionKey,
|
|
2
|
+
import type { SequencePropsSubscriptionKey, InteractivitySchema } from 'remotion';
|
|
3
3
|
import type { CodePosition } from '../../error-overlay/react-overlay/utils/get-source-map';
|
|
4
4
|
import type { SequenceNodePathInfo } from '../../helpers/get-timeline-sequence-sort-key';
|
|
5
5
|
import type { TimelineTreeNode } from '../../helpers/timeline-layout';
|
|
6
6
|
import type { GetIsExpanded } from '../ExpandedTracksProvider';
|
|
7
|
+
import type { TimelineKeyframeControlsMode } from './TimelineKeyframeControls';
|
|
7
8
|
export declare const TimelineExpandedRow: React.FC<{
|
|
8
9
|
readonly node: TimelineTreeNode;
|
|
9
10
|
readonly depth: number;
|
|
10
11
|
readonly nestedDepth: number;
|
|
12
|
+
readonly rowDepthBase?: number;
|
|
11
13
|
readonly getIsExpanded: GetIsExpanded;
|
|
12
14
|
readonly toggleTrack: (nodePathInfo: SequenceNodePathInfo) => void;
|
|
13
15
|
readonly validatedLocation: CodePosition;
|
|
14
16
|
readonly nodePath: SequencePropsSubscriptionKey;
|
|
15
|
-
readonly schema:
|
|
17
|
+
readonly schema: InteractivitySchema;
|
|
16
18
|
readonly keyframeDisplayOffset: number;
|
|
19
|
+
readonly keyframeControlsMode?: TimelineKeyframeControlsMode;
|
|
17
20
|
}>;
|
|
@@ -20,8 +20,8 @@ const rowLabel = {
|
|
|
20
20
|
color: 'rgba(255, 255, 255, 0.8)',
|
|
21
21
|
userSelect: 'none',
|
|
22
22
|
};
|
|
23
|
-
const TimelineExpandedRow = ({ node, depth, nestedDepth, getIsExpanded, toggleTrack, validatedLocation, nodePath, schema, keyframeDisplayOffset, }) => {
|
|
24
|
-
const rowDepth = (0, timeline_row_layout_1.getExpandedRowDepth)({ nestedDepth, treeDepth:
|
|
23
|
+
const TimelineExpandedRow = ({ node, depth, nestedDepth, rowDepthBase, getIsExpanded, toggleTrack, validatedLocation, nodePath, schema, keyframeDisplayOffset, keyframeControlsMode, }) => {
|
|
24
|
+
const rowDepth = (rowDepthBase !== null && rowDepthBase !== void 0 ? rowDepthBase : (0, timeline_row_layout_1.getExpandedRowDepth)({ nestedDepth, treeDepth: 0 })) + depth;
|
|
25
25
|
const selection = (0, TimelineSelection_1.useTimelineRowSelection)(node.nodePathInfo);
|
|
26
26
|
const labelStyle = react_1.default.useMemo(() => ({
|
|
27
27
|
...rowLabel,
|
|
@@ -44,19 +44,19 @@ const TimelineExpandedRow = ({ node, depth, nestedDepth, getIsExpanded, toggleTr
|
|
|
44
44
|
const isExpanded = getIsExpanded(node.nodePathInfo);
|
|
45
45
|
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: {
|
|
46
46
|
height: timeline_layout_1.TREE_GROUP_ROW_HEIGHT,
|
|
47
|
-
}, 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 }) }));
|
|
47
|
+
}, selected: selection.selected, selectable: selection.selectable, selectionItem: selection.selectionItem, onSelect: selection.onSelect, showSelectedBackground: true, containsSelection: false, outerHeight: null, children: jsx_runtime_1.jsx("span", { style: labelStyle, children: node.label }) }));
|
|
48
48
|
}
|
|
49
49
|
if (node.field) {
|
|
50
50
|
if (node.field.kind === 'effect-field') {
|
|
51
|
-
return (jsx_runtime_1.jsx(TimelineEffectPropItem_1.TimelineEffectPropItem, { field: node.field, validatedLocation: validatedLocation, rowDepth: rowDepth, nodePath: nodePath, nodePathInfo: node.nodePathInfo, keyframeDisplayOffset: keyframeDisplayOffset }));
|
|
51
|
+
return (jsx_runtime_1.jsx(TimelineEffectPropItem_1.TimelineEffectPropItem, { field: node.field, validatedLocation: validatedLocation, rowDepth: rowDepth, nodePath: nodePath, nodePathInfo: node.nodePathInfo, keyframeDisplayOffset: keyframeDisplayOffset, keyframeControlsMode: keyframeControlsMode }));
|
|
52
52
|
}
|
|
53
53
|
if (node.field.kind === 'sequence-field') {
|
|
54
|
-
return (jsx_runtime_1.jsx(TimelineSequencePropItem_1.TimelineSequencePropItem, { field: node.field, validatedLocation: validatedLocation, rowDepth: rowDepth, nodePath: nodePath, nodePathInfo: node.nodePathInfo, schema: schema, keyframeDisplayOffset: keyframeDisplayOffset }));
|
|
54
|
+
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 }));
|
|
55
55
|
}
|
|
56
56
|
throw new Error('Unexpected field kind: ' + JSON.stringify(node.field));
|
|
57
57
|
}
|
|
58
58
|
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: {
|
|
59
59
|
height: (0, timeline_layout_1.getTreeRowHeight)(node),
|
|
60
|
-
}, 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 }) }));
|
|
60
|
+
}, selected: selection.selected, selectable: selection.selectable, selectionItem: selection.selectionItem, onSelect: selection.onSelect, showSelectedBackground: true, containsSelection: false, outerHeight: null, children: jsx_runtime_1.jsx("span", { style: labelStyle, children: node.label }) }));
|
|
61
61
|
};
|
|
62
62
|
exports.TimelineExpandedRow = TimelineExpandedRow;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import type { TSequence } from 'remotion';
|
|
3
3
|
import type { CodePosition } from '../../error-overlay/react-overlay/utils/get-source-map';
|
|
4
4
|
import type { SequenceNodePathInfo } from '../../helpers/get-timeline-sequence-sort-key';
|
|
5
5
|
export declare const TimelineExpandedSection: React.FC<{
|