diff --git a/packages/components/Cargo.toml b/packages/components/Cargo.toml index e3705e0..0ccdcaf 100644 --- a/packages/components/Cargo.toml +++ b/packages/components/Cargo.toml @@ -32,11 +32,19 @@ yew-router = { workspace = true } html5ever = { version = "^0.29", optional = true } comrak = { version = "^0.29", optional = true } parse-wiki-text-2 = { version = "^0.2", optional = true } -nom = { version = "8.0.0-alpha2", optional = true } + +egui = { version = "^0.29", optional = true } +bevy = { version = "^0.14", optional = true } [features] default = ["full"] -full = ["components-data", "components-form", "components-navigation"] +full = [ + "components-data", + "components-form", + "components-navigation", + "form-input-rich", + "data-canvas", +] components-data = [] components-form = [] @@ -46,9 +54,11 @@ form-input-rich = [ "form-input-rich-html", "form-input-rich-markdown", "form-input-rich-mediawiki", - "form-input-rich-bbcode", ] form-input-rich-html = ["dep:html5ever"] form-input-rich-markdown = ["dep:comrak"] form-input-rich-mediawiki = ["dep:parse-wiki-text-2"] -form-input-rich-bbcode = ["dep:nom"] + +data-canvas = ["data-canvas-charts", "data-canvas-render"] +data-canvas-charts = ["dep:egui"] +data-canvas-render = ["dep:bevy"] diff --git a/packages/components/src/data/canvas/mod.rs b/packages/components/src/data/canvas/mod.rs index e69de29..1a9f6dc 100644 --- a/packages/components/src/data/canvas/mod.rs +++ b/packages/components/src/data/canvas/mod.rs @@ -0,0 +1,4 @@ +#[cfg(features = "data-canvas-charts")] +pub mod charts; +#[cfg(features = "data-canvas-scene")] +pub mod scene; diff --git a/packages/components/src/data/canvas/render/mod.rs b/packages/components/src/data/canvas/scene/mod.rs similarity index 100% rename from packages/components/src/data/canvas/render/mod.rs rename to packages/components/src/data/canvas/scene/mod.rs diff --git a/packages/components/src/data/mod.rs b/packages/components/src/data/mod.rs index bdb9589..079df89 100644 --- a/packages/components/src/data/mod.rs +++ b/packages/components/src/data/mod.rs @@ -1,9 +1,11 @@ pub mod block; pub mod canvas; +pub mod canvas; pub mod paragraph; pub mod progress; pub use block::*; pub use canvas::*; +pub use canvas::*; pub use paragraph::*; pub use progress::*; diff --git a/packages/components/src/form/input/rich/mediawiki/mod.rs b/packages/components/src/form/input/rich/mediawiki/mod.rs new file mode 100644 index 0000000..e69de29 diff --git a/packages/components/src/form/input/rich/mod.rs b/packages/components/src/form/input/rich/mod.rs index 1bf0baf..ff50b1b 100644 --- a/packages/components/src/form/input/rich/mod.rs +++ b/packages/components/src/form/input/rich/mod.rs @@ -1,5 +1,9 @@ +#[cfg(feature = "form-input-rich-html")] mod html; +#[cfg(feature = "form-input-rich-markdown")] mod markdown; +#[cfg(feature = "form-input-rich-mediawiki")] +mod mediawiki; use stylist::yew::styled_component; use yew::prelude::*;