Open source Loom alternative. Beautiful, shareable screen recordings.
Rust appcapcossloommacnextjsnextjs15open-sourceossreactrecordrustscreen-capturescreen-recorderscreenshotsolidjstauritauri-apptypescriptvite
tweaks
ameer246867179993f13c
diff --git a/apps/desktop/src/App.tsx b/apps/desktop/src/App.tsxindex 362ad789c..a6d268f12 100644--- a/apps/desktop/src/App.tsx+++ b/apps/desktop/src/App.tsx@@ -1,5 +1,8 @@import { Router, useCurrentMatches } from "@solidjs/router";import { FileRoutes } from "@solidjs/start/router";+import { QueryClient, QueryClientProvider } from "@tanstack/solid-query";+import { writeText } from "@tauri-apps/plugin-clipboard-manager";+import { message } from "@tauri-apps/plugin-dialog";import {createEffect,ErrorBoundary,@@ -7,24 +10,21 @@ import {onMount,Suspense,} from "solid-js";-import { QueryClient, QueryClientProvider } from "@tanstack/solid-query";-import { message } from "@tauri-apps/plugin-dialog";-import { writeText } from "@tauri-apps/plugin-clipboard-manager";import "@cap/ui-solid/main.css";import "unfonts.css";import "./styles/theme.css";-import titlebar from "./utils/titlebar-state";-import { generalSettingsStore } from "./store";-import { commands, type AppTheme } from "./utils/tauri";+import { Button } from "@cap/ui-solid";import {getCurrentWebviewWindow,WebviewWindow,} from "@tauri-apps/api/webviewWindow";-import { Button } from "@cap/ui-solid";import { Toaster } from "solid-toast";+import { generalSettingsStore } from "./store";import { initAnonymousUser } from "./utils/analytics";+import { commands, type AppTheme } from "./utils/tauri";+import titlebar from "./utils/titlebar-state";const queryClient = new QueryClient({defaultOptions: {@@ -79,10 +79,10 @@ function Inner() {<h1 class="text-[--text-primary] text-3xl max-sm:text-xl font-bold">An Error Occured</h1>- <p class="max-sm:text-sm mb-2">+ <p class="mb-2 max-sm:text-sm">We're very sorry, but something has gone wrong.</p>- <div class="flex max-sm:flex-col flex-row max-sm:gap-2 gap-4">+ <div class="flex flex-row gap-4 max-sm:flex-col max-sm:gap-2"><ButtononClick={() => {writeText(`${e.toString()}\n\n${e.stack}`);diff --git a/apps/desktop/src/components/titlebar/Titlebar.tsx b/apps/desktop/src/components/titlebar/Titlebar.tsxindex 8b5b213f6..c11a5a943 100644--- a/apps/desktop/src/components/titlebar/Titlebar.tsx+++ b/apps/desktop/src/components/titlebar/Titlebar.tsx@@ -19,7 +19,7 @@ export default function Titlebar() {? titlebarState.backgroundColor: titlebarState.transparent? "bg-transparent"- : "bg-gray-50",+ : "bg-gray-100",titlebarState.border ? "border-b border-b-gray-200" : "")}style={{diff --git a/apps/desktop/src/routes/(window-chrome).tsx b/apps/desktop/src/routes/(window-chrome).tsxindex ef7275845..98775c937 100644--- a/apps/desktop/src/routes/(window-chrome).tsx+++ b/apps/desktop/src/routes/(window-chrome).tsx@@ -1,10 +1,10 @@import type { RouteSectionProps } from "@solidjs/router";-import { onCleanup, onMount, ParentProps, Suspense } from "solid-js";-import { getCurrentWindow } from "@tauri-apps/api/window";import { UnlistenFn } from "@tauri-apps/api/event";+import { getCurrentWindow } from "@tauri-apps/api/window";+import { onCleanup, onMount, ParentProps, Suspense } from "solid-js";import { AbsoluteInsetLoader } from "~/components/Loader";-import { initializeTitlebar } from "~/utils/titlebar-state";import Titlebar from "~/components/titlebar/Titlebar";+import { initializeTitlebar } from "~/utils/titlebar-state";export const route = {info: {@@ -68,7 +68,7 @@ function Inner(props: ParentProps) {});return (- <div class="animate-in fade-in flex-1 flex flex-col overflow-y-hidden">+ <div class="flex overflow-y-hidden flex-col flex-1 animate-in fade-in">{props.children}</div>);diff --git a/apps/desktop/src/routes/(window-chrome)/(main).tsx b/apps/desktop/src/routes/(window-chrome)/(main).tsxindex fa9d0b17f..3ee22fc7d 100644--- a/apps/desktop/src/routes/(window-chrome)/(main).tsx+++ b/apps/desktop/src/routes/(window-chrome)/(main).tsx@@ -113,7 +113,7 @@ export default function () {const currentWindow = getCurrentWindow();const MAIN_WINDOW_SIZE = {width: 300,- height: 320 + (window.FLAGS.systemAudioRecording ? 40 : 0),+ height: 320 + (window.FLAGS.systemAudioRecording ? 60 : 0),};// Set initial size@@ -223,7 +223,7 @@ export default function () {});return (- <div class="flex justify-center flex-col p-[1rem] gap-[0.75rem] text-[0.875rem] font-[400] bg-gray-50 h-full text-[--text-primary]">+ <div class="flex justify-center flex-col p-[1rem] gap-[0.75rem] text-[0.875rem] font-[400] bg-gray-100 h-full text-[--text-primary]">{initialize()}<div class="flex items-center justify-between pb-[0.25rem]"><div class="flex items-center space-x-1">@@ -266,7 +266,7 @@ export default function () {{window.FLAGS.systemAudioRecording && (<SystemAudio options={options.data} setOptions={setOptions} />)}- <div class="flex items-center space-x-1 w-full">+ <div class="flex items-center space-x-1 w-full will-change-transform"><Buttondisabled={toggleRecording.isPending}variant={isRecording() ? "destructive" : "primary"}@@ -859,7 +859,7 @@ function MicrophoneSelect(props: {});return (- <div class="flex flex-col gap-[0.25rem] items-stretch text-[--text-primary]">+ <div class="flex flex-col will-change-transform gap-[0.25rem] items-stretch text-[--text-primary]">{/* <label class="text-[--text-tertiary]">Microphone</label> */}<KSelect<Option>options={[@@ -961,7 +961,7 @@ function SystemAudio(props: {});}}disabled={props.setOptions.isPending || !!currentRecording.data}- class="relative flex flex-row items-center h-[2rem] px-[0.375rem] gap-[0.375rem] border rounded-lg border-gray-200 w-full disabled:text-gray-400 transition-colors KSelect overflow-hidden z-10"+ class="relative flex flex-row items-center h-[2rem] px-[0.375rem] will-change-transform gap-[0.375rem] border rounded-lg border-gray-200 w-full disabled:text-gray-400 transition-colors overflow-hidden z-10"><div class="size-[1.25rem] flex items-center justify-center"><IconPhMonitorBold class="text-gray-400 stroke-2 size-[1.2rem]" />diff --git a/apps/desktop/src/routes/editor/ConfigSidebar.tsx b/apps/desktop/src/routes/editor/ConfigSidebar.tsxindex 69864cdc9..cea6449c1 100644--- a/apps/desktop/src/routes/editor/ConfigSidebar.tsx+++ b/apps/desktop/src/routes/editor/ConfigSidebar.tsx@@ -441,7 +441,7 @@ export function ConfigSidebar() {><divclass={cx(- "flex justify-center relative border-transparent border z-10 items-center rounded-md size-9 transition",+ "flex justify-center relative border-transparent border z-10 items-center rounded-md size-9 transition will-change-transform",selectedTab() !== item.id && "group-hover:border-gray-300")}>@@ -452,8 +452,8 @@ export function ConfigSidebar() {</For>{/** Center the indicator with the icon */}- <KTabs.Indicator class="absolute top-0 left-0 w-full h-full transition-transform duration-300 ease-in-out pointer-events-none">- <div class="absolute top-1/2 left-1/2 bg-gray-200 rounded-md transform -translate-x-1/2 -translate-y-1/2 size-9" />+ <KTabs.Indicator class="absolute top-0 left-0 w-full h-full transition-transform duration-300 ease-in-out pointer-events-none will-change-transform">+ <div class="absolute top-1/2 left-1/2 bg-gray-200 rounded-md transform -translate-x-1/2 -translate-y-1/2 will-change-transform size-9" /></KTabs.Indicator></KTabs.List><div@@ -703,7 +703,7 @@ export function ConfigSidebar() {class="relative aspect-square group"><KRadioGroup.ItemInput class="peer" />- <KRadioGroup.ItemControl class="overflow-hidden w-full h-full rounded-lg transition-shadow cursor-pointer ui-checked:ring-2 ui-checked:ring-gray-500 ui-checked:ring-offset-2 ui-checked:ring-offset-gray-200">+ <KRadioGroup.ItemControl class="overflow-hidden w-full h-full rounded-lg transition cursor-pointer ui-not-checked:ring-offset-1 ui-not-checked:ring-offset-gray-200 ui-not-checked:hover:ring-1 ui-not-checked:hover:ring-gray-400 ui-checked:ring-2 ui-checked:ring-gray-500 ui-checked:ring-offset-2 ui-checked:ring-offset-gray-200"><imgsrc={photo.url!}class="object-cover w-full h-full"diff --git a/apps/desktop/src/routes/editor/Player.tsx b/apps/desktop/src/routes/editor/Player.tsxindex 70eb23e5c..2c4e6a43a 100644--- a/apps/desktop/src/routes/editor/Player.tsx+++ b/apps/desktop/src/routes/editor/Player.tsx@@ -181,6 +181,7 @@ export function Player() {<div class="flex flex-row items-center justify-center text-gray-400 gap-8 text-[0.875rem]"><buttontype="button"+ class="transition-opacity hover:opacity-70 will-change-[opacity]"onClick={async () => {setPlaying(false);await commands.stopPlayback();@@ -192,7 +193,7 @@ export function Player() {<buttontype="button"onClick={handlePlayPauseClick}- class="flex justify-center items-center bg-gray-200 rounded-full border border-gray-300 transition-colors hover:text-black size-9"+ class="flex justify-center items-center bg-gray-200 rounded-full border border-gray-300 transition-colors hover:bg-gray-300 hover:text-black size-9">{!playing() || isAtEnd() ? (<IconCapPlay class="text-gray-500 size-3" />@@ -202,6 +203,7 @@ export function Player() {</button><buttontype="button"+ class="transition-opacity hover:opacity-70 will-change-[opacity]"onClick={async () => {setPlaying(false);await commands.stopPlayback();@@ -226,7 +228,7 @@ export function Player() {playbackTime());}}- class="text-gray-500 size-5"+ class="text-gray-500 size-5 will-change-[opacity] transition-opacity hover:opacity-70"/></Tooltip><Tooltip content="Zoom in">@@ -237,7 +239,7 @@ export function Player() {playbackTime());}}- class="text-gray-500 size-5"+ class="text-gray-500 size-5 will-change-[opacity] transition-opacity hover:opacity-70"/></Tooltip><p class="text-sm tabular-nums text-gray-500">diff --git a/apps/desktop/src/routes/editor/Timeline.tsx b/apps/desktop/src/routes/editor/Timeline.tsxindex bf70af267..175950983 100644--- a/apps/desktop/src/routes/editor/Timeline.tsx+++ b/apps/desktop/src/routes/editor/Timeline.tsx@@ -383,14 +383,14 @@ function ClipTrack(props: Pick<ComponentProps<"div">, "ref">) {style={{left: `${second / secsPerPixel() + -0.5}px`,}}- class="absolute z-10 w-px h-14 bg-gradient-to-b to-transparent from-white-transparent-80 dark:from-black-transparent-60"+ class="absolute z-10 w-px h-14 bg-gradient-to-b to-transparent from-white-transparent-40 dark:from-black-transparent-60"/>)}</For><SegmentHandleclass={cx(- "absolute opacity-0 top-[50%] bg-gradient-to-r -translate-y-1/2 left-2.5 z-10 w-[3px] h-8 bg-white rounded-full",+ "absolute opacity-0 top-[50%] bg-gradient-to-r -translate-y-1/2 left-2.5 z-10 w-[3px] h-8 bg-solid-white rounded-full","group-hover:opacity-100")}onMouseDown={(downEvent) => {@@ -452,11 +452,11 @@ function ClipTrack(props: Pick<ComponentProps<"div">, "ref">) {}}/><SegmentContent class="justify-between relative bg-gradient-to-r timeline-gradient-border from-[#2675DB] via-[#5CA3FF] to-[#2675DB] shadow-[inset_0_5px_10px_5px_rgba(255,255,255,0.2)]">- <div class="absolute inset-0 -top-[120px] bg-white w-[500px] h-[150px] rounded-full mx-auto blur-[50px] mix-blend-overlay opacity-30" />+ <div class="absolute inset-0 -top-[120px] dark:bg-gray-500 bg-gray-50 w-[500px] h-[150px] rounded-full mx-auto blur-[50px] mix-blend-overlay opacity-30" /></SegmentContent><SegmentHandleclass={cx(- "absolute top-[50%] opacity-0 -translate-y-1/2 right-2.5 z-10 w-[3px] h-8 bg-white rounded-full",+ "absolute top-[50%] opacity-0 -translate-y-1/2 right-2.5 z-10 w-[3px] h-8 bg-solid-white rounded-full","group-hover:opacity-100")}onMouseDown={(downEvent) => {@@ -736,7 +736,7 @@ function ZoomTrack(props: {><SegmentHandleclass={cx(- "absolute top-[50%] group-hover:opacity-100 opacity-0 -translate-y-1/2 left-2.5 z-10 w-[3px] h-8 bg-white rounded-full"+ "absolute top-[50%] group-hover:opacity-100 opacity-0 -translate-y-1/2 left-2.5 z-10 w-[3px] h-8 dark:bg-gray-500 bg-gray-50 rounded-full")}onMouseDown={createMouseDownDrag(() => {@@ -819,7 +819,7 @@ function ZoomTrack(props: {return (<Show when={ctx.width() > 100}><div class="flex flex-col gap-1 justify-center items-center text-xs text-gray-500 whitespace-nowrap">- <div class="flex gap-1 items-center text-white text-md">+ <div class="flex gap-1 items-center text-gray-50 dark:text-gray-500 text-md"><IconLucideSearch class="size-3.5" />{" "}{zoomPercentage()}{" "}</div>@@ -830,7 +830,7 @@ function ZoomTrack(props: {</SegmentContent><SegmentHandleclass={cx(- "absolute top-[50%] group-hover:opacity-100 opacity-0 -translate-y-1/2 right-2.5 z-10 w-[3px] h-8 bg-white rounded-full"+ "absolute top-[50%] group-hover:opacity-100 opacity-0 -translate-y-1/2 right-2.5 z-10 w-[3px] h-8 dark:bg-gray-500 bg-gray-50 rounded-full")}onMouseDown={createMouseDownDrag(() => {@@ -935,7 +935,7 @@ function SegmentRoot(class={cx("absolute border rounded-[calc(0.75rem+1px)] h-14 w-full",props.class,- isSelected() && "wobble-wrapper"+ isSelected() && "wobble-wrapper border border-gray-500")}style={{"--segment-x": `${translateX()}px`,diff --git a/apps/desktop/src/routes/editor/context.ts b/apps/desktop/src/routes/editor/context.tsindex 159ec8946..54587d1cf 100644--- a/apps/desktop/src/routes/editor/context.ts+++ b/apps/desktop/src/routes/editor/context.ts@@ -42,7 +42,6 @@ export const OUTPUT_SIZE = {export const BACKGROUND_THEMES = {macOS: "Macos",- nature: "Nature",dark: "Dark",blue: "Blue",purple: "Purple",diff --git a/apps/desktop/src/routes/editor/ui.tsx b/apps/desktop/src/routes/editor/ui.tsxindex cf6509f20..d21f1e55e 100644--- a/apps/desktop/src/routes/editor/ui.tsx+++ b/apps/desktop/src/routes/editor/ui.tsx@@ -57,7 +57,7 @@ export function Toggle(props: ComponentProps<typeof KSwitch>) {<KSwitch {...props}><KSwitch.Input class="peer" /><KSwitch.Control class="rounded-full bg-gray-300 ui-disabled:bg-gray-200 w-11 h-[1.5rem] p-[0.125rem] ui-checked:bg-blue-300 transition-colors peer-focus-visible:outline outline-2 outline-offset-2 outline-blue-300">- <KSwitch.Thumb class="bg-white rounded-full size-[1.25rem] transition-transform ui-checked:translate-x-[calc(100%)]" />+ <KSwitch.Thumb class="bg-solid-white rounded-full size-[1.25rem] transition-transform ui-checked:translate-x-[calc(100%)]" /></KSwitch.Control></KSwitch>);diff --git a/apps/desktop/src/styles/theme.css b/apps/desktop/src/styles/theme.cssindex d39c040e8..6a4b56c2c 100644--- a/apps/desktop/src/styles/theme.css+++ b/apps/desktop/src/styles/theme.css@@ -21,7 +21,7 @@--black-transparent-40: rgba(18, 22, 31, 0.4);--black-transparent-60: rgba(18, 22, 31, 0.6);--black-transparent-80: rgba(18, 22, 31, 0.8);-+--white-transparent-5: rgba(255, 255, 255, 0.05);--white-transparent-10: rgba(255, 255, 255, 0.1);--white-transparent-20: rgba(255, 255, 255, 0.2);@@ -29,7 +29,8 @@--white-transparent-60: rgba(255, 255, 255, 0.6);--white-transparent-80: rgba(255, 255, 255, 0.8);- --white: #fff;++ --solid-white: #ffffff;--blue-50: #ebf1ff;--blue-100: #adc9ff;@@ -86,8 +87,9 @@--white-transparent-40: rgba(18, 22, 31, 0.4);--white-transparent-60: rgba(18, 22, 31, 0.6);--white-transparent-80: rgba(18, 22, 31, 0.8);-- --white: #fff;++ --solid-white: #ffffff;+/* Accent colors remain mostly the same but adjusted for dark theme */--blue-50: #1a2438;diff --git a/apps/desktop/src/styles/timeline.css b/apps/desktop/src/styles/timeline.cssindex 520176f49..8c33767a8 100644--- a/apps/desktop/src/styles/timeline.css+++ b/apps/desktop/src/styles/timeline.css@@ -10,8 +10,6 @@.wobble-wrapper {animation: wobble 1s ease-in-out infinite;will-change: transform;- background: rgb(38, 57, 116) !important;- box-shadow: inset 0px 8px 16px 0px rgba(134, 165, 249, 0.503) !important;}.timeline-gradient-border::before {diff --git a/packages/ui-solid/src/Button.tsx b/packages/ui-solid/src/Button.tsxindex 23aaf290b..9f30a367b 100644--- a/packages/ui-solid/src/Button.tsx+++ b/packages/ui-solid/src/Button.tsx@@ -2,7 +2,7 @@ import { cva, type VariantProps } from "cva";import type { ComponentProps } from "solid-js";const styles = cva(- "rounded-xl outline-offset-2 outline-2 focus-visible:outline transition-all duration-200",+ "rounded-xl outline-offset-2 outline-2 focus-visible:outline transition-all will-change-transform duration-200",{defaultVariants: {variant: "primary",diff --git a/packages/ui-solid/tailwind.config.js b/packages/ui-solid/tailwind.config.jsindex 21f741b3b..4ead878d3 100644--- a/packages/ui-solid/tailwind.config.js+++ b/packages/ui-solid/tailwind.config.js@@ -8,7 +8,7 @@ module.exports = {theme: {colors: {transparent: "rgba(0,0,0,0)",- white: "var(--white)",+ "solid-white": "#ffffff",gray: {50: "var(--gray-50)",100: "var(--gray-100)",