The truly free, open-source, local-first, cross-platform CapCut replacement. Scriptable through a JSON-RPC API & MCP.
Rust ffmpegfree-video-editormodel-context-protocolnon-linear-editoroffline-firstopen-source-video-editorself-hostedvideo-editingvideo-editing-automationvideo-editing-softwarevideo-editing-toolsvideo-editorvoice-cloningyoutube-automationyoutube-shorts
test
Jareer596fb2218716
diff --git a/.gitignore b/.gitignorenew file mode 100644index 00000000..3ef258a6--- /dev/null+++ b/.gitignore@@ -0,0 +1,60 @@+## Do not remove these+test/assets/+test/assets/*++# Rust+target/+**/target/+*.pdb++# Node+node_modules/+dist/+dist-ssr/+.vite/+*.local+npm-debug.log*+yarn-debug.log*+yarn-error.log*+pnpm-debug.log*++# Tauri build output+desktop/src-tauri/gen/+desktop/src-tauri/target/++# Python (tooling and one-off scripts live at the repo root for now)+__pycache__/+*.py[cod]+.venv/+venv/+*.egg-info/++# Editors and OS+.vscode/*+!.vscode/extensions.json+!.vscode/settings.json+.idea/+*.swp+.DS_Store+Thumbs.db+desktop.ini++# Scratch media at the repo root.+#+# Test clips are large and change constantly, so they do not belong in git+# history. Fixtures that tests genuinely depend on should live in a `fixtures/`+# directory next to those tests and be committed deliberately - this pattern+# only covers loose files dropped at the top level.+/*.mp4+/*.mov+/*.mkv+/*.webm+/*.mp3+/*.wav+/*.flac+/*.aac+/scratch_*++# Local environment+.env+.env.localdiff --git a/desktop/.gitignore b/desktop/.gitignorenew file mode 100644index 00000000..a547bf36--- /dev/null+++ b/desktop/.gitignore@@ -0,0 +1,24 @@+# Logs+logs+*.log+npm-debug.log*+yarn-debug.log*+yarn-error.log*+pnpm-debug.log*+lerna-debug.log*++node_modules+dist+dist-ssr+*.local++# Editor directories and files+.vscode/*+!.vscode/extensions.json+.idea+.DS_Store+*.suo+*.ntvs*+*.njsproj+*.sln+*.sw?diff --git a/desktop/.vscode/extensions.json b/desktop/.vscode/extensions.jsonnew file mode 100644index 00000000..24d7cc6d--- /dev/null+++ b/desktop/.vscode/extensions.json@@ -0,0 +1,3 @@+{+ "recommendations": ["tauri-apps.tauri-vscode", "rust-lang.rust-analyzer"]+}diff --git a/desktop/README.md b/desktop/README.mdnew file mode 100644index 00000000..20a10377--- /dev/null+++ b/desktop/README.md@@ -0,0 +1,93 @@+# Relay Desktop++The editor front end. Tauri v2 + React 19 + Tailwind v4, talking to the Rust+engine in [`../engine`](../engine).++## Run it++```sh+npm install+npm run app # tauri dev - builds the Rust host and opens the window+npm run app:build # production bundle (msi/nsis on Windows)+npm run typecheck # tsc --noEmit+```++`npm run dev` alone serves the UI in a browser, which is useful for pure layout+work - but every `invoke` fails there, because there is no Rust host behind it.++## Layout++```+src/+ App.tsx editor shell: panel grid, window state, keyboard map+ components/+ TitleBar.tsx custom title bar - the window is undecorated+ Icon.tsx the whole icon set, plus the standard IconButton+ Panel.tsx Panel / Bar / Divider / Empty - all shared chrome+ Menu.tsx dropdown menus (title bar)+ ContextMenu.tsx right-click menus (portal, edge-clamped)+ Resizer.tsx draggable panel dividers+ MediaBin.tsx import and list media; items are drag sources+ Preview.tsx program monitor - a <video> element, for now+ TimelinePanel.tsx toolbar, track headers, and the timeline canvas+ Inspector.tsx properties of the selection+ lib/+ engine.ts the ONLY file that calls invoke(). Typed IPC boundary.+ project.ts the provisional edit model and its operations+ transport.ts the playback clock+ audio.ts audio preview - one media element per audible clip+ time.ts display formatting. No time arithmetic lives in the UI.+ styles.css Tailwind entry point, tokens, and the `surface` utility+src-tauri/+ src/lib.rs Tauri commands: engine types in, JSON out. Nothing else.+```++## Rules that keep this fast++- **`lib/engine.ts` is the only file that calls `invoke`.** One place to fix+ when a command changes, and the compiler finds every call site.+- **The timeline is not DOM.** One canvas, one rAF loop. See decision 0002.+- **No time arithmetic in TypeScript.** The engine works in exact rational+ seconds; JS numbers are `f64` and drift. `lib/time.ts` formats, nothing more.+- **The UI does not own the edit — but it does today.** `lib/project.ts` holds+ a provisional model because the engine has no project API yet. Every+ operation there is a pure `(project, args) => project` function, which is the+ shape an engine command will have, so the call sites survive the migration.+ Do not let it grow an undo stack or a serialiser; those belong to the engine,+ and building them twice is how the two copies drift apart.++## Keyboard++| Key | Action |+|---|---|+| `Space` | Play / pause |+| `←` `→` | Step one frame (`Shift` for ten) |+| `Home` `End` | Jump to start / end |+| `V` `C` | Select tool / razor tool |+| `S` | Split at playhead |+| `N` | Toggle snapping |+| `Del` | Delete selected clip |+| `Ctrl`+wheel | Zoom the timeline about the pointer |+| wheel | Pan the timeline |++## Adding a command++1. Write the function in `src-tauri/src/lib.rs`, `#[tauri::command]`, returning+ `Result<T, String>`.+2. Register it in `generate_handler![..]`.+3. Add the matching type and wrapper to `src/lib/engine.ts`.++The IPC boundary is JSON, so nothing checks steps 1 and 3 against each other.+Keep them adjacent in the same commit.++## Not decided yet++- **Content Security Policy** is `null` in `tauri.conf.json`. Fine while+ everything is local; it needs a real policy before the app loads anything it+ did not author. See decision 0003.+- **File import is a path box**, not a native dialog. Adding one means the+ `dialog` plugin and a capability entry - a decision for whoever builds real+ import.+- **No state library.** React state is enough while the engine owns the model.+ If it stops being enough, the answer is a store outside React (so timeline+ updates do not re-render the tree), not more `useState`.diff --git a/desktop/docs/decisions/0001-tauri-over-electron.md b/desktop/docs/decisions/0001-tauri-over-electron.mdnew file mode 100644index 00000000..0357137f--- /dev/null+++ b/desktop/docs/decisions/0001-tauri-over-electron.md@@ -0,0 +1,27 @@+# 0001 - Tauri, not Electron++## Decision+The desktop shell is Tauri v2. React 19 and Tailwind v4 render the UI inside+the platform's own webview.++## Why+- Electron ships a whole Chromium per app: ~150 MB of installer and ~100 MB of+ idle RSS before the editor has done anything. A video editor needs that+ memory for frame caches.+- The host process is already Rust, so the engine links straight into it. With+ Electron the engine would sit behind a native module or a subprocess, and+ every frame would cross a language boundary that does not need to exist.+- Tauri v2's IPC is a normal function call into Rust, not a second process.+- The bundle is an ordinary signed installer on all three platforms.++## What it costs+- Three webview engines instead of one: WebView2 on Windows, WKWebView on+ macOS, WebKitGTK on Linux. Their CSS support differs at the edges, and+ WebKitGTK is the one that will surprise you.+- No Node APIs in the front end. Anything touching the filesystem is a command.+- A smaller ecosystem of desktop-specific examples to copy from.++## What would change our mind+Needing a Chromium-only capability in the UI itself. Note that this does *not*+include video decode or GPU compositing - those belong to the engine, not the+webview, so the webview's media support is close to irrelevant here.diff --git a/desktop/docs/decisions/0002-the-hot-surfaces-are-not-the-dom.md b/desktop/docs/decisions/0002-the-hot-surfaces-are-not-the-dom.mdnew file mode 100644index 00000000..632120fd--- /dev/null+++ b/desktop/docs/decisions/0002-the-hot-surfaces-are-not-the-dom.md@@ -0,0 +1,38 @@+# 0002 - The timeline and the preview are not made of DOM++## Decision+The timeline is one `<canvas>` drawn from a `requestAnimationFrame` loop. The+preview is a placeholder that will become a native GPU surface. Neither renders+through React.++## Why+- A real edit is thousands of clips, keyframes and waveform segments. As DOM+ nodes that is thousands of elements, restyled and re-laid-out on every scrub.+ React reconciliation is not the bottleneck there - layout and paint are, and+ no amount of memoisation avoids them.+- One canvas is one draw call per frame, and the draw cost scales with what is+ *visible* rather than with what exists.+- Frames must never be paced by React state. Playback is a clock, and the clock+ belongs to the engine.++## Consequences+- The canvas has to handle its own hit-testing, scrolling and device pixel+ ratio. That is real work, and it is why `Timeline.tsx` is longer than the+ panels around it.+- Accessibility does not come free on a canvas. Keyboard editing operations+ must be first-class rather than an afterthought bolted onto mouse handlers.+- The draw loop reads its inputs through a ref, so changing a prop never tears+ down and rebuilds the loop.++## The preview specifically+Pushing decoded frames to the webview over IPC means copying every frame into+JSON-adjacent plumbing and through the browser compositor. That is acceptable+for a still and hopeless at 60 fps. The plan is a native child window that the+GPU compositor draws into directly, positioned to the preview element's+bounding box - which is why that element keeps a strict aspect box even while+it is empty.++## What would change our mind+Nothing for the timeline. For the preview, a zero-copy path from a GPU texture+into the webview would remove the reason for a separate surface - worth+re-checking when the `wgpu` backend lands.diff --git a/desktop/docs/decisions/0003-csp-is-not-configured.md b/desktop/docs/decisions/0003-csp-is-not-configured.mdnew file mode 100644index 00000000..357d9352--- /dev/null+++ b/desktop/docs/decisions/0003-csp-is-not-configured.md@@ -0,0 +1,22 @@+# 0003 - Content Security Policy: OPEN QUESTION++`"csp": null` in `tauri.conf.json`, which disables the policy entirely.++That is defensible right now - the app loads only its own bundled assets - and+indefensible the moment it renders anything it did not author: a thumbnail from+a downloaded file, a project template, an update notice, a plugin's UI.++A starting point when that day comes:++```json+"csp": "default-src 'self'; img-src 'self' asset: http://asset.localhost blob: data:; media-src 'self' asset: http://asset.localhost blob:; style-src 'self' 'unsafe-inline'; script-src 'self'"+```++Two things to check when enabling it:++- Vite's dev server and React Fast Refresh inject inline scripts. Confirm+ `npm run app` still hot-reloads, or scope the policy to release builds.+- Tailwind v4 emits a real stylesheet rather than inline styles, but component+ `style={{...}}` attributes still need `'unsafe-inline'` under `style-src`.++Delete this file once a policy is in place.diff --git a/desktop/docs/decisions/0004-audio-preview-in-the-webview.md b/desktop/docs/decisions/0004-audio-preview-in-the-webview.mdnew file mode 100644index 00000000..152fab3a--- /dev/null+++ b/desktop/docs/decisions/0004-audio-preview-in-the-webview.md@@ -0,0 +1,54 @@+# 0004 - Audio and video preview run in the webview, for now++## Decision+Playback preview - both the picture in the monitor and the sound - uses the+webview's own `<video>` and `<audio>` elements, fed through Tauri's asset+protocol. The engine is not involved.++## Why+Decision 0002 in this folder says the hot surfaces are not the DOM, and that is+still the plan. But the engine cannot currently present a frame or open an+output device, and an editor where pressing play does nothing is not an editor.+The webview already has a demuxer, a decoder, a video output and an audio+device. Using them is the difference between an editor you can use today and a+screenshot.++## What this is not+It is a preview, not the program output. Specifically:++- **No compositing.** The monitor shows the top-most video clip under the+ playhead and nothing else. Two stacked clips do not blend; the lower one is+ invisible.+- **No mixing.** Overlapping audio clips play at once and will clip if loud.+ There is no gain staging, no pan, no fades.+- **Sync is corrective, not sample-accurate.** Each element is nudged back into+ step when it drifts past a tolerance - 300 ms while playing, 30 ms while+ paused. A correction while playing is audible and visible.+- **No effects.** Nothing in the render graph is applied.+- **Scrubbing repositions audio, it does not scrub it.** There is no+ granular playback.+- **Frame stepping is approximate.** The transport computes an exact frame+ boundary, but a media element seeks to the nearest frame *it* can decode.++## The asset protocol, and the fallback+`convertFileSrc` produces an `asset:` URL that streams and seeks, which is what+you want. It requires `assetProtocol.enable` plus a scope in+`tauri.conf.json`, and the scope is currently `["**"]` - a video editor opens+arbitrary user files, so a narrower scope would be a lie. Note this widens what+a compromised front end could read; it should be revisited alongside the CSP+(decision 0003).++If the protocol is unavailable for any reason, `lib/audio.ts` falls back to+pulling the whole file through the `read_media_bytes` command and playing a+blob URL. Slower and memory-hungry, but it degrades to working audio rather+than to silence. The video path has no such fallback.++## What replaces it+The engine growing a presentation path: a frame cache and reader pool first+(so scrubbing is possible at all), then a native surface for picture and a+cpal-based mixer for sound. At that point the elements in `Preview.tsx` and+`lib/audio.ts` are deleted outright rather than adapted - they share no code+with what replaces them, which is the point of keeping them this small.++## What would change our mind+Nothing. This is scaffolding with a known demolition date.diff --git a/desktop/index.html b/desktop/index.htmlnew file mode 100644index 00000000..07597eac--- /dev/null+++ b/desktop/index.html@@ -0,0 +1,14 @@+<!doctype html>+<html lang="en">+ <head>+ <meta charset="UTF-8" />+ <link rel="icon" type="image/svg+xml" href="/vite.svg" />+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />+ <title>Relay</title>+ </head>++ <body>+ <div id="root"></div>+ <script type="module" src="/src/main.tsx"></script>+ </body>+</html>diff --git a/desktop/package-lock.json b/desktop/package-lock.jsonnew file mode 100644index 00000000..6d964c66--- /dev/null+++ b/desktop/package-lock.json@@ -0,0 +1,2697 @@+{+ "name": "relay-desktop",+ "version": "0.1.0",+ "lockfileVersion": 3,+ "requires": true,+ "packages": {+ "": {+ "name": "relay-desktop",+ "version": "0.1.0",+ "dependencies": {+ "@tauri-apps/api": "^2",+ "@tauri-apps/plugin-dialog": "^2.7.2",+ "@tauri-apps/plugin-opener": "^2",+ "react": "^19.1.0",+ "react-dom": "^19.1.0"+ },+ "devDependencies": {+ "@tailwindcss/vite": "^4",+ "@tauri-apps/cli": "^2",+ "@types/react": "^19.1.8",+ "@types/react-dom": "^19.1.6",+ "@vitejs/plugin-react": "^4.6.0",+ "tailwindcss": "^4",+ "typescript": "~5.8.3",+ "vite": "^7.0.4"+ }+ },+ "node_modules/@babel/code-frame": {+ "version": "7.29.7",+ "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.29.7.tgz",+ "integrity": "sha512-Aup7aUOfpbAUg2ROOJN6Iw5f9DMBlzu0mIkm/malLQFN/YQgO48wCj0Kxa3sEHJvPVFg7siR+qRInwXd2qhQKw==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@babel/helper-validator-identifier": "^7.29.7",+ "js-tokens": "^4.0.0",+ "picocolors": "^1.1.1"+ },+ "engines": {+ "node": ">=6.9.0"+ }+ },+ "node_modules/@babel/compat-data": {+ "version": "7.29.7",+ "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.29.7.tgz",+ "integrity": "sha512-locTkQyKvwIEgBzVrn8693ebc97F2U8ZHjbXwDXJ5Fn2TCpNwTlKcaKLkdHop5c/icOFE7qt7Q9JC5hnKNa6Gg==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=6.9.0"+ }+ },+ "node_modules/@babel/core": {+ "version": "7.29.7",+ "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.29.7.tgz",+ "integrity": "sha512-RgHBCvtjbOK2gXSNBNIkNoEc9qoVEtau3hj8gEqKQuL3HZAibKarWFEI3Lfm6EYKkLalOh8eSrj9b+ch9H/VBA==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@babel/code-frame": "^7.29.7",+ "@babel/generator": "^7.29.7",+ "@babel/helper-compilation-targets": "^7.29.7",+ "@babel/helper-module-transforms": "^7.29.7",+ "@babel/helpers": "^7.29.7",+ "@babel/parser": "^7.29.7",+ "@babel/template": "^7.29.7",+ "@babel/traverse": "^7.29.7",+ "@babel/types": "^7.29.7",+ "@jridgewell/remapping": "^2.3.5",+ "convert-source-map": "^2.0.0",+ "debug": "^4.1.0",+ "gensync": "^1.0.0-beta.2",+ "json5": "^2.2.3",+ "semver": "^6.3.1"+ },+ "engines": {+ "node": ">=6.9.0"+ },+ "funding": {+ "type": "opencollective",+ "url": "https://opencollective.com/babel"+ }+ },+ "node_modules/@babel/generator": {+ "version": "7.29.8",+ "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.29.8.tgz",+ "integrity": "sha512-gZbepsdh3WDtgZKWL+vTPh71LSBrm/Y4/QDZBVCcYfmeTEEuoOYwlSy+G1StfJg+/Zy550u/3TATbm7qDbbMtg==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@babel/parser": "^7.29.8",+ "@babel/types": "^7.29.8",+ "@jridgewell/gen-mapping": "^0.3.12",+ "@jridgewell/trace-mapping": "^0.3.28",+ "jsesc": "^3.0.2"+ },+ "engines": {+ "node": ">=6.9.0"+ }+ },+ "node_modules/@babel/helper-compilation-targets": {+ "version": "7.29.7",+ "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.29.7.tgz",+ "integrity": "sha512-wem6WaBj4NaVYVdNhLPPVacES6ZJ+KBBfSkTMD3YZxbP3rm3Di85tJU5ljaUNhaOynt+Aj0xruhYuzQBt8n71g==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@babel/compat-data": "^7.29.7",+ "@babel/helper-validator-option": "^7.29.7",+ "browserslist": "^4.24.0",+ "lru-cache": "^5.1.1",+ "semver": "^6.3.1"+ },+ "engines": {+ "node": ">=6.9.0"+ }+ },+ "node_modules/@babel/helper-globals": {+ "version": "7.29.7",+ "resolved": "https://registry.npmjs.org/@babel/helper-globals/-/helper-globals-7.29.7.tgz",+ "integrity": "sha512-3nQVUAtvkKH9zahfWgw96Jc/uFOmjACE1kQz82E2lqWmHBgjzbNlsC22nuQTfahmWeQtTq5nQ/4Nnd2A1wj4zA==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=6.9.0"+ }+ },+ "node_modules/@babel/helper-module-imports": {+ "version": "7.29.7",+ "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.29.7.tgz",+ "integrity": "sha512-ejHwrQQYcm9xnTivShn2IDOlIzInN34AXskvq9QicvCtEzq1Vzclu/tKF8Jq1Cg8JG2GL6/EmjgsCT7lXepE3g==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@babel/traverse": "^7.29.7",+ "@babel/types": "^7.29.7"+ },+ "engines": {+ "node": ">=6.9.0"+ }+ },+ "node_modules/@babel/helper-module-transforms": {+ "version": "7.29.7",+ "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.29.7.tgz",+ "integrity": "sha512-UPUVSyXbOh627KiCIGQSgwWzGeBKLkaJ9PJEdrngIwMSzxLR4jS4+f1f1jb7VzBbg8nFLaYotvVPFCTqdrmTAg==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@babel/helper-module-imports": "^7.29.7",+ "@babel/helper-validator-identifier": "^7.29.7",+ "@babel/traverse": "^7.29.7"+ },+ "engines": {+ "node": ">=6.9.0"+ },+ "peerDependencies": {+ "@babel/core": "^7.0.0"+ }+ },+ "node_modules/@babel/helper-plugin-utils": {+ "version": "7.29.7",+ "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.29.7.tgz",+ "integrity": "sha512-G7sHYigPY17oO5SYWnfD/0MTBwVR781S/JI643e/JhUYgVgWE/61SoW3NH9KWUKyKq5LVh3npif99Wkt6j86Jw==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=6.9.0"+ }+ },+ "node_modules/@babel/helper-string-parser": {+ "version": "7.29.7",+ "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.29.7.tgz",+ "integrity": "sha512-Pb5ijPrZ89GDH8223L4UP8i6QApWxs04RbPQJTeWDV0/keR2E36MeKnyr6LYmUUvqRRI+Iv87SuF1W6ErINzYw==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=6.9.0"+ }+ },+ "node_modules/@babel/helper-validator-identifier": {+ "version": "7.29.7",+ "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.29.7.tgz",+ "integrity": "sha512-qehxGkRj55h/ff8EMaJ+cYhyaKlHIxqYDn682wQD7RNp9UujOQsHog2uS0r2vzr4pW+sXf90NeeayjcNaX3fFg==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=6.9.0"+ }+ },+ "node_modules/@babel/helper-validator-option": {+ "version": "7.29.7",+ "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.29.7.tgz",+ "integrity": "sha512-N9ZErrD+yW5geCDtBqnOoxmR8+tNKiGuxKlDpuJxfsqpa2dFcexaziGAE/qoHLiDDreVNMupxGmSoNlyvsA3gw==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=6.9.0"+ }+ },+ "node_modules/@babel/helpers": {+ "version": "7.29.7",+ "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.29.7.tgz",+ "integrity": "sha512-1k2lAGRMfHTcwuNYcCNUmaUffmQv8KWMfh2iJUUeRlwlwH4FdNG7mfPI10NPfLHJFThE4Tyr4mv7kTNZOiPuBg==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@babel/template": "^7.29.7",+ "@babel/types": "^7.29.7"+ },+ "engines": {+ "node": ">=6.9.0"+ }+ },+ "node_modules/@babel/parser": {+ "version": "7.29.8",+ "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.29.8.tgz",+ "integrity": "sha512-E8lTAYNB1KW+FH+VGJuZM1ioAx2E6oVlvQFRrf5P8ZZmsiJXYAD9vTFV7yyEURNzgh1dFqMZuO6tUwcARbqFCA==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@babel/types": "^7.29.8"+ },+ "bin": {+ "parser": "bin/babel-parser.js"+ },+ "engines": {+ "node": ">=6.0.0"+ }+ },+ "node_modules/@babel/plugin-transform-react-jsx-self": {+ "version": "7.29.7",+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-self/-/plugin-transform-react-jsx-self-7.29.7.tgz",+ "integrity": "sha512-TL0hMc9xzy86VD31nUiwzd5otRAcyEPcsegCxolO0PvcXuH1v0kECe/UIznYFihpkvU5wg/jk4v0TTEFfm53fw==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@babel/helper-plugin-utils": "^7.29.7"+ },+ "engines": {+ "node": ">=6.9.0"+ },+ "peerDependencies": {+ "@babel/core": "^7.0.0-0"+ }+ },+ "node_modules/@babel/plugin-transform-react-jsx-source": {+ "version": "7.29.7",+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-source/-/plugin-transform-react-jsx-source-7.29.7.tgz",+ "integrity": "sha512-06IyK09H3wi4cGbhDBwp5gUGo0IKtnYa8tyTiephirPCK6fbobVGiXMMI5zLQ4aKEYP3wZ3ArU44o+8KMrSG/Q==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@babel/helper-plugin-utils": "^7.29.7"+ },+ "engines": {+ "node": ">=6.9.0"+ },+ "peerDependencies": {+ "@babel/core": "^7.0.0-0"+ }+ },+ "node_modules/@babel/template": {+ "version": "7.29.7",+ "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.29.7.tgz",+ "integrity": "sha512-puq+Gf35oI24FeN11LkoUQFqv9uwNeWpxXZi/Ji3rRIoKAzKnxRaZ+Gkj0vKS9ZCiTESfng1N9LyOyXvo+m+Gg==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@babel/code-frame": "^7.29.7",+ "@babel/parser": "^7.29.7",+ "@babel/types": "^7.29.7"+ },+ "engines": {+ "node": ">=6.9.0"+ }+ },+ "node_modules/@babel/traverse": {+ "version": "7.29.8",+ "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.29.8.tgz",+ "integrity": "sha512-I5z7H3bf/41ktsNVLtpN0wAa336HkqIHQ5BuPLEhTkt1jVSyZpeNKIzTgEWmlxjdg81R0IgUCcaE+Ok3NvrfZg==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@babel/code-frame": "^7.29.7",+ "@babel/generator": "^7.29.8",+ "@babel/helper-globals": "^7.29.7",+ "@babel/parser": "^7.29.8",+ "@babel/template": "^7.29.7",+ "@babel/types": "^7.29.8",+ "debug": "^4.3.1"+ },+ "engines": {+ "node": ">=6.9.0"+ }+ },+ "node_modules/@babel/types": {+ "version": "7.29.8",+ "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.29.8.tgz",+ "integrity": "sha512-Vj1jF3cPfxg7OAfoI7QnVKLoILlm2JF9pnVHrX8qx7AHMiYWT+NDAA7jChlNgRS4WTLc/fD1lXLmPixluj+3Gg==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@babel/helper-string-parser": "^7.29.7",+ "@babel/helper-validator-identifier": "^7.29.7"+ },+ "engines": {+ "node": ">=6.9.0"+ }+ },+ "node_modules/@esbuild/aix-ppc64": {+ "version": "0.28.2",+ "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.28.2.tgz",+ "integrity": "sha512-XExcO+dvLKvVtNTibSTBej1NCAbaGhWn9Ww1ZPx80qsahhPFe/8jgWP0IchNe0F3HwkU7n8ejhH8bjonqht8mQ==",+ "cpu": [+ "ppc64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "aix"+ ],+ "engines": {+ "node": ">=18"+ }+ },+ "node_modules/@esbuild/android-arm": {+ "version": "0.28.2",+ "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.28.2.tgz",+ "integrity": "sha512-kXXoiPVVGQcnIYGOeaovwOURpniDBpSq4A03qkQ+BMQqtGG6HYap3xne9C1O1yo4TR3qxlCX5IqqmX6fFo2Lqg==",+ "cpu": [+ "arm"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "android"+ ],+ "engines": {+ "node": ">=18"+ }+ },+ "node_modules/@esbuild/android-arm64": {+ "version": "0.28.2",+ "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.28.2.tgz",+ "integrity": "sha512-5YfKeeI8qWfBZIX+u2xZC3Zlb3Os/gLS2sbEKM+I4ZOcsWmHS2WLysCcQZDAFRslDUU5Oiq44gf6PYN1vGwG5A==",+ "cpu": [+ "arm64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "android"+ ],+ "engines": {+ "node": ">=18"+ }+ },+ "node_modules/@esbuild/android-x64": {+ "version": "0.28.2",+ "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.28.2.tgz",+ "integrity": "sha512-O387ite7SzUyCcy3JQX4P4bLtEA7bLLkx+esve5JHnyYfNTxcVpXZo9jhdB0lTKN44gztELTdU7nS8Nr16Fs1Q==",+ "cpu": [+ "x64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "android"+ ],+ "engines": {+ "node": ">=18"+ }+ },+ "node_modules/@esbuild/darwin-arm64": {+ "version": "0.28.2",+ "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.28.2.tgz",+ "integrity": "sha512-n4KqkOQrraxHJcgjM1RvwbigfQKIKJVpM7xp+KsxiyUSrRdIXnt73VhrPAx0fV44hgfmIVKjxMN9J1t5jySVkw==",+ "cpu": [+ "arm64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "darwin"+ ],+ "engines": {+ "node": ">=18"+ }+ },+ "node_modules/@esbuild/darwin-x64": {+ "version": "0.28.2",+ "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.28.2.tgz",+ "integrity": "sha512-uq6suIWYP37qzGddBKPw5QEQPi6HiLGsO7UmkpfyaYNQ3D+rN6w6WfwH+nuqcGXWvawGwxOEroO4YGnFh95azw==",+ "cpu": [+ "x64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "darwin"+ ],+ "engines": {+ "node": ">=18"+ }+ },+ "node_modules/@esbuild/freebsd-arm64": {+ "version": "0.28.2",+ "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.28.2.tgz",+ "integrity": "sha512-n+I0BTSRIoy+d6RPKnEVwql5UwBJolytvY4mAOIEJorKlqgPII8ix6slVVrfZ5Tnj7glIZvloylbB/EJPMWEXw==",+ "cpu": [+ "arm64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "freebsd"+ ],+ "engines": {+ "node": ">=18"+ }+ },+ "node_modules/@esbuild/freebsd-x64": {+ "version": "0.28.2",+ "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.28.2.tgz",+ "integrity": "sha512-78XJTJkvPs0kz2w61301PJjXl4g7q3JqiYMZ/M/yVI73EHBrCRTgkhu9oqG7vPqq+a/yadEW8aD+agKlk5xrmg==",+ "cpu": [+ "x64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "freebsd"+ ],+ "engines": {+ "node": ">=18"+ }+ },+ "node_modules/@esbuild/linux-arm": {+ "version": "0.28.2",+ "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.28.2.tgz",+ "integrity": "sha512-XlDnu2q5yoqems+xay6wSAcg9DDD7K9RLKZEBOMZm3ckNpJBvOX20tSfby8KfrrhINDyv9V2YVZKY/SpoGJI8w==",+ "cpu": [+ "arm"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ],+ "engines": {+ "node": ">=18"+ }+ },+ "node_modules/@esbuild/linux-arm64": {+ "version": "0.28.2",+ "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.28.2.tgz",+ "integrity": "sha512-pW4AC0P3it8c7do9MVM4p51FzHzdM/TZrerurgRcHJ2WTa1VQ1CIq18xncfpBJw4ojkiZZrKW2yIBWBP92j6Ug==",+ "cpu": [+ "arm64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ],+ "engines": {+ "node": ">=18"+ }+ },+ "node_modules/@esbuild/linux-ia32": {+ "version": "0.28.2",+ "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.28.2.tgz",+ "integrity": "sha512-CYbnj78HsIeA+DhgUKgFCfvNsTHFhMMrinUrMZpDXJXKN8T3XViTZ/+wtHeVxEWY8ewSzTFN+nRmSwO2tZaLUQ==",+ "cpu": [+ "ia32"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ],+ "engines": {+ "node": ">=18"+ }+ },+ "node_modules/@esbuild/linux-loong64": {+ "version": "0.28.2",+ "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.28.2.tgz",+ "integrity": "sha512-buwkd8nsph4R+ajRvw0qM5Hja/TXQow3ptzWO2EbG/cqcIkHloRrdlBtQlshyYGTNFvfkfJ5tpPLVkY4DtsPfQ==",+ "cpu": [+ "loong64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ],+ "engines": {+ "node": ">=18"+ }+ },+ "node_modules/@esbuild/linux-mips64el": {+ "version": "0.28.2",+ "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.28.2.tgz",+ "integrity": "sha512-ZVykbDyk7519VwiNb9Lcj9m8XM6v5V9uKPvrEMkkEedVewf+0itkhahp4HDpgERXhwLRpWFypsGbG/J8s0QjJA==",+ "cpu": [+ "mips64el"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ],+ "engines": {+ "node": ">=18"+ }+ },+ "node_modules/@esbuild/linux-ppc64": {+ "version": "0.28.2",+ "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.28.2.tgz",+ "integrity": "sha512-CAXl+Dtd9UUuJd8pKKdwh6MLm3MUMiqMPmhZ3tTSXPqfyQ3vDl6R5hZdZ/kYojK4ofXtdfSv1tFq8XzWx3heNQ==",+ "cpu": [+ "ppc64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ],+ "engines": {+ "node": ">=18"+ }+ },+ "node_modules/@esbuild/linux-riscv64": {+ "version": "0.28.2",+ "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.28.2.tgz",+ "integrity": "sha512-GeXCej4IQtU1B+QlDV8W/RRvbzI3O/Stss+/bCXv4lZls5WGRtu2a+3JkA3i4qIUlMXpcHebWpF8AkJhATowuA==",+ "cpu": [+ "riscv64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ],+ "engines": {+ "node": ">=18"+ }+ },+ "node_modules/@esbuild/linux-s390x": {+ "version": "0.28.2",+ "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.28.2.tgz",+ "integrity": "sha512-3H1weTYZPxt/WOhByszQZybS9w5lKzUn1FDMsgEChbHWQwHYQQRfBxgCcZvPhjHfKyJjIievvMmEUawJrdY9Dg==",+ "cpu": [+ "s390x"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ],+ "engines": {+ "node": ">=18"+ }+ },+ "node_modules/@esbuild/linux-x64": {+ "version": "0.28.2",+ "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.28.2.tgz",+ "integrity": "sha512-4xTZr1FUmSoQW4XIWmit3tzQrUTZM+N3P0XV8xROKYF50XfI7xeO90+1bZvNwxIufQ9hDQVRJH5YhgPVF8A/HQ==",+ "cpu": [+ "x64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ],+ "engines": {+ "node": ">=18"+ }+ },+ "node_modules/@esbuild/netbsd-arm64": {+ "version": "0.28.2",+ "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.28.2.tgz",+ "integrity": "sha512-sSATRjPeDBg3pdgHoQfoYBob11Kk1FGa9lui5RIHZCoCkJa9QKlvl3/vKz2usCmYYjs7ymJR/2Nnsqe+Hjt5nw==",+ "cpu": [+ "arm64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "netbsd"+ ],+ "engines": {+ "node": ">=18"+ }+ },+ "node_modules/@esbuild/netbsd-x64": {+ "version": "0.28.2",+ "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.28.2.tgz",+ "integrity": "sha512-lqnzCV+mM0gIADaKihiCg6ifgfU2L3h5E33rNQBN1Y4MaVGnzryzmvvf7UHxprpQdE8hpqLolJ9Rl+SkIRDpyw==",+ "cpu": [+ "x64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "netbsd"+ ],+ "engines": {+ "node": ">=18"+ }+ },+ "node_modules/@esbuild/openbsd-arm64": {+ "version": "0.28.2",+ "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.28.2.tgz",+ "integrity": "sha512-AL2qJILH7lNjrDmCQDvdxMfAUIv8KMNZOvrwAQ8i8//ntL9FflhOyMJ8OZSMBb8/AWXe3/5v5S20y3zCoZWKoQ==",+ "cpu": [+ "arm64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "openbsd"+ ],+ "engines": {+ "node": ">=18"+ }+ },+ "node_modules/@esbuild/openbsd-x64": {+ "version": "0.28.2",+ "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.28.2.tgz",+ "integrity": "sha512-QtiuPytchRyC4rwUKhexJdQKvDuZ6hWloi3igqPQNUJCS1/v9EiO3UTOXR6A3FoMo4fnAKbWJdqaIwhOzh8qEw==",+ "cpu": [+ "x64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "openbsd"+ ],+ "engines": {+ "node": ">=18"+ }+ },+ "node_modules/@esbuild/openharmony-arm64": {+ "version": "0.28.2",+ "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.28.2.tgz",+ "integrity": "sha512-WkhYDmpTjLvGlScA1rwjRUmhl4k8oXR3cIbtqWmELgU/dFeHHlEllxDvdWcNJV9rbzCexB5vz8gtNewWLgCT7Q==",+ "cpu": [+ "arm64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "openharmony"+ ],+ "engines": {+ "node": ">=18"+ }+ },+ "node_modules/@esbuild/sunos-x64": {+ "version": "0.28.2",+ "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.28.2.tgz",+ "integrity": "sha512-GPMSkTOtMnv2U2F8gxe4Io6qmVs+YKyp832Etqqxr0hFngmXQ3rzwytelm3GIn7T4VviRUlf3sOgBOiTdvaf7g==",+ "cpu": [+ "x64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "sunos"+ ],+ "engines": {+ "node": ">=18"+ }+ },+ "node_modules/@esbuild/win32-arm64": {+ "version": "0.28.2",+ "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.28.2.tgz",+ "integrity": "sha512-PIhhEkE9uPBleRBrQEJpUn7MBnibZzbGzYWPmY3x+YoVg/95zbjB4CxPPOQ8l5tYYM4mMaCthF8/1DIfBQQyWQ==",+ "cpu": [+ "arm64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "win32"+ ],+ "engines": {+ "node": ">=18"+ }+ },+ "node_modules/@esbuild/win32-ia32": {+ "version": "0.28.2",+ "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.28.2.tgz",+ "integrity": "sha512-YmJbfTlvU7Sdn9BB+4PRES4oB6pxgS37MAONj+hBr/cpXS1aBPKXxNnDbu+QCWPj0o9dgyxeq79g6c5P8KeuYA==",+ "cpu": [+ "ia32"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "win32"+ ],+ "engines": {+ "node": ">=18"+ }+ },+ "node_modules/@esbuild/win32-x64": {+ "version": "0.28.2",+ "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.28.2.tgz",+ "integrity": "sha512-5ebpxr3nWMzrL/rnUI755Jkuee0bHL/Gq0WTF9lvcpv73wAp5eu8MfBUgWK9bhWvZjj7yX8etf/8tI8Ney695g==",+ "cpu": [+ "x64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "win32"+ ],+ "engines": {+ "node": ">=18"+ }+ },+ "node_modules/@jridgewell/gen-mapping": {+ "version": "0.3.13",+ "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz",+ "integrity": "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@jridgewell/sourcemap-codec": "^1.5.0",+ "@jridgewell/trace-mapping": "^0.3.24"+ }+ },+ "node_modules/@jridgewell/remapping": {+ "version": "2.3.5",+ "resolved": "https://registry.npmjs.org/@jridgewell/remapping/-/remapping-2.3.5.tgz",+ "integrity": "sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@jridgewell/gen-mapping": "^0.3.5",+ "@jridgewell/trace-mapping": "^0.3.24"+ }+ },+ "node_modules/@jridgewell/resolve-uri": {+ "version": "3.1.2",+ "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz",+ "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=6.0.0"+ }+ },+ "node_modules/@jridgewell/sourcemap-codec": {+ "version": "1.5.5",+ "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz",+ "integrity": "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/@jridgewell/trace-mapping": {+ "version": "0.3.31",+ "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz",+ "integrity": "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@jridgewell/resolve-uri": "^3.1.0",+ "@jridgewell/sourcemap-codec": "^1.4.14"+ }+ },+ "node_modules/@napi-rs/lzma-linux-x64-gnu": {+ "version": "1.5.1",+ "resolved": "https://registry.npmjs.org/@napi-rs/lzma-linux-x64-gnu/-/lzma-linux-x64-gnu-1.5.1.tgz",+ "integrity": "sha512-oTXEIha4SsuXdTA4Iyskj0kpdx2yVXdhd75c2v3xGrHFfVMsbhTPZU/nMPL4sWKo4pBHm3aucLaqGlF696dTyQ==",+ "cpu": [+ "x64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ],+ "engines": {+ "node": "^22.20 || ^24.12 || >=25"+ }+ },+ "node_modules/@rolldown/pluginutils": {+ "version": "1.0.0-beta.27",+ "resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.0.0-beta.27.tgz",+ "integrity": "sha512-+d0F4MKMCbeVUJwG96uQ4SgAznZNSq93I3V+9NHA4OpvqG8mRCpGdKmK8l/dl02h2CCDHwW2FqilnTyDcAnqjA==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/@rollup/rollup-android-arm-eabi": {+ "version": "4.63.0",+ "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.63.0.tgz",+ "integrity": "sha512-70TeIFezKKy65LgAVyQh+w94/gjWhvPWaLaGGeMEgVrPkQhuj/M5bAYYZzIFUj9Y69oHyTm5Um/R6gcLh4A8JA==",+ "cpu": [+ "arm"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "android"+ ]+ },+ "node_modules/@rollup/rollup-android-arm64": {+ "version": "4.63.0",+ "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.63.0.tgz",+ "integrity": "sha512-YC86tYIHK6M1IV+wbzO+Bxk8RCBr6ZyWYgWxUCzaZD8mc8rrFoIJDNzDrkHBYRc/wKdrsIXmm6/F7NzrAO+OrA==",+ "cpu": [+ "arm64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "android"+ ]+ },+ "node_modules/@rollup/rollup-darwin-arm64": {+ "version": "4.63.0",+ "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.63.0.tgz",+ "integrity": "sha512-oI+ECtUcli0y0fi4xpW82GdPIXdTkI8G8DSjG2LRuw09fPAGykaWYH/hXxiKuTxiAjiPSTIIuYUqof5Z2hShWw==",+ "cpu": [+ "arm64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "darwin"+ ]+ },+ "node_modules/@rollup/rollup-darwin-x64": {+ "version": "4.63.0",+ "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.63.0.tgz",+ "integrity": "sha512-NwV+1s7TiKrMe4owHyKB/dTLD7ZJD0YEBEhIz+hvav1Cu1GReJjF+rsdNwjzENQeIAbE/CoNiaAc5Vz2h5DPAA==",+ "cpu": [+ "x64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "darwin"+ ]+ },+ "node_modules/@rollup/rollup-freebsd-arm64": {+ "version": "4.63.0",+ "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.63.0.tgz",+ "integrity": "sha512-tWtHBTu5gOPK4u4Urtk4qAHW3zZ9rQAmbssO8gp7ELvGTGI3aCiq6NqyTQ0PCIg7KbHJF2UkGDDs77YZGxfjCA==",+ "cpu": [+ "arm64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "freebsd"+ ]+ },+ "node_modules/@rollup/rollup-freebsd-x64": {+ "version": "4.63.0",+ "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.63.0.tgz",+ "integrity": "sha512-2qPoJiwTvtHQ27NnYvTnsgk8laXWYuVmNESG8WFZBcEPKLfZ3I27qBJarjVRQtwGeYyRfq5ZowHXih9lm2BItw==",+ "cpu": [+ "x64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "freebsd"+ ]+ },+ "node_modules/@rollup/rollup-linux-arm-gnueabihf": {+ "version": "4.63.0",+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.63.0.tgz",+ "integrity": "sha512-FQwsTRvLNuHoTdICABJQfbPUSEueISGmnpT06tXTMpfprf5NiKLSXKA0A+w45wJnCmZAnzgqBwbt6ARFuyOi5w==",+ "cpu": [+ "arm"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ]+ },+ "node_modules/@rollup/rollup-linux-arm-musleabihf": {+ "version": "4.63.0",+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.63.0.tgz",+ "integrity": "sha512-BBVTXziw8mY1a4ZbWME9tZyfzqXCDPqaC7Z3heQ29p5dkvXzwL0NwelO8zLa8c3RBKvl3YTuSnBgsBhYBtwjIw==",+ "cpu": [+ "arm"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ]+ },+ "node_modules/@rollup/rollup-linux-arm64-gnu": {+ "version": "4.63.0",+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.63.0.tgz",+ "integrity": "sha512-w2Iyy9+RqKwx3d9qWMKsJg0FfRBsY0/pXNv0mCQ3ueRvJI6+QAScfD4nrMlzFLs2HNVW6Ew+mtZfDl9b7Ew5/Q==",+ "cpu": [+ "arm64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ]+ },+ "node_modules/@rollup/rollup-linux-arm64-musl": {+ "version": "4.63.0",+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.63.0.tgz",+ "integrity": "sha512-YK++KtrFRHYE0P6/RtYEAy9t8F37znP+K03RrIuLPYOL6SVlObRumf/0OE4V/h63xL9DwkWbNssZfmA9hawuDA==",+ "cpu": [+ "arm64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ]+ },+ "node_modules/@rollup/rollup-linux-loong64-gnu": {+ "version": "4.63.0",+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.63.0.tgz",+ "integrity": "sha512-aBfOG6fP7YkkPmTqPwufRJeFyz7WPpECv9XNbnsk9+vg7rxdih0lbtEel7jcRng4LZrrmU3FfitCFyEj4BWDWg==",+ "cpu": [+ "loong64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ]+ },+ "node_modules/@rollup/rollup-linux-loong64-musl": {+ "version": "4.63.0",+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-musl/-/rollup-linux-loong64-musl-4.63.0.tgz",+ "integrity": "sha512-LGaHEOeHNAag9VuS1Crs5DFg4RrU9MPi2nVnNJk9DTePx/B6RRYKVmrIXt2h7YOJlwjaFJ6lwtFDliZxScTLrQ==",+ "cpu": [+ "loong64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ]+ },+ "node_modules/@rollup/rollup-linux-ppc64-gnu": {+ "version": "4.63.0",+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.63.0.tgz",+ "integrity": "sha512-jClvk+J0FC3b7Udvegiw5/4hErbHtmsNsQgENnKXDWtNCJXsJYZH5WURvu7imDOO38xYml24eeh5x3A04ppwCw==",+ "cpu": [+ "ppc64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ]+ },+ "node_modules/@rollup/rollup-linux-ppc64-musl": {+ "version": "4.63.0",+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-musl/-/rollup-linux-ppc64-musl-4.63.0.tgz",+ "integrity": "sha512-0OJlaGK+8+B777Ql5okIpD7ua5Ro9+VB9Ve0OKa28OQJZ1RbuUBVNHK/e3pr4BROqsyPl1JrPO1ZxJseCNffcA==",+ "cpu": [+ "ppc64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ]+ },+ "node_modules/@rollup/rollup-linux-riscv64-gnu": {+ "version": "4.63.0",+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.63.0.tgz",+ "integrity": "sha512-Ygsx+HoNH7afwi1bTIXbnTvVnsO+zurPLSYxybV1hHFVU72OWOCl6v05ql/z0hkpAPx+DK7Kn9Bi7MayCcjLTA==",+ "cpu": [+ "riscv64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ]+ },+ "node_modules/@rollup/rollup-linux-riscv64-musl": {+ "version": "4.63.0",+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.63.0.tgz",+ "integrity": "sha512-pDQxtMGb+OvG3fLwR2OkZlSd47hW+kWg4BYMG/++sR6RqorQccwPTDsxda5hPwiIeIErAnCF9ma3SAU06bdQtQ==",+ "cpu": [+ "riscv64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ]+ },+ "node_modules/@rollup/rollup-linux-s390x-gnu": {+ "version": "4.63.0",+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.63.0.tgz",+ "integrity": "sha512-0BnUG9mS8I4SSHr3XsxVhuCMEiu+rX61xxZF5vujso4LaiAGFZFxvDjg6Xn6tLPNTUAfuCvQYas4LMQMVsKRSQ==",+ "cpu": [+ "s390x"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ]+ },+ "node_modules/@rollup/rollup-linux-x64-gnu": {+ "version": "4.63.0",+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.63.0.tgz",+ "integrity": "sha512-Adu/VttB1dpPNW+FEacrZ+xVm9tFty84+RrFzsqlFaPxoJB+9XXyDGtp5dCOoBwGBIEVH0To7lExFXEx0BIF4A==",+ "cpu": [+ "x64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ]+ },+ "node_modules/@rollup/rollup-linux-x64-musl": {+ "version": "4.63.0",+ "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.63.0.tgz",+ "integrity": "sha512-NQ3bDvjUbFKmP23671xUlXtKmqVsUBd6M4PQCvbmNtOy06hnQIdKHy8oG/6S3R/S6He1JgPk6A5VT+prAJMYEw==",+ "cpu": [+ "x64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ]+ },+ "node_modules/@rollup/rollup-openbsd-x64": {+ "version": "4.63.0",+ "resolved": "https://registry.npmjs.org/@rollup/rollup-openbsd-x64/-/rollup-openbsd-x64-4.63.0.tgz",+ "integrity": "sha512-u2eDAl4+0aFvA13GxlGBtTI3SS3sdgwgtV0HyjZ0QaQVCgNE+jqNGey+GtxWiq+wxr/UycAx/OnfJzApCFamvA==",+ "cpu": [+ "x64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "openbsd"+ ]+ },+ "node_modules/@rollup/rollup-openharmony-arm64": {+ "version": "4.63.0",+ "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.63.0.tgz",+ "integrity": "sha512-XvRb5vfW3wAZQ+ZUG21AnHHDKtNcw99eigzEhjr//NZ3u7SoBaPP0seSc7FgP7p1epAEdAoZckMW9WY/+4w70w==",+ "cpu": [+ "arm64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "openharmony"+ ]+ },+ "node_modules/@rollup/rollup-win32-arm64-msvc": {+ "version": "4.63.0",+ "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.63.0.tgz",+ "integrity": "sha512-iZPmniy4kNBf5yo2RezbkYNNK5HPbXE9+g+twnbqSng7dtLEJy1SKoxiE/ni4FDacjyuZpEeb9U054N4EoKHYw==",+ "cpu": [+ "arm64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "win32"+ ]+ },+ "node_modules/@rollup/rollup-win32-ia32-msvc": {+ "version": "4.63.0",+ "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.63.0.tgz",+ "integrity": "sha512-mFBBd+LF37fnE8JnYUOH+imj0aPFPK30vpar4ehJkgnLj9sZn8ZxiRENmLtgIwxK7TC8klF6N57fxdNBwQoqOA==",+ "cpu": [+ "ia32"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "win32"+ ]+ },+ "node_modules/@rollup/rollup-win32-x64-gnu": {+ "version": "4.63.0",+ "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.63.0.tgz",+ "integrity": "sha512-ujeqEY3B+zbGn3Z4Q03cUBG/LGWnBJncVT36WER31LcOsQk9+1dmINKKtvmmfChUvRbK1G0R8OhMWFgHgaZtAw==",+ "cpu": [+ "x64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "win32"+ ]+ },+ "node_modules/@rollup/rollup-win32-x64-msvc": {+ "version": "4.63.0",+ "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.63.0.tgz",+ "integrity": "sha512-hncn90N4sOky0L2LKE5oESKLbxCPeVo4eLA2LSMoDzM+879ml4WSr+Rr4DWknNIVVvS1Hirkc9hx02W6YxS8rQ==",+ "cpu": [+ "x64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "win32"+ ]+ },+ "node_modules/@tailwindcss/node": {+ "version": "4.3.3",+ "resolved": "https://registry.npmjs.org/@tailwindcss/node/-/node-4.3.3.tgz",+ "integrity": "sha512-/T8IKEsf9VTU6tLjgC7+sv2mOPtQxzE2jMw7u4Tt40Tx+QSZxpzh95/H6cMKoja9XuW7iMdLJYBB0o9G1CaAgg==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@jridgewell/remapping": "^2.3.5",+ "enhanced-resolve": "^5.24.1",+ "jiti": "^2.7.0",+ "lightningcss": "1.32.0",+ "magic-string": "^0.30.21",+ "source-map-js": "^1.2.1",+ "tailwindcss": "4.3.3"+ }+ },+ "node_modules/@tailwindcss/oxide": {+ "version": "4.3.3",+ "resolved": "https://registry.npmjs.org/@tailwindcss/oxide/-/oxide-4.3.3.tgz",+ "integrity": "sha512-krXjAikiaFSPaK/FkAQT5UTx3VormQaiZ5hBFlJZ9UFQGB/rwg1MZIhHAG9smMQRTdyJxP6Qt5MwMtdyU5FWrA==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">= 20"+ },+ "optionalDependencies": {+ "@tailwindcss/oxide-android-arm64": "4.3.3",+ "@tailwindcss/oxide-darwin-arm64": "4.3.3",+ "@tailwindcss/oxide-darwin-x64": "4.3.3",+ "@tailwindcss/oxide-freebsd-x64": "4.3.3",+ "@tailwindcss/oxide-linux-arm-gnueabihf": "4.3.3",+ "@tailwindcss/oxide-linux-arm64-gnu": "4.3.3",+ "@tailwindcss/oxide-linux-arm64-musl": "4.3.3",+ "@tailwindcss/oxide-linux-x64-gnu": "4.3.3",+ "@tailwindcss/oxide-linux-x64-musl": "4.3.3",+ "@tailwindcss/oxide-wasm32-wasi": "4.3.3",+ "@tailwindcss/oxide-win32-arm64-msvc": "4.3.3",+ "@tailwindcss/oxide-win32-x64-msvc": "4.3.3"+ }+ },+ "node_modules/@tailwindcss/oxide-android-arm64": {+ "version": "4.3.3",+ "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-android-arm64/-/oxide-android-arm64-4.3.3.tgz",+ "integrity": "sha512-Y85A2gmPSkl5Ve5qR86GL4HT509cFqQh1aes9p3sSkyTPwt0Pppf3GkwGe4JPACcRYjgJIEhQgM6dBClnr0NYw==",+ "cpu": [+ "arm64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "android"+ ],+ "engines": {+ "node": ">= 20"+ }+ },+ "node_modules/@tailwindcss/oxide-darwin-arm64": {+ "version": "4.3.3",+ "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-darwin-arm64/-/oxide-darwin-arm64-4.3.3.tgz",+ "integrity": "sha512-BiaWatpBcERQFDlOjRDpIVXuFK5PJez5SA4JMg6VYZdBYU+qKfV/vqjcIs+IYmtitf1xYQZTwXvU/8y4lfZUGw==",+ "cpu": [+ "arm64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "darwin"+ ],+ "engines": {+ "node": ">= 20"+ }+ },+ "node_modules/@tailwindcss/oxide-darwin-x64": {+ "version": "4.3.3",+ "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-darwin-x64/-/oxide-darwin-x64-4.3.3.tgz",+ "integrity": "sha512-fAeUqfV5ndhxRwai8cXGzdLvul9utWOmeTkv69unv4ZXixjn61Z+p9lCWdwOwA3TYboG3BwdVuN/RDjhBRl0mw==",+ "cpu": [+ "x64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "darwin"+ ],+ "engines": {+ "node": ">= 20"+ }+ },+ "node_modules/@tailwindcss/oxide-freebsd-x64": {+ "version": "4.3.3",+ "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-freebsd-x64/-/oxide-freebsd-x64-4.3.3.tgz",+ "integrity": "sha512-iyf5bV6+wnAlflVeEy7R25dupxTNECZN5QMI0qNT6eT+EgaGdZcKhGkr5SdoaWiLJ3spLqIY9VCeSGrwmtg4kw==",+ "cpu": [+ "x64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "freebsd"+ ],+ "engines": {+ "node": ">= 20"+ }+ },+ "node_modules/@tailwindcss/oxide-linux-arm-gnueabihf": {+ "version": "4.3.3",+ "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm-gnueabihf/-/oxide-linux-arm-gnueabihf-4.3.3.tgz",+ "integrity": "sha512-aAYUprJAJQWWbRrPvtjdroZ56Md+JM8pMiopS6xGEwDfLhqj+2ver2p4nU4Mb3CRqcMmNBjo8KkUgcxhkzVQGQ==",+ "cpu": [+ "arm"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ],+ "engines": {+ "node": ">= 20"+ }+ },+ "node_modules/@tailwindcss/oxide-linux-arm64-gnu": {+ "version": "4.3.3",+ "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm64-gnu/-/oxide-linux-arm64-gnu-4.3.3.tgz",+ "integrity": "sha512-nDxldcEENOxZRzC2uu9jrutZdAAQtb+8WWDCSnWL1zvBk1+FN+x6MtDViPB5AJMfttVCUhehGWus3XBPgatM/w==",+ "cpu": [+ "arm64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ],+ "engines": {+ "node": ">= 20"+ }+ },+ "node_modules/@tailwindcss/oxide-linux-arm64-musl": {+ "version": "4.3.3",+ "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm64-musl/-/oxide-linux-arm64-musl-4.3.3.tgz",+ "integrity": "sha512-Md44bD6veX/PC5iyF8cDVnw4HBIANZepRZZ7a8DQOvkfo5WUBwcp6iAuCUz23u+4SUkhJlD3eL7hNdW8ezd/kA==",+ "cpu": [+ "arm64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ],+ "engines": {+ "node": ">= 20"+ }+ },+ "node_modules/@tailwindcss/oxide-linux-x64-gnu": {+ "version": "4.3.3",+ "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-x64-gnu/-/oxide-linux-x64-gnu-4.3.3.tgz",+ "integrity": "sha512-tx7us1muwOKAKWao2v/GaafFeQboE6aj88vC6ziN2NCGcRm8gWUhwjzg+YdVB1e4boAtdtma4L43onunI6NS4w==",+ "cpu": [+ "x64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ],+ "engines": {+ "node": ">= 20"+ }+ },+ "node_modules/@tailwindcss/oxide-linux-x64-musl": {+ "version": "4.3.3",+ "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-x64-musl/-/oxide-linux-x64-musl-4.3.3.tgz",+ "integrity": "sha512-SJxX60smvHgasZoBy11dX6YRjXJFovwWBoedhbQPOBzgFWBHGB+TVPWB9BxzR7TTxU8FQZAI2AyiNCMzFm8Img==",+ "cpu": [+ "x64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "linux"+ ],+ "engines": {+ "node": ">= 20"+ }+ },+ "node_modules/@tailwindcss/oxide-wasm32-wasi": {+ "version": "4.3.3",+ "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-wasm32-wasi/-/oxide-wasm32-wasi-4.3.3.tgz",+ "integrity": "sha512-jx1+rPhY/5Ympkktd656HBWEBLxP7dH06losBLjjf5vgCODXvi9KhtftWcMIwTFIDqBr7cRnQkdLnAG+IOlGvQ==",+ "bundleDependencies": [+ "@napi-rs/wasm-runtime",+ "@emnapi/core",+ "@emnapi/runtime",+ "@tybys/wasm-util",+ "@emnapi/wasi-threads",+ "tslib"+ ],+ "cpu": [+ "wasm32"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "dependencies": {+ "@emnapi/core": "^1.11.1",+ "@emnapi/runtime": "^1.11.1",+ "@emnapi/wasi-threads": "^1.2.2",+ "@napi-rs/wasm-runtime": "^1.1.4",+ "@tybys/wasm-util": "^0.10.2",+ "tslib": "^2.8.1"+ },+ "engines": {+ "node": ">=14.0.0"+ }+ },+ "node_modules/@tailwindcss/oxide-win32-arm64-msvc": {+ "version": "4.3.3",+ "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-win32-arm64-msvc/-/oxide-win32-arm64-msvc-4.3.3.tgz",+ "integrity": "sha512-3rc292Ca2ceK6Ulcc/bAVnTs/3nDtoPhyEKlgPv+yQJQi/JS/AMJlqzxvlDacL1nekbrcf6bTqp/jV4qgnPxNQ==",+ "cpu": [+ "arm64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "win32"+ ],+ "engines": {+ "node": ">= 20"+ }+ },+ "node_modules/@tailwindcss/oxide-win32-x64-msvc": {+ "version": "4.3.3",+ "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-win32-x64-msvc/-/oxide-win32-x64-msvc-4.3.3.tgz",+ "integrity": "sha512-yJ0pwIVc/nYeGoV02WtsN8KYyLQv7kyI2wDnkezyJlGGjkd4QLwDGAwl47YpPJeuI0M0ObaXGSPjvWDPeTPggw==",+ "cpu": [+ "x64"+ ],+ "dev": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "win32"+ ],+ "engines": {+ "node": ">= 20"+ }+ },+ "node_modules/@tailwindcss/vite": {+ "version": "4.3.3",+ "resolved": "https://registry.npmjs.org/@tailwindcss/vite/-/vite-4.3.3.tgz",+ "integrity": "sha512-yYU8cogLeSh/ms2jh8Fj7jaba/EWa7Ja6GoUqYZaraEuCI5YS6ms6ObZgjjedm+jm6XZjdNRWBpPP6Z86oOxcw==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@tailwindcss/node": "4.3.3",+ "@tailwindcss/oxide": "4.3.3",+ "tailwindcss": "4.3.3"+ },+ "peerDependencies": {+ "vite": "^5.2.0 || ^6 || ^7 || ^8"+ }+ },+ "node_modules/@tauri-apps/api": {+ "version": "2.11.1",+ "resolved": "https://registry.npmjs.org/@tauri-apps/api/-/api-2.11.1.tgz",+ "integrity": "sha512-M2FPuYND2m+wh5hfW9ZpSdxMPdEJovPBWwoHJmwUpysTYNHaOkVFN419m/K0LIgjb/7KU2vBgsUepJWugQCvAA==",+ "license": "Apache-2.0 OR MIT",+ "funding": {+ "type": "opencollective",+ "url": "https://opencollective.com/tauri"+ }+ },+ "node_modules/@tauri-apps/cli": {+ "version": "2.11.4",+ "resolved": "https://registry.npmjs.org/@tauri-apps/cli/-/cli-2.11.4.tgz",+ "integrity": "sha512-R8xGtMpwyetawSqm9kYOuMmEqkhUbvcUy8n0aNXIxollKBLESUu5f4Fx+64hgASYm1H+jSWq6jCW6zqTnH6hqQ==",+ "dev": true,+ "license": "Apache-2.0 OR MIT",+ "bin": {+ "tauri": "tauri.js"+ },+ "engines": {+ "node": ">= 10"+ },+ "funding": {+ "type": "opencollective",+ "url": "https://opencollective.com/tauri"+ },+ "optionalDependencies": {+ "@tauri-apps/cli-darwin-arm64": "2.11.4",+ "@tauri-apps/cli-darwin-x64": "2.11.4",+ "@tauri-apps/cli-linux-arm-gnueabihf": "2.11.4",+ "@tauri-apps/cli-linux-arm64-gnu": "2.11.4",+ "@tauri-apps/cli-linux-arm64-musl": "2.11.4",+ "@tauri-apps/cli-linux-riscv64-gnu": "2.11.4",+ "@tauri-apps/cli-linux-x64-gnu": "2.11.4",+ "@tauri-apps/cli-linux-x64-musl": "2.11.4",+ "@tauri-apps/cli-win32-arm64-msvc": "2.11.4",+ "@tauri-apps/cli-win32-ia32-msvc": "2.11.4",+ "@tauri-apps/cli-win32-x64-msvc": "2.11.4"+ }+ },+ "node_modules/@tauri-apps/cli-darwin-arm64": {+ "version": "2.11.4",+ "resolved": "https://registry.npmjs.org/@tauri-apps/cli-darwin-arm64/-/cli-darwin-arm64-2.11.4.tgz",+ "integrity": "sha512-1ryOF3ZhpZ/nemHV5zVwBQBz9jDGKmKPvWPADOhc83ig0P4bMc2iER4NbC6r9sjeIZ6RVQ4g3RZIYvezhcl4TQ==",+ "cpu": [+ "arm64"+ ],+ "dev": true,+ "license": "Apache-2.0 OR MIT",+ "optional": true,+ "os": [+ "darwin"+ ],+ "engines": {+ "node": ">= 10"+ }+ },+ "node_modules/@tauri-apps/cli-darwin-x64": {+ "version": "2.11.4",+ "resolved": "https://registry.npmjs.org/@tauri-apps/cli-darwin-x64/-/cli-darwin-x64-2.11.4.tgz",+ "integrity": "sha512-uFsGQAAfuyz1k/yGLmkWfkBlgKAqZfxqlHmLWx81QU27RJWfmbNHCIq8T8w1e+VClleIuZUjpHWfoE4E3DLo3A==",+ "cpu": [+ "x64"+ ],+ "dev": true,+ "license": "Apache-2.0 OR MIT",+ "optional": true,+ "os": [+ "darwin"+ ],+ "engines": {+ "node": ">= 10"+ }+ },+ "node_modules/@tauri-apps/cli-linux-arm-gnueabihf": {+ "version": "2.11.4",+ "resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-arm-gnueabihf/-/cli-linux-arm-gnueabihf-2.11.4.tgz",+ "integrity": "sha512-IaHZn5CdBL21oUmjiVOS1ctw6Ip1O0pjp70FwOWmYz1myWe0SY96ZIj2FYf7pT0m8bI2h/hrs5ZbEXXh44/MkQ==",+ "cpu": [+ "arm"+ ],+ "dev": true,+ "license": "Apache-2.0 OR MIT",+ "optional": true,+ "os": [+ "linux"+ ],+ "engines": {+ "node": ">= 10"+ }+ },+ "node_modules/@tauri-apps/cli-linux-arm64-gnu": {+ "version": "2.11.4",+ "resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-arm64-gnu/-/cli-linux-arm64-gnu-2.11.4.tgz",+ "integrity": "sha512-N41/ukTRVe6XSuUTESuFdGeOW2i7k62tK+6gHK5Kd5/q5RPvvi19GaWAVPPb9u95HSGmTChSolBfzynUsssFaA==",+ "cpu": [+ "arm64"+ ],+ "dev": true,+ "license": "Apache-2.0 OR MIT",+ "optional": true,+ "os": [+ "linux"+ ],+ "engines": {+ "node": ">= 10"+ }+ },+ "node_modules/@tauri-apps/cli-linux-arm64-musl": {+ "version": "2.11.4",+ "resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-arm64-musl/-/cli-linux-arm64-musl-2.11.4.tgz",+ "integrity": "sha512-v277UnT/fB64xAfSroL5N3Km3tLmvATWqJJw/wRI+g6o+HkeD0slyE7gOhNs1MbjE41R7bQOTxMVoL3aomUJmw==",+ "cpu": [+ "arm64"+ ],+ "dev": true,+ "license": "Apache-2.0 OR MIT",+ "optional": true,+ "os": [+ "linux"+ ],+ "engines": {+ "node": ">= 10"+ }+ },+ "node_modules/@tauri-apps/cli-linux-riscv64-gnu": {+ "version": "2.11.4",+ "resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-riscv64-gnu/-/cli-linux-riscv64-gnu-2.11.4.tgz",+ "integrity": "sha512-qqgNkQ2u1yZHxjhxsZaxUtRDW8dIqIYm33rx/mzwQv0SfY9x1B+iraj8vWeFiXjjSVVhEMepXSOts1TqPzvXNQ==",+ "cpu": [+ "riscv64"+ ],+ "dev": true,+ "license": "Apache-2.0 OR MIT",+ "optional": true,+ "os": [+ "linux"+ ],+ "engines": {+ "node": ">= 10"+ }+ },+ "node_modules/@tauri-apps/cli-linux-x64-gnu": {+ "version": "2.11.4",+ "resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-x64-gnu/-/cli-linux-x64-gnu-2.11.4.tgz",+ "integrity": "sha512-2VRNWl84FOH0m2giiDkO2h0QXlcMJeX+zJDpI5kDIQAx6s+geF3v48F4DXfJez4GS/FdoDGnPnw1C2iYGbQ7bQ==",+ "cpu": [+ "x64"+ ],+ "dev": true,+ "license": "Apache-2.0 OR MIT",+ "optional": true,+ "os": [+ "linux"+ ],+ "engines": {+ "node": ">= 10"+ }+ },+ "node_modules/@tauri-apps/cli-linux-x64-musl": {+ "version": "2.11.4",+ "resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-x64-musl/-/cli-linux-x64-musl-2.11.4.tgz",+ "integrity": "sha512-o9GyhYor/nc7xarmwDE3ka2szuW3uuZzXjHWh64Q8YX5AtSgxdQkFWzrY4O8KiGtVNvFBI14H3Q49Qj5TOIP/A==",+ "cpu": [+ "x64"+ ],+ "dev": true,+ "license": "Apache-2.0 OR MIT",+ "optional": true,+ "os": [+ "linux"+ ],+ "engines": {+ "node": ">= 10"+ }+ },+ "node_modules/@tauri-apps/cli-win32-arm64-msvc": {+ "version": "2.11.4",+ "resolved": "https://registry.npmjs.org/@tauri-apps/cli-win32-arm64-msvc/-/cli-win32-arm64-msvc-2.11.4.tgz",+ "integrity": "sha512-ld5Ehb598m0VkYyylRPNeCFsBe/km0jxis6KgMpl3IGY6I/i1RwQXO05I1AsXUXO2WC6AvB/Lw4qTf/asiuEiQ==",+ "cpu": [+ "arm64"+ ],+ "dev": true,+ "license": "Apache-2.0 OR MIT",+ "optional": true,+ "os": [+ "win32"+ ],+ "engines": {+ "node": ">= 10"+ }+ },+ "node_modules/@tauri-apps/cli-win32-ia32-msvc": {+ "version": "2.11.4",+ "resolved": "https://registry.npmjs.org/@tauri-apps/cli-win32-ia32-msvc/-/cli-win32-ia32-msvc-2.11.4.tgz",+ "integrity": "sha512-12Hxi0XX/H5VFxO/bGgHkFWhml9VMgEOu9CidjeCeTNQ1l6fpUlbiGgSP7CLI3PFtW9/FfbeHieZ+kyWK5H7CA==",+ "cpu": [+ "ia32"+ ],+ "dev": true,+ "license": "Apache-2.0 OR MIT",+ "optional": true,+ "os": [+ "win32"+ ],+ "engines": {+ "node": ">= 10"+ }+ },+ "node_modules/@tauri-apps/cli-win32-x64-msvc": {+ "version": "2.11.4",+ "resolved": "https://registry.npmjs.org/@tauri-apps/cli-win32-x64-msvc/-/cli-win32-x64-msvc-2.11.4.tgz",+ "integrity": "sha512-+vDiqBIU5dMISg/wNvX3sF+ZHfgJGJ5T0AcO+EHNXV9GGAG+P5fzodlDXD3QdKCRgZxMoCm5PPvj3BqLNjBthw==",+ "cpu": [+ "x64"+ ],+ "dev": true,+ "license": "Apache-2.0 OR MIT",+ "optional": true,+ "os": [+ "win32"+ ],+ "engines": {+ "node": ">= 10"+ }+ },+ "node_modules/@tauri-apps/plugin-dialog": {+ "version": "2.7.2",+ "resolved": "https://registry.npmjs.org/@tauri-apps/plugin-dialog/-/plugin-dialog-2.7.2.tgz",+ "integrity": "sha512-pX0IGm1I3I6wc+zeKYcq1GSqogK6okCNX5fOdaNU5ab1AjGS6l1E5wFNjEb7meg7ZFSp0JUs+0jQGQNyOvLrsg==",+ "license": "MIT OR Apache-2.0",+ "dependencies": {+ "@tauri-apps/api": "^2.11.0"+ }+ },+ "node_modules/@tauri-apps/plugin-opener": {+ "version": "2.5.4",+ "resolved": "https://registry.npmjs.org/@tauri-apps/plugin-opener/-/plugin-opener-2.5.4.tgz",+ "integrity": "sha512-1HnPkb+AmgO29HBazm4uPLKB+r7zzcTBW1d0fyYp1uP+jwtpoiNDGKMMzz58SFp49nOIrxdE3aUJtT57lfO9CQ==",+ "license": "MIT OR Apache-2.0",+ "dependencies": {+ "@tauri-apps/api": "^2.11.0"+ }+ },+ "node_modules/@types/babel__core": {+ "version": "7.20.5",+ "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz",+ "integrity": "sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@babel/parser": "^7.20.7",+ "@babel/types": "^7.20.7",+ "@types/babel__generator": "*",+ "@types/babel__template": "*",+ "@types/babel__traverse": "*"+ }+ },+ "node_modules/@types/babel__generator": {+ "version": "7.27.0",+ "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.27.0.tgz",+ "integrity": "sha512-ufFd2Xi92OAVPYsy+P4n7/U7e68fex0+Ee8gSG9KX7eo084CWiQ4sdxktvdl0bOPupXtVJPY19zk6EwWqUQ8lg==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@babel/types": "^7.0.0"+ }+ },+ "node_modules/@types/babel__template": {+ "version": "7.4.4",+ "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.4.tgz",+ "integrity": "sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@babel/parser": "^7.1.0",+ "@babel/types": "^7.0.0"+ }+ },+ "node_modules/@types/babel__traverse": {+ "version": "7.28.0",+ "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.28.0.tgz",+ "integrity": "sha512-8PvcXf70gTDZBgt9ptxJ8elBeBjcLOAcOtoO/mPJjtji1+CdGbHgm77om1GrsPxsiE+uXIpNSK64UYaIwQXd4Q==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@babel/types": "^7.28.2"+ }+ },+ "node_modules/@types/estree": {+ "version": "1.0.9",+ "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.9.tgz",+ "integrity": "sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/@types/react": {+ "version": "19.2.18",+ "resolved": "https://registry.npmjs.org/@types/react/-/react-19.2.18.tgz",+ "integrity": "sha512-AnzbBERsrLKtk2XSfTbYRLjQPdy116Sty4q+T+Bp3IC4l6jNBvreVPAHmpq9qhXQM7CXZPjLVmGMw9sy+hxQ3w==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "csstype": "^3.2.2"+ }+ },+ "node_modules/@types/react-dom": {+ "version": "19.2.5",+ "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-19.2.5.tgz",+ "integrity": "sha512-fMPwH9v7r/pp43yUd2/Mbiex5KouJwwR3dzHkhLREUC6764VyDsqxhAxv6OFEYR1RhjOyD1naqba8ECDBe7ZQg==",+ "dev": true,+ "license": "MIT",+ "peerDependencies": {+ "@types/react": "^19.2.0"+ }+ },+ "node_modules/@vitejs/plugin-react": {+ "version": "4.7.0",+ "resolved": "https://registry.npmjs.org/@vitejs/plugin-react/-/plugin-react-4.7.0.tgz",+ "integrity": "sha512-gUu9hwfWvvEDBBmgtAowQCojwZmJ5mcLn3aufeCsitijs3+f2NsrPtlAWIR6OPiqljl96GVCUbLe0HyqIpVaoA==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@babel/core": "^7.28.0",+ "@babel/plugin-transform-react-jsx-self": "^7.27.1",+ "@babel/plugin-transform-react-jsx-source": "^7.27.1",+ "@rolldown/pluginutils": "1.0.0-beta.27",+ "@types/babel__core": "^7.20.5",+ "react-refresh": "^0.17.0"+ },+ "engines": {+ "node": "^14.18.0 || >=16.0.0"+ },+ "peerDependencies": {+ "vite": "^4.2.0 || ^5.0.0 || ^6.0.0 || ^7.0.0"+ }+ },+ "node_modules/baseline-browser-mapping": {+ "version": "2.11.19",+ "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.11.19.tgz",+ "integrity": "sha512-Grytf1xOxOEMTGRwx6rLGKkTabd4vMg3VrKdj/7joCmV0qgh4QwMMO6xh34YEXQqirAuUdgQGa5orJQQ+69RBw==",+ "dev": true,+ "license": "Apache-2.0",+ "bin": {+ "baseline-browser-mapping": "dist/cli.cjs"+ },+ "engines": {+ "node": ">=6.0.0"+ }+ },+ "node_modules/browserslist": {+ "version": "4.28.8",+ "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.28.8.tgz",+ "integrity": "sha512-V2NpofLblG64mfOtSgDhOJESZEGogzDMBv/q+W6oc4LXWP/q75eOXoOaaOu1EOadB9U4Bwx/e0yzbvwKH8zalA==",+ "dev": true,+ "funding": [+ {+ "type": "opencollective",+ "url": "https://opencollective.com/browserslist"+ },+ {+ "type": "tidelift",+ "url": "https://tidelift.com/funding/github/npm/browserslist"+ },+ {+ "type": "github",+ "url": "https://github.com/sponsors/ai"+ }+ ],+ "license": "MIT",+ "dependencies": {+ "baseline-browser-mapping": "^2.11.12",+ "caniuse-lite": "^1.0.30001809",+ "electron-to-chromium": "^1.5.402",+ "node-releases": "^2.0.53",+ "update-browserslist-db": "^1.3.0"+ },+ "bin": {+ "browserslist": "cli.js"+ },+ "engines": {+ "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7"+ }+ },+ "node_modules/caniuse-lite": {+ "version": "1.0.30001810",+ "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001810.tgz",+ "integrity": "sha512-TITQPUkaz+aVk5GL6NhOdwk1aEaNTSDPsGFWrTuhKGtjTF70jL/Oht2W4c6rXUe5fu7Ie19VIahAXHIIiWWNeg==",+ "dev": true,+ "funding": [+ {+ "type": "opencollective",+ "url": "https://opencollective.com/browserslist"+ },+ {+ "type": "tidelift",+ "url": "https://tidelift.com/funding/github/npm/caniuse-lite"+ },+ {+ "type": "github",+ "url": "https://github.com/sponsors/ai"+ }+ ],+ "license": "CC-BY-4.0"+ },+ "node_modules/convert-source-map": {+ "version": "2.0.0",+ "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz",+ "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/csstype": {+ "version": "3.2.3",+ "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.2.3.tgz",+ "integrity": "sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/debug": {+ "version": "4.4.3",+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz",+ "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "ms": "^2.1.3"+ },+ "engines": {+ "node": ">=6.0"+ },+ "peerDependenciesMeta": {+ "supports-color": {+ "optional": true+ }+ }+ },+ "node_modules/detect-libc": {+ "version": "2.1.2",+ "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz",+ "integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==",+ "dev": true,+ "license": "Apache-2.0",+ "engines": {+ "node": ">=8"+ }+ },+ "node_modules/electron-to-chromium": {+ "version": "1.5.414",+ "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.414.tgz",+ "integrity": "sha512-aYlviXiaXBbzvKgyALpcMmqa3Np3sDr0XnZbEG62n2UpZFbEcjQ4EEMOLGzVPhwVnwTz0lvKY+GcARbunuHekw==",+ "dev": true,+ "license": "ISC"+ },+ "node_modules/enhanced-resolve": {+ "version": "5.24.5",+ "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.24.5.tgz",+ "integrity": "sha512-L1l8TNvomm6UVW5B253AGxQagSQr+vGwhMlrrfRS2qmhx46AMpMVJKQYLvWYbysTMY8VoicOvzHzoHMbyzB+4A==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "graceful-fs": "^4.2.4",+ "tapable": "^2.3.3"+ },+ "engines": {+ "node": ">=10.13.0"+ }+ },+ "node_modules/esbuild": {+ "version": "0.28.2",+ "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.28.2.tgz",+ "integrity": "sha512-HKVLS8dvII+xoKW9kmqxbRKrnWEXfJJr/FZhhJmiqIB0e053QNYFqOBouTMO/k5sID4MvCiUCvv8b9M4h32wIA==",+ "dev": true,+ "hasInstallScript": true,+ "license": "MIT",+ "bin": {+ "esbuild": "bin/esbuild"+ },+ "engines": {+ "node": ">=18"+ },+ "optionalDependencies": {+ "@esbuild/aix-ppc64": "0.28.2",+ "@esbuild/android-arm": "0.28.2",+ "@esbuild/android-arm64": "0.28.2",+ "@esbuild/android-x64": "0.28.2",+ "@esbuild/darwin-arm64": "0.28.2",+ "@esbuild/darwin-x64": "0.28.2",+ "@esbuild/freebsd-arm64": "0.28.2",+ "@esbuild/freebsd-x64": "0.28.2",+ "@esbuild/linux-arm": "0.28.2",+ "@esbuild/linux-arm64": "0.28.2",+ "@esbuild/linux-ia32": "0.28.2",+ "@esbuild/linux-loong64": "0.28.2",+ "@esbuild/linux-mips64el": "0.28.2",+ "@esbuild/linux-ppc64": "0.28.2",+ "@esbuild/linux-riscv64": "0.28.2",+ "@esbuild/linux-s390x": "0.28.2",+ "@esbuild/linux-x64": "0.28.2",+ "@esbuild/netbsd-arm64": "0.28.2",+ "@esbuild/netbsd-x64": "0.28.2",+ "@esbuild/openbsd-arm64": "0.28.2",+ "@esbuild/openbsd-x64": "0.28.2",+ "@esbuild/openharmony-arm64": "0.28.2",+ "@esbuild/sunos-x64": "0.28.2",+ "@esbuild/win32-arm64": "0.28.2",+ "@esbuild/win32-ia32": "0.28.2",+ "@esbuild/win32-x64": "0.28.2"+ }+ },+ "node_modules/escalade": {+ "version": "3.2.0",+ "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz",+ "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=6"+ }+ },+ "node_modules/fdir": {+ "version": "6.5.0",+ "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz",+ "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=12.0.0"+ },+ "peerDependencies": {+ "picomatch": "^3 || ^4"+ },+ "peerDependenciesMeta": {+ "picomatch": {+ "optional": true+ }+ }+ },+ "node_modules/fsevents": {+ "version": "2.3.3",+ "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz",+ "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==",+ "dev": true,+ "hasInstallScript": true,+ "license": "MIT",+ "optional": true,+ "os": [+ "darwin"+ ],+ "engines": {+ "node": "^8.16.0 || ^10.6.0 || >=11.0.0"+ }+ },+ "node_modules/gensync": {+ "version": "1.0.0-beta.2",+ "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz",+ "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=6.9.0"+ }+ },+ "node_modules/graceful-fs": {+ "version": "4.2.11",+ "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz",+ "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==",+ "dev": true,+ "license": "ISC"+ },+ "node_modules/jiti": {+ "version": "2.7.0",+ "resolved": "https://registry.npmjs.org/jiti/-/jiti-2.7.0.tgz",+ "integrity": "sha512-AC/7JofJvZGrrneWNaEnJeOLUx+JlGt7tNa0wZiRPT4MY1wmfKjt2+6O2p2uz2+skll8OZZmJMNqeke7kKbNgQ==",+ "dev": true,+ "license": "MIT",+ "bin": {+ "jiti": "lib/jiti-cli.mjs"+ }+ },+ "node_modules/js-tokens": {+ "version": "4.0.0",+ "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",+ "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/jsesc": {+ "version": "3.1.0",+ "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz",+ "integrity": "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==",+ "dev": true,+ "license": "MIT",+ "bin": {+ "jsesc": "bin/jsesc"+ },+ "engines": {+ "node": ">=6"+ }+ },+ "node_modules/json5": {+ "version": "2.2.3",+ "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz",+ "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==",+ "dev": true,+ "license": "MIT",+ "bin": {+ "json5": "lib/cli.js"+ },+ "engines": {+ "node": ">=6"+ }+ },+ "node_modules/lightningcss": {+ "version": "1.32.0",+ "resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.32.0.tgz",+ "integrity": "sha512-NXYBzinNrblfraPGyrbPoD19C1h9lfI/1mzgWYvXUTe414Gz/X1FD2XBZSZM7rRTrMA8JL3OtAaGifrIKhQ5yQ==",+ "dev": true,+ "license": "MPL-2.0",+ "dependencies": {+ "detect-libc": "^2.0.3"+ },+ "engines": {+ "node": ">= 12.0.0"+ },+ "funding": {+ "type": "opencollective",+ "url": "https://opencollective.com/parcel"+ },+ "optionalDependencies": {+ "lightningcss-android-arm64": "1.32.0",+ "lightningcss-darwin-arm64": "1.32.0",+ "lightningcss-darwin-x64": "1.32.0",+ "lightningcss-freebsd-x64": "1.32.0",+ "lightningcss-linux-arm-gnueabihf": "1.32.0",+ "lightningcss-linux-arm64-gnu": "1.32.0",+ "lightningcss-linux-arm64-musl": "1.32.0",+ "lightningcss-linux-x64-gnu": "1.32.0",+ "lightningcss-linux-x64-musl": "1.32.0",+ "lightningcss-win32-arm64-msvc": "1.32.0",+ "lightningcss-win32-x64-msvc": "1.32.0"+ }+ },+ "node_modules/lightningcss-android-arm64": {+ "version": "1.32.0",+ "resolved": "https://registry.npmjs.org/lightningcss-android-arm64/-/lightningcss-android-arm64-1.32.0.tgz",+ "integrity": "sha512-YK7/ClTt4kAK0vo6w3X+Pnm0D2cf2vPHbhOXdoNti1Ga0al1P4TBZhwjATvjNwLEBCnKvjJc2jQgHXH0NEwlAg==",+ "cpu": [+ "arm64"+ ],+ "dev": true,+ "license": "MPL-2.0",+ "optional": true,+ "os": [+ "android"+ ],+ "engines": {+ "node": ">= 12.0.0"+ },+ "funding": {+ "type": "opencollective",+ "url": "https://opencollective.com/parcel"+ }+ },+ "node_modules/lightningcss-darwin-arm64": {+ "version": "1.32.0",+ "resolved": "https://registry.npmjs.org/lightningcss-darwin-arm64/-/lightningcss-darwin-arm64-1.32.0.tgz",+ "integrity": "sha512-RzeG9Ju5bag2Bv1/lwlVJvBE3q6TtXskdZLLCyfg5pt+HLz9BqlICO7LZM7VHNTTn/5PRhHFBSjk5lc4cmscPQ==",+ "cpu": [+ "arm64"+ ],+ "dev": true,+ "license": "MPL-2.0",+ "optional": true,+ "os": [+ "darwin"+ ],+ "engines": {+ "node": ">= 12.0.0"+ },+ "funding": {+ "type": "opencollective",+ "url": "https://opencollective.com/parcel"+ }+ },+ "node_modules/lightningcss-darwin-x64": {+ "version": "1.32.0",+ "resolved": "https://registry.npmjs.org/lightningcss-darwin-x64/-/lightningcss-darwin-x64-1.32.0.tgz",+ "integrity": "sha512-U+QsBp2m/s2wqpUYT/6wnlagdZbtZdndSmut/NJqlCcMLTWp5muCrID+K5UJ6jqD2BFshejCYXniPDbNh73V8w==",+ "cpu": [+ "x64"+ ],+ "dev": true,+ "license": "MPL-2.0",+ "optional": true,+ "os": [+ "darwin"+ ],+ "engines": {+ "node": ">= 12.0.0"+ },+ "funding": {+ "type": "opencollective",+ "url": "https://opencollective.com/parcel"+ }+ },+ "node_modules/lightningcss-freebsd-x64": {+ "version": "1.32.0",+ "resolved": "https://registry.npmjs.org/lightningcss-freebsd-x64/-/lightningcss-freebsd-x64-1.32.0.tgz",+ "integrity": "sha512-JCTigedEksZk3tHTTthnMdVfGf61Fky8Ji2E4YjUTEQX14xiy/lTzXnu1vwiZe3bYe0q+SpsSH/CTeDXK6WHig==",+ "cpu": [+ "x64"+ ],+ "dev": true,+ "license": "MPL-2.0",+ "optional": true,+ "os": [+ "freebsd"+ ],+ "engines": {+ "node": ">= 12.0.0"+ },+ "funding": {+ "type": "opencollective",+ "url": "https://opencollective.com/parcel"+ }+ },+ "node_modules/lightningcss-linux-arm-gnueabihf": {+ "version": "1.32.0",+ "resolved": "https://registry.npmjs.org/lightningcss-linux-arm-gnueabihf/-/lightningcss-linux-arm-gnueabihf-1.32.0.tgz",+ "integrity": "sha512-x6rnnpRa2GL0zQOkt6rts3YDPzduLpWvwAF6EMhXFVZXD4tPrBkEFqzGowzCsIWsPjqSK+tyNEODUBXeeVHSkw==",+ "cpu": [+ "arm"+ ],+ "dev": true,+ "license": "MPL-2.0",+ "optional": true,+ "os": [+ "linux"+ ],+ "engines": {+ "node": ">= 12.0.0"+ },+ "funding": {+ "type": "opencollective",+ "url": "https://opencollective.com/parcel"+ }+ },+ "node_modules/lightningcss-linux-arm64-gnu": {+ "version": "1.32.0",+ "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-gnu/-/lightningcss-linux-arm64-gnu-1.32.0.tgz",+ "integrity": "sha512-0nnMyoyOLRJXfbMOilaSRcLH3Jw5z9HDNGfT/gwCPgaDjnx0i8w7vBzFLFR1f6CMLKF8gVbebmkUN3fa/kQJpQ==",+ "cpu": [+ "arm64"+ ],+ "dev": true,+ "license": "MPL-2.0",+ "optional": true,+ "os": [+ "linux"+ ],+ "engines": {+ "node": ">= 12.0.0"+ },+ "funding": {+ "type": "opencollective",+ "url": "https://opencollective.com/parcel"+ }+ },+ "node_modules/lightningcss-linux-arm64-musl": {+ "version": "1.32.0",+ "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-musl/-/lightningcss-linux-arm64-musl-1.32.0.tgz",+ "integrity": "sha512-UpQkoenr4UJEzgVIYpI80lDFvRmPVg6oqboNHfoH4CQIfNA+HOrZ7Mo7KZP02dC6LjghPQJeBsvXhJod/wnIBg==",+ "cpu": [+ "arm64"+ ],+ "dev": true,+ "license": "MPL-2.0",+ "optional": true,+ "os": [+ "linux"+ ],+ "engines": {+ "node": ">= 12.0.0"+ },+ "funding": {+ "type": "opencollective",+ "url": "https://opencollective.com/parcel"+ }+ },+ "node_modules/lightningcss-linux-x64-gnu": {+ "version": "1.32.0",+ "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-gnu/-/lightningcss-linux-x64-gnu-1.32.0.tgz",+ "integrity": "sha512-V7Qr52IhZmdKPVr+Vtw8o+WLsQJYCTd8loIfpDaMRWGUZfBOYEJeyJIkqGIDMZPwPx24pUMfwSxxI8phr/MbOA==",+ "cpu": [+ "x64"+ ],+ "dev": true,+ "license": "MPL-2.0",+ "optional": true,+ "os": [+ "linux"+ ],+ "engines": {+ "node": ">= 12.0.0"+ },+ "funding": {+ "type": "opencollective",+ "url": "https://opencollective.com/parcel"+ }+ },+ "node_modules/lightningcss-linux-x64-musl": {+ "version": "1.32.0",+ "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-musl/-/lightningcss-linux-x64-musl-1.32.0.tgz",+ "integrity": "sha512-bYcLp+Vb0awsiXg/80uCRezCYHNg1/l3mt0gzHnWV9XP1W5sKa5/TCdGWaR/zBM2PeF/HbsQv/j2URNOiVuxWg==",+ "cpu": [+ "x64"+ ],+ "dev": true,+ "license": "MPL-2.0",+ "optional": true,+ "os": [+ "linux"+ ],+ "engines": {+ "node": ">= 12.0.0"+ },+ "funding": {+ "type": "opencollective",+ "url": "https://opencollective.com/parcel"+ }+ },+ "node_modules/lightningcss-win32-arm64-msvc": {+ "version": "1.32.0",+ "resolved": "https://registry.npmjs.org/lightningcss-win32-arm64-msvc/-/lightningcss-win32-arm64-msvc-1.32.0.tgz",+ "integrity": "sha512-8SbC8BR40pS6baCM8sbtYDSwEVQd4JlFTOlaD3gWGHfThTcABnNDBda6eTZeqbofalIJhFx0qKzgHJmcPTnGdw==",+ "cpu": [+ "arm64"+ ],+ "dev": true,+ "license": "MPL-2.0",+ "optional": true,+ "os": [+ "win32"+ ],+ "engines": {+ "node": ">= 12.0.0"+ },+ "funding": {+ "type": "opencollective",+ "url": "https://opencollective.com/parcel"+ }+ },+ "node_modules/lightningcss-win32-x64-msvc": {+ "version": "1.32.0",+ "resolved": "https://registry.npmjs.org/lightningcss-win32-x64-msvc/-/lightningcss-win32-x64-msvc-1.32.0.tgz",+ "integrity": "sha512-Amq9B/SoZYdDi1kFrojnoqPLxYhQ4Wo5XiL8EVJrVsB8ARoC1PWW6VGtT0WKCemjy8aC+louJnjS7U18x3b06Q==",+ "cpu": [+ "x64"+ ],+ "dev": true,+ "license": "MPL-2.0",+ "optional": true,+ "os": [+ "win32"+ ],+ "engines": {+ "node": ">= 12.0.0"+ },+ "funding": {+ "type": "opencollective",+ "url": "https://opencollective.com/parcel"+ }+ },+ "node_modules/lru-cache": {+ "version": "5.1.1",+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz",+ "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==",+ "dev": true,+ "license": "ISC",+ "dependencies": {+ "yallist": "^3.0.2"+ }+ },+ "node_modules/magic-string": {+ "version": "0.30.21",+ "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.21.tgz",+ "integrity": "sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@jridgewell/sourcemap-codec": "^1.5.5"+ }+ },+ "node_modules/ms": {+ "version": "2.1.3",+ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz",+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/nanoid": {+ "version": "3.3.18",+ "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.18.tgz",+ "integrity": "sha512-DTg4MJbGMWkfi6VZFdNt2/caMbQy4Ou+Op/hJQvGEWcnVfoA1QA+xzRKAzw9jD6+GVOOeYr/mIcuDSdug6F6+w==",+ "dev": true,+ "funding": [+ {+ "type": "github",+ "url": "https://github.com/sponsors/ai"+ }+ ],+ "license": "MIT",+ "bin": {+ "nanoid": "bin/nanoid.cjs"+ },+ "engines": {+ "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1"+ }+ },+ "node_modules/node-releases": {+ "version": "2.0.53",+ "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.53.tgz",+ "integrity": "sha512-D9UOmYG3UH1V+ENW56t5QXBwJw1YEY18ruVeus89Rw+SyIgjPkCO84bRzO3uNIYosJbNwiabWVn48o3uJLjxFQ==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=18"+ }+ },+ "node_modules/picocolors": {+ "version": "1.1.1",+ "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz",+ "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==",+ "dev": true,+ "license": "ISC"+ },+ "node_modules/picomatch": {+ "version": "4.0.7",+ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.7.tgz",+ "integrity": "sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=12"+ },+ "funding": {+ "url": "https://github.com/sponsors/jonschlinkert"+ }+ },+ "node_modules/postcss": {+ "version": "8.5.26",+ "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.26.tgz",+ "integrity": "sha512-u82N74LFzG8ca+dD8puPnplTXoGH4fTPpVGuIbt36G3qvNlkvfD0lEAZSxaly3KX8TS/L1A1gsCEmvKmBcVbkQ==",+ "dev": true,+ "funding": [+ {+ "type": "opencollective",+ "url": "https://opencollective.com/postcss/"+ },+ {+ "type": "tidelift",+ "url": "https://tidelift.com/funding/github/npm/postcss"+ },+ {+ "type": "github",+ "url": "https://github.com/sponsors/ai"+ }+ ],+ "license": "MIT",+ "dependencies": {+ "nanoid": "^3.3.17",+ "picocolors": "^1.1.1",+ "source-map-js": "^1.2.1"+ },+ "engines": {+ "node": "^10 || ^12 || >=14"+ }+ },+ "node_modules/react": {+ "version": "19.2.8",+ "resolved": "https://registry.npmjs.org/react/-/react-19.2.8.tgz",+ "integrity": "sha512-PWaYA1L/q9u2u7xYQi+Y3L3Yfnie7XyLeaJICV1MGD6LprsBxcAqGjYyr0eY3p+QdsA+x/Irkt4Qif8D63+Sbw==",+ "license": "MIT",+ "engines": {+ "node": ">=0.10.0"+ }+ },+ "node_modules/react-dom": {+ "version": "19.2.8",+ "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.2.8.tgz",+ "integrity": "sha512-rVprimfGBG3DR+Tq0IQG2DT5PxKth1WIGDmj5yPmlzr4YBe7uyE+Du4oVqTDXZSHGGGXRtTJEGSSePyQCMBglQ==",+ "license": "MIT",+ "dependencies": {+ "scheduler": "^0.27.0"+ },+ "peerDependencies": {+ "react": "^19.2.8"+ }+ },+ "node_modules/react-refresh": {+ "version": "0.17.0",+ "resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.17.0.tgz",+ "integrity": "sha512-z6F7K9bV85EfseRCp2bzrpyQ0Gkw1uLoCel9XBVWPg/TjRj94SkJzUTGfOa4bs7iJvBWtQG0Wq7wnI0syw3EBQ==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=0.10.0"+ }+ },+ "node_modules/rollup": {+ "version": "4.63.0",+ "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.63.0.tgz",+ "integrity": "sha512-T5vnZ2y4QqC3/4P+w2+JO+Q/OVdnPsv4XcSYJYMEn0R9/jjl5AgLwO9LAZMzP2lN71O6pypn91rB7lDstUkfrQ==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "@types/estree": "1.0.9"+ },+ "bin": {+ "rollup": "dist/bin/rollup"+ },+ "engines": {+ "node": ">=18.0.0",+ "npm": ">=8.0.0"+ },+ "optionalDependencies": {+ "@napi-rs/lzma-linux-x64-gnu": "1.5.1",+ "@rollup/rollup-android-arm-eabi": "4.63.0",+ "@rollup/rollup-android-arm64": "4.63.0",+ "@rollup/rollup-darwin-arm64": "4.63.0",+ "@rollup/rollup-darwin-x64": "4.63.0",+ "@rollup/rollup-freebsd-arm64": "4.63.0",+ "@rollup/rollup-freebsd-x64": "4.63.0",+ "@rollup/rollup-linux-arm-gnueabihf": "4.63.0",+ "@rollup/rollup-linux-arm-musleabihf": "4.63.0",+ "@rollup/rollup-linux-arm64-gnu": "4.63.0",+ "@rollup/rollup-linux-arm64-musl": "4.63.0",+ "@rollup/rollup-linux-loong64-gnu": "4.63.0",+ "@rollup/rollup-linux-loong64-musl": "4.63.0",+ "@rollup/rollup-linux-ppc64-gnu": "4.63.0",+ "@rollup/rollup-linux-ppc64-musl": "4.63.0",+ "@rollup/rollup-linux-riscv64-gnu": "4.63.0",+ "@rollup/rollup-linux-riscv64-musl": "4.63.0",+ "@rollup/rollup-linux-s390x-gnu": "4.63.0",+ "@rollup/rollup-linux-x64-gnu": "4.63.0",+ "@rollup/rollup-linux-x64-musl": "4.63.0",+ "@rollup/rollup-openbsd-x64": "4.63.0",+ "@rollup/rollup-openharmony-arm64": "4.63.0",+ "@rollup/rollup-win32-arm64-msvc": "4.63.0",+ "@rollup/rollup-win32-ia32-msvc": "4.63.0",+ "@rollup/rollup-win32-x64-gnu": "4.63.0",+ "@rollup/rollup-win32-x64-msvc": "4.63.0",+ "fsevents": "~2.3.2"+ }+ },+ "node_modules/scheduler": {+ "version": "0.27.0",+ "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.27.0.tgz",+ "integrity": "sha512-eNv+WrVbKu1f3vbYJT/xtiF5syA5HPIMtf9IgY/nKg0sWqzAUEvqY/xm7OcZc/qafLx/iO9FgOmeSAp4v5ti/Q==",+ "license": "MIT"+ },+ "node_modules/semver": {+ "version": "6.3.1",+ "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz",+ "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==",+ "dev": true,+ "license": "ISC",+ "bin": {+ "semver": "bin/semver.js"+ }+ },+ "node_modules/source-map-js": {+ "version": "1.2.1",+ "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz",+ "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==",+ "dev": true,+ "license": "BSD-3-Clause",+ "engines": {+ "node": ">=0.10.0"+ }+ },+ "node_modules/tailwindcss": {+ "version": "4.3.3",+ "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-4.3.3.tgz",+ "integrity": "sha512-gOhV3P7ufE62QDGg1zVaTgCR+EtPv92k2nIhVcVKcLmxT1sUBsQGhnZj175j+MqRt4zLF7ic+sCYjfhxMxj7YQ==",+ "dev": true,+ "license": "MIT"+ },+ "node_modules/tapable": {+ "version": "2.3.3",+ "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.3.3.tgz",+ "integrity": "sha512-uxc/zpqFg6x7C8vOE7lh6Lbda8eEL9zmVm/PLeTPBRhh1xCgdWaQ+J1CUieGpIfm2HdtsUpRv+HshiasBMcc6A==",+ "dev": true,+ "license": "MIT",+ "engines": {+ "node": ">=6"+ },+ "funding": {+ "type": "opencollective",+ "url": "https://opencollective.com/webpack"+ }+ },+ "node_modules/tinyglobby": {+ "version": "0.2.17",+ "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.17.tgz",+ "integrity": "sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "fdir": "^6.5.0",+ "picomatch": "^4.0.4"+ },+ "engines": {+ "node": ">=12.0.0"+ },+ "funding": {+ "url": "https://github.com/sponsors/SuperchupuDev"+ }+ },+ "node_modules/typescript": {+ "version": "5.8.3",+ "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.8.3.tgz",+ "integrity": "sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==",+ "dev": true,+ "license": "Apache-2.0",+ "bin": {+ "tsc": "bin/tsc",+ "tsserver": "bin/tsserver"+ },+ "engines": {+ "node": ">=14.17"+ }+ },+ "node_modules/update-browserslist-db": {+ "version": "1.3.1",+ "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.3.1.tgz",+ "integrity": "sha512-ZZ61DsRsOnakl74HAmp3oSN4aXUmEWXf+i/yv0h7tIBfICc3VdrFErQKUUKPgu3AMsTUMbcongALEN4l6GSUrQ==",+ "dev": true,+ "funding": [+ {+ "type": "opencollective",+ "url": "https://opencollective.com/browserslist"+ },+ {+ "type": "tidelift",+ "url": "https://tidelift.com/funding/github/npm/browserslist"+ },+ {+ "type": "github",+ "url": "https://github.com/sponsors/ai"+ }+ ],+ "license": "MIT",+ "dependencies": {+ "escalade": "^3.2.0",+ "picocolors": "^1.1.1"+ },+ "bin": {+ "update-browserslist-db": "cli.js"+ },+ "peerDependencies": {+ "browserslist": ">= 4.21.0"+ }+ },+ "node_modules/vite": {+ "version": "7.3.6",+ "resolved": "https://registry.npmjs.org/vite/-/vite-7.3.6.tgz",+ "integrity": "sha512-4XP60spRGjSZFf1qYH+dJIkK2znL3zQfl9KkOV9MkkRR/3Dls0dxaBsQPTloEc5BLXWPL9vsOxopxyKoMmDueg==",+ "dev": true,+ "license": "MIT",+ "dependencies": {+ "esbuild": "^0.27.0 || ^0.28.0",+ "fdir": "^6.5.0",+ "picomatch": "^4.0.3",+ "postcss": "^8.5.6",+ "rollup": "^4.43.0",+ "tinyglobby": "^0.2.15"+ },+ "bin": {+ "vite": "bin/vite.js"+ },+ "engines": {+ "node": "^20.19.0 || >=22.12.0"+ },+ "funding": {+ "url": "https://github.com/vitejs/vite?sponsor=1"+ },+ "optionalDependencies": {+ "fsevents": "~2.3.3"+ },+ "peerDependencies": {+ "@types/node": "^20.19.0 || >=22.12.0",+ "jiti": ">=1.21.0",+ "less": "^4.0.0",+ "lightningcss": "^1.21.0",+ "sass": "^1.70.0",+ "sass-embedded": "^1.70.0",+ "stylus": ">=0.54.8",+ "sugarss": "^5.0.0",+ "terser": "^5.16.0",+ "tsx": "^4.8.1",+ "yaml": "^2.4.2"+ },+ "peerDependenciesMeta": {+ "@types/node": {+ "optional": true+ },+ "jiti": {+ "optional": true+ },+ "less": {+ "optional": true+ },+ "lightningcss": {+ "optional": true+ },+ "sass": {+ "optional": true+ },+ "sass-embedded": {+ "optional": true+ },+ "stylus": {+ "optional": true+ },+ "sugarss": {+ "optional": true+ },+ "terser": {+ "optional": true+ },+ "tsx": {+ "optional": true+ },+ "yaml": {+ "optional": true+ }+ }+ },+ "node_modules/yallist": {+ "version": "3.1.1",+ "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz",+ "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==",+ "dev": true,+ "license": "ISC"+ }+ }+}diff --git a/desktop/package.json b/desktop/package.jsonnew file mode 100644index 00000000..57f3c3ad--- /dev/null+++ b/desktop/package.json@@ -0,0 +1,32 @@+{+ "name": "relay-desktop",+ "private": true,+ "version": "0.1.0",+ "type": "module",+ "scripts": {+ "dev": "vite",+ "build": "tsc && vite build",+ "preview": "vite preview",+ "tauri": "tauri",+ "app": "tauri dev",+ "app:build": "tauri build",+ "typecheck": "tsc --noEmit"+ },+ "dependencies": {+ "@tauri-apps/api": "^2",+ "@tauri-apps/plugin-dialog": "^2.7.2",+ "@tauri-apps/plugin-opener": "^2",+ "react": "^19.1.0",+ "react-dom": "^19.1.0"+ },+ "devDependencies": {+ "@tailwindcss/vite": "^4",+ "@tauri-apps/cli": "^2",+ "@types/react": "^19.1.8",+ "@types/react-dom": "^19.1.6",+ "@vitejs/plugin-react": "^4.6.0",+ "tailwindcss": "^4",+ "typescript": "~5.8.3",+ "vite": "^7.0.4"+ }+}diff --git a/desktop/public/tauri.svg b/desktop/public/tauri.svgnew file mode 100644index 00000000..31b62c92--- /dev/null+++ b/desktop/public/tauri.svg@@ -0,0 +1,6 @@+<svg width="206" height="231" viewBox="0 0 206 231" fill="none" xmlns="http://www.w3.org/2000/svg">+<path d="M143.143 84C143.143 96.1503 133.293 106 121.143 106C108.992 106 99.1426 96.1503 99.1426 84C99.1426 71.8497 108.992 62 121.143 62C133.293 62 143.143 71.8497 143.143 84Z" fill="#FFC131"/>+<ellipse cx="84.1426" cy="147" rx="22" ry="22" transform="rotate(180 84.1426 147)" fill="#24C8DB"/>+<path fill-rule="evenodd" clip-rule="evenodd" d="M166.738 154.548C157.86 160.286 148.023 164.269 137.757 166.341C139.858 160.282 141 153.774 141 147C141 144.543 140.85 142.121 140.558 139.743C144.975 138.204 149.215 136.139 153.183 133.575C162.73 127.404 170.292 118.608 174.961 108.244C179.63 97.8797 181.207 86.3876 179.502 75.1487C177.798 63.9098 172.884 53.4021 165.352 44.8883C157.82 36.3744 147.99 30.2165 137.042 27.1546C126.095 24.0926 114.496 24.2568 103.64 27.6274C92.7839 30.998 83.1319 37.4317 75.8437 46.1553C74.9102 47.2727 74.0206 48.4216 73.176 49.5993C61.9292 50.8488 51.0363 54.0318 40.9629 58.9556C44.2417 48.4586 49.5653 38.6591 56.679 30.1442C67.0505 17.7298 80.7861 8.57426 96.2354 3.77762C111.685 -1.01901 128.19 -1.25267 143.769 3.10474C159.348 7.46215 173.337 16.2252 184.056 28.3411C194.775 40.457 201.767 55.4101 204.193 71.404C206.619 87.3978 204.374 103.752 197.73 118.501C191.086 133.25 180.324 145.767 166.738 154.548ZM41.9631 74.275L62.5557 76.8042C63.0459 72.813 63.9401 68.9018 65.2138 65.1274C57.0465 67.0016 49.2088 70.087 41.9631 74.275Z" fill="#FFC131"/>+<path fill-rule="evenodd" clip-rule="evenodd" d="M38.4045 76.4519C47.3493 70.6709 57.2677 66.6712 67.6171 64.6132C65.2774 70.9669 64 77.8343 64 85.0001C64 87.1434 64.1143 89.26 64.3371 91.3442C60.0093 92.8732 55.8533 94.9092 51.9599 97.4256C42.4128 103.596 34.8505 112.392 30.1816 122.756C25.5126 133.12 23.9357 144.612 25.6403 155.851C27.3449 167.09 32.2584 177.598 39.7906 186.112C47.3227 194.626 57.153 200.784 68.1003 203.846C79.0476 206.907 90.6462 206.743 101.502 203.373C112.359 200.002 122.011 193.568 129.299 184.845C130.237 183.722 131.131 182.567 131.979 181.383C143.235 180.114 154.132 176.91 164.205 171.962C160.929 182.49 155.596 192.319 148.464 200.856C138.092 213.27 124.357 222.426 108.907 227.222C93.458 232.019 76.9524 232.253 61.3736 227.895C45.7948 223.538 31.8055 214.775 21.0867 202.659C10.3679 190.543 3.37557 175.59 0.949823 159.596C-1.47592 143.602 0.768139 127.248 7.41237 112.499C14.0566 97.7497 24.8183 85.2327 38.4045 76.4519ZM163.062 156.711L163.062 156.711C162.954 156.773 162.846 156.835 162.738 156.897C162.846 156.835 162.954 156.773 163.062 156.711Z" fill="#24C8DB"/>+</svg>diff --git a/desktop/public/vite.svg b/desktop/public/vite.svgnew file mode 100644index 00000000..e7b8dfb1--- /dev/null+++ b/desktop/public/vite.svg@@ -0,0 +1 @@+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>\ No newline at end of filediff --git a/desktop/src-tauri/.gitignore b/desktop/src-tauri/.gitignorenew file mode 100644index 00000000..b21bd681--- /dev/null+++ b/desktop/src-tauri/.gitignore@@ -0,0 +1,7 @@+# Generated by Cargo+# will have compiled files and executables+/target/++# Generated by Tauri+# will have schema files for capabilities auto-completion+/gen/schemasdiff --git a/desktop/src-tauri/Cargo.lock b/desktop/src-tauri/Cargo.locknew file mode 100644index 00000000..4ea91f22--- /dev/null+++ b/desktop/src-tauri/Cargo.lock@@ -0,0 +1,5182 @@+# This file is automatically @generated by Cargo.+# It is not intended for manual editing.+version = 4++[[package]]+name = "adler2"+version = "2.0.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa"++[[package]]+name = "aho-corasick"+version = "1.1.5"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "c982642fa9e8606056828ee9a8505737230110bb1099153c79efe865c59d12ba"+dependencies = [+ "memchr",+]++[[package]]+name = "alloc-no-stdlib"+version = "2.0.4"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "cc7bb162ec39d46ab1ca8c77bf72e890535becd1751bb45f64c597edb4c8c6b3"++[[package]]+name = "alloc-stdlib"+version = "0.2.4"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "0e76a019e91224d279006ff972f1e984179a6e9feb050adba6ce8274aef23195"+dependencies = [+ "alloc-no-stdlib",+]++[[package]]+name = "android_system_properties"+version = "0.1.6"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "ae221649c9976a6f6c56ae1facf410f3ddb33cc661c4b7b61020a912d4237fbc"+dependencies = [+ "libc",+]++[[package]]+name = "anyhow"+version = "1.0.104"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "330a5ed07fa54e4702c9d6c4174f74427fc0ef6e214bbd677ae50a5099946470"++[[package]]+name = "async-broadcast"+version = "0.7.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "435a87a52755b8f27fcf321ac4f04b2802e337c8c4872923137471ec39c37532"+dependencies = [+ "event-listener",+ "event-listener-strategy",+ "futures-core",+ "pin-project-lite",+]++[[package]]+name = "async-channel"+version = "2.5.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "924ed96dd52d1b75e9c1a3e6275715fd320f5f9439fb5a4a11fa51f4221158d2"+dependencies = [+ "concurrent-queue",+ "event-listener-strategy",+ "futures-core",+ "pin-project-lite",+]++[[package]]+name = "async-executor"+version = "1.14.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "c96bf972d85afc50bf5ab8fe2d54d1586b4e0b46c97c50a0c9e71e2f7bcd812a"+dependencies = [+ "async-task",+ "concurrent-queue",+ "fastrand",+ "futures-lite",+ "pin-project-lite",+ "slab",+]++[[package]]+name = "async-io"+version = "2.6.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "456b8a8feb6f42d237746d4b3e9a178494627745c3c56c6ea55d92ba50d026fc"+dependencies = [+ "autocfg",+ "cfg-if",+ "concurrent-queue",+ "futures-io",+ "futures-lite",+ "parking",+ "polling",+ "rustix",+ "slab",+ "windows-sys 0.61.2",+]++[[package]]+name = "async-lock"+version = "3.4.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "290f7f2596bd5b78a9fec8088ccd89180d7f9f55b94b0576823bbbdc72ee8311"+dependencies = [+ "event-listener",+ "event-listener-strategy",+ "pin-project-lite",+]++[[package]]+name = "async-process"+version = "2.5.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "fc50921ec0055cdd8a16de48773bfeec5c972598674347252c0399676be7da75"+dependencies = [+ "async-channel",+ "async-io",+ "async-lock",+ "async-signal",+ "async-task",+ "blocking",+ "cfg-if",+ "event-listener",+ "futures-lite",+ "rustix",+]++[[package]]+name = "async-recursion"+version = "1.1.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11"+dependencies = [+ "proc-macro2",+ "quote",+ "syn 2.0.119",+]++[[package]]+name = "async-signal"+version = "0.2.14"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "52b5aaafa020cf5053a01f2a60e8ff5dccf550f0f77ec54a4e47285ac2bab485"+dependencies = [+ "async-io",+ "async-lock",+ "atomic-waker",+ "cfg-if",+ "futures-core",+ "futures-io",+ "rustix",+ "signal-hook-registry",+ "slab",+ "windows-sys 0.61.2",+]++[[package]]+name = "async-task"+version = "4.7.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "8b75356056920673b02621b35afd0f7dda9306d03c79a30f5c56c44cf256e3de"++[[package]]+name = "async-trait"+version = "0.1.92"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "82f6aeea286b8eb4dd3431a1be1b59d290ace00f5bfd8e2a159bc2a05e2c1667"+dependencies = [+ "proc-macro2",+ "quote",+ "syn 3.0.4",+]++[[package]]+name = "atk"+version = "0.18.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "241b621213072e993be4f6f3a9e4b45f65b7e6faad43001be957184b7bb1824b"+dependencies = [+ "atk-sys",+ "glib",+ "libc",+]++[[package]]+name = "atk-sys"+version = "0.18.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "c5e48b684b0ca77d2bbadeef17424c2ea3c897d44d566a1617e7e8f30614d086"+dependencies = [+ "glib-sys",+ "gobject-sys",+ "libc",+ "system-deps",+]++[[package]]+name = "atomic-waker"+version = "1.1.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0"++[[package]]+name = "autocfg"+version = "1.5.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "f2032f911046de80f0a198e0901378627c33f59ea0ac00e363d481118bd70a53"++[[package]]+name = "base64"+version = "0.21.7"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567"++[[package]]+name = "base64"+version = "0.22.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6"++[[package]]+name = "bit-set"+version = "0.8.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "08807e080ed7f9d5433fa9b275196cfc35414f66a0c79d864dc51a0d825231a3"+dependencies = [+ "bit-vec",+]++[[package]]+name = "bit-vec"+version = "0.8.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "5e764a1d40d510daf35e07be9eb06e75770908c27d411ee6c92109c9840eaaf7"++[[package]]+name = "bitflags"+version = "1.3.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"++[[package]]+name = "bitflags"+version = "2.13.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "b588b76d00fde79687d7646a9b5bdf3cc0f655e0bbd080335a95d7e96f3587da"+dependencies = [+ "serde_core",+]++[[package]]+name = "block-buffer"+version = "0.10.4"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71"+dependencies = [+ "generic-array",+]++[[package]]+name = "block2"+version = "0.6.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "cdeb9d870516001442e364c5220d3574d2da8dc765554b4a617230d33fa58ef5"+dependencies = [+ "objc2",+]++[[package]]+name = "blocking"+version = "1.7.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "a70e4329df6cb94385eed412ec92375c3cdd8a6e502493d1229b6414e4036dfa"+dependencies = [+ "async-channel",+ "async-task",+ "futures-io",+ "futures-lite",+ "piper",+]++[[package]]+name = "brotli"+version = "8.0.4"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "5cc91aac060a7a1e25823bdccbfb6af1875b88f17c6daac97894eed8207166b3"+dependencies = [+ "alloc-no-stdlib",+ "alloc-stdlib",+ "brotli-decompressor",+]++[[package]]+name = "brotli-decompressor"+version = "5.0.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "3a32acac15fe1967bc3986b2a6347dffc965602354ea6f450ad07e8bfd253583"+dependencies = [+ "alloc-no-stdlib",+ "alloc-stdlib",+]++[[package]]+name = "bs58"+version = "0.5.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "bf88ba1141d185c399bee5288d850d63b8369520c1eafc32a0430b5b6c287bf4"+dependencies = [+ "tinyvec",+]++[[package]]+name = "bumpalo"+version = "3.20.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "72f5acc6cb2ba439de613abc23857ec3d78374d8ed5ac84e9d11336e87da8649"++[[package]]+name = "bytemuck"+version = "1.25.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "95832e849adfb21180ccb6826a99da14e5d266ae5c2e668e1602cf234f153797"++[[package]]+name = "byteorder"+version = "1.5.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b"++[[package]]+name = "bytes"+version = "1.12.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "fc652a48c352aef3ea3aed32080501cf3ef6ed5da78602a020c991775b0aff04"+dependencies = [+ "serde",+]++[[package]]+name = "cairo-rs"+version = "0.18.5"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "8ca26ef0159422fb77631dc9d17b102f253b876fe1586b03b803e63a309b4ee2"+dependencies = [+ "bitflags 2.13.1",+ "cairo-sys-rs",+ "glib",+ "libc",+ "once_cell",+ "thiserror 1.0.69",+]++[[package]]+name = "cairo-sys-rs"+version = "0.18.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "685c9fa8e590b8b3d678873528d83411db17242a73fccaed827770ea0fedda51"+dependencies = [+ "glib-sys",+ "libc",+ "system-deps",+]++[[package]]+name = "camino"+version = "1.2.5"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "bb1307f12aa967b5a58416e87b3653360e0fd614a016b6e970db08fecbb1b80d"+dependencies = [+ "serde_core",+]++[[package]]+name = "cargo-platform"+version = "0.1.9"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "e35af189006b9c0f00a064685c727031e3ed2d8020f7ba284d78cc2671bd36ea"+dependencies = [+ "serde",+]++[[package]]+name = "cargo_metadata"+version = "0.19.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "dd5eb614ed4c27c5d706420e4320fbe3216ab31fa1c33cd8246ac36dae4479ba"+dependencies = [+ "camino",+ "cargo-platform",+ "semver",+ "serde",+ "serde_json",+ "thiserror 2.0.20",+]++[[package]]+name = "cargo_toml"+version = "0.22.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "374b7c592d9c00c1f4972ea58390ac6b18cbb6ab79011f3bdc90a0b82ca06b77"+dependencies = [+ "serde",+ "toml 0.9.12+spec-1.1.0",+]++[[package]]+name = "cc"+version = "1.4.4"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "0ad534f4357a5264cce5019c989cf66a4f0dc4e0d1b1d15f8aacec0ff7360273"+dependencies = [+ "find-msvc-tools",+ "shlex",+]++[[package]]+name = "cesu8"+version = "1.1.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c"++[[package]]+name = "cfb"+version = "0.7.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "d38f2da7a0a2c4ccf0065be06397cc26a81f4e528be095826eee9d4adbb8c60f"+dependencies = [+ "byteorder",+ "fnv",+ "uuid",+]++[[package]]+name = "cfg-expr"+version = "0.15.8"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "d067ad48b8650848b989a59a86c6c36a995d02d2bf778d45c3c5d57bc2718f02"+dependencies = [+ "smallvec",+ "target-lexicon",+]++[[package]]+name = "cfg-if"+version = "1.0.4"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801"++[[package]]+name = "chrono"+version = "0.4.45"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "1aa79e62e7697b8e29b513a68abacf485adcd1fe8284a4316c5ae868e6633327"+dependencies = [+ "iana-time-zone",+ "num-traits",+ "serde",+ "windows-link 0.2.1",+]++[[package]]+name = "combine"+version = "4.6.8"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "cfc320937d09e6de266b31b9afb480f197d7a861be86be7cb2ea7e5d1bfffc5e"+dependencies = [+ "bytes",+ "memchr",+]++[[package]]+name = "concurrent-queue"+version = "2.5.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "4ca0197aee26d1ae37445ee532fefce43251d24cc7c166799f4d46817f1d3973"+dependencies = [+ "crossbeam-utils",+]++[[package]]+name = "cookie"+version = "0.18.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "1a373e3602691c3cdea496d2f0ee5935151e6168fe87739483c463db1b2f2f87"+dependencies = [+ "time",+ "version_check",+]++[[package]]+name = "core-foundation"+version = "0.10.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "b2a6cd9ae233e7f62ba4e9353e81a88df7fc8a5987b8d445b4d90c879bd156f6"+dependencies = [+ "core-foundation-sys",+ "libc",+]++[[package]]+name = "core-foundation-sys"+version = "0.8.7"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b"++[[package]]+name = "core-graphics"+version = "0.25.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "064badf302c3194842cf2c5d61f56cc88e54a759313879cdf03abdd27d0c3b97"+dependencies = [+ "bitflags 2.13.1",+ "core-foundation",+ "core-graphics-types",+ "foreign-types",+ "libc",+]++[[package]]+name = "core-graphics-types"+version = "0.2.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "3d44a101f213f6c4cdc1853d4b78aef6db6bdfa3468798cc1d9912f4735013eb"+dependencies = [+ "bitflags 2.13.1",+ "core-foundation",+ "libc",+]++[[package]]+name = "cpufeatures"+version = "0.2.17"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280"+dependencies = [+ "libc",+]++[[package]]+name = "crc32fast"+version = "1.5.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "8498c871161e1742aaa9d52551b2d6ebdd4c3d45a3be423e3728f33b955be550"+dependencies = [+ "cfg-if",+]++[[package]]+name = "crossbeam-channel"+version = "0.5.16"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "d85363c37faeca707aef026efa9f3b34d077bce547e48f770770625c6013679e"+dependencies = [+ "crossbeam-utils",+]++[[package]]+name = "crossbeam-utils"+version = "0.8.22"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "61803da095bee82a81bb1a452ecc25d3b2f1416d1897eb86430c6159ef717c17"++[[package]]+name = "crypto-common"+version = "0.1.7"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "78c8292055d1c1df0cce5d180393dc8cce0abec0a7102adb6c7b1eef6016d60a"+dependencies = [+ "generic-array",+ "typenum",+]++[[package]]+name = "cssparser"+version = "0.36.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "dae61cf9c0abb83bd659dab65b7e4e38d8236824c85f0f804f173567bda257d2"+dependencies = [+ "cssparser-macros",+ "dtoa-short",+ "itoa",+ "phf",+ "smallvec",+]++[[package]]+name = "cssparser-macros"+version = "0.6.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "13b588ba4ac1a99f7f2964d24b3d896ddc6bf847ee3855dbd4366f058cfcd331"+dependencies = [+ "quote",+ "syn 2.0.119",+]++[[package]]+name = "ctor"+version = "0.8.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "352d39c2f7bef1d6ad73db6f5160efcaed66d94ef8c6c573a8410c00bf909a98"+dependencies = [+ "ctor-proc-macro",+ "dtor",+]++[[package]]+name = "ctor-proc-macro"+version = "0.0.7"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "52560adf09603e58c9a7ee1fe1dcb95a16927b17c127f0ac02d6e768a0e25bc1"++[[package]]+name = "darling"+version = "0.23.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "25ae13da2f202d56bd7f91c25fba009e7717a1e4a1cc98a76d844b65ae912e9d"+dependencies = [+ "darling_core",+ "darling_macro",+]++[[package]]+name = "darling_core"+version = "0.23.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "9865a50f7c335f53564bb694ef660825eb8610e0a53d3e11bf1b0d3df31e03b0"+dependencies = [+ "ident_case",+ "proc-macro2",+ "quote",+ "strsim",+ "syn 2.0.119",+]++[[package]]+name = "darling_macro"+version = "0.23.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "ac3984ec7bd6cfa798e62b4a642426a5be0e68f9401cfc2a01e3fa9ea2fcdb8d"+dependencies = [+ "darling_core",+ "quote",+ "syn 2.0.119",+]++[[package]]+name = "dbus"+version = "0.9.12"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "3ab69f03cc8c4340c9c8e315114e1658e6775a9b16a04357973aa21cec22b32e"+dependencies = [+ "libc",+ "libdbus-sys",+ "windows-sys 0.61.2",+]++[[package]]+name = "defmt"+version = "1.1.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "e2953bfe4f93bbd20cc71198842756f77d161884c99ebbabc41d80231ded88d1"+dependencies = [+ "bitflags 1.3.2",+ "defmt-macros",+]++[[package]]+name = "defmt-macros"+version = "1.1.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "bad9c72e7ca2137e0dc3813245a0d282fd6daad32fd800af018306a9169b5fe8"+dependencies = [+ "defmt-parser",+ "proc-macro2",+ "quote",+ "syn 2.0.119",+]++[[package]]+name = "defmt-parser"+version = "1.0.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "10d60334b3b2e7c9d91ef8150abfb6fa4c1c39ebbcf4a81c2e346aad939fee3e"+dependencies = [+ "thiserror 2.0.20",+]++[[package]]+name = "deranged"+version = "0.5.8"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "7cd812cc2bc1d69d4764bd80df88b4317eaef9e773c75226407d9bc0876b211c"+dependencies = [+ "serde_core",+]++[[package]]+name = "derive_more"+version = "2.1.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "d751e9e49156b02b44f9c1815bcb94b984cdcc4396ecc32521c739452808b134"+dependencies = [+ "derive_more-impl",+]++[[package]]+name = "derive_more-impl"+version = "2.1.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "799a97264921d8623a957f6c3b9011f3b5492f557bbb7a5a19b7fa6d06ba8dcb"+dependencies = [+ "proc-macro2",+ "quote",+ "rustc_version",+ "syn 2.0.119",+]++[[package]]+name = "digest"+version = "0.10.7"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292"+dependencies = [+ "block-buffer",+ "crypto-common",+]++[[package]]+name = "dirs"+version = "6.0.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "c3e8aa94d75141228480295a7d0e7feb620b1a5ad9f12bc40be62411e38cce4e"+dependencies = [+ "dirs-sys",+]++[[package]]+name = "dirs-sys"+version = "0.5.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "e01a3366d27ee9890022452ee61b2b63a67e6f13f58900b651ff5665f0bb1fab"+dependencies = [+ "libc",+ "option-ext",+ "redox_users",+ "windows-sys 0.61.2",+]++[[package]]+name = "dispatch2"+version = "0.3.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "1e0e367e4e7da84520dedcac1901e4da967309406d1e51017ae1abfb97adbd38"+dependencies = [+ "bitflags 2.13.1",+ "block2",+ "libc",+ "objc2",+]++[[package]]+name = "displaydoc"+version = "0.2.7"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "c6232dd377dcc64799954cbd3a9bb882e9cdc1308ccd87b1c098f1fb2eaf82a8"+dependencies = [+ "proc-macro2",+ "quote",+ "syn 3.0.4",+]++[[package]]+name = "dlopen2"+version = "0.8.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "5e2c5bd4158e66d1e215c49b837e11d62f3267b30c92f1d171c4d3105e3dc4d4"+dependencies = [+ "dlopen2_derive",+ "libc",+ "once_cell",+ "winapi",+]++[[package]]+name = "dlopen2_derive"+version = "0.4.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "0fbbb781877580993a8707ec48672673ec7b81eeba04cfd2310bd28c08e47c8f"+dependencies = [+ "proc-macro2",+ "quote",+ "syn 2.0.119",+]++[[package]]+name = "dom_query"+version = "0.27.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "521e380c0c8afb8d9a1e83a1822ee03556fc3e3e7dbc1fd30be14e37f9cb3f89"+dependencies = [+ "bit-set",+ "cssparser",+ "foldhash",+ "html5ever",+ "precomputed-hash",+ "selectors",+ "tendril",+]++[[package]]+name = "dpi"+version = "0.1.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "d8b14ccef22fc6f5a8f4d7d768562a182c04ce9a3b3157b91390b52ddfdf1a76"+dependencies = [+ "serde",+]++[[package]]+name = "dtoa"+version = "1.0.11"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "4c3cf4824e2d5f025c7b531afcb2325364084a16806f6d47fbc1f5fbd9960590"++[[package]]+name = "dtoa-short"+version = "0.3.5"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "cd1511a7b6a56299bd043a9c167a6d2bfb37bf84a6dfceaba651168adfb43c87"+dependencies = [+ "dtoa",+]++[[package]]+name = "dtor"+version = "0.3.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "f1057d6c64987086ff8ed0fd3fbf377a6b7d205cc7715868cd401705f715cbe4"+dependencies = [+ "dtor-proc-macro",+]++[[package]]+name = "dtor-proc-macro"+version = "0.0.6"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "f678cf4a922c215c63e0de95eb1ff08a958a81d47e485cf9da1e27bf6305cfa5"++[[package]]+name = "dunce"+version = "1.0.5"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "92773504d58c093f6de2459af4af33faa518c13451eb8f2b5698ed3d36e7c813"++[[package]]+name = "dyn-clone"+version = "1.0.20"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "d0881ea181b1df73ff77ffaaf9c7544ecc11e82fba9b5f27b262a3c73a332555"++[[package]]+name = "embed-resource"+version = "3.0.11"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "fbfdaacccebec3b28e4866b8973543c7647797db5ada1bdab552e48fe665fbbd"+dependencies = [+ "cc",+ "memchr",+ "rustc_version",+ "toml 1.1.4+spec-1.1.0",+ "vswhom",+ "winreg",+]++[[package]]+name = "embed_plist"+version = "1.2.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "4ef6b89e5b37196644d8796de5268852ff179b44e96276cf4290264843743bb7"++[[package]]+name = "endi"+version = "1.1.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "66b7e2430c6dff6a955451e2cfc438f09cea1965a9d6f87f7e3b90decc014099"++[[package]]+name = "enumflags2"+version = "0.7.12"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "1027f7680c853e056ebcec683615fb6fbbc07dbaa13b4d5d9442b146ded4ecef"+dependencies = [+ "enumflags2_derive",+ "serde",+]++[[package]]+name = "enumflags2_derive"+version = "0.7.12"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "67c78a4d8fdf9953a5c9d458f9efe940fd97a0cab0941c075a813ac594733827"+dependencies = [+ "proc-macro2",+ "quote",+ "syn 2.0.119",+]++[[package]]+name = "equivalent"+version = "1.0.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f"++[[package]]+name = "erased-serde"+version = "0.4.10"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "d2add8a07dd6a8d93ff627029c51de145e12686fbc36ecb298ac22e74cf02dec"+dependencies = [+ "serde",+ "serde_core",+ "typeid",+]++[[package]]+name = "errno"+version = "0.3.14"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb"+dependencies = [+ "libc",+ "windows-sys 0.61.2",+]++[[package]]+name = "event-listener"+version = "5.4.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "5a23add41df1562121a9393cb065eab5146a1242410f23a644851e90cfd669d2"+dependencies = [+ "parking",+ "pin-project-lite",+]++[[package]]+name = "event-listener-strategy"+version = "0.5.4"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "8be9f3dfaaffdae2972880079a491a1a8bb7cbed0b8dd7a347f668b4150a3b93"+dependencies = [+ "event-listener",+ "pin-project-lite",+]++[[package]]+name = "fastrand"+version = "2.5.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "da7c62ceae207dd37ea5b845da6a0696c799f85e97da1ab5b7910be3c1c80223"++[[package]]+name = "fdeflate"+version = "0.3.7"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "1e6853b52649d4ac5c0bd02320cddc5ba956bdb407c4b75a2c6b75bf51500f8c"+dependencies = [+ "simd-adler32",+]++[[package]]+name = "field-offset"+version = "0.3.6"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "38e2275cc4e4fc009b0669731a1e5ab7ebf11f469eaede2bab9309a5b4d6057f"+dependencies = [+ "memoffset",+ "rustc_version",+]++[[package]]+name = "find-msvc-tools"+version = "0.1.11"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "d45db016d36b838f563236e9193d0ee6ce38f3f68b6c94e914b4929c96bbb890"++[[package]]+name = "flate2"+version = "1.1.9"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "843fba2746e448b37e26a819579957415c8cef339bf08564fe8b7ddbd959573c"+dependencies = [+ "crc32fast",+ "miniz_oxide",+]++[[package]]+name = "fnv"+version = "1.0.7"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1"++[[package]]+name = "foldhash"+version = "0.2.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "77ce24cb58228fbb8aa041425bb1050850ac19177686ea6e0f41a70416f56fdb"++[[package]]+name = "foreign-types"+version = "0.5.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "d737d9aa519fb7b749cbc3b962edcf310a8dd1f4b67c91c4f83975dbdd17d965"+dependencies = [+ "foreign-types-macros",+ "foreign-types-shared",+]++[[package]]+name = "foreign-types-macros"+version = "0.2.4"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "ea5190182e6915eb873ddbc16e23b711b6eb1f9c00a0d0a3a91b5f6228475225"+dependencies = [+ "proc-macro2",+ "quote",+ "syn 3.0.4",+]++[[package]]+name = "foreign-types-shared"+version = "0.3.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "aa9a19cbb55df58761df49b23516a86d432839add4af60fc256da840f66ed35b"++[[package]]+name = "form_urlencoded"+version = "1.2.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "cb4cb245038516f5f85277875cdaa4f7d2c9a0fa0468de06ed190163b1581fcf"+dependencies = [+ "percent-encoding",+]++[[package]]+name = "futures-channel"+version = "0.3.34"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "b1f9e3d69d39e4862ffed03ed071a76f9a13ba1d9109d355b0f0aa6b15e393c4"+dependencies = [+ "futures-core",+]++[[package]]+name = "futures-core"+version = "0.3.34"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "92d699e522242e69e3003b94ecc1f960f3a5e015aa7c5d7486e65ad01dd94f5e"++[[package]]+name = "futures-executor"+version = "0.3.34"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "031b47cf1a3c6cc8bc2fc76cd437f521619387907d469316e7c0bc278f1f5432"+dependencies = [+ "futures-core",+ "futures-task",+ "futures-util",+]++[[package]]+name = "futures-io"+version = "0.3.34"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "53c0fa8157de1303bfffdaa1cc2a673bfffb60102f76b0ef4441659124373fed"++[[package]]+name = "futures-lite"+version = "2.6.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "f78e10609fe0e0b3f4157ffab1876319b5b0db102a2c60dc4626306dc46b44ad"+dependencies = [+ "fastrand",+ "futures-core",+ "futures-io",+ "parking",+ "pin-project-lite",+]++[[package]]+name = "futures-macro"+version = "0.3.34"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "9fb9654ba8355388abeb8dcb4fc62f511300867002afc858860463bdd9fe0c44"+dependencies = [+ "proc-macro2",+ "quote",+ "syn 3.0.4",+]++[[package]]+name = "futures-sink"+version = "0.3.34"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "1944426bf7d03f1d14f708785e4b33efd750b36d48a157b836b3efc15ede8e1d"++[[package]]+name = "futures-task"+version = "0.3.34"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "cd417de3d1d015fc3bfd2b1ea46dfc7bab72ef86f1cc7cc9c78e728b34a6d1fd"++[[package]]+name = "futures-util"+version = "0.3.34"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "0d50a92467f8ba5dd6e3ee5d4bd04d73ab2e4e1c44474a0674821dfce14b79bc"+dependencies = [+ "futures-core",+ "futures-io",+ "futures-macro",+ "futures-sink",+ "futures-task",+ "memchr",+ "pin-project-lite",+ "slab",+]++[[package]]+name = "gdk"+version = "0.18.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "d9f245958c627ac99d8e529166f9823fb3b838d1d41fd2b297af3075093c2691"+dependencies = [+ "cairo-rs",+ "gdk-pixbuf",+ "gdk-sys",+ "gio",+ "glib",+ "libc",+ "pango",+]++[[package]]+name = "gdk-pixbuf"+version = "0.18.5"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "50e1f5f1b0bfb830d6ccc8066d18db35c487b1b2b1e8589b5dfe9f07e8defaec"+dependencies = [+ "gdk-pixbuf-sys",+ "gio",+ "glib",+ "libc",+ "once_cell",+]++[[package]]+name = "gdk-pixbuf-sys"+version = "0.18.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "3f9839ea644ed9c97a34d129ad56d38a25e6756f99f3a88e15cd39c20629caf7"+dependencies = [+ "gio-sys",+ "glib-sys",+ "gobject-sys",+ "libc",+ "system-deps",+]++[[package]]+name = "gdk-sys"+version = "0.18.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "5c2d13f38594ac1e66619e188c6d5a1adb98d11b2fcf7894fc416ad76aa2f3f7"+dependencies = [+ "cairo-sys-rs",+ "gdk-pixbuf-sys",+ "gio-sys",+ "glib-sys",+ "gobject-sys",+ "libc",+ "pango-sys",+ "pkg-config",+ "system-deps",+]++[[package]]+name = "gdkwayland-sys"+version = "0.18.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "140071d506d223f7572b9f09b5e155afbd77428cd5cc7af8f2694c41d98dfe69"+dependencies = [+ "gdk-sys",+ "glib-sys",+ "gobject-sys",+ "libc",+ "pkg-config",+ "system-deps",+]++[[package]]+name = "gdkx11"+version = "0.18.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "3caa00e14351bebbc8183b3c36690327eb77c49abc2268dd4bd36b856db3fbfe"+dependencies = [+ "gdk",+ "gdkx11-sys",+ "gio",+ "glib",+ "libc",+ "x11",+]++[[package]]+name = "gdkx11-sys"+version = "0.18.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "6e2e7445fe01ac26f11601db260dd8608fe172514eb63b3b5e261ea6b0f4428d"+dependencies = [+ "gdk-sys",+ "glib-sys",+ "libc",+ "system-deps",+ "x11",+]++[[package]]+name = "generic-array"+version = "0.14.7"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a"+dependencies = [+ "typenum",+ "version_check",+]++[[package]]+name = "getrandom"+version = "0.2.17"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "ff2abc00be7fca6ebc474524697ae276ad847ad0a6b3faa4bcb027e9a4614ad0"+dependencies = [+ "cfg-if",+ "libc",+ "wasi",+]++[[package]]+name = "getrandom"+version = "0.3.4"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd"+dependencies = [+ "cfg-if",+ "libc",+ "r-efi 5.3.0",+ "wasip2",+]++[[package]]+name = "getrandom"+version = "0.4.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "300e883d756b2e4ec94e02791f39b04b522276138852cfc41d9fb7e904106099"+dependencies = [+ "cfg-if",+ "libc",+ "r-efi 6.0.0",+]++[[package]]+name = "gio"+version = "0.18.4"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "d4fc8f532f87b79cbc51a79748f16a6828fb784be93145a322fa14d06d354c73"+dependencies = [+ "futures-channel",+ "futures-core",+ "futures-io",+ "futures-util",+ "gio-sys",+ "glib",+ "libc",+ "once_cell",+ "pin-project-lite",+ "smallvec",+ "thiserror 1.0.69",+]++[[package]]+name = "gio-sys"+version = "0.18.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "37566df850baf5e4cb0dfb78af2e4b9898d817ed9263d1090a2df958c64737d2"+dependencies = [+ "glib-sys",+ "gobject-sys",+ "libc",+ "system-deps",+ "winapi",+]++[[package]]+name = "glib"+version = "0.18.5"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "233daaf6e83ae6a12a52055f568f9d7cf4671dabb78ff9560ab6da230ce00ee5"+dependencies = [+ "bitflags 2.13.1",+ "futures-channel",+ "futures-core",+ "futures-executor",+ "futures-task",+ "futures-util",+ "gio-sys",+ "glib-macros",+ "glib-sys",+ "gobject-sys",+ "libc",+ "memchr",+ "once_cell",+ "smallvec",+ "thiserror 1.0.69",+]++[[package]]+name = "glib-macros"+version = "0.18.5"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "0bb0228f477c0900c880fd78c8759b95c7636dbd7842707f49e132378aa2acdc"+dependencies = [+ "heck 0.4.1",+ "proc-macro-crate 2.0.2",+ "proc-macro-error",+ "proc-macro2",+ "quote",+ "syn 2.0.119",+]++[[package]]+name = "glib-sys"+version = "0.18.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "063ce2eb6a8d0ea93d2bf8ba1957e78dbab6be1c2220dd3daca57d5a9d869898"+dependencies = [+ "libc",+ "system-deps",+]++[[package]]+name = "glob"+version = "0.3.4"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "e4eba85ea1d0a966a983acd07deee566e67395d2d96b6fb39e62b5a833f1eb0b"++[[package]]+name = "gobject-sys"+version = "0.18.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "0850127b514d1c4a4654ead6dedadb18198999985908e6ffe4436f53c785ce44"+dependencies = [+ "glib-sys",+ "libc",+ "system-deps",+]++[[package]]+name = "gtk"+version = "0.18.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "fd56fb197bfc42bd5d2751f4f017d44ff59fbb58140c6b49f9b3b2bdab08506a"+dependencies = [+ "atk",+ "cairo-rs",+ "field-offset",+ "futures-channel",+ "gdk",+ "gdk-pixbuf",+ "gio",+ "glib",+ "gtk-sys",+ "gtk3-macros",+ "libc",+ "pango",+ "pkg-config",+]++[[package]]+name = "gtk-sys"+version = "0.18.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "8f29a1c21c59553eb7dd40e918be54dccd60c52b049b75119d5d96ce6b624414"+dependencies = [+ "atk-sys",+ "cairo-sys-rs",+ "gdk-pixbuf-sys",+ "gdk-sys",+ "gio-sys",+ "glib-sys",+ "gobject-sys",+ "libc",+ "pango-sys",+ "system-deps",+]++[[package]]+name = "gtk3-macros"+version = "0.18.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "52ff3c5b21f14f0736fed6dcfc0bfb4225ebf5725f3c0209edeec181e4d73e9d"+dependencies = [+ "proc-macro-crate 1.3.1",+ "proc-macro-error",+ "proc-macro2",+ "quote",+ "syn 2.0.119",+]++[[package]]+name = "hashbrown"+version = "0.12.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888"++[[package]]+name = "hashbrown"+version = "0.17.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "ed5909b6e89a2db4456e54cd5f673791d7eca6732202bbf2a9cc504fe2f9b84a"++[[package]]+name = "heck"+version = "0.4.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8"++[[package]]+name = "heck"+version = "0.5.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"++[[package]]+name = "hermit-abi"+version = "0.5.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "fc0fef456e4baa96da950455cd02c081ca953b141298e41db3fc7e36b1da849c"++[[package]]+name = "hex"+version = "0.4.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70"++[[package]]+name = "html5ever"+version = "0.38.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "1054432bae2f14e0061e33d23402fbaa67a921d319d56adc6bcf887ddad1cbc2"+dependencies = [+ "log",+ "markup5ever",+]++[[package]]+name = "http"+version = "1.5.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "918d3568bebf352712bc2ef3d46a8bcf1a75b373be6539de198e9105cbbf9ce0"+dependencies = [+ "bytes",+ "itoa",+]++[[package]]+name = "http-body"+version = "1.1.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "ca2a8f2913ee65f60facd6a5905613afaa448497a0230cc41ce022d93290bc2c"+dependencies = [+ "bytes",+ "http",+]++[[package]]+name = "http-body-util"+version = "0.1.5"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "23169fe34a5fbcdd3f3862e78fb9b6fccd5f02a6dc6f732547005d45631ce71c"+dependencies = [+ "bytes",+ "futures-core",+ "http",+ "http-body",+ "pin-project-lite",+]++[[package]]+name = "http-range"+version = "0.1.5"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "21dec9db110f5f872ed9699c3ecf50cf16f423502706ba5c72462e28d3157573"++[[package]]+name = "httparse"+version = "1.10.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87"++[[package]]+name = "hyper"+version = "1.11.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "d22053281f852e11534f5198498373cbb59295120a20771d90f7ed1897490a72"+dependencies = [+ "atomic-waker",+ "bytes",+ "futures-channel",+ "futures-core",+ "http",+ "http-body",+ "httparse",+ "itoa",+ "pin-project-lite",+ "smallvec",+ "tokio",+ "want",+]++[[package]]+name = "hyper-util"+version = "0.1.20"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "96547c2556ec9d12fb1578c4eaf448b04993e7fb79cbaad930a656880a6bdfa0"+dependencies = [+ "base64 0.22.1",+ "bytes",+ "futures-channel",+ "futures-util",+ "http",+ "http-body",+ "hyper",+ "ipnet",+ "libc",+ "percent-encoding",+ "pin-project-lite",+ "socket2",+ "tokio",+ "tower-service",+ "tracing",+]++[[package]]+name = "iana-time-zone"+version = "0.1.65"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "e31bc9ad994ba00e440a8aa5c9ef0ec67d5cb5e5cb0cc7f8b744a35b389cc470"+dependencies = [+ "android_system_properties",+ "core-foundation-sys",+ "iana-time-zone-haiku",+ "js-sys",+ "log",+ "wasm-bindgen",+ "windows-core 0.62.2",+]++[[package]]+name = "iana-time-zone-haiku"+version = "0.1.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f"+dependencies = [+ "cc",+]++[[package]]+name = "ico"+version = "0.5.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "3e795dff5605e0f04bff85ca41b51a96b83e80b281e96231bcaaf1ac35103371"+dependencies = [+ "byteorder",+ "png 0.17.16",+]++[[package]]+name = "icu_collections"+version = "2.3.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "fa68d21081c4a05d5a901a1c62add574c77048b6a1c67be3b50ce0b60d4ca513"+dependencies = [+ "displaydoc",+ "potential_utf",+ "utf8_iter",+ "yoke",+ "zerofrom",+ "zerovec",+]++[[package]]+name = "icu_locale_core"+version = "2.3.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "d56e28588da92eee5c3201a6eff33fabdd49b62269c8938d4ff050ce4d900deb"+dependencies = [+ "displaydoc",+ "litemap",+ "tinystr",+ "writeable",+ "zerovec",+]++[[package]]+name = "icu_normalizer"+version = "2.3.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "12f9cf5f235641ed274641dd81c3f28d870e276763d0797aeeab72317b1c646f"+dependencies = [+ "icu_collections",+ "icu_normalizer_data",+ "icu_properties",+ "icu_provider",+ "smallvec",+ "zerovec",+]++[[package]]+name = "icu_normalizer_data"+version = "2.3.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "1563da1ed3e0b3bf3d74c9b85917ac9c56464d2f57242270c09c9e752f8021a0"++[[package]]+name = "icu_properties"+version = "2.3.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "7e7ca276ad3145661a65914e6daf131ca5120cd3dcee8f8f3214b8875184a148"+dependencies = [+ "displaydoc",+ "icu_collections",+ "icu_locale_core",+ "icu_properties_data",+ "icu_provider",+ "zerotrie",+ "zerovec",+]++[[package]]+name = "icu_properties_data"+version = "2.3.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "e590f038c1464a96894fd6d10127e90a8be4509f56ff7ecef851b15cee0b7caa"++[[package]]+name = "icu_provider"+version = "2.3.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "d27bbb9d3abbefac45d55f647c9de1d44aafcd1186eb91879afef17c396c3e73"+dependencies = [+ "displaydoc",+ "icu_locale_core",+ "writeable",+ "yoke",+ "zerofrom",+ "zerotrie",+ "zerovec",+]++[[package]]+name = "ident_case"+version = "1.0.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39"++[[package]]+name = "idna"+version = "1.1.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "3b0875f23caa03898994f6ddc501886a45c7d3d62d04d2d90788d47be1b1e4de"+dependencies = [+ "idna_adapter",+ "smallvec",+ "utf8_iter",+]++[[package]]+name = "idna_adapter"+version = "1.2.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "cb68373c0d6620ef8105e855e7745e18b0d00d3bdb07fb532e434244cdb9a714"+dependencies = [+ "icu_normalizer",+ "icu_properties",+]++[[package]]+name = "indexmap"+version = "1.9.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99"+dependencies = [+ "autocfg",+ "hashbrown 0.12.3",+ "serde",+]++[[package]]+name = "indexmap"+version = "2.14.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "d466e9454f08e4a911e14806c24e16fba1b4c121d1ea474396f396069cf949d9"+dependencies = [+ "equivalent",+ "hashbrown 0.17.1",+ "serde",+ "serde_core",+]++[[package]]+name = "infer"+version = "0.19.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "a588916bfdfd92e71cacef98a63d9b1f0d74d6599980d11894290e7ddefffcf7"+dependencies = [+ "cfb",+]++[[package]]+name = "ipnet"+version = "2.12.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "6a756c3fac73139e83f14c2d742155dd2b78d3ee56597b419a0579b7bdd6dd78"++[[package]]+name = "is-docker"+version = "0.2.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "928bae27f42bc99b60d9ac7334e3a21d10ad8f1835a4e12ec3ec0464765ed1b3"+dependencies = [+ "once_cell",+]++[[package]]+name = "is-wsl"+version = "0.4.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "173609498df190136aa7dea1a91db051746d339e18476eed5ca40521f02d7aa5"+dependencies = [+ "is-docker",+ "once_cell",+]++[[package]]+name = "itoa"+version = "1.0.18"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682"++[[package]]+name = "javascriptcore-rs"+version = "1.1.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "ca5671e9ffce8ffba57afc24070e906da7fc4b1ba66f2cabebf61bf2ea257fcc"+dependencies = [+ "bitflags 1.3.2",+ "glib",+ "javascriptcore-rs-sys",+]++[[package]]+name = "javascriptcore-rs-sys"+version = "1.1.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "af1be78d14ffa4b75b66df31840478fef72b51f8c2465d4ca7c194da9f7a5124"+dependencies = [+ "glib-sys",+ "gobject-sys",+ "libc",+ "system-deps",+]++[[package]]+name = "jiff"+version = "0.2.35"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "668b7183bd07af9a4885f5c35b0cc5c83c4607a913c16b7e17291832910d2dcc"+dependencies = [+ "defmt",+ "jiff-core",+ "jiff-static",+ "jiff-tzdb-platform",+ "log",+ "portable-atomic",+ "portable-atomic-util",+ "serde_core",+ "windows-link 0.2.1",+]++[[package]]+name = "jiff-core"+version = "0.1.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "7feca88439efe53da3754500c1851dedf3cb36c524dd5cf8225cc0794de95d09"+dependencies = [+ "defmt",+]++[[package]]+name = "jiff-static"+version = "0.2.35"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "3a69dcb3a21cfb32ce1cd056169337ca284af0766dd766e7878819b251a49204"+dependencies = [+ "jiff-core",+ "proc-macro2",+ "quote",+ "syn 2.0.119",+]++[[package]]+name = "jiff-tzdb"+version = "0.1.8"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "142bd39932ad231f10513df9ab62661fead8719872150b7ad02a2df79f4e141e"++[[package]]+name = "jiff-tzdb-platform"+version = "0.1.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "875a5a69ac2bab1a891711cf5eccbec1ce0341ea805560dcd90b7a2e925132e8"+dependencies = [+ "jiff-tzdb",+]++[[package]]+name = "jni"+version = "0.21.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "1a87aa2bb7d2af34197c04845522473242e1aa17c12f4935d5856491a7fb8c97"+dependencies = [+ "cesu8",+ "cfg-if",+ "combine",+ "jni-sys 0.3.1",+ "log",+ "thiserror 1.0.69",+ "walkdir",+ "windows-sys 0.45.0",+]++[[package]]+name = "jni-sys"+version = "0.3.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "41a652e1f9b6e0275df1f15b32661cf0d4b78d4d87ddec5e0c3c20f097433258"+dependencies = [+ "jni-sys 0.4.1",+]++[[package]]+name = "jni-sys"+version = "0.4.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "c6377a88cb3910bee9b0fa88d4f42e1d2da8e79915598f65fb0c7ee14c878af2"+dependencies = [+ "jni-sys-macros",+]++[[package]]+name = "jni-sys-macros"+version = "0.4.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "38c0b942f458fe50cdac086d2f946512305e5631e720728f2a61aabcd47a6264"+dependencies = [+ "quote",+ "syn 2.0.119",+]++[[package]]+name = "js-sys"+version = "0.3.104"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "0e0c1080212aad755ea003d18543e8768dd432c48819efd73a7bf1e39b7a5a3a"+dependencies = [+ "cfg-if",+ "futures-util",+ "wasm-bindgen",+]++[[package]]+name = "json-patch"+version = "3.0.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "863726d7afb6bc2590eeff7135d923545e5e964f004c2ccf8716c25e70a86f08"+dependencies = [+ "jsonptr",+ "serde",+ "serde_json",+ "thiserror 1.0.69",+]++[[package]]+name = "jsonptr"+version = "0.6.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "5dea2b27dd239b2556ed7a25ba842fe47fd602e7fc7433c2a8d6106d4d9edd70"+dependencies = [+ "serde",+ "serde_json",+]++[[package]]+name = "keyboard-types"+version = "0.7.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "b750dcadc39a09dbadd74e118f6dd6598df77fa01df0cfcdc52c28dece74528a"+dependencies = [+ "bitflags 2.13.1",+ "serde",+ "unicode-segmentation",+]++[[package]]+name = "libappindicator"+version = "0.9.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "03589b9607c868cc7ae54c0b2a22c8dc03dd41692d48f2d7df73615c6a95dc0a"+dependencies = [+ "glib",+ "gtk",+ "gtk-sys",+ "libappindicator-sys",+ "log",+]++[[package]]+name = "libappindicator-sys"+version = "0.9.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "6e9ec52138abedcc58dc17a7c6c0c00a2bdb4f3427c7f63fa97fd0d859155caf"+dependencies = [+ "gtk-sys",+ "libloading",+ "once_cell",+]++[[package]]+name = "libc"+version = "0.2.189"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "3eaf3ede3fee6db1a4c2ee091bf8a8b4dccdc6d17f656fb07896ee72867612f2"++[[package]]+name = "libdbus-sys"+version = "0.2.7"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "328c4789d42200f1eeec05bd86c9c13c7f091d2ba9a6ea35acdf51f31bc0f043"+dependencies = [+ "pkg-config",+]++[[package]]+name = "libloading"+version = "0.7.4"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f"+dependencies = [+ "cfg-if",+ "winapi",+]++[[package]]+name = "libredox"+version = "0.1.20"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "28d0a00925a9f930d679b6789b721e3a7f9ed110f41b86d2497caa780c3a070a"+dependencies = [+ "libc",+]++[[package]]+name = "linux-raw-sys"+version = "0.12.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53"++[[package]]+name = "litemap"+version = "0.8.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "47d9d19d1d6efa0109d2f65ff4c85cddd50bd572e5a00127ab10987290bcefae"++[[package]]+name = "lock_api"+version = "0.4.14"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "224399e74b87b5f3557511d98dff8b14089b3dadafcab6bb93eab67d3aace965"+dependencies = [+ "scopeguard",+]++[[package]]+name = "log"+version = "0.4.34"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "f9f8bd3e56ce4dfc153cf470fffbfa98c7620958b312ca5c3a4b8d5181fd13c6"++[[package]]+name = "markup5ever"+version = "0.38.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "8983d30f2915feeaaab2d6babdd6bc7e9ed1a00b66b5e6d74df19aa9c0e91862"+dependencies = [+ "log",+ "tendril",+ "web_atoms",+]++[[package]]+name = "memchr"+version = "2.8.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "cf8baf1c55e62ffcace7a9f06f4bd9cd3f0c4beb022d3b367256b91b87513d98"++[[package]]+name = "memoffset"+version = "0.9.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a"+dependencies = [+ "autocfg",+]++[[package]]+name = "mime"+version = "0.3.17"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a"++[[package]]+name = "miniz_oxide"+version = "0.8.9"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316"+dependencies = [+ "adler2",+ "simd-adler32",+]++[[package]]+name = "mio"+version = "1.2.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "30d65c71f1ce40ab09135ce117d742b9f8a19ff91a41a8b57ed50bc2de59c427"+dependencies = [+ "libc",+ "wasi",+ "windows-sys 0.61.2",+]++[[package]]+name = "muda"+version = "0.19.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "1dd04e60bc0b07438a6771710ee1698f98f6ebbc7f89b61264af1563b8aeb878"+dependencies = [+ "crossbeam-channel",+ "dpi",+ "gtk",+ "keyboard-types",+ "objc2",+ "objc2-app-kit",+ "objc2-core-foundation",+ "objc2-foundation",+ "once_cell",+ "png 0.18.1",+ "serde",+ "thiserror 2.0.20",+ "windows-sys 0.61.2",+]++[[package]]+name = "ndk"+version = "0.9.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "c3f42e7bbe13d351b6bead8286a43aac9534b82bd3cc43e47037f012ebfd62d4"+dependencies = [+ "bitflags 2.13.1",+ "jni-sys 0.3.1",+ "log",+ "ndk-sys",+ "num_enum",+ "raw-window-handle",+ "thiserror 1.0.69",+]++[[package]]+name = "ndk-sys"+version = "0.6.0+11769913"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "ee6cda3051665f1fb8d9e08fc35c96d5a244fb1be711a03b71118828afc9a873"+dependencies = [+ "jni-sys 0.3.1",+]++[[package]]+name = "new_debug_unreachable"+version = "1.0.6"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "650eef8c711430f1a879fdd01d4745a7deea475becfb90269c06775983bbf086"++[[package]]+name = "num-conv"+version = "0.2.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "521739c6d2bac4aa25192232afe6841231376b2b26d4d9fae5ecf8ca5772e441"++[[package]]+name = "num-traits"+version = "0.2.19"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841"+dependencies = [+ "autocfg",+]++[[package]]+name = "num_enum"+version = "0.7.6"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "5d0bca838442ec211fa11de3a8b0e0e8f3a4522575b5c4c06ed722e005036f26"+dependencies = [+ "num_enum_derive",+ "rustversion",+]++[[package]]+name = "num_enum_derive"+version = "0.7.6"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "680998035259dcfcafe653688bf2aa6d3e2dc05e98be6ab46afb089dc84f1df8"+dependencies = [+ "proc-macro-crate 3.5.0",+ "proc-macro2",+ "quote",+ "syn 2.0.119",+]++[[package]]+name = "objc2"+version = "0.6.4"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "3a12a8ed07aefc768292f076dc3ac8c48f3781c8f2d5851dd3d98950e8c5a89f"+dependencies = [+ "objc2-encode",+ "objc2-exception-helper",+]++[[package]]+name = "objc2-app-kit"+version = "0.3.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "d49e936b501e5c5bf01fda3a9452ff86dc3ea98ad5f283e1455153142d97518c"+dependencies = [+ "bitflags 2.13.1",+ "block2",+ "objc2",+ "objc2-core-foundation",+ "objc2-foundation",+]++[[package]]+name = "objc2-cloud-kit"+version = "0.3.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "73ad74d880bb43877038da939b7427bba67e9dd42004a18b809ba7d87cee241c"+dependencies = [+ "bitflags 2.13.1",+ "objc2",+ "objc2-foundation",+]++[[package]]+name = "objc2-core-data"+version = "0.3.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "0b402a653efbb5e82ce4df10683b6b28027616a2715e90009947d50b8dd298fa"+dependencies = [+ "objc2",+ "objc2-foundation",+]++[[package]]+name = "objc2-core-foundation"+version = "0.3.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "2a180dd8642fa45cdb7dd721cd4c11b1cadd4929ce112ebd8b9f5803cc79d536"+dependencies = [+ "bitflags 2.13.1",+ "dispatch2",+ "objc2",+]++[[package]]+name = "objc2-core-graphics"+version = "0.3.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "e022c9d066895efa1345f8e33e584b9f958da2fd4cd116792e15e07e4720a807"+dependencies = [+ "bitflags 2.13.1",+ "dispatch2",+ "objc2",+ "objc2-core-foundation",+ "objc2-io-surface",+]++[[package]]+name = "objc2-core-image"+version = "0.3.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "e5d563b38d2b97209f8e861173de434bd0214cf020e3423a52624cd1d989f006"+dependencies = [+ "objc2",+ "objc2-foundation",+]++[[package]]+name = "objc2-core-location"+version = "0.3.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "ca347214e24bc973fc025fd0d36ebb179ff30536ed1f80252706db19ee452009"+dependencies = [+ "objc2",+ "objc2-foundation",+]++[[package]]+name = "objc2-core-text"+version = "0.3.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "0cde0dfb48d25d2b4862161a4d5fcc0e3c24367869ad306b0c9ec0073bfed92d"+dependencies = [+ "bitflags 2.13.1",+ "objc2",+ "objc2-core-foundation",+ "objc2-core-graphics",+]++[[package]]+name = "objc2-encode"+version = "4.1.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "ef25abbcd74fb2609453eb695bd2f860d389e457f67dc17cafc8b8cbc89d0c33"++[[package]]+name = "objc2-exception-helper"+version = "0.1.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "c7a1c5fbb72d7735b076bb47b578523aedc40f3c439bea6dfd595c089d79d98a"+dependencies = [+ "cc",+]++[[package]]+name = "objc2-foundation"+version = "0.3.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "e3e0adef53c21f888deb4fa59fc59f7eb17404926ee8a6f59f5df0fd7f9f3272"+dependencies = [+ "bitflags 2.13.1",+ "block2",+ "libc",+ "objc2",+ "objc2-core-foundation",+]++[[package]]+name = "objc2-io-surface"+version = "0.3.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "180788110936d59bab6bd83b6060ffdfffb3b922ba1396b312ae795e1de9d81d"+dependencies = [+ "bitflags 2.13.1",+ "objc2",+ "objc2-core-foundation",+]++[[package]]+name = "objc2-quartz-core"+version = "0.3.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "96c1358452b371bf9f104e21ec536d37a650eb10f7ee379fff67d2e08d537f1f"+dependencies = [+ "bitflags 2.13.1",+ "objc2",+ "objc2-core-foundation",+ "objc2-foundation",+]++[[package]]+name = "objc2-ui-kit"+version = "0.3.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "d87d638e33c06f577498cbcc50491496a3ed4246998a7fbba7ccb98b1e7eab22"+dependencies = [+ "bitflags 2.13.1",+ "block2",+ "objc2",+ "objc2-cloud-kit",+ "objc2-core-data",+ "objc2-core-foundation",+ "objc2-core-graphics",+ "objc2-core-image",+ "objc2-core-location",+ "objc2-core-text",+ "objc2-foundation",+ "objc2-quartz-core",+ "objc2-user-notifications",+]++[[package]]+name = "objc2-user-notifications"+version = "0.3.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "9df9128cbbfef73cda168416ccf7f837b62737d748333bfe9ab71c245d76613e"+dependencies = [+ "objc2",+ "objc2-foundation",+]++[[package]]+name = "objc2-web-kit"+version = "0.3.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "b2e5aaab980c433cf470df9d7af96a7b46a9d892d521a2cbbb2f8a4c16751e7f"+dependencies = [+ "bitflags 2.13.1",+ "block2",+ "objc2",+ "objc2-app-kit",+ "objc2-core-foundation",+ "objc2-foundation",+]++[[package]]+name = "once_cell"+version = "1.21.4"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50"++[[package]]+name = "open"+version = "5.4.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "ade3be4664bc1ef537ce133015f04c176b737815c2ba9fd60edf212d6e90dd55"+dependencies = [+ "dunce",+ "is-wsl",+ "libc",+]++[[package]]+name = "option-ext"+version = "0.2.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d"++[[package]]+name = "ordered-stream"+version = "0.2.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "9aa2b01e1d916879f73a53d01d1d6cee68adbb31d6d9177a8cfce093cced1d50"+dependencies = [+ "futures-core",+ "pin-project-lite",+]++[[package]]+name = "pango"+version = "0.18.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "7ca27ec1eb0457ab26f3036ea52229edbdb74dee1edd29063f5b9b010e7ebee4"+dependencies = [+ "gio",+ "glib",+ "libc",+ "once_cell",+ "pango-sys",+]++[[package]]+name = "pango-sys"+version = "0.18.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "436737e391a843e5933d6d9aa102cb126d501e815b83601365a948a518555dc5"+dependencies = [+ "glib-sys",+ "gobject-sys",+ "libc",+ "system-deps",+]++[[package]]+name = "parking"+version = "2.2.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "f38d5652c16fde515bb1ecef450ab0f6a219d619a7274976324d5e377f7dceba"++[[package]]+name = "parking_lot"+version = "0.12.5"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "93857453250e3077bd71ff98b6a65ea6621a19bb0f559a85248955ac12c45a1a"+dependencies = [+ "lock_api",+ "parking_lot_core",+]++[[package]]+name = "parking_lot_core"+version = "0.9.12"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "2621685985a2ebf1c516881c026032ac7deafcda1a2c9b7850dc81e3dfcb64c1"+dependencies = [+ "cfg-if",+ "libc",+ "redox_syscall",+ "smallvec",+ "windows-link 0.2.1",+]++[[package]]+name = "percent-encoding"+version = "2.3.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220"++[[package]]+name = "phf"+version = "0.13.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "c1562dc717473dbaa4c1f85a36410e03c047b2e7df7f45ee938fbef64ae7fadf"+dependencies = [+ "phf_macros",+ "phf_shared",+ "serde",+]++[[package]]+name = "phf_codegen"+version = "0.13.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "49aa7f9d80421bca176ca8dbfebe668cc7a2684708594ec9f3c0db0805d5d6e1"+dependencies = [+ "phf_generator",+ "phf_shared",+]++[[package]]+name = "phf_generator"+version = "0.13.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "135ace3a761e564ec88c03a77317a7c6b80bb7f7135ef2544dbe054243b89737"+dependencies = [+ "fastrand",+ "phf_shared",+]++[[package]]+name = "phf_macros"+version = "0.13.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "812f032b54b1e759ccd5f8b6677695d5268c588701effba24601f6932f8269ef"+dependencies = [+ "phf_generator",+ "phf_shared",+ "proc-macro2",+ "quote",+ "syn 2.0.119",+]++[[package]]+name = "phf_shared"+version = "0.13.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "e57fef6bc5981e38c2ce2d63bfa546861309f875b8a75f092d1d54ae2d64f266"+dependencies = [+ "siphasher",+]++[[package]]+name = "pin-project-lite"+version = "0.2.17"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd"++[[package]]+name = "piper"+version = "0.2.5"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "c835479a4443ded371d6c535cbfd8d31ad92c5d23ae9770a61bc155e4992a3c1"+dependencies = [+ "atomic-waker",+ "fastrand",+ "futures-io",+]++[[package]]+name = "pkg-config"+version = "0.3.34"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "f6b464fbc74e149a392436b17d523f769e057cb6877f6a5c4618bc6f11800548"++[[package]]+name = "plist"+version = "1.10.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "7da1d65da6dd5d1e44199ac0f58712d241c0f439f80adea8924d832384087f85"+dependencies = [+ "base64 0.22.1",+ "indexmap 2.14.0",+ "quick-xml",+ "serde",+ "time",+]++[[package]]+name = "png"+version = "0.17.16"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "82151a2fc869e011c153adc57cf2789ccb8d9906ce52c0b39a6b5697749d7526"+dependencies = [+ "bitflags 1.3.2",+ "crc32fast",+ "fdeflate",+ "flate2",+ "miniz_oxide",+]++[[package]]+name = "png"+version = "0.18.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "60769b8b31b2a9f263dae2776c37b1b28ae246943cf719eb6946a1db05128a61"+dependencies = [+ "bitflags 2.13.1",+ "crc32fast",+ "fdeflate",+ "flate2",+ "miniz_oxide",+]++[[package]]+name = "polling"+version = "3.11.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "5d0e4f59085d47d8241c88ead0f274e8a0cb551f3625263c05eb8dd897c34218"+dependencies = [+ "cfg-if",+ "concurrent-queue",+ "hermit-abi",+ "pin-project-lite",+ "rustix",+ "windows-sys 0.61.2",+]++[[package]]+name = "portable-atomic"+version = "1.15.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "05c8b63e8d9609db387f0324918f81d68fe27748f084ef092fb35954d0539a85"++[[package]]+name = "portable-atomic-util"+version = "0.2.7"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "c2a106d1259c23fac8e543272398ae0e3c0b8d33c88ed73d0cc71b0f1d902618"+dependencies = [+ "portable-atomic",+]++[[package]]+name = "potential_utf"+version = "0.1.6"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "d83eb9bc6d8e5cf568e7a1101d60ee05e81ed50ea106026f3d18deeb046d7661"+dependencies = [+ "zerovec",+]++[[package]]+name = "powerfmt"+version = "0.2.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391"++[[package]]+name = "precomputed-hash"+version = "0.1.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c"++[[package]]+name = "proc-macro-crate"+version = "1.3.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919"+dependencies = [+ "once_cell",+ "toml_edit 0.19.15",+]++[[package]]+name = "proc-macro-crate"+version = "2.0.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "b00f26d3400549137f92511a46ac1cd8ce37cb5598a96d382381458b992a5d24"+dependencies = [+ "toml_datetime 0.6.3",+ "toml_edit 0.20.2",+]++[[package]]+name = "proc-macro-crate"+version = "3.5.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "e67ba7e9b2b56446f1d419b1d807906278ffa1a658a8a5d8a39dcb1f5a78614f"+dependencies = [+ "toml_edit 0.25.13+spec-1.1.0",+]++[[package]]+name = "proc-macro-error"+version = "1.0.4"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c"+dependencies = [+ "proc-macro-error-attr",+ "proc-macro2",+ "quote",+ "syn 1.0.109",+ "version_check",+]++[[package]]+name = "proc-macro-error-attr"+version = "1.0.4"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869"+dependencies = [+ "proc-macro2",+ "quote",+ "version_check",+]++[[package]]+name = "proc-macro2"+version = "1.0.107"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "985e7ec9bb745e6ce6535b544d84d6cd6f7ad8bd711c398938ae983b91a766d9"+dependencies = [+ "unicode-ident",+]++[[package]]+name = "quick-xml"+version = "0.41.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "e660451e55124f798a69a5af3f49ccfbefbd41910eefd25caf2393e1f3473ec1"+dependencies = [+ "memchr",+]++[[package]]+name = "quote"+version = "1.0.47"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "1fbf4db142a473a8d80c26bbf18454ed458bf8d26c8219c331daecfdbd079001"+dependencies = [+ "proc-macro2",+]++[[package]]+name = "r-efi"+version = "5.3.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f"++[[package]]+name = "r-efi"+version = "6.0.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf"++[[package]]+name = "raw-window-handle"+version = "0.6.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "20675572f6f24e9e76ef639bc5552774ed45f1c30e2951e1e99c59888861c539"++[[package]]+name = "redox_syscall"+version = "0.5.18"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d"+dependencies = [+ "bitflags 2.13.1",+]++[[package]]+name = "redox_users"+version = "0.5.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "a4e608c6638b9c18977b00b475ac1f28d14e84b27d8d42f70e0bf1e3dec127ac"+dependencies = [+ "getrandom 0.2.17",+ "libredox",+ "thiserror 2.0.20",+]++[[package]]+name = "ref-cast"+version = "1.0.27"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "7e440fb4e4b4147295338efb76001ab9e4efc0e5839df2c47fc5ac2381d365c3"+dependencies = [+ "ref-cast-impl",+]++[[package]]+name = "ref-cast-impl"+version = "1.0.27"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "92ecd8964f8453721699a1ed72037b0db49ce2f5a5138486ee89bed6f67cdf3a"+dependencies = [+ "proc-macro2",+ "quote",+ "syn 3.0.4",+]++[[package]]+name = "regex"+version = "1.13.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "f020237b6c8eed93db2e2cb53c00c60a8e1bc73da7d073199a1180401450218d"+dependencies = [+ "aho-corasick",+ "memchr",+ "regex-automata",+ "regex-syntax",+]++[[package]]+name = "regex-automata"+version = "0.4.18"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "ad8553b9b26413251cbf30e620595c7a41b3887f03da04579c0e6b0d6a06b4b2"+dependencies = [+ "aho-corasick",+ "memchr",+ "regex-syntax",+]++[[package]]+name = "regex-syntax"+version = "0.8.11"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "d6f6ff9a378485b298a5286656da665ba74413d36db0979633275d2e708145d4"++[[package]]+name = "relay-core"+version = "0.1.0"++[[package]]+name = "relay-desktop"+version = "0.1.0"+dependencies = [+ "relay-core",+ "relay-media",+ "relay-render",+ "serde",+ "serde_json",+ "tauri",+ "tauri-build",+ "tauri-plugin-dialog",+ "tauri-plugin-opener",+]++[[package]]+name = "relay-media"+version = "0.1.0"+dependencies = [+ "relay-core",+ "serde_json",+ "thiserror 2.0.20",+]++[[package]]+name = "relay-render"+version = "0.1.0"+dependencies = [+ "relay-core",+]++[[package]]+name = "reqwest"+version = "0.13.4"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "219c5811de6525e5416c7d5d53bb656d3afdbc6c5af816e0802bcfa42dbdc1c3"+dependencies = [+ "base64 0.22.1",+ "bytes",+ "futures-core",+ "futures-util",+ "http",+ "http-body",+ "http-body-util",+ "hyper",+ "hyper-util",+ "js-sys",+ "log",+ "percent-encoding",+ "pin-project-lite",+ "serde",+ "serde_json",+ "sync_wrapper",+ "tokio",+ "tokio-util",+ "tower",+ "tower-http",+ "tower-service",+ "url",+ "wasm-bindgen",+ "wasm-bindgen-futures",+ "wasm-streams",+ "web-sys",+]++[[package]]+name = "rfd"+version = "0.16.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "a15ad77d9e70a92437d8f74c35d99b4e4691128df018833e99f90bcd36152672"+dependencies = [+ "block2",+ "dispatch2",+ "glib-sys",+ "gobject-sys",+ "gtk-sys",+ "js-sys",+ "log",+ "objc2",+ "objc2-app-kit",+ "objc2-core-foundation",+ "objc2-foundation",+ "raw-window-handle",+ "wasm-bindgen",+ "wasm-bindgen-futures",+ "web-sys",+ "windows-sys 0.60.2",+]++[[package]]+name = "rustc-hash"+version = "2.1.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "6b1e7f9a428571be2dc5bc0505c13fb6bf936822b894ec87abf8a08a4e51742d"++[[package]]+name = "rustc_version"+version = "0.4.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92"+dependencies = [+ "semver",+]++[[package]]+name = "rustix"+version = "1.1.4"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "b6fe4565b9518b83ef4f91bb47ce29620ca828bd32cb7e408f0062e9930ba190"+dependencies = [+ "bitflags 2.13.1",+ "errno",+ "libc",+ "linux-raw-sys",+ "windows-sys 0.61.2",+]++[[package]]+name = "rustversion"+version = "1.0.23"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "cf54715a573b99ac80df0bc206da022bcd442c974952c7b9720069370852e21f"++[[package]]+name = "same-file"+version = "1.0.6"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502"+dependencies = [+ "winapi-util",+]++[[package]]+name = "schemars"+version = "0.8.22"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "3fbf2ae1b8bc8e02df939598064d22402220cd5bbcca1c76f7d6a310974d5615"+dependencies = [+ "dyn-clone",+ "indexmap 1.9.3",+ "schemars_derive",+ "serde",+ "serde_json",+ "url",+ "uuid",+]++[[package]]+name = "schemars"+version = "0.9.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "4cd191f9397d57d581cddd31014772520aa448f65ef991055d7f61582c65165f"+dependencies = [+ "dyn-clone",+ "ref-cast",+ "serde",+ "serde_json",+]++[[package]]+name = "schemars"+version = "1.2.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "687274d293b6cdc6e73e0fee520bf2049650090d7164f87672d212a3c530cf4a"+dependencies = [+ "dyn-clone",+ "ref-cast",+ "serde",+ "serde_json",+]++[[package]]+name = "schemars_derive"+version = "0.8.22"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "32e265784ad618884abaea0600a9adf15393368d840e0222d101a072f3f7534d"+dependencies = [+ "proc-macro2",+ "quote",+ "serde_derive_internals",+ "syn 2.0.119",+]++[[package]]+name = "scopeguard"+version = "1.2.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"++[[package]]+name = "selectors"+version = "0.36.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "c5d9c0c92a92d33f08817311cf3f2c29a3538a8240e94a6a3c622ce652d7e00c"+dependencies = [+ "bitflags 2.13.1",+ "cssparser",+ "derive_more",+ "log",+ "new_debug_unreachable",+ "phf",+ "phf_codegen",+ "precomputed-hash",+ "rustc-hash",+ "servo_arc",+ "smallvec",+]++[[package]]+name = "semver"+version = "1.0.28"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "8a7852d02fc848982e0c167ef163aaff9cd91dc640ba85e263cb1ce46fae51cd"+dependencies = [+ "serde",+ "serde_core",+]++[[package]]+name = "serde"+version = "1.0.229"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "4148590afebada386688f18773da617792bf2ef03ffc1e4cbd2b1d45b023e0ba"+dependencies = [+ "serde_core",+ "serde_derive",+]++[[package]]+name = "serde-untagged"+version = "0.1.9"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "f9faf48a4a2d2693be24c6289dbe26552776eb7737074e6722891fadbe6c5058"+dependencies = [+ "erased-serde",+ "serde",+ "serde_core",+ "typeid",+]++[[package]]+name = "serde_core"+version = "1.0.229"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "67dca2c9c51e58a4791a4b1ed58308b39c64224d349a935ab5039aa360942a48"+dependencies = [+ "serde_derive",+]++[[package]]+name = "serde_derive"+version = "1.0.229"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "e7a5d71263a5a7d47b41f6b3f06ba276f10cc18b0931f1799f710578e2309348"+dependencies = [+ "proc-macro2",+ "quote",+ "syn 3.0.4",+]++[[package]]+name = "serde_derive_internals"+version = "0.29.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711"+dependencies = [+ "proc-macro2",+ "quote",+ "syn 2.0.119",+]++[[package]]+name = "serde_json"+version = "1.0.151"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "c841b55ecdae098c80dcae9cf767f6f8a0c2cdb3416bbef72181df4d0fe73f14"+dependencies = [+ "itoa",+ "memchr",+ "serde",+ "serde_core",+ "zmij",+]++[[package]]+name = "serde_repr"+version = "0.1.21"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "8d3b1629de253c70a0508c3899572da79ca359fdab27c7920ff00406df418906"+dependencies = [+ "proc-macro2",+ "quote",+ "syn 3.0.4",+]++[[package]]+name = "serde_spanned"+version = "0.6.9"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "bf41e0cfaf7226dca15e8197172c295a782857fcb97fad1808a166870dee75a3"+dependencies = [+ "serde",+]++[[package]]+name = "serde_spanned"+version = "1.1.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "6662b5879511e06e8999a8a235d848113e942c9124f211511b16466ee2995f26"+dependencies = [+ "serde_core",+]++[[package]]+name = "serde_with"+version = "3.22.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "ee78f1fbe43ac4a0e47aadb3dbd357b69eb0d3793e948624cd03dd2750ab1c0a"+dependencies = [+ "base64 0.22.1",+ "bs58",+ "chrono",+ "hex",+ "indexmap 1.9.3",+ "indexmap 2.14.0",+ "jiff",+ "schemars 0.9.0",+ "schemars 1.2.2",+ "serde_core",+ "serde_json",+ "serde_with_macros",+ "time",+]++[[package]]+name = "serde_with_macros"+version = "3.22.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "8705578779c2b6bd90d84d66eb2e206b708b1a4d7b9f17641b293545bf1c7e46"+dependencies = [+ "darling",+ "proc-macro2",+ "quote",+ "syn 2.0.119",+]++[[package]]+name = "serialize-to-javascript"+version = "0.1.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "04f3666a07a197cdb77cdf306c32be9b7f598d7060d50cfd4d5aa04bfd92f6c5"+dependencies = [+ "serde",+ "serde_json",+ "serialize-to-javascript-impl",+]++[[package]]+name = "serialize-to-javascript-impl"+version = "0.1.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "772ee033c0916d670af7860b6e1ef7d658a4629a6d0b4c8c3e67f09b3765b75d"+dependencies = [+ "proc-macro2",+ "quote",+ "syn 2.0.119",+]++[[package]]+name = "servo_arc"+version = "0.4.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "170fb83ab34de17dc69aa7c67482b22218ddb85da56546f9bd6b929e32a05930"+dependencies = [+ "stable_deref_trait",+]++[[package]]+name = "sha2"+version = "0.10.9"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283"+dependencies = [+ "cfg-if",+ "cpufeatures",+ "digest",+]++[[package]]+name = "shlex"+version = "2.0.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "f8fadd59c855ef2080decdef8ff161eb6661b86933c9d82e5ba29dc602a55aba"++[[package]]+name = "signal-hook-registry"+version = "1.4.8"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "c4db69cba1110affc0e9f7bcd48bbf87b3f4fc7c61fc9155afd4c469eb3d6c1b"+dependencies = [+ "errno",+ "libc",+]++[[package]]+name = "simd-adler32"+version = "0.3.10"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "3a219298ac11a56ea9a6d2120044824d6f01aeb034955e7af7bc16858527deea"++[[package]]+name = "siphasher"+version = "1.0.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "8ee5873ec9cce0195efcb7a4e9507a04cd49aec9c83d0389df45b1ef7ba2e649"++[[package]]+name = "slab"+version = "0.4.12"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5"++[[package]]+name = "smallvec"+version = "1.15.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "8ed6a63f02c8539c91a8685a86f4099661ba3da017932f6ebbea6de3f0fa7c90"++[[package]]+name = "socket2"+version = "0.6.5"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "c3d1e2c7f27f8d4cb10542a02c49005dbd6e93095799d6f3be745fae9f8fedd4"+dependencies = [+ "libc",+ "windows-sys 0.61.2",+]++[[package]]+name = "softbuffer"+version = "0.4.8"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "aac18da81ebbf05109ab275b157c22a653bb3c12cf884450179942f81bcbf6c3"+dependencies = [+ "bytemuck",+ "js-sys",+ "ndk",+ "objc2",+ "objc2-core-foundation",+ "objc2-core-graphics",+ "objc2-foundation",+ "objc2-quartz-core",+ "raw-window-handle",+ "redox_syscall",+ "tracing",+ "wasm-bindgen",+ "web-sys",+ "windows-sys 0.61.2",+]++[[package]]+name = "soup3"+version = "0.5.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "471f924a40f31251afc77450e781cb26d55c0b650842efafc9c6cbd2f7cc4f9f"+dependencies = [+ "futures-channel",+ "gio",+ "glib",+ "libc",+ "soup3-sys",+]++[[package]]+name = "soup3-sys"+version = "0.5.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "7ebe8950a680a12f24f15ebe1bf70db7af98ad242d9db43596ad3108aab86c27"+dependencies = [+ "gio-sys",+ "glib-sys",+ "gobject-sys",+ "libc",+ "system-deps",+]++[[package]]+name = "stable_deref_trait"+version = "1.2.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596"++[[package]]+name = "string_cache"+version = "0.9.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "a18596f8c785a729f2819c0f6a7eae6ebeebdfffbfe4214ae6b087f690e31901"+dependencies = [+ "new_debug_unreachable",+ "parking_lot",+ "phf_shared",+ "precomputed-hash",+]++[[package]]+name = "string_cache_codegen"+version = "0.6.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "585635e46db231059f76c5849798146164652513eb9e8ab2685939dd90f29b69"+dependencies = [+ "phf_generator",+ "phf_shared",+ "proc-macro2",+ "quote",+]++[[package]]+name = "strsim"+version = "0.11.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f"++[[package]]+name = "swift-rs"+version = "1.0.8"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "e45c444e496845d3f2a351146bff59aae4975b2280238df1dfaa0c7d1846f38e"+dependencies = [+ "base64 0.21.7",+ "serde",+ "serde_json",+]++[[package]]+name = "syn"+version = "1.0.109"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237"+dependencies = [+ "proc-macro2",+ "unicode-ident",+]++[[package]]+name = "syn"+version = "2.0.119"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "872831b642d1a07999a962a351ed35b955ea2cfc8f3862091e2a240a84f17297"+dependencies = [+ "proc-macro2",+ "quote",+ "unicode-ident",+]++[[package]]+name = "syn"+version = "3.0.4"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "e6275cddf4610d1775e6d1fe9469b2e77d0f39fd98fb7450901b821e0c53649f"+dependencies = [+ "proc-macro2",+ "quote",+ "unicode-ident",+]++[[package]]+name = "sync_wrapper"+version = "1.0.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263"+dependencies = [+ "futures-core",+]++[[package]]+name = "synstructure"+version = "0.13.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2"+dependencies = [+ "proc-macro2",+ "quote",+ "syn 2.0.119",+]++[[package]]+name = "system-deps"+version = "6.2.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "a3e535eb8dded36d55ec13eddacd30dec501792ff23a0b1682c38601b8cf2349"+dependencies = [+ "cfg-expr",+ "heck 0.5.0",+ "pkg-config",+ "toml 0.8.2",+ "version-compare",+]++[[package]]+name = "tao"+version = "0.35.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "d1c93047acf68669466a34690ac58cca7010bd1b201e1ec86f1fd0a75d3dd4a9"+dependencies = [+ "bitflags 2.13.1",+ "block2",+ "core-foundation",+ "core-graphics",+ "crossbeam-channel",+ "dbus",+ "dispatch2",+ "dlopen2",+ "dpi",+ "gdkwayland-sys",+ "gdkx11-sys",+ "gtk",+ "jni",+ "libc",+ "log",+ "ndk",+ "ndk-sys",+ "objc2",+ "objc2-app-kit",+ "objc2-foundation",+ "objc2-ui-kit",+ "once_cell",+ "parking_lot",+ "percent-encoding",+ "raw-window-handle",+ "tao-macros",+ "unicode-segmentation",+ "url",+ "windows",+ "windows-core 0.61.2",+ "windows-version",+ "x11-dl",+]++[[package]]+name = "tao-macros"+version = "0.1.4"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "5f7eeb6d99155545da6150a1795945f16ac9c178deb2a5f2e74d776107bd5849"+dependencies = [+ "proc-macro2",+ "quote",+ "syn 2.0.119",+]++[[package]]+name = "target-lexicon"+version = "0.12.16"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1"++[[package]]+name = "tauri"+version = "2.11.5"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "667b20e2726d572dea2de7370da16e188eb06008faf9a92fab7cdc46791190b5"+dependencies = [+ "anyhow",+ "bytes",+ "cookie",+ "dirs",+ "dunce",+ "embed_plist",+ "getrandom 0.3.4",+ "glob",+ "gtk",+ "heck 0.5.0",+ "http",+ "http-range",+ "jni",+ "libc",+ "log",+ "mime",+ "muda",+ "objc2",+ "objc2-app-kit",+ "objc2-foundation",+ "objc2-ui-kit",+ "objc2-web-kit",+ "percent-encoding",+ "plist",+ "raw-window-handle",+ "reqwest",+ "serde",+ "serde_json",+ "serde_repr",+ "serialize-to-javascript",+ "swift-rs",+ "tauri-build",+ "tauri-macros",+ "tauri-runtime",+ "tauri-runtime-wry",+ "tauri-utils",+ "thiserror 2.0.20",+ "tokio",+ "tray-icon",+ "url",+ "webkit2gtk",+ "webview2-com",+ "window-vibrancy",+ "windows",+]++[[package]]+name = "tauri-build"+version = "2.6.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "bc9ce40b16101cb6ea63d3e221567affd1c3a9205f95d7bc574941a10636b632"+dependencies = [+ "anyhow",+ "cargo_toml",+ "dirs",+ "glob",+ "heck 0.5.0",+ "json-patch",+ "schemars 0.8.22",+ "semver",+ "serde",+ "serde_json",+ "tauri-utils",+ "tauri-winres",+ "walkdir",+]++[[package]]+name = "tauri-codegen"+version = "2.6.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "08279169ff42f8fc45a1dbc9dcae888893ba95288142e5880c59b93a26d2cfc5"+dependencies = [+ "base64 0.22.1",+ "brotli",+ "ico",+ "json-patch",+ "plist",+ "png 0.17.16",+ "proc-macro2",+ "quote",+ "semver",+ "serde",+ "serde_json",+ "sha2",+ "syn 2.0.119",+ "tauri-utils",+ "thiserror 2.0.20",+ "time",+ "url",+ "uuid",+ "walkdir",+]++[[package]]+name = "tauri-macros"+version = "2.6.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "e8b394794f399a421811d06966343e7933fcae92d59f5180b9388d1174497a45"+dependencies = [+ "heck 0.5.0",+ "proc-macro2",+ "quote",+ "syn 2.0.119",+ "tauri-codegen",+ "tauri-utils",+]++[[package]]+name = "tauri-plugin"+version = "2.6.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "74be5dd4bed9afbd145e5716b5fa2ec28cbc29c34ffa61c258c9273d896c8020"+dependencies = [+ "anyhow",+ "glob",+ "plist",+ "schemars 0.8.22",+ "serde",+ "serde_json",+ "tauri-utils",+ "walkdir",+]++[[package]]+name = "tauri-plugin-dialog"+version = "2.7.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "b2d3c1dbe38037e7f590cdf2492594d5ceebe031e7bc7e827509b22a999d2940"+dependencies = [+ "log",+ "raw-window-handle",+ "rfd",+ "serde",+ "serde_json",+ "tauri",+ "tauri-plugin",+ "tauri-plugin-fs",+ "thiserror 2.0.20",+ "url",+]++[[package]]+name = "tauri-plugin-fs"+version = "2.5.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "b7ecc274121aca0c036a2b42d1cbe83d368d348f54e0bb8a735c2b1548e8f371"+dependencies = [+ "anyhow",+ "dunce",+ "glob",+ "log",+ "objc2-foundation",+ "percent-encoding",+ "schemars 0.8.22",+ "serde",+ "serde_json",+ "serde_repr",+ "tauri",+ "tauri-plugin",+ "tauri-utils",+ "thiserror 2.0.20",+ "toml 1.1.4+spec-1.1.0",+ "url",+]++[[package]]+name = "tauri-plugin-opener"+version = "2.5.4"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "17e1bea14edce6b793a04e2417e3fd924b9bc4faae83cdee7d714156cceeed29"+dependencies = [+ "dunce",+ "glob",+ "objc2-app-kit",+ "objc2-foundation",+ "open",+ "schemars 0.8.22",+ "serde",+ "serde_json",+ "tauri",+ "tauri-plugin",+ "thiserror 2.0.20",+ "url",+ "windows",+ "zbus",+]++[[package]]+name = "tauri-runtime"+version = "2.11.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "b0b4bc95aed361b0019067d189a1174a603d460d0f6c72606512d59fc9c12ec8"+dependencies = [+ "cookie",+ "dpi",+ "gtk",+ "http",+ "jni",+ "objc2",+ "objc2-ui-kit",+ "objc2-web-kit",+ "raw-window-handle",+ "serde",+ "serde_json",+ "tauri-utils",+ "thiserror 2.0.20",+ "url",+ "webkit2gtk",+ "webview2-com",+ "windows",+]++[[package]]+name = "tauri-runtime-wry"+version = "2.11.4"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "4e6fac707727b7a2f48e4ded90976324267371073edbb415ffb73bb0458d203f"+dependencies = [+ "gtk",+ "http",+ "jni",+ "log",+ "objc2",+ "objc2-app-kit",+ "once_cell",+ "percent-encoding",+ "raw-window-handle",+ "softbuffer",+ "tao",+ "tauri-runtime",+ "tauri-utils",+ "url",+ "webkit2gtk",+ "webview2-com",+ "windows",+ "wry",+]++[[package]]+name = "tauri-utils"+version = "2.9.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "3e176a18e67764923c4f1ce66f25ae4abe5f688384d5eb1a0fa6c77f3d90f887"+dependencies = [+ "anyhow",+ "brotli",+ "cargo_metadata",+ "ctor",+ "dom_query",+ "dunce",+ "glob",+ "http",+ "infer",+ "json-patch",+ "log",+ "memchr",+ "phf",+ "plist",+ "proc-macro2",+ "quote",+ "regex",+ "schemars 0.8.22",+ "semver",+ "serde",+ "serde-untagged",+ "serde_json",+ "serde_with",+ "swift-rs",+ "thiserror 2.0.20",+ "toml 1.1.4+spec-1.1.0",+ "url",+ "urlpattern",+ "uuid",+ "walkdir",+]++[[package]]+name = "tauri-winres"+version = "0.3.6"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "cc65d45c68858bfe420dd29e834b5d15dbecf8a07a8a16cf4d532c7b1f69d4b6"+dependencies = [+ "dunce",+ "embed-resource",+ "toml 1.1.4+spec-1.1.0",+]++[[package]]+name = "tempfile"+version = "3.27.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "32497e9a4c7b38532efcdebeef879707aa9f794296a4f0244f6f69e9bc8574bd"+dependencies = [+ "fastrand",+ "getrandom 0.4.3",+ "once_cell",+ "rustix",+ "windows-sys 0.61.2",+]++[[package]]+name = "tendril"+version = "0.5.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "5fed54709c5b3a53d09bb1c113ea4f5ceafd1e772ddcb0030a82e1d56c087b08"+dependencies = [+ "new_debug_unreachable",+]++[[package]]+name = "thiserror"+version = "1.0.69"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52"+dependencies = [+ "thiserror-impl 1.0.69",+]++[[package]]+name = "thiserror"+version = "2.0.20"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "ec86235f5fcc2a73650310756d2ac5b138a5780bbbdfae3eeccec992c435ba4f"+dependencies = [+ "thiserror-impl 2.0.20",+]++[[package]]+name = "thiserror-impl"+version = "1.0.69"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1"+dependencies = [+ "proc-macro2",+ "quote",+ "syn 2.0.119",+]++[[package]]+name = "thiserror-impl"+version = "2.0.20"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "bc04cd3e1236dd4a98afca4569f2deb3f120e5422a4023be2cb683f8486292af"+dependencies = [+ "proc-macro2",+ "quote",+ "syn 3.0.4",+]++[[package]]+name = "time"+version = "0.3.55"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "cdb87b95ec50ddfa440816d227a17b2ccbdda963a316a727fda0fc4334f7d134"+dependencies = [+ "deranged",+ "num-conv",+ "powerfmt",+ "serde_core",+ "time-core",+ "time-macros",+]++[[package]]+name = "time-core"+version = "0.1.9"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "9e1c906769ad99c88eaa54e728060edef082f8e358ff32030cb7c7d315e81109"++[[package]]+name = "time-macros"+version = "0.2.32"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "7e689342a48d2ea927c87ea50cabf8594854bf940e9310208848d680d668ed85"+dependencies = [+ "num-conv",+ "time-core",+]++[[package]]+name = "tinystr"+version = "0.8.4"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "b1e27c91459209c2986af3dcf603a5a74a4368754ce37414f59acc971167f643"+dependencies = [+ "displaydoc",+ "zerovec",+]++[[package]]+name = "tinyvec"+version = "1.12.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "bb4ebadaa0af04fab11ae01eb5f9fdb5f9c5b875506e210e71c07873528baa7f"+dependencies = [+ "tinyvec_macros",+]++[[package]]+name = "tinyvec_macros"+version = "0.1.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20"++[[package]]+name = "tokio"+version = "1.53.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "202caea871b69668250d242070849eb495be178ed697a3e98aebce5bc81a0bed"+dependencies = [+ "bytes",+ "libc",+ "mio",+ "pin-project-lite",+ "socket2",+ "windows-sys 0.61.2",+]++[[package]]+name = "tokio-util"+version = "0.7.19"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "494815d09bf52b5548659851081238f0ca39ff638363907596da739561c62c52"+dependencies = [+ "bytes",+ "futures-core",+ "futures-sink",+ "pin-project-lite",+ "tokio",+]++[[package]]+name = "toml"+version = "0.8.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "185d8ab0dfbb35cf1399a6344d8484209c088f75f8f68230da55d48d95d43e3d"+dependencies = [+ "serde",+ "serde_spanned 0.6.9",+ "toml_datetime 0.6.3",+ "toml_edit 0.20.2",+]++[[package]]+name = "toml"+version = "0.9.12+spec-1.1.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "cf92845e79fc2e2def6a5d828f0801e29a2f8acc037becc5ab08595c7d5e9863"+dependencies = [+ "indexmap 2.14.0",+ "serde_core",+ "serde_spanned 1.1.1",+ "toml_datetime 0.7.5+spec-1.1.0",+ "toml_parser",+ "toml_writer",+ "winnow 0.7.15",+]++[[package]]+name = "toml"+version = "1.1.4+spec-1.1.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "3aace63f4bbcdfc2c965b059de67119c89c4017a70d633be6c104910f67056f5"+dependencies = [+ "indexmap 2.14.0",+ "serde_core",+ "serde_spanned 1.1.1",+ "toml_datetime 1.1.1+spec-1.1.0",+ "toml_parser",+ "toml_writer",+ "winnow 1.0.4",+]++[[package]]+name = "toml_datetime"+version = "0.6.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b"+dependencies = [+ "serde",+]++[[package]]+name = "toml_datetime"+version = "0.7.5+spec-1.1.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "92e1cfed4a3038bc5a127e35a2d360f145e1f4b971b551a2ba5fd7aedf7e1347"+dependencies = [+ "serde_core",+]++[[package]]+name = "toml_datetime"+version = "1.1.1+spec-1.1.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "3165f65f62e28e0115a00b2ebdd37eb6f3b641855f9d636d3cd4103767159ad7"+dependencies = [+ "serde_core",+]++[[package]]+name = "toml_edit"+version = "0.19.15"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421"+dependencies = [+ "indexmap 2.14.0",+ "toml_datetime 0.6.3",+ "winnow 0.5.40",+]++[[package]]+name = "toml_edit"+version = "0.20.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "396e4d48bbb2b7554c944bde63101b5ae446cff6ec4a24227428f15eb72ef338"+dependencies = [+ "indexmap 2.14.0",+ "serde",+ "serde_spanned 0.6.9",+ "toml_datetime 0.6.3",+ "winnow 0.5.40",+]++[[package]]+name = "toml_edit"+version = "0.25.13+spec-1.1.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "6975367e4d2ef766d86af01ffad14b622fecc8d4357a998fbc4deb6e9bacaf9b"+dependencies = [+ "indexmap 2.14.0",+ "toml_datetime 1.1.1+spec-1.1.0",+ "toml_parser",+ "winnow 1.0.4",+]++[[package]]+name = "toml_parser"+version = "1.1.3+spec-1.1.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "1d38ac1cf9b95face32296c0a3ede1fdc270627c9d9c02a7274dd6d960dc4d56"+dependencies = [+ "winnow 1.0.4",+]++[[package]]+name = "toml_writer"+version = "1.1.2+spec-1.1.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "7d56353a2a665ad0f41a421187180aab746c8c325620617ad883a99a1cbe66d2"++[[package]]+name = "tower"+version = "0.5.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "ebe5ef63511595f1344e2d5cfa636d973292adc0eec1f0ad45fae9f0851ab1d4"+dependencies = [+ "futures-core",+ "futures-util",+ "pin-project-lite",+ "sync_wrapper",+ "tokio",+ "tower-layer",+ "tower-service",+]++[[package]]+name = "tower-http"+version = "0.6.11"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "4cfcf7e2740e6fc6d4d688b4ef00650406bb94adf4731e43c096c3a19fe40840"+dependencies = [+ "bitflags 2.13.1",+ "bytes",+ "futures-util",+ "http",+ "http-body",+ "pin-project-lite",+ "tower",+ "tower-layer",+ "tower-service",+ "url",+]++[[package]]+name = "tower-layer"+version = "0.3.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e"++[[package]]+name = "tower-service"+version = "0.3.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3"++[[package]]+name = "tracing"+version = "0.1.44"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "63e71662fa4b2a2c3a26f570f037eb95bb1f85397f3cd8076caed2f026a6d100"+dependencies = [+ "pin-project-lite",+ "tracing-attributes",+ "tracing-core",+]++[[package]]+name = "tracing-attributes"+version = "0.1.31"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "7490cfa5ec963746568740651ac6781f701c9c5ea257c58e057f3ba8cf69e8da"+dependencies = [+ "proc-macro2",+ "quote",+ "syn 2.0.119",+]++[[package]]+name = "tracing-core"+version = "0.1.36"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "db97caf9d906fbde555dd62fa95ddba9eecfd14cb388e4f491a66d74cd5fb79a"+dependencies = [+ "once_cell",+]++[[package]]+name = "tray-icon"+version = "0.24.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "045979e3f037cd18ad1cb2a419dfda133c5c29c9f3453370079f2255d46c257e"+dependencies = [+ "crossbeam-channel",+ "dirs",+ "libappindicator",+ "muda",+ "objc2",+ "objc2-app-kit",+ "objc2-core-foundation",+ "objc2-core-graphics",+ "objc2-foundation",+ "once_cell",+ "png 0.18.1",+ "serde",+ "thiserror 2.0.20",+ "windows-sys 0.61.2",+]++[[package]]+name = "try-lock"+version = "0.2.5"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b"++[[package]]+name = "typeid"+version = "1.0.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "bc7d623258602320d5c55d1bc22793b57daff0ec7efc270ea7d55ce1d5f5471c"++[[package]]+name = "typenum"+version = "1.20.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "b6f5e870be6c3b371b77fe0ee0bafb859fa4964b4404c27de1d380043c4dda20"++[[package]]+name = "uds_windows"+version = "1.2.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "f2f6fb2847f6742cd76af783a2a2c49e9375d0a111c7bef6f71cd9e738c72d6e"+dependencies = [+ "memoffset",+ "tempfile",+ "windows-sys 0.61.2",+]++[[package]]+name = "unic-char-property"+version = "0.9.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "a8c57a407d9b6fa02b4795eb81c5b6652060a15a7903ea981f3d723e6c0be221"+dependencies = [+ "unic-char-range",+]++[[package]]+name = "unic-char-range"+version = "0.9.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "0398022d5f700414f6b899e10b8348231abf9173fa93144cbc1a43b9793c1fbc"++[[package]]+name = "unic-common"+version = "0.9.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "80d7ff825a6a654ee85a63e80f92f054f904f21e7d12da4e22f9834a4aaa35bc"++[[package]]+name = "unic-ucd-ident"+version = "0.9.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "e230a37c0381caa9219d67cf063aa3a375ffed5bf541a452db16e744bdab6987"+dependencies = [+ "unic-char-property",+ "unic-char-range",+ "unic-ucd-version",+]++[[package]]+name = "unic-ucd-version"+version = "0.9.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "96bd2f2237fe450fcd0a1d2f5f4e91711124f7857ba2e964247776ebeeb7b0c4"+dependencies = [+ "unic-common",+]++[[package]]+name = "unicode-ident"+version = "1.0.24"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75"++[[package]]+name = "unicode-segmentation"+version = "1.13.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "c6f5d3c3b1bf09027a88a6bc961fc00497d651009560b5463668dc81b0fa87a8"++[[package]]+name = "url"+version = "2.5.8"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "ff67a8a4397373c3ef660812acab3268222035010ab8680ec4215f38ba3d0eed"+dependencies = [+ "form_urlencoded",+ "idna",+ "percent-encoding",+ "serde",+ "serde_derive",+]++[[package]]+name = "urlpattern"+version = "0.3.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "70acd30e3aa1450bc2eece896ce2ad0d178e9c079493819301573dae3c37ba6d"+dependencies = [+ "regex",+ "serde",+ "unic-ucd-ident",+ "url",+]++[[package]]+name = "utf8_iter"+version = "1.0.4"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be"++[[package]]+name = "uuid"+version = "1.25.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "f053576934f05a761a402421fbbe3d425d9366f75f978806a037b3ca481abecc"+dependencies = [+ "getrandom 0.4.3",+ "js-sys",+ "serde_core",+ "wasm-bindgen",+]++[[package]]+name = "version-compare"+version = "0.2.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "03c2856837ef78f57382f06b2b8563a2f512f7185d732608fd9176cb3b8edf0e"++[[package]]+name = "version_check"+version = "0.9.5"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a"++[[package]]+name = "vswhom"+version = "0.1.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "be979b7f07507105799e854203b470ff7c78a1639e330a58f183b5fea574608b"+dependencies = [+ "libc",+ "vswhom-sys",+]++[[package]]+name = "vswhom-sys"+version = "0.1.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "fb067e4cbd1ff067d1df46c9194b5de0e98efd2810bbc95c5d5e5f25a3231150"+dependencies = [+ "cc",+ "libc",+]++[[package]]+name = "walkdir"+version = "2.5.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b"+dependencies = [+ "same-file",+ "winapi-util",+]++[[package]]+name = "want"+version = "0.3.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e"+dependencies = [+ "try-lock",+]++[[package]]+name = "wasi"+version = "0.11.1+wasi-snapshot-preview1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b"++[[package]]+name = "wasip2"+version = "1.0.4+wasi-0.2.12"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "b67efb37e106e55ce722a510d6b5f9c17f083e5fc79afc2badeb12cc313d9487"+dependencies = [+ "wit-bindgen",+]++[[package]]+name = "wasm-bindgen"+version = "0.2.127"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "1b70935747edd64d89de3efa29d73789b806c15798f8e7dca4d8ac356b50ce70"+dependencies = [+ "cfg-if",+ "once_cell",+ "rustversion",+ "wasm-bindgen-macro",+ "wasm-bindgen-shared",+]++[[package]]+name = "wasm-bindgen-futures"+version = "0.4.77"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "6b7777d5cc23d0e91404e53ce2d5e8ec7acae3026b16233dba62cd3246457950"+dependencies = [+ "js-sys",+ "wasm-bindgen",+]++[[package]]+name = "wasm-bindgen-macro"+version = "0.2.127"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "77775f8f3f7217702089053b94958f8f54061a3f663417df76e19cbdcca29bc1"+dependencies = [+ "quote",+ "wasm-bindgen-macro-support",+]++[[package]]+name = "wasm-bindgen-macro-support"+version = "0.2.127"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "e11d33f857dc2fb11b8bc75aee111aa9cbeb12cd9f25efd3d4c2a3dd4e235284"+dependencies = [+ "bumpalo",+ "proc-macro2",+ "quote",+ "syn 2.0.119",+ "wasm-bindgen-shared",+]++[[package]]+name = "wasm-bindgen-shared"+version = "0.2.127"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "7ef64dbcc55df09c7e5a46182d181c2cfa3e925f3da937ea764728b4bbb9dcbf"+dependencies = [+ "unicode-ident",+]++[[package]]+name = "wasm-streams"+version = "0.5.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "9d1ec4f6517c9e11ae630e200b2b65d193279042e28edd4a2cda233e46670bbb"+dependencies = [+ "futures-util",+ "js-sys",+ "wasm-bindgen",+ "wasm-bindgen-futures",+ "web-sys",+]++[[package]]+name = "web-sys"+version = "0.3.104"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "c435338968042f4f59a557f690a253676d47ce13ceb55d70100e7facf6620a30"+dependencies = [+ "js-sys",+ "wasm-bindgen",+]++[[package]]+name = "web_atoms"+version = "0.2.6"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "ba8b815c1b593dc0baf78dd0f4fc8fdb2de53198fb1163738093e9a311c33fb3"+dependencies = [+ "phf",+ "phf_codegen",+ "string_cache",+ "string_cache_codegen",+]++[[package]]+name = "webkit2gtk"+version = "2.0.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "a1027150013530fb2eaf806408df88461ae4815a45c541c8975e61d6f2fc4793"+dependencies = [+ "bitflags 1.3.2",+ "cairo-rs",+ "gdk",+ "gdk-sys",+ "gio",+ "gio-sys",+ "glib",+ "glib-sys",+ "gobject-sys",+ "gtk",+ "gtk-sys",+ "javascriptcore-rs",+ "libc",+ "once_cell",+ "soup3",+ "webkit2gtk-sys",+]++[[package]]+name = "webkit2gtk-sys"+version = "2.0.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "916a5f65c2ef0dfe12fff695960a2ec3d4565359fdbb2e9943c974e06c734ea5"+dependencies = [+ "bitflags 1.3.2",+ "cairo-sys-rs",+ "gdk-sys",+ "gio-sys",+ "glib-sys",+ "gobject-sys",+ "gtk-sys",+ "javascriptcore-rs-sys",+ "libc",+ "pkg-config",+ "soup3-sys",+ "system-deps",+]++[[package]]+name = "webview2-com"+version = "0.38.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "7130243a7a5b33c54a444e54842e6a9e133de08b5ad7b5861cd8ed9a6a5bc96a"+dependencies = [+ "webview2-com-macros",+ "webview2-com-sys",+ "windows",+ "windows-core 0.61.2",+ "windows-implement",+ "windows-interface",+]++[[package]]+name = "webview2-com-macros"+version = "0.8.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "67a921c1b6914c367b2b823cd4cde6f96beec77d30a939c8199bb377cf9b9b54"+dependencies = [+ "proc-macro2",+ "quote",+ "syn 2.0.119",+]++[[package]]+name = "webview2-com-sys"+version = "0.38.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "381336cfffd772377d291702245447a5251a2ffa5bad679c99e61bc48bacbf9c"+dependencies = [+ "thiserror 2.0.20",+ "windows",+ "windows-core 0.61.2",+]++[[package]]+name = "winapi"+version = "0.3.9"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419"+dependencies = [+ "winapi-i686-pc-windows-gnu",+ "winapi-x86_64-pc-windows-gnu",+]++[[package]]+name = "winapi-i686-pc-windows-gnu"+version = "0.4.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"++[[package]]+name = "winapi-util"+version = "0.1.11"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22"+dependencies = [+ "windows-sys 0.61.2",+]++[[package]]+name = "winapi-x86_64-pc-windows-gnu"+version = "0.4.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"++[[package]]+name = "window-vibrancy"+version = "0.6.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "d9bec5a31f3f9362f2258fd0e9c9dd61a9ca432e7306cc78c444258f0dce9a9c"+dependencies = [+ "objc2",+ "objc2-app-kit",+ "objc2-core-foundation",+ "objc2-foundation",+ "raw-window-handle",+ "windows-sys 0.59.0",+ "windows-version",+]++[[package]]+name = "windows"+version = "0.61.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "9babd3a767a4c1aef6900409f85f5d53ce2544ccdfaa86dad48c91782c6d6893"+dependencies = [+ "windows-collections",+ "windows-core 0.61.2",+ "windows-future",+ "windows-link 0.1.3",+ "windows-numerics",+]++[[package]]+name = "windows-collections"+version = "0.2.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "3beeceb5e5cfd9eb1d76b381630e82c4241ccd0d27f1a39ed41b2760b255c5e8"+dependencies = [+ "windows-core 0.61.2",+]++[[package]]+name = "windows-core"+version = "0.61.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "c0fdd3ddb90610c7638aa2b3a3ab2904fb9e5cdbecc643ddb3647212781c4ae3"+dependencies = [+ "windows-implement",+ "windows-interface",+ "windows-link 0.1.3",+ "windows-result 0.3.4",+ "windows-strings 0.4.2",+]++[[package]]+name = "windows-core"+version = "0.62.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "b8e83a14d34d0623b51dce9581199302a221863196a1dde71a7663a4c2be9deb"+dependencies = [+ "windows-implement",+ "windows-interface",+ "windows-link 0.2.1",+ "windows-result 0.4.1",+ "windows-strings 0.5.1",+]++[[package]]+name = "windows-future"+version = "0.2.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "fc6a41e98427b19fe4b73c550f060b59fa592d7d686537eebf9385621bfbad8e"+dependencies = [+ "windows-core 0.61.2",+ "windows-link 0.1.3",+ "windows-threading",+]++[[package]]+name = "windows-implement"+version = "0.60.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf"+dependencies = [+ "proc-macro2",+ "quote",+ "syn 2.0.119",+]++[[package]]+name = "windows-interface"+version = "0.59.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358"+dependencies = [+ "proc-macro2",+ "quote",+ "syn 2.0.119",+]++[[package]]+name = "windows-link"+version = "0.1.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "5e6ad25900d524eaabdbbb96d20b4311e1e7ae1699af4fb28c17ae66c80d798a"++[[package]]+name = "windows-link"+version = "0.2.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5"++[[package]]+name = "windows-numerics"+version = "0.2.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "9150af68066c4c5c07ddc0ce30421554771e528bde427614c61038bc2c92c2b1"+dependencies = [+ "windows-core 0.61.2",+ "windows-link 0.1.3",+]++[[package]]+name = "windows-result"+version = "0.3.4"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "56f42bd332cc6c8eac5af113fc0c1fd6a8fd2aa08a0119358686e5160d0586c6"+dependencies = [+ "windows-link 0.1.3",+]++[[package]]+name = "windows-result"+version = "0.4.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "7781fa89eaf60850ac3d2da7af8e5242a5ea78d1a11c49bf2910bb5a73853eb5"+dependencies = [+ "windows-link 0.2.1",+]++[[package]]+name = "windows-strings"+version = "0.4.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "56e6c93f3a0c3b36176cb1327a4958a0353d5d166c2a35cb268ace15e91d3b57"+dependencies = [+ "windows-link 0.1.3",+]++[[package]]+name = "windows-strings"+version = "0.5.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "7837d08f69c77cf6b07689544538e017c1bfcf57e34b4c0ff58e6c2cd3b37091"+dependencies = [+ "windows-link 0.2.1",+]++[[package]]+name = "windows-sys"+version = "0.45.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0"+dependencies = [+ "windows-targets 0.42.2",+]++[[package]]+name = "windows-sys"+version = "0.59.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b"+dependencies = [+ "windows-targets 0.52.6",+]++[[package]]+name = "windows-sys"+version = "0.60.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb"+dependencies = [+ "windows-targets 0.53.5",+]++[[package]]+name = "windows-sys"+version = "0.61.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc"+dependencies = [+ "windows-link 0.2.1",+]++[[package]]+name = "windows-targets"+version = "0.42.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071"+dependencies = [+ "windows_aarch64_gnullvm 0.42.2",+ "windows_aarch64_msvc 0.42.2",+ "windows_i686_gnu 0.42.2",+ "windows_i686_msvc 0.42.2",+ "windows_x86_64_gnu 0.42.2",+ "windows_x86_64_gnullvm 0.42.2",+ "windows_x86_64_msvc 0.42.2",+]++[[package]]+name = "windows-targets"+version = "0.52.6"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973"+dependencies = [+ "windows_aarch64_gnullvm 0.52.6",+ "windows_aarch64_msvc 0.52.6",+ "windows_i686_gnu 0.52.6",+ "windows_i686_gnullvm 0.52.6",+ "windows_i686_msvc 0.52.6",+ "windows_x86_64_gnu 0.52.6",+ "windows_x86_64_gnullvm 0.52.6",+ "windows_x86_64_msvc 0.52.6",+]++[[package]]+name = "windows-targets"+version = "0.53.5"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "4945f9f551b88e0d65f3db0bc25c33b8acea4d9e41163edf90dcd0b19f9069f3"+dependencies = [+ "windows-link 0.2.1",+ "windows_aarch64_gnullvm 0.53.1",+ "windows_aarch64_msvc 0.53.1",+ "windows_i686_gnu 0.53.1",+ "windows_i686_gnullvm 0.53.1",+ "windows_i686_msvc 0.53.1",+ "windows_x86_64_gnu 0.53.1",+ "windows_x86_64_gnullvm 0.53.1",+ "windows_x86_64_msvc 0.53.1",+]++[[package]]+name = "windows-threading"+version = "0.1.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "b66463ad2e0ea3bbf808b7f1d371311c80e115c0b71d60efc142cafbcfb057a6"+dependencies = [+ "windows-link 0.1.3",+]++[[package]]+name = "windows-version"+version = "0.1.7"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "e4060a1da109b9d0326b7262c8e12c84df67cc0dbc9e33cf49e01ccc2eb63631"+dependencies = [+ "windows-link 0.2.1",+]++[[package]]+name = "windows_aarch64_gnullvm"+version = "0.42.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8"++[[package]]+name = "windows_aarch64_gnullvm"+version = "0.52.6"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3"++[[package]]+name = "windows_aarch64_gnullvm"+version = "0.53.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "a9d8416fa8b42f5c947f8482c43e7d89e73a173cead56d044f6a56104a6d1b53"++[[package]]+name = "windows_aarch64_msvc"+version = "0.42.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43"++[[package]]+name = "windows_aarch64_msvc"+version = "0.52.6"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469"++[[package]]+name = "windows_aarch64_msvc"+version = "0.53.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "b9d782e804c2f632e395708e99a94275910eb9100b2114651e04744e9b125006"++[[package]]+name = "windows_i686_gnu"+version = "0.42.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f"++[[package]]+name = "windows_i686_gnu"+version = "0.52.6"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b"++[[package]]+name = "windows_i686_gnu"+version = "0.53.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "960e6da069d81e09becb0ca57a65220ddff016ff2d6af6a223cf372a506593a3"++[[package]]+name = "windows_i686_gnullvm"+version = "0.52.6"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66"++[[package]]+name = "windows_i686_gnullvm"+version = "0.53.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "fa7359d10048f68ab8b09fa71c3daccfb0e9b559aed648a8f95469c27057180c"++[[package]]+name = "windows_i686_msvc"+version = "0.42.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060"++[[package]]+name = "windows_i686_msvc"+version = "0.52.6"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66"++[[package]]+name = "windows_i686_msvc"+version = "0.53.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "1e7ac75179f18232fe9c285163565a57ef8d3c89254a30685b57d83a38d326c2"++[[package]]+name = "windows_x86_64_gnu"+version = "0.42.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36"++[[package]]+name = "windows_x86_64_gnu"+version = "0.52.6"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78"++[[package]]+name = "windows_x86_64_gnu"+version = "0.53.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "9c3842cdd74a865a8066ab39c8a7a473c0778a3f29370b5fd6b4b9aa7df4a499"++[[package]]+name = "windows_x86_64_gnullvm"+version = "0.42.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3"++[[package]]+name = "windows_x86_64_gnullvm"+version = "0.52.6"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d"++[[package]]+name = "windows_x86_64_gnullvm"+version = "0.53.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "0ffa179e2d07eee8ad8f57493436566c7cc30ac536a3379fdf008f47f6bb7ae1"++[[package]]+name = "windows_x86_64_msvc"+version = "0.42.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0"++[[package]]+name = "windows_x86_64_msvc"+version = "0.52.6"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"++[[package]]+name = "windows_x86_64_msvc"+version = "0.53.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "d6bbff5f0aada427a1e5a6da5f1f98158182f26556f345ac9e04d36d0ebed650"++[[package]]+name = "winnow"+version = "0.5.40"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876"+dependencies = [+ "memchr",+]++[[package]]+name = "winnow"+version = "0.7.15"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "df79d97927682d2fd8adb29682d1140b343be4ac0f08fd68b7765d9c059d3945"++[[package]]+name = "winnow"+version = "1.0.4"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "23b97319f7b8343df12cc98938e5c3eb436064524c8d2b4e30a1d3a36eecdf81"+dependencies = [+ "memchr",+]++[[package]]+name = "winreg"+version = "0.55.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "cb5a765337c50e9ec252c2069be9bf91c7df47afb103b642ba3a53bf8101be97"+dependencies = [+ "cfg-if",+ "windows-sys 0.59.0",+]++[[package]]+name = "wit-bindgen"+version = "0.57.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "1ebf944e87a7c253233ad6766e082e3cd714b5d03812acc24c318f549614536e"++[[package]]+name = "writeable"+version = "0.6.4"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "3ad82d2a33cdc9674dc7465672f271e096168fcdbe0f799d9e6db8c5892679dc"++[[package]]+name = "wry"+version = "0.55.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "186f9871daa55fd9c016578b810d149de58367113db7fb72b462d2323ce19514"+dependencies = [+ "base64 0.22.1",+ "block2",+ "cookie",+ "crossbeam-channel",+ "dirs",+ "dom_query",+ "dpi",+ "dunce",+ "gdkx11",+ "gtk",+ "http",+ "javascriptcore-rs",+ "jni",+ "libc",+ "ndk",+ "objc2",+ "objc2-app-kit",+ "objc2-core-foundation",+ "objc2-foundation",+ "objc2-ui-kit",+ "objc2-web-kit",+ "once_cell",+ "percent-encoding",+ "raw-window-handle",+ "sha2",+ "soup3",+ "tao-macros",+ "thiserror 2.0.20",+ "url",+ "webkit2gtk",+ "webkit2gtk-sys",+ "webview2-com",+ "windows",+ "windows-core 0.61.2",+ "windows-version",+ "x11-dl",+]++[[package]]+name = "x11"+version = "2.21.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "502da5464ccd04011667b11c435cb992822c2c0dbde1770c988480d312a0db2e"+dependencies = [+ "libc",+ "pkg-config",+]++[[package]]+name = "x11-dl"+version = "2.21.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "38735924fedd5314a6e548792904ed8c6de6636285cb9fec04d5b1db85c1516f"+dependencies = [+ "libc",+ "once_cell",+ "pkg-config",+]++[[package]]+name = "yoke"+version = "0.8.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "709fe23a0424b6a435d82152b1bd3fdfb0833487d5fa90d05d42762a9891fef5"+dependencies = [+ "stable_deref_trait",+ "yoke-derive",+ "zerofrom",+]++[[package]]+name = "yoke-derive"+version = "0.8.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "de844c262c8848816172cef550288e7dc6c7b7814b4ee56b3e1553f275f1858e"+dependencies = [+ "proc-macro2",+ "quote",+ "syn 2.0.119",+ "synstructure",+]++[[package]]+name = "zbus"+version = "5.19.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "5db4be7c075cb421e4b7ee645541604239bd243ba7c357511f4ff3a74b555907"+dependencies = [+ "async-broadcast",+ "async-executor",+ "async-io",+ "async-lock",+ "async-process",+ "async-recursion",+ "async-task",+ "async-trait",+ "blocking",+ "enumflags2",+ "event-listener",+ "futures-core",+ "futures-lite",+ "hex",+ "libc",+ "ordered-stream",+ "rustix",+ "serde",+ "serde_repr",+ "tracing",+ "uds_windows",+ "uuid",+ "windows-sys 0.61.2",+ "winnow 1.0.4",+ "zbus_macros",+ "zbus_names",+ "zvariant",+]++[[package]]+name = "zbus_macros"+version = "5.19.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "2990635d09ade6df1868f72f8cac69a876a90981e8bd3c40b1be413f8dc88f40"+dependencies = [+ "proc-macro-crate 3.5.0",+ "proc-macro2",+ "quote",+ "syn 3.0.4",+ "zbus_names",+ "zvariant",+ "zvariant_utils",+]++[[package]]+name = "zbus_names"+version = "4.3.4"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "d8bf88b4a3ff53e883001e0e0115b297a9d53c31b9c1edd2bfdd853e3428624e"+dependencies = [+ "serde",+ "winnow 1.0.4",+ "zvariant",+]++[[package]]+name = "zcheapstr"+version = "1.1.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "d1afec51604565183aeb5c54c20aeab286120d4e4460f7f76e3e8bb8c0d99473"+dependencies = [+ "serde",+]++[[package]]+name = "zerofrom"+version = "0.1.8"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "0ec05a11813ea801ff6d75110ad09cd0824ddba17dfe17128ea0d5f68e6c5272"+dependencies = [+ "zerofrom-derive",+]++[[package]]+name = "zerofrom-derive"+version = "0.1.7"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "11532158c46691caf0f2593ea8358fed6bbf68a0315e80aae9bd41fbade684a1"+dependencies = [+ "proc-macro2",+ "quote",+ "syn 2.0.119",+ "synstructure",+]++[[package]]+name = "zerotrie"+version = "0.2.5"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "4ea269c3bd32f0a32c321907a2ae912ba6f4649bb0fc764a15627e99a7095a3f"+dependencies = [+ "displaydoc",+ "yoke",+ "zerofrom",+]++[[package]]+name = "zerovec"+version = "0.11.8"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "bb0464e17806c1d976d5cba29399c7f08e516e279e2ba493f63123b5fca67dd8"+dependencies = [+ "yoke",+ "zerofrom",+ "zerovec-derive",+]++[[package]]+name = "zerovec-derive"+version = "0.11.6"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "34df6fc39dbd26ddc9c10e6a2984476e13acce22e64e4487636ef494369225da"+dependencies = [+ "proc-macro2",+ "quote",+ "syn 3.0.4",+]++[[package]]+name = "zmij"+version = "1.0.23"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "29666d0abbfad1e3dc4dcf6144730dd3a3ab225bbbdac83319345b1b44ccfc1b"++[[package]]+name = "zvariant"+version = "5.15.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "c1d34c27cc6cdd1f458427519dd6b8612f7b7e3f7b9a0b2355d041dda9869147"+dependencies = [+ "endi",+ "enumflags2",+ "serde",+ "winnow 1.0.4",+ "zcheapstr",+ "zvariant_derive",+ "zvariant_utils",+]++[[package]]+name = "zvariant_derive"+version = "5.15.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "864155e69b4352db0c7f374917bf45d1e0c8d17659c8b3dbf9795f3673f8c497"+dependencies = [+ "proc-macro-crate 3.5.0",+ "proc-macro2",+ "quote",+ "syn 3.0.4",+ "zvariant_utils",+]++[[package]]+name = "zvariant_utils"+version = "4.2.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "bad0294361a320b694a328460dc73add56c306150f5cb6bfafc44446120008a3"+dependencies = [+ "proc-macro2",+ "quote",+ "serde",+ "syn 3.0.4",+ "winnow 1.0.4",+]diff --git a/desktop/src-tauri/Cargo.toml b/desktop/src-tauri/Cargo.tomlnew file mode 100644index 00000000..e149aa98--- /dev/null+++ b/desktop/src-tauri/Cargo.toml@@ -0,0 +1,41 @@+[package]+name = "relay-desktop"+version = "0.1.0"+description = "Relay video editor"+edition = "2021"++[lib]+# The `_lib` suffix keeps the library name distinct from the binary name, which+# otherwise collides on Windows. See rust-lang/cargo#8519.+name = "relay_desktop_lib"+crate-type = ["staticlib", "cdylib", "rlib"]++[build-dependencies]+tauri-build = { version = "2", features = [] }++[dependencies]+tauri = { version = "2", features = ["protocol-asset"] }+tauri-plugin-opener = "2"+tauri-plugin-dialog = "2"+serde = { version = "1", features = ["derive"] }+serde_json = "1"++# The engine. Path dependencies rather than a shared workspace on purpose: the+# engine builds, tests and versions on its own, and nothing about it should+# depend on there being a desktop app.+relay-core = { path = "../../engine/crates/relay-core" }+relay-media = { path = "../../engine/crates/relay-media" }+relay-render = { path = "../../engine/crates/relay-render" }++[profile.release]+opt-level = 3+lto = true+codegen-units = 1+strip = true+# Not panic = "abort": Tauri catches panics on the command thread, and losing+# that turns a recoverable command failure into a dead window.++[profile.dev]+# The UI is unusable if the engine underneath it runs unoptimised.+[profile.dev.package."*"]+opt-level = 2diff --git a/desktop/src-tauri/build.rs b/desktop/src-tauri/build.rsnew file mode 100644index 00000000..d860e1e6--- /dev/null+++ b/desktop/src-tauri/build.rs@@ -0,0 +1,3 @@+fn main() {+ tauri_build::build()+}diff --git a/desktop/src-tauri/capabilities/default.json b/desktop/src-tauri/capabilities/default.jsonnew file mode 100644index 00000000..f1fc3edb--- /dev/null+++ b/desktop/src-tauri/capabilities/default.json@@ -0,0 +1,20 @@+{+ "$schema": "../gen/schemas/desktop-schema.json",+ "identifier": "default",+ "description": "Capability for the main window",+ "windows": ["main"],+ "permissions": [+ "core:default",+ "opener:default",+ "dialog:default",++ "core:window:allow-minimize",+ "core:window:allow-unminimize",+ "core:window:allow-maximize",+ "core:window:allow-unmaximize",+ "core:window:allow-toggle-maximize",+ "core:window:allow-is-maximized",+ "core:window:allow-close",+ "core:window:allow-start-dragging"+ ]+}diff --git a/desktop/src-tauri/icons/128x128.png b/desktop/src-tauri/icons/128x128.pngnew file mode 100644index 00000000..6be5e50eBinary files /dev/null and b/desktop/src-tauri/icons/128x128.png differdiff --git a/desktop/src-tauri/icons/[email protected] b/desktop/src-tauri/icons/[email protected]new file mode 100644index 00000000..e81beceeBinary files /dev/null and b/desktop/src-tauri/icons/[email protected] differdiff --git a/desktop/src-tauri/icons/32x32.png b/desktop/src-tauri/icons/32x32.pngnew file mode 100644index 00000000..a437dd51Binary files /dev/null and b/desktop/src-tauri/icons/32x32.png differdiff --git a/desktop/src-tauri/icons/Square107x107Logo.png b/desktop/src-tauri/icons/Square107x107Logo.pngnew file mode 100644index 00000000..0ca4f271Binary files /dev/null and b/desktop/src-tauri/icons/Square107x107Logo.png differdiff --git a/desktop/src-tauri/icons/Square142x142Logo.png b/desktop/src-tauri/icons/Square142x142Logo.pngnew file mode 100644index 00000000..b81f8203Binary files /dev/null and b/desktop/src-tauri/icons/Square142x142Logo.png differdiff --git a/desktop/src-tauri/icons/Square150x150Logo.png b/desktop/src-tauri/icons/Square150x150Logo.pngnew file mode 100644index 00000000..624c7bfbBinary files /dev/null and b/desktop/src-tauri/icons/Square150x150Logo.png differdiff --git a/desktop/src-tauri/icons/Square284x284Logo.png b/desktop/src-tauri/icons/Square284x284Logo.pngnew file mode 100644index 00000000..c021d2baBinary files /dev/null and b/desktop/src-tauri/icons/Square284x284Logo.png differdiff --git a/desktop/src-tauri/icons/Square30x30Logo.png b/desktop/src-tauri/icons/Square30x30Logo.pngnew file mode 100644index 00000000..62197002Binary files /dev/null and b/desktop/src-tauri/icons/Square30x30Logo.png differdiff --git a/desktop/src-tauri/icons/Square310x310Logo.png b/desktop/src-tauri/icons/Square310x310Logo.pngnew file mode 100644index 00000000..f9bc0483Binary files /dev/null and b/desktop/src-tauri/icons/Square310x310Logo.png differdiff --git a/desktop/src-tauri/icons/Square44x44Logo.png b/desktop/src-tauri/icons/Square44x44Logo.pngnew file mode 100644index 00000000..d5fbfb2aBinary files /dev/null and b/desktop/src-tauri/icons/Square44x44Logo.png differdiff --git a/desktop/src-tauri/icons/Square71x71Logo.png b/desktop/src-tauri/icons/Square71x71Logo.pngnew file mode 100644index 00000000..63440d79Binary files /dev/null and b/desktop/src-tauri/icons/Square71x71Logo.png differdiff --git a/desktop/src-tauri/icons/Square89x89Logo.png b/desktop/src-tauri/icons/Square89x89Logo.pngnew file mode 100644index 00000000..f3f705afBinary files /dev/null and b/desktop/src-tauri/icons/Square89x89Logo.png differdiff --git a/desktop/src-tauri/icons/StoreLogo.png b/desktop/src-tauri/icons/StoreLogo.pngnew file mode 100644index 00000000..45563882Binary files /dev/null and b/desktop/src-tauri/icons/StoreLogo.png differdiff --git a/desktop/src-tauri/icons/icon.icns b/desktop/src-tauri/icons/icon.icnsnew file mode 100644index 00000000..12a5bceeBinary files /dev/null and b/desktop/src-tauri/icons/icon.icns differdiff --git a/desktop/src-tauri/icons/icon.ico b/desktop/src-tauri/icons/icon.iconew file mode 100644index 00000000..b3636e4bBinary files /dev/null and b/desktop/src-tauri/icons/icon.ico differdiff --git a/desktop/src-tauri/icons/icon.png b/desktop/src-tauri/icons/icon.pngnew file mode 100644index 00000000..e1cd2619Binary files /dev/null and b/desktop/src-tauri/icons/icon.png differdiff --git a/desktop/src-tauri/src/export.rs b/desktop/src-tauri/src/export.rsnew file mode 100644index 00000000..a6c78f3f--- /dev/null+++ b/desktop/src-tauri/src/export.rs@@ -0,0 +1,375 @@+//! Rendering a timeline to a file.+//!+//! This is the first thing in the app that uses the engine for what it is for:+//! `relay-render` decides what is on screen at each instant, `relay-media`+//! decodes and encodes, and `relay-core` holds the timeline. The UI's own+//! model is converted into the engine's on the way in, which is a useful+//! rehearsal for the day the engine owns the model outright.+//!+//! Picture and sound take different routes. Picture is composited frame by+//! frame here, because that is the part that needs a compositor. Sound is+//! handed to FFmpeg as one `filter_complex`, because mixing delayed, trimmed+//! audio streams is exactly what it is good at and writing a mixer to do it+//! twice would be silly.++use std::collections::HashMap;+use std::path::{Path, PathBuf};++use relay_core::frame::Frame;+use relay_core::time::{FrameRate, Rational};+use relay_core::timeline::{Clip, ClipId, MediaRef, Timeline, Track, TrackKind};+use relay_media::{+ DecodeOptions, EncodeOptions, FfmpegDecoder, FfmpegEncoder, FrameSink, FrameSource,+};+use relay_render::{Compositor, CpuCompositor, Layer, plan_frame};+use serde::{Deserialize, Serialize};+use tauri::Emitter;++/// One clip, as the UI describes it.+#[derive(Deserialize, Clone)]+#[serde(rename_all = "camelCase")]+pub struct ExportClip {+ pub path: String,+ /// "video" or "audio".+ pub kind: String,+ pub start: f64,+ pub duration: f64,+ pub source_start: f64,+ /// Index into the track stack, zero being bottom-most.+ pub track: usize,+ /// The track's picture is switched off.+ pub hidden: bool,+ /// The track's sound is switched off.+ pub muted: bool,+ /// Linear gain, 1 being unity.+ #[serde(default = "unity")]+ pub volume: f64,+ #[serde(default)]+ pub fade_in: f64,+ #[serde(default)]+ pub fade_out: f64,+}++fn unity() -> f64 {+ 1.0+}++#[derive(Deserialize)]+#[serde(rename_all = "camelCase")]+pub struct ExportRequest {+ pub output: String,+ pub width: u32,+ pub height: u32,+ /// Frame rate as an exact fraction, so 29.97 stays 30000/1001.+ pub rate_num: i64,+ pub rate_den: i64,+ /// Constant rate factor. Lower is better quality and a bigger file.+ pub crf: u8,+ pub preset: String,+ pub clips: Vec<ExportClip>,+}++#[derive(Clone, Serialize)]+#[serde(rename_all = "camelCase")]+struct Progress {+ frame: i64,+ total: i64,+ stage: &'static str,+}++/// Renders `request` and returns the path written.+pub fn run(app: &tauri::AppHandle, request: ExportRequest) -> Result<String, String> {+ if request.clips.is_empty() {+ return Err("there is nothing on the timeline to export".to_owned());+ }++ let rate = FrameRate::new(Rational::new(request.rate_num, request.rate_den));+ let output = PathBuf::from(&request.output);++ // Stills composite exactly like footage; they only differ in how they are+ // decoded, which is handled where the decoder is opened.+ let visible: Vec<&ExportClip> = request+ .clips+ .iter()+ .filter(|clip| (clip.kind == "video" || clip.kind == "image") && !clip.hidden)+ .collect();+ let audible: Vec<&ExportClip> = request+ .clips+ .iter()+ .filter(|clip| clip.kind == "audio" && !clip.muted)+ .collect();++ // A video clip carries its own sound, so an unmuted video track+ // contributes to the mix as well as to the picture.+ let mut sound: Vec<&ExportClip> = audible;+ sound.extend(+ request+ .clips+ .iter()+ .filter(|clip| clip.kind == "video" && !clip.muted),+ );++ let duration = request+ .clips+ .iter()+ .map(|clip| clip.start + clip.duration)+ .fold(0.0f64, f64::max);+ let total_frames = (duration * rate.fps().as_f64()).round() as i64;+ if total_frames <= 0 {+ return Err("the timeline is empty".to_owned());+ }++ // Render into siblings of the output so the move at the end stays on one+ // filesystem, then clean up whatever we made.+ let stem = output.file_stem().map_or_else(|| "relay".into(), |s| s.to_string_lossy());+ let directory = output.parent().unwrap_or(Path::new("."));+ let silent = directory.join(format!(".{stem}.relay-video.mp4"));+ let mixed = directory.join(format!(".{stem}.relay-audio.m4a"));++ let result = (|| -> Result<(), String> {+ render_picture(app, &request, rate, total_frames, &visible, &silent)?;++ if sound.is_empty() {+ std::fs::rename(&silent, &output)+ .map_err(|error| format!("could not write {}: {error}", output.display()))?;+ return Ok(());+ }++ emit(app, 0, total_frames, "mixing audio");+ mix_audio(&sound, duration, &mixed)?;++ emit(app, total_frames, total_frames, "muxing");+ mux(&silent, &mixed, &output)+ })();++ let _ = std::fs::remove_file(&silent);+ let _ = std::fs::remove_file(&mixed);++ result.map(|()| output.to_string_lossy().into_owned())+}++/// Composites every frame of the timeline into a soundless video file.+fn render_picture(+ app: &tauri::AppHandle,+ request: &ExportRequest,+ rate: FrameRate,+ total_frames: i64,+ visible: &[&ExportClip],+ destination: &Path,+) -> Result<(), String> {+ let (timeline, stills) = build_timeline(request, rate, visible);++ let mut encoder = FfmpegEncoder::create(+ destination,+ request.width,+ request.height,+ rate,+ &EncodeOptions {+ crf: request.crf,+ preset: request.preset.clone(),+ ..EncodeOptions::default()+ },+ )+ .map_err(|error| error.to_string())?;++ let mut compositor = CpuCompositor;++ // One decoder per clip, opened at its in-point the first time the clip is+ // needed and dropped the moment it leaves the playhead. Because every+ // decoder is opened at the output frame rate, pulling exactly one frame+ // per output frame keeps each of them in step without any seeking.+ let mut decoders: HashMap<ClipId, FfmpegDecoder> = HashMap::new();++ for index in 0..total_frames {+ let time = rate.time_of_frame(index);+ let plan = plan_frame(&timeline, time);++ let mut sources: Vec<(Frame, f32)> = Vec::with_capacity(plan.layers.len());+ for layer in &plan.layers {+ let decoder = match decoders.entry(layer.clip) {+ std::collections::hash_map::Entry::Occupied(entry) => entry.into_mut(),+ std::collections::hash_map::Entry::Vacant(entry) => {+ let mut options = DecodeOptions::default()+ .starting_at(layer.source_time)+ .scaled_to(request.width, request.height)+ .at_rate(rate);++ // A still is a one-frame stream. Without looping it would+ // contribute a single frame and then disappear.+ if stills.contains(&layer.clip) {+ options = options.repeating().starting_at(Rational::ZERO);+ }++ entry.insert(+ FfmpegDecoder::open(&layer.media, &options)+ .map_err(|error| error.to_string())?,+ )+ }+ };++ // A source that has run out contributes nothing rather than+ // aborting the export - a clip trimmed past its media's end is a+ // mistake in the edit, not a failure of the renderer.+ if let Some(frame) = decoder.next_frame().map_err(|error| error.to_string())? {+ sources.push((frame, layer.opacity));+ }+ }++ let layers: Vec<Layer<'_>> = sources+ .iter()+ .map(|(frame, opacity)| Layer::new(frame).with_opacity(*opacity))+ .collect();++ let composed = compositor.composite(request.width, request.height, &layers);+ encoder.write_frame(&composed).map_err(|error| error.to_string())?;++ // Retire decoders whose clip has finished, so a long timeline does not+ // hold an ffmpeg process open for every clip it has ever passed.+ let live: Vec<ClipId> = plan.layers.iter().map(|layer| layer.clip).collect();+ decoders.retain(|clip, _| live.contains(clip));++ if index % 15 == 0 {+ emit(app, index, total_frames, "rendering");+ }+ }++ encoder.finish().map_err(|error| error.to_string())+}++/// Converts the UI's flat clip list into an engine timeline.+///+/// Also returns which clips are stills, because that is knowledge the engine's+/// timeline has no field for and the decoder needs.+fn build_timeline(+ request: &ExportRequest,+ rate: FrameRate,+ visible: &[&ExportClip],+) -> (Timeline, std::collections::HashSet<ClipId>) {+ let mut timeline = Timeline::new(request.width, request.height, rate);+ let mut stills = std::collections::HashSet::new();++ let lanes = visible.iter().map(|clip| clip.track).max().unwrap_or(0) + 1;+ let tracks: Vec<_> = (0..lanes)+ .map(|index| timeline.add_track(Track::new(format!("T{index}"), TrackKind::Video)))+ .collect();++ for clip in visible {+ // Quantise to the frame grid on the way in. The UI works in f64+ // seconds; the engine works in exact rationals, and this is the seam+ // where a value stops being approximate.+ let start = quantise(clip.start, rate);+ let duration = quantise(clip.duration, rate);+ if duration.is_zero() {+ continue;+ }++ let mut engine_clip = Clip::new(MediaRef::new(&clip.path), start, duration);+ engine_clip.source_start = quantise(clip.source_start, rate);++ if let Some(id) = timeline.add_clip(tracks[clip.track], engine_clip) {+ if clip.kind == "image" {+ stills.insert(id);+ }+ }+ }++ (timeline, stills)+}++fn quantise(seconds: f64, rate: FrameRate) -> Rational {+ rate.time_of_frame((seconds * rate.fps().as_f64()).round().max(0.0) as i64)+}++/// Trims, delays and mixes every audible clip into one track.+fn mix_audio(clips: &[&ExportClip], duration: f64, destination: &Path) -> Result<(), String> {+ let mut command = std::process::Command::new("ffmpeg");+ command.args(["-hide_banner", "-nostdin", "-loglevel", "error", "-y"]);++ for clip in clips {+ command.args(["-i", &clip.path]);+ }++ // Each input is trimmed to its in-point, restamped from zero, then delayed+ // to where it sits on the timeline. `all=1` applies the delay to every+ // channel; without it only the left channel moves, which is a memorable+ // way to discover the flag exists.+ let mut chains: Vec<String> = Vec::new();+ for (index, clip) in clips.iter().enumerate() {+ let delay_ms = (clip.start * 1000.0).round().max(0.0) as i64;++ // Gain and fades sit between the restamp and the delay: after the+ // restamp so the fade times are measured from the clip's own start,+ // and before the delay so they are not pushed along with it.+ let mut stage = format!(+ "[{index}:a]atrim=start={:.6}:duration={:.6},asetpts=PTS-STARTPTS",+ clip.source_start, clip.duration+ );++ if (clip.volume - 1.0).abs() > f64::EPSILON {+ stage.push_str(&format!(",volume={:.4}", clip.volume.max(0.0)));+ }+ if clip.fade_in > 0.0 {+ stage.push_str(&format!(",afade=t=in:st=0:d={:.4}", clip.fade_in));+ }+ if clip.fade_out > 0.0 {+ let start = (clip.duration - clip.fade_out).max(0.0);+ stage.push_str(&format!(",afade=t=out:st={start:.4}:d={:.4}", clip.fade_out));+ }++ stage.push_str(&format!(",adelay={delay_ms}:all=1[a{index}]"));+ chains.push(stage);+ }++ let inputs: String = (0..clips.len()).map(|index| format!("[a{index}]")).collect();+ let mix = if clips.len() == 1 {+ // amix with one input would still apply its normalisation curve.+ format!("{inputs}anull[mixed]")+ } else {+ format!("{inputs}amix=inputs={}:normalize=0[mixed]", clips.len())+ };+ chains.push(format!("{mix};[mixed]apad,atrim=duration={duration:.6}[out]"));++ command+ .args(["-filter_complex", &chains.join(";")])+ .args(["-map", "[out]"])+ .args(["-c:a", "aac", "-b:a", "192k"])+ .arg(destination);++ run_ffmpeg(command, "mixing audio")+}++fn mux(video: &Path, audio: &Path, output: &Path) -> Result<(), String> {+ let mut command = std::process::Command::new("ffmpeg");+ command+ .args(["-hide_banner", "-nostdin", "-loglevel", "error", "-y"])+ .arg("-i")+ .arg(video)+ .arg("-i")+ .arg(audio)+ // The picture is already encoded exactly as asked; re-encoding it here+ // would cost a second full pass and a generation of quality.+ .args(["-c:v", "copy", "-c:a", "copy", "-shortest"])+ .args(["-movflags", "+faststart"])+ .arg(output);++ run_ffmpeg(command, "muxing")+}++fn run_ffmpeg(mut command: std::process::Command, stage: &str) -> Result<(), String> {+ let output = command+ .output()+ .map_err(|error| format!("could not run ffmpeg while {stage}: {error}"))?;++ if output.status.success() {+ return Ok(());+ }++ let detail = String::from_utf8_lossy(&output.stderr);+ let tail = detail.lines().rev().take(3).collect::<Vec<_>>().join(" / ");+ Err(format!("ffmpeg failed while {stage}: {tail}"))+}++fn emit(app: &tauri::AppHandle, frame: i64, total: i64, stage: &'static str) {+ // A dropped progress event is not worth failing an export over.+ let _ = app.emit("export://progress", Progress { frame, total, stage });+}diff --git a/desktop/src-tauri/src/lib.rs b/desktop/src-tauri/src/lib.rsnew file mode 100644index 00000000..f3803b04--- /dev/null+++ b/desktop/src-tauri/src/lib.rs@@ -0,0 +1,307 @@+//! Tauri host for the Relay editor.+//!+//! Deliberately thin. Every command here does two things: call into the engine+//! crates, and convert the result to something `serde` can put on the wire.+//! No editing logic lives on this side of the bridge - if a command starts+//! making decisions about the edit, that logic belongs in `relay-core` or+//! `relay-render` where it can be unit-tested without a window.++mod export;+mod projects;++use serde::Serialize;++/// A video stream, as the UI sees it.+#[derive(Serialize)]+#[serde(rename_all = "camelCase")]+pub struct VideoStreamInfo {+ index: u32,+ codec: String,+ width: u32,+ height: u32,+ /// Decimal fps, for display only.+ frame_rate: f64,+ /// The exact fraction the engine actually works in, e.g. "30000/1001".+ frame_rate_fraction: String,+}++/// An audio stream, as the UI sees it.+#[derive(Serialize)]+#[serde(rename_all = "camelCase")]+pub struct AudioStreamInfo {+ index: u32,+ codec: String,+ sample_rate: u32,+ channels: u32,+}++/// What `probe_media` hands back.+#[derive(Serialize)]+#[serde(rename_all = "camelCase")]+pub struct MediaSummary {+ path: String,+ duration: Option<f64>,+ /// "video", "audio" or "image".+ kind: &'static str,+ video: Option<VideoStreamInfo>,+ audio: Option<AudioStreamInfo>,+}++/// Extensions Relay is willing to treat as stills.+const IMAGE_EXTENSIONS: &[&str] = &[+ "png", "jpg", "jpeg", "webp", "bmp", "tif", "tiff", "avif", "heic", "heif", "gif",+];++/// Decides whether a file is footage, sound or a still.+///+/// Extension first, because that is what the user means by "a png", and+/// ffprobe is genuinely ambiguous here: a PNG presents as a one-frame video+/// stream, usually with `r_frame_rate` of 25/1 invented by the demuxer.+///+/// The duration check is what separates a still from an animation. An animated+/// GIF or WebP reports a duration; a single image does not. It is a heuristic,+/// and a deliberately conservative one - misreading an animation as a still+/// shows its first frame rather than failing.+fn classify(info: &relay_media::MediaInfo) -> &'static str {+ if info.video.is_none() {+ return "audio";+ }++ let extension = info+ .path+ .extension()+ .and_then(|value| value.to_str())+ .unwrap_or_default()+ .to_ascii_lowercase();++ if IMAGE_EXTENSIONS.contains(&extension.as_str()) && info.duration.is_none() {+ "image"+ } else {+ "video"+ }+}++impl From<relay_media::MediaInfo> for MediaSummary {+ fn from(info: relay_media::MediaInfo) -> Self {+ Self {+ kind: classify(&info),+ path: info.path.to_string_lossy().into_owned(),+ // Exact rational time stops at this boundary: JSON has no+ // fractions, and the UI only ever displays these numbers.+ duration: info.duration.map(|duration| duration.as_f64()),+ video: info.video.map(|video| VideoStreamInfo {+ index: video.index,+ codec: video.codec,+ width: video.width,+ height: video.height,+ frame_rate: video.frame_rate.fps().as_f64(),+ frame_rate_fraction: format!(+ "{}/{}",+ video.frame_rate.fps().numerator(),+ video.frame_rate.fps().denominator()+ ),+ }),+ audio: info.audio.map(|audio| AudioStreamInfo {+ index: audio.index,+ codec: audio.codec,+ sample_rate: audio.sample_rate,+ channels: audio.channels,+ }),+ }+ }+}++/// Reports what is inside a media file.+#[tauri::command]+fn probe_media(path: String) -> Result<MediaSummary, String> {+ relay_media::probe(&path).map(MediaSummary::from).map_err(describe)+}++/// The version of the app the UI is talking to. Also a liveness check on the+/// IPC bridge at startup.+#[tauri::command]+fn engine_version() -> &'static str {+ env!("CARGO_PKG_VERSION")+}++/// Reads a whole file and returns it as raw bytes.+///+/// This exists only as the audio preview's fallback for when the asset+/// protocol is unavailable. `tauri::ipc::Response` puts the bytes on the wire+/// as an ArrayBuffer rather than a JSON array of numbers, which for a few+/// megabytes of audio is the difference between instant and unusable.+///+/// It loads the entire file into memory, so it is not a general-purpose+/// reader and must not become one.+#[tauri::command]+fn read_media_bytes(path: String) -> Result<tauri::ipc::Response, String> {+ std::fs::read(&path)+ .map(tauri::ipc::Response::new)+ .map_err(|error| format!("could not read {path}: {error}"))+}++/// Renders a strip of evenly spaced frames from a video as one JPEG.+///+/// One image rather than N, because the timeline draws the frames as slices of+/// a single texture - that is one decode and one cached bitmap instead of+/// twenty-four of each.+///+/// `fps=count/duration` is what spaces the frames evenly, and `tile` lays them+/// out side by side. If the container reports no duration there is nothing to+/// space frames across, so this refuses rather than guessing.+#[tauri::command]+async fn extract_filmstrip(path: String, count: u32, height: u32) -> Result<tauri::ipc::Response, String> {+ let bytes = tauri::async_runtime::spawn_blocking(move || filmstrip(&path, count, height))+ .await+ .map_err(|error| format!("filmstrip task failed: {error}"))??;++ Ok(tauri::ipc::Response::new(bytes))+}++fn filmstrip(path: &str, count: u32, height: u32) -> Result<Vec<u8>, String> {+ let count = count.clamp(1, 60);+ let height = height.clamp(16, 240);++ let info = relay_media::probe(path).map_err(describe)?;+ let duration = info+ .duration+ .map(|duration| duration.as_f64())+ .filter(|seconds| *seconds > 0.0)+ .ok_or_else(|| format!("{path} reports no duration"))?;++ let output = std::process::Command::new("ffmpeg")+ .args(["-hide_banner", "-nostdin", "-loglevel", "error"])+ .args(["-i", path])+ .args([+ "-vf",+ // scale=-2 keeps the aspect ratio and an even width, which the+ // JPEG encoder requires.+ &format!(+ "fps={:.6},scale=-2:{height},tile={count}x1",+ f64::from(count) / duration+ ),+ ])+ .args(["-frames:v", "1", "-q:v", "6", "-f", "mjpeg", "-"])+ .output()+ .map_err(|error| format!("could not run ffmpeg: {error}"))?;++ if !output.status.success() {+ return Err(format!("ffmpeg exited with {} for {path}", output.status));+ }+ if output.stdout.is_empty() {+ return Err(format!("ffmpeg produced no filmstrip for {path}"));+ }++ Ok(output.stdout)+}++/// Creates a project folder, writes its manifest and records it as recent.+#[tauri::command]+async fn create_project(+ app: tauri::AppHandle,+ location: String,+ name: String,+ width: u32,+ height: u32,+ rate_num: i64,+ rate_den: i64,+) -> Result<projects::ProjectInfo, String> {+ let config = config_dir(&app)?;+ tauri::async_runtime::spawn_blocking(move || {+ let project = projects::create(&location, &name, width, height, rate_num, rate_den)?;+ // A project that cannot be added to the recents list has still been+ // created, so this failure is reported but not fatal.+ if let Err(error) = projects::remember(&config, &project) {+ eprintln!("relay: {error}");+ }+ Ok(project)+ })+ .await+ .map_err(|error| format!("create_project task failed: {error}"))?+}++/// Reads an existing project and moves it to the front of the recents list.+#[tauri::command]+async fn open_project(app: tauri::AppHandle, path: String) -> Result<projects::ProjectInfo, String> {+ let config = config_dir(&app)?;+ tauri::async_runtime::spawn_blocking(move || {+ let project = projects::open(&path)?;+ if let Err(error) = projects::remember(&config, &project) {+ eprintln!("relay: {error}");+ }+ Ok(project)+ })+ .await+ .map_err(|error| format!("open_project task failed: {error}"))?+}++/// The recents list, most recent first, with vanished folders left out.+#[tauri::command]+fn recent_projects(app: tauri::AppHandle) -> Result<Vec<projects::ProjectInfo>, String> {+ Ok(projects::list(&config_dir(&app)?))+}++/// Removes a project from the recents list. The folder itself is left alone.+#[tauri::command]+fn forget_project(app: tauri::AppHandle, path: String) -> Result<(), String> {+ projects::forget(&config_dir(&app)?, &path)+}++fn config_dir(app: &tauri::AppHandle) -> Result<std::path::PathBuf, String> {+ use tauri::Manager;+ app.path()+ .app_config_dir()+ .map_err(|error| format!("could not locate the config directory: {error}"))+}++/// Renders the timeline to a file.+///+/// Runs on a blocking thread and reports progress through the+/// `export://progress` event, because a two-minute export must not freeze the+/// window and gives the UI nothing to show if it says nothing until it is done.+#[tauri::command]+async fn export_project(+ app: tauri::AppHandle,+ request: export::ExportRequest,+) -> Result<String, String> {+ tauri::async_runtime::spawn_blocking(move || export::run(&app, request))+ .await+ .map_err(|error| format!("export task failed: {error}"))?+}++/// Flattens an error and its causes into one line.+///+/// `Display` on a `thiserror` enum prints only the outermost message, and the+/// useful half - what FFmpeg or the OS actually said - is in the source chain.+fn describe(error: relay_media::Error) -> String {+ use std::error::Error;++ let mut message = error.to_string();+ let mut cause = error.source();+ while let Some(current) = cause {+ message.push_str(&format!(": {current}"));+ cause = current.source();+ }+ message+}++/// Builds and runs the editor window.+#[cfg_attr(mobile, tauri::mobile_entry_point)]+pub fn run() {+ tauri::Builder::default()+ .plugin(tauri_plugin_opener::init())+ .plugin(tauri_plugin_dialog::init())+ .invoke_handler(tauri::generate_handler![+ probe_media,+ engine_version,+ read_media_bytes,+ extract_filmstrip,+ create_project,+ open_project,+ recent_projects,+ forget_project,+ export_project+ ])+ .run(tauri::generate_context!())+ .expect("error while running tauri application");+}diff --git a/desktop/src-tauri/src/main.rs b/desktop/src-tauri/src/main.rsnew file mode 100644index 00000000..6de42c0e--- /dev/null+++ b/desktop/src-tauri/src/main.rs@@ -0,0 +1,6 @@+// Prevents an extra console window on Windows in release. Do not remove.+#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]++fn main() {+ relay_desktop_lib::run()+}diff --git a/desktop/src-tauri/src/projects.rs b/desktop/src-tauri/src/projects.rsnew file mode 100644index 00000000..b27a7941--- /dev/null+++ b/desktop/src-tauri/src/projects.rs@@ -0,0 +1,222 @@+//! Project folders on disk, and the list of recently opened ones.+//!+//! A project is a directory containing `relay.json`. That file is written the+//! moment the project is created, so a project is a real thing from the start+//! rather than a promise the app keeps only if you remember to save.+//!+//! The recents list lives in the app's config directory, not in any project.+//! It describes this machine's history, and copying a project folder to+//! another machine should not drag one person's recent files along with it.++use std::path::{Path, PathBuf};+use std::time::{SystemTime, UNIX_EPOCH};++use serde::{Deserialize, Serialize};++const MANIFEST: &str = "relay.json";+const RECENTS: &str = "recents.json";+/// Long enough to be useful, short enough that the list stays scannable.+const MAX_RECENTS: usize = 12;++/// Everything needed to reopen a project.+#[derive(Serialize, Deserialize, Clone, Debug)]+#[serde(rename_all = "camelCase")]+pub struct ProjectInfo {+ pub path: String,+ pub name: String,+ pub width: u32,+ pub height: u32,+ /// Frame rate as an exact fraction; the decimal is never stored.+ pub rate_num: i64,+ pub rate_den: i64,+ /// Milliseconds since the epoch.+ pub opened_at: u64,+}++#[derive(Serialize, Deserialize)]+#[serde(rename_all = "camelCase")]+struct Manifest {+ relay: String,+ name: String,+ video: Video,+}++#[derive(Serialize, Deserialize)]+#[serde(rename_all = "camelCase")]+struct Video {+ width: u32,+ height: u32,+ rate_num: i64,+ rate_den: i64,+}++fn now_millis() -> u64 {+ SystemTime::now()+ .duration_since(UNIX_EPOCH)+ .map(|elapsed| elapsed.as_millis() as u64)+ .unwrap_or(0)+}++/// Creates the project folder and writes its manifest.+///+/// Refuses to touch a folder that already holds a manifest. Overwriting+/// someone's edit because they reused a name is not a recoverable mistake.+pub fn create(+ location: &str,+ name: &str,+ width: u32,+ height: u32,+ rate_num: i64,+ rate_den: i64,+) -> Result<ProjectInfo, String> {+ let root = Path::new(location).join(folder_name(name));+ let manifest = root.join(MANIFEST);++ if manifest.exists() {+ return Err(format!("a Relay project already exists at {}", root.display()));+ }++ std::fs::create_dir_all(&root)+ .map_err(|error| format!("could not create {}: {error}", root.display()))?;++ // Only the settings for now. The timeline joins them once the engine owns+ // the edit and there is a canonical form to serialise.+ let document = Manifest {+ relay: env!("CARGO_PKG_VERSION").to_owned(),+ name: name.to_owned(),+ video: Video { width, height, rate_num, rate_den },+ };++ let encoded = serde_json::to_vec_pretty(&document)+ .map_err(|error| format!("could not encode the manifest: {error}"))?;+ std::fs::write(&manifest, encoded)+ .map_err(|error| format!("could not write {}: {error}", manifest.display()))?;++ Ok(ProjectInfo {+ path: root.to_string_lossy().into_owned(),+ name: name.to_owned(),+ width,+ height,+ rate_num,+ rate_den,+ opened_at: now_millis(),+ })+}++/// Reads an existing project's settings.+pub fn open(path: &str) -> Result<ProjectInfo, String> {+ let root = PathBuf::from(path);+ let manifest = root.join(MANIFEST);++ let bytes = std::fs::read(&manifest)+ .map_err(|error| format!("could not read {}: {error}", manifest.display()))?;+ let document: Manifest = serde_json::from_slice(&bytes)+ .map_err(|error| format!("{} is not a Relay project: {error}", manifest.display()))?;++ if document.video.rate_den == 0 {+ return Err(format!("{} has an invalid frame rate", manifest.display()));+ }++ Ok(ProjectInfo {+ path: root.to_string_lossy().into_owned(),+ name: document.name,+ width: document.video.width,+ height: document.video.height,+ rate_num: document.video.rate_num,+ rate_den: document.video.rate_den,+ opened_at: now_millis(),+ })+}++/// Moves a project to the front of the recents list.+pub fn remember(config: &Path, project: &ProjectInfo) -> Result<(), String> {+ let mut entries = read_recents(config);+ entries.retain(|entry| !same_path(&entry.path, &project.path));+ entries.insert(0, project.clone());+ entries.truncate(MAX_RECENTS);+ write_recents(config, &entries)+}++/// The recents list, most recent first, with vanished folders dropped.+///+/// Filtering on read rather than pruning on write means a project on a drive+/// that happens to be unplugged comes back when the drive does.+pub fn list(config: &Path) -> Vec<ProjectInfo> {+ read_recents(config)+ .into_iter()+ .filter(|entry| Path::new(&entry.path).join(MANIFEST).exists())+ .collect()+}++/// Removes one project from the list. The folder itself is left alone.+pub fn forget(config: &Path, path: &str) -> Result<(), String> {+ let mut entries = read_recents(config);+ entries.retain(|entry| !same_path(&entry.path, path));+ write_recents(config, &entries)+}++fn read_recents(config: &Path) -> Vec<ProjectInfo> {+ // A missing or corrupt list is not an error worth showing anyone; it just+ // means there is no history yet.+ std::fs::read(config.join(RECENTS))+ .ok()+ .and_then(|bytes| serde_json::from_slice(&bytes).ok())+ .unwrap_or_default()+}++fn write_recents(config: &Path, entries: &[ProjectInfo]) -> Result<(), String> {+ std::fs::create_dir_all(config)+ .map_err(|error| format!("could not create {}: {error}", config.display()))?;++ let encoded = serde_json::to_vec_pretty(entries)+ .map_err(|error| format!("could not encode the recents list: {error}"))?;+ std::fs::write(config.join(RECENTS), encoded)+ .map_err(|error| format!("could not write the recents list: {error}"))+}++/// Compares paths case-insensitively, because Windows does.+fn same_path(left: &str, right: &str) -> bool {+ left.eq_ignore_ascii_case(right)+}++/// Turns a project name into something a filesystem will accept.+fn folder_name(name: &str) -> String {+ let cleaned: String = name+ .trim()+ .chars()+ .map(|character| {+ if character.is_control() || r#"<>:"/\|?*"#.contains(character) {+ '-'+ } else {+ character+ }+ })+ .collect();++ // Windows refuses names ending in a dot or a space.+ let trimmed = cleaned.trim_matches(['.', ' ']);+ if trimmed.is_empty() {+ "Untitled project".to_owned()+ } else {+ trimmed.to_owned()+ }+}++#[cfg(test)]+mod tests {+ use super::*;++ #[test]+ fn sanitises_names_windows_would_reject() {+ assert_eq!(folder_name("My: Project?"), "My- Project-");+ assert_eq!(folder_name(" trailing. "), "trailing");+ assert_eq!(folder_name("..."), "Untitled project");+ assert_eq!(folder_name(""), "Untitled project");+ }++ #[test]+ fn paths_compare_case_insensitively() {+ assert!(same_path("D:\\Work\\Film", "d:\\work\\film"));+ assert!(!same_path("D:\\Work\\Film", "D:\\Work\\Other"));+ }+}diff --git a/desktop/src-tauri/tauri.conf.json b/desktop/src-tauri/tauri.conf.jsonnew file mode 100644index 00000000..a1f888ce--- /dev/null+++ b/desktop/src-tauri/tauri.conf.json@@ -0,0 +1,45 @@+{+ "$schema": "https://schema.tauri.app/config/2",+ "productName": "Relay",+ "version": "0.1.0",+ "identifier": "dev.relay.editor",+ "build": {+ "beforeDevCommand": "npm run dev",+ "devUrl": "http://localhost:1420",+ "beforeBuildCommand": "npm run build",+ "frontendDist": "../dist"+ },+ "app": {+ "windows": [+ {+ "title": "Relay",+ "width": 1440,+ "height": 900,+ "minWidth": 1024,+ "minHeight": 640,+ "resizable": true,+ "decorations": false,+ "backgroundColor": "#07080c",+ "dragDropEnabled": true+ }+ ],+ "security": {+ "csp": null,+ "assetProtocol": {+ "enable": true,+ "scope": ["**"]+ }+ }+ },+ "bundle": {+ "active": true,+ "targets": "all",+ "icon": [+ "icons/32x32.png",+ "icons/128x128.png",+ "icons/[email protected]",+ "icons/icon.icns",+ "icons/icon.ico"+ ]+ }+}diff --git a/desktop/src/App.tsx b/desktop/src/App.tsxnew file mode 100644index 00000000..6546a85b--- /dev/null+++ b/desktop/src/App.tsx@@ -0,0 +1,782 @@+import { useCallback, useEffect, useMemo, useRef, useState } from "react";+import { isTauri } from "@tauri-apps/api/core";+import { getCurrentWebview } from "@tauri-apps/api/webview";+import { getCurrentWindow } from "@tauri-apps/api/window";++import { ContextMenu, type ContextTarget } from "./components/ContextMenu";+import { ExportDialog } from "./components/ExportDialog";+import { Icon } from "./components/Icon";+import { MediaBin, type BinTab } from "./components/MediaBin";+import { Preview, type PreviewSource } from "./components/Preview";+import { Resizer } from "./components/Resizer";+import { RightPanel, type RightTab } from "./components/RightPanel";+import { StartScreen, type ProjectSession } from "./components/StartScreen";+import { TitleBar } from "./components/TitleBar";+import { TimelinePanel, resolveDrop, type Tool } from "./components/TimelinePanel";+import { createAssets, requestAssets } from "./lib/assets";+import { AudioPreview } from "./lib/audio";+import { engineVersion, probeMedia, type ExportClip } from "./lib/engine";+import {+ addClip,+ addMedia,+ addTrack,+ clipGainAt,+ clipsAt,+ clipsOnTrack,+ createProject,+ findClip,+ firstFreeTrack,+ findMedia,+ findTrack,+ moveClip,+ moveClips,+ projectDuration,+ removeClips,+ removeTrack,+ renameTrack,+ setTrackFlag,+ snapTime,+ splitClip,+ toMediaItem,+ updateClip,+ trimClip,+ type MediaItem,+ type Project,+} from "./lib/project";+import { useTheme, type Theme } from "./lib/theme";+import { useTransport } from "./lib/transport";++const MIN_SECONDS_PER_PIXEL = 0.0005;+const MAX_SECONDS_PER_PIXEL = 2;++/**+ * The window: either the launch screen or an open editor.+ *+ * The editor is a separate component rather than a branch inside one, so that+ * every hook it owns - transport, audio, asset cache - mounts when a project+ * opens and unmounts when it closes. Closing a project therefore cannot leave+ * a stale audio element or a half-finished waveform behind.+ */+export function App() {+ const [session, setSession] = useState<ProjectSession | null>(null);+ // Owned here rather than in the editor so the launch screen is themed too,+ // and so the choice survives closing a project.+ const { theme, toggle } = useTheme();++ if (!session) {+ return (+ <div className="flex h-full flex-col overflow-hidden">+ <TitleBar projectName="" menus={[]} theme={theme} onToggleTheme={toggle} />+ <div className="min-h-0 flex-1">+ <StartScreen onCreate={setSession} />+ </div>+ </div>+ );+ }++ return (+ <Editor+ session={session}+ theme={theme}+ onToggleTheme={toggle}+ onCloseProject={() => setSession(null)}+ />+ );+}++/**+ * The editor shell.+ *+ * Layout follows CapCut's shape: a thin custom title bar, a three-up top row+ * (bin, preview, details) and a full-width timeline beneath, every divider+ * draggable. Panels are docked and flush - in an editor, gutters are wasted+ * timeline.+ *+ * State here is window state (what is selected, where the playhead is, how+ * panels are sized) plus, for now, the edit itself. See lib/project.ts for why+ * the edit lives here temporarily and what makes moving it to the engine cheap.+ */+function Editor({+ session,+ theme,+ onToggleTheme,+ onCloseProject,+}: {+ session: ProjectSession;+ theme: Theme;+ onToggleTheme: () => void;+ onCloseProject: () => void;+}) {+ const [project, setProject] = useState<Project>(createProject);+ const [selectedClipIds, setSelectedClipIds] = useState<string[]>([]);+ const [selectedMediaId, setSelectedMediaId] = useState<string | null>(null);+ const [tool, setTool] = useState<Tool>("select");+ const [snap, setSnap] = useState(true);+ const [tab, setTab] = useState<BinTab>("media");+ const [version, setVersion] = useState("");+ const [busy, setBusy] = useState(false);+ const [error, setError] = useState<string | null>(null);+ const [dropping, setDropping] = useState(false);+ const [context, setContext] = useState<ContextTarget | null>(null);+ const [mediaDrag, setMediaDrag] = useState<{ item: MediaItem; x: number; y: number } | null>(+ null,+ );+ const [exporting, setExporting] = useState(false);+ const [rightTab, setRightTab] = useState<RightTab>("details");++ // Panel geometry.+ const [leftWidth, setLeftWidth] = useState(340);+ const [rightWidth, setRightWidth] = useState(300);+ const [timelineHeight, setTimelineHeight] = useState(340);++ // Timeline viewport.+ const [secondsPerPixel, setSecondsPerPixel] = useState(0.02);+ const [scrollLeft, setScrollLeft] = useState(0);+ // Vertical offset into the track stack, shared by the lanes and their headers.+ const [trackScroll, setTrackScroll] = useState(0);+ const zoomRef = useRef(secondsPerPixel);+ zoomRef.current = secondsPerPixel;++ const duration = projectDuration(project);+ const transport = useTransport({ duration });+ const { playhead, playing } = transport;++ // Read by event listeners that outlive the render that installed them.+ const latest = useRef({ project, secondsPerPixel, scrollLeft, trackScroll, snap, playhead });+ latest.current = { project, secondsPerPixel, scrollLeft, trackScroll, snap, playhead };++ // The project's rate is authoritative, not the first clip's. Timecode that+ // changes meaning when you import a 25fps file is worse than useless.+ const frameRate = session.frameRate;++ useEffect(() => {+ engineVersion()+ .then(setVersion)+ .catch(() => setVersion("unavailable"));+ }, []);++ // Waveforms and filmstrips. A ref, not state: the timeline reads this map+ // from inside its draw loop, so artwork arriving needs no re-render.+ const assets = useRef(createAssets());++ // ── media import ─────────────────────────────────────────────────────────+ const importPaths = useCallback(async (paths: string[]) => {+ setBusy(true);+ setError(null);+ for (const path of paths) {+ try {+ const item = toMediaItem(await probeMedia(path));+ setProject((current) => addMedia(current, item));+ setSelectedMediaId(item.id);+ // Fire and forget: the clip draws flat until the artwork lands.+ requestAssets(assets.current, item);+ } catch (cause) {+ // The engine's errors already name the file and quote FFmpeg.+ setError(String(cause));+ }+ }+ setBusy(false);+ }, []);++ // Files dropped from the OS. Tauri intercepts these before the webview sees+ // them, which is why this is an event subscription and not an HTML5 handler.+ useEffect(() => {+ if (!isTauri()) return;++ let stop: (() => void) | undefined;+ void getCurrentWebview()+ .onDragDropEvent((event) => {+ if (event.payload.type === "over") setDropping(true);+ else if (event.payload.type === "drop") {+ setDropping(false);+ void importPaths(event.payload.paths);+ } else setDropping(false);+ })+ .then((unlisten) => {+ stop = unlisten;+ });++ return () => stop?.();+ }, [importPaths]);++ // ── audio preview ────────────────────────────────────────────────────────+ const audio = useRef<AudioPreview | null>(null);+ if (audio.current === null) audio.current = new AudioPreview();++ useEffect(() => {+ const preview = audio.current;+ return () => preview?.dispose();+ }, []);++ useEffect(() => {+ const voices = clipsAt(project, playhead)+ .filter((clip) => clip.kind === "audio")+ .flatMap((clip) => {+ const media = findMedia(project, clip.mediaId);+ if (!media) return [];+ return [+ {+ clipId: clip.id,+ path: media.path,+ time: clip.sourceStart + (playhead - clip.start),+ // Media elements cannot play above unity, so a boost is audible+ // only in the export. The Adjust panel says so where it matters.+ volume: Math.min(1, clipGainAt(clip, playhead)),+ },+ ];+ });++ audio.current?.sync(voices, playing);+ }, [project, playhead, playing]);++ // The top-most video clip under the playhead is what the monitor shows.+ const previewSource = useMemo<PreviewSource | null>(() => {+ // Stills are picture too, so they compete for the monitor with footage.+ const active = clipsAt(project, playhead).filter((clip) => clip.kind !== "audio");+ if (active.length === 0) return null;++ const depth = (trackId: string) => project.tracks.findIndex((track) => track.id === trackId);+ const top = active.reduce((best, clip) =>+ depth(clip.trackId) > depth(best.trackId) ? clip : best,+ );++ const media = findMedia(project, top.mediaId);+ if (!media) return null;++ return {+ clipId: top.id,+ path: media.path,+ time: top.sourceStart + (playhead - top.start),+ muted: false,+ isStill: top.kind === "image",+ };+ }, [project, playhead]);++ // ── edit operations ──────────────────────────────────────────────────────+ const placeMedia = useCallback((mediaId: string, trackId: string, start: number) => {+ setProject((current) => {+ const { project: next, clipId } = addClip(current, { mediaId, trackId, start });+ if (clipId) setSelectedClipIds([clipId]);+ return next;+ });+ }, []);++ const addToTimeline = useCallback(+ (mediaId: string) => {+ const media = findMedia(project, mediaId);+ if (!media) return;+ // Stack onto the lowest lane that is free here, rather than piling+ // everything onto track 1 on top of itself.+ const track = firstFreeTrack(project, playhead, media.duration ?? 5);+ if (track) placeMedia(media.id, track.id, playhead);+ },+ [placeMedia, playhead, project],+ );++ /**+ * Drags a bin item onto the timeline.+ *+ * Window-level pointer listeners rather than pointer capture on the source+ * row: capture would deliver every move to the bin item, and the drop has to+ * be resolved against the timeline, which is a different element entirely.+ *+ * `latest` is read inside the listeners because they are installed once per+ * drag and would otherwise close over stale zoom and scroll values.+ */+ const beginMediaDrag = useCallback(+ (item: MediaItem, clientX: number, clientY: number) => {+ setMediaDrag({ item, x: clientX, y: clientY });++ const onMove = (event: PointerEvent) => {+ setMediaDrag((current) =>+ current ? { ...current, x: event.clientX, y: event.clientY } : null,+ );+ };++ const onUp = (event: PointerEvent) => {+ window.removeEventListener("pointermove", onMove);+ window.removeEventListener("pointerup", onUp);+ setMediaDrag(null);++ const state = latest.current;+ const drop = resolveDrop(event.clientX, event.clientY, {+ tracks: state.project.tracks,+ secondsPerPixel: state.secondsPerPixel,+ scrollLeft: state.scrollLeft,+ trackScroll: state.trackScroll,+ });+ // Null means outside the canvas or over the ruler; both mean "do+ // nothing". Any lane accepts any media.+ if (!drop) return;++ const start = state.snap+ ? snapTime(state.project, drop.start, {+ threshold: 8 * state.secondsPerPixel,+ playhead: state.playhead,+ })+ : drop.start;++ placeMedia(item.id, drop.trackId, Math.max(0, start));+ };++ window.addEventListener("pointermove", onMove);+ window.addEventListener("pointerup", onUp);+ },+ [placeMedia],+ );++ const splitAtPlayhead = useCallback(() => {+ setProject((current) => {+ // Split whatever is selected, or everything under the playhead if+ // nothing is - which is what the keyboard shortcut is usually for.+ const targets =+ selectedClipIds.length > 0+ ? selectedClipIds+ : clipsAt(current, playhead).map((clip) => clip.id);+ return targets.reduce((next, clipId) => splitClip(next, clipId, playhead), current);+ });+ }, [playhead, selectedClipIds]);++ const deleteSelected = useCallback(() => {+ if (selectedClipIds.length === 0) return;+ // Free the audio element first: once the clip is gone the sync pass has+ // nothing to match it against and it would keep sounding.+ for (const clipId of selectedClipIds) audio.current?.release(clipId);+ setProject((current) => removeClips(current, selectedClipIds));+ setSelectedClipIds([]);+ }, [selectedClipIds]);++ const zoom = useCallback((factor: number, anchor?: number) => {+ const previous = zoomRef.current;+ const next = Math.min(+ MAX_SECONDS_PER_PIXEL,+ Math.max(MIN_SECONDS_PER_PIXEL, previous * factor),+ );+ zoomRef.current = next;+ setSecondsPerPixel(next);++ // Keep the time under the pointer pinned to the same pixel.+ if (anchor !== undefined) {+ setScrollLeft((left) => Math.max(0, anchor - (anchor - left) * (next / previous)));+ }+ }, []);++ const fit = useCallback(+ (canvasWidth: number) => {+ if (canvasWidth <= 0) return;+ const span = Math.max(duration, 1) * 1.05;+ const next = Math.min(+ MAX_SECONDS_PER_PIXEL,+ Math.max(MIN_SECONDS_PER_PIXEL, span / canvasWidth),+ );+ zoomRef.current = next;+ setSecondsPerPixel(next);+ setScrollLeft(0);+ },+ [duration],+ );++ // ── keyboard ─────────────────────────────────────────────────────────────+ useEffect(() => {+ const onKey = (event: KeyboardEvent) => {+ // Never steal keys from a text field.+ if (event.target instanceof HTMLInputElement) return;++ const step = event.shiftKey ? 10 : 1;+ switch (event.code) {+ case "Space":+ event.preventDefault();+ transport.toggle();+ break;+ case "ArrowLeft":+ transport.step(-step, frameRate);+ break;+ case "ArrowRight":+ transport.step(step, frameRate);+ break;+ case "Home":+ transport.seek(0);+ break;+ case "End":+ transport.seek(duration);+ break;+ case "KeyV":+ setTool("select");+ break;+ case "KeyC":+ setTool("razor");+ break;+ case "KeyN":+ setSnap((current) => !current);+ break;+ case "KeyS":+ splitAtPlayhead();+ break;+ case "Delete":+ case "Backspace":+ deleteSelected();+ break;+ default:+ break;+ }+ };++ window.addEventListener("keydown", onKey);+ return () => window.removeEventListener("keydown", onKey);+ }, [deleteSelected, duration, frameRate, splitAtPlayhead, transport]);++ // The exporter works from a flat list: the engine rebuilds a real timeline+ // from it, so track *order* has to survive the trip even though track+ // identity does not.+ const exportClips = useMemo<ExportClip[]>(+ () =>+ project.clips.flatMap((clip) => {+ const media = findMedia(project, clip.mediaId);+ const track = findTrack(project, clip.trackId);+ const index = project.tracks.findIndex((candidate) => candidate.id === clip.trackId);+ if (!media || !track || index < 0) return [];+ return [+ {+ path: media.path,+ kind: clip.kind,+ start: clip.start,+ duration: clip.duration,+ sourceStart: clip.sourceStart,+ track: index,+ hidden: !track.visible,+ muted: track.muted,+ volume: clip.volume,+ fadeIn: clip.fadeIn,+ fadeOut: clip.fadeOut,+ },+ ];+ }),+ [project],+ );++ // The inspector shows one clip's properties; with several selected there is+ // no single set of values to show, so it falls back to the bin item.+ const selectedClip =+ selectedClipIds.length === 1 ? findClip(project, selectedClipIds[0]) : null;+ const inspectorMedia = selectedClip+ ? findMedia(project, selectedClip.mediaId)+ : selectedMediaId+ ? findMedia(project, selectedMediaId)+ : null;++ return (+ <div className="flex h-full flex-col overflow-hidden">+ <TitleBar+ projectName={session.name}+ status={version ? `engine ${version}` : undefined}+ theme={theme}+ onToggleTheme={onToggleTheme}+ actions={+ <button+ type="button"+ onClick={() => setExporting(true)}+ className="flex cursor-pointer items-center gap-1.5 rounded-md bg-accent px-2.5 py-1+ text-xs font-medium text-on-accent transition-colors hover:bg-accent-hover"+ >+ <Icon name="export" size={13} />+ Export+ </button>+ }+ menus={[+ {+ label: "File",+ groups: [+ [+ {+ label: "Add selected to timeline",+ icon: "plus",+ disabled: !selectedMediaId,+ onSelect: () => selectedMediaId && addToTimeline(selectedMediaId),+ },+ {+ label: "Export...",+ icon: "export",+ disabled: exportClips.length === 0,+ onSelect: () => setExporting(true),+ },+ ],+ [+ {+ label: "Close project",+ icon: "folder",+ onSelect: onCloseProject,+ },+ {+ label: "Close window",+ icon: "close",+ onSelect: () => void getCurrentWindow().close(),+ danger: true,+ },+ ],+ ],+ },+ {+ label: "Edit",+ groups: [+ [+ { label: "Split at playhead", icon: "razor", hint: "S", onSelect: splitAtPlayhead },+ {+ label:+ selectedClipIds.length > 1+ ? `Delete ${selectedClipIds.length} clips`+ : "Delete clip",+ icon: "trash",+ hint: "Del",+ disabled: selectedClipIds.length === 0,+ onSelect: deleteSelected,+ danger: true,+ },+ ],+ [+ {+ label: snap ? "Disable snapping" : "Enable snapping",+ icon: "magnet",+ hint: "N",+ onSelect: () => setSnap((current) => !current),+ },+ ],+ ],+ },+ {+ label: "View",+ groups: [+ [+ { label: "Zoom in", icon: "plus", onSelect: () => zoom(1 / 1.4) },+ { label: "Zoom out", icon: "minus", onSelect: () => zoom(1.4) },+ ],+ [+ {+ label: "Go to start",+ icon: "skipStart",+ hint: "Home",+ onSelect: () => transport.seek(0),+ },+ {+ label: "Go to end",+ icon: "skipEnd",+ hint: "End",+ onSelect: () => transport.seek(duration),+ },+ ],+ ],+ },+ ]}+ />++ <div className="flex min-h-0 flex-1 flex-col p-2">+ <div className="flex min-h-0 flex-1">+ <div style={{ width: leftWidth }} className="min-w-0 shrink-0">+ <MediaBin+ items={project.media}+ assets={assets.current}+ dropping={dropping}+ tab={tab}+ selectedId={selectedMediaId}+ busy={busy}+ error={error}+ onTab={setTab}+ onSelect={(id) => {+ setSelectedMediaId(id);+ setSelectedClipIds([]);+ }}+ onImport={(path) => void importPaths([path])}+ onRemove={(id) =>+ setProject((current) => ({+ ...current,+ media: current.media.filter((item) => item.id !== id),+ clips: current.clips.filter((clip) => clip.mediaId !== id),+ }))+ }+ onDismissError={() => setError(null)}+ onBeginDrag={beginMediaDrag}+ onAddToTimeline={addToTimeline}+ />+ </div>++ <Resizer+ direction="vertical"+ onResize={(delta) =>+ setLeftWidth((width) => Math.min(560, Math.max(220, width + delta)))+ }+ />++ <div className="min-w-0 flex-1">+ <Preview+ source={previewSource}+ playing={playing}+ playhead={playhead}+ duration={duration}+ frameRate={frameRate}+ onTogglePlay={transport.toggle}+ onStep={(frames) => transport.step(frames, frameRate)}+ onSeek={transport.seek}+ />+ </div>++ <Resizer+ direction="vertical"+ onResize={(delta) =>+ setRightWidth((width) => Math.min(520, Math.max(220, width - delta)))+ }+ />++ <div style={{ width: rightWidth }} className="min-w-0 shrink-0">+ <RightPanel+ tab={rightTab}+ onTab={setRightTab}+ clip={selectedClip}+ media={inspectorMedia}+ frameRate={frameRate}+ onChangeClip={(patch) => {+ if (selectedClipIds.length !== 1) return;+ setProject((current) => updateClip(current, selectedClipIds[0], patch));+ }}+ />+ </div>+ </div>++ <Resizer+ direction="horizontal"+ onResize={(delta) =>+ setTimelineHeight((height) => Math.min(700, Math.max(160, height - delta)))+ }+ />++ <div style={{ height: timelineHeight }} className="min-h-0 shrink-0">+ <TimelinePanel+ project={project}+ playhead={playhead}+ playing={playing}+ frameRate={frameRate}+ tool={tool}+ snap={snap}+ selectedClipIds={selectedClipIds}+ secondsPerPixel={secondsPerPixel}+ scrollLeft={scrollLeft}+ trackScroll={trackScroll}+ assets={assets.current}+ theme={theme}+ onToolChange={setTool}+ onSnapChange={setSnap}+ onScrub={transport.seek}+ onSelectClips={setSelectedClipIds}+ onMoveClips={(moves) => setProject((current) => moveClips(current, moves))}+ onTrimClip={(clipId, edge, delta) =>+ setProject((current) => trimClip(current, clipId, edge, delta))+ }+ onSplitAtPlayhead={splitAtPlayhead}+ onDeleteSelected={deleteSelected}+ mediaDrag={mediaDrag ? { x: mediaDrag.x, y: mediaDrag.y } : null}+ onZoom={zoom}+ onScroll={setScrollLeft}+ onTrackScroll={setTrackScroll}+ onFit={fit}+ onTrackFlag={(trackId, flag, value) =>+ setProject((current) => setTrackFlag(current, trackId, flag, value))+ }+ onAddTrack={() => setProject((current) => addTrack(current).project)}+ onRenameTrack={(trackId, name) =>+ setProject((current) => renameTrack(current, trackId, name))+ }+ onRemoveTrack={(trackId) =>+ setProject((current) => {+ // Free the audio for anything about to disappear, or it keeps+ // sounding with no clip left to match it against.+ for (const clip of clipsOnTrack(current, trackId)) {+ audio.current?.release(clip.id);+ }+ setSelectedClipIds((ids) =>+ ids.filter((id) => findClip(current, id)?.trackId !== trackId),+ );+ return removeTrack(current, trackId);+ })+ }+ onClipContextMenu={(clipId, x, y) => {+ // Right-clicking outside the selection replaces it; inside it,+ // the menu acts on everything selected.+ const target = selectedClipIds.includes(clipId) ? selectedClipIds : [clipId];+ setSelectedClipIds(target);++ const clip = findClip(project, clipId);+ const track = clip ? findTrack(project, clip.trackId) : null;+ const many = target.length > 1;++ setContext({+ x,+ y,+ items: [+ {+ label: many ? `Split ${target.length} clips at playhead` : "Split at playhead",+ icon: "razor",+ hint: "S",+ onSelect: splitAtPlayhead,+ },+ {+ label: "Move to playhead",+ icon: "select",+ onSelect: () =>+ setProject((current) =>+ moveClip(current, clipId, {+ start: playhead,+ trackId: track?.id ?? "",+ }),+ ),+ },+ {+ label: many ? `Delete ${target.length} clips` : "Delete",+ icon: "trash",+ hint: "Del",+ danger: true,+ onSelect: () => {+ for (const id of target) audio.current?.release(id);+ setProject((current) => removeClips(current, target));+ setSelectedClipIds([]);+ },+ },+ ],+ });+ }}+ />+ </div>+ </div>++ {context && <ContextMenu target={context} onClose={() => setContext(null)} />}++ {exporting && (+ <ExportDialog+ projectName={session.name}+ projectPath={session.path}+ width={session.width}+ height={session.height}+ rateNum={session.rateNum}+ rateDen={session.rateDen}+ duration={duration}+ clips={exportClips}+ onClose={() => setExporting(false)}+ />+ )}++ {/* The dragged item follows the pointer. Offset down-right so it never+ sits under the cursor and hides the lane being targeted. */}+ {mediaDrag && (+ <div+ style={{ left: mediaDrag.x + 14, top: mediaDrag.y + 14 }}+ className="surface pointer-events-none fixed z-50 flex items-center gap-2 rounded-lg px-2.5 py-1.5"+ >+ <Icon+ name={mediaDrag.item.kind === "video" ? "film" : "music"}+ size={13}+ className={mediaDrag.item.kind === "video" ? "text-accent" : "text-clip-audio"}+ />+ <span className="max-w-48 truncate text-xs text-primary">{mediaDrag.item.name}</span>+ </div>+ )}++ </div>+ );+}diff --git a/desktop/src/assets/fonts/CabinetGrotesk-Variable.woff2 b/desktop/src/assets/fonts/CabinetGrotesk-Variable.woff2new file mode 100644index 00000000..f2864d94Binary files /dev/null and b/desktop/src/assets/fonts/CabinetGrotesk-Variable.woff2 differdiff --git a/desktop/src/assets/fonts/LICENSE-CabinetGrotesk.txt b/desktop/src/assets/fonts/LICENSE-CabinetGrotesk.txtnew file mode 100644index 00000000..8ae62003--- /dev/null+++ b/desktop/src/assets/fonts/LICENSE-CabinetGrotesk.txt@@ -0,0 +1,132 @@+Fontshare++------------------------------------------------------------------+ITF Free Font License (FFL)+Version 2.0 - 17 Aug 2026+------------------------------------------------------------------++Notice to User++Indian Type Foundry designs, produces and distributes font software as digital fonts to end users worldwide. In addition to commercial fonts that are available for a fee, ITF also offers several fonts that can be used free of charge. These free fonts are distributed through a dedicated platform called www.fontshare.com (“Fontshare”) to end users worldwide. Fonts identified on Fontshare as being licensed under the ITF Free Font License are subject to this legally binding EULA between Indian Type Foundry (“Indian Type Foundry”, “ITF” or “Licensor”) and you (“Licensee”).++You acknowledge that the Font Software and the designs embodied therein are protected by copyright, other intellectual property and industrial property rights, and international treaties. They are and shall remain at all times the intellectual property of Indian Type Foundry.++In addition to direct download, Fontshare may also make the Font Software available through the Fontshare API. In this case, the Font Software is delivered directly from servers used by Indian Type Foundry to the Licensee's website, without the Licensee having to download or host the Font Software.++By downloading, accessing, self-hosting, installing, storing, embedding, copying or otherwise using the Font Software, you agree to the following terms.+++Definitions++“Font Software” refers to the computer files or programs released under this License that enable the display, reproduction and rendering of the typeface designs, including letters, numerals, punctuation, symbols, ornaments and other typographic characters. Font Software includes all font formats and bitmap or vector representations distributed by Indian Type Foundry under this License.++“Official Version” refers to the Font Software as officially distributed by Indian Type Foundry through Fontshare.++“Derivative Work” refers to any modified, adapted, altered or otherwise derived version of the Font Software or the typeface designs embodied therein, including modifications to font files (such as OTF, TTF, WOFF, WOFF2 or variable fonts), glyphs, characters, spacing, kerning, metrics, naming, subsetting, format conversion or other font data.++Derivative Work does not include any logo, document, graphic, image, website, application or other creative work created through the normal use of the Font Software, ownership of which remains with its respective creator or rights holder.+++01 Grant of License++You are hereby granted a non-exclusive, non-assignable, non-transferable and terminable license to access, download, install, store and use the Font Software for personal or commercial purposes, free of charge and for an unlimited period of time, subject to the terms of this License.++You may use the Font Software in any media, including Print, Websites, Mobile or Desktop Applications, Digital Images, Digital Advertising, Social Media, ePublishing, Video, Broadcasting and Games, at any scale and in any location worldwide.++You may self-host the Font Software on your own servers or infrastructure for use on your own websites and applications, including through standard webfont technologies such as CSS @font-face. Self-hosting by end users is permitted and recommended for greater control, reliability and performance. Use of the Fontshare API is optional and is not required for web use.++You may embed the Font Software in mobile or desktop applications and digital documents for the uses permitted under this License.++You may use the Font Software to create logos, wordmarks, graphic elements, images, vector files, scalable drawings and other creative works. Logos and wordmarks created using the Font Software may be registered as trademarks. Any rights in the resulting creative works, including any trademark rights, remain with their respective creator or rights holder. Such rights do not grant any ownership or exclusive rights in the Font Software or the underlying typeface designs.++You may use the Font Software on any number of devices, including computers, tablets and phones. The number of output devices, including printers, is not restricted. Where the Licensee is an organization, the Font Software may be installed, stored, copied and shared internally among its employees for the Licensee's own permitted uses under this License. Such internal sharing does not constitute redistribution under this License.++You may make a reasonable number of backup copies of the Font Software as necessary for your permitted use.++You may, but are not required to, identify or credit Indian Type Foundry or Fontshare in works created using the Font Software.+++02 Limitations of Usage++You may not modify, edit, adapt, translate, reverse engineer, decompile, disassemble or otherwise alter the Font Software or the typeface designs embodied therein, in whole or in part, without the prior written consent of the Licensor. This includes modifying or replacing glyphs, subsetting, format conversion, or altering font names, copyright information, ownership information or other metadata.++The Font Software may not, beyond the permitted copies and uses defined herein, be distributed, duplicated, loaned, resold, sublicensed, transferred, donated, given away or otherwise made available to any other person or entity, whether for free or for a fee. This includes distributing the Font Software through another font website, font library, marketplace, repository, download service, application or platform, or by email, removable media, publicly accessible servers, file-sharing services, peer-to-peer networks or any other means.++You may not provide the Font Software directly to external designers, agencies, contractors, printers or other service providers. Any third party wishing to use the Font Software must obtain their own copy directly from Fontshare and be independently bound by this License.++You may not host, serve, embed or otherwise make the Font Software available for use by third parties through any website, application, online service, SaaS platform, design tool, template editor or similar service. This includes making the Font Software available as a selectable font for third-party users to create, edit, customize or generate their own content, even where such users cannot download or extract the Font Software itself.++For the avoidance of doubt, nothing in this Section 02 restricts the self-hosting, embedding or other use of the Font Software by the Licensee for the Licensee's own websites, applications or other permitted uses under Section 01.+++03 Embedding++You may embed the Font Software in PDFs and other digital documents for your permitted uses under this License, provided that the embeddedFont Software cannot be extracted or used independently from the document.++Documents containing embedded Font Software may be distributed without restriction as to the number of recipients.++The extraction of the Font Software, in whole or in part, for independent use is prohibited.+++04 Third-party use, Commercial print service providers++You may provide documents, artwork or other files created using the Font Software to commercial printers and other service providers for printing, production or display purposes.++If a service provider requires access to the Font Software itself, they must obtain their own copy directly from Fontshare and be independently bound by this License.+++05 Derivative Work++You may not create a Derivative Work from the Font Software without the prior written consent of the Licensor.++Where the Licensor expressly permits the creation of a Derivative Work, such permission is limited to the specific use authorized by the Licensor and does not grant any ownership or other rights in the Official Version of the Font Software or the underlying typefacedesigns.++A Derivative Work may not be sublicensed, sold, leased, rented, loaned, distributed, transferred or otherwise made available to any third party without the prior written consent of the Licensor.+++06 Warranty and Liability++THE FONT SOFTWARE IS PROVIDED FREE OF CHARGE AND ON AN “AS IS” AND “AS AVAILABLE” BASIS. TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, INDIAN TYPE FOUNDRY MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, COMPATIBILITY, AVAILABILITY OR OTHERWISE.++TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, INDIAN TYPE FOUNDRY SHALL NOT BE LIABLE TO THE LICENSEEOR ANY THIRD PARTY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL OR CONSEQUENTIAL DAMAGES, INCLUDING LOSS OF PROFITS, REVENUE, DATA, BUSINESS OR SAVINGS, OR BUSINESS INTERRUPTION, ARISING OUT OF THE USE OF OR INABILITY TO USE THE FONT SOFTWARE.++IF THE LICENSEE CHOOSES TO ACCESS OR SERVE THE FONT SOFTWARE THROUGH THE FONTSHARE API, THE LICENSEE DOES SO AT ITS OWN RISK. THE FONTSHARE API IS PROVIDED AS A CONVENIENCE AND DOES NOT FORM PART OF THE RIGHTS GRANTED TO THE LICENSEE TO USE THE FONT SOFTWARE UNDER THIS LICENSE.++INDIAN TYPE FOUNDRY DOES NOT GUARANTEE THE AVAILABILITY, PERFORMANCE OR CONTINUED OPERATION OF THE FONTSHARE API. INDIAN TYPE FOUNDRY MAY, AT ITS SOLE DISCRETION AND WITHOUT PRIOR NOTICE, MODIFY, RESTRICT, SUSPEND OR DISCONTINUE ACCESS TO THE FONTSHARE API, WHETHER GENERALLY OR FOR ANY PARTICULAR USER, WEBSITE OR APPLICATION. INDIAN TYPE FOUNDRY SHALL NOT BE RESPONSIBLE OR LIABLE FOR ANY INTERRUPTION, MALFUNCTION, DOWNTIME, CHANGE, RESTRICTION OR DISCONTINUATION OF THE API, OR FOR ANY RESULTING IMPACT ON THE LICENSEE'S WEBSITE, APPLICATION OR OTHER SERVICES.+++07 Updates, Maintenance and Support Services++Indian Type Foundry is under no obligation to provide updates, upgrades, maintenance, technical support or other support services for the Font Software under this License.++Indian Type Foundry may, at its sole discretion, update, modify, replace or discontinue any Font Software made available through Fontshare.+++08 Termination++Any breach of the terms of this License shall be grounds for termination. Where the breach is capable of being remedied, the Licensor may notify the Licensee in writing and require the breach to be remedied within 30 days of receipt of such notice.++Notwithstanding the foregoing, the Licensor may terminatethis License immediately in the event of any deliberate or material unauthorized modification, redistribution, sale, sublicensing, transfer or other misuse of the Font Software or the intellectual property rights of Indian Type Foundry.++Upon termination, and without limitation of any other remedies available under law or equity, the Licensee must immediately cease all use of the Font Software and delete the Font Software and all copies thereof inits possession or control. Proof of deletion must be provided upon request of the Licensor.++Indian Type Foundry reserves the right to seek damages and any other remedies available under applicable law for any breach of this License.+++09 Final Provisions++If any provision of this License is found to be invalid, illegal or unenforceable, the remaining provisions shall remain in full force and effect. Any invalid, illegal or unenforceable provision shall, to the extent legally permissible, be interpreted or replaced in a manner that most closely reflects its original purpose.++The failure of Indian Type Foundry to enforce any provision of this License shall not constitute a waiver of that provision or of its right to enforce it subsequently.++The uses expressly permitted under this License require no additional license or fee. If a Licensee requires additional rights or permissions, exceptions to any restrictions under this License, modifications or customizations to the Font Software or typeface designs, additional styles, weights, widths, characters or language extensions, technical support ormaintenance services, warranties or indemnities, or other customized licensing terms, they may contact Indian Type Foundry to discuss a separate custom license or arrangement.++This License shall be governed by the laws ofthe Republic of India. To the extent legally permissible, the courts located in Ahmedabad, Gujarat, India shall have exclusive jurisdiction over any dispute arising out of or in connection with this License.++------------------------------------------------------------------+ITF Free Font License (FFL)+Version 2.0 - 17 Aug 2026++Copyright © 2026 Indian Type Foundry. All rights reserved.+https://www.fontshare.com+------------------------------------------------------------------\ No newline at end of filediff --git a/desktop/src/assets/fonts/LICENSE-Synonym.txt b/desktop/src/assets/fonts/LICENSE-Synonym.txtnew file mode 100644index 00000000..8ae62003--- /dev/null+++ b/desktop/src/assets/fonts/LICENSE-Synonym.txt@@ -0,0 +1,132 @@+Fontshare++------------------------------------------------------------------+ITF Free Font License (FFL)+Version 2.0 - 17 Aug 2026+------------------------------------------------------------------++Notice to User++Indian Type Foundry designs, produces and distributes font software as digital fonts to end users worldwide. In addition to commercial fonts that are available for a fee, ITF also offers several fonts that can be used free of charge. These free fonts are distributed through a dedicated platform called www.fontshare.com (“Fontshare”) to end users worldwide. Fonts identified on Fontshare as being licensed under the ITF Free Font License are subject to this legally binding EULA between Indian Type Foundry (“Indian Type Foundry”, “ITF” or “Licensor”) and you (“Licensee”).++You acknowledge that the Font Software and the designs embodied therein are protected by copyright, other intellectual property and industrial property rights, and international treaties. They are and shall remain at all times the intellectual property of Indian Type Foundry.++In addition to direct download, Fontshare may also make the Font Software available through the Fontshare API. In this case, the Font Software is delivered directly from servers used by Indian Type Foundry to the Licensee's website, without the Licensee having to download or host the Font Software.++By downloading, accessing, self-hosting, installing, storing, embedding, copying or otherwise using the Font Software, you agree to the following terms.+++Definitions++“Font Software” refers to the computer files or programs released under this License that enable the display, reproduction and rendering of the typeface designs, including letters, numerals, punctuation, symbols, ornaments and other typographic characters. Font Software includes all font formats and bitmap or vector representations distributed by Indian Type Foundry under this License.++“Official Version” refers to the Font Software as officially distributed by Indian Type Foundry through Fontshare.++“Derivative Work” refers to any modified, adapted, altered or otherwise derived version of the Font Software or the typeface designs embodied therein, including modifications to font files (such as OTF, TTF, WOFF, WOFF2 or variable fonts), glyphs, characters, spacing, kerning, metrics, naming, subsetting, format conversion or other font data.++Derivative Work does not include any logo, document, graphic, image, website, application or other creative work created through the normal use of the Font Software, ownership of which remains with its respective creator or rights holder.+++01 Grant of License++You are hereby granted a non-exclusive, non-assignable, non-transferable and terminable license to access, download, install, store and use the Font Software for personal or commercial purposes, free of charge and for an unlimited period of time, subject to the terms of this License.++You may use the Font Software in any media, including Print, Websites, Mobile or Desktop Applications, Digital Images, Digital Advertising, Social Media, ePublishing, Video, Broadcasting and Games, at any scale and in any location worldwide.++You may self-host the Font Software on your own servers or infrastructure for use on your own websites and applications, including through standard webfont technologies such as CSS @font-face. Self-hosting by end users is permitted and recommended for greater control, reliability and performance. Use of the Fontshare API is optional and is not required for web use.++You may embed the Font Software in mobile or desktop applications and digital documents for the uses permitted under this License.++You may use the Font Software to create logos, wordmarks, graphic elements, images, vector files, scalable drawings and other creative works. Logos and wordmarks created using the Font Software may be registered as trademarks. Any rights in the resulting creative works, including any trademark rights, remain with their respective creator or rights holder. Such rights do not grant any ownership or exclusive rights in the Font Software or the underlying typeface designs.++You may use the Font Software on any number of devices, including computers, tablets and phones. The number of output devices, including printers, is not restricted. Where the Licensee is an organization, the Font Software may be installed, stored, copied and shared internally among its employees for the Licensee's own permitted uses under this License. Such internal sharing does not constitute redistribution under this License.++You may make a reasonable number of backup copies of the Font Software as necessary for your permitted use.++You may, but are not required to, identify or credit Indian Type Foundry or Fontshare in works created using the Font Software.+++02 Limitations of Usage++You may not modify, edit, adapt, translate, reverse engineer, decompile, disassemble or otherwise alter the Font Software or the typeface designs embodied therein, in whole or in part, without the prior written consent of the Licensor. This includes modifying or replacing glyphs, subsetting, format conversion, or altering font names, copyright information, ownership information or other metadata.++The Font Software may not, beyond the permitted copies and uses defined herein, be distributed, duplicated, loaned, resold, sublicensed, transferred, donated, given away or otherwise made available to any other person or entity, whether for free or for a fee. This includes distributing the Font Software through another font website, font library, marketplace, repository, download service, application or platform, or by email, removable media, publicly accessible servers, file-sharing services, peer-to-peer networks or any other means.++You may not provide the Font Software directly to external designers, agencies, contractors, printers or other service providers. Any third party wishing to use the Font Software must obtain their own copy directly from Fontshare and be independently bound by this License.++You may not host, serve, embed or otherwise make the Font Software available for use by third parties through any website, application, online service, SaaS platform, design tool, template editor or similar service. This includes making the Font Software available as a selectable font for third-party users to create, edit, customize or generate their own content, even where such users cannot download or extract the Font Software itself.++For the avoidance of doubt, nothing in this Section 02 restricts the self-hosting, embedding or other use of the Font Software by the Licensee for the Licensee's own websites, applications or other permitted uses under Section 01.+++03 Embedding++You may embed the Font Software in PDFs and other digital documents for your permitted uses under this License, provided that the embeddedFont Software cannot be extracted or used independently from the document.++Documents containing embedded Font Software may be distributed without restriction as to the number of recipients.++The extraction of the Font Software, in whole or in part, for independent use is prohibited.+++04 Third-party use, Commercial print service providers++You may provide documents, artwork or other files created using the Font Software to commercial printers and other service providers for printing, production or display purposes.++If a service provider requires access to the Font Software itself, they must obtain their own copy directly from Fontshare and be independently bound by this License.+++05 Derivative Work++You may not create a Derivative Work from the Font Software without the prior written consent of the Licensor.++Where the Licensor expressly permits the creation of a Derivative Work, such permission is limited to the specific use authorized by the Licensor and does not grant any ownership or other rights in the Official Version of the Font Software or the underlying typefacedesigns.++A Derivative Work may not be sublicensed, sold, leased, rented, loaned, distributed, transferred or otherwise made available to any third party without the prior written consent of the Licensor.+++06 Warranty and Liability++THE FONT SOFTWARE IS PROVIDED FREE OF CHARGE AND ON AN “AS IS” AND “AS AVAILABLE” BASIS. TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, INDIAN TYPE FOUNDRY MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, COMPATIBILITY, AVAILABILITY OR OTHERWISE.++TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, INDIAN TYPE FOUNDRY SHALL NOT BE LIABLE TO THE LICENSEEOR ANY THIRD PARTY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL OR CONSEQUENTIAL DAMAGES, INCLUDING LOSS OF PROFITS, REVENUE, DATA, BUSINESS OR SAVINGS, OR BUSINESS INTERRUPTION, ARISING OUT OF THE USE OF OR INABILITY TO USE THE FONT SOFTWARE.++IF THE LICENSEE CHOOSES TO ACCESS OR SERVE THE FONT SOFTWARE THROUGH THE FONTSHARE API, THE LICENSEE DOES SO AT ITS OWN RISK. THE FONTSHARE API IS PROVIDED AS A CONVENIENCE AND DOES NOT FORM PART OF THE RIGHTS GRANTED TO THE LICENSEE TO USE THE FONT SOFTWARE UNDER THIS LICENSE.++INDIAN TYPE FOUNDRY DOES NOT GUARANTEE THE AVAILABILITY, PERFORMANCE OR CONTINUED OPERATION OF THE FONTSHARE API. INDIAN TYPE FOUNDRY MAY, AT ITS SOLE DISCRETION AND WITHOUT PRIOR NOTICE, MODIFY, RESTRICT, SUSPEND OR DISCONTINUE ACCESS TO THE FONTSHARE API, WHETHER GENERALLY OR FOR ANY PARTICULAR USER, WEBSITE OR APPLICATION. INDIAN TYPE FOUNDRY SHALL NOT BE RESPONSIBLE OR LIABLE FOR ANY INTERRUPTION, MALFUNCTION, DOWNTIME, CHANGE, RESTRICTION OR DISCONTINUATION OF THE API, OR FOR ANY RESULTING IMPACT ON THE LICENSEE'S WEBSITE, APPLICATION OR OTHER SERVICES.+++07 Updates, Maintenance and Support Services++Indian Type Foundry is under no obligation to provide updates, upgrades, maintenance, technical support or other support services for the Font Software under this License.++Indian Type Foundry may, at its sole discretion, update, modify, replace or discontinue any Font Software made available through Fontshare.+++08 Termination++Any breach of the terms of this License shall be grounds for termination. Where the breach is capable of being remedied, the Licensor may notify the Licensee in writing and require the breach to be remedied within 30 days of receipt of such notice.++Notwithstanding the foregoing, the Licensor may terminatethis License immediately in the event of any deliberate or material unauthorized modification, redistribution, sale, sublicensing, transfer or other misuse of the Font Software or the intellectual property rights of Indian Type Foundry.++Upon termination, and without limitation of any other remedies available under law or equity, the Licensee must immediately cease all use of the Font Software and delete the Font Software and all copies thereof inits possession or control. Proof of deletion must be provided upon request of the Licensor.++Indian Type Foundry reserves the right to seek damages and any other remedies available under applicable law for any breach of this License.+++09 Final Provisions++If any provision of this License is found to be invalid, illegal or unenforceable, the remaining provisions shall remain in full force and effect. Any invalid, illegal or unenforceable provision shall, to the extent legally permissible, be interpreted or replaced in a manner that most closely reflects its original purpose.++The failure of Indian Type Foundry to enforce any provision of this License shall not constitute a waiver of that provision or of its right to enforce it subsequently.++The uses expressly permitted under this License require no additional license or fee. If a Licensee requires additional rights or permissions, exceptions to any restrictions under this License, modifications or customizations to the Font Software or typeface designs, additional styles, weights, widths, characters or language extensions, technical support ormaintenance services, warranties or indemnities, or other customized licensing terms, they may contact Indian Type Foundry to discuss a separate custom license or arrangement.++This License shall be governed by the laws ofthe Republic of India. To the extent legally permissible, the courts located in Ahmedabad, Gujarat, India shall have exclusive jurisdiction over any dispute arising out of or in connection with this License.++------------------------------------------------------------------+ITF Free Font License (FFL)+Version 2.0 - 17 Aug 2026++Copyright © 2026 Indian Type Foundry. All rights reserved.+https://www.fontshare.com+------------------------------------------------------------------\ No newline at end of filediff --git a/desktop/src/assets/fonts/Synonym-Variable.woff2 b/desktop/src/assets/fonts/Synonym-Variable.woff2new file mode 100644index 00000000..d1050534Binary files /dev/null and b/desktop/src/assets/fonts/Synonym-Variable.woff2 differdiff --git a/desktop/src/components/AdjustPanel.tsx b/desktop/src/components/AdjustPanel.tsxnew file mode 100644index 00000000..dd4b7506--- /dev/null+++ b/desktop/src/components/AdjustPanel.tsx@@ -0,0 +1,98 @@+import type { Clip } from "../lib/project";+import { Group, Slider } from "./controls";+import { Icon } from "./Icon";+import { Empty } from "./Panel";++/** Above unity the preview cannot follow; see the note in the panel. */+const MAX_GAIN = 2;+/** A fade longer than the clip is meaningless, and this keeps it obvious. */+const MAX_FADE = 5;++/** Linear gain as decibels, which is the unit anyone mixing audio thinks in. */+function decibels(gain: number): string {+ if (gain <= 0.0001) return "-inf dB";+ const value = 20 * Math.log10(gain);+ return `${value > 0 ? "+" : ""}${value.toFixed(1)} dB`;+}++/**+ * The Adjust tab: properties of the selected clip that change how it plays.+ *+ * Everything here is applied in two places - the preview, so you can hear it+ * now, and the exporter, so the file matches. Both read the same numbers off+ * the clip, which is the only way those two can be guaranteed to agree.+ */+export function AdjustPanel({+ clip,+ onChange,+}: {+ clip: Clip | null;+ onChange: (patch: Partial<Clip>) => void;+}) {+ if (!clip) {+ return (+ <Empty icon={<Icon name="settings" size={26} strokeWidth={1.5} />}>+ Select a single clip to adjust it.+ </Empty>+ );+ }++ const hasSound = clip.kind !== "image";+ // A fade cannot be longer than half the clip without the two overlapping.+ const fadeLimit = Math.min(MAX_FADE, clip.duration / 2);++ return (+ <div className="px-3 py-3">+ {hasSound ? (+ <>+ <Group title="Volume">+ <Slider+ label="Level"+ value={clip.volume}+ min={0}+ max={MAX_GAIN}+ step={0.01}+ format={decibels}+ onReset={() => onChange({ volume: 1 })}+ onChange={(volume) => onChange({ volume })}+ />+ {clip.volume > 1 && (+ <p className="-mt-1 mb-1 text-[11px] leading-snug text-tertiary">+ Boost above 0 dB applies on export. The preview cannot play louder than+ unity, so it will sound quieter than the exported file.+ </p>+ )}+ </Group>++ <Group title="Fades">+ <Slider+ label="Fade in"+ value={Math.min(clip.fadeIn, fadeLimit)}+ min={0}+ max={fadeLimit}+ step={0.05}+ format={(value) => (value === 0 ? "none" : `${value.toFixed(2)}s`)}+ onReset={() => onChange({ fadeIn: 0 })}+ onChange={(fadeIn) => onChange({ fadeIn })}+ />+ <Slider+ label="Fade out"+ value={Math.min(clip.fadeOut, fadeLimit)}+ min={0}+ max={fadeLimit}+ step={0.05}+ format={(value) => (value === 0 ? "none" : `${value.toFixed(2)}s`)}+ onReset={() => onChange({ fadeOut: 0 })}+ onChange={(fadeOut) => onChange({ fadeOut })}+ />+ </Group>+ </>+ ) : (+ <Empty icon={<Icon name="image" size={26} strokeWidth={1.5} />}>+ A still has nothing to adjust yet. Opacity and transform land with the+ compositor.+ </Empty>+ )}+ </div>+ );+}diff --git a/desktop/src/components/ContextMenu.tsx b/desktop/src/components/ContextMenu.tsxnew file mode 100644index 00000000..ed101520--- /dev/null+++ b/desktop/src/components/ContextMenu.tsx@@ -0,0 +1,99 @@+import { useEffect, useLayoutEffect, useRef, useState } from "react";+import { createPortal } from "react-dom";++import { Icon, type IconName } from "./Icon";++export interface ContextItem {+ label: string;+ onSelect: () => void;+ icon?: IconName;+ hint?: string;+ danger?: boolean;+}++export interface ContextTarget {+ x: number;+ y: number;+ items: ContextItem[];+}++/**+ * A right-click menu, rendered through a portal so it is never clipped by a+ * panel's `overflow: hidden`.+ *+ * Opened near the bottom or right edge it would spill off-screen, so its+ * position is corrected once - after layout, before paint - from its real+ * measured size.+ */+export function ContextMenu({ target, onClose }: { target: ContextTarget; onClose: () => void }) {+ const root = useRef<HTMLDivElement>(null);+ const [position, setPosition] = useState({ x: target.x, y: target.y });++ useLayoutEffect(() => {+ const element = root.current;+ if (!element) return;+ const { width, height } = element.getBoundingClientRect();+ setPosition({+ x: Math.max(8, Math.min(target.x, window.innerWidth - width - 8)),+ y: Math.max(8, Math.min(target.y, window.innerHeight - height - 8)),+ });+ }, [target.x, target.y]);++ useEffect(() => {+ // A portal renders outside the React tree, so propagation cannot tell us+ // about an outside click. Check containment against the real node.+ const onPointerDown = (event: PointerEvent) => {+ if (!root.current?.contains(event.target as Node)) onClose();+ };+ const onKeyDown = (event: KeyboardEvent) => {+ if (event.key === "Escape") onClose();+ };++ document.addEventListener("pointerdown", onPointerDown);+ document.addEventListener("keydown", onKeyDown);+ window.addEventListener("blur", onClose);+ window.addEventListener("resize", onClose);+ return () => {+ document.removeEventListener("pointerdown", onPointerDown);+ document.removeEventListener("keydown", onKeyDown);+ window.removeEventListener("blur", onClose);+ window.removeEventListener("resize", onClose);+ };+ }, [onClose]);++ return createPortal(+ <div+ ref={root}+ role="menu"+ style={{ left: position.x, top: position.y }}+ onContextMenu={(event) => event.preventDefault()}+ className="surface fixed z-50 min-w-48 rounded-xl px-1.5 py-1.5 text-primary"+ >+ {target.items.map((item) => (+ <button+ key={item.label}+ role="menuitem"+ type="button"+ onClick={() => {+ item.onSelect();+ onClose();+ }}+ className={`flex w-full cursor-pointer items-center gap-2.5 rounded-lg px-2.5 py-1.5+ text-left text-xs transition-colors hover:bg-hover+ ${item.danger ? "text-danger" : ""}`}+ >+ {item.icon ? (+ <Icon name={item.icon} size={14} className="shrink-0 opacity-70" />+ ) : (+ <span className="w-3.5 shrink-0" />+ )}+ <span className="min-w-0 flex-1 truncate">{item.label}</span>+ {item.hint && (+ <span className="shrink-0 font-technical text-[10px] text-tertiary">{item.hint}</span>+ )}+ </button>+ ))}+ </div>,+ document.body,+ );+}diff --git a/desktop/src/components/ExportDialog.tsx b/desktop/src/components/ExportDialog.tsxnew file mode 100644index 00000000..b82c4331--- /dev/null+++ b/desktop/src/components/ExportDialog.tsx@@ -0,0 +1,249 @@+import { useEffect, useRef, useState } from "react";+import type { ReactNode } from "react";+import { save } from "@tauri-apps/plugin-dialog";++import type { ExportClip, ExportProgress } from "../lib/engine";+import { exportProject, onExportProgress } from "../lib/engine";+import { shortDuration } from "../lib/time";+import { Icon } from "./Icon";++/** Quality presets, in the terms a person picking one actually thinks in. */+const QUALITIES = [+ { label: "High", crf: 18, preset: "slow", hint: "large" },+ { label: "Balanced", crf: 22, preset: "medium", hint: "default" },+ { label: "Small", crf: 27, preset: "fast", hint: "compact" },+] as const;++type Phase =+ | { kind: "idle" }+ | { kind: "running"; progress: ExportProgress | null }+ | { kind: "done"; path: string }+ | { kind: "failed"; message: string };++/**+ * The export sheet.+ *+ * Rendering happens on a blocking thread in the host and reports back through+ * an event, so this listens rather than waiting - a two-minute export that+ * says nothing until it finishes is indistinguishable from a hang.+ */+export function ExportDialog({+ projectName,+ projectPath,+ width,+ height,+ rateNum,+ rateDen,+ duration,+ clips,+ onClose,+}: {+ projectName: string;+ projectPath: string;+ width: number;+ height: number;+ rateNum: number;+ rateDen: number;+ duration: number;+ clips: ExportClip[];+ onClose: () => void;+}) {+ const [output, setOutput] = useState(`${projectPath}\\${projectName}.mp4`);+ const [quality, setQuality] = useState<(typeof QUALITIES)[number]>(QUALITIES[1]);+ const [phase, setPhase] = useState<Phase>({ kind: "idle" });+ const unlisten = useRef<(() => void) | null>(null);++ useEffect(() => {+ return () => unlisten.current?.();+ }, []);++ const running = phase.kind === "running";++ const browse = async () => {+ const chosen = await save({+ title: "Export to",+ defaultPath: output,+ filters: [{ name: "MP4 video", extensions: ["mp4"] }],+ });+ if (chosen) setOutput(chosen);+ };++ const start = async () => {+ if (running || clips.length === 0) return;++ setPhase({ kind: "running", progress: null });+ unlisten.current = await onExportProgress((progress) =>+ setPhase((current) => (current.kind === "running" ? { kind: "running", progress } : current)),+ );++ try {+ const path = await exportProject({+ output,+ width,+ height,+ rateNum,+ rateDen,+ crf: quality.crf,+ preset: quality.preset,+ clips,+ });+ setPhase({ kind: "done", path });+ } catch (cause) {+ setPhase({ kind: "failed", message: String(cause) });+ } finally {+ unlisten.current?.();+ unlisten.current = null;+ }+ };++ const percent =+ phase.kind === "running" && phase.progress && phase.progress.total > 0+ ? Math.min(100, Math.round((phase.progress.frame / phase.progress.total) * 100))+ : null;++ return (+ <div className="fixed inset-0 z-50 flex items-center justify-center bg-sunken p-8">+ <div className="surface w-full max-w-md rounded-2xl p-6">+ <div className="mb-5 flex items-center gap-2">+ <Icon name="export" size={17} className="text-accent" />+ <h2 className="flex-1 text-sm font-semibold text-primary">Export</h2>+ {!running && (+ <button+ type="button"+ aria-label="Close"+ onClick={onClose}+ className="cursor-pointer rounded p-1 text-secondary hover:bg-hover hover:text-primary"+ >+ <Icon name="close" size={14} />+ </button>+ )}+ </div>++ <dl className="mb-5 space-y-1 rounded-lg bg-sunken px-3 py-2.5">+ <Row label="Format" value={`${width} x ${height} · ${(rateNum / rateDen).toFixed(2)} fps`} />+ <Row label="Duration" value={shortDuration(duration)} />+ <Row label="Clips" value={`${clips.length}`} />+ </dl>++ {phase.kind === "idle" || phase.kind === "failed" ? (+ <>+ <Label>Save to</Label>+ <div className="mb-5 flex gap-1.5">+ <input+ value={output}+ spellCheck={false}+ onChange={(event) => setOutput(event.target.value)}+ className="min-w-0 flex-1 rounded-lg border border-hairline bg-sunken px-3 py-2+ font-technical text-[11px] text-primary focus:border-accent focus:outline-none"+ />+ <button+ type="button"+ onClick={() => void browse()}+ className="flex shrink-0 cursor-pointer items-center gap-1.5 rounded-lg bg-hover px-3+ text-xs text-primary transition-colors hover:bg-hover"+ >+ <Icon name="folder" size={13} />+ Browse+ </button>+ </div>++ <Label>Quality</Label>+ <div className="mb-5 grid grid-cols-3 gap-1.5">+ {QUALITIES.map((option) => (+ <button+ key={option.label}+ type="button"+ aria-pressed={option.label === quality.label}+ onClick={() => setQuality(option)}+ className={`flex cursor-pointer flex-col items-center gap-0.5 rounded-lg px-2 py-2+ transition-colors ${+ option.label === quality.label+ ? "bg-accent text-on-accent"+ : "bg-hover text-secondary hover:bg-hover"+ }`}+ >+ <span className="text-xs">{option.label}</span>+ <span className="text-[10px] opacity-60">{option.hint}</span>+ </button>+ ))}+ </div>++ {phase.kind === "failed" && (+ <p className="mb-4 rounded-lg border border-danger bg-danger-soft px-3 py-2+ font-technical text-[11px] leading-snug text-danger">+ {phase.message}+ </p>+ )}++ <button+ type="button"+ onClick={() => void start()}+ disabled={clips.length === 0 || !output.trim()}+ className="flex w-full cursor-pointer items-center justify-center gap-2 rounded-lg+ bg-accent px-4 py-2.5 text-sm font-medium text-on-accent transition-colors+ hover:bg-accent-hover disabled:cursor-not-allowed disabled:opacity-40"+ >+ <Icon name="export" size={15} />+ {clips.length === 0 ? "Nothing to export" : "Export"}+ </button>+ </>+ ) : phase.kind === "running" ? (+ <div className="py-2">+ <div className="mb-2 flex items-baseline justify-between">+ <span className="text-xs text-primary">+ {phase.progress?.stage ?? "starting"}+ </span>+ <span className="font-technical text-[11px] tabular-nums text-secondary">+ {percent === null ? "" : `${percent}%`}+ </span>+ </div>+ <div className="h-1.5 overflow-hidden rounded-full bg-active">+ <div+ className="h-full rounded-full bg-accent transition-[width] duration-200"+ style={{ width: `${percent ?? 3}%` }}+ />+ </div>+ {phase.progress && phase.progress.total > 0 && (+ <p className="mt-2 font-technical text-[10px] text-tertiary">+ frame {phase.progress.frame} of {phase.progress.total}+ </p>+ )}+ </div>+ ) : (+ <div className="py-1">+ <p className="mb-1 flex items-center gap-2 text-sm text-success">+ <Icon name="play" size={14} />+ Export finished+ </p>+ <p className="mb-5 wrap-break-word font-technical text-[10px] text-secondary">{phase.path}</p>+ <button+ type="button"+ onClick={onClose}+ className="w-full cursor-pointer rounded-lg bg-hover px-4 py-2.5 text-sm text-primary+ transition-colors hover:bg-hover"+ >+ Done+ </button>+ </div>+ )}+ </div>+ </div>+ );+}++function Label({ children }: { children: ReactNode }) {+ return (+ <span className="mb-1.5 block text-[11px] font-semibold uppercase tracking-wider text-secondary">+ {children}+ </span>+ );+}++function Row({ label, value }: { label: string; value: string }) {+ return (+ <div className="flex items-baseline justify-between gap-3">+ <dt className="text-[11px] text-secondary">{label}</dt>+ <dd className="truncate font-technical text-[11px] text-primary">{value}</dd>+ </div>+ );+}diff --git a/desktop/src/components/Icon.tsx b/desktop/src/components/Icon.tsxnew file mode 100644index 00000000..481ad4ad--- /dev/null+++ b/desktop/src/components/Icon.tsx@@ -0,0 +1,317 @@+import type { ReactNode } from "react";++/**+ * The icon set.+ *+ * Hand-authored rather than pulled from a library: an editor needs perhaps+ * thirty glyphs, several of which (razor, snap, ripple) no general-purpose set+ * draws well, and a dependency that ships a thousand SVGs to use thirty is a+ * bad trade in an app that has to start fast.+ *+ * All of them are 24x24, stroked with `currentColor` at width 2, round caps.+ * That uniformity is what makes them look like one family; if you add a glyph,+ * draw it on the same grid and do not fill it.+ */++const GLYPHS = {+ // ── transport ──────────────────────────────────────────────────────────+ play: <path d="M8 5.2v13.6l11-6.8z" />,+ pause: (+ <>+ <path d="M9 5v14" />+ <path d="M15 5v14" />+ </>+ ),+ skipStart: (+ <>+ <path d="M6 5v14" />+ <path d="M19 5.5v13l-10-6.5z" />+ </>+ ),+ skipEnd: (+ <>+ <path d="M18 5v14" />+ <path d="M5 5.5v13l10-6.5z" />+ </>+ ),+ stepBack: (+ <>+ <path d="M5 5v14" />+ <path d="m16 6-7 6 7 6z" />+ </>+ ),+ stepForward: (+ <>+ <path d="M19 5v14" />+ <path d="m8 6 7 6-7 6z" />+ </>+ ),++ // ── tools ──────────────────────────────────────────────────────────────+ // arrow pointer+ select: (+ <>+ <path d="m4 3 7 17 2.5-6.5L20 11z" />+ </>+ ),+ // razor: two blades meeting at a cut line+ razor: (+ <>+ <circle cx="6" cy="18" r="2.5" />+ <circle cx="18" cy="18" r="2.5" />+ <path d="M7.8 16.2 18 4" />+ <path d="M16.2 16.2 6 4" />+ </>+ ),+ hand: (+ <>+ <path d="M9 11V5.5a1.5 1.5 0 0 1 3 0V11" />+ <path d="M12 11V4.5a1.5 1.5 0 0 1 3 0V11" />+ <path d="M15 11V6.5a1.5 1.5 0 0 1 3 0V15a6 6 0 0 1-6 6h-1a7 7 0 0 1-7-7v-2a1.5 1.5 0 0 1 3 0v1" />+ </>+ ),+ // horseshoe magnet, for snapping+ magnet: (+ <>+ <path d="M6 15V8a6 6 0 0 1 12 0v7" />+ <path d="M6 15a3 3 0 0 0 6 0V9" />+ <path d="M18 15a3 3 0 0 1-6 0V9" />+ </>+ ),++ // ── media kinds ────────────────────────────────────────────────────────+ film: (+ <>+ <rect x="3" y="4" width="18" height="16" rx="2" />+ <path d="M7 4v16" />+ <path d="M17 4v16" />+ <path d="M3 12h18" />+ </>+ ),+ music: (+ <>+ <path d="M9 18V5l11-2v13" />+ <circle cx="6" cy="18" r="3" />+ <circle cx="17" cy="16" r="3" />+ </>+ ),+ // framed picture with a horizon and a sun+ image: (+ <>+ <rect x="3" y="4" width="18" height="16" rx="2" />+ <circle cx="8.5" cy="9.5" r="1.5" />+ <path d="m3 17 5-4 4 3 3-2 6 5" />+ </>+ ),+ // waveform bars+ waveform: (+ <>+ <path d="M3 12v1" />+ <path d="M7 8v8" />+ <path d="M11 5v14" />+ <path d="M15 9v6" />+ <path d="M19 11v2" />+ </>+ ),++ // ── actions ────────────────────────────────────────────────────────────+ plus: <path d="M12 5v14M5 12h14" />,+ minus: <path d="M5 12h14" />,+ close: <path d="M18 6 6 18M6 6l12 12" />,+ trash: (+ <>+ <path d="M3 6h18" />+ <path d="M8 6V4a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1v2" />+ <path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6" />+ <path d="M10 11v6M14 11v6" />+ </>+ ),+ // arrow down into a tray+ import: (+ <>+ <path d="M12 3v12" />+ <path d="m7 10 5 5 5-5" />+ <path d="M3 15v4a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-4" />+ </>+ ),+ // arrow up out of a tray+ export: (+ <>+ <path d="M12 15V3" />+ <path d="m7 8 5-5 5 5" />+ <path d="M3 15v4a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-4" />+ </>+ ),+ folder: (+ <path d="M4 20a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h4.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.7.9H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2Z" />+ ),++ // ── track state ────────────────────────────────────────────────────────+ eye: (+ <>+ <path d="M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7-10-7-10-7Z" />+ <circle cx="12" cy="12" r="3" />+ </>+ ),+ eyeOff: (+ <>+ <path d="M10.7 5.1A10.9 10.9 0 0 1 12 5c6.5 0 10 7 10 7a18 18 0 0 1-2.6 3.5" />+ <path d="M6.6 6.6A18 18 0 0 0 2 12s3.5 7 10 7a10.7 10.7 0 0 0 5.4-1.4" />+ <path d="m2 2 20 20" />+ </>+ ),+ volume: (+ <>+ <path d="M11 5 6 9H3v6h3l5 4z" />+ <path d="M16 8.5a4.5 4.5 0 0 1 0 7" />+ <path d="M19 5.5a8.5 8.5 0 0 1 0 13" />+ </>+ ),+ volumeOff: (+ <>+ <path d="M11 5 6 9H3v6h3l5 4z" />+ <path d="m16 9 5 6M21 9l-5 6" />+ </>+ ),+ lock: (+ <>+ <rect x="4" y="10" width="16" height="11" rx="2" />+ <path d="M8 10V7a4 4 0 0 1 8 0v3" />+ </>+ ),++ // ── window controls ────────────────────────────────────────────────────+ // Drawn at width 1.5 visually by being thinner shapes; Windows convention.+ winMinimize: <path d="M5 12h14" />,+ winMaximize: <rect x="5" y="5" width="14" height="14" rx="1.5" />,+ winRestore: (+ <>+ <rect x="4" y="8" width="12" height="12" rx="1.5" />+ <path d="M8 8V5.5A1.5 1.5 0 0 1 9.5 4h9A1.5 1.5 0 0 1 20 5.5v9a1.5 1.5 0 0 1-1.5 1.5H16" />+ </>+ ),++ // ── chrome ─────────────────────────────────────────────────────────────+ sun: (+ <>+ <circle cx="12" cy="12" r="4" />+ <path d="M12 2v2M12 20v2M2 12h2M20 12h2" />+ <path d="m4.93 4.93 1.41 1.41M17.66 17.66l1.41 1.41M6.34 17.66l-1.41 1.41M19.07 4.93l-1.41 1.41" />+ </>+ ),+ moon: <path d="M21 12.8A9 9 0 1 1 11.2 3a7 7 0 0 0 9.8 9.8Z" />,+ chevronDown: <path d="m6 9 6 6 6-6" />,+ chevronRight: <path d="m9 6 6 6-6 6" />,+ search: (+ <>+ <circle cx="11" cy="11" r="7" />+ <path d="m20 20-3.5-3.5" />+ </>+ ),+ settings: (+ <>+ <circle cx="12" cy="12" r="3.2" />+ <path d="M12 2.5v2.2M12 19.3v2.2M21.5 12h-2.2M4.7 12H2.5" />+ <path d="m18.7 5.3-1.6 1.6M6.9 17.1l-1.6 1.6M18.7 18.7l-1.6-1.6M6.9 6.9 5.3 5.3" />+ </>+ ),+ info: (+ <>+ <circle cx="12" cy="12" r="9" />+ <path d="M12 16v-5" />+ <path d="M12 8h.01" />+ </>+ ),+ // crossed arrows, for "fit to window"+ fit: (+ <>+ <path d="M3 8V5a2 2 0 0 1 2-2h3" />+ <path d="M16 3h3a2 2 0 0 1 2 2v3" />+ <path d="M21 16v3a2 2 0 0 1-2 2h-3" />+ <path d="M8 21H5a2 2 0 0 1-2-2v-3" />+ </>+ ),+} satisfies Record<string, ReactNode>;++/** Every glyph the app can draw. A typo is a compile error. */+export type IconName = keyof typeof GLYPHS;++export function Icon({+ name,+ size = 16,+ className,+ strokeWidth = 2,+}: {+ name: IconName;+ size?: number;+ className?: string;+ strokeWidth?: number;+}) {+ return (+ <svg+ viewBox="0 0 24 24"+ width={size}+ height={size}+ fill="none"+ stroke="currentColor"+ strokeWidth={strokeWidth}+ strokeLinecap="round"+ strokeLinejoin="round"+ aria-hidden="true"+ className={className}+ >+ {GLYPHS[name]}+ </svg>+ );+}++/**+ * The standard square icon button.+ *+ * Blue when active, transparent otherwise - the same convention design3d uses,+ * so "this tool is selected" reads identically across both apps.+ */+export function IconButton({+ icon,+ label,+ onClick,+ active = false,+ disabled = false,+ size = 9,+ tone = "default",+}: {+ icon: IconName;+ label: string;+ onClick?: () => void;+ active?: boolean;+ disabled?: boolean;+ /** Height and width in Tailwind spacing units. */+ size?: 7 | 9;+ tone?: "default" | "danger" | "go";+}) {+ const idle =+ tone === "danger"+ ? "text-danger hover:bg-hover"+ : tone === "go"+ ? "text-success hover:bg-hover"+ : "text-primary hover:bg-hover";++ const on = tone === "go" ? "bg-success text-on-accent" : "bg-accent text-on-accent";++ return (+ <button+ type="button"+ title={label}+ aria-label={label}+ aria-pressed={active}+ disabled={disabled}+ onClick={onClick}+ className={`flex ${size === 9 ? "h-9 w-9" : "h-7 w-7"} shrink-0 cursor-pointer+ items-center justify-center rounded-lg transition-colors duration-150+ disabled:cursor-not-allowed disabled:opacity-30+ ${active ? on : idle}`}+ >+ <Icon name={icon} size={size === 9 ? 16 : 14} />+ </button>+ );+}diff --git a/desktop/src/components/Inspector.tsx b/desktop/src/components/Inspector.tsxnew file mode 100644index 00000000..e1396756--- /dev/null+++ b/desktop/src/components/Inspector.tsx@@ -0,0 +1,113 @@+import type { ReactNode } from "react";++import type { Clip, MediaItem } from "../lib/project";+import { shortDuration, timecode } from "../lib/time";+import { Icon } from "./Icon";+import { Empty } from "./Panel";++/**+ * Properties of the current selection - a clip if one is selected, otherwise+ * the highlighted bin item.+ *+ * Read-only for now. When these become editable the edits go to the engine as+ * commands and come back as new state; the panel stays dumb. That is what+ * makes undo possible later without unpicking it.+ */+export function Inspector({+ clip,+ media,+ frameRate,+}: {+ clip: Clip | null;+ media: MediaItem | null;+ frameRate: number;+}) {+ return (+ <div>+ {!clip && !media ? (+ <Empty icon={<Icon name="info" size={26} strokeWidth={1.5} />}>+ Select a clip or a bin item.+ </Empty>+ ) : (+ <div className="px-3 py-2">+ {clip && (+ <Section title="Clip">+ <Row label="Name" value={clip.name} />+ <Row label="Track" value={clip.trackId} mono />+ <Row label="Start" value={timecode(clip.start, frameRate)} mono />+ <Row label="Duration" value={timecode(clip.duration, frameRate)} mono />+ <Row label="End" value={timecode(clip.start + clip.duration, frameRate)} mono />+ <Row label="In point" value={timecode(clip.sourceStart, frameRate)} mono />+ </Section>+ )}++ {media && (+ <>+ <Section title="Source">+ <Row label="Name" value={media.name} />+ <Row label="Path" value={media.path} mono wrap />+ <Row label="Duration" value={shortDuration(media.duration)} mono />+ </Section>++ {media.width !== null && (+ <Section title="Video">+ <Row label="Codec" value={media.videoCodec ?? "unknown"} />+ <Row label="Size" value={`${media.width} x ${media.height}`} mono />+ <Row+ label="Rate"+ value={media.frameRate ? `${media.frameRate.toFixed(3)} fps` : "unknown"}+ mono+ />+ <Row label="Exact" value={media.frameRateFraction ?? "unknown"} mono />+ </Section>+ )}++ {media.hasAudio && (+ <Section title="Audio">+ <Row label="Codec" value={media.audioCodec ?? "unknown"} />+ </Section>+ )}+ </>+ )}+ </div>+ )}+ </div>+ );+}++function Section({ title, children }: { title: string; children: ReactNode }) {+ return (+ <section className="mb-4">+ <h3 className="mb-1.5 text-[11px] font-semibold uppercase tracking-wider text-tertiary">+ {title}+ </h3>+ <dl className="space-y-1.5">{children}</dl>+ </section>+ );+}++function Row({+ label,+ value,+ mono,+ wrap,+}: {+ label: string;+ value: string;+ mono?: boolean;+ wrap?: boolean;+}) {+ return (+ <div className="flex items-baseline justify-between gap-3">+ <dt className="shrink-0 text-xs text-secondary">{label}</dt>+ <dd+ title={value}+ className={`min-w-0 text-right text-xs text-primary ${mono ? "text-[11px]" : ""} ${+ wrap ? "break-all" : "truncate"+ }`}+ >+ {value}+ </dd>+ </div>+ );+}diff --git a/desktop/src/components/MediaBin.tsx b/desktop/src/components/MediaBin.tsxnew file mode 100644index 00000000..83d3e8de--- /dev/null+++ b/desktop/src/components/MediaBin.tsx@@ -0,0 +1,356 @@+import { useEffect, useRef, useState } from "react";+import type { PointerEvent as ReactPointerEvent, ReactNode } from "react";++import type { MediaAssets } from "../lib/assets";+import { subscribeAssets } from "../lib/assets";+import type { MediaItem } from "../lib/project";+import { themeColor } from "../lib/theme";+import { shortDuration } from "../lib/time";+import { Icon, IconButton } from "./Icon";+import { Empty, Panel } from "./Panel";++export type BinTab = "media" | "audio";++/**+ * The media bin.+ *+ * Items are HTML5 drag sources: dragging one onto the timeline places a clip+ * at the drop position. That is the primary way material gets into an edit, so+ * it needs to be the obvious one - hence the whole row being the drag handle+ * rather than some grip affordance.+ */+export function MediaBin({+ items,+ tab,+ selectedId,+ busy,+ error,+ onTab,+ onSelect,+ onImport,+ onRemove,+ onDismissError,+ onBeginDrag,+ onAddToTimeline,+ assets,+ dropping,+}: {+ items: MediaItem[];+ tab: BinTab;+ /** A file is being dragged over the window from outside. */+ dropping: boolean;+ /** Shared with the timeline, so a waveform is only ever computed once. */+ assets: MediaAssets;+ selectedId: string | null;+ busy: boolean;+ error: string | null;+ onTab: (tab: BinTab) => void;+ onSelect: (id: string) => void;+ onImport: (path: string) => void;+ onRemove: (id: string) => void;+ onDismissError: () => void;+ /** Called once the pointer has moved far enough to count as a drag. */+ onBeginDrag: (item: MediaItem, clientX: number, clientY: number) => void;+ onAddToTimeline: (mediaId: string) => void;+}) {+ const [path, setPath] = useState("");++ /**+ * Starts a drag using raw pointer events rather than HTML5 drag-and-drop.+ *+ * HTML5 dragging cannot be used here at all: Tauri's `dragDropEnabled`+ * native handler intercepts every drag over the webview, including ones that+ * begin inside it, so an internal drag registers as an incoming OS file drop+ * and raises the import overlay. Pointer events never involve the OLE drag+ * machinery, so the two stop fighting.+ *+ * The 4px threshold keeps a sloppy click from starting a drag.+ */+ const beginDrag = (event: ReactPointerEvent<HTMLLIElement>, item: MediaItem) => {+ if (event.button !== 0) return;+ const originX = event.clientX;+ const originY = event.clientY;++ const onMove = (moveEvent: PointerEvent) => {+ if (Math.hypot(moveEvent.clientX - originX, moveEvent.clientY - originY) <= 4) return;+ cleanup();+ onBeginDrag(item, moveEvent.clientX, moveEvent.clientY);+ };+ const cleanup = () => {+ window.removeEventListener("pointermove", onMove);+ window.removeEventListener("pointerup", cleanup);+ };++ window.addEventListener("pointermove", onMove);+ window.addEventListener("pointerup", cleanup);+ };++ const visible = items.filter((item) => (tab === "audio" ? item.kind === "audio" : true));++ const submit = () => {+ // Windows' "Copy as path" wraps the path in quotes, and pasting that+ // straight in is the single most likely first action.+ const trimmed = path.trim().replace(/^"|"$/g, "");+ if (!trimmed || busy) return;+ onImport(trimmed);+ setPath("");+ };++ return (+ <Panel+ title={tab === "audio" ? "Audio" : "Media"}+ // Dropped files land in the bin, so the bin is what lights up. A+ // full-screen overlay would obscure the editor to say something that+ // only concerns one panel.+ className={dropping ? "ring-2 ring-accent ring-inset" : ""}+ actions={+ <span className="font-technical text-[10px] text-tertiary">+ {visible.length > 0 ? `${visible.length}` : ""}+ </span>+ }+ >+ <div className="flex gap-0.5 px-2 pb-2 pt-2">+ <TabButton active={tab === "media"} onClick={() => onTab("media")} icon="folder">+ All+ </TabButton>+ <TabButton active={tab === "audio"} onClick={() => onTab("audio")} icon="music">+ Audio+ </TabButton>+ </div>++ <div className="flex gap-1.5 px-2 pb-2">+ <input+ value={path}+ onChange={(event) => setPath(event.target.value)}+ onKeyDown={(event) => event.key === "Enter" && submit()}+ placeholder="Paste a file path"+ spellCheck={false}+ className="min-w-0 flex-1 rounded-lg border border-hairline bg-sunken px-2 py-1.5+ text-xs text-primary placeholder:text-tertiary+ focus:border-accent focus:outline-none"+ />+ <IconButton+ icon="plus"+ label="Add media"+ size={7}+ onClick={submit}+ disabled={busy || path.trim() === ""}+ />+ </div>++ {error && (+ <div className="mx-2 mb-2 flex items-start gap-2 rounded-lg border border-danger bg-danger-soft px-2 py-1.5">+ <p className="min-w-0 flex-1 wrap-break-word font-technical text-[10px] leading-snug text-danger">+ {error}+ </p>+ <button+ type="button"+ aria-label="Dismiss"+ onClick={onDismissError}+ className="shrink-0 cursor-pointer text-danger hover:text-danger"+ >+ <Icon name="close" size={12} />+ </button>+ </div>+ )}++ {visible.length === 0 ? (+ <Empty+ icon={+ <Icon+ name="import"+ size={28}+ strokeWidth={1.5}+ className={dropping ? "text-accent" : ""}+ />+ }+ >+ {dropping+ ? "Release to import"+ : "Drop video and audio files anywhere in the window, or paste a path above."}+ </Empty>+ ) : (+ <ul className="flex flex-col gap-0.5 px-2 pb-2">+ {visible.map((item) => (+ <li+ key={item.id}+ onPointerDown={(event) => beginDrag(event, item)}+ onClick={() => onSelect(item.id)}+ onDoubleClick={() => onAddToTimeline(item.id)}+ title="Drag onto a track, or double-click to add at the playhead"+ className={`group flex cursor-grab select-none items-center gap-2.5 rounded-lg px-2 py-2+ transition-colors active:cursor-grabbing ${+ item.id === selectedId+ ? "bg-accent-soft ring-1 ring-accent"+ : "hover:bg-hover"+ }`}+ >+ <MediaThumb item={item} assets={assets} />++ <span className="min-w-0 flex-1">+ <span className="block truncate text-xs text-primary">{item.name}</span>+ <span className="block truncate font-technical text-[10px] text-secondary">+ {item.kind === "audio"+ ? (item.audioCodec ?? "audio")+ : item.kind === "image"+ ? `${item.width}x${item.height} still`+ : `${item.width}x${item.height} · ${item.frameRate?.toFixed(2)} fps`}+ {" · "}+ {shortDuration(item.duration)}+ </span>+ </span>++ <button+ type="button"+ aria-label={`Remove ${item.name}`}+ title="Remove from bin"+ onClick={(event) => {+ event.stopPropagation();+ onRemove(item.id);+ }}+ className="hidden shrink-0 cursor-pointer rounded p-1 text-secondary+ hover:bg-active hover:text-primary group-hover:block"+ >+ <Icon name="close" size={12} />+ </button>+ </li>+ ))}+ </ul>+ )}+ </Panel>+ );+}++/**+ * The bin preview for one item.+ *+ * Reuses exactly the artwork the timeline uses - the first frame of the cached+ * filmstrip for video, the cached peaks for audio - so nothing is decoded+ * twice and a clip looks the same in the bin as it does on a track.+ *+ * Artwork arrives asynchronously and deliberately does not cause a React+ * render, so this subscribes and repaints itself instead.+ */+function MediaThumb({ item, assets }: { item: MediaItem; assets: MediaAssets }) {+ const canvasRef = useRef<HTMLCanvasElement>(null);+ const [hasArt, setHasArt] = useState(false);++ useEffect(() => {+ const paint = () => {+ const canvas = canvasRef.current;+ const context = canvas?.getContext("2d");+ if (!canvas || !context) return;++ const ratio = window.devicePixelRatio || 1;+ const width = canvas.clientWidth;+ const height = canvas.clientHeight;+ if (width === 0 || height === 0) return;++ canvas.width = Math.round(width * ratio);+ canvas.height = Math.round(height * ratio);+ context.setTransform(ratio, 0, 0, ratio, 0, 0);+ context.clearRect(0, 0, width, height);++ // Stills and footage both draw from the strip cache; only audio differs.+ if (item.kind !== "audio") {+ const strip = assets.strips.get(item.id);+ const frames = assets.stripFrames.get(item.id);+ if (!strip || !frames) {+ setHasArt(false);+ return;+ }+ // Cover-fit the first frame: letterboxing a 56px thumbnail wastes+ // most of it, and a crop reads better than bars at this size.+ const tile = strip.width / frames;+ const scale = Math.max(width / tile, height / strip.height);+ const drawWidth = tile * scale;+ const drawHeight = strip.height * scale;+ context.drawImage(+ strip,+ 0,+ 0,+ tile,+ strip.height,+ (width - drawWidth) / 2,+ (height - drawHeight) / 2,+ drawWidth,+ drawHeight,+ );+ setHasArt(true);+ return;+ }++ const peaks = assets.peaks.get(item.id);+ if (!peaks) {+ setHasArt(false);+ return;+ }++ // The whole file squeezed into the thumbnail, extremes per column so a+ // transient does not vanish at this scale.+ const centre = height / 2;+ const half = height / 2 - 1;+ const buckets = peaks.max.length;++ context.fillStyle = themeColor("clip-audio", "#2f8a68");+ context.beginPath();+ for (let column = 0; column < width; column += 1) {+ const from = Math.floor((column / width) * buckets);+ const to = Math.max(from + 1, Math.floor(((column + 1) / width) * buckets));++ let low = 0;+ let high = 0;+ for (let bucket = from; bucket < to && bucket < buckets; bucket += 1) {+ if (peaks.min[bucket] < low) low = peaks.min[bucket];+ if (peaks.max[bucket] > high) high = peaks.max[bucket];+ }++ const top = centre - high * half;+ context.rect(column, top, 1, Math.max(1, centre - low * half - top));+ }+ context.fill();+ setHasArt(true);+ };++ paint();+ return subscribeAssets(assets, paint);+ }, [assets, item]);++ return (+ <span className="relative h-8 w-14 shrink-0 overflow-hidden rounded-md bg-sunken">+ <canvas ref={canvasRef} className="h-full w-full" />+ {!hasArt && (+ <span className="absolute inset-0 flex items-center justify-center text-tertiary">+ <Icon name={item.kind === "video" ? "film" : item.kind === "image" ? "image" : "music"} size={14} />+ </span>+ )}+ </span>+ );+}++function TabButton({+ active,+ onClick,+ icon,+ children,+}: {+ active: boolean;+ onClick: () => void;+ icon: "folder" | "music";+ children: ReactNode;+}) {+ return (+ <button+ type="button"+ onClick={onClick}+ aria-pressed={active}+ className={`flex flex-1 cursor-pointer items-center justify-center gap-1.5 rounded-lg px-2 py-1.5+ text-xs transition-colors ${+ active ? "bg-accent text-on-accent" : "text-secondary hover:bg-hover"+ }`}+ >+ <Icon name={icon} size={13} />+ {children}+ </button>+ );+}diff --git a/desktop/src/components/Menu.tsx b/desktop/src/components/Menu.tsxnew file mode 100644index 00000000..42e1f4c7--- /dev/null+++ b/desktop/src/components/Menu.tsx@@ -0,0 +1,111 @@+import { Fragment, useEffect, useRef, useState } from "react";+import type { ReactNode } from "react";++import { Icon, type IconName } from "./Icon";++export interface MenuOption {+ label: string;+ onSelect: () => void;+ icon?: IconName;+ /** Right-aligned hint, e.g. a keyboard shortcut. */+ hint?: string;+ disabled?: boolean;+ danger?: boolean;+}++/**+ * A dropdown menu hung under an arbitrary trigger.+ *+ * Options arrive in groups and a hairline is drawn between neighbouring+ * groups, so callers express structure by nesting arrays rather than by+ * threading separator sentinels through a flat list.+ */+export function Menu({+ groups,+ trigger,+ align = "left",+}: {+ groups: MenuOption[][];+ trigger: (open: boolean) => ReactNode;+ align?: "left" | "right";+}) {+ const [open, setOpen] = useState(false);+ const root = useRef<HTMLDivElement>(null);++ useEffect(() => {+ if (!open) return;++ const onPointerDown = (event: PointerEvent) => {+ if (!root.current?.contains(event.target as Node)) setOpen(false);+ };+ const onKeyDown = (event: KeyboardEvent) => {+ if (event.key === "Escape") setOpen(false);+ };++ document.addEventListener("pointerdown", onPointerDown);+ document.addEventListener("keydown", onKeyDown);+ window.addEventListener("blur", () => setOpen(false));+ return () => {+ document.removeEventListener("pointerdown", onPointerDown);+ document.removeEventListener("keydown", onKeyDown);+ };+ }, [open]);++ return (+ <div ref={root} className="relative">+ <button+ type="button"+ aria-haspopup="menu"+ aria-expanded={open}+ onClick={() => setOpen((current) => !current)}+ className="cursor-pointer"+ >+ {trigger(open)}+ </button>++ {open && (+ <div+ role="menu"+ className={`surface absolute z-50 mt-1.5 min-w-52 rounded-xl px-1.5 py-1.5 text-primary+ ${align === "right" ? "right-0" : "left-0"}`}+ >+ {groups.map((group, groupIndex) => (+ <Fragment key={groupIndex}>+ {groupIndex > 0 && (+ <div role="separator" className="my-1.5 border-t border-hairline" />+ )}+ {group.map((option) => (+ <button+ key={option.label}+ role="menuitem"+ type="button"+ disabled={option.disabled}+ onClick={() => {+ option.onSelect();+ setOpen(false);+ }}+ className={`flex w-full cursor-pointer items-center gap-2.5 rounded-lg px-2.5 py-1.5+ text-left text-xs transition-colors hover:bg-hover+ disabled:cursor-not-allowed disabled:opacity-30 disabled:hover:bg-transparent+ ${option.danger ? "text-danger" : ""}`}+ >+ {option.icon ? (+ <Icon name={option.icon} size={14} className="shrink-0 opacity-70" />+ ) : (+ <span className="w-3.5 shrink-0" />+ )}+ <span className="min-w-0 flex-1 truncate">{option.label}</span>+ {option.hint && (+ <span className="shrink-0 font-technical text-[10px] text-tertiary">+ {option.hint}+ </span>+ )}+ </button>+ ))}+ </Fragment>+ ))}+ </div>+ )}+ </div>+ );+}diff --git a/desktop/src/components/Panel.tsx b/desktop/src/components/Panel.tsxnew file mode 100644index 00000000..0f4addd2--- /dev/null+++ b/desktop/src/components/Panel.tsx@@ -0,0 +1,72 @@+import type { ReactNode } from "react";++/**+ * Shared chrome primitives.+ *+ * Panels are separate rounded surfaces with an even gutter between them, not+ * flush regions divided by hairlines. The gap is produced by the resizers+ * themselves rather than by margins or a flex `gap`, so it is the same on both+ * axes by construction and cannot drift as the layout changes.+ *+ * `PANEL_SHELL` is the single definition of what a panel looks like. The+ * preview and the timeline are not built from `Panel` - they own their whole+ * interior - so they reuse this constant instead of copying the classes.+ */+export const PANEL_SHELL =+ "flex h-full min-h-0 flex-col overflow-hidden rounded-xl border border-hairline bg-panel";++/** A docked panel with a heading strip and a scrolling body. */+export function Panel({+ title,+ actions,+ children,+ className = "",+}: {+ title?: string;+ actions?: ReactNode;+ children: ReactNode;+ className?: string;+}) {+ return (+ <section className={`${PANEL_SHELL} ${className}`}>+ {title && (+ <header className="flex h-9 shrink-0 items-center gap-2 border-b border-hairline px-3">+ <h2 className="text-[11px] font-semibold uppercase tracking-wider text-secondary">+ {title}+ </h2>+ <div className="ml-auto flex items-center gap-0.5">{actions}</div>+ </header>+ )}+ <div className="thin-scroll min-h-0 flex-1 overflow-y-auto">{children}</div>+ </section>+ );+}++/** A horizontal group of controls, e.g. the timeline toolbar. */+export function Bar({ children }: { children: ReactNode }) {+ return (+ <div className="flex h-10 shrink-0 items-center gap-1 border-b border-hairline bg-panel px-2">+ {children}+ </div>+ );+}++/** The hairline separating groups inside a `Bar`. */+export function Divider() {+ return <span className="mx-1 h-5 w-px shrink-0 bg-active" aria-hidden />;+}++/** Pushes everything after it to the far end of a `Bar`. */+export function Spacer() {+ return <span className="flex-1" aria-hidden />;+}++/** Centred placeholder for a panel with nothing in it yet. */+export function Empty({ icon, children }: { icon?: ReactNode; children: ReactNode }) {+ return (+ <div className="flex flex-col items-center gap-2 px-4 py-8 text-center">+ {icon && <span className="text-tertiary">{icon}</span>}+ <p className="text-xs leading-relaxed text-tertiary">{children}</p>+ </div>+ );+}diff --git a/desktop/src/components/Preview.tsx b/desktop/src/components/Preview.tsxnew file mode 100644index 00000000..75aadf26--- /dev/null+++ b/desktop/src/components/Preview.tsx@@ -0,0 +1,207 @@+import { useEffect, useRef } from "react";+import { convertFileSrc } from "@tauri-apps/api/core";++import { timecode } from "../lib/time";+import { Icon, IconButton } from "./Icon";+import { PANEL_SHELL } from "./Panel";++/** The video clip that should be on screen right now, if any. */+export interface PreviewSource {+ clipId: string;+ path: string;+ /** Where in the source file the playhead sits, in seconds. */+ time: number;+ muted: boolean;+ /** A still is shown as an image; there is nothing to seek or play. */+ isStill: boolean;+}++/**+ * The program monitor.+ *+ * A `<video>` element, synced to the transport the same way audio is. This is+ * a *preview*, not the engine's output: it shows one clip at a time, so it+ * cannot composite, and it knows nothing about effects or the render graph.+ * What it does do is let you see and hear your edit today.+ *+ * The engine takes this over when it can present frames - see+ * docs/decisions/0002. Until then the element keeps a strict aspect box,+ * because a native surface will eventually be positioned to exactly these+ * bounds and the layout has to be right before anything can be aligned to it.+ */+export function Preview({+ source,+ playing,+ playhead,+ duration,+ frameRate,+ onTogglePlay,+ onStep,+ onSeek,+}: {+ source: PreviewSource | null;+ playing: boolean;+ playhead: number;+ duration: number;+ frameRate: number;+ onTogglePlay: () => void;+ onStep: (frames: number) => void;+ onSeek: (seconds: number) => void;+}) {+ const video = useRef<HTMLVideoElement>(null);+ const loadedClip = useRef<string | null>(null);++ // Swap the source only when the clip under the playhead actually changes.+ // Reassigning `src` every frame would restart the decoder continuously.+ useEffect(() => {+ const element = video.current;+ if (!element) return;++ // A still never goes near the video element - it is rendered as an <img>+ // below - so release whatever the element was holding.+ if (!source || source.isStill) {+ loadedClip.current = null;+ element.removeAttribute("src");+ element.load();+ return;+ }++ if (loadedClip.current !== source.clipId) {+ loadedClip.current = source.clipId;+ element.src = convertFileSrc(source.path);+ element.load();+ }+ }, [source]);++ // Same corrective sync as the audio preview: generous tolerance while+ // playing (a reseek is a visible stutter), tight while paused (a seek is the+ // entire operation).+ useEffect(() => {+ const element = video.current;+ if (!element || !source || source.isStill) return;++ element.muted = source.muted;++ const tolerance = playing ? 0.3 : 0.03;+ if (element.readyState > 0 && Math.abs(element.currentTime - source.time) > tolerance) {+ try {+ element.currentTime = Math.max(0, source.time);+ } catch {+ // Still opening; the next update lands it.+ }+ }++ if (playing && element.paused) void element.play().catch(() => undefined);+ if (!playing && !element.paused) element.pause();+ }, [source, playing]);++ return (+ <div className={PANEL_SHELL}>+ <header className="flex h-9 shrink-0 items-center gap-2 border-b border-hairline px-3">+ <h2 className="text-[11px] font-semibold uppercase tracking-wider text-secondary">+ Preview+ </h2>+ </header>++ {/*+ Containment, deliberately belt and braces.++ A flex item defaults to `min-height: auto`, so a 4K video's intrinsic+ size can push a flex container past its parent no matter what+ `max-h-full` says. Rather than rely on that, the stage clips, and the+ media is absolutely positioned to fill a box that is exactly the+ stage's content area. `object-contain` then fits the picture inside+ that box, so it can never exceed the panel whatever its resolution.+ */}+ <div className="min-h-0 min-w-0 flex-1 overflow-hidden bg-stage p-4">+ <div data-preview-surface className="relative h-full w-full">+ <video+ ref={video}+ playsInline+ className={`absolute inset-0 h-full w-full object-contain ${+ source && !source.isStill ? "block" : "hidden"+ }`}+ />+ {source?.isStill && (+ <img+ // Keyed on the clip so switching between two stills actually+ // swaps the picture rather than reusing the decoded one.+ key={source.clipId}+ src={convertFileSrc(source.path)}+ alt=""+ draggable={false}+ className="absolute inset-0 h-full w-full object-contain"+ />+ )}+ {!source && (+ // No surface of its own: an empty monitor *is* black, and drawing+ // a bordered card on top of it invents an edge that means nothing.+ // Just the words, sitting on the stage.+ <div className="absolute inset-0 flex flex-col items-center justify-center gap-3+ text-on-stage">+ <Icon name="film" size={30} strokeWidth={1.5} />+ <p className="text-xs">Nothing under the playhead</p>+ </div>+ )}+ </div>+ </div>++ {/*+ A three-column grid, not a flex row with `ml-auto`.++ Two things were making the transport jump as the timecode counted. The+ digits themselves can change width, and - worse - auto margins size the+ centre group from whatever space the sides leave, so *any* change on+ the left shoved the buttons sideways.++ `minmax(0, 1fr)` on both sides fixes the second properly: the columns+ are equal and cannot grow past their share, so the middle column is+ centred on the panel regardless of what the sides contain. The sides+ clip rather than push. `tabular-nums` then handles the first.+ */}+ <div+ className="grid h-11 shrink-0 grid-cols-[minmax(0,1fr)_auto_minmax(0,1fr)] items-center+ gap-2 border-t border-hairline px-3"+ >+ <span className="min-w-0 truncate font-mono text-[11px] tabular-nums text-secondary">+ {timecode(playhead, frameRate)}+ <span className="text-tertiary"> / </span>+ <span className="text-tertiary">{timecode(duration, frameRate)}</span>+ </span>++ <div className="flex items-center gap-0.5">+ <IconButton icon="skipStart" label="Go to start" size={7} onClick={() => onSeek(0)} />+ <IconButton+ icon="stepBack"+ label="Previous frame"+ size={7}+ onClick={() => onStep(-1)}+ />+ <IconButton+ icon={playing ? "pause" : "play"}+ label={playing ? "Pause (Space)" : "Play (Space)"}+ onClick={onTogglePlay}+ tone="go"+ active={playing}+ />+ <IconButton+ icon="stepForward"+ label="Next frame"+ size={7}+ onClick={() => onStep(1)}+ />+ <IconButton+ icon="skipEnd"+ label="Go to end"+ size={7}+ onClick={() => onSeek(duration)}+ />+ </div>++ <span className="min-w-0 truncate justify-self-end font-technical text-[10px] text-tertiary">+ {frameRate.toFixed(2)} fps+ </span>+ </div>+ </div>+ );+}diff --git a/desktop/src/components/Resizer.tsx b/desktop/src/components/Resizer.tsxnew file mode 100644index 00000000..084049c1--- /dev/null+++ b/desktop/src/components/Resizer.tsx@@ -0,0 +1,67 @@+import { useCallback, useRef } from "react";+import type { PointerEvent as ReactPointerEvent } from "react";++/**+ * A draggable divider between two docked panels.+ *+ * The hit area is deliberately wider than the visible line (8px versus 1px):+ * a 1px grab target is the single most common way a docked layout feels bad+ * to use. The line itself only lights up once you are on it.+ */+export function Resizer({+ direction,+ onResize,+ className = "",+}: {+ /** `vertical` = a vertical bar you drag left/right to size a side panel. */+ direction: "vertical" | "horizontal";+ /** Receives the pointer delta in pixels since the last event. */+ onResize: (delta: number) => void;+ className?: string;+}) {+ const last = useRef(0);++ const onPointerDown = useCallback((event: ReactPointerEvent<HTMLDivElement>) => {+ event.currentTarget.setPointerCapture(event.pointerId);+ last.current = direction === "vertical" ? event.clientX : event.clientY;+ }, [direction]);++ const onPointerMove = useCallback(+ (event: ReactPointerEvent<HTMLDivElement>) => {+ if (!event.currentTarget.hasPointerCapture(event.pointerId)) return;+ const position = direction === "vertical" ? event.clientX : event.clientY;+ onResize(position - last.current);+ last.current = position;+ },+ [direction, onResize],+ );++ const vertical = direction === "vertical";++ return (+ <div+ role="separator"+ aria-orientation={vertical ? "vertical" : "horizontal"}+ onPointerDown={onPointerDown}+ onPointerMove={onPointerMove}+ // The resizer *is* the gutter between two panels, which is why it has a+ // real size and no background: whatever this is set to becomes the gap,+ // on both axes, with nothing else to keep in step.+ className={`group relative shrink-0 ${+ vertical ? "w-2 cursor-col-resize" : "h-2 cursor-row-resize"+ } ${className}`}+ >+ {/* Nothing is drawn until you are on it. The panels either side already+ have their own edges; a third line between them is just noise. */}+ <span+ aria-hidden+ className={`absolute rounded-full bg-accent opacity-0 transition-opacity+ group-hover:opacity-100 group-active:opacity-100 ${+ vertical+ ? "inset-y-2 left-1/2 w-0.5 -translate-x-1/2"+ : "inset-x-2 top-1/2 h-0.5 -translate-y-1/2"+ }`}+ />+ </div>+ );+}diff --git a/desktop/src/components/RightPanel.tsx b/desktop/src/components/RightPanel.tsxnew file mode 100644index 00000000..e8dd5096--- /dev/null+++ b/desktop/src/components/RightPanel.tsx@@ -0,0 +1,73 @@+import type { Clip, MediaItem } from "../lib/project";+import { AdjustPanel } from "./AdjustPanel";+import { Icon } from "./Icon";+import { Inspector } from "./Inspector";+import { Empty, Panel } from "./Panel";++export type RightTab = "details" | "adjust" | "filters";++const TABS: { id: RightTab; label: string }[] = [+ { id: "details", label: "Details" },+ { id: "adjust", label: "Adjust" },+ { id: "filters", label: "Filters" },+];++/**+ * The right-hand panel.+ *+ * Details is what a thing *is*, Adjust is what you can change about it, and+ * Filters is what you can add to it. Keeping those apart matters because the+ * first is read-only and the other two are not, and mixing them makes it+ * unclear which numbers you are allowed to touch.+ */+export function RightPanel({+ tab,+ onTab,+ clip,+ media,+ frameRate,+ onChangeClip,+}: {+ tab: RightTab;+ onTab: (tab: RightTab) => void;+ clip: Clip | null;+ media: MediaItem | null;+ frameRate: number;+ onChangeClip: (patch: Partial<Clip>) => void;+}) {+ return (+ <Panel>+ <div className="sticky top-0 z-10 border-b border-hairline bg-panel px-2 pb-2 pt-2">+ <div className="flex rounded-lg bg-sunken p-0.5">+ {TABS.map((entry) => (+ <button+ key={entry.id}+ type="button"+ aria-pressed={tab === entry.id}+ onClick={() => onTab(entry.id)}+ className={`flex-1 cursor-pointer rounded-[6px] px-2 py-1 text-[12px] transition-colors ${+ tab === entry.id+ ? "bg-panel text-primary shadow-[0_1px_2px_rgba(0,0,0,0.14)]"+ : "text-secondary hover:text-primary"+ }`}+ >+ {entry.label}+ </button>+ ))}+ </div>+ </div>++ {tab === "details" && <Inspector clip={clip} media={media} frameRate={frameRate} />}+ {tab === "adjust" && <AdjustPanel clip={clip} onChange={onChangeClip} />}+ {tab === "filters" && (+ // Said plainly rather than dressed up with a disabled list of effects+ // that do not exist. Audio filters need the preview to run through Web+ // Audio so that what you hear matches what ffmpeg will render.+ <Empty icon={<Icon name="settings" size={26} strokeWidth={1.5} />}>+ No filters yet. Audio effects arrive once the preview runs through a real+ mixer rather than a media element.+ </Empty>+ )}+ </Panel>+ );+}diff --git a/desktop/src/components/StartScreen.tsx b/desktop/src/components/StartScreen.tsxnew file mode 100644index 00000000..f7b4ee75--- /dev/null+++ b/desktop/src/components/StartScreen.tsx@@ -0,0 +1,353 @@+import { useEffect, useState } from "react";+import type { ReactNode } from "react";+import { open } from "@tauri-apps/plugin-dialog";+import { desktopDir, join } from "@tauri-apps/api/path";++import {+ createProject,+ forgetProject,+ openProject,+ recentProjects,+ type ProjectInfo,+} from "../lib/engine";+import { relativeTime } from "../lib/time";+import { Icon } from "./Icon";++/** The settings a project is created with. Fixed for its lifetime, for now. */+export interface ProjectSession {+ name: string;+ /** Absolute path to the project folder on disk. */+ path: string;+ width: number;+ height: number;+ /** Frames per second as a decimal, for display. */+ frameRate: number;+ /** The same rate as an exact fraction. Export uses these, never the decimal. */+ rateNum: number;+ rateDen: number;+}++const RESOLUTIONS = [+ { label: "1080p", width: 1920, height: 1080 },+ { label: "720p", width: 1280, height: 720 },+ { label: "4K", width: 3840, height: 2160 },+ { label: "Vertical", width: 1080, height: 1920 },+] as const;++// Stored as fractions because 29.97 is 30000/1001 and never anything else.+const FRAME_RATES = [+ { label: "24", num: 24, den: 1 },+ { label: "25", num: 25, den: 1 },+ { label: "29.97", num: 30000, den: 1001 },+ { label: "30", num: 30, den: 1 },+ { label: "60", num: 60, den: 1 },+] as const;++/**+ * The launch screen.+ *+ * Full-bleed on the window's own background - no card, no border, no drop+ * shadow. A setup screen is not a dialog floating over something; it *is* the+ * window, and framing it as a card only adds an edge that means nothing.+ * Hierarchy comes from type size and whitespace instead.+ *+ * An editor should not drop you straight into an untitled timeline either: the+ * frame rate, size and location are decisions the whole edit depends on, and+ * choosing them after material is cut is how you end up conforming footage.+ */+export function StartScreen({ onCreate }: { onCreate: (session: ProjectSession) => void }) {+ const [name, setName] = useState("Untitled project");+ const [location, setLocation] = useState("");+ const [resolution, setResolution] = useState<(typeof RESOLUTIONS)[number]>(RESOLUTIONS[0]);+ const [rate, setRate] = useState<(typeof FRAME_RATES)[number]>(FRAME_RATES[3]);+ const [busy, setBusy] = useState(false);+ const [error, setError] = useState<string | null>(null);+ const [recents, setRecents] = useState<ProjectInfo[]>([]);++ // Default to Desktop/Relay. Failing to resolve it is not worth surfacing;+ // the field simply starts empty and Choose still works.+ useEffect(() => {+ void desktopDir()+ .then((desktop) => join(desktop, "Relay"))+ .then(setLocation)+ .catch(() => undefined);+ }, []);++ useEffect(() => {+ void recentProjects()+ .then(setRecents)+ .catch(() => undefined);+ }, []);++ const reopen = async (project: ProjectInfo) => {+ if (busy) return;+ setBusy(true);+ setError(null);+ try {+ // Re-read from disk rather than trusting the cached entry: the manifest+ // is the truth, and the folder may have been edited or moved since.+ const fresh = await openProject(project.path);+ onCreate(toSession(fresh));+ } catch (cause) {+ setError(String(cause));+ setBusy(false);+ }+ };++ const forget = async (project: ProjectInfo) => {+ setRecents((current) => current.filter((entry) => entry.path !== project.path));+ await forgetProject(project.path).catch(() => undefined);+ };++ const browse = async () => {+ const chosen = await open({+ directory: true,+ multiple: false,+ title: "Where should this project live?",+ defaultPath: location || undefined,+ });+ if (typeof chosen === "string") setLocation(chosen);+ };++ const create = async () => {+ const trimmed = name.trim() || "Untitled project";+ if (!location.trim() || busy) return;++ setBusy(true);+ setError(null);+ try {+ // The engine creates the folder and writes the manifest, and hands back+ // where it actually landed - which is not always `location/name`, since+ // the name has to be made filesystem-safe first.+ const project = await createProject({+ location: location.trim(),+ name: trimmed,+ width: resolution.width,+ height: resolution.height,+ rateNum: rate.num,+ rateDen: rate.den,+ });++ onCreate(toSession(project));+ } catch (cause) {+ setError(String(cause));+ } finally {+ setBusy(false);+ }+ };++ return (+ <div className="thin-scroll h-full overflow-y-auto bg-base">+ <div className="mx-auto flex min-h-full w-full max-w-xl flex-col justify-center px-8 py-16">+ <header className="mb-10">+ <h1 className="font-display text-[34px] font-semibold leading-tight tracking-[-0.03em] text-primary">+ New project+ </h1>+ <p className="mt-1.5 text-sm text-secondary">+ These settings apply to the whole edit and cannot be changed later.+ </p>+ </header>++ <Field label="Name">+ <input+ value={name}+ autoFocus+ spellCheck={false}+ onChange={(event) => setName(event.target.value)}+ onFocus={(event) => event.currentTarget.select()}+ onKeyDown={(event) => event.key === "Enter" && void create()}+ className="w-full bg-transparent py-1 text-[15px] text-primary outline-none+ placeholder:text-tertiary"+ />+ </Field>++ <Field label="Location">+ <div className="flex items-center gap-3">+ <input+ value={location}+ spellCheck={false}+ placeholder="Choose a folder"+ onChange={(event) => setLocation(event.target.value)}+ className="min-w-0 flex-1 bg-transparent py-1 font-technical text-[12px] text-primary+ outline-none placeholder:text-tertiary"+ />+ <button+ type="button"+ onClick={() => void browse()}+ className="shrink-0 cursor-pointer text-[13px] text-accent transition-opacity+ hover:opacity-70"+ >+ Choose...+ </button>+ </div>+ </Field>++ <Field label="Resolution">+ <Segmented+ options={RESOLUTIONS.map((option) => option.label)}+ value={resolution.label}+ onChange={(label) =>+ setResolution(RESOLUTIONS.find((option) => option.label === label) ?? RESOLUTIONS[0])+ }+ />+ <p className="mt-2 font-technical text-[11px] text-tertiary">+ {resolution.width} x {resolution.height}+ </p>+ </Field>++ <Field label="Frame rate" last>+ <Segmented+ options={FRAME_RATES.map((option) => option.label)}+ value={rate.label}+ onChange={(label) =>+ setRate(FRAME_RATES.find((option) => option.label === label) ?? FRAME_RATES[3])+ }+ />+ <p className="mt-2 font-technical text-[11px] text-tertiary">+ {rate.num}/{rate.den} fps+ </p>+ </Field>++ {error && (+ <p className="mt-6 text-[12px] leading-relaxed text-danger">{error}</p>+ )}++ <div className="mt-10 flex items-center gap-4">+ <button+ type="button"+ onClick={() => void create()}+ disabled={busy || !location.trim()}+ className="cursor-pointer rounded-full bg-accent px-6 py-2.5 text-[14px] font-medium+ text-on-accent transition-colors hover:bg-accent-hover+ disabled:cursor-not-allowed disabled:opacity-40"+ >+ {busy ? "Creating..." : "Create"}+ </button>+ <p className="flex items-center gap-1.5 text-[11px] text-tertiary">+ <Icon name="info" size={12} className="shrink-0" />+ The timeline is not saved to disk yet.+ </p>+ </div>++ {/* No empty state: a "Recent" heading over nothing is worse than no+ heading at all, so the section simply is not there until it has+ something to show. */}+ {recents.length > 0 && (+ <section className="mt-14 border-t border-hairline pt-7">+ <h2 className="mb-2 text-[13px] font-semibold text-secondary">Recent</h2>+ <ul className="-mx-3">+ {recents.map((project) => (+ <li key={project.path} className="group flex items-center gap-3 rounded-lg px-3+ transition-colors hover:bg-hover">+ <button+ type="button"+ title={project.path}+ disabled={busy}+ onClick={() => void reopen(project)}+ className="min-w-0 flex-1 cursor-pointer py-2.5 text-left+ disabled:cursor-not-allowed"+ >+ <span className="block truncate text-[14px] text-primary">{project.name}</span>+ <span className="block truncate font-technical text-[11px] text-tertiary">+ {project.width} x {project.height} ·{" "}+ {(project.rateNum / project.rateDen).toFixed(2)} fps+ </span>+ </button>++ <span className="shrink-0 text-[11px] text-tertiary">+ {relativeTime(project.openedAt)}+ </span>++ <button+ type="button"+ aria-label={`Remove ${project.name} from recents`}+ title="Remove from this list. The folder is left alone."+ onClick={() => void forget(project)}+ className="invisible shrink-0 cursor-pointer rounded p-1 text-tertiary+ transition-colors hover:bg-active hover:text-primary+ group-hover:visible"+ >+ <Icon name="close" size={12} />+ </button>+ </li>+ ))}+ </ul>+ </section>+ )}+ </div>+ </div>+ );+}++/** The decimal rate is derived, never stored - the fraction is the truth. */+function toSession(project: ProjectInfo): ProjectSession {+ return {+ name: project.name,+ path: project.path,+ width: project.width,+ height: project.height,+ frameRate: project.rateNum / project.rateDen,+ rateNum: project.rateNum,+ rateDen: project.rateDen,+ };+}++/** A labelled row separated by a hairline, in the style of a settings list. */+function Field({+ label,+ children,+ last = false,+}: {+ label: string;+ children: ReactNode;+ last?: boolean;+}) {+ return (+ <div+ className={`grid grid-cols-[7rem_minmax(0,1fr)] items-baseline gap-4 py-4 ${+ last ? "" : "border-b border-hairline"+ }`}+ >+ <span className="text-[13px] text-secondary">{label}</span>+ <div className="min-w-0">{children}</div>+ </div>+ );+}++/**+ * An Apple-style segmented control: one recessed track with a raised pill+ * marking the selection, rather than a row of separate buttons.+ */+function Segmented({+ options,+ value,+ onChange,+}: {+ options: readonly string[];+ value: string;+ onChange: (value: string) => void;+}) {+ return (+ <div+ role="radiogroup"+ className="inline-flex rounded-lg bg-sunken p-0.5"+ >+ {options.map((option) => (+ <button+ key={option}+ type="button"+ role="radio"+ aria-checked={option === value}+ onClick={() => onChange(option)}+ className={`cursor-pointer rounded-[6px] px-3.5 py-1 text-[13px] transition-colors ${+ option === value+ ? "bg-panel text-primary shadow-[0_1px_2px_rgba(0,0,0,0.14)]"+ : "text-secondary hover:text-primary"+ }`}+ >+ {option}+ </button>+ ))}+ </div>+ );+}diff --git a/desktop/src/components/Timeline.tsx b/desktop/src/components/Timeline.tsxnew file mode 100644index 00000000..b7e284ae--- /dev/null+++ b/desktop/src/components/Timeline.tsx@@ -0,0 +1,261 @@+import { useCallback, useEffect, useRef } from "react";+import type { PointerEvent as ReactPointerEvent } from "react";++import { timecode } from "../lib/time";++/**+ * The timeline, drawn on a canvas.+ *+ * Deliberately not made of DOM nodes. A real edit has thousands of clips,+ * keyframes and waveform segments, and scrubbing repaints all of them sixty+ * times a second. React reconciliation cannot keep up with that and neither can+ * the compositor. One canvas and one draw call per frame can.+ *+ * See docs/decisions/0002-the-hot-surfaces-are-not-the-dom.md.+ */++export interface TimelineClip {+ id: string;+ track: number;+ /** Seconds from the start of the timeline. */+ start: number;+ duration: number;+ label: string;+ kind: "video" | "audio";+}++interface TimelineProps {+ clips: TimelineClip[];+ trackCount: number;+ playhead: number;+ /** Seconds of timeline per horizontal pixel of canvas. */+ secondsPerPixel: number;+ frameRate: number;+ onScrub: (seconds: number) => void;+}++const RULER_HEIGHT = 28;+const TRACK_HEIGHT = 56;++const COLORS = {+ background: "#0d0f13",+ ruler: "#14171d",+ trackEven: "#101319",+ trackOdd: "#0d1015",+ gridMinor: "#1b1f27",+ gridMajor: "#2b3240",+ text: "#9aa2b1",+ clipVideo: "#2b5f8f",+ clipAudio: "#2f7a5c",+ clipEdge: "#4f8cff",+ clipText: "#e8eaef",+ playhead: "#ff4f6d",+};++export function Timeline({+ clips,+ trackCount,+ playhead,+ secondsPerPixel,+ frameRate,+ onScrub,+}: TimelineProps) {+ const canvasRef = useRef<HTMLCanvasElement>(null);+ // The draw function reads the latest props through a ref so that the rAF loop+ // never has to be torn down and rebuilt when a prop changes.+ const props = useRef({ clips, trackCount, playhead, secondsPerPixel, frameRate });+ props.current = { clips, trackCount, playhead, secondsPerPixel, frameRate };++ const draw = useCallback(() => {+ const canvas = canvasRef.current;+ const context = canvas?.getContext("2d", { alpha: false });+ if (!canvas || !context) return;++ const { clips, trackCount, playhead, secondsPerPixel, frameRate } = props.current;++ // Match the backing store to the device pixel ratio, or everything is+ // blurry on a scaled display and text looks like mud.+ const ratio = window.devicePixelRatio || 1;+ const width = canvas.clientWidth;+ const height = canvas.clientHeight;+ if (canvas.width !== width * ratio || canvas.height !== height * ratio) {+ canvas.width = Math.max(1, Math.round(width * ratio));+ canvas.height = Math.max(1, Math.round(height * ratio));+ }+ context.setTransform(ratio, 0, 0, ratio, 0, 0);++ context.fillStyle = COLORS.background;+ context.fillRect(0, 0, width, height);++ drawTrackBands(context, width, height, trackCount);+ drawRuler(context, width, secondsPerPixel, frameRate);+ drawGrid(context, width, height, secondsPerPixel);++ for (const clip of clips) {+ drawClip(context, clip, secondsPerPixel);+ }++ drawPlayhead(context, height, playhead / secondsPerPixel);+ }, []);++ useEffect(() => {+ let frame = 0;+ // One rAF loop, started once. Repainting on a timer rather than on every+ // state change keeps scrubbing smooth and coalesces bursts of updates.+ const tick = () => {+ draw();+ frame = requestAnimationFrame(tick);+ };+ frame = requestAnimationFrame(tick);++ const canvas = canvasRef.current;+ const observer = new ResizeObserver(() => draw());+ if (canvas) observer.observe(canvas);++ return () => {+ cancelAnimationFrame(frame);+ observer.disconnect();+ };+ }, [draw]);++ const scrubTo = (event: ReactPointerEvent<HTMLCanvasElement>) => {+ const bounds = event.currentTarget.getBoundingClientRect();+ onScrub(Math.max(0, (event.clientX - bounds.left) * props.current.secondsPerPixel));+ };++ return (+ <canvas+ ref={canvasRef}+ className="h-full w-full cursor-text"+ onPointerDown={(event) => {+ event.currentTarget.setPointerCapture(event.pointerId);+ scrubTo(event);+ }}+ onPointerMove={(event) => {+ if (event.buttons === 1) scrubTo(event);+ }}+ />+ );+}++function drawTrackBands(+ context: CanvasRenderingContext2D,+ width: number,+ height: number,+ trackCount: number,+) {+ for (let track = 0; track < trackCount; track += 1) {+ const y = RULER_HEIGHT + track * TRACK_HEIGHT;+ if (y > height) break;+ context.fillStyle = track % 2 === 0 ? COLORS.trackEven : COLORS.trackOdd;+ context.fillRect(0, y, width, TRACK_HEIGHT);+ }+}++/** Chooses a tick spacing that stays readable at any zoom. */+function tickInterval(secondsPerPixel: number): number {+ const candidates = [1 / 30, 0.1, 0.5, 1, 2, 5, 10, 30, 60, 300, 600, 1800];+ const minimumPixels = 80;+ return (+ candidates.find((seconds) => seconds / secondsPerPixel >= minimumPixels) ??+ candidates[candidates.length - 1]+ );+}++function drawRuler(+ context: CanvasRenderingContext2D,+ width: number,+ secondsPerPixel: number,+ frameRate: number,+) {+ context.fillStyle = COLORS.ruler;+ context.fillRect(0, 0, width, RULER_HEIGHT);+ context.strokeStyle = COLORS.gridMajor;+ context.beginPath();+ context.moveTo(0, RULER_HEIGHT - 0.5);+ context.lineTo(width, RULER_HEIGHT - 0.5);+ context.stroke();++ const interval = tickInterval(secondsPerPixel);+ context.fillStyle = COLORS.text;+ context.font = "10px ui-monospace, monospace";+ context.textBaseline = "middle";++ for (let seconds = 0; seconds / secondsPerPixel < width; seconds += interval) {+ const x = Math.round(seconds / secondsPerPixel) + 0.5;+ context.strokeStyle = COLORS.gridMajor;+ context.beginPath();+ context.moveTo(x, RULER_HEIGHT - 8);+ context.lineTo(x, RULER_HEIGHT);+ context.stroke();+ context.fillText(timecode(seconds, frameRate), x + 4, RULER_HEIGHT / 2 - 2);+ }+}++function drawGrid(+ context: CanvasRenderingContext2D,+ width: number,+ height: number,+ secondsPerPixel: number,+) {+ const interval = tickInterval(secondsPerPixel);+ context.strokeStyle = COLORS.gridMinor;+ context.beginPath();+ for (let seconds = 0; seconds / secondsPerPixel < width; seconds += interval) {+ const x = Math.round(seconds / secondsPerPixel) + 0.5;+ context.moveTo(x, RULER_HEIGHT);+ context.lineTo(x, height);+ }+ context.stroke();+}++function drawClip(+ context: CanvasRenderingContext2D,+ clip: TimelineClip,+ secondsPerPixel: number,+) {+ const x = clip.start / secondsPerPixel;+ const clipWidth = Math.max(2, clip.duration / secondsPerPixel);+ const y = RULER_HEIGHT + clip.track * TRACK_HEIGHT + 4;+ const clipHeight = TRACK_HEIGHT - 8;++ context.fillStyle = clip.kind === "video" ? COLORS.clipVideo : COLORS.clipAudio;+ context.beginPath();+ context.roundRect(x, y, clipWidth, clipHeight, 4);+ context.fill();++ context.strokeStyle = COLORS.clipEdge;+ context.lineWidth = 1;+ context.stroke();++ // Only bother with a label if it will not immediately be clipped away.+ if (clipWidth > 44) {+ context.save();+ context.beginPath();+ context.rect(x, y, clipWidth - 6, clipHeight);+ context.clip();+ context.fillStyle = COLORS.clipText;+ context.font = "11px ui-sans-serif, system-ui, sans-serif";+ context.textBaseline = "top";+ context.fillText(clip.label, x + 6, y + 6);+ context.restore();+ }+}++function drawPlayhead(context: CanvasRenderingContext2D, height: number, x: number) {+ const position = Math.round(x) + 0.5;+ context.strokeStyle = COLORS.playhead;+ context.lineWidth = 1;+ context.beginPath();+ context.moveTo(position, 0);+ context.lineTo(position, height);+ context.stroke();++ context.fillStyle = COLORS.playhead;+ context.beginPath();+ context.moveTo(position - 5, 0);+ context.lineTo(position + 5, 0);+ context.lineTo(position, 8);+ context.closePath();+ context.fill();+}diff --git a/desktop/src/components/TimelinePanel.tsx b/desktop/src/components/TimelinePanel.tsxnew file mode 100644index 00000000..ec0b8245--- /dev/null+++ b/desktop/src/components/TimelinePanel.tsx@@ -0,0 +1,1226 @@+import { useCallback, useEffect, useRef, useState } from "react";+import type {+ PointerEvent as ReactPointerEvent,+ WheelEvent as ReactWheelEvent,+} from "react";++import type { MediaAssets, Peaks } from "../lib/assets";+import { themeColor, type Theme } from "../lib/theme";+import type { Clip, ClipMove, Project, Track } from "../lib/project";+import { snapTime } from "../lib/project";+import { timecode } from "../lib/time";+import { Icon, IconButton } from "./Icon";+import { Bar, Divider, PANEL_SHELL, Spacer } from "./Panel";++export type Tool = "select" | "razor";++/** Geometry shared by the renderer and the hit tester, so they cannot disagree. */+const RULER_HEIGHT = 28;+/** Tall enough that a filmstrip frame and a waveform are both readable. */+const TRACK_HEIGHT = 64;+/** Marks the canvas so a drag in flight can find it. See `resolveDrop`. */+const CANVAS_MARKER = "data-relay-timeline";+const HEADER_WIDTH = 164;+/** How close to a clip edge the pointer must be to grab it, in pixels. */+const EDGE_GRAB = 6;+/** How near the canvas edge a drag starts pulling the view along, in pixels. */+const EDGE_MARGIN = 56;+/** Top auto-scroll speed. Roughly 4.5 viewport-widths per second at 900px. */+const EDGE_MAX_PIXELS_PER_FRAME = 24;+/** Where the playhead is parked when playback scrolls the view, 0..1. */+const FOLLOW_ANCHOR = 0.1;++/**+ * The canvas palette.+ *+ * Mutable, and deliberately so. Canvas cannot resolve `var(--color-x)` - it+ * needs a concrete colour string - so these are copied out of the stylesheet+ * whenever the theme changes and read straight from here by the draw loop.+ * The initial values are only what shows for the one frame before the first+ * refresh lands.+ */+const COLORS = {+ background: "#0d0d10",+ ruler: "#131316",+ trackOdd: "#0a0a0d",+ trackEven: "#0d0d10",+ hairline: "rgba(255,255,255,0.1)",+ tickMajor: "rgba(255,255,255,0.2)",+ text: "#6e6e73",+ clipSelected: "#0a84ff",+ clipText: "#ffffff",+ playhead: "#ff453a",+ dropZone: "rgba(10,132,255,0.18)",+};++/** Re-reads the canvas palette from the stylesheet. Cheap; call on theme change. */+function refreshCanvasPalette(): void {+ COLORS.background = themeColor("timeline", COLORS.background);+ COLORS.ruler = themeColor("ruler", COLORS.ruler);+ COLORS.trackEven = themeColor("timeline", COLORS.trackEven);+ COLORS.trackOdd = themeColor("timeline-alt", COLORS.trackOdd);+ COLORS.hairline = themeColor("hairline", COLORS.hairline);+ COLORS.tickMajor = themeColor("hairline-strong", COLORS.tickMajor);+ COLORS.text = themeColor("secondary", COLORS.text);+ COLORS.clipSelected = themeColor("accent", COLORS.clipSelected);+ COLORS.clipText = themeColor("on-accent", COLORS.clipText);+ COLORS.playhead = themeColor("playhead", COLORS.playhead);+ COLORS.dropZone = themeColor("accent-soft", COLORS.dropZone);++ PALETTE.video.header = themeColor("clip-video", PALETTE.video.header);+ PALETTE.video.body = themeColor("clip-video-body", PALETTE.video.body);+ PALETTE.video.edge = PALETTE.video.header;+ PALETTE.audio.header = themeColor("clip-audio", PALETTE.audio.header);+ PALETTE.audio.body = themeColor("clip-audio-body", PALETTE.audio.body);+ PALETTE.audio.edge = PALETTE.audio.header;+ PALETTE.audio.wave = themeColor("clip-wave", PALETTE.audio.wave);+ PALETTE.image.header = themeColor("clip-image", PALETTE.image.header);+ PALETTE.image.body = themeColor("clip-image-body", PALETTE.image.body);+ PALETTE.image.edge = PALETTE.image.header;+}++/** Where one clip sat when a move began, so the whole set moves rigidly. */+interface MoveOrigin {+ clipId: string;+ start: number;+ row: number;+}++type DragState =+ | { kind: "scrub" }+ | {+ kind: "marquee";+ /** Canvas-relative, so the band survives the view scrolling under it. */+ originX: number;+ originY: number;+ x: number;+ y: number;+ /** Shift held: add to the existing selection rather than replacing it. */+ additive: boolean;+ basis: readonly string[];+ }+ | {+ kind: "move";+ /** The clip actually grabbed; it is the one that snaps. */+ primary: string;+ /** Seconds between that clip's start and where it was grabbed. */+ grab: number;+ originRow: number;+ origins: MoveOrigin[];+ }+ | { kind: "trimStart" | "trimEnd"; clipId: string };++export function TimelinePanel({+ project,+ playhead,+ playing,+ frameRate,+ tool,+ snap,+ selectedClipIds,+ secondsPerPixel,+ scrollLeft,+ trackScroll,+ assets,+ theme,+ onToolChange,+ onSnapChange,+ onScrub,+ onSelectClips,+ onMoveClips,+ onTrimClip,+ onSplitAtPlayhead,+ onDeleteSelected,+ mediaDrag,+ onZoom,+ onScroll,+ onTrackScroll,+ onFit,+ onTrackFlag,+ onAddTrack,+ onRemoveTrack,+ onRenameTrack,+ onClipContextMenu,+}: {+ project: Project;+ playhead: number;+ /** Drives the view following the playhead during playback. */+ playing: boolean;+ frameRate: number;+ tool: Tool;+ snap: boolean;+ selectedClipIds: readonly string[];+ secondsPerPixel: number;+ scrollLeft: number;+ /** Vertical offset into the track stack, in pixels. */+ trackScroll: number;+ /** Waveform and filmstrip cache, read live from inside the draw loop. */+ assets: MediaAssets;+ /** Only used to know when to re-read the canvas palette. */+ theme: Theme;+ onToolChange: (tool: Tool) => void;+ onSnapChange: (snap: boolean) => void;+ onScrub: (seconds: number) => void;+ onSelectClips: (clipIds: string[]) => void;+ onMoveClips: (moves: ClipMove[]) => void;+ onTrimClip: (clipId: string, edge: "start" | "end", delta: number) => void;+ onSplitAtPlayhead: () => void;+ onDeleteSelected: () => void;+ /** A bin item currently being dragged, in client coordinates. */+ mediaDrag: { x: number; y: number } | null;+ onZoom: (factor: number, anchorSeconds?: number) => void;+ onScroll: (seconds: number) => void;+ onTrackScroll: (pixels: number) => void;+ /** Receives the canvas width, which is the only place that knows it. */+ onFit: (canvasWidth: number) => void;+ onTrackFlag: (trackId: string, flag: "visible" | "muted", value: boolean) => void;+ onAddTrack: () => void;+ onRemoveTrack: (trackId: string) => void;+ onRenameTrack: (trackId: string, name: string) => void;+ onClipContextMenu: (clipId: string, x: number, y: number) => void;+}) {+ const canvasRef = useRef<HTMLCanvasElement>(null);+ const drag = useRef<DragState | null>(null);+ /** Last pointer position, replayed by the edge-scroll loop. */+ const pointer = useRef<{ x: number; y: number } | null>(null);+ /** Auto-scroll speed in pixels per frame; zero when not near an edge. */+ const edgeSpeed = useRef(0);+ /** Latest drag applier and scroll callback, for the frame loop to reach. */+ const applyDragRef = useRef<(clientX: number, clientY: number) => void>(() => {});+ const scrollRef = useRef(onScroll);+ scrollRef.current = onScroll;+ /** The header column, kept in step with the canvas's vertical offset. */+ const headerScroll = useRef<HTMLDivElement>(null);+ // Top-most track first on screen; the model stores them bottom-most first to+ // match the engine's compositing order.+ const rows: Track[] = [...project.tracks].reverse();++ // Which lane a dragged bin item would land on. Tracks are untyped, so any+ // lane under the pointer is a valid target.+ const dropTrack = (() => {+ if (!mediaDrag) return null;+ const canvas = canvasRef.current;+ if (!canvas) return null;+ const bounds = canvas.getBoundingClientRect();+ if (mediaDrag.x < bounds.left || mediaDrag.x > bounds.right) return null;+ const offsetY = mediaDrag.y - bounds.top - RULER_HEIGHT;+ if (offsetY < 0) return null;+ return rows[Math.floor((offsetY + trackScroll) / TRACK_HEIGHT)]?.id ?? null;+ })();++ // Set membership is checked once per visible clip per frame; an array scan+ // would be O(clips x selection).+ const selected = new Set(selectedClipIds);++ // The draw loop reads everything through this ref, so a prop change never+ // tears down and rebuilds the loop.+ const view = useRef({ project, playhead, playing, secondsPerPixel, scrollLeft, trackScroll, frameRate, selected, rows, dropTrack, assets });+ view.current = { project, playhead, playing, secondsPerPixel, scrollLeft, trackScroll, frameRate, selected, rows, dropTrack, assets };++ const timeAt = useCallback(+ (clientX: number) => {+ const canvas = canvasRef.current;+ if (!canvas) return 0;+ const bounds = canvas.getBoundingClientRect();+ return Math.max(0, (clientX - bounds.left) * view.current.secondsPerPixel + view.current.scrollLeft);+ },+ [],+ );++ const rowAt = useCallback((clientY: number) => {+ const canvas = canvasRef.current;+ if (!canvas) return null;+ const bounds = canvas.getBoundingClientRect();+ const y = clientY - bounds.top - RULER_HEIGHT;+ if (y < 0) return null;+ const index = Math.floor((y + view.current.trackScroll) / TRACK_HEIGHT);+ return view.current.rows[index] ?? null;+ }, []);++ const clipAt = useCallback(+ (clientX: number, clientY: number): { clip: Clip; edge: "start" | "end" | null } | null => {+ const track = rowAt(clientY);+ if (!track) return null;+ const time = timeAt(clientX);+ const { project, secondsPerPixel } = view.current;++ // Later clips draw on top, so search back to front.+ for (let index = project.clips.length - 1; index >= 0; index -= 1) {+ const clip = project.clips[index];+ if (clip.trackId !== track.id) continue;+ if (time < clip.start || time > clip.start + clip.duration) continue;++ const grabSeconds = EDGE_GRAB * secondsPerPixel;+ const edge =+ time - clip.start < grabSeconds+ ? "start"+ : clip.start + clip.duration - time < grabSeconds+ ? "end"+ : null;+ return { clip, edge };+ }+ return null;+ },+ [rowAt, timeAt],+ );++ // ── drawing ──────────────────────────────────────────────────────────────+ const draw = useCallback(() => {+ const canvas = canvasRef.current;+ const context = canvas?.getContext("2d", { alpha: false });+ if (!canvas || !context) return;++ const state = view.current;+ const ratio = window.devicePixelRatio || 1;+ const width = canvas.clientWidth;+ const height = canvas.clientHeight;+ if (canvas.width !== Math.round(width * ratio) || canvas.height !== Math.round(height * ratio)) {+ canvas.width = Math.max(1, Math.round(width * ratio));+ canvas.height = Math.max(1, Math.round(height * ratio));+ }+ context.setTransform(ratio, 0, 0, ratio, 0, 0);++ // Keeping the playhead reachable, once per frame.+ //+ // Two cases, and dragging wins: while a drag is pulling at an edge the+ // view travels with it and the drag is replayed at the new scroll offset,+ // so the playhead stays glued to the pointer. Otherwise, during playback,+ // the view pages along whenever the playhead leaves the visible span.+ const span = width * state.secondsPerPixel;+ if (drag.current && edgeSpeed.current !== 0 && pointer.current) {+ scrollRef.current(Math.max(0, state.scrollLeft + edgeSpeed.current * state.secondsPerPixel));+ applyDragRef.current(pointer.current.x, pointer.current.y);+ } else if (+ state.playing &&+ (state.playhead < state.scrollLeft || state.playhead > state.scrollLeft + span)+ ) {+ scrollRef.current(Math.max(0, state.playhead - span * FOLLOW_ANCHOR));+ }++ const toX = (seconds: number) => (seconds - state.scrollLeft) / state.secondsPerPixel;++ context.fillStyle = COLORS.background;+ context.fillRect(0, 0, width, height);++ // Track bands.+ state.rows.forEach((track, index) => {+ const y = RULER_HEIGHT + index * TRACK_HEIGHT - state.trackScroll;+ context.fillStyle = index % 2 === 0 ? COLORS.trackEven : COLORS.trackOdd;+ context.fillRect(0, y, width, TRACK_HEIGHT);++ if (state.dropTrack === track.id) {+ context.fillStyle = COLORS.dropZone;+ context.fillRect(0, y, width, TRACK_HEIGHT);+ }++ context.strokeStyle = COLORS.hairline;+ context.beginPath();+ context.moveTo(0, y + TRACK_HEIGHT - 0.5);+ context.lineTo(width, y + TRACK_HEIGHT - 0.5);+ context.stroke();+ });++ drawRuler(context, width, state.scrollLeft, state.secondsPerPixel, state.frameRate);++ // Grid lines dropping out of the ruler.+ const interval = tickInterval(state.secondsPerPixel);+ context.strokeStyle = COLORS.hairline;+ context.beginPath();+ for (+ let seconds = Math.ceil(state.scrollLeft / interval) * interval;+ toX(seconds) < width;+ seconds += interval+ ) {+ const x = Math.round(toX(seconds)) + 0.5;+ context.moveTo(x, RULER_HEIGHT);+ context.lineTo(x, height);+ }+ context.stroke();++ // Clips and the selection band are confined to the lane area: scrolled far+ // enough, a clip would otherwise paint straight over the ruler.+ context.save();+ context.beginPath();+ context.rect(0, RULER_HEIGHT, width, Math.max(0, height - RULER_HEIGHT));+ context.clip();++ for (const clip of state.project.clips) {+ const rowIndex = state.rows.findIndex((track) => track.id === clip.trackId);+ if (rowIndex < 0) continue;++ const x = toX(clip.start);+ const clipWidth = clip.duration / state.secondsPerPixel;+ if (x + clipWidth < 0 || x > width) continue;++ drawClip(+ context,+ clip,+ x,+ RULER_HEIGHT + rowIndex * TRACK_HEIGHT - state.trackScroll,+ clipWidth,+ state.selected.has(clip.id),+ state.assets,+ state.secondsPerPixel,+ );+ }++ // The selection band, drawn over the clips it is catching.+ if (drag.current?.kind === "marquee") {+ const band = normalise(drag.current);+ context.fillStyle = "rgba(59,130,246,0.15)";+ context.fillRect(band.x, band.y, band.width, band.height);+ context.strokeStyle = "rgba(59,130,246,0.8)";+ context.lineWidth = 1;+ context.strokeRect(+ Math.round(band.x) + 0.5,+ Math.round(band.y) + 0.5,+ Math.round(band.width),+ Math.round(band.height),+ );+ }++ context.restore();++ drawPlayhead(context, height, toX(state.playhead));+ }, []);++ // Scrolling the canvas moves the headers. Guarded, because assigning+ // scrollTop fires onScroll again and the two would chase each other.+ useEffect(() => {+ const element = headerScroll.current;+ if (element && Math.abs(element.scrollTop - trackScroll) > 0.5) {+ element.scrollTop = trackScroll;+ }+ }, [trackScroll]);++ // The stylesheet has already been applied by the time this runs, so the+ // computed values it reads are the new theme's.+ useEffect(() => {+ refreshCanvasPalette();+ }, [theme]);++ useEffect(() => {+ let frame = 0;+ const tick = () => {+ draw();+ frame = requestAnimationFrame(tick);+ };+ frame = requestAnimationFrame(tick);++ const canvas = canvasRef.current;+ const observer = new ResizeObserver(() => draw());+ if (canvas) observer.observe(canvas);++ return () => {+ cancelAnimationFrame(frame);+ observer.disconnect();+ };+ }, [draw]);++ // ── pointer interaction ──────────────────────────────────────────────────+ const onPointerDown = (event: ReactPointerEvent<HTMLCanvasElement>) => {+ if (event.button === 2) return; // handled by onContextMenu++ const canvas = event.currentTarget;+ const bounds = canvas.getBoundingClientRect();+ const overRuler = event.clientY - bounds.top < RULER_HEIGHT;+ const hit = overRuler ? null : clipAt(event.clientX, event.clientY);++ canvas.setPointerCapture(event.pointerId);++ // The ruler is the scrub strip. Dragging in the track area draws a+ // selection band instead, which is the convention every NLE shares and the+ // only way marquee select and scrubbing can coexist on one surface.+ if (overRuler) {+ drag.current = { kind: "scrub" };+ onScrub(timeAt(event.clientX));+ return;+ }++ if (hit && tool === "razor") {+ // The razor cuts where you click, not where the playhead is.+ onSelectClips([hit.clip.id]);+ onScrub(timeAt(event.clientX));+ window.setTimeout(onSplitAtPlayhead, 0);+ return;+ }++ if (hit) {+ const alreadySelected = selectedClipIds.includes(hit.clip.id);++ // Shift toggles. Otherwise grabbing a clip that is already part of the+ // selection keeps the whole set - so a multi-clip drag does not collapse+ // to one clip the instant you touch it.+ const next = event.shiftKey+ ? alreadySelected+ ? selectedClipIds.filter((id) => id !== hit.clip.id)+ : [...selectedClipIds, hit.clip.id]+ : alreadySelected+ ? [...selectedClipIds]+ : [hit.clip.id];++ onSelectClips(next);++ if (hit.edge && next.length <= 1) {+ drag.current = {+ kind: hit.edge === "start" ? "trimStart" : "trimEnd",+ clipId: hit.clip.id,+ };+ return;+ }++ const moving = next.includes(hit.clip.id) ? next : [hit.clip.id];+ const originRow = rows.findIndex((track) => track.id === hit.clip.trackId);++ drag.current = {+ kind: "move",+ primary: hit.clip.id,+ grab: timeAt(event.clientX) - hit.clip.start,+ originRow,+ origins: moving.flatMap((clipId) => {+ const clip = project.clips.find((candidate) => candidate.id === clipId);+ if (!clip) return [];+ return [+ {+ clipId,+ start: clip.start,+ row: rows.findIndex((track) => track.id === clip.trackId),+ },+ ];+ }),+ };+ return;+ }++ // Empty track area: start a band.+ drag.current = {+ kind: "marquee",+ originX: event.clientX - bounds.left,+ originY: event.clientY - bounds.top,+ x: event.clientX - bounds.left,+ y: event.clientY - bounds.top,+ additive: event.shiftKey,+ basis: event.shiftKey ? [...selectedClipIds] : [],+ };+ if (!event.shiftKey) onSelectClips([]);+ };++ /**+ * Applies whatever drag is in flight at these client coordinates.+ *+ * Split out from the pointer handler because the edge-scroll loop replays it+ * every frame from the last known pointer position - the pointer has stopped+ * moving at the window edge, but the timeline underneath it has not.+ */+ const applyDrag = (clientX: number, clientY: number) => {+ const state = drag.current;+ if (!state) return;++ const time = timeAt(clientX);++ if (state.kind === "scrub") {+ onScrub(time);+ return;+ }++ if (state.kind === "marquee") {+ const canvas = canvasRef.current;+ if (!canvas) return;+ const bounds = canvas.getBoundingClientRect();+ state.x = clientX - bounds.left;+ state.y = clientY - bounds.top;+ return;+ }++ if (state.kind === "move") {+ const primary = project.clips.find((candidate) => candidate.id === state.primary);+ const anchor = state.origins.find((origin) => origin.clipId === state.primary);+ if (!primary || !anchor) return;++ // Only the grabbed clip snaps; everything else keeps its offset from it,+ // so the shape of a multi-clip selection is preserved exactly.+ const raw = time - state.grab;+ const snapped = snap+ ? snapTime(project, raw, {+ threshold: 8 * secondsPerPixel,+ playhead,+ exclude: primary.id,+ })+ : raw;++ const deltaTime = snapped - anchor.start;+ const currentRow = rowAt(clientY)+ ? rows.findIndex((track) => track.id === rowAt(clientY)?.id)+ : anchor.row;+ const deltaRow = currentRow - state.originRow;++ onMoveClips(+ state.origins.flatMap((origin) => {+ const row = Math.min(rows.length - 1, Math.max(0, origin.row + deltaRow));+ const track = rows[row];+ if (!track) return [];+ return [+ { clipId: origin.clipId, start: Math.max(0, origin.start + deltaTime), trackId: track.id },+ ];+ }),+ );+ return;+ }++ const clip = project.clips.find((candidate) => candidate.id === state.clipId);+ if (!clip) return;+ if (state.kind === "trimStart") onTrimClip(clip.id, "start", time - clip.start);+ if (state.kind === "trimEnd") onTrimClip(clip.id, "end", time - (clip.start + clip.duration));+ };+ applyDragRef.current = applyDrag;++ const onPointerMove = (event: ReactPointerEvent<HTMLCanvasElement>) => {+ const canvas = event.currentTarget;+ pointer.current = { x: event.clientX, y: event.clientY };++ if (!drag.current) {+ edgeSpeed.current = 0;+ // Cursor feedback: the edges are grabbable, the body is draggable.+ const hit = clipAt(event.clientX, event.clientY);+ canvas.style.cursor =+ tool === "razor" && hit+ ? "crosshair"+ : hit?.edge+ ? "ew-resize"+ : hit+ ? "grab"+ : "text";+ return;+ }++ // Drag the playhead (or a clip) toward either edge and the view starts+ // travelling with it, so it cannot be parked somewhere off-screen and+ // lost. Speed ramps with how far past the margin the pointer is.+ const bounds = canvas.getBoundingClientRect();+ const past =+ event.clientX < bounds.left + EDGE_MARGIN+ ? event.clientX - (bounds.left + EDGE_MARGIN)+ : event.clientX > bounds.right - EDGE_MARGIN+ ? event.clientX - (bounds.right - EDGE_MARGIN)+ : 0;++ edgeSpeed.current =+ Math.sign(past) * Math.min(Math.abs(past) / EDGE_MARGIN, 1) * EDGE_MAX_PIXELS_PER_FRAME;++ applyDrag(event.clientX, event.clientY);+ };++ const endDrag = (event: ReactPointerEvent<HTMLCanvasElement>) => {+ if (event.currentTarget.hasPointerCapture(event.pointerId)) {+ event.currentTarget.releasePointerCapture(event.pointerId);+ }++ const state = drag.current;+ if (state?.kind === "marquee") {+ // Commit on release rather than live: selecting as the band sweeps looks+ // busy and makes a mistaken sweep hard to back out of.+ const band = normalise(state);+ const caught = project.clips.filter((clip) => {+ const rect = clipRect(clip, rows, secondsPerPixel, scrollLeft, trackScroll);+ return rect !== null && intersects(band, rect);+ });++ const ids = caught.map((clip) => clip.id);+ onSelectClips(state.additive ? [...new Set([...state.basis, ...ids])] : ids);+ }++ drag.current = null;+ edgeSpeed.current = 0;+ };++ const onWheel = (event: ReactWheelEvent<HTMLCanvasElement>) => {+ if (event.ctrlKey || event.metaKey) {+ onZoom(event.deltaY > 0 ? 1.15 : 1 / 1.15, timeAt(event.clientX));+ return;+ }++ // A trackpad's horizontal axis always pans time. Shift does the same for a+ // wheel, which has no horizontal axis of its own. Everything else scrolls+ // the track stack, which is what a plain wheel means in every other list.+ if (event.deltaX !== 0 || event.shiftKey) {+ const delta = (event.deltaX !== 0 ? event.deltaX : event.deltaY) * secondsPerPixel;+ onScroll(Math.max(0, scrollLeft + delta));+ return;+ }++ onTrackScroll(clampTrackScroll(trackScroll + event.deltaY, rows.length, canvasRef.current));+ };++ return (+ <div className={PANEL_SHELL}>+ <Bar>+ <IconButton+ icon="select"+ label="Select tool (V)"+ active={tool === "select"}+ onClick={() => onToolChange("select")}+ />+ <IconButton+ icon="razor"+ label="Razor tool (C)"+ active={tool === "razor"}+ onClick={() => onToolChange("razor")}+ />+ <Divider />+ <IconButton icon="minus" label="Split at playhead (S)" onClick={onSplitAtPlayhead} />+ <IconButton+ icon="trash"+ label={+ selectedClipIds.length > 1+ ? `Delete ${selectedClipIds.length} clips (Del)`+ : "Delete selected (Del)"+ }+ tone="danger"+ disabled={selectedClipIds.length === 0}+ onClick={onDeleteSelected}+ />+ {selectedClipIds.length > 1 && (+ <span className="px-1 font-technical text-[10px] text-accent">+ {selectedClipIds.length}+ </span>+ )}+ <Divider />+ <IconButton+ icon="magnet"+ label="Snapping (N)"+ active={snap}+ onClick={() => onSnapChange(!snap)}+ />+ <Divider />+ <IconButton icon="plus" label="Add track" onClick={onAddTrack} />++ <Spacer />++ {/* Fixed width for the same reason: without it the zoom controls to+ its right shuffle every time the frame digits change. */}+ <span className="w-30 px-2 text-right font-mono text-[10px] tabular-nums text-tertiary">+ {timecode(playhead, frameRate)}+ </span>+ <Divider />+ <IconButton+ icon="fit"+ label="Fit to window (F)"+ onClick={() => onFit(canvasRef.current?.clientWidth ?? 0)}+ />+ <IconButton icon="minus" label="Zoom out" size={7} onClick={() => onZoom(1.4)} />+ <IconButton icon="plus" label="Zoom in" size={7} onClick={() => onZoom(1 / 1.4)} />+ </Bar>++ <div className="flex min-h-0 flex-1">+ <div+ className="flex shrink-0 flex-col border-r border-hairline"+ style={{ width: HEADER_WIDTH }}+ >+ {/* Sits opposite the ruler and does not scroll with the lanes. */}+ <div className="shrink-0 border-b border-hairline" style={{ height: RULER_HEIGHT }} />++ {/*+ The headers are a real scroll container, so the native scrollbar and+ trackpad both drive the track stack. Its offset is pushed up to the+ canvas rather than the two keeping separate positions - one source+ of truth is the only way the lanes and their labels stay aligned.+ */}+ <div+ ref={headerScroll}+ onScroll={(event) => onTrackScroll(event.currentTarget.scrollTop)}+ className="thin-scroll min-h-0 flex-1 overflow-y-auto overflow-x-hidden"+ >+ {rows.map((track) => (+ <TrackHeader+ key={track.id}+ track={track}+ removable={rows.length > 1}+ onFlag={onTrackFlag}+ onRemove={onRemoveTrack}+ onRename={onRenameTrack}+ />+ ))}+ </div>+ </div>++ <canvas+ ref={canvasRef}+ {...{ [CANVAS_MARKER]: true }}+ className="min-w-0 flex-1"+ onPointerDown={onPointerDown}+ onPointerMove={onPointerMove}+ onPointerUp={endDrag}+ onPointerCancel={endDrag}+ onWheel={onWheel}+ onContextMenu={(event) => {+ event.preventDefault();+ const hit = clipAt(event.clientX, event.clientY);+ if (hit) onClipContextMenu(hit.clip.id, event.clientX, event.clientY);+ }}+ />+ </div>+ </div>+ );+}++/**+ * One lane's controls.+ *+ * Both a visibility and a mute toggle on every track, because a track is not+ * typed - the same lane can be carrying a video clip and an mp3 side by side,+ * and each needs its own switch.+ */+function TrackHeader({+ track,+ removable,+ onFlag,+ onRemove,+ onRename,+}: {+ track: Track;+ removable: boolean;+ onFlag: (trackId: string, flag: "visible" | "muted", value: boolean) => void;+ onRemove: (trackId: string) => void;+ onRename: (trackId: string, name: string) => void;+}) {+ const silent = !track.visible && track.muted;+ const [renaming, setRenaming] = useState(false);++ return (+ <div+ className="group flex items-center gap-0.5 border-b border-hairline px-2"+ style={{ height: TRACK_HEIGHT }}+ >+ {renaming ? (+ <input+ autoFocus+ defaultValue={track.name}+ spellCheck={false}+ onFocus={(event) => event.currentTarget.select()}+ // Committing on blur means clicking away saves rather than discards,+ // which is what every rename-in-place in this app should do.+ onBlur={(event) => {+ onRename(track.id, event.target.value);+ setRenaming(false);+ }}+ onKeyDown={(event) => {+ if (event.key === "Enter") event.currentTarget.blur();+ if (event.key === "Escape") {+ event.currentTarget.value = track.name;+ event.currentTarget.blur();+ }+ }}+ className="min-w-0 flex-1 rounded bg-sunken px-1 py-0.5 text-xs text-primary+ outline-none ring-1 ring-accent"+ />+ ) : (+ <span+ onDoubleClick={() => setRenaming(true)}+ title="Double-click to rename"+ className={`min-w-0 flex-1 cursor-default truncate text-xs ${+ silent ? "text-tertiary" : "text-primary"+ }`}+ >+ {track.name}+ </span>+ )}++ {removable && !renaming && (+ <button+ type="button"+ aria-label={`Remove ${track.name}`}+ title={`Remove ${track.name} and its clips`}+ onClick={() => onRemove(track.id)}+ className="invisible shrink-0 cursor-pointer rounded p-1 text-tertiary transition-colors+ hover:bg-danger-soft hover:text-danger group-hover:visible"+ >+ <Icon name="close" size={11} />+ </button>+ )}+ <IconButton+ icon={track.visible ? "eye" : "eyeOff"}+ label={track.visible ? "Hide picture on this track" : "Show picture on this track"}+ size={7}+ active={!track.visible}+ onClick={() => onFlag(track.id, "visible", !track.visible)}+ />+ <IconButton+ icon={track.muted ? "volumeOff" : "volume"}+ label={track.muted ? "Unmute this track" : "Mute this track"}+ size={7}+ active={track.muted}+ onClick={() => onFlag(track.id, "muted", !track.muted)}+ />+ </div>+ );+}++/**+ * Where a bin item dropped at these client coordinates would land.+ *+ * Lives here because this module owns the timeline's geometry, and returns+ * null when the point is outside the canvas or above the first track - so the+ * caller can simply do nothing.+ */+export function resolveDrop(+ clientX: number,+ clientY: number,+ {+ tracks,+ secondsPerPixel,+ scrollLeft,+ trackScroll,+ }: { tracks: Track[]; secondsPerPixel: number; scrollLeft: number; trackScroll: number },+): { trackId: string; start: number } | null {+ const canvas = document.querySelector<HTMLCanvasElement>(`[${CANVAS_MARKER}]`);+ if (!canvas) return null;++ const bounds = canvas.getBoundingClientRect();+ if (clientX < bounds.left || clientX > bounds.right) return null;+ if (clientY < bounds.top || clientY > bounds.bottom) return null;++ const offsetY = clientY - bounds.top - RULER_HEIGHT;+ if (offsetY < 0) return null;++ const rows = [...tracks].reverse();+ const track = rows[Math.floor((offsetY + trackScroll) / TRACK_HEIGHT)];+ if (!track) return null;++ return {+ trackId: track.id,+ start: Math.max(0, (clientX - bounds.left) * secondsPerPixel + scrollLeft),+ };+}++/** Keeps the track stack from scrolling past its own contents. */+export function clampTrackScroll(+ value: number,+ trackCount: number,+ canvas: HTMLCanvasElement | null,+): number {+ const viewport = Math.max(0, (canvas?.clientHeight ?? 0) - RULER_HEIGHT);+ const content = trackCount * TRACK_HEIGHT;+ return Math.min(Math.max(0, content - viewport), Math.max(0, value));+}++interface Rect {+ x: number;+ y: number;+ width: number;+ height: number;+}++/** Where a clip sits on the canvas, or null if its track is gone. */+function clipRect(+ clip: Clip,+ rows: readonly Track[],+ secondsPerPixel: number,+ scrollLeft: number,+ trackScroll: number,+): Rect | null {+ const rowIndex = rows.findIndex((track) => track.id === clip.trackId);+ if (rowIndex < 0) return null;+ return {+ x: (clip.start - scrollLeft) / secondsPerPixel,+ y: RULER_HEIGHT + rowIndex * TRACK_HEIGHT - trackScroll,+ width: clip.duration / secondsPerPixel,+ height: TRACK_HEIGHT,+ };+}++/** A drag band has a start and a current corner; this gives it a positive size. */+function normalise(band: { originX: number; originY: number; x: number; y: number }): Rect {+ return {+ x: Math.min(band.originX, band.x),+ y: Math.min(band.originY, band.y),+ width: Math.abs(band.x - band.originX),+ height: Math.abs(band.y - band.originY),+ };+}++/** Touching counts as intersecting, so a band brushing a clip catches it. */+function intersects(a: Rect, b: Rect): boolean {+ return a.x < b.x + b.width && b.x < a.x + a.width && a.y < b.y + b.height && b.y < a.y + a.height;+}++/** Picks a tick spacing that keeps labels readable at any zoom. */+function tickInterval(secondsPerPixel: number): number {+ const candidates = [1 / 30, 0.1, 0.25, 0.5, 1, 2, 5, 10, 15, 30, 60, 120, 300, 600, 1800, 3600];+ return candidates.find((seconds) => seconds / secondsPerPixel >= 90) ?? candidates.at(-1)!;+}++function drawRuler(+ context: CanvasRenderingContext2D,+ width: number,+ scrollLeft: number,+ secondsPerPixel: number,+ frameRate: number,+) {+ context.fillStyle = COLORS.ruler;+ context.fillRect(0, 0, width, RULER_HEIGHT);+ context.strokeStyle = COLORS.hairline;+ context.beginPath();+ context.moveTo(0, RULER_HEIGHT - 0.5);+ context.lineTo(width, RULER_HEIGHT - 0.5);+ context.stroke();++ const interval = tickInterval(secondsPerPixel);+ context.fillStyle = COLORS.text;+ context.font = '10px "Cabinet Grotesk", system-ui, sans-serif';+ context.textBaseline = "middle";++ for (+ let seconds = Math.ceil(scrollLeft / interval) * interval;+ (seconds - scrollLeft) / secondsPerPixel < width;+ seconds += interval+ ) {+ const x = Math.round((seconds - scrollLeft) / secondsPerPixel) + 0.5;+ context.strokeStyle = COLORS.tickMajor;+ context.beginPath();+ context.moveTo(x, RULER_HEIGHT - 7);+ context.lineTo(x, RULER_HEIGHT);+ context.stroke();+ context.fillText(timecode(seconds, frameRate), x + 5, RULER_HEIGHT / 2 - 2);+ }+}++/** Height of the coloured name strip at the top of every clip. */+const CLIP_HEADER = 17;+const LABEL_FONT = '11px "Cabinet Grotesk", system-ui, sans-serif';++/**+ * Truncates text to fit, with an ellipsis.+ *+ * Canvas has no built-in equivalent of `text-overflow: ellipsis`. The+ * `maxWidth` argument to `fillText` is not it - that *condenses* the glyphs to+ * fit, which is what made long clip names look crushed rather than cut.+ *+ * Results are memoised because this runs for every visible clip on every+ * frame, and `measureText` forces text shaping each time it is called.+ */+const labelCache = new Map<string, string>();++function ellipsize(context: CanvasRenderingContext2D, text: string, maxWidth: number): string {+ if (maxWidth <= 0) return "";++ // Quantise the width so that a clip being dragged does not miss the cache on+ // every single frame.+ const key = `${text}|${Math.round(maxWidth / 4)}`;+ const cached = labelCache.get(key);+ if (cached !== undefined) return cached;++ let result = text;+ if (context.measureText(text).width > maxWidth) {+ let low = 0;+ let high = text.length;+ while (low < high) {+ const mid = Math.ceil((low + high) / 2);+ if (context.measureText(`${text.slice(0, mid)}…`).width <= maxWidth) low = mid;+ else high = mid - 1;+ }+ result = low > 0 ? `${text.slice(0, low)}…` : "";+ }++ // Plain cap rather than a real LRU: names are few and short-lived enough+ // that eviction order does not matter.+ if (labelCache.size > 512) labelCache.clear();+ labelCache.set(key, result);+ return result;+}++/** Clip fills, refreshed alongside COLORS. See `refreshCanvasPalette`. */+const PALETTE = {+ video: {+ body: "#16283d",+ header: "#2b6ca8",+ edge: "#2b6ca8",+ },+ audio: {+ body: "#123027",+ header: "#2f8a68",+ edge: "#2f8a68",+ wave: "rgba(190,240,216,0.65)",+ },+ image: {+ body: "#241a38",+ header: "#7b53c4",+ edge: "#7b53c4",+ },+};++function drawClip(+ context: CanvasRenderingContext2D,+ clip: Clip,+ x: number,+ trackY: number,+ width: number,+ selected: boolean,+ assets: MediaAssets,+ secondsPerPixel: number,+) {+ const y = trackY + 4;+ const height = TRACK_HEIGHT - 10;+ const drawWidth = Math.max(2, width);+ const palette =+ clip.kind === "video"+ ? PALETTE.video+ : clip.kind === "image"+ ? PALETTE.image+ : PALETTE.audio;+ const bodyY = y + CLIP_HEADER;+ const bodyHeight = height - CLIP_HEADER;++ context.save();+ // One clip path for the whole clip: artwork drawn inside it cannot bleed+ // past the rounded corners, so no separate masking is needed per layer.+ context.beginPath();+ context.roundRect(x, y, drawWidth, height, 5);+ context.clip();++ context.fillStyle = palette.body;+ context.fillRect(x, y, drawWidth, height);++ if (bodyHeight > 4) {+ if (clip.kind === "audio") {+ const peaks = assets.peaks.get(clip.mediaId);+ if (peaks) {+ drawWaveform(context, peaks, clip, x, bodyY, drawWidth, bodyHeight, secondsPerPixel);+ }+ } else {+ // Video and stills share this path: a still is cached as a one-frame+ // filmstrip, so tiling it repeats the same picture along the clip.+ const strip = assets.strips.get(clip.mediaId);+ const frames = assets.stripFrames.get(clip.mediaId);+ if (strip && frames) {+ drawFilmstrip(context, strip, frames, x, bodyY, drawWidth, bodyHeight);+ }+ }+ }++ context.fillStyle = palette.header;+ context.fillRect(x, y, drawWidth, CLIP_HEADER);++ if (drawWidth > 30) {+ context.fillStyle = COLORS.clipText;+ context.font = LABEL_FONT;+ context.textBaseline = "middle";+ const label = ellipsize(context, clip.name, drawWidth - 14);+ if (label) context.fillText(label, x + 7, y + CLIP_HEADER / 2 + 0.5);+ }++ context.restore();++ context.beginPath();+ context.roundRect(x, y, drawWidth, height, 5);+ context.strokeStyle = selected ? COLORS.clipSelected : palette.edge;+ context.lineWidth = selected ? 2 : 1;+ context.stroke();+}++/**+ * Tiles frames from a single strip image across the clip body.+ *+ * Each frame is drawn at its natural aspect ratio for the available height,+ * and which frame appears is chosen by how far along the clip it sits - so a+ * long clip repeats frames rather than stretching four of them.+ */+function drawFilmstrip(+ context: CanvasRenderingContext2D,+ strip: ImageBitmap,+ frames: number,+ x: number,+ y: number,+ width: number,+ height: number,+) {+ const tileWidth = strip.width / frames;+ const drawWidth = height * (tileWidth / strip.height);+ if (!Number.isFinite(drawWidth) || drawWidth <= 0) return;++ const columns = Math.ceil(width / drawWidth);+ for (let column = 0; column < columns; column += 1) {+ const fraction = columns > 1 ? column / (columns - 1) : 0;+ const index = Math.min(frames - 1, Math.round(fraction * (frames - 1)));+ context.drawImage(+ strip,+ index * tileWidth,+ 0,+ tileWidth,+ strip.height,+ x + column * drawWidth,+ y,+ drawWidth,+ height,+ );+ }+}++/**+ * Draws the cached peaks, mirrored about a centre line.+ *+ * Zoomed out, one pixel covers many buckets, so each column takes the extremes+ * across its whole range - otherwise transients disappear and loud passages+ * look quiet. The scan is capped at eight samples per column so that zooming+ * all the way out stays cheap.+ */+function drawWaveform(+ context: CanvasRenderingContext2D,+ peaks: Peaks,+ clip: Clip,+ x: number,+ y: number,+ width: number,+ height: number,+ secondsPerPixel: number,+) {+ const centre = y + height / 2;+ const half = height / 2 - 1;+ const perPixel = Math.max(1, Math.round(secondsPerPixel * peaks.bucketsPerSecond));+ const stride = Math.max(1, Math.floor(perPixel / 8));++ context.fillStyle = PALETTE.audio.wave;+ context.beginPath();++ for (let column = 0; column < width; column += 1) {+ const from = Math.floor((clip.sourceStart + column * secondsPerPixel) * peaks.bucketsPerSecond);+ if (from < 0 || from >= peaks.max.length) continue;+ const to = Math.min(from + perPixel, peaks.max.length);++ let low = 0;+ let high = 0;+ for (let bucket = from; bucket < to; bucket += stride) {+ if (peaks.min[bucket] < low) low = peaks.min[bucket];+ if (peaks.max[bucket] > high) high = peaks.max[bucket];+ }++ const top = centre - high * half;+ context.rect(x + column, top, 1, Math.max(1, centre - low * half - top));+ }++ context.fill();++ context.strokeStyle = "rgba(255,255,255,0.18)";+ context.lineWidth = 1;+ context.beginPath();+ context.moveTo(x, Math.round(centre) + 0.5);+ context.lineTo(x + width, Math.round(centre) + 0.5);+ context.stroke();+}++function drawPlayhead(context: CanvasRenderingContext2D, height: number, x: number) {+ const position = Math.round(x) + 0.5;+ context.strokeStyle = COLORS.playhead;+ context.lineWidth = 1;+ context.beginPath();+ context.moveTo(position, 0);+ context.lineTo(position, height);+ context.stroke();++ context.fillStyle = COLORS.playhead;+ context.beginPath();+ context.moveTo(position - 5, 0);+ context.lineTo(position + 5, 0);+ context.lineTo(position, 9);+ context.closePath();+ context.fill();+}diff --git a/desktop/src/components/TitleBar.tsx b/desktop/src/components/TitleBar.tsxnew file mode 100644index 00000000..9d3c84e8--- /dev/null+++ b/desktop/src/components/TitleBar.tsx@@ -0,0 +1,172 @@+import { useEffect, useState } from "react";+import type { ReactNode } from "react";+import { isTauri } from "@tauri-apps/api/core";+import { getCurrentWindow } from "@tauri-apps/api/window";++import type { Theme } from "../lib/theme";+import { Icon } from "./Icon";+import { Menu, type MenuOption } from "./Menu";++/**+ * The custom title bar.+ *+ * The window is undecorated (`decorations: false`), so this strip *is* the+ * title bar: it carries the app menu, the project name and the window+ * controls, and everything not otherwise interactive is a drag region.+ *+ * `data-tauri-drag-region` is what makes an area draggable, and Tauri also+ * gives it double-click-to-maximise for free. It has to be on the actual+ * element under the pointer - a parent with the attribute does not delegate -+ * which is why it appears on the spacers rather than only on the root.+ *+ * In a plain browser (`npm run dev` without the host) the window APIs are+ * absent, so the controls hide themselves rather than throwing.+ */+export function TitleBar({+ projectName,+ menus,+ status,+ actions,+ theme,+ onToggleTheme,+}: {+ projectName: string;+ menus: { label: string; groups: MenuOption[][] }[];+ status?: string;+ /** Sits to the left of the window controls, CapCut-style. */+ actions?: ReactNode;+ theme: Theme;+ onToggleTheme: () => void;+}) {+ const [maximized, setMaximized] = useState(false);+ const native = isTauri();++ useEffect(() => {+ if (!native) return;+ const appWindow = getCurrentWindow();++ void appWindow.isMaximized().then(setMaximized);+ // The window can also be maximised by dragging it to the top edge or by+ // the double-click Tauri handles itself, so poll the real state on resize+ // rather than tracking our own button presses.+ const unlisten = appWindow.onResized(() => {+ void appWindow.isMaximized().then(setMaximized);+ });++ return () => {+ void unlisten.then((stop) => stop());+ };+ }, [native]);++ const control = async (action: "minimize" | "toggle" | "close") => {+ if (!native) return;+ const appWindow = getCurrentWindow();+ if (action === "minimize") await appWindow.minimize();+ if (action === "toggle") await appWindow.toggleMaximize();+ if (action === "close") await appWindow.close();+ };++ return (+ <header+ data-tauri-drag-region+ className="flex h-8 shrink-0 items-center gap-1 border-b border-hairline bg-panel pl-2"+ >+ <span className="flex items-center gap-1.5 pr-1" data-tauri-drag-region>+ <span className="flex h-4 w-4 items-center justify-center rounded bg-accent text-on-accent">+ <Icon name="film" size={11} strokeWidth={2.5} />+ </span>+ <span className="font-display text-[13px] font-bold tracking-tight text-primary">Relay</span>+ </span>++ <nav className="flex items-center">+ {menus.map((menu) => (+ <Menu+ key={menu.label}+ groups={menu.groups}+ trigger={(open) => (+ <span+ className={`rounded-md px-2 py-1 text-xs transition-colors ${+ open ? "bg-active text-primary" : "text-secondary hover:bg-hover"+ }`}+ >+ {menu.label}+ </span>+ )}+ />+ ))}+ </nav>++ {/* Centre: the project name, absolutely placed so it stays centred in the+ window rather than centred in whatever space the menus leave. */}+ <div+ data-tauri-drag-region+ className="pointer-events-none absolute left-1/2 flex -translate-x-1/2 items-center gap-2"+ >+ <span className="text-xs text-secondary">{projectName}</span>+ {status && <span className="font-technical text-[10px] text-tertiary">{status}</span>}+ </div>++ <span className="h-full flex-1" data-tauri-drag-region />++ <button+ type="button"+ title={theme === "dark" ? "Switch to light" : "Switch to dark"}+ aria-label={theme === "dark" ? "Switch to light theme" : "Switch to dark theme"}+ onClick={onToggleTheme}+ className="mr-1 flex h-6 w-6 cursor-pointer items-center justify-center rounded-md+ text-secondary transition-colors hover:bg-hover hover:text-primary"+ >+ <Icon name={theme === "dark" ? "sun" : "moon"} size={14} />+ </button>++ {actions && <div className="flex items-center gap-1 pr-2">{actions}</div>}++ {native && (+ <div className="flex h-full items-stretch">+ <WindowButton label="Minimise" onClick={() => void control("minimize")}>+ <Icon name="winMinimize" size={14} strokeWidth={1.5} />+ </WindowButton>+ <WindowButton+ label={maximized ? "Restore" : "Maximise"}+ onClick={() => void control("toggle")}+ >+ <Icon name={maximized ? "winRestore" : "winMaximize"} size={13} strokeWidth={1.5} />+ </WindowButton>+ <WindowButton label="Close" onClick={() => void control("close")} danger>+ <Icon name="close" size={15} strokeWidth={1.5} />+ </WindowButton>+ </div>+ )}+ </header>+ );+}++/**+ * Window controls are wider than they are tall and reach the very top edge, so+ * that throwing the pointer at the corner hits Close. They are not `IconButton`+ * for that reason - the rounded 36px square would break the corner target.+ */+function WindowButton({+ label,+ onClick,+ danger = false,+ children,+}: {+ label: string;+ onClick: () => void;+ danger?: boolean;+ children: ReactNode;+}) {+ return (+ <button+ type="button"+ title={label}+ aria-label={label}+ onClick={onClick}+ className={`flex w-11 cursor-pointer items-center justify-center text-secondary transition-colors+ ${danger ? "hover:bg-danger hover:text-on-accent" : "hover:bg-hover hover:text-primary"}`}+ >+ {children}+ </button>+ );+}diff --git a/desktop/src/components/controls.tsx b/desktop/src/components/controls.tsxnew file mode 100644index 00000000..46072841--- /dev/null+++ b/desktop/src/components/controls.tsx@@ -0,0 +1,115 @@+import { useRef } from "react";+import type { PointerEvent as ReactPointerEvent } from "react";++/**+ * Property controls for the inspector.+ *+ * Pure: value in, callback out. None of them hold state, because the value+ * they show has to be whatever the project says it is - including when it+ * changes from somewhere else, like a drag on the timeline.+ */++/**+ * A slider whose whole track is the grab target.+ *+ * Clicking anywhere on it jumps there and starts dragging, the way parameter+ * sliders work in editors rather than the way a browser range input does. The+ * fill doubles as the readout, so there is no separate progress element to+ * keep in step.+ */+export function Slider({+ label,+ value,+ min,+ max,+ step = 0.01,+ format,+ onChange,+ onReset,+}: {+ label: string;+ value: number;+ min: number;+ max: number;+ step?: number;+ /** Turns the raw value into what the reader sees. */+ format: (value: number) => string;+ onChange: (value: number) => void;+ /** Double-clicking the label returns the control to this value. */+ onReset?: () => void;+}) {+ const track = useRef<HTMLDivElement>(null);++ const commit = (event: ReactPointerEvent<HTMLDivElement>) => {+ const bounds = track.current?.getBoundingClientRect();+ if (!bounds || bounds.width === 0) return;++ const fraction = Math.min(1, Math.max(0, (event.clientX - bounds.left) / bounds.width));+ const stepped = Math.round((min + fraction * (max - min)) / step) * step;+ // Re-round, or steps accumulate float noise like 0.30000000000000004.+ onChange(Number(stepped.toFixed(6)));+ };++ const fill = max === min ? 0 : Math.min(1, Math.max(0, (value - min) / (max - min)));++ return (+ <div className="mb-3">+ <div className="mb-1 flex items-baseline justify-between gap-2">+ <span+ onDoubleClick={onReset}+ title={onReset ? "Double-click to reset" : undefined}+ className={`text-[12px] text-secondary ${onReset ? "cursor-pointer" : ""}`}+ >+ {label}+ </span>+ <span className="font-technical text-[11px] text-primary">{format(value)}</span>+ </div>++ <div+ ref={track}+ role="slider"+ aria-label={label}+ aria-valuenow={value}+ aria-valuemin={min}+ aria-valuemax={max}+ tabIndex={0}+ onKeyDown={(event) => {+ if (event.key === "ArrowLeft") onChange(Math.max(min, value - step));+ if (event.key === "ArrowRight") onChange(Math.min(max, value + step));+ }}+ onPointerDown={(event) => {+ event.currentTarget.setPointerCapture(event.pointerId);+ commit(event);+ }}+ onPointerMove={(event) => {+ if (event.currentTarget.hasPointerCapture(event.pointerId)) commit(event);+ }}+ className="relative h-6 cursor-ew-resize touch-none select-none overflow-hidden+ rounded-md bg-sunken"+ >+ <div+ className="absolute inset-y-0 left-0 bg-accent-soft"+ style={{ width: `${fill * 100}%` }}+ />+ {/* The knob subtracts its own width as it travels, so it stays inside+ the track at both ends instead of hanging over the edge. */}+ <div+ className="absolute top-0 h-full w-1 rounded bg-accent"+ style={{ left: `calc(${fill * 100}% - ${fill * 4}px)` }}+ />+ </div>+ </div>+ );+}++/** A labelled group of controls. */+export function Group({ title, children }: { title: string; children: React.ReactNode }) {+ return (+ <section className="mb-5">+ <h3 className="mb-2 text-[11px] font-semibold uppercase tracking-wider text-tertiary">+ {title}+ </h3>+ {children}+ </section>+ );+}diff --git a/desktop/src/lib/assets.ts b/desktop/src/lib/assets.tsnew file mode 100644index 00000000..683a3773--- /dev/null+++ b/desktop/src/lib/assets.ts@@ -0,0 +1,191 @@+/**+ * Clip artwork: waveforms for audio, filmstrips for video.+ *+ * Both are expensive to produce and never change, so they are computed once+ * per media item and cached in a plain mutable `Map`. The timeline reads that+ * map directly from inside its draw loop, which means artwork appearing does+ * not require a React render - the next frame simply has it.+ *+ * Everything here fails soft. A file whose peaks cannot be decoded draws as a+ * flat clip, which is exactly what it looked like before, rather than taking+ * the timeline down with it.+ */++import { invoke } from "@tauri-apps/api/core";++import { readMediaBytes } from "./engine";++/** Min/max sample pairs, bucketed at a fixed rate. */+export interface Peaks {+ min: Float32Array;+ max: Float32Array;+ /** How many buckets cover one second of audio. */+ bucketsPerSecond: number;+}++export interface MediaAssets {+ peaks: Map<string, Peaks>;+ /** A horizontal strip of evenly spaced frames, as one decoded image. */+ strips: Map<string, ImageBitmap>;+ /** How many frames are in each strip. */+ stripFrames: Map<string, number>;+ /** Guards against starting the same work twice. */+ pending: Set<string>;+ /** Notified when anything lands, for views that do not redraw continuously. */+ listeners: Set<() => void>;+}++export function createAssets(): MediaAssets {+ return {+ peaks: new Map(),+ strips: new Map(),+ stripFrames: new Map(),+ pending: new Set(),+ listeners: new Set(),+ };+}++/**+ * Subscribes to artwork arriving. Returns an unsubscribe function.+ *+ * The timeline does not need this - it repaints every frame regardless - but+ * anything that draws once and then sits there, like a bin thumbnail, does.+ */+export function subscribeAssets(assets: MediaAssets, listener: () => void): () => void {+ assets.listeners.add(listener);+ return () => assets.listeners.delete(listener);+}++function announce(assets: MediaAssets): void {+ for (const listener of assets.listeners) listener();+}++/**+ * Resolution of the cached waveform.+ *+ * 200 buckets per second is roughly two buckets per pixel at the default zoom,+ * which is enough that the drawn shape does not visibly change as you zoom in+ * a step or two, without storing the whole decoded file.+ */+const BUCKETS_PER_SECOND = 200;++/** Frames per filmstrip. Enough to read the shot, few enough to stay cheap. */+const STRIP_FRAMES = 24;+const STRIP_HEIGHT = 72;++/**+ * Starts producing artwork for one media item if it is not already cached.+ *+ * Fire and forget - the caller does not await this. Results land in the maps+ * and the timeline picks them up on its next frame.+ */+export function requestAssets(+ assets: MediaAssets,+ media: {+ id: string;+ path: string;+ kind: "video" | "audio" | "image";+ duration: number | null;+ },+): void {+ if (assets.pending.has(media.id)) return;+ if (assets.peaks.has(media.id) || assets.strips.has(media.id)) return;++ assets.pending.add(media.id);++ const work =+ media.kind === "audio"+ ? loadPeaks(media.path).then((peaks) => {+ if (peaks) assets.peaks.set(media.id, peaks);+ })+ : media.kind === "image"+ ? // A still is a one-frame filmstrip. Storing it that way means the+ // timeline and the bin draw it with the code they already have, and+ // a long still clip tiles the same frame instead of stretching it.+ loadImage(media.path).then((bitmap) => {+ if (bitmap) {+ assets.strips.set(media.id, bitmap);+ assets.stripFrames.set(media.id, 1);+ }+ })+ : loadStrip(media.path, media.duration).then((strip) => {+ if (strip) {+ assets.strips.set(media.id, strip);+ assets.stripFrames.set(media.id, STRIP_FRAMES);+ }+ });++ void work.finally(() => {+ assets.pending.delete(media.id);+ announce(assets);+ });+}++/** Decodes a file and reduces it to min/max pairs. */+async function loadPeaks(path: string): Promise<Peaks | null> {+ try {+ const bytes = await readMediaBytes(path);++ // An OfflineAudioContext decodes without opening an output device, which+ // matters because this runs at import time with no user gesture behind it.+ const context = new OfflineAudioContext(1, 1, 44100);+ const buffer = await context.decodeAudioData(bytes);++ const samples = buffer.getChannelData(0);+ const bucketSize = Math.max(1, Math.floor(buffer.sampleRate / BUCKETS_PER_SECOND));+ const bucketCount = Math.ceil(samples.length / bucketSize);++ const min = new Float32Array(bucketCount);+ const max = new Float32Array(bucketCount);++ for (let bucket = 0; bucket < bucketCount; bucket += 1) {+ const from = bucket * bucketSize;+ const to = Math.min(from + bucketSize, samples.length);++ let low = 0;+ let high = 0;+ for (let index = from; index < to; index += 1) {+ const sample = samples[index];+ if (sample < low) low = sample;+ if (sample > high) high = sample;+ }+ min[bucket] = low;+ max[bucket] = high;+ }++ return { min, max, bucketsPerSecond: buffer.sampleRate / bucketSize };+ } catch (cause) {+ console.warn(`Relay: no waveform for ${path}`, cause);+ return null;+ }+}++/** Decodes a still. No ffmpeg involved - the browser already reads these. */+async function loadImage(path: string): Promise<ImageBitmap | null> {+ try {+ const bytes = await readMediaBytes(path);+ return await createImageBitmap(new Blob([bytes]));+ } catch (cause) {+ console.warn(`Relay: could not decode ${path}`, cause);+ return null;+ }+}++/** Asks the engine for a strip of frames and decodes it into an ImageBitmap. */+async function loadStrip(path: string, duration: number | null): Promise<ImageBitmap | null> {+ if (!duration || duration <= 0) return null;++ try {+ const bytes = await invoke<ArrayBuffer>("extract_filmstrip", {+ path,+ count: STRIP_FRAMES,+ height: STRIP_HEIGHT,+ });+ // createImageBitmap decodes off the main thread, so a slow JPEG does not+ // stall the timeline.+ return await createImageBitmap(new Blob([bytes], { type: "image/jpeg" }));+ } catch (cause) {+ console.warn(`Relay: no filmstrip for ${path}`, cause);+ return null;+ }+}diff --git a/desktop/src/lib/audio.ts b/desktop/src/lib/audio.tsnew file mode 100644index 00000000..9bea1e19--- /dev/null+++ b/desktop/src/lib/audio.ts@@ -0,0 +1,163 @@+/**+ * Audio preview.+ *+ * This is what makes an mp3 on the timeline actually audible. It is a+ * *preview* path, not the engine's mixer: one `HTMLAudioElement` per audio+ * clip, kept roughly in step with the transport clock.+ *+ * Why the webview and not Rust: real-time audio needs a callback-driven output+ * device (cpal), a resampler, and a mixer that can survive the UI thread+ * stalling. That is a genuine piece of engineering and it belongs in the+ * engine. Until it exists, the webview already has a decoder and an output+ * device, and using them is the difference between hearing your edit and not.+ *+ * The known limits, so nobody mistakes this for the finished thing:+ * - Sync is corrective, not sample-accurate. Drift beyond a tolerance is+ * fixed by reseeking, which is audible if it happens often.+ * - No mixing. Overlapping clips play simultaneously and clip if loud.+ * - No effects, no fades, no per-clip gain automation.+ * - Scrubbing does not scrub audio, it repositions it.+ *+ * See docs/decisions/0004-audio-preview-in-the-webview.md.+ */++import { convertFileSrc } from "@tauri-apps/api/core";++import { readMediaBytes } from "./engine";++/** One audio clip that should be sounding right now. */+export interface Voice {+ clipId: string;+ path: string;+ /** Where in the source file the playhead currently sits, in seconds. */+ time: number;+ volume: number;+}++/**+ * How far out of step a voice may drift before it is reseeked.+ *+ * Generous while playing: a reseek is an audible click, and browsers do not+ * keep a media element perfectly locked to an external clock anyway. Tight+ * while paused, where "seek" is the entire operation and there is no click to+ * worry about.+ */+const TOLERANCE_PLAYING = 0.3;+const TOLERANCE_PAUSED = 0.02;++interface Loaded {+ element: HTMLAudioElement;+ /** Set when we fell back to a blob, so it can be revoked on dispose. */+ objectUrl?: string;+ /** Guards against retrying the blob fallback in a loop. */+ triedFallback: boolean;+}++export class AudioPreview {+ private voices = new Map<string, Loaded>();++ /**+ * Brings the audio output in line with the transport.+ *+ * Call this whenever the playhead, the play state, or the set of audible+ * clips changes. It is idempotent - calling it every animation frame is fine+ * and is in fact how drift gets corrected.+ */+ sync(active: Voice[], playing: boolean): void {+ const wanted = new Set(active.map((voice) => voice.clipId));++ // Silence anything that has fallen out from under the playhead.+ for (const [clipId, loaded] of this.voices) {+ if (!wanted.has(clipId) && !loaded.element.paused) {+ loaded.element.pause();+ }+ }++ const tolerance = playing ? TOLERANCE_PLAYING : TOLERANCE_PAUSED;++ for (const voice of active) {+ const loaded = this.load(voice.clipId, voice.path);+ const element = loaded.element;+ element.volume = Math.max(0, Math.min(1, voice.volume));++ // readyState 0 means metadata has not arrived; setting currentTime now+ // throws in some engines and is silently discarded in others.+ if (element.readyState > 0 && Math.abs(element.currentTime - voice.time) > tolerance) {+ try {+ element.currentTime = Math.max(0, voice.time);+ } catch {+ // Seeking an element that is still opening is not an error worth+ // surfacing; the next sync will land it.+ }+ }++ if (playing) {+ if (element.paused) {+ // Rejects when the element is not ready or autoplay is refused.+ // Either way the next sync retries, so there is nothing to handle.+ void element.play().catch(() => undefined);+ }+ } else if (!element.paused) {+ element.pause();+ }+ }+ }++ /** Stops everything, e.g. when the transport stops. */+ stopAll(): void {+ for (const loaded of this.voices.values()) loaded.element.pause();+ }++ /** Drops a voice, for instance when its clip is deleted. */+ release(clipId: string): void {+ const loaded = this.voices.get(clipId);+ if (!loaded) return;+ loaded.element.pause();+ loaded.element.removeAttribute("src");+ loaded.element.load();+ if (loaded.objectUrl) URL.revokeObjectURL(loaded.objectUrl);+ this.voices.delete(clipId);+ }++ dispose(): void {+ for (const clipId of [...this.voices.keys()]) this.release(clipId);+ }++ private load(clipId: string, path: string): Loaded {+ const existing = this.voices.get(clipId);+ if (existing) return existing;++ const element = new Audio();+ element.preload = "auto";+ // Nothing here is a user-facing media player; the element exists only as a+ // decoder and an output. Keep it out of the document.+ element.src = convertFileSrc(path);++ const loaded: Loaded = { element, triedFallback: false };+ this.voices.set(clipId, loaded);++ // The asset protocol is the good path: it streams and it seeks. If it is+ // unavailable - scope misconfigured, protocol disabled - fall back to+ // pulling the bytes through the engine and playing a blob. Slower and+ // memory-hungry, but it means audio works rather than silently not.+ element.addEventListener("error", () => {+ if (loaded.triedFallback) return;+ loaded.triedFallback = true;+ void this.loadViaBlob(loaded, path);+ });++ return loaded;+ }++ private async loadViaBlob(loaded: Loaded, path: string): Promise<void> {+ try {+ const bytes = await readMediaBytes(path);+ const url = URL.createObjectURL(new Blob([bytes]));+ loaded.objectUrl = url;+ loaded.element.src = url;+ loaded.element.load();+ } catch (cause) {+ console.error(`Relay: could not load audio for ${path}`, cause);+ }+ }+}diff --git a/desktop/src/lib/engine.ts b/desktop/src/lib/engine.tsnew file mode 100644index 00000000..e41ece88--- /dev/null+++ b/desktop/src/lib/engine.ts@@ -0,0 +1,152 @@+/**+ * The typed boundary between the UI and the Rust engine.+ *+ * Every `invoke` in this app goes through this file. Nothing else imports+ * `@tauri-apps/api/core` for commands, so when a command's shape changes there+ * is exactly one place to fix and the compiler finds every call site.+ *+ * The types here mirror the serde structs in `src-tauri/src/lib.rs`. Keep them+ * in step - the IPC boundary is JSON, so TypeScript cannot check it for you.+ */+import { invoke } from "@tauri-apps/api/core";+import { listen, type UnlistenFn } from "@tauri-apps/api/event";++export interface VideoStreamInfo {+ index: number;+ codec: string;+ width: number;+ height: number;+ /** Frames per second as a decimal, for display only. */+ frameRate: number;+ /** The exact fraction, e.g. "30000/1001". The engine works in these. */+ frameRateFraction: string;+}++export interface AudioStreamInfo {+ index: number;+ codec: string;+ sampleRate: number;+ channels: number;+}++export interface MediaSummary {+ path: string;+ /** Seconds, or null when the container does not say. Always null for stills. */+ duration: number | null;+ /** Decided by the host, which sees the extension as well as the streams. */+ kind: "video" | "audio" | "image";+ video: VideoStreamInfo | null;+ audio: AudioStreamInfo | null;+}++/** Asks the engine what is inside a media file. Throws with FFmpeg's message. */+export async function probeMedia(path: string): Promise<MediaSummary> {+ return invoke<MediaSummary>("probe_media", { path });+}++/** Reports the app version the UI is talking to. */+export async function engineVersion(): Promise<string> {+ return invoke<string>("engine_version");+}++/**+ * Reads a whole file into memory as bytes.+ *+ * Only used as the audio fallback when the asset protocol is unavailable - see+ * `lib/audio.ts`. It loads the entire file, so do not reach for it as a+ * general-purpose reader.+ */+export async function readMediaBytes(path: string): Promise<ArrayBuffer> {+ return invoke<ArrayBuffer>("read_media_bytes", { path });+}++/** A project on disk, as the launch screen sees it. */+export interface ProjectInfo {+ path: string;+ name: string;+ width: number;+ height: number;+ rateNum: number;+ rateDen: number;+ /** Milliseconds since the epoch. */+ openedAt: number;+}++/**+ * Creates the project folder and writes its manifest.+ *+ * The returned path may differ from `location/name`, because the name has to+ * be made filesystem-safe first.+ */+export async function createProject(request: {+ location: string;+ name: string;+ width: number;+ height: number;+ rateNum: number;+ rateDen: number;+}): Promise<ProjectInfo> {+ return invoke<ProjectInfo>("create_project", request);+}++/** Reads an existing project's settings and marks it as recently opened. */+export async function openProject(path: string): Promise<ProjectInfo> {+ return invoke<ProjectInfo>("open_project", { path });+}++/** Recently opened projects, newest first, with vanished folders left out. */+export async function recentProjects(): Promise<ProjectInfo[]> {+ return invoke<ProjectInfo[]>("recent_projects");+}++/** Drops a project from the recents list. The folder itself is untouched. */+export async function forgetProject(path: string): Promise<void> {+ return invoke<void>("forget_project", { path });+}++/** One clip, flattened for the exporter. */+export interface ExportClip {+ path: string;+ kind: "video" | "audio" | "image";+ start: number;+ duration: number;+ sourceStart: number;+ /** Index into the track stack, zero being bottom-most. */+ track: number;+ hidden: boolean;+ muted: boolean;+ /** Linear gain, 1 being unity. */+ volume: number;+ fadeIn: number;+ fadeOut: number;+}++export interface ExportRequest {+ output: string;+ width: number;+ height: number;+ /** Exact frame rate. Never send a rounded decimal here. */+ rateNum: number;+ rateDen: number;+ crf: number;+ preset: string;+ clips: ExportClip[];+}++export interface ExportProgress {+ frame: number;+ total: number;+ stage: string;+}++/** Renders the timeline. Resolves with the path written. */+export async function exportProject(request: ExportRequest): Promise<string> {+ return invoke<string>("export_project", { request });+}++/** Subscribes to export progress. Resolves to an unsubscribe function. */+export async function onExportProgress(+ handler: (progress: ExportProgress) => void,+): Promise<UnlistenFn> {+ return listen<ExportProgress>("export://progress", (event) => handler(event.payload));+}diff --git a/desktop/src/lib/project.ts b/desktop/src/lib/project.tsnew file mode 100644index 00000000..a3bae5ce--- /dev/null+++ b/desktop/src/lib/project.ts@@ -0,0 +1,472 @@+/**+ * The prototype's edit model.+ *+ * A note on where this lives: the engine is the eventual owner of the timeline,+ * and `relay-core` already has a far better version of these types (exact+ * rational time, arena handles, generational IDs). This module exists because+ * the engine has no project *API* yet - no commands, no undo, no+ * serialisation - and the UI needs something to draw.+ *+ * So this is explicitly provisional. Two rules keep the eventual migration+ * cheap, and both are worth honouring:+ *+ * 1. Every operation is a pure function `(project, args) => project`. That is+ * the same shape a command sent to the engine will have, so the call sites+ * do not change when the implementation moves.+ * 2. No component mutates a project. They call these functions.+ *+ * Times are seconds as JS numbers, which is a real downgrade from the engine's+ * exact rationals. Acceptable while nothing here is authoritative; not+ * acceptable once it is. See docs/decisions/0004.+ */++import type { MediaSummary } from "./engine";++/**+ * What a piece of media is.+ *+ * A still is not a video with one frame: it has no intrinsic duration, so how+ * long it lasts on the timeline is an editorial choice rather than a property+ * of the file. Everything downstream of that difference - the default clip+ * length, how it is previewed, how it is decoded on export - follows from+ * keeping the two apart.+ */+export type MediaKind = "video" | "audio" | "image";++/** Kept as an alias so existing call sites read naturally. */+export type TrackKind = MediaKind;++export interface MediaItem {+ id: string;+ path: string;+ name: string;+ /** Seconds. Null when the container did not say. */+ duration: number | null;+ kind: TrackKind;+ width: number | null;+ height: number | null;+ frameRate: number | null;+ /** The exact fraction the engine works in, e.g. "30000/1001". */+ frameRateFraction: string | null;+ videoCodec: string | null;+ audioCodec: string | null;+ hasAudio: boolean;+}++/**+ * A lane. Deliberately untyped: any media goes on any track.+ *+ * Typed video/audio lanes are an assumption inherited from tape, and they cost+ * you every time an mp3 belongs next to a cutaway or a clip needs to move down+ * one row. A clip knows what it is; a track does not need to.+ *+ * Both flags therefore exist on every track, because one track can carry+ * picture and sound at the same time.+ */+export interface Track {+ id: string;+ name: string;+ /** Video clips on this track are left out of the composite when false. */+ visible: boolean;+ /** Audio on this track is silent when true. */+ muted: boolean;+}++export interface Clip {+ id: string;+ trackId: string;+ mediaId: string;+ name: string;+ kind: TrackKind;+ /** Seconds from the start of the timeline. */+ start: number;+ duration: number;+ /** In-point: how far into the media the clip starts. */+ sourceStart: number;++ /**+ * Linear gain, 1 being unity. Above 1 is a boost.+ *+ * Linear rather than decibels because that is what both the audio element+ * and ffmpeg's `volume` filter take; the UI converts for display.+ */+ volume: number;+ /** Fade-in length in seconds. Zero means no fade. */+ fadeIn: number;+ /** Fade-out length in seconds. Zero means no fade. */+ fadeOut: number;+}++export interface Project {+ media: MediaItem[];+ tracks: Track[];+ clips: Clip[];+}++/** Fallback length for media whose container reports no duration. */+const UNKNOWN_DURATION = 5;+/** How long a still lasts when first placed. Editorial default, not a fact. */+export const DEFAULT_IMAGE_DURATION = 5;+const MIN_CLIP_DURATION = 1 / 60;++let counter = 0;+const nextId = (prefix: string) => `${prefix}${(counter += 1)}`;++/** A project with four empty lanes. */+export function createProject(): Project {+ return {+ media: [],+ // Bottom-most first, matching the engine's compositing order, so track 1+ // sits at the bottom of the screen the way it does in every other editor.+ tracks: [1, 2, 3, 4].map((number) => ({+ id: `T${number}`,+ name: `Track ${number}`,+ visible: true,+ muted: false,+ })),+ clips: [],+ };+}++/** Turns a probe result into a bin item. */+export function toMediaItem(summary: MediaSummary): MediaItem {+ const name = summary.path.split(/[\\/]/).pop() ?? summary.path;+ return {+ id: nextId("m"),+ path: summary.path,+ name,+ duration: summary.duration,+ kind: summary.kind,+ width: summary.video?.width ?? null,+ height: summary.video?.height ?? null,+ frameRate: summary.video?.frameRate ?? null,+ frameRateFraction: summary.video?.frameRateFraction ?? null,+ videoCodec: summary.video?.codec ?? null,+ audioCodec: summary.audio?.codec ?? null,+ hasAudio: summary.audio !== null,+ };+}++/** Adds media to the bin, ignoring a path that is already there. */+export function addMedia(project: Project, item: MediaItem): Project {+ if (project.media.some((existing) => existing.path === item.path)) return project;+ return { ...project, media: [...project.media, item] };+}++export function findMedia(project: Project, mediaId: string): MediaItem | null {+ return project.media.find((item) => item.id === mediaId) ?? null;+}++export function findClip(project: Project, clipId: string): Clip | null {+ return project.clips.find((clip) => clip.id === clipId) ?? null;+}++export function findTrack(project: Project, trackId: string): Track | null {+ return project.tracks.find((track) => track.id === trackId) ?? null;+}++/**+ * The lowest track with nothing already occupying `[start, start + duration)`,+ * falling back to the bottom track.+ *+ * Used when material is added without being dropped somewhere specific, so+ * repeatedly adding clips stacks them up the tracks instead of piling them all+ * onto one lane on top of each other.+ */+export function firstFreeTrack(project: Project, start: number, duration: number): Track | null {+ const end = start + duration;+ const free = project.tracks.find(+ (track) =>+ !project.clips.some(+ (clip) =>+ clip.trackId === track.id && clip.start < end && start < clip.start + clip.duration,+ ),+ );+ return free ?? project.tracks[0] ?? null;+}++/** Places media on a track. Returns the project unchanged if either is unknown. */+export function addClip(+ project: Project,+ { mediaId, trackId, start }: { mediaId: string; trackId: string; start: number },+): { project: Project; clipId: string | null } {+ const media = findMedia(project, mediaId);+ const track = findTrack(project, trackId);+ if (!media || !track) return { project, clipId: null };++ const clip: Clip = {+ id: nextId("c"),+ trackId,+ mediaId,+ name: media.name,+ // The clip's kind comes from the media, never from the lane it lands on.+ kind: media.kind,+ start: Math.max(0, start),+ duration:+ media.kind === "image" ? DEFAULT_IMAGE_DURATION : (media.duration ?? UNKNOWN_DURATION),+ sourceStart: 0,+ volume: 1,+ fadeIn: 0,+ fadeOut: 0,+ };++ return { project: { ...project, clips: [...project.clips, clip] }, clipId: clip.id };+}++/** Moves a clip in time, and optionally to another track of the same kind. */+export function moveClip(+ project: Project,+ clipId: string,+ { start, trackId }: { start: number; trackId?: string },+): Project {+ return {+ ...project,+ clips: project.clips.map((clip) => {+ if (clip.id !== clipId) return clip;+ // Any clip may sit on any track, so the only check is that it exists.+ const target = trackId ? findTrack(project, trackId) : null;+ return { ...clip, start: Math.max(0, start), trackId: target?.id ?? clip.trackId };+ }),+ };+}++/** Trims a clip from one edge, keeping the source content under the other. */+export function trimClip(+ project: Project,+ clipId: string,+ edge: "start" | "end",+ delta: number,+): Project {+ return {+ ...project,+ clips: project.clips.map((clip) => {+ if (clip.id !== clipId) return clip;+ if (edge === "end") {+ return { ...clip, duration: Math.max(MIN_CLIP_DURATION, clip.duration + delta) };+ }+ // Dragging the head moves the in-point too, so the pixels under the+ // remaining part of the clip do not slide.+ const shift = Math.min(delta, clip.duration - MIN_CLIP_DURATION);+ const start = Math.max(0, clip.start + shift);+ const applied = start - clip.start;+ return {+ ...clip,+ start,+ duration: clip.duration - applied,+ sourceStart: Math.max(0, clip.sourceStart + applied),+ };+ }),+ };+}++/** Where one clip is going. */+export interface ClipMove {+ clipId: string;+ start: number;+ trackId: string;+}++/**+ * Moves several clips at once.+ *+ * A single pass rather than repeated `moveClip` calls, so that a multi-clip+ * drag is one new project object per frame instead of one per selected clip.+ */+export function moveClips(project: Project, moves: ClipMove[]): Project {+ if (moves.length === 0) return project;+ const byId = new Map(moves.map((move) => [move.clipId, move]));++ return {+ ...project,+ clips: project.clips.map((clip) => {+ const move = byId.get(clip.id);+ if (!move) return clip;+ const target = findTrack(project, move.trackId);+ return { ...clip, start: Math.max(0, move.start), trackId: target?.id ?? clip.trackId };+ }),+ };+}++/**+ * Changes some of a clip's properties.+ *+ * The generic patch keeps the panel that edits a clip from needing one+ * function per field, while the `Partial<Clip>` type still stops it inventing+ * fields that do not exist.+ */+export function updateClip(project: Project, clipId: string, patch: Partial<Clip>): Project {+ return {+ ...project,+ clips: project.clips.map((clip) => (clip.id === clipId ? { ...clip, ...patch } : clip)),+ };+}++/**+ * A clip's gain at a timeline instant, fades included.+ *+ * Shared between the audio preview and anything else that needs to know how+ * loud a clip is right now, so the two cannot disagree about where a fade+ * reaches full volume.+ */+export function clipGainAt(clip: Clip, time: number): number {+ const local = time - clip.start;+ if (local < 0 || local > clip.duration) return 0;++ let gain = clip.volume;+ if (clip.fadeIn > 0) gain *= Math.min(1, local / clip.fadeIn);+ if (clip.fadeOut > 0) gain *= Math.min(1, (clip.duration - local) / clip.fadeOut);++ return Math.max(0, gain);+}++export function removeClip(project: Project, clipId: string): Project {+ return { ...project, clips: project.clips.filter((clip) => clip.id !== clipId) };+}++export function removeClips(project: Project, clipIds: readonly string[]): Project {+ const doomed = new Set(clipIds);+ return { ...project, clips: project.clips.filter((clip) => !doomed.has(clip.id)) };+}++/** Cuts a clip in two at `time`. Does nothing if the cut misses the clip. */+export function splitClip(project: Project, clipId: string, time: number): Project {+ const clip = findClip(project, clipId);+ if (!clip) return project;++ const offset = time - clip.start;+ if (offset <= MIN_CLIP_DURATION || offset >= clip.duration - MIN_CLIP_DURATION) {+ return project;+ }++ const head: Clip = { ...clip, duration: offset };+ const tail: Clip = {+ ...clip,+ id: nextId("c"),+ start: clip.start + offset,+ duration: clip.duration - offset,+ sourceStart: clip.sourceStart + offset,+ };++ return {+ ...project,+ clips: project.clips.flatMap((current) => (current.id === clipId ? [head, tail] : [current])),+ };+}++/**+ * Adds a lane on top of the stack.+ *+ * Numbered from the highest number already in use rather than from the track+ * count, so removing Track 2 and adding another does not produce a second+ * Track 3 sitting next to the first.+ */+export function addTrack(project: Project): { project: Project; trackId: string } {+ const highest = project.tracks.reduce((best, track) => {+ const number = Number.parseInt(track.name.replace(/\D+/g, ""), 10);+ return Number.isFinite(number) ? Math.max(best, number) : best;+ }, 0);++ const track: Track = {+ id: nextId("t"),+ name: `Track ${highest + 1}`,+ visible: true,+ muted: false,+ };++ // Appended, and the timeline draws the array reversed, so a new track+ // appears at the top of the stack.+ return { project: { ...project, tracks: [...project.tracks, track] }, trackId: track.id };+}++/**+ * Removes a lane and everything on it.+ *+ * Refuses to remove the last one: a timeline with no tracks has nowhere to+ * drop anything, and recovering from that would need its own undo.+ */+export function removeTrack(project: Project, trackId: string): Project {+ if (project.tracks.length <= 1) return project;+ return {+ ...project,+ tracks: project.tracks.filter((track) => track.id !== trackId),+ clips: project.clips.filter((clip) => clip.trackId !== trackId),+ };+}++/** Renames a lane. An empty or whitespace-only name is ignored. */+export function renameTrack(project: Project, trackId: string, name: string): Project {+ const trimmed = name.trim();+ if (!trimmed) return project;++ return {+ ...project,+ tracks: project.tracks.map((track) =>+ track.id === trackId ? { ...track, name: trimmed } : track,+ ),+ };+}++/** Which clips sit on a track. Used to warn before removing a full one. */+export function clipsOnTrack(project: Project, trackId: string): Clip[] {+ return project.clips.filter((clip) => clip.trackId === trackId);+}++export function setTrackFlag(+ project: Project,+ trackId: string,+ flag: "visible" | "muted",+ value: boolean,+): Project {+ return {+ ...project,+ tracks: project.tracks.map((track) =>+ track.id === trackId ? { ...track, [flag]: value } : track,+ ),+ };+}++/** Where the last clip ends. */+export function projectDuration(project: Project): number {+ return project.clips.reduce((end, clip) => Math.max(end, clip.start + clip.duration), 0);+}++/** Clips under the playhead on tracks that are not disabled. */+export function clipsAt(project: Project, time: number): Clip[] {+ return project.clips.filter((clip) => {+ const track = findTrack(project, clip.trackId);+ if (!track) return false;+ // Stills are picture, so the eye switches them off just like footage.+ if (clip.kind !== "audio" && !track.visible) return false;+ if (clip.kind === "audio" && track.muted) return false;+ return time >= clip.start && time < clip.start + clip.duration;+ });+}++/**+ * The nearest interesting time to `time`, within `threshold` seconds.+ *+ * Snap targets are zero, the playhead, and every clip edge except those of the+ * clip being dragged - snapping a clip to itself would pin it in place.+ */+export function snapTime(+ project: Project,+ time: number,+ { threshold, playhead, exclude }: { threshold: number; playhead: number; exclude?: string },+): number {+ const targets = [0, playhead];+ for (const clip of project.clips) {+ if (clip.id === exclude) continue;+ targets.push(clip.start, clip.start + clip.duration);+ }++ let best = time;+ let bestDistance = threshold;+ for (const target of targets) {+ const distance = Math.abs(target - time);+ if (distance < bestDistance) {+ best = target;+ bestDistance = distance;+ }+ }+ return best;+}diff --git a/desktop/src/lib/theme.ts b/desktop/src/lib/theme.tsnew file mode 100644index 00000000..666a3657--- /dev/null+++ b/desktop/src/lib/theme.ts@@ -0,0 +1,90 @@+import { useCallback, useLayoutEffect, useState } from "react";++/**+ * Light or dark, chosen explicitly.+ *+ * Relay defaults to light whatever the OS is set to. A creative tool that+ * inverts itself because of a system setting the user was not thinking about+ * is disorienting, and judging an image against a surround that changed on its+ * own is worse than disorienting.+ *+ * The choice is stored per machine. Nothing about it reaches the project file:+ * it is a property of the person sitting there, not of the edit.+ */+export type Theme = "light" | "dark";++const STORAGE_KEY = "relay.theme";++function stored(): Theme {+ try {+ return localStorage.getItem(STORAGE_KEY) === "dark" ? "dark" : "light";+ } catch {+ // Private mode, blocked storage - light is the default anyway.+ return "light";+ }+}++/**+ * Puts the theme on `<html>`, where the stylesheet keys off it.+ *+ * Called imperatively the moment the theme changes rather than from an effect,+ * and this matters more than it looks. React runs child effects before parent+ * effects, so anything that reads computed styles in its own effect - the+ * timeline, which copies the palette out for its canvas - would run *before* a+ * parent effect had applied the attribute, and read the outgoing theme. The+ * symptom is a timeline that is always exactly one theme behind, so switching+ * to dark paints it light.+ */+function applyTheme(theme: Theme): void {+ document.documentElement.dataset.theme = theme;+}++function persist(theme: Theme): void {+ try {+ localStorage.setItem(STORAGE_KEY, theme);+ } catch {+ // Not being able to remember the choice is not worth failing over.+ }+}++// At import time, before React renders anything, so the first paint and the+// first canvas palette read already agree with the stored choice.+applyTheme(stored());++export function useTheme(): { theme: Theme; setTheme: (theme: Theme) => void; toggle: () => void } {+ const [theme, setThemeState] = useState<Theme>(stored);++ // A backstop only: the attribute is normally already correct by now.+ useLayoutEffect(() => {+ applyTheme(theme);+ }, [theme]);++ const setTheme = useCallback((next: Theme) => {+ applyTheme(next);+ persist(next);+ setThemeState(next);+ }, []);++ const toggle = useCallback(() => {+ setThemeState((current) => {+ const next = current === "dark" ? "light" : "dark";+ applyTheme(next);+ persist(next);+ return next;+ });+ }, []);++ return { theme, setTheme, toggle };+}++/**+ * Reads a theme colour as a concrete value.+ *+ * Canvas cannot use `var(--color-x)`; it needs a real colour string. Call this+ * when the theme changes, not per frame - `getComputedStyle` forces a style+ * recalculation every time it is asked.+ */+export function themeColor(name: string, fallback: string): string {+ const value = getComputedStyle(document.documentElement).getPropertyValue(`--color-${name}`);+ return value.trim() || fallback;+}diff --git a/desktop/src/lib/time.ts b/desktop/src/lib/time.tsnew file mode 100644index 00000000..444e06c4--- /dev/null+++ b/desktop/src/lib/time.ts@@ -0,0 +1,55 @@+/**+ * Display formatting for time.+ *+ * The UI never does time *arithmetic* - that belongs in the engine, in exact+ * rational seconds. These helpers only turn a number into something to look at.+ */++/** Formats seconds as `HH:MM:SS:FF` at the given frame rate. */+export function timecode(seconds: number, frameRate: number): string {+ const safe = Math.max(0, seconds);+ const totalFrames = Math.floor(safe * frameRate);+ const frames = totalFrames % Math.round(frameRate);+ const totalSeconds = Math.floor(safe);++ const pad = (value: number) => value.toString().padStart(2, "0");+ return [+ pad(Math.floor(totalSeconds / 3600)),+ pad(Math.floor(totalSeconds / 60) % 60),+ pad(totalSeconds % 60),+ pad(frames),+ ].join(":");+}++/**+ * Formats a timestamp as how long ago it was.+ *+ * Coarse on purpose: "3 days ago" is what you want from a recents list, and a+ * precise date is noise until it is old enough to actually be a date.+ */+export function relativeTime(milliseconds: number): string {+ const seconds = Math.max(0, (Date.now() - milliseconds) / 1000);++ if (seconds < 90) return "just now";+ if (seconds < 3600) return `${Math.round(seconds / 60)} min ago`;+ if (seconds < 86_400) {+ const hours = Math.round(seconds / 3600);+ return hours === 1 ? "1 hour ago" : `${hours} hours ago`;+ }+ if (seconds < 7 * 86_400) {+ const days = Math.round(seconds / 86_400);+ return days === 1 ? "yesterday" : `${days} days ago`;+ }+ return new Date(milliseconds).toLocaleDateString(undefined, {+ day: "numeric",+ month: "short",+ year: "numeric",+ });+}++/** Formats seconds as `M:SS`, for places where a full timecode is noise. */+export function shortDuration(seconds: number | null): string {+ if (seconds === null) return "--:--";+ const whole = Math.max(0, Math.floor(seconds));+ return `${Math.floor(whole / 60)}:${(whole % 60).toString().padStart(2, "0")}`;+}diff --git a/desktop/src/lib/transport.ts b/desktop/src/lib/transport.tsnew file mode 100644index 00000000..3ca0e20d--- /dev/null+++ b/desktop/src/lib/transport.ts@@ -0,0 +1,99 @@+import { useCallback, useEffect, useRef, useState } from "react";++/**+ * The playback clock.+ *+ * The playhead is computed as `origin + (now - startedAt)`, never accumulated+ * frame by frame. Accumulation drifts - it is the same mistake as summing+ * `1/29.97` in a loop, and it is why `relay-core` has a rational time type at+ * all. Here it also means a dropped frame costs nothing: the next tick reads+ * the wall clock and lands in the right place.+ *+ * Playback is still paced by the browser here. That is a prototype+ * compromise: the engine owns the clock once it can decode and present+ * frames itself.+ */+export interface Transport {+ playhead: number;+ playing: boolean;+ play: () => void;+ pause: () => void;+ toggle: () => void;+ /** Jumps to an absolute time, clamped at zero. */+ seek: (seconds: number) => void;+ /** Moves by a signed number of frames at the given rate. */+ step: (frames: number, frameRate: number) => void;+}++export function useTransport({ duration }: { duration: number }): Transport {+ const [playhead, setPlayhead] = useState(0);+ const [playing, setPlaying] = useState(false);++ // Where the clock was when playback started, and when that was.+ const origin = useRef(0);+ const startedAt = useRef(0);+ // Read inside the rAF loop so the effect does not restart on every change.+ const durationRef = useRef(duration);+ durationRef.current = duration;++ const pause = useCallback(() => setPlaying(false), []);++ const play = useCallback(() => {+ setPlayhead((current) => {+ origin.current = current;+ return current;+ });+ startedAt.current = performance.now();+ setPlaying(true);+ }, []);++ const toggle = useCallback(() => {+ if (playing) pause();+ else play();+ }, [pause, play, playing]);++ const seek = useCallback((seconds: number) => {+ const next = Math.max(0, seconds);+ origin.current = next;+ startedAt.current = performance.now();+ setPlayhead(next);+ }, []);++ const step = useCallback(+ (frames: number, frameRate: number) => {+ // Land on an exact frame boundary rather than adding an offset to+ // wherever the playhead happened to stop.+ setPlayhead((current) => {+ const next = Math.max(0, (Math.round(current * frameRate) + frames) / frameRate);+ origin.current = next;+ startedAt.current = performance.now();+ return next;+ });+ },+ [],+ );++ useEffect(() => {+ if (!playing) return;++ let frame = 0;+ const tick = (now: number) => {+ const next = origin.current + (now - startedAt.current) / 1000;+ const end = durationRef.current;++ if (end > 0 && next >= end) {+ setPlayhead(end);+ setPlaying(false);+ return;+ }++ setPlayhead(next);+ frame = requestAnimationFrame(tick);+ };++ frame = requestAnimationFrame(tick);+ return () => cancelAnimationFrame(frame);+ }, [playing]);++ return { playhead, playing, play, pause, toggle, seek, step };+}diff --git a/desktop/src/main.tsx b/desktop/src/main.tsxnew file mode 100644index 00000000..bc3c1b39--- /dev/null+++ b/desktop/src/main.tsx@@ -0,0 +1,16 @@+import React from "react";+import ReactDOM from "react-dom/client";++import { App } from "./App";+import "./styles.css";++const root = document.getElementById("root");+if (!root) {+ throw new Error("index.html is missing #root");+}++ReactDOM.createRoot(root).render(+ <React.StrictMode>+ <App />+ </React.StrictMode>,+);diff --git a/desktop/src/styles.css b/desktop/src/styles.cssnew file mode 100644index 00000000..be6e3fd2--- /dev/null+++ b/desktop/src/styles.css@@ -0,0 +1,271 @@+@import "tailwindcss";++/*+ * Cabinet Grotesk, the UI face.+ *+ * One variable file covering 100-900 rather than eight static weights: a+ * single ~40KB request instead of eight, and any weight in between is+ * available if a heading ever wants 550.+ *+ * `font-display: swap` shows the fallback immediately and swaps when the font+ * lands. The alternative, `block`, means a blank window for up to three+ * seconds on a cold start, which is a bad trade for an app that is already+ * local.+ *+ * Licensed under the ITF Free Font License - see LICENSE-CabinetGrotesk.txt+ * next to the font file.+ */+@font-face {+ font-family: "Cabinet Grotesk";+ src: url("./assets/fonts/CabinetGrotesk-Variable.woff2") format("woff2-variations");+ font-weight: 100 900;+ font-style: normal;+ font-display: swap;+}++@font-face {+ font-family: "Synonym";+ src: url("./assets/fonts/Synonym-Variable.woff2") format("woff2-variations");+ font-weight: 200 700;+ font-style: normal;+ font-display: swap;+}++/*+ * Theming.+ *+ * Every colour in the app comes from a token here. No component writes a hex+ * value or a `white/10`, because the moment one does it stops responding to+ * the theme and you find out six screens later in the wrong mode.+ *+ * The light values are the defaults; dark overrides the same custom+ * properties. Tailwind v4 generates `bg-panel` as `var(--color-panel)`, so an+ * override in a selector is all it takes - no `dark:` variants anywhere.+ *+ * The palette is Apple's: near-white greys rather than pure white, near-black+ * rather than pure black, one saturated accent, and text that steps down in+ * three deliberate weights rather than fading arbitrarily.+ */+/*+ * `static` is load-bearing, not decoration.+ *+ * By default Tailwind v4 only emits the CSS variables it can see used as+ * utility classes. Several tokens here - the timeline lanes, the ruler, the+ * clip fills - are never written as a class because a canvas cannot resolve+ * `var(...)`; they are read from JavaScript with `getComputedStyle`. Without+ * `static` those get tree-shaken, the lookup returns an empty string, and the+ * canvas silently falls back to its built-in dark defaults - which is a black+ * timeline in light mode.+ */+@theme static {+ /* Surfaces, from furthest back to nearest front. */+ --color-base: #f0f0f2;+ --color-panel: #ffffff;+ --color-sunken: #e8e8ec;+ --color-elevated: #ffffff;+ --color-hover: rgba(0, 0, 0, 0.05);+ --color-active: rgba(0, 0, 0, 0.09);++ /* Hairlines. */+ --color-hairline: rgba(0, 0, 0, 0.1);+ --color-hairline-strong: rgba(0, 0, 0, 0.18);++ /* Text, in three deliberate steps. */+ --color-primary: #1d1d1f;+ --color-secondary: #6e6e73;+ --color-tertiary: #a1a1a6;++ /* One accent, plus the two states it needs. */+ --color-accent: #0071e3;+ --color-accent-hover: #0077ed;+ --color-accent-soft: rgba(0, 113, 227, 0.12);+ --color-on-accent: #ffffff;++ --color-danger: #d70015;+ --color-danger-soft: rgba(215, 0, 21, 0.1);+ --color-success: #248a3d;++ /* Editor-specific colours with no equivalent in a general palette. */+ /*+ * The program monitor is black in both themes and has no dark override.+ * Picture is judged against its surround, so that surround must not change+ * when the interface does - and black is the only honest backdrop for it.+ * `on-stage` is therefore a fixed value too, since it always sits on black.+ */+ --color-stage: #000000;+ --color-on-stage: rgba(255, 255, 255, 0.38);+ --color-playhead: #ff3b30;+ --color-clip-video: #0a6cc4;+ --color-clip-video-body: #cfe3f7;+ --color-clip-audio: #1f8a5f;+ --color-clip-audio-body: #cfeade;+ --color-clip-wave: rgba(20, 80, 55, 0.55);+ --color-clip-image: #8a5cd6;+ --color-clip-image-body: #e2d7f6;+ --color-timeline: #e4e4e9;+ --color-timeline-alt: #ededf1;+ --color-ruler: #f4f4f6;++ /*+ * Three type roles, not one.+ *+ * Synonym carries the interface: it is a text face, drawn for paragraph+ * sizes, and it stays readable at the 10 and 11px this app is full of.+ *+ * Cabinet Grotesk is the display face - headings, the project title - where+ * its tighter, more characterful shapes are an asset rather than a tax on+ * legibility.+ *+ * Cabinet also handles the technical readouts: timecode, the timeline ruler,+ * clip labels, paths, dimensions. Its even, mechanical letterforms suit+ * numbers, and `font-technical` pairs it with tabular figures so a running+ * timecode does not jitter as the digits change width.+ *+ * The system stack sits behind all three, so the app is legible for the+ * frame before the fonts load and on a machine where they fail to.+ */+ --font-sans:+ "Synonym", -apple-system, BlinkMacSystemFont, "Segoe UI Variable Text", "Segoe UI",+ ui-sans-serif, system-ui, sans-serif;+ --font-display:+ "Cabinet Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", ui-sans-serif, sans-serif;+ --font-technical:+ "Cabinet Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", ui-sans-serif, sans-serif;+ /* Kept for anything that genuinely needs fixed-width cells. */+ --font-mono: ui-monospace, "SF Mono", "Cascadia Mono", "Consolas", monospace;+}++/*+ * Dark, applied only by explicit choice.+ *+ * Deliberately not wired to `prefers-color-scheme`: light is Relay's default+ * regardless of what the OS is set to. A creative tool that flips its entire+ * appearance because of a system setting the user was not thinking about is+ * disorienting, and colour work in particular wants a predictable surround.+ */+:root[data-theme="dark"] {+ --color-base: #0a0a0c;+ --color-panel: #161618;+ --color-sunken: #050506;+ --color-elevated: #1f1f22;+ --color-hover: rgba(255, 255, 255, 0.07);+ --color-active: rgba(255, 255, 255, 0.12);++ --color-hairline: rgba(255, 255, 255, 0.1);+ --color-hairline-strong: rgba(255, 255, 255, 0.2);++ --color-primary: #f5f5f7;+ --color-secondary: #a1a1a6;+ --color-tertiary: #6e6e73;++ --color-accent: #0a84ff;+ --color-accent-hover: #3d9bff;+ --color-accent-soft: rgba(10, 132, 255, 0.18);+ --color-on-accent: #ffffff;++ --color-danger: #ff453a;+ --color-danger-soft: rgba(255, 69, 58, 0.14);+ --color-success: #30d158;++ --color-playhead: #ff453a;+ --color-clip-video: #2b6ca8;+ --color-clip-video-body: #16283d;+ --color-clip-audio: #2f8a68;+ --color-clip-audio-body: #123027;+ --color-clip-wave: rgba(190, 240, 216, 0.65);+ --color-clip-image: #7b53c4;+ --color-clip-image-body: #241a38;+ --color-timeline: #0d0d10;+ --color-timeline-alt: #0a0a0d;+ --color-ruler: #131316;+}++/* Panel scrollbars: no visible track or gutter, just a small rounded thumb. */+@utility thin-scroll {+ scrollbar-width: thin;+ scrollbar-color: var(--color-hairline-strong) transparent;++ &::-webkit-scrollbar {+ width: 8px;+ height: 8px;+ }++ &::-webkit-scrollbar-track,+ &::-webkit-scrollbar-corner {+ background: transparent;+ }++ &::-webkit-scrollbar-thumb {+ background: var(--color-hairline-strong);+ border-radius: 9999px;+ border: 2px solid transparent;+ background-clip: content-box;+ }++ &::-webkit-scrollbar-button {+ display: none;+ }+}++/* The material every floating thing shares: menus, dialogs, the drag ghost. */+@utility surface {+ background-color: var(--color-elevated);+ border: 1px solid var(--color-hairline);+ box-shadow:+ 0 0 0 0.5px rgba(0, 0, 0, 0.04),+ 0 10px 20px -6px rgba(0, 0, 0, 0.18),+ 0 24px 48px -12px rgba(0, 0, 0, 0.22);+}++/* Dark needs a heavier, tighter shadow: a soft light-mode shadow simply+ disappears against a near-black background. */+:root[data-theme="dark"] .surface {+ box-shadow:+ 0 0 0 0.5px rgba(255, 255, 255, 0.05),+ 0 16px 32px -8px rgba(0, 0, 0, 0.7);+}+++@layer base {+ html,+ body,+ #root {+ height: 100%;+ }++ body {+ margin: 0;+ background-color: var(--color-base);+ color: var(--color-primary);+ font-family: var(--font-sans);+ font-size: 13px;+ /* Apple's type is optically tighter than a browser default. */+ letter-spacing: -0.01em;+ -webkit-font-smoothing: antialiased;+ /* A fixed-layout application: the page never scrolls, panels do. */+ overflow: hidden;+ /* Text selection while dragging clips is never what you wanted. */+ user-select: none;+ -webkit-user-select: none;+ }++ /* The window is undecorated, so nothing else draws its edge. */+ #root {+ border: 1px solid var(--color-hairline);+ }++ input {+ user-select: text;+ -webkit-user-select: text;+ }++ /* Numbers that change in place must not reflow as they do. */+ .font-technical {+ font-variant-numeric: tabular-nums;+ }++ :focus-visible {+ outline: 2px solid var(--color-accent);+ outline-offset: 1px;+ }+}diff --git a/desktop/src/vite-env.d.ts b/desktop/src/vite-env.d.tsnew file mode 100644index 00000000..11f02fe2--- /dev/null+++ b/desktop/src/vite-env.d.ts@@ -0,0 +1 @@+/// <reference types="vite/client" />diff --git a/desktop/tsconfig.json b/desktop/tsconfig.jsonnew file mode 100644index 00000000..d4aba321--- /dev/null+++ b/desktop/tsconfig.json@@ -0,0 +1,25 @@+{+ "compilerOptions": {+ "target": "ES2022",+ "useDefineForClassFields": true,+ "lib": ["ES2022", "DOM", "DOM.Iterable"],+ "module": "ESNext",+ "skipLibCheck": true,++ /* Bundler mode */+ "moduleResolution": "bundler",+ "allowImportingTsExtensions": true,+ "resolveJsonModule": true,+ "isolatedModules": true,+ "noEmit": true,+ "jsx": "react-jsx",++ /* Linting */+ "strict": true,+ "noUnusedLocals": true,+ "noUnusedParameters": true,+ "noFallthroughCasesInSwitch": true+ },+ "include": ["src"],+ "references": [{ "path": "./tsconfig.node.json" }]+}diff --git a/desktop/tsconfig.node.json b/desktop/tsconfig.node.jsonnew file mode 100644index 00000000..42872c59--- /dev/null+++ b/desktop/tsconfig.node.json@@ -0,0 +1,10 @@+{+ "compilerOptions": {+ "composite": true,+ "skipLibCheck": true,+ "module": "ESNext",+ "moduleResolution": "bundler",+ "allowSyntheticDefaultImports": true+ },+ "include": ["vite.config.ts"]+}diff --git a/desktop/vite.config.ts b/desktop/vite.config.tsnew file mode 100644index 00000000..49cb23ac--- /dev/null+++ b/desktop/vite.config.ts@@ -0,0 +1,40 @@+import { defineConfig } from "vite";+import react from "@vitejs/plugin-react";+import tailwindcss from "@tailwindcss/vite";++// @ts-expect-error process is a nodejs global+const host = process.env.TAURI_DEV_HOST;++export default defineConfig(async () => ({+ // Tailwind v4 runs as a Vite plugin. There is no tailwind.config.js and no+ // PostCSS step: the theme lives in src/styles.css under @theme.+ plugins: [react(), tailwindcss()],++ // Do not let Vite's screen-clearing hide Rust compiler errors.+ clearScreen: false,++ server: {+ port: 1420,+ strictPort: true,+ host: host || false,+ hmr: host ? { protocol: "ws", host, port: 1421 } : undefined,+ watch: {+ ignored: ["**/src-tauri/**"],+ },+ },++ build: {+ // We ship inside WebView2 / WKWebView / WebKitGTK, all of which are modern.+ // Targeting them directly means no legacy transpilation and smaller output.+ target: "esnext",+ minify: "esbuild",+ // Source maps in debug builds only - they double the bundle otherwise.+ sourcemap: !!process.env.TAURI_ENV_DEBUG,+ chunkSizeWarningLimit: 1500,+ },++ // Vite pre-bundles these once instead of re-resolving them on every reload.+ optimizeDeps: {+ include: ["react", "react-dom", "@tauri-apps/api/core"],+ },+}));diff --git a/engine/.gitignore b/engine/.gitignorenew file mode 100644index 00000000..ea8c4bf7--- /dev/null+++ b/engine/.gitignore@@ -0,0 +1 @@+/targetdiff --git a/engine/Cargo.lock b/engine/Cargo.locknew file mode 100644index 00000000..5b3de5cb--- /dev/null+++ b/engine/Cargo.lock@@ -0,0 +1,289 @@+# This file is automatically @generated by Cargo.+# It is not intended for manual editing.+version = 4++[[package]]+name = "anstream"+version = "1.0.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "824a212faf96e9acacdbd09febd34438f8f711fb84e09a8916013cd7815ca28d"+dependencies = [+ "anstyle",+ "anstyle-parse",+ "anstyle-query",+ "anstyle-wincon",+ "colorchoice",+ "is_terminal_polyfill",+ "utf8parse",+]++[[package]]+name = "anstyle"+version = "1.0.14"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "940b3a0ca603d1eade50a4846a2afffd5ef57a9feac2c0e2ec2e14f9ead76000"++[[package]]+name = "anstyle-parse"+version = "1.0.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "52ce7f38b242319f7cabaa6813055467063ecdc9d355bbb4ce0c68908cd8130e"+dependencies = [+ "utf8parse",+]++[[package]]+name = "anstyle-query"+version = "1.1.5"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc"+dependencies = [+ "windows-sys",+]++[[package]]+name = "anstyle-wincon"+version = "3.0.11"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d"+dependencies = [+ "anstyle",+ "once_cell_polyfill",+ "windows-sys",+]++[[package]]+name = "clap"+version = "4.6.6"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "473c7e07f409a8d772161724aa8db6a765a2532a70f9667eeb7b49d3d02fbdca"+dependencies = [+ "clap_builder",+ "clap_derive",+]++[[package]]+name = "clap_builder"+version = "4.6.6"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "7b48fea5a88e9ae728a2dcbedbfc0e730f7d60da42e1cb049a83c9fb8b789889"+dependencies = [+ "anstream",+ "anstyle",+ "clap_lex",+ "strsim",+]++[[package]]+name = "clap_derive"+version = "4.6.4"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "d012d2b9d65aca7f18f4d9878a045bc17899bba951561ba5ec3c2ba1eed9a061"+dependencies = [+ "heck",+ "proc-macro2",+ "quote",+ "syn",+]++[[package]]+name = "clap_lex"+version = "1.1.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "c8d4a3bb8b1e0c1050499d1815f5ab16d04f0959b233085fb31653fbfc9d98f9"++[[package]]+name = "colorchoice"+version = "1.0.5"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "1d07550c9036bf2ae0c684c4297d503f838287c83c53686d05370d0e139ae570"++[[package]]+name = "heck"+version = "0.5.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"++[[package]]+name = "is_terminal_polyfill"+version = "1.70.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695"++[[package]]+name = "itoa"+version = "1.0.18"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682"++[[package]]+name = "memchr"+version = "2.8.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "cf8baf1c55e62ffcace7a9f06f4bd9cd3f0c4beb022d3b367256b91b87513d98"++[[package]]+name = "once_cell_polyfill"+version = "1.70.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe"++[[package]]+name = "proc-macro2"+version = "1.0.107"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "985e7ec9bb745e6ce6535b544d84d6cd6f7ad8bd711c398938ae983b91a766d9"+dependencies = [+ "unicode-ident",+]++[[package]]+name = "quote"+version = "1.0.47"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "1fbf4db142a473a8d80c26bbf18454ed458bf8d26c8219c331daecfdbd079001"+dependencies = [+ "proc-macro2",+]++[[package]]+name = "relay-cli"+version = "0.1.0"+dependencies = [+ "clap",+ "relay-core",+ "relay-media",+ "relay-render",+]++[[package]]+name = "relay-core"+version = "0.1.0"++[[package]]+name = "relay-media"+version = "0.1.0"+dependencies = [+ "relay-core",+ "serde_json",+ "thiserror",+]++[[package]]+name = "relay-render"+version = "0.1.0"+dependencies = [+ "relay-core",+]++[[package]]+name = "serde"+version = "1.0.229"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "4148590afebada386688f18773da617792bf2ef03ffc1e4cbd2b1d45b023e0ba"+dependencies = [+ "serde_core",+]++[[package]]+name = "serde_core"+version = "1.0.229"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "67dca2c9c51e58a4791a4b1ed58308b39c64224d349a935ab5039aa360942a48"+dependencies = [+ "serde_derive",+]++[[package]]+name = "serde_derive"+version = "1.0.229"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "e7a5d71263a5a7d47b41f6b3f06ba276f10cc18b0931f1799f710578e2309348"+dependencies = [+ "proc-macro2",+ "quote",+ "syn",+]++[[package]]+name = "serde_json"+version = "1.0.151"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "c841b55ecdae098c80dcae9cf767f6f8a0c2cdb3416bbef72181df4d0fe73f14"+dependencies = [+ "itoa",+ "memchr",+ "serde",+ "serde_core",+ "zmij",+]++[[package]]+name = "strsim"+version = "0.11.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f"++[[package]]+name = "syn"+version = "3.0.4"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "e6275cddf4610d1775e6d1fe9469b2e77d0f39fd98fb7450901b821e0c53649f"+dependencies = [+ "proc-macro2",+ "quote",+ "unicode-ident",+]++[[package]]+name = "thiserror"+version = "2.0.20"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "ec86235f5fcc2a73650310756d2ac5b138a5780bbbdfae3eeccec992c435ba4f"+dependencies = [+ "thiserror-impl",+]++[[package]]+name = "thiserror-impl"+version = "2.0.20"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "bc04cd3e1236dd4a98afca4569f2deb3f120e5422a4023be2cb683f8486292af"+dependencies = [+ "proc-macro2",+ "quote",+ "syn",+]++[[package]]+name = "unicode-ident"+version = "1.0.24"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75"++[[package]]+name = "utf8parse"+version = "0.2.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821"++[[package]]+name = "windows-link"+version = "0.2.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5"++[[package]]+name = "windows-sys"+version = "0.61.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc"+dependencies = [+ "windows-link",+]++[[package]]+name = "zmij"+version = "1.0.23"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "29666d0abbfad1e3dc4dcf6144730dd3a3ab225bbbdac83319345b1b44ccfc1b"diff --git a/engine/Cargo.toml b/engine/Cargo.tomlnew file mode 100644index 00000000..8534f40f--- /dev/null+++ b/engine/Cargo.toml@@ -0,0 +1,35 @@+[workspace]+resolver = "3"+members = ["crates/*"]++[workspace.package]+version = "0.1.0"+edition = "2024"+rust-version = "1.93"+# license = "TODO" # see docs/decisions/0005-license-is-undecided.md++[workspace.dependencies]+relay-core = { path = "crates/relay-core" }+relay-media = { path = "crates/relay-media" }+relay-render = { path = "crates/relay-render" }++serde_json = "1"+thiserror = "2"+clap = { version = "4", features = ["derive"] }++[workspace.lints.rust]+missing_docs = "warn"++[workspace.lints.clippy]+# Cleverness is the enemy of a codebase you maintain alone.+too_many_arguments = "allow"++[profile.release]+opt-level = 3+lto = "thin"+codegen-units = 1++# Decoding and compositing are unusably slow in an unoptimised build, even when+# the rest of the engine is being debugged.+[profile.dev.package."*"]+opt-level = 2diff --git a/engine/README.md b/engine/README.mdnew file mode 100644index 00000000..9197b7ba--- /dev/null+++ b/engine/README.md@@ -0,0 +1,41 @@+# Relay Engine++The video engine behind Relay. Rust, no GC, no hidden control flow.++## Layout++| Crate | What it is | Dependencies |+|---|---|---|+| `relay-core` | Time, arena, frames, timeline model. The vocabulary every other crate speaks. | **none** (std only) |+| `relay-media` | Getting pixels in and out of files. FFmpeg lives here and nowhere else. | `relay-core`, serde_json |+| `relay-render` | Turning a timeline plus a timestamp into one finished frame. | `relay-core` |+| `relay-cli` | A binary to drive the above. The vertical slice. | all of them |++The dependency arrows point one way: `cli -> {media, render} -> core`. If you ever+find yourself wanting `core` to depend on `media`, something has been put in the+wrong crate.++## Build and run++```sh+cargo build+cargo test+cargo run -p relay-cli -- probe some-video.mp4+cargo run -p relay-cli -- demo some-video.mp4 out.mp4 --frames 120+```++Requires `ffmpeg` and `ffprobe` on `PATH`.++## Reading this codebase cold++1. `docs/decisions/` - short notes on why things are the way they are. Read these first.+2. `crates/*/src/lib.rs` - every crate opens with a `//!` block saying what it is for.+3. `cargo doc --open` - the generated API map of the whole engine.++## Conventions++- **Time is exact.** All timestamps are `relay_core::time::Rational` seconds, never `f64`.+ Frame-accurate editing and floating point do not mix.+- **Graphs use handles, not pointers.** See decision 0003.+- **Shallow generics.** Concrete types until three call sites demand otherwise.+- **Threads, not async.** The render path is CPU-bound; `async` buys nothing here.diff --git a/engine/crates/relay-cli/Cargo.toml b/engine/crates/relay-cli/Cargo.tomlnew file mode 100644index 00000000..cd6beceb--- /dev/null+++ b/engine/crates/relay-cli/Cargo.toml@@ -0,0 +1,19 @@+[package]+name = "relay-cli"+version.workspace = true+edition.workspace = true+rust-version.workspace = true+description = "Command line driver for the Relay engine."++[[bin]]+name = "relay"+path = "src/main.rs"++[dependencies]+relay-core.workspace = true+relay-media.workspace = true+relay-render.workspace = true+clap.workspace = true++[lints]+workspace = truediff --git a/engine/crates/relay-cli/src/main.rs b/engine/crates/relay-cli/src/main.rsnew file mode 100644index 00000000..36e169c2--- /dev/null+++ b/engine/crates/relay-cli/src/main.rs@@ -0,0 +1,198 @@+//! Command line driver for the Relay engine.+//!+//! This exists so the engine can be exercised end to end without a UI. The+//! `render` command is the vertical slice: probe, build a timeline, plan every+//! frame, decode, composite, encode.++use std::error::Error;+use std::path::PathBuf;++use clap::{Parser, Subcommand};+use relay_core::time::{FrameRate, Rational};+use relay_core::timeline::{Clip, MediaRef, Timeline, Track, TrackKind};+use relay_media::{+ DecodeOptions, EncodeOptions, FfmpegDecoder, FfmpegEncoder, FrameSink, FrameSource,+};+use relay_render::{Compositor, CpuCompositor, Layer, plan_frame};++#[derive(Parser)]+#[command(name = "relay", version, about = "Relay engine command line")]+struct Cli {+ #[command(subcommand)]+ command: Command,+}++#[derive(Subcommand)]+enum Command {+ /// Report what is inside a media file.+ Probe {+ /// The file to inspect.+ path: PathBuf,+ },++ /// Decode, composite and re-encode a clip - the end-to-end slice.+ Render {+ /// Source video.+ input: PathBuf,+ /// Where to write the result.+ output: PathBuf,+ /// How many frames to render.+ #[arg(long, default_value_t = 90)]+ frames: u64,+ /// Fade up from black over this many frames. Zero disables the fade.+ #[arg(long, default_value_t = 15)]+ fade: u64,+ },+}++fn main() -> Result<(), Box<dyn Error>> {+ match Cli::parse().command {+ Command::Probe { path } => probe(&path),+ Command::Render { input, output, frames, fade } => {+ render(&input, &output, frames, fade)+ }+ }+}++fn probe(path: &PathBuf) -> Result<(), Box<dyn Error>> {+ let info = relay_media::probe(path)?;++ println!("{}", info.path.display());+ match info.duration {+ Some(duration) => println!(" duration {:.3}s ({duration})", duration.as_f64()),+ None => println!(" duration unknown"),+ }++ match &info.video {+ Some(video) => println!(+ " video #{} {} {}x{} @ {} ({})",+ video.index,+ video.codec,+ video.width,+ video.height,+ video.frame_rate,+ video.frame_rate.fps()+ ),+ None => println!(" video none"),+ }++ match &info.audio {+ Some(audio) => println!(+ " audio #{} {} {} Hz, {} channels",+ audio.index, audio.codec, audio.sample_rate, audio.channels+ ),+ None => println!(" audio none"),+ }++ Ok(())+}++/// The vertical slice.+///+/// Note the deliberate shortcut: this pulls frames from one decoder in order+/// and assumes the plan asks for them in the same order. That holds for a+/// single clip played start to finish, and it is exactly what breaks the+/// moment there are two overlapping clips or the playhead jumps. The fix is a+/// per-media reader pool with a frame cache, which is the next real piece of+/// work - not something to bodge in here.+fn render(+ input: &PathBuf,+ output: &PathBuf,+ frames: u64,+ fade: u64,+) -> Result<(), Box<dyn Error>> {+ let info = relay_media::probe(input)?;+ let video = info.require_video()?;+ let (width, height) = (video.width, video.height);+ let rate = video.frame_rate;++ let timeline = single_clip_timeline(input, width, height, rate, frames);++ let mut decoder = FfmpegDecoder::open(+ input,+ &DecodeOptions::default().limited_to(frames).at_rate(rate),+ )?;+ let mut encoder =+ FfmpegEncoder::create(output, width, height, rate, &EncodeOptions::default())?;+ let mut compositor = CpuCompositor;++ println!("rendering {frames} frames at {width}x{height} {rate}");++ for index in 0..frames {+ let plan = plan_frame(&timeline, rate.time_of_frame(index as i64));++ let composed = if plan.is_empty() {+ // A gap in the timeline is black, not an error.+ compositor.composite(width, height, &[])+ } else {+ let Some(decoded) = decoder.next_frame()? else {+ println!("source ended after {index} frames");+ break;+ };+ let opacity = plan.layers[0].opacity * fade_in(index, fade);+ compositor.composite(width, height, &[Layer::new(&decoded).with_opacity(opacity)])+ };++ encoder.write_frame(&composed)?;+ }++ encoder.finish()?;+ println!("wrote {} frames to {}", encoder.written(), output.display());+ Ok(())+}++fn single_clip_timeline(+ input: &PathBuf,+ width: u32,+ height: u32,+ rate: FrameRate,+ frames: u64,+) -> Timeline {+ let mut timeline = Timeline::new(width, height, rate);+ let track = timeline.add_track(Track::new("V1", TrackKind::Video));+ let duration = rate.time_of_frame(frames as i64);+ timeline+ .add_clip(track, Clip::new(MediaRef::new(input), Rational::ZERO, duration))+ .expect("the track was just added");+ timeline+}++/// Ramps from 0.0 to 1.0 over the first `fade` frames.+fn fade_in(index: u64, fade: u64) -> f32 {+ if fade == 0 || index >= fade {+ 1.0+ } else {+ index as f32 / fade as f32+ }+}++#[cfg(test)]+mod tests {+ use super::*;++ #[test]+ fn the_fade_ramps_then_holds() {+ assert_eq!(fade_in(0, 10), 0.0);+ assert_eq!(fade_in(5, 10), 0.5);+ assert_eq!(fade_in(10, 10), 1.0);+ assert_eq!(fade_in(99, 10), 1.0);+ }++ #[test]+ fn a_zero_length_fade_is_fully_opaque_immediately() {+ assert_eq!(fade_in(0, 0), 1.0);+ }++ #[test]+ fn the_timeline_covers_exactly_the_requested_frames() {+ let timeline = single_clip_timeline(+ &PathBuf::from("a.mp4"),+ 1920,+ 1080,+ FrameRate::NTSC_30,+ 90,+ );+ assert_eq!(timeline.frame_count(), 90);+ assert_eq!(timeline.clip_count(), 1);+ }+}diff --git a/engine/crates/relay-core/Cargo.toml b/engine/crates/relay-core/Cargo.tomlnew file mode 100644index 00000000..24bbdb5a--- /dev/null+++ b/engine/crates/relay-core/Cargo.toml@@ -0,0 +1,14 @@+[package]+name = "relay-core"+version.workspace = true+edition.workspace = true+rust-version.workspace = true+description = "Time, arenas, frames and the timeline model shared by every other Relay crate."++# Deliberately empty. relay-core is std-only, and should stay that way: it is the+# vocabulary every other crate speaks, so a dependency here is a dependency+# everywhere. See ../../README.md.+[dependencies]++[lints]+workspace = truediff --git a/engine/crates/relay-core/src/arena.rs b/engine/crates/relay-core/src/arena.rsnew file mode 100644index 00000000..f6fd39a6--- /dev/null+++ b/engine/crates/relay-core/src/arena.rs@@ -0,0 +1,257 @@+//! Generational arenas.+//!+//! Editor data is a graph - clips reference media, effects reference clips,+//! nodes reference nodes - and Relay models that with handles into an arena+//! rather than with pointers. See+//! `docs/decisions/0003-arena-handles-not-pointers.md` for why.+//!+//! The short version: [`Id`] is `Copy`, `Eq` and `Hash`, so it goes into undo+//! records and across threads without ceremony, and the generation counter+//! turns a stale handle into `None` instead of a use-after-free.+//!+//! ```+//! use relay_core::arena::Arena;+//!+//! let mut arena = Arena::new();+//! let id = arena.insert("clip");+//! assert_eq!(arena.get(id), Some(&"clip"));+//!+//! arena.remove(id);+//! assert_eq!(arena.get(id), None); // the stale handle is simply empty+//! ```++use std::fmt;+use std::hash::{Hash, Hasher};+use std::marker::PhantomData;++/// A handle to a value in an [`Arena`].+///+/// The type parameter is a marker only - it stops you from indexing a track+/// arena with a clip handle - so `Id` is `Copy` regardless of whether `T` is.+pub struct Id<T> {+ index: u32,+ generation: u32,+ // `fn() -> T` rather than `T` so the handle stays Send + Sync + Copy+ // whatever T happens to be.+ marker: PhantomData<fn() -> T>,+}++impl<T> Id<T> {+ fn new(index: u32, generation: u32) -> Self {+ Self { index, generation, marker: PhantomData }+ }++ /// The slot this handle points at. Useful for stable display ordering; it+ /// is not a unique identity on its own, because slots are reused.+ pub const fn index(self) -> u32 {+ self.index+ }+}++impl<T> Clone for Id<T> {+ fn clone(&self) -> Self {+ *self+ }+}++impl<T> Copy for Id<T> {}++impl<T> PartialEq for Id<T> {+ fn eq(&self, other: &Self) -> bool {+ self.index == other.index && self.generation == other.generation+ }+}++impl<T> Eq for Id<T> {}++impl<T> Hash for Id<T> {+ fn hash<H: Hasher>(&self, state: &mut H) {+ self.index.hash(state);+ self.generation.hash(state);+ }+}++impl<T> fmt::Debug for Id<T> {+ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {+ let name = std::any::type_name::<T>().rsplit("::").next().unwrap_or("?");+ write!(f, "{name}#{}v{}", self.index, self.generation)+ }+}++enum Slot<T> {+ Occupied { value: T, generation: u32 },+ Vacant { generation: u32 },+}++/// A slab of `T` addressed by [`Id`], where removed slots are reused without+/// letting old handles alias the new occupant.+pub struct Arena<T> {+ slots: Vec<Slot<T>>,+ free: Vec<u32>,+ len: usize,+}++impl<T> Arena<T> {+ /// An empty arena.+ pub fn new() -> Self {+ Self { slots: Vec::new(), free: Vec::new(), len: 0 }+ }++ /// An empty arena with room for `capacity` values.+ pub fn with_capacity(capacity: usize) -> Self {+ Self { slots: Vec::with_capacity(capacity), free: Vec::new(), len: 0 }+ }++ /// Stores `value` and returns a handle to it.+ ///+ /// # Panics+ /// If the arena would exceed `u32::MAX` slots.+ pub fn insert(&mut self, value: T) -> Id<T> {+ if let Some(index) = self.free.pop() {+ let slot = &mut self.slots[index as usize];+ let generation = match slot {+ Slot::Vacant { generation } => *generation,+ Slot::Occupied { .. } => unreachable!("free list pointed at an occupied slot"),+ };+ *slot = Slot::Occupied { value, generation };+ self.len += 1;+ Id::new(index, generation)+ } else {+ let index = u32::try_from(self.slots.len()).expect("arena exceeded u32::MAX slots");+ self.slots.push(Slot::Occupied { value, generation: 0 });+ self.len += 1;+ Id::new(index, 0)+ }+ }++ /// Borrows the value behind `id`, or `None` if it has been removed.+ pub fn get(&self, id: Id<T>) -> Option<&T> {+ match self.slots.get(id.index as usize)? {+ Slot::Occupied { value, generation } if *generation == id.generation => Some(value),+ _ => None,+ }+ }++ /// Mutably borrows the value behind `id`, or `None` if it has been removed.+ pub fn get_mut(&mut self, id: Id<T>) -> Option<&mut T> {+ match self.slots.get_mut(id.index as usize)? {+ Slot::Occupied { value, generation } if *generation == id.generation => Some(value),+ _ => None,+ }+ }++ /// True if `id` still refers to a live value.+ pub fn contains(&self, id: Id<T>) -> bool {+ self.get(id).is_some()+ }++ /// Removes and returns the value behind `id`, invalidating every handle to+ /// it. Returns `None` if it was already gone.+ pub fn remove(&mut self, id: Id<T>) -> Option<T> {+ let slot = self.slots.get_mut(id.index as usize)?;+ match slot {+ Slot::Occupied { generation, .. } if *generation == id.generation => {}+ _ => return None,+ }+ let next_generation = id.generation.wrapping_add(1);+ let previous = std::mem::replace(slot, Slot::Vacant { generation: next_generation });+ self.free.push(id.index);+ self.len -= 1;+ match previous {+ Slot::Occupied { value, .. } => Some(value),+ Slot::Vacant { .. } => unreachable!("just checked this slot was occupied"),+ }+ }++ /// How many live values the arena holds.+ pub const fn len(&self) -> usize {+ self.len+ }++ /// True if the arena holds no live values.+ pub const fn is_empty(&self) -> bool {+ self.len == 0+ }++ /// Iterates over live values in slot order, paired with their handles.+ pub fn iter(&self) -> impl Iterator<Item = (Id<T>, &T)> {+ self.slots.iter().enumerate().filter_map(|(index, slot)| match slot {+ Slot::Occupied { value, generation } => {+ Some((Id::new(index as u32, *generation), value))+ }+ Slot::Vacant { .. } => None,+ })+ }++ /// Mutably iterates over live values in slot order, paired with handles.+ pub fn iter_mut(&mut self) -> impl Iterator<Item = (Id<T>, &mut T)> {+ self.slots.iter_mut().enumerate().filter_map(|(index, slot)| match slot {+ Slot::Occupied { value, generation } => {+ Some((Id::new(index as u32, *generation), value))+ }+ Slot::Vacant { .. } => None,+ })+ }+}++impl<T> Default for Arena<T> {+ fn default() -> Self {+ Self::new()+ }+}++impl<T: fmt::Debug> fmt::Debug for Arena<T> {+ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {+ f.debug_map().entries(self.iter()).finish()+ }+}++#[cfg(test)]+mod tests {+ use super::*;++ #[test]+ fn stores_and_returns_values() {+ let mut arena = Arena::new();+ let a = arena.insert(1);+ let b = arena.insert(2);+ assert_eq!(arena.get(a), Some(&1));+ assert_eq!(arena.get(b), Some(&2));+ assert_eq!(arena.len(), 2);+ }++ #[test]+ fn a_stale_handle_reads_as_empty_not_as_the_new_occupant() {+ // This is the entire point of the generation counter.+ let mut arena = Arena::new();+ let old = arena.insert("first");+ arena.remove(old);+ let new = arena.insert("second");++ assert_eq!(old.index(), new.index(), "the slot should have been reused");+ assert_ne!(old, new);+ assert_eq!(arena.get(old), None);+ assert_eq!(arena.get(new), Some(&"second"));+ }++ #[test]+ fn removing_twice_is_harmless() {+ let mut arena = Arena::new();+ let id = arena.insert(7);+ assert_eq!(arena.remove(id), Some(7));+ assert_eq!(arena.remove(id), None);+ assert!(arena.is_empty());+ }++ #[test]+ fn iteration_skips_holes() {+ let mut arena = Arena::new();+ let a = arena.insert("a");+ let b = arena.insert("b");+ let c = arena.insert("c");+ arena.remove(b);++ let seen: Vec<_> = arena.iter().map(|(id, value)| (id, *value)).collect();+ assert_eq!(seen, vec![(a, "a"), (c, "c")]);+ }+}diff --git a/engine/crates/relay-core/src/frame.rs b/engine/crates/relay-core/src/frame.rsnew file mode 100644index 00000000..de41e837--- /dev/null+++ b/engine/crates/relay-core/src/frame.rs@@ -0,0 +1,182 @@+//! Decoded image buffers.+//!+//! One pixel format, everywhere: 8-bit RGBA, straight (non-premultiplied)+//! alpha, sRGB, rows packed tightly with no padding. Every decoder converts to+//! it and every encoder converts from it.+//!+//! That is a deliberate simplification, not an oversight. A real grade needs+//! higher precision and a linear working space, and when that day comes it+//! arrives as a second frame type next to this one - not as a `format` field+//! that every call site has to branch on.++use std::fmt;++/// Bytes per pixel in the one format Relay uses.+pub const BYTES_PER_PIXEL: usize = 4;++/// An RGBA8 image.+///+/// Width and height are fixed at construction, and the buffer is always+/// exactly `width * height * 4` bytes, so indexing arithmetic cannot go wrong+/// after the fact.+#[derive(Clone, PartialEq, Eq)]+pub struct Frame {+ width: u32,+ height: u32,+ pixels: Vec<u8>,+}++impl Frame {+ /// How many bytes a frame of this size occupies.+ pub const fn byte_len(width: u32, height: u32) -> usize {+ width as usize * height as usize * BYTES_PER_PIXEL+ }++ /// An opaque black frame.+ pub fn black(width: u32, height: u32) -> Self {+ let mut pixels = vec![0u8; Self::byte_len(width, height)];+ for pixel in pixels.chunks_exact_mut(BYTES_PER_PIXEL) {+ pixel[3] = 255;+ }+ Self { width, height, pixels }+ }++ /// A fully transparent frame.+ pub fn transparent(width: u32, height: u32) -> Self {+ Self { width, height, pixels: vec![0u8; Self::byte_len(width, height)] }+ }++ /// Wraps an existing buffer.+ ///+ /// Returns `None` if the buffer is not exactly `width * height * 4` bytes.+ /// Decoders should use this rather than trusting their own arithmetic.+ pub fn from_rgba(width: u32, height: u32, pixels: Vec<u8>) -> Option<Self> {+ (pixels.len() == Self::byte_len(width, height)).then_some(Self { width, height, pixels })+ }++ /// Width in pixels.+ pub const fn width(&self) -> u32 {+ self.width+ }++ /// Height in pixels.+ pub const fn height(&self) -> u32 {+ self.height+ }++ /// True if both frames have the same dimensions.+ pub const fn same_size_as(&self, other: &Self) -> bool {+ self.width == other.width && self.height == other.height+ }++ /// The raw RGBA bytes, row-major from the top-left.+ pub fn pixels(&self) -> &[u8] {+ &self.pixels+ }++ /// The raw RGBA bytes, mutably.+ pub fn pixels_mut(&mut self) -> &mut [u8] {+ &mut self.pixels+ }++ /// Consumes the frame and yields its buffer, so it can be handed to an+ /// encoder without a copy.+ pub fn into_pixels(self) -> Vec<u8> {+ self.pixels+ }++ /// Byte offset of the pixel at `(x, y)`, or `None` if out of bounds.+ pub const fn offset_of(&self, x: u32, y: u32) -> Option<usize> {+ if x >= self.width || y >= self.height {+ return None;+ }+ Some((y as usize * self.width as usize + x as usize) * BYTES_PER_PIXEL)+ }++ /// Reads one pixel as `[r, g, b, a]`.+ pub fn pixel(&self, x: u32, y: u32) -> Option<[u8; 4]> {+ let offset = self.offset_of(x, y)?;+ Some([+ self.pixels[offset],+ self.pixels[offset + 1],+ self.pixels[offset + 2],+ self.pixels[offset + 3],+ ])+ }++ /// Writes one pixel. Out-of-bounds writes are ignored.+ pub fn set_pixel(&mut self, x: u32, y: u32, rgba: [u8; 4]) {+ if let Some(offset) = self.offset_of(x, y) {+ self.pixels[offset..offset + BYTES_PER_PIXEL].copy_from_slice(&rgba);+ }+ }++ /// Fills the whole frame with one colour.+ pub fn fill(&mut self, rgba: [u8; 4]) {+ for pixel in self.pixels.chunks_exact_mut(BYTES_PER_PIXEL) {+ pixel.copy_from_slice(&rgba);+ }+ }++ /// Iterates over rows, top to bottom.+ pub fn rows(&self) -> impl Iterator<Item = &[u8]> {+ self.pixels.chunks_exact(self.width as usize * BYTES_PER_PIXEL)+ }+}++impl fmt::Debug for Frame {+ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {+ // Never dump several megabytes of pixels into a log line.+ f.debug_struct("Frame")+ .field("width", &self.width)+ .field("height", &self.height)+ .field("bytes", &self.pixels.len())+ .finish()+ }+}++#[cfg(test)]+mod tests {+ use super::*;++ #[test]+ fn black_is_opaque() {+ let frame = Frame::black(2, 2);+ assert_eq!(frame.pixel(0, 0), Some([0, 0, 0, 255]));+ assert_eq!(frame.pixels().len(), 16);+ }++ #[test]+ fn transparent_is_clear() {+ assert_eq!(Frame::transparent(1, 1).pixel(0, 0), Some([0, 0, 0, 0]));+ }++ #[test]+ fn rejects_a_buffer_of_the_wrong_size() {+ assert!(Frame::from_rgba(2, 2, vec![0; 15]).is_none());+ assert!(Frame::from_rgba(2, 2, vec![0; 16]).is_some());+ }++ #[test]+ fn out_of_bounds_access_is_none_not_a_panic() {+ let mut frame = Frame::black(2, 2);+ assert_eq!(frame.pixel(2, 0), None);+ assert_eq!(frame.pixel(0, 2), None);+ frame.set_pixel(99, 99, [255, 0, 0, 255]); // ignored+ }++ #[test]+ fn set_and_read_a_pixel() {+ let mut frame = Frame::black(4, 3);+ frame.set_pixel(3, 2, [1, 2, 3, 4]);+ assert_eq!(frame.pixel(3, 2), Some([1, 2, 3, 4]));+ assert_eq!(frame.pixel(2, 3), None);+ }++ #[test]+ fn rows_are_tightly_packed() {+ let frame = Frame::black(5, 4);+ assert_eq!(frame.rows().count(), 4);+ assert!(frame.rows().all(|row| row.len() == 20));+ }+}diff --git a/engine/crates/relay-core/src/lib.rs b/engine/crates/relay-core/src/lib.rsnew file mode 100644index 00000000..033d6fc2--- /dev/null+++ b/engine/crates/relay-core/src/lib.rs@@ -0,0 +1,23 @@+//! Core vocabulary of the Relay engine.+//!+//! This crate holds the types that every other crate needs to agree on, and+//! nothing else. It has no dependencies and does no IO.+//!+//! - [`time`] - exact rational timestamps. Every time value in Relay is a+//! [`time::Rational`] number of seconds. Never `f64`.+//! - [`arena`] - generational arenas and `Copy` handles, the way Relay models+//! graphs. See `docs/decisions/0003-arena-handles-not-pointers.md`.+//! - [`frame`] - a decoded RGBA8 image buffer.+//! - [`timeline`] - projects, tracks and clips.+//!+//! If you are about to add a dependency to this crate, the thing you are adding+//! probably belongs in `relay-media` or `relay-render` instead.++pub mod arena;+pub mod frame;+pub mod time;+pub mod timeline;++pub use frame::Frame;+pub use time::{FrameRate, Rational, TimeRange};+pub use timeline::{Clip, ClipId, Project, Timeline, Track, TrackId, TrackKind};diff --git a/engine/crates/relay-core/src/time.rs b/engine/crates/relay-core/src/time.rsnew file mode 100644index 00000000..0c5ca5d2--- /dev/null+++ b/engine/crates/relay-core/src/time.rs@@ -0,0 +1,444 @@+//! Exact rational time.+//!+//! Video editing is frame-accurate arithmetic on rates that are not+//! representable in binary floating point. 29.97 fps is really 30000/1001, and+//! an `f64` accumulator drifts: after an hour of adding `1.0 / 29.97` you are+//! visibly off. So every timestamp in Relay is a [`Rational`] number of+//! **seconds**, and conversions to `f64` happen only at the edges - display,+//! and arguments handed to FFmpeg.+//!+//! ```+//! use relay_core::time::{FrameRate, Rational};+//!+//! let rate = FrameRate::NTSC_30; // 30000/1001+//! let t = rate.time_of_frame(1800); // exactly 60.06 seconds+//! assert_eq!(t, Rational::new(60060, 1000));+//! assert_eq!(rate.frame_at(t), 1800); // and it round-trips, forever+//! ```++use std::cmp::Ordering;+use std::fmt;+use std::ops::{Add, AddAssign, Div, Mul, Neg, Sub, SubAssign};++/// Greatest common divisor of two integers, ignoring sign.+const fn gcd(a: i128, b: i128) -> i128 {+ let mut a = if a < 0 { -a } else { a };+ let mut b = if b < 0 { -b } else { b };+ while b != 0 {+ let t = a % b;+ a = b;+ b = t;+ }+ a+}++/// An exact rational number, always stored in lowest terms with a positive+/// denominator.+///+/// Used throughout Relay to mean *seconds* unless a doc comment says otherwise.+///+/// Arithmetic is performed in `i128` and reduced before being stored back into+/// `i64`. That is enough headroom for any realistic timeline; a value that+/// genuinely cannot be represented panics rather than silently wrapping.+#[derive(Clone, Copy, PartialEq, Eq, Hash)]+pub struct Rational {+ num: i64,+ den: i64,+}++impl Rational {+ /// Zero seconds.+ pub const ZERO: Self = Self { num: 0, den: 1 };+ /// One second.+ pub const ONE: Self = Self { num: 1, den: 1 };++ /// Builds `num / den` in lowest terms.+ ///+ /// # Panics+ /// If `den` is zero.+ pub fn new(num: i64, den: i64) -> Self {+ Self::reduce(i128::from(num), i128::from(den))+ }++ /// Builds a whole number of seconds.+ pub const fn from_int(value: i64) -> Self {+ Self { num: value, den: 1 }+ }++ /// Parses FFmpeg's `"num/den"` fraction syntax, also accepting a bare+ /// integer or decimal. Returns `None` on anything else, including `"0/0"`,+ /// which FFmpeg emits for streams with no meaningful frame rate.+ pub fn parse(text: &str) -> Option<Self> {+ let text = text.trim();+ if let Some((num, den)) = text.split_once('/') {+ let num: i64 = num.trim().parse().ok()?;+ let den: i64 = den.trim().parse().ok()?;+ if den == 0 {+ return None;+ }+ return Some(Self::new(num, den));+ }+ if let Some((whole, frac)) = text.split_once('.') {+ let sign = if whole.starts_with('-') { -1 } else { 1 };+ let whole: i64 = whole.trim().parse().ok()?;+ let digits = frac.trim();+ if digits.is_empty() || !digits.bytes().all(|b| b.is_ascii_digit()) {+ return None;+ }+ let den = 10i64.checked_pow(u32::try_from(digits.len()).ok()?)?;+ let frac: i64 = digits.parse().ok()?;+ return Some(Self::new(whole.checked_mul(den)? + sign * frac, den));+ }+ text.parse().ok().map(Self::from_int)+ }++ fn reduce(num: i128, den: i128) -> Self {+ assert!(den != 0, "Rational denominator must not be zero");+ let (num, den) = if den < 0 { (-num, -den) } else { (num, den) };+ let divisor = gcd(num, den).max(1);+ let (num, den) = (num / divisor, den / divisor);+ Self {+ num: i64::try_from(num).expect("rational numerator overflowed i64"),+ den: i64::try_from(den).expect("rational denominator overflowed i64"),+ }+ }++ /// The numerator, in lowest terms.+ pub const fn numerator(self) -> i64 {+ self.num+ }++ /// The denominator, in lowest terms. Always positive.+ pub const fn denominator(self) -> i64 {+ self.den+ }++ /// True if this is exactly zero.+ pub const fn is_zero(self) -> bool {+ self.num == 0+ }++ /// True if this is less than zero.+ pub const fn is_negative(self) -> bool {+ self.num < 0+ }++ /// The multiplicative inverse.+ ///+ /// # Panics+ /// If this is zero.+ pub fn recip(self) -> Self {+ assert!(!self.is_zero(), "cannot take the reciprocal of zero");+ Self::reduce(i128::from(self.den), i128::from(self.num))+ }++ /// The largest integer less than or equal to this value.+ pub const fn floor(self) -> i64 {+ self.num.div_euclid(self.den)+ }++ /// The smallest integer greater than or equal to this value.+ pub const fn ceil(self) -> i64 {+ -((-self.num).div_euclid(self.den))+ }++ /// Clamps to the inclusive range `[low, high]`.+ pub fn clamp_to(self, low: Self, high: Self) -> Self {+ if self < low {+ low+ } else if self > high {+ high+ } else {+ self+ }+ }++ /// Lossy conversion, for display and for arguments handed to FFmpeg.+ ///+ /// Do not convert back. If a value round-trips through `f64` it is no+ /// longer exact, and that is how frame drift starts.+ pub fn as_f64(self) -> f64 {+ self.num as f64 / self.den as f64+ }+}++impl Ord for Rational {+ fn cmp(&self, other: &Self) -> Ordering {+ // Denominators are always positive, so cross-multiplying preserves order.+ let left = i128::from(self.num) * i128::from(other.den);+ let right = i128::from(other.num) * i128::from(self.den);+ left.cmp(&right)+ }+}++impl PartialOrd for Rational {+ fn partial_cmp(&self, other: &Self) -> Option<Ordering> {+ Some(self.cmp(other))+ }+}++impl Add for Rational {+ type Output = Self;+ fn add(self, rhs: Self) -> Self {+ let num = i128::from(self.num) * i128::from(rhs.den) + i128::from(rhs.num) * i128::from(self.den);+ Self::reduce(num, i128::from(self.den) * i128::from(rhs.den))+ }+}++impl Sub for Rational {+ type Output = Self;+ fn sub(self, rhs: Self) -> Self {+ self + (-rhs)+ }+}++impl Mul for Rational {+ type Output = Self;+ fn mul(self, rhs: Self) -> Self {+ Self::reduce(+ i128::from(self.num) * i128::from(rhs.num),+ i128::from(self.den) * i128::from(rhs.den),+ )+ }+}++impl Div for Rational {+ type Output = Self;+ fn div(self, rhs: Self) -> Self {+ assert!(!rhs.is_zero(), "cannot divide a Rational by zero");+ Self::reduce(+ i128::from(self.num) * i128::from(rhs.den),+ i128::from(self.den) * i128::from(rhs.num),+ )+ }+}++impl Neg for Rational {+ type Output = Self;+ fn neg(self) -> Self {+ Self { num: -self.num, den: self.den }+ }+}++impl AddAssign for Rational {+ fn add_assign(&mut self, rhs: Self) {+ *self = *self + rhs;+ }+}++impl SubAssign for Rational {+ fn sub_assign(&mut self, rhs: Self) {+ *self = *self - rhs;+ }+}++impl From<i64> for Rational {+ fn from(value: i64) -> Self {+ Self::from_int(value)+ }+}++impl fmt::Display for Rational {+ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {+ if self.den == 1 {+ write!(f, "{}", self.num)+ } else {+ write!(f, "{}/{}", self.num, self.den)+ }+ }+}++impl fmt::Debug for Rational {+ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {+ write!(f, "{self}")+ }+}++/// Frames per second, as an exact fraction.+///+/// Always positive. Construct the broadcast rates from the associated+/// constants rather than typing `29.97` anywhere.+#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]+pub struct FrameRate(Rational);++impl FrameRate {+ /// 23.976 fps (24000/1001).+ pub const FILM_NTSC: Self = Self(Rational { num: 24000, den: 1001 });+ /// 24 fps.+ pub const FILM: Self = Self(Rational { num: 24, den: 1 });+ /// 25 fps.+ pub const PAL: Self = Self(Rational { num: 25, den: 1 });+ /// 29.97 fps (30000/1001).+ pub const NTSC_30: Self = Self(Rational { num: 30000, den: 1001 });+ /// 30 fps.+ pub const THIRTY: Self = Self(Rational { num: 30, den: 1 });+ /// 59.94 fps (60000/1001).+ pub const NTSC_60: Self = Self(Rational { num: 60000, den: 1001 });+ /// 60 fps.+ pub const SIXTY: Self = Self(Rational { num: 60, den: 1 });++ /// Builds a frame rate from an exact fraction of frames per second.+ ///+ /// # Panics+ /// If `fps` is zero or negative.+ pub fn new(fps: Rational) -> Self {+ assert!(!fps.is_zero() && !fps.is_negative(), "frame rate must be positive");+ Self(fps)+ }++ /// Builds a whole-number frame rate.+ pub fn from_int(fps: u32) -> Self {+ Self::new(Rational::from_int(i64::from(fps)))+ }++ /// Frames per second.+ pub const fn fps(self) -> Rational {+ self.0+ }++ /// How long one frame lasts, in seconds.+ pub fn frame_duration(self) -> Rational {+ self.0.recip()+ }++ /// The timestamp at which frame `index` begins. Frame 0 begins at zero.+ pub fn time_of_frame(self, index: i64) -> Rational {+ Rational::from_int(index) * self.frame_duration()+ }++ /// The index of the frame that is on screen at `time`.+ ///+ /// Frames are half-open intervals: a timestamp exactly on a boundary+ /// belongs to the frame that starts there.+ pub fn frame_at(self, time: Rational) -> i64 {+ (time * self.0).floor()+ }++ /// How many whole frames fit in `duration`.+ pub fn frames_in(self, duration: Rational) -> i64 {+ (duration * self.0).floor()+ }+}++impl fmt::Display for FrameRate {+ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {+ write!(f, "{:.3} fps", self.0.as_f64())+ }+}++/// A half-open span of time, `[start, start + duration)`.+#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]+pub struct TimeRange {+ /// When the span begins.+ pub start: Rational,+ /// How long the span lasts. Never negative.+ pub duration: Rational,+}++impl TimeRange {+ /// Builds a span.+ ///+ /// # Panics+ /// If `duration` is negative.+ pub fn new(start: Rational, duration: Rational) -> Self {+ assert!(!duration.is_negative(), "TimeRange duration must not be negative");+ Self { start, duration }+ }++ /// The first instant after the span.+ pub fn end(self) -> Rational {+ self.start + self.duration+ }++ /// True if `time` falls inside the span. The end is excluded.+ pub fn contains(self, time: Rational) -> bool {+ time >= self.start && time < self.end()+ }++ /// True if the two spans share at least one instant.+ pub fn overlaps(self, other: Self) -> bool {+ self.start < other.end() && other.start < self.end()+ }+}++#[cfg(test)]+mod tests {+ use super::*;++ #[test]+ fn reduces_to_lowest_terms() {+ let r = Rational::new(6, 8);+ assert_eq!((r.numerator(), r.denominator()), (3, 4));+ }++ #[test]+ fn normalises_a_negative_denominator() {+ let r = Rational::new(1, -2);+ assert_eq!((r.numerator(), r.denominator()), (-1, 2));+ }++ #[test]+ fn equal_values_written_differently_compare_equal() {+ assert_eq!(Rational::new(1, 2), Rational::new(50, 100));+ }++ #[test]+ fn arithmetic_is_exact() {+ let third = Rational::new(1, 3);+ assert_eq!(third + third + third, Rational::ONE);+ }++ #[test]+ fn ntsc_never_drifts() {+ // The whole reason this module exists: an f64 accumulator is visibly+ // wrong here, and this is exact after an hour of frames.+ let rate = FrameRate::NTSC_30;+ let mut clock = Rational::ZERO;+ for _ in 0..107_892 {+ clock += rate.frame_duration();+ }+ assert_eq!(clock, rate.time_of_frame(107_892));+ assert_eq!(rate.frame_at(clock), 107_892);+ }++ #[test]+ fn frame_boundaries_belong_to_the_frame_that_starts_there() {+ let rate = FrameRate::THIRTY;+ assert_eq!(rate.frame_at(rate.time_of_frame(7)), 7);+ assert_eq!(rate.frame_at(rate.time_of_frame(7) - Rational::new(1, 1_000_000)), 6);+ }++ #[test]+ fn floor_and_ceil_handle_negatives() {+ assert_eq!(Rational::new(-3, 2).floor(), -2);+ assert_eq!(Rational::new(-3, 2).ceil(), -1);+ assert_eq!(Rational::new(3, 2).floor(), 1);+ assert_eq!(Rational::new(3, 2).ceil(), 2);+ }++ #[test]+ fn parses_ffmpeg_fractions() {+ assert_eq!(Rational::parse("30000/1001"), Some(FrameRate::NTSC_30.fps()));+ assert_eq!(Rational::parse("25"), Some(Rational::from_int(25)));+ assert_eq!(Rational::parse("1.5"), Some(Rational::new(3, 2)));+ assert_eq!(Rational::parse("-1.25"), Some(Rational::new(-5, 4)));+ assert_eq!(Rational::parse("0/0"), None);+ assert_eq!(Rational::parse("N/A"), None);+ }++ #[test]+ fn ranges_are_half_open() {+ let range = TimeRange::new(Rational::from_int(2), Rational::from_int(3));+ assert!(range.contains(Rational::from_int(2)));+ assert!(!range.contains(Rational::from_int(5)));+ assert_eq!(range.end(), Rational::from_int(5));+ }++ #[test]+ fn touching_ranges_do_not_overlap() {+ let a = TimeRange::new(Rational::ZERO, Rational::from_int(2));+ let b = TimeRange::new(Rational::from_int(2), Rational::from_int(2));+ assert!(!a.overlaps(b));+ assert!(a.overlaps(TimeRange::new(Rational::ONE, Rational::from_int(2))));+ }+}diff --git a/engine/crates/relay-core/src/timeline.rs b/engine/crates/relay-core/src/timeline.rsnew file mode 100644index 00000000..c002783b--- /dev/null+++ b/engine/crates/relay-core/src/timeline.rs@@ -0,0 +1,354 @@+//! The edit itself: a project, its tracks, and the clips on them.+//!+//! Tracks and clips live in arenas and are addressed by [`TrackId`] and+//! [`ClipId`]. Nothing here owns another editable object directly, which is+//! what makes undo, cross-references and multi-threaded rendering tractable.+//!+//! Track order is explicit and bottom-first: `track_ids()[0]` is composited+//! first and everything after it draws on top.++use std::path::{Path, PathBuf};++use crate::arena::{Arena, Id};+use crate::time::{FrameRate, Rational, TimeRange};++/// Handle to a [`Track`].+pub type TrackId = Id<Track>;+/// Handle to a [`Clip`].+pub type ClipId = Id<Clip>;++/// What kind of material a track carries.+#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]+pub enum TrackKind {+ /// Picture.+ Video,+ /// Sound.+ Audio,+}++/// Where a clip's pixels come from.+///+/// A path today. When a media library lands this becomes a handle into it, and+/// this is the one type that has to change.+#[derive(Clone, PartialEq, Eq, Hash, Debug)]+pub struct MediaRef {+ /// Path to the media file on disk.+ pub path: PathBuf,+}++impl MediaRef {+ /// References a file on disk.+ pub fn new(path: impl Into<PathBuf>) -> Self {+ Self { path: path.into() }+ }++ /// The referenced path.+ pub fn path(&self) -> &Path {+ &self.path+ }+}++/// A span of one piece of media, placed on a track.+#[derive(Clone, Debug)]+pub struct Clip {+ /// Where the pixels come from.+ pub media: MediaRef,+ /// The in-point: how far into the media the clip starts.+ pub source_start: Rational,+ /// Where the clip sits on the timeline.+ pub start: Rational,+ /// How long the clip runs on the timeline.+ pub duration: Rational,+ /// Blend factor in `0.0..=1.0`, applied over whatever is beneath.+ pub opacity: f32,+}++impl Clip {+ /// A clip that starts at the beginning of its media and is fully opaque.+ pub fn new(media: MediaRef, start: Rational, duration: Rational) -> Self {+ Self { media, source_start: Rational::ZERO, start, duration, opacity: 1.0 }+ }++ /// The span of timeline this clip occupies.+ pub fn range(&self) -> TimeRange {+ TimeRange::new(self.start, self.duration)+ }++ /// True if the clip is on screen at `time`.+ pub fn contains(&self, time: Rational) -> bool {+ self.range().contains(time)+ }++ /// Converts a timeline timestamp into a timestamp within the source media,+ /// or `None` if the clip is not on screen then.+ ///+ /// This is the one piece of arithmetic that every trim, ripple and slip+ /// operation ultimately has to agree with, so it lives in exactly one place.+ pub fn source_time_at(&self, time: Rational) -> Option<Rational> {+ self.contains(time).then(|| self.source_start + (time - self.start))+ }+}++/// A horizontal lane of clips.+#[derive(Clone, Debug)]+pub struct Track {+ /// Display name.+ pub name: String,+ /// Picture or sound.+ pub kind: TrackKind,+ /// When false the track is skipped entirely while rendering.+ pub enabled: bool,+ clips: Vec<ClipId>,+}++impl Track {+ /// An empty, enabled track.+ pub fn new(name: impl Into<String>, kind: TrackKind) -> Self {+ Self { name: name.into(), kind, enabled: true, clips: Vec::new() }+ }++ /// The clips on this track, in insertion order.+ pub fn clips(&self) -> &[ClipId] {+ &self.clips+ }+}++/// The edit: output format, tracks, and the clips on them.+#[derive(Debug)]+pub struct Timeline {+ /// Output frame rate.+ pub frame_rate: FrameRate,+ /// Output width in pixels.+ pub width: u32,+ /// Output height in pixels.+ pub height: u32,+ tracks: Arena<Track>,+ clips: Arena<Clip>,+ order: Vec<TrackId>,+}++impl Timeline {+ /// An empty timeline with the given output format.+ pub fn new(width: u32, height: u32, frame_rate: FrameRate) -> Self {+ Self {+ frame_rate,+ width,+ height,+ tracks: Arena::new(),+ clips: Arena::new(),+ order: Vec::new(),+ }+ }++ /// A 1920x1080, 30 fps timeline - the default for a new project.+ pub fn hd() -> Self {+ Self::new(1920, 1080, FrameRate::THIRTY)+ }++ /// Adds a track on top of the existing ones.+ pub fn add_track(&mut self, track: Track) -> TrackId {+ let id = self.tracks.insert(track);+ self.order.push(id);+ id+ }++ /// Track handles, bottom-most first. Composite in this order.+ pub fn track_ids(&self) -> &[TrackId] {+ &self.order+ }++ /// Borrows a track.+ pub fn track(&self, id: TrackId) -> Option<&Track> {+ self.tracks.get(id)+ }++ /// Mutably borrows a track.+ pub fn track_mut(&mut self, id: TrackId) -> Option<&mut Track> {+ self.tracks.get_mut(id)+ }++ /// Iterates over tracks bottom-most first.+ pub fn tracks(&self) -> impl Iterator<Item = (TrackId, &Track)> {+ self.order.iter().filter_map(|&id| self.tracks.get(id).map(|track| (id, track)))+ }++ /// Removes a track and every clip on it.+ pub fn remove_track(&mut self, id: TrackId) -> Option<Track> {+ let track = self.tracks.remove(id)?;+ for &clip in &track.clips {+ self.clips.remove(clip);+ }+ self.order.retain(|&other| other != id);+ Some(track)+ }++ /// Places a clip on a track. Returns `None` if the track handle is stale.+ pub fn add_clip(&mut self, track: TrackId, clip: Clip) -> Option<ClipId> {+ // Insert into the clip arena only once we know the track is real,+ // otherwise a stale handle leaks an orphaned clip.+ self.tracks.get(track)?;+ let id = self.clips.insert(clip);+ self.tracks.get_mut(track).expect("checked above").clips.push(id);+ Some(id)+ }++ /// Borrows a clip.+ pub fn clip(&self, id: ClipId) -> Option<&Clip> {+ self.clips.get(id)+ }++ /// Mutably borrows a clip.+ pub fn clip_mut(&mut self, id: ClipId) -> Option<&mut Clip> {+ self.clips.get_mut(id)+ }++ /// Removes a clip from wherever it sits.+ pub fn remove_clip(&mut self, id: ClipId) -> Option<Clip> {+ let clip = self.clips.remove(id)?;+ for (_, track) in self.tracks.iter_mut() {+ track.clips.retain(|&other| other != id);+ }+ Some(clip)+ }++ /// How many clips the timeline holds, across all tracks.+ pub const fn clip_count(&self) -> usize {+ self.clips.len()+ }++ /// The clip visible on `track` at `time`, if any.+ ///+ /// Clips on one track are not supposed to overlap; if they do, the+ /// last-added one wins, which matches what you see after a paste.+ pub fn clip_on_track_at(&self, track: TrackId, time: Rational) -> Option<ClipId> {+ let track = self.tracks.get(track)?;+ track+ .clips+ .iter()+ .rev()+ .copied()+ .find(|&id| self.clips.get(id).is_some_and(|clip| clip.contains(time)))+ }++ /// Where the last clip ends. Zero for an empty timeline.+ pub fn duration(&self) -> Rational {+ self.clips.iter().map(|(_, clip)| clip.range().end()).max().unwrap_or(Rational::ZERO)+ }++ /// How many whole output frames the timeline runs for.+ pub fn frame_count(&self) -> i64 {+ self.frame_rate.frames_in(self.duration())+ }+}++/// A timeline plus the things that surround it on disk.+#[derive(Debug)]+pub struct Project {+ /// Display name.+ pub name: String,+ /// The edit.+ pub timeline: Timeline,+}++impl Project {+ /// A new, empty project at the given output format.+ pub fn new(name: impl Into<String>, timeline: Timeline) -> Self {+ Self { name: name.into(), timeline }+ }+}++#[cfg(test)]+mod tests {+ use super::*;++ fn seconds(value: i64) -> Rational {+ Rational::from_int(value)+ }++ fn fixture() -> (Timeline, TrackId, ClipId) {+ let mut timeline = Timeline::hd();+ let track = timeline.add_track(Track::new("V1", TrackKind::Video));+ let clip = timeline+ .add_clip(track, Clip::new(MediaRef::new("a.mp4"), seconds(2), seconds(3)))+ .expect("track exists");+ (timeline, track, clip)+ }++ #[test]+ fn a_clip_maps_timeline_time_to_source_time() {+ let (timeline, _, clip) = fixture();+ let clip = timeline.clip(clip).expect("clip exists");++ assert_eq!(clip.source_time_at(seconds(2)), Some(Rational::ZERO));+ assert_eq!(clip.source_time_at(seconds(4)), Some(seconds(2)));+ assert_eq!(clip.source_time_at(seconds(1)), None, "before the clip");+ assert_eq!(clip.source_time_at(seconds(5)), None, "the end is exclusive");+ }++ #[test]+ fn an_in_point_offsets_the_source_time() {+ let (mut timeline, _, id) = fixture();+ timeline.clip_mut(id).expect("clip exists").source_start = seconds(10);+ let clip = timeline.clip(id).expect("clip exists");+ assert_eq!(clip.source_time_at(seconds(2)), Some(seconds(10)));+ assert_eq!(clip.source_time_at(seconds(3)), Some(seconds(11)));+ }++ #[test]+ fn finds_the_clip_under_the_playhead() {+ let (timeline, track, clip) = fixture();+ assert_eq!(timeline.clip_on_track_at(track, seconds(3)), Some(clip));+ assert_eq!(timeline.clip_on_track_at(track, seconds(9)), None);+ }++ #[test]+ fn duration_is_the_end_of_the_last_clip() {+ let (mut timeline, track, _) = fixture();+ assert_eq!(timeline.duration(), seconds(5));++ timeline+ .add_clip(track, Clip::new(MediaRef::new("b.mp4"), seconds(5), seconds(4)))+ .expect("track exists");+ assert_eq!(timeline.duration(), seconds(9));+ assert_eq!(timeline.frame_count(), 270); // 9s at 30fps+ }++ #[test]+ fn tracks_come_back_bottom_most_first() {+ let mut timeline = Timeline::hd();+ let lower = timeline.add_track(Track::new("V1", TrackKind::Video));+ let upper = timeline.add_track(Track::new("V2", TrackKind::Video));+ assert_eq!(timeline.track_ids(), &[lower, upper]);+ }++ #[test]+ fn removing_a_track_takes_its_clips_with_it() {+ let (mut timeline, track, clip) = fixture();+ timeline.remove_track(track);++ assert!(timeline.clip(clip).is_none());+ assert_eq!(timeline.clip_count(), 0);+ assert!(timeline.track_ids().is_empty());+ assert_eq!(timeline.duration(), Rational::ZERO);+ }++ #[test]+ fn removing_a_clip_unlinks_it_from_its_track() {+ let (mut timeline, track, clip) = fixture();+ assert!(timeline.remove_clip(clip).is_some());++ assert!(timeline.track(track).expect("track exists").clips().is_empty());+ assert_eq!(timeline.clip_on_track_at(track, seconds(3)), None);+ assert!(timeline.remove_clip(clip).is_none(), "removing twice is harmless");+ }++ #[test]+ fn a_stale_track_handle_does_not_leak_a_clip() {+ let (mut timeline, track, _) = fixture();+ timeline.remove_track(track);++ let orphan = timeline.add_clip(track, Clip::new(MediaRef::new("c.mp4"), seconds(0), seconds(1)));+ assert_eq!(orphan, None);+ assert_eq!(timeline.clip_count(), 0);+ }+}diff --git a/engine/crates/relay-media/Cargo.toml b/engine/crates/relay-media/Cargo.tomlnew file mode 100644index 00000000..208adb7d--- /dev/null+++ b/engine/crates/relay-media/Cargo.toml@@ -0,0 +1,14 @@+[package]+name = "relay-media"+version.workspace = true+edition.workspace = true+rust-version.workspace = true+description = "Getting pixels in and out of media files. The only crate that knows FFmpeg exists."++[dependencies]+relay-core.workspace = true+serde_json.workspace = true+thiserror.workspace = true++[lints]+workspace = truediff --git a/engine/crates/relay-media/src/decode.rs b/engine/crates/relay-media/src/decode.rsnew file mode 100644index 00000000..d7df0e85--- /dev/null+++ b/engine/crates/relay-media/src/decode.rs@@ -0,0 +1,281 @@+//! Pulling RGBA frames out of a file.++use std::io::Read;+use std::path::{Path, PathBuf};+use std::process::{Child, ChildStdout, Command, Stdio};++use relay_core::frame::Frame;+use relay_core::time::{FrameRate, Rational};++use crate::error::{Error, Result};+use crate::probe;++const FFMPEG: &str = "ffmpeg";++/// Anything that yields frames in order.+///+/// The engine is written against this rather than against [`FfmpegDecoder`], so+/// that a GPU-decode backend can be dropped in later, and so that tests can+/// feed synthetic frames without touching the disk.+pub trait FrameSource {+ /// Width of the frames this source produces.+ fn width(&self) -> u32;++ /// Height of the frames this source produces.+ fn height(&self) -> u32;++ /// The next frame, or `Ok(None)` at the end of the stream.+ fn next_frame(&mut self) -> Result<Option<Frame>>;+}++/// How to open a decoder.+#[derive(Clone, Debug, Default)]+pub struct DecodeOptions {+ /// Seek here before the first frame.+ pub start: Option<Rational>,+ /// Stop after this many frames.+ pub max_frames: Option<u64>,+ /// Scale to this size. Defaults to the file's own dimensions.+ pub size: Option<(u32, u32)>,+ /// Resample to this frame rate, duplicating or dropping frames.+ pub frame_rate: Option<FrameRate>,+ /// Repeat the input forever.+ ///+ /// A still image is a one-frame stream: decode it normally and you get a+ /// single frame and then end-of-stream, which on a timeline means the+ /// picture vanishes after 1/30th of a second. Looping makes it behave like+ /// footage of arbitrary length, and the caller stops pulling when the clip+ /// ends.+ pub looping: bool,+}++impl DecodeOptions {+ /// Seeks to `start` before decoding.+ pub fn starting_at(mut self, start: Rational) -> Self {+ self.start = Some(start);+ self+ }++ /// Stops after `count` frames.+ pub fn limited_to(mut self, count: u64) -> Self {+ self.max_frames = Some(count);+ self+ }++ /// Scales output to `width` by `height`.+ pub fn scaled_to(mut self, width: u32, height: u32) -> Self {+ self.size = Some((width, height));+ self+ }++ /// Resamples output to `rate`.+ pub fn at_rate(mut self, rate: FrameRate) -> Self {+ self.frame_rate = Some(rate);+ self+ }++ /// Repeats the input forever. See [`DecodeOptions::looping`].+ pub fn repeating(mut self) -> Self {+ self.looping = true;+ self+ }+}++/// Decodes a file by piping raw RGBA out of an `ffmpeg` child process.+///+/// The child's stderr is inherited rather than captured: reading two pipes from+/// one process without deadlocking needs a second thread, and at `-loglevel+/// error` the only thing it ever prints is the message you want to see anyway.+pub struct FfmpegDecoder {+ path: PathBuf,+ child: Child,+ stdout: ChildStdout,+ width: u32,+ height: u32,+ /// Reused between frames so decoding does not allocate per frame.+ buffer: Vec<u8>,+ produced: u64,+ limit: Option<u64>,+ finished: bool,+}++impl FfmpegDecoder {+ /// Opens `path` for decoding.+ ///+ /// If `options.size` is not set this probes the file first to learn its+ /// dimensions, because the pipe carries raw pixels with no header to say+ /// how big a frame is.+ pub fn open(path: impl AsRef<Path>, options: &DecodeOptions) -> Result<Self> {+ let path = path.as_ref();+ let (width, height) = match options.size {+ Some(size) => size,+ None => {+ let info = probe::probe(path)?;+ let video = info.require_video()?;+ (video.width, video.height)+ }+ };++ let mut command = Command::new(FFMPEG);+ command.args(["-hide_banner", "-nostdin", "-loglevel", "error"]);++ // Both of these are *input* options and have to precede -i.+ if options.looping {+ command.args(["-loop", "1"]);+ }++ // -ss before -i is the fast seek: FFmpeg jumps to the nearest keyframe+ // and decodes forward, instead of decoding everything and discarding it.+ if let Some(start) = options.start {+ command.args(["-ss", &format!("{:.6}", start.as_f64())]);+ }+ command.arg("-i").arg(path);++ if let Some(limit) = options.max_frames {+ command.args(["-frames:v", &limit.to_string()]);+ }+ if options.size.is_some() {+ command.args(["-vf", &format!("scale={width}:{height}")]);+ }+ if let Some(rate) = options.frame_rate {+ command.args(["-r", &fraction(rate)]);+ }++ command+ .args(["-f", "rawvideo", "-pix_fmt", "rgba", "-"])+ .stdout(Stdio::piped())+ .stdin(Stdio::null())+ .stderr(Stdio::inherit());++ let mut child =+ command.spawn().map_err(|source| Error::Spawn { program: FFMPEG, source })?;+ let stdout = child.stdout.take().expect("stdout was piped");++ Ok(Self {+ path: path.to_path_buf(),+ child,+ stdout,+ width,+ height,+ buffer: vec![0u8; Frame::byte_len(width, height)],+ produced: 0,+ limit: options.max_frames,+ finished: false,+ })+ }++ /// How many frames have been produced so far.+ pub const fn produced(&self) -> u64 {+ self.produced+ }++ /// Reaps the child and turns a non-zero exit into an error.+ fn finish(&mut self) -> Result<()> {+ if self.finished {+ return Ok(());+ }+ self.finished = true;+ let status = self.child.wait().map_err(|source| Error::Io { program: FFMPEG, source })?;+ if status.success() {+ Ok(())+ } else {+ Err(Error::Exited { program: FFMPEG, path: self.path.clone(), status })+ }+ }+}++impl FrameSource for FfmpegDecoder {+ fn width(&self) -> u32 {+ self.width+ }++ fn height(&self) -> u32 {+ self.height+ }++ fn next_frame(&mut self) -> Result<Option<Frame>> {+ if self.finished || self.limit.is_some_and(|limit| self.produced >= limit) {+ return Ok(None);+ }++ // read_exact would collapse a clean end-of-stream and a truncated frame+ // into the same error, and those mean very different things here.+ let mut filled = 0;+ while filled < self.buffer.len() {+ match self.stdout.read(&mut self.buffer[filled..]) {+ Ok(0) => break,+ Ok(read) => filled += read,+ Err(error) if error.kind() == std::io::ErrorKind::Interrupted => continue,+ Err(source) => return Err(Error::Io { program: FFMPEG, source }),+ }+ }++ if filled == 0 {+ self.finish()?;+ return Ok(None);+ }+ if filled < self.buffer.len() {+ let error = Error::PartialFrame {+ path: self.path.clone(),+ got: filled,+ want: self.buffer.len(),+ };+ let _ = self.finish();+ return Err(error);+ }++ self.produced += 1;+ Ok(Some(+ Frame::from_rgba(self.width, self.height, self.buffer.clone())+ .expect("buffer is sized from the same width and height"),+ ))+ }+}++impl Drop for FfmpegDecoder {+ fn drop(&mut self) {+ // Dropping a decoder mid-stream is normal - a scrub replaces it. Kill+ // the child rather than leaking an ffmpeg process per seek.+ if !self.finished {+ let _ = self.child.kill();+ let _ = self.child.wait();+ }+ }+}++/// Formats a frame rate as an exact `num/den` fraction. FFmpeg accepts these,+/// so 29.97 stays 30000/1001 all the way through.+fn fraction(rate: FrameRate) -> String {+ let fps = rate.fps();+ format!("{}/{}", fps.numerator(), fps.denominator())+}++#[cfg(test)]+mod tests {+ use super::*;++ #[test]+ fn frame_rates_reach_ffmpeg_as_exact_fractions() {+ assert_eq!(fraction(FrameRate::NTSC_30), "30000/1001");+ assert_eq!(fraction(FrameRate::THIRTY), "30/1");+ }++ #[test]+ fn options_build_up() {+ let options = DecodeOptions::default()+ .starting_at(Rational::from_int(2))+ .limited_to(10)+ .scaled_to(640, 360);+ assert_eq!(options.start, Some(Rational::from_int(2)));+ assert_eq!(options.max_frames, Some(10));+ assert_eq!(options.size, Some((640, 360)));+ }++ #[test]+ fn a_missing_ffmpeg_is_a_spawn_error_not_a_panic() {+ // Nothing to assert about the happy path without a fixture file, but+ // the error path must stay a Result.+ let result = FfmpegDecoder::open("does-not-exist.mp4", &DecodeOptions::default());+ assert!(result.is_err());+ }+}diff --git a/engine/crates/relay-media/src/encode.rs b/engine/crates/relay-media/src/encode.rsnew file mode 100644index 00000000..8099c808--- /dev/null+++ b/engine/crates/relay-media/src/encode.rs@@ -0,0 +1,189 @@+//! Writing RGBA frames back out to a file.++use std::io::Write;+use std::path::{Path, PathBuf};+use std::process::{Child, ChildStdin, Command, Stdio};++use relay_core::frame::Frame;+use relay_core::time::FrameRate;++use crate::error::{Error, Result};++const FFMPEG: &str = "ffmpeg";++/// Anything that accepts finished frames.+///+/// The mirror of [`FrameSource`](crate::decode::FrameSource): render code+/// writes to this trait, so an export target, a preview window and a test spy+/// are interchangeable.+pub trait FrameSink {+ /// Accepts one frame. Frames must all be the size the sink was opened with.+ fn write_frame(&mut self, frame: &Frame) -> Result<()>;++ /// Flushes and closes. Always call this - a dropped sink produces a+ /// truncated file, because the encoder never got to write its trailer.+ fn finish(&mut self) -> Result<()>;+}++/// Encoder settings.+#[derive(Clone, Debug)]+pub struct EncodeOptions {+ /// Video codec, as FFmpeg names it.+ pub codec: String,+ /// x264-style speed/size tradeoff.+ pub preset: String,+ /// Constant rate factor. Lower is better quality and a bigger file.+ pub crf: u8,+ /// Output pixel format. `yuv420p` is what players actually accept.+ pub pixel_format: String,+}++impl Default for EncodeOptions {+ fn default() -> Self {+ Self {+ codec: "libx264".to_owned(),+ preset: "medium".to_owned(),+ crf: 18,+ pixel_format: "yuv420p".to_owned(),+ }+ }+}++/// Encodes by piping raw RGBA into an `ffmpeg` child process.+pub struct FfmpegEncoder {+ path: PathBuf,+ child: Child,+ /// Taken in `finish` - closing the pipe is what tells FFmpeg to stop.+ stdin: Option<ChildStdin>,+ width: u32,+ height: u32,+ written: u64,+}++impl FfmpegEncoder {+ /// Opens `path` for writing, overwriting anything already there.+ pub fn create(+ path: impl AsRef<Path>,+ width: u32,+ height: u32,+ frame_rate: FrameRate,+ options: &EncodeOptions,+ ) -> Result<Self> {+ let path = path.as_ref();+ let fps = frame_rate.fps();++ let mut command = Command::new(FFMPEG);+ command+ .args(["-hide_banner", "-nostdin", "-loglevel", "error", "-y"])+ // Input: what is coming down the pipe.+ .args(["-f", "rawvideo", "-pix_fmt", "rgba"])+ .args(["-s", &format!("{width}x{height}")])+ .args(["-r", &format!("{}/{}", fps.numerator(), fps.denominator())])+ .args(["-i", "-"])+ // Output.+ .args(["-c:v", &options.codec])+ .args(["-preset", &options.preset])+ .args(["-crf", &options.crf.to_string()])+ .args(["-pix_fmt", &options.pixel_format])+ .args(["-movflags", "+faststart"])+ .arg(path)+ .stdin(Stdio::piped())+ .stdout(Stdio::null())+ .stderr(Stdio::inherit());++ let mut child =+ command.spawn().map_err(|source| Error::Spawn { program: FFMPEG, source })?;+ let stdin = child.stdin.take().expect("stdin was piped");++ Ok(Self { path: path.to_path_buf(), child, stdin: Some(stdin), width, height, written: 0 })+ }++ /// How many frames have been accepted so far.+ pub const fn written(&self) -> u64 {+ self.written+ }+}++impl FrameSink for FfmpegEncoder {+ fn write_frame(&mut self, frame: &Frame) -> Result<()> {+ if frame.width() != self.width || frame.height() != self.height {+ // Raw video has no framing, so a wrong-sized frame would not fail+ // here - it would silently shear every frame after it.+ return Err(Error::FrameSizeMismatch {+ want_width: self.width,+ want_height: self.height,+ got_width: frame.width(),+ got_height: frame.height(),+ });+ }++ let Some(stdin) = self.stdin.as_mut() else {+ return Err(Error::Io {+ program: FFMPEG,+ source: std::io::Error::other("encoder was already finished"),+ });+ };++ stdin+ .write_all(frame.pixels())+ .map_err(|source| Error::Io { program: FFMPEG, source })?;+ self.written += 1;+ Ok(())+ }++ fn finish(&mut self) -> Result<()> {+ // Closing stdin is the signal to flush and write the trailer.+ drop(self.stdin.take());++ let status = self.child.wait().map_err(|source| Error::Io { program: FFMPEG, source })?;+ if status.success() {+ Ok(())+ } else {+ Err(Error::Exited { program: FFMPEG, path: self.path.clone(), status })+ }+ }+}++impl Drop for FfmpegEncoder {+ fn drop(&mut self) {+ if self.stdin.is_some() {+ // finish() was never called, so the output is garbage anyway.+ // Kill the child instead of blocking a drop on an encode flush.+ drop(self.stdin.take());+ let _ = self.child.kill();+ let _ = self.child.wait();+ }+ }+}++#[cfg(test)]+mod tests {+ use super::*;++ #[test]+ fn defaults_are_a_playable_h264_file() {+ let options = EncodeOptions::default();+ assert_eq!(options.codec, "libx264");+ assert_eq!(options.pixel_format, "yuv420p", "yuv444 will not play in browsers");+ }++ #[test]+ fn a_wrong_sized_frame_is_rejected() {+ let Ok(mut encoder) = FfmpegEncoder::create(+ std::env::temp_dir().join("relay-encode-size-test.mp4"),+ 64,+ 64,+ FrameRate::THIRTY,+ &EncodeOptions::default(),+ ) else {+ // No FFmpeg on this machine; nothing to assert.+ return;+ };++ let wrong = Frame::black(32, 32);+ assert!(matches!(+ encoder.write_frame(&wrong),+ Err(Error::FrameSizeMismatch { got_width: 32, .. })+ ));+ }+}diff --git a/engine/crates/relay-media/src/error.rs b/engine/crates/relay-media/src/error.rsnew file mode 100644index 00000000..1d149874--- /dev/null+++ b/engine/crates/relay-media/src/error.rs@@ -0,0 +1,85 @@+//! What can go wrong when talking to FFmpeg.++use std::path::PathBuf;+use std::process::ExitStatus;++/// Shorthand for results in this crate.+pub type Result<T> = std::result::Result<T, Error>;++/// A media IO failure.+///+/// The messages name the program and the file, because the first question you+/// will ask six months from now is "which file, and what did FFmpeg say".+#[derive(Debug, thiserror::Error)]+pub enum Error {+ /// The `ffmpeg` or `ffprobe` binary could not be started at all.+ #[error("could not run `{program}` - is FFmpeg installed and on PATH?")]+ Spawn {+ /// Which binary we tried to start.+ program: &'static str,+ /// The underlying OS error.+ #[source]+ source: std::io::Error,+ },++ /// The child process ran and exited unhappily.+ #[error("`{program}` exited with {status} while handling {path}")]+ Exited {+ /// Which binary failed.+ program: &'static str,+ /// The file it was working on.+ path: PathBuf,+ /// Its exit status.+ status: ExitStatus,+ },++ /// An IO error moving bytes over the pipe.+ #[error("io error talking to `{program}`")]+ Io {+ /// Which binary we were talking to.+ program: &'static str,+ /// The underlying OS error.+ #[source]+ source: std::io::Error,+ },++ /// `ffprobe` returned something we could not make sense of.+ #[error("could not understand ffprobe output for {path}: {detail}")]+ Probe {+ /// The file being probed.+ path: PathBuf,+ /// What specifically was missing or malformed.+ detail: String,+ },++ /// The file has no video stream, but we were asked to decode pictures.+ #[error("{path} has no video stream")]+ NoVideoStream {+ /// The file in question.+ path: PathBuf,+ },++ /// The decoder stopped mid-frame, which means FFmpeg died partway through.+ #[error("{path} produced a partial frame ({got} of {want} bytes)")]+ PartialFrame {+ /// The file being decoded.+ path: PathBuf,+ /// How many bytes arrived.+ got: usize,+ /// How many bytes a frame needs.+ want: usize,+ },++ /// A frame handed to an encoder was not the size the encoder was opened for.+ #[error("expected {want_width}x{want_height} frames, got {got_width}x{got_height}")]+ FrameSizeMismatch {+ /// Width the encoder was opened with.+ want_width: u32,+ /// Height the encoder was opened with.+ want_height: u32,+ /// Width of the offending frame.+ got_width: u32,+ /// Height of the offending frame.+ got_height: u32,+ },+}diff --git a/engine/crates/relay-media/src/lib.rs b/engine/crates/relay-media/src/lib.rsnew file mode 100644index 00000000..10cc7a94--- /dev/null+++ b/engine/crates/relay-media/src/lib.rs@@ -0,0 +1,20 @@+//! Media IO: reading frames out of files and writing them back.+//!+//! This is the only crate that knows FFmpeg exists, and it talks to it as a+//! child process rather than through FFI. See+//! `docs/decisions/0002-ffmpeg-over-a-pipe.md` for the reasoning and the exit+//! criteria.+//!+//! Everything process-shaped hides behind two traits, [`FrameSource`] and+//! [`FrameSink`]. A future GPU-decode or FFI backend implements those two and+//! nothing else in the workspace changes.++pub mod decode;+pub mod encode;+pub mod error;+pub mod probe;++pub use decode::{DecodeOptions, FfmpegDecoder, FrameSource};+pub use encode::{EncodeOptions, FfmpegEncoder, FrameSink};+pub use error::{Error, Result};+pub use probe::{AudioStream, MediaInfo, VideoStream, probe};diff --git a/engine/crates/relay-media/src/probe.rs b/engine/crates/relay-media/src/probe.rsnew file mode 100644index 00000000..d68fe8be--- /dev/null+++ b/engine/crates/relay-media/src/probe.rs@@ -0,0 +1,226 @@+//! Asking `ffprobe` what is inside a file.++use std::path::{Path, PathBuf};+use std::process::Command;++use relay_core::time::{FrameRate, Rational};+use serde_json::Value;++use crate::error::{Error, Result};++const FFPROBE: &str = "ffprobe";++/// What a video stream looks like.+#[derive(Clone, Debug)]+pub struct VideoStream {+ /// Stream index within the file.+ pub index: u32,+ /// Codec short name, for example `h264`.+ pub codec: String,+ /// Coded width in pixels.+ pub width: u32,+ /// Coded height in pixels.+ pub height: u32,+ /// Average frame rate, exact.+ pub frame_rate: FrameRate,+}++/// What an audio stream looks like.+#[derive(Clone, Debug)]+pub struct AudioStream {+ /// Stream index within the file.+ pub index: u32,+ /// Codec short name, for example `aac`.+ pub codec: String,+ /// Samples per second.+ pub sample_rate: u32,+ /// Channel count.+ pub channels: u32,+}++/// A summary of one media file.+///+/// Relay only cares about the first video and first audio stream. Multi-stream+/// files exist, but nothing in the editor addresses them yet, and inventing an+/// API for a case we do not handle would be worse than not having one.+#[derive(Clone, Debug)]+pub struct MediaInfo {+ /// The file this describes.+ pub path: PathBuf,+ /// Container duration, when the container bothers to state one.+ pub duration: Option<Rational>,+ /// First video stream, if any.+ pub video: Option<VideoStream>,+ /// First audio stream, if any.+ pub audio: Option<AudioStream>,+}++impl MediaInfo {+ /// The video stream, or [`Error::NoVideoStream`] if the file has none.+ pub fn require_video(&self) -> Result<&VideoStream> {+ self.video.as_ref().ok_or_else(|| Error::NoVideoStream { path: self.path.clone() })+ }+}++/// Runs `ffprobe` and summarises what it found.+pub fn probe(path: impl AsRef<Path>) -> Result<MediaInfo> {+ let path = path.as_ref();+ let output = Command::new(FFPROBE)+ .args(["-v", "error", "-show_streams", "-show_format", "-of", "json"])+ .arg(path)+ .output()+ .map_err(|source| Error::Spawn { program: FFPROBE, source })?;++ if !output.status.success() {+ return Err(Error::Exited {+ program: FFPROBE,+ path: path.to_path_buf(),+ status: output.status,+ });+ }++ let root: Value = serde_json::from_slice(&output.stdout).map_err(|error| Error::Probe {+ path: path.to_path_buf(),+ detail: format!("output was not valid json: {error}"),+ })?;++ let streams = root.get("streams").and_then(Value::as_array).ok_or_else(|| Error::Probe {+ path: path.to_path_buf(),+ detail: "no `streams` array".to_owned(),+ })?;++ Ok(MediaInfo {+ path: path.to_path_buf(),+ duration: root+ .get("format")+ .and_then(|format| format.get("duration"))+ .and_then(Value::as_str)+ .and_then(Rational::parse),+ video: streams.iter().find_map(|stream| parse_video(stream, path)).transpose()?,+ audio: streams.iter().find_map(parse_audio),+ })+}++/// Returns `None` for non-video streams, `Some(Err(..))` for a video stream we+/// cannot make sense of. Skipping a malformed video stream silently would show+/// up much later as a blank preview.+fn parse_video(stream: &Value, path: &Path) -> Option<Result<VideoStream>> {+ if stream.get("codec_type").and_then(Value::as_str) != Some("video") {+ return None;+ }++ let missing = |field: &str| Error::Probe {+ path: path.to_path_buf(),+ detail: format!("video stream has no usable `{field}`"),+ };++ Some((|| {+ let width = u32_field(stream, "width").ok_or_else(|| missing("width"))?;+ let height = u32_field(stream, "height").ok_or_else(|| missing("height"))?;++ // `avg_frame_rate` is 0/0 for streams with no constant rate, in which+ // case `r_frame_rate` carries the best guess FFmpeg has.+ let frame_rate = ["avg_frame_rate", "r_frame_rate"]+ .iter()+ .filter_map(|field| stream.get(field).and_then(Value::as_str))+ .find_map(Rational::parse)+ .filter(|rate| !rate.is_zero() && !rate.is_negative())+ .ok_or_else(|| missing("frame rate"))?;++ Ok(VideoStream {+ index: u32_field(stream, "index").unwrap_or(0),+ codec: string_field(stream, "codec_name"),+ width,+ height,+ frame_rate: FrameRate::new(frame_rate),+ })+ })())+}++fn parse_audio(stream: &Value) -> Option<AudioStream> {+ if stream.get("codec_type").and_then(Value::as_str) != Some("audio") {+ return None;+ }+ Some(AudioStream {+ index: u32_field(stream, "index").unwrap_or(0),+ codec: string_field(stream, "codec_name"),+ sample_rate: u32_field(stream, "sample_rate").unwrap_or(0),+ channels: u32_field(stream, "channels").unwrap_or(0),+ })+}++/// ffprobe is inconsistent about quoting numbers, so accept both forms.+fn u32_field(stream: &Value, field: &str) -> Option<u32> {+ let value = stream.get(field)?;+ match value {+ Value::Number(number) => number.as_u64().and_then(|n| u32::try_from(n).ok()),+ Value::String(text) => text.parse().ok(),+ _ => None,+ }+}++fn string_field(stream: &Value, field: &str) -> String {+ stream.get(field).and_then(Value::as_str).unwrap_or("unknown").to_owned()+}++#[cfg(test)]+mod tests {+ use super::*;++ fn json(text: &str) -> Value {+ serde_json::from_str(text).expect("test json is valid")+ }++ #[test]+ fn reads_a_video_stream() {+ let stream = json(+ r#"{"codec_type":"video","index":0,"codec_name":"h264",+ "width":1920,"height":1080,"avg_frame_rate":"30000/1001"}"#,+ );+ let video = parse_video(&stream, Path::new("a.mp4")).expect("is video").expect("parses");+ assert_eq!((video.width, video.height), (1920, 1080));+ assert_eq!(video.frame_rate, FrameRate::NTSC_30);+ assert_eq!(video.codec, "h264");+ }++ #[test]+ fn falls_back_when_avg_frame_rate_is_zero() {+ let stream = json(+ r#"{"codec_type":"video","width":640,"height":480,+ "avg_frame_rate":"0/0","r_frame_rate":"25/1"}"#,+ );+ let video = parse_video(&stream, Path::new("a.mp4")).expect("is video").expect("parses");+ assert_eq!(video.frame_rate, FrameRate::PAL);+ }++ #[test]+ fn accepts_numbers_quoted_or_not() {+ let quoted = json(r#"{"width":"640"}"#);+ let bare = json(r#"{"width":640}"#);+ assert_eq!(u32_field("ed, "width"), Some(640));+ assert_eq!(u32_field(&bare, "width"), Some(640));+ }++ #[test]+ fn a_video_stream_with_no_usable_rate_is_an_error_not_a_skip() {+ let stream = json(r#"{"codec_type":"video","width":64,"height":64,"avg_frame_rate":"0/0"}"#);+ let result = parse_video(&stream, Path::new("a.mp4")).expect("is video");+ assert!(matches!(result, Err(Error::Probe { .. })));+ }++ #[test]+ fn ignores_non_video_streams() {+ assert!(parse_video(&json(r#"{"codec_type":"audio"}"#), Path::new("a.mp4")).is_none());+ }++ #[test]+ fn reads_an_audio_stream() {+ let stream = json(+ r#"{"codec_type":"audio","index":1,"codec_name":"aac",+ "sample_rate":"48000","channels":2}"#,+ );+ let audio = parse_audio(&stream).expect("is audio");+ assert_eq!((audio.sample_rate, audio.channels), (48000, 2));+ assert_eq!(audio.codec, "aac");+ }+}diff --git a/engine/crates/relay-render/Cargo.toml b/engine/crates/relay-render/Cargo.tomlnew file mode 100644index 00000000..6446ae3f--- /dev/null+++ b/engine/crates/relay-render/Cargo.toml@@ -0,0 +1,12 @@+[package]+name = "relay-render"+version.workspace = true+edition.workspace = true+rust-version.workspace = true+description = "Turning a timeline plus a timestamp into one finished frame."++[dependencies]+relay-core.workspace = true++[lints]+workspace = truediff --git a/engine/crates/relay-render/src/compositor.rs b/engine/crates/relay-render/src/compositor.rsnew file mode 100644index 00000000..cebc627f--- /dev/null+++ b/engine/crates/relay-render/src/compositor.rs@@ -0,0 +1,231 @@+//! Blending layers into one frame.+//!+//! [`CpuCompositor`] is the reference implementation: obvious, dependency-free,+//! and slow enough that it will eventually only be used for tests and for+//! checking the GPU path's output. The `Compositor` trait is the seam that+//! `wgpu` will slot into.++use relay_core::frame::{BYTES_PER_PIXEL, Frame};++/// One source image, positioned and weighted.+#[derive(Clone, Copy, Debug)]+pub struct Layer<'a> {+ /// The pixels to draw.+ pub frame: &'a Frame,+ /// Blend strength over what is beneath, in `0.0..=1.0`.+ pub opacity: f32,+ /// Horizontal offset of the layer's top-left corner. May be negative.+ pub x: i32,+ /// Vertical offset of the layer's top-left corner. May be negative.+ pub y: i32,+}++impl<'a> Layer<'a> {+ /// A layer drawn at the origin, fully opaque.+ pub fn new(frame: &'a Frame) -> Self {+ Self { frame, opacity: 1.0, x: 0, y: 0 }+ }++ /// Sets the blend strength.+ pub fn with_opacity(mut self, opacity: f32) -> Self {+ self.opacity = opacity;+ self+ }++ /// Sets the top-left corner.+ pub fn at(mut self, x: i32, y: i32) -> Self {+ self.x = x;+ self.y = y;+ self+ }+}++/// Blends layers into a single output frame.+pub trait Compositor {+ /// Draws `layers` bottom-most first over an opaque black background.+ ///+ /// Layers may hang off any edge; anything outside the output is clipped.+ /// The result is always fully opaque - it is what goes to screen or to an+ /// encoder, and neither has anything to show through.+ fn composite(&mut self, width: u32, height: u32, layers: &[Layer<'_>]) -> Frame;+}++/// A straightforward CPU compositor.+#[derive(Clone, Copy, Default, Debug)]+pub struct CpuCompositor;++impl Compositor for CpuCompositor {+ fn composite(&mut self, width: u32, height: u32, layers: &[Layer<'_>]) -> Frame {+ let mut output = Frame::black(width, height);++ for layer in layers {+ let opacity = layer.opacity.clamp(0.0, 1.0);+ if opacity <= 0.0 {+ continue;+ }++ let source = layer.frame;+ let Some((dst_x, src_x, columns)) = overlap(layer.x, source.width(), width) else {+ continue;+ };+ let Some((dst_y, src_y, rows)) = overlap(layer.y, source.height(), height) else {+ continue;+ };++ blend_region(+ &mut output,+ source,+ (dst_x, dst_y),+ (src_x, src_y),+ (columns, rows),+ opacity,+ );+ }++ output+ }+}++/// Works out the visible span along one axis when a layer of `source` pixels is+/// placed at `offset` inside a destination of `destination` pixels.+///+/// Returns `(destination_start, source_start, count)`, or `None` when the layer+/// falls entirely outside.+fn overlap(offset: i32, source: u32, destination: u32) -> Option<(u32, u32, u32)> {+ let source = i64::from(source);+ let destination = i64::from(destination);+ let offset = i64::from(offset);++ let dst_start = offset.max(0);+ let src_start = (-offset).max(0);+ let count = (source - src_start).min(destination - dst_start);++ (count > 0).then_some((dst_start as u32, src_start as u32, count as u32))+}++/// Source-over alpha blend of an aligned rectangle.+fn blend_region(+ output: &mut Frame,+ source: &Frame,+ (dst_x, dst_y): (u32, u32),+ (src_x, src_y): (u32, u32),+ (columns, rows): (u32, u32),+ opacity: f32,+) {+ let src_stride = source.width() as usize * BYTES_PER_PIXEL;+ let dst_stride = output.width() as usize * BYTES_PER_PIXEL;+ let span = columns as usize * BYTES_PER_PIXEL;++ let src_pixels = source.pixels();+ let dst_pixels = output.pixels_mut();++ for row in 0..rows as usize {+ let src_offset = (src_y as usize + row) * src_stride + src_x as usize * BYTES_PER_PIXEL;+ let dst_offset = (dst_y as usize + row) * dst_stride + dst_x as usize * BYTES_PER_PIXEL;++ let src_row = &src_pixels[src_offset..src_offset + span];+ let dst_row = &mut dst_pixels[dst_offset..dst_offset + span];++ for (src_pixel, dst_pixel) in+ src_row.chunks_exact(BYTES_PER_PIXEL).zip(dst_row.chunks_exact_mut(BYTES_PER_PIXEL))+ {+ let alpha = (f32::from(src_pixel[3]) / 255.0) * opacity;+ if alpha <= 0.0 {+ continue;+ }+ for channel in 0..3 {+ let over = f32::from(src_pixel[channel]) * alpha;+ let under = f32::from(dst_pixel[channel]) * (1.0 - alpha);+ dst_pixel[channel] = (over + under).round().clamp(0.0, 255.0) as u8;+ }+ dst_pixel[3] = 255;+ }+ }+}++#[cfg(test)]+mod tests {+ use super::*;++ fn solid(width: u32, height: u32, rgba: [u8; 4]) -> Frame {+ let mut frame = Frame::transparent(width, height);+ frame.fill(rgba);+ frame+ }++ #[test]+ fn no_layers_gives_opaque_black() {+ let frame = CpuCompositor.composite(2, 2, &[]);+ assert_eq!(frame.pixel(0, 0), Some([0, 0, 0, 255]));+ }++ #[test]+ fn an_opaque_layer_replaces_the_background() {+ let red = solid(2, 2, [255, 0, 0, 255]);+ let frame = CpuCompositor.composite(2, 2, &[Layer::new(&red)]);+ assert_eq!(frame.pixel(1, 1), Some([255, 0, 0, 255]));+ }++ #[test]+ fn half_opacity_lands_halfway() {+ let white = solid(1, 1, [255, 255, 255, 255]);+ let frame = CpuCompositor.composite(1, 1, &[Layer::new(&white).with_opacity(0.5)]);+ assert_eq!(frame.pixel(0, 0), Some([128, 128, 128, 255]));+ }++ #[test]+ fn source_alpha_and_layer_opacity_multiply() {+ let half_alpha = solid(1, 1, [255, 255, 255, 128]);+ let frame = CpuCompositor.composite(1, 1, &[Layer::new(&half_alpha).with_opacity(0.5)]);+ // 128/255 * 0.5 ~= 0.251+ assert_eq!(frame.pixel(0, 0), Some([64, 64, 64, 255]));+ }++ #[test]+ fn later_layers_draw_on_top() {+ let red = solid(1, 1, [255, 0, 0, 255]);+ let blue = solid(1, 1, [0, 0, 255, 255]);+ let frame = CpuCompositor.composite(1, 1, &[Layer::new(&red), Layer::new(&blue)]);+ assert_eq!(frame.pixel(0, 0), Some([0, 0, 255, 255]));+ }++ #[test]+ fn a_transparent_layer_changes_nothing() {+ let clear = Frame::transparent(2, 2);+ let frame = CpuCompositor.composite(2, 2, &[Layer::new(&clear)]);+ assert_eq!(frame.pixel(0, 0), Some([0, 0, 0, 255]));+ }++ #[test]+ fn offset_layers_are_clipped_not_wrapped() {+ let red = solid(2, 2, [255, 0, 0, 255]);+ // Placed so only its bottom-right pixel lands on the output's top-left.+ let frame = CpuCompositor.composite(2, 2, &[Layer::new(&red).at(-1, -1)]);+ assert_eq!(frame.pixel(0, 0), Some([255, 0, 0, 255]));+ assert_eq!(frame.pixel(1, 1), Some([0, 0, 0, 255]), "must not wrap around");+ }++ #[test]+ fn a_layer_entirely_off_screen_is_skipped() {+ let red = solid(2, 2, [255, 0, 0, 255]);+ let frame = CpuCompositor.composite(2, 2, &[Layer::new(&red).at(50, 50)]);+ assert_eq!(frame.pixel(0, 0), Some([0, 0, 0, 255]));+ }++ #[test]+ fn a_layer_larger_than_the_output_is_cropped() {+ let red = solid(8, 8, [255, 0, 0, 255]);+ let frame = CpuCompositor.composite(2, 2, &[Layer::new(&red)]);+ assert_eq!(frame.width(), 2);+ assert_eq!(frame.pixel(1, 1), Some([255, 0, 0, 255]));+ }++ #[test]+ fn overlap_spans_are_correct() {+ assert_eq!(overlap(0, 4, 4), Some((0, 0, 4)));+ assert_eq!(overlap(2, 4, 4), Some((2, 0, 2)));+ assert_eq!(overlap(-2, 4, 4), Some((0, 2, 2)));+ assert_eq!(overlap(4, 4, 4), None);+ assert_eq!(overlap(-4, 4, 4), None);+ }+}diff --git a/engine/crates/relay-render/src/lib.rs b/engine/crates/relay-render/src/lib.rsnew file mode 100644index 00000000..3b249267--- /dev/null+++ b/engine/crates/relay-render/src/lib.rs@@ -0,0 +1,17 @@+//! Turning a timeline plus a timestamp into one finished frame.+//!+//! Rendering splits in two, and the split is the important part of this crate:+//!+//! 1. [`plan`] answers "what is on screen at this instant, from where, and how+//! strongly". It touches no pixels and does no IO, so it is fast, exactly+//! testable, and identical for the CPU and GPU backends.+//! 2. [`compositor`] takes that plan plus the decoded pixels and blends them.+//!+//! Only step 2 is backend-specific. See+//! `docs/decisions/0004-cpu-compositor-first.md`.++pub mod compositor;+pub mod plan;++pub use compositor::{Compositor, CpuCompositor, Layer};+pub use plan::{FramePlan, PlannedLayer, plan_frame};diff --git a/engine/crates/relay-render/src/plan.rs b/engine/crates/relay-render/src/plan.rsnew file mode 100644index 00000000..56ec67a4--- /dev/null+++ b/engine/crates/relay-render/src/plan.rs@@ -0,0 +1,160 @@+//! Deciding what is on screen at a given instant.+//!+//! A [`FramePlan`] is the contract between the editor model and whatever draws+//! pixels. It names the media, the exact source timestamp and the blend+//! strength for each visible layer, bottom-most first, and it does so without+//! opening a single file.+//!+//! Keeping this pure is what lets you unit-test "does a cut land on the right+//! frame" in microseconds instead of by exporting a file and squinting at it.++use std::path::PathBuf;++use relay_core::time::Rational;+use relay_core::timeline::{ClipId, Timeline, TrackKind};++/// One visible layer at one instant.+#[derive(Clone, PartialEq, Debug)]+pub struct PlannedLayer {+ /// Which clip produced this layer.+ pub clip: ClipId,+ /// The file to pull pixels from.+ pub media: PathBuf,+ /// The timestamp *within that file* to pull.+ pub source_time: Rational,+ /// Blend strength over everything beneath, in `0.0..=1.0`.+ pub opacity: f32,+}++/// Everything needed to draw one output frame.+#[derive(Clone, PartialEq, Debug)]+pub struct FramePlan {+ /// The timeline instant this describes.+ pub time: Rational,+ /// Output width.+ pub width: u32,+ /// Output height.+ pub height: u32,+ /// Visible layers, bottom-most first.+ pub layers: Vec<PlannedLayer>,+}++impl FramePlan {+ /// True if nothing is on screen. The result is a black frame, not an error:+ /// gaps in a timeline are ordinary.+ pub fn is_empty(&self) -> bool {+ self.layers.is_empty()+ }+}++/// Works out what is on screen at `time`.+///+/// Audio tracks and disabled tracks are skipped. A track with no clip under the+/// playhead simply contributes nothing.+pub fn plan_frame(timeline: &Timeline, time: Rational) -> FramePlan {+ let mut layers = Vec::new();++ for (track_id, track) in timeline.tracks() {+ if !track.enabled || track.kind != TrackKind::Video {+ continue;+ }+ let Some(clip_id) = timeline.clip_on_track_at(track_id, time) else {+ continue;+ };+ let Some(clip) = timeline.clip(clip_id) else {+ continue;+ };+ let Some(source_time) = clip.source_time_at(time) else {+ continue;+ };++ layers.push(PlannedLayer {+ clip: clip_id,+ media: clip.media.path.clone(),+ source_time,+ opacity: clip.opacity.clamp(0.0, 1.0),+ });+ }++ FramePlan { time, width: timeline.width, height: timeline.height, layers }+}++#[cfg(test)]+mod tests {+ use relay_core::time::FrameRate;+ use relay_core::timeline::{Clip, MediaRef, Track};++ use super::*;++ fn seconds(value: i64) -> Rational {+ Rational::from_int(value)+ }++ #[test]+ fn stacks_layers_bottom_most_first() {+ let mut timeline = Timeline::new(640, 360, FrameRate::THIRTY);+ let lower = timeline.add_track(Track::new("V1", TrackKind::Video));+ let upper = timeline.add_track(Track::new("V2", TrackKind::Video));+ timeline+ .add_clip(lower, Clip::new(MediaRef::new("bottom.mp4"), seconds(0), seconds(10)))+ .expect("track exists");+ timeline+ .add_clip(upper, Clip::new(MediaRef::new("top.mp4"), seconds(0), seconds(10)))+ .expect("track exists");++ let plan = plan_frame(&timeline, seconds(4));+ let media: Vec<_> = plan.layers.iter().map(|layer| layer.media.clone()).collect();+ assert_eq!(media, vec![PathBuf::from("bottom.mp4"), PathBuf::from("top.mp4")]);+ assert_eq!((plan.width, plan.height), (640, 360));+ }++ #[test]+ fn maps_each_layer_to_its_own_source_time() {+ let mut timeline = Timeline::new(640, 360, FrameRate::THIRTY);+ let track = timeline.add_track(Track::new("V1", TrackKind::Video));+ let mut clip = Clip::new(MediaRef::new("a.mp4"), seconds(5), seconds(10));+ clip.source_start = seconds(30);+ timeline.add_clip(track, clip).expect("track exists");++ let plan = plan_frame(&timeline, seconds(7));+ assert_eq!(plan.layers[0].source_time, seconds(32), "2s into a clip that starts at 30s");+ }++ #[test]+ fn a_gap_plans_to_nothing() {+ let mut timeline = Timeline::new(640, 360, FrameRate::THIRTY);+ let track = timeline.add_track(Track::new("V1", TrackKind::Video));+ timeline+ .add_clip(track, Clip::new(MediaRef::new("a.mp4"), seconds(0), seconds(2)))+ .expect("track exists");++ assert!(plan_frame(&timeline, seconds(5)).is_empty());+ }++ #[test]+ fn skips_disabled_and_audio_tracks() {+ let mut timeline = Timeline::new(640, 360, FrameRate::THIRTY);+ let muted = timeline.add_track(Track::new("V1", TrackKind::Video));+ let audio = timeline.add_track(Track::new("A1", TrackKind::Audio));+ timeline.track_mut(muted).expect("track exists").enabled = false;++ for track in [muted, audio] {+ timeline+ .add_clip(track, Clip::new(MediaRef::new("a.mp4"), seconds(0), seconds(10)))+ .expect("track exists");+ }++ assert!(plan_frame(&timeline, seconds(1)).is_empty());+ }++ #[test]+ fn clamps_a_nonsense_opacity() {+ let mut timeline = Timeline::new(640, 360, FrameRate::THIRTY);+ let track = timeline.add_track(Track::new("V1", TrackKind::Video));+ let mut clip = Clip::new(MediaRef::new("a.mp4"), seconds(0), seconds(10));+ clip.opacity = 4.0;+ timeline.add_clip(track, clip).expect("track exists");++ assert_eq!(plan_frame(&timeline, seconds(1)).layers[0].opacity, 1.0);+ }+}diff --git a/engine/docs/decisions/0001-rust-over-cpp.md b/engine/docs/decisions/0001-rust-over-cpp.mdnew file mode 100644index 00000000..84624623--- /dev/null+++ b/engine/docs/decisions/0001-rust-over-cpp.md@@ -0,0 +1,25 @@+# 0001 - Rust, not C++++## Decision+The engine is written in Rust.++## Why+- The render path is a fan-out across cores sharing a frame cache. Data races and+ use-after-free on frame buffers are *the* bug class here, and they are compile+ errors in Rust instead of a corrupt frame three hours into a render.+- This project is maintained by one person, intermittently. Rust's payoff is that+ you debug at compile time, alone, from the error text. No exceptions unwinding+ through the render loop, no implicit conversions, no surprise copy constructors.+- One build system, one formatter, one linter, one doc generator. Re-entering a+ C++ codebase cold means re-learning whatever build archaeology it invented.+- `wgpu` gives one GPU backend across Vulkan/Metal/DX12. In C++ that portability+ is a permanent tax.++## What it costs+- OpenFX / VST plugin hosting is a C ABI and will need `unsafe extern "C"` shims.+- Some vendor encoder SDKs are C++-first.+- Lifetime and trait-bound errors on generic code can be opaque - mitigated by+ keeping generics shallow.++## What would change our mind+A hard dependency that only ships a C++-template-only API.diff --git a/engine/docs/decisions/0002-ffmpeg-over-a-pipe.md b/engine/docs/decisions/0002-ffmpeg-over-a-pipe.mdnew file mode 100644index 00000000..ef2033d1--- /dev/null+++ b/engine/docs/decisions/0002-ffmpeg-over-a-pipe.md@@ -0,0 +1,74 @@+# 0002 - FFmpeg as a subprocess now, FFI where the pipe cannot reach++*Revised. The first version of this note claimed the pipe was fine until 4K+playback. That was too generous: two of its limits are correctness problems,+not performance ones, and they bite much earlier. The revised trigger is at the+bottom.*++## Decision+Split by use case rather than picking one backend for everything.++| Path | Backend | Status |+|---|---|---|+| Probe (`ffprobe`) | subprocess | Permanent. Runs once per import; robustness beats latency. |+| Export / render | subprocess | Permanent unless throughput demands otherwise. |+| Playback and scrubbing | **FFI** (`rsmpeg` or `ffmpeg-next`) | Not built yet. Required before playback ships. |++Today only the subprocess backends exist, because nothing scrubs yet. The FFI+backend arrives with the frame cache and the transport, not before.++## Why the subprocess path is genuinely right for probe and export+- A crashing decoder on malformed input kills a child process, not the editor.+ We are parsing arbitrary user media; every serious video app has a CVE+ history in its demuxers.+- The boundary is trivially debuggable: print the argv, paste it into a shell,+ read what FFmpeg says.+- It builds anywhere `ffmpeg` is on `PATH`. No headers, no import libs, no+ bindgen, no `FFMPEG_DIR` to keep correct on every machine and CI runner+ forever. For a project maintained by one person intermittently, that is worth+ a great deal.++## What the pipe cannot do, in order of severity++1. **No timestamps.** `rawvideo` is a naked pixel stream with no PTS. Frame time+ is inferred from ordinal position, which is only true for constant-frame-rate+ material. Variable-frame-rate footage - screen recordings, phone video -+ silently desyncs. There is no way to fix this over a pipe; the information+ simply is not in the stream.+2. **No frame-accurate seek.** `-ss` lands on a keyframe. Seeking to an exact+ frame means decode-from-keyframe-and-discard, per request, which the pipe+ cannot express.+3. **No hardware decode into GPU textures.** Frames must land in system memory+ and be uploaded again, which defeats the point of the `wgpu` compositor.+4. **Bandwidth.** 1080p60 RGBA is roughly 500 MB/s through the pipe.+5. **A process spawn per media open.** A twenty-clip timeline being scrubbed+ means spawning and killing processes continuously.++Items 1 and 2 are correctness. Items 3 to 5 are performance. That ordering is+the whole reason this note was rewritten.++## Containment+Everything process-shaped hides behind `FrameSource` and `FrameSink` in+`relay-media`. The FFI backend is one new type implementing `FrameSource`;+`relay-core`, `relay-render` and every caller stay untouched. The subprocess+decoder stays as a fallback for formats the linked build was not compiled with.++## What the FFI work will actually cost+Not "add a crate". As of writing, the development machine has FFmpeg 8.1 from+Chocolatey - binaries only, no `libavcodec/avcodec.h` and no import libs, and+`pkg-config` has nothing FFmpeg-shaped to find. So the work is:++- source a `-shared` dev build (gyan.dev) or `vcpkg install ffmpeg`,+- set and document `FFMPEG_DIR`, and keep it true on every machine and CI runner,+- get bindgen agreeing with the installed MSVC toolchain,+- then write the wrapper: roughly 500 lines of `unsafe extern "C"` behind a safe+ `FrameSource`.++Budget for the build plumbing, not the Rust. The Rust is the easy half.++## What would change our mind+Building playback. Specifically, the first time we need either a real PTS or a+frame-accurate seek - whichever comes first. Both arrive with the transport+controls, so that is the deadline.++Do **not** wait for 4K, and do not migrate probe or export along with it.diff --git a/engine/docs/decisions/0003-arena-handles-not-pointers.md b/engine/docs/decisions/0003-arena-handles-not-pointers.mdnew file mode 100644index 00000000..4c47d95d--- /dev/null+++ b/engine/docs/decisions/0003-arena-handles-not-pointers.md@@ -0,0 +1,22 @@+# 0003 - Timeline and graph objects are arena handles, not `Rc<RefCell<..>>`++## Decision+Clips, tracks and graph nodes live in a `relay_core::arena::Arena<T>` and are+referred to by a `Copy` handle, `Id<T>`.++## Why+- Editor data is a graph: clips reference media, effects reference clips, nodes+ reference other nodes. Expressing that with owning pointers fights the borrow+ checker forever; expressing it with `Rc<RefCell<T>>` moves the fight to runtime+ and hands you cycles, leaks and `already borrowed` panics.+- Handles are `Copy`, `Eq` and `Hash`. They go into undo records, serialized+ projects, and across thread boundaries without ceremony.+- The generation counter turns "stale reference to a deleted clip" from a+ use-after-free into `arena.get(id) == None`.++## What it costs+- One indirection and one `Option` unwrap at every access.+- You pass `&Arena` around instead of following a pointer.++## What would change our mind+Nothing. This is the standard shape for this problem in Rust.diff --git a/engine/docs/decisions/0004-cpu-compositor-first.md b/engine/docs/decisions/0004-cpu-compositor-first.mdnew file mode 100644index 00000000..8bcbffc0--- /dev/null+++ b/engine/docs/decisions/0004-cpu-compositor-first.md@@ -0,0 +1,20 @@+# 0004 - CPU compositor first, GPU behind the same trait++## Decision+`relay-render` ships a correct, dependency-free `CpuCompositor`. The GPU path+(`wgpu`) will be a second implementation of the same `Compositor` trait.++## Why+- The interesting design work is the *plan*: given a timeline and a timestamp,+ which layers are visible, at what source time, with what opacity. That is pure+ logic, testable with zero IO, and the GPU backend consumes the same plan.+- A CPU compositor is the reference implementation. When GPU output looks wrong,+ you diff against this.+- `wgpu` is a large dependency tree and a long compile. Not worth paying before+ the plan is settled.++## What it costs+Playback performance until the GPU path lands. Acceptable - nothing ships yet.++## What would change our mind+Nothing; this is sequencing, not a fork in the road.diff --git a/engine/docs/decisions/0005-license-is-undecided.md b/engine/docs/decisions/0005-license-is-undecided.mdnew file mode 100644index 00000000..cb752d80--- /dev/null+++ b/engine/docs/decisions/0005-license-is-undecided.md@@ -0,0 +1,19 @@+# 0005 - License: OPEN QUESTION++Not decided. Deliberately left blank in `Cargo.toml` rather than defaulted, because+this is your call and a silent default is hard to walk back.++The tension for an open-source editor:++- **MIT / Apache-2.0** - maximum adoption; anyone may ship a closed fork.+- **GPL-3.0** - forks stay open; awkward with proprietary plugin SDKs.+- **AGPL-3.0** - also covers a hosted or cloud fork.+- **MPL-2.0** - file-level copyleft; a middle ground that still permits+ proprietary plugins linking against the engine.++Note that FFmpeg is LGPL by default and GPL when built with `--enable-gpl`+components (x264 among them). Because we invoke it as a separate process rather+than linking it (see 0002), its license does not propagate to this code - but it+does constrain what a distributed *bundle* may be.++Pick one before the first public release, then delete this file.diff --git a/engine/docs/decisions/README.md b/engine/docs/decisions/README.mdnew file mode 100644index 00000000..a76b2724--- /dev/null+++ b/engine/docs/decisions/README.md@@ -0,0 +1,6 @@+# Decision log++One file per decision that would otherwise be invisible in the code. Short.+Written for whoever opens this repo after a long gap - usually you.++Format: what we decided, why, what it costs, and what would change our mind.diff --git a/engine/rust-toolchain.toml b/engine/rust-toolchain.tomlnew file mode 100644index 00000000..1b5f5c36--- /dev/null+++ b/engine/rust-toolchain.toml@@ -0,0 +1,4 @@+# Pinned so a checkout in two years builds the same way it does today.+[toolchain]+channel = "1.93"+components = ["rustfmt", "clippy"]diff --git a/engine/rustfmt.toml b/engine/rustfmt.tomlnew file mode 100644index 00000000..ed49ca7b--- /dev/null+++ b/engine/rustfmt.toml@@ -0,0 +1,2 @@+edition = "2024"+max_width = 100diff --git a/test/sweet_voice.py b/test/sweet_voice.pynew file mode 100644index 00000000..b521b6ed--- /dev/null+++ b/test/sweet_voice.py@@ -0,0 +1,125 @@+#!/usr/bin/env python3+"""Apply a CapCut-inspired "Sweet" voice effect using a local FFmpeg install."""++from __future__ import annotations++import argparse+import json+import shutil+import subprocess+import sys+from pathlib import Path+++def probe(path: Path) -> dict:+ command = [+ "ffprobe", "-v", "error", "-show_streams", "-of", "json", str(path)+ ]+ try:+ return json.loads(subprocess.check_output(command, text=True))+ except subprocess.CalledProcessError as exc:+ raise RuntimeError(f"ffprobe could not read {path}") from exc+++def sweet_filter(amount: float, pitch: float | None) -> str:+ strength = max(0.0, min(100.0, amount)) / 100.0+ semitones = pitch if pitch is not None else 1.2 + (1.5 * strength)+ ratio = 2.0 ** (semitones / 12.0)++ presence = 0.8 + (1.5 * strength)+ air = 1.0 + (2.0 * strength)+ deess = 0.18 + (0.22 * strength)+ echo = 0.012 + (0.018 * strength)++ # Raising the sample rate shifts pitch and formants; atempo restores duration.+ return ",".join([+ "aresample=48000",+ f"asetrate={48000.0 * ratio:.6f}",+ "aresample=48000",+ f"atempo={1.0 / ratio:.8f}",+ "highpass=f=85",+ "equalizer=f=300:t=q:w=1.1:g=-1.4",+ f"equalizer=f=4200:t=q:w=0.8:g={presence:.3f}",+ f"equalizer=f=10500:t=q:w=0.7:g={air:.3f}",+ "compand=attacks=0.010:decays=0.180:points=-80/-80|-30/-24|-18/-13|-8/-5|0/-1.5:soft-knee=5:gain=1",+ f"deesser=i={deess:.3f}:m=0.45:f=0.55",+ f"aecho=0.8:0.82:38:{echo:.4f}",+ "alimiter=limit=0.94:attack=5:release=60",+ ])+++def output_audio_codec(path: Path) -> list[str]:+ suffix = path.suffix.lower()+ if suffix == ".wav":+ return ["-c:a", "pcm_s24le"]+ if suffix == ".flac":+ return ["-c:a", "flac"]+ if suffix == ".mp3":+ return ["-c:a", "libmp3lame", "-q:a", "2"]+ if suffix in {".webm", ".ogg", ".opus"}:+ return ["-c:a", "libopus", "-b:a", "192k"]+ return ["-c:a", "aac", "-b:a", "256k"]+++def main() -> int:+ parser = argparse.ArgumentParser(+ description="Apply a bright, soft, slightly higher CapCut-inspired Sweet voice effect."+ )+ parser.add_argument("input", type=Path, help="Input audio or video file")+ parser.add_argument("output", type=Path, nargs="?", help="Output path")+ parser.add_argument("--amount", type=float, default=65, metavar="0-100")+ parser.add_argument("--pitch", type=float, help="Pitch shift in semitones")+ parser.add_argument("--overwrite", action="store_true")+ parser.add_argument("--dry-run", action="store_true", help="Print FFmpeg command only")+ args = parser.parse_args()++ if not shutil.which("ffmpeg") or not shutil.which("ffprobe"):+ parser.error("FFmpeg and ffprobe must be installed and available on PATH")+ if not args.input.is_file():+ parser.error(f"input does not exist: {args.input}")+ if not 0 <= args.amount <= 100:+ parser.error("--amount must be between 0 and 100")++ info = probe(args.input)+ streams = info.get("streams", [])+ has_audio = any(s.get("codec_type") == "audio" for s in streams)+ has_video = any(s.get("codec_type") == "video" for s in streams)+ if not has_audio:+ parser.error("input contains no audio stream")++ output = args.output+ if output is None:+ output = args.input.with_name(f"{args.input.stem}_sweet{args.input.suffix}")+ if output.resolve() == args.input.resolve():+ parser.error("output must be different from input")+ output.parent.mkdir(parents=True, exist_ok=True)++ command = ["ffmpeg", "-hide_banner", "-y" if args.overwrite else "-n", "-i", str(args.input)]+ if has_video:+ command += ["-map", "0:v:0", "-map", "0:a:0", "-c:v", "copy"]+ else:+ command += ["-map", "0:a:0"]+ command += ["-af", sweet_filter(args.amount, args.pitch)]+ command += output_audio_codec(output)+ command += ["-map_metadata", "0"]+ if has_video:+ command += ["-shortest"]+ if output.suffix.lower() in {".mp4", ".m4v", ".mov"}:+ command += ["-movflags", "+faststart"]+ command += [str(output)]++ if args.dry_run:+ import shlex+ print(shlex.join(command))+ return 0++ print(f"Creating: {output}")+ completed = subprocess.run(command)+ if completed.returncode:+ return completed.returncode+ print(f"Done: {output}")+ return 0+++if __name__ == "__main__":+ raise SystemExit(main())