@apexnative/navigation 1.0.0-alpha.4 → 1.0.0-alpha.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -0
- package/android/CLAUDE.md +9 -2
- package/android/CORE.md +25 -15
- package/android/src/main/java/dev/apexnative/navigation/NavigationActivity.kt +25 -9
- package/android/src/main/java/dev/apexnative/navigation/options/AnimationsOptions.kt +2 -2
- package/android/src/main/java/dev/apexnative/navigation/options/HardwareBackButtonOptions.kt +9 -1
- package/android/src/main/java/dev/apexnative/navigation/options/StackAnimationOptions.kt +40 -2
- package/android/src/main/java/dev/apexnative/navigation/react/ArrangementStates.kt +6 -6
- package/android/src/main/java/dev/apexnative/navigation/react/CommandAnswer.kt +28 -13
- package/android/src/main/java/dev/apexnative/navigation/react/Hinge.kt +7 -4
- package/android/src/main/java/dev/apexnative/navigation/react/ReactView.kt +39 -20
- package/android/src/main/java/dev/apexnative/navigation/react/ReloadCoordinator.kt +7 -4
- package/android/src/main/java/dev/apexnative/navigation/react/ScreenInsets.kt +6 -6
- package/android/src/main/java/dev/apexnative/navigation/react/ScreenRegions.kt +10 -5
- package/android/src/main/java/dev/apexnative/navigation/react/events/AppearanceDispatcher.kt +30 -39
- package/android/src/main/java/dev/apexnative/navigation/react/events/EventEmitter.kt +34 -7
- package/android/src/main/java/dev/apexnative/navigation/react/events/NavigationState.kt +154 -0
- package/android/src/main/java/dev/apexnative/navigation/safearea/SafeAreaView.kt +6 -4
- package/android/src/main/java/dev/apexnative/navigation/slots/SlotScreenView.kt +12 -12
- package/android/src/main/java/dev/apexnative/navigation/viewcontrollers/arrangement/ArrangementController.kt +3 -2
- package/android/src/main/java/dev/apexnative/navigation/viewcontrollers/bottomtabs/BottomTabsController.kt +9 -11
- package/android/src/main/java/dev/apexnative/navigation/viewcontrollers/component/ComponentViewController.kt +6 -2
- package/android/src/main/java/dev/apexnative/navigation/viewcontrollers/component/ContentReadiness.kt +1 -1
- package/android/src/main/java/dev/apexnative/navigation/viewcontrollers/component/ScreenReadiness.kt +103 -56
- package/android/src/main/java/dev/apexnative/navigation/viewcontrollers/navigator/BackCallbackCheck.kt +50 -0
- package/android/src/main/java/dev/apexnative/navigation/viewcontrollers/navigator/BackCallbackState.kt +45 -14
- package/android/src/main/java/dev/apexnative/navigation/viewcontrollers/navigator/Navigator.kt +21 -5
- package/android/src/main/java/dev/apexnative/navigation/viewcontrollers/navigator/RootCoordinator.kt +2 -2
- package/android/src/main/java/dev/apexnative/navigation/viewcontrollers/splitview/SplitViewController.kt +3 -0
- package/android/src/main/java/dev/apexnative/navigation/viewcontrollers/stack/StackController.kt +9 -5
- package/android/src/main/java/dev/apexnative/navigation/viewcontrollers/stack/search/ScreenSearch.kt +3 -5
- package/android/src/main/java/dev/apexnative/navigation/viewcontrollers/stack/search/StackSearchPresenter.kt +2 -5
- package/android/src/main/java/dev/apexnative/navigation/viewcontrollers/stack/topbar/BarComponents.kt +5 -51
- package/android/src/main/java/dev/apexnative/navigation/viewcontrollers/stack/topbar/TopBarPresenter.kt +4 -9
- package/android/src/main/java/dev/apexnative/navigation/views/bottomtabs/CustomBottomTabItemView.kt +0 -5
- package/cli/doctor/checks/splash.js +4 -22
- package/cli/splash/index.js +3 -1
- package/docs-md/containers/modals.md +2 -2
- package/docs-md/guides/cli.md +1 -2
- package/docs-md/help/troubleshooting.md +2 -2
- package/docs-md/screen-ui/back-and-gestures.md +22 -0
- package/docs-md/start/installation.md +1 -1
- package/ios/CORE.md +6 -6
- package/ios/Contract/ANNCommandAnswer.h +9 -2
- package/ios/Contract/ANNCommandAnswer.mm +25 -12
- package/ios/Core/ANNAppearanceDispatcher.h +5 -4
- package/ios/Core/ANNAppearanceDispatcher.mm +12 -1
- package/ios/Core/ANNNavigationState.h +4 -6
- package/ios/Core/ANNNavigationState.mm +0 -4
- package/ios/Layouts/Root/ANNSplashViewController.h +5 -3
- package/ios/Layouts/Root/ANNSplashViewController.mm +147 -0
- package/ios/Layouts/Stack/ANNPreviewPush.h +5 -5
- package/ios/Layouts/Stack/ANNPreviewPush.mm +85 -22
- package/lib/module/api/commands/commands.js +54 -6
- package/lib/module/api/commands/commands.js.map +1 -1
- package/lib/module/engine/places.js +8 -0
- package/lib/module/engine/places.js.map +1 -1
- package/lib/typescript/api/commands/commands.d.ts.map +1 -1
- package/lib/typescript/api/commands/presentation.d.ts +4 -3
- package/lib/typescript/api/commands/presentation.d.ts.map +1 -1
- package/lib/typescript/engine/places.d.ts +2 -0
- package/lib/typescript/engine/places.d.ts.map +1 -1
- package/lib/typescript/interfaces/Options.d.ts +1 -1
- package/lib/typescript/interfaces/Options.d.ts.map +1 -1
- package/lib/typescript/interfaces/options/animations.d.ts +18 -2
- package/lib/typescript/interfaces/options/animations.d.ts.map +1 -1
- package/lib/typescript/interfaces/options/stack.d.ts +9 -0
- package/lib/typescript/interfaces/options/stack.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/api/commands/commands.ts +48 -7
- package/src/api/commands/presentation.ts +4 -3
- package/src/engine/places.ts +9 -0
- package/src/interfaces/Options.ts +1 -0
- package/src/interfaces/options/animations.ts +19 -2
- package/src/interfaces/options/stack.ts +9 -0
- package/android/src/main/java/dev/apexnative/navigation/react/events/NavigationStateReporter.kt +0 -62
- package/android/src/main/java/dev/apexnative/navigation/react/events/StateHold.kt +0 -62
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"commands.d.ts","sourceRoot":"","sources":["../../../../src/api/commands/commands.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAc,KAAK,UAAU,EAAE,MAAM,oBAAiB,CAAC;AAG9D,OAAO,EAAsB,KAAK,kBAAkB,EAAE,MAAM,4BAAyB,CAAC;AAGtF,OAAO,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,mBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"commands.d.ts","sourceRoot":"","sources":["../../../../src/api/commands/commands.ts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pD;AAED,yFAAyF;AACzF,wBAAgB,SAAS,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAItE;AAED,qGAAqG;AACrG,wBAAgB,WAAW,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,EAAE,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,CAE/F;AAED,0GAA0G;AAC1G,wBAAgB,UAAU,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,kBAAkB,CAAC,MAAM,CAAC,GAAG,IAAI,CAKtF;AAyCD,mHAAmH;AACnH,wBAAgB,SAAS,CAAC,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI,CAK7E"}
|
|
@@ -35,12 +35,13 @@ export interface ModalConfig {
|
|
|
35
35
|
stack?: boolean;
|
|
36
36
|
/**
|
|
37
37
|
* A close button at the leading edge of the modal's first screen, which dismisses the modal: the system one on iOS,
|
|
38
|
-
* an icon on Android. Its id and testID are `CloseButton`. Needs the stack.
|
|
38
|
+
* an icon on Android. Its id and testID are `CloseButton`. Needs the stack. A new first screen of that stack, from
|
|
39
|
+
* `setStack` or `replace`, gets it too.
|
|
39
40
|
*/
|
|
40
41
|
closeButton?: boolean;
|
|
41
42
|
/**
|
|
42
|
-
* Called once the modal is gone, whatever dismissed it: a command, a swipe, a new root. `setStack`
|
|
43
|
-
* modal
|
|
43
|
+
* Called once the modal is gone, whatever dismissed it: a command, a swipe, a new root. `setStack` and `replace`
|
|
44
|
+
* inside the modal replace its first screen, and call it too.
|
|
44
45
|
*/
|
|
45
46
|
onDismiss?: () => void;
|
|
46
47
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"presentation.d.ts","sourceRoot":"","sources":["../../../../src/api/commands/presentation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,EACZ,mBAAmB,EACnB,6BAA6B,EAC7B,iBAAiB,EAClB,MAAM,6BAA0B,CAAC;AAClC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,4BAAyB,CAAC;AAClE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAe,CAAC;AAEhD,iCAAiC;AACjC,MAAM,WAAW,UAAU;IACzB;;;OAGG;IACH,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,yEAAyE;IACzE,OAAO,CAAC,EAAE,kBAAkB,CAAC,MAAM,CAAC,CAAC;CACtC;AAED,yCAAyC;AACzC,MAAM,WAAW,YAAY;IAC3B;;;OAGG;IACH,MAAM,CAAC,EAAE,WAAW,GAAG,eAAe,CAAC;IACvC,yEAAyE;IACzE,OAAO,CAAC,EAAE,kBAAkB,CAAC,MAAM,CAAC,CAAC;CACtC;AAED,sCAAsC;AACtC,MAAM,WAAW,WAAW;IAC1B,2CAA2C;IAC3C,KAAK,CAAC,EAAE,GAAG,6BAA6B,EAAE,CAAC;IAC3C,qHAAqH;IACrH,KAAK,CAAC,EAAE,iBAAiB,CAAC;IAC1B,4GAA4G;IAC5G,OAAO,CAAC,EAAE,mBAAmB,CAAC;IAC9B,oDAAoD;IACpD,WAAW,CAAC,EAAE,YAAY,CAAC,aAAa,CAAC,CAAC;IAC1C,iFAAiF;IACjF,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB
|
|
1
|
+
{"version":3,"file":"presentation.d.ts","sourceRoot":"","sources":["../../../../src/api/commands/presentation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,YAAY,EACZ,mBAAmB,EACnB,6BAA6B,EAC7B,iBAAiB,EAClB,MAAM,6BAA0B,CAAC;AAClC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,4BAAyB,CAAC;AAClE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAe,CAAC;AAEhD,iCAAiC;AACjC,MAAM,WAAW,UAAU;IACzB;;;OAGG;IACH,UAAU,CAAC,E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32
32
|
column: string;
|
|
33
33
|
}
|
|
34
34
|
export declare function placeOf(screenId: string): ScreenPlace | undefined;
|
|
35
|
+
/** The first screen of a stack, as the engine noted it; with a pair first, its primary. */
|
|
36
|
+
export declare function firstScreenOf(stack: string): string | undefined;
|
|
35
37
|
/** Notes that a screen is the primary of a pair shown alone, where the native side shows no pairs. */
|
|
36
38
|
export declare function noteAlone(screenId: string): void;
|
|
37
39
|
/** The screen was shown and is gone. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"places.d.ts","sourceRoot":"","sources":["../../../src/engine/places.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAU,CAAC;AAS3C,yBAAyB;AACzB,MAAM,WAAW,WAAW;IAC1B,6CAA6C;IAC7C,IAAI,EAAE,MAAM,CAAC;IACb,6FAA6F;IAC7F,SAAS,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;IACxC,iDAAiD;IACjD,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,0EAA0E;IAC1E,KAAK,EAAE,MAAM,CAAC;IACd,wEAAwE;IACxE,IAAI,CAAC,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAA;KAAE,CAAC;IACzD;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;IACd,wGAAwG;IACxG,WAAW,CAAC,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,SAAS,GAAG,WAAW,CAAC;QAAC,KAAK,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC;CACnF;AAQD,2EAA2E;AAC3E,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAsBD,wBAAgB,OAAO,CAAC,QAAQ,EAAE,MAAM,GAAG,WAAW,GAAG,SAAS,CAEjE;AAED,sGAAsG;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IAAI,CAmEN;AAyCD,kHAAkH;AAClH,wBAAgB,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,WAAW,GAAG,SAAS,CAIlE;AAED,+EAA+E;AAC/E,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAE/E;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAYtD;AAED,oGAAoG;AACpG,wBAAgB,kBAAkB,IAAI,IAAI,CAUzC;AAED,0BAA0B;AAC1B,wBAAgB,WAAW,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAMlD"}
|
|
@@ -79,7 +79,7 @@ export interface WindowOptions {
|
|
|
79
79
|
backgroundColor?: Color;
|
|
80
80
|
}
|
|
81
81
|
export type { AnimationOptions } from './options/animations.js';
|
|
82
|
-
export type { AppearingElementAnimation, DisappearingElementAnimation, ElementAnimation, ElementTransition, EnterExitAnimationOptions, Interpolation, ModalAnimationOptions, OptionsAnimationPropertyConfig, ScreenAnimationOptions, SharedElementTransition, StackAnimationOptions, StackPushAnimationOptions, TopBarAnimationOptions, ViewAnimationOptions, ZoomTransitionOptions, } from './options/animations.js';
|
|
82
|
+
export type { AppearingElementAnimation, DisappearingElementAnimation, ElementAnimation, ElementTransition, EnterExitAnimationOptions, Interpolation, ModalAnimationOptions, OptionsAnimationPropertyConfig, ScreenAnimationOptions, SharedElementTransition, StackAnimationOptions, StackPopAnimationOptions, StackPushAnimationOptions, TopBarAnimationOptions, ViewAnimationOptions, ZoomTransitionOptions, } from './options/animations.js';
|
|
83
83
|
export type { BottomTabsCustomRowOptions, DotIndicatorOptions, OptionsBottomTab, OptionsBottomTabs, OptionsBottomTabsAccessory, ShadowOptions, } from './options/bottomTabs.js';
|
|
84
84
|
export type { IconBackgroundOptions, IconInsets, OptionsTopBarButton, OptionsTopBarButtonMenu, OptionsTopBarButtonMenuElement, OptionsTopBarButtonMenuItem, OptionsTopBarButtonSubmenu, SystemItemIcon, } from './options/buttons.js';
|
|
85
85
|
export type { Color, ImageResource, PlatformIcon } from './options/common.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Options.d.ts","sourceRoot":"","sources":["../../../src/interfaces/Options.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAsB,CAAC;AAC7D,OAAO,KAAK,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,yBAAsB,CAAC;AAChF,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,qBAAkB,CAAC;AAC9C,OAAO,KAAK,EACV,YAAY,EACZ,6BAA6B,EAC7B,2BAA2B,EAC3B,cAAc,EACf,MAAM,qBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAmB,CAAC;AACxD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAoB,CAAC;AAC1D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,wBAAqB,CAAC;AAC5D,OAAO,KAAK,EAAE,yBAAyB,EAAE,UAAU,EAAE,MAAM,oBAAiB,CAAC;AAC7E,OAAO,KAAK,EACV,oBAAoB,EACpB,iBAAiB,EACjB,aAAa,EACb,gBAAgB,EACjB,MAAM,qBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAmB,CAAC;AACxD,OAAO,KAAK,EAAE,uBAAuB,EAAE,aAAa,EAAE,MAAM,qBAAkB,CAAC;AAE/E;;;;GAIG;AACH,MAAM,WAAW,OAAO;IACtB,mGAAmG;IACnG,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB,8DAA8D;IAC9D,OAAO,CAAC,EAAE,cAAc,CAAC;IACzB,6EAA6E;IAC7E,gBAAgB,CAAC,EAAE,uBAAuB,CAAC;IAC3C,wEAAwE;IACxE,UAAU,CAAC,EAAE,iBAAiB,CAAC;IAC/B,mG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ACV,0BAA0B,EAC1B,mBAAmB,EACnB,gBAAgB,EAChB,iBAAiB,EACjB,0BAA0B,EAC1B,aAAa,GACd,MAAM,yBAAsB,CAAC;AAC9B,YAAY,EACV,qBAAqB,EACrB,UAAU,EACV,mBAAmB,EACnB,uBAAuB,EACvB,8BAA8B,EAC9B,2BAA2B,EAC3B,0BAA0B,EAC1B,cAAc,GACf,MAAM,sBAAmB,CAAC;AAC3B,YAAY,EAAE,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,qBAAkB,CAAC;AAC3E,YAAY,EACV,YAAY,EACZ,mBAAmB,EACnB,6BAA6B,EAC7B,iBAAiB,EACjB,uBAAuB,EACvB,2BAA2B,EAC3B,cAAc,GACf,MAAM,qBAAkB,CAAC;AAC1B,YAAY,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,uBAAoB,CAAC;AACxE,YAAY,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,MAAM,wBAAqB,CAAC;AACpF,YAAY,EAAE,yBAAyB,EAAE,UAAU,EAAE,MAAM,oBAAiB,CAAC;AAC7E,YAAY,EACV,iBAAiB,EACjB,oBAAoB,EACpB,iBAAiB,EACjB,aAAa,EACb,gBAAgB,EAChB,YAAY,GACb,MAAM,qBAAkB,CAAC;AAC1B,YAAY,EACV,cAAc,EACd,yBAAyB,EACzB,mBAAmB,GACpB,MAAM,sBAAmB,CAAC;AAC3B,YAAY,EACV,iBAAiB,EACjB,uBAAuB,EACvB,gBAAgB,EAChB,qBAAqB,EACrB,0BAA0B,EAC1B,qBAAqB,EACrB,aAAa,EACb,uBAAuB,EACvB,uBAAuB,EACvB,uBAAuB,EACvB,iCAAiC,EACjC,2CAA2C,EAC3C,sCAAsC,EACtC,qBAAqB,EACrB,kBAAkB,GACnB,MAAM,qBAAkB,CAAC"}
|
|
@@ -378,6 +378,19 @@ export interface StackPushAnimationOptions extends StackAnimationOptions {
|
|
|
378
378
|
/** (iOS 18+) The zoom of the new screen out of a view of the screen it is pushed from; the pop zooms back. */
|
|
379
379
|
zoom?: ZoomTransitionOptions;
|
|
380
380
|
}
|
|
381
|
+
/**
|
|
382
|
+
* The animation of a pop, read from the screen that goes. As {@link StackAnimationOptions}, with the preview of the
|
|
383
|
+
* back gesture on Android.
|
|
384
|
+
*/
|
|
385
|
+
export interface StackPopAnimationOptions extends StackAnimationOptions {
|
|
386
|
+
/**
|
|
387
|
+
* (Android 14+) Whether the back gesture on a pushed screen previews its pop as the user swipes: the screen shrinks
|
|
388
|
+
* and follows the finger, the screen under it shows behind. `false` pops the screen when the gesture is released,
|
|
389
|
+
* as on Android 13 and older; back still pops it. iOS ignores it: its swipe back is UIKit's.
|
|
390
|
+
* @default true
|
|
391
|
+
*/
|
|
392
|
+
preview?: boolean;
|
|
393
|
+
}
|
|
381
394
|
/**
|
|
382
395
|
* The animation of `setStackRoot`, read from the new top screen. As {@link StackAnimationOptions}: without an animation
|
|
383
396
|
* of its own, iOS plays the push animation of the new top screen or UIKit's transition, and Android plays a fade
|
|
@@ -439,8 +452,11 @@ export interface ModalAnimationOptions extends EnterExitAnimationOptions {
|
|
|
439
452
|
export interface AnimationOptions {
|
|
440
453
|
/** The push of a screen, read from the screen that comes. */
|
|
441
454
|
push?: StackPushAnimationOptions;
|
|
442
|
-
/**
|
|
443
|
-
|
|
455
|
+
/**
|
|
456
|
+
* The pop of a screen, also `popTo` and `popToRoot`, read from the screen that goes. The swipe back of iOS is
|
|
457
|
+
* UIKit's; the back gesture of Android previews the pop (`preview`).
|
|
458
|
+
*/
|
|
459
|
+
pop?: StackPopAnimationOptions;
|
|
444
460
|
/** The replacing of the screens of a stack, read from the new top screen. */
|
|
445
461
|
setStackRoot?: SetStackRootAnimationOptions;
|
|
446
462
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"animations.d.ts","sourceRoot":"","sources":["../../../../src/interfaces/options/animations.ts"],"names":[],"mappings":"AAIA;;;;GAIG;AACH,MAAM,MAAM,aAAa,GACrB;IACE,sB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ACH,IAAI,CAAC,EAAE,qBAAqB,CAAC;CAC9B;AAED;;;;;;;;;;;;;;;GAeG;AACH,MAAM,WAAW,gBAAgB;IAC/B,6DAA6D;IAC7D,IAAI,CAAC,EAAE,yBAAyB,CAAC;IACjC
|
|
1
|
+
{"version":3,"file":"animations.d.ts","sourceRoot":"","sources":["../../../../src/interfaces/options/animations.ts"],"names":[],"mappings":"AAIA;;;;GAIG;AACH,MAAM,MAAM,aAAa,GACrB;IACE,sBAAsB;IACtB,IAAI,EAAE,QAAQ,CAAC;CAChB,GACD;IACE,mCAAmC;IACnC,IAAI,EAAE,YAAY,CAAC;IACnB;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,GACD;IACE,kDAAkD;IAClD,IAAI,EAAE,YAAY,CAAC;IACnB;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,GACD;IACE,gDAAgD;IAChD,IAAI,EAAE,sBAAsB,CAAC;CAC9B,GACD;IACE,gDAAgD;IAChD,IAAI,EAAE,sBAAsB,CAAC;CAC9B,GACD;IACE,qFAAqF;IACrF,IAAI,EAAE,eAAe,CAAC;CACvB,GACD;IACE,oDAAoD;IACpD,IAAI,EAAE,WAAW,CAAC;IAClB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,GACD;IACE;;;;;OAKG;IACH,IAAI,EAAE,QAAQ,CAAC;IACf;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;OAIG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B,CAAC;AAEN;;;;;GAKG;AACH,MAAM,WAAW,8BAA8B;IAC7C;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;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AM,WAAW,wBAAyB,SAAQ,qBAAqB;IACrE;;;;;OAKG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;;;;GAKG;AACH,MAAM,WAAW,4BAA6B,SAAQ,qBAAqB;IACzE;;;;OAIG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED;;;;;;;;;;;;;GAaG;AACH,MAAM,WAAW,qBAAsB,SAAQ,yBAAyB;IACtE;;;OAGG;IACH,wBAAwB,CAAC,EAAE,uBAAuB,EAAE,CAAC;IACrD,kGAAkG;IAClG,kBAAkB,CAAC,EAAE,iBAAiB,EAAE,CAAC;IACzC;;;OAGG;IACH,IAAI,CAAC,EAAE,qBAAqB,CAAC;CAC9B;AAED;;;;;;;;;;;;;;;GAeG;AACH,MAAM,WAAW,gBAAgB;IAC/B,6DAA6D;IAC7D,IAAI,CAAC,EAAE,yBAAyB,CAAC;IACjC;;;OAGG;IACH,GAAG,CAAC,EAAE,wBAAwB,CAAC;IAC/B,6EAA6E;IAC7E,YAAY,CAAC,EAAE,4BAA4B,CAAC;IAC5C;;;OAGG;IACH,OAAO,CAAC,EAAE,yBAAyB,CAAC;IACpC;;;;OAIG;IACH,SAAS,CAAC,EAAE,qBAAqB,CAAC;IAClC;;;;OAIG;IACH,YAAY,CAAC,EAAE,qBAAqB,CAAC;CACtC"}
|
|
@@ -25,6 +25,15 @@ export interface HardwareBackButtonOptions {
|
|
|
25
25
|
* @internal
|
|
26
26
|
*/
|
|
27
27
|
dismissModalOnPress?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* (Android) Whether back on the first screen of the app, with nothing left to go back to, plays the system's
|
|
30
|
+
* animation of going home. The system decides it as the gesture starts, so with `false` the navigation keeps the
|
|
31
|
+
* back on that screen too: the gesture shows no animation, and on release the press goes to `BackHandler` listeners,
|
|
32
|
+
* then to the activity's own back (`invokeDefaultOnBackPressed` of the app's activity, such as `moveTaskToBack`).
|
|
33
|
+
* Read from the screen back acts on; set it in the default options for the whole app. iOS ignores it.
|
|
34
|
+
* @default true
|
|
35
|
+
*/
|
|
36
|
+
systemAnimation?: boolean;
|
|
28
37
|
}
|
|
29
38
|
/**
|
|
30
39
|
* (Android) A floating action button over the screen, or an entry of its menu. The button shows while its screen is
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stack.d.ts","sourceRoot":"","sources":["../../../../src/interfaces/options/stack.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,aAAU,CAAC;AAErD;;;GAGG;AACH,MAAM,WAAW,yBAAyB;IACxC;;;;;;;OAOG;IACH,iBAAiB,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,UAAU,CAAC;IAClD;;;;OAIG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"stack.d.ts","sourceRoot":"","sources":["../../../../src/interfaces/options/stack.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,aAAU,CAAC;AAErD;;;GAGG;AACH,MAAM,WAAW,yBAAyB;IACxC;;;;;;;OAOG;IACH,iBAAiB,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,UAAU,CAAC;IAClD;;;;OAIG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B;;;;;;;OAOG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED;;;;GAIG;AACH,MAAM,WAAW,UAAU;IACzB;;;;OAIG;IACH,EAAE,EAAE,MAAM,CAAC;IACX;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;;;OAKG;IACH,eAAe,CAAC,EAAE,KAAK,CAAC;IACxB;;;OAGG;IACH,UAAU,CAAC,EAAE,KAAK,CAAC;IACnB,kHAAkH;IAClH,WAAW,CAAC,EAAE,KAAK,CAAC;IACpB;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;OAIG;IACH,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB;;;OAGG;IACH,SAAS,CAAC,EAAE,KAAK,CAAC;IAClB;;;;OAIG;IACH,iBAAiB,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IACrC;;;;OAIG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,UAAU,EAAE,CAAC;IACvB;;;;OAIG;IACH,UAAU,CAAC,EAAE,KAAK,CAAC;CACpB"}
|
package/package.json
CHANGED
|
@@ -19,7 +19,7 @@ import { stackChild, type StackEntry } from '../layout/Stack';
|
|
|
19
19
|
import { badgeText } from '../layout/Tabs';
|
|
20
20
|
import { mergeOptions } from '../../engine/mergeOptions';
|
|
21
21
|
import { buildScreenOptions, type ScreenOptionsInput } from '../screens/defineScreen';
|
|
22
|
-
import { coversColumn, placeOf } from '../../engine/places';
|
|
22
|
+
import { coversColumn, firstScreenOf, placeOf, type ScreenPlace } from '../../engine/places';
|
|
23
23
|
import { command, placeFor } from './errors';
|
|
24
24
|
import type { ColumnConfig, ModalConfig, OverlayConfig, PushConfig } from './presentation';
|
|
25
25
|
import { defined, modalAnimations, pushAnimations } from './transitions';
|
|
@@ -30,6 +30,10 @@ const CLOSE_BUTTON = 'CloseButton';
|
|
|
30
30
|
// The modals shown by `showModal`, for the ids of their first screens.
|
|
31
31
|
let modals = 0;
|
|
32
32
|
|
|
33
|
+
// The stacks of the modals shown with a close button, by id: `setStack` and `replace` there give it to the new first
|
|
34
|
+
// screen. A stack's id is its modal's layer.
|
|
35
|
+
const closeButtonStacks = new Set<string>();
|
|
36
|
+
|
|
33
37
|
// The settings of a command with the props of the screen it shows.
|
|
34
38
|
type WithProps<Config> = Config & { props?: object };
|
|
35
39
|
|
|
@@ -115,7 +119,19 @@ export function popToRoot(fromId: string): Promise<string> {
|
|
|
115
119
|
export function setStack(fromId: string, entries: StackEntry[]): Promise<string> {
|
|
116
120
|
return command('setStack', () => {
|
|
117
121
|
placeFor('setStack', fromId, { stack: true });
|
|
118
|
-
|
|
122
|
+
const children = entries.map(stackChild);
|
|
123
|
+
const first = children[0]?.component;
|
|
124
|
+
if (!first || !hasCloseButton(placeOf(fromId))) {
|
|
125
|
+
return withSlots(() => engine.setStackRoot(fromId, children));
|
|
126
|
+
}
|
|
127
|
+
return afterLoading([first.name], () => {
|
|
128
|
+
// The screen's own buttons stay after the close button: the options of the layout replace them.
|
|
129
|
+
const id = first.id ?? nextId('Component');
|
|
130
|
+
const own = screenOptions(first.name, first.passProps ?? {});
|
|
131
|
+
const options = withCloseButton(mergeOptions(own, first.options ?? {}), id);
|
|
132
|
+
const withButton = { component: { ...first, id, options } };
|
|
133
|
+
return withSlots(() => engine.setStackRoot(fromId, [withButton, ...children.slice(1)]));
|
|
134
|
+
});
|
|
119
135
|
});
|
|
120
136
|
}
|
|
121
137
|
|
|
@@ -133,11 +149,12 @@ export function replace(
|
|
|
133
149
|
return afterLoading([name], () => {
|
|
134
150
|
const { props } = config;
|
|
135
151
|
const base = getActiveApp()?.presentation?.push;
|
|
136
|
-
const
|
|
152
|
+
const id = nextId('Component');
|
|
153
|
+
let options = showOptions(name, props, AS_PUSH, base?.options, config.options, {
|
|
137
154
|
app: pushAnimations(base?.transition),
|
|
138
155
|
call: pushAnimations(config.transition),
|
|
139
156
|
});
|
|
140
|
-
|
|
157
|
+
if (hasCloseButton(placeOf(fromId))) options = withCloseButton(options, id);
|
|
141
158
|
return withSlots(() =>
|
|
142
159
|
engine.setStackRoot(fromId, [screenLayout(name, props, options, id)])
|
|
143
160
|
).then(() => id);
|
|
@@ -192,16 +209,25 @@ function showModalNow(name: string, config: WithProps<ModalConfig>): Promise<str
|
|
|
192
209
|
app: modalAnimations(base.transition),
|
|
193
210
|
call: modalAnimations(call.transition),
|
|
194
211
|
});
|
|
195
|
-
|
|
212
|
+
// The stack gets its id here, so that the commands in it later know the modal had a close button.
|
|
213
|
+
const stackId = nextId('Stack');
|
|
214
|
+
const closeButton = settings.closeButton && settings.stack !== false;
|
|
215
|
+
if (closeButton) {
|
|
196
216
|
options = withCloseButton(options, screenId);
|
|
217
|
+
closeButtonStacks.add(stackId);
|
|
218
|
+
forgetWithStack(stackId, screenId);
|
|
219
|
+
}
|
|
197
220
|
if (call.onDismiss) whenScreenUnmounts(screenId, call.onDismiss);
|
|
198
221
|
const screen = screenLayout(name, props, options, screenId);
|
|
199
222
|
const presentation = presentationOptions(settings);
|
|
200
223
|
const layout: Layout =
|
|
201
224
|
settings.stack === false
|
|
202
225
|
? mergeLayoutOptions(screen, presentation)
|
|
203
|
-
: { stack: { children: [screen], options: presentation } };
|
|
204
|
-
|
|
226
|
+
: { stack: { id: stackId, children: [screen], options: presentation } };
|
|
227
|
+
const shown = withSlots(() => engine.showModal(layout));
|
|
228
|
+
// A modal that never showed has no stack to remember.
|
|
229
|
+
if (closeButton) shown.catch(() => closeButtonStacks.delete(stackId));
|
|
230
|
+
return shown;
|
|
205
231
|
}
|
|
206
232
|
|
|
207
233
|
export function dismissModal(modalId: string): Promise<string> {
|
|
@@ -340,6 +366,21 @@ export function holdLeave(screenId: string, onAttempt: () => void): () => void {
|
|
|
340
366
|
};
|
|
341
367
|
}
|
|
342
368
|
|
|
369
|
+
// Whether a screen is in the stack of a modal shown with a close button: the modal's own stack, not one in it.
|
|
370
|
+
function hasCloseButton(place: ScreenPlace | undefined): boolean {
|
|
371
|
+
return place?.stack != null && place.stack === place.layer && closeButtonStacks.has(place.stack);
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
// The stack of a modal is gone with its last first screen: one that unmounts with no other first screen noted after
|
|
375
|
+
// it (`setStack`, `replace` note theirs before the old one goes).
|
|
376
|
+
function forgetWithStack(stackId: string, screenId: string): void {
|
|
377
|
+
whenScreenUnmounts(screenId, () => {
|
|
378
|
+
const next = firstScreenOf(stackId);
|
|
379
|
+
if (next) forgetWithStack(stackId, next);
|
|
380
|
+
else closeButtonStacks.delete(stackId);
|
|
381
|
+
});
|
|
382
|
+
}
|
|
383
|
+
|
|
343
384
|
/** The options with a close button first at the leading edge, which dismisses the modal of the screen. */
|
|
344
385
|
function withCloseButton(options: Options, screenId: string): Options {
|
|
345
386
|
const close: NavigationButton = {
|
|
@@ -43,12 +43,13 @@ export interface ModalConfig {
|
|
|
43
43
|
stack?: boolean;
|
|
44
44
|
/**
|
|
45
45
|
* A close button at the leading edge of the modal's first screen, which dismisses the modal: the system one on iOS,
|
|
46
|
-
* an icon on Android. Its id and testID are `CloseButton`. Needs the stack.
|
|
46
|
+
* an icon on Android. Its id and testID are `CloseButton`. Needs the stack. A new first screen of that stack, from
|
|
47
|
+
* `setStack` or `replace`, gets it too.
|
|
47
48
|
*/
|
|
48
49
|
closeButton?: boolean;
|
|
49
50
|
/**
|
|
50
|
-
* Called once the modal is gone, whatever dismissed it: a command, a swipe, a new root. `setStack`
|
|
51
|
-
* modal
|
|
51
|
+
* Called once the modal is gone, whatever dismissed it: a command, a swipe, a new root. `setStack` and `replace`
|
|
52
|
+
* inside the modal replace its first screen, and call it too.
|
|
52
53
|
*/
|
|
53
54
|
onDismiss?: () => void;
|
|
54
55
|
/**
|
package/src/engine/places.ts
CHANGED
|
@@ -65,6 +65,15 @@ export function placeOf(screenId: string): ScreenPlace | undefined {
|
|
|
65
65
|
return places.get(screenId);
|
|
66
66
|
}
|
|
67
67
|
|
|
68
|
+
/** The first screen of a stack, as the engine noted it; with a pair first, its primary. */
|
|
69
|
+
export function firstScreenOf(stack: string): string | undefined {
|
|
70
|
+
for (const [id, place] of places) {
|
|
71
|
+
if (place.stack === stack && place.index === 0 && place.arrangement?.placement !== 'secondary')
|
|
72
|
+
return id;
|
|
73
|
+
}
|
|
74
|
+
return undefined;
|
|
75
|
+
}
|
|
76
|
+
|
|
68
77
|
/** Notes that a screen is the primary of a pair shown alone, where the native side shows no pairs. */
|
|
69
78
|
export function noteAlone(screenId: string): void {
|
|
70
79
|
alone.add(screenId);
|
|
@@ -405,6 +405,20 @@ export interface StackPushAnimationOptions extends StackAnimationOptions {
|
|
|
405
405
|
zoom?: ZoomTransitionOptions;
|
|
406
406
|
}
|
|
407
407
|
|
|
408
|
+
/**
|
|
409
|
+
* The animation of a pop, read from the screen that goes. As {@link StackAnimationOptions}, with the preview of the
|
|
410
|
+
* back gesture on Android.
|
|
411
|
+
*/
|
|
412
|
+
export interface StackPopAnimationOptions extends StackAnimationOptions {
|
|
413
|
+
/**
|
|
414
|
+
* (Android 14+) Whether the back gesture on a pushed screen previews its pop as the user swipes: the screen shrinks
|
|
415
|
+
* and follows the finger, the screen under it shows behind. `false` pops the screen when the gesture is released,
|
|
416
|
+
* as on Android 13 and older; back still pops it. iOS ignores it: its swipe back is UIKit's.
|
|
417
|
+
* @default true
|
|
418
|
+
*/
|
|
419
|
+
preview?: boolean;
|
|
420
|
+
}
|
|
421
|
+
|
|
408
422
|
/**
|
|
409
423
|
* The animation of `setStackRoot`, read from the new top screen. As {@link StackAnimationOptions}: without an animation
|
|
410
424
|
* of its own, iOS plays the push animation of the new top screen or UIKit's transition, and Android plays a fade
|
|
@@ -468,8 +482,11 @@ export interface ModalAnimationOptions extends EnterExitAnimationOptions {
|
|
|
468
482
|
export interface AnimationOptions {
|
|
469
483
|
/** The push of a screen, read from the screen that comes. */
|
|
470
484
|
push?: StackPushAnimationOptions;
|
|
471
|
-
/**
|
|
472
|
-
|
|
485
|
+
/**
|
|
486
|
+
* The pop of a screen, also `popTo` and `popToRoot`, read from the screen that goes. The swipe back of iOS is
|
|
487
|
+
* UIKit's; the back gesture of Android previews the pop (`preview`).
|
|
488
|
+
*/
|
|
489
|
+
pop?: StackPopAnimationOptions;
|
|
473
490
|
/** The replacing of the screens of a stack, read from the new top screen. */
|
|
474
491
|
setStackRoot?: SetStackRootAnimationOptions;
|
|
475
492
|
/**
|
|
@@ -26,6 +26,15 @@ export interface HardwareBackButtonOptions {
|
|
|
26
26
|
* @internal
|
|
27
27
|
*/
|
|
28
28
|
dismissModalOnPress?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* (Android) Whether back on the first screen of the app, with nothing left to go back to, plays the system's
|
|
31
|
+
* animation of going home. The system decides it as the gesture starts, so with `false` the navigation keeps the
|
|
32
|
+
* back on that screen too: the gesture shows no animation, and on release the press goes to `BackHandler` listeners,
|
|
33
|
+
* then to the activity's own back (`invokeDefaultOnBackPressed` of the app's activity, such as `moveTaskToBack`).
|
|
34
|
+
* Read from the screen back acts on; set it in the default options for the whole app. iOS ignores it.
|
|
35
|
+
* @default true
|
|
36
|
+
*/
|
|
37
|
+
systemAnimation?: boolean;
|
|
29
38
|
}
|
|
30
39
|
|
|
31
40
|
/**
|
package/android/src/main/java/dev/apexnative/navigation/react/events/NavigationStateReporter.kt
DELETED
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
package dev.apexnative.navigation.react.events
|
|
2
|
-
|
|
3
|
-
import android.os.Handler
|
|
4
|
-
import android.os.Looper
|
|
5
|
-
import dev.apexnative.navigation.viewcontrollers.bottomtabs.BottomTabsController
|
|
6
|
-
import dev.apexnative.navigation.viewcontrollers.navigator.Navigators
|
|
7
|
-
import dev.apexnative.navigation.viewcontrollers.parent.ParentController
|
|
8
|
-
import dev.apexnative.navigation.viewcontrollers.viewcontroller.ViewController
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* Tells JavaScript the screen the user sees and the selected tab when they change. Every change of the screen the
|
|
12
|
-
* user sees comes with a screen appearing: a push, a pop, a modal, a tab, a menu. One update after the events of a
|
|
13
|
-
* pass of the main loop, and one at once before a command resolves its promise; each sent only when the state changed.
|
|
14
|
-
*/
|
|
15
|
-
object NavigationStateReporter {
|
|
16
|
-
internal data class State(val screenId: String?, val screenName: String?, val tab: Int?)
|
|
17
|
-
|
|
18
|
-
private val handler = Handler(Looper.getMainLooper())
|
|
19
|
-
private var state: State? = null
|
|
20
|
-
private var scheduled = false
|
|
21
|
-
|
|
22
|
-
/** The new JavaScript has no state yet: the next one goes to it whatever it is. */
|
|
23
|
-
fun reset() {
|
|
24
|
-
state = null
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
fun setNeedsUpdate(emitter: EventEmitter) {
|
|
28
|
-
if (scheduled) return
|
|
29
|
-
scheduled = true
|
|
30
|
-
handler.post {
|
|
31
|
-
scheduled = false
|
|
32
|
-
updateNow(emitter)
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* Sends the state at once when it differs from the last one sent. A command calls it right before it resolves its
|
|
38
|
-
* promise: the event and the resolution reach JavaScript in that order, so the state is new when the `await` of
|
|
39
|
-
* the command goes on. The update already scheduled then finds nothing new. Main thread only.
|
|
40
|
-
*/
|
|
41
|
-
fun updateNow(emitter: EventEmitter) {
|
|
42
|
-
// The navigation of the activity the commands run in (`Navigators.current`).
|
|
43
|
-
val navigator = Navigators.current()?.navigator ?: return
|
|
44
|
-
val next = stateOf(navigator.visibleLayout)
|
|
45
|
-
if (next == state) return
|
|
46
|
-
state = next
|
|
47
|
-
emitter.emitNavigationStateChanged(next.screenId, next.screenName, next.tab)
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
// The top modal, or the root ([layout]), down to the screen the user sees; overlays don't count. The tab is the
|
|
51
|
-
// selected one of the nearest tabs the screen is in, the last met on the way down, in a modal too: the tabs
|
|
52
|
-
// `selectTab` acts on from it. None for a screen out of tabs.
|
|
53
|
-
internal fun stateOf(layout: ViewController<*>?): State {
|
|
54
|
-
var tab: Int? = null
|
|
55
|
-
var current = layout ?: return State(null, null, null)
|
|
56
|
-
while (current is ParentController<*>) {
|
|
57
|
-
if (current is BottomTabsController) tab = current.selectedIndex
|
|
58
|
-
current = current.currentChild ?: return State(null, null, null)
|
|
59
|
-
}
|
|
60
|
-
return State(current.id, current.currentComponentName, tab)
|
|
61
|
-
}
|
|
62
|
-
}
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
package dev.apexnative.navigation.react.events
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* The navigation state's posted update and its hold. [setNeedsUpdate] posts one update ([post]), coalesced: the asks of
|
|
5
|
-
* one pass of the main loop make one, which runs [update] in a later pass. While a `setRoot` shows the modals and the
|
|
6
|
-
* overlays of its layout the updates are held: an ask, or a posted update that runs while held (asked before the hold
|
|
7
|
-
* was taken), only marks one as wanted, and the last release posts it. Released right before the answer, that update
|
|
8
|
-
* finds nothing new: the state before the answer is sent at once, never held, and an identical state is never sent
|
|
9
|
-
* twice. Every [hold] has one [release]; a release without a hold does nothing, so the count never goes below zero. An
|
|
10
|
-
* update keeps the JavaScript it was asked for ([generation]): one asked by a JavaScript that went before it runs is
|
|
11
|
-
* dropped; a newer ask of the new JavaScript still goes. Main thread only.
|
|
12
|
-
*/
|
|
13
|
-
internal class StateHold(
|
|
14
|
-
private val post: (() -> Unit) -> Unit,
|
|
15
|
-
private val generation: () -> Int = { 0 },
|
|
16
|
-
private val update: () -> Unit,
|
|
17
|
-
) {
|
|
18
|
-
/** The holds not released yet. */
|
|
19
|
-
var count = 0
|
|
20
|
-
private set
|
|
21
|
-
|
|
22
|
-
// An update was asked while held.
|
|
23
|
-
private var wanted = false
|
|
24
|
-
// An update is posted and hasn't run yet.
|
|
25
|
-
private var scheduled = false
|
|
26
|
-
// The JavaScript the last ask was for.
|
|
27
|
-
private var askedIn = 0
|
|
28
|
-
|
|
29
|
-
/** Asks for one update in a later pass of the main loop; while held, once the last hold is released. */
|
|
30
|
-
fun setNeedsUpdate() {
|
|
31
|
-
askedIn = generation()
|
|
32
|
-
if (count > 0) wanted = true else schedule()
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
/** The updates asked from now on, and those posted that run from now on, wait for as many [release]s. */
|
|
36
|
-
fun hold() {
|
|
37
|
-
count++
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
/** One hold ends; with the last, the update asked while held is posted now. */
|
|
41
|
-
fun release() {
|
|
42
|
-
if (count == 0) return
|
|
43
|
-
count--
|
|
44
|
-
if (count > 0 || !wanted) return
|
|
45
|
-
wanted = false
|
|
46
|
-
schedule()
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
private fun schedule() {
|
|
50
|
-
if (scheduled) return
|
|
51
|
-
scheduled = true
|
|
52
|
-
post {
|
|
53
|
-
scheduled = false
|
|
54
|
-
// A hold taken since it was posted: the update waits for the release. The JavaScript it was asked for
|
|
55
|
-
// went: nothing goes to the new one, which hears its first state after its own changes.
|
|
56
|
-
when {
|
|
57
|
-
count > 0 -> wanted = true
|
|
58
|
-
askedIn == generation() -> update()
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
}
|