Skip to content

CircuitX Navigation #1669

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 25 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ public interface Navigator : GoToNavigator {
* @param restoreState Whether any previously saved state for the given [newRoot] should be
* restored. If this is `false` or there is no previous state, the back stack will only contain
* [newRoot].
* @return The backstack before it was reset.
*/
public fun resetRoot(
newRoot: Screen,
Expand Down
138 changes: 138 additions & 0 deletions circuitx/navigation/api/android/navigation.api
Original file line number Diff line number Diff line change
@@ -0,0 +1,138 @@
public final class com/slack/circuitx/navigation/intercepting/AndroidScreenAwareNavigationInterceptor : com/slack/circuitx/navigation/intercepting/CircuitNavigationInterceptor {
public static final field $stable I
public fun <init> (Landroid/content/Context;)V
public fun <init> (Lcom/slack/circuitx/android/AndroidScreenStarter;)V
public fun goTo (Lcom/slack/circuit/runtime/screen/Screen;)Lcom/slack/circuitx/navigation/intercepting/InterceptorGoToResult;
}

public final class com/slack/circuitx/navigation/intercepting/CircuitInterceptingNavigator : com/slack/circuit/runtime/Navigator {
public static final field $stable I
public fun <init> (Lcom/slack/circuit/runtime/Navigator;Lkotlinx/collections/immutable/ImmutableList;Lkotlinx/collections/immutable/ImmutableList;Lcom/slack/circuitx/navigation/intercepting/CircuitInterceptingNavigator$FailureNotifier;)V
public synthetic fun <init> (Lcom/slack/circuit/runtime/Navigator;Lkotlinx/collections/immutable/ImmutableList;Lkotlinx/collections/immutable/ImmutableList;Lcom/slack/circuitx/navigation/intercepting/CircuitInterceptingNavigator$FailureNotifier;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
public fun goTo (Lcom/slack/circuit/runtime/screen/Screen;)Z
public fun peek ()Lcom/slack/circuit/runtime/screen/Screen;
public fun peekBackStack ()Lkotlinx/collections/immutable/ImmutableList;
public fun pop (Lcom/slack/circuit/runtime/screen/PopResult;)Lcom/slack/circuit/runtime/screen/Screen;
public fun resetRoot (Lcom/slack/circuit/runtime/screen/Screen;ZZ)Lkotlinx/collections/immutable/ImmutableList;
}

public abstract interface class com/slack/circuitx/navigation/intercepting/CircuitInterceptingNavigator$FailureNotifier {
public abstract fun goToInterceptorFailure (Lcom/slack/circuitx/navigation/intercepting/InterceptorResult$Failure;)V
public abstract fun popInterceptorFailure (Lcom/slack/circuitx/navigation/intercepting/InterceptorResult$Failure;)V
public abstract fun rootResetInterceptorFailure (Lcom/slack/circuitx/navigation/intercepting/InterceptorResult$Failure;)V
}

public final class com/slack/circuitx/navigation/intercepting/CircuitInterceptingNavigatorKt {
public static final fun rememberCircuitInterceptingNavigator (Lcom/slack/circuit/runtime/Navigator;Lkotlinx/collections/immutable/ImmutableList;Lkotlinx/collections/immutable/ImmutableList;Lcom/slack/circuitx/navigation/intercepting/CircuitInterceptingNavigator$FailureNotifier;ZLandroidx/compose/runtime/Composer;II)Lcom/slack/circuit/runtime/Navigator;
}

public abstract interface class com/slack/circuitx/navigation/intercepting/CircuitNavigationEventListener {
public fun goTo (Lcom/slack/circuit/runtime/screen/Screen;)V
public fun onBackStackChanged (Lkotlinx/collections/immutable/ImmutableList;)V
public fun pop (Lkotlinx/collections/immutable/ImmutableList;Lcom/slack/circuit/runtime/screen/PopResult;)V
public fun resetRoot (Lcom/slack/circuit/runtime/screen/Screen;ZZ)V
}

public abstract interface class com/slack/circuitx/navigation/intercepting/CircuitNavigationInterceptor {
public static final field Companion Lcom/slack/circuitx/navigation/intercepting/CircuitNavigationInterceptor$Companion;
public fun goTo (Lcom/slack/circuit/runtime/screen/Screen;)Lcom/slack/circuitx/navigation/intercepting/InterceptorGoToResult;
public fun pop (Lkotlinx/collections/immutable/ImmutableList;Lcom/slack/circuit/runtime/screen/PopResult;)Lcom/slack/circuitx/navigation/intercepting/InterceptorPopResult;
public fun resetRoot (Lcom/slack/circuit/runtime/screen/Screen;ZZ)Lcom/slack/circuitx/navigation/intercepting/InterceptorResetRootResult;
}

public final class com/slack/circuitx/navigation/intercepting/CircuitNavigationInterceptor$Companion {
public final fun getConsumedSuccess ()Lcom/slack/circuitx/navigation/intercepting/InterceptorResult;
public final fun getSkipped ()Lcom/slack/circuitx/navigation/intercepting/InterceptorResult;
}

public abstract interface class com/slack/circuitx/navigation/intercepting/InterceptorGoToResult {
}

public final class com/slack/circuitx/navigation/intercepting/InterceptorGoToResult$Rewrite : com/slack/circuitx/navigation/intercepting/InterceptorGoToResult {
public static final field $stable I
public fun <init> (Lcom/slack/circuit/runtime/screen/Screen;)V
public final fun component1 ()Lcom/slack/circuit/runtime/screen/Screen;
public final fun copy (Lcom/slack/circuit/runtime/screen/Screen;)Lcom/slack/circuitx/navigation/intercepting/InterceptorGoToResult$Rewrite;
public static synthetic fun copy$default (Lcom/slack/circuitx/navigation/intercepting/InterceptorGoToResult$Rewrite;Lcom/slack/circuit/runtime/screen/Screen;ILjava/lang/Object;)Lcom/slack/circuitx/navigation/intercepting/InterceptorGoToResult$Rewrite;
public fun equals (Ljava/lang/Object;)Z
public final fun getScreen ()Lcom/slack/circuit/runtime/screen/Screen;
public fun hashCode ()I
public fun toString ()Ljava/lang/String;
}

public abstract interface class com/slack/circuitx/navigation/intercepting/InterceptorPopResult {
}

public abstract interface class com/slack/circuitx/navigation/intercepting/InterceptorResetRootResult {
}

public final class com/slack/circuitx/navigation/intercepting/InterceptorResetRootResult$Rewrite : com/slack/circuitx/navigation/intercepting/InterceptorResetRootResult {
public static final field $stable I
public fun <init> (Lcom/slack/circuit/runtime/screen/Screen;ZZ)V
public final fun component1 ()Lcom/slack/circuit/runtime/screen/Screen;
public final fun component2 ()Z
public final fun component3 ()Z
public final fun copy (Lcom/slack/circuit/runtime/screen/Screen;ZZ)Lcom/slack/circuitx/navigation/intercepting/InterceptorResetRootResult$Rewrite;
public static synthetic fun copy$default (Lcom/slack/circuitx/navigation/intercepting/InterceptorResetRootResult$Rewrite;Lcom/slack/circuit/runtime/screen/Screen;ZZILjava/lang/Object;)Lcom/slack/circuitx/navigation/intercepting/InterceptorResetRootResult$Rewrite;
public fun equals (Ljava/lang/Object;)Z
public final fun getRestoreState ()Z
public final fun getSaveState ()Z
public final fun getScreen ()Lcom/slack/circuit/runtime/screen/Screen;
public fun hashCode ()I
public fun toString ()Ljava/lang/String;
}

public abstract interface class com/slack/circuitx/navigation/intercepting/InterceptorResult : com/slack/circuitx/navigation/intercepting/InterceptorGoToResult, com/slack/circuitx/navigation/intercepting/InterceptorPopResult, com/slack/circuitx/navigation/intercepting/InterceptorResetRootResult {
}

public final class com/slack/circuitx/navigation/intercepting/InterceptorResult$Failure : com/slack/circuitx/navigation/intercepting/InterceptorResult {
public static final field $stable I
public fun <init> (ZLjava/lang/Throwable;)V
public synthetic fun <init> (ZLjava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
public final fun component1 ()Z
public final fun component2 ()Ljava/lang/Throwable;
public final fun copy (ZLjava/lang/Throwable;)Lcom/slack/circuitx/navigation/intercepting/InterceptorResult$Failure;
public static synthetic fun copy$default (Lcom/slack/circuitx/navigation/intercepting/InterceptorResult$Failure;ZLjava/lang/Throwable;ILjava/lang/Object;)Lcom/slack/circuitx/navigation/intercepting/InterceptorResult$Failure;
public fun equals (Ljava/lang/Object;)Z
public final fun getConsumed ()Z
public final fun getReason ()Ljava/lang/Throwable;
public fun hashCode ()I
public fun toString ()Ljava/lang/String;
}

public final class com/slack/circuitx/navigation/intercepting/InterceptorResult$Skipped : com/slack/circuitx/navigation/intercepting/InterceptorResult {
public static final field $stable I
public static final field INSTANCE Lcom/slack/circuitx/navigation/intercepting/InterceptorResult$Skipped;
public fun equals (Ljava/lang/Object;)Z
public fun hashCode ()I
public fun toString ()Ljava/lang/String;
}

public final class com/slack/circuitx/navigation/intercepting/InterceptorResult$Success : com/slack/circuitx/navigation/intercepting/InterceptorResult {
public static final field $stable I
public fun <init> (Z)V
public final fun component1 ()Z
public final fun copy (Z)Lcom/slack/circuitx/navigation/intercepting/InterceptorResult$Success;
public static synthetic fun copy$default (Lcom/slack/circuitx/navigation/intercepting/InterceptorResult$Success;ZILjava/lang/Object;)Lcom/slack/circuitx/navigation/intercepting/InterceptorResult$Success;
public fun equals (Ljava/lang/Object;)Z
public final fun getConsumed ()Z
public fun hashCode ()I
public fun toString ()Ljava/lang/String;
}

public final class com/slack/circuitx/navigation/intercepting/LoggingNavigationEventListener : com/slack/circuitx/navigation/intercepting/CircuitNavigationEventListener {
public static final field $stable I
public static final field INSTANCE Lcom/slack/circuitx/navigation/intercepting/LoggingNavigationEventListener;
public fun goTo (Lcom/slack/circuit/runtime/screen/Screen;)V
public fun onBackStackChanged (Lkotlinx/collections/immutable/ImmutableList;)V
public fun pop (Lkotlinx/collections/immutable/ImmutableList;Lcom/slack/circuit/runtime/screen/PopResult;)V
}

public final class com/slack/circuitx/navigation/intercepting/LoggingNavigatorFailureNotifier : com/slack/circuitx/navigation/intercepting/CircuitInterceptingNavigator$FailureNotifier {
public static final field $stable I
public static final field INSTANCE Lcom/slack/circuitx/navigation/intercepting/LoggingNavigatorFailureNotifier;
public fun goToInterceptorFailure (Lcom/slack/circuitx/navigation/intercepting/InterceptorResult$Failure;)V
public fun popInterceptorFailure (Lcom/slack/circuitx/navigation/intercepting/InterceptorResult$Failure;)V
public fun rootResetInterceptorFailure (Lcom/slack/circuitx/navigation/intercepting/InterceptorResult$Failure;)V
}

115 changes: 115 additions & 0 deletions circuitx/navigation/api/jvm/navigation.api
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
public final class com/slack/circuitx/navigation/intercepting/CircuitInterceptingNavigator : com/slack/circuit/runtime/Navigator {
public static final field $stable I
public fun <init> (Lcom/slack/circuit/runtime/Navigator;Lkotlinx/collections/immutable/ImmutableList;Lkotlinx/collections/immutable/ImmutableList;Lcom/slack/circuitx/navigation/intercepting/CircuitInterceptingNavigator$FailureNotifier;)V
public synthetic fun <init> (Lcom/slack/circuit/runtime/Navigator;Lkotlinx/collections/immutable/ImmutableList;Lkotlinx/collections/immutable/ImmutableList;Lcom/slack/circuitx/navigation/intercepting/CircuitInterceptingNavigator$FailureNotifier;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
public fun goTo (Lcom/slack/circuit/runtime/screen/Screen;)Z
public fun peek ()Lcom/slack/circuit/runtime/screen/Screen;
public fun peekBackStack ()Lkotlinx/collections/immutable/ImmutableList;
public fun pop (Lcom/slack/circuit/runtime/screen/PopResult;)Lcom/slack/circuit/runtime/screen/Screen;
public fun resetRoot (Lcom/slack/circuit/runtime/screen/Screen;ZZ)Lkotlinx/collections/immutable/ImmutableList;
}

public abstract interface class com/slack/circuitx/navigation/intercepting/CircuitInterceptingNavigator$FailureNotifier {
public abstract fun goToInterceptorFailure (Lcom/slack/circuitx/navigation/intercepting/InterceptorResult$Failure;)V
public abstract fun popInterceptorFailure (Lcom/slack/circuitx/navigation/intercepting/InterceptorResult$Failure;)V
public abstract fun rootResetInterceptorFailure (Lcom/slack/circuitx/navigation/intercepting/InterceptorResult$Failure;)V
}

public final class com/slack/circuitx/navigation/intercepting/CircuitInterceptingNavigatorKt {
public static final fun rememberCircuitInterceptingNavigator (Lcom/slack/circuit/runtime/Navigator;Lkotlinx/collections/immutable/ImmutableList;Lkotlinx/collections/immutable/ImmutableList;Lcom/slack/circuitx/navigation/intercepting/CircuitInterceptingNavigator$FailureNotifier;ZLandroidx/compose/runtime/Composer;II)Lcom/slack/circuit/runtime/Navigator;
}

public abstract interface class com/slack/circuitx/navigation/intercepting/CircuitNavigationEventListener {
public fun goTo (Lcom/slack/circuit/runtime/screen/Screen;)V
public fun onBackStackChanged (Lkotlinx/collections/immutable/ImmutableList;)V
public fun pop (Lkotlinx/collections/immutable/ImmutableList;Lcom/slack/circuit/runtime/screen/PopResult;)V
public fun resetRoot (Lcom/slack/circuit/runtime/screen/Screen;ZZ)V
}

public abstract interface class com/slack/circuitx/navigation/intercepting/CircuitNavigationInterceptor {
public static final field Companion Lcom/slack/circuitx/navigation/intercepting/CircuitNavigationInterceptor$Companion;
public fun goTo (Lcom/slack/circuit/runtime/screen/Screen;)Lcom/slack/circuitx/navigation/intercepting/InterceptorGoToResult;
public fun pop (Lkotlinx/collections/immutable/ImmutableList;Lcom/slack/circuit/runtime/screen/PopResult;)Lcom/slack/circuitx/navigation/intercepting/InterceptorPopResult;
public fun resetRoot (Lcom/slack/circuit/runtime/screen/Screen;ZZ)Lcom/slack/circuitx/navigation/intercepting/InterceptorResetRootResult;
}

public final class com/slack/circuitx/navigation/intercepting/CircuitNavigationInterceptor$Companion {
public final fun getConsumedSuccess ()Lcom/slack/circuitx/navigation/intercepting/InterceptorResult;
public final fun getSkipped ()Lcom/slack/circuitx/navigation/intercepting/InterceptorResult;
}

public abstract interface class com/slack/circuitx/navigation/intercepting/InterceptorGoToResult {
}

public final class com/slack/circuitx/navigation/intercepting/InterceptorGoToResult$Rewrite : com/slack/circuitx/navigation/intercepting/InterceptorGoToResult {
public static final field $stable I
public fun <init> (Lcom/slack/circuit/runtime/screen/Screen;)V
public final fun component1 ()Lcom/slack/circuit/runtime/screen/Screen;
public final fun copy (Lcom/slack/circuit/runtime/screen/Screen;)Lcom/slack/circuitx/navigation/intercepting/InterceptorGoToResult$Rewrite;
public static synthetic fun copy$default (Lcom/slack/circuitx/navigation/intercepting/InterceptorGoToResult$Rewrite;Lcom/slack/circuit/runtime/screen/Screen;ILjava/lang/Object;)Lcom/slack/circuitx/navigation/intercepting/InterceptorGoToResult$Rewrite;
public fun equals (Ljava/lang/Object;)Z
public final fun getScreen ()Lcom/slack/circuit/runtime/screen/Screen;
public fun hashCode ()I
public fun toString ()Ljava/lang/String;
}

public abstract interface class com/slack/circuitx/navigation/intercepting/InterceptorPopResult {
}

public abstract interface class com/slack/circuitx/navigation/intercepting/InterceptorResetRootResult {
}

public final class com/slack/circuitx/navigation/intercepting/InterceptorResetRootResult$Rewrite : com/slack/circuitx/navigation/intercepting/InterceptorResetRootResult {
public static final field $stable I
public fun <init> (Lcom/slack/circuit/runtime/screen/Screen;ZZ)V
public final fun component1 ()Lcom/slack/circuit/runtime/screen/Screen;
public final fun component2 ()Z
public final fun component3 ()Z
public final fun copy (Lcom/slack/circuit/runtime/screen/Screen;ZZ)Lcom/slack/circuitx/navigation/intercepting/InterceptorResetRootResult$Rewrite;
public static synthetic fun copy$default (Lcom/slack/circuitx/navigation/intercepting/InterceptorResetRootResult$Rewrite;Lcom/slack/circuit/runtime/screen/Screen;ZZILjava/lang/Object;)Lcom/slack/circuitx/navigation/intercepting/InterceptorResetRootResult$Rewrite;
public fun equals (Ljava/lang/Object;)Z
public final fun getRestoreState ()Z
public final fun getSaveState ()Z
public final fun getScreen ()Lcom/slack/circuit/runtime/screen/Screen;
public fun hashCode ()I
public fun toString ()Ljava/lang/String;
}

public abstract interface class com/slack/circuitx/navigation/intercepting/InterceptorResult : com/slack/circuitx/navigation/intercepting/InterceptorGoToResult, com/slack/circuitx/navigation/intercepting/InterceptorPopResult, com/slack/circuitx/navigation/intercepting/InterceptorResetRootResult {
}

public final class com/slack/circuitx/navigation/intercepting/InterceptorResult$Failure : com/slack/circuitx/navigation/intercepting/InterceptorResult {
public static final field $stable I
public fun <init> (ZLjava/lang/Throwable;)V
public synthetic fun <init> (ZLjava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
public final fun component1 ()Z
public final fun component2 ()Ljava/lang/Throwable;
public final fun copy (ZLjava/lang/Throwable;)Lcom/slack/circuitx/navigation/intercepting/InterceptorResult$Failure;
public static synthetic fun copy$default (Lcom/slack/circuitx/navigation/intercepting/InterceptorResult$Failure;ZLjava/lang/Throwable;ILjava/lang/Object;)Lcom/slack/circuitx/navigation/intercepting/InterceptorResult$Failure;
public fun equals (Ljava/lang/Object;)Z
public final fun getConsumed ()Z
public final fun getReason ()Ljava/lang/Throwable;
public fun hashCode ()I
public fun toString ()Ljava/lang/String;
}

public final class com/slack/circuitx/navigation/intercepting/InterceptorResult$Skipped : com/slack/circuitx/navigation/intercepting/InterceptorResult {
public static final field $stable I
public static final field INSTANCE Lcom/slack/circuitx/navigation/intercepting/InterceptorResult$Skipped;
public fun equals (Ljava/lang/Object;)Z
public fun hashCode ()I
public fun toString ()Ljava/lang/String;
}

public final class com/slack/circuitx/navigation/intercepting/InterceptorResult$Success : com/slack/circuitx/navigation/intercepting/InterceptorResult {
public static final field $stable I
public fun <init> (Z)V
public final fun component1 ()Z
public final fun copy (Z)Lcom/slack/circuitx/navigation/intercepting/InterceptorResult$Success;
public static synthetic fun copy$default (Lcom/slack/circuitx/navigation/intercepting/InterceptorResult$Success;ZILjava/lang/Object;)Lcom/slack/circuitx/navigation/intercepting/InterceptorResult$Success;
public fun equals (Ljava/lang/Object;)Z
public final fun getConsumed ()Z
public fun hashCode ()I
public fun toString ()Ljava/lang/String;
}

Loading