@remotion/studio 4.0.522 → 4.0.524
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/install-package.js +4 -2
- package/dist/components/ActionTooltip.d.ts +9 -0
- package/dist/components/ActionTooltip.js +143 -0
- package/dist/components/AssetAudioVolume.d.ts +5 -0
- package/dist/components/AssetAudioVolume.js +33 -0
- package/dist/components/Canvas.js +8 -8
- package/dist/components/CaptionInspector.js +74 -20
- package/dist/components/CheckboardToggle.js +9 -10
- package/dist/components/Checkbox.d.ts +1 -0
- package/dist/components/Checkbox.js +2 -2
- package/dist/components/CompositionContextButton.js +4 -1
- package/dist/components/CompositionSelectorItem.js +2 -2
- package/dist/components/ConfigureLicenseModal.js +1 -1
- package/dist/components/CurrentAsset.js +40 -6
- package/dist/components/EditorContexts.js +3 -1
- package/dist/components/ElementInstallConfirmation.js +254 -137
- package/dist/components/FixComputedValueModal.js +38 -8
- package/dist/components/FullscreenToggle.js +8 -10
- package/dist/components/GlobalKeybindings.js +107 -49
- package/dist/components/InspectorPanel/MultiSequenceField.d.ts +12 -0
- package/dist/components/InspectorPanel/MultiSequenceField.js +131 -0
- package/dist/components/InspectorPanel/MultiSequenceInspector.d.ts +8 -0
- package/dist/components/InspectorPanel/MultiSequenceInspector.js +102 -0
- package/dist/components/InspectorPanel/MultiSequenceNumberField.d.ts +9 -0
- package/dist/components/InspectorPanel/MultiSequenceNumberField.js +88 -0
- package/dist/components/InspectorPanel.js +4 -0
- package/dist/components/InspectorSequenceSection.js +69 -6
- package/dist/components/InstallPackage.js +4 -5
- package/dist/components/KeyboardShortcutsSettings.js +212 -33
- package/dist/components/LazySyntaxHighlightedSource.d.ts +4 -0
- package/dist/components/LazySyntaxHighlightedSource.js +43 -0
- package/dist/components/LoopToggle.js +8 -2
- package/dist/components/MenuToolbar.js +11 -7
- package/dist/components/ModalContainer.d.ts +1 -0
- package/dist/components/ModalContainer.js +2 -2
- package/dist/components/Modals.js +3 -1
- package/dist/components/ModelManager.d.ts +16 -0
- package/dist/components/ModelManager.js +200 -0
- package/dist/components/ModelsSettings.d.ts +2 -0
- package/dist/components/ModelsSettings.js +133 -0
- package/dist/components/MuteToggle.d.ts +1 -0
- package/dist/components/MuteToggle.js +16 -6
- package/dist/components/NewComposition/DismissableModal.d.ts +1 -0
- package/dist/components/NewComposition/DismissableModal.js +2 -2
- package/dist/components/NewComposition/InputDragger.d.ts +2 -2
- package/dist/components/NewComposition/InputDragger.js +6 -6
- package/dist/components/NewComposition/NewComposition.d.ts +1 -0
- package/dist/components/NewComposition/NewComposition.js +5 -4
- package/dist/components/NewComposition/NewFolder.js +9 -8
- package/dist/components/NewComposition/RenameComposition.js +3 -2
- package/dist/components/NewComposition/RenameFolder.js +15 -10
- package/dist/components/NewComposition/SlugPreview.d.ts +7 -0
- package/dist/components/NewComposition/SlugPreview.js +18 -0
- package/dist/components/OptionalPackageModal.d.ts +11 -0
- package/dist/components/OptionalPackageModal.js +155 -0
- package/dist/components/OutlineToggle.js +16 -10
- package/dist/components/PlayPause.js +11 -9
- package/dist/components/PlaybackKeyboardShortcutsManager.d.ts +2 -0
- package/dist/components/PlaybackKeyboardShortcutsManager.js +39 -7
- package/dist/components/PlaybackRateSelector.js +2 -2
- package/dist/components/PreviewToolbar.js +1 -1
- package/dist/components/PreviewToolbarOverflowButton.js +19 -4
- package/dist/components/QuickSwitcher/ExplorerQuickSwitcherTrigger.js +5 -2
- package/dist/components/RadioButton.d.ts +1 -0
- package/dist/components/RadioButton.js +2 -2
- package/dist/components/RenderButton.js +5 -1
- package/dist/components/RenderModal/NumberSetting.d.ts +6 -1
- package/dist/components/RenderModal/NumberSetting.js +2 -2
- package/dist/components/RenderModal/RenderModalBasic.js +1 -1
- package/dist/components/RenderModal/RenderModalOutputName.d.ts +3 -1
- package/dist/components/RenderModal/RenderModalOutputName.js +4 -4
- package/dist/components/RenderModal/SeparateAudioOption.js +1 -1
- package/dist/components/RenderModal/WebRenderModalBasic.js +1 -1
- package/dist/components/RenderQueue/CaptionQueueItem.d.ts +6 -0
- package/dist/components/RenderQueue/CaptionQueueItem.js +130 -0
- package/dist/components/RenderQueue/CaptionQueueProcessor.d.ts +1 -0
- package/dist/components/RenderQueue/CaptionQueueProcessor.js +110 -0
- package/dist/components/RenderQueue/CaptionQueueProcessorLoader.d.ts +2 -0
- package/dist/components/RenderQueue/CaptionQueueProcessorLoader.js +54 -0
- package/dist/components/RenderQueue/RenderQueueCopyToClipboard.js +2 -1
- package/dist/components/RenderQueue/RenderQueueDownloadItem.js +2 -1
- package/dist/components/RenderQueue/RenderQueueItem.js +3 -3
- package/dist/components/RenderQueue/RenderQueueItemCancelButton.js +2 -1
- package/dist/components/RenderQueue/RenderQueueOpenInFolder.js +2 -1
- package/dist/components/RenderQueue/RenderQueueRemoveItem.js +2 -1
- package/dist/components/RenderQueue/RenderQueueRepeat.js +2 -1
- package/dist/components/RenderQueue/VideoMattingQueueItem.d.ts +6 -0
- package/dist/components/RenderQueue/VideoMattingQueueItem.js +130 -0
- package/dist/components/RenderQueue/VideoMattingQueueProcessor.d.ts +1 -0
- package/dist/components/RenderQueue/VideoMattingQueueProcessor.js +105 -0
- package/dist/components/RenderQueue/VideoMattingQueueProcessorLoader.d.ts +2 -0
- package/dist/components/RenderQueue/VideoMattingQueueProcessorLoader.js +54 -0
- package/dist/components/RenderQueue/caption-job-types.d.ts +47 -0
- package/dist/components/RenderQueue/caption-job-types.js +7 -0
- package/dist/components/RenderQueue/context.d.ts +16 -0
- package/dist/components/RenderQueue/context.js +224 -11
- package/dist/components/RenderQueue/index.js +34 -10
- package/dist/components/RenderQueue/item-style.d.ts +1 -0
- package/dist/components/RenderQueue/item-style.js +2 -1
- package/dist/components/RenderQueue/load-model-for-job.d.ts +11 -0
- package/dist/components/RenderQueue/load-model-for-job.js +14 -0
- package/dist/components/RenderQueue/video-matting-job-types.d.ts +38 -0
- package/dist/components/RenderQueue/video-matting-job-types.js +5 -0
- package/dist/components/RendersTab.js +4 -4
- package/dist/components/RulersAndGuidesToggle.js +7 -1
- package/dist/components/SegmentedControl.d.ts +2 -2
- package/dist/components/SegmentedControl.js +38 -13
- package/dist/components/SelectedOutlinePolygon.js +8 -2
- package/dist/components/SettingsButton.d.ts +4 -0
- package/dist/components/SettingsButton.js +51 -0
- package/dist/components/SettingsModal.d.ts +1 -1
- package/dist/components/SettingsModal.js +3 -1
- package/dist/components/ShowOutlinesProvider.js +12 -0
- package/dist/components/SidebarCollapserControls.js +17 -21
- package/dist/components/SizeSelector.js +12 -4
- package/dist/components/SkillsSettings.js +2 -3
- package/dist/components/SnappingToggle.js +9 -8
- package/dist/components/StudioSettings.js +32 -18
- package/dist/components/SyntaxHighlightedSource.d.ts +5 -0
- package/dist/components/SyntaxHighlightedSource.js +78 -0
- package/dist/components/Tabs/vertical.d.ts +1 -0
- package/dist/components/Tabs/vertical.js +2 -2
- package/dist/components/TimeValue.js +2 -3
- package/dist/components/Timeline/SequencePropsObserver.js +4 -0
- package/dist/components/Timeline/Timeline.js +49 -81
- package/dist/components/Timeline/TimelineClipboardKeybindings.js +2 -4
- package/dist/components/Timeline/TimelineDeleteKeybindings.js +3 -18
- package/dist/components/Timeline/TimelineDragHandler.js +2 -2
- package/dist/components/Timeline/TimelineExpandedKeyframeRow.js +1 -0
- package/dist/components/Timeline/TimelineLayerChildren.js +12 -9
- package/dist/components/Timeline/TimelineRowChrome.js +11 -3
- package/dist/components/Timeline/TimelineSchemaField.js +8 -4
- package/dist/components/Timeline/TimelineSelection.d.ts +2 -0
- package/dist/components/Timeline/TimelineSelection.js +55 -2
- package/dist/components/Timeline/TimelineSequence.js +75 -17
- package/dist/components/Timeline/TimelineSequenceItem.d.ts +0 -1
- package/dist/components/Timeline/TimelineSequenceItem.js +208 -111
- package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.d.ts +23 -3
- package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.js +73 -25
- package/dist/components/Timeline/TimelineTimeIndicators.js +1 -0
- package/dist/components/Timeline/TimelineZoomControls.js +2 -1
- package/dist/components/Timeline/timeline-field-display-utils.js +8 -5
- package/dist/components/Timeline/use-asset-timeline-context-menu.d.ts +2 -0
- package/dist/components/Timeline/use-asset-timeline-context-menu.js +52 -0
- package/dist/components/TimelineCombobox.d.ts +1 -0
- package/dist/components/TimelineCombobox.js +8 -4
- package/dist/components/TimelineInOutToggle.js +14 -18
- package/dist/components/Transcription/LazyModels.d.ts +1 -0
- package/dist/components/Transcription/LazyModels.js +5 -0
- package/dist/components/Transcription/Models.d.ts +6 -0
- package/dist/components/Transcription/Models.js +18 -0
- package/dist/components/Transcription/TranscriptionModal.d.ts +3 -0
- package/dist/components/Transcription/TranscriptionModal.js +428 -0
- package/dist/components/Transcription/TranscriptionModalWithOptionalWhisper.d.ts +5 -0
- package/dist/components/Transcription/TranscriptionModalWithOptionalWhisper.js +48 -0
- package/dist/components/Transcription/caption-output-name.d.ts +2 -0
- package/dist/components/Transcription/caption-output-name.js +10 -0
- package/dist/components/Transcription/resample-media-to-16-khz.d.ts +6 -0
- package/dist/components/Transcription/resample-media-to-16-khz.js +82 -0
- package/dist/components/Transcription/whisper-languages.d.ts +2 -0
- package/dist/components/Transcription/whisper-languages.js +104 -0
- package/dist/components/Transcription/whisper-webgpu-capability.d.ts +2 -0
- package/dist/components/Transcription/whisper-webgpu-capability.js +7 -0
- package/dist/components/UndoRedoButtons.js +13 -38
- package/dist/components/UpdatesSettings.js +8 -12
- package/dist/components/VideoMatting/LazyModels.d.ts +1 -0
- package/dist/components/VideoMatting/LazyModels.js +5 -0
- package/dist/components/VideoMatting/Models.d.ts +6 -0
- package/dist/components/VideoMatting/Models.js +18 -0
- package/dist/components/VideoMatting/VideoMattingModal.d.ts +3 -0
- package/dist/components/VideoMatting/VideoMattingModal.js +207 -0
- package/dist/components/VideoMatting/VideoMattingModalWithOptionalPackage.d.ts +5 -0
- package/dist/components/VideoMatting/VideoMattingModalWithOptionalPackage.js +46 -0
- package/dist/components/VideoMatting/video-matting-capability.d.ts +2 -0
- package/dist/components/VideoMatting/video-matting-capability.js +7 -0
- package/dist/components/WebMcp.js +439 -22
- package/dist/components/handle-drop.js +3 -2
- package/dist/components/import-assets.d.ts +3 -2
- package/dist/components/import-assets.js +5 -9
- package/dist/components/keyboard-shortcuts.d.ts +17 -1
- package/dist/components/keyboard-shortcuts.js +191 -89
- package/dist/components/public-output-name.d.ts +5 -0
- package/dist/components/public-output-name.js +60 -0
- package/dist/components/use-model-cache-status.d.ts +7 -0
- package/dist/components/use-model-cache-status.js +35 -0
- package/dist/error-overlay/remotion-overlay/CodeFrame.js +29 -18
- package/dist/esm/CaptionQueueProcessor-k0yrm3dj.mjs +211 -0
- package/dist/esm/LazyModels-hc33szyn.mjs +11 -0
- package/dist/esm/LazyModels-sg40rjw6.mjs +11 -0
- package/dist/esm/SyntaxHighlightedSource-3xks91rz.mjs +1236 -0
- package/dist/esm/TranscriptionModal-3ctnxpt6.mjs +1011 -0
- package/dist/esm/VideoMattingModal-b0r7e60n.mjs +374 -0
- package/dist/esm/VideoMattingQueueProcessor-t1hgm2rm.mjs +109 -0
- package/dist/esm/index-1b9skrrd.mjs +142 -0
- package/dist/esm/index-2j3d1g81.mjs +261 -0
- package/dist/esm/index-5zrb1ft4.mjs +39 -0
- package/dist/esm/index-7tt71e8n.mjs +36 -0
- package/dist/esm/index-9qtvmwtx.mjs +1366 -0
- package/dist/esm/index-9x6e1dq0.mjs +428 -0
- package/dist/esm/index-c37kme2v.mjs +46209 -0
- package/dist/esm/index-cw0pnpg5.mjs +50 -0
- package/dist/esm/index-e3zwf3e7.mjs +36 -0
- package/dist/esm/index-er3mh6em.mjs +54688 -0
- package/dist/esm/{chunk-je0h1bgt.js → index-k426ye99.mjs} +4 -1
- package/dist/esm/index-q2epbw93.mjs +423 -0
- package/dist/esm/index-q5xv20xx.mjs +41 -0
- package/dist/esm/{chunk-6jf1natv.js → index-rcv7qkt5.mjs} +18 -1
- package/dist/esm/index-v4tr1bft.mjs +20 -0
- package/dist/esm/index-wbmp5srk.mjs +35 -0
- package/dist/esm/index-yfrysr5f.mjs +1154 -0
- package/dist/esm/index.mjs +45 -933
- package/dist/esm/internals.mjs +13 -114393
- package/dist/esm/previewEntry.mjs +387 -115050
- package/dist/esm/renderEntry.mjs +5 -5
- package/dist/esm/{chunk-m0jqdbkr.js → resolve-composition-component-location-bt2d6qxq.mjs} +1 -1
- package/dist/helpers/colors.d.ts +1 -0
- package/dist/helpers/colors.js +4 -3
- package/dist/helpers/drag-aware-double-click.d.ts +2 -1
- package/dist/helpers/drag-aware-double-click.js +12 -1
- package/dist/helpers/get-asset-metadata.d.ts +1 -0
- package/dist/helpers/get-asset-metadata.js +4 -0
- package/dist/helpers/hoverable.js +8 -0
- package/dist/helpers/inject-css.js +2 -0
- package/dist/helpers/optional-package-dependencies.d.ts +3 -0
- package/dist/helpers/optional-package-dependencies.js +24 -0
- package/dist/helpers/pointer-session.d.ts +6 -0
- package/dist/helpers/pointer-session.js +36 -14
- package/dist/helpers/prism-vsc-dark-plus.d.ts +1 -0
- package/dist/helpers/prism-vsc-dark-plus.js +305 -0
- package/dist/helpers/sequence-node-path-mutations.js +11 -0
- package/dist/helpers/slugify-name.d.ts +1 -0
- package/dist/helpers/slugify-name.js +14 -0
- package/dist/helpers/studio-runtime-config.d.ts +1 -0
- package/dist/helpers/studio-runtime-config.js +6 -1
- package/dist/helpers/use-create-composition.d.ts +1 -0
- package/dist/helpers/use-create-composition.js +12 -7
- package/dist/helpers/use-keybinding.d.ts +9 -3
- package/dist/helpers/use-keybinding.js +8 -9
- package/dist/helpers/use-keyboard-shortcut-label.d.ts +2 -0
- package/dist/helpers/use-keyboard-shortcut-label.js +15 -0
- package/dist/helpers/use-menu-structure.js +59 -14
- package/dist/helpers/use-rename-composition.d.ts +1 -0
- package/dist/helpers/use-rename-composition.js +11 -5
- package/dist/icons/input-props.d.ts +1 -1
- package/dist/icons/input-props.js +2 -2
- package/dist/icons/models.d.ts +4 -0
- package/dist/icons/models.js +7 -0
- package/dist/icons/separation.d.ts +4 -0
- package/dist/icons/separation.js +7 -0
- package/dist/icons/skills.js +1 -1
- package/dist/icons/transcription.d.ts +4 -0
- package/dist/icons/transcription.js +7 -0
- package/dist/icons/upload.js +1 -1
- package/dist/renderEntry.js +2 -2
- package/dist/state/modals.d.ts +14 -2
- package/package.json +35 -21
- package/dist/components/UpdateCheck.d.ts +0 -1
- package/dist/components/UpdateCheck.js +0 -79
- package/dist/esm/chunk-3netyjd9.js +0 -99793
|
@@ -7,8 +7,10 @@ const colors_1 = require("../helpers/colors");
|
|
|
7
7
|
const copy_text_1 = require("../helpers/copy-text");
|
|
8
8
|
const use_copy_feedback_1 = require("../helpers/use-copy-feedback");
|
|
9
9
|
const copy_1 = require("../icons/copy");
|
|
10
|
+
const skills_1 = require("../icons/skills");
|
|
10
11
|
const CodingAgentButton_1 = require("./CodingAgentButton");
|
|
11
12
|
const InlineAction_1 = require("./InlineAction");
|
|
13
|
+
const ModalContainer_1 = require("./ModalContainer");
|
|
12
14
|
const ModalFooter_1 = require("./ModalFooter");
|
|
13
15
|
const ModalHeader_1 = require("./ModalHeader");
|
|
14
16
|
const DismissableModal_1 = require("./NewComposition/DismissableModal");
|
|
@@ -16,10 +18,17 @@ const NotificationCenter_1 = require("./Notifications/NotificationCenter");
|
|
|
16
18
|
const SettingsContext_1 = require("./SettingsContext");
|
|
17
19
|
const panelStyle = {
|
|
18
20
|
borderRadius: 6,
|
|
21
|
+
display: 'flex',
|
|
22
|
+
flexDirection: 'column',
|
|
23
|
+
width: (0, ModalContainer_1.getMaxModalWidth)(560),
|
|
24
|
+
maxHeight: (0, ModalContainer_1.getMaxModalHeight)(800),
|
|
25
|
+
minWidth: 0,
|
|
19
26
|
overflow: 'hidden',
|
|
20
27
|
};
|
|
21
28
|
const container = {
|
|
22
|
-
padding:
|
|
29
|
+
padding: 16,
|
|
30
|
+
minHeight: 0,
|
|
31
|
+
overflowY: 'auto',
|
|
23
32
|
};
|
|
24
33
|
const text = {
|
|
25
34
|
color: colors_1.LIGHT_TEXT,
|
|
@@ -28,11 +37,12 @@ const text = {
|
|
|
28
37
|
lineHeight: 1.5,
|
|
29
38
|
};
|
|
30
39
|
const commandField = {
|
|
31
|
-
alignItems: '
|
|
32
|
-
background: colors_1.
|
|
40
|
+
alignItems: 'flex-start',
|
|
41
|
+
background: colors_1.BLACK_ALPHA_30,
|
|
33
42
|
borderRadius: 6,
|
|
34
43
|
boxSizing: 'border-box',
|
|
35
44
|
display: 'flex',
|
|
45
|
+
gap: 8,
|
|
36
46
|
marginTop: 10,
|
|
37
47
|
padding: '8px 8px 8px 10px',
|
|
38
48
|
width: '100%',
|
|
@@ -41,13 +51,23 @@ const code = {
|
|
|
41
51
|
color: colors_1.WHITE,
|
|
42
52
|
flex: 1,
|
|
43
53
|
fontFamily: 'monospace',
|
|
44
|
-
fontSize:
|
|
54
|
+
fontSize: 13,
|
|
45
55
|
lineHeight: 1.5,
|
|
46
56
|
margin: 0,
|
|
47
57
|
minWidth: 0,
|
|
48
|
-
|
|
58
|
+
overflowWrap: 'anywhere',
|
|
49
59
|
whiteSpace: 'pre-wrap',
|
|
50
60
|
};
|
|
61
|
+
const copyAction = {
|
|
62
|
+
flexShrink: 0,
|
|
63
|
+
};
|
|
64
|
+
const skillsIcon = {
|
|
65
|
+
display: 'inline-block',
|
|
66
|
+
height: 18,
|
|
67
|
+
width: 18,
|
|
68
|
+
marginRight: 6,
|
|
69
|
+
verticalAlign: 'middle',
|
|
70
|
+
};
|
|
51
71
|
const copyIcon = {
|
|
52
72
|
flexShrink: 0,
|
|
53
73
|
height: 12,
|
|
@@ -56,12 +76,16 @@ const copyIcon = {
|
|
|
56
76
|
const footer = {
|
|
57
77
|
display: 'flex',
|
|
58
78
|
flex: 'none',
|
|
79
|
+
minWidth: 0,
|
|
80
|
+
padding: '12px 16px',
|
|
59
81
|
justifyContent: 'flex-end',
|
|
60
82
|
};
|
|
61
83
|
const FixComputedValueModal = ({ state }) => {
|
|
62
84
|
var _a;
|
|
63
85
|
const { codingAgentInfo } = (0, SettingsContext_1.useSettings)();
|
|
64
|
-
const
|
|
86
|
+
const skillName = '/remotion-interactivity';
|
|
87
|
+
const promptDetails = ` ${state.context} make "${state.prop}" interactive`;
|
|
88
|
+
const prompt = `${skillName}${promptDetails}`;
|
|
65
89
|
const installCommand = 'npx remotion skills add';
|
|
66
90
|
const hasCodingAgent = ((_a = codingAgentInfo === null || codingAgentInfo === void 0 ? void 0 : codingAgentInfo.installedCodingAgents.length) !== null && _a !== void 0 ? _a : 0) > 0;
|
|
67
91
|
const { copied: promptCopied, markCopied: markPromptCopied } = (0, use_copy_feedback_1.useCopyFeedback)();
|
|
@@ -89,7 +113,7 @@ const FixComputedValueModal = ({ state }) => {
|
|
|
89
113
|
return (jsx_runtime_1.jsxs(DismissableModal_1.DismissableModal, { panelStyle: panelStyle, children: [
|
|
90
114
|
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: [
|
|
91
115
|
jsx_runtime_1.jsx("div", { style: text, children: "First, install the Remotion Agent Skills:" }), jsx_runtime_1.jsxs("div", { style: commandField, children: [
|
|
92
|
-
jsx_runtime_1.jsx("pre", { style: code, children: installCommand }), jsx_runtime_1.jsx(InlineAction_1.InlineAction, { variant: null, onClick: onCopyInstallCommand, renderAction: renderInstallCommandCopyAction, title: "Copy command" })
|
|
116
|
+
jsx_runtime_1.jsx("pre", { style: code, children: installCommand }), jsx_runtime_1.jsx(InlineAction_1.InlineAction, { style: copyAction, variant: null, onClick: onCopyInstallCommand, renderAction: renderInstallCommandCopyAction, title: "Copy command" })
|
|
93
117
|
] })
|
|
94
118
|
] })), jsx_runtime_1.jsx("div", { style: {
|
|
95
119
|
...text,
|
|
@@ -97,7 +121,13 @@ const FixComputedValueModal = ({ state }) => {
|
|
|
97
121
|
}, children: state.remotionInteractivitySkillAvailable
|
|
98
122
|
? 'Paste this prompt into your coding agent to make this value editable in Studio:'
|
|
99
123
|
: 'Then, paste this prompt into your coding agent:' }), jsx_runtime_1.jsxs("div", { style: commandField, children: [
|
|
100
|
-
jsx_runtime_1.
|
|
124
|
+
jsx_runtime_1.jsxs("pre", { style: code, children: [
|
|
125
|
+
jsx_runtime_1.jsx(skills_1.SkillsIcon, { color: colors_1.BLUE, style: skillsIcon, "aria-hidden": true }), jsx_runtime_1.jsx("span", { style: {
|
|
126
|
+
color: colors_1.BLUE,
|
|
127
|
+
fontFamily: 'inherit',
|
|
128
|
+
fontSize: 'inherit',
|
|
129
|
+
lineHeight: 'inherit',
|
|
130
|
+
}, children: skillName }), promptDetails] }), jsx_runtime_1.jsx(InlineAction_1.InlineAction, { style: copyAction, variant: null, onClick: onCopyPrompt, renderAction: renderPromptCopyAction, title: "Copy prompt" })
|
|
101
131
|
] })
|
|
102
132
|
] }), hasCodingAgent ? (jsx_runtime_1.jsx(ModalFooter_1.ModalFooterContainer, { style: footer, children: jsx_runtime_1.jsx(CodingAgentButton_1.CodingAgentButton, { label: "Open in", prompt: prompt, size: "compact", style: null }) })) : null] }));
|
|
103
133
|
};
|
|
@@ -4,17 +4,12 @@ exports.FullScreenToggle = void 0;
|
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("react");
|
|
6
6
|
const remotion_1 = require("remotion");
|
|
7
|
-
const no_react_1 = require("remotion/no-react");
|
|
8
7
|
const use_keybinding_1 = require("../helpers/use-keybinding");
|
|
8
|
+
const use_keyboard_shortcut_label_1 = require("../helpers/use-keyboard-shortcut-label");
|
|
9
9
|
const fullscreen_1 = require("../icons/fullscreen");
|
|
10
10
|
const canvas_ref_1 = require("../state/canvas-ref");
|
|
11
|
+
const ActionTooltip_1 = require("./ActionTooltip");
|
|
11
12
|
const ControlButton_1 = require("./ControlButton");
|
|
12
|
-
const accessibilityLabel = [
|
|
13
|
-
'Enter fullscreen preview',
|
|
14
|
-
(0, use_keybinding_1.areKeyboardShortcutsDisabled)() ? null : '(F)',
|
|
15
|
-
]
|
|
16
|
-
.filter(no_react_1.NoReactInternals.truthy)
|
|
17
|
-
.join(' ');
|
|
18
13
|
const FullScreenToggle = ({ hidden }) => {
|
|
19
14
|
const keybindings = (0, use_keybinding_1.useKeybinding)();
|
|
20
15
|
const { setSize } = (0, react_1.useContext)(remotion_1.Internals.PreviewSizeContext);
|
|
@@ -30,12 +25,15 @@ const FullScreenToggle = ({ hidden }) => {
|
|
|
30
25
|
},
|
|
31
26
|
}));
|
|
32
27
|
}, [setSize]);
|
|
28
|
+
const shortcut = (0, use_keyboard_shortcut_label_1.useKeyboardShortcutLabel)('enterFullscreen');
|
|
29
|
+
const ariaKeyShortcuts = (0, use_keyboard_shortcut_label_1.useKeyboardShortcutAriaKeyShortcuts)('enterFullscreen');
|
|
30
|
+
const accessibilityLabel = 'Enter fullscreen preview';
|
|
31
|
+
const shortcutsDisabled = (0, use_keybinding_1.areKeyboardShortcutsDisabled)();
|
|
33
32
|
(0, react_1.useEffect)(() => {
|
|
34
33
|
const f = keybindings.registerKeybinding({
|
|
35
34
|
event: 'keydown',
|
|
36
|
-
|
|
35
|
+
action: 'enterFullscreen',
|
|
37
36
|
callback: onClick,
|
|
38
|
-
commandCtrlKey: false,
|
|
39
37
|
preventDefault: true,
|
|
40
38
|
triggerIfInputFieldFocused: false,
|
|
41
39
|
keepRegisteredWhenNotHighestContext: false,
|
|
@@ -44,6 +42,6 @@ const FullScreenToggle = ({ hidden }) => {
|
|
|
44
42
|
f.unregister();
|
|
45
43
|
};
|
|
46
44
|
}, [keybindings, onClick]);
|
|
47
|
-
return hidden ? (jsx_runtime_1.jsx("button", { id: "fullscreen-toggle", type: "button", style: { display: 'none' }, onClick: onClick })) : (jsx_runtime_1.jsx(ControlButton_1.ControlButton, { id: "fullscreen-toggle", title:
|
|
45
|
+
return hidden ? (jsx_runtime_1.jsx("button", { id: "fullscreen-toggle", type: "button", style: { display: 'none' }, onClick: onClick })) : (jsx_runtime_1.jsx(ActionTooltip_1.ActionTooltip, { label: accessibilityLabel, shortcut: shortcutsDisabled ? null : shortcut, delay: 800, dismissOnClick: true, children: jsx_runtime_1.jsx(ControlButton_1.ControlButton, { id: "fullscreen-toggle", title: "", "aria-label": accessibilityLabel, "aria-keyshortcuts": shortcutsDisabled ? undefined : ariaKeyShortcuts || undefined, onClick: onClick, children: (color) => (jsx_runtime_1.jsx(fullscreen_1.FullscreenIcon, { color: color, style: { width: 18, height: 18 } })) }) }));
|
|
48
46
|
};
|
|
49
47
|
exports.FullScreenToggle = FullScreenToggle;
|
|
@@ -4,10 +4,14 @@ exports.GlobalKeybindings = void 0;
|
|
|
4
4
|
const react_1 = require("react");
|
|
5
5
|
const remotion_1 = require("remotion");
|
|
6
6
|
const calculate_timeline_1 = require("../helpers/calculate-timeline");
|
|
7
|
+
const get_preview_file_type_1 = require("../helpers/get-preview-file-type");
|
|
7
8
|
const studio_runtime_config_1 = require("../helpers/studio-runtime-config");
|
|
8
9
|
const timeline_node_path_key_1 = require("../helpers/timeline-node-path-key");
|
|
9
10
|
const use_keybinding_1 = require("../helpers/use-keybinding");
|
|
10
11
|
const checkerboard_1 = require("../state/checkerboard");
|
|
12
|
+
const editor_guides_1 = require("../state/editor-guides");
|
|
13
|
+
const editor_outlines_1 = require("../state/editor-outlines");
|
|
14
|
+
const editor_rulers_1 = require("../state/editor-rulers");
|
|
11
15
|
const editor_snapping_1 = require("../state/editor-snapping");
|
|
12
16
|
const modals_1 = require("../state/modals");
|
|
13
17
|
const AskAiModal_1 = require("./AskAiModal");
|
|
@@ -15,18 +19,71 @@ const CompositionSelector_1 = require("./CompositionSelector");
|
|
|
15
19
|
const ExplorerPanelRef_1 = require("./ExplorerPanelRef");
|
|
16
20
|
const NotificationCenter_1 = require("./Notifications/NotificationCenter");
|
|
17
21
|
const TimelineSelection_1 = require("./Timeline/TimelineSelection");
|
|
18
|
-
const sequencePropShortcuts =
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
const sequencePropShortcuts = [
|
|
23
|
+
{ action: 'selectTranslateProp', fieldKey: 'style.translate' },
|
|
24
|
+
{ action: 'selectRotateProp', fieldKey: 'style.rotate' },
|
|
25
|
+
{ action: 'selectScaleProp', fieldKey: 'style.scale' },
|
|
26
|
+
{ action: 'selectOpacityProp', fieldKey: 'style.opacity' },
|
|
27
|
+
];
|
|
24
28
|
const hasOwnProperty = (obj, key) => Object.prototype.hasOwnProperty.call(obj, key);
|
|
25
29
|
const GlobalKeybindings = () => {
|
|
26
30
|
const keybindings = (0, use_keybinding_1.useKeybinding)();
|
|
27
31
|
const { setSelectedModal } = (0, react_1.useContext)(modals_1.SetSelectedModalContext);
|
|
28
32
|
const { setCheckerboard } = (0, react_1.useContext)(checkerboard_1.CheckerboardContext);
|
|
29
33
|
const { setEditorSnapping } = (0, react_1.useContext)(editor_snapping_1.EditorSnappingContext);
|
|
34
|
+
const { canvasContent } = (0, react_1.useContext)(remotion_1.Internals.CompositionManager);
|
|
35
|
+
const { setEditorShowOutlines } = (0, react_1.useContext)(editor_outlines_1.EditorShowOutlinesContext);
|
|
36
|
+
const { editorShowRulers, setEditorShowRulers } = (0, react_1.useContext)(editor_rulers_1.EditorShowRulersContext);
|
|
37
|
+
const { editorShowGuides, setEditorShowGuides } = (0, react_1.useContext)(editor_guides_1.EditorShowGuidesContext);
|
|
38
|
+
const showGuides = (canvasContent === null || canvasContent === void 0 ? void 0 : canvasContent.type) === 'composition';
|
|
39
|
+
const showCanvasViewControls = showGuides ||
|
|
40
|
+
((canvasContent === null || canvasContent === void 0 ? void 0 : canvasContent.type) === 'asset' &&
|
|
41
|
+
(0, get_preview_file_type_1.getPreviewFileType)(canvasContent.asset) === 'video');
|
|
42
|
+
(0, react_1.useEffect)(() => {
|
|
43
|
+
if (!showCanvasViewControls)
|
|
44
|
+
return;
|
|
45
|
+
const outlines = showGuides
|
|
46
|
+
? keybindings.registerKeybinding({
|
|
47
|
+
event: 'keydown',
|
|
48
|
+
action: 'toggleOutlines',
|
|
49
|
+
callback: (event) => {
|
|
50
|
+
if (!event.repeat)
|
|
51
|
+
setEditorShowOutlines((current) => !current);
|
|
52
|
+
},
|
|
53
|
+
preventDefault: true,
|
|
54
|
+
triggerIfInputFieldFocused: false,
|
|
55
|
+
keepRegisteredWhenNotHighestContext: false,
|
|
56
|
+
})
|
|
57
|
+
: null;
|
|
58
|
+
const rulers = keybindings.registerKeybinding({
|
|
59
|
+
event: 'keydown',
|
|
60
|
+
action: 'toggleRulersAndGuides',
|
|
61
|
+
callback: (event) => {
|
|
62
|
+
if (event.repeat)
|
|
63
|
+
return;
|
|
64
|
+
const visible = editorShowRulers || (showGuides && editorShowGuides);
|
|
65
|
+
setEditorShowRulers(() => !visible);
|
|
66
|
+
if (showGuides)
|
|
67
|
+
setEditorShowGuides(() => !visible);
|
|
68
|
+
},
|
|
69
|
+
preventDefault: true,
|
|
70
|
+
triggerIfInputFieldFocused: false,
|
|
71
|
+
keepRegisteredWhenNotHighestContext: false,
|
|
72
|
+
});
|
|
73
|
+
return () => {
|
|
74
|
+
outlines === null || outlines === void 0 ? void 0 : outlines.unregister();
|
|
75
|
+
rulers.unregister();
|
|
76
|
+
};
|
|
77
|
+
}, [
|
|
78
|
+
keybindings,
|
|
79
|
+
showCanvasViewControls,
|
|
80
|
+
showGuides,
|
|
81
|
+
editorShowRulers,
|
|
82
|
+
editorShowGuides,
|
|
83
|
+
setEditorShowOutlines,
|
|
84
|
+
setEditorShowRulers,
|
|
85
|
+
setEditorShowGuides,
|
|
86
|
+
]);
|
|
30
87
|
const currentSelection = (0, TimelineSelection_1.useCurrentTimelineSelectionStateAsRef)();
|
|
31
88
|
const { sequences } = (0, react_1.useContext)(remotion_1.Internals.SequenceManager);
|
|
32
89
|
const videoConfig = remotion_1.Internals.useUnsafeVideoConfig();
|
|
@@ -84,29 +141,9 @@ const GlobalKeybindings = () => {
|
|
|
84
141
|
renderButton.click();
|
|
85
142
|
}, [video]);
|
|
86
143
|
(0, react_1.useEffect)(() => {
|
|
87
|
-
const onSequencePropKey = (event) => {
|
|
88
|
-
const key = event.key.toLowerCase();
|
|
89
|
-
const fieldKey = sequencePropShortcuts[key];
|
|
90
|
-
if (!fieldKey) {
|
|
91
|
-
return;
|
|
92
|
-
}
|
|
93
|
-
if (selectSequenceProp(fieldKey)) {
|
|
94
|
-
event.preventDefault();
|
|
95
|
-
return;
|
|
96
|
-
}
|
|
97
|
-
if (key === 't') {
|
|
98
|
-
setCheckerboard((c) => !c);
|
|
99
|
-
event.preventDefault();
|
|
100
|
-
return;
|
|
101
|
-
}
|
|
102
|
-
if (key === 'r') {
|
|
103
|
-
openRenderModal();
|
|
104
|
-
event.preventDefault();
|
|
105
|
-
}
|
|
106
|
-
};
|
|
107
144
|
const cmdKKey = keybindings.registerKeybinding({
|
|
108
145
|
event: 'keydown',
|
|
109
|
-
|
|
146
|
+
action: 'quickSwitcher',
|
|
110
147
|
callback: () => {
|
|
111
148
|
var _a;
|
|
112
149
|
setSelectedModal({
|
|
@@ -121,7 +158,6 @@ const GlobalKeybindings = () => {
|
|
|
121
158
|
},
|
|
122
159
|
triggerIfInputFieldFocused: true,
|
|
123
160
|
keepRegisteredWhenNotHighestContext: false,
|
|
124
|
-
commandCtrlKey: true,
|
|
125
161
|
preventDefault: true,
|
|
126
162
|
});
|
|
127
163
|
const cmdSKey = keybindings.registerKeybinding({
|
|
@@ -138,29 +174,57 @@ const GlobalKeybindings = () => {
|
|
|
138
174
|
const cmdIKey = (0, studio_runtime_config_1.getStudioAskAIEnabled)()
|
|
139
175
|
? keybindings.registerKeybinding({
|
|
140
176
|
event: 'keydown',
|
|
141
|
-
|
|
177
|
+
action: 'askAI',
|
|
142
178
|
callback: () => {
|
|
143
179
|
var _a;
|
|
144
180
|
(_a = AskAiModal_1.askAiModalRef.current) === null || _a === void 0 ? void 0 : _a.toggle();
|
|
145
181
|
},
|
|
146
182
|
triggerIfInputFieldFocused: true,
|
|
147
183
|
keepRegisteredWhenNotHighestContext: true,
|
|
148
|
-
commandCtrlKey: true,
|
|
149
184
|
preventDefault: true,
|
|
150
185
|
})
|
|
151
186
|
: null;
|
|
152
|
-
const sequencePropKeys =
|
|
187
|
+
const sequencePropKeys = sequencePropShortcuts.map(({ action, fieldKey }) => keybindings.registerKeybinding({
|
|
153
188
|
event: 'keydown',
|
|
154
|
-
|
|
155
|
-
callback:
|
|
156
|
-
|
|
189
|
+
action,
|
|
190
|
+
callback: (event) => {
|
|
191
|
+
if (selectSequenceProp(fieldKey)) {
|
|
192
|
+
event.preventDefault();
|
|
193
|
+
}
|
|
194
|
+
},
|
|
157
195
|
preventDefault: false,
|
|
158
196
|
triggerIfInputFieldFocused: false,
|
|
159
197
|
keepRegisteredWhenNotHighestContext: false,
|
|
160
198
|
}));
|
|
199
|
+
const render = keybindings.registerKeybinding({
|
|
200
|
+
event: 'keydown',
|
|
201
|
+
action: 'render',
|
|
202
|
+
callback: (event) => {
|
|
203
|
+
if (event.defaultPrevented)
|
|
204
|
+
return;
|
|
205
|
+
openRenderModal();
|
|
206
|
+
event.preventDefault();
|
|
207
|
+
},
|
|
208
|
+
preventDefault: false,
|
|
209
|
+
triggerIfInputFieldFocused: false,
|
|
210
|
+
keepRegisteredWhenNotHighestContext: false,
|
|
211
|
+
});
|
|
212
|
+
const checkerboard = keybindings.registerKeybinding({
|
|
213
|
+
event: 'keydown',
|
|
214
|
+
action: 'toggleCheckerboard',
|
|
215
|
+
callback: (event) => {
|
|
216
|
+
if (event.defaultPrevented)
|
|
217
|
+
return;
|
|
218
|
+
setCheckerboard((current) => !current);
|
|
219
|
+
event.preventDefault();
|
|
220
|
+
},
|
|
221
|
+
preventDefault: false,
|
|
222
|
+
triggerIfInputFieldFocused: false,
|
|
223
|
+
keepRegisteredWhenNotHighestContext: false,
|
|
224
|
+
});
|
|
161
225
|
const questionMark = keybindings.registerKeybinding({
|
|
162
|
-
event: '
|
|
163
|
-
|
|
226
|
+
event: 'keydown',
|
|
227
|
+
action: 'showKeyboardShortcuts',
|
|
164
228
|
callback: () => {
|
|
165
229
|
var _a;
|
|
166
230
|
var _b;
|
|
@@ -170,41 +234,33 @@ const GlobalKeybindings = () => {
|
|
|
170
234
|
initialPublicLicenseKey: (_b = (_a = window.remotion_renderDefaults) === null || _a === void 0 ? void 0 : _a.publicLicenseKey) !== null && _b !== void 0 ? _b : null,
|
|
171
235
|
});
|
|
172
236
|
},
|
|
173
|
-
commandCtrlKey: false,
|
|
174
237
|
preventDefault: true,
|
|
175
238
|
triggerIfInputFieldFocused: false,
|
|
176
239
|
keepRegisteredWhenNotHighestContext: false,
|
|
177
240
|
});
|
|
178
241
|
const pageDown = keybindings.registerKeybinding({
|
|
179
242
|
event: 'keydown',
|
|
180
|
-
|
|
243
|
+
action: 'nextComposition',
|
|
181
244
|
callback: navigateToNextComposition,
|
|
182
|
-
commandCtrlKey: false,
|
|
183
245
|
preventDefault: true,
|
|
184
246
|
triggerIfInputFieldFocused: false,
|
|
185
247
|
keepRegisteredWhenNotHighestContext: false,
|
|
186
248
|
});
|
|
187
249
|
const pageUp = keybindings.registerKeybinding({
|
|
188
250
|
event: 'keydown',
|
|
189
|
-
|
|
251
|
+
action: 'previousComposition',
|
|
190
252
|
callback: navigateToPreviousComposition,
|
|
191
|
-
commandCtrlKey: false,
|
|
192
253
|
preventDefault: true,
|
|
193
254
|
triggerIfInputFieldFocused: false,
|
|
194
255
|
keepRegisteredWhenNotHighestContext: false,
|
|
195
256
|
});
|
|
196
257
|
const shiftMKey = keybindings.registerKeybinding({
|
|
197
258
|
event: 'keydown',
|
|
198
|
-
|
|
199
|
-
callback: (
|
|
200
|
-
if (!event.shiftKey) {
|
|
201
|
-
return;
|
|
202
|
-
}
|
|
259
|
+
action: 'toggleSnapping',
|
|
260
|
+
callback: () => {
|
|
203
261
|
setEditorSnapping((current) => !current);
|
|
204
|
-
event.preventDefault();
|
|
205
262
|
},
|
|
206
|
-
|
|
207
|
-
preventDefault: false,
|
|
263
|
+
preventDefault: true,
|
|
208
264
|
triggerIfInputFieldFocused: false,
|
|
209
265
|
keepRegisteredWhenNotHighestContext: false,
|
|
210
266
|
});
|
|
@@ -212,6 +268,8 @@ const GlobalKeybindings = () => {
|
|
|
212
268
|
for (const sequencePropKey of sequencePropKeys) {
|
|
213
269
|
sequencePropKey.unregister();
|
|
214
270
|
}
|
|
271
|
+
render.unregister();
|
|
272
|
+
checkerboard.unregister();
|
|
215
273
|
questionMark.unregister();
|
|
216
274
|
cmdKKey.unregister();
|
|
217
275
|
cmdSKey.unregister();
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { SequencePropsSubscriptionKey, TSequence } from 'remotion';
|
|
3
|
+
import type { SchemaFieldInfo } from '../../helpers/timeline-layout';
|
|
4
|
+
export type MultiSequenceTarget = {
|
|
5
|
+
readonly nodePath: SequencePropsSubscriptionKey;
|
|
6
|
+
readonly controls: NonNullable<TSequence['controls']>;
|
|
7
|
+
};
|
|
8
|
+
export declare const MultiSequenceField: React.FC<{
|
|
9
|
+
readonly field: SchemaFieldInfo;
|
|
10
|
+
readonly targets: MultiSequenceTarget[];
|
|
11
|
+
readonly readOnlyStudio: boolean;
|
|
12
|
+
}>;
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MultiSequenceField = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_1 = require("react");
|
|
6
|
+
const remotion_1 = require("remotion");
|
|
7
|
+
const client_id_1 = require("../../helpers/client-id");
|
|
8
|
+
const colors_1 = require("../../helpers/colors");
|
|
9
|
+
const interactivity_enabled_1 = require("../../helpers/interactivity-enabled");
|
|
10
|
+
const noop_1 = require("../../helpers/noop");
|
|
11
|
+
const NotificationCenter_1 = require("../Notifications/NotificationCenter");
|
|
12
|
+
const save_sequence_prop_1 = require("../Timeline/save-sequence-prop");
|
|
13
|
+
const TimelineExpandArrowButton_1 = require("../Timeline/TimelineExpandArrowButton");
|
|
14
|
+
const TimelineFieldRowContent_1 = require("../Timeline/TimelineFieldRowContent");
|
|
15
|
+
const TimelineLayerEye_1 = require("../Timeline/TimelineLayerEye");
|
|
16
|
+
const TimelineRowChrome_1 = require("../Timeline/TimelineRowChrome");
|
|
17
|
+
const TimelineSchemaField_1 = require("../Timeline/TimelineSchemaField");
|
|
18
|
+
const MultiSequenceNumberField_1 = require("./MultiSequenceNumberField");
|
|
19
|
+
const MultiSequenceField = ({ field, targets, readOnlyStudio }) => {
|
|
20
|
+
var _a;
|
|
21
|
+
const { propStatuses } = (0, react_1.useContext)(remotion_1.Internals.VisualModePropStatusesContext);
|
|
22
|
+
const { setPropStatuses, setDragOverrides, clearDragOverrides } = (0, react_1.useContext)(remotion_1.Internals.VisualModeSettersContext);
|
|
23
|
+
const { previewServerState } = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx);
|
|
24
|
+
const [editingMixed, setEditingMixed] = (0, react_1.useState)(false);
|
|
25
|
+
const statuses = targets.map((target) => {
|
|
26
|
+
var _a;
|
|
27
|
+
return (_a = remotion_1.Internals.getPropStatusesCtx(propStatuses, target.nodePath)) === null || _a === void 0 ? void 0 : _a[field.key];
|
|
28
|
+
});
|
|
29
|
+
const values = statuses.map((status) => (status === null || status === void 0 ? void 0 : status.status) === 'static'
|
|
30
|
+
? remotion_1.Internals.getEffectiveVisualModeValue({
|
|
31
|
+
propStatus: status,
|
|
32
|
+
dragOverrideValue: undefined,
|
|
33
|
+
defaultValue: field.fieldSchema.default,
|
|
34
|
+
shouldResortToDefaultValueIfUndefined: true,
|
|
35
|
+
})
|
|
36
|
+
: undefined);
|
|
37
|
+
const mixed = values.some((value) => JSON.stringify(value) !== JSON.stringify(values[0]));
|
|
38
|
+
const staticValues = statuses.every((status) => (status === null || status === void 0 ? void 0 : status.status) === 'static');
|
|
39
|
+
const editable = !readOnlyStudio &&
|
|
40
|
+
(0, interactivity_enabled_1.isStudioInteractivityEnabled)() &&
|
|
41
|
+
previewServerState.type === 'connected' &&
|
|
42
|
+
staticValues;
|
|
43
|
+
const clear = (0, react_1.useCallback)(() => {
|
|
44
|
+
for (const target of targets) {
|
|
45
|
+
clearDragOverrides(target.nodePath);
|
|
46
|
+
}
|
|
47
|
+
}, [clearDragOverrides, targets]);
|
|
48
|
+
(0, react_1.useEffect)(() => clear, [clear]);
|
|
49
|
+
const preview = (0, react_1.useCallback)((nextValues) => {
|
|
50
|
+
if (!editable) {
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
for (const [index, target] of targets.entries()) {
|
|
54
|
+
setDragOverrides(target.nodePath, field.key, remotion_1.Internals.makeStaticDragOverride(nextValues[index]));
|
|
55
|
+
}
|
|
56
|
+
}, [editable, field.key, setDragOverrides, targets]);
|
|
57
|
+
const save = (0, react_1.useCallback)(async (nextValues, options) => {
|
|
58
|
+
var _a, _b;
|
|
59
|
+
if (!editable || previewServerState.type !== 'connected') {
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
try {
|
|
63
|
+
await (0, save_sequence_prop_1.saveSequenceProps)({
|
|
64
|
+
changes: targets.map((target, index) => ({
|
|
65
|
+
fileName: target.nodePath.absolutePath,
|
|
66
|
+
nodePath: target.nodePath,
|
|
67
|
+
fieldKey: field.key,
|
|
68
|
+
value: nextValues[index],
|
|
69
|
+
defaultValue: field.typeName === 'text-content' ||
|
|
70
|
+
field.fieldSchema.default === undefined
|
|
71
|
+
? null
|
|
72
|
+
: JSON.stringify(field.fieldSchema.default),
|
|
73
|
+
schema: target.controls.schema,
|
|
74
|
+
sourceEdit: options === null || options === void 0 ? void 0 : options.sourceEdit,
|
|
75
|
+
})),
|
|
76
|
+
addedKeyframes: null,
|
|
77
|
+
movedKeyframes: null,
|
|
78
|
+
setPropStatuses,
|
|
79
|
+
clientId: previewServerState.clientId,
|
|
80
|
+
undoLabel: `Update ${(_a = field.description) !== null && _a !== void 0 ? _a : field.key} on selected sequences`,
|
|
81
|
+
redoLabel: `Update ${(_b = field.description) !== null && _b !== void 0 ? _b : field.key} on selected sequences again`,
|
|
82
|
+
});
|
|
83
|
+
setEditingMixed(false);
|
|
84
|
+
}
|
|
85
|
+
catch (err) {
|
|
86
|
+
(0, NotificationCenter_1.showNotification)(`Could not save shared control: ${err.message}`, 3000);
|
|
87
|
+
}
|
|
88
|
+
finally {
|
|
89
|
+
clear();
|
|
90
|
+
}
|
|
91
|
+
}, [clear, editable, field, previewServerState, setPropStatuses, targets]);
|
|
92
|
+
let content;
|
|
93
|
+
if (!editable) {
|
|
94
|
+
content = (jsx_runtime_1.jsx(TimelineSchemaField_1.UnsupportedStatus, { formattedValue: staticValues, label: !staticValues
|
|
95
|
+
? statuses.some((status) => !status)
|
|
96
|
+
? 'Loading…'
|
|
97
|
+
: statuses.some((status) => (status === null || status === void 0 ? void 0 : status.status) === 'computed')
|
|
98
|
+
? 'Computed'
|
|
99
|
+
: 'Keyframed'
|
|
100
|
+
: mixed
|
|
101
|
+
? 'Mixed'
|
|
102
|
+
: String((_a = values[0]) !== null && _a !== void 0 ? _a : '') }));
|
|
103
|
+
}
|
|
104
|
+
else if ((field.typeName === 'number' &&
|
|
105
|
+
values.every((value) => typeof value === 'number' && Number.isFinite(value))) ||
|
|
106
|
+
(field.typeName === 'translate' &&
|
|
107
|
+
values.every((value) => typeof value === 'string' &&
|
|
108
|
+
/^-?\d+(?:\.\d+)?px(?:\s+-?\d+(?:\.\d+)?px){0,2}$/.test(value)))) {
|
|
109
|
+
content = (jsx_runtime_1.jsx(MultiSequenceNumberField_1.MultiSequenceNumberField, { field: field, values: values, onPreview: preview, onSave: (next) => save(next, undefined), onClear: clear }));
|
|
110
|
+
}
|
|
111
|
+
else if (mixed && !editingMixed) {
|
|
112
|
+
content = (jsx_runtime_1.jsx("button", { type: "button", style: {
|
|
113
|
+
appearance: 'none',
|
|
114
|
+
border: 'none',
|
|
115
|
+
background: 'none',
|
|
116
|
+
color: colors_1.BLUE,
|
|
117
|
+
fontSize: 12,
|
|
118
|
+
padding: 0,
|
|
119
|
+
}, title: "Set a value for all selected sequences", onClick: () => setEditingMixed(true), children: "Mixed" }));
|
|
120
|
+
}
|
|
121
|
+
else {
|
|
122
|
+
content = (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [mixed ? jsx_runtime_1.jsx("span", { style: { fontSize: 12 }, children: "Mixed \u00B7 " }) : null, jsx_runtime_1.jsx(TimelineSchemaField_1.TimelineFieldValue, { field: field, effectiveValue: values[0], propStatus: {
|
|
123
|
+
status: 'static',
|
|
124
|
+
keyframeDisplayOffsetAdjustment: null,
|
|
125
|
+
codeValue: mixed ? undefined : values[0],
|
|
126
|
+
}, scaleLockNodePath: field.typeName === 'text-content' ? null : targets[0].nodePath, onSave: (value, options) => save(targets.map(() => value), options), onDragValueChange: (value) => preview(targets.map(() => value)), onDragEnd: clear })
|
|
127
|
+
] }));
|
|
128
|
+
}
|
|
129
|
+
return (jsx_runtime_1.jsx(TimelineRowChrome_1.TimelineRowChrome, { depth: 0, eye: jsx_runtime_1.jsx(TimelineLayerEye_1.TimelineLayerEyeSpacer, {}), arrow: jsx_runtime_1.jsx(TimelineExpandArrowButton_1.TimelineExpandArrowSpacer, {}), style: { minHeight: field.rowHeight }, selected: false, selectable: false, onSelect: noop_1.noop, showSelectedBackground: false, containsSelection: false, outerHeight: null, children: jsx_runtime_1.jsx(TimelineFieldRowContent_1.TimelineFieldRowContent, { field: field, rowDepth: 0, selected: false, children: content }) }));
|
|
130
|
+
};
|
|
131
|
+
exports.MultiSequenceField = MultiSequenceField;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { TimelineSelection } from '../Timeline/TimelineSelection';
|
|
3
|
+
export declare const MultiSequenceInspector: React.FC<{
|
|
4
|
+
readonly selections: readonly Extract<TimelineSelection, {
|
|
5
|
+
type: 'sequence';
|
|
6
|
+
}>[];
|
|
7
|
+
readonly readOnlyStudio: boolean;
|
|
8
|
+
}>;
|