chore: Switch gpui to depends on Zed official. (#912)
Now, GPUI have merged `window_handle` support for all platforms. - https://github.com/zed-industries/zed/pull/24327 - https://github.com/zed-industries/zed/pull/24545 - https://github.com/zed-industries/zed/pull/28152 It's time to depends on Zed official main branch.
This commit is contained in:
parent
a4aff404ce
commit
901312bc5a
9 changed files with 27 additions and 27 deletions
27
Cargo.lock
generated
27
Cargo.lock
generated
|
|
@ -1203,7 +1203,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "collections"
|
name = "collections"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/huacnlee/zed.git?branch=webview#85befe24cc564f1f526ead3b09fd22d98b146248"
|
source = "git+https://github.com/zed-industries/zed.git#ab6125ddde518c0c021ecae54f64d86b8c4f5008"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"indexmap 2.7.1",
|
"indexmap 2.7.1",
|
||||||
"rustc-hash 2.1.0",
|
"rustc-hash 2.1.0",
|
||||||
|
|
@ -1716,7 +1716,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "derive_refineable"
|
name = "derive_refineable"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/huacnlee/zed.git?branch=webview#85befe24cc564f1f526ead3b09fd22d98b146248"
|
source = "git+https://github.com/zed-industries/zed.git#ab6125ddde518c0c021ecae54f64d86b8c4f5008"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
|
|
@ -2754,7 +2754,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "gpui"
|
name = "gpui"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/huacnlee/zed.git?branch=webview#85befe24cc564f1f526ead3b09fd22d98b146248"
|
source = "git+https://github.com/zed-industries/zed.git#ab6125ddde518c0c021ecae54f64d86b8c4f5008"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"as-raw-xcb-connection",
|
"as-raw-xcb-connection",
|
||||||
|
|
@ -2791,6 +2791,7 @@ dependencies = [
|
||||||
"image",
|
"image",
|
||||||
"inventory",
|
"inventory",
|
||||||
"itertools 0.14.0",
|
"itertools 0.14.0",
|
||||||
|
"libc",
|
||||||
"log",
|
"log",
|
||||||
"lyon",
|
"lyon",
|
||||||
"media",
|
"media",
|
||||||
|
|
@ -2907,7 +2908,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "gpui_macros"
|
name = "gpui_macros"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/huacnlee/zed.git?branch=webview#85befe24cc564f1f526ead3b09fd22d98b146248"
|
source = "git+https://github.com/zed-industries/zed.git#ab6125ddde518c0c021ecae54f64d86b8c4f5008"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"heck 0.5.0",
|
"heck 0.5.0",
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
|
|
@ -3177,7 +3178,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "http_client"
|
name = "http_client"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/huacnlee/zed.git?branch=webview#85befe24cc564f1f526ead3b09fd22d98b146248"
|
source = "git+https://github.com/zed-industries/zed.git#ab6125ddde518c0c021ecae54f64d86b8c4f5008"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"bytes",
|
"bytes",
|
||||||
|
|
@ -3194,7 +3195,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "http_client_tls"
|
name = "http_client_tls"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/huacnlee/zed.git?branch=webview#85befe24cc564f1f526ead3b09fd22d98b146248"
|
source = "git+https://github.com/zed-industries/zed.git#ab6125ddde518c0c021ecae54f64d86b8c4f5008"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"rustls",
|
"rustls",
|
||||||
"rustls-platform-verifier",
|
"rustls-platform-verifier",
|
||||||
|
|
@ -3955,7 +3956,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "media"
|
name = "media"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/huacnlee/zed.git?branch=webview#85befe24cc564f1f526ead3b09fd22d98b146248"
|
source = "git+https://github.com/zed-industries/zed.git#ab6125ddde518c0c021ecae54f64d86b8c4f5008"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"bindgen 0.71.1",
|
"bindgen 0.71.1",
|
||||||
|
|
@ -5656,7 +5657,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "refineable"
|
name = "refineable"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/huacnlee/zed.git?branch=webview#85befe24cc564f1f526ead3b09fd22d98b146248"
|
source = "git+https://github.com/zed-industries/zed.git#ab6125ddde518c0c021ecae54f64d86b8c4f5008"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"derive_refineable",
|
"derive_refineable",
|
||||||
"workspace-hack",
|
"workspace-hack",
|
||||||
|
|
@ -5751,7 +5752,7 @@ dependencies = [
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "reqwest_client"
|
name = "reqwest_client"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/huacnlee/zed.git?branch=webview#85befe24cc564f1f526ead3b09fd22d98b146248"
|
source = "git+https://github.com/zed-industries/zed.git#ab6125ddde518c0c021ecae54f64d86b8c4f5008"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"bytes",
|
"bytes",
|
||||||
|
|
@ -6284,7 +6285,7 @@ checksum = "d369a96f978623eb3dc28807c4852d6cc617fed53da5d3c400feff1ef34a714a"
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "semantic_version"
|
name = "semantic_version"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/huacnlee/zed.git?branch=webview#85befe24cc564f1f526ead3b09fd22d98b146248"
|
source = "git+https://github.com/zed-industries/zed.git#ab6125ddde518c0c021ecae54f64d86b8c4f5008"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"serde",
|
"serde",
|
||||||
|
|
@ -6771,7 +6772,7 @@ checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292"
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "sum_tree"
|
name = "sum_tree"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/huacnlee/zed.git?branch=webview#85befe24cc564f1f526ead3b09fd22d98b146248"
|
source = "git+https://github.com/zed-industries/zed.git#ab6125ddde518c0c021ecae54f64d86b8c4f5008"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"arrayvec",
|
"arrayvec",
|
||||||
"log",
|
"log",
|
||||||
|
|
@ -7888,7 +7889,7 @@ checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821"
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "util"
|
name = "util"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/huacnlee/zed.git?branch=webview#85befe24cc564f1f526ead3b09fd22d98b146248"
|
source = "git+https://github.com/zed-industries/zed.git#ab6125ddde518c0c021ecae54f64d86b8c4f5008"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"async-fs 2.1.2",
|
"async-fs 2.1.2",
|
||||||
|
|
@ -7912,8 +7913,6 @@ dependencies = [
|
||||||
"tempfile",
|
"tempfile",
|
||||||
"tendril",
|
"tendril",
|
||||||
"unicase",
|
"unicase",
|
||||||
"unicode-script",
|
|
||||||
"unicode-segmentation",
|
|
||||||
"walkdir",
|
"walkdir",
|
||||||
"workspace-hack",
|
"workspace-hack",
|
||||||
]
|
]
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ default-members = ["crates/story"]
|
||||||
resolver = "2"
|
resolver = "2"
|
||||||
|
|
||||||
[workspace.dependencies]
|
[workspace.dependencies]
|
||||||
gpui = { git = "https://github.com/huacnlee/zed.git", branch = "webview" }
|
gpui = { git = "https://github.com/zed-industries/zed.git" }
|
||||||
gpui-component = { path = "crates/ui" }
|
gpui-component = { path = "crates/ui" }
|
||||||
story = { path = "crates/story" }
|
story = { path = "crates/story" }
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -25,10 +25,8 @@ We built multi-theme support in the application. This feature is not included in
|
||||||
|
|
||||||
GPUI and GPUI Component are still in development, so you need to add dependencies by git.
|
GPUI and GPUI Component are still in development, so you need to add dependencies by git.
|
||||||
|
|
||||||
GPUI Component depends on a specific version of `gpui` (kept updated with upstream) to include WebView support.
|
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
gpui = { git = "https://github.com/huacnlee/zed.git", branch = "webview" }
|
gpui = { git = "https://github.com/zed-industries/zed.git" }
|
||||||
gpui-component = { git = "https://github.com/longbridge/gpui-component.git" }
|
gpui-component = { git = "https://github.com/longbridge/gpui-component.git" }
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ gpui-component = { workspace = true, features = ["webview"] }
|
||||||
rand = "0.8"
|
rand = "0.8"
|
||||||
raw-window-handle = { version = "0.6", features = ["std"] }
|
raw-window-handle = { version = "0.6", features = ["std"] }
|
||||||
regex = "1"
|
regex = "1"
|
||||||
reqwest_client = { git = "https://github.com/huacnlee/zed.git", branch = "webview" }
|
reqwest_client = { git = "https://github.com/zed-industries/zed.git" }
|
||||||
rust-embed = "8.5.0"
|
rust-embed = "8.5.0"
|
||||||
serde = "1"
|
serde = "1"
|
||||||
serde_json = "1"
|
serde_json = "1"
|
||||||
|
|
|
||||||
|
|
@ -351,7 +351,10 @@ impl<M: ManagedView> Element for Popover<M> {
|
||||||
.popover_layout_id
|
.popover_layout_id
|
||||||
.map(|id| window.layout_bounds(id));
|
.map(|id| window.layout_bounds(id));
|
||||||
|
|
||||||
let hitbox = window.insert_hitbox(trigger_bounds.unwrap_or_default(), false);
|
let hitbox = window.insert_hitbox(
|
||||||
|
trigger_bounds.unwrap_or_default(),
|
||||||
|
gpui::HitboxBehavior::Normal,
|
||||||
|
);
|
||||||
|
|
||||||
PrepaintState {
|
PrepaintState {
|
||||||
trigger_bounds,
|
trigger_bounds,
|
||||||
|
|
|
||||||
|
|
@ -93,7 +93,7 @@ impl Element for ScrollableMask {
|
||||||
size: bounds.size,
|
size: bounds.size,
|
||||||
};
|
};
|
||||||
|
|
||||||
window.insert_hitbox(cover_bounds, false)
|
window.insert_hitbox(cover_bounds, gpui::HitboxBehavior::Normal)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn paint(
|
fn paint(
|
||||||
|
|
|
||||||
|
|
@ -464,7 +464,7 @@ impl Element for Scrollbar {
|
||||||
cx: &mut App,
|
cx: &mut App,
|
||||||
) -> Self::PrepaintState {
|
) -> Self::PrepaintState {
|
||||||
let hitbox = window.with_content_mask(Some(ContentMask { bounds }), |window| {
|
let hitbox = window.with_content_mask(Some(ContentMask { bounds }), |window| {
|
||||||
window.insert_hitbox(bounds, false)
|
window.insert_hitbox(bounds, gpui::HitboxBehavior::Normal)
|
||||||
});
|
});
|
||||||
|
|
||||||
let mut states = vec![];
|
let mut states = vec![];
|
||||||
|
|
@ -613,7 +613,7 @@ impl Element for Scrollbar {
|
||||||
};
|
};
|
||||||
|
|
||||||
let bar_hitbox = window.with_content_mask(Some(ContentMask { bounds }), |window| {
|
let bar_hitbox = window.with_content_mask(Some(ContentMask { bounds }), |window| {
|
||||||
window.insert_hitbox(bounds, false)
|
window.insert_hitbox(bounds, gpui::HitboxBehavior::Normal)
|
||||||
});
|
});
|
||||||
|
|
||||||
states.push(AxisPrepaintState {
|
states.push(AxisPrepaintState {
|
||||||
|
|
|
||||||
|
|
@ -187,7 +187,7 @@ impl Element for WebViewElement {
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|
||||||
// Create a hitbox to handle mouse event
|
// Create a hitbox to handle mouse event
|
||||||
Some(window.insert_hitbox(bounds, false))
|
Some(window.insert_hitbox(bounds, gpui::HitboxBehavior::Normal))
|
||||||
}
|
}
|
||||||
|
|
||||||
fn paint(
|
fn paint(
|
||||||
|
|
|
||||||
|
|
@ -2,8 +2,8 @@
|
||||||
// https://github.com/zed-industries/zed/blob/a8afc63a91f6b75528540dcffe73dc8ce0c92ad8/crates/gpui/examples/window_shadow.rs
|
// https://github.com/zed-industries/zed/blob/a8afc63a91f6b75528540dcffe73dc8ce0c92ad8/crates/gpui/examples/window_shadow.rs
|
||||||
use gpui::{
|
use gpui::{
|
||||||
canvas, div, point, prelude::FluentBuilder as _, px, AnyElement, App, Bounds, CursorStyle,
|
canvas, div, point, prelude::FluentBuilder as _, px, AnyElement, App, Bounds, CursorStyle,
|
||||||
Decorations, Edges, Hsla, InteractiveElement as _, IntoElement, MouseButton, ParentElement,
|
Decorations, Edges, HitboxBehavior, Hsla, InteractiveElement as _, IntoElement, MouseButton,
|
||||||
Pixels, Point, RenderOnce, ResizeEdge, Size, Styled as _, Window,
|
ParentElement, Pixels, Point, RenderOnce, ResizeEdge, Size, Styled as _, Window,
|
||||||
};
|
};
|
||||||
|
|
||||||
use crate::ActiveTheme;
|
use crate::ActiveTheme;
|
||||||
|
|
@ -83,7 +83,7 @@ impl RenderOnce for WindowBorder {
|
||||||
point(px(0.0), px(0.0)),
|
point(px(0.0), px(0.0)),
|
||||||
window.window_bounds().get_bounds().size,
|
window.window_bounds().get_bounds().size,
|
||||||
),
|
),
|
||||||
false,
|
HitboxBehavior::Normal,
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
move |_bounds, hitbox, window, _| {
|
move |_bounds, hitbox, window, _| {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue