A visual git client, simple to use yet powerful. Light, fast and debloated.
Rust
feat: initial version of gitcraft, a small visual git client
Ivána5d3e82ee622
diff --git a/.gitignore b/.gitignorenew file mode 100644index 0000000..ea8c4bf--- /dev/null+++ b/.gitignore@@ -0,0 +1 @@+/targetdiff --git a/ATTRIBUTION.md b/ATTRIBUTION.mdnew file mode 100644index 0000000..5218060--- /dev/null+++ b/ATTRIBUTION.md@@ -0,0 +1,9 @@+# Attribution++Every asset bundled with gitcraft, its author, source and licence.++| Files | What | Author | Source | Licence |+|---|---|---|---|---|+| `assets/fonts/Inter-Regular.ttf`, `Inter-Medium.ttf`, `Inter-SemiBold.ttf` | Inter 4.001 (UI font) | The Inter Project Authors (Rasmus Andersson) | <https://github.com/rsms/inter> (copied from PhotoCraft) | SIL OFL 1.1, [`assets/fonts/OFL-Inter.txt`](assets/fonts/OFL-Inter.txt) |+| `assets/fonts/JetBrainsMono-Regular.ttf` | JetBrains Mono 2.305 (hashes, diffs) | The JetBrains Mono Project Authors | <https://github.com/JetBrains/JetBrainsMono> (copied from PhotoCraft) | SIL OFL 1.1, [`assets/fonts/OFL-JetBrainsMono.txt`](assets/fonts/OFL-JetBrainsMono.txt) |+| `assets/icons/*.svg` | Lucide icons | Lucide Icons and Contributors | <https://github.com/lucide-icons/lucide> (`icons/<name>.svg`) | ISC, [`assets/icons/LICENSE-lucide.txt`](assets/icons/LICENSE-lucide.txt) |diff --git a/Cargo.lock b/Cargo.locknew file mode 100644index 0000000..d5f5d58--- /dev/null+++ b/Cargo.lock@@ -0,0 +1,4355 @@+# This file is automatically @generated by Cargo.+# It is not intended for manual editing.+version = 4++[[package]]+name = "accesskit"+version = "0.24.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "d3b7f7f85a7e5f68090000ed7622545829afd484d210358702ae4cb97dd0c320"+dependencies = [+ "enumn",+ "serde",+ "uuid",+]++[[package]]+name = "accesskit_atspi_common"+version = "0.18.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "1e8c61bee90b42a772d39d06a740207dc71a4e780004ace1db8d99fb1baaa954"+dependencies = [+ "accesskit",+ "accesskit_consumer 0.36.0",+ "atspi-common",+ "phf",+ "serde",+ "zvariant",+]++[[package]]+name = "accesskit_consumer"+version = "0.35.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "53cf47daed85312e763fbf85ceca136e0d7abc68e0a7e12abe11f48172bc3b10"+dependencies = [+ "accesskit",+ "hashbrown 0.16.1",+]++[[package]]+name = "accesskit_consumer"+version = "0.36.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "25e0d7e25d06f4dc21d1774d67146e9e80d6789216cbd4d1e88185b0095dba60"+dependencies = [+ "accesskit",+ "hashbrown 0.16.1",+]++[[package]]+name = "accesskit_consumer"+version = "0.38.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "5d10a236f96f87d70732e44520046785431ef01d5bcd6b041317bfadd2f88245"+dependencies = [+ "accesskit",+ "hashbrown 0.16.1",+]++[[package]]+name = "accesskit_macos"+version = "0.26.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "ce02dc63b43f0c9296af9ac946312a2dc8814427d7a64d2d600971dac55b6076"+dependencies = [+ "accesskit",+ "accesskit_consumer 0.38.0",+ "hashbrown 0.16.1",+ "objc2 0.5.3",+ "objc2-app-kit 0.2.2",+ "objc2-foundation 0.2.2",+]++[[package]]+name = "accesskit_unix"+version = "0.21.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "b016ca8db0ea0ea2ceff29a9d6240391492d960716aa471967c00e8cc8cb197c"+dependencies = [+ "accesskit",+ "accesskit_atspi_common",+ "async-channel",+ "async-executor",+ "async-task",+ "atspi",+ "futures-lite",+ "futures-util",+ "serde",+ "zbus",+]++[[package]]+name = "accesskit_windows"+version = "0.32.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "eff7009f1a532e917d66970a1e80c965140c6cfbbabbdde3d64e5431e6c78e21"+dependencies = [+ "accesskit",+ "accesskit_consumer 0.35.0",+ "hashbrown 0.16.1",+ "static_assertions",+ "windows",+ "windows-core",+]++[[package]]+name = "accesskit_winit"+version = "0.32.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "1fe9a94394896352cc4660ca2288bd4ef883d83238853c038b44070c8f134313"+dependencies = [+ "accesskit",+ "accesskit_macos",+ "accesskit_unix",+ "accesskit_windows",+ "raw-window-handle",+ "winit",+]++[[package]]+name = "adler2"+version = "2.0.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa"++[[package]]+name = "ahash"+version = "0.8.12"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "5a15f179cd60c4584b8a8c596927aadc462e27f2ca70c04e0071964a73ba7a75"+dependencies = [+ "cfg-if",+ "getrandom 0.3.4",+ "once_cell",+ "serde",+ "version_check",+ "zerocopy",+]++[[package]]+name = "allocator-api2"+version = "0.2.21"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923"++[[package]]+name = "android-activity"+version = "0.6.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "0f2a1bb052857d5dd49572219344a7332b31b76405648eabac5bc68978251bcd"+dependencies = [+ "android-properties",+ "bitflags 2.13.2",+ "cc",+ "jni",+ "libc",+ "log",+ "ndk",+ "ndk-context",+ "ndk-sys",+ "num_enum",+ "thiserror 2.0.21",+]++[[package]]+name = "android-properties"+version = "0.2.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "fc7eb209b1518d6bb87b283c20095f5228ecda460da70b44f0802523dea6da04"++[[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 = "arboard"+version = "3.7.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "aeb9553e62312c8756a5979254fc6d7da8bbeb5986a1e17037fab932f7037917"+dependencies = [+ "clipboard-win",+ "image",+ "log",+ "objc2 0.6.5",+ "objc2-app-kit 0.3.2",+ "objc2-core-foundation",+ "objc2-core-graphics",+ "objc2-foundation 0.3.2",+ "parking_lot",+ "percent-encoding",+ "windows-sys 0.61.2",+ "x11rb",+]++[[package]]+name = "arrayref"+version = "0.3.9"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "76a2e8124351fda1ef8aaaa3bbd7ebbcb486bbcd4225aca0aa0d84bb2db8fecb"++[[package]]+name = "arrayvec"+version = "0.7.8"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "d3fb67a6e08acf24fdeccbac2cb6ac4305825bd1f117462e0e6f2f193345ad56"++[[package]]+name = "as-raw-xcb-connection"+version = "1.0.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "175571dd1d178ced59193a6fc02dde1b972eb0bc56c892cde9beeceac5bf0f6b"++[[package]]+name = "ash"+version = "0.38.0+1.3.281"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "0bb44936d800fea8f016d7f2311c6a4f97aebd5dc86f09906139ec848cf3a46f"+dependencies = [+ "libloading",+]++[[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 1.1.6",+ "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 1.1.6",+]++[[package]]+name = "async-recursion"+version = "1.2.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "4f8abc12baad266b1c8cec146854c195b5864b4221d4b2ca7296a7ae82d9e451"+dependencies = [+ "proc-macro2",+ "quote",+ "syn 3.0.9",+]++[[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 1.1.6",+ "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.9",+]++[[package]]+name = "atomic-waker"+version = "1.1.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0"++[[package]]+name = "atspi"+version = "0.29.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "c77886257be21c9cd89a4ae7e64860c6f0eefca799bb79127913052bd0eefb3d"+dependencies = [+ "atspi-common",+ "atspi-proxies",+]++[[package]]+name = "atspi-common"+version = "0.13.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "20c5617155740c98003016429ad13fe43ce7a77b007479350a9f8bf95a29f63d"+dependencies = [+ "enumflags2",+ "serde",+ "static_assertions",+ "zbus",+ "zbus-lockstep",+ "zbus-lockstep-macros",+ "zbus_names",+ "zvariant",+]++[[package]]+name = "atspi-proxies"+version = "0.13.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "2230e48787ed3eb4088996eab66a32ca20c0b67bbd4fd6cdfe79f04f1f04c9fc"+dependencies = [+ "atspi-common",+ "serde",+ "zbus",+]++[[package]]+name = "autocfg"+version = "1.5.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "f2032f911046de80f0a198e0901378627c33f59ea0ac00e363d481118bd70a53"++[[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.10.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "09ec2f926cc3060f09db9ebc5b52823d85268d24bb917e472c0c4bea35780a7d"+dependencies = [+ "bit-vec",+]++[[package]]+name = "bit-vec"+version = "0.9.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "b71798fca2c1fe1086445a7258a4bc81e6e49dcd24c8d0dd9a1e57395b603f51"++[[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.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "3ded4057c258ba199e2d26386d3af3780957ecaee6c4ef4041c6b4b8b97c0b06"+dependencies = [+ "serde_core",+]++[[package]]+name = "block2"+version = "0.5.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "2c132eebf10f5cad5289222520a4a058514204aed6d791f1cf4fe8088b82d15f"+dependencies = [+ "objc2 0.5.3",+]++[[package]]+name = "block2"+version = "0.6.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "cdeb9d870516001442e364c5220d3574d2da8dc765554b4a617230d33fa58ef5"+dependencies = [+ "objc2 0.6.5",+]++[[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 = "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"+dependencies = [+ "bytemuck_derive",+]++[[package]]+name = "bytemuck_derive"+version = "1.12.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "6a1f896587b6f2c069c73d2f0913e2d590c3990285cd2f0b6aa02b786b4c679c"+dependencies = [+ "proc-macro2",+ "quote",+ "syn 3.0.9",+]++[[package]]+name = "byteorder-lite"+version = "0.1.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "8f1fe948ff07f4bd06c30984e69f5b4899c516a3ef74f34df92a2df2ab535495"++[[package]]+name = "bytes"+version = "1.12.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "fc652a48c352aef3ea3aed32080501cf3ef6ed5da78602a020c991775b0aff04"++[[package]]+name = "calloop"+version = "0.13.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "b99da2f8558ca23c71f4fd15dc57c906239752dd27ff3c00a1d56b685b7cbfec"+dependencies = [+ "bitflags 2.13.2",+ "log",+ "polling",+ "rustix 0.38.44",+ "slab",+ "thiserror 1.0.69",+]++[[package]]+name = "calloop"+version = "0.14.5"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "43b32313e937c8721c9d17ee9bf60699a6402b4b7c2cb6ac1bee0ffcaa4b4e5e"+dependencies = [+ "bitflags 2.13.2",+ "polling",+ "rustix 1.1.6",+ "tracing",+]++[[package]]+name = "calloop-wayland-source"+version = "0.3.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "95a66a987056935f7efce4ab5668920b5d0dac4a7c99991a67395f13702ddd20"+dependencies = [+ "calloop 0.13.0",+ "rustix 0.38.44",+ "wayland-backend",+ "wayland-client",+]++[[package]]+name = "calloop-wayland-source"+version = "0.4.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "138efcf0940a02ebf0cc8d1eff41a1682a46b431630f4c52450d6265876021fa"+dependencies = [+ "calloop 0.14.5",+ "rustix 1.1.6",+ "wayland-backend",+ "wayland-client",+]++[[package]]+name = "cc"+version = "1.10.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "86e055fa6e3e40ad6187ba25b6855eeb635d5271f8e0f0e1e9a5826b8d75bea0"+dependencies = [+ "find-msvc-tools",+ "jobserver",+ "libc",+ "shlex",+]++[[package]]+name = "cfg-if"+version = "1.0.5"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "4e7648175b45a9a48536d676f68d918270699102aa8dab5496df06904c914600"++[[package]]+name = "cfg_aliases"+version = "0.2.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "f079e83a288787bcd14a6aea84cee5c87a67c5a3e660c30f557a3d24761b3527"++[[package]]+name = "cgl"+version = "0.3.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "0ced0551234e87afee12411d535648dd89d2e7f34c78b753395567aff3d447ff"+dependencies = [+ "libc",+]++[[package]]+name = "clipboard-win"+version = "5.4.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "052af7878466feccda12ba7a6a67d019d712f296809559b47c12c8cc196d3a9a"+dependencies = [+ "error-code",+]++[[package]]+name = "codespan-reporting"+version = "0.13.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "af491d569909a7e4dee0ad7db7f5341fef5c614d5b8ec8cf765732aba3cff681"+dependencies = [+ "serde",+ "termcolor",+ "unicode-width",+]++[[package]]+name = "color"+version = "0.3.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "2ec7c5eb7a16992b1904d76c517d170ab353b0e0b3d5a0c81a8a0cd1037893cf"+dependencies = [+ "bytemuck",+]++[[package]]+name = "colored"+version = "2.2.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "117725a109d387c937a1533ce01b450cbde6b88abceea8473c4d7a85853cda3c"+dependencies = [+ "lazy_static",+ "windows-sys 0.59.0",+]++[[package]]+name = "combine"+version = "4.6.9"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "4356eba6976435498d05a311ee9fc486da3bc81c200d3f0d7dd9703b41913f92"+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 = "core-foundation"+version = "0.9.4"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f"+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.23.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "c07782be35f9e1140080c6b96f0d44b739e2278479f64e02fdab4e32dfd8b081"+dependencies = [+ "bitflags 1.3.2",+ "core-foundation",+ "core-graphics-types",+ "foreign-types",+ "libc",+]++[[package]]+name = "core-graphics-types"+version = "0.1.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "45390e6114f68f718cc7a830514a96f903cccd70d02a8f6d9f643ac4ba45afaf"+dependencies = [+ "bitflags 1.3.2",+ "core-foundation",+ "libc",+]++[[package]]+name = "crc32fast"+version = "1.5.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "0ba106e844045ddc02c20768ac4b0b7cb45f2cc2ecbd833ac9f5dacb183c2055"+dependencies = [+ "cfg-if",+]++[[package]]+name = "crossbeam-deque"+version = "0.8.8"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "622f3fc73690be383c7214310406f28a90e6edeadc3cea882f9d71e495b9711a"+dependencies = [+ "crossbeam-epoch",+ "crossbeam-utils",+]++[[package]]+name = "crossbeam-epoch"+version = "0.9.21"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "dc74980687109a3b14c72fd458107bf0baa1da1a1a805e178d15501ba9b86d9d"+dependencies = [+ "crossbeam-utils",+]++[[package]]+name = "crossbeam-utils"+version = "0.8.23"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "a31eee39dddec8330830986fcd7625edb5a24ec90ea038215273bbc3adb08ac6"++[[package]]+name = "crunchy"+version = "0.2.4"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "460fbee9c2c2f33933d720630a6a0bac33ba7053db5344fac858d4b8952d77d5"++[[package]]+name = "cursor-icon"+version = "1.2.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "f27ae1dd37df86211c42e150270f82743308803d90a6f6e6651cd730d5e1732f"++[[package]]+name = "data-url"+version = "0.3.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "be1e0bca6c3637f992fc1cc7cbc52a78c1ef6db076dbf1059c4323d6a2048376"++[[package]]+name = "dify"+version = "0.8.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "90ce0fb972943b4e88cd03b8f92953df0c71bb05e0bde8e5b684895d808013cc"+dependencies = [+ "anyhow",+ "colored",+ "getopts",+ "image",+ "rayon",+]++[[package]]+name = "dispatch"+version = "0.2.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "bd0c93bb4b0c6d9b77f4435b0ae98c24d17f1c45b2ff844c6151a07256ca923b"++[[package]]+name = "dispatch2"+version = "0.3.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "1e0e367e4e7da84520dedcac1901e4da967309406d1e51017ae1abfb97adbd38"+dependencies = [+ "bitflags 2.13.2",+ "block2 0.6.2",+ "libc",+ "objc2 0.6.5",+]++[[package]]+name = "dlib"+version = "0.5.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "ab8ecd87370524b461f8557c119c405552c396ed91fc0a8eec68679eab26f94a"+dependencies = [+ "libloading",+]++[[package]]+name = "document-features"+version = "0.2.12"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "d4b8a88685455ed29a21542a33abd9cb6510b6b129abadabdcef0f4c55bc8f61"+dependencies = [+ "litrs",+]++[[package]]+name = "downcast-rs"+version = "1.2.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "75b325c5dbd37f80359721ad39aca5a29fb04c89279657cffdda8736d0c0b9d2"++[[package]]+name = "dpi"+version = "0.1.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "d8b14ccef22fc6f5a8f4d7d768562a182c04ce9a3b3157b91390b52ddfdf1a76"++[[package]]+name = "ecolor"+version = "0.36.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "0656a7530b9e2841ee7a5f983965bdd9840c32f4012f759cfd44b912cced6b34"+dependencies = [+ "bytemuck",+ "emath",+ "serde",+]++[[package]]+name = "eframe"+version = "0.36.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "55ad41fac6e3149abb4866e93df37dbd33baa95db525c3368c944584e95a5dc2"+dependencies = [+ "ahash",+ "bytemuck",+ "document-features",+ "egui",+ "egui-wgpu",+ "egui-winit",+ "egui_glow",+ "glutin",+ "glutin-winit",+ "image",+ "js-sys",+ "log",+ "objc2 0.6.5",+ "objc2-app-kit 0.3.2",+ "objc2-foundation 0.3.2",+ "parking_lot",+ "percent-encoding",+ "pollster 1.0.1",+ "profiling",+ "raw-window-handle",+ "ron",+ "serde",+ "static_assertions",+ "wasm-bindgen",+ "web-sys",+ "web-time",+ "wgpu",+ "windows-sys 0.61.2",+ "winit",+]++[[package]]+name = "egui"+version = "0.36.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "dc938cc27cd911415e1e4d151bc56ff9df063d8db081374e87aeb805ea74b2ba"+dependencies = [+ "accesskit",+ "ahash",+ "bitflags 2.13.2",+ "emath",+ "epaint",+ "itertools",+ "log",+ "nohash-hasher",+ "profiling",+ "ron",+ "serde",+ "smallvec",+ "unicode-segmentation",+ "web-sys",+]++[[package]]+name = "egui-wgpu"+version = "0.36.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "5cef1f6d1bba40b09a4d0d62cb822b81030922cfbf65c5373398c3a3caafc5bd"+dependencies = [+ "ahash",+ "bytemuck",+ "document-features",+ "egui",+ "epaint",+ "log",+ "profiling",+ "thiserror 2.0.21",+ "type-map",+ "web-time",+ "wgpu",+ "winit",+]++[[package]]+name = "egui-winit"+version = "0.36.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "98466000559d66ba4db786a30448b01483946add4188e7f10f522a27b4fb89cc"+dependencies = [+ "accesskit_winit",+ "arboard",+ "bytemuck",+ "egui",+ "log",+ "objc2 0.6.5",+ "objc2-foundation 0.3.2",+ "objc2-ui-kit 0.3.2",+ "profiling",+ "raw-window-handle",+ "serde",+ "smithay-clipboard",+ "web-time",+ "winit",+]++[[package]]+name = "egui_extras"+version = "0.36.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "05cbdc785020861553f230f23d330ba1fb72613b9d8e0e457f3bdc8ba6db6dcf"+dependencies = [+ "ahash",+ "egui",+ "enum-map",+ "image",+ "itertools",+ "log",+ "profiling",+ "resvg",+]++[[package]]+name = "egui_glow"+version = "0.36.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "606ed4167daf341e5753d703285c4c1d562324b2c07aa8f405cd7d066fe58f3b"+dependencies = [+ "bytemuck",+ "egui",+ "glow",+ "log",+ "profiling",+ "winit",+]++[[package]]+name = "egui_kittest"+version = "0.36.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "5eb3f3effb2726fee23449293e67acbf6cc6ce35525b1722bd5743bb348114d5"+dependencies = [+ "dify",+ "eframe",+ "egui",+ "egui-wgpu",+ "image",+ "kittest",+ "log",+ "open",+ "pollster 1.0.1",+ "serde",+ "tempfile",+ "toml",+ "wgpu",+]++[[package]]+name = "either"+version = "1.19.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "0e9c71c2167ca323c882b99918929403426e2373ea17242ff5653e0d5e1058be"++[[package]]+name = "emath"+version = "0.36.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "52c8d4141cf0f60fb2f7aefaf352d3ffa5171ef0ab09731c64391801e95e48f1"+dependencies = [+ "bytemuck",+ "serde",+]++[[package]]+name = "endi"+version = "1.1.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "66b7e2430c6dff6a955451e2cfc438f09cea1965a9d6f87f7e3b90decc014099"++[[package]]+name = "enum-map"+version = "2.7.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "6866f3bfdf8207509a033af1a75a7b08abda06bbaaeae6669323fd5a097df2e9"+dependencies = [+ "enum-map-derive",+]++[[package]]+name = "enum-map-derive"+version = "0.17.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "f282cfdfe92516eb26c2af8589c274c7c17681f5ecc03c18255fe741c6aa64eb"+dependencies = [+ "proc-macro2",+ "quote",+ "syn 2.0.119",+]++[[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 = "enumn"+version = "0.1.14"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "2f9ed6b3789237c8a0c1c505af1c7eb2c560df6186f01b098c3a1064ea532f38"+dependencies = [+ "proc-macro2",+ "quote",+ "syn 2.0.119",+]++[[package]]+name = "epaint"+version = "0.36.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "a0ec0308dc23130fc1a7d4623a8534c2ed069c6dc84e258ee4f3de99615aa1a3"+dependencies = [+ "ahash",+ "bytemuck",+ "ecolor",+ "emath",+ "epaint_default_fonts",+ "font-types",+ "harfrust",+ "log",+ "nohash-hasher",+ "parking_lot",+ "profiling",+ "self_cell",+ "serde",+ "skrifa",+ "smallvec",+ "unicode-general-category",+ "unicode-segmentation",+ "vello_cpu",+]++[[package]]+name = "epaint_default_fonts"+version = "0.36.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "773fa9c96dd0dbef887e39d0ed6177f141cce4d68e6041df77570aa3702dfa13"++[[package]]+name = "equivalent"+version = "1.0.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "00d174d5400e5e8fd687ad1049e2f578285fa914201b1af7e8b112a4546bd826"++[[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 = "error-code"+version = "3.4.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "0b5343afd4a8365a643ac588dab4cf234a190c7f6c88c9f6dd6ffe00837661b7"++[[package]]+name = "euclid"+version = "0.22.14"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "f1a05365e3b1c6d1650318537c7460c6923f1abdd272ad6842baa2b509957a06"+dependencies = [+ "num-traits",+]++[[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 = "fax"+version = "0.2.7"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "caf1079563223d5d59d83c85886a56e586cfd5c1a26292e971a0fa266531ac5a"++[[package]]+name = "fdeflate"+version = "0.3.7"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "1e6853b52649d4ac5c0bd02320cddc5ba956bdb407c4b75a2c6b75bf51500f8c"+dependencies = [+ "simd-adler32",+]++[[package]]+name = "fearless_simd"+version = "0.4.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "b97b65636e5b9ef369943878ac74335ba1c55c1cb6adbf1e2c293c624248d693"++[[package]]+name = "find-msvc-tools"+version = "0.1.15"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "1c66915cc5391097de7a2b0b972e8505aa33c0df401fd3a6811dbdb32881ba48"++[[package]]+name = "flate2"+version = "1.1.10"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "6e634e2e0ebac1ee034020da1ca582e17ffe4e0f5e985823721e168928136dcb"+dependencies = [+ "crc32fast",+ "miniz_oxide 0.9.1",+ "zlib-rs",+]++[[package]]+name = "float-cmp"+version = "0.9.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "98de4bbd547a563b716d8dfa9aad1cb19bfab00f4fa09a6a4ed21dbcf44ce9c4"++[[package]]+name = "foldhash"+version = "0.2.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "77ce24cb58228fbb8aa041425bb1050850ac19177686ea6e0f41a70416f56fdb"++[[package]]+name = "font-types"+version = "0.12.7"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "835ae9d781464a79026cde387f9cbc650c9a4909d7cf7e658b127e3c35d2f35d"+dependencies = [+ "bytemuck",+ "serde",+]++[[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.9",+]++[[package]]+name = "foreign-types-shared"+version = "0.3.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "aa9a19cbb55df58761df49b23516a86d432839add4af60fc256da840f66ed35b"++[[package]]+name = "futures-core"+version = "0.3.34"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "92d699e522242e69e3003b94ecc1f960f3a5e015aa7c5d7486e65ad01dd94f5e"++[[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.9",+]++[[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-macro",+ "futures-task",+ "pin-project-lite",+ "slab",+]++[[package]]+name = "gethostname"+version = "1.1.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "1bd49230192a3797a9a4d6abe9b3eed6f7fa4c8a8a4947977c6f80025f92cbd8"+dependencies = [+ "rustix 1.1.6",+ "windows-link",+]++[[package]]+name = "getopts"+version = "0.2.24"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "cfe4fbac503b8d1f88e6676011885f34b7174f46e59956bba534ba83abded4df"+dependencies = [+ "unicode-width",+]++[[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 = "gitcraft"+version = "0.1.0"+dependencies = [+ "eframe",+ "egui",+ "egui_extras",+ "egui_kittest",+ "rfd",+ "serde",+]++[[package]]+name = "gl_generator"+version = "0.14.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "1a95dfc23a2b4a9a2f5ab41d194f8bfda3cabec42af4e39f08c339eb2a0c124d"+dependencies = [+ "khronos_api",+ "log",+ "xml-rs",+]++[[package]]+name = "glifo"+version = "0.2.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "ed4a1bb24121291d27230c1b1b44e07d6a9b28cefdb32fe1581dfb84e14f940a"+dependencies = [+ "bytemuck",+ "foldhash",+ "hashbrown 0.17.1",+ "log",+ "peniko",+ "skrifa",+ "smallvec",+ "vello_common",+]++[[package]]+name = "glow"+version = "0.17.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "29038e1c483364cc6bb3cf78feee1816002e127c331a1eec55a4d202b9e1adb5"+dependencies = [+ "js-sys",+ "slotmap",+ "wasm-bindgen",+ "web-sys",+]++[[package]]+name = "glutin"+version = "0.32.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "12124de845cacfebedff80e877bb37b5b75c34c5a4c89e47e1cdd67fb6041325"+dependencies = [+ "bitflags 2.13.2",+ "cfg_aliases",+ "cgl",+ "dispatch2",+ "glutin_egl_sys",+ "glutin_glx_sys",+ "glutin_wgl_sys",+ "libloading",+ "objc2 0.6.5",+ "objc2-app-kit 0.3.2",+ "objc2-core-foundation",+ "objc2-foundation 0.3.2",+ "once_cell",+ "raw-window-handle",+ "wayland-sys",+ "windows-sys 0.52.0",+ "x11-dl",+]++[[package]]+name = "glutin-winit"+version = "0.5.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "85edca7075f8fc728f28cb8fbb111a96c3b89e930574369e3e9c27eb75d3788f"+dependencies = [+ "cfg_aliases",+ "glutin",+ "raw-window-handle",+ "winit",+]++[[package]]+name = "glutin_egl_sys"+version = "0.7.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "4c4680ba6195f424febdc3ba46e7a42a0e58743f2edb115297b86d7f8ecc02d2"+dependencies = [+ "gl_generator",+ "windows-sys 0.52.0",+]++[[package]]+name = "glutin_glx_sys"+version = "0.6.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "8a7bb2938045a88b612499fbcba375a77198e01306f52272e692f8c1f3751185"+dependencies = [+ "gl_generator",+ "x11-dl",+]++[[package]]+name = "glutin_wgl_sys"+version = "0.6.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "2c4ee00b289aba7a9e5306d57c2d05499b2e5dc427f84ac708bd2c090212cf3e"+dependencies = [+ "gl_generator",+]++[[package]]+name = "gpu-allocator"+version = "0.28.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "51255ea7cfaadb6c5f1528d43e92a82acb2b96c43365989a28b2d44ee38f8795"+dependencies = [+ "ash",+ "hashbrown 0.16.1",+ "log",+ "presser",+ "thiserror 2.0.21",+ "windows",+]++[[package]]+name = "guillotiere"+version = "0.7.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "6b17e70c989c36bad147b27a58d148c0741c51448aa5653436547323e524d0ab"+dependencies = [+ "euclid",+]++[[package]]+name = "half"+version = "2.7.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "6ea2d84b969582b4b1864a92dc5d27cd2b77b622a8d79306834f1be5ba20d84b"+dependencies = [+ "cfg-if",+ "crunchy",+ "num-traits",+ "zerocopy",+]++[[package]]+name = "harfrust"+version = "0.12.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "c03d949a14aa089bbb282f7dd76a498a7f684428e4257202efc119ec010376f9"+dependencies = [+ "bitflags 2.13.2",+ "bytemuck",+ "read-fonts",+ "smallvec",+]++[[package]]+name = "hashbrown"+version = "0.16.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100"+dependencies = [+ "allocator-api2",+ "equivalent",+ "foldhash",+]++[[package]]+name = "hashbrown"+version = "0.17.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "ed5909b6e89a2db4456e54cd5f673791d7eca6732202bbf2a9cc504fe2f9b84a"+dependencies = [+ "foldhash",+]++[[package]]+name = "hermit-abi"+version = "0.5.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "e17592d60ebacc7d5e169f4663c5f84f9161cc90328abcfe8456f41e4dfcb284"++[[package]]+name = "hex"+version = "0.4.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70"++[[package]]+name = "image"+version = "0.25.10"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "85ab80394333c02fe689eaf900ab500fbd0c2213da414687ebf995a65d5a6104"+dependencies = [+ "bytemuck",+ "byteorder-lite",+ "moxcms",+ "num-traits",+ "png 0.18.1",+ "tiff",+]++[[package]]+name = "imagesize"+version = "0.13.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "edcd27d72f2f071c64249075f42e205ff93c9a4c5f6c6da53e79ed9f9832c285"++[[package]]+name = "indexmap"+version = "2.14.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "cc4e190f5d26ca7051642629da2c52fc03bde85a03197c99408dcd291734c855"+dependencies = [+ "equivalent",+ "hashbrown 0.17.1",+]++[[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 = "itertools"+version = "0.15.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "8b4baf93f58d4425749ca49a51c50ebab072c5df6994d08fed93541c331481dc"+dependencies = [+ "either",+]++[[package]]+name = "jni"+version = "0.22.4"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "5efd9a482cf3a427f00d6b35f14332adc7902ce91efb778580e180ff90fa3498"+dependencies = [+ "cfg-if",+ "combine",+ "jni-macros",+ "jni-sys 0.4.1",+ "log",+ "simd_cesu8",+ "thiserror 2.0.21",+ "walkdir",+ "windows-link",+]++[[package]]+name = "jni-macros"+version = "0.22.4"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "a00109accc170f0bdb141fed3e393c565b6f5e072365c3bd58f5b062591560a3"+dependencies = [+ "proc-macro2",+ "quote",+ "rustc_version",+ "simd_cesu8",+ "syn 2.0.119",+]++[[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 = "jobserver"+version = "0.1.35"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "1c00acbd29eabad4a2392fa0e921c874934dbbf4194312ad20f04a0ed67a3cb3"+dependencies = [+ "getrandom 0.4.3",+ "libc",+]++[[package]]+name = "js-sys"+version = "0.3.106"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "7883d941dae510fb2d978fc3fe018c71c9e2892fd38854de3e8b92c2e5ad9cc5"+dependencies = [+ "cfg-if",+ "futures-util",+ "wasm-bindgen",+]++[[package]]+name = "khronos-egl"+version = "6.0.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "6aae1df220ece3c0ada96b8153459b67eebe9ae9212258bb0134ae60416fdf76"+dependencies = [+ "libc",+ "libloading",+ "pkg-config",+]++[[package]]+name = "khronos_api"+version = "3.1.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "e2db585e1d738fc771bf08a151420d3ed193d9d895a36df7f6f8a9456b911ddc"++[[package]]+name = "kittest"+version = "0.4.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "90ceaa75eb0036a32b6b9833962eb18137449e9817e2e586006471925b727fd5"+dependencies = [+ "accesskit",+ "accesskit_consumer 0.35.0",+]++[[package]]+name = "kurbo"+version = "0.11.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "c62026ae44756f8a599ba21140f350303d4f08dcdcc71b5ad9c9bb8128c13c62"+dependencies = [+ "arrayvec",+ "euclid",+ "smallvec",+]++[[package]]+name = "kurbo"+version = "0.13.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "4b60dfc32f652b926df6192e55525b16d186c69d47876c3ead4da5cc9f8450e2"+dependencies = [+ "arrayvec",+ "euclid",+ "polycool",+ "smallvec",+]++[[package]]+name = "lazy_static"+version = "1.5.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "20870f649af7073d53e38067b2a84312175d56ea15217e1b15bc83506ec50afb"++[[package]]+name = "libc"+version = "0.2.191"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "65cd87c9a6d60536580b316ad985726104730a5151c99845f2490428ef91240a"++[[package]]+name = "libloading"+version = "0.8.9"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "d7c4b02199fee7c5d21a5ae7d8cfa79a6ef5bb2fc834d6e9058e89c825efdc55"+dependencies = [+ "cfg-if",+ "windows-link",+]++[[package]]+name = "libm"+version = "0.2.16"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "b6d2cec3eae94f9f509c767b45932f1ada8350c4bdb85af2fcab4a3c14807981"++[[package]]+name = "libredox"+version = "0.1.25"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "61ff90caf6077a803a240f62fdbe88645a890bbca49ef8174c3cb0404362171d"+dependencies = [+ "bitflags 2.13.2",+ "libc",+ "plain",+ "redox_syscall 0.9.5",+]++[[package]]+name = "linebender_resource_handle"+version = "0.1.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "d4a5ff6bcca6c4867b1c4fd4ef63e4db7436ef363e0ad7531d1558856bae64f4"++[[package]]+name = "linux-raw-sys"+version = "0.4.15"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab"++[[package]]+name = "linux-raw-sys"+version = "0.12.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53"++[[package]]+name = "litrs"+version = "1.0.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "4744e383959f0db86ede514b809b1c53251889093803c05267acc7d4e7030d70"++[[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 = "memchr"+version = "2.8.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "cf8baf1c55e62ffcace7a9f06f4bd9cd3f0c4beb022d3b367256b91b87513d98"++[[package]]+name = "memmap2"+version = "0.9.12"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "6b0ca1155a9ecc25aa12e8313a119f32edf0255fea2f44839c4ac0a12b2ac157"+dependencies = [+ "libc",+]++[[package]]+name = "memoffset"+version = "0.9.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a"+dependencies = [+ "autocfg",+]++[[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 = "miniz_oxide"+version = "0.9.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "b63fbc4a50860e98e7b2aa7804ded1db5cbc3aff9193adaff57a6931bf7c4b4c"+dependencies = [+ "adler2",+ "simd-adler32",+]++[[package]]+name = "moxcms"+version = "0.8.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "bb85c154ba489f01b25c0d36ae69a87e4a1c73a72631fc6c0eb6dde34a73e44b"+dependencies = [+ "num-traits",+ "pxfm",+]++[[package]]+name = "naga"+version = "30.0.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "a616d2fb8c89516ac2723a581f69d6c18576046bed761bd6b305e5618e6ae130"+dependencies = [+ "arrayvec",+ "bit-set",+ "bitflags 2.13.2",+ "cfg-if",+ "cfg_aliases",+ "codespan-reporting",+ "half",+ "hashbrown 0.17.1",+ "indexmap",+ "libm",+ "log",+ "naga-types",+ "num-traits",+ "once_cell",+ "rustc-hash 1.1.0",+ "spirv",+ "thiserror 2.0.21",+ "unicode-ident",+]++[[package]]+name = "naga-types"+version = "30.0.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "590afbf58a6f4f62873cd5cff4468061844bafa1cdf399cc954537c22d768d49"+dependencies = [+ "hashbrown 0.17.1",+ "indexmap",+ "rustc-hash 1.1.0",+ "thiserror 2.0.21",+]++[[package]]+name = "ndk"+version = "0.9.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "c3f42e7bbe13d351b6bead8286a43aac9534b82bd3cc43e47037f012ebfd62d4"+dependencies = [+ "bitflags 2.13.2",+ "jni-sys 0.3.1",+ "log",+ "ndk-sys",+ "num_enum",+ "raw-window-handle",+ "thiserror 1.0.69",+]++[[package]]+name = "ndk-context"+version = "0.1.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "27b02d87554356db9e9a873add8782d4ea6e3e58ea071a9adb9a2e8ddb884a8b"++[[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 = "nohash-hasher"+version = "0.2.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "2bf50223579dc7cdcfb3bfcacf7069ff68243f8c363f62ffa99cf000a6b9c451"++[[package]]+name = "num-traits"+version = "0.2.19"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841"+dependencies = [+ "autocfg",+ "libm",+]++[[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",+ "proc-macro2",+ "quote",+ "syn 2.0.119",+]++[[package]]+name = "objc-sys"+version = "0.3.5"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "cdb91bdd390c7ce1a8607f35f3ca7151b65afc0ff5ff3b34fa350f7d7c7e4310"++[[package]]+name = "objc2"+version = "0.5.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "19d5490aaf8f1d7cf7688dfa9b0ce07900e168852c45cd2c03f534dfd27cfd0b"+dependencies = [+ "objc-sys",+ "objc2-encode",+]++[[package]]+name = "objc2"+version = "0.6.5"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "08849bbd4767dfae9457696856ae1c84fe4e0281bbe4a7abff2d0e06fb7981f8"+dependencies = [+ "objc2-encode",+]++[[package]]+name = "objc2-app-kit"+version = "0.2.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "e4e89ad9e3d7d297152b17d39ed92cd50ca8063a89a9fa569046d41568891eff"+dependencies = [+ "bitflags 2.13.2",+ "block2 0.5.1",+ "libc",+ "objc2 0.5.3",+ "objc2-core-data",+ "objc2-core-image",+ "objc2-foundation 0.2.2",+ "objc2-quartz-core 0.2.2",+]++[[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.2",+ "block2 0.6.2",+ "objc2 0.6.5",+ "objc2-core-foundation",+ "objc2-core-graphics",+ "objc2-foundation 0.3.2",+]++[[package]]+name = "objc2-cloud-kit"+version = "0.2.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "74dd3b56391c7a0596a295029734d3c1c5e7e510a4cb30245f8221ccea96b009"+dependencies = [+ "bitflags 2.13.2",+ "block2 0.5.1",+ "objc2 0.5.3",+ "objc2-core-location",+ "objc2-foundation 0.2.2",+]++[[package]]+name = "objc2-contacts"+version = "0.2.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "a5ff520e9c33812fd374d8deecef01d4a840e7b41862d849513de77e44aa4889"+dependencies = [+ "block2 0.5.1",+ "objc2 0.5.3",+ "objc2-foundation 0.2.2",+]++[[package]]+name = "objc2-core-data"+version = "0.2.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "617fbf49e071c178c0b24c080767db52958f716d9eabdf0890523aeae54773ef"+dependencies = [+ "bitflags 2.13.2",+ "block2 0.5.1",+ "objc2 0.5.3",+ "objc2-foundation 0.2.2",+]++[[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.2",+ "dispatch2",+ "objc2 0.6.5",+]++[[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.2",+ "dispatch2",+ "objc2 0.6.5",+ "objc2-core-foundation",+ "objc2-io-surface",+]++[[package]]+name = "objc2-core-image"+version = "0.2.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "55260963a527c99f1819c4f8e3b47fe04f9650694ef348ffd2227e8196d34c80"+dependencies = [+ "block2 0.5.1",+ "objc2 0.5.3",+ "objc2-foundation 0.2.2",+ "objc2-metal 0.2.2",+]++[[package]]+name = "objc2-core-location"+version = "0.2.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "000cfee34e683244f284252ee206a27953279d370e309649dc3ee317b37e5781"+dependencies = [+ "block2 0.5.1",+ "objc2 0.5.3",+ "objc2-contacts",+ "objc2-foundation 0.2.2",+]++[[package]]+name = "objc2-encode"+version = "4.1.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "ef25abbcd74fb2609453eb695bd2f860d389e457f67dc17cafc8b8cbc89d0c33"++[[package]]+name = "objc2-foundation"+version = "0.2.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "0ee638a5da3799329310ad4cfa62fbf045d5f56e3ef5ba4149e7452dcf89d5a8"+dependencies = [+ "bitflags 2.13.2",+ "block2 0.5.1",+ "dispatch",+ "libc",+ "objc2 0.5.3",+]++[[package]]+name = "objc2-foundation"+version = "0.3.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "e3e0adef53c21f888deb4fa59fc59f7eb17404926ee8a6f59f5df0fd7f9f3272"+dependencies = [+ "bitflags 2.13.2",+ "block2 0.6.2",+ "objc2 0.6.5",+ "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.2",+ "objc2 0.6.5",+ "objc2-core-foundation",+]++[[package]]+name = "objc2-link-presentation"+version = "0.2.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "a1a1ae721c5e35be65f01a03b6d2ac13a54cb4fa70d8a5da293d7b0020261398"+dependencies = [+ "block2 0.5.1",+ "objc2 0.5.3",+ "objc2-app-kit 0.2.2",+ "objc2-foundation 0.2.2",+]++[[package]]+name = "objc2-metal"+version = "0.2.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "dd0cba1276f6023976a406a14ffa85e1fdd19df6b0f737b063b95f6c8c7aadd6"+dependencies = [+ "bitflags 2.13.2",+ "block2 0.5.1",+ "objc2 0.5.3",+ "objc2-foundation 0.2.2",+]++[[package]]+name = "objc2-metal"+version = "0.3.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "a0125f776a10d00af4152d74616409f0d4a2053a6f57fa5b7d6aa2854ac04794"+dependencies = [+ "bitflags 2.13.2",+ "block2 0.6.2",+ "objc2 0.6.5",+ "objc2-foundation 0.3.2",+]++[[package]]+name = "objc2-quartz-core"+version = "0.2.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "e42bee7bff906b14b167da2bac5efe6b6a07e6f7c0a21a7308d40c960242dc7a"+dependencies = [+ "bitflags 2.13.2",+ "block2 0.5.1",+ "objc2 0.5.3",+ "objc2-foundation 0.2.2",+ "objc2-metal 0.2.2",+]++[[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.2",+ "objc2 0.6.5",+ "objc2-core-foundation",+ "objc2-core-graphics",+ "objc2-foundation 0.3.2",+ "objc2-metal 0.3.2",+]++[[package]]+name = "objc2-symbols"+version = "0.2.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "0a684efe3dec1b305badae1a28f6555f6ddd3bb2c2267896782858d5a78404dc"+dependencies = [+ "objc2 0.5.3",+ "objc2-foundation 0.2.2",+]++[[package]]+name = "objc2-ui-kit"+version = "0.2.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "b8bb46798b20cd6b91cbd113524c490f1686f4c4e8f49502431415f3512e2b6f"+dependencies = [+ "bitflags 2.13.2",+ "block2 0.5.1",+ "objc2 0.5.3",+ "objc2-cloud-kit",+ "objc2-core-data",+ "objc2-core-image",+ "objc2-core-location",+ "objc2-foundation 0.2.2",+ "objc2-link-presentation",+ "objc2-quartz-core 0.2.2",+ "objc2-symbols",+ "objc2-uniform-type-identifiers",+ "objc2-user-notifications",+]++[[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.2",+ "objc2 0.6.5",+ "objc2-core-foundation",+ "objc2-foundation 0.3.2",+]++[[package]]+name = "objc2-uniform-type-identifiers"+version = "0.2.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "44fa5f9748dbfe1ca6c0b79ad20725a11eca7c2218bceb4b005cb1be26273bfe"+dependencies = [+ "block2 0.5.1",+ "objc2 0.5.3",+ "objc2-foundation 0.2.2",+]++[[package]]+name = "objc2-user-notifications"+version = "0.2.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "76cfcbf642358e8689af64cee815d139339f3ed8ad05103ed5eaf73db8d84cb3"+dependencies = [+ "bitflags 2.13.2",+ "block2 0.5.1",+ "objc2 0.5.3",+ "objc2-core-location",+ "objc2-foundation 0.2.2",+]++[[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.5"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "8d8c8b8e725ad26404d6896eb2f064294a0a7b4f1d9120210d85544684c4ca95"+dependencies = [+ "is-wsl",+ "libc",+]++[[package]]+name = "orbclient"+version = "0.3.55"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "5df339f526ea9a60e371768d50efc2f2508c7203290731565d1f7a6f71d21747"+dependencies = [+ "libc",+ "libredox",+]++[[package]]+name = "ordered-float"+version = "5.5.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "7f59006ce1e204c30956638535b74d317bca99477b9356dfaec54c37f6f600ab"+dependencies = [+ "num-traits",+]++[[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 = "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 0.5.18",+ "smallvec",+ "windows-link",+]++[[package]]+name = "peniko"+version = "0.6.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "839c8299360d2e998bdb106dc0a6cd71dcc5f4df51df1b620361bf50e283cca6"+dependencies = [+ "bytemuck",+ "color",+ "kurbo 0.13.1",+ "linebender_resource_handle",+ "smallvec",+]++[[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_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 = "pico-args"+version = "0.5.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "5be167a7af36ee22fe3115051bc51f6e6c7054c9348e28deb4f49bd6f705a315"++[[package]]+name = "pin-project"+version = "1.1.13"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "2466b2336ed02bcdca6b294417127b90ec92038d1d5c4fbeac971a922e0e0924"+dependencies = [+ "pin-project-internal",+]++[[package]]+name = "pin-project-internal"+version = "1.1.13"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "c96395f0a926bc13b1c17622aaddda1ecb55d49c8f1bf9777e4d877800a43f8b"+dependencies = [+ "proc-macro2",+ "quote",+ "syn 2.0.119",+]++[[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 = "plain"+version = "0.2.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "b4596b6d070b27117e987119b4dac604f3c58cfb0b191112e24771b2faeac1a6"++[[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 0.8.9",+]++[[package]]+name = "png"+version = "0.18.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "60769b8b31b2a9f263dae2776c37b1b28ae246943cf719eb6946a1db05128a61"+dependencies = [+ "bitflags 2.13.2",+ "crc32fast",+ "fdeflate",+ "flate2",+ "miniz_oxide 0.8.9",+]++[[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 1.1.6",+ "windows-sys 0.61.2",+]++[[package]]+name = "pollster"+version = "0.4.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "2f3a9f18d041e6d0e102a0a46750538147e5e8992d3b4873aaafee2520b00ce3"++[[package]]+name = "pollster"+version = "1.0.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "bc6355899e1c9462875b6757c79f3caa011a1fdae12bbb1a2e72dd1f234f8336"++[[package]]+name = "polycool"+version = "0.4.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "50596ddc09eb5ad5f75cacd40209568e66df71baf86e1499a0e99c4cff12a5a6"+dependencies = [+ "arrayvec",+]++[[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.8"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "10ab3eb7f3becc3a1cbc4f2c6f20267996cfc1a6467a873763411b136a122715"+dependencies = [+ "portable-atomic",+]++[[package]]+name = "presser"+version = "0.3.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "e8cf8e6a8aa66ce33f63993ffc4ea4271eb5b0530a9002db8455ea6050c77bfa"++[[package]]+name = "proc-macro-crate"+version = "3.5.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "e67ba7e9b2b56446f1d419b1d807906278ffa1a658a8a5d8a39dcb1f5a78614f"+dependencies = [+ "toml_edit",+]++[[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 = "profiling"+version = "1.0.18"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "3d595e54a326bc53c1c197b32d295e14b169e3cfeaa8dc82b529f947fba6bcf5"++[[package]]+name = "pxfm"+version = "0.1.30"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "d55d956fa96f5ec02be2e13af0e20391a5aa83d6a074e3ad368959d0fab299ea"++[[package]]+name = "quick-error"+version = "2.0.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "a993555f31e5a609f617c12db6250dedcac1b0a85076912c436e6fc9b2c8e6a3"++[[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 = "range-alloc"+version = "0.1.5"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "ca45419789ae5a7899559e9512e58ca889e41f04f1f2445e9f4b290ceccd1d08"++[[package]]+name = "raw-window-handle"+version = "0.6.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "20675572f6f24e9e76ef639bc5552774ed45f1c30e2951e1e99c59888861c539"++[[package]]+name = "raw-window-metal"+version = "1.1.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "40d213455a5f1dc59214213c7330e074ddf8114c9a42411eb890c767357ce135"+dependencies = [+ "objc2 0.6.5",+ "objc2-core-foundation",+ "objc2-foundation 0.3.2",+ "objc2-quartz-core 0.3.2",+]++[[package]]+name = "rayon"+version = "1.12.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "fb39b166781f92d482534ef4b4b1b2568f42613b53e5b6c160e24cfbfa30926d"+dependencies = [+ "either",+ "rayon-core",+]++[[package]]+name = "rayon-core"+version = "1.13.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "22e18b0f0062d30d4230b2e85ff77fdfe4326feb054b9783a3460d8435c8ab91"+dependencies = [+ "crossbeam-deque",+ "crossbeam-utils",+]++[[package]]+name = "read-fonts"+version = "0.41.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "046a7d674daf459825b32f5062056d6882db0d2f5a479fbd76ccfc870ac18709"+dependencies = [+ "bytemuck",+ "font-types",+ "once_cell",+]++[[package]]+name = "redox_syscall"+version = "0.4.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa"+dependencies = [+ "bitflags 1.3.2",+]++[[package]]+name = "redox_syscall"+version = "0.5.18"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d"+dependencies = [+ "bitflags 2.13.2",+]++[[package]]+name = "redox_syscall"+version = "0.9.5"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "580c875845b41ecb1564ad1ae4703044cef774145e3d7a94dc2b3fa7c97868fd"+dependencies = [+ "bitflags 2.13.2",+]++[[package]]+name = "renderdoc-sys"+version = "1.1.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "19b30a45b0cd0bcca8037f3d0dc3421eaf95327a17cad11964fb8179b4fc4832"++[[package]]+name = "resvg"+version = "0.45.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "a8928798c0a55e03c9ca6c4c6846f76377427d2c1e1f7e6de3c06ae57942df43"+dependencies = [+ "log",+ "pico-args",+ "rgb",+ "svgtypes",+ "tiny-skia",+ "usvg",+]++[[package]]+name = "rfd"+version = "0.17.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "20dafead71c16a34e1ff357ddefc8afc11e7d51d6d2b9fbd07eaa48e3e540220"+dependencies = [+ "block2 0.6.2",+ "dispatch2",+ "js-sys",+ "libc",+ "log",+ "objc2 0.6.5",+ "objc2-app-kit 0.3.2",+ "objc2-core-foundation",+ "objc2-foundation 0.3.2",+ "percent-encoding",+ "pollster 0.4.0",+ "raw-window-handle",+ "wasm-bindgen",+ "wasm-bindgen-futures",+ "wayland-backend",+ "wayland-client",+ "wayland-protocols",+ "web-sys",+ "windows-sys 0.61.2",+]++[[package]]+name = "rgb"+version = "0.8.53"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "47b34b781b31e5d73e9fbc8689c70551fd1ade9a19e3e28cfec8580a79290cc4"+dependencies = [+ "bytemuck",+]++[[package]]+name = "ron"+version = "0.12.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "81116b9531d61eabc41aeb228e4b6b2435bcca3233b98cf3b3077d4e6e9debb3"+dependencies = [+ "bitflags 2.13.2",+ "once_cell",+ "serde",+ "serde_derive",+ "typeid",+ "unicode-ident",+]++[[package]]+name = "roxmltree"+version = "0.20.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "6c20b6793b5c2fa6553b250154b78d6d0db37e72700ae35fad9387a46f487c97"++[[package]]+name = "rustc-hash"+version = "1.1.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2"++[[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 = "0.38.44"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154"+dependencies = [+ "bitflags 2.13.2",+ "errno",+ "libc",+ "linux-raw-sys 0.4.15",+ "windows-sys 0.59.0",+]++[[package]]+name = "rustix"+version = "1.1.6"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "e5e76742e5294153d4dde1207dbec5bdd81eef6fabdc0d2118babadabfd858aa"+dependencies = [+ "bitflags 2.13.2",+ "errno",+ "libc",+ "linux-raw-sys 0.12.1",+ "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 = "scoped-tls"+version = "1.0.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294"++[[package]]+name = "scopeguard"+version = "1.2.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"++[[package]]+name = "self_cell"+version = "1.3.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "2ab42ca02749e120097e328d91d415325bdf43b1c72c4c8badf37375fe40a813"++[[package]]+name = "semver"+version = "1.0.28"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "8a7852d02fc848982e0c167ef163aaff9cd91dc640ba85e263cb1ce46fae51cd"++[[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_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.9",+]++[[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.9",+]++[[package]]+name = "serde_spanned"+version = "1.1.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "4e7523beb55eece201a2356bee0bbca0d1ab466c14c07703b2e0ee6d42cb0c2c"+dependencies = [+ "serde_core",+]++[[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 = "simd_cesu8"+version = "1.2.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "11031e251abf8611c80f460e19dbdeb54a66db918e49c65a7065b46ac7aec520"+dependencies = [+ "rustc_version",+ "simdutf8",+]++[[package]]+name = "simdutf8"+version = "0.1.5"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "e3a9fe34e3e7a50316060351f37187a3f546bce95496156754b601a5fa71b76e"++[[package]]+name = "simplecss"+version = "0.2.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "7a9c6883ca9c3c7c90e888de77b7a5c849c779d25d74a1269b0218b14e8b136c"+dependencies = [+ "log",+]++[[package]]+name = "siphasher"+version = "1.0.4"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "33f4fe9184a62d842c9ef383018f3306d8ba224fd9d836f56d7288308847c256"++[[package]]+name = "skrifa"+version = "0.44.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "819ab7d62b1d3e72d9d9dea5650bac30424f9111364bb94928dbf5ecad1baa68"+dependencies = [+ "bytemuck",+ "read-fonts",+]++[[package]]+name = "slab"+version = "0.4.12"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5"++[[package]]+name = "slotmap"+version = "1.1.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "bdd58c3c93c3d278ca835519292445cb4b0d4dc59ccfdf7ceadaab3f8aeb4038"+dependencies = [+ "version_check",+]++[[package]]+name = "smallvec"+version = "1.16.4"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "d0d5d4b1981b8bbbb7aed204cae5726d683d5d6ac7e74ec54122ea28f315e7c8"+dependencies = [+ "serde",+]++[[package]]+name = "smithay-client-toolkit"+version = "0.19.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "3457dea1f0eb631b4034d61d4d8c32074caa6cd1ab2d59f2327bd8461e2c0016"+dependencies = [+ "bitflags 2.13.2",+ "calloop 0.13.0",+ "calloop-wayland-source 0.3.0",+ "cursor-icon",+ "libc",+ "log",+ "memmap2",+ "rustix 0.38.44",+ "thiserror 1.0.69",+ "wayland-backend",+ "wayland-client",+ "wayland-csd-frame",+ "wayland-cursor",+ "wayland-protocols",+ "wayland-protocols-wlr",+ "wayland-scanner",+ "xkeysym",+]++[[package]]+name = "smithay-client-toolkit"+version = "0.20.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "0512da38f5e2b31201a93524adb8d3136276fa4fe4aafab4e1f727a82b534cc0"+dependencies = [+ "bitflags 2.13.2",+ "calloop 0.14.5",+ "calloop-wayland-source 0.4.1",+ "cursor-icon",+ "libc",+ "log",+ "memmap2",+ "rustix 1.1.6",+ "thiserror 2.0.21",+ "wayland-backend",+ "wayland-client",+ "wayland-csd-frame",+ "wayland-cursor",+ "wayland-protocols",+ "wayland-protocols-experimental",+ "wayland-protocols-misc",+ "wayland-protocols-wlr",+ "wayland-scanner",+ "xkeysym",+]++[[package]]+name = "smithay-clipboard"+version = "0.7.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "71704c03f739f7745053bde45fa203a46c58d25bc5c4efba1d9a60e9dba81226"+dependencies = [+ "libc",+ "smithay-client-toolkit 0.20.0",+ "wayland-backend",+]++[[package]]+name = "smol_str"+version = "0.2.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "dd538fb6910ac1099850255cf94a94df6551fbdd602454387d0adb2d1ca6dead"+dependencies = [+ "serde",+]++[[package]]+name = "spirv"+version = "0.4.0+sdk-1.4.341.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "d9571ea910ebd84c86af4b3ed27f9dbdc6ad06f17c5f96146b2b671e2976744f"+dependencies = [+ "bitflags 2.13.2",+]++[[package]]+name = "static_assertions"+version = "1.1.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f"++[[package]]+name = "strict-num"+version = "0.1.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "6637bab7722d379c8b41ba849228d680cc12d0a45ba1fa2b48f2a30577a06731"+dependencies = [+ "float-cmp",+]++[[package]]+name = "svgtypes"+version = "0.15.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "68c7541fff44b35860c1a7a47a7cadf3e4a304c457b58f9870d9706ece028afc"+dependencies = [+ "kurbo 0.11.3",+ "siphasher",+]++[[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.9"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "d78c8dee4c7bf0e14673097256fed6142ce9d3b85a408189d07482442145823b"+dependencies = [+ "proc-macro2",+ "quote",+ "unicode-ident",+]++[[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 1.1.6",+ "windows-sys 0.61.2",+]++[[package]]+name = "termcolor"+version = "1.4.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755"+dependencies = [+ "winapi-util",+]++[[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.21"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "09e52cb86a36cede5cb101bf8908837b3e4c6e5e59fe7fd85c23fb56200d189e"+dependencies = [+ "thiserror-impl 2.0.21",+]++[[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.21"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "fe5197923287db20a58125f0bc85c062f7f2c892de97b18c356f9efb14b28524"+dependencies = [+ "proc-macro2",+ "quote",+ "syn 3.0.9",+]++[[package]]+name = "tiff"+version = "0.11.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "b63feaf3343d35b6ca4d50483f94843803b0f51634937cc2ec519fc32232bc52"+dependencies = [+ "fax",+ "flate2",+ "half",+ "quick-error",+ "weezl",+ "zune-jpeg",+]++[[package]]+name = "tiny-skia"+version = "0.11.4"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "83d13394d44dae3207b52a326c0c85a8bf87f1541f23b0d143811088497b09ab"+dependencies = [+ "arrayref",+ "arrayvec",+ "bytemuck",+ "cfg-if",+ "log",+ "png 0.17.16",+ "tiny-skia-path",+]++[[package]]+name = "tiny-skia-path"+version = "0.11.4"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "9c9e7fc0c2e86a30b117d0462aa261b72b7a99b7ebd7deb3a14ceda95c5bdc93"+dependencies = [+ "arrayref",+ "bytemuck",+ "strict-num",+]++[[package]]+name = "tokio"+version = "1.54.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "b52fd3255258d26fac7264ab5a76b53c13367136dc011d3d6ad4f8ed070396a3"+dependencies = [+ "pin-project-lite",+]++[[package]]+name = "toml"+version = "1.1.8+spec-1.1.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "20489e00e4d8741d6be680764cc12e270655e375a20d1011e844a9c3379e678d"+dependencies = [+ "serde_core",+ "serde_spanned",+ "toml_datetime",+ "toml_parser",+ "winnow",+]++[[package]]+name = "toml_datetime"+version = "1.1.2+spec-1.1.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "2b86d767906c6c42421dcba507eb9d203e779497710a47782a224bb871653053"+dependencies = [+ "serde_core",+]++[[package]]+name = "toml_edit"+version = "0.25.17+spec-1.1.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "e3641d5bbb5349a79e1020a242d251efbc546ad8048d133958323ce9c40a9c9c"+dependencies = [+ "indexmap",+ "toml_datetime",+ "toml_parser",+ "winnow",+]++[[package]]+name = "toml_parser"+version = "1.1.5+spec-1.1.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "baa693a8032d7e1cada7d0041e96126df243179ff061456783ac7f12bda4744c"+dependencies = [+ "winnow",+]++[[package]]+name = "tracing"+version = "0.1.44"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "63e71662fa4b2a2c3a26f570f037eb95bb1f85397f3cd8076caed2f026a6d100"+dependencies = [+ "log",+ "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 = "type-map"+version = "0.5.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "cb30dbbd9036155e74adad6812e9898d03ec374946234fbcebd5dfc7b9187b90"+dependencies = [+ "rustc-hash 2.1.3",+]++[[package]]+name = "typeid"+version = "1.0.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "bc7d623258602320d5c55d1bc22793b57daff0ec7efc270ea7d55ce1d5f5471c"++[[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 = "unicode-general-category"+version = "1.1.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "0b993bddc193ae5bd0d623b49ec06ac3e9312875fdae725a975c51db1cc1677f"++[[package]]+name = "unicode-ident"+version = "1.0.27"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "a2c754d6c33795a1c324727428e5a7dedb5b06195f9890bdbcba760d3e246563"++[[package]]+name = "unicode-segmentation"+version = "1.13.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "c6f5d3c3b1bf09027a88a6bc961fc00497d651009560b5463668dc81b0fa87a8"++[[package]]+name = "unicode-width"+version = "0.2.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "b4ac048d71ede7ee76d585517add45da530660ef4390e49b098733c6e897f254"++[[package]]+name = "usvg"+version = "0.45.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "80be9b06fbae3b8b303400ab20778c80bbaf338f563afe567cf3c9eea17b47ef"+dependencies = [+ "base64",+ "data-url",+ "flate2",+ "imagesize",+ "kurbo 0.11.3",+ "log",+ "pico-args",+ "roxmltree",+ "simplecss",+ "siphasher",+ "strict-num",+ "svgtypes",+ "tiny-skia-path",+ "xmlwriter",+]++[[package]]+name = "uuid"+version = "1.29.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "4a0e2d11620c50695fe12bbbfde96b3477fe606e7284c22d505c12ce51214514"+dependencies = [+ "js-sys",+ "serde_core",+ "wasm-bindgen",+]++[[package]]+name = "vello_common"+version = "0.1.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "b2e9aed918117e8152c9eddfd8362d73c465c23f26c44786aa331707b8a64fa2"+dependencies = [+ "bytemuck",+ "fearless_simd",+ "guillotiere",+ "log",+ "peniko",+ "smallvec",+ "thiserror 2.0.21",+]++[[package]]+name = "vello_cpu"+version = "0.1.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "ac7349e1f55f6b801c7c277958df4ea53e7f20f21e8014910ad888b2ecda93ea"+dependencies = [+ "bytemuck",+ "glifo",+ "hashbrown 0.17.1",+ "vello_common",+]++[[package]]+name = "version_check"+version = "0.9.5"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a"++[[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 = "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.129"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "9bb54f33acc68fd454578d9820b0bde1a1a3d17aa17bb7b6595806d02886d409"+dependencies = [+ "cfg-if",+ "once_cell",+ "rustversion",+ "wasm-bindgen-macro",+ "wasm-bindgen-shared",+]++[[package]]+name = "wasm-bindgen-futures"+version = "0.4.79"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "3cbab34de2d982e9b48e18d216d04c4a6f641066ff19ffb699980f591ee3610e"+dependencies = [+ "js-sys",+ "tokio",+ "wasm-bindgen",+]++[[package]]+name = "wasm-bindgen-macro"+version = "0.2.129"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "2e29d0c35b16e224a7eeb5cd2d25e3e1968fbd65604117b44d3b789d00ee8535"+dependencies = [+ "quote",+ "wasm-bindgen-macro-support",+]++[[package]]+name = "wasm-bindgen-macro-support"+version = "0.2.129"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "6f501a8bc3719dba86ef8ae4728879c08001bea749eb1333ac5b91e040e2a6b7"+dependencies = [+ "bumpalo",+ "proc-macro2",+ "quote",+ "syn 3.0.9",+ "wasm-bindgen-shared",+]++[[package]]+name = "wasm-bindgen-shared"+version = "0.2.129"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "23f0c9c52aa7cd7d77769a4cfe2a9adb1b331f489a41d912ce14513d5ab995c6"+dependencies = [+ "unicode-ident",+]++[[package]]+name = "wayland-backend"+version = "0.3.17"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "38a91b4eaddff87b1cd1074985e3713da4af2c49742d1b356b2c01670a67a078"+dependencies = [+ "cc",+ "downcast-rs",+ "rustix 1.1.6",+ "scoped-tls",+ "smallvec",+ "wayland-sys",+]++[[package]]+name = "wayland-client"+version = "0.31.15"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "e3c36a0f861ad76d0901f2800b46321410d9f73f2ea88aac0650d86c32688073"+dependencies = [+ "bitflags 2.13.2",+ "rustix 1.1.6",+ "wayland-backend",+ "wayland-scanner",+]++[[package]]+name = "wayland-csd-frame"+version = "0.3.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "625c5029dbd43d25e6aa9615e88b829a5cad13b2819c4ae129fdbb7c31ab4c7e"+dependencies = [+ "bitflags 2.13.2",+ "cursor-icon",+ "wayland-backend",+]++[[package]]+name = "wayland-cursor"+version = "0.31.14"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "4a52d18780be9b1314328a3de5f930b73d2200112e3849ca6cb11822793fb34d"+dependencies = [+ "rustix 1.1.6",+ "wayland-client",+ "xcursor",+]++[[package]]+name = "wayland-protocols"+version = "0.32.13"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "23d0c813de3daa2ed6520af85a3bd49b0e722a3078506899aa9686fea58dc4b6"+dependencies = [+ "bitflags 2.13.2",+ "wayland-backend",+ "wayland-client",+ "wayland-scanner",+]++[[package]]+name = "wayland-protocols-experimental"+version = "20250721.0.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "40a1f863128dcaaec790d7b4b396cc9b9a7a079e878e18c47e6c2d2c5a8dcbb1"+dependencies = [+ "bitflags 2.13.2",+ "wayland-backend",+ "wayland-client",+ "wayland-protocols",+ "wayland-scanner",+]++[[package]]+name = "wayland-protocols-misc"+version = "0.3.12"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "6e9567599ef23e09b8dad6e429e5738d4509dfc46b3b21f32841a304d16b29c8"+dependencies = [+ "bitflags 2.13.2",+ "wayland-backend",+ "wayland-client",+ "wayland-protocols",+ "wayland-scanner",+]++[[package]]+name = "wayland-protocols-plasma"+version = "0.3.12"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "2b6d8cf1eb2c1c31ed1f5643c88a6e53538129d4af80030c8cabd1f9fa884d91"+dependencies = [+ "bitflags 2.13.2",+ "wayland-backend",+ "wayland-client",+ "wayland-protocols",+ "wayland-scanner",+]++[[package]]+name = "wayland-protocols-wlr"+version = "0.3.12"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "eb04e52f7836d7c7976c78ca0250d61e33873c34156a2a1fc9474828ec268234"+dependencies = [+ "bitflags 2.13.2",+ "wayland-backend",+ "wayland-client",+ "wayland-protocols",+ "wayland-scanner",+]++[[package]]+name = "wayland-scanner"+version = "0.31.11"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "338e30461b3a2b67d70eb30a6d89f8e0c93a833e07d2ae89085cd070c4a00ac0"+dependencies = [+ "proc-macro2",+ "quick-xml",+ "quote",+]++[[package]]+name = "wayland-sys"+version = "0.31.11"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "d8eab23fefc9e41f8e841df4a9c707e8a8c4ed26e944ef69297184de2785e3be"+dependencies = [+ "dlib",+ "log",+ "once_cell",+ "pkg-config",+]++[[package]]+name = "web-sys"+version = "0.3.106"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "88261b9deccee56594c11a3460c462c41f58d148598fe70ad77070126a68aba4"+dependencies = [+ "js-sys",+ "wasm-bindgen",+]++[[package]]+name = "web-time"+version = "1.1.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb"+dependencies = [+ "js-sys",+ "wasm-bindgen",+]++[[package]]+name = "weezl"+version = "0.1.12"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "a28ac98ddc8b9274cb41bb4d9d4d5c425b6020c50c46f25559911905610b4a88"++[[package]]+name = "wgpu"+version = "30.0.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "527ccdf43dd5b2e8676eed9984ce00e2bbb0a1b85b70c1969dcb6cd2eb55ab9e"+dependencies = [+ "arrayvec",+ "bitflags 2.13.2",+ "bytemuck",+ "cfg-if",+ "cfg_aliases",+ "document-features",+ "hashbrown 0.17.1",+ "js-sys",+ "log",+ "naga",+ "parking_lot",+ "portable-atomic",+ "profiling",+ "raw-window-handle",+ "smallvec",+ "static_assertions",+ "wasm-bindgen",+ "wasm-bindgen-futures",+ "web-sys",+ "wgpu-core",+ "wgpu-hal",+ "wgpu-types",+]++[[package]]+name = "wgpu-core"+version = "30.0.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "14c018fce9b6270aa203c2fdd56f3cce996713534bd757e4ea58c8560b121f14"+dependencies = [+ "arrayvec",+ "bit-set",+ "bit-vec",+ "bitflags 2.13.2",+ "bytemuck",+ "cfg_aliases",+ "document-features",+ "hashbrown 0.17.1",+ "indexmap",+ "log",+ "naga",+ "naga-types",+ "once_cell",+ "parking_lot",+ "portable-atomic",+ "profiling",+ "raw-window-handle",+ "rustc-hash 1.1.0",+ "smallvec",+ "thiserror 2.0.21",+ "wgpu-core-deps-apple",+ "wgpu-core-deps-emscripten",+ "wgpu-core-deps-wasm",+ "wgpu-core-deps-windows-linux-android",+ "wgpu-hal",+ "wgpu-naga-bridge",+ "wgpu-types",+]++[[package]]+name = "wgpu-core-deps-apple"+version = "30.0.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "061f3d319a40d39d00b1ecc2c33b89fe21d4e6fe01859df3500a3a8ecccd6b68"+dependencies = [+ "wgpu-hal",+]++[[package]]+name = "wgpu-core-deps-emscripten"+version = "30.0.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "d98b86cf4abf524a902dd35f18ca6a3f08fc2ae9847c8f10b48e30491b1f0b86"+dependencies = [+ "wgpu-hal",+]++[[package]]+name = "wgpu-core-deps-wasm"+version = "30.0.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "d260ca2ca8adc654f513a869bf3cac0b47f5b8d3f87803d6942015f8de597aae"+dependencies = [+ "wgpu-hal",+]++[[package]]+name = "wgpu-core-deps-windows-linux-android"+version = "30.0.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "7586165fd5f6d881cb9ce4bb71f40d6caab2c0f1837e3fc1d9788a197fb6004f"+dependencies = [+ "wgpu-hal",+]++[[package]]+name = "wgpu-hal"+version = "30.0.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "b6b7fb58561a792bc237628ba0792e332de418fefe145f13b5ed8201e6d52f58"+dependencies = [+ "android_system_properties",+ "arrayvec",+ "ash",+ "bit-set",+ "bitflags 2.13.2",+ "block2 0.6.2",+ "bytemuck",+ "cfg-if",+ "cfg_aliases",+ "glow",+ "glutin_wgl_sys",+ "gpu-allocator",+ "hashbrown 0.17.1",+ "js-sys",+ "khronos-egl",+ "libc",+ "libloading",+ "log",+ "naga",+ "naga-types",+ "ndk-sys",+ "objc2 0.6.5",+ "objc2-core-foundation",+ "objc2-core-graphics",+ "objc2-foundation 0.3.2",+ "objc2-metal 0.3.2",+ "objc2-quartz-core 0.3.2",+ "once_cell",+ "ordered-float",+ "parking_lot",+ "portable-atomic",+ "portable-atomic-util",+ "profiling",+ "range-alloc",+ "raw-window-handle",+ "raw-window-metal",+ "renderdoc-sys",+ "smallvec",+ "static_assertions",+ "thiserror 2.0.21",+ "wasm-bindgen",+ "wayland-sys",+ "web-sys",+ "wgpu-naga-bridge",+ "wgpu-types",+ "windows",+ "windows-core",+ "windows-result",+]++[[package]]+name = "wgpu-naga-bridge"+version = "30.0.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "d2f62e73117bb7a62bfd9c5a5841438a823f6566c6442a808ee269d2d055c081"+dependencies = [+ "naga",+ "wgpu-types",+]++[[package]]+name = "wgpu-types"+version = "30.0.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "99dad6f1fbdbbdb4c278a6508b059d44688f5cebddf78d005a46a31340269286"+dependencies = [+ "bitflags 2.13.2",+ "bytemuck",+ "js-sys",+ "log",+ "naga-types",+ "raw-window-handle",+ "static_assertions",+ "web-sys",+]++[[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 = "windows"+version = "0.62.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "527fadee13e0c05939a6a05d5bd6eec6cd2e3dbd648b9f8e447c6518133d8580"+dependencies = [+ "windows-collections",+ "windows-core",+ "windows-future",+ "windows-numerics",+]++[[package]]+name = "windows-collections"+version = "0.3.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "23b2d95af1a8a14a3c7367e1ed4fc9c20e0a26e79551b1454d72583c97cc6610"+dependencies = [+ "windows-core",+]++[[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",+ "windows-result",+ "windows-strings",+]++[[package]]+name = "windows-future"+version = "0.3.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "e1d6f90251fe18a279739e78025bd6ddc52a7e22f921070ccdc67dde84c605cb"+dependencies = [+ "windows-core",+ "windows-link",+ "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.2.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5"++[[package]]+name = "windows-numerics"+version = "0.3.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "6e2e40844ac143cdb44aead537bbf727de9b044e107a0f1220392177d15b0f26"+dependencies = [+ "windows-core",+ "windows-link",+]++[[package]]+name = "windows-result"+version = "0.4.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "7781fa89eaf60850ac3d2da7af8e5242a5ea78d1a11c49bf2910bb5a73853eb5"+dependencies = [+ "windows-link",+]++[[package]]+name = "windows-strings"+version = "0.5.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "7837d08f69c77cf6b07689544538e017c1bfcf57e34b4c0ff58e6c2cd3b37091"+dependencies = [+ "windows-link",+]++[[package]]+name = "windows-sys"+version = "0.52.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d"+dependencies = [+ "windows-targets",+]++[[package]]+name = "windows-sys"+version = "0.59.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b"+dependencies = [+ "windows-targets",+]++[[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 = "windows-targets"+version = "0.52.6"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973"+dependencies = [+ "windows_aarch64_gnullvm",+ "windows_aarch64_msvc",+ "windows_i686_gnu",+ "windows_i686_gnullvm",+ "windows_i686_msvc",+ "windows_x86_64_gnu",+ "windows_x86_64_gnullvm",+ "windows_x86_64_msvc",+]++[[package]]+name = "windows-threading"+version = "0.2.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "3949bd5b99cafdf1c7ca86b43ca564028dfe27d66958f2470940f73d86d75b37"+dependencies = [+ "windows-link",+]++[[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_msvc"+version = "0.52.6"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469"++[[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_gnullvm"+version = "0.52.6"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66"++[[package]]+name = "windows_i686_msvc"+version = "0.52.6"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66"++[[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_gnullvm"+version = "0.52.6"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d"++[[package]]+name = "windows_x86_64_msvc"+version = "0.52.6"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"++[[package]]+name = "winit"+version = "0.30.13"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "a6755fa58a9f8350bd1e472d4c3fcc25f824ec358933bba33306d0b63df5978d"+dependencies = [+ "ahash",+ "android-activity",+ "atomic-waker",+ "bitflags 2.13.2",+ "block2 0.5.1",+ "bytemuck",+ "calloop 0.13.0",+ "cfg_aliases",+ "concurrent-queue",+ "core-foundation",+ "core-graphics",+ "cursor-icon",+ "dpi",+ "js-sys",+ "libc",+ "memmap2",+ "ndk",+ "objc2 0.5.3",+ "objc2-app-kit 0.2.2",+ "objc2-foundation 0.2.2",+ "objc2-ui-kit 0.2.2",+ "orbclient",+ "percent-encoding",+ "pin-project",+ "raw-window-handle",+ "redox_syscall 0.4.1",+ "rustix 0.38.44",+ "smithay-client-toolkit 0.19.2",+ "smol_str",+ "tracing",+ "unicode-segmentation",+ "wasm-bindgen",+ "wasm-bindgen-futures",+ "wayland-backend",+ "wayland-client",+ "wayland-protocols",+ "wayland-protocols-plasma",+ "web-sys",+ "web-time",+ "windows-sys 0.52.0",+ "x11-dl",+ "x11rb",+ "xkbcommon-dl",+]++[[package]]+name = "winnow"+version = "1.0.4"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "23b97319f7b8343df12cc98938e5c3eb436064524c8d2b4e30a1d3a36eecdf81"+dependencies = [+ "memchr",+]++[[package]]+name = "wit-bindgen"+version = "0.57.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "1ebf944e87a7c253233ad6766e082e3cd714b5d03812acc24c318f549614536e"++[[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 = "x11rb"+version = "0.13.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "9993aa5be5a26815fe2c3eacfc1fde061fc1a1f094bf1ad2a18bf9c495dd7414"+dependencies = [+ "as-raw-xcb-connection",+ "gethostname",+ "libc",+ "libloading",+ "once_cell",+ "rustix 1.1.6",+ "x11rb-protocol",+]++[[package]]+name = "x11rb-protocol"+version = "0.13.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "ea6fc2961e4ef194dcbfe56bb845534d0dc8098940c7e5c012a258bfec6701bd"++[[package]]+name = "xcursor"+version = "0.3.11"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "163b33ed8786455e2fa5d72f554057ce3f3182425434f756cd39c99839d88e23"++[[package]]+name = "xkbcommon-dl"+version = "0.4.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "d039de8032a9a8856a6be89cea3e5d12fdd82306ab7c94d74e6deab2460651c5"+dependencies = [+ "bitflags 2.13.2",+ "dlib",+ "log",+ "once_cell",+ "xkeysym",+]++[[package]]+name = "xkeysym"+version = "0.2.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "b9cc00251562a284751c9973bace760d86c0276c471b4be569fe6b068ee97a56"++[[package]]+name = "xml-rs"+version = "0.8.29"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "e450f9b2ed1dff33c94c12589a87338689467b9c4f5d8a5710bd09a847d2c8a7"++[[package]]+name = "xmlwriter"+version = "0.1.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "ec7a2a501ed189703dba8b08142f057e887dfc4b2cc4db2d343ac6376ba3e0b9"++[[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 1.1.6",+ "serde",+ "serde_repr",+ "tracing",+ "uds_windows",+ "uuid",+ "windows-sys 0.61.2",+ "winnow",+ "zbus_macros",+ "zbus_names",+ "zvariant",+]++[[package]]+name = "zbus-lockstep"+version = "0.5.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "6998de05217a084b7578728a9443d04ea4cd80f2a0839b8d78770b76ccd45863"+dependencies = [+ "zbus_xml",+ "zvariant",+]++[[package]]+name = "zbus-lockstep-macros"+version = "0.5.2"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "10da05367f3a7b7553c8cdf8fa91aee6b64afebe32b51c95177957efc47ca3a0"+dependencies = [+ "proc-macro2",+ "quote",+ "syn 2.0.119",+ "zbus-lockstep",+ "zbus_xml",+ "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",+ "proc-macro2",+ "quote",+ "syn 3.0.9",+ "zbus_names",+ "zvariant",+ "zvariant_utils",+]++[[package]]+name = "zbus_names"+version = "4.3.5"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "812a12be4ead7a59e18ea8f047d08add0066b73bc62fc1467066a2472ae088dd"+dependencies = [+ "serde",+ "winnow",+ "zvariant",+]++[[package]]+name = "zbus_xml"+version = "5.2.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "d1586c021a01ca0a9216dcd874e546382e156a5cbab5fab6cb5f10087e22682a"+dependencies = [+ "serde",+ "winnow",+ "zbus_names",+ "zvariant",+]++[[package]]+name = "zcheapstr"+version = "1.1.0"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "d1afec51604565183aeb5c54c20aeab286120d4e4460f7f76e3e8bb8c0d99473"+dependencies = [+ "serde",+]++[[package]]+name = "zerocopy"+version = "0.8.63"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "e5fe1f8f1b06191a00962174c61aa5005e0bb391a6d80d07e24d115c01a92ed8"+dependencies = [+ "zerocopy-derive",+]++[[package]]+name = "zerocopy-derive"+version = "0.8.63"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "863ad3ac83293fb4d740aedbfdc9240dd8d1a50c1099acd76ce80ce7c7230c7f"+dependencies = [+ "proc-macro2",+ "quote",+ "syn 2.0.119",+]++[[package]]+name = "zlib-rs"+version = "0.6.8"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "b268e58e7c693d7c271f93ffc4ba3b380412554231c85bf61ca7af91042a4112"++[[package]]+name = "zune-core"+version = "0.5.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "d56377fd46368984a170bc5aac5567e52ca5da874caa60bea39fcbca78fb658b"++[[package]]+name = "zune-jpeg"+version = "0.5.15"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "27bc9d5b815bc103f142aa054f561d9187d191692ec7c2d1e2b4737f8dbd7296"+dependencies = [+ "zune-core",+]++[[package]]+name = "zvariant"+version = "5.15.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "80bf6d6cd6a4b601acb64cfb8284cdc643fcfa75ef26ae3c46ec8aa4e8a1fbb7"+dependencies = [+ "endi",+ "enumflags2",+ "serde",+ "winnow",+ "zcheapstr",+ "zvariant_derive",+ "zvariant_utils",+]++[[package]]+name = "zvariant_derive"+version = "5.15.1"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "ef2672456ba1cb54b5eaec136e63135b3c7495fb938e53b28a62e633496d486d"+dependencies = [+ "proc-macro-crate",+ "proc-macro2",+ "quote",+ "syn 3.0.9",+ "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.9",+ "winnow",+]diff --git a/Cargo.toml b/Cargo.tomlnew file mode 100644index 0000000..f64a2f5--- /dev/null+++ b/Cargo.toml@@ -0,0 +1,33 @@+[package]+name = "gitcraft"+version = "0.1.0"+edition = "2024"+rust-version = "1.95"+license = "MIT OR Apache-2.0"+description = "A small, personal visual git client"+publish = false++[dependencies]+eframe = { version = "0.36", default-features = false, features = ["default_fonts", "wgpu", "accesskit", "wayland", "x11", "persistence"] }+egui = "0.36"+egui_extras = { version = "0.36", default-features = false, features = ["svg", "image"] }+rfd = "0.17"+serde = { version = "1", features = ["derive"] }++[lints.rust]+unsafe_code = "forbid"++[lints.clippy]+unwrap_used = "deny"+expect_used = "deny"+panic = "deny"++[profile.dev.package."*"]+opt-level = 2++[profile.release]+opt-level = 3+lto = "thin"++[dev-dependencies]+egui_kittest = { version = "0.36", features = ["wgpu", "snapshot", "eframe"] }diff --git a/README.md b/README.mdnew file mode 100644index 0000000..721c97a--- /dev/null+++ b/README.md@@ -0,0 +1,71 @@+# gitcraft++A small, personal visual git client: a simplified take on the usual graph-based git GUIs.+Rust + [egui/eframe](https://github.com/emilk/egui), the same stack and look as WordCraft and+PhotoCraft, so it builds on Windows, Linux and macOS. It drives the installed `git` command line,+so your config, credentials and hooks apply as usual.++## Features++- **Start page**: checks that `git` is installed; open an existing repository, create one+ (`git init`) or clone one; recent repositories.+- **Tabs** like a browser, one per repository. `+` / Ctrl+T opens a start page, Ctrl+W closes,+ middle-click closes. Open tabs, recents and the theme are remembered.+- **Branches** (left): local branches with ahead/behind counts, remote branches per remote, tags,+ a filter. Click jumps to the commit; double-click checks out. Right-click: check out, merge into+ the current branch, create a branch, copy the name, delete (with force option), delete from the+ remote, delete a tag.+- **Graph** (centre): every branch, coloured lanes, ref badges (a local branch in sync with its+ remote shows one badge with a cloud), up to 5000 commits, ↑/↓ to move. An *Uncommitted changes*+ row sits on top when the working tree is dirty. Right-click a commit: create a branch, check it+ out (detached), cherry-pick, revert, copy hash or message.+- **Detail** (right): commit message, author, parents (clickable), changed files with +/−.+ On the changes row: conflicted / unstaged / staged lists with stage, unstage, discard and+ mark-resolved buttons on hover, *Stage all* / *Unstage all*, and the commit box+ (Ctrl+Enter; with nothing staged it stages everything).+- **Diff**: clicking a file shows its diff in the centre with old/new line numbers (Esc closes).+- **Merges and conflicts**: a merge, cherry-pick or revert that stops on conflicts shows a banner+ with *Abort*; the prepared merge message fills the commit box.+- **Toolbar**: Fetch (`--all --prune`), Pull (`--ff-only`), Push (publishes a new branch with+ `-u`), new branch, refresh (F5; also when the window regains focus).+- **Themes**: Dark, Medium Gray and Light, from PhotoCraft's Pro palettes.++## Build and run++```bash+cargo run --release # start+cargo run --release -- path/to/repo # open a repository directly+cargo test+```++Linux needs the usual eframe system packages (e.g. `libxkbcommon-dev`, `libgtk-3-dev` for the+file dialogs).++### Looking at the UI headlessly++`examples/ui_shot.rs` drives the app without a window (egui_kittest) and saves PNGs:++```bash+cargo run --example ui_shot -- path/to/repo /tmp/shot click:500,266 shot key:Escape shot+```++Steps: `click:x,y`, `rclick:x,y`, `hover:x,y`, `key:Name`, `type:text`, `wait:ms`, `shot`.++## Layout++| File | Job |+|---|---|+| `src/git.rs` | `git` CLI wrapper and output parsing (refs, log, status, diffs) |+| `src/graph.rs` | lane layout for the commit graph |+| `src/theme.rs` | colour tokens, fonts, egui style (PhotoCraft's Pro themes) |+| `src/icons.rs` | embedded Lucide SVG icons, tinted |+| `src/repo/mod.rs` | one repository tab: state, background git work, toolbar |+| `src/repo/sidebar.rs` | branches pane |+| `src/repo/graph_view.rs` | commit graph |+| `src/repo/detail.rs` | commit detail, changes and commit box |+| `src/repo/diff.rs` | diff parsing and the diff view |+| `src/repo/dialogs.rs` | create-branch and confirmation dialogs |+| `src/repo/widgets.rs` | shared painted widgets (panel headers, file rows, chips) |+| `src/app.rs` | window shell: git check, tabs, start page, cloning, persistence |++Assets and their licences: [ATTRIBUTION.md](ATTRIBUTION.md).diff --git a/assets/fonts/Inter-Medium.ttf b/assets/fonts/Inter-Medium.ttfnew file mode 100644index 0000000..458cd06Binary files /dev/null and b/assets/fonts/Inter-Medium.ttf differdiff --git a/assets/fonts/Inter-Regular.ttf b/assets/fonts/Inter-Regular.ttfnew file mode 100644index 0000000..b7aaca8Binary files /dev/null and b/assets/fonts/Inter-Regular.ttf differdiff --git a/assets/fonts/Inter-SemiBold.ttf b/assets/fonts/Inter-SemiBold.ttfnew file mode 100644index 0000000..47f8ab1Binary files /dev/null and b/assets/fonts/Inter-SemiBold.ttf differdiff --git a/assets/fonts/JetBrainsMono-Regular.ttf b/assets/fonts/JetBrainsMono-Regular.ttfnew file mode 100644index 0000000..711830eBinary files /dev/null and b/assets/fonts/JetBrainsMono-Regular.ttf differdiff --git a/assets/fonts/OFL-Inter.txt b/assets/fonts/OFL-Inter.txtnew file mode 100644index 0000000..9b2ca37--- /dev/null+++ b/assets/fonts/OFL-Inter.txt@@ -0,0 +1,92 @@+Copyright (c) 2016 The Inter Project Authors (https://github.com/rsms/inter)++This Font Software is licensed under the SIL Open Font License, Version 1.1.+This license is copied below, and is also available with a FAQ at:+http://scripts.sil.org/OFL++-----------------------------------------------------------+SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007+-----------------------------------------------------------++PREAMBLE+The goals of the Open Font License (OFL) are to stimulate worldwide+development of collaborative font projects, to support the font creation+efforts of academic and linguistic communities, and to provide a free and+open framework in which fonts may be shared and improved in partnership+with others.++The OFL allows the licensed fonts to be used, studied, modified and+redistributed freely as long as they are not sold by themselves. The+fonts, including any derivative works, can be bundled, embedded,+redistributed and/or sold with any software provided that any reserved+names are not used by derivative works. The fonts and derivatives,+however, cannot be released under any other type of license. The+requirement for fonts to remain under this license does not apply+to any document created using the fonts or their derivatives.++DEFINITIONS+"Font Software" refers to the set of files released by the Copyright+Holder(s) under this license and clearly marked as such. This may+include source files, build scripts and documentation.++"Reserved Font Name" refers to any names specified as such after the+copyright statement(s).++"Original Version" refers to the collection of Font Software components as+distributed by the Copyright Holder(s).++"Modified Version" refers to any derivative made by adding to, deleting,+or substituting -- in part or in whole -- any of the components of the+Original Version, by changing formats or by porting the Font Software to a+new environment.++"Author" refers to any designer, engineer, programmer, technical+writer or other person who contributed to the Font Software.++PERMISSION AND CONDITIONS+Permission is hereby granted, free of charge, to any person obtaining+a copy of the Font Software, to use, study, copy, merge, embed, modify,+redistribute, and sell modified and unmodified copies of the Font+Software, subject to the following conditions:++1) Neither the Font Software nor any of its individual components,+in Original or Modified Versions, may be sold by itself.++2) Original or Modified Versions of the Font Software may be bundled,+redistributed and/or sold with any software, provided that each copy+contains the above copyright notice and this license. These can be+included either as stand-alone text files, human-readable headers or+in the appropriate machine-readable metadata fields within text or+binary files as long as those fields can be easily viewed by the user.++3) No Modified Version of the Font Software may use the Reserved Font+Name(s) unless explicit written permission is granted by the corresponding+Copyright Holder. This restriction only applies to the primary font name as+presented to the users.++4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font+Software shall not be used to promote, endorse or advertise any+Modified Version, except to acknowledge the contribution(s) of the+Copyright Holder(s) and the Author(s) or with their explicit written+permission.++5) The Font Software, modified or unmodified, in part or in whole,+must be distributed entirely under this license, and must not be+distributed under any other license. The requirement for fonts to+remain under this license does not apply to any document created+using the Font Software.++TERMINATION+This license becomes null and void if any of the above conditions are+not met.++DISCLAIMER+THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT+OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE+COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,+INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL+DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING+FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM+OTHER DEALINGS IN THE FONT SOFTWARE.diff --git a/assets/fonts/OFL-JetBrainsMono.txt b/assets/fonts/OFL-JetBrainsMono.txtnew file mode 100644index 0000000..5ceee00--- /dev/null+++ b/assets/fonts/OFL-JetBrainsMono.txt@@ -0,0 +1,93 @@+Copyright 2020 The JetBrains Mono Project Authors (https://github.com/JetBrains/JetBrainsMono)++This Font Software is licensed under the SIL Open Font License, Version 1.1.+This license is copied below, and is also available with a FAQ at:+https://openfontlicense.org+++-----------------------------------------------------------+SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007+-----------------------------------------------------------++PREAMBLE+The goals of the Open Font License (OFL) are to stimulate worldwide+development of collaborative font projects, to support the font creation+efforts of academic and linguistic communities, and to provide a free and+open framework in which fonts may be shared and improved in partnership+with others.++The OFL allows the licensed fonts to be used, studied, modified and+redistributed freely as long as they are not sold by themselves. The+fonts, including any derivative works, can be bundled, embedded,+redistributed and/or sold with any software provided that any reserved+names are not used by derivative works. The fonts and derivatives,+however, cannot be released under any other type of license. The+requirement for fonts to remain under this license does not apply+to any document created using the fonts or their derivatives.++DEFINITIONS+"Font Software" refers to the set of files released by the Copyright+Holder(s) under this license and clearly marked as such. This may+include source files, build scripts and documentation.++"Reserved Font Name" refers to any names specified as such after the+copyright statement(s).++"Original Version" refers to the collection of Font Software components as+distributed by the Copyright Holder(s).++"Modified Version" refers to any derivative made by adding to, deleting,+or substituting -- in part or in whole -- any of the components of the+Original Version, by changing formats or by porting the Font Software to a+new environment.++"Author" refers to any designer, engineer, programmer, technical+writer or other person who contributed to the Font Software.++PERMISSION & CONDITIONS+Permission is hereby granted, free of charge, to any person obtaining+a copy of the Font Software, to use, study, copy, merge, embed, modify,+redistribute, and sell modified and unmodified copies of the Font+Software, subject to the following conditions:++1) Neither the Font Software nor any of its individual components,+in Original or Modified Versions, may be sold by itself.++2) Original or Modified Versions of the Font Software may be bundled,+redistributed and/or sold with any software, provided that each copy+contains the above copyright notice and this license. These can be+included either as stand-alone text files, human-readable headers or+in the appropriate machine-readable metadata fields within text or+binary files as long as those fields can be easily viewed by the user.++3) No Modified Version of the Font Software may use the Reserved Font+Name(s) unless explicit written permission is granted by the corresponding+Copyright Holder. This restriction only applies to the primary font name as+presented to the users.++4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font+Software shall not be used to promote, endorse or advertise any+Modified Version, except to acknowledge the contribution(s) of the+Copyright Holder(s) and the Author(s) or with their explicit written+permission.++5) The Font Software, modified or unmodified, in part or in whole,+must be distributed entirely under this license, and must not be+distributed under any other license. The requirement for fonts to+remain under this license does not apply to any document created+using the Font Software.++TERMINATION+This license becomes null and void if any of the above conditions are+not met.++DISCLAIMER+THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT+OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE+COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,+INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL+DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING+FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM+OTHER DEALINGS IN THE FONT SOFTWARE.diff --git a/assets/icons/LICENSE-lucide.txt b/assets/icons/LICENSE-lucide.txtnew file mode 100644index 0000000..718bb3f--- /dev/null+++ b/assets/icons/LICENSE-lucide.txt@@ -0,0 +1,43 @@+ISC License++Copyright (c) 2026 Lucide Icons and Contributors++Permission to use, copy, modify, and/or distribute this software for any+purpose with or without fee is hereby granted, provided that the above+copyright notice and this permission notice appear in all copies.++THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF+OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.++---++The following Lucide icons are derived from the Feather project:++airplay, alert-circle, alert-octagon, alert-triangle, aperture, arrow-down-circle, arrow-down-left, arrow-down-right, arrow-down, arrow-left-circle, arrow-left, arrow-right-circle, arrow-right, arrow-up-circle, arrow-up-left, arrow-up-right, arrow-up, at-sign, calendar, cast, check, chevron-down, chevron-left, chevron-right, chevron-up, chevrons-down, chevrons-left, chevrons-right, chevrons-up, circle, clipboard, clock, code, columns, command, compass, corner-down-left, corner-down-right, corner-left-down, corner-left-up, corner-right-down, corner-right-up, corner-up-left, corner-up-right, crosshair, database, divide-circle, divide-square, dollar-sign, download, external-link, feather, frown, hash, headphones, help-circle, info, italic, key, layout, life-buoy, link-2, link, loader, lock, log-in, log-out, maximize, meh, minimize, minimize-2, minus-circle, minus-square, minus, monitor, moon, more-horizontal, more-vertical, move, music, navigation-2, navigation, octagon, pause-circle, percent, plus-circle, plus-square, plus, power, radio, rss, search, server, share, shopping-bag, sidebar, smartphone, smile, square, table-2, tablet, target, terminal, trash-2, trash, triangle, tv, type, upload, x-circle, x-octagon, x-square, x, zoom-in, zoom-out++The MIT License (MIT) (for the icons listed above)++Copyright (c) 2013-present Cole Bemis++Permission is hereby granted, free of charge, to any person obtaining a copy+of this software and associated documentation files (the "Software"), to deal+in the Software without restriction, including without limitation the rights+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell+copies of the Software, and to permit persons to whom the Software is+furnished to do so, subject to the following conditions:++The above copyright notice and this permission notice shall be included in all+copies or substantial portions of the Software.++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE+SOFTWARE.diff --git a/assets/icons/arrow-down-to-line.svg b/assets/icons/arrow-down-to-line.svgnew file mode 100644index 0000000..5834201--- /dev/null+++ b/assets/icons/arrow-down-to-line.svg@@ -0,0 +1,15 @@+<svg+ xmlns="http://www.w3.org/2000/svg"+ width="24"+ height="24"+ viewBox="0 0 24 24"+ fill="none"+ stroke="currentColor"+ stroke-width="2"+ stroke-linecap="round"+ stroke-linejoin="round"+>+ <path d="M12 17V3" />+ <path d="m6 11 6 6 6-6" />+ <path d="M19 21H5" />+</svg>diff --git a/assets/icons/arrow-down.svg b/assets/icons/arrow-down.svgnew file mode 100644index 0000000..3244b63--- /dev/null+++ b/assets/icons/arrow-down.svg@@ -0,0 +1,14 @@+<svg+ xmlns="http://www.w3.org/2000/svg"+ width="24"+ height="24"+ viewBox="0 0 24 24"+ fill="none"+ stroke="currentColor"+ stroke-width="2"+ stroke-linecap="round"+ stroke-linejoin="round"+>+ <path d="M12 5v14" />+ <path d="m19 12-7 7-7-7" />+</svg>diff --git a/assets/icons/arrow-up-from-line.svg b/assets/icons/arrow-up-from-line.svgnew file mode 100644index 0000000..2a60541--- /dev/null+++ b/assets/icons/arrow-up-from-line.svg@@ -0,0 +1,15 @@+<svg+ xmlns="http://www.w3.org/2000/svg"+ width="24"+ height="24"+ viewBox="0 0 24 24"+ fill="none"+ stroke="currentColor"+ stroke-width="2"+ stroke-linecap="round"+ stroke-linejoin="round"+>+ <path d="m18 9-6-6-6 6" />+ <path d="M12 3v14" />+ <path d="M5 21h14" />+</svg>diff --git a/assets/icons/arrow-up.svg b/assets/icons/arrow-up.svgnew file mode 100644index 0000000..50a81cb--- /dev/null+++ b/assets/icons/arrow-up.svg@@ -0,0 +1,14 @@+<svg+ xmlns="http://www.w3.org/2000/svg"+ width="24"+ height="24"+ viewBox="0 0 24 24"+ fill="none"+ stroke="currentColor"+ stroke-width="2"+ stroke-linecap="round"+ stroke-linejoin="round"+>+ <path d="m5 12 7-7 7 7" />+ <path d="M12 19V5" />+</svg>diff --git a/assets/icons/check.svg b/assets/icons/check.svgnew file mode 100644index 0000000..5abe152--- /dev/null+++ b/assets/icons/check.svg@@ -0,0 +1,13 @@+<svg+ xmlns="http://www.w3.org/2000/svg"+ width="24"+ height="24"+ viewBox="0 0 24 24"+ fill="none"+ stroke="currentColor"+ stroke-width="2"+ stroke-linecap="round"+ stroke-linejoin="round"+>+ <path d="M20 6 9 17l-5-5" />+</svg>diff --git a/assets/icons/chevron-down.svg b/assets/icons/chevron-down.svgnew file mode 100644index 0000000..e70d30b--- /dev/null+++ b/assets/icons/chevron-down.svg@@ -0,0 +1,13 @@+<svg+ xmlns="http://www.w3.org/2000/svg"+ width="24"+ height="24"+ viewBox="0 0 24 24"+ fill="none"+ stroke="currentColor"+ stroke-width="2"+ stroke-linecap="round"+ stroke-linejoin="round"+>+ <path d="m6 9 6 6 6-6" />+</svg>diff --git a/assets/icons/chevron-right.svg b/assets/icons/chevron-right.svgnew file mode 100644index 0000000..db62a0c--- /dev/null+++ b/assets/icons/chevron-right.svg@@ -0,0 +1,13 @@+<svg+ xmlns="http://www.w3.org/2000/svg"+ width="24"+ height="24"+ viewBox="0 0 24 24"+ fill="none"+ stroke="currentColor"+ stroke-width="2"+ stroke-linecap="round"+ stroke-linejoin="round"+>+ <path d="m9 18 6-6-6-6" />+</svg>diff --git a/assets/icons/circle-alert.svg b/assets/icons/circle-alert.svgnew file mode 100644index 0000000..578d25c--- /dev/null+++ b/assets/icons/circle-alert.svg@@ -0,0 +1,15 @@+<svg+ xmlns="http://www.w3.org/2000/svg"+ width="24"+ height="24"+ viewBox="0 0 24 24"+ fill="none"+ stroke="currentColor"+ stroke-width="2"+ stroke-linecap="round"+ stroke-linejoin="round"+>+ <circle cx="12" cy="12" r="10" />+ <line x1="12" x2="12" y1="8" y2="12" />+ <line x1="12" x2="12.01" y1="16" y2="16" />+</svg>diff --git a/assets/icons/cloud-download.svg b/assets/icons/cloud-download.svgnew file mode 100644index 0000000..2d5ca18--- /dev/null+++ b/assets/icons/cloud-download.svg@@ -0,0 +1,15 @@+<svg+ xmlns="http://www.w3.org/2000/svg"+ width="24"+ height="24"+ viewBox="0 0 24 24"+ fill="none"+ stroke="currentColor"+ stroke-width="2"+ stroke-linecap="round"+ stroke-linejoin="round"+>+ <path d="M12 13v8l-4-4" />+ <path d="m12 21 4-4" />+ <path d="M4.393 15.269A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.436 8.284" />+</svg>diff --git a/assets/icons/cloud.svg b/assets/icons/cloud.svgnew file mode 100644index 0000000..96c52fc--- /dev/null+++ b/assets/icons/cloud.svg@@ -0,0 +1,13 @@+<svg+ xmlns="http://www.w3.org/2000/svg"+ width="24"+ height="24"+ viewBox="0 0 24 24"+ fill="none"+ stroke="currentColor"+ stroke-width="2"+ stroke-linecap="round"+ stroke-linejoin="round"+>+ <path d="M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z" />+</svg>diff --git a/assets/icons/copy.svg b/assets/icons/copy.svgnew file mode 100644index 0000000..f62ce99--- /dev/null+++ b/assets/icons/copy.svg@@ -0,0 +1,14 @@+<svg+ xmlns="http://www.w3.org/2000/svg"+ width="24"+ height="24"+ viewBox="0 0 24 24"+ fill="none"+ stroke="currentColor"+ stroke-width="2"+ stroke-linecap="round"+ stroke-linejoin="round"+>+ <rect width="14" height="14" x="8" y="8" rx="2" ry="2" />+ <path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2" />+</svg>diff --git a/assets/icons/file-diff.svg b/assets/icons/file-diff.svgnew file mode 100644index 0000000..759e6b7--- /dev/null+++ b/assets/icons/file-diff.svg@@ -0,0 +1,16 @@+<svg+ xmlns="http://www.w3.org/2000/svg"+ width="24"+ height="24"+ viewBox="0 0 24 24"+ fill="none"+ stroke="currentColor"+ stroke-width="2"+ stroke-linecap="round"+ stroke-linejoin="round"+>+ <path d="M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z" />+ <path d="M9 10h6" />+ <path d="M12 13V7" />+ <path d="M9 17h6" />+</svg>diff --git a/assets/icons/folder-git-2.svg b/assets/icons/folder-git-2.svgnew file mode 100644index 0000000..590f06e--- /dev/null+++ b/assets/icons/folder-git-2.svg@@ -0,0 +1,16 @@+<svg+ xmlns="http://www.w3.org/2000/svg"+ width="24"+ height="24"+ viewBox="0 0 24 24"+ fill="none"+ stroke="currentColor"+ stroke-width="2"+ stroke-linecap="round"+ stroke-linejoin="round"+>+ <path d="M18 19a5 5 0 0 1-5-5v8" />+ <path d="M9 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v5" />+ <circle cx="13" cy="12" r="2" />+ <circle cx="20" cy="19" r="2" />+</svg>diff --git a/assets/icons/folder-open.svg b/assets/icons/folder-open.svgnew file mode 100644index 0000000..b01f60f--- /dev/null+++ b/assets/icons/folder-open.svg@@ -0,0 +1,13 @@+<svg+ xmlns="http://www.w3.org/2000/svg"+ width="24"+ height="24"+ viewBox="0 0 24 24"+ fill="none"+ stroke="currentColor"+ stroke-width="2"+ stroke-linecap="round"+ stroke-linejoin="round"+>+ <path d="m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2" />+</svg>diff --git a/assets/icons/folder-plus.svg b/assets/icons/folder-plus.svgnew file mode 100644index 0000000..661ebf4--- /dev/null+++ b/assets/icons/folder-plus.svg@@ -0,0 +1,15 @@+<svg+ xmlns="http://www.w3.org/2000/svg"+ width="24"+ height="24"+ viewBox="0 0 24 24"+ fill="none"+ stroke="currentColor"+ stroke-width="2"+ stroke-linecap="round"+ stroke-linejoin="round"+>+ <path d="M12 10v6" />+ <path d="M9 13h6" />+ <path d="M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z" />+</svg>diff --git a/assets/icons/git-branch-plus.svg b/assets/icons/git-branch-plus.svgnew file mode 100644index 0000000..6dc8ddb--- /dev/null+++ b/assets/icons/git-branch-plus.svg@@ -0,0 +1,18 @@+<svg+ xmlns="http://www.w3.org/2000/svg"+ width="24"+ height="24"+ viewBox="0 0 24 24"+ fill="none"+ stroke="currentColor"+ stroke-width="2"+ stroke-linecap="round"+ stroke-linejoin="round"+>+ <path d="M6 3v12" />+ <path d="M18 9a3 3 0 1 0 0-6 3 3 0 0 0 0 6z" />+ <path d="M6 21a3 3 0 1 0 0-6 3 3 0 0 0 0 6z" />+ <path d="M15 6a9 9 0 0 0-9 9" />+ <path d="M18 15v6" />+ <path d="M21 18h-6" />+</svg>diff --git a/assets/icons/git-branch.svg b/assets/icons/git-branch.svgnew file mode 100644index 0000000..06398f4--- /dev/null+++ b/assets/icons/git-branch.svg@@ -0,0 +1,15 @@+<svg+ xmlns="http://www.w3.org/2000/svg"+ width="24"+ height="24"+ viewBox="0 0 24 24"+ fill="none"+ stroke="currentColor"+ stroke-width="2"+ stroke-linecap="round"+ stroke-linejoin="round"+>+ <path d="M15 6a9 9 0 0 0-9 9V3" />+ <circle cx="18" cy="6" r="3" />+ <circle cx="6" cy="18" r="3" />+</svg>diff --git a/assets/icons/git-merge.svg b/assets/icons/git-merge.svgnew file mode 100644index 0000000..02d4dc0--- /dev/null+++ b/assets/icons/git-merge.svg@@ -0,0 +1,15 @@+<svg+ xmlns="http://www.w3.org/2000/svg"+ width="24"+ height="24"+ viewBox="0 0 24 24"+ fill="none"+ stroke="currentColor"+ stroke-width="2"+ stroke-linecap="round"+ stroke-linejoin="round"+>+ <circle cx="18" cy="18" r="3" />+ <circle cx="6" cy="6" r="3" />+ <path d="M6 21V9a9 9 0 0 0 9 9" />+</svg>diff --git a/assets/icons/laptop.svg b/assets/icons/laptop.svgnew file mode 100644index 0000000..613afff--- /dev/null+++ b/assets/icons/laptop.svg@@ -0,0 +1,14 @@+<svg+ xmlns="http://www.w3.org/2000/svg"+ width="24"+ height="24"+ viewBox="0 0 24 24"+ fill="none"+ stroke="currentColor"+ stroke-width="2"+ stroke-linecap="round"+ stroke-linejoin="round"+>+ <path d="M18 5a2 2 0 0 1 2 2v8.526a2 2 0 0 0 .212.897l1.068 2.127a1 1 0 0 1-.9 1.45H3.62a1 1 0 0 1-.9-1.45l1.068-2.127A2 2 0 0 0 4 15.526V7a2 2 0 0 1 2-2z" />+ <path d="M20.054 15.987H3.946" />+</svg>diff --git a/assets/icons/log-in.svg b/assets/icons/log-in.svgnew file mode 100644index 0000000..6183bc2--- /dev/null+++ b/assets/icons/log-in.svg@@ -0,0 +1,15 @@+<svg+ xmlns="http://www.w3.org/2000/svg"+ width="24"+ height="24"+ viewBox="0 0 24 24"+ fill="none"+ stroke="currentColor"+ stroke-width="2"+ stroke-linecap="round"+ stroke-linejoin="round"+>+ <path d="m10 17 5-5-5-5" />+ <path d="M15 12H3" />+ <path d="M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4" />+</svg>diff --git a/assets/icons/minus.svg b/assets/icons/minus.svgnew file mode 100644index 0000000..75093e2--- /dev/null+++ b/assets/icons/minus.svg@@ -0,0 +1,13 @@+<svg+ xmlns="http://www.w3.org/2000/svg"+ width="24"+ height="24"+ viewBox="0 0 24 24"+ fill="none"+ stroke="currentColor"+ stroke-width="2"+ stroke-linecap="round"+ stroke-linejoin="round"+>+ <path d="M5 12h14" />+</svg>diff --git a/assets/icons/palette.svg b/assets/icons/palette.svgnew file mode 100644index 0000000..25fb773--- /dev/null+++ b/assets/icons/palette.svg@@ -0,0 +1,17 @@+<svg+ xmlns="http://www.w3.org/2000/svg"+ width="24"+ height="24"+ viewBox="0 0 24 24"+ fill="none"+ stroke="currentColor"+ stroke-width="2"+ stroke-linecap="round"+ stroke-linejoin="round"+>+ <path d="M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z" />+ <circle cx="13.5" cy="6.5" r=".5" fill="currentColor" />+ <circle cx="17.5" cy="10.5" r=".5" fill="currentColor" />+ <circle cx="6.5" cy="12.5" r=".5" fill="currentColor" />+ <circle cx="8.5" cy="7.5" r=".5" fill="currentColor" />+</svg>diff --git a/assets/icons/plus.svg b/assets/icons/plus.svgnew file mode 100644index 0000000..41f92bb--- /dev/null+++ b/assets/icons/plus.svg@@ -0,0 +1,14 @@+<svg+ xmlns="http://www.w3.org/2000/svg"+ width="24"+ height="24"+ viewBox="0 0 24 24"+ fill="none"+ stroke="currentColor"+ stroke-width="2"+ stroke-linecap="round"+ stroke-linejoin="round"+>+ <path d="M5 12h14" />+ <path d="M12 5v14" />+</svg>diff --git a/assets/icons/refresh-cw.svg b/assets/icons/refresh-cw.svgnew file mode 100644index 0000000..c27b3a9--- /dev/null+++ b/assets/icons/refresh-cw.svg@@ -0,0 +1,16 @@+<svg+ xmlns="http://www.w3.org/2000/svg"+ width="24"+ height="24"+ viewBox="0 0 24 24"+ fill="none"+ stroke="currentColor"+ stroke-width="2"+ stroke-linecap="round"+ stroke-linejoin="round"+>+ <path d="M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8" />+ <path d="M21 3v5h-5" />+ <path d="M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16" />+ <path d="M8 16H3v5" />+</svg>diff --git a/assets/icons/search.svg b/assets/icons/search.svgnew file mode 100644index 0000000..03e442a--- /dev/null+++ b/assets/icons/search.svg@@ -0,0 +1,14 @@+<svg+ xmlns="http://www.w3.org/2000/svg"+ width="24"+ height="24"+ viewBox="0 0 24 24"+ fill="none"+ stroke="currentColor"+ stroke-width="2"+ stroke-linecap="round"+ stroke-linejoin="round"+>+ <path d="m21 21-4.34-4.34" />+ <circle cx="11" cy="11" r="8" />+</svg>diff --git a/assets/icons/tag.svg b/assets/icons/tag.svgnew file mode 100644index 0000000..7a073e9--- /dev/null+++ b/assets/icons/tag.svg@@ -0,0 +1,14 @@+<svg+ xmlns="http://www.w3.org/2000/svg"+ width="24"+ height="24"+ viewBox="0 0 24 24"+ fill="none"+ stroke="currentColor"+ stroke-width="2"+ stroke-linecap="round"+ stroke-linejoin="round"+>+ <path d="M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z" />+ <circle cx="7.5" cy="7.5" r=".5" fill="currentColor" />+</svg>diff --git a/assets/icons/undo-2.svg b/assets/icons/undo-2.svgnew file mode 100644index 0000000..3e93594--- /dev/null+++ b/assets/icons/undo-2.svg@@ -0,0 +1,14 @@+<svg+ xmlns="http://www.w3.org/2000/svg"+ width="24"+ height="24"+ viewBox="0 0 24 24"+ fill="none"+ stroke="currentColor"+ stroke-width="2"+ stroke-linecap="round"+ stroke-linejoin="round"+>+ <path d="M9 14 4 9l5-5" />+ <path d="M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11" />+</svg>diff --git a/assets/icons/x.svg b/assets/icons/x.svgnew file mode 100644index 0000000..e317943--- /dev/null+++ b/assets/icons/x.svg@@ -0,0 +1,14 @@+<svg+ xmlns="http://www.w3.org/2000/svg"+ width="24"+ height="24"+ viewBox="0 0 24 24"+ fill="none"+ stroke="currentColor"+ stroke-width="2"+ stroke-linecap="round"+ stroke-linejoin="round"+>+ <path d="M18 6 6 18" />+ <path d="m6 6 12 12" />+</svg>diff --git a/examples/ui_shot.rs b/examples/ui_shot.rsnew file mode 100644index 0000000..712dff2--- /dev/null+++ b/examples/ui_shot.rs@@ -0,0 +1,99 @@+//! Headless screenshots of gitcraft driven by a small script, for checking the UI without a+//! window (and without touching the real mouse).+//!+//! `cargo run --example ui_shot -- <repo> <out-prefix> [step]...`+//!+//! Steps (coordinates in points, window is 1400×860):+//! `click:x,y`, `rclick:x,y`, `hover:x,y`, `key:Escape`, `type:text`, `wait:ms`, `shot`.+//! Each `shot` writes `<out-prefix>-<n>.png`.++use std::time::{Duration, Instant};++use egui::{Event, Key, Modifiers, PointerButton, Pos2};+use egui_kittest::Harness;++fn main() {+ let mut args = std::env::args().skip(1);+ let (Some(repo), Some(out)) = (args.next(), args.next()) else {+ eprintln!(+ "usage: ui_shot <repo> <out-prefix> [click:x,y|rclick:x,y|hover:x,y|key:K|type:text|wait:ms|shot]..."+ );+ std::process::exit(2);+ };+ let steps: Vec<String> = args.collect();++ let mut harness = Harness::builder()+ .with_size([1400.0, 860.0])+ .build_eframe(|cc| gitcraft::app::App::new(cc, Some(repo.into())));+ settle(&mut harness, 1500);++ let mut shots = 0;+ for step in steps {+ let (cmd, arg) = step.split_once(':').unwrap_or((step.as_str(), ""));+ match cmd {+ "click" | "rclick" => {+ let pos = point(arg);+ let button = if cmd == "click" {+ PointerButton::Primary+ } else {+ PointerButton::Secondary+ };+ harness.event(Event::PointerMoved(pos));+ harness.step();+ for pressed in [true, false] {+ harness.event(Event::PointerButton {+ pos,+ button,+ pressed,+ modifiers: Modifiers::NONE,+ });+ }+ settle(&mut harness, 400);+ }+ "hover" => {+ harness.event(Event::PointerMoved(point(arg)));+ settle(&mut harness, 200);+ }+ "key" => {+ if let Some(key) = Key::from_name(arg) {+ harness.key_press(key);+ }+ settle(&mut harness, 200);+ }+ "type" => {+ harness.event(Event::Text(arg.to_owned()));+ settle(&mut harness, 200);+ }+ "wait" => settle(&mut harness, arg.parse().unwrap_or(500)),+ "shot" => {+ shots += 1;+ let path = format!("{out}-{shots}.png");+ match harness.render() {+ Ok(image) => match image.save(&path) {+ Ok(()) => println!("wrote {path}"),+ Err(e) => eprintln!("{path}: {e}"),+ },+ Err(e) => eprintln!("render failed: {e}"),+ }+ }+ other => eprintln!("unknown step {other}"),+ }+ }+}++/// Steps frames for `ms` of real time, so background git work can land.+fn settle(harness: &mut Harness<'_, gitcraft::app::App>, ms: u64) {+ let end = Instant::now() + Duration::from_millis(ms);+ while Instant::now() < end {+ harness.step();+ std::thread::sleep(Duration::from_millis(30));+ }+ harness.step();+}++fn point(arg: &str) -> Pos2 {+ let mut it = arg+ .split(',')+ .map(|n| n.trim().parse::<f32>().unwrap_or(0.0));+ Pos2::new(it.next().unwrap_or(0.0), it.next().unwrap_or(0.0))+}diff --git a/src/app.rs b/src/app.rsnew file mode 100644index 0000000..b770da4--- /dev/null+++ b/src/app.rs@@ -0,0 +1,818 @@+//! Window shell: git check, browser-like tabs, the start page and cloning.++use std::path::{Path, PathBuf};+use std::sync::mpsc::{Receiver, channel};++use egui::{Align2, CornerRadius, Key, Rect, RichText, Sense, Stroke, Ui, pos2, vec2};+use serde::{Deserialize, Serialize};++use crate::git;+use crate::icons;+use crate::repo::RepoTab;+use crate::theme::{self, ThemeKind, Tokens};++const MAX_RECENT: usize = 12;+const TAB_H: f32 = 34.0;++/// What survives a restart.+#[derive(Default, Serialize, Deserialize)]+#[serde(default)]+struct Saved {+ open: Vec<PathBuf>,+ active: usize,+ recent: Vec<PathBuf>,+ theme: ThemeKind,+ clone_parent: Option<PathBuf>,+}++enum Tab {+ /// The start page ("new tab"): open, create or clone a repository.+ Home,+ Repo(Box<RepoTab>),+}++struct CloneForm {+ url: String,+ parent: String,+ name: String,+ /// The user typed a name; stop deriving it from the URL.+ name_edited: bool,+ error: Option<String>,+ focus: bool,+}++pub struct App {+ git_version: Result<String, String>,+ tabs: Vec<Tab>,+ active: usize,+ recent: Vec<PathBuf>,+ theme: ThemeKind,+ clone_parent: Option<PathBuf>,+ error: Option<String>,+ was_focused: bool,+ clone_form: Option<CloneForm>,+ /// A clone running in the background: (destination, result).+ cloning: Option<(PathBuf, Receiver<Result<(), String>>)>,+}++impl App {+ /// `open_arg`: a repository passed on the command line, opened (or focused) on start.+ pub fn new(cc: &eframe::CreationContext<'_>, open_arg: Option<PathBuf>) -> Self {+ let saved: Saved = cc+ .storage+ .and_then(|s| eframe::get_value(s, eframe::APP_KEY))+ .unwrap_or_default();+ let ctx = &cc.egui_ctx;+ egui_extras::install_image_loaders(ctx);+ theme::install_fonts(ctx);+ theme::apply(ctx, saved.theme);++ let mut app = Self {+ git_version: git::version(),+ tabs: Vec::new(),+ active: 0,+ recent: saved.recent,+ theme: saved.theme,+ clone_parent: saved.clone_parent,+ error: None,+ was_focused: true,+ clone_form: None,+ cloning: None,+ };+ if app.git_version.is_ok() {+ for path in saved.open {+ if path.is_dir() {+ app.tabs.push(Tab::Repo(Box::new(RepoTab::new(path, ctx))));+ }+ }+ }+ if app.tabs.is_empty() {+ app.tabs.push(Tab::Home);+ }+ app.active = saved.active.min(app.tabs.len() - 1);+ if let Some(path) = open_arg+ && app.git_version.is_ok()+ {+ app.open_repo(&path, ctx);+ }+ app+ }++ /// Opens `path` in the active tab if it's a start page, otherwise in a new tab.+ fn open_repo(&mut self, path: &Path, ctx: &egui::Context) {+ let root = match git::toplevel(path) {+ Ok(root) => root,+ Err(e) => {+ self.error = Some(e);+ return;+ }+ };+ let root = std::fs::canonicalize(&root).unwrap_or(root);+ let root = strip_verbatim(root);+ self.remember(&root);+ self.error = None;++ if let Some(i) = self+ .tabs+ .iter()+ .position(|t| matches!(t, Tab::Repo(r) if r.path == root))+ {+ self.active = i;+ return;+ }+ let tab = Tab::Repo(Box::new(RepoTab::new(root, ctx)));+ if matches!(self.tabs.get(self.active), Some(Tab::Home)) {+ self.tabs[self.active] = tab;+ } else {+ self.tabs.push(tab);+ self.active = self.tabs.len() - 1;+ }+ }++ fn remember(&mut self, path: &Path) {+ self.recent.retain(|p| p != path);+ self.recent.insert(0, path.to_owned());+ self.recent.truncate(MAX_RECENT);+ }++ fn pick_existing(&mut self, ctx: &egui::Context) {+ if let Some(dir) = rfd::FileDialog::new()+ .set_title("Open a git repository")+ .pick_folder()+ {+ self.open_repo(&dir, ctx);+ }+ }++ fn pick_new(&mut self, ctx: &egui::Context) {+ let Some(dir) = rfd::FileDialog::new()+ .set_title("Choose a folder for the new repository")+ .pick_folder()+ else {+ return;+ };+ // Already the root of a repository: just open it rather than re-initialising.+ if let Ok(root) = git::toplevel(&dir)+ && same_path(&root, &dir)+ {+ self.open_repo(&dir, ctx);+ return;+ }+ match git::init(&dir) {+ Ok(()) => self.open_repo(&dir, ctx),+ Err(e) => self.error = Some(format!("git init failed: {e}")),+ }+ }++ fn start_clone(&mut self) {+ let parent = self+ .clone_parent+ .clone()+ .or_else(|| {+ self.recent+ .first()+ .and_then(|p| p.parent())+ .map(Path::to_path_buf)+ })+ .or_else(home_dir)+ .map(|p| p.display().to_string())+ .unwrap_or_default();+ self.clone_form = Some(CloneForm {+ url: String::new(),+ parent,+ name: String::new(),+ name_edited: false,+ error: None,+ focus: true,+ });+ }++ fn close_tab(&mut self, i: usize) {+ if i >= self.tabs.len() {+ return;+ }+ self.tabs.remove(i);+ if self.tabs.is_empty() {+ self.tabs.push(Tab::Home);+ }+ if self.active > i || self.active >= self.tabs.len() {+ self.active = self.active.saturating_sub(1);+ }+ }++ fn new_tab(&mut self) {+ self.tabs.push(Tab::Home);+ self.active = self.tabs.len() - 1;+ }++ fn set_theme(&mut self, ctx: &egui::Context, kind: ThemeKind) {+ self.theme = kind;+ theme::apply(ctx, kind);+ }++ /// PhotoCraft-style document tabs on a dark strip, `+` after them, the theme menu at the end.+ fn tab_strip(&mut self, ui: &mut Ui) {+ let t = Tokens::get(ui.ctx());+ let mut select = None;+ let mut close = None;+ let mut add = false;+ ui.horizontal(|ui| {+ ui.spacing_mut().item_spacing.x = 1.0;+ for (i, tab) in self.tabs.iter().enumerate() {+ let active = i == self.active;+ let (title, tooltip, busy) = match tab {+ Tab::Home => (+ "New tab".to_owned(),+ "Open, create or clone a repository".to_owned(),+ false,+ ),+ Tab::Repo(r) => (r.name.clone(), r.path.display().to_string(), r.is_busy()),+ };+ let font = if active {+ theme::medium(12.5)+ } else {+ egui::FontId::proportional(12.5)+ };+ let color = if active { t.text } else { t.text_dim };+ let galley = ui.painter().layout_no_wrap(title, font, color);+ let w = (galley.size().x + 66.0).clamp(110.0, 260.0);+ let (rect, resp) = ui.allocate_exact_size(vec2(w, TAB_H), Sense::click());+ let hovered = resp.hovered();+ let p = ui.painter();+ let shape = CornerRadius {+ nw: t.radius as u8,+ ne: t.radius as u8,+ sw: 0,+ se: 0,+ };+ if active {+ p.rect_filled(rect, shape, t.chrome);+ p.line_segment(+ [+ rect.left_top() + vec2(2.0, 0.5),+ rect.right_top() + vec2(-2.0, 0.5),+ ],+ Stroke::new(2.0, t.accent),+ );+ } else if hovered {+ p.rect_filled(rect, shape, t.hover.gamma_multiply(0.6));+ }+ let y = rect.center().y;+ let icon = if matches!(tab, Tab::Home) {+ "plus"+ } else {+ "folder-git-2"+ };+ icons::paint(+ ui,+ Rect::from_center_size(pos2(rect.left() + 18.0, y), vec2(16.0, 16.0)),+ icon,+ 14.0,+ if active { t.accent } else { t.text_faint },+ );+ let text_clip = Rect::from_min_max(+ pos2(rect.left() + 32.0, rect.top()),+ pos2(rect.right() - 28.0, rect.bottom()),+ );+ ui.painter().with_clip_rect(text_clip).galley(+ pos2(text_clip.left(), y - galley.size().y / 2.0),+ galley,+ color,+ );++ let close_rect =+ Rect::from_center_size(pos2(rect.right() - 15.0, y), vec2(18.0, 18.0));+ if busy {+ egui::Spinner::new().size(11.0).paint_at(ui, close_rect);+ } else if active || hovered {+ let c = ui.interact(close_rect, resp.id.with("close"), Sense::click());+ if c.hovered() {+ ui.painter().rect_filled(close_rect, t.radius_sm, t.pressed);+ }+ icons::paint(+ ui,+ close_rect,+ "x",+ 12.0,+ if c.hovered() { t.text } else { t.text_faint },+ );+ if c.clicked() {+ close = Some(i);+ }+ c.on_hover_text("Close tab (Ctrl+W)");+ }+ let resp = resp.on_hover_text(tooltip);+ if resp.clicked() && close.is_none() {+ select = Some(i);+ }+ if resp.middle_clicked() {+ close = Some(i);+ }+ }+ ui.add_space(4.0);+ if icons::small_button(ui, "plus", "New tab (Ctrl+T)").clicked() {+ add = true;+ }++ ui.with_layout(egui::Layout::right_to_left(egui::Align::Center), |ui| {+ ui.add_space(6.0);+ let resp = icons::small_button(ui, "palette", "Theme");+ egui::Popup::menu(&resp).show(|ui| {+ ui.label(+ RichText::new("THEME")+ .font(theme::semibold(10.5))+ .color(t.text_faint),+ );+ for kind in ThemeKind::ALL {+ if ui.radio(self.theme == kind, kind.label()).clicked() {+ self.set_theme(ui.ctx(), kind);+ }+ }+ });+ });+ });+ if let Some(i) = select {+ self.active = i;+ }+ if let Some(i) = close {+ self.close_tab(i);+ }+ if add {+ self.new_tab();+ }+ }++ fn home(&mut self, ui: &mut Ui) {+ let ctx = ui.ctx().clone();+ let t = Tokens::get(&ctx);+ let mut open = None;+ let mut forget = None;+ let mut action = None;++ egui::ScrollArea::vertical()+ .auto_shrink(false)+ .show(ui, |ui| {+ ui.vertical_centered(|ui| {+ ui.set_max_width(640.0);+ ui.add_space((ui.available_height() * 0.10).max(32.0));+ ui.horizontal(|ui| {+ icons::inline(ui, "git-merge", 34.0, t.accent);+ ui.label(RichText::new("gitcraft").font(theme::semibold(30.0)));+ });+ ui.add_space(4.0);+ if let Ok(v) = &self.git_version {+ ui.horizontal(|ui| {+ icons::inline(ui, "check", 14.0, t.success);+ ui.label(RichText::new(v).color(t.text_dim));+ });+ }+ ui.add_space(26.0);++ ui.horizontal(|ui| {+ ui.spacing_mut().item_spacing.x = 12.0;+ let w = (ui.available_width() - 24.0) / 3.0;+ for (i, (icon, title, sub)) in [+ ("folder-open", "Open", "An existing local repository"),+ ("folder-plus", "Create", "A new repository (git init)"),+ ("log-in", "Clone", "Copy a remote repository"),+ ]+ .into_iter()+ .enumerate()+ {+ if action_card(ui, w, icon, title, sub).clicked() {+ action = Some(i);+ }+ }+ });++ if let Some(err) = &self.error {+ ui.add_space(12.0);+ ui.colored_label(t.danger, err);+ }+ if let Some((dest, _)) = &self.cloning {+ ui.add_space(12.0);+ ui.horizontal(|ui| {+ ui.spinner();+ ui.label(format!("Cloning into {}…", dest.display()));+ });+ }++ if !self.recent.is_empty() {+ ui.add_space(30.0);+ ui.with_layout(egui::Layout::top_down(egui::Align::Min), |ui| {+ ui.label(+ RichText::new("RECENT")+ .font(theme::semibold(10.5))+ .color(t.text_faint),+ );+ ui.add_space(4.0);+ ui.spacing_mut().item_spacing.y = 2.0;+ for (i, path) in self.recent.iter().enumerate() {+ match recent_row(ui, path) {+ Some(RecentClick::Open) => open = Some(path.clone()),+ Some(RecentClick::Forget) => forget = Some(i),+ None => {}+ }+ }+ });+ }+ });+ });++ match action {+ Some(0) => self.pick_existing(&ctx),+ Some(1) => self.pick_new(&ctx),+ Some(_) => self.start_clone(),+ None => {}+ }+ if let Some(path) = open {+ self.open_repo(&path, &ctx);+ }+ if let Some(i) = forget {+ self.recent.remove(i);+ }+ }++ fn clone_dialog(&mut self, ctx: &egui::Context) {+ let Some(form) = &mut self.clone_form else {+ return;+ };+ let t = Tokens::get(ctx);+ let frame = egui::Frame::new()+ .fill(t.card)+ .stroke(Stroke::new(1.0, t.field_border))+ .corner_radius(t.radius_lg)+ .inner_margin(egui::Margin::same(18))+ .shadow(ctx.global_style().visuals.window_shadow);+ let mut submit = false;+ let mut cancel = false;+ let resp = egui::Modal::new(egui::Id::new("clone-dialog"))+ .frame(frame)+ .backdrop_color(egui::Color32::from_black_alpha(110))+ .show(ctx, |ui| {+ ui.set_width(460.0);+ ui.label(RichText::new("Clone repository").font(theme::semibold(15.0)));+ ui.add_space(10.0);+ ui.label(RichText::new("URL").color(t.text_dim).small());+ let url = ui.add(+ egui::TextEdit::singleline(&mut form.url)+ .hint_text("https://github.com/user/repo.git")+ .desired_width(f32::INFINITY)+ .margin(egui::Margin::symmetric(8, 6)),+ );+ if form.focus {+ url.request_focus();+ form.focus = false;+ }+ if url.changed() && !form.name_edited {+ form.name = git::clone_dir_name(&form.url);+ }+ ui.add_space(6.0);+ ui.label(RichText::new("Into folder").color(t.text_dim).small());+ ui.horizontal(|ui| {+ ui.add(+ egui::TextEdit::singleline(&mut form.parent)+ .desired_width(ui.available_width() - 90.0)+ .margin(egui::Margin::symmetric(8, 6)),+ );+ if ui+ .add(egui::Button::new("Browse…").min_size(vec2(80.0, 28.0)))+ .clicked()+ && let Some(dir) =+ rfd::FileDialog::new().set_title("Clone into").pick_folder()+ {+ form.parent = dir.display().to_string();+ }+ });+ ui.add_space(6.0);+ ui.label(RichText::new("Name").color(t.text_dim).small());+ if ui+ .add(+ egui::TextEdit::singleline(&mut form.name)+ .desired_width(f32::INFINITY)+ .margin(egui::Margin::symmetric(8, 6)),+ )+ .changed()+ {+ form.name_edited = true;+ }+ let dest = PathBuf::from(form.parent.trim()).join(form.name.trim());+ ui.label(+ RichText::new(dest.display().to_string())+ .color(t.text_faint)+ .small(),+ );+ if let Some(err) = &form.error {+ ui.colored_label(t.danger, err);+ }+ ui.add_space(12.0);+ let valid = !form.url.trim().is_empty()+ && !form.parent.trim().is_empty()+ && !form.name.trim().is_empty();+ ui.horizontal(|ui| {+ let enter = ui.input(|i| i.key_pressed(Key::Enter));+ if crate::repo::primary_button(ui, "Clone", valid, 90.0).clicked()+ || (enter && valid)+ {+ submit = true;+ }+ if ui+ .add(egui::Button::new("Cancel").min_size(vec2(80.0, 30.0)))+ .clicked()+ {+ cancel = true;+ }+ });+ });+ if resp.should_close() {+ cancel = true;+ }++ if submit {+ let dest = PathBuf::from(form.parent.trim()).join(form.name.trim());+ let occupied = dest.exists()+ && std::fs::read_dir(&dest)+ .map(|mut d| d.next().is_some())+ .unwrap_or(true);+ if occupied {+ form.error = Some(format!("{} already exists and isn't empty", dest.display()));+ return;+ }+ let url = form.url.trim().to_owned();+ self.clone_parent = Some(PathBuf::from(form.parent.trim()));+ let (tx, rx) = channel();+ let ctx2 = ctx.clone();+ let dest2 = dest.clone();+ std::thread::spawn(move || {+ let _ = tx.send(git::clone(&url, &dest2));+ ctx2.request_repaint();+ });+ self.cloning = Some((dest, rx));+ self.clone_form = None;+ self.error = None;+ } else if cancel {+ self.clone_form = None;+ }+ }++ fn poll_clone(&mut self, ctx: &egui::Context) {+ let Some((dest, rx)) = &self.cloning else {+ return;+ };+ let Ok(result) = rx.try_recv() else { return };+ let dest = dest.clone();+ self.cloning = None;+ match result {+ Ok(()) => {+ // Show it in a start page tab if one is active, otherwise in a new tab.+ self.open_repo(&dest, ctx);+ }+ Err(e) => self.error = Some(format!("Clone failed: {e}")),+ }+ }++ fn git_missing(&mut self, ui: &mut Ui, err: &str) {+ let t = Tokens::get(ui.ctx());+ ui.vertical_centered(|ui| {+ ui.add_space(ui.available_height() * 0.25);+ icons::inline(ui, "circle-alert", 40.0, t.warning);+ ui.add_space(8.0);+ ui.label(RichText::new("Git was not found").font(theme::semibold(24.0)));+ ui.add_space(8.0);+ ui.label("gitcraft uses the git command line. Install git and make sure `git` is on your PATH.");+ ui.add_space(4.0);+ ui.label(RichText::new(err).color(t.text_faint).small());+ ui.add_space(16.0);+ if crate::repo::primary_button(ui, "Check again", true, 140.0).clicked() {+ self.git_version = git::version();+ }+ ui.add_space(8.0);+ ui.hyperlink_to("Download git", "https://git-scm.com/downloads");+ });+ }+}++impl eframe::App for App {+ fn ui(&mut self, ui: &mut Ui, _frame: &mut eframe::Frame) {+ let ctx = ui.ctx().clone();+ let t = Tokens::get(&ctx);++ if let Err(err) = self.git_version.clone() {+ egui::CentralPanel::default()+ .frame(egui::Frame::new().fill(t.dock))+ .show(ui, |ui| self.git_missing(ui, &err));+ return;+ }+ self.poll_clone(&ctx);++ // Shortcuts.+ let modal_open = self.clone_form.is_some();+ let (new_tab, close, refresh, focused) = ctx.input(|i| {+ (+ i.modifiers.command && i.key_pressed(Key::T),+ i.modifiers.command && i.key_pressed(Key::W),+ i.key_pressed(Key::F5),+ i.focused,+ )+ });+ if new_tab && !modal_open {+ self.new_tab();+ }+ if close && !modal_open {+ self.close_tab(self.active);+ }+ // Coming back to the window (e.g. after using git elsewhere) refreshes the open repo.+ let regained = focused && !self.was_focused;+ self.was_focused = focused;+ if let Some(Tab::Repo(r)) = self.tabs.get_mut(self.active)+ && (refresh || regained)+ {+ r.reload(&ctx);+ }++ // Background repos still need their results drained.+ for (i, tab) in self.tabs.iter_mut().enumerate() {+ if let Tab::Repo(r) = tab+ && i != self.active+ {+ r.poll(&ctx);+ }+ }++ egui::Panel::top("tabs")+ .frame(+ egui::Frame::new()+ .fill(t.tab_strip)+ .inner_margin(egui::Margin {+ left: 6,+ right: 6,+ top: 6,+ bottom: 0,+ }),+ )+ .show(ui, |ui| self.tab_strip(ui));++ let active = self.active;+ match self.tabs.get_mut(active) {+ Some(Tab::Repo(repo)) => repo.ui(ui),+ _ => {+ egui::CentralPanel::default()+ .frame(egui::Frame::new().fill(t.dock))+ .show(ui, |ui| self.home(ui));+ }+ }+ self.clone_dialog(&ctx);+ }++ fn save(&mut self, storage: &mut dyn eframe::Storage) {+ let open: Vec<PathBuf> = self+ .tabs+ .iter()+ .filter_map(|t| match t {+ Tab::Repo(r) => Some(r.path.clone()),+ Tab::Home => None,+ })+ .collect();+ // Index of the active tab among the saved (repo) tabs.+ let active = self+ .tabs+ .iter()+ .take(self.active + 1)+ .filter(|t| matches!(t, Tab::Repo(_)))+ .count()+ .saturating_sub(1);+ let saved = Saved {+ open,+ active,+ recent: self.recent.clone(),+ theme: self.theme,+ clone_parent: self.clone_parent.clone(),+ };+ eframe::set_value(storage, eframe::APP_KEY, &saved);+ }+}++/// A large clickable card on the start page.+fn action_card(ui: &mut Ui, width: f32, icon: &str, title: &str, subtitle: &str) -> egui::Response {+ let t = Tokens::get(ui.ctx());+ let (rect, resp) = ui.allocate_exact_size(vec2(width, 116.0), Sense::click());+ let fill = if resp.hovered() { t.hover } else { t.card };+ let stroke = if resp.hovered() {+ t.accent+ } else {+ t.field_border+ };+ let p = ui.painter();+ p.rect(+ rect,+ t.radius_lg,+ fill,+ Stroke::new(1.0, stroke),+ egui::StrokeKind::Inside,+ );+ icons::paint(+ ui,+ Rect::from_center_size(pos2(rect.center().x, rect.top() + 34.0), vec2(28.0, 28.0)),+ icon,+ 26.0,+ t.accent,+ );+ p.text(+ pos2(rect.center().x, rect.top() + 68.0),+ Align2::CENTER_CENTER,+ title,+ theme::semibold(14.0),+ t.text,+ );+ p.text(+ pos2(rect.center().x, rect.top() + 90.0),+ Align2::CENTER_CENTER,+ subtitle,+ egui::FontId::proportional(11.5),+ t.text_dim,+ );+ resp.on_hover_cursor(egui::CursorIcon::PointingHand)+}++enum RecentClick {+ Open,+ Forget,+}++fn recent_row(ui: &mut Ui, path: &Path) -> Option<RecentClick> {+ let t = Tokens::get(ui.ctx());+ let (rect, resp) = ui.allocate_exact_size(vec2(ui.available_width(), 40.0), Sense::click());+ let hovered = resp.hovered();+ if hovered {+ ui.painter().rect_filled(rect, t.radius, t.hover);+ }+ let y = rect.center().y;+ icons::paint(+ ui,+ Rect::from_center_size(pos2(rect.left() + 20.0, y), vec2(18.0, 18.0)),+ "folder-git-2",+ 16.0,+ t.icon,+ );+ let name = path+ .file_name()+ .map(|n| n.to_string_lossy().into_owned())+ .unwrap_or_default();+ // Leave room for the remove button; long paths are cut at the row's edge.+ let p = ui.painter_at(rect.with_max_x(rect.right() - 36.0));+ p.text(+ pos2(rect.left() + 40.0, y - 8.0),+ Align2::LEFT_CENTER,+ name,+ theme::medium(12.5),+ t.text,+ );+ p.text(+ pos2(rect.left() + 40.0, y + 8.0),+ Align2::LEFT_CENTER,+ path.display().to_string(),+ egui::FontId::proportional(11.0),+ t.text_faint,+ );+ let mut forget = false;+ if hovered || ui.rect_contains_pointer(rect) {+ let x_rect = Rect::from_center_size(pos2(rect.right() - 18.0, y), vec2(20.0, 20.0));+ let x = ui+ .interact(x_rect, resp.id.with("forget"), Sense::click())+ .on_hover_text("Remove from list");+ if x.hovered() {+ ui.painter().rect_filled(x_rect, t.radius_sm, t.pressed);+ }+ icons::paint(ui, x_rect, "x", 12.0, t.text_faint);+ forget = x.clicked();+ }+ if forget {+ Some(RecentClick::Forget)+ } else if resp.clicked() {+ Some(RecentClick::Open)+ } else {+ None+ }+}++fn home_dir() -> Option<PathBuf> {+ std::env::var_os("USERPROFILE")+ .or_else(|| std::env::var_os("HOME"))+ .map(PathBuf::from)+}++fn same_path(a: &Path, b: &Path) -> bool {+ match (std::fs::canonicalize(a), std::fs::canonicalize(b)) {+ (Ok(a), Ok(b)) => a == b,+ _ => a == b,+ }+}++/// `canonicalize` on Windows returns `\\?\C:\…`; show and store the familiar form.+fn strip_verbatim(path: PathBuf) -> PathBuf {+ let s = path.to_string_lossy();+ match s.strip_prefix(r"\\?\") {+ Some(rest) if !rest.starts_with("UNC") => PathBuf::from(rest),+ _ => path,+ }+}diff --git a/src/git.rs b/src/git.rsnew file mode 100644index 0000000..cbfc5ff--- /dev/null+++ b/src/git.rs@@ -0,0 +1,587 @@+//! Thin wrapper over the `git` command line. Every call shells out to the installed git, so+//! gitcraft behaves exactly like the user's own git (config, credentials, hooks).++use std::path::{Path, PathBuf};+use std::process::Command;++/// Field and record separators for `--format` strings (unit/record separator control chars).+const FS: char = '\x1f';+const RS: char = '\x1e';++/// How many commits the graph loads per repository.+pub const LOG_LIMIT: usize = 5000;++fn git_cmd() -> Command {+ let mut cmd = Command::new("git");+ // Never block on an interactive prompt: credential helpers with a GUI still work.+ cmd.env("GIT_TERMINAL_PROMPT", "0");+ cmd.env("GIT_OPTIONAL_LOCKS", "0");+ #[cfg(windows)]+ {+ use std::os::windows::process::CommandExt;+ const CREATE_NO_WINDOW: u32 = 0x0800_0000;+ cmd.creation_flags(CREATE_NO_WINDOW);+ }+ cmd+}++/// Runs git in `dir` and returns stdout, or the error output.+pub fn run(dir: Option<&Path>, args: &[&str]) -> Result<String, String> {+ run_ok_codes(dir, args, &[0])+}++/// Like [`run`], but exit codes in `ok` count as success (`diff --no-index` exits 1 on changes).+pub fn run_ok_codes(dir: Option<&Path>, args: &[&str], ok: &[i32]) -> Result<String, String> {+ let mut cmd = git_cmd();+ if let Some(dir) = dir {+ cmd.arg("-C").arg(dir);+ }+ cmd.args(args);+ let out = cmd+ .output()+ .map_err(|e| format!("could not run git: {e}"))?;+ if out.status.code().is_some_and(|c| ok.contains(&c)) {+ Ok(String::from_utf8_lossy(&out.stdout).into_owned())+ } else {+ // Merges and pulls report conflicts on stdout and the summary on stderr.+ let stderr = String::from_utf8_lossy(&out.stderr).trim().to_owned();+ let stdout = String::from_utf8_lossy(&out.stdout).trim().to_owned();+ let err = match (stderr.is_empty(), stdout.is_empty()) {+ (true, true) => format!("git {} failed ({})", args.join(" "), out.status),+ (false, true) => stderr,+ (true, false) => stdout,+ (false, false) => format!("{stderr}\n{stdout}"),+ };+ Err(err)+ }+}++/// `git clone url dest`, run from `dest`'s parent.+pub fn clone(url: &str, dest: &Path) -> Result<(), String> {+ let dest = dest.to_string_lossy();+ run(None, &["clone", "--", url, &dest]).map(|_| ())+}++/// The folder name `git clone` would pick for `url`.+pub fn clone_dir_name(url: &str) -> String {+ let trimmed = url.trim().trim_end_matches(['/', '\\']);+ let last = trimmed.rsplit(['/', '\\', ':']).next().unwrap_or_default();+ last.strip_suffix(".git").unwrap_or(last).to_owned()+}++/// `git --version`, or an error if git isn't installed / not on PATH.+pub fn version() -> Result<String, String> {+ run(None, &["--version"]).map(|s| s.trim().to_owned())+}++/// The top-level folder of the repository containing `path`.+pub fn toplevel(path: &Path) -> Result<PathBuf, String> {+ let out = run(Some(path), &["rev-parse", "--show-toplevel"])+ .map_err(|_| format!("{} is not inside a git repository", path.display()))?;+ Ok(PathBuf::from(out.trim()))+}++pub fn init(path: &Path) -> Result<(), String> {+ std::fs::create_dir_all(path).map_err(|e| format!("could not create folder: {e}"))?;+ run(Some(path), &["init"]).map(|_| ())+}++#[derive(Clone, Debug)]+pub struct Branch {+ /// Short name, e.g. `main` or `origin/main`.+ pub name: String,+ pub target: String,+ pub is_head: bool,+ pub upstream: String,+ /// e.g. `[ahead 1, behind 2]`.+ pub track: String,+}++impl Branch {+ /// Commits ahead of / behind the upstream, from `[ahead 1, behind 2]`.+ pub fn ahead_behind(&self) -> (u32, u32) {+ let inner = self.track.trim_start_matches('[').trim_end_matches(']');+ let mut result = (0, 0);+ for part in inner.split(", ") {+ if let Some(n) = part.strip_prefix("ahead ") {+ result.0 = n.parse().unwrap_or(0);+ } else if let Some(n) = part.strip_prefix("behind ") {+ result.1 = n.parse().unwrap_or(0);+ }+ }+ result+ }++ /// The upstream branch was deleted on the remote.+ pub fn upstream_gone(&self) -> bool {+ self.track == "[gone]"+ }+}++#[derive(Clone, Debug, Default)]+pub struct Refs {+ pub local: Vec<Branch>,+ /// Remote name → branches of that remote.+ pub remotes: Vec<(String, Vec<Branch>)>,+ pub tags: Vec<Branch>,+ pub head: String,+ /// Current branch name, or `None` when HEAD is detached / unborn.+ pub current: Option<String>,+}++pub fn refs(repo: &Path) -> Result<Refs, String> {+ let format = format!(+ "%(refname){FS}%(refname:short){FS}%(objectname){FS}%(HEAD){FS}%(upstream:short){FS}%(upstream:track){FS}%(*objectname)"+ );+ let out = run(+ Some(repo),+ &[+ "for-each-ref",+ &format!("--format={format}"),+ "refs/heads",+ "refs/remotes",+ "refs/tags",+ ],+ )?;+ let mut refs = Refs::default();+ for line in out.lines() {+ let f: Vec<&str> = line.split(FS).collect();+ let [full, short, oid, head, upstream, track, peeled] = f[..] else {+ continue;+ };+ // Annotated tags point at a tag object; the commit is the peeled id.+ let target = if peeled.is_empty() { oid } else { peeled };+ let branch = Branch {+ name: short.to_owned(),+ target: target.to_owned(),+ is_head: head == "*",+ upstream: upstream.to_owned(),+ track: track.to_owned(),+ };+ if full.starts_with("refs/heads/") {+ if branch.is_head {+ refs.current = Some(branch.name.clone());+ }+ refs.local.push(branch);+ } else if let Some(rest) = full.strip_prefix("refs/remotes/") {+ if rest.ends_with("/HEAD") {+ continue;+ }+ let remote = rest.split('/').next().unwrap_or_default().to_owned();+ match refs.remotes.iter_mut().find(|(r, _)| *r == remote) {+ Some((_, list)) => list.push(branch),+ None => refs.remotes.push((remote, vec![branch])),+ }+ } else if full.starts_with("refs/tags/") {+ refs.tags.push(branch);+ }+ }+ refs.head = run(Some(repo), &["rev-parse", "--verify", "-q", "HEAD"])+ .map(|s| s.trim().to_owned())+ .unwrap_or_default();+ Ok(refs)+}++#[derive(Clone, Debug)]+pub struct Commit {+ pub hash: String,+ pub parents: Vec<String>,+ pub author: String,+ pub date: String,+ pub summary: String,+ /// Decorations (`HEAD -> main`, `origin/main`, `tag: v1`), as git prints them.+ pub refs: Vec<String>,+}++/// The commits of every branch, newest first, in an order fit for drawing the graph.+pub fn log(repo: &Path) -> Result<Vec<Commit>, String> {+ let format = format!("--format=%H{FS}%P{FS}%an{FS}%ad{FS}%s{FS}%D{RS}");+ let limit = format!("--max-count={LOG_LIMIT}");+ let out = match run(+ Some(repo),+ &[+ "log",+ "--all",+ "--date-order",+ "--date=format-local:%Y-%m-%d %H:%M",+ &limit,+ &format,+ ],+ ) {+ Ok(out) => out,+ // A freshly initialised repository has no commits yet.+ Err(e) if e.contains("does not have any commits") => String::new(),+ Err(e) => return Err(e),+ };+ let mut commits = Vec::new();+ for record in out.split(RS) {+ let record = record.trim_start_matches('\n');+ if record.is_empty() {+ continue;+ }+ let f: Vec<&str> = record.split(FS).collect();+ let [hash, parents, author, date, summary, decor] = f[..] else {+ continue;+ };+ commits.push(Commit {+ hash: hash.to_owned(),+ parents: parents.split_whitespace().map(str::to_owned).collect(),+ author: author.to_owned(),+ date: date.to_owned(),+ summary: summary.to_owned(),+ refs: decor+ .split(", ")+ .filter(|s| !s.is_empty())+ .map(str::to_owned)+ .collect(),+ });+ }+ Ok(commits)+}++#[derive(Clone, Debug)]+pub struct ChangedFile {+ /// `A`, `M`, `D`, `R`, `C`, `T`…+ pub status: char,+ pub path: String,+ /// Original path for renames and copies.+ pub old_path: Option<String>,+ pub added: Option<u32>,+ pub removed: Option<u32>,+}++#[derive(Clone, Debug)]+pub struct CommitDetail {+ pub hash: String,+ pub parents: Vec<String>,+ pub author: String,+ pub email: String,+ pub author_date: String,+ pub committer: String,+ pub commit_date: String,+ pub message: String,+ pub files: Vec<ChangedFile>,+}++pub fn commit_detail(repo: &Path, hash: &str) -> Result<CommitDetail, String> {+ let format = format!("--format=%H{FS}%P{FS}%an{FS}%ae{FS}%ad{FS}%cn{FS}%cd{FS}%B");+ let out = run(+ Some(repo),+ &[+ "show",+ "-s",+ "--date=format-local:%Y-%m-%d %H:%M:%S",+ &format,+ hash,+ ],+ )?;+ let f: Vec<&str> = out.splitn(8, FS).collect();+ let [h, parents, author, email, adate, committer, cdate, message] = f[..] else {+ return Err("unexpected output from git show".to_owned());+ };++ // Merges are shown against their first parent, like most GUIs do.+ let diff_args = |kind: &'static str| {+ [+ "show",+ "--format=",+ "--diff-merges=first-parent",+ "-M",+ kind,+ "-z",+ hash,+ ]+ };+ let status_out = run(Some(repo), &diff_args("--name-status"))?;+ let numstat_out = run(Some(repo), &diff_args("--numstat"))?;++ let mut files = parse_name_status(&status_out);+ for (path, added, removed) in parse_numstat(&numstat_out) {+ if let Some(file) = files.iter_mut().find(|f| f.path == path) {+ file.added = added;+ file.removed = removed;+ }+ }++ Ok(CommitDetail {+ hash: h.to_owned(),+ parents: parents.split_whitespace().map(str::to_owned).collect(),+ author: author.to_owned(),+ email: email.to_owned(),+ author_date: adate.to_owned(),+ committer: committer.to_owned(),+ commit_date: cdate.to_owned(),+ message: message.trim_end().to_owned(),+ files,+ })+}++/// `--name-status -z`: `STATUS\0path\0` or, for renames/copies, `R100\0old\0new\0`.+fn parse_name_status(out: &str) -> Vec<ChangedFile> {+ let mut files = Vec::new();+ let mut it = out.split('\0').filter(|s| !s.is_empty());+ while let Some(status) = it.next() {+ let code = status.chars().next().unwrap_or('?');+ let Some(first) = it.next() else { break };+ if matches!(code, 'R' | 'C') {+ let Some(second) = it.next() else { break };+ files.push(ChangedFile {+ status: code,+ path: second.to_owned(),+ old_path: Some(first.to_owned()),+ added: None,+ removed: None,+ });+ } else {+ files.push(ChangedFile {+ status: code,+ path: first.to_owned(),+ old_path: None,+ added: None,+ removed: None,+ });+ }+ }+ files+}++/// `--numstat -z`: `add\tdel\tpath\0` or, for renames, `add\tdel\t\0old\0new\0`.+fn parse_numstat(out: &str) -> Vec<(String, Option<u32>, Option<u32>)> {+ let mut result = Vec::new();+ let mut it = out.split('\0');+ while let Some(entry) = it.next() {+ let entry = entry.trim_start_matches('\n');+ if entry.is_empty() {+ continue;+ }+ let mut parts = entry.splitn(3, '\t');+ let (Some(a), Some(d), Some(path)) = (parts.next(), parts.next(), parts.next()) else {+ continue;+ };+ let path = if path.is_empty() {+ // Rename: old path, then new path.+ let _old = it.next();+ it.next().unwrap_or_default().to_owned()+ } else {+ path.to_owned()+ };+ // Binary files report `-`.+ result.push((path, a.parse().ok(), d.parse().ok()));+ }+ result+}++/// The patch of one file in a commit.+pub fn file_diff(repo: &Path, hash: &str, path: &str) -> Result<String, String> {+ run(+ Some(repo),+ &[+ "show",+ "--format=",+ "--diff-merges=first-parent",+ "-M",+ hash,+ "--",+ path,+ ],+ )+}++/// Which side of the index a working-tree file is listed on.+#[derive(Clone, Copy, Debug, PartialEq, Eq)]+pub enum Area {+ Staged,+ Unstaged,+ Untracked,+ Conflicted,+}++#[derive(Clone, Debug, PartialEq, Eq)]+pub struct StatusFile {+ pub path: String,+ pub old_path: Option<String>,+ /// Porcelain status letter for this side (`M`, `A`, `D`, `R`, `?`, `U`…).+ pub code: char,+ pub area: Area,+}++/// An operation git left half done (conflicts to resolve).+#[derive(Clone, Copy, Debug, PartialEq, Eq)]+pub enum InProgress {+ Merge,+ CherryPick,+ Revert,+}++impl InProgress {+ pub fn label(self) -> &'static str {+ match self {+ InProgress::Merge => "Merge",+ InProgress::CherryPick => "Cherry-pick",+ InProgress::Revert => "Revert",+ }+ }++ /// The git subcommand whose `--abort` cancels it.+ pub fn command(self) -> &'static str {+ match self {+ InProgress::Merge => "merge",+ InProgress::CherryPick => "cherry-pick",+ InProgress::Revert => "revert",+ }+ }+}++#[derive(Clone, Debug, Default)]+pub struct WorkStatus {+ pub staged: Vec<StatusFile>,+ pub unstaged: Vec<StatusFile>,+ pub conflicted: Vec<StatusFile>,+ pub in_progress: Option<InProgress>,+ /// Message git prepared for the pending merge / cherry-pick / revert commit.+ pub prepared_message: Option<String>,+}++impl WorkStatus {+ pub fn is_clean(&self) -> bool {+ self.staged.is_empty() && self.unstaged.is_empty() && self.conflicted.is_empty()+ }+}++pub fn status(repo: &Path) -> Result<WorkStatus, String> {+ let out = run(+ Some(repo),+ &["status", "--porcelain=v1", "-z", "--untracked-files=all"],+ )?;+ let mut status = parse_status(&out);+ for (state, head) in [+ (InProgress::Merge, "MERGE_HEAD"),+ (InProgress::CherryPick, "CHERRY_PICK_HEAD"),+ (InProgress::Revert, "REVERT_HEAD"),+ ] {+ if run(Some(repo), &["rev-parse", "-q", "--verify", head]).is_ok() {+ status.in_progress = Some(state);+ break;+ }+ }+ if status.in_progress.is_some()+ && let Ok(path) = run(Some(repo), &["rev-parse", "--git-path", "MERGE_MSG"])+ {+ let path = repo.join(path.trim());+ status.prepared_message = std::fs::read_to_string(path).ok().map(|m| {+ // Drop git's `#` comment lines.+ m.lines()+ .filter(|l| !l.starts_with('#'))+ .collect::<Vec<_>>()+ .join("\n")+ .trim()+ .to_owned()+ });+ }+ Ok(status)+}++/// `status --porcelain=v1 -z`: `XY path\0`, renames and copies `XY new\0old\0`.+fn parse_status(out: &str) -> WorkStatus {+ let mut status = WorkStatus::default();+ let mut it = out.split('\0');+ while let Some(entry) = it.next() {+ let mut chars = entry.chars();+ let (Some(x), Some(y), Some(' ')) = (chars.next(), chars.next(), chars.next()) else {+ continue;+ };+ let path = chars.as_str().to_owned();+ let old_path = if matches!(x, 'R' | 'C') {+ it.next().map(str::to_owned)+ } else {+ None+ };+ let file = |code, area| StatusFile {+ path: path.clone(),+ old_path: old_path.clone(),+ code,+ area,+ };+ let conflicted = x == 'U' || y == 'U' || (x == 'A' && y == 'A') || (x == 'D' && y == 'D');+ if conflicted {+ status.conflicted.push(file('U', Area::Conflicted));+ } else if x == '?' {+ status.unstaged.push(file('?', Area::Untracked));+ } else if x == '!' {+ continue;+ } else {+ if x != ' ' {+ status.staged.push(file(x, Area::Staged));+ }+ if y != ' ' {+ status.unstaged.push(file(y, Area::Unstaged));+ }+ }+ }+ status+}++/// The patch of one uncommitted file.+pub fn work_diff(repo: &Path, file: &StatusFile) -> Result<String, String> {+ let path = file.path.as_str();+ match file.area {+ Area::Staged => run(Some(repo), &["diff", "--cached", "-M", "--", path]),+ Area::Unstaged | Area::Conflicted => run(Some(repo), &["diff", "--", path]),+ // An untracked file has no history: show it as all added.+ Area::Untracked => run_ok_codes(+ Some(repo),+ &["diff", "--no-index", "--", "/dev/null", path],+ &[0, 1],+ ),+ }+}++#[cfg(test)]+mod tests {+ use super::*;++ #[test]+ fn status_sides_renames_and_conflicts() {+ let s =+ parse_status("MM both.rs\0R new.rs\0old.rs\0?? fresh.txt\0UU clash.rs\0 D gone.rs\0");+ let staged: Vec<_> = s.staged.iter().map(|f| (f.code, f.path.as_str())).collect();+ assert_eq!(staged, vec![('M', "both.rs"), ('R', "new.rs")]);+ assert_eq!(s.staged[1].old_path.as_deref(), Some("old.rs"));+ let unstaged: Vec<_> = s+ .unstaged+ .iter()+ .map(|f| (f.code, f.path.as_str()))+ .collect();+ assert_eq!(+ unstaged,+ vec![('M', "both.rs"), ('?', "fresh.txt"), ('D', "gone.rs")]+ );+ assert_eq!(s.conflicted.len(), 1);+ }++ #[test]+ fn clone_folder_names() {+ assert_eq!(clone_dir_name("https://github.com/a/b.git"), "b");+ assert_eq!(clone_dir_name("[email protected]:a/b.git"), "b");+ assert_eq!(clone_dir_name("C:\\repos\\thing\\"), "thing");+ assert_eq!(clone_dir_name("git@host:proj"), "proj");+ }++ #[test]+ fn name_status_with_rename() {+ let files = parse_name_status("M\0a.txt\0R090\0old.rs\0new.rs\0D\0gone\0");+ assert_eq!(files.len(), 3);+ assert_eq!(files[1].status, 'R');+ assert_eq!(files[1].path, "new.rs");+ assert_eq!(files[1].old_path.as_deref(), Some("old.rs"));+ }++ #[test]+ fn numstat_with_rename_and_binary() {+ let stats = parse_numstat("1\t2\ta.txt\0-\t-\timg.png\0\n3\t0\t\0old.rs\0new.rs\0");+ assert_eq!(stats.len(), 3);+ assert_eq!(stats[0], ("a.txt".to_owned(), Some(1), Some(2)));+ assert_eq!(stats[1], ("img.png".to_owned(), None, None));+ assert_eq!(stats[2], ("new.rs".to_owned(), Some(3), Some(0)));+ }+}diff --git a/src/graph.rs b/src/graph.rsnew file mode 100644index 0000000..d7753eb--- /dev/null+++ b/src/graph.rs@@ -0,0 +1,132 @@+//! Lane layout for the commit graph.+//!+//! Commits arrive newest first. Each lane "waits" for a commit hash; a commit takes the lane that+//! waits for it (or a free one if it's a branch tip), then hands the lane to its first parent and+//! opens or joins lanes for its other parents. Lanes keep their column for their whole life, so+//! lines that pass through a row are always vertical.++use crate::git::Commit;++#[derive(Clone, Debug, Default)]+pub struct Row {+ /// Column of the commit's dot.+ pub col: usize,+ /// Lanes drawn straight through the row, top to bottom.+ pub through: Vec<usize>,+ /// Lanes that come from the top edge into the dot (children of this commit).+ pub incoming: Vec<usize>,+ /// Lanes that leave the dot towards the bottom edge (parents of this commit).+ pub outgoing: Vec<usize>,+}++pub struct Graph {+ pub rows: Vec<Row>,+ /// Widest the graph gets, in lanes.+ pub width: usize,+}++pub fn layout(commits: &[Commit]) -> Graph {+ let mut lanes: Vec<Option<&str>> = Vec::new();+ let mut rows = Vec::with_capacity(commits.len());+ let mut width = 0;++ for commit in commits {+ let hash = commit.hash.as_str();+ let incoming: Vec<usize> = (0..lanes.len())+ .filter(|&i| lanes[i] == Some(hash))+ .collect();+ let col = match incoming.first() {+ Some(&c) => c,+ None => free_lane(&mut lanes),+ };+ let through: Vec<usize> = (0..lanes.len())+ .filter(|&i| lanes[i].is_some() && lanes[i] != Some(hash))+ .collect();+ for &i in &incoming {+ lanes[i] = None;+ }++ let mut outgoing = Vec::new();+ for (n, parent) in commit.parents.iter().enumerate() {+ let parent = parent.as_str();+ if n == 0 {+ // The first parent continues this lane. If another lane already waits for the+ // same parent, both run down and meet at the parent's dot (leftmost lane wins).+ lanes[col] = Some(parent);+ outgoing.push(col);+ } else if let Some(existing) = lanes.iter().position(|l| *l == Some(parent)) {+ outgoing.push(existing);+ } else {+ let lane = free_lane(&mut lanes);+ lanes[lane] = Some(parent);+ outgoing.push(lane);+ }+ }++ while lanes.last() == Some(&None) {+ lanes.pop();+ }+ width = width.max(lanes.len()).max(col + 1);+ rows.push(Row {+ col,+ through,+ incoming,+ outgoing,+ });+ }++ Graph { rows, width }+}++fn free_lane(lanes: &mut Vec<Option<&str>>) -> usize {+ match lanes.iter().position(Option::is_none) {+ Some(i) => i,+ None => {+ lanes.push(None);+ lanes.len() - 1+ }+ }+}++#[cfg(test)]+mod tests {+ use super::*;++ fn c(hash: &str, parents: &[&str]) -> Commit {+ Commit {+ hash: hash.into(),+ parents: parents.iter().map(|p| (*p).to_owned()).collect(),+ author: String::new(),+ date: String::new(),+ summary: String::new(),+ refs: Vec::new(),+ }+ }++ #[test]+ fn linear_history_uses_one_lane() {+ let g = layout(&[c("c", &["b"]), c("b", &["a"]), c("a", &[])]);+ assert_eq!(g.width, 1);+ assert!(g.rows.iter().all(|r| r.col == 0));+ }++ #[test]+ fn merge_and_branch() {+ // m merges f into b; f and b both come from a.+ let g = layout(&[+ c("m", &["b", "f"]),+ c("f", &["a"]),+ c("b", &["a"]),+ c("a", &[]),+ ]);+ assert_eq!(g.width, 2);+ assert_eq!(g.rows[0].outgoing, vec![0, 1]);+ assert_eq!(g.rows[1].col, 1);+ assert_eq!(g.rows[1].through, vec![0]);+ assert_eq!(g.rows[2].col, 0);+ assert_eq!(g.rows[2].outgoing, vec![0]);+ // Both lanes wait for `a` and meet at its dot, in the leftmost lane.+ assert_eq!(g.rows[3].incoming, vec![0, 1]);+ assert_eq!(g.rows[3].col, 0);+ }+}diff --git a/src/icons.rs b/src/icons.rsnew file mode 100644index 0000000..cab70dd--- /dev/null+++ b/src/icons.rs@@ -0,0 +1,114 @@+//! Lucide icons (ISC, see `assets/icons/LICENSE-lucide.txt`), embedded as SVG, recoloured to+//! white, rasterised by egui_extras at the on-screen size and tinted per use. Same approach as+//! PhotoCraft: no Unicode glyphs, which half the time render as boxes.++use std::collections::HashMap;+use std::sync::{Arc, OnceLock};++use egui::{Color32, Rect, Response, RichText, Sense, Ui, Vec2, load::Bytes};++use crate::theme::Tokens;++macro_rules! icons {+ ($($name:literal),* $(,)?) => {+ &[$(($name, include_str!(concat!("../assets/icons/", $name, ".svg")))),*]+ };+}++const SOURCES: &[(&str, &str)] = icons![+ "arrow-down",+ "arrow-down-to-line",+ "arrow-up",+ "arrow-up-from-line",+ "check",+ "chevron-down",+ "chevron-right",+ "circle-alert",+ "cloud",+ "cloud-download",+ "copy",+ "file-diff",+ "folder-git-2",+ "folder-open",+ "folder-plus",+ "git-branch",+ "git-branch-plus",+ "git-merge",+ "laptop",+ "log-in",+ "minus",+ "palette",+ "plus",+ "refresh-cw",+ "search",+ "tag",+ "undo-2",+ "x",+];++fn white_icons() -> &'static HashMap<&'static str, Arc<[u8]>> {+ static MAP: OnceLock<HashMap<&'static str, Arc<[u8]>>> = OnceLock::new();+ MAP.get_or_init(|| {+ SOURCES+ .iter()+ .map(|(name, svg)| {+ let white = svg.replace("currentColor", "#ffffff");+ (*name, Arc::from(white.into_bytes().into_boxed_slice()))+ })+ .collect()+ })+}++/// An egui image for an icon, tinted. Unknown names give an empty image.+pub fn image(name: &str, size: f32, tint: Color32) -> egui::Image<'static> {+ let bytes = white_icons()+ .get(name)+ .cloned()+ .unwrap_or_else(|| Arc::from(Vec::new().into_boxed_slice()));+ egui::Image::from_bytes(format!("bytes://icons/{name}.svg"), Bytes::Shared(bytes))+ .fit_to_exact_size(Vec2::splat(size))+ .tint(tint)+}++/// Paints an icon centred in `rect`.+pub fn paint(ui: &Ui, rect: Rect, name: &str, size: f32, tint: Color32) {+ let r = Rect::from_center_size(rect.center(), Vec2::splat(size));+ image(name, size, tint).paint_at(ui, r);+}++/// A flat toolbar button: icon plus optional label, background only on hover (PhotoCraft's+/// options-bar buttons).+pub fn tool_button(ui: &mut Ui, icon: &str, label: &str, enabled: bool) -> Response {+ let t = Tokens::get(ui.ctx());+ let tint = if enabled { t.icon } else { t.text_faint };+ let mut button = egui::Button::image_and_text(+ image(icon, 16.0, tint),+ RichText::new(label).color(if enabled { t.text } else { t.text_faint }),+ )+ .frame_when_inactive(false)+ .min_size(egui::vec2(0.0, 28.0));+ if label.is_empty() {+ button = egui::Button::image(image(icon, 16.0, tint))+ .frame_when_inactive(false)+ .min_size(egui::vec2(28.0, 28.0));+ }+ ui.add_enabled(enabled, button)+}++/// A small square icon-only button (rows, panel headers).+pub fn small_button(ui: &mut Ui, icon: &str, tooltip: &str) -> Response {+ let t = Tokens::get(ui.ctx());+ let (rect, resp) = ui.allocate_exact_size(Vec2::splat(20.0), Sense::click());+ if resp.hovered() {+ ui.painter().rect_filled(rect, t.radius_sm, t.pressed);+ }+ let tint = if resp.hovered() { t.text } else { t.icon };+ paint(ui, rect, icon, 14.0, tint);+ resp.on_hover_text(tooltip)+}++/// An icon laid out inline, like a label.+pub fn inline(ui: &mut Ui, name: &str, size: f32, tint: Color32) {+ let (rect, _) = ui.allocate_exact_size(Vec2::splat(size), Sense::hover());+ paint(ui, rect, name, size, tint);+}diff --git a/src/lib.rs b/src/lib.rsnew file mode 100644index 0000000..62ceaa1--- /dev/null+++ b/src/lib.rs@@ -0,0 +1,8 @@+//! gitcraft: a small, personal visual git client (egui front end over the git command line).++pub mod app;+mod git;+mod graph;+mod icons;+mod repo;+mod theme;diff --git a/src/main.rs b/src/main.rsnew file mode 100644index 0000000..647a7fc--- /dev/null+++ b/src/main.rs@@ -0,0 +1,22 @@+// No console window behind the app on Windows release builds.+#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]++use gitcraft::app;++fn main() -> eframe::Result {+ let options = eframe::NativeOptions {+ viewport: egui::ViewportBuilder::default()+ .with_title("gitcraft")+ .with_inner_size([1400.0, 860.0])+ .with_min_inner_size([800.0, 500.0]),+ ..Default::default()+ };+ eframe::run_native(+ "gitcraft",+ options,+ Box::new(|cc| {+ let open_arg = std::env::args_os().nth(1).map(std::path::PathBuf::from);+ Ok(Box::new(app::App::new(cc, open_arg)))+ }),+ )+}diff --git a/src/repo/detail.rs b/src/repo/detail.rsnew file mode 100644index 0000000..f0d77bb--- /dev/null+++ b/src/repo/detail.rs@@ -0,0 +1,516 @@+//! Right pane: the selected commit, or the working-tree changes with staging and the commit box.++use egui::{Align2, Key, RichText, Sense, Ui, pos2, vec2};++use super::diff::unstage_args;+use super::widgets::{self, RowExtra};+use super::{Action, Dialog, DiffKey, DiffView, Refresh, RepoTab, abort_action, ops};+use crate::git::{Area, StatusFile};+use crate::icons;+use crate::theme::{self, Tokens};++impl RepoTab {+ pub(super) fn detail_panel(&mut self, ui: &mut Ui, acts: &mut Vec<Action>) {+ let wip = self.selected.is_some_and(|r| self.is_wip(r));+ if wip {+ self.changes_panel(ui, acts);+ } else {+ self.commit_panel(ui, acts);+ }+ }++ fn open_key(&self) -> Option<&DiffKey> {+ self.diff.as_ref().map(|d: &DiffView| &d.key)+ }++ fn commit_panel(&mut self, ui: &mut Ui, acts: &mut Vec<Action>) {+ let t = Tokens::get(ui.ctx());+ widgets::panel_header(ui, "Commit", |_| {});+ if let Some(err) = &self.detail_error {+ ui.add_space(10.0);+ ui.horizontal(|ui| {+ ui.add_space(10.0);+ ui.colored_label(t.danger, err);+ });+ return;+ }+ let Some(detail) = &self.detail else {+ ui.centered_and_justified(|ui| {+ if self.selected.is_some() {+ ui.spinner();+ } else {+ ui.label(RichText::new("Select a commit").color(t.text_dim));+ }+ });+ return;+ };++ egui::ScrollArea::vertical()+ .id_salt("detail_scroll")+ .auto_shrink(false)+ .show(ui, |ui| {+ egui::Frame::new()+ .inner_margin(egui::Margin::symmetric(14, 12))+ .show(ui, |ui| {+ let (subject, body) = detail+ .message+ .split_once('\n')+ .map(|(s, b)| (s, b.trim()))+ .unwrap_or((detail.message.as_str(), ""));+ ui.add(+ egui::Label::new(RichText::new(subject).font(theme::semibold(15.0)))+ .wrap(),+ );+ if !body.is_empty() {+ ui.add_space(2.0);+ ui.add(egui::Label::new(RichText::new(body).color(t.text_dim)).wrap());+ }+ ui.add_space(12.0);++ // Author line with an initials avatar.+ ui.horizontal(|ui| {+ let (rect, _) =+ ui.allocate_exact_size(vec2(32.0, 32.0), Sense::hover());+ let color = t.lane(name_hash(&detail.author));+ ui.painter().circle_filled(rect.center(), 16.0, color);+ ui.painter().text(+ rect.center(),+ Align2::CENTER_CENTER,+ initials(&detail.author),+ theme::semibold(12.5),+ egui::Color32::from_rgb(16, 16, 16),+ );+ ui.vertical(|ui| {+ ui.spacing_mut().item_spacing.y = 2.0;+ ui.label(RichText::new(&detail.author).font(theme::medium(12.5)))+ .on_hover_text(&detail.email);+ ui.label(+ RichText::new(&detail.author_date)+ .color(t.text_faint)+ .font(theme::mono(11.0)),+ );+ });+ });+ if detail.committer != detail.author {+ ui.label(+ RichText::new(format!(+ "Committed by {} · {}",+ detail.committer, detail.commit_date+ ))+ .color(t.text_faint)+ .small(),+ );+ }+ ui.add_space(10.0);++ egui::Grid::new("commit_meta")+ .num_columns(2)+ .spacing([12.0, 6.0])+ .show(ui, |ui| {+ ui.label(RichText::new("Commit").color(t.text_faint));+ ui.horizontal(|ui| {+ ui.label(+ RichText::new(+ detail.hash.get(..12).unwrap_or(&detail.hash),+ )+ .font(theme::mono(12.0)),+ )+ .on_hover_text(&detail.hash);+ if icons::small_button(ui, "copy", "Copy full hash").clicked() {+ ui.ctx().copy_text(detail.hash.clone());+ }+ });+ ui.end_row();+ if !detail.parents.is_empty() {+ ui.label(+ RichText::new(if detail.parents.len() > 1 {+ "Parents"+ } else {+ "Parent"+ })+ .color(t.text_faint),+ );+ ui.horizontal_wrapped(|ui| {+ for p in &detail.parents {+ if ui+ .link(+ RichText::new(p.get(..8).unwrap_or(p))+ .font(theme::mono(12.0)),+ )+ .clicked()+ {+ acts.push(Action::SelectHash(p.clone()));+ }+ }+ });+ ui.end_row();+ }+ });+ });++ let (adds, dels) = detail.files.iter().fold((0, 0), |(a, d), f| {+ (a + f.added.unwrap_or(0), d + f.removed.unwrap_or(0))+ });+ let (rect, _) =+ ui.allocate_exact_size(vec2(ui.available_width(), 28.0), Sense::hover());+ let p = ui.painter();+ p.rect_filled(rect, 0.0, t.tab_strip);+ let y = rect.center().y;+ let r = p.text(+ pos2(rect.left() + 14.0, y),+ Align2::LEFT_CENTER,+ format!(+ "{} file{} changed",+ detail.files.len(),+ if detail.files.len() == 1 { "" } else { "s" }+ ),+ theme::semibold(11.5),+ t.text_dim,+ );+ let r = p.text(+ pos2(r.right() + 10.0, y),+ Align2::LEFT_CENTER,+ format!("+{adds}"),+ theme::mono(11.0),+ t.success,+ );+ p.text(+ pos2(r.right() + 6.0, y),+ Align2::LEFT_CENTER,+ format!("−{dels}"),+ theme::mono(11.0),+ t.danger,+ );+ if detail.parents.len() > 1 {+ p.text(+ pos2(rect.right() - 10.0, y),+ Align2::RIGHT_CENTER,+ "vs. first parent",+ egui::FontId::proportional(11.0),+ t.text_faint,+ );+ }++ ui.spacing_mut().item_spacing.y = 0.0;+ for f in &detail.files {+ let key = DiffKey::Commit {+ hash: detail.hash.clone(),+ path: f.path.clone(),+ };+ let selected = self.open_key() == Some(&key);+ let r = widgets::file_row(+ ui,+ f.status,+ &f.path,+ f.old_path.as_deref(),+ selected,+ RowExtra::Stats(f.added, f.removed),+ );+ if r.row.clicked() {+ acts.push(Action::OpenDiff(key));+ }+ }+ });+ }++ fn changes_panel(&mut self, ui: &mut Ui, acts: &mut Vec<Action>) {+ let t = Tokens::get(ui.ctx());+ let idle = self.busy_op.is_none();+ widgets::panel_header(ui, "Changes", |_| {});++ // The commit box stays at the bottom.+ egui::Panel::bottom("commit_box")+ .frame(+ egui::Frame::new()+ .fill(t.card)+ .inner_margin(egui::Margin::symmetric(12, 10))+ .stroke(egui::Stroke::new(1.0, t.separator)),+ )+ .show(ui, |ui| self.commit_box(ui, acts));++ egui::ScrollArea::vertical()+ .id_salt("changes_scroll")+ .auto_shrink(false)+ .show(ui, |ui| {+ ui.spacing_mut().item_spacing.y = 0.0;+ if let Some(state) = self.work.in_progress {+ egui::Frame::new()+ .fill(t.warning.gamma_multiply(0.14))+ .inner_margin(egui::Margin::symmetric(12, 8))+ .show(ui, |ui| {+ ui.set_width(ui.available_width());+ ui.horizontal(|ui| {+ icons::inline(ui, "circle-alert", 16.0, t.warning);+ ui.label(+ RichText::new(format!("{} in progress", state.label()))+ .color(t.warning)+ .font(theme::medium(12.5)),+ );+ ui.with_layout(+ egui::Layout::right_to_left(egui::Align::Center),+ |ui| {+ if ui+ .add_enabled(idle, egui::Button::new("Abort"))+ .clicked()+ {+ acts.push(abort_action(state));+ }+ },+ );+ });+ let hint = if self.work.conflicted.is_empty() {+ "All conflicts resolved: commit to finish."+ } else {+ "Fix the conflicted files, mark them resolved, then commit."+ };+ ui.label(RichText::new(hint).color(t.text_dim).small());+ });+ }++ let head = self.refs.head.clone();+ if !self.work.conflicted.is_empty() {+ list_header(ui, "CONFLICTED", self.work.conflicted.len(), None);+ for f in &self.work.conflicted {+ match self.work_row(ui, f, &[("check", "Mark resolved (stage)")]) {+ RowClick::Open => acts.push(Action::OpenDiff(DiffKey::Work(f.clone()))),+ RowClick::Button(_) => acts.push(stage_action(+ "Mark resolved",+ vec![vec!["add", "--", &f.path]],+ )),+ RowClick::None => {}+ }+ }+ }++ let unstaged = &self.work.unstaged;+ if list_header(+ ui,+ "UNSTAGED",+ unstaged.len(),+ (!unstaged.is_empty() && idle).then_some("Stage all"),+ ) {+ acts.push(stage_action("Stage all", vec![vec!["add", "-A"]]));+ }+ for f in unstaged {+ match self.work_row(ui, f, &[("undo-2", "Discard changes…"), ("plus", "Stage")])+ {+ RowClick::Open => acts.push(Action::OpenDiff(DiffKey::Work(f.clone()))),+ RowClick::Button(0) => acts.push(Action::Dialog(discard_dialog(f))),+ RowClick::Button(_) => {+ acts.push(stage_action("Stage", vec![vec!["add", "--", &f.path]]))+ }+ RowClick::None => {}+ }+ }+ if unstaged.is_empty() {+ empty_hint(ui, "Nothing to stage");+ }++ let staged = &self.work.staged;+ if list_header(+ ui,+ "STAGED",+ staged.len(),+ (!staged.is_empty() && idle).then_some("Unstage all"),+ ) {+ let all: Vec<&str> = if head.is_empty() {+ vec!["rm", "--cached", "-r", "-q", "--", "."]+ } else {+ vec!["reset", "-q"]+ };+ acts.push(stage_action("Unstage all", vec![all]));+ }+ for f in staged {+ match self.work_row(ui, f, &[("minus", "Unstage")]) {+ RowClick::Open => acts.push(Action::OpenDiff(DiffKey::Work(f.clone()))),+ RowClick::Button(_) => {+ acts.push(stage_action("Unstage", vec![unstage_args(&head, &f.path)]))+ }+ RowClick::None => {}+ }+ }+ if staged.is_empty() {+ empty_hint(ui, "Stage files to choose what goes in the commit");+ }+ });+ }++ /// One working-tree file with hover buttons (hidden while an operation runs).+ fn work_row(&self, ui: &mut Ui, f: &StatusFile, buttons: &[(&str, &str)]) -> RowClick {+ let key = DiffKey::Work(f.clone());+ let selected = self.open_key() == Some(&key);+ let buttons = if self.busy_op.is_none() { buttons } else { &[] };+ let r = widgets::file_row(+ ui,+ f.code,+ &f.path,+ f.old_path.as_deref(),+ selected,+ RowExtra::Buttons(buttons),+ );+ match r.button {+ Some(i) => RowClick::Button(i),+ None if r.row.clicked() => RowClick::Open,+ None => RowClick::None,+ }+ }++ fn commit_box(&mut self, ui: &mut Ui, acts: &mut Vec<Action>) {+ let t = Tokens::get(ui.ctx());+ let idle = self.busy_op.is_none();+ ui.label(+ RichText::new("COMMIT")+ .font(theme::semibold(10.5))+ .color(t.text_faint),+ );+ ui.add_space(2.0);+ let summary = ui.add(+ egui::TextEdit::singleline(&mut self.commit_summary)+ .hint_text("Summary")+ .desired_width(f32::INFINITY)+ .margin(egui::Margin::symmetric(8, 6)),+ );+ ui.add(+ egui::TextEdit::multiline(&mut self.commit_body)+ .hint_text("Description (optional)")+ .desired_width(f32::INFINITY)+ .desired_rows(3)+ .margin(egui::Margin::symmetric(8, 6)),+ );+ let len = self.commit_summary.chars().count();+ if len > 72 {+ ui.label(+ RichText::new(format!("Summary is {len} characters; 50–72 reads best"))+ .color(t.warning)+ .small(),+ );+ }+ ui.add_space(4.0);+ let staged = self.work.staged.len();+ let label = if staged > 0 {+ format!("Commit {staged} file{}", if staged == 1 { "" } else { "s" })+ } else {+ "Stage all and commit".to_owned()+ };+ let can = idle && !self.commit_summary.trim().is_empty() && self.work.conflicted.is_empty();+ let shortcut = (summary.has_focus() || ui.ctx().egui_wants_keyboard_input())+ && ui.input(|i| i.modifiers.command && i.key_pressed(Key::Enter));+ let resp = widgets::primary_button(ui, &label, can, ui.available_width());+ if (resp.clicked() || (shortcut && can)) && can {+ acts.push(Action::Commit);+ }+ resp.on_hover_text("Ctrl+Enter");+ }+}++enum RowClick {+ None,+ Open,+ Button(usize),+}++fn stage_action(label: &str, steps: Vec<Vec<&str>>) -> Action {+ Action::Ops {+ label: label.to_owned(),+ ops: steps+ .into_iter()+ .map(|s| s.into_iter().map(str::to_owned).collect())+ .collect(),+ refresh: Refresh::Status,+ }+}++fn discard_dialog(f: &StatusFile) -> Dialog {+ if f.area == Area::Untracked {+ Dialog::confirm(+ "Delete new file",+ format!(+ "Delete “{}”? It isn't tracked by git, so this can't be undone.",+ f.path+ ),+ "Delete file",+ ops(&[&["clean", "-f", "-q", "--", &f.path]]),+ None,+ )+ .refresh(Refresh::Status)+ } else {+ Dialog::confirm(+ "Discard changes",+ format!(+ "Discard the unstaged changes to “{}”? This can't be undone.",+ f.path+ ),+ "Discard",+ ops(&[&["restore", "--", &f.path]]),+ None,+ )+ .refresh(Refresh::Status)+ }+}++/// A list title with a count and an optional text button on the right. Returns the click.+fn list_header(ui: &mut Ui, title: &str, count: usize, button: Option<&str>) -> bool {+ let t = Tokens::get(ui.ctx());+ let (rect, _) = ui.allocate_exact_size(vec2(ui.available_width(), 30.0), Sense::hover());+ let p = ui.painter();+ p.rect_filled(rect, 0.0, t.tab_strip);+ let y = rect.center().y;+ let r = p.text(+ pos2(rect.left() + 12.0, y),+ Align2::LEFT_CENTER,+ title,+ theme::semibold(11.0),+ t.text_dim,+ );+ p.text(+ pos2(r.right() + 8.0, y),+ Align2::LEFT_CENTER,+ count.to_string(),+ theme::medium(11.0),+ t.text_faint,+ );+ let Some(label) = button else { return false };+ let galley = p.layout_no_wrap(label.to_owned(), theme::medium(11.5), t.accent);+ let b = egui::Rect::from_center_size(+ pos2(rect.right() - 12.0 - galley.size().x / 2.0 - 6.0, y),+ vec2(galley.size().x + 12.0, 22.0),+ );+ let resp = ui.interact(b, ui.id().with(("list_btn", title)), Sense::click());+ if resp.hovered() {+ ui.painter().rect_filled(b, t.radius_sm, t.hover);+ }+ ui.painter().galley(+ pos2(b.left() + 6.0, y - galley.size().y / 2.0),+ galley,+ t.accent,+ );+ resp.clicked()+}++fn empty_hint(ui: &mut Ui, text: &str) {+ let t = Tokens::get(ui.ctx());+ let (rect, _) = ui.allocate_exact_size(vec2(ui.available_width(), 30.0), Sense::hover());+ ui.painter().text(+ pos2(rect.left() + 14.0, rect.center().y),+ Align2::LEFT_CENTER,+ text,+ egui::FontId::proportional(11.5),+ t.text_faint,+ );+}++fn initials(name: &str) -> String {+ let mut parts = name.split_whitespace().filter_map(|w| w.chars().next());+ let first = parts.next().unwrap_or('?');+ let last = parts.next_back();+ let mut s: String = first.to_uppercase().collect();+ if let Some(l) = last {+ s.extend(l.to_uppercase());+ }+ s+}++fn name_hash(name: &str) -> usize {+ name.bytes()+ .fold(7usize, |h, b| h.wrapping_mul(31).wrapping_add(b as usize))+}diff --git a/src/repo/dialogs.rs b/src/repo/dialogs.rsnew file mode 100644index 0000000..9df12b3--- /dev/null+++ b/src/repo/dialogs.rs@@ -0,0 +1,207 @@+//! Modal dialogs: create a branch, confirm a destructive operation.++use egui::{Key, RichText};++use super::widgets;+use super::{Action, Refresh, RepoTab};+use crate::theme::{self, Tokens};++pub enum Dialog {+ CreateBranch {+ /// Commit the branch starts at.+ at: String,+ /// How to show `at` (branch name or short hash).+ at_label: String,+ name: String,+ checkout: bool,+ focus: bool,+ },+ Confirm {+ title: String,+ body: String,+ button: String,+ ops: Vec<Vec<String>>,+ /// An optional checkbox (label, ops to run instead when ticked), e.g. force delete.+ alternative: Option<(String, Vec<Vec<String>>)>,+ use_alternative: bool,+ refresh: Refresh,+ },+}++impl Dialog {+ pub fn create_branch(at: &str, at_label: &str) -> Self {+ Dialog::CreateBranch {+ at: at.to_owned(),+ at_label: at_label.to_owned(),+ name: String::new(),+ checkout: true,+ focus: true,+ }+ }++ pub fn confirm(+ title: &str,+ body: String,+ button: &str,+ ops: Vec<Vec<String>>,+ alternative: Option<(String, Vec<Vec<String>>)>,+ ) -> Self {+ Dialog::Confirm {+ title: title.to_owned(),+ body,+ button: button.to_owned(),+ ops,+ alternative,+ use_alternative: false,+ refresh: Refresh::All,+ }+ }++ pub fn refresh(mut self, what: Refresh) -> Self {+ if let Dialog::Confirm { refresh, .. } = &mut self {+ *refresh = what;+ }+ self+ }+}++enum Outcome {+ Open,+ Cancel,+ Done(Action),+}++impl RepoTab {+ pub(super) fn dialogs(&mut self, ctx: &egui::Context, acts: &mut Vec<Action>) {+ let Some(dialog) = &mut self.dialog else {+ return;+ };+ let t = Tokens::get(ctx);+ let frame = egui::Frame::new()+ .fill(t.card)+ .stroke(egui::Stroke::new(1.0, t.field_border))+ .corner_radius(t.radius_lg)+ .inner_margin(egui::Margin::same(18))+ .shadow(ctx.global_style().visuals.window_shadow);+ let modal = egui::Modal::new(egui::Id::new("gitcraft-dialog"))+ .frame(frame)+ .backdrop_color(egui::Color32::from_black_alpha(110));++ let response = modal.show(ctx, |ui| {+ ui.set_width(380.0);+ let enter = ui.input(|i| i.key_pressed(Key::Enter));+ match dialog {+ Dialog::CreateBranch {+ at,+ at_label,+ name,+ checkout,+ focus,+ } => {+ ui.label(RichText::new("Create branch").font(theme::semibold(15.0)));+ ui.label(RichText::new(format!("Starting at {at_label}")).color(t.text_dim));+ ui.add_space(10.0);+ let edit = ui.add(+ egui::TextEdit::singleline(name)+ .hint_text("feature/my-branch")+ .desired_width(f32::INFINITY)+ .margin(egui::Margin::symmetric(8, 6)),+ );+ if *focus {+ edit.request_focus();+ *focus = false;+ }+ // Spaces are never valid in a branch name; typing one gives a dash.+ if name.contains(' ') {+ *name = name.replace(' ', "-");+ }+ ui.add_space(6.0);+ ui.checkbox(checkout, "Check it out");+ ui.add_space(12.0);+ let valid = !name.trim().is_empty();+ let mut outcome = Outcome::Open;+ ui.horizontal(|ui| {+ if widgets::primary_button(ui, "Create", valid, 90.0).clicked()+ || (enter && valid)+ {+ let name = name.trim().to_owned();+ let args: Vec<String> = if *checkout {+ vec!["switch".into(), "-c".into(), name.clone(), at.clone()]+ } else {+ vec!["branch".into(), name.clone(), at.clone()]+ };+ outcome = Outcome::Done(Action::Ops {+ label: format!("Create branch {name}"),+ ops: vec![args],+ refresh: Refresh::All,+ });+ }+ if ui+ .add(egui::Button::new("Cancel").min_size(egui::vec2(80.0, 30.0)))+ .clicked()+ {+ outcome = Outcome::Cancel;+ }+ });+ outcome+ }+ Dialog::Confirm {+ title,+ body,+ button,+ ops,+ alternative,+ use_alternative,+ refresh,+ } => {+ ui.label(RichText::new(title.as_str()).font(theme::semibold(15.0)));+ ui.add_space(6.0);+ ui.add(egui::Label::new(body.as_str()).wrap());+ if let Some((label, _)) = alternative {+ ui.add_space(6.0);+ ui.checkbox(use_alternative, label.as_str());+ }+ ui.add_space(14.0);+ let mut outcome = Outcome::Open;+ ui.horizontal(|ui| {+ let danger = egui::Button::new(+ RichText::new(button.as_str())+ .color(egui::Color32::WHITE)+ .font(theme::medium(12.5)),+ )+ .fill(t.danger)+ .min_size(egui::vec2(90.0, 30.0));+ if ui.add(danger).clicked() {+ let steps = match (alternative, *use_alternative) {+ (Some((_, alt)), true) => alt.clone(),+ _ => ops.clone(),+ };+ outcome = Outcome::Done(Action::Ops {+ label: title.clone(),+ ops: steps,+ refresh: *refresh,+ });+ }+ if ui+ .add(egui::Button::new("Cancel").min_size(egui::vec2(80.0, 30.0)))+ .clicked()+ {+ outcome = Outcome::Cancel;+ }+ });+ outcome+ }+ }+ });++ match response.inner {+ Outcome::Done(action) => {+ acts.push(action);+ self.dialog = None;+ }+ Outcome::Cancel => self.dialog = None,+ Outcome::Open if response.should_close() => self.dialog = None,+ Outcome::Open => {}+ }+ }+}diff --git a/src/repo/diff.rs b/src/repo/diff.rsnew file mode 100644index 0000000..0fd67ac--- /dev/null+++ b/src/repo/diff.rs@@ -0,0 +1,348 @@+//! Central pane while a file is open: its diff with old/new line numbers.++use egui::{Align2, Rect, Sense, Stroke, Ui, pos2, vec2};++use super::widgets;+use super::{Action, DiffKey, Refresh, RepoTab, ops};+use crate::git::Area;+use crate::icons;+use crate::theme::{self, Tokens};++const LINE_H: f32 = 19.0;+const NUM_W: f32 = 46.0;+/// Very long diffs are cut here; the UI stays responsive and git is one click away.+const MAX_LINES: usize = 50_000;++#[derive(Clone, Copy, Debug, PartialEq, Eq)]+pub enum Kind {+ Context,+ Add,+ Del,+ Hunk,+ /// Binary notices, "No newline at end of file".+ Meta,+}++#[derive(Clone, Debug, PartialEq, Eq)]+pub struct DiffLine {+ pub kind: Kind,+ pub old: Option<u32>,+ pub new: Option<u32>,+ pub text: String,+}++/// Parses a unified (or combined, for conflicts) diff of one file.+pub fn parse(text: &str) -> Vec<DiffLine> {+ let mut out = Vec::new();+ let (mut old, mut new) = (0u32, 0u32);+ let mut in_hunk = false;+ // Combined diffs (`@@@`) prefix every line with one column per parent.+ let mut prefix = 1;+ for line in text.lines() {+ if out.len() >= MAX_LINES {+ out.push(meta("… diff truncated"));+ break;+ }+ if line.starts_with("@@") {+ in_hunk = true;+ let ats = line.chars().take_while(|c| *c == '@').count();+ prefix = ats.saturating_sub(1).max(1);+ (old, new) = hunk_start(line);+ out.push(DiffLine {+ kind: Kind::Hunk,+ old: None,+ new: None,+ text: line.to_owned(),+ });+ continue;+ }+ if !in_hunk {+ if line.starts_with("Binary files") {+ out.push(meta(line));+ }+ continue;+ }+ if line.starts_with('\\') {+ out.push(meta(line));+ continue;+ }+ if line.starts_with("diff ") {+ // Next file (shouldn't happen for a single path): back to the preamble.+ in_hunk = false;+ continue;+ }+ let cut = line+ .char_indices()+ .nth(prefix)+ .map(|(i, _)| i)+ .unwrap_or(line.len());+ let (marks, body) = line.split_at(cut);+ let kind = if marks.contains('+') {+ Kind::Add+ } else if marks.contains('-') {+ Kind::Del+ } else {+ Kind::Context+ };+ let combined = prefix > 1;+ let (o, n) = match kind {+ Kind::Add => {+ new += 1;+ (None, Some(new))+ }+ Kind::Del => {+ old += 1;+ (Some(old), None)+ }+ _ => {+ old += 1;+ new += 1;+ (Some(old), Some(new))+ }+ };+ out.push(DiffLine {+ kind,+ old: if combined { None } else { o },+ new: if combined { None } else { n },+ text: body.replace('\t', " "),+ });+ }+ out+}++fn meta(text: &str) -> DiffLine {+ DiffLine {+ kind: Kind::Meta,+ old: None,+ new: None,+ text: text.to_owned(),+ }+}++/// `@@ -12,5 +14,7 @@` → (11, 13): the numbers before the first line of the hunk.+fn hunk_start(header: &str) -> (u32, u32) {+ let mut old = 0;+ let mut new = 0;+ for part in header.split_whitespace() {+ let num = |s: &str| {+ s.split(',')+ .next()+ .and_then(|n| n.parse::<u32>().ok())+ .unwrap_or(1)+ .saturating_sub(1)+ };+ if let Some(rest) = part.strip_prefix('-') {+ old = num(rest);+ } else if let Some(rest) = part.strip_prefix('+') {+ new = num(rest);+ }+ }+ (old, new)+}++impl RepoTab {+ pub(super) fn diff_view(&mut self, ui: &mut Ui, acts: &mut Vec<Action>) {+ let t = Tokens::get(ui.ctx());+ let Some(view) = &self.diff else { return };+ let idle = self.busy_op.is_none();++ // Header: file, where it comes from, actions, close.+ let (path, origin) = match &view.key {+ DiffKey::Commit { hash, path } => (+ path.clone(),+ format!("Commit {}", hash.get(..8).unwrap_or(hash)),+ ),+ DiffKey::Work(file) => (+ file.path.clone(),+ match file.area {+ Area::Staged => "Staged changes".to_owned(),+ Area::Unstaged => "Unstaged changes".to_owned(),+ Area::Untracked => "New file".to_owned(),+ Area::Conflicted => "Conflicted".to_owned(),+ },+ ),+ };+ egui::Frame::new()+ .fill(t.chrome)+ .inner_margin(egui::Margin::symmetric(10, 6))+ .stroke(Stroke::new(1.0, t.separator))+ .show(ui, |ui| {+ ui.horizontal(|ui| {+ icons::inline(ui, "file-diff", 16.0, t.icon);+ ui.label(egui::RichText::new(&path).font(theme::medium(13.0)));+ widgets::chip(ui, &origin, t.text_dim);+ ui.with_layout(egui::Layout::right_to_left(egui::Align::Center), |ui| {+ if icons::small_button(ui, "x", "Close (Esc)").clicked() {+ acts.push(Action::CloseDiff);+ }+ if let DiffKey::Work(file) = &view.key {+ let (label, args): (&str, Vec<&str>) = match file.area {+ Area::Staged => {+ ("Unstage file", unstage_args(&self.refs.head, &file.path))+ }+ Area::Conflicted => {+ ("Mark resolved", vec!["add", "--", &file.path])+ }+ _ => ("Stage file", vec!["add", "--", &file.path]),+ };+ if ui.add_enabled(idle, egui::Button::new(label)).clicked() {+ acts.push(Action::Ops {+ label: label.to_owned(),+ ops: ops(&[&args]),+ refresh: Refresh::Status,+ });+ }+ }+ });+ });+ });++ let lines = match &view.lines {+ None => {+ ui.centered_and_justified(|ui| ui.spinner());+ return;+ }+ Some(Err(e)) => {+ ui.add_space(12.0);+ ui.horizontal(|ui| {+ ui.add_space(12.0);+ ui.colored_label(t.danger, e);+ });+ return;+ }+ Some(Ok(lines)) => lines,+ };+ if lines.is_empty() {+ ui.centered_and_justified(|ui| {+ ui.label(egui::RichText::new("No textual changes").color(t.text_dim));+ });+ return;+ }++ let font = theme::mono(12.0);+ let char_w = ui+ .painter()+ .layout_no_wrap("M".to_owned(), font.clone(), t.text)+ .size()+ .x;+ let longest = lines+ .iter()+ .map(|l| l.text.chars().count())+ .max()+ .unwrap_or(0);+ let content_w = NUM_W * 2.0 + 24.0 + longest as f32 * char_w + 24.0;++ ui.spacing_mut().item_spacing.y = 0.0;+ egui::ScrollArea::both()+ .id_salt(("diff_scroll", &path))+ .auto_shrink(false)+ .show_rows(ui, LINE_H, lines.len(), |ui, range| {+ let width = content_w.max(ui.available_width());+ for line in lines.get(range).unwrap_or_default() {+ let (rect, _) = ui.allocate_exact_size(vec2(width, LINE_H), Sense::hover());+ let p = ui.painter();+ let (bg, fg) = match line.kind {+ Kind::Add => (Some(t.diff_add_bg), t.text),+ Kind::Del => (Some(t.diff_del_bg), t.text),+ Kind::Hunk => (Some(t.accent.gamma_multiply(0.12)), t.accent),+ Kind::Meta => (None, t.text_faint),+ Kind::Context => (None, t.text_dim),+ };+ if let Some(bg) = bg {+ p.rect_filled(rect, 0.0, bg);+ }+ let y = rect.center().y;+ let gutter = Rect::from_min_size(rect.min, vec2(NUM_W * 2.0, LINE_H));+ p.rect_filled(gutter, 0.0, t.card.gamma_multiply(0.6));+ for (n, x) in [+ (line.old, rect.left() + NUM_W - 8.0),+ (line.new, rect.left() + NUM_W * 2.0 - 8.0),+ ] {+ if let Some(n) = n {+ p.text(+ pos2(x, y),+ Align2::RIGHT_CENTER,+ n.to_string(),+ theme::mono(11.0),+ t.text_faint,+ );+ }+ }+ let marker = match line.kind {+ Kind::Add => "+",+ Kind::Del => "−",+ _ => "",+ };+ let mark_color = if line.kind == Kind::Add {+ t.success+ } else {+ t.danger+ };+ p.text(+ pos2(rect.left() + NUM_W * 2.0 + 8.0, y),+ Align2::LEFT_CENTER,+ marker,+ font.clone(),+ mark_color,+ );+ p.text(+ pos2(rect.left() + NUM_W * 2.0 + 24.0, y),+ Align2::LEFT_CENTER,+ &line.text,+ font.clone(),+ fg,+ );+ }+ });+ }+}++/// `git restore --staged`, or `git rm --cached` before the first commit (no HEAD to restore from).+pub(super) fn unstage_args<'a>(head: &str, path: &'a str) -> Vec<&'a str> {+ if head.is_empty() {+ vec!["rm", "--cached", "-q", "--", path]+ } else {+ vec!["restore", "--staged", "--", path]+ }+}++#[cfg(test)]+mod tests {+ use super::*;++ #[test]+ fn numbers_follow_hunk_headers() {+ let text = "diff --git a/f b/f\nindex 1..2 100644\n--- a/f\n+++ b/f\n@@ -3,3 +3,4 @@ fn x\n a\n-b\n+c\n+d\n e\n\\ No newline at end of file\n";+ let lines = parse(text);+ let summary: Vec<_> = lines.iter().map(|l| (l.kind, l.old, l.new)).collect();+ assert_eq!(+ summary,+ vec![+ (Kind::Hunk, None, None),+ (Kind::Context, Some(3), Some(3)),+ (Kind::Del, Some(4), None),+ (Kind::Add, None, Some(4)),+ (Kind::Add, None, Some(5)),+ (Kind::Context, Some(5), Some(6)),+ (Kind::Meta, None, None),+ ]+ );+ assert_eq!(lines[3].text, "c");+ }++ #[test]+ fn combined_conflict_diff() {+ let text = "@@@ -1,1 -1,1 +1,5 @@@\n++<<<<<<< HEAD\n +ours\n same\n";+ let lines = parse(text);+ assert_eq!(lines[1].kind, Kind::Add);+ assert_eq!(lines[1].text, "<<<<<<< HEAD");+ assert_eq!(lines[3].kind, Kind::Context);+ assert_eq!(lines[3].old, None);+ }++ #[test]+ fn binary_notice() {+ let lines = parse("diff --git a/x b/x\nBinary files a/x and b/x differ\n");+ assert_eq!(lines, vec![meta("Binary files a/x and b/x differ")]);+ }+}diff --git a/src/repo/graph_view.rs b/src/repo/graph_view.rsnew file mode 100644index 0000000..9e76c46--- /dev/null+++ b/src/repo/graph_view.rs@@ -0,0 +1,551 @@+//! Central pane: the commit graph of every branch.++use egui::{+ Align2, Color32, CornerRadius, FontId, Key, Pos2, Rect, Response, Sense, Stroke, Ui,+ epaint::CubicBezierShape, pos2, vec2,+};++use super::{Action, Dialog, Refresh, RepoTab, WIP_HASH, ops};+use crate::git::Refs;+use crate::icons;+use crate::theme::{self, Tokens};++const ROW_H: f32 = 28.0;+const LANE_W: f32 = 16.0;+const MAX_LANES_SHOWN: usize = 24;+const AUTHOR_W: f32 = 150.0;+const DATE_W: f32 = 118.0;++impl RepoTab {+ pub(super) fn graph_view(&mut self, ui: &mut Ui, acts: &mut Vec<Action>) {+ let t = Tokens::get(ui.ctx());+ if let Some(err) = &self.load_error {+ ui.add_space(12.0);+ ui.horizontal(|ui| {+ ui.add_space(12.0);+ ui.colored_label(t.danger, err);+ });+ return;+ }+ if self.commits.is_empty() {+ ui.centered_and_justified(|ui| {+ if self.loading {+ ui.spinner();+ } else {+ ui.label(+ egui::RichText::new("This repository has no commits yet.")+ .color(t.text_dim),+ );+ }+ });+ return;+ }++ // Keyboard navigation (only when no text field has focus).+ if !ui.ctx().egui_wants_keyboard_input() && self.dialog.is_none() {+ let (up, down) =+ ui.input(|i| (i.key_pressed(Key::ArrowUp), i.key_pressed(Key::ArrowDown)));+ let current = self.selected.unwrap_or(0);+ let next = if up {+ Some(current.saturating_sub(1))+ } else if down {+ Some((current + 1).min(self.commits.len().saturating_sub(1)))+ } else {+ None+ };+ if let Some(next) = next {+ acts.push(Action::Select(next));+ self.scroll_to = Some(next);+ }+ }++ let lanes = self.graph.width.clamp(1, MAX_LANES_SHOWN);+ let graph_w = (lanes as f32 * LANE_W + 12.0).max(60.0);++ // Column headers.+ let (header, _) = ui.allocate_exact_size(vec2(ui.available_width(), 26.0), Sense::hover());+ {+ let p = ui.painter();+ p.rect_filled(header, 0.0, t.chrome);+ p.line_segment(+ [header.left_bottom(), header.right_bottom()],+ Stroke::new(1.0, t.separator),+ );+ let y = header.center().y;+ let font = theme::semibold(10.5);+ for (x, label) in [+ (header.left() + 10.0, "GRAPH"),+ (header.left() + graph_w + 6.0, "DESCRIPTION"),+ (header.right() - DATE_W - AUTHOR_W, "AUTHOR"),+ (header.right() - DATE_W, "DATE"),+ ] {+ p.text(+ pos2(x, y),+ Align2::LEFT_CENTER,+ label,+ font.clone(),+ t.text_faint,+ );+ }+ }++ let mut scroll = egui::ScrollArea::vertical()+ .id_salt("graph_scroll")+ .auto_shrink(false);+ let offset_id = ui.id().with("graph_offset");+ if let Some(row) = self.scroll_to.take() {+ let view_h = ui.available_height();+ let top = row as f32 * ROW_H;+ // Only scroll if the row is outside the visible part.+ let offset = ui.data(|d| d.get_temp::<f32>(offset_id)).unwrap_or(0.0);+ if top < offset || top + ROW_H > offset + view_h {+ scroll = scroll.vertical_scroll_offset((top - view_h / 2.0).max(0.0));+ }+ }++ // `show_rows` sizes rows as ROW_H + item spacing, so the spacing must be zero here.+ ui.spacing_mut().item_spacing.y = 0.0;+ let idle = self.busy_op.is_none();+ let out = scroll.show_rows(ui, ROW_H, self.commits.len(), |ui, range| {+ for i in range {+ let resp = self.commit_row(ui, i, graph_w, lanes);+ if resp.clicked() {+ acts.push(Action::Select(i));+ }+ let Some(commit) = self.commits.get(i) else {+ continue;+ };+ if commit.hash == WIP_HASH {+ resp.context_menu(|ui| {+ if ui+ .add_enabled(idle, egui::Button::new("Stage all changes"))+ .clicked()+ {+ acts.push(Action::Ops {+ label: "Stage all".into(),+ ops: ops(&[&["add", "-A"]]),+ refresh: Refresh::Status,+ });+ }+ });+ continue;+ }+ let hash = commit.hash.clone();+ let short = hash.get(..8).unwrap_or(&hash).to_owned();+ let summary = commit.summary.clone();+ let is_head = hash == self.refs.head;+ resp.context_menu(|ui| {+ if ui.button("Create branch here…").clicked() {+ acts.push(Action::Dialog(Dialog::create_branch(&hash, &short)));+ }+ if ui+ .add_enabled(+ idle && !is_head,+ egui::Button::new("Check out this commit (detached)"),+ )+ .clicked()+ {+ acts.push(Action::Checkout(hash.clone()));+ }+ ui.separator();+ if ui+ .add_enabled(+ idle && !is_head,+ egui::Button::new("Cherry-pick onto current branch"),+ )+ .clicked()+ {+ acts.push(Action::Ops {+ label: format!("Cherry-pick {short}"),+ ops: ops(&[&["cherry-pick", &hash]]),+ refresh: Refresh::All,+ });+ }+ if ui+ .add_enabled(idle, egui::Button::new("Revert commit"))+ .clicked()+ {+ acts.push(Action::Ops {+ label: format!("Revert {short}"),+ ops: ops(&[&["revert", "--no-edit", &hash]]),+ refresh: Refresh::All,+ });+ }+ ui.separator();+ if ui.button("Copy commit hash").clicked() {+ ui.ctx().copy_text(hash.clone());+ }+ if ui.button("Copy message").clicked() {+ ui.ctx().copy_text(summary.clone());+ }+ });+ }+ });+ ui.data_mut(|d| d.insert_temp(offset_id, out.state.offset.y));+ }++ fn commit_row(&self, ui: &mut Ui, i: usize, graph_w: f32, lanes: usize) -> Response {+ let t = Tokens::get(ui.ctx());+ let (rect, resp) =+ ui.allocate_exact_size(vec2(ui.available_width(), ROW_H), Sense::click());+ let Some(commit) = self.commits.get(i) else {+ return resp;+ };+ let painter = ui.painter_at(rect);+ let is_wip = commit.hash == WIP_HASH;++ if self.selected == Some(i) {+ painter.rect_filled(rect, 0.0, t.row_selected);+ } else if resp.hovered() {+ painter.rect_filled(rect, 0.0, t.hover);+ }++ // Graph.+ let row_color = self+ .graph+ .rows+ .get(i)+ .map(|r| t.lane(r.col))+ .unwrap_or(t.text_faint);+ if let Some(row) = self.graph.rows.get(i) {+ let gp = painter.with_clip_rect(+ rect.intersect(Rect::from_min_size(rect.min, vec2(graph_w, ROW_H))),+ );+ let x = |lane: usize| rect.left() + 6.0 + lane as f32 * LANE_W + LANE_W / 2.0;+ let (top, mid, bottom) = (rect.top(), rect.center().y, rect.bottom());+ let node = pos2(x(row.col), mid);+ let width = 2.0;++ for &lane in &row.through {+ if lane < lanes {+ gp.line_segment(+ [pos2(x(lane), top), pos2(x(lane), bottom)],+ Stroke::new(width, t.lane(lane)),+ );+ }+ }+ for &lane in &row.incoming {+ curve(&gp, pos2(x(lane), top), node, t.lane(lane), width);+ }+ for &lane in &row.outgoing {+ let color = if is_wip { t.text_faint } else { t.lane(lane) };+ curve(&gp, node, pos2(x(lane), bottom), color, width);+ }++ if is_wip {+ gp.circle_filled(node, 6.0, t.dock);+ gp.add(egui::Shape::dashed_line(+ &circle_points(node, 6.0, 16),+ Stroke::new(1.5, t.text_dim),+ 2.5,+ 2.0,+ ));+ } else if commit.parents.len() > 1 {+ gp.circle_filled(node, 3.5, row_color);+ } else {+ gp.circle_filled(node, 6.0, row_color);+ if commit.hash == self.refs.head {+ gp.circle_filled(node, 2.5, t.dock);+ }+ }+ }++ let mid = rect.center().y;+ let mut x = rect.left() + graph_w + 6.0;+ let text_right = rect.right() - DATE_W - AUTHOR_W - 10.0;++ if is_wip {+ let font = theme::medium(12.5);+ let r = painter.text(+ pos2(x, mid),+ Align2::LEFT_CENTER,+ "Uncommitted changes",+ font,+ t.text,+ );+ x = r.right() + 10.0;+ let conflicts = if self.work.conflicted.len() == 1 {+ "conflict"+ } else {+ "conflicts"+ };+ for (n, label, color) in [+ (self.work.conflicted.len(), conflicts, t.danger),+ (self.work.staged.len(), "staged", t.success),+ (self.work.unstaged.len(), "unstaged", t.warning),+ ] {+ if n > 0 {+ x += pill(&painter, pos2(x, mid), &format!("{n} {label}"), color) + 6.0;+ }+ }+ return resp;+ }++ // Ref badges, then the summary.+ for badge in badges(&commit.refs, &self.refs) {+ if x > text_right - 40.0 {+ break;+ }+ x += ref_badge(ui, &painter, pos2(x, mid), &badge, row_color, &t) + 4.0;+ }+ painter+ .with_clip_rect(Rect::from_min_max(+ pos2(x, rect.top()),+ pos2(text_right, rect.bottom()),+ ))+ .text(+ pos2(x + 2.0, mid),+ Align2::LEFT_CENTER,+ &commit.summary,+ FontId::proportional(12.5),+ t.text,+ );++ let small = FontId::proportional(11.5);+ let author_clip = Rect::from_min_max(+ pos2(rect.right() - DATE_W - AUTHOR_W, rect.top()),+ pos2(rect.right() - DATE_W - 8.0, rect.bottom()),+ );+ painter.with_clip_rect(author_clip).text(+ pos2(author_clip.left(), mid),+ Align2::LEFT_CENTER,+ &commit.author,+ small.clone(),+ t.text_dim,+ );+ painter.text(+ pos2(rect.right() - DATE_W, mid),+ Align2::LEFT_CENTER,+ &commit.date,+ theme::mono(11.0),+ t.text_faint,+ );+ resp+ }+}++/// One ref badge in the graph.+struct Badge {+ label: String,+ kind: BadgeKind,+ /// The local branch is checked out.+ head: bool,+ /// A local branch whose remote counterpart points at the same commit.+ synced: bool,+}++#[derive(PartialEq)]+enum BadgeKind {+ Local,+ Remote,+ Tag,+ DetachedHead,+}++/// Turns `git log --format=%D` decorations into badges, folding `origin/x` into `x` when both+/// point at the same commit.+fn badges(decorations: &[String], refs: &Refs) -> Vec<Badge> {+ let is_remote = |d: &str| {+ refs.remotes.iter().any(|(remote, _)| {+ d.strip_prefix(remote.as_str())+ .is_some_and(|r| r.starts_with('/'))+ })+ };+ let mut out = Vec::new();+ let locals: Vec<&str> = decorations+ .iter()+ .filter_map(|d| {+ let d = d.strip_prefix("HEAD -> ").unwrap_or(d);+ (!d.starts_with("tag: ") && d != "HEAD" && !is_remote(d)).then_some(d)+ })+ .collect();+ for d in decorations {+ // `origin/HEAD` only says which branch the remote defaults to.+ if is_remote(d) && d.ends_with("/HEAD") {+ continue;+ }+ if let Some(branch) = d.strip_prefix("HEAD -> ") {+ out.push(Badge {+ label: branch.to_owned(),+ kind: BadgeKind::Local,+ head: true,+ synced: false,+ });+ } else if d == "HEAD" {+ out.push(Badge {+ label: "HEAD".to_owned(),+ kind: BadgeKind::DetachedHead,+ head: true,+ synced: false,+ });+ } else if let Some(tag) = d.strip_prefix("tag: ") {+ out.push(Badge {+ label: tag.to_owned(),+ kind: BadgeKind::Tag,+ head: false,+ synced: false,+ });+ } else if is_remote(d) {+ let short = d.split_once('/').map(|(_, b)| b).unwrap_or(d);+ if !locals.contains(&short) {+ out.push(Badge {+ label: d.clone(),+ kind: BadgeKind::Remote,+ head: false,+ synced: false,+ });+ }+ } else {+ out.push(Badge {+ label: d.clone(),+ kind: BadgeKind::Local,+ head: false,+ synced: false,+ });+ }+ }+ // Mark locals whose remote twin was folded in.+ for badge in &mut out {+ if badge.kind == BadgeKind::Local {+ badge.synced = decorations.iter().any(|d| {+ is_remote(d) && d.split_once('/').map(|(_, b)| b) == Some(badge.label.as_str())+ });+ }+ }+ // Checked-out branch first.+ out.sort_by_key(|b| !b.head);+ out+}++/// Paints a badge at `left_center`; returns its width.+fn ref_badge(+ ui: &Ui,+ painter: &egui::Painter,+ left_center: Pos2,+ badge: &Badge,+ lane: Color32,+ t: &Tokens,+) -> f32 {+ let (fill, text) = match badge.kind {+ BadgeKind::Local => (lane, Color32::from_rgb(16, 16, 16)),+ BadgeKind::Remote => (lane.gamma_multiply(0.25), t.text),+ BadgeKind::Tag => (t.field, t.text),+ BadgeKind::DetachedHead => (t.warning, Color32::from_rgb(16, 16, 16)),+ };+ let icon = match badge.kind {+ _ if badge.head => Some("check"),+ BadgeKind::Tag => Some("tag"),+ BadgeKind::Remote => Some("cloud"),+ _ => None,+ };+ let font = theme::medium(11.0);+ let galley = painter.layout_no_wrap(badge.label.clone(), font, text);+ let icon_w = if icon.is_some() { 14.0 } else { 0.0 };+ let synced_w = if badge.synced { 16.0 } else { 0.0 };+ let w = galley.size().x + 12.0 + icon_w + synced_w;+ let r = Rect::from_min_size(pos2(left_center.x, left_center.y - 9.0), vec2(w, 18.0));+ painter.rect_filled(r, CornerRadius::same(t.radius as u8), fill);+ if badge.kind == BadgeKind::Tag {+ painter.rect_stroke(+ r,+ CornerRadius::same(t.radius as u8),+ Stroke::new(1.0, t.field_border),+ egui::StrokeKind::Inside,+ );+ }+ let mut x = r.left() + 6.0;+ if let Some(icon) = icon {+ icons::paint(+ ui,+ Rect::from_center_size(pos2(x + 5.0, r.center().y), vec2(12.0, 12.0)),+ icon,+ 11.0,+ text,+ );+ x += icon_w;+ }+ let gw = galley.size().x;+ painter.galley(pos2(x, r.center().y - galley.size().y / 2.0), galley, text);+ if badge.synced {+ icons::paint(+ ui,+ Rect::from_center_size(pos2(x + gw + 9.0, r.center().y), vec2(12.0, 12.0)),+ "cloud",+ 11.0,+ text,+ );+ }+ w+}++/// A small rounded count label; returns its width.+fn pill(painter: &egui::Painter, left_center: Pos2, text: &str, color: Color32) -> f32 {+ let galley = painter.layout_no_wrap(text.to_owned(), theme::medium(11.0), color);+ let w = galley.size().x + 12.0;+ let r = Rect::from_min_size(pos2(left_center.x, left_center.y - 9.0), vec2(w, 18.0));+ painter.rect_filled(r, CornerRadius::same(9), color.gamma_multiply(0.18));+ painter.galley(+ pos2(r.left() + 6.0, r.center().y - galley.size().y / 2.0),+ galley,+ color,+ );+ w+}++fn circle_points(center: Pos2, radius: f32, n: usize) -> Vec<Pos2> {+ (0..=n)+ .map(|i| {+ let a = i as f32 / n as f32 * std::f32::consts::TAU;+ center + vec2(a.cos(), a.sin()) * radius+ })+ .collect()+}++fn curve(p: &egui::Painter, from: Pos2, to: Pos2, color: Color32, width: f32) {+ if (from.x - to.x).abs() < 0.5 {+ p.line_segment([from, to], Stroke::new(width, color));+ } else {+ let midy = (from.y + to.y) / 2.0;+ p.add(CubicBezierShape::from_points_stroke(+ [from, pos2(from.x, midy), pos2(to.x, midy), to],+ false,+ Color32::TRANSPARENT,+ Stroke::new(width, color),+ ));+ }+}++#[cfg(test)]+mod tests {+ use super::*;++ fn refs_with_origin() -> Refs {+ Refs {+ remotes: vec![("origin".to_owned(), Vec::new())],+ ..Refs::default()+ }+ }++ #[test]+ fn remote_twin_folds_into_local_badge() {+ let decos = [+ "HEAD -> main",+ "origin/main",+ "origin/HEAD",+ "origin/dev",+ "tag: v1",+ ]+ .map(String::from);+ let b = badges(&decos, &refs_with_origin());+ let labels: Vec<&str> = b.iter().map(|b| b.label.as_str()).collect();+ assert_eq!(labels, vec!["main", "origin/dev", "v1"]);+ assert!(b[0].head && b[0].synced);+ }++ #[test]+ fn local_branch_with_slash_is_not_remote() {+ let decos = ["feature/x".to_owned()];+ let b = badges(&decos, &refs_with_origin());+ assert!(b[0].kind == BadgeKind::Local && !b[0].synced);+ }+}diff --git a/src/repo/mod.rs b/src/repo/mod.rsnew file mode 100644index 0000000..cd7c97b--- /dev/null+++ b/src/repo/mod.rs@@ -0,0 +1,774 @@+//! One open repository: its state, background git work and the view+//! (branches on the left, commit graph or diff in the middle, commit detail / changes on the right).++mod detail;+mod dialogs;+mod diff;+mod graph_view;+mod sidebar;+pub(crate) mod widgets;++use std::collections::HashMap;+use std::path::PathBuf;+use std::sync::mpsc::{Receiver, Sender, channel};++use egui::{Key, Ui};++use crate::git::{self, Commit, CommitDetail, InProgress, Refs, StatusFile, WorkStatus};+use crate::graph::{self, Graph};+use crate::icons;+use crate::theme::Tokens;++pub use dialogs::Dialog;+use diff::DiffLine;++/// Hash of the pseudo-commit that stands for uncommitted changes at the top of the graph.+pub(crate) const WIP_HASH: &str = "\u{0}wip";++/// Results coming back from background git calls.+enum Msg {+ Loaded(Result<Box<Loaded>, String>),+ Status(Result<WorkStatus, String>),+ Detail(String, Result<CommitDetail, String>),+ Diff(DiffKey, Result<String, String>),+ OpDone {+ label: String,+ result: Result<String, String>,+ refresh: Refresh,+ },+}++struct Loaded {+ refs: Refs,+ history: Vec<Commit>,+ work: WorkStatus,+}++/// What to re-read after an operation.+#[derive(Clone, Copy, Debug, PartialEq, Eq)]+pub(crate) enum Refresh {+ /// Only the working tree (staging changes nothing else).+ Status,+ All,+}++/// Which diff the central area shows.+#[derive(Clone, Debug, PartialEq, Eq)]+pub(crate) enum DiffKey {+ Commit { hash: String, path: String },+ Work(StatusFile),+}++pub(crate) struct DiffView {+ key: DiffKey,+ lines: Option<Result<Vec<DiffLine>, String>>,+}++/// Everything the views ask for; applied after drawing so views only borrow the state.+pub(crate) enum Action {+ Select(usize),+ SelectHash(String),+ OpenDiff(DiffKey),+ CloseDiff,+ Ops {+ label: String,+ ops: Vec<Vec<String>>,+ refresh: Refresh,+ },+ Checkout(String),+ CheckoutRemote(String),+ Dialog(Dialog),+ Commit,+ Fetch,+ Pull,+ Push,+ Reload,+}++pub struct RepoTab {+ pub path: PathBuf,+ pub name: String,+ tx: Sender<Msg>,+ rx: Receiver<Msg>,++ loading: bool,+ load_error: Option<String>,+ refs: Refs,+ /// Commits as git listed them.+ history: Vec<Commit>,+ work: WorkStatus,+ /// Rows of the graph: the WIP pseudo-commit (when the tree is dirty) followed by `history`.+ commits: Vec<Commit>,+ graph: Graph,+ index: HashMap<String, usize>,++ selected: Option<usize>,+ scroll_to: Option<usize>,+ detail: Option<CommitDetail>,+ detail_error: Option<String>,+ diff: Option<DiffView>,++ commit_summary: String,+ commit_body: String,+ dialog: Option<Dialog>,++ busy_op: Option<String>,+ status: Option<(String, bool)>,+ branch_filter: String,+ /// Jump to the changes row on the next rebuild (after an operation left conflicts).+ focus_wip: bool,+}++impl RepoTab {+ pub fn new(path: PathBuf, ctx: &egui::Context) -> Self {+ let name = path+ .file_name()+ .map(|n| n.to_string_lossy().into_owned())+ .unwrap_or_else(|| path.display().to_string());+ let (tx, rx) = channel();+ let mut tab = Self {+ path,+ name,+ tx,+ rx,+ loading: false,+ load_error: None,+ refs: Refs::default(),+ history: Vec::new(),+ work: WorkStatus::default(),+ commits: Vec::new(),+ graph: Graph {+ rows: Vec::new(),+ width: 0,+ },+ index: HashMap::new(),+ selected: None,+ scroll_to: None,+ detail: None,+ detail_error: None,+ diff: None,+ commit_summary: String::new(),+ commit_body: String::new(),+ dialog: None,+ busy_op: None,+ status: None,+ branch_filter: String::new(),+ focus_wip: false,+ };+ tab.reload(ctx);+ tab+ }++ pub fn is_busy(&self) -> bool {+ self.loading || self.busy_op.is_some()+ }++ /// Re-reads refs, history and working-tree status in the background.+ pub fn reload(&mut self, ctx: &egui::Context) {+ if self.loading {+ return;+ }+ self.loading = true;+ let path = self.path.clone();+ spawn(&self.tx, ctx, move || {+ Msg::Loaded((|| {+ let refs = git::refs(&path)?;+ let history = git::log(&path)?;+ let work = git::status(&path)?;+ Ok(Box::new(Loaded {+ refs,+ history,+ work,+ }))+ })())+ });+ }++ fn reload_status(&mut self, ctx: &egui::Context) {+ let path = self.path.clone();+ spawn(&self.tx, ctx, move || Msg::Status(git::status(&path)));+ }++ fn is_wip(&self, row: usize) -> bool {+ self.commits.get(row).is_some_and(|c| c.hash == WIP_HASH)+ }++ fn selected_hash(&self) -> Option<String> {+ self.selected+ .and_then(|r| self.commits.get(r))+ .map(|c| c.hash.clone())+ }++ /// Rebuilds the graph rows from `history` and `work`, keeping the selection.+ fn rebuild(&mut self, ctx: &egui::Context) {+ let previous = self.selected_hash();+ self.commits.clear();+ if !self.work.is_clean() {+ self.commits.push(Commit {+ hash: WIP_HASH.to_owned(),+ parents: if self.refs.head.is_empty() {+ Vec::new()+ } else {+ vec![self.refs.head.clone()]+ },+ author: String::new(),+ date: String::new(),+ summary: String::new(),+ refs: Vec::new(),+ });+ }+ self.commits.extend(self.history.iter().cloned());+ self.graph = graph::layout(&self.commits);+ self.index = self+ .commits+ .iter()+ .enumerate()+ .map(|(i, c)| (c.hash.clone(), i))+ .collect();++ // Keep the selection; otherwise start on the changes, or HEAD.+ let mut keep = previous.as_ref().and_then(|h| self.index.get(h).copied());+ if std::mem::take(&mut self.focus_wip) && self.index.contains_key(WIP_HASH) {+ keep = None;+ }+ let target = keep+ .or_else(|| self.index.get(WIP_HASH).copied())+ .or_else(|| self.index.get(&self.refs.head).copied());+ match target {+ Some(row) if keep == Some(row) => self.selected = Some(row),+ Some(row) => {+ self.selected = None;+ self.select(row, ctx);+ self.scroll_to = Some(row);+ }+ None => {+ self.selected = None;+ self.detail = None;+ }+ }++ // A merge or cherry-pick leaves a message to commit with.+ if let Some(msg) = &self.work.prepared_message+ && self.commit_summary.is_empty()+ && self.commit_body.is_empty()+ {+ let (summary, body) = msg.split_once('\n').unwrap_or((msg.as_str(), ""));+ self.commit_summary = summary.trim().to_owned();+ self.commit_body = body.trim().to_owned();+ }++ // The diff of a file that's no longer listed (staged, committed…) is stale.+ if let Some(DiffView {+ key: DiffKey::Work(file),+ ..+ }) = &self.diff+ {+ let still = self+ .work+ .staged+ .iter()+ .chain(&self.work.unstaged)+ .chain(&self.work.conflicted)+ .any(|f| f == file);+ if still {+ let key = DiffKey::Work(file.clone());+ self.diff = None;+ self.open_diff(key, ctx);+ } else {+ self.diff = None;+ }+ }+ }++ fn select(&mut self, row: usize, ctx: &egui::Context) {+ let Some(commit) = self.commits.get(row) else {+ return;+ };+ if self.selected == Some(row) {+ return;+ }+ self.selected = Some(row);+ self.detail = None;+ self.detail_error = None;+ if matches!(+ self.diff,+ Some(DiffView {+ key: DiffKey::Commit { .. },+ ..+ })+ ) || !self.is_wip(row)+ {+ self.diff = None;+ }+ if commit.hash == WIP_HASH {+ return;+ }+ let path = self.path.clone();+ let hash = commit.hash.clone();+ spawn(&self.tx, ctx, move || {+ let detail = git::commit_detail(&path, &hash);+ Msg::Detail(hash, detail)+ });+ }++ fn select_hash(&mut self, hash: &str, ctx: &egui::Context) {+ match self.index.get(hash).copied() {+ Some(row) => {+ self.select(row, ctx);+ self.scroll_to = Some(row);+ }+ None => {+ self.status = Some((+ format!(+ "Commit {} is not in the loaded history",+ hash.get(..8).unwrap_or(hash)+ ),+ true,+ ));+ }+ }+ }++ /// Shows a diff in the central area; asking for the open one closes it.+ fn open_diff(&mut self, key: DiffKey, ctx: &egui::Context) {+ if self.diff.as_ref().is_some_and(|d| d.key == key) {+ self.diff = None;+ return;+ }+ self.diff = Some(DiffView {+ key: key.clone(),+ lines: None,+ });+ let path = self.path.clone();+ spawn(&self.tx, ctx, move || {+ let result = match &key {+ DiffKey::Commit { hash, path: file } => git::file_diff(&path, hash, file),+ DiffKey::Work(file) => git::work_diff(&path, file),+ };+ Msg::Diff(key, result)+ });+ }++ /// Runs git commands one after another (stopping at the first failure), then refreshes.+ fn run_ops(+ &mut self,+ label: &str,+ ops: Vec<Vec<String>>,+ refresh: Refresh,+ ctx: &egui::Context,+ ) {+ if self.busy_op.is_some() {+ return;+ }+ self.busy_op = Some(label.to_owned());+ self.status = None;+ let path = self.path.clone();+ let label = label.to_owned();+ spawn(&self.tx, ctx, move || {+ let mut result = Ok(String::new());+ for op in &ops {+ let args: Vec<&str> = op.iter().map(String::as_str).collect();+ result = git::run(Some(&path), &args);+ if result.is_err() {+ break;+ }+ }+ Msg::OpDone {+ label,+ result,+ refresh,+ }+ });+ }++ fn checkout_remote(&mut self, remote_branch: &str, ctx: &egui::Context) {+ // `origin/feature` → local `feature` tracking it (or just switch if it exists).+ let local = remote_branch+ .split_once('/')+ .map(|(_, b)| b)+ .unwrap_or(remote_branch);+ let op = if self.refs.local.iter().any(|b| b.name == local) {+ ops(&[&["checkout", local]])+ } else {+ ops(&[&["checkout", "--track", remote_branch]])+ };+ self.run_ops(&format!("Checkout {local}"), op, Refresh::All, ctx);+ }++ fn push(&mut self, ctx: &egui::Context) {+ let Some(current) = self.refs.current.clone() else {+ self.status = Some(("Push needs a checked-out branch".to_owned(), true));+ return;+ };+ let has_upstream = self+ .refs+ .local+ .iter()+ .any(|b| b.name == current && !b.upstream.is_empty() && !b.upstream_gone());+ if has_upstream {+ self.run_ops("Push", ops(&[&["push"]]), Refresh::All, ctx);+ return;+ }+ // First push of a branch: publish it and track the remote one.+ let remote = self+ .refs+ .remotes+ .iter()+ .map(|(r, _)| r.as_str())+ .find(|r| *r == "origin")+ .or_else(|| self.refs.remotes.first().map(|(r, _)| r.as_str()))+ .map(str::to_owned);+ match remote {+ Some(remote) => self.run_ops(+ &format!("Push {current} to {remote}"),+ ops(&[&["push", "-u", &remote, ¤t]]),+ Refresh::All,+ ctx,+ ),+ None => {+ self.status = Some(("This repository has no remote to push to".to_owned(), true))+ }+ }+ }++ fn commit(&mut self, ctx: &egui::Context) {+ let summary = self.commit_summary.trim();+ if summary.is_empty() {+ self.status = Some(("Write a commit summary first".to_owned(), true));+ return;+ }+ if !self.work.conflicted.is_empty() {+ self.status = Some(("Resolve the conflicted files first".to_owned(), true));+ return;+ }+ let mut commit = vec!["commit".to_owned(), "-m".to_owned(), summary.to_owned()];+ let body = self.commit_body.trim();+ if !body.is_empty() {+ commit.extend(["-m".to_owned(), body.to_owned()]);+ }+ // Nothing staged: commit everything, like "Stage all and commit".+ let mut steps = Vec::new();+ if self.work.staged.is_empty() {+ steps.push(vec!["add".to_owned(), "-A".to_owned()]);+ }+ steps.push(commit);+ self.run_ops("Commit", steps, Refresh::All, ctx);+ }++ /// Drains finished background work.+ pub fn poll(&mut self, ctx: &egui::Context) {+ while let Ok(msg) = self.rx.try_recv() {+ match msg {+ Msg::Loaded(result) => {+ self.loading = false;+ match result {+ Ok(loaded) => {+ self.load_error = None;+ self.refs = loaded.refs;+ self.history = loaded.history;+ self.work = loaded.work;+ self.rebuild(ctx);+ }+ Err(e) => self.load_error = Some(e),+ }+ }+ Msg::Status(result) => match result {+ Ok(work) => {+ self.work = work;+ self.rebuild(ctx);+ }+ Err(e) => self.status = Some((e, true)),+ },+ Msg::Detail(hash, result) => {+ if self.selected_hash().as_deref() == Some(hash.as_str()) {+ match result {+ Ok(d) => self.detail = Some(d),+ Err(e) => self.detail_error = Some(e),+ }+ }+ }+ Msg::Diff(key, result) => {+ if let Some(view) = &mut self.diff+ && view.key == key+ {+ view.lines = Some(result.map(|text| diff::parse(&text)));+ }+ }+ Msg::OpDone {+ label,+ result,+ refresh,+ } => {+ self.busy_op = None;+ match result {+ Ok(_) => {+ if label == "Commit" {+ self.commit_summary.clear();+ self.commit_body.clear();+ }+ // Quiet success for staging, which happens all the time.+ if refresh == Refresh::All {+ self.status = Some((format!("{label}: done"), false));+ }+ }+ Err(e) => {+ self.focus_wip = e.contains("CONFLICT");+ self.status = Some((format!("{label} failed: {e}"), true));+ }+ }+ match refresh {+ Refresh::Status => self.reload_status(ctx),+ Refresh::All => self.reload(ctx),+ }+ }+ }+ }+ }++ fn apply(&mut self, action: Action, ctx: &egui::Context) {+ match action {+ Action::Select(row) => self.select(row, ctx),+ Action::SelectHash(hash) => self.select_hash(&hash, ctx),+ Action::OpenDiff(key) => self.open_diff(key, ctx),+ Action::CloseDiff => self.diff = None,+ Action::Ops {+ label,+ ops,+ refresh,+ } => self.run_ops(&label, ops, refresh, ctx),+ Action::Checkout(name) => self.run_ops(+ &format!("Checkout {name}"),+ ops(&[&["checkout", &name]]),+ Refresh::All,+ ctx,+ ),+ Action::CheckoutRemote(name) => self.checkout_remote(&name, ctx),+ Action::Dialog(dialog) => self.dialog = Some(dialog),+ Action::Commit => self.commit(ctx),+ Action::Fetch => self.run_ops(+ "Fetch",+ ops(&[&["fetch", "--all", "--prune"]]),+ Refresh::All,+ ctx,+ ),+ Action::Pull => self.run_ops("Pull", ops(&[&["pull", "--ff-only"]]), Refresh::All, ctx),+ Action::Push => self.push(ctx),+ Action::Reload => self.reload(ctx),+ }+ }++ pub fn ui(&mut self, ui: &mut Ui) {+ let ctx = ui.ctx().clone();+ self.poll(&ctx);+ let t = Tokens::get(&ctx);+ let mut acts = Vec::new();++ if self.diff.is_some()+ && self.dialog.is_none()+ && !ctx.egui_wants_keyboard_input()+ && ctx.input(|i| i.key_pressed(Key::Escape))+ {+ acts.push(Action::CloseDiff);+ }++ egui::Panel::top("repo_toolbar")+ .frame(+ egui::Frame::new()+ .fill(t.chrome)+ .inner_margin(egui::Margin::symmetric(8, 4))+ .stroke(egui::Stroke::new(1.0, t.separator)),+ )+ .show(ui, |ui| self.toolbar(ui, &mut acts));+ let side = egui::Frame::new().fill(t.card);+ egui::Panel::left("repo_branches")+ .resizable(true)+ .default_size(260.0)+ .size_range(170.0..=520.0)+ .frame(side)+ .show(ui, |ui| self.sidebar(ui, &mut acts));+ egui::Panel::right("repo_detail")+ .resizable(true)+ .default_size(420.0)+ .size_range(280.0..=900.0)+ .frame(side)+ .show(ui, |ui| self.detail_panel(ui, &mut acts));+ egui::CentralPanel::default()+ .frame(egui::Frame::new().fill(t.dock))+ .show(ui, |ui| {+ if self.diff.is_some() {+ self.diff_view(ui, &mut acts);+ } else {+ self.graph_view(ui, &mut acts);+ }+ });++ self.dialogs(&ctx, &mut acts);+ for action in acts {+ self.apply(action, &ctx);+ }+ }++ fn toolbar(&mut self, ui: &mut Ui, acts: &mut Vec<Action>) {+ let t = Tokens::get(ui.ctx());+ ui.horizontal(|ui| {+ ui.spacing_mut().item_spacing.x = 2.0;+ let idle = self.busy_op.is_none();+ let has_remote = !self.refs.remotes.is_empty();+ if icons::tool_button(ui, "cloud-download", "Fetch", idle && has_remote)+ .on_hover_text("Fetch all remotes (git fetch --all --prune)")+ .clicked()+ {+ acts.push(Action::Fetch);+ }+ if icons::tool_button(ui, "arrow-down-to-line", "Pull", idle && has_remote)+ .on_hover_text("Fast-forward the current branch (git pull --ff-only)")+ .clicked()+ {+ acts.push(Action::Pull);+ }+ if icons::tool_button(ui, "arrow-up-from-line", "Push", idle && has_remote)+ .on_hover_text("Push the current branch (publishes it if it has no upstream yet)")+ .clicked()+ {+ acts.push(Action::Push);+ }+ widgets::toolbar_separator(ui);+ let head = self.refs.head.clone();+ if icons::tool_button(ui, "git-branch-plus", "Branch", idle && !head.is_empty())+ .on_hover_text("Create a branch at HEAD")+ .clicked()+ {+ acts.push(Action::Dialog(Dialog::create_branch(&head, "HEAD")));+ }+ widgets::toolbar_separator(ui);+ if icons::tool_button(ui, "refresh-cw", "", !self.loading)+ .on_hover_text("Reload (F5)")+ .clicked()+ {+ acts.push(Action::Reload);+ }+ widgets::toolbar_separator(ui);++ match &self.refs.current {+ Some(branch) => {+ icons::inline(ui, "git-branch", 14.0, t.text_dim);+ ui.label(egui::RichText::new(branch).font(crate::theme::medium(12.5)));+ }+ None if self.refs.head.is_empty() => {+ ui.label(egui::RichText::new("No commits yet").color(t.text_dim));+ }+ None => {+ ui.label(+ egui::RichText::new(format!(+ "Detached HEAD at {}",+ self.refs.head.get(..8).unwrap_or(&self.refs.head)+ ))+ .color(t.warning),+ );+ }+ }++ if let Some(state) = self.work.in_progress {+ ui.add_space(10.0);+ widgets::chip(ui, &format!("{} in progress", state.label()), t.warning);+ if ui+ .add_enabled(+ idle,+ egui::Button::new(format!("Abort {}", state.label().to_lowercase())),+ )+ .clicked()+ {+ acts.push(abort_action(state));+ }+ }++ ui.with_layout(egui::Layout::right_to_left(egui::Align::Center), |ui| {+ if let Some((msg, is_err)) = &self.status {+ let color = if *is_err { t.danger } else { t.text_dim };+ let first_line = headline(msg);+ ui.add(+ egui::Label::new(egui::RichText::new(first_line).color(color)).truncate(),+ )+ .on_hover_text(msg.as_str());+ }+ if let Some(op) = &self.busy_op {+ ui.label(egui::RichText::new(format!("{op}…")).color(t.text_dim));+ ui.spinner();+ } else if self.loading {+ ui.spinner();+ }+ });+ });+ }+}++fn abort_action(state: InProgress) -> Action {+ Action::Ops {+ label: format!("Abort {}", state.label().to_lowercase()),+ ops: ops(&[&[state.command(), "--abort"]]),+ refresh: Refresh::All,+ }+}++/// The line of a git error worth showing in the toolbar: conflicts and `error:`/`fatal:` lines+/// beat progress chatter like "Auto-merging x".+fn headline(msg: &str) -> String {+ let (label, body) = msg.split_once(": ").unwrap_or(("", msg));+ let conflicts = body.lines().filter(|l| l.starts_with("CONFLICT")).count();+ if conflicts > 0 {+ let files = if conflicts == 1 { "file" } else { "files" };+ return format!("{label}: conflicts in {conflicts} {files}, resolve them in Changes");+ }+ let line = body+ .lines()+ .find(|l| l.starts_with("error:") || l.starts_with("fatal:"))+ .or_else(|| body.lines().find(|l| !l.trim().is_empty()))+ .unwrap_or_default();+ if label.is_empty() {+ line.to_owned()+ } else {+ format!("{label}: {line}")+ }+}++/// `&[&["checkout", "main"]]` → owned argument lists.+pub(crate) fn ops(list: &[&[&str]]) -> Vec<Vec<String>> {+ list.iter()+ .map(|args| args.iter().map(|a| (*a).to_owned()).collect())+ .collect()+}++/// Runs `job` on a background thread and wakes the UI when its message is sent.+fn spawn(tx: &Sender<Msg>, ctx: &egui::Context, job: impl FnOnce() -> Msg + Send + 'static) {+ let tx = tx.clone();+ let ctx = ctx.clone();+ std::thread::spawn(move || {+ let _ = tx.send(job());+ ctx.request_repaint();+ });+}+pub use widgets::primary_button;++#[cfg(test)]+mod tests {+ use super::headline;++ #[test]+ fn headline_prefers_conflicts_and_errors() {+ let merge = "Merge x failed: Auto-merging a.rs+CONFLICT (content): Merge conflict in a.rs+Automatic merge failed";+ assert_eq!(+ headline(merge),+ "Merge x failed: conflicts in 1 file, resolve them in Changes"+ );+ let push = "Push failed: To origin+ ! [rejected] main+error: failed to push some refs";+ assert_eq!(+ headline(push),+ "Push failed: error: failed to push some refs"+ );+ assert_eq!(headline("Fetch: done"), "Fetch: done");+ }+}diff --git a/src/repo/sidebar.rs b/src/repo/sidebar.rsnew file mode 100644index 0000000..1900ab2--- /dev/null+++ b/src/repo/sidebar.rs@@ -0,0 +1,274 @@+//! Left pane: local branches, remote branches per remote, tags.++use egui::{Align2, Rect, Response, Sense, Ui, pos2, vec2};++use super::widgets::{self, ROW_H};+use super::{Action, Dialog, Refresh, RepoTab, ops};+use crate::git::Branch;+use crate::icons;+use crate::theme::{self, Tokens};++impl RepoTab {+ pub(super) fn sidebar(&mut self, ui: &mut Ui, acts: &mut Vec<Action>) {+ let t = Tokens::get(ui.ctx());+ widgets::panel_header(ui, "Branches", |_| {});+ ui.add_space(6.0);+ ui.horizontal(|ui| {+ ui.add_space(8.0);+ icons::inline(ui, "search", 14.0, t.text_faint);+ ui.add(+ egui::TextEdit::singleline(&mut self.branch_filter)+ .hint_text("Filter")+ .desired_width(ui.available_width() - 8.0),+ );+ });+ ui.add_space(4.0);++ let filter = self.branch_filter.to_lowercase();+ let matches = |b: &&Branch| filter.is_empty() || b.name.to_lowercase().contains(&filter);+ let current = self.refs.current.clone();+ let idle = self.busy_op.is_none();++ egui::ScrollArea::vertical()+ .id_salt("branches")+ .auto_shrink(false)+ .show(ui, |ui| {+ ui.spacing_mut().item_spacing.y = 0.0;++ let local: Vec<&Branch> = self.refs.local.iter().filter(matches).collect();+ if widgets::section(ui, "local", "laptop", "LOCAL", local.len(), true) {+ for b in local {+ let (ahead, behind) = b.ahead_behind();+ let r = branch_row(ui, &b.name, b.is_head, ahead, behind, b.upstream_gone());+ let tip = match (b.upstream.is_empty(), b.upstream_gone()) {+ (true, _) => "Not tracking a remote branch".to_owned(),+ (false, true) => format!("{} was deleted on the remote", b.upstream),+ (false, false) => format!("Tracks {}", b.upstream),+ };+ let r = r.on_hover_text(format!("{tip}\nDouble-click to check out"));+ if r.double_clicked() && !b.is_head && idle {+ acts.push(Action::Checkout(b.name.clone()));+ } else if r.clicked() {+ acts.push(Action::SelectHash(b.target.clone()));+ }+ r.context_menu(|ui| {+ if ui.add_enabled(!b.is_head && idle, egui::Button::new("Check out")).clicked() {+ acts.push(Action::Checkout(b.name.clone()));+ }+ merge_item(ui, acts, &b.name, current.as_deref(), b.is_head || !idle);+ if ui.button("Create branch here…").clicked() {+ acts.push(Action::Dialog(Dialog::create_branch(&b.target, &b.name)));+ }+ ui.separator();+ if ui.button("Copy name").clicked() {+ ui.ctx().copy_text(b.name.clone());+ }+ ui.separator();+ if ui+ .add_enabled(!b.is_head && idle, egui::Button::new("Delete…"))+ .on_disabled_hover_text("Can't delete the checked-out branch")+ .clicked()+ {+ acts.push(Action::Dialog(Dialog::confirm(+ "Delete branch",+ format!("Delete the local branch “{}”?", b.name),+ "Delete",+ ops(&[&["branch", "-d", &b.name]]),+ Some((+ "Force, even if it isn't merged (-D)".to_owned(),+ ops(&[&["branch", "-D", &b.name]]),+ )),+ )));+ }+ });+ }+ }++ for (remote, branches) in &self.refs.remotes {+ let list: Vec<&Branch> = branches.iter().filter(matches).collect();+ let title = remote.to_uppercase();+ if widgets::section(ui, &format!("remote:{remote}"), "cloud", &title, list.len(), true) {+ for b in list {+ let short = b+ .name+ .strip_prefix(&format!("{remote}/"))+ .unwrap_or(&b.name);+ let r = branch_row(ui, short, false, 0, 0, false)+ .on_hover_text(format!("{}\nDouble-click to check out", b.name));+ if r.double_clicked() && idle {+ acts.push(Action::CheckoutRemote(b.name.clone()));+ } else if r.clicked() {+ acts.push(Action::SelectHash(b.target.clone()));+ }+ r.context_menu(|ui| {+ if ui.add_enabled(idle, egui::Button::new("Check out as local branch")).clicked() {+ acts.push(Action::CheckoutRemote(b.name.clone()));+ }+ merge_item(ui, acts, &b.name, current.as_deref(), !idle);+ if ui.button("Create branch here…").clicked() {+ acts.push(Action::Dialog(Dialog::create_branch(&b.target, &b.name)));+ }+ ui.separator();+ if ui.button("Copy name").clicked() {+ ui.ctx().copy_text(b.name.clone());+ }+ ui.separator();+ if ui.add_enabled(idle, egui::Button::new("Delete from remote…")).clicked() {+ acts.push(Action::Dialog(Dialog::confirm(+ "Delete remote branch",+ format!("Delete “{short}” from {remote}? This changes the remote for everyone."),+ "Delete",+ ops(&[&["push", remote, "--delete", short]]),+ None,+ )));+ }+ });+ }+ }+ }++ let tags: Vec<&Branch> = self.refs.tags.iter().filter(matches).collect();+ if !tags.is_empty() && widgets::section(ui, "tags", "tag", "TAGS", tags.len(), false) {+ for tag in tags {+ let r = plain_row(ui, &tag.name);+ if r.clicked() {+ acts.push(Action::SelectHash(tag.target.clone()));+ }+ r.context_menu(|ui| {+ if ui.button("Copy name").clicked() {+ ui.ctx().copy_text(tag.name.clone());+ }+ if ui.add_enabled(idle, egui::Button::new("Delete tag…")).clicked() {+ acts.push(Action::Dialog(Dialog::confirm(+ "Delete tag",+ format!("Delete the local tag “{}”?", tag.name),+ "Delete",+ ops(&[&["tag", "-d", &tag.name]]),+ None,+ )));+ }+ });+ }+ }+ });+ }+}++fn merge_item(+ ui: &mut Ui,+ acts: &mut Vec<Action>,+ branch: &str,+ current: Option<&str>,+ disabled: bool,+) {+ let Some(current) = current else { return };+ if ui+ .add_enabled(+ !disabled,+ egui::Button::new(format!("Merge into {current}")),+ )+ .clicked()+ {+ acts.push(Action::Ops {+ label: format!("Merge {branch} into {current}"),+ ops: ops(&[&["merge", "--no-edit", branch]]),+ refresh: Refresh::All,+ });+ }+}++/// A branch: icon (a check for the checked-out one), name, ahead/behind counts.+fn branch_row(+ ui: &mut Ui,+ name: &str,+ is_head: bool,+ ahead: u32,+ behind: u32,+ gone: bool,+) -> Response {+ let t = Tokens::get(ui.ctx());+ let (rect, resp) = ui.allocate_exact_size(vec2(ui.available_width(), ROW_H), Sense::click());+ let painter = ui.painter_at(rect);+ if is_head {+ painter.rect_filled(rect, 0.0, t.accent.gamma_multiply(0.14));+ }+ if resp.hovered() {+ painter.rect_filled(rect, 0.0, t.hover);+ }+ let y = rect.center().y;+ let icon_rect = Rect::from_center_size(pos2(rect.left() + 34.0, y), vec2(16.0, 16.0));+ if is_head {+ icons::paint(ui, icon_rect, "check", 14.0, t.accent);+ } else {+ icons::paint(ui, icon_rect, "git-branch", 13.0, t.text_faint);+ }++ let mut right = rect.right() - 8.0;+ let small = theme::mono(11.0);+ if gone {+ let r = painter.text(+ pos2(right, y),+ Align2::RIGHT_CENTER,+ "gone",+ theme::medium(10.5),+ t.text_faint,+ );+ right = r.left() - 6.0;+ }+ for (n, icon) in [(behind, "arrow-down"), (ahead, "arrow-up")] {+ if n > 0 {+ let r = painter.text(+ pos2(right, y),+ Align2::RIGHT_CENTER,+ n.to_string(),+ small.clone(),+ t.text_dim,+ );+ let ir = Rect::from_center_size(pos2(r.left() - 7.0, y), vec2(12.0, 12.0));+ icons::paint(ui, ir, icon, 11.0, t.text_dim);+ right = ir.left() - 6.0;+ }+ }+ let font = if is_head {+ theme::semibold(12.5)+ } else {+ egui::FontId::proportional(12.5)+ };+ painter+ .with_clip_rect(Rect::from_min_max(+ pos2(rect.left(), rect.top()),+ pos2(right, rect.bottom()),+ ))+ .text(+ pos2(rect.left() + 48.0, y),+ Align2::LEFT_CENTER,+ name,+ font,+ t.text,+ );+ resp+}++fn plain_row(ui: &mut Ui, name: &str) -> Response {+ let t = Tokens::get(ui.ctx());+ let (rect, resp) = ui.allocate_exact_size(vec2(ui.available_width(), ROW_H), Sense::click());+ if resp.hovered() {+ ui.painter().rect_filled(rect, 0.0, t.hover);+ }+ let y = rect.center().y;+ icons::paint(+ ui,+ Rect::from_center_size(pos2(rect.left() + 34.0, y), vec2(16.0, 16.0)),+ "tag",+ 13.0,+ t.text_faint,+ );+ ui.painter_at(rect).text(+ pos2(rect.left() + 48.0, y),+ Align2::LEFT_CENTER,+ name,+ egui::FontId::proportional(12.5),+ t.text,+ );+ resp+}diff --git a/src/repo/widgets.rs b/src/repo/widgets.rsnew file mode 100644index 0000000..c96d6d7--- /dev/null+++ b/src/repo/widgets.rs@@ -0,0 +1,308 @@+//! Small painted widgets shared by the repository panes.++use egui::{Align2, Color32, CornerRadius, Rect, Response, Sense, Ui, pos2, vec2};++use crate::icons;+use crate::theme::{self, Tokens};++pub const ROW_H: f32 = 24.0;++pub fn toolbar_separator(ui: &mut Ui) {+ let t = Tokens::get(ui.ctx());+ ui.add_space(4.0);+ let (rect, _) = ui.allocate_exact_size(vec2(1.0, 20.0), Sense::hover());+ ui.painter().rect_filled(rect, 0.0, t.separator);+ ui.add_space(4.0);+}++/// A rounded label with a tinted background.+pub fn chip(ui: &mut Ui, text: &str, color: Color32) -> Response {+ let font = theme::medium(11.0);+ let galley = ui.painter().layout_no_wrap(text.to_owned(), font, color);+ let size = vec2(galley.size().x + 12.0, 18.0);+ let (rect, resp) = ui.allocate_exact_size(size, Sense::hover());+ ui.painter()+ .rect_filled(rect, CornerRadius::same(9), color.gamma_multiply(0.18));+ ui.painter().galley(+ pos2(rect.left() + 6.0, rect.center().y - galley.size().y / 2.0),+ galley,+ color,+ );+ resp+}++/// The strip at the top of a side panel, like PhotoCraft's panel tab strips: a tab with the+/// title, and room on the right for buttons.+pub fn panel_header(ui: &mut Ui, title: &str, add_buttons: impl FnOnce(&mut Ui)) {+ let t = Tokens::get(ui.ctx());+ let (rect, _) = ui.allocate_exact_size(vec2(ui.available_width(), 30.0), Sense::hover());+ let painter = ui.painter();+ painter.rect_filled(rect, 0.0, t.tab_strip);+ let font = theme::semibold(11.5);+ let galley = painter.layout_no_wrap(title.to_owned(), font, t.text);+ let tab = Rect::from_min_size(+ pos2(rect.left() + 4.0, rect.top() + 4.0),+ vec2(galley.size().x + 24.0, rect.height() - 4.0),+ );+ painter.rect_filled(+ tab,+ CornerRadius {+ nw: t.radius as u8,+ ne: t.radius as u8,+ sw: 0,+ se: 0,+ },+ t.card,+ );+ painter.galley(+ pos2(tab.left() + 12.0, tab.center().y - galley.size().y / 2.0),+ galley,+ t.text,+ );+ let buttons = Rect::from_min_max(+ pos2(tab.right() + 4.0, rect.top()),+ rect.max - vec2(6.0, 0.0),+ );+ let mut child = ui.new_child(+ egui::UiBuilder::new()+ .max_rect(buttons)+ .layout(egui::Layout::right_to_left(egui::Align::Center)),+ );+ add_buttons(&mut child);+}++/// A collapsible section header (`▸ ICON TITLE count`). Returns whether it is open.+pub fn section(+ ui: &mut Ui,+ id: &str,+ icon: &str,+ title: &str,+ count: usize,+ default_open: bool,+) -> bool {+ let t = Tokens::get(ui.ctx());+ let id = ui.id().with(("section", id));+ let mut open = ui.data(|d| d.get_temp::<bool>(id)).unwrap_or(default_open);+ let (rect, resp) = ui.allocate_exact_size(vec2(ui.available_width(), 26.0), Sense::click());+ if resp.clicked() {+ open = !open;+ ui.data_mut(|d| d.insert_temp(id, open));+ }+ let painter = ui.painter();+ if resp.hovered() {+ painter.rect_filled(rect, 0.0, t.hover);+ }+ let y = rect.center().y;+ let chevron = if open {+ "chevron-down"+ } else {+ "chevron-right"+ };+ icons::paint(+ ui,+ Rect::from_center_size(pos2(rect.left() + 14.0, y), vec2(14.0, 14.0)),+ chevron,+ 12.0,+ t.text_faint,+ );+ icons::paint(+ ui,+ Rect::from_center_size(pos2(rect.left() + 32.0, y), vec2(14.0, 14.0)),+ icon,+ 14.0,+ t.icon,+ );+ painter.text(+ pos2(rect.left() + 46.0, y),+ Align2::LEFT_CENTER,+ title,+ theme::semibold(11.5),+ t.text_dim,+ );+ painter.text(+ pos2(rect.right() - 10.0, y),+ Align2::RIGHT_CENTER,+ count.to_string(),+ theme::medium(11.0),+ t.text_faint,+ );+ open+}++pub fn status_color(t: &Tokens, code: char) -> Color32 {+ match code {+ 'A' | '?' => t.success,+ 'D' => t.danger,+ 'R' | 'C' => t.accent,+ 'U' => t.danger,+ _ => t.warning,+ }+}++/// What a file row shows on its right edge.+pub enum RowExtra<'a> {+ /// `+added −removed` (`None` for binary files).+ Stats(Option<u32>, Option<u32>),+ /// Icon buttons shown while the row is hovered: `(icon, tooltip)`.+ Buttons(&'a [(&'a str, &'a str)]),+}++pub struct FileRowResponse {+ pub row: Response,+ /// Index of the clicked hover button.+ pub button: Option<usize>,+}++/// One changed file: status letter, file name, its folder dimmed, and `extra` on the right.+pub fn file_row(+ ui: &mut Ui,+ code: char,+ path: &str,+ old_path: Option<&str>,+ selected: bool,+ extra: RowExtra<'_>,+) -> FileRowResponse {+ let t = Tokens::get(ui.ctx());+ let (rect, row) = ui.allocate_exact_size(vec2(ui.available_width(), ROW_H), Sense::click());+ let hovered = ui.rect_contains_pointer(rect);+ let painter = ui.painter_at(rect);+ if selected {+ painter.rect_filled(rect, 0.0, t.row_selected);+ } else if hovered {+ painter.rect_filled(rect, 0.0, t.hover);+ }+ let y = rect.center().y;++ // Status letter in a small rounded square.+ let color = status_color(&t, code);+ let badge = Rect::from_center_size(pos2(rect.left() + 18.0, y), vec2(16.0, 16.0));+ painter.rect_filled(badge, CornerRadius::same(3), color.gamma_multiply(0.22));+ let letter = if code == '?' { 'A' } else { code };+ painter.text(+ badge.center(),+ Align2::CENTER_CENTER,+ letter.to_string(),+ theme::semibold(10.5),+ color,+ );++ // Right edge first, so the name is clipped before it.+ let mut right = rect.right() - 8.0;+ let mut button = None;+ match extra {+ RowExtra::Stats(added, removed) => {+ let small = theme::mono(11.0);+ match (added, removed) {+ (Some(a), Some(d)) => {+ let r = painter.text(+ pos2(right, y),+ Align2::RIGHT_CENTER,+ format!("−{d}"),+ small.clone(),+ t.danger,+ );+ right = r.left() - 6.0;+ let r = painter.text(+ pos2(right, y),+ Align2::RIGHT_CENTER,+ format!("+{a}"),+ small,+ t.success,+ );+ right = r.left() - 8.0;+ }+ _ => {+ let r = painter.text(+ pos2(right, y),+ Align2::RIGHT_CENTER,+ "bin",+ small,+ t.text_faint,+ );+ right = r.left() - 8.0;+ }+ }+ }+ RowExtra::Buttons(buttons) => {+ if hovered || selected {+ for (i, (icon, tooltip)) in buttons.iter().enumerate().rev() {+ let r = Rect::from_center_size(pos2(right - 10.0, y), vec2(20.0, 20.0));+ let resp = ui+ .interact(r, row.id.with(("btn", i)), Sense::click())+ .on_hover_text(*tooltip);+ if resp.hovered() {+ painter.rect_filled(r, t.radius_sm, t.pressed);+ }+ icons::paint(+ ui,+ r,+ icon,+ 14.0,+ if resp.hovered() { t.text } else { t.icon },+ );+ if resp.clicked() {+ button = Some(i);+ }+ right = r.left() - 2.0;+ }+ }+ }+ }++ let (dir, name) = match path.rsplit_once('/') {+ Some((dir, name)) => (dir, name),+ None => ("", path),+ };+ let text_clip = Rect::from_min_max(+ pos2(rect.left() + 32.0, rect.top()),+ pos2(right, rect.bottom()),+ );+ let tp = painter.with_clip_rect(text_clip);+ let name_rect = tp.text(+ pos2(text_clip.left(), y),+ Align2::LEFT_CENTER,+ name,+ egui::FontId::proportional(12.5),+ t.text,+ );+ let mut faint = String::new();+ if let Some(old) = old_path {+ faint.push_str("← ");+ faint.push_str(old);+ faint.push_str(" ");+ }+ faint.push_str(dir);+ if !faint.is_empty() {+ tp.text(+ pos2(name_rect.right() + 8.0, y),+ Align2::LEFT_CENTER,+ faint,+ egui::FontId::proportional(11.5),+ t.text_faint,+ );+ }+ // The full path only adds something when the row shows it cut short.+ let row = match old_path {+ Some(old) => row.on_hover_text(format!("{old} → {path}")),+ None if !dir.is_empty() => row.on_hover_text(path),+ None => row,+ };+ FileRowResponse { row, button }+}++/// A primary (accent-filled) button.+pub fn primary_button(ui: &mut Ui, text: &str, enabled: bool, width: f32) -> Response {+ let t = Tokens::get(ui.ctx());+ let fill = if enabled { t.accent } else { t.hover };+ let text_color = if enabled { t.accent_text } else { t.text_faint };+ ui.add_enabled(+ enabled,+ egui::Button::new(+ egui::RichText::new(text)+ .color(text_color)+ .font(theme::medium(12.5)),+ )+ .fill(fill)+ .min_size(vec2(width, 30.0)),+ )+}diff --git a/src/theme.rs b/src/theme.rsnew file mode 100644index 0000000..86846f8--- /dev/null+++ b/src/theme.rs@@ -0,0 +1,328 @@+//! Design tokens, modelled on PhotoCraft's "Pro" themes: flat grey panels, a darker tab strip,+//! a blue accent, Inter for the UI and JetBrains Mono for hashes and diffs.+//!+//! Widgets read [`Tokens::get`] instead of hard-coding colours, so every theme applies everywhere.++use std::sync::Arc;++use egui::{+ Color32, CornerRadius, FontData, FontDefinitions, FontFamily, FontId, Stroke, TextStyle,+ Visuals,+};+use serde::{Deserialize, Serialize};++#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Serialize, Deserialize)]+pub enum ThemeKind {+ /// Charcoal panels (PhotoCraft's "Pro (Dark)").+ #[default]+ Dark,+ /// Mid-grey panels (PhotoCraft's default "Pro (Medium Gray)").+ MediumGray,+ /// Light panels (PhotoCraft's "Pro (Light)").+ Light,+}++impl ThemeKind {+ pub const ALL: [ThemeKind; 3] = [ThemeKind::Dark, ThemeKind::MediumGray, ThemeKind::Light];++ pub fn label(self) -> &'static str {+ match self {+ ThemeKind::Dark => "Dark",+ ThemeKind::MediumGray => "Medium Gray",+ ThemeKind::Light => "Light",+ }+ }+}++#[derive(Clone, Copy, Debug, PartialEq)]+pub struct Tokens {+ pub kind: ThemeKind,+ /// Toolbars and the active tab.+ pub chrome: Color32,+ /// Behind panels (the graph area).+ pub dock: Color32,+ /// Side panels.+ pub card: Color32,+ /// Inputs and code blocks.+ pub field: Color32,+ pub field_border: Color32,+ pub hover: Color32,+ pub pressed: Color32,+ pub text: Color32,+ pub text_dim: Color32,+ pub text_faint: Color32,+ pub icon: Color32,+ pub accent: Color32,+ pub accent_text: Color32,+ pub separator: Color32,+ pub shadow: Color32,+ pub danger: Color32,+ pub warning: Color32,+ pub success: Color32,+ /// Window tab strip and panel headers.+ pub tab_strip: Color32,+ pub row_selected: Color32,+ pub diff_add_bg: Color32,+ pub diff_del_bg: Color32,+ pub radius_sm: f32,+ pub radius: f32,+ pub radius_lg: f32,+}++impl Tokens {+ pub fn for_kind(kind: ThemeKind) -> Self {+ match kind {+ ThemeKind::Dark => Tokens {+ kind,+ chrome: Color32::from_rgb(50, 50, 50),+ dock: Color32::from_rgb(40, 40, 40),+ card: Color32::from_rgb(50, 50, 50),+ field: Color32::from_rgb(36, 36, 36),+ field_border: Color32::from_rgb(74, 74, 74),+ hover: Color32::from_rgb(66, 66, 66),+ pressed: Color32::from_rgb(78, 78, 78),+ text: Color32::from_rgb(222, 222, 222),+ text_dim: Color32::from_rgb(178, 178, 178),+ text_faint: Color32::from_rgb(128, 128, 128),+ icon: Color32::from_rgb(200, 200, 200),+ accent: Color32::from_rgb(55, 142, 240),+ accent_text: Color32::WHITE,+ separator: Color32::from_rgb(30, 30, 30),+ shadow: Color32::from_black_alpha(150),+ danger: Color32::from_rgb(236, 91, 98),+ warning: Color32::from_rgb(232, 176, 70),+ success: Color32::from_rgb(92, 196, 122),+ tab_strip: Color32::from_rgb(38, 38, 38),+ row_selected: Color32::from_rgb(38, 76, 122),+ diff_add_bg: Color32::from_rgba_unmultiplied(92, 196, 122, 34),+ diff_del_bg: Color32::from_rgba_unmultiplied(236, 91, 98, 34),+ radius_sm: 3.0,+ radius: 4.0,+ radius_lg: 6.0,+ },+ ThemeKind::MediumGray => Tokens {+ kind,+ chrome: Color32::from_rgb(83, 83, 83),+ dock: Color32::from_rgb(66, 66, 66),+ card: Color32::from_rgb(83, 83, 83),+ field: Color32::from_rgb(69, 69, 69),+ field_border: Color32::from_rgb(104, 104, 104),+ hover: Color32::from_rgb(98, 98, 98),+ pressed: Color32::from_rgb(112, 112, 112),+ text: Color32::from_rgb(238, 238, 238),+ text_dim: Color32::from_rgb(212, 212, 212),+ text_faint: Color32::from_rgb(160, 160, 160),+ icon: Color32::from_rgb(226, 226, 226),+ separator: Color32::from_rgb(62, 62, 62),+ tab_strip: Color32::from_rgb(74, 74, 74),+ row_selected: Color32::from_rgb(52, 98, 150),+ ..Tokens::for_kind(ThemeKind::Dark)+ },+ ThemeKind::Light => Tokens {+ kind,+ chrome: Color32::from_rgb(240, 240, 240),+ dock: Color32::from_rgb(250, 250, 250),+ card: Color32::from_rgb(240, 240, 240),+ field: Color32::WHITE,+ field_border: Color32::from_rgb(186, 186, 186),+ hover: Color32::from_rgb(226, 226, 226),+ pressed: Color32::from_rgb(206, 206, 206),+ text: Color32::from_rgb(20, 20, 20),+ text_dim: Color32::from_rgb(64, 64, 64),+ text_faint: Color32::from_rgb(120, 120, 120),+ icon: Color32::from_rgb(46, 46, 46),+ accent: Color32::from_rgb(16, 110, 220),+ accent_text: Color32::WHITE,+ separator: Color32::from_rgb(214, 214, 214),+ shadow: Color32::from_black_alpha(50),+ danger: Color32::from_rgb(200, 50, 60),+ warning: Color32::from_rgb(180, 120, 10),+ success: Color32::from_rgb(30, 140, 70),+ tab_strip: Color32::from_rgb(226, 226, 226),+ row_selected: Color32::from_rgb(198, 220, 246),+ diff_add_bg: Color32::from_rgba_unmultiplied(30, 160, 70, 40),+ diff_del_bg: Color32::from_rgba_unmultiplied(220, 50, 60, 36),+ ..Tokens::for_kind(ThemeKind::Dark)+ },+ }+ }++ pub fn dark(&self) -> bool {+ self.kind != ThemeKind::Light+ }++ pub fn get(ctx: &egui::Context) -> Tokens {+ ctx.data(|d| d.get_temp::<Tokens>(tokens_id()))+ .unwrap_or_else(|| Tokens::for_kind(ThemeKind::default()))+ }++ /// Colour of a graph lane; lanes keep their colour for their whole life.+ pub fn lane(&self, lane: usize) -> Color32 {+ const DARK: [Color32; 10] = [+ Color32::from_rgb(64, 156, 255),+ Color32::from_rgb(255, 120, 80),+ Color32::from_rgb(90, 200, 120),+ Color32::from_rgb(200, 110, 230),+ Color32::from_rgb(250, 200, 60),+ Color32::from_rgb(60, 205, 210),+ Color32::from_rgb(240, 90, 150),+ Color32::from_rgb(160, 200, 70),+ Color32::from_rgb(150, 140, 255),+ Color32::from_rgb(230, 150, 70),+ ];+ const LIGHT: [Color32; 10] = [+ Color32::from_rgb(20, 110, 220),+ Color32::from_rgb(220, 80, 40),+ Color32::from_rgb(30, 150, 70),+ Color32::from_rgb(150, 60, 190),+ Color32::from_rgb(200, 140, 0),+ Color32::from_rgb(0, 150, 160),+ Color32::from_rgb(200, 40, 110),+ Color32::from_rgb(110, 150, 20),+ Color32::from_rgb(90, 80, 220),+ Color32::from_rgb(190, 100, 20),+ ];+ let set = if self.dark() { &DARK } else { &LIGHT };+ set[lane % set.len()]+ }+}++fn tokens_id() -> egui::Id {+ egui::Id::new("gitcraft-theme")+}++pub fn semibold(size: f32) -> FontId {+ FontId::new(size, FontFamily::Name("semibold".into()))+}++pub fn medium(size: f32) -> FontId {+ FontId::new(size, FontFamily::Name("medium".into()))+}++pub fn mono(size: f32) -> FontId {+ FontId::monospace(size)+}++/// Inter and JetBrains Mono first; egui's default fonts stay last for symbols Inter lacks.+pub fn install_fonts(ctx: &egui::Context) {+ let mut fonts = FontDefinitions::default();+ let mut add = |name: &str, bytes: &'static [u8]| {+ fonts+ .font_data+ .insert(name.to_owned(), Arc::new(FontData::from_static(bytes)));+ };+ add("Inter", include_bytes!("../assets/fonts/Inter-Regular.ttf"));+ add(+ "Inter-Medium",+ include_bytes!("../assets/fonts/Inter-Medium.ttf"),+ );+ add(+ "Inter-SemiBold",+ include_bytes!("../assets/fonts/Inter-SemiBold.ttf"),+ );+ add(+ "JetBrainsMono",+ include_bytes!("../assets/fonts/JetBrainsMono-Regular.ttf"),+ );+ let proportional = fonts.families.entry(FontFamily::Proportional).or_default();+ proportional.insert(0, "Inter".to_owned());+ let fallback = proportional.clone();+ fonts+ .families+ .entry(FontFamily::Monospace)+ .or_default()+ .insert(0, "JetBrainsMono".to_owned());+ for (family, primary) in [("medium", "Inter-Medium"), ("semibold", "Inter-SemiBold")] {+ let mut stack = vec![primary.to_owned()];+ stack.extend(fallback.iter().cloned());+ fonts+ .families+ .insert(FontFamily::Name(family.into()), stack);+ }+ ctx.set_fonts(fonts);+}++pub fn apply(ctx: &egui::Context, kind: ThemeKind) {+ let t = Tokens::for_kind(kind);+ ctx.data_mut(|d| d.insert_temp(tokens_id(), t));+ let mut v = if t.dark() {+ Visuals::dark()+ } else {+ Visuals::light()+ };+ v.panel_fill = t.chrome;+ v.window_fill = t.card;+ v.window_stroke = Stroke::new(1.0, t.field_border);+ v.extreme_bg_color = t.field;+ v.faint_bg_color = t.card;+ v.code_bg_color = t.field;+ v.override_text_color = Some(t.text);+ v.hyperlink_color = t.accent;+ v.warn_fg_color = t.warning;+ v.error_fg_color = t.danger;+ v.window_corner_radius = CornerRadius::same(t.radius_lg as u8);+ v.menu_corner_radius = CornerRadius::same(t.radius as u8);+ v.window_shadow = egui::Shadow {+ offset: [0, 10],+ blur: 32,+ spread: 0,+ color: t.shadow,+ };+ v.popup_shadow = egui::Shadow {+ offset: [0, 6],+ blur: 20,+ spread: 0,+ color: t.shadow,+ };+ v.selection.bg_fill = t.accent;+ v.selection.stroke = Stroke::new(1.0, t.accent_text);+ v.striped = false;+ let r = CornerRadius::same(t.radius_sm as u8);+ let w = &mut v.widgets;+ w.noninteractive.bg_fill = t.card;+ w.noninteractive.weak_bg_fill = t.card;+ w.noninteractive.bg_stroke = Stroke::new(1.0, t.separator);+ w.noninteractive.fg_stroke = Stroke::new(1.0, t.text_dim);+ w.noninteractive.corner_radius = r;+ for (wv, bg, stroke) in [+ (&mut w.inactive, t.field, t.field_border),+ (&mut w.hovered, t.hover, t.field_border),+ (&mut w.active, t.pressed, t.accent),+ (&mut w.open, t.hover, t.field_border),+ ] {+ wv.bg_fill = bg;+ wv.weak_bg_fill = bg;+ wv.bg_stroke = Stroke::new(1.0, stroke);+ wv.fg_stroke = Stroke::new(1.0, t.text);+ wv.corner_radius = r;+ wv.expansion = 0.0;+ }+ ctx.set_visuals(v);+ ctx.global_style_mut(|s| {+ s.text_styles = [+ (TextStyle::Small, FontId::proportional(10.5)),+ (TextStyle::Body, FontId::proportional(12.5)),+ (TextStyle::Button, FontId::proportional(12.5)),+ (TextStyle::Heading, semibold(15.0)),+ (TextStyle::Monospace, FontId::monospace(12.0)),+ ]+ .into();+ s.spacing.item_spacing = egui::vec2(8.0, 6.0);+ s.spacing.button_padding = egui::vec2(10.0, 4.0);+ s.spacing.interact_size = egui::vec2(24.0, 24.0);+ s.spacing.menu_margin = egui::Margin::same(6);+ s.spacing.window_margin = egui::Margin::same(16);+ s.spacing.icon_width = 14.0;+ s.visuals.indent_has_left_vline = false;+ let mut scroll = egui::style::ScrollStyle::thin();+ scroll.interact_handle_opacity = 1.0;+ scroll.interact_background_opacity = 0.4;+ scroll.floating_width = 4.0;+ s.spacing.scroll = scroll;+ s.spacing.tooltip_width = 320.0;+ });+ // egui picks its style branch from the OS appearance; both branches get our palette.+ let style = ctx.global_style();+ ctx.set_style_of(egui::Theme::Light, Arc::clone(&style));+ ctx.set_style_of(egui::Theme::Dark, style);+}