@remotion/studio 4.0.523 → 4.0.525
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/components/ActionTooltip.d.ts +11 -0
- package/dist/components/ActionTooltip.js +153 -0
- package/dist/components/AppLaunchButton.js +2 -0
- package/dist/components/AssetSelectorModal.d.ts +6 -0
- package/dist/components/AssetSelectorModal.js +174 -0
- package/dist/components/Canvas.js +18 -3
- package/dist/components/CheckboardToggle.js +8 -10
- package/dist/components/ColorPicker/AlphaSlider.js +1 -1
- package/dist/components/ColorPicker/HueSlider.js +1 -1
- package/dist/components/ColorPicker/SaturationValueArea.js +1 -1
- package/dist/components/CompositionSelector.js +1 -0
- package/dist/components/CompositionSelectorItem.js +1 -0
- package/dist/components/EditorGuides/Guide.js +1 -1
- package/dist/components/ElementInstallConfirmation.js +35 -62
- package/dist/components/FullscreenToggle.js +5 -8
- package/dist/components/GlobalKeybindings.js +71 -0
- package/dist/components/InspectorLocationCopy.js +1 -1
- package/dist/components/InspectorOpenInEditor.d.ts +1 -0
- package/dist/components/InspectorOpenInEditor.js +18 -15
- package/dist/components/InspectorPanel/CompositionInspectorHeader.js +6 -7
- package/dist/components/InspectorPanel/CompositionMetadata.js +1 -0
- package/dist/components/InspectorPanel/ElementLibraryButton.js +1 -0
- package/dist/components/InspectorPanel/SequenceInspectorHeader.js +4 -12
- package/dist/components/InspectorSequenceSection.js +23 -14
- package/dist/components/LazySyntaxHighlightedSource.d.ts +4 -0
- package/dist/components/LazySyntaxHighlightedSource.js +43 -0
- package/dist/components/LoopToggle.js +9 -2
- package/dist/components/Menu/MenuItem.js +1 -2
- package/dist/components/MenuBuildIndicator.js +1 -1
- package/dist/components/MenuToolbar.js +6 -4
- package/dist/components/Modals.js +2 -1
- package/dist/components/MuteToggle.d.ts +1 -0
- package/dist/components/MuteToggle.js +17 -6
- package/dist/components/NewComposition/CodemodFooter.js +1 -0
- package/dist/components/NewComposition/DeleteComposition.js +42 -6
- package/dist/components/NewComposition/DeleteFolder.js +1 -0
- package/dist/components/NewComposition/DuplicateComposition.js +5 -0
- package/dist/components/NewComposition/InputDragger.js +2 -2
- package/dist/components/NewComposition/NewComposition.d.ts +1 -0
- package/dist/components/NewComposition/NewComposition.js +5 -4
- package/dist/components/NewComposition/NewFolder.js +31 -6
- package/dist/components/NewComposition/RenameComposition.js +3 -2
- package/dist/components/NewComposition/RenameFolder.js +3 -4
- package/dist/components/NewComposition/SlugPreview.d.ts +7 -0
- package/dist/components/NewComposition/SlugPreview.js +18 -0
- package/dist/components/NewComposition/duplicate-composition-api.d.ts +3 -2
- package/dist/components/NewComposition/duplicate-composition-api.js +9 -2
- package/dist/components/Notifications/NotificationCenter.d.ts +1 -0
- package/dist/components/Notifications/NotificationCenter.js +22 -1
- package/dist/components/OutlineToggle.js +17 -10
- package/dist/components/PlayPause.js +7 -1
- package/dist/components/PlaybackKeyboardShortcutsManager.d.ts +2 -0
- package/dist/components/PlaybackKeyboardShortcutsManager.js +36 -1
- package/dist/components/PlaybackRateSelector.js +2 -2
- package/dist/components/Preview.js +0 -3
- package/dist/components/PreviewToolbar.js +4 -7
- package/dist/components/PreviewToolbarOverflowButton.js +10 -3
- package/dist/components/QuickSwitcher/QuickSwitcherContent.js +1 -1
- package/dist/components/RenderButton.js +40 -4
- package/dist/components/RenderModal/WebRenderModalBasic.js +1 -1
- package/dist/components/RenderModal/render-modals.js +3 -0
- package/dist/components/RenderQueue/CaptionQueueItem.js +2 -1
- package/dist/components/RenderQueue/RenderQueueCopyToClipboard.js +2 -1
- package/dist/components/RenderQueue/RenderQueueDownloadItem.js +2 -1
- 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.js +2 -1
- package/dist/components/RenderQueue/actions.d.ts +2 -1
- package/dist/components/RenderQueue/actions.js +2 -1
- package/dist/components/RulersAndGuidesToggle.js +8 -1
- package/dist/components/SegmentedButton.d.ts +1 -0
- package/dist/components/SegmentedButton.js +9 -3
- package/dist/components/SelectedOutlineElement.js +16 -6
- package/dist/components/SelectedOutlinePolygon.js +4 -2
- package/dist/components/SettingsButton.js +8 -6
- package/dist/components/SettingsContext.d.ts +8 -0
- package/dist/components/SettingsContext.js +57 -2
- package/dist/components/SettingsModal.js +4 -1
- package/dist/components/SettingsModalFooter.js +1 -1
- package/dist/components/SidebarCollapserControls.js +13 -16
- package/dist/components/SizeSelector.js +2 -2
- package/dist/components/SkillsSettings.js +35 -4
- package/dist/components/SnappingToggle.js +7 -8
- package/dist/components/Splitter/SplitterHandle.js +1 -2
- package/dist/components/StudioSettings.js +32 -18
- package/dist/components/SyntaxHighlightedSource.d.ts +5 -0
- package/dist/components/{HighlightedElementSource.js → SyntaxHighlightedSource.js} +2 -2
- package/dist/components/Tabs/vertical.d.ts +1 -1
- package/dist/components/Tabs/vertical.js +16 -2
- package/dist/components/Timeline/EasingEditorModal.js +2 -2
- package/dist/components/Timeline/Timeline.js +47 -39
- package/dist/components/Timeline/TimelineAssetField.js +148 -9
- package/dist/components/Timeline/TimelineDragHandler.js +1 -2
- package/dist/components/Timeline/TimelineEffectItem.d.ts +1 -0
- package/dist/components/Timeline/TimelineEffectItem.js +2 -2
- package/dist/components/Timeline/TimelineEffectPropItem.d.ts +1 -0
- package/dist/components/Timeline/TimelineEffectPropItem.js +2 -2
- package/dist/components/Timeline/TimelineExpandedRow.js +2 -2
- package/dist/components/Timeline/TimelineInOutDragHandler.js +1 -2
- package/dist/components/Timeline/TimelineLayerChildren.js +12 -9
- package/dist/components/Timeline/TimelineSchemaField.js +8 -1
- package/dist/components/Timeline/TimelineSelection.d.ts +3 -1
- package/dist/components/Timeline/TimelineSelection.js +32 -5
- package/dist/components/Timeline/TimelineSequence.js +6 -6
- package/dist/components/Timeline/TimelineSequenceItem.js +12 -10
- package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.js +3 -12
- package/dist/components/Timeline/TimelineTranslateField.js +25 -12
- package/dist/components/Timeline/TimelineZoomControls.js +2 -1
- package/dist/components/Timeline/get-sequence-context-menu-items.js +22 -6
- package/dist/components/Timeline/timeline-field-display-utils.js +12 -7
- package/dist/components/Timeline/timeline-translate-utils.d.ts +17 -0
- package/dist/components/Timeline/timeline-translate-utils.js +53 -12
- package/dist/components/Timeline/use-open-sequence-in-apps.d.ts +2 -0
- package/dist/components/Timeline/use-open-sequence-in-apps.js +17 -0
- package/dist/components/Timeline/use-timeline-asset-drop.js +17 -3
- package/dist/components/Timeline/use-timeline-keyframe-drag.js +4 -4
- package/dist/components/TimelineCombobox.d.ts +1 -0
- package/dist/components/TimelineCombobox.js +9 -4
- package/dist/components/TimelineInOutToggle.js +8 -15
- package/dist/components/UndoRedoButtons.js +11 -0
- package/dist/components/composition-menu-items.js +56 -2
- package/dist/components/folder-menu-items.js +44 -0
- package/dist/components/get-open-in-menu-items.js +1 -1
- package/dist/components/handle-drop.js +3 -2
- package/dist/components/import-assets.d.ts +24 -1
- package/dist/components/import-assets.js +3 -1
- package/dist/components/keyboard-shortcuts.d.ts +4 -4
- package/dist/components/keyboard-shortcuts.js +28 -9
- package/dist/error-overlay/remotion-overlay/CodeFrame.js +29 -18
- package/dist/esm/LazyModels-gfmpcy4h.mjs +11 -0
- package/dist/esm/LazyModels-m1rf06wh.mjs +11 -0
- package/dist/esm/{HighlightedElementSource-jfc66k4p.mjs → SyntaxHighlightedSource-3xks91rz.mjs} +4 -4
- package/dist/esm/{TranscriptionModal-916jqhry.mjs → TranscriptionModal-8pvrehg4.mjs} +7 -7
- package/dist/esm/{VideoMattingModal-2tm79s9b.mjs → VideoMattingModal-fefbzgka.mjs} +7 -7
- package/dist/esm/{index-xhe2m2qr.mjs → index-0x13f28h.mjs} +35 -13
- package/dist/esm/{index-sgtmgc4h.mjs → index-1089795y.mjs} +3 -3
- package/dist/esm/{index-hy4xcgty.mjs → index-41kqns5c.mjs} +5 -3
- package/dist/esm/{index-6cvm9a65.mjs → index-ggqpre9v.mjs} +2868 -2099
- package/dist/esm/{index-czwvnn9g.mjs → index-hbezgbbq.mjs} +1 -1
- package/dist/esm/{index-1x7bsdh6.mjs → index-jrw61pkj.mjs} +2 -2
- package/dist/esm/{index-jg13hf2g.mjs → index-k426ye99.mjs} +2 -1
- package/dist/esm/{index-te66vvrp.mjs → index-mww32xc8.mjs} +4 -4
- package/dist/esm/{index-x7t2y7ws.mjs → index-s848rffx.mjs} +6985 -5956
- package/dist/esm/{index-3hgr6gjx.mjs → index-tzxb8808.mjs} +1 -1
- package/dist/esm/{index-5qddp5h7.mjs → index-vsxrxfpj.mjs} +1 -1
- package/dist/esm/index.mjs +3 -3
- package/dist/esm/internals.mjs +8 -8
- package/dist/esm/previewEntry.mjs +8 -8
- package/dist/esm/renderEntry.mjs +3 -3
- package/dist/helpers/colors.d.ts +1 -0
- package/dist/helpers/colors.js +4 -3
- package/dist/helpers/get-git-menu-item.d.ts +4 -0
- package/dist/helpers/get-git-menu-item.js +8 -1
- package/dist/helpers/get-sequence-double-click-action.d.ts +3 -3
- package/dist/helpers/get-sequence-double-click-action.js +2 -2
- package/dist/helpers/inject-css.js +2 -2
- package/dist/helpers/pointer-session.d.ts +1 -0
- package/dist/helpers/pointer-session.js +10 -1
- package/dist/helpers/prism-vsc-dark-plus.d.ts +1 -0
- package/dist/helpers/prism-vsc-dark-plus.js +305 -0
- package/dist/helpers/studio-runtime-config.d.ts +1 -1
- package/dist/helpers/use-create-composition.d.ts +1 -0
- package/dist/helpers/use-create-composition.js +17 -7
- package/dist/helpers/use-keybinding.d.ts +1 -1
- package/dist/helpers/use-keyboard-shortcut-label.d.ts +2 -2
- package/dist/helpers/use-media-metadata.js +5 -1
- package/dist/helpers/use-menu-structure.js +6 -2
- package/dist/helpers/use-rename-composition.d.ts +1 -0
- package/dist/helpers/use-rename-composition.js +16 -5
- package/dist/icons/skills.js +1 -1
- package/dist/renderEntry.js +2 -2
- package/dist/state/modals.d.ts +13 -1
- package/dist/state/z-index.js +1 -3
- package/package.json +20 -20
- package/dist/components/HighlightedElementSource.d.ts +0 -5
- package/dist/esm/LazyModels-2trdm224.mjs +0 -11
- package/dist/esm/LazyModels-fjb5ckaq.mjs +0 -11
- package/dist/helpers/prism-tomorrow.d.ts +0 -1
- package/dist/helpers/prism-tomorrow.js +0 -151
- /package/dist/esm/{resolve-composition-component-location-14148845.mjs → resolve-composition-component-location-bt2d6qxq.mjs} +0 -0
|
@@ -3,15 +3,19 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.SkillsSettings = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("react");
|
|
6
|
+
const client_id_1 = require("../helpers/client-id");
|
|
6
7
|
const colors_1 = require("../helpers/colors");
|
|
7
8
|
const copy_text_1 = require("../helpers/copy-text");
|
|
8
9
|
const use_copy_feedback_1 = require("../helpers/use-copy-feedback");
|
|
9
10
|
const check_circle_filled_1 = require("../icons/check-circle-filled");
|
|
11
|
+
const cloud_download_1 = require("../icons/cloud-download");
|
|
10
12
|
const copy_1 = require("../icons/copy");
|
|
13
|
+
const trash_1 = require("../icons/trash");
|
|
11
14
|
const InlineAction_1 = require("./InlineAction");
|
|
12
15
|
const ValidationMessage_1 = require("./NewComposition/ValidationMessage");
|
|
13
16
|
const NotificationCenter_1 = require("./Notifications/NotificationCenter");
|
|
14
17
|
const SettingsContext_1 = require("./SettingsContext");
|
|
18
|
+
const Spinner_1 = require("./Spinner");
|
|
15
19
|
const INSTALL_COMMAND = 'npx remotion skills add';
|
|
16
20
|
const container = {
|
|
17
21
|
alignSelf: 'flex-start',
|
|
@@ -87,13 +91,28 @@ const status = {
|
|
|
87
91
|
lineHeight: 1.4,
|
|
88
92
|
whiteSpace: 'nowrap',
|
|
89
93
|
};
|
|
94
|
+
const actionIcon = {
|
|
95
|
+
height: 14,
|
|
96
|
+
width: 14,
|
|
97
|
+
};
|
|
98
|
+
const actionSlot = {
|
|
99
|
+
alignItems: 'center',
|
|
100
|
+
display: 'inline-flex',
|
|
101
|
+
flexShrink: 0,
|
|
102
|
+
height: 24,
|
|
103
|
+
justifyContent: 'center',
|
|
104
|
+
width: 24,
|
|
105
|
+
};
|
|
90
106
|
const loading = {
|
|
91
107
|
...description,
|
|
92
108
|
marginTop: 14,
|
|
93
109
|
};
|
|
94
110
|
const SkillsSettings = () => {
|
|
95
111
|
var _a;
|
|
96
|
-
const { error, remotionSkillsInfo } = (0, SettingsContext_1.useSettings)();
|
|
112
|
+
const { error, remotionSkillsInfo, installSkill, removeSkill, skillAction, skillActionError, } = (0, SettingsContext_1.useSettings)();
|
|
113
|
+
const { previewServerState } = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx);
|
|
114
|
+
const canInstall = !window.remotion_isReadOnlyStudio &&
|
|
115
|
+
previewServerState.type === 'connected';
|
|
97
116
|
const { copied, markCopied } = (0, use_copy_feedback_1.useCopyFeedback)();
|
|
98
117
|
const installedSkills = (0, react_1.useMemo)(() => {
|
|
99
118
|
var _a;
|
|
@@ -110,23 +129,35 @@ const SkillsSettings = () => {
|
|
|
110
129
|
const renderCopyAction = (0, react_1.useCallback)((color) => {
|
|
111
130
|
return jsx_runtime_1.jsx(copy_1.CopyIcon, { copied: copied, color: color, style: copyIcon });
|
|
112
131
|
}, [copied]);
|
|
113
|
-
|
|
132
|
+
const renderInstallAction = (0, react_1.useCallback)((color) => {
|
|
133
|
+
return jsx_runtime_1.jsx(cloud_download_1.CloudDownloadIcon, { color: color, style: actionIcon });
|
|
134
|
+
}, []);
|
|
135
|
+
const renderRemoveAction = (0, react_1.useCallback)((color) => {
|
|
136
|
+
return jsx_runtime_1.jsx(trash_1.TrashIcon, { color: color, style: actionIcon });
|
|
137
|
+
}, []);
|
|
138
|
+
const actionInProgress = skillAction !== null;
|
|
139
|
+
return (jsx_runtime_1.jsxs("div", { style: container, children: [remotionSkillsInfo === null && error === null ? (jsx_runtime_1.jsx("p", { style: loading, children: "Checking installed skills..." })) : null, remotionSkillsInfo === null && error ? (jsx_runtime_1.jsx("div", { style: { marginTop: 14 }, children: jsx_runtime_1.jsx(ValidationMessage_1.ValidationMessage, { message: error, align: "flex-start", type: "error" }) })) : null, missingSkills > 0 && canInstall ? (jsx_runtime_1.jsx("p", { style: description, children: "Install skills in this project to use them with your coding agent." })) : null, skillActionError ? (jsx_runtime_1.jsx("div", { style: { marginTop: 14 }, children: jsx_runtime_1.jsx(ValidationMessage_1.ValidationMessage, { message: skillActionError, align: "flex-start", type: "error" }) })) : null, missingSkills > 0 && !canInstall ? (jsx_runtime_1.jsxs("div", { children: [
|
|
114
140
|
jsx_runtime_1.jsx("p", { style: description, children: "Not all skills are installed. Run this command in the project directory, then reload Studio and restart your coding agent." }), jsx_runtime_1.jsxs("div", { style: commandField, children: [
|
|
115
141
|
jsx_runtime_1.jsx("pre", { style: command, children: INSTALL_COMMAND }), jsx_runtime_1.jsx(InlineAction_1.InlineAction, { variant: null, onClick: onCopy, renderAction: renderCopyAction, title: "Copy install command" })
|
|
116
142
|
] })
|
|
117
143
|
] })) : null, remotionSkillsInfo ? (jsx_runtime_1.jsx("div", { style: list, role: "list", "aria-label": "Remotion Agent Skills", children: remotionSkillsInfo.skills.map((skill, index) => {
|
|
118
144
|
const installed = skill.installedInProject || skill.installedGlobally;
|
|
145
|
+
const processingThisSkill = (skillAction === null || skillAction === void 0 ? void 0 : skillAction.skill) === skill.name;
|
|
119
146
|
const installedLocation = skill.installedInProject && skill.installedGlobally
|
|
120
147
|
? 'Project and global'
|
|
121
148
|
: skill.installedInProject
|
|
122
149
|
? 'Project'
|
|
123
150
|
: skill.installedGlobally
|
|
124
151
|
? 'Global'
|
|
125
|
-
:
|
|
152
|
+
: null;
|
|
126
153
|
return (jsx_runtime_1.jsxs("div", { role: "listitem", style: index === remotionSkillsInfo.skills.length - 1
|
|
127
154
|
? lastSkillRow
|
|
128
155
|
: skillRow, children: [
|
|
129
|
-
jsx_runtime_1.jsxs("span", { style: skillName, children: ["/", skill.name] }), jsx_runtime_1.jsx("span", { style: status, children:
|
|
156
|
+
jsx_runtime_1.jsxs("span", { style: skillName, children: ["/", skill.name] }), processingThisSkill ? (jsx_runtime_1.jsx("span", { style: status, children: skillAction.type === 'installing'
|
|
157
|
+
? 'Installing…'
|
|
158
|
+
: 'Removing…' })) : installedLocation ? (jsx_runtime_1.jsx("span", { style: status, children: installedLocation })) : null, installed ? (jsx_runtime_1.jsx(check_circle_filled_1.CheckCircleFilled, { "aria-hidden": true, style: { ...statusIcon, fill: colors_1.BLUE } })) : null, processingThisSkill ? (jsx_runtime_1.jsx("span", { style: actionSlot, children: jsx_runtime_1.jsx(Spinner_1.Spinner, { duration: 0.5, size: 14 }) })) : installed && canInstall ? (jsx_runtime_1.jsx(InlineAction_1.InlineAction, { title: skill.installedInProject
|
|
159
|
+
? `Remove ${skill.name} from this project`
|
|
160
|
+
: `Remove ${skill.name} globally`, disabled: actionInProgress, onClick: () => removeSkill(skill.name), renderAction: renderRemoveAction, variant: null })) : canInstall ? (jsx_runtime_1.jsx(InlineAction_1.InlineAction, { title: `Install ${skill.name} in this project`, disabled: actionInProgress, onClick: () => installSkill(skill.name), renderAction: renderInstallAction, variant: null })) : null] }, skill.name));
|
|
130
161
|
}) })) : null] }));
|
|
131
162
|
};
|
|
132
163
|
exports.SkillsSettings = SkillsSettings;
|
|
@@ -3,13 +3,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.SnappingToggle = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("react");
|
|
6
|
-
const no_react_1 = require("remotion/no-react");
|
|
7
6
|
const colors_1 = require("../helpers/colors");
|
|
8
7
|
const use_keybinding_1 = require("../helpers/use-keybinding");
|
|
9
8
|
const use_keyboard_shortcut_label_1 = require("../helpers/use-keyboard-shortcut-label");
|
|
10
9
|
const magnet_1 = require("../icons/magnet");
|
|
11
10
|
const editor_snapping_1 = require("../state/editor-snapping");
|
|
11
|
+
const ActionTooltip_1 = require("./ActionTooltip");
|
|
12
12
|
const ControlButton_1 = require("./ControlButton");
|
|
13
|
+
const buttonStyle = { width: 26 };
|
|
13
14
|
const SnappingToggle = () => {
|
|
14
15
|
const { editorSnapping, setEditorSnapping } = (0, react_1.useContext)(editor_snapping_1.EditorSnappingContext);
|
|
15
16
|
const onClick = (0, react_1.useCallback)(() => {
|
|
@@ -17,12 +18,10 @@ const SnappingToggle = () => {
|
|
|
17
18
|
}, [setEditorSnapping]);
|
|
18
19
|
const shortcut = (0, use_keyboard_shortcut_label_1.useKeyboardShortcutLabel)('toggleSnapping');
|
|
19
20
|
const ariaKeyShortcuts = (0, use_keyboard_shortcut_label_1.useKeyboardShortcutAriaKeyShortcuts)('toggleSnapping');
|
|
20
|
-
const accessibilityLabel =
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
.join(' ');
|
|
26
|
-
return (jsx_runtime_1.jsx(ControlButton_1.ControlButton, { title: accessibilityLabel, "aria-label": accessibilityLabel, "aria-pressed": editorSnapping, "aria-keyshortcuts": ariaKeyShortcuts || undefined, onClick: onClick, children: (color) => (jsx_runtime_1.jsx(magnet_1.MagnetIcon, { style: { width: 18, height: 18, transform: 'translateY(1px)' }, color: editorSnapping ? colors_1.BLUE : color, "aria-hidden": "true", focusable: "false" })) }));
|
|
21
|
+
const accessibilityLabel = editorSnapping
|
|
22
|
+
? 'Disable snapping'
|
|
23
|
+
: 'Enable snapping';
|
|
24
|
+
const shortcutsDisabled = (0, use_keybinding_1.areKeyboardShortcutsDisabled)();
|
|
25
|
+
return (jsx_runtime_1.jsx(ActionTooltip_1.ActionTooltip, { label: "Snapping", shortcut: shortcutsDisabled ? null : shortcut, delay: 800, dismissOnClick: false, children: jsx_runtime_1.jsx(ControlButton_1.ControlButton, { title: "", "aria-label": accessibilityLabel, "aria-pressed": editorSnapping, "aria-keyshortcuts": shortcutsDisabled ? undefined : ariaKeyShortcuts || undefined, onClick: onClick, style: buttonStyle, children: (color) => (jsx_runtime_1.jsx(magnet_1.MagnetIcon, { style: { width: 18, height: 18, transform: 'translateY(1px)' }, color: editorSnapping ? colors_1.BLUE : color, "aria-hidden": "true", focusable: "false" })) }) }));
|
|
27
26
|
};
|
|
28
27
|
exports.SnappingToggle = SnappingToggle;
|
|
@@ -116,8 +116,7 @@ const SplitterHandle = ({ allowToCollapse, onCollapse, onCollapseDuringDrag }) =
|
|
|
116
116
|
onMove: onPointerMove,
|
|
117
117
|
onEnd: (reason, endEvent) => {
|
|
118
118
|
var _a, _b;
|
|
119
|
-
if ((
|
|
120
|
-
endEvent) {
|
|
119
|
+
if ((0, pointer_session_1.isPointerSessionRelease)(reason, endEvent)) {
|
|
121
120
|
lastFlex = getNewValue(endEvent, true);
|
|
122
121
|
lastCollapsedSide = getCollapsedSide(endEvent);
|
|
123
122
|
}
|
|
@@ -3,20 +3,22 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.StudioSettings = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const client_1 = require("@remotion/renderer/client");
|
|
6
|
-
const studio_shared_1 = require("@remotion/studio-shared");
|
|
7
6
|
const react_1 = require("react");
|
|
8
7
|
const colors_1 = require("../helpers/colors");
|
|
9
8
|
const undo_1 = require("../icons/undo");
|
|
10
9
|
const Button_1 = require("./Button");
|
|
10
|
+
const Checkbox_1 = require("./Checkbox");
|
|
11
11
|
const ConfigSelect_1 = require("./ConfigSelect");
|
|
12
12
|
const styles_1 = require("./InspectorPanel/styles");
|
|
13
13
|
const layout_1 = require("./layout");
|
|
14
14
|
const InputDragger_1 = require("./NewComposition/InputDragger");
|
|
15
15
|
const ValidationMessage_1 = require("./NewComposition/ValidationMessage");
|
|
16
|
+
const InfoBubble_1 = require("./RenderModal/InfoBubble");
|
|
16
17
|
const layout_2 = require("./RenderModal/layout");
|
|
17
18
|
const SettingsContext_1 = require("./SettingsContext");
|
|
18
19
|
const use_auto_save_config_1 = require("./use-auto-save-config");
|
|
19
20
|
const container = {
|
|
21
|
+
alignSelf: 'flex-start',
|
|
20
22
|
display: 'flex',
|
|
21
23
|
flex: 1,
|
|
22
24
|
flexDirection: 'column',
|
|
@@ -47,11 +49,10 @@ const initialSettings = {
|
|
|
47
49
|
numberOfSharedAudioTags: null,
|
|
48
50
|
rspack: null,
|
|
49
51
|
};
|
|
50
|
-
const ConfigNumber = ({
|
|
51
|
-
const resolvedDefaultLabel = defaultLabel !== null && defaultLabel !== void 0 ? defaultLabel : String(defaultValue);
|
|
52
|
+
const ConfigNumber = ({ defaultValue, name, onChange, onChangeEnd, value, }) => {
|
|
52
53
|
return (jsx_runtime_1.jsxs("div", { style: layout_2.optionRow, children: [
|
|
53
54
|
jsx_runtime_1.jsx("div", { style: layout_2.label, children: name }), jsx_runtime_1.jsxs("div", { style: { ...layout_2.rightRow, gap: 6 }, children: [
|
|
54
|
-
jsx_runtime_1.jsx(InputDragger_1.InputDragger, { "aria-label": name, buttonStyle: { textAlign: 'right', width: 140 }, formatter: () => value === null ? `Default (${
|
|
55
|
+
jsx_runtime_1.jsx(InputDragger_1.InputDragger, { "aria-label": name, buttonStyle: { textAlign: 'right', width: 140 }, formatter: () => value === null ? `Default (${defaultValue})` : String(value), min: 0, onTextChange: () => undefined, onValueChange: onChange, onValueChangeEnd: onChangeEnd, placeholder: `Default (${defaultValue})`, rightAlign: true, status: "ok", step: 1, value: value !== null && value !== void 0 ? value : defaultValue }), jsx_runtime_1.jsx(Button_1.Button, { disabled: value === null, onClick: () => onChangeEnd(null), size: "compact", style: { color: colors_1.LIGHT_TEXT }, title: `Use default (${defaultValue})`, children: jsx_runtime_1.jsx(undo_1.UndoIcon, { style: resetIcon }) })
|
|
55
56
|
] })
|
|
56
57
|
] }));
|
|
57
58
|
};
|
|
@@ -59,20 +60,19 @@ const StudioSettings = () => {
|
|
|
59
60
|
var _a;
|
|
60
61
|
const { error: settingsError, revision, studioRuntimeConfig } = (0, SettingsContext_1.useSettings)();
|
|
61
62
|
const [settings, setSettings] = (0, react_1.useState)(initialSettings);
|
|
62
|
-
const [committedNumberSettings, setCommittedNumberSettings] = (0, react_1.useState)({
|
|
63
|
+
const [committedNumberSettings, setCommittedNumberSettings] = (0, react_1.useState)({ numberOfSharedAudioTags: null });
|
|
63
64
|
const [editedSetters, setEditedSetters] = (0, react_1.useState)(() => new Set());
|
|
64
65
|
const [syncedRevision, setSyncedRevision] = (0, react_1.useState)(-1);
|
|
65
66
|
const [error, setError] = (0, react_1.useState)(null);
|
|
66
67
|
(0, react_1.useEffect)(() => {
|
|
67
|
-
var _a
|
|
68
|
-
var
|
|
68
|
+
var _a;
|
|
69
|
+
var _b, _c;
|
|
69
70
|
if (studioRuntimeConfig === null) {
|
|
70
71
|
return;
|
|
71
72
|
}
|
|
72
|
-
setSettings((
|
|
73
|
+
setSettings((_b = studioRuntimeConfig.configFileStudioSettings) !== null && _b !== void 0 ? _b : initialSettings);
|
|
73
74
|
setCommittedNumberSettings({
|
|
74
|
-
|
|
75
|
-
numberOfSharedAudioTags: (_e = (_b = studioRuntimeConfig.configFileStudioSettings) === null || _b === void 0 ? void 0 : _b.numberOfSharedAudioTags) !== null && _e !== void 0 ? _e : null,
|
|
75
|
+
numberOfSharedAudioTags: (_c = (_a = studioRuntimeConfig.configFileStudioSettings) === null || _a === void 0 ? void 0 : _a.numberOfSharedAudioTags) !== null && _c !== void 0 ? _c : null,
|
|
76
76
|
});
|
|
77
77
|
setEditedSetters(new Set());
|
|
78
78
|
setSyncedRevision(revision);
|
|
@@ -96,7 +96,6 @@ const StudioSettings = () => {
|
|
|
96
96
|
update('setAskAIEnabled', settings.askAIEnabled),
|
|
97
97
|
update('setEnableCrossSiteIsolation', settings.enableCrossSiteIsolation),
|
|
98
98
|
update('setBeepOnFinish', settings.beepOnFinish),
|
|
99
|
-
update('setMaxTimelineTracks', committedNumberSettings.maxTimelineTracks),
|
|
100
99
|
update('setAudioLatencyHint', settings.audioLatencyHint),
|
|
101
100
|
update('setNumberOfSharedAudioTags', committedNumberSettings.numberOfSharedAudioTags),
|
|
102
101
|
update('setRspack', settings.rspack),
|
|
@@ -126,17 +125,32 @@ const StudioSettings = () => {
|
|
|
126
125
|
return null;
|
|
127
126
|
}
|
|
128
127
|
return (jsx_runtime_1.jsxs("div", { style: container, children: [
|
|
129
|
-
jsx_runtime_1.jsx("p", { style: dividerLabel, children: "
|
|
130
|
-
{ label: 'Interactive', value: 'interactive' },
|
|
131
|
-
{ label: 'Balanced', value: 'balanced' },
|
|
132
|
-
{ label: 'Playback', value: 'playback' },
|
|
133
|
-
], value: settings.audioLatencyHint }), jsx_runtime_1.jsx(ConfigNumber, { defaultValue: 0, name: "Number of shared audio tags", onChange: (value) => previewNumberSetting('numberOfSharedAudioTags', value), onChangeEnd: (value) => commitNumberSetting('numberOfSharedAudioTags', 'setNumberOfSharedAudioTags', value), value: settings.numberOfSharedAudioTags }), jsx_runtime_1.jsx(ConfigSelect_1.ConfigSelect, { defaultLabel: "Disabled", name: "Beep on finish", onChange: (value) => changeSetting('beepOnFinish', 'setBeepOnFinish', value), options: ConfigSelect_1.booleanOptions, value: settings.beepOnFinish }), jsx_runtime_1.jsx("p", { style: sectionTitle, children: "Development" }), jsx_runtime_1.jsx(ConfigSelect_1.ConfigSelect, { defaultLabel: "Webpack", name: "Bundler", onChange: (value) => changeSetting('rspack', 'setRspack', value), options: [
|
|
128
|
+
jsx_runtime_1.jsx("p", { style: dividerLabel, children: "Development" }), jsx_runtime_1.jsx(ConfigSelect_1.ConfigSelect, { defaultLabel: "Webpack", name: "Bundler", onChange: (value) => changeSetting('rspack', 'setRspack', value), options: [
|
|
134
129
|
{ label: 'Rspack', value: true },
|
|
135
130
|
{ label: 'Webpack', value: false },
|
|
136
|
-
], value: settings.rspack }), jsx_runtime_1.
|
|
131
|
+
], value: settings.rspack }), jsx_runtime_1.jsxs("div", { style: layout_2.optionRow, children: [
|
|
132
|
+
jsx_runtime_1.jsxs("div", { style: layout_2.label, children: ["Cross-site isolation",
|
|
133
|
+
jsx_runtime_1.jsx(InfoBubble_1.InfoBubble, { title: "About cross-site isolation", horizontalAlignment: "right", children: jsx_runtime_1.jsx("div", { style: {
|
|
134
|
+
padding: 12,
|
|
135
|
+
maxWidth: 280,
|
|
136
|
+
fontSize: 14,
|
|
137
|
+
lineHeight: 1.5,
|
|
138
|
+
}, children: "Isolates Studio from other websites to enable shared memory and multithreading. Required for @remotion/whisper-web and can speed up ProRes decoding. Media from other websites that requires cookies or authentication may not load. Disabled by default." }) })
|
|
139
|
+
] }), jsx_runtime_1.jsx("label", { style: layout_2.rightRow, "aria-label": "Cross-site isolation", children: jsx_runtime_1.jsx(Checkbox_1.Checkbox, { checked: settings.enableCrossSiteIsolation === true, name: "Cross-site isolation", onChange: (event) => changeSetting('enableCrossSiteIsolation', 'setEnableCrossSiteIsolation', event.target.checked ? true : null) }) })
|
|
140
|
+
] }), jsx_runtime_1.jsx(ConfigSelect_1.ConfigSelect, { defaultLabel: "Info", name: "Log level", onChange: (value) => changeSetting('logLevel', 'setLogLevel', value), options: client_1.BrowserSafeApis.logLevels.map((value) => ({
|
|
137
141
|
label: value[0].toUpperCase() + value.slice(1),
|
|
138
142
|
value,
|
|
139
|
-
})), value: settings.logLevel }), (
|
|
143
|
+
})), value: settings.logLevel }), jsx_runtime_1.jsx("p", { style: sectionTitle, children: "Interface" }), jsx_runtime_1.jsxs("label", { style: layout_2.optionRow, children: [
|
|
144
|
+
jsx_runtime_1.jsx("div", { style: layout_2.label, children: "Ask AI enabled" }), jsx_runtime_1.jsx("div", { style: layout_2.rightRow, children: jsx_runtime_1.jsx(Checkbox_1.Checkbox, { checked: settings.askAIEnabled !== false, name: "Ask AI enabled", onChange: (event) => changeSetting('askAIEnabled', 'setAskAIEnabled', event.target.checked ? null : false) }) })
|
|
145
|
+
] }), jsx_runtime_1.jsxs("label", { style: layout_2.optionRow, children: [
|
|
146
|
+
jsx_runtime_1.jsx("div", { style: layout_2.label, children: "Interactivity enabled" }), jsx_runtime_1.jsx("div", { style: layout_2.rightRow, children: jsx_runtime_1.jsx(Checkbox_1.Checkbox, { checked: settings.interactivityEnabled !== false, name: "Interactivity enabled", onChange: (event) => changeSetting('interactivityEnabled', 'setInteractivityEnabled', event.target.checked ? null : false) }) })
|
|
147
|
+
] }), jsx_runtime_1.jsx("p", { style: sectionTitle, children: "Audio" }), jsx_runtime_1.jsx(ConfigSelect_1.ConfigSelect, { defaultLabel: "Playback", name: "Audio latency hint", onChange: (value) => changeSetting('audioLatencyHint', 'setAudioLatencyHint', value), options: [
|
|
148
|
+
{ label: 'Interactive', value: 'interactive' },
|
|
149
|
+
{ label: 'Balanced', value: 'balanced' },
|
|
150
|
+
{ label: 'Playback', value: 'playback' },
|
|
151
|
+
], value: settings.audioLatencyHint }), jsx_runtime_1.jsx(ConfigNumber, { defaultValue: 0, name: "Number of shared audio tags", onChange: (value) => previewNumberSetting('numberOfSharedAudioTags', value), onChangeEnd: (value) => commitNumberSetting('numberOfSharedAudioTags', 'setNumberOfSharedAudioTags', value), value: settings.numberOfSharedAudioTags }), jsx_runtime_1.jsxs("label", { style: layout_2.optionRow, children: [
|
|
152
|
+
jsx_runtime_1.jsx("div", { style: layout_2.label, children: "Beep on finish" }), jsx_runtime_1.jsx("div", { style: layout_2.rightRow, children: jsx_runtime_1.jsx(Checkbox_1.Checkbox, { checked: settings.beepOnFinish === true, name: "Beep on finish", onChange: (event) => changeSetting('beepOnFinish', 'setBeepOnFinish', event.target.checked ? true : null) }) })
|
|
153
|
+
] }), (error !== null && error !== void 0 ? error : settingsError) ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
140
154
|
jsx_runtime_1.jsx(layout_1.Spacing, { y: 1, block: true }), jsx_runtime_1.jsx("div", { style: { paddingLeft: 16, paddingRight: 16 }, children: jsx_runtime_1.jsx(ValidationMessage_1.ValidationMessage, { align: "flex-start", message: (_a = error !== null && error !== void 0 ? error : settingsError) !== null && _a !== void 0 ? _a : '', type: "error" }) })
|
|
141
155
|
] })) : null, jsx_runtime_1.jsx(layout_1.Spacing, { y: 2, block: true })
|
|
142
156
|
] }));
|
|
@@ -71,8 +71,8 @@ const renderTokens = (tokens) => {
|
|
|
71
71
|
: ((_a = tokens.alias) !== null && _a !== void 0 ? _a : [])),
|
|
72
72
|
].join(' '), style: tokenStyle, children: renderTokens(tokens.content) }));
|
|
73
73
|
};
|
|
74
|
-
const
|
|
74
|
+
const SyntaxHighlightedSource = ({ source, }) => {
|
|
75
75
|
const tokens = (0, react_1.useMemo)(() => prismjs_1.default.tokenize(source, prismjs_1.default.languages.tsx), [source]);
|
|
76
76
|
return (jsx_runtime_1.jsx("span", { style: { ...tokenStyle, color: 'inherit' }, children: renderTokens(tokens) }));
|
|
77
77
|
};
|
|
78
|
-
exports.default =
|
|
78
|
+
exports.default = SyntaxHighlightedSource;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
export declare const VerticalTab: React.FC<{
|
|
3
|
-
readonly children:
|
|
3
|
+
readonly children: string;
|
|
4
4
|
readonly onClick: React.MouseEventHandler<HTMLButtonElement>;
|
|
5
5
|
readonly renderIcon?: (color: string) => React.ReactNode;
|
|
6
6
|
readonly style?: React.CSSProperties;
|
|
@@ -4,7 +4,10 @@ exports.VerticalTab = 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 use_breakpoint_1 = require("../../helpers/use-breakpoint");
|
|
7
8
|
const z_index_1 = require("../../state/z-index");
|
|
9
|
+
const ActionTooltip_1 = require("../ActionTooltip");
|
|
10
|
+
const compactTabBreakpoint = 700;
|
|
8
11
|
const selectorButton = {
|
|
9
12
|
border: 'none',
|
|
10
13
|
flex: 1,
|
|
@@ -19,9 +22,15 @@ const selectorButton = {
|
|
|
19
22
|
userSelect: 'none',
|
|
20
23
|
WebkitUserSelect: 'none',
|
|
21
24
|
};
|
|
25
|
+
const compactSelectorButton = {
|
|
26
|
+
width: 42,
|
|
27
|
+
paddingLeft: 12,
|
|
28
|
+
paddingRight: 4,
|
|
29
|
+
};
|
|
22
30
|
const VerticalTab = ({ children, onClick, renderIcon, style, selected, autoFocus }) => {
|
|
23
31
|
const [hovered, setHovered] = (0, react_1.useState)(false);
|
|
24
32
|
const { tabIndex } = (0, z_index_1.useZIndex)();
|
|
33
|
+
const isCompact = (0, use_breakpoint_1.useBreakpoint)(compactTabBreakpoint);
|
|
25
34
|
const onPointerEnter = (0, react_1.useCallback)(() => {
|
|
26
35
|
setHovered(true);
|
|
27
36
|
}, []);
|
|
@@ -36,8 +45,13 @@ const VerticalTab = ({ children, onClick, renderIcon, style, selected, autoFocus
|
|
|
36
45
|
color,
|
|
37
46
|
boxShadow: 'none',
|
|
38
47
|
...style,
|
|
48
|
+
...(isCompact ? compactSelectorButton : null),
|
|
39
49
|
};
|
|
40
|
-
}, [color, hovered, selected, style]);
|
|
41
|
-
|
|
50
|
+
}, [color, hovered, isCompact, selected, style]);
|
|
51
|
+
const button = (jsx_runtime_1.jsxs("button", { "aria-label": children, autoFocus: autoFocus, style: definiteStyle, type: "button", onClick: onClick, tabIndex: tabIndex, onPointerLeave: onPointerLeave, onPointerEnter: onPointerEnter, children: [renderIcon ? renderIcon(color) : null, isCompact ? null : children] }));
|
|
52
|
+
if (!isCompact) {
|
|
53
|
+
return button;
|
|
54
|
+
}
|
|
55
|
+
return (jsx_runtime_1.jsx(ActionTooltip_1.ActionTooltip, { label: children, shortcut: null, delay: 800, dismissOnClick: true, side: "right", children: button }));
|
|
42
56
|
};
|
|
43
57
|
exports.VerticalTab = VerticalTab;
|
|
@@ -687,8 +687,8 @@ const EasingEditor = ({ state, renderHeader }) => {
|
|
|
687
687
|
onMove: (moveEvent) => {
|
|
688
688
|
updateHandleFromPointer(handle, moveEvent);
|
|
689
689
|
},
|
|
690
|
-
onEnd: (reason) => {
|
|
691
|
-
if (
|
|
690
|
+
onEnd: (reason, endEvent) => {
|
|
691
|
+
if ((0, pointer_session_1.isPointerSessionRelease)(reason, endEvent)) {
|
|
692
692
|
commitEasing(serializeBezier(bezierRef.current), liveOverrideVersionRef.current);
|
|
693
693
|
}
|
|
694
694
|
else {
|
|
@@ -259,22 +259,54 @@ const TimelineInner = () => {
|
|
|
259
259
|
overrideIdToNodePathMappings,
|
|
260
260
|
compositions,
|
|
261
261
|
]);
|
|
262
|
+
const durationInFrames = (_a = videoConfig === null || videoConfig === void 0 ? void 0 : videoConfig.durationInFrames) !== null && _a !== void 0 ? _a : 0;
|
|
263
|
+
const { getDragOverrides } = (0, react_1.useContext)(remotion_1.Internals.VisualModeDragOverridesContext);
|
|
264
|
+
const filtered = (0, react_1.useMemo)(() => {
|
|
265
|
+
return timeline.filter((t) => {
|
|
266
|
+
// Moving outside the composition can reduce the displayed duration to
|
|
267
|
+
// zero. Keep the drag owner mounted until its pending edit is saved.
|
|
268
|
+
if (t.sequence.showInTimeline &&
|
|
269
|
+
t.nodePathInfo !== null &&
|
|
270
|
+
getDragOverrides(t.nodePathInfo.sequenceSubscriptionKey).from !==
|
|
271
|
+
undefined) {
|
|
272
|
+
return true;
|
|
273
|
+
}
|
|
274
|
+
return (0, should_show_track_in_timeline_1.shouldShowTrackInTimeline)(t, durationInFrames);
|
|
275
|
+
});
|
|
276
|
+
}, [durationInFrames, getDragOverrides, timeline]);
|
|
277
|
+
// Keep `filtered` complete so a future toggle can show every programmatic
|
|
278
|
+
// instance without recalculating the timeline or losing its instance index.
|
|
279
|
+
const collapsed = (0, react_1.useMemo)(() => {
|
|
280
|
+
const seenNodePaths = new Set();
|
|
281
|
+
return filtered.filter((track) => {
|
|
282
|
+
if (track.nodePathInfo === null) {
|
|
283
|
+
return true;
|
|
284
|
+
}
|
|
285
|
+
const key = (0, timeline_node_path_key_1.timelineSequenceNodePathToKey)(track.nodePathInfo.sequenceSubscriptionKey);
|
|
286
|
+
if (seenNodePaths.has(key)) {
|
|
287
|
+
return false;
|
|
288
|
+
}
|
|
289
|
+
seenNodePaths.add(key);
|
|
290
|
+
return true;
|
|
291
|
+
});
|
|
292
|
+
}, [filtered]);
|
|
293
|
+
const { visibleTracks, value: layerChildrenValue } = (0, TimelineLayerChildren_1.useTimelineLayerChildren)(collapsed, sequences, (canvasContent === null || canvasContent === void 0 ? void 0 : canvasContent.type) === 'composition' ? canvasContent.compositionId : null);
|
|
262
294
|
const pendingInsertedElementSelection = (0, use_sync_external_store_1.useSyncExternalStore)(inserted_element_selection_1.subscribeToInsertedElementSelection, inserted_element_selection_1.getInsertedElementSelection, inserted_element_selection_1.getInsertedElementSelection);
|
|
263
295
|
const { fastRefreshes } = (0, react_1.useContext)(fast_refresh_context_1.FastRefreshContext);
|
|
264
296
|
const pendingSelectionStart = (0, react_1.useRef)(null);
|
|
265
297
|
const { selectItems } = (0, TimelineSelection_1.useTimelineSelection)();
|
|
266
|
-
(0, react_1.
|
|
298
|
+
(0, react_1.useLayoutEffect)(() => {
|
|
267
299
|
var _a;
|
|
268
300
|
if (pendingInsertedElementSelection === null) {
|
|
269
301
|
pendingSelectionStart.current = null;
|
|
270
302
|
return;
|
|
271
303
|
}
|
|
272
|
-
const matchesInsertedNodePath = (track) =>
|
|
273
|
-
(
|
|
274
|
-
|
|
304
|
+
const matchesInsertedNodePath = (track) => pendingInsertedElementSelection.nodePath === null ||
|
|
305
|
+
(track.nodePathInfo !== null &&
|
|
306
|
+
track.nodePathInfo.sequenceSubscriptionKey.absolutePath ===
|
|
275
307
|
pendingInsertedElementSelection.nodePath.absolutePath &&
|
|
276
|
-
|
|
277
|
-
|
|
308
|
+
JSON.stringify(track.nodePathInfo.sequenceSubscriptionKey.nodePath) ===
|
|
309
|
+
JSON.stringify(pendingInsertedElementSelection.nodePath.nodePath));
|
|
278
310
|
if (((_a = pendingSelectionStart.current) === null || _a === void 0 ? void 0 : _a.selection) !==
|
|
279
311
|
pendingInsertedElementSelection) {
|
|
280
312
|
pendingSelectionStart.current = {
|
|
@@ -300,7 +332,14 @@ const TimelineInner = () => {
|
|
|
300
332
|
return matchesInsertedNodePath(track) &&
|
|
301
333
|
!((_a = pendingSelectionStart.current) === null || _a === void 0 ? void 0 : _a.existingSequenceIds.has(track.sequence.id));
|
|
302
334
|
});
|
|
303
|
-
if (!insertedTrack
|
|
335
|
+
if (!insertedTrack) {
|
|
336
|
+
return;
|
|
337
|
+
}
|
|
338
|
+
const layerKey = layerChildrenValue.keys.get(insertedTrack.sequence.id);
|
|
339
|
+
if (layerKey !== undefined && !layerChildrenValue.collapsed[layerKey]) {
|
|
340
|
+
layerChildrenValue.toggle(layerKey);
|
|
341
|
+
}
|
|
342
|
+
if (insertedTrack.nodePathInfo === null) {
|
|
304
343
|
return;
|
|
305
344
|
}
|
|
306
345
|
selectItems([{ type: 'sequence', nodePathInfo: insertedTrack.nodePathInfo }], { reveal: true });
|
|
@@ -311,42 +350,11 @@ const TimelineInner = () => {
|
|
|
311
350
|
}, [
|
|
312
351
|
canvasContent,
|
|
313
352
|
fastRefreshes,
|
|
353
|
+
layerChildrenValue,
|
|
314
354
|
pendingInsertedElementSelection,
|
|
315
355
|
selectItems,
|
|
316
356
|
timeline,
|
|
317
357
|
]);
|
|
318
|
-
const durationInFrames = (_a = videoConfig === null || videoConfig === void 0 ? void 0 : videoConfig.durationInFrames) !== null && _a !== void 0 ? _a : 0;
|
|
319
|
-
const { getDragOverrides } = (0, react_1.useContext)(remotion_1.Internals.VisualModeDragOverridesContext);
|
|
320
|
-
const filtered = (0, react_1.useMemo)(() => {
|
|
321
|
-
return timeline.filter((t) => {
|
|
322
|
-
// Moving outside the composition can reduce the displayed duration to
|
|
323
|
-
// zero. Keep the drag owner mounted until its pending edit is saved.
|
|
324
|
-
if (t.sequence.showInTimeline &&
|
|
325
|
-
t.nodePathInfo !== null &&
|
|
326
|
-
getDragOverrides(t.nodePathInfo.sequenceSubscriptionKey).from !==
|
|
327
|
-
undefined) {
|
|
328
|
-
return true;
|
|
329
|
-
}
|
|
330
|
-
return (0, should_show_track_in_timeline_1.shouldShowTrackInTimeline)(t, durationInFrames);
|
|
331
|
-
});
|
|
332
|
-
}, [durationInFrames, getDragOverrides, timeline]);
|
|
333
|
-
// Keep `filtered` complete so a future toggle can show every programmatic
|
|
334
|
-
// instance without recalculating the timeline or losing its instance index.
|
|
335
|
-
const collapsed = (0, react_1.useMemo)(() => {
|
|
336
|
-
const seenNodePaths = new Set();
|
|
337
|
-
return filtered.filter((track) => {
|
|
338
|
-
if (track.nodePathInfo === null) {
|
|
339
|
-
return true;
|
|
340
|
-
}
|
|
341
|
-
const key = (0, timeline_node_path_key_1.timelineSequenceNodePathToKey)(track.nodePathInfo.sequenceSubscriptionKey);
|
|
342
|
-
if (seenNodePaths.has(key)) {
|
|
343
|
-
return false;
|
|
344
|
-
}
|
|
345
|
-
seenNodePaths.add(key);
|
|
346
|
-
return true;
|
|
347
|
-
});
|
|
348
|
-
}, [filtered]);
|
|
349
|
-
const { visibleTracks, value: layerChildrenValue } = (0, TimelineLayerChildren_1.useTimelineLayerChildren)(collapsed, sequences, (canvasContent === null || canvasContent === void 0 ? void 0 : canvasContent.type) === 'composition' ? canvasContent.compositionId : null);
|
|
350
358
|
const maxTimelineTracks = (0, studio_runtime_config_1.getStudioMaxTimelineTracks)();
|
|
351
359
|
const shown = (0, react_1.useMemo)(() => {
|
|
352
360
|
return maxTimelineTracks !== null &&
|