@remotion/studio 4.0.515 → 4.0.517
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/restart-studio.js +4 -0
- package/dist/components/AssetSelector.js +4 -10
- package/dist/components/AssetSelectorItem.d.ts +2 -1
- package/dist/components/AssetSelectorItem.js +24 -29
- package/dist/components/Canvas.js +21 -15
- package/dist/components/CanvasCaptureDropHandler.d.ts +4 -0
- package/dist/components/CanvasCaptureDropHandler.js +42 -0
- package/dist/components/CanvasOrLoading.js +4 -3
- package/dist/components/CaptionInspector.d.ts +2 -0
- package/dist/components/CaptionInspector.js +3 -5
- package/dist/components/CheckboardToggle.js +1 -1
- package/dist/components/Checkbox.d.ts +0 -1
- package/dist/components/Checkbox.js +2 -19
- package/dist/components/CompositionSelector.js +6 -3
- package/dist/components/CompositionSelectorItem.js +9 -10
- package/dist/components/ConfigSelect.d.ts +17 -0
- package/dist/components/ConfigSelect.js +50 -0
- package/dist/components/ConfigureLicenseModal.js +79 -46
- package/dist/components/CurrentAsset.d.ts +10 -2
- package/dist/components/CurrentAsset.js +143 -45
- package/dist/components/Editor.js +2 -1
- package/dist/components/EditorContent.js +5 -2
- package/dist/components/EditorContexts.js +2 -1
- package/dist/components/EditorRuler/Ruler.d.ts +1 -0
- package/dist/components/EditorRuler/Ruler.js +9 -8
- package/dist/components/EditorRuler/index.d.ts +1 -0
- package/dist/components/EditorRuler/index.js +3 -4
- package/dist/components/EditorRuler/use-is-ruler-visible.d.ts +1 -1
- package/dist/components/EditorRuler/use-is-ruler-visible.js +8 -2
- package/dist/components/ElementLibraryModal.d.ts +5 -0
- package/dist/components/ElementLibraryModal.js +38 -0
- package/dist/components/FilePreview.js +71 -0
- package/dist/components/FixComputedValueModal.js +54 -51
- package/dist/components/GlobalKeybindings.js +5 -5
- package/dist/components/InlineAction.d.ts +1 -1
- package/dist/components/InlineAction.js +12 -2
- package/dist/components/InlineCaptionInspector.d.ts +2 -0
- package/dist/components/InlineCaptionInspector.js +2 -2
- package/dist/components/InlineCompositionName.js +1 -1
- package/dist/components/InlineEditableTitle.js +5 -4
- package/dist/components/InspectorInfoHeader.js +1 -1
- package/dist/components/InspectorOpenInEditor.js +48 -72
- package/dist/components/InspectorPanel/AlignmentControls.js +2 -3
- package/dist/components/InspectorPanel/CollapsibleInspectorSectionHeader.d.ts +7 -0
- package/dist/components/InspectorPanel/CollapsibleInspectorSectionHeader.js +39 -0
- package/dist/components/InspectorPanel/CompositionInspector.js +25 -45
- package/dist/components/InspectorPanel/CompositionInspectorHeader.js +2 -2
- package/dist/components/InspectorPanel/CompositionMetadata.js +11 -4
- package/dist/components/InspectorPanel/EasingInspector.js +2 -2
- package/dist/components/InspectorPanel/ElementLibraryButton.d.ts +2 -0
- package/dist/components/InspectorPanel/ElementLibraryButton.js +139 -0
- package/dist/components/InspectorPanel/KeyframeEasingNavigator.js +10 -4
- package/dist/components/InspectorPanel/KeyframeInspector.js +1 -1
- package/dist/components/InspectorPanel/SequenceInspectorHeader.js +14 -6
- package/dist/components/InspectorPanel/SequenceSelectionInspector.js +2 -7
- package/dist/components/InspectorPanel/common.d.ts +0 -13
- package/dist/components/InspectorPanel/common.js +6 -59
- package/dist/components/InspectorPanel/inspector-selection.d.ts +2 -2
- package/dist/components/InspectorPanel/styles.d.ts +0 -1
- package/dist/components/InspectorPanel/styles.js +3 -4
- package/dist/components/InspectorPanel/use-composition-actions.js +0 -1
- package/dist/components/InspectorPanel/use-track-for-selection.d.ts +1 -2
- package/dist/components/InspectorPanelLayout.d.ts +1 -1
- package/dist/components/InspectorPanelLayout.js +1 -1
- package/dist/components/InspectorSequenceSection.d.ts +1 -2
- package/dist/components/InspectorSequenceSection.js +40 -54
- package/dist/components/InspectorSourceLocation.js +1 -1
- package/dist/components/InstallPackage.d.ts +2 -1
- package/dist/components/InstallPackage.js +60 -30
- package/dist/components/InstallablePackage.js +37 -11
- package/dist/components/KeyboardShortcutsSettings.d.ts +2 -0
- package/dist/components/KeyboardShortcutsSettings.js +177 -0
- package/dist/components/Menu/MenuItem.js +15 -6
- package/dist/components/MenuBuildIndicator.js +1 -1
- package/dist/components/MenuToolbar.js +7 -3
- package/dist/components/Modals.js +7 -5
- package/dist/components/NewComposition/CodemodFooter.d.ts +0 -1
- package/dist/components/NewComposition/CodemodFooter.js +2 -8
- package/dist/components/NewComposition/DeleteComposition.js +1 -1
- package/dist/components/NewComposition/DeleteFolder.js +1 -1
- package/dist/components/NewComposition/DuplicateComposition.js +1 -1
- package/dist/components/NewComposition/InputDragger.js +27 -4
- package/dist/components/NewComposition/NewComposition.js +1 -1
- package/dist/components/NewComposition/NewFolder.js +1 -3
- package/dist/components/NewComposition/RenameComposition.js +1 -1
- package/dist/components/NewComposition/RenameFolder.js +1 -1
- package/dist/components/NewComposition/use-rename-static-file.js +1 -1
- package/dist/components/Notifications/NotificationCenter.d.ts +1 -0
- package/dist/components/Notifications/NotificationCenter.js +5 -0
- package/dist/components/OptionsPanel.js +9 -12
- package/dist/components/PlaybackRateSelector.js +1 -1
- package/dist/components/Preview.js +83 -5
- package/dist/components/PreviewToolbar.js +12 -3
- package/dist/components/PreviewToolbarOverflowButton.d.ts +1 -0
- package/dist/components/PreviewToolbarOverflowButton.js +39 -2
- package/dist/components/QuickSwitcher/ExplorerQuickSwitcherTrigger.js +2 -2
- package/dist/components/QuickSwitcher/QuickSwitcherContent.js +14 -30
- package/dist/components/RadioButton.d.ts +6 -0
- package/dist/components/RadioButton.js +62 -0
- package/dist/components/RenderButton.js +68 -184
- package/dist/components/RenderModal/DataEditor.js +15 -12
- package/dist/components/RenderModal/RenderStatusModal.js +0 -1
- package/dist/components/RenderModal/SchemaEditor/ZodSwitch.js +3 -1
- package/dist/components/RenderModal/SchemaEditor/infer-zod-schema-from-value.d.ts +15 -0
- package/dist/components/RenderModal/SchemaEditor/infer-zod-schema-from-value.js +95 -0
- package/dist/components/RenderQueue/RenderQueueRemoveItem.js +1 -6
- package/dist/components/RenderingSettings.js +7 -4
- package/dist/components/RulersAndGuidesToggle.d.ts +4 -0
- package/dist/components/RulersAndGuidesToggle.js +34 -0
- package/dist/components/SegmentedButton.d.ts +29 -0
- package/dist/components/SegmentedButton.js +226 -0
- package/dist/components/SelectedOutlineEditingHandles.d.ts +16 -0
- package/dist/components/SelectedOutlineEditingHandles.js +66 -0
- package/dist/components/SelectedOutlineElement.d.ts +2 -4
- package/dist/components/SelectedOutlineElement.js +15 -54
- package/dist/components/SelectedOutlineOverlay.js +32 -6
- package/dist/components/SelectedOutlinePolygon.d.ts +4 -6
- package/dist/components/SelectedOutlinePolygon.js +18 -16
- package/dist/components/SelectedOutlineRenderer.d.ts +1 -2
- package/dist/components/SelectedOutlineRenderer.js +66 -14
- package/dist/components/SelectedOutlineUvControls.d.ts +1 -1
- package/dist/components/SettingsModal.d.ts +1 -1
- package/dist/components/SettingsModal.js +30 -7
- package/dist/components/SettingsModalFooter.d.ts +3 -1
- package/dist/components/SettingsModalFooter.js +20 -4
- package/dist/components/ShowPixelGridProvider.d.ts +4 -0
- package/dist/components/ShowPixelGridProvider.js +24 -0
- package/dist/components/SidebarCollapserControls.js +2 -2
- package/dist/components/SkillsSettings.d.ts +2 -0
- package/dist/components/SkillsSettings.js +129 -0
- package/dist/components/StaticFilePreview.js +7 -1
- package/dist/components/StudioSettings.js +7 -48
- package/dist/components/Tabs/index.js +1 -1
- package/dist/components/Timeline/Timeline.js +41 -1
- package/dist/components/Timeline/TimelineAssetField.d.ts +1 -1
- package/dist/components/Timeline/TimelineAssetField.js +15 -9
- package/dist/components/Timeline/TimelineBooleanField.js +1 -4
- package/dist/components/Timeline/TimelineClipboardKeybindings.d.ts +6 -7
- package/dist/components/Timeline/TimelineClipboardKeybindings.js +7 -10
- package/dist/components/Timeline/TimelineDragHandler.js +11 -4
- package/dist/components/Timeline/TimelineEffectItem.d.ts +1 -0
- package/dist/components/Timeline/TimelineEffectItem.js +23 -10
- package/dist/components/Timeline/TimelineEffectPropItem.js +15 -2
- package/dist/components/Timeline/TimelineExpandedRow.js +5 -4
- package/dist/components/Timeline/TimelineFieldLabel.js +4 -2
- package/dist/components/Timeline/TimelineFieldRowContent.d.ts +1 -2
- package/dist/components/Timeline/TimelineFieldRowContent.js +8 -21
- package/dist/components/Timeline/TimelineImageInfo.d.ts +0 -1
- package/dist/components/Timeline/TimelineImageInfo.js +13 -32
- package/dist/components/Timeline/TimelineKeyframeControls.d.ts +1 -2
- package/dist/components/Timeline/TimelineKeyframeControls.js +10 -4
- package/dist/components/Timeline/TimelinePlayCursorSyncer.js +4 -2
- package/dist/components/Timeline/TimelinePrimitiveFieldValue.js +1 -1
- package/dist/components/Timeline/TimelineRotationField.js +0 -2
- package/dist/components/Timeline/TimelineRowChrome.d.ts +0 -1
- package/dist/components/Timeline/TimelineRowChrome.js +3 -4
- package/dist/components/Timeline/TimelineRowLayoutContext.d.ts +0 -1
- package/dist/components/Timeline/TimelineRowLayoutContext.js +1 -4
- package/dist/components/Timeline/TimelineScaleField.js +2 -6
- package/dist/components/Timeline/TimelineSchemaField.js +9 -3
- package/dist/components/Timeline/TimelineSelection.d.ts +29 -66
- package/dist/components/Timeline/TimelineSelection.js +31 -171
- package/dist/components/Timeline/TimelineSequence.d.ts +2 -0
- package/dist/components/Timeline/TimelineSequence.js +110 -19
- package/dist/components/Timeline/TimelineSequenceItem.d.ts +1 -0
- package/dist/components/Timeline/TimelineSequenceItem.js +13 -11
- package/dist/components/Timeline/TimelineSequencePropItem.js +15 -2
- package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.d.ts +7 -6
- package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.js +85 -91
- package/dist/components/Timeline/TimelineTrack.js +1 -1
- package/dist/components/Timeline/TimelineTransformOriginField.js +0 -4
- package/dist/components/Timeline/TimelineTranslateField.js +0 -4
- package/dist/components/Timeline/TimelineVirtualization.js +3 -1
- package/dist/components/Timeline/delete-selected-timeline-item.d.ts +3 -4
- package/dist/components/Timeline/duplicate-selected-timeline-item.d.ts +3 -4
- package/dist/components/Timeline/duplicate-selected-timeline-item.js +3 -12
- package/dist/components/Timeline/find-track-for-node-path-info.d.ts +1 -1
- package/dist/components/Timeline/get-copy-context-for-agents-menu-item.d.ts +4 -0
- package/dist/components/Timeline/get-copy-context-for-agents-menu-item.js +26 -0
- package/dist/components/Timeline/get-sequence-context-menu-items.js +2 -19
- package/dist/components/Timeline/get-timeline-sequence-visible-layout.d.ts +6 -1
- package/dist/components/Timeline/get-timeline-sequence-visible-layout.js +11 -4
- package/dist/components/Timeline/keyframe-clipboard.d.ts +2 -3
- package/dist/components/Timeline/reset-selected-timeline-props.d.ts +2 -3
- package/dist/components/Timeline/sequence-prop-clipboard.d.ts +2 -3
- package/dist/components/Timeline/split-selected-timeline-item.d.ts +2 -3
- package/dist/components/Timeline/split-selected-timeline-item.js +0 -1
- package/dist/components/Timeline/timeline-expanded-filter.d.ts +1 -2
- package/dist/components/Timeline/timeline-field-row-layout.d.ts +1 -1
- package/dist/components/Timeline/timeline-field-row-layout.js +4 -7
- package/dist/components/Timeline/timeline-field-utils.js +0 -2
- package/dist/components/Timeline/timeline-scroll-logic.d.ts +7 -5
- package/dist/components/Timeline/timeline-scroll-logic.js +12 -7
- package/dist/components/Timeline/update-selected-easing.d.ts +7 -7
- package/dist/components/Timeline/use-timeline-asset-drop.js +24 -0
- package/dist/components/Timeline/use-timeline-keyframe-drag.d.ts +6 -7
- package/dist/components/TimelineCombobox.js +25 -160
- package/dist/components/TimelineInOutToggle.js +4 -1
- package/dist/components/canvas-capture-drop.d.ts +4 -0
- package/dist/components/canvas-capture-drop.js +22 -0
- package/dist/components/duplicate-jsx-node-api.d.ts +2 -0
- package/dist/components/duplicate-jsx-node-api.js +12 -0
- package/dist/components/effect-drag-and-drop.js +1 -4
- package/dist/components/handle-drop.d.ts +2 -1
- package/dist/components/handle-drop.js +3 -3
- package/dist/components/import-assets.js +9 -65
- package/dist/components/keyboard-shortcuts.d.ts +10 -0
- package/dist/components/keyboard-shortcuts.js +135 -0
- package/dist/components/selected-outline-control-layout.js +2 -6
- package/dist/components/selected-outline-measurement.d.ts +8 -9
- package/dist/components/selected-outline-measurement.js +16 -3
- package/dist/components/use-delete-asset.d.ts +1 -0
- package/dist/components/use-delete-asset.js +40 -0
- package/dist/components/use-selected-outline-control-target.d.ts +11 -0
- package/dist/components/use-selected-outline-control-target.js +79 -0
- package/dist/esm/{chunk-s6k99gh2.js → chunk-4bxz1d3g.js} +3 -2
- package/dist/esm/{chunk-v5a8vpv4.js → chunk-gzqm3g2m.js} +47432 -40444
- package/dist/esm/index.mjs +3 -0
- package/dist/esm/internals.mjs +47431 -40443
- package/dist/esm/previewEntry.mjs +47169 -40181
- package/dist/esm/renderEntry.mjs +2 -2
- package/dist/helpers/add-asset-cache-bust.d.ts +4 -0
- package/dist/helpers/add-asset-cache-bust.js +10 -0
- package/dist/helpers/calculate-timeline.d.ts +1 -7
- package/dist/helpers/calculate-timeline.js +2 -145
- package/dist/helpers/colors.d.ts +2 -0
- package/dist/helpers/colors.js +6 -2
- package/dist/helpers/drag-aware-double-click.d.ts +6 -0
- package/dist/helpers/drag-aware-double-click.js +20 -0
- package/dist/helpers/editor-ruler.js +6 -5
- package/dist/helpers/get-asset-metadata.d.ts +19 -0
- package/dist/helpers/get-asset-metadata.js +75 -21
- package/dist/helpers/get-connected-compositions.d.ts +1 -6
- package/dist/helpers/get-connected-compositions.js +2 -8
- package/dist/helpers/get-sequence-double-click-action.d.ts +2 -1
- package/dist/helpers/get-sequence-double-click-action.js +7 -1
- package/dist/helpers/get-sequence-visible-range.d.ts +1 -5
- package/dist/helpers/get-sequence-visible-range.js +6 -51
- package/dist/helpers/get-timeline-nestedness.d.ts +1 -2
- package/dist/helpers/get-timeline-nestedness.js +2 -12
- package/dist/helpers/get-timeline-sequence-layout.d.ts +4 -1
- package/dist/helpers/get-timeline-sequence-layout.js +15 -6
- package/dist/helpers/get-timeline-sequence-sort-key.d.ts +2 -21
- package/dist/helpers/get-timeline-sequence-sort-key.js +2 -16
- package/dist/helpers/hoverable.d.ts +1 -0
- package/dist/helpers/hoverable.js +2 -1
- package/dist/helpers/inject-css.js +3 -1
- package/dist/helpers/is-current-selected-still.js +4 -2
- package/dist/helpers/open-in-remotion-convert.d.ts +7 -0
- package/dist/helpers/open-in-remotion-convert.js +18 -0
- package/dist/helpers/sort-by-nonce-history.d.ts +1 -5
- package/dist/helpers/sort-by-nonce-history.js +3 -148
- package/dist/helpers/timeline-node-path-key.d.ts +1 -2
- package/dist/helpers/timeline-node-path-key.js +2 -2
- package/dist/helpers/use-media-metadata.d.ts +2 -1
- package/dist/helpers/use-media-metadata.js +12 -5
- package/dist/helpers/use-menu-structure.js +52 -32
- package/dist/icons/align-center-horizontal.js +1 -1
- package/dist/icons/align-left.js +1 -1
- package/dist/icons/align-right.js +1 -1
- package/dist/icons/keyboard.d.ts +4 -0
- package/dist/icons/keyboard.js +10 -0
- package/dist/icons/license.d.ts +4 -0
- package/dist/icons/license.js +8 -0
- package/dist/icons/package.d.ts +4 -0
- package/dist/icons/package.js +8 -0
- package/dist/icons/react.js +1 -1
- package/dist/icons/remotion-convert.d.ts +4 -0
- package/dist/icons/remotion-convert.js +10 -0
- package/dist/icons/skills.d.ts +4 -0
- package/dist/icons/skills.js +10 -0
- package/dist/state/editor-pixel-grid.d.ts +8 -0
- package/dist/state/editor-pixel-grid.js +18 -0
- package/dist/state/modals.d.ts +6 -5
- package/package.json +14 -12
- package/dist/components/KeyboardShortcutsExplainer.d.ts +0 -2
- package/dist/components/KeyboardShortcutsExplainer.js +0 -194
|
@@ -3,7 +3,7 @@ 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.InspectorQuickAction = exports.InspectorDetailRow = exports.InspectorMessage = exports.InspectorBackAction = exports.InspectorSection = exports.InspectorQuickActionsSection = exports.
|
|
6
|
+
exports.InspectorDefaultPropsWarnings = exports.InspectorQuickAction = exports.InspectorDetailRow = exports.InspectorMessage = exports.InspectorBackAction = exports.InspectorSection = exports.InspectorQuickActionsSection = 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");
|
|
@@ -14,15 +14,11 @@ const ValidationMessage_1 = require("../NewComposition/ValidationMessage");
|
|
|
14
14
|
const styles_1 = require("./styles");
|
|
15
15
|
const InspectorSectionHeader = ({ children }) => jsx_runtime_1.jsx("div", { style: styles_1.sectionHeader, children: children });
|
|
16
16
|
exports.InspectorSectionHeader = InspectorSectionHeader;
|
|
17
|
-
const
|
|
18
|
-
exports.InspectorSectionDivider = InspectorSectionDivider;
|
|
19
|
-
const InspectorQuickActionsSection = ({ 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.inspectorQuickActionsSection, children: children })
|
|
21
|
-
] }));
|
|
17
|
+
const InspectorQuickActionsSection = ({ children }) => jsx_runtime_1.jsx("div", { style: styles_1.inspectorQuickActionsSection, children: children });
|
|
22
18
|
exports.InspectorQuickActionsSection = InspectorQuickActionsSection;
|
|
23
19
|
const InspectorSection = ({ children, header }) => {
|
|
24
20
|
return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
25
|
-
jsx_runtime_1.jsx(exports.
|
|
21
|
+
jsx_runtime_1.jsx(exports.InspectorSectionHeader, { children: header }), children === null ? null : (jsx_runtime_1.jsx("div", { style: styles_1.inspectorSectionBody, children: children }))] }));
|
|
26
22
|
};
|
|
27
23
|
exports.InspectorSection = InspectorSection;
|
|
28
24
|
const backArrowIcon = {
|
|
@@ -90,37 +86,8 @@ const inlineLabelIcon = {
|
|
|
90
86
|
justifyContent: 'center',
|
|
91
87
|
width: 18,
|
|
92
88
|
};
|
|
93
|
-
const
|
|
94
|
-
|
|
95
|
-
gap: 1,
|
|
96
|
-
margin: `0 ${INLINE_LABEL_BUTTON_MARGIN}px`,
|
|
97
|
-
width: `calc(100% - ${INLINE_LABEL_BUTTON_MARGIN * 2}px)`,
|
|
98
|
-
};
|
|
99
|
-
const segmentedMainAction = {
|
|
100
|
-
borderRadius: '4px 0 0 4px',
|
|
101
|
-
flex: 1,
|
|
102
|
-
margin: 0,
|
|
103
|
-
minWidth: 0,
|
|
104
|
-
width: 'auto',
|
|
105
|
-
};
|
|
106
|
-
const segmentedTrailingAction = {
|
|
107
|
-
alignItems: 'center',
|
|
108
|
-
appearance: 'none',
|
|
109
|
-
border: 'none',
|
|
110
|
-
borderRadius: '0 4px 4px 0',
|
|
111
|
-
display: 'flex',
|
|
112
|
-
flex: '0 0 28px',
|
|
113
|
-
justifyContent: 'center',
|
|
114
|
-
margin: 0,
|
|
115
|
-
padding: 0,
|
|
116
|
-
width: 28,
|
|
117
|
-
};
|
|
118
|
-
const InspectorQuickAction = ({ children, disabled, iconContainerStyle, onClick, renderIcon, size = 'default', style, title, variant = { type: 'single' }, }) => {
|
|
119
|
-
const isSegmented = variant.type === 'segmented';
|
|
120
|
-
// A non-clickable single action (onClick === null) never shows a hover
|
|
121
|
-
// effect. In the segmented variant, the main segment highlights whenever
|
|
122
|
-
// the group is hovered, even if it is not clickable itself.
|
|
123
|
-
const showsHover = !disabled && (onClick !== null || isSegmented);
|
|
89
|
+
const InspectorQuickAction = ({ children, disabled, iconContainerStyle, onClick, renderIcon, size = 'default', style, title, }) => {
|
|
90
|
+
const showsHover = !disabled && onClick !== null;
|
|
124
91
|
const buttonStyle = react_1.default.useMemo(() => ({
|
|
125
92
|
...(disabled ? inlineLabelButtonDisabled : inlineLabelButton),
|
|
126
93
|
...(0, hoverable_1.hoverableStyle)({
|
|
@@ -132,31 +99,11 @@ const InspectorQuickAction = ({ children, disabled, iconContainerStyle, onClick,
|
|
|
132
99
|
hoverColor: showsHover ? colors_1.WHITE : colors_1.LIGHT_TEXT,
|
|
133
100
|
}),
|
|
134
101
|
...(size === 'compact' ? compactInlineLabelButton : null),
|
|
135
|
-
...(isSegmented ? segmentedMainAction : null),
|
|
136
102
|
...style,
|
|
137
|
-
}), [disabled, showsHover,
|
|
103
|
+
}), [disabled, showsHover, size, style]);
|
|
138
104
|
const mainContent = (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [renderIcon ? (jsx_runtime_1.jsx("span", { style: { ...inlineLabelIcon, ...iconContainerStyle }, children: renderIcon(colors_1.CURRENT_COLOR) })) : null, jsx_runtime_1.jsx("span", { style: inlineLabelText, children: children })
|
|
139
105
|
] }));
|
|
140
106
|
const mainAction = onClick ? (jsx_runtime_1.jsx("button", { className: `__remotion-inspector-quick-action ${hoverable_1.HOVERABLE_CLASS_NAME}`, type: "button", disabled: disabled, style: buttonStyle, title: title, onClick: onClick, children: mainContent })) : (jsx_runtime_1.jsx("div", { className: hoverable_1.HOVERABLE_CLASS_NAME, style: buttonStyle, title: title, children: mainContent }));
|
|
141
|
-
if (variant.type === 'segmented') {
|
|
142
|
-
const trailingStyle = {
|
|
143
|
-
...segmentedTrailingAction,
|
|
144
|
-
...(0, hoverable_1.hoverableStyle)({
|
|
145
|
-
idleBackground: colors_1.TRANSPARENT,
|
|
146
|
-
hoverBackground: variant.trailing.disabled
|
|
147
|
-
? colors_1.TRANSPARENT
|
|
148
|
-
: (0, colors_1.getBackgroundFromHoverState)({ hovered: true, selected: false }),
|
|
149
|
-
idleColor: colors_1.LIGHT_TEXT,
|
|
150
|
-
hoverColor: variant.trailing.disabled ? colors_1.LIGHT_TEXT : colors_1.WHITE,
|
|
151
|
-
}),
|
|
152
|
-
height: size === 'compact'
|
|
153
|
-
? layout_1.COMPACT_INLINE_ROW_HEIGHT
|
|
154
|
-
: layout_1.COMPACT_CONTROL_ROW_HEIGHT,
|
|
155
|
-
opacity: variant.trailing.disabled ? 0.35 : 1,
|
|
156
|
-
};
|
|
157
|
-
return (jsx_runtime_1.jsxs("div", { className: hoverable_1.HOVER_GROUP_CLASS_NAME, style: segmentedInlineAction, children: [mainAction, jsx_runtime_1.jsx("button", { type: "button", className: hoverable_1.HOVERABLE_CLASS_NAME, disabled: variant.trailing.disabled, style: trailingStyle, title: variant.trailing.title, onClick: variant.trailing.onClick, children: jsx_runtime_1.jsx("span", { className: hoverable_1.HOVER_GROUP_REVEAL_CLASS_NAME, style: inlineLabelIcon, children: variant.trailing.renderIcon(colors_1.CURRENT_COLOR) }) })
|
|
158
|
-
] }));
|
|
159
|
-
}
|
|
160
107
|
return mainAction;
|
|
161
108
|
};
|
|
162
109
|
exports.InspectorQuickAction = InspectorQuickAction;
|
|
@@ -2,9 +2,9 @@ import { type TimelineSelection } from '../Timeline/TimelineSelection';
|
|
|
2
2
|
export type SequenceSectionSelection = Extract<TimelineSelection, {
|
|
3
3
|
type: 'sequence' | 'sequence-prop' | 'sequence-all-effects' | 'sequence-effect' | 'sequence-effect-prop';
|
|
4
4
|
}>;
|
|
5
|
-
export declare const isSequenceSectionSelection: (selection:
|
|
5
|
+
export declare const isSequenceSectionSelection: (selection: import("@remotion/canvas").CanvasSelectionItem) => selection is SequenceSectionSelection;
|
|
6
6
|
type SameSequenceInspectorSelection = Extract<TimelineSelection, {
|
|
7
7
|
type: 'sequence-prop' | 'sequence-effect' | 'sequence-effect-prop';
|
|
8
8
|
}>;
|
|
9
|
-
export declare const getSameSequenceInspectorSelection: (selections: readonly
|
|
9
|
+
export declare const getSameSequenceInspectorSelection: (selections: readonly import("@remotion/canvas").CanvasSelectionItem[]) => SameSequenceInspectorSelection | null;
|
|
10
10
|
export {};
|
|
@@ -4,7 +4,6 @@ export declare const scrollableContainer: React.CSSProperties;
|
|
|
4
4
|
export declare const compositionDefaultPropsSection: React.CSSProperties;
|
|
5
5
|
export declare const compositionVisualControlsSection: React.CSSProperties;
|
|
6
6
|
export declare const inspectorOverviewSection: React.CSSProperties;
|
|
7
|
-
export declare const inspectorSectionDivider: React.CSSProperties;
|
|
8
7
|
export declare const sequenceHeaderDivider: React.CSSProperties;
|
|
9
8
|
export declare const sectionHeader: React.CSSProperties;
|
|
10
9
|
export declare const inspectorSectionBody: React.CSSProperties;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.keyframeEditorValue = exports.keyframeEditorRow = exports.detailValue = exports.detailLabel = exports.detailRow = exports.guideDetailsContainer = exports.detailsBeforeInlineAction = exports.inspectorQuickActionsSection = 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.
|
|
3
|
+
exports.keyframeEditorValue = exports.keyframeEditorRow = exports.detailValue = exports.detailLabel = exports.detailRow = exports.guideDetailsContainer = exports.detailsBeforeInlineAction = exports.inspectorQuickActionsSection = 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.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
|
+
const layout_1 = require("../layout");
|
|
6
7
|
exports.container = {
|
|
7
8
|
backgroundColor: colors_1.BACKGROUND,
|
|
8
9
|
color: colors_1.WHITE,
|
|
@@ -29,9 +30,6 @@ exports.inspectorOverviewSection = {
|
|
|
29
30
|
display: 'flex',
|
|
30
31
|
flexDirection: 'column',
|
|
31
32
|
};
|
|
32
|
-
exports.inspectorSectionDivider = {
|
|
33
|
-
borderBottom: `1px solid ${colors_1.LINE_COLOR}`,
|
|
34
|
-
};
|
|
35
33
|
exports.sequenceHeaderDivider = {
|
|
36
34
|
backgroundColor: colors_1.LINE_COLOR,
|
|
37
35
|
flexShrink: 0,
|
|
@@ -161,6 +159,7 @@ exports.detailRow = {
|
|
|
161
159
|
display: 'flex',
|
|
162
160
|
gap: 12,
|
|
163
161
|
justifyContent: 'space-between',
|
|
162
|
+
minHeight: layout_1.COMPACT_CONTROL_ROW_HEIGHT,
|
|
164
163
|
};
|
|
165
164
|
exports.detailLabel = {
|
|
166
165
|
color: colors_1.LIGHT_TEXT,
|
|
@@ -82,7 +82,6 @@ const useCompositionActions = () => {
|
|
|
82
82
|
? await browserStudioOperations.insertSolid(request)
|
|
83
83
|
: await (0, call_api_1.callApi)('/api/insert-jsx-element', request);
|
|
84
84
|
if (result.success) {
|
|
85
|
-
(0, NotificationCenter_1.showNotification)('Added <Solid> to source file', 2000);
|
|
86
85
|
return;
|
|
87
86
|
}
|
|
88
87
|
(0, NotificationCenter_1.showNotification)(result.reason, 4000);
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const useTrackForSelection: (selection: TimelineSelection) => import("../../helpers/get-timeline-sequence-sort-key").TimelineTrackData | null;
|
|
1
|
+
export declare const useTrackForSelection: (selection: import("@remotion/canvas").CanvasSelectionItem) => import("@remotion/canvas").TimelineTrackData | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const INSPECTOR_PANEL_HORIZONTAL_PADDING =
|
|
1
|
+
export declare const INSPECTOR_PANEL_HORIZONTAL_PADDING = 10;
|
|
@@ -3,11 +3,10 @@ import { type TSequence } from 'remotion';
|
|
|
3
3
|
import type { CodePosition } from '../error-overlay/react-overlay/utils/get-source-map';
|
|
4
4
|
import type { SequenceNodePathInfo } from '../helpers/get-timeline-sequence-sort-key';
|
|
5
5
|
import { type FlatTreeRow } from '../helpers/timeline-layout';
|
|
6
|
-
import { type TimelineSelection } from './Timeline/TimelineSelection';
|
|
7
6
|
type SequenceWithControls = TSequence & {
|
|
8
7
|
readonly controls: NonNullable<TSequence['controls']>;
|
|
9
8
|
};
|
|
10
|
-
export declare const getInspectorSelectableItems: (rows: readonly FlatTreeRow[]) =>
|
|
9
|
+
export declare const getInspectorSelectableItems: (rows: readonly FlatTreeRow[]) => import("@remotion/canvas").CanvasSelectionItem[];
|
|
11
10
|
export declare const hasSequenceControls: (sequence: TSequence) => sequence is SequenceWithControls;
|
|
12
11
|
export declare const InspectorSequenceSection: React.FC<{
|
|
13
12
|
readonly sequence: SequenceWithControls;
|
|
@@ -18,9 +18,9 @@ const transform_3d_mode_1 = require("../state/transform-3d-mode");
|
|
|
18
18
|
const AssetFileIcon_1 = require("./AssetFileIcon");
|
|
19
19
|
const InlineAction_1 = require("./InlineAction");
|
|
20
20
|
const InlineCaptionInspector_1 = require("./InlineCaptionInspector");
|
|
21
|
+
const CollapsibleInspectorSectionHeader_1 = require("./InspectorPanel/CollapsibleInspectorSectionHeader");
|
|
21
22
|
const common_1 = require("./InspectorPanel/common");
|
|
22
23
|
const inspector_section_collapse_1 = require("./InspectorPanel/inspector-section-collapse");
|
|
23
|
-
const styles_1 = require("./InspectorPanel/styles");
|
|
24
24
|
const asset_search_1 = require("./QuickSwitcher/asset-search");
|
|
25
25
|
const border_radius_representation_1 = require("./Timeline/border-radius-representation");
|
|
26
26
|
const save_sequence_prop_1 = require("./Timeline/save-sequence-prop");
|
|
@@ -47,10 +47,6 @@ const emptyState = {
|
|
|
47
47
|
lineHeight: 1.4,
|
|
48
48
|
padding: '0 12px',
|
|
49
49
|
};
|
|
50
|
-
const effectsHeaderTitle = {
|
|
51
|
-
...styles_1.sectionHeaderTitle,
|
|
52
|
-
flexShrink: 1,
|
|
53
|
-
};
|
|
54
50
|
const plusIcon = {
|
|
55
51
|
width: 15,
|
|
56
52
|
height: 15,
|
|
@@ -65,38 +61,6 @@ const transform3DToggleIcon = {
|
|
|
65
61
|
height: 14,
|
|
66
62
|
width: 14,
|
|
67
63
|
};
|
|
68
|
-
const collapsibleSectionHeaderButton = {
|
|
69
|
-
appearance: 'none',
|
|
70
|
-
backgroundColor: 'transparent',
|
|
71
|
-
border: 'none',
|
|
72
|
-
borderRadius: 3,
|
|
73
|
-
cursor: 'default',
|
|
74
|
-
display: 'block',
|
|
75
|
-
flex: 1,
|
|
76
|
-
fontFamily: 'Arial, Helvetica, sans-serif',
|
|
77
|
-
fontSize: 12,
|
|
78
|
-
fontWeight: 'bold',
|
|
79
|
-
lineHeight: '16px',
|
|
80
|
-
margin: 0,
|
|
81
|
-
minWidth: 0,
|
|
82
|
-
overflow: 'hidden',
|
|
83
|
-
padding: '4px 0',
|
|
84
|
-
textAlign: 'left',
|
|
85
|
-
textOverflow: 'ellipsis',
|
|
86
|
-
userSelect: 'none',
|
|
87
|
-
whiteSpace: 'nowrap',
|
|
88
|
-
};
|
|
89
|
-
const CollapsibleInspectorSectionHeader = ({ action, expanded, label, onToggle }) => {
|
|
90
|
-
const [hovered, setHovered] = (0, react_1.useState)(false);
|
|
91
|
-
const style = (0, react_1.useMemo)(() => {
|
|
92
|
-
return {
|
|
93
|
-
...collapsibleSectionHeaderButton,
|
|
94
|
-
color: hovered ? colors_1.WHITE : colors_1.LIGHT_TEXT,
|
|
95
|
-
};
|
|
96
|
-
}, [hovered]);
|
|
97
|
-
return (jsx_runtime_1.jsxs("div", { style: styles_1.sectionHeaderRow, children: [
|
|
98
|
-
jsx_runtime_1.jsx("button", { type: "button", "aria-expanded": expanded, "aria-label": `${expanded ? 'Collapse' : 'Expand'} ${label}`, className: "__remotion-inspector-section-title", onClick: onToggle, onPointerEnter: () => setHovered(true), onPointerLeave: () => setHovered(false), style: style, children: label }), action] }));
|
|
99
|
-
};
|
|
100
64
|
const assetSelectorIcon = {
|
|
101
65
|
flexShrink: 0,
|
|
102
66
|
height: 18,
|
|
@@ -209,12 +173,12 @@ const persistInspectorSectionExpansionOverrides = (overrides) => {
|
|
|
209
173
|
// Ignore quota errors or disabled storage.
|
|
210
174
|
}
|
|
211
175
|
};
|
|
212
|
-
const getInspectorSectionExpansionKey = ({ nodePathInfo,
|
|
176
|
+
const getInspectorSectionExpansionKey = ({ nodePathInfo, sectionId, }) => {
|
|
213
177
|
return JSON.stringify([
|
|
214
178
|
nodePathInfo.sequenceSubscriptionKey.absolutePath,
|
|
215
179
|
nodePathInfo.sequenceSubscriptionKey.nodePath,
|
|
216
180
|
nodePathInfo.index,
|
|
217
|
-
|
|
181
|
+
sectionId,
|
|
218
182
|
]);
|
|
219
183
|
};
|
|
220
184
|
const getInspectorControlGroups = (rows) => {
|
|
@@ -375,7 +339,7 @@ const InspectorSequenceSection = ({ sequence, readOnlyStudio, validatedLocation,
|
|
|
375
339
|
}
|
|
376
340
|
const expansionKey = getInspectorSectionExpansionKey({
|
|
377
341
|
nodePathInfo,
|
|
378
|
-
|
|
342
|
+
sectionId: group.id,
|
|
379
343
|
});
|
|
380
344
|
const activity = getControlGroupActivity(group);
|
|
381
345
|
if (activity === 'active' && next[expansionKey] !== true) {
|
|
@@ -392,17 +356,17 @@ const InspectorSequenceSection = ({ sequence, readOnlyStudio, validatedLocation,
|
|
|
392
356
|
});
|
|
393
357
|
}, [controlGroups, getControlGroupActivity, nodePathInfo]);
|
|
394
358
|
const isControlGroupExpanded = (0, react_1.useCallback)((group) => {
|
|
395
|
-
if (!(0, inspector_section_collapse_1.isSmartCollapsibleInspectorGroup)(group.id)) {
|
|
396
|
-
return true;
|
|
397
|
-
}
|
|
398
359
|
const expansionKey = getInspectorSectionExpansionKey({
|
|
399
360
|
nodePathInfo,
|
|
400
|
-
|
|
361
|
+
sectionId: group.id,
|
|
401
362
|
});
|
|
402
363
|
const override = sectionExpansionOverrides[expansionKey];
|
|
403
364
|
if (override !== undefined) {
|
|
404
365
|
return override;
|
|
405
366
|
}
|
|
367
|
+
if (!(0, inspector_section_collapse_1.isSmartCollapsibleInspectorGroup)(group.id)) {
|
|
368
|
+
return true;
|
|
369
|
+
}
|
|
406
370
|
const automaticExpansion = automaticSectionExpansion[expansionKey];
|
|
407
371
|
if (automaticExpansion !== undefined) {
|
|
408
372
|
return automaticExpansion;
|
|
@@ -417,7 +381,7 @@ const InspectorSequenceSection = ({ sequence, readOnlyStudio, validatedLocation,
|
|
|
417
381
|
const toggleControlGroup = (0, react_1.useCallback)((group) => {
|
|
418
382
|
const expansionKey = getInspectorSectionExpansionKey({
|
|
419
383
|
nodePathInfo,
|
|
420
|
-
|
|
384
|
+
sectionId: group.id,
|
|
421
385
|
});
|
|
422
386
|
const nextExpanded = !isControlGroupExpanded(group);
|
|
423
387
|
setSectionExpansionOverrides((previous) => {
|
|
@@ -426,6 +390,28 @@ const InspectorSequenceSection = ({ sequence, readOnlyStudio, validatedLocation,
|
|
|
426
390
|
return next;
|
|
427
391
|
});
|
|
428
392
|
}, [isControlGroupExpanded, nodePathInfo]);
|
|
393
|
+
const isAdditionalSectionExpanded = (0, react_1.useCallback)((sectionId) => {
|
|
394
|
+
var _a;
|
|
395
|
+
const expansionKey = getInspectorSectionExpansionKey({
|
|
396
|
+
nodePathInfo,
|
|
397
|
+
sectionId,
|
|
398
|
+
});
|
|
399
|
+
return (_a = sectionExpansionOverrides[expansionKey]) !== null && _a !== void 0 ? _a : true;
|
|
400
|
+
}, [nodePathInfo, sectionExpansionOverrides]);
|
|
401
|
+
const toggleAdditionalSection = (0, react_1.useCallback)((sectionId) => {
|
|
402
|
+
const expansionKey = getInspectorSectionExpansionKey({
|
|
403
|
+
nodePathInfo,
|
|
404
|
+
sectionId,
|
|
405
|
+
});
|
|
406
|
+
const nextExpanded = !isAdditionalSectionExpanded(sectionId);
|
|
407
|
+
setSectionExpansionOverrides((previous) => {
|
|
408
|
+
const next = { ...previous, [expansionKey]: nextExpanded };
|
|
409
|
+
persistInspectorSectionExpansionOverrides(next);
|
|
410
|
+
return next;
|
|
411
|
+
});
|
|
412
|
+
}, [isAdditionalSectionExpanded, nodePathInfo]);
|
|
413
|
+
const captionsExpanded = isAdditionalSectionExpanded('captions');
|
|
414
|
+
const effectsExpanded = isAdditionalSectionExpanded('effects');
|
|
429
415
|
const visibleControlRows = controlGroups.flatMap((group) => {
|
|
430
416
|
return isControlGroupExpanded(group) ? group.rows : [];
|
|
431
417
|
});
|
|
@@ -509,26 +495,26 @@ const InspectorSequenceSection = ({ sequence, readOnlyStudio, validatedLocation,
|
|
|
509
495
|
: show3DTransformControls
|
|
510
496
|
? 'Hide 3D transform controls'
|
|
511
497
|
: 'Show 3D transform controls', hoveredColor: show3DTransformControls ? colors_1.BLUE : undefined, unhoveredColor: show3DTransformControls ? colors_1.BLUE : colors_1.LIGHT_TEXT, renderAction: (color) => (jsx_runtime_1.jsx(cube_1.CubeIcon, { color: color, style: transform3DToggleIcon })) }));
|
|
512
|
-
const effectsHeader = (jsx_runtime_1.
|
|
513
|
-
jsx_runtime_1.jsx("div", { style: effectsHeaderTitle, children: "Effects" }), jsx_runtime_1.jsx(InlineAction_1.InlineAction, { variant: null, disabled: !canAddEffect, onClick: onAddEffect, title: canAddEffect ? 'Add effect' : undefined, renderAction: (color) => jsx_runtime_1.jsx(plus_1.Plus, { color: color, style: plusIcon }) })] }));
|
|
498
|
+
const effectsHeader = (jsx_runtime_1.jsx(CollapsibleInspectorSectionHeader_1.CollapsibleInspectorSectionHeader, { action: jsx_runtime_1.jsx(InlineAction_1.InlineAction, { variant: null, disabled: !canAddEffect, onClick: onAddEffect, title: canAddEffect ? 'Add effect' : undefined, renderAction: (color) => jsx_runtime_1.jsx(plus_1.Plus, { color: color, style: plusIcon }) }), expanded: effectsExpanded, label: "Effects", onToggle: () => toggleAdditionalSection('effects') }));
|
|
514
499
|
const renderRow = ({ node, depth }) => {
|
|
515
500
|
return (jsx_runtime_1.jsx(TimelineRowLayoutContext_1.TimelineRowLayoutContext.Provider, { value: TimelineRowLayoutContext_1.INSPECTOR_TIMELINE_ROW_LAYOUT, children: jsx_runtime_1.jsx(TimelineExpandedRow_1.TimelineExpandedRow, { node: node, depth: depth, nestedDepth: 0, rowDepthBase: 0, getIsExpanded: getIsExpanded, toggleTrack: toggleTrack, validatedLocation: validatedLocation, nodePath: nodePathInfo.sequenceSubscriptionKey, schema: schema, keyframeDisplayOffset: keyframeDisplayOffset, keyframeControlsMode: "inspector" }) }, JSON.stringify(node.nodePathInfo)));
|
|
516
501
|
};
|
|
517
502
|
const renderControlGroupHeader = (group) => {
|
|
518
|
-
const collapsible = (0, inspector_section_collapse_1.isSmartCollapsibleInspectorGroup)(group.id);
|
|
519
503
|
const expanded = isControlGroupExpanded(group);
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
504
|
+
return (jsx_runtime_1.jsx(CollapsibleInspectorSectionHeader_1.CollapsibleInspectorSectionHeader, { action: expanded
|
|
505
|
+
? group.id === 'border-radius'
|
|
506
|
+
? borderRadiusAction
|
|
507
|
+
: group.id === 'transforms'
|
|
508
|
+
? transform3DAction
|
|
509
|
+
: null
|
|
510
|
+
: null, expanded: expanded, label: group.label, onToggle: () => toggleControlGroup(group) }));
|
|
525
511
|
};
|
|
526
512
|
if (controlRows.length === 0 &&
|
|
527
513
|
!showEffectsSection &&
|
|
528
514
|
inlineCaptions === null) {
|
|
529
515
|
return (jsx_runtime_1.jsx("div", { style: container, children: jsx_runtime_1.jsx(common_1.InspectorSection, { header: "Controls", children: jsx_runtime_1.jsx("div", { style: emptyState, children: "No schema" }) }) }));
|
|
530
516
|
}
|
|
531
|
-
return (jsx_runtime_1.jsx(TimelineAssetField_1.AssetSelectionContext.Provider, { value: assetSelectionContextValue, children: jsx_runtime_1.jsxs("div", { style: container, children: [controlRows.length > 0 ? (jsx_runtime_1.jsx(TimelineSelection_1.TimelineSelectionOrderProvider, { items: controlSelectableItems, children: controlGroupsWithoutLayout.map((group) => (jsx_runtime_1.jsx(common_1.InspectorSection, { header: renderControlGroupHeader(group), children: isControlGroupExpanded(group) ? (group.id === 'transforms' ? (jsx_runtime_1.jsxs(Transform3DModeContext_1.Transform3DModeContext.Provider, { value: show3DTransformControls, children: [renderTransformControls(), group.rows.map(renderRow)] })) : (group.rows.map(renderRow))) : null }, group.id))) })) : null, inlineCaptions ? (jsx_runtime_1.jsx(InlineCaptionInspector_1.InlineCaptionInspector, { captions: inlineCaptions, controls: sequence.controls, nodePath: nodePathInfo.sequenceSubscriptionKey, readOnlyStudio: readOnlyStudio, validatedLocation: validatedLocation })) : null, showEffectsSection ? (jsx_runtime_1.jsx(common_1.InspectorSection, { header: effectsHeader, children: effectRows.length > 0 ? (jsx_runtime_1.jsx(TimelineSelection_1.TimelineSelectionOrderProvider, { items: effectSelectableItems, children: effectRows.map(renderRow) })) : null })) : null, layoutGroup ? (jsx_runtime_1.jsx(TimelineSelection_1.TimelineSelectionOrderProvider, { items: controlSelectableItems, children: jsx_runtime_1.jsx(common_1.InspectorSection, { header: renderControlGroupHeader(layoutGroup), children: isControlGroupExpanded(layoutGroup)
|
|
517
|
+
return (jsx_runtime_1.jsx(TimelineAssetField_1.AssetSelectionContext.Provider, { value: assetSelectionContextValue, children: jsx_runtime_1.jsxs("div", { style: container, children: [controlRows.length > 0 ? (jsx_runtime_1.jsx(TimelineSelection_1.TimelineSelectionOrderProvider, { items: controlSelectableItems, children: controlGroupsWithoutLayout.map((group) => (jsx_runtime_1.jsx(common_1.InspectorSection, { header: renderControlGroupHeader(group), children: isControlGroupExpanded(group) ? (group.id === 'transforms' ? (jsx_runtime_1.jsxs(Transform3DModeContext_1.Transform3DModeContext.Provider, { value: show3DTransformControls, children: [renderTransformControls(), group.rows.map(renderRow)] })) : (group.rows.map(renderRow))) : null }, group.id))) })) : null, inlineCaptions ? (jsx_runtime_1.jsx(InlineCaptionInspector_1.InlineCaptionInspector, { captions: inlineCaptions, controls: sequence.controls, expanded: captionsExpanded, nodePath: nodePathInfo.sequenceSubscriptionKey, onToggle: () => toggleAdditionalSection('captions'), readOnlyStudio: readOnlyStudio, validatedLocation: validatedLocation })) : null, showEffectsSection ? (jsx_runtime_1.jsx(common_1.InspectorSection, { header: effectsHeader, children: effectsExpanded && effectRows.length > 0 ? (jsx_runtime_1.jsx(TimelineSelection_1.TimelineSelectionOrderProvider, { items: effectSelectableItems, children: effectRows.map(renderRow) })) : null })) : null, layoutGroup ? (jsx_runtime_1.jsx(TimelineSelection_1.TimelineSelectionOrderProvider, { items: controlSelectableItems, children: jsx_runtime_1.jsx(common_1.InspectorSection, { header: renderControlGroupHeader(layoutGroup), children: isControlGroupExpanded(layoutGroup)
|
|
532
518
|
? layoutGroup.rows.map(renderRow)
|
|
533
519
|
: null }) })) : null] }) }));
|
|
534
520
|
};
|
|
@@ -82,7 +82,7 @@ const InspectorSourceLocation = ({ location, canOpen, onOpen, renderIcon, size =
|
|
|
82
82
|
return null;
|
|
83
83
|
}
|
|
84
84
|
if (size === 'quick-action') {
|
|
85
|
-
return (jsx_runtime_1.jsx(common_1.InspectorQuickAction, { disabled: !canOpen, onClick: onClick, renderIcon: (iconColor) => renderIcon === null || renderIcon === void 0 ? void 0 : renderIcon(iconColor),
|
|
85
|
+
return (jsx_runtime_1.jsx(common_1.InspectorQuickAction, { disabled: !canOpen, onClick: onClick, renderIcon: (iconColor) => renderIcon === null || renderIcon === void 0 ? void 0 : renderIcon(iconColor), title: fileLocation !== null && fileLocation !== void 0 ? fileLocation : undefined, children: label }));
|
|
86
86
|
}
|
|
87
87
|
return (jsx_runtime_1.jsxs("button", { type: "button", style: style, title: fileLocation !== null && fileLocation !== void 0 ? fileLocation : undefined, onClick: onClick, onPointerEnter: () => setHovered(true), onPointerLeave: () => setHovered(false), children: [renderIcon ? renderIcon(color) : null, jsx_runtime_1.jsx("span", { style: sourceLocationLabelStyle, children: label })
|
|
88
88
|
] }));
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { PackageManager } from '@remotion/studio-shared';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
export declare const
|
|
3
|
+
export declare const InstallPackageSettings: React.FC<{
|
|
4
|
+
readonly footerContainer: HTMLElement | null;
|
|
4
5
|
readonly packageManager: PackageManager | null;
|
|
5
6
|
}>;
|
|
@@ -32,11 +32,15 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
32
32
|
return result;
|
|
33
33
|
};
|
|
34
34
|
})();
|
|
35
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
36
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
|
+
};
|
|
35
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.
|
|
39
|
+
exports.InstallPackageSettings = void 0;
|
|
37
40
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
38
41
|
const studio_shared_1 = require("@remotion/studio-shared");
|
|
39
42
|
const react_1 = __importStar(require("react"));
|
|
43
|
+
const react_dom_1 = __importDefault(require("react-dom"));
|
|
40
44
|
const remotion_1 = require("remotion");
|
|
41
45
|
const install_package_1 = require("../api/install-package");
|
|
42
46
|
const restart_studio_1 = require("../api/restart-studio");
|
|
@@ -51,17 +55,40 @@ const layout_1 = require("./layout");
|
|
|
51
55
|
const is_menu_item_1 = require("./Menu/is-menu-item");
|
|
52
56
|
const ModalButton_1 = require("./ModalButton");
|
|
53
57
|
const ModalFooter_1 = require("./ModalFooter");
|
|
54
|
-
const ModalHeader_1 = require("./ModalHeader");
|
|
55
|
-
const DismissableModal_1 = require("./NewComposition/DismissableModal");
|
|
56
58
|
const container = {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
+
boxSizing: 'border-box',
|
|
60
|
+
flex: 1,
|
|
61
|
+
fontFamily: 'sans-serif',
|
|
62
|
+
minHeight: 0,
|
|
59
63
|
overflowY: 'auto',
|
|
64
|
+
padding: '16px 16px 0',
|
|
65
|
+
};
|
|
66
|
+
const settingsContainer = {
|
|
67
|
+
display: 'flex',
|
|
68
|
+
flex: 1,
|
|
69
|
+
flexDirection: 'column',
|
|
70
|
+
minHeight: 0,
|
|
71
|
+
minWidth: 0,
|
|
60
72
|
};
|
|
61
73
|
const text = {
|
|
62
74
|
fontSize: 14,
|
|
63
75
|
};
|
|
64
|
-
const
|
|
76
|
+
const footer = {
|
|
77
|
+
flex: 'none',
|
|
78
|
+
};
|
|
79
|
+
const packageRow = {
|
|
80
|
+
alignItems: 'center',
|
|
81
|
+
borderBottom: colors_1.BORDER_WHITE_ALPHA_12,
|
|
82
|
+
display: 'flex',
|
|
83
|
+
gap: 10,
|
|
84
|
+
minHeight: 52,
|
|
85
|
+
padding: '4px 0',
|
|
86
|
+
};
|
|
87
|
+
const lastPackageRow = {
|
|
88
|
+
...packageRow,
|
|
89
|
+
borderBottom: 'none',
|
|
90
|
+
};
|
|
91
|
+
const InstallPackageSettings = ({ footerContainer, packageManager }) => {
|
|
65
92
|
const [state, setState] = react_1.default.useState({ type: 'idle' });
|
|
66
93
|
const [map, setMap] = react_1.default.useState({});
|
|
67
94
|
const { previewServerState: ctx } = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx);
|
|
@@ -128,14 +155,14 @@ const InstallPackageModal = ({ packageManager }) => {
|
|
|
128
155
|
enter.unregister();
|
|
129
156
|
};
|
|
130
157
|
}, [disabled, onClick, registerKeybinding]);
|
|
131
|
-
|
|
132
|
-
|
|
158
|
+
const installablePackages = Object.entries(studio_shared_1.installableMap).filter(([, install]) => install);
|
|
159
|
+
const packageCount = installablePackages.length + studio_shared_1.extraPackages.length;
|
|
160
|
+
return (jsx_runtime_1.jsxs("div", { style: settingsContainer, children: [
|
|
161
|
+
jsx_runtime_1.jsx("div", { style: container, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, children: state.type === 'done' ? (jsx_runtime_1.jsxs("div", { style: text, children: ["Installed package", selectedPackages.length === 1 ? '' : 's', ' ', "successfully.", packageManager === null
|
|
133
162
|
? null
|
|
134
163
|
: ' Restart the server to complete.'] })) : state.type === 'restarting' ? (jsx_runtime_1.jsx("div", { style: text, children: "Restarting the Studio server..." })) : state.type === 'installing' ? (jsx_runtime_1.jsxs("div", { style: text, children: ["Installing package", selectedPackages.length === 1 ? '' : 's', packageManager === null
|
|
135
164
|
? '.'
|
|
136
|
-
: '. Check your terminal for progress.'] })) : (jsx_runtime_1.jsxs("div", { style: text, children: [
|
|
137
|
-
.filter(([, install]) => install)
|
|
138
|
-
.map(([pkgShort]) => {
|
|
165
|
+
: '. Check your terminal for progress.'] })) : (jsx_runtime_1.jsxs("div", { style: text, role: "list", "aria-label": "Remotion packages", children: [installablePackages.map(([pkgShort], index) => {
|
|
139
166
|
var _a;
|
|
140
167
|
var _b;
|
|
141
168
|
const pkg = pkgShort === 'core' ? 'remotion' : `@remotion/${pkgShort}`;
|
|
@@ -148,35 +175,38 @@ const InstallPackageModal = ({ packageManager }) => {
|
|
|
148
175
|
if (!description) {
|
|
149
176
|
throw new Error('No description for ' + pkg);
|
|
150
177
|
}
|
|
151
|
-
return (jsx_runtime_1.jsxs(layout_1.Row, { align: "center", children: [
|
|
178
|
+
return (jsx_runtime_1.jsxs(layout_1.Row, { align: "center", role: "listitem", style: index === packageCount - 1 ? lastPackageRow : packageRow, children: [
|
|
152
179
|
jsx_runtime_1.jsx(Checkbox_1.Checkbox, { checked: map[pkg], name: pkg, onChange: () => {
|
|
153
180
|
setMap((prev) => ({ ...prev, [pkg]: !prev[pkg] }));
|
|
154
|
-
}, disabled: !canSelectPackages || isInstalled }), jsx_runtime_1.jsx(
|
|
181
|
+
}, disabled: !canSelectPackages || isInstalled }), jsx_runtime_1.jsx(InstallablePackage_1.InstallablePackageComp, { description: description, isInstalled: isInstalled, link: link, pkg: pkg })
|
|
155
182
|
] }, pkg));
|
|
156
|
-
}), studio_shared_1.extraPackages.map((extraPkg) => {
|
|
183
|
+
}), studio_shared_1.extraPackages.map((extraPkg, index) => {
|
|
157
184
|
var _a;
|
|
158
185
|
var _b;
|
|
159
186
|
const isInstalled = (_b = (_a = window.remotion_installedPackages) === null || _a === void 0 ? void 0 : _a.includes(extraPkg.name)) !== null && _b !== void 0 ? _b : false;
|
|
160
|
-
return (jsx_runtime_1.jsxs(layout_1.Row, { align: "center",
|
|
187
|
+
return (jsx_runtime_1.jsxs(layout_1.Row, { align: "center", role: "listitem", style: installablePackages.length + index === packageCount - 1
|
|
188
|
+
? lastPackageRow
|
|
189
|
+
: packageRow, children: [
|
|
161
190
|
jsx_runtime_1.jsx(Checkbox_1.Checkbox, { checked: map[extraPkg.name], name: extraPkg.name, onChange: () => {
|
|
162
191
|
setMap((prev) => ({
|
|
163
192
|
...prev,
|
|
164
193
|
[extraPkg.name]: !prev[extraPkg.name],
|
|
165
194
|
}));
|
|
166
|
-
}, disabled: !canSelectPackages || isInstalled }), jsx_runtime_1.jsx(
|
|
195
|
+
}, disabled: !canSelectPackages || isInstalled }), jsx_runtime_1.jsx(InstallablePackage_1.InstallablePackageComp, { description: extraPkg.description, isInstalled: isInstalled, link: extraPkg.docsUrl, pkg: `${extraPkg.name}@${extraPkg.version}` })
|
|
167
196
|
] }, extraPkg.name));
|
|
168
|
-
})] })) }),
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
?
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
197
|
+
})] })) }), footerContainer
|
|
198
|
+
? react_dom_1.default.createPortal(jsx_runtime_1.jsx(ModalFooter_1.ModalFooterContainer, { style: footer, children: jsx_runtime_1.jsxs(layout_1.Row, { align: "center", children: [state.type === 'idle' ? (jsx_runtime_1.jsxs("span", { style: { color: colors_1.LIGHT_TEXT, fontSize: 13, lineHeight: 1.2 }, children: ["This will install ", selectedPackages.length, " package", selectedPackages.length === 1 ? '' : 's', jsx_runtime_1.jsx("br", {}), packageManager === null
|
|
199
|
+
? `in this project, Remotion v${remotion_1.VERSION}`
|
|
200
|
+
: `using ${packageManager}, Remotion v${remotion_1.VERSION}`] })) : null, jsx_runtime_1.jsx(layout_1.Flex, {}), jsx_runtime_1.jsxs(ModalButton_1.ModalButton, { onClick: onClick, disabled: disabled, children: [state.type === 'restarting'
|
|
201
|
+
? 'Restarting...'
|
|
202
|
+
: state.type === 'installing'
|
|
203
|
+
? 'Installing...'
|
|
204
|
+
: state.type === 'done'
|
|
205
|
+
? packageManager === null
|
|
206
|
+
? 'Done'
|
|
207
|
+
: 'Restart Server'
|
|
208
|
+
: 'Install', disabled ? null : jsx_runtime_1.jsx(ShortcutHint_1.ShortcutHint, { keyToPress: "\u21B5", cmdOrCtrl: true })] })
|
|
209
|
+
] }) }), footerContainer)
|
|
210
|
+
: null] }));
|
|
181
211
|
};
|
|
182
|
-
exports.
|
|
212
|
+
exports.InstallPackageSettings = InstallPackageSettings;
|
|
@@ -4,18 +4,44 @@ exports.InstallablePackageComp = void 0;
|
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const colors_1 = require("../helpers/colors");
|
|
6
6
|
const FONT_SIZE = 13;
|
|
7
|
+
const container = {
|
|
8
|
+
alignItems: 'center',
|
|
9
|
+
display: 'flex',
|
|
10
|
+
flex: 1,
|
|
11
|
+
gap: 10,
|
|
12
|
+
minWidth: 0,
|
|
13
|
+
};
|
|
14
|
+
const packageDetails = {
|
|
15
|
+
flex: 1,
|
|
16
|
+
minWidth: 0,
|
|
17
|
+
};
|
|
18
|
+
const packageName = {
|
|
19
|
+
color: colors_1.WHITE,
|
|
20
|
+
display: 'block',
|
|
21
|
+
fontFamily: 'monospace',
|
|
22
|
+
fontSize: FONT_SIZE,
|
|
23
|
+
lineHeight: 1.4,
|
|
24
|
+
overflow: 'hidden',
|
|
25
|
+
textDecoration: 'none',
|
|
26
|
+
textOverflow: 'ellipsis',
|
|
27
|
+
whiteSpace: 'nowrap',
|
|
28
|
+
};
|
|
29
|
+
const descriptionStyle = {
|
|
30
|
+
color: colors_1.LIGHT_TEXT,
|
|
31
|
+
fontSize: FONT_SIZE,
|
|
32
|
+
lineHeight: 1.4,
|
|
33
|
+
};
|
|
34
|
+
const status = {
|
|
35
|
+
color: colors_1.LIGHT_TEXT,
|
|
36
|
+
fontSize: 12,
|
|
37
|
+
lineHeight: 1.4,
|
|
38
|
+
whiteSpace: 'nowrap',
|
|
39
|
+
};
|
|
7
40
|
const InstallablePackageComp = ({ isInstalled, pkg, link, description }) => {
|
|
8
|
-
return (jsx_runtime_1.jsxs("div", { style:
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
paddingTop: 4,
|
|
13
|
-
}, children: [
|
|
14
|
-
jsx_runtime_1.jsx("a", { href: link, style: {
|
|
15
|
-
fontSize: FONT_SIZE,
|
|
16
|
-
color: colors_1.WHITE_HEX,
|
|
17
|
-
textDecoration: 'none',
|
|
18
|
-
}, target: "_blank", children: pkg }), ' ', isInstalled ? (jsx_runtime_1.jsx("span", { style: { opacity: 0.3, fontSize: 'inherit' }, children: "(installed)" })) : null, jsx_runtime_1.jsx("br", {}), jsx_runtime_1.jsx("span", { style: { color: colors_1.LIGHT_TEXT, fontSize: FONT_SIZE }, children: description })
|
|
41
|
+
return (jsx_runtime_1.jsxs("div", { style: container, children: [
|
|
42
|
+
jsx_runtime_1.jsxs("div", { style: packageDetails, children: [
|
|
43
|
+
jsx_runtime_1.jsx("a", { href: link, style: packageName, target: "_blank", children: pkg }), jsx_runtime_1.jsx("div", { style: descriptionStyle, children: description })
|
|
44
|
+
] }), jsx_runtime_1.jsx("span", { style: status, children: isInstalled ? 'Installed' : 'Not installed' })
|
|
19
45
|
] }));
|
|
20
46
|
};
|
|
21
47
|
exports.InstallablePackageComp = InstallablePackageComp;
|