Decompose

Kotlin Multiplatform lifecycle-aware business logic components (aka BLoCs) with routing (navigation) and pluggable UI (Jetpack Compose, SwiftUI, JS React, etc.)

APACHE-2.0 License

Stars
2K

Bot releases are hidden (Show)

Decompose - 3.0.0-alpha01

Published by arkivanov 10 months ago

  • Complete migration to kotlinx-serialization (#553)
  • Added support for the wasmJs target for browser (#564)
  • Renamed extensions-compose-jetbrains module to extensions-compose (#559)
  • Removed deprecated Value#subscribe and Value#unsubscribe methods (#554)
  • Renamed predictiveBackAnimation animation argument to fallbackAnimation (#555)
  • Added STARTED status to ChildNavState (#557)
  • Added API to discard saved state on Android (#558)

Multiplatform Compose Extensions

The extensions-compose-jetpack module is removed, the extensions-compose-jetbrains is renamed to extensions-compose. Please update your dependencies accordingly and replace all com.arkivanov.decompose.extensions.compose.jetbrains.* imports with com.arkivanov.decompose.extensions.compose.*.

Compose for iOS, macOS and Web support

Starting with this release there is no need to use -compose-experimental version suffix. The support of Compose for iOS, macOS and Web is now published under the main version.

Compose for Wasm

Starting with this release Compose for Wasm (wasmJs target) is also supported.

Migration to kotlinx-serialization

This release completes the migration to kotlinx-serialization and removes the support of Parcelable/Parcelize. See the updated docs for more information.

Changes in ChildNavState

The ChildNavState.Status enum (Generic Navigation) has changed and now includes STARTED variant. Please see the updated docs.

Removal of Value subscribe and unsubscribe methods

Previously deprecated methods Value#subscribe and Value#unsubscribe are removed. The Value#observe method returning Cancellation is renamed to subscribe. The Value.observe(Lifecycle, ...) method is also renamed to subscribe.

API to discard saved state on Android

The defaultComponentContext function now accepts two new arguments:

  • discardSavedState - a flag indicating whether any previously saved state should be discarded or not, default value is false. Can be useful for handling deep links in onCreate, so that the navigation state is not restored and initial state from the deep link is applied instead.
  • isStateSavingAllowed - called before saving the state. When true then the state will be saved, otherwise it won't. Default value is true.

Versions and dependencies

Kotlin: 1.9.21
Essenty: 2.0.0-alpha01
kotlinx-serialization: 1.6.2
JetBrains Compose: 1.6.0-alpha01

Decompose - 2.2.1-compose-experimental

Published by arkivanov 10 months ago

This is the same release as 2.2.1, but with Compose for iOS and Web (Canvas, js only) support.

Versions and dependencies

Kotlin: 1.9.21
Essenty: 1.3.0
kotlinx-serialization: 1.6.0
parcelize-darwin: 0.2.3
JetBrains Compose: 1.5.11

Decompose - 2.2.1

Published by arkivanov 10 months ago

  • Updated Kotlin to 1.9.21, Jetpack Compose compiler to 1.5.6, Multiplatform Compose to 1.5.11 (#539)

Versions and dependencies

Kotlin: 1.9.21
Essenty: 1.3.0
kotlinx-serialization: 1.6.0
parcelize-darwin: 0.2.3

extensions-compose-jetpack

Jetpack Compose: 1.5.0
Jetpack Compose Compiler: 1.5.6

extensions-compose-jetbrains

JetBrains Compose: 1.5.11

Decompose - 2.2.0-compose-experimental

Published by arkivanov 11 months ago

This is the same release as 2.2.0, but with Compose for iOS and Web (Canvas, js only) support.

Versions and dependencies

Kotlin: 1.9.20
Essenty: 1.3.0
kotlinx-serialization: 1.6.0
parcelize-darwin: 0.2.3
JetBrains Compose: 1.5.10

Decompose - 2.2.0

Published by arkivanov 11 months ago

Changes since version 2.2.0-beta02

  • Updated Essenty to 1.3.0 (#547)
  • Fixed possible NSInvalidArgumentException crash in ApplicationLifecycle (#545)
  • Fixed incorrect stack animation direction when stack replaced with a smaller stack (#543)

Changes since version 2.1.4

  • Added support for kotlinx-serialization, deprecated Parcelable APIs (#486)
  • Added key argument to Pages (#494)
  • Added pushNew extension function for StackNavigator (#499, #514)
  • Added materialPredictiveBackAnimatable as a default animation (#533)
  • Added ApplicationLifecycle for iOS and tvOS targets (#527)
  • LTR/RTL support in PredictiveBackGestureOverlay (#535 by @alexzhirkevich, #538)
  • Updated Kotlin to 1.9.20 and other dependencies (#521)

Please see the previous release notes for more information and guidance:

Versions and dependencies

Kotlin: 1.9.20
Essenty: 1.3.0
kotlinx-serialization: 1.6.0
parcelize-darwin: 0.2.3

extensions-compose-jetpack

Jetpack Compose: 1.5.0
Jetpack Compose Compiler: 1.5.4

extensions-compose-jetbrains

JetBrains Compose: 1.5.10

Decompose - 2.2.0-compose-experimental-beta02

Published by arkivanov 11 months ago

TBD (publishing in progress)

Decompose - 2.2.0-beta02

Published by arkivanov 11 months ago

  • Added materialPredictiveBackAnimatable as a default animation (#533)
  • LTR/RTL support in PredictiveBackGestureOverlay (#538)
  • Fixed PredictiveBackGestureOverlay swipe edges not changing (#535 by @alexzhirkevich)

The new materialPredictiveBackAnimatable API

This release adds the new materialPredictiveBackAnimatable function that resembles the predictive back design for Android. This animation is used by default on all platforms.

Versions and dependencies

Kotlin: 1.9.20
Essenty: 1.3.0-beta01
kotlinx-serialization: 1.6.0
parcelize-darwin: 0.2.3

extensions-compose-jetpack

Jetpack Compose: 1.5.0
Jetpack Compose Compiler: 1.5.4

extensions-compose-jetbrains

JetBrains Compose: 1.5.10

Decompose - 2.2.0-compose-experimental-beta01

Published by arkivanov 11 months ago

TBD

Decompose - 2.2.0-beta01

Published by arkivanov 11 months ago

TBD (publishing in progress)

Decompose - 2.2.0-compose-experimental-alpha05

Published by arkivanov 11 months ago

TBD (publishing in progress)

Decompose - 2.2.0-alpha05

Published by arkivanov 11 months ago

TBD (publishing in progress)

Decompose - 2.2.0-alpha05

Published by arkivanov 11 months ago

TBD (publishing in progress)

Decompose - 2.2.0-compose-experimental-alpha04

Published by arkivanov 12 months ago

This is the same release as 2.2.0-alpha04, but with Compose for iOS and Web (Canvas, js only) support.

Versions and dependencies

Kotlin: 1.9.10
Essenty: 1.3.0-alpha03
kotlinx-serialization: 1.6.0
parcelize-darwin: 0.2.2
JetBrains Compose: 1.5.1

Decompose - 2.2.0-alpha04

Published by arkivanov 12 months ago

  • Fixed current page not displayed when swiped through with two fingers (#517)
  • Updated Essenty to 1.3.0-alpha03 (#520)

Versions and dependencies

Kotlin: 1.9.10
Essenty: 1.3.0-alpha03
kotlinx-serialization: 1.6.0
parcelize-darwin: 0.2.2

extensions-compose-jetpack

Jetpack Compose: 1.5.3
Jetpack Compose Compiler: 1.5.3

extensions-compose-jetbrains

JetBrains Compose: 1.5.1

Decompose - 2.1.4-compose-experimental

Published by arkivanov 12 months ago

This is the same release as 2.1.4, but with Compose for iOS and Web (Canvas, js only) support.

Versions and dependencies

Kotlin: 1.9.10
Essenty: 1.2.0
parcelize-darwin: 0.2.1
JetBrains Compose: 1.5.1

Decompose - 2.1.4

Published by arkivanov 12 months ago

  • Fixed current page not displayed when swiped through with two fingers (#517)

Versions and dependencies

Kotlin: 1.9.10
Essenty: 1.2.0
parcelize-darwin: 0.2.1

extensions-compose-jetpack

Jetpack Compose: 1.5.3
Jetpack Compose Compiler: 1.5.3

extensions-compose-jetbrains

JetBrains Compose: 1.5.1

Decompose - 2.2.0-compose-experimental-alpha03

Published by arkivanov 12 months ago

This is the same release as 2.2.0-alpha03, but with Compose for iOS and Web (Canvas, js only) support.

Versions and dependencies

Kotlin: 1.9.10
Essenty: 1.3.0-alpha02
kotlinx-serialization: 1.6.0
parcelize-darwin: 0.2.2
JetBrains Compose: 1.5.1

Decompose - 2.2.0-alpha03

Published by arkivanov 12 months ago

  • Fixed Pages(onPageSelected) callback called multiple times and not rendering the current page sometimes (#503)
  • Added pushNew extension function for StackNavigator (#499, #514)
  • Refactored predictive back animation, added PredictiveBackAnimatable API (#507, #515)

New pushNew navigation function

This release introduces the new navigation function for Child Stack: pushNew. It allows pushing a configuration only if it's not already on top of the stack. Can be useful for pushing components on button clicks, etc. Please see the updated docs.

Updated Predictive Back Gesture API

This release contains some improvements for the Predictive Back Gesture API, bringing it closer to become stable. The new API allows creating more complex custom transitions.

Migration if not using custom transitions

- import com.arkivanov.decompose.extensions.compose.jetbrains.stack.animation.predictiveBackAnimation
+ import com.arkivanov.decompose.extensions.compose.jetbrains.stack.animation.predictiveback.predictiveBackAnimation

Migration if using custom transitions

- import com.arkivanov.decompose.extensions.compose.jetbrains.stack.animation.predictiveBackAnimation
+ import com.arkivanov.decompose.extensions.compose.jetbrains.stack.animation.predictiveback.predictiveBackAnimatable
+ import com.arkivanov.decompose.extensions.compose.jetbrains.stack.animation.predictiveback.predictiveBackAnimation
    Children(
        stack = component.childStack,
        modifier = modifier,
        animation = predictiveBackAnimation(
            backHandler = component.backHandler,
            animation = stackAnimation(fade() + scale()),
-           exitModifier = { progress, edge -> ... },
-           enterModifier = { progress, edge -> ... },
+           selector = { initialBackEvent, _, _ ->
+               predictiveBackAnimatable(
+                   initialBackEvent = initialBackEvent,
+                   exitModifier = { progress, edge -> ... },
+                   enterModifier = { progress, edge -> ... },
+               )
+           },
            onBack = component::onBackClicked,
        ),
    ) {
        ...
    }

Versions and dependencies

Kotlin: 1.9.10
Essenty: 1.3.0-alpha02
kotlinx-serialization: 1.6.0
parcelize-darwin: 0.2.2

extensions-compose-jetpack

Jetpack Compose: 1.5.3
Jetpack Compose Compiler: 1.5.3

extensions-compose-jetbrains

JetBrains Compose: 1.5.1

Decompose - 2.1.3-compose-experimental

Published by arkivanov 12 months ago

TBD (publishing in progress)

Decompose - 2.1.3

Published by arkivanov 12 months ago

TBD (publishing in progress)

Package Rankings
Top 12.78% on Repo1.maven.org
Badges
Extracted from project README
License Twitter URL
Related Projects