@remotion/studio 4.0.493 → 4.0.495

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 (111) hide show
  1. package/dist/api/get-static-files.d.ts +1 -1
  2. package/dist/components/AssetFileIcon.d.ts +7 -0
  3. package/dist/components/AssetFileIcon.js +24 -0
  4. package/dist/components/AssetSelectorItem.js +13 -7
  5. package/dist/components/Canvas.js +194 -36
  6. package/dist/components/CompositionSelectorItem.js +15 -8
  7. package/dist/components/CurrentAsset.d.ts +1 -0
  8. package/dist/components/CurrentAsset.js +17 -1
  9. package/dist/components/Editor.js +2 -4
  10. package/dist/components/InitialCompositionLoader.d.ts +1 -1
  11. package/dist/components/InitialCompositionLoader.js +6 -1
  12. package/dist/components/InspectorPanel/AssetInspector.d.ts +4 -0
  13. package/dist/components/InspectorPanel/AssetInspector.js +11 -0
  14. package/dist/components/InspectorPanel/{DefaultInspector.d.ts → CompositionInspector.d.ts} +2 -2
  15. package/dist/components/InspectorPanel/CompositionInspector.js +114 -0
  16. package/dist/components/InspectorPanel/CompositionInspectorHeader.d.ts +1 -0
  17. package/dist/components/{CurrentComposition.js → InspectorPanel/CompositionInspectorHeader.js} +16 -16
  18. package/dist/components/InspectorPanel/{CompositionDimensions.d.ts → CompositionMetadata.d.ts} +1 -1
  19. package/dist/components/InspectorPanel/{CompositionDimensions.js → CompositionMetadata.js} +17 -8
  20. package/dist/components/InspectorPanel/ConnectedCompositionsSection.js +2 -2
  21. package/dist/components/InspectorPanel/EasingInspector.js +3 -5
  22. package/dist/components/InspectorPanel/KeyframeInspector.js +2 -2
  23. package/dist/components/InspectorPanel/SequenceSelectionInspector.js +34 -1
  24. package/dist/components/InspectorPanel/common.d.ts +8 -0
  25. package/dist/components/InspectorPanel/common.js +31 -8
  26. package/dist/components/InspectorPanel/styles.d.ts +5 -3
  27. package/dist/components/InspectorPanel/styles.js +13 -4
  28. package/dist/components/InspectorPanel/use-composition-actions.d.ts +8 -0
  29. package/dist/components/InspectorPanel/use-composition-actions.js +114 -0
  30. package/dist/components/InspectorPanel.js +11 -2
  31. package/dist/components/InspectorSequenceSection.d.ts +0 -1
  32. package/dist/components/InspectorSequenceSection.js +9 -48
  33. package/dist/components/Modals.js +2 -1
  34. package/dist/components/NewComposition/InputDragger.d.ts +6 -0
  35. package/dist/components/NewComposition/InputDragger.js +26 -13
  36. package/dist/components/NewComposition/NewComposition.js +8 -1
  37. package/dist/components/NewComposition/ValidationMessage.d.ts +1 -1
  38. package/dist/components/Preview.js +15 -7
  39. package/dist/components/RenderModal/RenderModalOutputName.js +34 -1
  40. package/dist/components/SelectedOutlineOverlay.js +1 -0
  41. package/dist/components/SvgImportDialog.d.ts +7 -0
  42. package/dist/components/SvgImportDialog.js +103 -0
  43. package/dist/components/Timeline/Timeline.js +2 -0
  44. package/dist/components/Timeline/TimelineClipboardKeybindings.js +11 -1
  45. package/dist/components/Timeline/TimelineDeleteKeybindings.js +2 -0
  46. package/dist/components/Timeline/TimelineKeyframeControls.js +1 -0
  47. package/dist/components/Timeline/TimelineList.js +9 -4
  48. package/dist/components/Timeline/TimelineSequence.d.ts +1 -0
  49. package/dist/components/Timeline/TimelineSequence.js +42 -6
  50. package/dist/components/Timeline/TimelineSequenceItem.d.ts +2 -1
  51. package/dist/components/Timeline/TimelineSequenceItem.js +33 -13
  52. package/dist/components/Timeline/TimelineTrack.js +2 -1
  53. package/dist/components/Timeline/call-delete-keyframe.d.ts +1 -0
  54. package/dist/components/Timeline/call-delete-keyframe.js +4 -0
  55. package/dist/components/Timeline/delete-selected-keyframe.d.ts +4 -2
  56. package/dist/components/Timeline/delete-selected-keyframe.js +48 -5
  57. package/dist/components/Timeline/delete-selected-timeline-item.d.ts +3 -1
  58. package/dist/components/Timeline/delete-selected-timeline-item.js +3 -1
  59. package/dist/components/Timeline/nest-timeline-tracks.d.ts +8 -0
  60. package/dist/components/Timeline/nest-timeline-tracks.js +25 -0
  61. package/dist/components/Timeline/timeline-scroll-logic.d.ts +8 -4
  62. package/dist/components/Timeline/timeline-scroll-logic.js +29 -15
  63. package/dist/components/import-assets.d.ts +41 -3
  64. package/dist/components/import-assets.js +148 -24
  65. package/dist/components/layout.d.ts +1 -0
  66. package/dist/components/layout.js +2 -1
  67. package/dist/components/selected-outline-measurement.d.ts +2 -1
  68. package/dist/components/selected-outline-measurement.js +3 -1
  69. package/dist/esm/{chunk-mndqr3zx.js → chunk-784jbkzs.js} +8604 -7249
  70. package/dist/esm/internals.mjs +8604 -7249
  71. package/dist/esm/previewEntry.mjs +8704 -7349
  72. package/dist/esm/renderEntry.mjs +1 -1
  73. package/dist/helpers/client-id.js +2 -1
  74. package/dist/helpers/clipboard-figma.d.ts +4 -0
  75. package/dist/helpers/clipboard-figma.js +41 -0
  76. package/dist/helpers/clipboard-images.d.ts +10 -0
  77. package/dist/helpers/clipboard-images.js +77 -0
  78. package/dist/helpers/clipboard-svg.d.ts +3 -0
  79. package/dist/helpers/clipboard-svg.js +47 -0
  80. package/dist/helpers/get-effective-translation.d.ts +2 -1
  81. package/dist/helpers/get-effective-translation.js +15 -7
  82. package/dist/helpers/get-preview-file-type.d.ts +1 -1
  83. package/dist/helpers/get-preview-file-type.js +5 -1
  84. package/dist/helpers/get-sequence-double-click-action.d.ts +6 -0
  85. package/dist/helpers/get-sequence-double-click-action.js +10 -1
  86. package/dist/helpers/inject-css.js +9 -2
  87. package/dist/helpers/studio-fit-padding.d.ts +41 -0
  88. package/dist/helpers/studio-fit-padding.js +64 -0
  89. package/dist/helpers/use-image-metadata.d.ts +8 -0
  90. package/dist/helpers/use-image-metadata.js +82 -0
  91. package/dist/helpers/use-studio-canvas-dimensions.js +2 -2
  92. package/dist/icons/audio.d.ts +3 -0
  93. package/dist/icons/audio.js +3 -1
  94. package/dist/icons/font.d.ts +4 -0
  95. package/dist/icons/font.js +8 -0
  96. package/dist/icons/frame.d.ts +3 -1
  97. package/dist/icons/frame.js +1 -1
  98. package/dist/icons/json.d.ts +4 -0
  99. package/dist/icons/json.js +8 -0
  100. package/dist/icons/magnet.js +1 -1
  101. package/dist/icons/scissors.d.ts +5 -0
  102. package/dist/icons/scissors.js +8 -0
  103. package/dist/icons/solid.d.ts +5 -0
  104. package/dist/icons/solid.js +8 -0
  105. package/dist/icons/video.d.ts +3 -0
  106. package/dist/icons/video.js +5 -1
  107. package/dist/state/modals.d.ts +8 -1
  108. package/dist/state/timeline-zoom.js +12 -11
  109. package/package.json +11 -11
  110. package/dist/components/CurrentComposition.d.ts +0 -2
  111. package/dist/components/InspectorPanel/DefaultInspector.js +0 -97
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CurrentAsset = exports.AssetInfo = exports.getCurrentAssetMediaDetailLines = exports.getCurrentAssetMetadataSource = exports.CURRENT_ASSET_HEIGHT = void 0;
3
+ exports.CurrentAsset = exports.AssetInfo = exports.getCurrentAssetMediaDetailLines = exports.getCurrentAssetImageMetadataSource = exports.getCurrentAssetMetadataSource = exports.CURRENT_ASSET_HEIGHT = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const studio_shared_1 = require("@remotion/studio-shared");
6
6
  const react_1 = require("react");
@@ -9,6 +9,7 @@ const client_id_1 = require("../helpers/client-id");
9
9
  const format_media_duration_1 = require("../helpers/format-media-duration");
10
10
  const get_preview_file_type_1 = require("../helpers/get-preview-file-type");
11
11
  const render_codec_label_1 = require("../helpers/render-codec-label");
12
+ const use_image_metadata_1 = require("../helpers/use-image-metadata");
12
13
  const use_media_metadata_1 = require("../helpers/use-media-metadata");
13
14
  const InlineEditableTitle_1 = require("./InlineEditableTitle");
14
15
  const InspectorInfoHeader_1 = require("./InspectorInfoHeader");
@@ -25,6 +26,15 @@ const getCurrentAssetMetadataSource = (assetName) => {
25
26
  : null;
26
27
  };
27
28
  exports.getCurrentAssetMetadataSource = getCurrentAssetMetadataSource;
29
+ const getCurrentAssetImageMetadataSource = (assetName) => {
30
+ if (!assetName) {
31
+ return null;
32
+ }
33
+ return (0, get_preview_file_type_1.getPreviewFileType)(assetName) === 'image'
34
+ ? (0, remotion_1.staticFile)(assetName)
35
+ : null;
36
+ };
37
+ exports.getCurrentAssetImageMetadataSource = getCurrentAssetImageMetadataSource;
28
38
  const formatFps = (fps) => `${fps.toFixed(2)} FPS`;
29
39
  const getCurrentAssetMediaDetailLines = (mediaMetadata) => {
30
40
  const detailLines = [];
@@ -74,6 +84,8 @@ const AssetInfo = ({ assetName, contentSized = false, onAssetClick, readOnlyStud
74
84
  }, [assetName, staticFiles]);
75
85
  const src = (0, exports.getCurrentAssetMetadataSource)(assetName);
76
86
  const mediaMetadata = (0, use_media_metadata_1.useMediaMetadata)(src);
87
+ const imageSrc = (0, exports.getCurrentAssetImageMetadataSource)(assetName);
88
+ const imageMetadata = (0, use_image_metadata_1.useImageMetadata)(imageSrc);
77
89
  const canRename = onAssetClick === undefined &&
78
90
  connectionStatus === 'connected' &&
79
91
  !readOnlyStudio;
@@ -96,6 +108,10 @@ const AssetInfo = ({ assetName, contentSized = false, onAssetClick, readOnlyStud
96
108
  subtitleParts.push(`${mediaMetadata.width}x${mediaMetadata.height}`);
97
109
  }
98
110
  }
111
+ else if (imageMetadata) {
112
+ subtitleParts.push(imageMetadata.format);
113
+ subtitleParts.push(`${imageMetadata.width}x${imageMetadata.height}`);
114
+ }
99
115
  const mediaDetailLines = mediaMetadata
100
116
  ? (0, exports.getCurrentAssetMediaDetailLines)(mediaMetadata)
101
117
  : [];
@@ -40,6 +40,7 @@ const react_1 = __importStar(require("react"));
40
40
  const remotion_1 = require("remotion");
41
41
  const colors_1 = require("../helpers/colors");
42
42
  const noop_1 = require("../helpers/noop");
43
+ const studio_fit_padding_1 = require("../helpers/studio-fit-padding");
43
44
  const studio_runtime_config_1 = require("../helpers/studio-runtime-config");
44
45
  const canvas_ref_1 = require("../state/canvas-ref");
45
46
  const scale_lock_1 = require("../state/scale-lock");
@@ -83,10 +84,7 @@ const Editor = ({ Root, readOnlyStudio }) => {
83
84
  if (!size) {
84
85
  return null;
85
86
  }
86
- return {
87
- type: 'canvas-size',
88
- canvasSize: size,
89
- };
87
+ return (0, studio_fit_padding_1.getStudioCurrentScaleContext)(size);
90
88
  }, [size]);
91
89
  const MemoRoot = (0, react_1.useMemo)(() => {
92
90
  return react_1.default.memo(Root);
@@ -1,3 +1,3 @@
1
1
  import type React from 'react';
2
- export declare const useSelectComposition: () => (c: import("remotion").AnyComposition, push: boolean) => void;
2
+ export declare const useSelectComposition: () => (c: import("remotion").AnyComposition, push: boolean, frame?: number | null) => void;
3
3
  export declare const InitialCompositionLoader: React.FC;
@@ -16,14 +16,18 @@ const use_static_files_1 = require("./use-static-files");
16
16
  const useSelectComposition = () => {
17
17
  const { setCompositionFoldersExpanded } = (0, react_1.useContext)(folders_1.FolderContext);
18
18
  const { setCanvasContent } = (0, react_1.useContext)(remotion_1.Internals.CompositionSetters);
19
+ const setFrame = remotion_1.Internals.useTimelineSetFrame();
19
20
  const isMobileLayout = (0, mobile_layout_1.useMobileLayout)();
20
21
  const { setSidebarCollapsedState } = (0, react_1.useContext)(sidebar_1.SidebarContext);
21
- return (0, react_1.useCallback)((c, push) => {
22
+ return (0, react_1.useCallback)((c, push, frame = null) => {
22
23
  var _a;
23
24
  if (push) {
24
25
  (0, url_state_1.pushUrl)(`/${c.id}`);
25
26
  }
26
27
  (_a = ExplorerPanelRef_1.explorerSidebarTabs.current) === null || _a === void 0 ? void 0 : _a.selectCompositionPanel();
28
+ if (frame !== null) {
29
+ setFrame((current) => ({ ...current, [c.id]: frame }));
30
+ }
27
31
  setCanvasContent({ type: 'composition', compositionId: c.id });
28
32
  const { folderName, parentFolderName } = c;
29
33
  if (folderName !== null) {
@@ -46,6 +50,7 @@ const useSelectComposition = () => {
46
50
  isMobileLayout,
47
51
  setCanvasContent,
48
52
  setCompositionFoldersExpanded,
53
+ setFrame,
49
54
  setSidebarCollapsedState,
50
55
  ]);
51
56
  };
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ export declare const AssetInspector: React.FC<{
3
+ readonly readOnlyStudio: boolean;
4
+ }>;
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AssetInspector = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const CurrentAsset_1 = require("../CurrentAsset");
6
+ const is_menu_item_1 = require("../Menu/is-menu-item");
7
+ const styles_1 = require("./styles");
8
+ const AssetInspector = ({ readOnlyStudio }) => {
9
+ 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.inspectorOverviewSection, children: jsx_runtime_1.jsx(CurrentAsset_1.CurrentAsset, { readOnlyStudio: readOnlyStudio }) }) }));
10
+ };
11
+ exports.AssetInspector = AssetInspector;
@@ -1,8 +1,8 @@
1
1
  import React from 'react';
2
2
  import type { _InternalTypes } from 'remotion';
3
3
  import type { UpdaterFunction } from '../RenderModal/SchemaEditor/ZodSwitch';
4
- export declare const DefaultInspector: React.FC<{
5
- readonly composition: _InternalTypes['AnyComposition'] | null;
4
+ export declare const CompositionInspector: React.FC<{
5
+ readonly composition: _InternalTypes['AnyComposition'];
6
6
  readonly currentDefaultProps: Record<string, unknown>;
7
7
  readonly readOnlyStudio: boolean;
8
8
  readonly setDefaultProps: UpdaterFunction<Record<string, unknown>>;
@@ -0,0 +1,114 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CompositionInspector = void 0;
4
+ const jsx_runtime_1 = require("react/jsx-runtime");
5
+ const react_1 = require("react");
6
+ const interactivity_enabled_1 = require("../../helpers/interactivity-enabled");
7
+ const frame_1 = require("../../icons/frame");
8
+ const solid_1 = require("../../icons/solid");
9
+ const VisualControls_1 = require("../../visual-controls/VisualControls");
10
+ const DefaultPropsEditor_1 = require("../DefaultPropsEditor");
11
+ const get_zod_if_possible_1 = require("../get-zod-if-possible");
12
+ const is_menu_item_1 = require("../Menu/is-menu-item");
13
+ const ObserveDefaultPropsContext_1 = require("../ObserveDefaultPropsContext");
14
+ const DataEditor_1 = require("../RenderModal/DataEditor");
15
+ const zod_schema_type_1 = require("../RenderModal/SchemaEditor/zod-schema-type");
16
+ const WarningIndicatorButton_1 = require("../RenderModal/WarningIndicatorButton");
17
+ const SegmentedControl_1 = require("../SegmentedControl");
18
+ const VisualControlsContent_1 = require("../VisualControls/VisualControlsContent");
19
+ const common_1 = require("./common");
20
+ const CompositionInspectorHeader_1 = require("./CompositionInspectorHeader");
21
+ const CompositionMetadata_1 = require("./CompositionMetadata");
22
+ const styles_1 = require("./styles");
23
+ const use_composition_actions_1 = require("./use-composition-actions");
24
+ const actionIconStyle = {
25
+ height: 18,
26
+ width: 18,
27
+ };
28
+ const CompositionActions = () => {
29
+ const { canInsertAsset, canInsertSolid, canShowInsertAsset, canShowInsertSolid, insertAsset, insertSolid, } = (0, use_composition_actions_1.useCompositionActions)();
30
+ if (!canShowInsertAsset && !canShowInsertSolid) {
31
+ return null;
32
+ }
33
+ return (jsx_runtime_1.jsxs(common_1.InspectorActionSection, { children: [canShowInsertSolid ? (jsx_runtime_1.jsx(common_1.InspectorInlineAction, { disabled: !canInsertSolid, onClick: insertSolid, renderIcon: (color) => (jsx_runtime_1.jsx(solid_1.SolidIcon, { color: color, style: actionIconStyle })), children: "Add Solid" })) : null, canShowInsertAsset ? (jsx_runtime_1.jsx(common_1.InspectorInlineAction, { disabled: !canInsertAsset, onClick: insertAsset, renderIcon: (color) => (jsx_runtime_1.jsx(frame_1.PicIcon, { color: color, style: actionIconStyle })), children: "Add asset..." })) : null] }));
34
+ };
35
+ const CompositionDefaultPropsSection = ({ composition, currentDefaultProps, setDefaultProps }) => {
36
+ var _a;
37
+ const z = (0, get_zod_if_possible_1.useZodIfPossible)();
38
+ const canSaveDefaultProps = (0, react_1.useContext)(ObserveDefaultPropsContext_1.ObserveDefaultPropsContext);
39
+ const [defaultPropsMode, setDefaultPropsMode] = (0, react_1.useState)('schema');
40
+ const compositionId = composition.id;
41
+ (0, react_1.useEffect)(() => {
42
+ setDefaultPropsMode('schema');
43
+ }, [compositionId]);
44
+ const defaultPropsModeItems = (0, react_1.useMemo)(() => {
45
+ return [
46
+ {
47
+ key: 'schema',
48
+ label: 'Schema',
49
+ onClick: () => {
50
+ setDefaultPropsMode('schema');
51
+ },
52
+ selected: defaultPropsMode === 'schema',
53
+ },
54
+ {
55
+ key: 'json',
56
+ label: 'JSON',
57
+ onClick: () => {
58
+ setDefaultPropsMode('json');
59
+ },
60
+ selected: defaultPropsMode === 'json',
61
+ },
62
+ ];
63
+ }, [defaultPropsMode]);
64
+ const canShowDefaultPropsSection = (0, react_1.useMemo)(() => {
65
+ if (!z || !composition.schema || !composition.defaultProps) {
66
+ return false;
67
+ }
68
+ if (!(typeof composition.schema.safeParse ===
69
+ 'function')) {
70
+ return false;
71
+ }
72
+ return (0, zod_schema_type_1.getZodSchemaType)(composition.schema) !== 'any';
73
+ }, [composition.defaultProps, composition.schema, z]);
74
+ const { setShowWarning, showWarning } = (0, DataEditor_1.useDataEditorWarningVisibility)();
75
+ const { warnings: defaultPropsWarnings } = (0, DataEditor_1.useDataEditorWarnings)({
76
+ canSaveDefaultProps: (_a = canSaveDefaultProps === null || canSaveDefaultProps === void 0 ? void 0 : canSaveDefaultProps.canSaveDefaultProps) !== null && _a !== void 0 ? _a : null,
77
+ defaultProps: currentDefaultProps,
78
+ mode: defaultPropsMode,
79
+ propsEditType: 'default-props',
80
+ showCannotSaveDefaultPropsWarning: canShowDefaultPropsSection,
81
+ });
82
+ if (!canShowDefaultPropsSection) {
83
+ return null;
84
+ }
85
+ return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
86
+ jsx_runtime_1.jsx(common_1.InspectorSectionDivider, {}), jsx_runtime_1.jsxs("div", { style: styles_1.compositionDefaultPropsSection, children: [
87
+ jsx_runtime_1.jsx(common_1.InspectorSectionHeader, { children: jsx_runtime_1.jsxs("div", { style: styles_1.sectionHeaderRow, children: [
88
+ jsx_runtime_1.jsxs("div", { style: styles_1.sectionHeaderStart, children: [
89
+ 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" })
90
+ ] }), 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 })
91
+ ] }) }), 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)
92
+ ] })
93
+ ] }));
94
+ };
95
+ const CompositionVisualControlsSection = () => {
96
+ const { handles: visualControlHandles } = (0, react_1.useContext)(VisualControls_1.VisualControlsContext);
97
+ const hasVisualControls = interactivity_enabled_1.studioInteractivityEnabled && Object.keys(visualControlHandles).length > 0;
98
+ if (!hasVisualControls) {
99
+ return null;
100
+ }
101
+ return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
102
+ jsx_runtime_1.jsx(common_1.InspectorSectionDivider, {}), jsx_runtime_1.jsxs("div", { style: styles_1.compositionVisualControlsSection, children: [
103
+ jsx_runtime_1.jsx(common_1.InspectorSectionHeader, { children: "Visual Controls" }), jsx_runtime_1.jsx(VisualControlsContent_1.VisualControlsContent, {})
104
+ ] })
105
+ ] }));
106
+ };
107
+ const CompositionInspector = ({ composition, currentDefaultProps, readOnlyStudio, setDefaultProps }) => {
108
+ return (jsx_runtime_1.jsxs("div", { style: styles_1.scrollableContainer, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, children: [
109
+ jsx_runtime_1.jsxs("div", { style: styles_1.inspectorOverviewSection, children: [
110
+ jsx_runtime_1.jsx(CompositionInspectorHeader_1.CompositionInspectorHeader, {}), jsx_runtime_1.jsx(common_1.InspectorSectionDivider, {}), jsx_runtime_1.jsx(CompositionMetadata_1.CompositionMetadata, { compositionId: composition.id, disabled: readOnlyStudio, stack: composition.stack })
111
+ ] }), jsx_runtime_1.jsx(CompositionDefaultPropsSection, { composition: composition, currentDefaultProps: currentDefaultProps, setDefaultProps: setDefaultProps }), jsx_runtime_1.jsx(CompositionVisualControlsSection, {}), jsx_runtime_1.jsx(CompositionActions, {})
112
+ ] }));
113
+ };
114
+ exports.CompositionInspector = CompositionInspector;
@@ -0,0 +1 @@
1
+ export declare const CompositionInspectorHeader: () => import("react/jsx-runtime").JSX.Element;
@@ -1,21 +1,21 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CurrentComposition = exports.CURRENT_COMPOSITION_HEIGHT = void 0;
3
+ exports.CompositionInspectorHeader = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const react_1 = require("react");
6
6
  const remotion_1 = require("remotion");
7
- const is_composition_still_1 = require("../helpers/is-composition-still");
8
- const open_in_editor_1 = require("../helpers/open-in-editor");
9
- const react_2 = require("../icons/react");
10
- const still_1 = require("../icons/still");
11
- const video_1 = require("../icons/video");
12
- const InlineCompositionName_1 = require("./InlineCompositionName");
13
- const InspectorInfoHeader_1 = require("./InspectorInfoHeader");
14
- const InspectorLocationCopy_1 = require("./InspectorLocationCopy");
15
- const InspectorSourceLocation_1 = require("./InspectorSourceLocation");
16
- const NotificationCenter_1 = require("./Notifications/NotificationCenter");
17
- const use_resolved_stack_1 = require("./Timeline/use-resolved-stack");
18
- exports.CURRENT_COMPOSITION_HEIGHT = 66;
7
+ const is_composition_still_1 = require("../../helpers/is-composition-still");
8
+ const open_in_editor_1 = require("../../helpers/open-in-editor");
9
+ const react_2 = require("../../icons/react");
10
+ const still_1 = require("../../icons/still");
11
+ const video_1 = require("../../icons/video");
12
+ const InlineCompositionName_1 = require("../InlineCompositionName");
13
+ const InspectorInfoHeader_1 = require("../InspectorInfoHeader");
14
+ const InspectorLocationCopy_1 = require("../InspectorLocationCopy");
15
+ const InspectorSourceLocation_1 = require("../InspectorSourceLocation");
16
+ const NotificationCenter_1 = require("../Notifications/NotificationCenter");
17
+ const use_resolved_stack_1 = require("../Timeline/use-resolved-stack");
18
+ const COMPOSITION_INSPECTOR_HEADER_HEIGHT = 66;
19
19
  const sourceLocationIconStyle = {
20
20
  flexShrink: 0,
21
21
  height: 13,
@@ -24,7 +24,7 @@ const sourceLocationIconStyle = {
24
24
  const renderReactIcon = (color) => {
25
25
  return jsx_runtime_1.jsx(react_2.ReactIcon, { color: color, style: sourceLocationIconStyle });
26
26
  };
27
- const CurrentComposition = () => {
27
+ const CompositionInspectorHeader = () => {
28
28
  var _a, _b, _c, _d, _e;
29
29
  const video = remotion_1.Internals.useVideo();
30
30
  const { compositions } = (0, react_1.useContext)(remotion_1.Internals.CompositionManager);
@@ -85,9 +85,9 @@ const CurrentComposition = () => {
85
85
  }
86
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 }));
87
87
  }, [video]);
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: [
88
+ return (jsx_runtime_1.jsx(InspectorInfoHeader_1.InspectorInfoHeader, { minHeight: COMPOSITION_INSPECTOR_HEADER_HEIGHT, children: video ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
89
89
  jsx_runtime_1.jsxs(InspectorLocationCopy_1.InspectorLocationCopy, { location: validatedLocation, name: video.id, children: [
90
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 })
91
91
  ] }), (0, is_composition_still_1.isCompositionStill)(video) ? (jsx_runtime_1.jsx(InspectorInfoHeader_1.InspectorInfoSubtitle, { children: "Still" })) : null] })) : null }));
92
92
  };
93
- exports.CurrentComposition = CurrentComposition;
93
+ exports.CompositionInspectorHeader = CompositionInspectorHeader;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- export declare const CompositionDimensions: React.FC<{
2
+ export declare const CompositionMetadata: React.FC<{
3
3
  readonly compositionId: string;
4
4
  readonly disabled: boolean;
5
5
  readonly stack: string | null;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CompositionDimensions = void 0;
3
+ exports.CompositionMetadata = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const react_1 = require("react");
6
6
  const remotion_1 = require("remotion");
@@ -14,19 +14,28 @@ const use_resolved_stack_1 = require("../Timeline/use-resolved-stack");
14
14
  const common_1 = require("./common");
15
15
  const optimistic_composition_metadata_1 = require("./optimistic-composition-metadata");
16
16
  const styles_1 = require("./styles");
17
+ const compositionMetadataContainer = {
18
+ ...styles_1.detailsContainer,
19
+ paddingBottom: 4,
20
+ paddingTop: 4,
21
+ };
17
22
  const fieldLabels = {
18
23
  durationInFrames: 'Duration',
19
24
  fps: 'Frame rate',
20
25
  height: 'Height',
21
26
  width: 'Width',
22
27
  };
23
- const computedStyle = {
28
+ const computedContainerStyle = {
29
+ ...InputDragger_1.inputDraggerContainerStyle,
30
+ textAlign: 'right',
31
+ userSelect: 'none',
32
+ };
33
+ const computedValueStyle = {
24
34
  color: colors_1.WHITE_ALPHA_40,
25
35
  fontFamily: 'sans-serif',
26
36
  fontSize: 12,
27
37
  fontStyle: 'italic',
28
- lineHeight: '16px',
29
- userSelect: 'none',
38
+ lineHeight: 1.5,
30
39
  };
31
40
  const dimensionsControls = {
32
41
  alignItems: 'center',
@@ -108,9 +117,9 @@ const CompositionMetadataValue = ({ compositionId, computed, disabled, field, on
108
117
  }
109
118
  return String(roundedValue);
110
119
  }, [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 }));
120
+ return computed ? (jsx_runtime_1.jsx("span", { style: computedContainerStyle, children: jsx_runtime_1.jsx("span", { style: computedValueStyle, 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
121
  };
113
- const CompositionDimensions = ({ compositionId, disabled, stack }) => {
122
+ const CompositionMetadata = ({ compositionId, disabled, stack }) => {
114
123
  var _a, _b, _c, _d;
115
124
  const video = remotion_1.Internals.useVideo();
116
125
  const resolvedVideoConfig = remotion_1.Internals.useResolvedVideoConfig(compositionId);
@@ -163,11 +172,11 @@ const CompositionDimensions = ({ compositionId, disabled, stack }) => {
163
172
  const fpsIsComputed = (metadataSource === null || metadataSource === void 0 ? void 0 : metadataSource.fps) === 'calculate-metadata';
164
173
  const durationIsComputed = (metadataSource === null || metadataSource === void 0 ? void 0 : metadataSource.durationInFrames) === 'calculate-metadata';
165
174
  const isStill = (0, is_composition_still_1.isCompositionStill)(video);
166
- return (jsx_runtime_1.jsxs("div", { style: styles_1.detailsContainer, children: [
175
+ return (jsx_runtime_1.jsxs("div", { style: compositionMetadataContainer, children: [
167
176
  jsx_runtime_1.jsx(common_1.InspectorDetailRow, { label: "Dimensions", children: jsx_runtime_1.jsxs("div", { style: dimensionsControls, children: [
168
177
  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
178
  ] }) }), isStill ? null : (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
170
179
  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
180
  ] }))] }));
172
181
  };
173
- exports.CompositionDimensions = CompositionDimensions;
182
+ exports.CompositionMetadata = CompositionMetadata;
@@ -9,8 +9,8 @@ const CompositionOrStillIcon_1 = require("../CompositionOrStillIcon");
9
9
  const InitialCompositionLoader_1 = require("../InitialCompositionLoader");
10
10
  const common_1 = require("./common");
11
11
  const compositionIconStyle = {
12
- height: 13,
13
- width: 13,
12
+ height: 18,
13
+ width: 18,
14
14
  };
15
15
  const compositionListStyle = {
16
16
  display: 'flex',
@@ -22,8 +22,8 @@ const styles_1 = require("./styles");
22
22
  const use_track_for_selection_1 = require("./use-track-for-selection");
23
23
  const addKeyframeIcon = {
24
24
  display: 'block',
25
- height: 13,
26
- width: 12,
25
+ height: 18,
26
+ width: 18,
27
27
  };
28
28
  const EasingInspector = ({ selection }) => {
29
29
  var _a, _b;
@@ -214,8 +214,6 @@ 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.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
- ] })) : null] }));
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.jsx(common_1.InspectorActionSection, { 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}` }) })) : null] }));
220
218
  };
221
219
  exports.EasingInspector = EasingInspector;
@@ -45,8 +45,8 @@ const makeMovedKeyframedDragOverride = ({ details, toFrame, }) => {
45
45
  const removeKeyframeIcon = {
46
46
  display: 'block',
47
47
  flexShrink: 0,
48
- height: 13,
49
- width: 12,
48
+ height: 18,
49
+ width: 18,
50
50
  };
51
51
  const TrashIcon = ({ color }) => {
52
52
  return (jsx_runtime_1.jsx("svg", { viewBox: "0 0 448 512", style: removeKeyframeIcon, children: jsx_runtime_1.jsx("path", { fill: color, d: "M136.7 5.9C141.1-7.2 153.3-16 167.1-16l113.9 0c13.8 0 26 8.8 30.4 21.9L320 32 416 32c17.7 0 32 14.3 32 32s-14.3 32-32 32L32 96C14.3 96 0 81.7 0 64S14.3 32 32 32l96 0 8.7-26.1zM32 144l384 0 0 304c0 35.3-28.7 64-64 64L96 512c-35.3 0-64-28.7-64-64l0-304zm88 64c-13.3 0-24 10.7-24 24l0 192c0 13.3 10.7 24 24 24s24-10.7 24-24l0-192c0-13.3-10.7-24-24-24zm104 0c-13.3 0-24 10.7-24 24l0 192c0 13.3 10.7 24 24 24s24-10.7 24-24l0-192c0-13.3-10.7-24-24-24zm104 0c-13.3 0-24 10.7-24 24l0 192c0 13.3 10.7 24 24 24s24-10.7 24-24l0-192c0-13.3-10.7-24-24-24z" }) }));
@@ -3,9 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SequenceSelectionInspector = void 0;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const react_1 = require("react");
6
+ const remotion_1 = require("remotion");
6
7
  const client_id_1 = require("../../helpers/client-id");
8
+ const scissors_1 = require("../../icons/scissors");
7
9
  const InspectorSequenceSection_1 = require("../InspectorSequenceSection");
8
10
  const is_menu_item_1 = require("../Menu/is-menu-item");
11
+ const split_selected_timeline_item_1 = require("../Timeline/split-selected-timeline-item");
9
12
  const TimelineSelection_1 = require("../Timeline/TimelineSelection");
10
13
  const AlignmentControls_1 = require("./AlignmentControls");
11
14
  const common_1 = require("./common");
@@ -13,6 +16,34 @@ const ConnectedCompositionsSection_1 = require("./ConnectedCompositionsSection")
13
16
  const SequenceInspectorHeader_1 = require("./SequenceInspectorHeader");
14
17
  const styles_1 = require("./styles");
15
18
  const use_track_for_selection_1 = require("./use-track-for-selection");
19
+ const splitIconStyle = {
20
+ height: 18,
21
+ width: 18,
22
+ };
23
+ const SplitSequenceAction = ({ selection, track }) => {
24
+ const timelinePosition = remotion_1.Internals.Timeline.useTimelinePosition();
25
+ const { propStatuses } = (0, react_1.useContext)(remotion_1.Internals.VisualModePropStatusesContext);
26
+ const sequencePropStatuses = (0, react_1.useMemo)(() => remotion_1.Internals.getPropStatusesCtx(propStatuses, selection.nodePathInfo.sequenceSubscriptionKey), [propStatuses, selection]);
27
+ const eligibility = (0, react_1.useMemo)(() => (0, split_selected_timeline_item_1.getTimelineSequenceSplitEligibility)({
28
+ selection,
29
+ sequence: track.sequence,
30
+ splitFrame: timelinePosition,
31
+ propStatuses: sequencePropStatuses,
32
+ }), [selection, sequencePropStatuses, timelinePosition, track.sequence]);
33
+ const onSplit = (0, react_1.useCallback)(() => {
34
+ if (!eligibility.canSplit) {
35
+ return;
36
+ }
37
+ (0, split_selected_timeline_item_1.splitTimelineSequenceFromSource)({
38
+ nodePathInfo: eligibility.nodePathInfo,
39
+ splitFrame: timelinePosition,
40
+ }).catch(() => undefined);
41
+ }, [eligibility, timelinePosition]);
42
+ if (!eligibility.canSplit) {
43
+ return null;
44
+ }
45
+ return (jsx_runtime_1.jsx(common_1.InspectorActionSection, { children: jsx_runtime_1.jsx(common_1.InspectorInlineAction, { disabled: false, onClick: onSplit, renderIcon: (color) => (jsx_runtime_1.jsx(scissors_1.ScissorsIcon, { style: splitIconStyle, color: color })), children: "Split clip" }) }));
46
+ };
16
47
  const SequenceExpandedInspector = ({ track }) => {
17
48
  const { previewServerState } = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx);
18
49
  const { selectedItems, selectItems } = (0, TimelineSelection_1.useTimelineSelection)();
@@ -49,6 +80,7 @@ const SequenceExpandedInspector = ({ track }) => {
49
80
  return jsx_runtime_1.jsx(common_1.InspectorMessage, { children: "Studio server disconnected" });
50
81
  }
51
82
  if (!track.nodePathInfo ||
83
+ sequenceSelection === null ||
52
84
  !(0, InspectorSequenceSection_1.hasSequenceControls)(track.sequence) ||
53
85
  !validatedLocation) {
54
86
  return jsx_runtime_1.jsx(common_1.InspectorMessage, { children: "Sequence inspector unavailable" });
@@ -56,7 +88,8 @@ const SequenceExpandedInspector = ({ track }) => {
56
88
  return (jsx_runtime_1.jsxs("div", { style: styles_1.selectedContainer, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, onPointerDown: selectSequenceOnInspectorPointerDown, children: [
57
89
  jsx_runtime_1.jsx(SequenceInspectorHeader_1.SequenceInspectorHeader, { sourceLocation: sourceLocation, track: track }), connectedCompositions.length > 0 ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
58
90
  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 }) })] }));
91
+ ] })) : null, jsx_runtime_1.jsx(InspectorSequenceSection_1.InspectorSequenceSection, { sequence: track.sequence, validatedLocation: validatedLocation, nodePathInfo: track.nodePathInfo, keyframeDisplayOffset: track.keyframeDisplayOffset, renderTransformControls: () => jsx_runtime_1.jsx(AlignmentControls_1.AlignmentControls, { track: track }) }), jsx_runtime_1.jsx(SplitSequenceAction, { selection: sequenceSelection, track: track })
92
+ ] }));
60
93
  };
61
94
  const SequenceSelectionInspector = ({ selection }) => {
62
95
  const track = (0, use_track_for_selection_1.useTrackForSelection)(selection);
@@ -4,6 +4,13 @@ export declare const InspectorSectionHeader: React.FC<{
4
4
  readonly children: React.ReactNode;
5
5
  }>;
6
6
  export declare const InspectorSectionDivider: React.FC;
7
+ export declare const InspectorActionSection: React.FC<{
8
+ readonly children: React.ReactNode;
9
+ }>;
10
+ export declare const InspectorSection: React.FC<{
11
+ readonly children: React.ReactNode;
12
+ readonly header: React.ReactNode;
13
+ }>;
7
14
  export declare const InspectorBackHeader: React.FC<{
8
15
  readonly children: React.ReactNode;
9
16
  readonly disabled: boolean;
@@ -22,6 +29,7 @@ export declare const InspectorInlineAction: React.FC<{
22
29
  readonly disabled: boolean;
23
30
  readonly onClick: React.MouseEventHandler<HTMLButtonElement>;
24
31
  readonly renderIcon: (color: string) => React.ReactNode;
32
+ readonly style?: React.CSSProperties;
25
33
  }>;
26
34
  export declare const InspectorDefaultPropsWarnings: React.FC<{
27
35
  readonly warnings: RenderModalWarning[];
@@ -3,18 +3,28 @@ 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.InspectorBackHeader = exports.InspectorSectionDivider = exports.InspectorSectionHeader = void 0;
6
+ exports.InspectorDefaultPropsWarnings = exports.InspectorInlineAction = exports.InspectorDetailRow = exports.InspectorMessage = exports.InspectorBackHeader = exports.InspectorSection = exports.InspectorActionSection = 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
11
  const InspectorPanelLayout_1 = require("../InspectorPanelLayout");
12
+ const layout_1 = require("../layout");
12
13
  const ValidationMessage_1 = require("../NewComposition/ValidationMessage");
13
14
  const styles_1 = require("./styles");
14
15
  const InspectorSectionHeader = ({ children }) => jsx_runtime_1.jsx("div", { style: styles_1.sectionHeader, children: children });
15
16
  exports.InspectorSectionHeader = InspectorSectionHeader;
16
17
  const InspectorSectionDivider = () => (jsx_runtime_1.jsx("div", { style: styles_1.inspectorSectionDivider }));
17
18
  exports.InspectorSectionDivider = InspectorSectionDivider;
19
+ const InspectorActionSection = ({ children }) => (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
20
+ jsx_runtime_1.jsx(exports.InspectorSectionDivider, {}), jsx_runtime_1.jsx("div", { style: styles_1.inspectorActionSection, children: children })
21
+ ] }));
22
+ exports.InspectorActionSection = InspectorActionSection;
23
+ const InspectorSection = ({ children, header }) => {
24
+ return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
25
+ jsx_runtime_1.jsx(exports.InspectorSectionDivider, {}), jsx_runtime_1.jsx(exports.InspectorSectionHeader, { children: header }), children === null ? null : (jsx_runtime_1.jsx("div", { style: styles_1.inspectorSectionBody, children: children }))] }));
26
+ };
27
+ exports.InspectorSection = InspectorSection;
18
28
  const backIcon = {
19
29
  alignItems: 'center',
20
30
  display: 'flex',
@@ -35,11 +45,13 @@ const InspectorDetailRow = ({ label, children }) => (jsx_runtime_1.jsxs("div", {
35
45
  jsx_runtime_1.jsx("div", { style: styles_1.detailLabel, children: label }), jsx_runtime_1.jsx("div", { style: styles_1.detailValue, children: children })
36
46
  ] }));
37
47
  exports.InspectorDetailRow = InspectorDetailRow;
48
+ const INLINE_LABEL_BUTTON_MARGIN = 4;
38
49
  const inlineLabelButton = {
39
50
  alignItems: 'center',
40
51
  appearance: 'none',
41
52
  backgroundColor: colors_1.TRANSPARENT,
42
53
  border: 'none',
54
+ borderRadius: 4,
43
55
  boxSizing: 'border-box',
44
56
  color: colors_1.LIGHT_TEXT,
45
57
  cursor: 'default',
@@ -47,11 +59,12 @@ const inlineLabelButton = {
47
59
  fontFamily: 'sans-serif',
48
60
  fontSize: 13,
49
61
  gap: 8,
62
+ height: layout_1.COMPACT_CONTROL_ROW_HEIGHT,
50
63
  lineHeight: '18px',
51
- margin: 0,
52
- padding: `5px ${InspectorPanelLayout_1.INSPECTOR_PANEL_HORIZONTAL_PADDING}px`,
64
+ margin: `0 ${INLINE_LABEL_BUTTON_MARGIN}px`,
65
+ padding: `5px ${InspectorPanelLayout_1.INSPECTOR_PANEL_HORIZONTAL_PADDING - INLINE_LABEL_BUTTON_MARGIN}px`,
53
66
  textAlign: 'left',
54
- width: '100%',
67
+ width: `calc(100% - ${INLINE_LABEL_BUTTON_MARGIN * 2}px)`,
55
68
  };
56
69
  const inlineLabelButtonDisabled = {
57
70
  ...inlineLabelButton,
@@ -59,25 +72,35 @@ const inlineLabelButtonDisabled = {
59
72
  };
60
73
  const inlineLabelText = {
61
74
  color: colors_1.LIGHT_TEXT,
75
+ flex: 1,
62
76
  fontFamily: 'sans-serif',
63
77
  fontSize: 13,
64
78
  lineHeight: '18px',
79
+ minWidth: 0,
80
+ overflow: 'hidden',
81
+ textOverflow: 'ellipsis',
82
+ whiteSpace: 'nowrap',
65
83
  };
66
84
  const inlineLabelIcon = {
67
85
  alignItems: 'center',
68
86
  display: 'flex',
69
87
  flexShrink: 0,
70
- height: 13,
88
+ height: 18,
71
89
  justifyContent: 'center',
72
- width: 13,
90
+ width: 18,
73
91
  };
74
- const InspectorInlineAction = ({ children, disabled, onClick, renderIcon }) => {
92
+ const InspectorInlineAction = ({ children, disabled, onClick, renderIcon, style }) => {
75
93
  const [hovered, setHovered] = react_1.default.useState(false);
76
94
  const color = hovered && !disabled ? colors_1.WHITE : colors_1.LIGHT_TEXT;
77
95
  const buttonStyle = react_1.default.useMemo(() => ({
78
96
  ...(disabled ? inlineLabelButtonDisabled : inlineLabelButton),
97
+ backgroundColor: (0, colors_1.getBackgroundFromHoverState)({
98
+ hovered: hovered && !disabled,
99
+ selected: false,
100
+ }),
79
101
  color,
80
- }), [color, disabled]);
102
+ ...style,
103
+ }), [color, disabled, hovered, style]);
81
104
  const textStyle = react_1.default.useMemo(() => ({
82
105
  ...inlineLabelText,
83
106
  color,