Skip to content

Commit

Permalink
resolve conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
marc2332 committed Feb 24, 2024
2 parents fd9c743 + fda8624 commit f71cc1b
Show file tree
Hide file tree
Showing 165 changed files with 5,159 additions and 3,288 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/deploy_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: Set up cargo cache
uses: Swatinem/rust-cache@v2
with:
prefix-key: "2"
prefix-key: "3"

- name: cargo doc
run: cargo doc --no-deps --workspace
Expand All @@ -30,4 +30,4 @@ jobs:
with:
project: freya-docs
entrypoint: https://deno.land/std/http/file_server.ts
root: target/doc
root: target/doc
4 changes: 2 additions & 2 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- name: Set up cargo cache
uses: Swatinem/rust-cache@v2
with:
prefix-key: "5"
prefix-key: "7"
- name: Install linux dependencies
if: runner.os == 'Linux'
run: |
Expand All @@ -51,7 +51,7 @@ jobs:
rustup component add llvm-tools-preview
curl -L https://github.com/mozilla/grcov/releases/latest/download/grcov-x86_64-unknown-linux-gnu.tar.bz2 | tar jxf -
./grcov . --binary-path ./target/debug/deps -s . -t lcov --branch --ignore-not-existing --ignore "../*" --ignore "/*" -o cov.lcov
- uses: codecov/codecov-action@v3
- uses: codecov/codecov-action@v4
if: runner.os == 'Linux'
with:
token: ${{ secrets.CODECOV_TOKEN }}
Expand Down
30 changes: 15 additions & 15 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,19 @@ freya-testing = { path = "crates/testing", version = "0.1" }
freya-engine = { path = "crates/engine", version = "0.1" }
torin = { path = "crates/torin", version = "0.1" }

dioxus = { git = "https://github.com/DioxusLabs/dioxus", rev = "53380c9956c7dda54d9251d3bc48eaa0ec4e89be", default-features = false, features = ["macro", "signals", "hooks", "hot-reload", "html"]}
dioxus-native-core-macro = { git = "https://github.com/DioxusLabs/dioxus", rev = "53380c9956c7dda54d9251d3bc48eaa0ec4e89be" }
dioxus-rsx = { git = "https://github.com/DioxusLabs/dioxus", rev = "53380c9956c7dda54d9251d3bc48eaa0ec4e89be", features = ["hot_reload"] }
dioxus-native-core = { git = "https://github.com/DioxusLabs/dioxus", rev = "53380c9956c7dda54d9251d3bc48eaa0ec4e89be", features = ["dioxus"] }
dioxus-core-macro = { git = "https://github.com/DioxusLabs/dioxus", rev = "53380c9956c7dda54d9251d3bc48eaa0ec4e89be" }
dioxus-hooks = { git = "https://github.com/DioxusLabs/dioxus", rev = "53380c9956c7dda54d9251d3bc48eaa0ec4e89be" }
dioxus-signals = { git = "https://github.com/DioxusLabs/dioxus", rev = "53380c9956c7dda54d9251d3bc48eaa0ec4e89be" }
dioxus-core = { git = "https://github.com/DioxusLabs/dioxus", rev = "53380c9956c7dda54d9251d3bc48eaa0ec4e89be" }
dioxus-hot-reload = { git = "https://github.com/DioxusLabs/dioxus", rev = "53380c9956c7dda54d9251d3bc48eaa0ec4e89be", features = ["file_watcher"], default-features = false }
dioxus-router = { git = "https://github.com/DioxusLabs/dioxus", rev = "53380c9956c7dda54d9251d3bc48eaa0ec4e89be", default-features = false }
dioxus = { git = "https://github.com/DioxusLabs/dioxus", rev = "a454f2c7ac239933bb4d5cd184c8a549190070f1", default-features = false, features = ["macro", "signals", "hooks", "hot-reload", "html"]}
dioxus-native-core-macro = { git = "https://github.com/DioxusLabs/dioxus", rev = "a454f2c7ac239933bb4d5cd184c8a549190070f1" }
dioxus-rsx = { git = "https://github.com/DioxusLabs/dioxus", rev = "a454f2c7ac239933bb4d5cd184c8a549190070f1", features = ["hot_reload"] }
dioxus-native-core = { git = "https://github.com/DioxusLabs/dioxus", rev = "a454f2c7ac239933bb4d5cd184c8a549190070f1", features = ["dioxus"] }
dioxus-core-macro = { git = "https://github.com/DioxusLabs/dioxus", rev = "a454f2c7ac239933bb4d5cd184c8a549190070f1" }
dioxus-hooks = { git = "https://github.com/DioxusLabs/dioxus", rev = "a454f2c7ac239933bb4d5cd184c8a549190070f1" }
dioxus-signals = { git = "https://github.com/DioxusLabs/dioxus", rev = "a454f2c7ac239933bb4d5cd184c8a549190070f1" }
dioxus-core = { git = "https://github.com/DioxusLabs/dioxus", rev = "a454f2c7ac239933bb4d5cd184c8a549190070f1" }
dioxus-hot-reload = { git = "https://github.com/DioxusLabs/dioxus", rev = "a454f2c7ac239933bb4d5cd184c8a549190070f1", features = ["file_watcher"], default-features = false }
dioxus-router = { git = "https://github.com/DioxusLabs/dioxus", rev = "a454f2c7ac239933bb4d5cd184c8a549190070f1", default-features = false }
dioxus-std = { git = "https://github.com/marc2332/dioxus-std", rev = "2e111cda95f816fe4232bae5e75515a58afa4a1e", features = ["clipboard"] }

skia-safe = { version = "0.67.0", features = ["gl", "textlayout", "svg"] }
skia-safe = { version = "0.70.0", features = ["gl", "textlayout", "svg"] }

gl = "0.14.0"
glutin = "0.31.2"
Expand All @@ -47,12 +48,11 @@ winit = "0.29.9"
tokio = { version = "1.33.0", features = ["sync", "rt-multi-thread", "time", "macros"] }
accesskit = { version = "0.12.2", features = ["serde"]}
accesskit_winit = "0.18.0"
zbus = "3.14.1"

euclid = "0.22.9"
uuid = { version = "1.4.1", features = ["v4"]}
futures = "0.3.28"
anymap = "0.12.1"
futures-util = "0.3.30"
futures-task = "0.3.30"
tracing = "0.1"
tracing-subscriber = "0.3.17"
rustc-hash = "1.1.0"
Expand All @@ -69,7 +69,7 @@ freya-core = { workspace = true }
reqwest = { version = "0.11.22", features = ["json"] }
serde = "1.0.189"
tracing-subscriber = "0.3.17"
dioxus-std = { git = "https://github.com/DioxusLabs/dioxus-std", rev = "137b4149dc86a648119eef8f331e3a682c2c6b62", features = ["i18n"] }
dioxus-std = { git = "https://github.com/marc2332/dioxus-std", rev = "2e111cda95f816fe4232bae5e75515a58afa4a1e", features = ["i18n"] }
rand = "0.8.5"
dioxus-router = { workspace = true }
itertools = "0.11.0"
Expand Down
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
<td style="border:hidden;">

```rust, no_run
fn app() -> Element {
let mut count = use_signal(|| 0);
fn app(cx: Scope) -> Element {
let mut count = use_state(cx, || 0);
rsx!(
render!(
rect {
height: "20%",
width: "100%",
Expand Down Expand Up @@ -59,10 +59,12 @@ fn app() -> Element {

Thanks to my sponsors for supporting this project! 😄

<!-- sponsors --><a href="https://github.com/piny4man"><img src="https://github.com/piny4man.png" width="60px" alt="Alberto Mendez" /></a><a href="https://github.com/stephenandary"><img src="https://github.com/stephenandary.png" width="60px" alt="Stephen Andary" /></a><!-- sponsors -->
<!-- sponsors --><a href="https://github.com/piny4man"><img src="https://github.com/piny4man.png" width="60px" alt="Alberto Mendez" /></a><a href="https://github.com/andar1an"><img src="https://github.com/andar1an.png" width="60px" alt="Andar1an" /></a><!-- sponsors -->

### Want to try it? 🤔

Note: `main` branch currently depends on Dioxus 0.5.

⚠️ First, see [Environment setup](https://book.freyaui.dev/setup.html).

Clone this repo and run:
Expand Down
18 changes: 9 additions & 9 deletions book/src/guides/animating.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,16 @@ fn main() {
launch(app);
}
fn app() -> Element {
let mut animation = use_animation(|| 0.0);
fn app(cx: Scope) -> Element {
let animation = use_animation(cx, || 0.0);
let progress = animation.value();
use_hook(move || {
use_memo(cx, (), move |_| {
animation.start(Animation::new_linear(0.0..=100.0, 50));
})
});
rsx!(rect {
render!(rect {
width: "{progress}",
})
}
Expand All @@ -53,8 +53,8 @@ fn main() {
const TARGET: f64 = 500.0;
fn app() -> Element {
let mut animation = use_animation_transition(TransitionAnimation::new_sine_in_out(200), (), || {
fn app(cx: Scope) -> Element {
let animation = use_animation_transition(cx, TransitionAnimation::new_sine_in_out(200), (), || {
vec![
Animate::new_size(0.0, TARGET),
Animate::new_color("rgb(33, 158, 188)", "white"),
Expand All @@ -72,7 +72,7 @@ fn app() -> Element {
}
};
rsx!(
render!(
rect {
overflow: "clip",
background: "black",
Expand All @@ -83,7 +83,7 @@ fn app() -> Element {
height: "100%",
width: "200",
background: "{background}",
onclick,
onclick: onclick,
}
}
)
Expand Down
4 changes: 2 additions & 2 deletions book/src/guides/effects.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ The `rotate` attribute let's you rotate an element.
Example:

```rust, no_run
fn app() -> Element {
rsx!(
fn app(cx: Scope) -> Element {
render!(
label {
rotate: "180deg",
"Hello, World!"
Expand Down
24 changes: 12 additions & 12 deletions book/src/guides/elements.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ You can specify things like [`width`](/guides/layout.html#width), [`paddings`](/
Example:

```rust, no_run
fn app() -> Element {
rsx!(
fn app(cx: Scope) -> Element {
render!(
rect {
direction: "vertical",
label { "Hi!" }
Expand All @@ -34,8 +34,8 @@ The `label` element simply shows some text.
Example:

```rust, no_run
fn app() -> Element {
rsx!(
fn app(cx: Scope) -> Element {
render!(
label {
"Hello World"
}
Expand All @@ -53,9 +53,9 @@ Example:
static FERRIS: &[u8] = include_bytes!("./ferris.svg");
fn app() -> Element {
let ferris = bytes_to_data(FERRIS);
rsx!(
fn app(cx: Scope) -> Element {
let ferris = bytes_to_data(cx, FERRIS);
render!(
svg {
svg_data: ferris,
}
Expand All @@ -70,9 +70,9 @@ The `image` element, just like `svg` element, require you to pass the image byte
```rust, no_run
static RUST_LOGO: &[u8] = include_bytes!("./rust_logo.png");
fn app() -> Element {
let image_data = bytes_to_data(RUST_LOGO);
rsx!(
fn app(cx: Scope) -> Element {
let image_data = bytes_to_data(cx, RUST_LOGO);
render!(
image {
image_data: image_data,
width: "{size}",
Expand All @@ -87,8 +87,8 @@ fn app() -> Element {
Both `paragraph` and `text` elements are used together. They will let you build texts with different styles.

``` rust
fn app() -> Element {
rsx!(
fn app(cx: Scope) -> Element {
render!(
paragraph {
text {
font_size: "15",
Expand Down
Loading

0 comments on commit f71cc1b

Please sign in to comment.