@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.
Files changed (125) 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 +20 -14
  5. package/dist/components/Canvas.js +191 -36
  6. package/dist/components/CompositionSelectorItem.js +20 -31
  7. package/dist/components/CurrentAsset.d.ts +1 -0
  8. package/dist/components/CurrentAsset.js +21 -4
  9. package/dist/components/Editor.js +2 -4
  10. package/dist/components/InlineCompositionName.js +1 -1
  11. package/dist/components/InlineEditableTitle.d.ts +1 -0
  12. package/dist/components/InlineEditableTitle.js +56 -11
  13. package/dist/components/InspectorInfoHeader.d.ts +2 -0
  14. package/dist/components/InspectorInfoHeader.js +16 -4
  15. package/dist/components/InspectorLocationCopy.js +2 -2
  16. package/dist/components/InspectorPanel/AssetInspector.d.ts +4 -0
  17. package/dist/components/InspectorPanel/AssetInspector.js +11 -0
  18. package/dist/components/InspectorPanel/{DefaultInspector.d.ts → CompositionInspector.d.ts} +2 -2
  19. package/dist/components/InspectorPanel/CompositionInspector.js +114 -0
  20. package/dist/components/InspectorPanel/CompositionInspectorHeader.d.ts +1 -0
  21. package/dist/components/{CurrentComposition.js → InspectorPanel/CompositionInspectorHeader.js} +26 -21
  22. package/dist/components/InspectorPanel/{CompositionDimensions.d.ts → CompositionMetadata.d.ts} +1 -1
  23. package/dist/components/InspectorPanel/{CompositionDimensions.js → CompositionMetadata.js} +17 -8
  24. package/dist/components/InspectorPanel/ConnectedCompositionsSection.js +2 -2
  25. package/dist/components/InspectorPanel/EasingInspector.js +4 -6
  26. package/dist/components/InspectorPanel/KeyframeInspector.js +7 -8
  27. package/dist/components/InspectorPanel/KeyframeSettings.js +1 -1
  28. package/dist/components/InspectorPanel/SequenceInspectorHeader.js +28 -3
  29. package/dist/components/InspectorPanel/SequenceSelectionInspector.js +34 -1
  30. package/dist/components/InspectorPanel/common.d.ts +12 -2
  31. package/dist/components/InspectorPanel/common.js +45 -22
  32. package/dist/components/InspectorPanel/styles.d.ts +5 -6
  33. package/dist/components/InspectorPanel/styles.js +13 -39
  34. package/dist/components/InspectorPanel/use-composition-actions.d.ts +8 -0
  35. package/dist/components/InspectorPanel/use-composition-actions.js +114 -0
  36. package/dist/components/InspectorPanel.js +11 -2
  37. package/dist/components/InspectorSequenceSection.d.ts +0 -1
  38. package/dist/components/InspectorSequenceSection.js +20 -49
  39. package/dist/components/InspectorSourceLocation.d.ts +1 -0
  40. package/dist/components/InspectorSourceLocation.js +5 -1
  41. package/dist/components/Modals.js +2 -1
  42. package/dist/components/NewComposition/ComboBox.d.ts +2 -1
  43. package/dist/components/NewComposition/ComboBox.js +32 -7
  44. package/dist/components/NewComposition/InputDragger.d.ts +6 -0
  45. package/dist/components/NewComposition/InputDragger.js +26 -13
  46. package/dist/components/NewComposition/NewComposition.js +8 -1
  47. package/dist/components/NewComposition/ValidationMessage.d.ts +1 -1
  48. package/dist/components/PlaybackRateSelector.js +3 -3
  49. package/dist/components/Preview.js +15 -7
  50. package/dist/components/PreviewToolbar.js +3 -3
  51. package/dist/components/RenderButton.d.ts +1 -0
  52. package/dist/components/RenderButton.js +51 -7
  53. package/dist/components/RenderModal/RenderModalOutputName.js +34 -1
  54. package/dist/components/RenderModal/SchemaEditor/ZodDiscriminatedUnionEditor.js +1 -1
  55. package/dist/components/RenderModal/SchemaEditor/ZodEnumEditor.js +1 -1
  56. package/dist/components/RenderModal/SchemaEditor/ZodStaticFileEditor.js +1 -1
  57. package/dist/components/SelectedOutlineOverlay.js +1 -0
  58. package/dist/components/SizeSelector.js +3 -3
  59. package/dist/components/SvgImportDialog.d.ts +7 -0
  60. package/dist/components/SvgImportDialog.js +103 -0
  61. package/dist/components/Timeline/Timeline.js +1 -0
  62. package/dist/components/Timeline/TimelineAssetField.js +1 -1
  63. package/dist/components/Timeline/TimelineClipboardKeybindings.js +8 -1
  64. package/dist/components/Timeline/TimelineEnumField.js +1 -1
  65. package/dist/components/Timeline/TimelineFieldLabel.js +3 -3
  66. package/dist/components/Timeline/TimelineKeyframeControls.js +26 -6
  67. package/dist/components/Timeline/TimelineList.js +9 -4
  68. package/dist/components/Timeline/TimelineRowChrome.js +10 -2
  69. package/dist/components/Timeline/TimelineRowLayoutContext.d.ts +3 -0
  70. package/dist/components/Timeline/TimelineRowLayoutContext.js +6 -0
  71. package/dist/components/Timeline/TimelineSequenceItem.d.ts +2 -1
  72. package/dist/components/Timeline/TimelineSequenceItem.js +19 -11
  73. package/dist/components/Timeline/nest-timeline-tracks.d.ts +8 -0
  74. package/dist/components/Timeline/nest-timeline-tracks.js +25 -0
  75. package/dist/components/Timeline/timeline-scroll-logic.d.ts +8 -4
  76. package/dist/components/Timeline/timeline-scroll-logic.js +29 -15
  77. package/dist/components/import-assets.d.ts +17 -1
  78. package/dist/components/import-assets.js +96 -11
  79. package/dist/components/layout.d.ts +2 -0
  80. package/dist/components/layout.js +3 -1
  81. package/dist/components/open-in-new-window.d.ts +2 -0
  82. package/dist/components/open-in-new-window.js +28 -0
  83. package/dist/components/selected-outline-measurement.d.ts +2 -1
  84. package/dist/components/selected-outline-measurement.js +3 -1
  85. package/dist/esm/{chunk-tdncqycp.js → chunk-0v4n7nkh.js} +8463 -7092
  86. package/dist/esm/internals.mjs +8463 -7092
  87. package/dist/esm/previewEntry.mjs +8613 -7242
  88. package/dist/esm/renderEntry.mjs +1 -1
  89. package/dist/helpers/client-id.js +2 -1
  90. package/dist/helpers/clipboard-figma.d.ts +4 -0
  91. package/dist/helpers/clipboard-figma.js +41 -0
  92. package/dist/helpers/clipboard-images.d.ts +10 -0
  93. package/dist/helpers/clipboard-images.js +77 -0
  94. package/dist/helpers/clipboard-svg.d.ts +3 -0
  95. package/dist/helpers/clipboard-svg.js +47 -0
  96. package/dist/helpers/get-effective-translation.d.ts +2 -1
  97. package/dist/helpers/get-effective-translation.js +15 -7
  98. package/dist/helpers/get-preview-file-type.d.ts +1 -1
  99. package/dist/helpers/get-preview-file-type.js +5 -1
  100. package/dist/helpers/inject-css.js +11 -0
  101. package/dist/helpers/studio-fit-padding.d.ts +41 -0
  102. package/dist/helpers/studio-fit-padding.js +64 -0
  103. package/dist/helpers/use-image-metadata.d.ts +8 -0
  104. package/dist/helpers/use-image-metadata.js +82 -0
  105. package/dist/helpers/use-studio-canvas-dimensions.js +2 -2
  106. package/dist/icons/audio.d.ts +3 -0
  107. package/dist/icons/audio.js +3 -1
  108. package/dist/icons/font.d.ts +4 -0
  109. package/dist/icons/font.js +8 -0
  110. package/dist/icons/frame.d.ts +3 -1
  111. package/dist/icons/frame.js +1 -1
  112. package/dist/icons/json.d.ts +4 -0
  113. package/dist/icons/json.js +8 -0
  114. package/dist/icons/magnet.js +1 -1
  115. package/dist/icons/scissors.d.ts +5 -0
  116. package/dist/icons/scissors.js +8 -0
  117. package/dist/icons/solid.d.ts +5 -0
  118. package/dist/icons/solid.js +8 -0
  119. package/dist/icons/video.d.ts +3 -0
  120. package/dist/icons/video.js +5 -1
  121. package/dist/state/modals.d.ts +8 -1
  122. package/dist/state/timeline-zoom.js +12 -11
  123. package/package.json +11 -11
  124. package/dist/components/CurrentComposition.d.ts +0 -2
  125. 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.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;
@@ -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.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) => ({
198
+ jsx_runtime_1.jsx(common_1.InspectorBackAction, { disabled: parentSelection === null, onClick: onSelectParent, title: "Back to property", 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,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,11 +45,11 @@ const makeMovedKeyframedDragOverride = ({ details, toFrame, }) => {
45
45
  const removeKeyframeIcon = {
46
46
  display: 'block',
47
47
  flexShrink: 0,
48
- height: 13,
49
- width: 12,
48
+ height: 16,
49
+ width: 16,
50
50
  };
51
51
  const TrashIcon = ({ color }) => {
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" }) }));
52
+ return (jsx_runtime_1.jsx("svg", { viewBox: "0 0 448 512", style: removeKeyframeIcon, children: jsx_runtime_1.jsx("path", { fill: color, d: "M160.5 27.4c2-6.8 8.3-11.4 15.3-11.4l96.4 0c7.1 0 13.3 4.6 15.3 11.4l11 36.6-149 0 11-36.6zM116.1 64L16 64C7.2 64 0 71.2 0 80S7.2 96 16 96l416 0c8.8 0 16-7.2 16-16s-7.2-16-16-16l-100.1 0-13.7-45.8C312.1-2.1 293.4-16 272.2-16l-96.4 0c-21.2 0-39.9 13.9-46 34.2L116.1 64zM28.7 144L51.6 452.7c2.5 33.4 30.3 59.3 63.8 59.3l217.1 0c33.5 0 61.3-25.9 63.8-59.3l22.9-308.7-32.1 0-22.7 306.4c-1.2 16.7-15.2 29.6-31.9 29.6l-217.1 0c-16.8 0-30.7-12.9-31.9-29.6L60.8 144 28.7 144z" }) }));
53
53
  };
54
54
  const KeyframeInspector = ({ selection }) => {
55
55
  const track = (0, use_track_for_selection_1.useTrackForSelection)(selection);
@@ -321,15 +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.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) => ({
324
+ jsx_runtime_1.jsx(SequenceInspectorHeader_1.SequenceInspectorSections, { track: track }), jsx_runtime_1.jsx(common_1.InspectorSectionDivider, {}), jsx_runtime_1.jsx(common_1.InspectorBackAction, { disabled: parentSelection === null, onClick: onSelectParent, title: "Back to property", 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
327
  })), nodePathInfo: selection.nodePathInfo }), jsx_runtime_1.jsxs("div", { style: styles_1.detailsWithInlineAction, children: [
328
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
- ] })
332
- ] }), jsx_runtime_1.jsx(common_1.InspectorInlineAction, { disabled: removeDisabled, onClick: onRemoveKeyframe, renderIcon: (color) => jsx_runtime_1.jsx(TrashIcon, { color: color }), children: "Remove keyframe" })] })
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.jsx("div", { style: styles_1.keyframeEditorRow, children: jsx_runtime_1.jsx(common_1.InspectorDetailRow, { label: details.fieldLabel, children: 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 })) }) }) })
330
+ ] }), jsx_runtime_1.jsx(common_1.InspectorActionSection, { children: 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
333
  };
335
334
  exports.KeyframeInspector = KeyframeInspector;
@@ -134,7 +134,7 @@ const KeyframeSettings = ({ update }) => {
134
134
  }, []);
135
135
  return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
136
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
- 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 }) })
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, size: "small" }) }), 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, size: "small" }) }), 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, size: "small" }) })
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
  ] })
140
140
  ] }));
@@ -4,14 +4,39 @@ exports.SequenceInspectorSections = exports.SequenceInspectorHeader = exports.us
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");
7
+ const react_2 = require("../../icons/react");
7
8
  const InlineEditableTitle_1 = require("../InlineEditableTitle");
9
+ const InspectorInfoHeader_1 = require("../InspectorInfoHeader");
8
10
  const InspectorLocationCopy_1 = require("../InspectorLocationCopy");
9
11
  const InspectorSourceLocation_1 = require("../InspectorSourceLocation");
12
+ const layout_1 = require("../layout");
10
13
  const use_open_sequence_in_editor_1 = require("../Timeline/use-open-sequence-in-editor");
11
14
  const use_rename_sequence_1 = require("../Timeline/use-rename-sequence");
12
15
  const common_1 = require("./common");
13
16
  const ConnectedCompositionsSection_1 = require("./ConnectedCompositionsSection");
14
17
  const styles_1 = require("./styles");
18
+ const sourceLocationIconStyle = {
19
+ flexShrink: 0,
20
+ height: 18,
21
+ width: 18,
22
+ };
23
+ const renderReactIcon = (color) => {
24
+ return jsx_runtime_1.jsx(react_2.ReactIcon, { color: color, style: sourceLocationIconStyle });
25
+ };
26
+ const sequenceInspectorSubtitle = {
27
+ ...styles_1.sequenceHeaderSubtitle,
28
+ alignItems: 'center',
29
+ boxSizing: 'border-box',
30
+ fontSize: 13,
31
+ height: layout_1.COMPACT_INLINE_ROW_HEIGHT,
32
+ lineHeight: '18px',
33
+ margin: '0 4px',
34
+ padding: '0 8px',
35
+ width: 'calc(100% - 8px)',
36
+ };
37
+ const defaultCursor = {
38
+ cursor: 'default',
39
+ };
15
40
  const useSequenceInspectorSourceLocation = (sequence) => {
16
41
  const { canOpenInEditor, openInEditor, originalLocation } = (0, use_open_sequence_in_editor_1.useOpenSequenceInEditor)(sequence);
17
42
  const validatedLocation = (0, react_1.useMemo)(() => {
@@ -61,7 +86,7 @@ const SequenceInspectorHeader = ({ sourceLocation, track }) => {
61
86
  }, [documentationLink]);
62
87
  const subtitleStyle = (0, react_1.useMemo)(() => {
63
88
  return {
64
- ...styles_1.sequenceHeaderSubtitle,
89
+ ...sequenceInspectorSubtitle,
65
90
  cursor: documentationLink ? 'pointer' : 'default',
66
91
  };
67
92
  }, [documentationLink]);
@@ -69,8 +94,8 @@ const SequenceInspectorHeader = ({ sourceLocation, track }) => {
69
94
  const onRename = (0, react_1.useCallback)((newName) => {
70
95
  saveName(newName).catch(() => undefined);
71
96
  }, [saveName]);
72
- return (jsx_runtime_1.jsx("div", { style: styles_1.sequenceHeader, children: jsx_runtime_1.jsxs(InspectorLocationCopy_1.InspectorLocationCopy, { location: sourceLocation.validatedLocation, name: componentName !== null && componentName !== void 0 ? componentName : null, children: [
73
- jsx_runtime_1.jsx("div", { style: styles_1.sequenceHeaderTitle, children: jsx_runtime_1.jsx(InlineEditableTitle_1.InlineEditableTitle, { value: sequenceDisplayName, canRename: canRename, onCommit: onRename }) }), documentationLink ? (jsx_runtime_1.jsx("button", { type: "button", style: subtitleStyle, title: "Open component docs", onClick: openDocumentationLink, children: componentName })) : (jsx_runtime_1.jsx("div", { style: subtitleStyle, children: componentName })), jsx_runtime_1.jsx(InspectorSourceLocation_1.InspectorSourceLocation, { location: sourceLocation.validatedLocation, canOpen: sourceLocation.canOpenInEditor, onOpen: sourceLocation.openFileLocation })
97
+ return (jsx_runtime_1.jsx(InspectorInfoHeader_1.InspectorInfoHeader, { contentSized: true, padding: "4px 0", children: jsx_runtime_1.jsxs(InspectorLocationCopy_1.InspectorLocationCopy, { location: sourceLocation.validatedLocation, name: componentName !== null && componentName !== void 0 ? componentName : null, children: [
98
+ jsx_runtime_1.jsx(InlineEditableTitle_1.InlineEditableTitle, { value: sequenceDisplayName, canRename: canRename, onCommit: onRename, size: "inspector" }), documentationLink ? (jsx_runtime_1.jsx(common_1.InspectorInlineAction, { disabled: false, style: defaultCursor, size: "compact", title: "Open component docs", onClick: openDocumentationLink, children: componentName })) : (jsx_runtime_1.jsx("div", { style: subtitleStyle, children: componentName })), jsx_runtime_1.jsx(InspectorSourceLocation_1.InspectorSourceLocation, { location: sourceLocation.validatedLocation, canOpen: sourceLocation.canOpenInEditor, onOpen: sourceLocation.openFileLocation, renderIcon: renderReactIcon, size: "inline-action" })
74
99
  ] }) }));
75
100
  };
76
101
  exports.SequenceInspectorHeader = SequenceInspectorHeader;
@@ -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: 16,
21
+ width: 16,
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,7 +4,14 @@ 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 InspectorBackHeader: 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
+ }>;
14
+ export declare const InspectorBackAction: React.FC<{
8
15
  readonly children: React.ReactNode;
9
16
  readonly disabled: boolean;
10
17
  readonly onClick: React.MouseEventHandler<HTMLButtonElement>;
@@ -21,7 +28,10 @@ export declare const InspectorInlineAction: React.FC<{
21
28
  readonly children: React.ReactNode;
22
29
  readonly disabled: boolean;
23
30
  readonly onClick: React.MouseEventHandler<HTMLButtonElement>;
24
- readonly renderIcon: (color: string) => React.ReactNode;
31
+ readonly renderIcon?: (color: string) => React.ReactNode;
32
+ readonly size?: 'default' | 'compact';
33
+ readonly style?: React.CSSProperties;
34
+ readonly title?: string;
25
35
  }>;
26
36
  export declare const InspectorDefaultPropsWarnings: React.FC<{
27
37
  readonly warnings: RenderModalWarning[];
@@ -3,43 +3,52 @@ 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.InspectorBackAction = 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
- const InlineAction_1 = require("../InlineAction");
11
10
  const InspectorPanelLayout_1 = require("../InspectorPanelLayout");
11
+ const layout_1 = require("../layout");
12
12
  const ValidationMessage_1 = require("../NewComposition/ValidationMessage");
13
13
  const styles_1 = require("./styles");
14
14
  const InspectorSectionHeader = ({ children }) => jsx_runtime_1.jsx("div", { style: styles_1.sectionHeader, children: children });
15
15
  exports.InspectorSectionHeader = InspectorSectionHeader;
16
16
  const InspectorSectionDivider = () => (jsx_runtime_1.jsx("div", { style: styles_1.inspectorSectionDivider }));
17
17
  exports.InspectorSectionDivider = InspectorSectionDivider;
18
- const backIcon = {
19
- alignItems: 'center',
20
- display: 'flex',
21
- height: 12,
22
- justifyContent: 'center',
23
- width: 12,
18
+ const InspectorActionSection = ({ children }) => (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
19
+ jsx_runtime_1.jsx(exports.InspectorSectionDivider, {}), jsx_runtime_1.jsx("div", { style: styles_1.inspectorActionSection, children: children })
20
+ ] }));
21
+ exports.InspectorActionSection = InspectorActionSection;
22
+ const InspectorSection = ({ children, header }) => {
23
+ return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
24
+ 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 }))] }));
25
+ };
26
+ exports.InspectorSection = InspectorSection;
27
+ const backArrowIcon = {
28
+ display: 'block',
29
+ height: 15,
30
+ width: 15,
24
31
  };
25
- const BackChevron = ({ color }) => {
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" }) }));
32
+ const BackArrow = ({ color }) => {
33
+ return (jsx_runtime_1.jsx("svg", { viewBox: "0 0 512 512", style: backArrowIcon, children: jsx_runtime_1.jsx("path", { d: "M7 239c-9.4 9.4-9.4 24.6 0 33.9L175 441c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9L81.9 280 488 280c13.3 0 24-10.7 24-24s-10.7-24-24-24L81.9 232 209 105c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0L7 239z", fill: color }) }));
27
34
  };
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] }) }) }));
35
+ const InspectorBackAction = ({ children, disabled, onClick, title }) => {
36
+ return (jsx_runtime_1.jsx("div", { style: styles_1.inspectorActionSection, children: jsx_runtime_1.jsx(exports.InspectorInlineAction, { disabled: disabled, onClick: onClick, renderIcon: (color) => jsx_runtime_1.jsx(BackArrow, { color: color }), title: title, children: children }) }));
30
37
  };
31
- exports.InspectorBackHeader = InspectorBackHeader;
38
+ exports.InspectorBackAction = InspectorBackAction;
32
39
  const InspectorMessage = ({ children }) => jsx_runtime_1.jsx("div", { style: styles_1.centeredMessage, children: children });
33
40
  exports.InspectorMessage = InspectorMessage;
34
41
  const InspectorDetailRow = ({ label, children }) => (jsx_runtime_1.jsxs("div", { style: styles_1.detailRow, children: [
35
42
  jsx_runtime_1.jsx("div", { style: styles_1.detailLabel, children: label }), jsx_runtime_1.jsx("div", { style: styles_1.detailValue, children: children })
36
43
  ] }));
37
44
  exports.InspectorDetailRow = InspectorDetailRow;
45
+ const INLINE_LABEL_BUTTON_MARGIN = 4;
38
46
  const inlineLabelButton = {
39
47
  alignItems: 'center',
40
48
  appearance: 'none',
41
49
  backgroundColor: colors_1.TRANSPARENT,
42
50
  border: 'none',
51
+ borderRadius: 4,
43
52
  boxSizing: 'border-box',
44
53
  color: colors_1.LIGHT_TEXT,
45
54
  cursor: 'default',
@@ -47,37 +56,52 @@ const inlineLabelButton = {
47
56
  fontFamily: 'sans-serif',
48
57
  fontSize: 13,
49
58
  gap: 8,
59
+ height: layout_1.COMPACT_CONTROL_ROW_HEIGHT,
50
60
  lineHeight: '18px',
51
- margin: 0,
52
- padding: `5px ${InspectorPanelLayout_1.INSPECTOR_PANEL_HORIZONTAL_PADDING}px`,
61
+ margin: `0 ${INLINE_LABEL_BUTTON_MARGIN}px`,
62
+ padding: `0 ${InspectorPanelLayout_1.INSPECTOR_PANEL_HORIZONTAL_PADDING - INLINE_LABEL_BUTTON_MARGIN}px`,
53
63
  textAlign: 'left',
54
- width: '100%',
64
+ width: `calc(100% - ${INLINE_LABEL_BUTTON_MARGIN * 2}px)`,
55
65
  };
56
66
  const inlineLabelButtonDisabled = {
57
67
  ...inlineLabelButton,
58
68
  opacity: 0.35,
59
69
  };
70
+ const compactInlineLabelButton = {
71
+ height: layout_1.COMPACT_INLINE_ROW_HEIGHT,
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, size = 'default', style, title, }) => {
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
+ ...(size === 'compact' ? compactInlineLabelButton : null),
103
+ ...style,
104
+ }), [color, disabled, hovered, size, style]);
81
105
  const textStyle = react_1.default.useMemo(() => ({
82
106
  ...inlineLabelText,
83
107
  color,
@@ -88,8 +112,7 @@ const InspectorInlineAction = ({ children, disabled, onClick, renderIcon }) => {
88
112
  const onPointerLeave = react_1.default.useCallback(() => {
89
113
  setHovered(false);
90
114
  }, []);
91
- return (jsx_runtime_1.jsxs("button", { type: "button", disabled: disabled, style: buttonStyle, onClick: onClick, onPointerEnter: disabled ? undefined : onPointerEnter, onPointerLeave: onPointerLeave, children: [
92
- jsx_runtime_1.jsx("span", { style: inlineLabelIcon, children: renderIcon(color) }), jsx_runtime_1.jsx("span", { style: textStyle, children: children })
115
+ return (jsx_runtime_1.jsxs("button", { className: "__remotion-inspector-inline-action", type: "button", disabled: disabled, style: buttonStyle, title: title, onClick: onClick, onPointerEnter: disabled ? undefined : onPointerEnter, onPointerLeave: onPointerLeave, children: [renderIcon ? (jsx_runtime_1.jsx("span", { style: inlineLabelIcon, children: renderIcon(color) })) : null, jsx_runtime_1.jsx("span", { style: textStyle, children: children })
93
116
  ] }));
94
117
  };
95
118
  exports.InspectorInlineAction = InspectorInlineAction;
@@ -1,14 +1,13 @@
1
1
  import type React from 'react';
2
2
  export declare const container: React.CSSProperties;
3
3
  export declare const scrollableContainer: React.CSSProperties;
4
- export declare const defaultPropsSection: React.CSSProperties;
5
- export declare const visualControlsSection: React.CSSProperties;
6
- export declare const compositionSection: React.CSSProperties;
4
+ export declare const compositionDefaultPropsSection: React.CSSProperties;
5
+ export declare const compositionVisualControlsSection: React.CSSProperties;
6
+ export declare const inspectorOverviewSection: React.CSSProperties;
7
7
  export declare const inspectorSectionDivider: React.CSSProperties;
8
8
  export declare const sequenceHeaderDivider: React.CSSProperties;
9
9
  export declare const sectionHeader: React.CSSProperties;
10
- export declare const sequenceHeader: React.CSSProperties;
11
- export declare const sequenceHeaderTitle: React.CSSProperties;
10
+ export declare const inspectorSectionBody: React.CSSProperties;
12
11
  export declare const sequenceHeaderSubtitle: React.CSSProperties;
13
12
  export declare const sectionHeaderRow: React.CSSProperties;
14
13
  export declare const sectionHeaderTitle: React.CSSProperties;
@@ -21,11 +20,11 @@ export declare const selectedContainer: React.CSSProperties;
21
20
  export declare const centeredMessage: React.CSSProperties;
22
21
  export declare const detailsContainer: React.CSSProperties;
23
22
  export declare const detailsWithInlineAction: React.CSSProperties;
23
+ export declare const inspectorActionSection: React.CSSProperties;
24
24
  export declare const detailsBeforeInlineAction: React.CSSProperties;
25
25
  export declare const guideDetailsContainer: React.CSSProperties;
26
26
  export declare const detailRow: React.CSSProperties;
27
27
  export declare const detailLabel: React.CSSProperties;
28
28
  export declare const detailValue: React.CSSProperties;
29
29
  export declare const keyframeEditorRow: React.CSSProperties;
30
- export declare const keyframeEditorLabel: React.CSSProperties;
31
30
  export declare const keyframeEditorValue: 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.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;
3
+ exports.keyframeEditorValue = exports.keyframeEditorRow = exports.detailValue = exports.detailLabel = exports.detailRow = exports.guideDetailsContainer = exports.detailsBeforeInlineAction = exports.inspectorActionSection = 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.inspectorSectionBody = exports.sectionHeader = exports.sequenceHeaderDivider = exports.inspectorSectionDivider = exports.inspectorOverviewSection = exports.compositionVisualControlsSection = exports.compositionDefaultPropsSection = 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 = {
@@ -16,15 +16,15 @@ exports.scrollableContainer = {
16
16
  ...exports.container,
17
17
  overflowY: 'auto',
18
18
  };
19
- exports.defaultPropsSection = {
19
+ exports.compositionDefaultPropsSection = {
20
20
  display: 'flex',
21
21
  flexDirection: 'column',
22
22
  };
23
- exports.visualControlsSection = {
23
+ exports.compositionVisualControlsSection = {
24
24
  display: 'flex',
25
25
  flexDirection: 'column',
26
26
  };
27
- exports.compositionSection = {
27
+ exports.inspectorOverviewSection = {
28
28
  display: 'flex',
29
29
  flexDirection: 'column',
30
30
  };
@@ -44,30 +44,11 @@ exports.sectionHeader = {
44
44
  padding: `8px ${InspectorPanelLayout_1.INSPECTOR_PANEL_HORIZONTAL_PADDING}px`,
45
45
  userSelect: 'none',
46
46
  };
47
- exports.sequenceHeader = {
48
- backgroundColor: colors_1.BACKGROUND,
47
+ exports.inspectorSectionBody = {
49
48
  display: 'flex',
50
49
  flexDirection: 'column',
51
50
  minWidth: 0,
52
- padding: `6px ${InspectorPanelLayout_1.INSPECTOR_PANEL_HORIZONTAL_PADDING}px 4px`,
53
- };
54
- exports.sequenceHeaderTitle = {
55
- alignSelf: 'stretch',
56
- backgroundColor: colors_1.BACKGROUND,
57
- border: 'none',
58
- color: colors_1.WHITE,
59
- display: 'flex',
60
- fontFamily: 'sans-serif',
61
- fontSize: 12,
62
- lineHeight: '18px',
63
- margin: 0,
64
- maxWidth: '100%',
65
- minWidth: 0,
66
- overflow: 'hidden',
67
- padding: 0,
68
- textAlign: 'left',
69
- textOverflow: 'ellipsis',
70
- whiteSpace: 'nowrap',
51
+ paddingBottom: 8,
71
52
  };
72
53
  exports.sequenceHeaderSubtitle = {
73
54
  alignSelf: 'flex-start',
@@ -158,6 +139,9 @@ exports.detailsContainer = {
158
139
  exports.detailsWithInlineAction = {
159
140
  paddingBottom: InspectorPanelLayout_1.INSPECTOR_PANEL_HORIZONTAL_PADDING,
160
141
  };
142
+ exports.inspectorActionSection = {
143
+ padding: '4px 0',
144
+ };
161
145
  exports.detailsBeforeInlineAction = {
162
146
  padding: `0 ${InspectorPanelLayout_1.INSPECTOR_PANEL_HORIZONTAL_PADDING}px`,
163
147
  };
@@ -173,6 +157,10 @@ exports.detailRow = {
173
157
  exports.detailLabel = {
174
158
  color: colors_1.LIGHT_TEXT,
175
159
  fontSize: 13,
160
+ minWidth: 0,
161
+ overflow: 'hidden',
162
+ textOverflow: 'ellipsis',
163
+ whiteSpace: 'nowrap',
176
164
  };
177
165
  exports.detailValue = {
178
166
  color: colors_1.WHITE,
@@ -183,22 +171,8 @@ exports.detailValue = {
183
171
  wordBreak: 'break-word',
184
172
  };
185
173
  exports.keyframeEditorRow = {
186
- alignItems: 'flex-start',
187
- display: 'flex',
188
- gap: 12,
189
- justifyContent: 'space-between',
190
- minWidth: 0,
191
174
  padding: '10px 0',
192
175
  };
193
- exports.keyframeEditorLabel = {
194
- color: colors_1.LIGHT_TEXT,
195
- fontSize: 13,
196
- lineHeight: '22px',
197
- minWidth: 0,
198
- overflow: 'hidden',
199
- textOverflow: 'ellipsis',
200
- whiteSpace: 'nowrap',
201
- };
202
176
  exports.keyframeEditorValue = {
203
177
  alignItems: 'center',
204
178
  display: 'flex',
@@ -0,0 +1,8 @@
1
+ export declare const useCompositionActions: () => {
2
+ canInsertAsset: boolean;
3
+ canInsertSolid: boolean;
4
+ canShowInsertAsset: boolean;
5
+ canShowInsertSolid: boolean;
6
+ insertAsset: () => Promise<void>;
7
+ insertSolid: () => Promise<void>;
8
+ };