@remotion/studio 4.0.504 → 4.0.505
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/AssetSelectorItem.js +2 -2
- package/dist/components/AudioWaveform.d.ts +1 -1
- package/dist/components/AudioWaveform.js +36 -3
- package/dist/components/CompositionContextButton.d.ts +1 -1
- package/dist/components/CompositionContextButton.js +2 -2
- package/dist/components/CompositionSelector.js +2 -2
- package/dist/components/CompositionSelectorItem.js +4 -4
- package/dist/components/ContextMenu.d.ts +5 -7
- package/dist/components/ContextMenu.js +54 -21
- package/dist/components/EditorGuides/Guide.js +2 -2
- package/dist/components/EffectPickerModal.js +2 -2
- package/dist/components/InlineAction.d.ts +1 -1
- package/dist/components/InlineAction.js +14 -13
- package/dist/components/InlineDropdown.d.ts +3 -2
- package/dist/components/InlineDropdown.js +16 -5
- package/dist/components/InspectorPanel/ConnectedCompositionsSection.js +2 -2
- package/dist/components/InspectorPanel/SequenceSelectionInspector.js +1 -1
- package/dist/components/InspectorPanel/common.js +24 -34
- package/dist/components/InspectorSequenceSection.js +1 -1
- package/dist/components/Menu/MenuItem.js +16 -12
- package/dist/components/MenuBuildIndicator.js +11 -58
- package/dist/components/MenuCompositionName.js +3 -63
- package/dist/components/MenuToolbar.js +22 -2
- package/dist/components/NewComposition/InputDragger.d.ts +1 -0
- package/dist/components/NewComposition/InputDragger.js +5 -4
- package/dist/components/NewComposition/MenuContent.d.ts +1 -1
- package/dist/components/NewComposition/menu-typeahead.d.ts +1 -1
- package/dist/components/PlayPause.js +2 -2
- package/dist/components/PlaybackRateSelector.js +3 -9
- package/dist/components/PreviewToolbar.js +7 -4
- package/dist/components/RenderButton.d.ts +1 -0
- package/dist/components/RenderButton.js +54 -37
- package/dist/components/SelectedOutlineElement.js +9 -10
- package/dist/components/SelectedOutlineOverlay.js +5 -1
- package/dist/components/SizeSelector.js +3 -9
- package/dist/components/Timeline/Timeline.js +4 -4
- package/dist/components/Timeline/TimelineDragHandler.js +3 -0
- package/dist/components/Timeline/TimelineEffectItem.js +6 -2
- package/dist/components/Timeline/TimelineEffectPropItem.js +6 -3
- package/dist/components/Timeline/TimelineExpandedKeyframeRow.d.ts +6 -6
- package/dist/components/Timeline/TimelineExpandedKeyframeRow.js +32 -1
- package/dist/components/Timeline/TimelineHeightContainer.d.ts +1 -0
- package/dist/components/Timeline/TimelineHeightContainer.js +2 -2
- package/dist/components/Timeline/TimelineInOutDragHandler.js +3 -3
- package/dist/components/Timeline/TimelineKeyframeEasingLine.d.ts +4 -2
- package/dist/components/Timeline/TimelineKeyframeEasingLine.js +30 -28
- package/dist/components/Timeline/TimelineList.d.ts +1 -0
- package/dist/components/Timeline/TimelineList.js +2 -3
- package/dist/components/Timeline/TimelineScaleField.js +1 -1
- package/dist/components/Timeline/TimelineSequence.js +34 -28
- package/dist/components/Timeline/TimelineSequenceItem.d.ts +3 -3
- package/dist/components/Timeline/TimelineSequenceItem.js +34 -23
- package/dist/components/Timeline/TimelineSequencePropItem.d.ts +10 -2
- package/dist/components/Timeline/TimelineSequencePropItem.js +64 -12
- package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.d.ts +2 -2
- package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.js +38 -5
- package/dist/components/Timeline/TimelineTimeIndicators.js +36 -3
- package/dist/components/Timeline/TimelineVideoInfo.d.ts +1 -1
- package/dist/components/Timeline/TimelineVideoInfo.js +36 -3
- package/dist/components/Timeline/TimelineZoomControls.d.ts +2 -2
- package/dist/components/Timeline/TimelineZoomControls.js +39 -12
- package/dist/components/Timeline/use-sequence-freeze-frame-menu-item.d.ts +1 -1
- package/dist/components/Timeline/use-sequence-freeze-frame-menu-item.js +7 -18
- package/dist/components/Timeline/use-timeline-height.d.ts +2 -1
- package/dist/components/Timeline/use-timeline-height.js +3 -2
- package/dist/components/TimelineCombobox.d.ts +11 -0
- package/dist/components/TimelineCombobox.js +181 -0
- package/dist/components/TopPanel.js +6 -7
- package/dist/components/selected-outline-types.d.ts +1 -1
- package/dist/esm/{chunk-43m68z1k.js → chunk-7pgk8h5m.js} +7731 -7410
- package/dist/esm/internals.mjs +7731 -7410
- package/dist/esm/previewEntry.mjs +7547 -7226
- package/dist/esm/renderEntry.mjs +1 -1
- package/dist/helpers/hoverable.d.ts +11 -0
- package/dist/helpers/hoverable.js +70 -0
- package/dist/helpers/inject-css.js +3 -0
- package/dist/helpers/use-is-fullscreen.d.ts +1 -0
- package/dist/helpers/use-is-fullscreen.js +25 -0
- package/dist/helpers/use-menu-structure.js +3 -10
- package/dist/icons/canvas-zoom.d.ts +10 -0
- package/dist/icons/canvas-zoom.js +21 -0
- package/dist/icons/playback-rate.d.ts +5 -0
- package/dist/icons/playback-rate.js +31 -0
- package/dist/icons/search.d.ts +5 -0
- package/dist/icons/search.js +10 -0
- package/package.json +12 -12
|
@@ -121,7 +121,7 @@ export declare const getTimelineSequenceFromDragTargets: ({ draggedNodePathInfo,
|
|
|
121
121
|
readonly overrideIdsToNodePaths: OverrideIdToNodePaths;
|
|
122
122
|
readonly propStatuses: PropStatuses;
|
|
123
123
|
}) => TimelineSequenceFromDragTarget[] | null;
|
|
124
|
-
export declare const TimelineSequenceLeftEdgeDragHandle: React.
|
|
124
|
+
export declare const TimelineSequenceLeftEdgeDragHandle: React.NamedExoticComponent<{
|
|
125
125
|
readonly nodePathInfo: SequenceNodePathInfo;
|
|
126
126
|
readonly windowWidth: number;
|
|
127
127
|
readonly timelineDurationInFrames: number;
|
|
@@ -134,7 +134,7 @@ export declare const useTimelineSequenceFromDrag: ({ nodePathInfo, windowWidth,
|
|
|
134
134
|
dragging: boolean;
|
|
135
135
|
onPointerDown: (e: React.PointerEvent<HTMLDivElement>) => void;
|
|
136
136
|
};
|
|
137
|
-
export declare const TimelineSequenceRightEdgeDragHandle: React.
|
|
137
|
+
export declare const TimelineSequenceRightEdgeDragHandle: React.NamedExoticComponent<{
|
|
138
138
|
readonly nodePathInfo: SequenceNodePathInfo;
|
|
139
139
|
readonly windowWidth: number;
|
|
140
140
|
readonly timelineDurationInFrames: number;
|
|
@@ -1,9 +1,42 @@
|
|
|
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
36
|
exports.TimelineSequenceRightEdgeDragHandle = exports.useTimelineSequenceFromDrag = exports.TimelineSequenceLeftEdgeDragHandle = exports.getTimelineSequenceFromDragTargets = exports.getTimelineSequenceLeftEdgeDragTargets = exports.getTimelineSequenceDurationDragTargets = exports.getTimelineSequenceFromDragKeyframeMoves = exports.getTimelineSequenceFromDragChanges = exports.getTimelineSequenceFromDragDelta = exports.getTimelineSequenceFromDragValue = exports.getTimelineSequenceDurationDragChanges = exports.getTimelineSequenceLeftEdgeDragChanges = exports.getTimelineSequenceLeftEdgeDragValues = exports.getTimelineSequenceLeftEdgeDragDelta = exports.getTimelineSequenceDurationDragValue = exports.isTimelineSequenceLeftEdgeDraggable = exports.canResizeTimelineSequenceDuration = exports.isTimelineSequenceDurationDraggable = exports.isCascadingSequence = exports.isTransitionSeriesSequence = exports.timelineSequenceFromDragSnapThresholdPx = void 0;
|
|
4
37
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
38
|
const studio_shared_1 = require("@remotion/studio-shared");
|
|
6
|
-
const react_1 = require("react");
|
|
39
|
+
const react_1 = __importStar(require("react"));
|
|
7
40
|
const remotion_1 = require("remotion");
|
|
8
41
|
const no_react_1 = require("remotion/no-react");
|
|
9
42
|
const calculate_timeline_1 = require("../../helpers/calculate-timeline");
|
|
@@ -531,7 +564,7 @@ const clearFromDragOverrides = ({ clearDragOverrides, clearEffectDragOverrides,
|
|
|
531
564
|
}
|
|
532
565
|
}
|
|
533
566
|
};
|
|
534
|
-
const
|
|
567
|
+
const TimelineSequenceLeftEdgeDragHandleInner = ({ nodePathInfo, windowWidth, timelineDurationInFrames }) => {
|
|
535
568
|
const { setPropStatuses, setDragOverrides, clearDragOverrides } = (0, react_1.useContext)(remotion_1.Internals.VisualModeSettersContext);
|
|
536
569
|
const propStatusesRef = (0, react_1.useContext)(remotion_1.Internals.VisualModePropStatusesRefContext);
|
|
537
570
|
const sequencesRef = (0, react_1.useContext)(remotion_1.Internals.SequenceManagerRefContext);
|
|
@@ -721,7 +754,7 @@ const TimelineSequenceLeftEdgeDragHandle = ({ nodePathInfo, windowWidth, timelin
|
|
|
721
754
|
};
|
|
722
755
|
return (jsx_runtime_1.jsx("div", { role: "separator", "aria-orientation": "vertical", title: "Drag to trim start", style: style, onPointerDown: onPointerDown }));
|
|
723
756
|
};
|
|
724
|
-
exports.TimelineSequenceLeftEdgeDragHandle =
|
|
757
|
+
exports.TimelineSequenceLeftEdgeDragHandle = react_1.default.memo(TimelineSequenceLeftEdgeDragHandleInner);
|
|
725
758
|
const useTimelineSequenceFromDrag = ({ nodePathInfo, windowWidth, timelineDurationInFrames, }) => {
|
|
726
759
|
const { setPropStatuses, setDragOverrides, clearDragOverrides, setEffectDragOverrides, clearEffectDragOverrides, } = (0, react_1.useContext)(remotion_1.Internals.VisualModeSettersContext);
|
|
727
760
|
const propStatusesRef = (0, react_1.useContext)(remotion_1.Internals.VisualModePropStatusesRefContext);
|
|
@@ -944,7 +977,7 @@ const useTimelineSequenceFromDrag = ({ nodePathInfo, windowWidth, timelineDurati
|
|
|
944
977
|
};
|
|
945
978
|
};
|
|
946
979
|
exports.useTimelineSequenceFromDrag = useTimelineSequenceFromDrag;
|
|
947
|
-
const
|
|
980
|
+
const TimelineSequenceRightEdgeDragHandleInner = ({ nodePathInfo, windowWidth, timelineDurationInFrames }) => {
|
|
948
981
|
const { setPropStatuses, setDragOverrides, clearDragOverrides } = (0, react_1.useContext)(remotion_1.Internals.VisualModeSettersContext);
|
|
949
982
|
const propStatusesRef = (0, react_1.useContext)(remotion_1.Internals.VisualModePropStatusesRefContext);
|
|
950
983
|
const sequencesRef = (0, react_1.useContext)(remotion_1.Internals.SequenceManagerRefContext);
|
|
@@ -1128,4 +1161,4 @@ const TimelineSequenceRightEdgeDragHandle = ({ nodePathInfo, windowWidth, timeli
|
|
|
1128
1161
|
};
|
|
1129
1162
|
return (jsx_runtime_1.jsx("div", { role: "separator", "aria-orientation": "vertical", title: "Drag to change duration", style: style, onPointerDown: onPointerDown }));
|
|
1130
1163
|
};
|
|
1131
|
-
exports.TimelineSequenceRightEdgeDragHandle =
|
|
1164
|
+
exports.TimelineSequenceRightEdgeDragHandle = react_1.default.memo(TimelineSequenceRightEdgeDragHandleInner);
|
|
@@ -1,8 +1,41 @@
|
|
|
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
36
|
exports.TimelineTimeIndicators = exports.getTimelineTickScale = exports.getNiceSecondInterval = exports.TimelineTimePadding = exports.TimelineTimePlaceholders = exports.TIMELINE_TIME_INDICATOR_HEIGHT = 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 remotion_1 = require("remotion");
|
|
7
40
|
const colors_1 = require("../../helpers/colors");
|
|
8
41
|
const timeline_layout_1 = require("../../helpers/timeline-layout");
|
|
@@ -171,7 +204,7 @@ const TimelineTimeIndicators = () => {
|
|
|
171
204
|
return (jsx_runtime_1.jsx(TimelineTimeIndicatorsInner, { durationInFrames: video.durationInFrames, fps: video.fps, windowWidth: sliderTrack }));
|
|
172
205
|
};
|
|
173
206
|
exports.TimelineTimeIndicators = TimelineTimeIndicators;
|
|
174
|
-
const TimelineTimeIndicatorsInner = ({ windowWidth, durationInFrames, fps }) => {
|
|
207
|
+
const TimelineTimeIndicatorsInner = react_1.default.memo(({ windowWidth, durationInFrames, fps }) => {
|
|
175
208
|
const ref = (0, react_1.useRef)(null);
|
|
176
209
|
(0, react_1.useEffect)(() => {
|
|
177
210
|
const currentRef = ref.current;
|
|
@@ -271,4 +304,4 @@ const TimelineTimeIndicatorsInner = ({ windowWidth, durationInFrames, fps }) =>
|
|
|
271
304
|
return (jsx_runtime_1.jsx("div", { ref: ref, style: style, children: ticks.map((t) => {
|
|
272
305
|
return (jsx_runtime_1.jsx("div", { style: t.style, children: t.showTime ? (jsx_runtime_1.jsx("div", { style: tickLabel, children: (0, render_frame_1.renderFrame)(t.frame, fps) })) : null }, t.frame));
|
|
273
306
|
}) }));
|
|
274
|
-
};
|
|
307
|
+
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { LoopDisplay } from 'remotion';
|
|
3
|
-
export declare const TimelineVideoInfo: React.
|
|
3
|
+
export declare const TimelineVideoInfo: React.NamedExoticComponent<{
|
|
4
4
|
readonly src: string;
|
|
5
5
|
readonly visualizationWidth: number;
|
|
6
6
|
readonly naturalWidth: number;
|
|
@@ -1,9 +1,42 @@
|
|
|
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
36
|
exports.TimelineVideoInfo = void 0;
|
|
4
37
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
38
|
const timeline_utils_1 = require("@remotion/timeline-utils");
|
|
6
|
-
const react_1 = require("react");
|
|
39
|
+
const react_1 = __importStar(require("react"));
|
|
7
40
|
const remotion_1 = require("remotion");
|
|
8
41
|
const colors_1 = require("../../helpers/colors");
|
|
9
42
|
const timeline_layout_1 = require("../../helpers/timeline-layout");
|
|
@@ -26,7 +59,7 @@ const filmstripContainerStyle = {
|
|
|
26
59
|
fontFamily: 'Arial, Helvetica',
|
|
27
60
|
};
|
|
28
61
|
const MAX_FROZEN_FRAME_CACHE_DEVIATION = timeline_utils_1.WEBCODECS_TIMESCALE * 0.05;
|
|
29
|
-
const
|
|
62
|
+
const TimelineVideoInfoInner = ({ src, visualizationWidth, naturalWidth, startMediaFrom, mediaFrameAtSequenceZero, sequenceFrameOffset, durationInFrames, playbackRate, volume, doesVolumeChange, premountWidth, postmountWidth, loopDisplay, frozenMediaFrame, extendLastFrame, }) => {
|
|
30
63
|
const { fps } = (0, remotion_1.useVideoConfig)();
|
|
31
64
|
const ref = (0, react_1.useRef)(null);
|
|
32
65
|
const [error, setError] = (0, react_1.useState)(null);
|
|
@@ -338,4 +371,4 @@ const TimelineVideoInfo = ({ src, visualizationWidth, naturalWidth, startMediaFr
|
|
|
338
371
|
jsx_runtime_1.jsx("div", { ref: ref, style: filmstripStyle }), jsx_runtime_1.jsx("div", { style: audioStyle, children: jsx_runtime_1.jsx(AudioWaveform_1.AudioWaveform, { src: src, height: timeline_layout_1.TIMELINE_VIDEO_INFO_WAVEFORM_HEIGHT, visualizationWidth: audioWidth, startFrom: mediaStartFrame, durationInFrames: durationInFrames, volume: volume, doesVolumeChange: doesVolumeChange, playbackRate: playbackRate, loopDisplay: loopDisplay }) })
|
|
339
372
|
] }));
|
|
340
373
|
};
|
|
341
|
-
exports.TimelineVideoInfo =
|
|
374
|
+
exports.TimelineVideoInfo = react_1.default.memo(TimelineVideoInfoInner);
|
|
@@ -1,13 +1,45 @@
|
|
|
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
36
|
exports.TimelineZoomControls = 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 remotion_1 = require("remotion");
|
|
7
40
|
const colors_1 = require("../../helpers/colors");
|
|
8
41
|
const is_current_selected_still_1 = require("../../helpers/is-current-selected-still");
|
|
9
|
-
const
|
|
10
|
-
const plus_1 = require("../../icons/plus");
|
|
42
|
+
const canvas_zoom_1 = require("../../icons/canvas-zoom");
|
|
11
43
|
const timeline_zoom_1 = require("../../state/timeline-zoom");
|
|
12
44
|
const z_index_1 = require("../../state/z-index");
|
|
13
45
|
const ControlButton_1 = require("../ControlButton");
|
|
@@ -21,9 +53,6 @@ const container = {
|
|
|
21
53
|
const buttonStyle = {
|
|
22
54
|
fontSize: 24,
|
|
23
55
|
};
|
|
24
|
-
const iconStyle = {
|
|
25
|
-
width: 14,
|
|
26
|
-
};
|
|
27
56
|
const TimelineZoomSlider = ({ maxWidth }) => {
|
|
28
57
|
var _a;
|
|
29
58
|
const { canvasContent } = (0, react_1.useContext)(remotion_1.Internals.CompositionManager);
|
|
@@ -47,10 +76,9 @@ const TimelineZoomSlider = ({ maxWidth }) => {
|
|
|
47
76
|
const zoom = (_a = zoomMap[canvasContent.compositionId]) !== null && _a !== void 0 ? _a : timeline_zoom_1.TIMELINE_MIN_ZOOM;
|
|
48
77
|
return (jsx_runtime_1.jsx("input", { style: maxWidth === undefined ? undefined : { maxWidth }, title: `Timeline zoom (${zoom}x)`, alt: `Timeline zoom (${zoom}x)`, type: "range", min: timeline_zoom_1.TIMELINE_MIN_ZOOM, step: 0.1, value: zoom, max: timeline_zoom_1.TIMELINE_MAX_ZOOM, onChange: onChange, className: "__remotion-timeline-slider", tabIndex: tabIndex }));
|
|
49
78
|
};
|
|
50
|
-
const
|
|
51
|
-
var _a;
|
|
79
|
+
const TimelineZoomControlsInner = ({ sliderMaxWidth }) => {
|
|
52
80
|
const { canvasContent } = (0, react_1.useContext)(remotion_1.Internals.CompositionManager);
|
|
53
|
-
const { setZoom
|
|
81
|
+
const { setZoom } = (0, react_1.useContext)(timeline_zoom_1.TimelineZoomCtx);
|
|
54
82
|
const onMinusClicked = (0, react_1.useCallback)(() => {
|
|
55
83
|
if (canvasContent === null || canvasContent.type !== 'composition') {
|
|
56
84
|
return;
|
|
@@ -69,9 +97,8 @@ const TimelineZoomControls = ({ sliderMaxWidth }) => {
|
|
|
69
97
|
canvasContent.type !== 'composition') {
|
|
70
98
|
return null;
|
|
71
99
|
}
|
|
72
|
-
const zoom = (_a = zoomMap[canvasContent.compositionId]) !== null && _a !== void 0 ? _a : timeline_zoom_1.TIMELINE_MIN_ZOOM;
|
|
73
100
|
return (jsx_runtime_1.jsxs("div", { style: container, children: [
|
|
74
|
-
jsx_runtime_1.jsx(ControlButton_1.ControlButton, { onClick: onMinusClicked, style: buttonStyle, title: "Zoom out timeline", role: 'ControlButton', type: "button",
|
|
101
|
+
jsx_runtime_1.jsx(ControlButton_1.ControlButton, { onClick: onMinusClicked, style: buttonStyle, title: "Zoom out timeline", role: 'ControlButton', type: "button", children: (color) => jsx_runtime_1.jsx(canvas_zoom_1.CanvasZoomOutIcon, { color: color }) }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 0.5 }), jsx_runtime_1.jsx(TimelineZoomSlider, { maxWidth: sliderMaxWidth }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 0.5 }), jsx_runtime_1.jsx(ControlButton_1.ControlButton, { onClick: onPlusClicked, style: buttonStyle, title: "Zoom in timeline", role: 'button', type: "button", children: (color) => jsx_runtime_1.jsx(canvas_zoom_1.CanvasZoomIcon, { color: color }) })
|
|
75
102
|
] }));
|
|
76
103
|
};
|
|
77
|
-
exports.TimelineZoomControls =
|
|
104
|
+
exports.TimelineZoomControls = react_1.default.memo(TimelineZoomControlsInner);
|
|
@@ -11,7 +11,7 @@ export declare const calculateSequenceFreezeFrame: ({ sequence, sequenceFrameOff
|
|
|
11
11
|
readonly sequenceFrameOffset: number;
|
|
12
12
|
readonly timelinePosition: number;
|
|
13
13
|
}) => number;
|
|
14
|
-
export declare const
|
|
14
|
+
export declare const getSequenceFreezeFrameMenuItem: ({ clientId, nodePath, propStatusesForOverride, sequence, sequenceFrameOffset, setPropStatuses, timelinePosition, validatedSource, }: {
|
|
15
15
|
readonly clientId: string | null;
|
|
16
16
|
readonly nodePath: SequencePropsSubscriptionKey | null;
|
|
17
17
|
readonly propStatusesForOverride: Record<string, CanUpdateSequencePropStatus> | undefined;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
const react_1 = require("react");
|
|
3
|
+
exports.getSequenceFreezeFrameMenuItem = exports.calculateSequenceFreezeFrame = exports.isSequenceVisibleAtTimelinePosition = exports.shouldShowFreezeFrameMenuItem = void 0;
|
|
5
4
|
const save_sequence_prop_1 = require("./save-sequence-prop");
|
|
6
5
|
const shouldShowFreezeFrameMenuItem = (sequence) => {
|
|
7
6
|
return sequence.type !== 'audio';
|
|
@@ -21,7 +20,7 @@ const calculateSequenceFreezeFrame = ({ sequence, sequenceFrameOffset, timelineP
|
|
|
21
20
|
return Math.min(Math.max(minFrame, rawFreezeFrame), maxFrame);
|
|
22
21
|
};
|
|
23
22
|
exports.calculateSequenceFreezeFrame = calculateSequenceFreezeFrame;
|
|
24
|
-
const
|
|
23
|
+
const getSequenceFreezeFrameMenuItem = ({ clientId, nodePath, propStatusesForOverride, sequence, sequenceFrameOffset, setPropStatuses, timelinePosition, validatedSource, }) => {
|
|
25
24
|
const freezeStatus = propStatusesForOverride === null || propStatusesForOverride === void 0 ? void 0 : propStatusesForOverride.freeze;
|
|
26
25
|
const isFrozen = (freezeStatus === null || freezeStatus === void 0 ? void 0 : freezeStatus.status) === 'static' &&
|
|
27
26
|
typeof freezeStatus.codeValue === 'number';
|
|
@@ -33,7 +32,7 @@ const useSequenceFreezeFrameMenuItem = ({ clientId, nodePath, propStatusesForOve
|
|
|
33
32
|
freezeStatus !== undefined &&
|
|
34
33
|
freezeStatus !== null &&
|
|
35
34
|
freezeStatus.status === 'static';
|
|
36
|
-
const onToggleFreezeFrame = (
|
|
35
|
+
const onToggleFreezeFrame = () => {
|
|
37
36
|
if (!canToggleFreeze ||
|
|
38
37
|
!sequence.controls ||
|
|
39
38
|
nodePath === null ||
|
|
@@ -65,18 +64,8 @@ const useSequenceFreezeFrameMenuItem = ({ clientId, nodePath, propStatusesForOve
|
|
|
65
64
|
undoLabel: remove ? 'Unfreeze sequence' : 'Freeze sequence',
|
|
66
65
|
redoLabel: remove ? 'Freeze sequence again' : 'Unfreeze sequence again',
|
|
67
66
|
});
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
clientId,
|
|
71
|
-
isFrozen,
|
|
72
|
-
nodePath,
|
|
73
|
-
sequence,
|
|
74
|
-
sequenceFrameOffset,
|
|
75
|
-
setPropStatuses,
|
|
76
|
-
timelinePosition,
|
|
77
|
-
validatedSource,
|
|
78
|
-
]);
|
|
79
|
-
return (0, react_1.useMemo)(() => (0, exports.shouldShowFreezeFrameMenuItem)(sequence)
|
|
67
|
+
};
|
|
68
|
+
return (0, exports.shouldShowFreezeFrameMenuItem)(sequence)
|
|
80
69
|
? {
|
|
81
70
|
type: 'item',
|
|
82
71
|
id: 'toggle-freeze-frame',
|
|
@@ -89,6 +78,6 @@ const useSequenceFreezeFrameMenuItem = ({ clientId, nodePath, propStatusesForOve
|
|
|
89
78
|
subMenu: null,
|
|
90
79
|
value: 'toggle-freeze-frame',
|
|
91
80
|
}
|
|
92
|
-
: null
|
|
81
|
+
: null;
|
|
93
82
|
};
|
|
94
|
-
exports.
|
|
83
|
+
exports.getSequenceFreezeFrameMenuItem = getSequenceFreezeFrameMenuItem;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { TimelineTrackData } from '../../helpers/get-timeline-sequence-sort-key';
|
|
2
|
-
export declare const useTimelineHeight: ({ shown, hasBeenCut, }: {
|
|
2
|
+
export declare const useTimelineHeight: ({ shown, hasBeenCut, isStill, }: {
|
|
3
3
|
shown: TimelineTrackData[];
|
|
4
4
|
hasBeenCut: boolean;
|
|
5
|
+
isStill: boolean;
|
|
5
6
|
}) => number;
|
|
@@ -11,7 +11,7 @@ const MaxTimelineTracks_1 = require("./MaxTimelineTracks");
|
|
|
11
11
|
const timeline_expanded_filter_1 = require("./timeline-expanded-filter");
|
|
12
12
|
const TimelineSelection_1 = require("./TimelineSelection");
|
|
13
13
|
const TimelineTimeIndicators_1 = require("./TimelineTimeIndicators");
|
|
14
|
-
const useTimelineHeight = ({ shown, hasBeenCut, }) => {
|
|
14
|
+
const useTimelineHeight = ({ shown, hasBeenCut, isStill, }) => {
|
|
15
15
|
const { getIsExpanded } = (0, react_1.useContext)(ExpandedTracksProvider_1.ExpandedTracksGetterContext);
|
|
16
16
|
const { previewServerState } = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx);
|
|
17
17
|
const { propStatuses } = (0, react_1.useContext)(remotion_1.Internals.VisualModePropStatusesContext);
|
|
@@ -70,10 +70,11 @@ const useTimelineHeight = ({ shown, hasBeenCut, }) => {
|
|
|
70
70
|
return (tracksHeight +
|
|
71
71
|
timeline_layout_1.TIMELINE_ITEM_BORDER_BOTTOM +
|
|
72
72
|
(hasBeenCut ? MaxTimelineTracks_1.MAX_TIMELINE_TRACKS_NOTICE_HEIGHT : 0) +
|
|
73
|
-
TimelineTimeIndicators_1.TIMELINE_TIME_INDICATOR_HEIGHT);
|
|
73
|
+
(isStill ? 0 : TimelineTimeIndicators_1.TIMELINE_TIME_INDICATOR_HEIGHT));
|
|
74
74
|
}, [
|
|
75
75
|
shown,
|
|
76
76
|
hasBeenCut,
|
|
77
|
+
isStill,
|
|
77
78
|
previewServerConnected,
|
|
78
79
|
getIsExpanded,
|
|
79
80
|
propStatuses,
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { RenderInlineAction } from './InlineAction';
|
|
3
|
+
import type { ComboboxValue } from './NewComposition/ComboBox';
|
|
4
|
+
export declare const TimelineCombobox: React.FC<{
|
|
5
|
+
readonly values: ComboboxValue[];
|
|
6
|
+
readonly selectedId: string | number;
|
|
7
|
+
readonly title: string;
|
|
8
|
+
readonly labelWidth?: number;
|
|
9
|
+
readonly renderLeftItem?: RenderInlineAction;
|
|
10
|
+
readonly unhoveredIconColor?: string;
|
|
11
|
+
}>;
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.TimelineCombobox = void 0;
|
|
7
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
+
const player_1 = require("@remotion/player");
|
|
9
|
+
const react_1 = require("react");
|
|
10
|
+
const react_dom_1 = __importDefault(require("react-dom"));
|
|
11
|
+
const colors_1 = require("../helpers/colors");
|
|
12
|
+
const mobile_layout_1 = require("../helpers/mobile-layout");
|
|
13
|
+
const noop_1 = require("../helpers/noop");
|
|
14
|
+
const caret_1 = require("../icons/caret");
|
|
15
|
+
const z_index_1 = require("../state/z-index");
|
|
16
|
+
const layout_1 = require("./layout");
|
|
17
|
+
const is_menu_item_1 = require("./Menu/is-menu-item");
|
|
18
|
+
const portals_1 = require("./Menu/portals");
|
|
19
|
+
const styles_1 = require("./Menu/styles");
|
|
20
|
+
const MenuContent_1 = require("./NewComposition/MenuContent");
|
|
21
|
+
const container = {
|
|
22
|
+
boxSizing: 'border-box',
|
|
23
|
+
border: 'none',
|
|
24
|
+
borderRadius: 3,
|
|
25
|
+
height: 24,
|
|
26
|
+
padding: '0 4px',
|
|
27
|
+
fontFamily: 'inherit',
|
|
28
|
+
maxWidth: '100%',
|
|
29
|
+
};
|
|
30
|
+
const label = {
|
|
31
|
+
flex: 'none',
|
|
32
|
+
overflow: 'hidden',
|
|
33
|
+
textOverflow: 'ellipsis',
|
|
34
|
+
fontFamily: 'inherit',
|
|
35
|
+
fontSize: 12,
|
|
36
|
+
lineHeight: '16px',
|
|
37
|
+
color: colors_1.WHITE_ALPHA_80,
|
|
38
|
+
minWidth: 0,
|
|
39
|
+
textAlign: 'left',
|
|
40
|
+
whiteSpace: 'nowrap',
|
|
41
|
+
};
|
|
42
|
+
const TimelineCombobox = ({ values, selectedId, title, labelWidth = 32, renderLeftItem, unhoveredIconColor = colors_1.LIGHT_TEXT, }) => {
|
|
43
|
+
const [hovered, setIsHovered] = (0, react_1.useState)(false);
|
|
44
|
+
const [opened, setOpened] = (0, react_1.useState)(false);
|
|
45
|
+
const ref = (0, react_1.useRef)(null);
|
|
46
|
+
const { tabIndex, currentZIndex } = (0, z_index_1.useZIndex)();
|
|
47
|
+
const size = player_1.PlayerInternals.useElementSize(ref, {
|
|
48
|
+
triggerOnWindowResize: true,
|
|
49
|
+
shouldApplyCssTransforms: true,
|
|
50
|
+
});
|
|
51
|
+
const refresh = size === null || size === void 0 ? void 0 : size.refresh;
|
|
52
|
+
const onHide = (0, react_1.useCallback)(() => {
|
|
53
|
+
setOpened(false);
|
|
54
|
+
}, []);
|
|
55
|
+
const onOverlayPointerDown = (0, react_1.useCallback)((e) => {
|
|
56
|
+
e.stopPropagation();
|
|
57
|
+
}, []);
|
|
58
|
+
(0, react_1.useEffect)(() => {
|
|
59
|
+
const { current } = ref;
|
|
60
|
+
if (!current) {
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
const onMouseEnter = () => setIsHovered(true);
|
|
64
|
+
const onMouseLeave = () => setIsHovered(false);
|
|
65
|
+
const onPointerDown = (e) => {
|
|
66
|
+
e.stopPropagation();
|
|
67
|
+
return setOpened((isOpened) => {
|
|
68
|
+
if (!isOpened) {
|
|
69
|
+
refresh === null || refresh === void 0 ? void 0 : refresh();
|
|
70
|
+
}
|
|
71
|
+
return !isOpened;
|
|
72
|
+
});
|
|
73
|
+
};
|
|
74
|
+
const onClick = (e) => {
|
|
75
|
+
e.stopPropagation();
|
|
76
|
+
const isKeyboardInitiated = e.detail === 0;
|
|
77
|
+
if (!isKeyboardInitiated) {
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
return setOpened((isOpened) => {
|
|
81
|
+
if (!isOpened) {
|
|
82
|
+
refresh === null || refresh === void 0 ? void 0 : refresh();
|
|
83
|
+
window.addEventListener('pointerup', (evt) => {
|
|
84
|
+
if (!(0, is_menu_item_1.isMenuItem)(evt.target)) {
|
|
85
|
+
setOpened(false);
|
|
86
|
+
}
|
|
87
|
+
}, { once: true });
|
|
88
|
+
}
|
|
89
|
+
return !isOpened;
|
|
90
|
+
});
|
|
91
|
+
};
|
|
92
|
+
current.addEventListener('mouseenter', onMouseEnter);
|
|
93
|
+
current.addEventListener('mouseleave', onMouseLeave);
|
|
94
|
+
current.addEventListener('pointerdown', onPointerDown);
|
|
95
|
+
current.addEventListener('click', onClick);
|
|
96
|
+
return () => {
|
|
97
|
+
current.removeEventListener('mouseenter', onMouseEnter);
|
|
98
|
+
current.removeEventListener('mouseleave', onMouseLeave);
|
|
99
|
+
current.removeEventListener('pointerdown', onPointerDown);
|
|
100
|
+
current.removeEventListener('click', onClick);
|
|
101
|
+
};
|
|
102
|
+
}, [refresh]);
|
|
103
|
+
const spaceToBottom = (0, react_1.useMemo)(() => {
|
|
104
|
+
const margin = 10;
|
|
105
|
+
if (size && opened) {
|
|
106
|
+
return size.windowSize.height - (size.top + size.height) - margin;
|
|
107
|
+
}
|
|
108
|
+
return 0;
|
|
109
|
+
}, [opened, size]);
|
|
110
|
+
const spaceToTop = (0, react_1.useMemo)(() => {
|
|
111
|
+
const margin = 10;
|
|
112
|
+
if (size && opened) {
|
|
113
|
+
return size.top - margin;
|
|
114
|
+
}
|
|
115
|
+
return 0;
|
|
116
|
+
}, [opened, size]);
|
|
117
|
+
const derivedMaxHeight = (0, react_1.useMemo)(() => {
|
|
118
|
+
return spaceToTop > spaceToBottom ? spaceToTop : spaceToBottom;
|
|
119
|
+
}, [spaceToBottom, spaceToTop]);
|
|
120
|
+
const isMobileLayout = (0, mobile_layout_1.useMobileLayout)();
|
|
121
|
+
const portalStyle = (0, react_1.useMemo)(() => {
|
|
122
|
+
if (!opened || !size) {
|
|
123
|
+
return null;
|
|
124
|
+
}
|
|
125
|
+
const spaceToRight = size.windowSize.width - size.left;
|
|
126
|
+
const spaceToLeft = size.left + size.width;
|
|
127
|
+
const minSpaceRequired = isMobileLayout
|
|
128
|
+
? styles_1.MAX_MOBILE_MENU_WIDTH
|
|
129
|
+
: styles_1.MAX_MENU_WIDTH;
|
|
130
|
+
const verticalLayout = spaceToTop > spaceToBottom ? 'bottom' : 'top';
|
|
131
|
+
const canOpenOnLeft = spaceToLeft >= minSpaceRequired;
|
|
132
|
+
const canOpenOnRight = spaceToRight >= minSpaceRequired;
|
|
133
|
+
const horizontalLayout = canOpenOnRight ? 'left' : 'right';
|
|
134
|
+
return {
|
|
135
|
+
...(verticalLayout === 'top'
|
|
136
|
+
? {
|
|
137
|
+
...styles_1.menuContainerTowardsBottom,
|
|
138
|
+
top: size.top + size.height,
|
|
139
|
+
}
|
|
140
|
+
: {
|
|
141
|
+
...styles_1.menuContainerTowardsTop,
|
|
142
|
+
bottom: size.windowSize.height - size.top,
|
|
143
|
+
}),
|
|
144
|
+
...(horizontalLayout === 'left'
|
|
145
|
+
? { left: size.left }
|
|
146
|
+
: canOpenOnLeft
|
|
147
|
+
? { right: size.windowSize.width - size.left - size.width }
|
|
148
|
+
: { left: 0 }),
|
|
149
|
+
};
|
|
150
|
+
}, [isMobileLayout, opened, size, spaceToBottom, spaceToTop]);
|
|
151
|
+
const selected = values.find((value) => value.id === selectedId);
|
|
152
|
+
const style = (0, react_1.useMemo)(() => {
|
|
153
|
+
return {
|
|
154
|
+
...container,
|
|
155
|
+
userSelect: 'none',
|
|
156
|
+
WebkitUserSelect: 'none',
|
|
157
|
+
display: 'inline-flex',
|
|
158
|
+
flexDirection: 'row',
|
|
159
|
+
alignItems: 'center',
|
|
160
|
+
backgroundColor: (0, colors_1.getBackgroundFromHoverState)({
|
|
161
|
+
hovered,
|
|
162
|
+
selected: opened,
|
|
163
|
+
}),
|
|
164
|
+
};
|
|
165
|
+
}, [hovered, opened]);
|
|
166
|
+
const foregroundColor = hovered || opened ? colors_1.WHITE : colors_1.WHITE_ALPHA_80;
|
|
167
|
+
const labelStyle = (0, react_1.useMemo)(() => {
|
|
168
|
+
return {
|
|
169
|
+
...label,
|
|
170
|
+
width: labelWidth,
|
|
171
|
+
color: foregroundColor,
|
|
172
|
+
};
|
|
173
|
+
}, [foregroundColor, labelWidth]);
|
|
174
|
+
return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
175
|
+
jsx_runtime_1.jsxs("button", { ref: ref, title: title, "aria-label": title, tabIndex: tabIndex, type: "button", style: style, className: is_menu_item_1.MENU_INITIATOR_CLASSNAME, children: [renderLeftItem ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [renderLeftItem(foregroundColor), jsx_runtime_1.jsx(layout_1.Spacing, { x: 0.5 })
|
|
176
|
+
] })) : null, selected ? (jsx_runtime_1.jsx("div", { title: typeof selected.label === 'string' ? selected.label : undefined, style: labelStyle, children: selected.label })) : null, jsx_runtime_1.jsx(layout_1.Spacing, { x: 0.5 }), jsx_runtime_1.jsx(caret_1.CaretDown, { color: hovered || opened ? colors_1.WHITE : unhoveredIconColor })
|
|
177
|
+
] }), portalStyle
|
|
178
|
+
? react_dom_1.default.createPortal(jsx_runtime_1.jsx("div", { style: styles_1.fullScreenOverlay, onPointerDown: onOverlayPointerDown, children: jsx_runtime_1.jsx("div", { style: styles_1.outerPortal, className: "css-reset", children: jsx_runtime_1.jsx(z_index_1.HigherZIndex, { onOutsideClick: onHide, onEscape: onHide, children: jsx_runtime_1.jsx("div", { style: portalStyle, children: jsx_runtime_1.jsx(MenuContent_1.MenuContent, { onNextMenu: noop_1.noop, onPreviousMenu: noop_1.noop, values: values, onHide: onHide, leaveLeftSpace: true, preselectIndex: values.findIndex((value) => selected && value.id === selected.id), topItemCanBeUnselected: false, fixedHeight: derivedMaxHeight }) }) }) }) }), (0, portals_1.getPortal)(currentZIndex))
|
|
179
|
+
: null] }));
|
|
180
|
+
};
|
|
181
|
+
exports.TimelineCombobox = TimelineCombobox;
|