diff --git a/Cargo.toml b/Cargo.toml index ce5e5dae..15e87cc0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,6 +17,10 @@ members = [ ] resolver = "2" +[workspace.package] +publish = false +edition = "2024" + [workspace.dependencies] gpui-component = { path = "crates/ui", version = "0.4.1" } gpui-component-macros = { path = "crates/macros", version = "0.4.1" } diff --git a/crates/assets/Cargo.toml b/crates/assets/Cargo.toml index c97de2d7..9d9cfe23 100644 --- a/crates/assets/Cargo.toml +++ b/crates/assets/Cargo.toml @@ -1,14 +1,14 @@ [package] name = "gpui-component-assets" description = "Default bundled assets for GPUI Component." -edition = "2021" keywords = ["desktop", "gpui", "shadcn", "ui", "uikit"] license = "Apache-2.0" documentation = "https://docs.rs/gpui-component" homepage = "https://longbridge.github.io/gpui-component" repository = "https://github.com/longbridge/gpui-component" -publish = true readme = "README.md" +edition.workspace = true +publish = true version = "0.4.1" [lib] diff --git a/crates/macros/Cargo.toml b/crates/macros/Cargo.toml index b4e3af0a..dd326626 100644 --- a/crates/macros/Cargo.toml +++ b/crates/macros/Cargo.toml @@ -1,10 +1,10 @@ [package] -edition = "2021" name = "gpui-component-macros" description = "Macros for GPUI Component." version = "0.4.1" -publish = true license = "Apache-2.0" +publish = true +edition.workspace = true [lib] proc-macro = true diff --git a/crates/reqwest_client/Cargo.toml b/crates/reqwest_client/Cargo.toml index 14a80bfb..c55831ac 100644 --- a/crates/reqwest_client/Cargo.toml +++ b/crates/reqwest_client/Cargo.toml @@ -1,9 +1,9 @@ [package] name = "reqwest_client" version = "0.4.1" -publish = false license = "Apache-2.0" -edition = "2024" +publish = false +edition.workspace = true [lints] workspace = true diff --git a/crates/story/Cargo.toml b/crates/story/Cargo.toml index 603902d4..80fa33da 100644 --- a/crates/story/Cargo.toml +++ b/crates/story/Cargo.toml @@ -1,8 +1,8 @@ [package] -edition = "2024" name = "gpui-component-story" -publish = false version = "0.4.1" +publish = false +edition.workspace = true [features] inspector = ["gpui-component/inspector"] diff --git a/crates/ui/Cargo.toml b/crates/ui/Cargo.toml index 28103436..99a1528f 100644 --- a/crates/ui/Cargo.toml +++ b/crates/ui/Cargo.toml @@ -1,15 +1,15 @@ [package] description = "UI components for building fantastic desktop application by using GPUI." -edition = "2021" keywords = ["desktop", "gpui", "shadcn", "ui", "uikit"] license = "Apache-2.0" name = "gpui-component" documentation = "https://docs.rs/gpui-component" homepage = "https://longbridge.github.io/gpui-component" repository = "https://github.com/longbridge/gpui-component" -publish = true readme = "../../README.md" version = "0.4.1" +publish = true +edition.workspace = true [lib] doctest = false diff --git a/crates/ui/src/color_picker.rs b/crates/ui/src/color_picker.rs index 9634dbb4..a3383976 100644 --- a/crates/ui/src/color_picker.rs +++ b/crates/ui/src/color_picker.rs @@ -1,20 +1,21 @@ use gpui::{ - anchored, canvas, deferred, div, prelude::FluentBuilder as _, px, relative, App, AppContext, - Bounds, ClickEvent, Context, Corner, ElementId, Entity, EventEmitter, FocusHandle, Focusable, - Hsla, InteractiveElement as _, IntoElement, KeyBinding, MouseButton, ParentElement, Pixels, - Point, Render, RenderOnce, SharedString, StatefulInteractiveElement as _, StyleRefinement, - Styled, Subscription, Window, + App, AppContext, Bounds, ClickEvent, Context, Corner, Div, ElementId, Entity, EventEmitter, + FocusHandle, Focusable, Hsla, InteractiveElement as _, IntoElement, KeyBinding, MouseButton, + ParentElement, Pixels, Point, Render, RenderOnce, SharedString, Stateful, + StatefulInteractiveElement as _, StyleRefinement, Styled, Subscription, Window, anchored, + canvas, deferred, div, prelude::FluentBuilder as _, px, relative, }; use crate::{ + ActiveTheme as _, Colorize as _, FocusableExt as _, Icon, Selectable as _, Sizable, Size, + StyleSized, StyledExt, actions::{Cancel, Confirm}, button::{Button, ButtonVariants}, divider::Divider, h_flex, input::{Input, InputEvent, InputState}, tooltip::Tooltip, - v_flex, ActiveTheme as _, Colorize as _, FocusableExt as _, Icon, Selectable as _, Sizable, - Size, StyleSized, StyledExt, + v_flex, }; const CONTEXT: &'static str = "ColorPicker"; @@ -250,7 +251,7 @@ impl ColorPicker { clickable: bool, window: &mut Window, _: &mut App, - ) -> impl IntoElement { + ) -> Stateful