@remotion/studio 4.0.492 → 4.0.493

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.
Files changed (58) hide show
  1. package/dist/ResolveCompositionConfigInStudio.js +16 -6
  2. package/dist/components/CompositionSelector.js +1 -1
  3. package/dist/components/CompositionSelectorItem.js +1 -1
  4. package/dist/components/CurrentComposition.d.ts +1 -1
  5. package/dist/components/CurrentComposition.js +3 -4
  6. package/dist/components/InspectorInfoHeader.d.ts +1 -0
  7. package/dist/components/InspectorInfoHeader.js +7 -2
  8. package/dist/components/InspectorPanel/CompositionDimensions.d.ts +6 -0
  9. package/dist/components/InspectorPanel/CompositionDimensions.js +173 -0
  10. package/dist/components/InspectorPanel/ConnectedCompositionsSection.d.ts +9 -0
  11. package/dist/components/InspectorPanel/ConnectedCompositionsSection.js +32 -0
  12. package/dist/components/InspectorPanel/DefaultInspector.js +6 -3
  13. package/dist/components/InspectorPanel/EasingInspector.js +3 -3
  14. package/dist/components/InspectorPanel/KeyframeInspector.js +6 -4
  15. package/dist/components/InspectorPanel/KeyframeSettings.js +1 -1
  16. package/dist/components/InspectorPanel/SequenceInspectorHeader.d.ts +1 -1
  17. package/dist/components/InspectorPanel/SequenceInspectorHeader.js +9 -6
  18. package/dist/components/InspectorPanel/SequenceSelectionInspector.js +5 -2
  19. package/dist/components/InspectorPanel/common.d.ts +2 -1
  20. package/dist/components/InspectorPanel/common.js +11 -7
  21. package/dist/components/InspectorPanel/optimistic-composition-metadata.d.ts +22 -0
  22. package/dist/components/InspectorPanel/optimistic-composition-metadata.js +41 -0
  23. package/dist/components/InspectorPanel/styles.d.ts +2 -0
  24. package/dist/components/InspectorPanel/styles.js +7 -2
  25. package/dist/components/InspectorSequenceSection.js +2 -5
  26. package/dist/components/SelectedOutlineElement.js +21 -2
  27. package/dist/components/SelectedOutlineOverlay.d.ts +1 -1
  28. package/dist/components/SelectedOutlineOverlay.js +4 -3
  29. package/dist/components/Timeline/Timeline.js +8 -1
  30. package/dist/components/Timeline/TimelineClipboardKeybindings.js +133 -1
  31. package/dist/components/Timeline/TimelineList.js +2 -1
  32. package/dist/components/Timeline/TimelinePrimitiveFieldValue.js +1 -3
  33. package/dist/components/Timeline/TimelineSelection.js +19 -5
  34. package/dist/components/Timeline/TimelineSequenceItem.d.ts +2 -1
  35. package/dist/components/Timeline/TimelineSequenceItem.js +31 -8
  36. package/dist/components/Timeline/TimelineSequenceName.js +4 -0
  37. package/dist/components/Timeline/keyframe-clipboard.d.ts +34 -0
  38. package/dist/components/Timeline/keyframe-clipboard.js +278 -0
  39. package/dist/components/Timeline/timeline-field-display-utils.js +2 -1
  40. package/dist/components/Timeline/update-selected-easing.d.ts +1 -1
  41. package/dist/components/Timeline/update-selected-easing.js +4 -5
  42. package/dist/components/Timeline/use-expanded-track-keyframe-rows.js +3 -4
  43. package/dist/components/selected-outline-measurement.d.ts +2 -5
  44. package/dist/components/selected-outline-measurement.js +3 -4
  45. package/dist/esm/{chunk-ewx0568t.js → chunk-mndqr3zx.js} +5191 -4369
  46. package/dist/esm/internals.mjs +5191 -4369
  47. package/dist/esm/previewEntry.mjs +5781 -4963
  48. package/dist/esm/renderEntry.mjs +1 -1
  49. package/dist/helpers/calculate-timeline.d.ts +2 -1
  50. package/dist/helpers/calculate-timeline.js +36 -5
  51. package/dist/{components/InspectorPanel/get-compositions-matching-single-child.d.ts → helpers/get-connected-compositions.d.ts} +1 -1
  52. package/dist/{components/InspectorPanel/get-compositions-matching-single-child.js → helpers/get-connected-compositions.js} +3 -3
  53. package/dist/helpers/get-sequence-double-click-action.d.ts +6 -0
  54. package/dist/helpers/get-sequence-double-click-action.js +13 -0
  55. package/dist/helpers/get-timeline-sequence-sort-key.d.ts +2 -1
  56. package/package.json +11 -11
  57. package/dist/components/InspectorPanel/SequenceCompositionsSection.d.ts +0 -5
  58. package/dist/components/InspectorPanel/SequenceCompositionsSection.js +0 -37
@@ -47,7 +47,7 @@ const ResolveCompositionConfigInStudio = ({ children }) => {
47
47
  return controller;
48
48
  }
49
49
  const { signal } = controller;
50
- const result = remotion_1.Internals.resolveVideoConfigOrCatch({
50
+ const result = remotion_1.Internals.resolveVideoConfigWithMetadataOrCatch({
51
51
  compositionId,
52
52
  calculateMetadata: calculateMetadata,
53
53
  inputProps: combinedProps,
@@ -79,6 +79,7 @@ const ResolveCompositionConfigInStudio = ({ children }) => {
79
79
  [compositionId]: {
80
80
  type: 'success-and-refreshing',
81
81
  result: prev.result,
82
+ metadataSource: prev.metadataSource,
82
83
  },
83
84
  };
84
85
  }
@@ -98,7 +99,8 @@ const ResolveCompositionConfigInStudio = ({ children }) => {
98
99
  ...r,
99
100
  [compositionId]: {
100
101
  type: 'success',
101
- result: c,
102
+ result: c.videoConfig,
103
+ metadataSource: c.metadataSource,
102
104
  },
103
105
  }));
104
106
  })
@@ -120,7 +122,8 @@ const ResolveCompositionConfigInStudio = ({ children }) => {
120
122
  ...r,
121
123
  [compositionId]: {
122
124
  type: 'success',
123
- result: promOrNot,
125
+ result: promOrNot.videoConfig,
126
+ metadataSource: promOrNot.metadataSource,
124
127
  },
125
128
  }));
126
129
  }
@@ -143,7 +146,7 @@ const ResolveCompositionConfigInStudio = ({ children }) => {
143
146
  ...(inputProps !== null && inputProps !== void 0 ? inputProps : {}),
144
147
  };
145
148
  const controller = new AbortController();
146
- const result = remotion_1.Internals.resolveVideoConfigOrCatch({
149
+ const result = remotion_1.Internals.resolveVideoConfigWithMetadataOrCatch({
147
150
  compositionId: composition.id,
148
151
  calculateMetadata: composition.calculateMetadata,
149
152
  inputProps: combinedProps,
@@ -162,10 +165,11 @@ const ResolveCompositionConfigInStudio = ({ children }) => {
162
165
  ...configs,
163
166
  [composition.id]: {
164
167
  type: 'success',
165
- result: resolved,
168
+ result: resolved.videoConfig,
169
+ metadataSource: resolved.metadataSource,
166
170
  },
167
171
  }));
168
- return resolved;
172
+ return resolved.videoConfig;
169
173
  }, [allEditorProps, compositions, inputProps]);
170
174
  (0, react_1.useImperativeHandle)(remotion_1.Internals.resolveCompositionsRef, () => {
171
175
  return {
@@ -305,6 +309,12 @@ const ResolveCompositionConfigInStudio = ({ children }) => {
305
309
  [curr.id]: {
306
310
  type: 'success',
307
311
  result: { ...curr, defaultProps: (_a = curr.defaultProps) !== null && _a !== void 0 ? _a : {} },
312
+ metadataSource: {
313
+ durationInFrames: 'composition',
314
+ fps: 'composition',
315
+ height: 'composition',
316
+ width: 'composition',
317
+ },
308
318
  },
309
319
  };
310
320
  }, {}),
@@ -250,7 +250,7 @@ const CompositionSelector = () => {
250
250
  },
251
251
  dryRun: false,
252
252
  signal: controller.signal,
253
- symbolicatedStack: null,
253
+ symbolicatedStack: (0, studio_shared_1.compositionDragDataToSymbolicatedStack)(parsed),
254
254
  });
255
255
  notification.replaceContent(result.success
256
256
  ? `Moved ${parsed.compositionId} outside of folder`
@@ -238,7 +238,7 @@ const CompositionSelectorItem = ({ item, level, currentComposition, tabIndex, se
238
238
  },
239
239
  dryRun: false,
240
240
  signal: controller.signal,
241
- symbolicatedStack: null,
241
+ symbolicatedStack: (0, studio_shared_1.compositionDragDataToSymbolicatedStack)(parsed),
242
242
  });
243
243
  notification.replaceContent(result.success
244
244
  ? `Moved ${parsed.compositionId} to ${folderId}`
@@ -1,2 +1,2 @@
1
- export declare const CURRENT_COMPOSITION_HEIGHT = 84;
1
+ export declare const CURRENT_COMPOSITION_HEIGHT = 66;
2
2
  export declare const CurrentComposition: () => import("react/jsx-runtime").JSX.Element;
@@ -9,14 +9,13 @@ const open_in_editor_1 = require("../helpers/open-in-editor");
9
9
  const react_2 = require("../icons/react");
10
10
  const still_1 = require("../icons/still");
11
11
  const video_1 = require("../icons/video");
12
- const render_frame_1 = require("../state/render-frame");
13
12
  const InlineCompositionName_1 = require("./InlineCompositionName");
14
13
  const InspectorInfoHeader_1 = require("./InspectorInfoHeader");
15
14
  const InspectorLocationCopy_1 = require("./InspectorLocationCopy");
16
15
  const InspectorSourceLocation_1 = require("./InspectorSourceLocation");
17
16
  const NotificationCenter_1 = require("./Notifications/NotificationCenter");
18
17
  const use_resolved_stack_1 = require("./Timeline/use-resolved-stack");
19
- exports.CURRENT_COMPOSITION_HEIGHT = InspectorInfoHeader_1.INSPECTOR_INFO_HEADER_MIN_HEIGHT;
18
+ exports.CURRENT_COMPOSITION_HEIGHT = 66;
20
19
  const sourceLocationIconStyle = {
21
20
  flexShrink: 0,
22
21
  height: 13,
@@ -86,9 +85,9 @@ const CurrentComposition = () => {
86
85
  }
87
86
  return (0, is_composition_still_1.isCompositionStill)(video) ? (jsx_runtime_1.jsx(still_1.StillIcon, { color: color, style: sourceLocationIconStyle })) : (jsx_runtime_1.jsx(video_1.FilmIcon, { color: color, style: sourceLocationIconStyle }));
88
87
  }, [video]);
89
- return (jsx_runtime_1.jsx(InspectorInfoHeader_1.InspectorInfoHeader, { children: video ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
88
+ return (jsx_runtime_1.jsx(InspectorInfoHeader_1.InspectorInfoHeader, { minHeight: exports.CURRENT_COMPOSITION_HEIGHT, children: video ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
90
89
  jsx_runtime_1.jsxs(InspectorLocationCopy_1.InspectorLocationCopy, { location: validatedLocation, name: video.id, children: [
91
90
  jsx_runtime_1.jsx(InlineCompositionName_1.InlineCompositionName, { compositionId: video.id, stack: (_e = currentComposition === null || currentComposition === void 0 ? void 0 : currentComposition.stack) !== null && _e !== void 0 ? _e : null, compositions: compositions }, video.id), jsx_runtime_1.jsx(InspectorSourceLocation_1.InspectorSourceLocation, { location: validatedLocation, canOpen: validatedLocation !== null, onOpen: openFileLocation, renderIcon: renderCompositionIcon }), jsx_runtime_1.jsx(InspectorSourceLocation_1.InspectorSourceLocation, { location: componentLocation, canOpen: componentLocation !== null, onOpen: openComponentLocation, renderIcon: renderReactIcon })
92
- ] }), jsx_runtime_1.jsxs(InspectorInfoHeader_1.InspectorInfoSubtitle, { 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(InspectorInfoHeader_1.InspectorInfoSubtitle, { children: "Still" })) : (jsx_runtime_1.jsxs(InspectorInfoHeader_1.InspectorInfoSubtitle, { children: ["Duration ", (0, render_frame_1.renderFrame)(video.durationInFrames, video.fps)] }))] })) : null }));
91
+ ] }), (0, is_composition_still_1.isCompositionStill)(video) ? (jsx_runtime_1.jsx(InspectorInfoHeader_1.InspectorInfoSubtitle, { children: "Still" })) : null] })) : null }));
93
92
  };
94
93
  exports.CurrentComposition = CurrentComposition;
@@ -3,6 +3,7 @@ export declare const INSPECTOR_INFO_HEADER_MIN_HEIGHT = 84;
3
3
  export declare const InspectorInfoHeader: React.FC<{
4
4
  readonly children?: React.ReactNode;
5
5
  readonly contentSized?: boolean;
6
+ readonly minHeight?: number;
6
7
  }>;
7
8
  export declare const InspectorInfoTitle: React.FC<{
8
9
  readonly children: React.ReactNode;
@@ -44,8 +44,13 @@ const subtitle = {
44
44
  textOverflow: 'ellipsis',
45
45
  whiteSpace: 'nowrap',
46
46
  };
47
- const InspectorInfoHeader = ({ children, contentSized = false }) => {
48
- return (jsx_runtime_1.jsx("div", { style: contentSized ? containerBase : container, children: children === undefined || children === null ? null : (jsx_runtime_1.jsx("div", { style: row, children: jsx_runtime_1.jsx("div", { style: content, children: children }) })) }));
47
+ const InspectorInfoHeader = ({ children, contentSized = false, minHeight }) => {
48
+ const style = contentSized
49
+ ? containerBase
50
+ : minHeight === undefined
51
+ ? container
52
+ : { ...containerBase, minHeight };
53
+ return (jsx_runtime_1.jsx("div", { style: style, children: children === undefined || children === null ? null : (jsx_runtime_1.jsx("div", { style: row, children: jsx_runtime_1.jsx("div", { style: content, children: children }) })) }));
49
54
  };
50
55
  exports.InspectorInfoHeader = InspectorInfoHeader;
51
56
  const InspectorInfoTitle = ({ children }) => {
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ export declare const CompositionDimensions: React.FC<{
3
+ readonly compositionId: string;
4
+ readonly disabled: boolean;
5
+ readonly stack: string | null;
6
+ }>;
@@ -0,0 +1,173 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CompositionDimensions = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const react_1 = require("react");
6
+ const remotion_1 = require("remotion");
7
+ const colors_1 = require("../../helpers/colors");
8
+ const is_composition_still_1 = require("../../helpers/is-composition-still");
9
+ const resolved_stack_to_symbolicated_1 = require("../../helpers/resolved-stack-to-symbolicated");
10
+ const InputDragger_1 = require("../NewComposition/InputDragger");
11
+ const NotificationCenter_1 = require("../Notifications/NotificationCenter");
12
+ const actions_1 = require("../RenderQueue/actions");
13
+ const use_resolved_stack_1 = require("../Timeline/use-resolved-stack");
14
+ const common_1 = require("./common");
15
+ const optimistic_composition_metadata_1 = require("./optimistic-composition-metadata");
16
+ const styles_1 = require("./styles");
17
+ const fieldLabels = {
18
+ durationInFrames: 'Duration',
19
+ fps: 'Frame rate',
20
+ height: 'Height',
21
+ width: 'Width',
22
+ };
23
+ const computedStyle = {
24
+ color: colors_1.WHITE_ALPHA_40,
25
+ fontFamily: 'sans-serif',
26
+ fontSize: 12,
27
+ fontStyle: 'italic',
28
+ lineHeight: '16px',
29
+ userSelect: 'none',
30
+ };
31
+ const dimensionsControls = {
32
+ alignItems: 'center',
33
+ display: 'flex',
34
+ fontFamily: 'sans-serif',
35
+ fontSize: 12,
36
+ gap: 4,
37
+ justifyContent: 'flex-end',
38
+ lineHeight: '16px',
39
+ minWidth: 0,
40
+ };
41
+ const CompositionMetadataValue = ({ compositionId, computed, disabled, field, onPendingValue, onPendingValueAccepted, onPendingValueFailed, pendingValue, resolvedConfig, symbolicatedStack, value, }) => {
42
+ var _a;
43
+ const [dragValue, setDragValue] = (0, react_1.useState)(null);
44
+ const save = (0, react_1.useCallback)((newValue) => {
45
+ var _a;
46
+ if (newValue === ((_a = pendingValue === null || pendingValue === void 0 ? void 0 : pendingValue.value) !== null && _a !== void 0 ? _a : value)) {
47
+ setDragValue(null);
48
+ return;
49
+ }
50
+ if (symbolicatedStack === null) {
51
+ setDragValue(null);
52
+ (0, NotificationCenter_1.showNotification)('Could not determine where this composition is defined', 2000);
53
+ return;
54
+ }
55
+ const codemod = {
56
+ type: 'update-composition-metadata',
57
+ idToUpdate: compositionId,
58
+ newDurationInFrames: field === 'durationInFrames' ? newValue : null,
59
+ newFps: field === 'fps' ? newValue : null,
60
+ newHeight: field === 'height' ? newValue : null,
61
+ newWidth: field === 'width' ? newValue : null,
62
+ };
63
+ const optimisticValue = {
64
+ baseline: resolvedConfig,
65
+ status: 'saving',
66
+ value: newValue,
67
+ };
68
+ onPendingValue(field, optimisticValue);
69
+ setDragValue(null);
70
+ (0, actions_1.applyCodemod)({
71
+ codemod,
72
+ dryRun: false,
73
+ signal: new AbortController().signal,
74
+ symbolicatedStack,
75
+ })
76
+ .then((result) => {
77
+ if (!result.success) {
78
+ onPendingValueFailed(field, optimisticValue);
79
+ (0, NotificationCenter_1.showNotification)(`Could not update composition ${field}: ${result.reason}`, 2000);
80
+ return;
81
+ }
82
+ onPendingValueAccepted(field, optimisticValue);
83
+ })
84
+ .catch((error) => {
85
+ onPendingValueFailed(field, optimisticValue);
86
+ (0, NotificationCenter_1.showNotification)(`Could not update composition ${field}: ${error.message}`, 2000);
87
+ });
88
+ }, [
89
+ compositionId,
90
+ field,
91
+ onPendingValue,
92
+ onPendingValueAccepted,
93
+ onPendingValueFailed,
94
+ pendingValue === null || pendingValue === void 0 ? void 0 : pendingValue.value,
95
+ resolvedConfig,
96
+ symbolicatedStack,
97
+ value,
98
+ ]);
99
+ const isFps = field === 'fps';
100
+ const formatValue = (0, react_1.useCallback)((newValue) => {
101
+ const numberValue = Number(newValue);
102
+ if (field === 'fps') {
103
+ return `${numberValue}fps`;
104
+ }
105
+ const roundedValue = Math.round(numberValue);
106
+ if (field === 'durationInFrames') {
107
+ return `${roundedValue} ${roundedValue === 1 ? 'frame' : 'frames'}`;
108
+ }
109
+ return String(roundedValue);
110
+ }, [field]);
111
+ return computed ? (jsx_runtime_1.jsx("span", { style: computedStyle, children: formatValue(value) })) : disabled ? (formatValue(value)) : (jsx_runtime_1.jsx(InputDragger_1.InputDragger, { "aria-label": fieldLabels[field], type: "number", value: (_a = dragValue !== null && dragValue !== void 0 ? dragValue : pendingValue === null || pendingValue === void 0 ? void 0 : pendingValue.value) !== null && _a !== void 0 ? _a : value, disabled: pendingValue !== null, status: "ok", onValueChange: setDragValue, onValueChangeEnd: save, onTextChange: () => undefined, min: isFps ? 0.01 : 1, step: isFps ? 0.01 : 1, dragDecimalPlaces: isFps ? 2 : 0, formatter: formatValue, rightAlign: true, small: true }));
112
+ };
113
+ const CompositionDimensions = ({ compositionId, disabled, stack }) => {
114
+ var _a, _b, _c, _d;
115
+ const video = remotion_1.Internals.useVideo();
116
+ const resolvedVideoConfig = remotion_1.Internals.useResolvedVideoConfig(compositionId);
117
+ const resolvedConfig = (resolvedVideoConfig === null || resolvedVideoConfig === void 0 ? void 0 : resolvedVideoConfig.type) === 'success' ||
118
+ (resolvedVideoConfig === null || resolvedVideoConfig === void 0 ? void 0 : resolvedVideoConfig.type) === 'success-and-refreshing'
119
+ ? resolvedVideoConfig.result
120
+ : null;
121
+ const resolvedConfigRef = (0, react_1.useRef)(resolvedConfig);
122
+ resolvedConfigRef.current = resolvedConfig;
123
+ const [pendingValues, setPendingValues] = (0, react_1.useState)({});
124
+ const resolvedLocation = (0, use_resolved_stack_1.useResolvedStack)(stack);
125
+ const symbolicatedStack = (0, react_1.useMemo)(() => (0, resolved_stack_to_symbolicated_1.resolvedStackToSymbolicated)(resolvedLocation), [resolvedLocation]);
126
+ (0, react_1.useEffect)(() => {
127
+ if (resolvedConfig === null) {
128
+ return;
129
+ }
130
+ setPendingValues((pending) => (0, optimistic_composition_metadata_1.reconcilePendingCompositionMetadata)({
131
+ currentConfig: resolvedConfig,
132
+ pending,
133
+ }));
134
+ }, [resolvedConfig]);
135
+ const onPendingValue = (0, react_1.useCallback)((field, value) => {
136
+ setPendingValues((pending) => ({ ...pending, [field]: value }));
137
+ }, []);
138
+ const onPendingValueAccepted = (0, react_1.useCallback)((field, value) => {
139
+ setPendingValues((pending) => {
140
+ if (resolvedConfigRef.current === null) {
141
+ return pending;
142
+ }
143
+ return (0, optimistic_composition_metadata_1.acceptPendingCompositionMetadataValue)({
144
+ currentConfig: resolvedConfigRef.current,
145
+ field,
146
+ pending,
147
+ value,
148
+ });
149
+ });
150
+ }, []);
151
+ const onPendingValueFailed = (0, react_1.useCallback)((field, value) => {
152
+ setPendingValues((pending) => (0, optimistic_composition_metadata_1.failPendingCompositionMetadataValue)({ field, pending, value }));
153
+ }, []);
154
+ if (video === null || resolvedConfig === null) {
155
+ return null;
156
+ }
157
+ const metadataSource = (resolvedVideoConfig === null || resolvedVideoConfig === void 0 ? void 0 : resolvedVideoConfig.type) === 'success' ||
158
+ (resolvedVideoConfig === null || resolvedVideoConfig === void 0 ? void 0 : resolvedVideoConfig.type) === 'success-and-refreshing'
159
+ ? resolvedVideoConfig.metadataSource
160
+ : undefined;
161
+ const widthIsComputed = (metadataSource === null || metadataSource === void 0 ? void 0 : metadataSource.width) === 'calculate-metadata';
162
+ const heightIsComputed = (metadataSource === null || metadataSource === void 0 ? void 0 : metadataSource.height) === 'calculate-metadata';
163
+ const fpsIsComputed = (metadataSource === null || metadataSource === void 0 ? void 0 : metadataSource.fps) === 'calculate-metadata';
164
+ const durationIsComputed = (metadataSource === null || metadataSource === void 0 ? void 0 : metadataSource.durationInFrames) === 'calculate-metadata';
165
+ const isStill = (0, is_composition_still_1.isCompositionStill)(video);
166
+ return (jsx_runtime_1.jsxs("div", { style: styles_1.detailsContainer, children: [
167
+ jsx_runtime_1.jsx(common_1.InspectorDetailRow, { label: "Dimensions", children: jsx_runtime_1.jsxs("div", { style: dimensionsControls, children: [
168
+ jsx_runtime_1.jsx(CompositionMetadataValue, { compositionId: compositionId, computed: widthIsComputed, disabled: disabled, field: "width", onPendingValue: onPendingValue, onPendingValueAccepted: onPendingValueAccepted, onPendingValueFailed: onPendingValueFailed, pendingValue: (_a = pendingValues.width) !== null && _a !== void 0 ? _a : null, resolvedConfig: resolvedConfig, symbolicatedStack: symbolicatedStack, value: video.width }), jsx_runtime_1.jsx(CompositionMetadataValue, { compositionId: compositionId, computed: heightIsComputed, disabled: disabled, field: "height", onPendingValue: onPendingValue, onPendingValueAccepted: onPendingValueAccepted, onPendingValueFailed: onPendingValueFailed, pendingValue: (_b = pendingValues.height) !== null && _b !== void 0 ? _b : null, resolvedConfig: resolvedConfig, symbolicatedStack: symbolicatedStack, value: video.height })
169
+ ] }) }), isStill ? null : (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
170
+ jsx_runtime_1.jsx(common_1.InspectorDetailRow, { label: "Frame rate", children: jsx_runtime_1.jsx(CompositionMetadataValue, { compositionId: compositionId, computed: fpsIsComputed, disabled: disabled, field: "fps", onPendingValue: onPendingValue, onPendingValueAccepted: onPendingValueAccepted, onPendingValueFailed: onPendingValueFailed, pendingValue: (_c = pendingValues.fps) !== null && _c !== void 0 ? _c : null, resolvedConfig: resolvedConfig, symbolicatedStack: symbolicatedStack, value: video.fps }) }), jsx_runtime_1.jsx(common_1.InspectorDetailRow, { label: "Duration", children: jsx_runtime_1.jsx(CompositionMetadataValue, { compositionId: compositionId, computed: durationIsComputed, disabled: disabled, field: "durationInFrames", onPendingValue: onPendingValue, onPendingValueAccepted: onPendingValueAccepted, onPendingValueFailed: onPendingValueFailed, pendingValue: (_d = pendingValues.durationInFrames) !== null && _d !== void 0 ? _d : null, resolvedConfig: resolvedConfig, symbolicatedStack: symbolicatedStack, value: video.durationInFrames }) })
171
+ ] }))] }));
172
+ };
173
+ exports.CompositionDimensions = CompositionDimensions;
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import type { _InternalTypes } from 'remotion';
3
+ import type { TrackWithHash } from '../../helpers/get-timeline-sequence-sort-key';
4
+ export declare const useConnectedCompositions: ({ track, }: {
5
+ readonly track: TrackWithHash;
6
+ }) => import("remotion").AnyComposition[];
7
+ export declare const ConnectedCompositionsSection: React.FC<{
8
+ readonly connectedCompositions: readonly _InternalTypes['AnyComposition'][];
9
+ }>;
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ConnectedCompositionsSection = exports.useConnectedCompositions = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const react_1 = require("react");
6
+ const remotion_1 = require("remotion");
7
+ const get_connected_compositions_1 = require("../../helpers/get-connected-compositions");
8
+ const CompositionOrStillIcon_1 = require("../CompositionOrStillIcon");
9
+ const InitialCompositionLoader_1 = require("../InitialCompositionLoader");
10
+ const common_1 = require("./common");
11
+ const compositionIconStyle = {
12
+ height: 13,
13
+ width: 13,
14
+ };
15
+ const compositionListStyle = {
16
+ display: 'flex',
17
+ flexDirection: 'column',
18
+ padding: '6px 0',
19
+ };
20
+ const useConnectedCompositions = ({ track, }) => {
21
+ const { compositions } = (0, react_1.useContext)(remotion_1.Internals.CompositionManager);
22
+ return (0, react_1.useMemo)(() => (0, get_connected_compositions_1.getConnectedCompositions)({
23
+ compositions,
24
+ singleChildComponent: track.sequence.singleChildComponent,
25
+ }), [compositions, track.sequence.singleChildComponent]);
26
+ };
27
+ exports.useConnectedCompositions = useConnectedCompositions;
28
+ const ConnectedCompositionsSection = ({ connectedCompositions }) => {
29
+ const selectComposition = (0, InitialCompositionLoader_1.useSelectComposition)();
30
+ return (jsx_runtime_1.jsx("div", { style: compositionListStyle, children: connectedCompositions.map((composition) => (jsx_runtime_1.jsx(common_1.InspectorInlineAction, { disabled: false, onClick: () => selectComposition(composition, true), renderIcon: (color) => (jsx_runtime_1.jsx(CompositionOrStillIcon_1.CompositionOrStillIcon, { color: color, composition: composition, style: compositionIconStyle })), children: composition.id }, composition.id))) }));
31
+ };
32
+ exports.ConnectedCompositionsSection = ConnectedCompositionsSection;
@@ -18,6 +18,7 @@ const WarningIndicatorButton_1 = require("../RenderModal/WarningIndicatorButton"
18
18
  const SegmentedControl_1 = require("../SegmentedControl");
19
19
  const VisualControlsContent_1 = require("../VisualControls/VisualControlsContent");
20
20
  const common_1 = require("./common");
21
+ const CompositionDimensions_1 = require("./CompositionDimensions");
21
22
  const styles_1 = require("./styles");
22
23
  const DefaultInspector = ({ composition, currentDefaultProps, readOnlyStudio, setDefaultProps }) => {
23
24
  var _a, _b;
@@ -77,8 +78,10 @@ const DefaultInspector = ({ composition, currentDefaultProps, readOnlyStudio, se
77
78
  return jsx_runtime_1.jsx("div", { style: styles_1.container });
78
79
  }
79
80
  return (jsx_runtime_1.jsxs("div", { style: styles_1.scrollableContainer, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, children: [
80
- jsx_runtime_1.jsx("div", { style: styles_1.compositionSection, children: jsx_runtime_1.jsx(CurrentComposition_1.CurrentComposition, {}) }), canShowDefaultPropsSection ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
81
- jsx_runtime_1.jsx("div", { style: styles_1.inspectorSectionDivider }), jsx_runtime_1.jsxs("div", { style: styles_1.defaultPropsSection, children: [
81
+ jsx_runtime_1.jsxs("div", { style: styles_1.compositionSection, children: [
82
+ jsx_runtime_1.jsx(CurrentComposition_1.CurrentComposition, {}), jsx_runtime_1.jsx(common_1.InspectorSectionDivider, {}), jsx_runtime_1.jsx(CompositionDimensions_1.CompositionDimensions, { compositionId: composition.id, disabled: readOnlyStudio, stack: composition.stack })
83
+ ] }), canShowDefaultPropsSection ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
84
+ jsx_runtime_1.jsx(common_1.InspectorSectionDivider, {}), jsx_runtime_1.jsxs("div", { style: styles_1.defaultPropsSection, children: [
82
85
  jsx_runtime_1.jsx(common_1.InspectorSectionHeader, { children: jsx_runtime_1.jsxs("div", { style: styles_1.sectionHeaderRow, children: [
83
86
  jsx_runtime_1.jsxs("div", { style: styles_1.sectionHeaderStart, children: [
84
87
  jsx_runtime_1.jsx("span", { style: styles_1.sectionHeaderTitle, children: "Default Props" }), jsx_runtime_1.jsx(SegmentedControl_1.SegmentedControl, { items: defaultPropsModeItems, needsWrapping: false, size: "compact" })
@@ -86,7 +89,7 @@ const DefaultInspector = ({ composition, currentDefaultProps, readOnlyStudio, se
86
89
  ] }) }), defaultPropsWarnings.length > 0 && showWarning ? (jsx_runtime_1.jsx("div", { style: styles_1.defaultPropsWarningContainer, children: jsx_runtime_1.jsx(common_1.InspectorDefaultPropsWarnings, { warnings: defaultPropsWarnings }) })) : null, jsx_runtime_1.jsx(DefaultPropsEditor_1.DefaultPropsEditor, { unresolvedComposition: composition, defaultProps: currentDefaultProps, setDefaultProps: setDefaultProps, propsEditType: "default-props", schemaErrorMode: "compact", layout: "inspector", mode: defaultPropsMode, onModeChange: setDefaultPropsMode, hideModeControls: canShowDefaultPropsSection, warnings: defaultPropsWarnings, showWarning: false, setShowWarning: setShowWarning, hideWarningButton: true }, composition.id)
87
90
  ] })
88
91
  ] })) : null, hasVisualControls ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
89
- jsx_runtime_1.jsx("div", { style: styles_1.inspectorSectionDivider }), jsx_runtime_1.jsxs("div", { style: styles_1.visualControlsSection, children: [
92
+ jsx_runtime_1.jsx(common_1.InspectorSectionDivider, {}), jsx_runtime_1.jsxs("div", { style: styles_1.visualControlsSection, children: [
90
93
  jsx_runtime_1.jsx(common_1.InspectorSectionHeader, { children: "Visual Controls" }), jsx_runtime_1.jsx(VisualControlsContent_1.VisualControlsContent, {})
91
94
  ] })
92
95
  ] })) : null] }));
@@ -195,7 +195,7 @@ const EasingInspector = ({ selection }) => {
195
195
  track,
196
196
  ]);
197
197
  const renderHeader = (0, react_1.useCallback)(() => (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
198
- jsx_runtime_1.jsx(common_1.InspectorBackHeaderWithDivider, { disabled: parentSelection === null, onClick: onSelectParent, title: "Back to property", children: jsx_runtime_1.jsx("div", { style: styles_1.sectionHeaderTitle, children: fieldLabel }) }), easingUpdate === null || track === null ? null : (jsx_runtime_1.jsx(KeyframeEasingNavigator_1.KeyframeEasingNavigator, { currentSelection: currentEasingSelection !== null && currentEasingSelection !== void 0 ? currentEasingSelection : selection, includeEasings: true, keyframes: easingUpdate.propStatus.keyframes.map((keyframe) => ({
198
+ jsx_runtime_1.jsx(common_1.InspectorBackHeader, { disabled: parentSelection === null, onClick: onSelectParent, title: "Back to property", children: jsx_runtime_1.jsx("div", { style: styles_1.sectionHeaderTitle, children: fieldLabel }) }), jsx_runtime_1.jsx(common_1.InspectorSectionDivider, {}), easingUpdate === null || track === null ? null : (jsx_runtime_1.jsx(KeyframeEasingNavigator_1.KeyframeEasingNavigator, { currentSelection: currentEasingSelection !== null && currentEasingSelection !== void 0 ? currentEasingSelection : selection, includeEasings: true, keyframes: easingUpdate.propStatus.keyframes.map((keyframe) => ({
199
199
  ...keyframe,
200
200
  frame: keyframe.frame + track.keyframeDisplayOffset,
201
201
  })), nodePathInfo: selection.nodePathInfo }))] })), [
@@ -214,8 +214,8 @@ const EasingInspector = ({ selection }) => {
214
214
  return jsx_runtime_1.jsx(common_1.InspectorMessage, { children: "Easing unavailable" });
215
215
  }
216
216
  return (jsx_runtime_1.jsxs("div", { style: styles_1.selectedContainer, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, children: [
217
- jsx_runtime_1.jsx(SequenceInspectorHeader_1.SequenceInspectorHeaderWithDivider, { track: track }), jsx_runtime_1.jsx(EasingEditorModal_1.EasingEditor, { state: state, renderHeader: renderHeader }, (0, TimelineSelection_1.getTimelineSelectionKey)(currentEasingSelection)), jsx_runtime_1.jsx(KeyframeSettings_1.KeyframeSettings, { update: easingUpdate }), canAddKeyframeAtPlayhead ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
218
- jsx_runtime_1.jsx("div", { style: styles_1.inspectorSectionDivider }), jsx_runtime_1.jsx("div", { style: styles_1.detailsContainer, children: jsx_runtime_1.jsx(common_1.InspectorInlineAction, { disabled: addKeyframeDisabled, onClick: onAddKeyframeAtPlayhead, renderIcon: (color) => (jsx_runtime_1.jsx(plus_1.Plus, { color: color, style: addKeyframeIcon })), children: `Add keyframe at ${addKeyframeTime}` }) })
217
+ jsx_runtime_1.jsx(SequenceInspectorHeader_1.SequenceInspectorSections, { track: track }), jsx_runtime_1.jsx(common_1.InspectorSectionDivider, {}), jsx_runtime_1.jsx(EasingEditorModal_1.EasingEditor, { state: state, renderHeader: renderHeader }, (0, TimelineSelection_1.getTimelineSelectionKey)(currentEasingSelection)), jsx_runtime_1.jsx(common_1.InspectorSectionDivider, {}), jsx_runtime_1.jsx(KeyframeSettings_1.KeyframeSettings, { update: easingUpdate }), canAddKeyframeAtPlayhead ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
218
+ jsx_runtime_1.jsx(common_1.InspectorSectionDivider, {}), jsx_runtime_1.jsx("div", { style: styles_1.detailsWithInlineAction, children: jsx_runtime_1.jsx(common_1.InspectorInlineAction, { disabled: addKeyframeDisabled, onClick: onAddKeyframeAtPlayhead, renderIcon: (color) => (jsx_runtime_1.jsx(plus_1.Plus, { color: color, style: addKeyframeIcon })), children: `Add keyframe at ${addKeyframeTime}` }) })
219
219
  ] })) : null] }));
220
220
  };
221
221
  exports.EasingInspector = EasingInspector;
@@ -321,12 +321,14 @@ const KeyframeInspector = ({ selection }) => {
321
321
  return jsx_runtime_1.jsx(common_1.InspectorMessage, { children: "Keyframe unavailable" });
322
322
  }
323
323
  return (jsx_runtime_1.jsxs("div", { style: styles_1.selectedContainer, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, children: [
324
- jsx_runtime_1.jsx(SequenceInspectorHeader_1.SequenceInspectorHeaderWithDivider, { track: track }), jsx_runtime_1.jsx(common_1.InspectorBackHeaderWithDivider, { disabled: parentSelection === null, onClick: onSelectParent, title: "Back to property", children: jsx_runtime_1.jsx("div", { style: styles_1.sectionHeaderTitle, children: details.fieldLabel }) }), jsx_runtime_1.jsx(KeyframeEasingNavigator_1.KeyframeEasingNavigator, { currentSelection: selection, includeEasings: (0, update_selected_easing_1.canEditEasingForInterpolationFunction)(details.propStatus.interpolationFunction), keyframes: details.propStatus.keyframes.map((keyframe) => ({
324
+ jsx_runtime_1.jsx(SequenceInspectorHeader_1.SequenceInspectorSections, { track: track }), jsx_runtime_1.jsx(common_1.InspectorSectionDivider, {}), jsx_runtime_1.jsx(common_1.InspectorBackHeader, { disabled: parentSelection === null, onClick: onSelectParent, title: "Back to property", children: jsx_runtime_1.jsx("div", { style: styles_1.sectionHeaderTitle, children: details.fieldLabel }) }), jsx_runtime_1.jsx(common_1.InspectorSectionDivider, {}), jsx_runtime_1.jsx(KeyframeEasingNavigator_1.KeyframeEasingNavigator, { currentSelection: selection, includeEasings: (0, update_selected_easing_1.canEditEasingForInterpolationFunction)(details.propStatus.interpolationFunction), keyframes: details.propStatus.keyframes.map((keyframe) => ({
325
325
  ...keyframe,
326
326
  frame: keyframe.frame + details.keyframeDisplayOffset,
327
- })), nodePathInfo: selection.nodePathInfo }), jsx_runtime_1.jsxs("div", { style: styles_1.detailsContainer, children: [
328
- jsx_runtime_1.jsx(common_1.InspectorDetailRow, { label: "Frame", children: jsx_runtime_1.jsx(InputDragger_1.InputDragger, { type: "number", value: draftFrame, status: "ok", onValueChange: onFrameChange, onValueChangeEnd: onFrameChangeEnd, onTextChange: () => undefined, min: 0, max: Math.max(0, videoConfig.durationInFrames - 1), step: 1, formatter: (value) => String(Math.round(Number(value))), rightAlign: true, small: true }) }), jsx_runtime_1.jsxs("div", { style: styles_1.keyframeEditorRow, children: [
329
- jsx_runtime_1.jsx("div", { style: styles_1.keyframeEditorLabel, children: details.fieldLabel }), jsx_runtime_1.jsx("div", { style: styles_1.keyframeEditorValue, children: details.type === 'sequence' ? (jsx_runtime_1.jsx(TimelineSequencePropItem_1.TimelineSequenceKeyframedValue, { field: details.field, fileName: details.fileName, nodePath: details.nodePath, schema: details.schema, propStatus: details.propStatus, sourceFrame: details.sourceFrame })) : (jsx_runtime_1.jsx(TimelineEffectPropItem_1.TimelineEffectPropValue, { field: details.field, nodePath: details.nodePath, validatedLocation: details.validatedLocation, sourceFrame: details.sourceFrame })) })
327
+ })), nodePathInfo: selection.nodePathInfo }), jsx_runtime_1.jsxs("div", { style: styles_1.detailsWithInlineAction, children: [
328
+ jsx_runtime_1.jsxs("div", { style: styles_1.detailsBeforeInlineAction, children: [
329
+ jsx_runtime_1.jsx(common_1.InspectorDetailRow, { label: "Frame", children: jsx_runtime_1.jsx(InputDragger_1.InputDragger, { type: "number", value: draftFrame, status: "ok", onValueChange: onFrameChange, onValueChangeEnd: onFrameChangeEnd, onTextChange: () => undefined, min: 0, max: Math.max(0, videoConfig.durationInFrames - 1), step: 1, formatter: (value) => String(Math.round(Number(value))), rightAlign: true, small: true }) }), jsx_runtime_1.jsxs("div", { style: styles_1.keyframeEditorRow, children: [
330
+ jsx_runtime_1.jsx("div", { style: styles_1.keyframeEditorLabel, children: details.fieldLabel }), jsx_runtime_1.jsx("div", { style: styles_1.keyframeEditorValue, children: details.type === 'sequence' ? (jsx_runtime_1.jsx(TimelineSequencePropItem_1.TimelineSequenceKeyframedValue, { field: details.field, fileName: details.fileName, nodePath: details.nodePath, schema: details.schema, propStatus: details.propStatus, sourceFrame: details.sourceFrame })) : (jsx_runtime_1.jsx(TimelineEffectPropItem_1.TimelineEffectPropValue, { field: details.field, nodePath: details.nodePath, validatedLocation: details.validatedLocation, sourceFrame: details.sourceFrame })) })
331
+ ] })
330
332
  ] }), jsx_runtime_1.jsx(common_1.InspectorInlineAction, { disabled: removeDisabled, onClick: onRemoveKeyframe, renderIcon: (color) => jsx_runtime_1.jsx(TrashIcon, { color: color }), children: "Remove keyframe" })] })
331
333
  ] }));
332
334
  };
@@ -133,7 +133,7 @@ const KeyframeSettings = ({ update }) => {
133
133
  return String(Math.round(Number(value)));
134
134
  }, []);
135
135
  return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
136
- jsx_runtime_1.jsx("div", { style: styles_1.inspectorSectionDivider }), jsx_runtime_1.jsx(common_1.InspectorSectionHeader, { children: "Keyframe settings" }), jsx_runtime_1.jsxs("div", { style: keyframeSettingsContainer, children: [canEditInterpolationSettings ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
136
+ jsx_runtime_1.jsx(common_1.InspectorSectionHeader, { children: "Keyframe settings" }), jsx_runtime_1.jsxs("div", { style: keyframeSettingsContainer, children: [canEditInterpolationSettings ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
137
137
  jsx_runtime_1.jsx(common_1.InspectorDetailRow, { label: "Extrapolate left", children: jsx_runtime_1.jsx(ComboBox_1.Combobox, { values: leftValues, selectedId: propStatus.clamping.left, title: "Extrapolate left", style: comboStyle, small: true }) }), jsx_runtime_1.jsx(common_1.InspectorDetailRow, { label: "Extrapolate right", children: jsx_runtime_1.jsx(ComboBox_1.Combobox, { values: rightValues, selectedId: propStatus.clamping.right, title: "Extrapolate right", style: comboStyle, small: true }) }), jsx_runtime_1.jsx(common_1.InspectorDetailRow, { label: "Output", children: jsx_runtime_1.jsx(ComboBox_1.Combobox, { values: outputValues, selectedId: (_b = propStatus.output) !== null && _b !== void 0 ? _b : 'linear', title: "Output", style: comboStyle, small: true }) })
138
138
  ] })) : null, jsx_runtime_1.jsx(common_1.InspectorDetailRow, { label: "Posterize", children: jsx_runtime_1.jsx(InputDragger_1.InputDragger, { type: "number", value: posterize, status: "ok", onValueChange: onPosterizeChange, onValueChangeEnd: onPosterizeChangeEnd, onTextChange: () => undefined, min: 0, step: 1, formatter: posterizeFormatter, rightAlign: true, small: true, disabled: disabled }) })
139
139
  ] })
@@ -11,7 +11,7 @@ export declare const SequenceInspectorHeader: React.FC<{
11
11
  readonly sourceLocation: SequenceInspectorSourceLocation;
12
12
  readonly track: TrackWithHash;
13
13
  }>;
14
- export declare const SequenceInspectorHeaderWithDivider: React.FC<{
14
+ export declare const SequenceInspectorSections: React.FC<{
15
15
  readonly track: TrackWithHash;
16
16
  }>;
17
17
  export {};
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SequenceInspectorHeaderWithDivider = exports.SequenceInspectorHeader = exports.useSequenceInspectorSourceLocation = void 0;
3
+ exports.SequenceInspectorSections = exports.SequenceInspectorHeader = exports.useSequenceInspectorSourceLocation = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const react_1 = require("react");
6
6
  const client_id_1 = require("../../helpers/client-id");
@@ -9,7 +9,8 @@ const InspectorLocationCopy_1 = require("../InspectorLocationCopy");
9
9
  const InspectorSourceLocation_1 = require("../InspectorSourceLocation");
10
10
  const use_open_sequence_in_editor_1 = require("../Timeline/use-open-sequence-in-editor");
11
11
  const use_rename_sequence_1 = require("../Timeline/use-rename-sequence");
12
- const SequenceCompositionsSection_1 = require("./SequenceCompositionsSection");
12
+ const common_1 = require("./common");
13
+ const ConnectedCompositionsSection_1 = require("./ConnectedCompositionsSection");
13
14
  const styles_1 = require("./styles");
14
15
  const useSequenceInspectorSourceLocation = (sequence) => {
15
16
  const { canOpenInEditor, openInEditor, originalLocation } = (0, use_open_sequence_in_editor_1.useOpenSequenceInEditor)(sequence);
@@ -73,10 +74,12 @@ const SequenceInspectorHeader = ({ sourceLocation, track }) => {
73
74
  ] }) }));
74
75
  };
75
76
  exports.SequenceInspectorHeader = SequenceInspectorHeader;
76
- const SequenceInspectorHeaderWithDivider = ({ track }) => {
77
+ const SequenceInspectorSections = ({ track }) => {
77
78
  const sourceLocation = (0, exports.useSequenceInspectorSourceLocation)(track.sequence);
79
+ const connectedCompositions = (0, ConnectedCompositionsSection_1.useConnectedCompositions)({ track });
78
80
  return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
79
- jsx_runtime_1.jsx(exports.SequenceInspectorHeader, { sourceLocation: sourceLocation, track: track }), jsx_runtime_1.jsx(SequenceCompositionsSection_1.SequenceCompositionsSection, { track: track }), jsx_runtime_1.jsx("div", { style: styles_1.sequenceHeaderDivider })
80
- ] }));
81
+ jsx_runtime_1.jsx(exports.SequenceInspectorHeader, { sourceLocation: sourceLocation, track: track }), connectedCompositions.length > 0 ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
82
+ jsx_runtime_1.jsx(common_1.InspectorSectionDivider, {}), jsx_runtime_1.jsx(ConnectedCompositionsSection_1.ConnectedCompositionsSection, { connectedCompositions: connectedCompositions })
83
+ ] })) : null] }));
81
84
  };
82
- exports.SequenceInspectorHeaderWithDivider = SequenceInspectorHeaderWithDivider;
85
+ exports.SequenceInspectorSections = SequenceInspectorSections;
@@ -9,7 +9,7 @@ const is_menu_item_1 = require("../Menu/is-menu-item");
9
9
  const TimelineSelection_1 = require("../Timeline/TimelineSelection");
10
10
  const AlignmentControls_1 = require("./AlignmentControls");
11
11
  const common_1 = require("./common");
12
- const SequenceCompositionsSection_1 = require("./SequenceCompositionsSection");
12
+ const ConnectedCompositionsSection_1 = require("./ConnectedCompositionsSection");
13
13
  const SequenceInspectorHeader_1 = require("./SequenceInspectorHeader");
14
14
  const styles_1 = require("./styles");
15
15
  const use_track_for_selection_1 = require("./use-track-for-selection");
@@ -17,6 +17,7 @@ const SequenceExpandedInspector = ({ track }) => {
17
17
  const { previewServerState } = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx);
18
18
  const { selectedItems, selectItems } = (0, TimelineSelection_1.useTimelineSelection)();
19
19
  const sourceLocation = (0, SequenceInspectorHeader_1.useSequenceInspectorSourceLocation)(track.sequence);
20
+ const connectedCompositions = (0, ConnectedCompositionsSection_1.useConnectedCompositions)({ track });
20
21
  const { validatedLocation } = sourceLocation;
21
22
  const sequenceSelection = (0, react_1.useMemo)(() => {
22
23
  if (!track.nodePathInfo) {
@@ -53,7 +54,9 @@ const SequenceExpandedInspector = ({ track }) => {
53
54
  return jsx_runtime_1.jsx(common_1.InspectorMessage, { children: "Sequence inspector unavailable" });
54
55
  }
55
56
  return (jsx_runtime_1.jsxs("div", { style: styles_1.selectedContainer, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, onPointerDown: selectSequenceOnInspectorPointerDown, children: [
56
- jsx_runtime_1.jsx(SequenceInspectorHeader_1.SequenceInspectorHeader, { sourceLocation: sourceLocation, track: track }), jsx_runtime_1.jsx(SequenceCompositionsSection_1.SequenceCompositionsSection, { track: track }), jsx_runtime_1.jsx(InspectorSequenceSection_1.InspectorSequenceSection, { sequence: track.sequence, validatedLocation: validatedLocation, nodePathInfo: track.nodePathInfo, keyframeDisplayOffset: track.keyframeDisplayOffset, renderSectionHeader: (children) => (jsx_runtime_1.jsx(common_1.InspectorSectionHeader, { children: children })), renderTransformControls: () => jsx_runtime_1.jsx(AlignmentControls_1.AlignmentControls, { track: track }) })] }));
57
+ jsx_runtime_1.jsx(SequenceInspectorHeader_1.SequenceInspectorHeader, { sourceLocation: sourceLocation, track: track }), connectedCompositions.length > 0 ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
58
+ jsx_runtime_1.jsx(common_1.InspectorSectionDivider, {}), jsx_runtime_1.jsx(ConnectedCompositionsSection_1.ConnectedCompositionsSection, { connectedCompositions: connectedCompositions })
59
+ ] })) : null, jsx_runtime_1.jsx(common_1.InspectorSectionDivider, {}), jsx_runtime_1.jsx(InspectorSequenceSection_1.InspectorSequenceSection, { sequence: track.sequence, validatedLocation: validatedLocation, nodePathInfo: track.nodePathInfo, keyframeDisplayOffset: track.keyframeDisplayOffset, renderSectionHeader: (children) => (jsx_runtime_1.jsx(common_1.InspectorSectionHeader, { children: children })), renderTransformControls: () => jsx_runtime_1.jsx(AlignmentControls_1.AlignmentControls, { track: track }) })] }));
57
60
  };
58
61
  const SequenceSelectionInspector = ({ selection }) => {
59
62
  const track = (0, use_track_for_selection_1.useTrackForSelection)(selection);
@@ -3,7 +3,8 @@ import type { RenderModalWarning } from '../RenderModal/DataEditor';
3
3
  export declare const InspectorSectionHeader: React.FC<{
4
4
  readonly children: React.ReactNode;
5
5
  }>;
6
- export declare const InspectorBackHeaderWithDivider: React.FC<{
6
+ export declare const InspectorSectionDivider: React.FC;
7
+ export declare const InspectorBackHeader: React.FC<{
7
8
  readonly children: React.ReactNode;
8
9
  readonly disabled: boolean;
9
10
  readonly onClick: React.MouseEventHandler<HTMLButtonElement>;