@remotion/studio 4.0.472 → 4.0.474
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/rename-static-file.d.ts +6 -0
- package/dist/api/rename-static-file.js +18 -0
- package/dist/components/AssetSelector.js +45 -4
- package/dist/components/AssetSelectorItem.js +177 -27
- package/dist/components/Canvas.js +131 -11
- package/dist/components/ConfirmationDialog-types.d.ts +8 -0
- package/dist/components/ConfirmationDialog-types.js +2 -0
- package/dist/components/ConfirmationDialog.d.ts +7 -0
- package/dist/components/ConfirmationDialog.js +103 -0
- package/dist/components/ContextMenu.d.ts +9 -1
- package/dist/components/ContextMenu.js +49 -5
- package/dist/components/CurrentAsset.d.ts +1 -0
- package/dist/components/CurrentAsset.js +13 -2
- package/dist/components/EditorContent.js +15 -2
- package/dist/components/EditorContexts.js +2 -1
- package/dist/components/EditorRuler/Ruler.js +2 -0
- package/dist/components/ExplorerPanel.d.ts +0 -4
- package/dist/components/ExplorerPanel.js +8 -4
- package/dist/components/ExplorerPanelRef.d.ts +4 -0
- package/dist/components/ExplorerPanelRef.js +5 -0
- package/dist/components/FilePreview.d.ts +1 -1
- package/dist/components/InitialCompositionLoader.d.ts +0 -1
- package/dist/components/InitialCompositionLoader.js +5 -27
- package/dist/components/Menu/MenuItem.js +7 -1
- package/dist/components/Menu/SubMenu.js +5 -1
- package/dist/components/Menu/portals.js +17 -8
- package/dist/components/MenuToolbar.js +5 -1
- package/dist/components/ModalContainer.js +6 -1
- package/dist/components/Modals.js +5 -2
- package/dist/components/NewComposition/ComboBox.js +8 -2
- package/dist/components/NewComposition/InputDragger.d.ts +1 -0
- package/dist/components/NewComposition/InputDragger.js +9 -6
- package/dist/components/NewComposition/RenameStaticFile.d.ts +4 -0
- package/dist/components/NewComposition/RenameStaticFile.js +118 -0
- package/dist/components/OptionsPanel.js +5 -1
- package/dist/components/OutlineToggle.d.ts +2 -0
- package/dist/components/OutlineToggle.js +20 -0
- package/dist/components/Preview.d.ts +0 -2
- package/dist/components/Preview.js +23 -33
- package/dist/components/PreviewToolbar.js +19 -6
- package/dist/components/RenderButton.js +8 -2
- package/dist/components/RenderPreview.js +2 -2
- package/dist/components/SelectedOutlineOverlay.d.ts +29 -3
- package/dist/components/SelectedOutlineOverlay.js +259 -80
- package/dist/components/ShowOutlinesProvider.d.ts +4 -0
- package/dist/components/ShowOutlinesProvider.js +24 -0
- package/dist/components/SizeSelector.js +3 -3
- package/dist/components/Splitter/SplitterHandle.js +2 -0
- package/dist/components/StaticFilePreview.js +2 -2
- package/dist/components/Timeline/KeyframeSettingsModal.d.ts +15 -0
- package/dist/components/Timeline/KeyframeSettingsModal.js +150 -0
- package/dist/components/Timeline/SequencePropsObserver.js +3 -3
- package/dist/components/Timeline/Timeline.js +3 -13
- package/dist/components/Timeline/TimelineClipboardKeybindings.d.ts +26 -3
- package/dist/components/Timeline/TimelineClipboardKeybindings.js +242 -25
- package/dist/components/Timeline/TimelineDeleteKeybindings.js +23 -11
- package/dist/components/Timeline/TimelineEffectItem.js +8 -7
- package/dist/components/Timeline/TimelineEffectPropItem.js +69 -19
- package/dist/components/Timeline/TimelineExpandedKeyframeRow.js +6 -1
- package/dist/components/Timeline/TimelineExpandedSection.js +5 -5
- package/dist/components/Timeline/TimelineKeyframeControls.js +13 -23
- package/dist/components/Timeline/TimelineKeyframeDiamond.js +24 -22
- package/dist/components/Timeline/TimelineKeyframeDiamondIcon.d.ts +6 -0
- package/dist/components/Timeline/TimelineKeyframeDiamondIcon.js +14 -0
- package/dist/components/Timeline/TimelineKeyframeDragState.d.ts +17 -0
- package/dist/components/Timeline/TimelineKeyframeDragState.js +39 -0
- package/dist/components/Timeline/TimelineKeyframeEasingLine.d.ts +9 -0
- package/dist/components/Timeline/TimelineKeyframeEasingLine.js +120 -0
- package/dist/components/Timeline/TimelineKeyframedValue.js +1 -1
- package/dist/components/Timeline/TimelineList.js +2 -2
- package/dist/components/Timeline/TimelineMediaInfo.d.ts +0 -13
- package/dist/components/Timeline/TimelineMediaInfo.js +8 -73
- package/dist/components/Timeline/TimelineNumberField.js +15 -7
- package/dist/components/Timeline/TimelineRotationField.js +17 -11
- package/dist/components/Timeline/TimelineScaleField.js +17 -13
- package/dist/components/Timeline/TimelineSelection.d.ts +15 -0
- package/dist/components/Timeline/TimelineSelection.js +26 -1
- package/dist/components/Timeline/TimelineSequence.js +6 -6
- package/dist/components/Timeline/TimelineSequenceItem.d.ts +1 -0
- package/dist/components/Timeline/TimelineSequenceItem.js +297 -36
- package/dist/components/Timeline/TimelineSequencePropItem.js +113 -48
- package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.d.ts +5 -5
- package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.js +69 -70
- package/dist/components/Timeline/TimelineTranslateField.js +24 -19
- package/dist/components/Timeline/TimelineUvCoordinateField.js +18 -12
- package/dist/components/Timeline/apply-effect-response-to-prop-statuses.d.ts +5 -0
- package/dist/components/Timeline/apply-effect-response-to-prop-statuses.js +19 -0
- package/dist/components/Timeline/call-add-keyframe.d.ts +5 -5
- package/dist/components/Timeline/call-add-keyframe.js +6 -4
- package/dist/components/Timeline/call-delete-keyframe.d.ts +7 -7
- package/dist/components/Timeline/call-delete-keyframe.js +7 -7
- package/dist/components/Timeline/call-move-keyframe.d.ts +19 -0
- package/dist/components/Timeline/call-move-keyframe.js +71 -0
- package/dist/components/Timeline/call-update-keyframe-settings.d.ts +22 -0
- package/dist/components/Timeline/call-update-keyframe-settings.js +52 -0
- package/dist/components/Timeline/delete-selected-keyframe.d.ts +5 -5
- package/dist/components/Timeline/delete-selected-keyframe.js +5 -5
- package/dist/components/Timeline/delete-selected-timeline-item.d.ts +10 -7
- package/dist/components/Timeline/delete-selected-timeline-item.js +37 -23
- package/dist/components/Timeline/duplicate-selected-timeline-item.d.ts +4 -2
- package/dist/components/Timeline/duplicate-selected-timeline-item.js +39 -34
- package/dist/components/Timeline/get-bounded-keyframe-drag-delta.d.ts +8 -0
- package/dist/components/Timeline/get-bounded-keyframe-drag-delta.js +12 -0
- package/dist/components/Timeline/get-keyframe-navigation.d.ts +2 -2
- package/dist/components/Timeline/get-keyframe-navigation.js +14 -6
- package/dist/components/Timeline/get-node-keyframes.d.ts +3 -3
- package/dist/components/Timeline/get-node-keyframes.js +4 -4
- package/dist/components/Timeline/get-timeline-easing-segments.d.ts +9 -0
- package/dist/components/Timeline/get-timeline-easing-segments.js +19 -0
- package/dist/components/Timeline/reset-selected-timeline-props.d.ts +7 -7
- package/dist/components/Timeline/reset-selected-timeline-props.js +13 -12
- package/dist/components/Timeline/save-effect-prop.d.ts +16 -5
- package/dist/components/Timeline/save-effect-prop.js +37 -19
- package/dist/components/Timeline/save-prop-queue.d.ts +4 -3
- package/dist/components/Timeline/save-prop-queue.js +6 -3
- package/dist/components/Timeline/save-sequence-prop.d.ts +5 -10
- package/dist/components/Timeline/save-sequence-prop.js +35 -32
- package/dist/components/Timeline/should-clear-selection-on-pointer-down.d.ts +3 -0
- package/dist/components/Timeline/should-clear-selection-on-pointer-down.js +7 -0
- package/dist/components/Timeline/timeline-asset-link.d.ts +13 -0
- package/dist/components/Timeline/timeline-asset-link.js +37 -0
- package/dist/components/Timeline/timeline-field-utils.d.ts +10 -0
- package/dist/components/Timeline/timeline-field-utils.js +26 -5
- package/dist/components/Timeline/timeline-translate-utils.d.ts +1 -1
- package/dist/components/Timeline/timeline-translate-utils.js +6 -4
- package/dist/components/Timeline/use-expanded-track-keyframe-rows.js +7 -7
- package/dist/components/Timeline/use-sequence-props-subscription.js +3 -3
- package/dist/components/Timeline/use-timeline-height.js +3 -3
- package/dist/components/Timeline/use-timeline-keyframe-drag.d.ts +10 -0
- package/dist/components/Timeline/use-timeline-keyframe-drag.js +380 -0
- package/dist/components/import-assets.d.ts +31 -0
- package/dist/components/import-assets.js +216 -17
- package/dist/components/load-canvas-content-from-url.d.ts +1 -0
- package/dist/components/load-canvas-content-from-url.js +9 -3
- package/dist/components/use-select-asset.d.ts +1 -0
- package/dist/components/use-select-asset.js +30 -0
- package/dist/error-overlay/error-origin.d.ts +3 -0
- package/dist/error-overlay/error-origin.js +42 -0
- package/dist/error-overlay/react-overlay/listen-to-runtime-errors.js +6 -2
- package/dist/error-overlay/remotion-overlay/ErrorLoader.js +38 -0
- package/dist/error-overlay/remotion-overlay/ShortcutHint.js +1 -1
- package/dist/error-overlay/remotion-overlay/log-studio-error.d.ts +3 -0
- package/dist/error-overlay/remotion-overlay/log-studio-error.js +27 -0
- package/dist/esm/{chunk-48grt472.js → chunk-xjvc8qen.js} +21838 -18862
- package/dist/esm/internals.mjs +21838 -18862
- package/dist/esm/previewEntry.mjs +21127 -18127
- package/dist/esm/renderEntry.mjs +1 -1
- package/dist/helpers/get-asset-metadata.js +2 -2
- package/dist/helpers/get-preview-file-type.d.ts +2 -0
- package/dist/helpers/get-preview-file-type.js +33 -0
- package/dist/helpers/install-required-package.d.ts +1 -0
- package/dist/helpers/install-required-package.js +39 -0
- package/dist/helpers/remote-asset-drag.d.ts +4 -0
- package/dist/helpers/remote-asset-drag.js +73 -0
- package/dist/helpers/timeline-layout.d.ts +6 -6
- package/dist/helpers/timeline-layout.js +5 -5
- package/dist/helpers/use-asset-drag-events.d.ts +5 -2
- package/dist/helpers/use-asset-drag-events.js +13 -2
- package/dist/hot-middleware-client/client.js +6 -0
- package/dist/state/editor-outlines.d.ts +8 -0
- package/dist/state/editor-outlines.js +18 -0
- package/dist/state/modals.d.ts +16 -2
- package/package.json +10 -10
- package/dist/helpers/detect-file-type.d.ts +0 -69
- package/dist/helpers/detect-file-type.js +0 -278
|
@@ -0,0 +1,120 @@
|
|
|
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
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.TimelineKeyframeEasingLine = void 0;
|
|
37
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
38
|
+
const react_1 = __importStar(require("react"));
|
|
39
|
+
const remotion_1 = require("remotion");
|
|
40
|
+
const colors_1 = require("../../helpers/colors");
|
|
41
|
+
const get_left_of_timeline_slider_1 = require("../../helpers/get-left-of-timeline-slider");
|
|
42
|
+
const timeline_layout_1 = require("../../helpers/timeline-layout");
|
|
43
|
+
const TimelineSelection_1 = require("./TimelineSelection");
|
|
44
|
+
const TimelineWidthProvider_1 = require("./TimelineWidthProvider");
|
|
45
|
+
const hitTargetHeight = 12;
|
|
46
|
+
const lineHeight = 2;
|
|
47
|
+
const easingLineButton = {
|
|
48
|
+
background: 'none',
|
|
49
|
+
border: 'none',
|
|
50
|
+
height: hitTargetHeight,
|
|
51
|
+
padding: 0,
|
|
52
|
+
position: 'absolute',
|
|
53
|
+
transform: 'translateY(-50%)',
|
|
54
|
+
};
|
|
55
|
+
const easingLine = {
|
|
56
|
+
backgroundColor: colors_1.LINE_COLOR,
|
|
57
|
+
borderRadius: lineHeight / 2,
|
|
58
|
+
height: lineHeight,
|
|
59
|
+
left: 0,
|
|
60
|
+
position: 'absolute',
|
|
61
|
+
right: 0,
|
|
62
|
+
top: '50%',
|
|
63
|
+
transform: 'translateY(-50%)',
|
|
64
|
+
};
|
|
65
|
+
const TimelineKeyframeEasingLineUnmemoized = ({ fromFrame, toFrame, rowHeight, nodePathInfo, segmentIndex }) => {
|
|
66
|
+
const videoConfig = (0, remotion_1.useVideoConfig)();
|
|
67
|
+
const timelineWidth = (0, react_1.useContext)(TimelineWidthProvider_1.TimelineWidthContext);
|
|
68
|
+
const { selected, onSelect, selectable } = (0, TimelineSelection_1.useTimelineEasingSelection)({
|
|
69
|
+
nodePathInfo,
|
|
70
|
+
fromFrame,
|
|
71
|
+
toFrame,
|
|
72
|
+
segmentIndex,
|
|
73
|
+
});
|
|
74
|
+
const style = (0, react_1.useMemo)(() => {
|
|
75
|
+
if (timelineWidth === null) {
|
|
76
|
+
return null;
|
|
77
|
+
}
|
|
78
|
+
const fromLeft = (0, get_left_of_timeline_slider_1.getXPositionOfItemInTimelineImperatively)(fromFrame, videoConfig.durationInFrames, timelineWidth) - timeline_layout_1.TIMELINE_PADDING;
|
|
79
|
+
const toLeft = (0, get_left_of_timeline_slider_1.getXPositionOfItemInTimelineImperatively)(toFrame, videoConfig.durationInFrames, timelineWidth) - timeline_layout_1.TIMELINE_PADDING;
|
|
80
|
+
const left = Math.min(fromLeft, toLeft);
|
|
81
|
+
const width = Math.abs(toLeft - fromLeft);
|
|
82
|
+
if (width === 0) {
|
|
83
|
+
return null;
|
|
84
|
+
}
|
|
85
|
+
return {
|
|
86
|
+
...easingLineButton,
|
|
87
|
+
left,
|
|
88
|
+
pointerEvents: selectable ? 'auto' : 'none',
|
|
89
|
+
top: rowHeight / 2,
|
|
90
|
+
width,
|
|
91
|
+
};
|
|
92
|
+
}, [
|
|
93
|
+
fromFrame,
|
|
94
|
+
rowHeight,
|
|
95
|
+
selectable,
|
|
96
|
+
timelineWidth,
|
|
97
|
+
toFrame,
|
|
98
|
+
videoConfig.durationInFrames,
|
|
99
|
+
]);
|
|
100
|
+
const lineStyle = (0, react_1.useMemo)(() => ({
|
|
101
|
+
...easingLine,
|
|
102
|
+
outline: selected ? `1px solid ${colors_1.BLUE}` : undefined,
|
|
103
|
+
}), [selected]);
|
|
104
|
+
const onPointerDown = (0, react_1.useCallback)((event) => {
|
|
105
|
+
if (!selectable || event.button !== 0) {
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
108
|
+
event.preventDefault();
|
|
109
|
+
event.stopPropagation();
|
|
110
|
+
onSelect({
|
|
111
|
+
shiftKey: event.shiftKey,
|
|
112
|
+
toggleKey: event.metaKey || event.ctrlKey,
|
|
113
|
+
});
|
|
114
|
+
}, [onSelect, selectable]);
|
|
115
|
+
if (style === null) {
|
|
116
|
+
return null;
|
|
117
|
+
}
|
|
118
|
+
return (jsx_runtime_1.jsx("button", { type: "button", style: style, title: `Easing from frame ${fromFrame} to ${toFrame}`, "aria-label": `Select easing from frame ${fromFrame} to ${toFrame}`, onPointerDown: selectable ? onPointerDown : undefined, children: jsx_runtime_1.jsx("div", { style: lineStyle }) }));
|
|
119
|
+
};
|
|
120
|
+
exports.TimelineKeyframeEasingLine = react_1.default.memo(TimelineKeyframeEasingLineUnmemoized);
|
|
@@ -27,7 +27,7 @@ const TimelineKeyframedValue = ({ field, propStatus, keyframeDisplayOffset, drag
|
|
|
27
27
|
}), [computedValue]);
|
|
28
28
|
const effectiveValue = (0, react_1.useMemo)(() => {
|
|
29
29
|
return remotion_1.Internals.getEffectiveVisualModeValue({
|
|
30
|
-
|
|
30
|
+
propStatus: fakeStatus,
|
|
31
31
|
dragOverrideValue,
|
|
32
32
|
frame: jsxFrame,
|
|
33
33
|
defaultValue: field.fieldSchema.default,
|
|
@@ -11,8 +11,8 @@ const container = {
|
|
|
11
11
|
};
|
|
12
12
|
const TimelineList = ({ timeline }) => {
|
|
13
13
|
return (jsx_runtime_1.jsxs("div", { style: container, children: [
|
|
14
|
-
jsx_runtime_1.jsx(TimelineTimeIndicators_1.TimelineTimePadding, {}), timeline.map((track) => {
|
|
15
|
-
return (jsx_runtime_1.jsx("div", { children: jsx_runtime_1.jsx(TimelineSequenceItem_1.TimelineSequenceItem, { nestedDepth: track.depth, sequence: track.sequence, nodePathInfo: track.nodePathInfo, keyframeDisplayOffset: track.keyframeDisplayOffset }, track.sequence.id) }, track.sequence.id));
|
|
14
|
+
jsx_runtime_1.jsx(TimelineTimeIndicators_1.TimelineTimePadding, {}), timeline.map((track, trackIndex) => {
|
|
15
|
+
return (jsx_runtime_1.jsx("div", { children: jsx_runtime_1.jsx(TimelineSequenceItem_1.TimelineSequenceItem, { trackIndex: trackIndex, nestedDepth: track.depth, sequence: track.sequence, nodePathInfo: track.nodePathInfo, keyframeDisplayOffset: track.keyframeDisplayOffset }, track.sequence.id) }, track.sequence.id));
|
|
16
16
|
})] }));
|
|
17
17
|
};
|
|
18
18
|
exports.TimelineList = TimelineList;
|
|
@@ -1,17 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
type LinkInfo = {
|
|
3
|
-
kind: 'local';
|
|
4
|
-
assetPath: string;
|
|
5
|
-
title: string;
|
|
6
|
-
} | {
|
|
7
|
-
kind: 'remote';
|
|
8
|
-
href: string;
|
|
9
|
-
title: string;
|
|
10
|
-
} | null;
|
|
11
|
-
export type TimelineAssetLinkInfo = Exclude<LinkInfo, null>;
|
|
12
|
-
export declare const getTimelineAssetLinkInfo: (src: string) => LinkInfo;
|
|
13
|
-
export declare const openTimelineAssetLink: (linkInfo: TimelineAssetLinkInfo, setCanvasContent: React.Dispatch<React.SetStateAction<import("remotion").CanvasContent | null>>) => void;
|
|
14
2
|
export declare const TimelineMediaInfo: React.FC<{
|
|
15
3
|
readonly src: string;
|
|
16
4
|
}>;
|
|
17
|
-
export {};
|
|
@@ -1,44 +1,12 @@
|
|
|
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
|
-
})();
|
|
35
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.TimelineMediaInfo =
|
|
3
|
+
exports.TimelineMediaInfo = void 0;
|
|
37
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
38
|
-
const react_1 =
|
|
5
|
+
const react_1 = require("react");
|
|
39
6
|
const remotion_1 = require("remotion");
|
|
40
7
|
const colors_1 = require("../../helpers/colors");
|
|
41
|
-
const
|
|
8
|
+
const use_select_asset_1 = require("../use-select-asset");
|
|
9
|
+
const timeline_asset_link_1 = require("./timeline-asset-link");
|
|
42
10
|
const TimelineSelection_1 = require("./TimelineSelection");
|
|
43
11
|
const lineStyle = {
|
|
44
12
|
whiteSpace: 'nowrap',
|
|
@@ -49,43 +17,10 @@ const lineStyle = {
|
|
|
49
17
|
color: colors_1.VERY_LIGHT_TEXT,
|
|
50
18
|
display: 'inline-block',
|
|
51
19
|
};
|
|
52
|
-
const getTimelineAssetLinkInfo = (src) => {
|
|
53
|
-
const staticBase = typeof window === 'undefined' ? null : window.remotion_staticBase;
|
|
54
|
-
if (staticBase && src.startsWith(staticBase + '/')) {
|
|
55
|
-
const assetPath = src.slice(staticBase.length + 1);
|
|
56
|
-
return {
|
|
57
|
-
kind: 'local',
|
|
58
|
-
assetPath: decodeURIComponent(assetPath),
|
|
59
|
-
title: decodeURIComponent(assetPath),
|
|
60
|
-
};
|
|
61
|
-
}
|
|
62
|
-
if (src.startsWith('http://') ||
|
|
63
|
-
src.startsWith('https://') ||
|
|
64
|
-
src.startsWith('//')) {
|
|
65
|
-
try {
|
|
66
|
-
const url = new URL(src.startsWith('//') ? 'https:' + src : src);
|
|
67
|
-
return { kind: 'remote', href: src, title: url.hostname };
|
|
68
|
-
}
|
|
69
|
-
catch (_a) {
|
|
70
|
-
return { kind: 'remote', href: src, title: src };
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
return null;
|
|
74
|
-
};
|
|
75
|
-
exports.getTimelineAssetLinkInfo = getTimelineAssetLinkInfo;
|
|
76
|
-
const openTimelineAssetLink = (linkInfo, setCanvasContent) => {
|
|
77
|
-
if (linkInfo.kind === 'local') {
|
|
78
|
-
setCanvasContent({ type: 'asset', asset: linkInfo.assetPath });
|
|
79
|
-
(0, url_state_1.pushUrl)(`/assets/${linkInfo.assetPath}`);
|
|
80
|
-
return;
|
|
81
|
-
}
|
|
82
|
-
window.open(linkInfo.href, '_blank', 'noopener,noreferrer');
|
|
83
|
-
};
|
|
84
|
-
exports.openTimelineAssetLink = openTimelineAssetLink;
|
|
85
20
|
const useAssetLink = (src) => {
|
|
86
|
-
const
|
|
21
|
+
const selectAsset = (0, use_select_asset_1.useSelectAsset)();
|
|
87
22
|
const [hovered, setHovered] = (0, react_1.useState)(false);
|
|
88
|
-
const linkInfo = (0, react_1.useMemo)(() => (0,
|
|
23
|
+
const linkInfo = (0, react_1.useMemo)(() => (0, timeline_asset_link_1.getTimelineAssetLinkInfo)(src), [src]);
|
|
89
24
|
const interactive = !TimelineSelection_1.SELECTION_ENABLED && linkInfo !== null;
|
|
90
25
|
const onClick = (0, react_1.useCallback)((e) => {
|
|
91
26
|
if (!linkInfo) {
|
|
@@ -93,8 +28,8 @@ const useAssetLink = (src) => {
|
|
|
93
28
|
}
|
|
94
29
|
e.preventDefault();
|
|
95
30
|
e.stopPropagation();
|
|
96
|
-
(0,
|
|
97
|
-
}, [linkInfo,
|
|
31
|
+
(0, timeline_asset_link_1.openTimelineAssetLink)(linkInfo, selectAsset);
|
|
32
|
+
}, [linkInfo, selectAsset]);
|
|
98
33
|
const onPointerEnter = (0, react_1.useCallback)(() => setHovered(true), []);
|
|
99
34
|
const onPointerLeave = (0, react_1.useCallback)(() => setHovered(false), []);
|
|
100
35
|
const fileNameStyle = (0, react_1.useMemo)(() => ({
|
|
@@ -6,7 +6,7 @@ const react_1 = require("react");
|
|
|
6
6
|
const InputDragger_1 = require("../NewComposition/InputDragger");
|
|
7
7
|
const timeline_field_utils_1 = require("./timeline-field-utils");
|
|
8
8
|
const TimelineNumberField = ({ field, effectiveValue, onSave, onDragValueChange, onDragEnd, propStatus, }) => {
|
|
9
|
-
var _a, _b
|
|
9
|
+
var _a, _b;
|
|
10
10
|
const [dragValue, setDragValue] = (0, react_1.useState)(null);
|
|
11
11
|
const onValueChange = (0, react_1.useCallback)((newVal) => {
|
|
12
12
|
setDragValue(newVal);
|
|
@@ -33,17 +33,25 @@ const TimelineNumberField = ({ field, effectiveValue, onSave, onDragValueChange,
|
|
|
33
33
|
});
|
|
34
34
|
}
|
|
35
35
|
}, [onSave, propStatus]);
|
|
36
|
-
const
|
|
37
|
-
const
|
|
36
|
+
const configuredStep = field.fieldSchema.type === 'number' ? field.fieldSchema.step : undefined;
|
|
37
|
+
const step = configuredStep !== null && configuredStep !== void 0 ? configuredStep : 1;
|
|
38
|
+
const stepDecimals = (0, react_1.useMemo)(() => configuredStep === undefined ? null : (0, timeline_field_utils_1.getDecimalPlaces)(configuredStep), [configuredStep]);
|
|
38
39
|
const formatter = (0, react_1.useCallback)((v) => {
|
|
39
40
|
const num = Number(v);
|
|
40
|
-
|
|
41
|
-
|
|
41
|
+
if (stepDecimals === null) {
|
|
42
|
+
const digits = (0, timeline_field_utils_1.getDecimalPlaces)(num);
|
|
43
|
+
return digits === 0 ? String(num) : num.toFixed(digits);
|
|
44
|
+
}
|
|
45
|
+
return (0, timeline_field_utils_1.formatTimelineNumber)({
|
|
46
|
+
decimalPlaces: stepDecimals,
|
|
47
|
+
fixed: true,
|
|
48
|
+
value: num,
|
|
49
|
+
});
|
|
42
50
|
}, [stepDecimals]);
|
|
43
51
|
return (jsx_runtime_1.jsx(InputDragger_1.InputDragger, { type: "number", value: dragValue !== null && dragValue !== void 0 ? dragValue : effectiveValue, style: timeline_field_utils_1.draggerStyle, status: "ok", small: true, onValueChange: onValueChange, onValueChangeEnd: onValueChangeEnd, onTextChange: onTextChange, min: field.fieldSchema.type === 'number'
|
|
44
|
-
? ((
|
|
52
|
+
? ((_a = field.fieldSchema.min) !== null && _a !== void 0 ? _a : -Infinity)
|
|
45
53
|
: -Infinity, max: field.fieldSchema.type === 'number'
|
|
46
|
-
? ((
|
|
54
|
+
? ((_b = field.fieldSchema.max) !== null && _b !== void 0 ? _b : Infinity)
|
|
47
55
|
: Infinity, step: step, formatter: formatter, rightAlign: false }));
|
|
48
56
|
};
|
|
49
57
|
exports.TimelineNumberField = TimelineNumberField;
|
|
@@ -26,7 +26,7 @@ const parseCssRotationToDegrees = (value) => {
|
|
|
26
26
|
}
|
|
27
27
|
};
|
|
28
28
|
const TimelineRotationField = ({ field, effectiveValue, propStatus, onSave, onDragValueChange, onDragEnd, }) => {
|
|
29
|
-
var _a, _b
|
|
29
|
+
var _a, _b;
|
|
30
30
|
const [dragValue, setDragValue] = (0, react_1.useState)(null);
|
|
31
31
|
const isCssRotation = field.fieldSchema.type === 'rotation-css';
|
|
32
32
|
const degrees = (0, react_1.useMemo)(() => {
|
|
@@ -68,23 +68,29 @@ const TimelineRotationField = ({ field, effectiveValue, propStatus, onSave, onDr
|
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
70
|
}, [propStatus, onSave, serializeValue]);
|
|
71
|
-
const
|
|
71
|
+
const configuredStep = field.fieldSchema.type === 'rotation-css' ||
|
|
72
72
|
field.fieldSchema.type === 'rotation-degrees'
|
|
73
|
-
?
|
|
74
|
-
:
|
|
73
|
+
? field.fieldSchema.step
|
|
74
|
+
: undefined;
|
|
75
|
+
const step = configuredStep !== null && configuredStep !== void 0 ? configuredStep : 1;
|
|
75
76
|
const min = field.fieldSchema.type === 'rotation-degrees'
|
|
76
|
-
? ((
|
|
77
|
+
? ((_a = field.fieldSchema.min) !== null && _a !== void 0 ? _a : -Infinity)
|
|
77
78
|
: -Infinity;
|
|
78
79
|
const max = field.fieldSchema.type === 'rotation-degrees'
|
|
79
|
-
? ((
|
|
80
|
+
? ((_b = field.fieldSchema.max) !== null && _b !== void 0 ? _b : Infinity)
|
|
80
81
|
: Infinity;
|
|
81
|
-
const
|
|
82
|
+
const decimalPlaces = (0, react_1.useMemo)(() => (0, timeline_field_utils_1.getTimelineDisplayDecimalPlaces)({
|
|
83
|
+
defaultDecimalPlaces: 1,
|
|
84
|
+
step: configuredStep,
|
|
85
|
+
}), [configuredStep]);
|
|
82
86
|
const formatter = (0, react_1.useCallback)((v) => {
|
|
83
|
-
const
|
|
84
|
-
|
|
85
|
-
|
|
87
|
+
const formatted = (0, timeline_field_utils_1.formatTimelineNumber)({
|
|
88
|
+
decimalPlaces,
|
|
89
|
+
fixed: false,
|
|
90
|
+
value: (0, timeline_field_utils_1.normalizeTimelineNumber)(Number(v)),
|
|
91
|
+
});
|
|
86
92
|
return `${formatted}\u00B0`;
|
|
87
|
-
}, [
|
|
93
|
+
}, [decimalPlaces]);
|
|
88
94
|
return (jsx_runtime_1.jsx(InputDragger_1.InputDragger, { type: "number", value: dragValue !== null && dragValue !== void 0 ? dragValue : degrees, style: timeline_field_utils_1.draggerStyle, status: "ok", small: true, onValueChange: onValueChange, onValueChangeEnd: onValueChangeEnd, onTextChange: onTextChange, min: min, max: max, step: step, formatter: formatter, rightAlign: false }));
|
|
89
95
|
};
|
|
90
96
|
exports.TimelineRotationField = TimelineRotationField;
|
|
@@ -24,7 +24,7 @@ const toggleStyle = {
|
|
|
24
24
|
...TimelineLayerEye_1.timelineLayerIconContainer,
|
|
25
25
|
border: 'none',
|
|
26
26
|
color: colors_1.LIGHT_COLOR,
|
|
27
|
-
cursor: '
|
|
27
|
+
cursor: 'default',
|
|
28
28
|
marginRight: 0,
|
|
29
29
|
padding: 0,
|
|
30
30
|
};
|
|
@@ -78,7 +78,7 @@ const LinkToggle = ({ linked, onToggle }) => {
|
|
|
78
78
|
return (jsx_runtime_1.jsx("button", { type: "button", style: toggleStyle, onPointerDown: onPointerDown, title: linked ? 'Unlink scale axes' : 'Link scale axes', "aria-label": linked ? 'Unlink scale axes' : 'Link scale axes', children: linked ? (jsx_runtime_1.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 640 640", style: linkIconStyle, children: jsx_runtime_1.jsx("path", { fill: "currentcolor", d: "M32 320C32 214 118 128 224 128L288 128L288 192L224 192C153.3 192 96 249.3 96 320C96 390.7 153.3 448 224 448L288 448L288 512L224 512C118 512 32 426 32 320zM608 320C608 426 522 512 416 512L352 512L352 448L416 448C486.7 448 544 390.7 544 320C544 249.3 486.7 192 416 192L352 192L352 128L416 128C522 128 608 214 608 320zM224 288L448 288L448 352L192 352L192 288L224 288z" }) })) : null }));
|
|
79
79
|
};
|
|
80
80
|
const TimelineScaleField = ({ field, propStatus, effectiveValue, onSave, onDragValueChange, onDragEnd, scaleLockNodePath, }) => {
|
|
81
|
-
var _a, _b
|
|
81
|
+
var _a, _b;
|
|
82
82
|
const [dragX, setDragX] = (0, react_1.useState)(null);
|
|
83
83
|
const [dragY, setDragY] = (0, react_1.useState)(null);
|
|
84
84
|
const dragStartRef = (0, react_1.useRef)(null);
|
|
@@ -90,21 +90,25 @@ const TimelineScaleField = ({ field, propStatus, effectiveValue, onSave, onDragV
|
|
|
90
90
|
fieldKey: field.key,
|
|
91
91
|
defaultValue: defaultLinked,
|
|
92
92
|
});
|
|
93
|
-
const
|
|
94
|
-
|
|
95
|
-
: 0.01;
|
|
93
|
+
const configuredStep = field.fieldSchema.type === 'scale' ? field.fieldSchema.step : undefined;
|
|
94
|
+
const step = configuredStep !== null && configuredStep !== void 0 ? configuredStep : 0.01;
|
|
96
95
|
const min = field.fieldSchema.type === 'scale'
|
|
97
|
-
? ((
|
|
96
|
+
? ((_a = field.fieldSchema.min) !== null && _a !== void 0 ? _a : -Infinity)
|
|
98
97
|
: -Infinity;
|
|
99
98
|
const max = field.fieldSchema.type === 'scale'
|
|
100
|
-
? ((
|
|
99
|
+
? ((_b = field.fieldSchema.max) !== null && _b !== void 0 ? _b : Infinity)
|
|
101
100
|
: Infinity;
|
|
102
|
-
const
|
|
101
|
+
const decimalPlaces = (0, react_1.useMemo)(() => (0, timeline_field_utils_1.getTimelineDisplayDecimalPlaces)({
|
|
102
|
+
defaultDecimalPlaces: 2,
|
|
103
|
+
step: configuredStep,
|
|
104
|
+
}), [configuredStep]);
|
|
103
105
|
const formatter = (0, react_1.useCallback)((v) => {
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
106
|
+
return (0, timeline_field_utils_1.formatTimelineNumber)({
|
|
107
|
+
decimalPlaces,
|
|
108
|
+
fixed: true,
|
|
109
|
+
value: v,
|
|
110
|
+
});
|
|
111
|
+
}, [decimalPlaces]);
|
|
108
112
|
const getDragStart = (0, react_1.useCallback)(() => {
|
|
109
113
|
if (dragStartRef.current === null) {
|
|
110
114
|
dragStartRef.current = [dragX !== null && dragX !== void 0 ? dragX : codeX, dragY !== null && dragY !== void 0 ? dragY : codeY];
|
|
@@ -308,7 +312,7 @@ const TimelineScaleField = ({ field, propStatus, effectiveValue, onSave, onDragV
|
|
|
308
312
|
});
|
|
309
313
|
}, [field.key, linked, scaleLockNodePath, setScaleLockState]);
|
|
310
314
|
return (jsx_runtime_1.jsxs("span", { style: containerStyle, children: [
|
|
311
|
-
jsx_runtime_1.jsx(
|
|
315
|
+
jsx_runtime_1.jsx(InputDragger_1.InputDragger, { type: "number", value: dragX !== null && dragX !== void 0 ? dragX : codeX, style: leftDraggerStyle, status: "ok", small: true, onValueChange: onXChange, onValueChangeEnd: onXChangeEnd, onTextChange: onXTextChange, min: min, max: max, step: step, formatter: formatter, rightAlign: false }), jsx_runtime_1.jsx("div", { style: gapStyle }), jsx_runtime_1.jsx(InputDragger_1.InputDragger, { type: "number", value: dragY !== null && dragY !== void 0 ? dragY : codeY, style: rightDraggerStyle, status: "ok", small: true, onValueChange: onYChange, onValueChangeEnd: onYChangeEnd, onTextChange: onYTextChange, min: min, max: max, step: step, formatter: formatter, rightAlign: false }), jsx_runtime_1.jsx(LinkToggle, { linked: linked, onToggle: onToggleLink })
|
|
312
316
|
] }));
|
|
313
317
|
};
|
|
314
318
|
exports.TimelineScaleField = TimelineScaleField;
|
|
@@ -30,6 +30,11 @@ export type TimelineSelection = (TimelineSelectionBase & {
|
|
|
30
30
|
}) | (TimelineSelectionBase & {
|
|
31
31
|
readonly type: 'keyframe';
|
|
32
32
|
readonly frame: number;
|
|
33
|
+
}) | (TimelineSelectionBase & {
|
|
34
|
+
readonly type: 'easing';
|
|
35
|
+
readonly fromFrame: number;
|
|
36
|
+
readonly toFrame: number;
|
|
37
|
+
readonly segmentIndex: number;
|
|
33
38
|
});
|
|
34
39
|
export type TimelineSelectionInteraction = {
|
|
35
40
|
readonly shiftKey: boolean;
|
|
@@ -81,5 +86,15 @@ export declare const useTimelineKeyframeSelection: (nodePathInfo: SequenceNodePa
|
|
|
81
86
|
selectable: boolean;
|
|
82
87
|
selected: boolean;
|
|
83
88
|
};
|
|
89
|
+
export declare const useTimelineEasingSelection: ({ nodePathInfo, fromFrame, toFrame, segmentIndex, }: {
|
|
90
|
+
readonly nodePathInfo: SequenceNodePathInfo;
|
|
91
|
+
readonly fromFrame: number;
|
|
92
|
+
readonly toFrame: number;
|
|
93
|
+
readonly segmentIndex: number;
|
|
94
|
+
}) => {
|
|
95
|
+
onSelect: (interaction?: TimelineSelectionInteraction | undefined) => void;
|
|
96
|
+
selectable: boolean;
|
|
97
|
+
selected: boolean;
|
|
98
|
+
};
|
|
84
99
|
export declare const useTimelineRowContainsSelection: (nodePathInfo: SequenceNodePathInfo | null) => boolean;
|
|
85
100
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useTimelineRowContainsSelection = exports.useTimelineKeyframeSelection = exports.useTimelineRowSelection = exports.useCurrentTimelineSelectionStateAsRef = exports.useTimelineSelection = exports.TimelineSelectionProvider = exports.TimelineSelectAllKeybindings = exports.getTimelineSequenceSelectionKey = exports.getSelectableTimelineSequenceSelections = exports.getTimelineSelectionFromNodePathInfo = exports.getTimelineSelectionAfterInteraction = exports.isTimelineSelectionModifierEvent = exports.ENABLE_OUTLINES = exports.TIMELINE_TOP_DRAG = exports.SELECTION_ENABLED = exports.getTimelineSelectedTrackHighlightStyle = exports.getTimelineColor = exports.getTimelineSelectedLabelStyle = exports.TIMELINE_SELECTED_LABEL_HORIZONTAL_PADDING = exports.TIMELINE_SELECTED_LABEL_TEXT = exports.TIMELINE_SELECTED_LABEL_BACKGROUND = exports.TIMELINE_SELECTED_BACKGROUND = void 0;
|
|
3
|
+
exports.useTimelineRowContainsSelection = exports.useTimelineEasingSelection = exports.useTimelineKeyframeSelection = exports.useTimelineRowSelection = exports.useCurrentTimelineSelectionStateAsRef = exports.useTimelineSelection = exports.TimelineSelectionProvider = exports.TimelineSelectAllKeybindings = exports.getTimelineSequenceSelectionKey = exports.getSelectableTimelineSequenceSelections = exports.getTimelineSelectionFromNodePathInfo = exports.getTimelineSelectionAfterInteraction = exports.isTimelineSelectionModifierEvent = exports.ENABLE_OUTLINES = exports.TIMELINE_TOP_DRAG = exports.SELECTION_ENABLED = exports.getTimelineSelectedTrackHighlightStyle = exports.getTimelineColor = exports.getTimelineSelectedLabelStyle = exports.TIMELINE_SELECTED_LABEL_HORIZONTAL_PADDING = exports.TIMELINE_SELECTED_LABEL_TEXT = exports.TIMELINE_SELECTED_LABEL_BACKGROUND = exports.TIMELINE_SELECTED_BACKGROUND = 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");
|
|
@@ -191,6 +191,8 @@ const getTimelineSelectionKey = (item) => {
|
|
|
191
191
|
return `${sequenceKey}.sequence-effect-prop.${item.i}.${item.key}`;
|
|
192
192
|
case 'keyframe':
|
|
193
193
|
return `${(0, timeline_node_path_key_1.timelineNodePathInfoToKey)(item.nodePathInfo)}.keyframe.${item.frame}`;
|
|
194
|
+
case 'easing':
|
|
195
|
+
return `${(0, timeline_node_path_key_1.timelineNodePathInfoToKey)(item.nodePathInfo)}.easing.${item.segmentIndex}.${item.fromFrame}.${item.toFrame}`;
|
|
194
196
|
default:
|
|
195
197
|
throw new Error(`Unexpected timeline selection type: ${item}`);
|
|
196
198
|
}
|
|
@@ -408,6 +410,29 @@ const useTimelineKeyframeSelection = (nodePathInfo, frame) => {
|
|
|
408
410
|
};
|
|
409
411
|
};
|
|
410
412
|
exports.useTimelineKeyframeSelection = useTimelineKeyframeSelection;
|
|
413
|
+
const useTimelineEasingSelection = ({ nodePathInfo, fromFrame, toFrame, segmentIndex, }) => {
|
|
414
|
+
const { canSelect, isSelected, selectItem, registerSelectableItem } = (0, exports.useTimelineSelection)();
|
|
415
|
+
const selectionItem = (0, react_1.useMemo)(() => ({
|
|
416
|
+
type: 'easing',
|
|
417
|
+
nodePathInfo,
|
|
418
|
+
fromFrame,
|
|
419
|
+
toFrame,
|
|
420
|
+
segmentIndex,
|
|
421
|
+
}), [nodePathInfo, fromFrame, segmentIndex, toFrame]);
|
|
422
|
+
(0, react_1.useEffect)(() => {
|
|
423
|
+
return registerSelectableItem(selectionItem);
|
|
424
|
+
}, [registerSelectableItem, selectionItem]);
|
|
425
|
+
const selected = isSelected(selectionItem);
|
|
426
|
+
const onSelect = (0, react_1.useCallback)((interaction) => {
|
|
427
|
+
selectItem(selectionItem, interaction);
|
|
428
|
+
}, [selectItem, selectionItem]);
|
|
429
|
+
return {
|
|
430
|
+
onSelect,
|
|
431
|
+
selectable: canSelect,
|
|
432
|
+
selected,
|
|
433
|
+
};
|
|
434
|
+
};
|
|
435
|
+
exports.useTimelineEasingSelection = useTimelineEasingSelection;
|
|
411
436
|
const useTimelineRowContainsSelection = (nodePathInfo) => {
|
|
412
437
|
const { containsSelection } = (0, exports.useTimelineSelection)();
|
|
413
438
|
if (nodePathInfo === null) {
|
|
@@ -151,15 +151,15 @@ const TimelineSequenceInner = ({ s, windowWidth, nodePathInfo, sequenceFrameOffs
|
|
|
151
151
|
column: (_a = originalLocation.column) !== null && _a !== void 0 ? _a : 0,
|
|
152
152
|
};
|
|
153
153
|
}, [originalLocation]);
|
|
154
|
-
const {
|
|
154
|
+
const { propStatuses } = (0, react_1.useContext)(remotion_1.Internals.VisualModePropStatusesContext);
|
|
155
155
|
const nodePath = (_d = nodePathInfo === null || nodePathInfo === void 0 ? void 0 : nodePathInfo.sequenceSubscriptionKey) !== null && _d !== void 0 ? _d : null;
|
|
156
|
-
const
|
|
156
|
+
const propStatusesForOverride = (0, react_1.useMemo)(() => {
|
|
157
157
|
return nodePath
|
|
158
|
-
? remotion_1.Internals.
|
|
158
|
+
? remotion_1.Internals.getPropStatusesCtx(propStatuses, nodePath)
|
|
159
159
|
: undefined;
|
|
160
|
-
}, [
|
|
161
|
-
const durationCanUpdate = Boolean(((_a =
|
|
162
|
-
const fromCanUpdate = Boolean(((_b =
|
|
160
|
+
}, [propStatuses, nodePath]);
|
|
161
|
+
const durationCanUpdate = Boolean(((_a = propStatusesForOverride === null || propStatusesForOverride === void 0 ? void 0 : propStatusesForOverride.durationInFrames) === null || _a === void 0 ? void 0 : _a.status) === 'static');
|
|
162
|
+
const fromCanUpdate = Boolean(((_b = propStatusesForOverride === null || propStatusesForOverride === void 0 ? void 0 : propStatusesForOverride.from) === null || _b === void 0 ? void 0 : _b.status) === 'static');
|
|
163
163
|
const { onPointerDown: onMoveDragPointerDown } = (0, TimelineSequenceRightEdgeDragHandle_1.useTimelineSequenceFromDrag)({
|
|
164
164
|
nodePathInfo,
|
|
165
165
|
windowWidth,
|