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

@ -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 {