lib.rs 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. #![doc = include_str!("../README.md")]
  2. #![doc(html_logo_url = "https://avatars.githubusercontent.com/u/79236386")]
  3. #![doc(html_favicon_url = "https://avatars.githubusercontent.com/u/79236386")]
  4. #![allow(non_snake_case)]
  5. //! # Dioxus Namespace for HTML
  6. //!
  7. //! This crate provides a set of compile-time correct HTML elements that can be used with the Rsx and Html macros.
  8. //! This system allows users to easily build new tags, new types, and customize the output of the Rsx and Html macros.
  9. //!
  10. //! An added benefit of this approach is the ability to lend comprehensive documentation on how to use these elements inside
  11. //! of the Rsx and Html macros. Each element comes with a substantial amount of documentation on how to best use it, hopefully
  12. //! making the development cycle quick.
  13. //!
  14. //! All elements are used as zero-sized unit structs with trait impls.
  15. //!
  16. //! Currently, we don't validate for structures, but do validate attributes.
  17. mod elements;
  18. #[cfg(feature = "hot-reload-context")]
  19. pub use elements::HtmlCtx;
  20. #[cfg(feature = "html-to-rsx")]
  21. pub use elements::{map_html_attribute_to_rsx, map_html_element_to_rsx};
  22. pub mod events;
  23. pub mod geometry;
  24. mod global_attributes;
  25. pub mod input_data;
  26. #[cfg(feature = "native-bind")]
  27. pub mod native_bind;
  28. mod render_template;
  29. #[cfg(feature = "wasm-bind")]
  30. mod web_sys_bind;
  31. #[cfg(feature = "serialize")]
  32. mod transit;
  33. #[cfg(feature = "serialize")]
  34. pub use transit::*;
  35. pub use elements::*;
  36. pub use events::*;
  37. pub use global_attributes::*;
  38. pub use render_template::*;
  39. mod eval;
  40. pub mod prelude {
  41. pub use crate::eval::*;
  42. pub use crate::events::*;
  43. }