Open source Loom alternative. Beautiful, shareable screen recordings.
Rust appcapcossloommacnextjsnextjs15open-sourceossreactrecordrustscreen-capturescreen-recorderscreenshotsolidjstauritauri-apptypescriptvite
// 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 submitCameraPresentation(nonce: string, input: CameraPresentationInput | null, error: string | null) : Promise<null> {
return await TAURI_INVOKE("submit_camera_presentation", { nonce, input, error });
},
async getCleanCaptureState() : Promise<Snapshot> {
return await TAURI_INVOKE("get_clean_capture_state");
},
async revealCaptureWindow(generation: number, targetOverlay: string | null) : Promise<boolean> {
return await TAURI_INVOKE("reveal_capture_window", { generation, targetOverlay });
},
async animatedGradientCatalog() : Promise<AnimatedGradientCatalog> {
return await TAURI_INVOKE("animated_gradient_catalog");
},
async randomAnimatedGradient() : Promise<AnimatedGradientConfig> {
return await TAURI_INVOKE("random_animated_gradient");
},
async setMicInput(label: string | null) : Promise<null> {
return await TAURI_INVOKE("set_mic_input", { label });
},
async setCameraInput(id: DeviceOrModelID | null, skipCameraWindow: boolean | null) : Promise<null> {
return await TAURI_INVOKE("set_camera_input", { id, skipCameraWindow });
},
async setNativeCameraPreviewEnabled(enabled: boolean) : Promise<null> {
return await TAURI_INVOKE("set_native_camera_preview_enabled", { enabled });
},
async gpuiAppAvailable() : Promise<boolean> {
return await TAURI_INVOKE("gpui_app_available");
},
/**
* Close this app and open the native one. The setting has already been written
* by the caller, so a failure here has to be reported rather than swallowed:
* the page reverts it.
*/
async switchToGpuiApp() : Promise<null> {
return await TAURI_INVOKE("switch_to_gpui_app");
},
async setRecordingMode(mode: RecordingMode) : Promise<null> {
return await TAURI_INVOKE("set_recording_mode", { mode });
},
async uploadLogs() : Promise<null> {
return await TAURI_INVOKE("upload_logs");
},
async getSystemDiagnostics() : Promise<SystemDiagnostics> {
return await TAURI_INVOKE("get_system_diagnostics");
},
async runDiagnostic(options: DiagnosticOptions) : Promise<DiagnosticRunResult> {
return await TAURI_INVOKE("run_diagnostic", { options });
},
async uploadDiagnosticReport(reportPath: string) : Promise<null> {
return await TAURI_INVOKE("upload_diagnostic_report", { reportPath });
},
async revealDiagnosticReport(reportPath: string) : Promise<null> {
return await TAURI_INVOKE("reveal_diagnostic_report", { reportPath });
},
async getCliInstallStatus() : Promise<CliInstallStatus> {
return await TAURI_INVOKE("get_cli_install_status");
},
async installCli() : Promise<CliInstallStatus> {
return await TAURI_INVOKE("install_cli");
},
async uninstallCli() : Promise<CliInstallStatus> {
return await TAURI_INVOKE("uninstall_cli");
},
async startRecording(inputs: StartRecordingInputs) : Promise<RecordingAction> {
return await TAURI_INVOKE("start_recording", { inputs });
},
async stopRecording() : Promise<null> {
return await TAURI_INVOKE("stop_recording");
},
async pauseRecording() : Promise<null> {
return await TAURI_INVOKE("pause_recording");
},
async getRecordingPauseState() : Promise<boolean | null> {
return await TAURI_INVOKE("get_recording_pause_state");
},
async resumeRecording() : Promise<null> {
return await TAURI_INVOKE("resume_recording");
},
async togglePauseRecording() : Promise<null> {
return await TAURI_INVOKE("toggle_pause_recording");
},
async setMicRecordingMuted(muted: boolean) : Promise<null> {
return await TAURI_INVOKE("set_mic_recording_muted", { muted });
},
async restartRecording() : Promise<RecordingAction> {
return await TAURI_INVOKE("restart_recording");
},
async deleteRecording() : Promise<null> {
return await TAURI_INVOKE("delete_recording");
},
async takeScreenshot(target: ScreenCaptureTarget) : Promise<string> {
return await TAURI_INVOKE("take_screenshot", { target });
},
async importCurrentDesktopBackground(projectPath: string) : Promise<string> {
return await TAURI_INVOKE("import_current_desktop_background", { projectPath });
},
async getDefaultProjectConfig() : Promise<ProjectConfiguration> {
return await TAURI_INVOKE("get_default_project_config");
},
async listCameras() : Promise<CameraInfo[]> {
return await TAURI_INVOKE("list_cameras");
},
async getCameraFormats(deviceId: string) : Promise<CameraWithFormats | null> {
return await TAURI_INVOKE("get_camera_formats", { deviceId });
},
async getMicrophoneInfo(name: string) : Promise<MicrophoneInfo | null> {
return await TAURI_INVOKE("get_microphone_info", { name });
},
async listCaptureWindows() : Promise<CaptureWindow[]> {
return await TAURI_INVOKE("list_capture_windows");
},
async listCaptureDisplays() : Promise<CaptureDisplay[]> {
return await TAURI_INVOKE("list_capture_displays");
},
async listDisplaysWithThumbnails() : Promise<CaptureDisplayWithThumbnail[]> {
return await TAURI_INVOKE("list_displays_with_thumbnails");
},
async listWindowsWithThumbnails() : Promise<CaptureWindowWithThumbnail[]> {
return await TAURI_INVOKE("list_windows_with_thumbnails");
},
async refreshWindowContentProtection() : Promise<null> {
return await TAURI_INVOKE("refresh_window_content_protection");
},
async restoreMainWindowGeometry() : Promise<boolean> {
return await TAURI_INVOKE("restore_main_window_geometry");
},
async getDefaultExcludedWindows() : Promise<WindowExclusion[]> {
return await TAURI_INVOKE("get_default_excluded_windows");
},
async listAudioDevices() : Promise<string[]> {
return await TAURI_INVOKE("list_audio_devices");
},
async listSystemFonts() : Promise<string[]> {
return await TAURI_INVOKE("list_system_fonts");
},
async closeRecordingsOverlayWindow() : Promise<void> {
await TAURI_INVOKE("close_recordings_overlay_window");
},
async setFakeWindowBounds(name: string, bounds: LogicalBounds) : Promise<null> {
return await TAURI_INVOKE("set_fake_window_bounds", { name, bounds });
},
async removeFakeWindow(name: string) : Promise<null> {
return await TAURI_INVOKE("remove_fake_window", { name });
},
async focusCapturesPanel() : Promise<void> {
await TAURI_INVOKE("focus_captures_panel");
},
async getCurrentRecording() : Promise<JsonValue<CurrentRecording | null>> {
return await TAURI_INVOKE("get_current_recording");
},
async beginExportSession() : Promise<void> {
await TAURI_INVOKE("begin_export_session");
},
async endExportSession() : Promise<void> {
await TAURI_INVOKE("end_export_session");
},
async cancelExport(exportId: string) : Promise<boolean> {
return await TAURI_INVOKE("cancel_export", { exportId });
},
async cancelCurrentWindowExports() : Promise<void> {
await TAURI_INVOKE("cancel_current_window_exports");
},
async exportVideo(projectPath: string, progress: TAURI_CHANNEL<FramesRendered>, settings: ExportSettings) : Promise<string> {
return await TAURI_INVOKE("export_video", { projectPath, progress, settings });
},
async exportVideoWithId(projectPath: string, progress: TAURI_CHANNEL<FramesRendered>, settings: ExportSettings, exportId: string) : Promise<string> {
return await TAURI_INVOKE("export_video_with_id", { projectPath, progress, settings, exportId });
},
async exportVideoToFile(projectPath: string, progress: TAURI_CHANNEL<FramesRendered>, settings: ExportSettings, fileName: string, fileType: string) : Promise<string> {
return await TAURI_INVOKE("export_video_to_file", { projectPath, progress, settings, fileName, fileType });
},
async getExportEstimates(path: string, settings: ExportSettings, onEstimate: TAURI_CHANNEL<ExportEstimates>) : Promise<ExportEstimates> {
return await TAURI_INVOKE("get_export_estimates", { path, settings, onEstimate });
},
async cancelExportEstimates() : Promise<void> {
await TAURI_INVOKE("cancel_export_estimates");
},
async generateExportPreview(projectPath: string, frameTime: number, settings: ExportPreviewSettings) : Promise<ExportPreviewResult> {
return await TAURI_INVOKE("generate_export_preview", { projectPath, frameTime, settings });
},
async generateExportPreviewFast(frameTime: number, settings: ExportPreviewSettings) : Promise<ExportPreviewResult> {
return await TAURI_INVOKE("generate_export_preview_fast", { frameTime, settings });
},
async startVideoImport(sourcePath: string) : Promise<string> {
return await TAURI_INVOKE("start_video_import", { sourcePath });
},
async addExistingRecordingToEditor(sourcePath: string) : Promise<number> {
return await TAURI_INVOKE("add_existing_recording_to_editor", { sourcePath });
},
async startImageImport(sourcePath: string) : Promise<string> {
return await TAURI_INVOKE("start_image_import", { sourcePath });
},
async checkImportReady(projectPath: string) : Promise<boolean> {
return await TAURI_INVOKE("check_import_ready", { projectPath });
},
async copyFileToPath(src: string, dst: string) : Promise<null> {
return await TAURI_INVOKE("copy_file_to_path", { src, dst });
},
async copyVideoToClipboard(path: string) : Promise<null> {
return await TAURI_INVOKE("copy_video_to_clipboard", { path });
},
async copyScreenshotToClipboard(path: string) : Promise<null> {
return await TAURI_INVOKE("copy_screenshot_to_clipboard", { path });
},
async copyImageToClipboard(data: number[]) : Promise<null> {
return await TAURI_INVOKE("copy_image_to_clipboard", { data });
},
async copyRenderedScreenshotToClipboard() : Promise<null> {
return await TAURI_INVOKE("copy_rendered_screenshot_to_clipboard");
},
async openFilePath(path: string) : Promise<null> {
return await TAURI_INVOKE("open_file_path", { path });
},
async revealItemInDir(path: string) : Promise<null> {
return await TAURI_INVOKE("reveal_item_in_dir", { path });
},
async getVideoMetadata(path: string) : Promise<VideoRecordingMetadata> {
return await TAURI_INVOKE("get_video_metadata", { path });
},
async createEditorInstance() : Promise<SerializedEditorInstance> {
return await TAURI_INVOKE("create_editor_instance");
},
async createPreparingEditorFrame(requestEpoch: number) : Promise<string | null> {
return await TAURI_INVOKE("create_preparing_editor_frame", { requestEpoch });
},
async getPreparingEditorState(requestEpoch: number) : Promise<PreparingEditorChanged | null> {
return await TAURI_INVOKE("get_preparing_editor_state", { requestEpoch });
},
async seekPreparingEditor(requestEpoch: number, jobId: string, seconds: number) : Promise<null> {
return await TAURI_INVOKE("seek_preparing_editor", { requestEpoch, jobId, seconds });
},
async setPreparingEditorPlaying(requestEpoch: number, jobId: string, playing: boolean) : Promise<null> {
return await TAURI_INVOKE("set_preparing_editor_playing", { requestEpoch, jobId, playing });
},
async stopPreparingEditorFrame(requestEpoch: number) : Promise<null> {
return await TAURI_INVOKE("stop_preparing_editor_frame", { requestEpoch });
},
async getEditorProjectPath() : Promise<string> {
return await TAURI_INVOKE("get_editor_project_path");
},
async getMicWaveforms() : Promise<number[][]> {
return await TAURI_INVOKE("get_mic_waveforms");
},
async getSystemAudioWaveforms() : Promise<number[][]> {
return await TAURI_INVOKE("get_system_audio_waveforms");
},
async listAudioLibrary() : Promise<AudioLibraryTrack[]> {
return await TAURI_INVOKE("list_audio_library");
},
async addAudioLibraryTrack(id: string) : Promise<ImportedAudioTrack> {
return await TAURI_INVOKE("add_audio_library_track", { id });
},
async importAudioTrackFile(sourcePath: string) : Promise<ImportedAudioTrack> {
return await TAURI_INVOKE("import_audio_track_file", { sourcePath });
},
async startPlayback(fps: number, resolutionBase: XY<number>) : Promise<null> {
return await TAURI_INVOKE("start_playback", { fps, resolutionBase });
},
async stopPlayback() : Promise<null> {
return await TAURI_INVOKE("stop_playback");
},
async commitEditorPreparingFrame(instanceId: string, frameNumber: number, fps: number) : Promise<boolean> {
return await TAURI_INVOKE("commit_editor_preparing_frame", { instanceId, frameNumber, fps });
},
async startEditorHandoffPlayback(instanceId: string, frameNumber: number, fps: number, resolutionBase: XY<number>) : Promise<string> {
return await TAURI_INVOKE("start_editor_handoff_playback", { instanceId, frameNumber, fps, resolutionBase });
},
async stopEditorHandoffPlayback(instanceId: string, playbackId: string) : Promise<null> {
return await TAURI_INVOKE("stop_editor_handoff_playback", { instanceId, playbackId });
},
async setPlayheadPosition(frameNumber: number) : Promise<null> {
return await TAURI_INVOKE("set_playhead_position", { frameNumber });
},
async setProjectConfig(config: ProjectConfiguration) : Promise<null> {
return await TAURI_INVOKE("set_project_config", { config });
},
async updateProjectConfigInMemory(config: ProjectConfiguration, frameNumber: number | null, fps: number | null, resolutionBase: XY<number> | null) : Promise<null> {
return await TAURI_INVOKE("update_project_config_in_memory", { config, frameNumber, fps, resolutionBase });
},
async generateZoomSegmentsFromClicks() : Promise<ZoomSegment[]> {
return await TAURI_INVOKE("generate_zoom_segments_from_clicks");
},
async generateKeyboardSegments(groupingThresholdMs: number, lingerDurationMs: number, showModifiers: boolean, showSpecialKeys: boolean) : Promise<KeyboardTrackSegment[]> {
return await TAURI_INVOKE("generate_keyboard_segments", { groupingThresholdMs, lingerDurationMs, showModifiers, showSpecialKeys });
},
async renderScreenshotForExport() : Promise<number[]> {
return await TAURI_INVOKE("render_screenshot_for_export");
},
async renderScreenshotProjectForExport(path: string) : Promise<ScreenshotProjectExport> {
return await TAURI_INVOKE("render_screenshot_project_for_export", { path });
},
async getScreenshotProjectShareState(path: string) : Promise<ScreenshotProjectShareState> {
return await TAURI_INVOKE("get_screenshot_project_share_state", { path });
},
async openPermissionSettings(permission: OSPermission) : Promise<void> {
await TAURI_INVOKE("open_permission_settings", { permission });
},
async doPermissionsCheck(initialCheck: boolean) : Promise<OSPermissionsCheck> {
return await TAURI_INVOKE("do_permissions_check", { initialCheck });
},
async requestPermission(permission: OSPermission) : Promise<void> {
await TAURI_INVOKE("request_permission", { permission });
},
async getDevicesSnapshot() : Promise<DevicesUpdated> {
return await TAURI_INVOKE("get_devices_snapshot");
},
async uploadExportedVideo(path: string, mode: UploadMode, channel: TAURI_CHANNEL<UploadProgress>, organizationId: string | null) : Promise<UploadResult> {
return await TAURI_INVOKE("upload_exported_video", { path, mode, channel, organizationId });
},
async copyCurrentScreenshotShareLink(projectPath: string, contentHash: string) : Promise<UploadResult | null> {
return await TAURI_INVOKE("copy_current_screenshot_share_link", { projectPath, contentHash });
},
async uploadScreenshot(screenshotPath: string) : Promise<UploadResult> {
return await TAURI_INVOKE("upload_screenshot", { screenshotPath });
},
async uploadRenderedScreenshot(imageBytes: number[], contentType: string, projectPath: string, contentHash: string | null) : Promise<UploadResult> {
return await TAURI_INVOKE("upload_rendered_screenshot", { imageBytes, contentType, projectPath, contentHash });
},
async createScreenshotEditorInstance() : Promise<SerializedScreenshotEditorInstance> {
return await TAURI_INVOKE("create_screenshot_editor_instance");
},
async updateScreenshotConfig(config: ProjectConfiguration, save: boolean, revision: number) : Promise<null> {
return await TAURI_INVOKE("update_screenshot_config", { config, save, revision });
},
async prewarmScreenshotBackground(path: string) : Promise<null> {
return await TAURI_INVOKE("prewarm_screenshot_background", { path });
},
async recognizeScreenshotText(region: ScreenshotOcrRegion) : Promise<ScreenshotOcrResult> {
return await TAURI_INVOKE("recognize_screenshot_text", { region });
},
async getRecordingMeta(path: string, fileType: FileType) : Promise<RecordingMetaWithMetadata> {
return await TAURI_INVOKE("get_recording_meta", { path, fileType });
},
async saveFileDialog(fileName: string, fileType: string) : Promise<string | null> {
return await TAURI_INVOKE("save_file_dialog", { fileName, fileType });
},
async listRecordings() : Promise<([string, RecordingMetaWithMetadata])[]> {
return await TAURI_INVOKE("list_recordings");
},
async listRecentRecordings() : Promise<([string, RecordingMetaWithMetadata])[]> {
return await TAURI_INVOKE("list_recent_recordings");
},
async listScreenshots() : Promise<([string, ScreenshotMetaWithMetadata])[]> {
return await TAURI_INVOKE("list_screenshots");
},
async listRecentScreenshots() : Promise<([string, ScreenshotMetaWithMetadata])[]> {
return await TAURI_INVOKE("list_recent_screenshots");
},
async checkUpgradedAndUpdate() : Promise<boolean> {
return await TAURI_INVOKE("check_upgraded_and_update");
},
async openExternalLink(url: string) : Promise<null> {
return await TAURI_INVOKE("open_external_link", { url });
},
async setHotkey(action: HotkeyAction, hotkey: Hotkey | null) : Promise<null> {
return await TAURI_INVOKE("set_hotkey", { action, hotkey });
},
async resetCameraPermissions() : Promise<null> {
return await TAURI_INVOKE("reset_camera_permissions");
},
async resetMicrophonePermissions() : Promise<null> {
return await TAURI_INVOKE("reset_microphone_permissions");
},
async clearPresets() : Promise<null> {
return await TAURI_INVOKE("clear_presets");
},
async isCameraWindowOpen() : Promise<boolean> {
return await TAURI_INVOKE("is_camera_window_open");
},
async seekTo(frameNumber: number) : Promise<null> {
return await TAURI_INVOKE("seek_to", { frameNumber });
},
async getDisplayFrameForCropping(fps: number) : Promise<number[]> {
return await TAURI_INVOKE("get_display_frame_for_cropping", { fps });
},
async getClipThumbnail(recordingSegment: number, time: number) : Promise<string> {
return await TAURI_INVOKE("get_clip_thumbnail", { recordingSegment, time });
},
async positionTrafficLights(controlsInset: [number, number] | null) : Promise<void> {
await TAURI_INVOKE("position_traffic_lights", { controlsInset });
},
async setTheme(theme: AppTheme) : Promise<void> {
await TAURI_INVOKE("set_theme", { theme });
},
async setTeleprompterWindowLevel(alwaysOnTop: boolean) : Promise<void> {
await TAURI_INVOKE("set_teleprompter_window_level", { alwaysOnTop });
},
async setTeleprompterWindowOpacity(opacity: number) : Promise<void> {
await TAURI_INVOKE("set_teleprompter_window_opacity", { opacity });
},
async applyMacosLiquidGlassBackground(enabled: boolean, radius: number) : Promise<boolean> {
return await TAURI_INVOKE("apply_macos_liquid_glass_background", { enabled, radius });
},
async globalMessageDialog(message: string) : Promise<void> {
await TAURI_INVOKE("global_message_dialog", { message });
},
async showWindow(window: ShowCapWindow) : Promise<null> {
return await TAURI_INVOKE("show_window", { window });
},
async writeClipboardString(text: string) : Promise<null> {
return await TAURI_INVOKE("write_clipboard_string", { text });
},
async performHapticFeedback(pattern: HapticPattern | null, time: HapticPerformanceTime | null) : Promise<null> {
return await TAURI_INVOKE("perform_haptic_feedback", { pattern, time });
},
/**
* Check if system audio capture is supported on the current platform and OS version.
* On macOS, system audio capture requires macOS 13.0 or later.
* On Windows/Linux, this may have different requirements.
*/
async isSystemAudioCaptureSupported() : Promise<boolean> {
return await TAURI_INVOKE("is_system_audio_capture_supported");
},
async listFails() : Promise<{ [key in string]: boolean }> {
return await TAURI_INVOKE("list_fails");
},
async setFail(name: string, value: boolean) : Promise<void> {
await TAURI_INVOKE("set_fail", { name, value });
},
async updateAuthPlan() : Promise<void> {
await TAURI_INVOKE("update_auth_plan");
},
async setWindowTransparent(value: boolean) : Promise<void> {
await TAURI_INVOKE("set_window_transparent", { value });
},
async getEditorMeta() : Promise<RecordingMeta> {
return await TAURI_INVOKE("get_editor_meta");
},
async getRecordingMetaByPath(projectPath: string) : Promise<RecordingMeta> {
return await TAURI_INVOKE("get_recording_meta_by_path", { projectPath });
},
async openEditorRecordingMain(projectPath: string) : Promise<null> {
return await TAURI_INVOKE("open_editor_recording_main", { projectPath });
},
async cancelEditorRecordingFlow() : Promise<null> {
return await TAURI_INVOKE("cancel_editor_recording_flow");
},
async getEditorRecordingTarget() : Promise<EditorRecordingFlowInfo | null> {
return await TAURI_INVOKE("get_editor_recording_target");
},
async deleteRecordingDirectory(path: string) : Promise<null> {
return await TAURI_INVOKE("delete_recording_directory", { path });
},
async setPrettyName(prettyName: string) : Promise<null> {
return await TAURI_INVOKE("set_pretty_name", { prettyName });
},
async setServerUrl(serverUrl: string) : Promise<null> {
return await TAURI_INVOKE("set_server_url", { serverUrl });
},
async pickRecordingsFolder() : Promise<string | null> {
return await TAURI_INVOKE("pick_recordings_folder");
},
async resetRecordingsFolder() : Promise<null> {
return await TAURI_INVOKE("reset_recordings_folder");
},
async countRecordingsToMigrate() : Promise<number> {
return await TAURI_INVOKE("count_recordings_to_migrate");
},
async migrateRecordingsToCurrentDir() : Promise<RecordingsMigrationSummary> {
return await TAURI_INVOKE("migrate_recordings_to_current_dir");
},
async setCameraPreviewState(state: CameraPreviewState) : Promise<null> {
return await TAURI_INVOKE("set_camera_preview_state", { state });
},
async setCameraWindowPosition(x: number, y: number) : Promise<null> {
return await TAURI_INVOKE("set_camera_window_position", { x, y });
},
async ignoreCameraWindowPosition(durationMs: number) : Promise<null> {
return await TAURI_INVOKE("ignore_camera_window_position", { durationMs });
},
async awaitCameraPreviewReady() : Promise<boolean> {
return await TAURI_INVOKE("await_camera_preview_ready");
},
async destroyCameraWindow() : Promise<null> {
return await TAURI_INVOKE("destroy_camera_window");
},
async refreshCameraFeed() : Promise<null> {
return await TAURI_INVOKE("refresh_camera_feed");
},
async createDir(path: string, recursive: boolean) : Promise<null> {
return await TAURI_INVOKE("create_dir", { path, recursive });
},
async saveModelFile(path: string, data: number[]) : Promise<null> {
return await TAURI_INVOKE("save_model_file", { path, data });
},
async transcribeAudio(videoPath: string, modelPath: string, language: string, engine: TranscriptionEngine) : Promise<CaptionData> {
return await TAURI_INVOKE("transcribe_audio", { videoPath, modelPath, language, engine });
},
async saveCaptions(videoId: string, captions: CaptionData) : Promise<null> {
return await TAURI_INVOKE("save_captions", { videoId, captions });
},
async loadCaptions(videoId: string) : Promise<CaptionData | null> {
return await TAURI_INVOKE("load_captions", { videoId });
},
async getModelDownloadStatus(targetPath: string) : Promise<ModelDownloadStatus | null> {
return await TAURI_INVOKE("get_model_download_status", { targetPath });
},
async downloadWhisperModel(modelName: string, outputPath: string) : Promise<null> {
return await TAURI_INVOKE("download_whisper_model", { modelName, outputPath });
},
async checkModelExists(modelPath: string) : Promise<boolean> {
return await TAURI_INVOKE("check_model_exists", { modelPath });
},
async deleteWhisperModel(modelPath: string) : Promise<null> {
return await TAURI_INVOKE("delete_whisper_model", { modelPath });
},
async downloadParakeetModel(outputDir: string) : Promise<null> {
return await TAURI_INVOKE("download_parakeet_model", { outputDir });
},
async checkParakeetModelExists(modelDir: string) : Promise<boolean> {
return await TAURI_INVOKE("check_parakeet_model_exists", { modelDir });
},
async deleteParakeetModel(modelDir: string) : Promise<null> {
return await TAURI_INVOKE("delete_parakeet_model", { modelDir });
},
async exportCaptionsSrt(videoId: string) : Promise<string | null> {
return await TAURI_INVOKE("export_captions_srt", { videoId });
},
async openTargetSelectOverlays(focusedTarget: ScreenCaptureTarget | null, specificDisplayId: string | null, targetMode: RecordingTargetMode | null) : Promise<null> {
return await TAURI_INVOKE("open_target_select_overlays", { focusedTarget, specificDisplayId, targetMode });
},
async closeTargetSelectOverlays() : Promise<null> {
return await TAURI_INVOKE("close_target_select_overlays");
},
async targetSelectOverlayReady(instance: number) : Promise<void> {
await TAURI_INVOKE("target_select_overlay_ready", { instance });
},
async suspendTargetSelectOverlays() : Promise<void> {
await TAURI_INVOKE("suspend_target_select_overlays");
},
async updateCameraOverlayBounds(x: number, y: number, width: number, height: number) : Promise<null> {
return await TAURI_INVOKE("update_camera_overlay_bounds", { x, y, width, height });
},
async displayInformation(displayId: string) : Promise<DisplayInformation> {
return await TAURI_INVOKE("display_information", { displayId });
},
async getWindowIcon(windowId: string) : Promise<string | null> {
return await TAURI_INVOKE("get_window_icon", { windowId });
},
async focusWindow(windowId: WindowId) : Promise<null> {
return await TAURI_INVOKE("focus_window", { windowId });
},
async editorDeleteProject() : Promise<null> {
return await TAURI_INVOKE("editor_delete_project");
},
async formatProjectName(template: string | null, targetName: string, targetKind: string, recordingMode: RecordingMode, datetime: string | null) : Promise<string> {
return await TAURI_INVOKE("format_project_name", { template, targetName, targetKind, recordingMode, datetime });
},
async findIncompleteRecordings() : Promise<IncompleteRecordingInfo[]> {
return await TAURI_INVOKE("find_incomplete_recordings");
},
async recoverRecording(projectPath: string) : Promise<string> {
return await TAURI_INVOKE("recover_recording", { projectPath });
},
async discardIncompleteRecording(projectPath: string) : Promise<null> {
return await TAURI_INVOKE("discard_incomplete_recording", { projectPath });
},
async getAutomations() : Promise<AutomationsStore> {
return await TAURI_INVOKE("get_automations");
},
async setAutomations(store: AutomationsStore) : Promise<null> {
return await TAURI_INVOKE("set_automations", { store });
},
async testAutomation(ruleId: string) : Promise<AutomationTestReport> {
return await TAURI_INVOKE("test_automation", { ruleId });
},
async automationShouldOpenScreenshotEditor(target: ScreenCaptureTarget) : Promise<boolean> {
return await TAURI_INVOKE("automation_should_open_screenshot_editor", { target });
},
async listAutomationCapabilities() : Promise<string[]> {
return await TAURI_INVOKE("list_automation_capabilities");
},
async updatesCheck() : Promise<UpdateCheckResult | null> {
return await TAURI_INVOKE("updates_check");
},
async updatesDownloadAndInstall() : Promise<null> {
return await TAURI_INVOKE("updates_download_and_install");
},
async restartApp() : Promise<null> {
return await TAURI_INVOKE("restart_app");
},
async updatesChannelChanged() : Promise<null> {
return await TAURI_INVOKE("updates_channel_changed");
}
}
/** user-defined events **/
export const events = __makeEvents__<{
audioInputLevelChange: AudioInputLevelChange,
cameraPresentationRequested: CameraPresentationRequested,
currentRecordingChanged: CurrentRecordingChanged,
devicesUpdated: DevicesUpdated,
diagnosticProgress: DiagnosticProgress,
downloadProgress: DownloadProgress,
editorRecordingAdded: EditorRecordingAdded,
editorRecordingFlowChanged: EditorRecordingFlowChanged,
editorStateChanged: EditorStateChanged,
frameLayoutEvent: FrameLayoutEvent,
newNotification: NewNotification,
newScreenshotAdded: NewScreenshotAdded,
newStudioRecordingAdded: NewStudioRecordingAdded,
onEscapePress: OnEscapePress,
preparingEditorChanged: PreparingEditorChanged,
recordingDeleted: RecordingDeleted,
recordingEvent: RecordingEvent,
recordingOptionsChanged: RecordingOptionsChanged,
recordingStarted: RecordingStarted,
recordingStopped: RecordingStopped,
recordingsMigrationProgress: RecordingsMigrationProgress,
renderFrameEvent: RenderFrameEvent,
requestOpenRecordingPicker: RequestOpenRecordingPicker,
requestOpenSettings: RequestOpenSettings,
requestScreenCapturePrewarm: RequestScreenCapturePrewarm,
requestScrollToSettingsSection: RequestScrollToSettingsSection,
requestSetTargetMode: RequestSetTargetMode,
requestStartRecording: RequestStartRecording,
setCaptureAreaPending: SetCaptureAreaPending,
targetUnderCursor: TargetUnderCursor,
updateDownloadProgress: UpdateDownloadProgress,
updateReady: UpdateReady,
uploadProgressEvent: UploadProgressEvent,
videoImportProgress: VideoImportProgress
}>({
audioInputLevelChange: "audio-input-level-change",
cameraPresentationRequested: "camera-presentation-requested",
currentRecordingChanged: "current-recording-changed",
devicesUpdated: "devices-updated",
diagnosticProgress: "diagnostic-progress",
downloadProgress: "download-progress",
editorRecordingAdded: "editor-recording-added",
editorRecordingFlowChanged: "editor-recording-flow-changed",
editorStateChanged: "editor-state-changed",
frameLayoutEvent: "frame-layout-event",
newNotification: "new-notification",
newScreenshotAdded: "new-screenshot-added",
newStudioRecordingAdded: "new-studio-recording-added",
onEscapePress: "on-escape-press",
preparingEditorChanged: "preparing-editor-changed",
recordingDeleted: "recording-deleted",
recordingEvent: "recording-event",
recordingOptionsChanged: "recording-options-changed",
recordingStarted: "recording-started",
recordingStopped: "recording-stopped",
recordingsMigrationProgress: "recordings-migration-progress",
renderFrameEvent: "render-frame-event",
requestOpenRecordingPicker: "request-open-recording-picker",
requestOpenSettings: "request-open-settings",
requestScreenCapturePrewarm: "request-screen-capture-prewarm",
requestScrollToSettingsSection: "request-scroll-to-settings-section",
requestSetTargetMode: "request-set-target-mode",
requestStartRecording: "request-start-recording",
setCaptureAreaPending: "set-capture-area-pending",
targetUnderCursor: "target-under-cursor",
updateDownloadProgress: "update-download-progress",
updateReady: "update-ready",
uploadProgressEvent: "upload-progress-event",
videoImportProgress: "video-import-progress"
})
/** user-defined constants **/
/** user-defined types **/
export type Action = { type: "copyToClipboard"; source?: ClipboardSource } | { type: "saveToLocation"; dir: string; filenameTemplate?: string | null } | { type: "export"; profile: ExportProfile; destination?: ExportDestination } | { type: "upload"; organizationId?: string | null; copyLink?: boolean; openInBrowser?: boolean } | { type: "revealInFileManager" } | { type: "openFile" } | { type: "runCommand"; program: string; args?: string[]; cwd?: string | null; env?: { [key in string]: string }; useShell?: boolean } | { type: "webhook"; url: string; method?: string; headers?: { [key in string]: string }; bodyTemplate?: string | null } | { type: "recognizeTextToClipboard" } | { type: "notify"; titleTemplate?: string; bodyTemplate?: string } | { type: "openEditor" } | { type: "skipEditor" } | { type: "applyPreset"; name: string } | { type: "deleteLocalFiles" }
export type AnimatedGradientCatalog = { defaultConfig: AnimatedGradientConfig; templates: AnimatedGradientPreset[]; controls: AnimatedGradientControl[] }
export type AnimatedGradientConfig = { colorStops: AnimatedGradientStop[]; direction: number; flowScale: number; flowStrength: number; curvature: number; detail: number; relief: number; light: number; shade: number; ripples: number; grainAmount: number; grainSize: number; exposure: number; contrast: number; vibrance: number; motionSpeed: number; seed: number }
export type AnimatedGradientControl = { key: AnimatedGradientParameter; label: string; group: string; min: number; max: number; step: number }
export type AnimatedGradientLibrary = { presets: AnimatedGradientPreset[]; lastUsed: AnimatedGradientConfig | null; selected: boolean }
export type AnimatedGradientParameter = "direction" | "flowScale" | "flowStrength" | "curvature" | "detail" | "relief" | "light" | "shade" | "ripples" | "grainAmount" | "grainSize" | "exposure" | "contrast" | "vibrance" | "motionSpeed"
export type AnimatedGradientPreset = { id: string; name: string; config: AnimatedGradientConfig }
export type AnimatedGradientStop = { color: [number, number, number]; position: number }
export type Annotation = { id: string; type: AnnotationType; x: number; y: number; width: number; height: number; strokeColor: string; strokeWidth: number; fillColor: string; opacity: number; rotation: number; text: string | null; maskType?: MaskType | null; maskLevel?: number | null; points?: ([number, number])[] | null }
export type AnnotationType = "arrow" | "circle" | "rectangle" | "text" | "mask" | "draw"
export type AppTheme = "system" | "light" | "dark"
export type AspectRatio = "wide" | "vertical" | "square" | "classic" | "tall"
export type Audio = { duration: number; sample_rate: number; channels: number; start_time: number }
export type AudioConfiguration = { mute: boolean; improve: boolean; isolation: VoiceIsolation; micVolumeDb: number; micStereoMode: StereoMode; systemVolumeDb: number }
/**
* Overlap-trim accounting captured by the recorder's audio gap tracker, persisted so the
* editor can compensate for stale-startup audio drift from typed data instead of scraping
* the recording log. See `cap-editor`'s `audio_timing_repair_offset`.
*/
export type AudioGapSummary = {
/**
* Total audio trimmed from overlapping frames over the whole recording, in milliseconds.
*/
total_overlap_trimmed_ms: number;
/**
* Startup-window trim used for stale-startup repair, excluding mid-recording trims.
*/
startup_overlap_trimmed_ms?: number;
/**
* Number of whole audio frames dropped because they fully overlapped the committed timeline.
*/
overlap_dropped_frames: number;
/**
* Subset of `overlap_dropped_frames` that dropped within the first few frames — the
* signature of a stale buffered burst at capture start.
*/
startup_overlap_drops: number }
export type AudioInputLevelChange = number
export type AudioLibraryTrack = { id: string; name: string; category: string }
export type AudioMeta = { path: string; start_time?: number | null; device_id?: string | null; gap_summary?: AudioGapSummary | null;
/**
* Milliseconds the unmuted microphone delivered sustained bit-exact silence,
* e.g. while a VoIP call held the input on macOS.
*/
digital_silence_ms?: number | null }
/**
* A timeline-positioned audio clip (background music or imported audio).
*
* Unlike the recording's mic/system audio (which is keyed to recording clips),
* these segments live in output/timeline time exactly like zoom/text/mask
* segments. `path` is resolved relative to the project directory so projects
* stay portable when moved.
*/
export type AudioTrackSegment = { start: number; end: number; track?: number; path: string; name?: string | null; enabled?: boolean;
/**
* Offset into the source audio file (seconds) at which playback begins.
*/
trimStart?: number; volumeDb?: number; fadeIn?: number; fadeOut?: number;
/**
* Source duration in seconds, persisted so the UI can clamp resizing
* without re-decoding the file.
*/
duration?: number | null }
export type AuthSecret = { api_key: string } | { token: string; expires: number }
export type AuthStore = { secret: AuthSecret; user_id: string | null; plan: Plan | null; organizations?: Organization[]; organizations_updated_at?: number | null }
export type AutomationActionCheck = { actionType: string; capability: string; supported: boolean }
export type AutomationExportCompression = "maximum" | "social" | "web" | "potato"
export type AutomationRecordingMode = "studio" | "instant"
export type AutomationRule = { id: string; name: string; enabled?: boolean; trigger: Trigger; matchMode?: MatchMode; conditions?: Condition[]; actions?: Action[] }
export type AutomationTestReport = { ruleId: string; ruleName: string; actionChecks: AutomationActionCheck[] }
export type AutomationsStore = { version?: number; rules?: AutomationRule[] }
export type BackgroundBlurConfig = { mode: BackgroundBlurMode }
export type BackgroundBlurMode = "off" | "light" | "heavy" | "remove"
export type BackgroundConfiguration = { source: BackgroundSource; blur: number; padding: number; rounding: number; roundingType: CornerStyle; inset: number; crop: Crop | null;
/**
* Normalized (0-1) center of the display rect in output-frame space.
* `None` keeps the display centered. When a frame is active this is the
* center of the framed card (chrome included), not the bare video.
*/
displayPosition: XY<number> | null; shadow: number; advancedShadow: ShadowConfiguration | null; border: BorderConfiguration | null;
/**
* Decorative frame around the recording. `None` (or `FrameStyle::None`)
* renders the bare video exactly as before the feature existed.
*/
frame: FrameConfiguration | null;
/**
* Redraws the recording device's physical notch over the capture. Distinct
* from `frame`: the decorative MacBook style is a mockup, this restores
* something the capture really did hide, and the two are independent.
*/
notch: NotchConfiguration | null }
export type BackgroundSource = { type: "wallpaper"; path: string | null } | { type: "image"; path: string | null } | { type: "color"; value: [number, number, number]; alpha?: number } | { type: "gradient"; from: [number, number, number]; to: [number, number, number]; angle?: number; noise_intensity?: number | null; noise_scale?: number | null; animated?: boolean | null; animation_speed?: number | null } | { type: "animatedGradient"; config: AnimatedGradientConfig }
export type BorderConfiguration = { enabled: boolean; width: number; color: [number, number, number]; opacity: number }
export type Camera = { hide: boolean; mirror: boolean; position: CameraPosition;
/**
* Normalized (0-1) center of the camera rect in output-frame space.
* Overrides `position` when set.
*/
manualPosition: XY<number> | null; size: number; zoomSize: number | null; rounding: number; shadow: number; advancedShadow: ShadowConfiguration | null; shape: CameraShape; roundingType: CornerStyle; scaleDuringZoom?: number; backgroundBlur?: BackgroundBlurConfig }
/**
* Screen-space focus blur applied over the composed frame while a 3d segment
* is active (a UV-mask variable blur, not a depth-of-field). `strength` is a
* blur radius in pixels at 1080p output height; the renderer scales it with
* output size so preview and export match.
*/
export type Camera3DBlur = { mode?: Camera3DBlurMode; strength?: number;
/**
* Widens and flattens the sharp-to-blurred transition (0..1).
*/
falloff?: number;
/**
* Focus center in screen UV (radial mode).
*/
focusX?: number; focusY?: number;
/**
* Sharp region size: radius (radial) or band width (tilt-shift).
*/
focusSize?: number;
/**
* Degrees; blur direction (directional) or band angle (tilt-shift).
*/
angle?: number;
/**
* Where the directional blur begins along its axis (0..1).
*/
dirPosition?: number;
/**
* Swaps the gaussian kernel for a ring-disc bokeh kernel with highlight
* gain. Strength is capped at 20 while enabled.
*/
bokeh?: boolean }
export type Camera3DBlurMode = "none" | "radial" | "directional" | "tiltShift"
/**
* One scalar keyframe on a per-property track. Interpolation between two
* keyframes is a linear value lerp with time remapped by a cubic bezier whose
* P1 comes from the left keyframe's `out_easing` and P2 from the right one's
* `in_easing` (a split-handle model). Absent handles default to cubic
* ease-in-out: P1 [0.65, 0], P2 [0.35, 1].
*/
export type Camera3DKeyframe = {
/**
* Seconds relative to the segment start.
*/
time: number; value: number;
/**
* Bezier P1 for the track segment leaving this keyframe.
*/
outEasing?: [number, number] | null;
/**
* Bezier P2 for the track segment entering this keyframe.
*/
inEasing?: [number, number] | null }
/**
* A 3D camera pose for the composed content plane. Angles are degrees.
*
* Geometry: the content plane's longest side spans 2 world units, centered at
* the origin facing +Z. `tilt_x`/`tilt_y`/`roll` orbit the CAMERA (Euler YXZ,
* roll innermost); `rotate_x`/`rotate_y` rotate the CONTENT plane itself.
* `zoom` is the camera DISTANCE in world units (larger = further = smaller on
* screen); `fov` is the vertical field of view with no size compensation, so
* apparent size ∝ 1 / (zoom · tan(fov/2)). `pan_x`/`pan_y` truck the camera in
* its own plane (world units; +x moves the subject right, +y up).
*/
export type Camera3DProperties = {
/**
* Camera orbit pitch.
*/
tiltX?: number;
/**
* Camera orbit yaw.
*/
tiltY?: number;
/**
* Camera roll (innermost camera rotation).
*/
roll?: number;
/**
* Content plane pitch.
*/
rotateX?: number;
/**
* Content plane yaw.
*/
rotateY?: number; fov?: number;
/**
* Camera distance in world units.
*/
zoom?: number; panX?: number; panY?: number }
export type Camera3DSegment = { start: number; end: number; enabled?: boolean;
/**
* Base pose; per-property tracks override individual values.
*/
properties?: Camera3DProperties; blur?: Camera3DBlur; tracks?: Camera3DTracks;
/**
* Seconds to ease from the flat frame into the pose at the segment start.
*/
transitionIn?: number;
/**
* Seconds to ease back to the flat frame before the segment end.
*/
transitionOut?: number }
/**
* Per-property keyframe tracks. A property with an empty track holds the
* segment's base value; each track holds independently before its first and
* after its last keyframe.
*/
export type Camera3DTracks = { tiltX: Camera3DKeyframe[]; tiltY: Camera3DKeyframe[]; roll: Camera3DKeyframe[]; rotateX: Camera3DKeyframe[]; rotateY: Camera3DKeyframe[]; fov: Camera3DKeyframe[]; zoom: Camera3DKeyframe[]; panX: Camera3DKeyframe[]; panY: Camera3DKeyframe[]; blurStrength: Camera3DKeyframe[]; blurFalloff: Camera3DKeyframe[]; blurFocusSize: Camera3DKeyframe[]; blurFocusX: Camera3DKeyframe[]; blurFocusY: Camera3DKeyframe[]; blurAngle: Camera3DKeyframe[]; blurDirPosition: Camera3DKeyframe[] }
export type CameraDeviceSettings = { width: number | null; height: number | null; frameRate: number | null }
export type CameraFormatInfo = { width: number; height: number; frameRate: number }
export type CameraInfo = { device_id: string; model_id: ModelIDType | null; display_name: string }
export type CameraPosition = { x: CameraXPosition; y: CameraYPosition }
export type CameraPresentationInput = { viewportWidth: number; viewportHeight: number; left: number; top: number; width: number; height: number; radius: number; layoutRevision: number; state: CameraPreviewState }
export type CameraPresentationRequested = { nonce: string; generation: number; cameraRevision: string }
export type CameraPreviewShape = "round" | "square" | "full"
export type CameraPreviewState = { size: number; shape: CameraPreviewShape; mirrored: boolean; background_blur?: BackgroundBlurMode }
export type CameraShape = "square" | "source"
export type CameraWithFormats = { deviceId: string; displayName: string; modelId: string | null; formats: CameraFormatInfo[]; bestFormat: CameraFormatInfo | null }
export type CameraXPosition = "left" | "center" | "right"
export type CameraYPosition = "top" | "bottom"
export type CaptionData = { segments: CaptionSegment[]; settings: CaptionSettings | null }
export type CaptionSegment = { id: string; start: number; end: number; text: string; words?: CaptionWord[] }
export type CaptionSettings = { enabled: boolean; font: string; size: number; color: string; backgroundColor: string; backgroundOpacity: number; position: string; italic: boolean; fontWeight: number; outline: boolean; outlineColor: string; exportWithSubtitles: boolean; highlightColor: string; fadeDuration: number; lingerDuration: number; wordTransitionDuration: number; activeWordHighlight: boolean; manualPosition: XY<number> | null; preset: string; animation: string; highlightStyle: string; uppercase: boolean }
export type CaptionTrackSegment = { id: string; start: number; end: number; text: string; words?: CaptionWord[]; fadeDurationOverride?: number | null; lingerDurationOverride?: number | null; positionOverride?: string | null; colorOverride?: string | null; backgroundColorOverride?: string | null; fontSizeOverride?: number | null }
export type CaptionWord = { text: string; start: number; end: number }
export type CaptionsData = { segments: CaptionSegment[]; settings: CaptionSettings;
/**
* When true, `segments` are stored in source/recording time and the
* rendered `timeline.caption_segments` are derived by projecting them
* through the current edit list, so captions stay aligned to their spoken
* content as clips are trimmed, deleted, reordered, or inserted. Legacy
* projects (false) stored segments in already-edited output time and are
* migrated to source time on first load.
*/
sourceTimed?: boolean }
export type CaptureDisplay = { id: DisplayId; name: string; refresh_rate: number }
export type CaptureDisplayWithThumbnail = { id: DisplayId; name: string; refresh_rate: number; thumbnail: string | null }
export type CaptureTargetKind = "display" | "window" | "area"
export type CaptureWindow = { id: WindowId; owner_name: string; name: string; bounds: LogicalBounds; refresh_rate: number; bundle_identifier: string | null }
export type CaptureWindowWithThumbnail = { id: WindowId; owner_name: string; name: string; bounds: LogicalBounds; refresh_rate: number; thumbnail: string | null; app_icon: string | null; bundle_identifier: string | null }
export type CliInstallStatus = { installDir: string; shimPath: string; targetPath: string; installed: boolean; onPath: boolean; conflict: string | null; pathEntry: string; shellCommand: string;
/**
* Whether the install dir is persisted to the user's shell PATH config (profile/registry),
* so `cap` will be available in a new terminal even though it is not on the current PATH.
*/
pathConfigured: boolean }
export type ClickSpringConfig = { tension: number; mass: number; friction: number }
export type ClipConfiguration = { index: number; offsets: ClipOffsets;
/**
* Whether `offsets` were computed automatically (recording start-time
* alignment + device sync calibration) rather than entered by the user.
* Cleared by the editor UI once the user edits an offset.
*/
offsetsAutoCalculated?: boolean }
export type ClipOffsets = { camera?: number; mic?: number; system_audio?: number }
export type ClipSpeedAudioMode = "mute" | "maintainPitch" | "matchSpeed"
export type ClipTransition = { segmentIndex: number; type: ClipTransitionType; duration: number }
export type ClipTransitionType = "cross-fade" | "fade-through-black"
export type ClipboardSource = "raw" | "rendered"
/**
* Parametric color grade for a single layer (screen or camera). Every field
* except `intensity` has 0 as its identity, so a default struct renders
* exactly like no grade at all. Adjustment fields are normalized: -1..1 for
* bipolar controls, 0..1 for unipolar ones.
*/
export type ColorCorrection = {
/**
* UI preset id ("none", "cinematic", ..., or "custom"). The renderer
* ignores this; the numeric fields below are the source of truth.
*/
preset: string;
/**
* 0..1 master strength applied to every adjustment except `grain`,
* which has its own dedicated control.
*/
intensity: number;
/**
* -1..1, full scale is ±1.5 stops.
*/
exposure: number;
/**
* -1..1 around a mid-gray pivot.
*/
contrast: number;
/**
* -1..1; -1 is grayscale.
*/
saturation: number;
/**
* -1..1; positive warms, negative cools.
*/
temperature: number;
/**
* -1..1; positive shifts magenta, negative green.
*/
tint: number;
/**
* 0..1 lifted-blacks film fade.
*/
fade: number;
/**
* -1..1 teal-shadows/orange-highlights split toning (negative reverses).
*/
splitTone: number;
/**
* 0..1 edge darkening within the layer's own rect.
*/
vignette: number;
/**
* 0..1 animated film grain.
*/
grain: number }
export type ColorCorrectionConfiguration = { screen: ColorCorrection; camera: ColorCorrection;
/**
* Whether the screen grade also covers the rendered cursor. On by
* default so the pointer reads as part of the graded footage; off keeps
* it crisp for legibility over vignettes and grain.
*/
gradeCursor: boolean }
export type CommercialLicense = { licenseKey: string; expiryDate: number | null; refresh: number; activatedOn: number }
export type Condition = { type: "captureTargetIs"; target: CaptureTargetKind } | { type: "recordingModeIs"; mode: AutomationRecordingMode } | { type: "durationAtLeast"; secs: number } | { type: "durationAtMost"; secs: number } | { type: "windowTitleContains"; pattern: string } | { type: "organizationIs"; id: string }
export type CornerStyle = "squircle" | "rounded"
export type Crop = { position: XY<number>; size: XY<number> }
export type CurrentRecording = { target: CurrentRecordingTarget; mode: RecordingMode; status: RecordingStatus }
export type CurrentRecordingChanged = null
export type CurrentRecordingTarget = { window: { id: WindowId; bounds: LogicalBounds | null } } | { screen: { id: DisplayId } } | { area: { screen: DisplayId; bounds: LogicalBounds } } | "camera"
export type CursorAnimationStyle = "slow" | "smooth" | "mellow" | "fast" | "custom"
export type CursorConfiguration = { hide: boolean; hideWhenIdle: boolean; hideWhenIdleDelay: number; size: number; type: CursorType; animationStyle: CursorAnimationStyle; tension: number; mass: number; friction: number; raw: boolean; motionBlur: number; useSvg: boolean; rotationAmount?: number; baseRotation?: number; clickSpring?: ClickSpringConfig | null; stopMovementInLastSeconds?: number | null; ripple?: CursorRippleConfig }
export type CursorMeta = { imagePath: string; hotspot: XY<number>; shape?: string | null }
export type CursorRippleConfig = { enabled: boolean; color: [number, number, number]; strength: number; size: number; duration: number }
export type CursorType = "auto" | "pointer" | "circle" | "macos" | "tahoe" | "windows"
export type Cursors = { [key in string]: string } | { [key in string]: CursorMeta }
export type DeviceOrModelID = { DeviceID: string } | { ModelID: ModelIDType }
export type DevicesUpdated = { cameras: CameraInfo[]; microphones: string[]; permissions: OSPermissionsCheck }
export type DiagnosticOptions = { includeSyncTest: boolean;
/**
* `studio`, `instant` or `both`.
*/
mode: string; durationSecs: number | null; includeMicrophone: boolean; micName: string | null; skipExport: boolean }
/**
* `phase` is `sync-test`, `collecting` or `done`; `stage`/`mode` are only set
* for `sync-test` and carry the CLI's stage names verbatim.
*/
export type DiagnosticProgress = { phase: string; stage: string | null; mode: string | null }
export type DiagnosticRunResult = { reportPath: string; verdict: string | null; summary: string | null; syncTestError: string | null; reportJson: string }
export type DisplayId = string
export type DisplayInformation = { name: string | null; physical_size: PhysicalSize | null; logical_size: LogicalSize | null; logical_bounds: LogicalBounds | null; refresh_rate: string }
/**
* Where the recording device's physical notch sits within the captured video.
*
* macOS captures the pixels behind the notch, so without this the recording
* shows an unbroken menu bar where the recorder saw a cutout. Fractions of the
* captured frame rather than of the display, so area recordings, which are
* cropped at capture time, need no extra context to interpret.
*/
export type DisplayNotch = {
/**
* Distance from the left edge of the video to the notch.
*/
x: number; width: number; height: number }
export type DownloadProgress = { progress: number; message: string }
export type EditorPreviewQuality = "quarter" | "half" | "full"
export type EditorRecordingAdded = { editor_path: string; recording_path: string }
export type EditorRecordingFlowChanged = { target: EditorRecordingFlowInfo | null }
export type EditorRecordingFlowInfo = { projectPath: string; projectName: string }
export type EditorStateChanged = { playhead_position: number }
export type ExportCompression = "Maximum" | "Social" | "Web" | "Potato"
export type ExportDestination = "projectFolder" | { customPath: { dir: string } }
export type ExportEstimates = { duration_seconds: number; estimated_time_seconds: number; estimated_size_mb: number; time_range_seconds: [number, number]; size_range_mb: [number, number] }
export type ExportFormat = "mp4" | "gif" | "mov"
export type ExportPreviewResult = { jpeg_base64: string; estimated_size_mb: number; actual_width: number; actual_height: number; frame_render_time_ms: number; total_frames: number }
export type ExportPreviewSettings = { fps: number; resolution_base: XY<number>; compression_bpp: number; cursor_only?: boolean }
export type ExportProfile = { format: ExportFormat; fps?: number; resolutionBase?: XY<number>; compression?: AutomationExportCompression | null; presetName?: string | null }
export type ExportSettings = ({ format: "Mp4" } & Mp4ExportSettings) | ({ format: "Gif" } & GifExportSettings) | ({ format: "Mov" } & MovExportSettings)
export type FileType = "recording" | "screenshot"
export type Flags = { captions: boolean }
export type FrameConfiguration = { style: FrameStyle; theme: FrameTheme;
/**
* Text shown in the browser style's URL pill.
*/
url: string;
/**
* Text shown in the macOS window style's title bar.
*/
title: string }
/**
* Rendered display/camera placement of the latest preview frame, in
* output-frame pixels — consumed by the editor's on-canvas layout overlay.
*/
export type FrameLayoutEvent = { display: [number, number, number, number]; camera: [number, number, number, number] | null; output_width: number; output_height: number }
/**
* Decorative frame drawn around the screen recording (browser window,
* macOS window, MacBook bezel, ...). The video is inset inside the frame's
* chrome; the framed card as a whole follows padding / position / zoom
* exactly like the bare video does today.
*/
export type FrameStyle =
/**
* No frame: the video renders bare, exactly as before this feature.
*/
"none" |
/**
* A macOS window title bar with traffic-light buttons.
*/
"macOS" |
/**
* A Windows 11 window title bar with minimize/maximize/close controls.
*/
"windows" |
/**
* A browser toolbar: traffic lights plus a centered URL pill.
*/
"browser" |
/**
* A MacBook mockup: black bezel, aluminum body and deck.
*/
"macbook"
export type FrameTheme = "dark" | "light"
export type FramesRendered = { renderedCount: number; totalFrames: number; type: "FramesRendered" }
export type GeneralSettingsStore = { instanceId?: string; uploadIndividualFiles?: boolean; hideDockIcon?: boolean; autoCreateShareableLink?: boolean; enableNotifications?: boolean; disableAutoOpenLinks?: boolean; hasCompletedStartup?: boolean; theme?: AppTheme; commercialLicense?: CommercialLicense | null; lastVersion?: string | null; windowTransparency?: boolean; postStudioRecordingBehaviour?: PostStudioRecordingBehaviour; mainWindowRecordingStartBehaviour?: MainWindowRecordingStartBehaviour; custom_cursor_capture2?: boolean; serverUrl?: string; recordingCountdown?: number | null; enableNativeCameraPreview: boolean; autoZoomOnClicks?: boolean; defaultZoomAmount?: number | null;
/**
* `None` until [`init`] seeds it from whether this machine has a notched
* display. From then on it is the user's preference and nothing re-reads
* the hardware, so moving between machines can't silently flip it.
*/
macbookNotchOverlay?: boolean | null; captureKeyboardEvents?: boolean; postDeletionBehaviour?: PostDeletionBehaviour; excludedWindows?: WindowExclusion[]; deleteInstantRecordingsAfterUpload?: boolean; instantModeMaxResolution?: number; defaultProjectNameTemplate?: string | null; crashRecoveryRecording?: boolean; maxFps?: number; transcriptionHints?: string[]; editorPreviewQuality?: EditorPreviewQuality; studioRecordingQuality?: StudioRecordingQuality; mainWindowPosition?: WindowPosition | null; cameraWindowPosition?: WindowPosition | null; cameraWindowPositionsByMonitorName?: { [key in string]: WindowPosition }; hasCompletedOnboarding?: boolean; enableTelemetry?: boolean; outOfProcessMuxer?: boolean; recordingsPath?: string | null;
/**
* Custom recordings folders that were used before; recordings left in
* them stay visible in the library. Most recent last.
*/
previousRecordingsPaths?: string[];
/**
* App version at which camera background blur was disabled after a crash
* was attributed to the blur pipeline; `None` means blur is allowed.
* Cleared automatically when the app version changes (one retry per
* update, since a new ort/wgpu/driver stack may have fixed the crash).
*/
cameraBlurDisabledByCrash?: string | null; updateChannel?: UpdateChannel;
/**
* Run the experimental gpui-native app (`cap-gpui`) *instead of* this one:
* while enabled, startup hands off to it and exits, and the native app's
* own Experimental page hands back. See `gpui_app.rs`.
*/
enableGpuiApp?: boolean }
export type GifExportSettings = { fps: number; resolution_base: XY<number>; quality: GifQuality | null }
export type GifQuality = {
/**
* Encoding quality from 1-100 (default: 90)
*/
quality: number | null;
/**
* Whether to prioritize speed over quality (default: false)
*/
fast: boolean | null }
export type GlideDirection = "none" | "left" | "right" | "up" | "down"
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 = "startStudioRecording" | "startInstantRecording" | "stopRecording" | "restartRecording" | "togglePauseRecording" | "cycleRecordingMode" | "openRecordingPicker" | "openRecordingPickerDisplay" | "openRecordingPickerWindow" | "openRecordingPickerArea" | "screenshotDisplay" | "screenshotWindow" | "screenshotArea" | "other"
export type HotkeysConfiguration = { show: boolean }
export type HotkeysStore = { hotkeys: { [key in HotkeyAction]: Hotkey } }
export type ImageSegment = { start: number; end: number; track: number; enabled: boolean; path: string; name: string; center: XY<number>; size: XY<number>; opacity: number; rotation: number; rounding: number; flipX: boolean; flipY: boolean; lockAspect: boolean }
export type ImportStage = "Probing" | "Converting" | "Finalizing" | "Complete" | "Failed"
export type ImportedAudioTrack = {
/**
* Path relative to the project directory, e.g. `assets/audio/<file>`.
*/
path: string; name: string; duration: number }
export type IncompleteRecordingInfo = { projectPath: string; prettyName: string; segmentCount: number; estimatedDurationSecs: number }
export type InstantRecordingMeta = { recording: boolean } | { error: string } | { fps: number; sample_rate: number | null }
export type JsonValue<T> = [T]
export type KeyPressDisplay = { key: string; timeOffset: number }
export type KeyboardData = { settings: KeyboardSettings }
export type KeyboardSettings = { enabled: boolean; font: string; size: number; color: string; backgroundColor: string; backgroundOpacity: number; position: string; fontWeight: number; fadeDuration: number; lingerDuration: number; groupingThresholdMs: number; showModifiers: boolean; showSpecialKeys: boolean; uppercase: boolean }
export type KeyboardTrackSegment = { id: string; start: number; end: number; displayText: string; keys?: KeyPressDisplay[]; fadeDurationOverride?: number | null; positionOverride?: string | null; colorOverride?: string | null; backgroundColorOverride?: string | null; fontSizeOverride?: number | null; uppercaseOverride?: boolean | null }
export type LogicalBounds = { position: LogicalPosition; size: LogicalSize }
export type LogicalPosition = { x: number; y: number }
export type LogicalSize = { width: number; height: number }
export type MacOSVersionInfo = { major: number; minor: number; patch: number; displayName: string; buildNumber: string; isAppleSilicon: boolean }
export type MainWindowRecordingStartBehaviour = "close" | "minimise"
export type MaskKeyframes = { position?: MaskVectorKeyframe[]; size?: MaskVectorKeyframe[]; intensity?: MaskScalarKeyframe[] }
export type MaskKind = "sensitive" | "highlight"
export type MaskScalarKeyframe = { time: number; value: number }
export type MaskSegment = { start: number; end: number; track?: number; enabled?: boolean; maskType: MaskKind; center: XY<number>; size: XY<number>; feather?: number; opacity?: number; pixelation?: number; darkness?: number; fadeDuration?: number; keyframes?: MaskKeyframes }
export type MaskType = "blur" | "pixelate"
export type MaskVectorKeyframe = { time: number; x: number; y: number }
export type MatchMode = "all" | "any"
export type MicrophoneDeviceSettings = { sampleRate: number | null; channels: number | null }
export type MicrophoneFormatInfo = { sampleRate: number; channels: number }
export type MicrophoneInfo = { name: string; sampleRate: number; channels: number; formats: MicrophoneFormatInfo[] }
export type ModelDownloadState = "downloading" | "completed" | "failed"
export type ModelDownloadStatus = { state: ModelDownloadState; progress: number; message: string }
export type ModelIDType = string
export type MovExportSettings = { fps: number; resolution_base: XY<number>; cursor_only?: boolean }
export type Mp4ExportSettings = { fps: number; resolution_base: XY<number>; compression: ExportCompression; custom_bpp: number | null; force_ffmpeg_decoder?: boolean; optimize_filesize?: boolean }
export type MultipleSegment = { display: VideoMeta; camera?: VideoMeta | null; mic?: AudioMeta | null; system_audio?: AudioMeta | null; cursor?: string | null; keyboard?: string | null; display_notch?: DisplayNotch | null }
export type MultipleSegments = { segments: MultipleSegment[]; cursors: Cursors; status?: StudioRecordingStatus | null }
export type NewNotification = { title: string; body: string; is_error: boolean }
export type NewScreenshotAdded = { path: string }
export type NewStudioRecordingAdded = { path: string }
/**
* Draws a MacBook notch over the recording. Nothing here is inferred from the
* video: a finished recording carries no evidence of the panel it came from.
*/
export type NotchConfiguration = { enabled: boolean;
/**
* Manual placement, as fractions of the video. Each `None` falls back to
* the geometry measured at capture time, else [`DEFAULT_MACBOOK_NOTCH`].
*/
x: number | null; width: number | null; height: number | null }
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 OnEscapePress = null
export type Organization = { id: string; name: string; ownerId: string; role?: string; canEditBrand?: boolean; iconUrl?: string | null; brandColors?: OrganizationBrandColors }
export type OrganizationBrandColors = { primary: string | null; secondary: string | null; accent: string | null; background: string | null }
export type OverlayTrack = { kind: OverlayTrackKind; track: number }
export type OverlayTrackKind = "mask" | "image" | "text"
export type Phase = "awaitingShortcut" | "starting" | "recording" | "pausing" | "paused" | "resuming" | "resumeFailed" | "restarting" | "stopping" | "restoring"
export type PhysicalSize = { width: number; height: number }
export type Plan = { upgraded: boolean; manual: boolean; last_checked: number }
export type Platform = "MacOS" | "Windows" | "Linux"
export type PostDeletionBehaviour = "doNothing" | "reopenRecordingWindow"
export type PostStudioRecordingBehaviour = "openEditor" | "showOverlay"
export type PreparingEditorChanged = { requestEpoch: number; jobId: string; sequence: number; fps: number; progress: PreparingEditorProgress; playback: PreparingPlaybackState; seed: PreparingEditorSeed }
export type PreparingEditorPhase = "preparing" | "handoff" | "unavailable" | "ready"
export type PreparingEditorProgress = { totalDuration: number | null; playableUntil: number; previewAvailable: boolean; phase: PreparingEditorPhase }
export type PreparingEditorSeed = { title: string; tracks: string[] }
export type PreparingPlaybackState = { playheadSeconds: number; playing: boolean; buffering: boolean }
export type Preset = { name: string; config: ProjectConfiguration }
export type PresetsStore = { presets: Preset[]; default: number | null }
export type ProjectConfiguration = { aspectRatio: AspectRatio | null; background: BackgroundConfiguration; camera: Camera; audio: AudioConfiguration; cursor: CursorConfiguration; hotkeys: HotkeysConfiguration; timeline: TimelineConfiguration | null; overlayOrder: OverlayTrack[]; captions: CaptionsData | null; keyboard: KeyboardData | null; clips: ClipConfiguration[]; annotations: Annotation[]; screenMotionBlur?: number; screenMovementSpring?: ScreenMovementSpring;
/**
* Per-layer cinematic color grades. Field-level default keeps old
* project files (and old saved presets) deserializing to the identity
* grade.
*/
colorCorrection?: ColorCorrectionConfiguration;
/**
* How text segment font sizes are interpreted. 0 (legacy): the renderer
* multiplied `font_size` by `size.y / 0.2`, coupling glyph size to the
* box. 1: `font_size` alone determines glyph size (1080p-relative);
* legacy configs are migrated on load by baking the box factor into
* `font_size`. The field-level default keeps old files at 0 while
* `Default::default()` produces the current version.
*/
textSizeVersion?: number;
/**
* 0 (legacy): text segments animate with the single symmetric
* `fade_duration`. 1: the enter/exit animation fields drive timing;
* legacy configs are migrated on load by seeding both animation
* durations from `fade_duration`.
*/
textAnimVersion?: number }
export type ProjectRecordingsMeta = { segments: SegmentRecordings[] }
export type RecordingAction = "Started" | "InvalidAuthentication" | "UpgradeRequired"
export type RecordingDeleted = { path: string }
export type RecordingEvent = { variant: "Countdown"; value: number } | { variant: "Started" } | { variant: "Stopped" } | { variant: "Paused" } | { variant: "Resumed" } | { variant: "Failed"; error: string } | { variant: "StartFailed"; error: string } | { variant: "InputLost"; input: RecordingInputKind } | { variant: "InputRestored"; input: RecordingInputKind } | { variant: "Degraded"; reason: string } | { variant: "Recovered" }
export type RecordingInputKind = "microphone" | "camera"
export type RecordingMeta = (StudioRecordingMeta | InstantRecordingMeta) & { platform?: Platform | null; pretty_name: string; sharing?: SharingMeta | null; upload?: UploadMeta | null }
export type RecordingMetaWithMetadata = ((StudioRecordingMeta | InstantRecordingMeta) & { platform?: Platform | null; pretty_name: string; sharing?: SharingMeta | null; upload?: UploadMeta | null }) & { mode: RecordingMode; status: StudioRecordingStatus; clip_count: number; sort_time_millis: number }
export type RecordingMode = "studio" | "instant" | "screenshot"
export type RecordingOptionsChanged = null
export type RecordingSettingsStore = { target: ScreenCaptureTarget | null; micName: string | null; cameraId: DeviceOrModelID | null; mode: RecordingMode | null; systemAudio: boolean; organizationId: string | null; cameraDeviceSettings: { [key in string]: CameraDeviceSettings }; microphoneDeviceSettings: { [key in string]: MicrophoneDeviceSettings } }
export type RecordingStarted = null
export type RecordingStatus = "pending" | "recording"
export type RecordingStopped = null
export type RecordingTargetMode = "display" | "window" | "area" | "camera"
export type RecordingsMigrationFailure = { name: string; error: string }
export type RecordingsMigrationProgress = { total: number; done: number; current: string | null }
export type RecordingsMigrationSummary = { moved: number; skippedInUse: number; failed: RecordingsMigrationFailure[] }
export type RenderFrameEvent = { frame_number: number; fps: number; resolution_base: XY<number> }
export type RequestOpenRecordingPicker = { target_mode: RecordingTargetMode | null }
export type RequestOpenSettings = { page: string }
export type RequestScreenCapturePrewarm = { force?: boolean }
export type RequestScrollToSettingsSection = { section: string }
export type RequestSetTargetMode = { target_mode: RecordingTargetMode | null; display_id: string | null }
export type RequestStartRecording = { mode: RecordingMode }
export type S3UploadMeta = { id: string }
export type SceneMode = "default" | "cameraOnly" | "hideCamera" | "splitScreen" |
/**
* Like [`SceneMode::SplitScreen`], but the screen and camera render as
* padded, rounded, shadowed cards floating over the background instead
* of full-bleed halves. Shares [`SplitLayout`] for per-pane pan/zoom.
*/
"floating"
export type SceneSegment = { start: number; end: number; mode?: SceneMode; splitLayout?: SplitLayout | null; transitionIn?: number; transitionOut?: number }
export type ScreenCaptureTarget = { variant: "window"; id: WindowId } | { variant: "display"; id: DisplayId } | { variant: "area"; screen: DisplayId; bounds: LogicalBounds } | { variant: "cameraOnly" }
export type ScreenMovementSpring = { stiffness: number; damping: number; mass: number }
export type ScreenshotMetaWithMetadata = ((StudioRecordingMeta | InstantRecordingMeta) & { platform?: Platform | null; pretty_name: string; sharing?: SharingMeta | null; upload?: UploadMeta | null }) & { sort_time_millis: number }
export type ScreenshotOcrLine = { text: string; confidence: number | null; bounds: ScreenshotOcrRegion }
export type ScreenshotOcrRegion = { x: number; y: number; width: number; height: number }
export type ScreenshotOcrResult = { text: string; lines: ScreenshotOcrLine[]; engine: string }
export type ScreenshotProjectExport = { imageBytes: number[]; config: ProjectConfiguration; imageWidth: number; imageHeight: number }
export type ScreenshotProjectShareState = { config: ProjectConfiguration; sharing: ScreenshotSharingState | null }
export type ScreenshotSharingState = { link: string; contentHash: string | null }
export type SegmentRecordings = { display: Video; camera: Video | null; mic: Audio | null; system_audio: Audio | null }
export type SerializedEditorInstance = { instanceId: string; preparingPlayback: boolean; framesSocketUrl: string; preparingSnapshot: PreparingEditorChanged | null; recordingDuration: number; savedProjectConfig: ProjectConfiguration; recordings: ProjectRecordingsMeta; path: string;
/**
* Notch geometry the overlay uses when the project sets no manual
* placement: this recording's own measurements where the recorder took
* them, else a stock MacBook notch for the editor to start from.
*/
notchBase: DisplayNotch }
export type SerializedScreenshotEditorInstance = { framesSocketUrl: string; path: string; config: ProjectConfiguration | null; prettyName: string; imageWidth: number; imageHeight: number }
export type SetCaptureAreaPending = boolean
export type ShadowConfiguration = { size: number; opacity: number; blur: number }
export type SharingMeta = { id: string; link: string; content_hash?: string | null }
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; capture_target?: ScreenCaptureTarget | null } } | "Upgrade" | "ModeSelect" | { ScreenshotEditor: { path: string } } | "Onboarding"
export type SingleSegment = { display: VideoMeta; camera?: VideoMeta | null; audio?: AudioMeta | null; cursor?: string | null }
export type Snapshot = { generation: number; phase: Phase | null; mode: RecordingMode | null; shortcut: string | null; error: string | null }
export type SplitLayout = { screenZoom: number; screenPosition: XY<number>; cameraZoom: number; cameraPosition: XY<number> }
export type StartRecordingInputs = { capture_target: ScreenCaptureTarget; capture_system_audio?: boolean; mode: RecordingMode; organization_id?: string | null }
export type StereoMode = "stereo" | "monoL" | "monoR"
export type StudioRecordingMeta = { segment: SingleSegment } | { inner: MultipleSegments }
export type StudioRecordingQuality = "compatibility" | "balanced" | "ultra"
export type StudioRecordingStatus = { status: "InProgress" } | { status: "NeedsRemux" } | { status: "Failed"; error: string } | { status: "Complete" }
export type StyleOverrides = { background?: BackgroundConfiguration | null; camera?: Camera | null; cursor?: CursorConfiguration | null; cameraOnlyPadding?: number | null }
export type StyleSegment = { start: number; end: number; track: number; enabled: boolean; name: string; overrides: StyleOverrides }
export type SystemDiagnostics = { macosVersion: MacOSVersionInfo | null; availableEncoders: string[]; screenCaptureSupported: boolean; metalSupported: boolean; gpuName: string | null }
export type TargetUnderCursor = { display_id: DisplayId | null; window: WindowUnderCursor | null }
export type TextAlign = "left" | "center" | "right"
export type TextAnimation = "none" | "fade" | "slideUp" | "slideDown" | "slideLeft" | "slideRight" | "pop" | "zoom" | "bounce" | "wipe" | "words" | "letters" | "tracking" | "typewriter"
/**
* How a text segment's optional background hugs the text.
*/
export type TextBackgroundStyle =
/**
* One rounded rectangle behind the whole block.
*/
"box" |
/**
* A capsule: half-height radius and wider side padding.
*/
"pill" |
/**
* A marker stroke per laid-out line, hugging each line's ink.
*/
"highlight"
/**
* How a text segment shares the frame with the display recording. The
* variants name where the TEXT sits; the display card makes room for it.
*/
export type TextLayout =
/**
* Text draws over the untouched display (the original behavior).
*/
"overlay" |
/**
* The display card shrinks and fades away; text owns the frame.
*/
"fullscreen" |
/**
* Text in the left half, display card contained in the right half.
*/
"splitLeft" |
/**
* Text in the right half, display card contained in the left half.
*/
"splitRight"
export type TextSegment = { start: number; end: number; track?: number; enabled?: boolean; content?: string; center?: XY<number>; size?: XY<number>; fontFamily?: string; fontSize?: number; fontWeight?: number; italic?: boolean; color?: string; backgroundColor?: string | null; backgroundStyle?: TextBackgroundStyle; uppercase?: boolean;
/**
* Outline px at the 1080p reference height, like `font_size`; 0 disables.
*/
strokeWidth?: number; strokeColor?: string;
/**
* Second colour of a horizontal gradient that starts at `color`.
*/
gradientColor?: string | null;
/**
* 0..1 soft halo strength in the text colour.
*/
glow?: number;
/**
* Legacy symmetric fade. Superseded by the animation fields below; kept
* so configs written by new builds still fade in old builds. The
* `text_anim_version` migration seeds the animation durations from it.
*/
fadeDuration?: number; align?: TextAlign;
/**
* Px at the 1080p reference height, like `font_size`.
*/
letterSpacing?: number; lineHeight?: number; opacity?: number; shadow?: number; animationIn?: TextAnimation; animationOut?: TextAnimation; animationInDuration?: number; animationOutDuration?: number; layout?: TextLayout;
/**
* Seconds the display card takes to morph aside (and back) at the
* segment edges when `layout` is not `Overlay`.
*/
layoutTransition?: number }
export type TimelineConfiguration = { segments: TimelineSegment[]; transitions: ClipTransition[]; zoomSegments: ZoomSegment[]; sceneSegments?: SceneSegment[]; maskSegments?: MaskSegment[]; textSegments?: TextSegment[]; captionSegments?: CaptionTrackSegment[]; keyboardSegments?: KeyboardTrackSegment[]; audioSegments?: AudioTrackSegment[]; styleSegments: StyleSegment[]; imageSegments: ImageSegment[]; camera3dSegments?: Camera3DSegment[] }
export type TimelineSegment = { recordingSegment?: number; timescale: number; start: number; end: number; name?: string | null; speedAudioMode?: ClipSpeedAudioMode | null; volume?: number | null; hideCursor?: boolean | null }
export type TranscriptionEngine = "Whisper" | "Parakeet"
export type Trigger = "screenshotTaken" | "studioRecordingFinished" | "instantRecordingFinished" | "recordingStarted" | "uploadCompleted" | "videoImported" | "recordingDeleted"
export type UpdateChannel = "stable" | "nightly"
export type UpdateCheckResult = { version: string; notes: string | null; channel: UpdateChannel }
export type UpdateDownloadProgress = { downloaded: number; total: number | null }
export type UpdateReady = { version: string; installed: boolean }
export type UploadMeta = { state: "MultipartUpload"; video_id: string; file_path: string; pre_created_video: VideoUploadInfo; recording_dir: string } | { state: "SinglePartUpload"; video_id: string; recording_dir: string; file_path: string; screenshot_path: string } | { state: "SegmentUpload"; video_id: string; pre_created_video: VideoUploadInfo; recording_dir: string } | { state: "Failed"; error: string } | { state: "Complete" }
export type UploadMode = { Initial: { pre_created_video: VideoUploadInfo | null } } | "Reupload"
export type UploadProgress = { progress: number }
export type UploadProgressEvent = { video_id: string; uploaded: string; total: string }
export type UploadResult = { Success: string } | "NotAuthenticated" | "PlanCheckFailed" | "UpgradeRequired"
export type Video = { duration: number; width: number; height: number; fps: number; start_time: number }
export type VideoImportProgress = { project_path: string; stage: ImportStage; progress: number; message: string }
export type VideoMeta = { path: string; fps?: number; start_time?: number | null; device_id?: string | null }
export type VideoRecordingMetadata = { duration: number; size: number }
export type VideoUploadInfo = { id: string; link: string; config: S3UploadMeta }
export type VoiceIsolation = "light" | "balanced" | "strong"
export type WindowExclusion = { bundleIdentifier?: string | null; ownerName?: string | null; windowTitle?: string | null }
export type WindowId = string
export type WindowPosition = { x: number; y: number; displayId?: DisplayId | null }
export type WindowUnderCursor = { id: WindowId; app_name: string; bounds: LogicalBounds }
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; glideDirection?: GlideDirection; glideSpeed?: number; instantAnimation?: boolean; edgeSnapRatio?: number }
/** tauri-specta globals **/
import {
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>;
};
export type Result<T, E> =
| { status: "ok"; data: T }
| { status: "error"; error: E };
function __makeEvents__<T extends Record<string, any>>(
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 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);
}
},
});
},
},
);
}