@remotion/studio 4.0.515 → 4.0.516
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 +3 -9
- package/dist/components/AssetSelectorItem.d.ts +2 -1
- package/dist/components/AssetSelectorItem.js +24 -29
- package/dist/components/Canvas.js +7 -4
- package/dist/components/CaptionInspector.d.ts +2 -0
- package/dist/components/CaptionInspector.js +3 -5
- 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/CurrentAsset.d.ts +10 -2
- package/dist/components/CurrentAsset.js +139 -46
- 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 +3 -2
- 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 +14 -7
- package/dist/components/InspectorPanel/KeyframeEasingNavigator.js +10 -4
- package/dist/components/InspectorPanel/SequenceInspectorHeader.js +2 -1
- package/dist/components/InspectorPanel/SequenceSelectionInspector.js +1 -4
- package/dist/components/InspectorPanel/common.d.ts +0 -12
- package/dist/components/InspectorPanel/common.js +3 -52
- package/dist/components/InspectorPanel/use-composition-actions.js +0 -1
- package/dist/components/InspectorPanelLayout.d.ts +1 -1
- package/dist/components/InspectorPanelLayout.js +1 -1
- package/dist/components/InspectorSequenceSection.js +40 -54
- 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/MenuBuildIndicator.js +1 -1
- package/dist/components/Modals.js +6 -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/PreviewToolbar.js +5 -2
- package/dist/components/PreviewToolbarOverflowButton.js +30 -0
- package/dist/components/QuickSwitcher/ExplorerQuickSwitcherTrigger.js +2 -2
- package/dist/components/QuickSwitcher/QuickSwitcherContent.js +14 -30
- package/dist/components/RenderButton.js +66 -183
- 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 +2 -0
- package/dist/components/RulersAndGuidesToggle.js +23 -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 +3 -4
- package/dist/components/SelectedOutlinePolygon.js +18 -16
- package/dist/components/SelectedOutlineRenderer.js +66 -14
- package/dist/components/SettingsModal.d.ts +1 -1
- package/dist/components/SettingsModal.js +30 -7
- package/dist/components/SettingsModalFooter.js +2 -1
- 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 +0 -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.js +7 -10
- 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.js +10 -4
- 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.js +1 -1
- package/dist/components/Timeline/TimelineSequence.d.ts +2 -0
- package/dist/components/Timeline/TimelineSequence.js +110 -19
- package/dist/components/Timeline/TimelineSequenceItem.js +5 -5
- package/dist/components/Timeline/TimelineSequencePropItem.js +15 -2
- package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.d.ts +4 -2
- 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/duplicate-selected-timeline-item.js +3 -12
- 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/split-selected-timeline-item.js +0 -1
- 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/use-timeline-asset-drop.js +1 -0
- package/dist/components/TimelineCombobox.js +25 -160
- package/dist/components/TimelineInOutToggle.js +4 -1
- 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 +1 -1
- 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-w4244j4n.js} +17766 -17618
- package/dist/esm/index.mjs +3 -0
- package/dist/esm/internals.mjs +17765 -17617
- package/dist/esm/previewEntry.mjs +17570 -17422
- 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.js +2 -1
- 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/get-asset-metadata.js +25 -16
- 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-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 -1
- 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/open-in-remotion-convert.d.ts +7 -0
- package/dist/helpers/open-in-remotion-convert.js +18 -0
- 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 +32 -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/modals.d.ts +2 -5
- package/package.json +12 -12
- package/dist/components/KeyboardShortcutsExplainer.d.ts +0 -2
- package/dist/components/KeyboardShortcutsExplainer.js +0 -194
|
@@ -1,23 +1,62 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CurrentAsset = exports.AssetInfo = exports.
|
|
3
|
+
exports.CurrentAsset = exports.AssetInfo = exports.getCurrentAssetMediaSections = exports.getCurrentAssetImageMetadataSource = exports.getCurrentAssetMetadataSource = exports.CURRENT_ASSET_HEIGHT = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const studio_shared_1 = require("@remotion/studio-shared");
|
|
6
6
|
const react_1 = require("react");
|
|
7
7
|
const remotion_1 = require("remotion");
|
|
8
8
|
const browser_studio_operations_1 = require("../helpers/browser-studio-operations");
|
|
9
9
|
const client_id_1 = require("../helpers/client-id");
|
|
10
|
+
const colors_1 = require("../helpers/colors");
|
|
10
11
|
const format_media_duration_1 = require("../helpers/format-media-duration");
|
|
12
|
+
const get_file_manager_name_1 = require("../helpers/get-file-manager-name");
|
|
11
13
|
const get_preview_file_type_1 = require("../helpers/get-preview-file-type");
|
|
14
|
+
const open_in_remotion_convert_1 = require("../helpers/open-in-remotion-convert");
|
|
12
15
|
const render_codec_label_1 = require("../helpers/render-codec-label");
|
|
13
16
|
const use_image_metadata_1 = require("../helpers/use-image-metadata");
|
|
14
17
|
const use_media_metadata_1 = require("../helpers/use-media-metadata");
|
|
18
|
+
const folder_1 = require("../icons/folder");
|
|
19
|
+
const remotion_convert_1 = require("../icons/remotion-convert");
|
|
20
|
+
const trash_1 = require("../icons/trash");
|
|
15
21
|
const InlineEditableTitle_1 = require("./InlineEditableTitle");
|
|
16
22
|
const InspectorInfoHeader_1 = require("./InspectorInfoHeader");
|
|
23
|
+
const common_1 = require("./InspectorPanel/common");
|
|
17
24
|
const InspectorPanelLayout_1 = require("./InspectorPanelLayout");
|
|
25
|
+
const layout_1 = require("./layout");
|
|
18
26
|
const use_rename_static_file_1 = require("./NewComposition/use-rename-static-file");
|
|
27
|
+
const NotificationCenter_1 = require("./Notifications/NotificationCenter");
|
|
28
|
+
const actions_1 = require("./RenderQueue/actions");
|
|
29
|
+
const use_delete_asset_1 = require("./use-delete-asset");
|
|
19
30
|
const use_static_files_1 = require("./use-static-files");
|
|
20
|
-
exports.CURRENT_ASSET_HEIGHT =
|
|
31
|
+
exports.CURRENT_ASSET_HEIGHT = layout_1.COMPACT_INLINE_ROW_HEIGHT + 8;
|
|
32
|
+
const quickActionIconStyle = {
|
|
33
|
+
display: 'block',
|
|
34
|
+
height: 18,
|
|
35
|
+
width: 18,
|
|
36
|
+
};
|
|
37
|
+
const convertArrowStyle = {
|
|
38
|
+
display: 'inline-block',
|
|
39
|
+
height: 12,
|
|
40
|
+
marginLeft: 4,
|
|
41
|
+
verticalAlign: -2,
|
|
42
|
+
width: 12,
|
|
43
|
+
};
|
|
44
|
+
const assetMetadataStyle = {
|
|
45
|
+
padding: `0 ${InspectorPanelLayout_1.INSPECTOR_PANEL_HORIZONTAL_PADDING}px`,
|
|
46
|
+
};
|
|
47
|
+
const assetMetadataValueStyle = {
|
|
48
|
+
color: colors_1.LIGHT_TEXT,
|
|
49
|
+
fontFamily: 'sans-serif',
|
|
50
|
+
fontSize: 13,
|
|
51
|
+
lineHeight: '20px',
|
|
52
|
+
};
|
|
53
|
+
const assetEmptyStateStyle = {
|
|
54
|
+
color: colors_1.LIGHT_TEXT,
|
|
55
|
+
fontFamily: 'sans-serif',
|
|
56
|
+
fontSize: 12,
|
|
57
|
+
lineHeight: 1.4,
|
|
58
|
+
padding: `0 ${InspectorPanelLayout_1.INSPECTOR_PANEL_HORIZONTAL_PADDING}px`,
|
|
59
|
+
};
|
|
21
60
|
const getCurrentAssetMetadataSource = (assetName) => {
|
|
22
61
|
if (!assetName) {
|
|
23
62
|
return null;
|
|
@@ -38,39 +77,72 @@ const getCurrentAssetImageMetadataSource = (assetName) => {
|
|
|
38
77
|
};
|
|
39
78
|
exports.getCurrentAssetImageMetadataSource = getCurrentAssetImageMetadataSource;
|
|
40
79
|
const formatFps = (fps) => `${fps.toFixed(2)} FPS`;
|
|
41
|
-
const
|
|
42
|
-
const
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
80
|
+
const getCurrentAssetMediaSections = (mediaMetadata) => {
|
|
81
|
+
const hasVideo = mediaMetadata.hasVideoTrack === true ||
|
|
82
|
+
mediaMetadata.width !== null ||
|
|
83
|
+
mediaMetadata.height !== null ||
|
|
84
|
+
mediaMetadata.videoCodec !== null ||
|
|
85
|
+
mediaMetadata.fps !== null ||
|
|
86
|
+
mediaMetadata.isHdr !== null;
|
|
87
|
+
const hasAudio = mediaMetadata.hasAudioTrack === true ||
|
|
88
|
+
mediaMetadata.audioCodec !== null ||
|
|
89
|
+
mediaMetadata.sampleRate !== null;
|
|
90
|
+
const video = [];
|
|
91
|
+
const audio = [];
|
|
92
|
+
if (hasVideo) {
|
|
93
|
+
if (mediaMetadata.width !== null && mediaMetadata.height !== null) {
|
|
94
|
+
video.push({
|
|
95
|
+
label: 'Dimensions',
|
|
96
|
+
value: `${mediaMetadata.width} × ${mediaMetadata.height}`,
|
|
97
|
+
});
|
|
98
|
+
}
|
|
47
99
|
if (mediaMetadata.fps !== null) {
|
|
48
|
-
|
|
100
|
+
video.push({ label: 'Frame rate', value: formatFps(mediaMetadata.fps) });
|
|
49
101
|
}
|
|
102
|
+
video.push({
|
|
103
|
+
label: 'Duration',
|
|
104
|
+
value: (0, format_media_duration_1.formatMediaDuration)(mediaMetadata.duration),
|
|
105
|
+
});
|
|
106
|
+
video.push({
|
|
107
|
+
label: 'Codec',
|
|
108
|
+
value: (0, render_codec_label_1.renderHumanReadableVideoCodec)(mediaMetadata.videoCodec),
|
|
109
|
+
});
|
|
50
110
|
if (mediaMetadata.isHdr !== null) {
|
|
51
|
-
|
|
111
|
+
video.push({
|
|
112
|
+
label: 'HDR',
|
|
113
|
+
value: mediaMetadata.isHdr ? 'Yes' : 'No',
|
|
114
|
+
});
|
|
52
115
|
}
|
|
53
|
-
detailLines.push(`Video: ${videoParts.join(' · ')}`);
|
|
54
116
|
}
|
|
55
|
-
if (
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
117
|
+
if (hasAudio) {
|
|
118
|
+
audio.push({
|
|
119
|
+
label: 'Duration',
|
|
120
|
+
value: (0, format_media_duration_1.formatMediaDuration)(mediaMetadata.duration),
|
|
121
|
+
});
|
|
122
|
+
audio.push({
|
|
123
|
+
label: 'Codec',
|
|
124
|
+
value: (0, render_codec_label_1.renderHumanReadableAudioCodec)(mediaMetadata.audioCodec),
|
|
125
|
+
});
|
|
59
126
|
if (mediaMetadata.sampleRate !== null) {
|
|
60
|
-
|
|
127
|
+
audio.push({
|
|
128
|
+
label: 'Sample rate',
|
|
129
|
+
value: `${mediaMetadata.sampleRate} Hz`,
|
|
130
|
+
});
|
|
61
131
|
}
|
|
62
|
-
detailLines.push(`Audio: ${audioParts.join(' · ')}`);
|
|
63
132
|
}
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
133
|
+
return {
|
|
134
|
+
audio: hasAudio || (hasVideo && mediaMetadata.hasAudioTrack === false)
|
|
135
|
+
? audio
|
|
136
|
+
: null,
|
|
137
|
+
video: hasVideo ? video : null,
|
|
138
|
+
};
|
|
68
139
|
};
|
|
69
|
-
exports.
|
|
140
|
+
exports.getCurrentAssetMediaSections = getCurrentAssetMediaSections;
|
|
70
141
|
const AssetInfo = ({ assetName, contentSized = false, onAssetClick, readOnlyStudio }) => {
|
|
71
|
-
var _a;
|
|
142
|
+
var _a, _b, _c;
|
|
72
143
|
const connectionStatus = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx)
|
|
73
144
|
.previewServerState.type;
|
|
145
|
+
const browserStudioOperations = (0, browser_studio_operations_1.getBrowserStudioOperations)();
|
|
74
146
|
const staticFiles = (0, use_static_files_1.useStaticFiles)();
|
|
75
147
|
const renameFile = (0, use_rename_static_file_1.useRenameStaticFile)({
|
|
76
148
|
relativePath: assetName !== null && assetName !== void 0 ? assetName : '',
|
|
@@ -89,38 +161,59 @@ const AssetInfo = ({ assetName, contentSized = false, onAssetClick, readOnlyStud
|
|
|
89
161
|
const imageSrc = (0, exports.getCurrentAssetImageMetadataSource)(assetName);
|
|
90
162
|
const imageMetadata = (0, use_image_metadata_1.useImageMetadata)(imageSrc);
|
|
91
163
|
const canRename = onAssetClick === undefined &&
|
|
92
|
-
(
|
|
164
|
+
(browserStudioOperations !== null ||
|
|
93
165
|
(connectionStatus === 'connected' && !readOnlyStudio));
|
|
94
166
|
const onRename = (0, react_1.useCallback)((newName) => {
|
|
95
167
|
renameFile(newName).catch(() => undefined);
|
|
96
168
|
}, [renameFile]);
|
|
169
|
+
const onOpenConvert = (0, react_1.useCallback)(() => {
|
|
170
|
+
if (assetName === null) {
|
|
171
|
+
return;
|
|
172
|
+
}
|
|
173
|
+
(0, open_in_remotion_convert_1.openInRemotionConvert)({ relativePath: assetName });
|
|
174
|
+
}, [assetName]);
|
|
175
|
+
const onShowInFileManager = (0, react_1.useCallback)(() => {
|
|
176
|
+
if (assetName === null || !window.remotion_publicFolderExists) {
|
|
177
|
+
(0, NotificationCenter_1.showNotification)('Could not find the public folder', 2000);
|
|
178
|
+
return;
|
|
179
|
+
}
|
|
180
|
+
(0, actions_1.openInFileExplorer)({
|
|
181
|
+
directory: window.remotion_publicFolderExists + '/' + assetName,
|
|
182
|
+
}).catch((err) => {
|
|
183
|
+
(0, NotificationCenter_1.showNotification)(`Could not open file: ${err.message}`, 2000);
|
|
184
|
+
});
|
|
185
|
+
}, [assetName]);
|
|
186
|
+
const onDelete = (0, use_delete_asset_1.useDeleteAsset)(assetName);
|
|
97
187
|
if (!assetName) {
|
|
98
|
-
return jsx_runtime_1.jsx(InspectorInfoHeader_1.InspectorInfoHeader, { contentSized: contentSized });
|
|
188
|
+
return (jsx_runtime_1.jsx(InspectorInfoHeader_1.InspectorInfoHeader, { contentSized: contentSized, minHeight: exports.CURRENT_ASSET_HEIGHT }));
|
|
99
189
|
}
|
|
100
190
|
const fileName = (_a = assetName.split('/').pop()) !== null && _a !== void 0 ? _a : assetName;
|
|
101
|
-
const
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
if (mediaMetadata) {
|
|
106
|
-
if (mediaMetadata.format) {
|
|
107
|
-
subtitleParts.push(mediaMetadata.format);
|
|
108
|
-
}
|
|
109
|
-
if (mediaMetadata.width !== null && mediaMetadata.height !== null) {
|
|
110
|
-
subtitleParts.push(`${mediaMetadata.width}x${mediaMetadata.height}`);
|
|
111
|
-
}
|
|
191
|
+
const fileDetails = [];
|
|
192
|
+
const container = (_c = (_b = mediaMetadata === null || mediaMetadata === void 0 ? void 0 : mediaMetadata.format) !== null && _b !== void 0 ? _b : imageMetadata === null || imageMetadata === void 0 ? void 0 : imageMetadata.format) !== null && _c !== void 0 ? _c : null;
|
|
193
|
+
if (container !== null) {
|
|
194
|
+
fileDetails.push({ label: 'Container', value: container });
|
|
112
195
|
}
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
subtitleParts.push(`${imageMetadata.width}x${imageMetadata.height}`);
|
|
196
|
+
if (sizeInBytes !== null) {
|
|
197
|
+
fileDetails.push({ label: 'Size', value: (0, studio_shared_1.formatBytes)(sizeInBytes) });
|
|
116
198
|
}
|
|
117
|
-
const
|
|
118
|
-
? (0, exports.
|
|
119
|
-
:
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
199
|
+
const mediaSections = mediaMetadata
|
|
200
|
+
? (0, exports.getCurrentAssetMediaSections)(mediaMetadata)
|
|
201
|
+
: null;
|
|
202
|
+
const fileManagerAvailable = browserStudioOperations === null;
|
|
203
|
+
const fileManagerDisabled = window.remotion_publicFolderExists === null ||
|
|
204
|
+
readOnlyStudio ||
|
|
205
|
+
connectionStatus !== 'connected';
|
|
206
|
+
const fileManagerName = (0, get_file_manager_name_1.getFileManagerName)(window.remotion_fileSystemPlatform);
|
|
207
|
+
const mutationsDisabled = browserStudioOperations === null &&
|
|
208
|
+
(readOnlyStudio || connectionStatus !== 'connected');
|
|
209
|
+
return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
210
|
+
jsx_runtime_1.jsxs(InspectorInfoHeader_1.InspectorInfoHeader, { contentSized: contentSized, minHeight: exports.CURRENT_ASSET_HEIGHT, padding: contentSized
|
|
211
|
+
? `0 ${InspectorPanelLayout_1.INSPECTOR_PANEL_HORIZONTAL_PADDING}px 6px`
|
|
212
|
+
: '4px 0', children: [
|
|
213
|
+
jsx_runtime_1.jsx(InlineEditableTitle_1.InlineEditableTitle, { value: fileName, canRename: canRename, getInitialSelection: use_rename_static_file_1.getStaticFileRenameSelection, onClick: onAssetClick, onCommit: onRename, size: contentSized ? 'default' : 'inspector', title: assetName }), imageMetadata ? (jsx_runtime_1.jsxs(InspectorInfoHeader_1.InspectorInfoSubtitle, { size: contentSized ? 'default' : 'inspector', children: [imageMetadata.width, " \u00D7 ", imageMetadata.height] })) : null] }), fileDetails.length > 0 ? (jsx_runtime_1.jsx(common_1.InspectorSection, { header: "File", children: jsx_runtime_1.jsx("div", { style: assetMetadataStyle, children: fileDetails.map((detail) => (jsx_runtime_1.jsx(common_1.InspectorDetailRow, { label: detail.label, children: jsx_runtime_1.jsx("span", { style: assetMetadataValueStyle, children: detail.value }) }, detail.label))) }) })) : null, mediaSections && mediaSections.video ? (jsx_runtime_1.jsx(common_1.InspectorSection, { header: "Video", children: jsx_runtime_1.jsx("div", { style: assetMetadataStyle, children: mediaSections.video.map((detail) => (jsx_runtime_1.jsx(common_1.InspectorDetailRow, { label: detail.label, children: jsx_runtime_1.jsx("span", { style: assetMetadataValueStyle, children: detail.value }) }, detail.label))) }) })) : null, mediaSections && mediaSections.audio !== null ? (jsx_runtime_1.jsx(common_1.InspectorSection, { header: "Audio", children: mediaSections.audio.length === 0 ? (jsx_runtime_1.jsx("div", { style: assetEmptyStateStyle, children: "None" })) : (jsx_runtime_1.jsx("div", { style: assetMetadataStyle, children: mediaSections.audio.map((detail) => (jsx_runtime_1.jsx(common_1.InspectorDetailRow, { label: detail.label, children: jsx_runtime_1.jsx("span", { style: assetMetadataValueStyle, children: detail.value }) }, detail.label))) })) })) : null, jsx_runtime_1.jsxs(common_1.InspectorQuickActionsSection, { children: [src ? (jsx_runtime_1.jsxs(common_1.InspectorQuickAction, { disabled: false, onClick: onOpenConvert, renderIcon: (color) => (jsx_runtime_1.jsx(remotion_convert_1.RemotionConvertIcon, { color: color, style: quickActionIconStyle })), children: ["Convert",
|
|
214
|
+
jsx_runtime_1.jsx("svg", { "aria-hidden": "true", viewBox: "0 0 16 16", style: convertArrowStyle, children: jsx_runtime_1.jsx("path", { d: "M4 12 12 4M6 4h6v6", fill: "none", stroke: colors_1.CURRENT_COLOR, strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.5" }) })
|
|
215
|
+
] })) : null, fileManagerAvailable ? (jsx_runtime_1.jsxs(common_1.InspectorQuickAction, { disabled: fileManagerDisabled, onClick: onShowInFileManager, renderIcon: (color) => (jsx_runtime_1.jsx(folder_1.ExpandedFolderIcon, { color: color, style: quickActionIconStyle })), children: ["Show in ", fileManagerName] })) : null, jsx_runtime_1.jsx(common_1.InspectorQuickAction, { disabled: mutationsDisabled, onClick: onDelete, renderIcon: (color) => (jsx_runtime_1.jsx(trash_1.TrashIcon, { color: color, style: quickActionIconStyle })), children: "Delete" })] })
|
|
216
|
+
] }));
|
|
124
217
|
};
|
|
125
218
|
exports.AssetInfo = AssetInfo;
|
|
126
219
|
const CurrentAsset = ({ readOnlyStudio }) => {
|
|
@@ -41,14 +41,13 @@ const copy_text_1 = require("../helpers/copy-text");
|
|
|
41
41
|
const open_in_editor_1 = require("../helpers/open-in-editor");
|
|
42
42
|
const caret_1 = require("../icons/caret");
|
|
43
43
|
const clipboard_1 = require("../icons/clipboard");
|
|
44
|
-
const z_index_1 = require("../state/z-index");
|
|
45
44
|
const CodingAgentIcon_1 = require("./CodingAgentIcon");
|
|
46
45
|
const InlineAction_1 = require("./InlineAction");
|
|
47
|
-
const InlineDropdown_1 = require("./InlineDropdown");
|
|
48
46
|
const ModalFooter_1 = require("./ModalFooter");
|
|
49
47
|
const ModalHeader_1 = require("./ModalHeader");
|
|
50
48
|
const DismissableModal_1 = require("./NewComposition/DismissableModal");
|
|
51
49
|
const NotificationCenter_1 = require("./Notifications/NotificationCenter");
|
|
50
|
+
const SegmentedButton_1 = require("./SegmentedButton");
|
|
52
51
|
const SettingsContext_1 = require("./SettingsContext");
|
|
53
52
|
const panelStyle = {
|
|
54
53
|
borderRadius: 6,
|
|
@@ -94,36 +93,13 @@ const footer = {
|
|
|
94
93
|
flex: 'none',
|
|
95
94
|
justifyContent: 'flex-end',
|
|
96
95
|
};
|
|
97
|
-
const
|
|
98
|
-
alignItems: 'center',
|
|
99
|
-
borderRadius: 4,
|
|
100
|
-
display: 'inline-flex',
|
|
101
|
-
flexDirection: 'row',
|
|
102
|
-
gap: 1,
|
|
103
|
-
height: 24,
|
|
104
|
-
overflow: 'hidden',
|
|
105
|
-
};
|
|
106
|
-
const mainButtonBase = {
|
|
107
|
-
alignItems: 'center',
|
|
108
|
-
background: colors_1.TRANSPARENT,
|
|
109
|
-
border: 'none',
|
|
110
|
-
borderRadius: '4px 0 0 4px',
|
|
111
|
-
color: colors_1.LIGHT_TEXT,
|
|
112
|
-
display: 'inline-flex',
|
|
113
|
-
fontFamily: 'sans-serif',
|
|
114
|
-
fontSize: 12,
|
|
96
|
+
const mainSegmentStyle = {
|
|
115
97
|
gap: 6,
|
|
116
|
-
height: 24,
|
|
117
98
|
padding: '0 9px',
|
|
118
|
-
whiteSpace: 'nowrap',
|
|
119
99
|
};
|
|
120
|
-
const
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
const dropdownButton = {
|
|
124
|
-
borderRadius: '0 4px 4px 0',
|
|
125
|
-
height: 24,
|
|
126
|
-
width: 24,
|
|
100
|
+
const dropdownSegmentStyle = {
|
|
101
|
+
padding: 0,
|
|
102
|
+
width: 20,
|
|
127
103
|
};
|
|
128
104
|
const menuLabel = {
|
|
129
105
|
color: 'inherit',
|
|
@@ -134,8 +110,6 @@ const menuLabel = {
|
|
|
134
110
|
const FixComputedValueModal = ({ state }) => {
|
|
135
111
|
var _a, _b;
|
|
136
112
|
const { codingAgentInfo } = (0, SettingsContext_1.useSettings)();
|
|
137
|
-
const { tabIndex } = (0, z_index_1.useZIndex)();
|
|
138
|
-
const [hovered, setHovered] = react_1.default.useState(false);
|
|
139
113
|
const prompt = `/remotion-interactivity ${state.context} make "${state.prop}" interactive`;
|
|
140
114
|
const installCommand = 'npx remotion skills add';
|
|
141
115
|
const installedCodingAgents = (_a = codingAgentInfo === null || codingAgentInfo === void 0 ? void 0 : codingAgentInfo.installedCodingAgents) !== null && _a !== void 0 ? _a : [];
|
|
@@ -180,20 +154,54 @@ const FixComputedValueModal = ({ state }) => {
|
|
|
180
154
|
value: `coding-agent-${codingAgent.id}`,
|
|
181
155
|
}));
|
|
182
156
|
}, [alternativeCodingAgents, openWithCodingAgent]);
|
|
183
|
-
const
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
return
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
157
|
+
const segments = react_1.default.useMemo(() => {
|
|
158
|
+
if (!defaultCodingAgent) {
|
|
159
|
+
return [];
|
|
160
|
+
}
|
|
161
|
+
return [
|
|
162
|
+
{
|
|
163
|
+
ariaLabel: `Open in ${defaultCodingAgent.nameWithType}`,
|
|
164
|
+
buttonId: null,
|
|
165
|
+
disabled: false,
|
|
166
|
+
idleColor: colors_1.LIGHT_TEXT,
|
|
167
|
+
onClick: () => {
|
|
168
|
+
openWithCodingAgent(defaultCodingAgent.id, defaultCodingAgent.nameWithType).catch(() => undefined);
|
|
169
|
+
},
|
|
170
|
+
onPointerDown: null,
|
|
171
|
+
renderContent: () => (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
172
|
+
jsx_runtime_1.jsx(CodingAgentIcon_1.CodingAgentIcon, { codingAgentId: defaultCodingAgent.id, size: 18 }),
|
|
173
|
+
"Open in ", defaultCodingAgent.name] })),
|
|
174
|
+
segmentId: 'default-coding-agent',
|
|
175
|
+
style: mainSegmentStyle,
|
|
176
|
+
title: `Open in ${defaultCodingAgent.nameWithType}`,
|
|
177
|
+
type: 'action',
|
|
178
|
+
},
|
|
179
|
+
...(alternativeCodingAgents.length > 0
|
|
180
|
+
? [
|
|
181
|
+
{
|
|
182
|
+
ariaLabel: 'Open in another coding agent',
|
|
183
|
+
buttonId: null,
|
|
184
|
+
disabled: false,
|
|
185
|
+
idleColor: colors_1.LIGHT_TEXT,
|
|
186
|
+
leaveLeftSpace: true,
|
|
187
|
+
onOpenChange: null,
|
|
188
|
+
renderContent: (color) => jsx_runtime_1.jsx(caret_1.CaretDown, { color: color }),
|
|
189
|
+
segmentId: 'another-coding-agent',
|
|
190
|
+
selectedId: null,
|
|
191
|
+
style: dropdownSegmentStyle,
|
|
192
|
+
title: 'Open in another coding agent',
|
|
193
|
+
type: 'menu',
|
|
194
|
+
values: agentMenuItems,
|
|
195
|
+
},
|
|
196
|
+
]
|
|
197
|
+
: []),
|
|
198
|
+
];
|
|
199
|
+
}, [
|
|
200
|
+
agentMenuItems,
|
|
201
|
+
alternativeCodingAgents.length,
|
|
202
|
+
defaultCodingAgent,
|
|
203
|
+
openWithCodingAgent,
|
|
204
|
+
]);
|
|
197
205
|
return (jsx_runtime_1.jsxs(DismissableModal_1.DismissableModal, { panelStyle: panelStyle, children: [
|
|
198
206
|
jsx_runtime_1.jsx(ModalHeader_1.ModalHeader, { title: "Fix computed value" }), jsx_runtime_1.jsxs("div", { style: container, children: [state.remotionInteractivitySkillAvailable ? null : (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
199
207
|
jsx_runtime_1.jsx("div", { style: text, children: "First, install the Remotion Agent Skills:" }), jsx_runtime_1.jsxs("div", { style: commandField, children: [
|
|
@@ -207,11 +215,6 @@ const FixComputedValueModal = ({ state }) => {
|
|
|
207
215
|
: 'Then, paste this prompt into your coding agent:' }), jsx_runtime_1.jsxs("div", { style: commandField, children: [
|
|
208
216
|
jsx_runtime_1.jsx("pre", { style: code, children: prompt }), jsx_runtime_1.jsx(InlineAction_1.InlineAction, { variant: null, onClick: onCopyPrompt, renderAction: renderCopyAction, title: "Copy prompt" })
|
|
209
217
|
] })
|
|
210
|
-
] }), defaultCodingAgent ? (jsx_runtime_1.jsx(ModalFooter_1.ModalFooterContainer, { style: footer, children: jsx_runtime_1.
|
|
211
|
-
jsx_runtime_1.jsxs("button", { "aria-label": `Open in ${defaultCodingAgent.nameWithType}`, onClick: () => {
|
|
212
|
-
openWithCodingAgent(defaultCodingAgent.id, defaultCodingAgent.nameWithType).catch(() => undefined);
|
|
213
|
-
}, style: mainButtonStyle, tabIndex: tabIndex, title: `Open in ${defaultCodingAgent.nameWithType}`, type: "button", children: [
|
|
214
|
-
jsx_runtime_1.jsx(CodingAgentIcon_1.CodingAgentIcon, { codingAgentId: defaultCodingAgent.id, size: 18 }),
|
|
215
|
-
"Open in ", defaultCodingAgent.name] }), alternativeCodingAgents.length > 0 ? (jsx_runtime_1.jsx(InlineDropdown_1.InlineDropdown, { renderAction: renderDropdownAction, style: dropdownButton, title: "Open in another coding agent", values: agentMenuItems, variant: null })) : null] }) })) : null] }));
|
|
218
|
+
] }), defaultCodingAgent ? (jsx_runtime_1.jsx(ModalFooter_1.ModalFooterContainer, { style: footer, children: jsx_runtime_1.jsx(SegmentedButton_1.SegmentedButton, { segments: segments, style: null, title: null }) })) : null] }));
|
|
216
219
|
};
|
|
217
220
|
exports.FixComputedValueModal = FixComputedValueModal;
|
|
@@ -162,12 +162,12 @@ const GlobalKeybindings = () => {
|
|
|
162
162
|
event: 'keypress',
|
|
163
163
|
key: '?',
|
|
164
164
|
callback: () => {
|
|
165
|
+
var _a;
|
|
166
|
+
var _b;
|
|
165
167
|
setSelectedModal({
|
|
166
|
-
type: '
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
assetSelection: null,
|
|
170
|
-
compositionSelection: null,
|
|
168
|
+
type: 'settings',
|
|
169
|
+
initialTab: 'shortcuts',
|
|
170
|
+
initialPublicLicenseKey: (_b = (_a = window.remotion_renderDefaults) === null || _a === void 0 ? void 0 : _a.publicLicenseKey) !== null && _b !== void 0 ? _b : null,
|
|
171
171
|
});
|
|
172
172
|
},
|
|
173
173
|
commandCtrlKey: false,
|
|
@@ -8,4 +8,4 @@ export type InlineActionProps = Omit<React.ButtonHTMLAttributes<HTMLButtonElemen
|
|
|
8
8
|
readonly variant: 'compact' | null;
|
|
9
9
|
readonly style?: React.CSSProperties;
|
|
10
10
|
};
|
|
11
|
-
export declare const InlineAction: ({ renderAction, onClick, disabled, title, hoveredColor, unhoveredColor, variant, style: customStyle, className, ...buttonProps }: InlineActionProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export declare const InlineAction: ({ renderAction, onClick, disabled, title, hoveredColor, unhoveredColor, variant, style: customStyle, className, onPointerDown: onPointerDownProp, ...buttonProps }: InlineActionProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -6,9 +6,19 @@ const react_1 = require("react");
|
|
|
6
6
|
const colors_1 = require("../helpers/colors");
|
|
7
7
|
const hoverable_1 = require("../helpers/hoverable");
|
|
8
8
|
const z_index_1 = require("../state/z-index");
|
|
9
|
-
const InlineAction = ({ renderAction, onClick, disabled, title, hoveredColor = colors_1.WHITE, unhoveredColor = colors_1.LIGHT_TEXT, variant, style: customStyle, className, ...buttonProps }) => {
|
|
9
|
+
const InlineAction = ({ renderAction, onClick, disabled, title, hoveredColor = colors_1.WHITE, unhoveredColor = colors_1.LIGHT_TEXT, variant, style: customStyle, className, onPointerDown: onPointerDownProp, ...buttonProps }) => {
|
|
10
10
|
var _a;
|
|
11
11
|
const { tabIndex } = (0, z_index_1.useZIndex)();
|
|
12
|
+
const onPointerDown = (0, react_1.useCallback)((event) => {
|
|
13
|
+
onPointerDownProp === null || onPointerDownProp === void 0 ? void 0 : onPointerDownProp(event);
|
|
14
|
+
if (event.button !== 0) {
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
if (document.activeElement instanceof HTMLElement) {
|
|
18
|
+
document.activeElement.blur();
|
|
19
|
+
}
|
|
20
|
+
event.preventDefault();
|
|
21
|
+
}, [onPointerDownProp]);
|
|
12
22
|
const style = (0, react_1.useMemo)(() => {
|
|
13
23
|
return {
|
|
14
24
|
border: 'none',
|
|
@@ -34,6 +44,6 @@ const InlineAction = ({ renderAction, onClick, disabled, title, hoveredColor = c
|
|
|
34
44
|
}, [customStyle, disabled, hoveredColor, unhoveredColor, variant]);
|
|
35
45
|
return (jsx_runtime_1.jsx("button", { ...buttonProps, type: "button", className: className
|
|
36
46
|
? `${hoverable_1.HOVERABLE_CLASS_NAME} ${className}`
|
|
37
|
-
: hoverable_1.HOVERABLE_CLASS_NAME, disabled: disabled, onClick: onClick, style: style, tabIndex: tabIndex, title: title, "aria-label": (_a = buttonProps['aria-label']) !== null && _a !== void 0 ? _a : title, children: renderAction(colors_1.CURRENT_COLOR) }));
|
|
47
|
+
: hoverable_1.HOVERABLE_CLASS_NAME, disabled: disabled, onClick: onClick, onPointerDown: onPointerDown, style: style, tabIndex: tabIndex, title: title, "aria-label": (_a = buttonProps['aria-label']) !== null && _a !== void 0 ? _a : title, children: renderAction(colors_1.CURRENT_COLOR) }));
|
|
38
48
|
};
|
|
39
49
|
exports.InlineAction = InlineAction;
|
|
@@ -5,7 +5,9 @@ import type { CodePosition } from '../error-overlay/react-overlay/utils/get-sour
|
|
|
5
5
|
export declare const InlineCaptionInspector: React.FC<{
|
|
6
6
|
readonly captions: Caption[];
|
|
7
7
|
readonly controls: SequenceRegistrationControls;
|
|
8
|
+
readonly expanded: boolean;
|
|
8
9
|
readonly nodePath: SequencePropsSubscriptionKey;
|
|
10
|
+
readonly onToggle: () => void;
|
|
9
11
|
readonly readOnlyStudio: boolean;
|
|
10
12
|
readonly validatedLocation: CodePosition;
|
|
11
13
|
}>;
|
|
@@ -30,7 +30,7 @@ const getCaptionPatches = ({ previous, next, }) => {
|
|
|
30
30
|
}
|
|
31
31
|
return patches;
|
|
32
32
|
};
|
|
33
|
-
const InlineCaptionInspector = ({ captions, controls, nodePath, readOnlyStudio, validatedLocation }) => {
|
|
33
|
+
const InlineCaptionInspector = ({ captions, controls, expanded, nodePath, onToggle, readOnlyStudio, validatedLocation, }) => {
|
|
34
34
|
var _a;
|
|
35
35
|
const { previewServerState } = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx);
|
|
36
36
|
const { propStatuses } = (0, react_1.useContext)(remotion_1.Internals.VisualModePropStatusesContext);
|
|
@@ -103,6 +103,6 @@ const InlineCaptionInspector = ({ captions, controls, nodePath, readOnlyStudio,
|
|
|
103
103
|
: (captionStatus === null || captionStatus === void 0 ? void 0 : captionStatus.status) === 'computed'
|
|
104
104
|
? 'Captions must be a direct inline JSX array to edit them'
|
|
105
105
|
: 'Captions are not ready for editing';
|
|
106
|
-
return (jsx_runtime_1.jsx(CaptionInspector_1.CaptionInspector, { captions: draftCaptions, onTextChange: updateCaptions, onTextSave: saveCaptions, onTextCancel: cancelCaptions, readOnly: !canSave, readOnlyTitle: canSave ? null : readOnlyTitle }));
|
|
106
|
+
return (jsx_runtime_1.jsx(CaptionInspector_1.CaptionInspector, { captions: draftCaptions, expanded: expanded, onTextChange: updateCaptions, onTextSave: saveCaptions, onTextCancel: cancelCaptions, onToggle: onToggle, readOnly: !canSave, readOnlyTitle: canSave ? null : readOnlyTitle }));
|
|
107
107
|
};
|
|
108
108
|
exports.InlineCaptionInspector = InlineCaptionInspector;
|
|
@@ -41,7 +41,7 @@ const InlineCompositionName = ({ compositionId, stack, compositions }) => {
|
|
|
41
41
|
notification.replaceContent(`Could not rename composition: ${result.reason}`, 2000);
|
|
42
42
|
return;
|
|
43
43
|
}
|
|
44
|
-
notification.
|
|
44
|
+
notification.dismiss();
|
|
45
45
|
})
|
|
46
46
|
.catch((err) => {
|
|
47
47
|
notification.replaceContent(`Could not rename composition: ${err.message}`, 2000);
|
|
@@ -4,6 +4,7 @@ exports.InlineEditableTitle = void 0;
|
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("react");
|
|
6
6
|
const colors_1 = require("../helpers/colors");
|
|
7
|
+
const InspectorPanelLayout_1 = require("./InspectorPanelLayout");
|
|
7
8
|
const layout_1 = require("./layout");
|
|
8
9
|
const titleWrapper = {
|
|
9
10
|
boxSizing: 'border-box',
|
|
@@ -69,8 +70,8 @@ const inspectorTitleInner = {
|
|
|
69
70
|
fontSize: 13,
|
|
70
71
|
height: layout_1.COMPACT_INLINE_ROW_HEIGHT,
|
|
71
72
|
paddingBottom: 0,
|
|
72
|
-
paddingLeft:
|
|
73
|
-
paddingRight:
|
|
73
|
+
paddingLeft: InspectorPanelLayout_1.INSPECTOR_PANEL_HORIZONTAL_PADDING - 4,
|
|
74
|
+
paddingRight: InspectorPanelLayout_1.INSPECTOR_PANEL_HORIZONTAL_PADDING - 4,
|
|
74
75
|
paddingTop: 0,
|
|
75
76
|
width: '100%',
|
|
76
77
|
};
|
|
@@ -52,7 +52,7 @@ const inspectorSubtitle = {
|
|
|
52
52
|
height: 20,
|
|
53
53
|
lineHeight: '20px',
|
|
54
54
|
margin: '0 4px',
|
|
55
|
-
padding:
|
|
55
|
+
padding: `0 ${InspectorPanelLayout_1.INSPECTOR_PANEL_HORIZONTAL_PADDING - 4}px`,
|
|
56
56
|
width: 'calc(100% - 8px)',
|
|
57
57
|
};
|
|
58
58
|
const InspectorInfoHeader = ({ children, contentSized = false, minHeight, padding }) => {
|