Open source Loom alternative. Beautiful, shareable screen recordings.
Rust appcapcossloommacnextjsnextjs15open-sourceossreactrecordrustscreen-capturescreen-recorderscreenshotsolidjstauritauri-apptypescriptvite
Allow changing the server URL in Desktop (#526)
Brendan Allan30f8b3d143c2
diff --git a/apps/desktop/package.json b/apps/desktop/package.jsonindex d32dd25a4..c6926cb6f 100644--- a/apps/desktop/package.json+++ b/apps/desktop/package.json@@ -26,7 +26,7 @@"@solid-primitives/deep": "^0.2.9","@solid-primitives/event-listener": "^2.3.3","@solid-primitives/history": "^0.1.5",- "@solid-primitives/memo": "^1.3.9",+ "@solid-primitives/memo": "^1.4.2","@solid-primitives/refs": "^1.0.8","@solid-primitives/resize-observer": "^2.0.26","@solid-primitives/scheduled": "^1.4.3",diff --git a/apps/desktop/src-tauri/src/auth.rs b/apps/desktop/src-tauri/src/auth.rsindex e35346d2b..40984ce82 100644--- a/apps/desktop/src-tauri/src/auth.rs+++ b/apps/desktop/src-tauri/src/auth.rs@@ -63,7 +63,7 @@ impl AuthStore {auth.user_id.as_deref().unwrap_or("unknown"));let response = app- .authed_api_request(|client| client.get(web_api::make_url("/api/desktop/plan")))+ .authed_api_request("/api/desktop/plan", |client, url| client.get(url)).await.map_err(|e| {println!("Failed to fetch plan: {}", e);diff --git a/apps/desktop/src-tauri/src/general_settings.rs b/apps/desktop/src-tauri/src/general_settings.rsindex 9c73bce05..71be61c2e 100644--- a/apps/desktop/src-tauri/src/general_settings.rs+++ b/apps/desktop/src-tauri/src/general_settings.rs@@ -57,11 +57,19 @@ pub struct GeneralSettingsStore {pub custom_cursor_capture: bool,#[serde(default)]pub system_audio_capture: bool,+ #[serde(default = "default_server_url")]+ pub server_url: String,#[serde(default, alias = "open_editor_after_recording")]#[deprecated]_open_editor_after_recording: bool,}+fn default_server_url() -> String {+ std::option_env!("VITE_SERVER_URL")+ .unwrap_or("https://cap.so")+ .to_string()+}+#[derive(Serialize, Deserialize, Type, Debug)]#[serde(rename_all = "camelCase")]pub struct CommercialLicense {@@ -90,6 +98,7 @@ impl Default for GeneralSettingsStore {main_window_recording_start_behaviour: MainWindowRecordingStartBehaviour::Close,custom_cursor_capture: false,system_audio_capture: false,+ server_url: default_server_url(),_open_editor_after_recording: false,}}diff --git a/apps/desktop/src-tauri/src/lib.rs b/apps/desktop/src-tauri/src/lib.rsindex 8f8006c2b..913240ab9 100644--- a/apps/desktop/src-tauri/src/lib.rs+++ b/apps/desktop/src-tauri/src/lib.rs@@ -22,24 +22,16 @@ mod windows;use audio::AppSounds;use auth::{AuthStore, AuthenticationInvalid, Plan};-use base64::prelude::BASE64_STANDARD;-use base64::Engine;use camera::create_camera_preview_ws;use cap_editor::EditorInstance;use cap_editor::EditorState;-use cap_fail::fail;use cap_media::feeds::RawCameraFrame;use cap_media::feeds::{AudioInputFeed, AudioInputSamplesSender};-use cap_media::frame_ws::WSFrame;use cap_media::platform::Bounds;-use cap_media::sources::CaptureScreen;use cap_media::{feeds::CameraFeed, sources::ScreenCaptureTarget};use cap_project::RecordingMetaInner;use cap_project::XY;-use cap_project::{- ProjectConfiguration, RecordingMeta, Resolution, SharingMeta, StudioRecordingMeta,-};-use cap_recording::instant_recording::InstantRecordingHandle;+use cap_project::{ProjectConfiguration, RecordingMeta, SharingMeta, StudioRecordingMeta};use cap_recording::RecordingMode;use cap_recording::RecordingOptions;use cap_rendering::ProjectRecordings;@@ -49,7 +41,6 @@ use editor_window::EditorInstances;use editor_window::WindowEditorInstance;use general_settings::GeneralSettingsStore;use mp4::Mp4Reader;-// use display::{list_capture_windows, Bounds, CaptureTarget, FPS};use notifications::NotificationType;use png::{ColorType, Encoder};use recording::InProgressRecording;@@ -61,7 +52,6 @@ use serde::{Deserialize, Serialize};use serde_json::json;use specta::Type;use std::collections::BTreeMap;-use std::ffi::OsString;use std::time::Duration;use std::{fs::File,@@ -82,7 +72,6 @@ use tauri_plugin_shell::ShellExt;use tauri_specta::Event;use tokio::sync::{Mutex, RwLock};use tracing::debug;-use tracing::info;use tracing_subscriber::layer::SubscriberExt;use tracing_subscriber::util::SubscriberInitExt;use tracing_subscriber::Layer;@@ -111,6 +100,7 @@ pub struct App {current_recording: Option<InProgressRecording>,#[serde(skip)]recording_logging_handle: LoggingHandle,+ server_url: String,}#[derive(specta::Type, Serialize, Deserialize, Clone, Debug)]@@ -455,7 +445,7 @@ pub struct NewNotification {}type ArcLock<T> = Arc<RwLock<T>>;-type MutableState<'a, T> = State<'a, Arc<RwLock<T>>>;+pub type MutableState<'a, T> = State<'a, Arc<RwLock<T>>>;#[tauri::command]#[specta::specta]@@ -1753,9 +1743,9 @@ async fn check_upgraded_and_update(app: AppHandle) -> Result<bool, String> {"Fetching plan for user {}",auth.user_id.as_deref().unwrap_or("unknown"));- let plan_url = web_api::make_url("/api/desktop/plan");+ let plan_url = app.make_app_url("/api/desktop/plan");let response = app- .authed_api_request(|client| client.get(plan_url))+ .authed_api_request("/api/desktop/plan", |client, url| client.get(url)).await.map_err(|e| {println!("Failed to fetch plan: {}", e);@@ -1949,6 +1939,13 @@ fn configure_logging(folder: &PathBuf) -> tracing_appender::non_blocking::Worker_guard}+#[tauri::command]+#[specta::specta]+async fn set_server_url(app: MutableState<'_, App>, server_url: String) -> Result<(), ()> {+ app.write().await.server_url = server_url;+ Ok(())+}+#[tauri::command]#[specta::specta]async fn update_auth_plan(app: AppHandle) {@@ -2023,7 +2020,8 @@ pub async fn run(recording_logging_handle: LoggingHandle) {set_fail,update_auth_plan,set_window_transparent,- get_editor_meta+ get_editor_meta,+ set_server_url]).events(tauri_specta::collect_events![RecordingOptionsChanged,@@ -2164,6 +2162,15 @@ pub async fn run(recording_logging_handle: LoggingHandle) {},current_recording: None,recording_logging_handle,+ server_url: GeneralSettingsStore::get(&app)+ .ok()+ .flatten()+ .map(|v| v.server_url.clone())+ .unwrap_or_else(|| {+ std::option_env!("VITE_SERVER_URL")+ .unwrap_or("https://cap.so")+ .to_string()+ }),})));app.manage(Arc::new(RwLock::new(diff --git a/apps/desktop/src-tauri/src/recording.rs b/apps/desktop/src-tauri/src/recording.rsindex 03f476ba0..c95c3f070 100644--- a/apps/desktop/src-tauri/src/recording.rs+++ b/apps/desktop/src-tauri/src/recording.rs@@ -10,7 +10,7 @@ use crate::{open_external_link,presets::PresetsStore,upload::{get_s3_config, prepare_screenshot_upload, upload_video, InstantMultipartUpload},- web_api,+ web_api::{self, ManagerExt},windows::{CapWindowId, ShowCapWindow},App, CurrentRecordingChanged, DynLoggingLayer, MutableState, NewStudioRecordingAdded,RecordingStarted, RecordingStopped, VideoUploadInfo,@@ -186,6 +186,8 @@ pub async fn start_recording(let recording_options = recording_options.unwrap_or(state.recording_options.clone());state.recording_options = recording_options.clone();+ drop(state);+if let Some(window) = CapWindowId::Camera.get(&app) {let _ =window.set_content_protected(matches!(recording_options.mode, RecordingMode::Studio));@@ -197,7 +199,7 @@ pub async fn start_recording(Some(_) => {// Pre-create the video and get the shareable linkif let Ok(s3_config) = get_s3_config(&app, false, None).await {- let link = web_api::make_url(format!("/s/{}", s3_config.id()));+ let link = app.make_app_url(format!("/s/{}", s3_config.id())).await;info!("Pre-created shareable link: {}", link);Some(VideoUploadInfo {@@ -259,8 +261,6 @@ pub async fn start_recording()});- drop(state);-println!("spawning actor");// done in spawn to catch panics just in casediff --git a/apps/desktop/src-tauri/src/upload.rs b/apps/desktop/src-tauri/src/upload.rsindex 29d30f34e..a2dcaab07 100644--- a/apps/desktop/src-tauri/src/upload.rs+++ b/apps/desktop/src-tauri/src/upload.rs@@ -287,7 +287,7 @@ pub async fn upload_video(}return Ok(UploadedVideo {- link: web_api::make_url(format!("/s/{}", &s3_config.id)),+ link: app.make_app_url(format!("/s/{}", &s3_config.id)).await,id: s3_config.id.clone(),config: s3_config,});@@ -355,7 +355,7 @@ pub async fn upload_image(app: &AppHandle, file_path: PathBuf) -> Result<Uploadeif response.status().is_success() {println!("File uploaded successfully");return Ok(UploadedImage {- link: web_api::make_url(format!("/s/{}", &s3_config.id)),+ link: app.make_app_url(format!("/s/{}", &s3_config.id)).await,id: s3_config.id,});}@@ -429,7 +429,7 @@ pub async fn upload_audio(app: &AppHandle, file_path: PathBuf) -> Result<Uploadeif response.status().is_success() {println!("Audio file uploaded successfully");return Ok(UploadedAudio {- link: web_api::make_url(format!("/s/{}", &s3_config.id)),+ link: app.make_app_url(format!("/s/{}", &s3_config.id)).await,id: s3_config.id.clone(),config: s3_config,});@@ -456,16 +456,16 @@ pub async fn get_s3_config(is_screenshot: bool,video_id: Option<String>,) -> Result<S3UploadMeta, String> {- let config_url = web_api::make_url(if let Some(id) = video_id {+ let s3_config_url = if let Some(id) = video_id {format!("/api/desktop/video/create?recordingMode=desktopMP4&videoId={id}")} else if is_screenshot {"/api/desktop/video/create?recordingMode=desktopMP4&isScreenshot=true".to_string()} else {"/api/desktop/video/create?recordingMode=desktopMP4".to_string()- });+ };let response = app- .authed_api_request(|client| client.get(config_url))+ .authed_api_request(s3_config_url, |client, url| client.get(url)).await.map_err(|e| format!("Failed to send request to Next.js handler: {}", e))?;@@ -494,10 +494,8 @@ async fn presigned_s3_url(body: S3VideoUploadBody,) -> Result<(String, Form), String> {let response = app- .authed_api_request(|client| {- client- .post(web_api::make_url("/api/upload/signed"))- .json(&serde_json::json!(body))+ .authed_api_request("/api/upload/signed", |client, url| {+ client.post(url).json(&serde_json::json!(body))}).await.map_err(|e| format!("Failed to send request to Next.js handler: {}", e))?;@@ -536,10 +534,8 @@ async fn presigned_s3_url_image(body: S3ImageUploadBody,) -> Result<(String, Form), String> {let response = app- .authed_api_request(|client| {- client- .post(web_api::make_url("/api/upload/signed"))- .json(&serde_json::json!(body))+ .authed_api_request("/api/upload/signed", |client, url| {+ client.post(url).json(&serde_json::json!(body))}).await.map_err(|e| format!("Failed to send request to Next.js handler: {}", e))?;@@ -574,10 +570,8 @@ async fn presigned_s3_url_audio(body: S3AudioUploadBody,) -> Result<(String, Form), String> {let response = app- .authed_api_request(|client| {- client- .post(web_api::make_url("/api/upload/signed"))- .json(&serde_json::json!(body))+ .authed_api_request("/api/upload/signed", |client, url| {+ client.post(url).json(&serde_json::json!(body))}).await.map_err(|e| format!("Failed to send request to Next.js handler: {}", e))?;@@ -860,8 +854,8 @@ impl InstantMultipartUpload {// --------------------------------------------println!("Initiating multipart upload for {video_id}...");let initiate_response = match app- .authed_api_request(|c| {- c.post(web_api::make_url("/api/upload/multipart/initiate"))+ .authed_api_request("/api/upload/multipart/initiate", |c, url| {+ c.post(url).header("Content-Type", "application/json").json(&serde_json::json!({"fileKey": file_key,@@ -1137,8 +1131,8 @@ impl InstantMultipartUpload {// Request presigned URL for this partlet presign_response = match app- .authed_api_request(|c| {- c.post(web_api::make_url("/api/upload/multipart/presign-part"))+ .authed_api_request("/api/upload/multipart/presign-part", |c, url| {+ c.post(url).header("Content-Type", "application/json").json(&serde_json::json!({"fileKey": file_key,@@ -1314,8 +1308,8 @@ impl InstantMultipartUpload {println!("Proceeding with multipart upload completion...");let complete_response = match app- .authed_api_request(|c| {- c.post(web_api::make_url("/api/upload/multipart/complete"))+ .authed_api_request("/api/upload/multipart/complete", |c, url| {+ c.post(url).header("Content-Type", "application/json").json(&serde_json::json!({"fileKey": file_key,diff --git a/apps/desktop/src-tauri/src/web_api.rs b/apps/desktop/src-tauri/src/web_api.rsindex e99fbb527..c8478523d 100644--- a/apps/desktop/src-tauri/src/web_api.rs+++ b/apps/desktop/src-tauri/src/web_api.rs@@ -2,20 +2,19 @@ use reqwest::StatusCode;use tauri::{Emitter, Manager, Runtime};use tauri_specta::Event;-use crate::auth::{AuthStore, AuthenticationInvalid};--pub fn make_url(pathname: impl AsRef<str>) -> String {- let server_url_base = std::option_env!("VITE_SERVER_URL").unwrap_or("https://cap.so");- format!("{server_url_base}{}", pathname.as_ref())-}+use crate::{+ auth::{AuthStore, AuthenticationInvalid},+ ArcLock, MutableState,+};async fn do_authed_request(auth: &AuthStore,- build: impl FnOnce(reqwest::Client) -> reqwest::RequestBuilder,+ build: impl FnOnce(reqwest::Client, String) -> reqwest::RequestBuilder,+ url: String,) -> Result<reqwest::Response, reqwest::Error> {let client = reqwest::Client::new();- let mut req = build(client).header("Authorization", format!("Bearer {}", auth.token));+ let mut req = build(client, url).header("Authorization", format!("Bearer {}", auth.token));if let Some(s) = std::option_env!("VITE_VERCEL_AUTOMATION_BYPASS_SECRET") {req = req.header("x-vercel-protection-bypass", s);@@ -27,14 +26,18 @@ async fn do_authed_request(pub trait ManagerExt<R: Runtime>: Manager<R> {async fn authed_api_request(&self,- build: impl FnOnce(reqwest::Client) -> reqwest::RequestBuilder,+ path: impl Into<String>,+ build: impl FnOnce(reqwest::Client, String) -> reqwest::RequestBuilder,) -> Result<reqwest::Response, String>;++ async fn make_app_url(&self, pathname: impl AsRef<str>) -> String;}impl<T: Manager<R> + Emitter<R>, R: Runtime> ManagerExt<R> for T {async fn authed_api_request(&self,- build: impl FnOnce(reqwest::Client) -> reqwest::RequestBuilder,+ path: impl Into<String>,+ build: impl FnOnce(reqwest::Client, String) -> reqwest::RequestBuilder,) -> Result<reqwest::Response, String> {let Some(auth) = AuthStore::get(self.app_handle())? else {println!("Not logged in");@@ -44,7 +47,8 @@ impl<T: Manager<R> + Emitter<R>, R: Runtime> ManagerExt<R> for T {return Err("Unauthorized".to_string());};- let response = do_authed_request(&auth, build)+ let url = self.make_app_url(path.into()).await;+ let response = do_authed_request(&auth, build, url).await.map_err(|e| e.to_string())?;@@ -58,4 +62,10 @@ impl<T: Manager<R> + Emitter<R>, R: Runtime> ManagerExt<R> for T {Ok(response)}++ async fn make_app_url(&self, pathname: impl AsRef<str>) -> String {+ let app_state = self.state::<ArcLock<crate::App>>();+ let server_url = &app_state.read().await.server_url;+ format!("{}{}", server_url, pathname.as_ref())+ }}diff --git a/apps/desktop/src/components/SignInButton.tsx b/apps/desktop/src/components/SignInButton.tsxindex 567243153..3ef0ab41e 100644--- a/apps/desktop/src/components/SignInButton.tsx+++ b/apps/desktop/src/components/SignInButton.tsx@@ -7,7 +7,7 @@ import * as shell from "@tauri-apps/plugin-shell";import { getCurrentWindow } from "@tauri-apps/api/window";import { ComponentProps } from "solid-js";-import { authStore } from "~/store";+import { authStore, generalSettingsStore } from "~/store";import { identifyUser, trackEvent } from "~/utils/analytics";import { clientEnv } from "~/utils/env";import { commands } from "~/utils/tauri";@@ -54,14 +54,13 @@ export function SignInButton();}-function createSessionRequestUrl(+async function createSessionRequestUrl(port: string | null,platform: "web" | "desktop") {- const callbackUrl = new URL(- `/api/desktop/session/request`,- clientEnv.VITE_SERVER_URL- );+ const serverUrl =+ (await generalSettingsStore.get())?.serverUrl ?? "https://cap.so";+ const callbackUrl = new URL(`/api/desktop/session/request`, serverUrl);if (port !== null) callbackUrl.searchParams.set("port", port);callbackUrl.searchParams.set("platform", platform);@@ -105,7 +104,7 @@ async function createLocalServerSession(signal: AbortSignal) {);return {- url: createSessionRequestUrl(port, "web"),+ url: await createSessionRequestUrl(port, "web"),complete: async () => {const url = await new Promise<URL>((r) => {res = r;@@ -154,7 +153,7 @@ async function createDeepLinkSession(signal: AbortSignal) {};return {- url: createSessionRequestUrl(null, "desktop"),+ url: await createSessionRequestUrl(null, "desktop"),complete: () => p,};}diff --git a/apps/desktop/src/routes/(window-chrome)/settings/general.tsx b/apps/desktop/src/routes/(window-chrome)/settings/general.tsxindex 31527033c..3685336e2 100644--- a/apps/desktop/src/routes/(window-chrome)/settings/general.tsx+++ b/apps/desktop/src/routes/(window-chrome)/settings/general.tsx@@ -6,19 +6,24 @@ import {} from "@tauri-apps/plugin-notification";import { type OsType, type } from "@tauri-apps/plugin-os";import "@total-typescript/ts-reset/filter-boolean";+import { createWritableMemo } from "@solid-primitives/memo";+import { Button } from "@cap/ui-solid";-import { generalSettingsStore } from "~/store";-import type {- AppTheme,- GeneralSettingsStore,- MainWindowRecordingStartBehaviour,- PostStudioRecordingBehaviour,+import { authStore, generalSettingsStore } from "~/store";+import {+ commands,+ type AppTheme,+ type GeneralSettingsStore,+ type MainWindowRecordingStartBehaviour,+ type PostStudioRecordingBehaviour,} from "~/utils/tauri";// import { themeStore } from "~/store/theme";import themePreviewAuto from "~/assets/theme-previews/auto.jpg";import themePreviewDark from "~/assets/theme-previews/dark.jpg";import themePreviewLight from "~/assets/theme-previews/light.jpg";import { CheckMenuItem, Menu, MenuItem } from "@tauri-apps/api/menu";+import { TextInput } from "~/routes/editor/TextInput";+import { confirm } from "@tauri-apps/plugin-dialog";export default function GeneralSettings() {const [store] = createResource(() => generalSettingsStore.get());@@ -255,12 +260,56 @@ function Inner(props: { initialStore: GeneralSettingsStore | null }) {<IconCapChevronDown class="size-4" /></button></Setting>+ <ServerURLSetting+ value={settings.serverUrl ?? "https://cap.so"}+ onChange={async (v) => {+ if (+ !(await confirm(+ `Are you sure you want to change the server URL to '${v}'? You will need to sign in again.`+ ))+ )+ return;++ await authStore.set(undefined);+ await commands.setServerUrl(v);+ handleChange("serverUrl", v);+ }}+ /></div></div></div>);}+function ServerURLSetting(props: {+ value: string;+ onChange: (v: string) => void;+}) {+ const [value, setValue] = createWritableMemo(() => props.value);++ return (+ <Setting+ label="Cap Server URL"+ description="This setting should only be changed if you are self hosting your own instance of Cap Web."+ >+ <div class="flex flex-col gap-2 items-end">+ <TextInput+ class="border border-gray-300 bg-gray-50 rounded-md px-2 py-1 flex flex-row items-center gap-1 max-w-48"+ value={value()}+ onInput={(e) => setValue(e.currentTarget.value)}+ />+ <Button+ size="sm"+ disabled={props.value === value()}+ onClick={() => props.onChange(value())}+ >+ Update+ </Button>+ </div>+ </Setting>+ );+}+function Setting(props: {pro?: boolean;@@ -269,7 +318,7 @@ function Setting(} & ParentProps) {return (- <div class="py-3 flex flex-row justify-between items-start text-sm">+ <div class="py-3 flex flex-row gap-2 justify-between items-start text-sm"><div class="flex justify-between items-start space-y-2 flex-col">{props.pro && (<span class="px-2 py-1 text-xs font-medium text-gray-50 bg-blue-400 rounded-lg">diff --git a/apps/desktop/src/utils/tauri.ts b/apps/desktop/src/utils/tauri.tsindex 20dad072d..9d048164d 100644--- a/apps/desktop/src/utils/tauri.ts+++ b/apps/desktop/src/utils/tauri.ts@@ -169,6 +169,9 @@ async setWindowTransparent(value: boolean) : Promise<void> {},async getEditorMeta() : Promise<RecordingMeta> {return await TAURI_INVOKE("get_editor_meta");+},+async setServerUrl(serverUrl: string) : Promise<null> {+ return await TAURI_INVOKE("set_server_url", { serverUrl });}}@@ -256,7 +259,7 @@ export type ExportEstimates = { duration_seconds: number; estimated_time_secondsexport type ExportSettings = { fps: number; resolution_base: XY<number>; compression: ExportCompression }export type Flags = { systemAudioRecording: boolean; split: boolean }export type FramesRendered = { renderedCount: number; totalFrames: number; type: "FramesRendered" }-export type GeneralSettingsStore = { instanceId?: string; uploadIndividualFiles?: boolean; hideDockIcon?: boolean; hapticsEnabled?: boolean; autoCreateShareableLink?: boolean; enableNotifications?: boolean; disableAutoOpenLinks?: boolean; hasCompletedStartup?: boolean; theme?: AppTheme; commercialLicense?: CommercialLicense | null; lastVersion?: string | null; windowTransparency?: boolean; postStudioRecordingBehaviour?: PostStudioRecordingBehaviour; mainWindowRecordingStartBehaviour?: MainWindowRecordingStartBehaviour; customCursorCapture?: boolean; systemAudioCapture?: boolean;+export type GeneralSettingsStore = { instanceId?: string; uploadIndividualFiles?: boolean; hideDockIcon?: boolean; hapticsEnabled?: boolean; autoCreateShareableLink?: boolean; enableNotifications?: boolean; disableAutoOpenLinks?: boolean; hasCompletedStartup?: boolean; theme?: AppTheme; commercialLicense?: CommercialLicense | null; lastVersion?: string | null; windowTransparency?: boolean; postStudioRecordingBehaviour?: PostStudioRecordingBehaviour; mainWindowRecordingStartBehaviour?: MainWindowRecordingStartBehaviour; customCursorCapture?: boolean; systemAudioCapture?: boolean; serverUrl?: string;/*** @deprecated*/diff --git a/packages/ui-solid/src/Button.tsx b/packages/ui-solid/src/Button.tsxindex f968124ec..fc08f29f4 100644--- a/packages/ui-solid/src/Button.tsx+++ b/packages/ui-solid/src/Button.tsx@@ -11,15 +11,15 @@ const styles = cva(variants: {variant: {primary:- "bg-blue-300 text-gray-50 hover:opacity-80 dark:text-gray-500 disabled:bg-blue-200 outline-blue-300",+ "bg-blue-300 text-gray-50 disabled:text-gray-200 enabled:hover:opacity-80 dark:text-gray-500 dark:disabled:text-gray-300 disabled:bg-blue-200 outline-blue-300",secondary:- "bg-gray-200 hover:opacity-80 text-gray-500 disabled:bg-gray-200 disabled:text-gray-8 outline-blue-300",+ "bg-gray-200 enabled:hover:opacity-80 text-gray-500 disabled:bg-gray-200 disabled:text-gray-8 outline-blue-300",destructive:- "bg-red-300 text-gray-50 dark:text-gray-500 hover:bg-red-400 disabled:bg-red-200 outline-red-300",+ "bg-red-300 text-gray-50 dark:text-gray-500 enabled:hover:bg-red-400 disabled:bg-red-200 outline-red-300",white:- "bg-gray-1 dark:bg-gray-500 hover:opacity-80 text-gray-500 dark:disabled:bg-gray-300 dark:disabled:text-gray-8 dark:text-gray-50 disabled:bg-gray-400 disabled:text-gray-8 outline-blue-300",+ "bg-gray-1 dark:bg-gray-500 enabled:hover:opacity-80 text-gray-500 dark:disabled:bg-gray-300 dark:disabled:text-gray-8 dark:text-gray-50 disabled:bg-gray-400 disabled:text-gray-8 outline-blue-300",lightdark:- "bg-gray-500 hover:opacity-80 text-gray-100 dark:disabled:bg-gray-300 dark:disabled:text-gray-8 dark:text-gray-50 disabled:bg-gray-400 disabled:text-gray-8 outline-blue-300",+ "bg-gray-500 enabled:hover:opacity-80 text-gray-100 dark:disabled:bg-gray-300 dark:disabled:text-gray-8 dark:text-gray-50 disabled:bg-gray-400 disabled:text-gray-8 outline-blue-300",},size: {xs: "font-[400] text-[0.75rem] px-[0.5rem] h-[1.25rem] ",diff --git a/pnpm-lock.yaml b/pnpm-lock.yamlindex 073aada0b..353528c5c 100644--- a/pnpm-lock.yaml+++ b/pnpm-lock.yaml@@ -76,7 +76,7 @@ importers:specifier: ^0.1.5version: 0.1.5([email protected])'@solid-primitives/memo':- specifier: ^1.3.9+ specifier: ^1.4.2version: 1.4.2([email protected])'@solid-primitives/refs':specifier: ^1.0.8@@ -5176,10 +5176,10 @@ packages:react-dom:optional: true- '@storybook/[email protected]':- resolution: {integrity: sha512-mTD5G+Niqa7km0EljNWn08fBDzZ+mNAMp42U/ksL7plVnecSgoa+J/YC1VCgynwgHed65ZjG7TtbFgIU2W62Vg==}+ '@storybook/[email protected]':+ resolution: {integrity: sha512-jaa6KaKjmmOxozotDieuH7Qcc5KyIBQhwMHoh9YSinqmAoHdLKQSrPEEpluEjwoMW+BDPRVYLAMWiXmemuDTRg==}peerDependencies:- storybook: ^9.0.0-beta.10+ storybook: ^9.0.0-beta.11vite: ^5.0.0 || ^6.0.0'@storybook/[email protected]':@@ -5195,10 +5195,10 @@ packages:peerDependencies:storybook: ^8.6.12- '@storybook/[email protected]':- resolution: {integrity: sha512-R7RkaPVL0fm6hsNZHOe9LT70YMihNU9s5BGf6a/78vwhwp41H4V7fJA6G7d5bqT4bnPsbOKERmum4lnyHRt3BA==}+ '@storybook/[email protected]':+ resolution: {integrity: sha512-nkx1/8KnJ/SPrZtVc0tlJJwDZA9B7CAx2vNNKK36cdcOxq5sHzu9ahfQs7RiY12W3nHiAoAuYAlHITTY15ujsQ==}peerDependencies:- storybook: ^9.0.0-beta.10+ storybook: ^9.0.0-beta.11'@storybook/[email protected]':resolution: {integrity: sha512-bOmTNJE4FM6+3/1hPQVgha8cLxX2Nyi/4Z+tYq0pCDEyQqGRTD2KXre9XsSCnziRaGxiW80OrKkmqWY8Otuu4A==}@@ -14205,7 +14205,7 @@ snapshots:'@cap/ui@file:packages/ui(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])([email protected])([email protected]([email protected]))':dependencies:- '@kobalte/tailwindcss': 0.9.0([email protected]([email protected](@types/[email protected])([email protected])))+ '@kobalte/tailwindcss': 0.9.0([email protected]([email protected](@types/[email protected])([email protected])))'@radix-ui/react-dialog': 1.1.13(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])'@radix-ui/react-dropdown-menu': 2.1.14(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])'@radix-ui/react-label': 2.1.6(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])@@ -14213,7 +14213,7 @@ snapshots:'@radix-ui/react-popover': 1.1.13(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])'@radix-ui/react-slot': 1.2.2(@types/[email protected])([email protected])'@radix-ui/react-switch': 1.2.4(@types/[email protected](@types/[email protected]))(@types/[email protected])([email protected]([email protected]))([email protected])- '@tailwindcss/typography': 0.5.16([email protected]([email protected](@types/[email protected])([email protected])))+ '@tailwindcss/typography': 0.5.16([email protected]([email protected](@types/[email protected])([email protected])))class-variance-authority: 0.7.1lucide-react: 0.294.0([email protected])@@ -18361,9 +18361,9 @@ snapshots:react: 18.3.1react-dom: 18.3.1([email protected])- '@storybook/[email protected]([email protected]([email protected]))([email protected](@types/[email protected])([email protected])([email protected])([email protected]))':+ '@storybook/[email protected]([email protected]([email protected]))([email protected](@types/[email protected])([email protected])([email protected])([email protected]))':dependencies:- '@storybook/csf-plugin': 9.0.0-beta.10([email protected]([email protected]))+ '@storybook/csf-plugin': 9.0.0-beta.11([email protected]([email protected]))browser-assert: 1.2.1storybook: 8.6.12([email protected])ts-dedent: 2.2.0@@ -18395,7 +18395,7 @@ snapshots:storybook: 8.6.12([email protected])unplugin: 1.16.1dependencies:storybook: 8.6.12([email protected])unplugin: 1.16.1@@ -21377,7 +21377,7 @@ snapshots:eslint: 8.57.1eslint-import-resolver-node: 0.3.9eslint-import-resolver-typescript: 3.10.1([email protected])([email protected])- eslint-plugin-import: 2.31.0(@typescript-eslint/[email protected]([email protected])([email protected]))([email protected])+ eslint-plugin-import: 2.31.0(@typescript-eslint/[email protected]([email protected])([email protected]))([email protected])([email protected])eslint-plugin-jsx-a11y: 6.10.2([email protected])eslint-plugin-react: 7.37.5([email protected])eslint-plugin-react-hooks: 4.6.2([email protected])@@ -21454,17 +21454,6 @@ snapshots:transitivePeerDependencies:- supports-color- [email protected](@typescript-eslint/[email protected]([email protected])([email protected]))([email protected])([email protected]([email protected]([email protected]))([email protected]))([email protected]):- dependencies:- debug: 3.2.7- optionalDependencies:- '@typescript-eslint/parser': 5.62.0([email protected])([email protected])- eslint: 8.57.1- eslint-import-resolver-node: 0.3.9- eslint-import-resolver-typescript: 3.10.1([email protected]([email protected]))([email protected])- transitivePeerDependencies:- - supports-color-[email protected](@typescript-eslint/[email protected]([email protected])([email protected]))([email protected])([email protected])([email protected]):dependencies:debug: 3.2.7@@ -21488,35 +21477,6 @@ snapshots:- supports-color[email protected](@typescript-eslint/[email protected]([email protected])([email protected]))([email protected])([email protected]):- dependencies:- '@rtsao/scc': 1.1.0- array-includes: 3.1.8- array.prototype.findlastindex: 1.2.6- array.prototype.flat: 1.3.3- array.prototype.flatmap: 1.3.3- debug: 3.2.7- doctrine: 2.1.0- eslint: 8.57.1- eslint-import-resolver-node: 0.3.9- eslint-module-utils: 2.12.0(@typescript-eslint/[email protected]([email protected])([email protected]))([email protected])([email protected]([email protected]([email protected]))([email protected]))([email protected])- hasown: 2.0.2- is-core-module: 2.16.1- is-glob: 4.0.3- minimatch: 3.1.2- object.fromentries: 2.0.8- object.groupby: 1.0.3- object.values: 1.2.1- semver: 6.3.1- string.prototype.trimend: 1.0.9- tsconfig-paths: 3.15.0- optionalDependencies:- '@typescript-eslint/parser': 5.62.0([email protected])([email protected])- transitivePeerDependencies:- - eslint-import-resolver-typescript- - eslint-import-resolver-webpack- - supports-color-- [email protected](@typescript-eslint/[email protected]([email protected])([email protected]))([email protected]):dependencies:'@rtsao/scc': 1.1.0array-includes: 3.1.8@@ -26793,7 +26753,7 @@ snapshots:[email protected](@storybook/[email protected]([email protected]([email protected])))([email protected])([email protected]([email protected]))([email protected](@testing-library/[email protected])([email protected])([email protected](@types/[email protected])([email protected])([email protected])([email protected])))([email protected](@types/[email protected])([email protected])([email protected])([email protected])):dependencies:- '@storybook/builder-vite': 9.0.0-beta.10([email protected]([email protected]))([email protected](@types/[email protected])([email protected])([email protected])([email protected]))+ '@storybook/builder-vite': 9.0.0-beta.11([email protected]([email protected]))([email protected](@types/[email protected])([email protected])([email protected])([email protected]))'@storybook/types': 9.0.0-alpha.1([email protected]([email protected]))magic-string: 0.30.17solid-js: 1.9.6