diff --git a/.github/workflows/capture.yml b/.github/workflows/capture.yml index 44a1610..fd50f8a 100644 --- a/.github/workflows/capture.yml +++ b/.github/workflows/capture.yml @@ -20,12 +20,12 @@ jobs: matrix: include: - package: earpop-capture-darwin-arm64 - runner: macos-14 + runner: macos-15 rust_target: aarch64-apple-darwin bin: earpop-capture host_triple: true - package: earpop-capture-darwin-x64 - runner: macos-14 + runner: macos-15 rust_target: x86_64-apple-darwin bin: earpop-capture host_triple: false diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..f0c021b --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,28 @@ +name: CI + +on: + push: + branches: [main] + pull_request: + +permissions: + contents: read + +jobs: + check: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: pnpm/action-setup@v4 + + - uses: actions/setup-node@v4 + with: + node-version: 24 + cache: pnpm + + - run: pnpm install --frozen-lockfile + - run: pnpm check + - run: pnpm lint + - run: pnpm fmt:check + - run: pnpm test diff --git a/.oxlintrc.json b/.oxlintrc.json index 36c43c8..aab93ec 100644 --- a/.oxlintrc.json +++ b/.oxlintrc.json @@ -4,7 +4,9 @@ "categories": { "correctness": "error" }, - "rules": {}, + "rules": { + "react/rules-of-hooks": "error" + }, "env": { "builtin": true }, diff --git a/AGENTS.md b/AGENTS.md index 63af400..89e23c2 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -23,4 +23,4 @@ Agent workflow for this repo. Details live in linked docs — do not duplicate t - Import alias `#/*` maps to `src/*` (package.json `imports`; write the `.js` extension). - Capture platforms: `src/lib/capture-platforms.json` must stay aligned with `.github/workflows/capture.yml`. -- Scripts and engines: see root `package.json` (`pnpm capture:*`, `pnpm release`, `pnpm check` / `lint` / `fmt`). +- Scripts and engines: see root `package.json` (`pnpm capture:*`, `pnpm release`, `pnpm check` / `lint` / `fmt` / `test`). diff --git a/Cargo.lock b/Cargo.lock index 0eb178b..9fadd43 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -80,9 +80,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.20.3" +version = "3.20.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72f5acc6cb2ba439de613abc23857ec3d78374d8ed5ac84e9d11336e87da8649" +checksum = "87a0cf66fd1eb2fb7b822cb78370d82303750809bc6ba855f3f58e517d3238db" [[package]] name = "bytes" @@ -244,9 +244,9 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.18" +version = "1.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682" +checksum = "3bd1574e617a9a6c1f8f8181bd7e841e1f20e4277607ef28945765188d6284d4" [[package]] name = "jni" @@ -308,9 +308,9 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.106" +version = "0.3.107" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7883d941dae510fb2d978fc3fe018c71c9e2892fd38854de3e8b92c2e5ad9cc5" +checksum = "8dc09d2154098bbf4ef54eab6b117a3c24cbbffe94046b16ee6d6d4510584d3a" dependencies = [ "cfg-if", "futures-util", @@ -325,9 +325,9 @@ checksum = "65cd87c9a6d60536580b316ad985726104730a5151c99845f2490428ef91240a" [[package]] name = "log" -version = "0.4.34" +version = "0.4.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9f8bd3e56ce4dfc153cf470fffbfa98c7620958b312ca5c3a4b8d5181fd13c6" +checksum = "5d15f86d12da44cd8d4ec3c73984537eb7f4cadcb9776a575a0a8a05ca11005c" [[package]] name = "mach2" @@ -532,12 +532,6 @@ dependencies = [ "objc2-core-foundation", ] -[[package]] -name = "once_cell" -version = "1.21.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50" - [[package]] name = "pin-project-lite" version = "0.2.17" @@ -588,18 +582,18 @@ dependencies = [ [[package]] name = "realfft" -version = "3.5.0" +version = "3.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f821338fddb99d089116342c46e9f1fbf3828dba077674613e734e01d6ea8677" +checksum = "538895ccf2006b473aafbe8d72770e21038961ab67aae34f3c577485fc703a7d" dependencies = [ "rustfft", ] [[package]] name = "rubato" -version = "5.0.1" +version = "5.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc1e951b9f5432ec1422f4dcfa5733fc501265902612edf5ef8bd8ecdd960930" +checksum = "6b4da228e06632d025557f798114057cf27a4c6a71d40024c84d6db82fa5ef4a" dependencies = [ "audioadapter", "audioadapter-buffers", @@ -682,7 +676,7 @@ checksum = "e7a5d71263a5a7d47b41f6b3f06ba276f10cc18b0931f1799f710578e2309348" dependencies = [ "proc-macro2", "quote", - "syn 3.0.9", + "syn 3.0.10", ] [[package]] @@ -739,9 +733,9 @@ dependencies = [ [[package]] name = "syn" -version = "3.0.9" +version = "3.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d78c8dee4c7bf0e14673097256fed6142ce9d3b85a408189d07482442145823b" +checksum = "4ae9ccbea3a7b0b09443036490c8f34a8b1b760fd345e5c0dae0aac718faea79" dependencies = [ "proc-macro2", "quote", @@ -785,23 +779,23 @@ checksum = "fe5197923287db20a58125f0bc85c062f7f2c892de97b18c356f9efb14b28524" dependencies = [ "proc-macro2", "quote", - "syn 3.0.9", + "syn 3.0.10", ] [[package]] name = "toml_datetime" -version = "1.1.2+spec-1.1.0" +version = "1.1.3+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b86d767906c6c42421dcba507eb9d203e779497710a47782a224bb871653053" +checksum = "173f25c883cd2176a2d8212155638c0a60d484a9d84546d270866f40f56b6e49" dependencies = [ "serde_core", ] [[package]] name = "toml_edit" -version = "0.25.17+spec-1.1.0" +version = "0.25.19+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3641d5bbb5349a79e1020a242d251efbc546ad8048d133958323ce9c40a9c9c" +checksum = "dd43688c4858d7264ae1cf9a9f874a67c3feb74a883b1cd7bebd6a4ea8307218" dependencies = [ "indexmap", "toml_datetime", @@ -857,12 +851,11 @@ dependencies = [ [[package]] name = "wasm-bindgen" -version = "0.2.129" +version = "0.2.130" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9bb54f33acc68fd454578d9820b0bde1a1a3d17aa17bb7b6595806d02886d409" +checksum = "a0181c14ddd6c7b8b0b0132a5f1ea2f32be0d893cd3ea97b6e3b28886b8a3d1c" dependencies = [ "cfg-if", - "once_cell", "rustversion", "wasm-bindgen-macro", "wasm-bindgen-shared", @@ -870,9 +863,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.129" +version = "0.2.130" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e29d0c35b16e224a7eeb5cd2d25e3e1968fbd65604117b44d3b789d00ee8535" +checksum = "6e931a02a39abdbf66966fc35902b5ed58344750a70885bed4ebb3d8eaf28ed9" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -880,31 +873,31 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.129" +version = "0.2.130" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f501a8bc3719dba86ef8ae4728879c08001bea749eb1333ac5b91e040e2a6b7" +checksum = "2ca4b54280e455bd831e33a6b8e734baf432fe63fbc35c42ac14ce67a043a53a" dependencies = [ "bumpalo", "proc-macro2", "quote", - "syn 3.0.9", + "syn 3.0.10", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.129" +version = "0.2.130" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23f0c9c52aa7cd7d77769a4cfe2a9adb1b331f489a41d912ce14513d5ab995c6" +checksum = "3b1f9c3798725016c6ee5f2f57869ec0831e8bbc0ab0310a86e787e97f41389e" dependencies = [ "unicode-ident", ] [[package]] name = "web-sys" -version = "0.3.106" +version = "0.3.107" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88261b9deccee56594c11a3460c462c41f58d148598fe70ad77070126a68aba4" +checksum = "d7d179596ff5ec0f6de4db64d54011bde6289cc49603d3a6e4ce3f329207ab88" dependencies = [ "js-sys", "wasm-bindgen", @@ -1049,9 +1042,9 @@ dependencies = [ [[package]] name = "winnow" -version = "1.0.4" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23b97319f7b8343df12cc98938e5c3eb436064524c8d2b4e30a1d3a36eecdf81" +checksum = "8c3b93199df0ab874cdf0c6a94f0a0dc3423fe41f1cafb62b8bd7b1deb277aef" dependencies = [ "memchr", ] diff --git a/README.md b/README.md index 48d9275..65d2091 100644 --- a/README.md +++ b/README.md @@ -20,9 +20,16 @@ npm only installs the microphone helper for your platform (one of the `earpop-ca ## Getting started -Run `earpop`. The first time, it asks for your Soniox region and API key, verifies the key with Soniox, and then asks you to pick a microphone. After that it goes straight to captions. +Run `earpop`. The first time, it asks for your Soniox region and API key, verifies the key with Soniox, then asks you to pick a microphone and the languages people will speak. After that it goes straight to captions. `ESC` goes back from the key screen and quits from the others. -Language hints default to English. Press `s` and choose "Choose languages" to change them. Pick one language to keep the output in that language, or several for a mixed conversation. +The language list starts from your system language plus English (English only on an English system). Press `s` and choose "Choose languages" to change them; type to search the list. Pick one language to keep the output in that language, or several for a mixed conversation. + +To use other languages for a single run without changing your settings, pass `--lang`: + +```bash +earpop --lang ja,en +earpop languages # list supported codes +``` ## Live screen @@ -30,50 +37,79 @@ Language hints default to English. Press `s` and choose "Choose languages" to ch [S1] So the plan is to ship the beta on Friday. [S2] Does that include the Windows build? [S1] Yes, the capture helper is ready for x64. -● Listening 03:12 -p pause 1-9 speaker 0 all Up history m mic s settings ESC end +● Listening en 03:12 +p pause 1-9 speaker 0 all Up history c copy path m mic s settings ? keys ESC end ``` -Dimmed text is provisional and gets replaced once Soniox finalizes it. The live view shows the last six lines; press `Up` or scroll the mouse wheel to read earlier captions from this session. Everything also goes into the transcript file. +Captions fill the terminal, so a taller window shows more of the conversation. Dimmed text is provisional and gets replaced once Soniox finalizes it. A new line starts when the speaker or language changes, at the end of a sentence, or after a pause of more than two seconds. With more than one language selected, each line also shows the detected language, such as `[S1 ja]`. The status line shows the languages in use and any translation. Press `Up` or scroll the mouse wheel to read earlier captions from this session. Everything also goes into the transcript file. -| Key | Action | -| ---------- | --------------------------------------------------------------------------------------------------- | -| `p` | Pause or resume. Pausing also copies the transcript path to the clipboard. | -| `1` to `9` | Show only that speaker. Press more numbers to add speakers, or the same number again to remove one. | -| `0` | Show everyone again | -| `m` | Switch microphone | -| `s` | Settings | -| `Up` | Open the session history. `Up`/`Down` and `PgUp`/`PgDn` scroll, `Home` jumps to the start | -| `End` | Leave the history and return to live captions (`ESC` does the same while the history is open) | -| `ESC` | Press twice to end the session, then once more to quit | +| Key | Action | +| ---------- | --------------------------------------------------------------------------------------------------------- | +| `p` | Pause or resume | +| `1` to `9` | Show only that speaker. Press more numbers to add speakers, or the same number again to remove one. | +| `0` | Show everyone again | +| `l` | With several languages or translation on, show only one language. Press again for the next; `0` shows all | +| `c` | Copy the transcript path to the clipboard | +| `m` | Switch microphone | +| `s` | Settings | +| `?` | Show every key | +| `Up` | Open the session history. `Up`/`Down` and `PgUp`/`PgDn` scroll, `Home` jumps to the start | +| `End` | Leave the history and return to live captions (`ESC`, or `Down` at the bottom, does the same) | +| `ESC` | Press twice to end the session, then once more to quit | -`Ctrl+C` does the same as `ESC`. When you quit, earpop waits for the last captions to be saved; press once more to quit right away. +`Ctrl+C` does the same as `ESC`. When you quit, earpop waits for the last captions to be saved; press once more to quit right away. Keys also accept Korean jamo typed in Hangul mode (ㅔ for `p`, for example); input methods that hold a letter until the next key pass it on late, so switch to English for instant response. Captions keep running above the microphone and settings menus. On narrow terminals the key line keeps the most important keys; `?` lists them all. When you quit, earpop prints the transcript path and copies it to the clipboard. ## Settings -`earpop settings`, or `s` during a session, lets you change the microphone, languages, region, and API key. Microphone and language changes apply right away. Region and key changes apply the next time you run earpop. Each region has its own saved key. +`earpop settings`, or `s` during a session, lets you change the microphone, languages, translation, region, and API key. Microphone, language, and translation changes apply right away. Region and key changes apply the next time you run earpop. Each region has its own saved key. `earpop auth clear` deletes the saved key for the current region. +### Translation + +Soniox can translate while it transcribes. In settings, choose "Translation" and pick one language to translate everything into it, or two to translate between them (for example English and Spanish in a bilingual meeting). Each translated line appears in italics right under the speech it translates, tagged with its language. For a single run: + +```bash +earpop --translate ko # everything into Korean +earpop --translate en,es # English to Spanish and Spanish to English +``` + +Translations are saved in the transcript too. Text exports label them, such as `S1 (ko translation)`, and SRT and WebVTT exports show each translation at the same time as the speech, so players stack the two lines. + +### Terms + +Names and jargon that Soniox should spell your way, such as product names or people, go in a term list. Write each term in the language and script people actually say it in. The list is sent with every session, and changes apply the next time you run earpop. + +```bash +earpop terms add "Kold Brew" 웬민 Kubernetes +earpop terms # list +earpop terms remove Kubernetes +earpop terms clear +``` + ## Transcripts Each session is a JSONL file named after its start time, such as `2026-10-12_14-03-27.jsonl`. Final text is appended as it arrives, with timestamps, speaker, and language for every token. ```bash -earpop transcripts list # newest first -earpop transcripts view # print as plain text -earpop transcripts export # write .txt next to the JSONL file +earpop transcripts list # newest first, with start time and length +earpop transcripts view # print as plain text +earpop transcripts export # write .txt next to the JSONL file +earpop transcripts export latest -f srt # newest transcript as subtitles +earpop transcripts export -f md -o notes.md ``` -The plain text version starts a new paragraph when the speaker changes or after more than two seconds without speech: +`--format` (`-f`) takes `txt`, `srt`, `vtt`, or `md`; `--out` (`-o`) picks the output path. Use `latest` in place of an ID for the newest transcript. Subtitle cues end at sentence boundaries and stay under about two lines. + +The plain text version starts a new paragraph when the speaker or language changes, or after more than two seconds without speech. When a transcript mixes languages, each paragraph is labeled with its language code: ```text earpop transcript v1 id: 2026-10-12_14-03-27 started: 2026-10-12T14:03:27+09:00 -model: stt-rt-v5 +model: stt-rt-v6 [00:00] S1: So the plan is to ship the beta on Friday. [00:04] S2: Does that include the Windows build? @@ -102,9 +138,11 @@ Audio goes to the Soniox endpoint for your region and is never written to disk. If Soniox rejects your key, the region is usually wrong. Run `earpop settings`, change the region, and enter the key again. +If a microphone stops sending audio, earpop reopens it and shows "No audio from the microphone; reopened it". Bluetooth headsets and hearing aids do this once when they switch to their microphone mode. After three tries in a minute it stops streaming and asks you to pick another microphone with `m`. + If you see "Capture helper integrity check failed", the helper doesn't match the released build. Reinstall earpop-cli. -On Linux, live transcription needs ALSA (`libasound2`) and access to the audio device. Copying to the clipboard uses `wl-copy`, `xclip`, or `xsel`; without any of them earpop falls back to OSC 52, which not every terminal supports. +On Linux, live transcription needs ALSA (`libasound2`) and access to the audio device. "System default" follows the input chosen in your sound settings, which is the right pick for most setups. Copying to the clipboard uses `wl-copy`, `xclip`, or `xsel`; without any of them earpop falls back to OSC 52, which not every terminal supports. ## Contributing diff --git a/crates/earpop-capture/src/main.rs b/crates/earpop-capture/src/main.rs index 353eff7..5b6f594 100644 --- a/crates/earpop-capture/src/main.rs +++ b/crates/earpop-capture/src/main.rs @@ -77,27 +77,65 @@ fn parse_device_flag(args: &mut impl Iterator) -> Result Option { - device.description().ok().map(|d| d.name().to_string()) +/// ALSA lists its rate converters, mixers, and routing plugins as devices; none of them is a +/// microphone a person would pick. Keyed by ALSA PCM name (the description's driver). +const ALSA_PLUGINS: &[&str] = &[ + "null", + "lavrate", + "samplerate", + "speexrate", + "jack", + "oss", + "speex", + "upmix", + "vdownmix", + "usbstream", +]; + +/// The name shown and saved for a device, or `None` for ALSA plugins. +fn listed_name(device: &cpal::Device) -> Option { + let description = device.description().ok()?; + if let Some(driver) = description.driver() { + // Plugin PCMs may carry arguments after a colon, as in `usbstream:CARD=...`. + let pcm = driver.split(':').next().unwrap_or(driver); + if ALSA_PLUGINS.contains(&pcm) { + return None; + } + // ALSA's `default` PCM describes itself as an output; it follows the system input setting. + if driver == "default" { + return Some("System default".into()); + } + } + Some(description.name().to_string()) } fn cmd_list() -> Result<(), String> { let host = cpal::default_host(); - let default_name = host - .default_input_device() - .as_ref() - .and_then(device_name); + // Compare by ID: ALSA names its default device differently when listing it. + // Fall back to the name where a backend cannot report IDs. + let default = host.default_input_device(); + let default_id = default.as_ref().and_then(|device| device.id().ok()); + let default_name = default.as_ref().and_then(listed_name); let mut seen = HashSet::new(); let mut mics = Vec::new(); for device in host.input_devices().map_err(text)? { - let Some(name) = device_name(&device) else { + let Some(name) = listed_name(&device) else { continue; }; + let is_default = match (&default_id, device.id().ok()) { + (Some(default_id), Some(id)) => *default_id == id, + _ => default_name.as_ref() == Some(&name), + }; if !seen.insert(name.clone()) { + // Same name listed twice: keep one entry, but never lose the default mark. + if is_default { + if let Some(entry) = mics.iter_mut().find(|mic: &&mut MicJson| mic.name == name) { + entry.is_default = true; + } + } continue; } - let is_default = default_name.as_ref() == Some(&name); mics.push(MicJson { name, is_default }); } @@ -109,10 +147,13 @@ fn cmd_list() -> Result<(), String> { fn pick_device(wanted: Option<&str>) -> Result { let host = cpal::default_host(); if let Some(wanted) = wanted { - let found = host - .input_devices() - .map_err(text)? - .find(|device| device_name(device).as_deref() == Some(wanted)); + // Settings saved before "System default" existed hold the raw ALSA description. + let found = host.input_devices().map_err(text)?.find(|device| { + listed_name(device).as_deref() == Some(wanted) + || device + .description() + .is_ok_and(|description| description.name() == wanted) + }); if let Some(device) = found { return Ok(device); } @@ -151,9 +192,12 @@ fn cmd_capture(wanted: Option) -> Result<(), String> { let mut stdout = io::stdout().lock(); let poll = Duration::from_millis(50); + let parent = parent_id(); loop { - if stop.load(Ordering::Relaxed) { + // A killed parent never closes the pipe cleanly; a device that has stopped sending + // frames would otherwise keep the microphone open forever. + if stop.load(Ordering::Relaxed) || parent_id() != parent { break; } match rx.recv_timeout(poll) { @@ -175,6 +219,17 @@ fn cmd_capture(wanted: Option) -> Result<(), String> { Ok(()) } +#[cfg(unix)] +fn parent_id() -> Option { + Some(std::os::unix::process::parent_id()) +} + +// Windows has no cheap parent check; the closed pipe still ends capture there. +#[cfg(not(unix))] +fn parent_id() -> Option { + None +} + fn is_pipe_closed(error: &io::Error) -> bool { if error.kind() == io::ErrorKind::BrokenPipe { return true; diff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.md index b98e362..a5405e6 100644 --- a/docs/ARCHITECTURE.md +++ b/docs/ARCHITECTURE.md @@ -14,15 +14,22 @@ UI (ink) ←── one snapshot / setState per WS message ── transcription - **Hot:** mic, socket, tokens, UI; no blocking. - **Cold:** journal, keepalive, settings — never stall hot. -- **Journal** persists full finals; the controller also keeps them in memory for history scrollback. Live captions render only a short tail (flat render cost), and history renders only the visible rows. +- **Journal** persists full finals; the controller also keeps them in memory for history scrollback. Live captions lay out only the tail that fits the terminal (cost bounded by screen size, not session length), and history renders only the visible rows. +- The published bundle runs React and Ink in production mode (`src/production.ts`); `pnpm dev` keeps development builds. - Same controller modules power headless `transcripts` commands. ## Intentional STT / capture choices - Provisional captions first; finals may lag. Endpoint detection **off** (accuracy over early finalize). -- Language hints from settings (default `["en"]`); strict when a single language is selected; rolling final-text context on reconnect. +- Language hints from settings, asked on first run (the suggestion is the system language plus English); strict when a single language is selected; two-way translation adds both languages to the hints; rolling final-text context (speech only, not translations) on reconnect. +- Language identification is always on: captions and exports split lines on language changes. +- Translations arrive after the speech they translate and carry no timestamps; the journal files them at the end of that speech and exports show them over it. - Mic: cpal + rubato resample to 16 kHz mono; ~100ms (3200-byte) s16le frames; no ffmpeg. -- WS: `perMessageDeflate: false`; drop frames if `bufferedAmount` ≳ 5s audio; on reconnect keep capture, drop frames. +- WS: key in the `Authorization` header; `perMessageDeflate: false`; drop frames if `bufferedAmount` ≳ 5s audio; on reconnect keep capture, drop frames. +- Errors 400/401/402/403 are fatal; others reconnect with backoff. +- No microphone, no session: losing the microphone closes the Soniox session, since open sessions may be billed without audio. +- Stalled capture (no frames for 3 s, as Bluetooth devices do when switching to their microphone profile) is reopened with a fresh session so timestamps stay aligned; three tries per minute, then the user is asked to pick another microphone. +- The capture helper exits when its parent process changes, so a killed CLI never leaves the microphone open. - One WS message, one snapshot, one UI update. ## Capture packaging (why) diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md index 2022cad..af4a966 100644 --- a/docs/CONTRIBUTING.md +++ b/docs/CONTRIBUTING.md @@ -27,6 +27,10 @@ | `perf` | Performance | | `test` / `build` / `ci` / `chore` / `style` | As named | +## Checks + +`pnpm check`, `pnpm lint`, `pnpm fmt:check`, and `pnpm test` (node:test, `src/**/*.test.ts`) must pass; CI runs them on every push to `main` and every pull request. Tests that touch settings or transcripts use `useTempHome()` so they never read or write the real `~/.earpop`. + ## Pull requests GitHub (`gh pr` when asked). Title = commit subject. Prefer squash merge. diff --git a/package.json b/package.json index ec93d65..9e848fb 100644 --- a/package.json +++ b/package.json @@ -38,6 +38,7 @@ "capture:check": "node scripts/publish-capture.mjs", "release": "node scripts/release.mjs", "check": "tsc --noEmit", + "test": "node --import tsx --test \"src/**/*.test.ts\"", "lint": "oxlint", "lint:fix": "oxlint --fix", "fmt": "oxfmt", @@ -49,14 +50,14 @@ "ink": "^8.0.0", "react": "^19.3.1", "string-width": "^8.3.0", - "ws": "^8.22.0" + "ws": "^8.23.0" }, "devDependencies": { - "@types/node": "^26.6.5", + "@types/node": "^26.6.6", "@types/react": "^19.3.0", "@types/ws": "^8.18.2", - "oxfmt": "^0.74.0", - "oxlint": "^1.89.0", + "oxfmt": "^0.78.0", + "oxlint": "^1.93.0", "tsup": "^9.0.0", "tsx": "^4.23.15", "typescript": "^7.0.2" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index fa6b911..8ac72b5 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -21,12 +21,12 @@ importers: specifier: ^8.3.0 version: 8.3.0 ws: - specifier: ^8.22.0 - version: 8.22.0 + specifier: ^8.23.0 + version: 8.23.0 devDependencies: '@types/node': - specifier: ^26.6.5 - version: 26.6.5 + specifier: ^26.6.6 + version: 26.6.6 '@types/react': specifier: ^19.3.0 version: 19.3.0 @@ -34,11 +34,11 @@ importers: specifier: ^8.18.2 version: 8.18.2 oxfmt: - specifier: ^0.74.0 - version: 0.74.0 + specifier: ^0.78.0 + version: 0.78.0 oxlint: - specifier: ^1.89.0 - version: 1.89.0 + specifier: ^1.93.0 + version: 1.93.0 tsup: specifier: ^9.0.0 version: 9.0.0(tsx@4.23.15)(typescript@7.0.2) @@ -246,8 +246,8 @@ packages: '@jridgewell/gen-mapping@0.3.13': resolution: {integrity: sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==} - '@jridgewell/resolve-uri@3.1.2': - resolution: {integrity: sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==} + '@jridgewell/resolve-uri@3.1.3': + resolution: {integrity: sha512-lhTtjtoEArWBjismtfS761S9Hlyn+nIZqOZVYoZ1Xn82PMNMVnk+jj/NhC4fAXGTs7ydONcJiR5vyQBTMDu27g==} engines: {node: '>=6.0.0'} '@jridgewell/sourcemap-codec@1.6.0': @@ -256,400 +256,398 @@ packages: '@jridgewell/trace-mapping@0.3.31': resolution: {integrity: sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==} - '@napi-rs/lzma-linux-x64-gnu@1.5.1': - resolution: {integrity: sha512-oTXEIha4SsuXdTA4Iyskj0kpdx2yVXdhd75c2v3xGrHFfVMsbhTPZU/nMPL4sWKo4pBHm3aucLaqGlF696dTyQ==} - engines: {node: ^22.20 || ^24.12 || >=25} - cpu: [x64] - os: [linux] - libc: [glibc] - - '@oxfmt/binding-android-arm-eabi@0.74.0': - resolution: {integrity: sha512-xxQwrf5EPI5zxvuCTW8r6tzCTjPQ+h6+HqJ0iRKRy2zS1yBllt/xLVjoIyUc+FnR7g0a5g1SZv2yyDYhTItLbA==} + '@oxfmt/binding-android-arm-eabi@0.78.0': + resolution: {integrity: sha512-1x9NPGQG5WMOOT8spRP4hPbeqwB/P9ayxFo4EUDSle6mLmtYRqE6suXgHr93/S2nnszy77LlIa8klkKdWtHbMw==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm] os: [android] - '@oxfmt/binding-android-arm64@0.74.0': - resolution: {integrity: sha512-FJW3sATVvrWbV64al8xofCPZj4500Z/1W0ad7Tg1rcCUyh0EMbuSrsf3jsZS7CEbwQ5fQ0mRhmkc129GFgofSQ==} + '@oxfmt/binding-android-arm64@0.78.0': + resolution: {integrity: sha512-1muYaW9SiPEq8NIPGX0B20oUwCx6HWiCsZem/2jU7UsOzoXLT4YxWq6ybdhwKSKl0PyAfvyMyPF7FsI1To7AdA==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [android] - '@oxfmt/binding-darwin-arm64@0.74.0': - resolution: {integrity: sha512-TfmNKBD30dGyMu9GCLiaw2rt/z7fms9LS+5cKcNOyWst0QgAs8oZs6wPxMbVaaDVE0/PCdCosgWM1vbu6f5NUg==} + '@oxfmt/binding-darwin-arm64@0.78.0': + resolution: {integrity: sha512-jl4KJdo8HrVpLmcSYS/7oDXPH8Hzd6VrzgUFRAbY0j6cSRjcDkUnpuAStuNLoqvMtZEi7Rdy68BBriCgWJcy2g==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [darwin] - '@oxfmt/binding-darwin-x64@0.74.0': - resolution: {integrity: sha512-5Usf8+DfC4Q3o/MD8FkN47GrI6y0KbhQ4KhZ2HGzMZcXjcW1AeldwbUn51aKih+1TVuJFF9qkNm6X1nzm6NYng==} + '@oxfmt/binding-darwin-x64@0.78.0': + resolution: {integrity: sha512-RwOhQgAQi1qV3TeuTfrgGkCWEL3eDFIql/lo4rt2xpGHqyolKa+W5cFbb+M9IvwMwQbplii5Gbv1ZQQPTJlNug==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [darwin] - '@oxfmt/binding-freebsd-x64@0.74.0': - resolution: {integrity: sha512-eL+1O3gykw1XihbZh2MRAciQvU2988LByrnjhyo/dmNG74X4oZ7XzigRoWPRFLfJCp8hzRkp/LbEhwe7uuT2eA==} + '@oxfmt/binding-freebsd-x64@0.78.0': + resolution: {integrity: sha512-MAXydj01mLjMUlnmo7sYVm+7kdBdU9Nwaux2Q1f9oLNqt3CCdego1oMoZ30qDyZQGQXfVJZEU1yRV7mSzwKDVA==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [freebsd] - '@oxfmt/binding-linux-arm-gnueabihf@0.74.0': - resolution: {integrity: sha512-Xt0QtO2hJ4stnul8IL4LJGVLyp0xnc6ccN9fZ30yuubv8FWSRYxWwd1Za62KsEqAfmPSazoS/cLSUUJpja6npA==} + '@oxfmt/binding-linux-arm-gnueabihf@0.78.0': + resolution: {integrity: sha512-rz6FVZRiWsq3O2YQgCoqZRwaQQaPQ70NBks4+KINjjPJOjBTd8g/iq6ynS97ode+qKGlhXtpc/xCl8LHzfOjyQ==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm] os: [linux] - '@oxfmt/binding-linux-arm-musleabihf@0.74.0': - resolution: {integrity: sha512-/4wYQ0gZl4vUR0QoBTGaay73FmQ1GAjUa9z9101TR2xbGNrg4a+grazlR0yzEOe3/E+PJr5BGfj66MMzm/54vg==} + '@oxfmt/binding-linux-arm-musleabihf@0.78.0': + resolution: {integrity: sha512-lIK0XJi4JP1FnhuLjR/JWhQHGghZc+ghFNnbZTQC8kxsmrkW3ex8CeF7fp0FT+rEP0Nm6voCYkasL8poVWA9sQ==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm] os: [linux] - '@oxfmt/binding-linux-arm64-gnu@0.74.0': - resolution: {integrity: sha512-846bKzF+HJd+JkOFh3rxzmYvSq4Cm+GMT+p+mW7S13ZYo6GAAGv8bL8cAOi/XcdeMqxEJDCIMTVQLVBXHMCdig==} + '@oxfmt/binding-linux-arm64-gnu@0.78.0': + resolution: {integrity: sha512-o2LJIHfW3ZADOjDVk5c7MM1M8CiAG43GTc4mlJAK23fOHgru4CvnqWedCoCXpIsKokoRdEa7XdQywPGZv1BAiA==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [linux] libc: [glibc] - '@oxfmt/binding-linux-arm64-musl@0.74.0': - resolution: {integrity: sha512-nI5FJwZ4Flo6CBdscpwxymZXxO3m3IErQJX55ZS6h+ObfGXu8FostL85L/RWPFaCLnIVE4/WfLw+2q8XvVEeUA==} + '@oxfmt/binding-linux-arm64-musl@0.78.0': + resolution: {integrity: sha512-G+lUaQk94Vo+4byyd8X2+pPXtd7wObpdbvBC8xyozZD0ROSVBI3XpNNR6HECkJq4Q51AwLuJG81f4x+4eqvSrw==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [linux] libc: [musl] - '@oxfmt/binding-linux-ppc64-gnu@0.74.0': - resolution: {integrity: sha512-BoQYKuqUdsKAFAkK6DLBvkdv4+t0hppSm79sB0wIcE2o/eOwNj+6Z3OlKY4q3Eta/tlssP65FaS9vHn8TeF7vQ==} + '@oxfmt/binding-linux-ppc64-gnu@0.78.0': + resolution: {integrity: sha512-r76PAZf9/ZgF/iDRaIf8nLsr4x6ZHe/j2QLmWUjoQ46Sa11qMO68a5u5iux3y8vLzqYTS/xtKO9PjjMfyk5png==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [ppc64] os: [linux] libc: [glibc] - '@oxfmt/binding-linux-riscv64-gnu@0.74.0': - resolution: {integrity: sha512-FSroRrM12+jCdSQklF9aOxsKpI6wFs4ZCo/1cSYG80RWZS6z4LV+l9tXRMT8lDGu+yohIZBwi9M76FzGPFDE2A==} + '@oxfmt/binding-linux-riscv64-gnu@0.78.0': + resolution: {integrity: sha512-SQiXTt/c4aVoRXkJvhf4Y/sA1XYe3XjSMDbdX5PiAssBuHERoGtncQXz0KKWkXPejWTKlAL4mZSQZdHOCiw7TA==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [riscv64] os: [linux] libc: [glibc] - '@oxfmt/binding-linux-riscv64-musl@0.74.0': - resolution: {integrity: sha512-0VLQD0dhGBLY9Ik/w+otMvD81D0YXi4VDwql65macV+O9UzmSWmUr6CKf+dMtysDeC0PnG3y6kBkRO08BJx52g==} + '@oxfmt/binding-linux-riscv64-musl@0.78.0': + resolution: {integrity: sha512-VNB3wFUx/rAqwVNW+uyXxb+c0HUrmcS51UPkFMDWJY95c6Tck6u6HOyVLsqiYoC8kh2mGlwanYmjb/R2McvN0A==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [riscv64] os: [linux] libc: [musl] - '@oxfmt/binding-linux-s390x-gnu@0.74.0': - resolution: {integrity: sha512-6X7BbZNz34+OHM6Oqjf6TRcUyRn6aRcB4VtIDZAF/uQRyeVhg+G2hv6MlMvmnRekVSyTJ/8rG/u8W2dRFW6glg==} + '@oxfmt/binding-linux-s390x-gnu@0.78.0': + resolution: {integrity: sha512-1nbI0Y7SXwx2f4mJmKt58MaDdjAcoaYM90pBMGdcZCsTW2taFW1/MUi3uQGRPAN2n+3PldCdO9m+D6x+gU/heg==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [s390x] os: [linux] libc: [glibc] - '@oxfmt/binding-linux-x64-gnu@0.74.0': - resolution: {integrity: sha512-4kYIQK53yJXrxwxSzx8H2bojlf6/KezLGYLRXzV9QCCkoiCsvBTCid9Bg83dUPTLPa3g9K0730f6MKDbck1+OA==} + '@oxfmt/binding-linux-x64-gnu@0.78.0': + resolution: {integrity: sha512-I2z2ISPjrl3CSRF5fmQkNnoh46UVU1GjM1V0+COJyNZcj0SDNM4DrPP2/gXCX38YJ1P2BL6sF2VdsJ+pEYEbJQ==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [linux] libc: [glibc] - '@oxfmt/binding-linux-x64-musl@0.74.0': - resolution: {integrity: sha512-MfWz4wDREjp/JQDmuxtKieix4FHGa1z5rBvB3betdcPwZvf5fqeQrlCm1mmoyuUVQOh9Pt3M61HwN94kJCxw7Q==} + '@oxfmt/binding-linux-x64-musl@0.78.0': + resolution: {integrity: sha512-YHt5nKKFxT4SruI57FHnEhGRSDuoFqNoAM3moYCClg70mjjS39gBBbdzaZv+N0otdzvQVuHTPu3jFu5tpqC3XQ==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [linux] libc: [musl] - '@oxfmt/binding-openharmony-arm64@0.74.0': - resolution: {integrity: sha512-6rmAApkq5s1kbDjvNI6Nl5A+JqQkLORb2sR941pf5HWsrd01WGKyagK/B4vX9+kh1FfvRkNgEu59FHvVk4H8cQ==} + '@oxfmt/binding-openharmony-arm64@0.78.0': + resolution: {integrity: sha512-WH21lBMU+LYzF7aMeozTZlyc44oa2F+I5OtQ7RwuidCDoAxgTyN1s34rx0PBYrio56+2G88U9VOnYJsyV7VMHQ==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [openharmony] - '@oxfmt/binding-win32-arm64-msvc@0.74.0': - resolution: {integrity: sha512-+5SpRUnZNGeXTyumHnpHa791tQtt04qZs076WT8eTcGF2OJ631VLnf7S0kQSPuDG+PtJM0phadEB2WAr5n1w9g==} + '@oxfmt/binding-win32-arm64-msvc@0.78.0': + resolution: {integrity: sha512-uNQqHJrtHIiSl8pMbhDktmGpA1hqwldWNO8kbNpNFhVt+BYk4C3Ge8nlJgkRtGjtMam0+542G5UQJJG6lLePbg==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [win32] - '@oxfmt/binding-win32-ia32-msvc@0.74.0': - resolution: {integrity: sha512-1Fg+wYBO3Dsti1QX+/6EYHjeQzLC84tLOAqPu/r7ah3UJlUs9C/DB703Ay9Vcg+8VMzqZA2P5VGhzJraVUD4OQ==} + '@oxfmt/binding-win32-ia32-msvc@0.78.0': + resolution: {integrity: sha512-W6omURRT39EHBPH4Z8sUPIOzWVjMbhCCCWcfT0sa6aeC+vOXNyBAJmpQRh5//KfPDX96jJlNith9i4N65wxB+Q==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [ia32] os: [win32] - '@oxfmt/binding-win32-x64-msvc@0.74.0': - resolution: {integrity: sha512-y9jXUgPBm2TZIWbQhMYRRYAQM57+r4fbykgc+j24ICIIZl+pcuoNhnq1CRGm3oFiHnEUnZO00qOtSPGQdJ2ziQ==} + '@oxfmt/binding-win32-x64-msvc@0.78.0': + resolution: {integrity: sha512-r9rWKeDVc7lIrj0Us9kP08W7FudYAoWyEdO40qnKk20bHiTbW/z2v4LoIxxUENQyFfApbeV2Gl9XsEgY/tY1dA==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [win32] - '@oxlint/binding-android-arm-eabi@1.89.0': - resolution: {integrity: sha512-Pflpba5F3gRAQ12sWglRxvWTHEdAusNDvmi4Y5N1T5SY1AGkM7AixOnET8qkrnLJ/F32qAlNokO6eCknT8tmnw==} + '@oxlint/binding-android-arm-eabi@1.93.0': + resolution: {integrity: sha512-KKw70pbD5Pvq3G2lJ+WQ71XPMjCmg37rkSe2+mDqCRP3PoTSdDMuEi4UOnE8JBtyNM7bek61EC2s0Jt7S7u+Sg==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm] os: [android] - '@oxlint/binding-android-arm64@1.89.0': - resolution: {integrity: sha512-dYmyD1x7LaPlb79vZWUcpTShk8dI9z1I+IubtqrBxWNJaDhQdPHwcsvg7q5StTU4xWyd9AwPfLaTYFZY8NZgtQ==} + '@oxlint/binding-android-arm64@1.93.0': + resolution: {integrity: sha512-fvr1fTUZGelwRxKDt64pf28aL1WaWgviwz3X+E/FcRYvrlEahH0NECRz/c1SY+K+KWmZk5uAf6h1kQnyBkp/2A==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [android] - '@oxlint/binding-darwin-arm64@1.89.0': - resolution: {integrity: sha512-Z/oxOPiIqiS7fItRdxaaOEC+6GD3OpGi0IxoR0dMefzQHolsKLzScw2DNcu/5gUPok3tv+G9mslvYB5bo3i0qg==} + '@oxlint/binding-darwin-arm64@1.93.0': + resolution: {integrity: sha512-VdvSN9JRf4Es6ZzoAdvEeh8tgKdw8L4H82WmA8MMPVfPdZGCwE/nI27Z1HrRHYQhPxOh4kmnxQEioSUFrOvDaw==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [darwin] - '@oxlint/binding-darwin-x64@1.89.0': - resolution: {integrity: sha512-eAjTkHSjAxrdCPJxO6y5sPQL5pYLKb2kvxZz9UU7tXnOZk9I/HLtkvx9S7GHY883k+AmL/eC7mqFt+w7WCwk0w==} + '@oxlint/binding-darwin-x64@1.93.0': + resolution: {integrity: sha512-QR1V890Ml0YGRG0F/iV0K9igG+pOhe+VWd+aZnxY849rRHZf3F2gEoQks5+GVHf105X9Mh/6HdShTP5juekG2g==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [darwin] - '@oxlint/binding-freebsd-x64@1.89.0': - resolution: {integrity: sha512-0lNCA9Tl1n1FKpqy2/9ckp0kIuSrtJ/l9bMRgaEhOtM7TsOHshFuwOcvW8oA9teXLMOJT61LjEKWiaHDFGxF/w==} + '@oxlint/binding-freebsd-x64@1.93.0': + resolution: {integrity: sha512-jDfIbi30zZaKi+rTvig3sge+Xhi8pFFSgHxb0jzovc4qh8ETm/irKV9c7N/JsuwnYc5sbvf4IC8w1vQQ0IL+BA==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [freebsd] - '@oxlint/binding-linux-arm-gnueabihf@1.89.0': - resolution: {integrity: sha512-OTFEvi9W+JczaZD1Caj17SGCoW8H7TE+fvx0D7ATEWa1Lohn91UMxFQ6r145SiGy/yCxeIwptMys/RAM7gSVSQ==} + '@oxlint/binding-linux-arm-gnueabihf@1.93.0': + resolution: {integrity: sha512-qtxZ714ND/koFgVH00QgxlzZiIbRPmguaPhnHRU5DFFtrtEdOrSnZD4U/H2AzXrXkZ59eQbMBnJwbum5XohrIQ==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm] os: [linux] - '@oxlint/binding-linux-arm-musleabihf@1.89.0': - resolution: {integrity: sha512-fRxgNHvBLswj6MrhW2uBq5UDhPRQlCbHeq/Nf8yuG9zOxhDsXqX/mi2PX1axgsQxMm88el7HLiJAzglAnflYxw==} + '@oxlint/binding-linux-arm-musleabihf@1.93.0': + resolution: {integrity: sha512-5pJ9NjMvH7WMUqXB6bTTOSemBm39w2cod27Hu3+Yom/GhbTeNXlYcpDx1o4CgBP6fhp0YHG66TNdVaUm6sHjsA==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm] os: [linux] - '@oxlint/binding-linux-arm64-gnu@1.89.0': - resolution: {integrity: sha512-v9ENzHvwrQoYSWTtviH1pOYc7R9UovDxVofnck50cNmPihRRTcrg5X0UlRbLOZ7IVtxPOlh2hb7kDO+FpE8SfQ==} + '@oxlint/binding-linux-arm64-gnu@1.93.0': + resolution: {integrity: sha512-pRf+7jtbt2fHE23SX7qBxRgnBZicUgsoCK1PVIjnOk+t3a6UBkpt/GrKI99WlxsKUxftz/5nv/kfKvScmYywkw==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [linux] libc: [glibc] - '@oxlint/binding-linux-arm64-musl@1.89.0': - resolution: {integrity: sha512-vfffe8mQ484AzVadlUOFpgL+JDwhvs9hrzxTgQP1FVfi4ZEUUYeffXlzC9dFV7Dgnu5s/KrNKvfmG6HxBd/ISQ==} + '@oxlint/binding-linux-arm64-musl@1.93.0': + resolution: {integrity: sha512-zM8Fd/K8sqGvsBcJBZ3oVZ3ctGWbszA08IaGt5gFFF5RcunppAI/ZnAXbouABvnWeJ//S44KKlfPZnDDbeiphg==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [linux] libc: [musl] - '@oxlint/binding-linux-ppc64-gnu@1.89.0': - resolution: {integrity: sha512-Buonlp4hVS7RGNP5M7bPpGNQrenyzA2C64JcO/oz9C1c6dGOXJ7VEAnaiAMY7voou0JYyCJdvDVlFQc5DZX3DQ==} + '@oxlint/binding-linux-ppc64-gnu@1.93.0': + resolution: {integrity: sha512-7qKCnvhZKDXJG2pdbLazd2hw4FxjJHbZOFrrbzyy5PdHfPLH9vnNUa1le01A8uItZuYKPBPncH+HCoEiFT4SgA==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [ppc64] os: [linux] libc: [glibc] - '@oxlint/binding-linux-riscv64-gnu@1.89.0': - resolution: {integrity: sha512-1eVwJJrJ3lYIPT+cm7BcBBZZXY6IQZP/oyonaruTor/MrVyWOpvnwt1oD5CLdsHg5aVBIxXodQSvt+1gK6ck5w==} + '@oxlint/binding-linux-riscv64-gnu@1.93.0': + resolution: {integrity: sha512-2pgulxC6G8V5wE750NJE/fRkf9aO6i6yoj10wyaR2EdiNtan4OemsOtsQ0ZTXGdY8Q3IoTmlND3GYvjJsvikYg==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [riscv64] os: [linux] libc: [glibc] - '@oxlint/binding-linux-riscv64-musl@1.89.0': - resolution: {integrity: sha512-fRQQsKUGShdEL5Fl9o9uhj3grkZbeXKLv0icQ5tspUCNYSDy8wzzEcP1WC2bKdTQ0rSszbKlO3iiHORxV22DLg==} + '@oxlint/binding-linux-riscv64-musl@1.93.0': + resolution: {integrity: sha512-yWsn6Gg2PnGG5jlyDz5+pHGiMTMiy4adaa4WRMzDgzB8efaShk1JMmTHIBSVLQMh0tYXRs4CN5uJCO79r4Mi4g==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [riscv64] os: [linux] libc: [musl] - '@oxlint/binding-linux-s390x-gnu@1.89.0': - resolution: {integrity: sha512-dEtYjIy6+fHcjKklsmtmMkZRhwHr2UbzjmpvuPtQYSeN9awQ2hx5JLms5Wvri+8P/NZtD8v5hfgHALUql+/Ycg==} + '@oxlint/binding-linux-s390x-gnu@1.93.0': + resolution: {integrity: sha512-WCn5plwp/ezS2RDPQKp0/EXEVRr9/dDexUdRKmsMFqzNM5xBSZ1wbsi3PuMk1VfkMRnI5BuazCsziCWMXRDOlw==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [s390x] os: [linux] libc: [glibc] - '@oxlint/binding-linux-x64-gnu@1.89.0': - resolution: {integrity: sha512-hqjwIj5KOYM8Wjef/p7IruNi1iByLhSzbMBk62y22P/E8q7Jj0Pp+DeUTKTRYyZYCDtU1wEGlnWOnttHbyNIww==} + '@oxlint/binding-linux-x64-gnu@1.93.0': + resolution: {integrity: sha512-F2CGjb9LAkzH+IYTZSzd1klQ1vk5z6Utjax64WeLByCkYXbVDbsun+Oy2hLfW2MDSKCvW+jwy/9ld0EPgdeu+A==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [linux] libc: [glibc] - '@oxlint/binding-linux-x64-musl@1.89.0': - resolution: {integrity: sha512-iAQN3e6o9UgUCcdGwqRx/jYcKbG3HK7ur3rH6lTqVcQeNGZ85AeWIg6cgn/edwFQ0ofEZZItMwkzyCVTahnvEA==} + '@oxlint/binding-linux-x64-musl@1.93.0': + resolution: {integrity: sha512-plf5DE2objcG8Tf7mXRuRa8tT8rzDkpjqXQtKoGsKHWkpgsialbON1+cCtoSEUTVbQUjXvuAm8vV9+3rR0yCBw==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [linux] libc: [musl] - '@oxlint/binding-openharmony-arm64@1.89.0': - resolution: {integrity: sha512-MNxjEByz3N/7Q4qFQuPWvc14TpN9LoD3pECEDsJTZbP/wyB7U+hduUXEl7QAbbgVezFwsb9sWtNUO6XVBndOhg==} + '@oxlint/binding-openharmony-arm64@1.93.0': + resolution: {integrity: sha512-Kp2yJrKvoTe9FfKdO/xwLNUbs2bYTMKx0+aoQD1s0h/Tx0kSgtHSdGmrk8tTKdluosjFbo88qYRIaNIX43AfFw==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [openharmony] - '@oxlint/binding-win32-arm64-msvc@1.89.0': - resolution: {integrity: sha512-xxe+i9wfuFso/VnoL4mfj0UlzE+cfCFiUB06vkXCMyQdgVVmItF5FfAF4tATAktSU6uHruWR+FjqvAT9cHZZzg==} + '@oxlint/binding-win32-arm64-msvc@1.93.0': + resolution: {integrity: sha512-vigjcHCFsR6KjnWTEVfaCxcMYapEuaK9FZa1MpewwQ1S+Xud3v0okfkj1RySsD6RF1NRHIjSlQSalTnKIaj3nA==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [win32] - '@oxlint/binding-win32-ia32-msvc@1.89.0': - resolution: {integrity: sha512-saFy07cO94E664glwgLmKLI40HgTL1PY86y4T6+ud4niX4H0Kdqjcmqmjps7mQNdBytV5guGbXDdyQtRfeLbLA==} + '@oxlint/binding-win32-ia32-msvc@1.93.0': + resolution: {integrity: sha512-0Ot3BEe/AAr2/uQhe55r8CmPlperYk2mQmxdutOru7oU0kir6IiEVHb1TG3GORRlfra97lPHVDLhgmihiKzLrg==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [ia32] os: [win32] - '@oxlint/binding-win32-x64-msvc@1.89.0': - resolution: {integrity: sha512-hLFJ/o0f/dTJh/EW0vmcbREYSQO9tYgfiAAlsOkiLFiJuRRWvYtFELUXN5o2ijpSo/tlO1n+YlWN58tZwPG18A==} + '@oxlint/binding-win32-x64-msvc@1.93.0': + resolution: {integrity: sha512-ZzzIIVs/Qkm8trUWYKF0OYub5ALlv50/3gsEZbKAvWgz+yNJX6uRmQ8ySPXU2Q0/Y9m4JCOjhpmC8XUYbPHX5Q==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [win32] - '@rollup/rollup-android-arm-eabi@4.65.0': - resolution: {integrity: sha512-t2AnVba25baFdq7gczzS13JyVcdubLVbFX1X04mxrggDrTQPUXNv3XM0k9H1hr5tqvg7AVvtQ720QHAj0iYqhg==} + '@rollup/rollup-android-arm-eabi@4.68.3': + resolution: {integrity: sha512-mqfypgH/liYjaSCoPI4erckUcROgZtmFUUmyOJ05oyayi/tVqOEYAzWP7ufqCoCT3xB31Fw4XIVO/jX42hYvKA==} cpu: [arm] os: [android] - '@rollup/rollup-android-arm64@4.65.0': - resolution: {integrity: sha512-dNONUaEwPGhl/nuO2KV8VABWlcjYyU6KtZGN8dQv5OS5JU7JSCxPijVNKXbRJd0iuTzTiJ4TjPt/4bbvDRNiMQ==} + '@rollup/rollup-android-arm64@4.68.3': + resolution: {integrity: sha512-5tY+GC/1gpt79cKS2DQzu6iD824j6BmI4q5Zb6qftZ4kWqIQmvR3DD4eJ2Gclu6/nVMYDk2IVpqxypWOiAuWJg==} cpu: [arm64] os: [android] - '@rollup/rollup-darwin-arm64@4.65.0': - resolution: {integrity: sha512-zWQqUH+9zavr2Bxuzfpuv2SIF3X31cr58TvSQC9o1GhpOvkqRwr60GkZdQcudyT/BEgdpdSafjgd2I13MbTL7g==} + '@rollup/rollup-android-x64@4.68.3': + resolution: {integrity: sha512-nDBcQ/o3PMmGxmAzGBJFn+n1rb83Va9WSdFIq1AHmlEF3tuibVsyJ3kG5x13r7VIy6WI8SvzCdHVNSlSDIdj8w==} + cpu: [x64] + os: [android] + + '@rollup/rollup-darwin-arm64@4.68.3': + resolution: {integrity: sha512-dra5zl0QWKkIkaMgNDNPC19gkMlPAfAf41yWlkGztXMIvUQrX9XWZFQRw7abhH3nks+XZGQpybINAxT2pKdFew==} cpu: [arm64] os: [darwin] - '@rollup/rollup-darwin-x64@4.65.0': - resolution: {integrity: sha512-RQYreBFWtO4//hIuOaZkYUnF/lPU4lz35dveDimDshWCJvVisVtJ/shmT9bkXK8wFJY+FJF89X6F3Cq1qI3LCw==} + '@rollup/rollup-darwin-x64@4.68.3': + resolution: {integrity: sha512-xo5xeo/AjEB/ArzQjGn0JRDZuybZicQ5O3VPfko6ocH1li/qNrN4p5+R/WgjavzRz6UwAOaqsau7VvRQA6i6AA==} cpu: [x64] os: [darwin] - '@rollup/rollup-freebsd-arm64@4.65.0': - resolution: {integrity: sha512-A0NfMj6Cuh/9BE5k3awJKv6HoxFVXIcLAb6SZqAMoxUHPA1ZNNK4RsGuUPD/vL7nEAm9LG+ZzXWWTrnC0XtkpA==} + '@rollup/rollup-freebsd-arm64@4.68.3': + resolution: {integrity: sha512-zdckkcxHDEEKyDbC1t21DeaaiKGymxbkBU9c3zyfaaz+8N96ItJw4nmzHhZF+Mukgt906fnf2tsc90pVyStuHA==} cpu: [arm64] os: [freebsd] - '@rollup/rollup-freebsd-x64@4.65.0': - resolution: {integrity: sha512-BI6/H7q3aP0I7S7GOrjyxTjgEJlSnovXE38+bdxBpuKN6z+d//uF+T+VQ3Q7ltJL/71p17ufartARX9Ja5gOGQ==} + '@rollup/rollup-freebsd-x64@4.68.3': + resolution: {integrity: sha512-9oXqI7g/ycEz7TyicdGBC4sL6PfWMXAx8u15f/nd7lYkCLJd8U8VdBfbpc4SSnRBU/e7aPALve3mhzasGDeCYg==} cpu: [x64] os: [freebsd] - '@rollup/rollup-linux-arm-gnueabihf@4.65.0': - resolution: {integrity: sha512-W1vUprf09RWaVWnsFP1vlUkEWJzTZlpObOEAYZXt9Fq0UVAOYEkeGr7wBX7McKqqIQskXdBnpiOMgwPujordgA==} + '@rollup/rollup-linux-arm-gnueabihf@4.68.3': + resolution: {integrity: sha512-hbgT4NlaOELE3D5UUzSqF+OFgwz4Scvo2SQD9nZJUFjdIsg9Kg3FabQauUxkHKY9N5yjNXfXRRmiKNN4JpLmFA==} cpu: [arm] os: [linux] libc: [glibc] - '@rollup/rollup-linux-arm-musleabihf@4.65.0': - resolution: {integrity: sha512-s8QTcZWgrl9haFzEGIqyE5BWyo89pFDGLMBFZ752WYxk8DJwNU/O1X6pZgPw829d9/sm6CCHyrMP3aurt76p1Q==} + '@rollup/rollup-linux-arm-musleabihf@4.68.3': + resolution: {integrity: sha512-yECcXZ/Bl+JVRhLFgld42rYrXgPdE0LtySGAmmmH6OtkaJM17A4cWG/eCzDymMVb52/jZjW0R54YrTHj4xXlSA==} cpu: [arm] os: [linux] libc: [musl] - '@rollup/rollup-linux-arm64-gnu@4.65.0': - resolution: {integrity: sha512-ke1f6dLRzkqveyjjF2fkEwQYZvxHtNNwjegY8nJrwcO0Bdqr8CzFO/pKE0Bns13cx0qz2Ba2Y0Hs3dSwMdnHxA==} + '@rollup/rollup-linux-arm64-gnu@4.68.3': + resolution: {integrity: sha512-q4Q4/B7wyqM+TFqY5tJYQlaz5+ksGopcRmMeMdu4q6eaPK7N1PymTjIaH5LL32mMJBqIzpRof7BhlYLim5JgNQ==} cpu: [arm64] os: [linux] libc: [glibc] - '@rollup/rollup-linux-arm64-musl@4.65.0': - resolution: {integrity: sha512-926SMeUcy4y18Rz/w2aJiUKOnyAnm6czg72bXkQEaeemsll+Wr0hnsjb2BGRpHvWgwAMYy5ACJCotbvfLCfj0A==} + '@rollup/rollup-linux-arm64-musl@4.68.3': + resolution: {integrity: sha512-Ich3TGl/7GqhQ6G6jVPzgGQGJjd3E5hECxSVanPYchy6Vwcq+WI8wG/gmEMilHNy+ZYCR6U8EN50EejG3TaIgw==} cpu: [arm64] os: [linux] libc: [musl] - '@rollup/rollup-linux-loong64-gnu@4.65.0': - resolution: {integrity: sha512-6T7JNRP1hc4hqF2dUsEoVLOt9K8tmODoCLldtQRYnrddGGQY8Gqe2pM/qMMUo7EMowpP7oa2N95k0/8sYK/ipw==} + '@rollup/rollup-linux-loong64-gnu@4.68.3': + resolution: {integrity: sha512-URBmOhwv4Y0Hi5Hhxc3cmqZLtQlx55DOs5PUhhITDC3zu0qwAfhcNAFAIwAhOUdA6NFVEck07CNZX6cBEs1vTg==} cpu: [loong64] os: [linux] libc: [glibc] - '@rollup/rollup-linux-loong64-musl@4.65.0': - resolution: {integrity: sha512-SImGFl1Je5kpyAgOCPONVT7h6ASV8mAUwGRjY7eZvVjPg//PfHOXgI+P241RF/+HqsA4PP3qD527ysWFKNQyhQ==} + '@rollup/rollup-linux-loong64-musl@4.68.3': + resolution: {integrity: sha512-PTdJXuZplRyaE3ECArlbZubI2LlUHWm0oCipCexnE/8LM+L7qIqUiNbU0piBxt46EB5zxXX+cpmDvHX4Z3WwcQ==} cpu: [loong64] os: [linux] libc: [musl] - '@rollup/rollup-linux-ppc64-gnu@4.65.0': - resolution: {integrity: sha512-XeDTbmPF1Yu5asfXGPrMkWoxTDhgryQbmw5Q1+R582O51VNCk23J6f2pDrsAp5YkneBVBwtExx6ZGOb9D2aQ6A==} + '@rollup/rollup-linux-ppc64-gnu@4.68.3': + resolution: {integrity: sha512-IlSQPDExSm9YdtrWeZIHj87GPXI9lYygRvHVwQ1o9t91JHIiB2CihrvNIASpc/zI28atqm04jS3proaQuaJMww==} cpu: [ppc64] os: [linux] libc: [glibc] - '@rollup/rollup-linux-ppc64-musl@4.65.0': - resolution: {integrity: sha512-VS55JUI/1nsljmV/jfqNkLZXFw8uMO8nNlfoHmSevNf6fO3neuhyDvx9dv3c/Ytt8r/431SL8Qax1dpYvOMZTg==} + '@rollup/rollup-linux-ppc64-musl@4.68.3': + resolution: {integrity: sha512-O2ssyDcBTZkH5v2P/9ZaXJreL0hCKvUA5UwuHn0jCKeMLKi4GhspZJ1I5FT5QsHtJ/dPx4pup7pg/Lw0emeY0Q==} cpu: [ppc64] os: [linux] libc: [musl] - '@rollup/rollup-linux-riscv64-gnu@4.65.0': - resolution: {integrity: sha512-Vblw84TbX7RS4la1Y4+yQ7aore/oSyaNtFbppuBr5Vs/4LfBeXKq9dIfoExw6zOvRERqd2rRAjnZRaMhH/0x5w==} + '@rollup/rollup-linux-riscv64-gnu@4.68.3': + resolution: {integrity: sha512-fesqagxcnc87lH2+aBWne/tFCmQVIGH+YezjY1wQwbUODuTBBlhHoyxju6umwn8LnjHVanjpoeaQdLsXP8JQSQ==} cpu: [riscv64] os: [linux] libc: [glibc] - '@rollup/rollup-linux-riscv64-musl@4.65.0': - resolution: {integrity: sha512-7+gHjtONvKgwR9InTKFaLq53f6YzBJkgeMRBENdWTsQr+spahGqQm8HF5aXpq8i4JaRrOqYyv6Zn1WltDTxaZQ==} + '@rollup/rollup-linux-riscv64-musl@4.68.3': + resolution: {integrity: sha512-WAjFDtLW3HjJ2RAytKoWdFwlK/hW8rJHrjhRZFw14nR+c9JN//WIlSBkyXUjEYCNOFs2sGLNutOEPQG4iVYHgA==} cpu: [riscv64] os: [linux] libc: [musl] - '@rollup/rollup-linux-s390x-gnu@4.65.0': - resolution: {integrity: sha512-KvNDC0J6s4vVHhtJ6KrDXU0Er0au/hmRIBq/+1maCV8TseGupeKizq0bWcrbp2HE1T8xoknvN0Q/KZ/YF0qX3w==} + '@rollup/rollup-linux-s390x-gnu@4.68.3': + resolution: {integrity: sha512-+fZiTeHV/1fy/14dRqE4thjYwUOABL6qQjxElOEQg2oHLkCamO8dxhHphVgD4+pFxtVEUIWxsGVduPtwnAlvbg==} cpu: [s390x] os: [linux] libc: [glibc] - '@rollup/rollup-linux-x64-gnu@4.65.0': - resolution: {integrity: sha512-GExdD15WPvu/x/drELjVam7vX8EsPgvTMOa/iJL/p/4m/oOqzbb7JXZg8fXR4hlXtg/sF2zyTZ3bR0AEtEMlhQ==} + '@rollup/rollup-linux-x64-gnu@4.68.3': + resolution: {integrity: sha512-pfn4Zd9Ic3lEaSwW3GsQhTIDd7929C+eiEkOutsSCT2IHD6rDLblwmMQkgeGOso0oDo9Jk/ERtFdtFr9ElLs+g==} cpu: [x64] os: [linux] libc: [glibc] - '@rollup/rollup-linux-x64-musl@4.65.0': - resolution: {integrity: sha512-8sT9PemIZfIMED4Vd4KGoOXVDj5CMSWNcGdbheRUx9TYS03yOWdT2Q0lXPyEyNBB9YTilwewIQKNIBk6Nxi0Kg==} + '@rollup/rollup-linux-x64-musl@4.68.3': + resolution: {integrity: sha512-eUXzaeNQbKXKNqseL3g/usUqOPmRu+DbQsvwr9MXMdV+VQFUNb9bcWSNAAs/TRV95PCbFK46kLzHEOhFSzujsg==} cpu: [x64] os: [linux] libc: [musl] - '@rollup/rollup-openbsd-x64@4.65.0': - resolution: {integrity: sha512-pO6Ehi0jo5yE0R6PltKhJhv9mlIiyzBJk5N5NUF2OF6xtVKI+1bdXxj/rb0jGXy3hck1ELVT0QPY3tzkAm360w==} + '@rollup/rollup-openbsd-x64@4.68.3': + resolution: {integrity: sha512-OiUclE7QDU4H/hr3ACRHhVGKWl+gNx+6Emignfq0hmNmzzTkZnT79wzB9NXKd0QH16S4t/wVqlAFBfC17nkZ5A==} cpu: [x64] os: [openbsd] - '@rollup/rollup-openharmony-arm64@4.65.0': - resolution: {integrity: sha512-vo7N3/+cjjPDYr8vtxC+qSNgWa9sDvJ7g8N8R5SWqFY4WiNH1ULcAU70SKVyHeiIZOYYwNP9pTipmhN5sl1NPw==} + '@rollup/rollup-openharmony-arm64@4.68.3': + resolution: {integrity: sha512-s6EclDWmk6zvIfk1yixgYthk7xHNx0xu5cEF5RDpS4IHNTpfswRX6xOXVG5cHF5xWn0B6EpDGARhPQ520KTlsA==} cpu: [arm64] os: [openharmony] - '@rollup/rollup-win32-arm64-msvc@4.65.0': - resolution: {integrity: sha512-ArwvgFAbjKcDM7qqotZ4OVYf+UMT9xH2YzkCzK4+AuZSDihMlz1Ekoe4INwBVXzn2mnJzuIYOcSx07iTBijGRQ==} + '@rollup/rollup-win32-arm64-msvc@4.68.3': + resolution: {integrity: sha512-G2xnmxGnU8XHLwtjnnXNRcLrub+Af3nm9VQ1QzL2aEiAL7woBdRgTCZBslJl8umA+YMqdEFpUh9kJB/Vyzk2wQ==} cpu: [arm64] os: [win32] - '@rollup/rollup-win32-ia32-msvc@4.65.0': - resolution: {integrity: sha512-QGMmK4/cxKE/36FoLMSHQBCyymv/eFTnsCvvsBF0rgmOvVbvX78VWZRerL3dHa77f4pM6Xcc2iGDhJ10w/svKQ==} + '@rollup/rollup-win32-ia32-msvc@4.68.3': + resolution: {integrity: sha512-Y/4tApNVrMUYWbAHsyRWJgwuuJOfhTNhA2B04Xpa6+G9btkPZ9kU3XagUKzPTwF3hg36NpQk748JsnoTVho67Q==} cpu: [ia32] os: [win32] - '@rollup/rollup-win32-x64-gnu@4.65.0': - resolution: {integrity: sha512-XfKYFWHIPs4HPODIMsGF1IKlS3H1e3WokUZIgpmn4+uNnZBlnRDDHEylNyazbQXwhMKZre68OjtRYbKqb5+j8w==} + '@rollup/rollup-win32-x64-gnu@4.68.3': + resolution: {integrity: sha512-i2vH/OA5BcW+TdNg12ZTRC4rn+vILaPMP9CvHqnv+QEpMjBHGGNLo4k4EnEqzjYvTD6x1Xark9WhsQbH4bTzUQ==} cpu: [x64] os: [win32] - '@rollup/rollup-win32-x64-msvc@4.65.0': - resolution: {integrity: sha512-wPWi++K4Bs1VR4XihOhfGi4IGX6Cub7FlerTf8X2v+2BtDHddgSqWCXwGD+h2yAe4/niIhNDwAltioOC+wEogQ==} + '@rollup/rollup-win32-x64-msvc@4.68.3': + resolution: {integrity: sha512-ADb1Uz2MNM0sxVpAlMNdQG16Hw4sgW1aqVL7NeqBMpcZeiHb192d7W6shZdMQs33D+w9ihDYBBPsYqqc4MlD8w==} cpu: [x64] os: [win32] - '@types/estree@1.0.9': - resolution: {integrity: sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg==} + '@types/estree@1.0.10': + resolution: {integrity: sha512-lTyOMnOcmRBzdCv6/4zUZCrEhV0xrqQiUZBZtVcbmLHBXKLnN8q89v/wKRF/Q0HbwVsqbIG3o5HDoFl9sduM+g==} - '@types/node@26.6.5': - resolution: {integrity: sha512-uMzsv9stDdofIZBx4UGh4Z9ZgXnGC9seRDscilBcTHAeOFk67MZg/k9bWVfO+bk4qZmG+l52hRnLwUiH2LnJTg==} + '@types/node@26.6.6': + resolution: {integrity: sha512-MzQj+8Kx3XI40OmUAE6Qoh58ZMNstNNMwn2nfd3qWsfe7nDNSqJNzes4njhz6AHwrSHOffSLwXU6yb474Q4aog==} '@types/react@19.3.0': resolution: {integrity: sha512-N0rFCuH9YoxG9/m61l9MfpJKfmLOVU0em7ipIz6TRgSSkvReLB9vL85GB+yr8Bs5leqpvg96JSwF4ZS1s4viQg==} @@ -786,8 +784,8 @@ packages: resolution: {integrity: sha512-BvU8nYgGQBxcmMuEeUEmNTvrMVjJNSH7RgW24vXexN4Ven6qCvy4TntnvlnwnMLTVlcRQQdbRY8NKnaIoeWDNg==} engines: {node: '>=18'} - ansi-regex@6.4.0: - resolution: {integrity: sha512-KzTVk2tCWAHtYrvvvaP8bJKJq2pVinhLcGEQdtLIYPbmNGNyYe8QwNaTUYQp2J7/vIsUKt5QCqAfUkYyG9DkOw==} + ansi-regex@6.6.0: + resolution: {integrity: sha512-XZ5apbzreCbXSKwPjJstu8R0zOi247w3XYwWxtwBXgpZrCyc1Ka7p9/xY0A9/diMewmHbEKz+FIraWaEWjlN5g==} engines: {node: '>=12'} ansi-styles@6.2.3: @@ -839,8 +837,8 @@ packages: resolution: {integrity: sha512-bXfOC4QcT1tKXGorxL3wbJm6XJPDqEnij2gQ2m7ESQuE+/z9YFIWnl/5RpTiKWbMq3EVKR4fRLJGn6DVfu0mpw==} engines: {node: '>=18.20'} - cli-truncate@6.1.1: - resolution: {integrity: sha512-06p9vyLahLa4zkGcgsGxU6iEkSOiuI4fhCH6Emhe2lPAcoUv73n72DnODsnHA+5wwXGnV0n9M9/qOQJSjYhFhw==} + cli-truncate@6.2.0: + resolution: {integrity: sha512-5uyZew3nYoDgyltqSI8OER6DuyecorYOSVDAXl9wQ9Y8Re/HaQ/5qP0HmTUOUQqmvtpB+mlsf1gG/FUS3U1gLQ==} engines: {node: '>=22'} code-excerpt@4.0.0: @@ -873,8 +871,8 @@ packages: resolution: {integrity: sha512-xUtoPkMggbz0MPyPiIWr1Kp4aeWJjDZ6SMvURhimjdZgsRuDplF5/s9hcgGhyXMhs+6vpnuoiZ2kFiu3FMnS8Q==} engines: {node: '>=18'} - es-toolkit@1.53.0: - resolution: {integrity: sha512-3+AYXp9fmJ/UhHBMYj2/U+RaUouMD90SzoItyDOB2Za7W6dB7fQApFGnZPl2MF6K8/Tv1koh1JyirSx/kju6Pw==} + es-toolkit@1.53.2: + resolution: {integrity: sha512-iUqZ+NlwH4jUgRmXZUxFBsV/9762TQEa1O4IXLFBmDEjVHScBytKuseX23I0+v9ShZ5MYxEx6WKNzm6IPnex8g==} esbuild@0.28.2: resolution: {integrity: sha512-HKVLS8dvII+xoKW9kmqxbRKrnWEXfJJr/FZhhJmiqIB0e053QNYFqOBouTMO/k5sID4MvCiUCvv8b9M4h32wIA==} @@ -944,8 +942,8 @@ packages: resolution: {integrity: sha512-34wB/Y7MW7bzjKRjUKTa46I2Z7eV62Rkhva+KkopW7Qvv/OSWBqvkSY7vusOPrNuZcUG3tApvdVgNB8POj3SPw==} engines: {node: '>=10'} - lilconfig@3.1.4: - resolution: {integrity: sha512-zJZyBmQhArDRefuWTypZxwDpFDIYmrj8ypSBvwGD5P13Y95s6DjzKgu4DVdGbeQa5PDEsAOCAPNk4X+QOR006w==} + lilconfig@3.1.5: + resolution: {integrity: sha512-aRAOI9Ia43ygL4o1EOmC/sc/0OFxrm7qcQngiIyWaqVnSnz932ybJ07zyCcgMNGSDP8Yxaf88Xj1zHEXmvQ4SA==} engines: {node: '>=14'} lines-and-columns@1.2.4: @@ -980,12 +978,12 @@ packages: resolution: {integrity: sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==} engines: {node: '>=6'} - oxfmt@0.74.0: - resolution: {integrity: sha512-G4OP7FgwGYZR5ttRpCOOfJdyRsSyvtn34vSXnjDq6Oqed5Dufg5mB44mank+51nAdHOKuTJ0lj0mksY7L+N61A==} + oxfmt@0.78.0: + resolution: {integrity: sha512-uagX+70mKqh/YqxB6ON/lkxVPH6E1Z7pfP2x6XVRPPyiDCZtX6o1xIEeXAIXJ/2wA5ViX4RFuW+IAQn85yJdWg==} engines: {node: ^20.19.0 || >=22.12.0} hasBin: true peerDependencies: - '@astrojs/compiler-rs': ^0.4.0 || ^0.5.0 + '@astrojs/compiler-rs': ^0.5.0 svelte: ^5.0.0 vite-plus: '*' peerDependenciesMeta: @@ -996,12 +994,12 @@ packages: vite-plus: optional: true - oxlint@1.89.0: - resolution: {integrity: sha512-a25hkfo61okGPvJz432fRIPoxlKtNnOVy9w4rzrmGgNm4iVTPwpSQlmdqNWnp6p9QyyPVfAZRgnf5XvSBZFk/A==} + oxlint@1.93.0: + resolution: {integrity: sha512-19JMsQFX+YvEbcUTFQxjTwhvs0Ibg0D6CFneSLgpwnACWcY/6LjhpGpkPodh0T5aIT1pjMTLlYaeBFzaVgugTA==} engines: {node: ^20.19.0 || >=22.12.0} hasBin: true peerDependencies: - oxlint-tsgolint: '>=7.0.2003' + oxlint-tsgolint: '>=7.0.2005' vite-plus: '*' peerDependenciesMeta: oxlint-tsgolint: @@ -1074,8 +1072,8 @@ packages: resolution: {integrity: sha512-I9fPXU9geO9bHOt9pHHOhOkYerIMsmVaWB0rA2AI9ERh/+x/i7MV5HKBNrg+ljO5eoPVgCcnFuRjJ9uH6I/3eg==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - rollup@4.65.0: - resolution: {integrity: sha512-QVCvQUTGDN6JRwi3jVGCY3H4aTHvi9rX0LyoBMkGUvdh/Z6O51CzcLz85BWZaTCDGhl6ySGqYZs+xI1jmPqGcw==} + rollup@4.68.3: + resolution: {integrity: sha512-wd2gavj7CEQv52rdcVqfUupO/KPIKcoJKxyFWl4cOqYZGMQEOSijJRkliz0dRa7gpkj/h4TRqyWa+dJJi6T0OA==} engines: {node: '>=18.0.0', npm: '>=8.0.0'} hasBin: true @@ -1085,8 +1083,8 @@ packages: signal-exit@3.0.7: resolution: {integrity: sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==} - slice-ansi@9.0.1: - resolution: {integrity: sha512-aBY19bn/XA+hKOKX0qL7Z0UfdBsbQvc9hn993U8ALUjzxCvDcuZqLoRXjGJrUARWAlwMnsRVD9sw2AFNOYvalA==} + slice-ansi@10.0.1: + resolution: {integrity: sha512-CJKEH3zwVX4bOnE+bFbmh+JK/YMT9VAazqBsVBTesnYKXlNtz6oVmrhNp1jHrxHzscuUkWiKZpzNzFraZcrorg==} engines: {node: '>=22'} source-map-js@1.2.2: @@ -1191,8 +1189,8 @@ packages: resolution: {integrity: sha512-6OLRNZqRntVGBm26ghZ5eZhCuWWyOkRCSn8XsOIuq5stpCE/tjLbdozd93naILZig0lmD8ANfRwnhn0DLeXGlg==} engines: {node: '>=20'} - ws@8.22.0: - resolution: {integrity: sha512-Ydggc987+RO0AnWtZ/7Wq9FtNvcrL1b/RO0ud9mWjUPgDrsAAwQSF51sm2hm1XofbU/4jkpGEsLFsZZxU+1DOg==} + ws@8.23.0: + resolution: {integrity: sha512-wCkmX8QMOrKjgO8HW2WyDbTSGeqkocxgDzS9iR79rEAexty6/2qzilx3Ag8Tqf9ykop3irLKle0MtVn5qjVnoQ==} engines: {node: '>=10.0.0'} peerDependencies: bufferutil: ^4.0.1 @@ -1304,210 +1302,210 @@ snapshots: '@jridgewell/sourcemap-codec': 1.6.0 '@jridgewell/trace-mapping': 0.3.31 - '@jridgewell/resolve-uri@3.1.2': {} + '@jridgewell/resolve-uri@3.1.3': {} '@jridgewell/sourcemap-codec@1.6.0': {} '@jridgewell/trace-mapping@0.3.31': dependencies: - '@jridgewell/resolve-uri': 3.1.2 + '@jridgewell/resolve-uri': 3.1.3 '@jridgewell/sourcemap-codec': 1.6.0 - '@napi-rs/lzma-linux-x64-gnu@1.5.1': + '@oxfmt/binding-android-arm-eabi@0.78.0': optional: true - '@oxfmt/binding-android-arm-eabi@0.74.0': + '@oxfmt/binding-android-arm64@0.78.0': optional: true - '@oxfmt/binding-android-arm64@0.74.0': + '@oxfmt/binding-darwin-arm64@0.78.0': optional: true - '@oxfmt/binding-darwin-arm64@0.74.0': + '@oxfmt/binding-darwin-x64@0.78.0': optional: true - '@oxfmt/binding-darwin-x64@0.74.0': + '@oxfmt/binding-freebsd-x64@0.78.0': optional: true - '@oxfmt/binding-freebsd-x64@0.74.0': + '@oxfmt/binding-linux-arm-gnueabihf@0.78.0': optional: true - '@oxfmt/binding-linux-arm-gnueabihf@0.74.0': + '@oxfmt/binding-linux-arm-musleabihf@0.78.0': optional: true - '@oxfmt/binding-linux-arm-musleabihf@0.74.0': + '@oxfmt/binding-linux-arm64-gnu@0.78.0': optional: true - '@oxfmt/binding-linux-arm64-gnu@0.74.0': + '@oxfmt/binding-linux-arm64-musl@0.78.0': optional: true - '@oxfmt/binding-linux-arm64-musl@0.74.0': + '@oxfmt/binding-linux-ppc64-gnu@0.78.0': optional: true - '@oxfmt/binding-linux-ppc64-gnu@0.74.0': + '@oxfmt/binding-linux-riscv64-gnu@0.78.0': optional: true - '@oxfmt/binding-linux-riscv64-gnu@0.74.0': + '@oxfmt/binding-linux-riscv64-musl@0.78.0': optional: true - '@oxfmt/binding-linux-riscv64-musl@0.74.0': + '@oxfmt/binding-linux-s390x-gnu@0.78.0': optional: true - '@oxfmt/binding-linux-s390x-gnu@0.74.0': + '@oxfmt/binding-linux-x64-gnu@0.78.0': optional: true - '@oxfmt/binding-linux-x64-gnu@0.74.0': + '@oxfmt/binding-linux-x64-musl@0.78.0': optional: true - '@oxfmt/binding-linux-x64-musl@0.74.0': + '@oxfmt/binding-openharmony-arm64@0.78.0': optional: true - '@oxfmt/binding-openharmony-arm64@0.74.0': + '@oxfmt/binding-win32-arm64-msvc@0.78.0': optional: true - '@oxfmt/binding-win32-arm64-msvc@0.74.0': + '@oxfmt/binding-win32-ia32-msvc@0.78.0': optional: true - '@oxfmt/binding-win32-ia32-msvc@0.74.0': + '@oxfmt/binding-win32-x64-msvc@0.78.0': optional: true - '@oxfmt/binding-win32-x64-msvc@0.74.0': + '@oxlint/binding-android-arm-eabi@1.93.0': optional: true - '@oxlint/binding-android-arm-eabi@1.89.0': + '@oxlint/binding-android-arm64@1.93.0': optional: true - '@oxlint/binding-android-arm64@1.89.0': + '@oxlint/binding-darwin-arm64@1.93.0': optional: true - '@oxlint/binding-darwin-arm64@1.89.0': + '@oxlint/binding-darwin-x64@1.93.0': optional: true - '@oxlint/binding-darwin-x64@1.89.0': + '@oxlint/binding-freebsd-x64@1.93.0': optional: true - '@oxlint/binding-freebsd-x64@1.89.0': + '@oxlint/binding-linux-arm-gnueabihf@1.93.0': optional: true - '@oxlint/binding-linux-arm-gnueabihf@1.89.0': + '@oxlint/binding-linux-arm-musleabihf@1.93.0': optional: true - '@oxlint/binding-linux-arm-musleabihf@1.89.0': + '@oxlint/binding-linux-arm64-gnu@1.93.0': optional: true - '@oxlint/binding-linux-arm64-gnu@1.89.0': + '@oxlint/binding-linux-arm64-musl@1.93.0': optional: true - '@oxlint/binding-linux-arm64-musl@1.89.0': + '@oxlint/binding-linux-ppc64-gnu@1.93.0': optional: true - '@oxlint/binding-linux-ppc64-gnu@1.89.0': + '@oxlint/binding-linux-riscv64-gnu@1.93.0': optional: true - '@oxlint/binding-linux-riscv64-gnu@1.89.0': + '@oxlint/binding-linux-riscv64-musl@1.93.0': optional: true - '@oxlint/binding-linux-riscv64-musl@1.89.0': + '@oxlint/binding-linux-s390x-gnu@1.93.0': optional: true - '@oxlint/binding-linux-s390x-gnu@1.89.0': + '@oxlint/binding-linux-x64-gnu@1.93.0': optional: true - '@oxlint/binding-linux-x64-gnu@1.89.0': + '@oxlint/binding-linux-x64-musl@1.93.0': optional: true - '@oxlint/binding-linux-x64-musl@1.89.0': + '@oxlint/binding-openharmony-arm64@1.93.0': optional: true - '@oxlint/binding-openharmony-arm64@1.89.0': + '@oxlint/binding-win32-arm64-msvc@1.93.0': optional: true - '@oxlint/binding-win32-arm64-msvc@1.89.0': + '@oxlint/binding-win32-ia32-msvc@1.93.0': optional: true - '@oxlint/binding-win32-ia32-msvc@1.89.0': + '@oxlint/binding-win32-x64-msvc@1.93.0': optional: true - '@oxlint/binding-win32-x64-msvc@1.89.0': + '@rollup/rollup-android-arm-eabi@4.68.3': optional: true - '@rollup/rollup-android-arm-eabi@4.65.0': + '@rollup/rollup-android-arm64@4.68.3': optional: true - '@rollup/rollup-android-arm64@4.65.0': + '@rollup/rollup-android-x64@4.68.3': optional: true - '@rollup/rollup-darwin-arm64@4.65.0': + '@rollup/rollup-darwin-arm64@4.68.3': optional: true - '@rollup/rollup-darwin-x64@4.65.0': + '@rollup/rollup-darwin-x64@4.68.3': optional: true - '@rollup/rollup-freebsd-arm64@4.65.0': + '@rollup/rollup-freebsd-arm64@4.68.3': optional: true - '@rollup/rollup-freebsd-x64@4.65.0': + '@rollup/rollup-freebsd-x64@4.68.3': optional: true - '@rollup/rollup-linux-arm-gnueabihf@4.65.0': + '@rollup/rollup-linux-arm-gnueabihf@4.68.3': optional: true - '@rollup/rollup-linux-arm-musleabihf@4.65.0': + '@rollup/rollup-linux-arm-musleabihf@4.68.3': optional: true - '@rollup/rollup-linux-arm64-gnu@4.65.0': + '@rollup/rollup-linux-arm64-gnu@4.68.3': optional: true - '@rollup/rollup-linux-arm64-musl@4.65.0': + '@rollup/rollup-linux-arm64-musl@4.68.3': optional: true - '@rollup/rollup-linux-loong64-gnu@4.65.0': + '@rollup/rollup-linux-loong64-gnu@4.68.3': optional: true - '@rollup/rollup-linux-loong64-musl@4.65.0': + '@rollup/rollup-linux-loong64-musl@4.68.3': optional: true - '@rollup/rollup-linux-ppc64-gnu@4.65.0': + '@rollup/rollup-linux-ppc64-gnu@4.68.3': optional: true - '@rollup/rollup-linux-ppc64-musl@4.65.0': + '@rollup/rollup-linux-ppc64-musl@4.68.3': optional: true - '@rollup/rollup-linux-riscv64-gnu@4.65.0': + '@rollup/rollup-linux-riscv64-gnu@4.68.3': optional: true - '@rollup/rollup-linux-riscv64-musl@4.65.0': + '@rollup/rollup-linux-riscv64-musl@4.68.3': optional: true - '@rollup/rollup-linux-s390x-gnu@4.65.0': + '@rollup/rollup-linux-s390x-gnu@4.68.3': optional: true - '@rollup/rollup-linux-x64-gnu@4.65.0': + '@rollup/rollup-linux-x64-gnu@4.68.3': optional: true - '@rollup/rollup-linux-x64-musl@4.65.0': + '@rollup/rollup-linux-x64-musl@4.68.3': optional: true - '@rollup/rollup-openbsd-x64@4.65.0': + '@rollup/rollup-openbsd-x64@4.68.3': optional: true - '@rollup/rollup-openharmony-arm64@4.65.0': + '@rollup/rollup-openharmony-arm64@4.68.3': optional: true - '@rollup/rollup-win32-arm64-msvc@4.65.0': + '@rollup/rollup-win32-arm64-msvc@4.68.3': optional: true - '@rollup/rollup-win32-ia32-msvc@4.65.0': + '@rollup/rollup-win32-ia32-msvc@4.68.3': optional: true - '@rollup/rollup-win32-x64-gnu@4.65.0': + '@rollup/rollup-win32-x64-gnu@4.68.3': optional: true - '@rollup/rollup-win32-x64-msvc@4.65.0': + '@rollup/rollup-win32-x64-msvc@4.68.3': optional: true - '@types/estree@1.0.9': {} + '@types/estree@1.0.10': {} - '@types/node@26.6.5': + '@types/node@26.6.6': dependencies: undici-types: 8.9.0 @@ -1517,7 +1515,7 @@ snapshots: '@types/ws@8.18.2': dependencies: - '@types/node': 26.6.5 + '@types/node': 26.6.6 '@typescript/typescript-aix-ppc64@7.0.2': optional: true @@ -1585,7 +1583,7 @@ snapshots: dependencies: environment: 1.1.0 - ansi-regex@6.4.0: {} + ansi-regex@6.6.0: {} ansi-styles@6.2.3: {} @@ -1618,9 +1616,9 @@ snapshots: cli-spinners@3.4.0: {} - cli-truncate@6.1.1: + cli-truncate@6.2.0: dependencies: - slice-ansi: 9.0.1 + slice-ansi: 10.0.1 string-width: 8.3.0 code-excerpt@4.0.0: @@ -1641,7 +1639,7 @@ snapshots: environment@1.1.0: {} - es-toolkit@1.53.0: {} + es-toolkit@1.53.2: {} esbuild@0.28.2: optionalDependencies: @@ -1686,7 +1684,7 @@ snapshots: dependencies: magic-string: 0.30.21 mlly: 1.8.2 - rollup: 4.65.0 + rollup: 4.68.3 fsevents@2.3.3: optional: true @@ -1704,9 +1702,9 @@ snapshots: chalk: 6.0.1 cli-boxes: 4.0.1 cli-cursor: 4.0.0 - cli-truncate: 6.1.1 + cli-truncate: 6.2.0 code-excerpt: 4.0.0 - es-toolkit: 1.53.0 + es-toolkit: 1.53.2 indent-string: 5.0.0 is-in-ci: 2.0.0 patch-console: 2.0.0 @@ -1734,7 +1732,7 @@ snapshots: joycon@3.1.1: {} - lilconfig@3.1.4: {} + lilconfig@3.1.5: {} lines-and-columns@1.2.4: {} @@ -1767,51 +1765,51 @@ snapshots: dependencies: mimic-fn: 2.1.0 - oxfmt@0.74.0: + oxfmt@0.78.0: dependencies: tinypool: 2.2.0 optionalDependencies: - '@oxfmt/binding-android-arm-eabi': 0.74.0 - '@oxfmt/binding-android-arm64': 0.74.0 - '@oxfmt/binding-darwin-arm64': 0.74.0 - '@oxfmt/binding-darwin-x64': 0.74.0 - '@oxfmt/binding-freebsd-x64': 0.74.0 - '@oxfmt/binding-linux-arm-gnueabihf': 0.74.0 - '@oxfmt/binding-linux-arm-musleabihf': 0.74.0 - '@oxfmt/binding-linux-arm64-gnu': 0.74.0 - '@oxfmt/binding-linux-arm64-musl': 0.74.0 - '@oxfmt/binding-linux-ppc64-gnu': 0.74.0 - '@oxfmt/binding-linux-riscv64-gnu': 0.74.0 - '@oxfmt/binding-linux-riscv64-musl': 0.74.0 - '@oxfmt/binding-linux-s390x-gnu': 0.74.0 - '@oxfmt/binding-linux-x64-gnu': 0.74.0 - '@oxfmt/binding-linux-x64-musl': 0.74.0 - '@oxfmt/binding-openharmony-arm64': 0.74.0 - '@oxfmt/binding-win32-arm64-msvc': 0.74.0 - '@oxfmt/binding-win32-ia32-msvc': 0.74.0 - '@oxfmt/binding-win32-x64-msvc': 0.74.0 - - oxlint@1.89.0: + '@oxfmt/binding-android-arm-eabi': 0.78.0 + '@oxfmt/binding-android-arm64': 0.78.0 + '@oxfmt/binding-darwin-arm64': 0.78.0 + '@oxfmt/binding-darwin-x64': 0.78.0 + '@oxfmt/binding-freebsd-x64': 0.78.0 + '@oxfmt/binding-linux-arm-gnueabihf': 0.78.0 + '@oxfmt/binding-linux-arm-musleabihf': 0.78.0 + '@oxfmt/binding-linux-arm64-gnu': 0.78.0 + '@oxfmt/binding-linux-arm64-musl': 0.78.0 + '@oxfmt/binding-linux-ppc64-gnu': 0.78.0 + '@oxfmt/binding-linux-riscv64-gnu': 0.78.0 + '@oxfmt/binding-linux-riscv64-musl': 0.78.0 + '@oxfmt/binding-linux-s390x-gnu': 0.78.0 + '@oxfmt/binding-linux-x64-gnu': 0.78.0 + '@oxfmt/binding-linux-x64-musl': 0.78.0 + '@oxfmt/binding-openharmony-arm64': 0.78.0 + '@oxfmt/binding-win32-arm64-msvc': 0.78.0 + '@oxfmt/binding-win32-ia32-msvc': 0.78.0 + '@oxfmt/binding-win32-x64-msvc': 0.78.0 + + oxlint@1.93.0: optionalDependencies: - '@oxlint/binding-android-arm-eabi': 1.89.0 - '@oxlint/binding-android-arm64': 1.89.0 - '@oxlint/binding-darwin-arm64': 1.89.0 - '@oxlint/binding-darwin-x64': 1.89.0 - '@oxlint/binding-freebsd-x64': 1.89.0 - '@oxlint/binding-linux-arm-gnueabihf': 1.89.0 - '@oxlint/binding-linux-arm-musleabihf': 1.89.0 - '@oxlint/binding-linux-arm64-gnu': 1.89.0 - '@oxlint/binding-linux-arm64-musl': 1.89.0 - '@oxlint/binding-linux-ppc64-gnu': 1.89.0 - '@oxlint/binding-linux-riscv64-gnu': 1.89.0 - '@oxlint/binding-linux-riscv64-musl': 1.89.0 - '@oxlint/binding-linux-s390x-gnu': 1.89.0 - '@oxlint/binding-linux-x64-gnu': 1.89.0 - '@oxlint/binding-linux-x64-musl': 1.89.0 - '@oxlint/binding-openharmony-arm64': 1.89.0 - '@oxlint/binding-win32-arm64-msvc': 1.89.0 - '@oxlint/binding-win32-ia32-msvc': 1.89.0 - '@oxlint/binding-win32-x64-msvc': 1.89.0 + '@oxlint/binding-android-arm-eabi': 1.93.0 + '@oxlint/binding-android-arm64': 1.93.0 + '@oxlint/binding-darwin-arm64': 1.93.0 + '@oxlint/binding-darwin-x64': 1.93.0 + '@oxlint/binding-freebsd-x64': 1.93.0 + '@oxlint/binding-linux-arm-gnueabihf': 1.93.0 + '@oxlint/binding-linux-arm-musleabihf': 1.93.0 + '@oxlint/binding-linux-arm64-gnu': 1.93.0 + '@oxlint/binding-linux-arm64-musl': 1.93.0 + '@oxlint/binding-linux-ppc64-gnu': 1.93.0 + '@oxlint/binding-linux-riscv64-gnu': 1.93.0 + '@oxlint/binding-linux-riscv64-musl': 1.93.0 + '@oxlint/binding-linux-s390x-gnu': 1.93.0 + '@oxlint/binding-linux-x64-gnu': 1.93.0 + '@oxlint/binding-linux-x64-musl': 1.93.0 + '@oxlint/binding-openharmony-arm64': 1.93.0 + '@oxlint/binding-win32-arm64-msvc': 1.93.0 + '@oxlint/binding-win32-ia32-msvc': 1.93.0 + '@oxlint/binding-win32-x64-msvc': 1.93.0 patch-console@2.0.0: {} @@ -1831,7 +1829,7 @@ snapshots: postcss-load-config@6.0.1(tsx@4.23.15): dependencies: - lilconfig: 3.1.4 + lilconfig: 3.1.5 optionalDependencies: tsx: 4.23.15 @@ -1853,46 +1851,46 @@ snapshots: onetime: 5.1.2 signal-exit: 3.0.7 - rollup@4.65.0: + rollup@4.68.3: dependencies: - '@types/estree': 1.0.9 + '@types/estree': 1.0.10 optionalDependencies: - '@napi-rs/lzma-linux-x64-gnu': 1.5.1 - '@rollup/rollup-android-arm-eabi': 4.65.0 - '@rollup/rollup-android-arm64': 4.65.0 - '@rollup/rollup-darwin-arm64': 4.65.0 - '@rollup/rollup-darwin-x64': 4.65.0 - '@rollup/rollup-freebsd-arm64': 4.65.0 - '@rollup/rollup-freebsd-x64': 4.65.0 - '@rollup/rollup-linux-arm-gnueabihf': 4.65.0 - '@rollup/rollup-linux-arm-musleabihf': 4.65.0 - '@rollup/rollup-linux-arm64-gnu': 4.65.0 - '@rollup/rollup-linux-arm64-musl': 4.65.0 - '@rollup/rollup-linux-loong64-gnu': 4.65.0 - '@rollup/rollup-linux-loong64-musl': 4.65.0 - '@rollup/rollup-linux-ppc64-gnu': 4.65.0 - '@rollup/rollup-linux-ppc64-musl': 4.65.0 - '@rollup/rollup-linux-riscv64-gnu': 4.65.0 - '@rollup/rollup-linux-riscv64-musl': 4.65.0 - '@rollup/rollup-linux-s390x-gnu': 4.65.0 - '@rollup/rollup-linux-x64-gnu': 4.65.0 - '@rollup/rollup-linux-x64-musl': 4.65.0 - '@rollup/rollup-openbsd-x64': 4.65.0 - '@rollup/rollup-openharmony-arm64': 4.65.0 - '@rollup/rollup-win32-arm64-msvc': 4.65.0 - '@rollup/rollup-win32-ia32-msvc': 4.65.0 - '@rollup/rollup-win32-x64-gnu': 4.65.0 - '@rollup/rollup-win32-x64-msvc': 4.65.0 + '@rollup/rollup-android-arm-eabi': 4.68.3 + '@rollup/rollup-android-arm64': 4.68.3 + '@rollup/rollup-android-x64': 4.68.3 + '@rollup/rollup-darwin-arm64': 4.68.3 + '@rollup/rollup-darwin-x64': 4.68.3 + '@rollup/rollup-freebsd-arm64': 4.68.3 + '@rollup/rollup-freebsd-x64': 4.68.3 + '@rollup/rollup-linux-arm-gnueabihf': 4.68.3 + '@rollup/rollup-linux-arm-musleabihf': 4.68.3 + '@rollup/rollup-linux-arm64-gnu': 4.68.3 + '@rollup/rollup-linux-arm64-musl': 4.68.3 + '@rollup/rollup-linux-loong64-gnu': 4.68.3 + '@rollup/rollup-linux-loong64-musl': 4.68.3 + '@rollup/rollup-linux-ppc64-gnu': 4.68.3 + '@rollup/rollup-linux-ppc64-musl': 4.68.3 + '@rollup/rollup-linux-riscv64-gnu': 4.68.3 + '@rollup/rollup-linux-riscv64-musl': 4.68.3 + '@rollup/rollup-linux-s390x-gnu': 4.68.3 + '@rollup/rollup-linux-x64-gnu': 4.68.3 + '@rollup/rollup-linux-x64-musl': 4.68.3 + '@rollup/rollup-openbsd-x64': 4.68.3 + '@rollup/rollup-openharmony-arm64': 4.68.3 + '@rollup/rollup-win32-arm64-msvc': 4.68.3 + '@rollup/rollup-win32-ia32-msvc': 4.68.3 + '@rollup/rollup-win32-x64-gnu': 4.68.3 + '@rollup/rollup-win32-x64-msvc': 4.68.3 fsevents: 2.3.3 scheduler@0.28.0: {} signal-exit@3.0.7: {} - slice-ansi@9.0.1: + slice-ansi@10.0.1: dependencies: - ansi-styles: 6.2.3 - is-fullwidth-code-point: 5.1.0 + ansi-styles: 7.0.0 + string-width: 8.3.0 source-map-js@1.2.2: {} @@ -1907,7 +1905,7 @@ snapshots: strip-ansi@7.2.0: dependencies: - ansi-regex: 6.4.0 + ansi-regex: 6.6.0 sucrase@3.35.1: dependencies: @@ -1957,7 +1955,7 @@ snapshots: picocolors: 1.1.1 postcss-load-config: 6.0.1(tsx@4.23.15) resolve-from: 5.0.0 - rollup: 4.65.0 + rollup: 4.68.3 source-map-js: 1.2.2 sucrase: 3.35.1 tinyexec: 1.3.1 @@ -2016,6 +2014,6 @@ snapshots: ansi-styles: 6.2.3 string-width: 8.3.0 - ws@8.22.0: {} + ws@8.23.0: {} yoga-layout@3.2.1: {} diff --git a/src/app/live-app.tsx b/src/app/live-app.tsx index e8ca2c1..2a69ead 100644 --- a/src/app/live-app.tsx +++ b/src/app/live-app.tsx @@ -8,30 +8,40 @@ import { type TranscriptionController, type TranscriptionSnapshot, } from "#/lib/transcription.js"; -import { copyWithFallback } from "#/lib/clipboard.js"; import { deleteApiKey, loadApiKey, saveApiKey } from "#/lib/api-key.js"; import { errorMessage } from "#/lib/errors.js"; import { openJournal } from "#/lib/journal.js"; import { - DEFAULT_LANGUAGE_HINTS, languageHintLabel, normalizeLanguageHints, + translationLabel, type SttLanguage, } from "#/lib/languages.js"; import { listMicrophones } from "#/lib/microphones.js"; import { regionLabel, resolveRegion } from "#/lib/region.js"; -import { saveSettings, loadSettings } from "#/lib/settings.js"; +import { fitTerms, saveSettings, loadSettings } from "#/lib/settings.js"; import { STT_MODEL } from "#/lib/soniox.js"; import { verifyApiKey } from "#/lib/verify-key.js"; -import type { CliSettings, Microphone, SttRegion } from "#/lib/types.js"; +import type { CliSettings, Journal, Microphone, SttRegion } from "#/lib/types.js"; import { quit } from "#/app/runtime.js"; import { printSessionEnd } from "#/app/session-end.js"; import { CaptionScreen, type CaptionOverlay } from "#/screens/caption.js"; import { KeySetup } from "#/screens/key-setup.js"; +import { LanguageSelect } from "#/components/language-select.js"; import { MicrophoneSelect } from "#/components/microphone-select.js"; import { RegionSelect } from "#/screens/region-select.js"; -type LivePhase = "boot" | "region-select" | "key-setup" | "mic-select" | "live" | "ended" | "fatal"; +type LivePhase = + | "boot" + | "region-select" + | "key-setup" + | "mic-select" + | "language-select" + | "live" + | "ended" + | "fatal"; + +type LiveStart = { region: SttRegion; apiKey: string; deviceName?: string }; const CLOSED_OVERLAY: CaptionOverlay = { kind: "none" }; @@ -49,7 +59,7 @@ function FatalScreen(props: { message: string; onQuit: () => void }) { type SettingsOverlay = Extract; -export function LiveApp() { +export function LiveApp(props: { languages?: SttLanguage[]; translation?: SttLanguage[] }) { const [phase, setPhase] = useState("boot"); const [verifying, setVerifying] = useState(false); const [keyError, setKeyError] = useState(); @@ -62,14 +72,23 @@ export function LiveApp() { const [fatalMessage, setFatalMessage] = useState("Unknown error"); const [region, setRegion] = useState("us"); const [finishing, setFinishing] = useState(false); + const [warning, setWarning] = useState(); const controllerRef = useRef(null); - const languageHintsRef = useRef([...DEFAULT_LANGUAGE_HINTS]); + const journalRef = useRef(null); + // Session options read once at boot; the controller owns them afterwards (see snapshot). + const languageHintsRef = useRef([]); + const termsRef = useRef([]); + const translationRef = useRef([]); // Invalidate in-flight overlay loads when the overlay closes or is replaced. const overlayEpochRef = useRef(0); const finish = () => { - quit(journalPath === null ? undefined : () => printSessionEnd(journalPath)); + quit( + journalPath === null + ? undefined + : () => printSessionEnd({ path: journalPath, writeError: journalRef.current?.writeError }), + ); }; // Ctrl+C, or ESC confirmed on the caption screen, ends the session and keeps the path on screen. @@ -77,10 +96,6 @@ export function LiveApp() { const sessionEndedRef = useRef(false); const exitStartedRef = useRef(false); - const copyJournalPath = () => { - if (journalPath !== null) copyWithFallback(journalPath); - }; - const closeOverlay = () => { overlayEpochRef.current += 1; setOverlay(CLOSED_OVERLAY); @@ -103,7 +118,6 @@ export function LiveApp() { } sessionEndedRef.current = true; - copyJournalPath(); closeOverlay(); setPhase("ended"); @@ -115,17 +129,22 @@ export function LiveApp() { }; useInterrupt(requestExit); - async function startLive({ - region: liveRegion, - apiKey, - deviceName, - }: { - region: SttRegion; - apiKey: string; - deviceName?: string; - }) { + // First run: ask which languages people speak before streaming, since the system locale is + // often English even for people who talk in another language. + const askLanguagesRef = useRef(false); + const [suggestedLanguages, setSuggestedLanguages] = useState([]); + const [languageStart, setLanguageStart] = useState(null); + + async function startLive(start: LiveStart) { + if (askLanguagesRef.current) { + setLanguageStart(start); + setPhase("language-select"); + return; + } + const { region: liveRegion, apiKey, deviceName } = start; try { - const journal = openJournal(STT_MODEL); + const journal = openJournal({ model: STT_MODEL, onWriteError: setWarning }); + journalRef.current = journal; setJournalPath(journal.path); const controller = createTranscription({ @@ -135,6 +154,8 @@ export function LiveApp() { clientReferenceId: journal.id, region: liveRegion, languageHints: languageHintsRef.current, + terms: termsRef.current, + translation: translationRef.current, onSnapshot: setSnapshot, onFatal: failFatal, }); @@ -170,7 +191,12 @@ export function LiveApp() { const boot = useEffectEvent(async (settings: CliSettings) => { const savedRegion = resolveRegion(settings); setRegion(savedRegion); - languageHintsRef.current = normalizeLanguageHints(settings.languages); + // --lang and --translate apply to this run only; picking them in settings still saves them. + languageHintsRef.current = props.languages ?? normalizeLanguageHints(settings.languages); + askLanguagesRef.current = props.languages === undefined && settings.languages === undefined; + setSuggestedLanguages(languageHintsRef.current); + termsRef.current = fitTerms(settings.terms ?? []); + translationRef.current = props.translation ?? settings.translation ?? []; const apiKey = await loadApiKey(savedRegion); if (apiKey === null) { setPhase("region-select"); @@ -204,6 +230,7 @@ export function LiveApp() { void saveSettings({ region: next }); setPhase("key-setup"); }} + onCancel={requestExit} /> ); } @@ -214,6 +241,10 @@ export function LiveApp() { error={keyError} verifying={verifying} regionLabel={regionLabel(region)} + onBack={() => { + setKeyError(undefined); + setPhase("region-select"); + }} onSubmit={(key) => { setVerifying(true); setKeyError(undefined); @@ -221,7 +252,7 @@ export function LiveApp() { const result = await verifyApiKey({ key: key.trim(), region }); if (!result.ok) { setKeyError( - `${result.message}\nIf the region is wrong, press ESC to quit, then change it with 'earpop settings'.`, + `${result.message}\nIf the region is wrong, press ESC to pick another region.`, ); setVerifying(false); return; @@ -246,26 +277,51 @@ export function LiveApp() { return ( Choose a microphone - {micNotice !== undefined ? ( - {micNotice} - ) : ( - { - setPhase("boot"); - void (async () => { - await saveSettings({ microphone: name }); - const apiKey = await loadApiKey(region); - if (apiKey === null) { - setPhase("region-select"); - return; - } - await startLive({ region, apiKey, deviceName: name }); - })().catch((error: unknown) => failFatal(errorMessage(error))); - }} - /> - )} + {micNotice !== undefined && {micNotice}} + { + setPhase("boot"); + void (async () => { + await saveSettings({ microphone: name }); + const apiKey = await loadApiKey(region); + if (apiKey === null) { + setPhase("region-select"); + return; + } + await startLive({ region, apiKey, deviceName: name }); + })().catch((error: unknown) => failFatal(errorMessage(error))); + }} + /> + + ); + } + + if (phase === "language-select" && languageStart !== null) { + return ( + + Which languages will people speak? + { + languageHintsRef.current = codes; + askLanguagesRef.current = false; + setPhase("boot"); + void saveSettings({ languages: codes }) + .catch((error: unknown) => + setWarning( + `Could not save languages (${errorMessage(error)}); earpop will ask again next time`, + ), + ) + .then(() => startLive(languageStart)); + }} + /> ); } @@ -288,13 +344,12 @@ export function LiveApp() { controllerRef.current?.getHistory() ?? []} onTogglePause={() => { - // Pause copies the transcript path to the clipboard on enter. - if (snapshot.state !== "paused") copyJournalPath(); void controllerRef.current?.togglePause(); }} onQuit={requestExit} @@ -324,7 +379,8 @@ export function LiveApp() { microphonesLoading: true, currentMicrophone: snapshot.device, region, - languages: languageHintsRef.current, + languages: snapshot.languages, + translation: snapshot.translation, hasApiKey: true, }); void (async () => { @@ -339,8 +395,9 @@ export function LiveApp() { microphonesLoading: false, currentMicrophone: settings.microphone ?? snapshot.device, region: resolved, - // Live session hints are source of truth while connected. - languages: languageHintsRef.current, + // The controller owns languages and translation while connected. + languages: snapshot.languages, + translation: snapshot.translation, hasApiKey: key !== null, }); })(); @@ -359,7 +416,6 @@ export function LiveApp() { .catch(failSettings("set microphone")); }} onSettingsPickLanguages={(codes) => { - languageHintsRef.current = codes; void controllerRef.current ?.setLanguageHints(codes) .then(() => @@ -375,6 +431,22 @@ export function LiveApp() { }), ); }} + onSettingsPickTranslation={(codes) => { + void controllerRef.current + ?.setTranslation(codes) + .then(() => + patchSettings({ + translation: codes, + notice: `Translation: ${translationLabel(codes)}`, + }), + ) + .catch((error: unknown) => + patchSettings({ + translation: codes, + notice: `Failed to set translation: ${errorMessage(error)}`, + }), + ); + }} onSettingsPickRegion={(next) => { void saveSettings({ region: next }) .then(async () => { diff --git a/src/app/session-end.ts b/src/app/session-end.ts index 34368ca..f3a0633 100644 --- a/src/app/session-end.ts +++ b/src/app/session-end.ts @@ -1,9 +1,11 @@ import { copyWithFallback, shortPath } from "#/lib/clipboard.js"; -export function printSessionEnd(path: string) { +export function printSessionEnd({ path, writeError }: { path: string; writeError?: string }) { const copied = copyWithFallback(path); const label = copied ? `${shortPath(path)} (copied to clipboard)` : path; const link = `\x1b]8;;file://${path}\x07${label}\x1b]8;;\x07`; console.log(`Transcript: ${link}`); + // Also covers a failure in the final write, after the live screen could show it. + if (writeError !== undefined) console.error(`The transcript may be incomplete: ${writeError}`); } diff --git a/src/app/settings-app.tsx b/src/app/settings-app.tsx index 1f3528f..0feca11 100644 --- a/src/app/settings-app.tsx +++ b/src/app/settings-app.tsx @@ -4,9 +4,10 @@ import { useInterrupt } from "#/hooks/use-interrupt.js"; import { deleteApiKey, loadApiKey, saveApiKey } from "#/lib/api-key.js"; import { errorMessage } from "#/lib/errors.js"; import { - DEFAULT_LANGUAGE_HINTS, + defaultLanguageHints, languageHintLabel, normalizeLanguageHints, + translationLabel, type SttLanguage, } from "#/lib/languages.js"; import { listMicrophones } from "#/lib/microphones.js"; @@ -20,7 +21,8 @@ export function SettingsApp() { const [microphones, setMicrophones] = useState([]); const [loading, setLoading] = useState(true); const [currentMicrophone, setCurrentMicrophone] = useState(); - const [languages, setLanguages] = useState([...DEFAULT_LANGUAGE_HINTS]); + const [languages, setLanguages] = useState(defaultLanguageHints); + const [translation, setTranslation] = useState([]); const [region, setRegion] = useState(); const [hasApiKey, setHasApiKey] = useState(false); const [notice, setNotice] = useState(); @@ -38,6 +40,7 @@ export function SettingsApp() { const [key, found] = await Promise.all([loadApiKey(resolved), microphonesLoad]); setCurrentMicrophone(settings.microphone); setLanguages(normalizeLanguageHints(settings.languages)); + setTranslation(settings.translation ?? []); setRegion(resolved); setHasApiKey(key !== null); setMicrophones(found); @@ -48,39 +51,57 @@ export function SettingsApp() { }); }, []); + const failWith = (action: string) => (error: unknown) => + setNotice(`Failed to ${action}: ${errorMessage(error)}`); + return ( { - void saveSettings({ microphone: name }).then(() => { - setCurrentMicrophone(name); - setNotice(`Microphone set to ${name}`); - }); + void saveSettings({ microphone: name }) + .then(() => { + setCurrentMicrophone(name); + setNotice(`Microphone set to ${name}`); + }) + .catch(failWith("set microphone")); }} onPickLanguages={(codes) => { - void saveSettings({ languages: codes }).then(() => { - setLanguages(codes); - setNotice(`Languages set to ${languageHintLabel(codes)}`); - }); + void saveSettings({ languages: codes }) + .then(() => { + setLanguages(codes); + setNotice(`Languages set to ${languageHintLabel(codes)}`); + }) + .catch(failWith("set languages")); + }} + onPickTranslation={(codes) => { + void saveSettings({ translation: codes }) + .then(() => { + setTranslation(codes); + setNotice(`Translation: ${translationLabel(codes)}`); + }) + .catch(failWith("set translation")); }} onPickRegion={(next) => { - void saveSettings({ region: next }).then(async () => { - regionRef.current = next; - setRegion(next); - const key = await loadApiKey(next); - setHasApiKey(key !== null); - setNotice( - `Region set to ${regionLabel(next)}${ - key === null ? " (register an API key for this region)" : "" - }`, - ); - }); + void saveSettings({ region: next }) + .then(async () => { + regionRef.current = next; + setRegion(next); + const key = await loadApiKey(next); + setHasApiKey(key !== null); + setNotice( + `Region set to ${regionLabel(next)}${ + key === null ? " (register an API key for this region)" : "" + }`, + ); + }) + .catch(failWith("save region")); }} onChangeApiKey={(key) => { void saveApiKey({ key, region: regionRef.current }) @@ -88,15 +109,15 @@ export function SettingsApp() { setHasApiKey(true); setNotice(`Saved API key for ${regionLabel(regionRef.current)}`); }) - .catch((error: unknown) => { - setNotice(`Failed to save API key: ${errorMessage(error)}`); - }); + .catch(failWith("save API key")); }} onDeleteApiKey={() => { - void deleteApiKey(regionRef.current).then(() => { - setHasApiKey(false); - setNotice(`Deleted API key for ${regionLabel(regionRef.current)}`); - }); + void deleteApiKey(regionRef.current) + .then(() => { + setHasApiKey(false); + setNotice(`Deleted API key for ${regionLabel(regionRef.current)}`); + }) + .catch(failWith("delete API key")); }} onExit={() => { quit(); diff --git a/src/app/terms-command.ts b/src/app/terms-command.ts new file mode 100644 index 0000000..f56b8a8 --- /dev/null +++ b/src/app/terms-command.ts @@ -0,0 +1,56 @@ +import { + loadSettings, + MAX_TERMS_CHARS, + normalizeTerms, + saveSettings, + termsSize, +} from "#/lib/settings.js"; + +const USAGE = `Usage: earpop terms List saved terms + earpop terms add ... Add words or names to spell as listed + earpop terms remove ... Remove terms + earpop terms clear Remove every term`; + +export async function runTermsCommand(args: string[]) { + const [sub, ...values] = args; + const current = (await loadSettings()).terms ?? []; + + if (sub === undefined || sub === "list") { + if (current.length === 0) { + console.log("No saved terms. Add some with: earpop terms add ..."); + return; + } + console.log(current.join("\n")); + return; + } + + if (sub === "add" && values.length > 0) { + const next = normalizeTerms([...current, ...values]); + const size = termsSize(next); + if (size > MAX_TERMS_CHARS) { + throw new Error( + `Terms would total ${size} characters; the limit is ${MAX_TERMS_CHARS}. Remove terms people rarely say.`, + ); + } + await saveSettings({ terms: next }); + console.log(`Saved ${next.length - current.length} new term(s), ${next.length} in total.`); + return; + } + + if (sub === "remove" && values.length > 0) { + const drop = new Set(normalizeTerms(values)); + const next = current.filter((term) => !drop.has(term)); + await saveSettings({ terms: next }); + console.log(`Removed ${current.length - next.length} term(s), ${next.length} left.`); + return; + } + + if (sub === "clear") { + await saveSettings({ terms: [] }); + console.log("Removed every term."); + return; + } + + console.error(USAGE); + process.exitCode = 1; +} diff --git a/src/app/transcripts-command.ts b/src/app/transcripts-command.ts index 84f43dd..f0cb765 100644 --- a/src/app/transcripts-command.ts +++ b/src/app/transcripts-command.ts @@ -1,16 +1,35 @@ import { writeFile } from "node:fs/promises"; -import { join } from "node:path"; +import { parseArgs } from "node:util"; -import { exportText, listTranscripts } from "#/lib/transcripts.js"; -import { transcriptsDir } from "#/lib/journal.js"; +import { transcriptPath } from "#/lib/journal.js"; +import { + isTranscriptFormat, + renderTranscript, + TRANSCRIPT_FORMATS, +} from "#/lib/transcript-formats.js"; +import { listTranscripts, readTranscript, resolveTranscriptId } from "#/lib/transcripts.js"; + +const USAGE = `Usage: earpop transcripts list + earpop transcripts view [--format ${TRANSCRIPT_FORMATS.join("|")}] + earpop transcripts export [--format ${TRANSCRIPT_FORMATS.join("|")}] [--out ]`; + +export async function runTranscriptsCommand(args: string[]) { + let parsed; + try { + parsed = parseArgs({ + args, + allowPositionals: true, + options: { + format: { type: "string", short: "f", default: "txt" }, + out: { type: "string", short: "o" }, + }, + }); + } catch (error) { + throw new Error(`${error instanceof Error ? error.message : String(error)}\n${USAGE}`); + } + const [sub, rawId] = parsed.positionals; + const { format, out } = parsed.values; -export async function runTranscriptsCommand({ - sub, - id, -}: { - sub: string | undefined; - id: string | undefined; -}) { if (sub === "list") { const summaries = await listTranscripts(); if (summaries.length === 0) { @@ -18,23 +37,27 @@ export async function runTranscriptsCommand({ return; } for (const summary of summaries) { - console.log(`${summary.id}\t${summary.startedAt}\t${summary.tokenCount} tokens`); + console.log(`${summary.id}\t${summary.startedAt}\t${summary.duration}`); } return; } - if ((sub === "view" || sub === "export") && id !== undefined) { - const text = await exportText(id); + if ((sub === "view" || sub === "export") && rawId !== undefined) { + if (!isTranscriptFormat(format)) { + throw new Error(`Unknown format: ${format}. Use one of ${TRANSCRIPT_FORMATS.join(", ")}.`); + } + const id = await resolveTranscriptId(rawId); + const text = renderTranscript({ id, transcript: await readTranscript(id), format }); if (sub === "view") { process.stdout.write(text); return; } - const outPath = join(transcriptsDir(), `${id}.txt`); + const outPath = out ?? transcriptPath(id).replace(/\.jsonl$/, `.${format}`); await writeFile(outPath, text); console.log(outPath); return; } - console.error("Usage: earpop transcripts list | view | export "); + console.error(USAGE); process.exitCode = 1; } diff --git a/src/app/tui.tsx b/src/app/tui.tsx index efe87b0..d24f1aa 100644 --- a/src/app/tui.tsx +++ b/src/app/tui.tsx @@ -4,13 +4,29 @@ import { installInterruptListeners } from "#/app/interrupt.js"; import { LiveApp } from "#/app/live-app.js"; import { registerApp } from "#/app/runtime.js"; import { SettingsApp } from "#/app/settings-app.js"; +import type { SttLanguage } from "#/lib/languages.js"; -export function runTui(screen: "live" | "settings") { +export function runTui({ + screen, + languages, + translation, +}: { + screen: "live" | "settings"; + languages?: SttLanguage[]; + translation?: SttLanguage[]; +}) { installInterruptListeners(); registerApp( - render(screen === "live" ? : , { - exitOnCtrlC: false, - incrementalRendering: true, - }), + render( + screen === "live" ? ( + + ) : ( + + ), + { + exitOnCtrlC: false, + incrementalRendering: true, + }, + ), ); } diff --git a/src/components/language-select.tsx b/src/components/language-select.tsx index 940ca2d..0c3892f 100644 --- a/src/components/language-select.tsx +++ b/src/components/language-select.tsx @@ -1,43 +1,94 @@ import { MultiSelect } from "@inkjs/ui"; -import { Box, Text, useInput } from "ink"; -import { useState } from "react"; +import { Box, Text, useInput, useWindowSize } from "ink"; + +import { listHeight, menuGap } from "#/components/list-height.js"; +import { useMemo, useState } from "react"; import { - LANGUAGE_SELECT_OPTIONS, + languageSelectOptions, normalizeLanguageHints, type SttLanguage, } from "#/lib/languages.js"; interface LanguageSelectProps { current: SttLanguage[]; + /** Explains what the selection means; defaults to the language hint wording. */ + help?: string; + /** Allows saving with nothing selected. */ + allowEmpty?: boolean; + max?: number; + /** Rows this picker may use; defaults to the terminal height. */ + rows?: number; + /** Footer for ESC when nothing is being searched; defaults to "ESC cancel". */ + cancelLabel?: string; onPick: (codes: SttLanguage[]) => void; onCancel: () => void; } export function LanguageSelect(props: LanguageSelectProps) { const [error, setError] = useState(); + const windowRows = useWindowSize().rows; + const rows = props.rows ?? windowRows; + const [query, setQuery] = useState(""); + // MultiSelect resets to defaultValue when its options change, so carry the selection across filters. + const [selected, setSelected] = useState(props.current); + // Order once on open so options do not jump while toggling. + const [allOptions] = useState(() => languageSelectOptions({ selected: props.current })); + const options = useMemo(() => { + const needle = query.toLowerCase(); + return needle === "" + ? allOptions + : allOptions.filter((option) => option.label.toLowerCase().includes(needle)); + }, [allOptions, query]); - useInput((_input, key) => { - if (key.escape) props.onCancel(); + useInput((input, key) => { + if (key.escape) { + if (query !== "") setQuery(""); + else props.onCancel(); + return; + } + if (key.backspace || key.delete) { + setQuery((prev) => prev.slice(0, -1)); + return; + } + // Space toggles in MultiSelect; any other printable character narrows the list. + if (input !== "" && input !== " " && !key.ctrl && !key.meta && /^\P{C}+$/u.test(input)) { + setQuery((prev) => prev + input); + } }); return ( - - Space toggles, Enter saves. A single language uses strict restriction. + + + {`Type to search, Space toggles, Enter saves. ${props.help ?? "A single language uses strict restriction."}`} + + {query !== "" && {`Search: ${query}`}} {error !== undefined && {error}} - { - if (values.length === 0) { - setError("Select at least one language"); - return; - } - props.onPick(normalizeLanguageHints(values)); - }} - /> - ESC cancel + {options.length === 0 ? ( + No matching languages + ) : ( + { + if (values.length === 0 && props.allowEmpty !== true) { + setError("Select at least one language"); + return; + } + if (props.max !== undefined && values.length > props.max) { + setError(`Select at most ${props.max} languages`); + return; + } + props.onPick(values.length === 0 ? [] : normalizeLanguageHints(values)); + }} + /> + )} + + {query !== "" ? "ESC clear search" : (props.cancelLabel ?? "ESC cancel")} + ); } diff --git a/src/components/list-height.ts b/src/components/list-height.ts new file mode 100644 index 0000000..47ecf55 --- /dev/null +++ b/src/components/list-height.ts @@ -0,0 +1,20 @@ +// Below this height, menus drop their blank spacer rows so every item fits. +const COMPACT_ROWS = 24; + +/** Gap between menu sections for the rows a menu may use. */ +export function menuGap(rows: number) { + return rows < COMPACT_ROWS ? 0 : 1; +} + +/** How many list options to show when `reserved` rows go to the menu's other lines. */ +export function listHeight({ + rows, + reserved, + max, +}: { + rows: number; + reserved: number; + max: number; +}) { + return Math.max(3, Math.min(max, rows - reserved)); +} diff --git a/src/components/microphone-select.tsx b/src/components/microphone-select.tsx index 1d0223d..7fe3422 100644 --- a/src/components/microphone-select.tsx +++ b/src/components/microphone-select.tsx @@ -1,7 +1,10 @@ import { Spinner } from "@inkjs/ui"; -import { Box, Text, useInput } from "ink"; +import { Box, Text, useWindowSize } from "ink"; +import { listHeight } from "#/components/list-height.js"; import { Select } from "#/components/select.js"; +import { useEscape } from "#/hooks/use-escape.js"; +import { micPermissionHint } from "#/lib/audio.js"; import type { Microphone } from "#/lib/types.js"; interface MicrophoneSelectProps { @@ -11,12 +14,16 @@ interface MicrophoneSelectProps { error?: string; onPick: (name: string) => void; onCancel?: () => void; + /** Footer for ESC; defaults to "ESC cancel". */ + cancelLabel?: string; + /** Rows this list may use; defaults to the terminal height. */ + rows?: number; } export function MicrophoneSelect(props: MicrophoneSelectProps) { - useInput((_input, key) => { - if (key.escape && props.onCancel) props.onCancel(); - }); + const windowRows = useWindowSize().rows; + useEscape({ handler: () => props.onCancel?.(), active: props.onCancel !== undefined }); + const footer = props.onCancel && {props.cancelLabel ?? "ESC cancel"}; if (props.loading) { return ; @@ -26,7 +33,7 @@ export function MicrophoneSelect(props: MicrophoneSelectProps) { return ( {props.error} - {props.onCancel && ESC to go back} + {footer} ); } @@ -35,7 +42,8 @@ export function MicrophoneSelect(props: MicrophoneSelectProps) { return ( No microphones available. - Connect a microphone and allow access in System Settings. + {`Connect a microphone. ${micPermissionHint()}.`} + {footer} ); } @@ -43,16 +51,21 @@ export function MicrophoneSelect(props: MicrophoneSelectProps) { return ( { const item = value as MenuItem; if (item === "exit") props.onExit(); @@ -74,6 +92,7 @@ export function SettingsScreen(props: SettingsScreenProps) { {view === "microphone" && ( { props.onPickLanguages(codes); @@ -96,6 +116,21 @@ export function SettingsScreen(props: SettingsScreenProps) { /> )} + {view === "translation" && ( + { + props.onPickTranslation(codes); + setView("menu"); + }} + onCancel={() => setView("menu")} + /> + )} + {view === "region" && ( diff --git a/src/test-utils/temp-home.ts b/src/test-utils/temp-home.ts new file mode 100644 index 0000000..7dcd458 --- /dev/null +++ b/src/test-utils/temp-home.ts @@ -0,0 +1,18 @@ +import { mkdtempSync, rmSync } from "node:fs"; +import { tmpdir } from "node:os"; +import { join } from "node:path"; +import { after, before } from "node:test"; + +/** Points HOME at a fresh directory for the enclosing suite, so tests never touch real settings. */ +export function useTempHome() { + const home = mkdtempSync(join(tmpdir(), "earpop-test-")); + const savedHome = process.env.HOME; + before(() => { + process.env.HOME = home; + }); + after(() => { + process.env.HOME = savedHome; + rmSync(home, { recursive: true, force: true }); + }); + return home; +}