react-native-screen-transitions 2.4.1 → 2.4.2
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/lib/commonjs/constants.js.map +1 -1
- package/lib/commonjs/hooks/animation/use-screen-animation.js +9 -5
- package/lib/commonjs/hooks/animation/use-screen-animation.js.map +1 -1
- package/lib/commonjs/providers/transition-styles.js +18 -4
- package/lib/commonjs/providers/transition-styles.js.map +1 -1
- package/lib/commonjs/utils/animation/derivations.js +1 -14
- package/lib/commonjs/utils/animation/derivations.js.map +1 -1
- package/lib/commonjs/utils/bounds/constants.js.map +1 -1
- package/lib/commonjs/utils/bounds/index.js +23 -90
- package/lib/commonjs/utils/bounds/index.js.map +1 -1
- package/lib/commonjs/utils/gesture/apply-offset-rules.js.map +1 -1
- package/lib/commonjs/utils/gesture/check-gesture-activation.js.map +1 -1
- package/lib/module/constants.js.map +1 -1
- package/lib/module/hooks/animation/use-screen-animation.js +9 -5
- package/lib/module/hooks/animation/use-screen-animation.js.map +1 -1
- package/lib/module/providers/transition-styles.js +19 -5
- package/lib/module/providers/transition-styles.js.map +1 -1
- package/lib/module/utils/animation/derivations.js +1 -14
- package/lib/module/utils/animation/derivations.js.map +1 -1
- package/lib/module/utils/bounds/constants.js.map +1 -1
- package/lib/module/utils/bounds/index.js +24 -91
- package/lib/module/utils/bounds/index.js.map +1 -1
- package/lib/module/utils/gesture/apply-offset-rules.js.map +1 -1
- package/lib/module/utils/gesture/check-gesture-activation.js.map +1 -1
- package/lib/typescript/constants.d.ts +2 -2
- package/lib/typescript/constants.d.ts.map +1 -1
- package/lib/typescript/hooks/animation/use-screen-animation.d.ts +1 -1
- package/lib/typescript/hooks/animation/use-screen-animation.d.ts.map +1 -1
- package/lib/typescript/index.d.ts +8 -8
- package/lib/typescript/providers/transition-styles.d.ts.map +1 -1
- package/lib/typescript/types/animation.d.ts +2 -4
- package/lib/typescript/types/animation.d.ts.map +1 -1
- package/lib/typescript/types/bounds.d.ts +0 -57
- package/lib/typescript/types/bounds.d.ts.map +1 -1
- package/lib/typescript/types/navigator.d.ts +4 -0
- package/lib/typescript/types/navigator.d.ts.map +1 -1
- package/lib/typescript/utils/animation/derivations.d.ts +1 -4
- package/lib/typescript/utils/animation/derivations.d.ts.map +1 -1
- package/lib/typescript/utils/bounds/_types/builder.d.ts +2 -2
- package/lib/typescript/utils/bounds/_types/builder.d.ts.map +1 -1
- package/lib/typescript/utils/bounds/_utils/geometry.d.ts +2 -2
- package/lib/typescript/utils/bounds/_utils/geometry.d.ts.map +1 -1
- package/lib/typescript/utils/bounds/constants.d.ts +2 -2
- package/lib/typescript/utils/bounds/constants.d.ts.map +1 -1
- package/lib/typescript/utils/bounds/index.d.ts +4 -4
- package/lib/typescript/utils/bounds/index.d.ts.map +1 -1
- package/lib/typescript/utils/gesture/apply-offset-rules.d.ts +2 -2
- package/lib/typescript/utils/gesture/apply-offset-rules.d.ts.map +1 -1
- package/lib/typescript/utils/gesture/check-gesture-activation.d.ts +2 -2
- package/lib/typescript/utils/gesture/check-gesture-activation.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/constants.ts +2 -2
- package/src/hooks/animation/use-screen-animation.tsx +51 -46
- package/src/providers/transition-styles.tsx +24 -11
- package/src/types/animation.ts +2 -4
- package/src/types/bounds.ts +0 -64
- package/src/types/navigator.ts +5 -0
- package/src/utils/animation/derivations.ts +3 -20
- package/src/utils/bounds/_types/builder.ts +2 -2
- package/src/utils/bounds/_utils/geometry.ts +2 -2
- package/src/utils/bounds/constants.ts +2 -2
- package/src/utils/bounds/index.ts +35 -105
- package/src/utils/gesture/apply-offset-rules.ts +3 -3
- package/src/utils/gesture/check-gesture-activation.ts +3 -3
|
@@ -1,19 +1,16 @@
|
|
|
1
|
-
import type { ScaledSize } from "react-native";
|
|
2
1
|
import type { ScreenTransitionState } from "../../types/animation";
|
|
3
2
|
interface DerivationsParams {
|
|
4
3
|
current: ScreenTransitionState;
|
|
5
4
|
next?: ScreenTransitionState;
|
|
6
5
|
previous?: ScreenTransitionState;
|
|
7
|
-
dimensions: ScaledSize;
|
|
8
6
|
}
|
|
9
7
|
/**
|
|
10
8
|
* Additional values to help make defining animations easier.
|
|
11
9
|
*/
|
|
12
|
-
export declare const derivations: ({ current, next, previous
|
|
10
|
+
export declare const derivations: ({ current, next, previous }: DerivationsParams) => {
|
|
13
11
|
progress: number;
|
|
14
12
|
focused: boolean;
|
|
15
13
|
activeBoundId: string;
|
|
16
|
-
bounds: import("../../types/bounds").BoundsAccessor;
|
|
17
14
|
active: ScreenTransitionState;
|
|
18
15
|
isActiveTransitioning: boolean;
|
|
19
16
|
isDismissing: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"derivations.d.ts","sourceRoot":"","sources":["../../../../src/utils/animation/derivations.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"derivations.d.ts","sourceRoot":"","sources":["../../../../src/utils/animation/derivations.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAEnE,UAAU,iBAAiB;IAC1B,OAAO,EAAE,qBAAqB,CAAC;IAC/B,IAAI,CAAC,EAAE,qBAAqB,CAAC;IAC7B,QAAQ,CAAC,EAAE,qBAAqB,CAAC;CACjC;AAED;;GAEG;AACH,eAAO,MAAM,WAAW,GAAI,6BAA6B,iBAAiB;;;;;;;CA2BzE,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { ScaledSize } from "react-native";
|
|
2
1
|
import type { MeasuredDimensions, StyleProps } from "react-native-reanimated";
|
|
3
2
|
import type { ScreenTransitionState } from "../../../types/animation";
|
|
4
3
|
import type { BoundsMethod } from "../../../types/bounds";
|
|
4
|
+
import type { Layout } from "../../../types/navigator";
|
|
5
5
|
/**
|
|
6
6
|
* Params passed to the builder initializer. No method required here.
|
|
7
7
|
*/
|
|
@@ -11,7 +11,7 @@ export type BoundsBuilderInitParams = {
|
|
|
11
11
|
current: ScreenTransitionState;
|
|
12
12
|
next?: ScreenTransitionState;
|
|
13
13
|
progress: number;
|
|
14
|
-
dimensions:
|
|
14
|
+
dimensions: Layout;
|
|
15
15
|
};
|
|
16
16
|
export type BoundsAnchor = "topLeading" | "top" | "topTrailing" | "leading" | "center" | "trailing" | "bottomLeading" | "bottom" | "bottomTrailing";
|
|
17
17
|
export type BoundsScaleMode = "match" | "none" | "uniform";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"builder.d.ts","sourceRoot":"","sources":["../../../../../src/utils/bounds/_types/builder.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"builder.d.ts","sourceRoot":"","sources":["../../../../../src/utils/bounds/_types/builder.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAC9E,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACtE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAEvD;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAAG;IACrC,EAAE,EAAE,MAAM,GAAG,IAAI,CAAC;IAClB,QAAQ,CAAC,EAAE,qBAAqB,CAAC;IACjC,OAAO,EAAE,qBAAqB,CAAC;IAC/B,IAAI,CAAC,EAAE,qBAAqB,CAAC;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,YAAY,GACrB,YAAY,GACZ,KAAK,GACL,aAAa,GACb,SAAS,GACT,QAAQ,GACR,UAAU,GACV,eAAe,GACf,QAAQ,GACR,gBAAgB,CAAC;AAEpB,MAAM,MAAM,eAAe,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,CAAC;AAE3D,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,YAAY,GAAG,kBAAkB,CAAC;AAEvE,MAAM,MAAM,WAAW,GAAG,UAAU,GAAG,UAAU,CAAC;AAElD,MAAM,MAAM,mBAAmB,GAAG,uBAAuB,CAAC;AAE1D,MAAM,MAAM,qBAAqB,GAAG;IACnC,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG;IACnC,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,0BAA0B,GAAG;IACxC,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,0BAA0B,GAAG;IACxC,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC9B,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;CACd,CAAC;AAGF,MAAM,MAAM,gBAAgB,CAAC,CAAC,SAAS,oBAAoB,IAC1D,CAAC,CAAC,KAAK,CAAC,SAAS,IAAI,GAClB,CAAC,CAAC,QAAQ,CAAC,SAAS,MAAM,GACzB,CAAC,CAAC,OAAO,CAAC,SAAS,UAAU,GAC5B,qBAAqB,GACrB,qBAAqB,GACtB,CAAC,CAAC,QAAQ,CAAC,SAAS,SAAS,GAC5B,gBAAgB,GAChB,CAAC,CAAC,OAAO,CAAC,SAAS,UAAU,GAC5B,0BAA0B,GAC1B,0BAA0B,GAC7B,UAAU,CAAC;AAEf,MAAM,MAAM,oBAAoB,GAAG;IAClC;;OAEG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,gBAAgB,CAAC,EAAE,YAAY,GAAG,WAAW,GAAG,MAAM,CAAC;IAEvD;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IAEZ;;;;;;;;OAQG;IACH,MAAM,CAAC,EAAE,YAAY,CAAC;IAEtB;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB;;;OAGG;IACH,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB;;OAEG;IACH,QAAQ,CAAC,EAAE;QAAE,CAAC,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACtC;;;OAGG;IACH,SAAS,CAAC,EAAE,eAAe,CAAC;IAC5B;;;OAGG;IACH,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB;;;OAGG;IACH,GAAG,CAAC,EAAE,OAAO,CAAC;CACd,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ScaledSize } from "react-native";
|
|
2
1
|
import type { MeasuredDimensions } from "react-native-reanimated";
|
|
2
|
+
import type { Layout } from "../../../types/navigator";
|
|
3
3
|
import type { BoundsAnchor, BoundsScaleMode } from "../_types/builder";
|
|
4
4
|
import type { ContentTransformGeometry, RelativeGeometry } from "../_types/geometry";
|
|
5
5
|
/**
|
|
@@ -20,7 +20,7 @@ export declare function computeContentTransformGeometry({ start, end, entering,
|
|
|
20
20
|
start: MeasuredDimensions;
|
|
21
21
|
end: MeasuredDimensions;
|
|
22
22
|
entering: boolean;
|
|
23
|
-
dimensions:
|
|
23
|
+
dimensions: Layout;
|
|
24
24
|
anchor?: BoundsAnchor;
|
|
25
25
|
scaleMode?: BoundsScaleMode;
|
|
26
26
|
}): ContentTransformGeometry;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"geometry.d.ts","sourceRoot":"","sources":["../../../../../src/utils/bounds/_utils/geometry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"geometry.d.ts","sourceRoot":"","sources":["../../../../../src/utils/bounds/_utils/geometry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACvE,OAAO,KAAK,EACX,wBAAwB,EACxB,gBAAgB,EAChB,MAAM,oBAAoB,CAAC;AAsC5B;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,EACvC,KAAK,EACL,GAAG,EACH,QAAQ,EACR,MAAiB,EACjB,SAAmB,GACnB,EAAE;IACF,KAAK,EAAE,kBAAkB,CAAC;IAC1B,GAAG,EAAE,kBAAkB,CAAC;IACxB,QAAQ,EAAE,OAAO,CAAC;IAClB,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,SAAS,CAAC,EAAE,eAAe,CAAC;CAC5B,GAAG,gBAAgB,CAoCnB;AACD;;;GAGG;AACH,wBAAgB,+BAA+B,CAAC,EAC/C,KAAK,EACL,GAAG,EACH,QAAQ,EACR,UAAU,EACV,MAAiB,EACjB,SAAqB,GACrB,EAAE;IACF,KAAK,EAAE,kBAAkB,CAAC;IAC1B,GAAG,EAAE,kBAAkB,CAAC;IACxB,QAAQ,EAAE,OAAO,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,SAAS,CAAC,EAAE,eAAe,CAAC;CAC5B,GAAG,wBAAwB,CAmD3B"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { ScaledSize } from "react-native";
|
|
2
1
|
import type { MeasuredDimensions } from "react-native-reanimated";
|
|
3
2
|
import type { Complete } from "../../types/utils";
|
|
4
3
|
import type { BoundsBuilderOptions } from "./_types/builder";
|
|
5
|
-
|
|
4
|
+
import type { Layout } from "../ ../../../types/navigator";
|
|
5
|
+
export declare const FULLSCREEN_DIMENSIONS: (dimensions: Layout) => MeasuredDimensions;
|
|
6
6
|
export declare const DEFAULT_BUILDER_OPTIONS: Complete<Omit<BoundsBuilderOptions, "id">>;
|
|
7
7
|
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../src/utils/bounds/constants.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../src/utils/bounds/constants.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AAE3D,eAAO,MAAM,qBAAqB,GACjC,YAAY,MAAM,KAChB,kBAUF,CAAC;AAEF,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAC7C,IAAI,CAAC,oBAAoB,EAAE,IAAI,CAAC,CAmBtB,CAAC"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { ScreenTransitionState } from "../../types/animation";
|
|
1
|
+
import type { ScreenInterpolationProps, ScreenTransitionState } from "../../types/animation";
|
|
3
2
|
import type { BoundsAccessor } from "../../types/bounds";
|
|
3
|
+
import type { Layout } from "../../types/navigator";
|
|
4
4
|
export interface BuildBoundsAccessorParams {
|
|
5
5
|
activeBoundId: string | null;
|
|
6
6
|
current: ScreenTransitionState;
|
|
7
7
|
previous?: ScreenTransitionState;
|
|
8
8
|
next?: ScreenTransitionState;
|
|
9
9
|
progress: number;
|
|
10
|
-
dimensions:
|
|
10
|
+
dimensions: Layout;
|
|
11
11
|
}
|
|
12
|
-
export declare const createBounds: (
|
|
12
|
+
export declare const createBounds: (props: Omit<ScreenInterpolationProps, "bounds">) => BoundsAccessor;
|
|
13
13
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/utils/bounds/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/utils/bounds/index.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EACX,wBAAwB,EACxB,qBAAqB,EACrB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEzD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAmBpD,MAAM,WAAW,yBAAyB;IACzC,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,OAAO,EAAE,qBAAqB,CAAC;IAC/B,QAAQ,CAAC,EAAE,qBAAqB,CAAC;IACjC,IAAI,CAAC,EAAE,qBAAqB,CAAC;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;CACnB;AAgJD,eAAO,MAAM,YAAY,GACxB,OAAO,IAAI,CAAC,wBAAwB,EAAE,QAAQ,CAAC,KAC7C,cAgCF,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { ScaledSize } from "react-native";
|
|
2
1
|
import type { GestureStateManagerType } from "react-native-gesture-handler/lib/typescript/handlers/gestures/gestureStateManager";
|
|
3
2
|
import type { SharedValue } from "react-native-reanimated";
|
|
4
3
|
import { type GestureActivationArea, GestureOffsetState } from "../../types/gesture";
|
|
4
|
+
import type { Layout } from "../../types/navigator";
|
|
5
5
|
type Directions = {
|
|
6
6
|
vertical: boolean;
|
|
7
7
|
verticalInverted: boolean;
|
|
@@ -21,7 +21,7 @@ interface CheckGestureActivationProps {
|
|
|
21
21
|
manager?: GestureStateManagerType;
|
|
22
22
|
gestureOffsetState: SharedValue<GestureOffsetState>;
|
|
23
23
|
activationArea?: GestureActivationArea;
|
|
24
|
-
dimensions:
|
|
24
|
+
dimensions: Layout;
|
|
25
25
|
responseDistance?: number;
|
|
26
26
|
}
|
|
27
27
|
interface ReturnValues {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"apply-offset-rules.d.ts","sourceRoot":"","sources":["../../../../src/utils/gesture/apply-offset-rules.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"apply-offset-rules.d.ts","sourceRoot":"","sources":["../../../../src/utils/gesture/apply-offset-rules.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,mFAAmF,CAAC;AACjI,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAU3D,OAAO,EAEN,KAAK,qBAAqB,EAC1B,kBAAkB,EAElB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAEpD,KAAK,UAAU,GAAG;IACjB,QAAQ,EAAE,OAAO,CAAC;IAClB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,UAAU,EAAE,OAAO,CAAC;IACpB,kBAAkB,EAAE,OAAO,CAAC;CAC5B,CAAC;AAEF,UAAU,2BAA2B;IACpC,YAAY,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACvC,KAAK,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAChC,UAAU,EAAE,UAAU,CAAC;IACvB,OAAO,CAAC,EAAE,uBAAuB,CAAC;IAClC,kBAAkB,EAAE,WAAW,CAAC,kBAAkB,CAAC,CAAC;IACpD,cAAc,CAAC,EAAE,qBAAqB,CAAC;IACvC,UAAU,EAAE,MAAM,CAAC;IACnB,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC1B;AA8BD,UAAU,YAAY;IACrB,aAAa,EAAE,OAAO,CAAC;IACvB,WAAW,EAAE,OAAO,CAAC;IACrB,cAAc,EAAE,OAAO,CAAC;IACxB,aAAa,EAAE,OAAO,CAAC;CACvB;AAsJD;;GAEG;AACH,eAAO,MAAM,gBAAgB,GAAI,iHAS9B,2BAA2B,KAAG,YA+EhC,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { ScaledSize } from "react-native";
|
|
2
1
|
import type { GestureStateManagerType } from "react-native-gesture-handler/lib/typescript/handlers/gestures/gestureStateManager";
|
|
3
2
|
import type { SharedValue } from "react-native-reanimated";
|
|
4
3
|
import { type GestureActivationArea, GestureOffsetState } from "../../types/gesture";
|
|
4
|
+
import type { Layout } from "../../types/navigator";
|
|
5
5
|
type Directions = {
|
|
6
6
|
vertical: boolean;
|
|
7
7
|
verticalInverted: boolean;
|
|
@@ -21,7 +21,7 @@ interface CheckGestureActivationProps {
|
|
|
21
21
|
manager?: GestureStateManagerType;
|
|
22
22
|
gestureOffsetState: SharedValue<GestureOffsetState>;
|
|
23
23
|
activationArea?: GestureActivationArea;
|
|
24
|
-
dimensions:
|
|
24
|
+
dimensions: Layout;
|
|
25
25
|
responseDistance?: number;
|
|
26
26
|
}
|
|
27
27
|
interface ReturnValues {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"check-gesture-activation.d.ts","sourceRoot":"","sources":["../../../../src/utils/gesture/check-gesture-activation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"check-gesture-activation.d.ts","sourceRoot":"","sources":["../../../../src/utils/gesture/check-gesture-activation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,mFAAmF,CAAC;AACjI,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,EAEN,KAAK,qBAAqB,EAC1B,kBAAkB,EAElB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAEpD,KAAK,UAAU,GAAG;IACjB,QAAQ,EAAE,OAAO,CAAC;IAClB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,UAAU,EAAE,OAAO,CAAC;IACpB,kBAAkB,EAAE,OAAO,CAAC;CAC5B,CAAC;AAEF,UAAU,2BAA2B;IACpC,YAAY,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACvC,KAAK,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAChC,UAAU,EAAE,UAAU,CAAC;IACvB,OAAO,CAAC,EAAE,uBAAuB,CAAC;IAClC,kBAAkB,EAAE,WAAW,CAAC,kBAAkB,CAAC,CAAC;IACpD,cAAc,CAAC,EAAE,qBAAqB,CAAC;IACvC,UAAU,EAAE,MAAM,CAAC;IACnB,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC1B;AA8BD,UAAU,YAAY;IACrB,aAAa,EAAE,OAAO,CAAC;IACvB,WAAW,EAAE,OAAO,CAAC;IACrB,cAAc,EAAE,OAAO,CAAC;IACxB,aAAa,EAAE,OAAO,CAAC;CACvB;AAiKD;;GAEG;AACH,eAAO,MAAM,gBAAgB,GAAI,iHAS9B,2BAA2B,KAAG,YA2EhC,CAAC"}
|
package/package.json
CHANGED
package/src/constants.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { ParamListBase, RouteProp } from "@react-navigation/native";
|
|
2
|
-
import type { ScaledSize } from "react-native";
|
|
3
2
|
import type { MeasuredDimensions } from "react-native-reanimated";
|
|
4
3
|
import type { ScreenTransitionState } from "./types/animation";
|
|
5
4
|
import type { BoundEntry } from "./types/bounds";
|
|
6
5
|
import type { ActivationArea } from "./types/gesture";
|
|
6
|
+
import type { Layout } from "./types/navigator";
|
|
7
7
|
import type { Complete } from "./types/utils";
|
|
8
8
|
import type { BoundsBuilderOptions } from "./utils/bounds/_types/builder";
|
|
9
9
|
|
|
@@ -57,7 +57,7 @@ export const ENTER_RANGE = [0, 1] as const;
|
|
|
57
57
|
export const EXIT_RANGE = [1, 2] as const;
|
|
58
58
|
|
|
59
59
|
export const FULLSCREEN_DIMENSIONS = (
|
|
60
|
-
dimensions:
|
|
60
|
+
dimensions: Layout,
|
|
61
61
|
): MeasuredDimensions => {
|
|
62
62
|
"worklet";
|
|
63
63
|
return {
|
|
@@ -18,6 +18,7 @@ import type {
|
|
|
18
18
|
|
|
19
19
|
import type { NativeStackDescriptor } from "../../types/navigator";
|
|
20
20
|
import { derivations } from "../../utils/animation/derivations";
|
|
21
|
+
import { createBounds } from "../../utils/bounds";
|
|
21
22
|
|
|
22
23
|
type BuiltState = {
|
|
23
24
|
progress: SharedValue<number>;
|
|
@@ -84,51 +85,49 @@ export function _useScreenAnimation() {
|
|
|
84
85
|
const nextAnimation = useBuildScreenTransitionState(nextDescriptor);
|
|
85
86
|
const prevAnimation = useBuildScreenTransitionState(previousDescriptor);
|
|
86
87
|
|
|
87
|
-
const screenInterpolatorProps = useDerivedValue<
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
},
|
|
131
|
-
);
|
|
88
|
+
const screenInterpolatorProps = useDerivedValue<
|
|
89
|
+
Omit<ScreenInterpolationProps, "bounds">
|
|
90
|
+
>(() => {
|
|
91
|
+
"worklet";
|
|
92
|
+
|
|
93
|
+
const previous = unwrap(prevAnimation, previousDescriptor?.route.key);
|
|
94
|
+
|
|
95
|
+
const next = nextDescriptor?.options?.enableTransitions
|
|
96
|
+
? unwrap(nextAnimation, nextDescriptor?.route.key)
|
|
97
|
+
: undefined;
|
|
98
|
+
|
|
99
|
+
const current =
|
|
100
|
+
unwrap(currentAnimation, currentDescriptor?.route.key) ??
|
|
101
|
+
DEFAULT_SCREEN_TRANSITION_STATE;
|
|
102
|
+
|
|
103
|
+
const {
|
|
104
|
+
progress,
|
|
105
|
+
focused,
|
|
106
|
+
activeBoundId,
|
|
107
|
+
active,
|
|
108
|
+
isActiveTransitioning,
|
|
109
|
+
isDismissing,
|
|
110
|
+
} = derivations({
|
|
111
|
+
current,
|
|
112
|
+
next,
|
|
113
|
+
previous,
|
|
114
|
+
});
|
|
115
|
+
|
|
116
|
+
return {
|
|
117
|
+
layouts: { screen: dimensions },
|
|
118
|
+
insets,
|
|
119
|
+
previous,
|
|
120
|
+
current,
|
|
121
|
+
next,
|
|
122
|
+
focused,
|
|
123
|
+
activeBoundId,
|
|
124
|
+
progress,
|
|
125
|
+
|
|
126
|
+
active,
|
|
127
|
+
isActiveTransitioning,
|
|
128
|
+
isDismissing,
|
|
129
|
+
};
|
|
130
|
+
});
|
|
132
131
|
|
|
133
132
|
const nextInterpolator = nextDescriptor?.options.screenStyleInterpolator;
|
|
134
133
|
const currentInterpolator =
|
|
@@ -142,5 +141,11 @@ export function _useScreenAnimation() {
|
|
|
142
141
|
export function useScreenAnimation() {
|
|
143
142
|
const { screenInterpolatorProps } = _useScreenAnimation();
|
|
144
143
|
|
|
145
|
-
return useDerivedValue(() =>
|
|
144
|
+
return useDerivedValue<ScreenInterpolationProps>(() => {
|
|
145
|
+
const props = screenInterpolatorProps.value;
|
|
146
|
+
return {
|
|
147
|
+
...props,
|
|
148
|
+
bounds: createBounds(props),
|
|
149
|
+
};
|
|
150
|
+
});
|
|
146
151
|
}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { createContext, useContext, useMemo } from "react";
|
|
2
|
-
import {
|
|
2
|
+
import { useDerivedValue } from "react-native-reanimated";
|
|
3
3
|
import { NO_STYLES } from "../constants";
|
|
4
4
|
import { _useScreenAnimation } from "../hooks/animation/use-screen-animation";
|
|
5
5
|
import type { TransitionInterpolatedStyle } from "../types/animation";
|
|
6
|
+
import { createBounds } from "../utils/bounds";
|
|
6
7
|
|
|
7
8
|
type Props = {
|
|
8
9
|
children: React.ReactNode;
|
|
@@ -18,21 +19,33 @@ export function TransitionStylesProvider({ children }: Props) {
|
|
|
18
19
|
const { screenInterpolatorProps, screenStyleInterpolator } =
|
|
19
20
|
_useScreenAnimation();
|
|
20
21
|
|
|
21
|
-
const isFunctionWorklet = isWorkletFunction(screenStyleInterpolator);
|
|
22
|
-
|
|
23
22
|
const stylesMap = useDerivedValue<TransitionInterpolatedStyle>(() => {
|
|
24
23
|
"worklet";
|
|
25
24
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
25
|
+
/**
|
|
26
|
+
* ### Maintainer note
|
|
27
|
+
*
|
|
28
|
+
* From my understanding, reanimated will serialize the DerivedValue result. Thus resulting in us receiving a `bounds is not a function, it is an object` error. We'll build the bounds function inside here (the final step) and pass it alongside the interpolator instead.
|
|
29
|
+
*/
|
|
30
|
+
const props = screenInterpolatorProps.value;
|
|
31
|
+
|
|
32
|
+
const bounds = createBounds(props);
|
|
33
|
+
try {
|
|
34
|
+
if (!screenStyleInterpolator) return NO_STYLES;
|
|
35
|
+
|
|
36
|
+
return screenStyleInterpolator({
|
|
37
|
+
...props,
|
|
38
|
+
bounds,
|
|
39
|
+
});
|
|
40
|
+
} catch (err) {
|
|
41
|
+
if (__DEV__) {
|
|
42
|
+
console.warn(
|
|
43
|
+
"[react-native-screen-transitions] screenStyleInterpolator must be a worklet",
|
|
44
|
+
err,
|
|
45
|
+
);
|
|
46
|
+
}
|
|
30
47
|
return NO_STYLES;
|
|
31
48
|
}
|
|
32
|
-
|
|
33
|
-
return screenStyleInterpolator
|
|
34
|
-
? screenStyleInterpolator(screenInterpolatorProps.value)
|
|
35
|
-
: NO_STYLES;
|
|
36
49
|
});
|
|
37
50
|
|
|
38
51
|
const value = useMemo(() => {
|
package/src/types/animation.ts
CHANGED
|
@@ -7,6 +7,7 @@ import type {
|
|
|
7
7
|
import type { EdgeInsets } from "react-native-safe-area-context";
|
|
8
8
|
import type { BoundEntry, BoundsAccessor } from "./bounds";
|
|
9
9
|
import type { GestureValues } from "./gesture";
|
|
10
|
+
import type { Layout } from "./navigator";
|
|
10
11
|
|
|
11
12
|
export type ScreenTransitionState = {
|
|
12
13
|
progress: number;
|
|
@@ -27,10 +28,7 @@ export interface ScreenInterpolationProps {
|
|
|
27
28
|
/** Layout measurements for the screen. */
|
|
28
29
|
layouts: {
|
|
29
30
|
/** The `width` and `height` of the screen container. */
|
|
30
|
-
screen:
|
|
31
|
-
width: number;
|
|
32
|
-
height: number;
|
|
33
|
-
};
|
|
31
|
+
screen: Layout;
|
|
34
32
|
};
|
|
35
33
|
/** The safe area insets for the screen. */
|
|
36
34
|
insets: EdgeInsets;
|
package/src/types/bounds.ts
CHANGED
|
@@ -14,76 +14,12 @@ import type { ScreenPhase } from "./core";
|
|
|
14
14
|
*/
|
|
15
15
|
export type BoundsMethod = "transform" | "size" | "content";
|
|
16
16
|
|
|
17
|
-
export type BoundsBuilder = {
|
|
18
|
-
/**
|
|
19
|
-
* Include gesture offsets (x/y) in the computed transform for all methods.
|
|
20
|
-
* This syncs the focused screen’s gesture deltas with the previous screen’s bound
|
|
21
|
-
* to give the shared look while interacting.
|
|
22
|
-
*/
|
|
23
|
-
gestures: (options?: { x?: number; y?: number }) => BoundsBuilder;
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* Animate to the full screen bounds as the destination.
|
|
27
|
-
* Useful when the next screen does not define a bound for the same id.
|
|
28
|
-
*/
|
|
29
|
-
toFullscreen: () => BoundsBuilder;
|
|
30
|
-
|
|
31
|
-
/**
|
|
32
|
-
* Compute using absolute window coordinates (pageX/pageY).
|
|
33
|
-
* No relative delta math—good when elements are unconstrained by parent layout.
|
|
34
|
-
*/
|
|
35
|
-
absolute: () => BoundsBuilder;
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* Compute using relative deltas between start/end bounds (dx/dy, scale).
|
|
39
|
-
* This makes the math bound-relative; great when elements are within layout constraints.
|
|
40
|
-
*/
|
|
41
|
-
relative: () => BoundsBuilder;
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
* Select transform method: translate + scaleX/scaleY (no width/height size).
|
|
45
|
-
* Note: x/y translation is applied for all methods when applicable.
|
|
46
|
-
*/
|
|
47
|
-
transform: () => BoundsBuilder;
|
|
48
|
-
|
|
49
|
-
/**
|
|
50
|
-
* Select size method: translate + width/height interpolation (no scaleX/scaleY).
|
|
51
|
-
*/
|
|
52
|
-
size: () => BoundsBuilder;
|
|
53
|
-
|
|
54
|
-
/**
|
|
55
|
-
* Select content method: screen-level transform to align destination content
|
|
56
|
-
* so its bound matches the source at progress start. This modifies where the
|
|
57
|
-
* bound sits within the screen rather than the bound’s own local transform.
|
|
58
|
-
*/
|
|
59
|
-
content: () => BoundsBuilder;
|
|
60
|
-
|
|
61
|
-
/**
|
|
62
|
-
* Select content scale mode: "aspectFill" (fill), "aspectFit" (fit), or "auto" (default).
|
|
63
|
-
*/
|
|
64
|
-
contentFill: () => BoundsBuilder;
|
|
65
|
-
|
|
66
|
-
/**
|
|
67
|
-
* Select content scale mode: "aspectFill" (fill), "aspectFit" (fit), or "auto" (default).
|
|
68
|
-
*/
|
|
69
|
-
contentFit: () => BoundsBuilder;
|
|
70
|
-
|
|
71
|
-
/**
|
|
72
|
-
* Build the final animated style.
|
|
73
|
-
* If a method is not explicitly selected via transform/resize/content,
|
|
74
|
-
* the provided argument will be used; defaults to "transform".
|
|
75
|
-
*/
|
|
76
|
-
build: (method?: BoundsMethod) => StyleProps;
|
|
77
|
-
};
|
|
78
|
-
|
|
79
17
|
export type BoundEntry = {
|
|
80
18
|
bounds: MeasuredDimensions;
|
|
81
19
|
styles: StyleProps;
|
|
82
20
|
};
|
|
83
21
|
|
|
84
22
|
export type BoundsAccessor = {
|
|
85
|
-
(id: string): BoundsBuilder;
|
|
86
|
-
(): BoundsBuilder;
|
|
87
23
|
<T extends BoundsBuilderOptions>(options: T): BoundsReturnType<T>;
|
|
88
24
|
get: (id?: string, phase?: ScreenPhase) => BoundEntry;
|
|
89
25
|
};
|
package/src/types/navigator.ts
CHANGED
|
@@ -25,6 +25,11 @@ import type {
|
|
|
25
25
|
import type { ScreenStyleInterpolator, TransitionSpec } from "./animation";
|
|
26
26
|
import type { GestureActivationArea, GestureDirection } from "./gesture";
|
|
27
27
|
|
|
28
|
+
export type Layout = {
|
|
29
|
+
width: number;
|
|
30
|
+
height: number;
|
|
31
|
+
};
|
|
32
|
+
|
|
28
33
|
export type NativeStackNavigationEventMap = {
|
|
29
34
|
/**
|
|
30
35
|
* Event which fires when a transition animation starts.
|
|
@@ -1,25 +1,18 @@
|
|
|
1
|
-
import type { ScaledSize } from "react-native";
|
|
2
1
|
import { Bounds } from "../../stores/bounds";
|
|
3
2
|
import type { ScreenTransitionState } from "../../types/animation";
|
|
4
|
-
import { createBounds } from "../bounds";
|
|
5
3
|
|
|
6
4
|
interface DerivationsParams {
|
|
7
5
|
current: ScreenTransitionState;
|
|
8
6
|
next?: ScreenTransitionState;
|
|
9
7
|
previous?: ScreenTransitionState;
|
|
10
|
-
dimensions: ScaledSize;
|
|
11
8
|
}
|
|
12
9
|
|
|
13
10
|
/**
|
|
14
11
|
* Additional values to help make defining animations easier.
|
|
15
12
|
*/
|
|
16
|
-
export const derivations = ({
|
|
17
|
-
current,
|
|
18
|
-
next,
|
|
19
|
-
previous,
|
|
20
|
-
dimensions,
|
|
21
|
-
}: DerivationsParams) => {
|
|
13
|
+
export const derivations = ({ current, next, previous }: DerivationsParams) => {
|
|
22
14
|
"worklet";
|
|
15
|
+
|
|
23
16
|
// The combined progress
|
|
24
17
|
const progress = current.progress + (next?.progress ?? 0);
|
|
25
18
|
|
|
@@ -30,26 +23,16 @@ export const derivations = ({
|
|
|
30
23
|
const isActiveTransitioning = !!(
|
|
31
24
|
active.gesture.isDragging || active.animating
|
|
32
25
|
);
|
|
26
|
+
|
|
33
27
|
const isDismissing = !!(active.gesture.isDismissing || active.closing);
|
|
34
28
|
|
|
35
29
|
// The active bound id
|
|
36
30
|
const activeBoundId = Bounds.getActiveBound(current, next, previous);
|
|
37
31
|
|
|
38
|
-
// bounds api
|
|
39
|
-
const bounds = createBounds({
|
|
40
|
-
activeBoundId,
|
|
41
|
-
current,
|
|
42
|
-
previous,
|
|
43
|
-
next,
|
|
44
|
-
progress,
|
|
45
|
-
dimensions,
|
|
46
|
-
});
|
|
47
|
-
|
|
48
32
|
return {
|
|
49
33
|
progress,
|
|
50
34
|
focused,
|
|
51
35
|
activeBoundId,
|
|
52
|
-
bounds,
|
|
53
36
|
active,
|
|
54
37
|
isActiveTransitioning,
|
|
55
38
|
isDismissing,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { ScaledSize } from "react-native";
|
|
2
1
|
import type { MeasuredDimensions, StyleProps } from "react-native-reanimated";
|
|
3
2
|
import type { ScreenTransitionState } from "../../../types/animation";
|
|
4
3
|
import type { BoundsMethod } from "../../../types/bounds";
|
|
4
|
+
import type { Layout } from "../../../types/navigator";
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Params passed to the builder initializer. No method required here.
|
|
@@ -12,7 +12,7 @@ export type BoundsBuilderInitParams = {
|
|
|
12
12
|
current: ScreenTransitionState;
|
|
13
13
|
next?: ScreenTransitionState;
|
|
14
14
|
progress: number;
|
|
15
|
-
dimensions:
|
|
15
|
+
dimensions: Layout;
|
|
16
16
|
};
|
|
17
17
|
|
|
18
18
|
export type BoundsAnchor =
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ScaledSize } from "react-native";
|
|
2
1
|
import type { MeasuredDimensions } from "react-native-reanimated";
|
|
2
|
+
import type { Layout } from "../../../types/navigator";
|
|
3
3
|
import type { BoundsAnchor, BoundsScaleMode } from "../_types/builder";
|
|
4
4
|
import type {
|
|
5
5
|
ContentTransformGeometry,
|
|
@@ -109,7 +109,7 @@ export function computeContentTransformGeometry({
|
|
|
109
109
|
start: MeasuredDimensions;
|
|
110
110
|
end: MeasuredDimensions;
|
|
111
111
|
entering: boolean;
|
|
112
|
-
dimensions:
|
|
112
|
+
dimensions: Layout;
|
|
113
113
|
anchor?: BoundsAnchor;
|
|
114
114
|
scaleMode?: BoundsScaleMode;
|
|
115
115
|
}): ContentTransformGeometry {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import type { ScaledSize } from "react-native";
|
|
2
1
|
import type { MeasuredDimensions } from "react-native-reanimated";
|
|
3
2
|
import type { Complete } from "../../types/utils";
|
|
4
3
|
import type { BoundsBuilderOptions } from "./_types/builder";
|
|
4
|
+
import type { Layout } from "../ ../../../types/navigator";
|
|
5
5
|
|
|
6
6
|
export const FULLSCREEN_DIMENSIONS = (
|
|
7
|
-
dimensions:
|
|
7
|
+
dimensions: Layout,
|
|
8
8
|
): MeasuredDimensions => {
|
|
9
9
|
"worklet";
|
|
10
10
|
return {
|