Create polished demo videos without editing skills. Mac/Windows/Linux
fix: after rebase
4rjunc037a318a36e4
diff --git a/src/components/video-editor/VideoEditor.tsx b/src/components/video-editor/VideoEditor.tsxindex 323f34fe..f4a1b325 100644--- a/src/components/video-editor/VideoEditor.tsx+++ b/src/components/video-editor/VideoEditor.tsx@@ -4,7 +4,8 @@ import { useCallback, useEffect, useMemo, useRef, useState } from "react";import { Panel, PanelGroup, PanelResizeHandle } from "react-resizable-panels";import { toast } from "sonner";import { Toaster } from "@/components/ui/sonner";-import { useI18n } from "@/contexts/I18nContext";+import { useI18n, useScopedT } from "@/contexts/I18nContext";+import { useShortcuts } from "@/contexts/ShortcutsContext";import { SUPPORTED_LOCALES } from "@/i18n/config";import type { AppLocale } from "@/i18n/config";@@ -23,7 +24,6 @@ import {validateProjectData,} from "./projectPersistence";-import type { Span } from "dnd-timeline";import {DEFAULT_CURSOR_CLICK_BOUNCE,DEFAULT_CURSOR_MOTION_BLUR,@@ -53,69 +53,9 @@ import {import { VideoExporter, GifExporter, type ExportProgress, type ExportQuality, type ExportSettings, type ExportFormat, type GifFrameRate, type GifSizePreset, GIF_SIZE_PRESETS, calculateOutputDimensions } from "@/lib/exporter";import { type AspectRatio, getAspectRatioValue } from "@/utils/aspectRatioUtils";import { getAssetPath } from "@/lib/assetPath";-import { useShortcuts } from "@/contexts/ShortcutsContext";-import { getAssetPath } from "@/lib/assetPath";-import {- calculateOutputDimensions,- type ExportFormat,- type ExportProgress,- type ExportQuality,- type ExportSettings,- GIF_SIZE_PRESETS,- GifExporter,- type GifFrameRate,- type GifSizePreset,- VideoExporter,-} from "@/lib/exporter";import { matchesShortcut } from "@/lib/shortcuts";-import { DEFAULT_WALLPAPER_RELATIVE_PATH, WALLPAPER_PATHS } from "@/lib/wallpapers";-import { type AspectRatio, getAspectRatioValue } from "@/utils/aspectRatioUtils";-import { ExportDialog } from "./ExportDialog";-import PlaybackControls from "./PlaybackControls";-import {- createProjectData,- deriveNextId,- fromFileUrl,- normalizeProjectEditor,- toFileUrl,- validateProjectData,-} from "./projectPersistence";-import { SettingsPanel } from "./SettingsPanel";-import TimelineEditor from "./timeline/TimelineEditor";-import {- detectInteractionCandidates,- normalizeCursorTelemetry,-} from "./timeline/zoomSuggestionUtils";-import {- type AnnotationRegion,- type CropRegion,- type CursorTelemetryPoint,- clampFocusToDepth,- DEFAULT_ANNOTATION_POSITION,- DEFAULT_ANNOTATION_SIZE,- DEFAULT_ANNOTATION_STYLE,- DEFAULT_CROP_REGION,- DEFAULT_CURSOR_CLICK_BOUNCE,- DEFAULT_CURSOR_MOTION_BLUR,- DEFAULT_CURSOR_SIZE,- DEFAULT_CURSOR_SMOOTHING,- DEFAULT_FIGURE_DATA,- DEFAULT_PLAYBACK_SPEED,- DEFAULT_ZOOM_DEPTH,- DEFAULT_ZOOM_MOTION_BLUR,- type FigureData,- type PlaybackSpeed,- type SpeedRegion,- type TrimRegion,- type ZoomDepth,- type ZoomFocus,- type ZoomRegion,-} from "./types";-import VideoPlayback, { VideoPlaybackRef } from "./VideoPlayback";-import {- buildLoopedCursorTelemetry,- getDisplayedTimelineWindowMs,-} from "./videoPlayback/cursorLoopTelemetry";+import { detectInteractionCandidates, normalizeCursorTelemetry } from "./timeline/zoomSuggestionUtils";+import { buildLoopedCursorTelemetry, getDisplayedTimelineWindowMs } from "./videoPlayback/cursorLoopTelemetry";import { findDominantRegion } from "./videoPlayback/zoomRegionUtils";const LOOP_CURSOR_END_WINDOW_MS = 670;diff --git a/src/components/video-editor/timeline/Item.tsx b/src/components/video-editor/timeline/Item.tsxindex 0b319feb..1f9d3eb8 100644--- a/src/components/video-editor/timeline/Item.tsx+++ b/src/components/video-editor/timeline/Item.tsx@@ -1,10 +1,9 @@import type { Span } from "dnd-timeline";import { useItem } from "dnd-timeline";-import { Gauge, MessageSquare, Scissors, ZoomIn } from "lucide-react";+import { Gauge, MessageSquare, Music, Scissors, ZoomIn } from "lucide-react";import { useMemo } from "react";import { useScopedT } from "@/contexts/I18nContext";import { cn } from "@/lib/utils";-import { ZoomIn, Scissors, MessageSquare, Gauge, Music } from "lucide-react";import glassStyles from "./ItemGlass.module.css";interface ItemProps {diff --git a/src/components/video-editor/timeline/TimelineEditor.tsx b/src/components/video-editor/timeline/TimelineEditor.tsxindex 31d9c496..4ecad060 100644--- a/src/components/video-editor/timeline/TimelineEditor.tsx+++ b/src/components/video-editor/timeline/TimelineEditor.tsx@@ -1,54 +1,28 @@import { useCallback, useEffect, useMemo, useRef, useState, type KeyboardEvent as ReactKeyboardEvent, type WheelEvent } from "react";import { useTimelineContext } from "dnd-timeline";import { Button } from "@/components/ui/button";-import { Plus, Scissors, ZoomIn, MessageSquare, ChevronDown, Check, Gauge, WandSparkles, Music } from "lucide-react";-import { toast } from "sonner";-import { cn } from "@/lib/utils";-import TimelineWrapper from "./TimelineWrapper";-import Row from "./Row";-import Item from "./Item";-import KeyframeMarkers from "./KeyframeMarkers";-import type { Range, Span } from "dnd-timeline";-import type { ZoomRegion, TrimRegion, AnnotationRegion, SpeedRegion, AudioRegion, CursorTelemetryPoint, ZoomFocus } from "../types";-import { v4 as uuidv4 } from 'uuid';-import {- Check,- ChevronDown,- Gauge,- MessageSquare,- Plus,- Scissors,- WandSparkles,- ZoomIn,-} from "lucide-react";-import { useCallback, useEffect, useMemo, useRef, useState, type KeyboardEvent as ReactKeyboardEvent, type WheelEvent } from "react";-import { toast } from "sonner";-import { v4 as uuidv4 } from "uuid";-import { Button } from "@/components/ui/button";import {DropdownMenu,DropdownMenuContent,DropdownMenuItem,DropdownMenuTrigger,} from "@/components/ui/dropdown-menu";+import { Plus, Scissors, ZoomIn, MessageSquare, ChevronDown, Check, Gauge, WandSparkles, Music } from "lucide-react";+import { toast } from "sonner";+import { cn } from "@/lib/utils";+import { v4 as uuidv4 } from 'uuid';+import { useScopedT } from "@/contexts/I18nContext";import { useShortcuts } from "@/contexts/ShortcutsContext";import { matchesShortcut } from "@/lib/shortcuts";-import { cn } from "@/lib/utils";import { ASPECT_RATIOS, type AspectRatio, getAspectRatioLabel, isCustomAspectRatio } from "@/utils/aspectRatioUtils";import { formatShortcut } from "@/utils/platformUtils";import { TutorialHelp } from "../TutorialHelp";-import type {- AnnotationRegion,- CursorTelemetryPoint,- SpeedRegion,- TrimRegion,- ZoomFocus,- ZoomRegion,-} from "../types";+import TimelineWrapper from "./TimelineWrapper";+import Row from "./Row";import Item from "./Item";import KeyframeMarkers from "./KeyframeMarkers";-import Row from "./Row";-import TimelineWrapper from "./TimelineWrapper";+import type { Range, Span } from "dnd-timeline";+import type { ZoomRegion, TrimRegion, AnnotationRegion, SpeedRegion, AudioRegion, CursorTelemetryPoint, ZoomFocus } from "../types";import { detectInteractionCandidates, normalizeCursorTelemetry } from "./zoomSuggestionUtils";const ZOOM_ROW_ID = "row-zoom";