diff --git a/Cargo.lock b/Cargo.lock index 2b0759e..0a47b49 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -322,6 +322,7 @@ dependencies = [ "gpui-component", "log", "rust-embed", + "serde_json", ] [[package]] @@ -1218,7 +1219,7 @@ checksum = "f79398230a6e2c08f5c9760610eb6924b52aa9e7950a619602baba59dcbbdbb2" dependencies = [ "bitflags 2.13.1", "block", - "cocoa-foundation 0.2.0", + "cocoa-foundation 0.2.1", "core-foundation 0.10.1", "core-graphics 0.24.0", "foreign-types", @@ -1242,15 +1243,14 @@ dependencies = [ [[package]] name = "cocoa-foundation" -version = "0.2.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e14045fb83be07b5acf1c0884b2180461635b433455fa35d1cd6f17f1450679d" +checksum = "81411967c50ee9a1fc11365f8c585f863a22a9697c89239c452292c40ba79b0d" dependencies = [ "bitflags 2.13.1", "block", "core-foundation 0.10.1", "core-graphics-types 0.2.0", - "libc", "objc", ] @@ -1268,7 +1268,7 @@ dependencies = [ [[package]] name = "collections" version = "0.1.0" -source = "git+https://github.com/zed-industries/zed#4c7244790a075e862eeb4e5ccc12d6c8f5da6f7e" +source = "git+https://github.com/zed-industries/zed#1b04e4caf01e376624fb514ef85b0e6d8ee5d930" dependencies = [ "gpui_util", "indexmap", @@ -1734,7 +1734,7 @@ dependencies = [ [[package]] name = "derive_refineable" version = "0.1.0" -source = "git+https://github.com/zed-industries/zed#4c7244790a075e862eeb4e5ccc12d6c8f5da6f7e" +source = "git+https://github.com/zed-industries/zed#1b04e4caf01e376624fb514ef85b0e6d8ee5d930" dependencies = [ "proc-macro2", "quote", @@ -3494,7 +3494,7 @@ dependencies = [ [[package]] name = "gpui" version = "0.2.2" -source = "git+https://github.com/zed-industries/zed#4c7244790a075e862eeb4e5ccc12d6c8f5da6f7e" +source = "git+https://github.com/zed-industries/zed#1b04e4caf01e376624fb514ef85b0e6d8ee5d930" dependencies = [ "accesskit", "anyhow", @@ -3503,22 +3503,13 @@ dependencies = [ "backtrace", "bindgen", "bitflags 2.13.1", - "block", - "cbindgen", "chrono", - "cocoa 0.26.0", - "cocoa-foundation 0.2.0", "collections", - "core-foundation 0.10.1", - "core-foundation-sys", - "core-graphics 0.24.0", - "core-text", "core-video", "ctor", "derive_more", "embed-resource", "etagere", - "foreign-types", "futures", "futures-concurrency", "getrandom 0.3.4", @@ -3533,14 +3524,9 @@ dependencies = [ "itertools 0.14.0", "log", "lyon", - "mach2", - "media", - "metal", "num_cpus", - "objc", "parking", "parking_lot", - "pathfinder_geometry", "pin-project", "pollster 0.4.0", "postage", @@ -3581,7 +3567,7 @@ dependencies = [ [[package]] name = "gpui-base" version = "0.5.2" -source = "git+https://github.com/longbridge/gpui-component#9e3a29dcbdebc318632bf68203f26c33e9f0e902" +source = "git+https://github.com/longbridge/gpui-component#270cf3ce8cf6f4cdac28db5c30dd92631849ed6e" dependencies = [ "aho-corasick", "anyhow", @@ -3613,7 +3599,7 @@ dependencies = [ [[package]] name = "gpui-component" version = "0.5.2" -source = "git+https://github.com/longbridge/gpui-component#9e3a29dcbdebc318632bf68203f26c33e9f0e902" +source = "git+https://github.com/longbridge/gpui-component#270cf3ce8cf6f4cdac28db5c30dd92631849ed6e" dependencies = [ "anyhow", "chrono", @@ -3693,7 +3679,7 @@ dependencies = [ [[package]] name = "gpui-component-assets" version = "0.5.1" -source = "git+https://github.com/longbridge/gpui-component#9e3a29dcbdebc318632bf68203f26c33e9f0e902" +source = "git+https://github.com/longbridge/gpui-component#270cf3ce8cf6f4cdac28db5c30dd92631849ed6e" dependencies = [ "anyhow", "gpui", @@ -3707,7 +3693,7 @@ dependencies = [ [[package]] name = "gpui-component-macros" version = "0.5.1" -source = "git+https://github.com/longbridge/gpui-component#9e3a29dcbdebc318632bf68203f26c33e9f0e902" +source = "git+https://github.com/longbridge/gpui-component#270cf3ce8cf6f4cdac28db5c30dd92631849ed6e" dependencies = [ "proc-macro2", "quote", @@ -3717,7 +3703,7 @@ dependencies = [ [[package]] name = "gpui_apple" version = "0.1.0" -source = "git+https://github.com/zed-industries/zed#4c7244790a075e862eeb4e5ccc12d6c8f5da6f7e" +source = "git+https://github.com/zed-industries/zed#1b04e4caf01e376624fb514ef85b0e6d8ee5d930" dependencies = [ "anyhow", "block", @@ -3740,7 +3726,7 @@ dependencies = [ [[package]] name = "gpui_linux" version = "0.1.0" -source = "git+https://github.com/zed-industries/zed#4c7244790a075e862eeb4e5ccc12d6c8f5da6f7e" +source = "git+https://github.com/zed-industries/zed#1b04e4caf01e376624fb514ef85b0e6d8ee5d930" dependencies = [ "accesskit", "accesskit_unix", @@ -3758,22 +3744,16 @@ dependencies = [ "gpui_util", "gpui_wgpu", "http_client", - "image", - "itertools 0.14.0", "libc", "log", "notify-rust", "oo7", "open", "parking_lot", - "pathfinder_geometry", - "pollster 0.4.0", - "profiling", "raw-window-handle", "smallvec", "smol", "strum", - "swash", "url", "uuid", "wayland-backend", @@ -3792,7 +3772,7 @@ dependencies = [ [[package]] name = "gpui_macos" version = "0.1.0" -source = "git+https://github.com/zed-industries/zed#4c7244790a075e862eeb4e5ccc12d6c8f5da6f7e" +source = "git+https://github.com/zed-industries/zed#1b04e4caf01e376624fb514ef85b0e6d8ee5d930" dependencies = [ "accesskit", "accesskit_macos", @@ -3838,7 +3818,7 @@ dependencies = [ [[package]] name = "gpui_macros" version = "0.1.0" -source = "git+https://github.com/zed-industries/zed#4c7244790a075e862eeb4e5ccc12d6c8f5da6f7e" +source = "git+https://github.com/zed-industries/zed#1b04e4caf01e376624fb514ef85b0e6d8ee5d930" dependencies = [ "heck 0.5.0", "proc-macro2", @@ -3849,7 +3829,7 @@ dependencies = [ [[package]] name = "gpui_platform" version = "0.1.0" -source = "git+https://github.com/zed-industries/zed#4c7244790a075e862eeb4e5ccc12d6c8f5da6f7e" +source = "git+https://github.com/zed-industries/zed#1b04e4caf01e376624fb514ef85b0e6d8ee5d930" dependencies = [ "console_error_panic_hook", "gpui", @@ -3862,7 +3842,7 @@ dependencies = [ [[package]] name = "gpui_shared_string" version = "0.1.0" -source = "git+https://github.com/zed-industries/zed#4c7244790a075e862eeb4e5ccc12d6c8f5da6f7e" +source = "git+https://github.com/zed-industries/zed#1b04e4caf01e376624fb514ef85b0e6d8ee5d930" dependencies = [ "schemars", "serde", @@ -3872,7 +3852,7 @@ dependencies = [ [[package]] name = "gpui_util" version = "0.1.0" -source = "git+https://github.com/zed-industries/zed#4c7244790a075e862eeb4e5ccc12d6c8f5da6f7e" +source = "git+https://github.com/zed-industries/zed#1b04e4caf01e376624fb514ef85b0e6d8ee5d930" dependencies = [ "anyhow", "log", @@ -3882,7 +3862,7 @@ dependencies = [ [[package]] name = "gpui_web" version = "0.1.0" -source = "git+https://github.com/zed-industries/zed#4c7244790a075e862eeb4e5ccc12d6c8f5da6f7e" +source = "git+https://github.com/zed-industries/zed#1b04e4caf01e376624fb514ef85b0e6d8ee5d930" dependencies = [ "anyhow", "console_error_panic_hook", @@ -3906,7 +3886,7 @@ dependencies = [ [[package]] name = "gpui_wgpu" version = "0.1.0" -source = "git+https://github.com/zed-industries/zed#4c7244790a075e862eeb4e5ccc12d6c8f5da6f7e" +source = "git+https://github.com/zed-industries/zed#1b04e4caf01e376624fb514ef85b0e6d8ee5d930" dependencies = [ "anyhow", "bytemuck", @@ -3916,18 +3896,14 @@ dependencies = [ "gpui", "gpui_util", "itertools 0.14.0", - "js-sys", "log", "parking_lot", - "pollster 0.4.0", "profiling", "raw-window-handle", "smallvec", "swash", "unicode-bidi", "unicode-segmentation", - "wasm-bindgen", - "wasm-bindgen-futures", "web-sys", "wgpu", "zed-font-kit", @@ -3936,7 +3912,7 @@ dependencies = [ [[package]] name = "gpui_windows" version = "0.1.0" -source = "git+https://github.com/zed-industries/zed#4c7244790a075e862eeb4e5ccc12d6c8f5da6f7e" +source = "git+https://github.com/zed-industries/zed#1b04e4caf01e376624fb514ef85b0e6d8ee5d930" dependencies = [ "accesskit", "accesskit_windows", @@ -3973,9 +3949,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.4.16" +version = "0.4.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9f37a958b41b3b19ee2707c06439c0e9e547e847223eb791ecb0cb821c65e27" +checksum = "9f877e75f39e9827ec50a572dd592684ac28c029578726c85f1b2aa6ab807449" dependencies = [ "atomic-waker", "bytes", @@ -4263,7 +4239,7 @@ dependencies = [ [[package]] name = "http_client" version = "0.1.0" -source = "git+https://github.com/zed-industries/zed#4c7244790a075e862eeb4e5ccc12d6c8f5da6f7e" +source = "git+https://github.com/zed-industries/zed#1b04e4caf01e376624fb514ef85b0e6d8ee5d930" dependencies = [ "anyhow", "async-compression", @@ -4283,7 +4259,7 @@ dependencies = [ [[package]] name = "http_client_tls" version = "0.1.0" -source = "git+https://github.com/zed-industries/zed#4c7244790a075e862eeb4e5ccc12d6c8f5da6f7e" +source = "git+https://github.com/zed-industries/zed#1b04e4caf01e376624fb514ef85b0e6d8ee5d930" dependencies = [ "rustls", "rustls-platform-verifier 0.5.3", @@ -5259,13 +5235,12 @@ dependencies = [ [[package]] name = "media" version = "0.1.0" -source = "git+https://github.com/zed-industries/zed#4c7244790a075e862eeb4e5ccc12d6c8f5da6f7e" +source = "git+https://github.com/zed-industries/zed#1b04e4caf01e376624fb514ef85b0e6d8ee5d930" dependencies = [ "anyhow", "bindgen", "core-foundation 0.10.1", "core-video", - "ctor", "foreign-types", "metal", "objc", @@ -5474,8 +5449,8 @@ dependencies = [ [[package]] name = "nostr" -version = "0.45.2" -source = "git+https://github.com/rust-nostr/nostr#6969fdb5d229e15daf8839488f204014bc686058" +version = "0.45.3" +source = "git+https://github.com/rust-nostr/nostr#4dcf307d6102e598f3a4172b8ba5a7a779fa1630" dependencies = [ "aes", "base64", @@ -5501,7 +5476,7 @@ dependencies = [ [[package]] name = "nostr-connect" version = "0.45.1" -source = "git+https://github.com/rust-nostr/nostr#6969fdb5d229e15daf8839488f204014bc686058" +source = "git+https://github.com/rust-nostr/nostr#4dcf307d6102e598f3a4172b8ba5a7a779fa1630" dependencies = [ "async-utility", "futures-core", @@ -5515,7 +5490,7 @@ dependencies = [ [[package]] name = "nostr-database" version = "0.45.1" -source = "git+https://github.com/rust-nostr/nostr#6969fdb5d229e15daf8839488f204014bc686058" +source = "git+https://github.com/rust-nostr/nostr#4dcf307d6102e598f3a4172b8ba5a7a779fa1630" dependencies = [ "nostr", "opaquerr", @@ -5524,7 +5499,7 @@ dependencies = [ [[package]] name = "nostr-gossip" version = "0.45.0" -source = "git+https://github.com/rust-nostr/nostr#6969fdb5d229e15daf8839488f204014bc686058" +source = "git+https://github.com/rust-nostr/nostr#4dcf307d6102e598f3a4172b8ba5a7a779fa1630" dependencies = [ "nostr", "opaquerr", @@ -5533,7 +5508,7 @@ dependencies = [ [[package]] name = "nostr-gossip-memory" version = "0.45.0" -source = "git+https://github.com/rust-nostr/nostr#6969fdb5d229e15daf8839488f204014bc686058" +source = "git+https://github.com/rust-nostr/nostr#4dcf307d6102e598f3a4172b8ba5a7a779fa1630" dependencies = [ "indexmap", "lru", @@ -5544,8 +5519,8 @@ dependencies = [ [[package]] name = "nostr-lmdb" -version = "0.45.1" -source = "git+https://github.com/rust-nostr/nostr#6969fdb5d229e15daf8839488f204014bc686058" +version = "0.45.2" +source = "git+https://github.com/rust-nostr/nostr#4dcf307d6102e598f3a4172b8ba5a7a779fa1630" dependencies = [ "async-utility", "flatbuffers", @@ -5560,7 +5535,7 @@ dependencies = [ [[package]] name = "nostr-memory" version = "0.45.1" -source = "git+https://github.com/rust-nostr/nostr#6969fdb5d229e15daf8839488f204014bc686058" +source = "git+https://github.com/rust-nostr/nostr#4dcf307d6102e598f3a4172b8ba5a7a779fa1630" dependencies = [ "btreecap", "nostr", @@ -5570,8 +5545,8 @@ dependencies = [ [[package]] name = "nostr-sdk" -version = "0.45.1" -source = "git+https://github.com/rust-nostr/nostr#6969fdb5d229e15daf8839488f204014bc686058" +version = "0.45.2" +source = "git+https://github.com/rust-nostr/nostr#4dcf307d6102e598f3a4172b8ba5a7a779fa1630" dependencies = [ "async-utility", "async-wsocket", @@ -6307,7 +6282,7 @@ checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" [[package]] name = "perf" version = "0.1.0" -source = "git+https://github.com/zed-industries/zed#4c7244790a075e862eeb4e5ccc12d6c8f5da6f7e" +source = "git+https://github.com/zed-industries/zed#1b04e4caf01e376624fb514ef85b0e6d8ee5d930" dependencies = [ "collections", "serde", @@ -6687,7 +6662,7 @@ dependencies = [ [[package]] name = "psm" version = "0.1.32" -source = "git+https://github.com/rust-lang/stacker?branch=master#cdf19cf36cd0343a97c174ee6f7f8241f88b35f0" +source = "git+https://github.com/rust-lang/stacker?branch=master#d3ac2df79a409c681329006e9b31c96ab9c5fcae" dependencies = [ "ar_archive_writer", "cc", @@ -7083,18 +7058,18 @@ dependencies = [ [[package]] name = "ref-cast" -version = "1.0.26" +version = "1.0.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "216e8f773d7923bcba9ceb86a86c93cabb3903a11872fc3f138c49630e50b96d" +checksum = "7e440fb4e4b4147295338efb76001ab9e4efc0e5839df2c47fc5ac2381d365c3" dependencies = [ "ref-cast-impl", ] [[package]] name = "ref-cast-impl" -version = "1.0.26" +version = "1.0.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c9283685feec7d69af75fb0e858d5e7378f33fe4fc699383b2916ab9273e03c" +checksum = "92ecd8964f8453721699a1ed72037b0db49ce2f5a5138486ee89bed6f67cdf3a" dependencies = [ "proc-macro2", "quote", @@ -7104,7 +7079,7 @@ dependencies = [ [[package]] name = "refineable" version = "0.1.0" -source = "git+https://github.com/zed-industries/zed#4c7244790a075e862eeb4e5ccc12d6c8f5da6f7e" +source = "git+https://github.com/zed-industries/zed#1b04e4caf01e376624fb514ef85b0e6d8ee5d930" dependencies = [ "derive_refineable", ] @@ -7187,7 +7162,7 @@ dependencies = [ [[package]] name = "reqwest_client" version = "0.1.0" -source = "git+https://github.com/zed-industries/zed#4c7244790a075e862eeb4e5ccc12d6c8f5da6f7e" +source = "git+https://github.com/zed-industries/zed#1b04e4caf01e376624fb514ef85b0e6d8ee5d930" dependencies = [ "anyhow", "bytes", @@ -7197,7 +7172,6 @@ dependencies = [ "http_client_tls", "log", "regex", - "serde", "tokio", "zed-reqwest", ] @@ -7600,7 +7574,7 @@ dependencies = [ [[package]] name = "scheduler" version = "0.1.0" -source = "git+https://github.com/zed-industries/zed#4c7244790a075e862eeb4e5ccc12d6c8f5da6f7e" +source = "git+https://github.com/zed-industries/zed#1b04e4caf01e376624fb514ef85b0e6d8ee5d930" dependencies = [ "async-task", "backtrace", @@ -7996,6 +7970,7 @@ dependencies = [ "paths", "reqwest_client", "signed_state", + "tracing", "tracing-subscriber", "workspace", ] @@ -8326,7 +8301,7 @@ checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" [[package]] name = "sum_tree" version = "0.1.0" -source = "git+https://github.com/zed-industries/zed#4c7244790a075e862eeb4e5ccc12d6c8f5da6f7e" +source = "git+https://github.com/zed-industries/zed#1b04e4caf01e376624fb514ef85b0e6d8ee5d930" dependencies = [ "heapless 0.9.3", "log", @@ -9699,7 +9674,7 @@ checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" [[package]] name = "util_macros" version = "0.1.0" -source = "git+https://github.com/zed-industries/zed#4c7244790a075e862eeb4e5ccc12d6c8f5da6f7e" +source = "git+https://github.com/zed-industries/zed#1b04e4caf01e376624fb514ef85b0e6d8ee5d930" dependencies = [ "perf", "quote", @@ -11467,9 +11442,9 @@ dependencies = [ [[package]] name = "zerovec" -version = "0.11.7" +version = "0.11.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94b5c6b5976d66c1d703c4fd17d3f5e43c8cedaacf604961b171adc7130896d8" +checksum = "bb0464e17806c1d976d5cba29399c7f08e516e279e2ba493f63123b5fca67dd8" dependencies = [ "yoke", "zerofrom", @@ -11496,7 +11471,7 @@ checksum = "34b31d188d9d685a4f9c7b46d6e36631b07058d2cfe190267adce54dc230bf12" [[package]] name = "zlog" version = "0.1.0" -source = "git+https://github.com/zed-industries/zed#4c7244790a075e862eeb4e5ccc12d6c8f5da6f7e" +source = "git+https://github.com/zed-industries/zed#1b04e4caf01e376624fb514ef85b0e6d8ee5d930" dependencies = [ "anyhow", "chrono", @@ -11513,7 +11488,7 @@ checksum = "29666d0abbfad1e3dc4dcf6144730dd3a3ab225bbbdac83319345b1b44ccfc1b" [[package]] name = "ztracing" version = "0.1.0" -source = "git+https://github.com/zed-industries/zed#4c7244790a075e862eeb4e5ccc12d6c8f5da6f7e" +source = "git+https://github.com/zed-industries/zed#1b04e4caf01e376624fb514ef85b0e6d8ee5d930" dependencies = [ "tracing", "tracing-subscriber", @@ -11524,7 +11499,7 @@ dependencies = [ [[package]] name = "ztracing_macro" version = "0.1.0" -source = "git+https://github.com/zed-industries/zed#4c7244790a075e862eeb4e5ccc12d6c8f5da6f7e" +source = "git+https://github.com/zed-industries/zed#1b04e4caf01e376624fb514ef85b0e6d8ee5d930" [[package]] name = "zune-core" diff --git a/Cargo.toml b/Cargo.toml index 5a5f7c5..12b3c04 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -47,6 +47,7 @@ log = "0.4" anyhow = "1.0.44" webbrowser = "1.0.4" tracing-subscriber = { version = "0.3.18", features = ["fmt"] } +tracing = "0.1" errno = { version = "0.3.14", default-features = false } instant = "0.1" diff --git a/crates/assets/Cargo.toml b/crates/assets/Cargo.toml index 136a026..df76dfc 100644 --- a/crates/assets/Cargo.toml +++ b/crates/assets/Cargo.toml @@ -10,3 +10,6 @@ gpui-component.workspace = true anyhow.workspace = true log.workspace = true rust-embed.workspace = true + +[dev-dependencies] +serde_json.workspace = true diff --git a/crates/assets/assets/themes/signed.json b/crates/assets/assets/themes/signed.json new file mode 100644 index 0000000..977c566 --- /dev/null +++ b/crates/assets/assets/themes/signed.json @@ -0,0 +1,576 @@ +{ + "$schema": "https://github.com/longbridge/gpui-component/raw/refs/heads/main/.theme-schema.json", + "name": "Signed", + "author": "Signed", + "url": "https://git.reya.su/reya/signed", + "themes": [ + { + "name": "Signed Light", + "mode": "light", + "colors": { + "accent.background": "#F4F4F5", + "accent.foreground": "#18181B", + "accordion.background": "#FFFFFF", + "background": "#FFFFFF", + "border": "#E4E4E7", + "button.background": "#FFFFFF", + "button.active.background": "#E4E4E7", + "button.foreground": "#18181B", + "button.hover.background": "#F4F4F5", + "button.danger.background": "#DC2626", + "button.danger.active.background": "#B91C1C", + "button.danger.foreground": "#FFFFFF", + "button.danger.hover.background": "#EF4444", + "button.info.background": "#0284C7", + "button.info.active.background": "#0369A1", + "button.info.foreground": "#FFFFFF", + "button.info.hover.background": "#0EA5E9", + "button.primary.background": "#C6FF4D", + "button.primary.active.background": "#65A30D", + "button.primary.foreground": "#0B0F0C", + "button.primary.hover.background": "#B2EC3C", + "button.secondary.background": "#F4F4F5", + "button.secondary.active.background": "#D4D4D8", + "button.secondary.foreground": "#18181B", + "button.secondary.hover.background": "#E4E4E7", + "button.success.background": "#2FBF71", + "button.success.active.background": "#1F9A58", + "button.success.foreground": "#0B0F0C", + "button.success.hover.background": "#2AB568", + "button.warning.background": "#D97706", + "button.warning.active.background": "#B45309", + "button.warning.foreground": "#FFFFFF", + "button.warning.hover.background": "#F59E0B", + "group_box.background": "#F4F4F5", + "group_box.foreground": "#18181B", + "group_box.title.foreground": "#18181B", + "caret": "#18181B", + "chart.1": "#65A30D", + "chart.2": "#2FBF71", + "chart.3": "#3F6212", + "chart.4": "#7A8B5F", + "chart.5": "#A1A1AA", + "chart_bullish": "#2FBF71", + "chart_bearish": "#DC2626", + "danger.background": "#DC2626", + "danger.active.background": "#B91C1C", + "danger.foreground": "#FFFFFF", + "danger.hover.background": "#EF4444", + "description_list.label.background": "#F4F4F5", + "description_list.label.foreground": "#71717A", + "drag.border": "#65A30D", + "drop_target.background": "#65A30D33", + "foreground": "#18181B", + "info.background": "#0284C7", + "info.active.background": "#0369A1", + "info.foreground": "#FFFFFF", + "info.hover.background": "#0EA5E9", + "input.border": "#D4D4D8", + "link": "#65A30D", + "link.active": "#3F6212", + "link.hover": "#4A7A0B", + "list.background": "#FFFFFF", + "list.active.background": "#C6FF4D40", + "list.active.border": "#65A30D80", + "list.even.background": "#FAFAFA", + "list.head.background": "#FAFAFA", + "list.hover.background": "#F4F4F5", + "muted.background": "#F4F4F5", + "muted.foreground": "#71717A", + "popover.background": "#FFFFFF", + "popover.foreground": "#18181B", + "primary.background": "#C6FF4D", + "primary.active.background": "#65A30D", + "primary.foreground": "#0B0F0C", + "primary.hover.background": "#B2EC3C", + "progress.bar.background": "#65A30D", + "ring": "#65A30D", + "scrollbar.background": "#FFFFFF00", + "scrollbar.thumb.background": "#A1A1AA99", + "scrollbar.thumb.hover.background": "#A1A1AA", + "secondary.background": "#F4F4F5", + "secondary.active.background": "#D4D4D8", + "secondary.foreground": "#18181B", + "secondary.hover.background": "#E4E4E7", + "selection.background": "#C6FF4D59", + "sidebar.background": "#FAFAFA", + "sidebar.accent.background": "#C6FF4D40", + "sidebar.accent.foreground": "#65A30D", + "sidebar.border": "#E4E4E7", + "sidebar.foreground": "#18181B", + "sidebar.primary.background": "#F4F4F5", + "sidebar.primary.foreground": "#18181B", + "skeleton.background": "#E4E4E7", + "slider.background": "#E4E4E7", + "slider.thumb.background": "#65A30D", + "success.background": "#2FBF71", + "success.active.background": "#1F9A58", + "success.foreground": "#0B0F0C", + "success.hover.background": "#2AB568", + "switch.background": "#D4D4D8", + "switch.thumb.background": "#FFFFFF", + "tab.background": "#F4F4F5", + "tab.active.background": "#EBFFC1", + "tab.active.foreground": "#3F6212", + "tab.foreground": "#71717A", + "tab_bar.background": "#F4F4F5", + "tab_bar.segmented.background": "#E4E4E7", + "table.background": "#FFFFFF", + "table.active.background": "#C6FF4D40", + "table.active.border": "#65A30D80", + "table.even.background": "#FAFAFA", + "table.head.background": "#FAFAFA", + "table.head.foreground": "#71717A", + "table.foot.background": "#FAFAFA", + "table.foot.foreground": "#71717A", + "table.hover.background": "#F4F4F5", + "table.row.border": "#E4E4E7", + "title_bar.background": "#FAFAFA", + "title_bar.border": "#E4E4E7", + "status_bar.background": "#FAFAFA", + "status_bar.border": "#E4E4E7", + "tiles.background": "#FFFFFF", + "warning.background": "#D97706", + "warning.active.background": "#B45309", + "warning.foreground": "#FFFFFF", + "warning.hover.background": "#F59E0B", + "overlay": "#0000004D", + "window.border": "#E4E4E7", + "base.red": "#DC2626", + "base.green": "#16A34A", + "base.yellow": "#CA8A04", + "base.blue": "#2563EB", + "base.magenta": "#9333EA", + "base.cyan": "#0891B2" + }, + "highlight": { + "editor.background": "#FFFFFF", + "editor.foreground": "#383A42", + "editor.active_line.background": "#F2F3F4", + "editor.line_number": "#A0A1A7", + "editor.active_line_number": "#383A42", + "editor.invisible": "#A0A1A766", + "conflict": "#DC2626", + "created": "#16A34A", + "deleted": "#DC2626", + "error": "#DC2626", + "error.background": "#FEF2F2", + "error.border": "#F87171", + "hidden": "#A0A1A7", + "hint": "#A626A4", + "hint.background": "#FAF5FF", + "hint.border": "#C4B5FD", + "ignored": "#A0A1A7", + "info": "#4078F2", + "info.background": "#EFF6FF", + "info.border": "#93C5FD", + "modified": "#C18401", + "modified.background": "#FFFBEB", + "predictive": "#A0A1A7", + "renamed": "#A626A4", + "success": "#16A34A", + "success.background": "#F0FDF4", + "unreachable": "#A0A1A7", + "warning": "#C18401", + "warning.background": "#FFFBEB", + "warning.border": "#FCD34D", + "syntax": { + "attribute": { + "color": "#986801" + }, + "boolean": { + "color": "#986801" + }, + "comment": { + "color": "#A0A1A7", + "font_style": "italic" + }, + "comment.doc": { + "color": "#A0A1A7", + "font_style": "italic" + }, + "constant": { + "color": "#986801" + }, + "constructor": { + "color": "#4078F2" + }, + "embedded": { + "color": "#C18401" + }, + "function": { + "color": "#4078F2" + }, + "keyword": { + "color": "#A626A4" + }, + "label": { + "color": "#4078F2" + }, + "link_text": { + "color": "#4078F2", + "font_style": "underline" + }, + "link_uri": { + "color": "#4078F2", + "font_style": "italic" + }, + "number": { + "color": "#986801" + }, + "operator": { + "color": "#383A42" + }, + "preproc": { + "color": "#C18401" + }, + "property": { + "color": "#E45649" + }, + "punctuation": { + "color": "#383A42" + }, + "punctuation.bracket": { + "color": "#383A42" + }, + "punctuation.delimiter": { + "color": "#383A42" + }, + "punctuation.list_marker": { + "color": "#986801" + }, + "punctuation.special": { + "color": "#A626A4" + }, + "string": { + "color": "#50A14F" + }, + "string.escape": { + "color": "#A626A4" + }, + "string.regex": { + "color": "#50A14F" + }, + "string.special": { + "color": "#50A14F" + }, + "string.special.symbol": { + "color": "#986801" + }, + "tag": { + "color": "#E45649" + }, + "tag.doctype": { + "color": "#A0A1A7" + }, + "text.code.span": { + "color": "#383A42" + }, + "text.literal": { + "color": "#50A14F" + }, + "title": { + "color": "#E45649", + "font_weight": 700 + }, + "type": { + "color": "#0184BC" + }, + "variable": { + "color": "#383A42" + }, + "variable.special": { + "color": "#E45649" + }, + "variant": { + "color": "#0184BC" + } + } + } + }, + { + "name": "Signed Dark", + "mode": "dark", + "colors": { + "accent.background": "#18181B", + "accent.foreground": "#FAFAFA", + "accordion.background": "#0A0A0A", + "background": "#0A0A0A", + "border": "#27272A", + "button.background": "#18181B", + "button.active.background": "#3F3F46", + "button.foreground": "#FAFAFA", + "button.hover.background": "#27272A", + "button.danger.background": "#EF4444", + "button.danger.active.background": "#DC2626", + "button.danger.foreground": "#FFFFFF", + "button.danger.hover.background": "#F87171", + "button.info.background": "#0EA5E9", + "button.info.active.background": "#0284C7", + "button.info.foreground": "#FFFFFF", + "button.info.hover.background": "#38BDF8", + "button.primary.background": "#C6FF4D", + "button.primary.active.background": "#65A30D", + "button.primary.foreground": "#0B0F0C", + "button.primary.hover.background": "#B2EC3C", + "button.secondary.background": "#18181B", + "button.secondary.active.background": "#3F3F46", + "button.secondary.foreground": "#FAFAFA", + "button.secondary.hover.background": "#27272A", + "button.success.background": "#2FBF71", + "button.success.active.background": "#24A35D", + "button.success.foreground": "#0B0F0C", + "button.success.hover.background": "#2AB568", + "button.warning.background": "#F59E0B", + "button.warning.active.background": "#D97706", + "button.warning.foreground": "#18181B", + "button.warning.hover.background": "#FBBF24", + "group_box.background": "#18181B", + "group_box.foreground": "#FAFAFA", + "group_box.title.foreground": "#FAFAFA", + "caret": "#FAFAFA", + "chart.1": "#C6FF4D", + "chart.2": "#A6E22E", + "chart.3": "#2FBF71", + "chart.4": "#7A8B5F", + "chart.5": "#A1A1AA", + "chart_bullish": "#2FBF71", + "chart_bearish": "#EF4444", + "danger.background": "#EF4444", + "danger.active.background": "#DC2626", + "danger.foreground": "#FFFFFF", + "danger.hover.background": "#F87171", + "description_list.label.background": "#18181B", + "description_list.label.foreground": "#A1A1AA", + "drag.border": "#C6FF4D", + "drop_target.background": "#C6FF4D33", + "foreground": "#FAFAFA", + "info.background": "#0EA5E9", + "info.active.background": "#0284C7", + "info.foreground": "#FFFFFF", + "info.hover.background": "#38BDF8", + "input.border": "#3F3F46", + "link": "#C6FF4D", + "link.active": "#A6E22E", + "link.hover": "#B2EC3C", + "list.background": "#0A0A0A", + "list.active.background": "#C6FF4D40", + "list.active.border": "#C6FF4D80", + "list.even.background": "#18181B", + "list.head.background": "#18181B", + "list.hover.background": "#27272A", + "muted.background": "#18181B", + "muted.foreground": "#A1A1AA", + "popover.background": "#18181B", + "popover.foreground": "#FAFAFA", + "primary.background": "#C6FF4D", + "primary.active.background": "#65A30D", + "primary.foreground": "#0B0F0C", + "primary.hover.background": "#B2EC3C", + "progress.bar.background": "#C6FF4D", + "ring": "#C6FF4D", + "scrollbar.background": "#0A0A0A00", + "scrollbar.thumb.background": "#3F3F46", + "scrollbar.thumb.hover.background": "#52525B", + "secondary.background": "#18181B", + "secondary.active.background": "#3F3F46", + "secondary.foreground": "#FAFAFA", + "secondary.hover.background": "#27272A", + "selection.background": "#C6FF4D59", + "sidebar.background": "#0A0A0A", + "sidebar.accent.background": "#C6FF4D40", + "sidebar.accent.foreground": "#C6FF4D", + "sidebar.border": "#27272A", + "sidebar.foreground": "#FAFAFA", + "sidebar.primary.background": "#18181B", + "sidebar.primary.foreground": "#FAFAFA", + "skeleton.background": "#27272A", + "slider.background": "#27272A", + "slider.thumb.background": "#C6FF4D", + "success.background": "#2FBF71", + "success.active.background": "#24A35D", + "success.foreground": "#0B0F0C", + "success.hover.background": "#2AB568", + "switch.background": "#3F3F46", + "switch.thumb.background": "#FAFAFA", + "tab.background": "#18181B", + "tab.active.background": "#19200A", + "tab.active.foreground": "#C6FF4D", + "tab.foreground": "#A1A1AA", + "tab_bar.background": "#18181B", + "tab_bar.segmented.background": "#27272A", + "table.background": "#0A0A0A", + "table.active.background": "#C6FF4D40", + "table.active.border": "#C6FF4D80", + "table.even.background": "#18181B", + "table.head.background": "#18181B", + "table.head.foreground": "#A1A1AA", + "table.foot.background": "#18181B", + "table.foot.foreground": "#A1A1AA", + "table.hover.background": "#27272A", + "table.row.border": "#27272A", + "title_bar.background": "#18181B", + "title_bar.border": "#27272A", + "status_bar.background": "#18181B", + "status_bar.border": "#27272A", + "tiles.background": "#0A0A0A", + "warning.background": "#F59E0B", + "warning.active.background": "#D97706", + "warning.foreground": "#18181B", + "warning.hover.background": "#FBBF24", + "overlay": "#00000080", + "window.border": "#27272A", + "base.red": "#EF4444", + "base.green": "#22C55E", + "base.yellow": "#EAB308", + "base.blue": "#3B82F6", + "base.magenta": "#A855F7", + "base.cyan": "#06B6D4" + }, + "highlight": { + "editor.background": "#0A0A0A", + "editor.foreground": "#ABB2BF", + "editor.active_line.background": "#18181B", + "editor.line_number": "#71717A", + "editor.active_line_number": "#FAFAFA", + "editor.invisible": "#71717A66", + "conflict": "#E06C75", + "created": "#98C379", + "deleted": "#E06C75", + "error": "#E06C75", + "error.background": "#3A1D1D", + "error.border": "#E06C75", + "hidden": "#5C6370", + "hint": "#C678DD", + "hint.background": "#2E2740", + "hint.border": "#C678DD", + "ignored": "#5C6370", + "info": "#61AFEF", + "info.background": "#1D2E3A", + "info.border": "#61AFEF", + "modified": "#E5C07B", + "modified.background": "#3A320E", + "predictive": "#5C6370", + "renamed": "#C678DD", + "success": "#98C379", + "success.background": "#1D3A2E", + "unreachable": "#5C6370", + "warning": "#E5C07B", + "warning.background": "#3A320E", + "warning.border": "#E5C07B", + "syntax": { + "attribute": { + "color": "#D19A66" + }, + "boolean": { + "color": "#D19A66" + }, + "comment": { + "color": "#5C6370", + "font_style": "italic" + }, + "comment.doc": { + "color": "#5C6370", + "font_style": "italic" + }, + "constant": { + "color": "#D19A66" + }, + "constructor": { + "color": "#E5C07B" + }, + "embedded": { + "color": "#98C379" + }, + "function": { + "color": "#61AFEF" + }, + "keyword": { + "color": "#C678DD" + }, + "label": { + "color": "#61AFEF" + }, + "link_text": { + "color": "#61AFEF", + "font_style": "underline" + }, + "link_uri": { + "color": "#61AFEF", + "font_style": "italic" + }, + "number": { + "color": "#D19A66" + }, + "operator": { + "color": "#56B6C2" + }, + "preproc": { + "color": "#E5C07B" + }, + "property": { + "color": "#E06C75" + }, + "punctuation": { + "color": "#ABB2BF" + }, + "punctuation.bracket": { + "color": "#ABB2BF" + }, + "punctuation.delimiter": { + "color": "#ABB2BF" + }, + "punctuation.list_marker": { + "color": "#98C379" + }, + "punctuation.special": { + "color": "#ABB2BF" + }, + "string": { + "color": "#98C379" + }, + "string.escape": { + "color": "#56B6C2" + }, + "string.regex": { + "color": "#E06C75" + }, + "string.special": { + "color": "#98C379" + }, + "string.special.symbol": { + "color": "#D19A66" + }, + "tag": { + "color": "#E06C75" + }, + "tag.doctype": { + "color": "#5C6370" + }, + "text.code.span": { + "color": "#ABB2BF" + }, + "text.literal": { + "color": "#98C379" + }, + "title": { + "color": "#61AFEF", + "font_weight": 700 + }, + "type": { + "color": "#E5C07B" + }, + "variable": { + "color": "#E06C75" + }, + "variable.special": { + "color": "#D19A66" + }, + "variant": { + "color": "#E5C07B" + } + } + } + } + ] +} diff --git a/crates/assets/src/lib.rs b/crates/assets/src/lib.rs index 751b9f4..72603ed 100644 --- a/crates/assets/src/lib.rs +++ b/crates/assets/src/lib.rs @@ -6,6 +6,7 @@ use rust_embed::RustEmbed; #[derive(RustEmbed)] #[folder = "assets"] #[include = "icons/**/*.svg"] +#[include = "themes/**/*.json"] #[exclude = "*.DS_Store"] pub struct Assets; @@ -30,6 +31,28 @@ impl AssetSource for Assets { } impl Assets { + /// Returns the embedded theme files as `(file name, JSON content)` pairs, + /// e.g. `("signed.json", ...)`. The content is a `ThemeSet` that can be + /// loaded into the [`ThemeRegistry`](gpui_component::ThemeRegistry). + pub fn themes(&self) -> Vec<(String, String)> { + Self::iter() + .filter(|path| path.starts_with("themes/")) + .filter_map(|path| { + let data = Self::get(path.as_ref())?; + let name = path.strip_prefix("themes/").unwrap_or(path.as_ref()); + // Debug builds read files from disk (owned), release builds + // embed them in the binary (borrowed). + let content = match data.data { + std::borrow::Cow::Borrowed(bytes) => { + std::str::from_utf8(bytes).ok()?.to_owned() + } + std::borrow::Cow::Owned(bytes) => String::from_utf8(bytes).ok()?, + }; + Some((name.to_owned(), content)) + }) + .collect() + } + pub fn load_fonts(&self, cx: &App) -> anyhow::Result<()> { let font_paths = self.list("fonts")?; let mut embedded_fonts = Vec::new(); @@ -85,3 +108,61 @@ impl IconNamed for CustomIconName { .into() } } + +#[cfg(test)] +mod tests { + use super::*; + + fn signed_theme_set() -> gpui_component::ThemeSet { + let themes = Assets.themes(); + assert_eq!(themes.len(), 1, "expected exactly one embedded theme file"); + let (name, content) = &themes[0]; + assert_eq!(name, "signed.json"); + serde_json::from_str(content).expect("theme file must be a valid ThemeSet") + } + + #[test] + fn signed_theme_set_parses() { + let set = signed_theme_set(); + let names: Vec<&str> = set.themes.iter().map(|t| t.name.as_ref()).collect(); + assert_eq!(names, vec!["Signed Light", "Signed Dark"]); + } + + #[test] + fn signed_theme_palette_applies() { + let set = signed_theme_set(); + let parse = |hex: &str| gpui_component::try_parse_color(hex).unwrap(); + for config in &set.themes { + let mut theme = gpui_component::Theme::default(); + theme.apply_config(&std::rc::Rc::new(config.clone())); + + assert_eq!(theme.mode, config.mode); + // The resolved colors must match the brand palette. + assert_eq!(theme.primary, parse("#C6FF4D")); // nostr-lime + assert_eq!(theme.success, parse("#2FBF71")); // merge + assert_eq!(theme.primary_active, parse("#65A30D")); // lime-600 + + if config.mode.is_dark() { + // Dark theme chrome is neutral, mirroring the light theme. + assert_eq!(theme.background, parse("#0A0A0A")); // neutral-950 + assert_eq!(theme.border, parse("#27272A")); // neutral-800 + assert_eq!(theme.green, parse("#22C55E")); // green-500 + } else { + // Light theme chrome is neutral; lime is a brand accent only. + assert_eq!(theme.background, parse("#FFFFFF")); + assert_eq!(theme.foreground, parse("#18181B")); + assert_eq!(theme.border, parse("#E4E4E7")); + assert_eq!(theme.green, parse("#16A34A")); + } + // Active tab: a paler lime on light, a dim moss on dark — each + // paired with readable, contrasting text. + if config.mode.is_dark() { + assert_eq!(theme.tab_active, parse("#19200A")); // dim lime + assert_eq!(theme.tab_active_foreground, parse("#C6FF4D")); // nostr-lime + } else { + assert_eq!(theme.tab_active, parse("#EBFFC1")); // pale nostr-lime + assert_eq!(theme.tab_active_foreground, parse("#3F6212")); // deep-lime + } + } + } +} diff --git a/crates/workspace/src/views/repo_detail/diff.rs b/crates/workspace/src/views/repo_detail/diff.rs index 3679c12..f928abd 100644 --- a/crates/workspace/src/views/repo_detail/diff.rs +++ b/crates/workspace/src/views/repo_detail/diff.rs @@ -303,7 +303,7 @@ impl CommitDiffView { }; let body: AnyElement = if file.binary { - placeholder("Binary file — diff not available", cx) + placeholder("Diff not available", cx) } else if file.hunks.is_empty() { placeholder("No content changes", cx) } else { @@ -525,7 +525,6 @@ impl CommitDiffView { .text_xs() .child( Tag::primary() - .outline() .small() .child(format!("{files} files changed")), ) diff --git a/crates/workspace/src/views/repo_detail/mod.rs b/crates/workspace/src/views/repo_detail/mod.rs index 108f550..14efe59 100644 --- a/crates/workspace/src/views/repo_detail/mod.rs +++ b/crates/workspace/src/views/repo_detail/mod.rs @@ -1212,7 +1212,6 @@ impl Render for RepoDetailView { v_flex() .id("repo") .size_full() - .gap_4() .child(self.render_header(cx)) .map(|this| match self.active_tab { 0 => this.child( diff --git a/desktop/Cargo.toml b/desktop/Cargo.toml index e2c8a69..709bebc 100644 --- a/desktop/Cargo.toml +++ b/desktop/Cargo.toml @@ -23,4 +23,5 @@ dock = { workspace = true } gpui-component.workspace = true reqwest_client.workspace = true log.workspace = true +tracing.workspace = true tracing-subscriber.workspace = true diff --git a/desktop/src/main.rs b/desktop/src/main.rs index 43a4c04..abbe6fa 100644 --- a/desktop/src/main.rs +++ b/desktop/src/main.rs @@ -3,7 +3,7 @@ use std::sync::Arc; use assets::Assets; use dock::TAB_BAR_HEIGHT; use gpui::*; -use gpui_component::theme; +use gpui_component::{Theme, ThemeRegistry, theme}; use gpui_platform::application; fn main() { @@ -27,6 +27,34 @@ fn main() { // Initialize theme theme::init(cx); + // Register the built-in "Signed" theme (light + dark variants) + // and make it the active theme, following the system appearance. + let registry = ThemeRegistry::global_mut(cx); + for (name, content) in Assets.themes() { + if let Err(err) = registry.load_themes_from_str(&content) { + tracing::error!("Failed to load theme {name}: {err}"); + } + } + + let light_theme = registry.themes().get("Signed Light").cloned(); + let dark_theme = registry.themes().get("Signed Dark").cloned(); + let theme = Theme::global_mut(cx); + theme.radius = px(2.); + theme.radius_lg = px(6.); + theme.focus_ring = false; + theme.shadow = false; + + if let Some(light) = light_theme { + theme.light_theme = light; + } + + if let Some(dark) = dark_theme { + theme.dark_theme = dark; + } + + // Sync the theme with the system appearance + Theme::sync_system_appearance(None, cx); + // Install the shared image cache so avatars can be freed when // their views close, instead of staying in memory forever. workspace::image_cache::init(cx);