Open source Loom alternative. Beautiful, shareable screen recordings.
Rust appcapcossloommacnextjsnextjs15open-sourceossreactrecordrustscreen-capturescreen-recorderscreenshotsolidjstauritauri-apptypescriptvite
Rename Setup window to Onboarding
Richie McIlroy4804fd10f65f
diff --git a/apps/desktop/src-tauri/src/lib.rs b/apps/desktop/src-tauri/src/lib.rsindex f34f8849b..8660425ab 100644--- a/apps/desktop/src-tauri/src/lib.rs+++ b/apps/desktop/src-tauri/src/lib.rs@@ -3348,7 +3348,7 @@ pub async fn run(recording_logging_handle: LoggingHandle, logs_dir: PathBuf) {flags}).with_denylist(&[- CapWindowId::Setup.label().as_str(),+ CapWindowId::Onboarding.label().as_str(),CapWindowId::Main.label().as_str(),"window-capture-occluder","target-select-overlay",@@ -3893,7 +3893,7 @@ pub async fn run(recording_logging_handle: LoggingHandle, logs_dir: PathBuf) {|| label.starts_with("screenshot-editor-")|| label.as_str() == "settings"|| label.as_str() == "signin"- || label.as_str() == "setup"+ || label.as_str() == "onboarding"});if has_window {@@ -3905,7 +3905,7 @@ pub async fn run(recording_logging_handle: LoggingHandle, logs_dir: PathBuf) {|| label.starts_with("screenshot-editor-")|| label.as_str() == "settings"|| label.as_str() == "signin"- || label.as_str() == "setup"+ || label.as_str() == "onboarding"}).map(|(_, window)| window.clone()){diff --git a/apps/desktop/src-tauri/src/tray.rs b/apps/desktop/src-tauri/src/tray.rsindex e3d168734..cd8dee073 100644--- a/apps/desktop/src-tauri/src/tray.rs+++ b/apps/desktop/src-tauri/src/tray.rs@@ -330,8 +330,8 @@ fn get_current_mode(app: &AppHandle) -> RecordingMode {.unwrap_or_default()}-fn is_setup_window_open(app: &AppHandle) -> bool {- app.webview_windows().contains_key("setup")+fn is_onboarding_window_open(app: &AppHandle) -> bool {+ app.webview_windows().contains_key("onboarding")}fn create_mode_submenu(app: &AppHandle) -> tauri::Result<Submenu<tauri::Wry>> {@@ -365,7 +365,7 @@ fn create_mode_submenu(app: &AppHandle) -> tauri::Result<Submenu<tauri::Wry>> {}fn build_tray_menu(app: &AppHandle, cache: &PreviousItemsCache) -> tauri::Result<Menu<tauri::Wry>> {- if is_setup_window_open(app) {+ if is_onboarding_window_open(app) {return Menu::with_items(app,&[@@ -809,7 +809,7 @@ pub fn create_tray(app: &AppHandle) -> tauri::Result<()> {Ok(TrayItem::RequestPermissions) => {let app = app.clone();tokio::spawn(async move {- let _ = ShowCapWindow::Setup.show(&app).await;+ let _ = ShowCapWindow::Onboarding.show(&app).await;});}_ => {}diff --git a/apps/desktop/src-tauri/src/windows.rs b/apps/desktop/src-tauri/src/windows.rsindex f478a34f3..0ed6d3e80 100644--- a/apps/desktop/src-tauri/src/windows.rs+++ b/apps/desktop/src-tauri/src/windows.rs@@ -379,8 +379,6 @@ fn is_position_on_any_screen(pos_x: f64, pos_y: f64) -> bool {#[derive(Clone, Deserialize, Type)]pub enum CapWindowId {- // Contains onboarding + permissions- Setup,Main,Settings,Editor { id: u32 },@@ -402,7 +400,6 @@ impl FromStr for CapWindowId {fn from_str(s: &str) -> Result<Self, Self::Err> {Ok(match s {- "setup" => Self::Setup,"main" => Self::Main,"settings" => Self::Settings,"camera" => Self::Camera,@@ -446,7 +443,6 @@ impl FromStr for CapWindowId {impl std::fmt::Display for CapWindowId {fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {match self {- Self::Setup => write!(f, "setup"),Self::Main => write!(f, "main"),Self::Settings => write!(f, "settings"),Self::Camera => write!(f, "camera"),@@ -476,7 +472,6 @@ impl CapWindowId {pub fn title(&self) -> String {match self {- Self::Setup => "Cap Setup".to_string(),Self::Settings => "Cap Settings".to_string(),Self::WindowCaptureOccluder { .. } => "Cap Window Capture Occluder".to_string(),Self::CaptureArea => "Cap Capture Area".to_string(),@@ -495,8 +490,7 @@ impl CapWindowId {pub fn activates_dock(&self) -> bool {matches!(self,- Self::Setup- | Self::Main+ Self::Main| Self::Editor { .. }| Self::ScreenshotEditor { .. }| Self::Settings@@ -543,7 +537,6 @@ impl CapWindowId {pub fn min_size(&self) -> Option<(f64, f64)> {Some(match self {- Self::Setup => (600.0, 600.0),Self::Main => (330.0, 395.0),Self::Editor { .. } => (1275.0, 800.0),Self::ScreenshotEditor { .. } => (800.0, 600.0),@@ -559,7 +552,6 @@ impl CapWindowId {#[derive(Debug, Clone, Type, Deserialize)]pub enum ShowCapWindow {- Setup,Main {init_target_mode: Option<RecordingTargetMode>,},@@ -930,6 +922,12 @@ impl ShowCapWindow {if !matches!(self, Self::Camera { .. } | Self::InProgressRecording { .. })&& let Some(window) = self.id(app).get(app){+ if matches!(self, Self::Main { .. })+ && !permissions::do_permissions_check(false).necessary_granted()+ {+ return Box::pin(Self::Onboarding.show(app)).await;+ }+let cursor_display_id = if let Self::Main { init_target_mode } = self {if init_target_mode.is_some() {Display::get_containing_cursor()@@ -973,37 +971,6 @@ impl ShowCapWindow {let cursor_monitor = CursorMonitorInfo::get();let window = match self {- Self::Setup => {- let window = self- .window_builder(app, "/setup")- .inner_size(600.0, 600.0)- .min_inner_size(600.0, 600.0)- .resizable(false)- .maximized(false)- .focused(true)- .maximizable(false)- .shadow(true)- .build()?;-- let (pos_x, pos_y) = cursor_monitor.center_position(600.0, 600.0);- let _ = window.set_position(tauri::LogicalPosition::new(pos_x, pos_y));-- #[cfg(windows)]- {- use tauri::LogicalSize;- if let Err(e) = window.set_size(LogicalSize::new(600.0, 600.0)) {- warn!("Failed to set Setup window size on Windows: {}", e);- }- if let Err(e) = window.set_position(tauri::LogicalPosition::new(pos_x, pos_y)) {- warn!("Failed to position Setup window on Windows: {}", e);- }- }-- window.show().ok();- window.set_focus().ok();-- window- }Self::Main { init_target_mode } => {if !permissions::do_permissions_check(false).necessary_granted() {return Box::pin(Self::Onboarding.show(app)).await;@@ -2155,7 +2122,6 @@ impl ShowCapWindow {pub fn id(&self, app: &AppHandle) -> CapWindowId {match self {- ShowCapWindow::Setup => CapWindowId::Setup,ShowCapWindow::Main { .. } => CapWindowId::Main,ShowCapWindow::Settings { .. } => CapWindowId::Settings,ShowCapWindow::Editor { project_path } => {diff --git a/apps/desktop/src/App.tsx b/apps/desktop/src/App.tsxindex 3c29ea337..b021e7cbf 100644--- a/apps/desktop/src/App.tsx+++ b/apps/desktop/src/App.tsx@@ -20,7 +20,6 @@ import titlebar from "./utils/titlebar-state";const WindowChromeLayout = lazy(() => import("./routes/(window-chrome)"));const NewMainPage = lazy(() => import("./routes/(window-chrome)/new-main"));-const SetupPage = lazy(() => import("./routes/(window-chrome)/setup"));const SettingsLayout = lazy(() => import("./routes/(window-chrome)/settings"));const SettingsGeneralPage = lazy(() => import("./routes/(window-chrome)/settings/general"),@@ -148,7 +147,6 @@ function Inner() {><Route path="/" component={WindowChromeLayout}><Route path="/" component={NewMainPage} />- <Route path="/setup" component={SetupPage} /><Route path="/settings" component={SettingsLayout}><Route path="/" component={SettingsGeneralPage} /><Route path="/general" component={SettingsGeneralPage} />diff --git a/apps/desktop/src/routes/(window-chrome)/setup.tsx b/apps/desktop/src/routes/(window-chrome)/setup.tsxdeleted file mode 100644index 8570df084..000000000--- a/apps/desktop/src/routes/(window-chrome)/setup.tsx+++ /dev/null@@ -1,567 +0,0 @@-import { Button } from "@cap/ui-solid";-import { makePersisted } from "@solid-primitives/storage";-import { createTimer } from "@solid-primitives/timer";-import { getCurrentWindow } from "@tauri-apps/api/window";-import { ask } from "@tauri-apps/plugin-dialog";-import { relaunch } from "@tauri-apps/plugin-process";-import {- createEffect,- createResource,- createSignal,- For,- Match,- onCleanup,- onMount,- Show,- Switch,- startTransition,-} from "solid-js";-import { createStore } from "solid-js/store";-import ModeSelect from "~/components/ModeSelect";-import {- commands,- type OSPermission,- type OSPermissionStatus,-} from "~/utils/tauri";-import IconLucideVolumeX from "~icons/lucide/volume-x";--function isPermitted(status?: OSPermissionStatus): boolean {- return status === "granted" || status === "notNeeded";-}--type SetupPermission = {- name: string;- key: OSPermission;- description: string;- requiresManualGrant: boolean;- optional?: boolean;-};--const permissions: readonly SetupPermission[] = [- {- name: "Screen Recording",- key: "screenRecording" as const,- description:- "Add Cap in System Settings, then restart the app for changes to take effect.",- requiresManualGrant: true,- },- {- name: "Accessibility",- key: "accessibility" as const,- description:- "During recording, Cap collects mouse activity locally to generate automatic zoom in segments.",- requiresManualGrant: false,- },- {- name: "Microphone",- key: "microphone" as const,- description: "This permission is required to record audio in your Caps.",- requiresManualGrant: false,- optional: true,- },- {- name: "Camera",- key: "camera" as const,- description:- "This permission is required to record your camera in your Caps.",- requiresManualGrant: false,- optional: true,- },-];--export default function () {- const [initialCheck, setInitialCheck] = createSignal(true);- const [check, checkActions] = createResource(() =>- commands.doPermissionsCheck(initialCheck()),- );- const [currentStep, setCurrentStep] = createSignal<"permissions" | "mode">(- "permissions",- );-- createEffect(() => {- if (!initialCheck()) {- createTimer(- () => startTransition(() => checkActions.refetch()),- 250,- setInterval,- );- }- });-- const requestPermission = async (permission: OSPermission) => {- try {- await commands.requestPermission(permission);- } catch (err) {- console.error(`Error occurred while requesting permission: ${err}`);- }- setInitialCheck(false);- };-- const openSettings = async (permission: OSPermission) => {- await commands.openPermissionSettings(permission);- if (permission === "screenRecording") {- const shouldRestart = await ask(- "After adding Cap in System Settings, you'll need to restart the app for the permission to take effect.",- {- title: "Restart Required",- kind: "info",- okLabel: "Restart, I've granted permission",- cancelLabel: "No, I still need to add it",- },- );- if (shouldRestart) {- await relaunch();- }- }- setInitialCheck(false);- };-- const [showStartup, showStartupActions] = createResource(() =>- generalSettingsStore.get().then((s) => {- if (s === undefined) return true;- return !s.hasCompletedStartup;- }),- );-- const handleContinue = () => {- commands.showWindow({ Main: { init_target_mode: null } }).then(() => {- getCurrentWindow().close();- });- };-- return (- <div class="flex flex-col px-[2rem] text-[0.875rem] font-[400] flex-1 bg-gray-1 justify-evenly items-center">- {showStartup() && (- <Startup- onClose={() => {- showStartupActions.mutate(false);- }}- />- )}-- <Show when={currentStep() === "permissions"}>- <div class="flex flex-col items-center">- <IconCapLogo class="size-14 mb-3" />- <h1 class="text-[1.2rem] font-[700] mb-1 text-[--text-primary]">- Permissions Required- </h1>- <p class="text-gray-11">Cap needs permissions to run properly.</p>- </div>-- <ul class="flex flex-col gap-4 py-8">- <For each={permissions}>- {(permission) => {- const permissionCheck = () => check()?.[permission.key];-- return (- <Show when={permissionCheck() !== "notNeeded"}>- <li class="flex flex-row items-center gap-4">- <div class="flex flex-col flex-[2]">- <span class="font-[500] text-[0.875rem] text-[--text-primary]">- {permission.name} Permission- </span>- <span class="text-[--text-secondary]">- {permission.description}- </span>- </div>- <Button- class="flex-1 shrink-0"- onClick={() =>- permission.requiresManualGrant ||- permissionCheck() === "denied"- ? openSettings(permission.key)- : requestPermission(permission.key)- }- disabled={isPermitted(permissionCheck())}- >- {permissionCheck() === "granted"- ? "Granted"- : permission.requiresManualGrant ||- permissionCheck() === "denied"- ? "Open Settings"- : "Grant Permission"}- </Button>- </li>- </Show>- );- }}- </For>- </ul>-- <Button- class="px-12"- size="lg"- disabled={- permissions.find(- (p) => !p.optional && !isPermitted(check()?.[p.key]),- ) !== undefined- }- onClick={() => setCurrentStep("mode")}- >- Continue- </Button>- </Show>-- <Show when={currentStep() === "mode"}>- <div class="flex flex-col items-center">- <IconCapLogo class="size-14 mb-3" />- <h1 class="text-[1.2rem] font-[700] mb-1 text-[--text-primary]">- Select Recording Mode- </h1>- <p class="text-gray-11">- Choose how you want to record with Cap. You can change this later.- </p>- </div>-- <div class="w-full py-4">- <ModeSelect />- </div>-- <Button class="px-12" size="lg" onClick={handleContinue}>- Continue to Cap- </Button>- </Show>- </div>- );-}--import { type as ostype } from "@tauri-apps/plugin-os";-import { cx } from "cva";-import { Portal } from "solid-js/web";-import CaptionControlsWindows11 from "~/components/titlebar/controls/CaptionControlsWindows11";-import { generalSettingsStore } from "~/store";-import cloud1 from "../../assets/illustrations/cloud-1.png";-import cloud2 from "../../assets/illustrations/cloud-2.png";-import cloud3 from "../../assets/illustrations/cloud-3.png";-import startupAudio from "../../assets/tears-and-fireflies-adi-goldstein.mp3";--function Startup(props: { onClose: () => void }) {- const [audioState, setAudioState] = makePersisted(- createStore({ isMuted: false }),- { name: "audioSettings" },- );-- const [isExiting, setIsExiting] = createSignal(false);-- const audio = new Audio(startupAudio);- if (!audioState.isMuted) audio.play();-- // Add refs to store animation objects- let cloud1Animation: Animation | undefined;- let cloud2Animation: Animation | undefined;- let cloud3Animation: Animation | undefined;-- const [isLogoAnimating, setIsLogoAnimating] = createSignal(false);-- const handleLogoClick = () => {- if (!isLogoAnimating()) {- setIsLogoAnimating(true);- setTimeout(() => setIsLogoAnimating(false), 1000);- }- };-- const handleStartupCompleted = () =>- generalSettingsStore.set({- hasCompletedStartup: true,- });-- const handleGetStarted = async () => {- setIsExiting(true);-- // Cancel ongoing cloud animations- cloud1Animation?.cancel();- cloud2Animation?.cancel();- cloud3Animation?.cancel();-- await handleStartupCompleted();-- // Wait for animation to complete before showing new window and closing- setTimeout(async () => {- props.onClose();- }, 600);- };-- onCleanup(() => audio.pause());-- onMount(() => {- const cloud1El = document.getElementById("cloud-1");- const cloud2El = document.getElementById("cloud-2");- const cloud3El = document.getElementById("cloud-3");-- // Top right cloud - gentle diagonal movement- cloud1Animation = cloud1El?.animate(- [- { transform: "translate(0, 0)" },- { transform: "translate(-20px, 10px)" },- { transform: "translate(0, 0)" },- ],- {- duration: 30000,- iterations: Infinity,- easing: "linear",- },- );-- // Top left cloud - gentle diagonal movement- cloud2Animation = cloud2El?.animate(- [- { transform: "translate(0, 0)" },- { transform: "translate(20px, 10px)" },- { transform: "translate(0, 0)" },- ],- {- duration: 35000,- iterations: Infinity,- easing: "linear",- },- );-- // Bottom cloud - slow rise up with subtle horizontal movement- cloud3Animation = cloud3El?.animate(- [- { transform: "translate(-50%, 20px)" },- { transform: "translate(-48%, 0)" },- { transform: "translate(-50%, 0)" },- ],- {- duration: 60000,- iterations: 1,- easing: "cubic-bezier(0.4, 0, 0.2, 1)",- fill: "forwards",- },- );- });-- const toggleMute = async () => {- setAudioState("isMuted", (m) => !m);-- audio.muted = audioState.isMuted;- };-- return (- <Portal>- <div class="absolute inset-0 z-40">- <header- class="absolute top-0 inset-x-0 h-12 z-10"- data-tauri-drag-region- >- <div- class={cx(- "flex justify-between items-center gap-[0.25rem] w-full h-full z-10",- ostype() === "windows" ? "flex-row" : "flex-row-reverse",- )}- data-tauri-drag-region- >- <button- onClick={toggleMute}- class={cx(- "mx-4 text-solid-white hover:text-[#DDD] transition-colors",- isExiting() && "opacity-0",- )}- >- {audioState.isMuted ? (- <IconLucideVolumeX class="w-6 h-6" />- ) : (- <IconLucideVolume2 class="w-6 h-6" />- )}- </button>- {ostype() === "windows" && <CaptionControlsWindows11 />}- </div>- </header>- <style>- {`- body {- background: transparent !important;- }-- .content-container {- transition: all 600ms cubic-bezier(0.4, 0, 0.2, 1);- }-- .content-container.exiting {- opacity: 0;- transform: scale(1.1);- }-- .custom-bg {- transition: all 600ms cubic-bezier(0.4, 0, 0.2, 1);- }-- .cloud-1.exiting {- transform: translate(-200px, -150px) !important;- opacity: 0 !important;- }-- .cloud-2.exiting {- transform: translate(200px, -150px) !important;- opacity: 0 !important;- }-- .cloud-3.exiting {- transform: translate(-50%, 200px) !important;- opacity: 0 !important;- }-- .cloud-transition {- transition: transform 600ms cubic-bezier(0.4, 0, 0.2, 1),- opacity 600ms cubic-bezier(0.4, 0, 0.2, 1) !important;- }-- .cloud-image {- max-width: 100vw;- height: auto;- }-- .grain {- position: fixed;- top: -150%;- left: -50%;- right: -50%;- bottom: -150%;- width: 200%;- height: 400%;- background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.5' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");- pointer-events: none;- opacity: 0.5;- z-index: 200;- mix-blend-mode: overlay;- }-- /* Overlay for fade to black */- .fade-overlay {- position: fixed;- top: 0;- left: 0;- right: 0;- bottom: 0;- background: transparent;- opacity: 0;- pointer-events: none;- transition: opacity 600ms cubic-bezier(0.4, 0, 0.2, 1);- z-index: 1000;- }-- .fade-overlay.exiting {- opacity: 1;- }-- @keyframes bounce {- 0%, 100% {- transform: translateY(0);- }- 50% {- transform: translateY(-20px);- }- }-- .logo-bounce {- animation: bounce 1s cubic-bezier(0.36, 0, 0.66, -0.56) forwards;- }- `}- </style>- {/* Add the fade overlay */}- <div class={`fade-overlay ${isExiting() ? "exiting" : ""}`} />- <div- style={{ "transition-duration": "600ms" }}- class={cx(- "flex flex-col h-screen custom-bg relative overflow-hidden transition-opacity text-solid-white",- isExiting() && "exiting opacity-0",- )}- >- <div class="grain" />-- {/* Floating clouds */}- <div- id="cloud-1"- class={`absolute top-0 right-0 opacity-70 pointer-events-none cloud-transition cloud-1 ${- isExiting() ? "exiting" : ""- }`}- >- <img- class="cloud-image w-[100vw] md:w-[80vw] -mr-40"- src={cloud1}- alt="Cloud One"- />- </div>- <div- id="cloud-2"- class={`absolute top-0 left-0 opacity-70 pointer-events-none cloud-transition cloud-2 ${- isExiting() ? "exiting" : ""- }`}- >- <img- class="cloud-image w-[100vw] md:w-[80vw] -ml-40"- src={cloud2}- alt="Cloud Two"- />- </div>- <div- id="cloud-3"- class={`absolute -bottom-[15%] left-1/2 -translate-x-1/2 opacity-70 pointer-events-none cloud-transition cloud-3 ${- isExiting() ? "exiting" : ""- }`}- >- <img- class="cloud-image w-[180vw] md:w-[180vw]"- src={cloud3}- alt="Cloud Three"- />- </div>-- {/* Main content */}- <div- class={`content-container flex flex-col items-center justify-center flex-1 relative px-4 ${- isExiting() ? "exiting" : ""- }`}- >- <div class="text-center mb-8">- <div- onClick={handleLogoClick}- class="cursor-pointer inline-block"- >- <IconCapLogo- class={`w-20 h-24 mx-auto drop-shadow-[0_0_100px_rgba(0,0,0,0.2)]- ${isLogoAnimating() ? "logo-bounce" : ""}`}- />- </div>- <h1 class="text-5xl md:text-5xl font-bold mb-4 drop-shadow-[0_0_20px_rgba(0,0,0,0.2)]">- Welcome to Cap- </h1>- <p class="text-2xl opacity-80 max-w-md mx-auto drop-shadow-[0_0_20px_rgba(0,0,0,0.2)]">- Beautiful screen recordings, owned by you.- </p>- </div>-- <Switch>- <Match when={ostype() !== "windows"}>- <Button- class="px-12 text-lg shadow-[0_0_30px_rgba(0,0,0,0.1)]"- variant="gray"- size="lg"- onClick={handleGetStarted}- >- Get Started- </Button>- </Match>- <Match when={ostype() === "windows"}>- <Button- class="px-12"- size="lg"- onClick={async () => {- handleStartupCompleted();- await commands.showWindow({- Main: { init_target_mode: null },- });- getCurrentWindow().close();- }}- >- Continue to Cap- </Button>- </Match>- </Switch>- </div>- </div>- </div>- </Portal>- );-}diff --git a/apps/desktop/src/routes/debug.tsx b/apps/desktop/src/routes/debug.tsxindex 0a6c7d656..9598426a3 100644--- a/apps/desktop/src/routes/debug.tsx+++ b/apps/desktop/src/routes/debug.tsx@@ -62,9 +62,9 @@ export default function Debug() {<div class="p-2 mb-4"><buttonclass="bg-blue-500 hover:bg-blue-600 text-white font-medium py-2 px-4 rounded"- onClick={() => commands.showWindow("Setup")}+ onClick={() => commands.showWindow("Onboarding")}>- Show Setup Window+ Show Onboarding Window</button><buttonclass="bg-blue-500 hover:bg-blue-600 text-white font-medium py-2 px-4 rounded"diff --git a/apps/desktop/src/utils/tauri.ts b/apps/desktop/src/utils/tauri.tsindex 9f435de52..ae0dc1428 100644--- a/apps/desktop/src/utils/tauri.ts+++ b/apps/desktop/src/utils/tauri.ts@@ -557,7 +557,7 @@ export type SerializedScreenshotEditorInstance = { framesSocketUrl: string; pathexport type SetCaptureAreaPending = booleanexport type ShadowConfiguration = { size: number; opacity: number; blur: number }export type SharingMeta = { id: string; link: string }-export type ShowCapWindow = "Setup" | { Main: { init_target_mode: RecordingTargetMode | null } } | { Settings: { page: string | null } } | { Editor: { project_path: string } } | "RecordingsOverlay" | { WindowCaptureOccluder: { screen_id: DisplayId } } | { TargetSelectOverlay: { display_id: DisplayId; target_mode: RecordingTargetMode | null } } | { CaptureArea: { screen_id: DisplayId } } | { Camera: { centered: boolean } } | { InProgressRecording: { countdown: number | null } } | "Upgrade" | "ModeSelect" | { ScreenshotEditor: { path: string } } | "Onboarding"+export type ShowCapWindow = { Main: { init_target_mode: RecordingTargetMode | null } } | { Settings: { page: string | null } } | { Editor: { project_path: string } } | "RecordingsOverlay" | { WindowCaptureOccluder: { screen_id: DisplayId } } | { TargetSelectOverlay: { display_id: DisplayId; target_mode: RecordingTargetMode | null } } | { CaptureArea: { screen_id: DisplayId } } | { Camera: { centered: boolean } } | { InProgressRecording: { countdown: number | null } } | "Upgrade" | "ModeSelect" | { ScreenshotEditor: { path: string } } | "Onboarding"export type SingleSegment = { display: VideoMeta; camera?: VideoMeta | null; audio?: AudioMeta | null; cursor?: string | null }export type StartRecordingInputs = { capture_target: ScreenCaptureTarget; capture_system_audio?: boolean; mode: RecordingMode; organization_id?: string | null }export type StereoMode = "stereo" | "monoL" | "monoR"