@remotion/cli 4.0.63 → 4.0.65
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/better-opn/index.d.ts +2 -0
- package/dist/config/index.d.ts +1 -1
- package/dist/editor/components/AudioWaveform.js +2 -1
- package/dist/editor/components/Canvas.js +10 -1
- package/dist/editor/components/CompositionSelectorItem.js +42 -1
- package/dist/editor/components/ContextMenu.d.ts +6 -0
- package/dist/editor/components/ContextMenu.js +91 -0
- package/dist/editor/components/CurrentComposition.d.ts +1 -0
- package/dist/editor/components/EditorContexts.js +3 -1
- package/dist/editor/components/EditorGuides/Guide.d.ts +13 -0
- package/dist/editor/components/EditorGuides/Guide.js +91 -0
- package/dist/editor/components/EditorGuides/index.d.ts +10 -0
- package/dist/editor/components/EditorGuides/index.js +32 -0
- package/dist/editor/components/EditorRuler/Ruler.d.ts +1 -0
- package/dist/editor/components/EditorRuler/Ruler.js +81 -16
- package/dist/editor/components/EditorRuler/index.js +117 -48
- package/dist/editor/components/EditorRuler/use-is-ruler-visible.d.ts +1 -0
- package/dist/editor/components/EditorRuler/use-is-ruler-visible.js +12 -0
- package/dist/editor/components/Menu/MenuItem.js +6 -3
- package/dist/editor/components/Menu/MenuSubItem.d.ts +2 -1
- package/dist/editor/components/Menu/MenuSubItem.js +2 -2
- package/dist/editor/components/NewComposition/ComboBox.d.ts +1 -1
- package/dist/editor/components/NewComposition/InputDragger.js +4 -1
- package/dist/editor/components/NewComposition/MenuContent.js +3 -3
- package/dist/editor/components/NewComposition/NewCompCode.d.ts +1 -0
- package/dist/editor/components/NewComposition/RemInput.d.ts +1 -1
- package/dist/editor/components/NewComposition/RemInputTypeColor.d.ts +1 -1
- package/dist/editor/components/NewComposition/RemTextarea.d.ts +1 -1
- package/dist/editor/components/ShowGuidesProvider.js +20 -1
- package/dist/editor/components/Splitter/SplitterHandle.js +3 -0
- package/dist/editor/components/Timeline/TimelineDragHandler.js +85 -5
- package/dist/editor/components/Timeline/TimelineInOutPointerHandle.js +2 -1
- package/dist/editor/components/TopPanel.js +10 -5
- package/dist/editor/components/UpdateCheck.d.ts +1 -0
- package/dist/editor/helpers/colors.d.ts +6 -1
- package/dist/editor/helpers/colors.js +7 -2
- package/dist/editor/helpers/convert-env-variables.d.ts +2 -8
- package/dist/editor/helpers/editor-ruler.d.ts +20 -1
- package/dist/editor/helpers/editor-ruler.js +120 -20
- package/dist/editor/helpers/presets-labels.d.ts +1 -1
- package/dist/editor/helpers/render-modal-sections.d.ts +1 -0
- package/dist/editor/helpers/use-menu-structure.js +41 -1
- package/dist/editor/helpers/use-studio-canvas-dimensions.d.ts +16 -0
- package/dist/editor/helpers/use-studio-canvas-dimensions.js +59 -0
- package/dist/editor/icons/Checkmark.d.ts +1 -0
- package/dist/editor/state/editor-guides.d.ts +19 -3
- package/dist/editor/state/editor-guides.js +19 -2
- package/dist/get-cli-options.d.ts +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/preview-server/public-folder.js +1 -1
- package/dist/preview-server/routes.d.ts +1 -0
- package/package.json +8 -8
|
@@ -5,69 +5,30 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.EditorRulers = void 0;
|
|
7
7
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
-
const player_1 = require("@remotion/player");
|
|
9
8
|
const react_1 = require("react");
|
|
9
|
+
const colors_1 = require("../../helpers/colors");
|
|
10
10
|
const editor_ruler_1 = require("../../helpers/editor-ruler");
|
|
11
|
+
const use_studio_canvas_dimensions_1 = require("../../helpers/use-studio-canvas-dimensions");
|
|
12
|
+
const editor_guides_1 = require("../../state/editor-guides");
|
|
11
13
|
const editor_rulers_1 = require("../../state/editor-rulers");
|
|
12
|
-
const preview_size_1 = require("../../state/preview-size");
|
|
13
14
|
const Ruler_1 = __importDefault(require("./Ruler"));
|
|
14
15
|
const originBlockStyles = {
|
|
15
16
|
position: 'absolute',
|
|
16
17
|
top: 0,
|
|
17
18
|
left: 0,
|
|
18
|
-
borderBottom: '1px solid
|
|
19
|
-
borderRight: '1px solid
|
|
19
|
+
borderBottom: '1px solid ' + colors_1.RULER_COLOR,
|
|
20
|
+
borderRight: '1px solid ' + colors_1.RULER_COLOR,
|
|
20
21
|
width: `${editor_rulers_1.RULER_WIDTH}px`,
|
|
21
22
|
height: `${editor_rulers_1.RULER_WIDTH}px`,
|
|
22
|
-
background:
|
|
23
|
+
background: colors_1.BACKGROUND,
|
|
23
24
|
};
|
|
24
25
|
const EditorRulers = ({ contentDimensions, canvasSize, assetMetadata, containerRef }) => {
|
|
25
|
-
const {
|
|
26
|
-
const { centerX, centerY, scale } = (0, react_1.useMemo)(() => {
|
|
27
|
-
if (contentDimensions === 'none' ||
|
|
28
|
-
contentDimensions === null ||
|
|
29
|
-
(assetMetadata && assetMetadata.type === 'not-found') ||
|
|
30
|
-
!canvasSize) {
|
|
31
|
-
return {
|
|
32
|
-
centerX: previewSize.translation.x,
|
|
33
|
-
centerY: previewSize.translation.y,
|
|
34
|
-
scale: 1,
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
return player_1.PlayerInternals.calculateCanvasTransformation({
|
|
38
|
-
canvasSize,
|
|
39
|
-
compositionHeight: contentDimensions.height,
|
|
40
|
-
compositionWidth: contentDimensions.width,
|
|
41
|
-
previewSize: previewSize.size,
|
|
42
|
-
});
|
|
43
|
-
}, [
|
|
26
|
+
const { scale, canvasDimensions } = (0, use_studio_canvas_dimensions_1.useStudioCanvasDimensions)({
|
|
44
27
|
canvasSize,
|
|
45
28
|
contentDimensions,
|
|
46
|
-
previewSize.size,
|
|
47
|
-
previewSize.translation.y,
|
|
48
|
-
previewSize.translation.x,
|
|
49
29
|
assetMetadata,
|
|
50
|
-
|
|
51
|
-
const
|
|
52
|
-
return {
|
|
53
|
-
left: centerX - previewSize.translation.x,
|
|
54
|
-
top: centerY - previewSize.translation.y,
|
|
55
|
-
width: contentDimensions === 'none' || !contentDimensions
|
|
56
|
-
? (canvasSize === null || canvasSize === void 0 ? void 0 : canvasSize.width) || 0
|
|
57
|
-
: contentDimensions.width * scale,
|
|
58
|
-
height: contentDimensions === 'none' || !contentDimensions
|
|
59
|
-
? (canvasSize === null || canvasSize === void 0 ? void 0 : canvasSize.height) || 0
|
|
60
|
-
: contentDimensions.height * scale,
|
|
61
|
-
};
|
|
62
|
-
}, [
|
|
63
|
-
scale,
|
|
64
|
-
centerX,
|
|
65
|
-
previewSize.translation.x,
|
|
66
|
-
previewSize.translation.y,
|
|
67
|
-
centerY,
|
|
68
|
-
canvasSize,
|
|
69
|
-
contentDimensions,
|
|
70
|
-
]);
|
|
30
|
+
});
|
|
31
|
+
const { shouldCreateGuideRef, shouldDeleteGuideRef, setGuidesList, selectedGuideId, setSelectedGuideId, } = (0, react_1.useContext)(editor_guides_1.EditorShowGuidesContext);
|
|
71
32
|
const rulerMarkingGaps = (0, react_1.useMemo)(() => {
|
|
72
33
|
const minimumGap = editor_rulers_1.MINIMUM_RULER_MARKING_GAP_PX;
|
|
73
34
|
const predefinedGap = editor_rulers_1.PREDEFINED_RULER_SCALE_GAPS.find((gap) => gap * scale > minimumGap);
|
|
@@ -93,6 +54,114 @@ const EditorRulers = ({ contentDimensions, canvasSize, assetMetadata, containerR
|
|
|
93
54
|
rulerMarkingGaps,
|
|
94
55
|
scale,
|
|
95
56
|
}), [verticalRulerScaleRange, rulerMarkingGaps, scale]);
|
|
57
|
+
const requestAnimationFrameRef = (0, react_1.useRef)(null);
|
|
58
|
+
const onMouseMove = (0, react_1.useCallback)((e) => {
|
|
59
|
+
if (requestAnimationFrameRef.current) {
|
|
60
|
+
cancelAnimationFrame(requestAnimationFrameRef.current);
|
|
61
|
+
}
|
|
62
|
+
requestAnimationFrameRef.current = requestAnimationFrame(() => {
|
|
63
|
+
var _a;
|
|
64
|
+
const { clientX: mouseX, clientY: mouseY } = e;
|
|
65
|
+
const { left: containerLeft = 0, top: containerTop = 0, right: containerRight = 0, bottom: containerBottom = 0, } = ((_a = containerRef.current) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect()) || {};
|
|
66
|
+
if (mouseX < containerLeft ||
|
|
67
|
+
mouseX > containerRight ||
|
|
68
|
+
mouseY < containerTop ||
|
|
69
|
+
mouseY > containerBottom) {
|
|
70
|
+
if (!shouldDeleteGuideRef.current) {
|
|
71
|
+
shouldDeleteGuideRef.current = true;
|
|
72
|
+
}
|
|
73
|
+
if (document.body.style.cursor !== 'no-drop') {
|
|
74
|
+
document.body.style.cursor = 'no-drop';
|
|
75
|
+
}
|
|
76
|
+
setGuidesList((prevState) => {
|
|
77
|
+
const newGuides = prevState.map((guide) => {
|
|
78
|
+
if (guide.id !== selectedGuideId) {
|
|
79
|
+
return guide;
|
|
80
|
+
}
|
|
81
|
+
return {
|
|
82
|
+
...guide,
|
|
83
|
+
show: false,
|
|
84
|
+
};
|
|
85
|
+
});
|
|
86
|
+
(0, editor_guides_1.persistGuidesList)(newGuides);
|
|
87
|
+
return newGuides;
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
else {
|
|
91
|
+
if (shouldDeleteGuideRef.current) {
|
|
92
|
+
shouldDeleteGuideRef.current = false;
|
|
93
|
+
}
|
|
94
|
+
setGuidesList((prevState) => {
|
|
95
|
+
// Intentionally no persist, only persist on mouse up
|
|
96
|
+
return prevState.map((guide) => {
|
|
97
|
+
if (guide.id !== selectedGuideId) {
|
|
98
|
+
return guide;
|
|
99
|
+
}
|
|
100
|
+
const position = guide.orientation === 'vertical'
|
|
101
|
+
? (mouseX - containerLeft) / scale -
|
|
102
|
+
canvasDimensions.left / scale
|
|
103
|
+
: (mouseY - containerTop) / scale -
|
|
104
|
+
canvasDimensions.top / scale;
|
|
105
|
+
const desiredCursor = guide.orientation === 'vertical' ? 'ew-resize' : 'ns-resize';
|
|
106
|
+
if (document.body.style.cursor !== desiredCursor) {
|
|
107
|
+
document.body.style.cursor = desiredCursor;
|
|
108
|
+
}
|
|
109
|
+
return {
|
|
110
|
+
...guide,
|
|
111
|
+
position: Math.floor(position / 1.0),
|
|
112
|
+
show: true,
|
|
113
|
+
};
|
|
114
|
+
});
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
});
|
|
118
|
+
}, [
|
|
119
|
+
containerRef,
|
|
120
|
+
shouldDeleteGuideRef,
|
|
121
|
+
selectedGuideId,
|
|
122
|
+
scale,
|
|
123
|
+
setGuidesList,
|
|
124
|
+
canvasDimensions.left,
|
|
125
|
+
canvasDimensions.top,
|
|
126
|
+
]);
|
|
127
|
+
const onMouseUp = (0, react_1.useCallback)(() => {
|
|
128
|
+
setGuidesList((prevState) => {
|
|
129
|
+
const newGuides = prevState.filter((selected) => {
|
|
130
|
+
if (!shouldDeleteGuideRef.current) {
|
|
131
|
+
return true;
|
|
132
|
+
}
|
|
133
|
+
return selected.id !== selectedGuideId;
|
|
134
|
+
});
|
|
135
|
+
(0, editor_guides_1.persistGuidesList)(newGuides);
|
|
136
|
+
return newGuides;
|
|
137
|
+
});
|
|
138
|
+
shouldDeleteGuideRef.current = false;
|
|
139
|
+
document.body.style.cursor = 'auto';
|
|
140
|
+
shouldCreateGuideRef.current = false;
|
|
141
|
+
setSelectedGuideId(() => null);
|
|
142
|
+
document.removeEventListener('pointerup', onMouseUp);
|
|
143
|
+
document.removeEventListener('pointermove', onMouseMove);
|
|
144
|
+
}, [
|
|
145
|
+
selectedGuideId,
|
|
146
|
+
shouldCreateGuideRef,
|
|
147
|
+
shouldDeleteGuideRef,
|
|
148
|
+
setSelectedGuideId,
|
|
149
|
+
setGuidesList,
|
|
150
|
+
onMouseMove,
|
|
151
|
+
]);
|
|
152
|
+
(0, react_1.useEffect)(() => {
|
|
153
|
+
if (selectedGuideId !== null) {
|
|
154
|
+
document.addEventListener('pointermove', onMouseMove);
|
|
155
|
+
document.addEventListener('pointerup', onMouseUp);
|
|
156
|
+
}
|
|
157
|
+
return () => {
|
|
158
|
+
document.removeEventListener('pointermove', onMouseMove);
|
|
159
|
+
document.removeEventListener('pointerup', onMouseUp);
|
|
160
|
+
if (requestAnimationFrameRef.current) {
|
|
161
|
+
cancelAnimationFrame(requestAnimationFrameRef.current);
|
|
162
|
+
}
|
|
163
|
+
};
|
|
164
|
+
}, [selectedGuideId, onMouseMove, onMouseUp]);
|
|
96
165
|
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("div", { style: originBlockStyles }), (0, jsx_runtime_1.jsx)(Ruler_1.default, { orientation: "horizontal", scale: scale, points: horizontalRulerPoints, startMarking: horizontalRulerStartMarking, containerRef: containerRef, markingGaps: rulerMarkingGaps, originOffset: canvasDimensions.left }), (0, jsx_runtime_1.jsx)(Ruler_1.default, { orientation: "vertical", scale: scale, points: verticalRulerPoints, startMarking: verticalRulerStartMarking, containerRef: containerRef, markingGaps: rulerMarkingGaps, originOffset: canvasDimensions.top })] }));
|
|
97
166
|
};
|
|
98
167
|
exports.EditorRulers = EditorRulers;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useIsRulerVisible: () => boolean | null;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useIsRulerVisible = void 0;
|
|
4
|
+
const react_1 = require("react");
|
|
5
|
+
const remotion_1 = require("remotion");
|
|
6
|
+
const editor_rulers_1 = require("../../state/editor-rulers");
|
|
7
|
+
const useIsRulerVisible = () => {
|
|
8
|
+
const { canvasContent } = (0, react_1.useContext)(remotion_1.Internals.CompositionManager);
|
|
9
|
+
const { editorShowRulers } = (0, react_1.useContext)(editor_rulers_1.EditorShowRulersContext);
|
|
10
|
+
return (editorShowRulers && canvasContent && canvasContent.type === 'composition');
|
|
11
|
+
};
|
|
12
|
+
exports.useIsRulerVisible = useIsRulerVisible;
|
|
@@ -59,10 +59,13 @@ const MenuItem = ({ label: itemName, selected, id, onItemSelected, onItemHovered
|
|
|
59
59
|
const onPointerLeave = (0, react_1.useCallback)(() => {
|
|
60
60
|
setHovered(false);
|
|
61
61
|
}, []);
|
|
62
|
-
const onPointerDown = (0, react_1.useCallback)(() => {
|
|
62
|
+
const onPointerDown = (0, react_1.useCallback)((e) => {
|
|
63
|
+
if (e.button !== 0) {
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
63
66
|
onItemSelected(id);
|
|
64
|
-
window.addEventListener('pointerup', (
|
|
65
|
-
if (!(0, is_menu_item_1.isMenuItem)(
|
|
67
|
+
window.addEventListener('pointerup', (evt) => {
|
|
68
|
+
if (!(0, is_menu_item_1.isMenuItem)(evt.target)) {
|
|
66
69
|
onItemQuit();
|
|
67
70
|
}
|
|
68
71
|
}, {
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import type { PointerEvent } from 'react';
|
|
1
2
|
import React from 'react';
|
|
2
3
|
import type { SubMenu } from '../NewComposition/ComboBox';
|
|
3
4
|
export type SubMenuActivated = false | 'with-mouse' | 'without-mouse';
|
|
4
5
|
export declare const MenuSubItem: React.FC<{
|
|
5
6
|
label: React.ReactNode;
|
|
6
7
|
id: string;
|
|
7
|
-
onActionChosen: (id: string) => void;
|
|
8
|
+
onActionChosen: (id: string, e: PointerEvent<HTMLDivElement>) => void;
|
|
8
9
|
selected: boolean;
|
|
9
10
|
onItemSelected: (id: string) => void;
|
|
10
11
|
keyHint: string | null;
|
|
@@ -57,8 +57,8 @@ const MenuSubItem = ({ label, leaveLeftSpace, leftItem, onActionChosen, id, sele
|
|
|
57
57
|
backgroundColor: selected ? colors_1.CLEAR_HOVER : 'transparent',
|
|
58
58
|
};
|
|
59
59
|
}, [selected]);
|
|
60
|
-
const onItemTriggered = (0, react_1.useCallback)(() => {
|
|
61
|
-
onActionChosen(id);
|
|
60
|
+
const onItemTriggered = (0, react_1.useCallback)((e) => {
|
|
61
|
+
onActionChosen(id, e);
|
|
62
62
|
}, [id, onActionChosen]);
|
|
63
63
|
const onPointerEnter = (0, react_1.useCallback)(() => {
|
|
64
64
|
onItemSelected(id);
|
|
@@ -13,7 +13,7 @@ export type SelectionItem = {
|
|
|
13
13
|
id: string;
|
|
14
14
|
label: React.ReactNode;
|
|
15
15
|
value: string | number;
|
|
16
|
-
onClick: (id: string) => void;
|
|
16
|
+
onClick: (id: string, e: React.PointerEvent | null) => void;
|
|
17
17
|
keyHint: string | null;
|
|
18
18
|
leftItem: React.ReactNode;
|
|
19
19
|
subMenu: SubMenu | null;
|
|
@@ -71,7 +71,10 @@ const InputDragger = ({ onValueChange, min: _min, max: _max, step: _step, value,
|
|
|
71
71
|
return Math.ceil(val * factor) / factor;
|
|
72
72
|
};
|
|
73
73
|
const onPointerDown = (0, react_1.useCallback)((e) => {
|
|
74
|
-
const { pageX, pageY } = e;
|
|
74
|
+
const { pageX, pageY, button } = e;
|
|
75
|
+
if (button !== 0) {
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
75
78
|
const moveListener = (ev) => {
|
|
76
79
|
const xDistance = ev.pageX - pageX;
|
|
77
80
|
const distanceFromStart = Math.sqrt(xDistance ** 2 + (ev.pageY - pageY) ** 2);
|
|
@@ -88,7 +88,7 @@ const MenuContent = ({ onHide, values, preselectIndex, onNextMenu, onPreviousMen
|
|
|
88
88
|
return setSubMenuActivated('without-mouse');
|
|
89
89
|
}
|
|
90
90
|
onHide();
|
|
91
|
-
item.onClick(item.id);
|
|
91
|
+
item.onClick(item.id, null);
|
|
92
92
|
}, [onHide, selectedItem, values]);
|
|
93
93
|
const onArrowRight = (0, react_1.useCallback)(() => {
|
|
94
94
|
if (selectedItem === null) {
|
|
@@ -228,9 +228,9 @@ const MenuContent = ({ onHide, values, preselectIndex, onNextMenu, onPreviousMen
|
|
|
228
228
|
if (item.type === 'divider') {
|
|
229
229
|
return (0, jsx_runtime_1.jsx)(MenuDivider_1.MenuDivider, {}, item.id);
|
|
230
230
|
}
|
|
231
|
-
const onClick = () => {
|
|
231
|
+
const onClick = (id, e) => {
|
|
232
232
|
onHide();
|
|
233
|
-
item.onClick(
|
|
233
|
+
item.onClick(id, e);
|
|
234
234
|
};
|
|
235
235
|
return ((0, jsx_runtime_1.jsx)(MenuSubItem_1.MenuSubItem, { selected: item.id === selectedItem, onActionChosen: onClick, onItemSelected: onItemSelected, label: item.label, id: item.id, keyHint: item.keyHint, leaveLeftSpace: leaveLeftSpace, leftItem: item.leftItem, subMenu: item.subMenu, onQuitMenu: onHide, onNextMenu: onNextMenu, subMenuActivated: subMenuActivated, setSubMenuActivated: setSubMenuActivated }, item.id));
|
|
236
236
|
}) }));
|
|
@@ -13,5 +13,5 @@ export declare const getInputBorderColor: ({ status, isFocused, isHovered, }: {
|
|
|
13
13
|
isFocused: boolean;
|
|
14
14
|
isHovered: boolean;
|
|
15
15
|
}) => "hsla(0, 0%, 100%, 0.15)" | "rgba(0, 0, 0, 0.6)" | "rgba(255, 255, 255, 0.05)" | "#ff3232" | "#f1c40f";
|
|
16
|
-
export declare const RemotionInput: React.ForwardRefExoticComponent<Pick<Props, "
|
|
16
|
+
export declare const RemotionInput: React.ForwardRefExoticComponent<Pick<Props, "status" | "key" | "rightAlign" | keyof React.InputHTMLAttributes<HTMLInputElement>> & React.RefAttributes<HTMLInputElement>>;
|
|
17
17
|
export {};
|
|
@@ -4,5 +4,5 @@ type Props = React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>
|
|
|
4
4
|
status: RemInputStatus;
|
|
5
5
|
name: string;
|
|
6
6
|
};
|
|
7
|
-
export declare const RemInputTypeColor: React.ForwardRefExoticComponent<Pick<Props, "
|
|
7
|
+
export declare const RemInputTypeColor: React.ForwardRefExoticComponent<Pick<Props, "status" | "key" | keyof React.InputHTMLAttributes<HTMLInputElement>> & React.RefAttributes<HTMLInputElement>>;
|
|
8
8
|
export {};
|
|
@@ -3,5 +3,5 @@ type Props = React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLTextAreaEleme
|
|
|
3
3
|
status: 'error' | 'warning' | 'ok';
|
|
4
4
|
};
|
|
5
5
|
export declare const inputBaseStyle: React.CSSProperties;
|
|
6
|
-
export declare const RemTextarea: React.ForwardRefExoticComponent<Pick<Props, "
|
|
6
|
+
export declare const RemTextarea: React.ForwardRefExoticComponent<Pick<Props, "status" | "key" | keyof React.InputHTMLAttributes<HTMLTextAreaElement>> & React.RefAttributes<HTMLTextAreaElement>>;
|
|
7
7
|
export {};
|
|
@@ -5,7 +5,12 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
5
5
|
const react_1 = require("react");
|
|
6
6
|
const editor_guides_1 = require("../state/editor-guides");
|
|
7
7
|
const ShowGuidesProvider = ({ children }) => {
|
|
8
|
+
const [guidesList, setGuidesList] = (0, react_1.useState)(() => (0, editor_guides_1.loadGuidesList)());
|
|
9
|
+
const [selectedGuideId, setSelectedGuideId] = (0, react_1.useState)(null);
|
|
10
|
+
const [hoveredGuideId, setHoveredGuideId] = (0, react_1.useState)(null);
|
|
8
11
|
const [editorShowGuides, setEditorShowGuidesState] = (0, react_1.useState)(() => (0, editor_guides_1.loadEditorShowGuidesOption)());
|
|
12
|
+
const shouldCreateGuideRef = (0, react_1.useRef)(false);
|
|
13
|
+
const shouldDeleteGuideRef = (0, react_1.useRef)(false);
|
|
9
14
|
const setEditorShowGuides = (0, react_1.useCallback)((newValue) => {
|
|
10
15
|
setEditorShowGuidesState((prevState) => {
|
|
11
16
|
const newVal = newValue(prevState);
|
|
@@ -17,8 +22,22 @@ const ShowGuidesProvider = ({ children }) => {
|
|
|
17
22
|
return {
|
|
18
23
|
editorShowGuides,
|
|
19
24
|
setEditorShowGuides,
|
|
25
|
+
guidesList,
|
|
26
|
+
setGuidesList,
|
|
27
|
+
selectedGuideId,
|
|
28
|
+
setSelectedGuideId,
|
|
29
|
+
shouldCreateGuideRef,
|
|
30
|
+
shouldDeleteGuideRef,
|
|
31
|
+
hoveredGuideId,
|
|
32
|
+
setHoveredGuideId,
|
|
20
33
|
};
|
|
21
|
-
}, [
|
|
34
|
+
}, [
|
|
35
|
+
editorShowGuides,
|
|
36
|
+
setEditorShowGuides,
|
|
37
|
+
guidesList,
|
|
38
|
+
selectedGuideId,
|
|
39
|
+
hoveredGuideId,
|
|
40
|
+
]);
|
|
22
41
|
return ((0, jsx_runtime_1.jsx)(editor_guides_1.EditorShowGuidesContext.Provider, { value: editorShowGuidesCtx, children: children }));
|
|
23
42
|
};
|
|
24
43
|
exports.ShowGuidesProvider = ShowGuidesProvider;
|
|
@@ -9,6 +9,8 @@ const get_left_of_timeline_slider_1 = require("../../helpers/get-left-of-timelin
|
|
|
9
9
|
const timeline_layout_1 = require("../../helpers/timeline-layout");
|
|
10
10
|
const in_out_1 = require("../../state/in-out");
|
|
11
11
|
const timeline_zoom_1 = require("../../state/timeline-zoom");
|
|
12
|
+
const z_index_1 = require("../../state/z-index");
|
|
13
|
+
const ContextMenu_1 = require("../ContextMenu");
|
|
12
14
|
const is_menu_item_1 = require("../Menu/is-menu-item");
|
|
13
15
|
const TimelineInOutToggle_1 = require("../TimelineInOutToggle");
|
|
14
16
|
const timeline_refs_1 = require("./timeline-refs");
|
|
@@ -27,6 +29,10 @@ const container = {
|
|
|
27
29
|
height: '100%',
|
|
28
30
|
top: 0,
|
|
29
31
|
};
|
|
32
|
+
const style = {
|
|
33
|
+
width: '100%',
|
|
34
|
+
height: '100%',
|
|
35
|
+
};
|
|
30
36
|
const getClientXWithScroll = (x) => {
|
|
31
37
|
var _a;
|
|
32
38
|
return x + ((_a = timeline_refs_1.scrollableRef.current) === null || _a === void 0 ? void 0 : _a.scrollLeft);
|
|
@@ -50,6 +56,7 @@ const Inner = () => {
|
|
|
50
56
|
triggerOnWindowResize: true,
|
|
51
57
|
shouldApplyCssTransforms: true,
|
|
52
58
|
});
|
|
59
|
+
const { isHighestContext } = (0, z_index_1.useZIndex)();
|
|
53
60
|
const setFrame = remotion_1.Internals.useTimelineSetFrame();
|
|
54
61
|
const [inOutDragging, setInOutDragging] = (0, react_1.useState)({
|
|
55
62
|
dragging: false,
|
|
@@ -77,6 +84,12 @@ const Inner = () => {
|
|
|
77
84
|
}
|
|
78
85
|
};
|
|
79
86
|
const onPointerDown = (0, react_1.useCallback)((e) => {
|
|
87
|
+
if (e.button !== 0) {
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
90
|
+
if (!isHighestContext) {
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
80
93
|
stopInterval();
|
|
81
94
|
if (!videoConfig) {
|
|
82
95
|
return;
|
|
@@ -107,6 +120,9 @@ const Inner = () => {
|
|
|
107
120
|
});
|
|
108
121
|
return;
|
|
109
122
|
}
|
|
123
|
+
if (e.button !== 0) {
|
|
124
|
+
return;
|
|
125
|
+
}
|
|
110
126
|
const frame = (0, timeline_scroll_logic_1.getFrameFromX)({
|
|
111
127
|
clientX: getClientXWithScroll(e.clientX) - left,
|
|
112
128
|
durationInFrames: videoConfig.durationInFrames,
|
|
@@ -119,7 +135,18 @@ const Inner = () => {
|
|
|
119
135
|
wasPlaying: playing,
|
|
120
136
|
});
|
|
121
137
|
pause();
|
|
122
|
-
}, [
|
|
138
|
+
}, [
|
|
139
|
+
isHighestContext,
|
|
140
|
+
videoConfig,
|
|
141
|
+
left,
|
|
142
|
+
width,
|
|
143
|
+
seek,
|
|
144
|
+
playing,
|
|
145
|
+
pause,
|
|
146
|
+
inFrame,
|
|
147
|
+
get,
|
|
148
|
+
outFrame,
|
|
149
|
+
]);
|
|
123
150
|
const onPointerMoveScrubbing = (0, react_1.useCallback)((e) => {
|
|
124
151
|
var _a;
|
|
125
152
|
if (!videoConfig) {
|
|
@@ -358,8 +385,61 @@ const Inner = () => {
|
|
|
358
385
|
window.removeEventListener('pointerup', onPointerUpInOut);
|
|
359
386
|
};
|
|
360
387
|
}, [inOutDragging.dragging, onPointerMoveInOut, onPointerUpInOut]);
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
388
|
+
const inContextMenu = (0, react_1.useMemo)(() => {
|
|
389
|
+
return [
|
|
390
|
+
{
|
|
391
|
+
id: 'hide-in',
|
|
392
|
+
keyHint: null,
|
|
393
|
+
label: 'Clear In marker',
|
|
394
|
+
leftItem: null,
|
|
395
|
+
onClick: (_, e) => {
|
|
396
|
+
e === null || e === void 0 ? void 0 : e.stopPropagation();
|
|
397
|
+
e === null || e === void 0 ? void 0 : e.preventDefault();
|
|
398
|
+
setInAndOutFrames((prev) => {
|
|
399
|
+
var _a;
|
|
400
|
+
return ({
|
|
401
|
+
...prev,
|
|
402
|
+
[videoConfig.id]: {
|
|
403
|
+
...((_a = prev[videoConfig.id]) !== null && _a !== void 0 ? _a : TimelineInOutToggle_1.defaultInOutValue),
|
|
404
|
+
inFrame: null,
|
|
405
|
+
},
|
|
406
|
+
});
|
|
407
|
+
});
|
|
408
|
+
},
|
|
409
|
+
quickSwitcherLabel: null,
|
|
410
|
+
subMenu: null,
|
|
411
|
+
type: 'item',
|
|
412
|
+
value: 'hide-in',
|
|
413
|
+
},
|
|
414
|
+
];
|
|
415
|
+
}, [setInAndOutFrames, videoConfig.id]);
|
|
416
|
+
const outContextMenu = (0, react_1.useMemo)(() => {
|
|
417
|
+
return [
|
|
418
|
+
{
|
|
419
|
+
id: 'hide-out',
|
|
420
|
+
keyHint: null,
|
|
421
|
+
label: 'Clear Out marker',
|
|
422
|
+
leftItem: null,
|
|
423
|
+
onClick: (_, e) => {
|
|
424
|
+
e === null || e === void 0 ? void 0 : e.stopPropagation();
|
|
425
|
+
e === null || e === void 0 ? void 0 : e.preventDefault();
|
|
426
|
+
setInAndOutFrames((prev) => {
|
|
427
|
+
var _a;
|
|
428
|
+
return ({
|
|
429
|
+
...prev,
|
|
430
|
+
[videoConfig.id]: {
|
|
431
|
+
...((_a = prev[videoConfig.id]) !== null && _a !== void 0 ? _a : TimelineInOutToggle_1.defaultInOutValue),
|
|
432
|
+
outFrame: null,
|
|
433
|
+
},
|
|
434
|
+
});
|
|
435
|
+
});
|
|
436
|
+
},
|
|
437
|
+
quickSwitcherLabel: null,
|
|
438
|
+
subMenu: null,
|
|
439
|
+
type: 'item',
|
|
440
|
+
value: 'hide-out',
|
|
441
|
+
},
|
|
442
|
+
];
|
|
443
|
+
}, [setInAndOutFrames, videoConfig.id]);
|
|
444
|
+
return ((0, jsx_runtime_1.jsxs)("div", { style: style, onPointerDown: onPointerDown, children: [(0, jsx_runtime_1.jsx)("div", { style: inner, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME }), inFrame !== null && ((0, jsx_runtime_1.jsx)(ContextMenu_1.ContextMenu, { values: inContextMenu, children: (0, jsx_runtime_1.jsx)(TimelineInOutPointerHandle_1.TimelineInOutPointerHandle, { type: "in", atFrame: inFrame, dragging: inOutDragging.dragging === 'in' }) })), outFrame !== null && ((0, jsx_runtime_1.jsx)(ContextMenu_1.ContextMenu, { values: outContextMenu, children: (0, jsx_runtime_1.jsx)(TimelineInOutPointerHandle_1.TimelineInOutPointerHandle, { type: "out", dragging: inOutDragging.dragging === 'out', atFrame: outFrame }) }))] }));
|
|
365
445
|
};
|
|
@@ -4,6 +4,7 @@ exports.TimelineInOutPointerHandle = exports.outPointerHandle = exports.inPointe
|
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("react");
|
|
6
6
|
const remotion_1 = require("remotion");
|
|
7
|
+
const colors_1 = require("../../helpers/colors");
|
|
7
8
|
const get_left_of_timeline_slider_1 = require("../../helpers/get-left-of-timeline-slider");
|
|
8
9
|
const TimelineWidthProvider_1 = require("./TimelineWidthProvider");
|
|
9
10
|
const line = {
|
|
@@ -23,7 +24,7 @@ const InnerTimelineInOutPointerHandle = ({ atFrame, dragging, timelineWidth, typ
|
|
|
23
24
|
return {
|
|
24
25
|
...line,
|
|
25
26
|
backgroundColor: dragging
|
|
26
|
-
?
|
|
27
|
+
? colors_1.LIGHT_TRANSPARENT
|
|
27
28
|
: 'rgba(255, 255, 255, 0.1)',
|
|
28
29
|
transform: `translateX(${(0, get_left_of_timeline_slider_1.getXPositionOfItemInTimelineImperatively)(atFrame, videoConfig.durationInFrames, timelineWidth)}px)`,
|
|
29
30
|
};
|
|
@@ -4,9 +4,11 @@ exports.TopPanel = exports.useResponsiveSidebarStatus = void 0;
|
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("react");
|
|
6
6
|
const use_breakpoint_1 = require("../helpers/use-breakpoint");
|
|
7
|
+
const editor_rulers_1 = require("../state/editor-rulers");
|
|
7
8
|
const sidebar_1 = require("../state/sidebar");
|
|
8
9
|
const CanvasOrLoading_1 = require("./CanvasOrLoading");
|
|
9
10
|
const CurrentCompositionSideEffects_1 = require("./CurrentCompositionSideEffects");
|
|
11
|
+
const use_is_ruler_visible_1 = require("./EditorRuler/use-is-ruler-visible");
|
|
10
12
|
const ExplorerPanel_1 = require("./ExplorerPanel");
|
|
11
13
|
const InitialCompositionLoader_1 = require("./InitialCompositionLoader");
|
|
12
14
|
const MenuToolbar_1 = require("./MenuToolbar");
|
|
@@ -28,10 +30,6 @@ const row = {
|
|
|
28
30
|
flex: 1,
|
|
29
31
|
minHeight: 0,
|
|
30
32
|
};
|
|
31
|
-
const canvasContainer = {
|
|
32
|
-
flex: 1,
|
|
33
|
-
display: 'flex',
|
|
34
|
-
};
|
|
35
33
|
const useResponsiveSidebarStatus = () => {
|
|
36
34
|
const { sidebarCollapsedStateLeft } = (0, react_1.useContext)(sidebar_1.SidebarContext);
|
|
37
35
|
const responsiveLeftStatus = (0, use_breakpoint_1.useBreakpoint)(1200) ? 'collapsed' : 'expanded';
|
|
@@ -49,6 +47,7 @@ const useResponsiveSidebarStatus = () => {
|
|
|
49
47
|
exports.useResponsiveSidebarStatus = useResponsiveSidebarStatus;
|
|
50
48
|
const TopPanel = () => {
|
|
51
49
|
const { setSidebarCollapsedState, sidebarCollapsedStateRight } = (0, react_1.useContext)(sidebar_1.SidebarContext);
|
|
50
|
+
const rulersAreVisible = (0, use_is_ruler_visible_1.useIsRulerVisible)();
|
|
52
51
|
const actualStateLeft = (0, exports.useResponsiveSidebarStatus)();
|
|
53
52
|
const actualStateRight = (0, react_1.useMemo)(() => {
|
|
54
53
|
if (sidebarCollapsedStateRight === 'collapsed') {
|
|
@@ -56,12 +55,18 @@ const TopPanel = () => {
|
|
|
56
55
|
}
|
|
57
56
|
return 'expanded';
|
|
58
57
|
}, [sidebarCollapsedStateRight]);
|
|
58
|
+
const canvasContainerStyle = (0, react_1.useMemo)(() => ({
|
|
59
|
+
flex: 1,
|
|
60
|
+
display: 'flex',
|
|
61
|
+
paddingTop: rulersAreVisible ? editor_rulers_1.RULER_WIDTH : 0,
|
|
62
|
+
paddingLeft: rulersAreVisible ? editor_rulers_1.RULER_WIDTH : 0,
|
|
63
|
+
}), [rulersAreVisible]);
|
|
59
64
|
const onCollapseLeft = (0, react_1.useCallback)(() => {
|
|
60
65
|
setSidebarCollapsedState({ left: 'collapsed', right: null });
|
|
61
66
|
}, [setSidebarCollapsedState]);
|
|
62
67
|
const onCollapseRight = (0, react_1.useCallback)(() => {
|
|
63
68
|
setSidebarCollapsedState({ left: null, right: 'collapsed' });
|
|
64
69
|
}, [setSidebarCollapsedState]);
|
|
65
|
-
return ((0, jsx_runtime_1.jsxs)("div", { style: container, children: [(0, jsx_runtime_1.jsx)(InitialCompositionLoader_1.InitialCompositionLoader, {}), (0, jsx_runtime_1.jsx)(MenuToolbar_1.MenuToolbar, {}), (0, jsx_runtime_1.jsx)("div", { style: row, children: (0, jsx_runtime_1.jsxs)(SplitterContainer_1.SplitterContainer, { minFlex: 0.15, maxFlex: 0.4, defaultFlex: 0.2, id: "sidebar-to-preview", orientation: "vertical", children: [actualStateLeft === 'expanded' ? ((0, jsx_runtime_1.jsx)(SplitterElement_1.SplitterElement, { type: "flexer", children: (0, jsx_runtime_1.jsx)(ExplorerPanel_1.ExplorerPanel, {}) })) : null, actualStateLeft === 'expanded' ? ((0, jsx_runtime_1.jsx)(SplitterHandle_1.SplitterHandle, { allowToCollapse: "left", onCollapse: onCollapseLeft })) : null, (0, jsx_runtime_1.jsx)(SplitterElement_1.SplitterElement, { type: "anti-flexer", children: (0, jsx_runtime_1.jsxs)(SplitterContainer_1.SplitterContainer, { minFlex: 0.5, maxFlex: 0.8, defaultFlex: 0.7, id: "canvas-to-right-sidebar", orientation: "vertical", children: [(0, jsx_runtime_1.jsx)(SplitterElement_1.SplitterElement, { type: "flexer", children: (0, jsx_runtime_1.jsx)("div", { style:
|
|
70
|
+
return ((0, jsx_runtime_1.jsxs)("div", { style: container, children: [(0, jsx_runtime_1.jsx)(InitialCompositionLoader_1.InitialCompositionLoader, {}), (0, jsx_runtime_1.jsx)(MenuToolbar_1.MenuToolbar, {}), (0, jsx_runtime_1.jsx)("div", { style: row, children: (0, jsx_runtime_1.jsxs)(SplitterContainer_1.SplitterContainer, { minFlex: 0.15, maxFlex: 0.4, defaultFlex: 0.2, id: "sidebar-to-preview", orientation: "vertical", children: [actualStateLeft === 'expanded' ? ((0, jsx_runtime_1.jsx)(SplitterElement_1.SplitterElement, { type: "flexer", children: (0, jsx_runtime_1.jsx)(ExplorerPanel_1.ExplorerPanel, {}) })) : null, actualStateLeft === 'expanded' ? ((0, jsx_runtime_1.jsx)(SplitterHandle_1.SplitterHandle, { allowToCollapse: "left", onCollapse: onCollapseLeft })) : null, (0, jsx_runtime_1.jsx)(SplitterElement_1.SplitterElement, { type: "anti-flexer", children: (0, jsx_runtime_1.jsxs)(SplitterContainer_1.SplitterContainer, { minFlex: 0.5, maxFlex: 0.8, defaultFlex: 0.7, id: "canvas-to-right-sidebar", orientation: "vertical", children: [(0, jsx_runtime_1.jsx)(SplitterElement_1.SplitterElement, { type: "flexer", children: (0, jsx_runtime_1.jsx)("div", { style: canvasContainerStyle, children: (0, jsx_runtime_1.jsx)(CanvasOrLoading_1.CanvasOrLoading, {}) }) }), actualStateRight === 'expanded' ? ((0, jsx_runtime_1.jsx)(SplitterHandle_1.SplitterHandle, { allowToCollapse: "right", onCollapse: onCollapseRight })) : null, actualStateRight === 'expanded' ? ((0, jsx_runtime_1.jsx)(SplitterElement_1.SplitterElement, { type: "anti-flexer", children: (0, jsx_runtime_1.jsx)(OptionsPanel_1.OptionsPanel, {}) })) : null] }) })] }) }), (0, jsx_runtime_1.jsx)(PreviewToolbar_1.PreviewToolbar, {}), (0, jsx_runtime_1.jsx)(CurrentCompositionSideEffects_1.CurrentCompositionKeybindings, {}), (0, jsx_runtime_1.jsx)(CurrentCompositionSideEffects_1.TitleUpdater, {})] }));
|
|
66
71
|
};
|
|
67
72
|
exports.TopPanel = TopPanel;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
export declare const BACKGROUND = "
|
|
1
|
+
export declare const BACKGROUND = "rgb(31,36,40)";
|
|
2
|
+
export declare const BACKGROUND__TRANSPARENT = "rgba(31,36,40, 0)";
|
|
2
3
|
export declare const INPUT_BACKGROUND = "#2f363d";
|
|
3
4
|
export declare const BORDER_COLOR = "#000";
|
|
4
5
|
export declare const LIGHT_COLOR = "#ddd";
|
|
5
6
|
export declare const SELECTED_BACKGROUND = "hsla(0, 0%, 100%, 0.15)";
|
|
6
7
|
export declare const LIGHT_TEXT = "#A6A7A9";
|
|
8
|
+
export declare const RULER_COLOR = "#808080";
|
|
7
9
|
export declare const VERY_LIGHT_TEXT = "rgba(255, 255, 255, 0.3)";
|
|
8
10
|
export declare const CLEAR_HOVER = "rgba(255, 255, 255, 0.06)";
|
|
9
11
|
export declare const INPUT_BORDER_COLOR_UNHOVERED = "rgba(0, 0, 0, 0.6)";
|
|
@@ -13,6 +15,9 @@ export declare const FAIL_COLOR = "#ff3232";
|
|
|
13
15
|
export declare const WARNING_COLOR = "#f1c40f";
|
|
14
16
|
export declare const BLUE = "#0b84f3";
|
|
15
17
|
export declare const BLUE_DISABLED = "#284f73";
|
|
18
|
+
export declare const LIGHT_TRANSPARENT = "rgba(255, 255, 255, 0.7)";
|
|
19
|
+
export declare const UNSELECTED_GUIDE = "#7e1219";
|
|
20
|
+
export declare const SELECTED_GUIDE = "#d22d3a";
|
|
16
21
|
export declare const getBackgroundFromHoverState: ({ selected, hovered, }: {
|
|
17
22
|
selected: boolean;
|
|
18
23
|
hovered: boolean;
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getBackgroundFromHoverState = exports.BLUE_DISABLED = exports.BLUE = exports.WARNING_COLOR = exports.FAIL_COLOR = exports.TIMELINE_BACKGROUND = exports.INPUT_BORDER_COLOR_HOVERED = exports.INPUT_BORDER_COLOR_UNHOVERED = exports.CLEAR_HOVER = exports.VERY_LIGHT_TEXT = exports.LIGHT_TEXT = exports.SELECTED_BACKGROUND = exports.LIGHT_COLOR = exports.BORDER_COLOR = exports.INPUT_BACKGROUND = exports.BACKGROUND = void 0;
|
|
4
|
-
exports.BACKGROUND = '
|
|
3
|
+
exports.getBackgroundFromHoverState = exports.SELECTED_GUIDE = exports.UNSELECTED_GUIDE = exports.LIGHT_TRANSPARENT = exports.BLUE_DISABLED = exports.BLUE = exports.WARNING_COLOR = exports.FAIL_COLOR = exports.TIMELINE_BACKGROUND = exports.INPUT_BORDER_COLOR_HOVERED = exports.INPUT_BORDER_COLOR_UNHOVERED = exports.CLEAR_HOVER = exports.VERY_LIGHT_TEXT = exports.RULER_COLOR = exports.LIGHT_TEXT = exports.SELECTED_BACKGROUND = exports.LIGHT_COLOR = exports.BORDER_COLOR = exports.INPUT_BACKGROUND = exports.BACKGROUND__TRANSPARENT = exports.BACKGROUND = void 0;
|
|
4
|
+
exports.BACKGROUND = 'rgb(31,36,40)';
|
|
5
|
+
exports.BACKGROUND__TRANSPARENT = 'rgba(31,36,40, 0)';
|
|
5
6
|
exports.INPUT_BACKGROUND = '#2f363d';
|
|
6
7
|
exports.BORDER_COLOR = '#000';
|
|
7
8
|
exports.LIGHT_COLOR = '#ddd';
|
|
8
9
|
exports.SELECTED_BACKGROUND = 'hsla(0, 0%, 100%, 0.15)';
|
|
9
10
|
exports.LIGHT_TEXT = '#A6A7A9';
|
|
11
|
+
exports.RULER_COLOR = '#808080';
|
|
10
12
|
exports.VERY_LIGHT_TEXT = 'rgba(255, 255, 255, 0.3)';
|
|
11
13
|
const SELECTED_HOVER_BACKGROUND = 'hsla(0, 0%, 100%, 0.25)';
|
|
12
14
|
exports.CLEAR_HOVER = 'rgba(255, 255, 255, 0.06)';
|
|
@@ -17,6 +19,9 @@ exports.FAIL_COLOR = '#ff3232';
|
|
|
17
19
|
exports.WARNING_COLOR = '#f1c40f';
|
|
18
20
|
exports.BLUE = '#0b84f3';
|
|
19
21
|
exports.BLUE_DISABLED = '#284f73';
|
|
22
|
+
exports.LIGHT_TRANSPARENT = 'rgba(255, 255, 255, 0.7)';
|
|
23
|
+
exports.UNSELECTED_GUIDE = '#7e1219';
|
|
24
|
+
exports.SELECTED_GUIDE = '#d22d3a';
|
|
20
25
|
const getBackgroundFromHoverState = ({ selected, hovered, }) => {
|
|
21
26
|
if (selected) {
|
|
22
27
|
if (hovered) {
|