Skip to content

OpenReel Video - Professional browser-based video editor. Open source CapCut alternative. 100% browser-based, no installation, no cloud uploads, no watermarks.

TypeScript

feat: add auto cut silence feature and UI polish improvements

Augustus Otu01991bfe2424
diff --git a/apps/web/src/bridges/index.ts b/apps/web/src/bridges/index.ts
index 5cce6199..96f5a21a 100644
--- a/apps/web/src/bridges/index.ts
+++ b/apps/web/src/bridges/index.ts
@@ -151,3 +151,14 @@ export {
type BeatSyncState,
type BeatSyncOptions,
} from "./beat-sync-bridge";
+
+export {
+ SilenceCutBridge,
+ getSilenceCutBridge,
+ disposeSilenceCutBridge,
+ DEFAULT_SILENCE_SETTINGS,
+ type SilenceSettings,
+ type SilentRegion,
+ type SilenceAnalysisResult,
+ type SilenceProgressCallback,
+} from "./silence-cut-bridge";
diff --git a/apps/web/src/bridges/silence-cut-bridge.ts b/apps/web/src/bridges/silence-cut-bridge.ts
new file mode 100644
index 00000000..cedbe7db
--- /dev/null
+++ b/apps/web/src/bridges/silence-cut-bridge.ts
@@ -0,0 +1,260 @@
+import { getAudioEngine } from "@openreel/core";
+import { useProjectStore } from "../stores/project-store";
+
+export interface SilenceSettings {
+ threshold: number;
+ minSilenceDuration: number;
+ paddingBefore: number;
+ paddingAfter: number;
+}
+
+export interface SilentRegion {
+ start: number;
+ end: number;
+ duration: number;
+}
+
+export interface SilenceAnalysisResult {
+ silentRegions: SilentRegion[];
+ totalSilenceDuration: number;
+ clipDuration: number;
+}
+
+export const DEFAULT_SILENCE_SETTINGS: SilenceSettings = {
+ threshold: -40,
+ minSilenceDuration: 0.5,
+ paddingBefore: 0.1,
+ paddingAfter: 0.1,
+};
+
+export type SilenceProgressCallback = (
+ progress: number,
+ message: string,
+) => void;
+
+export class SilenceCutBridge {
+ private audioContext: AudioContext | null = null;
+
+ private getAudioContext(): AudioContext {
+ if (!this.audioContext) {
+ this.audioContext = new AudioContext();
+ }
+ return this.audioContext;
+ }
+
+ async analyzeClip(
+ clipId: string,
+ settings: SilenceSettings,
+ onProgress?: SilenceProgressCallback,
+ ): Promise<SilenceAnalysisResult> {
+ const store = useProjectStore.getState();
+ const clip = store.getClip(clipId);
+
+ if (!clip) {
+ throw new Error("Clip not found");
+ }
+
+ const mediaItem = store.getMediaItem(clip.mediaId);
+ if (!mediaItem?.blob) {
+ throw new Error("Media blob not found");
+ }
+
+ onProgress?.(10, "Loading audio...");
+
+ const audioContext = this.getAudioContext();
+ const arrayBuffer = await mediaItem.blob.arrayBuffer();
+ const audioBuffer = await audioContext.decodeAudioData(arrayBuffer);
+
+ onProgress?.(30, "Detecting silence...");
+
+ const audioEngine = getAudioEngine();
+ const rawSilentRanges = audioEngine.detectSilence(
+ audioBuffer,
+ settings.threshold,
+ );
+
+ onProgress?.(60, "Processing results...");
+
+ const inPoint = clip.inPoint ?? 0;
+ const outPoint = clip.outPoint ?? audioBuffer.duration;
+ const clipDuration = outPoint - inPoint;
+
+ const filteredRegions = rawSilentRanges
+ .map((range) => {
+ const relativeStart = range.start - inPoint;
+ const relativeEnd = range.end - inPoint;
+
+ const adjustedStart = Math.max(
+ 0,
+ relativeStart + settings.paddingBefore,
+ );
+ const adjustedEnd = Math.min(
+ clipDuration,
+ relativeEnd - settings.paddingAfter,
+ );
+
+ return {
+ start: adjustedStart,
+ end: adjustedEnd,
+ duration: adjustedEnd - adjustedStart,
+ };
+ })
+ .filter(
+ (region) =>
+ region.duration >= settings.minSilenceDuration &&
+ region.start >= 0 &&
+ region.end <= clipDuration &&
+ region.start < region.end,
+ );
+
+ onProgress?.(90, "Finalizing...");
+
+ const totalSilenceDuration = filteredRegions.reduce(
+ (sum, region) => sum + region.duration,
+ 0,
+ );
+
+ onProgress?.(100, "Complete");
+
+ return {
+ silentRegions: filteredRegions,
+ totalSilenceDuration,
+ clipDuration,
+ };
+ }
+
+ async cutSilence(
+ clipId: string,
+ silentRegions: SilentRegion[],
+ onProgress?: SilenceProgressCallback,
+ ): Promise<{ success: boolean; error?: string }> {
+ if (silentRegions.length === 0) {
+ return { success: true };
+ }
+
+ const store = useProjectStore.getState();
+ const initialClip = store.getClip(clipId);
+
+ if (!initialClip) {
+ return { success: false, error: "Clip not found" };
+ }
+
+ const clipStartTime = initialClip.startTime;
+ const sortedRegions = [...silentRegions].sort((a, b) => b.start - a.start);
+
+ onProgress?.(0, "Preparing cuts...");
+
+ try {
+ for (let i = 0; i < sortedRegions.length; i++) {
+ const region = sortedRegions[i];
+ const progress = Math.round(((i + 1) / sortedRegions.length) * 100);
+ onProgress?.(progress, `Cutting section ${i + 1}/${sortedRegions.length}`);
+
+ const absoluteStart = clipStartTime + region.start;
+ const absoluteEnd = clipStartTime + region.end;
+
+ const currentClip = this.findClipContainingTime(absoluteStart);
+ if (!currentClip) {
+ continue;
+ }
+
+ const clipRelativeEnd = absoluteEnd - currentClip.startTime;
+
+ if (clipRelativeEnd < currentClip.duration) {
+ const splitResult = await store.splitClip(
+ currentClip.id,
+ clipRelativeEnd,
+ );
+ if (!splitResult.success) {
+ continue;
+ }
+ }
+
+ const clipAfterFirstSplit = this.findClipContainingTime(absoluteStart);
+ if (!clipAfterFirstSplit) {
+ continue;
+ }
+
+ const newRelativeStart = absoluteStart - clipAfterFirstSplit.startTime;
+
+ if (newRelativeStart > 0) {
+ const splitResult = await store.splitClip(
+ clipAfterFirstSplit.id,
+ newRelativeStart,
+ );
+ if (!splitResult.success) {
+ continue;
+ }
+ }
+
+ const silentClip = this.findClipInTimeRange(
+ absoluteStart,
+ absoluteEnd,
+ );
+ if (silentClip) {
+ await store.rippleDeleteClip(silentClip.id);
+ }
+ }
+
+ onProgress?.(100, "Complete");
+ return { success: true };
+ } catch (error) {
+ const message =
+ error instanceof Error ? error.message : "Unknown error occurred";
+ return { success: false, error: message };
+ }
+ }
+
+ private findClipContainingTime(time: number) {
+ const store = useProjectStore.getState();
+ const { project } = store;
+
+ for (const track of project.timeline.tracks) {
+ for (const clip of track.clips) {
+ const clipEnd = clip.startTime + clip.duration;
+ if (time >= clip.startTime && time < clipEnd) {
+ return clip;
+ }
+ }
+ }
+ return null;
+ }
+
+ private findClipInTimeRange(start: number, end: number) {
+ const store = useProjectStore.getState();
+ const { project } = store;
+
+ for (const track of project.timeline.tracks) {
+ for (const clip of track.clips) {
+ const clipMidpoint = clip.startTime + clip.duration / 2;
+ if (clipMidpoint >= start && clipMidpoint < end) {
+ return clip;
+ }
+ }
+ }
+ return null;
+ }
+
+ dispose(): void {
+ if (this.audioContext) {
+ this.audioContext.close();
+ this.audioContext = null;
+ }
+ }
+}
+
+let bridgeInstance: SilenceCutBridge | null = null;
+
+export function getSilenceCutBridge(): SilenceCutBridge {
+ if (!bridgeInstance) {
+ bridgeInstance = new SilenceCutBridge();
+ }
+ return bridgeInstance;
+}
+
+export function disposeSilenceCutBridge(): void {
+ if (bridgeInstance) {
+ bridgeInstance.dispose();
+ bridgeInstance = null;
+ }
+}
diff --git a/apps/web/src/components/editor/AIGenTab.tsx b/apps/web/src/components/editor/AIGenTab.tsx
index 18122f88..044928a1 100644
--- a/apps/web/src/components/editor/AIGenTab.tsx
+++ b/apps/web/src/components/editor/AIGenTab.tsx
@@ -7,7 +7,6 @@ import {
Video,
Layers,
ChevronRight,
- Sparkles,
Wand2,
FileStack,
Volume2,
@@ -149,7 +148,7 @@ export const AIGenTab: React.FC = () => {
<p className="text-[11px] text-text-muted mt-1">Automate your editing with intelligent features</p>
</div>
- <FeatureSection title="Content Generation" icon={Sparkles}>
+ <FeatureSection title="Content Generation" icon={Wand2}>
<FeatureCard
icon={Mic}
title="Text to Speech"
diff --git a/apps/web/src/components/editor/ExportDialog.tsx b/apps/web/src/components/editor/ExportDialog.tsx
index 70c57c1d..026f8b93 100644
--- a/apps/web/src/components/editor/ExportDialog.tsx
+++ b/apps/web/src/components/editor/ExportDialog.tsx
@@ -12,7 +12,6 @@ import {
HardDrive,
Video,
Share2,
- Sparkles,
Cpu,
Gauge,
Zap,
@@ -317,7 +316,7 @@ export const ExportDialog: React.FC<ExportDialogProps> = ({
}`}
>
<div className="flex items-center gap-2">
- <Sparkles size={14} />
+ <Zap size={14} />
<span className="font-medium">For Your Video</span>
</div>
<span className="text-[10px] text-text-muted mt-0.5 ml-5">
@@ -630,7 +629,7 @@ export const ExportDialog: React.FC<ExportDialogProps> = ({
<div className="col-span-2 border-t border-border pt-4 mt-2">
<div className="flex items-center justify-between mb-3">
<div className="flex items-center gap-2">
- <Sparkles size={14} className="text-primary" />
+ <Zap size={14} className="text-primary" />
<Label htmlFor="upscaling-switch" className="text-xs font-medium text-text-secondary">
Enhance Quality (Upscaling)
</Label>
diff --git a/apps/web/src/components/editor/InspectorPanel.tsx b/apps/web/src/components/editor/InspectorPanel.tsx
index 41a8ae6b..95409f29 100644
--- a/apps/web/src/components/editor/InspectorPanel.tsx
+++ b/apps/web/src/components/editor/InspectorPanel.tsx
@@ -35,6 +35,7 @@ import {
ClipTransitionSection,
BackgroundRemovalSection,
AutoReframeSection,
+ AutoCutSilenceSection,
CropSection,
SpeedSection,
MotionPresetsPanel,
@@ -627,6 +628,13 @@ export const InspectorPanel: React.FC = () => {
</div>
)}
+ {/* AI Auto Cut Silence - Video and Audio clips */}
+ {showAudioEffects && (
+ <div className="mb-4">
+ <AutoCutSilenceSection clipId={clipId} />
+ </div>
+ )}
+
{/* Transform */}
{showTransformControls && (
<Section title="Transform" sectionId="transform">
@@ -730,7 +738,7 @@ export const InspectorPanel: React.FC = () => {
}
className={`py-1.5 rounded text-[9px] capitalize transition-colors ${
(transform.fitMode || "none") === mode
- ? "bg-primary text-black"
+ ? "bg-primary text-white"
: "bg-background-tertiary border border-border text-text-secondary hover:text-text-primary"
}`}
>
@@ -1026,7 +1034,7 @@ export const InspectorPanel: React.FC = () => {
{showVideoControls && (
<button
onClick={handleRemoveBackground}
- className="w-full py-2 bg-background-tertiary hover:bg-primary hover:text-black border border-border hover:border-primary rounded-lg text-[10px] transition-all"
+ className="w-full py-2 bg-background-tertiary hover:bg-primary hover:text-white border border-border hover:border-primary rounded-lg text-[10px] transition-all"
>
Remove Background
</button>
@@ -1040,7 +1048,7 @@ export const InspectorPanel: React.FC = () => {
? "bg-green-500/20 border-green-500 text-green-400"
: isEnhancingAudio
? "bg-background-tertiary border-border text-text-muted cursor-not-allowed"
- : "bg-background-tertiary hover:bg-primary hover:text-black border-border hover:border-primary"
+ : "bg-background-tertiary hover:bg-primary hover:text-white border-border hover:border-primary"
}`}
>
{isEnhancingAudio ? (
@@ -1058,7 +1066,7 @@ export const InspectorPanel: React.FC = () => {
{showVideoEffects && (
<button
onClick={handleAutoColor}
- className="w-full py-2 bg-background-tertiary hover:bg-primary hover:text-black border border-border hover:border-primary rounded-lg text-[10px] transition-all"
+ className="w-full py-2 bg-background-tertiary hover:bg-primary hover:text-white border border-border hover:border-primary rounded-lg text-[10px] transition-all"
>
Auto-Color
</button>
@@ -1151,7 +1159,7 @@ export const InspectorPanel: React.FC = () => {
}
className={`py-1.5 rounded text-[10px] capitalize transition-colors ${
(selectedSubtitle.style?.position || "bottom") === pos
- ? "bg-primary text-black"
+ ? "bg-primary text-white"
: "bg-background-tertiary border border-border text-text-secondary hover:text-text-primary"
}`}
>
diff --git a/apps/web/src/components/editor/KeyboardShortcutsOverlay.tsx b/apps/web/src/components/editor/KeyboardShortcutsOverlay.tsx
index 37ce2c08..da59d63c 100644
--- a/apps/web/src/components/editor/KeyboardShortcutsOverlay.tsx
+++ b/apps/web/src/components/editor/KeyboardShortcutsOverlay.tsx
@@ -207,7 +207,7 @@ export const KeyboardShortcutsOverlay: React.FC<
onClick={() => setActiveCategory("all")}
className={`px-3 py-1.5 rounded-lg text-xs font-medium whitespace-nowrap transition-colors ${
activeCategory === "all"
- ? "bg-primary text-black"
+ ? "bg-primary text-white"
: "text-text-secondary hover:text-text-primary hover:bg-background-tertiary"
}`}
>
@@ -219,7 +219,7 @@ export const KeyboardShortcutsOverlay: React.FC<
onClick={() => setActiveCategory(category)}
className={`px-3 py-1.5 rounded-lg text-xs font-medium whitespace-nowrap transition-colors ${
activeCategory === category
- ? "bg-primary text-black"
+ ? "bg-primary text-white"
: "text-text-secondary hover:text-text-primary hover:bg-background-tertiary"
}`}
>
diff --git a/apps/web/src/components/editor/OnboardingOverlay.tsx b/apps/web/src/components/editor/OnboardingOverlay.tsx
index 15542c4b..904c0984 100644
--- a/apps/web/src/components/editor/OnboardingOverlay.tsx
+++ b/apps/web/src/components/editor/OnboardingOverlay.tsx
@@ -8,7 +8,6 @@ import {
Wand2,
Download,
HelpCircle,
- Sparkles,
} from "lucide-react";
import { Dialog, DialogContent } from "@openreel/ui";
@@ -33,7 +32,7 @@ const ONBOARDING_STEPS: OnboardingStep[] = [
title: "Welcome to OpenReel",
description:
"A professional video editor right in your browser. Let's take a quick tour of the key features.",
- icon: <Sparkles size={32} className="text-primary" />,
+ icon: <Wand2 size={32} className="text-primary" />,
tips: [
"No installation required - everything runs in your browser",
"Your projects are saved locally and never leave your device",
@@ -201,7 +200,7 @@ export const OnboardingOverlay: React.FC<OnboardingOverlayProps> = ({
<button
onClick={handleNext}
- className="flex items-center gap-1 px-5 py-2 bg-primary text-black rounded-lg text-sm font-medium hover:bg-primary/80 transition-colors"
+ className="flex items-center gap-1 px-5 py-2 bg-primary text-white rounded-lg text-sm font-medium hover:bg-primary/80 transition-colors"
>
{isLastStep ? "Get Started" : "Next"}
{!isLastStep && <ChevronRight size={16} />}
diff --git a/apps/web/src/components/editor/Preview.tsx b/apps/web/src/components/editor/Preview.tsx
index e0aaa7bb..6e56875d 100644
--- a/apps/web/src/components/editor/Preview.tsx
+++ b/apps/web/src/components/editor/Preview.tsx
@@ -238,6 +238,9 @@ export const Preview: React.FC = () => {
// Throttle store updates during interaction (update at most every 32ms ~30fps)
const lastStoreUpdateRef = useRef<number>(0);
const STORE_UPDATE_THROTTLE_MS = 32;
+ // Throttle playhead updates during playback to reduce React re-renders
+ const lastPlayheadUpdateRef = useRef<number>(0);
+ const PLAYHEAD_UPDATE_THROTTLE_MS = 50;
// Live transform state for immediate visual feedback during interaction
const [liveTransform, setLiveTransform] = useState<{
position: { x: number; y: number };
@@ -1940,7 +1943,11 @@ export const Preview: React.FC = () => {
);
}
- setPlayheadPosition(currentPlayhead);
+ const nowNoClip = performance.now();
+ if (nowNoClip - lastPlayheadUpdateRef.current >= PLAYHEAD_UPDATE_THROTTLE_MS) {
+ lastPlayheadUpdateRef.current = nowNoClip;
+ setPlayheadPosition(currentPlayhead);
+ }
rafId = requestAnimationFrame(() => { drawFrame(); });
return;
}
@@ -1949,7 +1956,11 @@ export const Preview: React.FC = () => {
const cached = videoCache.get(clip.mediaId);
if (!cached) {
- setPlayheadPosition(currentPlayhead);
+ const nowNoCached = performance.now();
+ if (nowNoCached - lastPlayheadUpdateRef.current >= PLAYHEAD_UPDATE_THROTTLE_MS) {
+ lastPlayheadUpdateRef.current = nowNoCached;
+ setPlayheadPosition(currentPlayhead);
+ }
rafId = requestAnimationFrame(() => { drawFrame(); });
return;
}
@@ -2084,7 +2095,11 @@ export const Preview: React.FC = () => {
);
}
- setPlayheadPosition(currentPlayhead);
+ const nowPlayhead = performance.now();
+ if (nowPlayhead - lastPlayheadUpdateRef.current >= PLAYHEAD_UPDATE_THROTTLE_MS) {
+ lastPlayheadUpdateRef.current = nowPlayhead;
+ setPlayheadPosition(currentPlayhead);
+ }
// Schedule next frame using requestVideoFrameCallback for better sync with 4K
if (supportsVideoFrameCallback && currentVideo && !currentVideo.paused) {
@@ -2514,7 +2529,11 @@ export const Preview: React.FC = () => {
);
}
- setPlayheadPosition(currentPlayhead);
+ const nowPh = performance.now();
+ if (nowPh - lastPlayheadUpdateRef.current >= PLAYHEAD_UPDATE_THROTTLE_MS) {
+ lastPlayheadUpdateRef.current = nowPh;
+ setPlayheadPosition(currentPlayhead);
+ }
const now = performance.now();
const elapsed = now - lastFrameTimestamp;
@@ -3287,7 +3306,11 @@ export const Preview: React.FC = () => {
frameCount++;
masterClock.reportVideoTime(currentPlayhead);
- setPlayheadPosition(currentPlayhead);
+ const nowMulti = performance.now();
+ if (nowMulti - lastPlayheadUpdateRef.current >= PLAYHEAD_UPDATE_THROTTLE_MS) {
+ lastPlayheadUpdateRef.current = nowMulti;
+ setPlayheadPosition(currentPlayhead);
+ }
const now = performance.now();
const elapsed = now - lastFrameTimestamp;
diff --git a/apps/web/src/components/editor/SearchModal.tsx b/apps/web/src/components/editor/SearchModal.tsx
index 4f73e990..a4af8033 100644
--- a/apps/web/src/components/editor/SearchModal.tsx
+++ b/apps/web/src/components/editor/SearchModal.tsx
@@ -21,7 +21,6 @@ import {
Clock,
Eye,
Sliders,
- Sparkles,
} from "lucide-react";
import { Dialog, DialogContent, Input } from "@openreel/ui";
import { useUIStore } from "../../stores/ui-store";
@@ -180,7 +179,7 @@ const SEARCHABLE_EFFECTS: SearchItem[] = [
name: "Keyframes",
category: "Animation",
keywords: ["keyframe", "animate", "animation", "ease", "interpolate"],
- icon: Sparkles,
+ icon: Zap,
description: "Animate properties over time",
sectionId: "keyframes",
clipTypes: ["video", "image", "text", "shape"],
@@ -200,7 +199,7 @@ const SEARCHABLE_EFFECTS: SearchItem[] = [
name: "Motion Presets",
category: "Animation",
keywords: ["motion", "preset", "zoom", "pan", "shake", "bounce"],
- icon: Sparkles,
+ icon: Zap,
description: "Pre-built motion animations",
sectionId: "motion-presets",
clipTypes: ["video", "image"],
@@ -270,7 +269,7 @@ const CATEGORIES = [
{ id: "video", name: "Video", icon: Video },
{ id: "audio", name: "Audio", icon: Music2 },
{ id: "text", name: "Text", icon: Type },
- { id: "animation", name: "Animation", icon: Sparkles },
+ { id: "animation", name: "Animation", icon: Zap },
];
interface SearchModalProps {
@@ -451,7 +450,7 @@ export const SearchModal: React.FC<SearchModalProps> = ({
onClick={() => setSelectedCategory(cat.id)}
className={`px-3 py-1.5 rounded-lg text-[11px] font-medium transition-all ${
selectedCategory === cat.id
- ? "bg-primary text-black"
+ ? "bg-primary text-white"
: "text-text-secondary hover:text-text-primary hover:bg-background-elevated"
}`}
>
@@ -489,7 +488,7 @@ export const SearchModal: React.FC<SearchModalProps> = ({
<div
className={`p-2 rounded-lg ${
index === selectedIndex
- ? "bg-primary text-black"
+ ? "bg-primary text-white"
: "bg-background-tertiary text-text-secondary"
}`}
>
diff --git a/apps/web/src/components/editor/Toolbar.tsx b/apps/web/src/components/editor/Toolbar.tsx
index 43b076e5..22205126 100644
--- a/apps/web/src/components/editor/Toolbar.tsx
+++ b/apps/web/src/components/editor/Toolbar.tsx
@@ -14,7 +14,7 @@ import {
Check,
FileCode,
Settings,
- Sparkles,
+ Zap,
Circle,
History,
} from "lucide-react";
@@ -655,7 +655,7 @@ export const Toolbar: React.FC = () => {
}> = [
{
label: getRecommendedLabel(),
- icon: Sparkles,
+ icon: Zap,
desc: `${projectRes} H.264 - Best for your video`,
type: "mp4",
recommended: true,
@@ -1015,7 +1015,7 @@ export const Toolbar: React.FC = () => {
onClick={() => setIsExportDialogOpen(true)}
>
<div className="p-2 bg-primary/10 rounded-lg text-primary transition-colors">
- <Sparkles size={18} />
+ <Settings size={18} />
</div>
<div className="flex-1">
<div className="text-sm font-medium text-primary transition-colors">
diff --git a/apps/web/src/components/editor/inspector/AudioDuckingSection.tsx b/apps/web/src/components/editor/inspector/AudioDuckingSection.tsx
index 5daee7fa..e0cfecaf 100644
--- a/apps/web/src/components/editor/inspector/AudioDuckingSection.tsx
+++ b/apps/web/src/components/editor/inspector/AudioDuckingSection.tsx
@@ -135,8 +135,8 @@ export const AudioDuckingSection: React.FC<AudioDuckingSectionProps> = ({
return (
<div className="space-y-3">
- <div className="flex items-center gap-2 p-2 bg-gradient-to-r from-orange-500/20 to-amber-500/20 rounded-lg border border-orange-500/30">
- <VolumeX size={16} className="text-orange-400" />
+ <div className="flex items-center gap-2 p-2 bg-primary/10 rounded-lg border border-primary/30">
+ <VolumeX size={16} className="text-primary" />
<div className="flex-1">
<span className="text-[11px] font-medium text-text-primary">
Audio Ducking
@@ -370,7 +370,7 @@ export const AudioDuckingSection: React.FC<AudioDuckingSectionProps> = ({
{!isApplied ? (
<button
onClick={handleApplyDucking}
- className="w-full py-2.5 bg-orange-500/20 border border-orange-500/30 rounded-lg text-[11px] font-medium text-orange-400 hover:bg-orange-500/30 flex items-center justify-center gap-2 transition-colors"
+ className="w-full py-2.5 bg-primary hover:bg-primary-hover rounded-lg text-[11px] font-medium text-white flex items-center justify-center gap-2 transition-colors"
>
<VolumeX size={14} />
Apply Ducking
diff --git a/apps/web/src/components/editor/inspector/AutoCaptionPanel.tsx b/apps/web/src/components/editor/inspector/AutoCaptionPanel.tsx
index c7780dff..ada2695d 100644
--- a/apps/web/src/components/editor/inspector/AutoCaptionPanel.tsx
+++ b/apps/web/src/components/editor/inspector/AutoCaptionPanel.tsx
@@ -1,5 +1,5 @@
import React, { useState, useCallback, useMemo } from "react";
-import { Mic, MicOff, Languages, Sparkles, AlertCircle } from "lucide-react";
+import { Mic, MicOff, Languages, AlertCircle } from "lucide-react";
import { useEngineStore } from "../../../stores/engine-store";
import { useProjectStore } from "../../../stores/project-store";
import { SpeechToTextEngine } from "@openreel/core";
@@ -141,7 +141,7 @@ export const AutoCaptionPanel: React.FC = () => {
return (
<div className="space-y-4 w-full min-w-0 max-w-full">
<div className="flex items-center gap-2 p-2 bg-primary/10 rounded-lg border border-primary/30">
- <Sparkles size={16} className="text-primary" />
+ <Mic size={16} className="text-primary" />
<div>
<span className="text-[11px] font-medium text-text-primary">
Auto-Caption
@@ -233,7 +233,7 @@ export const AutoCaptionPanel: React.FC = () => {
</span>
<button
onClick={handleApplySegments}
- className="px-2 py-1 text-[10px] bg-primary text-black rounded hover:bg-primary/80 transition-colors"
+ className="px-2 py-1 text-[10px] bg-primary text-white rounded hover:bg-primary/80 transition-colors"
>
Add to Timeline
</button>
@@ -259,7 +259,7 @@ export const AutoCaptionPanel: React.FC = () => {
{!isTranscribing ? (
<button
onClick={handleStartTranscription}
- className="flex-1 flex items-center justify-center gap-2 px-4 py-2.5 bg-primary text-black rounded-lg hover:bg-primary/80 transition-colors"
+ className="flex-1 flex items-center justify-center gap-2 px-4 py-2.5 bg-primary text-white rounded-lg hover:bg-primary/80 transition-colors"
>
<Mic size={16} />
<span className="text-[11px] font-medium">Start Recording</span>
diff --git a/apps/web/src/components/editor/inspector/AutoCutSilenceSection.tsx b/apps/web/src/components/editor/inspector/AutoCutSilenceSection.tsx
new file mode 100644
index 00000000..6605633f
--- /dev/null
+++ b/apps/web/src/components/editor/inspector/AutoCutSilenceSection.tsx
@@ -0,0 +1,315 @@
+import React, { useState, useCallback } from "react";
+import { Scissors, Search, Loader2, Volume2 } from "lucide-react";
+import { Slider } from "@openreel/ui";
+import { useProjectStore } from "../../../stores/project-store";
+import {
+ getSilenceCutBridge,
+ DEFAULT_SILENCE_SETTINGS,
+ type SilenceSettings,
+ type SilenceAnalysisResult,
+} from "../../../bridges/silence-cut-bridge";
+import { toast } from "../../../stores/notification-store";
+
+interface AutoCutSilenceSectionProps {
+ clipId: string;
+}
+
+export const AutoCutSilenceSection: React.FC<AutoCutSilenceSectionProps> = ({
+ clipId,
+}) => {
+ const { getClip, getMediaItem } = useProjectStore();
+ const [settings, setSettings] = useState<SilenceSettings>(
+ DEFAULT_SILENCE_SETTINGS,
+ );
+ const [isAnalyzing, setIsAnalyzing] = useState(false);
+ const [isCutting, setIsCutting] = useState(false);
+ const [analysisResult, setAnalysisResult] =
+ useState<SilenceAnalysisResult | null>(null);
+ const [progress, setProgress] = useState(0);
+ const [progressMessage, setProgressMessage] = useState("");
+
+ const clip = getClip(clipId);
+ const mediaItem = clip ? getMediaItem(clip.mediaId) : undefined;
+ const hasAudio = mediaItem?.type === "audio" || mediaItem?.type === "video";
+
+ const updateSettings = useCallback((updates: Partial<SilenceSettings>) => {
+ setSettings((prev) => ({ ...prev, ...updates }));
+ setAnalysisResult(null);
+ }, []);
+
+ const handleAnalyze = useCallback(async () => {
+ if (!clipId) return;
+
+ setIsAnalyzing(true);
+ setProgress(0);
+ setProgressMessage("Initializing...");
+
+ try {
+ const bridge = getSilenceCutBridge();
+ const result = await bridge.analyzeClip(clipId, settings, (prog, msg) => {
+ setProgress(prog);
+ setProgressMessage(msg);
+ });
+
+ setAnalysisResult(result);
+
+ if (result.silentRegions.length === 0) {
+ toast.info(
+ "No Silence Detected",
+ "No silent sections found with current settings. Try lowering the threshold.",
+ );
+ }
+ } catch (error) {
+ console.error("Silence analysis failed:", error);
+ toast.error(
+ "Analysis Failed",
+ error instanceof Error ? error.message : "Unknown error",
+ );
+ } finally {
+ setIsAnalyzing(false);
+ }
+ }, [clipId, settings]);
+
+ const handleCutSilence = useCallback(async () => {
+ if (!analysisResult || analysisResult.silentRegions.length === 0) return;
+
+ setIsCutting(true);
+ setProgress(0);
+ setProgressMessage("Preparing...");
+
+ try {
+ const bridge = getSilenceCutBridge();
+ const result = await bridge.cutSilence(
+ clipId,
+ analysisResult.silentRegions,
+ (prog, msg) => {
+ setProgress(prog);
+ setProgressMessage(msg);
+ },
+ );
+
+ if (result.success) {
+ toast.success(
+ "Silence Removed",
+ `Removed ${analysisResult.silentRegions.length} silent section${analysisResult.silentRegions.length > 1 ? "s" : ""}`,
+ );
+ setAnalysisResult(null);
+ } else {
+ toast.error("Cut Failed", result.error ?? "Unknown error");
+ }
+ } catch (error) {
+ console.error("Cut silence failed:", error);
+ toast.error(
+ "Cut Failed",
+ error instanceof Error ? error.message : "Unknown error",
+ );
+ } finally {
+ setIsCutting(false);
+ }
+ }, [clipId, analysisResult]);
+
+ if (!hasAudio) {
+ return null;
+ }
+
+ return (
+ <div className="space-y-3">
+ <div className="flex items-center justify-between p-2 bg-primary/10 rounded-lg border border-primary/30">
+ <div className="flex items-center gap-2">
+ <Scissors size={16} className="text-primary" />
+ <div>
+ <span className="text-[11px] font-medium text-text-primary">
+ Auto Cut Silence
+ </span>
+ <p className="text-[9px] text-text-muted">
+ Remove silent sections automatically
+ </p>
+ </div>
+ </div>
+ </div>
+
+ <div className="space-y-3 p-3 bg-background-tertiary rounded-lg">
+ <div>
+ <div className="flex items-center justify-between mb-1">
+ <label className="text-[10px] text-text-secondary flex items-center gap-1">
+ <Volume2 size={10} />
+ Silence Threshold
+ </label>
+ <span className="text-[10px] text-text-muted font-mono">
+ {settings.threshold} dB
+ </span>
+ </div>
+ <Slider
+ min={-80}
+ max={-20}
+ step={1}
+ value={[settings.threshold]}
+ onValueChange={(value) => updateSettings({ threshold: value[0] })}
+ />
+ <p className="text-[8px] text-text-muted mt-1">
+ Lower values detect more silence
+ </p>
+ </div>
+
+ <div>
+ <div className="flex items-center justify-between mb-1">
+ <label className="text-[10px] text-text-secondary">
+ Min Duration
+ </label>
+ <span className="text-[10px] text-text-muted font-mono">
+ {settings.minSilenceDuration.toFixed(1)}s
+ </span>
+ </div>
+ <Slider
+ min={0.1}
+ max={2.0}
+ step={0.1}
+ value={[settings.minSilenceDuration]}
+ onValueChange={(value) =>
+ updateSettings({ minSilenceDuration: value[0] })
+ }
+ />
+ <p className="text-[8px] text-text-muted mt-1">
+ Minimum silence length to detect
+ </p>
+ </div>
+
+ <div className="grid grid-cols-2 gap-2">
+ <div>
+ <div className="flex items-center justify-between mb-1">
+ <label className="text-[10px] text-text-secondary">
+ Pad Before
+ </label>
+ <span className="text-[10px] text-text-muted font-mono">
+ {settings.paddingBefore.toFixed(1)}s
+ </span>
+ </div>
+ <Slider
+ min={0}
+ max={0.5}
+ step={0.05}
+ value={[settings.paddingBefore]}
+ onValueChange={(value) =>
+ updateSettings({ paddingBefore: value[0] })
+ }
+ />
+ </div>
+ <div>
+ <div className="flex items-center justify-between mb-1">
+ <label className="text-[10px] text-text-secondary">
+ Pad After
+ </label>
+ <span className="text-[10px] text-text-muted font-mono">
+ {settings.paddingAfter.toFixed(1)}s
+ </span>
+ </div>
+ <Slider
+ min={0}
+ max={0.5}
+ step={0.05}
+ value={[settings.paddingAfter]}
+ onValueChange={(value) =>
+ updateSettings({ paddingAfter: value[0] })
+ }
+ />
+ </div>
+ </div>
+
+ {analysisResult && (
+ <div className="p-2 bg-background-secondary rounded border border-primary/20">
+ <div className="flex items-center justify-between mb-1">
+ <span className="text-[10px] text-text-secondary">
+ Silent Sections Found
+ </span>
+ <span className="text-sm font-bold text-primary">
+ {analysisResult.silentRegions.length}
+ </span>
+ </div>
+ <div className="flex items-center justify-between">
+ <span className="text-[10px] text-text-secondary">
+ Total Silence
+ </span>
+ <span className="text-[10px] text-text-primary">
+ {analysisResult.totalSilenceDuration.toFixed(1)}s of{" "}
+ {analysisResult.clipDuration.toFixed(1)}s (
+ {Math.round(
+ (analysisResult.totalSilenceDuration /
+ analysisResult.clipDuration) *
+ 100,
+ )}
+ %)
+ </span>
+ </div>
+ </div>
+ )}
+
+ {(isAnalyzing || isCutting) && (
+ <div className="space-y-1">
+ <div className="flex items-center justify-between">
+ <span className="text-[9px] text-text-muted">
+ {progressMessage}
+ </span>
+ <span className="text-[9px] text-text-muted">{progress}%</span>
+ </div>
+ <div className="h-1 bg-background-secondary rounded-full overflow-hidden">
+ <div
+ className="h-full bg-primary transition-all duration-300"
+ style={{ width: `${progress}%` }}
+ />
+ </div>
+ </div>
+ )}
+
+ <div className="flex gap-2">
+ <button
+ onClick={handleAnalyze}
+ disabled={isAnalyzing || isCutting}
+ className={`flex-1 py-2 rounded text-[11px] font-medium transition-colors flex items-center justify-center gap-2 ${
+ analysisResult
+ ? "bg-background-secondary hover:bg-background-primary border border-border text-text-primary"
+ : "bg-primary hover:bg-primary-hover disabled:bg-primary/50 text-white"
+ }`}
+ >
+ {isAnalyzing ? (
+ <>
+ <Loader2 size={14} className="animate-spin" />
+ Analyzing...
+ </>
+ ) : (
+ <>
+ <Search size={14} />
+ {analysisResult ? "Re-analyze" : "Analyze"}
+ </>
+ )}
+ </button>
+
+ {analysisResult && analysisResult.silentRegions.length > 0 && (
+ <button
+ onClick={handleCutSilence}
+ disabled={isCutting}
+ className="flex-1 py-2 bg-primary hover:bg-primary-hover disabled:bg-primary/50 text-white rounded text-[11px] font-medium transition-colors flex items-center justify-center gap-2"
+ >
+ {isCutting ? (
+ <>
+ <Loader2 size={14} className="animate-spin" />
+ Cutting...
+ </>
+ ) : (
+ <>
+ <Scissors size={14} />
+ Cut {analysisResult.silentRegions.length}
+ </>
+ )}
+ </button>
+ )}
+ </div>
+
+ <p className="text-[9px] text-text-muted text-center">
+ Tip: Use Ctrl+Z to undo all cuts at once
+ </p>
+ </div>
+ </div>
+ );
+};
+
+export default AutoCutSilenceSection;
diff --git a/apps/web/src/components/editor/inspector/AutoReframeSection.tsx b/apps/web/src/components/editor/inspector/AutoReframeSection.tsx
index ecfa6cc0..32a16437 100644
--- a/apps/web/src/components/editor/inspector/AutoReframeSection.tsx
+++ b/apps/web/src/components/editor/inspector/AutoReframeSection.tsx
@@ -198,9 +198,9 @@ export const AutoReframeSection: React.FC<AutoReframeSectionProps> = ({
return (
<div className="space-y-3">
- <div className="flex items-center justify-between p-2 bg-gradient-to-r from-blue-500/20 to-cyan-500/20 rounded-lg border border-blue-500/30">
+ <div className="flex items-center justify-between p-2 bg-primary/10 rounded-lg border border-primary/30">
<div className="flex items-center gap-2">
- <Maximize2 size={16} className="text-blue-400" />
+ <Maximize2 size={16} className="text-primary" />
<div>
<span className="text-[11px] font-medium text-text-primary">
Auto Reframe
@@ -225,7 +225,7 @@ export const AutoReframeSection: React.FC<AutoReframeSectionProps> = ({
onClick={() => handleSelectPlatform(platform)}
className={`flex items-center gap-1 p-2 rounded text-[9px] transition-colors ${
selectedPlatform === platform
- ? "bg-blue-500/30 border border-blue-500 text-text-primary"
+ ? "bg-primary/20 border border-primary text-text-primary"
: "bg-background-secondary hover:bg-background-primary border border-transparent text-text-secondary"
}`}
>
@@ -253,7 +253,7 @@ export const AutoReframeSection: React.FC<AutoReframeSectionProps> = ({
className={`p-2 rounded text-[9px] transition-colors ${
reframeSettings.targetAspectRatio === ratio &&
!selectedPlatform
- ? "bg-blue-500/30 border border-blue-500 text-text-primary"
+ ? "bg-primary/20 border border-primary text-text-primary"
: "bg-background-secondary hover:bg-background-primary border border-transparent text-text-secondary"
}`}
>
@@ -337,7 +337,7 @@ export const AutoReframeSection: React.FC<AutoReframeSectionProps> = ({
}
className={`w-8 h-4 rounded-full transition-colors ${
reframeSettings.followSubject
- ? "bg-blue-500"
+ ? "bg-primary"
: "bg-background-secondary"
}`}
>
@@ -361,7 +361,7 @@ export const AutoReframeSection: React.FC<AutoReframeSectionProps> = ({
</div>
<div className="h-1 bg-background-secondary rounded-full overflow-hidden">
<div
- className="h-full bg-blue-500 transition-all duration-300"
+ className="h-full bg-primary transition-all duration-300"
style={{ width: `${progress}%` }}
/>
</div>
@@ -371,11 +371,7 @@ export const AutoReframeSection: React.FC<AutoReframeSectionProps> = ({
<button
onClick={handleAnalyze}
disabled={isInitializing || isProcessing}
- className={`w-full py-2 rounded text-[11px] font-medium transition-colors flex items-center justify-center gap-2 ${
- isApplied
- ? "bg-green-500 hover:bg-green-600 text-white"
- : "bg-blue-500 hover:bg-blue-600 disabled:bg-blue-500/50 text-white"
- }`}
+ className="w-full py-2 rounded text-[11px] font-medium transition-colors flex items-center justify-center gap-2 bg-primary hover:bg-primary-hover disabled:bg-primary/50 text-white"
>
{isInitializing || isProcessing ? (
<>
diff --git a/apps/web/src/components/editor/inspector/BackgroundRemovalSection.tsx b/apps/web/src/components/editor/inspector/BackgroundRemovalSection.tsx
index 8b6a9d09..199c0dab 100644
--- a/apps/web/src/components/editor/inspector/BackgroundRemovalSection.tsx
+++ b/apps/web/src/components/editor/inspector/BackgroundRemovalSection.tsx
@@ -3,7 +3,7 @@ import {
User,
ImageIcon,
Palette,
- Sparkles,
+ Droplets,
Loader2,
Info,
} from "lucide-react";
@@ -28,7 +28,7 @@ const BACKGROUND_MODES: {
label: string;
icon: React.ReactNode;
}[] = [
- { value: "blur", label: "Blur", icon: <Sparkles size={14} /> },
+ { value: "blur", label: "Blur", icon: <Droplets size={14} /> },
{ value: "color", label: "Color", icon: <Palette size={14} /> },
{ value: "image", label: "Image", icon: <ImageIcon size={14} /> },
{ value: "transparent", label: "Transparent", icon: <User size={14} /> },
@@ -150,9 +150,9 @@ export const BackgroundRemovalSection: React.FC<
return (
<div className="space-y-3">
- <div className="flex items-center justify-between p-2 bg-gradient-to-r from-purple-500/20 to-pink-500/20 rounded-lg border border-purple-500/30">
+ <div className="flex items-center justify-between p-2 bg-primary/10 rounded-lg border border-primary/30">
<div className="flex items-center gap-2">
- <User size={16} className="text-purple-400" />
+ <User size={16} className="text-primary" />
<div>
<span className="text-[11px] font-medium text-text-primary">
Background Removal
@@ -167,7 +167,7 @@ export const BackgroundRemovalSection: React.FC<
disabled={isInitializing || isProcessing}
className={`px-3 py-1 text-[10px] font-medium rounded transition-colors ${
settings.enabled
- ? "bg-purple-500 text-white"
+ ? "bg-primary text-white"
: "bg-background-tertiary text-text-secondary hover:bg-background-secondary"
}`}
>
@@ -194,7 +194,7 @@ export const BackgroundRemovalSection: React.FC<
onClick={() => updateSettings({ mode: mode.value })}
className={`flex flex-col items-center gap-1 p-2 rounded transition-colors ${
settings.mode === mode.value
- ? "bg-purple-500/30 border border-purple-500"
+ ? "bg-primary/20 border border-primary"
: "bg-background-secondary hover:bg-background-primary border border-transparent"
}`}
>
@@ -241,7 +241,7 @@ export const BackgroundRemovalSection: React.FC<
onClick={() => updateSettings({ backgroundColor: color })}
className={`w-6 h-6 rounded border-2 transition-all ${
settings.backgroundColor === color
- ? "border-purple-500 scale-110"
+ ? "border-primary scale-110"
: "border-transparent hover:scale-105"
}`}
style={{ backgroundColor: color }}
@@ -335,8 +335,8 @@ export const BackgroundRemovalSection: React.FC<
/>
</div>
- <div className="flex items-start gap-2 p-2 bg-blue-500/10 rounded border border-blue-500/20">
- <Info size={14} className="text-blue-400 flex-shrink-0 mt-0.5" />
+ <div className="flex items-start gap-2 p-2 bg-primary/10 rounded border border-primary/20">
+ <Info size={14} className="text-primary flex-shrink-0 mt-0.5" />
<p className="text-[9px] text-text-muted">
Background removal is processed in real-time. For best results,
export your video after previewing.
diff --git a/apps/web/src/components/editor/inspector/BeatSyncSection.tsx b/apps/web/src/components/editor/inspector/BeatSyncSection.tsx
index 9e8757ec..8b9a25e5 100644
--- a/apps/web/src/components/editor/inspector/BeatSyncSection.tsx
+++ b/apps/web/src/components/editor/inspector/BeatSyncSection.tsx
@@ -202,7 +202,7 @@ export const BeatSyncSection: React.FC<BeatSyncSectionProps> = ({ clipId }) => {
onClick={() => setManualBpm(bpm)}
className={`py-1.5 rounded text-[9px] transition-colors ${
manualBpm === bpm
- ? "bg-primary text-black"
+ ? "bg-primary text-white"
: "bg-background-secondary border border-border text-text-secondary hover:text-text-primary"
}`}
>
diff --git a/apps/web/src/components/editor/inspector/ClipTransitionSection.tsx b/apps/web/src/components/editor/inspector/ClipTransitionSection.tsx
index 52c56cee..19bd786e 100644
--- a/apps/web/src/components/editor/inspector/ClipTransitionSection.tsx
+++ b/apps/web/src/components/editor/inspector/ClipTransitionSection.tsx
@@ -7,7 +7,7 @@ import {
ZoomIn,
ZoomOut,
RotateCw,
- Sparkles,
+ Eye,
Circle,
Square,
Diamond,
@@ -63,7 +63,7 @@ const PRESETS: {
icon: React.ReactNode;
}[] = [
{ id: "none", label: "None", icon: null },
- { id: "fade", label: "Fade", icon: <Sparkles size={12} /> },
+ { id: "fade", label: "Fade", icon: <Eye size={12} /> },
{ id: "slide-left", label: "Slide Left", icon: <ArrowLeft size={12} /> },
{ id: "slide-right", label: "Slide Right", icon: <ArrowRight size={12} /> },
{ id: "slide-up", label: "Slide Up", icon: <ArrowUp size={12} /> },
@@ -1061,7 +1061,7 @@ export const ClipTransitionSection: React.FC<ClipTransitionSectionProps> = ({
onClick={() => setEntryPreset(preset.id)}
className={`flex items-center justify-center gap-1 py-1.5 px-2 rounded text-[9px] transition-all ${
entryPreset === preset.id
- ? "bg-primary text-black font-medium"
+ ? "bg-primary text-white font-medium"
: "bg-background-tertiary border border-border text-text-secondary hover:text-text-primary hover:border-text-muted"
}`}
>
@@ -1117,7 +1117,7 @@ export const ClipTransitionSection: React.FC<ClipTransitionSectionProps> = ({
onClick={() => setExitPreset(preset.id)}
className={`flex items-center justify-center gap-1 py-1.5 px-2 rounded text-[9px] transition-all ${
exitPreset === preset.id
- ? "bg-primary text-black font-medium"
+ ? "bg-primary text-white font-medium"
: "bg-background-tertiary border border-border text-text-secondary hover:text-text-primary hover:border-text-muted"
}`}
>
@@ -1164,7 +1164,7 @@ export const ClipTransitionSection: React.FC<ClipTransitionSectionProps> = ({
{/* Apply Button */}
<button
onClick={applyTransitions}
- className="w-full py-2 bg-primary hover:bg-primary-hover text-black font-medium rounded-lg text-[11px] transition-all"
+ className="w-full py-2 bg-primary hover:bg-primary-hover text-white font-medium rounded-lg text-[11px] transition-all"
>
Apply Transitions
</button>
diff --git a/apps/web/src/components/editor/inspector/CropSection.tsx b/apps/web/src/components/editor/inspector/CropSection.tsx
index 422e6aaf..302ef4de 100644
--- a/apps/web/src/components/editor/inspector/CropSection.tsx
+++ b/apps/web/src/components/editor/inspector/CropSection.tsx
@@ -30,7 +30,7 @@ export const CropSection: React.FC<CropSectionProps> = ({ clip }) => {
<div className="space-y-3">
<button
onClick={handleEnableCropMode}
- className="w-full py-2.5 bg-primary hover:bg-primary/90 text-black rounded-lg text-xs font-medium transition-colors flex items-center justify-center gap-2"
+ className="w-full py-2.5 bg-primary hover:bg-primary/90 text-white rounded-lg text-xs font-medium transition-colors flex items-center justify-center gap-2"
>
<Crop size={14} />
{isCropped ? "Adjust Crop" : "Crop Video"}
diff --git a/apps/web/src/components/editor/inspector/EmphasisAnimationSection.tsx b/apps/web/src/components/editor/inspector/EmphasisAnimationSection.tsx
index dd0e8127..ed87aa3e 100644
--- a/apps/web/src/components/editor/inspector/EmphasisAnimationSection.tsx
+++ b/apps/web/src/components/editor/inspector/EmphasisAnimationSection.tsx
@@ -256,7 +256,7 @@ export const EmphasisAnimationSection: React.FC<
onClick={() => handleTypeChange("none")}
className={`py-2 rounded-lg text-[10px] font-medium transition-all ${
currentAnimation.type === "none"
- ? "bg-primary text-black"
+ ? "bg-primary text-white"
: "bg-background-tertiary border border-border text-text-secondary hover:text-text-primary"
}`}
>
@@ -283,7 +283,7 @@ export const EmphasisAnimationSection: React.FC<
onClick={() => handleTypeChange(anim.type)}
className={`py-2 px-2 rounded-lg text-[10px] transition-all text-left ${
currentAnimation.type === anim.type
- ? "bg-primary text-black"
+ ? "bg-primary text-white"
: "bg-background-tertiary border border-border text-text-secondary hover:text-text-primary hover:border-primary/50"
}`}
>
@@ -563,7 +563,7 @@ export const EmphasisAnimationSection: React.FC<
className={`py-1.5 rounded text-[9px] transition-all ${
currentAnimation.focusPoint?.x === preset.x &&
currentAnimation.focusPoint?.y === preset.y
- ? "bg-primary text-black"
+ ? "bg-primary text-white"
: "bg-background-tertiary border border-border text-text-muted hover:text-text-primary"
}`}
>
diff --git a/apps/web/src/components/editor/inspector/FilterPresetsPanel.tsx b/apps/web/src/components/editor/inspector/FilterPresetsPanel.tsx
index 55591dba..cd3a97e8 100644
--- a/apps/web/src/components/editor/inspector/FilterPresetsPanel.tsx
+++ b/apps/web/src/components/editor/inspector/FilterPresetsPanel.tsx
@@ -1,5 +1,5 @@
import React, { useState, useCallback, useMemo } from "react";
-import { Film, Camera, Moon, Palette, Sparkles, Check } from "lucide-react";
+import { Film, Camera, Moon, Palette, Wand2, Check } from "lucide-react";
import { Slider } from "@openreel/ui";
import { useProjectStore } from "../../../stores/project-store";
import { useUIStore } from "../../../stores/ui-store";
@@ -17,7 +17,7 @@ const CATEGORY_ICONS: Record<string, React.ElementType> = {
vintage: Camera,
mood: Moon,
color: Palette,
- stylized: Sparkles,
+ stylized: Wand2,
};
interface PresetCardProps {
@@ -169,7 +169,7 @@ export const FilterPresetsPanel: React.FC<FilterPresetsPanelProps> = ({
onClick={() => setSelectedCategory(category.id as FilterCategory)}
className={`flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-[10px] whitespace-nowrap transition-colors ${
selectedCategory === category.id
- ? "bg-primary text-black font-medium"
+ ? "bg-primary text-white font-medium"
: "bg-background-tertiary text-text-secondary hover:text-text-primary"
}`}
>
diff --git a/apps/web/src/components/editor/inspector/GreenScreenSection.tsx b/apps/web/src/components/editor/inspector/GreenScreenSection.tsx
index 91060632..51d1fdc1 100644
--- a/apps/web/src/components/editor/inspector/GreenScreenSection.tsx
+++ b/apps/web/src/components/editor/inspector/GreenScreenSection.tsx
@@ -75,7 +75,7 @@ const ColorPresetButton: React.FC<{
onClick={onClick}
className={`flex items-center gap-1.5 px-2 py-1 rounded text-[9px] transition-colors ${
isActive
- ? "bg-primary text-black"
+ ? "bg-primary text-white"
: "bg-background-tertiary text-text-muted hover:text-text-primary"
}`}
>
@@ -255,7 +255,7 @@ export const GreenScreenSection: React.FC<GreenScreenSectionProps> = ({
onClick={() => setIsPickingColor(!isPickingColor)}
className={`p-1.5 rounded transition-colors ${
isPickingColor
- ? "bg-primary text-black"
+ ? "bg-primary text-white"
: "bg-background-tertiary text-text-muted hover:text-text-primary"
}`}
title="Pick color from video"
diff --git a/apps/web/src/components/editor/inspector/HistoryPanel.tsx b/apps/web/src/components/editor/inspector/HistoryPanel.tsx
index f47aa2d8..cfaec064 100644
--- a/apps/web/src/components/editor/inspector/HistoryPanel.tsx
+++ b/apps/web/src/components/editor/inspector/HistoryPanel.tsx
@@ -214,7 +214,7 @@ export const HistoryPanel: React.FC = () => {
/>
<button
onClick={handleCreateSnapshot}
- className="px-2 py-1 bg-primary text-black rounded text-xs hover:bg-primary/80 transition-colors"
+ className="px-2 py-1 bg-primary text-white rounded text-xs hover:bg-primary/80 transition-colors"
>
Save
</button>
diff --git a/apps/web/src/components/editor/inspector/MaskSection.tsx b/apps/web/src/components/editor/inspector/MaskSection.tsx
index 8cf86126..7e707c3a 100644
--- a/apps/web/src/components/editor/inspector/MaskSection.tsx
+++ b/apps/web/src/components/editor/inspector/MaskSection.tsx
@@ -357,8 +357,8 @@ export const MaskSection: React.FC<MaskSectionProps> = ({ clipId }) => {
return (
<div className="space-y-3">
- <div className="flex items-center gap-2 p-2 bg-gradient-to-r from-purple-500/20 to-blue-500/20 rounded-lg border border-purple-500/30">
- <Square size={16} className="text-purple-400" />
+ <div className="flex items-center gap-2 p-2 bg-gradient-to-r bg-primary/10 rounded-lg border border-primary/30">
+ <Square size={16} className="text-primary" />
<div className="flex-1">
<span className="text-[11px] font-medium text-text-primary">
Masking
diff --git a/apps/web/src/components/editor/inspector/MotionPresetsPanel.tsx b/apps/web/src/components/editor/inspector/MotionPresetsPanel.tsx
index 7b327a7f..2cc23ee1 100644
--- a/apps/web/src/components/editor/inspector/MotionPresetsPanel.tsx
+++ b/apps/web/src/components/editor/inspector/MotionPresetsPanel.tsx
@@ -6,7 +6,6 @@ import React, {
useRef,
} from "react";
import {
- Sparkles,
Play,
ArrowRight,
ArrowLeft,
@@ -270,7 +269,7 @@ const PresetCard: React.FC<PresetCardProps> = ({
ref={previewRef}
className="w-10 h-10 rounded bg-primary/80 flex items-center justify-center"
>
- <Play size={16} className="text-black" />
+ <Play size={16} className="text-white" />
</div>
{isApplied && (
<div className="absolute top-2 right-2">
@@ -516,7 +515,7 @@ export const MotionPresetsPanel: React.FC<MotionPresetsPanelProps> = ({
if (!targetClipId) {
return (
<div className="p-4 text-center">
- <Sparkles size={24} className="mx-auto mb-2 text-text-muted" />
+ <Zap size={24} className="mx-auto mb-2 text-text-muted" />
<p className="text-[10px] text-text-muted">
Select a clip to apply motion presets
</p>
@@ -527,7 +526,7 @@ export const MotionPresetsPanel: React.FC<MotionPresetsPanelProps> = ({
if (!clip) {
return (
<div className="p-4 text-center">
- <Sparkles size={24} className="mx-auto mb-2 text-text-muted" />
+ <Zap size={24} className="mx-auto mb-2 text-text-muted" />
<p className="text-[10px] text-text-muted">Clip not found</p>
</div>
);
@@ -535,8 +534,8 @@ export const MotionPresetsPanel: React.FC<MotionPresetsPanelProps> = ({
return (
<div className="space-y-4">
- <div className="flex items-center gap-2 p-2 bg-gradient-to-r from-violet-500/20 to-purple-500/20 rounded-lg border border-violet-500/30">
- <Sparkles size={16} className="text-violet-400" />
+ <div className="flex items-center gap-2 p-2 bg-primary/10 rounded-lg border border-primary/30">
+ <Zap size={16} className="text-primary" />
<div>
<span className="text-[11px] font-medium text-text-primary">
Motion Presets
@@ -601,7 +600,7 @@ export const MotionPresetsPanel: React.FC<MotionPresetsPanelProps> = ({
onClick={() => setSelectedCategory(category.id)}
className={`flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-[10px] whitespace-nowrap transition-colors relative ${
selectedCategory === category.id
- ? "bg-primary text-black font-medium"
+ ? "bg-primary text-white font-medium"
: "bg-background-tertiary text-text-secondary hover:text-text-primary"
}`}
>
diff --git a/apps/web/src/components/editor/inspector/MotionTrackingSection.tsx b/apps/web/src/components/editor/inspector/MotionTrackingSection.tsx
index ccc07dc5..f91c8504 100644
--- a/apps/web/src/components/editor/inspector/MotionTrackingSection.tsx
+++ b/apps/web/src/components/editor/inspector/MotionTrackingSection.tsx
@@ -149,8 +149,8 @@ export const MotionTrackingSection: React.FC<MotionTrackingSectionProps> = ({
return (
<div className="space-y-3">
- <div className="flex items-center gap-2 p-2 bg-gradient-to-r from-cyan-500/20 to-blue-500/20 rounded-lg border border-cyan-500/30">
- <Target size={16} className="text-cyan-400" />
+ <div className="flex items-center gap-2 p-2 bg-primary/10 rounded-lg border border-primary/30">
+ <Target size={16} className="text-primary" />
<div className="flex-1">
<span className="text-[11px] font-medium text-text-primary">
Motion Tracking
@@ -318,7 +318,7 @@ export const MotionTrackingSection: React.FC<MotionTrackingSectionProps> = ({
<button
onClick={handleStartTracking}
- className="w-full py-2.5 bg-cyan-500/20 border border-cyan-500/30 rounded-lg text-[11px] font-medium text-cyan-400 hover:bg-cyan-500/30 flex items-center justify-center gap-2 transition-colors"
+ className="w-full py-2.5 bg-primary hover:bg-primary-hover rounded-lg text-[11px] font-medium text-white flex items-center justify-center gap-2 transition-colors"
>
<Target size={14} />
Start Tracking
@@ -330,8 +330,8 @@ export const MotionTrackingSection: React.FC<MotionTrackingSectionProps> = ({
<div className="space-y-3 p-3 bg-background-tertiary rounded-lg">
<div className="flex items-center justify-between">
<div className="flex items-center gap-2">
- <div className="w-2 h-2 bg-cyan-400 rounded-full animate-pulse" />
- <span className="text-[11px] font-medium text-cyan-400">
+ <div className="w-2 h-2 bg-primary rounded-full animate-pulse" />
+ <span className="text-[11px] font-medium text-primary">
Tracking in Progress
</span>
</div>
@@ -353,7 +353,7 @@ export const MotionTrackingSection: React.FC<MotionTrackingSectionProps> = ({
</div>
<div className="w-full h-2 bg-background-secondary rounded-full overflow-hidden">
<div
- className="h-full bg-gradient-to-r from-cyan-500 to-blue-500 transition-all duration-200"
+ className="h-full bg-primary transition-all duration-200"
style={{ width: `${state.progress}%` }}
/>
</div>
diff --git a/apps/web/src/components/editor/inspector/MultiCameraPanel.tsx b/apps/web/src/components/editor/inspector/MultiCameraPanel.tsx
index ec4dc5d3..8acf50af 100644
--- a/apps/web/src/components/editor/inspector/MultiCameraPanel.tsx
+++ b/apps/web/src/components/editor/inspector/MultiCameraPanel.tsx
@@ -395,7 +395,7 @@ export const MultiCameraPanel: React.FC<MultiCameraPanelProps> = () => {
}`}
>
{selectedClips.includes(clip.id) && (
- <Check size={10} className="text-black" />
+ <Check size={10} className="text-white" />
)}
</div>
<div className="flex-1">
@@ -415,7 +415,7 @@ export const MultiCameraPanel: React.FC<MultiCameraPanelProps> = () => {
disabled={selectedClips.length < 2}
className={`w-full flex items-center justify-center gap-2 py-2 text-[10px] rounded-lg transition-colors ${
selectedClips.length >= 2
- ? "bg-primary text-black hover:bg-primary/90"
+ ? "bg-primary text-white hover:bg-primary/90"
: "bg-background-tertiary text-text-muted cursor-not-allowed"
}`}
>
diff --git a/apps/web/src/components/editor/inspector/MusicLibraryPanel.tsx b/apps/web/src/components/editor/inspector/MusicLibraryPanel.tsx
index 315eb1cb..2a13c3ce 100644
--- a/apps/web/src/components/editor/inspector/MusicLibraryPanel.tsx
+++ b/apps/web/src/components/editor/inspector/MusicLibraryPanel.tsx
@@ -55,7 +55,7 @@ const SoundCard: React.FC<SoundCardProps> = ({
onClick={isPlaying ? onStop : onPlay}
className={`w-8 h-8 rounded-full flex items-center justify-center transition-colors ${
isPlaying
- ? "bg-primary text-black"
+ ? "bg-primary text-white"
: "bg-background-secondary hover:bg-primary/20"
}`}
>
@@ -83,7 +83,7 @@ const SoundCard: React.FC<SoundCardProps> = ({
</div>
<button
onClick={onAdd}
- className="p-1.5 rounded-md bg-primary/20 hover:bg-primary text-primary hover:text-black transition-colors"
+ className="p-1.5 rounded-md bg-primary/20 hover:bg-primary text-primary hover:text-white transition-colors"
title="Add to timeline"
>
<Plus size={14} />
@@ -274,7 +274,7 @@ export const MusicLibraryPanel: React.FC = () => {
onClick={() => setActiveTab("music")}
className={`flex-1 flex items-center justify-center gap-1.5 px-3 py-2 rounded-lg text-[10px] transition-colors ${
activeTab === "music"
- ? "bg-primary text-black font-medium"
+ ? "bg-primary text-white font-medium"
: "bg-background-tertiary text-text-secondary hover:text-text-primary"
}`}
>
@@ -285,7 +285,7 @@ export const MusicLibraryPanel: React.FC = () => {
onClick={() => setActiveTab("sfx")}
className={`flex-1 flex items-center justify-center gap-1.5 px-3 py-2 rounded-lg text-[10px] transition-colors ${
activeTab === "sfx"
- ? "bg-primary text-black font-medium"
+ ? "bg-primary text-white font-medium"
: "bg-background-tertiary text-text-secondary hover:text-text-primary"
}`}
>
@@ -314,7 +314,7 @@ export const MusicLibraryPanel: React.FC = () => {
onClick={() => setSelectedGenre("all")}
className={`px-2 py-1 rounded text-[9px] whitespace-nowrap transition-colors ${
selectedGenre === "all"
- ? "bg-primary text-black"
+ ? "bg-primary text-white"
: "bg-background-tertiary text-text-muted hover:text-text-primary"
}`}
>
@@ -326,7 +326,7 @@ export const MusicLibraryPanel: React.FC = () => {
onClick={() => setSelectedGenre(genre.id)}
className={`px-2 py-1 rounded text-[9px] whitespace-nowrap transition-colors ${
selectedGenre === genre.id
- ? "bg-primary text-black"
+ ? "bg-primary text-white"
: "bg-background-tertiary text-text-muted hover:text-text-primary"
}`}
>
@@ -342,7 +342,7 @@ export const MusicLibraryPanel: React.FC = () => {
onClick={() => setSelectedSfxCategory("all")}
className={`px-2 py-1 rounded text-[9px] whitespace-nowrap transition-colors ${
selectedSfxCategory === "all"
- ? "bg-primary text-black"
+ ? "bg-primary text-white"
: "bg-background-tertiary text-text-muted hover:text-text-primary"
}`}
>
@@ -354,7 +354,7 @@ export const MusicLibraryPanel: React.FC = () => {
onClick={() => setSelectedSfxCategory(cat.id)}
className={`px-2 py-1 rounded text-[9px] whitespace-nowrap transition-colors ${
selectedSfxCategory === cat.id
- ? "bg-primary text-black"
+ ? "bg-primary text-white"
: "bg-background-tertiary text-text-muted hover:text-text-primary"
}`}
>
@@ -372,7 +372,7 @@ export const MusicLibraryPanel: React.FC = () => {
onClick={() => toggleMood(mood.id)}
className={`px-2 py-0.5 rounded-full text-[8px] transition-colors ${
selectedMoods.includes(mood.id)
- ? "bg-primary text-black"
+ ? "bg-primary text-white"
: "bg-background-secondary text-text-muted hover:text-text-primary"
}`}
>
diff --git a/apps/web/src/components/editor/inspector/NestedSequenceSection.tsx b/apps/web/src/components/editor/inspector/NestedSequenceSection.tsx
index 877a9763..5ef0dfe6 100644
--- a/apps/web/src/components/editor/inspector/NestedSequenceSection.tsx
+++ b/apps/web/src/components/editor/inspector/NestedSequenceSection.tsx
@@ -185,8 +185,8 @@ export const NestedSequenceSection: React.FC<NestedSequenceSectionProps> = ({
return (
<div className="space-y-3">
- <div className="flex items-center gap-2 p-2 bg-gradient-to-r from-purple-500/20 to-indigo-500/20 rounded-lg border border-purple-500/30">
- <Layers size={16} className="text-purple-400" />
+ <div className="flex items-center gap-2 p-2 bg-gradient-to-r bg-primary/10 rounded-lg border border-primary/30">
+ <Layers size={16} className="text-primary" />
<div className="flex-1">
<span className="text-[11px] font-medium text-text-primary">
Nested Sequences
@@ -198,9 +198,9 @@ export const NestedSequenceSection: React.FC<NestedSequenceSectionProps> = ({
</div>
{currentCompound && (
- <div className="p-3 bg-purple-500/10 border border-purple-500/20 rounded-lg space-y-2">
+ <div className="p-3 bg-primary/10 border border-primary/20 rounded-lg space-y-2">
<div className="flex items-center gap-2">
- <FolderOpen size={14} className="text-purple-400" />
+ <FolderOpen size={14} className="text-primary" />
<span className="text-[11px] font-medium text-text-primary">
{currentCompound.name}
</span>
@@ -243,7 +243,7 @@ export const NestedSequenceSection: React.FC<NestedSequenceSectionProps> = ({
disabled={selectedClips.length < 2}
className={`w-full py-2.5 rounded-lg text-[11px] font-medium flex items-center justify-center gap-2 transition-colors ${
selectedClips.length >= 2
- ? "bg-purple-500/20 border border-purple-500/30 text-purple-400 hover:bg-purple-500/30"
+ ? "bg-primary/20 border border-primary/30 text-primary hover:bg-primary/20"
: "bg-background-tertiary text-text-muted cursor-not-allowed"
}`}
>
diff --git a/apps/web/src/components/editor/inspector/PhotoLayersSection.tsx b/apps/web/src/components/editor/inspector/PhotoLayersSection.tsx
index ea97c728..fcf1c446 100644
--- a/apps/web/src/components/editor/inspector/PhotoLayersSection.tsx
+++ b/apps/web/src/components/editor/inspector/PhotoLayersSection.tsx
@@ -261,7 +261,7 @@ export const PhotoLayersSection: React.FC<PhotoLayersSectionProps> = ({
<p className="text-[10px] text-text-muted">No layers</p>
<button
onClick={onAddLayer}
- className="mt-2 px-3 py-1.5 text-[10px] bg-primary text-black rounded hover:bg-primary/90 transition-colors"
+ className="mt-2 px-3 py-1.5 text-[10px] bg-primary text-white rounded hover:bg-primary/90 transition-colors"
>
Add Layer
</button>
diff --git a/apps/web/src/components/editor/inspector/PiPSection.tsx b/apps/web/src/components/editor/inspector/PiPSection.tsx
index 4e7c2574..a1126662 100644
--- a/apps/web/src/components/editor/inspector/PiPSection.tsx
+++ b/apps/web/src/components/editor/inspector/PiPSection.tsx
@@ -344,8 +344,8 @@ export const PiPSection: React.FC<PiPSectionProps> = ({ clipId }) => {
return (
<div className="space-y-3">
- <div className="flex items-center gap-2 p-2 bg-gradient-to-r from-blue-500/20 to-indigo-500/20 rounded-lg border border-blue-500/30">
- <PictureInPicture2 size={16} className="text-blue-400" />
+ <div className="flex items-center gap-2 p-2 bg-gradient-to-r bg-primary/10 rounded-lg border border-primary/30">
+ <PictureInPicture2 size={16} className="text-primary" />
<div className="flex-1">
<span className="text-[11px] font-medium text-text-primary">
Picture-in-Picture
diff --git a/apps/web/src/components/editor/inspector/RetouchingSection.tsx b/apps/web/src/components/editor/inspector/RetouchingSection.tsx
index 26c46aa6..93512105 100644
--- a/apps/web/src/components/editor/inspector/RetouchingSection.tsx
+++ b/apps/web/src/components/editor/inspector/RetouchingSection.tsx
@@ -39,7 +39,7 @@ const ToolButton: React.FC<{
<div
className={`p-2 rounded-lg ${
isActive
- ? "bg-primary text-black"
+ ? "bg-primary text-white"
: "bg-background-secondary text-text-secondary"
}`}
>
diff --git a/apps/web/src/components/editor/inspector/SVGSection.tsx b/apps/web/src/components/editor/inspector/SVGSection.tsx
index f42fe969..4e6a15fc 100644
--- a/apps/web/src/components/editor/inspector/SVGSection.tsx
+++ b/apps/web/src/components/editor/inspector/SVGSection.tsx
@@ -171,7 +171,7 @@ export const SVGSection: React.FC<SVGSectionProps> = ({ clipId }) => {
onClick={() => handleColorModeChange(mode)}
className={`px-2 py-1 text-[9px] rounded capitalize transition-colors ${
colorStyle.colorMode === mode
- ? "bg-primary text-black"
+ ? "bg-primary text-white"
: "bg-background-tertiary border border-border text-text-secondary hover:text-text-primary"
}`}
>
diff --git a/apps/web/src/components/editor/inspector/SceneNavigatorPanel.tsx b/apps/web/src/components/editor/inspector/SceneNavigatorPanel.tsx
index 99f21b97..d05c1d0e 100644
--- a/apps/web/src/components/editor/inspector/SceneNavigatorPanel.tsx
+++ b/apps/web/src/components/editor/inspector/SceneNavigatorPanel.tsx
@@ -160,7 +160,7 @@ export const SceneNavigatorPanel: React.FC<SceneNavigatorPanelProps> = ({
</div>
<button
onClick={handleAddScene}
- className="flex items-center gap-1 px-2 py-1 bg-primary hover:bg-primary/80 text-black rounded text-[10px] font-medium transition-colors"
+ className="flex items-center gap-1 px-2 py-1 bg-primary hover:bg-primary/80 text-white rounded text-[10px] font-medium transition-colors"
>
<Plus size={10} />
Add
@@ -185,7 +185,7 @@ export const SceneNavigatorPanel: React.FC<SceneNavigatorPanelProps> = ({
onClick={() => handleSceneClick(index)}
className={`group relative flex items-center gap-1 px-2 py-1 rounded transition-all ${
isActive
- ? "bg-primary text-black"
+ ? "bg-primary text-white"
: "bg-background-tertiary hover:bg-background-secondary text-text-secondary hover:text-text-primary"
}`}
title={scene.label}
@@ -240,7 +240,7 @@ export const SceneNavigatorPanel: React.FC<SceneNavigatorPanelProps> = ({
</div>
<button
onClick={handleAddScene}
- className="flex items-center gap-1 px-2 py-1 bg-primary hover:bg-primary/80 text-black rounded text-[10px] font-medium transition-colors"
+ className="flex items-center gap-1 px-2 py-1 bg-primary hover:bg-primary/80 text-white rounded text-[10px] font-medium transition-colors"
>
<Plus size={10} />
Add Scene
@@ -265,7 +265,7 @@ export const SceneNavigatorPanel: React.FC<SceneNavigatorPanelProps> = ({
<div
className={`flex-shrink-0 w-6 h-6 rounded flex items-center justify-center text-[10px] font-medium ${
isActive
- ? "bg-primary text-black"
+ ? "bg-primary text-white"
: "bg-background-tertiary text-text-muted"
}`}
>
diff --git a/apps/web/src/components/editor/inspector/ScopesPanel.tsx b/apps/web/src/components/editor/inspector/ScopesPanel.tsx
index 3bfcfd44..651d947b 100644
--- a/apps/web/src/components/editor/inspector/ScopesPanel.tsx
+++ b/apps/web/src/components/editor/inspector/ScopesPanel.tsx
@@ -45,7 +45,7 @@ const ViewToggleButton: React.FC<{
onClick={onClick}
className={`flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-[10px] font-medium transition-colors ${
active
- ? "bg-primary text-black"
+ ? "bg-primary text-white"
: "bg-background-tertiary border border-border text-text-secondary hover:text-text-primary"
}`}
title={label}
diff --git a/apps/web/src/components/editor/inspector/ShapeSection.tsx b/apps/web/src/components/editor/inspector/ShapeSection.tsx
index 5aef261f..4e41870d 100644
--- a/apps/web/src/components/editor/inspector/ShapeSection.tsx
+++ b/apps/web/src/components/editor/inspector/ShapeSection.tsx
@@ -79,7 +79,7 @@ const StrokeStyleSelector: React.FC<{
className={`px-2 py-1 text-[9px] rounded transition-colors ${
(style.value === undefined && value === undefined) ||
(style.value && value && style.value[0] === value[0])
- ? "bg-primary text-black"
+ ? "bg-primary text-white"
: "bg-background-tertiary border border-border text-text-secondary hover:text-text-primary"
}`}
title={style.label}
diff --git a/apps/web/src/components/editor/inspector/SpeedRampSection.tsx b/apps/web/src/components/editor/inspector/SpeedRampSection.tsx
index ca770a08..b960eb56 100644
--- a/apps/web/src/components/editor/inspector/SpeedRampSection.tsx
+++ b/apps/web/src/components/editor/inspector/SpeedRampSection.tsx
@@ -400,8 +400,8 @@ export const SpeedRampSection: React.FC<SpeedRampSectionProps> = ({ clip }) => {
onClick={handleReverseToggle}
className={`flex-1 flex items-center justify-center gap-1.5 py-2 text-[10px] rounded-lg border transition-colors ${
isReverse
- ? "bg-orange-500/20 border-orange-500 text-orange-400"
- : "bg-background-tertiary border-border text-text-secondary hover:border-orange-500/50"
+ ? "bg-primary/20 border-primary text-primary"
+ : "bg-background-tertiary border-border text-text-secondary hover:border-primary/50"
}`}
>
<RotateCcw size={12} />
@@ -476,7 +476,7 @@ export const SpeedRampSection: React.FC<SpeedRampSectionProps> = ({ clip }) => {
{isExpanded ? <ChevronDown size={12} /> : <ChevronRight size={12} />}
<span className="font-medium">Freeze Frames</span>
{freezeFrames.length > 0 && (
- <span className="ml-auto text-[9px] text-cyan-400">
+ <span className="ml-auto text-[9px] text-primary">
{freezeFrames.length} freeze
</span>
)}
@@ -486,7 +486,7 @@ export const SpeedRampSection: React.FC<SpeedRampSectionProps> = ({ clip }) => {
<div className="space-y-2">
<button
onClick={handleCreateFreezeFrame}
- className="w-full flex items-center justify-center gap-1.5 py-2 text-[10px] bg-cyan-500/20 border border-cyan-500/30 text-cyan-400 rounded-lg hover:bg-cyan-500/30 transition-colors"
+ className="w-full flex items-center justify-center gap-1.5 py-2 text-[10px] bg-primary/20 border border-primary/30 text-primary rounded-lg hover:bg-primary/20 transition-colors"
>
<Pause size={12} />
Add Freeze Frame at Playhead
@@ -499,12 +499,12 @@ export const SpeedRampSection: React.FC<SpeedRampSectionProps> = ({ clip }) => {
key={ff.id}
className="flex items-center gap-2 p-1.5 bg-background-tertiary rounded text-[9px]"
>
- <Pause size={10} className="text-cyan-400" />
+ <Pause size={10} className="text-primary" />
<span className="text-text-secondary">
{ff.startTime.toFixed(2)}s
</span>
<span className="text-text-muted">for</span>
- <span className="text-cyan-400 font-mono">
+ <span className="text-primary font-mono">
{ff.duration.toFixed(1)}s
</span>
<button
diff --git a/apps/web/src/components/editor/inspector/StickerPicker.tsx b/apps/web/src/components/editor/inspector/StickerPicker.tsx
index bac0b486..6eb4006b 100644
--- a/apps/web/src/components/editor/inspector/StickerPicker.tsx
+++ b/apps/web/src/components/editor/inspector/StickerPicker.tsx
@@ -29,7 +29,7 @@ const CategoryTab: React.FC<{
px-3 py-1.5 text-[10px] rounded-lg whitespace-nowrap transition-colors
${
isActive
- ? "bg-primary text-black font-medium"
+ ? "bg-primary text-white font-medium"
: "bg-background-tertiary text-text-secondary hover:text-text-primary hover:bg-background-secondary"
}
`}
diff --git a/apps/web/src/components/editor/inspector/StickerPickerPanel.tsx b/apps/web/src/components/editor/inspector/StickerPickerPanel.tsx
index 4546d341..03c5eab1 100644
--- a/apps/web/src/components/editor/inspector/StickerPickerPanel.tsx
+++ b/apps/web/src/components/editor/inspector/StickerPickerPanel.tsx
@@ -140,7 +140,7 @@ export const StickerPickerPanel: React.FC = () => {
return (
<div className="space-y-3">
<div className="flex items-center gap-2 p-2 bg-gradient-to-r from-pink-500/20 to-rose-500/20 rounded-lg border border-pink-500/30">
- <Smile size={16} className="text-pink-400" />
+ <Smile size={16} className="text-primary" />
<div>
<span className="text-[11px] font-medium text-text-primary">
Stickers & Emojis
@@ -156,7 +156,7 @@ export const StickerPickerPanel: React.FC = () => {
onClick={() => setActiveTab("emojis")}
className={`flex-1 flex items-center justify-center gap-1.5 px-3 py-2 rounded-lg text-[10px] transition-colors ${
activeTab === "emojis"
- ? "bg-primary text-black font-medium"
+ ? "bg-primary text-white font-medium"
: "bg-background-tertiary text-text-secondary hover:text-text-primary"
}`}
>
@@ -167,7 +167,7 @@ export const StickerPickerPanel: React.FC = () => {
onClick={() => setActiveTab("stickers")}
className={`flex-1 flex items-center justify-center gap-1.5 px-3 py-2 rounded-lg text-[10px] transition-colors ${
activeTab === "stickers"
- ? "bg-primary text-black font-medium"
+ ? "bg-primary text-white font-medium"
: "bg-background-tertiary text-text-secondary hover:text-text-primary"
}`}
>
@@ -200,7 +200,7 @@ export const StickerPickerPanel: React.FC = () => {
onClick={() => setSelectedCategory(cat.id)}
className={`px-2 py-1 rounded text-[9px] whitespace-nowrap transition-colors flex items-center gap-1 ${
selectedCategory === cat.id
- ? "bg-primary text-black"
+ ? "bg-primary text-white"
: "bg-background-tertiary text-text-muted hover:text-text-primary"
}`}
>
@@ -221,7 +221,7 @@ export const StickerPickerPanel: React.FC = () => {
onClick={() => setSelectedCategory(cat.id)}
className={`px-2 py-1 rounded text-[9px] whitespace-nowrap transition-colors ${
selectedCategory === cat.id
- ? "bg-primary text-black"
+ ? "bg-primary text-white"
: "bg-background-tertiary text-text-muted hover:text-text-primary"
}`}
>
diff --git a/apps/web/src/components/editor/inspector/TemplateVariablesPanel.tsx b/apps/web/src/components/editor/inspector/TemplateVariablesPanel.tsx
index 1fb49b14..91000a37 100644
--- a/apps/web/src/components/editor/inspector/TemplateVariablesPanel.tsx
+++ b/apps/web/src/components/editor/inspector/TemplateVariablesPanel.tsx
@@ -57,7 +57,7 @@ const TextPlaceholderInput: React.FC<PlaceholderInputProps> = ({
<div className="space-y-2">
<div className="flex items-center justify-between">
<div className="flex items-center gap-2">
- <Type size={12} className="text-blue-400" />
+ <Type size={12} className="text-primary" />
<span className="text-[11px] font-medium text-text-primary">
{placeholder.label}
</span>
@@ -143,7 +143,7 @@ const MediaPlaceholderInput: React.FC<PlaceholderInputProps> = ({
{allowedTypes.includes("video") ? (
<Video size={12} className="text-green-400" />
) : (
- <Image size={12} className="text-purple-400" />
+ <Image size={12} className="text-primary" />
)}
<span className="text-[11px] font-medium text-text-primary">
{placeholder.label}
@@ -204,7 +204,7 @@ const MediaPlaceholderInput: React.FC<PlaceholderInputProps> = ({
)}
{selectedMediaId === media.id && (
<div className="absolute top-1 right-1 w-4 h-4 bg-primary rounded-full flex items-center justify-center">
- <Check size={10} className="text-black" />
+ <Check size={10} className="text-white" />
</div>
)}
</button>
@@ -425,7 +425,7 @@ export const TemplateVariablesPanel: React.FC<TemplateVariablesPanelProps> = ({
disabled={!canApply}
className={`w-full py-2 rounded-lg text-[11px] font-medium transition-all ${
canApply
- ? "bg-primary text-black hover:bg-primary/90"
+ ? "bg-primary text-white hover:bg-primary/90"
: "bg-background-tertiary text-text-muted cursor-not-allowed"
}`}
>
diff --git a/apps/web/src/components/editor/inspector/TemplatesBrowserPanel.tsx b/apps/web/src/components/editor/inspector/TemplatesBrowserPanel.tsx
index 7c0d7181..19520644 100644
--- a/apps/web/src/components/editor/inspector/TemplatesBrowserPanel.tsx
+++ b/apps/web/src/components/editor/inspector/TemplatesBrowserPanel.tsx
@@ -70,7 +70,7 @@ const TemplateCard: React.FC<TemplateCardProps> = ({
<div className="flex items-start gap-3 w-full">
<div
className={`w-10 h-10 shrink-0 rounded-lg flex items-center justify-center ${
- isSelected ? "bg-primary text-black" : "bg-background-secondary"
+ isSelected ? "bg-primary text-white" : "bg-background-secondary"
}`}
>
<Icon size={18} />
@@ -110,7 +110,7 @@ const TemplateCard: React.FC<TemplateCardProps> = ({
e.stopPropagation();
onApply();
}}
- className="mt-3 w-full py-1.5 text-[10px] font-medium bg-primary text-black rounded-md hover:bg-primary/90 transition-colors"
+ className="mt-3 w-full py-1.5 text-[10px] font-medium bg-primary text-white rounded-md hover:bg-primary/90 transition-colors"
>
Use This Template
</button>
@@ -381,7 +381,7 @@ export const TemplatesBrowserPanel: React.FC<TemplatesBrowserPanelProps> = ({
onClick={() => setSelectedCategory("all")}
className={`shrink-0 px-3 py-1.5 rounded-lg text-[10px] whitespace-nowrap transition-colors ${
selectedCategory === "all"
- ? "bg-primary text-black font-medium"
+ ? "bg-primary text-white font-medium"
: "bg-background-tertiary text-text-secondary hover:text-text-primary"
}`}
>
@@ -395,7 +395,7 @@ export const TemplatesBrowserPanel: React.FC<TemplatesBrowserPanelProps> = ({
onClick={() => setSelectedCategory(category.id)}
className={`shrink-0 flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-[10px] whitespace-nowrap transition-colors ${
selectedCategory === category.id
- ? "bg-primary text-black font-medium"
+ ? "bg-primary text-white font-medium"
: "bg-background-tertiary text-text-secondary hover:text-text-primary"
}`}
>
diff --git a/apps/web/src/components/editor/inspector/TextAnimationSection.tsx b/apps/web/src/components/editor/inspector/TextAnimationSection.tsx
index f241e4fb..2e59fb4b 100644
--- a/apps/web/src/components/editor/inspector/TextAnimationSection.tsx
+++ b/apps/web/src/components/editor/inspector/TextAnimationSection.tsx
@@ -1,5 +1,5 @@
import React, { useCallback } from "react";
-import { Sparkles, Clock, Play } from "lucide-react";
+import { Type, Clock, Play } from "lucide-react";
import { useProjectStore } from "../../../stores/project-store";
import type { TextAnimationPreset, TextAnimationParams } from "@openreel/core";
import {
@@ -186,7 +186,7 @@ export const TextAnimationSection: React.FC<TextAnimationSectionProps> = ({
if (!textClip) {
return (
<div className="p-4 text-center">
- <Sparkles size={24} className="mx-auto mb-2 text-text-muted" />
+ <Type size={24} className="mx-auto mb-2 text-text-muted" />
<p className="text-[10px] text-text-muted">No text clip selected</p>
</div>
);
diff --git a/apps/web/src/components/editor/inspector/TextSection.tsx b/apps/web/src/components/editor/inspector/TextSection.tsx
index f80867d9..0d78b726 100644
--- a/apps/web/src/components/editor/inspector/TextSection.tsx
+++ b/apps/web/src/components/editor/inspector/TextSection.tsx
@@ -82,7 +82,7 @@ const ToggleButtonGroup: React.FC<{
onClick={() => onChange(option.value)}
className={`p-1.5 rounded transition-colors ${
value === option.value
- ? "bg-primary text-black"
+ ? "bg-primary text-white"
: "bg-background-tertiary border border-border text-text-secondary hover:text-text-primary"
}`}
title={option.label}
@@ -315,7 +315,7 @@ export const TextSection: React.FC<TextSectionProps> = ({ clipId }) => {
}
className={`p-1.5 rounded transition-colors ${
style.fontWeight === "bold"
- ? "bg-primary text-black"
+ ? "bg-primary text-white"
: "bg-background-secondary border border-border text-text-secondary hover:text-text-primary"
}`}
title="Bold"
@@ -330,7 +330,7 @@ export const TextSection: React.FC<TextSectionProps> = ({ clipId }) => {
}
className={`p-1.5 rounded transition-colors ${
style.fontStyle === "italic"
- ? "bg-primary text-black"
+ ? "bg-primary text-white"
: "bg-background-secondary border border-border text-text-secondary hover:text-text-primary"
}`}
title="Italic"
@@ -346,7 +346,7 @@ export const TextSection: React.FC<TextSectionProps> = ({ clipId }) => {
}
className={`p-1.5 rounded transition-colors ${
style.textDecoration === "underline"
- ? "bg-primary text-black"
+ ? "bg-primary text-white"
: "bg-background-secondary border border-border text-text-secondary hover:text-text-primary"
}`}
title="Underline"
@@ -401,7 +401,7 @@ export const TextSection: React.FC<TextSectionProps> = ({ clipId }) => {
</button>
<button
onClick={handleCenterBoth}
- className="p-1.5 rounded bg-primary text-black transition-colors"
+ className="p-1.5 rounded bg-primary text-white transition-colors"
title="Center Both"
>
<Crosshair size={12} />
diff --git a/apps/web/src/components/editor/inspector/TextToSpeechPanel.tsx b/apps/web/src/components/editor/inspector/TextToSpeechPanel.tsx
index 876d0e9f..a9663fdd 100644
--- a/apps/web/src/components/editor/inspector/TextToSpeechPanel.tsx
+++ b/apps/web/src/components/editor/inspector/TextToSpeechPanel.tsx
@@ -241,7 +241,7 @@ export const TextToSpeechPanel: React.FC = () => {
onClick={() => setSelectedVoice(voice.id)}
className={`flex-1 flex items-center justify-center gap-2 px-3 py-2 rounded-lg text-[10px] transition-colors ${
selectedVoice === voice.id
- ? "bg-primary text-black font-medium"
+ ? "bg-primary text-white font-medium"
: "bg-background-tertiary text-text-secondary hover:text-text-primary border border-border"
}`}
>
@@ -285,7 +285,7 @@ export const TextToSpeechPanel: React.FC = () => {
<button
onClick={generateSpeech}
disabled={isGenerating || !text.trim()}
- className="w-full flex items-center justify-center gap-2 px-4 py-2.5 bg-primary text-black rounded-lg text-[11px] font-medium transition-all hover:bg-primary-hover disabled:opacity-50 disabled:cursor-not-allowed"
+ className="w-full flex items-center justify-center gap-2 px-4 py-2.5 bg-primary text-white rounded-lg text-[11px] font-medium transition-all hover:bg-primary-hover disabled:opacity-50 disabled:cursor-not-allowed"
>
{isGenerating ? (
<>
@@ -318,7 +318,7 @@ export const TextToSpeechPanel: React.FC = () => {
</div>
<button
onClick={togglePlayback}
- className="w-8 h-8 rounded-full bg-primary flex items-center justify-center text-black hover:opacity-90 transition-opacity"
+ className="w-8 h-8 rounded-full bg-primary flex items-center justify-center text-white hover:opacity-90 transition-opacity"
>
{isPlaying ? (
<Pause size={14} />
@@ -332,7 +332,7 @@ export const TextToSpeechPanel: React.FC = () => {
<button
onClick={addToTimeline}
disabled={isGenerating}
- className="flex-1 flex items-center justify-center gap-1.5 px-3 py-2 bg-primary text-black rounded-lg text-[10px] font-medium hover:opacity-90 transition-opacity disabled:opacity-50"
+ className="flex-1 flex items-center justify-center gap-1.5 px-3 py-2 bg-primary text-white rounded-lg text-[10px] font-medium hover:opacity-90 transition-opacity disabled:opacity-50"
>
<Plus size={12} />
Add to Timeline
diff --git a/apps/web/src/components/editor/inspector/TransitionInspector.tsx b/apps/web/src/components/editor/inspector/TransitionInspector.tsx
index 6efe93e0..5d5d426c 100644
--- a/apps/web/src/components/editor/inspector/TransitionInspector.tsx
+++ b/apps/web/src/components/editor/inspector/TransitionInspector.tsx
@@ -154,7 +154,7 @@ const TransitionPreview: React.FC<{
return (
<div className="relative w-full h-8 rounded overflow-hidden bg-background-secondary mb-2">
<div
- className="absolute inset-0 bg-blue-500/30"
+ className="absolute inset-0 bg-primary/20"
style={{ ...styles.clipA, transition: "none" }}
/>
<div
diff --git a/apps/web/src/components/editor/inspector/index.ts b/apps/web/src/components/editor/inspector/index.ts
index 74af7ad3..7dfb5e57 100644
--- a/apps/web/src/components/editor/inspector/index.ts
+++ b/apps/web/src/components/editor/inspector/index.ts
@@ -43,6 +43,7 @@ export { StickerPickerPanel } from "./StickerPickerPanel";
// Audio
export { AudioEffectsSection } from "./AudioEffectsSection";
export { AudioDuckingSection } from "./AudioDuckingSection";
+export { AutoCutSilenceSection } from "./AutoCutSilenceSection";
export { MusicLibraryPanel } from "./MusicLibraryPanel";
export { TextToSpeechPanel } from "./TextToSpeechPanel";
diff --git a/apps/web/src/components/editor/preview/CropModeView.tsx b/apps/web/src/components/editor/preview/CropModeView.tsx
index 6058085c..a0f57708 100644
--- a/apps/web/src/components/editor/preview/CropModeView.tsx
+++ b/apps/web/src/components/editor/preview/CropModeView.tsx
@@ -331,7 +331,7 @@ export const CropModeView: React.FC<CropModeViewProps> = ({
disabled={isLoading}
className={`px-2.5 py-1 text-xs rounded transition-colors ${
lockedAspect === ratio.value
- ? "bg-primary text-black font-medium"
+ ? "bg-primary text-white font-medium"
: "bg-background-tertiary text-text-secondary hover:bg-background-secondary"
}`}
>
diff --git a/apps/web/src/components/editor/preview/CropOverlay.tsx b/apps/web/src/components/editor/preview/CropOverlay.tsx
index 1bc6f8bf..3a5c3eb1 100644
--- a/apps/web/src/components/editor/preview/CropOverlay.tsx
+++ b/apps/web/src/components/editor/preview/CropOverlay.tsx
@@ -427,7 +427,7 @@ export const CropOverlay: React.FC<CropOverlayProps> = ({
onClick={() => handleAspectRatio(ratio.value)}
className={`px-3 py-1.5 text-xs rounded transition-colors ${
lockedAspect === ratio.value
- ? "bg-primary text-black font-medium"
+ ? "bg-primary text-white font-medium"
: "bg-white/10 text-white hover:bg-white/20"
}`}
>
diff --git a/apps/web/src/components/welcome/TemplateGallery.tsx b/apps/web/src/components/welcome/TemplateGallery.tsx
index 86486f09..7b97afae 100644
--- a/apps/web/src/components/welcome/TemplateGallery.tsx
+++ b/apps/web/src/components/welcome/TemplateGallery.tsx
@@ -1,5 +1,5 @@
import React, { useState, useCallback, useMemo, useEffect } from "react";
-import { Search, Loader2, Sparkles } from "lucide-react";
+import { Search, Loader2, Layers } from "lucide-react";
import { Input } from "@openreel/ui";
import { useEngineStore } from "../../stores/engine-store";
import {
@@ -192,7 +192,7 @@ export const TemplateGallery: React.FC<TemplateGalleryProps> = ({
{filteredTemplates.length === 0 ? (
<div className="flex flex-col items-center justify-center py-16">
<div className="w-14 h-14 rounded-2xl bg-background-tertiary flex items-center justify-center mb-4">
- <Sparkles size={24} className="text-text-muted" />
+ <Layers size={24} className="text-text-muted" />
</div>
<p className="text-base font-medium text-text-primary mb-1">
No templates found
diff --git a/apps/web/src/components/welcome/WelcomeScreen.tsx b/apps/web/src/components/welcome/WelcomeScreen.tsx
index e93be62b..46beb52f 100644
--- a/apps/web/src/components/welcome/WelcomeScreen.tsx
+++ b/apps/web/src/components/welcome/WelcomeScreen.tsx
@@ -1,7 +1,7 @@
import { useState, useCallback, useEffect } from "react";
import {
Clock,
- Sparkles,
+ Layers,
ArrowRight,
Smartphone,
Monitor,
@@ -333,7 +333,7 @@ export const WelcomeScreen: React.FC<WelcomeScreenProps> = ({ initialTab }) => {
onClick={() => setViewMode("templates")}
className="rounded-xl"
>
- <Sparkles size={16} />
+ <Layers size={16} />
Browse templates
</Button>
<Button