Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

feat: Download assets button. Option to upload all assets.

Richie McIlroy2db6d05fc7a8
diff --git a/apps/desktop/src-tauri/src/general_settings.rs b/apps/desktop/src-tauri/src/general_settings.rs
new file mode 100644
index 000000000..9e482a966
--- /dev/null
+++ b/apps/desktop/src-tauri/src/general_settings.rs
@@ -0,0 +1,57 @@
+use serde::{Deserialize, Serialize};
+use serde_json::json;
+use specta::Type;
+use std::sync::Mutex;
+use tauri::{AppHandle, Manager, Wry};
+use tauri_plugin_store::{with_store, StoreCollection};
+
+#[derive(Serialize, Deserialize, Type, Default)]
+pub struct GeneralSettingsStore {
+ pub upload_individual_files: bool,
+}
+
+impl GeneralSettingsStore {
+ pub fn get(app: &AppHandle) -> Result<Option<Self>, String> {
+ println!("Attempting to get GeneralSettingsStore");
+ let stores = app
+ .try_state::<StoreCollection<Wry>>()
+ .ok_or("Store not found")?;
+ with_store(app.clone(), stores, "store", |store| {
+ let Some(store) = store.get("general_settings").cloned() else {
+ println!("No general_settings found in store");
+ return Ok(None);
+ };
+
+ println!("Found general_settings in store");
+ Ok(serde_json::from_value(store)?)
+ })
+ .map_err(|e| {
+ println!("Error getting GeneralSettingsStore: {}", e);
+ e.to_string()
+ })
+ }
+
+ pub fn set(app: &AppHandle, settings: Self) -> Result<(), String> {
+ println!("Attempting to set GeneralSettingsStore");
+ let stores = app
+ .try_state::<StoreCollection<Wry>>()
+ .ok_or("Store not found")?;
+ with_store(app.clone(), stores, "store", |store| {
+ store.insert("general_settings".to_string(), json!(settings))?;
+ store.save()
+ })
+ .map_err(|e| {
+ println!("Error setting GeneralSettingsStore: {}", e);
+ e.to_string()
+ })
+ }
+}
+
+pub type GeneralSettingsState = Mutex<GeneralSettingsStore>;
+
+pub fn init(app: &AppHandle) {
+ println!("Initializing GeneralSettingsStore");
+ let store = GeneralSettingsStore::get(app).unwrap().unwrap_or_default();
+ app.manage(GeneralSettingsState::new(store));
+ println!("GeneralSettingsState managed");
+}
diff --git a/apps/desktop/src-tauri/src/lib.rs b/apps/desktop/src-tauri/src/lib.rs
index e8f121874..a05ed2230 100644
--- a/apps/desktop/src-tauri/src/lib.rs
+++ b/apps/desktop/src-tauri/src/lib.rs
@@ -7,6 +7,7 @@ mod editor;
mod editor_instance;
mod encoder;
mod flags;
+mod general_settings;
mod hotkeys;
mod macos;
mod permissions;
@@ -27,6 +28,7 @@ use cap_rendering::ProjectUniforms;
use cap_utils::create_named_pipe;
use display::{list_capture_windows, Bounds, CaptureTarget, FPS};
use editor_instance::{EditorInstance, EditorState, FRAMES_WS_PATH};
+use general_settings::GeneralSettingsStore;
use image::{ImageBuffer, Rgba};
use mp4::Mp4Reader;
use num_traits::ToBytes;
@@ -59,7 +61,9 @@ use tokio::{
sync::{Mutex, RwLock},
time::sleep,
};
-use upload::{upload_image, upload_video};
+use upload::{
+ upload_audio, upload_image, upload_individual_file, upload_video, UploadedAudio, UploadedVideo,
+};
#[derive(specta::Type, Serialize, Deserialize, Clone, Debug)]
#[serde(rename_all = "camelCase")]
@@ -1537,11 +1541,11 @@ async fn open_settings_window(app: AppHandle, page: String) {
#[tauri::command]
#[specta::specta]
async fn upload_rendered_video(
- app: AppHandle,
+ _app: AppHandle,
video_id: String,
project: ProjectConfiguration,
) -> Result<UploadResult, String> {
- let Ok(Some(mut auth)) = AuthStore::get(&app) else {
+ let Ok(Some(mut auth)) = AuthStore::get(&_app) else {
println!("not authenticated!");
return Ok(UploadResult::NotAuthenticated);
};
@@ -1549,25 +1553,23 @@ async fn upload_rendered_video(
// Check if user has an upgraded plan
if !auth.is_upgraded() {
// Fetch and update plan information
- if let Err(e) = AuthStore::fetch_and_update_plan(&app).await {
+ if let Err(e) = AuthStore::fetch_and_update_plan(&_app).await {
println!("Failed to update plan information: {}", e);
return Ok(UploadResult::PlanCheckFailed);
}
// Refresh auth information after update
- auth = AuthStore::get(&app).unwrap().unwrap();
+ auth = AuthStore::get(&_app).unwrap().unwrap();
// Re-check upgraded status after refresh
if !auth.is_upgraded() {
// Open upgrade window instead of returning an error
- open_upgrade_window(app).await;
+ open_upgrade_window(_app).await;
return Ok(UploadResult::UpgradeRequired);
}
}
- println!("Uploading rendered video: {:?}", video_id);
-
- let editor_instance = upsert_editor_instance(&app, video_id.clone()).await;
+ let editor_instance = upsert_editor_instance(&_app, video_id.clone()).await;
let mut meta = editor_instance.meta();
@@ -1585,16 +1587,65 @@ async fn upload_rendered_video(
}
};
- let uploaded_video = upload_video(video_id.clone(), auth.token, output_path)
- .await
- .unwrap();
+ let uploaded_video =
+ upload_video(video_id.clone(), auth.token.clone(), output_path, false).await?;
+
+ let general_settings = GeneralSettingsStore::get(&_app)?;
+ if let Some(settings) = general_settings {
+ if settings.upload_individual_files {
+ let video_dir = _app
+ .path()
+ .app_data_dir()
+ .unwrap()
+ .join("recordings")
+ .join(format!("{}.cap", video_id));
+
+ let files_to_upload = vec![
+ (video_dir.join("content/audio-input.mp3"), true),
+ (video_dir.join("content/camera.mp4"), false),
+ (video_dir.join("content/display.mp4"), false),
+ ];
+
+ for (file_path, is_audio) in files_to_upload {
+ if file_path.exists() {
+ let file_name = file_path.file_name().unwrap().to_str().unwrap();
+ let result = if is_audio {
+ upload_individual_file(
+ auth.token.clone(),
+ file_path.clone(),
+ uploaded_video.config.clone(),
+ file_name,
+ true,
+ )
+ .await
+ } else {
+ upload_individual_file(
+ auth.token.clone(),
+ file_path.clone(),
+ uploaded_video.config.clone(),
+ file_name,
+ false,
+ )
+ .await
+ };
+
+ match result {
+ Ok(()) => println!("Successfully uploaded {}", file_name),
+ Err(e) => println!("Failed to upload {}: {}", file_name, e),
+ }
+ }
+ }
+ }
+ } else {
+ println!("General settings not found");
+ }
meta.sharing = Some(SharingMeta {
link: uploaded_video.link.clone(),
id: uploaded_video.id.clone(),
});
meta.save_for_project();
- RecordingMetaChanged { id: video_id }.emit(&app).ok();
+ RecordingMetaChanged { id: video_id }.emit(&_app).ok();
uploaded_video.link
};
@@ -2015,6 +2066,15 @@ fn open_external_link(app: tauri::AppHandle, url: String) -> Result<(), String>
Ok(())
}
+#[tauri::command]
+#[specta::specta]
+async fn set_general_settings(
+ app: AppHandle,
+ settings: GeneralSettingsStore,
+) -> Result<(), String> {
+ GeneralSettingsStore::set(&app, settings)
+}
+
#[cfg_attr(mobile, tauri::mobile_entry_point)]
pub fn run() {
let specta_builder = tauri_specta::Builder::new()
@@ -2066,7 +2126,8 @@ pub fn run() {
list_screenshots,
check_upgraded_and_update,
open_external_link,
- hotkeys::set_hotkey
+ hotkeys::set_hotkey,
+ set_general_settings
])
.events(tauri_specta::collect_events![
RecordingOptionsChanged,
@@ -2087,7 +2148,8 @@ pub fn run() {
])
.ty::<ProjectConfiguration>()
.ty::<AuthStore>()
- .ty::<hotkeys::HotkeysStore>();
+ .ty::<hotkeys::HotkeysStore>()
+ .ty::<general_settings::GeneralSettingsStore>();
#[cfg(debug_assertions)]
specta_builder
@@ -2110,7 +2172,7 @@ pub fn run() {
.setup(move |app| {
specta_builder.mount_events(app);
hotkeys::init(app.handle());
-
+ general_settings::init(app.handle());
let app_handle = app.handle().clone();
if permissions::do_permissions_check(true).necessary_granted() {
diff --git a/apps/desktop/src-tauri/src/upload.rs b/apps/desktop/src-tauri/src/upload.rs
index 2dc14e5c4..f2565b260 100644
--- a/apps/desktop/src-tauri/src/upload.rs
+++ b/apps/desktop/src-tauri/src/upload.rs
@@ -3,12 +3,11 @@
use image::codecs::jpeg::JpegEncoder;
use image::ImageReader;
use reqwest::{multipart::Form, Client, StatusCode};
-use std::io::Cursor;
use std::path::PathBuf;
use tokio::task;
-#[derive(serde::Deserialize)]
-struct S3UploadMeta {
+#[derive(serde::Deserialize, Clone)]
+pub struct S3UploadMeta {
id: String,
user_id: String,
aws_region: String,
@@ -43,9 +42,20 @@ struct S3ImageUploadBody {
base: S3UploadBody,
}
+#[derive(serde::Serialize)]
+#[serde(rename_all = "camelCase")]
+struct S3AudioUploadBody {
+ #[serde(flatten)]
+ base: S3UploadBody,
+ duration: String,
+ audio_codec: String,
+ is_mp3: bool,
+}
+
pub struct UploadedVideo {
pub link: String,
pub id: String,
+ pub config: S3UploadMeta,
}
pub struct UploadedImage {
@@ -53,10 +63,17 @@ pub struct UploadedImage {
pub id: String,
}
+pub struct UploadedAudio {
+ pub link: String,
+ pub id: String,
+ pub config: S3UploadMeta,
+}
+
pub async fn upload_video(
video_id: String,
auth_token: String,
file_path: PathBuf,
+ is_individual: bool,
) -> Result<UploadedVideo, String> {
println!("Uploading video {video_id}...");
@@ -70,9 +87,14 @@ pub async fn upload_video(
let server_url_base: &'static str = dotenvy_macro::dotenv!("NEXT_PUBLIC_URL");
let s3_config = get_s3_config(&client, server_url_base, &auth_token, false).await?;
- let file_key = format!("{}/{}/{}", s3_config.user_id, s3_config.id, file_name);
-
- println!("File key: {file_key}");
+ let file_key = if is_individual {
+ format!(
+ "{}/{}/individual/{}",
+ s3_config.user_id, s3_config.id, file_name
+ )
+ } else {
+ format!("{}/{}/{}", s3_config.user_id, s3_config.id, file_name)
+ };
let body = build_video_upload_body(
&file_path,
@@ -147,7 +169,8 @@ pub async fn upload_video(
return Ok(UploadedVideo {
link: format!("{server_url_base}/s/{}", &s3_config.id),
- id: s3_config.id,
+ id: s3_config.id.clone(),
+ config: s3_config,
});
}
@@ -236,6 +259,83 @@ pub async fn upload_image(auth_token: String, file_path: PathBuf) -> Result<Uplo
))
}
+pub async fn upload_audio(auth_token: String, file_path: PathBuf) -> Result<UploadedAudio, String> {
+ let file_name = file_path
+ .file_name()
+ .and_then(|name| name.to_str())
+ .ok_or("Invalid file path")?
+ .to_string();
+
+ let client = reqwest::Client::new();
+ let server_url_base: &'static str = dotenvy_macro::dotenv!("NEXT_PUBLIC_URL");
+
+ let s3_config = get_s3_config(&client, server_url_base, &auth_token, false).await?;
+
+ let file_key = format!("{}/{}/{}", s3_config.user_id, s3_config.id, file_name);
+
+ println!("File key: {file_key}");
+
+ let body = build_audio_upload_body(
+ &file_path,
+ S3UploadBody {
+ user_id: s3_config.user_id.clone(),
+ file_key: file_key.clone(),
+ aws_bucket: s3_config.aws_bucket.clone(),
+ aws_region: s3_config.aws_region.clone(),
+ },
+ )?;
+
+ let (upload_url, mut form) =
+ presigned_s3_url_audio(&client, server_url_base, body, &auth_token).await?;
+
+ let file_content = tokio::fs::read(&file_path)
+ .await
+ .map_err(|e| format!("Failed to read file: {}", e))?;
+
+ let mime_type = if file_name.ends_with(".mp3") {
+ "audio/mpeg"
+ } else {
+ "audio/wav"
+ };
+
+ let file_part = reqwest::multipart::Part::bytes(file_content)
+ .file_name(file_name.clone())
+ .mime_str(mime_type)
+ .map_err(|e| format!("Error setting MIME type: {}", e))?;
+ form = form.part("file", file_part);
+
+ let response = client
+ .post(upload_url)
+ .multipart(form)
+ .send()
+ .await
+ .map_err(|e| format!("Failed to send upload file request: {}", e))?;
+
+ if response.status().is_success() {
+ println!("Audio file uploaded successfully");
+ return Ok(UploadedAudio {
+ link: format!("{server_url_base}/s/{}", &s3_config.id),
+ id: s3_config.id.clone(),
+ config: s3_config,
+ });
+ }
+
+ let status = response.status();
+ let error_body = response
+ .text()
+ .await
+ .unwrap_or_else(|_| "<no response body>".to_string());
+ tracing::error!(
+ "Failed to upload audio file. Status: {}. Body: {}",
+ status,
+ error_body
+ );
+ Err(format!(
+ "Failed to upload audio file. Status: {}. Body: {}",
+ status, error_body
+ ))
+}
+
async fn get_s3_config(
client: &Client,
server_url_base: &str,
@@ -370,6 +470,51 @@ async fn presigned_s3_url_image(
Ok((post_url, form))
}
+async fn presigned_s3_url_audio(
+ client: &Client,
+ server_url_base: &str,
+ body: S3AudioUploadBody,
+ auth_token: &str,
+) -> Result<(String, Form), String> {
+ let presigned_upload_url = format!("{}/api/upload/signed", server_url_base);
+
+ let response = client
+ .post(presigned_upload_url)
+ .json(&serde_json::json!(body))
+ .header("Authorization", format!("Bearer {auth_token}"))
+ .send()
+ .await
+ .map_err(|e| format!("Failed to send request to Next.js handler: {}", e))?;
+
+ if response.status() == StatusCode::UNAUTHORIZED {
+ return Err("Failed to authenticate request; please log in again".into());
+ }
+
+ let presigned_post_data = response
+ .json::<serde_json::Value>()
+ .await
+ .map_err(|e| format!("Failed to deserialize server response: {}", e))?;
+
+ let fields = presigned_post_data["presignedPostData"]["fields"]
+ .as_object()
+ .ok_or("Fields object is missing or not an object")?;
+ let post_url = presigned_post_data["presignedPostData"]["url"]
+ .as_str()
+ .ok_or("URL is missing or not a string")?
+ .to_string();
+
+ let mut form = Form::new();
+
+ for (key, value) in fields.iter() {
+ let value_str = value
+ .as_str()
+ .ok_or(format!("Value for key '{}' is not a string", key))?;
+ form = form.text(key.to_string(), value_str.to_owned());
+ }
+
+ Ok((post_url, form))
+}
+
fn build_video_upload_body(
path: &PathBuf,
base: S3UploadBody,
@@ -405,6 +550,98 @@ fn build_video_upload_body(
})
}
+fn build_audio_upload_body(
+ path: &PathBuf,
+ base: S3UploadBody,
+) -> Result<S3AudioUploadBody, String> {
+ let input =
+ ffmpeg_next::format::input(path).map_err(|e| format!("Failed to read input file: {e}"))?;
+ let stream = input
+ .streams()
+ .best(ffmpeg_next::media::Type::Audio)
+ .ok_or_else(|| "Failed to find appropriate audio stream in file".to_string())?;
+
+ let duration_millis = input.duration() as f64 / 1000.;
+
+ let codec = ffmpeg_next::codec::context::Context::from_parameters(stream.parameters())
+ .map_err(|e| format!("Unable to read audio codec information: {e}"))?;
+ let codec_name = codec.id();
+
+ let is_mp3 = path.extension().map_or(false, |ext| ext == "mp3");
+
+ Ok(S3AudioUploadBody {
+ base,
+ duration: duration_millis.to_string(),
+ audio_codec: format!("{codec_name:?}").replace("Id::", "").to_lowercase(),
+ is_mp3,
+ })
+}
+
+pub async fn upload_individual_file(
+ auth_token: String,
+ file_path: PathBuf,
+ s3_config: S3UploadMeta,
+ file_name: &str,
+ is_audio: bool,
+) -> Result<(), String> {
+ let client = reqwest::Client::new();
+ let server_url_base: &'static str = dotenvy_macro::dotenv!("NEXT_PUBLIC_URL");
+
+ let file_key = format!(
+ "{}/{}/individual/{}",
+ s3_config.user_id, s3_config.id, file_name
+ );
+
+ let base_upload_body = S3UploadBody {
+ user_id: s3_config.user_id.clone(),
+ file_key: file_key.clone(),
+ aws_bucket: s3_config.aws_bucket.clone(),
+ aws_region: s3_config.aws_region.clone(),
+ };
+
+ let (upload_url, mut form) = if is_audio {
+ let audio_body = build_audio_upload_body(&file_path, base_upload_body)?;
+ presigned_s3_url_audio(&client, server_url_base, audio_body, &auth_token).await?
+ } else {
+ let video_body = build_video_upload_body(&file_path, base_upload_body)?;
+ presigned_s3_url(&client, server_url_base, video_body, &auth_token).await?
+ };
+
+ let file_content = tokio::fs::read(&file_path)
+ .await
+ .map_err(|e| format!("Failed to read file: {}", e))?;
+
+ let mime_type = if is_audio { "audio/mpeg" } else { "video/mp4" };
+
+ let file_part = reqwest::multipart::Part::bytes(file_content)
+ .file_name(file_name.to_string())
+ .mime_str(mime_type)
+ .map_err(|e| format!("Error setting MIME type: {}", e))?;
+ form = form.part("file", file_part);
+
+ let response = client
+ .post(upload_url)
+ .multipart(form)
+ .send()
+ .await
+ .map_err(|e| format!("Failed to send upload file request: {}", e))?;
+
+ if response.status().is_success() {
+ println!("Individual file uploaded successfully");
+ Ok(())
+ } else {
+ let status = response.status();
+ let error_body = response
+ .text()
+ .await
+ .unwrap_or_else(|_| "<no response body>".to_string());
+ Err(format!(
+ "Failed to upload individual file. Status: {}. Body: {}",
+ status, error_body
+ ))
+ }
+}
+
async fn prepare_screenshot_upload(
client: &Client,
s3_config: &S3UploadMeta,
diff --git a/apps/desktop/src/routes/(window-chrome)/index.tsx b/apps/desktop/src/routes/(window-chrome)/index.tsx
index 6f0e6f216..d06d8102b 100644
--- a/apps/desktop/src/routes/(window-chrome)/index.tsx
+++ b/apps/desktop/src/routes/(window-chrome)/index.tsx
@@ -190,7 +190,7 @@ export default function () {
<IconCapLogoFull class="w-[90px] h-auto" />
<button
type="button"
- onClick={() => commands.openSettingsWindow("hotkeys")}
+ onClick={() => commands.openSettingsWindow("general")}
>
<IconCapSettings class="w-[1.25rem] h-[1.25rem] text-gray-400 hover:text-gray-500" />
</button>
diff --git a/apps/desktop/src/routes/(window-chrome)/settings.tsx b/apps/desktop/src/routes/(window-chrome)/settings.tsx
index 83e6984f5..fc0b57962 100644
--- a/apps/desktop/src/routes/(window-chrome)/settings.tsx
+++ b/apps/desktop/src/routes/(window-chrome)/settings.tsx
@@ -10,6 +10,7 @@ export default function (props: RouteSectionProps) {
<ul class="min-w-[12rem] h-full p-[0.625rem] space-y-2">
<For
each={[
+ { href: "general", name: "General", icon: IconCapSettings },
{ href: "hotkeys", name: "Shortcuts", icon: IconCapHotkeys },
{
href: "recordings",
diff --git a/apps/desktop/src/routes/(window-chrome)/settings/general.tsx b/apps/desktop/src/routes/(window-chrome)/settings/general.tsx
new file mode 100644
index 000000000..32639fd41
--- /dev/null
+++ b/apps/desktop/src/routes/(window-chrome)/settings/general.tsx
@@ -0,0 +1,75 @@
+import { createResource, Show } from "solid-js";
+import { createStore } from "solid-js/store";
+import { generalSettingsStore } from "~/store";
+import { commands, type GeneralSettingsStore } from "~/utils/tauri";
+
+export default function GeneralSettings() {
+ const [store] = createResource(() => generalSettingsStore.get());
+
+ return (
+ <Show
+ when={(() => {
+ const s = store();
+ if (s === undefined) return;
+ return [s];
+ })()}
+ >
+ {(store) => <Inner store={store()[0]} />}
+ </Show>
+ );
+}
+
+function Inner(props: { store: GeneralSettingsStore | null }) {
+ const [settings, setSettings] = createStore<GeneralSettingsStore>(
+ props.store ?? { upload_individual_files: false }
+ );
+
+ const handleChange = async (uploadIndividualFiles: boolean) => {
+ setSettings("upload_individual_files", uploadIndividualFiles);
+ await commands.setGeneralSettings({
+ upload_individual_files: uploadIndividualFiles,
+ });
+ };
+
+ return (
+ <div class="flex flex-col w-full h-full divide-y divide-gray-200 pt-1 pb-12">
+ <div class="flex-1 p-4 space-y-2">
+ <div class="flex items-center justify-between">
+ <p>Upload individual recording files when creating shareable link</p>
+ <button
+ type="button"
+ role="switch"
+ aria-checked={settings.upload_individual_files}
+ data-state={
+ settings.upload_individual_files ? "checked" : "unchecked"
+ }
+ value={settings.upload_individual_files ? "on" : "off"}
+ class={`peer inline-flex h-4 w-8 shrink-0 cursor-pointer items-center rounded-full transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 ${
+ settings.upload_individual_files
+ ? "bg-blue-400 border-blue-400"
+ : "bg-gray-300 border-gray-300"
+ }`}
+ onClick={() => handleChange(!settings.upload_individual_files)}
+ >
+ <span
+ data-state={
+ settings.upload_individual_files ? "checked" : "unchecked"
+ }
+ class={`pointer-events-none block h-4 w-4 rounded-full bg-gray-50 shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0 border-2 ${
+ settings.upload_individual_files
+ ? "border-blue-400"
+ : "border-gray-300"
+ }`}
+ />
+ </button>
+ </div>
+ <div>
+ <p class="text-xs text-gray-400">
+ Warning: this will cause shareable link uploads to become
+ significantly slower, since multiple files will be uploaded.
+ </p>
+ </div>
+ </div>
+ </div>
+ );
+}
diff --git a/apps/desktop/src/routes/(window-chrome)/settings/index.tsx b/apps/desktop/src/routes/(window-chrome)/settings/index.tsx
index 4b721dde7..68a121c98 100644
--- a/apps/desktop/src/routes/(window-chrome)/settings/index.tsx
+++ b/apps/desktop/src/routes/(window-chrome)/settings/index.tsx
@@ -3,7 +3,7 @@ import { useSearchParams } from "@solidjs/router";
export default function Settings() {
const [searchParams] = useSearchParams();
- const page = searchParams.page || "hotkeys";
+ const page = searchParams.page || "general";
return <Navigate href={page} />;
}
diff --git a/apps/desktop/src/store.ts b/apps/desktop/src/store.ts
index 754aa1ed5..b60ba5714 100644
--- a/apps/desktop/src/store.ts
+++ b/apps/desktop/src/store.ts
@@ -4,6 +4,7 @@ import type {
AuthStore,
ProjectConfiguration,
HotkeysStore,
+ GeneralSettingsStore,
} from "~/utils/tauri";
const store = new Store("store");
@@ -43,3 +44,11 @@ export const hotkeysStore = {
await store.save();
},
};
+
+export const generalSettingsStore = {
+ get: () => store.get<GeneralSettingsStore>("general_settings"),
+ set: async (value: GeneralSettingsStore) => {
+ await store.set("general_settings", value);
+ await store.save();
+ },
+};
\ No newline at end of file
diff --git a/apps/desktop/src/utils/tauri.ts b/apps/desktop/src/utils/tauri.ts
index 882f70286..0933344dd 100644
--- a/apps/desktop/src/utils/tauri.ts
+++ b/apps/desktop/src/utils/tauri.ts
@@ -278,6 +278,14 @@ async setHotkey(action: HotkeyAction, hotkey: Hotkey | null) : Promise<Result<nu
if(e instanceof Error) throw e;
else return { status: "error", error: e as any };
}
+},
+async setGeneralSettings(settings: GeneralSettingsStore) : Promise<Result<null, string>> {
+ try {
+ return { status: "ok", data: await TAURI_INVOKE("set_general_settings", { settings }) };
+} catch (e) {
+ if(e instanceof Error) throw e;
+ else return { status: "error", error: e as any };
+}
}
}
@@ -346,6 +354,7 @@ export type CursorType = "pointer" | "circle"
export type Display = { path: string }
export type DisplaySource = { variant: "screen" } | { variant: "window"; bounds: Bounds }
export type EditorStateChanged = { playhead_position: number }
+export type GeneralSettingsStore = { upload_individual_files: boolean }
export type Hotkey = { code: string; meta: boolean; ctrl: boolean; alt: boolean; shift: boolean }
export type HotkeyAction = "startRecording" | "stopRecording" | "restartRecording" | "takeScreenshot"
export type HotkeysConfiguration = { show: boolean }
diff --git a/apps/embed/app/view/[videoId]/_components/Toolbar.tsx b/apps/embed/app/view/[videoId]/_components/Toolbar.tsx
index 6e5e5b3d1..3967bf98f 100644
--- a/apps/embed/app/view/[videoId]/_components/Toolbar.tsx
+++ b/apps/embed/app/view/[videoId]/_components/Toolbar.tsx
@@ -224,7 +224,7 @@ export const Toolbar = ({
videoElement.pause();
setCommentBoxOpen(true);
}}
- className="text-sm font-medium bg-transparent py-1 px-2 relative transition-bg-color duration-600 flex justify-center items-center rounded-full ease-in-out hover:bg-gray-200 active:bg-gray-400 active:duration-0"
+ className="text-xs sm:text-sm font-medium bg-transparent py-1 px-2 relative transition-bg-color duration-600 flex justify-center items-center rounded-full ease-in-out hover:bg-gray-200 active:bg-gray-400 active:duration-0"
>
<MessageSquare className="w-[22px] h-auto" />
<span className="ml-1">Comment</span>
diff --git a/apps/web/app/api/video/individual/route.ts b/apps/web/app/api/video/individual/route.ts
new file mode 100644
index 000000000..363b8ed48
--- /dev/null
+++ b/apps/web/app/api/video/individual/route.ts
@@ -0,0 +1,106 @@
+import { type NextRequest } from "next/server";
+import { db } from "@cap/database";
+import { s3Buckets, videos } from "@cap/database/schema";
+import { eq } from "drizzle-orm";
+import { ListObjectsV2Command } from "@aws-sdk/client-s3";
+import { getCurrentUser } from "@cap/database/auth/session";
+import { getHeaders } from "@/utils/helpers";
+import { createS3Client, getS3Bucket } from "@/utils/s3";
+
+export const revalidate = 3599;
+
+export async function OPTIONS(request: NextRequest) {
+ const origin = request.headers.get("origin") as string;
+
+ return new Response(null, {
+ status: 200,
+ headers: getHeaders(origin),
+ });
+}
+
+export async function GET(request: NextRequest) {
+ const searchParams = request.nextUrl.searchParams;
+ const userId = searchParams.get("userId") || "";
+ const videoId = searchParams.get("videoId") || "";
+ const origin = request.headers.get("origin") as string;
+
+ if (!userId || !videoId) {
+ return new Response(
+ JSON.stringify({
+ error: true,
+ message: "userId or videoId not supplied",
+ }),
+ { status: 401, headers: getHeaders(origin) }
+ );
+ }
+
+ const query = await db
+ .select({ video: videos, bucket: s3Buckets })
+ .from(videos)
+ .leftJoin(s3Buckets, eq(videos.bucket, s3Buckets.id))
+ .where(eq(videos.id, videoId));
+
+ if (query.length === 0) {
+ return new Response(
+ JSON.stringify({ error: true, message: "Video does not exist" }),
+ { status: 401, headers: getHeaders(origin) }
+ );
+ }
+
+ const { video, bucket } = query[0];
+
+ if (video.public === false) {
+ const user = await getCurrentUser();
+
+ if (!user || user.id !== video.ownerId) {
+ return new Response(
+ JSON.stringify({ error: true, message: "Video is not public" }),
+ { status: 401, headers: getHeaders(origin) }
+ );
+ }
+ }
+
+ const Bucket = getS3Bucket(bucket);
+ const individualPrefix = `${userId}/${videoId}/individual/`;
+
+ try {
+ const s3Client = createS3Client(bucket);
+
+ const objectsCommand = new ListObjectsV2Command({
+ Bucket,
+ Prefix: individualPrefix,
+ });
+
+ const objects = await s3Client.send(objectsCommand);
+
+ if (!objects.Contents || objects.Contents.length === 0) {
+ return new Response(
+ JSON.stringify({ error: true, message: "No individual files found" }),
+ { status: 404, headers: getHeaders(origin) }
+ );
+ }
+
+ const individualFiles = objects.Contents.map((object) => {
+ const key = object.Key as string;
+ const fileName = key.split('/').pop();
+ return {
+ fileName,
+ url: `https://v.cap.so/${key}`,
+ };
+ });
+
+ return new Response(JSON.stringify({ files: individualFiles }), {
+ status: 200,
+ headers: getHeaders(origin),
+ });
+ } catch (error) {
+ console.error("Error listing individual files", error);
+ return new Response(
+ JSON.stringify({
+ error: true,
+ message: "Error listing individual files",
+ }),
+ { status: 500, headers: getHeaders(origin) }
+ );
+ }
+}
\ No newline at end of file
diff --git a/apps/web/app/s/[videoId]/Share.tsx b/apps/web/app/s/[videoId]/Share.tsx
index 56bb6329a..65ef5fd61 100644
--- a/apps/web/app/s/[videoId]/Share.tsx
+++ b/apps/web/app/s/[videoId]/Share.tsx
@@ -5,24 +5,44 @@ import { ShareVideo } from "./_components/ShareVideo";
import { comments as commentsSchema, videos } from "@cap/database/schema";
import { userSelectProps } from "@cap/database/auth/session";
import { Toolbar } from "./_components/Toolbar";
+import { Logo } from "@cap/ui";
export const Share = ({
data,
user,
comments,
+ individualFiles,
}: {
data: typeof videos.$inferSelect;
user: typeof userSelectProps | null;
comments: (typeof commentsSchema.$inferSelect)[];
+ individualFiles: {
+ fileName: string;
+ url: string;
+ }[];
}) => {
return (
<div className="wrapper py-8">
<div className="space-y-6">
- <ShareHeader data={data} user={user} />
+ <ShareHeader
+ data={data}
+ user={user}
+ individualFiles={individualFiles}
+ />
<ShareVideo data={data} user={user} comments={comments} />
- <div className="flex justify-center">
+ <div className="flex justify-center mb-4">
<Toolbar data={data} user={user} />
</div>
+ <div className="flex justify-center items-center">
+ <a
+ target="_blank"
+ href={`${process.env.NEXT_PUBLIC_URL}?ref=video_${data.id}`}
+ className="flex items-center justify-center space-x-2 py-2 px-4 bg-gray-100 border border-gray-200 rounded-full mx-0"
+ >
+ <span className="text-sm">Recorded with</span>
+ <Logo className="w-14 h-auto" />
+ </a>
+ </div>
</div>
</div>
);
diff --git a/apps/web/app/s/[videoId]/_components/ShareHeader.tsx b/apps/web/app/s/[videoId]/_components/ShareHeader.tsx
index d5361b03a..486ab90d7 100644
--- a/apps/web/app/s/[videoId]/_components/ShareHeader.tsx
+++ b/apps/web/app/s/[videoId]/_components/ShareHeader.tsx
@@ -5,18 +5,26 @@ import { userSelectProps } from "@cap/database/auth/session";
import { useRouter } from "next/navigation";
import { useState } from "react";
import { toast } from "react-hot-toast";
-import { LinkIcon } from "lucide-react";
+import { LinkIcon, Loader2 } from "lucide-react";
+import JSZip from "jszip";
+import { saveAs } from "file-saver";
export const ShareHeader = ({
data,
user,
+ individualFiles,
}: {
data: typeof videos.$inferSelect;
user: typeof userSelectProps | null;
+ individualFiles: {
+ fileName: string;
+ url: string;
+ }[];
}) => {
const { push, refresh } = useRouter();
const [isEditing, setIsEditing] = useState(false);
const [title, setTitle] = useState(data.name);
+ const [isDownloading, setIsDownloading] = useState(false);
const handleBlur = async () => {
setIsEditing(false);
@@ -50,79 +58,117 @@ export const ShareHeader = ({
}
};
+ const downloadZip = async () => {
+ setIsDownloading(true);
+ const zip = new JSZip();
+
+ try {
+ for (const file of individualFiles) {
+ const response = await fetch(file.url);
+ const blob = await response.blob();
+ zip.file(file.fileName, blob);
+ }
+
+ const content = await zip.generateAsync({ type: "blob" });
+ saveAs(content, `${data.id}.zip`);
+ } catch (error) {
+ console.error("Error downloading zip:", error);
+ toast.error("Failed to download files. Please try again.");
+ } finally {
+ setIsDownloading(false);
+ }
+ };
+
return (
<>
<div>
<div className="md:flex md:items-center md:justify-between space-x-0 md:space-x-6">
- <div className="flex items-center md:justify-between space-x-6">
- <div>
- <a
- href={
- user
- ? "/dashboard"
- : `${process.env.NEXT_PUBLIC_URL}?referrer=${data.id}`
- }
- >
- <LogoBadge className="w-8 h-auto" />
- </a>
- </div>
- <div>
- {isEditing ? (
- <input
- value={title}
- onChange={(e) => setTitle(e.target.value)}
- onBlur={handleBlur}
- onKeyDown={handleKeyDown}
- autoFocus
- className="text-2xl font-semibold"
- />
- ) : (
- <h1
- className="text-2xl"
- onClick={() => {
- if (user !== null && user.id.toString() === data.ownerId) {
- setIsEditing(true);
- }
- }}
- >
- {title}
- </h1>
- )}
+ <div className="md:flex items-center md:justify-between md:space-x-6">
+ <div className="mb-3 md:mb-0">
+ <div className="flex items-center space-x-3">
+ {isEditing ? (
+ <input
+ value={title}
+ onChange={(e) => setTitle(e.target.value)}
+ onBlur={handleBlur}
+ onKeyDown={handleKeyDown}
+ autoFocus
+ className="text-xl sm:text-2xl font-semibold"
+ />
+ ) : (
+ <h1
+ className="text-xl sm:text-2xl"
+ onClick={() => {
+ if (
+ user !== null &&
+ user.id.toString() === data.ownerId
+ ) {
+ setIsEditing(true);
+ }
+ }}
+ >
+ {title}
+ </h1>
+ )}
+ <div>
+ <button
+ data-tooltip-id="clipboard"
+ data-tooltip-content="Copy link to clipboard"
+ className="bg-white p-2 w-8 h-8 rounded-lg flex items-center justify-center border hover:border-gray-300 transition-all"
+ onClick={() => {
+ if (process.env.NEXT_PUBLIC_IS_CAP) {
+ navigator.clipboard.writeText(
+ `https://cap.link/${data.id}`
+ );
+ } else {
+ navigator.clipboard.writeText(
+ `${process.env.NEXT_PUBLIC_URL}/s/${data.id}`
+ );
+ }
+ toast.success("Link copied to clipboard!");
+ }}
+ >
+ <LinkIcon className="w-5 h-5" />
+ </button>
+ </div>
+ </div>
<p className="text-gray-400 text-sm">
{moment(data.createdAt).fromNow()}
</p>
</div>
- <div>
- <button
- data-tooltip-id="clipboard"
- data-tooltip-content="Copy link to clipboard"
- className="bg-white p-2 w-8 h-8 rounded-lg flex items-center justify-center border hover:border-primary-3 transition-all"
- onClick={() => {
- if (process.env.NEXT_PUBLIC_IS_CAP) {
- navigator.clipboard.writeText(
- `https://cap.link/${data.id}`
- );
- } else {
- navigator.clipboard.writeText(
- `${process.env.NEXT_PUBLIC_URL}/s/${data.id}`
- );
- }
- toast.success("Link copied to clipboard!");
- }}
- >
- <LinkIcon className="w-5 h-5" />
- </button>
- </div>
</div>
- {user !== null && (
- <div className="hidden md:flex">
- <Button
- onClick={() => {
- push(`${process.env.NEXT_PUBLIC_URL}/dashboard`);
- }}
- >
- Go to Dashboard
- </Button>
+ {(user !== null ||
+ (individualFiles && individualFiles.length > 0)) && (
+ <div className="flex items-center space-x-2">
+ {individualFiles && individualFiles.length > 0 && (
+ <div>
+ <Button
+ variant="gray"
+ onClick={downloadZip}
+ disabled={isDownloading}
+ >
+ {isDownloading ? (
+ <>
+ <Loader2 className="mr-2 h-4 w-4 animate-spin" />
+ Downloading...
+ </>
+ ) : (
+ "Download Assets"
+ )}
+ </Button>
+ </div>
+ )}
+ {user !== null && (
+ <div className="hidden md:flex">
+ <Button
+ onClick={() => {
+ push(`${process.env.NEXT_PUBLIC_URL}/dashboard`);
+ }}
+ >
+ Go to Dashboard
+ </Button>
+ </div>
+ )}
</div>
)}
</div>
diff --git a/apps/web/app/s/[videoId]/_components/Toolbar.tsx b/apps/web/app/s/[videoId]/_components/Toolbar.tsx
index 99b92345d..1b800d7dc 100644
--- a/apps/web/app/s/[videoId]/_components/Toolbar.tsx
+++ b/apps/web/app/s/[videoId]/_components/Toolbar.tsx
@@ -136,7 +136,7 @@ export const Toolbar = ({
const Emoji = ({ label, emoji }: { label: string; emoji: string }) => (
<div className="relative w-fit">
<button
- className="font-emoji text-2xl leading-6 bg-transparent p-1 relative transition-bg-color duration-600 inline-flex justify-center items-center align-middle rounded-full ease-in-out hover:bg-gray-200 active:bg-gray-400 active:duration-0"
+ className="font-emoji text-xl sm:text-2xl leading-6 bg-transparent p-1 relative transition-bg-color duration-600 inline-flex justify-center items-center align-middle rounded-full ease-in-out hover:bg-gray-200 active:bg-gray-400 active:duration-0"
role="img"
aria-label={label ? label : ""}
aria-hidden={label ? "false" : "true"}
@@ -238,10 +238,10 @@ export const Toolbar = ({
}
setCommentBoxOpen(true);
}}
- className="text-sm font-medium bg-transparent py-1 px-2 relative transition-bg-color duration-600 flex justify-center items-center rounded-full ease-in-out hover:bg-gray-200 active:bg-gray-400 active:duration-0"
+ className="font-medium bg-transparent py-1 px-2 relative transition-bg-color duration-600 flex justify-center items-center rounded-full ease-in-out hover:bg-gray-200 active:bg-gray-400 active:duration-0"
>
- <MessageSquare className="w-[22px] h-auto" />
- <span className="ml-1">Comment</span>
+ <MessageSquare className="w-[16px] sm:w-[22px] h-auto" />
+ <span className="text-sm ml-1">Comment</span>
</button>
</div>
</div>
diff --git a/apps/web/app/s/[videoId]/page.tsx b/apps/web/app/s/[videoId]/page.tsx
index b63d397db..b47303c10 100644
--- a/apps/web/app/s/[videoId]/page.tsx
+++ b/apps/web/app/s/[videoId]/page.tsx
@@ -135,5 +135,33 @@ export default async function ShareVideoPage(props: Props) {
);
}
- return <Share data={video} user={user} comments={commentsQuery} />;
+ let individualFiles: {
+ fileName: string;
+ url: string;
+ }[] = [];
+
+ if (video?.source.type === "desktopMP4") {
+ const res = await fetch(
+ `${process.env.NEXT_PUBLIC_URL}/api/video/individual?videoId=${videoId}&userId=${video.ownerId}`,
+ {
+ method: "GET",
+ credentials: "include",
+ cache: "no-store",
+ }
+ );
+
+ const data = await res.json();
+ individualFiles = data.files;
+ }
+
+ console.log("individualFiles:", individualFiles);
+
+ return (
+ <Share
+ data={video}
+ user={user}
+ comments={commentsQuery}
+ individualFiles={individualFiles}
+ />
+ );
}
diff --git a/apps/web/package.json b/apps/web/package.json
index 7b6d7c3e2..c31395b5f 100644
--- a/apps/web/package.json
+++ b/apps/web/package.json
@@ -38,7 +38,9 @@
"dotenv": "^16.3.1",
"drizzle-orm": "0.30.9",
"dub": "^0.33.1",
+ "file-saver": "^2.0.5",
"hls.js": "^1.5.3",
+ "jszip": "^3.10.1",
"lodash": "^4.17.21",
"lucide-react": "^0.294.0",
"million": "^2.6.4",
@@ -66,6 +68,7 @@
"zod": "^3.22.4"
},
"devDependencies": {
+ "@types/file-saver": "^2.0.7",
"@types/lodash": "^4.17.5",
"@types/node": "^20.11.5",
"@types/react": "^18.2.7",
diff --git a/apps/web/public/og.png b/apps/web/public/og.png
index d1aae4c42..42a7ca6d4 100644
Binary files a/apps/web/public/og.png and b/apps/web/public/og.png differ
diff --git a/packages/ui-solid/src/auto-imports.d.ts b/packages/ui-solid/src/auto-imports.d.ts
index 3b857b4c8..7bdbf4e9c 100644
--- a/packages/ui-solid/src/auto-imports.d.ts
+++ b/packages/ui-solid/src/auto-imports.d.ts
@@ -55,6 +55,7 @@ declare global {
const IconLucideFoler: typeof import('~icons/lucide/foler.jsx')['default']
const IconLucideLoaderCircle: typeof import('~icons/lucide/loader-circle.jsx')['default']
const IconLucideRewind: typeof import('~icons/lucide/rewind.jsx')['default']
+ const IconLucideSettings: typeof import('~icons/lucide/settings.jsx')['default']
const IconLucideSmile: typeof import('~icons/lucide/smile.jsx')['default']
const IconLucideVideo: typeof import('~icons/lucide/video.jsx')['default']
}
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index e9532301d..8a672767a 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -220,7 +220,7 @@ importers:
version: 2.30.1
next:
specifier: 14.2.9
next-auth:
specifier: ^4.24.5
@@ -503,9 +503,15 @@ importers:
dub:
specifier: ^0.33.1
version: 0.33.1([email protected])
+ file-saver:
+ specifier: ^2.0.5
+ version: 2.0.5
hls.js:
specifier: ^1.5.3
version: 1.5.15
+ jszip:
+ specifier: ^3.10.1
+ version: 3.10.1
lodash:
specifier: ^4.17.21
version: 4.17.21
@@ -582,6 +588,9 @@ importers:
specifier: ^3.22.4
version: 3.23.8
devDependencies:
+ '@types/file-saver':
+ specifier: ^2.0.7
+ version: 2.0.7
'@types/lodash':
specifier: ^4.17.5
version: 4.17.9
@@ -687,7 +696,7 @@ importers:
version: 5.0.7
next:
specifier: 14.2.9
next-auth:
specifier: ^4.24.5
@@ -3980,11 +3989,11 @@ packages:
react-dom:
optional: true
- '@storybook/[email protected]':
- resolution: {integrity: sha512-JT19lBZ34CoG9ofFpwctYiRBjpI68AznNz+EtQzawWx95TqwAjgB9zX9t2m2cWYXPT+CoVPC9UtI6/hlfmEjOw==}
+ '@storybook/[email protected]':
+ resolution: {integrity: sha512-NehLywjKaeUNU4soxeegLj0BODcHP0FZrdDmHU4+QWkrwdKymCxRMLc17n68FtoyGHnu9zKiQK3vwJrqZkRppg==}
peerDependencies:
'@preact/preset-vite': '*'
- storybook: ^8.4.0-alpha.2
+ storybook: ^8.4.0-alpha.4
typescript: '>= 4.3.x'
vite: ^4.0.0 || ^5.0.0
vite-plugin-glimmerx: '*'
@@ -4004,10 +4013,10 @@ packages:
peerDependencies:
storybook: ^8.3.3
- '@storybook/[email protected]':
- resolution: {integrity: sha512-vm4G8/OqqWnUjSrsFX1GBlDFt3y6GMJm8thd8xvVDp25yhH0NwrhqSeb4eXJtAo2t8gu89KPC8PctOixFvbXRA==}
+ '@storybook/[email protected]':
+ resolution: {integrity: sha512-1jgRLUm8u/FYR+q1NjN+FASW6eaL0EF8DVVn7ygYEr7lkC6G0FLJ+YOP91t8RhzZw/3yxwjB7Ztxu/GgQs3C1A==}
peerDependencies:
- storybook: ^8.4.0-alpha.2
+ storybook: ^8.4.0-alpha.4
'@storybook/[email protected]':
resolution: {integrity: sha512-dHYFQH3mA+EtnCkHXzicbLgsvzYjcDJ1JWsogbItZogkPHgSJM/Wr71uMkcvw8v9mmCyP4NpXJuu6bPoVsOnzg==}
@@ -4350,6 +4359,9 @@ packages:
resolution: {integrity: sha512-ejlPM315qwLpaQlQDTjPdsUFSc6ZsP4AN6AlWnogPjQ7CVi7PYF3YVz+CY3jE2pwYf7E/7HlDAN0rV2GxTG0HQ==}
+ '@types/[email protected]':
+ resolution: {integrity: sha512-dNKVfHd/jk0SkR/exKGj2ggkB45MAkzvWCaqLUUgkyjITkGNzH8H+yUwr+BLJUBjZOe9w8X3wgmXhZDRg1ED6A==}
+
resolution: {integrity: sha512-frsJrz2t/CeGifcu/6uRo4b+SzAwT4NYCVPu1GN8IB9XTzrpPkGuV0tmh9mN+/L0PklAlsC3u5Fxt0ju00LXIw==}
@@ -6383,6 +6395,9 @@ packages:
resolution: {integrity: sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==}
engines: {node: ^10.12.0 || >=12.0.0}
+ resolution: {integrity: sha512-P9bmyZ3h/PRG+Nzga+rbdI4OEpNDzAVyy74uVO9ATgzLK6VtAsYybF/+TOCvrc0MO793d6+42lLyZTw7/ArVzA==}
+
resolution: {integrity: sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==}
@@ -6844,6 +6859,9 @@ packages:
resolution: {integrity: sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==}
engines: {node: '>= 4'}
+ resolution: {integrity: sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ==}
+
resolution: {integrity: sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==}
engines: {node: '>=6'}
@@ -7437,6 +7455,9 @@ packages:
resolution: {integrity: sha512-ZZow9HBI5O6EPgSJLUb8n2NKgmVWTwCvHGwFuJlMjvLFqlGG6pjirPhtdsseaLZjSibD8eegzmYpUZwoIlj2cQ==}
engines: {node: '>=4.0'}
+ resolution: {integrity: sha512-xXDvecyTpGLrqFrvkrUSoxxfJI5AH7U8zxxtVclpsUtMCq4JQ290LY8AW5c7Ggnr/Y/oK+bQMbqK2qmtk3pN4g==}
+
resolution: {integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==}
@@ -7488,6 +7509,9 @@ packages:
resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==}
engines: {node: '>= 0.8.0'}
+ resolution: {integrity: sha512-UaiMJzeWRlEujzAuw5LokY1L5ecNQYZKfmyZ9L7wDHb/p5etKaxXhohBcrw0EYby+G/NA52vRSN4N39dxHAIwQ==}
+
resolution: {integrity: sha512-utWOt/GHzuUxnLKxB6dk81RoOeoNeHgbrXiuGk4yyF5qlRz+iIVWu56E2fqGHFrXz0QNUhLB/8nKqvRH66JKGQ==}
engines: {node: '>=10'}
@@ -8332,6 +8356,9 @@ packages:
resolution: {integrity: sha512-E385OSk9qDcXhcM9LNSe4sdhx8a9mAPrZ4sMLW+tmxl5ZuGtPUcdFu+MPP2jbgiWAZ6Pfe5soGFMd+0Db5Vrog==}
+ resolution: {integrity: sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==}
+
resolution: {integrity: sha512-facVMEBnUynzMN7hCSqyNpF6uyCpVIl4XAUyTR9D8q2JlhgyPY6bZtj/OkFk3+Cpka1TnYCppQb8BzDWHtSaZg==}
engines: {node: '>=12'}
@@ -9097,6 +9124,9 @@ packages:
resolution: {integrity: sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==}
engines: {node: '>= 0.4'}
+ resolution: {integrity: sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==}
+
resolution: {integrity: sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==}
@@ -13850,9 +13880,9 @@ snapshots:
react: 18.3.1
react-dom: 18.3.1([email protected])
dependencies:
- '@storybook/csf-plugin': 8.4.0-alpha.2([email protected])
+ '@storybook/csf-plugin': 8.4.0-alpha.4([email protected])
'@types/find-cache-dir': 3.2.1
browser-assert: 1.2.1
es-module-lexer: 1.5.4
@@ -13895,7 +13925,7 @@ snapshots:
transitivePeerDependencies:
- webpack-sources
dependencies:
storybook: 8.3.3
unplugin: 1.14.1
@@ -14274,6 +14304,8 @@ snapshots:
'@types/qs': 6.9.16
'@types/serve-static': 1.15.7
+ '@types/[email protected]': {}
+
'@types/[email protected]': {}
@@ -16482,7 +16514,7 @@ snapshots:
doctrine: 2.1.0
eslint: 8.57.1
eslint-import-resolver-node: 0.3.9
hasown: 2.0.2
is-core-module: 2.15.1
is-glob: 4.0.3
@@ -16928,6 +16960,8 @@ snapshots:
dependencies:
flat-cache: 3.2.0
+
@@ -17499,6 +17533,8 @@ snapshots:
+
dependencies:
parent-module: 1.0.1
@@ -18282,6 +18318,13 @@ snapshots:
object.assign: 4.1.5
object.values: 1.2.0
+ dependencies:
+ lie: 3.3.0
+ pako: 1.0.11
+ readable-stream: 2.3.8
+ setimmediate: 1.0.5
+
dependencies:
json-buffer: 3.0.1
@@ -18321,6 +18364,10 @@ snapshots:
prelude-ls: 1.2.1
type-check: 0.4.0
+ dependencies:
+ immediate: 3.0.6
+
@@ -19133,7 +19180,7 @@ snapshots:
'@panva/hkdf': 1.2.1
cookie: 0.5.0
jose: 4.15.9
oauth: 0.9.15
openid-client: 5.7.0
preact: 10.24.1
@@ -19182,7 +19229,7 @@ snapshots:
- '@babel/core'
- babel-plugin-macros
dependencies:
'@next/env': 14.2.9
'@swc/helpers': 0.5.5
@@ -19581,6 +19628,8 @@ snapshots:
+
dependencies:
bezier-easing: 2.1.0
@@ -20438,6 +20487,8 @@ snapshots:
functions-have-names: 1.2.3
has-property-descriptors: 1.0.2
+
@@ -20618,7 +20669,7 @@ snapshots:
dependencies:
transitivePeerDependencies:
- '@preact/preset-vite'
- storybook