@remotion/studio 4.0.465 → 4.0.467
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/CompositionSelectorItem.js +16 -79
- package/dist/components/CurrentAsset.js +8 -54
- package/dist/components/EditorContent.js +1 -3
- package/dist/components/Menu/MenuItem.d.ts +1 -1
- package/dist/components/Modals.js +1 -1
- package/dist/components/NewComposition/MenuContent.js +1 -0
- package/dist/components/NewComposition/ValidationMessage.d.ts +1 -0
- package/dist/components/NewComposition/ValidationMessage.js +3 -3
- package/dist/components/RenderButton.js +1 -0
- package/dist/components/RenderModal/DataEditor.js +8 -2
- package/dist/components/RenderModal/RenderModalAdvanced.d.ts +1 -11
- package/dist/components/RenderModal/RenderModalAdvanced.js +4 -50
- package/dist/components/RenderModal/RenderModalEncoding.d.ts +37 -0
- package/dist/components/RenderModal/RenderModalEncoding.js +165 -0
- package/dist/components/RenderModal/RenderModalPicture.d.ts +1 -22
- package/dist/components/RenderModal/RenderModalPicture.js +6 -84
- package/dist/components/RenderModal/ServerRenderModal.d.ts +1 -0
- package/dist/components/RenderModal/ServerRenderModal.js +16 -4
- package/dist/components/RenderModal/get-render-modal-warnings.d.ts +7 -1
- package/dist/components/RenderModal/get-render-modal-warnings.js +21 -7
- package/dist/components/RenderQueue/actions.d.ts +2 -1
- package/dist/components/RenderQueue/actions.js +2 -1
- package/dist/components/SidebarRenderButton.js +1 -0
- package/dist/components/Timeline/Timeline.js +6 -4
- package/dist/components/Timeline/TimelineEffectFieldRow.js +2 -1
- package/dist/components/Timeline/TimelineEffectGroupRow.d.ts +1 -0
- package/dist/components/Timeline/TimelineEffectGroupRow.js +18 -2
- package/dist/components/Timeline/TimelineExpandedRow.d.ts +1 -1
- package/dist/components/Timeline/TimelineExpandedRow.js +1 -1
- package/dist/components/Timeline/TimelineExpandedSection.js +9 -2
- package/dist/components/Timeline/TimelineExpandedTrackKeyframes.d.ts +7 -0
- package/dist/components/Timeline/TimelineExpandedTrackKeyframes.js +124 -0
- package/dist/components/Timeline/TimelineListItem.js +21 -3
- package/dist/components/Timeline/TimelineMediaInfo.d.ts +5 -0
- package/dist/components/Timeline/TimelineMediaInfo.js +173 -0
- package/dist/components/Timeline/TimelineSchemaField.js +2 -1
- package/dist/components/Timeline/TimelineStack/index.js +7 -47
- package/dist/components/Timeline/TimelineTracks.js +2 -16
- package/dist/components/Timeline/TimelineVideoInfo.js +2 -2
- package/dist/components/Timeline/get-timeline-keyframes.d.ts +6 -0
- package/dist/components/Timeline/get-timeline-keyframes.js +22 -0
- package/dist/components/composition-menu-items.d.ts +12 -0
- package/dist/components/composition-menu-items.js +166 -0
- package/dist/esm/chunk-5gtx3pza.js +9 -0
- package/dist/esm/{chunk-pqk2qd0d.js → chunk-vwnse6c9.js} +4297 -3547
- package/dist/esm/index.mjs +0 -16
- package/dist/esm/internals.mjs +4295 -3560
- package/dist/esm/previewEntry.mjs +4049 -3314
- package/dist/esm/renderEntry.mjs +3 -4
- package/dist/helpers/format-media-duration.d.ts +1 -0
- package/dist/helpers/format-media-duration.js +14 -0
- package/dist/helpers/get-timeline-sequence-layout.js +4 -3
- package/dist/helpers/make-render-command.d.ts +2 -2
- package/dist/helpers/make-render-command.js +2 -1
- package/dist/helpers/open-in-editor.d.ts +8 -0
- package/dist/helpers/open-in-editor.js +58 -1
- package/dist/helpers/render-modal-sections.d.ts +1 -1
- package/dist/helpers/render-modal-sections.js +35 -5
- package/dist/helpers/retry-payload.js +3 -0
- package/dist/helpers/timeline-layout.d.ts +11 -6
- package/dist/helpers/timeline-layout.js +28 -8
- package/dist/helpers/use-max-media-duration.js +25 -28
- package/dist/helpers/use-media-metadata.d.ts +10 -0
- package/dist/helpers/use-media-metadata.js +135 -0
- package/dist/helpers/use-menu-structure.js +43 -0
- package/dist/state/modals.d.ts +1 -0
- package/package.json +10 -10
- package/dist/esm/chunk-6jf1natv.js +0 -25
|
@@ -18,9 +18,10 @@ const rowLabel = {
|
|
|
18
18
|
color: 'rgba(255, 255, 255, 0.8)',
|
|
19
19
|
userSelect: 'none',
|
|
20
20
|
};
|
|
21
|
-
const TimelineEffectGroupRow = ({ label, nodePathInfo, effectIndex, effectSchema, nodePath, validatedLocation, rowDepth, getIsExpanded, toggleTrack, }) => {
|
|
21
|
+
const TimelineEffectGroupRow = ({ label, nodePathInfo, effectIndex, effectSchema, documentationLink, nodePath, validatedLocation, rowDepth, getIsExpanded, toggleTrack, }) => {
|
|
22
22
|
var _a;
|
|
23
23
|
var _b;
|
|
24
|
+
const [labelHovered, setLabelHovered] = (0, react_1.useState)(false);
|
|
24
25
|
const { previewServerState } = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx);
|
|
25
26
|
const previewConnected = previewServerState.type === 'connected';
|
|
26
27
|
const { codeValues } = (0, react_1.useContext)(remotion_1.Internals.VisualModeCodeValuesContext);
|
|
@@ -122,7 +123,22 @@ const TimelineEffectGroupRow = ({ label, nodePathInfo, effectIndex, effectSchema
|
|
|
122
123
|
height: timeline_layout_1.TREE_GROUP_ROW_HEIGHT,
|
|
123
124
|
paddingRight: timeline_layout_1.EXPANDED_SECTION_PADDING_RIGHT,
|
|
124
125
|
}), []);
|
|
125
|
-
const
|
|
126
|
+
const labelStyle = (0, react_1.useMemo)(() => {
|
|
127
|
+
const hoverEffect = labelHovered && documentationLink !== null;
|
|
128
|
+
return {
|
|
129
|
+
...rowLabel,
|
|
130
|
+
textDecoration: hoverEffect ? 'underline' : 'none',
|
|
131
|
+
textUnderlineOffset: 2,
|
|
132
|
+
cursor: hoverEffect ? 'pointer' : undefined,
|
|
133
|
+
};
|
|
134
|
+
}, [documentationLink, labelHovered]);
|
|
135
|
+
const onClickLabel = (0, react_1.useCallback)(() => {
|
|
136
|
+
if (documentationLink === null) {
|
|
137
|
+
return;
|
|
138
|
+
}
|
|
139
|
+
window.open(documentationLink, '_blank', 'noopener,noreferrer');
|
|
140
|
+
}, [documentationLink]);
|
|
141
|
+
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, children: jsx_runtime_1.jsx("span", { onPointerEnter: () => setLabelHovered(true), onPointerLeave: () => setLabelHovered(false), onClick: onClickLabel, title: documentationLink ? `Open documentation: ${documentationLink}` : label, style: labelStyle, children: label }) }));
|
|
126
142
|
return previewConnected ? (jsx_runtime_1.jsx(ContextMenu_1.ContextMenu, { values: contextMenuValues, children: row })) : (row);
|
|
127
143
|
};
|
|
128
144
|
exports.TimelineEffectGroupRow = TimelineEffectGroupRow;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type {
|
|
2
|
+
import type { SequencePropsSubscriptionKey, SequenceSchema } 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';
|
|
@@ -19,7 +19,7 @@ const TimelineExpandedRow = ({ node, depth, nestedDepth, getIsExpanded, toggleTr
|
|
|
19
19
|
const rowDepth = (0, timeline_row_layout_1.getExpandedRowDepth)({ nestedDepth, treeDepth: depth });
|
|
20
20
|
if (node.kind === 'group') {
|
|
21
21
|
if (node.effectInfo) {
|
|
22
|
-
return (jsx_runtime_1.jsx(TimelineEffectGroupRow_1.TimelineEffectGroupRow, { label: node.label, nodePathInfo: node.nodePathInfo, effectIndex: node.effectInfo.effectIndex, effectSchema: node.effectInfo.effectSchema, nodePath: nodePath, validatedLocation: validatedLocation, rowDepth: rowDepth, getIsExpanded: getIsExpanded, toggleTrack: toggleTrack }));
|
|
22
|
+
return (jsx_runtime_1.jsx(TimelineEffectGroupRow_1.TimelineEffectGroupRow, { label: node.label, nodePathInfo: node.nodePathInfo, effectIndex: node.effectInfo.effectIndex, effectSchema: node.effectInfo.effectSchema, documentationLink: node.effectInfo.documentationLink, nodePath: nodePath, validatedLocation: validatedLocation, rowDepth: rowDepth, getIsExpanded: getIsExpanded, toggleTrack: toggleTrack }));
|
|
23
23
|
}
|
|
24
24
|
const isExpanded = getIsExpanded(node.nodePathInfo);
|
|
25
25
|
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: {
|
|
@@ -57,13 +57,20 @@ const TimelineExpandedSection = ({ sequence, validatedLocation, nodePathInfo, ne
|
|
|
57
57
|
const { getIsExpanded } = (0, react_1.useContext)(ExpandedTracksProvider_1.ExpandedTracksGetterContext);
|
|
58
58
|
const { toggleTrack } = (0, react_1.useContext)(ExpandedTracksProvider_1.ExpandedTracksSetterContext);
|
|
59
59
|
const { codeValues: visualModeCodeValues } = (0, react_1.useContext)(remotion_1.Internals.VisualModeCodeValuesContext);
|
|
60
|
-
const { getDragOverrides } = (0, react_1.useContext)(remotion_1.Internals.VisualModeDragOverridesContext);
|
|
60
|
+
const { getDragOverrides, getEffectDragOverrides } = (0, react_1.useContext)(remotion_1.Internals.VisualModeDragOverridesContext);
|
|
61
61
|
const tree = (0, react_1.useMemo)(() => (0, timeline_layout_1.buildTimelineTree)({
|
|
62
62
|
sequence,
|
|
63
63
|
nodePathInfo,
|
|
64
64
|
getDragOverrides,
|
|
65
|
+
getEffectDragOverrides,
|
|
65
66
|
codeValues: visualModeCodeValues,
|
|
66
|
-
}), [
|
|
67
|
+
}), [
|
|
68
|
+
sequence,
|
|
69
|
+
nodePathInfo,
|
|
70
|
+
getDragOverrides,
|
|
71
|
+
getEffectDragOverrides,
|
|
72
|
+
visualModeCodeValues,
|
|
73
|
+
]);
|
|
67
74
|
const flat = (0, react_1.useMemo)(() => (0, timeline_layout_1.flattenVisibleTreeNodes)({ nodes: tree, getIsExpanded }), [tree, getIsExpanded]);
|
|
68
75
|
const expandedHeight = (0, react_1.useMemo)(() => (0, timeline_layout_1.getExpandedTrackHeight)({
|
|
69
76
|
sequence,
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type TSequence } from 'remotion';
|
|
3
|
+
import type { SequenceNodePathInfo } from '../../helpers/get-timeline-sequence-sort-key';
|
|
4
|
+
export declare const TimelineExpandedTrackKeyframes: React.NamedExoticComponent<{
|
|
5
|
+
readonly sequence: TSequence;
|
|
6
|
+
readonly nodePathInfo: SequenceNodePathInfo;
|
|
7
|
+
}>;
|
|
@@ -0,0 +1,124 @@
|
|
|
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.TimelineExpandedTrackKeyframes = 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 ExpandedTracksProvider_1 = require("../ExpandedTracksProvider");
|
|
44
|
+
const get_timeline_keyframes_1 = require("./get-timeline-keyframes");
|
|
45
|
+
const TimelineWidthProvider_1 = require("./TimelineWidthProvider");
|
|
46
|
+
const row = {
|
|
47
|
+
position: 'relative',
|
|
48
|
+
};
|
|
49
|
+
const separator = {
|
|
50
|
+
height: 1,
|
|
51
|
+
backgroundColor: colors_1.TIMELINE_TRACK_SEPARATOR,
|
|
52
|
+
};
|
|
53
|
+
const section = {
|
|
54
|
+
borderBottom: `1px solid ${colors_1.TIMELINE_TRACK_SEPARATOR}`,
|
|
55
|
+
};
|
|
56
|
+
const diamondBase = {
|
|
57
|
+
position: 'absolute',
|
|
58
|
+
width: 8,
|
|
59
|
+
height: 8,
|
|
60
|
+
backgroundColor: colors_1.LIGHT_TEXT,
|
|
61
|
+
borderRadius: 1,
|
|
62
|
+
boxShadow: '0 0 0 1px rgba(0, 0, 0, 0.4)',
|
|
63
|
+
pointerEvents: 'none',
|
|
64
|
+
};
|
|
65
|
+
const getNodeKeyframes = ({ node, nodePath, codeValues, }) => {
|
|
66
|
+
var _a, _b;
|
|
67
|
+
if (node.kind !== 'field' || node.field === null) {
|
|
68
|
+
return [];
|
|
69
|
+
}
|
|
70
|
+
if (node.field.kind === 'sequence-field') {
|
|
71
|
+
return (0, get_timeline_keyframes_1.getTimelineKeyframes)((_a = remotion_1.Internals.getCodeValuesCtx(codeValues, nodePath)) === null || _a === void 0 ? void 0 : _a[node.field.key]);
|
|
72
|
+
}
|
|
73
|
+
const effectStatus = remotion_1.Internals.getEffectCodeValuesCtx({
|
|
74
|
+
codeValues,
|
|
75
|
+
nodePath,
|
|
76
|
+
effectIndex: node.field.effectIndex,
|
|
77
|
+
});
|
|
78
|
+
return (0, get_timeline_keyframes_1.getTimelineKeyframes)(effectStatus.type === 'can-update-effect'
|
|
79
|
+
? (_b = effectStatus.props) === null || _b === void 0 ? void 0 : _b[node.field.key]
|
|
80
|
+
: null);
|
|
81
|
+
};
|
|
82
|
+
const TimelineExpandedTrackKeyframesInner = ({ nodePathInfo, sequence }) => {
|
|
83
|
+
const videoConfig = (0, remotion_1.useVideoConfig)();
|
|
84
|
+
const timelineWidth = (0, react_1.useContext)(TimelineWidthProvider_1.TimelineWidthContext);
|
|
85
|
+
const { getIsExpanded } = (0, react_1.useContext)(ExpandedTracksProvider_1.ExpandedTracksGetterContext);
|
|
86
|
+
const { codeValues } = (0, react_1.useContext)(remotion_1.Internals.VisualModeCodeValuesContext);
|
|
87
|
+
const tree = (0, react_1.useMemo)(() => (0, timeline_layout_1.buildTimelineTree)({
|
|
88
|
+
sequence,
|
|
89
|
+
nodePathInfo,
|
|
90
|
+
getDragOverrides: () => ({}),
|
|
91
|
+
getEffectDragOverrides: () => ({}),
|
|
92
|
+
codeValues,
|
|
93
|
+
}), [codeValues, nodePathInfo, sequence]);
|
|
94
|
+
const flat = (0, react_1.useMemo)(() => (0, timeline_layout_1.flattenVisibleTreeNodes)({ nodes: tree, getIsExpanded }), [tree, getIsExpanded]);
|
|
95
|
+
const expandedHeight = (0, react_1.useMemo)(() => (0, timeline_layout_1.getExpandedTrackHeight)({
|
|
96
|
+
sequence,
|
|
97
|
+
nodePathInfo,
|
|
98
|
+
getIsExpanded,
|
|
99
|
+
codeValues,
|
|
100
|
+
}), [codeValues, getIsExpanded, nodePathInfo, sequence]);
|
|
101
|
+
const rows = (0, react_1.useMemo)(() => flat.map(({ node }) => ({
|
|
102
|
+
height: (0, timeline_layout_1.getTreeRowHeight)(node),
|
|
103
|
+
keyframes: getNodeKeyframes({
|
|
104
|
+
node,
|
|
105
|
+
nodePath: nodePathInfo.sequenceSubscriptionKey,
|
|
106
|
+
codeValues,
|
|
107
|
+
}),
|
|
108
|
+
key: JSON.stringify(node.nodePathInfo),
|
|
109
|
+
})), [codeValues, flat, nodePathInfo.sequenceSubscriptionKey]);
|
|
110
|
+
return (jsx_runtime_1.jsx("div", { style: {
|
|
111
|
+
height: expandedHeight + timeline_layout_1.TIMELINE_ITEM_BORDER_BOTTOM,
|
|
112
|
+
}, children: jsx_runtime_1.jsx("div", { style: { ...section, height: expandedHeight }, children: rows.map(({ height, keyframes, key }, i) => {
|
|
113
|
+
return (jsx_runtime_1.jsxs(react_1.default.Fragment, { children: [i > 0 ? jsx_runtime_1.jsx("div", { style: separator }) : null, jsx_runtime_1.jsx("div", { style: { ...row, height }, children: timelineWidth === null
|
|
114
|
+
? null
|
|
115
|
+
: keyframes.map((keyframe) => (jsx_runtime_1.jsx("div", { style: {
|
|
116
|
+
...diamondBase,
|
|
117
|
+
left: (0, get_left_of_timeline_slider_1.getXPositionOfItemInTimelineImperatively)(keyframe.frame, videoConfig.durationInFrames, timelineWidth) - timeline_layout_1.TIMELINE_PADDING,
|
|
118
|
+
top: height / 2,
|
|
119
|
+
transform: 'translate(-50%, -50%) rotate(45deg)',
|
|
120
|
+
}, title: `Keyframe at frame ${keyframe.frame}` }, String(keyframe.frame)))) })
|
|
121
|
+
] }, key));
|
|
122
|
+
}) }) }));
|
|
123
|
+
};
|
|
124
|
+
exports.TimelineExpandedTrackKeyframes = react_1.default.memo(TimelineExpandedTrackKeyframesInner);
|
|
@@ -12,9 +12,11 @@ const ContextMenu_1 = require("../ContextMenu");
|
|
|
12
12
|
const ExpandedTracksProvider_1 = require("../ExpandedTracksProvider");
|
|
13
13
|
const NotificationCenter_1 = require("../Notifications/NotificationCenter");
|
|
14
14
|
const save_sequence_prop_1 = require("./save-sequence-prop");
|
|
15
|
+
const timeline_row_layout_1 = require("./timeline-row-layout");
|
|
15
16
|
const TimelineExpandArrowButton_1 = require("./TimelineExpandArrowButton");
|
|
16
17
|
const TimelineExpandedSection_1 = require("./TimelineExpandedSection");
|
|
17
18
|
const TimelineLayerEye_1 = require("./TimelineLayerEye");
|
|
19
|
+
const TimelineMediaInfo_1 = require("./TimelineMediaInfo");
|
|
18
20
|
const TimelineRowChrome_1 = require("./TimelineRowChrome");
|
|
19
21
|
const TimelineStack_1 = require("./TimelineStack");
|
|
20
22
|
const use_resolved_stack_react_to_change_1 = require("./use-resolved-stack-react-to-change");
|
|
@@ -211,18 +213,34 @@ const TimelineListItem = ({ nestedDepth, sequence, isCompact, nodePathInfo }) =>
|
|
|
211
213
|
return {
|
|
212
214
|
height: (0, timeline_layout_1.getTimelineLayerHeight)(sequence.type) + timeline_layout_1.TIMELINE_ITEM_BORDER_BOTTOM,
|
|
213
215
|
borderBottom: `1px solid ${colors_1.TIMELINE_TRACK_SEPARATOR}`,
|
|
216
|
+
display: 'flex',
|
|
217
|
+
flexDirection: 'column',
|
|
214
218
|
};
|
|
215
219
|
}, [sequence.type]);
|
|
216
220
|
const inner = (0, react_1.useMemo)(() => {
|
|
217
221
|
return {
|
|
218
|
-
|
|
219
|
-
height: timeline_layout_1.TIMELINE_LAYER_HEIGHT_AUDIO,
|
|
222
|
+
height: timeline_layout_1.TIMELINE_LIST_ITEM_ROW_HEIGHT,
|
|
220
223
|
color: 'white',
|
|
221
224
|
fontFamily: 'Arial, Helvetica, sans-serif',
|
|
222
225
|
wordBreak: 'break-all',
|
|
223
226
|
textAlign: 'left',
|
|
227
|
+
flexShrink: 0,
|
|
224
228
|
};
|
|
225
229
|
}, []);
|
|
230
|
+
const mediaInfoStyle = (0, react_1.useMemo)(() => {
|
|
231
|
+
return {
|
|
232
|
+
paddingLeft: (0, timeline_row_layout_1.getTimelineRowLeftChromeWidth)(nestedDepth),
|
|
233
|
+
paddingRight: 8,
|
|
234
|
+
marginTop: -6,
|
|
235
|
+
overflow: 'hidden',
|
|
236
|
+
minHeight: 0,
|
|
237
|
+
};
|
|
238
|
+
}, [nestedDepth]);
|
|
239
|
+
const mediaSrc = sequence.type === 'audio' ||
|
|
240
|
+
sequence.type === 'video' ||
|
|
241
|
+
sequence.type === 'image'
|
|
242
|
+
? sequence.src
|
|
243
|
+
: null;
|
|
226
244
|
const hasExpandableContent = Boolean(sequence.controls) || sequence.effects.length > 0;
|
|
227
245
|
const canToggleVisibility = previewConnected &&
|
|
228
246
|
Boolean(sequence.controls) &&
|
|
@@ -231,7 +249,7 @@ const TimelineListItem = ({ nestedDepth, sequence, isCompact, nodePathInfo }) =>
|
|
|
231
249
|
codeHiddenStatus !== undefined &&
|
|
232
250
|
codeHiddenStatus !== null &&
|
|
233
251
|
codeHiddenStatus.canUpdate;
|
|
234
|
-
const trackRow = (jsx_runtime_1.
|
|
252
|
+
const trackRow = (jsx_runtime_1.jsxs("div", { style: outer, children: [jsx_runtime_1.jsx(TimelineRowChrome_1.TimelineRowChrome, { depth: nestedDepth, eye: canToggleVisibility ? (jsx_runtime_1.jsx(TimelineLayerEye_1.TimelineLayerEye, { type: sequence.type === 'audio' ? 'speaker' : 'eye', hidden: isItemHidden, onInvoked: onToggleVisibility })) : (jsx_runtime_1.jsx(TimelineLayerEye_1.TimelineLayerEyeSpacer, {})), arrow: hasExpandableContent ? (jsx_runtime_1.jsx(TimelineExpandArrowButton_1.TimelineExpandArrowButton, { isExpanded: isExpanded, onClick: onToggleExpand, label: "track properties", disabled: !previewConnected || nodePathInfo === null })) : (jsx_runtime_1.jsx(TimelineExpandArrowButton_1.TimelineExpandArrowSpacer, {})), style: inner, children: jsx_runtime_1.jsx(TimelineStack_1.TimelineStack, { sequence: sequence, isCompact: isCompact, originalLocation: originalLocation }) }), mediaSrc ? (jsx_runtime_1.jsx("div", { style: mediaInfoStyle, children: jsx_runtime_1.jsx(TimelineMediaInfo_1.TimelineMediaInfo, { src: mediaSrc, type: sequence.type }) })) : null] }));
|
|
235
253
|
return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [previewConnected ? (jsx_runtime_1.jsx(ContextMenu_1.ContextMenu, { values: contextMenuValues, children: trackRow })) : (trackRow), previewConnected &&
|
|
236
254
|
isExpanded &&
|
|
237
255
|
hasExpandableContent &&
|
|
@@ -0,0 +1,173 @@
|
|
|
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.TimelineMediaInfo = void 0;
|
|
37
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
38
|
+
const media_utils_1 = require("@remotion/media-utils");
|
|
39
|
+
const react_1 = __importStar(require("react"));
|
|
40
|
+
const remotion_1 = require("remotion");
|
|
41
|
+
const colors_1 = require("../../helpers/colors");
|
|
42
|
+
const format_media_duration_1 = require("../../helpers/format-media-duration");
|
|
43
|
+
const url_state_1 = require("../../helpers/url-state");
|
|
44
|
+
const use_media_metadata_1 = require("../../helpers/use-media-metadata");
|
|
45
|
+
const containerStyle = {
|
|
46
|
+
fontFamily: 'Arial, Helvetica, sans-serif',
|
|
47
|
+
fontSize: 12,
|
|
48
|
+
lineHeight: 1,
|
|
49
|
+
overflow: 'hidden',
|
|
50
|
+
whiteSpace: 'nowrap',
|
|
51
|
+
textOverflow: 'ellipsis',
|
|
52
|
+
minWidth: 0,
|
|
53
|
+
marginTop: 2,
|
|
54
|
+
};
|
|
55
|
+
const lineStyle = {
|
|
56
|
+
whiteSpace: 'nowrap',
|
|
57
|
+
overflow: 'hidden',
|
|
58
|
+
textOverflow: 'ellipsis',
|
|
59
|
+
minWidth: 0,
|
|
60
|
+
fontSize: 12,
|
|
61
|
+
color: colors_1.VERY_LIGHT_TEXT,
|
|
62
|
+
lineHeight: 1.3,
|
|
63
|
+
};
|
|
64
|
+
const getLinkInfo = (src) => {
|
|
65
|
+
const staticBase = typeof window === 'undefined' ? null : window.remotion_staticBase;
|
|
66
|
+
if (staticBase && src.startsWith(staticBase + '/')) {
|
|
67
|
+
const assetPath = src.slice(staticBase.length + 1);
|
|
68
|
+
return {
|
|
69
|
+
kind: 'local',
|
|
70
|
+
assetPath: decodeURIComponent(assetPath),
|
|
71
|
+
title: decodeURIComponent(assetPath),
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
if (src.startsWith('http://') ||
|
|
75
|
+
src.startsWith('https://') ||
|
|
76
|
+
src.startsWith('//')) {
|
|
77
|
+
try {
|
|
78
|
+
const url = new URL(src.startsWith('//') ? 'https:' + src : src);
|
|
79
|
+
return { kind: 'remote', href: src, title: url.hostname };
|
|
80
|
+
}
|
|
81
|
+
catch (_a) {
|
|
82
|
+
return { kind: 'remote', href: src, title: src };
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
return null;
|
|
86
|
+
};
|
|
87
|
+
const useAssetLink = (src) => {
|
|
88
|
+
const { setCanvasContent } = react_1.default.useContext(remotion_1.Internals.CompositionSetters);
|
|
89
|
+
const [hovered, setHovered] = (0, react_1.useState)(false);
|
|
90
|
+
const linkInfo = (0, react_1.useMemo)(() => getLinkInfo(src), [src]);
|
|
91
|
+
const onClick = (0, react_1.useCallback)((e) => {
|
|
92
|
+
if (!linkInfo) {
|
|
93
|
+
return;
|
|
94
|
+
}
|
|
95
|
+
e.preventDefault();
|
|
96
|
+
e.stopPropagation();
|
|
97
|
+
if (linkInfo.kind === 'local') {
|
|
98
|
+
setCanvasContent({ type: 'asset', asset: linkInfo.assetPath });
|
|
99
|
+
(0, url_state_1.pushUrl)(`/assets/${linkInfo.assetPath}`);
|
|
100
|
+
return;
|
|
101
|
+
}
|
|
102
|
+
window.open(linkInfo.href, '_blank', 'noopener,noreferrer');
|
|
103
|
+
}, [linkInfo, setCanvasContent]);
|
|
104
|
+
const onPointerEnter = (0, react_1.useCallback)(() => setHovered(true), []);
|
|
105
|
+
const onPointerLeave = (0, react_1.useCallback)(() => setHovered(false), []);
|
|
106
|
+
const fileNameStyle = (0, react_1.useMemo)(() => ({
|
|
107
|
+
...lineStyle,
|
|
108
|
+
color: linkInfo && hovered ? colors_1.LIGHT_TEXT : colors_1.VERY_LIGHT_TEXT,
|
|
109
|
+
cursor: linkInfo ? 'pointer' : undefined,
|
|
110
|
+
textDecoration: 'none',
|
|
111
|
+
display: 'inline-block',
|
|
112
|
+
overflow: 'hidden',
|
|
113
|
+
whiteSpace: 'pre',
|
|
114
|
+
textOverflow: 'ellipsis',
|
|
115
|
+
}), [linkInfo, hovered]);
|
|
116
|
+
return { linkInfo, onClick, onPointerEnter, onPointerLeave, fileNameStyle };
|
|
117
|
+
};
|
|
118
|
+
const TimelineMediaInfo = ({ src, type }) => {
|
|
119
|
+
// Images aren't supported by mediabunny, so don't even try.
|
|
120
|
+
const metadata = (0, use_media_metadata_1.useMediaMetadata)(type === 'image' ? null : src);
|
|
121
|
+
const fileName = (0, react_1.useMemo)(() => remotion_1.Internals.getAssetDisplayName(src), [src]);
|
|
122
|
+
const { linkInfo, onClick, onPointerEnter, onPointerLeave, fileNameStyle } = useAssetLink(src);
|
|
123
|
+
const [imageDimensions, setImageDimensions] = (0, react_1.useState)(null);
|
|
124
|
+
(0, react_1.useEffect)(() => {
|
|
125
|
+
if (type !== 'image') {
|
|
126
|
+
return;
|
|
127
|
+
}
|
|
128
|
+
let cancelled = false;
|
|
129
|
+
setImageDimensions(null);
|
|
130
|
+
(0, media_utils_1.getImageDimensions)(src)
|
|
131
|
+
.then((dims) => {
|
|
132
|
+
if (cancelled) {
|
|
133
|
+
return;
|
|
134
|
+
}
|
|
135
|
+
setImageDimensions({ width: dims.width, height: dims.height });
|
|
136
|
+
})
|
|
137
|
+
.catch(() => {
|
|
138
|
+
// Non-image or load failure — ignore silently.
|
|
139
|
+
});
|
|
140
|
+
return () => {
|
|
141
|
+
cancelled = true;
|
|
142
|
+
};
|
|
143
|
+
}, [src, type]);
|
|
144
|
+
const detailsLine = (0, react_1.useMemo)(() => {
|
|
145
|
+
if (type === 'image') {
|
|
146
|
+
if (!imageDimensions) {
|
|
147
|
+
return null;
|
|
148
|
+
}
|
|
149
|
+
return `${imageDimensions.width}x${imageDimensions.height}`;
|
|
150
|
+
}
|
|
151
|
+
if (!metadata) {
|
|
152
|
+
return null;
|
|
153
|
+
}
|
|
154
|
+
const parts = [];
|
|
155
|
+
if (metadata.format) {
|
|
156
|
+
parts.push(metadata.format);
|
|
157
|
+
}
|
|
158
|
+
if (type === 'video' && metadata.videoCodec) {
|
|
159
|
+
parts.push(metadata.videoCodec);
|
|
160
|
+
}
|
|
161
|
+
if (metadata.audioCodec) {
|
|
162
|
+
parts.push(metadata.audioCodec);
|
|
163
|
+
}
|
|
164
|
+
if (metadata.width !== null && metadata.height !== null) {
|
|
165
|
+
parts.push(`${metadata.width}x${metadata.height}`);
|
|
166
|
+
}
|
|
167
|
+
parts.push((0, format_media_duration_1.formatMediaDuration)(metadata.duration));
|
|
168
|
+
return parts.join(' · ');
|
|
169
|
+
}, [imageDimensions, metadata, type]);
|
|
170
|
+
return (jsx_runtime_1.jsxs("div", { style: containerStyle, children: [
|
|
171
|
+
jsx_runtime_1.jsx("div", { style: fileNameStyle, title: linkInfo ? linkInfo.title : fileName, onClick: linkInfo ? onClick : undefined, onPointerEnter: linkInfo ? onPointerEnter : undefined, onPointerLeave: linkInfo ? onPointerLeave : undefined, children: fileName }), detailsLine ? (jsx_runtime_1.jsx("div", { style: lineStyle, title: detailsLine, children: detailsLine })) : null] }));
|
|
172
|
+
};
|
|
173
|
+
exports.TimelineMediaInfo = TimelineMediaInfo;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.TimelineFieldValue = exports.TimelineNonEditableStatus = exports.UnsupportedStatus = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const get_timeline_keyframes_1 = require("./get-timeline-keyframes");
|
|
5
6
|
const TimelineBooleanField_1 = require("./TimelineBooleanField");
|
|
6
7
|
const TimelineColorField_1 = require("./TimelineColorField");
|
|
7
8
|
const TimelineEnumField_1 = require("./TimelineEnumField");
|
|
@@ -30,7 +31,7 @@ const TimelineNonEditableStatus = ({ propStatus }) => {
|
|
|
30
31
|
return null;
|
|
31
32
|
}
|
|
32
33
|
if (propStatus.reason === 'computed') {
|
|
33
|
-
return jsx_runtime_1.jsx("span", { style: unsupportedLabel, children:
|
|
34
|
+
return (jsx_runtime_1.jsx("span", { style: unsupportedLabel, children: (0, get_timeline_keyframes_1.getComputedStatusLabel)(propStatus) }));
|
|
34
35
|
}
|
|
35
36
|
throw new Error(`Unsupported prop status: ${propStatus.reason}`);
|
|
36
37
|
};
|
|
@@ -7,8 +7,6 @@ const client_id_1 = require("../../../helpers/client-id");
|
|
|
7
7
|
const colors_1 = require("../../../helpers/colors");
|
|
8
8
|
const get_git_menu_item_1 = require("../../../helpers/get-git-menu-item");
|
|
9
9
|
const open_in_editor_1 = require("../../../helpers/open-in-editor");
|
|
10
|
-
const url_state_1 = require("../../../helpers/url-state");
|
|
11
|
-
const InitialCompositionLoader_1 = require("../../InitialCompositionLoader");
|
|
12
10
|
const layout_1 = require("../../layout");
|
|
13
11
|
const NotificationCenter_1 = require("../../Notifications/NotificationCenter");
|
|
14
12
|
const Spinner_1 = require("../../Spinner");
|
|
@@ -17,26 +15,8 @@ const TimelineStack = ({ isCompact, sequence, originalLocation }) => {
|
|
|
17
15
|
const [stackHovered, setStackHovered] = (0, react_1.useState)(false);
|
|
18
16
|
const [titleHovered, setTitleHovered] = (0, react_1.useState)(false);
|
|
19
17
|
const [opening, setOpening] = (0, react_1.useState)(false);
|
|
20
|
-
const selectAsset = (0, InitialCompositionLoader_1.useSelectAsset)();
|
|
21
18
|
const connectionStatus = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx)
|
|
22
19
|
.previewServerState.type;
|
|
23
|
-
const assetPath = (0, react_1.useMemo)(() => {
|
|
24
|
-
if (sequence.type !== 'video' &&
|
|
25
|
-
sequence.type !== 'audio' &&
|
|
26
|
-
sequence.type !== 'image') {
|
|
27
|
-
return null;
|
|
28
|
-
}
|
|
29
|
-
const isStatic = sequence.src.startsWith(window.remotion_staticBase);
|
|
30
|
-
if (!isStatic) {
|
|
31
|
-
return null;
|
|
32
|
-
}
|
|
33
|
-
const relativePath = sequence.src.replace(window.remotion_staticBase + '/', '');
|
|
34
|
-
return relativePath;
|
|
35
|
-
}, [sequence]);
|
|
36
|
-
const navigateToAsset = (0, react_1.useCallback)((asset) => {
|
|
37
|
-
selectAsset(asset);
|
|
38
|
-
(0, url_state_1.pushUrl)(`/assets/${asset}`);
|
|
39
|
-
}, [selectAsset]);
|
|
40
20
|
const openEditor = (0, react_1.useCallback)(async (location) => {
|
|
41
21
|
if (!window.remotion_editorName) {
|
|
42
22
|
return;
|
|
@@ -56,35 +36,15 @@ const TimelineStack = ({ isCompact, sequence, originalLocation }) => {
|
|
|
56
36
|
connectionStatus === 'connected' &&
|
|
57
37
|
originalLocation;
|
|
58
38
|
const canOpenInGitHub = window.remotion_gitSource && originalLocation;
|
|
59
|
-
const
|
|
39
|
+
const { documentationLink } = sequence;
|
|
40
|
+
const titleHoverable = documentationLink !== null;
|
|
60
41
|
const stackHoverable = !isCompact && (canOpenInEditor || canOpenInGitHub);
|
|
61
42
|
const onClickTitle = (0, react_1.useCallback)(() => {
|
|
62
|
-
if (
|
|
43
|
+
if (documentationLink === null) {
|
|
63
44
|
return null;
|
|
64
45
|
}
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
return;
|
|
68
|
-
}
|
|
69
|
-
if (!originalLocation) {
|
|
70
|
-
return;
|
|
71
|
-
}
|
|
72
|
-
if (canOpenInEditor) {
|
|
73
|
-
openEditor(originalLocation);
|
|
74
|
-
return;
|
|
75
|
-
}
|
|
76
|
-
if (canOpenInGitHub) {
|
|
77
|
-
window.open((0, get_git_menu_item_1.getGitRefUrl)(window.remotion_gitSource, originalLocation), '_blank');
|
|
78
|
-
}
|
|
79
|
-
}, [
|
|
80
|
-
assetPath,
|
|
81
|
-
canOpenInEditor,
|
|
82
|
-
canOpenInGitHub,
|
|
83
|
-
navigateToAsset,
|
|
84
|
-
openEditor,
|
|
85
|
-
originalLocation,
|
|
86
|
-
titleHoverable,
|
|
87
|
-
]);
|
|
46
|
+
window.open(documentationLink, '_blank', 'noopener,noreferrer');
|
|
47
|
+
}, [documentationLink]);
|
|
88
48
|
const onClickStack = (0, react_1.useCallback)(() => {
|
|
89
49
|
if (!originalLocation) {
|
|
90
50
|
return;
|
|
@@ -150,8 +110,8 @@ const TimelineStack = ({ isCompact, sequence, originalLocation }) => {
|
|
|
150
110
|
? sequence.displayName.slice(0, 1000) + '...'
|
|
151
111
|
: sequence.displayName;
|
|
152
112
|
return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
153
|
-
jsx_runtime_1.jsx("div", { onPointerEnter: onTitlePointerEnter, onPointerLeave: onTitlePointerLeave, title:
|
|
154
|
-
?
|
|
113
|
+
jsx_runtime_1.jsx("div", { onPointerEnter: onTitlePointerEnter, onPointerLeave: onTitlePointerLeave, title: documentationLink
|
|
114
|
+
? `Open documentation: ${documentationLink}`
|
|
155
115
|
: text || '<Sequence>', style: titleStyle, onClick: onClickTitle, children: text || '<Sequence>' }), isCompact || !originalLocation ? null : (jsx_runtime_1.jsx("div", { onPointerEnter: onStackPointerEnter, onPointerLeave: onStackPointerLeave, onClick: onClickStack, style: style, children: (0, source_attribution_1.getOriginalSourceAttribution)(originalLocation) })), opening ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
156
116
|
jsx_runtime_1.jsx(layout_1.Spacing, { x: 0.5 }), jsx_runtime_1.jsx(Spinner_1.Spinner, { duration: 0.5, size: 12 })
|
|
157
117
|
] })) : null] }));
|
|
@@ -36,11 +36,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
36
36
|
exports.TimelineTracks = void 0;
|
|
37
37
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
38
38
|
const react_1 = __importStar(require("react"));
|
|
39
|
-
const remotion_1 = require("remotion");
|
|
40
39
|
const client_id_1 = require("../../helpers/client-id");
|
|
41
40
|
const timeline_layout_1 = require("../../helpers/timeline-layout");
|
|
42
41
|
const ExpandedTracksProvider_1 = require("../ExpandedTracksProvider");
|
|
43
42
|
const MaxTimelineTracks_1 = require("./MaxTimelineTracks");
|
|
43
|
+
const TimelineExpandedTrackKeyframes_1 = require("./TimelineExpandedTrackKeyframes");
|
|
44
44
|
const TimelineSequence_1 = require("./TimelineSequence");
|
|
45
45
|
const TimelineTimeIndicators_1 = require("./TimelineTimeIndicators");
|
|
46
46
|
const content = {
|
|
@@ -51,18 +51,9 @@ const content = {
|
|
|
51
51
|
const timelineContent = {
|
|
52
52
|
minHeight: '100%',
|
|
53
53
|
};
|
|
54
|
-
const getExpandedPlaceholderStyle = ({ sequence, nodePathInfo, getIsExpanded, codeValues, }) => ({
|
|
55
|
-
height: (0, timeline_layout_1.getExpandedTrackHeight)({
|
|
56
|
-
sequence,
|
|
57
|
-
nodePathInfo,
|
|
58
|
-
getIsExpanded,
|
|
59
|
-
codeValues,
|
|
60
|
-
}) + timeline_layout_1.TIMELINE_ITEM_BORDER_BOTTOM,
|
|
61
|
-
});
|
|
62
54
|
const TimelineTracksInner = ({ timeline, hasBeenCut }) => {
|
|
63
55
|
const { getIsExpanded } = (0, react_1.useContext)(ExpandedTracksProvider_1.ExpandedTracksGetterContext);
|
|
64
56
|
const { previewServerState } = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx);
|
|
65
|
-
const { codeValues } = (0, react_1.useContext)(remotion_1.Internals.VisualModeCodeValuesContext);
|
|
66
57
|
const previewServerConnected = previewServerState.type === 'connected';
|
|
67
58
|
const timelineStyle = (0, react_1.useMemo)(() => {
|
|
68
59
|
return {
|
|
@@ -78,12 +69,7 @@ const TimelineTracksInner = ({ timeline, hasBeenCut }) => {
|
|
|
78
69
|
jsx_runtime_1.jsx("div", { style: {
|
|
79
70
|
height: (0, timeline_layout_1.getTimelineLayerHeight)(track.sequence.type),
|
|
80
71
|
marginBottom: timeline_layout_1.TIMELINE_ITEM_BORDER_BOTTOM,
|
|
81
|
-
}, children: jsx_runtime_1.jsx(TimelineSequence_1.TimelineSequence, { s: track.sequence }) }), isExpanded && track.nodePathInfo && previewServerConnected ? (jsx_runtime_1.jsx(
|
|
82
|
-
sequence: track.sequence,
|
|
83
|
-
nodePathInfo: track.nodePathInfo,
|
|
84
|
-
getIsExpanded,
|
|
85
|
-
codeValues,
|
|
86
|
-
}) })) : null] }, track.sequence.id));
|
|
72
|
+
}, children: jsx_runtime_1.jsx(TimelineSequence_1.TimelineSequence, { s: track.sequence }) }), isExpanded && track.nodePathInfo && previewServerConnected ? (jsx_runtime_1.jsx(TimelineExpandedTrackKeyframes_1.TimelineExpandedTrackKeyframes, { sequence: track.sequence, nodePathInfo: track.nodePathInfo })) : null] }, track.sequence.id));
|
|
87
73
|
})] }), hasBeenCut ? jsx_runtime_1.jsx(MaxTimelineTracks_1.MaxTimelineTracksReached, {}) : null] }));
|
|
88
74
|
};
|
|
89
75
|
exports.TimelineTracks = react_1.default.memo(TimelineTracksInner);
|
|
@@ -8,7 +8,7 @@ const remotion_1 = require("remotion");
|
|
|
8
8
|
const timeline_layout_1 = require("../../helpers/timeline-layout");
|
|
9
9
|
const AudioWaveform_1 = require("../AudioWaveform");
|
|
10
10
|
const get_timeline_video_info_widths_1 = require("./get-timeline-video-info-widths");
|
|
11
|
-
const FILMSTRIP_HEIGHT =
|
|
11
|
+
const FILMSTRIP_HEIGHT = 48;
|
|
12
12
|
const outerStyle = {
|
|
13
13
|
width: '100%',
|
|
14
14
|
height: '100%',
|
|
@@ -233,7 +233,7 @@ const TimelineVideoInfo = ({ src, visualizationWidth, naturalWidth, trimBefore,
|
|
|
233
233
|
}, [mediaVisualizationWidth, premountWidth]);
|
|
234
234
|
const audioStyle = (0, react_1.useMemo)(() => {
|
|
235
235
|
return {
|
|
236
|
-
height: timeline_layout_1.
|
|
236
|
+
height: timeline_layout_1.TIMELINE_VIDEO_INFO_WAVEFORM_HEIGHT,
|
|
237
237
|
width: audioWidth,
|
|
238
238
|
position: 'relative',
|
|
239
239
|
marginLeft: premountWidth,
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { CanUpdateSequencePropStatus, CanUpdateSequencePropStatusFalse } from 'remotion';
|
|
2
|
+
export declare const getComputedStatusLabel: (propStatus: CanUpdateSequencePropStatusFalse) => string;
|
|
3
|
+
export declare const getTimelineKeyframes: (propStatus: CanUpdateSequencePropStatus | null | undefined) => {
|
|
4
|
+
frame: number;
|
|
5
|
+
value: unknown;
|
|
6
|
+
}[];
|