feat(composer): compose spoiler, annotation, and tooltip controls (#1491)

Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
Co-authored-by: npub1223z34hd7vtwc6qj4s7flsxkj644nlre2nthu7lrrmkumhu3xddsrx9r6w <52a228d6edf316ec6812ac3c9fc0d696ab59fc7954d77e7be31eedcddf91335b@sprout-oss.stage.blox.sqprod.co>
This commit is contained in:
Taylor Ho
2026-07-06 16:36:01 -07:00
committed by GitHub
co-authored by npub1223z34hd7vtwc6qj4s7flsxkj644nlre2nthu7lrrmkumhu3xddsrx9r6w
parent 36ac5243ff
commit 1aa87bb26b
17 changed files with 1373 additions and 256 deletions
+16
View File
@@ -0,0 +1,16 @@
import { invokeTauri } from "./tauri";
/**
* Fetch relay media bytes over IPC (Rust reqwest, WARP-tunneled).
*
* Used by the composer image editor: wrapping the bytes in a same-origin
* `blob:` URL gives the canvas pixel access without CORS, so the media
* proxy needs no special headers. The Rust side enforces the same URL
* validation and size cap as the download commands.
*/
export async function fetchMediaBytes(
url: string,
): Promise<Uint8Array<ArrayBuffer>> {
const bytes = await invokeTauri<number[]>("fetch_media_bytes", { url });
return new Uint8Array(bytes);
}