@remotion/studio 4.0.432 → 4.0.433
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/Studio.js +1 -3
- package/dist/components/CompositionSelector.js +16 -9
- package/dist/components/CurrentComposition.js +2 -5
- package/dist/components/EditorContent.js +4 -5
- package/dist/components/NewComposition/DuplicateComposition.js +4 -1
- package/dist/components/NewComposition/InputDragger.d.ts +1 -0
- package/dist/components/NewComposition/InputDragger.js +27 -8
- package/dist/components/OptionsPanel.js +1 -1
- package/dist/components/PlaybackRatePersistor.js +1 -1
- package/dist/components/PreviewToolbar.js +4 -2
- package/dist/components/RenderModal/SchemaEditor/SchemaLabel.js +3 -1
- package/dist/components/RenderModal/SchemaEditor/ZodArrayEditor.js +3 -1
- package/dist/components/RenderModal/SchemaEditor/ZodFieldValidation.js +3 -1
- package/dist/components/RenderModal/SchemaEditor/ZodTupleEditor.js +3 -1
- package/dist/components/RenderModal/WebRenderModalAudio.js +2 -0
- package/dist/components/RenderModal/WebRenderModalBasic.js +8 -1
- package/dist/components/RendersTab.js +1 -9
- package/dist/components/Timeline/TimelineBooleanField.d.ts +9 -0
- package/dist/components/Timeline/TimelineBooleanField.js +20 -0
- package/dist/components/Timeline/TimelineEmptyState.d.ts +2 -0
- package/dist/components/Timeline/TimelineEmptyState.js +15 -0
- package/dist/components/Timeline/TimelineExpandedSection.d.ts +5 -0
- package/dist/components/Timeline/TimelineExpandedSection.js +45 -7
- package/dist/components/Timeline/TimelineFieldRow.d.ts +3 -0
- package/dist/components/Timeline/TimelineFieldRow.js +17 -12
- package/dist/components/Timeline/TimelineListItem.d.ts +1 -0
- package/dist/components/Timeline/TimelineListItem.js +7 -7
- package/dist/components/Timeline/TimelineNumberField.d.ts +11 -0
- package/dist/components/Timeline/TimelineNumberField.js +53 -0
- package/dist/components/Timeline/TimelinePlayCursorSyncer.js +1 -1
- package/dist/components/Timeline/TimelineRotationField.d.ts +11 -0
- package/dist/components/Timeline/TimelineRotationField.js +64 -0
- package/dist/components/Timeline/TimelineSchemaField.d.ts +1 -3
- package/dist/components/Timeline/TimelineSchemaField.js +19 -74
- package/dist/components/Timeline/TimelineTranslateField.d.ts +11 -0
- package/dist/components/Timeline/TimelineTranslateField.js +115 -0
- package/dist/components/Timeline/timeline-field-utils.d.ts +2 -0
- package/dist/components/Timeline/timeline-field-utils.js +12 -0
- package/dist/components/Timeline/use-sequence-props-subscription.d.ts +2 -1
- package/dist/components/Timeline/use-sequence-props-subscription.js +32 -12
- package/dist/esm/{chunk-t28xqw5n.js → chunk-bd1bkakk.js} +2697 -2266
- package/dist/esm/internals.mjs +2697 -2266
- package/dist/esm/previewEntry.mjs +2702 -2271
- package/dist/esm/renderEntry.mjs +1 -3
- package/dist/helpers/calculate-timeline.js +17 -11
- package/dist/helpers/get-timeline-sequence-sort-key.d.ts +1 -1
- package/dist/helpers/get-timeline-sequence-sort-key.js +6 -3
- package/dist/helpers/inject-css.js +6 -1
- package/dist/helpers/sort-by-nonce-history.d.ts +5 -0
- package/dist/helpers/sort-by-nonce-history.js +73 -0
- package/dist/helpers/timeline-layout.js +8 -2
- package/dist/renderEntry.js +2 -2
- package/package.json +11 -11
package/dist/Studio.js
CHANGED
|
@@ -9,7 +9,6 @@ const Editor_1 = require("./components/Editor");
|
|
|
9
9
|
const EditorContexts_1 = require("./components/EditorContexts");
|
|
10
10
|
const ServerDisconnected_1 = require("./components/Notifications/ServerDisconnected");
|
|
11
11
|
const use_static_files_1 = require("./components/use-static-files");
|
|
12
|
-
const fast_refresh_context_1 = require("./fast-refresh-context");
|
|
13
12
|
const FastRefreshProvider_1 = require("./FastRefreshProvider");
|
|
14
13
|
const inject_css_1 = require("./helpers/inject-css");
|
|
15
14
|
const ResolveCompositionConfigInStudio_1 = require("./ResolveCompositionConfigInStudio");
|
|
@@ -18,8 +17,7 @@ const getServerDisconnectedDomElement = () => {
|
|
|
18
17
|
};
|
|
19
18
|
const StudioInner = ({ rootComponent, readOnly, visualModeEnabled }) => {
|
|
20
19
|
var _a;
|
|
21
|
-
|
|
22
|
-
return (jsx_runtime_1.jsx(remotion_1.Internals.CompositionManagerProvider, { onlyRenderComposition: null, currentCompositionMetadata: null, initialCompositions: [], initialCanvasContent: null, children: jsx_runtime_1.jsx(remotion_1.Internals.RemotionRootContexts, { visualModeEnabled: visualModeEnabled, frameState: null, audioEnabled: window.remotion_audioEnabled, videoEnabled: window.remotion_videoEnabled, logLevel: window.remotion_logLevel, numberOfAudioTags: window.remotion_numberOfAudioTags, audioLatencyHint: (_a = window.remotion_audioLatencyHint) !== null && _a !== void 0 ? _a : 'interactive', nonceContextSeed: fastRefreshes + manualRefreshes, children: jsx_runtime_1.jsx(use_static_files_1.StaticFilesProvider, { children: jsx_runtime_1.jsx(ResolveCompositionConfigInStudio_1.ResolveCompositionConfigInStudio, { children: jsx_runtime_1.jsxs(EditorContexts_1.EditorContexts, { readOnlyStudio: readOnly, children: [
|
|
20
|
+
return (jsx_runtime_1.jsx(remotion_1.Internals.CompositionManagerProvider, { onlyRenderComposition: null, currentCompositionMetadata: null, initialCompositions: [], initialCanvasContent: null, children: jsx_runtime_1.jsx(remotion_1.Internals.RemotionRootContexts, { visualModeEnabled: visualModeEnabled, frameState: null, audioEnabled: window.remotion_audioEnabled, videoEnabled: window.remotion_videoEnabled, logLevel: window.remotion_logLevel, numberOfAudioTags: window.remotion_numberOfAudioTags, audioLatencyHint: (_a = window.remotion_audioLatencyHint) !== null && _a !== void 0 ? _a : 'interactive', children: jsx_runtime_1.jsx(use_static_files_1.StaticFilesProvider, { children: jsx_runtime_1.jsx(ResolveCompositionConfigInStudio_1.ResolveCompositionConfigInStudio, { children: jsx_runtime_1.jsxs(EditorContexts_1.EditorContexts, { readOnlyStudio: readOnly, children: [
|
|
23
21
|
jsx_runtime_1.jsx(Editor_1.Editor, { readOnlyStudio: readOnly, Root: rootComponent }), readOnly
|
|
24
22
|
? null
|
|
25
23
|
: (0, react_dom_1.createPortal)(jsx_runtime_1.jsx(ServerDisconnected_1.ServerDisconnected, {}), getServerDisconnectedDomElement())] }) }) }) }) }));
|
|
@@ -7,6 +7,7 @@ const remotion_1 = require("remotion");
|
|
|
7
7
|
const colors_1 = require("../helpers/colors");
|
|
8
8
|
const create_folder_tree_1 = require("../helpers/create-folder-tree");
|
|
9
9
|
const persist_open_folders_1 = require("../helpers/persist-open-folders");
|
|
10
|
+
const sort_by_nonce_history_1 = require("../helpers/sort-by-nonce-history");
|
|
10
11
|
const z_index_1 = require("../state/z-index");
|
|
11
12
|
const CompositionSelectorItem_1 = require("./CompositionSelectorItem");
|
|
12
13
|
const CurrentComposition_1 = require("./CurrentComposition");
|
|
@@ -72,24 +73,30 @@ const CompositionSelector = () => {
|
|
|
72
73
|
const { foldersExpanded } = (0, react_1.useContext)(persist_open_folders_1.ExpandedFoldersContext);
|
|
73
74
|
const { tabIndex } = (0, z_index_1.useZIndex)();
|
|
74
75
|
const selectComposition = (0, InitialCompositionLoader_1.useSelectComposition)();
|
|
76
|
+
const sortedCompositions = (0, react_1.useMemo)(() => {
|
|
77
|
+
return (0, sort_by_nonce_history_1.sortItemsByNonceHistory)(compositions);
|
|
78
|
+
}, [compositions]);
|
|
79
|
+
const sortedFolders = (0, react_1.useMemo)(() => {
|
|
80
|
+
return (0, sort_by_nonce_history_1.sortItemsByNonceHistory)(folders);
|
|
81
|
+
}, [folders]);
|
|
75
82
|
const items = (0, react_1.useMemo)(() => {
|
|
76
|
-
return (0, create_folder_tree_1.createFolderTree)(
|
|
77
|
-
}, [
|
|
78
|
-
const showCurrentComposition = canvasContent && canvasContent.type === 'composition';
|
|
83
|
+
return (0, create_folder_tree_1.createFolderTree)(sortedCompositions, sortedFolders, foldersExpanded);
|
|
84
|
+
}, [sortedCompositions, sortedFolders, foldersExpanded]);
|
|
79
85
|
const list = (0, react_1.useMemo)(() => {
|
|
80
86
|
return {
|
|
81
|
-
height:
|
|
82
|
-
? `calc(100% - ${CurrentComposition_1.CURRENT_COMPOSITION_HEIGHT}px)`
|
|
83
|
-
: '100%',
|
|
87
|
+
height: `calc(100% - ${CurrentComposition_1.CURRENT_COMPOSITION_HEIGHT}px)`,
|
|
84
88
|
overflowY: 'auto',
|
|
85
89
|
};
|
|
86
|
-
}, [
|
|
90
|
+
}, []);
|
|
87
91
|
const toggleFolder = (0, react_1.useCallback)((folderName, parentName) => {
|
|
88
92
|
var _a;
|
|
89
93
|
(_a = remotion_1.Internals.compositionSelectorRef.current) === null || _a === void 0 ? void 0 : _a.toggleFolder(folderName, parentName);
|
|
90
94
|
}, []);
|
|
91
|
-
return (jsx_runtime_1.jsxs("div", { style: container, children: [
|
|
92
|
-
|
|
95
|
+
return (jsx_runtime_1.jsxs("div", { style: container, children: [
|
|
96
|
+
jsx_runtime_1.jsx(CurrentComposition_1.CurrentComposition, {}), jsx_runtime_1.jsx("div", { className: "__remotion-vertical-scrollbar", style: list, children: items.map((c) => {
|
|
97
|
+
return (jsx_runtime_1.jsx(CompositionSelectorItem_1.CompositionSelectorItem, { level: 0, currentComposition: canvasContent && canvasContent.type === 'composition'
|
|
98
|
+
? canvasContent.compositionId
|
|
99
|
+
: null, selectComposition: selectComposition, toggleFolder: toggleFolder, tabIndex: tabIndex, item: c }, c.key + c.type));
|
|
93
100
|
}) })
|
|
94
101
|
] }));
|
|
95
102
|
};
|
|
@@ -37,10 +37,7 @@ const row = {
|
|
|
37
37
|
};
|
|
38
38
|
const CurrentComposition = () => {
|
|
39
39
|
const video = remotion_1.Internals.useVideo();
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
}
|
|
43
|
-
return (jsx_runtime_1.jsx("div", { style: container, children: jsx_runtime_1.jsx("div", { style: row, children: jsx_runtime_1.jsxs("div", { children: [
|
|
44
|
-
jsx_runtime_1.jsx("div", { style: title, children: video.id }), jsx_runtime_1.jsxs("div", { style: subtitle, children: [video.width, "x", video.height, (0, is_composition_still_1.isCompositionStill)(video) ? null : `, ${video.fps} FPS`] }), (0, is_composition_still_1.isCompositionStill)(video) ? (jsx_runtime_1.jsx("div", { style: subtitle, children: "Still" })) : (jsx_runtime_1.jsxs("div", { style: subtitle, children: ["Duration ", (0, render_frame_1.renderFrame)(video.durationInFrames, video.fps)] }))] }) }) }));
|
|
40
|
+
return (jsx_runtime_1.jsx("div", { style: container, children: video ? (jsx_runtime_1.jsx("div", { style: row, children: jsx_runtime_1.jsxs("div", { children: [
|
|
41
|
+
jsx_runtime_1.jsx("div", { style: title, children: video.id }), jsx_runtime_1.jsxs("div", { style: subtitle, children: [video.width, "x", video.height, (0, is_composition_still_1.isCompositionStill)(video) ? null : `, ${video.fps} FPS`] }), (0, is_composition_still_1.isCompositionStill)(video) ? (jsx_runtime_1.jsx("div", { style: subtitle, children: "Still" })) : (jsx_runtime_1.jsxs("div", { style: subtitle, children: ["Duration ", (0, render_frame_1.renderFrame)(video.durationInFrames, video.fps)] }))] }) })) : null }));
|
|
45
42
|
};
|
|
46
43
|
exports.CurrentComposition = CurrentComposition;
|
|
@@ -11,6 +11,7 @@ const SplitterContainer_1 = require("./Splitter/SplitterContainer");
|
|
|
11
11
|
const SplitterElement_1 = require("./Splitter/SplitterElement");
|
|
12
12
|
const SplitterHandle_1 = require("./Splitter/SplitterHandle");
|
|
13
13
|
const Timeline_1 = require("./Timeline/Timeline");
|
|
14
|
+
const TimelineEmptyState_1 = require("./Timeline/TimelineEmptyState");
|
|
14
15
|
const noop = () => undefined;
|
|
15
16
|
const container = {
|
|
16
17
|
display: 'flex',
|
|
@@ -21,13 +22,11 @@ const container = {
|
|
|
21
22
|
const EditorContent = ({ readOnlyStudio, children }) => {
|
|
22
23
|
const isStill = (0, is_current_selected_still_1.useIsStill)();
|
|
23
24
|
const { canvasContent } = (0, react_1.useContext)(remotion_1.Internals.CompositionManager);
|
|
24
|
-
|
|
25
|
-
const onlyTopPanel = canvasContent === null || isStill || canvasContent.type !== 'composition';
|
|
25
|
+
const showTimeline = canvasContent !== null && !isStill && canvasContent.type === 'composition';
|
|
26
26
|
return (jsx_runtime_1.jsxs("div", { style: container, children: [
|
|
27
27
|
jsx_runtime_1.jsx(InitialCompositionLoader_1.InitialCompositionLoader, {}), jsx_runtime_1.jsx(MenuToolbar_1.MenuToolbar, { readOnlyStudio: readOnlyStudio }), jsx_runtime_1.jsxs(SplitterContainer_1.SplitterContainer, { orientation: "horizontal", id: "top-to-bottom", maxFlex: 0.9, minFlex: 0.2, defaultFlex: 0.75, children: [
|
|
28
|
-
jsx_runtime_1.jsx(SplitterElement_1.SplitterElement, { sticky: null, type: "flexer", children: children }),
|
|
29
|
-
|
|
30
|
-
] }))] })
|
|
28
|
+
jsx_runtime_1.jsx(SplitterElement_1.SplitterElement, { sticky: null, type: "flexer", children: children }), jsx_runtime_1.jsx(SplitterHandle_1.SplitterHandle, { allowToCollapse: "none", onCollapse: noop }), jsx_runtime_1.jsx(SplitterElement_1.SplitterElement, { sticky: null, type: "anti-flexer", children: showTimeline ? jsx_runtime_1.jsx(Timeline_1.Timeline, {}) : jsx_runtime_1.jsx(TimelineEmptyState_1.TimelineEmptyState, {}) })
|
|
29
|
+
] })
|
|
31
30
|
] }));
|
|
32
31
|
};
|
|
33
32
|
exports.EditorContent = EditorContent;
|
|
@@ -175,7 +175,10 @@ const DuplicateCompositionLoaded = ({ initialType }) => {
|
|
|
175
175
|
}, []);
|
|
176
176
|
return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
177
177
|
jsx_runtime_1.jsx(ModalHeader_1.ModalHeader, { title: `Duplicate ${resolved.result.id}` }), jsx_runtime_1.jsxs("form", { onSubmit: onSubmit, children: [
|
|
178
|
-
jsx_runtime_1.jsxs("div", { style: content, children: [initialCompType === 'composition' ? (
|
|
178
|
+
jsx_runtime_1.jsxs("div", { style: content, children: [initialCompType === 'composition' ? (
|
|
179
|
+
// We allow converting from a composition to a still, but
|
|
180
|
+
// not the other way around
|
|
181
|
+
jsx_runtime_1.jsxs("div", { style: layout_2.optionRow, children: [
|
|
179
182
|
jsx_runtime_1.jsx("div", { style: layout_2.label, children: "Type" }), jsx_runtime_1.jsx("div", { style: layout_2.rightRow, children: jsx_runtime_1.jsx(ComboBox_1.Combobox, { title: "Type of composition", style: comboBoxStyle, values: typeValues, selectedId: type }) })
|
|
180
183
|
] })) : null, jsx_runtime_1.jsxs("div", { style: layout_2.optionRow, children: [
|
|
181
184
|
jsx_runtime_1.jsx("div", { style: layout_2.label, children: "ID" }), jsx_runtime_1.jsx("div", { style: layout_2.rightRow, children: jsx_runtime_1.jsxs("div", { children: [
|
|
@@ -8,4 +8,5 @@ export declare const InputDragger: React.ForwardRefExoticComponent<InputHTMLAttr
|
|
|
8
8
|
readonly status: RemInputStatus;
|
|
9
9
|
readonly formatter?: ((str: string | number) => string) | undefined;
|
|
10
10
|
readonly rightAlign: boolean;
|
|
11
|
+
readonly small?: boolean | undefined;
|
|
11
12
|
} & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -45,27 +45,34 @@ const RemInput_1 = require("./RemInput");
|
|
|
45
45
|
const isInt = (num) => {
|
|
46
46
|
return num % 1 === 0;
|
|
47
47
|
};
|
|
48
|
-
const InputDraggerForwardRefFn = ({ onValueChange, onValueChangeEnd, min: _min, max: _max, step: _step, value, onTextChange, formatter = (q) => String(q), status, rightAlign, ...props }, ref) => {
|
|
48
|
+
const InputDraggerForwardRefFn = ({ onValueChange, onValueChangeEnd, min: _min, max: _max, step: _step, value, onTextChange, formatter = (q) => String(q), status, rightAlign, small, ...props }, ref) => {
|
|
49
49
|
const [inputFallback, setInputFallback] = (0, react_1.useState)(false);
|
|
50
|
+
const [dragging, setDragging] = (0, react_1.useState)(false);
|
|
50
51
|
const fallbackRef = (0, react_1.useRef)(null);
|
|
52
|
+
const pointerDownRef = (0, react_1.useRef)(false);
|
|
51
53
|
const style = (0, react_1.useMemo)(() => {
|
|
52
54
|
return {
|
|
53
55
|
...RemInput_1.inputBaseStyle,
|
|
54
56
|
backgroundColor: 'transparent',
|
|
55
57
|
borderColor: 'transparent',
|
|
56
58
|
padding: '4px 6px',
|
|
59
|
+
...{ outline: 'none' },
|
|
57
60
|
};
|
|
58
61
|
}, []);
|
|
59
62
|
const span = (0, react_1.useMemo)(() => ({
|
|
60
|
-
|
|
61
|
-
paddingBottom: 1,
|
|
62
|
-
color: colors_1.BLUE,
|
|
63
|
+
color: dragging ? 'var(--remotion-cli-internals-blue-hovered)' : colors_1.BLUE,
|
|
63
64
|
cursor: 'ew-resize',
|
|
64
65
|
userSelect: 'none',
|
|
65
66
|
WebkitUserSelect: 'none',
|
|
66
|
-
fontSize:
|
|
67
|
+
fontSize: small ? 12 : 14,
|
|
67
68
|
fontVariantNumeric: 'tabular-nums',
|
|
68
|
-
}), []);
|
|
69
|
+
}), [dragging, small]);
|
|
70
|
+
const onFocus = (0, react_1.useCallback)(() => {
|
|
71
|
+
if (!small || pointerDownRef.current) {
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
setInputFallback(true);
|
|
75
|
+
}, [small]);
|
|
69
76
|
const onClick = (0, react_1.useCallback)((e) => {
|
|
70
77
|
if (!(0, input_dragger_click_lock_1.getClickLock)()) {
|
|
71
78
|
e.stopPropagation();
|
|
@@ -78,6 +85,12 @@ const InputDraggerForwardRefFn = ({ onValueChange, onValueChangeEnd, min: _min,
|
|
|
78
85
|
const onEscape = (0, react_1.useCallback)(() => {
|
|
79
86
|
setInputFallback(false);
|
|
80
87
|
}, []);
|
|
88
|
+
const onInputChange = (0, react_1.useCallback)((e) => {
|
|
89
|
+
const parsed = Number(e.target.value);
|
|
90
|
+
if (e.target.value !== '' && !Number.isNaN(parsed)) {
|
|
91
|
+
onValueChange(parsed);
|
|
92
|
+
}
|
|
93
|
+
}, [onValueChange]);
|
|
81
94
|
const onBlur = (0, react_1.useCallback)(() => {
|
|
82
95
|
if (!fallbackRef.current) {
|
|
83
96
|
return;
|
|
@@ -106,6 +119,8 @@ const InputDraggerForwardRefFn = ({ onValueChange, onValueChangeEnd, min: _min,
|
|
|
106
119
|
return Math.ceil(val * factor) / factor;
|
|
107
120
|
};
|
|
108
121
|
const onPointerDown = (0, react_1.useCallback)((e) => {
|
|
122
|
+
pointerDownRef.current = true;
|
|
123
|
+
const target = e.currentTarget;
|
|
109
124
|
const { pageX, pageY, button } = e;
|
|
110
125
|
if (button !== 0) {
|
|
111
126
|
return;
|
|
@@ -119,6 +134,8 @@ const InputDraggerForwardRefFn = ({ onValueChange, onValueChangeEnd, min: _min,
|
|
|
119
134
|
const max = Number(_max !== null && _max !== void 0 ? _max : Infinity);
|
|
120
135
|
if (distanceFromStart > 4) {
|
|
121
136
|
(0, input_dragger_click_lock_1.setClickLock)(true);
|
|
137
|
+
setDragging(true);
|
|
138
|
+
target.blur();
|
|
122
139
|
}
|
|
123
140
|
const diff = (0, remotion_1.interpolate)(xDistance, [-5, -4, 0, 4, 5], [-step, 0, 0, 0, step]);
|
|
124
141
|
const newValue = Math.min(max, Math.max(min, Number(value) + diff));
|
|
@@ -129,6 +146,8 @@ const InputDraggerForwardRefFn = ({ onValueChange, onValueChangeEnd, min: _min,
|
|
|
129
146
|
window.addEventListener('mousemove', moveListener);
|
|
130
147
|
window.addEventListener('pointerup', () => {
|
|
131
148
|
window.removeEventListener('mousemove', moveListener);
|
|
149
|
+
pointerDownRef.current = false;
|
|
150
|
+
setDragging(false);
|
|
132
151
|
if (lastDragValue !== null && onValueChangeEnd) {
|
|
133
152
|
onValueChangeEnd(lastDragValue);
|
|
134
153
|
}
|
|
@@ -155,8 +174,8 @@ const InputDraggerForwardRefFn = ({ onValueChange, onValueChangeEnd, min: _min,
|
|
|
155
174
|
return 0.0001;
|
|
156
175
|
}, [_min, _step]);
|
|
157
176
|
if (inputFallback) {
|
|
158
|
-
return (jsx_runtime_1.jsx(z_index_1.HigherZIndex, { onEscape: onEscape, onOutsideClick: noop_1.noop, children: jsx_runtime_1.jsx(RemInput_1.RemotionInput, { ref: fallbackRef, autoFocus: true, onKeyPress: onKeyPress, onBlur: onBlur, min: _min, max: _max, step: deriveStep, defaultValue: value, status: status, pattern: '[0-9]*[.]?[0-9]*', rightAlign: rightAlign, ...props }) }));
|
|
177
|
+
return (jsx_runtime_1.jsx(z_index_1.HigherZIndex, { onEscape: onEscape, onOutsideClick: noop_1.noop, children: jsx_runtime_1.jsx(RemInput_1.RemotionInput, { ref: fallbackRef, autoFocus: true, onKeyPress: onKeyPress, onBlur: onBlur, onChange: onInputChange, min: _min, max: _max, step: deriveStep, defaultValue: value, status: status, pattern: '[0-9]*[.]?[0-9]*', rightAlign: rightAlign, ...props, ...(small ? { style: { padding: '4px 6px', fontSize: 12 } } : {}) }) }));
|
|
159
178
|
}
|
|
160
|
-
return (jsx_runtime_1.jsx("button", { ref: ref, type: "button", style: style, onClick: onClick, onPointerDown: onPointerDown, children: jsx_runtime_1.jsx("span", { style: span, children: formatter(value) }) }));
|
|
179
|
+
return (jsx_runtime_1.jsx("button", { ref: ref, type: "button", className: '__remotion_input_dragger', style: style, onClick: onClick, onFocus: onFocus, onPointerDown: onPointerDown, children: jsx_runtime_1.jsx("span", { style: span, children: formatter(value) }) }));
|
|
161
180
|
};
|
|
162
181
|
exports.InputDragger = react_1.default.forwardRef(InputDraggerForwardRefFn);
|
|
@@ -120,6 +120,6 @@ const OptionsPanel = ({ readOnlyStudio }) => {
|
|
|
120
120
|
};
|
|
121
121
|
}, [reset]);
|
|
122
122
|
return (jsx_runtime_1.jsxs("div", { style: container, className: "css-reset", children: [
|
|
123
|
-
jsx_runtime_1.jsx("div", { style: tabsContainer, children: jsx_runtime_1.jsxs(Tabs_1.Tabs, { children: [visualControlsTabActivated ? (jsx_runtime_1.jsx(Tabs_1.Tab, { selected: panel === 'visual-controls', onClick: onVisualControlsSelected, children: "Controls" })) : null,
|
|
123
|
+
jsx_runtime_1.jsx("div", { style: tabsContainer, children: jsx_runtime_1.jsxs(Tabs_1.Tabs, { children: [visualControlsTabActivated ? (jsx_runtime_1.jsx(Tabs_1.Tab, { selected: panel === 'visual-controls', onClick: onVisualControlsSelected, children: "Controls" })) : null, jsx_runtime_1.jsxs(Tabs_1.Tab, { selected: panel === 'input-props', onClick: onPropsSelected, style: { justifyContent: 'space-between' }, children: ["Props", unsavedChangesExist && composition ? (jsx_runtime_1.jsx(GlobalPropsEditorUpdateButton_1.GlobalPropsEditorUpdateButton, { compositionId: composition.id, currentDefaultProps: currentDefaultProps })) : null] }), renderingAvailable ? (jsx_runtime_1.jsx(RendersTab_1.RendersTab, { onClick: onRendersSelected, selected: panel === 'renders' })) : null] }) }), panel === 'input-props' ? (composition ? (jsx_runtime_1.jsx(DataEditor_1.DataEditor, { unresolvedComposition: composition, defaultProps: currentDefaultProps, setDefaultProps: setDefaultProps, mayShowSaveButton: true, propsEditType: "default-props", saving: saving, setSaving: setSaving, readOnlyStudio: readOnlyStudio }, composition.id)) : null) : panel === 'visual-controls' && visualControlsTabActivated ? (jsx_runtime_1.jsx(VisualControlsContent_1.VisualControlsContent, {})) : !renderingAvailable ? null : (jsx_runtime_1.jsx(RenderQueue_1.RenderQueue, {}))] }));
|
|
124
124
|
};
|
|
125
125
|
exports.OptionsPanel = OptionsPanel;
|
|
@@ -5,7 +5,7 @@ const react_1 = require("react");
|
|
|
5
5
|
const remotion_1 = require("remotion");
|
|
6
6
|
const playbackrate_1 = require("../state/playbackrate");
|
|
7
7
|
const PlaybackRatePersistor = () => {
|
|
8
|
-
const { setPlaybackRate, playbackRate } =
|
|
8
|
+
const { setPlaybackRate, playbackRate } = remotion_1.Internals.useTimelineContext();
|
|
9
9
|
(0, react_1.useEffect)(() => {
|
|
10
10
|
setPlaybackRate((0, playbackrate_1.loadPlaybackRate)());
|
|
11
11
|
}, [setPlaybackRate]);
|
|
@@ -25,6 +25,7 @@ const RenderButton_1 = require("./RenderButton");
|
|
|
25
25
|
const SizeSelector_1 = require("./SizeSelector");
|
|
26
26
|
const TimelineZoomControls_1 = require("./Timeline/TimelineZoomControls");
|
|
27
27
|
const TimelineInOutToggle_1 = require("./TimelineInOutToggle");
|
|
28
|
+
const TOOLBAR_HEIGHT = 56;
|
|
28
29
|
const container = {
|
|
29
30
|
display: 'flex',
|
|
30
31
|
justifyContent: 'center',
|
|
@@ -34,6 +35,7 @@ const container = {
|
|
|
34
35
|
alignItems: 'center',
|
|
35
36
|
flexDirection: 'row',
|
|
36
37
|
background: colors_1.BACKGROUND,
|
|
38
|
+
height: TOOLBAR_HEIGHT,
|
|
37
39
|
};
|
|
38
40
|
const mobileContainer = {
|
|
39
41
|
...container,
|
|
@@ -72,7 +74,7 @@ const padding = {
|
|
|
72
74
|
width: timeline_layout_1.TIMELINE_PADDING,
|
|
73
75
|
};
|
|
74
76
|
const PreviewToolbar = ({ readOnlyStudio, bufferStateDelayInMilliseconds }) => {
|
|
75
|
-
const { playbackRate, setPlaybackRate } =
|
|
77
|
+
const { playbackRate, setPlaybackRate } = remotion_1.Internals.useTimelineContext();
|
|
76
78
|
const { mediaMuted } = (0, react_1.useContext)(remotion_1.Internals.MediaVolumeContext);
|
|
77
79
|
const { setMediaMuted } = (0, react_1.useContext)(remotion_1.Internals.SetMediaVolumeContext);
|
|
78
80
|
const { canvasContent } = (0, react_1.useContext)(remotion_1.Internals.CompositionManager);
|
|
@@ -140,7 +142,7 @@ const PreviewToolbar = ({ readOnlyStudio, bufferStateDelayInMilliseconds }) => {
|
|
|
140
142
|
jsx_runtime_1.jsx("div", { style: padding }), jsx_runtime_1.jsx(TimelineZoomControls_1.TimelineZoomControls, {})
|
|
141
143
|
] }), jsx_runtime_1.jsx(layout_1.Flex, {}), jsx_runtime_1.jsx(SizeSelector_1.SizeSelector, {}), isStill || isVideoComposition ? (jsx_runtime_1.jsx(PlaybackRateSelector_1.PlaybackRateSelector, { setPlaybackRate: setPlaybackRate, playbackRate: playbackRate })) : null] })), isVideoComposition ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
142
144
|
jsx_runtime_1.jsx(layout_1.Spacing, { x: 2 }), jsx_runtime_1.jsx(PlayPause_1.PlayPause, { bufferStateDelayInMilliseconds: bufferStateDelayInMilliseconds, loop: loop, playbackRate: playbackRate }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 2 }), jsx_runtime_1.jsx(LoopToggle_1.LoopToggle, { loop: loop, setLoop: setLoop }), jsx_runtime_1.jsx(MuteToggle_1.MuteToggle, { muted: mediaMuted, setMuted: setMediaMuted }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 2 }), jsx_runtime_1.jsx(TimelineInOutToggle_1.TimelineInOutPointToggle, {}), jsx_runtime_1.jsx(layout_1.Spacing, { x: 2 })
|
|
143
|
-
] })) : null, (canvasContent === null || canvasContent === void 0 ? void 0 : canvasContent.type) === 'composition' ? jsx_runtime_1.jsx(CheckboardToggle_1.CheckboardToggle, {}) : null, jsx_runtime_1.jsx(layout_1.Spacing, { x: 1 }),
|
|
145
|
+
] })) : null, (canvasContent === null || canvasContent === void 0 ? void 0 : canvasContent.type) === 'composition' ? jsx_runtime_1.jsx(CheckboardToggle_1.CheckboardToggle, {}) : null, jsx_runtime_1.jsx(layout_1.Spacing, { x: 1 }), canvasContent && isFullscreenSupported ? jsx_runtime_1.jsx(FullscreenToggle_1.FullScreenToggle, {}) : null, jsx_runtime_1.jsx(layout_1.Flex, {}), isMobileLayout && (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
144
146
|
jsx_runtime_1.jsx(layout_1.Flex, {}), jsx_runtime_1.jsx(SizeSelector_1.SizeSelector, {}), isStill || isVideoComposition ? (jsx_runtime_1.jsx(PlaybackRateSelector_1.PlaybackRateSelector, { setPlaybackRate: setPlaybackRate, playbackRate: playbackRate })) : null] })), jsx_runtime_1.jsxs("div", { style: sideContainer, children: [
|
|
145
147
|
jsx_runtime_1.jsx(layout_1.Flex, {}), !isMobileLayout && jsx_runtime_1.jsx(FpsCounter_1.FpsCounter, { playbackSpeed: playbackRate }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 2 }), (0, should_show_render_button_1.shouldShowRenderButton)(readOnlyStudio) ? (jsx_runtime_1.jsx(RenderButton_1.RenderButton, { readOnlyStudio: readOnlyStudio })) : null, jsx_runtime_1.jsx(layout_1.Spacing, { x: 1.5 })
|
|
146
148
|
] }), jsx_runtime_1.jsx(PlaybackKeyboardShortcutsManager_1.PlaybackKeyboardShortcutsManager, { setPlaybackRate: setPlaybackRate }), jsx_runtime_1.jsx(PlaybackRatePersistor_1.PlaybackRatePersistor, {}), jsx_runtime_1.jsx("div", { ref: rightScrollIndicatorRef, style: scrollIndicatorRight })
|
|
@@ -41,6 +41,8 @@ const SchemaLabel = ({ jsonPath, isDefaultValue, onReset, onSave, showSaveButton
|
|
|
41
41
|
setClickableButtonHovered(false);
|
|
42
42
|
}, []);
|
|
43
43
|
const labelContent = (jsx_runtime_1.jsxs("span", { style: labelStyle, children: [(0, get_schema_label_1.getSchemaLabel)(jsonPath), " ", suffix ? suffix : null] }));
|
|
44
|
-
return (jsx_runtime_1.jsxs("div", { style: compactStyles, className: scroll_to_default_props_path_1.DEFAULT_PROPS_PATH_CLASSNAME, "data-json-path": jsonPath.join('.'), children: [handleClick ? (
|
|
44
|
+
return (jsx_runtime_1.jsxs("div", { style: compactStyles, className: scroll_to_default_props_path_1.DEFAULT_PROPS_PATH_CLASSNAME, "data-json-path": jsonPath.join('.'), children: [handleClick ? (
|
|
45
|
+
// Minus the padding that a button has (user agent padding-line-start)
|
|
46
|
+
jsx_runtime_1.jsx("button", { onPointerEnter: onClickablePointerEnter, onPointerLeave: onClickablePointerLeave, type: "button", onClick: handleClick, style: { border: 'none', padding: 0 }, children: labelContent })) : (labelContent), jsx_runtime_1.jsx(layout_1.Flex, {}), isDefaultValue ? null : jsx_runtime_1.jsx(SchemaResetButton_1.SchemaResetButton, { onClick: onReset }), isDefaultValue ? null : showSaveButton ? (jsx_runtime_1.jsx(SchemaSaveButton_1.SchemaSaveButton, { onClick: onSave, disabled: disableSave })) : null, onRemove ? jsx_runtime_1.jsx(InlineRemoveButton_1.InlineRemoveButton, { onClick: onRemove }) : null] }));
|
|
45
47
|
};
|
|
46
48
|
exports.SchemaLabel = SchemaLabel;
|
|
@@ -75,7 +75,9 @@ const ZodArrayEditor = ({ schema, jsonPath, setValue, defaultValue, value, onSav
|
|
|
75
75
|
onSave(() => localValue.value, false, false);
|
|
76
76
|
}, saveDisabledByParent: saveDisabledByParent, saving: saving, showSaveButton: showSaveButton, valid: localValue.zodValidation.success, handleClick: () => setExpanded(!expanded) }) }), expanded ? (jsx_runtime_1.jsx(RevisionContextProvider, { children: jsx_runtime_1.jsxs(SchemaVerticalGuide_1.SchemaVerticalGuide, { isRoot: false, children: [localValue.value.map((child, i) => {
|
|
77
77
|
var _a;
|
|
78
|
-
return (
|
|
78
|
+
return (
|
|
79
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
80
|
+
jsx_runtime_1.jsxs(react_1.default.Fragment, { children: [
|
|
79
81
|
jsx_runtime_1.jsx(ZodArrayItemEditor_1.ZodArrayItemEditor, { onChange: onChange, value: child, elementSchema: arrayElement, index: i, jsonPath: jsonPath, defaultValue: (_a = defaultValue === null || defaultValue === void 0 ? void 0 : defaultValue[i]) !== null && _a !== void 0 ? _a : (0, create_zod_values_1.createZodValues)(arrayElement, z, zodTypes), onSave: onSave, showSaveButton: showSaveButton, saving: saving, saveDisabledByParent: saveDisabledByParent, mayPad: mayPad, mayRemove: true }), jsx_runtime_1.jsx(SchemaSeparationLine_1.SchemaArrayItemSeparationLine, { schema: schema, index: i, onChange: onChange, isLast: i === localValue.value.length - 1, showAddButton: true })
|
|
80
82
|
] }, `${i}${localValue.keyStabilityRevision}`));
|
|
81
83
|
}), value.length === 0 ? (jsx_runtime_1.jsx(SchemaSeparationLine_1.SchemaArrayItemSeparationLine, { schema: schema, index: 0, onChange: onChange, isLast: true, showAddButton: true })) : null] }) })) : null, jsx_runtime_1.jsx(ZodFieldValidation_1.ZodFieldValidation, { path: jsonPath, localValue: localValue })
|
|
@@ -23,7 +23,9 @@ const ZodFieldValidation = ({ localValue, path }) => {
|
|
|
23
23
|
}
|
|
24
24
|
return (jsx_runtime_1.jsxs("div", { style: legend, children: [
|
|
25
25
|
jsx_runtime_1.jsx(ValidationMessage_1.ValidationMessage, { align: "flex-start", message: zodValidation.error.format()._errors[0], type: "error" }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 0.5 }), jsx_runtime_1.jsx(InfoBubble_1.InfoBubble, { title: "Zod validation failure", children: jsx_runtime_1.jsxs("div", { style: stackTrace, children: [
|
|
26
|
-
jsx_runtime_1.jsx("div", { style: stackTraceLabel, children: "Zod Validation has failed:" }), zodValidation.error.issues.map((error, index) => (
|
|
26
|
+
jsx_runtime_1.jsx("div", { style: stackTraceLabel, children: "Zod Validation has failed:" }), zodValidation.error.issues.map((error, index) => (
|
|
27
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
28
|
+
jsx_runtime_1.jsxs("div", { style: stackTraceLabel, children: ["Type: ", error.code, " ",
|
|
27
29
|
jsx_runtime_1.jsx("br", {}),
|
|
28
30
|
"Message: ", error.message, jsx_runtime_1.jsx("br", {}),
|
|
29
31
|
"Path: ", path.join('.')] }, index)))] }) }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 0.5 })
|
|
@@ -75,7 +75,9 @@ const ZodTupleEditor = ({ schema, jsonPath, setValue, defaultValue, value, onSav
|
|
|
75
75
|
onSave(() => localValue.value, false, false);
|
|
76
76
|
}, saveDisabledByParent: saveDisabledByParent, saving: saving, showSaveButton: showSaveButton, valid: localValue.zodValidation.success, handleClick: () => setExpanded(!expanded) }) }), expanded ? (jsx_runtime_1.jsx(RevisionContextProvider, { children: jsx_runtime_1.jsxs(SchemaVerticalGuide_1.SchemaVerticalGuide, { isRoot: false, children: [localValue.value.map((child, i) => {
|
|
77
77
|
var _a;
|
|
78
|
-
return (
|
|
78
|
+
return (
|
|
79
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
80
|
+
jsx_runtime_1.jsxs(react_1.default.Fragment, { children: [
|
|
79
81
|
jsx_runtime_1.jsx(ZodTupleItemEditor_1.ZodTupleItemEditor, { onChange: onChange, value: child, tupleItems: tupleItems, index: i, jsonPath: jsonPath, defaultValue: (_a = defaultValue === null || defaultValue === void 0 ? void 0 : defaultValue[i]) !== null && _a !== void 0 ? _a : (0, create_zod_values_1.createZodValues)(tupleItems[i], z, zodTypes), onSave: onSave, showSaveButton: showSaveButton, saving: saving, saveDisabledByParent: saveDisabledByParent, mayPad: mayPad }), jsx_runtime_1.jsx(SchemaSeparationLine_1.SchemaArrayItemSeparationLine, { schema: schema, index: i, onChange: onChange, isLast: i === localValue.value.length - 1, showAddButton: false })
|
|
80
82
|
] }, `${i}${localValue.keyStabilityRevision}`));
|
|
81
83
|
}), value.length === 0 ? (jsx_runtime_1.jsx(SchemaSeparationLine_1.SchemaArrayItemSeparationLine, { schema: schema, index: 0, onChange: onChange, isLast: true, showAddButton: false })) : null] }) })) : null, jsx_runtime_1.jsx(ZodFieldValidation_1.ZodFieldValidation, { path: jsonPath, localValue: localValue })
|
|
@@ -26,9 +26,16 @@ const containerLabels = {
|
|
|
26
26
|
mp3: 'MP3',
|
|
27
27
|
aac: 'AAC',
|
|
28
28
|
ogg: 'OGG',
|
|
29
|
+
flac: 'FLAC',
|
|
29
30
|
};
|
|
30
31
|
const videoContainers = ['mp4', 'webm', 'mkv', 'mov'];
|
|
31
|
-
const audioContainers = [
|
|
32
|
+
const audioContainers = [
|
|
33
|
+
'wav',
|
|
34
|
+
'mp3',
|
|
35
|
+
'aac',
|
|
36
|
+
'ogg',
|
|
37
|
+
'flac',
|
|
38
|
+
];
|
|
32
39
|
const codecLabels = {
|
|
33
40
|
h264: 'H.264',
|
|
34
41
|
h265: 'H.265',
|
|
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.RendersTab = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("react");
|
|
6
|
-
const remotion_1 = require("remotion");
|
|
7
6
|
const colors_1 = require("../helpers/colors");
|
|
8
7
|
const layout_1 = require("./layout");
|
|
9
8
|
const context_1 = require("./RenderQueue/context");
|
|
@@ -27,15 +26,8 @@ const badge = {
|
|
|
27
26
|
};
|
|
28
27
|
const RendersTab = ({ selected, onClick }) => {
|
|
29
28
|
const { jobs } = (0, react_1.useContext)(context_1.RenderQueueContext);
|
|
30
|
-
const { canvasContent } = (0, react_1.useContext)(remotion_1.Internals.CompositionManager);
|
|
31
29
|
const failedJobs = jobs.filter((j) => j.status === 'failed').length;
|
|
32
30
|
const jobCount = jobs.length;
|
|
33
|
-
const isActuallySelected = (0, react_1.useMemo)(() => {
|
|
34
|
-
if (!canvasContent || canvasContent.type !== 'composition') {
|
|
35
|
-
return true;
|
|
36
|
-
}
|
|
37
|
-
return selected;
|
|
38
|
-
}, [canvasContent, selected]);
|
|
39
31
|
const badgeStyle = (0, react_1.useMemo)(() => {
|
|
40
32
|
return {
|
|
41
33
|
...badge,
|
|
@@ -46,7 +38,7 @@ const RendersTab = ({ selected, onClick }) => {
|
|
|
46
38
|
borderColor: colors_1.LIGHT_TEXT,
|
|
47
39
|
};
|
|
48
40
|
}, [failedJobs]);
|
|
49
|
-
return (jsx_runtime_1.jsx(Tabs_1.Tab, { selected:
|
|
41
|
+
return (jsx_runtime_1.jsx(Tabs_1.Tab, { selected: selected, onClick: onClick, children: jsx_runtime_1.jsxs("div", { style: row, children: ["Renders", jobCount > 0 ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
50
42
|
jsx_runtime_1.jsx(layout_1.Flex, {}), jsx_runtime_1.jsx("div", { style: badgeStyle, children: jobCount })
|
|
51
43
|
] })) : null] }) }));
|
|
52
44
|
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { SchemaFieldInfo } from '../../helpers/timeline-layout';
|
|
3
|
+
export declare const TimelineBooleanField: React.FC<{
|
|
4
|
+
readonly field: SchemaFieldInfo;
|
|
5
|
+
readonly codeValue: unknown;
|
|
6
|
+
readonly effectiveValue: unknown;
|
|
7
|
+
readonly canUpdate: boolean;
|
|
8
|
+
readonly onSave: (key: string, value: unknown) => Promise<void>;
|
|
9
|
+
}>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TimelineBooleanField = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_1 = require("react");
|
|
6
|
+
const Checkbox_1 = require("../Checkbox");
|
|
7
|
+
const checkboxContainer = {
|
|
8
|
+
marginLeft: 8,
|
|
9
|
+
};
|
|
10
|
+
const TimelineBooleanField = ({ field, codeValue, effectiveValue, canUpdate, onSave }) => {
|
|
11
|
+
const checked = Boolean(effectiveValue);
|
|
12
|
+
const onChange = (0, react_1.useCallback)(() => {
|
|
13
|
+
const newValue = !checked;
|
|
14
|
+
if (canUpdate && newValue !== codeValue) {
|
|
15
|
+
onSave(field.key, newValue);
|
|
16
|
+
}
|
|
17
|
+
}, [canUpdate, onSave, field.key, checked, codeValue]);
|
|
18
|
+
return (jsx_runtime_1.jsx("div", { style: checkboxContainer, children: jsx_runtime_1.jsx(Checkbox_1.Checkbox, { checked: checked, onChange: onChange, name: field.key, disabled: !canUpdate }) }));
|
|
19
|
+
};
|
|
20
|
+
exports.TimelineBooleanField = TimelineBooleanField;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TimelineEmptyState = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const colors_1 = require("../../helpers/colors");
|
|
6
|
+
const container = {
|
|
7
|
+
display: 'flex',
|
|
8
|
+
flex: 1,
|
|
9
|
+
height: 0,
|
|
10
|
+
backgroundColor: colors_1.BACKGROUND,
|
|
11
|
+
};
|
|
12
|
+
const TimelineEmptyState = () => {
|
|
13
|
+
return jsx_runtime_1.jsx("div", { style: container });
|
|
14
|
+
};
|
|
15
|
+
exports.TimelineEmptyState = TimelineEmptyState;
|
|
@@ -1,7 +1,12 @@
|
|
|
1
|
+
import type { SequenceNodePath } from '@remotion/studio-shared';
|
|
1
2
|
import React from 'react';
|
|
2
3
|
import type { TSequence } from 'remotion';
|
|
3
4
|
import type { OriginalPosition } from '../../error-overlay/react-overlay/utils/get-source-map';
|
|
5
|
+
export declare const EXPANDED_SECTION_PADDING_LEFT = 28;
|
|
6
|
+
export declare const EXPANDED_SECTION_PADDING_RIGHT = 10;
|
|
4
7
|
export declare const TimelineExpandedSection: React.FC<{
|
|
5
8
|
readonly sequence: TSequence;
|
|
6
9
|
readonly originalLocation: OriginalPosition | null;
|
|
10
|
+
readonly nestedDepth: number;
|
|
11
|
+
readonly nodePath: SequenceNodePath | null;
|
|
7
12
|
}>;
|
|
@@ -1,22 +1,59 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
2
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TimelineExpandedSection = void 0;
|
|
36
|
+
exports.TimelineExpandedSection = exports.EXPANDED_SECTION_PADDING_RIGHT = exports.EXPANDED_SECTION_PADDING_LEFT = void 0;
|
|
4
37
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const react_1 = require("react");
|
|
38
|
+
const react_1 = __importStar(require("react"));
|
|
6
39
|
const colors_1 = require("../../helpers/colors");
|
|
7
40
|
const timeline_layout_1 = require("../../helpers/timeline-layout");
|
|
8
41
|
const TimelineFieldRow_1 = require("./TimelineFieldRow");
|
|
42
|
+
exports.EXPANDED_SECTION_PADDING_LEFT = 28;
|
|
43
|
+
exports.EXPANDED_SECTION_PADDING_RIGHT = 10;
|
|
9
44
|
const expandedSectionBase = {
|
|
10
45
|
color: 'white',
|
|
11
46
|
fontFamily: 'Arial, Helvetica, sans-serif',
|
|
12
47
|
fontSize: 12,
|
|
13
48
|
display: 'flex',
|
|
14
49
|
flexDirection: 'column',
|
|
15
|
-
paddingLeft: 28,
|
|
16
|
-
paddingRight: 10,
|
|
17
50
|
borderBottom: `1px solid ${colors_1.TIMELINE_TRACK_SEPARATOR}`,
|
|
18
51
|
};
|
|
19
|
-
const
|
|
52
|
+
const separator = {
|
|
53
|
+
height: 1,
|
|
54
|
+
backgroundColor: colors_1.TIMELINE_TRACK_SEPARATOR,
|
|
55
|
+
};
|
|
56
|
+
const TimelineExpandedSection = ({ sequence, originalLocation, nestedDepth, nodePath }) => {
|
|
20
57
|
var _a;
|
|
21
58
|
var _b;
|
|
22
59
|
const overrideId = (_b = (_a = sequence.controls) === null || _a === void 0 ? void 0 : _a.overrideId) !== null && _b !== void 0 ? _b : sequence.id;
|
|
@@ -42,8 +79,9 @@ const TimelineExpandedSection = ({ sequence, originalLocation }) => {
|
|
|
42
79
|
};
|
|
43
80
|
}, [expandedHeight]);
|
|
44
81
|
return (jsx_runtime_1.jsx("div", { style: style, children: schemaFields
|
|
45
|
-
? schemaFields.map((field) => {
|
|
46
|
-
return (jsx_runtime_1.jsx(TimelineFieldRow_1.TimelineFieldRow, { field: field, overrideId: overrideId, validatedLocation: validatedLocation
|
|
82
|
+
? schemaFields.map((field, i) => {
|
|
83
|
+
return (jsx_runtime_1.jsxs(react_1.default.Fragment, { children: [i > 0 ? jsx_runtime_1.jsx("div", { style: separator }) : null, jsx_runtime_1.jsx(TimelineFieldRow_1.TimelineFieldRow, { field: field, overrideId: overrideId, validatedLocation: validatedLocation, nestedDepth: nestedDepth, nodePath: nodePath })
|
|
84
|
+
] }, field.key));
|
|
47
85
|
})
|
|
48
86
|
: 'No schema' }));
|
|
49
87
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { SequenceNodePath } from '@remotion/studio-shared';
|
|
1
2
|
import React from 'react';
|
|
2
3
|
import type { CodePosition } from '../../error-overlay/react-overlay/utils/get-source-map';
|
|
3
4
|
import type { SchemaFieldInfo } from '../../helpers/timeline-layout';
|
|
@@ -5,4 +6,6 @@ export declare const TimelineFieldRow: React.FC<{
|
|
|
5
6
|
readonly field: SchemaFieldInfo;
|
|
6
7
|
readonly overrideId: string;
|
|
7
8
|
readonly validatedLocation: CodePosition | null;
|
|
9
|
+
readonly nestedDepth: number;
|
|
10
|
+
readonly nodePath: SequenceNodePath | null;
|
|
8
11
|
}>;
|