@remotion/studio 4.0.491 → 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.
- package/dist/ResolveCompositionConfigInStudio.js +16 -6
- package/dist/components/AssetSelectorItem.js +7 -4
- package/dist/components/Canvas.js +1 -0
- package/dist/components/CompositionOrStillIcon.d.ts +7 -0
- package/dist/components/CompositionOrStillIcon.js +11 -0
- package/dist/components/CompositionSelector.js +14 -2
- package/dist/components/CompositionSelectorItem.js +34 -6
- package/dist/components/CurrentAsset.d.ts +6 -0
- package/dist/components/CurrentAsset.js +14 -8
- package/dist/components/CurrentComposition.d.ts +1 -1
- package/dist/components/CurrentComposition.js +3 -4
- package/dist/components/InlineEditableTitle.d.ts +1 -0
- package/dist/components/InlineEditableTitle.js +12 -7
- package/dist/components/InspectorInfoHeader.d.ts +2 -0
- package/dist/components/InspectorInfoHeader.js +12 -4
- package/dist/components/InspectorPanel/CompositionDimensions.d.ts +6 -0
- package/dist/components/InspectorPanel/CompositionDimensions.js +173 -0
- package/dist/components/InspectorPanel/ConnectedCompositionsSection.d.ts +9 -0
- package/dist/components/InspectorPanel/ConnectedCompositionsSection.js +32 -0
- package/dist/components/InspectorPanel/DefaultInspector.js +6 -3
- package/dist/components/InspectorPanel/EasingInspector.js +3 -3
- package/dist/components/InspectorPanel/KeyframeInspector.js +6 -4
- package/dist/components/InspectorPanel/KeyframeSettings.js +1 -1
- package/dist/components/InspectorPanel/SequenceInspectorHeader.d.ts +1 -1
- package/dist/components/InspectorPanel/SequenceInspectorHeader.js +9 -5
- package/dist/components/InspectorPanel/SequenceSelectionInspector.js +5 -1
- package/dist/components/InspectorPanel/common.d.ts +2 -1
- package/dist/components/InspectorPanel/common.js +11 -7
- package/dist/components/InspectorPanel/optimistic-composition-metadata.d.ts +22 -0
- package/dist/components/InspectorPanel/optimistic-composition-metadata.js +41 -0
- package/dist/components/InspectorPanel/styles.d.ts +2 -0
- package/dist/components/InspectorPanel/styles.js +7 -2
- package/dist/components/InspectorSequenceSection.js +58 -7
- package/dist/components/NewComposition/NewComposition.js +11 -4
- package/dist/components/NewComposition/get-new-composition-defaults.d.ts +4 -0
- package/dist/components/NewComposition/get-new-composition-defaults.js +13 -0
- package/dist/components/SelectedOutlineElement.js +21 -2
- package/dist/components/SelectedOutlineOverlay.d.ts +1 -1
- package/dist/components/SelectedOutlineOverlay.js +4 -3
- package/dist/components/Timeline/Timeline.js +8 -1
- package/dist/components/Timeline/TimelineAssetField.d.ts +14 -0
- package/dist/components/Timeline/TimelineAssetField.js +125 -0
- package/dist/components/Timeline/TimelineClipboardKeybindings.js +133 -1
- package/dist/components/Timeline/TimelineExpandedSection.js +1 -0
- package/dist/components/Timeline/TimelineFieldLabel.js +4 -2
- package/dist/components/Timeline/TimelineKeyframeControls.js +1 -0
- package/dist/components/Timeline/TimelineList.js +2 -1
- package/dist/components/Timeline/TimelinePrimitiveFieldValue.js +5 -3
- package/dist/components/Timeline/TimelineRowChrome.js +8 -6
- package/dist/components/Timeline/TimelineRowLayoutContext.d.ts +7 -0
- package/dist/components/Timeline/TimelineRowLayoutContext.js +13 -0
- package/dist/components/Timeline/TimelineSelection.js +20 -5
- package/dist/components/Timeline/TimelineSequenceItem.d.ts +2 -1
- package/dist/components/Timeline/TimelineSequenceItem.js +32 -8
- package/dist/components/Timeline/TimelineSequenceName.js +4 -0
- package/dist/components/Timeline/get-sequence-context-menu-items.js +3 -3
- package/dist/components/Timeline/keyframe-clipboard.d.ts +34 -0
- package/dist/components/Timeline/keyframe-clipboard.js +278 -0
- package/dist/components/Timeline/sequence-props-subscription-store.js +5 -1
- package/dist/components/Timeline/timeline-asset-link.d.ts +6 -0
- package/dist/components/Timeline/timeline-asset-link.js +27 -1
- package/dist/components/Timeline/timeline-field-display-utils.js +3 -1
- package/dist/components/Timeline/timeline-field-row-layout.d.ts +1 -1
- package/dist/components/Timeline/timeline-field-row-layout.js +2 -2
- package/dist/components/Timeline/timeline-row-layout.d.ts +3 -2
- package/dist/components/Timeline/timeline-row-layout.js +6 -5
- package/dist/components/Timeline/update-selected-easing.d.ts +1 -1
- package/dist/components/Timeline/update-selected-easing.js +4 -5
- package/dist/components/Timeline/use-expanded-track-keyframe-rows.js +4 -4
- package/dist/components/Timeline/use-timeline-expanded-tree.d.ts +2 -1
- package/dist/components/Timeline/use-timeline-expanded-tree.js +3 -1
- package/dist/components/Timeline/use-timeline-height.js +1 -0
- package/dist/components/import-assets.d.ts +10 -2
- package/dist/components/import-assets.js +20 -6
- package/dist/components/root-composition-menu-items.d.ts +8 -0
- package/dist/components/root-composition-menu-items.js +45 -0
- package/dist/components/selected-outline-measurement.d.ts +2 -5
- package/dist/components/selected-outline-measurement.js +3 -4
- package/dist/esm/{chunk-9wh9k3jj.js → chunk-mndqr3zx.js} +7439 -6121
- package/dist/esm/internals.mjs +7439 -6121
- package/dist/esm/previewEntry.mjs +7371 -6057
- package/dist/esm/renderEntry.mjs +1 -1
- package/dist/helpers/calculate-timeline.d.ts +2 -1
- package/dist/helpers/calculate-timeline.js +36 -5
- package/dist/helpers/get-connected-compositions.d.ts +6 -0
- package/dist/helpers/get-connected-compositions.js +11 -0
- package/dist/helpers/get-file-manager-name.d.ts +1 -0
- package/dist/helpers/get-file-manager-name.js +13 -0
- package/dist/helpers/get-sequence-double-click-action.d.ts +6 -0
- package/dist/helpers/get-sequence-double-click-action.js +13 -0
- package/dist/helpers/get-timeline-sequence-sort-key.d.ts +2 -1
- package/dist/helpers/timeline-layout.d.ts +2 -1
- package/dist/helpers/timeline-layout.js +5 -1
- package/dist/helpers/url-state.d.ts +1 -0
- package/dist/helpers/url-state.js +8 -6
- package/dist/helpers/use-menu-structure.js +4 -2
- package/package.json +11 -11
|
@@ -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.
|
|
81
|
-
jsx_runtime_1.jsx(
|
|
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(
|
|
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.
|
|
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.
|
|
218
|
-
jsx_runtime_1.jsx(
|
|
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.
|
|
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.
|
|
328
|
-
jsx_runtime_1.
|
|
329
|
-
jsx_runtime_1.jsx(
|
|
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(
|
|
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
|
|
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.
|
|
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,6 +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 common_1 = require("./common");
|
|
13
|
+
const ConnectedCompositionsSection_1 = require("./ConnectedCompositionsSection");
|
|
12
14
|
const styles_1 = require("./styles");
|
|
13
15
|
const useSequenceInspectorSourceLocation = (sequence) => {
|
|
14
16
|
const { canOpenInEditor, openInEditor, originalLocation } = (0, use_open_sequence_in_editor_1.useOpenSequenceInEditor)(sequence);
|
|
@@ -72,10 +74,12 @@ const SequenceInspectorHeader = ({ sourceLocation, track }) => {
|
|
|
72
74
|
] }) }));
|
|
73
75
|
};
|
|
74
76
|
exports.SequenceInspectorHeader = SequenceInspectorHeader;
|
|
75
|
-
const
|
|
77
|
+
const SequenceInspectorSections = ({ track }) => {
|
|
76
78
|
const sourceLocation = (0, exports.useSequenceInspectorSourceLocation)(track.sequence);
|
|
79
|
+
const connectedCompositions = (0, ConnectedCompositionsSection_1.useConnectedCompositions)({ track });
|
|
77
80
|
return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
78
|
-
jsx_runtime_1.jsx(exports.SequenceInspectorHeader, { sourceLocation: sourceLocation, track: track }), jsx_runtime_1.
|
|
79
|
-
|
|
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] }));
|
|
80
84
|
};
|
|
81
|
-
exports.
|
|
85
|
+
exports.SequenceInspectorSections = SequenceInspectorSections;
|
|
@@ -9,6 +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 ConnectedCompositionsSection_1 = require("./ConnectedCompositionsSection");
|
|
12
13
|
const SequenceInspectorHeader_1 = require("./SequenceInspectorHeader");
|
|
13
14
|
const styles_1 = require("./styles");
|
|
14
15
|
const use_track_for_selection_1 = require("./use-track-for-selection");
|
|
@@ -16,6 +17,7 @@ const SequenceExpandedInspector = ({ track }) => {
|
|
|
16
17
|
const { previewServerState } = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx);
|
|
17
18
|
const { selectedItems, selectItems } = (0, TimelineSelection_1.useTimelineSelection)();
|
|
18
19
|
const sourceLocation = (0, SequenceInspectorHeader_1.useSequenceInspectorSourceLocation)(track.sequence);
|
|
20
|
+
const connectedCompositions = (0, ConnectedCompositionsSection_1.useConnectedCompositions)({ track });
|
|
19
21
|
const { validatedLocation } = sourceLocation;
|
|
20
22
|
const sequenceSelection = (0, react_1.useMemo)(() => {
|
|
21
23
|
if (!track.nodePathInfo) {
|
|
@@ -52,7 +54,9 @@ const SequenceExpandedInspector = ({ track }) => {
|
|
|
52
54
|
return jsx_runtime_1.jsx(common_1.InspectorMessage, { children: "Sequence inspector unavailable" });
|
|
53
55
|
}
|
|
54
56
|
return (jsx_runtime_1.jsxs("div", { style: styles_1.selectedContainer, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, onPointerDown: selectSequenceOnInspectorPointerDown, children: [
|
|
55
|
-
jsx_runtime_1.jsx(SequenceInspectorHeader_1.SequenceInspectorHeader, { sourceLocation: sourceLocation, 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 }) })] }));
|
|
56
60
|
};
|
|
57
61
|
const SequenceSelectionInspector = ({ selection }) => {
|
|
58
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
|
|
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>;
|
|
@@ -3,15 +3,18 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.InspectorDefaultPropsWarnings = exports.InspectorInlineAction = exports.InspectorDetailRow = exports.InspectorMessage = exports.
|
|
6
|
+
exports.InspectorDefaultPropsWarnings = exports.InspectorInlineAction = exports.InspectorDetailRow = exports.InspectorMessage = exports.InspectorBackHeader = exports.InspectorSectionDivider = exports.InspectorSectionHeader = void 0;
|
|
7
7
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
8
|
const react_1 = __importDefault(require("react"));
|
|
9
9
|
const colors_1 = require("../../helpers/colors");
|
|
10
10
|
const InlineAction_1 = require("../InlineAction");
|
|
11
|
+
const InspectorPanelLayout_1 = require("../InspectorPanelLayout");
|
|
11
12
|
const ValidationMessage_1 = require("../NewComposition/ValidationMessage");
|
|
12
13
|
const styles_1 = require("./styles");
|
|
13
14
|
const InspectorSectionHeader = ({ children }) => jsx_runtime_1.jsx("div", { style: styles_1.sectionHeader, children: children });
|
|
14
15
|
exports.InspectorSectionHeader = InspectorSectionHeader;
|
|
16
|
+
const InspectorSectionDivider = () => (jsx_runtime_1.jsx("div", { style: styles_1.inspectorSectionDivider }));
|
|
17
|
+
exports.InspectorSectionDivider = InspectorSectionDivider;
|
|
15
18
|
const backIcon = {
|
|
16
19
|
alignItems: 'center',
|
|
17
20
|
display: 'flex',
|
|
@@ -22,12 +25,10 @@ const backIcon = {
|
|
|
22
25
|
const BackChevron = ({ color }) => {
|
|
23
26
|
return (jsx_runtime_1.jsx("svg", { viewBox: "0 0 8 12", style: backIcon, children: jsx_runtime_1.jsx("path", { d: "M6 1L2 6L6 11", fill: "none", stroke: color, strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.5" }) }));
|
|
24
27
|
};
|
|
25
|
-
const
|
|
26
|
-
return (jsx_runtime_1.
|
|
27
|
-
jsx_runtime_1.jsx(exports.InspectorSectionHeader, { children: jsx_runtime_1.jsx("div", { style: styles_1.sectionHeaderRow, children: jsx_runtime_1.jsxs("div", { style: styles_1.sectionHeaderStart, children: [jsx_runtime_1.jsx(InlineAction_1.InlineAction, { disabled: disabled, onClick: onClick, title: title, renderAction: (color) => jsx_runtime_1.jsx(BackChevron, { color: color }) }), children] }) }) }), jsx_runtime_1.jsx("div", { style: styles_1.inspectorSectionDivider })
|
|
28
|
-
] }));
|
|
28
|
+
const InspectorBackHeader = ({ children, disabled, onClick, title }) => {
|
|
29
|
+
return (jsx_runtime_1.jsx(exports.InspectorSectionHeader, { children: jsx_runtime_1.jsx("div", { style: styles_1.sectionHeaderRow, children: jsx_runtime_1.jsxs("div", { style: styles_1.sectionHeaderStart, children: [jsx_runtime_1.jsx(InlineAction_1.InlineAction, { disabled: disabled, onClick: onClick, title: title, renderAction: (color) => jsx_runtime_1.jsx(BackChevron, { color: color }) }), children] }) }) }));
|
|
29
30
|
};
|
|
30
|
-
exports.
|
|
31
|
+
exports.InspectorBackHeader = InspectorBackHeader;
|
|
31
32
|
const InspectorMessage = ({ children }) => jsx_runtime_1.jsx("div", { style: styles_1.centeredMessage, children: children });
|
|
32
33
|
exports.InspectorMessage = InspectorMessage;
|
|
33
34
|
const InspectorDetailRow = ({ label, children }) => (jsx_runtime_1.jsxs("div", { style: styles_1.detailRow, children: [
|
|
@@ -39,6 +40,7 @@ const inlineLabelButton = {
|
|
|
39
40
|
appearance: 'none',
|
|
40
41
|
backgroundColor: colors_1.TRANSPARENT,
|
|
41
42
|
border: 'none',
|
|
43
|
+
boxSizing: 'border-box',
|
|
42
44
|
color: colors_1.LIGHT_TEXT,
|
|
43
45
|
cursor: 'default',
|
|
44
46
|
display: 'flex',
|
|
@@ -47,7 +49,9 @@ const inlineLabelButton = {
|
|
|
47
49
|
gap: 8,
|
|
48
50
|
lineHeight: '18px',
|
|
49
51
|
margin: 0,
|
|
50
|
-
padding:
|
|
52
|
+
padding: `5px ${InspectorPanelLayout_1.INSPECTOR_PANEL_HORIZONTAL_PADDING}px`,
|
|
53
|
+
textAlign: 'left',
|
|
54
|
+
width: '100%',
|
|
51
55
|
};
|
|
52
56
|
const inlineLabelButtonDisabled = {
|
|
53
57
|
...inlineLabelButton,
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export type CompositionMetadataField = 'durationInFrames' | 'fps' | 'height' | 'width';
|
|
2
|
+
export type PendingCompositionMetadataValue = {
|
|
3
|
+
readonly baseline: object;
|
|
4
|
+
readonly status: 'saving' | 'awaiting-hmr';
|
|
5
|
+
readonly value: number;
|
|
6
|
+
};
|
|
7
|
+
export type PendingCompositionMetadata = Partial<Record<CompositionMetadataField, PendingCompositionMetadataValue>>;
|
|
8
|
+
export declare const failPendingCompositionMetadataValue: ({ field, pending, value, }: {
|
|
9
|
+
readonly field: CompositionMetadataField;
|
|
10
|
+
readonly pending: Partial<Record<CompositionMetadataField, PendingCompositionMetadataValue>>;
|
|
11
|
+
readonly value: PendingCompositionMetadataValue;
|
|
12
|
+
}) => Partial<Record<CompositionMetadataField, PendingCompositionMetadataValue>>;
|
|
13
|
+
export declare const acceptPendingCompositionMetadataValue: ({ currentConfig, field, pending, value, }: {
|
|
14
|
+
readonly currentConfig: object;
|
|
15
|
+
readonly field: CompositionMetadataField;
|
|
16
|
+
readonly pending: Partial<Record<CompositionMetadataField, PendingCompositionMetadataValue>>;
|
|
17
|
+
readonly value: PendingCompositionMetadataValue;
|
|
18
|
+
}) => Partial<Record<CompositionMetadataField, PendingCompositionMetadataValue>>;
|
|
19
|
+
export declare const reconcilePendingCompositionMetadata: ({ currentConfig, pending, }: {
|
|
20
|
+
readonly currentConfig: object;
|
|
21
|
+
readonly pending: Partial<Record<CompositionMetadataField, PendingCompositionMetadataValue>>;
|
|
22
|
+
}) => Partial<Record<CompositionMetadataField, PendingCompositionMetadataValue>>;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.reconcilePendingCompositionMetadata = exports.acceptPendingCompositionMetadataValue = exports.failPendingCompositionMetadataValue = void 0;
|
|
4
|
+
const removePendingValue = ({ field, pending, }) => {
|
|
5
|
+
const { [field]: _removed, ...remaining } = pending;
|
|
6
|
+
return remaining;
|
|
7
|
+
};
|
|
8
|
+
const failPendingCompositionMetadataValue = ({ field, pending, value, }) => {
|
|
9
|
+
if (pending[field] !== value) {
|
|
10
|
+
return pending;
|
|
11
|
+
}
|
|
12
|
+
return removePendingValue({ field, pending });
|
|
13
|
+
};
|
|
14
|
+
exports.failPendingCompositionMetadataValue = failPendingCompositionMetadataValue;
|
|
15
|
+
const acceptPendingCompositionMetadataValue = ({ currentConfig, field, pending, value, }) => {
|
|
16
|
+
if (pending[field] !== value) {
|
|
17
|
+
return pending;
|
|
18
|
+
}
|
|
19
|
+
if (currentConfig !== value.baseline) {
|
|
20
|
+
return removePendingValue({ field, pending });
|
|
21
|
+
}
|
|
22
|
+
return {
|
|
23
|
+
...pending,
|
|
24
|
+
[field]: {
|
|
25
|
+
...value,
|
|
26
|
+
status: 'awaiting-hmr',
|
|
27
|
+
},
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
exports.acceptPendingCompositionMetadataValue = acceptPendingCompositionMetadataValue;
|
|
31
|
+
const reconcilePendingCompositionMetadata = ({ currentConfig, pending, }) => {
|
|
32
|
+
let reconciled = pending;
|
|
33
|
+
for (const field of Object.keys(pending)) {
|
|
34
|
+
const value = pending[field];
|
|
35
|
+
if ((value === null || value === void 0 ? void 0 : value.status) === 'awaiting-hmr' && value.baseline !== currentConfig) {
|
|
36
|
+
reconciled = removePendingValue({ field, pending: reconciled });
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
return reconciled;
|
|
40
|
+
};
|
|
41
|
+
exports.reconcilePendingCompositionMetadata = reconcilePendingCompositionMetadata;
|
|
@@ -20,6 +20,8 @@ export declare const resolveLinkStyle: React.CSSProperties;
|
|
|
20
20
|
export declare const selectedContainer: React.CSSProperties;
|
|
21
21
|
export declare const centeredMessage: React.CSSProperties;
|
|
22
22
|
export declare const detailsContainer: React.CSSProperties;
|
|
23
|
+
export declare const detailsWithInlineAction: React.CSSProperties;
|
|
24
|
+
export declare const detailsBeforeInlineAction: React.CSSProperties;
|
|
23
25
|
export declare const guideDetailsContainer: React.CSSProperties;
|
|
24
26
|
export declare const detailRow: React.CSSProperties;
|
|
25
27
|
export declare const detailLabel: React.CSSProperties;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.keyframeEditorValue = exports.keyframeEditorLabel = exports.keyframeEditorRow = exports.detailValue = exports.detailLabel = exports.detailRow = exports.guideDetailsContainer = exports.detailsContainer = exports.centeredMessage = exports.selectedContainer = exports.resolveLinkStyle = exports.defaultPropsWarningMessages = exports.defaultPropsWarningContainer = exports.sectionHeaderEnd = exports.sectionHeaderStart = exports.sectionHeaderTitle = exports.sectionHeaderRow = exports.sequenceHeaderSubtitle = exports.sequenceHeaderTitle = exports.sequenceHeader = exports.sectionHeader = exports.sequenceHeaderDivider = exports.inspectorSectionDivider = exports.compositionSection = exports.visualControlsSection = exports.defaultPropsSection = exports.scrollableContainer = exports.container = void 0;
|
|
3
|
+
exports.keyframeEditorValue = exports.keyframeEditorLabel = exports.keyframeEditorRow = exports.detailValue = exports.detailLabel = exports.detailRow = exports.guideDetailsContainer = exports.detailsBeforeInlineAction = exports.detailsWithInlineAction = exports.detailsContainer = exports.centeredMessage = exports.selectedContainer = exports.resolveLinkStyle = exports.defaultPropsWarningMessages = exports.defaultPropsWarningContainer = exports.sectionHeaderEnd = exports.sectionHeaderStart = exports.sectionHeaderTitle = exports.sectionHeaderRow = exports.sequenceHeaderSubtitle = exports.sequenceHeaderTitle = exports.sequenceHeader = exports.sectionHeader = exports.sequenceHeaderDivider = exports.inspectorSectionDivider = exports.compositionSection = exports.visualControlsSection = exports.defaultPropsSection = exports.scrollableContainer = exports.container = void 0;
|
|
4
4
|
const colors_1 = require("../../helpers/colors");
|
|
5
5
|
const InspectorPanelLayout_1 = require("../InspectorPanelLayout");
|
|
6
6
|
exports.container = {
|
|
@@ -155,6 +155,12 @@ exports.centeredMessage = {
|
|
|
155
155
|
exports.detailsContainer = {
|
|
156
156
|
padding: `0 ${InspectorPanelLayout_1.INSPECTOR_PANEL_HORIZONTAL_PADDING}px ${InspectorPanelLayout_1.INSPECTOR_PANEL_HORIZONTAL_PADDING}px`,
|
|
157
157
|
};
|
|
158
|
+
exports.detailsWithInlineAction = {
|
|
159
|
+
paddingBottom: InspectorPanelLayout_1.INSPECTOR_PANEL_HORIZONTAL_PADDING,
|
|
160
|
+
};
|
|
161
|
+
exports.detailsBeforeInlineAction = {
|
|
162
|
+
padding: `0 ${InspectorPanelLayout_1.INSPECTOR_PANEL_HORIZONTAL_PADDING}px`,
|
|
163
|
+
};
|
|
158
164
|
exports.guideDetailsContainer = {
|
|
159
165
|
padding: `0 ${InspectorPanelLayout_1.INSPECTOR_PANEL_HORIZONTAL_PADDING}px ${InspectorPanelLayout_1.INSPECTOR_PANEL_HORIZONTAL_PADDING}px`,
|
|
160
166
|
};
|
|
@@ -163,7 +169,6 @@ exports.detailRow = {
|
|
|
163
169
|
display: 'flex',
|
|
164
170
|
gap: 12,
|
|
165
171
|
justifyContent: 'space-between',
|
|
166
|
-
padding: '10px 0',
|
|
167
172
|
};
|
|
168
173
|
exports.detailLabel = {
|
|
169
174
|
color: colors_1.LIGHT_TEXT,
|