From e4fe9538d7d86aef0e2354648ea514d36148cf56 Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Sat, 21 Oct 2023 16:01:47 +0200 Subject: [PATCH] Checkpoint --- Cargo.lock | 10 ++++---- Cargo.toml | 4 ++-- crates/{gpui3 => gpui2}/Cargo.toml | 6 ++--- crates/{gpui3 => gpui2}/build.rs | 0 crates/{gpui3 => gpui2}/src/action.rs | 0 crates/{gpui3 => gpui2}/src/app.rs | 0 .../{gpui3 => gpui2}/src/app/async_context.rs | 0 crates/{gpui3 => gpui2}/src/app/entity_map.rs | 0 .../{gpui3 => gpui2}/src/app/model_context.rs | 0 crates/{gpui3 => gpui2}/src/assets.rs | 0 crates/{gpui3 => gpui2}/src/color.rs | 0 crates/{gpui3 => gpui2}/src/element.rs | 0 crates/{gpui3 => gpui2}/src/elements.rs | 0 crates/{gpui3 => gpui2}/src/elements/div.rs | 0 crates/{gpui3 => gpui2}/src/elements/img.rs | 0 crates/{gpui3 => gpui2}/src/elements/svg.rs | 0 crates/{gpui3 => gpui2}/src/elements/text.rs | 0 crates/{gpui3 => gpui2}/src/executor.rs | 0 crates/{gpui3 => gpui2}/src/focusable.rs | 0 crates/{gpui3 => gpui2}/src/geometry.rs | 0 .../src/gpui3.rs => gpui2/src/gpui2.rs} | 2 +- crates/{gpui3 => gpui2}/src/image_cache.rs | 0 crates/{gpui3 => gpui2}/src/interactive.rs | 0 crates/{gpui3 => gpui2}/src/keymap/binding.rs | 0 crates/{gpui3 => gpui2}/src/keymap/keymap.rs | 0 crates/{gpui3 => gpui2}/src/keymap/matcher.rs | 0 crates/{gpui3 => gpui2}/src/keymap/mod.rs | 0 crates/{gpui3 => gpui2}/src/platform.rs | 0 .../src/platform/keystroke.rs | 0 crates/{gpui3 => gpui2}/src/platform/mac.rs | 0 .../src/platform/mac/dispatch.h | 0 .../src/platform/mac/dispatcher.rs | 0 .../src/platform/mac/display.rs | 0 .../src/platform/mac/display_linker.rs | 0 .../src/platform/mac/events.rs | 0 .../src/platform/mac/metal_atlas.rs | 0 .../src/platform/mac/metal_renderer.rs | 0 .../src/platform/mac/open_type.rs | 0 .../src/platform/mac/platform.rs | 0 .../src/platform/mac/shaders.metal | 0 .../src/platform/mac/text_system.rs | 0 .../src/platform/mac/window.rs | 0 .../src/platform/mac/window_appearence.rs | 0 crates/{gpui3 => gpui2}/src/platform/test.rs | 0 crates/{gpui3 => gpui2}/src/scene.rs | 0 crates/{gpui3 => gpui2}/src/style.rs | 0 crates/{gpui3 => gpui2}/src/styled.rs | 4 ++-- crates/{gpui3 => gpui2}/src/subscription.rs | 0 crates/{gpui3 => gpui2}/src/svg_renderer.rs | 0 crates/{gpui3 => gpui2}/src/taffy.rs | 0 crates/{gpui3 => gpui2}/src/text_system.rs | 0 .../src/text_system/font_features.rs | 0 .../{gpui3 => gpui2}/src/text_system/line.rs | 0 .../src/text_system/line_layout.rs | 0 .../src/text_system/line_wrapper.rs | 0 crates/{gpui3 => gpui2}/src/util.rs | 0 crates/{gpui3 => gpui2}/src/view.rs | 0 crates/{gpui3 => gpui2}/src/window.rs | 0 .../{gpui3_macros => gpui2_macros}/Cargo.toml | 4 ++-- .../src/derive_element.rs | 24 +++++++++---------- .../src/gpui2_macros.rs} | 0 .../src/style_helpers.rs | 4 ++-- crates/storybook2/Cargo.toml | 4 ++-- crates/storybook2/src/assets.rs | 2 +- crates/storybook2/src/stories/focus.rs | 2 +- crates/storybook2/src/stories/kitchen_sink.rs | 2 +- crates/storybook2/src/stories/scroll.rs | 2 +- crates/storybook2/src/stories/text.rs | 2 +- crates/storybook2/src/stories/z_index.rs | 2 +- crates/storybook2/src/story_selector.rs | 2 +- crates/storybook2/src/storybook2.rs | 4 ++-- crates/storybook2/src/themes.rs | 2 +- crates/storybook2/src/themes/rose_pine.rs | 2 +- crates/ui2/Cargo.toml | 2 +- crates/ui2/src/components/assistant_panel.rs | 2 +- crates/ui2/src/components/breadcrumb.rs | 2 +- crates/ui2/src/components/buffer.rs | 4 ++-- crates/ui2/src/components/buffer_search.rs | 2 +- crates/ui2/src/components/collab_panel.rs | 2 +- crates/ui2/src/components/editor_pane.rs | 2 +- crates/ui2/src/components/icon_button.rs | 2 +- crates/ui2/src/components/list.rs | 2 +- .../ui2/src/components/notification_toast.rs | 2 +- crates/ui2/src/components/palette.rs | 2 +- crates/ui2/src/components/panel.rs | 2 +- crates/ui2/src/components/panes.rs | 2 +- crates/ui2/src/components/project_panel.rs | 2 +- crates/ui2/src/components/tab.rs | 2 +- crates/ui2/src/components/tab_bar.rs | 2 +- crates/ui2/src/components/terminal.rs | 2 +- crates/ui2/src/components/title_bar.rs | 2 +- crates/ui2/src/components/toast.rs | 2 +- crates/ui2/src/components/toolbar.rs | 2 +- crates/ui2/src/components/workspace.rs | 2 +- crates/ui2/src/element_ext.rs | 2 +- crates/ui2/src/elements/avatar.rs | 2 +- crates/ui2/src/elements/button.rs | 4 ++-- crates/ui2/src/elements/icon.rs | 2 +- crates/ui2/src/elements/label.rs | 2 +- crates/ui2/src/elements/player.rs | 2 +- crates/ui2/src/elements/stack.rs | 2 +- crates/ui2/src/lib.rs | 2 +- crates/ui2/src/prelude.rs | 4 ++-- crates/ui2/src/settings.rs | 4 ++-- crates/ui2/src/static_data.rs | 2 +- crates/ui2/src/story.rs | 2 +- crates/ui2/src/theme.rs | 4 ++-- 107 files changed, 81 insertions(+), 81 deletions(-) rename crates/{gpui3 => gpui2}/Cargo.toml (96%) rename crates/{gpui3 => gpui2}/build.rs (100%) rename crates/{gpui3 => gpui2}/src/action.rs (100%) rename crates/{gpui3 => gpui2}/src/app.rs (100%) rename crates/{gpui3 => gpui2}/src/app/async_context.rs (100%) rename crates/{gpui3 => gpui2}/src/app/entity_map.rs (100%) rename crates/{gpui3 => gpui2}/src/app/model_context.rs (100%) rename crates/{gpui3 => gpui2}/src/assets.rs (100%) rename crates/{gpui3 => gpui2}/src/color.rs (100%) rename crates/{gpui3 => gpui2}/src/element.rs (100%) rename crates/{gpui3 => gpui2}/src/elements.rs (100%) rename crates/{gpui3 => gpui2}/src/elements/div.rs (100%) rename crates/{gpui3 => gpui2}/src/elements/img.rs (100%) rename crates/{gpui3 => gpui2}/src/elements/svg.rs (100%) rename crates/{gpui3 => gpui2}/src/elements/text.rs (100%) rename crates/{gpui3 => gpui2}/src/executor.rs (100%) rename crates/{gpui3 => gpui2}/src/focusable.rs (100%) rename crates/{gpui3 => gpui2}/src/geometry.rs (100%) rename crates/{gpui3/src/gpui3.rs => gpui2/src/gpui2.rs} (99%) rename crates/{gpui3 => gpui2}/src/image_cache.rs (100%) rename crates/{gpui3 => gpui2}/src/interactive.rs (100%) rename crates/{gpui3 => gpui2}/src/keymap/binding.rs (100%) rename crates/{gpui3 => gpui2}/src/keymap/keymap.rs (100%) rename crates/{gpui3 => gpui2}/src/keymap/matcher.rs (100%) rename crates/{gpui3 => gpui2}/src/keymap/mod.rs (100%) rename crates/{gpui3 => gpui2}/src/platform.rs (100%) rename crates/{gpui3 => gpui2}/src/platform/keystroke.rs (100%) rename crates/{gpui3 => gpui2}/src/platform/mac.rs (100%) rename crates/{gpui3 => gpui2}/src/platform/mac/dispatch.h (100%) rename crates/{gpui3 => gpui2}/src/platform/mac/dispatcher.rs (100%) rename crates/{gpui3 => gpui2}/src/platform/mac/display.rs (100%) rename crates/{gpui3 => gpui2}/src/platform/mac/display_linker.rs (100%) rename crates/{gpui3 => gpui2}/src/platform/mac/events.rs (100%) rename crates/{gpui3 => gpui2}/src/platform/mac/metal_atlas.rs (100%) rename crates/{gpui3 => gpui2}/src/platform/mac/metal_renderer.rs (100%) rename crates/{gpui3 => gpui2}/src/platform/mac/open_type.rs (100%) rename crates/{gpui3 => gpui2}/src/platform/mac/platform.rs (100%) rename crates/{gpui3 => gpui2}/src/platform/mac/shaders.metal (100%) rename crates/{gpui3 => gpui2}/src/platform/mac/text_system.rs (100%) rename crates/{gpui3 => gpui2}/src/platform/mac/window.rs (100%) rename crates/{gpui3 => gpui2}/src/platform/mac/window_appearence.rs (100%) rename crates/{gpui3 => gpui2}/src/platform/test.rs (100%) rename crates/{gpui3 => gpui2}/src/scene.rs (100%) rename crates/{gpui3 => gpui2}/src/style.rs (100%) rename crates/{gpui3 => gpui2}/src/styled.rs (99%) rename crates/{gpui3 => gpui2}/src/subscription.rs (100%) rename crates/{gpui3 => gpui2}/src/svg_renderer.rs (100%) rename crates/{gpui3 => gpui2}/src/taffy.rs (100%) rename crates/{gpui3 => gpui2}/src/text_system.rs (100%) rename crates/{gpui3 => gpui2}/src/text_system/font_features.rs (100%) rename crates/{gpui3 => gpui2}/src/text_system/line.rs (100%) rename crates/{gpui3 => gpui2}/src/text_system/line_layout.rs (100%) rename crates/{gpui3 => gpui2}/src/text_system/line_wrapper.rs (100%) rename crates/{gpui3 => gpui2}/src/util.rs (100%) rename crates/{gpui3 => gpui2}/src/view.rs (100%) rename crates/{gpui3 => gpui2}/src/window.rs (100%) rename crates/{gpui3_macros => gpui2_macros}/Cargo.toml (75%) rename crates/{gpui3_macros => gpui2_macros}/src/derive_element.rs (78%) rename crates/{gpui3_macros/src/gpui3_macros.rs => gpui2_macros/src/gpui2_macros.rs} (100%) rename crates/{gpui3_macros => gpui2_macros}/src/style_helpers.rs (99%) diff --git a/Cargo.lock b/Cargo.lock index 5c87911491..f4294b6165 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3272,7 +3272,7 @@ dependencies = [ ] [[package]] -name = "gpui3" +name = "gpui2" version = "0.1.0" dependencies = [ "anyhow", @@ -3295,7 +3295,7 @@ dependencies = [ "font-kit", "foreign-types", "futures 0.3.28", - "gpui3_macros", + "gpui2_macros", "gpui_macros", "image", "itertools 0.10.5", @@ -3337,7 +3337,7 @@ dependencies = [ ] [[package]] -name = "gpui3_macros" +name = "gpui2_macros" version = "0.1.0" dependencies = [ "proc-macro2", @@ -7788,7 +7788,7 @@ dependencies = [ "backtrace-on-stack-overflow", "chrono", "clap 4.4.4", - "gpui3", + "gpui2", "itertools 0.11.0", "log", "rust-embed", @@ -9012,7 +9012,7 @@ version = "0.1.0" dependencies = [ "anyhow", "chrono", - "gpui3", + "gpui2", "itertools 0.11.0", "rand 0.8.5", "serde", diff --git a/Cargo.toml b/Cargo.toml index 16907100a0..cdc767dce7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -34,8 +34,8 @@ members = [ "crates/go_to_line", "crates/gpui", "crates/gpui_macros", - "crates/gpui3", - "crates/gpui3_macros", + "crates/gpui2", + "crates/gpui2_macros", "crates/install_cli", "crates/journal", "crates/language", diff --git a/crates/gpui3/Cargo.toml b/crates/gpui2/Cargo.toml similarity index 96% rename from crates/gpui3/Cargo.toml rename to crates/gpui2/Cargo.toml index e8ba5def50..7743ebad51 100644 --- a/crates/gpui3/Cargo.toml +++ b/crates/gpui2/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "gpui3" +name = "gpui2" version = "0.1.0" edition = "2021" authors = ["Nathan Sobo "] @@ -10,13 +10,13 @@ publish = false test = ["backtrace", "dhat", "env_logger", "collections/test-support", "util/test-support"] [lib] -path = "src/gpui3.rs" +path = "src/gpui2.rs" doctest = false [dependencies] collections = { path = "../collections" } gpui_macros = { path = "../gpui_macros" } -gpui3_macros = { path = "../gpui3_macros" } +gpui2_macros = { path = "../gpui2_macros" } util = { path = "../util" } sum_tree = { path = "../sum_tree" } sqlez = { path = "../sqlez" } diff --git a/crates/gpui3/build.rs b/crates/gpui2/build.rs similarity index 100% rename from crates/gpui3/build.rs rename to crates/gpui2/build.rs diff --git a/crates/gpui3/src/action.rs b/crates/gpui2/src/action.rs similarity index 100% rename from crates/gpui3/src/action.rs rename to crates/gpui2/src/action.rs diff --git a/crates/gpui3/src/app.rs b/crates/gpui2/src/app.rs similarity index 100% rename from crates/gpui3/src/app.rs rename to crates/gpui2/src/app.rs diff --git a/crates/gpui3/src/app/async_context.rs b/crates/gpui2/src/app/async_context.rs similarity index 100% rename from crates/gpui3/src/app/async_context.rs rename to crates/gpui2/src/app/async_context.rs diff --git a/crates/gpui3/src/app/entity_map.rs b/crates/gpui2/src/app/entity_map.rs similarity index 100% rename from crates/gpui3/src/app/entity_map.rs rename to crates/gpui2/src/app/entity_map.rs diff --git a/crates/gpui3/src/app/model_context.rs b/crates/gpui2/src/app/model_context.rs similarity index 100% rename from crates/gpui3/src/app/model_context.rs rename to crates/gpui2/src/app/model_context.rs diff --git a/crates/gpui3/src/assets.rs b/crates/gpui2/src/assets.rs similarity index 100% rename from crates/gpui3/src/assets.rs rename to crates/gpui2/src/assets.rs diff --git a/crates/gpui3/src/color.rs b/crates/gpui2/src/color.rs similarity index 100% rename from crates/gpui3/src/color.rs rename to crates/gpui2/src/color.rs diff --git a/crates/gpui3/src/element.rs b/crates/gpui2/src/element.rs similarity index 100% rename from crates/gpui3/src/element.rs rename to crates/gpui2/src/element.rs diff --git a/crates/gpui3/src/elements.rs b/crates/gpui2/src/elements.rs similarity index 100% rename from crates/gpui3/src/elements.rs rename to crates/gpui2/src/elements.rs diff --git a/crates/gpui3/src/elements/div.rs b/crates/gpui2/src/elements/div.rs similarity index 100% rename from crates/gpui3/src/elements/div.rs rename to crates/gpui2/src/elements/div.rs diff --git a/crates/gpui3/src/elements/img.rs b/crates/gpui2/src/elements/img.rs similarity index 100% rename from crates/gpui3/src/elements/img.rs rename to crates/gpui2/src/elements/img.rs diff --git a/crates/gpui3/src/elements/svg.rs b/crates/gpui2/src/elements/svg.rs similarity index 100% rename from crates/gpui3/src/elements/svg.rs rename to crates/gpui2/src/elements/svg.rs diff --git a/crates/gpui3/src/elements/text.rs b/crates/gpui2/src/elements/text.rs similarity index 100% rename from crates/gpui3/src/elements/text.rs rename to crates/gpui2/src/elements/text.rs diff --git a/crates/gpui3/src/executor.rs b/crates/gpui2/src/executor.rs similarity index 100% rename from crates/gpui3/src/executor.rs rename to crates/gpui2/src/executor.rs diff --git a/crates/gpui3/src/focusable.rs b/crates/gpui2/src/focusable.rs similarity index 100% rename from crates/gpui3/src/focusable.rs rename to crates/gpui2/src/focusable.rs diff --git a/crates/gpui3/src/geometry.rs b/crates/gpui2/src/geometry.rs similarity index 100% rename from crates/gpui3/src/geometry.rs rename to crates/gpui2/src/geometry.rs diff --git a/crates/gpui3/src/gpui3.rs b/crates/gpui2/src/gpui2.rs similarity index 99% rename from crates/gpui3/src/gpui3.rs rename to crates/gpui2/src/gpui2.rs index fcd21598f2..da1790199e 100644 --- a/crates/gpui3/src/gpui3.rs +++ b/crates/gpui2/src/gpui2.rs @@ -32,7 +32,7 @@ pub use elements::*; pub use executor::*; pub use focusable::*; pub use geometry::*; -pub use gpui3_macros::*; +pub use gpui2_macros::*; pub use image_cache::*; pub use interactive::*; pub use keymap::*; diff --git a/crates/gpui3/src/image_cache.rs b/crates/gpui2/src/image_cache.rs similarity index 100% rename from crates/gpui3/src/image_cache.rs rename to crates/gpui2/src/image_cache.rs diff --git a/crates/gpui3/src/interactive.rs b/crates/gpui2/src/interactive.rs similarity index 100% rename from crates/gpui3/src/interactive.rs rename to crates/gpui2/src/interactive.rs diff --git a/crates/gpui3/src/keymap/binding.rs b/crates/gpui2/src/keymap/binding.rs similarity index 100% rename from crates/gpui3/src/keymap/binding.rs rename to crates/gpui2/src/keymap/binding.rs diff --git a/crates/gpui3/src/keymap/keymap.rs b/crates/gpui2/src/keymap/keymap.rs similarity index 100% rename from crates/gpui3/src/keymap/keymap.rs rename to crates/gpui2/src/keymap/keymap.rs diff --git a/crates/gpui3/src/keymap/matcher.rs b/crates/gpui2/src/keymap/matcher.rs similarity index 100% rename from crates/gpui3/src/keymap/matcher.rs rename to crates/gpui2/src/keymap/matcher.rs diff --git a/crates/gpui3/src/keymap/mod.rs b/crates/gpui2/src/keymap/mod.rs similarity index 100% rename from crates/gpui3/src/keymap/mod.rs rename to crates/gpui2/src/keymap/mod.rs diff --git a/crates/gpui3/src/platform.rs b/crates/gpui2/src/platform.rs similarity index 100% rename from crates/gpui3/src/platform.rs rename to crates/gpui2/src/platform.rs diff --git a/crates/gpui3/src/platform/keystroke.rs b/crates/gpui2/src/platform/keystroke.rs similarity index 100% rename from crates/gpui3/src/platform/keystroke.rs rename to crates/gpui2/src/platform/keystroke.rs diff --git a/crates/gpui3/src/platform/mac.rs b/crates/gpui2/src/platform/mac.rs similarity index 100% rename from crates/gpui3/src/platform/mac.rs rename to crates/gpui2/src/platform/mac.rs diff --git a/crates/gpui3/src/platform/mac/dispatch.h b/crates/gpui2/src/platform/mac/dispatch.h similarity index 100% rename from crates/gpui3/src/platform/mac/dispatch.h rename to crates/gpui2/src/platform/mac/dispatch.h diff --git a/crates/gpui3/src/platform/mac/dispatcher.rs b/crates/gpui2/src/platform/mac/dispatcher.rs similarity index 100% rename from crates/gpui3/src/platform/mac/dispatcher.rs rename to crates/gpui2/src/platform/mac/dispatcher.rs diff --git a/crates/gpui3/src/platform/mac/display.rs b/crates/gpui2/src/platform/mac/display.rs similarity index 100% rename from crates/gpui3/src/platform/mac/display.rs rename to crates/gpui2/src/platform/mac/display.rs diff --git a/crates/gpui3/src/platform/mac/display_linker.rs b/crates/gpui2/src/platform/mac/display_linker.rs similarity index 100% rename from crates/gpui3/src/platform/mac/display_linker.rs rename to crates/gpui2/src/platform/mac/display_linker.rs diff --git a/crates/gpui3/src/platform/mac/events.rs b/crates/gpui2/src/platform/mac/events.rs similarity index 100% rename from crates/gpui3/src/platform/mac/events.rs rename to crates/gpui2/src/platform/mac/events.rs diff --git a/crates/gpui3/src/platform/mac/metal_atlas.rs b/crates/gpui2/src/platform/mac/metal_atlas.rs similarity index 100% rename from crates/gpui3/src/platform/mac/metal_atlas.rs rename to crates/gpui2/src/platform/mac/metal_atlas.rs diff --git a/crates/gpui3/src/platform/mac/metal_renderer.rs b/crates/gpui2/src/platform/mac/metal_renderer.rs similarity index 100% rename from crates/gpui3/src/platform/mac/metal_renderer.rs rename to crates/gpui2/src/platform/mac/metal_renderer.rs diff --git a/crates/gpui3/src/platform/mac/open_type.rs b/crates/gpui2/src/platform/mac/open_type.rs similarity index 100% rename from crates/gpui3/src/platform/mac/open_type.rs rename to crates/gpui2/src/platform/mac/open_type.rs diff --git a/crates/gpui3/src/platform/mac/platform.rs b/crates/gpui2/src/platform/mac/platform.rs similarity index 100% rename from crates/gpui3/src/platform/mac/platform.rs rename to crates/gpui2/src/platform/mac/platform.rs diff --git a/crates/gpui3/src/platform/mac/shaders.metal b/crates/gpui2/src/platform/mac/shaders.metal similarity index 100% rename from crates/gpui3/src/platform/mac/shaders.metal rename to crates/gpui2/src/platform/mac/shaders.metal diff --git a/crates/gpui3/src/platform/mac/text_system.rs b/crates/gpui2/src/platform/mac/text_system.rs similarity index 100% rename from crates/gpui3/src/platform/mac/text_system.rs rename to crates/gpui2/src/platform/mac/text_system.rs diff --git a/crates/gpui3/src/platform/mac/window.rs b/crates/gpui2/src/platform/mac/window.rs similarity index 100% rename from crates/gpui3/src/platform/mac/window.rs rename to crates/gpui2/src/platform/mac/window.rs diff --git a/crates/gpui3/src/platform/mac/window_appearence.rs b/crates/gpui2/src/platform/mac/window_appearence.rs similarity index 100% rename from crates/gpui3/src/platform/mac/window_appearence.rs rename to crates/gpui2/src/platform/mac/window_appearence.rs diff --git a/crates/gpui3/src/platform/test.rs b/crates/gpui2/src/platform/test.rs similarity index 100% rename from crates/gpui3/src/platform/test.rs rename to crates/gpui2/src/platform/test.rs diff --git a/crates/gpui3/src/scene.rs b/crates/gpui2/src/scene.rs similarity index 100% rename from crates/gpui3/src/scene.rs rename to crates/gpui2/src/scene.rs diff --git a/crates/gpui3/src/style.rs b/crates/gpui2/src/style.rs similarity index 100% rename from crates/gpui3/src/style.rs rename to crates/gpui2/src/style.rs diff --git a/crates/gpui3/src/styled.rs b/crates/gpui2/src/styled.rs similarity index 99% rename from crates/gpui3/src/styled.rs rename to crates/gpui2/src/styled.rs index 00a68753b6..54463e884b 100644 --- a/crates/gpui3/src/styled.rs +++ b/crates/gpui2/src/styled.rs @@ -1,5 +1,5 @@ use crate::{ - self as gpui3, hsla, point, px, relative, rems, AlignItems, DefiniteLength, Display, Fill, + self as gpui2, hsla, point, px, relative, rems, AlignItems, DefiniteLength, Display, Fill, FlexDirection, Hsla, JustifyContent, Length, Position, Rems, SharedString, StyleRefinement, }; use crate::{BoxShadow, TextStyleRefinement}; @@ -8,7 +8,7 @@ use smallvec::smallvec; pub trait Styled { fn style(&mut self) -> &mut StyleRefinement; - gpui3_macros::style_helpers!(); + gpui2_macros::style_helpers!(); /// Sets the size of the element to the full width and height. fn full(mut self) -> Self diff --git a/crates/gpui3/src/subscription.rs b/crates/gpui2/src/subscription.rs similarity index 100% rename from crates/gpui3/src/subscription.rs rename to crates/gpui2/src/subscription.rs diff --git a/crates/gpui3/src/svg_renderer.rs b/crates/gpui2/src/svg_renderer.rs similarity index 100% rename from crates/gpui3/src/svg_renderer.rs rename to crates/gpui2/src/svg_renderer.rs diff --git a/crates/gpui3/src/taffy.rs b/crates/gpui2/src/taffy.rs similarity index 100% rename from crates/gpui3/src/taffy.rs rename to crates/gpui2/src/taffy.rs diff --git a/crates/gpui3/src/text_system.rs b/crates/gpui2/src/text_system.rs similarity index 100% rename from crates/gpui3/src/text_system.rs rename to crates/gpui2/src/text_system.rs diff --git a/crates/gpui3/src/text_system/font_features.rs b/crates/gpui2/src/text_system/font_features.rs similarity index 100% rename from crates/gpui3/src/text_system/font_features.rs rename to crates/gpui2/src/text_system/font_features.rs diff --git a/crates/gpui3/src/text_system/line.rs b/crates/gpui2/src/text_system/line.rs similarity index 100% rename from crates/gpui3/src/text_system/line.rs rename to crates/gpui2/src/text_system/line.rs diff --git a/crates/gpui3/src/text_system/line_layout.rs b/crates/gpui2/src/text_system/line_layout.rs similarity index 100% rename from crates/gpui3/src/text_system/line_layout.rs rename to crates/gpui2/src/text_system/line_layout.rs diff --git a/crates/gpui3/src/text_system/line_wrapper.rs b/crates/gpui2/src/text_system/line_wrapper.rs similarity index 100% rename from crates/gpui3/src/text_system/line_wrapper.rs rename to crates/gpui2/src/text_system/line_wrapper.rs diff --git a/crates/gpui3/src/util.rs b/crates/gpui2/src/util.rs similarity index 100% rename from crates/gpui3/src/util.rs rename to crates/gpui2/src/util.rs diff --git a/crates/gpui3/src/view.rs b/crates/gpui2/src/view.rs similarity index 100% rename from crates/gpui3/src/view.rs rename to crates/gpui2/src/view.rs diff --git a/crates/gpui3/src/window.rs b/crates/gpui2/src/window.rs similarity index 100% rename from crates/gpui3/src/window.rs rename to crates/gpui2/src/window.rs diff --git a/crates/gpui3_macros/Cargo.toml b/crates/gpui2_macros/Cargo.toml similarity index 75% rename from crates/gpui3_macros/Cargo.toml rename to crates/gpui2_macros/Cargo.toml index ed77023266..eb44334095 100644 --- a/crates/gpui3_macros/Cargo.toml +++ b/crates/gpui2_macros/Cargo.toml @@ -1,11 +1,11 @@ [package] -name = "gpui3_macros" +name = "gpui2_macros" version = "0.1.0" edition = "2021" publish = false [lib] -path = "src/gpui3_macros.rs" +path = "src/gpui2_macros.rs" proc-macro = true [dependencies] diff --git a/crates/gpui3_macros/src/derive_element.rs b/crates/gpui2_macros/src/derive_element.rs similarity index 78% rename from crates/gpui3_macros/src/derive_element.rs rename to crates/gpui2_macros/src/derive_element.rs index 41861836ba..3f6b053aa0 100644 --- a/crates/gpui3_macros/src/derive_element.rs +++ b/crates/gpui2_macros/src/derive_element.rs @@ -39,21 +39,21 @@ pub fn derive_element(input: TokenStream) -> TokenStream { let (impl_generics, ty_generics, where_clause) = ast.generics.split_for_impl(); let gen = quote! { - impl #impl_generics gpui3::IntoAnyElement<#state_type> for #type_name #ty_generics + impl #impl_generics gpui2::IntoAnyElement<#state_type> for #type_name #ty_generics #where_clause { - fn into_any(self) -> gpui3::AnyElement<#state_type> { - gpui3::AnyElement::new(self) + fn into_any(self) -> gpui2::AnyElement<#state_type> { + gpui2::AnyElement::new(self) } } - impl #impl_generics gpui3::Element for #type_name #ty_generics + impl #impl_generics gpui2::Element for #type_name #ty_generics #where_clause { type ViewState = #state_type; - type ElementState = gpui3::AnyElement<#state_type>; + type ElementState = gpui2::AnyElement<#state_type>; - fn id(&self) -> Option { + fn id(&self) -> Option { None } @@ -61,9 +61,9 @@ pub fn derive_element(input: TokenStream) -> TokenStream { &mut self, view_state: &mut Self::ViewState, _: Option, - cx: &mut gpui3::ViewContext + cx: &mut gpui2::ViewContext ) -> Self::ElementState { - use gpui3::IntoAnyElement; + use gpui2::IntoAnyElement; let mut element = self.render(view_state, cx).into_any(); element.initialize(view_state, cx); @@ -74,17 +74,17 @@ pub fn derive_element(input: TokenStream) -> TokenStream { &mut self, view_state: &mut Self::ViewState, rendered_element: &mut Self::ElementState, - cx: &mut gpui3::ViewContext, - ) -> gpui3::LayoutId { + cx: &mut gpui2::ViewContext, + ) -> gpui2::LayoutId { rendered_element.layout(view_state, cx) } fn paint( &mut self, - bounds: gpui3::Bounds, + bounds: gpui2::Bounds, view_state: &mut Self::ViewState, rendered_element: &mut Self::ElementState, - cx: &mut gpui3::ViewContext, + cx: &mut gpui2::ViewContext, ) { rendered_element.paint(view_state, cx) } diff --git a/crates/gpui3_macros/src/gpui3_macros.rs b/crates/gpui2_macros/src/gpui2_macros.rs similarity index 100% rename from crates/gpui3_macros/src/gpui3_macros.rs rename to crates/gpui2_macros/src/gpui2_macros.rs diff --git a/crates/gpui3_macros/src/style_helpers.rs b/crates/gpui2_macros/src/style_helpers.rs similarity index 99% rename from crates/gpui3_macros/src/style_helpers.rs rename to crates/gpui2_macros/src/style_helpers.rs index 8a6e7b99af..e9e061722f 100644 --- a/crates/gpui3_macros/src/style_helpers.rs +++ b/crates/gpui2_macros/src/style_helpers.rs @@ -123,7 +123,7 @@ fn generate_predefined_setter( .iter() .map(|field_tokens| { quote! { - style.#field_tokens = Some((#negation_token gpui3::#length_tokens).into()); + style.#field_tokens = Some((#negation_token gpui2::#length_tokens).into()); } }) .collect::>(); @@ -163,7 +163,7 @@ fn generate_custom_value_setter( let method = quote! { #[doc = #doc_string] - fn #method_name(mut self, length: impl std::clone::Clone + Into) -> Self where Self: std::marker::Sized { + fn #method_name(mut self, length: impl std::clone::Clone + Into) -> Self where Self: std::marker::Sized { let style = self.style(); #(#field_assignments)* self diff --git a/crates/storybook2/Cargo.toml b/crates/storybook2/Cargo.toml index f51095e354..e9e85415ca 100644 --- a/crates/storybook2/Cargo.toml +++ b/crates/storybook2/Cargo.toml @@ -14,7 +14,7 @@ anyhow.workspace = true backtrace-on-stack-overflow = "0.3.0" clap = { version = "4.4", features = ["derive", "string"] } chrono = "0.4" -gpui3 = { path = "../gpui3" } +gpui2 = { path = "../gpui2" } itertools = "0.11.0" log.workspace = true rust-embed.workspace = true @@ -28,4 +28,4 @@ ui = { package = "ui2", path = "../ui2", features = ["stories"] } util = { path = "../util" } [dev-dependencies] -gpui3 = { path = "../gpui3", features = ["test"] } +gpui2 = { path = "../gpui2", features = ["test"] } diff --git a/crates/storybook2/src/assets.rs b/crates/storybook2/src/assets.rs index e07ad7a747..76e853c0aa 100644 --- a/crates/storybook2/src/assets.rs +++ b/crates/storybook2/src/assets.rs @@ -1,7 +1,7 @@ use std::borrow::Cow; use anyhow::{anyhow, Result}; -use gpui3::{AssetSource, SharedString}; +use gpui2::{AssetSource, SharedString}; use rust_embed::RustEmbed; #[derive(RustEmbed)] diff --git a/crates/storybook2/src/stories/focus.rs b/crates/storybook2/src/stories/focus.rs index f142663cbd..cf9e669a2b 100644 --- a/crates/storybook2/src/stories/focus.rs +++ b/crates/storybook2/src/stories/focus.rs @@ -1,5 +1,5 @@ use crate::themes::rose_pine; -use gpui3::{ +use gpui2::{ div, view, Context, Focusable, KeyBinding, ParentElement, StatelessInteractive, Styled, View, WindowContext, }; diff --git a/crates/storybook2/src/stories/kitchen_sink.rs b/crates/storybook2/src/stories/kitchen_sink.rs index 99798a6383..e7c4e752f6 100644 --- a/crates/storybook2/src/stories/kitchen_sink.rs +++ b/crates/storybook2/src/stories/kitchen_sink.rs @@ -1,4 +1,4 @@ -use gpui3::{view, Context, View}; +use gpui2::{view, Context, View}; use strum::IntoEnumIterator; use ui::prelude::*; diff --git a/crates/storybook2/src/stories/scroll.rs b/crates/storybook2/src/stories/scroll.rs index 1c80a44932..c5df3bd3d3 100644 --- a/crates/storybook2/src/stories/scroll.rs +++ b/crates/storybook2/src/stories/scroll.rs @@ -1,5 +1,5 @@ use crate::themes::rose_pine; -use gpui3::{ +use gpui2::{ div, px, view, Context, Element, ParentElement, SharedString, Styled, View, WindowContext, }; use ui::ElementExt; diff --git a/crates/storybook2/src/stories/text.rs b/crates/storybook2/src/stories/text.rs index ebbcbc1446..d66b5ce609 100644 --- a/crates/storybook2/src/stories/text.rs +++ b/crates/storybook2/src/stories/text.rs @@ -1,4 +1,4 @@ -use gpui3::{div, view, white, Context, ParentElement, Styled, View, WindowContext}; +use gpui2::{div, view, white, Context, ParentElement, Styled, View, WindowContext}; pub struct TextStory { text: View<()>, diff --git a/crates/storybook2/src/stories/z_index.rs b/crates/storybook2/src/stories/z_index.rs index d729b75c2a..9dd74b6884 100644 --- a/crates/storybook2/src/stories/z_index.rs +++ b/crates/storybook2/src/stories/z_index.rs @@ -1,6 +1,6 @@ use std::marker::PhantomData; -use gpui3::{px, rgb, Div, Hsla}; +use gpui2::{px, rgb, Div, Hsla}; use ui::prelude::*; use crate::story::Story; diff --git a/crates/storybook2/src/story_selector.rs b/crates/storybook2/src/story_selector.rs index 14edce568e..4686a2226e 100644 --- a/crates/storybook2/src/story_selector.rs +++ b/crates/storybook2/src/story_selector.rs @@ -5,7 +5,7 @@ use crate::stories::*; use anyhow::anyhow; use clap::builder::PossibleValue; use clap::ValueEnum; -use gpui3::{view, AnyView, Context}; +use gpui2::{view, AnyView, Context}; use strum::{EnumIter, EnumString, IntoEnumIterator}; use ui::prelude::*; diff --git a/crates/storybook2/src/storybook2.rs b/crates/storybook2/src/storybook2.rs index 4beca32ca1..353e12f8c1 100644 --- a/crates/storybook2/src/storybook2.rs +++ b/crates/storybook2/src/storybook2.rs @@ -9,7 +9,7 @@ mod themes; use std::sync::Arc; use clap::Parser; -use gpui3::{ +use gpui2::{ div, px, size, view, AnyView, BorrowAppContext, Bounds, Context, Element, ViewContext, WindowBounds, WindowOptions, }; @@ -53,7 +53,7 @@ fn main() { let theme = themes::load_theme(theme_name).unwrap(); let asset_source = Arc::new(Assets); - gpui3::App::production(asset_source).run(move |cx| { + gpui2::App::production(asset_source).run(move |cx| { let selector = story_selector.unwrap_or(StorySelector::Component(ComponentStory::Workspace)); diff --git a/crates/storybook2/src/themes.rs b/crates/storybook2/src/themes.rs index 8a677952ed..ade7cbea87 100644 --- a/crates/storybook2/src/themes.rs +++ b/crates/storybook2/src/themes.rs @@ -3,7 +3,7 @@ mod rose_pine; pub use rose_pine::*; use anyhow::{Context, Result}; -use gpui3::serde_json; +use gpui2::serde_json; use serde::Deserialize; use ui::Theme; diff --git a/crates/storybook2/src/themes/rose_pine.rs b/crates/storybook2/src/themes/rose_pine.rs index 1cb45c73ff..a553f87d77 100644 --- a/crates/storybook2/src/themes/rose_pine.rs +++ b/crates/storybook2/src/themes/rose_pine.rs @@ -1,4 +1,4 @@ -use gpui3::serde_json::{self, json}; +use gpui2::serde_json::{self, json}; use ui::Theme; pub fn rose_pine() -> Theme { diff --git a/crates/ui2/Cargo.toml b/crates/ui2/Cargo.toml index 3fe37da8fc..3e9769a54c 100644 --- a/crates/ui2/Cargo.toml +++ b/crates/ui2/Cargo.toml @@ -7,7 +7,7 @@ publish = false [dependencies] anyhow.workspace = true chrono = "0.4" -gpui3 = { path = "../gpui3" } +gpui2 = { path = "../gpui2" } itertools = { version = "0.11.0", optional = true } serde.workspace = true settings = { path = "../settings" } diff --git a/crates/ui2/src/components/assistant_panel.rs b/crates/ui2/src/components/assistant_panel.rs index 2b32f332a4..eff1c65728 100644 --- a/crates/ui2/src/components/assistant_panel.rs +++ b/crates/ui2/src/components/assistant_panel.rs @@ -1,6 +1,6 @@ use std::marker::PhantomData; -use gpui3::{rems, AbsoluteLength}; +use gpui2::{rems, AbsoluteLength}; use crate::prelude::*; use crate::{Icon, IconButton, Label, Panel, PanelSide}; diff --git a/crates/ui2/src/components/breadcrumb.rs b/crates/ui2/src/components/breadcrumb.rs index 23dc824006..4a8a375bf6 100644 --- a/crates/ui2/src/components/breadcrumb.rs +++ b/crates/ui2/src/components/breadcrumb.rs @@ -1,7 +1,7 @@ use std::marker::PhantomData; use std::path::PathBuf; -use gpui3::Div; +use gpui2::Div; use crate::prelude::*; use crate::{h_stack, HighlightedText}; diff --git a/crates/ui2/src/components/buffer.rs b/crates/ui2/src/components/buffer.rs index 68c2ed5e0f..8439065317 100644 --- a/crates/ui2/src/components/buffer.rs +++ b/crates/ui2/src/components/buffer.rs @@ -1,6 +1,6 @@ use std::marker::PhantomData; -use gpui3::{Hsla, WindowContext}; +use gpui2::{Hsla, WindowContext}; use crate::prelude::*; use crate::{h_stack, v_stack, Icon, IconElement}; @@ -238,7 +238,7 @@ pub use stories::*; #[cfg(feature = "stories")] mod stories { - use gpui3::rems; + use gpui2::rems; use crate::{ empty_buffer_example, hello_world_rust_buffer_example, diff --git a/crates/ui2/src/components/buffer_search.rs b/crates/ui2/src/components/buffer_search.rs index 06acd468cd..56f66f932d 100644 --- a/crates/ui2/src/components/buffer_search.rs +++ b/crates/ui2/src/components/buffer_search.rs @@ -1,4 +1,4 @@ -use gpui3::{view, Context, View}; +use gpui2::{view, Context, View}; use crate::prelude::*; use crate::{h_stack, Icon, IconButton, IconColor, Input}; diff --git a/crates/ui2/src/components/collab_panel.rs b/crates/ui2/src/components/collab_panel.rs index b88697656d..8e3c99a833 100644 --- a/crates/ui2/src/components/collab_panel.rs +++ b/crates/ui2/src/components/collab_panel.rs @@ -3,7 +3,7 @@ use crate::{ static_collab_panel_channels, static_collab_panel_current_call, v_stack, Icon, List, ListHeader, ToggleState, }; -use gpui3::{img, svg, SharedString}; +use gpui2::{img, svg, SharedString}; use std::marker::PhantomData; #[derive(Element)] diff --git a/crates/ui2/src/components/editor_pane.rs b/crates/ui2/src/components/editor_pane.rs index 770273e7d1..4e99af1a54 100644 --- a/crates/ui2/src/components/editor_pane.rs +++ b/crates/ui2/src/components/editor_pane.rs @@ -1,6 +1,6 @@ use std::path::PathBuf; -use gpui3::{view, Context, View}; +use gpui2::{view, Context, View}; use crate::prelude::*; use crate::{ diff --git a/crates/ui2/src/components/icon_button.rs b/crates/ui2/src/components/icon_button.rs index dd7e9457e1..3669163694 100644 --- a/crates/ui2/src/components/icon_button.rs +++ b/crates/ui2/src/components/icon_button.rs @@ -1,7 +1,7 @@ use std::marker::PhantomData; use std::sync::Arc; -use gpui3::MouseButton; +use gpui2::MouseButton; use crate::{h_stack, prelude::*}; use crate::{ClickHandler, Icon, IconColor, IconElement}; diff --git a/crates/ui2/src/components/list.rs b/crates/ui2/src/components/list.rs index e2c30b6bfa..fb5a248162 100644 --- a/crates/ui2/src/components/list.rs +++ b/crates/ui2/src/components/list.rs @@ -1,6 +1,6 @@ use std::marker::PhantomData; -use gpui3::{div, relative, Div}; +use gpui2::{div, relative, Div}; use crate::settings::user_settings; use crate::{ diff --git a/crates/ui2/src/components/notification_toast.rs b/crates/ui2/src/components/notification_toast.rs index 351eed7e16..2d2afec7c3 100644 --- a/crates/ui2/src/components/notification_toast.rs +++ b/crates/ui2/src/components/notification_toast.rs @@ -1,6 +1,6 @@ use std::marker::PhantomData; -use gpui3::rems; +use gpui2::rems; use crate::{h_stack, prelude::*, Icon}; diff --git a/crates/ui2/src/components/palette.rs b/crates/ui2/src/components/palette.rs index c931a2b4cc..9cb8f2d9ca 100644 --- a/crates/ui2/src/components/palette.rs +++ b/crates/ui2/src/components/palette.rs @@ -152,7 +152,7 @@ impl PaletteItem { } } -use gpui3::ElementId; +use gpui2::ElementId; #[cfg(feature = "stories")] pub use stories::*; diff --git a/crates/ui2/src/components/panel.rs b/crates/ui2/src/components/panel.rs index 2ff6eb0255..5c83d98339 100644 --- a/crates/ui2/src/components/panel.rs +++ b/crates/ui2/src/components/panel.rs @@ -1,6 +1,6 @@ use std::marker::PhantomData; -use gpui3::{AbsoluteLength, AnyElement}; +use gpui2::{AbsoluteLength, AnyElement}; use smallvec::SmallVec; use crate::prelude::*; diff --git a/crates/ui2/src/components/panes.rs b/crates/ui2/src/components/panes.rs index c3b9fa65b5..4cf2e28f05 100644 --- a/crates/ui2/src/components/panes.rs +++ b/crates/ui2/src/components/panes.rs @@ -1,6 +1,6 @@ use std::marker::PhantomData; -use gpui3::{hsla, AnyElement, ElementId, Hsla, Length, Size}; +use gpui2::{hsla, AnyElement, ElementId, Hsla, Length, Size}; use smallvec::SmallVec; use crate::prelude::*; diff --git a/crates/ui2/src/components/project_panel.rs b/crates/ui2/src/components/project_panel.rs index 29008ea30f..d8f5626d18 100644 --- a/crates/ui2/src/components/project_panel.rs +++ b/crates/ui2/src/components/project_panel.rs @@ -58,7 +58,7 @@ impl ProjectPanel { } } -use gpui3::ElementId; +use gpui2::ElementId; #[cfg(feature = "stories")] pub use stories::*; diff --git a/crates/ui2/src/components/tab.rs b/crates/ui2/src/components/tab.rs index 1128ac368c..2d787e6f02 100644 --- a/crates/ui2/src/components/tab.rs +++ b/crates/ui2/src/components/tab.rs @@ -148,7 +148,7 @@ impl Tab { } } -use gpui3::ElementId; +use gpui2::ElementId; #[cfg(feature = "stories")] pub use stories::*; diff --git a/crates/ui2/src/components/tab_bar.rs b/crates/ui2/src/components/tab_bar.rs index 5c20bbe397..1bd57713b0 100644 --- a/crates/ui2/src/components/tab_bar.rs +++ b/crates/ui2/src/components/tab_bar.rs @@ -90,7 +90,7 @@ impl TabBar { } } -use gpui3::ElementId; +use gpui2::ElementId; #[cfg(feature = "stories")] pub use stories::*; diff --git a/crates/ui2/src/components/terminal.rs b/crates/ui2/src/components/terminal.rs index 8a68d05067..4b71584f11 100644 --- a/crates/ui2/src/components/terminal.rs +++ b/crates/ui2/src/components/terminal.rs @@ -1,6 +1,6 @@ use std::marker::PhantomData; -use gpui3::{relative, rems, Size}; +use gpui2::{relative, rems, Size}; use crate::prelude::*; use crate::{Icon, IconButton, Pane, Tab}; diff --git a/crates/ui2/src/components/title_bar.rs b/crates/ui2/src/components/title_bar.rs index 4c106c82d6..db33a9de85 100644 --- a/crates/ui2/src/components/title_bar.rs +++ b/crates/ui2/src/components/title_bar.rs @@ -1,7 +1,7 @@ use std::sync::atomic::AtomicBool; use std::sync::Arc; -use gpui3::{view, Context, View}; +use gpui2::{view, Context, View}; use crate::prelude::*; use crate::settings::user_settings; diff --git a/crates/ui2/src/components/toast.rs b/crates/ui2/src/components/toast.rs index 66bd40f423..7780b90d44 100644 --- a/crates/ui2/src/components/toast.rs +++ b/crates/ui2/src/components/toast.rs @@ -1,4 +1,4 @@ -use gpui3::AnyElement; +use gpui2::AnyElement; use smallvec::SmallVec; use crate::prelude::*; diff --git a/crates/ui2/src/components/toolbar.rs b/crates/ui2/src/components/toolbar.rs index aeec01bc7f..6374be4ee9 100644 --- a/crates/ui2/src/components/toolbar.rs +++ b/crates/ui2/src/components/toolbar.rs @@ -1,4 +1,4 @@ -use gpui3::AnyElement; +use gpui2::AnyElement; use smallvec::SmallVec; use crate::prelude::*; diff --git a/crates/ui2/src/components/workspace.rs b/crates/ui2/src/components/workspace.rs index 39b08c3f41..3fb83fdfb4 100644 --- a/crates/ui2/src/components/workspace.rs +++ b/crates/ui2/src/components/workspace.rs @@ -1,7 +1,7 @@ use std::sync::Arc; use chrono::DateTime; -use gpui3::{px, relative, rems, view, Context, Size, View}; +use gpui2::{px, relative, rems, view, Context, Size, View}; use crate::{prelude::*, NotificationsPanel}; use crate::{ diff --git a/crates/ui2/src/element_ext.rs b/crates/ui2/src/element_ext.rs index a328b1e78f..a6ad48e629 100644 --- a/crates/ui2/src/element_ext.rs +++ b/crates/ui2/src/element_ext.rs @@ -1,4 +1,4 @@ -use gpui3::Element; +use gpui2::Element; pub trait ElementExt: Element { /// Applies a given function `then` to the current element if `condition` is true. diff --git a/crates/ui2/src/elements/avatar.rs b/crates/ui2/src/elements/avatar.rs index f83661e84b..518fd2b166 100644 --- a/crates/ui2/src/elements/avatar.rs +++ b/crates/ui2/src/elements/avatar.rs @@ -1,6 +1,6 @@ use std::marker::PhantomData; -use gpui3::img; +use gpui2::img; use crate::prelude::*; diff --git a/crates/ui2/src/elements/button.rs b/crates/ui2/src/elements/button.rs index ace3ada0cd..0604f4f3e6 100644 --- a/crates/ui2/src/elements/button.rs +++ b/crates/ui2/src/elements/button.rs @@ -1,7 +1,7 @@ use std::marker::PhantomData; use std::sync::Arc; -use gpui3::{DefiniteLength, Hsla, MouseButton, WindowContext}; +use gpui2::{DefiniteLength, Hsla, MouseButton, WindowContext}; use crate::settings::user_settings; use crate::{h_stack, Icon, IconColor, IconElement, Label, LabelColor}; @@ -227,7 +227,7 @@ pub use stories::*; #[cfg(feature = "stories")] mod stories { - use gpui3::rems; + use gpui2::rems; use strum::IntoEnumIterator; use crate::{h_stack, v_stack, LabelColor, Story}; diff --git a/crates/ui2/src/elements/icon.rs b/crates/ui2/src/elements/icon.rs index ce63d9e9d7..e89309b5e6 100644 --- a/crates/ui2/src/elements/icon.rs +++ b/crates/ui2/src/elements/icon.rs @@ -1,6 +1,6 @@ use std::marker::PhantomData; -use gpui3::{svg, Hsla}; +use gpui2::{svg, Hsla}; use strum::EnumIter; use crate::prelude::*; diff --git a/crates/ui2/src/elements/label.rs b/crates/ui2/src/elements/label.rs index 5278404d2b..c57de26dd7 100644 --- a/crates/ui2/src/elements/label.rs +++ b/crates/ui2/src/elements/label.rs @@ -1,6 +1,6 @@ use std::marker::PhantomData; -use gpui3::{relative, Hsla, WindowContext}; +use gpui2::{relative, Hsla, WindowContext}; use smallvec::SmallVec; use crate::prelude::*; diff --git a/crates/ui2/src/elements/player.rs b/crates/ui2/src/elements/player.rs index 2cab1c57d5..2d1bbc1ce4 100644 --- a/crates/ui2/src/elements/player.rs +++ b/crates/ui2/src/elements/player.rs @@ -1,4 +1,4 @@ -use gpui3::{Hsla, ViewContext}; +use gpui2::{Hsla, ViewContext}; use crate::ThemeColor; diff --git a/crates/ui2/src/elements/stack.rs b/crates/ui2/src/elements/stack.rs index c69ddbf6e2..dbd0dae9d3 100644 --- a/crates/ui2/src/elements/stack.rs +++ b/crates/ui2/src/elements/stack.rs @@ -1,4 +1,4 @@ -use gpui3::{div, Div}; +use gpui2::{div, Div}; use crate::prelude::*; diff --git a/crates/ui2/src/lib.rs b/crates/ui2/src/lib.rs index 10419ed362..c2d02369a1 100644 --- a/crates/ui2/src/lib.rs +++ b/crates/ui2/src/lib.rs @@ -16,7 +16,7 @@ pub use static_data::*; // This needs to be fully qualified with `crate::` otherwise we get a panic // at: -// thread '' panicked at crates/gpui3/src/platform/mac/platform.rs:66:81: +// thread '' panicked at crates/gpui2/src/platform/mac/platform.rs:66:81: // called `Option::unwrap()` on a `None` value // // AFAICT this is something to do with conflicting names between crates and modules that diff --git a/crates/ui2/src/prelude.rs b/crates/ui2/src/prelude.rs index ee238a9f8e..bf3243f128 100644 --- a/crates/ui2/src/prelude.rs +++ b/crates/ui2/src/prelude.rs @@ -1,4 +1,4 @@ -pub use gpui3::{ +pub use gpui2::{ div, Element, ElementId, IntoAnyElement, ParentElement, SharedString, StatefulInteractive, StatelessInteractive, Styled, ViewContext, WindowContext, }; @@ -6,7 +6,7 @@ pub use gpui3::{ use crate::settings::user_settings; pub use crate::{theme, ButtonVariant, ElementExt, Theme}; -use gpui3::{hsla, rems, rgb, Hsla, Rems}; +use gpui2::{hsla, rems, rgb, Hsla, Rems}; use strum::EnumIter; // TODO Remove uses in favor of ThemeColor diff --git a/crates/ui2/src/settings.rs b/crates/ui2/src/settings.rs index d7ace0a083..c68e39e71c 100644 --- a/crates/ui2/src/settings.rs +++ b/crates/ui2/src/settings.rs @@ -1,6 +1,6 @@ use std::ops::Deref; -use gpui3::{ +use gpui2::{ rems, AbsoluteLength, AnyElement, BorrowAppContext, Bounds, LayoutId, Pixels, WindowContext, }; @@ -104,7 +104,7 @@ impl Element for WithSettings { type ViewState = E::ViewState; type ElementState = E::ElementState; - fn id(&self) -> Option { + fn id(&self) -> Option { None } diff --git a/crates/ui2/src/static_data.rs b/crates/ui2/src/static_data.rs index 06473fbfa4..907353544d 100644 --- a/crates/ui2/src/static_data.rs +++ b/crates/ui2/src/static_data.rs @@ -1,7 +1,7 @@ use std::path::PathBuf; use std::str::FromStr; -use gpui3::WindowContext; +use gpui2::WindowContext; use rand::Rng; use crate::{ diff --git a/crates/ui2/src/story.rs b/crates/ui2/src/story.rs index 2a753df4f1..3821f11c3b 100644 --- a/crates/ui2/src/story.rs +++ b/crates/ui2/src/story.rs @@ -1,4 +1,4 @@ -use gpui3::Div; +use gpui2::Div; use crate::prelude::*; diff --git a/crates/ui2/src/theme.rs b/crates/ui2/src/theme.rs index aa84e7c11f..0054bb84be 100644 --- a/crates/ui2/src/theme.rs +++ b/crates/ui2/src/theme.rs @@ -2,7 +2,7 @@ use std::collections::HashMap; use std::fmt; use std::sync::Arc; -use gpui3::{ +use gpui2::{ AnyElement, BorrowAppContext, Bounds, Element, Hsla, IntoAnyElement, LayoutId, Pixels, Result, ViewContext, WindowContext, }; @@ -160,7 +160,7 @@ impl Element for Themed { type ViewState = E::ViewState; type ElementState = E::ElementState; - fn id(&self) -> Option { + fn id(&self) -> Option { None }