pub mod fragment;
pub mod fragments;
pub mod html;
pub mod html_escaping;
mod numbers;
mod render;
pub mod simple_element;
pub mod state;
mod text_element;
mod dispatch;
pub use dispatch::{dispatch, handle, Reducer};
pub use self::render::Render;
#[doc(hidden)]
pub use serde_json;
pub use fragment::Fragment;
pub use fragments::diff_html;
pub use simple_element::SimpleElement;
pub use state::decode_state;
pub use text_element::Raw;
pub use text_element::RawOwned;
pub use workers_rsx_impl::{component, css, html, page, rsx, view};
pub use workers_rsx_impl::ActionJson;
pub static PREFLIGHT_CSS: &str = include_str!("preflight.css");
pub fn generate_tailwind_css(class_names: &[&str]) -> String {
let mut generator = tailwind_rs_core::CssGenerator::new();
for name in class_names {
let _ = generator.add_class(name);
}
let utility_css = generator.generate_css();
if utility_css.is_empty() {
return String::new();
}
format!("{}{}", PREFLIGHT_CSS, utility_css)
}
#[macro_export]
macro_rules! raw {
($s:expr) => {
::workers_rsx::Raw::from($s)
};
}