@remotion/studio 4.0.467 → 4.0.469
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/AudioWaveform.d.ts +1 -0
- package/dist/components/AudioWaveform.js +23 -22
- package/dist/components/CompositionSelectorItem.js +1 -1
- package/dist/components/ContextMenu.d.ts +1 -0
- package/dist/components/ContextMenu.js +3 -2
- package/dist/components/EditorGuides/Guide.js +1 -1
- package/dist/components/ExpandedTracksProvider.js +3 -8
- package/dist/components/Menu/MenuItem.js +2 -2
- package/dist/components/Menu/MenuSubItem.js +5 -5
- package/dist/components/PreviewToolbar.js +2 -4
- package/dist/components/Timeline/Timeline.js +14 -13
- package/dist/components/Timeline/TimelineDragHandler.js +1 -1
- package/dist/components/Timeline/TimelineEffectFieldRow.d.ts +2 -0
- package/dist/components/Timeline/TimelineEffectFieldRow.js +9 -14
- package/dist/components/Timeline/TimelineEffectGroupRow.js +13 -4
- package/dist/components/Timeline/TimelineExpandedKeyframeRow.d.ts +11 -0
- package/dist/components/Timeline/TimelineExpandedKeyframeRow.js +23 -0
- package/dist/components/Timeline/TimelineExpandedRow.js +22 -6
- package/dist/components/Timeline/TimelineExpandedSection.js +2 -2
- package/dist/components/Timeline/TimelineExpandedTrackKeyframes.d.ts +2 -1
- package/dist/components/Timeline/TimelineExpandedTrackKeyframes.js +11 -116
- package/dist/components/Timeline/TimelineFieldLabel.d.ts +6 -0
- package/dist/components/Timeline/TimelineFieldLabel.js +30 -0
- package/dist/components/Timeline/TimelineFieldRow.d.ts +3 -2
- package/dist/components/Timeline/TimelineFieldRow.js +7 -13
- package/dist/components/Timeline/TimelineItemStack.d.ts +5 -0
- package/dist/components/Timeline/TimelineItemStack.js +82 -0
- package/dist/components/Timeline/TimelineKeyframeDiamond.d.ts +7 -0
- package/dist/components/Timeline/TimelineKeyframeDiamond.js +87 -0
- package/dist/components/Timeline/TimelineLayerEye.js +1 -0
- package/dist/components/Timeline/TimelineList.js +13 -9
- package/dist/components/Timeline/TimelineListItem.d.ts +0 -1
- package/dist/components/Timeline/TimelineListItem.js +100 -31
- package/dist/components/Timeline/TimelineMediaInfo.d.ts +13 -1
- package/dist/components/Timeline/TimelineMediaInfo.js +33 -80
- package/dist/components/Timeline/TimelineRowChrome.d.ts +8 -1
- package/dist/components/Timeline/TimelineRowChrome.js +46 -6
- package/dist/components/Timeline/TimelineSchemaField.js +7 -2
- package/dist/components/Timeline/TimelineSelection.d.ts +41 -0
- package/dist/components/Timeline/TimelineSelection.js +160 -0
- package/dist/components/Timeline/TimelineSequence.js +1 -1
- package/dist/components/Timeline/TimelineSequenceName.d.ts +7 -0
- package/dist/components/Timeline/TimelineSequenceName.js +50 -0
- package/dist/components/Timeline/TimelineTrack.d.ts +5 -0
- package/dist/components/Timeline/TimelineTrack.js +64 -0
- package/dist/components/Timeline/TimelineTracks.js +2 -16
- package/dist/components/Timeline/TimelineUvCoordinateField.d.ts +11 -0
- package/dist/components/Timeline/TimelineUvCoordinateField.js +126 -0
- package/dist/components/Timeline/TimelineVideoInfo.js +11 -12
- package/dist/components/Timeline/get-node-keyframes.d.ts +11 -0
- package/dist/components/Timeline/get-node-keyframes.js +23 -0
- package/dist/components/Timeline/get-timeline-keyframes.d.ts +1 -1
- package/dist/components/Timeline/get-timeline-keyframes.js +14 -9
- package/dist/components/Timeline/timeline-field-row-layout.d.ts +1 -0
- package/dist/components/Timeline/timeline-field-row-layout.js +11 -1
- package/dist/components/Timeline/use-expanded-track-keyframe-rows.d.ts +17 -0
- package/dist/components/Timeline/use-expanded-track-keyframe-rows.js +45 -0
- package/dist/components/Timeline/use-open-sequence-in-editor.d.ts +6 -0
- package/dist/components/Timeline/use-open-sequence-in-editor.js +31 -0
- package/dist/esm/{chunk-vwnse6c9.js → chunk-1mp51e0w.js} +3353 -2712
- package/dist/esm/chunk-6jf1natv.js +25 -0
- package/dist/esm/index.mjs +16 -0
- package/dist/esm/internals.mjs +3366 -2710
- package/dist/esm/previewEntry.mjs +3376 -2720
- package/dist/esm/renderEntry.mjs +4 -3
- package/dist/helpers/calculate-timeline.js +4 -0
- package/dist/helpers/colors.d.ts +1 -1
- package/dist/helpers/colors.js +1 -1
- package/dist/helpers/get-timeline-sequence-sort-key.d.ts +1 -0
- package/dist/helpers/timeline-layout.d.ts +8 -7
- package/dist/helpers/timeline-layout.js +9 -8
- package/dist/helpers/timeline-node-path-key.d.ts +2 -0
- package/dist/helpers/timeline-node-path-key.js +10 -0
- package/package.json +10 -10
- package/dist/components/Timeline/TimelineStack/index.d.ts +0 -8
- package/dist/components/Timeline/TimelineStack/index.js +0 -119
- package/dist/esm/chunk-5gtx3pza.js +0 -9
|
@@ -2,21 +2,26 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getTimelineKeyframes = exports.getComputedStatusLabel = void 0;
|
|
4
4
|
const getComputedStatusLabel = (propStatus) => {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
throw new Error(`Unsupported prop status: ${propStatus.reason}`);
|
|
5
|
+
if (propStatus.reason === 'computed') {
|
|
6
|
+
return 'computed';
|
|
8
7
|
}
|
|
9
|
-
return
|
|
8
|
+
return 'keyframed';
|
|
10
9
|
};
|
|
11
10
|
exports.getComputedStatusLabel = getComputedStatusLabel;
|
|
12
|
-
const getTimelineKeyframes = (propStatus) => {
|
|
13
|
-
var _a;
|
|
11
|
+
const getTimelineKeyframes = (propStatus, keyframeDisplayOffset = 0) => {
|
|
14
12
|
if (!propStatus || propStatus.canUpdate) {
|
|
15
13
|
return [];
|
|
16
14
|
}
|
|
17
|
-
if (propStatus.reason
|
|
18
|
-
|
|
15
|
+
if (propStatus.reason === 'computed') {
|
|
16
|
+
return [];
|
|
17
|
+
}
|
|
18
|
+
const { keyframes } = propStatus;
|
|
19
|
+
if (keyframeDisplayOffset === 0) {
|
|
20
|
+
return keyframes;
|
|
19
21
|
}
|
|
20
|
-
return (
|
|
22
|
+
return keyframes.map((keyframe) => ({
|
|
23
|
+
...keyframe,
|
|
24
|
+
frame: keyframe.frame + keyframeDisplayOffset,
|
|
25
|
+
}));
|
|
21
26
|
};
|
|
22
27
|
exports.getTimelineKeyframes = getTimelineKeyframes;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getTimelineFieldLabelRowStyle = void 0;
|
|
3
|
+
exports.timelineFieldValueColumnStyle = exports.getTimelineFieldLabelRowStyle = void 0;
|
|
4
|
+
const timeline_layout_1 = require("../../helpers/timeline-layout");
|
|
4
5
|
const timeline_row_layout_1 = require("./timeline-row-layout");
|
|
5
6
|
const getTimelineFieldLabelRowStyle = (depth) => {
|
|
6
7
|
return {
|
|
7
8
|
flex: `0 0 ${(0, timeline_row_layout_1.getTimelineFieldLabelFlexBasis)(depth)}`,
|
|
9
|
+
minWidth: 0,
|
|
8
10
|
display: 'flex',
|
|
9
11
|
flexDirection: 'row',
|
|
10
12
|
alignItems: 'center',
|
|
@@ -12,3 +14,11 @@ const getTimelineFieldLabelRowStyle = (depth) => {
|
|
|
12
14
|
};
|
|
13
15
|
};
|
|
14
16
|
exports.getTimelineFieldLabelRowStyle = getTimelineFieldLabelRowStyle;
|
|
17
|
+
exports.timelineFieldValueColumnStyle = {
|
|
18
|
+
alignItems: 'center',
|
|
19
|
+
alignSelf: 'stretch',
|
|
20
|
+
display: 'flex',
|
|
21
|
+
flex: 1,
|
|
22
|
+
minWidth: 0,
|
|
23
|
+
paddingRight: timeline_layout_1.EXPANDED_SECTION_PADDING_RIGHT,
|
|
24
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type TSequence } from 'remotion';
|
|
2
|
+
import type { SequenceNodePathInfo } from '../../helpers/get-timeline-sequence-sort-key';
|
|
3
|
+
import type { getTimelineKeyframes } from './get-timeline-keyframes';
|
|
4
|
+
export type ExpandedTrackKeyframeRow = {
|
|
5
|
+
readonly height: number;
|
|
6
|
+
readonly keyframes: ReturnType<typeof getTimelineKeyframes>;
|
|
7
|
+
readonly nodePathInfo: SequenceNodePathInfo;
|
|
8
|
+
readonly rowKey: string;
|
|
9
|
+
};
|
|
10
|
+
export declare const useExpandedTrackKeyframeRows: ({ sequence, nodePathInfo, keyframeDisplayOffset, }: {
|
|
11
|
+
sequence: TSequence;
|
|
12
|
+
nodePathInfo: SequenceNodePathInfo;
|
|
13
|
+
keyframeDisplayOffset: number;
|
|
14
|
+
}) => {
|
|
15
|
+
readonly rows: ExpandedTrackKeyframeRow[];
|
|
16
|
+
readonly expandedHeight: number;
|
|
17
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useExpandedTrackKeyframeRows = void 0;
|
|
4
|
+
const react_1 = require("react");
|
|
5
|
+
const remotion_1 = require("remotion");
|
|
6
|
+
const timeline_layout_1 = require("../../helpers/timeline-layout");
|
|
7
|
+
const timeline_node_path_key_1 = require("../../helpers/timeline-node-path-key");
|
|
8
|
+
const ExpandedTracksProvider_1 = require("../ExpandedTracksProvider");
|
|
9
|
+
const get_node_keyframes_1 = require("./get-node-keyframes");
|
|
10
|
+
const useExpandedTrackKeyframeRows = ({ sequence, nodePathInfo, keyframeDisplayOffset, }) => {
|
|
11
|
+
const { getIsExpanded } = (0, react_1.useContext)(ExpandedTracksProvider_1.ExpandedTracksGetterContext);
|
|
12
|
+
const { codeValues } = (0, react_1.useContext)(remotion_1.Internals.VisualModeCodeValuesContext);
|
|
13
|
+
const tree = (0, react_1.useMemo)(() => (0, timeline_layout_1.buildTimelineTree)({
|
|
14
|
+
sequence,
|
|
15
|
+
nodePathInfo,
|
|
16
|
+
getDragOverrides: () => ({}),
|
|
17
|
+
getEffectDragOverrides: () => ({}),
|
|
18
|
+
codeValues,
|
|
19
|
+
}), [codeValues, nodePathInfo, sequence]);
|
|
20
|
+
const flat = (0, react_1.useMemo)(() => (0, timeline_layout_1.flattenVisibleTreeNodes)({ nodes: tree, getIsExpanded }), [tree, getIsExpanded]);
|
|
21
|
+
const expandedHeight = (0, react_1.useMemo)(() => (0, timeline_layout_1.getExpandedTrackHeight)({
|
|
22
|
+
sequence,
|
|
23
|
+
nodePathInfo,
|
|
24
|
+
getIsExpanded,
|
|
25
|
+
codeValues,
|
|
26
|
+
}), [codeValues, getIsExpanded, nodePathInfo, sequence]);
|
|
27
|
+
const rows = (0, react_1.useMemo)(() => flat.map(({ node }) => ({
|
|
28
|
+
height: (0, timeline_layout_1.getTreeRowHeight)(node),
|
|
29
|
+
keyframes: (0, get_node_keyframes_1.getNodeKeyframes)({
|
|
30
|
+
node,
|
|
31
|
+
nodePath: nodePathInfo.sequenceSubscriptionKey,
|
|
32
|
+
codeValues,
|
|
33
|
+
keyframeDisplayOffset,
|
|
34
|
+
}),
|
|
35
|
+
rowKey: (0, timeline_node_path_key_1.timelineNodePathInfoToKey)(node.nodePathInfo),
|
|
36
|
+
nodePathInfo: node.nodePathInfo,
|
|
37
|
+
})), [
|
|
38
|
+
codeValues,
|
|
39
|
+
flat,
|
|
40
|
+
keyframeDisplayOffset,
|
|
41
|
+
nodePathInfo.sequenceSubscriptionKey,
|
|
42
|
+
]);
|
|
43
|
+
return { rows, expandedHeight };
|
|
44
|
+
};
|
|
45
|
+
exports.useExpandedTrackKeyframeRows = useExpandedTrackKeyframeRows;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useOpenSequenceInEditor = void 0;
|
|
4
|
+
const react_1 = require("react");
|
|
5
|
+
const client_id_1 = require("../../helpers/client-id");
|
|
6
|
+
const open_in_editor_1 = require("../../helpers/open-in-editor");
|
|
7
|
+
const NotificationCenter_1 = require("../Notifications/NotificationCenter");
|
|
8
|
+
const use_resolved_stack_react_to_change_1 = require("./use-resolved-stack-react-to-change");
|
|
9
|
+
const useOpenSequenceInEditor = (sequence) => {
|
|
10
|
+
const { previewServerState } = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx);
|
|
11
|
+
const previewConnected = previewServerState.type === 'connected';
|
|
12
|
+
const originalLocation = (0, use_resolved_stack_react_to_change_1.useResolveStackAndReactToChange)(sequence.getStack);
|
|
13
|
+
const canOpenInEditor = (0, react_1.useMemo)(() => Boolean(window.remotion_editorName && previewConnected && originalLocation), [originalLocation, previewConnected]);
|
|
14
|
+
const openInEditor = (0, react_1.useCallback)(async () => {
|
|
15
|
+
if (!canOpenInEditor || !originalLocation) {
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
try {
|
|
19
|
+
await (0, open_in_editor_1.openOriginalPositionInEditor)(originalLocation);
|
|
20
|
+
}
|
|
21
|
+
catch (err) {
|
|
22
|
+
(0, NotificationCenter_1.showNotification)(err.message, 2000);
|
|
23
|
+
}
|
|
24
|
+
}, [canOpenInEditor, originalLocation]);
|
|
25
|
+
return {
|
|
26
|
+
canOpenInEditor,
|
|
27
|
+
openInEditor,
|
|
28
|
+
originalLocation,
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
exports.useOpenSequenceInEditor = useOpenSequenceInEditor;
|