@remotion/studio 4.0.513 → 4.0.515
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/Studio.js +2 -1
- package/dist/api/install-package.js +14 -1
- package/dist/components/AskAiModal.js +1 -1
- package/dist/components/AssetSelector.js +2 -0
- package/dist/components/AssetSelectorItem.d.ts +2 -1
- package/dist/components/AssetSelectorItem.js +19 -16
- package/dist/components/AudioWaveform.d.ts +3 -0
- package/dist/components/AudioWaveform.js +65 -199
- package/dist/components/Canvas.js +40 -5
- package/dist/components/CanvasOrLoading.js +5 -0
- package/dist/components/CompositionSelector.js +2 -0
- package/dist/components/ConfigureDefaultEditorModal.js +17 -11
- package/dist/components/Editor.js +16 -1
- package/dist/components/ElementInstallConfirmation.d.ts +1 -0
- package/dist/components/ElementInstallConfirmation.js +4 -2
- package/dist/components/FixComputedValueModal.d.ts +9 -0
- package/dist/components/FixComputedValueModal.js +217 -0
- package/dist/components/InitialCompositionLoader.js +19 -0
- package/dist/components/InlineDropdown.js +4 -4
- package/dist/components/InspectorInfoHeader.js +3 -3
- package/dist/components/InspectorOpenInEditor.js +3 -1
- package/dist/components/InspectorPanel/CompositionInspector.js +37 -5
- package/dist/components/InspectorPanel/CompositionInspectorHeader.js +2 -2
- package/dist/components/InspectorPanel/ConnectedCompositionsSection.js +1 -1
- package/dist/components/InspectorPanel/EasingInspector.js +1 -1
- package/dist/components/InspectorPanel/KeyframeInspector.js +2 -2
- package/dist/components/InspectorPanel/SequenceInspectorHeader.js +1 -1
- package/dist/components/InspectorPanel/SequenceSelectionInspector.js +35 -6
- package/dist/components/InspectorPanel/common.d.ts +5 -5
- package/dist/components/InspectorPanel/common.js +8 -8
- package/dist/components/InspectorPanel/styles.d.ts +1 -1
- package/dist/components/InspectorPanel/styles.js +4 -2
- package/dist/components/InspectorSourceLocation.d.ts +1 -1
- package/dist/components/InspectorSourceLocation.js +2 -2
- package/dist/components/InstallPackage.d.ts +1 -1
- package/dist/components/InstallPackage.js +38 -6
- package/dist/components/LicenseKeyValidation.js +2 -2
- package/dist/components/Menu/MenuDivider.js +1 -1
- package/dist/components/Modals.js +11 -3
- package/dist/components/NewComposition/CodemodFooter.d.ts +1 -0
- package/dist/components/NewComposition/CodemodFooter.js +10 -8
- package/dist/components/NewComposition/DeleteComposition.js +1 -1
- package/dist/components/NewComposition/DeleteFolder.js +1 -1
- package/dist/components/NewComposition/DuplicateComposition.js +7 -2
- package/dist/components/NewComposition/NewComposition.js +1 -1
- package/dist/components/NewComposition/NewFolder.js +1 -1
- package/dist/components/NewComposition/RenameComposition.js +1 -1
- package/dist/components/NewComposition/RenameFolder.js +1 -1
- package/dist/components/NewComposition/duplicate-composition-api.d.ts +16 -0
- package/dist/components/NewComposition/duplicate-composition-api.js +16 -0
- package/dist/components/NoRegisterRoot.js +1 -1
- package/dist/components/QuickSwitcher/ExplorerQuickSwitcherTrigger.js +4 -3
- package/dist/components/QuickSwitcher/QuickSwitcherContent.js +1 -0
- package/dist/components/QuickSwitcher/fuzzy-search.js +1 -1
- package/dist/components/RefreshCompositionOverlay.js +1 -1
- package/dist/components/RenderButton.js +6 -3
- package/dist/components/RenderModal/GuiRenderStatus.js +3 -1
- package/dist/components/RenderModal/RenderModalOutputName.js +3 -3
- package/dist/components/RenderModal/WebRenderModal.js +10 -4
- package/dist/components/RenderModal/WebRenderModalAdvanced.d.ts +2 -0
- package/dist/components/RenderModal/WebRenderModalAdvanced.js +9 -2
- package/dist/components/RenderModal/render-modals.js +5 -1
- package/dist/components/RenderQueue/ClientRenderQueueProcessor.js +5 -1
- package/dist/components/RenderQueue/RenderQueueItem.js +3 -1
- package/dist/components/RenderQueue/RenderQueueOpenInFolder.js +3 -1
- package/dist/components/RenderQueue/RenderQueueRemoveItem.js +1 -1
- package/dist/components/RenderQueue/actions.js +12 -2
- package/dist/components/RenderQueue/client-side-render-types.d.ts +1 -0
- package/dist/components/RenderingSettings.d.ts +2 -0
- package/dist/components/RenderingSettings.js +355 -0
- package/dist/components/SelectedOutlineCanvasRotation.d.ts +1 -0
- package/dist/components/SelectedOutlineCanvasRotation.js +11 -4
- package/dist/components/SelectedOutlineElement.js +3 -3
- package/dist/components/SelectedOutlinePolygon.d.ts +2 -0
- package/dist/components/SelectedOutlinePolygon.js +54 -9
- package/dist/components/SettingsContext.d.ts +4 -1
- package/dist/components/SettingsContext.js +9 -2
- package/dist/components/SettingsModal.d.ts +1 -1
- package/dist/components/SettingsModal.js +10 -1
- package/dist/components/SettingsModalFooter.js +1 -1
- package/dist/components/StudioSettings.d.ts +2 -0
- package/dist/components/StudioSettings.js +185 -0
- package/dist/components/Timeline/LoopedIndicator.js +1 -1
- package/dist/components/Timeline/LoopedTimelineIndicators.d.ts +3 -0
- package/dist/components/Timeline/LoopedTimelineIndicators.js +22 -14
- package/dist/components/Timeline/Timeline.js +11 -9
- package/dist/components/Timeline/TimelineAssetField.d.ts +2 -2
- package/dist/components/Timeline/TimelineAssetField.js +1 -1
- package/dist/components/Timeline/TimelineClipboardKeybindings.js +6 -2
- package/dist/components/Timeline/TimelineDragHandler.js +62 -76
- package/dist/components/Timeline/TimelineEffectItem.js +23 -6
- package/dist/components/Timeline/TimelineEffectPropItem.d.ts +4 -2
- package/dist/components/Timeline/TimelineEffectPropItem.js +22 -13
- package/dist/components/Timeline/TimelineExpandArrowButton.js +10 -7
- package/dist/components/Timeline/TimelineExpandedKeyframeRow.js +4 -1
- package/dist/components/Timeline/TimelineExpandedRow.d.ts +1 -1
- package/dist/components/Timeline/TimelineExpandedRow.js +4 -4
- package/dist/components/Timeline/TimelineExpandedSection.js +8 -5
- package/dist/components/Timeline/TimelineHeightContainer.d.ts +0 -4
- package/dist/components/Timeline/TimelineHeightContainer.js +4 -4
- package/dist/components/Timeline/TimelineImageInfo.d.ts +1 -0
- package/dist/components/Timeline/TimelineImageInfo.js +3 -2
- package/dist/components/Timeline/TimelineKeyframeControls.js +6 -1
- package/dist/components/Timeline/TimelineList.d.ts +1 -5
- package/dist/components/Timeline/TimelineList.js +14 -9
- package/dist/components/Timeline/TimelinePinchZoom.js +5 -5
- package/dist/components/Timeline/TimelineRowChrome.d.ts +1 -2
- package/dist/components/Timeline/TimelineRowChrome.js +50 -7
- package/dist/components/Timeline/TimelineSchemaField.d.ts +7 -3
- package/dist/components/Timeline/TimelineSchemaField.js +71 -13
- package/dist/components/Timeline/TimelineScrollable.js +3 -1
- package/dist/components/Timeline/TimelineSelection.d.ts +13 -5
- package/dist/components/Timeline/TimelineSelection.js +95 -106
- package/dist/components/Timeline/TimelineSequence.js +59 -25
- package/dist/components/Timeline/TimelineSequenceItem.d.ts +1 -1
- package/dist/components/Timeline/TimelineSequenceItem.js +21 -12
- package/dist/components/Timeline/TimelineSequenceName.js +1 -1
- package/dist/components/Timeline/TimelineSequencePropItem.d.ts +2 -1
- package/dist/components/Timeline/TimelineSequencePropItem.js +3 -3
- package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.js +33 -10
- package/dist/components/Timeline/TimelineSlider.js +42 -33
- package/dist/components/Timeline/TimelineTimeIndicators.js +90 -98
- package/dist/components/Timeline/TimelineTrack.js +4 -1
- package/dist/components/Timeline/TimelineTracks.d.ts +0 -2
- package/dist/components/Timeline/TimelineTracks.js +11 -4
- package/dist/components/Timeline/TimelineTransformOriginField.js +1 -1
- package/dist/components/Timeline/TimelineVideoInfo.d.ts +4 -4
- package/dist/components/Timeline/TimelineVideoInfo.js +155 -63
- package/dist/components/Timeline/TimelineViewport.d.ts +12 -0
- package/dist/components/Timeline/TimelineViewport.js +62 -0
- package/dist/components/Timeline/TimelineVirtualization.d.ts +22 -0
- package/dist/components/Timeline/TimelineVirtualization.js +144 -0
- package/dist/components/Timeline/TimelineZoomControls.js +16 -8
- package/dist/components/Timeline/call-add-keyframe.js +31 -3
- package/dist/components/Timeline/call-delete-keyframe.js +13 -3
- package/dist/components/Timeline/call-move-keyframe.js +11 -1
- package/dist/components/Timeline/call-update-keyframe-settings.js +31 -3
- package/dist/components/Timeline/delete-selected-timeline-item.js +8 -3
- package/dist/components/Timeline/duplicate-selected-timeline-item.js +4 -2
- package/dist/components/Timeline/get-timeline-keyframes.d.ts +1 -2
- package/dist/components/Timeline/get-timeline-keyframes.js +1 -8
- package/dist/components/Timeline/get-timeline-sequence-visible-layout.d.ts +30 -0
- package/dist/components/Timeline/get-timeline-sequence-visible-layout.js +61 -0
- package/dist/components/Timeline/save-effect-prop.js +3 -3
- package/dist/components/Timeline/split-selected-timeline-item.js +2 -2
- package/dist/components/Timeline/timeline-scroll-logic.d.ts +24 -0
- package/dist/components/Timeline/timeline-scroll-logic.js +127 -4
- package/dist/components/Timeline/use-timeline-height.d.ts +3 -5
- package/dist/components/Timeline/use-timeline-height.js +16 -18
- package/dist/components/UpdateCheck.d.ts +2 -10
- package/dist/components/UpdateCheck.js +8 -2
- package/dist/components/VisualControls/VisualControlHandle.js +8 -0
- package/dist/components/delete-jsx-node-api.d.ts +2 -0
- package/dist/components/delete-jsx-node-api.js +12 -0
- package/dist/components/effect-drag-and-drop.js +6 -3
- package/dist/components/effect-operations-api.d.ts +8 -0
- package/dist/components/effect-operations-api.js +52 -0
- package/dist/components/element-install-api.d.ts +3 -0
- package/dist/components/element-install-api.js +19 -0
- package/dist/components/import-assets.js +20 -9
- package/dist/components/reorder-sequence-api.d.ts +2 -0
- package/dist/components/reorder-sequence-api.js +12 -0
- package/dist/components/split-jsx-sequence-api.d.ts +2 -0
- package/dist/components/split-jsx-sequence-api.js +12 -0
- package/dist/components/split-video-from-audio-api.d.ts +2 -0
- package/dist/components/split-video-from-audio-api.js +12 -0
- package/dist/error-overlay/remotion-overlay/Overlay.js +1 -1
- package/dist/error-overlay/remotion-overlay/log-studio-error.js +4 -0
- package/dist/esm/{chunk-r46yxrjr.js → chunk-s6k99gh2.js} +1 -1
- package/dist/esm/{chunk-tv7r0jy3.js → chunk-v5a8vpv4.js} +11479 -7851
- package/dist/esm/index.mjs +7 -5
- package/dist/esm/internals.mjs +11479 -7851
- package/dist/esm/previewEntry.mjs +11311 -7683
- package/dist/esm/renderEntry.mjs +3 -4
- package/dist/helpers/browser-studio-operations.d.ts +5 -0
- package/dist/helpers/browser-studio-operations.js +27 -1
- package/dist/helpers/colors.d.ts +1 -1
- package/dist/helpers/colors.js +1 -1
- package/dist/helpers/get-timeline-max-zoom.d.ts +26 -0
- package/dist/helpers/get-timeline-max-zoom.js +45 -0
- package/dist/helpers/inject-css.js +7 -5
- package/dist/helpers/render-codec-label.d.ts +1 -1
- package/dist/helpers/retry-payload.js +1 -0
- package/dist/helpers/studio-runtime-config.d.ts +1 -1
- package/dist/helpers/studio-runtime-config.js +2 -3
- package/dist/helpers/timeline-layout.d.ts +3 -1
- package/dist/helpers/timeline-layout.js +6 -1
- package/dist/helpers/url-state.js +3 -2
- package/dist/helpers/use-max-media-duration.js +5 -3
- package/dist/helpers/use-media-metadata.js +37 -20
- package/dist/helpers/use-menu-structure.js +67 -84
- package/dist/helpers/use-runtime-values.d.ts +2 -1
- package/dist/helpers/use-runtime-values.js +7 -3
- package/dist/icons/cloud-download.d.ts +4 -0
- package/dist/icons/cloud-download.js +8 -0
- package/dist/icons/remotion-triangle.d.ts +2 -0
- package/dist/icons/remotion-triangle.js +7 -0
- package/dist/renderEntry.js +1 -1
- package/dist/state/composition-list.d.ts +13 -0
- package/dist/state/composition-list.js +21 -0
- package/dist/state/modals.d.ts +8 -2
- package/dist/state/timeline-zoom.d.ts +1 -2
- package/dist/state/timeline-zoom.js +9 -5
- package/package.json +14 -13
|
@@ -1,13 +1,47 @@
|
|
|
1
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
|
+
})();
|
|
2
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TimelineRowChrome = exports.TimelineRowKeyframeControlsColumn = void 0;
|
|
36
|
+
exports.TimelineRowChrome = exports.TimelineRowKeyframeControlsColumn = exports.TimelineRowSelectedBackgroundContext = void 0;
|
|
4
37
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const react_1 = require("react");
|
|
38
|
+
const react_1 = __importStar(require("react"));
|
|
6
39
|
const colors_1 = require("../../helpers/colors");
|
|
7
40
|
const Padder_1 = require("./Padder");
|
|
8
41
|
const timeline_row_layout_1 = require("./timeline-row-layout");
|
|
9
42
|
const TimelineRowLayoutContext_1 = require("./TimelineRowLayoutContext");
|
|
10
43
|
const TimelineSelection_1 = require("./TimelineSelection");
|
|
44
|
+
exports.TimelineRowSelectedBackgroundContext = react_1.default.createContext(TimelineSelection_1.TIMELINE_SELECTED_BACKGROUND);
|
|
11
45
|
const rowBase = {
|
|
12
46
|
alignItems: 'stretch',
|
|
13
47
|
display: 'flex',
|
|
@@ -35,11 +69,10 @@ const TimelineRowKeyframeControlsColumn = ({ children, depth }) => {
|
|
|
35
69
|
return (jsx_runtime_1.jsx("div", { style: leftChromeStyle, children: jsx_runtime_1.jsx("div", { style: style, children: children }) }));
|
|
36
70
|
};
|
|
37
71
|
exports.TimelineRowKeyframeControlsColumn = TimelineRowKeyframeControlsColumn;
|
|
38
|
-
const TimelineRowChrome = ({ depth, eye, keyframeControls, arrow, children, style, selected, selectable,
|
|
39
|
-
const ref = (0, react_1.useRef)(null);
|
|
72
|
+
const TimelineRowChrome = ({ depth, eye, keyframeControls, arrow, children, style, selected, selectable, onSelect, showSelectedBackground, containsSelection, hovered = false, isFieldRow, outerHeight, onDragLeave, onDragOver, onDrop, onDoubleClick, onPointerEnter, onPointerLeave, }) => {
|
|
40
73
|
const { basePadding, keyframeControlsPlacement, rowBorderRadius, rowHorizontalMargin, } = (0, react_1.useContext)(TimelineRowLayoutContext_1.TimelineRowLayoutContext);
|
|
74
|
+
const selectedBackground = (0, react_1.useContext)(exports.TimelineRowSelectedBackgroundContext);
|
|
41
75
|
const indentWidth = (0, timeline_row_layout_1.getTimelineRowIndentWidth)(depth);
|
|
42
|
-
(0, TimelineSelection_1.useTimelineFocusableItem)(selectionItem, ref);
|
|
43
76
|
const chromeColumnStyle = (0, react_1.useMemo)(() => ({
|
|
44
77
|
alignItems: 'center',
|
|
45
78
|
alignSelf: 'stretch',
|
|
@@ -60,11 +93,21 @@ const TimelineRowChrome = ({ depth, eye, keyframeControls, arrow, children, styl
|
|
|
60
93
|
e.stopPropagation();
|
|
61
94
|
onSelect();
|
|
62
95
|
}, [onSelect]);
|
|
96
|
+
const onDoubleClickIfNotInteractive = (0, react_1.useCallback)((e) => {
|
|
97
|
+
const { target } = e;
|
|
98
|
+
if (target instanceof Element &&
|
|
99
|
+
e.currentTarget.contains(target.closest('button, input, select, textarea, a, [contenteditable="true"]'))) {
|
|
100
|
+
e.stopPropagation();
|
|
101
|
+
return;
|
|
102
|
+
}
|
|
103
|
+
onDoubleClick === null || onDoubleClick === void 0 ? void 0 : onDoubleClick(e);
|
|
104
|
+
}, [onDoubleClick]);
|
|
63
105
|
const highlightBackground = (0, TimelineSelection_1.getTimelineRowHighlightBackground)({
|
|
64
106
|
showSelectedBackground,
|
|
65
107
|
selected,
|
|
66
108
|
containsSelection,
|
|
67
109
|
hovered,
|
|
110
|
+
selectedBackground,
|
|
68
111
|
});
|
|
69
112
|
const innerRowStyle = (0, react_1.useMemo)(() => ({
|
|
70
113
|
...rowBase,
|
|
@@ -95,8 +138,8 @@ const TimelineRowChrome = ({ depth, eye, keyframeControls, arrow, children, styl
|
|
|
95
138
|
const shouldRenderLeftChrome = !isFieldRow || keyframeControlsPlacement === 'before-label';
|
|
96
139
|
const chrome = (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [shouldRenderLeftChrome ? (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] }) }))) : null, children] }));
|
|
97
140
|
if (outerStyle) {
|
|
98
|
-
return (jsx_runtime_1.jsx("div", {
|
|
141
|
+
return (jsx_runtime_1.jsx("div", { style: outerStyle, onDragLeave: onDragLeave, onDragOver: onDragOver, onDrop: onDrop, onPointerDown: selectable ? onPointerDown : undefined, onContextMenu: selectable ? onContextMenu : undefined, onDoubleClick: onDoubleClickIfNotInteractive, onPointerEnter: onPointerEnter, onPointerLeave: onPointerLeave, children: jsx_runtime_1.jsx("div", { style: innerRowStyle, children: chrome }) }));
|
|
99
142
|
}
|
|
100
|
-
return (jsx_runtime_1.jsx("div", {
|
|
143
|
+
return (jsx_runtime_1.jsx("div", { onDragLeave: onDragLeave, onDragOver: onDragOver, onDrop: onDrop, onPointerDown: selectable ? onPointerDown : undefined, onContextMenu: selectable ? onContextMenu : undefined, onDoubleClick: onDoubleClickIfNotInteractive, onPointerEnter: onPointerEnter, onPointerLeave: onPointerLeave, style: innerRowStyle, children: chrome }));
|
|
101
144
|
};
|
|
102
145
|
exports.TimelineRowChrome = TimelineRowChrome;
|
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { CanUpdateSequencePropStatusFalse, CanUpdateSequencePropStatusStatic, SequencePropsSubscriptionKey } from 'remotion';
|
|
3
|
+
import type { CodePosition } from '../../error-overlay/react-overlay/utils/get-source-map';
|
|
3
4
|
import type { SchemaFieldInfo, TimelineFieldOnDragValueChange, TimelineFieldOnSave } from '../../helpers/timeline-layout';
|
|
4
|
-
export declare const TIMELINE_COMPUTED_EFFECT_FIX_LINK = "https://www.remotion.dev/docs/studio/interactivity-best-practices#keep-effects-editable";
|
|
5
5
|
export declare const UnsupportedStatus: React.FC<{
|
|
6
|
-
readonly label:
|
|
7
|
-
readonly
|
|
6
|
+
readonly label: React.ReactNode;
|
|
7
|
+
readonly onFix?: () => void;
|
|
8
|
+
readonly formattedValue: boolean;
|
|
8
9
|
}>;
|
|
9
10
|
export declare const TimelineNonEditableStatus: React.FC<{
|
|
10
11
|
readonly propStatus: CanUpdateSequencePropStatusFalse;
|
|
12
|
+
readonly field: SchemaFieldInfo;
|
|
13
|
+
readonly runtimeValue: unknown;
|
|
14
|
+
readonly validatedLocation: CodePosition;
|
|
11
15
|
}>;
|
|
12
16
|
export declare const TimelineFieldValue: React.FC<{
|
|
13
17
|
readonly field: SchemaFieldInfo;
|
|
@@ -1,18 +1,47 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var
|
|
3
|
-
|
|
4
|
-
|
|
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
|
+
})();
|
|
5
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.TimelineFieldValue = exports.TimelineNonEditableStatus = exports.UnsupportedStatus =
|
|
36
|
+
exports.TimelineFieldValue = exports.TimelineNonEditableStatus = exports.UnsupportedStatus = void 0;
|
|
7
37
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
-
const react_1 =
|
|
38
|
+
const react_1 = __importStar(require("react"));
|
|
9
39
|
const colors_1 = require("../../helpers/colors");
|
|
10
|
-
const
|
|
40
|
+
const modals_1 = require("../../state/modals");
|
|
41
|
+
const SettingsContext_1 = require("../SettingsContext");
|
|
42
|
+
const timeline_field_display_utils_1 = require("./timeline-field-display-utils");
|
|
11
43
|
const TimelineArrayField_1 = require("./TimelineArrayField");
|
|
12
44
|
const TimelinePrimitiveFieldValue_1 = require("./TimelinePrimitiveFieldValue");
|
|
13
|
-
const INTERACTIVITY_BEST_PRACTICES_DOCS = 'https://www.remotion.dev/docs/studio/interactivity-best-practices';
|
|
14
|
-
const TIMELINE_COMPUTED_VALUE_FIX_LINK = `${INTERACTIVITY_BEST_PRACTICES_DOCS}#keep-editable-values-visible`;
|
|
15
|
-
exports.TIMELINE_COMPUTED_EFFECT_FIX_LINK = `${INTERACTIVITY_BEST_PRACTICES_DOCS}#keep-effects-editable`;
|
|
16
45
|
const unsupportedStatusWrapper = {
|
|
17
46
|
alignItems: 'center',
|
|
18
47
|
display: 'inline-flex',
|
|
@@ -25,6 +54,13 @@ const unsupportedLabel = {
|
|
|
25
54
|
fontSize: 12,
|
|
26
55
|
fontStyle: 'italic',
|
|
27
56
|
};
|
|
57
|
+
const computedValue = {
|
|
58
|
+
color: colors_1.WHITE_ALPHA_40,
|
|
59
|
+
fontFamily: 'Arial, Helvetica, sans-serif',
|
|
60
|
+
fontSize: 12,
|
|
61
|
+
lineHeight: '18px',
|
|
62
|
+
pointerEvents: 'none',
|
|
63
|
+
};
|
|
28
64
|
const fixLinkBase = {
|
|
29
65
|
color: colors_1.LIGHT_TEXT,
|
|
30
66
|
display: 'inline-block',
|
|
@@ -34,8 +70,13 @@ const fixLinkBase = {
|
|
|
34
70
|
lineHeight: 1,
|
|
35
71
|
textDecoration: 'none',
|
|
36
72
|
width: 17,
|
|
73
|
+
appearance: 'none',
|
|
74
|
+
background: 'none',
|
|
75
|
+
border: 'none',
|
|
76
|
+
cursor: 'pointer',
|
|
77
|
+
padding: 0,
|
|
37
78
|
};
|
|
38
|
-
const UnsupportedStatus = ({ label,
|
|
79
|
+
const UnsupportedStatus = ({ label, onFix, formattedValue }) => {
|
|
39
80
|
const [hovered, setHovered] = react_1.default.useState(false);
|
|
40
81
|
const [focused, setFocused] = react_1.default.useState(false);
|
|
41
82
|
const visible = hovered || focused;
|
|
@@ -53,12 +94,29 @@ const UnsupportedStatus = ({ label, fixHref }) => {
|
|
|
53
94
|
event.stopPropagation();
|
|
54
95
|
};
|
|
55
96
|
return (jsx_runtime_1.jsxs("span", { style: unsupportedStatusWrapper, onPointerEnter: () => setHovered(true), onPointerLeave: () => setHovered(false), children: [
|
|
56
|
-
jsx_runtime_1.jsx("span", { style: unsupportedLabel, children: label }),
|
|
97
|
+
jsx_runtime_1.jsx("span", { style: formattedValue ? computedValue : unsupportedLabel, inert: formattedValue, children: label }), onFix ? (jsx_runtime_1.jsx("button", { type: "button", style: fixLink, title: "Fix computed Studio value", onClick: (event) => {
|
|
98
|
+
stopMousePropagation(event);
|
|
99
|
+
onFix();
|
|
100
|
+
}, onDoubleClick: stopMousePropagation, onPointerDown: stopPointerPropagation, onFocus: () => setFocused(true), onBlur: () => setFocused(false), tabIndex: visible ? 0 : -1, children: "Fix" })) : null] }));
|
|
57
101
|
};
|
|
58
102
|
exports.UnsupportedStatus = UnsupportedStatus;
|
|
59
|
-
const TimelineNonEditableStatus = ({ propStatus }) => {
|
|
103
|
+
const TimelineNonEditableStatus = ({ propStatus, field, runtimeValue, validatedLocation }) => {
|
|
104
|
+
const { setSelectedModal } = (0, react_1.useContext)(modals_1.SetSelectedModalContext);
|
|
105
|
+
const { remotionSkillsInfo } = (0, SettingsContext_1.useSettings)();
|
|
106
|
+
const onFix = (0, react_1.useCallback)(() => {
|
|
107
|
+
var _a;
|
|
108
|
+
setSelectedModal({
|
|
109
|
+
type: 'fix-computed-value',
|
|
110
|
+
prop: field.key,
|
|
111
|
+
context: `${validatedLocation.source}:${validatedLocation.line}:${validatedLocation.column}`,
|
|
112
|
+
remotionInteractivitySkillAvailable: (_a = remotionSkillsInfo === null || remotionSkillsInfo === void 0 ? void 0 : remotionSkillsInfo.remotionInteractivitySkillAvailable) !== null && _a !== void 0 ? _a : false,
|
|
113
|
+
});
|
|
114
|
+
}, [field.key, remotionSkillsInfo, setSelectedModal, validatedLocation]);
|
|
60
115
|
if (propStatus.status === 'computed') {
|
|
61
|
-
return (jsx_runtime_1.jsx(exports.UnsupportedStatus, { label: (0,
|
|
116
|
+
return (jsx_runtime_1.jsx(exports.UnsupportedStatus, { label: (0, timeline_field_display_utils_1.formatTimelineFieldValueForDisplay)({
|
|
117
|
+
fieldSchema: field.fieldSchema,
|
|
118
|
+
value: runtimeValue,
|
|
119
|
+
}), onFix: onFix, formattedValue: true }));
|
|
62
120
|
}
|
|
63
121
|
};
|
|
64
122
|
exports.TimelineNonEditableStatus = TimelineNonEditableStatus;
|
|
@@ -8,11 +8,13 @@ const is_menu_item_1 = require("../Menu/is-menu-item");
|
|
|
8
8
|
const timeline_refs_1 = require("./timeline-refs");
|
|
9
9
|
const TimelineAssetDropIndicator_1 = require("./TimelineAssetDropIndicator");
|
|
10
10
|
const TimelineSelection_1 = require("./TimelineSelection");
|
|
11
|
+
const TimelineViewport_1 = require("./TimelineViewport");
|
|
11
12
|
const outer = {
|
|
12
13
|
width: '100%',
|
|
13
14
|
height: '100%',
|
|
14
15
|
overflowX: 'auto',
|
|
15
16
|
overflowY: 'hidden',
|
|
17
|
+
overscrollBehaviorX: 'none',
|
|
16
18
|
position: 'relative',
|
|
17
19
|
backgroundColor: TimelineSelection_1.TIMELINE_BACKGROUND,
|
|
18
20
|
};
|
|
@@ -33,7 +35,7 @@ const TimelineScrollable = ({ children }) => {
|
|
|
33
35
|
};
|
|
34
36
|
}, []);
|
|
35
37
|
return (jsx_runtime_1.jsxs("div", { ref: timeline_refs_1.scrollableRef, "data-timeline-scrollable": "true", style: outer, className: is_menu_item_1.HORIZONTAL_SCROLLBAR_CLASSNAME, onPointerDownCapture: onPointerDownCapture, children: [
|
|
36
|
-
jsx_runtime_1.jsx("div", { style: containerStyle, children: children }), jsx_runtime_1.jsx(TimelineAssetDropIndicator_1.TimelineAssetDropIndicator, {}), marqueeRect === null ? null : (jsx_runtime_1.jsx("div", { style: {
|
|
38
|
+
jsx_runtime_1.jsx(TimelineViewport_1.TimelineViewportProvider, { scrollable: timeline_refs_1.scrollableRef, children: jsx_runtime_1.jsx("div", { style: containerStyle, children: children }) }), jsx_runtime_1.jsx(TimelineAssetDropIndicator_1.TimelineAssetDropIndicator, {}), marqueeRect === null ? null : (jsx_runtime_1.jsx("div", { style: {
|
|
37
39
|
...marqueeStyle,
|
|
38
40
|
height: marqueeRect.bottom - marqueeRect.top,
|
|
39
41
|
left: marqueeRect.left,
|
|
@@ -3,6 +3,7 @@ import { type GetDragOverrides, type GetEffectDragOverrides, type PropStatuses }
|
|
|
3
3
|
import type { SequenceNodePathInfo, TimelineTrackData } from '../../helpers/get-timeline-sequence-sort-key';
|
|
4
4
|
import { type GetIsExpanded } from '../ExpandedTracksProvider';
|
|
5
5
|
export declare const TIMELINE_SELECTED_BACKGROUND = "#3B3F42";
|
|
6
|
+
export declare const TIMELINE_EXPANDED_SELECTED_BACKGROUND = "rgb(31,36,40)";
|
|
6
7
|
export declare const TIMELINE_HOVER_BACKGROUND = "rgba(255, 255, 255, 0.05)";
|
|
7
8
|
export declare const TIMELINE_SELECTED_LABEL_BACKGROUND = "#B0B0B0";
|
|
8
9
|
export declare const TIMELINE_SELECTED_LABEL_TEXT = "black";
|
|
@@ -10,13 +11,14 @@ export declare const TIMELINE_SELECTED_LABEL_HORIZONTAL_PADDING = 2;
|
|
|
10
11
|
export declare const getTimelineSelectedLabelStyle: (selected: boolean, subcategory: boolean) => CSSProperties;
|
|
11
12
|
export declare const getTimelineColor: (selected: boolean, subcategory: boolean) => "black" | "rgba(255, 255, 255, 0.8)";
|
|
12
13
|
export declare const getTimelineSelectedTrackHighlightStyle: (timelineWidth: number, backgroundColor?: string) => CSSProperties;
|
|
13
|
-
export declare const getTimelineRowHighlightBackground: ({ showSelectedBackground, selected, containsSelection, hovered, }: {
|
|
14
|
+
export declare const getTimelineRowHighlightBackground: ({ showSelectedBackground, selected, containsSelection, hovered, selectedBackground, }: {
|
|
14
15
|
readonly showSelectedBackground: boolean;
|
|
15
16
|
readonly selected: boolean;
|
|
16
17
|
readonly containsSelection: boolean;
|
|
17
18
|
readonly hovered: boolean;
|
|
19
|
+
readonly selectedBackground: string;
|
|
18
20
|
}) => string | undefined;
|
|
19
|
-
export declare const TIMELINE_BACKGROUND = "#
|
|
21
|
+
export declare const TIMELINE_BACKGROUND = "#15181B";
|
|
20
22
|
export declare const TIMELINE_TICKS_BACKGROUND = "rgb(31,36,40)";
|
|
21
23
|
export type TimelineSelection = {
|
|
22
24
|
readonly type: 'guide';
|
|
@@ -125,12 +127,12 @@ export declare const extendTimelineMarqueeSelection: ({ currentSelection, marque
|
|
|
125
127
|
}) => readonly TimelineSelection[];
|
|
126
128
|
type TimelineSelectionContextValue = {
|
|
127
129
|
readonly canSelect: boolean;
|
|
130
|
+
readonly revealRequest: TimelineSelectionRevealRequest | null;
|
|
128
131
|
readonly selectedItems: readonly TimelineSelection[];
|
|
129
132
|
readonly isSelected: (item: TimelineSelection) => boolean;
|
|
130
133
|
readonly selectItem: (item: TimelineSelection, interaction?: TimelineSelectionInteraction, allSelectableItems?: readonly TimelineSelection[], options?: TimelineSelectionOptions) => void;
|
|
131
134
|
readonly selectItems: (items: readonly TimelineSelection[], options?: TimelineSelectionOptions) => void;
|
|
132
135
|
readonly registerMarqueeSelectableItem: (item: TimelineSelection, getRect: () => DOMRect | null) => () => void;
|
|
133
|
-
readonly registerFocusableItem: (item: TimelineSelection, getElement: () => Element | null) => () => void;
|
|
134
136
|
readonly getMarqueeSelection: (marqueeRect: TimelineMarqueeRect, lockedSelectionKind: TimelineMarqueeSelectionKind | null) => {
|
|
135
137
|
readonly lockedSelectionKind: TimelineMarqueeSelectionKind | null;
|
|
136
138
|
readonly selectedItems: readonly TimelineSelection[];
|
|
@@ -145,6 +147,10 @@ export declare const TimelineSelectionOrderProvider: React.FC<{
|
|
|
145
147
|
type TimelineSelectionOptions = {
|
|
146
148
|
readonly reveal?: boolean;
|
|
147
149
|
};
|
|
150
|
+
type TimelineSelectionRevealRequest = {
|
|
151
|
+
readonly item: TimelineSelection;
|
|
152
|
+
readonly token: number;
|
|
153
|
+
};
|
|
148
154
|
export declare const getTimelineSelectionFromNodePathInfo: (nodePathInfo: SequenceNodePathInfo | null) => TimelineSelection | null;
|
|
149
155
|
export declare const getTimelineSelectionKey: (item: TimelineSelection) => string;
|
|
150
156
|
export declare const getSelectableTimelineSequenceSelections: (tracks: readonly Pick<TimelineTrackData, "nodePathInfo">[]) => TimelineSelection[];
|
|
@@ -181,7 +187,6 @@ export declare const useTimelineMarqueeSelection: () => {
|
|
|
181
187
|
onPointerDownCapture: (event: React.PointerEvent<HTMLDivElement>) => void;
|
|
182
188
|
};
|
|
183
189
|
export declare const useTimelineMarqueeSelectableItem: (item: TimelineSelection | null, ref: React.RefObject<Element | null>) => void;
|
|
184
|
-
export declare const useTimelineFocusableItem: (item: TimelineSelection | null, ref: React.RefObject<Element | null>) => void;
|
|
185
190
|
export declare const useTimelineRowSelection: (nodePathInfo: SequenceNodePathInfo | null) => {
|
|
186
191
|
onSelect: (interaction?: TimelineSelectionInteraction | undefined) => void;
|
|
187
192
|
selectable: boolean;
|
|
@@ -219,5 +224,8 @@ export declare const useTimelineGuideSelection: (guideId: string) => {
|
|
|
219
224
|
selectionItem: TimelineSelection;
|
|
220
225
|
};
|
|
221
226
|
export declare const useTimelineRowContainsSelection: (nodePathInfo: SequenceNodePathInfo | null) => boolean;
|
|
222
|
-
export declare const useTimelineRowHighlightBackground: (nodePathInfo: SequenceNodePathInfo | null, hovered
|
|
227
|
+
export declare const useTimelineRowHighlightBackground: (nodePathInfo: SequenceNodePathInfo | null, { hovered, selectedBackground, }: {
|
|
228
|
+
readonly hovered: boolean;
|
|
229
|
+
readonly selectedBackground: string;
|
|
230
|
+
}) => string | undefined;
|
|
223
231
|
export {};
|