Skip to content

Commit

Permalink
Bumped to 0.4.2, fixed media queries in ssr
Browse files Browse the repository at this point in the history
  • Loading branch information
sfisol committed Feb 6, 2024
1 parent 65e70b9 commit 0afead8
Show file tree
Hide file tree
Showing 12 changed files with 24 additions and 25 deletions.
3 changes: 2 additions & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
<!-- markdownlint-configure-file { "no-duplicate-heading": { "siblings_only": true } } -->

<!-- markdownlint-disable-next-line first-line-h1 -->
## Unreleased
## 0.4.2 - 2024-02-06

### Fixed

* Lifetimes and generics in `#[component]` macro
* Media queries in SSR

## 0.4.1 - 2023-12-02

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion crates/vertigo-cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "vertigo-cli"
version = "0.4.1"
version = "0.4.2"
authors = ["Grzegorz Szeliga <szeligagrzegorz@gmail.com>", "Michał Pokrywka <wolfmoon@o2.pl>"]
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"]
Expand Down
14 changes: 6 additions & 8 deletions crates/vertigo-cli/src/serve/html/element.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@ impl Element {
pub struct AllElements {
parent: HashMap<u64, u64>,
all: HashMap<u64, Node>,
css: OrderedMap,
css: Vec<(String, String)>,
}

impl AllElements {
pub fn new() -> AllElements {
Self {
parent: HashMap::new(),
all: HashMap::new(),
css: OrderedMap::new(),
css: Vec::new(),
}
}

Expand Down Expand Up @@ -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) {
Expand All @@ -107,15 +107,13 @@ impl AllElements {
}

pub fn feed(&mut self, commands: Vec<DomCommand>) {


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);
Expand Down Expand Up @@ -193,7 +191,7 @@ impl AllElements {
fn get_css(&self) -> Vec<HtmlNode> {
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(
Expand Down
2 changes: 1 addition & 1 deletion crates/vertigo-macro/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "vertigo-macro"
version = "0.4.1"
version = "0.4.2"
authors = ["Grzegorz Szeliga <szeligagrzegorz@gmail.com>", "Michał Pokrywka <wolfmoon@o2.pl>"]
description = "Reactive Real-DOM library with SSR for Rust - macros"
edition = "2021"
Expand Down
4 changes: 2 additions & 2 deletions crates/vertigo/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "vertigo"
version = "0.4.1"
version = "0.4.2"
authors = ["Grzegorz Szeliga <szeligagrzegorz@gmail.com>", "Michał Pokrywka <wolfmoon@o2.pl>"]
description = "Reactive Real-DOM library with SSR for Rust"
readme = "README.md"
Expand All @@ -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" }
4 changes: 2 additions & 2 deletions crates/vertigo/src/driver_module/api/api_import.rs
Original file line number Diff line number Diff line change
Expand Up @@ -626,7 +626,7 @@ impl ApiImport {
.api()
.call("isBrowser", Vec::new())
.fetch();

if let JsValue::True = result {
return true;
}
Expand All @@ -644,7 +644,7 @@ impl ApiImport {
.api()
.call("get_env", vec!(JsValue::String(name)))
.fetch();

if let JsValue::Null = result {
return None;
}
Expand Down
4 changes: 2 additions & 2 deletions demo/app/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "vertigo-demo"
version = "0.4.1"
version = "0.4.2"
authors = ["Grzegorz Szeliga <szeligagrzegorz@gmail.com>", "Michał Pokrywka <wolfmoon@o2.pl>"]
edition = "2021"

Expand All @@ -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" }
4 changes: 2 additions & 2 deletions examples/counter/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
[package]
name = "vertigo-example-counter"
version = "0.4.1"
version = "0.4.2"
authors = ["Grzegorz Szeliga <szeligagrzegorz@gmail.com>", "Michał Pokrywka <wolfmoon@o2.pl>"]
edition = "2021"

[lib]
crate-type = ["cdylib", "rlib"]

[dependencies]
vertigo = { path = "../../crates/vertigo", version = "0.4.1" }
vertigo = { path = "../../crates/vertigo", version = "0.4.2" }
4 changes: 2 additions & 2 deletions examples/router/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "vertigo-example-router"
version = "0.4.1"
version = "0.4.2"
authors = ["Grzegorz Szeliga <szeligagrzegorz@gmail.com>", "Michał Pokrywka <wolfmoon@o2.pl>"]
edition = "2021"

Expand All @@ -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" }
4 changes: 2 additions & 2 deletions examples/trafficlights/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
[package]
name = "vertigo-example-trafficlights"
version = "0.4.1"
version = "0.4.2"
authors = ["Grzegorz Szeliga <szeligagrzegorz@gmail.com>", "Michał Pokrywka <wolfmoon@o2.pl>"]
edition = "2021"

[lib]
crate-type = ["cdylib", "rlib"]

[dependencies]
vertigo = { path = "../../crates/vertigo", version = "0.4.1" }
vertigo = { path = "../../crates/vertigo", version = "0.4.2" }
2 changes: 1 addition & 1 deletion tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<!-- markdownlint-disable no-inline-html -->

<!-- markdownlint-disable-next-line no-emphasis-as-heading -->
*Up to date with version 0.4.1*
*Up to date with version 0.4.2*

<!-- markdownlint-disable-next-line heading-increment -->
### Table of contents
Expand Down

0 comments on commit 0afead8

Please sign in to comment.