diff --git a/crates/elements/Cargo.toml b/crates/elements/Cargo.toml index ee0f47997..be142b843 100644 --- a/crates/elements/Cargo.toml +++ b/crates/elements/Cargo.toml @@ -11,6 +11,9 @@ repository = "https://github.com/marc2332/freya" keywords = ["gui", "ui", "desktop", "skia", "dioxus"] categories = ["gui", "asynchronous"] +[features] +docs = [] + [dependencies] torin = { workspace = true } diff --git a/crates/elements/src/definitions.rs b/crates/elements/src/definitions.rs index d96be07b6..39ea1eb1a 100644 --- a/crates/elements/src/definitions.rs +++ b/crates/elements/src/definitions.rs @@ -940,12 +940,13 @@ pub mod events { false, ).into() } - + + #[cfg(not(feature = "docs"))] #[doc(hidden)] $( #[$attr] )* pub mod $name { use super::*; - + // When expanding the macro, we use this version of the function if we see an inline closure to give better type inference $( #[$attr] )* pub fn call_with_explicit_closure< @@ -961,9 +962,6 @@ pub mod events { )* }; - (@name $name:ident $event:literal) => { - $event - }; (@name $name:ident) => { stringify!($name) }; diff --git a/crates/freya/Cargo.toml b/crates/freya/Cargo.toml index 8d1de04f2..8d574e9d1 100644 --- a/crates/freya/Cargo.toml +++ b/crates/freya/Cargo.toml @@ -26,7 +26,7 @@ default = ["skia"] performance-overlay = [] fade-cached-incremental-areas = ["freya-core/fade-cached-incremental-areas"] disable-zoom-shortcuts = ["freya-renderer/disable-zoom-shortcuts"] -docs = ["dep:freya-testing", "dep:dioxus-i18n", "dep:dioxus-router"] +docs = ["dep:freya-testing", "dep:dioxus-i18n", "dep:dioxus-router", "freya-elements/docs"] [dependencies] freya-devtools = { workspace = true, optional = true }