Skip to content

Commit ab1096f

Browse files
committed
feat: native video thumbnails implementation
- Implemented pixel-based thumbnail generation system - Added comprehensive thumbnail management with caching - Created adaptive performance controls for thumbnail generation - Added thumbnail validation and error handling - Implemented memory management and concurrency control - Added extensive test coverage and documentation - Refactored timeline components for better thumbnail integration - Added new asset browser and inspector components - Enhanced video thumbnail settings and controls
1 parent fd0f7ff commit ab1096f

File tree

66 files changed

+15962
-973
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+15962
-973
lines changed

apps/web/package.json

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@
77
"dev": "next dev",
88
"build": "next build",
99
"start": "next start",
10+
"test": "vitest",
11+
"test:run": "vitest run",
12+
"test:coverage": "vitest run --coverage",
13+
"test:watch": "vitest --watch",
14+
"test:ui": "vitest --ui",
1015
"lint": "biome check src/",
1116
"lint:fix": "biome check src/ --write",
1217
"format": "biome format src/ --write",
@@ -23,6 +28,7 @@
2328
"@hookform/resolvers": "^3.9.1",
2429
"@opencut/auth": "workspace:*",
2530
"@opencut/db": "workspace:*",
31+
"@radix-ui/react-dialog": "^1.1.14",
2632
"@radix-ui/react-separator": "^1.1.7",
2733
"@t3-oss/env-core": "^0.13.8",
2834
"@t3-oss/env-nextjs": "^0.13.8",
@@ -43,6 +49,7 @@
4349
"input-otp": "^1.4.1",
4450
"lucide-react": "^0.468.0",
4551
"motion": "^12.18.1",
52+
"nanoid": "^5.1.5",
4653
"next": "^15.4.5",
4754
"next-themes": "^0.4.4",
4855
"pg": "^8.16.2",
@@ -76,11 +83,15 @@
7683
"@types/pg": "^8.15.4",
7784
"@types/react": "^18.2.48",
7885
"@types/react-dom": "^18.2.18",
86+
"@vitest/coverage-v8": "^3.2.4",
87+
"@vitest/ui": "^3.2.4",
7988
"cross-env": "^7.0.3",
8089
"drizzle-kit": "^0.31.4",
90+
"jsdom": "^25.0.1",
8191
"postcss": "^8",
8292
"tailwindcss": "^4.1.11",
8393
"tsx": "^4.7.1",
84-
"typescript": "^5.8.3"
94+
"typescript": "^5.8.3",
95+
"vitest": "^3.2.4"
8596
}
8697
}

apps/web/src/app/editor/[project_id]/page.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ import {
77
ResizablePanel,
88
ResizableHandle,
99
} from "../../../components/ui/resizable";
10-
import { MediaPanel } from "../../../components/editor/media-panel";
11-
import { PropertiesPanel } from "../../../components/editor/properties-panel";
10+
import { AssetBrowser } from "../../../components/editor/asset-browser";
11+
import { Inspector } from "../../../components/editor/inspector";
1212
import { Timeline } from "../../../components/editor/timeline";
13-
import { PreviewPanel } from "../../../components/editor/preview-panel";
13+
import { ProgramMonitor } from "../../../components/editor/program-monitor";
1414
import { EditorHeader } from "@/components/editor-header";
1515
import { usePanelStore } from "@/stores/panel-store";
1616
import { useProjectStore } from "@/stores/project-store";
@@ -177,7 +177,7 @@ export default function Editor() {
177177
onResize={setToolsPanel}
178178
className="min-w-0 rounded-sm"
179179
>
180-
<MediaPanel />
180+
<AssetBrowser />
181181
</ResizablePanel>
182182

183183
<ResizableHandle withHandle />
@@ -189,7 +189,7 @@ export default function Editor() {
189189
onResize={setPreviewPanel}
190190
className="min-w-0 min-h-0 flex-1"
191191
>
192-
<PreviewPanel />
192+
<ProgramMonitor />
193193
</ResizablePanel>
194194

195195
<ResizableHandle withHandle />
@@ -201,7 +201,7 @@ export default function Editor() {
201201
onResize={setPropertiesPanel}
202202
className="min-w-0"
203203
>
204-
<PropertiesPanel />
204+
<Inspector />
205205
</ResizablePanel>
206206
</ResizablePanelGroup>
207207
</ResizablePanel>
File renamed without changes.

apps/web/src/components/editor/media-panel/index.tsx renamed to apps/web/src/components/editor/asset-browser/index.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22

33
import { TabBar } from "./tabbar";
44
import { MediaView } from "./views/media";
5-
import { useMediaPanelStore, Tab } from "./store";
5+
import { useAssetBrowserStore, Tab } from "./store";
66
import { TextView } from "./views/text";
77
import { AudioView } from "./views/audio";
88
import { Separator } from "@/components/ui/separator";
99

10-
export function MediaPanel() {
11-
const { activeTab } = useMediaPanelStore();
10+
export function AssetBrowser() {
11+
const { activeTab } = useAssetBrowserStore();
1212

1313
const viewMap: Record<Tab, React.ReactNode> = {
1414
media: <MediaView />,

apps/web/src/components/editor/media-panel/store.ts renamed to apps/web/src/components/editor/asset-browser/store.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,12 @@ export const tabs: { [key in Tab]: { icon: LucideIcon; label: string } } = {
6262
},
6363
};
6464

65-
interface MediaPanelStore {
65+
interface AssetBrowserStore {
6666
activeTab: Tab;
6767
setActiveTab: (tab: Tab) => void;
6868
}
6969

70-
export const useMediaPanelStore = create<MediaPanelStore>((set) => ({
70+
export const useAssetBrowserStore = create<AssetBrowserStore>((set) => ({
7171
activeTab: "media",
7272
setActiveTab: (tab) => set({ activeTab: tab }),
7373
}));

apps/web/src/components/editor/media-panel/tabbar.tsx renamed to apps/web/src/components/editor/asset-browser/tabbar.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
"use client";
22

33
import { cn } from "@/lib/utils";
4-
import { Tab, tabs, useMediaPanelStore } from "./store";
4+
import { Tab, tabs, useAssetBrowserStore } from "./store";
55
import { Button } from "@/components/ui/button";
66
import { ChevronRight, ChevronLeft } from "lucide-react";
77
import { useRef, useState, useEffect } from "react";
88

99
export function TabBar() {
10-
const { activeTab, setActiveTab } = useMediaPanelStore();
10+
const { activeTab, setActiveTab } = useAssetBrowserStore();
1111
const scrollContainerRef = useRef<HTMLDivElement>(null);
1212
const [isAtEnd, setIsAtEnd] = useState(false);
1313
const [isAtStart, setIsAtStart] = useState(true);
File renamed without changes.

apps/web/src/components/editor/media-panel/views/media.tsx renamed to apps/web/src/components/editor/asset-browser/views/media.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import {
1717
import { useEffect, useRef, useState, useMemo } from "react";
1818
import { toast } from "sonner";
1919
import { Button } from "@/components/ui/button";
20-
import { MediaDragOverlay } from "@/components/editor/media-panel/drag-overlay";
20+
import { MediaDragOverlay } from "@/components/editor/asset-browser/drag-overlay";
2121
import {
2222
ContextMenu,
2323
ContextMenuContent,
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)