@remotion/studio 4.0.494 → 4.0.496
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/api/get-static-files.d.ts +1 -1
- package/dist/components/AssetFileIcon.d.ts +7 -0
- package/dist/components/AssetFileIcon.js +24 -0
- package/dist/components/AssetSelectorItem.js +20 -14
- package/dist/components/Canvas.js +191 -36
- package/dist/components/CompositionSelectorItem.js +20 -31
- package/dist/components/CurrentAsset.d.ts +1 -0
- package/dist/components/CurrentAsset.js +21 -4
- package/dist/components/Editor.js +2 -4
- package/dist/components/InlineCompositionName.js +1 -1
- package/dist/components/InlineEditableTitle.d.ts +1 -0
- package/dist/components/InlineEditableTitle.js +56 -11
- package/dist/components/InspectorInfoHeader.d.ts +2 -0
- package/dist/components/InspectorInfoHeader.js +16 -4
- package/dist/components/InspectorLocationCopy.js +2 -2
- package/dist/components/InspectorPanel/AssetInspector.d.ts +4 -0
- package/dist/components/InspectorPanel/AssetInspector.js +11 -0
- package/dist/components/InspectorPanel/{DefaultInspector.d.ts → CompositionInspector.d.ts} +2 -2
- package/dist/components/InspectorPanel/CompositionInspector.js +114 -0
- package/dist/components/InspectorPanel/CompositionInspectorHeader.d.ts +1 -0
- package/dist/components/{CurrentComposition.js → InspectorPanel/CompositionInspectorHeader.js} +26 -21
- package/dist/components/InspectorPanel/{CompositionDimensions.d.ts → CompositionMetadata.d.ts} +1 -1
- package/dist/components/InspectorPanel/{CompositionDimensions.js → CompositionMetadata.js} +17 -8
- package/dist/components/InspectorPanel/ConnectedCompositionsSection.js +2 -2
- package/dist/components/InspectorPanel/EasingInspector.js +4 -6
- package/dist/components/InspectorPanel/KeyframeInspector.js +7 -8
- package/dist/components/InspectorPanel/KeyframeSettings.js +1 -1
- package/dist/components/InspectorPanel/SequenceInspectorHeader.js +28 -3
- package/dist/components/InspectorPanel/SequenceSelectionInspector.js +34 -1
- package/dist/components/InspectorPanel/common.d.ts +12 -2
- package/dist/components/InspectorPanel/common.js +45 -22
- package/dist/components/InspectorPanel/styles.d.ts +5 -6
- package/dist/components/InspectorPanel/styles.js +13 -39
- package/dist/components/InspectorPanel/use-composition-actions.d.ts +8 -0
- package/dist/components/InspectorPanel/use-composition-actions.js +114 -0
- package/dist/components/InspectorPanel.js +11 -2
- package/dist/components/InspectorSequenceSection.d.ts +0 -1
- package/dist/components/InspectorSequenceSection.js +20 -49
- package/dist/components/InspectorSourceLocation.d.ts +1 -0
- package/dist/components/InspectorSourceLocation.js +5 -1
- package/dist/components/Modals.js +2 -1
- package/dist/components/NewComposition/ComboBox.d.ts +2 -1
- package/dist/components/NewComposition/ComboBox.js +32 -7
- package/dist/components/NewComposition/InputDragger.d.ts +6 -0
- package/dist/components/NewComposition/InputDragger.js +26 -13
- package/dist/components/NewComposition/NewComposition.js +8 -1
- package/dist/components/NewComposition/ValidationMessage.d.ts +1 -1
- package/dist/components/PlaybackRateSelector.js +3 -3
- package/dist/components/Preview.js +15 -7
- package/dist/components/PreviewToolbar.js +3 -3
- package/dist/components/RenderButton.d.ts +1 -0
- package/dist/components/RenderButton.js +51 -7
- package/dist/components/RenderModal/RenderModalOutputName.js +34 -1
- package/dist/components/RenderModal/SchemaEditor/ZodDiscriminatedUnionEditor.js +1 -1
- package/dist/components/RenderModal/SchemaEditor/ZodEnumEditor.js +1 -1
- package/dist/components/RenderModal/SchemaEditor/ZodStaticFileEditor.js +1 -1
- package/dist/components/SelectedOutlineOverlay.js +1 -0
- package/dist/components/SizeSelector.js +3 -3
- package/dist/components/SvgImportDialog.d.ts +7 -0
- package/dist/components/SvgImportDialog.js +103 -0
- package/dist/components/Timeline/Timeline.js +1 -0
- package/dist/components/Timeline/TimelineAssetField.js +1 -1
- package/dist/components/Timeline/TimelineClipboardKeybindings.js +8 -1
- package/dist/components/Timeline/TimelineEnumField.js +1 -1
- package/dist/components/Timeline/TimelineFieldLabel.js +3 -3
- package/dist/components/Timeline/TimelineKeyframeControls.js +26 -6
- package/dist/components/Timeline/TimelineList.js +9 -4
- package/dist/components/Timeline/TimelineRowChrome.js +10 -2
- package/dist/components/Timeline/TimelineRowLayoutContext.d.ts +3 -0
- package/dist/components/Timeline/TimelineRowLayoutContext.js +6 -0
- package/dist/components/Timeline/TimelineSequenceItem.d.ts +2 -1
- package/dist/components/Timeline/TimelineSequenceItem.js +19 -11
- package/dist/components/Timeline/nest-timeline-tracks.d.ts +8 -0
- package/dist/components/Timeline/nest-timeline-tracks.js +25 -0
- package/dist/components/Timeline/timeline-scroll-logic.d.ts +8 -4
- package/dist/components/Timeline/timeline-scroll-logic.js +29 -15
- package/dist/components/import-assets.d.ts +17 -1
- package/dist/components/import-assets.js +96 -11
- package/dist/components/layout.d.ts +2 -0
- package/dist/components/layout.js +3 -1
- package/dist/components/open-in-new-window.d.ts +2 -0
- package/dist/components/open-in-new-window.js +28 -0
- package/dist/components/selected-outline-measurement.d.ts +2 -1
- package/dist/components/selected-outline-measurement.js +3 -1
- package/dist/esm/{chunk-tdncqycp.js → chunk-0v4n7nkh.js} +8463 -7092
- package/dist/esm/internals.mjs +8463 -7092
- package/dist/esm/previewEntry.mjs +8613 -7242
- package/dist/esm/renderEntry.mjs +1 -1
- package/dist/helpers/client-id.js +2 -1
- package/dist/helpers/clipboard-figma.d.ts +4 -0
- package/dist/helpers/clipboard-figma.js +41 -0
- package/dist/helpers/clipboard-images.d.ts +10 -0
- package/dist/helpers/clipboard-images.js +77 -0
- package/dist/helpers/clipboard-svg.d.ts +3 -0
- package/dist/helpers/clipboard-svg.js +47 -0
- package/dist/helpers/get-effective-translation.d.ts +2 -1
- package/dist/helpers/get-effective-translation.js +15 -7
- package/dist/helpers/get-preview-file-type.d.ts +1 -1
- package/dist/helpers/get-preview-file-type.js +5 -1
- package/dist/helpers/inject-css.js +11 -0
- package/dist/helpers/studio-fit-padding.d.ts +41 -0
- package/dist/helpers/studio-fit-padding.js +64 -0
- package/dist/helpers/use-image-metadata.d.ts +8 -0
- package/dist/helpers/use-image-metadata.js +82 -0
- package/dist/helpers/use-studio-canvas-dimensions.js +2 -2
- package/dist/icons/audio.d.ts +3 -0
- package/dist/icons/audio.js +3 -1
- package/dist/icons/font.d.ts +4 -0
- package/dist/icons/font.js +8 -0
- package/dist/icons/frame.d.ts +3 -1
- package/dist/icons/frame.js +1 -1
- package/dist/icons/json.d.ts +4 -0
- package/dist/icons/json.js +8 -0
- package/dist/icons/magnet.js +1 -1
- package/dist/icons/scissors.d.ts +5 -0
- package/dist/icons/scissors.js +8 -0
- package/dist/icons/solid.d.ts +5 -0
- package/dist/icons/solid.js +8 -0
- package/dist/icons/video.d.ts +3 -0
- package/dist/icons/video.js +5 -1
- package/dist/state/modals.d.ts +8 -1
- package/dist/state/timeline-zoom.js +12 -11
- package/package.json +11 -11
- package/dist/components/CurrentComposition.d.ts +0 -2
- package/dist/components/InspectorPanel/DefaultInspector.js +0 -97
package/dist/icons/video.d.ts
CHANGED
package/dist/icons/video.js
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FilmIcon = void 0;
|
|
3
|
+
exports.VideoFileIcon = exports.FilmIcon = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const FilmIcon = ({ color, ...props }) => {
|
|
6
6
|
return (jsx_runtime_1.jsx("svg", { ...props, xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 512 512", children: jsx_runtime_1.jsx("path", { fill: color, d: "M448 32H64C28.65 32 0 60.65 0 96v320c0 35.35 28.65 64 64 64h384c35.35 0 64-28.65 64-64V96C512 60.65 483.3 32 448 32zM384 64v176H128V64H384zM32 96c0-17.64 14.36-32 32-32h32v80H32V96zM32 176h64v64H32V176zM32 272h64v64H32V272zM64 448c-17.64 0-32-14.36-32-32v-48h64V448H64zM128 448V272h256V448H128zM480 416c0 17.64-14.36 32-32 32h-32v-80h64V416zM480 336h-64v-64h64V336zM480 240h-64v-64h64V240zM480 144h-64V64h32c17.64 0 32 14.36 32 32V144z" }) }));
|
|
7
7
|
};
|
|
8
8
|
exports.FilmIcon = FilmIcon;
|
|
9
|
+
const VideoFileIcon = ({ color, ...props }) => {
|
|
10
|
+
return (jsx_runtime_1.jsx("svg", { ...props, xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 576 512", children: jsx_runtime_1.jsx("path", { fill: color, d: "M96 96c-17.7 0-32 14.3-32 32l0 256c0 17.7 14.3 32 32 32l256 0c17.7 0 32-14.3 32-32l0-256c0-17.7-14.3-32-32-32L96 96zM32 128c0-35.3 28.7-64 64-64l256 0c35.3 0 64 28.7 64 64l0 256c0 35.3-28.7 64-64 64L96 448c-35.3 0-64-28.7-64-64l0-256zm432 84l0-40 73.6-55.2c4.2-3.1 9.2-4.8 14.4-4.8 13.3 0 24 10.7 24 24l0 240c0 13.3-10.7 24-24 24-5.2 0-10.2-1.7-14.4-4.8l-73.6-55.2 0-40 80 60 0-208-80 60z" }) }));
|
|
11
|
+
};
|
|
12
|
+
exports.VideoFileIcon = VideoFileIcon;
|
package/dist/state/modals.d.ts
CHANGED
|
@@ -96,6 +96,13 @@ export type ConfirmationDialogState = {
|
|
|
96
96
|
onConfirm: () => void;
|
|
97
97
|
onCancel: () => void;
|
|
98
98
|
};
|
|
99
|
+
export type SvgImportDialogState = {
|
|
100
|
+
type: 'svg-import-dialog';
|
|
101
|
+
id: string;
|
|
102
|
+
onImage: () => void;
|
|
103
|
+
onInline: () => void;
|
|
104
|
+
onDismiss: () => void;
|
|
105
|
+
};
|
|
99
106
|
export type AddEffectModalState = {
|
|
100
107
|
type: 'add-effect';
|
|
101
108
|
fileName: string;
|
|
@@ -150,7 +157,7 @@ export type ModalState = {
|
|
|
150
157
|
type: 'quick-switcher';
|
|
151
158
|
mode: QuickSwitcherMode;
|
|
152
159
|
invocationTimestamp: number;
|
|
153
|
-
} | AddEffectModalState | ConfirmationDialogState;
|
|
160
|
+
} | AddEffectModalState | ConfirmationDialogState | SvgImportDialogState;
|
|
154
161
|
export type ModalContextType = {
|
|
155
162
|
selectedModal: ModalState | null;
|
|
156
163
|
setSelectedModal: React.Dispatch<React.SetStateAction<ModalState | null>>;
|
|
@@ -18,24 +18,25 @@ exports.TimelineZoomCtx = (0, react_1.createContext)({
|
|
|
18
18
|
const TimelineZoomContext = ({ children }) => {
|
|
19
19
|
const [zoom, setZoomState] = (0, react_1.useState)(() => (0, ZoomPersistor_1.getZoomFromLocalStorage)());
|
|
20
20
|
const setZoom = (0, react_1.useCallback)((compositionId, callback, options) => {
|
|
21
|
+
var _a, _b;
|
|
22
|
+
// Capture the old geometry before committing the new timeline width.
|
|
23
|
+
const preserveTimelineCursor = (0, timeline_scroll_logic_1.prepareToPreserveTimelineCursor)({
|
|
24
|
+
currentDurationInFrames: (0, imperative_state_1.getCurrentDuration)(),
|
|
25
|
+
currentFrame: (0, imperative_state_1.getCurrentFrame)(),
|
|
26
|
+
anchorFrame: (_a = options === null || options === void 0 ? void 0 : options.anchorFrame) !== null && _a !== void 0 ? _a : null,
|
|
27
|
+
anchorContentX: (_b = options === null || options === void 0 ? void 0 : options.anchorContentX) !== null && _b !== void 0 ? _b : null,
|
|
28
|
+
});
|
|
21
29
|
(0, react_dom_1.flushSync)(() => {
|
|
22
30
|
setZoomState((prevZoomMap) => {
|
|
23
|
-
var _a
|
|
31
|
+
var _a;
|
|
24
32
|
const newZoomWithFloatingPointErrors = Math.min(exports.TIMELINE_MAX_ZOOM, Math.max(exports.TIMELINE_MIN_ZOOM, callback((_a = prevZoomMap[compositionId]) !== null && _a !== void 0 ? _a : exports.TIMELINE_MIN_ZOOM)));
|
|
25
33
|
const newZoom = Math.round(newZoomWithFloatingPointErrors * 10) / 10;
|
|
26
|
-
const anchorFrame = (_b = options === null || options === void 0 ? void 0 : options.anchorFrame) !== null && _b !== void 0 ? _b : null;
|
|
27
|
-
const anchorContentX = (_c = options === null || options === void 0 ? void 0 : options.anchorContentX) !== null && _c !== void 0 ? _c : null;
|
|
28
|
-
(0, timeline_scroll_logic_1.zoomAndPreserveCursor)({
|
|
29
|
-
oldZoom: (_d = prevZoomMap[compositionId]) !== null && _d !== void 0 ? _d : exports.TIMELINE_MIN_ZOOM,
|
|
30
|
-
newZoom,
|
|
31
|
-
currentDurationInFrames: (0, imperative_state_1.getCurrentDuration)(),
|
|
32
|
-
currentFrame: (0, imperative_state_1.getCurrentFrame)(),
|
|
33
|
-
anchorFrame,
|
|
34
|
-
anchorContentX,
|
|
35
|
-
});
|
|
36
34
|
return { ...prevZoomMap, [compositionId]: newZoom };
|
|
37
35
|
});
|
|
38
36
|
});
|
|
37
|
+
// The new scroll range exists now, so the browser will not clamp the offset
|
|
38
|
+
// against the previous width.
|
|
39
|
+
preserveTimelineCursor();
|
|
39
40
|
}, []);
|
|
40
41
|
const value = (0, react_1.useMemo)(() => {
|
|
41
42
|
return {
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"url": "https://github.com/remotion-dev/remotion/tree/main/packages/studio"
|
|
4
4
|
},
|
|
5
5
|
"name": "@remotion/studio",
|
|
6
|
-
"version": "4.0.
|
|
6
|
+
"version": "4.0.496",
|
|
7
7
|
"description": "APIs for interacting with the Remotion Studio",
|
|
8
8
|
"main": "dist",
|
|
9
9
|
"scripts": {
|
|
@@ -25,15 +25,15 @@
|
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"semver": "7.5.3",
|
|
28
|
-
"remotion": "4.0.
|
|
29
|
-
"@remotion/canvas-capture": "4.0.
|
|
30
|
-
"@remotion/player": "4.0.
|
|
31
|
-
"@remotion/media-utils": "4.0.
|
|
32
|
-
"@remotion/renderer": "4.0.
|
|
33
|
-
"@remotion/web-renderer": "4.0.
|
|
34
|
-
"@remotion/studio-shared": "4.0.
|
|
35
|
-
"@remotion/timeline-utils": "4.0.
|
|
36
|
-
"@remotion/zod-types": "4.0.
|
|
28
|
+
"remotion": "4.0.496",
|
|
29
|
+
"@remotion/canvas-capture": "4.0.496",
|
|
30
|
+
"@remotion/player": "4.0.496",
|
|
31
|
+
"@remotion/media-utils": "4.0.496",
|
|
32
|
+
"@remotion/renderer": "4.0.496",
|
|
33
|
+
"@remotion/web-renderer": "4.0.496",
|
|
34
|
+
"@remotion/studio-shared": "4.0.496",
|
|
35
|
+
"@remotion/timeline-utils": "4.0.496",
|
|
36
|
+
"@remotion/zod-types": "4.0.496",
|
|
37
37
|
"@jridgewell/trace-mapping": "0.3.31",
|
|
38
38
|
"mediabunny": "1.50.8",
|
|
39
39
|
"memfs": "3.4.3",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"react": "19.2.3",
|
|
45
45
|
"react-dom": "19.2.3",
|
|
46
46
|
"@types/semver": "7.5.3",
|
|
47
|
-
"@remotion/eslint-config-internal": "4.0.
|
|
47
|
+
"@remotion/eslint-config-internal": "4.0.496",
|
|
48
48
|
"eslint": "9.19.0",
|
|
49
49
|
"@typescript/native-preview": "7.0.0-dev.20260217.1"
|
|
50
50
|
},
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DefaultInspector = 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 interactivity_enabled_1 = require("../../helpers/interactivity-enabled");
|
|
8
|
-
const VisualControls_1 = require("../../visual-controls/VisualControls");
|
|
9
|
-
const CurrentAsset_1 = require("../CurrentAsset");
|
|
10
|
-
const CurrentComposition_1 = require("../CurrentComposition");
|
|
11
|
-
const DefaultPropsEditor_1 = require("../DefaultPropsEditor");
|
|
12
|
-
const get_zod_if_possible_1 = require("../get-zod-if-possible");
|
|
13
|
-
const is_menu_item_1 = require("../Menu/is-menu-item");
|
|
14
|
-
const ObserveDefaultPropsContext_1 = require("../ObserveDefaultPropsContext");
|
|
15
|
-
const DataEditor_1 = require("../RenderModal/DataEditor");
|
|
16
|
-
const zod_schema_type_1 = require("../RenderModal/SchemaEditor/zod-schema-type");
|
|
17
|
-
const WarningIndicatorButton_1 = require("../RenderModal/WarningIndicatorButton");
|
|
18
|
-
const SegmentedControl_1 = require("../SegmentedControl");
|
|
19
|
-
const VisualControlsContent_1 = require("../VisualControls/VisualControlsContent");
|
|
20
|
-
const common_1 = require("./common");
|
|
21
|
-
const CompositionDimensions_1 = require("./CompositionDimensions");
|
|
22
|
-
const styles_1 = require("./styles");
|
|
23
|
-
const DefaultInspector = ({ composition, currentDefaultProps, readOnlyStudio, setDefaultProps }) => {
|
|
24
|
-
var _a, _b;
|
|
25
|
-
const { canvasContent } = (0, react_1.useContext)(remotion_1.Internals.CompositionManager);
|
|
26
|
-
const hasSelectedAsset = (canvasContent === null || canvasContent === void 0 ? void 0 : canvasContent.type) === 'asset';
|
|
27
|
-
const z = (0, get_zod_if_possible_1.useZodIfPossible)();
|
|
28
|
-
const canSaveDefaultProps = (0, react_1.useContext)(ObserveDefaultPropsContext_1.ObserveDefaultPropsContext);
|
|
29
|
-
const { handles: visualControlHandles } = (0, react_1.useContext)(VisualControls_1.VisualControlsContext);
|
|
30
|
-
const [defaultPropsMode, setDefaultPropsMode] = (0, react_1.useState)('schema');
|
|
31
|
-
const compositionId = (_a = composition === null || composition === void 0 ? void 0 : composition.id) !== null && _a !== void 0 ? _a : null;
|
|
32
|
-
const hasVisualControls = interactivity_enabled_1.studioInteractivityEnabled && Object.keys(visualControlHandles).length > 0;
|
|
33
|
-
(0, react_1.useEffect)(() => {
|
|
34
|
-
setDefaultPropsMode('schema');
|
|
35
|
-
}, [compositionId]);
|
|
36
|
-
const defaultPropsModeItems = (0, react_1.useMemo)(() => {
|
|
37
|
-
return [
|
|
38
|
-
{
|
|
39
|
-
key: 'schema',
|
|
40
|
-
label: 'Schema',
|
|
41
|
-
onClick: () => {
|
|
42
|
-
setDefaultPropsMode('schema');
|
|
43
|
-
},
|
|
44
|
-
selected: defaultPropsMode === 'schema',
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
key: 'json',
|
|
48
|
-
label: 'JSON',
|
|
49
|
-
onClick: () => {
|
|
50
|
-
setDefaultPropsMode('json');
|
|
51
|
-
},
|
|
52
|
-
selected: defaultPropsMode === 'json',
|
|
53
|
-
},
|
|
54
|
-
];
|
|
55
|
-
}, [defaultPropsMode]);
|
|
56
|
-
const canShowDefaultPropsSection = (0, react_1.useMemo)(() => {
|
|
57
|
-
if (!z || !(composition === null || composition === void 0 ? void 0 : composition.schema) || !composition.defaultProps) {
|
|
58
|
-
return false;
|
|
59
|
-
}
|
|
60
|
-
if (!(typeof composition.schema.safeParse ===
|
|
61
|
-
'function')) {
|
|
62
|
-
return false;
|
|
63
|
-
}
|
|
64
|
-
return (0, zod_schema_type_1.getZodSchemaType)(composition.schema) !== 'any';
|
|
65
|
-
}, [composition === null || composition === void 0 ? void 0 : composition.defaultProps, composition === null || composition === void 0 ? void 0 : composition.schema, z]);
|
|
66
|
-
const { setShowWarning, showWarning } = (0, DataEditor_1.useDataEditorWarningVisibility)();
|
|
67
|
-
const { warnings: defaultPropsWarnings } = (0, DataEditor_1.useDataEditorWarnings)({
|
|
68
|
-
canSaveDefaultProps: (_b = canSaveDefaultProps === null || canSaveDefaultProps === void 0 ? void 0 : canSaveDefaultProps.canSaveDefaultProps) !== null && _b !== void 0 ? _b : null,
|
|
69
|
-
defaultProps: currentDefaultProps,
|
|
70
|
-
mode: defaultPropsMode,
|
|
71
|
-
propsEditType: 'default-props',
|
|
72
|
-
showCannotSaveDefaultPropsWarning: canShowDefaultPropsSection,
|
|
73
|
-
});
|
|
74
|
-
if (hasSelectedAsset) {
|
|
75
|
-
return (jsx_runtime_1.jsx("div", { style: styles_1.scrollableContainer, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, children: jsx_runtime_1.jsx("div", { style: styles_1.compositionSection, children: jsx_runtime_1.jsx(CurrentAsset_1.CurrentAsset, { readOnlyStudio: readOnlyStudio }) }) }));
|
|
76
|
-
}
|
|
77
|
-
if (composition === null) {
|
|
78
|
-
return jsx_runtime_1.jsx("div", { style: styles_1.container });
|
|
79
|
-
}
|
|
80
|
-
return (jsx_runtime_1.jsxs("div", { style: styles_1.scrollableContainer, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, 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: [
|
|
85
|
-
jsx_runtime_1.jsx(common_1.InspectorSectionHeader, { children: jsx_runtime_1.jsxs("div", { style: styles_1.sectionHeaderRow, children: [
|
|
86
|
-
jsx_runtime_1.jsxs("div", { style: styles_1.sectionHeaderStart, children: [
|
|
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" })
|
|
88
|
-
] }), jsx_runtime_1.jsx("div", { style: styles_1.sectionHeaderEnd, children: defaultPropsWarnings.length > 0 ? (jsx_runtime_1.jsx(WarningIndicatorButton_1.WarningIndicatorButton, { setShowWarning: setShowWarning, showWarning: showWarning, warningCount: defaultPropsWarnings.length, size: "compact" })) : null })
|
|
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)
|
|
90
|
-
] })
|
|
91
|
-
] })) : null, hasVisualControls ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
92
|
-
jsx_runtime_1.jsx(common_1.InspectorSectionDivider, {}), jsx_runtime_1.jsxs("div", { style: styles_1.visualControlsSection, children: [
|
|
93
|
-
jsx_runtime_1.jsx(common_1.InspectorSectionHeader, { children: "Visual Controls" }), jsx_runtime_1.jsx(VisualControlsContent_1.VisualControlsContent, {})
|
|
94
|
-
] })
|
|
95
|
-
] })) : null] }));
|
|
96
|
-
};
|
|
97
|
-
exports.DefaultInspector = DefaultInspector;
|