diff --git a/CHANGES.md b/CHANGES.md index 4ce42690..9a2c73f3 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,11 +1,12 @@ -## Unreleased +## 0.4.2 - 2024-02-06 ### Fixed * Lifetimes and generics in `#[component]` macro +* Media queries in SSR ## 0.4.1 - 2023-12-02 diff --git a/README.md b/README.md index 5bad2cdd..ba3751d2 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ A reactive Real-DOM library with SSR for Rust [![crates.io](https://img.shields.io/crates/v/vertigo)](https://crates.io/crates/vertigo) [![Documentation](https://docs.rs/vertigo/badge.svg)](https://docs.rs/vertigo) ![MIT or Apache 2.0 licensed](https://img.shields.io/crates/l/vertigo.svg) -[![Dependency Status](https://deps.rs/crate/vertigo/0.4.1/status.svg)](https://deps.rs/crate/vertigo/0.4.1) +[![Dependency Status](https://deps.rs/crate/vertigo/0.4.2/status.svg)](https://deps.rs/crate/vertigo/0.4.2) [![CI](https://github.com/vertigo-web/vertigo/actions/workflows/pipeline.yaml/badge.svg)](https://github.com/vertigo-web/vertigo/actions/workflows/pipeline.yaml) [![downloads](https://img.shields.io/crates/d/vertigo.svg)](https://crates.io/crates/vertigo) diff --git a/crates/vertigo-cli/Cargo.toml b/crates/vertigo-cli/Cargo.toml index d893756c..0ee188b9 100644 --- a/crates/vertigo-cli/Cargo.toml +++ b/crates/vertigo-cli/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "vertigo-cli" -version = "0.4.1" +version = "0.4.2" authors = ["Grzegorz Szeliga ", "Michał Pokrywka "] description = "Reactive Real-DOM library with SSR for Rust - packaging/serving tool" categories = ["command-line-utilities", "development-tools", "development-tools::build-utils", "wasm", "web-programming"] diff --git a/crates/vertigo-cli/src/serve/html/element.rs b/crates/vertigo-cli/src/serve/html/element.rs index 8469c8dc..8f7dea66 100644 --- a/crates/vertigo-cli/src/serve/html/element.rs +++ b/crates/vertigo-cli/src/serve/html/element.rs @@ -32,7 +32,7 @@ impl Element { pub struct AllElements { parent: HashMap, all: HashMap, - css: OrderedMap, + css: Vec<(String, String)>, } impl AllElements { @@ -40,7 +40,7 @@ impl AllElements { Self { parent: HashMap::new(), all: HashMap::new(), - css: OrderedMap::new(), + css: Vec::new(), } } @@ -98,7 +98,7 @@ impl AllElements { } fn insert_css(&mut self, selector: String, value: String) { - self.css.set(selector, value); + self.css.push((selector, value)); } fn create_comment(&mut self, id: u64, value: String) { @@ -107,15 +107,13 @@ impl AllElements { } pub fn feed(&mut self, commands: Vec) { - - for node in commands { match node { DomCommand::CallbackAdd { .. } => { - //ignore + // ignored on server-side } DomCommand::CallbackRemove { .. } => { - //ignore + // ignored on server-side } DomCommand::CreateNode { id, name } => { self.create_node(id, name); @@ -193,7 +191,7 @@ impl AllElements { fn get_css(&self) -> Vec { let mut result = Vec::new(); - for (prop, value) in self.css.get_iter() { + for (prop, value) in self.css.iter() { let content = [prop.as_str(), " { ", value.as_str(), " }"].concat(); result.push( diff --git a/crates/vertigo-macro/Cargo.toml b/crates/vertigo-macro/Cargo.toml index 329b9910..10829abd 100644 --- a/crates/vertigo-macro/Cargo.toml +++ b/crates/vertigo-macro/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "vertigo-macro" -version = "0.4.1" +version = "0.4.2" authors = ["Grzegorz Szeliga ", "Michał Pokrywka "] description = "Reactive Real-DOM library with SSR for Rust - macros" edition = "2021" diff --git a/crates/vertigo/Cargo.toml b/crates/vertigo/Cargo.toml index e610dc81..de236e78 100644 --- a/crates/vertigo/Cargo.toml +++ b/crates/vertigo/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "vertigo" -version = "0.4.1" +version = "0.4.2" authors = ["Grzegorz Szeliga ", "Michał Pokrywka "] description = "Reactive Real-DOM library with SSR for Rust" readme = "README.md" @@ -14,4 +14,4 @@ edition = "2021" [dependencies] log = { version = "0.4", features=["std"] } -vertigo-macro = { path = "../../crates/vertigo-macro", version = "0.4.1" } +vertigo-macro = { path = "../../crates/vertigo-macro", version = "0.4.2" } diff --git a/crates/vertigo/src/driver_module/api/api_import.rs b/crates/vertigo/src/driver_module/api/api_import.rs index fb6a4a77..d671c59b 100644 --- a/crates/vertigo/src/driver_module/api/api_import.rs +++ b/crates/vertigo/src/driver_module/api/api_import.rs @@ -626,7 +626,7 @@ impl ApiImport { .api() .call("isBrowser", Vec::new()) .fetch(); - + if let JsValue::True = result { return true; } @@ -644,7 +644,7 @@ impl ApiImport { .api() .call("get_env", vec!(JsValue::String(name))) .fetch(); - + if let JsValue::Null = result { return None; } diff --git a/demo/app/Cargo.toml b/demo/app/Cargo.toml index 6346ce9a..ab1072c0 100644 --- a/demo/app/Cargo.toml +++ b/demo/app/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "vertigo-demo" -version = "0.4.1" +version = "0.4.2" authors = ["Grzegorz Szeliga ", "Michał Pokrywka "] edition = "2021" @@ -9,4 +9,4 @@ crate-type = ["cdylib", "rlib"] [dependencies] log = "0.4.17" -vertigo = { path = "../../crates/vertigo", version = "0.4.1" } +vertigo = { path = "../../crates/vertigo", version = "0.4.2" } diff --git a/examples/counter/Cargo.toml b/examples/counter/Cargo.toml index 4dce3639..aa302bab 100644 --- a/examples/counter/Cargo.toml +++ b/examples/counter/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "vertigo-example-counter" -version = "0.4.1" +version = "0.4.2" authors = ["Grzegorz Szeliga ", "Michał Pokrywka "] edition = "2021" @@ -8,4 +8,4 @@ edition = "2021" crate-type = ["cdylib", "rlib"] [dependencies] -vertigo = { path = "../../crates/vertigo", version = "0.4.1" } +vertigo = { path = "../../crates/vertigo", version = "0.4.2" } diff --git a/examples/router/Cargo.toml b/examples/router/Cargo.toml index 3fd77eff..ccb36680 100644 --- a/examples/router/Cargo.toml +++ b/examples/router/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "vertigo-example-router" -version = "0.4.1" +version = "0.4.2" authors = ["Grzegorz Szeliga ", "Michał Pokrywka "] edition = "2021" @@ -9,4 +9,4 @@ crate-type = ["cdylib", "rlib"] [dependencies] log = "0.4.14" -vertigo = { path = "../../crates/vertigo", version = "0.4.1" } +vertigo = { path = "../../crates/vertigo", version = "0.4.2" } diff --git a/examples/trafficlights/Cargo.toml b/examples/trafficlights/Cargo.toml index e13e88e4..0f34dbee 100644 --- a/examples/trafficlights/Cargo.toml +++ b/examples/trafficlights/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "vertigo-example-trafficlights" -version = "0.4.1" +version = "0.4.2" authors = ["Grzegorz Szeliga ", "Michał Pokrywka "] edition = "2021" @@ -8,4 +8,4 @@ edition = "2021" crate-type = ["cdylib", "rlib"] [dependencies] -vertigo = { path = "../../crates/vertigo", version = "0.4.1" } +vertigo = { path = "../../crates/vertigo", version = "0.4.2" } diff --git a/tutorial.md b/tutorial.md index c8ec23ad..02fb2350 100644 --- a/tutorial.md +++ b/tutorial.md @@ -2,7 +2,7 @@ -*Up to date with version 0.4.1* +*Up to date with version 0.4.2* ### Table of contents