(key, value)
| 18 | } |
| 19 | |
| 20 | export async function storeSet(key, value) { |
| 21 | if (window.__TAURI__?.core?.invoke) { |
| 22 | try { |
| 23 | await window.__TAURI__.core.invoke("store_set", { key, value }); |
| 24 | } catch (e) { console.warn("[store] set failed for", key, e); } |
| 25 | return; |
| 26 | } |
| 27 | try { localStorage.setItem(key, JSON.stringify(value)); } catch (e) { console.warn("[store] localStorage set failed", e); } |
| 28 | } |
| 29 | |
| 30 | // Debounced variant — coalesces rapid writes (e.g. mixer slider moves) into |
| 31 | // a single store write ~300ms after the last call. Each call snapshots the |
no outgoing calls
no test coverage detected