* switch to a Document trait and introduce Script/Head/Style/Meta components * Fix desktop title * Insert special elements into the head during the inital SSR render * Make all head component attributes optional * hydrate head elements * improve the server streaming head warning * Document fullstack head hydration approach * deduplicate head elements by href * move Link into head::Link * document head components * add meta and title examples * Fix a few doc examples * fix formatting * Add title to playwright tests * serde is optional on web, but it is enabled by hydrate * remove leftover console log
70 lines
2.3 KiB
Rust
70 lines
2.3 KiB
Rust
#![doc = include_str!("../README.md")]
|
|
#![doc(html_logo_url = "https://avatars.githubusercontent.com/u/79236386")]
|
|
#![doc(html_favicon_url = "https://avatars.githubusercontent.com/u/79236386")]
|
|
#![allow(non_snake_case)]
|
|
|
|
//! # Dioxus Namespace for HTML
|
|
//!
|
|
//! This crate provides a set of compile-time correct HTML elements that can be used with the Rsx and Html macros.
|
|
//! This system allows users to easily build new tags, new types, and customize the output of the Rsx and Html macros.
|
|
//!
|
|
//! An added benefit of this approach is the ability to lend comprehensive documentation on how to use these elements inside
|
|
//! of the Rsx and Html macros. Each element comes with a substantial amount of documentation on how to best use it, hopefully
|
|
//! making the development cycle quick.
|
|
//!
|
|
//! All elements are used as zero-sized unit structs with trait impls.
|
|
//!
|
|
//! Currently, we don't validate for structures, but do validate attributes.
|
|
|
|
pub mod elements;
|
|
#[cfg(feature = "hot-reload-context")]
|
|
pub use elements::HtmlCtx;
|
|
#[cfg(feature = "html-to-rsx")]
|
|
pub use elements::{map_html_attribute_to_rsx, map_html_element_to_rsx};
|
|
pub mod events;
|
|
pub(crate) mod file_data;
|
|
pub use file_data::*;
|
|
mod attribute_groups;
|
|
pub mod geometry;
|
|
pub mod input_data;
|
|
#[cfg(feature = "native-bind")]
|
|
pub mod native_bind;
|
|
pub mod point_interaction;
|
|
mod render_template;
|
|
#[cfg(feature = "wasm-bind")]
|
|
mod web_sys_bind;
|
|
#[cfg(feature = "wasm-bind")]
|
|
pub use web_sys_bind::*;
|
|
|
|
#[cfg(feature = "serialize")]
|
|
mod transit;
|
|
|
|
#[cfg(feature = "serialize")]
|
|
pub use transit::*;
|
|
|
|
pub use attribute_groups::*;
|
|
pub use elements::*;
|
|
pub use events::*;
|
|
pub use render_template::*;
|
|
|
|
#[cfg(feature = "document")]
|
|
pub mod document;
|
|
|
|
pub mod extensions {
|
|
pub use crate::attribute_groups::{GlobalAttributesExtension, SvgAttributesExtension};
|
|
pub use crate::elements::extensions::*;
|
|
}
|
|
|
|
pub mod prelude {
|
|
pub use crate::attribute_groups::{GlobalAttributesExtension, SvgAttributesExtension};
|
|
#[cfg(feature = "document")]
|
|
pub use crate::document::{
|
|
self, document, eval, head, Document, Meta, MetaProps, Script, ScriptProps, Style,
|
|
StyleProps, Title, TitleProps, UseEval,
|
|
};
|
|
pub use crate::elements::extensions::*;
|
|
pub use crate::events::*;
|
|
pub use crate::point_interaction::*;
|
|
pub use keyboard_types::{self, Code, Key, Location, Modifiers};
|
|
}
|