diff --git a/Cargo.toml b/Cargo.toml index 9d6b04cab..4230281f6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,19 +12,19 @@ devtools = ["freya/devtools"] use_camera = ["freya/use_camera"] [workspace.dependencies] -freya = { path = "freya", version = "0.1.0" } -freya-devtools = { path = "devtools", version = "0.1.0" } -freya-node-state = { path = "state", version = "0.1.0" } -freya-layout = { path = "layout", version = "0.1.0" } -freya-renderer = { path = "renderer", version = "0.1.0" } -freya-elements = { path = "elements", version = "0.1.0" } -freya-common = { path = "common", version = "0.1.0" } -freya-hooks = { path = "hooks" } -freya-core = { path = "core" } -freya-components = { path = "components" } -freya-dom = { path = "dom", version = "0.1.0" } -freya-testing = { path = "testing", version = "0.1.0" } -torin = { path = "torin", version = "0.1.0" } +freya = { path = "freya", version = "0.1" } +freya-devtools = { path = "devtools", version = "0.1" } +freya-node-state = { path = "state", version = "0.1" } +freya-layout = { path = "layout", version = "0.1" } +freya-renderer = { path = "renderer", version = "0.1" } +freya-elements = { path = "elements", version = "0.1" } +freya-common = { path = "common", version = "0.1" } +freya-hooks = { path = "hooks", version = "0.1" } +freya-core = { path = "core", version = "0.1" } +freya-components = { path = "components", version = "0.1" } +freya-dom = { path = "dom", version = "0.1" } +freya-testing = { path = "testing", version = "0.1" } +torin = { path = "torin", version = "0.1" } dioxus = { version = "0.4" } dioxus-native-core-macro = { version = "0.4" } diff --git a/README.md b/README.md index 8426ec831..6d5402f51 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Freya :crab: +# Freya 🦀 Freya logo @@ -68,38 +68,33 @@ cargo run --example counter You can also try [`freya-template`](https://github.com/marc2332/freya-template) ### Usage 📜 -Add Freya as a dependency via git (it's not published on [crates.io](https://crates.io/) yet) in your `Cargo.toml`: +Add Freya and Dioxus as dependencies: ```toml -freya = { git = "https://github.com/marc2332/freya" } +freya = "0.1" dioxus = { version = "0.4", features = ["macro", "hooks"] } ``` ### Features ✨ -- Support for Windows, Linux and MacOS -- Text, containers, images, svg, etc -- Headless testing -- Hot reload -- Optional DevTools panel -- Easy multiline text editing -- Components crate (with theming support) - - Scroll views - - Virtualized scroll views - - Button - - Slider - - Switch - - Dropdown - - and a few more -- Keyboard and Mouse events -- Hooks crate for text editing, animating, theming.. +- ⛏️ Built-in **components** (button, scroll views, switch and more) +- 🚇 Built-in **hooks** library (animations, text editing and more) +- 🔍 Built-in **devtools** panel (experimental ⚠️) (experimental ⚠️) +- 🧰 Built-in **headless testing** runner for components +- 🎨 **Theming** support (not extensible yet ⚠️) +- 🛩️ Cross-platform (Windows, Linux, MacOS) +- 🖼️ SKSL **Shaders** support +- 🔄️ Dioxus **Hot-reload** support +- 📒 Multi-line **text editing** (experimental ⚠️) +- 🦾 Basic **Accessibility** Support (experimental ⚠️) +- 🧩Compatible with dioxus-std and other Dioxus renderer-agnostic libraries ### Goals 😁 - Performant and low memory usage - Good developer experience -- Cross-platform -- Provide accessibility APIs -- Provide testing APIs -- Provide useful built-in components and hooks +- Cross-platform support +- Decent Accessibility support +- Useful testing APIs +- Useful and extensible components and hooks ## Status ⌚ diff --git a/book/src/SUMMARY.md b/book/src/SUMMARY.md index 220397c8e..6a52d6264 100644 --- a/book/src/SUMMARY.md +++ b/book/src/SUMMARY.md @@ -20,4 +20,6 @@ - [Testing](./guides/testing.md) - [Animating](./guides/animating.md) - [Virtualizing](./guides/virtualizing.md) +- [Devtools](./guides/devtools.md) +- [Publishing]() diff --git a/book/src/differences_with_dioxus.md b/book/src/differences_with_dioxus.md index 4285442c9..72cc46c02 100644 --- a/book/src/differences_with_dioxus.md +++ b/book/src/differences_with_dioxus.md @@ -2,10 +2,13 @@ **Freya** uses most of the core packages of Dioxus, but not all them. -These are the main differences: -- Freya has it's own elements, attributes and events, instead of `HTML`. -- Freya uses it's own UI layout library called [`torin`](https://github.com/marc2332/freya/tree/main/torin), instead of [`taffy`](https://github.com/DioxusLabs/taffy). -- Freya uses Skia, instead of webview or other graphics libraries used by Dioxus. -- Freya comes with it's own set of components and hooks, on the other hand Dioxus web/desktop can take advantage of existing CSS libraries and HTML elements. -- Freya has an integrated devtools panel, dioxus web/desktop already have the browser/webview devtools. -- Freya comes with a headless testing runner. +These are the main differences between Freya and the different Dioxus renderers for Desktop (webview and Blitz): + +| Category | Freya | Dioxus | +|--------------------------------------|------------------|---------------------------------| +| **Elements, attributes and events** | Custom | HTML | +| **Layout** | Custom ([`torin`](https://github.com/marc2332/freya/tree/main/torin)) | WebView and [`taffy`](https://github.com/DioxusLabs/taffy) | +| **Renderer** | Skia | WebView or WGPU | +| **Components library** | Custom | None, but can use CSS libraries | +| **Devtools** | Custom | Provided in Webview | +| **Headless testing runner** | Custom | None | diff --git a/book/src/guides/devtools.md b/book/src/guides/devtools.md new file mode 100644 index 000000000..140a5501b --- /dev/null +++ b/book/src/guides/devtools.md @@ -0,0 +1,13 @@ +# Devtools + +Devtools can be enabled by adding the `devtools` to Freya. + + +```toml +// Cargo.toml + +[dependencies] +freya = { version = "0.1", features = ["devtools"] } + +``` + diff --git a/book/src/guides/getting_started.md b/book/src/guides/getting_started.md index d82533484..b8574e5b4 100644 --- a/book/src/guides/getting_started.md +++ b/book/src/guides/getting_started.md @@ -1,6 +1,6 @@ # Getting started -I encourage you to learn how [Dioxus works](https://dioxuslabs.com/docs/0.3/guide/en/describing_ui/index.html), when you are done you can continue here. Also make sure you have the followed the [environment setup](../setup.html) guide. +I encourage you to learn how [Dioxus works](https://dioxuslabs.com/learn/0.4/guide/your_first_component), when you are done you can continue here. Also make sure you have the followed the [environment setup](../setup.html) guide. Now, let's start by creating a hello world project. @@ -23,7 +23,7 @@ version = "0.1.0" edition = "2021" [dependencies] -freya = { git = "https://github.com/marc2332/freya" } +freya = "0.1" dioxus = { version = "0.4", features = ["macro", "hooks"] } ``` @@ -48,7 +48,6 @@ fn app(cx: Scope) -> Element { render!( rect { - overflow: "clip", height: "100%", width: "100%", background: "rgb(35, 35, 35)", @@ -67,3 +66,7 @@ Simply run with `cargo`: ```sh cargo run ``` + +Nice! You have created your first Freya app. + +You can learn more with the [examples](https://github.com/marc2332/freya/tree/main/examples) in the repository. \ No newline at end of file diff --git a/book/src/guides/hot_reload.md b/book/src/guides/hot_reload.md index a92165df9..de10f643b 100644 --- a/book/src/guides/hot_reload.md +++ b/book/src/guides/hot_reload.md @@ -1,6 +1,6 @@ # Hot reload -Freya supports Dioxus [hot reload](https://dioxuslabs.com/docs/0.3/guide/en/getting_started/hot_reload.html), this means you can update the `layout` and `styling` of your app on the fly, without having to compile any rust code. +Freya supports Dioxus hot reload, this means you can update the `layout` and `styling` of your app on the fly, without having to compile any rust code. ## Setup diff --git a/book/src/guides/layout.md b/book/src/guides/layout.md index 228f88dad..bec69624c 100644 --- a/book/src/guides/layout.md +++ b/book/src/guides/layout.md @@ -6,7 +6,7 @@ Learn how the layout attributes work. - [`min_width & min_height`](#min_width_&_min_height) - [`max_width & max_height`](#max_width_&_max_height) - [`Size units`](#size_units) - - [`Static values`](#static-values) + - [`Logical pixels`](#logical-pixels) - [`Percentages`](#percentages) - [`calc()`](#calc) - [`direction`](#direction) diff --git a/book/src/guides/style.md b/book/src/guides/style.md index 568d11ed2..a9184d8e3 100644 --- a/book/src/guides/style.md +++ b/book/src/guides/style.md @@ -2,15 +2,15 @@ Learn how the style attributes work. -- [background](#background) -- [shadow](#shadow) -- [corner\_radius & corner\_smoothing](#corner_radius-&-corner_smoothing) -- [border](#border) -- [overflow](#overflow) -- [Color syntax](#color-syntax) - - [Static colors](#static-colors) - - [rgb() / hsl()](#rgb--hsl) -- [Inheritance](#inheritance) +- [`background`](#background) +- [`shadow`](#shadow) +- [`corner radius & corner smoothing`](#corner_radius--corner_smoothing) +- [`border`](#border) +- [`overflow`](#overflow) +- [`Color syntax`](#color-syntax) + - [`Static colors`](#static-colors) + - [`rgb() / hsl(`)](#rgb--hsl) +- [`Inheritance`](#inheritance) ### background diff --git a/book/src/guides/testing.md b/book/src/guides/testing.md index 9024d70ca..3f9a31129 100644 --- a/book/src/guides/testing.md +++ b/book/src/guides/testing.md @@ -43,10 +43,10 @@ Here, the component has a state that is `false` by default, but, once mounted it async fn dynamic_test() { fn dynamic_component(cx: Scope) -> Element { let state = use_state(cx, || false); - let state_setter = state.setter(); - use_effect(cx, (), move |_| async move { - state_setter(true); + use_effect(cx, (), |_| { + state.set(true); + async move { } }); render!( @@ -123,7 +123,7 @@ async fn event_test() { ## Testing configuration -The `launch_test` comes with a default configuration, but you can also pass your own with the `launch_test_with_config` function. +The `launch_test` comes with a default configuration, but you can also pass your own config with the `launch_test_with_config` function. Here is an example of how to can set our custom window size: diff --git a/book/src/what_is_freya.md b/book/src/what_is_freya.md index c4f63d8f0..9d45cf45d 100644 --- a/book/src/what_is_freya.md +++ b/book/src/what_is_freya.md @@ -1,16 +1,19 @@ # What is Freya? -**Freya** is native **GUI** library built on top of 🧬 [Dioxus](https://dioxuslabs.com)'s core, it also uses 🎨 [Skia](https://skia.org/) as a graphics library, for 🦀 Rust. +**Freya** is native **GUI** library for Rust🦀, built on top of 🧬 [Dioxus](https://dioxuslabs.com)'s core and powered by 🎨 [Skia](https://skia.org/) as a graphics library. ### Features -- ⛏️ Built-in components and hooks library -- 🔍 Integrated devtools -- 🧰 Built-in testing runner for components. +- ⛏️ Built-in **components** (button, scroll views, switch and more) +- 🚇 Built-in **hooks** library (animations, text editing and more) +- 🔍 Built-in **devtools** panel (experimental ⚠️) +- 🧰 Built-in **headless testing** runner for components +- 🎨 **Theming** support (not extensible yet ⚠️) - 🛩️ Cross-platform (Windows, Linux, MacOS) -- 🥸 Easy to use -- 🖼️ Shaders support -- 🔄️ Hot-reload -- 📒 Multi line text editing +- 🖼️ SKSL **Shaders** support +- 🔄️ Dioxus **Hot-reload** support +- 📒 Multi-line **text editing** (experimental ⚠️) +- 🦾 Basic **Accessibility** Support (experimental ⚠️) +- 🧩Compatible with dioxus-std and other Dioxus renderer-agnostic libraries ### Why 🧬 Dioxus? diff --git a/common/Cargo.toml b/common/Cargo.toml index 3f00b94ed..4a63b9231 100644 --- a/common/Cargo.toml +++ b/common/Cargo.toml @@ -1,15 +1,15 @@ [package] name = "freya-common" -description = "Cross-platform GUI Library." +description = "Internal common utilities for Freya." version = "0.1.0" edition = "2021" license = "MIT" authors = ["Marc Espín "] readme = "../readme.md" -homepage = "https://github.com/marc2332/freya" +homepage = "https://freyaui.dev/" repository = "https://github.com/marc2332/freya" -keywords = ["gui", "ui", "cross-platform", "dioxus", "skia", "graphics"] -categories = ["GUI"] +keywords = ["gui", "ui", "desktop", "skia", "dioxus"] +categories = ["gui", "asynchronous"] [dependencies] torin = { workspace = true } diff --git a/components/Cargo.toml b/components/Cargo.toml index 076ff3da5..c86202dc1 100644 --- a/components/Cargo.toml +++ b/components/Cargo.toml @@ -1,15 +1,15 @@ [package] name = "freya-components" -description = "Cross-platform GUI Library." +description = "Components library desgined for Freya." version = "0.1.0" edition = "2021" license = "MIT" authors = ["Marc Espín "] readme = "../readme.md" -homepage = "https://github.com/marc2332/freya" +homepage = "https://freyaui.dev/" repository = "https://github.com/marc2332/freya" -keywords = ["gui", "ui", "cross-platform", "dioxus", "skia", "graphics"] -categories = ["GUI"] +keywords = ["gui", "ui", "desktop", "skia", "dioxus"] +categories = ["gui", "asynchronous"] [dependencies] freya-elements = { workspace = true } @@ -30,5 +30,5 @@ open = "1" reqwest = { version = "0.11.13", features = ["json"] } [dev-dependencies] -freya = { workspace = true } -freya-testing = { workspace = true } \ No newline at end of file +freya = { path = "../freya" } +freya-testing = { path = "../testing" } \ No newline at end of file diff --git a/components/src/button.rs b/components/src/button.rs index 1046a77a6..cef514f0c 100644 --- a/components/src/button.rs +++ b/components/src/button.rs @@ -90,7 +90,7 @@ pub fn Button<'a>(cx: Scope<'a, ButtonProps<'a>>) -> Element { height: "auto", direction: "both", color: "{color}", - shadow: "0 5 20 0 rgb(0, 0, 0, 100)", + shadow: "0 2 10 1 rgb(0, 0, 0, 45)", corner_radius: "5", padding: "8", background: "{background}", diff --git a/components/src/input.rs b/components/src/input.rs index af8b2fce4..5ab00d32f 100644 --- a/components/src/input.rs +++ b/components/src/input.rs @@ -113,6 +113,7 @@ pub fn Input<'a>(cx: Scope<'a, InputProps<'a>>) -> Element { to_owned![editable]; move |_: MouseEvent| { editable.process_event(&EditableEvent::Click); + focus_manager.focus(); } }; @@ -129,9 +130,7 @@ pub fn Input<'a>(cx: Scope<'a, InputProps<'a>>) -> Element { icon: CursorIcon::Text, rect { onkeydown: onkeydown, - onclick: move |_| { - focus_manager.focus(); - }, + onclick: onclick, width: "auto", height: "auto", direction: "both", @@ -156,7 +155,6 @@ pub fn Input<'a>(cx: Scope<'a, InputProps<'a>>) -> Element { cursor_mode: "editable", cursor_color: "{color}", max_lines: "{max_lines}", - onclick: onclick, onmouseover: onmouseover, onmousedown: onmousedown, highlights: highlights_attr, diff --git a/core/Cargo.toml b/core/Cargo.toml index e05dfa0ee..ff37b4938 100644 --- a/core/Cargo.toml +++ b/core/Cargo.toml @@ -1,15 +1,15 @@ [package] name = "freya-core" -description = "Cross-platform GUI Library." +description = "Internal core funcionatilies for Freya." version = "0.1.0" edition = "2021" license = "MIT" authors = ["Marc Espín "] readme = "../readme.md" -homepage = "https://github.com/marc2332/freya" +homepage = "https://freyaui.dev/" repository = "https://github.com/marc2332/freya" -keywords = ["gui", "ui", "cross-platform", "dioxus", "skia", "graphics"] -categories = ["GUI"] +keywords = ["gui", "ui", "desktop", "skia", "dioxus"] +categories = ["gui", "asynchronous"] [features] devtools = [] @@ -43,5 +43,5 @@ tracing = { workspace = true } [dev-dependencies] dioxus = { workspace = true } -freya = { workspace = true } -freya-testing = { workspace = true } +freya = { path = "../freya" } +freya-testing = { path = "../testing" } diff --git a/core/src/accessibility_state.rs b/core/src/accessibility_state.rs index 0fabd7e4b..b3f675a1b 100644 --- a/core/src/accessibility_state.rs +++ b/core/src/accessibility_state.rs @@ -27,7 +27,7 @@ impl AccessibilityState { Self::default() } - /// Wrap it in a Arc>. + /// Wrap it in a `Arc>`. pub fn wrap(self) -> SharedAccessibilityState { Arc::new(Mutex::new(self)) } diff --git a/devtools/Cargo.toml b/devtools/Cargo.toml index 6581cb25a..509b20090 100644 --- a/devtools/Cargo.toml +++ b/devtools/Cargo.toml @@ -1,14 +1,15 @@ [package] name = "freya-devtools" +description = "Devtools panel integration for Freya." version = "0.1.0" edition = "2021" license = "MIT" authors = ["Marc Espín "] readme = "../readme.md" -homepage = "https://github.com/marc2332/freya" +homepage = "https://freyaui.dev/" repository = "https://github.com/marc2332/freya" -keywords = ["gui", "ui", "cross-platform", "dioxus", "skia", "graphics"] -categories = ["GUI"] +keywords = ["gui", "ui", "desktop", "skia", "dioxus"] +categories = ["gui", "asynchronous"] [dependencies] freya-node-state = { workspace = true } diff --git a/dom/Cargo.toml b/dom/Cargo.toml index 5abfb5629..95981346c 100644 --- a/dom/Cargo.toml +++ b/dom/Cargo.toml @@ -1,14 +1,15 @@ [package] name = "freya-dom" +description = "Internal DOM abstractions for Freya." version = "0.1.0" edition = "2021" license = "MIT" authors = ["Marc Espín "] readme = "../readme.md" -homepage = "https://github.com/marc2332/freya" +homepage = "https://freyaui.dev/" repository = "https://github.com/marc2332/freya" -keywords = ["gui", "ui", "cross-platform", "dioxus", "skia", "graphics"] -categories = ["GUI"] +keywords = ["gui", "ui", "desktop", "skia", "dioxus"] +categories = ["gui", "asynchronous"] [features] shared = [] @@ -26,6 +27,6 @@ dioxus-core = { workspace = true } skia-safe = { workspace = true } -uuid = { version = "1.2.2", features = ["v4"]} +uuid = { workspace = true } rustc-hash = { workspace = true } tracing = { workspace = true } diff --git a/elements/Cargo.toml b/elements/Cargo.toml index c8ae8ce04..967b3fd6c 100644 --- a/elements/Cargo.toml +++ b/elements/Cargo.toml @@ -1,15 +1,15 @@ [package] name = "freya-elements" -description = "Cross-platform GUI Library." +description = "Internal elements, attributes and events designed for Freya." version = "0.1.0" edition = "2021" license = "MIT" authors = ["Marc Espín "] readme = "../readme.md" -homepage = "https://github.com/marc2332/freya" +homepage = "https://freyaui.dev/" repository = "https://github.com/marc2332/freya" -keywords = ["gui", "ui", "cross-platform", "dioxus", "skia", "graphics"] -categories = ["GUI"] +keywords = ["gui", "ui", "desktop", "skia", "dioxus"] +categories = ["gui", "asynchronous"] [dependencies] torin = { workspace = true } diff --git a/freya/Cargo.toml b/freya/Cargo.toml index 899a6a122..fb27ea21a 100644 --- a/freya/Cargo.toml +++ b/freya/Cargo.toml @@ -1,15 +1,15 @@ [package] name = "freya" -description = "Cross-platform GUI Library." -version = "0.1.0" +description = "Cross-platform GUI Library powered by Dioxus and Skia." +version = "0.1.2" edition = "2021" license = "MIT" authors = ["Marc Espín "] readme = "../readme.md" -homepage = "https://github.com/marc2332/freya" +homepage = "https://freyaui.dev/" repository = "https://github.com/marc2332/freya" -keywords = ["gui", "ui", "cross-platform", "dioxus", "skia", "graphics"] -categories = ["GUI"] +keywords = ["gui", "ui", "desktop", "skia", "dioxus"] +categories = ["gui", "asynchronous"] [features] log = ["dep:tracing", "dep:tracing-subscriber"] diff --git a/freya/src/lib.rs b/freya/src/lib.rs index 039c0e120..6211b5fc5 100644 --- a/freya/src/lib.rs +++ b/freya/src/lib.rs @@ -18,7 +18,6 @@ //! //! render!( //! rect { -//! overflow: "clip", //! height: "100%", //! width: "100%", //! background: "rgb(35, 35, 35)", @@ -32,12 +31,16 @@ //! //! ``` //! +//! ## Features flags +//! +//! - `devtools`: Enables a side panel to inspect your App tree, styles and computed layout. +//! - `use_camera`: Enables the `use_camera` hook. +//! - `log`: Enables internal logs. +//! /// Dioxus library. pub use dioxus; -pub use freya_renderer::WindowConfig; - /// Launch your application. pub mod launch; diff --git a/hooks/Cargo.toml b/hooks/Cargo.toml index f5fb75d96..92839969a 100644 --- a/hooks/Cargo.toml +++ b/hooks/Cargo.toml @@ -1,15 +1,15 @@ [package] name = "freya-hooks" -description = "Cross-platform GUI Library." +description = "Hooks library designed for Freya." version = "0.1.0" edition = "2021" license = "MIT" authors = ["Marc Espín "] readme = "../readme.md" -homepage = "https://github.com/marc2332/freya" +homepage = "https://freyaui.dev/" repository = "https://github.com/marc2332/freya" -keywords = ["gui", "ui", "cross-platform", "dioxus", "skia", "graphics"] -categories = ["GUI"] +keywords = ["gui", "ui", "desktop", "skia", "dioxus"] +categories = ["gui", "asynchronous"] [features] use_camera = ["dep:nokhwa"] @@ -41,5 +41,5 @@ bytes = "1.3.0" [dev-dependencies] dioxus = { workspace = true } -freya = { workspace = true } -freya-testing = { workspace = true } +freya = { path = "../freya" } +freya-testing = { path = "../testing" } \ No newline at end of file diff --git a/hooks/src/text_editor.rs b/hooks/src/text_editor.rs index 53ff1753f..9bfb80ff7 100644 --- a/hooks/src/text_editor.rs +++ b/hooks/src/text_editor.rs @@ -359,12 +359,17 @@ pub trait TextEditor: Sized + Clone + Display { event = TextEvent::TextChanged } _ => { - // Adds a new character - let char_idx = self.line_to_char(self.cursor_row()) + self.cursor_col(); - self.insert(character, char_idx); - self.cursor_right(); - - event = TextEvent::TextChanged + if let Ok(ch) = character.parse::() { + if !ch.is_ascii_control() { + // Adds a new character + let char_idx = + self.line_to_char(self.cursor_row()) + self.cursor_col(); + self.insert(character, char_idx); + self.cursor_right(); + + event = TextEvent::TextChanged + } + } } } } diff --git a/hooks/src/use_animation_transition.rs b/hooks/src/use_animation_transition.rs index 4c085069a..283679bc0 100644 --- a/hooks/src/use_animation_transition.rs +++ b/hooks/src/use_animation_transition.rs @@ -130,7 +130,7 @@ impl TransitionState { } } -/// Manage the lifecyle of an [AnimationTransitionManager]. +/// Manage the lifecyle of a collection of transitions. #[derive(Clone)] pub struct TransitionsManager<'a> { /// Registered transitions diff --git a/hooks/src/use_camera.rs b/hooks/src/use_camera.rs index 6a17ccaec..c33c9b1ce 100644 --- a/hooks/src/use_camera.rs +++ b/hooks/src/use_camera.rs @@ -50,7 +50,7 @@ impl CameraSettings { impl Default for CameraSettings { fn default() -> Self { Self { - frame_rate: 60, + frame_rate: 30, camera_index: CameraIndex::Index(0), resolution: None, camera_format: RequestedFormatType::AbsoluteHighestFrameRate, diff --git a/layout/Cargo.toml b/layout/Cargo.toml index 749b3c3ec..eb1c785a8 100644 --- a/layout/Cargo.toml +++ b/layout/Cargo.toml @@ -1,15 +1,15 @@ [package] name = "freya-layout" -description = "Cross-platform GUI Library." +description = "Internal layout and layers management for Freya." version = "0.1.0" edition = "2021" license = "MIT" authors = ["Marc Espín "] readme = "../readme.md" -homepage = "https://github.com/marc2332/freya" +homepage = "https://freyaui.dev/" repository = "https://github.com/marc2332/freya" -keywords = ["gui", "ui", "cross-platform", "dioxus", "skia", "graphics"] -categories = ["GUI"] +keywords = ["gui", "ui", "desktop", "skia", "dioxus"] +categories = ["gui", "asynchronous"] [target."cfg(target_os = \"linux\")".dependencies.skia-safe] workspace = true @@ -31,20 +31,4 @@ skia-safe = { workspace = true } accesskit = { workspace = true } rustc-hash= { workspace = true } -uuid = { version = "1.2.2", features = ["v4"]} - -[dev-dependencies] -freya-components = { workspace = true } -freya-dom = { workspace = true } - -dioxus-native-core-macro = { workspace = true } -dioxus-rsx = { workspace = true } -dioxus-native-core = { workspace = true } -dioxus-core-macro = { workspace = true } -dioxus-hooks = { workspace = true } -dioxus-core = { workspace = true } - -fxhash = { workspace = true } -rustc-hash= { workspace = true } -anymap = { workspace = true } -lazy_static = "1.4.0" +uuid = { version = "1.2.2", features = ["v4"]} \ No newline at end of file diff --git a/renderer/Cargo.toml b/renderer/Cargo.toml index df9e7f787..8b3ef4708 100644 --- a/renderer/Cargo.toml +++ b/renderer/Cargo.toml @@ -1,15 +1,15 @@ [package] name = "freya-renderer" -description = "Cross-platform GUI Library." +description = "Internal renderer powered by Skia for Freya." version = "0.1.0" edition = "2021" license = "MIT" authors = ["Marc Espín "] readme = "../readme.md" -homepage = "https://github.com/marc2332/freya" +homepage = "https://freyaui.dev/" repository = "https://github.com/marc2332/freya" -keywords = ["gui", "ui", "cross-platform", "dioxus", "skia", "graphics"] -categories = ["GUI"] +keywords = ["gui", "ui", "desktop", "skia", "dioxus"] +categories = ["gui", "asynchronous"] [target."cfg(target_os = \"linux\")".dependencies.skia-safe] workspace = true diff --git a/state/Cargo.toml b/state/Cargo.toml index 22791834c..dd680bb45 100644 --- a/state/Cargo.toml +++ b/state/Cargo.toml @@ -1,15 +1,15 @@ [package] name = "freya-node-state" -description = "Cross-platform GUI Library." +description = "Internal Node states for Dioxus RealDOM elements used in Freya." version = "0.1.0" edition = "2021" license = "MIT" authors = ["Marc Espín "] readme = "../readme.md" -homepage = "https://github.com/marc2332/freya" +homepage = "https://freyaui.dev/" repository = "https://github.com/marc2332/freya" -keywords = ["gui", "ui", "cross-platform", "dioxus", "skia", "graphics"] -categories = ["GUI"] +keywords = ["gui", "ui", "desktop", "skia", "dioxus"] +categories = ["gui", "asynchronous"] [dependencies] freya-elements = { workspace = true } diff --git a/testing/Cargo.toml b/testing/Cargo.toml index 0a8564948..857062e0e 100644 --- a/testing/Cargo.toml +++ b/testing/Cargo.toml @@ -1,15 +1,15 @@ [package] name = "freya-testing" -description = "Cross-platform GUI Library." +description = "Headless test runner for Freya." version = "0.1.0" edition = "2021" license = "MIT" authors = ["Marc Espín "] readme = "../readme.md" -homepage = "https://github.com/marc2332/freya" +homepage = "https://freyaui.dev/" repository = "https://github.com/marc2332/freya" -keywords = ["gui", "ui", "cross-platform", "dioxus", "skia", "graphics"] -categories = ["GUI"] +keywords = ["gui", "ui", "desktop", "skia", "dioxus"] +categories = ["gui", "asynchronous"] [dependencies] freya-elements = { workspace = true } diff --git a/testing/src/config.rs b/testing/src/config.rs index 48735155a..b88179378 100644 --- a/testing/src/config.rs +++ b/testing/src/config.rs @@ -2,7 +2,7 @@ use std::time::Duration; use torin::geometry::Size2D; -/// Configuration for a [`TestingHandler`]. +/// Configuration for [`crate::test_handler::TestingHandler`]. pub struct TestingConfig { vdom_timeout: Duration, size: Size2D, diff --git a/testing/tests/test.rs b/testing/tests/test.rs index 16667dc7f..7fae0ac5f 100644 --- a/testing/tests/test.rs +++ b/testing/tests/test.rs @@ -23,10 +23,10 @@ async fn no_state() { async fn with_state() { fn stateful_app(cx: Scope) -> Element { let state = use_state(cx, || false); - let state_setter = state.setter(); - use_effect(cx, (), move |_| async move { - state_setter(true); + use_effect(cx, (), |_| { + state.set(true); + async move {} }); render!( diff --git a/torin/Cargo.toml b/torin/Cargo.toml index 60035862b..b3622a0d2 100644 --- a/torin/Cargo.toml +++ b/torin/Cargo.toml @@ -1,15 +1,15 @@ [package] name = "torin" -description = "Cross-platform GUI Library." +description = "UI layout Library designed for Freya." version = "0.1.0" edition = "2021" license = "MIT" authors = ["Marc Espín "] readme = "../readme.md" -homepage = "https://github.com/marc2332/freya" +homepage = "https://freyaui.dev/" repository = "https://github.com/marc2332/freya" -keywords = ["gui", "ui", "cross-platform", "dioxus", "skia", "graphics"] -categories = ["GUI"] +keywords = ["gui", "ui", "desktop", "skia", "dioxus"] +categories = ["gui", "caching"] [features] dioxus = ["dep:dioxus-native-core", "dep:dioxus-core"] diff --git a/torin/readme.md b/torin/readme.md deleted file mode 100644 index 7c74853c5..000000000 --- a/torin/readme.md +++ /dev/null @@ -1,3 +0,0 @@ -# torin - -UI layout Library designed for Freya. \ No newline at end of file