Create polished demo videos without editing skills. Mac/Windows/Linux
Apply consistent project formatting
young4fcf2deaa754
diff --git a/electron/ipc/captions/whisper.ts b/electron/ipc/captions/whisper.tsindex c8e774c6..67b04cd5 100644--- a/electron/ipc/captions/whisper.ts+++ b/electron/ipc/captions/whisper.ts@@ -3,7 +3,11 @@ import { constants as fsConstants } from "node:fs";import fs from "node:fs/promises";import { get as httpsGet } from "node:https";import type Electron from "electron";-import { WHISPER_MODEL_DIR, WHISPER_MODEL_DOWNLOAD_URL, WHISPER_SMALL_MODEL_PATH } from "../constants";+import {+ WHISPER_MODEL_DIR,+ WHISPER_MODEL_DOWNLOAD_URL,+ WHISPER_SMALL_MODEL_PATH,+} from "../constants";export function sendWhisperModelDownloadProgress(webContents: Electron.WebContents,@@ -106,7 +110,9 @@ export function downloadFileWithProgress(return request(url);}-export async function downloadWhisperSmallModel(webContents: Electron.WebContents): Promise<string> {+export async function downloadWhisperSmallModel(+ webContents: Electron.WebContents,+): Promise<string> {await fs.mkdir(WHISPER_MODEL_DIR, { recursive: true });const tempPath = `${WHISPER_SMALL_MODEL_PATH}.download`;diff --git a/electron/ipc/cursor/bounds.ts b/electron/ipc/cursor/bounds.tsindex 02fb3c75..fbc7d2d5 100644--- a/electron/ipc/cursor/bounds.ts+++ b/electron/ipc/cursor/bounds.ts@@ -119,7 +119,9 @@ export function parseXwininfoBounds(stdout: string): WindowBounds | null {};}-export async function resolveLinuxWindowBounds(source: SelectedSource): Promise<WindowBounds | null> {+export async function resolveLinuxWindowBounds(+ source: SelectedSource,+): Promise<WindowBounds | null> {const windowId = parseWindowId(source?.id);if (windowId) {@@ -153,7 +155,9 @@ export async function resolveLinuxWindowBounds(source: SelectedSource): Promise<}}-export async function resolveWindowsWindowBounds(source: SelectedSource): Promise<WindowBounds | null> {+export async function resolveWindowsWindowBounds(+ source: SelectedSource,+): Promise<WindowBounds | null> {const windowId = parseWindowId(source?.id);const windowTitle =typeof source.windowTitle === "string" ? source.windowTitle.trim() : source.name.trim();@@ -259,7 +263,9 @@ export function startWindowBoundsCapture() {}void refreshSelectedWindowBounds();- setWindowBoundsCaptureInterval(setInterval(() => {- void refreshSelectedWindowBounds();- }, 250));+ setWindowBoundsCaptureInterval(+ setInterval(() => {+ void refreshSelectedWindowBounds();+ }, 250),+ );}diff --git a/electron/ipc/cursor/interaction.test.ts b/electron/ipc/cursor/interaction.test.tsindex f126f6e3..4ea66241 100644--- a/electron/ipc/cursor/interaction.test.ts+++ b/electron/ipc/cursor/interaction.test.ts@@ -32,7 +32,9 @@ describe("repairBundledUiohookBinaryForCurrentArch", () => {afterEach(async () => {await Promise.all(- tempRoots.splice(0).map((tempRoot) => fs.rm(tempRoot, { recursive: true, force: true })),+ tempRoots+ .splice(0)+ .map((tempRoot) => fs.rm(tempRoot, { recursive: true, force: true })),);});@@ -50,9 +52,14 @@ describe("repairBundledUiohookBinaryForCurrentArch", () => {const log = vi.fn();const repaired = repairBundledUiohookBinaryForCurrentArch(- Object.assign(new Error("mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64')"), {- code: "ERR_DLOPEN_FAILED",- }),+ Object.assign(+ new Error(+ "mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64')",+ ),+ {+ code: "ERR_DLOPEN_FAILED",+ },+ ),{ packageRoot, platform: "darwin", arch: "arm64", log },);diff --git a/electron/ipc/cursor/telemetry.ts b/electron/ipc/cursor/telemetry.tsindex ebedfe72..fd598b10 100644--- a/electron/ipc/cursor/telemetry.ts+++ b/electron/ipc/cursor/telemetry.ts@@ -91,11 +91,7 @@ export async function writeCursorTelemetry(videoPath: string, samples: unknown)await fs.writeFile(telemetryPath,- JSON.stringify(- { version: CURSOR_TELEMETRY_VERSION, samples: normalizedSamples },- null,- 2,- ),+ JSON.stringify({ version: CURSOR_TELEMETRY_VERSION, samples: normalizedSamples }, null, 2),"utf-8",);@@ -144,9 +140,7 @@ export function resumeCursorCapture(resumedAtMs: number) {}const pauseDurationMs = Math.max(0, resumedAtMs - cursorCapturePauseStartedAtMs);- setCursorCaptureAccumulatedPausedMs(- cursorCaptureAccumulatedPausedMs + pauseDurationMs,- );+ setCursorCaptureAccumulatedPausedMs(cursorCaptureAccumulatedPausedMs + pauseDurationMs);setCursorCapturePauseStartedAtMs(null);}@@ -217,7 +211,16 @@ export function getNormalizedCursorPoint() {}export function getHookCursorScreenPoint(- event: { x?: number; y?: number; data?: { x?: number; y?: number; screenX?: number; screenY?: number }; screenX?: number; screenY?: number } | null | undefined,+ event:+ | {+ x?: number;+ y?: number;+ data?: { x?: number; y?: number; screenX?: number; screenY?: number };+ screenX?: number;+ screenY?: number;+ }+ | null+ | undefined,): { x: number; y: number } | null {const rawX = event?.x ?? event?.data?.x ?? event?.screenX ?? event?.data?.screenX;const rawY = event?.y ?? event?.data?.y ?? event?.screenY ?? event?.data?.screenY;diff --git a/electron/ipc/ffmpeg/filters.ts b/electron/ipc/ffmpeg/filters.tsindex 7e437525..2d3370c7 100644--- a/electron/ipc/ffmpeg/filters.ts+++ b/electron/ipc/ffmpeg/filters.ts@@ -114,11 +114,10 @@ export function appendSyncedAudioFilter(filters.push(`adelay=${adjustment.delayMs}|${adjustment.delayMs}`);}- if (- adjustment.mode === "delay" &&- adjustment.durationDeltaMs > adjustment.delayMs + 20- ) {- filters.push(`apad=pad_dur=${formatFfmpegSeconds(adjustment.durationDeltaMs - adjustment.delayMs)}`);+ if (adjustment.mode === "delay" && adjustment.durationDeltaMs > adjustment.delayMs + 20) {+ filters.push(+ `apad=pad_dur=${formatFfmpegSeconds(adjustment.durationDeltaMs - adjustment.delayMs)}`,+ );}if (adjustment.mode === "tempo") {diff --git a/electron/ipc/monitorResolver.ts b/electron/ipc/monitorResolver.tsindex e71f36c1..f14bbd38 100644--- a/electron/ipc/monitorResolver.ts+++ b/electron/ipc/monitorResolver.ts@@ -13,7 +13,7 @@ export interface WinMonitorHandle {/*** Retrieves raw HMONITOR handles from the Windows OS using a PowerShell bridge.- * This is necessary because Electron's display IDs are often internal hashes that+ * This is necessary because Electron's display IDs are often internal hashes that* cannot be used directly with native Windows APIs like Graphics Capture (WGC).*/export function getMonitorHandles(): WinMonitorHandle[] {@@ -53,10 +53,14 @@ public class MonitorHelper {[MonitorHelper]::GetMonitors()`.trim();- const result = spawnSync("powershell.exe", ["-NoProfile", "-NonInteractive", "-Command", psScript], {- encoding: "utf-8",- timeout: 5000,- });+ const result = spawnSync(+ "powershell.exe",+ ["-NoProfile", "-NonInteractive", "-Command", psScript],+ {+ encoding: "utf-8",+ timeout: 5000,+ },+ );if (result.error || result.status !== 0) {// Silent failure is preferred; the caller will fall back to coordinate-based matching.diff --git a/electron/ipc/paths/binaries.ts b/electron/ipc/paths/binaries.tsindex 3e15f332..04bc577c 100644--- a/electron/ipc/paths/binaries.ts+++ b/electron/ipc/paths/binaries.ts@@ -4,10 +4,7 @@ import fs from "node:fs/promises";import path from "node:path";import { promisify } from "node:util";import { app } from "electron";-import {- nativeHelperMigrationPromise,- setNativeHelperMigrationPromise,-} from "../state";+import { nativeHelperMigrationPromise, setNativeHelperMigrationPromise } from "../state";const execFileAsync = promisify(execFile);@@ -131,7 +128,11 @@ export function getCursorMonitorExePath(): string {async function migrateLegacyNativeHelperBinaries(): Promise<void> {const legacyToCurrentPaths: Array<[string, string]> = [[- path.join(app.getPath("userData"), "native-tools", "openscreen-screencapturekit-helper"),+ path.join(+ app.getPath("userData"),+ "native-tools",+ "openscreen-screencapturekit-helper",+ ),getNativeCaptureHelperBinaryPath(),],[diff --git a/electron/ipc/project/session.ts b/electron/ipc/project/session.tsindex 3c126e6d..d5f83a83 100644--- a/electron/ipc/project/session.ts+++ b/electron/ipc/project/session.ts@@ -15,7 +15,9 @@ export function getRecordingSessionManifestPath(videoPath: string) {return path.join(path.dirname(videoPath), `${baseName}${RECORDING_SESSION_MANIFEST_SUFFIX}`);}-export async function persistRecordingSessionManifest(session: RecordingSessionData): Promise<void> {+export async function persistRecordingSessionManifest(+ session: RecordingSessionData,+): Promise<void> {const normalizedVideoPath = normalizeVideoSourcePath(session.videoPath);if (!normalizedVideoPath) {return;@@ -51,8 +53,7 @@ export async function resolveRecordingSessionManifest(try {const content = await fs.readFile(manifestPath, "utf-8");- const parsed =- parseJsonWithByteOrderMark<Partial<RecordingSessionManifest>>(content);+ const parsed = parseJsonWithByteOrderMark<Partial<RecordingSessionManifest>>(content);if (parsed.version !== 1 && parsed.version !== 2) {return null;}@@ -138,5 +139,3 @@ export async function resolveRecordingSession(webcamPath: linkedWebcamPath,};}--diff --git a/electron/ipc/recording/diagnostics.ts b/electron/ipc/recording/diagnostics.tsindex edf5f638..985209f2 100644--- a/electron/ipc/recording/diagnostics.ts+++ b/electron/ipc/recording/diagnostics.ts@@ -201,9 +201,7 @@ export async function probeMediaDurationSeconds(filePath: string): Promise<numbereturn duration;}} finally {- console.log(- `[PERF:MAIN] probeMediaDurationSeconds: COMPLETED in ${Date.now() - start}ms`,- );+ console.log(`[PERF:MAIN] probeMediaDurationSeconds: COMPLETED in ${Date.now() - start}ms`);}return 0;}@@ -292,9 +290,7 @@ export async function probeVideoStreamDuration(} catch {return null;} finally {- console.log(- `[PERF:MAIN] probeVideoStreamDuration: COMPLETED in ${Date.now() - start}ms`,- );+ console.log(`[PERF:MAIN] probeVideoStreamDuration: COMPLETED in ${Date.now() - start}ms`);}}diff --git a/electron/ipc/recording/ffmpeg.ts b/electron/ipc/recording/ffmpeg.tsindex fee481cd..dae48fc0 100644--- a/electron/ipc/recording/ffmpeg.ts+++ b/electron/ipc/recording/ffmpeg.ts@@ -1,9 +1,7 @@import type { ChildProcessWithoutNullStreams } from "node:child_process";import fs from "node:fs/promises";import { resolveLinuxWindowBounds } from "../cursor/bounds";-import {- ffmpegCaptureOutputBuffer,-} from "../state";+import { ffmpegCaptureOutputBuffer } from "../state";import type { SelectedSource } from "../types";import { getScreen, parseWindowId } from "../utils";import { resolveWindowsCaptureDisplay } from "../windowsCaptureSelection";@@ -169,7 +167,10 @@ export function waitForFfmpegCaptureStart(process: ChildProcessWithoutNullStream});}-export function waitForFfmpegCaptureStop(process: ChildProcessWithoutNullStreams, outputPath: string) {+export function waitForFfmpegCaptureStop(+ process: ChildProcessWithoutNullStreams,+ outputPath: string,+) {return new Promise<string>((resolve, reject) => {const onClose = async (code: number | null) => {cleanup();diff --git a/electron/ipc/recording/prune.ts b/electron/ipc/recording/prune.tsindex d8004bd1..29787e8e 100644--- a/electron/ipc/recording/prune.ts+++ b/electron/ipc/recording/prune.ts@@ -82,10 +82,13 @@ async function loadSavedProjectMediaPaths() {editor?: { webcam?: { sourcePath?: unknown } };}>(await fs.readFile(projectPath, "utf-8"));} catch (error) {- console.warn("[prune] Aborting recording prune because a saved project is unreadable", {- projectPath,- error,- });+ console.warn(+ "[prune] Aborting recording prune because a saved project is unreadable",+ {+ projectPath,+ error,+ },+ );throw error;}const candidatePaths = [diff --git a/electron/ipc/recording/windows.ts b/electron/ipc/recording/windows.tsindex 262d26da..650cdca9 100644--- a/electron/ipc/recording/windows.ts+++ b/electron/ipc/recording/windows.ts@@ -13,9 +13,7 @@ import {windowsCaptureTargetPath,windowsNativeCaptureActive,} from "../state";-import {- AudioSyncAdjustment,-} from "../types";+import { AudioSyncAdjustment } from "../types";import { moveFileWithOverwrite } from "../utils";import { emitRecordingInterrupted } from "./events";@@ -135,7 +133,9 @@ export function waitForWindowsCaptureStop(const onClose = (code: number | null) => {finish(() => {- const match = windowsCaptureOutputBuffer.match(/Recording stopped\. Output path: (.+)/);+ const match = windowsCaptureOutputBuffer.match(+ /Recording stopped\. Output path: (.+)/,+ );if (match?.[1]) {resolve(match[1].trim());return;@@ -254,9 +254,7 @@ export async function muxNativeWindowsVideoWithAudio(}}- console.log(- `[PERF:MAIN] muxNativeWindowsVideoWithAudio: COMPLETED in ${Date.now() - start}ms`,- );+ console.log(`[PERF:MAIN] muxNativeWindowsVideoWithAudio: COMPLETED in ${Date.now() - start}ms`);return {muxed: false,diff --git a/electron/ipc/register/assets.ts b/electron/ipc/register/assets.tsindex f18bf7b6..fae8d708 100644--- a/electron/ipc/register/assets.ts+++ b/electron/ipc/register/assets.ts@@ -8,120 +8,122 @@ import { normalizePath } from "../utils";import { getAssetRootPath } from "../project/manager";export function registerAssetHandlers() {- async function resolveReadableLocalFilePath(filePath: string) {- const normalizedPath = normalizePath(filePath)- const resolvedPath = await fs.realpath(normalizedPath).catch(() => normalizedPath)- const stats = await fs.stat(resolvedPath)- if (!stats.isFile()) {- throw new Error('Path is not a readable file')- }- return normalizePath(resolvedPath)- }-- // Generate a tiny thumbnail for a wallpaper image and cache it in userData.- // Returns the cached thumbnail as raw JPEG bytes for fast grid rendering.- // Serialized to prevent concurrent nativeImage operations from eating memory.- const THUMB_SIZE = 96- const thumbCacheDir = path.join(USER_DATA_PATH, 'wallpaper-thumbs')- let thumbGenerationQueue: Promise<void> = Promise.resolve()-- ipcMain.handle('generate-wallpaper-thumbnail', async (_, filePath: string) => {- try {- const resolved = await resolveReadableLocalFilePath(filePath)-- // Deterministic cache key from file path + mtime- const stat = await fs.stat(resolved)- const cacheKey = Buffer.from(`${resolved}:${stat.mtimeMs}`).toString('base64url')- const thumbPath = path.join(thumbCacheDir, `${cacheKey}.jpg`)-- // Return cached thumbnail if it exists (no queue needed)- if (existsSync(thumbPath)) {- const data = await fs.readFile(thumbPath)- return { success: true, data }- }-- // Serialize nativeImage operations to avoid OOM from concurrent full-res decodes- let jpegData: Buffer- const generation = thumbGenerationQueue.then(async () => {- const { nativeImage } = await import('electron')- const img = nativeImage.createFromPath(resolved)- if (img.isEmpty()) {- throw new Error('Failed to load image')- }- const { width, height } = img.getSize()- const scale = THUMB_SIZE / Math.min(width, height)- const resized = img.resize({- width: Math.round(width * scale),- height: Math.round(height * scale),- quality: 'good',- })- jpegData = resized.toJPEG(70)-- // Cache to disk- await fs.mkdir(thumbCacheDir, { recursive: true })- await fs.writeFile(thumbPath, jpegData)- })- // Keep the queue moving even if one fails- thumbGenerationQueue = generation.catch(() => undefined)- await generation-- return { success: true, data: jpegData! }- } catch (error) {- return { success: false, error: String(error) }- }- })-- // Return base path for assets so renderer can resolve file:// paths in production- ipcMain.handle('get-asset-base-path', () => {- try {- const assetPath = getAssetRootPath()- return pathToFileURL(`${assetPath}${path.sep}`).toString()- } catch (err) {- console.error('Failed to resolve asset base path:', err)- return null- }- })-- ipcMain.handle('list-asset-directory', async (_, relativeDir: string) => {- try {- const normalizedRelativeDir = String(relativeDir ?? '')- .replace(/\\/g, '/')- .replace(/^\/+/, '')-- const assetRootPath = path.resolve(getAssetRootPath())- const targetDirPath = path.resolve(assetRootPath, normalizedRelativeDir)- if (targetDirPath !== assetRootPath && !targetDirPath.startsWith(`${assetRootPath}${path.sep}`)) {- return { success: false, error: 'Invalid asset directory' }- }-- const entries = await fs.readdir(targetDirPath, { withFileTypes: true })- const files = entries- .filter((entry) => entry.isFile())- .map((entry) => entry.name)- .sort(new Intl.Collator(undefined, { numeric: true, sensitivity: 'base' }).compare)-- return { success: true, files }- } catch (error) {- console.error('Failed to list asset directory:', error)- return { success: false, error: String(error) }- }- })-- ipcMain.handle('read-local-file', async (_, filePath: string) => {- try {- // Intentionally more permissive than the media-server allowlist: this IPC- // is used for direct renderer-side local file reads after the app has- // already accepted a path, while URL-based media serving must stay scoped- // to approved/app-managed locations. We still canonicalize the path and- // require a real on-disk file so this cannot be used to read directories.- const resolved = await resolveReadableLocalFilePath(filePath)-- const data = await fs.readFile(resolved)- return { success: true, data }- } catch (error) {- console.error('Failed to read local file:', error)- return { success: false, error: String(error) }- }- })-+ async function resolveReadableLocalFilePath(filePath: string) {+ const normalizedPath = normalizePath(filePath);+ const resolvedPath = await fs.realpath(normalizedPath).catch(() => normalizedPath);+ const stats = await fs.stat(resolvedPath);+ if (!stats.isFile()) {+ throw new Error("Path is not a readable file");+ }+ return normalizePath(resolvedPath);+ }++ // Generate a tiny thumbnail for a wallpaper image and cache it in userData.+ // Returns the cached thumbnail as raw JPEG bytes for fast grid rendering.+ // Serialized to prevent concurrent nativeImage operations from eating memory.+ const THUMB_SIZE = 96;+ const thumbCacheDir = path.join(USER_DATA_PATH, "wallpaper-thumbs");+ let thumbGenerationQueue: Promise<void> = Promise.resolve();++ ipcMain.handle("generate-wallpaper-thumbnail", async (_, filePath: string) => {+ try {+ const resolved = await resolveReadableLocalFilePath(filePath);++ // Deterministic cache key from file path + mtime+ const stat = await fs.stat(resolved);+ const cacheKey = Buffer.from(`${resolved}:${stat.mtimeMs}`).toString("base64url");+ const thumbPath = path.join(thumbCacheDir, `${cacheKey}.jpg`);++ // Return cached thumbnail if it exists (no queue needed)+ if (existsSync(thumbPath)) {+ const data = await fs.readFile(thumbPath);+ return { success: true, data };+ }++ // Serialize nativeImage operations to avoid OOM from concurrent full-res decodes+ let jpegData: Buffer;+ const generation = thumbGenerationQueue.then(async () => {+ const { nativeImage } = await import("electron");+ const img = nativeImage.createFromPath(resolved);+ if (img.isEmpty()) {+ throw new Error("Failed to load image");+ }+ const { width, height } = img.getSize();+ const scale = THUMB_SIZE / Math.min(width, height);+ const resized = img.resize({+ width: Math.round(width * scale),+ height: Math.round(height * scale),+ quality: "good",+ });+ jpegData = resized.toJPEG(70);++ // Cache to disk+ await fs.mkdir(thumbCacheDir, { recursive: true });+ await fs.writeFile(thumbPath, jpegData);+ });+ // Keep the queue moving even if one fails+ thumbGenerationQueue = generation.catch(() => undefined);+ await generation;++ return { success: true, data: jpegData! };+ } catch (error) {+ return { success: false, error: String(error) };+ }+ });++ // Return base path for assets so renderer can resolve file:// paths in production+ ipcMain.handle("get-asset-base-path", () => {+ try {+ const assetPath = getAssetRootPath();+ return pathToFileURL(`${assetPath}${path.sep}`).toString();+ } catch (err) {+ console.error("Failed to resolve asset base path:", err);+ return null;+ }+ });++ ipcMain.handle("list-asset-directory", async (_, relativeDir: string) => {+ try {+ const normalizedRelativeDir = String(relativeDir ?? "")+ .replace(/\\/g, "/")+ .replace(/^\/+/, "");++ const assetRootPath = path.resolve(getAssetRootPath());+ const targetDirPath = path.resolve(assetRootPath, normalizedRelativeDir);+ if (+ targetDirPath !== assetRootPath &&+ !targetDirPath.startsWith(`${assetRootPath}${path.sep}`)+ ) {+ return { success: false, error: "Invalid asset directory" };+ }++ const entries = await fs.readdir(targetDirPath, { withFileTypes: true });+ const files = entries+ .filter((entry) => entry.isFile())+ .map((entry) => entry.name)+ .sort(new Intl.Collator(undefined, { numeric: true, sensitivity: "base" }).compare);++ return { success: true, files };+ } catch (error) {+ console.error("Failed to list asset directory:", error);+ return { success: false, error: String(error) };+ }+ });++ ipcMain.handle("read-local-file", async (_, filePath: string) => {+ try {+ // Intentionally more permissive than the media-server allowlist: this IPC+ // is used for direct renderer-side local file reads after the app has+ // already accepted a path, while URL-based media serving must stay scoped+ // to approved/app-managed locations. We still canonicalize the path and+ // require a real on-disk file so this cannot be used to read directories.+ const resolved = await resolveReadableLocalFilePath(filePath);++ const data = await fs.readFile(resolved);+ return { success: true, data };+ } catch (error) {+ console.error("Failed to read local file:", error);+ return { success: false, error: String(error) };+ }+ });}diff --git a/electron/ipc/register/export.test.ts b/electron/ipc/register/export.test.tsindex 33941eb1..df1e9d85 100644--- a/electron/ipc/register/export.test.ts+++ b/electron/ipc/register/export.test.ts@@ -55,9 +55,7 @@ describe("moveExportedTempFile", () => {await moveExportedTempFile(tempPath, destinationPath);- await expect(fs.readFile(destinationPath, "utf8")).resolves.toBe(- "recordly-export",- );+ await expect(fs.readFile(destinationPath, "utf8")).resolves.toBe("recordly-export");await expect(fs.access(tempPath)).rejects.toThrow();});diff --git a/electron/ipc/register/export.ts b/electron/ipc/register/export.tsindex c4410a27..2eabb978 100644--- a/electron/ipc/register/export.ts+++ b/electron/ipc/register/export.ts@@ -75,12 +75,7 @@ export async function moveExportedTempFile(tempPath: string, destinationPath: streturn;} catch (error) {const code = (error as NodeJS.ErrnoException).code;- if (- code !== "EXDEV" &&- code !== "EPERM" &&- code !== "ENOTEMPTY" &&- code !== "EEXIST"- ) {+ if (code !== "EXDEV" && code !== "EPERM" && code !== "ENOTEMPTY" && code !== "EEXIST") {throw error;}// Cross-device or Windows permission quirks — fall back to copy + unlink so@@ -113,9 +108,7 @@ export async function moveExportedTempFile(tempPath: string, destinationPath: stawait fs.rename(partialDestinationPath, destinationPath);} catch (replaceError) {if (movedExistingDestination) {- await fs- .rename(backupDestinationPath, destinationPath)- .catch(() => undefined);+ await fs.rename(backupDestinationPath, destinationPath).catch(() => undefined);}throw replaceError;}diff --git a/electron/ipc/register/exportCaptionSidecars.test.ts b/electron/ipc/register/exportCaptionSidecars.test.tsindex 6839e959..2fc571e1 100644--- a/electron/ipc/register/exportCaptionSidecars.test.ts+++ b/electron/ipc/register/exportCaptionSidecars.test.ts@@ -56,7 +56,9 @@ describe("exportCaptionSidecars", () => {});it("returns a warning result instead of throwing when sidecar writes fail", async () => {- const writeFileSpy = vi.spyOn(fs, "writeFile").mockRejectedValueOnce(new Error("disk full"));+ const writeFileSpy = vi+ .spyOn(fs, "writeFile")+ .mockRejectedValueOnce(new Error("disk full"));await expect(writeCaptionSidecarsBestEffort("/tmp/export.mp4", {@@ -109,4 +111,4 @@ describe("exportCaptionSidecars", () => {}),).toBe("Video exported successfully");});-});\ No newline at end of file+});diff --git a/electron/ipc/register/exportCaptionSidecars.ts b/electron/ipc/register/exportCaptionSidecars.tsindex 6711d3bb..0560a9a9 100644--- a/electron/ipc/register/exportCaptionSidecars.ts+++ b/electron/ipc/register/exportCaptionSidecars.ts@@ -154,4 +154,4 @@ export function withCaptionSidecarMessage(}return `${baseMessage} Captions could not be saved alongside the video.`;-}\ No newline at end of file+}diff --git a/electron/ipc/register/permissions.ts b/electron/ipc/register/permissions.tsindex 07057c96..f3b8b86f 100644--- a/electron/ipc/register/permissions.ts+++ b/electron/ipc/register/permissions.ts@@ -2,86 +2,86 @@ import { ipcMain, shell, systemPreferences } from "electron";import { getMacPrivacySettingsUrl } from "../utils";export function registerPermissionHandlers() {- ipcMain.handle('open-external-url', async (_, url: string) => {- try {- // Security: only allow http/https URLs to prevent file:// or custom protocol abuse- const parsed = new URL(url)- if (parsed.protocol !== 'https:' && parsed.protocol !== 'http:') {- return { success: false, error: `Blocked non-HTTP URL: ${parsed.protocol}` }- }- await shell.openExternal(url)- return { success: true }- } catch (error) {- console.error('Failed to open URL:', error)- return { success: false, error: String(error) }- }- })+ ipcMain.handle("open-external-url", async (_, url: string) => {+ try {+ // Security: only allow http/https URLs to prevent file:// or custom protocol abuse+ const parsed = new URL(url);+ if (parsed.protocol !== "https:" && parsed.protocol !== "http:") {+ return { success: false, error: `Blocked non-HTTP URL: ${parsed.protocol}` };+ }+ await shell.openExternal(url);+ return { success: true };+ } catch (error) {+ console.error("Failed to open URL:", error);+ return { success: false, error: String(error) };+ }+ });- ipcMain.handle('get-accessibility-permission-status', () => {- if (process.platform !== 'darwin') {- return { success: true, trusted: true, prompted: false }- }+ ipcMain.handle("get-accessibility-permission-status", () => {+ if (process.platform !== "darwin") {+ return { success: true, trusted: true, prompted: false };+ }- return {- success: true,- trusted: systemPreferences.isTrustedAccessibilityClient(false),- prompted: false,- }- })+ return {+ success: true,+ trusted: systemPreferences.isTrustedAccessibilityClient(false),+ prompted: false,+ };+ });- ipcMain.handle('request-accessibility-permission', () => {- if (process.platform !== 'darwin') {- return { success: true, trusted: true, prompted: false }- }+ ipcMain.handle("request-accessibility-permission", () => {+ if (process.platform !== "darwin") {+ return { success: true, trusted: true, prompted: false };+ }- return {- success: true,- trusted: systemPreferences.isTrustedAccessibilityClient(true),- prompted: true,- }- })+ return {+ success: true,+ trusted: systemPreferences.isTrustedAccessibilityClient(true),+ prompted: true,+ };+ });- ipcMain.handle('get-screen-recording-permission-status', () => {- if (process.platform !== 'darwin') {- return { success: true, status: 'granted' }- }+ ipcMain.handle("get-screen-recording-permission-status", () => {+ if (process.platform !== "darwin") {+ return { success: true, status: "granted" };+ }- try {- return {- success: true,- status: systemPreferences.getMediaAccessStatus('screen'),- }- } catch (error) {- console.error('Failed to get screen recording permission status:', error)- return { success: false, status: 'unknown', error: String(error) }- }- })+ try {+ return {+ success: true,+ status: systemPreferences.getMediaAccessStatus("screen"),+ };+ } catch (error) {+ console.error("Failed to get screen recording permission status:", error);+ return { success: false, status: "unknown", error: String(error) };+ }+ });- ipcMain.handle('open-screen-recording-preferences', async () => {- if (process.platform !== 'darwin') {- return { success: true }- }+ ipcMain.handle("open-screen-recording-preferences", async () => {+ if (process.platform !== "darwin") {+ return { success: true };+ }- try {- await shell.openExternal(getMacPrivacySettingsUrl('screen'))- return { success: true }- } catch (error) {- console.error('Failed to open Screen Recording preferences:', error)- return { success: false, error: String(error) }- }- })+ try {+ await shell.openExternal(getMacPrivacySettingsUrl("screen"));+ return { success: true };+ } catch (error) {+ console.error("Failed to open Screen Recording preferences:", error);+ return { success: false, error: String(error) };+ }+ });- ipcMain.handle('open-accessibility-preferences', async () => {- if (process.platform !== 'darwin') {- return { success: true }- }+ ipcMain.handle("open-accessibility-preferences", async () => {+ if (process.platform !== "darwin") {+ return { success: true };+ }- try {- await shell.openExternal(getMacPrivacySettingsUrl('accessibility'))- return { success: true }- } catch (error) {- console.error('Failed to open Accessibility preferences:', error)- return { success: false, error: String(error) }- }- })+ try {+ await shell.openExternal(getMacPrivacySettingsUrl("accessibility"));+ return { success: true };+ } catch (error) {+ console.error("Failed to open Accessibility preferences:", error);+ return { success: false, error: String(error) };+ }+ });}diff --git a/electron/ipc/register/project.ts b/electron/ipc/register/project.tsindex f1fa43e2..a3a0cd07 100644--- a/electron/ipc/register/project.ts+++ b/electron/ipc/register/project.ts@@ -5,26 +5,23 @@ import path from "node:path";import { BrowserWindow, dialog, ipcMain, shell } from "electron";import { RECORDINGS_DIR } from "../../appPaths";import { buildMediaUrl, getMediaServerBaseUrl } from "../../mediaServer";-import {- LEGACY_PROJECT_FILE_EXTENSIONS,- PROJECT_FILE_EXTENSION,-} from "../constants";+import { LEGACY_PROJECT_FILE_EXTENSIONS, PROJECT_FILE_EXTENSION } from "../constants";import { getProjectBackupPath, writeProjectFileAtomically } from "../project/atomicSave";import {getProjectsDir,- getProjectThumbnailPath,+ getProjectThumbnailPath,isPathInsideDirectory,isTrustedProjectPath,listProjectLibraryEntries,loadProjectFromPath,- loadRecentProjectPaths,+ loadRecentProjectPaths,persistRecordingsDirectorySetting,rememberRecentProject,replaceApprovedSessionLocalReadPaths,rememberApprovedLocalReadPath,resolveApprovedLocalMediaPath,saveProjectThumbnail,- saveRecentProjectPaths,+ saveRecentProjectPaths,} from "../project/manager";import { persistRecordingSessionManifest, resolveRecordingSession } from "../project/session";import {@@ -49,36 +46,36 @@ function normalizeRecordingTimeOffsetMs(value: unknown): number {}function normalizeBoolean(value: unknown, fallback = false): boolean {- return typeof value === "boolean" ? value : fallback;+ return typeof value === "boolean" ? value : fallback;}/*** Produces a filesystem-safe project base name without the project extension.*/function normalizeProjectSaveName(projectName?: string | null) {- if (typeof projectName !== "string") {- return null;- }-- const trimmedName = projectName.trim();- if (!trimmedName) {- return null;- }-- const withoutExtension = trimmedName.replace(- new RegExp(`\\.${PROJECT_FILE_EXTENSION}$`, "i"),- "",- );- const withoutInvalidFilesystemChars = withoutExtension.replace(/[<>:"/\\|?*]/g, "");- const withoutControlChars = Array.from(withoutInvalidFilesystemChars)- .filter((character) => character.charCodeAt(0) > 31)- .join("");- const sanitizedName = withoutControlChars- .replace(/\s+/g, " ")- .replace(/[. ]+$/g, "")- .trim();-- return sanitizedName || null;+ if (typeof projectName !== "string") {+ return null;+ }++ const trimmedName = projectName.trim();+ if (!trimmedName) {+ return null;+ }++ const withoutExtension = trimmedName.replace(+ new RegExp(`\\.${PROJECT_FILE_EXTENSION}$`, "i"),+ "",+ );+ const withoutInvalidFilesystemChars = withoutExtension.replace(/[<>:"/\\|?*]/g, "");+ const withoutControlChars = Array.from(withoutInvalidFilesystemChars)+ .filter((character) => character.charCodeAt(0) > 31)+ .join("");+ const sanitizedName = withoutControlChars+ .replace(/\s+/g, " ")+ .replace(/[. ]+$/g, "")+ .trim();++ return sanitizedName || null;}type NamedProjectSaveMode = "rename" | "copy";@@ -91,609 +88,689 @@ function normalizeNamedProjectSaveMode(value: unknown): NamedProjectSaveMode {* Extracts the persisted source video path from a saved project payload.*/function getProjectVideoPath(projectData: unknown) {- if (!projectData || typeof projectData !== "object") {- return null;- }+ if (!projectData || typeof projectData !== "object") {+ return null;+ }- const candidate = projectData as { videoPath?: unknown };- return typeof candidate.videoPath === "string" ? candidate.videoPath : null;+ const candidate = projectData as { videoPath?: unknown };+ return typeof candidate.videoPath === "string" ? candidate.videoPath : null;}function getProjectId(projectData: unknown) {- if (!projectData || typeof projectData !== "object") {- return null;- }-- const candidate = projectData as { projectId?: unknown };- return typeof candidate.projectId === "string" && candidate.projectId.trim().length > 0- ? candidate.projectId- : null;+ if (!projectData || typeof projectData !== "object") {+ return null;+ }++ const candidate = projectData as { projectId?: unknown };+ return typeof candidate.projectId === "string" && candidate.projectId.trim().length > 0+ ? candidate.projectId+ : null;}function withProjectId(projectData: unknown, projectId: string) {- if (!projectData || typeof projectData !== "object" || Array.isArray(projectData)) {- return projectData;- }-- return {- ...projectData,- projectId,- };+ if (!projectData || typeof projectData !== "object" || Array.isArray(projectData)) {+ return projectData;+ }++ return {+ ...projectData,+ projectId,+ };}function ensureProjectDataHasProjectId(projectData: unknown) {- const existingProjectId = getProjectId(projectData);- if (existingProjectId) {- return {- projectId: existingProjectId,- projectData,- };- }-- const projectId = randomUUID();- return {- projectId,- projectData: withProjectId(projectData, projectId),- };+ const existingProjectId = getProjectId(projectData);+ if (existingProjectId) {+ return {+ projectId: existingProjectId,+ projectData,+ };+ }++ const projectId = randomUUID();+ return {+ projectId,+ projectData: withProjectId(projectData, projectId),+ };}async function resolveComparablePath(filePath: string) {- return fs.realpath(filePath).catch(() => path.resolve(filePath));+ return fs.realpath(filePath).catch(() => path.resolve(filePath));}/*** Prevents a named save from silently overwriting a different project file.*/async function ensureNamedProjectSaveDoesNotOverwriteDifferentProject(- targetProjectPath: string,- projectData: unknown,- activeProjectPath?: string | null,+ targetProjectPath: string,+ projectData: unknown,+ activeProjectPath?: string | null,) {- try {- await fs.stat(targetProjectPath);- } catch (error) {- if ((error as NodeJS.ErrnoException)?.code === "ENOENT") {- return { success: true };- }- throw error;- }-- const targetResolvedPath = await resolveComparablePath(targetProjectPath);- if (activeProjectPath) {- const activeResolvedPath = await resolveComparablePath(activeProjectPath);- if (activeResolvedPath === targetResolvedPath) {- return { success: true };- }- }-- const incomingProjectId = getProjectId(projectData);- const incomingVideoPath = getProjectVideoPath(projectData);-- try {- const existingProjectRaw = await fs.readFile(targetProjectPath, "utf-8");- const existingProjectData = parseJsonWithByteOrderMark(existingProjectRaw);- const existingProjectId = getProjectId(existingProjectData);- const existingVideoPath = getProjectVideoPath(existingProjectData);-- if (existingProjectId && incomingProjectId) {- if (existingProjectId === incomingProjectId) {- return { success: true };- }-- return {- success: false,- message: "A different project already uses this name",- };- }-- if (existingVideoPath && incomingVideoPath && existingVideoPath !== incomingVideoPath) {- return {- success: false,- message: "A different project already uses this name",- };- }-- if (!existingProjectId && !incomingProjectId && existingVideoPath && incomingVideoPath) {- return {- success: false,- message: "Unable to verify project identity for the chosen name",- };- }-- return {- success: false,- message: "Unable to verify project identity for the chosen name",- };- } catch (error) {- console.error("Failed to verify existing named project before overwrite:", error);- return {- success: false,- message: "Unable to verify project identity for the chosen name",- };- }+ try {+ await fs.stat(targetProjectPath);+ } catch (error) {+ if ((error as NodeJS.ErrnoException)?.code === "ENOENT") {+ return { success: true };+ }+ throw error;+ }++ const targetResolvedPath = await resolveComparablePath(targetProjectPath);+ if (activeProjectPath) {+ const activeResolvedPath = await resolveComparablePath(activeProjectPath);+ if (activeResolvedPath === targetResolvedPath) {+ return { success: true };+ }+ }++ const incomingProjectId = getProjectId(projectData);+ const incomingVideoPath = getProjectVideoPath(projectData);++ try {+ const existingProjectRaw = await fs.readFile(targetProjectPath, "utf-8");+ const existingProjectData = parseJsonWithByteOrderMark(existingProjectRaw);+ const existingProjectId = getProjectId(existingProjectData);+ const existingVideoPath = getProjectVideoPath(existingProjectData);++ if (existingProjectId && incomingProjectId) {+ if (existingProjectId === incomingProjectId) {+ return { success: true };+ }++ return {+ success: false,+ message: "A different project already uses this name",+ };+ }++ if (existingVideoPath && incomingVideoPath && existingVideoPath !== incomingVideoPath) {+ return {+ success: false,+ message: "A different project already uses this name",+ };+ }++ if (!existingProjectId && !incomingProjectId && existingVideoPath && incomingVideoPath) {+ return {+ success: false,+ message: "Unable to verify project identity for the chosen name",+ };+ }++ return {+ success: false,+ message: "Unable to verify project identity for the chosen name",+ };+ } catch (error) {+ console.error("Failed to verify existing named project before overwrite:", error);+ return {+ success: false,+ message: "Unable to verify project identity for the chosen name",+ };+ }}export function registerProjectHandlers() {- ipcMain.handle('reveal-in-folder', async (_, filePath: string) => {- try {- // shell.showItemInFolder doesn't return a value, it throws on error- shell.showItemInFolder(filePath);- return { success: true };- } catch (error) {- console.error(`Error revealing item in folder: ${filePath}`, error);- // Fallback to open the directory if revealing the item fails- // This might happen if the file was moved or deleted after export,- // or if the path is somehow invalid for showItemInFolder- try {- const openPathResult = await shell.openPath(path.dirname(filePath));- if (openPathResult) {- // openPath returned an error message- return { success: false, error: openPathResult };- }- return { success: true, message: 'Could not reveal item, but opened directory.' };- } catch (openError) {- console.error(`Error opening directory: ${path.dirname(filePath)}`, openError);- return { success: false, error: String(error) };- }- }- });-- ipcMain.handle('open-recordings-folder', async () => {- try {- const recordingsDir = await getRecordingsDir();- const openPathResult = await shell.openPath(recordingsDir);- if (openPathResult) {- return { success: false, error: openPathResult, message: 'Failed to open recordings folder.' };- }-- return { success: true };- } catch (error) {- console.error('Failed to open recordings folder:', error);- return { success: false, error: String(error), message: 'Failed to open recordings folder.' };- }- });-- ipcMain.handle('get-recordings-directory', async () => {- try {- const recordingsDir = await getRecordingsDir()- return {- success: true,- path: recordingsDir,- isDefault: recordingsDir === RECORDINGS_DIR,- }- } catch (error) {- return {- success: false,- path: RECORDINGS_DIR,- isDefault: true,- error: String(error),- }- }- })-- ipcMain.handle('choose-recordings-directory', async () => {- try {- const current = await getRecordingsDir()- const result = await dialog.showOpenDialog({- title: 'Choose recordings folder',- defaultPath: current,- properties: ['openDirectory', 'createDirectory', 'promptToCreate'],- })-- if (result.canceled || result.filePaths.length === 0) {- return { success: false, canceled: true, path: current }- }-- const selectedPath = path.resolve(result.filePaths[0])- await fs.mkdir(selectedPath, { recursive: true })- await fs.access(selectedPath, fsConstants.W_OK)- await persistRecordingsDirectorySetting(selectedPath)-- return { success: true, path: selectedPath, isDefault: selectedPath === RECORDINGS_DIR }- } catch (error) {- return { success: false, error: String(error), message: 'Failed to set recordings folder' }- }- })-- ipcMain.handle('save-project-file', async (_, projectData: unknown, suggestedName?: string, existingProjectPath?: string, thumbnailDataUrl?: string | null) => {- try {- const projectsDir = await getProjectsDir()- const preparedProject = ensureProjectDataHasProjectId(projectData)- const trustedExistingProjectPath = existingProjectPath &&- path.extname(existingProjectPath).toLowerCase() === `.${PROJECT_FILE_EXTENSION}` &&- (isTrustedProjectPath(existingProjectPath) || isPathInsideDirectory(existingProjectPath, projectsDir))- ? path.resolve(existingProjectPath)- : null-- if (trustedExistingProjectPath) {- await writeProjectFileAtomically(- trustedExistingProjectPath,- JSON.stringify(preparedProject.projectData, null, 2),- )- setCurrentProjectPath(trustedExistingProjectPath)- await saveProjectThumbnail(trustedExistingProjectPath, thumbnailDataUrl)- await rememberRecentProject(trustedExistingProjectPath)- return {- success: true,- path: trustedExistingProjectPath,- projectId: preparedProject.projectId,- message: 'Project saved successfully'- }- }-- if (existingProjectPath) {- return {- success: false,- message: 'Project path is no longer trusted. Use Save As to choose a project file.',- }- }-- const safeName = normalizeProjectSaveName(suggestedName) || `project-${Date.now()}`- const defaultName = `${safeName}.${PROJECT_FILE_EXTENSION}`-- const result = await dialog.showSaveDialog({- title: 'Save Recordly Project',- defaultPath: path.join(projectsDir, defaultName),- filters: [- { name: 'Recordly Project', extensions: [PROJECT_FILE_EXTENSION] },- { name: 'JSON', extensions: ['json'] }- ],- properties: ['createDirectory', 'showOverwriteConfirmation']- })-- if (result.canceled || !result.filePath) {- return {- success: false,- canceled: true,- message: 'Save project canceled'- }- }-- await writeProjectFileAtomically(- result.filePath,- JSON.stringify(preparedProject.projectData, null, 2),- )- setCurrentProjectPath(result.filePath)- await saveProjectThumbnail(result.filePath, thumbnailDataUrl)- await rememberRecentProject(result.filePath)-- return {- success: true,- path: result.filePath,- projectId: preparedProject.projectId,- message: 'Project saved successfully'- }- } catch (error) {- console.error('Failed to save project file:', error)- return {- success: false,- message: 'Failed to save project file',- error: String(error)- }- }- })-- ipcMain.handle('save-project-file-named', async (_, projectData: unknown, projectName: string, thumbnailDataUrl?: string | null, mode?: unknown) => {- try {- const normalizedProjectName = normalizeProjectSaveName(projectName)- if (!normalizedProjectName) {- return {- success: false,- message: 'Project name is required',- }- }-- const projectsDir = await getProjectsDir()- const namedSaveMode = normalizeNamedProjectSaveMode(mode)- const activeProjectPath = isTrustedProjectPath(currentProjectPath)- ? currentProjectPath- : null- const targetProjectPath = path.join(- projectsDir,- `${normalizedProjectName}.${PROJECT_FILE_EXTENSION}`,- )- const [activeResolvedPath, targetResolvedPath] = await Promise.all([- activeProjectPath ? resolveComparablePath(activeProjectPath) : Promise.resolve(null),- resolveComparablePath(targetProjectPath),- ])- const isSavingToDifferentPath =- !activeResolvedPath || activeResolvedPath !== targetResolvedPath- const preparedProject =- namedSaveMode === "copy" && isSavingToDifferentPath- ? (() => {- const projectId = randomUUID()- return {- projectId,- projectData: withProjectId(projectData, projectId),- }- })()- : ensureProjectDataHasProjectId(projectData)-- const overwriteCheck = await ensureNamedProjectSaveDoesNotOverwriteDifferentProject(- targetProjectPath,- preparedProject.projectData,- activeProjectPath,- )- if (!overwriteCheck.success) {- return overwriteCheck- }-- await writeProjectFileAtomically(- targetProjectPath,- JSON.stringify(preparedProject.projectData, null, 2),- )- await saveProjectThumbnail(targetProjectPath, thumbnailDataUrl)- await rememberRecentProject(targetProjectPath)-- if (namedSaveMode === "rename" && activeProjectPath && isSavingToDifferentPath) {- await fs.unlink(activeProjectPath).catch((unlinkError: NodeJS.ErrnoException) => {- if (unlinkError.code !== 'ENOENT') {- throw unlinkError- }- })- await fs.rm(getProjectThumbnailPath(activeProjectPath), { force: true }).catch(() => undefined)- await fs.rm(getProjectBackupPath(activeProjectPath), { force: true }).catch(() => undefined)-- const recentProjectPaths = await loadRecentProjectPaths()- const filteredRecentProjectPaths: string[] = []- for (const recentProjectPath of recentProjectPaths) {- const recentResolvedPath = await resolveComparablePath(recentProjectPath)- if (recentResolvedPath !== activeResolvedPath) {- filteredRecentProjectPaths.push(recentProjectPath)- }- }- await saveRecentProjectPaths(filteredRecentProjectPaths)- }-- setCurrentProjectPath(targetProjectPath)-- return {- success: true,- path: targetProjectPath,- projectId: preparedProject.projectId,- message: 'Project saved successfully'- }- } catch (error) {- console.error('Failed to save named project file:', error)- return {- success: false,- message: 'Failed to save project file',- error: String(error)- }- }- })-- ipcMain.handle('load-project-file', async () => {- try {- const projectsDir = await getProjectsDir()- const result = await dialog.showOpenDialog({- title: 'Open Recordly Project',- defaultPath: projectsDir,- filters: [- { name: 'Recordly Project', extensions: [PROJECT_FILE_EXTENSION, ...LEGACY_PROJECT_FILE_EXTENSIONS] },- { name: 'JSON', extensions: ['json'] },- { name: 'All Files', extensions: ['*'] }- ],- properties: ['openFile']- })-- if (result.canceled || result.filePaths.length === 0) {- return { success: false, canceled: true, message: 'Open project canceled' }- }-- return await loadProjectFromPath(result.filePaths[0])- } catch (error) {- console.error('Failed to load project file:', error)- return {- success: false,- message: 'Failed to load project file',- error: String(error)- }- }- })-- ipcMain.handle('load-current-project-file', async () => {- try {- if (!currentProjectPath) {- return { success: false, message: 'No active project' }- }-- return await loadProjectFromPath(currentProjectPath)- } catch (error) {- console.error('Failed to load current project file:', error)- return {- success: false,- message: 'Failed to load current project file',- error: String(error),- }- }- })-- ipcMain.handle('get-projects-directory', async () => {- try {- return {- success: true,- path: await getProjectsDir(),- }- } catch (error) {- return {- success: false,- error: String(error),- }- }- })-- ipcMain.handle('list-project-files', async () => {- try {- const library = await listProjectLibraryEntries()- return {- success: true,- projectsDir: library.projectsDir,- entries: library.entries,- }- } catch (error) {- return {- success: false,- projectsDir: null,- entries: [],- error: String(error),- }- }- })-- ipcMain.handle('open-project-file-at-path', async (_, filePath: string) => {- try {- return await loadProjectFromPath(filePath)- } catch (error) {- console.error('Failed to open project file at path:', error)- return {- success: false,- message: 'Failed to open project file',- error: String(error),- }- }- })-- ipcMain.handle('open-projects-directory', async () => {- try {- const projectsDir = await getProjectsDir()- const openPathResult = await shell.openPath(projectsDir)- if (openPathResult) {- return { success: false, error: openPathResult, message: 'Failed to open projects folder.' }- }-- return { success: true, path: projectsDir }- } catch (error) {- console.error('Failed to open projects folder:', error)- return { success: false, error: String(error), message: 'Failed to open projects folder.' }- }- })- ipcMain.handle('set-current-video-path', async (_, path: string, options?: { preserveProjectPath?: boolean; hideOverlayCursorByDefault?: boolean }) => {- setCurrentVideoPath(normalizeVideoSourcePath(path) ?? path)- approveUserPath(currentVideoPath)- const resolvedSession = await resolveRecordingSession(currentVideoPath)- ?? {- videoPath: currentVideoPath!,- webcamPath: null,- timeOffsetMs: 0,- }-- const nextSession = {- ...resolvedSession,- hideOverlayCursorByDefault:- normalizeBoolean(options?.hideOverlayCursorByDefault) ||- normalizeBoolean(resolvedSession.hideOverlayCursorByDefault),- }-- setCurrentRecordingSession(nextSession)- await replaceApprovedSessionLocalReadPaths([- resolvedSession.videoPath,- resolvedSession.webcamPath,- ])-- if (nextSession.webcamPath) {- await persistRecordingSessionManifest(nextSession)- }-- if (!options?.preserveProjectPath) {- setCurrentProjectPath(null)- }-- for (const window of BrowserWindow.getAllWindows()) {- if (!window.isDestroyed()) {- window.webContents.send('recording-session-changed', nextSession);- }- }-- return { success: true, webcamPath: nextSession.webcamPath ?? null }- })-- ipcMain.handle('set-current-recording-session', async (_, session: { videoPath: string; webcamPath?: string | null; timeOffsetMs?: number; hideOverlayCursorByDefault?: boolean }, options?: { preserveProjectPath?: boolean }) => {- const normalizedVideoPath = normalizeVideoSourcePath(session.videoPath) ?? session.videoPath- setCurrentVideoPath(normalizedVideoPath)- setCurrentRecordingSession({- videoPath: normalizedVideoPath,- webcamPath: normalizeVideoSourcePath(session.webcamPath ?? null),- timeOffsetMs: normalizeRecordingTimeOffsetMs(session.timeOffsetMs),- hideOverlayCursorByDefault: normalizeBoolean(session.hideOverlayCursorByDefault),- });- await rememberApprovedLocalReadPath(currentRecordingSession!.videoPath)- await rememberApprovedLocalReadPath(currentRecordingSession!.webcamPath)- if (!options?.preserveProjectPath) {- setCurrentProjectPath(null)- }- await persistRecordingSessionManifest(currentRecordingSession!)-- for (const window of BrowserWindow.getAllWindows()) {- if (!window.isDestroyed()) {- window.webContents.send('recording-session-changed', currentRecordingSession);- }- }-- return { success: true }- })-- ipcMain.handle('get-current-recording-session', () => {- if (!currentRecordingSession) {- return { success: false }- }-- return {- success: true,- session: currentRecordingSession,- }- })-- ipcMain.handle('get-current-video-path', () => {- return currentVideoPath ? { success: true, path: currentVideoPath } : { success: false };- });-- ipcMain.handle('clear-current-video-path', () => {- setCurrentVideoPath(null);- setCurrentRecordingSession(null);- return { success: true };- });-- ipcMain.handle('delete-recording-file', async (_, filePath: string) => {- try {- if (!filePath) {- return { success: false, error: 'Only auto-generated recordings can be deleted' };- }- const resolvedPath = await fs.realpath(filePath).catch(() => path.resolve(filePath));+ ipcMain.handle("reveal-in-folder", async (_, filePath: string) => {+ try {+ // shell.showItemInFolder doesn't return a value, it throws on error+ shell.showItemInFolder(filePath);+ return { success: true };+ } catch (error) {+ console.error(`Error revealing item in folder: ${filePath}`, error);+ // Fallback to open the directory if revealing the item fails+ // This might happen if the file was moved or deleted after export,+ // or if the path is somehow invalid for showItemInFolder+ try {+ const openPathResult = await shell.openPath(path.dirname(filePath));+ if (openPathResult) {+ // openPath returned an error message+ return { success: false, error: openPathResult };+ }+ return { success: true, message: "Could not reveal item, but opened directory." };+ } catch (openError) {+ console.error(`Error opening directory: ${path.dirname(filePath)}`, openError);+ return { success: false, error: String(error) };+ }+ }+ });++ ipcMain.handle("open-recordings-folder", async () => {+ try {+ const recordingsDir = await getRecordingsDir();+ const openPathResult = await shell.openPath(recordingsDir);+ if (openPathResult) {+ return {+ success: false,+ error: openPathResult,+ message: "Failed to open recordings folder.",+ };+ }++ return { success: true };+ } catch (error) {+ console.error("Failed to open recordings folder:", error);+ return {+ success: false,+ error: String(error),+ message: "Failed to open recordings folder.",+ };+ }+ });++ ipcMain.handle("get-recordings-directory", async () => {+ try {+ const recordingsDir = await getRecordingsDir();+ return {+ success: true,+ path: recordingsDir,+ isDefault: recordingsDir === RECORDINGS_DIR,+ };+ } catch (error) {+ return {+ success: false,+ path: RECORDINGS_DIR,+ isDefault: true,+ error: String(error),+ };+ }+ });++ ipcMain.handle("choose-recordings-directory", async () => {+ try {+ const current = await getRecordingsDir();+ const result = await dialog.showOpenDialog({+ title: "Choose recordings folder",+ defaultPath: current,+ properties: ["openDirectory", "createDirectory", "promptToCreate"],+ });++ if (result.canceled || result.filePaths.length === 0) {+ return { success: false, canceled: true, path: current };+ }++ const selectedPath = path.resolve(result.filePaths[0]);+ await fs.mkdir(selectedPath, { recursive: true });+ await fs.access(selectedPath, fsConstants.W_OK);+ await persistRecordingsDirectorySetting(selectedPath);++ return {+ success: true,+ path: selectedPath,+ isDefault: selectedPath === RECORDINGS_DIR,+ };+ } catch (error) {+ return {+ success: false,+ error: String(error),+ message: "Failed to set recordings folder",+ };+ }+ });++ ipcMain.handle(+ "save-project-file",+ async (+ _,+ projectData: unknown,+ suggestedName?: string,+ existingProjectPath?: string,+ thumbnailDataUrl?: string | null,+ ) => {+ try {+ const projectsDir = await getProjectsDir();+ const preparedProject = ensureProjectDataHasProjectId(projectData);+ const trustedExistingProjectPath =+ existingProjectPath &&+ path.extname(existingProjectPath).toLowerCase() ===+ `.${PROJECT_FILE_EXTENSION}` &&+ (isTrustedProjectPath(existingProjectPath) ||+ isPathInsideDirectory(existingProjectPath, projectsDir))+ ? path.resolve(existingProjectPath)+ : null;++ if (trustedExistingProjectPath) {+ await writeProjectFileAtomically(+ trustedExistingProjectPath,+ JSON.stringify(preparedProject.projectData, null, 2),+ );+ setCurrentProjectPath(trustedExistingProjectPath);+ await saveProjectThumbnail(trustedExistingProjectPath, thumbnailDataUrl);+ await rememberRecentProject(trustedExistingProjectPath);+ return {+ success: true,+ path: trustedExistingProjectPath,+ projectId: preparedProject.projectId,+ message: "Project saved successfully",+ };+ }++ if (existingProjectPath) {+ return {+ success: false,+ message:+ "Project path is no longer trusted. Use Save As to choose a project file.",+ };+ }++ const safeName = normalizeProjectSaveName(suggestedName) || `project-${Date.now()}`;+ const defaultName = `${safeName}.${PROJECT_FILE_EXTENSION}`;++ const result = await dialog.showSaveDialog({+ title: "Save Recordly Project",+ defaultPath: path.join(projectsDir, defaultName),+ filters: [+ { name: "Recordly Project", extensions: [PROJECT_FILE_EXTENSION] },+ { name: "JSON", extensions: ["json"] },+ ],+ properties: ["createDirectory", "showOverwriteConfirmation"],+ });++ if (result.canceled || !result.filePath) {+ return {+ success: false,+ canceled: true,+ message: "Save project canceled",+ };+ }++ await writeProjectFileAtomically(+ result.filePath,+ JSON.stringify(preparedProject.projectData, null, 2),+ );+ setCurrentProjectPath(result.filePath);+ await saveProjectThumbnail(result.filePath, thumbnailDataUrl);+ await rememberRecentProject(result.filePath);++ return {+ success: true,+ path: result.filePath,+ projectId: preparedProject.projectId,+ message: "Project saved successfully",+ };+ } catch (error) {+ console.error("Failed to save project file:", error);+ return {+ success: false,+ message: "Failed to save project file",+ error: String(error),+ };+ }+ },+ );++ ipcMain.handle(+ "save-project-file-named",+ async (+ _,+ projectData: unknown,+ projectName: string,+ thumbnailDataUrl?: string | null,+ mode?: unknown,+ ) => {+ try {+ const normalizedProjectName = normalizeProjectSaveName(projectName);+ if (!normalizedProjectName) {+ return {+ success: false,+ message: "Project name is required",+ };+ }++ const projectsDir = await getProjectsDir();+ const namedSaveMode = normalizeNamedProjectSaveMode(mode);+ const activeProjectPath = isTrustedProjectPath(currentProjectPath)+ ? currentProjectPath+ : null;+ const targetProjectPath = path.join(+ projectsDir,+ `${normalizedProjectName}.${PROJECT_FILE_EXTENSION}`,+ );+ const [activeResolvedPath, targetResolvedPath] = await Promise.all([+ activeProjectPath+ ? resolveComparablePath(activeProjectPath)+ : Promise.resolve(null),+ resolveComparablePath(targetProjectPath),+ ]);+ const isSavingToDifferentPath =+ !activeResolvedPath || activeResolvedPath !== targetResolvedPath;+ const preparedProject =+ namedSaveMode === "copy" && isSavingToDifferentPath+ ? (() => {+ const projectId = randomUUID();+ return {+ projectId,+ projectData: withProjectId(projectData, projectId),+ };+ })()+ : ensureProjectDataHasProjectId(projectData);++ const overwriteCheck = await ensureNamedProjectSaveDoesNotOverwriteDifferentProject(+ targetProjectPath,+ preparedProject.projectData,+ activeProjectPath,+ );+ if (!overwriteCheck.success) {+ return overwriteCheck;+ }++ await writeProjectFileAtomically(+ targetProjectPath,+ JSON.stringify(preparedProject.projectData, null, 2),+ );+ await saveProjectThumbnail(targetProjectPath, thumbnailDataUrl);+ await rememberRecentProject(targetProjectPath);++ if (namedSaveMode === "rename" && activeProjectPath && isSavingToDifferentPath) {+ await fs+ .unlink(activeProjectPath)+ .catch((unlinkError: NodeJS.ErrnoException) => {+ if (unlinkError.code !== "ENOENT") {+ throw unlinkError;+ }+ });+ await fs+ .rm(getProjectThumbnailPath(activeProjectPath), { force: true })+ .catch(() => undefined);+ await fs+ .rm(getProjectBackupPath(activeProjectPath), { force: true })+ .catch(() => undefined);++ const recentProjectPaths = await loadRecentProjectPaths();+ const filteredRecentProjectPaths: string[] = [];+ for (const recentProjectPath of recentProjectPaths) {+ const recentResolvedPath = await resolveComparablePath(recentProjectPath);+ if (recentResolvedPath !== activeResolvedPath) {+ filteredRecentProjectPaths.push(recentProjectPath);+ }+ }+ await saveRecentProjectPaths(filteredRecentProjectPaths);+ }++ setCurrentProjectPath(targetProjectPath);++ return {+ success: true,+ path: targetProjectPath,+ projectId: preparedProject.projectId,+ message: "Project saved successfully",+ };+ } catch (error) {+ console.error("Failed to save named project file:", error);+ return {+ success: false,+ message: "Failed to save project file",+ error: String(error),+ };+ }+ },+ );++ ipcMain.handle("load-project-file", async () => {+ try {+ const projectsDir = await getProjectsDir();+ const result = await dialog.showOpenDialog({+ title: "Open Recordly Project",+ defaultPath: projectsDir,+ filters: [+ {+ name: "Recordly Project",+ extensions: [PROJECT_FILE_EXTENSION, ...LEGACY_PROJECT_FILE_EXTENSIONS],+ },+ { name: "JSON", extensions: ["json"] },+ { name: "All Files", extensions: ["*"] },+ ],+ properties: ["openFile"],+ });++ if (result.canceled || result.filePaths.length === 0) {+ return { success: false, canceled: true, message: "Open project canceled" };+ }++ return await loadProjectFromPath(result.filePaths[0]);+ } catch (error) {+ console.error("Failed to load project file:", error);+ return {+ success: false,+ message: "Failed to load project file",+ error: String(error),+ };+ }+ });++ ipcMain.handle("load-current-project-file", async () => {+ try {+ if (!currentProjectPath) {+ return { success: false, message: "No active project" };+ }++ return await loadProjectFromPath(currentProjectPath);+ } catch (error) {+ console.error("Failed to load current project file:", error);+ return {+ success: false,+ message: "Failed to load current project file",+ error: String(error),+ };+ }+ });++ ipcMain.handle("get-projects-directory", async () => {+ try {+ return {+ success: true,+ path: await getProjectsDir(),+ };+ } catch (error) {+ return {+ success: false,+ error: String(error),+ };+ }+ });++ ipcMain.handle("list-project-files", async () => {+ try {+ const library = await listProjectLibraryEntries();+ return {+ success: true,+ projectsDir: library.projectsDir,+ entries: library.entries,+ };+ } catch (error) {+ return {+ success: false,+ projectsDir: null,+ entries: [],+ error: String(error),+ };+ }+ });++ ipcMain.handle("open-project-file-at-path", async (_, filePath: string) => {+ try {+ return await loadProjectFromPath(filePath);+ } catch (error) {+ console.error("Failed to open project file at path:", error);+ return {+ success: false,+ message: "Failed to open project file",+ error: String(error),+ };+ }+ });++ ipcMain.handle("open-projects-directory", async () => {+ try {+ const projectsDir = await getProjectsDir();+ const openPathResult = await shell.openPath(projectsDir);+ if (openPathResult) {+ return {+ success: false,+ error: openPathResult,+ message: "Failed to open projects folder.",+ };+ }++ return { success: true, path: projectsDir };+ } catch (error) {+ console.error("Failed to open projects folder:", error);+ return {+ success: false,+ error: String(error),+ message: "Failed to open projects folder.",+ };+ }+ });+ ipcMain.handle(+ "set-current-video-path",+ async (+ _,+ path: string,+ options?: { preserveProjectPath?: boolean; hideOverlayCursorByDefault?: boolean },+ ) => {+ setCurrentVideoPath(normalizeVideoSourcePath(path) ?? path);+ approveUserPath(currentVideoPath);+ const resolvedSession = (await resolveRecordingSession(currentVideoPath)) ?? {+ videoPath: currentVideoPath!,+ webcamPath: null,+ timeOffsetMs: 0,+ };++ const nextSession = {+ ...resolvedSession,+ hideOverlayCursorByDefault:+ normalizeBoolean(options?.hideOverlayCursorByDefault) ||+ normalizeBoolean(resolvedSession.hideOverlayCursorByDefault),+ };++ setCurrentRecordingSession(nextSession);+ await replaceApprovedSessionLocalReadPaths([+ resolvedSession.videoPath,+ resolvedSession.webcamPath,+ ]);++ if (nextSession.webcamPath) {+ await persistRecordingSessionManifest(nextSession);+ }++ if (!options?.preserveProjectPath) {+ setCurrentProjectPath(null);+ }++ for (const window of BrowserWindow.getAllWindows()) {+ if (!window.isDestroyed()) {+ window.webContents.send("recording-session-changed", nextSession);+ }+ }++ return { success: true, webcamPath: nextSession.webcamPath ?? null };+ },+ );++ ipcMain.handle(+ "set-current-recording-session",+ async (+ _,+ session: {+ videoPath: string;+ webcamPath?: string | null;+ timeOffsetMs?: number;+ hideOverlayCursorByDefault?: boolean;+ },+ options?: { preserveProjectPath?: boolean },+ ) => {+ const normalizedVideoPath =+ normalizeVideoSourcePath(session.videoPath) ?? session.videoPath;+ setCurrentVideoPath(normalizedVideoPath);+ setCurrentRecordingSession({+ videoPath: normalizedVideoPath,+ webcamPath: normalizeVideoSourcePath(session.webcamPath ?? null),+ timeOffsetMs: normalizeRecordingTimeOffsetMs(session.timeOffsetMs),+ hideOverlayCursorByDefault: normalizeBoolean(session.hideOverlayCursorByDefault),+ });+ await rememberApprovedLocalReadPath(currentRecordingSession!.videoPath);+ await rememberApprovedLocalReadPath(currentRecordingSession!.webcamPath);+ if (!options?.preserveProjectPath) {+ setCurrentProjectPath(null);+ }+ await persistRecordingSessionManifest(currentRecordingSession!);++ for (const window of BrowserWindow.getAllWindows()) {+ if (!window.isDestroyed()) {+ window.webContents.send("recording-session-changed", currentRecordingSession);+ }+ }++ return { success: true };+ },+ );++ ipcMain.handle("get-current-recording-session", () => {+ if (!currentRecordingSession) {+ return { success: false };+ }++ return {+ success: true,+ session: currentRecordingSession,+ };+ });++ ipcMain.handle("get-current-video-path", () => {+ return currentVideoPath ? { success: true, path: currentVideoPath } : { success: false };+ });++ ipcMain.handle("clear-current-video-path", () => {+ setCurrentVideoPath(null);+ setCurrentRecordingSession(null);+ return { success: true };+ });++ ipcMain.handle("delete-recording-file", async (_, filePath: string) => {+ try {+ if (!filePath) {+ return { success: false, error: "Only auto-generated recordings can be deleted" };+ }+ const resolvedPath = await fs.realpath(filePath).catch(() => path.resolve(filePath));const recordingsDirRaw = await getRecordingsDir();- const recordingsDir = await fs.realpath(recordingsDirRaw).catch(() => path.resolve(recordingsDirRaw));- if (!isPathInsideDirectory(resolvedPath, recordingsDir) || !isAutoRecordingPath(resolvedPath)) {- return { success: false, error: 'Only auto-generated recordings can be deleted' };- }- await fs.unlink(resolvedPath);- // Also delete the cursor telemetry sidecar if it exists- const telemetryPath = getTelemetryPathForVideo(resolvedPath);- await fs.unlink(telemetryPath).catch(() => undefined);+ const recordingsDir = await fs+ .realpath(recordingsDirRaw)+ .catch(() => path.resolve(recordingsDirRaw));+ if (+ !isPathInsideDirectory(resolvedPath, recordingsDir) ||+ !isAutoRecordingPath(resolvedPath)+ ) {+ return { success: false, error: "Only auto-generated recordings can be deleted" };+ }+ await fs.unlink(resolvedPath);+ // Also delete the cursor telemetry sidecar if it exists+ const telemetryPath = getTelemetryPathForVideo(resolvedPath);+ await fs.unlink(telemetryPath).catch(() => undefined);const currentResolved = currentVideoPath? await fs.realpath(currentVideoPath).catch(() => currentVideoPath): null;if (currentResolved === resolvedPath) {- setCurrentVideoPath(null);- setCurrentRecordingSession(null);- }- return { success: true };- } catch (error) {- return { success: false, error: String(error) };- }- });-- ipcMain.handle('get-local-media-url', async (_, filePath: string) => {- const baseUrl = getMediaServerBaseUrl();- if (!baseUrl || !filePath) {- return { success: false as const };- }- const resolved = await resolveApprovedLocalMediaPath(filePath);- if (!resolved) {- const normalized = path.resolve(filePath);- console.warn(`[get-local-media-url] Blocked disallowed path: ${normalized}`);- return { success: false as const };- }- return { success: true as const, url: buildMediaUrl(baseUrl, resolved) };- });-+ setCurrentVideoPath(null);+ setCurrentRecordingSession(null);+ }+ return { success: true };+ } catch (error) {+ return { success: false, error: String(error) };+ }+ });++ ipcMain.handle("get-local-media-url", async (_, filePath: string) => {+ const baseUrl = getMediaServerBaseUrl();+ if (!baseUrl || !filePath) {+ return { success: false as const };+ }+ const resolved = await resolveApprovedLocalMediaPath(filePath);+ if (!resolved) {+ const normalized = path.resolve(filePath);+ console.warn(`[get-local-media-url] Blocked disallowed path: ${normalized}`);+ return { success: false as const };+ }+ return { success: true as const, url: buildMediaUrl(baseUrl, resolved) };+ });}diff --git a/electron/ipc/register/recording.ts b/electron/ipc/register/recording.tsindex fa9b32f3..3e03d970 100644--- a/electron/ipc/register/recording.ts+++ b/electron/ipc/register/recording.ts@@ -435,13 +435,16 @@ export function registerRecordingHandlers(const recordingsDir = await getRecordingsDir();const timestamp = Date.now();const outputPath = path.join(recordingsDir, `recording-${timestamp}.mp4`);- tempVideoPath = path.join(app.getPath("temp"), `recordly-native-${timestamp}.mp4`);-+ tempVideoPath = path.join(+ app.getPath("temp"),+ `recordly-native-${timestamp}.mp4`,+ );+let captureOutput = "";let systemAudioPath: string | null = null;let microphonePath: string | null = null;let orphanedMicAudioPath: string | null = null;-+const browserMicFallbackRequested =shouldStartWindowsBrowserMicrophoneFallback(options);const captureTarget = resolveWindowsCaptureTarget(@@ -484,7 +487,7 @@ export function registerRecordingHandlers(// Fallback to coordinate-based matching if handle resolution failsconfig.displayId = captureTarget.displayId;}-+config.displayX = Math.round(captureTarget.bounds.x);config.displayY = Math.round(captureTarget.bounds.y);config.displayW = Math.round(captureTarget.bounds.width);@@ -509,7 +512,10 @@ export function registerRecordingHandlers(if (options?.capturesMicrophone && !browserMicFallbackRequested) {microphonePath = path.join(recordingsDir, `recording-${timestamp}.mic.wav`);- tempMicPath = path.join(app.getPath("temp"), `recordly-native-${timestamp}.mic.wav`);+ tempMicPath = path.join(+ app.getPath("temp"),+ `recordly-native-${timestamp}.mic.wav`,+ );config.captureMic = true;config.micOutputPath = tempMicPath;if (options.microphoneLabel) {@@ -907,333 +913,337 @@ export function registerRecordingHandlers(const start = Date.now();console.log("[PERF:MAIN] Handler: stop-native-screen-recording: STARTED");try {- // Windows native capture stop path- if (process.platform === "win32" && windowsNativeCaptureActive) {- let stagedTempVideoPath: string | null = null;- let stagedTempSystemAudioPath: string | null = null;- let stagedTempMicAudioPath: string | null = null;- try {- if (!windowsCaptureProcess) {- throw new Error("Native Windows capture process is not running");- }-- const proc = windowsCaptureProcess;- const preferredVideoPath = windowsCaptureTargetPath;- const preferredOrphanedMicAudioPath = windowsOrphanedMicAudioPath;- const diagnosticsSystemAudioPath = windowsSystemAudioPath;- const diagnosticsMicAudioPath = windowsMicAudioPath;- setWindowsCaptureStopRequested(true);- proc.stdin.write("stop\n");- const tempVideoPath = await waitForWindowsCaptureStop(proc);- stagedTempVideoPath = tempVideoPath;- const finalVideoPath = preferredVideoPath ?? tempVideoPath;+ // Windows native capture stop path+ if (process.platform === "win32" && windowsNativeCaptureActive) {+ let stagedTempVideoPath: string | null = null;+ let stagedTempSystemAudioPath: string | null = null;+ let stagedTempMicAudioPath: string | null = null;+ try {+ if (!windowsCaptureProcess) {+ throw new Error("Native Windows capture process is not running");+ }- // Native Windows capture results are initially written to a safe temporary path- // (to avoid encoding failures with non-ASCII characters). We move them to the final- // destination now using Node.js, which handles Unicode paths correctly.- if (tempVideoPath !== finalVideoPath) {- await moveFileWithOverwrite(tempVideoPath, finalVideoPath);- }+ const proc = windowsCaptureProcess;+ const preferredVideoPath = windowsCaptureTargetPath;+ const preferredOrphanedMicAudioPath = windowsOrphanedMicAudioPath;+ const diagnosticsSystemAudioPath = windowsSystemAudioPath;+ const diagnosticsMicAudioPath = windowsMicAudioPath;+ setWindowsCaptureStopRequested(true);+ proc.stdin.write("stop\n");+ const tempVideoPath = await waitForWindowsCaptureStop(proc);+ stagedTempVideoPath = tempVideoPath;+ const finalVideoPath = preferredVideoPath ?? tempVideoPath;++ // Native Windows capture results are initially written to a safe temporary path+ // (to avoid encoding failures with non-ASCII characters). We move them to the final+ // destination now using Node.js, which handles Unicode paths correctly.+ if (tempVideoPath !== finalVideoPath) {+ await moveFileWithOverwrite(tempVideoPath, finalVideoPath);+ }- if (windowsSystemAudioPath && tempVideoPath.endsWith(".mp4")) {- const tempAudioPath = tempVideoPath.replace(".mp4", ".system.wav");- stagedTempSystemAudioPath = tempAudioPath;- const finalAudioPath = windowsSystemAudioPath;- if (await pathExists(tempAudioPath)) {- await moveFileWithOverwrite(tempAudioPath, finalAudioPath);- const tempJson = tempAudioPath + ".json";- if (await pathExists(tempJson)) {- await moveFileWithOverwrite(tempJson, finalAudioPath + ".json");+ if (windowsSystemAudioPath && tempVideoPath.endsWith(".mp4")) {+ const tempAudioPath = tempVideoPath.replace(".mp4", ".system.wav");+ stagedTempSystemAudioPath = tempAudioPath;+ const finalAudioPath = windowsSystemAudioPath;+ if (await pathExists(tempAudioPath)) {+ await moveFileWithOverwrite(tempAudioPath, finalAudioPath);+ const tempJson = tempAudioPath + ".json";+ if (await pathExists(tempJson)) {+ await moveFileWithOverwrite(tempJson, finalAudioPath + ".json");+ }}}- }- if (windowsMicAudioPath && tempVideoPath.endsWith(".mp4")) {- const tempMicPath = tempVideoPath.replace(".mp4", ".mic.wav");- stagedTempMicAudioPath = tempMicPath;- const finalMicPath = windowsMicAudioPath;- if (await pathExists(tempMicPath)) {- await moveFileWithOverwrite(tempMicPath, finalMicPath);- const tempJson = tempMicPath + ".json";- if (await pathExists(tempJson)) {- await moveFileWithOverwrite(tempJson, finalMicPath + ".json");+ if (windowsMicAudioPath && tempVideoPath.endsWith(".mp4")) {+ const tempMicPath = tempVideoPath.replace(".mp4", ".mic.wav");+ stagedTempMicAudioPath = tempMicPath;+ const finalMicPath = windowsMicAudioPath;+ if (await pathExists(tempMicPath)) {+ await moveFileWithOverwrite(tempMicPath, finalMicPath);+ const tempJson = tempMicPath + ".json";+ if (await pathExists(tempJson)) {+ await moveFileWithOverwrite(tempJson, finalMicPath + ".json");+ }}}- }- const validation = await validateRecordedVideo(finalVideoPath);+ const validation = await validateRecordedVideo(finalVideoPath);- setWindowsCaptureProcess(null);- setWindowsNativeCaptureActive(false);- setNativeScreenRecordingActive(false);- setWindowsCaptureTargetPath(null);- setWindowsCaptureStopRequested(false);- setWindowsCapturePaused(false);- setWindowsOrphanedMicAudioPath(null);- await cleanupWindowsOrphanedMicAudioPath(preferredOrphanedMicAudioPath);- setWindowsPendingVideoPath(finalVideoPath);- recordNativeCaptureDiagnostics({- backend: "windows-wgc",- phase: "stop",- outputPath: finalVideoPath,- systemAudioPath: diagnosticsSystemAudioPath,- microphonePath: diagnosticsMicAudioPath,- processOutput: windowsCaptureOutputBuffer.trim() || undefined,- fileSizeBytes: validation.fileSizeBytes,- });- await writeWindowsRecordingDiagnostics(finalVideoPath, {- phase: "stop",- outputPath: finalVideoPath,- systemAudioPath: diagnosticsSystemAudioPath,- microphonePath: diagnosticsMicAudioPath,- processOutput: windowsCaptureOutputBuffer.trim() || undefined,- details: {+ setWindowsCaptureProcess(null);+ setWindowsNativeCaptureActive(false);+ setNativeScreenRecordingActive(false);+ setWindowsCaptureTargetPath(null);+ setWindowsCaptureStopRequested(false);+ setWindowsCapturePaused(false);+ setWindowsOrphanedMicAudioPath(null);+ await cleanupWindowsOrphanedMicAudioPath(preferredOrphanedMicAudioPath);+ setWindowsPendingVideoPath(finalVideoPath);+ recordNativeCaptureDiagnostics({+ backend: "windows-wgc",+ phase: "stop",+ outputPath: finalVideoPath,+ systemAudioPath: diagnosticsSystemAudioPath,+ microphonePath: diagnosticsMicAudioPath,+ processOutput: windowsCaptureOutputBuffer.trim() || undefined,fileSizeBytes: validation.fileSizeBytes,- durationSeconds: validation.durationSeconds,- },- });+ });+ await writeWindowsRecordingDiagnostics(finalVideoPath, {+ phase: "stop",+ outputPath: finalVideoPath,+ systemAudioPath: diagnosticsSystemAudioPath,+ microphonePath: diagnosticsMicAudioPath,+ processOutput: windowsCaptureOutputBuffer.trim() || undefined,+ details: {+ fileSizeBytes: validation.fileSizeBytes,+ durationSeconds: validation.durationSeconds,+ },+ });- // Persist cursor telemetry before returning so the editor can find it immediately- snapshotCursorTelemetryForPersistence();- try {- await persistPendingCursorTelemetry(finalVideoPath);- } catch (error) {- console.warn("Failed to persist cursor telemetry during native stop:", error);- }+ // Persist cursor telemetry before returning so the editor can find it immediately+ snapshotCursorTelemetryForPersistence();+ try {+ await persistPendingCursorTelemetry(finalVideoPath);+ } catch (error) {+ console.warn(+ "Failed to persist cursor telemetry during native stop:",+ error,+ );+ }- return { success: true, path: finalVideoPath };- } catch (error) {- console.error("Failed to stop native Windows capture:", error);- const fallbackPath = await resolveExistingPath(- windowsCaptureTargetPath,- stagedTempVideoPath,- );- const recoveredSystemAudioPath = await resolveExistingPath(- windowsSystemAudioPath,- stagedTempSystemAudioPath,- );- const recoveredMicAudioPath = await resolveExistingPath(- windowsMicAudioPath,- stagedTempMicAudioPath,- );- const fallbackOrphanedMicAudioPath = windowsOrphanedMicAudioPath;- const diagnosticsSystemAudioPath = recoveredSystemAudioPath ?? windowsSystemAudioPath;- const diagnosticsMicAudioPath = recoveredMicAudioPath ?? windowsMicAudioPath;- setWindowsNativeCaptureActive(false);- setNativeScreenRecordingActive(false);- setWindowsCaptureProcess(null);- setWindowsCaptureTargetPath(null);- setWindowsCaptureStopRequested(false);- setWindowsCapturePaused(false);- setWindowsOrphanedMicAudioPath(null);+ return { success: true, path: finalVideoPath };+ } catch (error) {+ console.error("Failed to stop native Windows capture:", error);+ const fallbackPath = await resolveExistingPath(+ windowsCaptureTargetPath,+ stagedTempVideoPath,+ );+ const recoveredSystemAudioPath = await resolveExistingPath(+ windowsSystemAudioPath,+ stagedTempSystemAudioPath,+ );+ const recoveredMicAudioPath = await resolveExistingPath(+ windowsMicAudioPath,+ stagedTempMicAudioPath,+ );+ const fallbackOrphanedMicAudioPath = windowsOrphanedMicAudioPath;+ const diagnosticsSystemAudioPath =+ recoveredSystemAudioPath ?? windowsSystemAudioPath;+ const diagnosticsMicAudioPath = recoveredMicAudioPath ?? windowsMicAudioPath;+ setWindowsNativeCaptureActive(false);+ setNativeScreenRecordingActive(false);+ setWindowsCaptureProcess(null);+ setWindowsCaptureTargetPath(null);+ setWindowsCaptureStopRequested(false);+ setWindowsCapturePaused(false);+ setWindowsOrphanedMicAudioPath(null);- if (fallbackPath) {- try {- const validation = await validateRecordedVideo(fallbackPath);- setWindowsPendingVideoPath(fallbackPath);- setWindowsSystemAudioPath(recoveredSystemAudioPath);- setWindowsMicAudioPath(recoveredMicAudioPath);- await cleanupWindowsOrphanedMicAudioPath(fallbackOrphanedMicAudioPath);- recordNativeCaptureDiagnostics({- backend: "windows-wgc",- phase: "stop",- outputPath: fallbackPath,- systemAudioPath: diagnosticsSystemAudioPath,- microphonePath: diagnosticsMicAudioPath,- processOutput: windowsCaptureOutputBuffer.trim() || undefined,- fileSizeBytes: validation.fileSizeBytes,- error: String(error),- });- await writeWindowsRecordingDiagnostics(fallbackPath, {- phase: "stop",- outputPath: fallbackPath,- systemAudioPath: diagnosticsSystemAudioPath,- microphonePath: diagnosticsMicAudioPath,- processOutput: windowsCaptureOutputBuffer.trim() || undefined,- error: String(error),- details: {+ if (fallbackPath) {+ try {+ const validation = await validateRecordedVideo(fallbackPath);+ setWindowsPendingVideoPath(fallbackPath);+ setWindowsSystemAudioPath(recoveredSystemAudioPath);+ setWindowsMicAudioPath(recoveredMicAudioPath);+ await cleanupWindowsOrphanedMicAudioPath(fallbackOrphanedMicAudioPath);+ recordNativeCaptureDiagnostics({+ backend: "windows-wgc",+ phase: "stop",+ outputPath: fallbackPath,+ systemAudioPath: diagnosticsSystemAudioPath,+ microphonePath: diagnosticsMicAudioPath,+ processOutput: windowsCaptureOutputBuffer.trim() || undefined,fileSizeBytes: validation.fileSizeBytes,- durationSeconds: validation.durationSeconds,- recoveredAfterStopFailure: true,- },- });- return { success: true, path: fallbackPath };- } catch {- // File is absent or failed validation.+ error: String(error),+ });+ await writeWindowsRecordingDiagnostics(fallbackPath, {+ phase: "stop",+ outputPath: fallbackPath,+ systemAudioPath: diagnosticsSystemAudioPath,+ microphonePath: diagnosticsMicAudioPath,+ processOutput: windowsCaptureOutputBuffer.trim() || undefined,+ error: String(error),+ details: {+ fileSizeBytes: validation.fileSizeBytes,+ durationSeconds: validation.durationSeconds,+ recoveredAfterStopFailure: true,+ },+ });+ return { success: true, path: fallbackPath };+ } catch {+ // File is absent or failed validation.+ }}- }- setWindowsSystemAudioPath(null);- setWindowsMicAudioPath(null);- setWindowsPendingVideoPath(null);- await cleanupWindowsOrphanedMicAudioPath(fallbackOrphanedMicAudioPath);+ setWindowsSystemAudioPath(null);+ setWindowsMicAudioPath(null);+ setWindowsPendingVideoPath(null);+ await cleanupWindowsOrphanedMicAudioPath(fallbackOrphanedMicAudioPath);- recordNativeCaptureDiagnostics({- backend: "windows-wgc",- phase: "stop",- outputPath: fallbackPath,- systemAudioPath: diagnosticsSystemAudioPath,- microphonePath: diagnosticsMicAudioPath,- processOutput: windowsCaptureOutputBuffer.trim() || undefined,- fileSizeBytes: await getFileSizeIfPresent(fallbackPath),- error: String(error),- });- await writeWindowsRecordingDiagnostics(fallbackPath, {- phase: "stop",- outputPath: fallbackPath,- systemAudioPath: diagnosticsSystemAudioPath,- microphonePath: diagnosticsMicAudioPath,- processOutput: windowsCaptureOutputBuffer.trim() || undefined,- error: String(error),- details: {+ recordNativeCaptureDiagnostics({+ backend: "windows-wgc",+ phase: "stop",+ outputPath: fallbackPath,+ systemAudioPath: diagnosticsSystemAudioPath,+ microphonePath: diagnosticsMicAudioPath,+ processOutput: windowsCaptureOutputBuffer.trim() || undefined,fileSizeBytes: await getFileSizeIfPresent(fallbackPath),- },- });+ error: String(error),+ });+ await writeWindowsRecordingDiagnostics(fallbackPath, {+ phase: "stop",+ outputPath: fallbackPath,+ systemAudioPath: diagnosticsSystemAudioPath,+ microphonePath: diagnosticsMicAudioPath,+ processOutput: windowsCaptureOutputBuffer.trim() || undefined,+ error: String(error),+ details: {+ fileSizeBytes: await getFileSizeIfPresent(fallbackPath),+ },+ });+ return {+ success: false,+ message: "Failed to stop native Windows capture",+ error: String(error),+ };+ }+ }++ if (process.platform !== "darwin") {return {success: false,- message: "Failed to stop native Windows capture",- error: String(error),+ message: "Native screen recording is only available on macOS.",};}- }-- if (process.platform !== "darwin") {- return {- success: false,- message: "Native screen recording is only available on macOS.",- };- }-- if (!nativeScreenRecordingActive) {- const recovered = await recoverNativeMacCaptureOutput();- if (recovered) {- return recovered;- }- return { success: false, message: "No native screen recording is active." };- }+ if (!nativeScreenRecordingActive) {+ const recovered = await recoverNativeMacCaptureOutput();+ if (recovered) {+ return recovered;+ }- try {- if (!nativeCaptureProcess) {- throw new Error("Native capture helper process is not running");+ return { success: false, message: "No native screen recording is active." };}- const process = nativeCaptureProcess;- const preferredVideoPath = nativeCaptureTargetPath;- const preferredSystemAudioPath = nativeCaptureSystemAudioPath;- const preferredMicrophonePath = nativeCaptureMicrophonePath;- console.log(- "[stop-native] Audio paths — system:",- preferredSystemAudioPath,- "mic:",- preferredMicrophonePath,- );- setNativeCaptureStopRequested(true);- process.stdin.write("stop\n");- const tempVideoPath = await waitForNativeCaptureStop(process);- console.log("[stop-native] Helper stopped, tempVideoPath:", tempVideoPath);- setNativeCaptureProcess(null);- setNativeScreenRecordingActive(false);- setNativeCaptureTargetPath(null);- setNativeCaptureSystemAudioPath(null);- setNativeCaptureMicrophonePath(null);- setNativeCaptureStopRequested(false);- setNativeCapturePaused(false);-- const finalVideoPath = preferredVideoPath ?? tempVideoPath;- if (tempVideoPath !== finalVideoPath) {- await moveFileWithOverwrite(tempVideoPath, finalVideoPath);- }+ try {+ if (!nativeCaptureProcess) {+ throw new Error("Native capture helper process is not running");+ }- if (preferredSystemAudioPath || preferredMicrophonePath) {+ const process = nativeCaptureProcess;+ const preferredVideoPath = nativeCaptureTargetPath;+ const preferredSystemAudioPath = nativeCaptureSystemAudioPath;+ const preferredMicrophonePath = nativeCaptureMicrophonePath;console.log(- "[stop-native] Attempting audio mux (merging separate tracks) into:",- finalVideoPath,+ "[stop-native] Audio paths — system:",+ preferredSystemAudioPath,+ "mic:",+ preferredMicrophonePath,);- try {- await muxNativeMacRecordingWithAudio(+ setNativeCaptureStopRequested(true);+ process.stdin.write("stop\n");+ const tempVideoPath = await waitForNativeCaptureStop(process);+ console.log("[stop-native] Helper stopped, tempVideoPath:", tempVideoPath);+ setNativeCaptureProcess(null);+ setNativeScreenRecordingActive(false);+ setNativeCaptureTargetPath(null);+ setNativeCaptureSystemAudioPath(null);+ setNativeCaptureMicrophonePath(null);+ setNativeCaptureStopRequested(false);+ setNativeCapturePaused(false);++ const finalVideoPath = preferredVideoPath ?? tempVideoPath;+ if (tempVideoPath !== finalVideoPath) {+ await moveFileWithOverwrite(tempVideoPath, finalVideoPath);+ }++ if (preferredSystemAudioPath || preferredMicrophonePath) {+ console.log(+ "[stop-native] Attempting audio mux (merging separate tracks) into:",finalVideoPath,- preferredSystemAudioPath,- preferredMicrophonePath,- );- console.log("[stop-native] Audio mux completed successfully");- } catch (error) {- console.warn(- "[stop-native] Audio mux failed (video still has inline audio):",- error,);+ try {+ await muxNativeMacRecordingWithAudio(+ finalVideoPath,+ preferredSystemAudioPath,+ preferredMicrophonePath,+ );+ console.log("[stop-native] Audio mux completed successfully");+ } catch (error) {+ console.warn(+ "[stop-native] Audio mux failed (video still has inline audio):",+ error,+ );+ }+ } else {+ console.log("[stop-native] No separate audio tracks to mux");}- } else {- console.log("[stop-native] No separate audio tracks to mux");- }- return await finalizeStoredVideo(finalVideoPath);- } catch (error) {- console.error("Failed to stop native ScreenCaptureKit recording:", error);- const fallbackPath = nativeCaptureTargetPath;- const fallbackSystemAudioPath = nativeCaptureSystemAudioPath;- const fallbackMicrophonePath = nativeCaptureMicrophonePath;- const fallbackFileSizeBytes = await getFileSizeIfPresent(fallbackPath);- setNativeScreenRecordingActive(false);- setNativeCaptureProcess(null);- setNativeCaptureTargetPath(null);- setNativeCaptureSystemAudioPath(null);- setNativeCaptureMicrophonePath(null);- setNativeCaptureStopRequested(false);- setNativeCapturePaused(false);+ return await finalizeStoredVideo(finalVideoPath);+ } catch (error) {+ console.error("Failed to stop native ScreenCaptureKit recording:", error);+ const fallbackPath = nativeCaptureTargetPath;+ const fallbackSystemAudioPath = nativeCaptureSystemAudioPath;+ const fallbackMicrophonePath = nativeCaptureMicrophonePath;+ const fallbackFileSizeBytes = await getFileSizeIfPresent(fallbackPath);+ setNativeScreenRecordingActive(false);+ setNativeCaptureProcess(null);+ setNativeCaptureTargetPath(null);+ setNativeCaptureSystemAudioPath(null);+ setNativeCaptureMicrophonePath(null);+ setNativeCaptureStopRequested(false);+ setNativeCapturePaused(false);- recordNativeCaptureDiagnostics({- backend: "mac-screencapturekit",- phase: "stop",- sourceId: lastNativeCaptureDiagnostics?.sourceId ?? null,- sourceType: lastNativeCaptureDiagnostics?.sourceType ?? "unknown",- displayId: lastNativeCaptureDiagnostics?.displayId ?? null,- displayBounds: lastNativeCaptureDiagnostics?.displayBounds ?? null,- windowHandle: lastNativeCaptureDiagnostics?.windowHandle ?? null,- helperPath: lastNativeCaptureDiagnostics?.helperPath ?? null,- outputPath: fallbackPath,- systemAudioPath: fallbackSystemAudioPath,- microphonePath: fallbackMicrophonePath,- osRelease: lastNativeCaptureDiagnostics?.osRelease,- supported: lastNativeCaptureDiagnostics?.supported,- helperExists: lastNativeCaptureDiagnostics?.helperExists,- processOutput: nativeCaptureOutputBuffer.trim() || undefined,- fileSizeBytes: fallbackFileSizeBytes,- error: String(error),- });+ recordNativeCaptureDiagnostics({+ backend: "mac-screencapturekit",+ phase: "stop",+ sourceId: lastNativeCaptureDiagnostics?.sourceId ?? null,+ sourceType: lastNativeCaptureDiagnostics?.sourceType ?? "unknown",+ displayId: lastNativeCaptureDiagnostics?.displayId ?? null,+ displayBounds: lastNativeCaptureDiagnostics?.displayBounds ?? null,+ windowHandle: lastNativeCaptureDiagnostics?.windowHandle ?? null,+ helperPath: lastNativeCaptureDiagnostics?.helperPath ?? null,+ outputPath: fallbackPath,+ systemAudioPath: fallbackSystemAudioPath,+ microphonePath: fallbackMicrophonePath,+ osRelease: lastNativeCaptureDiagnostics?.osRelease,+ supported: lastNativeCaptureDiagnostics?.supported,+ helperExists: lastNativeCaptureDiagnostics?.helperExists,+ processOutput: nativeCaptureOutputBuffer.trim() || undefined,+ fileSizeBytes: fallbackFileSizeBytes,+ error: String(error),+ });- // Try to recover: if the target file exists on disk, finalize with it- if (fallbackPath) {- try {- await fs.access(fallbackPath);- console.log(- "[stop-native-screen-recording] Recovering with fallback path:",- fallbackPath,- );- if (fallbackSystemAudioPath || fallbackMicrophonePath) {- try {- await muxNativeMacRecordingWithAudio(- fallbackPath,- fallbackSystemAudioPath,- fallbackMicrophonePath,- );- } catch (muxError) {- console.warn(- "Failed to mux recovered native macOS audio into capture:",- muxError,- );+ // Try to recover: if the target file exists on disk, finalize with it+ if (fallbackPath) {+ try {+ await fs.access(fallbackPath);+ console.log(+ "[stop-native-screen-recording] Recovering with fallback path:",+ fallbackPath,+ );+ if (fallbackSystemAudioPath || fallbackMicrophonePath) {+ try {+ await muxNativeMacRecordingWithAudio(+ fallbackPath,+ fallbackSystemAudioPath,+ fallbackMicrophonePath,+ );+ } catch (muxError) {+ console.warn(+ "Failed to mux recovered native macOS audio into capture:",+ muxError,+ );+ }}+ return await finalizeStoredVideo(fallbackPath);+ } catch {+ // File doesn't exist or isn't accessible}- return await finalizeStoredVideo(fallbackPath);- } catch {- // File doesn't exist or isn't accessible}- }- const recovered = await recoverNativeMacCaptureOutput();- if (recovered) {- return recovered;- }+ const recovered = await recoverNativeMacCaptureOutput();+ if (recovered) {+ return recovered;+ }return {success: false,diff --git a/electron/ipc/register/sourceMapping.test.ts b/electron/ipc/register/sourceMapping.test.tsindex d0b68e75..84351a50 100644--- a/electron/ipc/register/sourceMapping.test.ts+++ b/electron/ipc/register/sourceMapping.test.ts@@ -1,9 +1,6 @@import { describe, expect, it } from "vitest";-import {- getScreenSourceIdForDisplay,- LINUX_PORTAL_SCREEN_SOURCE_ID,-} from "./sourceMapping";+import { getScreenSourceIdForDisplay, LINUX_PORTAL_SCREEN_SOURCE_ID } from "./sourceMapping";describe("getScreenSourceIdForDisplay", () => {it("keeps the live Electron screen source when one is available", () => {@@ -47,4 +44,4 @@ describe("getScreenSourceIdForDisplay", () => {}),).toBe("screen:fallback:42");});-});\ No newline at end of file+});diff --git a/electron/ipc/register/sourceMapping.ts b/electron/ipc/register/sourceMapping.tsindex a61b4cf7..8b13501a 100644--- a/electron/ipc/register/sourceMapping.ts+++ b/electron/ipc/register/sourceMapping.ts@@ -32,4 +32,4 @@ export function getScreenSourceIdForDisplay({}return `screen:fallback:${displayId}`;-}\ No newline at end of file+}diff --git a/electron/ipc/register/sources.ts b/electron/ipc/register/sources.tsindex 33c9ee74..a92e5580 100644--- a/electron/ipc/register/sources.ts+++ b/electron/ipc/register/sources.ts@@ -18,13 +18,11 @@ import { reassertHudOverlayMousePassthrough } from "../../windows";const execFileAsync = promisify(execFile);const SOURCE_LIST_CACHE_TTL_MS = 1200;-let sourceListCache:- | {- key: string;- expiresAt: number;- value: Array<Record<string, unknown>>;- }- | null = null;+let sourceListCache: {+ key: string;+ expiresAt: number;+ value: Array<Record<string, unknown>>;+} | null = null;function normalizeDesktopSourceName(value: string) {return value.trim().replace(/\s+/g, " ").toLowerCase();@@ -53,7 +51,11 @@ export function registerSourceHandlers({thumbnailSize: opts?.thumbnailSize,fetchWindowIcons: opts?.fetchWindowIcons,});- if (sourceListCache && sourceListCache.key === cacheKey && sourceListCache.expiresAt > Date.now()) {+ if (+ sourceListCache &&+ sourceListCache.key === cacheKey &&+ sourceListCache.expiresAt > Date.now()+ ) {return sourceListCache.value;}@@ -236,13 +238,12 @@ export function registerSourceHandlers({thumbnail: electronWindowSource?.thumbnail? electronWindowSource.thumbnail.toDataURL(): null,- appIcon:- includeWindowIcons- ? (source.appIcon ??- (electronWindowSource?.appIcon- ? electronWindowSource.appIcon.toDataURL()- : null))- : null,+ appIcon: includeWindowIcons+ ? (source.appIcon ??+ (electronWindowSource?.appIcon+ ? electronWindowSource.appIcon.toDataURL()+ : null))+ : null,appName: source.appName,windowTitle: source.windowTitle,sourceType: "window" as const,@@ -483,15 +484,17 @@ body{background:transparent;overflow:hidden;width:100vw;height:100vh}</style></head><body><div class="glow-wrap"></div><div class="border-wrap"></div>-</body></html>`+</body></html>`;try {- await highlightWin.loadURL(`data:text/html;charset=utf-8,${encodeURIComponent(html)}`)+ await highlightWin.loadURL(+ `data:text/html;charset=utf-8,${encodeURIComponent(html)}`,+ );} catch (loadError) {if (!highlightWin.isDestroyed()) {- highlightWin.close()+ highlightWin.close();}- throw loadError+ throw loadError;}// The highlight window appearing (even with focusable:false) can corrupt@@ -501,8 +504,8 @@ body{background:transparent;overflow:hidden;width:100vw;height:100vh}reassertHudOverlayMousePassthrough();const highlightCloseTimer = setTimeout(() => {- if (!highlightWin.isDestroyed()) highlightWin.close()- }, 1700)+ if (!highlightWin.isDestroyed()) highlightWin.close();+ }, 1700);highlightWin.on("closed", () => {clearTimeout(highlightCloseTimer);@@ -511,32 +514,31 @@ body{background:transparent;overflow:hidden;width:100vw;height:100vh}reassertHudOverlayMousePassthrough();});- return { success: true }- } catch (error) {- console.error('Failed to show source highlight:', error)- return { success: false }- }- })-- ipcMain.handle('get-selected-source', () => {- return selectedSource- })-- ipcMain.handle('open-source-selector', () => {- const sourceSelectorWin = getSourceSelectorWindow()- if (sourceSelectorWin) {- sourceSelectorWin.focus()- return- }- createSourceSelectorWindow()- })- ipcMain.handle('switch-to-editor', () => {- console.log('[switch-to-editor] Opening editor window')- const sourceSelectorWin = getSourceSelectorWindow()- if (sourceSelectorWin && !sourceSelectorWin.isDestroyed()) {- sourceSelectorWin.close()- }- createEditorWindow()- })+ return { success: true };+ } catch (error) {+ console.error("Failed to show source highlight:", error);+ return { success: false };+ }+ });++ ipcMain.handle("get-selected-source", () => {+ return selectedSource;+ });+ ipcMain.handle("open-source-selector", () => {+ const sourceSelectorWin = getSourceSelectorWindow();+ if (sourceSelectorWin) {+ sourceSelectorWin.focus();+ return;+ }+ createSourceSelectorWindow();+ });+ ipcMain.handle("switch-to-editor", () => {+ console.log("[switch-to-editor] Opening editor window");+ const sourceSelectorWin = getSourceSelectorWindow();+ if (sourceSelectorWin && !sourceSelectorWin.isDestroyed()) {+ sourceSelectorWin.close();+ }+ createEditorWindow();+ });}diff --git a/electron/ipc/utils.ts b/electron/ipc/utils.tsindex 3f2efb06..23960f20 100644--- a/electron/ipc/utils.ts+++ b/electron/ipc/utils.ts@@ -129,4 +129,3 @@ export function approveUserPath(filePath: string | null | undefined): void {// Ignore invalid paths; later reads will surface the underlying error.}}-diff --git a/electron/native/bin/win32-x64/helpers-manifest.json b/electron/native/bin/win32-x64/helpers-manifest.jsonindex c4755869..62ee78b5 100644--- a/electron/native/bin/win32-x64/helpers-manifest.json+++ b/electron/native/bin/win32-x64/helpers-manifest.json@@ -1,35 +1,35 @@{- "version": 1,- "platform": "win32",- "arch": "x64",- "helpers": {- "wgc-capture": {- "binaryName": "wgc-capture.exe",- "binarySha256": "4d89fdff8e3343998c7a3b4d75d964c1f75f93594aa097c6681e477d25ec9f01",- "sourceDir": "electron/native/wgc-capture",- "sourceFingerprint": "c6dac250c9d16f7aa881998353441b4ae3fb59731b802e3b8491a136e79726b0",- "updatedAt": "2026-07-11T11:58:45.856Z"- },- "cursor-monitor": {- "binaryName": "cursor-monitor.exe",- "binarySha256": "f1d8f30e8d7bee19ecea91c9a90a95ea4824138b8336b18030fa0602a641d70d",- "sourceDir": "electron/native/cursor-monitor",- "sourceFingerprint": "45bb72e4039e061a354af87317d7c42ec3d2118369b3f4379046ff497b701e72",- "updatedAt": "2026-07-11T11:58:56.534Z"- },- "recordly-gpu-export": {- "binaryName": "recordly-gpu-export.exe",- "binarySha256": "49a2ac588206305d0129e6263ce4be49780c50a9dc4efc7df63aad09178a919f",- "sourceDir": "electron/native/gpu-export-probe",- "sourceFingerprint": "37a5842eba63cdeccfddd02cc278a98207248fb0aa6b56153fb85ed152c908c1",- "updatedAt": "2026-07-11T11:58:51.659Z"- },- "recordly-nvidia-cuda-compositor": {- "binaryName": "recordly-nvidia-cuda-compositor.exe",- "binarySha256": "250a3f8cac7c6ea38a873434d23d4b2be7d6555e42cc0b405aa26f774169159c",- "sourceDir": "electron/native/nvidia-cuda-compositor",- "sourceFingerprint": "de1219228ce326e96d1f4815a3763b10d5f235cc1286bc6542c99707a85d5947",- "updatedAt": "2026-05-27T11:29:32.957Z"- }- }+ "version": 1,+ "platform": "win32",+ "arch": "x64",+ "helpers": {+ "wgc-capture": {+ "binaryName": "wgc-capture.exe",+ "binarySha256": "4d89fdff8e3343998c7a3b4d75d964c1f75f93594aa097c6681e477d25ec9f01",+ "sourceDir": "electron/native/wgc-capture",+ "sourceFingerprint": "c6dac250c9d16f7aa881998353441b4ae3fb59731b802e3b8491a136e79726b0",+ "updatedAt": "2026-07-11T11:58:45.856Z"+ },+ "cursor-monitor": {+ "binaryName": "cursor-monitor.exe",+ "binarySha256": "f1d8f30e8d7bee19ecea91c9a90a95ea4824138b8336b18030fa0602a641d70d",+ "sourceDir": "electron/native/cursor-monitor",+ "sourceFingerprint": "45bb72e4039e061a354af87317d7c42ec3d2118369b3f4379046ff497b701e72",+ "updatedAt": "2026-07-11T11:58:56.534Z"+ },+ "recordly-gpu-export": {+ "binaryName": "recordly-gpu-export.exe",+ "binarySha256": "49a2ac588206305d0129e6263ce4be49780c50a9dc4efc7df63aad09178a919f",+ "sourceDir": "electron/native/gpu-export-probe",+ "sourceFingerprint": "37a5842eba63cdeccfddd02cc278a98207248fb0aa6b56153fb85ed152c908c1",+ "updatedAt": "2026-07-11T11:58:51.659Z"+ },+ "recordly-nvidia-cuda-compositor": {+ "binaryName": "recordly-nvidia-cuda-compositor.exe",+ "binarySha256": "250a3f8cac7c6ea38a873434d23d4b2be7d6555e42cc0b405aa26f774169159c",+ "sourceDir": "electron/native/nvidia-cuda-compositor",+ "sourceFingerprint": "de1219228ce326e96d1f4815a3763b10d5f235cc1286bc6542c99707a85d5947",+ "updatedAt": "2026-05-27T11:29:32.957Z"+ }+ }}diff --git a/electron/native/nvidia-cuda-compositor/render-tahoe-cursor-atlas.cjs b/electron/native/nvidia-cuda-compositor/render-tahoe-cursor-atlas.cjsindex 5407d327..96c72c4b 100644--- a/electron/native/nvidia-cuda-compositor/render-tahoe-cursor-atlas.cjs+++ b/electron/native/nvidia-cuda-compositor/render-tahoe-cursor-atlas.cjs@@ -4,31 +4,31 @@ const path = require("node:path");const drawHeight = 256;const padding = 2;const cursorTypes = [- "arrow",- "text",- "pointer",- "crosshair",- "open-hand",- "closed-hand",- "resize-ew",- "resize-ns",- "not-allowed",+ "arrow",+ "text",+ "pointer",+ "crosshair",+ "open-hand",+ "closed-hand",+ "resize-ew",+ "resize-ns",+ "not-allowed",];const tahoeAssets = {- arrow: ["pointer-1__14-6.svg", 0.14, 0.06],- text: ["ibeam-1__50-44.svg", 0.5, 0.44],- pointer: ["pointinghand-1__40-10.svg", 0.4, 0.1],- crosshair: ["crosshair-1__50-50.svg", 0.5, 0.5],- "open-hand": ["openhand-1__55-57.svg", 0.55, 0.57],- "closed-hand": ["closedhand-1__50-46.svg", 0.5, 0.46],- "resize-ew": ["resizeeastwest-1__50-50.svg", 0.5, 0.5],- "resize-ns": ["resizenorthsouth-1__50-49.svg", 0.5, 0.49],- "not-allowed": ["notallowed-1__23-0.svg", 0.23, 0],+ arrow: ["pointer-1__14-6.svg", 0.14, 0.06],+ text: ["ibeam-1__50-44.svg", 0.5, 0.44],+ pointer: ["pointinghand-1__40-10.svg", 0.4, 0.1],+ crosshair: ["crosshair-1__50-50.svg", 0.5, 0.5],+ "open-hand": ["openhand-1__55-57.svg", 0.55, 0.57],+ "closed-hand": ["closedhand-1__50-46.svg", 0.5, 0.46],+ "resize-ew": ["resizeeastwest-1__50-50.svg", 0.5, 0.5],+ "resize-ns": ["resizenorthsouth-1__50-49.svg", 0.5, 0.49],+ "not-allowed": ["notallowed-1__23-0.svg", 0.23, 0],};function arg(name, fallback = "") {- const index = process.argv.indexOf(name);- return index >= 0 && index + 1 < process.argv.length ? process.argv[index + 1] : fallback;+ const index = process.argv.indexOf(name);+ return index >= 0 && index + 1 < process.argv.length ? process.argv[index + 1] : fallback;}const repoRoot = arg("--repo-root");@@ -36,41 +36,43 @@ const atlasRgbaPath = arg("--output-rgba");const atlasMetadataPath = arg("--output-metadata");if (!repoRoot || !atlasRgbaPath || !atlasMetadataPath) {- console.error("Usage: electron render-tahoe-cursor-atlas.cjs --repo-root <repo> --output-rgba <raw> --output-metadata <tsv>");- process.exit(1);+ console.error(+ "Usage: electron render-tahoe-cursor-atlas.cjs --repo-root <repo> --output-rgba <raw> --output-metadata <tsv>",+ );+ process.exit(1);}const assets = cursorTypes.map((type, index) => {- const [fileName, anchorX, anchorY] = tahoeAssets[type];- return {- type,- index,- filePath: path.join(repoRoot, "src", "assets", "cursors", "tahoe", fileName),- anchorX,- anchorY,- };+ const [fileName, anchorX, anchorY] = tahoeAssets[type];+ return {+ type,+ index,+ filePath: path.join(repoRoot, "src", "assets", "cursors", "tahoe", fileName),+ anchorX,+ anchorY,+ };});app.disableHardwareAcceleration();app.whenReady().then(async () => {- const window = new BrowserWindow({- show: false,- width: 1,- height: 1,- webPreferences: {- nodeIntegration: true,- contextIsolation: false,- backgroundThrottling: false,- },- });+ const window = new BrowserWindow({+ show: false,+ width: 1,+ height: 1,+ webPreferences: {+ nodeIntegration: true,+ contextIsolation: false,+ backgroundThrottling: false,+ },+ });- ipcMain.once("atlas-ready", (_event, result) => {- console.log(JSON.stringify(result));- app.quit();- });+ ipcMain.once("atlas-ready", (_event, result) => {+ console.log(JSON.stringify(result));+ app.quit();+ });- const html = `+ const html = `<!doctype html><meta charset="utf-8"><script>@@ -139,5 +141,5 @@ function loadImage(asset) {});</script>`;- await window.loadURL("data:text/html;charset=utf-8," + encodeURIComponent(html));+ await window.loadURL("data:text/html;charset=utf-8," + encodeURIComponent(html));});diff --git a/electron/navigationPolicy.test.ts b/electron/navigationPolicy.test.tsindex e021c96a..5c23c737 100644--- a/electron/navigationPolicy.test.ts+++ b/electron/navigationPolicy.test.ts@@ -224,7 +224,9 @@ describe("navigation event handlers", () => {// history.replaceState() changes getURL() without crossing a document-navigation boundary.currentUrl = "file:///opt/Recordly/dist/index.html?windowType=source-selector";- const willNavigate = on.mock.calls.find(([eventName]) => eventName === "will-navigate")?.[1];+ const willNavigate = on.mock.calls.find(+ ([eventName]) => eventName === "will-navigate",+ )?.[1];if (typeof willNavigate !== "function") {throw new Error("will-navigate handler was not registered");}@@ -250,7 +252,9 @@ describe("navigation event handlers", () => {);const didNavigate = on.mock.calls.find(([eventName]) => eventName === "did-navigate")?.[1];- const willNavigate = on.mock.calls.find(([eventName]) => eventName === "will-navigate")?.[1];+ const willNavigate = on.mock.calls.find(+ ([eventName]) => eventName === "will-navigate",+ )?.[1];if (typeof didNavigate !== "function" || typeof willNavigate !== "function") {throw new Error("navigation handlers were not registered");}diff --git a/electron/permissionPolicy.test.ts b/electron/permissionPolicy.test.tsindex 45ffc82f..36b5dce6 100644--- a/electron/permissionPolicy.test.ts+++ b/electron/permissionPolicy.test.ts@@ -169,17 +169,18 @@ describe("shouldGrantDisplayCapture", () => {).toBe(true);});- it.each(["null", "file://", "file:///"])(- "accepts Chromium's packaged file origin form: %s",- (securityOrigin) => {- expect(- shouldGrantDisplayCapture(- makeRequest({ currentDocumentUrl: FILE_HUD_URL, securityOrigin }),- TRUSTED_DOCUMENT_BASE_URLS,- ),- ).toBe(true);- },- );+ it.each([+ "null",+ "file://",+ "file:///",+ ])("accepts Chromium's packaged file origin form: %s", (securityOrigin) => {+ expect(+ shouldGrantDisplayCapture(+ makeRequest({ currentDocumentUrl: FILE_HUD_URL, securityOrigin }),+ TRUSTED_DOCUMENT_BASE_URLS,+ ),+ ).toBe(true);+ });it.each([["another BrowserWindow", { isTrustedCaptureWindow: false }],diff --git a/scripts/benchmark-export-queues.mjs b/scripts/benchmark-export-queues.mjsindex 6628b9d8..57b030c6 100644--- a/scripts/benchmark-export-queues.mjs+++ b/scripts/benchmark-export-queues.mjs@@ -201,7 +201,12 @@ function parseExportQuality(rawValue) {return null;}- if (rawValue === "medium" || rawValue === "good" || rawValue === "high" || rawValue === "source") {+ if (+ rawValue === "medium" ||+ rawValue === "good" ||+ rawValue === "high" ||+ rawValue === "source"+ ) {return rawValue;}@@ -928,7 +933,9 @@ async function main() {printRequestedConfigTable(benchmarkRequests);if (providedInputPath) {- console.log(`[benchmark-export-queues] Using provided input video: ${providedInputPath}`);+ console.log(+ `[benchmark-export-queues] Using provided input video: ${providedInputPath}`,+ );await fs.copyFile(providedInputPath, inputPath);} else {console.log(`[benchmark-export-queues] Generating fixture video: ${inputPath}`);diff --git a/scripts/build-windows-capture.mjs b/scripts/build-windows-capture.mjsindex 82f9c939..14cc8346 100644--- a/scripts/build-windows-capture.mjs+++ b/scripts/build-windows-capture.mjs@@ -128,11 +128,14 @@ try {prefix: "build-windows-capture",clearCache: clearCmakeCache,configure: (generator, toolset) =>- execSync(`${cmake} .. -G "${generator}" -A ${generatorArch}${toolset ? ` -T ${toolset}` : ""}`, {- cwd: buildDir,- stdio: "inherit",- timeout: 120000,- }),+ execSync(+ `${cmake} .. -G "${generator}" -A ${generatorArch}${toolset ? ` -T ${toolset}` : ""}`,+ {+ cwd: buildDir,+ stdio: "inherit",+ timeout: 120000,+ },+ ),});} catch (error) {console.error("[build-windows-capture] CMake configure failed:", error.message);diff --git a/scripts/build-windows-gpu-export.mjs b/scripts/build-windows-gpu-export.mjsindex 27730fbf..63e756be 100644--- a/scripts/build-windows-gpu-export.mjs+++ b/scripts/build-windows-gpu-export.mjs@@ -97,7 +97,9 @@ if (!cmake) {binaryName: "recordly-gpu-export.exe",});if (!verification.ok) {- console.error(formatNativeHelperManifestWarning("build-windows-gpu-export", verification));+ console.error(+ formatNativeHelperManifestWarning("build-windows-gpu-export", verification),+ );process.exit(1);}console.log(`[build-windows-gpu-export] Using bundled helper: ${bundledExePath}`);@@ -123,11 +125,14 @@ try {prefix: "build-windows-gpu-export",clearCache: clearCmakeCache,configure: (generator, toolset) =>- execSync(`${cmake} .. -G "${generator}" -A ${generatorArch}${toolset ? ` -T ${toolset}` : ""}`, {- cwd: buildDir,- stdio: "inherit",- timeout: 120000,- }),+ execSync(+ `${cmake} .. -G "${generator}" -A ${generatorArch}${toolset ? ` -T ${toolset}` : ""}`,+ {+ cwd: buildDir,+ stdio: "inherit",+ timeout: 120000,+ },+ ),});} catch (error) {console.error("[build-windows-gpu-export] CMake configure failed:", error.message);diff --git a/scripts/create-release.mjs b/scripts/create-release.mjsindex 3a586bde..25c36c6d 100644--- a/scripts/create-release.mjs+++ b/scripts/create-release.mjs@@ -72,9 +72,12 @@ function loadNotes({ notes, notesFile }) {}function resolveGhBinary() {- const candidates = [process.env.GH_BIN, "gh", "/opt/homebrew/bin/gh", "/usr/local/bin/gh"].filter(- Boolean,- );+ const candidates = [+ process.env.GH_BIN,+ "gh",+ "/opt/homebrew/bin/gh",+ "/usr/local/bin/gh",+ ].filter(Boolean);for (const candidate of candidates) {try {diff --git a/scripts/normalize-electron-main-cjs.mjs b/scripts/normalize-electron-main-cjs.mjsindex fcbca31f..082ab426 100644--- a/scripts/normalize-electron-main-cjs.mjs+++ b/scripts/normalize-electron-main-cjs.mjs@@ -76,9 +76,7 @@ function convertNamedExports(namedSpec, indent = "") {}function convertExportLine(line) {- const singleLineMatch = line.match(- /^([ \t]*)export\s*\{\s*([^}]*)\s*\}\s*;?[ \t]*$/,- );+ const singleLineMatch = line.match(/^([ \t]*)export\s*\{\s*([^}]*)\s*\}\s*;?[ \t]*$/);if (singleLineMatch) {const [, indent, namedSpec] = singleLineMatch;return convertNamedExports(namedSpec, indent);@@ -235,10 +233,7 @@ function replaceImportMetaUrlInCode(line, state) {continue;}- if (- line.startsWith(token, index) &&- hasTokenBoundary(line, index, index + token.length)- ) {+ if (line.startsWith(token, index) && hasTokenBoundary(line, index, index + token.length)) {normalizedLine += IMPORT_META_URL_CJS_REPLACEMENT;changed = true;index += token.length - 1;@@ -322,10 +317,7 @@ function containsImportMetaInCode(line, state) {continue;}- if (- line.startsWith(token, index) &&- hasTokenBoundary(line, index, index + token.length)- ) {+ if (line.startsWith(token, index) && hasTokenBoundary(line, index, index + token.length)) {return true;}}diff --git a/src/components/launch/hooks/useHudBarDrag.ts b/src/components/launch/hooks/useHudBarDrag.tsindex 6f612448..9c93aa7f 100644--- a/src/components/launch/hooks/useHudBarDrag.ts+++ b/src/components/launch/hooks/useHudBarDrag.ts@@ -1,12 +1,8 @@+import { type PointerEvent, type RefObject, useCallback, useEffect, useRef, useState } from "react";import {- type PointerEvent,- type RefObject,- useCallback,- useEffect,- useRef,- useState,-} from "react";-import { mergeHudInteractiveBounds, shouldRestoreHudMousePassthroughAfterDrag } from "../hudMousePassthrough";+ mergeHudInteractiveBounds,+ shouldRestoreHudMousePassthroughAfterDrag,+} from "../hudMousePassthrough";import { clampHudOffsetToViewport } from "../hudViewportBounds";const DEFAULT_RECORDING_HUD_OFFSET = { x: 0, y: 0 };@@ -24,20 +20,17 @@ export function useHudBarDrag({const [isHudDragging, setIsHudDragging] = useState(false);const hudBarTransformRef = useRef<HTMLDivElement | null>(null);const recordingHudOffsetRef = useRef(DEFAULT_RECORDING_HUD_OFFSET);- const hudDragStartRef = useRef<- | {- pointerId: number;- startX: number;- startY: number;- originX: number;- originY: number;- initialLeft: number;- initialTop: number;- hudWidth: number;- hudHeight: number;- }- | null- >(null);+ const hudDragStartRef = useRef<{+ pointerId: number;+ startX: number;+ startY: number;+ originX: number;+ originY: number;+ initialLeft: number;+ initialTop: number;+ hudWidth: number;+ hudHeight: number;+ } | null>(null);const isHudDraggingRef = useRef(false);const hudDragMoveRafRef = useRef<number | null>(null);const hudDragPendingPointerRef = useRef<{ clientX: number; clientY: number } | null>(null);@@ -55,11 +48,10 @@ export function useHudBarDrag({}const bounds = hudBarRef.current.getBoundingClientRect();- const nextOffset = clampHudOffsetToViewport(- recordingHudOffsetRef.current,- bounds,- { width: window.innerWidth, height: window.innerHeight },- );+ const nextOffset = clampHudOffsetToViewport(recordingHudOffsetRef.current, bounds, {+ width: window.innerWidth,+ height: window.innerHeight,+ });if (nextOffset.x === recordingHudOffsetRef.current.x &&nextOffset.y === recordingHudOffsetRef.current.y@@ -90,32 +82,35 @@ export function useHudBarDrag({};}, [hudBarRef, keepHudBarInsideViewport]);- const handleHudBarPointerDown = useCallback((event: PointerEvent<HTMLDivElement>) => {- if (event.button !== 0) {- return;- }+ const handleHudBarPointerDown = useCallback(+ (event: PointerEvent<HTMLDivElement>) => {+ if (event.button !== 0) {+ return;+ }- event.preventDefault();- event.currentTarget.setPointerCapture(event.pointerId);- isHudDraggingRef.current = true;- setIsHudDragging(true);- window.electronAPI?.hudOverlaySetIgnoreMouse?.(false);- if (!hudBarRef.current) {- return;- }- const hudRect = hudBarRef.current.getBoundingClientRect();- hudDragStartRef.current = {- pointerId: event.pointerId,- startX: event.clientX,- startY: event.clientY,- originX: recordingHudOffsetRef.current.x,- originY: recordingHudOffsetRef.current.y,- initialLeft: hudRect.left,- initialTop: hudRect.top,- hudWidth: hudRect.width,- hudHeight: hudRect.height,- };- }, [hudBarRef]);+ event.preventDefault();+ event.currentTarget.setPointerCapture(event.pointerId);+ isHudDraggingRef.current = true;+ setIsHudDragging(true);+ window.electronAPI?.hudOverlaySetIgnoreMouse?.(false);+ if (!hudBarRef.current) {+ return;+ }+ const hudRect = hudBarRef.current.getBoundingClientRect();+ hudDragStartRef.current = {+ pointerId: event.pointerId,+ startX: event.clientX,+ startY: event.clientY,+ originX: recordingHudOffsetRef.current.x,+ originY: recordingHudOffsetRef.current.y,+ initialLeft: hudRect.left,+ initialTop: hudRect.top,+ hudWidth: hudRect.width,+ hudHeight: hudRect.height,+ };+ },+ [hudBarRef],+ );const handleHudBarPointerMove = useCallback((event: PointerEvent<HTMLDivElement>) => {const dragState = hudDragStartRef.current;@@ -162,66 +157,75 @@ export function useHudBarDrag({});}, []);- const handleHudBarPointerUp = useCallback((event: PointerEvent<HTMLDivElement>) => {- const dragState = hudDragStartRef.current;- if (!dragState || dragState.pointerId !== event.pointerId) {- return;- }+ const handleHudBarPointerUp = useCallback(+ (event: PointerEvent<HTMLDivElement>) => {+ const dragState = hudDragStartRef.current;+ if (!dragState || dragState.pointerId !== event.pointerId) {+ return;+ }- const pointer = hudDragPendingPointerRef.current || { clientX: event.clientX, clientY: event.clientY };- const deltaX = pointer.clientX - dragState.startX;- const deltaY = pointer.clientY - dragState.startY;- const viewportWidth = window.innerWidth;- const viewportHeight = window.innerHeight;-- const clampedLeft = Math.min(- Math.max(0, dragState.initialLeft + deltaX),- Math.max(0, viewportWidth - dragState.hudWidth),- );- const clampedTop = Math.min(- Math.max(0, dragState.initialTop + deltaY),- Math.max(0, viewportHeight - dragState.hudHeight),- );-- recordingHudOffsetRef.current = {- x: dragState.originX + (clampedLeft - dragState.initialLeft),- y: dragState.originY + (clampedTop - dragState.initialTop),- };+ const pointer = hudDragPendingPointerRef.current || {+ clientX: event.clientX,+ clientY: event.clientY,+ };+ const deltaX = pointer.clientX - dragState.startX;+ const deltaY = pointer.clientY - dragState.startY;+ const viewportWidth = window.innerWidth;+ const viewportHeight = window.innerHeight;- if (hudDragMoveRafRef.current !== null) {- cancelAnimationFrame(hudDragMoveRafRef.current);- hudDragMoveRafRef.current = null;- }- hudDragPendingPointerRef.current = null;-- hudDragStartRef.current = null;- const wasDragging = isHudDraggingRef.current;- isHudDraggingRef.current = false;- setRecordingHudOffset({ ...recordingHudOffsetRef.current });- setIsHudDragging(false);- if (event.currentTarget.hasPointerCapture(event.pointerId)) {- event.currentTarget.releasePointerCapture(event.pointerId);- }- const hudBounds = mergeHudInteractiveBounds(- [- hudContentRef.current?.getBoundingClientRect(),- hudBarRef.current?.getBoundingClientRect(),- recordingWebcamPreviewContainerRef.current?.getBoundingClientRect(),- ].map((bounds) =>- bounds- ? {- left: bounds.left,- top: bounds.top,- right: bounds.right,- bottom: bounds.bottom,- }- : null,- ),- );- if (wasDragging && shouldRestoreHudMousePassthroughAfterDrag(hudBounds, event.clientX, event.clientY)) {- window.electronAPI?.hudOverlaySetIgnoreMouse?.(true);- }- }, [hudBarRef, hudContentRef, recordingWebcamPreviewContainerRef]);+ const clampedLeft = Math.min(+ Math.max(0, dragState.initialLeft + deltaX),+ Math.max(0, viewportWidth - dragState.hudWidth),+ );+ const clampedTop = Math.min(+ Math.max(0, dragState.initialTop + deltaY),+ Math.max(0, viewportHeight - dragState.hudHeight),+ );++ recordingHudOffsetRef.current = {+ x: dragState.originX + (clampedLeft - dragState.initialLeft),+ y: dragState.originY + (clampedTop - dragState.initialTop),+ };++ if (hudDragMoveRafRef.current !== null) {+ cancelAnimationFrame(hudDragMoveRafRef.current);+ hudDragMoveRafRef.current = null;+ }+ hudDragPendingPointerRef.current = null;++ hudDragStartRef.current = null;+ const wasDragging = isHudDraggingRef.current;+ isHudDraggingRef.current = false;+ setRecordingHudOffset({ ...recordingHudOffsetRef.current });+ setIsHudDragging(false);+ if (event.currentTarget.hasPointerCapture(event.pointerId)) {+ event.currentTarget.releasePointerCapture(event.pointerId);+ }+ const hudBounds = mergeHudInteractiveBounds(+ [+ hudContentRef.current?.getBoundingClientRect(),+ hudBarRef.current?.getBoundingClientRect(),+ recordingWebcamPreviewContainerRef.current?.getBoundingClientRect(),+ ].map((bounds) =>+ bounds+ ? {+ left: bounds.left,+ top: bounds.top,+ right: bounds.right,+ bottom: bounds.bottom,+ }+ : null,+ ),+ );+ if (+ wasDragging &&+ shouldRestoreHudMousePassthroughAfterDrag(hudBounds, event.clientX, event.clientY)+ ) {+ window.electronAPI?.hudOverlaySetIgnoreMouse?.(true);+ }+ },+ [hudBarRef, hudContentRef, recordingWebcamPreviewContainerRef],+ );useEffect(() => {return () => {diff --git a/src/components/launch/hooks/useWebcamPreviewOverlay.ts b/src/components/launch/hooks/useWebcamPreviewOverlay.tsindex 7c93899a..50d5c60e 100644--- a/src/components/launch/hooks/useWebcamPreviewOverlay.ts+++ b/src/components/launch/hooks/useWebcamPreviewOverlay.ts@@ -61,32 +61,29 @@ export function useWebcamPreviewOverlay({}}, [webcamEnabled]);- const handleWebcamPreviewPointerDown = useCallback(- (event: PointerEvent<HTMLDivElement>) => {- if (event.button !== 0) {- return;- }+ const handleWebcamPreviewPointerDown = useCallback((event: PointerEvent<HTMLDivElement>) => {+ if (event.button !== 0) {+ return;+ }- const previewRect = event.currentTarget.getBoundingClientRect();+ const previewRect = event.currentTarget.getBoundingClientRect();- event.preventDefault();- window.electronAPI?.hudOverlaySetIgnoreMouse?.(false);- webcamPreviewDragStartRef.current = {- pointerId: event.pointerId,- startX: event.clientX,- startY: event.clientY,- originX: webcamPreviewOffsetRef.current.x,- originY: webcamPreviewOffsetRef.current.y,- initialLeft: previewRect.left,- initialTop: previewRect.top,- previewWidth: previewRect.width,- previewHeight: previewRect.height,- dragging: false,- };- event.currentTarget.setPointerCapture(event.pointerId);- },- [],- );+ event.preventDefault();+ window.electronAPI?.hudOverlaySetIgnoreMouse?.(false);+ webcamPreviewDragStartRef.current = {+ pointerId: event.pointerId,+ startX: event.clientX,+ startY: event.clientY,+ originX: webcamPreviewOffsetRef.current.x,+ originY: webcamPreviewOffsetRef.current.y,+ initialLeft: previewRect.left,+ initialTop: previewRect.top,+ previewWidth: previewRect.width,+ previewHeight: previewRect.height,+ dragging: false,+ };+ event.currentTarget.setPointerCapture(event.pointerId);+ }, []);const handleWebcamPreviewPointerMove = useCallback((event: PointerEvent<HTMLDivElement>) => {const dragState = webcamPreviewDragStartRef.current;@@ -225,12 +222,12 @@ export function useWebcamPreviewOverlay({width: { ideal: 320 },height: { ideal: 320 },frameRate: { ideal: 24, max: 30 },- }+ }: {width: { ideal: 320 },height: { ideal: 320 },frameRate: { ideal: 24, max: 30 },- },+ },audio: false,});diff --git a/src/components/launch/popovers/LaunchPopoverCoordinator.tsx b/src/components/launch/popovers/LaunchPopoverCoordinator.tsxindex 55aa5f47..7087f78c 100644--- a/src/components/launch/popovers/LaunchPopoverCoordinator.tsx+++ b/src/components/launch/popovers/LaunchPopoverCoordinator.tsx@@ -1,4 +1,12 @@-import { createContext, useCallback, useContext, useEffect, useMemo, useState, type ReactNode } from "react";+import {+ createContext,+ useCallback,+ useContext,+ useEffect,+ useMemo,+ useState,+ type ReactNode,+} from "react";interface LaunchPopoverCoordinatorValue {openId: string | null;@@ -48,7 +56,9 @@ export function LaunchPopoverCoordinatorProvider({ children }: { children: Reactexport function useLaunchPopoverCoordinator() {const context = useContext(LaunchPopoverCoordinatorContext);if (!context) {- throw new Error("useLaunchPopoverCoordinator must be used within LaunchPopoverCoordinatorProvider");+ throw new Error(+ "useLaunchPopoverCoordinator must be used within LaunchPopoverCoordinatorProvider",+ );}return context;}diff --git a/src/components/launch/popovers/MicPopover.tsx b/src/components/launch/popovers/MicPopover.tsxindex 02247d66..cc5eb0f0 100644--- a/src/components/launch/popovers/MicPopover.tsx+++ b/src/components/launch/popovers/MicPopover.tsx@@ -53,7 +53,9 @@ export function MicPopover({><div className={styles.ddLabel}>{t("recording.microphone")}</div><DropdownItem- icon={systemAudioEnabled ? <SpeakerHighIcon size={16} /> : <SpeakerXIcon size={16} />}+ icon={+ systemAudioEnabled ? <SpeakerHighIcon size={16} /> : <SpeakerXIcon size={16} />+ }selected={systemAudioEnabled}onClick={onToggleSystemAudio}>@@ -73,7 +75,9 @@ export function MicPopover({</DropdownItem>)}{!microphoneEnabled && (- <div className="px-3 py-2 text-xs text-[var(--launch-text-muted)]">{t("recording.selectMicToEnable")}</div>+ <div className="px-3 py-2 text-xs text-[var(--launch-text-muted)]">+ {t("recording.selectMicToEnable")}+ </div>)}{devices.map((device) => (<MicDeviceRow@@ -81,13 +85,16 @@ export function MicPopover({device={device}selected={microphoneEnabled &&- (microphoneDeviceId === device.deviceId || selectedDeviceId === device.deviceId)+ (microphoneDeviceId === device.deviceId ||+ selectedDeviceId === device.deviceId)}onSelect={() => onSelectDevice(device.deviceId)}/>))}{devices.length === 0 && (- <div className="text-center text-xs text-[var(--launch-text-muted)] py-4">{t("recording.noMicrophonesFound")}</div>+ <div className="text-center text-xs text-[var(--launch-text-muted)] py-4">+ {t("recording.noMicrophonesFound")}+ </div>)}</HudPopover>);diff --git a/src/components/launch/popovers/PopoverScaffold.tsx b/src/components/launch/popovers/PopoverScaffold.tsxindex be349192..3be3dfcc 100644--- a/src/components/launch/popovers/PopoverScaffold.tsx+++ b/src/components/launch/popovers/PopoverScaffold.tsx@@ -54,7 +54,9 @@ export function MicDeviceRow({className={`${styles.ddItem} ${selected ? styles.ddItemSelected : ""}`}onClick={onSelect}>- <span className="shrink-0">{selected ? <MicrophoneIcon size={16} /> : <MicrophoneSlashIcon size={16} />}</span>+ <span className="shrink-0">+ {selected ? <MicrophoneIcon size={16} /> : <MicrophoneSlashIcon size={16} />}+ </span><span className="truncate flex-1">{device.label}</span><AudioLevelMeter level={level} className="w-16 shrink-0" /></button>diff --git a/src/components/launch/popovers/WebcamPopover.tsx b/src/components/launch/popovers/WebcamPopover.tsxindex 945ffac6..0c04ed89 100644--- a/src/components/launch/popovers/WebcamPopover.tsx+++ b/src/components/launch/popovers/WebcamPopover.tsx@@ -66,15 +66,20 @@ export function WebcamPopover({</div>{webcamEnabled && (<>- <DropdownItem icon={<VideoOff size={16} />} onClick={() => {- onDisableWebcam();- requestClose(POPOVER_ID);- }}>+ <DropdownItem+ icon={<VideoOff size={16} />}+ onClick={() => {+ onDisableWebcam();+ requestClose(POPOVER_ID);+ }}+ >{t("recording.turnOffWebcam")}</DropdownItem>{canToggleFloatingPreview ? (<DropdownItem- icon={showFloatingWebcamPreview ? <EyeOff size={16} /> : <Eye size={16} />}+ icon={+ showFloatingWebcamPreview ? <EyeOff size={16} /> : <Eye size={16} />+ }selected={showFloatingWebcamPreview}onClick={onToggleFloatingPreview}>@@ -86,7 +91,9 @@ export function WebcamPopover({</>)}{!webcamEnabled && (- <div className="px-3 py-2 text-xs text-[var(--launch-text-muted)]">{t("recording.selectWebcamToEnable")}</div>+ <div className="px-3 py-2 text-xs text-[var(--launch-text-muted)]">+ {t("recording.selectWebcamToEnable")}+ </div>)}{showWebcamControls && (<div className="flex justify-center px-3 py-2">@@ -106,7 +113,8 @@ export function WebcamPopover({key={device.deviceId}icon={webcamEnabled &&- (webcamDeviceId === device.deviceId || selectedVideoDeviceId === device.deviceId) ? (+ (webcamDeviceId === device.deviceId ||+ selectedVideoDeviceId === device.deviceId) ? (<Video size={16} />) : (<VideoOff size={16} />@@ -114,7 +122,8 @@ export function WebcamPopover({}selected={webcamEnabled &&- (webcamDeviceId === device.deviceId || selectedVideoDeviceId === device.deviceId)+ (webcamDeviceId === device.deviceId ||+ selectedVideoDeviceId === device.deviceId)}onClick={() => onSelectVideoDevice(device.deviceId)}>@@ -122,7 +131,9 @@ export function WebcamPopover({</DropdownItem>))}{videoDevices.length === 0 && (- <div className="text-center text-xs text-[var(--launch-text-muted)] py-4">{t("recording.noWebcamsFound")}</div>+ <div className="text-center text-xs text-[var(--launch-text-muted)] py-4">+ {t("recording.noWebcamsFound")}+ </div>)}</HudPopover>);diff --git a/src/components/ui/button.tsx b/src/components/ui/button.tsxindex 2ea10d35..4ad99478 100644--- a/src/components/ui/button.tsx+++ b/src/components/ui/button.tsx@@ -64,4 +64,3 @@ const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(Button.displayName = "Button";export { Button, buttonVariants };-diff --git a/src/components/ui/separator.tsx b/src/components/ui/separator.tsxindex be280e48..918798b3 100644--- a/src/components/ui/separator.tsx+++ b/src/components/ui/separator.tsx@@ -11,10 +11,7 @@ interface SeparatorProps {* A reusable separator component that can be used as a horizontal or vertical divider.* Replaces the inline div separators used throughout the application.*/-export function Separator({- orientation = "horizontal",- className,-}: SeparatorProps) {+export function Separator({ orientation = "horizontal", className }: SeparatorProps) {return (<divrole="separator"diff --git a/src/components/video-editor/AnnotationOverlay.tsx b/src/components/video-editor/AnnotationOverlay.tsxindex 8316468d..aa6078f9 100644--- a/src/components/video-editor/AnnotationOverlay.tsx+++ b/src/components/video-editor/AnnotationOverlay.tsx@@ -90,7 +90,9 @@ export function AnnotationOverlay({},size: {width: clampPercent((nextSceneWidth / Math.max(1, safeRecordingRect.width)) * 100),- height: clampPercent((nextSceneHeight / Math.max(1, safeRecordingRect.height)) * 100),+ height: clampPercent(+ (nextSceneHeight / Math.max(1, safeRecordingRect.height)) * 100,+ ),},};};diff --git a/src/components/video-editor/AnnotationSettingsPanel.tsx b/src/components/video-editor/AnnotationSettingsPanel.tsxindex db90b746..af532632 100644--- a/src/components/video-editor/AnnotationSettingsPanel.tsx+++ b/src/components/video-editor/AnnotationSettingsPanel.tsx@@ -142,650 +142,664 @@ export function AnnotationSettingsPanel({<div className="flex-[2] min-w-0 bg-editor-panel border border-foreground/10 rounded-2xl flex flex-col shadow-xl h-full overflow-hidden"><div className="flex-1 min-h-0 p-4 overflow-y-auto custom-scrollbar"><div className="mb-6">- <div className="flex items-center justify-between mb-4">- <span className="text-sm font-medium text-foreground">- {t("annotations.settings")}- </span>- <span className="text-[10px] uppercase tracking-wider font-medium text-[#2563EB] bg-[#2563EB]/10 px-2 py-1 rounded-full">- {t("annotations.active")}- </span>- </div>+ <div className="flex items-center justify-between mb-4">+ <span className="text-sm font-medium text-foreground">+ {t("annotations.settings")}+ </span>+ <span className="text-[10px] uppercase tracking-wider font-medium text-[#2563EB] bg-[#2563EB]/10 px-2 py-1 rounded-full">+ {t("annotations.active")}+ </span>+ </div>- {/* Type Selector */}- <Tabs- value={annotation.type}- onValueChange={(value) => onTypeChange(value as AnnotationType)}- className="mb-6"- >- <TabsList className="mb-4 bg-foreground/5 border border-foreground/5 p-1 w-full grid grid-cols-4 h-auto rounded-xl">- <TabsTrigger- value="text"- className="data-[state=active]:bg-[#2563EB] data-[state=active]:text-white text-muted-foreground py-2 rounded-lg transition-all gap-2"- >- <Type className="w-4 h-4" />- {t("annotations.text")}- </TabsTrigger>- <TabsTrigger- value="image"- className="data-[state=active]:bg-[#2563EB] data-[state=active]:text-white text-muted-foreground py-2 rounded-lg transition-all gap-2"- >- <ImageIcon className="w-4 h-4" />- {t("annotations.image")}- </TabsTrigger>- <TabsTrigger- value="figure"- className="data-[state=active]:bg-[#2563EB] data-[state=active]:text-white text-muted-foreground py-2 rounded-lg transition-all gap-2"- >- <svg- className="w-4 h-4"- viewBox="0 0 24 24"- fill="none"- stroke="currentColor"- strokeWidth="2"+ {/* Type Selector */}+ <Tabs+ value={annotation.type}+ onValueChange={(value) => onTypeChange(value as AnnotationType)}+ className="mb-6"+ >+ <TabsList className="mb-4 bg-foreground/5 border border-foreground/5 p-1 w-full grid grid-cols-4 h-auto rounded-xl">+ <TabsTrigger+ value="text"+ className="data-[state=active]:bg-[#2563EB] data-[state=active]:text-white text-muted-foreground py-2 rounded-lg transition-all gap-2"+ >+ <Type className="w-4 h-4" />+ {t("annotations.text")}+ </TabsTrigger>+ <TabsTrigger+ value="image"+ className="data-[state=active]:bg-[#2563EB] data-[state=active]:text-white text-muted-foreground py-2 rounded-lg transition-all gap-2">- <path- d="M4 12h16m0 0l-6-6m6 6l-6 6"- strokeLinecap="round"- strokeLinejoin="round"+ <ImageIcon className="w-4 h-4" />+ {t("annotations.image")}+ </TabsTrigger>+ <TabsTrigger+ value="figure"+ className="data-[state=active]:bg-[#2563EB] data-[state=active]:text-white text-muted-foreground py-2 rounded-lg transition-all gap-2"+ >+ <svg+ className="w-4 h-4"+ viewBox="0 0 24 24"+ fill="none"+ stroke="currentColor"+ strokeWidth="2"+ >+ <path+ d="M4 12h16m0 0l-6-6m6 6l-6 6"+ strokeLinecap="round"+ strokeLinejoin="round"+ />+ </svg>+ {t("annotations.arrow")}+ </TabsTrigger>+ <TabsTrigger+ value="blur"+ className="data-[state=active]:bg-[#2563EB] data-[state=active]:text-white text-muted-foreground py-2 rounded-lg transition-all gap-2"+ >+ <SquareDashed className="w-4 h-4" />+ {t("annotations.blur")}+ </TabsTrigger>+ </TabsList>++ {/* Text Content */}+ <TabsContent value="text" className="mt-0 space-y-4">+ <div>+ <label className="text-xs font-medium text-foreground mb-2 block">+ {t("annotations.textContent")}+ </label>+ <textarea+ value={annotation.textContent || annotation.content}+ onChange={(e) => onContentChange(e.target.value)}+ placeholder={t("annotations.textPlaceholder")}+ rows={5}+ className="w-full px-3 py-2 bg-foreground/5 border border-foreground/10 rounded-lg text-foreground text-sm placeholder:text-muted-foreground/70 focus:outline-none focus:ring-2 focus:ring-[#2563EB] focus:border-transparent resize-none"/>- </svg>- {t("annotations.arrow")}- </TabsTrigger>- <TabsTrigger- value="blur"- className="data-[state=active]:bg-[#2563EB] data-[state=active]:text-white text-muted-foreground py-2 rounded-lg transition-all gap-2"- >- <SquareDashed className="w-4 h-4" />- {t("annotations.blur")}- </TabsTrigger>- </TabsList>-- {/* Text Content */}- <TabsContent value="text" className="mt-0 space-y-4">- <div>- <label className="text-xs font-medium text-foreground mb-2 block">- {t("annotations.textContent")}- </label>- <textarea- value={annotation.textContent || annotation.content}- onChange={(e) => onContentChange(e.target.value)}- placeholder={t("annotations.textPlaceholder")}- rows={5}- className="w-full px-3 py-2 bg-foreground/5 border border-foreground/10 rounded-lg text-foreground text-sm placeholder:text-muted-foreground/70 focus:outline-none focus:ring-2 focus:ring-[#2563EB] focus:border-transparent resize-none"- />- </div>+ </div>- {/* Styling Controls */}- <div className="space-y-4">- {/* Font Family & Size */}- <div className="grid grid-cols-2 gap-2">- <div>- <label className="text-xs font-medium text-foreground mb-2 block">- {t("annotations.fontStyle")}- </label>- <Select- value={annotation.style.fontFamily}- onValueChange={(value) =>- onStyleChange({ fontFamily: value })- }- >- <SelectTrigger className="w-full bg-foreground/5 border-foreground/10 text-foreground h-9 text-xs">- <SelectValue- placeholder={t("annotations.selectStyle")}- />- </SelectTrigger>- <SelectContent className="bg-editor-surface-alt border-foreground/10 text-foreground max-h-[300px]">- {fontFamilies.map((font) => (- <SelectItem- key={font.value}- value={font.value}- style={{ fontFamily: font.value }}- >- {font.label}- </SelectItem>- ))}- {customFonts.length > 0 && (- <>- <div className="px-2 py-1.5 text-[10px] font-medium text-muted-foreground uppercase tracking-wider">- Custom Fonts- </div>- {customFonts.map((font) => (- <SelectItem- key={font.id}- value={font.fontFamily}- style={{ fontFamily: font.fontFamily }}- >- {font.name}- </SelectItem>- ))}- </>- )}- </SelectContent>- </Select>+ {/* Styling Controls */}+ <div className="space-y-4">+ {/* Font Family & Size */}+ <div className="grid grid-cols-2 gap-2">+ <div>+ <label className="text-xs font-medium text-foreground mb-2 block">+ {t("annotations.fontStyle")}+ </label>+ <Select+ value={annotation.style.fontFamily}+ onValueChange={(value) =>+ onStyleChange({ fontFamily: value })+ }+ >+ <SelectTrigger className="w-full bg-foreground/5 border-foreground/10 text-foreground h-9 text-xs">+ <SelectValue+ placeholder={t("annotations.selectStyle")}+ />+ </SelectTrigger>+ <SelectContent className="bg-editor-surface-alt border-foreground/10 text-foreground max-h-[300px]">+ {fontFamilies.map((font) => (+ <SelectItem+ key={font.value}+ value={font.value}+ style={{ fontFamily: font.value }}+ >+ {font.label}+ </SelectItem>+ ))}+ {customFonts.length > 0 && (+ <>+ <div className="px-2 py-1.5 text-[10px] font-medium text-muted-foreground uppercase tracking-wider">+ Custom Fonts+ </div>+ {customFonts.map((font) => (+ <SelectItem+ key={font.id}+ value={font.fontFamily}+ style={{+ fontFamily: font.fontFamily,+ }}+ >+ {font.name}+ </SelectItem>+ ))}+ </>+ )}+ </SelectContent>+ </Select>+ </div>+ <div>+ <label className="text-xs font-medium text-foreground mb-2 block">+ {t("annotations.size")}+ </label>+ <Select+ value={annotation.style.fontSize.toString()}+ onValueChange={(value) =>+ onStyleChange({ fontSize: parseInt(value) })+ }+ >+ <SelectTrigger className="w-full bg-foreground/5 border-foreground/10 text-foreground h-9 text-xs">+ <SelectValue placeholder={t("annotations.size")} />+ </SelectTrigger>+ <SelectContent className="bg-editor-surface-alt border-foreground/10 text-foreground max-h-[200px]">+ {FONT_SIZES.map((size) => (+ <SelectItem key={size} value={size.toString()}>+ {size}px+ </SelectItem>+ ))}+ </SelectContent>+ </Select>+ </div></div>++ {/* Add Custom Font Button */}<div>- <label className="text-xs font-medium text-foreground mb-2 block">- {t("annotations.size")}- </label>- <Select- value={annotation.style.fontSize.toString()}- onValueChange={(value) =>- onStyleChange({ fontSize: parseInt(value) })- }- >- <SelectTrigger className="w-full bg-foreground/5 border-foreground/10 text-foreground h-9 text-xs">- <SelectValue placeholder={t("annotations.size")} />- </SelectTrigger>- <SelectContent className="bg-editor-surface-alt border-foreground/10 text-foreground max-h-[200px]">- {FONT_SIZES.map((size) => (- <SelectItem key={size} value={size.toString()}>- {size}px- </SelectItem>- ))}- </SelectContent>- </Select>+ <AddCustomFontDialog+ onFontAdded={(font) => {+ setCustomFonts(getCustomFonts());+ onStyleChange({ fontFamily: font.fontFamily });+ }}+ /></div>- </div>-- {/* Add Custom Font Button */}- <div>- <AddCustomFontDialog- onFontAdded={(font) => {- setCustomFonts(getCustomFonts());- onStyleChange({ fontFamily: font.fontFamily });- }}- />- </div>- {/* Formatting Toggles */}- <div className="flex items-center justify-between gap-2">- <ToggleGroup- type="multiple"- className="justify-start bg-foreground/5 p-1 rounded-lg border border-foreground/5"- >- <ToggleGroupItem- value="bold"- aria-label={t("annotations.toggleBold")}- data-state={- annotation.style.fontWeight === "bold" ? "on" : "off"- }- onClick={() =>- onStyleChange({- fontWeight:- annotation.style.fontWeight === "bold"- ? "normal"- : "bold",- })- }- className="h-8 w-8 data-[state=on]:bg-[#2563EB] data-[state=on]:text-white text-muted-foreground hover:bg-foreground/5 hover:text-foreground"- >- <Bold className="h-4 w-4" />- </ToggleGroupItem>- <ToggleGroupItem- value="italic"- aria-label={t("annotations.toggleItalic")}- data-state={- annotation.style.fontStyle === "italic" ? "on" : "off"- }- onClick={() =>- onStyleChange({- fontStyle:- annotation.style.fontStyle === "italic"- ? "normal"- : "italic",- })- }- className="h-8 w-8 data-[state=on]:bg-[#2563EB] data-[state=on]:text-white text-muted-foreground hover:bg-foreground/5 hover:text-foreground"- >- <Italic className="h-4 w-4" />- </ToggleGroupItem>- <ToggleGroupItem- value="underline"- aria-label={t("annotations.toggleUnderline")}- data-state={- annotation.style.textDecoration === "underline"- ? "on"- : "off"- }- onClick={() =>- onStyleChange({- textDecoration:- annotation.style.textDecoration === "underline"- ? "none"- : "underline",- })- }- className="h-8 w-8 data-[state=on]:bg-[#2563EB] data-[state=on]:text-white text-muted-foreground hover:bg-foreground/5 hover:text-foreground"- >- <Underline className="h-4 w-4" />- </ToggleGroupItem>- </ToggleGroup>-- <ToggleGroup- type="single"- value={annotation.style.textAlign}- className="justify-start bg-foreground/5 p-1 rounded-lg border border-foreground/5"- >- <ToggleGroupItem- value="left"- aria-label={t("annotations.alignLeft")}- onClick={() => onStyleChange({ textAlign: "left" })}- className="h-8 w-8 data-[state=on]:bg-[#2563EB] data-[state=on]:text-white text-muted-foreground hover:bg-foreground/5 hover:text-foreground"+ {/* Formatting Toggles */}+ <div className="flex items-center justify-between gap-2">+ <ToggleGroup+ type="multiple"+ className="justify-start bg-foreground/5 p-1 rounded-lg border border-foreground/5">- <AlignLeft className="h-4 w-4" />- </ToggleGroupItem>- <ToggleGroupItem- value="center"- aria-label={t("annotations.alignCenter")}- onClick={() => onStyleChange({ textAlign: "center" })}- className="h-8 w-8 data-[state=on]:bg-[#2563EB] data-[state=on]:text-white text-muted-foreground hover:bg-foreground/5 hover:text-foreground"- >- <AlignCenter className="h-4 w-4" />- </ToggleGroupItem>- <ToggleGroupItem- value="right"- aria-label={t("annotations.alignRight")}- onClick={() => onStyleChange({ textAlign: "right" })}- className="h-8 w-8 data-[state=on]:bg-[#2563EB] data-[state=on]:text-white text-muted-foreground hover:bg-foreground/5 hover:text-foreground"+ <ToggleGroupItem+ value="bold"+ aria-label={t("annotations.toggleBold")}+ data-state={+ annotation.style.fontWeight === "bold"+ ? "on"+ : "off"+ }+ onClick={() =>+ onStyleChange({+ fontWeight:+ annotation.style.fontWeight === "bold"+ ? "normal"+ : "bold",+ })+ }+ className="h-8 w-8 data-[state=on]:bg-[#2563EB] data-[state=on]:text-white text-muted-foreground hover:bg-foreground/5 hover:text-foreground"+ >+ <Bold className="h-4 w-4" />+ </ToggleGroupItem>+ <ToggleGroupItem+ value="italic"+ aria-label={t("annotations.toggleItalic")}+ data-state={+ annotation.style.fontStyle === "italic"+ ? "on"+ : "off"+ }+ onClick={() =>+ onStyleChange({+ fontStyle:+ annotation.style.fontStyle === "italic"+ ? "normal"+ : "italic",+ })+ }+ className="h-8 w-8 data-[state=on]:bg-[#2563EB] data-[state=on]:text-white text-muted-foreground hover:bg-foreground/5 hover:text-foreground"+ >+ <Italic className="h-4 w-4" />+ </ToggleGroupItem>+ <ToggleGroupItem+ value="underline"+ aria-label={t("annotations.toggleUnderline")}+ data-state={+ annotation.style.textDecoration === "underline"+ ? "on"+ : "off"+ }+ onClick={() =>+ onStyleChange({+ textDecoration:+ annotation.style.textDecoration ===+ "underline"+ ? "none"+ : "underline",+ })+ }+ className="h-8 w-8 data-[state=on]:bg-[#2563EB] data-[state=on]:text-white text-muted-foreground hover:bg-foreground/5 hover:text-foreground"+ >+ <Underline className="h-4 w-4" />+ </ToggleGroupItem>+ </ToggleGroup>++ <ToggleGroup+ type="single"+ value={annotation.style.textAlign}+ className="justify-start bg-foreground/5 p-1 rounded-lg border border-foreground/5">- <AlignRight className="h-4 w-4" />- </ToggleGroupItem>- </ToggleGroup>- </div>-- {/* Colors */}- <div className="grid grid-cols-2 gap-4">- <div>- <label className="text-xs font-medium text-foreground mb-2 block">- {t("annotations.textColor")}- </label>- <Popover>- <PopoverTrigger asChild>- <Button- variant="outline"- className="w-full h-9 justify-start gap-2 bg-foreground/5 border-foreground/10 hover:bg-foreground/10 px-2"- >- <div- className="w-4 h-4 rounded-full border border-foreground/20"- style={{- backgroundColor: annotation.style.color,- }}- />- <span className="text-xs text-muted-foreground truncate flex-1 text-left">- {annotation.style.color}- </span>- <ChevronDown className="h-3 w-3 opacity-50" />- </Button>- </PopoverTrigger>- <PopoverContent className="w-[260px] p-3 bg-editor-surface-alt border border-foreground/10 rounded-xl shadow-xl">- <Block- color={annotation.style.color}- colors={colorPalette}- onChange={(color) => {- onStyleChange({ color: color.hex });- }}- style={{- borderRadius: "8px",- }}- />- </PopoverContent>- </Popover>+ <ToggleGroupItem+ value="left"+ aria-label={t("annotations.alignLeft")}+ onClick={() => onStyleChange({ textAlign: "left" })}+ className="h-8 w-8 data-[state=on]:bg-[#2563EB] data-[state=on]:text-white text-muted-foreground hover:bg-foreground/5 hover:text-foreground"+ >+ <AlignLeft className="h-4 w-4" />+ </ToggleGroupItem>+ <ToggleGroupItem+ value="center"+ aria-label={t("annotations.alignCenter")}+ onClick={() => onStyleChange({ textAlign: "center" })}+ className="h-8 w-8 data-[state=on]:bg-[#2563EB] data-[state=on]:text-white text-muted-foreground hover:bg-foreground/5 hover:text-foreground"+ >+ <AlignCenter className="h-4 w-4" />+ </ToggleGroupItem>+ <ToggleGroupItem+ value="right"+ aria-label={t("annotations.alignRight")}+ onClick={() => onStyleChange({ textAlign: "right" })}+ className="h-8 w-8 data-[state=on]:bg-[#2563EB] data-[state=on]:text-white text-muted-foreground hover:bg-foreground/5 hover:text-foreground"+ >+ <AlignRight className="h-4 w-4" />+ </ToggleGroupItem>+ </ToggleGroup></div>- <div>- <label className="text-xs font-medium text-foreground mb-2 block">- {t("annotations.background")}- </label>- <Popover>- <PopoverTrigger asChild>- <Button- variant="outline"- className="w-full h-9 justify-start gap-2 bg-foreground/5 border-foreground/10 hover:bg-foreground/10 px-2"- >- <div className="w-4 h-4 rounded-full border border-foreground/20 relative overflow-hidden">- <div className="absolute inset-0 checkerboard-bg opacity-50" />++ {/* Colors */}+ <div className="grid grid-cols-2 gap-4">+ <div>+ <label className="text-xs font-medium text-foreground mb-2 block">+ {t("annotations.textColor")}+ </label>+ <Popover>+ <PopoverTrigger asChild>+ <Button+ variant="outline"+ className="w-full h-9 justify-start gap-2 bg-foreground/5 border-foreground/10 hover:bg-foreground/10 px-2"+ ><div- className="absolute inset-0"+ className="w-4 h-4 rounded-full border border-foreground/20"style={{- backgroundColor:- annotation.style.backgroundColor,+ backgroundColor: annotation.style.color,}}/>- </div>- <span className="text-xs text-muted-foreground truncate flex-1 text-left">- {annotation.style.backgroundColor ===- "transparent"- ? t("annotations.none")- : "Color"}- </span>- <ChevronDown className="h-3 w-3 opacity-50" />- </Button>- </PopoverTrigger>- <PopoverContent className="w-[260px] p-3 bg-editor-surface-alt border border-foreground/10 rounded-xl shadow-xl">- <Block- color={- annotation.style.backgroundColor ===- "transparent"- ? "#000000"- : annotation.style.backgroundColor- }- colors={colorPalette}- onChange={(color) => {- onStyleChange({ backgroundColor: color.hex });- }}- style={{- borderRadius: "8px",- }}- />- <Button- variant="ghost"- size="sm"- className="w-full mt-2 text-xs h-7 hover:bg-foreground/5 text-muted-foreground"+ <span className="text-xs text-muted-foreground truncate flex-1 text-left">+ {annotation.style.color}+ </span>+ <ChevronDown className="h-3 w-3 opacity-50" />+ </Button>+ </PopoverTrigger>+ <PopoverContent className="w-[260px] p-3 bg-editor-surface-alt border border-foreground/10 rounded-xl shadow-xl">+ <Block+ color={annotation.style.color}+ colors={colorPalette}+ onChange={(color) => {+ onStyleChange({ color: color.hex });+ }}+ style={{+ borderRadius: "8px",+ }}+ />+ </PopoverContent>+ </Popover>+ </div>+ <div>+ <label className="text-xs font-medium text-foreground mb-2 block">+ {t("annotations.background")}+ </label>+ <Popover>+ <PopoverTrigger asChild>+ <Button+ variant="outline"+ className="w-full h-9 justify-start gap-2 bg-foreground/5 border-foreground/10 hover:bg-foreground/10 px-2"+ >+ <div className="w-4 h-4 rounded-full border border-foreground/20 relative overflow-hidden">+ <div className="absolute inset-0 checkerboard-bg opacity-50" />+ <div+ className="absolute inset-0"+ style={{+ backgroundColor:+ annotation.style+ .backgroundColor,+ }}+ />+ </div>+ <span className="text-xs text-muted-foreground truncate flex-1 text-left">+ {annotation.style.backgroundColor ===+ "transparent"+ ? t("annotations.none")+ : "Color"}+ </span>+ <ChevronDown className="h-3 w-3 opacity-50" />+ </Button>+ </PopoverTrigger>+ <PopoverContent className="w-[260px] p-3 bg-editor-surface-alt border border-foreground/10 rounded-xl shadow-xl">+ <Block+ color={+ annotation.style.backgroundColor ===+ "transparent"+ ? "#000000"+ : annotation.style.backgroundColor+ }+ colors={colorPalette}+ onChange={(color) => {+ onStyleChange({+ backgroundColor: color.hex,+ });+ }}+ style={{+ borderRadius: "8px",+ }}+ />+ <Button+ variant="ghost"+ size="sm"+ className="w-full mt-2 text-xs h-7 hover:bg-foreground/5 text-muted-foreground"+ onClick={() => {+ onStyleChange({+ backgroundColor: "transparent",+ });+ }}+ >+ {t("annotations.clearBackground")}+ </Button>+ </PopoverContent>+ </Popover>+ </div>+ </div>+ </div>+ </TabsContent>++ {/* Image Upload */}+ <TabsContent value="image" className="mt-0 space-y-4">+ <input+ type="file"+ ref={fileInputRef}+ onChange={handleImageUpload}+ accept=".jpg,.jpeg,.png,.gif,.webp,image/*"+ className="hidden"+ />+ <Button+ onClick={() => fileInputRef.current?.click()}+ variant="outline"+ className="w-full gap-2 bg-foreground/5 text-foreground border-foreground/10 hover:bg-[#2563EB] hover:text-white hover:border-[#2563EB] transition-all py-8"+ >+ <Upload className="w-5 h-5" />+ {t("annotations.uploadImage")}+ </Button>++ {annotation.content && annotation.content.startsWith("data:image") && (+ <div className="rounded-lg border border-foreground/10 overflow-hidden bg-foreground/5 p-2">+ <img+ src={annotation.content}+ alt="Uploaded annotation"+ className="w-full h-auto rounded-md"+ />+ </div>+ )}++ <p className="text-xs text-muted-foreground/70 text-center leading-relaxed">+ {t("annotations.supportedFormats")}+ </p>+ </TabsContent>++ <TabsContent value="figure" className="mt-0 space-y-4">+ <div>+ <label className="text-xs font-medium text-foreground mb-3 block">+ {t("annotations.arrowDirection")}+ </label>+ <div className="grid grid-cols-4 gap-2">+ {(+ [+ "up",+ "down",+ "left",+ "right",+ "up-right",+ "up-left",+ "down-right",+ "down-left",+ ] as ArrowDirection[]+ ).map((direction) => {+ const ArrowComponent = getArrowComponent(direction);+ return (+ <button+ key={direction}onClick={() => {- onStyleChange({- backgroundColor: "transparent",- });+ const newFigureData: FigureData = {+ ...annotation.figureData!,+ arrowDirection: direction,+ };+ onFigureDataChange?.(newFigureData);}}+ aria-label={t(+ "annotations.arrowDirectionOption",+ "Arrow direction: {{direction}}",+ { direction: direction.replace(/-/g, " ") },+ )}+ className={cn(+ "h-16 rounded-lg border flex items-center justify-center transition-all p-2",+ annotation.figureData?.arrowDirection ===+ direction+ ? "bg-[#2563EB] border-[#2563EB]"+ : "bg-foreground/5 border-foreground/10 hover:bg-foreground/10 hover:border-foreground/20",+ )}>- {t("annotations.clearBackground")}- </Button>- </PopoverContent>- </Popover>+ <ArrowComponent+ color={+ annotation.figureData?.arrowDirection ===+ direction+ ? "#ffffff"+ : "#94a3b8"+ }+ strokeWidth={3}+ />+ </button>+ );+ })}</div></div>- </div>- </TabsContent>-- {/* Image Upload */}- <TabsContent value="image" className="mt-0 space-y-4">- <input- type="file"- ref={fileInputRef}- onChange={handleImageUpload}- accept=".jpg,.jpeg,.png,.gif,.webp,image/*"- className="hidden"- />- <Button- onClick={() => fileInputRef.current?.click()}- variant="outline"- className="w-full gap-2 bg-foreground/5 text-foreground border-foreground/10 hover:bg-[#2563EB] hover:text-white hover:border-[#2563EB] transition-all py-8"- >- <Upload className="w-5 h-5" />- {t("annotations.uploadImage")}- </Button>-- {annotation.content && annotation.content.startsWith("data:image") && (- <div className="rounded-lg border border-foreground/10 overflow-hidden bg-foreground/5 p-2">- <img- src={annotation.content}- alt="Uploaded annotation"- className="w-full h-auto rounded-md"++ <div>+ <label className="text-xs font-medium text-foreground mb-2 block">+ {t("annotations.strokeWidth", undefined, {+ width: annotation.figureData?.strokeWidth || 4,+ })}+ </label>+ <Slider+ value={[annotation.figureData?.strokeWidth || 4]}+ onValueChange={([value]) => {+ const newFigureData: FigureData = {+ ...annotation.figureData!,+ strokeWidth: value,+ };+ onFigureDataChange?.(newFigureData);+ }}+ min={1}+ max={6}+ step={1}+ className="w-full"/></div>- )}-- <p className="text-xs text-muted-foreground/70 text-center leading-relaxed">- {t("annotations.supportedFormats")}- </p>- </TabsContent>-- <TabsContent value="figure" className="mt-0 space-y-4">- <div>- <label className="text-xs font-medium text-foreground mb-3 block">- {t("annotations.arrowDirection")}- </label>- <div className="grid grid-cols-4 gap-2">- {(- [- "up",- "down",- "left",- "right",- "up-right",- "up-left",- "down-right",- "down-left",- ] as ArrowDirection[]- ).map((direction) => {- const ArrowComponent = getArrowComponent(direction);- return (- <button- key={direction}- onClick={() => {++ <div>+ <label className="text-xs font-medium text-foreground mb-2 block">+ {t("annotations.arrowColor")}+ </label>+ <Popover>+ <PopoverTrigger asChild>+ <Button+ variant="outline"+ className="w-full h-10 justify-start gap-2 bg-foreground/5 border-foreground/10 hover:bg-foreground/10"+ >+ <div+ className="w-5 h-5 rounded-full border border-foreground/20"+ style={{+ backgroundColor:+ annotation.figureData?.color || "#2563EB",+ }}+ />+ <span className="text-xs text-muted-foreground truncate flex-1 text-left">+ {annotation.figureData?.color || "#2563EB"}+ </span>+ <ChevronDown className="h-3 w-3 opacity-50" />+ </Button>+ </PopoverTrigger>+ <PopoverContent className="w-[260px] p-3 bg-editor-surface-alt border border-foreground/10 rounded-xl shadow-xl">+ <Block+ color={annotation.figureData?.color || "#2563EB"}+ colors={colorPalette}+ onChange={(color) => {const newFigureData: FigureData = {...annotation.figureData!,- arrowDirection: direction,+ color: color.hex,};onFigureDataChange?.(newFigureData);}}- aria-label={t(- "annotations.arrowDirectionOption",- "Arrow direction: {{direction}}",- { direction: direction.replace(/-/g, " ") },- )}- className={cn(- "h-16 rounded-lg border flex items-center justify-center transition-all p-2",- annotation.figureData?.arrowDirection === direction- ? "bg-[#2563EB] border-[#2563EB]"- : "bg-foreground/5 border-foreground/10 hover:bg-foreground/10 hover:border-foreground/20",- )}- >- <ArrowComponent- color={- annotation.figureData?.arrowDirection ===- direction- ? "#ffffff"- : "#94a3b8"- }- strokeWidth={3}- />- </button>- );- })}- </div>- </div>-- <div>- <label className="text-xs font-medium text-foreground mb-2 block">- {t("annotations.strokeWidth", undefined, {- width: annotation.figureData?.strokeWidth || 4,- })}- </label>- <Slider- value={[annotation.figureData?.strokeWidth || 4]}- onValueChange={([value]) => {- const newFigureData: FigureData = {- ...annotation.figureData!,- strokeWidth: value,- };- onFigureDataChange?.(newFigureData);- }}- min={1}- max={6}- step={1}- className="w-full"- />- </div>-- <div>- <label className="text-xs font-medium text-foreground mb-2 block">- {t("annotations.arrowColor")}- </label>- <Popover>- <PopoverTrigger asChild>- <Button- variant="outline"- className="w-full h-10 justify-start gap-2 bg-foreground/5 border-foreground/10 hover:bg-foreground/10"- >- <div- className="w-5 h-5 rounded-full border border-foreground/20"style={{- backgroundColor:- annotation.figureData?.color || "#2563EB",+ borderRadius: "8px",}}/>- <span className="text-xs text-muted-foreground truncate flex-1 text-left">- {annotation.figureData?.color || "#2563EB"}+ </PopoverContent>+ </Popover>+ </div>+ </TabsContent>++ <TabsContent value="blur" className="mt-0 space-y-4">+ <div className="p-4 bg-foreground/5 rounded-xl border border-foreground/10 flex flex-col items-center">+ <div className="w-full space-y-3">+ <div className="flex items-center justify-between">+ <span className="text-xs font-medium text-foreground">+ {t("annotations.blurStrength", undefined, {+ strength: annotation.blurIntensity ?? 20,+ })}</span>- <ChevronDown className="h-3 w-3 opacity-50" />- </Button>- </PopoverTrigger>- <PopoverContent className="w-[260px] p-3 bg-editor-surface-alt border border-foreground/10 rounded-xl shadow-xl">- <Block- color={annotation.figureData?.color || "#2563EB"}- colors={colorPalette}- onChange={(color) => {- const newFigureData: FigureData = {- ...annotation.figureData!,- color: color.hex,- };- onFigureDataChange?.(newFigureData);- }}- style={{- borderRadius: "8px",- }}+ </div>+ <Slider+ value={[annotation.blurIntensity ?? 20]}+ onValueChange={([value]) => onBlurIntensityChange?.(value)}+ min={1}+ max={100}+ step={1}+ className="w-full"/>- </PopoverContent>- </Popover>- </div>- </TabsContent>-- <TabsContent value="blur" className="mt-0 space-y-4">- <div className="p-4 bg-foreground/5 rounded-xl border border-foreground/10 flex flex-col items-center">- <div className="w-full space-y-3">- <div className="flex items-center justify-between">- <span className="text-xs font-medium text-foreground">- {t("annotations.blurStrength", undefined, {- strength: annotation.blurIntensity ?? 20,- })}- </span></div>- <Slider- value={[annotation.blurIntensity ?? 20]}- onValueChange={([value]) => onBlurIntensityChange?.(value)}- min={1}- max={100}- step={1}- className="w-full"- />- </div>- <div className="w-full space-y-3 mt-4">- <div className="flex items-center justify-between">- <span className="text-xs font-medium text-foreground">- {t("annotations.solidColor", "Solid Color (Censorship)")}- </span>- </div>- <div className="flex flex-wrap gap-2">- <button- onClick={() => onBlurColorChange?.("")}- className={cn(- "w-8 h-8 rounded-full border-2 flex items-center justify-center transition-all",- !annotation.blurColor ||- annotation.blurColor === "transparent"- ? "border-[#2563EB] scale-110"- : "border-transparent hover:border-foreground/20",- )}- title={t("annotations.none", "None")}- >- <div className="w-5 h-5 rounded-full bg-editor-bg flex items-center justify-center overflow-hidden relative">- <div className="absolute w-full h-0.5 bg-red-500 rotate-45" />- </div>- </button>- <button- onClick={() => onBlurColorChange?.("#000000")}- className={cn(- "w-8 h-8 rounded-full border-2 transition-all bg-black",- annotation.blurColor === "#000000"- ? "border-[#2563EB] scale-110"- : "border-transparent hover:border-foreground/20",- )}- title="Black"- />- <button- onClick={() => onBlurColorChange?.("#FFFFFF")}- className={cn(- "w-8 h-8 rounded-full border-2 transition-all bg-white",- annotation.blurColor === "#FFFFFF"- ? "border-[#2563EB] scale-110"- : "border-transparent hover:border-foreground/20",- )}- title="White"- />+ <div className="w-full space-y-3 mt-4">+ <div className="flex items-center justify-between">+ <span className="text-xs font-medium text-foreground">+ {t(+ "annotations.solidColor",+ "Solid Color (Censorship)",+ )}+ </span>+ </div>+ <div className="flex flex-wrap gap-2">+ <button+ onClick={() => onBlurColorChange?.("")}+ className={cn(+ "w-8 h-8 rounded-full border-2 flex items-center justify-center transition-all",+ !annotation.blurColor ||+ annotation.blurColor === "transparent"+ ? "border-[#2563EB] scale-110"+ : "border-transparent hover:border-foreground/20",+ )}+ title={t("annotations.none", "None")}+ >+ <div className="w-5 h-5 rounded-full bg-editor-bg flex items-center justify-center overflow-hidden relative">+ <div className="absolute w-full h-0.5 bg-red-500 rotate-45" />+ </div>+ </button>+ <button+ onClick={() => onBlurColorChange?.("#000000")}+ className={cn(+ "w-8 h-8 rounded-full border-2 transition-all bg-black",+ annotation.blurColor === "#000000"+ ? "border-[#2563EB] scale-110"+ : "border-transparent hover:border-foreground/20",+ )}+ title="Black"+ />+ <button+ onClick={() => onBlurColorChange?.("#FFFFFF")}+ className={cn(+ "w-8 h-8 rounded-full border-2 transition-all bg-white",+ annotation.blurColor === "#FFFFFF"+ ? "border-[#2563EB] scale-110"+ : "border-transparent hover:border-foreground/20",+ )}+ title="White"+ />- <Popover>- <PopoverTrigger asChild>- <button- className={cn(- "w-8 h-8 rounded-full border-2 transition-all flex items-center justify-center overflow-hidden relative",- annotation.blurColor &&- ![- "#000000",- "#FFFFFF",- "transparent",- "",- ].includes(annotation.blurColor)- ? "border-[#2563EB] scale-110"- : "border-transparent hover:border-foreground/20",- )}- style={{- backgroundColor:+ <Popover>+ <PopoverTrigger asChild>+ <button+ className={cn(+ "w-8 h-8 rounded-full border-2 transition-all flex items-center justify-center overflow-hidden relative",annotation.blurColor &&- ![+ ![+ "#000000",+ "#FFFFFF",+ "transparent",+ "",+ ].includes(annotation.blurColor)+ ? "border-[#2563EB] scale-110"+ : "border-transparent hover:border-foreground/20",+ )}+ style={{+ backgroundColor:+ annotation.blurColor &&+ ![+ "#000000",+ "#FFFFFF",+ "transparent",+ "",+ ].includes(annotation.blurColor)+ ? annotation.blurColor+ : "transparent",+ }}+ title="Custom Color"+ >+ {(!annotation.blurColor ||+ ["#000000","#FFFFFF","transparent","",- ].includes(annotation.blurColor)- ? annotation.blurColor- : "transparent",- }}- title="Custom Color"- >- {(!annotation.blurColor ||- [- "#000000",- "#FFFFFF",- "transparent",- "",- ].includes(annotation.blurColor)) && (- <div className="w-full h-full flex items-center justify-center bg-foreground/5">- <div className="w-full h-full bg-gradient-to-tr from-red-500 via-green-500 to-blue-500 opacity-50" />- </div>- )}- </button>- </PopoverTrigger>- <PopoverContent className="w-[260px] p-3 bg-editor-surface-alt border border-foreground/10 rounded-xl shadow-xl">- <Block- color={annotation.blurColor || "#2563EB"}- colors={colorPalette}- onChange={(color) => {- onBlurColorChange?.(color.hex);- }}- style={{- borderRadius: "8px",- }}- />- </PopoverContent>- </Popover>+ ].includes(annotation.blurColor)) && (+ <div className="w-full h-full flex items-center justify-center bg-foreground/5">+ <div className="w-full h-full bg-gradient-to-tr from-red-500 via-green-500 to-blue-500 opacity-50" />+ </div>+ )}+ </button>+ </PopoverTrigger>+ <PopoverContent className="w-[260px] p-3 bg-editor-surface-alt border border-foreground/10 rounded-xl shadow-xl">+ <Block+ color={annotation.blurColor || "#2563EB"}+ colors={colorPalette}+ onChange={(color) => {+ onBlurColorChange?.(color.hex);+ }}+ style={{+ borderRadius: "8px",+ }}+ />+ </PopoverContent>+ </Popover>+ </div></div></div>+ </TabsContent>+ </Tabs>++ <div className="mt-6 p-3 bg-foreground/5 rounded-lg border border-foreground/5">+ <div className="flex items-center gap-2 mb-2 text-muted-foreground">+ <Info className="w-3.5 h-3.5" />+ <span className="text-xs font-medium">+ {t("annotations.shortcutsAndTips")}+ </span></div>- </TabsContent>- </Tabs>-- <div className="mt-6 p-3 bg-foreground/5 rounded-lg border border-foreground/5">- <div className="flex items-center gap-2 mb-2 text-muted-foreground">- <Info className="w-3.5 h-3.5" />- <span className="text-xs font-medium">- {t("annotations.shortcutsAndTips")}- </span>+ <ul className="text-[10px] text-muted-foreground space-y-1.5 list-disc pl-3 leading-relaxed">+ <li>{t("annotations.tipSelectAnnotation")}</li>+ <li>{t("annotations.tipCycleForward")}</li>+ <li>{t("annotations.tipCycleBackward")}</li>+ </ul></div>- <ul className="text-[10px] text-muted-foreground space-y-1.5 list-disc pl-3 leading-relaxed">- <li>{t("annotations.tipSelectAnnotation")}</li>- <li>{t("annotations.tipCycleForward")}</li>- <li>{t("annotations.tipCycleBackward")}</li>- </ul>- </div></div></div><div className="flex-shrink-0 border-t border-foreground/10 bg-editor-panel p-4 pt-3">diff --git a/src/components/video-editor/ExportSettingsMenu.tsx b/src/components/video-editor/ExportSettingsMenu.tsxindex 5e36cdd7..dadf7e9c 100644--- a/src/components/video-editor/ExportSettingsMenu.tsx+++ b/src/components/video-editor/ExportSettingsMenu.tsx@@ -151,7 +151,7 @@ export function ExportSettingsMenu({{isActive ? (<motion.spanlayoutId="header-export-quality-pill"- className="absolute inset-0 rounded-lg bg-neutral-800 dark:bg-white"+ className="absolute inset-0 rounded-lg bg-neutral-800 dark:bg-white"transition={{type: "spring",stiffness: 420,@@ -163,17 +163,19 @@ export function ExportSettingsMenu({<spanclassName={cn(isActive- ? "text-white dark:text-black"- : "text-muted-foreground hover:text-foreground",- )}- >- {option.label}- </span>- {mp4OutputDimensions ? (- <span- className={cn(- "mt-0.5 text-[9px]",- isActive ? "text-white/75 dark:text-black/75" : "text-muted-foreground/70",+ ? "text-white dark:text-black"+ : "text-muted-foreground hover:text-foreground",+ )}+ >+ {option.label}+ </span>+ {mp4OutputDimensions ? (+ <span+ className={cn(+ "mt-0.5 text-[9px]",+ isActive+ ? "text-white/75 dark:text-black/75"+ : "text-muted-foreground/70",)}>{mp4OutputDimensions[option.value].width} x{" "}@@ -216,7 +218,7 @@ export function ExportSettingsMenu({{isActive ? (<motion.spanlayoutId="header-export-encoding-pill"- className="absolute inset-0 rounded-lg bg-neutral-800 dark:bg-white"+ className="absolute inset-0 rounded-lg bg-neutral-800 dark:bg-white"transition={{type: "spring",stiffness: 420,@@ -257,7 +259,7 @@ export function ExportSettingsMenu({{isActive ? (<motion.spanlayoutId="header-export-fps-pill"- className="absolute inset-0 rounded-lg bg-neutral-800 dark:bg-white"+ className="absolute inset-0 rounded-lg bg-neutral-800 dark:bg-white"transition={{type: "spring",stiffness: 420,@@ -309,7 +311,7 @@ export function ExportSettingsMenu({{isActive ? (<motion.spanlayoutId="header-export-pipeline-pill"- className="absolute inset-0 rounded-lg bg-neutral-800 dark:bg-white"+ className="absolute inset-0 rounded-lg bg-neutral-800 dark:bg-white"transition={{type: "spring",stiffness: 420,@@ -375,7 +377,10 @@ export function ExportSettingsMenu({<div className="mb-3 flex min-h-12 items-center justify-between gap-3 rounded-lg border border-foreground/10 bg-foreground/5 px-3 py-2"><div className="min-w-0"><p className="text-[11px] font-semibold text-foreground">- {tSettings("export.captionSidecar.title", "Export captions file")}+ {tSettings(+ "export.captionSidecar.title",+ "Export captions file",+ )}</p><p className="mt-0.5 truncate text-[10px] text-muted-foreground/75">{tSettings(@@ -414,7 +419,7 @@ export function ExportSettingsMenu({{isActive ? (<motion.spanlayoutId="header-gif-frame-rate-pill"- className="absolute inset-0 rounded-lg bg-neutral-800 dark:bg-white"+ className="absolute inset-0 rounded-lg bg-neutral-800 dark:bg-white"transition={{type: "spring",stiffness: 420,@@ -454,7 +459,7 @@ export function ExportSettingsMenu({{isActive ? (<motion.spanlayoutId="header-gif-size-pill"- className="absolute inset-0 rounded-lg bg-neutral-800 dark:bg-white"+ className="absolute inset-0 rounded-lg bg-neutral-800 dark:bg-white"transition={{type: "spring",stiffness: 420,diff --git a/src/components/video-editor/ExtensionIcon.tsx b/src/components/video-editor/ExtensionIcon.tsxindex 7808bff3..ef759ab2 100644--- a/src/components/video-editor/ExtensionIcon.tsx+++ b/src/components/video-editor/ExtensionIcon.tsx@@ -111,8 +111,8 @@ function resolvePhosphorIcon(name: string): Icon | null {}/**- * Renders either a Phosphor icon (by PascalCase name) or an image (by path/URL).- * Falls back to the PuzzlePiece icon if nothing matches.+ * Renders either a Phosphor icon (by PascalCase name) or an image (by path/URL).+ * Falls back to the PuzzlePiece icon if nothing matches.*/export function ExtensionIcon({icon,diff --git a/src/components/video-editor/GifOptionsPanel.tsx b/src/components/video-editor/GifOptionsPanel.tsxindex fbf98d09..560683c2 100644--- a/src/components/video-editor/GifOptionsPanel.tsx+++ b/src/components/video-editor/GifOptionsPanel.tsx@@ -109,7 +109,9 @@ export function GifOptionsPanel({<label className="text-sm font-medium text-foreground">{t("gifOptions.loopAnimation")}</label>- <p className="text-xs text-muted-foreground/70">{t("gifOptions.loopDescription")}</p>+ <p className="text-xs text-muted-foreground/70">+ {t("gifOptions.loopDescription")}+ </p></div><Switch checked={loop} onCheckedChange={onLoopChange} disabled={disabled} /></div>diff --git a/src/components/video-editor/KeyboardShortcutsHelp.tsx b/src/components/video-editor/KeyboardShortcutsHelp.tsxindex 4071d3ad..f9c24c63 100644--- a/src/components/video-editor/KeyboardShortcutsHelp.tsx+++ b/src/components/video-editor/KeyboardShortcutsHelp.tsx@@ -15,10 +15,9 @@ export function KeyboardShortcutsHelp() {});useEffect(() => {- Promise.all([- formatShortcut(["shift", "Scroll"]),- formatShortcut(["mod", "Scroll"]),- ]).then(([pan, zoom]) => setScrollLabels({ pan, zoom }));+ Promise.all([formatShortcut(["shift", "Scroll"]), formatShortcut(["mod", "Scroll"])]).then(+ ([pan, zoom]) => setScrollLabels({ pan, zoom }),+ );}, []);return (diff --git a/src/components/video-editor/TutorialHelp.tsx b/src/components/video-editor/TutorialHelp.tsxindex a09e5c88..b38b6f3e 100644--- a/src/components/video-editor/TutorialHelp.tsx+++ b/src/components/video-editor/TutorialHelp.tsx@@ -1,4 +1,13 @@-import { ArrowRight, ArrowSquareOut as ExternalLink, Question as HelpCircle, Keyboard, ChatDots as MessageSquareMore, Scissors, GearSix as Settings2, XLogo as Twitter } from "@phosphor-icons/react";+import {+ ArrowRight,+ ArrowSquareOut as ExternalLink,+ Question as HelpCircle,+ Keyboard,+ ChatDots as MessageSquareMore,+ Scissors,+ GearSix as Settings2,+ XLogo as Twitter,+} from "@phosphor-icons/react";import { useEffect, useState } from "react";import { Button } from "@/components/ui/button";import {@@ -19,8 +28,10 @@ export const RECORDLY_ISSUES_URL = "https://github.com/webadderallorg/Recordly/iconst RECORDLY_DISCORD_URL = "https://discord.gg/sdv2FBVNgE";const RECORDLY_X_URL = "https://x.com/webadderall";const CONTACT_EMAIL = "[email protected]";-export const APP_HEADER_ACTION_BUTTON_CLASS = "h-7 px-2 text-xs text-muted-foreground hover:bg-foreground/10 hover:text-foreground transition-all gap-1.5";-export const APP_HEADER_ICON_BUTTON_CLASS = "h-7 w-7 p-0 text-muted-foreground hover:bg-foreground/10 hover:text-foreground transition-all";+export const APP_HEADER_ACTION_BUTTON_CLASS =+ "h-7 px-2 text-xs text-muted-foreground hover:bg-foreground/10 hover:text-foreground transition-all gap-1.5";+export const APP_HEADER_ICON_BUTTON_CLASS =+ "h-7 w-7 p-0 text-muted-foreground hover:bg-foreground/10 hover:text-foreground transition-all";interface KeyboardShortcutsDialogProps {triggerLabel?: string;@@ -54,7 +65,12 @@ export function DiscordLinkButton() {type="button"variant="ghost"size="sm"- onClick={() => void openExternalLink(RECORDLY_DISCORD_URL, t("feedback.openFailed", "Failed to open link."))}+ onClick={() =>+ void openExternalLink(+ RECORDLY_DISCORD_URL,+ t("feedback.openFailed", "Failed to open link."),+ )+ }className={APP_HEADER_ICON_BUTTON_CLASS}title={t("common.app.discord", "Join Discord")}aria-label={t("common.app.discord", "Join Discord")}@@ -83,10 +99,14 @@ export function FeedbackDialog() {<DialogContent className="max-w-lg bg-editor-dialog border-foreground/10 [&>button]:text-muted-foreground [&>button:hover]:text-foreground"><DialogHeader><DialogTitle className="text-xl font-semibold text-foreground flex items-center gap-2">- <MessageSquareMore className="h-5 w-5 text-[#2563EB]" /> {t("feedback.title", "Feedback & contact")}+ <MessageSquareMore className="h-5 w-5 text-[#2563EB]" />{" "}+ {t("feedback.title", "Feedback & contact")}</DialogTitle><DialogDescription className="text-muted-foreground">- {t("feedback.description", "Reach out directly or open an issue if something is broken or missing.")}+ {t(+ "feedback.description",+ "Reach out directly or open an issue if something is broken or missing.",+ )}</DialogDescription></DialogHeader><div className="mt-4 space-y-4">@@ -96,12 +116,19 @@ export function FeedbackDialog() {<p className="text-[11px] uppercase tracking-[0.18em] text-muted-foreground/70">{t("feedback.emailLabel", "Email")}</p>- <p className="mt-1 text-sm font-medium text-foreground">{CONTACT_EMAIL}</p>+ <p className="mt-1 text-sm font-medium text-foreground">+ {CONTACT_EMAIL}+ </p></div><Buttontype="button"variant="outline"- onClick={() => void openExternalLink(`mailto:${CONTACT_EMAIL}`, t("feedback.openFailed", "Failed to open link."))}+ onClick={() =>+ void openExternalLink(+ `mailto:${CONTACT_EMAIL}`,+ t("feedback.openFailed", "Failed to open link."),+ )+ }className="border-foreground/10 bg-foreground/5 text-foreground hover:bg-foreground/10 hover:text-foreground"><ExternalLink className="h-3.5 w-3.5" />@@ -112,12 +139,19 @@ export function FeedbackDialog() {<p className="text-[11px] uppercase tracking-[0.18em] text-muted-foreground/70">{t("feedback.xLabel", "X")}</p>- <p className="mt-1 text-sm font-medium text-foreground">@webadderall</p>+ <p className="mt-1 text-sm font-medium text-foreground">+ @webadderall+ </p></div><Buttontype="button"variant="outline"- onClick={() => void openExternalLink(RECORDLY_X_URL, t("feedback.openFailed", "Failed to open link."))}+ onClick={() =>+ void openExternalLink(+ RECORDLY_X_URL,+ t("feedback.openFailed", "Failed to open link."),+ )+ }className="border-foreground/10 bg-foreground/5 text-foreground hover:bg-foreground/10 hover:text-foreground"><Twitter className="h-3.5 w-3.5" />@@ -127,7 +161,12 @@ export function FeedbackDialog() {<Buttontype="button"variant="outline"- onClick={() => void openExternalLink(RECORDLY_ISSUES_URL, t("feedback.openFailed", "Failed to open link."))}+ onClick={() =>+ void openExternalLink(+ RECORDLY_ISSUES_URL,+ t("feedback.openFailed", "Failed to open link."),+ )+ }className="h-10 w-full justify-between border-foreground/10 bg-foreground/5 px-4 text-foreground hover:bg-foreground/10 hover:text-foreground"><span className="flex items-center gap-2 text-sm font-medium">@@ -154,10 +193,9 @@ export function KeyboardShortcutsDialog({});useEffect(() => {- Promise.all([- formatShortcut(["shift", "Scroll"]),- formatShortcut(["mod", "Scroll"]),- ]).then(([pan, zoom]) => setScrollLabels({ pan, zoom }));+ Promise.all([formatShortcut(["shift", "Scroll"]), formatShortcut(["mod", "Scroll"])]).then(+ ([pan, zoom]) => setScrollLabels({ pan, zoom }),+ );}, []);return (@@ -177,17 +215,26 @@ export function KeyboardShortcutsDialog({<DialogContent className="max-w-lg bg-editor-dialog border-foreground/10 [&>button]:text-muted-foreground [&>button:hover]:text-foreground"><DialogHeader><DialogTitle className="text-xl font-semibold text-foreground flex items-center gap-2">- <Keyboard className="h-5 w-5 text-[#2563EB]" /> {t("keyboardShortcuts.title")}+ <Keyboard className="h-5 w-5 text-[#2563EB]" />{" "}+ {t("keyboardShortcuts.title")}</DialogTitle><DialogDescription className="text-muted-foreground">- {t("keyboardShortcuts.description", "Quick reference for the timeline and editor controls.")}+ {t(+ "keyboardShortcuts.description",+ "Quick reference for the timeline and editor controls.",+ )}</DialogDescription></DialogHeader><div className="mt-4 space-y-4"><div className="rounded-xl border border-foreground/10 bg-foreground/[0.03] p-4 space-y-2 text-xs">{SHORTCUT_ACTIONS.map((action) => (- <div key={action} className="flex items-center justify-between gap-3 rounded-lg border border-foreground/5 bg-foreground/5 px-3 py-2.5">- <span className="text-muted-foreground">{SHORTCUT_LABELS[action]}</span>+ <div+ key={action}+ className="flex items-center justify-between gap-3 rounded-lg border border-foreground/5 bg-foreground/5 px-3 py-2.5"+ >+ <span className="text-muted-foreground">+ {SHORTCUT_LABELS[action]}+ </span><kbd className="rounded border border-foreground/10 bg-foreground/10 px-2 py-1 font-mono text-[#2563EB]">{formatBinding(shortcuts[action], isMac)}</kbd>@@ -195,19 +242,25 @@ export function KeyboardShortcutsDialog({))}<div className="grid grid-cols-1 gap-2 pt-2 sm:grid-cols-3"><div className="rounded-lg border border-foreground/5 bg-foreground/5 px-3 py-2.5">- <p className="text-[11px] uppercase tracking-[0.18em] text-muted-foreground/70">{t("keyboardShortcuts.panTimeline")}</p>+ <p className="text-[11px] uppercase tracking-[0.18em] text-muted-foreground/70">+ {t("keyboardShortcuts.panTimeline")}+ </p><kbd className="mt-2 inline-flex rounded border border-foreground/10 bg-foreground/10 px-2 py-1 font-mono text-[#2563EB]">{scrollLabels.pan}</kbd></div><div className="rounded-lg border border-foreground/5 bg-foreground/5 px-3 py-2.5">- <p className="text-[11px] uppercase tracking-[0.18em] text-muted-foreground/70">{t("keyboardShortcuts.zoomTimeline")}</p>+ <p className="text-[11px] uppercase tracking-[0.18em] text-muted-foreground/70">+ {t("keyboardShortcuts.zoomTimeline")}+ </p><kbd className="mt-2 inline-flex rounded border border-foreground/10 bg-foreground/10 px-2 py-1 font-mono text-[#2563EB]">{scrollLabels.zoom}</kbd></div><div className="rounded-lg border border-foreground/5 bg-foreground/5 px-3 py-2.5">- <p className="text-[11px] uppercase tracking-[0.18em] text-muted-foreground/70">{t("keyboardShortcuts.cycleAnnotations")}</p>+ <p className="text-[11px] uppercase tracking-[0.18em] text-muted-foreground/70">+ {t("keyboardShortcuts.cycleAnnotations")}+ </p><kbd className="mt-2 inline-flex rounded border border-foreground/10 bg-foreground/10 px-2 py-1 font-mono text-[#2563EB]">{t("keyboardShortcuts.tab")}</kbd>@@ -237,11 +290,7 @@ export function TutorialHelp() {return (<Dialog><DialogTrigger asChild>- <Button- variant="ghost"- size="sm"- className={APP_HEADER_ACTION_BUTTON_CLASS}- >+ <Button variant="ghost" size="sm" className={APP_HEADER_ACTION_BUTTON_CLASS}><HelpCircle className="w-3.5 h-3.5" /><span className="font-medium">{t("tutorial.howTrimmingWorks")}</span></Button>@@ -260,8 +309,11 @@ export function TutorialHelp() {<div className="bg-foreground/5 rounded-lg p-4 border border-foreground/5"><p className="text-muted-foreground leading-relaxed">{t("tutorial.descriptionP1")}- <span className="text-[#ef4444] font-bold"> {t("tutorial.descriptionRemove")}</span>.{" "}- {t("tutorial.descriptionP3")}+ <span className="text-[#ef4444] font-bold">+ {" "}+ {t("tutorial.descriptionRemove")}+ </span>+ . {t("tutorial.descriptionP3")}</p></div>{/* Visual Illustration */}@@ -340,12 +392,20 @@ export function TutorialHelp() {{/* Steps */}<div className="grid grid-cols-2 gap-4"><div className="p-3 rounded bg-foreground/5 border border-foreground/5">- <div className="text-[#ef4444] font-bold mb-1">{t("tutorial.addTrimStep")}</div>- <p className="text-xs text-muted-foreground">{t("tutorial.addTrimDesc")}</p>+ <div className="text-[#ef4444] font-bold mb-1">+ {t("tutorial.addTrimStep")}+ </div>+ <p className="text-xs text-muted-foreground">+ {t("tutorial.addTrimDesc")}+ </p></div><div className="p-3 rounded bg-foreground/5 border border-foreground/5">- <div className="text-[#ef4444] font-bold mb-1">{t("tutorial.adjustStep")}</div>- <p className="text-xs text-muted-foreground">{t("tutorial.adjustDesc")}</p>+ <div className="text-[#ef4444] font-bold mb-1">+ {t("tutorial.adjustStep")}+ </div>+ <p className="text-xs text-muted-foreground">+ {t("tutorial.adjustDesc")}+ </p></div></div></div>diff --git a/src/components/video-editor/audio/audioResourceVersion.test.ts b/src/components/video-editor/audio/audioResourceVersion.test.tsindex a264f9e1..b2b73b72 100644--- a/src/components/video-editor/audio/audioResourceVersion.test.ts+++ b/src/components/video-editor/audio/audioResourceVersion.test.ts@@ -36,13 +36,10 @@ describe("getAudioResourceVersionKey", () => {});it("cache-busts only the trusted loopback media URL after finalization", () => {- const localUrl =- "http://127.0.0.1:43123/video?path=C%3A%5CRecordly%5Crecording.mic.wav";+ const localUrl = "http://127.0.0.1:43123/video?path=C%3A%5CRecordly%5Crecording.mic.wav";const versionedUrl = new URL(getVersionedAudioResourceUrl(localUrl, 2));- expect(versionedUrl.searchParams.get("path")).toBe(- "C:\\Recordly\\recording.mic.wav",- );+ expect(versionedUrl.searchParams.get("path")).toBe("C:\\Recordly\\recording.mic.wav");expect(versionedUrl.searchParams.get("recordlyAudioVersion")).toBe("2");expect(getVersionedAudioResourceUrl("https://cdn.example/audio.wav?sig=abc", 2)).toBe("https://cdn.example/audio.wav?sig=abc",@@ -50,8 +47,7 @@ describe("getAudioResourceVersionKey", () => {});it("uses one cache scope for every version of a loopback resource", () => {- const baseUrl =- "http://127.0.0.1:43123/video?path=C%3A%5CRecordly%5Crecording.mic.wav";+ const baseUrl = "http://127.0.0.1:43123/video?path=C%3A%5CRecordly%5Crecording.mic.wav";const versionedUrl = `${baseUrl}&recordlyAudioVersion=4`;expect(getAudioResourceCacheScope(versionedUrl)).toBe(baseUrl);diff --git a/src/components/video-editor/audio/audioTypes.ts b/src/components/video-editor/audio/audioTypes.tsindex d20c224f..2eb7ef24 100644--- a/src/components/video-editor/audio/audioTypes.ts+++ b/src/components/video-editor/audio/audioTypes.ts@@ -22,4 +22,3 @@ export interface SourceAudioTrackWithPeaks extends SourceAudioTrackMetaItem {export const SOURCE_AUDIO_FALLBACK_TOAST_ID = "source-audio-fallback-error";export const SOURCE_AUDIO_NORMALIZE_GAIN = 1.35;-diff --git a/src/components/video-editor/audio/clipAudio.ts b/src/components/video-editor/audio/clipAudio.tsindex c6bf7409..ec780ebc 100644--- a/src/components/video-editor/audio/clipAudio.ts+++ b/src/components/video-editor/audio/clipAudio.ts@@ -2,17 +2,17 @@ import { getClipSourceEndMs, sortClipRegions } from "../types";import type { ClipRegion } from "../types";export function getActiveClipIdAtSourceTime(- sourceTimeSeconds: number,- clipRegions: ClipRegion[],+ sourceTimeSeconds: number,+ clipRegions: ClipRegion[],): string | null {- const sourceMs = Math.round(sourceTimeSeconds * 1000);- const activeClip = sortClipRegions(clipRegions).find(- (clip) => sourceMs >= clip.startMs && sourceMs < getClipSourceEndMs(clip),- );- return activeClip?.id ?? null;+ const sourceMs = Math.round(sourceTimeSeconds * 1000);+ const activeClip = sortClipRegions(clipRegions).find(+ (clip) => sourceMs >= clip.startMs && sourceMs < getClipSourceEndMs(clip),+ );+ return activeClip?.id ?? null;}export function isClipMutedById(clipId: string | null, clipRegions: ClipRegion[]): boolean {- if (!clipId) return false;- return clipRegions.find((clip) => clip.id === clipId)?.muted ?? false;+ if (!clipId) return false;+ return clipRegions.find((clip) => clip.id === clipId)?.muted ?? false;}diff --git a/src/components/video-editor/audio/useAudioPreviewSync.ts b/src/components/video-editor/audio/useAudioPreviewSync.tsindex 2d91e839..e7a5c8a5 100644--- a/src/components/video-editor/audio/useAudioPreviewSync.ts+++ b/src/components/video-editor/audio/useAudioPreviewSync.ts@@ -2,478 +2,495 @@ import { useCallback, useEffect, useMemo, useRef } from "react";import { buildResolvedAudioPlan } from "@/lib/exporter/audioRoutingEngine";import { resolveMediaElementSource } from "@/lib/exporter/localMediaSource";import {- clampMediaTimeToDuration,- enablePitchPreservingPlayback,- estimateCompanionAudioStartDelaySeconds,- getMediaSyncPlaybackRate,- resolvePreviewMediaDuration,+ clampMediaTimeToDuration,+ enablePitchPreservingPlayback,+ estimateCompanionAudioStartDelaySeconds,+ getMediaSyncPlaybackRate,+ resolvePreviewMediaDuration,} from "@/lib/mediaTiming";import type { AudioRegion, SpeedRegion } from "../types";import {- getAudioResourceVersionKey,- getVersionedAudioResourceUrl,- isAudioResourceLoadCurrent,+ getAudioResourceVersionKey,+ getVersionedAudioResourceUrl,+ isAudioResourceLoadCurrent,} from "./audioResourceVersion";const SOURCE_AUDIO_PREVIEW_PLAYING_SEEK_DRIFT_SECONDS = 0.18;const SOURCE_AUDIO_PREVIEW_PAUSED_SEEK_DRIFT_SECONDS = 0.01;interface UseAudioPreviewSyncParams {- audioRegions: AudioRegion[];- previewVolume: number;- isPlaying: boolean;- currentTime: number;- timelineTime: number;- duration: number;- effectiveSpeedRegions: SpeedRegion[];- previewSourceAudioFallbackPaths: string[];- sourceAudioFallbackStartDelayMsByPath: Record<string, number>;- sourceAudioResourceVersion: number;- isCurrentClipMuted: boolean;- getSourceTrackPreviewGain: (audioPath: string) => number;- onSourceFallbackLoadError: (error: unknown) => void;+ audioRegions: AudioRegion[];+ previewVolume: number;+ isPlaying: boolean;+ currentTime: number;+ timelineTime: number;+ duration: number;+ effectiveSpeedRegions: SpeedRegion[];+ previewSourceAudioFallbackPaths: string[];+ sourceAudioFallbackStartDelayMsByPath: Record<string, number>;+ sourceAudioResourceVersion: number;+ isCurrentClipMuted: boolean;+ getSourceTrackPreviewGain: (audioPath: string) => number;+ onSourceFallbackLoadError: (error: unknown) => void;}export function useAudioPreviewSync({- audioRegions,- previewVolume,- isPlaying,- currentTime,- timelineTime,- duration,- effectiveSpeedRegions,- previewSourceAudioFallbackPaths,- sourceAudioFallbackStartDelayMsByPath,- sourceAudioResourceVersion,- isCurrentClipMuted,- getSourceTrackPreviewGain,- onSourceFallbackLoadError,+ audioRegions,+ previewVolume,+ isPlaying,+ currentTime,+ timelineTime,+ duration,+ effectiveSpeedRegions,+ previewSourceAudioFallbackPaths,+ sourceAudioFallbackStartDelayMsByPath,+ sourceAudioResourceVersion,+ isCurrentClipMuted,+ getSourceTrackPreviewGain,+ onSourceFallbackLoadError,}: UseAudioPreviewSyncParams) {- const resolvedPlan = useMemo(- () =>- buildResolvedAudioPlan({- videoResource: null,- sourceAudioFallbackPaths: previewSourceAudioFallbackPaths,- audioRegions,- }),- [audioRegions, previewSourceAudioFallbackPaths],- );- const resolvedUserTracks = useMemo(- () => resolvedPlan.tracks.filter((track) => track.kind === "user"),- [resolvedPlan],- );- const resolvedSourceTracks = useMemo(- () => resolvedPlan.tracks.filter((track) => track.kind !== "user"),- [resolvedPlan],- );-- const audioElementsRef = useRef<Map<string, HTMLAudioElement>>(new Map());- const audioElementRevokersRef = useRef<Map<string, () => void>>(new Map());- const audioElementResourcesRef = useRef<Map<string, string>>(new Map());- const sourceAudioElementsRef = useRef<Map<string, HTMLAudioElement>>(new Map());- const sourceAudioMediaNodesRef = useRef<Map<string, MediaElementAudioSourceNode>>(new Map());- const sourceAudioGainNodesRef = useRef<Map<string, GainNode>>(new Map());- const sourceAudioElementRevokersRef = useRef<Map<string, () => void>>(new Map());- const sourceAudioElementResourcesRef = useRef<Map<string, string>>(new Map());- const sourceAudioContextRef = useRef<AudioContext | null>(null);- const sourceAudioMasterGainRef = useRef<GainNode | null>(null);- const sourceAudioResumePromiseRef = useRef<Promise<void> | null>(null);- const lastSourceAudioSyncTimeRef = useRef<number | null>(null);-- const ensureSourceAudioContext = useCallback(() => {- if (!sourceAudioContextRef.current) {- const context = new AudioContext({ latencyHint: "interactive" });- const masterGain = context.createGain();- masterGain.gain.value = 1;- masterGain.connect(context.destination);- sourceAudioContextRef.current = context;- sourceAudioMasterGainRef.current = masterGain;- }- return sourceAudioContextRef.current;- }, []);-- const ensureSourceAudioRunning = useCallback(() => {- const context = ensureSourceAudioContext();- if (context.state === "running") {- return Promise.resolve();- }- if (!sourceAudioResumePromiseRef.current) {- sourceAudioResumePromiseRef.current = context- .resume()- .catch(() => undefined)- .finally(() => {- sourceAudioResumePromiseRef.current = null;- });- }- return sourceAudioResumePromiseRef.current;- }, [ensureSourceAudioContext]);-- const playSourceAudioPreview = useCallback(() => {- void ensureSourceAudioRunning();- for (const audio of sourceAudioElementsRef.current.values()) {- if (!audio.src) continue;- audio.play().catch(() => undefined);- }- }, [ensureSourceAudioRunning]);-- useEffect(() => {- let cancelled = false;- const existing = audioElementsRef.current;- const currentIds = new Set(resolvedUserTracks.map((track) => track.id));-- for (const [id, audio] of existing) {- if (!currentIds.has(id)) {- audio.pause();- audio.src = "";- audioElementRevokersRef.current.get(id)?.();- audioElementRevokersRef.current.delete(id);- audioElementResourcesRef.current.delete(id);- existing.delete(id);- }- }-- for (const track of resolvedUserTracks) {- let audio = existing.get(track.id);- if (!audio) {- audio = new Audio();- audio.preload = "auto";- existing.set(track.id, audio);- }-- if (audioElementResourcesRef.current.get(track.id) !== track.sourceRef.path) {- audio.pause();- audio.src = "";- audioElementRevokersRef.current.get(track.id)?.();- audioElementRevokersRef.current.delete(track.id);- audioElementResourcesRef.current.set(track.id, track.sourceRef.path);-- void (async () => {- const resolved = await resolveMediaElementSource(track.sourceRef.path);- const latestAudio = existing.get(track.id);-- if (- cancelled ||- latestAudio !== audio ||- audioElementResourcesRef.current.get(track.id) !== track.sourceRef.path- ) {- resolved.revoke();- return;- }-- audioElementRevokersRef.current.set(track.id, resolved.revoke);- latestAudio.src = resolved.src;- })();- }-- audio.volume = Math.max(0, Math.min(1, track.gain * previewVolume));- }-- return () => {- cancelled = true;- };- }, [previewVolume, resolvedUserTracks]);-- useEffect(() => {- const existing = sourceAudioElementsRef.current;- const currentIds = new Set(resolvedSourceTracks.map((track) => track.sourceRef.path));-- for (const [id, audio] of existing) {- if (!currentIds.has(id)) {- audio.pause();- audio.src = "";- sourceAudioMediaNodesRef.current.get(id)?.disconnect();- sourceAudioMediaNodesRef.current.delete(id);- sourceAudioGainNodesRef.current.get(id)?.disconnect();- sourceAudioGainNodesRef.current.delete(id);- sourceAudioElementRevokersRef.current.get(id)?.();- sourceAudioElementRevokersRef.current.delete(id);- sourceAudioElementResourcesRef.current.delete(id);- existing.delete(id);- }- }-- for (const track of resolvedSourceTracks) {- const audioPath = track.sourceRef.path;- const resourceKey = getAudioResourceVersionKey(audioPath, sourceAudioResourceVersion);- let audio = existing.get(audioPath);- if (!audio) {- audio = new Audio();- audio.preload = "auto";- audio.crossOrigin = "anonymous";- existing.set(audioPath, audio);- }- audio.volume = 1;- audio.dataset.sourceAudioPath = audioPath;-- // Web Audio API createMediaElementSource breaks preservesPitch on Chromium.- // We route directly through the HTMLAudioElement to ensure pitch preservation works- // during speed changes. Note: this limits maximum preview volume to 1.0 (100%).-- if (sourceAudioElementResourcesRef.current.get(audioPath) !== resourceKey) {- audio.pause();- audio.src = "";- sourceAudioElementRevokersRef.current.get(audioPath)?.();- sourceAudioElementRevokersRef.current.delete(audioPath);- sourceAudioElementResourcesRef.current.set(audioPath, resourceKey);-- // Resource identity, not effect lifetime, decides staleness. Playback and fallback- // rerenders must not cancel the only load for the current finalized sidecar version.- void (async () => {- try {- const resolved = await resolveMediaElementSource(audioPath);- const latestAudio = existing.get(audioPath);-- if (- latestAudio !== audio ||- !isAudioResourceLoadCurrent(- sourceAudioElementResourcesRef.current,- audioPath,- resourceKey,- )- ) {- resolved.revoke();- return;- }-- sourceAudioElementRevokersRef.current.set(audioPath, resolved.revoke);- latestAudio.src = getVersionedAudioResourceUrl(- resolved.src,- sourceAudioResourceVersion,- );- latestAudio.load();- if (isPlaying) {- playSourceAudioPreview();- }- } catch (error) {- const latestAudio = existing.get(audioPath);- if (- latestAudio !== audio ||- !isAudioResourceLoadCurrent(- sourceAudioElementResourcesRef.current,- audioPath,- resourceKey,- )- ) {- return;- }-- sourceAudioElementRevokersRef.current.get(audioPath)?.();- sourceAudioElementRevokersRef.current.delete(audioPath);- sourceAudioElementResourcesRef.current.delete(audioPath);- if (latestAudio === audio) {- latestAudio.pause();- latestAudio.src = "";- }- onSourceFallbackLoadError(error);- }- })();- }-- audio.volume = Math.max(0, Math.min(1, getSourceTrackPreviewGain(audioPath) * (isCurrentClipMuted ? 0 : previewVolume)));- }-- if (sourceAudioMasterGainRef.current) {- sourceAudioMasterGainRef.current.gain.value = isCurrentClipMuted- ? 0- : Math.max(0, Math.min(1, previewVolume));- }-- if (resolvedSourceTracks.length === 0) {- lastSourceAudioSyncTimeRef.current = null;- }- }, [- getSourceTrackPreviewGain,- isPlaying,- isCurrentClipMuted,- onSourceFallbackLoadError,- resolvedSourceTracks,- sourceAudioResourceVersion,- previewVolume,- playSourceAudioPreview,- ]);-- useEffect(() => {- return () => {- for (const audio of audioElementsRef.current.values()) {- audio.pause();- audio.src = "";- }- for (const revoke of audioElementRevokersRef.current.values()) {- revoke();- }- audioElementsRef.current.clear();- audioElementRevokersRef.current.clear();- audioElementResourcesRef.current.clear();- for (const audio of sourceAudioElementsRef.current.values()) {- audio.pause();- audio.src = "";- }- for (const node of sourceAudioMediaNodesRef.current.values()) {- node.disconnect();- }- for (const node of sourceAudioGainNodesRef.current.values()) {- node.disconnect();- }- for (const revoke of sourceAudioElementRevokersRef.current.values()) {- revoke();- }- sourceAudioElementsRef.current.clear();- sourceAudioMediaNodesRef.current.clear();- sourceAudioGainNodesRef.current.clear();- sourceAudioElementRevokersRef.current.clear();- sourceAudioElementResourcesRef.current.clear();- if (sourceAudioMasterGainRef.current) {- sourceAudioMasterGainRef.current.disconnect();- sourceAudioMasterGainRef.current = null;- }- const context = sourceAudioContextRef.current;- sourceAudioContextRef.current = null;- sourceAudioResumePromiseRef.current = null;- if (context) {- void context.close();- }- lastSourceAudioSyncTimeRef.current = null;- };- }, []);-- useEffect(() => {- const currentTimeMs = timelineTime * 1000;- const activeSpeedRegion = effectiveSpeedRegions.find(- (region) => currentTimeMs >= region.startMs && currentTimeMs < region.endMs,- );- const targetPlaybackRate = activeSpeedRegion ? activeSpeedRegion.speed : 1;-- for (const track of resolvedUserTracks) {- const audio = audioElementsRef.current.get(track.id);- if (!audio) continue;-- const startMs = track.timelineBinding.startMs;- const endMs = track.timelineBinding.endMs;- const isInRegion = currentTimeMs >= startMs && currentTimeMs < endMs;-- if (isPlaying && isInRegion) {- enablePitchPreservingPlayback(audio);- const audioOffset = (currentTimeMs - startMs) / 1000;- if (Math.abs(audio.currentTime - audioOffset) > 0.2) {- audio.currentTime = audioOffset;- }- const syncedPlaybackRate = getMediaSyncPlaybackRate({- basePlaybackRate: targetPlaybackRate,- currentTime: audio.currentTime,- targetTime: audioOffset,- });- if (Math.abs(audio.playbackRate - syncedPlaybackRate) > 0.001) {- audio.playbackRate = syncedPlaybackRate;- }- if (audio.paused) {- audio.play().catch(() => undefined);- }- } else if (!audio.paused) {- audio.pause();- }- }- }, [effectiveSpeedRegions, isPlaying, resolvedUserTracks, timelineTime]);-- useEffect(() => {- if (resolvedSourceTracks.length === 0) {- lastSourceAudioSyncTimeRef.current = null;- return;- }-- const activeSpeedRegion = effectiveSpeedRegions.find(- (region) => currentTime * 1000 >= region.startMs && currentTime * 1000 < region.endMs,- );- const targetPlaybackRate = activeSpeedRegion ? activeSpeedRegion.speed : 1;- const previousTimelineTime = lastSourceAudioSyncTimeRef.current;- const timelineJumped =- previousTimelineTime === null || Math.abs(currentTime - previousTimelineTime) > 0.25;- const driftThreshold = isPlaying- ? SOURCE_AUDIO_PREVIEW_PLAYING_SEEK_DRIFT_SECONDS- : SOURCE_AUDIO_PREVIEW_PAUSED_SEEK_DRIFT_SECONDS;- if (sourceAudioMasterGainRef.current) {- sourceAudioMasterGainRef.current.gain.value = isCurrentClipMuted- ? 0- : Math.max(0, Math.min(1, previewVolume));- }-- for (const audio of sourceAudioElementsRef.current.values()) {- const sourceAudioPath = audio.dataset.sourceAudioPath ?? "";- audio.volume = Math.max(0, Math.min(1, getSourceTrackPreviewGain(sourceAudioPath) * (isCurrentClipMuted ? 0 : previewVolume)));-- enablePitchPreservingPlayback(audio);- const audioDuration = resolvePreviewMediaDuration(audio.duration, duration);- const isMicCompanionTrack = /\.mic\./i.test(sourceAudioPath);- const rawStartDelaySeconds = estimateCompanionAudioStartDelaySeconds(- duration,- audioDuration,- sourceAudioFallbackStartDelayMsByPath[sourceAudioPath],- );- const maxPreviewStartDelaySeconds = isMicCompanionTrack ? 2 : 5;- const startDelaySeconds = isMicCompanionTrack- ? 0- : Number.isFinite(duration) &&- (rawStartDelaySeconds >= Math.max(0, duration - 0.01) ||- rawStartDelaySeconds > Math.max(maxPreviewStartDelaySeconds, duration * 0.9))- ? 0- : rawStartDelaySeconds;- const beforeAudioStart = currentTime + 0.001 < startDelaySeconds;- const targetTime = clampMediaTimeToDuration(currentTime - startDelaySeconds, audioDuration);-- const shouldSeek =- timelineJumped ||- (!isPlaying && Math.abs(audio.currentTime - targetTime) > driftThreshold) ||- (isPlaying && Math.abs(audio.currentTime - targetTime) > 0.9);- if (shouldSeek) {- try {- audio.currentTime = targetTime;- } catch {- // no-op- }- }-- // KISS for companion source tracks: fixed playback rate avoids audible flutter/stutter- // from continuous micro-corrections on system audio.- const syncedPlaybackRate = targetPlaybackRate;- if (Math.abs(audio.playbackRate - syncedPlaybackRate) > 0.001) {- audio.playbackRate = syncedPlaybackRate;- }-- const atEnd = audioDuration !== null && targetTime >= audioDuration;- if (isPlaying && !beforeAudioStart && !atEnd) {- void ensureSourceAudioRunning().then(() => {- audio.play().catch(() => undefined);- });- } else if (!audio.paused) {- audio.pause();- }- }-- lastSourceAudioSyncTimeRef.current = currentTime;- }, [- currentTime,- duration,- effectiveSpeedRegions,- getSourceTrackPreviewGain,- isCurrentClipMuted,- isPlaying,- previewVolume,- resolvedSourceTracks,- sourceAudioFallbackStartDelayMsByPath,- ensureSourceAudioRunning,- ]);-- useEffect(() => {- if (!isPlaying || resolvedSourceTracks.length === 0) {- return;- }- void ensureSourceAudioRunning().then(() => {- for (const audio of sourceAudioElementsRef.current.values()) {- if (audio.paused) {- audio.play().catch(() => undefined);- }- }- });- }, [isPlaying, resolvedSourceTracks.length, ensureSourceAudioRunning]);-- return { playSourceAudioPreview };+ const resolvedPlan = useMemo(+ () =>+ buildResolvedAudioPlan({+ videoResource: null,+ sourceAudioFallbackPaths: previewSourceAudioFallbackPaths,+ audioRegions,+ }),+ [audioRegions, previewSourceAudioFallbackPaths],+ );+ const resolvedUserTracks = useMemo(+ () => resolvedPlan.tracks.filter((track) => track.kind === "user"),+ [resolvedPlan],+ );+ const resolvedSourceTracks = useMemo(+ () => resolvedPlan.tracks.filter((track) => track.kind !== "user"),+ [resolvedPlan],+ );++ const audioElementsRef = useRef<Map<string, HTMLAudioElement>>(new Map());+ const audioElementRevokersRef = useRef<Map<string, () => void>>(new Map());+ const audioElementResourcesRef = useRef<Map<string, string>>(new Map());+ const sourceAudioElementsRef = useRef<Map<string, HTMLAudioElement>>(new Map());+ const sourceAudioMediaNodesRef = useRef<Map<string, MediaElementAudioSourceNode>>(new Map());+ const sourceAudioGainNodesRef = useRef<Map<string, GainNode>>(new Map());+ const sourceAudioElementRevokersRef = useRef<Map<string, () => void>>(new Map());+ const sourceAudioElementResourcesRef = useRef<Map<string, string>>(new Map());+ const sourceAudioContextRef = useRef<AudioContext | null>(null);+ const sourceAudioMasterGainRef = useRef<GainNode | null>(null);+ const sourceAudioResumePromiseRef = useRef<Promise<void> | null>(null);+ const lastSourceAudioSyncTimeRef = useRef<number | null>(null);++ const ensureSourceAudioContext = useCallback(() => {+ if (!sourceAudioContextRef.current) {+ const context = new AudioContext({ latencyHint: "interactive" });+ const masterGain = context.createGain();+ masterGain.gain.value = 1;+ masterGain.connect(context.destination);+ sourceAudioContextRef.current = context;+ sourceAudioMasterGainRef.current = masterGain;+ }+ return sourceAudioContextRef.current;+ }, []);++ const ensureSourceAudioRunning = useCallback(() => {+ const context = ensureSourceAudioContext();+ if (context.state === "running") {+ return Promise.resolve();+ }+ if (!sourceAudioResumePromiseRef.current) {+ sourceAudioResumePromiseRef.current = context+ .resume()+ .catch(() => undefined)+ .finally(() => {+ sourceAudioResumePromiseRef.current = null;+ });+ }+ return sourceAudioResumePromiseRef.current;+ }, [ensureSourceAudioContext]);++ const playSourceAudioPreview = useCallback(() => {+ void ensureSourceAudioRunning();+ for (const audio of sourceAudioElementsRef.current.values()) {+ if (!audio.src) continue;+ audio.play().catch(() => undefined);+ }+ }, [ensureSourceAudioRunning]);++ useEffect(() => {+ let cancelled = false;+ const existing = audioElementsRef.current;+ const currentIds = new Set(resolvedUserTracks.map((track) => track.id));++ for (const [id, audio] of existing) {+ if (!currentIds.has(id)) {+ audio.pause();+ audio.src = "";+ audioElementRevokersRef.current.get(id)?.();+ audioElementRevokersRef.current.delete(id);+ audioElementResourcesRef.current.delete(id);+ existing.delete(id);+ }+ }++ for (const track of resolvedUserTracks) {+ let audio = existing.get(track.id);+ if (!audio) {+ audio = new Audio();+ audio.preload = "auto";+ existing.set(track.id, audio);+ }++ if (audioElementResourcesRef.current.get(track.id) !== track.sourceRef.path) {+ audio.pause();+ audio.src = "";+ audioElementRevokersRef.current.get(track.id)?.();+ audioElementRevokersRef.current.delete(track.id);+ audioElementResourcesRef.current.set(track.id, track.sourceRef.path);++ void (async () => {+ const resolved = await resolveMediaElementSource(track.sourceRef.path);+ const latestAudio = existing.get(track.id);++ if (+ cancelled ||+ latestAudio !== audio ||+ audioElementResourcesRef.current.get(track.id) !== track.sourceRef.path+ ) {+ resolved.revoke();+ return;+ }++ audioElementRevokersRef.current.set(track.id, resolved.revoke);+ latestAudio.src = resolved.src;+ })();+ }++ audio.volume = Math.max(0, Math.min(1, track.gain * previewVolume));+ }++ return () => {+ cancelled = true;+ };+ }, [previewVolume, resolvedUserTracks]);++ useEffect(() => {+ const existing = sourceAudioElementsRef.current;+ const currentIds = new Set(resolvedSourceTracks.map((track) => track.sourceRef.path));++ for (const [id, audio] of existing) {+ if (!currentIds.has(id)) {+ audio.pause();+ audio.src = "";+ sourceAudioMediaNodesRef.current.get(id)?.disconnect();+ sourceAudioMediaNodesRef.current.delete(id);+ sourceAudioGainNodesRef.current.get(id)?.disconnect();+ sourceAudioGainNodesRef.current.delete(id);+ sourceAudioElementRevokersRef.current.get(id)?.();+ sourceAudioElementRevokersRef.current.delete(id);+ sourceAudioElementResourcesRef.current.delete(id);+ existing.delete(id);+ }+ }++ for (const track of resolvedSourceTracks) {+ const audioPath = track.sourceRef.path;+ const resourceKey = getAudioResourceVersionKey(audioPath, sourceAudioResourceVersion);+ let audio = existing.get(audioPath);+ if (!audio) {+ audio = new Audio();+ audio.preload = "auto";+ audio.crossOrigin = "anonymous";+ existing.set(audioPath, audio);+ }+ audio.volume = 1;+ audio.dataset.sourceAudioPath = audioPath;++ // Web Audio API createMediaElementSource breaks preservesPitch on Chromium.+ // We route directly through the HTMLAudioElement to ensure pitch preservation works+ // during speed changes. Note: this limits maximum preview volume to 1.0 (100%).++ if (sourceAudioElementResourcesRef.current.get(audioPath) !== resourceKey) {+ audio.pause();+ audio.src = "";+ sourceAudioElementRevokersRef.current.get(audioPath)?.();+ sourceAudioElementRevokersRef.current.delete(audioPath);+ sourceAudioElementResourcesRef.current.set(audioPath, resourceKey);++ // Resource identity, not effect lifetime, decides staleness. Playback and fallback+ // rerenders must not cancel the only load for the current finalized sidecar version.+ void (async () => {+ try {+ const resolved = await resolveMediaElementSource(audioPath);+ const latestAudio = existing.get(audioPath);++ if (+ latestAudio !== audio ||+ !isAudioResourceLoadCurrent(+ sourceAudioElementResourcesRef.current,+ audioPath,+ resourceKey,+ )+ ) {+ resolved.revoke();+ return;+ }++ sourceAudioElementRevokersRef.current.set(audioPath, resolved.revoke);+ latestAudio.src = getVersionedAudioResourceUrl(+ resolved.src,+ sourceAudioResourceVersion,+ );+ latestAudio.load();+ if (isPlaying) {+ playSourceAudioPreview();+ }+ } catch (error) {+ const latestAudio = existing.get(audioPath);+ if (+ latestAudio !== audio ||+ !isAudioResourceLoadCurrent(+ sourceAudioElementResourcesRef.current,+ audioPath,+ resourceKey,+ )+ ) {+ return;+ }++ sourceAudioElementRevokersRef.current.get(audioPath)?.();+ sourceAudioElementRevokersRef.current.delete(audioPath);+ sourceAudioElementResourcesRef.current.delete(audioPath);+ if (latestAudio === audio) {+ latestAudio.pause();+ latestAudio.src = "";+ }+ onSourceFallbackLoadError(error);+ }+ })();+ }++ audio.volume = Math.max(+ 0,+ Math.min(+ 1,+ getSourceTrackPreviewGain(audioPath) * (isCurrentClipMuted ? 0 : previewVolume),+ ),+ );+ }++ if (sourceAudioMasterGainRef.current) {+ sourceAudioMasterGainRef.current.gain.value = isCurrentClipMuted+ ? 0+ : Math.max(0, Math.min(1, previewVolume));+ }++ if (resolvedSourceTracks.length === 0) {+ lastSourceAudioSyncTimeRef.current = null;+ }+ }, [+ getSourceTrackPreviewGain,+ isPlaying,+ isCurrentClipMuted,+ onSourceFallbackLoadError,+ resolvedSourceTracks,+ sourceAudioResourceVersion,+ previewVolume,+ playSourceAudioPreview,+ ]);++ useEffect(() => {+ return () => {+ for (const audio of audioElementsRef.current.values()) {+ audio.pause();+ audio.src = "";+ }+ for (const revoke of audioElementRevokersRef.current.values()) {+ revoke();+ }+ audioElementsRef.current.clear();+ audioElementRevokersRef.current.clear();+ audioElementResourcesRef.current.clear();+ for (const audio of sourceAudioElementsRef.current.values()) {+ audio.pause();+ audio.src = "";+ }+ for (const node of sourceAudioMediaNodesRef.current.values()) {+ node.disconnect();+ }+ for (const node of sourceAudioGainNodesRef.current.values()) {+ node.disconnect();+ }+ for (const revoke of sourceAudioElementRevokersRef.current.values()) {+ revoke();+ }+ sourceAudioElementsRef.current.clear();+ sourceAudioMediaNodesRef.current.clear();+ sourceAudioGainNodesRef.current.clear();+ sourceAudioElementRevokersRef.current.clear();+ sourceAudioElementResourcesRef.current.clear();+ if (sourceAudioMasterGainRef.current) {+ sourceAudioMasterGainRef.current.disconnect();+ sourceAudioMasterGainRef.current = null;+ }+ const context = sourceAudioContextRef.current;+ sourceAudioContextRef.current = null;+ sourceAudioResumePromiseRef.current = null;+ if (context) {+ void context.close();+ }+ lastSourceAudioSyncTimeRef.current = null;+ };+ }, []);++ useEffect(() => {+ const currentTimeMs = timelineTime * 1000;+ const activeSpeedRegion = effectiveSpeedRegions.find(+ (region) => currentTimeMs >= region.startMs && currentTimeMs < region.endMs,+ );+ const targetPlaybackRate = activeSpeedRegion ? activeSpeedRegion.speed : 1;++ for (const track of resolvedUserTracks) {+ const audio = audioElementsRef.current.get(track.id);+ if (!audio) continue;++ const startMs = track.timelineBinding.startMs;+ const endMs = track.timelineBinding.endMs;+ const isInRegion = currentTimeMs >= startMs && currentTimeMs < endMs;++ if (isPlaying && isInRegion) {+ enablePitchPreservingPlayback(audio);+ const audioOffset = (currentTimeMs - startMs) / 1000;+ if (Math.abs(audio.currentTime - audioOffset) > 0.2) {+ audio.currentTime = audioOffset;+ }+ const syncedPlaybackRate = getMediaSyncPlaybackRate({+ basePlaybackRate: targetPlaybackRate,+ currentTime: audio.currentTime,+ targetTime: audioOffset,+ });+ if (Math.abs(audio.playbackRate - syncedPlaybackRate) > 0.001) {+ audio.playbackRate = syncedPlaybackRate;+ }+ if (audio.paused) {+ audio.play().catch(() => undefined);+ }+ } else if (!audio.paused) {+ audio.pause();+ }+ }+ }, [effectiveSpeedRegions, isPlaying, resolvedUserTracks, timelineTime]);++ useEffect(() => {+ if (resolvedSourceTracks.length === 0) {+ lastSourceAudioSyncTimeRef.current = null;+ return;+ }++ const activeSpeedRegion = effectiveSpeedRegions.find(+ (region) => currentTime * 1000 >= region.startMs && currentTime * 1000 < region.endMs,+ );+ const targetPlaybackRate = activeSpeedRegion ? activeSpeedRegion.speed : 1;+ const previousTimelineTime = lastSourceAudioSyncTimeRef.current;+ const timelineJumped =+ previousTimelineTime === null || Math.abs(currentTime - previousTimelineTime) > 0.25;+ const driftThreshold = isPlaying+ ? SOURCE_AUDIO_PREVIEW_PLAYING_SEEK_DRIFT_SECONDS+ : SOURCE_AUDIO_PREVIEW_PAUSED_SEEK_DRIFT_SECONDS;+ if (sourceAudioMasterGainRef.current) {+ sourceAudioMasterGainRef.current.gain.value = isCurrentClipMuted+ ? 0+ : Math.max(0, Math.min(1, previewVolume));+ }++ for (const audio of sourceAudioElementsRef.current.values()) {+ const sourceAudioPath = audio.dataset.sourceAudioPath ?? "";+ audio.volume = Math.max(+ 0,+ Math.min(+ 1,+ getSourceTrackPreviewGain(sourceAudioPath) *+ (isCurrentClipMuted ? 0 : previewVolume),+ ),+ );++ enablePitchPreservingPlayback(audio);+ const audioDuration = resolvePreviewMediaDuration(audio.duration, duration);+ const isMicCompanionTrack = /\.mic\./i.test(sourceAudioPath);+ const rawStartDelaySeconds = estimateCompanionAudioStartDelaySeconds(+ duration,+ audioDuration,+ sourceAudioFallbackStartDelayMsByPath[sourceAudioPath],+ );+ const maxPreviewStartDelaySeconds = isMicCompanionTrack ? 2 : 5;+ const startDelaySeconds = isMicCompanionTrack+ ? 0+ : Number.isFinite(duration) &&+ (rawStartDelaySeconds >= Math.max(0, duration - 0.01) ||+ rawStartDelaySeconds >+ Math.max(maxPreviewStartDelaySeconds, duration * 0.9))+ ? 0+ : rawStartDelaySeconds;+ const beforeAudioStart = currentTime + 0.001 < startDelaySeconds;+ const targetTime = clampMediaTimeToDuration(+ currentTime - startDelaySeconds,+ audioDuration,+ );++ const shouldSeek =+ timelineJumped ||+ (!isPlaying && Math.abs(audio.currentTime - targetTime) > driftThreshold) ||+ (isPlaying && Math.abs(audio.currentTime - targetTime) > 0.9);+ if (shouldSeek) {+ try {+ audio.currentTime = targetTime;+ } catch {+ // no-op+ }+ }++ // KISS for companion source tracks: fixed playback rate avoids audible flutter/stutter+ // from continuous micro-corrections on system audio.+ const syncedPlaybackRate = targetPlaybackRate;+ if (Math.abs(audio.playbackRate - syncedPlaybackRate) > 0.001) {+ audio.playbackRate = syncedPlaybackRate;+ }++ const atEnd = audioDuration !== null && targetTime >= audioDuration;+ if (isPlaying && !beforeAudioStart && !atEnd) {+ void ensureSourceAudioRunning().then(() => {+ audio.play().catch(() => undefined);+ });+ } else if (!audio.paused) {+ audio.pause();+ }+ }++ lastSourceAudioSyncTimeRef.current = currentTime;+ }, [+ currentTime,+ duration,+ effectiveSpeedRegions,+ getSourceTrackPreviewGain,+ isCurrentClipMuted,+ isPlaying,+ previewVolume,+ resolvedSourceTracks,+ sourceAudioFallbackStartDelayMsByPath,+ ensureSourceAudioRunning,+ ]);++ useEffect(() => {+ if (!isPlaying || resolvedSourceTracks.length === 0) {+ return;+ }+ void ensureSourceAudioRunning().then(() => {+ for (const audio of sourceAudioElementsRef.current.values()) {+ if (audio.paused) {+ audio.play().catch(() => undefined);+ }+ }+ });+ }, [isPlaying, resolvedSourceTracks.length, ensureSourceAudioRunning]);++ return { playSourceAudioPreview };}diff --git a/src/components/video-editor/audio/useSourceAudioFallback.ts b/src/components/video-editor/audio/useSourceAudioFallback.tsindex bdaf0540..f081d2ce 100644--- a/src/components/video-editor/audio/useSourceAudioFallback.ts+++ b/src/components/video-editor/audio/useSourceAudioFallback.ts@@ -3,79 +3,80 @@ import { toast } from "sonner";import { SOURCE_AUDIO_FALLBACK_TOAST_ID } from "@/components/video-editor/audio/audioTypes";interface UseSourceAudioFallbackParams {- currentSourcePath: string | null;- refreshKey?: number;- summarizeErrorMessage: (message: string) => string;+ currentSourcePath: string | null;+ refreshKey?: number;+ summarizeErrorMessage: (message: string) => string;}export function useSourceAudioFallback({- currentSourcePath,- refreshKey = 0,- summarizeErrorMessage,+ currentSourcePath,+ refreshKey = 0,+ summarizeErrorMessage,}: UseSourceAudioFallbackParams) {- const [sourceAudioFallbackPaths, setSourceAudioFallbackPaths] = useState<string[]>([]);- const [sourceAudioFallbackStartDelayMsByPath, setSourceAudioFallbackStartDelayMsByPath] =- useState<Record<string, number>>({});- const previousSourcePathRef = useRef<string | null>(null);+ const [sourceAudioFallbackPaths, setSourceAudioFallbackPaths] = useState<string[]>([]);+ const [sourceAudioFallbackStartDelayMsByPath, setSourceAudioFallbackStartDelayMsByPath] =+ useState<Record<string, number>>({});+ const previousSourcePathRef = useRef<string | null>(null);- useEffect(() => {- let cancelled = false;- // Refetch when late recording sidecars are finalized after the editor opens.- void refreshKey;- const sourceChanged = previousSourcePathRef.current !== currentSourcePath;- previousSourcePathRef.current = currentSourcePath;- if (sourceChanged) {- setSourceAudioFallbackPaths([]);- setSourceAudioFallbackStartDelayMsByPath({});- }+ useEffect(() => {+ let cancelled = false;+ // Refetch when late recording sidecars are finalized after the editor opens.+ void refreshKey;+ const sourceChanged = previousSourcePathRef.current !== currentSourcePath;+ previousSourcePathRef.current = currentSourcePath;+ if (sourceChanged) {+ setSourceAudioFallbackPaths([]);+ setSourceAudioFallbackStartDelayMsByPath({});+ }- if (!currentSourcePath) {- return () => {- cancelled = true;- };- }+ if (!currentSourcePath) {+ return () => {+ cancelled = true;+ };+ }- void (async () => {- try {- const result = await window.electronAPI.getVideoAudioFallbackPaths(currentSourcePath);- if (cancelled) {- return;- }- if (!result.success) {- if (sourceChanged) {- setSourceAudioFallbackPaths([]);- setSourceAudioFallbackStartDelayMsByPath({});- }- toast.warning(- result.error- ? `Could not load companion audio sources: ${summarizeErrorMessage(result.error)}`- : "Could not load companion audio sources. Playback and export may miss microphone audio.",- { id: SOURCE_AUDIO_FALLBACK_TOAST_ID, duration: 10000 },- );- return;- }+ void (async () => {+ try {+ const result =+ await window.electronAPI.getVideoAudioFallbackPaths(currentSourcePath);+ if (cancelled) {+ return;+ }+ if (!result.success) {+ if (sourceChanged) {+ setSourceAudioFallbackPaths([]);+ setSourceAudioFallbackStartDelayMsByPath({});+ }+ toast.warning(+ result.error+ ? `Could not load companion audio sources: ${summarizeErrorMessage(result.error)}`+ : "Could not load companion audio sources. Playback and export may miss microphone audio.",+ { id: SOURCE_AUDIO_FALLBACK_TOAST_ID, duration: 10000 },+ );+ return;+ }- toast.dismiss(SOURCE_AUDIO_FALLBACK_TOAST_ID);- setSourceAudioFallbackPaths(result.paths ?? []);- setSourceAudioFallbackStartDelayMsByPath(result.startDelayMsByPath ?? {});- } catch (error) {- if (!cancelled) {- if (sourceChanged) {- setSourceAudioFallbackPaths([]);- setSourceAudioFallbackStartDelayMsByPath({});- }- toast.warning(- `Could not load companion audio sources: ${summarizeErrorMessage(String(error))}`,- { id: SOURCE_AUDIO_FALLBACK_TOAST_ID, duration: 10000 },- );- }- }- })();+ toast.dismiss(SOURCE_AUDIO_FALLBACK_TOAST_ID);+ setSourceAudioFallbackPaths(result.paths ?? []);+ setSourceAudioFallbackStartDelayMsByPath(result.startDelayMsByPath ?? {});+ } catch (error) {+ if (!cancelled) {+ if (sourceChanged) {+ setSourceAudioFallbackPaths([]);+ setSourceAudioFallbackStartDelayMsByPath({});+ }+ toast.warning(+ `Could not load companion audio sources: ${summarizeErrorMessage(String(error))}`,+ { id: SOURCE_AUDIO_FALLBACK_TOAST_ID, duration: 10000 },+ );+ }+ }+ })();- return () => {- cancelled = true;- };- }, [currentSourcePath, refreshKey, summarizeErrorMessage]);+ return () => {+ cancelled = true;+ };+ }, [currentSourcePath, refreshKey, summarizeErrorMessage]);- return { sourceAudioFallbackPaths, sourceAudioFallbackStartDelayMsByPath };+ return { sourceAudioFallbackPaths, sourceAudioFallbackStartDelayMsByPath };}diff --git a/src/components/video-editor/audio/useVideoEditorAudio.ts b/src/components/video-editor/audio/useVideoEditorAudio.tsindex 34d2d5b2..f5630434 100644--- a/src/components/video-editor/audio/useVideoEditorAudio.ts+++ b/src/components/video-editor/audio/useVideoEditorAudio.ts@@ -1,11 +1,7 @@import React, { useMemo } from "react";import type { SourceAudioTrackSettings } from "@/components/video-editor/audio/audioTypes";import { resolveSourceTrackRoutingPolicy } from "@/lib/exporter/sourceTrackRoutingPolicy";-import type {- AudioRegion,- ClipRegion,- SpeedRegion,-} from "../types";+import type { AudioRegion, ClipRegion, SpeedRegion } from "../types";import { getActiveClipIdAtSourceTime, isClipMutedById } from "./clipAudio";import { useAudioPreviewSync } from "./useAudioPreviewSync";import { useClipAudioSettingsController } from "./useClipAudioSettingsController";diff --git a/src/components/video-editor/audio/waveform/WaveformGenerator.ts b/src/components/video-editor/audio/waveform/WaveformGenerator.tsindex 76e1e063..23fc91a1 100644--- a/src/components/video-editor/audio/waveform/WaveformGenerator.ts+++ b/src/components/video-editor/audio/waveform/WaveformGenerator.ts@@ -1,9 +1,6 @@import { WAVEFORM_DEFAULT_PEAK_COUNT } from "../../timeline/core/constants";import type { AudioPeaksData } from "../../timeline/core/timelineTypes";-import {- getAudioResourceCacheScope,- getAudioResourceVersionKey,-} from "../audioResourceVersion";+import { getAudioResourceCacheScope, getAudioResourceVersionKey } from "../audioResourceVersion";import WorkerConstructor from "./waveform.worker?worker";import { VersionedWaveformCache } from "./waveformCache";@@ -13,24 +10,29 @@ const MAX_WAVEFORM_CACHE_ENTRIES = 24;export class WaveformGenerator {private audioContext: AudioContext;private worker: Worker;- private peaksCache = new VersionedWaveformCache<AudioPeaksData>(- MAX_WAVEFORM_CACHE_ENTRIES,- );+ private peaksCache = new VersionedWaveformCache<AudioPeaksData>(MAX_WAVEFORM_CACHE_ENTRIES);private pending = new Map<string, Promise<AudioPeaksData>>();private workerRequestSeq = 0;- private workerResolvers = new Map<number, { resolve: (peaks: Float32Array) => void; reject: (err: Error) => void }>();+ private workerResolvers = new Map<+ number,+ { resolve: (peaks: Float32Array) => void; reject: (err: Error) => void }+ >();constructor() {- this.audioContext = new (window.AudioContext || (window as typeof window & { webkitAudioContext?: typeof AudioContext }).webkitAudioContext)();+ this.audioContext = new (+ window.AudioContext ||+ (window as typeof window & { webkitAudioContext?: typeof AudioContext })+ .webkitAudioContext+ )();this.worker = new WorkerConstructor();-+this.worker.addEventListener("message",(event: MessageEvent<{ requestId: number; peaks?: Float32Array; error?: string }>) => {const { requestId, peaks, error } = event.data;const resolver = this.workerResolvers.get(requestId);if (!resolver) return;-+this.workerResolvers.delete(requestId);if (error) {resolver.reject(new Error(error));@@ -43,7 +45,7 @@ export class WaveformGenerator {this.worker.addEventListener("error", (error: ErrorEvent) => {console.error("[WaveformGenerator] Worker fatal error:", error);const fatalError = error.error ?? new Error(error.message || "Worker crashed");-+// Reject all pending requests if the worker itself crashesfor (const resolver of this.workerResolvers.values()) {resolver.reject(fatalError);@@ -52,18 +54,21 @@ export class WaveformGenerator {});}- private computePeaksWithWorker(channels: Float32Array[], samples: number): Promise<Float32Array> {+ private computePeaksWithWorker(+ channels: Float32Array[],+ samples: number,+ ): Promise<Float32Array> {return new Promise((resolve, reject) => {const requestId = ++this.workerRequestSeq;this.workerResolvers.set(requestId, { resolve, reject });-+this.worker.postMessage({requestId,channels,samples,},- channels.map(c => c.buffer),+ channels.map((c) => c.buffer),);});}@@ -90,17 +95,14 @@ export class WaveformGenerator {const arrayBuffer = await response.arrayBuffer();const decoded = await this.audioContext.decodeAudioData(arrayBuffer);- const adaptivePeakCount = Math.max(- peakCount,- Math.floor(decoded.duration * 500)- );+ const adaptivePeakCount = Math.max(peakCount, Math.floor(decoded.duration * 500));const boundedPeakCount = Math.min(adaptivePeakCount, MAX_WAVEFORM_PEAKS);const channels: Float32Array[] = [];for (let i = 0; i < decoded.numberOfChannels; i++) {// We slice to transfer the underlying buffer to the workerchannels.push(decoded.getChannelData(i).slice());}-+const peaks = await this.computePeaksWithWorker(channels, boundedPeakCount);// Robust Normalization: Use 99.5th percentile to avoid being squashed by a single loud spike/popdiff --git a/src/components/video-editor/audio/waveform/waveform.worker.ts b/src/components/video-editor/audio/waveform/waveform.worker.tsindex 28e2ebd9..60e77ed4 100644--- a/src/components/video-editor/audio/waveform/waveform.worker.ts+++ b/src/components/video-editor/audio/waveform/waveform.worker.ts@@ -29,11 +29,11 @@ workerScope.onmessage = (e: MessageEvent<WaveformWorkerRequest>) => {for (let i = 0; i < samples; i++) {const start = Math.floor(i * blockSize);const end = Math.min(total, Math.floor((i + 1) * blockSize));-+let max = 0;// Ensure we check at least one sample even if blockSize < 1const actualEnd = Math.max(start + 1, end);-+for (let j = start; j < actualEnd && j < total; j++) {for (let c = 0; c < channels.length; c++) {const val = Math.abs(channels[c][j]);diff --git a/src/components/video-editor/clipSpeedChange.test.ts b/src/components/video-editor/clipSpeedChange.test.tsindex d4f2b6c1..bc46b98f 100644--- a/src/components/video-editor/clipSpeedChange.test.ts+++ b/src/components/video-editor/clipSpeedChange.test.ts@@ -103,7 +103,13 @@ describe("planClipSpeedChange", () => {const result = planClipSpeedChange({clipRegions: [{ id: "clip-1", startMs: 1_000, endMs: 5_000, speed: 1 }],zoomRegions: [- { id: "zoom-1", startMs: 2_000, endMs: 3_000, depth: 2, focus: { cx: 0.5, cy: 0.5 } },+ {+ id: "zoom-1",+ startMs: 2_000,+ endMs: 3_000,+ depth: 2,+ focus: { cx: 0.5, cy: 0.5 },+ },],selectedClipId: "clip-1",speed: 0.5,@@ -112,7 +118,13 @@ describe("planClipSpeedChange", () => {expect(result).toEqual({clipRegions: [{ id: "clip-1", startMs: 1_000, endMs: 9_000, speed: 0.5 }],zoomRegions: [- { id: "zoom-1", startMs: 3_000, endMs: 5_000, depth: 2, focus: { cx: 0.5, cy: 0.5 } },+ {+ id: "zoom-1",+ startMs: 3_000,+ endMs: 5_000,+ depth: 2,+ focus: { cx: 0.5, cy: 0.5 },+ },],});});@@ -121,8 +133,20 @@ describe("planClipSpeedChange", () => {const result = planClipSpeedChange({clipRegions: [{ id: "clip-1", startMs: 2_000, endMs: 6_000, speed: 1 }],zoomRegions: [- { id: "zoom-before", startMs: 1_000, endMs: 1_500, depth: 2, focus: { cx: 0.5, cy: 0.5 } },- { id: "zoom-after", startMs: 6_000, endMs: 6_500, depth: 2, focus: { cx: 0.5, cy: 0.5 } },+ {+ id: "zoom-before",+ startMs: 1_000,+ endMs: 1_500,+ depth: 2,+ focus: { cx: 0.5, cy: 0.5 },+ },+ {+ id: "zoom-after",+ startMs: 6_000,+ endMs: 6_500,+ depth: 2,+ focus: { cx: 0.5, cy: 0.5 },+ },],selectedClipId: "clip-1",speed: 0.5,@@ -131,8 +155,20 @@ describe("planClipSpeedChange", () => {expect(result).toEqual({clipRegions: [{ id: "clip-1", startMs: 2_000, endMs: 10_000, speed: 0.5 }],zoomRegions: [- { id: "zoom-before", startMs: 1_000, endMs: 1_500, depth: 2, focus: { cx: 0.5, cy: 0.5 } },- { id: "zoom-after", startMs: 6_000, endMs: 6_500, depth: 2, focus: { cx: 0.5, cy: 0.5 } },+ {+ id: "zoom-before",+ startMs: 1_000,+ endMs: 1_500,+ depth: 2,+ focus: { cx: 0.5, cy: 0.5 },+ },+ {+ id: "zoom-after",+ startMs: 6_000,+ endMs: 6_500,+ depth: 2,+ focus: { cx: 0.5, cy: 0.5 },+ },],});});@@ -141,8 +177,20 @@ describe("planClipSpeedChange", () => {const result = planClipSpeedChange({clipRegions: [{ id: "clip-1", startMs: 0, endMs: 5_000, speed: 1 }],zoomRegions: [- { id: "zoom-1", startMs: 2_000, endMs: 3_000, depth: 2, focus: { cx: 0.5, cy: 0.5 } },- { id: "zoom-2", startMs: 5_500, endMs: 6_500, depth: 3, focus: { cx: 0.5, cy: 0.5 } },+ {+ id: "zoom-1",+ startMs: 2_000,+ endMs: 3_000,+ depth: 2,+ focus: { cx: 0.5, cy: 0.5 },+ },+ {+ id: "zoom-2",+ startMs: 5_500,+ endMs: 6_500,+ depth: 3,+ focus: { cx: 0.5, cy: 0.5 },+ },],selectedClipId: "clip-1",speed: 0.5,diff --git a/src/components/video-editor/clipSpeedChange.ts b/src/components/video-editor/clipSpeedChange.tsindex b155627c..b482c7fe 100644--- a/src/components/video-editor/clipSpeedChange.ts+++ b/src/components/video-editor/clipSpeedChange.ts@@ -90,9 +90,7 @@ export function planClipSpeedChange(params: {return {clipRegions: clipRegions.map((candidate) =>- candidate.id === selectedClipId- ? { ...candidate, speed, endMs: newEndMs }- : candidate,+ candidate.id === selectedClipId ? { ...candidate, speed, endMs: newEndMs } : candidate,),zoomRegions: nextZoomRegions,};diff --git a/src/components/video-editor/editorHistory.ts b/src/components/video-editor/editorHistory.tsindex 43b7398b..6681f4ec 100644--- a/src/components/video-editor/editorHistory.ts+++ b/src/components/video-editor/editorHistory.ts@@ -44,9 +44,7 @@ export function resetEditorHistoryStack(stack: EditorHistoryStack): void {stack.future = [];}-export function cloneEditorHistorySnapshot(- snapshot: EditorHistorySnapshot,-): EditorHistorySnapshot {+export function cloneEditorHistorySnapshot(snapshot: EditorHistorySnapshot): EditorHistorySnapshot {return globalThis.structuredClone(snapshot);}diff --git a/src/components/video-editor/mp4ExportRouting.ts b/src/components/video-editor/mp4ExportRouting.tsindex 95b157de..506e2b03 100644--- a/src/components/video-editor/mp4ExportRouting.ts+++ b/src/components/video-editor/mp4ExportRouting.ts@@ -1,8 +1,4 @@-import type {- ExportBackendPreference,- ExportPipelineModel,- ExportSettings,-} from "@/lib/exporter";+import type { ExportBackendPreference, ExportPipelineModel, ExportSettings } from "@/lib/exporter";import type { SmokeExportConfig } from "./smokeExportConfig";export type Mp4ExportRouting = {diff --git a/src/components/video-editor/mp4ExportSettings.ts b/src/components/video-editor/mp4ExportSettings.tsindex 95017a2c..61f6c3a3 100644--- a/src/components/video-editor/mp4ExportSettings.ts+++ b/src/components/video-editor/mp4ExportSettings.ts@@ -19,10 +19,7 @@ export function resolveMp4ExportSettings({exportEncodingMode,mp4FrameRate,}: {- smokeExportConfig: Pick<- SmokeExportConfig,- "enabled" | "quality" | "encodingMode" | "fps"- >;+ smokeExportConfig: Pick<SmokeExportConfig, "enabled" | "quality" | "encodingMode" | "fps">;settings: Pick<ExportSettings, "quality" | "encodingMode" | "mp4FrameRate">;exportQuality: ExportQuality;exportEncodingMode: ExportEncodingMode;diff --git a/src/components/video-editor/smokeExportConfig.test.ts b/src/components/video-editor/smokeExportConfig.test.tsindex c221e1e4..3df06e4e 100644--- a/src/components/video-editor/smokeExportConfig.test.ts+++ b/src/components/video-editor/smokeExportConfig.test.ts@@ -109,9 +109,7 @@ describe("getSmokeExportConfig", () => {describe("getDevOpenRecordingConfig", () => {it("reads dev-open paths independently from smoke export", () => {expect(- getDevOpenRecordingConfig(- "?devOpenInput=/tmp/input.mp4&devOpenWebcam=/tmp/webcam.mp4",- ),+ getDevOpenRecordingConfig("?devOpenInput=/tmp/input.mp4&devOpenWebcam=/tmp/webcam.mp4"),).toEqual({inputPath: "/tmp/input.mp4",webcamInputPath: "/tmp/webcam.mp4",diff --git a/src/components/video-editor/smokeExportConfig.ts b/src/components/video-editor/smokeExportConfig.tsindex 0d71779b..8e30561b 100644--- a/src/components/video-editor/smokeExportConfig.ts+++ b/src/components/video-editor/smokeExportConfig.ts@@ -110,9 +110,15 @@ export function getSmokeExportConfig(search: string): SmokeExportConfig {: enabled && params.get("smokeBackendPreference") === "breeze"? "breeze": undefined,- renderBackend: enabled ? parseSmokeRenderBackend(params.get("smokeRenderBackend")) : undefined,- maxEncodeQueue: enabled ? parseSmokeExportNumber(params.get("smokeMaxEncodeQueue")) : undefined,- maxDecodeQueue: enabled ? parseSmokeExportNumber(params.get("smokeMaxDecodeQueue")) : undefined,+ renderBackend: enabled+ ? parseSmokeRenderBackend(params.get("smokeRenderBackend"))+ : undefined,+ maxEncodeQueue: enabled+ ? parseSmokeExportNumber(params.get("smokeMaxEncodeQueue"))+ : undefined,+ maxDecodeQueue: enabled+ ? parseSmokeExportNumber(params.get("smokeMaxDecodeQueue"))+ : undefined,maxPendingFrames: enabled? parseSmokeExportNumber(params.get("smokeMaxPendingFrames")): undefined,diff --git a/src/components/video-editor/timeline/components/axis/TimelineAxis.tsx b/src/components/video-editor/timeline/components/axis/TimelineAxis.tsxindex 4f169821..a285515c 100644--- a/src/components/video-editor/timeline/components/axis/TimelineAxis.tsx+++ b/src/components/video-editor/timeline/components/axis/TimelineAxis.tsx@@ -55,7 +55,9 @@ export default function TimelineAxis({ videoDurationMs, currentTimeMs }: Timelinreturn (<divclassName="h-8 bg-editor-bg border-b border-foreground/10 relative overflow-hidden select-none"- style={{ [sideProperty === "right" ? "marginRight" : "marginLeft"]: `${sidebarWidth}px` }}+ style={{+ [sideProperty === "right" ? "marginRight" : "marginLeft"]: `${sidebarWidth}px`,+ }}>{markers.minorTicks.map((time) => {const offset = valueToPixels(time - range.start);diff --git a/src/components/video-editor/timeline/components/playhead/PlaybackCursor.tsx b/src/components/video-editor/timeline/components/playhead/PlaybackCursor.tsxindex d780dcfb..80f729e0 100644--- a/src/components/video-editor/timeline/components/playhead/PlaybackCursor.tsx+++ b/src/components/video-editor/timeline/components/playhead/PlaybackCursor.tsx@@ -103,25 +103,32 @@ export default function PlaybackCursor({<divclassName={cn("absolute -top-6 left-1/2 -translate-x-1/2 px-1.5 py-0.5 rounded bg-black/80 text-[10px] text-white/90 font-medium tabular-nums whitespace-nowrap border border-foreground/10 shadow-lg pointer-events-none transition-opacity",- (isDragging || isLoading) ? "opacity-100" : "opacity-0",+ isDragging || isLoading ? "opacity-100" : "opacity-0",)}><div className="flex items-center">- {formatPlayheadTime(clampedTime).split("").map((char, i) => (- <span- key={i}- className={cn(- "leading-5 whitespace-pre",- isLoading && "bg-gradient-to-r from-white/40 via-white to-white/40 bg-clip-text text-transparent animate-text-shimmer"- )}- style={isLoading ? {- animationDelay: `${i * 0.05}s`,- animationDuration: "2.5s",- } : undefined}- >- {char}- </span>- ))}+ {formatPlayheadTime(clampedTime)+ .split("")+ .map((char, i) => (+ <span+ key={i}+ className={cn(+ "leading-5 whitespace-pre",+ isLoading &&+ "bg-gradient-to-r from-white/40 via-white to-white/40 bg-clip-text text-transparent animate-text-shimmer",+ )}+ style={+ isLoading+ ? {+ animationDelay: `${i * 0.05}s`,+ animationDuration: "2.5s",+ }+ : undefined+ }+ >+ {char}+ </span>+ ))}</div></div></div>diff --git a/src/components/video-editor/timeline/components/toolbar/TimelineToolbar.tsx b/src/components/video-editor/timeline/components/toolbar/TimelineToolbar.tsxindex ba6ae732..cec20aca 100644--- a/src/components/video-editor/timeline/components/toolbar/TimelineToolbar.tsx+++ b/src/components/video-editor/timeline/components/toolbar/TimelineToolbar.tsx@@ -75,45 +75,124 @@ export default function TimelineToolbar({return (<div className="flex items-center gap-2 px-4 py-2 border-b border-foreground/10 bg-editor-panel"><div className="flex items-center gap-1">- <Button onClick={onAddZoom} variant="ghost" size="icon" className="h-7 w-7 text-muted-foreground hover:text-[#2563EB] hover:bg-[#2563EB]/10 transition-all" title={addZoomLabel} aria-label={addZoomLabel}>+ <Button+ onClick={onAddZoom}+ variant="ghost"+ size="icon"+ className="h-7 w-7 text-muted-foreground hover:text-[#2563EB] hover:bg-[#2563EB]/10 transition-all"+ title={addZoomLabel}+ aria-label={addZoomLabel}+ ><ZoomIn className="w-4 h-4" /></Button>- <Button onClick={onSuggestZooms} variant="ghost" size="icon" className="h-7 w-7 text-muted-foreground hover:text-[#2563EB] hover:bg-[#2563EB]/10 transition-all" title={suggestZoomsLabel} aria-label={suggestZoomsLabel}>+ <Button+ onClick={onSuggestZooms}+ variant="ghost"+ size="icon"+ className="h-7 w-7 text-muted-foreground hover:text-[#2563EB] hover:bg-[#2563EB]/10 transition-all"+ title={suggestZoomsLabel}+ aria-label={suggestZoomsLabel}+ ><WandSparkles className="w-4 h-4" /></Button>- <Button onClick={onAddAnnotation} variant="ghost" size="icon" className="h-7 w-7 text-muted-foreground hover:text-[#B4A046] hover:bg-[#B4A046]/10 transition-all" title={addAnnotationLabel} aria-label={addAnnotationLabel}>+ <Button+ onClick={onAddAnnotation}+ variant="ghost"+ size="icon"+ className="h-7 w-7 text-muted-foreground hover:text-[#B4A046] hover:bg-[#B4A046]/10 transition-all"+ title={addAnnotationLabel}+ aria-label={addAnnotationLabel}+ ><MessageSquare className="w-4 h-4" /></Button>- <Button onClick={onAddAudio} variant="ghost" size="icon" className="h-7 w-7 text-muted-foreground hover:text-[#a855f7] hover:bg-[#a855f7]/10 transition-all" title={addAudioLabel} aria-label={addAudioLabel}>+ <Button+ onClick={onAddAudio}+ variant="ghost"+ size="icon"+ className="h-7 w-7 text-muted-foreground hover:text-[#a855f7] hover:bg-[#a855f7]/10 transition-all"+ title={addAudioLabel}+ aria-label={addAudioLabel}+ ><Music className="w-4 h-4" /></Button>- <Button onClick={onSplitClip} variant="ghost" size="icon" className="h-7 w-7 text-muted-foreground hover:text-foreground hover:bg-foreground/10 transition-all" title={splitClipLabel} aria-label={splitClipLabel}>+ <Button+ onClick={onSplitClip}+ variant="ghost"+ size="icon"+ className="h-7 w-7 text-muted-foreground hover:text-foreground hover:bg-foreground/10 transition-all"+ title={splitClipLabel}+ aria-label={splitClipLabel}+ ><Scissors className="w-4 h-4" /></Button></div><div className="flex items-center gap-2"><DropdownMenu><DropdownMenuTrigger asChild>- <Button variant="ghost" size="sm" className="h-7 px-2 text-xs text-muted-foreground hover:text-foreground hover:bg-foreground/10 transition-all gap-1">+ <Button+ variant="ghost"+ size="sm"+ className="h-7 px-2 text-xs text-muted-foreground hover:text-foreground hover:bg-foreground/10 transition-all gap-1"+ ><span className="font-medium">{getAspectRatioLabel(aspectRatio)}</span><ChevronDown className="w-3 h-3" /></Button></DropdownMenuTrigger>- <DropdownMenuContent align="end" className="bg-editor-surface-alt border-foreground/10">+ <DropdownMenuContent+ align="end"+ className="bg-editor-surface-alt border-foreground/10"+ >{ASPECT_RATIOS.map((ratio) => (- <DropdownMenuItem key={ratio} onClick={() => onAspectRatioChange?.(ratio)} className="text-muted-foreground hover:text-foreground hover:bg-foreground/10 cursor-pointer flex items-center justify-between gap-3">+ <DropdownMenuItem+ key={ratio}+ onClick={() => onAspectRatioChange?.(ratio)}+ className="text-muted-foreground hover:text-foreground hover:bg-foreground/10 cursor-pointer flex items-center justify-between gap-3"+ ><span>{getAspectRatioLabel(ratio)}</span>- {aspectRatio === ratio && <Check className="w-3 h-3 text-[#2563EB]" />}+ {aspectRatio === ratio && (+ <Check className="w-3 h-3 text-[#2563EB]" />+ )}</DropdownMenuItem>))}<div className="mx-1 my-1 h-px bg-foreground/10" /><div className="px-2 py-1.5 flex items-center gap-2 text-muted-foreground"><span className="text-sm">Custom</span>- <input type="text" inputMode="numeric" value={customAspectWidth} onChange={(event) => onCustomAspectWidthChange(event.target.value.replace(/\D/g, ""))} onKeyDown={onCustomAspectRatioKeyDown} className="w-12 h-7 rounded border border-foreground/10 bg-foreground/5 px-1.5 text-sm text-foreground focus:outline-none focus:ring-1 focus:ring-[#2563EB]" aria-label="Custom aspect width" />+ <input+ type="text"+ inputMode="numeric"+ value={customAspectWidth}+ onChange={(event) =>+ onCustomAspectWidthChange(event.target.value.replace(/\D/g, ""))+ }+ onKeyDown={onCustomAspectRatioKeyDown}+ className="w-12 h-7 rounded border border-foreground/10 bg-foreground/5 px-1.5 text-sm text-foreground focus:outline-none focus:ring-1 focus:ring-[#2563EB]"+ aria-label="Custom aspect width"+ /><span className="text-muted-foreground/70">:</span>- <input type="text" inputMode="numeric" value={customAspectHeight} onChange={(event) => onCustomAspectHeightChange(event.target.value.replace(/\D/g, ""))} onKeyDown={onCustomAspectRatioKeyDown} className="w-12 h-7 rounded border border-foreground/10 bg-foreground/5 px-1.5 text-sm text-foreground focus:outline-none focus:ring-1 focus:ring-[#2563EB]" aria-label="Custom aspect height" />- <Button variant="ghost" size="sm" onClick={onApplyCustomAspectRatio} className="h-7 px-2 text-xs text-muted-foreground hover:text-foreground hover:bg-foreground/10">Set</Button>- {isCustomAspectRatio(aspectRatio) && <Check className="w-3 h-3 text-[#2563EB] ml-auto" />}+ <input+ type="text"+ inputMode="numeric"+ value={customAspectHeight}+ onChange={(event) =>+ onCustomAspectHeightChange(+ event.target.value.replace(/\D/g, ""),+ )+ }+ onKeyDown={onCustomAspectRatioKeyDown}+ className="w-12 h-7 rounded border border-foreground/10 bg-foreground/5 px-1.5 text-sm text-foreground focus:outline-none focus:ring-1 focus:ring-[#2563EB]"+ aria-label="Custom aspect height"+ />+ <Button+ variant="ghost"+ size="sm"+ onClick={onApplyCustomAspectRatio}+ className="h-7 px-2 text-xs text-muted-foreground hover:text-foreground hover:bg-foreground/10"+ >+ Set+ </Button>+ {isCustomAspectRatio(aspectRatio) && (+ <Check className="w-3 h-3 text-[#2563EB] ml-auto" />+ )}</div></DropdownMenuContent></DropdownMenu>@@ -133,15 +212,21 @@ export default function TimelineToolbar({<div className="flex-1" /><div className="flex items-center gap-4 text-[10px] text-muted-foreground/70 font-medium"><span className="flex items-center gap-1.5">- <kbd className="px-1.5 py-0.5 bg-foreground/5 border border-foreground/10 rounded text-[#2563EB] font-sans">Side Scroll</kbd>+ <kbd className="px-1.5 py-0.5 bg-foreground/5 border border-foreground/10 rounded text-[#2563EB] font-sans">+ Side Scroll+ </kbd><span>Pan</span></span><span className="flex items-center gap-1.5">- <kbd className="px-1.5 py-0.5 bg-foreground/5 border border-foreground/10 rounded text-[#2563EB] font-sans">{scrollLabels.pan}</kbd>+ <kbd className="px-1.5 py-0.5 bg-foreground/5 border border-foreground/10 rounded text-[#2563EB] font-sans">+ {scrollLabels.pan}+ </kbd><span>Pan</span></span><span className="flex items-center gap-1.5">- <kbd className="px-1.5 py-0.5 bg-foreground/5 border border-foreground/10 rounded text-[#2563EB] font-sans">{scrollLabels.zoom}</kbd>+ <kbd className="px-1.5 py-0.5 bg-foreground/5 border border-foreground/10 rounded text-[#2563EB] font-sans">+ {scrollLabels.zoom}+ </kbd><span>Zoom</span></span></div>diff --git a/src/components/video-editor/timeline/hooks/actions/useTimelineAudioActions.ts b/src/components/video-editor/timeline/hooks/actions/useTimelineAudioActions.tsindex b0e1fff6..63dc36eb 100644--- a/src/components/video-editor/timeline/hooks/actions/useTimelineAudioActions.ts+++ b/src/components/video-editor/timeline/hooks/actions/useTimelineAudioActions.ts@@ -24,7 +24,11 @@ interface UseTimelineAudioActionsParams {regions: {audio: TimelineAudioRegion[];};- onAudioAdded?: (span: { start: number; end: number }, audioPath: string, trackIndex?: number) => void;+ onAudioAdded?: (+ span: { start: number; end: number },+ audioPath: string,+ trackIndex?: number,+ ) => void;deps?: Partial<TimelineAudioActionsDeps>;}diff --git a/src/components/video-editor/timeline/hooks/actions/useTimelineZoomActions.ts b/src/components/video-editor/timeline/hooks/actions/useTimelineZoomActions.tsindex 0981ffe8..4f85751e 100644--- a/src/components/video-editor/timeline/hooks/actions/useTimelineZoomActions.ts+++ b/src/components/video-editor/timeline/hooks/actions/useTimelineZoomActions.ts@@ -113,7 +113,9 @@ export function useTimelineZoomActions({}if (disableSuggestedZooms) {- timelineNotifications.info("Suggested zooms are unavailable while cursor looping is enabled.");+ timelineNotifications.info(+ "Suggested zooms are unavailable while cursor looping is enabled.",+ );return;}diff --git a/src/components/video-editor/timeline/hooks/useTimelineSelection.ts b/src/components/video-editor/timeline/hooks/useTimelineSelection.tsindex 07ee09bd..41c06ade 100644--- a/src/components/video-editor/timeline/hooks/useTimelineSelection.ts+++ b/src/components/video-editor/timeline/hooks/useTimelineSelection.ts@@ -55,10 +55,7 @@ export function useTimelineSelection({if (totalMs === 0) return;const time = Math.max(0, Math.min(currentTimeMs, totalMs));if (keyframes.some((kf) => Math.abs(kf.time - time) < 1)) return;- setKeyframes((prev) => [- ...prev,- { id: globalThis.crypto.randomUUID(), time },- ]);+ setKeyframes((prev) => [...prev, { id: globalThis.crypto.randomUUID(), time }]);}, [currentTimeMs, totalMs, keyframes]);const deleteSelectedKeyframe = useCallback(() => {diff --git a/src/components/video-editor/timeline/hooks/utils/timelineAudioPlacement.ts b/src/components/video-editor/timeline/hooks/utils/timelineAudioPlacement.tsindex 4be4e382..86334449 100644--- a/src/components/video-editor/timeline/hooks/utils/timelineAudioPlacement.ts+++ b/src/components/video-editor/timeline/hooks/utils/timelineAudioPlacement.ts@@ -30,7 +30,10 @@ export function resolveAudioPlacement({const normalizedPreferredTrackIndex = Number.isFinite(preferredTrackIndex)? Math.max(0, Math.floor(preferredTrackIndex ?? 0)): null;- const maxTrackIndex = audioRegions.reduce((max, region) => Math.max(max, region.trackIndex ?? 0), -1);+ const maxTrackIndex = audioRegions.reduce(+ (max, region) => Math.max(max, region.trackIndex ?? 0),+ -1,+ );const candidateTrackIndexes =normalizedPreferredTrackIndex === null? Array.from({ length: maxTrackIndex + 2 }, (_, index) => index)diff --git a/src/components/video-editor/timeline/hooks/utils/timelineNotifications.ts b/src/components/video-editor/timeline/hooks/utils/timelineNotifications.tsindex 37b85820..7843b1d5 100644--- a/src/components/video-editor/timeline/hooks/utils/timelineNotifications.ts+++ b/src/components/video-editor/timeline/hooks/utils/timelineNotifications.ts@@ -9,5 +9,6 @@ export interface TimelineNotifications {export const timelineNotifications: TimelineNotifications = {error: (title, description) => toast.error(title, description ? { description } : undefined),info: (title, description) => toast.info(title, description ? { description } : undefined),- success: (title, description) => toast.success(title, description ? { description } : undefined),+ success: (title, description) =>+ toast.success(title, description ? { description } : undefined),};diff --git a/src/components/video-editor/timeline/model/timelineModel.test.ts b/src/components/video-editor/timeline/model/timelineModel.test.tsindex 1f20052e..0c470c77 100644--- a/src/components/video-editor/timeline/model/timelineModel.test.ts+++ b/src/components/video-editor/timeline/model/timelineModel.test.ts@@ -35,10 +35,22 @@ describe("timeline model", () => {],clipRegions: [{ id: "c1", startMs: 0, endMs: 4000, speed: 1 }],annotationRegions: [- { ...BASE_ANNOTATION, type: "text" as const, content: "Hello timeline", trackIndex: 1 },+ {+ ...BASE_ANNOTATION,+ type: "text" as const,+ content: "Hello timeline",+ trackIndex: 1,+ },],audioRegions: [- { id: "au1", startMs: 500, endMs: 2000, audioPath: "/tmp/foo.mp3", volume: 1, trackIndex: 0 },+ {+ id: "au1",+ startMs: 500,+ endMs: 2000,+ audioPath: "/tmp/foo.mp3",+ volume: 1,+ trackIndex: 0,+ },],});@@ -80,8 +92,18 @@ describe("timeline model", () => {"Annotation",);- expect(getAudioLabel({ id: "1", startMs: 0, endMs: 1, audioPath: "C:\\x\\y\\z.wav", volume: 1 })).toBe("z");- expect(getAudioLabel({ id: "2", startMs: 0, endMs: 1, audioPath: "", volume: 1 })).toBe("Audio");+ expect(+ getAudioLabel({+ id: "1",+ startMs: 0,+ endMs: 1,+ audioPath: "C:\\x\\y\\z.wav",+ volume: 1,+ }),+ ).toBe("z");+ expect(getAudioLabel({ id: "2", startMs: 0, endMs: 1, audioPath: "", volume: 1 })).toBe(+ "Audio",+ );});it("builds row spans for dnd constraints", () => {@@ -91,7 +113,14 @@ describe("timeline model", () => {],clipRegions: [{ id: "c1", startMs: 0, endMs: 4000, speed: 1 }],audioRegions: [- { id: "au1", startMs: 500, endMs: 2000, audioPath: "x.wav", volume: 1, trackIndex: 2 },+ {+ id: "au1",+ startMs: 500,+ endMs: 2000,+ audioPath: "x.wav",+ volume: 1,+ trackIndex: 2,+ },],});expect(spans.map((s) => s.rowId)).toEqual(["row-zoom", "row-clip", "row-audio-2"]);@@ -99,9 +128,27 @@ describe("timeline model", () => {it("keeps items in their domain rows during dnd", () => {const items = [- { id: "a1", rowId: "row-annotation-1", span: { start: 0, end: 1 }, label: "A", variant: "annotation" as const },- { id: "au1", rowId: "row-audio-2", span: { start: 0, end: 1 }, label: "X", variant: "audio" as const },- { id: "z1", rowId: "row-zoom", span: { start: 0, end: 1 }, label: "Z", variant: "zoom" as const },+ {+ id: "a1",+ rowId: "row-annotation-1",+ span: { start: 0, end: 1 },+ label: "A",+ variant: "annotation" as const,+ },+ {+ id: "au1",+ rowId: "row-audio-2",+ span: { start: 0, end: 1 },+ label: "X",+ variant: "audio" as const,+ },+ {+ id: "z1",+ rowId: "row-zoom",+ span: { start: 0, end: 1 },+ label: "Z",+ variant: "zoom" as const,+ },];expect(resolveDropRowId("a1", "row-audio-0", items)).toBe("row-annotation-1");expect(resolveDropRowId("a1", "row-annotation-3", items)).toBe("row-annotation-3");diff --git a/src/components/video-editor/types.test.ts b/src/components/video-editor/types.test.tsindex 6da7a8da..34b3502b 100644--- a/src/components/video-editor/types.test.ts+++ b/src/components/video-editor/types.test.ts@@ -155,7 +155,12 @@ describe("clip timeline mapping", () => {);expect(clipsFromTrims.map((clip) => clip.id)).toEqual(["clip-1", "clip-2", "clip-3"]);- expect(deriveNextId("clip", clipsFromTrims.map((clip) => clip.id))).toBe(4);+ expect(+ deriveNextId(+ "clip",+ clipsFromTrims.map((clip) => clip.id),+ ),+ ).toBe(4);});});@@ -171,10 +176,7 @@ describe("getTimelineDurationMs", () => {it("keeps the source duration when speed edits make clips shorter", () => {expect(- getTimelineDurationMs(- [{ id: "clip-1", startMs: 0, endMs: 5_000, speed: 2 }],- 10_000,- ),+ getTimelineDurationMs([{ id: "clip-1", startMs: 0, endMs: 5_000, speed: 2 }], 10_000),).toBe(10_000);});});diff --git a/src/components/video-editor/useNvidiaCudaExportOptIn.ts b/src/components/video-editor/useNvidiaCudaExportOptIn.tsindex a674b4ae..75f2ecc3 100644--- a/src/components/video-editor/useNvidiaCudaExportOptIn.ts+++ b/src/components/video-editor/useNvidiaCudaExportOptIn.ts@@ -1,8 +1,7 @@import { useCallback, useEffect, useState } from "react";import { loadAppSetting, saveAppSetting } from "@/lib/appSettings";-export const NVIDIA_CUDA_EXPORT_OPT_IN_SETTING_KEY =- "recordly.export.experimentalNvidiaCuda";+export const NVIDIA_CUDA_EXPORT_OPT_IN_SETTING_KEY = "recordly.export.experimentalNvidiaCuda";type NativeExportCapabilitiesResult = {capabilities?: {@@ -12,9 +11,7 @@ type NativeExportCapabilitiesResult = {};} | null;-export function isNvidiaCudaExportAvailable(- result: NativeExportCapabilitiesResult | undefined,-) {+export function isNvidiaCudaExportAvailable(result: NativeExportCapabilitiesResult | undefined) {return result?.capabilities?.nvidiaCuda?.available === true;}@@ -33,11 +30,7 @@ export function saveNvidiaCudaExportOptIn(enabled: boolean) {return saveAppSetting(NVIDIA_CUDA_EXPORT_OPT_IN_SETTING_KEY, enabled);}-export function useNvidiaCudaExportOptIn({- onEnabled,-}: {- onEnabled?: () => void;-} = {}) {+export function useNvidiaCudaExportOptIn({ onEnabled }: { onEnabled?: () => void } = {}) {const [nvidiaCudaExportAvailable, setNvidiaCudaExportAvailable] = useState(false);const [experimentalNvidiaCudaExport, setExperimentalNvidiaCudaExportState] = useState(loadInitialNvidiaCudaExportOptIn,@@ -75,10 +68,7 @@ export function useNvidiaCudaExportOptIn({const setExperimentalNvidiaCudaExport = useCallback((enabled: boolean) => {- const nextEnabled = resolveNvidiaCudaExportOptIn(- enabled,- nvidiaCudaExportAvailable,- );+ const nextEnabled = resolveNvidiaCudaExportOptIn(enabled, nvidiaCudaExportAvailable);setExperimentalNvidiaCudaExportState(nextEnabled);saveNvidiaCudaExportOptIn(nextEnabled);if (nextEnabled) {diff --git a/src/components/video-editor/videoPlayback/cursorFollowCamera.test.ts b/src/components/video-editor/videoPlayback/cursorFollowCamera.test.tsindex cd66d111..34b57182 100644--- a/src/components/video-editor/videoPlayback/cursorFollowCamera.test.ts+++ b/src/components/video-editor/videoPlayback/cursorFollowCamera.test.ts@@ -1,8 +1,5 @@import { describe, expect, it } from "vitest";-import {- computeCursorFollowFocus,- createCursorFollowCameraState,-} from "./cursorFollowCamera";+import { computeCursorFollowFocus, createCursorFollowCameraState } from "./cursorFollowCamera";describe("computeCursorFollowFocus", () => {it("holds the camera while the cursor stays inside the safe zone", () => {@@ -127,4 +124,4 @@ describe("computeCursorFollowFocus", () => {expect(initialFocus).toEqual({ cx: 0.3, cy: 0.7 });});-});\ No newline at end of file+});diff --git a/src/components/video-editor/videoPlayback/motionSmoothing.ts b/src/components/video-editor/videoPlayback/motionSmoothing.tsindex 6ffed00e..c4ec3852 100644--- a/src/components/video-editor/videoPlayback/motionSmoothing.ts+++ b/src/components/video-editor/videoPlayback/motionSmoothing.ts@@ -35,10 +35,7 @@ function clampSpringMultiplier(value: number | undefined) {return Math.min(3, Math.max(0.25, numericValue));}-function applyCursorSpringTuning(- config: SpringConfig,- tuning?: CursorSpringTuning,-): SpringConfig {+function applyCursorSpringTuning(config: SpringConfig, tuning?: CursorSpringTuning): SpringConfig {return {...config,stiffness: config.stiffness * clampSpringMultiplier(tuning?.stiffnessMultiplier),@@ -226,13 +223,16 @@ export function getCursorSpringConfig(const clamped = Math.min(CURSOR_SMOOTHING_MAX, Math.max(CURSOR_SMOOTHING_MIN, smoothingFactor));if (clamped <= 0) {- return applyCursorSpringTuning({- stiffness: 1000,- damping: 100,- mass: 1,- restDelta: 0.0001,- restSpeed: 0.001,- }, tuning);+ return applyCursorSpringTuning(+ {+ stiffness: 1000,+ damping: 100,+ mass: 1,+ restDelta: 0.0001,+ restSpeed: 0.001,+ },+ tuning,+ );}if (clamped <= CURSOR_SMOOTHING_LEGACY_MAX) {@@ -245,13 +245,16 @@ export function getCursorSpringConfig(),);- return applyCursorSpringTuning({- stiffness: (760 - legacyNormalized * 420) * DEFAULT_CURSOR_STIFFNESS_BOOST,- damping: 34 + legacyNormalized * 24,- mass: 0.85 + legacyNormalized * 0.55,- restDelta: 0.0002,- restSpeed: 0.01,- }, tuning);+ return applyCursorSpringTuning(+ {+ stiffness: (760 - legacyNormalized * 420) * DEFAULT_CURSOR_STIFFNESS_BOOST,+ damping: 34 + legacyNormalized * 24,+ mass: 0.85 + legacyNormalized * 0.55,+ restDelta: 0.0002,+ restSpeed: 0.01,+ },+ tuning,+ );}const extendedNormalized = Math.min(@@ -263,13 +266,16 @@ export function getCursorSpringConfig(),);- return applyCursorSpringTuning({- stiffness: (340 - extendedNormalized * 180) * DEFAULT_CURSOR_STIFFNESS_BOOST,- damping: 58 + extendedNormalized * 22,- mass: 1.35 + extendedNormalized * 0.45,- restDelta: 0.0002,- restSpeed: 0.01,- }, tuning);+ return applyCursorSpringTuning(+ {+ stiffness: (340 - extendedNormalized * 180) * DEFAULT_CURSOR_STIFFNESS_BOOST,+ damping: 58 + extendedNormalized * 22,+ mass: 1.35 + extendedNormalized * 0.45,+ restDelta: 0.0002,+ restSpeed: 0.01,+ },+ tuning,+ );}export function getZoomSpringConfig(@@ -279,13 +285,16 @@ export function getZoomSpringConfig(const clamped = Math.max(0, Math.min(1, smoothnessFactor));if (clamped <= 0) {- return applyCursorSpringTuning({- stiffness: 1000,- damping: 100,- mass: 1,- restDelta: 0.0001,- restSpeed: 0.001,- }, tuning);+ return applyCursorSpringTuning(+ {+ stiffness: 1000,+ damping: 100,+ mass: 1,+ restDelta: 0.0001,+ restSpeed: 0.001,+ },+ tuning,+ );}// Map 0-1 slider to the internal 0-2 spring range so that@@ -297,11 +306,14 @@ export function getZoomSpringConfig(// The overshoot clamp in stepSpringValue prevents wobble even at// this low damping, so animations stay fast and responsive.// Higher scaled → lower stiffness + higher mass → slower, floatier settle.- return applyCursorSpringTuning({- stiffness: 100 / scaled,- damping: 21,- mass: 1.0 * scaled,- restDelta: 0.0005,- restSpeed: 0.015,- }, tuning);+ return applyCursorSpringTuning(+ {+ stiffness: 100 / scaled,+ damping: 21,+ mass: 1.0 * scaled,+ restDelta: 0.0005,+ restSpeed: 0.015,+ },+ tuning,+ );}diff --git a/src/components/video-editor/videoPlayback/uploadedCursorAssets.ts b/src/components/video-editor/videoPlayback/uploadedCursorAssets.tsindex d017d2d7..df2e55b0 100644--- a/src/components/video-editor/videoPlayback/uploadedCursorAssets.ts+++ b/src/components/video-editor/videoPlayback/uploadedCursorAssets.ts@@ -28,7 +28,8 @@ const TAHOE_POINTER_CONTENT_HEIGHT = 851;// Measured from the raw pointer assets using the non-shadow pixel bounds.const MACOS_CURSOR_STYLE_SIZE_MULTIPLIER =- (TAHOE_POINTER_CONTENT_HEIGHT / TAHOE_POINTER_ASSET_HEIGHT) /+ TAHOE_POINTER_CONTENT_HEIGHT /+ TAHOE_POINTER_ASSET_HEIGHT /(MACOS_POINTER_CONTENT_HEIGHT / MACOS_POINTER_ASSET_HEIGHT);export type UploadedCursorAsset = {diff --git a/src/components/video-editor/videoPlayback/webcamSync.test.ts b/src/components/video-editor/videoPlayback/webcamSync.test.tsindex 636a6488..bd51e9c9 100644--- a/src/components/video-editor/videoPlayback/webcamSync.test.ts+++ b/src/components/video-editor/videoPlayback/webcamSync.test.ts@@ -63,11 +63,11 @@ describe("shouldSeekWebcamMedia", () => {it("does not issue another corrective seek while the webcam element is already seeking", () => {expect(shouldSeekWebcamMedia({- desiredTime: 10.5,+ desiredTime: 10.5,isPlaying: true,isSeeking: true,previousTimelineTime: 10,- timelineTime: 10.5,+ timelineTime: 10.5,webcamCurrentTime: 9.8,}),).toBe(false);@@ -76,26 +76,26 @@ describe("shouldSeekWebcamMedia", () => {it("seeks when playback drift grows beyond the active threshold", () => {expect(shouldSeekWebcamMedia({- desiredTime: 10.5,+ desiredTime: 10.5,isPlaying: true,isSeeking: false,previousTimelineTime: 10,- timelineTime: 10.5,+ timelineTime: 10.5,webcamCurrentTime: 9.8,}),).toBe(true);});- it("does not seek when the clamped media target is already correct", () => {- expect(- shouldSeekWebcamMedia({- desiredTime: 1 / 60,- isPlaying: false,- isSeeking: false,- previousTimelineTime: 0,- timelineTime: 0,- webcamCurrentTime: 1 / 60,- }),- ).toBe(false);- });+ it("does not seek when the clamped media target is already correct", () => {+ expect(+ shouldSeekWebcamMedia({+ desiredTime: 1 / 60,+ isPlaying: false,+ isSeeking: false,+ previousTimelineTime: 0,+ timelineTime: 0,+ webcamCurrentTime: 1 / 60,+ }),+ ).toBe(false);+ });});diff --git a/src/contexts/ThemeContext.test.ts b/src/contexts/ThemeContext.test.tsindex 9b5d97cd..f49e7ef4 100644--- a/src/contexts/ThemeContext.test.ts+++ b/src/contexts/ThemeContext.test.ts@@ -64,10 +64,7 @@ describe("ThemeContext persistence", () => {});it("falls back to localStorage when Electron settings are unavailable", () => {- vi.stubGlobal(- "localStorage",- createStorageMock({ "recordly.theme": "light" }),- );+ vi.stubGlobal("localStorage", createStorageMock({ "recordly.theme": "light" }));expect(loadThemePreference()).toBe("light");});diff --git a/src/contexts/ThemeContext.tsx b/src/contexts/ThemeContext.tsxindex adaf1e37..e43d8a31 100644--- a/src/contexts/ThemeContext.tsx+++ b/src/contexts/ThemeContext.tsx@@ -46,9 +46,7 @@ export function persistThemePreference(pref: ThemePreference): void {function resolveTheme(pref: ThemePreference): ResolvedTheme {if (pref === "system") {- return globalThis.matchMedia?.("(prefers-color-scheme: dark)").matches- ? "dark"- : "light";+ return globalThis.matchMedia?.("(prefers-color-scheme: dark)").matches ? "dark" : "light";}return pref;}@@ -70,9 +68,7 @@ export function ThemeProvider({ children }: { children: React.ReactNode }) {return stored;});- const [resolved, setResolved] = useState<ResolvedTheme>(() =>- resolveTheme(preference),- );+ const [resolved, setResolved] = useState<ResolvedTheme>(() => resolveTheme(preference));const setPreference = useCallback((pref: ThemePreference) => {setPreferenceState(pref);@@ -105,9 +101,7 @@ export function ThemeProvider({ children }: { children: React.ReactNode }) {}, [resolved]);return (- <ThemeContext.Provider- value={{ preference, theme: resolved, setPreference, toggleTheme }}- >+ <ThemeContext.Provider value={{ preference, theme: resolved, setPreference, toggleTheme }}>{children}</ThemeContext.Provider>);diff --git a/src/i18n/config.ts b/src/i18n/config.tsindex f4e2833e..88200f78 100644--- a/src/i18n/config.ts+++ b/src/i18n/config.ts@@ -1,6 +1,17 @@export const DEFAULT_LOCALE = "en" as const;-export const SUPPORTED_LOCALES = ["en", "es", "fr", "de", "it", "nl", "ko", "pt-BR", "zh-CN", "zh-TW"] as const;+export const SUPPORTED_LOCALES = [+ "en",+ "es",+ "fr",+ "de",+ "it",+ "nl",+ "ko",+ "pt-BR",+ "zh-CN",+ "zh-TW",+] as const;export const I18N_NAMESPACES = ["common",diff --git a/src/i18n/locales/de/common.json b/src/i18n/locales/de/common.jsonindex e7106686..e322c3d0 100644--- a/src/i18n/locales/de/common.json+++ b/src/i18n/locales/de/common.json@@ -1,26 +1,26 @@{- "app": {- "name": "Recordly",- "editorTitle": "Recordly Editor",- "subtitle": "Bildschirmaufzeichnung und -bearbeitung",- "language": "Sprache",- "manageRecordings": "Aufzeichnungsordner öffnen"- },+ "app": {+ "name": "Recordly",+ "editorTitle": "Recordly Editor",+ "subtitle": "Bildschirmaufzeichnung und -bearbeitung",+ "language": "Sprache",+ "manageRecordings": "Aufzeichnungsordner öffnen"+ },"actions": {- "cancel": "Abbrechen",- "close": "Schließen",- "export": "Exportieren",- "load": "Laden",- "redo": "Wiederherstellen",- "reset": "Zurücksetzen",- "save": "Speichern",+ "cancel": "Abbrechen",+ "close": "Schließen",+ "export": "Exportieren",+ "load": "Laden",+ "redo": "Wiederherstellen",+ "reset": "Zurücksetzen",+ "save": "Speichern","undo": "Rückgängig",- "delete": "Löschen",- "done": "Fertig"- },+ "delete": "Löschen",+ "done": "Fertig"+ },"errors": {- "invalidFileType": "Ungültiger Dateityp",- "failedToUploadImage": "Bild konnte nicht hochgeladen werden",- "fileReadError": "Beim Lesen der Datei ist ein Fehler aufgetreten."- }+ "invalidFileType": "Ungültiger Dateityp",+ "failedToUploadImage": "Bild konnte nicht hochgeladen werden",+ "fileReadError": "Beim Lesen der Datei ist ein Fehler aufgetreten."+ }}diff --git a/src/i18n/locales/de/dialogs.json b/src/i18n/locales/de/dialogs.jsonindex d2471106..f99c5ab3 100644--- a/src/i18n/locales/de/dialogs.json+++ b/src/i18n/locales/de/dialogs.json@@ -1,62 +1,62 @@{"export": {- "pleaseTryAgain": "Bitte versuche es erneut",- "compilingGifProgress": "GIF wird kompiliert... {{progress}}%",- "compilingGifWait": "GIF wird kompiliert... Dies kann eine Weile dauern",- "takeMoment": "Dies kann einen Moment dauern...",+ "pleaseTryAgain": "Bitte versuche es erneut",+ "compilingGifProgress": "GIF wird kompiliert... {{progress}}%",+ "compilingGifWait": "GIF wird kompiliert... Dies kann eine Weile dauern",+ "takeMoment": "Dies kann einen Moment dauern...","exportFailed": "Export fehlgeschlagen",- "compilingGifTitle": "GIF wird kompiliert",- "exportingFormat": "Exportiere {{format}}",- "exportComplete": "Export abgeschlossen",- "formatReady": "Dein {{format}} ist bereit",+ "compilingGifTitle": "GIF wird kompiliert",+ "exportingFormat": "Exportiere {{format}}",+ "exportComplete": "Export abgeschlossen",+ "formatReady": "Dein {{format}} ist bereit","showInFolder": "Im Ordner anzeigen",- "compiling": "Kompilieren",- "renderingFrames": "Frames rendern",- "processing": "Verarbeiten...",- "status": "Status",- "format": "Format",+ "compiling": "Kompilieren",+ "renderingFrames": "Frames rendern",+ "processing": "Verarbeiten...",+ "status": "Status",+ "format": "Format","compilingStatus": "Kompilieren...",- "frames": "Frames",- "cancelExport": "Export abbrechen",- "reopenSaveDialog": "Speicherdialog erneut öffnen",- "savedSuccess": "{{format}} erfolgreich gespeichert!"- },+ "frames": "Frames",+ "cancelExport": "Export abbrechen",+ "reopenSaveDialog": "Speicherdialog erneut öffnen",+ "savedSuccess": "{{format}} erfolgreich gespeichert!"+ },"addFont": {- "title": "Google-Schriftart hinzufügen",- "heading": "Google-Schriftart hinzufügen",- "description": "Fügen Sie eine benutzerdefinierte Schriftart aus Google Fonts hinzu, um sie in Ihren Anmerkungen zu verwenden.",+ "title": "Google-Schriftart hinzufügen",+ "heading": "Google-Schriftart hinzufügen",+ "description": "Fügen Sie eine benutzerdefinierte Schriftart aus Google Fonts hinzu, um sie in Ihren Anmerkungen zu verwenden.","urlLabel": "Google Fonts-Import-URL",- "urlPlaceholder": "https://fonts.googleapis.com/css2?family=Roboto&display=swap",- "urlHelp": "So erhalten Sie diese von Google Fonts: Wählen Sie eine Schriftart aus → Klicken Sie auf \"Schriftart abrufen\" → Kopieren Sie die @import-URL",+ "urlPlaceholder": "https://fonts.googleapis.com/css2?family=Roboto&display=swap",+ "urlHelp": "So erhalten Sie diese von Google Fonts: Wählen Sie eine Schriftart aus → Klicken Sie auf \"Schriftart abrufen\" → Kopieren Sie die @import-URL","nameLabel": "Anzeigename",- "namePlaceholder": "Meine benutzerdefinierte Schriftart",- "nameHelp": "So wird die Schriftart in der Schriftartauswahl angezeigt",- "adding": "Wird hinzugefügt...",+ "namePlaceholder": "Meine benutzerdefinierte Schriftart",+ "nameHelp": "So wird die Schriftart in der Schriftartauswahl angezeigt",+ "adding": "Wird hinzugefügt...","addFont": "Schriftart hinzufügen",- "enterUrl": "Bitte gib eine Google Fonts-Import-URL ein",- "invalidUrl": "Bitte gib eine gültige Google Fonts-URL ein",- "enterName": "Bitte gib einen Schriftartnamen ein",- "extractFailed": "Schriftfamilie konnte nicht aus der URL extrahiert werden",+ "enterUrl": "Bitte gib eine Google Fonts-Import-URL ein",+ "invalidUrl": "Bitte gib eine gültige Google Fonts-URL ein",+ "enterName": "Bitte gib einen Schriftartnamen ein",+ "extractFailed": "Schriftfamilie konnte nicht aus der URL extrahiert werden","addSuccess": "Schriftart \"{{name}}\" erfolgreich hinzugefügt",- "addFailed": "Schriftart konnte nicht hinzugefügt werden",- "loadTimeout": "Das Laden der Schriftart hat zu lange gedauert. Bitte überprüfen Sie die URL und versuchen Sie es erneut.",- "loadFailed": "Die Schriftart konnte nicht geladen werden. Bitte überprüfen Sie, ob die Google Fonts-URL korrekt ist."- },+ "addFailed": "Schriftart konnte nicht hinzugefügt werden",+ "loadTimeout": "Das Laden der Schriftart hat zu lange gedauert. Bitte überprüfen Sie die URL und versuchen Sie es erneut.",+ "loadFailed": "Die Schriftart konnte nicht geladen werden. Bitte überprüfen Sie, ob die Google Fonts-URL korrekt ist."+ },"shortcutsConfig": {- "title": "Tastaturkürzel",- "configurable": "Konfigurierbar",- "fixed": "Fest",- "pressEscToCancel": "Zum Abbrechen Esc drücken",- "clickToChange": "Zum Ändern anklicken",+ "title": "Tastaturkürzel",+ "configurable": "Konfigurierbar",+ "fixed": "Fest",+ "pressEscToCancel": "Zum Abbrechen Esc drücken",+ "clickToChange": "Zum Ändern anklicken","pressAKey": "Drücke eine Taste…",- "alreadyUsedBy": "Wird bereits von <strong>{{action}}</strong> verwendet",- "swap": "Tauschen",- "reserved": "Dieser Tastenbefehl ist für \"{{label}}\" reserviert und kann nicht neu zugewiesen werden.",+ "alreadyUsedBy": "Wird bereits von <strong>{{action}}</strong> verwendet",+ "swap": "Tauschen",+ "reserved": "Dieser Tastenbefehl ist für \"{{label}}\" reserviert und kann nicht neu zugewiesen werden.","saved": "Tastaturkürzel gespeichert",- "resetNotice": "Auf Standard-Tastaturkürzel zurücksetzen – zum Übernehmen auf Speichern klicken",- "instructions": "Klicken Sie auf ein Tastaturkürzel und drücken Sie dann die neue Tastenkombination. Drücken Sie Esc, um abzubrechen.",- "resetToDefaults": "Auf Standardwerte zurücksetzen",- "cancel": "Abbrechen",- "save": "Speichern"- }+ "resetNotice": "Auf Standard-Tastaturkürzel zurücksetzen – zum Übernehmen auf Speichern klicken",+ "instructions": "Klicken Sie auf ein Tastaturkürzel und drücken Sie dann die neue Tastenkombination. Drücken Sie Esc, um abzubrechen.",+ "resetToDefaults": "Auf Standardwerte zurücksetzen",+ "cancel": "Abbrechen",+ "save": "Speichern"+ }}diff --git a/src/i18n/locales/de/editor.json b/src/i18n/locales/de/editor.jsonindex 572f6574..06c71ec9 100644--- a/src/i18n/locales/de/editor.json+++ b/src/i18n/locales/de/editor.json@@ -1,141 +1,141 @@{"playback": {- "play": "Wiedergabe",- "pause": "Pause",- "skipBack": "Zurück springen",- "skipForward": "Vorwärts springen",- "muteUnmute": "Stummschalten/Stummschaltung aufheben"- },+ "play": "Wiedergabe",+ "pause": "Pause",+ "skipBack": "Zurück springen",+ "skipForward": "Vorwärts springen",+ "muteUnmute": "Stummschalten/Stummschaltung aufheben"+ },"annotations": {- "settings": "Einstellungen für Anmerkungen",- "active": "Aktiv",- "text": "Text",- "image": "Bild",- "arrow": "Pfeil",- "blur": "Weichzeichnen",+ "settings": "Einstellungen für Anmerkungen",+ "active": "Aktiv",+ "text": "Text",+ "image": "Bild",+ "arrow": "Pfeil",+ "blur": "Weichzeichnen","textContent": "Textinhalt",- "textPlaceholder": "Geben Sie Ihren Text ein...",- "fontStyle": "Schriftart",- "selectStyle": "Auswahlstil",- "size": "Größe",- "toggleBold": "Fett umschalten",+ "textPlaceholder": "Geben Sie Ihren Text ein...",+ "fontStyle": "Schriftart",+ "selectStyle": "Auswahlstil",+ "size": "Größe",+ "toggleBold": "Fett umschalten","toggleItalic": "Kursiv umschalten",- "toggleUnderline": "Unterstreichung umschalten",- "alignLeft": "Linksbündig",- "alignCenter": "Zentriert",- "alignRight": "Rechtsbündig",- "textColor": "Textfarbe",+ "toggleUnderline": "Unterstreichung umschalten",+ "alignLeft": "Linksbündig",+ "alignCenter": "Zentriert",+ "alignRight": "Rechtsbündig",+ "textColor": "Textfarbe","background": "Hintergrund",- "none": "Keine",- "clearBackground": "Hintergrund löschen",- "uploadImage": "Bild hochladen",- "supportedFormats": "Unterstützte Formate: JPG, PNG, GIF, WebP",+ "none": "Keine",+ "clearBackground": "Hintergrund löschen",+ "uploadImage": "Bild hochladen",+ "supportedFormats": "Unterstützte Formate: JPG, PNG, GIF, WebP","arrowDirection": "Pfeilrichtung",- "strokeWidth": "Strichbreite: {{width}}px",- "arrowColor": "Pfeilfarbe",- "deleteAnnotation": "Anmerkung löschen",- "shortcutsAndTips": "Tastenkombinationen & Tipps",+ "strokeWidth": "Strichbreite: {{width}}px",+ "arrowColor": "Pfeilfarbe",+ "deleteAnnotation": "Anmerkung löschen",+ "shortcutsAndTips": "Tastenkombinationen & Tipps","tipSelectAnnotation": "Bewegen Sie den Abspielkopf auf den überlappenden Anmerkungsbereich und wählen Sie ein Element aus.",- "tipCycleForward": "Verwenden Sie die Tabulatortaste, um durch die überlappenden Elemente zu blättern.",- "tipCycleBackward": "Verwenden Sie Umschalt+Tab, um rückwärts zu blättern.",- "imageUploadSuccess": "Bild erfolgreich hochgeladen!",+ "tipCycleForward": "Verwenden Sie die Tabulatortaste, um durch die überlappenden Elemente zu blättern.",+ "tipCycleBackward": "Verwenden Sie Umschalt+Tab, um rückwärts zu blättern.",+ "imageUploadSuccess": "Bild erfolgreich hochgeladen!","imageUploadError": "Bitte lade eine JPG-, PNG-, GIF- oder WebP-Bilddatei hoch.",- "blurStrength": "Unschärfestärke: {{strength}}",- "solidColor": "Einfarbig (Zensur)",- "borderRadius": "Randradius"- },+ "blurStrength": "Unschärfestärke: {{strength}}",+ "solidColor": "Einfarbig (Zensur)",+ "borderRadius": "Randradius"+ },"fontStyles": {- "classic": "Klassisch",- "editor": "Editor",- "strong": "Fett",- "typewriter": "Schreibmaschine",- "deco": "Dekorativ",- "simple": "Einfach",+ "classic": "Klassisch",+ "editor": "Editor",+ "strong": "Fett",+ "typewriter": "Schreibmaschine",+ "deco": "Dekorativ",+ "simple": "Einfach","modern": "Modern",- "clean": "Clean"- },- "format": {- "mp4Video": "MP4-Video",- "mp4Description": "Hochwertige Videodatei",- "gifAnimation": "GIF-Animation",- "gifDescription": "Animiertes Bild zum Teilen"- } ,- "gifOptions": {- "frameRate": "Bildfrequenz",- "outputSize": "Ausgabegröße",- "outputDimensions": "Ausgabe: {{width}} × {{height}}px",- "loopAnimation": "Animation wiederholen",+ "clean": "Clean"+ },+ "format": {+ "mp4Video": "MP4-Video",+ "mp4Description": "Hochwertige Videodatei",+ "gifAnimation": "GIF-Animation",+ "gifDescription": "Animiertes Bild zum Teilen"+ },+ "gifOptions": {+ "frameRate": "Bildfrequenz",+ "outputSize": "Ausgabegröße",+ "outputDimensions": "Ausgabe: {{width}} × {{height}}px",+ "loopAnimation": "Animation wiederholen","loopDescription": "GIF wird kontinuierlich abgespielt"- },- "tutorial": {- "howTrimmingWorks": "So funktioniert das Zuschneiden",- "title": "So funktioniert das Zuschneiden",- "understanding": "So schneiden Sie unerwünschte Teile aus Ihrem Video heraus.",+ },+ "tutorial": {+ "howTrimmingWorks": "So funktioniert das Zuschneiden",+ "title": "So funktioniert das Zuschneiden",+ "understanding": "So schneiden Sie unerwünschte Teile aus Ihrem Video heraus.","descriptionP1": "Das Trimm-Werkzeug funktioniert, indem Sie die Segmente definieren, die Sie",- "descriptionRemove": "entfernen",- "descriptionP2": "aus Ihrem Video",- "descriptionP3": "Jeder Teil der Zeitleiste, der von einem roten Trimm-Segment abgedeckt ist, wird beim Exportieren herausgeschnitten.",+ "descriptionRemove": "entfernen",+ "descriptionP2": "aus Ihrem Video",+ "descriptionP3": "Jeder Teil der Zeitleiste, der von einem roten Trimm-Segment abgedeckt ist, wird beim Exportieren herausgeschnitten.","visualExample": "Visuelles Beispiel",- "removed": "ENTFERNT",- "kept": "Beibehalten",- "finalVideo": "Endgültiges Video",- "part": "Teil {{number}}",- "addTrimStep": "1. Trimmen hinzufügen",+ "removed": "ENTFERNT",+ "kept": "Beibehalten",+ "finalVideo": "Endgültiges Video",+ "part": "Teil {{number}}",+ "addTrimStep": "1. Trimmen hinzufügen","addTrimDesc": "Drücken Sie T oder klicken Sie auf das Scheren-Symbol, um einen Abschnitt zum Entfernen zu markieren.",- "adjustStep": "2. Anpassen",- "adjustDesc": "Ziehen Sie die Ränder des roten Bereichs, um genau den Bereich abzudecken, den Sie herausschneiden möchten."- },+ "adjustStep": "2. Anpassen",+ "adjustDesc": "Ziehen Sie die Ränder des roten Bereichs, um genau den Bereich abzudecken, den Sie herausschneiden möchten."+ },"feedback": {- "trigger": "Feedback",- "title": "Feedback & Kontakt",- "description": "Wenden Sie sich direkt an uns oder erstellen Sie ein Ticket, wenn etwas nicht funktioniert oder fehlt.",- "emailLabel": "E-Mail",- "xLabel": "X",+ "trigger": "Feedback",+ "title": "Feedback & Kontakt",+ "description": "Wenden Sie sich direkt an uns oder erstellen Sie ein Ticket, wenn etwas nicht funktioniert oder fehlt.",+ "emailLabel": "E-Mail",+ "xLabel": "X","reportIssue": "Problem melden / Feedback senden",- "openFailed": "Link konnte nicht geöffnet werden."- },- "keyboardShortcuts": {- "trigger": "Tastenkombinationen",- "title": "Tastenkombinationen",- "description": "Kurzanleitung für die Steuerelemente der Zeitleiste und des Editors.",+ "openFailed": "Link konnte nicht geöffnet werden."+ },+ "keyboardShortcuts": {+ "trigger": "Tastenkombinationen",+ "title": "Tastenkombinationen",+ "description": "Kurzanleitung für die Steuerelemente der Zeitleiste und des Editors.","customizeTooltip": "Tastenkombinationen anpassen",- "customize": "Anpassen",- "panTimeline": "Zeitleiste verschieben",- "zoomTimeline": "Zeitleiste zoomen",- "cycleAnnotations": "Anmerkungen durchlaufen",- "tab": "Registerkarte"- },+ "customize": "Anpassen",+ "panTimeline": "Zeitleiste verschieben",+ "zoomTimeline": "Zeitleiste zoomen",+ "cycleAnnotations": "Anmerkungen durchlaufen",+ "tab": "Registerkarte"+ },"actions": {- "saveAgain": "Erneut speichern",- "showInFolder": "In Ordner anzeigen"- },- "project": {- "untitled": "Unbenannt"- },+ "saveAgain": "Erneut speichern",+ "showInFolder": "In Ordner anzeigen"+ },+ "project": {+ "untitled": "Unbenannt"+ },"nativeCaptureUnavailable": {- "title": "Es ist nichts kaputt, aber wir können kein animiertes Cursor-Overlay rendern.",- "description": "Ihr Gerät unterstützt keine native Erfassung. Dies kann verschiedene Gründe haben, die wir noch nicht ermittelt haben. Recordly funktioniert weiterhin, aber eine Cursor-Glättung ist nicht möglich.",+ "title": "Es ist nichts kaputt, aber wir können kein animiertes Cursor-Overlay rendern.",+ "description": "Ihr Gerät unterstützt keine native Erfassung. Dies kann verschiedene Gründe haben, die wir noch nicht ermittelt haben. Recordly funktioniert weiterhin, aber eine Cursor-Glättung ist nicht möglich.","confirm": "Okay"- },- "exportStatus": {- "exporting": "Exportieren",- "renderingFile": "Datei wird gerendert.",- "preparing": "Export wird vorbereitet...",- "completePercent": "{{percent}} % abgeschlossen",+ },+ "exportStatus": {+ "exporting": "Exportieren",+ "renderingFile": "Datei wird gerendert.",+ "preparing": "Export wird vorbereitet...",+ "completePercent": "{{percent}} % abgeschlossen","issue": "Problem beim Export",- "complete": "Export abgeschlossen",- "savedSuccessfully": "Deine Datei wurde erfolgreich gespeichert."- },- "export": {- "processingAudioEdits": "Audio mit Geschwindigkeits-/Overlay-Bearbeitungen wird verarbeitet"- },- "toolbar": {+ "complete": "Export abgeschlossen",+ "savedSuccessfully": "Deine Datei wurde erfolgreich gespeichert."+ },+ "export": {+ "processingAudioEdits": "Audio mit Geschwindigkeits-/Overlay-Bearbeitungen wird verarbeitet"+ },+ "toolbar": {"addLayer": "Ebene hinzufügen",- "splitClip": "Clip teilen (C)"- },- "timeline": {- "expand": "Zeitleiste erweitern",- "collapse": "Zeitleiste reduzieren"- },- "openRecordingsFolder": "Aufnahmeordner öffnen"+ "splitClip": "Clip teilen (C)"+ },+ "timeline": {+ "expand": "Zeitleiste erweitern",+ "collapse": "Zeitleiste reduzieren"+ },+ "openRecordingsFolder": "Aufnahmeordner öffnen"}diff --git a/src/i18n/locales/de/extensions.json b/src/i18n/locales/de/extensions.jsonindex 5fefcdec..1b6ab83f 100644--- a/src/i18n/locales/de/extensions.json+++ b/src/i18n/locales/de/extensions.json@@ -1,60 +1,60 @@{- "title": "Erweiterungen",- "tabs": {- "browse": "Durchsuchen",- "installed": "Installiert"- },- "actions": {- "submit": "Erweiterung einreichen",- "docs": "Dokumentation zu Erweiterungen",+ "title": "Erweiterungen",+ "tabs": {+ "browse": "Durchsuchen",+ "installed": "Installiert"+ },+ "actions": {+ "submit": "Erweiterung einreichen",+ "docs": "Dokumentation zu Erweiterungen","refresh": "Aktualisieren",- "openFolder": "Erweiterungsordner öffnen",- "uninstall": "Deinstallieren",- "install": "Installieren",- "installing": "Wird installiert",- "add": "Hinzufügen",- "retry": "Wiederholen",+ "openFolder": "Erweiterungsordner öffnen",+ "uninstall": "Deinstallieren",+ "install": "Installieren",+ "installing": "Wird installiert",+ "add": "Hinzufügen",+ "retry": "Wiederholen","close": "Schließen",- "folder": "Ordner"- },- "status": {- "enabled": "Aktiviert",- "disabled": "Deaktiviert",- "installed": "Installiert"- },- "detail": {+ "folder": "Ordner"+ },+ "status": {+ "enabled": "Aktiviert",+ "disabled": "Deaktiviert",+ "installed": "Installiert"+ },+ "detail": {"by": "Von {{author}}",- "unknownAuthor": "Unbekannter Autor",- "noDescription": "Keine Beschreibung",- "downloads": "{{count}} Downloads",- "preview": "Vorschau",+ "unknownAuthor": "Unbekannter Autor",+ "noDescription": "Keine Beschreibung",+ "downloads": "{{count}} Downloads",+ "preview": "Vorschau","screenshotAlt": "Screenshot {{number}}",- "description": "Beschreibung",- "tags": "Tags",- "permissions": "Berechtigungen",- "location": "Speicherort",- "error": "Fehler: {{message}}"- },+ "description": "Beschreibung",+ "tags": "Tags",+ "permissions": "Berechtigungen",+ "location": "Speicherort",+ "error": "Fehler: {{message}}"+ },"empty": {- "title": "Keine Erweiterungen",- "description": "Installiere Erweiterungen, um Rahmen, Cursor-Effekte und Editor-Werkzeuge hinzuzufügen."- },- "search": {- "placeholder": "Erweiterungen suchen...",+ "title": "Keine Erweiterungen",+ "description": "Installiere Erweiterungen, um Rahmen, Cursor-Effekte und Editor-Werkzeuge hinzuzufügen."+ },+ "search": {+ "placeholder": "Erweiterungen suchen...","noResults": "Keine Erweiterungen gefunden",- "noMarketplace": "Noch keine Erweiterungen im Marktplatz verfügbar",- "count": "{{count}} Erweiterung",- "countPlural": "{{count}} Erweiterungen"- },- "toast": {+ "noMarketplace": "Noch keine Erweiterungen im Marktplatz verfügbar",+ "count": "{{count}} Erweiterung",+ "countPlural": "{{count}} Erweiterungen"+ },+ "toast": {"installedAndEnabled": "Erweiterung installiert und aktiviert",- "uninstalled": "{{name}} deinstalliert",- "uninstallFailed": "Deinstallation von {{name}} fehlgeschlagen",- "searchFailed": "Suche im Marktplatz fehlgeschlagen",- "refreshed": "Erweiterungen aktualisiert",+ "uninstalled": "{{name}} deinstalliert",+ "uninstallFailed": "Deinstallation von {{name}} fehlgeschlagen",+ "searchFailed": "Suche im Marktplatz fehlgeschlagen",+ "refreshed": "Erweiterungen aktualisiert","refreshFailed": "Erweiterungen konnten nicht aktualisiert werden",- "marketplaceInstalled": "{{name}} wurde installiert und aktiviert",- "marketplaceInstallFailed": "Die Installation von {{name}} ist fehlgeschlagen",- "enableFailed": "Die Aktivierung der Erweiterung ist fehlgeschlagen"- }-}\ No newline at end of file+ "marketplaceInstalled": "{{name}} wurde installiert und aktiviert",+ "marketplaceInstallFailed": "Die Installation von {{name}} ist fehlgeschlagen",+ "enableFailed": "Die Aktivierung der Erweiterung ist fehlgeschlagen"+ }+}diff --git a/src/i18n/locales/de/launch.json b/src/i18n/locales/de/launch.jsonindex 8574ff13..a9bd70a5 100644--- a/src/i18n/locales/de/launch.json+++ b/src/i18n/locales/de/launch.json@@ -1,71 +1,71 @@{"recording": {- "disableSystemAudio": "System-Audio deaktivieren",- "enableSystemAudio": "System-Audio aktivieren",- "disableMicrophone": "Mikrofon deaktivieren",- "enableMicrophone": "Mikrofon aktivieren",+ "disableSystemAudio": "System-Audio deaktivieren",+ "enableSystemAudio": "System-Audio aktivieren",+ "disableMicrophone": "Mikrofon deaktivieren",+ "enableMicrophone": "Mikrofon aktivieren","micToggleDisabledTip": "Mikrofon kann während der Aufnahme nicht umgeschaltet werden",- "disableWebcam": "Webcam-Overlay deaktivieren",- "enableWebcam": "Webcam-Overlay aktivieren",- "countdownDelay": "Countdown-Verzögerung",- "noDelay": "Keine Verzögerung",+ "disableWebcam": "Webcam-Overlay deaktivieren",+ "enableWebcam": "Webcam-Overlay aktivieren",+ "countdownDelay": "Countdown-Verzögerung",+ "noDelay": "Keine Verzögerung","record": "Aufnehmen",- "recordingFolder": "Pfad zu den Aufzeichnungen: {{path}}",- "chooseRecordingsFolder": "Pfad zu den Aufzeichnungen auswählen",- "folderPath": "Pfad: /{{name}}/",- "openVideoFile": "Videodatei öffnen",+ "recordingFolder": "Pfad zu den Aufzeichnungen: {{path}}",+ "chooseRecordingsFolder": "Pfad zu den Aufzeichnungen auswählen",+ "folderPath": "Pfad: /{{name}}/",+ "openVideoFile": "Videodatei öffnen","openProject": "Projekt öffnen",- "hideHudFromVideo": "HUD in der Aufnahme ausblenden",- "showHudInVideo": "HUD in der Aufnahme anzeigen",- "hideHud": "HUD ausblenden",- "closeApp": "App schließen",+ "hideHudFromVideo": "HUD in der Aufnahme ausblenden",+ "showHudInVideo": "HUD in der Aufnahme anzeigen",+ "hideHud": "HUD ausblenden",+ "closeApp": "App schließen","screens": "Bildschirme",- "windows": "Fenster",- "screen": "Bildschirm",- "window": "Fenster",- "noSourcesFound": "Keine Quellen gefunden",- "microphone": "Mikrofon",- "turnOffMicrophone": "Mikrofon ausschalten",+ "windows": "Fenster",+ "screen": "Bildschirm",+ "window": "Fenster",+ "noSourcesFound": "Keine Quellen gefunden",+ "microphone": "Mikrofon",+ "turnOffMicrophone": "Mikrofon ausschalten","selectMicToEnable": "Mikrofon zum Aktivieren auswählen",- "noMicrophonesFound": "Keine Mikrofone gefunden",- "webcam": "Webcam",- "turnOffWebcam": "Webcam ausschalten",- "hideFloatingWebcamPreview": "Schwebende Vorschau ausblenden",+ "noMicrophonesFound": "Keine Mikrofone gefunden",+ "webcam": "Webcam",+ "turnOffWebcam": "Webcam ausschalten",+ "hideFloatingWebcamPreview": "Schwebende Vorschau ausblenden","showFloatingWebcamPreview": "Schwebende Vorschau anzeigen",- "selectWebcamToEnable": "Webcam zum Aktivieren auswählen",- "noWebcamsFound": "Keine Webcams gefunden",- "recordingsFolder": "Pfad zu den Aufzeichnungen",- "language": "Sprache",+ "selectWebcamToEnable": "Webcam zum Aktivieren auswählen",+ "noWebcamsFound": "Keine Webcams gefunden",+ "recordingsFolder": "Pfad zu den Aufzeichnungen",+ "language": "Sprache","paused": "PAUSIERT",- "rec": "AUFNAHME",- "resume": "Fortsetzen",- "pause": "Pause",- "stop": "Stopp",- "cancel": "Abbrechen",- "more": "Mehr",+ "rec": "AUFNAHME",+ "resume": "Fortsetzen",+ "pause": "Pause",+ "stop": "Stopp",+ "cancel": "Abbrechen",+ "more": "Mehr","update": {- "update": "Aktualisieren",- "updated": "Aktualisiert",- "idleTitle": "Nach Updates suchen.",- "checkingTitle": "Nach Updates suchen...",- "downloadingTitle": "Update wird heruntergeladen...",+ "update": "Aktualisieren",+ "updated": "Aktualisiert",+ "idleTitle": "Nach Updates suchen.",+ "checkingTitle": "Nach Updates suchen...",+ "downloadingTitle": "Update wird heruntergeladen...","errorTitle": "Update-Prüfung fehlgeschlagen. Klicken Sie hier, um es erneut zu versuchen.",- "upToDateTitle": "Recordly {{version}} ist auf dem neuesten Stand.",- "availableTitle": "Recordly {{version}} ist verfügbar.",- "availableGenericTitle": "Ein Update ist verfügbar."- }+ "upToDateTitle": "Recordly {{version}} ist auf dem neuesten Stand.",+ "availableTitle": "Recordly {{version}} ist verfügbar.",+ "availableGenericTitle": "Ein Update ist verfügbar."+ }},- "sourceSelector": {- "loadingSources": "Quellen werden geladen...",- "screens": "Bildschirme",- "windows": "Fenster",- "noScreensAvailable": "Keine Bildschirme verfügbar",+ "sourceSelector": {+ "loadingSources": "Quellen werden geladen...",+ "screens": "Bildschirme",+ "windows": "Fenster",+ "noScreensAvailable": "Keine Bildschirme verfügbar","noWindowsAvailable": "Keine Fenster verfügbar",- "windowsNote": "Es können nur sichtbare (nicht minimierte) Fenster aufgezeichnet werden.",- "windowPlaceholder": "Fenster",- "cancel": "Abbrechen",- "share": "Teilen"- },+ "windowsNote": "Es können nur sichtbare (nicht minimierte) Fenster aufgezeichnet werden.",+ "windowPlaceholder": "Fenster",+ "cancel": "Abbrechen",+ "share": "Teilen"+ },"permissions": {"screenRecordingNeeded": "Recordly benötigt die Berechtigung zur Bildschirmaufzeichnung, bevor Sie beginnen können. Die Systemeinstellungen wurden geöffnet. Schließen Sie Recordly nach der Aktivierung und starten Sie es erneut.","screenRecordingMissing": "Die Berechtigung für die Bildschirmaufzeichnung fehlt noch. Die Systemeinstellungen wurden erneut geöffnet. Aktivieren Sie die Berechtigung, schließen Sie Recordly anschließend und starten Sie die Anwendung vor der Aufzeichnung erneut.",diff --git a/src/i18n/locales/de/settings.json b/src/i18n/locales/de/settings.jsonindex 2f1f57e7..188b4cf5 100644--- a/src/i18n/locales/de/settings.json+++ b/src/i18n/locales/de/settings.json@@ -1,102 +1,102 @@{"zoom": {- "level": "Zoomstufe",- "selectRegion": "Zoombereich zum Anpassen auswählen",- "deleteZoom": "Zoom löschen",- "modeAuto": "Automatisch",- "modeManual": "Manuell",+ "level": "Zoomstufe",+ "selectRegion": "Zoombereich zum Anpassen auswählen",+ "deleteZoom": "Zoom löschen",+ "modeAuto": "Automatisch",+ "modeManual": "Manuell","modeManualDescription": "Legen Sie einen festen Fokuspunkt für diesen Zoom fest",- "modeAutoDescription": "Die Kamera zentriert sich neu, wenn sich der Cursor dem Rand der gezoomten Ansicht nähert"- },- "trim": {- "deleteRegion": "Trimmbereich löschen"- },+ "modeAutoDescription": "Die Kamera zentriert sich neu, wenn sich der Cursor dem Rand der gezoomten Ansicht nähert"+ },+ "trim": {+ "deleteRegion": "Trimmbereich löschen"+ },"speed": {- "playbackSpeed": "Wiedergabegeschwindigkeit",- "selectRegion": "Wähle einen Geschwindigkeitsbereich zum Anpassen aus",- "deleteRegion": "Geschwindigkeitsbereich löschen",- "label": "Geschwindigkeit"- },- "clip": {+ "playbackSpeed": "Wiedergabegeschwindigkeit",+ "selectRegion": "Wähle einen Geschwindigkeitsbereich zum Anpassen aus",+ "deleteRegion": "Geschwindigkeitsbereich löschen",+ "label": "Geschwindigkeit"+ },+ "clip": {"title": "Clip",- "mute": "Stummschalten",- "mutedState": "Audio ist stummgeschaltet",- "unmutedState": "Audio wird wiedergegeben",- "separateClipFromAudio": "Clip vom Audio trennen",- "delete": "Clip löschen"- },+ "mute": "Stummschalten",+ "mutedState": "Audio ist stummgeschaltet",+ "unmutedState": "Audio wird wiedergegeben",+ "separateClipFromAudio": "Clip vom Audio trennen",+ "delete": "Clip löschen"+ },"effects": {- "title": "Videoeffekte",- "show": "Anzeigen",- "showCursor": "Cursor anzeigen",- "loopCursor": "Cursor wiederholen",- "cursorStyle": "Cursorstil",+ "title": "Videoeffekte",+ "show": "Anzeigen",+ "showCursor": "Cursor anzeigen",+ "loopCursor": "Cursor wiederholen",+ "cursorStyle": "Cursorstil","cursorStyleOptions": {- "macos": "macOS",- "tahoe": "Tahoe",- "tahoe-inverted": "Tahoe invertiert",- "dot": "Punkt",- "figma": "Minimal",+ "macos": "macOS",+ "tahoe": "Tahoe",+ "tahoe-inverted": "Tahoe invertiert",+ "dot": "Punkt",+ "figma": "Minimal","lavender": "Lavender",- "parched": "Parched",- "chooper": "Chooper",- "amongus": "Among Us",- "turtle": "Turtle"- },+ "parched": "Parched",+ "chooper": "Chooper",+ "amongus": "Among Us",+ "turtle": "Turtle"+ },"backgroundBlur": "Unschärfe",- "zoomMotionBlur": "Zoom-Bewegungsunschärfe",- "temporalZoomMotionBlur": "Zeitliche Zoom-Bewegungsunschärfe",- "temporalZoomMotionBlurDescription": "Steuert das Verschlussfenster und die Bildausschnitte, die vom neueren Zoom-Bewegungsunschärfe-Durchlauf verwendet werden.",+ "zoomMotionBlur": "Zoom-Bewegungsunschärfe",+ "temporalZoomMotionBlur": "Zeitliche Zoom-Bewegungsunschärfe",+ "temporalZoomMotionBlurDescription": "Steuert das Verschlussfenster und die Bildausschnitte, die vom neueren Zoom-Bewegungsunschärfe-Durchlauf verwendet werden.","zoomMotionBlurSamples": "Unschärfe-Samples",- "zoomMotionBlurShutter": "Verschluss",- "auto": "Auto",- "connectZooms": "Zooms verbinden",- "connectZoomsDescription": "Füge aufeinanderfolgende Zoom-Bereiche zu einer kontinuierlichen Kamerabewegung zusammen.",+ "zoomMotionBlurShutter": "Verschluss",+ "auto": "Auto",+ "connectZooms": "Zooms verbinden",+ "connectZoomsDescription": "Füge aufeinanderfolgende Zoom-Bereiche zu einer kontinuierlichen Kamerabewegung zusammen.","autoApplyFreshRecordingZooms": "Neue Aufzeichnungszooms automatisch anwenden",- "autoApplyFreshRecordingZoomsDescription": "Schlägt beim Öffnen einer neuen Aufzeichnung automatisch Zooms zur Randzentrierung vor.",- "zoomGeneralTitle": "Allgemein",- "zoomGeneralDescription": "Globale Bewegungseinstellungen für jeden Zoomübergang.",+ "autoApplyFreshRecordingZoomsDescription": "Schlägt beim Öffnen einer neuen Aufzeichnung automatisch Zooms zur Randzentrierung vor.",+ "zoomGeneralTitle": "Allgemein",+ "zoomGeneralDescription": "Globale Bewegungseinstellungen für jeden Zoomübergang.","zoomInTitle": "Vergrößern",- "zoomInDescription": "Steuern Sie, wie die Kamera in einen Zoom-Bereich einzoomt.",- "zoomOutTitle": "Verkleinern",- "zoomOutDescription": "Steuern Sie, wie die Kamera aus einem Zoom-Bereich herauszoomt.",+ "zoomInDescription": "Steuern Sie, wie die Kamera in einen Zoom-Bereich einzoomt.",+ "zoomOutTitle": "Verkleinern",+ "zoomOutDescription": "Steuern Sie, wie die Kamera aus einem Zoom-Bereich herauszoomt.","connectedZoomTitle": "Zwischen Zooms",- "connectedZoomDescription": "Passen Sie den Übergang zwischen aufeinanderfolgenden Zoom-Bereichen an, wenn die Verbindung aktiviert ist.",- "motionPresetsTitle": "Bewegungsvoreinstellungen",- "motionPresetsZoomHint": "Zoom-Bewegungsvoreinstellungen sind in den Einstellungen verfügbar.",- "animationPresets": "Animationsvoreinstellungen",+ "connectedZoomDescription": "Passen Sie den Übergang zwischen aufeinanderfolgenden Zoom-Bereichen an, wenn die Verbindung aktiviert ist.",+ "motionPresetsTitle": "Bewegungsvoreinstellungen",+ "motionPresetsZoomHint": "Zoom-Bewegungsvoreinstellungen sind in den Einstellungen verfügbar.",+ "animationPresets": "Animationsvoreinstellungen","cursorMotionPresets": "Cursor-Bewegungsvoreinstellungen",- "motionPresets": {- "focused": {- "label": "Fokussiert",- "description": "Schnellere Bewegung für Demos, Walkthroughs und alltägliche Aufnahmen."- },+ "motionPresets": {+ "focused": {+ "label": "Fokussiert",+ "description": "Schnellere Bewegung für Demos, Walkthroughs und alltägliche Aufnahmen."+ },"smooth": {- "label": "Sanft",- "description": "Sanftere Bewegung für Präsentationen, Keynote-artige Videos und ausgefeilte Enthüllungen."- }- },- "zoomInDuration": "Dauer des Heranzoomens",- "zoomInOverlap": "Überlappung beim Heranzoomen",+ "label": "Sanft",+ "description": "Sanftere Bewegung für Präsentationen, Keynote-artige Videos und ausgefeilte Enthüllungen."+ }+ },+ "zoomInDuration": "Dauer des Heranzoomens",+ "zoomInOverlap": "Überlappung beim Heranzoomen","zoomOutDuration": "Zoom-Out-Dauer",- "zoomInEasing": "Zoom-In-Kurve",- "zoomOutEasing": "Zoom-Out-Kurve",- "connectedZoomGap": "Lücke bei verbundenem Zoom",- "connectedZoomDuration": "Dauer bei verbundenem Zoom",+ "zoomInEasing": "Zoom-In-Kurve",+ "zoomOutEasing": "Zoom-Out-Kurve",+ "connectedZoomGap": "Lücke bei verbundenem Zoom",+ "connectedZoomDuration": "Dauer bei verbundenem Zoom","connectedZoomEasing": "Kurve für verbundenen Schwenk",- "zoomEasingOptions": {- "recordly": "Recordly",- "glide": "Glide",- "smooth": "Smooth",- "snappy": "Snappy",+ "zoomEasingOptions": {+ "recordly": "Recordly",+ "glide": "Glide",+ "smooth": "Smooth",+ "snappy": "Snappy","linear": "Linear"- },- "cursorSize": "Cursorgröße",- "cursorSmoothing": "Cursor-Glättung",- "cursorSpringStiffness": "Cursor-Federkonstante",+ },+ "cursorSize": "Cursorgröße",+ "cursorSmoothing": "Cursor-Glättung",+ "cursorSpringStiffness": "Cursor-Federkonstante","cursorSpringDamping": "Cursor-Federdämpfung",- "cursorSpringMass": "Cursor-Federmasse",- "off": "Aus",+ "cursorSpringMass": "Cursor-Federmasse",+ "off": "Aus","cursorClickEffects": {"title": "Klick-Effekte","advanced": "Erweitert",@@ -123,49 +123,49 @@"description": "Ein Paar sanfter Ringe, die sich mit einem klareren Impuls nach außen ausbreiten."}},- "cursorMotionBlur": "Cursor-Bewegungsunschärfe",- "cursorClickBounce": "Cursor-Klick-Rückprall",+ "cursorMotionBlur": "Cursor-Bewegungsunschärfe",+ "cursorClickBounce": "Cursor-Klick-Rückprall","cursorClickBounceDuration": "Sprunggeschwindigkeit",- "cursorSway": "Cursor-Schwankung",- "webcam": "Webcam-Overlay",- "webcamFootage": "Webcam-Aufnahmen",- "webcamFootageDescription": "Zu diesem Video sind keine Webcam-Aufnahmen verknüpft",+ "cursorSway": "Cursor-Schwankung",+ "webcam": "Webcam-Overlay",+ "webcamFootage": "Webcam-Aufnahmen",+ "webcamFootageDescription": "Zu diesem Video sind keine Webcam-Aufnahmen verknüpft","uploadWebcamFootage": "Aufnahmen hochladen",- "replaceWebcamFootage": "Aufnahmen ersetzen",- "removeWebcamFootage": "Aufnahmen entfernen",+ "replaceWebcamFootage": "Aufnahmen ersetzen",+ "removeWebcamFootage": "Aufnahmen entfernen","webcamFootageAdded": "Webcam-Aufnahmen verknüpft",- "webcamFootageRemoved": "Webcam-Aufnahmen entfernt",+ "webcamFootageRemoved": "Webcam-Aufnahmen entfernt","webcamSize": "Webcam-Größe","webcamWidth": "Webcam-Breite","webcamHeight": "Webcam-Höhe",- "webcamCrop": "Webcam zuschneiden",- "webcamReactToZoom": "Webcam reagiert auf Zoom",- "webcamMirror": "Webcam spiegeln",- "webcamRoundness": "Webcam-Rundung",+ "webcamCrop": "Webcam zuschneiden",+ "webcamReactToZoom": "Webcam reagiert auf Zoom",+ "webcamMirror": "Webcam spiegeln",+ "webcamRoundness": "Webcam-Rundung","webcamShadow": "Webcam-Schatten",- "shadow": "Schatten",- "radius": "Radius",- "roundness": "Rundung",- "padding": "Abstand",- "paddingLinked": "Verknüpft (gleichmäßig)",+ "shadow": "Schatten",+ "radius": "Radius",+ "roundness": "Rundung",+ "padding": "Abstand",+ "paddingLinked": "Verknüpft (gleichmäßig)","paddingUnlinked": "Unverknüpft (asymmetrisch)",- "paddingTop": "Oben",- "paddingBottom": "Unten",- "paddingLeft": "Links",- "paddingRight": "Rechts",- "removeBackground": "Hintergrund entfernen"- },+ "paddingTop": "Oben",+ "paddingBottom": "Unten",+ "paddingLeft": "Links",+ "paddingRight": "Rechts",+ "removeBackground": "Hintergrund entfernen"+ },"sections": {- "scene": "Szene",- "captions": "Untertitel",+ "scene": "Szene",+ "captions": "Untertitel","caption": "Untertitel",- "zoom": "Zoom",- "cursor": "Cursor",- "webcam": "Webcam",- "frame": "Bild",+ "zoom": "Zoom",+ "cursor": "Cursor",+ "webcam": "Webcam",+ "frame": "Bild","crop": "Zuschneiden"- },- "captions": {+ },+ "captions": {"selectOnTimeline": "Wählen Sie einen Untertitel auf der Zeitleiste aus, um ihn zu bearbeiten.","enabled": "Anzeigen","timelineQuickAdd": "Mit der Maus darüberfahren, um zur Zeitleiste hinzuzufügen",@@ -180,18 +180,18 @@"clearFull": "Untertitel entfernen","fontSettings": "Schriftart-Einstellungen","defaultFont": "Standard",- "fontFamily": "Schriftart",- "fontSize": "Schriftgröße",+ "fontFamily": "Schriftart",+ "fontSize": "Schriftgröße","rowCount": "Zeilen",- "animation": "Animation",- "animationOff": "Aus",- "animationFade": "Einblenden",+ "animation": "Animation",+ "animationOff": "Aus",+ "animationFade": "Einblenden","animationRise": "Aufsteigen",- "animationPop": "Aufspringen",- "bottomOffset": "Versatz unten",- "maxWidth": "Maximale Breite",- "boxRadius": "Radius der Box",- "backgroundOpacity": "Hintergrundtransparenz",+ "animationPop": "Aufspringen",+ "bottomOffset": "Versatz unten",+ "maxWidth": "Maximale Breite",+ "boxRadius": "Radius der Box",+ "backgroundOpacity": "Hintergrundtransparenz","textColor": "Textfarbe","editor": {"text": "Text",@@ -202,57 +202,57 @@"delete": "Löschen"}},- "crop": {- "title": "Video zuschneiden",- "instruction": "Ziehe an jeder Seite, um den Zuschneidebereich anzupassen",- "top": "Oben",- "bottom": "Unten",- "left": "Links",+ "crop": {+ "title": "Video zuschneiden",+ "instruction": "Ziehe an jeder Seite, um den Zuschneidebereich anzupassen",+ "top": "Oben",+ "bottom": "Unten",+ "left": "Links","right": "Rechts",- "openEditor": "Zuschneide-Editor öffnen"- },- "background": {- "title": "Hintergrund",- "image": "Bild",- "color": "Farbe",- "gradient": "Farbverlauf",+ "openEditor": "Zuschneide-Editor öffnen"+ },+ "background": {+ "title": "Hintergrund",+ "image": "Bild",+ "color": "Farbe",+ "gradient": "Farbverlauf","wallpaperPreview": "Vorschau des Hintergrundbildes",- "uploadCustom": "Benutzerdefiniertes Bild hochladen",- "uploadSuccess": "Benutzerdefiniertes Bild erfolgreich hochgeladen!",- "uploadError": "Bitte lade eine JPG- oder JPEG-Bilddatei hoch.",- "uploadErrorDescription": "Es werden nur JPG- und JPEG-Bilder unterstützt."- } ,- "export": {- "title": "Exportieren",- "mp4": "MP4",- "gif": "GIF",- "quality": {- "low": "Niedrig",- "medium": "Mittel",+ "uploadCustom": "Benutzerdefiniertes Bild hochladen",+ "uploadSuccess": "Benutzerdefiniertes Bild erfolgreich hochgeladen!",+ "uploadError": "Bitte lade eine JPG- oder JPEG-Bilddatei hoch.",+ "uploadErrorDescription": "Es werden nur JPG- und JPEG-Bilder unterstützt."+ },+ "export": {+ "title": "Exportieren",+ "mp4": "MP4",+ "gif": "GIF",+ "quality": {+ "low": "Niedrig",+ "medium": "Mittel","high": "Hoch",- "original": "Original"- },- "fpsTitle": "FPS",- "loop": "Wiederholen",- "outputDimensions": "Ausgabe: {{dimensions}}px",- "sizePresetOriginalShort": "Orig",+ "original": "Original"+ },+ "fpsTitle": "FPS",+ "loop": "Wiederholen",+ "outputDimensions": "Ausgabe: {{dimensions}}px",+ "sizePresetOriginalShort": "Orig","sizePresetMediumShort": "Med",- "sizePresetLargeShort": "Lar",- "loadProject": "Projekt laden",- "saveProject": "Projekt speichern",+ "sizePresetLargeShort": "Lar",+ "loadProject": "Projekt laden",+ "saveProject": "Projekt speichern","exportVideo": "{{format}} exportieren",- "reportBug": "Fehler melden",- "starOnGithub": "Auf GitHub markieren"- },- "audio": {- "title": "Audio",- "volumeTitle": "Audio",- "volume": "Lautstärke",+ "reportBug": "Fehler melden",+ "starOnGithub": "Auf GitHub markieren"+ },+ "audio": {+ "title": "Audio",+ "volumeTitle": "Audio",+ "volume": "Lautstärke","normalize": "Normalisieren",- "sourceTracksTitle": "Clip-Quellaudio",- "systemLabel": "Quellsystem",- "micLabel": "Quellmikrofon",- "mixedLabel": "Quelle",- "deleteRegion": "Audio löschen"- }+ "sourceTracksTitle": "Clip-Quellaudio",+ "systemLabel": "Quellsystem",+ "micLabel": "Quellmikrofon",+ "mixedLabel": "Quelle",+ "deleteRegion": "Audio löschen"+ }}diff --git a/src/i18n/locales/de/shortcuts.json b/src/i18n/locales/de/shortcuts.jsonindex aed2dcc7..fc00e5a5 100644--- a/src/i18n/locales/de/shortcuts.json+++ b/src/i18n/locales/de/shortcuts.json@@ -1,16 +1,16 @@{- "actions": {- "addZoom": "Zoom hinzufügen",- "addTrim": "Trimmen hinzufügen",- "addSpeed": "Geschwindigkeit hinzufügen",- "addAnnotation": "Anmerkung hinzufügen",+ "actions": {+ "addZoom": "Zoom hinzufügen",+ "addTrim": "Trimmen hinzufügen",+ "addSpeed": "Geschwindigkeit hinzufügen",+ "addAnnotation": "Anmerkung hinzufügen","addKeyframe": "Keyframe hinzufügen",- "deleteSelected": "Ausgewählte löschen",- "playPause": "Wiedergabe / Pause",+ "deleteSelected": "Ausgewählte löschen",+ "playPause": "Wiedergabe / Pause","cycleForward": "Anmerkungen vorwärts durchlaufen",- "cycleBackward": "Anmerkungen rückwärts durchlaufen",- "deleteSelectedAlt": "Ausgewählte löschen (Alt)",- "panTimeline": "Zeitleiste verschieben",- "zoomTimeline": "Zeitleiste zoomen"- }-}\ No newline at end of file+ "cycleBackward": "Anmerkungen rückwärts durchlaufen",+ "deleteSelectedAlt": "Ausgewählte löschen (Alt)",+ "panTimeline": "Zeitleiste verschieben",+ "zoomTimeline": "Zeitleiste zoomen"+ }+}diff --git a/src/i18n/locales/de/timeline.json b/src/i18n/locales/de/timeline.jsonindex 493e3be9..6e916dfc 100644--- a/src/i18n/locales/de/timeline.json+++ b/src/i18n/locales/de/timeline.json@@ -1,41 +1,41 @@{- "zoom": {- "cannotPlace": "Zoom kann hier nicht platziert werden",- "existsOrNoSpace": "Zoom existiert bereits an dieser Stelle oder es ist nicht genügend Platz verfügbar.",- "suggestHandlerUnavailable": "Zoom-Vorschlags-Handler nicht verfügbar",+ "zoom": {+ "cannotPlace": "Zoom kann hier nicht platziert werden",+ "existsOrNoSpace": "Zoom existiert bereits an dieser Stelle oder es ist nicht genügend Platz verfügbar.",+ "suggestHandlerUnavailable": "Zoom-Vorschlags-Handler nicht verfügbar","noTelemetry": "Keine Cursor-Telemetrie verfügbar",- "recordFirst": "Nehmen Sie zuerst einen Screencast auf, um cursorbasierte Vorschläge zu generieren.",- "noUsableTelemetry": "Keine verwertbare Cursor-Telemetrie",- "notEnoughMovement": "Die Aufnahme enthält nicht genügend Daten zur Cursorbewegung.",+ "recordFirst": "Nehmen Sie zuerst einen Screencast auf, um cursorbasierte Vorschläge zu generieren.",+ "noUsableTelemetry": "Keine verwertbare Cursor-Telemetrie",+ "notEnoughMovement": "Die Aufnahme enthält nicht genügend Daten zur Cursorbewegung.","noInteractionMoments": "Keine eindeutigen Interaktionsmomente gefunden",- "tryRecording": "Versuchen Sie eine Aufnahme mit Pausen oder Klicks an wichtigen Stellen.",- "noAutoZoomSlots": "Keine Auto-Zoom-Slots verfügbar",- "dwellPointsOverlap": "Erkannte Verweildauerpunkte überschneiden sich mit bestehenden Zoom-Bereichen.",+ "tryRecording": "Versuchen Sie eine Aufnahme mit Pausen oder Klicks an wichtigen Stellen.",+ "noAutoZoomSlots": "Keine Auto-Zoom-Slots verfügbar",+ "dwellPointsOverlap": "Erkannte Verweildauerpunkte überschneiden sich mit bestehenden Zoom-Bereichen.","addedSuggestions": "{{count}} interaktionsbasierte Zoomvorschläge hinzugefügt",- "label": "Zoom {{index}}",- "addZoom": "Zoom hinzufügen (Z)",- "suggestZooms": "Zooms vom Cursor vorschlagen"- },- "trim": {+ "label": "Zoom {{index}}",+ "addZoom": "Zoom hinzufügen (Z)",+ "suggestZooms": "Zooms vom Cursor vorschlagen"+ },+ "trim": {"cannotPlace": "Trim kann hier nicht platziert werden",- "existsOrNoSpace": "Trim existiert bereits an dieser Stelle oder es ist nicht genügend Platz verfügbar.",- "label": "Trim {{index}}",- "addTrim": "Trim hinzufügen (T)"- },- "speed": {+ "existsOrNoSpace": "Trim existiert bereits an dieser Stelle oder es ist nicht genügend Platz verfügbar.",+ "label": "Trim {{index}}",+ "addTrim": "Trim hinzufügen (T)"+ },+ "speed": {"cannotPlace": "Geschwindigkeit kann hier nicht platziert werden",- "existsOrNoSpace": "Geschwindigkeitsbereich existiert bereits an dieser Stelle oder es ist nicht genügend Platz verfügbar.",- "label": "Geschwindigkeit"- },- "annotation": {- "label": "Anmerkung",- "image": "Bild",+ "existsOrNoSpace": "Geschwindigkeitsbereich existiert bereits an dieser Stelle oder es ist nicht genügend Platz verfügbar.",+ "label": "Geschwindigkeit"+ },+ "annotation": {+ "label": "Anmerkung",+ "image": "Bild","addAnnotation": "Anmerkung hinzufügen (A)"- },- "audio": {- "label": "Audio"- },- "addSpeed": "Geschwindigkeit hinzufügen (S)",- "resizeLeft": "Größe links anpassen",- "resizeRight": "Größe rechts anpassen"-}\ No newline at end of file+ },+ "audio": {+ "label": "Audio"+ },+ "addSpeed": "Geschwindigkeit hinzufügen (S)",+ "resizeLeft": "Größe links anpassen",+ "resizeRight": "Größe rechts anpassen"+}diff --git a/src/i18n/locales/en/extensions.json b/src/i18n/locales/en/extensions.jsonindex b1be4045..e1556777 100644--- a/src/i18n/locales/en/extensions.json+++ b/src/i18n/locales/en/extensions.json@@ -57,4 +57,4 @@"marketplaceInstallFailed": "Failed to install {{name}}","enableFailed": "Failed to enable extension"}-}\ No newline at end of file+}diff --git a/src/i18n/locales/pt-BR/extensions.json b/src/i18n/locales/pt-BR/extensions.jsonindex 4f5dcbba..f7d8abc4 100644--- a/src/i18n/locales/pt-BR/extensions.json+++ b/src/i18n/locales/pt-BR/extensions.json@@ -57,4 +57,4 @@"marketplaceInstallFailed": "Falha ao instalar {{name}}","enableFailed": "Falha ao ativar extensão"}-}\ No newline at end of file+}diff --git a/src/i18n/locales/ru/common.json b/src/i18n/locales/ru/common.jsonindex 3946d72b..8ea45bfb 100644--- a/src/i18n/locales/ru/common.json+++ b/src/i18n/locales/ru/common.json@@ -23,4 +23,4 @@"failedToUploadImage": "Не удалось загрузить изображение","fileReadError": "Произошла ошибка при чтении файла."}-}\ No newline at end of file+}diff --git a/src/i18n/locales/ru/dialogs.json b/src/i18n/locales/ru/dialogs.jsonindex da6ed8ee..bb5c7512 100644--- a/src/i18n/locales/ru/dialogs.json+++ b/src/i18n/locales/ru/dialogs.json@@ -59,4 +59,4 @@"cancel": "Отмена","save": "Сохранить"}-}\ No newline at end of file+}diff --git a/src/i18n/locales/ru/editor.json b/src/i18n/locales/ru/editor.jsonindex 673f27ee..36751cc9 100644--- a/src/i18n/locales/ru/editor.json+++ b/src/i18n/locales/ru/editor.json@@ -139,4 +139,4 @@"collapse": "Свернуть таймлайн"},"openRecordingsFolder": "Открыть папку с записями"-}\ No newline at end of file+}diff --git a/src/i18n/locales/ru/extensions.json b/src/i18n/locales/ru/extensions.jsonindex 239fa9a3..984d4dc0 100644--- a/src/i18n/locales/ru/extensions.json+++ b/src/i18n/locales/ru/extensions.json@@ -57,4 +57,4 @@"marketplaceInstallFailed": "Не удалось установить {{name}}","enableFailed": "Не удалось включить расширение"}-}\ No newline at end of file+}diff --git a/src/i18n/locales/ru/launch.json b/src/i18n/locales/ru/launch.jsonindex 65bd57b8..f341464c 100644--- a/src/i18n/locales/ru/launch.json+++ b/src/i18n/locales/ru/launch.json@@ -77,4 +77,4 @@"failedToStart": "Не удалось начать запись: {{error}}","failedToStartGeneric": "Не удалось начать запись"}-}\ No newline at end of file+}diff --git a/src/i18n/locales/ru/shortcuts.json b/src/i18n/locales/ru/shortcuts.jsonindex 9898e48c..3e54412b 100644--- a/src/i18n/locales/ru/shortcuts.json+++ b/src/i18n/locales/ru/shortcuts.json@@ -13,4 +13,4 @@"panTimeline": "Прокрутка таймлайна","zoomTimeline": "Масштабирование таймлайна"}-}\ No newline at end of file+}diff --git a/src/i18n/locales/ru/timeline.json b/src/i18n/locales/ru/timeline.jsonindex 8c1d2b77..5b89d466 100644--- a/src/i18n/locales/ru/timeline.json+++ b/src/i18n/locales/ru/timeline.json@@ -38,4 +38,4 @@"addSpeed": "Скорость (S)","resizeLeft": "Изменить размер слева","resizeRight": "Изменить размер справа"-}\ No newline at end of file+}diff --git a/src/i18n/locales/zh-TW/common.json b/src/i18n/locales/zh-TW/common.jsonindex c5fa86d1..f6539852 100644--- a/src/i18n/locales/zh-TW/common.json+++ b/src/i18n/locales/zh-TW/common.json@@ -23,4 +23,4 @@"failedToUploadImage": "上傳圖片失敗","fileReadError": "讀取檔案時出錯。"}-}\ No newline at end of file+}diff --git a/src/i18n/locales/zh-TW/dialogs.json b/src/i18n/locales/zh-TW/dialogs.jsonindex 828b70ee..921299df 100644--- a/src/i18n/locales/zh-TW/dialogs.json+++ b/src/i18n/locales/zh-TW/dialogs.json@@ -59,4 +59,4 @@"cancel": "取消","save": "儲存"}-}\ No newline at end of file+}diff --git a/src/i18n/locales/zh-TW/extensions.json b/src/i18n/locales/zh-TW/extensions.jsonindex ae44234c..cd85f835 100644--- a/src/i18n/locales/zh-TW/extensions.json+++ b/src/i18n/locales/zh-TW/extensions.json@@ -56,5 +56,5 @@"marketplaceInstalled": "已安裝並啟用 {{name}}","marketplaceInstallFailed": "安裝 {{name}} 失敗","enableFailed": "啟用擴充功能失敗"- }}+}diff --git a/src/i18n/locales/zh-TW/launch.json b/src/i18n/locales/zh-TW/launch.jsonindex 12ec494d..9d70eedc 100644--- a/src/i18n/locales/zh-TW/launch.json+++ b/src/i18n/locales/zh-TW/launch.json@@ -44,15 +44,15 @@"cancel": "取消","more": "更多","update": {- "update": "更新",- "updated": "已更新",- "idleTitle": "檢查更新。",- "checkingTitle": "正在檢查更新...",- "downloadingTitle": "正在下載更新...",- "errorTitle": "檢查更新失敗,點一下重試。",- "upToDateTitle": "Recordly {{version}} 已是最新版本。",- "availableTitle": "Recordly {{version}} 已推出新版本。",- "availableGenericTitle": "有可用更新。"+ "update": "更新",+ "updated": "已更新",+ "idleTitle": "檢查更新。",+ "checkingTitle": "正在檢查更新...",+ "downloadingTitle": "正在下載更新...",+ "errorTitle": "檢查更新失敗,點一下重試。",+ "upToDateTitle": "Recordly {{version}} 已是最新版本。",+ "availableTitle": "Recordly {{version}} 已推出新版本。",+ "availableGenericTitle": "有可用更新。"}},"sourceSelector": {diff --git a/src/i18n/locales/zh-TW/shortcuts.json b/src/i18n/locales/zh-TW/shortcuts.jsonindex 8b1b3193..ea0b8a38 100644--- a/src/i18n/locales/zh-TW/shortcuts.json+++ b/src/i18n/locales/zh-TW/shortcuts.json@@ -13,4 +13,4 @@"panTimeline": "平移時間軸","zoomTimeline": "縮放時間軸"}-}\ No newline at end of file+}diff --git a/src/i18n/locales/zh-TW/timeline.json b/src/i18n/locales/zh-TW/timeline.jsonindex 714fd29a..0ddf65de 100644--- a/src/i18n/locales/zh-TW/timeline.json+++ b/src/i18n/locales/zh-TW/timeline.json@@ -38,4 +38,4 @@"addSpeed": "新增速度(S)","resizeLeft": "向左調整大小","resizeRight": "向右調整大小"-}\ No newline at end of file+}diff --git a/src/lib/exporter/annotationRenderer.ts b/src/lib/exporter/annotationRenderer.tsindex 773803fb..d6c6ce99 100644--- a/src/lib/exporter/annotationRenderer.ts+++ b/src/lib/exporter/annotationRenderer.ts@@ -371,7 +371,12 @@ export async function renderAnnotations();const sortedAnnotations = [...activeAnnotations].sort((a, b) => a.zIndex - b.zIndex);- const annotationRect = coordinateRect ?? { x: 0, y: 0, width: canvasWidth, height: canvasHeight };+ const annotationRect = coordinateRect ?? {+ x: 0,+ y: 0,+ width: canvasWidth,+ height: canvasHeight,+ };for (const annotation of sortedAnnotations) {const rect = transformAnnotationRect(diff --git a/src/lib/exporter/audioRoutingEngine.ts b/src/lib/exporter/audioRoutingEngine.tsindex 3fc3285f..8f9c7421 100644--- a/src/lib/exporter/audioRoutingEngine.ts+++ b/src/lib/exporter/audioRoutingEngine.ts@@ -69,7 +69,9 @@ export function buildResolvedAudioPlan(input: {if (!hasDedicatedTracks && pathsByTrack.mixed) playbackPaths.push(pathsByTrack.mixed);const includeEmbeddedInExport = !pathsByTrack.system && !pathsByTrack.mixed;- const resolvedRegions = (input.audioRegions ?? []).slice().sort((a, b) => a.startMs - b.startMs);+ const resolvedRegions = (input.audioRegions ?? [])+ .slice()+ .sort((a, b) => a.startMs - b.startMs);const tracks: ResolvedAudioTrack[] = resolvedRegions.map((region) => ({id: `user:${region.id}`,kind: "user",diff --git a/src/lib/exporter/mediaResource.test.ts b/src/lib/exporter/mediaResource.test.tsindex 48161745..5d79c8a0 100644--- a/src/lib/exporter/mediaResource.test.ts+++ b/src/lib/exporter/mediaResource.test.ts@@ -31,4 +31,4 @@ describe("getResourceFileName", () => {),).toBe("example video.mp4");});-});\ No newline at end of file+});diff --git a/src/lib/exporter/mediaResource.ts b/src/lib/exporter/mediaResource.tsindex 83e385eb..2f689dca 100644--- a/src/lib/exporter/mediaResource.ts+++ b/src/lib/exporter/mediaResource.ts@@ -108,4 +108,4 @@ export function getResourceFileName(resource: string, fallback: string): string}return fallback;-}\ No newline at end of file+}diff --git a/src/lib/exporter/modernFrameRenderer.test.ts b/src/lib/exporter/modernFrameRenderer.test.tsindex 612a5898..dd820c81 100644--- a/src/lib/exporter/modernFrameRenderer.test.ts+++ b/src/lib/exporter/modernFrameRenderer.test.ts@@ -218,7 +218,9 @@ describe("ModernFrameRenderer Pixi lifecycle", () => {};renderer.config.preferredRenderBackend = "webgpu";- await expect(renderer.createPixiApplication({} as HTMLCanvasElement)).resolves.toMatchObject({+ await expect(+ renderer.createPixiApplication({} as HTMLCanvasElement),+ ).resolves.toMatchObject({backend: "webgl",});@@ -639,14 +641,14 @@ describe("ModernFrameRenderer webcam export fallback", () => {};renderer.config.webcamUrl = "file:///tmp/webcam.webm";- await renderer.setupWebcamSource();- const syncPromise = renderer.syncWebcamFrame(1);+ await renderer.setupWebcamSource();+ const syncPromise = renderer.syncWebcamFrame(1);await vi.advanceTimersByTimeAsync(5_001);- await expect(syncPromise).resolves.toBeUndefined();+ await expect(syncPromise).resolves.toBeUndefined();- expect(cancelForwardFrameSourceMock).toHaveBeenCalled();- expect(destroyForwardFrameSourceMock).toHaveBeenCalled();+ expect(cancelForwardFrameSourceMock).toHaveBeenCalled();+ expect(destroyForwardFrameSourceMock).toHaveBeenCalled();expect(revoke).toHaveBeenCalled();expect(renderer.webcamForwardFrameSource).toBeNull();expect(renderer.webcamVideoElement).toBeNull();diff --git a/src/lib/exporter/sourceTrackRoutingPolicy.ts b/src/lib/exporter/sourceTrackRoutingPolicy.tsindex 05c9fa84..da1deb01 100644--- a/src/lib/exporter/sourceTrackRoutingPolicy.ts+++ b/src/lib/exporter/sourceTrackRoutingPolicy.ts@@ -1,7 +1,4 @@-import {- buildResolvedAudioPlan,- type SourceTrackId,-} from "./audioRoutingEngine";+import { buildResolvedAudioPlan, type SourceTrackId } from "./audioRoutingEngine";export interface SourceTrackRoutingPolicy {hasEmbeddedSourceAudio: boolean;diff --git a/src/lib/exporter/streamingDecoder.test.ts b/src/lib/exporter/streamingDecoder.test.tsindex 7de21b5b..394febec 100644--- a/src/lib/exporter/streamingDecoder.test.ts+++ b/src/lib/exporter/streamingDecoder.test.ts@@ -86,9 +86,7 @@ describe("StreamingVideoDecoder local media loading", () => {const decoder = new StreamingVideoDecoder();await decoder.loadMetadata("/tmp/capture.mp4");- expect(window.electronAPI.getLocalMediaUrl).toHaveBeenCalledWith(- "/tmp/capture.mp4",- );+ expect(window.electronAPI.getLocalMediaUrl).toHaveBeenCalledWith("/tmp/capture.mp4");expect(mockDemuxerLoad).toHaveBeenCalledWith("http://127.0.0.1:4321/video?path=%2Ftmp%2Fcapture.mp4",);diff --git a/src/lib/exporter/temporalMotionBlur.test.ts b/src/lib/exporter/temporalMotionBlur.test.tsindex 0ea1e30e..b2a37f31 100644--- a/src/lib/exporter/temporalMotionBlur.test.ts+++ b/src/lib/exporter/temporalMotionBlur.test.ts@@ -75,5 +75,4 @@ describe("temporalMotionBlur", () => {expect(centerSample?.weight ?? 0).toBeGreaterThan(edgeSample?.weight ?? 0);expect(plan.map((sample) => sample.offsetUs)).toContain(0);});-});diff --git a/src/lib/pixiApplicationLifecycle.ts b/src/lib/pixiApplicationLifecycle.tsindex 62a0f743..5abe48da 100644--- a/src/lib/pixiApplicationLifecycle.ts+++ b/src/lib/pixiApplicationLifecycle.ts@@ -87,7 +87,9 @@ export async function initializePixiApplicationWithTimeout(const timeoutPromise = new Promise<never>((_, reject) => {timeoutId = setTimeout(() => {reject(- new Error(`Initialization timed out after ${timeoutMs}ms for ${backendLabel} renderer`),+ new Error(+ `Initialization timed out after ${timeoutMs}ms for ${backendLabel} renderer`,+ ),);}, timeoutMs);});diff --git a/src/lib/wallpapers.ts b/src/lib/wallpapers.tsindex 1bddc410..fc6e39e5 100644--- a/src/lib/wallpapers.ts+++ b/src/lib/wallpapers.ts@@ -113,7 +113,10 @@ function toWallpaperLabel(fileName: string) {.replace(/\b\w/g, (match) => match.toUpperCase());}-function createWallpaperEntry(fileName: string, label = toWallpaperLabel(fileName)): BuiltInWallpaper {+function createWallpaperEntry(+ fileName: string,+ label = toWallpaperLabel(fileName),+): BuiltInWallpaper {const encodedFileName = encodeURIComponent(fileName);return {id: toWallpaperId(fileName) || `wallpaper-${encodedFileName.toLowerCase()}`,