pub mod codegen;
pub mod colors;
pub mod hot_reload;
mod include_expand;
pub mod ir;
pub mod mutations;
pub mod native;
mod render;
pub mod style;
pub use codegen::{generate_native_source, NativeCodegenTarget};
pub use colors::resolve_rgba;
pub use crepuscularity_core::CrepusError;
pub use hot_reload::{ast_shape_compatible, plan_hot_reload, HotReloadEnvelope, HotReloadMessage};
pub use ir::{PickerOption, StackAxis, ViewIr, ViewNode, ViewStyle, IR_VERSION};
pub use mutations::{apply_mutations, diff_ir, IrMutation};
pub use native::{
FilePickerRequest, FilePickerResponse, NativeCapability, NativePluginRequest,
NativePluginResponse, NativeRequest, NativeResponse, PickedFile, NATIVE_CAPABILITIES,
};
pub use render::{
render_component_file_to_ir, render_from_files, render_nodes_to_ir, render_template_to_ir,
};
pub fn to_json(ir: &ViewIr) -> Result<String, serde_json::Error> {
serde_json::to_string(ir)
}
pub fn to_json_pretty(ir: &ViewIr) -> Result<String, serde_json::Error> {
serde_json::to_string_pretty(ir)
}
#[cfg(test)]
mod tests;