react-native-screen-transitions 3.2.0-beta.2 → 3.2.0
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/README.md +346 -620
- package/lib/commonjs/blank-stack/components/stack-view.js +0 -2
- package/lib/commonjs/blank-stack/components/stack-view.js.map +1 -1
- package/lib/commonjs/blank-stack/components/stack-view.native.js +0 -2
- package/lib/commonjs/blank-stack/components/stack-view.native.js.map +1 -1
- package/lib/commonjs/component-stack/components/stack-view.js +16 -20
- package/lib/commonjs/component-stack/components/stack-view.js.map +1 -1
- package/lib/commonjs/native-stack/views/NativeStackView.native.js +3 -3
- package/lib/commonjs/native-stack/views/NativeStackView.native.js.map +1 -1
- package/lib/commonjs/shared/components/overlay/variations/float-overlay.js +1 -6
- package/lib/commonjs/shared/components/overlay/variations/float-overlay.js.map +1 -1
- package/lib/commonjs/shared/components/overlay/variations/overlay-host.js +16 -64
- package/lib/commonjs/shared/components/overlay/variations/overlay-host.js.map +1 -1
- package/lib/commonjs/shared/components/overlay/variations/screen-overlay.js +5 -8
- package/lib/commonjs/shared/components/overlay/variations/screen-overlay.js.map +1 -1
- package/lib/commonjs/shared/components/screen-lifecycle.js +29 -0
- package/lib/commonjs/shared/components/screen-lifecycle.js.map +1 -0
- package/lib/commonjs/shared/constants.js +4 -2
- package/lib/commonjs/shared/constants.js.map +1 -1
- package/lib/commonjs/shared/hooks/animation/use-screen-animation.js +3 -0
- package/lib/commonjs/shared/hooks/animation/use-screen-animation.js.map +1 -1
- package/lib/commonjs/shared/hooks/gestures/use-build-gestures.js.map +1 -1
- package/lib/commonjs/shared/hooks/lifecycle/use-close-transition.js +127 -0
- package/lib/commonjs/shared/hooks/lifecycle/use-close-transition.js.map +1 -0
- package/lib/commonjs/shared/hooks/lifecycle/use-open-transition.js +35 -0
- package/lib/commonjs/shared/hooks/lifecycle/use-open-transition.js.map +1 -0
- package/lib/commonjs/shared/hooks/lifecycle/use-screen-events.js +58 -0
- package/lib/commonjs/shared/hooks/lifecycle/use-screen-events.js.map +1 -0
- package/lib/commonjs/shared/hooks/navigation/use-history.js +24 -0
- package/lib/commonjs/shared/hooks/navigation/use-history.js.map +1 -0
- package/lib/commonjs/shared/hooks/navigation/use-screen-state.js +45 -0
- package/lib/commonjs/shared/hooks/navigation/use-screen-state.js.map +1 -0
- package/lib/commonjs/shared/hooks/use-stable-callback-value.js +0 -2
- package/lib/commonjs/shared/hooks/use-stable-callback-value.js.map +1 -1
- package/lib/commonjs/shared/index.js +14 -0
- package/lib/commonjs/shared/index.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/keys.provider.js +0 -6
- package/lib/commonjs/shared/providers/screen/keys.provider.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/screen-composer.js +9 -7
- package/lib/commonjs/shared/providers/screen/screen-composer.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/styles.provider.js +1 -1
- package/lib/commonjs/shared/providers/screen/styles.provider.js.map +1 -1
- package/lib/commonjs/shared/providers/stack/direct.provider.js +9 -0
- package/lib/commonjs/shared/providers/stack/direct.provider.js.map +1 -1
- package/lib/commonjs/shared/providers/stack/managed.provider.js +9 -0
- package/lib/commonjs/shared/providers/stack/managed.provider.js.map +1 -1
- package/lib/commonjs/shared/stores/animation.store.js +3 -13
- package/lib/commonjs/shared/stores/animation.store.js.map +1 -1
- package/lib/commonjs/shared/stores/history.store.js +185 -0
- package/lib/commonjs/shared/stores/history.store.js.map +1 -0
- package/lib/commonjs/shared/types/index.js +3 -3
- package/lib/commonjs/shared/types/index.js.map +1 -1
- package/lib/commonjs/shared/types/stack.types.js +4 -0
- package/lib/commonjs/shared/types/stack.types.js.map +1 -1
- package/lib/commonjs/shared/utils/animation/start-screen-transition.js +10 -6
- package/lib/commonjs/shared/utils/animation/start-screen-transition.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/index.js +19 -4
- package/lib/commonjs/shared/utils/bounds/index.js.map +1 -1
- package/lib/module/blank-stack/components/stack-view.js +0 -2
- package/lib/module/blank-stack/components/stack-view.js.map +1 -1
- package/lib/module/blank-stack/components/stack-view.native.js +0 -2
- package/lib/module/blank-stack/components/stack-view.native.js.map +1 -1
- package/lib/module/component-stack/components/stack-view.js +16 -20
- package/lib/module/component-stack/components/stack-view.js.map +1 -1
- package/lib/module/native-stack/views/NativeStackView.native.js +3 -3
- package/lib/module/native-stack/views/NativeStackView.native.js.map +1 -1
- package/lib/module/shared/components/overlay/variations/float-overlay.js +1 -6
- package/lib/module/shared/components/overlay/variations/float-overlay.js.map +1 -1
- package/lib/module/shared/components/overlay/variations/overlay-host.js +16 -64
- package/lib/module/shared/components/overlay/variations/overlay-host.js.map +1 -1
- package/lib/module/shared/components/overlay/variations/screen-overlay.js +5 -8
- package/lib/module/shared/components/overlay/variations/screen-overlay.js.map +1 -1
- package/lib/module/shared/components/screen-lifecycle.js +24 -0
- package/lib/module/shared/components/screen-lifecycle.js.map +1 -0
- package/lib/module/shared/constants.js +3 -1
- package/lib/module/shared/constants.js.map +1 -1
- package/lib/module/shared/hooks/animation/use-screen-animation.js +3 -0
- package/lib/module/shared/hooks/animation/use-screen-animation.js.map +1 -1
- package/lib/module/shared/hooks/gestures/use-build-gestures.js.map +1 -1
- package/lib/module/shared/hooks/lifecycle/use-close-transition.js +122 -0
- package/lib/module/shared/hooks/lifecycle/use-close-transition.js.map +1 -0
- package/lib/module/shared/hooks/lifecycle/use-open-transition.js +32 -0
- package/lib/module/shared/hooks/lifecycle/use-open-transition.js.map +1 -0
- package/lib/module/shared/hooks/lifecycle/use-screen-events.js +54 -0
- package/lib/module/shared/hooks/lifecycle/use-screen-events.js.map +1 -0
- package/lib/module/shared/hooks/navigation/use-history.js +20 -0
- package/lib/module/shared/hooks/navigation/use-history.js.map +1 -0
- package/lib/module/shared/hooks/navigation/use-screen-state.js +41 -0
- package/lib/module/shared/hooks/navigation/use-screen-state.js.map +1 -0
- package/lib/module/shared/hooks/use-stable-callback-value.js +0 -3
- package/lib/module/shared/hooks/use-stable-callback-value.js.map +1 -1
- package/lib/module/shared/index.js +2 -0
- package/lib/module/shared/index.js.map +1 -1
- package/lib/module/shared/providers/screen/keys.provider.js +0 -6
- package/lib/module/shared/providers/screen/keys.provider.js.map +1 -1
- package/lib/module/shared/providers/screen/screen-composer.js +9 -7
- package/lib/module/shared/providers/screen/screen-composer.js.map +1 -1
- package/lib/module/shared/providers/screen/styles.provider.js +1 -1
- package/lib/module/shared/providers/screen/styles.provider.js.map +1 -1
- package/lib/module/shared/providers/stack/direct.provider.js +10 -1
- package/lib/module/shared/providers/stack/direct.provider.js.map +1 -1
- package/lib/module/shared/providers/stack/managed.provider.js +10 -1
- package/lib/module/shared/providers/stack/managed.provider.js.map +1 -1
- package/lib/module/shared/stores/animation.store.js +4 -14
- package/lib/module/shared/stores/animation.store.js.map +1 -1
- package/lib/module/shared/stores/history.store.js +181 -0
- package/lib/module/shared/stores/history.store.js.map +1 -0
- package/lib/module/shared/types/index.js +1 -1
- package/lib/module/shared/types/index.js.map +1 -1
- package/lib/module/shared/types/stack.types.js +5 -0
- package/lib/module/shared/types/stack.types.js.map +1 -1
- package/lib/module/shared/utils/animation/start-screen-transition.js +6 -2
- package/lib/module/shared/utils/animation/start-screen-transition.js.map +1 -1
- package/lib/module/shared/utils/bounds/index.js +19 -4
- package/lib/module/shared/utils/bounds/index.js.map +1 -1
- package/lib/typescript/blank-stack/components/stack-view.d.ts.map +1 -1
- package/lib/typescript/blank-stack/components/stack-view.native.d.ts.map +1 -1
- package/lib/typescript/blank-stack/types.d.ts +1 -8
- package/lib/typescript/blank-stack/types.d.ts.map +1 -1
- package/lib/typescript/component-stack/components/stack-view.d.ts.map +1 -1
- package/lib/typescript/component-stack/types.d.ts +1 -8
- package/lib/typescript/component-stack/types.d.ts.map +1 -1
- package/lib/typescript/native-stack/types.d.ts +2 -3
- package/lib/typescript/native-stack/types.d.ts.map +1 -1
- package/lib/typescript/native-stack/views/NativeStackView.native.d.ts.map +1 -1
- package/lib/typescript/shared/components/overlay/variations/float-overlay.d.ts.map +1 -1
- package/lib/typescript/shared/components/overlay/variations/overlay-host.d.ts +1 -6
- package/lib/typescript/shared/components/overlay/variations/overlay-host.d.ts.map +1 -1
- package/lib/typescript/shared/components/overlay/variations/screen-overlay.d.ts +4 -0
- package/lib/typescript/shared/components/overlay/variations/screen-overlay.d.ts.map +1 -1
- package/lib/typescript/shared/components/screen-lifecycle.d.ts +12 -0
- package/lib/typescript/shared/components/screen-lifecycle.d.ts.map +1 -0
- package/lib/typescript/shared/constants.d.ts +2 -1
- package/lib/typescript/shared/constants.d.ts.map +1 -1
- package/lib/typescript/shared/hooks/animation/use-screen-animation.d.ts.map +1 -1
- package/lib/typescript/shared/hooks/gestures/use-build-gestures.d.ts.map +1 -1
- package/lib/typescript/shared/hooks/lifecycle/use-close-transition.d.ts +13 -0
- package/lib/typescript/shared/hooks/lifecycle/use-close-transition.d.ts.map +1 -0
- package/lib/typescript/shared/hooks/lifecycle/use-open-transition.d.ts +11 -0
- package/lib/typescript/shared/hooks/lifecycle/use-open-transition.d.ts.map +1 -0
- package/lib/typescript/shared/hooks/lifecycle/use-screen-events.d.ts +7 -0
- package/lib/typescript/shared/hooks/lifecycle/use-screen-events.d.ts.map +1 -0
- package/lib/typescript/shared/hooks/navigation/use-history.d.ts +37 -0
- package/lib/typescript/shared/hooks/navigation/use-history.d.ts.map +1 -0
- package/lib/typescript/shared/hooks/navigation/use-screen-state.d.ts +40 -0
- package/lib/typescript/shared/hooks/navigation/use-screen-state.d.ts.map +1 -0
- package/lib/typescript/shared/hooks/use-stable-callback-value.d.ts.map +1 -1
- package/lib/typescript/shared/index.d.ts +22 -20
- package/lib/typescript/shared/index.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/keys.provider.d.ts +2 -9
- package/lib/typescript/shared/providers/screen/keys.provider.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/screen-composer.d.ts +1 -3
- package/lib/typescript/shared/providers/screen/screen-composer.d.ts.map +1 -1
- package/lib/typescript/shared/providers/stack/direct.provider.d.ts.map +1 -1
- package/lib/typescript/shared/providers/stack/managed.provider.d.ts.map +1 -1
- package/lib/typescript/shared/stores/animation.store.d.ts +3 -4
- package/lib/typescript/shared/stores/animation.store.d.ts.map +1 -1
- package/lib/typescript/shared/stores/history.store.d.ts +82 -0
- package/lib/typescript/shared/stores/history.store.d.ts.map +1 -0
- package/lib/typescript/shared/types/animation.types.d.ts +10 -6
- package/lib/typescript/shared/types/animation.types.d.ts.map +1 -1
- package/lib/typescript/shared/types/bounds.types.d.ts +1 -1
- package/lib/typescript/shared/types/bounds.types.d.ts.map +1 -1
- package/lib/typescript/shared/types/index.d.ts +2 -2
- package/lib/typescript/shared/types/index.d.ts.map +1 -1
- package/lib/typescript/shared/types/overlay.types.d.ts +21 -0
- package/lib/typescript/shared/types/overlay.types.d.ts.map +1 -1
- package/lib/typescript/shared/types/screen.types.d.ts +5 -4
- package/lib/typescript/shared/types/screen.types.d.ts.map +1 -1
- package/lib/typescript/shared/types/stack.types.d.ts +10 -0
- package/lib/typescript/shared/types/stack.types.d.ts.map +1 -1
- package/lib/typescript/shared/utils/animation/start-screen-transition.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/blank-stack/components/stack-view.native.tsx +0 -2
- package/src/blank-stack/components/stack-view.tsx +0 -2
- package/src/blank-stack/types.ts +0 -10
- package/src/component-stack/components/stack-view.tsx +19 -23
- package/src/component-stack/types.ts +0 -10
- package/src/native-stack/types.ts +2 -3
- package/src/native-stack/views/NativeStackView.native.tsx +2 -3
- package/src/shared/__tests__/history.store.test.ts +550 -0
- package/src/shared/components/overlay/variations/float-overlay.tsx +2 -8
- package/src/shared/components/overlay/variations/overlay-host.tsx +18 -84
- package/src/shared/components/overlay/variations/screen-overlay.tsx +6 -15
- package/src/shared/components/screen-lifecycle.tsx +32 -0
- package/src/shared/constants.ts +4 -1
- package/src/shared/hooks/animation/use-screen-animation.tsx +7 -3
- package/src/shared/hooks/gestures/use-build-gestures.tsx +0 -2
- package/src/shared/hooks/lifecycle/use-close-transition.ts +147 -0
- package/src/shared/hooks/lifecycle/use-open-transition.ts +30 -0
- package/src/shared/hooks/lifecycle/use-screen-events.ts +62 -0
- package/src/shared/hooks/navigation/use-history.ts +63 -0
- package/src/shared/hooks/navigation/use-screen-state.tsx +99 -0
- package/src/shared/hooks/use-stable-callback-value.ts +0 -1
- package/src/shared/index.ts +5 -0
- package/src/shared/providers/screen/keys.provider.tsx +1 -25
- package/src/shared/providers/screen/screen-composer.tsx +7 -13
- package/src/shared/providers/screen/styles.provider.tsx +1 -1
- package/src/shared/providers/stack/direct.provider.tsx +11 -1
- package/src/shared/providers/stack/managed.provider.tsx +11 -1
- package/src/shared/stores/animation.store.ts +6 -20
- package/src/shared/stores/history.store.ts +201 -0
- package/src/shared/types/animation.types.ts +11 -6
- package/src/shared/types/bounds.types.ts +1 -0
- package/src/shared/types/index.ts +2 -7
- package/src/shared/types/overlay.types.ts +23 -0
- package/src/shared/types/screen.types.ts +5 -4
- package/src/shared/types/stack.types.ts +17 -1
- package/src/shared/utils/animation/start-screen-transition.ts +5 -2
- package/src/shared/utils/bounds/index.ts +35 -4
- package/lib/commonjs/native-stack/controllers/native-stack-lifecycle.js +0 -90
- package/lib/commonjs/native-stack/controllers/native-stack-lifecycle.js.map +0 -1
- package/lib/commonjs/shared/controller/managed-lifecycle.js +0 -78
- package/lib/commonjs/shared/controller/managed-lifecycle.js.map +0 -1
- package/lib/commonjs/shared/types/state.types.js +0 -9
- package/lib/commonjs/shared/types/state.types.js.map +0 -1
- package/lib/commonjs/shared/utils/read-shared-value.js +0 -17
- package/lib/commonjs/shared/utils/read-shared-value.js.map +0 -1
- package/lib/module/native-stack/controllers/native-stack-lifecycle.js +0 -83
- package/lib/module/native-stack/controllers/native-stack-lifecycle.js.map +0 -1
- package/lib/module/shared/controller/managed-lifecycle.js +0 -72
- package/lib/module/shared/controller/managed-lifecycle.js.map +0 -1
- package/lib/module/shared/types/state.types.js +0 -5
- package/lib/module/shared/types/state.types.js.map +0 -1
- package/lib/module/shared/utils/read-shared-value.js +0 -14
- package/lib/module/shared/utils/read-shared-value.js.map +0 -1
- package/lib/typescript/native-stack/controllers/native-stack-lifecycle.d.ts +0 -8
- package/lib/typescript/native-stack/controllers/native-stack-lifecycle.d.ts.map +0 -1
- package/lib/typescript/shared/controller/managed-lifecycle.d.ts +0 -9
- package/lib/typescript/shared/controller/managed-lifecycle.d.ts.map +0 -1
- package/lib/typescript/shared/types/state.types.d.ts +0 -3
- package/lib/typescript/shared/types/state.types.d.ts.map +0 -1
- package/lib/typescript/shared/utils/read-shared-value.d.ts +0 -7
- package/lib/typescript/shared/utils/read-shared-value.d.ts.map +0 -1
- package/src/native-stack/controllers/native-stack-lifecycle.tsx +0 -96
- package/src/shared/controller/managed-lifecycle.tsx +0 -73
- package/src/shared/types/state.types.ts +0 -2
- package/src/shared/utils/read-shared-value.ts +0 -15
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"overlay.types.d.ts","sourceRoot":"","sources":["../../../../src/shared/types/overlay.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,KAAK,EACX,yBAAyB,EACzB,wBAAwB,EACxB,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"overlay.types.d.ts","sourceRoot":"","sources":["../../../../src/shared/types/overlay.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,KAAK,EACX,yBAAyB,EACzB,wBAAwB,EACxB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AAE7D;;;;GAIG;AACH,MAAM,MAAM,WAAW,GAAG,OAAO,GAAG,QAAQ,CAAC;AAE7C;;;GAGG;AACH,MAAM,MAAM,YAAY,CAAC,WAAW,GAAG,OAAO,IAAI;IACjD;;OAEG;IACH,YAAY,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAE5B;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC;IAExB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAE/B;;OAEG;IACH,UAAU,EAAE,WAAW,CAAC;IAExB;;OAEG;IACH,OAAO,EAAE,sBAAsB,CAAC;IAEhC;;;OAGG;IACH,QAAQ,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC;IAE/B;;;;;OAKG;IACH,gBAAgB,EAAE,YAAY,CAAC,yBAAyB,CAAC,CAAC;IAE1D;;;;;OAKG;IACH,eAAe,EAAE,YAAY,CAAC,wBAAwB,CAAC,CAAC;CACxD,CAAC"}
|
|
@@ -93,10 +93,11 @@ export type ScreenTransitionConfig = {
|
|
|
93
93
|
overlay?: (props: OverlayProps) => React.ReactNode;
|
|
94
94
|
/**
|
|
95
95
|
* How the overlay is positioned relative to screens.
|
|
96
|
-
*
|
|
97
|
-
*
|
|
98
|
-
*
|
|
99
|
-
*
|
|
96
|
+
*
|
|
97
|
+
* @deprecated This option is no longer needed. Overlays now always render as "float" mode
|
|
98
|
+
* (single persistent overlay above all screens). For per-screen overlays, render an
|
|
99
|
+
* absolute-positioned view directly in your screen component and use `useScreenAnimation()`
|
|
100
|
+
* to access animation values.
|
|
100
101
|
*/
|
|
101
102
|
overlayMode?: OverlayMode;
|
|
102
103
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"screen.types.d.ts","sourceRoot":"","sources":["../../../../src/shared/types/screen.types.ts"],"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;;OAEG;IACH,qBAAqB,CAAC,EAAE,qBAAqB,CAAC;IAE9C;;;;;OAKG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAE/B;;;OAGG;IACH,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,YAAY,KAAK,KAAK,CAAC,SAAS,CAAC;IAEnD;;;;;;;OAOG;IACH,WAAW,CAAC,EAAE,WAAW,CAAC;IAE1B;;;OAGG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IAEvB;;;;;;;;;OASG;IACH,kCAAkC,CAAC,EAAE,OAAO,CAAC;CAC7C,CAAC"}
|
|
@@ -18,8 +18,11 @@ export interface BaseStackNavigation {
|
|
|
18
18
|
key: string;
|
|
19
19
|
}>;
|
|
20
20
|
key: string;
|
|
21
|
+
index: number;
|
|
21
22
|
};
|
|
22
23
|
dispatch: (action: any) => void;
|
|
24
|
+
addListener?: (event: any, callback: any) => () => void;
|
|
25
|
+
emit?: (event: any) => any;
|
|
23
26
|
}
|
|
24
27
|
/**
|
|
25
28
|
* Base descriptor interface - generic over route, navigation, and options.
|
|
@@ -48,6 +51,13 @@ export interface BaseStackState<TRoute extends BaseStackRoute = BaseStackRoute>
|
|
|
48
51
|
index: number;
|
|
49
52
|
key: string;
|
|
50
53
|
}
|
|
54
|
+
/**
|
|
55
|
+
* Generic descriptor map - keyed by route key.
|
|
56
|
+
* Use this instead of defining stack-specific DescriptorMap types.
|
|
57
|
+
*/
|
|
58
|
+
export type DescriptorMap<TDescriptor extends BaseStackDescriptor = BaseStackDescriptor> = {
|
|
59
|
+
[key: string]: TDescriptor;
|
|
60
|
+
};
|
|
51
61
|
export declare enum StackType {
|
|
52
62
|
NATIVE = "native",
|
|
53
63
|
BLANK = "blank",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stack.types.d.ts","sourceRoot":"","sources":["../../../../src/shared/types/stack.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EA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B,MAAM,CAAC,EAAE,MAAM,KAAK,CAAC,GAAG,CAAC,OAAO,GAAG,IAAI,CAAC;CACxC;AAED;;;GAGG;AACH,MAAM,WAAW,cAAc,CAC9B,WAAW,SAAS,mBAAmB,GAAG,mBAAmB;IAE7D,KAAK,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;IAC5B,UAAU,EAAE,WAAW,CAAC;CACxB;AAED;;;GAGG;AACH,MAAM,WAAW,cAAc,CAC9B,MAAM,SAAS,cAAc,GAAG,cAAc;IAE9C,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;CACZ;AAED;;;GAGG;AACH,MAAM,MAAM,aAAa,CACxB,WAAW,SAAS,mBAAmB,GAAG,mBAAmB,IAC1D;IACH,CAAC,GAAG,EAAE,MAAM,GAAG,WAAW,CAAC;CAC3B,CAAC;AAEF,oBAAY,SAAS;IACpB,MAAM,WAAW;IACjB,KAAK,UAAU;IACf,SAAS,cAAc;CACvB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"start-screen-transition.d.ts","sourceRoot":"","sources":["../../../../../src/shared/utils/animation/start-screen-transition.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"start-screen-transition.d.ts","sourceRoot":"","sources":["../../../../../src/shared/utils/animation/start-screen-transition.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACtE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAGlE,UAAU,0BAA0B;IACnC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC;IACzB,IAAI,CAAC,EAAE,cAAc,CAAC;IACtB,iBAAiB,CAAC,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;IAChD,UAAU,EAAE,iBAAiB,CAAC;IAC9B,iFAAiF;IACjF,eAAe,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,eAAO,MAAM,qBAAqB,GAAI,mEAMnC,0BAA0B,SA6C5B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/shared/utils/bounds/index.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EACX,wBAAwB,EAExB,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EAAE,cAAc,EAAc,MAAM,0BAA0B,CAAC;AAkK3E,eAAO,MAAM,YAAY,GACxB,OAAO,IAAI,CAAC,wBAAwB,EAAE,QAAQ,CAAC,KAC7C,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/shared/utils/bounds/index.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EACX,wBAAwB,EAExB,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EAAE,cAAc,EAAc,MAAM,0BAA0B,CAAC;AAkK3E,eAAO,MAAM,YAAY,GACxB,OAAO,IAAI,CAAC,wBAAwB,EAAE,QAAQ,CAAC,KAC7C,cAyGF,CAAC"}
|
package/package.json
CHANGED
|
@@ -5,7 +5,6 @@ import {
|
|
|
5
5
|
import * as React from "react";
|
|
6
6
|
import { Fragment } from "react";
|
|
7
7
|
import { Overlay } from "../../shared/components/overlay";
|
|
8
|
-
import { ManagedLifecycle } from "../../shared/controller/managed-lifecycle";
|
|
9
8
|
import { ScreenComposer } from "../../shared/providers/screen/screen-composer";
|
|
10
9
|
import { withStackCore } from "../../shared/providers/stack/core.provider";
|
|
11
10
|
import { withManagedStack } from "../../shared/providers/stack/managed.provider";
|
|
@@ -79,7 +78,6 @@ export const StackView = withStackCore(
|
|
|
79
78
|
previous={previousDescriptor}
|
|
80
79
|
current={descriptor}
|
|
81
80
|
next={nextDescriptor}
|
|
82
|
-
LifecycleController={ManagedLifecycle}
|
|
83
81
|
>
|
|
84
82
|
<SceneView key={route.key} descriptor={descriptor} />
|
|
85
83
|
</ScreenComposer>
|
|
@@ -5,7 +5,6 @@ import {
|
|
|
5
5
|
import * as React from "react";
|
|
6
6
|
import { Fragment } from "react";
|
|
7
7
|
import { Overlay } from "../../shared/components/overlay";
|
|
8
|
-
import { ManagedLifecycle } from "../../shared/controller/managed-lifecycle";
|
|
9
8
|
import { ScreenComposer } from "../../shared/providers/screen/screen-composer";
|
|
10
9
|
import { withStackCore } from "../../shared/providers/stack/core.provider";
|
|
11
10
|
import { withManagedStack } from "../../shared/providers/stack/managed.provider";
|
|
@@ -79,7 +78,6 @@ export const StackView = withStackCore(
|
|
|
79
78
|
previous={previousDescriptor}
|
|
80
79
|
current={descriptor}
|
|
81
80
|
next={nextDescriptor}
|
|
82
|
-
LifecycleController={ManagedLifecycle}
|
|
83
81
|
>
|
|
84
82
|
<SceneView key={route.key} descriptor={descriptor} />
|
|
85
83
|
</ScreenComposer>
|
package/src/blank-stack/types.ts
CHANGED
|
@@ -4,7 +4,6 @@ import type {
|
|
|
4
4
|
NavigationHelpers,
|
|
5
5
|
NavigationProp,
|
|
6
6
|
ParamListBase,
|
|
7
|
-
Route,
|
|
8
7
|
RouteProp,
|
|
9
8
|
StackActionHelpers,
|
|
10
9
|
StackNavigationState,
|
|
@@ -52,11 +51,6 @@ export type BlankStackNavigationHelpers = NavigationHelpers<
|
|
|
52
51
|
BlankStackNavigationEventMap
|
|
53
52
|
>;
|
|
54
53
|
|
|
55
|
-
export type BlankStackScene = {
|
|
56
|
-
route: Route<string>;
|
|
57
|
-
descriptor: BlankStackDescriptor;
|
|
58
|
-
};
|
|
59
|
-
|
|
60
54
|
type BlankStackNavigationConfig = {
|
|
61
55
|
DISABLE_NATIVE_SCREENS?: boolean;
|
|
62
56
|
};
|
|
@@ -105,7 +99,3 @@ export type BlankStackDescriptor = Descriptor<
|
|
|
105
99
|
BlankStackNavigationProp<ParamListBase>,
|
|
106
100
|
RouteProp<ParamListBase>
|
|
107
101
|
>;
|
|
108
|
-
|
|
109
|
-
export type BlankStackDescriptorMap = {
|
|
110
|
-
[key: string]: BlankStackDescriptor;
|
|
111
|
-
};
|
|
@@ -5,7 +5,6 @@ import {
|
|
|
5
5
|
import * as React from "react";
|
|
6
6
|
import { Fragment } from "react";
|
|
7
7
|
import { Overlay } from "../../shared/components/overlay";
|
|
8
|
-
import { ManagedLifecycle } from "../../shared/controller/managed-lifecycle";
|
|
9
8
|
import { ScreenComposer } from "../../shared/providers/screen/screen-composer";
|
|
10
9
|
import { withStackCore } from "../../shared/providers/stack/core.provider";
|
|
11
10
|
import { withManagedStack } from "../../shared/providers/stack/managed.provider";
|
|
@@ -43,30 +42,27 @@ export const StackView = withStackCore(
|
|
|
43
42
|
<Fragment>
|
|
44
43
|
{shouldShowFloatOverlay ? <Overlay.Float /> : null}
|
|
45
44
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
const route = scene.route;
|
|
45
|
+
{scenes.map((scene, sceneIndex) => {
|
|
46
|
+
const descriptor = scene.descriptor;
|
|
47
|
+
const route = scene.route;
|
|
50
48
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
49
|
+
const previousDescriptor =
|
|
50
|
+
scenes[sceneIndex - 1]?.descriptor ?? undefined;
|
|
51
|
+
const nextDescriptor =
|
|
52
|
+
scenes[sceneIndex + 1]?.descriptor ?? undefined;
|
|
55
53
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
})}
|
|
69
|
-
</Fragment>
|
|
54
|
+
return (
|
|
55
|
+
<ComponentScreen key={route.key} routeKey={route.key}>
|
|
56
|
+
<ScreenComposer
|
|
57
|
+
previous={previousDescriptor}
|
|
58
|
+
current={descriptor}
|
|
59
|
+
next={nextDescriptor}
|
|
60
|
+
>
|
|
61
|
+
<SceneView key={route.key} descriptor={descriptor} />
|
|
62
|
+
</ScreenComposer>
|
|
63
|
+
</ComponentScreen>
|
|
64
|
+
);
|
|
65
|
+
})}
|
|
70
66
|
</Fragment>
|
|
71
67
|
);
|
|
72
68
|
},
|
|
@@ -4,7 +4,6 @@ import type {
|
|
|
4
4
|
NavigationHelpers,
|
|
5
5
|
NavigationProp,
|
|
6
6
|
ParamListBase,
|
|
7
|
-
Route,
|
|
8
7
|
RouteProp,
|
|
9
8
|
StackActionHelpers,
|
|
10
9
|
StackNavigationState,
|
|
@@ -52,11 +51,6 @@ export type ComponentStackNavigationHelpers = NavigationHelpers<
|
|
|
52
51
|
ComponentStackNavigationEventMap
|
|
53
52
|
>;
|
|
54
53
|
|
|
55
|
-
export type ComponentStackScene = {
|
|
56
|
-
route: Route<string>;
|
|
57
|
-
descriptor: ComponentStackDescriptor;
|
|
58
|
-
};
|
|
59
|
-
|
|
60
54
|
type ComponentStackNavigationConfig = {};
|
|
61
55
|
|
|
62
56
|
/**
|
|
@@ -95,7 +89,3 @@ export type ComponentStackDescriptor = Descriptor<
|
|
|
95
89
|
ComponentStackNavigationProp<ParamListBase>,
|
|
96
90
|
RouteProp<ParamListBase>
|
|
97
91
|
>;
|
|
98
|
-
|
|
99
|
-
export type ComponentStackDescriptorMap = {
|
|
100
|
-
[key: string]: ComponentStackDescriptor;
|
|
101
|
-
};
|
|
@@ -24,6 +24,7 @@ import type {
|
|
|
24
24
|
} from "react-native-screens";
|
|
25
25
|
import type { OverlayProps } from "../shared/types/overlay.types";
|
|
26
26
|
import type { ScreenTransitionConfig } from "../shared/types/screen.types";
|
|
27
|
+
import type { DescriptorMap } from "../shared/types/stack.types";
|
|
27
28
|
|
|
28
29
|
export type NativeStackNavigationEventMap = {
|
|
29
30
|
/**
|
|
@@ -717,6 +718,4 @@ export type NativeStackDescriptor = Descriptor<
|
|
|
717
718
|
RouteProp<ParamListBase>
|
|
718
719
|
>;
|
|
719
720
|
|
|
720
|
-
export type NativeStackDescriptorMap =
|
|
721
|
-
[key: string]: NativeStackDescriptor;
|
|
722
|
-
};
|
|
721
|
+
export type NativeStackDescriptorMap = DescriptorMap<NativeStackDescriptor>;
|
|
@@ -35,7 +35,7 @@ import {
|
|
|
35
35
|
type DirectStackContextValue,
|
|
36
36
|
withDirectStack,
|
|
37
37
|
} from "../../shared/providers/stack/direct.provider";
|
|
38
|
-
import {
|
|
38
|
+
import { StackType } from "../../shared/types/stack.types";
|
|
39
39
|
import type { NativeStackDescriptor } from "../types";
|
|
40
40
|
import { debounce } from "../utils/debounce";
|
|
41
41
|
import { getModalRouteKeys } from "../utils/getModalRoutesKeys";
|
|
@@ -468,7 +468,6 @@ const SceneView = ({
|
|
|
468
468
|
previous={previousDescriptor}
|
|
469
469
|
current={descriptor}
|
|
470
470
|
next={nextDescriptor}
|
|
471
|
-
LifecycleController={NativeStackScreenLifecycleController}
|
|
472
471
|
>
|
|
473
472
|
{render()}
|
|
474
473
|
</ScreenComposer>
|
|
@@ -483,7 +482,7 @@ const SceneView = ({
|
|
|
483
482
|
};
|
|
484
483
|
|
|
485
484
|
export const NativeStackView = withStackCore(
|
|
486
|
-
{ TRANSITIONS_ALWAYS_ON: false },
|
|
485
|
+
{ TRANSITIONS_ALWAYS_ON: false, STACK_TYPE: StackType.NATIVE },
|
|
487
486
|
withDirectStack(function NativeStackViewContent({
|
|
488
487
|
state,
|
|
489
488
|
navigation,
|