From 0f0916f94789771365b2c6ab77fb95bf4d5d378b Mon Sep 17 00:00:00 2001 From: Matt Hunzinger Date: Thu, 5 Dec 2024 15:19:05 -0500 Subject: [PATCH] chore: publish actuate-v0.16.0 --- CHANGELOG.md | 48 ++++++++++++++++++++++++++++++++++++++++++++++ Cargo.lock | 2 +- Cargo.toml | 2 +- src/compose/mod.rs | 2 +- 4 files changed, 51 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4fc1a85..f14d5f7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,54 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.16.0](https://github.com/actuate-rs/actuate/compare/actuate-v0.15.0...actuate-v0.16.0) - 2024-12-05 + +### Breaking changes + +- Major internal rewrite! (9ef73eb) The new internals allow for more dynamic control over the composition + , enabling features like pause and resume of a composition. + `Composer::try_compose` will now also skip directly to changed composables, rather than setting change flags. + - Removes exported methods for `ScopeData` + - The `Runtime` struct is now private to ensure safety + +## Features + +- `Composer` is now an iterator! This allows for stepping through each composable in the composition. +- `Composer` also implements `fmt::Debug`: + + ```rs + use actuate::prelude::*; + use actuate::composer::Composer; + + #[derive(Data)] + struct A; + + impl Compose for A { + fn compose(cx: Scope) -> impl Compose { + (B, C) + } + } + + #[derive(Data)] + struct B; + + impl Compose for B { + fn compose(cx: Scope) -> impl Compose {} + } + + #[derive(Data)] + struct C; + + impl Compose for C { + fn compose(cx: Scope) -> impl Compose {} + } + + let mut composer = Composer::new(A); + composer.try_compose().unwrap(); + + assert_eq!(format!("{:?}", composer), "Composer(A(B, C))") + ``` + ## [0.15.0](https://github.com/actuate-rs/actuate/compare/actuate-v0.14.2...actuate-v0.15.0) - 2024-12-03 ### Breaking changes diff --git a/Cargo.lock b/Cargo.lock index 973aaee..494b7a4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -63,7 +63,7 @@ dependencies = [ [[package]] name = "actuate" -version = "0.15.0" +version = "0.16.0" dependencies = [ "actuate-macros", "ahash", diff --git a/Cargo.toml b/Cargo.toml index 27720a2..3db5ce5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "actuate" -version = "0.15.0" +version = "0.16.0" edition = "2021" license = "MIT OR Apache-2.0" description = "A reactive user-interface framework" diff --git a/src/compose/mod.rs b/src/compose/mod.rs index d339f3a..5b02990 100644 --- a/src/compose/mod.rs +++ b/src/compose/mod.rs @@ -41,7 +41,7 @@ pub use self::memo::{memo, Memo}; /// until either a [`Memo`] is reached or the composition is complete. /// /// [`Memo`] is special in that it will only recompose in two cases: -/// 1. It's provided dependencies have changed (see [`memo`] for more) +/// 1. It's provided dependencies have changed (see [`memo()`] for more) /// 2. Its own state has changed, which will then trigger the above parent-to-child process for its children. #[must_use = "Composables do nothing unless composed or returned from other composables."] pub trait Compose: Data {