diff --git a/CHANGELOG.md b/CHANGELOG.md index 35e5ca9..75ea0f1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,8 @@ ### Changed +- Migrate the GPUI foundation to the published `gpui-pre` crates and GPUI Kit 0.6, off the zed and gpui-component git pins + ### Fixed ### Removed diff --git a/Cargo.lock b/Cargo.lock index 8a40acd..f29569b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -288,8 +288,8 @@ name = "assets" version = "0.1.0-alpha" dependencies = [ "anyhow", - "gpui", "gpui-component", + "gpui-pre", "rust-embed", "serde_json", ] @@ -651,15 +651,6 @@ version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "efbd3e1070bbdf4cd88a75264e18e8a26f7cb5c6949eadf0ceb85fb159cf08f8" -[[package]] -name = "bincode" -version = "1.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" -dependencies = [ - "serde", -] - [[package]] name = "bindgen" version = "0.72.1" @@ -1219,16 +1210,6 @@ dependencies = [ "unicode-width", ] -[[package]] -name = "collections" -version = "0.1.0" -source = "git+https://github.com/zed-industries/zed#7960b2a7c9568e90fbe0727332149e5b2a5fd57a" -dependencies = [ - "gpui_util", - "indexmap", - "rustc-hash 2.1.3", -] - [[package]] name = "color_quant" version = "1.1.0" @@ -1691,16 +1672,6 @@ dependencies = [ "unicode-xid", ] -[[package]] -name = "derive_refineable" -version = "0.1.0" -source = "git+https://github.com/zed-industries/zed#7960b2a7c9568e90fbe0727332149e5b2a5fd57a" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.119", -] - [[package]] name = "diffy" version = "0.5.2" @@ -1733,13 +1704,34 @@ dependencies = [ "ctutils", ] +[[package]] +name = "dirs" +version = "5.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225" +dependencies = [ + "dirs-sys 0.4.1", +] + [[package]] name = "dirs" version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3e8aa94d75141228480295a7d0e7feb620b1a5ad9f12bc40be62411e38cce4e" dependencies = [ - "dirs-sys", + "dirs-sys 0.5.0", +] + +[[package]] +name = "dirs-sys" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c" +dependencies = [ + "libc", + "option-ext", + "redox_users 0.4.6", + "windows-sys 0.48.0", ] [[package]] @@ -1750,7 +1742,7 @@ checksum = "e01a3366d27ee9890022452ee61b2b63a67e6f13f58900b651ff5665f0bb1fab" dependencies = [ "libc", "option-ext", - "redox_users", + "redox_users 0.5.2", "windows-sys 0.61.2", ] @@ -1796,9 +1788,9 @@ dependencies = [ name = "dock" version = "0.1.0-alpha" dependencies = [ - "gpui", "gpui-base", "gpui-component", + "gpui-pre", "signed_ui", ] @@ -2055,17 +2047,6 @@ dependencies = [ "zune-inflate", ] -[[package]] -name = "fancy-regex" -version = "0.16.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "998b056554fbe42e03ae0e152895cd1a7e1002aec800fdc6635d20270260c46f" -dependencies = [ - "bit-set 0.8.0", - "regex-automata", - "regex-syntax", -] - [[package]] name = "faster-hex" version = "0.10.0" @@ -3536,90 +3517,22 @@ dependencies = [ "bitflags 2.13.2", ] -[[package]] -name = "gpui" -version = "0.2.2" -source = "git+https://github.com/zed-industries/zed#7960b2a7c9568e90fbe0727332149e5b2a5fd57a" -dependencies = [ - "accesskit", - "anyhow", - "async-channel", - "async-task", - "backtrace", - "bindgen", - "bitflags 2.13.2", - "chrono", - "collections", - "core-video", - "ctor", - "derive_more", - "embed-resource", - "etagere", - "futures", - "futures-concurrency", - "getrandom 0.3.4", - "gpui_macros", - "gpui_shared_string", - "gpui_util", - "heapless 0.9.3", - "http_client", - "image", - "inventory", - "itertools 0.14.0", - "log", - "lyon", - "num_cpus", - "parking", - "parking_lot", - "pin-project", - "pollster 0.4.0", - "postage", - "profiling", - "proptest", - "rand 0.9.5", - "raw-window-handle", - "refineable", - "regex", - "resvg 0.46.0", - "scheduler", - "schemars", - "seahash", - "serde", - "serde_json", - "slotmap", - "smallvec", - "spin 0.10.1", - "strum", - "sum_tree", - "taffy", - "thiserror 2.0.20", - "tracing", - "ttf-parser", - "url", - "usvg 0.46.0", - "util_macros", - "uuid", - "waker-fn", - "web-time", - "windows 0.62.2", - "zed-font-kit", - "zed-scap", - "ztracing", -] - [[package]] name = "gpui-base" -version = "0.5.2" -source = "git+https://github.com/longbridge/gpui-component?rev=39c2c86dbee7ad445591462f8675f74082e10828#39c2c86dbee7ad445591462f8675f74082e10828" +version = "0.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c9e904ee0d351f4e85b967e26ae986d3aa195a8d9d35fcd18184a2c40989694e" dependencies = [ "aho-corasick", "anyhow", + "ashpd", "async-channel", "chrono", + "data-url", "futures", - "gpui", - "gpui_macros", - "gpui_platform", + "gpui-pre", + "gpui-pre-macros", + "gpui-pre-sum-tree", "html5ever", "instant", "lsp-types", @@ -3636,27 +3549,28 @@ dependencies = [ "serde_json", "smallvec", "smol", - "syntect", "tracing", "unicode-segmentation", "web-time", - "zed-sum-tree", + "windows 0.58.0", ] [[package]] name = "gpui-component" -version = "0.5.2" -source = "git+https://github.com/longbridge/gpui-component?rev=39c2c86dbee7ad445591462f8675f74082e10828#39c2c86dbee7ad445591462f8675f74082e10828" +version = "0.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0cf6c72516b44bb2e66a1bd2ccf77a122ecd1b54a75559ac299bb296bfcb5bb7" dependencies = [ "anyhow", "chrono", "core-text", "enum-iterator", - "gpui", "gpui-base", - "gpui-component-assets", "gpui-component-macros", - "gpui_macros", + "gpui-kit-assets", + "gpui-pre", + "gpui-pre-macros", + "gpui-pre-sum-tree", "instant", "itertools 0.13.0", "log", @@ -3670,6 +3584,7 @@ dependencies = [ "once_cell", "paste", "raw-window-handle", + "regex", "resvg 0.45.1", "ropey", "rust-i18n", @@ -3717,49 +3632,123 @@ dependencies = [ "tree-sitter-zig", "uuid", "windows 0.58.0", - "zed-sum-tree", -] - -[[package]] -name = "gpui-component-assets" -version = "0.5.1" -source = "git+https://github.com/longbridge/gpui-component?rev=39c2c86dbee7ad445591462f8675f74082e10828#39c2c86dbee7ad445591462f8675f74082e10828" -dependencies = [ - "anyhow", - "gpui", - "log", - "rust-embed", - "wasm-bindgen", - "wasm-bindgen-futures", - "zed-reqwest 0.12.15-zed (git+https://github.com/zed-industries/reqwest.git?rev=c15662463bda39148ba154100dd44d3fba5873a4)", ] [[package]] name = "gpui-component-macros" -version = "0.5.1" -source = "git+https://github.com/longbridge/gpui-component?rev=39c2c86dbee7ad445591462f8675f74082e10828#39c2c86dbee7ad445591462f8675f74082e10828" +version = "0.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3867545508c7cf6a5f6da586f60d894a3f8e7cce94b7fe82df7fad5f868ec20e" dependencies = [ + "proc-macro-crate", "proc-macro2", "quote", "syn 2.0.119", ] [[package]] -name = "gpui_apple" -version = "0.1.0" -source = "git+https://github.com/zed-industries/zed#7960b2a7c9568e90fbe0727332149e5b2a5fd57a" +name = "gpui-kit-assets" +version = "0.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "111d3d03a68454318a193f137419864ccebdc7d3dc0194b0b0b3f818a6bc3d55" +dependencies = [ + "anyhow", + "gpui-pre", + "gpui-pre-reqwest", + "log", + "rust-embed", + "wasm-bindgen", + "wasm-bindgen-futures", +] + +[[package]] +name = "gpui-pre" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0437c0b83e636a92bd1a39fa1d05fb632ae671289537497b35871ffbe231b84" +dependencies = [ + "accesskit", + "anyhow", + "async-channel", + "async-task", + "backtrace", + "bindgen", + "bitflags 2.13.2", + "chrono", + "core-video", + "ctor", + "derive_more", + "embed-resource", + "etagere", + "futures", + "futures-concurrency", + "getrandom 0.3.4", + "gpui-pre-collections", + "gpui-pre-http-client", + "gpui-pre-macros", + "gpui-pre-refineable", + "gpui-pre-scheduler", + "gpui-pre-shared-string", + "gpui-pre-sum-tree", + "gpui-pre-util", + "gpui-pre-util-macros", + "heapless 0.9.3", + "image", + "inventory", + "itertools 0.14.0", + "log", + "lyon", + "num_cpus", + "objc2-core-foundation", + "objc2-core-video", + "parking", + "parking_lot", + "pin-project", + "pollster 0.4.0", + "postage", + "profiling", + "proptest", + "rand 0.9.5", + "raw-window-handle", + "regex", + "resvg 0.46.0", + "schemars", + "seahash", + "serde", + "serde_json", + "slotmap", + "smallvec", + "spin 0.10.1", + "strum", + "taffy", + "thiserror 2.0.20", + "ttf-parser", + "url", + "usvg 0.46.0", + "uuid", + "waker-fn", + "web-time", + "windows 0.62.2", + "zed-font-kit", + "zed-scap", +] + +[[package]] +name = "gpui-pre-apple" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3af534f0746eb9e014114bcc0ee00dc250c4b8d75df2e437180c403aa65649c1" dependencies = [ "anyhow", "block", "cbindgen", "cocoa 0.26.0", - "collections", "core-foundation 0.10.1", "core-video", "derive_more", "etagere", "foreign-types", - "gpui", + "gpui-pre", "image", "log", "metal", @@ -3769,9 +3758,65 @@ dependencies = [ ] [[package]] -name = "gpui_linux" -version = "0.1.0" -source = "git+https://github.com/zed-industries/zed#7960b2a7c9568e90fbe0727332149e5b2a5fd57a" +name = "gpui-pre-collections" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15e7a65204039187d1f4b3d4c2e0233eeac54d4acb0b13f9dc1a3b5adad26c1f" +dependencies = [ + "gpui-pre-util", + "indexmap", + "rustc-hash 2.1.3", +] + +[[package]] +name = "gpui-pre-derive-refineable" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79dfb4a05f3cd9893d7768dbf5dba1bbbe99cab7394e89b360ccb3b2bcb6b34e" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "gpui-pre-http-client" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfd5a7542c77887a5aff997d78c95884119c8463409569b63fcf060956da1682" +dependencies = [ + "anyhow", + "async-compression", + "bytes", + "derive_more", + "futures", + "http", + "http-body", + "log", + "parking_lot", + "serde", + "serde_json", + "serde_urlencoded", + "url", +] + +[[package]] +name = "gpui-pre-http-client-tls" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72aed510adb5e7723f8f57b9751007e3451d46a84edb59b92227178cf59cc19c" +dependencies = [ + "log", + "rustls", + "rustls-platform-verifier", + "webpki-roots 1.0.9", +] + +[[package]] +name = "gpui-pre-linux" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aab655cda1d6dcd549ac869e8678babc84cf573ab6794a1fe1a39c6c70c60b48" dependencies = [ "accesskit", "accesskit_unix", @@ -3782,13 +3827,13 @@ dependencies = [ "bytemuck", "calloop", "calloop-wayland-source", - "collections", "filedescriptor", "futures", - "gpui", - "gpui_util", - "gpui_wgpu", - "http_client", + "gpui-pre", + "gpui-pre-collections", + "gpui-pre-http-client", + "gpui-pre-util", + "gpui-pre-wgpu", "libc", "log", "notify-rust", @@ -3815,18 +3860,17 @@ dependencies = [ ] [[package]] -name = "gpui_macos" -version = "0.1.0" -source = "git+https://github.com/zed-industries/zed#7960b2a7c9568e90fbe0727332149e5b2a5fd57a" +name = "gpui-pre-macos" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "951d17e41a72067ad2d35c60e08a62e8ad7fa9400b41c802e26cfb459f6c05da" dependencies = [ "accesskit", "accesskit_macos", "anyhow", "async-task", - "block", "block2 0.6.2", "cocoa 0.26.0", - "collections", "core-foundation 0.10.1", "core-foundation-sys", "core-graphics 0.24.0", @@ -3835,19 +3879,20 @@ dependencies = [ "dispatch2", "foreign-types", "futures", - "gpui", - "gpui_apple", - "gpui_util", + "gpui-pre", + "gpui-pre-apple", + "gpui-pre-collections", + "gpui-pre-util", "image", "itertools 0.14.0", "libc", "log", "mach2", - "media", - "metal", "objc", "objc2 0.6.4", "objc2-app-kit 0.3.2", + "objc2-core-graphics", + "objc2-core-media", "objc2-foundation 0.3.2", "objc2-screen-capture-kit", "objc2-user-notifications", @@ -3862,33 +3907,142 @@ dependencies = [ ] [[package]] -name = "gpui_macros" -version = "0.1.0" -source = "git+https://github.com/zed-industries/zed#7960b2a7c9568e90fbe0727332149e5b2a5fd57a" +name = "gpui-pre-macros" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6324092b40ea8ec7c327a4a28427e366a489b4d5d23b5d1bd0243fc2f4ca7a9e" dependencies = [ "heck 0.5.0", + "proc-macro-crate", "proc-macro2", "quote", "syn 2.0.119", ] [[package]] -name = "gpui_platform" -version = "0.1.0" -source = "git+https://github.com/zed-industries/zed#7960b2a7c9568e90fbe0727332149e5b2a5fd57a" +name = "gpui-pre-perf" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b94bff26ccd8105f6206144f8dab16a2dc02e7a68f39dada02cdf492f0afd940" dependencies = [ - "console_error_panic_hook", - "gpui", - "gpui_linux", - "gpui_macos", - "gpui_web", - "gpui_windows", + "gpui-pre-collections", + "serde", + "serde_json", ] [[package]] -name = "gpui_shared_string" -version = "0.1.0" -source = "git+https://github.com/zed-industries/zed#7960b2a7c9568e90fbe0727332149e5b2a5fd57a" +name = "gpui-pre-platform" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8423d1e0a693d2f9f16c0326bb01b5e81ec0531854d596a18476934ac6880478" +dependencies = [ + "console_error_panic_hook", + "gpui-pre", + "gpui-pre-linux", + "gpui-pre-macos", + "gpui-pre-web", + "gpui-pre-windows", +] + +[[package]] +name = "gpui-pre-refineable" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93b4b0a8d296a3ee5beb1136bc48f8167a6028eb1e243b56851dcd8c9fc6d7a1" +dependencies = [ + "gpui-pre-derive-refineable", +] + +[[package]] +name = "gpui-pre-reqwest" +version = "0.12.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05be23908e707966824f8c51a609904b7f30739e8d915e120a53c1b995ba964c" +dependencies = [ + "base64 0.22.1", + "bytes", + "encoding_rs", + "futures-core", + "futures-util", + "h2", + "http", + "http-body", + "http-body-util", + "hyper", + "hyper-rustls", + "hyper-util", + "ipnet", + "js-sys", + "log", + "mime", + "mime_guess", + "once_cell", + "percent-encoding", + "pin-project-lite", + "quinn", + "rustls", + "rustls-native-certs", + "rustls-pemfile", + "rustls-pki-types", + "serde", + "serde_json", + "serde_urlencoded", + "sync_wrapper", + "system-configuration", + "tokio", + "tokio-rustls", + "tokio-socks", + "tokio-util", + "tower", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "wasm-streams", + "web-sys", + "windows-registry 0.4.0", +] + +[[package]] +name = "gpui-pre-reqwest-client" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f32ccea5d1a7c8d2868d7b346c2c1f76aa3f86ec9e0575c4e7340af3afd9e9d" +dependencies = [ + "anyhow", + "bytes", + "futures", + "gpui-pre-http-client", + "gpui-pre-http-client-tls", + "gpui-pre-reqwest", + "gpui-pre-util", + "log", + "regex", + "tokio", +] + +[[package]] +name = "gpui-pre-scheduler" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff7b10b3d2fc3fda24847a04436eca9531612c8414874a37ddc005f20e521e12" +dependencies = [ + "async-task", + "backtrace", + "chrono", + "flume 0.12.0", + "futures", + "parking_lot", + "rand 0.9.5", + "wasm_thread", + "web-time", +] + +[[package]] +name = "gpui-pre-shared-string" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe17f81bd98a0253140ea79f7f76442d7499bd8d17db302861af8e46c11d38df" dependencies = [ "schemars", "serde", @@ -3896,9 +4050,23 @@ dependencies = [ ] [[package]] -name = "gpui_util" -version = "0.1.0" -source = "git+https://github.com/zed-industries/zed#7960b2a7c9568e90fbe0727332149e5b2a5fd57a" +name = "gpui-pre-sum-tree" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a6d35e998a51d24248dad731de1f09d386cbbf46a04edde3b67f469b2ce3f16" +dependencies = [ + "gpui-pre-ztracing", + "heapless 0.9.3", + "log", + "rayon", + "tracing", +] + +[[package]] +name = "gpui-pre-util" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a026a30c578930d20974fd8c3d77de36223ac7ba193bd4259e7238929bc8806" dependencies = [ "anyhow", "log", @@ -3906,21 +4074,33 @@ dependencies = [ ] [[package]] -name = "gpui_web" -version = "0.1.0" -source = "git+https://github.com/zed-industries/zed#7960b2a7c9568e90fbe0727332149e5b2a5fd57a" +name = "gpui-pre-util-macros" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5cbf79627a6afc626d4e887dad9d2d92bb069413e8cc692ba3e90bff219eb7a9" +dependencies = [ + "gpui-pre-perf", + "quote", + "syn 2.0.119", +] + +[[package]] +name = "gpui-pre-web" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34be433b9fcb370b1fe9a1c7fe911f0eb6058791ef8167dcf6c5a5deb624975c" dependencies = [ "anyhow", "console_error_panic_hook", "futures", - "gpui", - "gpui_wgpu", - "http_client", + "gpui-pre", + "gpui-pre-http-client", + "gpui-pre-scheduler", + "gpui-pre-wgpu", "js-sys", "log", "parking_lot", "raw-window-handle", - "scheduler", "smallvec", "unicode-properties", "unicode-script", @@ -3934,17 +4114,18 @@ dependencies = [ ] [[package]] -name = "gpui_wgpu" -version = "0.1.0" -source = "git+https://github.com/zed-industries/zed#7960b2a7c9568e90fbe0727332149e5b2a5fd57a" +name = "gpui-pre-wgpu" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05515b32799b1767d69300921c1b562cd53104965211a0e8905acdc7aa18e693" dependencies = [ "anyhow", "bytemuck", - "collections", "cosmic-text", "etagere", - "gpui", - "gpui_util", + "gpui-pre", + "gpui-pre-collections", + "gpui-pre-util", "itertools 0.14.0", "log", "parking_lot", @@ -3960,19 +4141,20 @@ dependencies = [ ] [[package]] -name = "gpui_windows" -version = "0.1.0" -source = "git+https://github.com/zed-industries/zed#7960b2a7c9568e90fbe0727332149e5b2a5fd57a" +name = "gpui-pre-windows" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "27662e65bfcf4445d2cccfad91f1570ec07f4b1b5de98400a9f207fd19c464cf" dependencies = [ "accesskit", "accesskit_windows", "anyhow", - "collections", "dunce", "etagere", "futures", - "gpui", - "gpui_util", + "gpui-pre", + "gpui-pre-collections", + "gpui-pre-util", "image", "itertools 0.14.0", "log", @@ -3987,6 +4169,36 @@ dependencies = [ "windows-registry 0.6.1", ] +[[package]] +name = "gpui-pre-zlog" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3a5af0b734a391a84872eb770b3ee9830091ec2487b79d06371fe14eefb2b5d" +dependencies = [ + "anyhow", + "chrono", + "gpui-pre-collections", + "log", +] + +[[package]] +name = "gpui-pre-ztracing" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a24cb19f78c5bc3aab8ddf1e8e0bd6b402fbcb9c7f112f64ddbedef8f8768a59" +dependencies = [ + "gpui-pre-zlog", + "gpui-pre-ztracing-macro", + "tracing", + "tracing-subscriber", +] + +[[package]] +name = "gpui-pre-ztracing-macro" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1bb25850ad31b88bbdef454afb93ec4cdb81f5e200ba5b3f1a0368111780d2c" + [[package]] name = "granit-parser" version = "1.2.1" @@ -4263,37 +4475,6 @@ dependencies = [ "pin-project-lite", ] -[[package]] -name = "http_client" -version = "0.1.0" -source = "git+https://github.com/zed-industries/zed#7960b2a7c9568e90fbe0727332149e5b2a5fd57a" -dependencies = [ - "anyhow", - "async-compression", - "bytes", - "derive_more", - "futures", - "http", - "http-body", - "log", - "parking_lot", - "serde", - "serde_json", - "serde_urlencoded", - "url", -] - -[[package]] -name = "http_client_tls" -version = "0.1.0" -source = "git+https://github.com/zed-industries/zed#7960b2a7c9568e90fbe0727332149e5b2a5fd57a" -dependencies = [ - "log", - "rustls", - "rustls-platform-verifier", - "webpki-roots 1.0.9", -] - [[package]] name = "httparse" version = "1.10.1" @@ -5240,20 +5421,6 @@ dependencies = [ "digest 0.10.7", ] -[[package]] -name = "media" -version = "0.1.0" -source = "git+https://github.com/zed-industries/zed#7960b2a7c9568e90fbe0727332149e5b2a5fd57a" -dependencies = [ - "anyhow", - "bindgen", - "core-foundation 0.10.1", - "core-video", - "foreign-types", - "metal", - "objc", -] - [[package]] name = "memchr" version = "2.8.3" @@ -5882,6 +6049,28 @@ dependencies = [ "objc2-foundation 0.3.2", ] +[[package]] +name = "objc2-core-audio" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1eebcea8b0dbff5f7c8504f3107c68fc061a3eb44932051c8cf8a68d969c3b2" +dependencies = [ + "dispatch2", + "objc2 0.6.4", + "objc2-core-audio-types", + "objc2-core-foundation", +] + +[[package]] +name = "objc2-core-audio-types" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a89f2ec274a0cf4a32642b2991e8b351a404d290da87bb6a9a9d8632490bd1c" +dependencies = [ + "bitflags 2.13.2", + "objc2 0.6.4", +] + [[package]] name = "objc2-core-data" version = "0.2.2" @@ -5961,6 +6150,21 @@ dependencies = [ "objc2-foundation 0.3.2", ] +[[package]] +name = "objc2-core-media" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05ec576860167a15dd9fce7fbee7512beb4e31f532159d3482d1f9c6caedf31d" +dependencies = [ + "bitflags 2.13.2", + "dispatch2", + "objc2 0.6.4", + "objc2-core-audio", + "objc2-core-audio-types", + "objc2-core-foundation", + "objc2-core-video", +] + [[package]] name = "objc2-core-text" version = "0.3.2" @@ -6085,8 +6289,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "74b7c5390f477482f001bc354d6571a70db7e4f8d5288e860c45521fbce11394" dependencies = [ "block2 0.6.2", + "dispatch2", "objc2 0.6.4", "objc2-core-graphics", + "objc2-core-media", "objc2-foundation 0.3.2", ] @@ -6298,7 +6504,7 @@ dependencies = [ name = "paths" version = "0.1.0-alpha" dependencies = [ - "dirs", + "dirs 6.0.0", ] [[package]] @@ -6327,16 +6533,6 @@ version = "2.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" -[[package]] -name = "perf" -version = "0.1.0" -source = "git+https://github.com/zed-industries/zed#7960b2a7c9568e90fbe0727332149e5b2a5fd57a" -dependencies = [ - "collections", - "serde", - "serde_json", -] - [[package]] name = "phf" version = "0.11.3" @@ -6679,8 +6875,9 @@ dependencies = [ [[package]] name = "proptest" -version = "1.10.0" -source = "git+https://github.com/proptest-rs/proptest?rev=3dca198a8fef1b32e3a66f1e1897c955b4dc5b5b#3dca198a8fef1b32e3a66f1e1897c955b4dc5b5b" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4b45fcc2344c680f5025fe57779faef368840d0bd1f42f216291f0dc4ace4744" dependencies = [ "bit-set 0.8.0", "bit-vec 0.8.0", @@ -6699,7 +6896,8 @@ dependencies = [ [[package]] name = "proptest-macro" version = "0.5.0" -source = "git+https://github.com/proptest-rs/proptest?rev=3dca198a8fef1b32e3a66f1e1897c955b4dc5b5b#3dca198a8fef1b32e3a66f1e1897c955b4dc5b5b" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "efaa288b896cb2b345da7b7f2110ab19e51565b83495b56fcec98a62f8b1f33e" dependencies = [ "convert_case 0.11.0", "proc-macro2", @@ -7084,6 +7282,17 @@ dependencies = [ "bitflags 2.13.2", ] +[[package]] +name = "redox_users" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43" +dependencies = [ + "getrandom 0.2.17", + "libredox", + "thiserror 1.0.69", +] + [[package]] name = "redox_users" version = "0.5.2" @@ -7115,14 +7324,6 @@ dependencies = [ "syn 3.0.5", ] -[[package]] -name = "refineable" -version = "0.1.0" -source = "git+https://github.com/zed-industries/zed#7960b2a7c9568e90fbe0727332149e5b2a5fd57a" -dependencies = [ - "derive_refineable", -] - [[package]] name = "regex" version = "1.13.1" @@ -7198,23 +7399,6 @@ dependencies = [ "web-sys", ] -[[package]] -name = "reqwest_client" -version = "0.1.0" -source = "git+https://github.com/zed-industries/zed#7960b2a7c9568e90fbe0727332149e5b2a5fd57a" -dependencies = [ - "anyhow", - "bytes", - "futures", - "gpui_util", - "http_client", - "http_client_tls", - "log", - "regex", - "tokio", - "zed-reqwest 0.12.15-zed (git+https://github.com/zed-industries/reqwest.git?rev=33bc764aa15ff7b200bf7c93bd96e24878d53e14)", -] - [[package]] name = "resvg" version = "0.45.1" @@ -7576,22 +7760,6 @@ dependencies = [ "windows-sys 0.61.2", ] -[[package]] -name = "scheduler" -version = "0.1.0" -source = "git+https://github.com/zed-industries/zed#7960b2a7c9568e90fbe0727332149e5b2a5fd57a" -dependencies = [ - "async-task", - "backtrace", - "chrono", - "flume 0.12.0", - "futures", - "parking_lot", - "rand 0.9.5", - "wasm_thread", - "web-time", -] - [[package]] name = "schemars" version = "1.2.2" @@ -7867,7 +8035,7 @@ name = "settings" version = "0.1.0-alpha" dependencies = [ "anyhow", - "gpui", + "gpui-pre", "log", "paths", "serde", @@ -7938,7 +8106,7 @@ version = "3.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32824fab5e16e6c4d86dc1ba84489390419a39f97699852b66480bb87d297ed8" dependencies = [ - "dirs", + "dirs 6.0.0", ] [[package]] @@ -7969,11 +8137,11 @@ version = "0.1.0-alpha" dependencies = [ "assets", "dock", - "gpui", "gpui-component", - "gpui_platform", + "gpui-pre", + "gpui-pre-platform", + "gpui-pre-reqwest-client", "paths", - "reqwest_client", "settings", "signed_state", "tracing", @@ -8028,7 +8196,7 @@ dependencies = [ "flume 0.11.1", "futures", "gix", - "gpui", + "gpui-pre", "log", "nostr", "nostr-connect", @@ -8049,9 +8217,9 @@ version = "0.1.0-alpha" dependencies = [ "assets", "futures", - "gpui", "gpui-base", "gpui-component", + "gpui-pre", "log", "signed_core", ] @@ -8292,18 +8460,6 @@ version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" -[[package]] -name = "sum_tree" -version = "0.1.0" -source = "git+https://github.com/zed-industries/zed#7960b2a7c9568e90fbe0727332149e5b2a5fd57a" -dependencies = [ - "heapless 0.9.3", - "log", - "rayon", - "tracing", - "ztracing", -] - [[package]] name = "sval" version = "2.22.0" @@ -8471,24 +8627,6 @@ dependencies = [ "syn 2.0.119", ] -[[package]] -name = "syntect" -version = "5.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "656b45c05d95a5704399aeef6bd0ddec7b2b3531b7c9e900abbf7c4d2190c925" -dependencies = [ - "bincode", - "fancy-regex", - "flate2", - "fnv", - "once_cell", - "regex-syntax", - "serde", - "serde_derive", - "thiserror 2.0.20", - "walkdir", -] - [[package]] name = "sys-locale" version = "0.3.2" @@ -8523,17 +8661,6 @@ dependencies = [ "system-configuration-sys", ] -[[package]] -name = "system-configuration" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "501336eb7ba9e417300a6a0fa985721065467aa83a6dcf0422a8e43e4c0328fa" -dependencies = [ - "bitflags 2.13.2", - "core-foundation 0.10.1", - "system-configuration-sys", -] - [[package]] name = "system-configuration-sys" version = "0.6.0" @@ -9667,16 +9794,6 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" -[[package]] -name = "util_macros" -version = "0.1.0" -source = "git+https://github.com/zed-industries/zed#7960b2a7c9568e90fbe0727332149e5b2a5fd57a" -dependencies = [ - "perf", - "quote", - "syn 2.0.119", -] - [[package]] name = "utils" version = "0.1.0-alpha" @@ -9896,7 +10013,8 @@ dependencies = [ [[package]] name = "wasm_thread" version = "0.3.3" -source = "git+https://github.com/zed-industries/wasm_thread?rev=0cf96c7708dfb97ccf3da50347e25edcf75d6937#0cf96c7708dfb97ccf3da50347e25edcf75d6937" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7516db7f32decdadb1c3b8deb1b7d78b9df7606c5cc2f6241737c2ab3a0258e" dependencies = [ "futures", "js-sys", @@ -10632,6 +10750,15 @@ dependencies = [ "windows-link 0.2.1", ] +[[package]] +name = "windows-sys" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +dependencies = [ + "windows-targets 0.48.5", +] + [[package]] name = "windows-sys" version = "0.52.0" @@ -10659,6 +10786,21 @@ dependencies = [ "windows-link 0.2.1", ] +[[package]] +name = "windows-targets" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +dependencies = [ + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", +] + [[package]] name = "windows-targets" version = "0.52.6" @@ -10719,6 +10861,12 @@ dependencies = [ "windows-link 0.2.1", ] +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" + [[package]] name = "windows_aarch64_gnullvm" version = "0.52.6" @@ -10731,6 +10879,12 @@ version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a9d8416fa8b42f5c947f8482c43e7d89e73a173cead56d044f6a56104a6d1b53" +[[package]] +name = "windows_aarch64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" + [[package]] name = "windows_aarch64_msvc" version = "0.52.6" @@ -10743,6 +10897,12 @@ version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b9d782e804c2f632e395708e99a94275910eb9100b2114651e04744e9b125006" +[[package]] +name = "windows_i686_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" + [[package]] name = "windows_i686_gnu" version = "0.52.6" @@ -10767,6 +10927,12 @@ version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fa7359d10048f68ab8b09fa71c3daccfb0e9b559aed648a8f95469c27057180c" +[[package]] +name = "windows_i686_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" + [[package]] name = "windows_i686_msvc" version = "0.52.6" @@ -10779,6 +10945,12 @@ version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e7ac75179f18232fe9c285163565a57ef8d3c89254a30685b57d83a38d326c2" +[[package]] +name = "windows_x86_64_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" + [[package]] name = "windows_x86_64_gnu" version = "0.52.6" @@ -10791,6 +10963,12 @@ version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c3842cdd74a865a8066ab39c8a7a473c0778a3f29370b5fd6b4b9aa7df4a499" +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" + [[package]] name = "windows_x86_64_gnullvm" version = "0.52.6" @@ -10803,6 +10981,12 @@ version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ffa179e2d07eee8ad8f57493436566c7cc30ac536a3379fdf008f47f6bb7ae1" +[[package]] +name = "windows_x86_64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" + [[package]] name = "windows_x86_64_msvc" version = "0.52.6" @@ -10867,9 +11051,9 @@ dependencies = [ "dock", "futures", "gix", - "gpui", "gpui-base", "gpui-component", + "gpui-pre", "log", "nostr", "paths", @@ -10881,12 +11065,6 @@ dependencies = [ "utils", ] -[[package]] -name = "workspace-hack" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "beffa227304dbaea3ad6a06ac674f9bc83a3dec3b7f63eeb442de37e7cb6bb01" - [[package]] name = "writeable" version = "0.6.4" @@ -10954,15 +11132,17 @@ checksum = "163b33ed8786455e2fa5d72f554057ce3f3182425434f756cd39c99839d88e23" [[package]] name = "xim-ctext" version = "0.3.0" -source = "git+https://github.com/zed-industries/xim-rs.git?rev=16f35a2c881b815a2b6cdfd6687988e84f8447d8#16f35a2c881b815a2b6cdfd6687988e84f8447d8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ac61a7062c40f3c37b6e82eeeef835d5cc7824b632a72784a89b3963c33284c" dependencies = [ "encoding_rs", ] [[package]] name = "xim-parser" -version = "0.2.1" -source = "git+https://github.com/zed-industries/xim-rs.git?rev=16f35a2c881b815a2b6cdfd6687988e84f8447d8#16f35a2c881b815a2b6cdfd6687988e84f8447d8" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5dcee45f89572d5a65180af3a84e7ddb24f5ea690a6d3aa9de231281544dd7b7" dependencies = [ "bitflags 2.13.2", ] @@ -11163,14 +11343,15 @@ dependencies = [ [[package]] name = "zed-font-kit" version = "0.14.1-zed" -source = "git+https://github.com/zed-industries/font-kit?rev=94b0f28166665e8fd2f53ff6d268a14955c82269#94b0f28166665e8fd2f53ff6d268a14955c82269" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3898e450f36f852edda72e3f985c34426042c4951790b23b107f93394f9bff5" dependencies = [ "bitflags 2.13.2", "byteorder", "core-foundation 0.10.1", "core-graphics 0.24.0", "core-text", - "dirs", + "dirs 5.0.1", "dwrote", "float-ord", "freetype-sys", @@ -11184,108 +11365,11 @@ dependencies = [ "yeslogic-fontconfig-sys", ] -[[package]] -name = "zed-reqwest" -version = "0.12.15-zed" -source = "git+https://github.com/zed-industries/reqwest.git?rev=33bc764aa15ff7b200bf7c93bd96e24878d53e14#33bc764aa15ff7b200bf7c93bd96e24878d53e14" -dependencies = [ - "base64 0.22.1", - "bytes", - "encoding_rs", - "futures-core", - "futures-util", - "h2", - "http", - "http-body", - "http-body-util", - "hyper", - "hyper-rustls", - "hyper-util", - "ipnet", - "js-sys", - "log", - "mime", - "mime_guess", - "once_cell", - "percent-encoding", - "pin-project-lite", - "quinn", - "rustls", - "rustls-native-certs", - "rustls-pemfile", - "rustls-pki-types", - "serde", - "serde_json", - "serde_urlencoded", - "sync_wrapper", - "system-configuration 0.8.0", - "tokio", - "tokio-rustls", - "tokio-socks", - "tokio-util", - "tower", - "tower-service", - "url", - "wasm-bindgen", - "wasm-bindgen-futures", - "wasm-streams", - "web-sys", - "windows-registry 0.4.0", -] - -[[package]] -name = "zed-reqwest" -version = "0.12.15-zed" -source = "git+https://github.com/zed-industries/reqwest.git?rev=c15662463bda39148ba154100dd44d3fba5873a4#c15662463bda39148ba154100dd44d3fba5873a4" -dependencies = [ - "base64 0.22.1", - "bytes", - "encoding_rs", - "futures-core", - "futures-util", - "h2", - "http", - "http-body", - "http-body-util", - "hyper", - "hyper-rustls", - "hyper-util", - "ipnet", - "js-sys", - "log", - "mime", - "mime_guess", - "once_cell", - "percent-encoding", - "pin-project-lite", - "quinn", - "rustls", - "rustls-native-certs", - "rustls-pemfile", - "rustls-pki-types", - "serde", - "serde_json", - "serde_urlencoded", - "sync_wrapper", - "system-configuration 0.6.1", - "tokio", - "tokio-rustls", - "tokio-socks", - "tokio-util", - "tower", - "tower-service", - "url", - "wasm-bindgen", - "wasm-bindgen-futures", - "wasm-streams", - "web-sys", - "windows-registry 0.4.0", -] - [[package]] name = "zed-scap" version = "0.0.8-zed" -source = "git+https://github.com/zed-industries/scap?rev=4afea48c3b002197176fb19cd0f9b180dd36eaac#4afea48c3b002197176fb19cd0f9b180dd36eaac" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6b338d705ae33a43ca00287c11129303a7a0aa57b101b72a1c08c863f698ac8" dependencies = [ "anyhow", "cocoa 0.25.0", @@ -11303,22 +11387,11 @@ dependencies = [ "xcb", ] -[[package]] -name = "zed-sum-tree" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d490156d0d7311855564d6e1d6dccab992405a0c0e15e1c8ef18920c02177e35" -dependencies = [ - "arrayvec", - "log", - "rayon", - "workspace-hack", -] - [[package]] name = "zed-xim" version = "0.4.0-zed" -source = "git+https://github.com/zed-industries/xim-rs.git?rev=16f35a2c881b815a2b6cdfd6687988e84f8447d8#16f35a2c881b815a2b6cdfd6687988e84f8447d8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c0b46ed118eba34d9ba53d94ddc0b665e0e06a2cf874cfa2dd5dec278148642" dependencies = [ "ahash", "hashbrown 0.14.5", @@ -11434,39 +11507,12 @@ version = "0.6.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34b31d188d9d685a4f9c7b46d6e36631b07058d2cfe190267adce54dc230bf12" -[[package]] -name = "zlog" -version = "0.1.0" -source = "git+https://github.com/zed-industries/zed#7960b2a7c9568e90fbe0727332149e5b2a5fd57a" -dependencies = [ - "anyhow", - "chrono", - "collections", - "log", -] - [[package]] name = "zmij" version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "29666d0abbfad1e3dc4dcf6144730dd3a3ab225bbbdac83319345b1b44ccfc1b" -[[package]] -name = "ztracing" -version = "0.1.0" -source = "git+https://github.com/zed-industries/zed#7960b2a7c9568e90fbe0727332149e5b2a5fd57a" -dependencies = [ - "tracing", - "tracing-subscriber", - "zlog", - "ztracing_macro", -] - -[[package]] -name = "ztracing_macro" -version = "0.1.0" -source = "git+https://github.com/zed-industries/zed#7960b2a7c9568e90fbe0727332149e5b2a5fd57a" - [[package]] name = "zune-core" version = "0.4.12" diff --git a/Cargo.toml b/Cargo.toml index 359ca4e..77fe390 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,15 +9,13 @@ edition = "2024" publish = false [workspace.dependencies] -# GPUI -gpui = { git = "https://github.com/zed-industries/zed" } -gpui_platform = { git = "https://github.com/zed-industries/zed", features = ["font-kit", "x11", "wayland"] } -gpui_tokio = { git = "https://github.com/zed-industries/zed" } -reqwest_client = { git = "https://github.com/zed-industries/zed" } +gpui = { package = "gpui-pre", version = "0.3.6" } +gpui_platform = { package = "gpui-pre-platform", version = "0.3.6", features = ["font-kit", "x11", "wayland"] } +reqwest_client = { package = "gpui-pre-reqwest-client", version = "0.3.6" } # GPUI Kit -gpui-component = { git = "https://github.com/longbridge/gpui-component", rev = "39c2c86dbee7ad445591462f8675f74082e10828", features = ["tree-sitter-languages"], } -gpui-base = { git = "https://github.com/longbridge/gpui-component", rev = "39c2c86dbee7ad445591462f8675f74082e10828" } +gpui-component = { version = "0.6.6", features = ["tree-sitter-languages"] } +gpui-base = "0.6.6" dock = { path = "crates/dock" } settings = { path = "crates/settings" } diff --git a/crates/dock/src/dock_area.rs b/crates/dock/src/dock_area.rs index de017bd..92060ad 100644 --- a/crates/dock/src/dock_area.rs +++ b/crates/dock/src/dock_area.rs @@ -11,22 +11,19 @@ use gpui::{ }; use gpui_base::dock::{ DockArea, DockAreaRenderer, DockContext, DockEvent, DockPlacement, NodeId, PanelState, - PanelView, TabGroupRenderer, TilesRenderer, + PanelView, TabGroupRenderer, }; use gpui_base::resize_handle; -use gpui_component::scroll::ScrollbarMode; use gpui_component::{ActiveTheme as _, Side}; use crate::invalid_panel::InvalidPanel; +use crate::panel_handle; use crate::tab_panel::SignedTabGroupSkin; -use crate::tiles::SignedTilesSkin; -use crate::{TAB_BAR_HEIGHT, panel_handle}; /// State the skin shares with its per-container renderers. pub(crate) struct SkinShared { area: WeakEntity, toggle_button_visible: Cell, - tiles_scrollbar_mode: Cell>, /// The dock whose resize handle is being dragged, if any. Only one can be. resizing_dock: Cell>, } @@ -40,10 +37,6 @@ impl SkinShared { self.toggle_button_visible.get() } - pub(crate) fn tiles_scrollbar_mode(&self) -> Option { - self.tiles_scrollbar_mode.get() - } - pub(crate) fn resizing_dock(&self) -> &Cell> { &self.resizing_dock } @@ -73,7 +66,6 @@ impl SignedDockSkin { shared: Rc::new(SkinShared { area: cx.weak_entity(), toggle_button_visible: Cell::new(true), - tiles_scrollbar_mode: Cell::new(None), resizing_dock: Cell::new(None), }), }) @@ -92,16 +84,6 @@ impl SignedDockSkin { self.shared.toggle_button_visible.set(visible); self.shared.notify(cx); } - - /// When a tiles canvas shows its scrollbar. `None` follows the theme. - pub fn tiles_scrollbar_mode(&self) -> Option { - self.shared.tiles_scrollbar_mode() - } - - pub fn set_tiles_scrollbar_mode(&self, mode: Option, cx: &mut App) { - self.shared.tiles_scrollbar_mode.set(mode); - self.shared.notify(cx); - } } /// Payload a dock's resize handle drags. @@ -154,16 +136,10 @@ impl DockAreaRenderer for SignedDockSkin { window: &mut Window, cx: &mut App, ) -> AnyElement { - let placement = dock.placement(); - div() .flex() .size_full() .relative() - // A closed bottom dock keeps a strip, and that strip is the tab bar. - .when(!dock.is_open() && placement.is_bottom(), |this| { - this.h(TAB_BAR_HEIGHT) - }) .child(content) .child(self.render_resize_handle(dock, window, cx)) .child(DockResizeTracker { @@ -190,10 +166,6 @@ impl DockAreaRenderer for SignedDockSkin { fn tab_group_renderer(&self) -> Rc { Rc::new(SignedTabGroupSkin::new(self.shared().clone())) } - - fn tiles_renderer(&self) -> Rc { - Rc::new(SignedTilesSkin::new(self.shared().clone())) - } } impl SignedDockSkin { diff --git a/crates/dock/src/lib.rs b/crates/dock/src/lib.rs index 005b376..f073e8f 100644 --- a/crates/dock/src/lib.rs +++ b/crates/dock/src/lib.rs @@ -6,7 +6,6 @@ use gpui_base::dock::PanelView; mod dock_area; mod invalid_panel; mod tab_panel; -mod tiles; mod window_controls; pub use dock_area::SignedDockSkin; diff --git a/crates/dock/src/tab_panel.rs b/crates/dock/src/tab_panel.rs index 774fd9c..00e4463 100644 --- a/crates/dock/src/tab_panel.rs +++ b/crates/dock/src/tab_panel.rs @@ -30,6 +30,10 @@ use crate::{TAB_BAR_HEIGHT, t, window_controls}; /// The drag preview's size, reported to base for the drop placeholder. const DRAG_PREVIEW_SIZE: gpui::Size = size(px(96.), px(30.)); +/// The key a collapsed dock's stand-in tab bar is tagged with, so a test can +/// measure that it fits the strip base reserves. A no-op outside test builds. +const COLLAPSED_TAB_BAR_SELECTOR: &str = "signed-dock-collapsed-tab-bar"; + /// A panel's title, or its registered name when the panel has no handle. pub(crate) fn panel_title( panel: &Arc, @@ -84,7 +88,6 @@ fn left_top_group(node: &PaneNode) -> Option { match node.kind() { PaneRef::Tabs { .. } => Some(node.id()), PaneRef::Split { children, .. } => children.first().and_then(left_top_group), - PaneRef::Tiles { .. } => None, } } @@ -98,7 +101,6 @@ fn right_top_group(node: &PaneNode) -> Option { gpui::Axis::Horizontal => children.last(), } .and_then(right_top_group), - PaneRef::Tiles { .. } => None, } } @@ -709,7 +711,16 @@ impl TabGroupRenderer for SignedTabGroupSkin { .child( Tabs::new("tab-bar") .px(px(-1.)) - .h(TAB_BAR_HEIGHT) + // A collapsed group stands in for a closed bottom dock, + // which base gives only its reserved strip. The bar keeps + // its own height there rather than the title-bar height, + // so it fits instead of being clipped away. + .when(!collapsed, |this| this.h(TAB_BAR_HEIGHT)) + // Only a collapsed (bottom) dock tags its bar, so the + // selector is unique when a test measures it. + .when(collapsed, |this| { + this.debug_selector(|| COLLAPSED_TAB_BAR_SELECTOR.to_string()) + }) .flex() .items_center() .text_color(cx.theme().tab_foreground) @@ -833,3 +844,112 @@ impl TabGroupRenderer for SignedTabGroupSkin { ) } } + +#[cfg(test)] +mod tests { + use gpui::{ + App, AppContext as _, Context, Empty, EventEmitter, FocusHandle, Focusable, IntoElement, + Render, TestAppContext, Window, px, + }; + use gpui_base::dock::{DockArea, DockLayout, DockPlacement, PanelEvent}; + + use super::COLLAPSED_TAB_BAR_SELECTOR; + use crate::{BasePanel, Panel, SignedDockSkin, panel_handle}; + + struct Probe { + focus_handle: FocusHandle, + } + + impl Probe { + fn new(cx: &mut Context) -> Self { + Self { + focus_handle: cx.focus_handle(), + } + } + } + + impl BasePanel for Probe { + fn panel_name(&self) -> &'static str { + "Probe" + } + } + + impl Panel for Probe { + fn title(&mut self, _: &mut Window, _: &mut Context) -> impl IntoElement { + "Probe" + } + } + + impl EventEmitter for Probe {} + + impl Focusable for Probe { + fn focus_handle(&self, _: &App) -> FocusHandle { + self.focus_handle.clone() + } + } + + impl Render for Probe { + fn render(&mut self, _: &mut Window, _: &mut Context) -> impl IntoElement { + Empty + } + } + + /// Base reserves only `gpui_base::dock::CLOSED_BOTTOM_STRIP` for a closed + /// bottom dock, so the tab bar drawn in place of one has to shrink to that + /// height; at the full title-bar height its bottom was clipped away. + #[gpui::test] + fn a_collapsed_bottom_dock_bar_fits_the_reserved_strip(cx: &mut TestAppContext) { + cx.update(|cx| { + gpui_component::init(cx); + }); + let (area, cx) = cx.add_window_view(|window, cx| { + let skin = SignedDockSkin::new(cx); + DockArea::new("test", None, window, cx).with_renderer(skin) + }); + + cx.update(|window, cx| { + let center = cx.new(Probe::new); + let bottom = cx.new(Probe::new); + area.update(cx, |area, cx| { + area.set_center( + DockLayout::tabs().panel_view(panel_handle(center), cx), + window, + cx, + ); + area.set_dock( + DockPlacement::Bottom, + DockLayout::tabs().panel_view(panel_handle(bottom), cx), + window, + cx, + ); + }); + }); + cx.run_until_parked(); + cx.update(|window, cx| window.draw(cx).clear(cx)); + + // Open, nothing is collapsed, so no bar carries the selector. + assert!(cx.debug_bounds(COLLAPSED_TAB_BAR_SELECTOR).is_none()); + + cx.update(|window, cx| { + area.update(cx, |area, cx| { + area.toggle_dock(DockPlacement::Bottom, window, cx); + }); + }); + cx.run_until_parked(); + cx.update(|window, cx| window.draw(cx).clear(cx)); + + let bounds = cx + .debug_bounds(COLLAPSED_TAB_BAR_SELECTOR) + .expect("a collapsed bottom dock draws its stand-in tab bar"); + // `gpui_base::dock::CLOSED_BOTTOM_STRIP`, which the engine does not + // re-export. The bar used to be `TAB_BAR_HEIGHT` here and its bottom was + // clipped away; it now has to fit inside what base reserves. + let reserved_strip = px(29.); + assert!( + bounds.size.height <= reserved_strip, + "the collapsed bar is {}px tall, more than the {}px strip base reserves", + bounds.size.height, + reserved_strip, + ); + } +} diff --git a/crates/dock/src/tiles.rs b/crates/dock/src/tiles.rs deleted file mode 100644 index 39e6000..0000000 --- a/crates/dock/src/tiles.rs +++ /dev/null @@ -1,388 +0,0 @@ -use std::rc::Rc; - -use gpui::prelude::FluentBuilder as _; -use gpui::{ - AnyElement, App, AppContext as _, Context, Div, DragMoveEvent, Empty, InteractiveElement as _, - IntoElement, MouseButton, MouseDownEvent, ParentElement as _, Pixels, Render, ScrollHandle, - Size, Stateful, StatefulInteractiveElement as _, Styled as _, Window, div, px, -}; -use gpui_base::dock::{ - DRAG_BAR_HEIGHT, HANDLE_SIZE, NodeId, ResizeSide, TileContext, TilesRenderer, -}; -use gpui_component::button::{Button, ButtonVariants as _}; -use gpui_component::dock::PanelHandle; -use gpui_component::menu::{DropdownMenu as _, PopupMenuItem}; -use gpui_component::scroll::Scrollbar; -use gpui_component::{ - ActiveTheme as _, Icon, IconName, Selectable as _, Sizable as _, h_flex, v_flex, -}; - -use crate::dock_area::SkinShared; -use crate::t; -use crate::tab_panel::panel_title; - -/// How far a resize handle sticks out past the tile's edge. -const HANDLE_OFFSET: Pixels = px(-4.); - -/// The payload a tile drag carries, so one canvas ignores another's drags. -#[derive(Clone)] -struct DragMoving(NodeId); - -impl Render for DragMoving { - fn render(&mut self, _: &mut Window, _: &mut Context) -> impl IntoElement { - Empty - } -} - -/// The payload a tile resize carries, for the same reason. -#[derive(Clone)] -struct DragResizing(NodeId); - -impl Render for DragResizing { - fn render(&mut self, _: &mut Window, _: &mut Context) -> impl IntoElement { - Empty - } -} - -/// One tiles canvas's appearance. -/// Built once per container, so its scroll position belongs to the canvas it scrolls. -pub(crate) struct SignedTilesSkin { - shared: Rc, - scroll_handle: ScrollHandle, -} - -impl SignedTilesSkin { - pub(crate) fn new(shared: Rc) -> Self { - Self { - shared, - scroll_handle: ScrollHandle::default(), - } - } - - fn resize_handle( - &self, - tile: &TileContext, - id: &'static str, - side: ResizeSide, - build: impl FnOnce(Stateful
) -> Stateful
, - ) -> Stateful
{ - let node = tile.node(); - - build(div().id(id).absolute()) - .on_mouse_down(MouseButton::Left, { - let tile = tile.clone(); - move |event: &MouseDownEvent, window, cx| { - tile.begin_resize(side, event.position, window, cx); - cx.stop_propagation(); - } - }) - .on_drag(DragResizing(node), |drag, _, _, cx| { - cx.stop_propagation(); - cx.new(|_| drag.clone()) - }) - .on_drag_move({ - let tile = tile.clone(); - move |event: &DragMoveEvent, window, cx| { - if event.drag(cx).0 != node { - return; - } - tile.resize_to(event.event.position, window, cx); - } - }) - } - - /// The trailing controls of a tile's title bar, zoom, close and the ellipsis menu. - /// They use click handlers, the zoom and close actions target a focused tab group. - fn render_tile_controls( - &self, - tile: &TileContext, - window: &mut Window, - cx: &mut App, - ) -> impl IntoElement { - let handle = PanelHandle::of(tile.panel()); - let control = handle.and_then(|handle| handle.zoom_control(cx)); - let zoomed = tile.is_zoomed(); - let toolbar_zoom = - tile.is_zoomable() && control.is_some_and(|control| control.toolbar_visible()); - let menu_zoom = tile.is_zoomable() && control.is_some_and(|control| control.menu_visible()); - let closable = tile.is_closable(); - let buttons = handle.and_then(|handle| handle.toolbar_buttons(window, cx)); - let panel = handle.map(|handle| handle.panel()); - - h_flex() - .gap_1() - .flex_shrink_0() - .occlude() - .when_some(buttons, |this, buttons| { - this.children( - buttons - .into_iter() - .map(|button| button.xsmall().ghost().tab_stop(false)), - ) - }) - .when_some( - match (zoomed, toolbar_zoom) { - (true, _) => Some(("zoom-out", IconName::Minimize, t("Dock.Zoom Out"))), - (false, true) => Some(("zoom-in", IconName::Maximize, t("Dock.Zoom In"))), - (false, false) => None, - }, - |this, (id, icon, tooltip)| { - this.child( - Button::new(id) - .icon(icon) - .xsmall() - .ghost() - .tab_stop(false) - .tooltip(tooltip) - .selected(zoomed) - .on_click({ - let tile = tile.clone(); - move |_, window, cx| tile.toggle_zoom(window, cx) - }), - ) - }, - ) - .child( - Button::new("menu") - .icon(IconName::Ellipsis) - .xsmall() - .ghost() - .tab_stop(false) - .dropdown_menu({ - let tile = tile.clone(); - move |menu, window, cx| { - menu.when_some(panel.clone(), |menu, panel| { - panel.dropdown_menu(menu, window, cx) - }) - .separator() - .item( - PopupMenuItem::new(match zoomed { - true => t("Dock.Zoom Out"), - false => t("Dock.Zoom In"), - }) - .disabled(!menu_zoom && !zoomed) - .on_click({ - let tile = tile.clone(); - move |_, window, cx| tile.toggle_zoom(window, cx) - }), - ) - .when(closable, |menu| { - menu.separator() - .item(PopupMenuItem::new(t("Dock.Close")).on_click({ - let tile = tile.clone(); - move |_, window, cx| tile.close(window, cx) - })) - }) - } - }) - .anchor(gpui::Anchor::TopRight), - ) - } -} - -impl TilesRenderer for SignedTilesSkin { - fn frame(&self, _: &mut Window, cx: &mut App) -> Stateful
{ - div() - .id("tiles") - .relative() - .size_full() - .bg(cx.theme().tokens.tiles) - .track_scroll(&self.scroll_handle) - .overflow_scroll() - } - - fn tile_frame(&self, tile: &TileContext, _: &mut Window, cx: &mut App) -> Stateful
{ - v_flex() - .id(("tile", tile.panel_id().as_u64())) - .occlude() - .overflow_hidden() - .bg(cx.theme().tokens.background) - .border_1() - .border_color(cx.theme().border) - .rounded(cx.theme().tile_radius) - // Room for the title bar, which overlays the top padding. - // Base draws the panel as a plain child, this keeps them apart. - .pt(DRAG_BAR_HEIGHT) - // Base stores no bounds on a zoomed tile, the skin decides how it fills the dock. - .when(tile.is_zoomed(), |this| this.size_full()) - .on_mouse_down(MouseButton::Left, { - let tile = tile.clone(); - move |_, window, cx| tile.bring_to_front(window, cx) - }) - // A gesture can end anywhere, so both mouse-up hooks run. - // Each is a no-op unless this tile is the one that moved. - .on_mouse_up(MouseButton::Left, { - let tile = tile.clone(); - move |_, window, cx| { - tile.end_move(window, cx); - tile.end_resize(window, cx); - } - }) - .on_mouse_up_out(MouseButton::Left, { - let tile = tile.clone(); - move |_, window, cx| { - tile.end_move(window, cx); - tile.end_resize(window, cx); - } - }) - } - - fn render_drag_bar(&self, tile: &TileContext, window: &mut Window, cx: &mut App) -> AnyElement { - let node = tile.node(); - let handle = PanelHandle::of(tile.panel()); - let title_style = handle.and_then(|handle| handle.title_style(cx)); - - h_flex() - .id("drag-bar") - .absolute() - .top_0() - .left_0() - .w_full() - .h(DRAG_BAR_HEIGHT) - .items_center() - .gap_1() - .pl_3() - .pr_2() - .when_some(title_style, |this, style| { - this.bg(style.background).text_color(style.foreground) - }) - .child( - div() - .flex_1() - .min_w_16() - .overflow_hidden() - .text_ellipsis() - .whitespace_nowrap() - .child(panel_title(tile.panel(), window, cx)), - ) - .children(handle.and_then(|handle| handle.title_suffix(window, cx))) - .child(self.render_tile_controls(tile, window, cx)) - // A zoomed tile is not at its stored bounds, so moving it would mean nothing. - .when(!tile.is_zoomed(), |this| { - this.cursor_grab() - .on_mouse_down(MouseButton::Left, { - let tile = tile.clone(); - move |event: &MouseDownEvent, window, cx| { - tile.begin_move(event.position, window, cx); - } - }) - .on_drag(DragMoving(node), |drag, _, _, cx| { - cx.stop_propagation(); - cx.new(|_| drag.clone()) - }) - .on_drag_move({ - let tile = tile.clone(); - move |event: &DragMoveEvent, window, cx| { - if event.drag(cx).0 != node { - return; - } - tile.move_to(event.event.position, window, cx); - } - }) - }) - .into_any_element() - } - - fn render_resize_handles( - &self, - tile: &TileContext, - _: &mut Window, - cx: &mut App, - ) -> AnyElement { - let bounds = tile.bounds(); - - // A passive full-tile box, so handles sit against the tile, not its flow neighbours. - // It registers no interaction, so it does not shadow the panel underneath. - div() - .absolute() - .top_0() - .left_0() - .size_full() - .child( - self.resize_handle(tile, "left-resize-handle", ResizeSide::Left, |this| { - this.cursor_ew_resize() - .top_0() - .left(HANDLE_OFFSET) - .w(HANDLE_SIZE) - .h(bounds.size.height) - }), - ) - .child( - self.resize_handle(tile, "right-resize-handle", ResizeSide::Right, |this| { - this.cursor_ew_resize() - .top_0() - .right(HANDLE_OFFSET) - .w(HANDLE_SIZE) - .h(bounds.size.height) - }), - ) - .child( - self.resize_handle(tile, "top-resize-handle", ResizeSide::Top, |this| { - this.cursor_ns_resize() - .left_0() - .top(HANDLE_OFFSET) - .w(bounds.size.width) - .h(HANDLE_SIZE) - }), - ) - .child( - self.resize_handle(tile, "bottom-resize-handle", ResizeSide::Bottom, |this| { - this.cursor_ns_resize() - .left_0() - .bottom(HANDLE_OFFSET) - .w(bounds.size.width) - .h(HANDLE_SIZE) - }), - ) - .child( - Icon::new(IconName::ResizeCorner) - .size_3() - .absolute() - .right(px(1.)) - .bottom(px(1.)) - .text_color(cx.theme().muted_foreground.opacity(0.5)), - ) - .child(self.resize_handle( - tile, - "corner-resize-handle", - ResizeSide::BottomRight, - |this| { - this.cursor_nwse_resize() - .right(HANDLE_OFFSET) - .bottom(HANDLE_OFFSET) - .size_3() - }, - )) - .into_any_element() - } - - /// Gives the tile's panel `size_full`, base draws it as a plain child otherwise. - fn panel_frame(&self, tile: &TileContext, _: &mut Window, _: &mut App) -> Stateful
{ - h_flex() - .id(("tile-panel", tile.panel_id().as_u64())) - .overflow_hidden() - .size_full() - } - - /// The canvas scrollbar, as an overlay. - /// Placed inside the frame it would end up underneath every tile. - fn render_overlay( - &self, - content: Size, - _: &mut Window, - _: &mut App, - ) -> Option { - Some( - Scrollbar::new(&self.scroll_handle) - .scroll_size(content) - .when_some(self.shared.tiles_scrollbar_mode(), |this, mode| { - this.mode(mode) - }) - .into_any_element(), - ) - } - - fn grid_size(&self, cx: &App) -> Pixels { - cx.theme().tile_grid_size - } -}