Use gpui instead of gpui2 consistenytly

This commit is contained in:
Conrad Irwin 2023-11-06 11:46:10 -07:00
parent eb325fb387
commit 496518f3e8
71 changed files with 111 additions and 111 deletions

View file

@ -1,5 +1,5 @@
use crate::{
self as gpui2, hsla, point, px, relative, rems, AlignItems, CursorStyle, DefiniteLength,
self as gpui, hsla, point, px, relative, rems, AlignItems, CursorStyle, DefiniteLength,
Display, Fill, FlexDirection, Hsla, JustifyContent, Length, Position, Rems, SharedString,
StyleRefinement, Visibility,
};

View file

@ -28,9 +28,9 @@ pub fn derive_component(input: TokenStream) -> TokenStream {
let (_, ty_generics, _) = ast.generics.split_for_impl();
let expanded = quote! {
impl #impl_generics gpui2::Component<#view_type> for #name #ty_generics #where_clause {
fn render(self) -> gpui2::AnyElement<#view_type> {
(move |view_state: &mut #view_type, cx: &mut gpui2::ViewContext<'_, #view_type>| self.render(view_state, cx))
impl #impl_generics gpui::Component<#view_type> for #name #ty_generics #where_clause {
fn render(self) -> gpui::AnyElement<#view_type> {
(move |view_state: &mut #view_type, cx: &mut gpui::ViewContext<'_, #view_type>| self.render(view_state, cx))
.render()
}
}

View file

@ -123,7 +123,7 @@ fn generate_predefined_setter(
.iter()
.map(|field_tokens| {
quote! {
style.#field_tokens = Some((#negation_token gpui2::#length_tokens).into());
style.#field_tokens = Some((#negation_token gpui::#length_tokens).into());
}
})
.collect::<Vec<_>>();
@ -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<gpui2::#length_type>) -> Self where Self: std::marker::Sized {
fn #method_name(mut self, length: impl std::clone::Clone + Into<gpui::#length_type>) -> Self where Self: std::marker::Sized {
let style = self.style();
#(#field_assignments)*
self

View file

@ -16,14 +16,14 @@ name = "test_app"
test-support = [
"async-trait",
"collections/test-support",
"gpui2/test-support",
"gpui/test-support",
"live_kit_server",
"nanoid",
]
[dependencies]
collections = { path = "../collections", optional = true }
gpui2 = { package = "gpui2", path = "../gpui2", optional = true }
gpui = { package = "gpui2", path = "../gpui2", optional = true }
live_kit_server = { path = "../live_kit_server", optional = true }
media = { path = "../media" }
@ -41,7 +41,7 @@ nanoid = { version ="0.4", optional = true}
[dev-dependencies]
collections = { path = "../collections", features = ["test-support"] }
gpui2 = { package = "gpui2", path = "../gpui2", features = ["test-support"] }
gpui = { package = "gpui2", path = "../gpui2", features = ["test-support"] }
live_kit_server = { path = "../live_kit_server" }
media = { path = "../media" }
nanoid = "0.4"

View file

@ -1,7 +1,7 @@
use std::{sync::Arc, time::Duration};
use futures::StreamExt;
use gpui2::KeyBinding;
use gpui::KeyBinding;
use live_kit_client2::{
LocalAudioTrack, LocalVideoTrack, RemoteAudioTrackUpdate, RemoteVideoTrackUpdate, Room,
};
@ -16,7 +16,7 @@ struct Quit;
fn main() {
SimpleLogger::init(LevelFilter::Info, Default::default()).expect("could not initialize logger");
gpui2::App::production(Arc::new(())).run(|cx| {
gpui::App::production(Arc::new(())).run(|cx| {
#[cfg(any(test, feature = "test-support"))]
println!("USING TEST LIVEKIT");
@ -173,6 +173,6 @@ fn main() {
});
}
fn quit(_: &Quit, cx: &mut gpui2::AppContext) {
fn quit(_: &Quit, cx: &mut gpui::AppContext) {
cx.quit();
}

View file

@ -2,7 +2,7 @@ use anyhow::{anyhow, Context, Result};
use async_trait::async_trait;
use collections::{BTreeMap, HashMap};
use futures::Stream;
use gpui2::BackgroundExecutor;
use gpui::BackgroundExecutor;
use live_kit_server::token;
use media::core_video::CVImageBuffer;
use parking_lot::Mutex;

View file

@ -14,7 +14,7 @@ anyhow.workspace = true
backtrace-on-stack-overflow = "0.3.0"
clap = { version = "4.4", features = ["derive", "string"] }
chrono = "0.4"
gpui2 = { path = "../gpui2" }
gpui = { package = "gpui2", path = "../gpui2" }
itertools = "0.11.0"
log.workspace = true
rust-embed.workspace = true
@ -29,4 +29,4 @@ ui = { package = "ui2", path = "../ui2", features = ["stories"] }
util = { path = "../util" }
[dev-dependencies]
gpui2 = { path = "../gpui2", features = ["test-support"] }
gpui = { package = "gpui2", path = "../gpui2", features = ["test-support"] }

View file

@ -1,7 +1,7 @@
use std::borrow::Cow;
use anyhow::{anyhow, Result};
use gpui2::{AssetSource, SharedString};
use gpui::{AssetSource, SharedString};
use rust_embed::RustEmbed;
#[derive(RustEmbed)]

View file

@ -1,5 +1,5 @@
use crate::story::Story;
use gpui2::{px, Div, Render};
use gpui::{px, Div, Render};
use theme2::{default_color_scales, ColorScaleStep};
use ui::prelude::*;
@ -20,7 +20,7 @@ impl Render for ColorsStory {
.flex_col()
.gap_1()
.overflow_y_scroll()
.text_color(gpui2::white())
.text_color(gpui::white())
.children(color_scales.into_iter().map(|scale| {
div()
.flex()

View file

@ -1,4 +1,4 @@
use gpui2::{
use gpui::{
div, Div, FocusEnabled, Focusable, KeyBinding, ParentElement, Render, StatefulInteraction,
StatelessInteractive, Styled, View, VisualContext, WindowContext,
};
@ -33,7 +33,7 @@ impl FocusStory {
impl Render for FocusStory {
type Element = Div<Self, StatefulInteraction<Self>, FocusEnabled<Self>>;
fn render(&mut self, cx: &mut gpui2::ViewContext<Self>) -> Self::Element {
fn render(&mut self, cx: &mut gpui::ViewContext<Self>) -> Self::Element {
let theme = cx.theme();
let color_1 = theme.styles.git.created;
let color_2 = theme.styles.git.modified;

View file

@ -1,5 +1,5 @@
use crate::{story::Story, story_selector::ComponentStory};
use gpui2::{Div, Render, StatefulInteraction, View, VisualContext};
use gpui::{Div, Render, StatefulInteraction, View, VisualContext};
use strum::IntoEnumIterator;
use ui::prelude::*;

View file

@ -1,4 +1,4 @@
use gpui2::{
use gpui::{
div, px, Component, Div, ParentElement, Render, SharedString, StatefulInteraction, Styled,
View, VisualContext, WindowContext,
};
@ -15,7 +15,7 @@ impl ScrollStory {
impl Render for ScrollStory {
type Element = Div<Self, StatefulInteraction<Self>>;
fn render(&mut self, cx: &mut gpui2::ViewContext<Self>) -> Self::Element {
fn render(&mut self, cx: &mut gpui::ViewContext<Self>) -> Self::Element {
let theme = cx.theme();
let color_1 = theme.styles.git.created;
let color_2 = theme.styles.git.modified;

View file

@ -1,4 +1,4 @@
use gpui2::{div, white, Div, ParentElement, Render, Styled, View, VisualContext, WindowContext};
use gpui::{div, white, Div, ParentElement, Render, Styled, View, VisualContext, WindowContext};
pub struct TextStory;
@ -11,7 +11,7 @@ impl TextStory {
impl Render for TextStory {
type Element = Div<Self>;
fn render(&mut self, cx: &mut gpui2::ViewContext<Self>) -> Self::Element {
fn render(&mut self, cx: &mut gpui::ViewContext<Self>) -> Self::Element {
div().size_full().bg(white()).child(concat!(
"The quick brown fox jumps over the lazy dog. ",
"Meanwhile, the lazy dog decided it was time for a change. ",

View file

@ -1,4 +1,4 @@
use gpui2::{px, rgb, Div, Hsla, Render};
use gpui::{px, rgb, Div, Hsla, Render};
use ui::prelude::*;
use crate::story::Story;

View file

@ -5,7 +5,7 @@ use crate::stories::*;
use anyhow::anyhow;
use clap::builder::PossibleValue;
use clap::ValueEnum;
use gpui2::{AnyView, VisualContext};
use gpui::{AnyView, VisualContext};
use strum::{EnumIter, EnumString, IntoEnumIterator};
use ui::prelude::*;
use ui::{AvatarStory, ButtonStory, DetailsStory, IconStory, InputStory, LabelStory};

View file

@ -8,7 +8,7 @@ mod story_selector;
use std::sync::Arc;
use clap::Parser;
use gpui2::{
use gpui::{
div, px, size, AnyView, AppContext, Bounds, Div, Render, ViewContext, VisualContext,
WindowBounds, WindowOptions,
};
@ -22,7 +22,7 @@ use ui::prelude::*;
use crate::assets::Assets;
use crate::story_selector::StorySelector;
// gpui2::actions! {
// gpui::actions! {
// storybook,
// [ToggleInspector]
// }
@ -51,7 +51,7 @@ fn main() {
let theme_name = args.theme.unwrap_or("Zed Pro Moonlight".to_string());
let asset_source = Arc::new(Assets);
gpui2::App::production(asset_source).run(move |cx| {
gpui::App::production(asset_source).run(move |cx| {
load_embedded_fonts(cx).unwrap();
let mut store = SettingsStore::default();
@ -116,7 +116,7 @@ impl Render for StoryWrapper {
}
}
fn load_embedded_fonts(cx: &AppContext) -> gpui2::Result<()> {
fn load_embedded_fonts(cx: &AppContext) -> gpui::Result<()> {
let font_paths = cx.asset_source().list("fonts")?;
let mut embedded_fonts = Vec::new();
for font_path in font_paths {

View file

@ -1,6 +1,6 @@
// todo!()
use alacritty_terminal::term::color::Rgb as AlacRgb;
// use gpui2::color::Color;
// use gpui::color::Color;
// use theme2::TerminalStyle;
///Converts a 2, 8, or 24 bit color ANSI color to the GPUI equivalent

View file

@ -7,7 +7,7 @@ publish = false
[dependencies]
anyhow.workspace = true
chrono = "0.4"
gpui2 = { path = "../gpui2" }
gpui = { package = "gpui2", path = "../gpui2" }
itertools = { version = "0.11.0", optional = true }
serde.workspace = true
settings2 = { path = "../settings2" }

View file

@ -40,12 +40,12 @@ impl<V: 'static> TodoList<V> {
All of this is relatively straightforward.
We use [gpui2::SharedString] in components instead of [std::string::String]. This allows us to [TODO: someone who actually knows please explain why we use SharedString].
We use [gpui::SharedString] in components instead of [std::string::String]. This allows us to [TODO: someone who actually knows please explain why we use SharedString].
When we want to pass an action we pass a `ClickHandler`. Whenever we want to add an action, the struct it belongs to needs to be generic over the view type `V`.
~~~rust
use gpui2::hsla
use gpui::hsla
impl<V: 'static> TodoList<V> {
// ...
@ -74,7 +74,7 @@ As you start using the Tailwind-style conventions you will be surprised how quic
**Why `50.0/360.0` in `hsla()`?**
gpui [gpui2::Hsla] use `0.0-1.0` for all it's values, but it is common for tools to use `0-360` for hue.
gpui [gpui::Hsla] use `0.0-1.0` for all it's values, but it is common for tools to use `0-360` for hue.
This may change in the future, but this is a little trick that let's you use familiar looking values.
@ -98,7 +98,7 @@ impl<V: 'static> TodoList<V> {
Now we have access to the complete set of colors defined in the theme.
~~~rust
use gpui2::hsla
use gpui::hsla
impl<V: 'static> TodoList<V> {
// ...
@ -113,7 +113,7 @@ impl<V: 'static> TodoList<V> {
Let's finish up some basic styles for the container then move on to adding the other elements.
~~~rust
use gpui2::hsla
use gpui::hsla
impl<V: 'static> TodoList<V> {
// ...

View file

@ -1,4 +1,4 @@
use gpui2::img;
use gpui::img;
use crate::prelude::*;
@ -33,7 +33,7 @@ impl Avatar {
img.uri(self.src.clone())
.size_4()
// todo!(Pull the avatar fallback background from the theme.)
.bg(gpui2::red())
.bg(gpui::red())
}
}
@ -44,7 +44,7 @@ pub use stories::*;
mod stories {
use super::*;
use crate::Story;
use gpui2::{Div, Render};
use gpui::{Div, Render};
pub struct AvatarStory;

View file

@ -1,6 +1,6 @@
use std::sync::Arc;
use gpui2::{div, rems, DefiniteLength, Hsla, MouseButton, WindowContext};
use gpui::{div, rems, DefiniteLength, Hsla, MouseButton, WindowContext};
use crate::{h_stack, Icon, IconColor, IconElement, Label, LabelColor, LineHeightStyle};
use crate::{prelude::*, IconButton};
@ -234,7 +234,7 @@ pub use stories::*;
mod stories {
use super::*;
use crate::{h_stack, v_stack, LabelColor, Story};
use gpui2::{rems, Div, Render};
use gpui::{rems, Div, Render};
use strum::IntoEnumIterator;
pub struct ButtonStory;

View file

@ -1,6 +1,6 @@
use std::sync::Arc;
use gpui2::{
use gpui::{
div, Component, ElementId, ParentElement, StatefulInteractive, StatelessInteractive, Styled,
ViewContext,
};
@ -175,7 +175,7 @@ pub use stories::*;
mod stories {
use super::*;
use crate::{h_stack, Story};
use gpui2::{Div, Render};
use gpui::{Div, Render};
pub struct CheckboxStory;

View file

@ -65,7 +65,7 @@ pub use stories::*;
mod stories {
use super::*;
use crate::story::Story;
use gpui2::{Div, Render};
use gpui::{Div, Render};
pub struct ContextMenuStory;

View file

@ -47,7 +47,7 @@ pub use stories::*;
mod stories {
use super::*;
use crate::{Button, Story};
use gpui2::{Div, Render};
use gpui::{Div, Render};
pub struct DetailsStory;

View file

@ -33,7 +33,7 @@ pub use stories::*;
mod stories {
use super::*;
use crate::{static_players, Story};
use gpui2::{Div, Render};
use gpui::{Div, Render};
pub struct FacepileStory;

View file

@ -1,4 +1,4 @@
use gpui2::{rems, svg, Hsla};
use gpui::{rems, svg, Hsla};
use strum::EnumIter;
use crate::prelude::*;
@ -204,7 +204,7 @@ pub use stories::*;
#[cfg(feature = "stories")]
mod stories {
use gpui2::{Div, Render};
use gpui::{Div, Render};
use strum::IntoEnumIterator;
use crate::Story;

View file

@ -1,6 +1,6 @@
use std::sync::Arc;
use gpui2::{rems, MouseButton};
use gpui::{rems, MouseButton};
use crate::{h_stack, prelude::*};
use crate::{ClickHandler, Icon, IconColor, IconElement};

View file

@ -1,4 +1,4 @@
use gpui2::px;
use gpui::px;
use crate::prelude::*;

View file

@ -111,7 +111,7 @@ pub use stories::*;
mod stories {
use super::*;
use crate::Story;
use gpui2::{Div, Render};
use gpui::{Div, Render};
pub struct InputStory;

View file

@ -158,7 +158,7 @@ pub use stories::*;
mod stories {
use super::*;
use crate::Story;
use gpui2::{Div, Render};
use gpui::{Div, Render};
use itertools::Itertools;
pub struct KeybindingStory;

View file

@ -1,4 +1,4 @@
use gpui2::{relative, rems, Hsla, WindowContext};
use gpui::{relative, rems, Hsla, WindowContext};
use smallvec::SmallVec;
use crate::prelude::*;
@ -194,7 +194,7 @@ pub use stories::*;
mod stories {
use super::*;
use crate::Story;
use gpui2::{Div, Render};
use gpui::{Div, Render};
pub struct LabelStory;

View file

@ -1,4 +1,4 @@
use gpui2::div;
use gpui::div;
use crate::settings::user_settings;
use crate::{

View file

@ -1,4 +1,4 @@
use gpui2::AnyElement;
use gpui::AnyElement;
use smallvec::SmallVec;
use crate::{h_stack, prelude::*, v_stack, Button, Icon, IconButton, Label};

View file

@ -1,4 +1,4 @@
use gpui2::rems;
use gpui::rems;
use crate::prelude::*;
use crate::{h_stack, Icon};

View file

@ -153,13 +153,13 @@ impl PaletteItem {
}
}
use gpui2::ElementId;
use gpui::ElementId;
#[cfg(feature = "stories")]
pub use stories::*;
#[cfg(feature = "stories")]
mod stories {
use gpui2::{Div, Render};
use gpui::{Div, Render};
use crate::{ModifierKeys, Story};

View file

@ -1,4 +1,4 @@
use gpui2::{AbsoluteLength, AnyElement};
use gpui::{AbsoluteLength, AnyElement};
use smallvec::SmallVec;
use crate::prelude::*;
@ -126,7 +126,7 @@ pub use stories::*;
mod stories {
use super::*;
use crate::{Label, Story};
use gpui2::{Div, Render};
use gpui::{Div, Render};
pub struct PanelStory;

View file

@ -1,4 +1,4 @@
use gpui2::{Hsla, ViewContext};
use gpui::{Hsla, ViewContext};
use crate::prelude::*;

View file

@ -1,4 +1,4 @@
use gpui2::SharedString;
use gpui::SharedString;
use crate::Icon;

View file

@ -1,4 +1,4 @@
use gpui2::{div, Div};
use gpui::{div, Div};
use crate::prelude::*;

View file

@ -1,6 +1,6 @@
use crate::prelude::*;
use crate::{Icon, IconColor, IconElement, Label, LabelColor};
use gpui2::{red, Div, ElementId, Render, View, VisualContext};
use gpui::{red, Div, ElementId, Render, View, VisualContext};
#[derive(Component, Clone)]
pub struct Tab {

View file

@ -1,4 +1,4 @@
use gpui2::AnyElement;
use gpui::AnyElement;
use smallvec::SmallVec;
use crate::prelude::*;
@ -70,7 +70,7 @@ pub use stories::*;
#[cfg(feature = "stories")]
mod stories {
use gpui2::{Div, Render};
use gpui::{Div, Render};
use crate::{Label, Story};

View file

@ -1,4 +1,4 @@
use gpui2::{div, Component, ParentElement};
use gpui::{div, Component, ParentElement};
use crate::{Icon, IconColor, IconElement, IconSize};

View file

@ -1,4 +1,4 @@
use gpui2::{div, px, Div, ParentElement, Render, SharedString, Styled, ViewContext};
use gpui::{div, px, Div, ParentElement, Render, SharedString, Styled, ViewContext};
use theme2::ActiveTheme;
#[derive(Clone, Debug)]

View file

@ -1,4 +1,4 @@
pub use gpui2::{
pub use gpui::{
div, Component, Element, ElementId, ParentElement, SharedString, StatefulInteractive,
StatelessInteractive, Styled, ViewContext, WindowContext,
};
@ -7,7 +7,7 @@ pub use crate::elevation::*;
pub use crate::ButtonVariant;
pub use theme2::ActiveTheme;
use gpui2::Hsla;
use gpui::Hsla;
use strum::EnumIter;
#[derive(Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash, Clone, Copy, EnumIter)]

View file

@ -1,6 +1,6 @@
use std::ops::Deref;
use gpui2::{rems, AbsoluteLength, AppContext, WindowContext};
use gpui::{rems, AbsoluteLength, AppContext, WindowContext};
use crate::prelude::*;

View file

@ -3,7 +3,7 @@ use std::str::FromStr;
use std::sync::Arc;
use chrono::DateTime;
use gpui2::{AppContext, ViewContext};
use gpui::{AppContext, ViewContext};
use rand::Rng;
use theme2::ActiveTheme;

View file

@ -1,4 +1,4 @@
use gpui2::Div;
use gpui::Div;
use crate::prelude::*;

View file

@ -1,6 +1,6 @@
use crate::prelude::*;
use crate::{Icon, IconButton, Label, Panel, PanelSide};
use gpui2::{rems, AbsoluteLength};
use gpui::{rems, AbsoluteLength};
#[derive(Component)]
pub struct AssistantPanel {
@ -77,7 +77,7 @@ pub use stories::*;
mod stories {
use super::*;
use crate::Story;
use gpui2::{Div, Render};
use gpui::{Div, Render};
pub struct AssistantPanelStory;
impl Render for AssistantPanelStory {

View file

@ -2,7 +2,7 @@ use std::path::PathBuf;
use crate::prelude::*;
use crate::{h_stack, HighlightedText};
use gpui2::Div;
use gpui::Div;
#[derive(Clone)]
pub struct Symbol(pub Vec<HighlightedText>);
@ -73,7 +73,7 @@ pub use stories::*;
mod stories {
use super::*;
use crate::Story;
use gpui2::Render;
use gpui::Render;
use std::str::FromStr;
pub struct BreadcrumbStory;

View file

@ -1,4 +1,4 @@
use gpui2::{Hsla, WindowContext};
use gpui::{Hsla, WindowContext};
use crate::prelude::*;
use crate::{h_stack, v_stack, Icon, IconElement};
@ -235,7 +235,7 @@ mod stories {
empty_buffer_example, hello_world_rust_buffer_example,
hello_world_rust_buffer_with_status_example, Story,
};
use gpui2::{rems, Div, Render};
use gpui::{rems, Div, Render};
pub struct BufferStory;

View file

@ -1,4 +1,4 @@
use gpui2::{Div, Render, View, VisualContext};
use gpui::{Div, Render, View, VisualContext};
use crate::prelude::*;
use crate::{h_stack, Icon, IconButton, IconColor, Input};

View file

@ -108,7 +108,7 @@ pub use stories::*;
#[cfg(feature = "stories")]
mod stories {
use chrono::DateTime;
use gpui2::{Div, Render};
use gpui::{Div, Render};
use crate::{Panel, Story};

View file

@ -92,7 +92,7 @@ pub use stories::*;
mod stories {
use super::*;
use crate::Story;
use gpui2::{Div, Render};
use gpui::{Div, Render};
pub struct CollabPanelStory;

View file

@ -27,7 +27,7 @@ pub use stories::*;
#[cfg(feature = "stories")]
mod stories {
use gpui2::{Div, Render};
use gpui::{Div, Render};
use crate::Story;

View file

@ -25,7 +25,7 @@ pub use stories::*;
#[cfg(feature = "stories")]
mod stories {
use gpui2::{Div, Render};
use gpui::{Div, Render};
use crate::Story;

View file

@ -1,6 +1,6 @@
use std::path::PathBuf;
use gpui2::{Div, Render, View, VisualContext};
use gpui::{Div, Render, View, VisualContext};
use crate::prelude::*;
use crate::{

View file

@ -40,7 +40,7 @@ pub use stories::*;
mod stories {
use super::*;
use crate::Story;
use gpui2::{Div, Render};
use gpui::{Div, Render};
pub struct LanguageSelectorStory;

View file

@ -40,7 +40,7 @@ pub use stories::*;
mod stories {
use super::*;
use crate::{hello_world_rust_buffer_example, Story};
use gpui2::{Div, Render};
use gpui::{Div, Render};
pub struct MultiBufferStory;

View file

@ -345,7 +345,7 @@ impl<V> Notification<V> {
}
use chrono::NaiveDateTime;
use gpui2::{px, Styled};
use gpui::{px, Styled};
#[cfg(feature = "stories")]
pub use stories::*;
@ -353,7 +353,7 @@ pub use stories::*;
mod stories {
use super::*;
use crate::{Panel, Story};
use gpui2::{Div, Render};
use gpui::{Div, Render};
pub struct NotificationsPanelStory;

View file

@ -1,4 +1,4 @@
use gpui2::{hsla, red, AnyElement, ElementId, ExternalPaths, Hsla, Length, Size, View};
use gpui::{hsla, red, AnyElement, ElementId, ExternalPaths, Hsla, Length, Size, View};
use smallvec::SmallVec;
use crate::prelude::*;

View file

@ -46,7 +46,7 @@ impl ProjectPanel {
}
}
use gpui2::ElementId;
use gpui::ElementId;
#[cfg(feature = "stories")]
pub use stories::*;
@ -54,7 +54,7 @@ pub use stories::*;
mod stories {
use super::*;
use crate::{Panel, Story};
use gpui2::{Div, Render};
use gpui::{Div, Render};
pub struct ProjectPanelStory;

View file

@ -36,7 +36,7 @@ pub use stories::*;
mod stories {
use super::*;
use crate::Story;
use gpui2::{Div, Render};
use gpui::{Div, Render};
pub struct RecentProjectsStory;

View file

@ -92,7 +92,7 @@ impl TabBar {
}
}
use gpui2::ElementId;
use gpui::ElementId;
#[cfg(feature = "stories")]
pub use stories::*;
@ -100,7 +100,7 @@ pub use stories::*;
mod stories {
use super::*;
use crate::Story;
use gpui2::{Div, Render};
use gpui::{Div, Render};
pub struct TabBarStory;

View file

@ -1,4 +1,4 @@
use gpui2::{relative, rems, Size};
use gpui::{relative, rems, Size};
use crate::prelude::*;
use crate::{Icon, IconButton, Pane, Tab};
@ -83,7 +83,7 @@ pub use stories::*;
mod stories {
use super::*;
use crate::Story;
use gpui2::{Div, Render};
use gpui::{Div, Render};
pub struct TerminalStory;
impl Render for TerminalStory {

View file

@ -39,7 +39,7 @@ pub use stories::*;
#[cfg(feature = "stories")]
mod stories {
use gpui2::{Div, Render};
use gpui::{Div, Render};
use crate::Story;

View file

@ -1,7 +1,7 @@
use std::sync::atomic::AtomicBool;
use std::sync::Arc;
use gpui2::{Div, Render, View, VisualContext};
use gpui::{Div, Render, View, VisualContext};
use crate::prelude::*;
use crate::settings::user_settings;

View file

@ -1,4 +1,4 @@
use gpui2::AnyElement;
use gpui::AnyElement;
use smallvec::SmallVec;
use crate::prelude::*;
@ -73,7 +73,7 @@ mod stories {
use std::path::PathBuf;
use std::str::FromStr;
use gpui2::{Div, Render};
use gpui::{Div, Render};
use crate::{Breadcrumb, HighlightedText, Icon, IconButton, Story, Symbol};

View file

@ -77,7 +77,7 @@ pub use stories::*;
#[cfg(feature = "stories")]
mod stories {
use gpui2::{Div, Render};
use gpui::{Div, Render};
use crate::Story;

View file

@ -1,7 +1,7 @@
use std::sync::Arc;
use chrono::DateTime;
use gpui2::{px, relative, Div, Render, Size, View, VisualContext};
use gpui::{px, relative, Div, Render, Size, View, VisualContext};
use settings2::Settings;
use theme2::ThemeSettings;
@ -373,7 +373,7 @@ pub use stories::*;
#[cfg(feature = "stories")]
mod stories {
use super::*;
use gpui2::VisualContext;
use gpui::VisualContext;
pub struct WorkspaceStory {
workspace: View<Workspace>,

View file

@ -2,7 +2,7 @@ use anyhow::{anyhow, Result};
use async_trait::async_trait;
use collections::HashMap;
use futures::lock::Mutex;
use gpui2::executor::Background;
use gpui::executor::Background;
use language2::{LanguageServerName, LspAdapter, LspAdapterDelegate};
use lsp2::LanguageServerBinary;
use plugin_runtime::{Plugin, PluginBinary, PluginBuilder, WasiFn};

View file

@ -410,7 +410,7 @@ mod components {
themes::rose_pine,
};
use gpui::{platform::MouseButton, ViewContext};
use gpui2_macros::Element;
use gpui_macros::Element;
use std::{marker::PhantomData, rc::Rc};
struct ButtonHandlers<V, D> {
click: Option<Rc<dyn Fn(&mut V, &D, &mut ViewContext<V>)>>,
@ -535,7 +535,7 @@ mod element {
platform::{MouseButton, MouseButtonEvent},
EngineLayout, EventContext, RenderContext, ViewContext,
};
use gpui2_macros::tailwind_lengths;
use gpui_macros::tailwind_lengths;
use std::{
any::{Any, TypeId},
cell::Cell,
@ -4572,7 +4572,7 @@ mod frame {
};
use anyhow::{anyhow, Result};
use gpui::LayoutNodeId;
use gpui2_macros::IntoElement;
use gpui_macros::IntoElement;
#[element_crate = "crate"]
pub struct Frame<V: 'static> {
style: OptionalStyle,