Skip to content

🎥 Make videos programmatically with React

`@remotion/studio`: Clean up Studio design (#9353)

Jonny Burgerf27f8df26a56
diff --git a/packages/studio/src/components/AssetFileIcon.tsx b/packages/studio/src/components/AssetFileIcon.tsx
new file mode 100644
index 0000000000..7f10a2a5ff
--- /dev/null
+++ b/packages/studio/src/components/AssetFileIcon.tsx
@@ -0,0 +1,33 @@
+import type {ComponentType, SVGProps} from 'react';
+import type {AssetFileType} from '../helpers/get-preview-file-type';
+import {AudioFileIcon} from '../icons/audio';
+import {FileIcon} from '../icons/file';
+import {FontFileIcon} from '../icons/font';
+import {PicIcon} from '../icons/frame';
+import {JsonFileIcon} from '../icons/json';
+import {VideoFileIcon} from '../icons/video';
+
+type AssetFileIconProps = SVGProps<SVGSVGElement> & {
+ readonly color: string;
+};
+
+const iconByFileType: Record<
+ AssetFileType,
+ ComponentType<AssetFileIconProps>
+> = {
+ audio: AudioFileIcon,
+ font: FontFileIcon,
+ image: PicIcon,
+ json: JsonFileIcon,
+ other: FileIcon,
+ txt: FileIcon,
+ video: VideoFileIcon,
+};
+
+export const AssetFileIcon = ({
+ fileType,
+ ...props
+}: AssetFileIconProps & {readonly fileType: AssetFileType}) => {
+ const Icon = iconByFileType[fileType];
+ return <Icon {...props} />;
+};
diff --git a/packages/studio/src/components/AssetSelectorItem.tsx b/packages/studio/src/components/AssetSelectorItem.tsx
index 0ce02f7bc1..0b107df2ad 100644
--- a/packages/studio/src/components/AssetSelectorItem.tsx
+++ b/packages/studio/src/components/AssetSelectorItem.tsx
@@ -23,6 +23,7 @@ import {
import {copyText} from '../helpers/copy-text';
import type {AssetFolder, AssetStructure} from '../helpers/create-folder-tree';
import {getFileManagerName} from '../helpers/get-file-manager-name';
+import {getPreviewFileType} from '../helpers/get-preview-file-type';
import {useMobileLayout} from '../helpers/mobile-layout';
import {
markAssetSidebarScrollFromRowClick,
@@ -33,23 +34,21 @@ import useAssetDragEvents, {
isFileDragEvent,
} from '../helpers/use-asset-drag-events';
import {ClipboardIcon} from '../icons/clipboard';
-import {FileIcon} from '../icons/file';
import {CollapsedFolderIcon, ExpandedFolderIcon} from '../icons/folder';
import {ModalsContext} from '../state/modals';
import {SidebarContext} from '../state/sidebar';
+import {AssetFileIcon} from './AssetFileIcon';
import {useConfirmationDialog} from './ConfirmationDialog';
import {ContextMenu} from './ContextMenu';
import {getAssetElementFromPath} from './import-assets';
import type {RenderInlineAction} from './InlineAction';
import {InlineAction} from './InlineAction';
-import {Row, Spacing} from './layout';
+import {COMPACT_CONTROL_ROW_HEIGHT, Row, Spacing} from './layout';
import {inlineCodeSnippet} from './Menu/styles';
import type {ComboboxValue} from './NewComposition/ComboBox';
import {showNotification} from './Notifications/NotificationCenter';
import {openInFileExplorer} from './RenderQueue/actions';
-const ASSET_ITEM_HEIGHT = 32;
-
const iconStyle: React.CSSProperties = {
width: 18,
height: 18,
@@ -58,20 +57,23 @@ const iconStyle: React.CSSProperties = {
const itemStyle: React.CSSProperties = {
paddingRight: 10,
- paddingTop: 6,
- paddingBottom: 6,
+ paddingTop: 5,
+ paddingBottom: 5,
fontSize: 13,
display: 'flex',
textDecoration: 'none',
cursor: 'default',
alignItems: 'center',
marginBottom: 1,
+ marginLeft: 4,
+ marginRight: 4,
appearance: 'none',
border: 'none',
- width: '100%',
+ borderRadius: 4,
+ width: 'calc(100% - 8px)',
textAlign: 'left',
backgroundColor: BACKGROUND,
- height: ASSET_ITEM_HEIGHT,
+ height: COMPACT_CONTROL_ROW_HEIGHT,
userSelect: 'none',
WebkitUserSelect: 'none',
};
@@ -301,6 +303,9 @@ const AssetSelectorItem: React.FC<{
const relativePath = useMemo(() => {
return parentFolder ? parentFolder + '/' + item.name : item.name;
}, [parentFolder, item.name]);
+ const previewFileType = useMemo(() => {
+ return getPreviewFileType(relativePath);
+ }, [relativePath]);
const selected = useMemo(() => {
if (canvasContent && canvasContent.type === 'asset') {
@@ -585,7 +590,11 @@ const AssetSelectorItem: React.FC<{
tabIndex={tabIndex}
title={item.name}
>
- <FileIcon style={iconStyle} color={LIGHT_TEXT} />
+ <AssetFileIcon
+ fileType={previewFileType}
+ style={iconStyle}
+ color={LIGHT_TEXT}
+ />
<Spacing x={1} />
<div style={label}>{item.name}</div>
{hovered && !isDragging ? (
diff --git a/packages/studio/src/components/CompositionSelectorItem.tsx b/packages/studio/src/components/CompositionSelectorItem.tsx
index 4a5c4c295e..8e262da52f 100644
--- a/packages/studio/src/components/CompositionSelectorItem.tsx
+++ b/packages/studio/src/components/CompositionSelectorItem.tsx
@@ -36,31 +36,32 @@ import {CompositionContextButton} from './CompositionContextButton';
import {CompositionOrStillIcon} from './CompositionOrStillIcon';
import {ContextMenu} from './ContextMenu';
import {getFolderMenuItems} from './folder-menu-items';
-import {Row, Spacing} from './layout';
+import {COMPACT_CONTROL_ROW_HEIGHT, Row, Spacing} from './layout';
import type {ComboboxValue} from './NewComposition/ComboBox';
import {showNotification} from './Notifications/NotificationCenter';
import {applyCodemod} from './RenderQueue/actions';
import {SidebarRenderButton} from './SidebarRenderButton';
import {useResolvedStack} from './Timeline/use-resolved-stack';
-const COMPOSITION_ITEM_HEIGHT = 32;
-
const itemStyle: React.CSSProperties = {
paddingRight: 10,
- paddingTop: 6,
- paddingBottom: 6,
+ paddingTop: 5,
+ paddingBottom: 5,
fontSize: 13,
display: 'flex',
textDecoration: 'none',
cursor: 'default',
alignItems: 'center',
marginBottom: 1,
+ marginLeft: 4,
+ marginRight: 4,
appearance: 'none',
border: 'none',
- width: '100%',
+ borderRadius: 4,
+ width: 'calc(100% - 8px)',
textAlign: 'left',
backgroundColor: BACKGROUND,
- height: COMPOSITION_ITEM_HEIGHT,
+ height: COMPACT_CONTROL_ROW_HEIGHT,
userSelect: 'none',
};
@@ -134,6 +135,7 @@ export const CompositionSelectorItem: React.FC<{
const onPointerLeave = useCallback(() => {
setHovered(false);
}, []);
+ const [isDragging, setIsDragging] = useState(false);
const [dragHovered, setDragHovered] = useState(false);
const compositionRowRef = useRef<HTMLAnchorElement>(null);
@@ -277,6 +279,7 @@ export const CompositionSelectorItem: React.FC<{
return;
}
+ setIsDragging(true);
event.dataTransfer.effectAllowed = 'copyMove';
event.dataTransfer.setData(
COMPOSITION_DRAG_MIME_TYPE,
@@ -290,6 +293,9 @@ export const CompositionSelectorItem: React.FC<{
},
[item, resolvedLocation?.source],
);
+ const onCompositionDragEnd = useCallback(() => {
+ setIsDragging(false);
+ }, []);
const onFolderDragOver = useCallback(
(event: DragEvent<HTMLElement>) => {
@@ -412,6 +418,7 @@ export const CompositionSelectorItem: React.FC<{
<Row align="center">
<div
style={style}
+ className="__remotion-composition-selector-item"
onPointerEnter={onPointerEnter}
onPointerLeave={onPointerLeave}
tabIndex={tabIndex}
@@ -479,9 +486,10 @@ export const CompositionSelectorItem: React.FC<{
onKeyDown={onKeyDown}
draggable={!window.remotion_isReadOnlyStudio}
onDragStart={onCompositionDragStart}
+ onDragEnd={onCompositionDragEnd}
type="button"
title={item.composition.id}
- className="__remotion-composition"
+ className="__remotion-composition __remotion-composition-selector-item"
data-compname={item.composition.id}
>
<CompositionOrStillIcon
@@ -492,9 +500,12 @@ export const CompositionSelectorItem: React.FC<{
<Spacing x={1} />
<div style={label}>{item.composition.id}</div>
<Spacing x={0.5} />
- <CompositionContextButton values={contextMenu} visible={hovered} />
+ <CompositionContextButton
+ values={contextMenu}
+ visible={hovered && !isDragging}
+ />
<SidebarRenderButton
- visible={hovered}
+ visible={hovered && !isDragging}
composition={item.composition}
/>
</a>
diff --git a/packages/studio/src/components/InspectorPanel/CompositionInspector.tsx b/packages/studio/src/components/InspectorPanel/CompositionInspector.tsx
index 56171ea03b..bf27348ae8 100644
--- a/packages/studio/src/components/InspectorPanel/CompositionInspector.tsx
+++ b/packages/studio/src/components/InspectorPanel/CompositionInspector.tsx
@@ -1,8 +1,8 @@
import React, {useContext, useEffect, useMemo, useState} from 'react';
import type {_InternalTypes} from 'remotion';
import {studioInteractivityEnabled} from '../../helpers/interactivity-enabled';
-import {FileIcon} from '../../icons/file';
-import {Plus} from '../../icons/plus';
+import {PicIcon} from '../../icons/frame';
+import {SolidIcon} from '../../icons/solid';
import {VisualControlsContext} from '../../visual-controls/VisualControls';
import {DefaultPropsEditor} from '../DefaultPropsEditor';
import {useZodIfPossible} from '../get-zod-if-possible';
@@ -43,8 +43,8 @@ import {
import {useCompositionActions} from './use-composition-actions';
const actionIconStyle: React.CSSProperties = {
- height: 13,
- width: 13,
+ height: 18,
+ width: 18,
};
const CompositionActions: React.FC = () => {
@@ -67,7 +67,9 @@ const CompositionActions: React.FC = () => {
<InspectorInlineAction
disabled={!canInsertSolid}
onClick={insertSolid}
- renderIcon={(color) => <Plus color={color} style={actionIconStyle} />}
+ renderIcon={(color) => (
+ <SolidIcon color={color} style={actionIconStyle} />
+ )}
>
Add Solid
</InspectorInlineAction>
@@ -77,10 +79,10 @@ const CompositionActions: React.FC = () => {
disabled={!canInsertAsset}
onClick={insertAsset}
renderIcon={(color) => (
- <FileIcon color={color} style={actionIconStyle} />
+ <PicIcon color={color} style={actionIconStyle} />
)}
>
- Add asset
+ Add asset...
</InspectorInlineAction>
) : null}
</InspectorActionSection>
diff --git a/packages/studio/src/components/InspectorPanel/CompositionMetadata.tsx b/packages/studio/src/components/InspectorPanel/CompositionMetadata.tsx
index c5f134ff66..565206c740 100644
--- a/packages/studio/src/components/InspectorPanel/CompositionMetadata.tsx
+++ b/packages/studio/src/components/InspectorPanel/CompositionMetadata.tsx
@@ -25,6 +25,12 @@ import {
} from './optimistic-composition-metadata';
import {detailsContainer} from './styles';
+const compositionMetadataContainer: React.CSSProperties = {
+ ...detailsContainer,
+ paddingBottom: 4,
+ paddingTop: 4,
+};
+
const fieldLabels: Record<CompositionMetadataField, string> = {
durationInFrames: 'Duration',
fps: 'Frame rate',
@@ -298,7 +304,7 @@ export const CompositionMetadata: React.FC<{
const isStill = isCompositionStill(video);
return (
- <div style={detailsContainer}>
+ <div style={compositionMetadataContainer}>
<InspectorDetailRow label="Dimensions">
<div style={dimensionsControls}>
<CompositionMetadataValue
diff --git a/packages/studio/src/components/InspectorPanel/ConnectedCompositionsSection.tsx b/packages/studio/src/components/InspectorPanel/ConnectedCompositionsSection.tsx
index ba06c69c71..c8f28c1e7c 100644
--- a/packages/studio/src/components/InspectorPanel/ConnectedCompositionsSection.tsx
+++ b/packages/studio/src/components/InspectorPanel/ConnectedCompositionsSection.tsx
@@ -8,8 +8,8 @@ import {useSelectComposition} from '../InitialCompositionLoader';
import {InspectorInlineAction} from './common';
const compositionIconStyle: React.CSSProperties = {
- height: 13,
- width: 13,
+ height: 18,
+ width: 18,
};
const compositionListStyle: React.CSSProperties = {
diff --git a/packages/studio/src/components/InspectorPanel/EasingInspector.tsx b/packages/studio/src/components/InspectorPanel/EasingInspector.tsx
index 593cf0eda7..0b1feffc7b 100644
--- a/packages/studio/src/components/InspectorPanel/EasingInspector.tsx
+++ b/packages/studio/src/components/InspectorPanel/EasingInspector.tsx
@@ -45,8 +45,8 @@ type EasingInspectorDetails = {
const addKeyframeIcon: React.CSSProperties = {
display: 'block',
- height: 13,
- width: 12,
+ height: 18,
+ width: 18,
};
export const EasingInspector: React.FC<{
diff --git a/packages/studio/src/components/InspectorPanel/KeyframeInspector.tsx b/packages/studio/src/components/InspectorPanel/KeyframeInspector.tsx
index 61faa3ad00..6cee3a9c57 100644
--- a/packages/studio/src/components/InspectorPanel/KeyframeInspector.tsx
+++ b/packages/studio/src/components/InspectorPanel/KeyframeInspector.tsx
@@ -125,8 +125,8 @@ const makeMovedKeyframedDragOverride = ({
const removeKeyframeIcon: React.CSSProperties = {
display: 'block',
flexShrink: 0,
- height: 13,
- width: 12,
+ height: 18,
+ width: 18,
};
const TrashIcon: React.FC<{readonly color: string}> = ({color}) => {
diff --git a/packages/studio/src/components/InspectorPanel/SequenceSelectionInspector.tsx b/packages/studio/src/components/InspectorPanel/SequenceSelectionInspector.tsx
index 76d49cee7f..3148438023 100644
--- a/packages/studio/src/components/InspectorPanel/SequenceSelectionInspector.tsx
+++ b/packages/studio/src/components/InspectorPanel/SequenceSelectionInspector.tsx
@@ -37,8 +37,8 @@ import {selectedContainer} from './styles';
import {useTrackForSelection} from './use-track-for-selection';
const splitIconStyle: React.CSSProperties = {
- height: 13,
- width: 13,
+ height: 18,
+ width: 18,
};
const SplitSequenceAction: React.FC<{
diff --git a/packages/studio/src/components/InspectorPanel/common.tsx b/packages/studio/src/components/InspectorPanel/common.tsx
index 56d967c6af..30a8c99667 100644
--- a/packages/studio/src/components/InspectorPanel/common.tsx
+++ b/packages/studio/src/components/InspectorPanel/common.tsx
@@ -1,7 +1,13 @@
import React from 'react';
-import {LIGHT_TEXT, TRANSPARENT, WHITE} from '../../helpers/colors';
+import {
+ LIGHT_TEXT,
+ TRANSPARENT,
+ WHITE,
+ getBackgroundFromHoverState,
+} from '../../helpers/colors';
import {InlineAction} from '../InlineAction';
import {INSPECTOR_PANEL_HORIZONTAL_PADDING} from '../InspectorPanelLayout';
+import {COMPACT_CONTROL_ROW_HEIGHT} from '../layout';
import {ValidationMessage} from '../NewComposition/ValidationMessage';
import type {RenderModalWarning} from '../RenderModal/DataEditor';
import {
@@ -113,11 +119,14 @@ export const InspectorDetailRow: React.FC<{
</div>
);
+const INLINE_LABEL_BUTTON_MARGIN = 4;
+
const inlineLabelButton: React.CSSProperties = {
alignItems: 'center',
appearance: 'none',
backgroundColor: TRANSPARENT,
border: 'none',
+ borderRadius: 4,
boxSizing: 'border-box',
color: LIGHT_TEXT,
cursor: 'default',
@@ -125,11 +134,12 @@ const inlineLabelButton: React.CSSProperties = {
fontFamily: 'sans-serif',
fontSize: 13,
gap: 8,
+ height: COMPACT_CONTROL_ROW_HEIGHT,
lineHeight: '18px',
- margin: 0,
- padding: `5px ${INSPECTOR_PANEL_HORIZONTAL_PADDING}px`,
+ margin: `0 ${INLINE_LABEL_BUTTON_MARGIN}px`,
+ padding: `5px ${INSPECTOR_PANEL_HORIZONTAL_PADDING - INLINE_LABEL_BUTTON_MARGIN}px`,
textAlign: 'left',
- width: '100%',
+ width: `calc(100% - ${INLINE_LABEL_BUTTON_MARGIN * 2}px)`,
};
const inlineLabelButtonDisabled: React.CSSProperties = {
@@ -139,18 +149,23 @@ const inlineLabelButtonDisabled: React.CSSProperties = {
const inlineLabelText: React.CSSProperties = {
color: LIGHT_TEXT,
+ flex: 1,
fontFamily: 'sans-serif',
fontSize: 13,
lineHeight: '18px',
+ minWidth: 0,
+ overflow: 'hidden',
+ textOverflow: 'ellipsis',
+ whiteSpace: 'nowrap',
};
const inlineLabelIcon: React.CSSProperties = {
alignItems: 'center',
display: 'flex',
flexShrink: 0,
- height: 13,
+ height: 18,
justifyContent: 'center',
- width: 13,
+ width: 18,
};
export const InspectorInlineAction: React.FC<{
@@ -165,10 +180,14 @@ export const InspectorInlineAction: React.FC<{
const buttonStyle = React.useMemo(
(): React.CSSProperties => ({
...(disabled ? inlineLabelButtonDisabled : inlineLabelButton),
+ backgroundColor: getBackgroundFromHoverState({
+ hovered: hovered && !disabled,
+ selected: false,
+ }),
color,
...style,
}),
- [color, disabled, style],
+ [color, disabled, hovered, style],
);
const textStyle = React.useMemo(
(): React.CSSProperties => ({
diff --git a/packages/studio/src/components/layout.tsx b/packages/studio/src/components/layout.tsx
index aaed2d185f..271103bfdd 100644
--- a/packages/studio/src/components/layout.tsx
+++ b/packages/studio/src/components/layout.tsx
@@ -2,6 +2,7 @@ import type {HTMLAttributes} from 'react';
import React, {useMemo} from 'react';
export const SPACING_UNIT = 8;
+export const COMPACT_CONTROL_ROW_HEIGHT = 28;
export const Spacing: React.FC<{
readonly x?: number;
diff --git a/packages/studio/src/helpers/get-preview-file-type.ts b/packages/studio/src/helpers/get-preview-file-type.ts
index 36a3e3ddfe..02ac438267 100644
--- a/packages/studio/src/helpers/get-preview-file-type.ts
+++ b/packages/studio/src/helpers/get-preview-file-type.ts
@@ -1,5 +1,6 @@
export type AssetFileType =
| 'audio'
+ | 'font'
| 'video'
| 'image'
| 'json'
@@ -14,6 +15,7 @@ export const getPreviewFileType = (fileName: string | null): AssetFileType => {
const audioExtensions = ['mp3', 'wav', 'ogg', 'aac'];
const videoExtensions = ['mp4', 'avi', 'mkv', 'mov', 'webm'];
const imageExtensions = ['jpg', 'jpeg', 'png', 'apng', 'gif', 'bmp', 'webp'];
+ const fontExtensions = ['woff', 'woff2', 'ttf', 'otf', 'eot'];
const fileExtension = fileName.split('.').pop()?.toLowerCase();
if (fileExtension === undefined) {
@@ -32,6 +34,10 @@ export const getPreviewFileType = (fileName: string | null): AssetFileType => {
return 'image';
}
+ if (fontExtensions.includes(fileExtension)) {
+ return 'font';
+ }
+
if (fileExtension === 'json') {
return 'json';
}
diff --git a/packages/studio/src/helpers/inject-css.ts b/packages/studio/src/helpers/inject-css.ts
index aef6a2dac3..423311a53d 100644
--- a/packages/studio/src/helpers/inject-css.ts
+++ b/packages/studio/src/helpers/inject-css.ts
@@ -97,6 +97,15 @@ const makeDefaultGlobalCSS = () => {
box-shadow: ${FOCUS_BOX_SHADOW};
}
+ .__remotion-composition-selector-item:focus {
+ outline: none;
+ box-shadow: none;
+ }
+
+ .__remotion-composition-selector-item:focus-visible {
+ box-shadow: ${FOCUS_BOX_SHADOW};
+ }
+
.__remotion_color_swatch:focus {
outline: none;
}
diff --git a/packages/studio/src/icons/audio.tsx b/packages/studio/src/icons/audio.tsx
index 4f35de9e68..c968a86843 100644
--- a/packages/studio/src/icons/audio.tsx
+++ b/packages/studio/src/icons/audio.tsx
@@ -9,3 +9,15 @@ export const AudioIcon = (props: SVGProps<SVGSVGElement>) => (
/>
</svg>
);
+
+export const AudioFileIcon = ({
+ color,
+ ...props
+}: SVGProps<SVGSVGElement> & {readonly color?: string}) => (
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" {...props}>
+ <path
+ fill={color ?? CURRENT_COLOR_LOWERCASE}
+ d="M480 16l0-19.9-19.5 4.3-288 64-12.5 2.8 0 273.2c-17-12.7-39.4-20.4-64-20.4-53 0-96 35.8-96 80s43 80 96 80 96-35.8 96-80l0-187.2 256-56.9 0 120.4c-17-12.7-39.4-20.4-64-20.4-53 0-96 35.8-96 80s43 80 96 80 96-35.8 96-80l0-320zM448 336c0 26.5-28.7 48-64 48s-64-21.5-64-48 28.7-48 64-48 64 21.5 64 48zM160 400c0 26.5-28.7 48-64 48s-64-21.5-64-48 28.7-48 64-48 64 21.5 64 48zM448 123.2l-256 56.9 0-87.2 256-56.9 0 87.2z"
+ />
+ </svg>
+);
diff --git a/packages/studio/src/icons/font.tsx b/packages/studio/src/icons/font.tsx
new file mode 100644
index 0000000000..7b8f07e3ea
--- /dev/null
+++ b/packages/studio/src/icons/font.tsx
@@ -0,0 +1,15 @@
+import type {SVGProps} from 'react';
+
+export const FontFileIcon = ({
+ color,
+ ...props
+}: SVGProps<SVGSVGElement> & {readonly color: string}) => {
+ return (
+ <svg {...props} xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
+ <path
+ fill={color}
+ d="M256 32c6.4 0 12.2 3.8 14.7 9.8L442.6 448 480 448c8.8 0 16 7.2 16 16s-7.2 16-16 16l-112 0c-8.8 0-16-7.2-16-16s7.2-16 16-16l39.9 0-40.6-96-222.5 0-40.6 96 39.9 0c8.8 0 16 7.2 16 16s-7.2 16-16 16L32 480c-8.8 0-16-7.2-16-16s7.2-16 16-16l37.4 0 171.9-406.2c2.5-5.9 8.3-9.8 14.7-9.8zM158.3 320L353.7 320 256 89.1 158.3 320z"
+ />
+ </svg>
+ );
+};
diff --git a/packages/studio/src/icons/frame.tsx b/packages/studio/src/icons/frame.tsx
index 3b34ae2988..ec96a81fc5 100644
--- a/packages/studio/src/icons/frame.tsx
+++ b/packages/studio/src/icons/frame.tsx
@@ -1,10 +1,13 @@
import type {SVGProps} from 'react';
import {CURRENT_COLOR_LOWERCASE} from '../helpers/colors';
-export const PicIcon = (props: SVGProps<SVGSVGElement>) => (
+export const PicIcon = ({
+ color,
+ ...props
+}: SVGProps<SVGSVGElement> & {readonly color?: string}) => (
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" {...props}>
<path
- fill={CURRENT_COLOR_LOWERCASE}
+ fill={color ?? CURRENT_COLOR_LOWERCASE}
d="M324.9 157.8c-11.38-17.38-39.89-17.31-51.23-.063L200.5 268.5l-16.4-22.6c-11.4-16.8-38.2-16-49.7 0l-64.52 89.16c-6.797 9.406-7.75 21.72-2.547 32C72.53 377.5 83.05 384 94.75 384h322.5c11.41 0 21.8-6.281 27.14-16.38a30.922 30.922 0 0 0-1.516-31.56L324.9 157.8zM95.8 352l62.39-87.38 29.91 41.34c3.1 4.24 8.3 7.24 13.3 6.64 5.25-.125 10.12-2.781 13.02-7.188l83.83-129.9L415 352H95.8zM447.1 32h-384C28.65 32-.01 60.65-.01 96v320c0 35.35 28.65 64 63.1 64h384c35.35 0 64-28.65 64-64V96c.01-35.35-27.79-64-63.99-64zM480 416c0 17.64-14.36 32-32 32H64c-17.64 0-32-14.36-32-32V96c0-17.64 14.36-32 32-32h384c17.64 0 32 14.36 32 32v320zM144 192c26.5 0 48-21.5 48-48s-21.5-48-48-48-48 21.5-48 48 21.5 48 48 48zm0-64c8.822 0 15.1 7.178 15.1 16s-6.3 16-15.1 16-16-7.2-16-16 7.2-16 16-16z"
/>
</svg>
diff --git a/packages/studio/src/icons/json.tsx b/packages/studio/src/icons/json.tsx
new file mode 100644
index 0000000000..46c7a30337
--- /dev/null
+++ b/packages/studio/src/icons/json.tsx
@@ -0,0 +1,15 @@
+import type {SVGProps} from 'react';
+
+export const JsonFileIcon = ({
+ color,
+ ...props
+}: SVGProps<SVGSVGElement> & {readonly color: string}) => {
+ return (
+ <svg {...props} xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512">
+ <path
+ fill={color}
+ d="M144 32c-44.2 0-80 35.8-80 80l0 53.5c0 12.7-5.1 24.9-14.1 33.9L4.7 244.7c-3 3-4.7 7.1-4.7 11.3s1.7 8.3 4.7 11.3l45.3 45.3c9 9 14.1 21.2 14.1 33.9L64 400c0 44.2 35.8 80 80 80l64 0c8.8 0 16-7.2 16-16s-7.2-16-16-16l-64 0c-26.5 0-48-21.5-48-48l0-53.5c0-21.2-8.4-41.6-23.4-56.6L38.6 256 72.6 222.1c15-15 23.4-35.4 23.4-56.6L96 112c0-26.5 21.5-48 48-48l64 0c8.8 0 16-7.2 16-16s-7.2-16-16-16l-64 0zm288 0l-64 0c-8.8 0-16 7.2-16 16s7.2 16 16 16l64 0c26.5 0 48 21.5 48 48l0 53.5c0 21.2 8.4 41.6 23.4 56.6l33.9 33.9-33.9 33.9c-15 15-23.4 35.4-23.4 56.6l0 53.5c0 26.5-21.5 48-48 48l-64 0c-8.8 0-16 7.2-16 16s7.2 16 16 16l64 0c44.2 0 80-35.8 80-80l0-53.5c0-12.7 5.1-24.9 14.1-33.9l45.3-45.3c3-3 4.7-7.1 4.7-11.3s-1.7-8.3-4.7-11.3l-45.3-45.3c-9-9-14.1-21.2-14.1-33.9l0-53.5c0-44.2-35.8-80-80-80z"
+ />
+ </svg>
+ );
+};
diff --git a/packages/studio/src/icons/magnet.tsx b/packages/studio/src/icons/magnet.tsx
index 492ced5057..ca8c333ef5 100644
--- a/packages/studio/src/icons/magnet.tsx
+++ b/packages/studio/src/icons/magnet.tsx
@@ -6,7 +6,7 @@ export const MagnetIcon: React.FC<SVGProps<SVGSVGElement>> = (props) => {
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" {...props}>
<path
transform="rotate(180 256 256)"
- d="M32 176v112c0 123.7 100.3 224 224 224s224-100.3 224-224V176H352v112c0 53-43 96-96 96s-96-43-96-96V176H32zm0-48h128V64c0-17.7-14.3-32-32-32H64C46.3 32 32 46.3 32 64v64zm320 0h128V64c0-17.7-14.3-32-32-32h-64c-17.7 0-32 14.3-32 32v64z"
+ d="M32 176v112c0 123.7 100.3 224 224 224s224-100.3 224-224V176H352v112c0 53-43 96-96 96s-96-43-96-96V176H32zm0-48h128V32c0-17.7-14.3-32-32-32H64C46.3 0 32 14.3 32 32v96zm320 0h128V32c0-17.7-14.3-32-32-32h-64c-17.7 0-32 14.3-32 32v96z"
/>
</svg>
);
diff --git a/packages/studio/src/icons/scissors.tsx b/packages/studio/src/icons/scissors.tsx
index dc2f9dead1..526028828e 100644
--- a/packages/studio/src/icons/scissors.tsx
+++ b/packages/studio/src/icons/scissors.tsx
@@ -1,16 +1,17 @@
import type {SVGProps} from 'react';
import React from 'react';
-export const ScissorsIcon: React.FC<SVGProps<SVGSVGElement>> = (props) => {
+export const ScissorsIcon: React.FC<
+ SVGProps<SVGSVGElement> & {
+ readonly color: string;
+ }
+> = ({color, ...props}) => {
return (
- <svg
- xmlns="http://www.w3.org/2000/svg"
- viewBox="0 0 640 640"
- fill="currentColor"
- stroke="currentColor"
- {...props}
- >
- <path d="M256 320L216.5 359.5C203.9 354.6 190.3 352 176 352C114.1 352 64 402.1 64 464C64 525.9 114.1 576 176 576C237.9 576 288 525.9 288 464C288 449.7 285.3 436.1 280.5 423.5L563.2 140.8C570.3 133.7 570.3 122.3 563.2 115.2C534.9 86.9 489.1 86.9 460.8 115.2L320 256L280.5 216.5C285.4 203.9 288 190.3 288 176C288 114.1 237.9 64 176 64C114.1 64 64 114.1 64 176C64 237.9 114.1 288 176 288C190.3 288 203.9 285.3 216.5 280.5L256 320zM353.9 417.9L460.8 524.8C489.1 553.1 534.9 553.1 563.2 524.8C570.3 517.7 570.3 506.3 563.2 499.2L417.9 353.9L353.9 417.9zM128 176C128 149.5 149.5 128 176 128C202.5 128 224 149.5 224 176C224 202.5 202.5 224 176 224C149.5 224 128 202.5 128 176zM176 416C202.5 416 224 437.5 224 464C224 490.5 202.5 512 176 512C149.5 512 128 490.5 128 464C128 437.5 149.5 416 176 416z" />
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512" {...props}>
+ <path
+ fill={color}
+ d="M112 32a80 80 0 1 0 0 160 80 80 0 1 0 0-160zm0-32c61.9 0 112 50.1 112 112 0 12.4-2 24.4-5.8 35.6L256 185.4 383.9 57.5c31-31 81.2-31 112.2 0 12.4 12.4 12.4 32.6 0 45L221.6 377c1.6 7.4 2.4 15.1 2.4 23 0 61.9-50.1 112-112 112S0 461.9 0 400s50.1-112 112-112c12.4 0 24.4 2 35.6 5.8L177.4 264 135 221.6c-7.4 1.6-15.1 2.4-23 2.4-61.9 0-112-50.1-112-112S50.1 0 112 0zm55.8 209.1l32.2 32.2 33.4-33.4-30.5-30.5c-9.3 12.9-21.3 23.7-35.1 31.7zm238.7-129-229 229c12.9 9.3 23.7 21.3 31.7 35.1L473.4 80c-18.5-18.4-48.4-18.3-66.9.1zM192 400a80 80 0 1 0-160 0 80 80 0 1 0 160 0zm206.5 39.9c18.5 18.5 48.4 18.5 66.9.1L346 320.6l22.6-22.6 119.5 119.5c12.4 12.4 12.4 32.6 0 45-31 31-81.2 31-112.2 0L290 376.6l22.6-22.6 85.9 85.9z"
+ />
</svg>
);
};
diff --git a/packages/studio/src/icons/solid.tsx b/packages/studio/src/icons/solid.tsx
new file mode 100644
index 0000000000..c0c2bac5e6
--- /dev/null
+++ b/packages/studio/src/icons/solid.tsx
@@ -0,0 +1,23 @@
+import type {SVGProps} from 'react';
+import React from 'react';
+
+export const SolidIcon: React.FC<
+ SVGProps<SVGSVGElement> & {
+ readonly color: string;
+ }
+> = ({color, ...props}) => {
+ return (
+ <svg {...props} xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
+ <rect
+ x={16}
+ y={48}
+ width={480}
+ height={416}
+ rx={48}
+ fill="none"
+ stroke={color}
+ strokeWidth={32}
+ />
+ </svg>
+ );
+};
diff --git a/packages/studio/src/icons/video.tsx b/packages/studio/src/icons/video.tsx
index 1ec718a266..f7a0592aed 100644
--- a/packages/studio/src/icons/video.tsx
+++ b/packages/studio/src/icons/video.tsx
@@ -15,3 +15,18 @@ export const FilmIcon: React.FC<
</svg>
);
};
+
+export const VideoFileIcon: React.FC<
+ SVGProps<SVGSVGElement> & {
+ readonly color: string;
+ }
+> = ({color, ...props}) => {
+ return (
+ <svg {...props} xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512">
+ <path
+ fill={color}
+ d="M96 96c-17.7 0-32 14.3-32 32l0 256c0 17.7 14.3 32 32 32l256 0c17.7 0 32-14.3 32-32l0-256c0-17.7-14.3-32-32-32L96 96zM32 128c0-35.3 28.7-64 64-64l256 0c35.3 0 64 28.7 64 64l0 256c0 35.3-28.7 64-64 64L96 448c-35.3 0-64-28.7-64-64l0-256zm432 84l0-40 73.6-55.2c4.2-3.1 9.2-4.8 14.4-4.8 13.3 0 24 10.7 24 24l0 240c0 13.3-10.7 24-24 24-5.2 0-10.2-1.7-14.4-4.8l-73.6-55.2 0-40 80 60 0-208-80 60z"
+ />
+ </svg>
+ );
+};