1
0

lib.rs 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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(crate) mod file_data;
  24. pub use file_data::*;
  25. pub mod geometry;
  26. mod global_attributes;
  27. pub mod input_data;
  28. #[cfg(feature = "native-bind")]
  29. pub mod native_bind;
  30. pub mod point_interaction;
  31. mod render_template;
  32. #[cfg(feature = "wasm-bind")]
  33. mod web_sys_bind;
  34. #[cfg(feature = "serialize")]
  35. mod transit;
  36. #[cfg(feature = "serialize")]
  37. pub use transit::*;
  38. pub use elements::*;
  39. pub use events::*;
  40. pub use global_attributes::*;
  41. pub use render_template::*;
  42. #[cfg(feature = "eval")]
  43. pub mod eval;
  44. pub mod extensions {
  45. pub use crate::elements::extensions::*;
  46. pub use crate::global_attributes::{GlobalAttributesExtension, SvgAttributesExtension};
  47. }
  48. pub mod prelude {
  49. pub use crate::elements::extensions::*;
  50. #[cfg(feature = "eval")]
  51. pub use crate::eval::*;
  52. pub use crate::events::*;
  53. pub use crate::global_attributes::{GlobalAttributesExtension, SvgAttributesExtension};
  54. pub use crate::point_interaction::*;
  55. pub use keyboard_types::{self, Code, Key, Location, Modifiers};
  56. }