Open source Loom alternative. Beautiful, shareable screen recordings.
Rust appcapcossloommacnextjsnextjs15open-sourceossreactrecordrustscreen-capturescreen-recorderscreenshotsolidjstauritauri-apptypescriptvite
Enable text editing mode on text annotation creation
Richie McIlroye69fe645b4c0
diff --git a/apps/desktop/src/routes/screenshot-editor/AnnotationLayer.tsx b/apps/desktop/src/routes/screenshot-editor/AnnotationLayer.tsxindex 3b67431d1..93f241b91 100644--- a/apps/desktop/src/routes/screenshot-editor/AnnotationLayer.tsx+++ b/apps/desktop/src/routes/screenshot-editor/AnnotationLayer.tsx@@ -446,6 +446,14 @@ export function AnnotationLayer(props: {setIsDrawing(false);setActiveTool("select");setSelectedAnnotationId(ann.id);++ if (ann.type === "text") {+ textSnapshot = {+ project: structuredClone(unwrap(project)),+ annotations: structuredClone(unwrap(annotations)),+ };+ setTextEditingId(ann.id);+ }}if (dragState()) {diff --git a/apps/desktop/src/utils/tauri.ts b/apps/desktop/src/utils/tauri.tsindex 1c1a93eaf..0d003f487 100644--- a/apps/desktop/src/utils/tauri.ts+++ b/apps/desktop/src/utils/tauri.ts@@ -369,7 +369,6 @@ uploadProgressEvent: "upload-progress-event"/** user-defined types **/-export type AllGpusInfo = { gpus: GpuInfoDiag[]; primaryGpuIndex: number | null; isMultiGpuSystem: boolean; hasDiscreteGpu: boolean }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 }export type AnnotationType = "arrow" | "circle" | "rectangle" | "text" | "mask"export type AppTheme = "system" | "light" | "dark"@@ -438,7 +437,6 @@ quality: number | null;* Whether to prioritize speed over quality (default: false)*/fast: boolean | null }-export type GpuInfoDiag = { vendor: string; description: string; dedicatedVideoMemoryMb: number; adapterIndex: number; isSoftwareAdapter: boolean; isBasicRenderDriver: boolean; supportsHardwareEncoding: boolean }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 }@@ -451,6 +449,7 @@ export type JsonValue<T> = [T]export type LogicalBounds = { position: LogicalPosition; size: LogicalSize }export type LogicalPosition = { x: number; y: number }export type LogicalSize = { width: number; height: number }+export type MacOSVersionInfo = { displayName: string }export type MainWindowRecordingStartBehaviour = "close" | "minimise"export type MaskKeyframes = { position?: MaskVectorKeyframe[]; size?: MaskVectorKeyframe[]; intensity?: MaskScalarKeyframe[] }export type MaskKind = "sensitive" | "highlight"@@ -493,7 +492,6 @@ export type RecordingStatus = "pending" | "recording"export type RecordingStopped = nullexport type RecordingTargetMode = "display" | "window" | "area"export type RenderFrameEvent = { frame_number: number; fps: number; resolution_base: XY<number> }-export type RenderingStatus = { isUsingSoftwareRendering: boolean; isUsingBasicRenderDriver: boolean; hardwareEncodingAvailable: boolean; warningMessage: string | null }export type RequestOpenRecordingPicker = { target_mode: RecordingTargetMode | null }export type RequestOpenSettings = { page: string }export type RequestScreenCapturePrewarm = { force?: boolean }@@ -514,7 +512,7 @@ export type StartRecordingInputs = { capture_target: ScreenCaptureTarget; capturexport type StereoMode = "stereo" | "monoL" | "monoR"export type StudioRecordingMeta = { segment: SingleSegment } | { inner: MultipleSegments }export type StudioRecordingStatus = { status: "InProgress" } | { status: "NeedsRemux" } | { status: "Failed"; error: string } | { status: "Complete" }-export type SystemDiagnostics = { windowsVersion: WindowsVersionInfo | null; gpuInfo: GpuInfoDiag | null; allGpus: AllGpusInfo | null; renderingStatus: RenderingStatus; availableEncoders: string[]; graphicsCaptureSupported: boolean; d3D11VideoProcessorAvailable: boolean }+export type SystemDiagnostics = { macosVersion: MacOSVersionInfo | null; availableEncoders: string[]; screenCaptureSupported: boolean }export type TargetUnderCursor = { display_id: DisplayId | null; window: WindowUnderCursor | null }export type TextSegment = { start: number; end: number; enabled?: boolean; content?: string; center?: XY<number>; size?: XY<number>; fontFamily?: string; fontSize?: number; fontWeight?: number; italic?: boolean; color?: string; fadeDuration?: number }export type TimelineConfiguration = { segments: TimelineSegment[]; zoomSegments: ZoomSegment[]; sceneSegments?: SceneSegment[]; maskSegments?: MaskSegment[]; textSegments?: TextSegment[] }@@ -531,7 +529,6 @@ export type VideoUploadInfo = { id: string; link: string; config: S3UploadMeta }export type WindowExclusion = { bundleIdentifier?: string | null; ownerName?: string | null; windowTitle?: string | null }export type WindowId = stringexport type WindowUnderCursor = { id: WindowId; app_name: string; bounds: LogicalBounds }-export type WindowsVersionInfo = { major: number; minor: number; build: number; displayName: string; meetsRequirements: boolean; isWindows11: boolean }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 }