Skip to content

Commit

Permalink
🎨 Add some features.
Browse files Browse the repository at this point in the history
  • Loading branch information
langyo committed Oct 24, 2024
1 parent 528e0bb commit 1b1d528
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 4 deletions.
18 changes: 14 additions & 4 deletions packages/components/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 = []
Expand All @@ -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-scene"]
data-canvas-charts = ["dep:egui"]
data-canvas-scene = ["dep:bevy"]
4 changes: 4 additions & 0 deletions packages/components/src/data/canvas/mod.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#[cfg(features = "data-canvas-charts")]
pub mod charts;
#[cfg(features = "data-canvas-scene")]
pub mod scene;
Empty file.
4 changes: 4 additions & 0 deletions packages/components/src/form/input/rich/mod.rs
Original file line number Diff line number Diff line change
@@ -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::*;
Expand Down

0 comments on commit 1b1d528

Please sign in to comment.