Open source Loom alternative. Beautiful, shareable screen recordings.
Rust appcapcossloommacnextjsnextjs15open-sourceossreactrecordrustscreen-capturescreen-recorderscreenshotsolidjstauritauri-apptypescriptvite
formatting + change Intel to Mac Intel for download button
ameer24684fe2afbc7af5
diff --git a/apps/desktop/src/components/CropAreaRenderer.tsx b/apps/desktop/src/components/CropAreaRenderer.tsxindex 38f23b211..bc55567a1 100644--- a/apps/desktop/src/components/CropAreaRenderer.tsx+++ b/apps/desktop/src/components/CropAreaRenderer.tsx@@ -30,8 +30,8 @@ function drawHandles({ctx.strokeStyle = selected? "rgba(255, 255, 255, 1)": highlighted- ? "rgba(60, 150, 280, 1)"- : "rgba(255, 255, 255, 0.8)";+ ? "rgba(60, 150, 280, 1)"+ : "rgba(255, 255, 255, 0.8)";ctx.lineWidth = 1;ctx.beginPath();@@ -94,11 +94,11 @@ function drawHandles({// bottom centerctx.moveTo(centerX - handleLength / 2,- bounds.y + bounds.height + sideHandleDistance,+ bounds.y + bounds.height + sideHandleDistance);ctx.lineTo(centerX + handleLength / 2,- bounds.y + bounds.height + sideHandleDistance,+ bounds.y + bounds.height + sideHandleDistance);// left center@@ -108,11 +108,11 @@ function drawHandles({// right centerctx.moveTo(bounds.x + bounds.width + sideHandleDistance,- centerY - handleLength / 2,+ centerY - handleLength / 2);ctx.lineTo(bounds.x + bounds.width + sideHandleDistance,- centerY + handleLength / 2,+ centerY + handleLength / 2);ctx.stroke();@@ -171,7 +171,7 @@ function draw(showHandles: boolean,highlighted: boolean,selected: boolean,- prefersDark: boolean,+ prefersDark: boolean) {if (bounds.width <= 0 || bounds.height <= 0) return;const drawContext: DrawContext = {@@ -219,7 +219,7 @@ export default function CropAreaRenderer(borderRadius?: number;highlighted?: boolean;selected?: boolean;- }>,+ }>) {let canvasRef: HTMLCanvasElement | undefined;const [prefersDarkScheme, setPrefersDarkScheme] = createSignal(false);@@ -245,8 +245,8 @@ export default function CropAreaRenderer(props.handles || false,props.highlighted || false,props.selected || false,- prefersDarkScheme(),- ),+ prefersDarkScheme()+ ));const ctx = hidpiCanvas?.ctx;if (!ctx) return;@@ -256,7 +256,8 @@ export default function CropAreaRenderer(if (lastAnimationFrameId) cancelAnimationFrame(lastAnimationFrameId);const { x, y, width, height } = props.bounds;- const { guideLines, handles, borderRadius, highlighted, selected } = props;+ const { guideLines, handles, borderRadius, highlighted, selected } =+ props;const prefersDark = prefersDarkScheme();lastAnimationFrameId = requestAnimationFrame(() =>@@ -268,8 +269,8 @@ export default function CropAreaRenderer(handles || false,highlighted || false,selected || false,- prefersDark,- ),+ prefersDark+ ));});diff --git a/apps/desktop/src/components/Cropper.tsx b/apps/desktop/src/components/Cropper.tsxindex d6841a6d6..187454e93 100644--- a/apps/desktop/src/components/Cropper.tsx+++ b/apps/desktop/src/components/Cropper.tsx@@ -44,7 +44,12 @@ const HANDLES: HandleSide[] = [type Ratio = [number, number];const COMMON_RATIOS: Ratio[] = [- [1, 1], [4, 3], [3, 2], [16, 9], [2, 1], [21, 9]+ [1, 1],+ [4, 3],+ [3, 2],+ [16, 9],+ [2, 1],+ [21, 9],];const KEY_MAPPINGS = new Map([@@ -81,7 +86,7 @@ export function cropToFloor(value: Crop): Crop {export default function Cropper(props: ParentProps<{- class?: string,+ class?: string;onCropChange: (value: Crop) => void;value: Crop;mappedSize?: XY<number>;@@ -89,7 +94,7 @@ export default function Cropper(initialSize?: XY<number>;aspectRatio?: number;showGuideLines?: boolean;- }>,+ }>) {const crop = props.value;@@ -150,7 +155,7 @@ export default function Cropper(const box = Box.from({ x: (mapped.x - width) / 2, y: (mapped.y - height) / 2 },- { x: width, y: height },+ { x: width, y: height });box.constrainAll(box, containerSize(), ORIGIN_CENTER, props.aspectRatio);@@ -172,8 +177,8 @@ export default function Cropper(box.constrainToRatio(props.aspectRatio, ORIGIN_CENTER);box.constrainToBoundary(mappedSize().x, mappedSize().y, ORIGIN_CENTER);setCrop(box.toBounds());- },- ),+ }+ ));const [snapToRatioEnabled, setSnapToRatioEnabled] = makePersisted(@@ -216,7 +221,7 @@ export default function Cropper(box.move(clamp(box.x + dx, 0, mapped.x - box.width),- clamp(box.y + dy, 0, mapped.y - box.height),+ clamp(box.y + dy, 0, mapped.y - box.height));const newBox = box;@@ -244,7 +249,7 @@ export default function Cropper(box.resize(clamp(box.width * scale, minSize().x, mapped.x),clamp(box.height * scale, minSize().y, mapped.y),- ORIGIN_CENTER,+ ORIGIN_CENTER);box.constrainAll(box, mapped, ORIGIN_CENTER, props.aspectRatio);setTimeout(() => setGestureState("isTrackpadGesture", false), 100);@@ -257,7 +262,7 @@ export default function Cropper(box.move(clamp(box.x + dx, 0, mapped.x - box.width),- clamp(box.y + dy, 0, mapped.y - box.height),+ clamp(box.y + dy, 0, mapped.y - box.height));}@@ -307,7 +312,7 @@ export default function Cropper(let newWidth = clamp(gestureState.initialSize.width * scale,minSize().x,- mapped.x,+ mapped.x);let newHeight = newWidth / currentRatio;@@ -331,7 +336,7 @@ export default function Cropper(box.move(clamp(box.x + dx, 0, mapped.x - box.width),- clamp(box.y + dy, 0, mapped.y - box.height),+ clamp(box.y + dy, 0, mapped.y - box.height));}@@ -353,7 +358,7 @@ export default function Cropper(box.move(clamp(box.x + dx, 0, mapped.x - box.width),- clamp(box.y + dy, 0, mapped.y - box.height),+ clamp(box.y + dy, 0, mapped.y - box.height));}@@ -387,7 +392,7 @@ export default function Cropper(function findClosestRatio(width: number,height: number,- threshold = 0.01,+ threshold = 0.01): Ratio | null {if (props.aspectRatio) return null;const currentRatio = width / height;@@ -424,20 +429,22 @@ export default function Cropper(}),mousemove: (e) =>requestAnimationFrame(() =>- handleResizeMove(e.clientX, e.clientY, e.altKey),+ handleResizeMove(e.clientX, e.clientY, e.altKey)),});});- const [hapticsEnabled, hapticsEnabledOptions] = createResource(async () =>- (await generalSettingsStore.get())?.hapticsEnabled && ostype() === "macos"+ const [hapticsEnabled, hapticsEnabledOptions] = createResource(+ async () =>+ (await generalSettingsStore.get())?.hapticsEnabled &&+ ostype() === "macos");generalSettingsStore.listen(() => hapticsEnabledOptions.refetch());function handleResizeMove(moveX: number,moveY: number,- centerOrigin = false,+ centerOrigin = false) {const dx = (moveX - lastValidPos.x) / scaleFactors.x;const dy = (moveY - lastValidPos.y) / scaleFactors.y;@@ -448,23 +455,23 @@ export default function Cropper(let newWidth =dir.includes("e") || dir.includes("w")? clamp(- dir.includes("w")- ? currentBox.size.x - dx * scaleMultiplier- : currentBox.size.x + dx * scaleMultiplier,- minSize().x,- mapped.x,- )+ dir.includes("w")+ ? currentBox.size.x - dx * scaleMultiplier+ : currentBox.size.x + dx * scaleMultiplier,+ minSize().x,+ mapped.x+ ): currentBox.size.x;let newHeight =dir.includes("n") || dir.includes("s")? clamp(- dir.includes("n")- ? currentBox.size.y - dy * scaleMultiplier- : currentBox.size.y + dy * scaleMultiplier,- minSize().y,- mapped.y,- )+ dir.includes("n")+ ? currentBox.size.y - dy * scaleMultiplier+ : currentBox.size.y + dy * scaleMultiplier,+ minSize().y,+ mapped.y+ ): currentBox.size.y;const closest = findClosestRatio(newWidth, newHeight);@@ -490,7 +497,7 @@ export default function Cropper(box.constrainToRatio(props.aspectRatio,newOrigin,- dir.includes("n") || dir.includes("s") ? "width" : "height",+ dir.includes("n") || dir.includes("s") ? "width" : "height");}box.constrainToBoundary(mapped.x, mapped.y, newOrigin);@@ -552,7 +559,7 @@ export default function Cropper(? currentBox.size.x - moveDelta * scaleMultiplier: currentBox.size.x + moveDelta * scaleMultiplier,minSize().x,- mapped.x,+ mapped.x);}@@ -562,7 +569,7 @@ export default function Cropper(? currentBox.size.y - moveDelta * scaleMultiplier: currentBox.size.y + moveDelta * scaleMultiplier,minSize().y,- mapped.y,+ mapped.y);}@@ -576,7 +583,7 @@ export default function Cropper(box.move(clamp(box.x + dx, 0, mapped.x - box.width),- clamp(box.y + dy, 0, mapped.y - box.height),+ clamp(box.y + dy, 0, mapped.y - box.height));}}@@ -613,8 +620,8 @@ export default function Cropper(action: () => {setSnapToRatioEnabled((v) => !v);},- } satisfies CheckMenuItemOptions- ]+ } satisfies CheckMenuItemOptions,+ ],});menu.popup();}}@@ -650,12 +657,12 @@ export default function Cropper(onEnter={(el, done) => {const animation = el.animate([- { opacity: 0, transform: 'translateY(-8px)' },- { opacity: 0.65, transform: 'translateY(0)' }+ { opacity: 0, transform: "translateY(-8px)" },+ { opacity: 0.65, transform: "translateY(0)" },],{duration: 100,- easing: 'ease-out',+ easing: "ease-out",});animation.finished.then(done);@@ -663,12 +670,12 @@ export default function Cropper(onExit={(el, done) => {const animation = el.animate([- { opacity: 0.65, transform: 'translateY(0)' },- { opacity: 0, transform: 'translateY(-8px)' }+ { opacity: 0.65, transform: "translateY(0)" },+ { opacity: 0, transform: "translateY(-8px)" },],{duration: 100,- easing: 'ease-in',+ easing: "ease-in",});animation.finished.then(done);@@ -693,13 +700,13 @@ export default function Cropper(...(handle.x === "l"? { left: "-12px" }: handle.x === "r"- ? { right: "-12px" }- : { left: "50%", transform: "translateX(-50%)" }),+ ? { right: "-12px" }+ : { left: "50%", transform: "translateX(-50%)" }),...(handle.y === "t"? { top: "-12px" }: handle.y === "b"- ? { bottom: "-12px" }- : { top: "50%", transform: "translateY(-50%)" }),+ ? { bottom: "-12px" }+ : { top: "50%", transform: "translateY(-50%)" }),cursor: dragging() ? "grabbing" : `${handle.cursor}-resize`,}}onMouseDown={(e) => {@@ -717,30 +724,30 @@ export default function Cropper(style={{...(handle.x === "l"? {- left: "0",- width: "16px",- transform: "translateX(-50%)",- }+ left: "0",+ width: "16px",+ transform: "translateX(-50%)",+ }: handle.x === "r"- ? {+ ? {right: "0",width: "16px",transform: "translateX(50%)",}- : {+ : {left: "0",right: "0",transform: "translateY(50%)",}),...(handle.y === "t"? {- top: "0",- height: "16px",- transform: "translateY(-50%)",- }+ top: "0",+ height: "16px",+ transform: "translateY(-50%)",+ }: handle.y === "b"- ? { bottom: "0", height: "16px" }- : { top: "0", bottom: "0" }),+ ? { bottom: "0", height: "16px" }+ : { top: "0", bottom: "0" }),cursor: `${handle.cursor}-resize`,}}onMouseDown={(e) => {diff --git a/apps/desktop/src/components/titlebar/controls/CaptionControlsWindows11.tsx b/apps/desktop/src/components/titlebar/controls/CaptionControlsWindows11.tsxindex acdd92e9e..5037f4e1a 100644--- a/apps/desktop/src/components/titlebar/controls/CaptionControlsWindows11.tsx+++ b/apps/desktop/src/components/titlebar/controls/CaptionControlsWindows11.tsx@@ -1,4 +1,12 @@-import { type ComponentProps, createSignal, type JSX, onCleanup, onMount, Show, splitProps } from "solid-js";+import {+ type ComponentProps,+ createSignal,+ type JSX,+ onCleanup,+ onMount,+ Show,+ splitProps,+} from "solid-js";import { WindowControlButton as ControlButton } from "./WindowControlButton";import { getCurrentWindow } from "@tauri-apps/api/window";import titlebarState from "~/utils/titlebar-state";@@ -11,7 +19,9 @@ export default function (props: ComponentProps<"div">) {let unlisten: () => void | undefined;onMount(async () => {- unlisten = await currentWindow.onFocusChanged(({ payload: focused }) => setFocus(focused));+ unlisten = await currentWindow.onFocusChanged(({ payload: focused }) =>+ setFocus(focused)+ );});onCleanup(() => unlisten?.());@@ -20,7 +30,9 @@ export default function (props: ComponentProps<"div">) {class={cx("h-full align-baseline cursor-default rounded-none select-none *:outline-none *:transition-all *:duration-200",local.class,- focused() ? "*:text-black-transparent-80" : "*:text-black-transparent-40"+ focused()+ ? "*:text-black-transparent-80"+ : "*:text-black-transparent-40")}{...otherProps}>@@ -30,7 +42,7 @@ export default function (props: ComponentProps<"div">) {class={cx("max-h-20 w-[46px] rounded-none bg-transparent","hover:bg-[#0000000D] dark:hover:bg-[#FFFFFF0D] active:bg-[#00000008] dark:active:bg-[#e9e9e908]",- "disabled:hover:bg-transparent dark:disabled:hover:bg-transparent disabled:text-black-transparent-40",+ "disabled:hover:bg-transparent dark:disabled:hover:bg-transparent disabled:text-black-transparent-40")}><icons.minimizeWin />@@ -48,7 +60,7 @@ export default function (props: ComponentProps<"div">) {class={cx("max-h-20 w-[46px] rounded-none bg-transparent","hover:bg-[#0000000D] dark:hover:bg-[#FFFFFF0D] active:bg-[#00000008] dark:active:bg-[#e9e9e908]",- "disabled:hover:bg-transparent dark:disabled:hover:bg-transparent disabled:text-black-transparent-40",+ "disabled:hover:bg-transparent dark:disabled:hover:bg-transparent disabled:text-black-transparent-40")}>{titlebarState.maximized ? (@@ -64,7 +76,7 @@ export default function (props: ComponentProps<"div">) {class={cx("max-h-20 w-[46px] rounded-none bg-transparent hover:text-gray-50","hover:bg-[#c42b1c] dark:hover:bg-[#c42b1c active:bg-[#c42b1c]/90 dark:active:bg-[#c42b1c]/90",- "disabled:hover:bg-transparent dark:disabled:hover:bg-transparent disabled:text-black-transparent-40",+ "disabled:hover:bg-transparent dark:disabled:hover:bg-transparent disabled:text-black-transparent-40")}><icons.closeWin />diff --git a/apps/desktop/src/routes/(window-chrome)/settings/screenshots.tsx b/apps/desktop/src/routes/(window-chrome)/settings/screenshots.tsxindex 9f491b31e..999ee12f1 100644--- a/apps/desktop/src/routes/(window-chrome)/settings/screenshots.tsx+++ b/apps/desktop/src/routes/(window-chrome)/settings/screenshots.tsx@@ -54,7 +54,9 @@ export default function Screenshots() {<Showwhen={fetchScreenshots.data && fetchScreenshots.data.length > 0}fallback={- <p class="text-center text-[--text-tertiary]">No screenshots found</p>+ <p class="text-center text-[--text-tertiary]">+ No screenshots found+ </p>}><For each={fetchScreenshots.data}>@@ -96,7 +98,9 @@ function ScreenshotItem(props: {onError={() => setImageExists(false)}/></Show>- <span class="text-[--text-primary]">{props.screenshot.prettyName.replace(".png", "")}</span>+ <span class="text-[--text-primary]">+ {props.screenshot.prettyName.replace(".png", "")}+ </span></div><div class="flex items-center"><buttondiff --git a/apps/desktop/src/routes/(window-chrome)/upgrade.tsx b/apps/desktop/src/routes/(window-chrome)/upgrade.tsxindex 92ef90115..ed7a32446 100644--- a/apps/desktop/src/routes/(window-chrome)/upgrade.tsx+++ b/apps/desktop/src/routes/(window-chrome)/upgrade.tsx@@ -72,7 +72,8 @@ export default function Page() {return (<divclass={`py-5 max-w-[700px] mx-auto relative ${- upgradeComplete() ? "h-full" : ""}`}+ upgradeComplete() ? "h-full" : ""+ }`}>{upgradeComplete() && (<div class="flex justify-center items-center h-full bg-gray-800 bg-opacity-75">@@ -161,8 +162,10 @@ export default function Page() {class={`pointer-events-none block h-4 w-4 rounded-full dark:bg-gray-500bg-gray-50 shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4data-[state=unchecked]:translate-x-0 border-2 ${- isAnnual() ? "border-blue-400 dark:border-[#3F75E0]" : "border-gray-300 dark:border-[--white-transparent-20]"- }`}+ isAnnual()+ ? "border-blue-400 dark:border-[#3F75E0]"+ : "border-gray-300 dark:border-[--white-transparent-20]"+ }`}/></button></div>diff --git a/apps/desktop/src/routes/capture-area.tsx b/apps/desktop/src/routes/capture-area.tsxindex 5982dd4c1..7ea7c762a 100644--- a/apps/desktop/src/routes/capture-area.tsx+++ b/apps/desktop/src/routes/capture-area.tsx@@ -1,6 +1,9 @@import { createSignal, onCleanup, onMount, Show } from "solid-js";import { createOptionsQuery } from "~/utils/queries";-import { getCurrentWebviewWindow, WebviewWindow } from "@tauri-apps/api/webviewWindow";+import {+ getCurrentWebviewWindow,+ WebviewWindow,+} from "@tauri-apps/api/webviewWindow";import Cropper from "~/components/Cropper";import { createStore } from "solid-js/store";import { type Crop } from "~/utils/tauri";@@ -13,9 +16,12 @@ export default function CaptureArea() {const { options, setOptions } = createOptionsQuery();const webview = getCurrentWebviewWindow();- const [state, setState] = makePersisted(createStore({- showGrid: true,- }), { name: "captureArea" });+ const [state, setState] = makePersisted(+ createStore({+ showGrid: true,+ }),+ { name: "captureArea" }+ );const setPendingState = (pending: boolean) =>webview.emitTo("main", "cap-window://capture-area/state/pending", pending);@@ -100,7 +106,11 @@ export default function CaptureArea() {<Tooltip.Root openDelay={500}><Tooltip.Trigger tabIndex={-1}><button- class={`py-[0.25rem] px-2 gap-[0.25rem] mr-2 hover:bg-gray-200 flex flex-row items-center rounded-[8px] transition-colors duration-200 ${state.showGrid ? "bg-gray-200 text-blue-300" : "text-gray-500 opacity-50"}`}+ class={`py-[0.25rem] px-2 gap-[0.25rem] mr-2 hover:bg-gray-200 flex flex-row items-center rounded-[8px] transition-colors duration-200 ${+ state.showGrid+ ? "bg-gray-200 text-blue-300"+ : "text-gray-500 opacity-50"+ }`}type="button"onClick={() => setState("showGrid", (v) => !v)}>@@ -121,7 +131,9 @@ export default function CaptureArea() {onClick={handleConfirm}><IconCapCircleCheck class="size-5" />- <span class="font-[500] text-[0.875rem]">Confirm selection</span>+ <span class="font-[500] text-[0.875rem]">+ Confirm selection+ </span></button></div></div>diff --git a/apps/desktop/src/routes/window-capture-occluder.tsx b/apps/desktop/src/routes/window-capture-occluder.tsxindex 7500f803d..5d297fe0b 100644--- a/apps/desktop/src/routes/window-capture-occluder.tsx+++ b/apps/desktop/src/routes/window-capture-occluder.tsx@@ -11,7 +11,7 @@ export default function () {<Showwhen={currentRecording.data &&- (currentRecording.data.captureTarget.variant !== "screen") &&+ currentRecording.data.captureTarget.variant !== "screen" &¤tRecording.data.captureTarget.bounds}>diff --git a/apps/desktop/src/utils/box.ts b/apps/desktop/src/utils/box.tsindex 3081afa63..e7a17d20e 100644--- a/apps/desktop/src/utils/box.ts+++ b/apps/desktop/src/utils/box.ts@@ -1,9 +1,9 @@// Attribution to area-selection (MIT License) by 7anshuai// https://github.com/7anshuai/area-selection-type XY = { x: number, y: number };+type XY = { x: number; y: number };-export type Bounds = { size: XY, position: XY };+export type Bounds = { size: XY; position: XY };export default class Box {x: number;@@ -25,7 +25,7 @@ export default class Box {toBounds(): Bounds {return {position: { x: this.x, y: this.y },- size: { x: this.width, y: this.height }+ size: { x: this.width, y: this.height },};}@@ -184,4 +184,4 @@ export default class Box {return this;}-}\ No newline at end of file+}diff --git a/apps/desktop/src/utils/createPresets.ts b/apps/desktop/src/utils/createPresets.tsindex 4bc5fbc7f..de78411a7 100644--- a/apps/desktop/src/utils/createPresets.ts+++ b/apps/desktop/src/utils/createPresets.ts@@ -63,7 +63,7 @@ export function createPresets() {if (!config) return DEFAULT_PROJECT_CONFIG;console.log("Config:", config);-+// @ts-ignore we reeeally don't want the timeline in the presetconfig.timeline = undefined;return config;diff --git a/apps/desktop/src/utils/plans.ts b/apps/desktop/src/utils/plans.tsindex 27fafc9c9..e10ffd61e 100644--- a/apps/desktop/src/utils/plans.ts+++ b/apps/desktop/src/utils/plans.ts@@ -19,7 +19,11 @@ export const getProPlanId = (billingCycle: "yearly" | "monthly") => {return planIds[environment]?.[billingCycle] || "";};-export function isUserOnProPlan({ subscriptionStatus }: { subscriptionStatus: string | null }): boolean {+export function isUserOnProPlan({+ subscriptionStatus,+}: {+ subscriptionStatus: string | null;+}): boolean {if (subscriptionStatus === "active" ||subscriptionStatus === "trialing" ||@@ -29,4 +33,4 @@ export function isUserOnProPlan({ subscriptionStatus }: { subscriptionStatus: streturn true;}return false;-}\ No newline at end of file+}diff --git a/apps/desktop/src/utils/tauri.ts b/apps/desktop/src/utils/tauri.tsindex 703b54e77..9c851fa7d 100644--- a/apps/desktop/src/utils/tauri.ts+++ b/apps/desktop/src/utils/tauri.ts@@ -1,362 +1,570 @@-// This file was generated by [tauri-specta](https://github.com/oscartbeaumont/tauri-specta). Do not edit this file manually./** user-defined commands **/-export const commands = {-async getRecordingOptions() : Promise<RecordingOptions> {+ async getRecordingOptions(): Promise<RecordingOptions> {return await TAURI_INVOKE("get_recording_options");-},-async setRecordingOptions(options: RecordingOptions) : Promise<null> {+ },+ async setRecordingOptions(options: RecordingOptions): Promise<null> {return await TAURI_INVOKE("set_recording_options", { options });-},-async startRecording() : Promise<null> {+ },+ async startRecording(): Promise<null> {return await TAURI_INVOKE("start_recording");-},-async stopRecording() : Promise<null> {+ },+ async stopRecording(): Promise<null> {return await TAURI_INVOKE("stop_recording");-},-async pauseRecording() : Promise<null> {+ },+ async pauseRecording(): Promise<null> {return await TAURI_INVOKE("pause_recording");-},-async resumeRecording() : Promise<null> {+ },+ async resumeRecording(): Promise<null> {return await TAURI_INVOKE("resume_recording");-},-async listCameras() : Promise<string[]> {+ },+ async listCameras(): Promise<string[]> {return await TAURI_INVOKE("list_cameras");-},-async listCaptureWindows() : Promise<CaptureWindow[]> {+ },+ async listCaptureWindows(): Promise<CaptureWindow[]> {return await TAURI_INVOKE("list_capture_windows");-},-async listCaptureScreens() : Promise<CaptureScreen[]> {+ },+ async listCaptureScreens(): Promise<CaptureScreen[]> {return await TAURI_INVOKE("list_capture_screens");-},-async takeScreenshot() : Promise<null> {+ },+ async takeScreenshot(): Promise<null> {return await TAURI_INVOKE("take_screenshot");-},-async listAudioDevices() : Promise<string[]> {+ },+ async listAudioDevices(): Promise<string[]> {return await TAURI_INVOKE("list_audio_devices");-},-async closePreviousRecordingsWindow() : Promise<void> {+ },+ async closePreviousRecordingsWindow(): Promise<void> {await TAURI_INVOKE("close_previous_recordings_window");-},-async setFakeWindowBounds(name: string, bounds: Bounds) : Promise<null> {+ },+ async setFakeWindowBounds(name: string, bounds: Bounds): Promise<null> {return await TAURI_INVOKE("set_fake_window_bounds", { name, bounds });-},-async removeFakeWindow(name: string) : Promise<null> {+ },+ async removeFakeWindow(name: string): Promise<null> {return await TAURI_INVOKE("remove_fake_window", { name });-},-async focusCapturesPanel() : Promise<void> {+ },+ async focusCapturesPanel(): Promise<void> {await TAURI_INVOKE("focus_captures_panel");-},-async getCurrentRecording() : Promise<JsonValue<RecordingInfo | null>> {+ },+ async getCurrentRecording(): Promise<JsonValue<RecordingInfo | null>> {return await TAURI_INVOKE("get_current_recording");-},-async exportVideo(videoId: string, project: ProjectConfiguration, progress: TAURI_CHANNEL<RenderProgress>, force: boolean, fps: number, resolutionBase: XY<number>) : Promise<string> {- return await TAURI_INVOKE("export_video", { videoId, project, progress, force, fps, resolutionBase });-},-async getExportEstimates(videoId: string, resolution: XY<number>, fps: number) : Promise<ExportEstimates> {- return await TAURI_INVOKE("get_export_estimates", { videoId, resolution, fps });-},-async copyFileToPath(src: string, dst: string) : Promise<null> {+ },+ async exportVideo(+ videoId: string,+ project: ProjectConfiguration,+ progress: TAURI_CHANNEL<RenderProgress>,+ force: boolean,+ fps: number,+ resolutionBase: XY<number>+ ): Promise<string> {+ return await TAURI_INVOKE("export_video", {+ videoId,+ project,+ progress,+ force,+ fps,+ resolutionBase,+ });+ },+ async getExportEstimates(+ videoId: string,+ resolution: XY<number>,+ fps: number+ ): Promise<ExportEstimates> {+ return await TAURI_INVOKE("get_export_estimates", {+ videoId,+ resolution,+ fps,+ });+ },+ async copyFileToPath(src: string, dst: string): Promise<null> {return await TAURI_INVOKE("copy_file_to_path", { src, dst });-},-async copyVideoToClipboard(path: string) : Promise<null> {+ },+ async copyVideoToClipboard(path: string): Promise<null> {return await TAURI_INVOKE("copy_video_to_clipboard", { path });-},-async copyScreenshotToClipboard(path: string) : Promise<null> {+ },+ async copyScreenshotToClipboard(path: string): Promise<null> {return await TAURI_INVOKE("copy_screenshot_to_clipboard", { path });-},-async openFilePath(path: string) : Promise<null> {+ },+ async openFilePath(path: string): Promise<null> {return await TAURI_INVOKE("open_file_path", { path });-},-async getVideoMetadata(videoId: string, videoType: VideoType | null) : Promise<VideoRecordingMetadata> {+ },+ async getVideoMetadata(+ videoId: string,+ videoType: VideoType | null+ ): Promise<VideoRecordingMetadata> {return await TAURI_INVOKE("get_video_metadata", { videoId, videoType });-},-async createEditorInstance(videoId: string) : Promise<SerializedEditorInstance> {+ },+ async createEditorInstance(+ videoId: string+ ): Promise<SerializedEditorInstance> {return await TAURI_INVOKE("create_editor_instance", { videoId });-},-async startPlayback(fps: number, resolutionBase: XY<number>) : Promise<null> {+ },+ async startPlayback(fps: number, resolutionBase: XY<number>): Promise<null> {return await TAURI_INVOKE("start_playback", { fps, resolutionBase });-},-async stopPlayback() : Promise<null> {+ },+ async stopPlayback(): Promise<null> {return await TAURI_INVOKE("stop_playback");-},-async setPlayheadPosition(frameNumber: number) : Promise<null> {+ },+ async setPlayheadPosition(frameNumber: number): Promise<null> {return await TAURI_INVOKE("set_playhead_position", { frameNumber });-},-async setProjectConfig(config: ProjectConfiguration) : Promise<null> {+ },+ async setProjectConfig(config: ProjectConfiguration): Promise<null> {return await TAURI_INVOKE("set_project_config", { config });-},-async openEditor(id: string) : Promise<void> {+ },+ async openEditor(id: string): Promise<void> {await TAURI_INVOKE("open_editor", { id });-},-async openMainWindow() : Promise<void> {+ },+ async openMainWindow(): Promise<void> {await TAURI_INVOKE("open_main_window");-},-async openPermissionSettings(permission: OSPermission) : Promise<void> {+ },+ async openPermissionSettings(permission: OSPermission): Promise<void> {await TAURI_INVOKE("open_permission_settings", { permission });-},-async doPermissionsCheck(initialCheck: boolean) : Promise<OSPermissionsCheck> {+ },+ async doPermissionsCheck(initialCheck: boolean): Promise<OSPermissionsCheck> {return await TAURI_INVOKE("do_permissions_check", { initialCheck });-},-async requestPermission(permission: OSPermission) : Promise<void> {+ },+ async requestPermission(permission: OSPermission): Promise<void> {await TAURI_INVOKE("request_permission", { permission });-},-async uploadExportedVideo(videoId: string, mode: UploadMode) : Promise<UploadResult> {+ },+ async uploadExportedVideo(+ videoId: string,+ mode: UploadMode+ ): Promise<UploadResult> {return await TAURI_INVOKE("upload_exported_video", { videoId, mode });-},-async uploadScreenshot(screenshotPath: string) : Promise<UploadResult> {+ },+ async uploadScreenshot(screenshotPath: string): Promise<UploadResult> {return await TAURI_INVOKE("upload_screenshot", { screenshotPath });-},-async getRecordingMeta(id: string, fileType: string) : Promise<RecordingMeta> {+ },+ async getRecordingMeta(id: string, fileType: string): Promise<RecordingMeta> {return await TAURI_INVOKE("get_recording_meta", { id, fileType });-},-async saveFileDialog(fileName: string, fileType: string) : Promise<string | null> {+ },+ async saveFileDialog(+ fileName: string,+ fileType: string+ ): Promise<string | null> {return await TAURI_INVOKE("save_file_dialog", { fileName, fileType });-},-async listRecordings() : Promise<([string, string, RecordingMeta])[]> {+ },+ async listRecordings(): Promise<[string, string, RecordingMeta][]> {return await TAURI_INVOKE("list_recordings");-},-async listScreenshots() : Promise<([string, string, RecordingMeta])[]> {+ },+ async listScreenshots(): Promise<[string, string, RecordingMeta][]> {return await TAURI_INVOKE("list_screenshots");-},-async checkUpgradedAndUpdate() : Promise<boolean> {+ },+ async checkUpgradedAndUpdate(): Promise<boolean> {return await TAURI_INVOKE("check_upgraded_and_update");-},-async openExternalLink(url: string) : Promise<null> {+ },+ async openExternalLink(url: string): Promise<null> {return await TAURI_INVOKE("open_external_link", { url });-},-async setHotkey(action: HotkeyAction, hotkey: Hotkey | null) : Promise<null> {+ },+ async setHotkey(action: HotkeyAction, hotkey: Hotkey | null): Promise<null> {return await TAURI_INVOKE("set_hotkey", { action, hotkey });-},-async deleteAuthOpenSignin() : Promise<null> {+ },+ async deleteAuthOpenSignin(): Promise<null> {return await TAURI_INVOKE("delete_auth_open_signin");-},-async resetCameraPermissions() : Promise<null> {+ },+ async resetCameraPermissions(): Promise<null> {return await TAURI_INVOKE("reset_camera_permissions");-},-async resetMicrophonePermissions() : Promise<null> {+ },+ async resetMicrophonePermissions(): Promise<null> {return await TAURI_INVOKE("reset_microphone_permissions");-},-async isCameraWindowOpen() : Promise<boolean> {+ },+ async isCameraWindowOpen(): Promise<boolean> {return await TAURI_INVOKE("is_camera_window_open");-},-async seekTo(frameNumber: number) : Promise<null> {+ },+ async seekTo(frameNumber: number): Promise<null> {return await TAURI_INVOKE("seek_to", { frameNumber });-},-async sendFeedbackRequest(feedback: string) : Promise<null> {+ },+ async sendFeedbackRequest(feedback: string): Promise<null> {return await TAURI_INVOKE("send_feedback_request", { feedback });-},-async positionTrafficLights(controlsInset: [number, number] | null) : Promise<void> {+ },+ async positionTrafficLights(+ controlsInset: [number, number] | null+ ): Promise<void> {await TAURI_INVOKE("position_traffic_lights", { controlsInset });-},-async setTheme(theme: AppTheme) : Promise<void> {+ },+ async setTheme(theme: AppTheme): Promise<void> {await TAURI_INVOKE("set_theme", { theme });-},-async globalMessageDialog(message: string) : Promise<void> {+ },+ async globalMessageDialog(message: string): Promise<void> {await TAURI_INVOKE("global_message_dialog", { message });-},-async showWindow(window: ShowCapWindow) : Promise<void> {+ },+ async showWindow(window: ShowCapWindow): Promise<void> {await TAURI_INVOKE("show_window", { window });-},-async writeClipboardString(text: string) : Promise<null> {+ },+ async writeClipboardString(text: string): Promise<null> {return await TAURI_INVOKE("write_clipboard_string", { text });-},-async performHapticFeedback(pattern: HapticPattern | null, time: HapticPerformanceTime | null) : Promise<null> {+ },+ async performHapticFeedback(+ pattern: HapticPattern | null,+ time: HapticPerformanceTime | null+ ): Promise<null> {return await TAURI_INVOKE("perform_haptic_feedback", { pattern, time });-}-}+ },+};/** user-defined events **/-export const events = __makeEvents__<{-audioInputLevelChange: AudioInputLevelChange,-authenticationInvalid: AuthenticationInvalid,-currentRecordingChanged: CurrentRecordingChanged,-editorStateChanged: EditorStateChanged,-newNotification: NewNotification,-newRecordingAdded: NewRecordingAdded,-newScreenshotAdded: NewScreenshotAdded,-recordingMetaChanged: RecordingMetaChanged,-recordingOptionsChanged: RecordingOptionsChanged,-recordingStarted: RecordingStarted,-recordingStopped: RecordingStopped,-renderFrameEvent: RenderFrameEvent,-requestNewScreenshot: RequestNewScreenshot,-requestOpenSettings: RequestOpenSettings,-requestRestartRecording: RequestRestartRecording,-requestStartRecording: RequestStartRecording,-requestStopRecording: RequestStopRecording,-uploadProgress: UploadProgress+ audioInputLevelChange: AudioInputLevelChange;+ authenticationInvalid: AuthenticationInvalid;+ currentRecordingChanged: CurrentRecordingChanged;+ editorStateChanged: EditorStateChanged;+ newNotification: NewNotification;+ newRecordingAdded: NewRecordingAdded;+ newScreenshotAdded: NewScreenshotAdded;+ recordingMetaChanged: RecordingMetaChanged;+ recordingOptionsChanged: RecordingOptionsChanged;+ recordingStarted: RecordingStarted;+ recordingStopped: RecordingStopped;+ renderFrameEvent: RenderFrameEvent;+ requestNewScreenshot: RequestNewScreenshot;+ requestOpenSettings: RequestOpenSettings;+ requestRestartRecording: RequestRestartRecording;+ requestStartRecording: RequestStartRecording;+ requestStopRecording: RequestStopRecording;+ uploadProgress: UploadProgress;}>({-audioInputLevelChange: "audio-input-level-change",-authenticationInvalid: "authentication-invalid",-currentRecordingChanged: "current-recording-changed",-editorStateChanged: "editor-state-changed",-newNotification: "new-notification",-newRecordingAdded: "new-recording-added",-newScreenshotAdded: "new-screenshot-added",-recordingMetaChanged: "recording-meta-changed",-recordingOptionsChanged: "recording-options-changed",-recordingStarted: "recording-started",-recordingStopped: "recording-stopped",-renderFrameEvent: "render-frame-event",-requestNewScreenshot: "request-new-screenshot",-requestOpenSettings: "request-open-settings",-requestRestartRecording: "request-restart-recording",-requestStartRecording: "request-start-recording",-requestStopRecording: "request-stop-recording",-uploadProgress: "upload-progress"-})+ audioInputLevelChange: "audio-input-level-change",+ authenticationInvalid: "authentication-invalid",+ currentRecordingChanged: "current-recording-changed",+ editorStateChanged: "editor-state-changed",+ newNotification: "new-notification",+ newRecordingAdded: "new-recording-added",+ newScreenshotAdded: "new-screenshot-added",+ recordingMetaChanged: "recording-meta-changed",+ recordingOptionsChanged: "recording-options-changed",+ recordingStarted: "recording-started",+ recordingStopped: "recording-stopped",+ renderFrameEvent: "render-frame-event",+ requestNewScreenshot: "request-new-screenshot",+ requestOpenSettings: "request-open-settings",+ requestRestartRecording: "request-restart-recording",+ requestStartRecording: "request-start-recording",+ requestStopRecording: "request-stop-recording",+ uploadProgress: "upload-progress",+});/** user-defined constants **/--/** user-defined types **/-export type AppTheme = "system" | "light" | "dark"-export type AspectRatio = "wide" | "vertical" | "square" | "classic" | "tall"-export type Audio = { duration: number; sample_rate: number; channels: number }-export type AudioConfiguration = { mute: boolean; improve: boolean }-export type AudioInputLevelChange = number-export type AudioMeta = { path: string }-export type AuthStore = { token: string; user_id: string | null; expires: number; plan: Plan | null }-export type AuthenticationInvalid = null-export type BackgroundConfiguration = { source: BackgroundSource; blur: number; padding: number; rounding: number; inset: number; crop: Crop | null }-export type BackgroundSource = { type: "wallpaper"; id: number } | { type: "image"; path: string | null } | { type: "color"; value: [number, number, number] } | { type: "gradient"; from: [number, number, number]; to: [number, number, number]; angle?: number }-export type Bounds = { x: number; y: number; width: number; height: number }-export type Camera = { hide: boolean; mirror: boolean; position: CameraPosition; size: number; zoom_size: number | null; rounding: number; shadow: number }-export type CameraMeta = { path: string; fps?: number }-export type CameraPosition = { x: CameraXPosition; y: CameraYPosition }-export type CameraXPosition = "left" | "center" | "right"-export type CameraYPosition = "top" | "bottom"-export type CaptureArea = { screen: CaptureScreen; bounds: Bounds }-export type CaptureScreen = { id: number; name: string; refresh_rate: number }-export type CaptureWindow = { id: number; owner_name: string; name: string; bounds: Bounds; refresh_rate: number }-export type Crop = { position: XY<number>; size: XY<number> }-export type CurrentRecordingChanged = null-export type CursorAnimationStyle = "regular" | "slow" | "fast"-export type CursorConfiguration = { hideWhenIdle: boolean; size: number; type: CursorType; animationStyle: CursorAnimationStyle }-export type CursorType = "pointer" | "circle"-export type Display = { path: string; fps?: number }-export type EditorStateChanged = { playhead_position: number }-export type ExportEstimates = { duration_seconds: number; estimated_time_seconds: number; estimated_size_mb: number }-export type Flags = { recordMouse: boolean; split: boolean }-export type GeneralSettingsStore = { uploadIndividualFiles?: boolean; openEditorAfterRecording?: boolean; hideDockIcon?: boolean; hapticsEnabled?: boolean; autoCreateShareableLink?: boolean; enableNotifications?: boolean; disableAutoOpenLinks?: boolean; hasCompletedStartup?: boolean; theme?: AppTheme; recordingConfig?: RecordingConfig | null }-export type HapticPattern = "Alignment" | "LevelChange" | "Generic"-export type HapticPerformanceTime = "Default" | "Now" | "DrawCompleted"-export type Hotkey = { code: string; meta: boolean; ctrl: boolean; alt: boolean; shift: boolean }-export type HotkeyAction = "startRecording" | "stopRecording" | "restartRecording" | "takeScreenshot"-export type HotkeysConfiguration = { show: boolean }-export type HotkeysStore = { hotkeys: { [key in HotkeyAction]: Hotkey } }-export type JsonValue<T> = [T]-export type MultipleSegment = { display: Display; camera?: CameraMeta | null; audio?: AudioMeta | null; cursor?: string | null }-export type MultipleSegments = { segments: MultipleSegment[]; cursors: { [key in string]: string } }-export type NewNotification = { title: string; body: string; is_error: boolean }-export type NewRecordingAdded = { path: string }-export type NewScreenshotAdded = { path: string }-export type OSPermission = "screenRecording" | "camera" | "microphone" | "accessibility"-export type OSPermissionStatus = "notNeeded" | "empty" | "granted" | "denied"-export type OSPermissionsCheck = { screenRecording: OSPermissionStatus; microphone: OSPermissionStatus; camera: OSPermissionStatus; accessibility: OSPermissionStatus }-export type Plan = { upgraded: boolean; manual: boolean; last_checked: number }-export type PreCreatedVideo = { id: string; link: string; config: S3UploadMeta }-export type ProjectConfiguration = { aspectRatio: AspectRatio | null; background: BackgroundConfiguration; camera: Camera; audio: AudioConfiguration; cursor: CursorConfiguration; hotkeys: HotkeysConfiguration; timeline?: TimelineConfiguration | null; motionBlur: number | null }-export type ProjectRecordings = { segments: SegmentRecordings[] }-export type RecordingConfig = { fps: number; resolution: Resolution }-export type RecordingInfo = { captureTarget: ScreenCaptureTarget }-export type RecordingMeta = ({ segment: SingleSegment } | { inner: MultipleSegments }) & { pretty_name: string; sharing?: SharingMeta | null }-export type RecordingMetaChanged = { id: string }-export type RecordingOptions = { captureTarget: ScreenCaptureTarget; cameraLabel: string | null; audioInputName: string | null; fps: number; outputResolution: Resolution | null }-export type RecordingOptionsChanged = null-export type RecordingStarted = null-export type RecordingStopped = { path: string }-export type RenderFrameEvent = { frame_number: number; fps: number; resolution_base: XY<number> }-export type RenderProgress = { type: "Starting"; total_frames: number } | { type: "EstimatedTotalFrames"; total_frames: number } | { type: "FrameRendered"; current_frame: number }-export type RequestNewScreenshot = null-export type RequestOpenSettings = { page: string }-export type RequestRestartRecording = null-export type RequestStartRecording = null-export type RequestStopRecording = null-export type Resolution = { width: number; height: number }-export type S3UploadMeta = { id: string; user_id: string; aws_region?: string; aws_bucket?: string; aws_endpoint?: string }-export type ScreenCaptureTarget = ({ variant: "window" } & CaptureWindow) | ({ variant: "screen" } & CaptureScreen) | ({ variant: "area" } & CaptureArea)-export type SegmentRecordings = { display: Video; camera: Video | null; audio: Audio | null }-export type SerializedEditorInstance = { framesSocketUrl: string; recordingDuration: number; savedProjectConfig: ProjectConfiguration; recordings: ProjectRecordings; path: string; prettyName: string }-export type SharingMeta = { id: string; link: string }-export type ShowCapWindow = "Setup" | "Main" | { Settings: { page: string | null } } | { Editor: { project_id: string } } | "PrevRecordings" | "WindowCaptureOccluder" | { CaptureArea: { screen: CaptureScreen } } | { Camera: { ws_port: number } } | { InProgressRecording: { position: [number, number] | null } } | "Upgrade" | "SignIn"-export type SingleSegment = { display: Display; camera?: CameraMeta | null; audio?: AudioMeta | null; cursor?: string | null }-export type TimelineConfiguration = { segments: TimelineSegment[]; zoomSegments: ZoomSegment[] }-export type TimelineSegment = { recordingSegment?: number; timescale: number; start: number; end: number }-export type UploadMode = { Initial: { pre_created_video: PreCreatedVideo | null } } | "Reupload"-export type UploadProgress = { progress: number; message: string }-export type UploadResult = { Success: string } | "NotAuthenticated" | "PlanCheckFailed" | "UpgradeRequired"-export type Video = { duration: number; width: number; height: number; fps: number }-export type VideoRecordingMetadata = { duration: number; size: number }-export type VideoType = "screen" | "output" | "camera"-export type XY<T> = { x: T; y: T }-export type ZoomMode = "auto" | { manual: { x: number; y: number } }-export type ZoomSegment = { start: number; end: number; amount: number; mode: ZoomMode }+export type AppTheme = "system" | "light" | "dark";+export type AspectRatio = "wide" | "vertical" | "square" | "classic" | "tall";+export type Audio = { duration: number; sample_rate: number; channels: number };+export type AudioConfiguration = { mute: boolean; improve: boolean };+export type AudioInputLevelChange = number;+export type AudioMeta = { path: string };+export type AuthStore = {+ token: string;+ user_id: string | null;+ expires: number;+ plan: Plan | null;+};+export type AuthenticationInvalid = null;+export type BackgroundConfiguration = {+ source: BackgroundSource;+ blur: number;+ padding: number;+ rounding: number;+ inset: number;+ crop: Crop | null;+};+export type BackgroundSource =+ | { type: "wallpaper"; id: number }+ | { type: "image"; path: string | null }+ | { type: "color"; value: [number, number, number] }+ | {+ type: "gradient";+ from: [number, number, number];+ to: [number, number, number];+ angle?: number;+ };+export type Bounds = { x: number; y: number; width: number; height: number };+export type Camera = {+ hide: boolean;+ mirror: boolean;+ position: CameraPosition;+ size: number;+ zoom_size: number | null;+ rounding: number;+ shadow: number;+};+export type CameraMeta = { path: string; fps?: number };+export type CameraPosition = { x: CameraXPosition; y: CameraYPosition };+export type CameraXPosition = "left" | "center" | "right";+export type CameraYPosition = "top" | "bottom";+export type CaptureArea = { screen: CaptureScreen; bounds: Bounds };+export type CaptureScreen = { id: number; name: string; refresh_rate: number };+export type CaptureWindow = {+ id: number;+ owner_name: string;+ name: string;+ bounds: Bounds;+ refresh_rate: number;+};+export type Crop = { position: XY<number>; size: XY<number> };+export type CurrentRecordingChanged = null;+export type CursorAnimationStyle = "regular" | "slow" | "fast";+export type CursorConfiguration = {+ hideWhenIdle: boolean;+ size: number;+ type: CursorType;+ animationStyle: CursorAnimationStyle;+};+export type CursorType = "pointer" | "circle";+export type Display = { path: string; fps?: number };+export type EditorStateChanged = { playhead_position: number };+export type ExportEstimates = {+ duration_seconds: number;+ estimated_time_seconds: number;+ estimated_size_mb: number;+};+export type Flags = { recordMouse: boolean; split: boolean };+export type GeneralSettingsStore = {+ uploadIndividualFiles?: boolean;+ openEditorAfterRecording?: boolean;+ hideDockIcon?: boolean;+ hapticsEnabled?: boolean;+ autoCreateShareableLink?: boolean;+ enableNotifications?: boolean;+ disableAutoOpenLinks?: boolean;+ hasCompletedStartup?: boolean;+ theme?: AppTheme;+ recordingConfig?: RecordingConfig | null;+};+export type HapticPattern = "Alignment" | "LevelChange" | "Generic";+export type HapticPerformanceTime = "Default" | "Now" | "DrawCompleted";+export type Hotkey = {+ code: string;+ meta: boolean;+ ctrl: boolean;+ alt: boolean;+ shift: boolean;+};+export type HotkeyAction =+ | "startRecording"+ | "stopRecording"+ | "restartRecording"+ | "takeScreenshot";+export type HotkeysConfiguration = { show: boolean };+export type HotkeysStore = { hotkeys: { [key in HotkeyAction]: Hotkey } };+export type JsonValue<T> = [T];+export type MultipleSegment = {+ display: Display;+ camera?: CameraMeta | null;+ audio?: AudioMeta | null;+ cursor?: string | null;+};+export type MultipleSegments = {+ segments: MultipleSegment[];+ cursors: { [key in string]: string };+};+export type NewNotification = {+ title: string;+ body: string;+ is_error: boolean;+};+export type NewRecordingAdded = { path: string };+export type NewScreenshotAdded = { path: string };+export type OSPermission =+ | "screenRecording"+ | "camera"+ | "microphone"+ | "accessibility";+export type OSPermissionStatus = "notNeeded" | "empty" | "granted" | "denied";+export type OSPermissionsCheck = {+ screenRecording: OSPermissionStatus;+ microphone: OSPermissionStatus;+ camera: OSPermissionStatus;+ accessibility: OSPermissionStatus;+};+export type Plan = { upgraded: boolean; manual: boolean; last_checked: number };+export type PreCreatedVideo = {+ id: string;+ link: string;+ config: S3UploadMeta;+};+export type ProjectConfiguration = {+ aspectRatio: AspectRatio | null;+ background: BackgroundConfiguration;+ camera: Camera;+ audio: AudioConfiguration;+ cursor: CursorConfiguration;+ hotkeys: HotkeysConfiguration;+ timeline?: TimelineConfiguration | null;+ motionBlur: number | null;+};+export type ProjectRecordings = { segments: SegmentRecordings[] };+export type RecordingConfig = { fps: number; resolution: Resolution };+export type RecordingInfo = { captureTarget: ScreenCaptureTarget };+export type RecordingMeta = (+ | { segment: SingleSegment }+ | { inner: MultipleSegments }+) & { pretty_name: string; sharing?: SharingMeta | null };+export type RecordingMetaChanged = { id: string };+export type RecordingOptions = {+ captureTarget: ScreenCaptureTarget;+ cameraLabel: string | null;+ audioInputName: string | null;+ fps: number;+ outputResolution: Resolution | null;+};+export type RecordingOptionsChanged = null;+export type RecordingStarted = null;+export type RecordingStopped = { path: string };+export type RenderFrameEvent = {+ frame_number: number;+ fps: number;+ resolution_base: XY<number>;+};+export type RenderProgress =+ | { type: "Starting"; total_frames: number }+ | { type: "EstimatedTotalFrames"; total_frames: number }+ | { type: "FrameRendered"; current_frame: number };+export type RequestNewScreenshot = null;+export type RequestOpenSettings = { page: string };+export type RequestRestartRecording = null;+export type RequestStartRecording = null;+export type RequestStopRecording = null;+export type Resolution = { width: number; height: number };+export type S3UploadMeta = {+ id: string;+ user_id: string;+ aws_region?: string;+ aws_bucket?: string;+ aws_endpoint?: string;+};+export type ScreenCaptureTarget =+ | ({ variant: "window" } & CaptureWindow)+ | ({ variant: "screen" } & CaptureScreen)+ | ({ variant: "area" } & CaptureArea);+export type SegmentRecordings = {+ display: Video;+ camera: Video | null;+ audio: Audio | null;+};+export type SerializedEditorInstance = {+ framesSocketUrl: string;+ recordingDuration: number;+ savedProjectConfig: ProjectConfiguration;+ recordings: ProjectRecordings;+ path: string;+ prettyName: string;+};+export type SharingMeta = { id: string; link: string };+export type ShowCapWindow =+ | "Setup"+ | "Main"+ | { Settings: { page: string | null } }+ | { Editor: { project_id: string } }+ | "PrevRecordings"+ | "WindowCaptureOccluder"+ | { CaptureArea: { screen: CaptureScreen } }+ | { Camera: { ws_port: number } }+ | { InProgressRecording: { position: [number, number] | null } }+ | "Upgrade"+ | "SignIn";+export type SingleSegment = {+ display: Display;+ camera?: CameraMeta | null;+ audio?: AudioMeta | null;+ cursor?: string | null;+};+export type TimelineConfiguration = {+ segments: TimelineSegment[];+ zoomSegments: ZoomSegment[];+};+export type TimelineSegment = {+ recordingSegment?: number;+ timescale: number;+ start: number;+ end: number;+};+export type UploadMode =+ | { Initial: { pre_created_video: PreCreatedVideo | null } }+ | "Reupload";+export type UploadProgress = { progress: number; message: string };+export type UploadResult =+ | { Success: string }+ | "NotAuthenticated"+ | "PlanCheckFailed"+ | "UpgradeRequired";+export type Video = {+ duration: number;+ width: number;+ height: number;+ fps: number;+};+export type VideoRecordingMetadata = { duration: number; size: number };+export type VideoType = "screen" | "output" | "camera";+export type XY<T> = { x: T; y: T };+export type ZoomMode = "auto" | { manual: { x: number; y: number } };+export type ZoomSegment = {+ start: number;+ end: number;+ amount: number;+ mode: ZoomMode;+};/** tauri-specta globals **/import {- invoke as TAURI_INVOKE,- Channel as TAURI_CHANNEL,+ invoke as TAURI_INVOKE,+ Channel as TAURI_CHANNEL,} from "@tauri-apps/api/core";import * as TAURI_API_EVENT from "@tauri-apps/api/event";import { type WebviewWindow as __WebviewWindow__ } from "@tauri-apps/api/webviewWindow";type __EventObj__<T> = {- listen: (- cb: TAURI_API_EVENT.EventCallback<T>,- ) => ReturnType<typeof TAURI_API_EVENT.listen<T>>;- once: (- cb: TAURI_API_EVENT.EventCallback<T>,- ) => ReturnType<typeof TAURI_API_EVENT.once<T>>;- emit: null extends T- ? (payload?: T) => ReturnType<typeof TAURI_API_EVENT.emit>- : (payload: T) => ReturnType<typeof TAURI_API_EVENT.emit>;+ listen: (+ cb: TAURI_API_EVENT.EventCallback<T>+ ) => ReturnType<typeof TAURI_API_EVENT.listen<T>>;+ once: (+ cb: TAURI_API_EVENT.EventCallback<T>+ ) => ReturnType<typeof TAURI_API_EVENT.once<T>>;+ emit: null extends T+ ? (payload?: T) => ReturnType<typeof TAURI_API_EVENT.emit>+ : (payload: T) => ReturnType<typeof TAURI_API_EVENT.emit>;};export type Result<T, E> =- | { status: "ok"; data: T }- | { status: "error"; error: E };+ | { status: "ok"; data: T }+ | { status: "error"; error: E };function __makeEvents__<T extends Record<string, any>>(- mappings: Record<keyof T, string>,+ mappings: Record<keyof T, string>) {- return new Proxy(- {} as unknown as {- [K in keyof T]: __EventObj__<T[K]> & {- (handle: __WebviewWindow__): __EventObj__<T[K]>;- };- },- {- get: (_, event) => {- const name = mappings[event as keyof T];+ return new Proxy(+ {} as unknown as {+ [K in keyof T]: __EventObj__<T[K]> & {+ (handle: __WebviewWindow__): __EventObj__<T[K]>;+ };+ },+ {+ get: (_, event) => {+ const name = mappings[event as keyof T];- return new Proxy((() => {}) as any, {- apply: (_, __, [window]: [__WebviewWindow__]) => ({- listen: (arg: any) => window.listen(name, arg),- once: (arg: any) => window.once(name, arg),- emit: (arg: any) => window.emit(name, arg),- }),- get: (_, command: keyof __EventObj__<any>) => {- switch (command) {- case "listen":- return (arg: any) => TAURI_API_EVENT.listen(name, arg);- case "once":- return (arg: any) => TAURI_API_EVENT.once(name, arg);- case "emit":- return (arg: any) => TAURI_API_EVENT.emit(name, arg);- }- },- });- },- },- );+ return new Proxy((() => {}) as any, {+ apply: (_, __, [window]: [__WebviewWindow__]) => ({+ listen: (arg: any) => window.listen(name, arg),+ once: (arg: any) => window.once(name, arg),+ emit: (arg: any) => window.emit(name, arg),+ }),+ get: (_, command: keyof __EventObj__<any>) => {+ switch (command) {+ case "listen":+ return (arg: any) => TAURI_API_EVENT.listen(name, arg);+ case "once":+ return (arg: any) => TAURI_API_EVENT.once(name, arg);+ case "emit":+ return (arg: any) => TAURI_API_EVENT.emit(name, arg);+ }+ },+ });+ },+ }+ );}diff --git a/apps/web/app/api/changelog/route.ts b/apps/web/app/api/changelog/route.tsindex a0e5b7d1d..7831f3366 100644--- a/apps/web/app/api/changelog/route.ts+++ b/apps/web/app/api/changelog/route.ts@@ -4,7 +4,7 @@ import { getCorsHeaders } from "../../../utils/cors";export async function GET(request: Request) {console.log("[Changelog] Request received");-+const allUpdates = getChangelogPosts();console.log("[Changelog] Found updates:", allUpdates.length);@@ -19,12 +19,12 @@ export async function GET(request: Request) {const { origin } = new URL(request.url);const requestOrigin = request.headers.get("origin");-+console.log("[Changelog] Request details:", {url: request.url,origin,requestOrigin,- headers: Object.fromEntries(request.headers.entries())+ headers: Object.fromEntries(request.headers.entries()),});const response = NextResponse.json(changelogs);@@ -32,18 +32,21 @@ export async function GET(request: Request) {// Set CORS headers using the utility functionconst corsHeaders = getCorsHeaders(requestOrigin, origin);console.log("[Changelog] Setting CORS headers:", corsHeaders);-+Object.entries(corsHeaders).forEach(([key, value]) => {response.headers.set(key, value);});- console.log("[Changelog] Response headers:", Object.fromEntries(response.headers.entries()));+ console.log(+ "[Changelog] Response headers:",+ Object.fromEntries(response.headers.entries())+ );return response;}export async function OPTIONS(request: Request) {console.log("[Changelog OPTIONS] Request received");-+const { origin } = new URL(request.url);const requestOrigin = request.headers.get("origin");@@ -51,7 +54,7 @@ export async function OPTIONS(request: Request) {url: request.url,origin,requestOrigin,- headers: Object.fromEntries(request.headers.entries())+ headers: Object.fromEntries(request.headers.entries()),});const response = new NextResponse(null, { status: 204 });@@ -59,13 +62,16 @@ export async function OPTIONS(request: Request) {// Set CORS headers using the utility functionconst corsHeaders = getCorsHeaders(requestOrigin, origin);console.log("[Changelog OPTIONS] Setting CORS headers:", corsHeaders);-+Object.entries(corsHeaders).forEach(([key, value]) => {response.headers.set(key, value);});response.headers.set("Access-Control-Allow-Methods", "GET, OPTIONS");response.headers.set("Access-Control-Allow-Headers", "Content-Type");- console.log("[Changelog OPTIONS] Response headers:", Object.fromEntries(response.headers.entries()));+ console.log(+ "[Changelog OPTIONS] Response headers:",+ Object.fromEntries(response.headers.entries())+ );return response;}diff --git a/apps/web/app/api/desktop/s3/config/route.ts b/apps/web/app/api/desktop/s3/config/route.tsindex dca383539..be9700510 100644--- a/apps/web/app/api/desktop/s3/config/route.ts+++ b/apps/web/app/api/desktop/s3/config/route.ts@@ -74,14 +74,16 @@ export async function POST(request: NextRequest) {} catch (error) {console.error("Error in S3 config route:", error);return new Response(- JSON.stringify({+ JSON.stringify({error: "Failed to save S3 configuration",- details: error instanceof Error ? error.message : String(error)+ details: error instanceof Error ? error.message : String(error),}),{status: 500,headers: {- "Access-Control-Allow-Origin": request.headers.get("origin") as string,+ "Access-Control-Allow-Origin": request.headers.get(+ "origin"+ ) as string,"Access-Control-Allow-Credentials": "true",},}@@ -99,4 +101,4 @@ export async function OPTIONS(request: NextRequest) {"Access-Control-Allow-Credentials": "true",},});-}\ No newline at end of file+}diff --git a/apps/web/app/api/desktop/s3/config/test/route.ts b/apps/web/app/api/desktop/s3/config/test/route.tsindex 1fd1c8dc6..0f75d5455 100644--- a/apps/web/app/api/desktop/s3/config/test/route.ts+++ b/apps/web/app/api/desktop/s3/config/test/route.ts@@ -47,8 +47,8 @@ export async function POST(request: NextRequest) {secretAccessKey: data.secretAccessKey,},requestHandler: {- abortSignal: controller.signal- }+ abortSignal: controller.signal,+ },});try {@@ -57,35 +57,39 @@ export async function POST(request: NextRequest) {Bucket: data.bucketName,}));-+clearTimeout(timeoutId);} catch (error) {clearTimeout(timeoutId);let errorMessage = "Failed to connect to S3";-+if (error instanceof Error) {if (error.name === "AbortError" || error.name === "TimeoutError") {- errorMessage = "Connection timed out after 5 seconds. Please check the endpoint URL and your network connection.";+ errorMessage =+ "Connection timed out after 5 seconds. Please check the endpoint URL and your network connection.";} else if (error.name === "NoSuchBucket") {errorMessage = `Bucket '${data.bucketName}' does not exist`;} else if (error.name === "NetworkingError") {- errorMessage = "Network error. Please check the endpoint URL and your network connection.";+ errorMessage =+ "Network error. Please check the endpoint URL and your network connection.";} else if (error.name === "InvalidAccessKeyId") {errorMessage = "Invalid Access Key ID";} else if (error.name === "SignatureDoesNotMatch") {errorMessage = "Invalid Secret Access Key";} else if (error.name === "AccessDenied") {- errorMessage = "Access denied. Please check your credentials and bucket permissions.";+ errorMessage =+ "Access denied. Please check your credentials and bucket permissions.";} else if ((error as any).$metadata?.httpStatusCode === 301) {- errorMessage = "Received 301 redirect. This usually means the endpoint URL is incorrect or the bucket is in a different region.";+ errorMessage =+ "Received 301 redirect. This usually means the endpoint URL is incorrect or the bucket is in a different region.";}}-+return new Response(- JSON.stringify({+ JSON.stringify({error: errorMessage,details: error instanceof Error ? error.message : String(error),- metadata: (error as any)?.$metadata+ metadata: (error as any)?.$metadata,}),{status: 500,@@ -105,15 +109,17 @@ export async function POST(request: NextRequest) {});} catch (error) {return new Response(- JSON.stringify({+ JSON.stringify({error: "Failed to connect to S3",details: error instanceof Error ? error.message : String(error),- metadata: (error as any)?.$metadata+ metadata: (error as any)?.$metadata,}),{status: 500,headers: {- "Access-Control-Allow-Origin": request.headers.get("origin") as string,+ "Access-Control-Allow-Origin": request.headers.get(+ "origin"+ ) as string,"Access-Control-Allow-Credentials": "true",},}@@ -131,4 +137,4 @@ export async function OPTIONS(request: NextRequest) {"Access-Control-Allow-Credentials": "true",},});-}\ No newline at end of file+}diff --git a/apps/web/app/api/revalidate/route.ts b/apps/web/app/api/revalidate/route.tsindex e759925ce..2f24caad8 100644--- a/apps/web/app/api/revalidate/route.ts+++ b/apps/web/app/api/revalidate/route.ts@@ -1,4 +1,4 @@-import { revalidatePath } from 'next/cache';+import { revalidatePath } from "next/cache";import { type NextRequest } from "next/server";import { getHeaders, CACHE_CONTROL_HEADERS } from "@/utils/helpers";import { db } from "@cap/database";@@ -7,46 +7,43 @@ import { eq } from "drizzle-orm";export async function POST(request: NextRequest) {const origin = request.headers.get("origin") as string;-+try {const { videoId } = await request.json();if (!videoId) {- return new Response(- JSON.stringify({ error: "Missing videoId" }),- {- status: 400,- headers: {- ...getHeaders(origin),- ...CACHE_CONTROL_HEADERS,- },- }- );+ return new Response(JSON.stringify({ error: "Missing videoId" }), {+ status: 400,+ headers: {+ ...getHeaders(origin),+ ...CACHE_CONTROL_HEADERS,+ },+ });}-- const [video] = await db.select().from(videos).where(eq(videos.id, videoId));++ const [video] = await db+ .select()+ .from(videos)+ .where(eq(videos.id, videoId));if (!video) {- return new Response(- JSON.stringify({ error: "Video not found" }),- {- status: 404,- headers: {- ...getHeaders(origin),- ...CACHE_CONTROL_HEADERS,- },- }- );+ return new Response(JSON.stringify({ error: "Video not found" }), {+ status: 404,+ headers: {+ ...getHeaders(origin),+ ...CACHE_CONTROL_HEADERS,+ },+ });}// Revalidate the specific video pagerevalidatePath(`/s/${videoId}`);return new Response(- JSON.stringify({- revalidated: true,+ JSON.stringify({+ revalidated: true,now: Date.now(),- path: `/s/${videoId}`+ path: `/s/${videoId}`,}),{headers: {@@ -58,9 +55,9 @@ export async function POST(request: NextRequest) {} catch (err) {console.error("Revalidation error:", err);return new Response(- JSON.stringify({+ JSON.stringify({error: "Error revalidating",- details: err instanceof Error ? err.message : String(err)+ details: err instanceof Error ? err.message : String(err),}),{status: 500,@@ -71,4 +68,4 @@ export async function POST(request: NextRequest) {});}-}\ No newline at end of file+}diff --git a/apps/web/app/api/video/comment/delete/route.ts b/apps/web/app/api/video/comment/delete/route.tsindex a72f45ebe..22ca9ca58 100644--- a/apps/web/app/api/video/comment/delete/route.ts+++ b/apps/web/app/api/video/comment/delete/route.ts@@ -12,13 +12,10 @@ export async function DELETE(request: NextRequest) {const origin = request.headers.get("origin") as string;if (!commentId || !user?.id) {- return new Response(- JSON.stringify({ error: "Missing required data" }),- {- status: 400,- headers: getHeaders(origin),- }- );+ return new Response(JSON.stringify({ error: "Missing required data" }), {+ status: 400,+ headers: getHeaders(origin),+ });}try {@@ -26,12 +23,7 @@ export async function DELETE(request: NextRequest) {const query = await db.select().from(comments)- .where(- and(- eq(comments.id, commentId),- eq(comments.authorId, user.id)- )- );+ .where(and(eq(comments.id, commentId), eq(comments.authorId, user.id)));if (query.length === 0) {return new Response(@@ -44,28 +36,21 @@ export async function DELETE(request: NextRequest) {}// Delete the comment and all its replies- await db.delete(comments).where(- or(- eq(comments.id, commentId),- eq(comments.parentCommentId, commentId)- )- );+ await db+ .delete(comments)+ .where(+ or(eq(comments.id, commentId), eq(comments.parentCommentId, commentId))+ );- return new Response(- JSON.stringify({ success: true }),- {- status: 200,- headers: getHeaders(origin),- }- );+ return new Response(JSON.stringify({ success: true }), {+ status: 200,+ headers: getHeaders(origin),+ });} catch (error) {console.error("Error deleting comment:", error);- return new Response(- JSON.stringify({ error: "Failed to delete comment" }),- {- status: 500,- headers: getHeaders(origin),- }- );+ return new Response(JSON.stringify({ error: "Failed to delete comment" }), {+ status: 500,+ headers: getHeaders(origin),+ });}-}\ No newline at end of file+}diff --git a/apps/web/app/robots.ts b/apps/web/app/robots.tsindex a3c5b60f9..1262c2bc0 100644--- a/apps/web/app/robots.ts+++ b/apps/web/app/robots.ts@@ -1,33 +1,33 @@import { seoPages } from "@/lib/seo-pages";import { MetadataRoute } from "next";-export const dynamic = 'force-dynamic';+export const dynamic = "force-dynamic";export const revalidate = 0;export default function robots(): MetadataRoute.Robots {const seoPageSlugs = Object.keys(seoPages);-+return {rules: [{- userAgent: '*',+ userAgent: "*",allow: [- '/',- '/blog/',+ "/",+ "/blog/",// Dynamically add all SEO pages- ...seoPageSlugs.map(slug => `/${slug}`),+ ...seoPageSlugs.map((slug) => `/${slug}`),],// Be more specific about what we're disallowing under /s/disallow: [- '/dashboard',- '/s/*', // This will match /s/ and anything under it- '/login',- '/invite',- '/onboarding',- '/record',+ "/dashboard",+ "/s/*", // This will match /s/ and anything under it+ "/login",+ "/invite",+ "/onboarding",+ "/record",],},],- sitemap: 'https://cap.so/sitemap.xml',+ sitemap: "https://cap.so/sitemap.xml",};-}\ No newline at end of file+}diff --git a/apps/web/app/sitemap.ts b/apps/web/app/sitemap.tsindex 7654df4bb..175978054 100644--- a/apps/web/app/sitemap.ts+++ b/apps/web/app/sitemap.ts@@ -25,10 +25,7 @@ async function getPagePaths() {const relativePath = path.relative(process.cwd(), dir);const routePath = "/" + relativePath.split(path.sep).slice(1).join("/");- if (- !routePath.includes("/dashboard") &&- !routePath.includes("[")- ) {+ if (!routePath.includes("/dashboard") && !routePath.includes("[")) {const stats = await fs.stat(fullPath);paths.push({path: routePath === "/app" ? "/" : routePath,diff --git a/apps/web/components/pages/DownloadPage.tsx b/apps/web/components/pages/DownloadPage.tsxindex 29ee6a0cb..2c76c94e0 100644--- a/apps/web/components/pages/DownloadPage.tsx+++ b/apps/web/components/pages/DownloadPage.tsx@@ -20,16 +20,16 @@ export const DownloadPage = () => {};return (- <div className="wrapper wrapper-sm py-16 md:py-32">- <div className="text-center space-y-4">- <h1 className="fade-in-down animate-delay-1 text-2xl md:text-4xl">+ <div className="py-16 wrapper wrapper-sm md:py-32">+ <div className="space-y-4 text-center">+ <h1 className="text-2xl fade-in-down animate-delay-1 md:text-4xl">Download Cap</h1>- <p className="fade-in-down animate-delay-2 text-sm md:text-base px-4 md:px-0">+ <p className="px-4 text-sm fade-in-down animate-delay-2 md:text-base md:px-0">The quickest way to share your screen. Pin to your dock and record inseconds.</p>- <div className="flex flex-col md:flex-row items-center justify-center space-y-2 md:space-y-0 md:space-x-2 fade-in-up animate-delay-2">+ <div className="flex flex-col justify-center items-center space-y-2 md:flex-row md:space-y-0 md:space-x-2 fade-in-up animate-delay-2"><Buttonspinner={loading}size="lg"@@ -44,7 +44,7 @@ export const DownloadPage = () => {href="https://solitary-art-7d28.brendonovich.workers.dev/desktop/latest/platform/dmg-x86_64"className="w-full md:w-auto">- Download for Intel+ Download for Mac Intel</Button>)}</div>@@ -54,7 +54,7 @@ export const DownloadPage = () => {{!showOtherOptions && (<buttononClick={() => setShowOtherOptions(true)}- className="mt-2 underline text-sm text-gray-400 fade-in-up animate-delay-2"+ className="mt-2 text-sm text-gray-400 underline fade-in-up animate-delay-2">See other options</button>diff --git a/apps/web/components/seo/types.ts b/apps/web/components/seo/types.tsindex ca930e451..551c13d13 100644--- a/apps/web/components/seo/types.ts+++ b/apps/web/components/seo/types.ts@@ -26,4 +26,4 @@ export interface SeoPageContent {title: string;buttonText: string;};-}\ No newline at end of file+}diff --git a/apps/web/lib/seo-metadata.ts b/apps/web/lib/seo-metadata.tsindex 39aa8e368..da6773517 100644--- a/apps/web/lib/seo-metadata.ts+++ b/apps/web/lib/seo-metadata.ts@@ -1,28 +1,53 @@export const seoMetadata = {- 'screen-recorder': {+ "screen-recorder": {title: "Screen Recorder | Cap - Beautiful Screen Recording Software",- description: "Cap is a powerful, user-friendly screen recorder that offers high-quality recordings completely free. Perfect for creating tutorials, capturing gameplay, or recording professional presentations.",- keywords: ["screen recorder", "screen recording", "video capture", "free screen recorder"],+ description:+ "Cap is a powerful, user-friendly screen recorder that offers high-quality recordings completely free. Perfect for creating tutorials, capturing gameplay, or recording professional presentations.",+ keywords: [+ "screen recorder",+ "screen recording",+ "video capture",+ "free screen recorder",+ ],ogImage: "/og.png",},- 'screen-recorder-mac': {+ "screen-recorder-mac": {title: "Screen Record on Mac | Cap - Best Screen Recorder for macOS",- description: "Cap is a powerful, user-friendly screen recorder for Mac, offering high-quality video capture with seamless functionality. Perfect for creating tutorials, presentations, and educational content on macOS.",- keywords: ["mac screen recorder", "screen recording mac", "macos screen capture", "screen recorder for mac"],+ description:+ "Cap is a powerful, user-friendly screen recorder for Mac, offering high-quality video capture with seamless functionality. Perfect for creating tutorials, presentations, and educational content on macOS.",+ keywords: [+ "mac screen recorder",+ "screen recording mac",+ "macos screen capture",+ "screen recorder for mac",+ ],ogImage: "/og.png",},- 'free-screen-recorder': {+ "free-screen-recorder": {title: "Free Screen Recorder | Cap - High-Quality Recording at No Cost",- description: "Cap offers a top-rated, free screen recorder with high-quality video capture, making it perfect for creating tutorials, educational content, and professional demos without any hidden fees.",- keywords: ["free screen recorder", "screen recording free", "free video capture", "no cost screen recorder"],+ description:+ "Cap offers a top-rated, free screen recorder with high-quality video capture, making it perfect for creating tutorials, educational content, and professional demos without any hidden fees.",+ keywords: [+ "free screen recorder",+ "screen recording free",+ "free video capture",+ "no cost screen recorder",+ ],ogImage: "/og.png",},- 'screen-recording-software': {+ "screen-recording-software": {title: "Screen Recording Software | Cap - Professional Video Capture Tool",- description: "Cap is an all-in-one screen recording software offering high-quality video capture with an intuitive interface. Ideal for creating tutorials, presentations, and educational content.",- keywords: ["screen recording software", "video capture software", "professional screen recorder", "screen capture tool"],+ description:+ "Cap is an all-in-one screen recording software offering high-quality video capture with an intuitive interface. Ideal for creating tutorials, presentations, and educational content.",+ keywords: [+ "screen recording software",+ "video capture software",+ "professional screen recorder",+ "screen capture tool",+ ],ogImage: "/og.png",},};-export const getMetadataBySlug = (slug: string) => seoMetadata[slug as keyof typeof seoMetadata];\ No newline at end of file+export const getMetadataBySlug = (slug: string) =>+ seoMetadata[slug as keyof typeof seoMetadata];diff --git a/apps/web/lib/seo-pages.ts b/apps/web/lib/seo-pages.tsindex de16b315b..36263e066 100644--- a/apps/web/lib/seo-pages.ts+++ b/apps/web/lib/seo-pages.ts@@ -1,29 +1,44 @@-import { SeoPageContent } from '@/components/seo/types';-import { ScreenRecorderPage, screenRecorderContent } from '@/components/pages/seo/ScreenRecorderPage';-import { FreeScreenRecorderPage, freeScreenRecorderContent } from '@/components/pages/seo/FreeScreenRecorderPage';-import { ScreenRecordMacPage, screenRecordMacContent } from '@/components/pages/seo/ScreenRecordMacPage';-import { ScreenRecordingSoftwarePage, screenRecordingSoftwareContent } from '@/components/pages/seo/ScreenRecordingSoftwarePage';+import { SeoPageContent } from "@/components/seo/types";+import {+ ScreenRecorderPage,+ screenRecorderContent,+} from "@/components/pages/seo/ScreenRecorderPage";+import {+ FreeScreenRecorderPage,+ freeScreenRecorderContent,+} from "@/components/pages/seo/FreeScreenRecorderPage";+import {+ ScreenRecordMacPage,+ screenRecordMacContent,+} from "@/components/pages/seo/ScreenRecordMacPage";+import {+ ScreenRecordingSoftwarePage,+ screenRecordingSoftwareContent,+} from "@/components/pages/seo/ScreenRecordingSoftwarePage";-export const seoPages: Record<string, {- component: React.ComponentType;- content: SeoPageContent;-}> = {- 'screen-recorder': {+export const seoPages: Record<+ string,+ {+ component: React.ComponentType;+ content: SeoPageContent;+ }+> = {+ "screen-recorder": {component: ScreenRecorderPage,content: screenRecorderContent,},- 'free-screen-recorder': {+ "free-screen-recorder": {component: FreeScreenRecorderPage,content: freeScreenRecorderContent,},- 'screen-recorder-mac': {+ "screen-recorder-mac": {component: ScreenRecordMacPage,content: screenRecordMacContent,},- 'screen-recording-software': {+ "screen-recording-software": {component: ScreenRecordingSoftwarePage,content: screenRecordingSoftwareContent,},};-export const getPageBySlug = (slug: string) => seoPages[slug];\ No newline at end of file+export const getPageBySlug = (slug: string) => seoPages[slug];diff --git a/apps/web/utils/blog.ts b/apps/web/utils/blog.tsindex 82cf4d187..af57c7f4e 100644--- a/apps/web/utils/blog.ts+++ b/apps/web/utils/blog.ts@@ -25,7 +25,7 @@ function parseFrontmatter(fileContent: string) {if (!match || !match[1]) {throw new Error("Invalid or missing frontmatter");}-+let frontMatterBlock = match[1];let content = fileContent.replace(frontmatterRegex, "").trim();let frontMatterLines = frontMatterBlock.trim().split("\n");@@ -34,41 +34,41 @@ function parseFrontmatter(fileContent: string) {frontMatterLines.forEach((line) => {let [key, ...valueArr] = line.split(": ");if (!key) return;-+let value = valueArr.join(": ").trim();value = value.replace(/^['"](.*)['"]$/, "$1"); // Remove quotesmetadata[key.trim() as keyof (PostMetadata | DocMetadata)] = value;});- return {- metadata: metadata as (PostMetadata | DocMetadata),- content+ return {+ metadata: metadata as PostMetadata | DocMetadata,+ content,};}function getMDXFiles(dir: string) {const files: string[] = [];-+function scanDir(currentDir: string) {const entries = fs.readdirSync(currentDir);- entries.forEach(entry => {+ entries.forEach((entry) => {const fullPath = path.join(currentDir, entry);const stat = fs.statSync(fullPath);-+if (stat.isDirectory()) {scanDir(fullPath);- } else if (path.extname(entry) === '.mdx') {+ } else if (path.extname(entry) === ".mdx") {// Store paths relative to the base dirconst relativePath = path.relative(dir, fullPath);- console.log('Found MDX file:', { relativePath, fullPath });+ console.log("Found MDX file:", { relativePath, fullPath });files.push(relativePath);}});}- console.log('Scanning directory:', dir);+ console.log("Scanning directory:", dir);scanDir(dir);- console.log('Found files:', files);+ console.log("Found files:", files);return files;}@@ -78,18 +78,18 @@ function readMDXFile(filePath: string) {}function getMDXData(dir: string) {- console.log('Getting MDX data from:', dir);+ console.log("Getting MDX data from:", dir);let mdxFiles = getMDXFiles(dir);return mdxFiles.map((relativePath) => {const fullPath = path.join(dir, relativePath);- console.log('Processing file:', { relativePath, fullPath });+ console.log("Processing file:", { relativePath, fullPath });let { metadata, content } = readMDXFile(fullPath);let slug = relativePath- .replace(/\.mdx$/, '') // Remove .mdx extension+ .replace(/\.mdx$/, "") // Remove .mdx extension.split(path.sep) // Split on directory separator- .join('/'); // Join with forward slashes for URL-- console.log('Generated slug:', { relativePath, slug });+ .join("/"); // Join with forward slashes for URL++ console.log("Generated slug:", { relativePath, slug });return {metadata,slug,diff --git a/apps/web/utils/readTime.ts b/apps/web/utils/readTime.tsindex 2ffa2d270..5992bbd8f 100644--- a/apps/web/utils/readTime.ts+++ b/apps/web/utils/readTime.ts@@ -4,4 +4,4 @@ export function calculateReadingTime(content: string): number {const words = content.trim().split(/\s+/).length;const time = Math.ceil(words / WORDS_PER_MINUTE);return Math.max(1, time);-}\ No newline at end of file+}diff --git a/packages/database/schema.ts b/packages/database/schema.tsindex 405e9bb4c..105ab1588 100644--- a/packages/database/schema.ts+++ b/packages/database/schema.ts@@ -30,13 +30,13 @@ const nanoIdNullable = customType<{ data: string; notNull: false }>({// Add a custom type for encrypted stringsconst encryptedText = customType<{ data: string; notNull: true }>({dataType() {- return 'text';+ return "text";},});const encryptedTextNullable = customType<{ data: string; notNull: false }>({dataType() {- return 'text';+ return "text";},});diff --git a/packages/ui-solid/src/auto-imports.d.ts b/packages/ui-solid/src/auto-imports.d.tsindex b0f7d7a46..a5f010ade 100644--- a/packages/ui-solid/src/auto-imports.d.ts+++ b/packages/ui-solid/src/auto-imports.d.ts@@ -6,67 +6,67 @@// biome-ignore lint: disableexport {}declare global {- const IconCapArrows: typeof import('~icons/cap/arrows.jsx')['default']- const IconCapAudioOn: typeof import('~icons/cap/audio-on.jsx')['default']- const IconCapBlur: typeof import('~icons/cap/blur.jsx')['default']- const IconCapCamera: typeof import('~icons/cap/camera.jsx')['default']- const IconCapChevronDown: typeof import('~icons/cap/chevron-down.jsx')['default']- const IconCapCircleCheck: typeof import('~icons/cap/circle-check.jsx')['default']- const IconCapCirclePlus: typeof import('~icons/cap/circle-plus.jsx')['default']- const IconCapCircleX: typeof import('~icons/cap/circle-x.jsx')['default']- const IconCapClock: typeof import('~icons/cap/clock.jsx')['default']- const IconCapCopy: typeof import('~icons/cap/copy.jsx')['default']- const IconCapCorners: typeof import('~icons/cap/corners.jsx')['default']- const IconCapCrop: typeof import('~icons/cap/crop.jsx')['default']- const IconCapCursor: typeof import('~icons/cap/cursor.jsx')['default']- const IconCapEditor: typeof import('~icons/cap/editor.jsx')['default']- const IconCapEnlarge: typeof import('~icons/cap/enlarge.jsx')['default']- const IconCapFile: typeof import('~icons/cap/file.jsx')['default']- const IconCapFrameFirst: typeof import('~icons/cap/frame-first.jsx')['default']- const IconCapFrameLast: typeof import('~icons/cap/frame-last.jsx')['default']- const IconCapHotkeys: typeof import('~icons/cap/hotkeys.jsx')['default']- const IconCapImage: typeof import('~icons/cap/image.jsx')['default']- const IconCapInset: typeof import('~icons/cap/inset.jsx')['default']- const IconCapLayout: typeof import('~icons/cap/layout.jsx')['default']- const IconCapLogo: typeof import('~icons/cap/logo.jsx')['default']- const IconCapLogoFull: typeof import('~icons/cap/logo-full.jsx')['default']- const IconCapLogoFullDark: typeof import('~icons/cap/logo-full-dark.jsx')['default']- const IconCapMessageBubble: typeof import('~icons/cap/message-bubble.jsx')['default']- const IconCapMicrophone: typeof import('~icons/cap/microphone.jsx')['default']- const IconCapMoreVertical: typeof import('~icons/cap/more-vertical.jsx')['default']- const IconCapPadding: typeof import('~icons/cap/padding.jsx')['default']- const IconCapPauseCircle: typeof import('~icons/cap/pause-circle.jsx')['default']- const IconCapPlayCircle: typeof import('~icons/cap/play-circle.jsx')['default']- const IconCapPresets: typeof import('~icons/cap/presets.jsx')['default']- const IconCapRedo: typeof import('~icons/cap/redo.jsx')['default']- const IconCapRestart: typeof import('~icons/cap/restart.jsx')['default']- const IconCapScissors: typeof import('~icons/cap/scissors.jsx')['default']- const IconCapSettings: typeof import('~icons/cap/settings.jsx')['default']- const IconCapShadow: typeof import('~icons/cap/shadow.jsx')['default']- const IconCapSquare: typeof import('~icons/cap/square.jsx')['default']- const IconCapStopCircle: typeof import('~icons/cap/stop-circle.jsx')['default']- const IconCapTrash: typeof import('~icons/cap/trash.jsx')['default']- const IconCapUndo: typeof import('~icons/cap/undo.jsx')['default']- const IconCapUpload: typeof import('~icons/cap/upload.jsx')['default']- const IconLucideBell: typeof import('~icons/lucide/bell.jsx')['default']- const IconLucideCamera: typeof import('~icons/lucide/camera.jsx')['default']- const IconLucideCheck: typeof import('~icons/lucide/check.jsx')['default']- const IconLucideClock: typeof import('~icons/lucide/clock.jsx')['default']- const IconLucideDatabase: typeof import('~icons/lucide/database.jsx')['default']- const IconLucideEdit: typeof import('~icons/lucide/edit.jsx')['default']- const IconLucideEye: typeof import('~icons/lucide/eye.jsx')['default']- const IconLucideFolder: typeof import('~icons/lucide/folder.jsx')['default']- const IconLucideHardDrive: typeof import('~icons/lucide/hard-drive.jsx')['default']- const IconLucideLayoutGrid: typeof import('~icons/lucide/layout-grid.jsx')['default']- const IconLucideLoaderCircle: typeof import('~icons/lucide/loader-circle.jsx')['default']- const IconLucideMessageSquarePlus: typeof import('~icons/lucide/message-square-plus.jsx')['default']- const IconLucideMicOff: typeof import('~icons/lucide/mic-off.jsx')['default']- const IconLucideRabbit: typeof import('~icons/lucide/rabbit.jsx')['default']- const IconLucideRotateCcw: typeof import('~icons/lucide/rotate-ccw.jsx')['default']- const IconLucideSearch: typeof import('~icons/lucide/search.jsx')['default']- const IconLucideSquarePlay: typeof import('~icons/lucide/square-play.jsx')['default']- const IconLucideUnplug: typeof import('~icons/lucide/unplug.jsx')['default']- const IconLucideVideo: typeof import('~icons/lucide/video.jsx')['default']- const IconLucideVolume2: typeof import('~icons/lucide/volume2.jsx')['default']- const IconLucideVolumeX: typeof import('~icons/lucide/volume-x.jsx')['default']+ const IconCapArrows: typeof import("~icons/cap/arrows.jsx")["default"];+ const IconCapAudioOn: typeof import("~icons/cap/audio-on.jsx")["default"];+ const IconCapBlur: typeof import("~icons/cap/blur.jsx")["default"];+ const IconCapCamera: typeof import("~icons/cap/camera.jsx")["default"];+ const IconCapChevronDown: typeof import("~icons/cap/chevron-down.jsx")["default"];+ const IconCapCircleCheck: typeof import("~icons/cap/circle-check.jsx")["default"];+ const IconCapCirclePlus: typeof import("~icons/cap/circle-plus.jsx")["default"];+ const IconCapCircleX: typeof import("~icons/cap/circle-x.jsx")["default"];+ const IconCapClock: typeof import("~icons/cap/clock.jsx")["default"];+ const IconCapCopy: typeof import("~icons/cap/copy.jsx")["default"];+ const IconCapCorners: typeof import("~icons/cap/corners.jsx")["default"];+ const IconCapCrop: typeof import("~icons/cap/crop.jsx")["default"];+ const IconCapCursor: typeof import("~icons/cap/cursor.jsx")["default"];+ const IconCapEditor: typeof import("~icons/cap/editor.jsx")["default"];+ const IconCapEnlarge: typeof import("~icons/cap/enlarge.jsx")["default"];+ const IconCapFile: typeof import("~icons/cap/file.jsx")["default"];+ const IconCapFrameFirst: typeof import("~icons/cap/frame-first.jsx")["default"];+ const IconCapFrameLast: typeof import("~icons/cap/frame-last.jsx")["default"];+ const IconCapHotkeys: typeof import("~icons/cap/hotkeys.jsx")["default"];+ const IconCapImage: typeof import("~icons/cap/image.jsx")["default"];+ const IconCapInset: typeof import("~icons/cap/inset.jsx")["default"];+ const IconCapLayout: typeof import("~icons/cap/layout.jsx")["default"];+ const IconCapLogo: typeof import("~icons/cap/logo.jsx")["default"];+ const IconCapLogoFull: typeof import("~icons/cap/logo-full.jsx")["default"];+ const IconCapLogoFullDark: typeof import("~icons/cap/logo-full-dark.jsx")["default"];+ const IconCapMessageBubble: typeof import("~icons/cap/message-bubble.jsx")["default"];+ const IconCapMicrophone: typeof import("~icons/cap/microphone.jsx")["default"];+ const IconCapMoreVertical: typeof import("~icons/cap/more-vertical.jsx")["default"];+ const IconCapPadding: typeof import("~icons/cap/padding.jsx")["default"];+ const IconCapPauseCircle: typeof import("~icons/cap/pause-circle.jsx")["default"];+ const IconCapPlayCircle: typeof import("~icons/cap/play-circle.jsx")["default"];+ const IconCapPresets: typeof import("~icons/cap/presets.jsx")["default"];+ const IconCapRedo: typeof import("~icons/cap/redo.jsx")["default"];+ const IconCapRestart: typeof import("~icons/cap/restart.jsx")["default"];+ const IconCapScissors: typeof import("~icons/cap/scissors.jsx")["default"];+ const IconCapSettings: typeof import("~icons/cap/settings.jsx")["default"];+ const IconCapShadow: typeof import("~icons/cap/shadow.jsx")["default"];+ const IconCapSquare: typeof import("~icons/cap/square.jsx")["default"];+ const IconCapStopCircle: typeof import("~icons/cap/stop-circle.jsx")["default"];+ const IconCapTrash: typeof import("~icons/cap/trash.jsx")["default"];+ const IconCapUndo: typeof import("~icons/cap/undo.jsx")["default"];+ const IconCapUpload: typeof import("~icons/cap/upload.jsx")["default"];+ const IconLucideBell: typeof import("~icons/lucide/bell.jsx")["default"];+ const IconLucideCamera: typeof import("~icons/lucide/camera.jsx")["default"];+ const IconLucideCheck: typeof import("~icons/lucide/check.jsx")["default"];+ const IconLucideClock: typeof import("~icons/lucide/clock.jsx")["default"];+ const IconLucideDatabase: typeof import("~icons/lucide/database.jsx")["default"];+ const IconLucideEdit: typeof import("~icons/lucide/edit.jsx")["default"];+ const IconLucideEye: typeof import("~icons/lucide/eye.jsx")["default"];+ const IconLucideFolder: typeof import("~icons/lucide/folder.jsx")["default"];+ const IconLucideHardDrive: typeof import("~icons/lucide/hard-drive.jsx")["default"];+ const IconLucideLayoutGrid: typeof import("~icons/lucide/layout-grid.jsx")["default"];+ const IconLucideLoaderCircle: typeof import("~icons/lucide/loader-circle.jsx")["default"];+ const IconLucideMessageSquarePlus: typeof import("~icons/lucide/message-square-plus.jsx")["default"];+ const IconLucideMicOff: typeof import("~icons/lucide/mic-off.jsx")["default"];+ const IconLucideRabbit: typeof import("~icons/lucide/rabbit.jsx")["default"];+ const IconLucideRotateCcw: typeof import("~icons/lucide/rotate-ccw.jsx")["default"];+ const IconLucideSearch: typeof import("~icons/lucide/search.jsx")["default"];+ const IconLucideSquarePlay: typeof import("~icons/lucide/square-play.jsx")["default"];+ const IconLucideUnplug: typeof import("~icons/lucide/unplug.jsx")["default"];+ const IconLucideVideo: typeof import("~icons/lucide/video.jsx")["default"];+ const IconLucideVolume2: typeof import("~icons/lucide/volume2.jsx")["default"];+ const IconLucideVolumeX: typeof import("~icons/lucide/volume-x.jsx")["default"];}diff --git a/packages/web-api-contract/src/desktop.ts b/packages/web-api-contract/src/desktop.tsindex 813e0a54c..1d9204542 100644--- a/packages/web-api-contract/src/desktop.ts+++ b/packages/web-api-contract/src/desktop.ts@@ -53,7 +53,7 @@ const protectedContract = c.router(method: "GET",path: "/desktop/plan",responses: {- 200: z.object({+ 200: z.object({upgraded: z.boolean(),stripeSubscriptionStatus: z.string().nullable(),}),