chore: use re-exports for clean theme types

This commit is contained in:
Matias Fontanini 2025-02-20 16:15:12 -08:00
parent 8a806d76a1
commit fa4d862834
15 changed files with 15 additions and 19 deletions

View File

@ -4,7 +4,7 @@ use crate::{
elements::{Line, Text},
text_style::{Color, TextStyle},
},
theme::clean::CodeBlockStyle,
theme::CodeBlockStyle,
};
use flate2::read::ZlibDecoder;
use once_cell::sync::Lazy;

View File

@ -13,7 +13,7 @@ use crate::{
operation::{AsRenderOperations, BlockLine, RenderOperation},
properties::WindowSize,
},
theme::clean::{Alignment, CodeBlockStyle},
theme::{Alignment, CodeBlockStyle},
};
use schemars::JsonSchema;
use serde::Deserialize;

View File

@ -15,7 +15,7 @@ use crate::{
Image, ImageSource,
printer::{ImageProperties, TerminalImage},
},
theme::{clean::ProcessingThemeError, raw::PresentationTheme},
theme::{ProcessingThemeError, raw::PresentationTheme},
third_party::ThirdPartyRender,
tools::{ExecutionError, ThirdPartyTools},
};

View File

@ -30,8 +30,7 @@ use crate::{
printer::{ImageRegistry, RegisterImageError},
},
theme::{
AuthorPositioning, Margin,
clean::{Alignment, CodeBlockStyle, ElementType, PresentationTheme, ProcessingThemeError},
Alignment, AuthorPositioning, CodeBlockStyle, ElementType, Margin, PresentationTheme, ProcessingThemeError,
raw,
registry::{LoadThemeError, PresentationThemeRegistry},
},

View File

@ -123,7 +123,7 @@ mod test {
operation::{AsRenderOperations, BlockLine, RenderAsync, RenderAsyncState},
properties::WindowSize,
},
theme::{Margin, clean::Alignment},
theme::{Alignment, Margin},
};
use rstest::rstest;
use std::rc::Rc;

View File

@ -21,7 +21,7 @@ use crate::{
image::printer::{ImagePrinter, ImageRegistry},
printer::TerminalIo,
},
theme::{clean::ProcessingThemeError, raw::PresentationTheme},
theme::{ProcessingThemeError, raw::PresentationTheme},
third_party::ThirdPartyRender,
};
use std::{

View File

@ -17,7 +17,7 @@ use crate::{
},
printer::TerminalIo,
},
theme::clean::Alignment,
theme::Alignment,
};
use std::mem;

View File

@ -1,4 +1,4 @@
use crate::{render::properties::WindowSize, theme::clean::Alignment};
use crate::{render::properties::WindowSize, theme::Alignment};
#[derive(Debug)]
pub(crate) struct Layout {

View File

@ -16,7 +16,7 @@ use crate::{
Terminal,
image::printer::{ImagePrinter, PrintImageError},
},
theme::{Margin, clean::Alignment},
theme::{Alignment, Margin},
};
use engine::{RenderEngine, RenderEngineOptions};
use std::{

View File

@ -5,7 +5,7 @@ use crate::{
text_style::{Color, Colors},
},
terminal::image::Image,
theme::{Margin, clean::Alignment},
theme::{Alignment, Margin},
};
use std::{fmt::Debug, rc::Rc};

View File

@ -166,7 +166,7 @@ mod test {
assert!(merged.is_ok(), "theme '{theme_name}' can't be merged: {}", merged.unwrap_err());
let resources = Resources::new("/tmp/foo", "/tmp/foo", Default::default());
crate::theme::clean::PresentationTheme::new(&theme, &resources).expect("malformed theme");
crate::theme::PresentationTheme::new(&theme, &resources).expect("malformed theme");
}
}

View File

@ -13,7 +13,7 @@ use crate::{
properties::WindowSize,
},
terminal::image::{Image, printer::RegisterImageError},
theme::clean::{Alignment, MermaidStyle, PresentationTheme, TypstStyle},
theme::{Alignment, MermaidStyle, PresentationTheme, TypstStyle},
tools::{ExecutionError, ThirdPartyTools},
};
use std::{

View File

@ -20,10 +20,7 @@ use crate::{
image::{Image, printer::ImageRegistry},
should_hide_cursor,
},
theme::{
Margin,
clean::{Alignment, ExecutionOutputBlockStyle, ExecutionStatusBlockStyle},
},
theme::{Alignment, ExecutionOutputBlockStyle, ExecutionStatusBlockStyle, Margin},
};
use crossterm::{
ExecutableCommand, cursor,

View File

@ -13,7 +13,7 @@ use crate::{
properties::WindowSize,
},
terminal::image::Image,
theme::{Margin, clean::PresentationTheme},
theme::{Margin, PresentationTheme},
};
use std::{iter, rc::Rc};
use unicode_width::UnicodeWidthStr;

View File

@ -8,7 +8,7 @@ use crate::{
operation::{AsRenderOperations, BlockLine, RenderOperation},
properties::WindowSize,
},
theme::{Margin, clean::Alignment},
theme::{Alignment, Margin},
};
use std::rc::Rc;