@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
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
36
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
40
|
+
const prismjs_1 = __importDefault(require("prismjs"));
|
|
41
|
+
const react_1 = __importStar(require("react"));
|
|
42
|
+
// These CommonJS grammars read global Prism. Load them after initialization:
|
|
43
|
+
// Bun hoists side-effect imports ahead of the CommonJS default import.
|
|
44
|
+
prismjs_1.default.manual = true;
|
|
45
|
+
require('prismjs/components/prism-jsx.js');
|
|
46
|
+
require('prismjs/components/prism-typescript.js');
|
|
47
|
+
require('prismjs/components/prism-tsx.js');
|
|
48
|
+
const tokenStyle = {
|
|
49
|
+
fontFamily: 'inherit',
|
|
50
|
+
fontSize: 'inherit',
|
|
51
|
+
lineHeight: 'inherit',
|
|
52
|
+
};
|
|
53
|
+
const renderTokens = (tokens) => {
|
|
54
|
+
var _a;
|
|
55
|
+
if (typeof tokens === 'string') {
|
|
56
|
+
return tokens;
|
|
57
|
+
}
|
|
58
|
+
if (Array.isArray(tokens)) {
|
|
59
|
+
let offset = 0;
|
|
60
|
+
return tokens.map((token) => {
|
|
61
|
+
const key = offset;
|
|
62
|
+
offset += token.length;
|
|
63
|
+
return jsx_runtime_1.jsx(react_1.default.Fragment, { children: renderTokens(token) }, key);
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
return (jsx_runtime_1.jsx("span", { className: [
|
|
67
|
+
'token',
|
|
68
|
+
tokens.type,
|
|
69
|
+
...(typeof tokens.alias === 'string'
|
|
70
|
+
? [tokens.alias]
|
|
71
|
+
: ((_a = tokens.alias) !== null && _a !== void 0 ? _a : [])),
|
|
72
|
+
].join(' '), style: tokenStyle, children: renderTokens(tokens.content) }));
|
|
73
|
+
};
|
|
74
|
+
const SyntaxHighlightedSource = ({ source, }) => {
|
|
75
|
+
const tokens = (0, react_1.useMemo)(() => prismjs_1.default.tokenize(source, prismjs_1.default.languages.tsx), [source]);
|
|
76
|
+
return (jsx_runtime_1.jsx("span", { style: { ...tokenStyle, color: 'inherit' }, children: renderTokens(tokens) }));
|
|
77
|
+
};
|
|
78
|
+
exports.default = SyntaxHighlightedSource;
|
|
@@ -19,7 +19,7 @@ const selectorButton = {
|
|
|
19
19
|
userSelect: 'none',
|
|
20
20
|
WebkitUserSelect: 'none',
|
|
21
21
|
};
|
|
22
|
-
const VerticalTab = ({ children, onClick, renderIcon, style, selected }) => {
|
|
22
|
+
const VerticalTab = ({ children, onClick, renderIcon, style, selected, autoFocus }) => {
|
|
23
23
|
const [hovered, setHovered] = (0, react_1.useState)(false);
|
|
24
24
|
const { tabIndex } = (0, z_index_1.useZIndex)();
|
|
25
25
|
const onPointerEnter = (0, react_1.useCallback)(() => {
|
|
@@ -38,6 +38,6 @@ const VerticalTab = ({ children, onClick, renderIcon, style, selected }) => {
|
|
|
38
38
|
...style,
|
|
39
39
|
};
|
|
40
40
|
}, [color, hovered, selected, style]);
|
|
41
|
-
return (jsx_runtime_1.jsxs("button", { style: definiteStyle, type: "button", onClick: onClick, tabIndex: tabIndex, onPointerLeave: onPointerLeave, onPointerEnter: onPointerEnter, children: [renderIcon ? renderIcon(color) : null, children] }));
|
|
41
|
+
return (jsx_runtime_1.jsxs("button", { autoFocus: autoFocus, style: definiteStyle, type: "button", onClick: onClick, tabIndex: tabIndex, onPointerLeave: onPointerLeave, onPointerEnter: onPointerEnter, children: [renderIcon ? renderIcon(color) : null, children] }));
|
|
42
42
|
};
|
|
43
43
|
exports.VerticalTab = VerticalTab;
|
|
@@ -102,13 +102,12 @@ const TimeValue = () => {
|
|
|
102
102
|
}), [seek, play, pause, toggle]);
|
|
103
103
|
(0, react_1.useEffect)(() => {
|
|
104
104
|
const gKey = keybindings.registerKeybinding({
|
|
105
|
-
event: '
|
|
106
|
-
|
|
105
|
+
event: 'keydown',
|
|
106
|
+
action: 'goToFrame',
|
|
107
107
|
callback: () => {
|
|
108
108
|
var _a;
|
|
109
109
|
(_a = ref.current) === null || _a === void 0 ? void 0 : _a.click();
|
|
110
110
|
},
|
|
111
|
-
commandCtrlKey: false,
|
|
112
111
|
preventDefault: true,
|
|
113
112
|
triggerIfInputFieldFocused: false,
|
|
114
113
|
keepRegisteredWhenNotHighestContext: false,
|
|
@@ -8,6 +8,7 @@ const client_id_1 = require("../../helpers/client-id");
|
|
|
8
8
|
const sequence_node_path_mutations_1 = require("../../helpers/sequence-node-path-mutations");
|
|
9
9
|
const ExpandedTracksProvider_1 = require("../ExpandedTracksProvider");
|
|
10
10
|
const sequence_props_subscription_store_1 = require("./sequence-props-subscription-store");
|
|
11
|
+
const TimelineSelection_1 = require("./TimelineSelection");
|
|
11
12
|
const SequencePropsObserver = () => {
|
|
12
13
|
const { subscribeToEvent } = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx);
|
|
13
14
|
const { remapPropStatuses, setPropStatuses } = (0, react_1.useContext)(remotion_1.Internals.VisualModeSettersContext);
|
|
@@ -18,6 +19,7 @@ const SequencePropsObserver = () => {
|
|
|
18
19
|
const { setOverrideIdToNodePath } = (0, react_1.useContext)(remotion_1.Internals.OverrideIdsToNodePathsSettersContext);
|
|
19
20
|
const { fastRefreshes } = (0, react_1.useContext)(fast_refresh_context_1.FastRefreshContext);
|
|
20
21
|
const { migrateExpandedTracksForSubscriptionKey } = (0, react_1.useContext)(ExpandedTracksProvider_1.ExpandedTracksSetterContext);
|
|
22
|
+
const { remapSelectionNodePaths } = (0, TimelineSelection_1.useTimelineSelection)();
|
|
21
23
|
(0, react_1.useEffect)(() => {
|
|
22
24
|
const handleEvent = (event) => {
|
|
23
25
|
if (event.type !== 'sequence-props-updated') {
|
|
@@ -36,6 +38,7 @@ const SequencePropsObserver = () => {
|
|
|
36
38
|
if (mutations.length === 0) {
|
|
37
39
|
return;
|
|
38
40
|
}
|
|
41
|
+
remapSelectionNodePaths(mutations);
|
|
39
42
|
const statusRemappings = [];
|
|
40
43
|
const overrideUpdates = [];
|
|
41
44
|
const overrideIdsToRefresh = new Set();
|
|
@@ -127,6 +130,7 @@ const SequencePropsObserver = () => {
|
|
|
127
130
|
fastRefreshes,
|
|
128
131
|
migrateExpandedTracksForSubscriptionKey,
|
|
129
132
|
propStatusesRef,
|
|
133
|
+
remapSelectionNodePaths,
|
|
130
134
|
remapPropStatuses,
|
|
131
135
|
setOverrideIdToNodePath,
|
|
132
136
|
]);
|
|
@@ -63,7 +63,6 @@ const should_subscribe_to_sequence_props_1 = require("./should-subscribe-to-sequ
|
|
|
63
63
|
const SubscribeToNodePaths_1 = require("./SubscribeToNodePaths");
|
|
64
64
|
const timeline_asset_drop_context_1 = require("./timeline-asset-drop-context");
|
|
65
65
|
const timeline_refs_1 = require("./timeline-refs");
|
|
66
|
-
const timeline_scroll_logic_1 = require("./timeline-scroll-logic");
|
|
67
66
|
const TimelineDragHandler_1 = require("./TimelineDragHandler");
|
|
68
67
|
const TimelineHeightContainer_1 = require("./TimelineHeightContainer");
|
|
69
68
|
const TimelineInOutDragHandler_1 = require("./TimelineInOutDragHandler");
|
|
@@ -75,7 +74,7 @@ const TimelinePinchZoom_1 = require("./TimelinePinchZoom");
|
|
|
75
74
|
const TimelinePlayCursorSyncer_1 = require("./TimelinePlayCursorSyncer");
|
|
76
75
|
const TimelineScrollable_1 = require("./TimelineScrollable");
|
|
77
76
|
const TimelineSelection_1 = require("./TimelineSelection");
|
|
78
|
-
const
|
|
77
|
+
const TimelineSequenceRightEdgeDragHandle_1 = require("./TimelineSequenceRightEdgeDragHandle");
|
|
79
78
|
const TimelineSlider_1 = require("./TimelineSlider");
|
|
80
79
|
const TimelineTickFormatProvider_1 = require("./TimelineTickFormatProvider");
|
|
81
80
|
const TimelineTimeIndicators_1 = require("./TimelineTimeIndicators");
|
|
@@ -99,7 +98,6 @@ const TimelineContextMenuArea = ({ children }) => {
|
|
|
99
98
|
const assetDropFrame = (0, use_timeline_asset_drop_1.useTimelineAssetDrop)();
|
|
100
99
|
const { compositions, canvasContent } = (0, react_1.useContext)(remotion_1.Internals.CompositionManager);
|
|
101
100
|
const videoConfig = remotion_1.Internals.useUnsafeVideoConfig();
|
|
102
|
-
const isStill = (0, is_current_selected_still_1.useIsStill)();
|
|
103
101
|
const [isAddingSolid, setIsAddingSolid] = (0, react_1.useState)(false);
|
|
104
102
|
const [isAddingAsset, setIsAddingAsset] = (0, react_1.useState)(false);
|
|
105
103
|
const { previewServerState } = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx);
|
|
@@ -107,44 +105,6 @@ const TimelineContextMenuArea = ({ children }) => {
|
|
|
107
105
|
const previewInteractive = previewConnected && (0, interactivity_enabled_1.isStudioInteractivityEnabled)();
|
|
108
106
|
const browserStudioOperations = (0, browser_studio_operations_1.getBrowserStudioOperations)();
|
|
109
107
|
const browserStudioCanInsertSolid = browserStudioOperations !== null;
|
|
110
|
-
(0, react_1.useEffect)(() => {
|
|
111
|
-
const verticalScroll = timeline_refs_1.timelineVerticalScroll.current;
|
|
112
|
-
if (!verticalScroll) {
|
|
113
|
-
return;
|
|
114
|
-
}
|
|
115
|
-
const autoScroll = (0, timeline_scroll_logic_1.startTimelineEdgeAutoScroll)({
|
|
116
|
-
includeHorizontal: false,
|
|
117
|
-
includeVertical: true,
|
|
118
|
-
verticalTopOffset: isStill ? 0 : TimelineTimeIndicators_1.TIMELINE_TIME_INDICATOR_HEIGHT,
|
|
119
|
-
onTick: (directions) => {
|
|
120
|
-
if (directions.y === null) {
|
|
121
|
-
return;
|
|
122
|
-
}
|
|
123
|
-
verticalScroll.scrollTop +=
|
|
124
|
-
directions.y === 'up'
|
|
125
|
-
? -timeline_scroll_logic_1.EDGE_SCROLL_VERTICAL_INCREMENT
|
|
126
|
-
: timeline_scroll_logic_1.EDGE_SCROLL_VERTICAL_INCREMENT;
|
|
127
|
-
},
|
|
128
|
-
});
|
|
129
|
-
const onDragOver = (event) => {
|
|
130
|
-
if (!event.dataTransfer ||
|
|
131
|
-
!Array.from(event.dataTransfer.types).includes(TimelineSequenceItem_1.SEQUENCE_REORDER_MIME_TYPE)) {
|
|
132
|
-
autoScroll.stop();
|
|
133
|
-
return;
|
|
134
|
-
}
|
|
135
|
-
autoScroll.update(event);
|
|
136
|
-
};
|
|
137
|
-
const stopAutoScroll = () => autoScroll.stop();
|
|
138
|
-
verticalScroll.addEventListener('dragover', onDragOver, true);
|
|
139
|
-
document.addEventListener('dragend', stopAutoScroll, true);
|
|
140
|
-
document.addEventListener('drop', stopAutoScroll, true);
|
|
141
|
-
return () => {
|
|
142
|
-
autoScroll.stop();
|
|
143
|
-
verticalScroll.removeEventListener('dragover', onDragOver, true);
|
|
144
|
-
document.removeEventListener('dragend', stopAutoScroll, true);
|
|
145
|
-
document.removeEventListener('drop', stopAutoScroll, true);
|
|
146
|
-
};
|
|
147
|
-
}, [isStill]);
|
|
148
108
|
const currentCompositionId = (canvasContent === null || canvasContent === void 0 ? void 0 : canvasContent.type) === 'composition' ? canvasContent.compositionId : null;
|
|
149
109
|
const currentComposition = (0, react_1.useMemo)(() => {
|
|
150
110
|
var _a;
|
|
@@ -299,22 +259,54 @@ const TimelineInner = () => {
|
|
|
299
259
|
overrideIdToNodePathMappings,
|
|
300
260
|
compositions,
|
|
301
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);
|
|
302
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);
|
|
303
295
|
const { fastRefreshes } = (0, react_1.useContext)(fast_refresh_context_1.FastRefreshContext);
|
|
304
296
|
const pendingSelectionStart = (0, react_1.useRef)(null);
|
|
305
297
|
const { selectItems } = (0, TimelineSelection_1.useTimelineSelection)();
|
|
306
|
-
(0, react_1.
|
|
298
|
+
(0, react_1.useLayoutEffect)(() => {
|
|
307
299
|
var _a;
|
|
308
300
|
if (pendingInsertedElementSelection === null) {
|
|
309
301
|
pendingSelectionStart.current = null;
|
|
310
302
|
return;
|
|
311
303
|
}
|
|
312
|
-
const matchesInsertedNodePath = (track) =>
|
|
313
|
-
(
|
|
314
|
-
|
|
304
|
+
const matchesInsertedNodePath = (track) => pendingInsertedElementSelection.nodePath === null ||
|
|
305
|
+
(track.nodePathInfo !== null &&
|
|
306
|
+
track.nodePathInfo.sequenceSubscriptionKey.absolutePath ===
|
|
315
307
|
pendingInsertedElementSelection.nodePath.absolutePath &&
|
|
316
|
-
|
|
317
|
-
|
|
308
|
+
JSON.stringify(track.nodePathInfo.sequenceSubscriptionKey.nodePath) ===
|
|
309
|
+
JSON.stringify(pendingInsertedElementSelection.nodePath.nodePath));
|
|
318
310
|
if (((_a = pendingSelectionStart.current) === null || _a === void 0 ? void 0 : _a.selection) !==
|
|
319
311
|
pendingInsertedElementSelection) {
|
|
320
312
|
pendingSelectionStart.current = {
|
|
@@ -340,7 +332,14 @@ const TimelineInner = () => {
|
|
|
340
332
|
return matchesInsertedNodePath(track) &&
|
|
341
333
|
!((_a = pendingSelectionStart.current) === null || _a === void 0 ? void 0 : _a.existingSequenceIds.has(track.sequence.id));
|
|
342
334
|
});
|
|
343
|
-
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) {
|
|
344
343
|
return;
|
|
345
344
|
}
|
|
346
345
|
selectItems([{ type: 'sequence', nodePathInfo: insertedTrack.nodePathInfo }], { reveal: true });
|
|
@@ -351,42 +350,11 @@ const TimelineInner = () => {
|
|
|
351
350
|
}, [
|
|
352
351
|
canvasContent,
|
|
353
352
|
fastRefreshes,
|
|
353
|
+
layerChildrenValue,
|
|
354
354
|
pendingInsertedElementSelection,
|
|
355
355
|
selectItems,
|
|
356
356
|
timeline,
|
|
357
357
|
]);
|
|
358
|
-
const durationInFrames = (_a = videoConfig === null || videoConfig === void 0 ? void 0 : videoConfig.durationInFrames) !== null && _a !== void 0 ? _a : 0;
|
|
359
|
-
const { getDragOverrides } = (0, react_1.useContext)(remotion_1.Internals.VisualModeDragOverridesContext);
|
|
360
|
-
const filtered = (0, react_1.useMemo)(() => {
|
|
361
|
-
return timeline.filter((t) => {
|
|
362
|
-
// Moving outside the composition can reduce the displayed duration to
|
|
363
|
-
// zero. Keep the drag owner mounted until its pending edit is saved.
|
|
364
|
-
if (t.sequence.showInTimeline &&
|
|
365
|
-
t.nodePathInfo !== null &&
|
|
366
|
-
getDragOverrides(t.nodePathInfo.sequenceSubscriptionKey).from !==
|
|
367
|
-
undefined) {
|
|
368
|
-
return true;
|
|
369
|
-
}
|
|
370
|
-
return (0, should_show_track_in_timeline_1.shouldShowTrackInTimeline)(t, durationInFrames);
|
|
371
|
-
});
|
|
372
|
-
}, [durationInFrames, getDragOverrides, timeline]);
|
|
373
|
-
// Keep `filtered` complete so a future toggle can show every programmatic
|
|
374
|
-
// instance without recalculating the timeline or losing its instance index.
|
|
375
|
-
const collapsed = (0, react_1.useMemo)(() => {
|
|
376
|
-
const seenNodePaths = new Set();
|
|
377
|
-
return filtered.filter((track) => {
|
|
378
|
-
if (track.nodePathInfo === null) {
|
|
379
|
-
return true;
|
|
380
|
-
}
|
|
381
|
-
const key = (0, timeline_node_path_key_1.timelineSequenceNodePathToKey)(track.nodePathInfo.sequenceSubscriptionKey);
|
|
382
|
-
if (seenNodePaths.has(key)) {
|
|
383
|
-
return false;
|
|
384
|
-
}
|
|
385
|
-
seenNodePaths.add(key);
|
|
386
|
-
return true;
|
|
387
|
-
});
|
|
388
|
-
}, [filtered]);
|
|
389
|
-
const { visibleTracks, value: layerChildrenValue } = (0, TimelineLayerChildren_1.useTimelineLayerChildren)(collapsed, sequences, (canvasContent === null || canvasContent === void 0 ? void 0 : canvasContent.type) === 'composition' ? canvasContent.compositionId : null);
|
|
390
358
|
const maxTimelineTracks = (0, studio_runtime_config_1.getStudioMaxTimelineTracks)();
|
|
391
359
|
const shown = (0, react_1.useMemo)(() => {
|
|
392
360
|
return maxTimelineTracks !== null &&
|
|
@@ -413,6 +381,6 @@ const TimelineInner = () => {
|
|
|
413
381
|
};
|
|
414
382
|
const MemoizedTimelineInner = react_1.default.memo(TimelineInner);
|
|
415
383
|
const Timeline = () => {
|
|
416
|
-
return (jsx_runtime_1.jsx(TimelineTickFormatProvider_1.TimelineTickFormatProvider, { children: jsx_runtime_1.jsx(MemoizedTimelineInner, {}) }));
|
|
384
|
+
return (jsx_runtime_1.jsx(TimelineTickFormatProvider_1.TimelineTickFormatProvider, { children: jsx_runtime_1.jsx(TimelineSequenceRightEdgeDragHandle_1.TimelineSequenceMediaDurationDragLimitsProvider, { children: jsx_runtime_1.jsx(MemoizedTimelineInner, {}) }) }));
|
|
417
385
|
};
|
|
418
386
|
exports.Timeline = Timeline;
|
|
@@ -367,7 +367,7 @@ const TimelineClipboardKeybindings = () => {
|
|
|
367
367
|
const { clientId } = previewServerState;
|
|
368
368
|
const copy = keybindings.registerKeybinding({
|
|
369
369
|
event: 'keydown',
|
|
370
|
-
|
|
370
|
+
action: 'copyEffectsAndValues',
|
|
371
371
|
callback: (e) => {
|
|
372
372
|
var _a, _b;
|
|
373
373
|
const { selectedItems } = currentSelection.current;
|
|
@@ -509,14 +509,13 @@ const TimelineClipboardKeybindings = () => {
|
|
|
509
509
|
(0, NotificationCenter_1.showNotification)(`Could not copy effects: ${err.message}`, 2000);
|
|
510
510
|
});
|
|
511
511
|
},
|
|
512
|
-
commandCtrlKey: true,
|
|
513
512
|
preventDefault: false,
|
|
514
513
|
triggerIfInputFieldFocused: false,
|
|
515
514
|
keepRegisteredWhenNotHighestContext: false,
|
|
516
515
|
});
|
|
517
516
|
const cut = keybindings.registerKeybinding({
|
|
518
517
|
event: 'keydown',
|
|
519
|
-
|
|
518
|
+
action: 'cutEffects',
|
|
520
519
|
callback: (e) => {
|
|
521
520
|
const { selectedItems, clearSelection, selectItems } = currentSelection.current;
|
|
522
521
|
if (selectedItems.length === 0) {
|
|
@@ -575,7 +574,6 @@ const TimelineClipboardKeybindings = () => {
|
|
|
575
574
|
(0, NotificationCenter_1.showNotification)(`Could not cut effects: ${err.message}`, 2000);
|
|
576
575
|
});
|
|
577
576
|
},
|
|
578
|
-
commandCtrlKey: true,
|
|
579
577
|
preventDefault: false,
|
|
580
578
|
triggerIfInputFieldFocused: false,
|
|
581
579
|
keepRegisteredWhenNotHighestContext: false,
|
|
@@ -25,31 +25,18 @@ const TimelineDeleteKeybindings = () => {
|
|
|
25
25
|
if (!canSelect || previewServerState.type !== 'connected') {
|
|
26
26
|
return;
|
|
27
27
|
}
|
|
28
|
-
const backspace = keybindings.registerKeybinding({
|
|
29
|
-
event: 'keydown',
|
|
30
|
-
key: 'Backspace',
|
|
31
|
-
callback: () => deleteTimelineItems(null),
|
|
32
|
-
commandCtrlKey: false,
|
|
33
|
-
preventDefault: true,
|
|
34
|
-
triggerIfInputFieldFocused: false,
|
|
35
|
-
keepRegisteredWhenNotHighestContext: false,
|
|
36
|
-
});
|
|
37
28
|
const deleteKey = keybindings.registerKeybinding({
|
|
38
29
|
event: 'keydown',
|
|
39
|
-
|
|
30
|
+
action: 'deleteSelection',
|
|
40
31
|
callback: () => deleteTimelineItems(null),
|
|
41
|
-
commandCtrlKey: false,
|
|
42
32
|
preventDefault: true,
|
|
43
33
|
triggerIfInputFieldFocused: false,
|
|
44
34
|
keepRegisteredWhenNotHighestContext: false,
|
|
45
35
|
});
|
|
46
36
|
const duplicate = keybindings.registerKeybinding({
|
|
47
37
|
event: 'keydown',
|
|
48
|
-
|
|
49
|
-
callback: (
|
|
50
|
-
if (!(0, split_selected_timeline_item_1.shouldHandleTimelineDuplicateShortcut)(event)) {
|
|
51
|
-
return;
|
|
52
|
-
}
|
|
38
|
+
action: 'duplicateSequences',
|
|
39
|
+
callback: () => {
|
|
53
40
|
const { selectedItems } = currentSelection.current;
|
|
54
41
|
if (selectedItems.length === 0) {
|
|
55
42
|
return;
|
|
@@ -63,7 +50,6 @@ const TimelineDeleteKeybindings = () => {
|
|
|
63
50
|
}
|
|
64
51
|
duplicatePromise.catch(() => undefined);
|
|
65
52
|
},
|
|
66
|
-
commandCtrlKey: true,
|
|
67
53
|
preventDefault: true,
|
|
68
54
|
triggerIfInputFieldFocused: false,
|
|
69
55
|
keepRegisteredWhenNotHighestContext: false,
|
|
@@ -97,7 +83,6 @@ const TimelineDeleteKeybindings = () => {
|
|
|
97
83
|
keepRegisteredWhenNotHighestContext: false,
|
|
98
84
|
});
|
|
99
85
|
return () => {
|
|
100
|
-
backspace.unregister();
|
|
101
86
|
deleteKey.unregister();
|
|
102
87
|
duplicate.unregister();
|
|
103
88
|
split.unregister();
|
|
@@ -115,7 +115,7 @@ const TimelineDragHandler = () => {
|
|
|
115
115
|
};
|
|
116
116
|
exports.TimelineDragHandler = TimelineDragHandler;
|
|
117
117
|
const TimelineDragHandlerInner = () => {
|
|
118
|
-
var _a;
|
|
118
|
+
var _a, _b;
|
|
119
119
|
const videoConfig = (0, remotion_1.useVideoConfig)();
|
|
120
120
|
const size = player_1.PlayerInternals.useElementSize(timeline_refs_1.scrollableRef, {
|
|
121
121
|
triggerOnWindowResize: true,
|
|
@@ -320,6 +320,6 @@ const TimelineDragHandlerInner = () => {
|
|
|
320
320
|
current.removeEventListener('scroll', onScroll);
|
|
321
321
|
};
|
|
322
322
|
}, []);
|
|
323
|
-
return (jsx_runtime_1.jsx("div", { ref: ref, style: style, onPointerDown: onPointerDown, children: jsx_runtime_1.jsx("div", { style: inner, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME }) }));
|
|
323
|
+
return (jsx_runtime_1.jsx("div", { ref: ref, style: { ...style, minWidth: (_b = size === null || size === void 0 ? void 0 : size.width) !== null && _b !== void 0 ? _b : 0 }, onPointerDown: onPointerDown, children: jsx_runtime_1.jsx("div", { style: inner, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME }) }));
|
|
324
324
|
};
|
|
325
325
|
const TimelineDragHandlerInnerMemo = react_1.default.memo(TimelineDragHandlerInner);
|
|
@@ -47,6 +47,7 @@ const rowClipper = {
|
|
|
47
47
|
boxSizing: 'border-box',
|
|
48
48
|
marginLeft: -timeline_layout_1.TIMELINE_PADDING,
|
|
49
49
|
marginRight: -timeline_layout_1.TIMELINE_PADDING,
|
|
50
|
+
minWidth: `calc(100% + ${timeline_layout_1.TIMELINE_PADDING * 2}px)`,
|
|
50
51
|
overflow: 'hidden',
|
|
51
52
|
paddingLeft: timeline_layout_1.TIMELINE_PADDING,
|
|
52
53
|
paddingRight: timeline_layout_1.TIMELINE_PADDING,
|
|
@@ -8,7 +8,16 @@ const hoverable_1 = require("../../helpers/hoverable");
|
|
|
8
8
|
const persist_boolean_map_1 = require("../../helpers/persist-boolean-map");
|
|
9
9
|
const timeline_node_path_key_1 = require("../../helpers/timeline-node-path-key");
|
|
10
10
|
const TimelineCollapseToggle_1 = require("./TimelineCollapseToggle");
|
|
11
|
-
|
|
11
|
+
// Reserve the same space before and after children register or unregister.
|
|
12
|
+
const toggleLayout = {
|
|
13
|
+
display: 'flex',
|
|
14
|
+
alignItems: 'center',
|
|
15
|
+
justifyContent: 'center',
|
|
16
|
+
width: 12,
|
|
17
|
+
height: 16,
|
|
18
|
+
marginRight: 0,
|
|
19
|
+
flexShrink: 0,
|
|
20
|
+
};
|
|
12
21
|
const STORAGE_KEY = 'remotion.editor.collapsedLayerChildren.v1';
|
|
13
22
|
const TimelineLayerChildrenContext = (0, react_1.createContext)(null);
|
|
14
23
|
exports.TimelineLayerChildrenProvider = TimelineLayerChildrenContext.Provider;
|
|
@@ -104,7 +113,7 @@ const TimelineLayerChildrenToggle = ({ sequence }) => {
|
|
|
104
113
|
}, [context, key]);
|
|
105
114
|
const stopPropagation = (0, react_1.useCallback)((event) => event.stopPropagation(), []);
|
|
106
115
|
if (!(context === null || context === void 0 ? void 0 : context.parents.has(sequence.id)) || key === undefined) {
|
|
107
|
-
return jsx_runtime_1.jsx(
|
|
116
|
+
return jsx_runtime_1.jsx("div", { style: toggleLayout });
|
|
108
117
|
}
|
|
109
118
|
const label = `${isCollapsed ? 'Expand' : 'Collapse'} children of ${sequence.displayName}`;
|
|
110
119
|
return (jsx_runtime_1.jsx("button", { type: "button", className: `${hoverable_1.HOVERABLE_CLASS_NAME} ${hoverable_1.FOCUS_VISIBLE_ONLY_CLASS_NAME}`, "aria-label": label, "aria-expanded": !isCollapsed, title: label, onClick: onClick, onPointerDown: stopPropagation, onDoubleClick: stopPropagation, style: {
|
|
@@ -114,16 +123,10 @@ const TimelineLayerChildrenToggle = ({ sequence }) => {
|
|
|
114
123
|
idleColor: colors_1.LIGHT_TEXT,
|
|
115
124
|
hoverColor: colors_1.WHITE,
|
|
116
125
|
}),
|
|
126
|
+
...toggleLayout,
|
|
117
127
|
border: 'none',
|
|
118
128
|
padding: 0,
|
|
119
129
|
cursor: 'default',
|
|
120
|
-
display: 'flex',
|
|
121
|
-
alignItems: 'center',
|
|
122
|
-
justifyContent: 'center',
|
|
123
|
-
width: 12,
|
|
124
|
-
height: 16,
|
|
125
|
-
marginRight: 0,
|
|
126
|
-
flexShrink: 0,
|
|
127
130
|
}, children: jsx_runtime_1.jsx(TimelineCollapseToggle_1.TimelineCollapseToggle, { collapsed: isCollapsed, color: "currentColor" }) }));
|
|
128
131
|
};
|
|
129
132
|
exports.TimelineLayerChildrenToggle = TimelineLayerChildrenToggle;
|
|
@@ -37,6 +37,7 @@ exports.TimelineRowChrome = exports.TimelineRowKeyframeControlsColumn = exports.
|
|
|
37
37
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
38
38
|
const react_1 = __importStar(require("react"));
|
|
39
39
|
const colors_1 = require("../../helpers/colors");
|
|
40
|
+
const drag_aware_double_click_1 = require("../../helpers/drag-aware-double-click");
|
|
40
41
|
const Padder_1 = require("./Padder");
|
|
41
42
|
const timeline_row_layout_1 = require("./timeline-row-layout");
|
|
42
43
|
const TimelineRowLayoutContext_1 = require("./TimelineRowLayoutContext");
|
|
@@ -72,6 +73,7 @@ exports.TimelineRowKeyframeControlsColumn = TimelineRowKeyframeControlsColumn;
|
|
|
72
73
|
const TimelineRowChrome = ({ depth, eye, keyframeControls, arrow, children, style, selected, selectable, onSelect, showSelectedBackground, containsSelection, hovered = false, outerHeight, onDragLeave, onDragOver, onDrop, onDoubleClick, onPointerEnter, onPointerLeave, }) => {
|
|
73
74
|
const { basePadding, rowBorderRadius, rowHorizontalMargin } = (0, react_1.useContext)(TimelineRowLayoutContext_1.TimelineRowLayoutContext);
|
|
74
75
|
const selectedBackground = (0, react_1.useContext)(exports.TimelineRowSelectedBackgroundContext);
|
|
76
|
+
const doubleClickTracker = (0, react_1.useMemo)(() => (0, drag_aware_double_click_1.createDragAwareDoubleClickTracker)(), []);
|
|
75
77
|
const indentWidth = (0, timeline_row_layout_1.getTimelineRowIndentWidth)(depth);
|
|
76
78
|
const chromeColumnStyle = (0, react_1.useMemo)(() => ({
|
|
77
79
|
alignItems: 'center',
|
|
@@ -95,7 +97,7 @@ const TimelineRowChrome = ({ depth, eye, keyframeControls, arrow, children, styl
|
|
|
95
97
|
onSelect();
|
|
96
98
|
}
|
|
97
99
|
}, [onSelect, selected]);
|
|
98
|
-
const
|
|
100
|
+
const performDoubleClickIfNotInteractive = (0, react_1.useCallback)((e) => {
|
|
99
101
|
const { target } = e;
|
|
100
102
|
if (target instanceof Element &&
|
|
101
103
|
e.currentTarget.contains(target.closest('button, input, select, textarea, a, [contenteditable="true"]'))) {
|
|
@@ -104,6 +106,12 @@ const TimelineRowChrome = ({ depth, eye, keyframeControls, arrow, children, styl
|
|
|
104
106
|
}
|
|
105
107
|
onDoubleClick === null || onDoubleClick === void 0 ? void 0 : onDoubleClick(e);
|
|
106
108
|
}, [onDoubleClick]);
|
|
109
|
+
const onClick = (0, react_1.useCallback)((e) => {
|
|
110
|
+
if (!doubleClickTracker.acceptClickAsDoubleClick(e)) {
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
113
|
+
performDoubleClickIfNotInteractive(e);
|
|
114
|
+
}, [doubleClickTracker, performDoubleClickIfNotInteractive]);
|
|
107
115
|
const highlightBackground = (0, TimelineSelection_1.getTimelineRowHighlightBackground)({
|
|
108
116
|
showSelectedBackground,
|
|
109
117
|
selected,
|
|
@@ -139,8 +147,8 @@ const TimelineRowChrome = ({ depth, eye, keyframeControls, arrow, children, styl
|
|
|
139
147
|
}, [outerHeight, highlightBackground]);
|
|
140
148
|
const chrome = (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [keyframeControls ? (jsx_runtime_1.jsx(exports.TimelineRowKeyframeControlsColumn, { depth: depth, children: keyframeControls })) : (jsx_runtime_1.jsx("div", { style: leftChromeStyle, children: jsx_runtime_1.jsxs("div", { style: chromeColumnStyle, children: [eye, indentWidth > 0 ? jsx_runtime_1.jsx(Padder_1.Padder, { depth: depth }) : null, arrow] }) })), children] }));
|
|
141
149
|
if (outerStyle) {
|
|
142
|
-
return (jsx_runtime_1.jsx("div", { style: outerStyle, onDragLeave: onDragLeave, onDragOver: onDragOver, onDrop: onDrop, onPointerDown: selectable ? onPointerDown : undefined, onContextMenu: selectable ? onContextMenu : undefined,
|
|
150
|
+
return (jsx_runtime_1.jsx("div", { style: outerStyle, onDragLeave: onDragLeave, onDragOver: onDragOver, onDrop: onDrop, onPointerDownCapture: doubleClickTracker.beginPointerGesture, onPointerDown: selectable ? onPointerDown : undefined, onClick: onClick, onContextMenu: selectable ? onContextMenu : undefined, onPointerEnter: onPointerEnter, onPointerLeave: onPointerLeave, children: jsx_runtime_1.jsx("div", { style: innerRowStyle, children: chrome }) }));
|
|
143
151
|
}
|
|
144
|
-
return (jsx_runtime_1.jsx("div", { onDragLeave: onDragLeave, onDragOver: onDragOver, onDrop: onDrop, onPointerDown: selectable ? onPointerDown : undefined, onContextMenu: selectable ? onContextMenu : undefined,
|
|
152
|
+
return (jsx_runtime_1.jsx("div", { onDragLeave: onDragLeave, onDragOver: onDragOver, onDrop: onDrop, onPointerDownCapture: doubleClickTracker.beginPointerGesture, onPointerDown: selectable ? onPointerDown : undefined, onClick: onClick, onContextMenu: selectable ? onContextMenu : undefined, onPointerEnter: onPointerEnter, onPointerLeave: onPointerLeave, style: innerRowStyle, children: chrome }));
|
|
145
153
|
};
|
|
146
154
|
exports.TimelineRowChrome = TimelineRowChrome;
|
|
@@ -52,8 +52,10 @@ const unsupportedStatusWrapper = {
|
|
|
52
52
|
};
|
|
53
53
|
const unsupportedLabel = {
|
|
54
54
|
color: colors_1.WHITE_ALPHA_40,
|
|
55
|
+
fontFamily: 'Arial, Helvetica, sans-serif',
|
|
55
56
|
fontSize: 12,
|
|
56
57
|
fontStyle: 'italic',
|
|
58
|
+
lineHeight: '18px',
|
|
57
59
|
};
|
|
58
60
|
const computedValue = {
|
|
59
61
|
color: colors_1.WHITE_ALPHA_40,
|
|
@@ -119,10 +121,12 @@ const TimelineNonEditableStatus = ({ propStatus, field, runtimeValue, validatedL
|
|
|
119
121
|
});
|
|
120
122
|
}, [field.key, remotionSkillsInfo, setSelectedModal, validatedLocation]);
|
|
121
123
|
if (propStatus.status === 'computed') {
|
|
122
|
-
return (jsx_runtime_1.jsx(exports.UnsupportedStatus, { label:
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
124
|
+
return (jsx_runtime_1.jsx(exports.UnsupportedStatus, { label: runtimeValue === undefined
|
|
125
|
+
? 'computed'
|
|
126
|
+
: (0, timeline_field_display_utils_1.formatTimelineFieldValueForDisplay)({
|
|
127
|
+
fieldSchema: field.fieldSchema,
|
|
128
|
+
value: runtimeValue,
|
|
129
|
+
}), onFix: onFix, formattedValue: runtimeValue !== undefined }));
|
|
126
130
|
}
|
|
127
131
|
};
|
|
128
132
|
exports.TimelineNonEditableStatus = TimelineNonEditableStatus;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type CanvasSelectionInteraction, type CanvasSelectionItem, type CanvasSelectionSnapshot } from '@remotion/canvas';
|
|
2
|
+
import { type SequenceNodePathMutation } from '@remotion/studio-shared';
|
|
2
3
|
import React, { type CSSProperties } from 'react';
|
|
3
4
|
import { type GetDragOverrides, type GetEffectDragOverrides, type PropStatuses } from 'remotion';
|
|
4
5
|
import type { SequenceNodePathInfo, TimelineTrackData } from '../../helpers/get-timeline-sequence-sort-key';
|
|
@@ -101,6 +102,7 @@ type TimelineSelectionContextValue = {
|
|
|
101
102
|
readonly selectedItems: readonly TimelineSelection[];
|
|
102
103
|
};
|
|
103
104
|
readonly containsSelection: (nodePathInfo: SequenceNodePathInfo) => boolean;
|
|
105
|
+
readonly remapSelectionNodePaths: (mutations: readonly SequenceNodePathMutation[]) => void;
|
|
104
106
|
readonly clearSelection: () => void;
|
|
105
107
|
};
|
|
106
108
|
export declare const TimelineSelectionOrderProvider: React.FC<{
|