react-native-screen-transitions 3.7.0-beta.0 → 3.7.0-beta.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/shared/components/activity/helpers.js +1 -1
- package/lib/commonjs/shared/components/activity/helpers.js.map +1 -1
- package/lib/commonjs/shared/components/activity/variants/activity-screen.js +4 -3
- package/lib/commonjs/shared/components/activity/variants/activity-screen.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/animation/helpers/accessors/use-build-transition-accessor.js +10 -1
- package/lib/commonjs/shared/providers/screen/animation/helpers/accessors/use-build-transition-accessor.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/animation/helpers/pipeline.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/animation/helpers/read-screen-animation-revisions.js +20 -0
- package/lib/commonjs/shared/providers/screen/animation/helpers/read-screen-animation-revisions.js.map +1 -0
- package/lib/commonjs/shared/providers/screen/animation/use-screen-animation.js +2 -13
- package/lib/commonjs/shared/providers/screen/animation/use-screen-animation.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/gestures/ownership/shadowing-claims.js +18 -0
- package/lib/commonjs/shared/providers/screen/gestures/ownership/shadowing-claims.js.map +1 -0
- package/lib/commonjs/shared/providers/screen/gestures/ownership/use-walk-up-and-register-shadowing-claims.js +47 -1
- package/lib/commonjs/shared/providers/screen/gestures/ownership/use-walk-up-and-register-shadowing-claims.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/styles/hooks/use-interpolated-style-maps.js +12 -3
- package/lib/commonjs/shared/providers/screen/styles/hooks/use-interpolated-style-maps.js.map +1 -1
- package/lib/commonjs/shared/providers/stack/helpers/managed-stack-state/helpers/build-managed-stack-state.js +23 -20
- package/lib/commonjs/shared/providers/stack/helpers/managed-stack-state/helpers/build-managed-stack-state.js.map +1 -1
- package/lib/module/shared/components/activity/helpers.js +1 -1
- package/lib/module/shared/components/activity/helpers.js.map +1 -1
- package/lib/module/shared/components/activity/variants/activity-screen.js +4 -3
- package/lib/module/shared/components/activity/variants/activity-screen.js.map +1 -1
- package/lib/module/shared/providers/screen/animation/helpers/accessors/use-build-transition-accessor.js +10 -1
- package/lib/module/shared/providers/screen/animation/helpers/accessors/use-build-transition-accessor.js.map +1 -1
- package/lib/module/shared/providers/screen/animation/helpers/pipeline.js.map +1 -1
- package/lib/module/shared/providers/screen/animation/helpers/read-screen-animation-revisions.js +15 -0
- package/lib/module/shared/providers/screen/animation/helpers/read-screen-animation-revisions.js.map +1 -0
- package/lib/module/shared/providers/screen/animation/use-screen-animation.js +1 -12
- package/lib/module/shared/providers/screen/animation/use-screen-animation.js.map +1 -1
- package/lib/module/shared/providers/screen/gestures/ownership/shadowing-claims.js +13 -0
- package/lib/module/shared/providers/screen/gestures/ownership/shadowing-claims.js.map +1 -0
- package/lib/module/shared/providers/screen/gestures/ownership/use-walk-up-and-register-shadowing-claims.js +49 -3
- package/lib/module/shared/providers/screen/gestures/ownership/use-walk-up-and-register-shadowing-claims.js.map +1 -1
- package/lib/module/shared/providers/screen/styles/hooks/use-interpolated-style-maps.js +12 -3
- package/lib/module/shared/providers/screen/styles/hooks/use-interpolated-style-maps.js.map +1 -1
- package/lib/module/shared/providers/stack/helpers/managed-stack-state/helpers/build-managed-stack-state.js +23 -20
- package/lib/module/shared/providers/stack/helpers/managed-stack-state/helpers/build-managed-stack-state.js.map +1 -1
- package/lib/module/shared/types/animation.types.js.map +1 -1
- package/lib/typescript/blank-stack/types.d.ts +10 -9
- package/lib/typescript/blank-stack/types.d.ts.map +1 -1
- package/lib/typescript/shared/components/activity/helpers.d.ts.map +1 -1
- package/lib/typescript/shared/components/activity/variants/activity-screen.d.ts.map +1 -1
- package/lib/typescript/shared/index.d.ts +1 -1
- package/lib/typescript/shared/index.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/animation/helpers/accessors/use-build-transition-accessor.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/animation/helpers/pipeline.d.ts +1 -1
- package/lib/typescript/shared/providers/screen/animation/helpers/pipeline.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/animation/helpers/read-screen-animation-revisions.d.ts +3 -0
- package/lib/typescript/shared/providers/screen/animation/helpers/read-screen-animation-revisions.d.ts.map +1 -0
- package/lib/typescript/shared/providers/screen/animation/use-screen-animation.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/gestures/ownership/shadowing-claims.d.ts +8 -0
- package/lib/typescript/shared/providers/screen/gestures/ownership/shadowing-claims.d.ts.map +1 -0
- package/lib/typescript/shared/providers/screen/gestures/ownership/use-walk-up-and-register-shadowing-claims.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/styles/hooks/use-interpolated-style-maps.d.ts.map +1 -1
- package/lib/typescript/shared/providers/stack/helpers/managed-stack-state/helpers/build-managed-stack-state.d.ts.map +1 -1
- package/lib/typescript/shared/providers/stack/helpers/managed-stack-state/helpers/types.d.ts +2 -3
- package/lib/typescript/shared/providers/stack/helpers/managed-stack-state/helpers/types.d.ts.map +1 -1
- package/lib/typescript/shared/types/animation.types.d.ts +14 -0
- package/lib/typescript/shared/types/animation.types.d.ts.map +1 -1
- package/lib/typescript/shared/types/index.d.ts +1 -1
- package/lib/typescript/shared/types/index.d.ts.map +1 -1
- package/lib/typescript/shared/types/screen.types.d.ts +15 -14
- package/lib/typescript/shared/types/screen.types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/blank-stack/types.ts +10 -9
- package/src/shared/components/activity/helpers.ts +1 -1
- package/src/shared/components/activity/variants/activity-screen.tsx +4 -3
- package/src/shared/index.ts +3 -0
- package/src/shared/providers/screen/animation/helpers/accessors/use-build-transition-accessor.ts +14 -0
- package/src/shared/providers/screen/animation/helpers/pipeline.ts +4 -1
- package/src/shared/providers/screen/animation/helpers/read-screen-animation-revisions.ts +25 -0
- package/src/shared/providers/screen/animation/use-screen-animation.tsx +1 -21
- package/src/shared/providers/screen/gestures/ownership/shadowing-claims.ts +18 -0
- package/src/shared/providers/screen/gestures/ownership/use-walk-up-and-register-shadowing-claims.ts +64 -3
- package/src/shared/providers/screen/styles/hooks/use-interpolated-style-maps.tsx +15 -1
- package/src/shared/providers/stack/helpers/managed-stack-state/helpers/build-managed-stack-state.ts +38 -24
- package/src/shared/providers/stack/helpers/managed-stack-state/helpers/types.ts +2 -3
- package/src/shared/types/animation.types.ts +18 -0
- package/src/shared/types/index.ts +3 -0
- package/src/shared/types/screen.types.ts +15 -14
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type DerivedValue, type SharedValue } from "react-native-reanimated";
|
|
2
2
|
import type { ScreenInterpolationProps, ScreenStyleInterpolator } from "../../../../types/animation.types";
|
|
3
3
|
import type { SelectedInterpolatorOptions } from "./selected-interpolator-options";
|
|
4
|
-
export type ScreenInterpolatorFrame = Omit<ScreenInterpolationProps, "bounds">;
|
|
4
|
+
export type ScreenInterpolatorFrame = Omit<ScreenInterpolationProps, "bounds" | "transition">;
|
|
5
5
|
interface ScreenAnimationPipeline {
|
|
6
6
|
screenInterpolatorProps: SharedValue<ScreenInterpolatorFrame>;
|
|
7
7
|
screenInterpolatorPropsRevision: DerivedValue<number>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pipeline.d.ts","sourceRoot":"","sources":["../../../../../../../src/shared/providers/screen/animation/helpers/pipeline.ts"],"names":[],"mappings":"AAEA,OAAO,EACN,KAAK,YAAY,EACjB,KAAK,WAAW,EAGhB,MAAM,yBAAyB,CAAC;AAKjC,OAAO,KAAK,EACX,wBAAwB,EACxB,uBAAuB,EACvB,MAAM,mCAAmC,CAAC;AAM3C,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,iCAAiC,CAAC;AAInF,MAAM,MAAM,uBAAuB,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"pipeline.d.ts","sourceRoot":"","sources":["../../../../../../../src/shared/providers/screen/animation/helpers/pipeline.ts"],"names":[],"mappings":"AAEA,OAAO,EACN,KAAK,YAAY,EACjB,KAAK,WAAW,EAGhB,MAAM,yBAAyB,CAAC;AAKjC,OAAO,KAAK,EACX,wBAAwB,EACxB,uBAAuB,EACvB,MAAM,mCAAmC,CAAC;AAM3C,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,iCAAiC,CAAC;AAInF,MAAM,MAAM,uBAAuB,GAAG,IAAI,CACzC,wBAAwB,EACxB,QAAQ,GAAG,YAAY,CACvB,CAAC;AAEF,UAAU,uBAAuB;IAChC,uBAAuB,EAAE,WAAW,CAAC,uBAAuB,CAAC,CAAC;IAC9D,+BAA+B,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC;IACtD,2BAA2B,EAAE,WAAW,CAAC,2BAA2B,CAAC,CAAC;IACtE,gBAAgB,EAAE,uBAAuB,GAAG,SAAS,CAAC;IACtD,mBAAmB,EAAE,uBAAuB,GAAG,SAAS,CAAC;CACzD;AA0BD,wBAAgB,0BAA0B,IAAI,uBAAuB,CAyHpE"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { ScreenAnimationDescendantSources, ScreenAnimationSource, ScreenInterpolatorPropsRevision } from "../types";
|
|
2
|
+
export declare const readScreenAnimationRevisions: (screenInterpolatorPropsRevision: ScreenInterpolatorPropsRevision, ancestorScreenAnimationSources: ScreenAnimationSource[], descendantScreenAnimationSources: ScreenAnimationDescendantSources) => void;
|
|
3
|
+
//# sourceMappingURL=read-screen-animation-revisions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"read-screen-animation-revisions.d.ts","sourceRoot":"","sources":["../../../../../../../src/shared/providers/screen/animation/helpers/read-screen-animation-revisions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,gCAAgC,EAChC,qBAAqB,EACrB,+BAA+B,EAC/B,MAAM,UAAU,CAAC;AAElB,eAAO,MAAM,4BAA4B,GACxC,iCAAiC,+BAA+B,EAChE,gCAAgC,qBAAqB,EAAE,EACvD,kCAAkC,gCAAgC,SAelE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-screen-animation.d.ts","sourceRoot":"","sources":["../../../../../../src/shared/providers/screen/animation/use-screen-animation.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAmB,MAAM,yBAAyB,CAAC;AAC7E,OAAO,KAAK,EACX,wBAAwB,EACxB,sBAAsB,EACtB,MAAM,gCAAgC,CAAC;
|
|
1
|
+
{"version":3,"file":"use-screen-animation.d.ts","sourceRoot":"","sources":["../../../../../../src/shared/providers/screen/animation/use-screen-animation.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAmB,MAAM,yBAAyB,CAAC;AAC7E,OAAO,KAAK,EACX,wBAAwB,EACxB,sBAAsB,EACtB,MAAM,gCAAgC,CAAC;AAIxC,OAAO,KAAK,EACX,2BAA2B,EAE3B,MAAM,SAAS,CAAC;AAEjB,YAAY,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAErD,wBAAgB,kBAAkB,IAAI,YAAY,CAAC,wBAAwB,CAAC,CAAC;AAC7E,wBAAgB,kBAAkB,CAAC,MAAM,EAAE;IAC1C,KAAK,EAAE,CAAC,CAAC;CACT,GAAG,YAAY,CAAC,wBAAwB,CAAC,CAAC;AAC3C,sCAAsC;AACtC,wBAAgB,kBAAkB,CACjC,MAAM,EAAE,MAAM,GACZ,YAAY,CAAC,wBAAwB,CAAC,CAAC;AAC1C,wBAAgB,kBAAkB,CACjC,MAAM,EAAE,sBAAsB,GAC5B,YAAY,CAAC,wBAAwB,GAAG,IAAI,CAAC,CAAC;AACjD,mCAAmC;AACnC,wBAAgB,kBAAkB,CACjC,MAAM,EAAE,OAAO,CAAC,2BAA2B,EAAE,MAAM,CAAC,GAClD,YAAY,CAAC,wBAAwB,GAAG,IAAI,CAAC,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ClaimedDirections } from "../../../../types/ownership.types";
|
|
2
|
+
import type { StackSceneActivity } from "../../../../types/stack.types";
|
|
3
|
+
export declare const resolveShadowingClaimDirections: ({ currentActivity, currentClaimedDirections, previousClaimedDirections, }: {
|
|
4
|
+
currentActivity: StackSceneActivity | undefined;
|
|
5
|
+
currentClaimedDirections: ClaimedDirections;
|
|
6
|
+
previousClaimedDirections: ClaimedDirections;
|
|
7
|
+
}) => ClaimedDirections;
|
|
8
|
+
//# sourceMappingURL=shadowing-claims.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shadowing-claims.d.ts","sourceRoot":"","sources":["../../../../../../../src/shared/providers/screen/gestures/ownership/shadowing-claims.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AAC3E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAExE,eAAO,MAAM,+BAA+B,GAAI,2EAI7C;IACF,eAAe,EAAE,kBAAkB,GAAG,SAAS,CAAC;IAChD,wBAAwB,EAAE,iBAAiB,CAAC;IAC5C,yBAAyB,EAAE,iBAAiB,CAAC;CAC7C,KAAG,iBAMH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-walk-up-and-register-shadowing-claims.d.ts","sourceRoot":"","sources":["../../../../../../../src/shared/providers/screen/gestures/ownership/use-walk-up-and-register-shadowing-claims.ts"],"names":[],"mappings":"AAEA,OAAO,EACN,KAAK,iBAAiB,
|
|
1
|
+
{"version":3,"file":"use-walk-up-and-register-shadowing-claims.d.ts","sourceRoot":"","sources":["../../../../../../../src/shared/providers/screen/gestures/ownership/use-walk-up-and-register-shadowing-claims.ts"],"names":[],"mappings":"AAEA,OAAO,EACN,KAAK,iBAAiB,EAItB,MAAM,mCAAmC,CAAC;AAoH3C;;;;;;;;;;GAUG;AACH,wBAAgB,mCAAmC,CAClD,iBAAiB,EAAE,iBAAiB,GAClC,IAAI,CAqDN"}
|
package/lib/typescript/shared/providers/screen/styles/hooks/use-interpolated-style-maps.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-interpolated-style-maps.d.ts","sourceRoot":"","sources":["../../../../../../../src/shared/providers/screen/styles/hooks/use-interpolated-style-maps.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"use-interpolated-style-maps.d.ts","sourceRoot":"","sources":["../../../../../../../src/shared/providers/screen/styles/hooks/use-interpolated-style-maps.tsx"],"names":[],"mappings":"AAsBA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAwFvE;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,eAAO,MAAM,wBAAwB,wEA6HpC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build-managed-stack-state.d.ts","sourceRoot":"","sources":["../../../../../../../../src/shared/providers/stack/helpers/managed-stack-state/helpers/build-managed-stack-state.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oDAAoD,CAAC;AAC5F,OAAO,KAAK,EACX,mBAAmB,EACnB,mBAAmB,EAInB,MAAM,kCAAkC,CAAC;AAW1C,OAAO,KAAK,EACX,gBAAgB,EAChB,wBAAwB,EAExB,aAAa,EAEb,MAAM,SAAS,CAAC;AAEjB,KAAK,4BAA4B,CAChC,WAAW,SAAS,mBAAmB,EACvC,WAAW,SAAS,mBAAmB,IACpC;IACH,KAAK,EAAE,iBAAiB,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC;IACnD,MAAM,EAAE,aAAa,CAAC,WAAW,CAAC,CAAC;IACnC,WAAW,EAAE,wBAAwB,CAAC,WAAW,CAAC,CAAC;IACnD,gBAAgB,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IACtC,aAAa,CAAC,EAAE,gBAAgB,CAAC,WAAW,CAAC,CAAC;CAC9C,CAAC;
|
|
1
|
+
{"version":3,"file":"build-managed-stack-state.d.ts","sourceRoot":"","sources":["../../../../../../../../src/shared/providers/stack/helpers/managed-stack-state/helpers/build-managed-stack-state.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oDAAoD,CAAC;AAC5F,OAAO,KAAK,EACX,mBAAmB,EACnB,mBAAmB,EAInB,MAAM,kCAAkC,CAAC;AAW1C,OAAO,KAAK,EACX,gBAAgB,EAChB,wBAAwB,EAExB,aAAa,EAEb,MAAM,SAAS,CAAC;AAEjB,KAAK,4BAA4B,CAChC,WAAW,SAAS,mBAAmB,EACvC,WAAW,SAAS,mBAAmB,IACpC;IACH,KAAK,EAAE,iBAAiB,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC;IACnD,MAAM,EAAE,aAAa,CAAC,WAAW,CAAC,CAAC;IACnC,WAAW,EAAE,wBAAwB,CAAC,WAAW,CAAC,CAAC;IACnD,gBAAgB,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IACtC,aAAa,CAAC,EAAE,gBAAgB,CAAC,WAAW,CAAC,CAAC;CAC9C,CAAC;AAmRF,eAAO,MAAM,sBAAsB,GAClC,WAAW,SAAS,mBAAmB,EACvC,WAAW,SAAS,mBAAmB,EAEvC,QAAQ,4BAA4B,CAAC,WAAW,EAAE,WAAW,CAAC,KAC5D,gBAAgB,CAAC,WAAW,CA+D9B,CAAC"}
|
package/lib/typescript/shared/providers/stack/helpers/managed-stack-state/helpers/types.d.ts
CHANGED
|
@@ -33,8 +33,7 @@ export type ReconciledRoutes<TDescriptor extends BaseStackDescriptor> = {
|
|
|
33
33
|
descriptors: ManagedDescriptorSources<TDescriptor>;
|
|
34
34
|
};
|
|
35
35
|
export type SceneActivityWindow = {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
topIsClosing: boolean;
|
|
36
|
+
activeIndex: number;
|
|
37
|
+
inertIndex: number;
|
|
39
38
|
};
|
|
40
39
|
//# sourceMappingURL=types.d.ts.map
|
package/lib/typescript/shared/providers/stack/helpers/managed-stack-state/helpers/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../../../src/shared/providers/stack/helpers/managed-stack-state/helpers/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oDAAoD,CAAC;AAC5F,OAAO,KAAK,EACX,mBAAmB,EACnB,mBAAmB,EACnB,cAAc,EACd,cAAc,EACd,qBAAqB,EACrB,MAAM,kCAAkC,CAAC;AAE1C,MAAM,MAAM,aAAa,CAAC,WAAW,SAAS,mBAAmB,IAChE,WAAW,CAAC,OAAO,CAAC,EAAE,CAAC;AAExB,MAAM,MAAM,kBAAkB,CAAC,WAAW,SAAS,mBAAmB,IACrE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;AAE7B,MAAM,MAAM,wBAAwB,CAAC,WAAW,SAAS,mBAAmB,IAC3E,MAAM,CAAC,MAAM,EAAE,qBAAqB,CAAC,WAAW,CAAC,CAAC,CAAC;AAEpD,MAAM,MAAM,gBAAgB,CAAC,WAAW,SAAS,mBAAmB,IAAI;IACvE,MAAM,EAAE,aAAa,CAAC,WAAW,CAAC,CAAC;IACnC,WAAW,EAAE,kBAAkB,CAAC,WAAW,CAAC,CAAC;IAC7C,iBAAiB,EAAE,wBAAwB,CAAC,WAAW,CAAC,CAAC;IACzD,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC1C,MAAM,EAAE,cAAc,CAAC,WAAW,CAAC,EAAE,CAAC;IACtC,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,sBAAsB,EAAE,OAAO,CAAC;IAChC,gBAAgB,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;CACtC,CAAC;AAEF,MAAM,MAAM,8BAA8B,CACzC,WAAW,SAAS,mBAAmB,IACpC;IACH,KAAK,EAAE,gBAAgB,CAAC,WAAW,CAAC,CAAC;CACrC,CAAC;AAEF,MAAM,MAAM,sBAAsB,CACjC,WAAW,SAAS,mBAAmB,EACvC,WAAW,SAAS,mBAAmB,IACpC;IACH,SAAS,EAAE,CAAC,QAAQ,EAAE,MAAM,IAAI,KAAK,MAAM,IAAI,CAAC;IAChD,WAAW,EAAE,MAAM,8BAA8B,CAAC,WAAW,CAAC,CAAC;IAC/D,MAAM,EAAE,CAAC,KAAK,EAAE,iBAAiB,CAAC,WAAW,EAAE,WAAW,CAAC,KAAK,IAAI,CAAC;IACrE,gBAAgB,EAAE,CAAC,OAAO,EAAE;QAAE,KAAK,EAAE,cAAc,CAAA;KAAE,KAAK,IAAI,CAAC;IAC/D,cAAc,EAAE,CAAC,OAAO,EAAE;QAAE,KAAK,EAAE,cAAc,CAAA;KAAE,KAAK,OAAO,CAAC;CAChE,CAAC;AAEF,MAAM,MAAM,gBAAgB,CAAC,WAAW,SAAS,mBAAmB,IAAI;IACvE,MAAM,EAAE,aAAa,CAAC,WAAW,CAAC,CAAC;IACnC,WAAW,EAAE,wBAAwB,CAAC,WAAW,CAAC,CAAC;CACnD,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IACjC,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../../../src/shared/providers/stack/helpers/managed-stack-state/helpers/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oDAAoD,CAAC;AAC5F,OAAO,KAAK,EACX,mBAAmB,EACnB,mBAAmB,EACnB,cAAc,EACd,cAAc,EACd,qBAAqB,EACrB,MAAM,kCAAkC,CAAC;AAE1C,MAAM,MAAM,aAAa,CAAC,WAAW,SAAS,mBAAmB,IAChE,WAAW,CAAC,OAAO,CAAC,EAAE,CAAC;AAExB,MAAM,MAAM,kBAAkB,CAAC,WAAW,SAAS,mBAAmB,IACrE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;AAE7B,MAAM,MAAM,wBAAwB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MAAM,gBAAgB,CAAC,WAAW,SAAS,mBAAmB,IAAI;IACvE,MAAM,EAAE,aAAa,CAAC,WAAW,CAAC,CAAC;IACnC,WAAW,EAAE,wBAAwB,CAAC,WAAW,CAAC,CAAC;CACnD,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IACjC,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;CACnB,CAAC"}
|
|
@@ -133,6 +133,7 @@ export type ScreenTransitionDepthTarget = {
|
|
|
133
133
|
depth: number;
|
|
134
134
|
};
|
|
135
135
|
export type ScreenTransitionTarget = ScreenTransitionDepthTarget;
|
|
136
|
+
export type ScreenTransitionAccessor = (target?: ScreenTransitionTarget) => ScreenInterpolationProps | null;
|
|
136
137
|
export interface ScreenInterpolationProps {
|
|
137
138
|
/**
|
|
138
139
|
* Values for the screen that came before the current one in the navigation stack.
|
|
@@ -186,6 +187,19 @@ export interface ScreenInterpolationProps {
|
|
|
186
187
|
* Function that provides access to bounds helpers for shared screen transitions.
|
|
187
188
|
*/
|
|
188
189
|
bounds: BoundsAccessor;
|
|
190
|
+
/**
|
|
191
|
+
* Resolves interpolation props for this screen's transition timeline or an
|
|
192
|
+
* ancestor/descendant transition timeline.
|
|
193
|
+
*
|
|
194
|
+
* Calling without a target returns the current transition.
|
|
195
|
+
* `transition({ depth: -1 })` returns the immediate parent transition.
|
|
196
|
+
* `transition({ depth: 1 })` returns the immediate child transition.
|
|
197
|
+
* `transition({ depth: 0 })` returns the current transition.
|
|
198
|
+
*
|
|
199
|
+
* When called from a returned transition scope, targets are resolved relative
|
|
200
|
+
* to that scope.
|
|
201
|
+
*/
|
|
202
|
+
transition: ScreenTransitionAccessor;
|
|
189
203
|
/**
|
|
190
204
|
* The screen state that is currently driving the transition (either current or next, whichever is focused).
|
|
191
205
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"animation.types.d.ts","sourceRoot":"","sources":["../../../../src/shared/types/animation.types.ts"],"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;IAC/B,kFAAkF;IAClF,OAAO,CAAC,EAAE,mBAAmB,CAAC;IAC9B,wEAAwE;IACxE,CAAC,kCAAkC,CAAC,CAAC,EAAE,mBAAmB,CAAC;IAC3D,sEAAsE;IACtE,CAAC,gCAAgC,CAAC,CAAC,EAAE,mBAAmB,CAAC;IACzD,gEAAgE;IAChE,CAAC,EAAE,EAAE,MAAM,GAAG,mBAAmB,GAAG,6BAA6B,GAAG,SAAS,CAAC;CAC9E,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,gBAAgB,GAAG,gBAAgB,CAAC;AAElE;;GAEG;AACH,MAAM,WAAW,cAAc;IAC9B;;OAEG;IACH,IAAI,CAAC,EAAE,eAAe,CAAC;IACvB;;OAEG;IACH,KAAK,CAAC,EAAE,eAAe,CAAC;IACxB;;;OAGG;IACH,MAAM,CAAC,EAAE,eAAe,CAAC;IACzB;;;OAGG;IACH,QAAQ,CAAC,EAAE,eAAe,CAAC;CAC3B"}
|
|
1
|
+
{"version":3,"file":"animation.types.d.ts","sourceRoot":"","sources":["../../../../src/shared/types/animation.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzD,OAAO,KAAK,EACX,UAAU,EACV,gBAAgB,EAChB,gBAAgB,EAChB,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,EACN,kCAAkC,EAClC,gCAAgC,EAChC,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AACrD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,KAAK,EAAE,aAAa,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AAC5E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAEpD;;;;;;GAMG;AACH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M,WAAW,cAAc;IAC9B;;OAEG;IACH,IAAI,CAAC,EAAE,eAAe,CAAC;IACvB;;OAEG;IACH,KAAK,CAAC,EAAE,eAAe,CAAC;IACxB;;;OAGG;IACH,MAAM,CAAC,EAAE,eAAe,CAAC;IACzB;;;OAGG;IACH,QAAQ,CAAC,EAAE,eAAe,CAAC;CAC3B"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { FALSE, TRUE } from "../constants";
|
|
2
|
-
export type { AnimatedViewStyle, AnimationConfig, ScreenInterpolationProps, ScreenStyleInterpolator, ScreenTransitionOptions, ScreenTransitionState, TransitionInterpolatedStyle, TransitionInterpolatorOptions, TransitionSlotStyle, TransitionSpec, } from "./animation.types";
|
|
2
|
+
export type { AnimatedViewStyle, AnimationConfig, ScreenInterpolationProps, ScreenStyleInterpolator, ScreenTransitionAccessor, ScreenTransitionDepthTarget, ScreenTransitionOptions, ScreenTransitionState, ScreenTransitionTarget, TransitionInterpolatedStyle, TransitionInterpolatorOptions, TransitionSlotStyle, TransitionSpec, } from "./animation.types";
|
|
3
3
|
export type { BoundsAccessor, BoundsMethod, BoundsNavigationAccessor, BoundsNavigationRevealOptions, BoundsNavigationRevealStyle, BoundsNavigationZoomOpacityRange, BoundsNavigationZoomOpacityRanges, BoundsNavigationZoomOptions, BoundsNavigationZoomStyle, } from "./bounds.types";
|
|
4
4
|
export type { ActivationArea, GestureActivationArea, GestureDirection, GestureValues, PanGestureDirection, PinchGestureDirection, SideActivation, } from "./gesture.types";
|
|
5
5
|
export type { OverlayProps } from "./overlay.types";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/shared/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAC3C,YAAY,EACX,iBAAiB,EACjB,eAAe,EACf,wBAAwB,EACxB,uBAAuB,EACvB,uBAAuB,EACvB,qBAAqB,EACrB,2BAA2B,EAC3B,6BAA6B,EAC7B,mBAAmB,EACnB,cAAc,GACd,MAAM,mBAAmB,CAAC;AAC3B,YAAY,EACX,cAAc,EACd,YAAY,EACZ,wBAAwB,EACxB,6BAA6B,EAC7B,2BAA2B,EAC3B,gCAAgC,EAChC,iCAAiC,EACjC,2BAA2B,EAC3B,yBAAyB,GACzB,MAAM,gBAAgB,CAAC;AACxB,YAAY,EACX,cAAc,EACd,qBAAqB,EACrB,gBAAgB,EAChB,aAAa,EACb,mBAAmB,EACnB,qBAAqB,EACrB,cAAc,GACd,MAAM,iBAAiB,CAAC;AACzB,YAAY,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACpD,YAAY,EACX,eAAe,EACf,gBAAgB,EAChB,MAAM,EACN,SAAS,EACT,sBAAsB,EACtB,oBAAoB,GACpB,MAAM,gBAAgB,CAAC;AACxB,YAAY,EACX,mBAAmB,EACnB,mBAAmB,EACnB,cAAc,EACd,cAAc,EACd,cAAc,EACd,aAAa,EACb,qBAAqB,EACrB,kBAAkB,GAClB,MAAM,eAAe,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/shared/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAC3C,YAAY,EACX,iBAAiB,EACjB,eAAe,EACf,wBAAwB,EACxB,uBAAuB,EACvB,wBAAwB,EACxB,2BAA2B,EAC3B,uBAAuB,EACvB,qBAAqB,EACrB,sBAAsB,EACtB,2BAA2B,EAC3B,6BAA6B,EAC7B,mBAAmB,EACnB,cAAc,GACd,MAAM,mBAAmB,CAAC;AAC3B,YAAY,EACX,cAAc,EACd,YAAY,EACZ,wBAAwB,EACxB,6BAA6B,EAC7B,2BAA2B,EAC3B,gCAAgC,EAChC,iCAAiC,EACjC,2BAA2B,EAC3B,yBAAyB,GACzB,MAAM,gBAAgB,CAAC;AACxB,YAAY,EACX,cAAc,EACd,qBAAqB,EACrB,gBAAgB,EAChB,aAAa,EACb,mBAAmB,EACnB,qBAAqB,EACrB,cAAc,GACd,MAAM,iBAAiB,CAAC;AACzB,YAAY,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AACpD,YAAY,EACX,eAAe,EACf,gBAAgB,EAChB,MAAM,EACN,SAAS,EACT,sBAAsB,EACtB,oBAAoB,GACpB,MAAM,gBAAgB,CAAC;AACxB,YAAY,EACX,mBAAmB,EACnB,mBAAmB,EACnB,cAAc,EACd,cAAc,EACd,cAAc,EACd,aAAa,EACb,qBAAqB,EACrB,kBAAkB,GAClB,MAAM,eAAe,CAAC"}
|
|
@@ -31,27 +31,28 @@ export type BackdropBehavior = "block" | "passthrough" | "dismiss" | "collapse";
|
|
|
31
31
|
/**
|
|
32
32
|
* Controls how an inactive screen is retained after it is no longer active.
|
|
33
33
|
*
|
|
34
|
-
* - `
|
|
35
|
-
* keep inactive screen mounted,
|
|
36
|
-
*
|
|
37
|
-
*
|
|
34
|
+
* - `hide`
|
|
35
|
+
* keep inactive screen mounted, pause/freeze inactive work where supported,
|
|
36
|
+
* and hide inactive paint/native presentation after safe paint
|
|
37
|
+
* RNS: activityState=0, visible=false, shouldFreeze=true
|
|
38
|
+
* React Activity: mode="hidden" with paint hidden
|
|
38
39
|
*
|
|
39
|
-
* - `
|
|
40
|
-
* keep last painted UI visible but
|
|
41
|
-
* RNS: activityState=1, visible=true,
|
|
40
|
+
* - `pause`
|
|
41
|
+
* keep last painted UI visible but pause/freeze inactive work where supported
|
|
42
|
+
* RNS: activityState=1, visible=true, shouldFreeze=true
|
|
42
43
|
* React Activity: mode="hidden" with paint preserved
|
|
43
44
|
*
|
|
44
|
-
* - `detach`
|
|
45
|
-
* remove inactive screen from native/view presentation after safe paint
|
|
46
|
-
* RNS: activityState=0, visible=false
|
|
47
|
-
* React Activity: mode="hidden" + display none, or equivalent
|
|
48
|
-
*
|
|
49
45
|
* - `unmount`
|
|
50
|
-
*
|
|
46
|
+
* remove React subtree when the inactive screen is safe to remove
|
|
51
47
|
* RNS native: only after safe paint for non-nested screens
|
|
52
48
|
* web: return null
|
|
49
|
+
*
|
|
50
|
+
* - `keep`
|
|
51
|
+
* keep inactive screen mounted, attached, visible, not interactive, and running
|
|
52
|
+
* RNS: activityState=1, visible=true
|
|
53
|
+
* React Activity: mode="visible"
|
|
53
54
|
*/
|
|
54
|
-
export type InactiveBehavior = "
|
|
55
|
+
export type InactiveBehavior = "hide" | "pause" | "unmount" | "keep";
|
|
55
56
|
export type TransitionAwareProps<T extends object> = AnimatedProps<T> & {
|
|
56
57
|
/**
|
|
57
58
|
* Connects this component to custom animated styles defined in screenStyleInterpolator.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"screen.types.d.ts","sourceRoot":"","sources":["../../../../src/shared/types/screen.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,KAAK,EACX,uBAAuB,EACvB,cAAc,EACd,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EACX,qBAAqB,EACrB,gBAAgB,EAChB,mBAAmB,EACnB,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAEpD,MAAM,MAAM,MAAM,GAAG;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;IAC3B;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;;;;OAKG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC;AAC/B,MAAM,MAAM,0BAA0B,GACnC,qBAAqB,GACrB,eAAe,CAAC;AACnB,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,CAAC;AAE1D;;;GAGG;AACH,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AE,OAAO,CAAC,CAAC;IAE/B;;OAEG;IACH,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,YAAY,KAAK,KAAK,CAAC,SAAS,CAAC;IAEnD;;;OAGG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IAEvB;;;;;;;;;OASG;IACH,kCAAkC,CAAC,EAAE,OAAO,CAAC;IAE7C;;;;;;;;;OASG;IACH,kCAAkC,CAAC,EAAE,OAAO,CAAC;IAE7C;;;;;;;;;;;;;;OAcG;IACH,UAAU,CAAC,EAAE,SAAS,EAAE,CAAC;IAEzB;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B;;;;;;;;;;;OAWG;IACH,0BAA0B,CAAC,EAAE,0BAA0B,CAAC;IAExD;;;;;;OAMG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAE9B;;;;;;;;OAQG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAE5B;;;;;;;;;OASG;IACH,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IAEpC;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,iBAAiB,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;IAE7C;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,gBAAgB,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;CAC5C,CAAC"}
|
package/package.json
CHANGED
package/src/blank-stack/types.ts
CHANGED
|
@@ -110,19 +110,20 @@ export type BlankStackNavigationOptions = ScreenTransitionConfig & {
|
|
|
110
110
|
*
|
|
111
111
|
* For a stack shaped as A(inactive), B(inert), C(active):
|
|
112
112
|
*
|
|
113
|
-
* - `
|
|
114
|
-
*
|
|
115
|
-
*
|
|
116
|
-
* - `
|
|
117
|
-
*
|
|
113
|
+
* - `hide`: keeps A mounted, pauses/freezes inactive work where supported,
|
|
114
|
+
* and hides native/view presentation after the screen that exposes it has
|
|
115
|
+
* safely painted.
|
|
116
|
+
* - `pause`: keeps A's last painted UI visible and asks the platform to stop
|
|
117
|
+
* or suspend inactive work where possible.
|
|
118
118
|
* - `unmount`: removes A's React subtree after safe paint when the route has
|
|
119
119
|
* no nested navigation state.
|
|
120
|
+
* - `keep`: keeps A mounted, attached, visible, non-interactive, and running.
|
|
120
121
|
*
|
|
121
|
-
* On web, or when native screens are disabled, `
|
|
122
|
-
*
|
|
123
|
-
*
|
|
122
|
+
* On web, or when native screens are disabled, `hide` and `pause` cannot
|
|
123
|
+
* currently suspend React work. This will change once the implementation can
|
|
124
|
+
* use React 19.2's Activity component.
|
|
124
125
|
*
|
|
125
|
-
* @default "
|
|
126
|
+
* @default "hide" on native, "unmount" on web
|
|
126
127
|
*/
|
|
127
128
|
inactiveBehavior?: InactiveBehavior;
|
|
128
129
|
};
|
|
@@ -79,14 +79,15 @@ export const ActivityScreen = memo(function ActivityScreen({
|
|
|
79
79
|
// a blank frame during the transition.
|
|
80
80
|
activityState = 1;
|
|
81
81
|
visible = true;
|
|
82
|
-
} else if (inactiveBehavior === "
|
|
82
|
+
} else if (inactiveBehavior === "pause") {
|
|
83
83
|
activityState = 1;
|
|
84
84
|
shouldFreeze = true;
|
|
85
85
|
visible = true;
|
|
86
86
|
} else {
|
|
87
|
-
// `
|
|
88
|
-
// removes the React subtree through the JS guard below.
|
|
87
|
+
// `hide` freezes and hides native presentation. Non-nested
|
|
88
|
+
// `unmount` removes the React subtree through the JS guard below.
|
|
89
89
|
activityState = 0;
|
|
90
|
+
shouldFreeze = true;
|
|
90
91
|
visible = false;
|
|
91
92
|
}
|
|
92
93
|
}
|
package/src/shared/index.ts
CHANGED
|
@@ -61,7 +61,10 @@ export type {
|
|
|
61
61
|
OverlayProps,
|
|
62
62
|
ScreenInterpolationProps,
|
|
63
63
|
ScreenStyleInterpolator,
|
|
64
|
+
ScreenTransitionAccessor,
|
|
64
65
|
ScreenTransitionConfig,
|
|
66
|
+
ScreenTransitionDepthTarget,
|
|
67
|
+
ScreenTransitionTarget,
|
|
65
68
|
TransitionInterpolatedStyle,
|
|
66
69
|
TransitionSlotStyle,
|
|
67
70
|
TransitionSpec,
|
package/src/shared/providers/screen/animation/helpers/accessors/use-build-transition-accessor.ts
CHANGED
|
@@ -72,6 +72,20 @@ export const createTransitionAccessor = (
|
|
|
72
72
|
return {
|
|
73
73
|
...frame,
|
|
74
74
|
bounds: source.boundsAccessor,
|
|
75
|
+
transition: (target?: ScreenTransitionTarget) => {
|
|
76
|
+
"worklet";
|
|
77
|
+
const targetIndex = resolveTargetIndex(
|
|
78
|
+
target,
|
|
79
|
+
sourceIndex,
|
|
80
|
+
currentSources.length,
|
|
81
|
+
);
|
|
82
|
+
|
|
83
|
+
if (targetIndex === -1) {
|
|
84
|
+
return null;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
return buildScope(targetIndex);
|
|
88
|
+
},
|
|
75
89
|
};
|
|
76
90
|
};
|
|
77
91
|
|
|
@@ -23,7 +23,10 @@ import type { SelectedInterpolatorOptions } from "./selected-interpolator-option
|
|
|
23
23
|
import { deriveStackProgress } from "./stack-progress";
|
|
24
24
|
import { useBuildTransitionState } from "./use-build-transition-state";
|
|
25
25
|
|
|
26
|
-
export type ScreenInterpolatorFrame = Omit<
|
|
26
|
+
export type ScreenInterpolatorFrame = Omit<
|
|
27
|
+
ScreenInterpolationProps,
|
|
28
|
+
"bounds" | "transition"
|
|
29
|
+
>;
|
|
27
30
|
|
|
28
31
|
interface ScreenAnimationPipeline {
|
|
29
32
|
screenInterpolatorProps: SharedValue<ScreenInterpolatorFrame>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
ScreenAnimationDescendantSources,
|
|
3
|
+
ScreenAnimationSource,
|
|
4
|
+
ScreenInterpolatorPropsRevision,
|
|
5
|
+
} from "../types";
|
|
6
|
+
|
|
7
|
+
export const readScreenAnimationRevisions = (
|
|
8
|
+
screenInterpolatorPropsRevision: ScreenInterpolatorPropsRevision,
|
|
9
|
+
ancestorScreenAnimationSources: ScreenAnimationSource[],
|
|
10
|
+
descendantScreenAnimationSources: ScreenAnimationDescendantSources,
|
|
11
|
+
) => {
|
|
12
|
+
"worklet";
|
|
13
|
+
screenInterpolatorPropsRevision.get();
|
|
14
|
+
|
|
15
|
+
for (let index = 0; index < ancestorScreenAnimationSources.length; index++) {
|
|
16
|
+
ancestorScreenAnimationSources[
|
|
17
|
+
index
|
|
18
|
+
]?.screenInterpolatorPropsRevision.get();
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const descendantSources = descendantScreenAnimationSources.get();
|
|
22
|
+
for (let index = 0; index < descendantSources.length; index++) {
|
|
23
|
+
descendantSources[index]?.source.screenInterpolatorPropsRevision.get();
|
|
24
|
+
}
|
|
25
|
+
};
|
|
@@ -5,10 +5,9 @@ import type {
|
|
|
5
5
|
} from "../../../types/animation.types";
|
|
6
6
|
import { useScreenAnimationContext } from "./animation.provider";
|
|
7
7
|
import { useBuildTransitionAccessor } from "./helpers/accessors/use-build-transition-accessor";
|
|
8
|
+
import { readScreenAnimationRevisions } from "./helpers/read-screen-animation-revisions";
|
|
8
9
|
import type {
|
|
9
|
-
ScreenAnimationDescendantSources,
|
|
10
10
|
ScreenAnimationLegacyTarget,
|
|
11
|
-
ScreenAnimationSource,
|
|
12
11
|
ScreenAnimationTarget,
|
|
13
12
|
} from "./types";
|
|
14
13
|
|
|
@@ -58,25 +57,6 @@ export function useScreenAnimation(
|
|
|
58
57
|
return animation;
|
|
59
58
|
}
|
|
60
59
|
|
|
61
|
-
const readScreenAnimationRevisions = (
|
|
62
|
-
screenInterpolatorPropsRevision: DerivedValue<number>,
|
|
63
|
-
ancestorScreenAnimationSources: ScreenAnimationSource[],
|
|
64
|
-
descendantScreenAnimationSources: ScreenAnimationDescendantSources,
|
|
65
|
-
) => {
|
|
66
|
-
"worklet";
|
|
67
|
-
screenInterpolatorPropsRevision.get();
|
|
68
|
-
|
|
69
|
-
for (let index = 0; index < ancestorScreenAnimationSources.length; index++) {
|
|
70
|
-
ancestorScreenAnimationSources[
|
|
71
|
-
index
|
|
72
|
-
]?.screenInterpolatorPropsRevision.get();
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
// The accessor reads descendant sources through this shared value. Reading it
|
|
76
|
-
// here makes this derived value rerun when descendants mount or unmount.
|
|
77
|
-
descendantScreenAnimationSources.get();
|
|
78
|
-
};
|
|
79
|
-
|
|
80
60
|
const isTransitionTarget = (
|
|
81
61
|
target: ScreenAnimationTarget,
|
|
82
62
|
): target is ScreenTransitionTarget => {
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { ClaimedDirections } from "../../../../types/ownership.types";
|
|
2
|
+
import type { StackSceneActivity } from "../../../../types/stack.types";
|
|
3
|
+
|
|
4
|
+
export const resolveShadowingClaimDirections = ({
|
|
5
|
+
currentActivity,
|
|
6
|
+
currentClaimedDirections,
|
|
7
|
+
previousClaimedDirections,
|
|
8
|
+
}: {
|
|
9
|
+
currentActivity: StackSceneActivity | undefined;
|
|
10
|
+
currentClaimedDirections: ClaimedDirections;
|
|
11
|
+
previousClaimedDirections: ClaimedDirections;
|
|
12
|
+
}): ClaimedDirections => {
|
|
13
|
+
if (currentActivity === "closing") {
|
|
14
|
+
return previousClaimedDirections;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
return currentClaimedDirections;
|
|
18
|
+
};
|
package/src/shared/providers/screen/gestures/ownership/use-walk-up-and-register-shadowing-claims.ts
CHANGED
|
@@ -4,11 +4,18 @@ import {
|
|
|
4
4
|
type ClaimedDirections,
|
|
5
5
|
DIRECTIONS,
|
|
6
6
|
type Direction,
|
|
7
|
+
NO_CLAIMS,
|
|
7
8
|
} from "../../../../types/ownership.types";
|
|
8
|
-
import {
|
|
9
|
+
import {
|
|
10
|
+
type BaseDescriptor,
|
|
11
|
+
useDescriptorDerivations,
|
|
12
|
+
useDescriptors,
|
|
13
|
+
} from "../../../screen/descriptors";
|
|
9
14
|
import { useGestureContext } from "../gestures.provider";
|
|
10
15
|
import { walkGestureAncestors } from "../shared/ancestors";
|
|
16
|
+
import { resolveScreenGestureConfig } from "../shared/policy";
|
|
11
17
|
import type { GestureContextType } from "../types";
|
|
18
|
+
import { resolveShadowingClaimDirections } from "./shadowing-claims";
|
|
12
19
|
|
|
13
20
|
type ShadowedAncestor = {
|
|
14
21
|
ancestor: GestureContextType;
|
|
@@ -93,6 +100,27 @@ const clearShadowingClaims = (
|
|
|
93
100
|
}
|
|
94
101
|
};
|
|
95
102
|
|
|
103
|
+
const getDescriptorIsFirstKey = (descriptor: BaseDescriptor): boolean => {
|
|
104
|
+
const navigationState = descriptor.navigation.getState();
|
|
105
|
+
const routes = navigationState?.routes ?? [];
|
|
106
|
+
return routes.findIndex((route) => route.key === descriptor.route.key) === 0;
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
const getDescriptorClaimedDirections = (
|
|
110
|
+
descriptor: BaseDescriptor | undefined,
|
|
111
|
+
gestureContext: GestureContextType | null,
|
|
112
|
+
): ClaimedDirections => {
|
|
113
|
+
if (!descriptor) {
|
|
114
|
+
return NO_CLAIMS;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
return resolveScreenGestureConfig({
|
|
118
|
+
options: descriptor.options,
|
|
119
|
+
isFirstKey: getDescriptorIsFirstKey(descriptor),
|
|
120
|
+
gestureContext,
|
|
121
|
+
}).participation.claimedDirections;
|
|
122
|
+
};
|
|
123
|
+
|
|
96
124
|
/**
|
|
97
125
|
* Registers this screen with ancestors that claim the same direction.
|
|
98
126
|
*
|
|
@@ -108,11 +136,44 @@ export function useWalkUpAndRegisterShadowingClaims(
|
|
|
108
136
|
claimedDirections: ClaimedDirections,
|
|
109
137
|
): void {
|
|
110
138
|
const parentContext = useGestureContext();
|
|
139
|
+
const { current, previous } = useDescriptors();
|
|
111
140
|
const { isTopMostScreen, currentScreenKey } = useDescriptorDerivations();
|
|
112
141
|
|
|
142
|
+
/*
|
|
143
|
+
* We want to calculate effective claimed directions as claimedDirections is not enough for us.
|
|
144
|
+
* What this solves is lingering claimed directions when a screen is closing.
|
|
145
|
+
*
|
|
146
|
+
* Overlay claims horizontal
|
|
147
|
+
* └─ A has no local horizontal claim
|
|
148
|
+
* └─ B claims horizontal (closing)
|
|
149
|
+
* └─ C claims horizontal (closing)
|
|
150
|
+
*
|
|
151
|
+
* Closing screens are still mounted, so they can still block parent gestures.
|
|
152
|
+
* But they cannot receive touches anymore.
|
|
153
|
+
*
|
|
154
|
+
* So when B/C are closing and the user is really touching A, B/C should not
|
|
155
|
+
* keep blocking the parent with their own gesture config.
|
|
156
|
+
*
|
|
157
|
+
* A closing screen should act like the visible screen underneath it:
|
|
158
|
+
* - if the screen underneath claims the gesture, keep blocking the parent
|
|
159
|
+
* - if the screen underneath does not claim it, let the parent handle it
|
|
160
|
+
*/
|
|
161
|
+
const effectiveClaimedDirections = useMemo(
|
|
162
|
+
() =>
|
|
163
|
+
resolveShadowingClaimDirections({
|
|
164
|
+
currentActivity: current.activity,
|
|
165
|
+
currentClaimedDirections: claimedDirections,
|
|
166
|
+
previousClaimedDirections: getDescriptorClaimedDirections(
|
|
167
|
+
previous,
|
|
168
|
+
parentContext,
|
|
169
|
+
),
|
|
170
|
+
}),
|
|
171
|
+
[current.activity, claimedDirections, previous, parentContext],
|
|
172
|
+
);
|
|
173
|
+
|
|
113
174
|
const shadowedAncestors = useMemo(
|
|
114
|
-
() => findShadowedAncestors(parentContext,
|
|
115
|
-
[parentContext,
|
|
175
|
+
() => findShadowedAncestors(parentContext, effectiveClaimedDirections),
|
|
176
|
+
[parentContext, effectiveClaimedDirections],
|
|
116
177
|
);
|
|
117
178
|
|
|
118
179
|
useLayoutEffect(() => {
|
|
@@ -9,7 +9,9 @@ import type {
|
|
|
9
9
|
import { logger } from "../../../../utils/logger";
|
|
10
10
|
import { useScreenAnimationContext } from "../../animation";
|
|
11
11
|
import { useBuildBoundsAccessor } from "../../animation/helpers/accessors/use-build-bounds-accessor";
|
|
12
|
+
import { useBuildTransitionAccessor } from "../../animation/helpers/accessors/use-build-transition-accessor";
|
|
12
13
|
import type { ScreenInterpolatorFrame } from "../../animation/helpers/pipeline";
|
|
14
|
+
import { readScreenAnimationRevisions } from "../../animation/helpers/read-screen-animation-revisions";
|
|
13
15
|
import { syncSelectedInterpolatorOptions } from "../../animation/helpers/selected-interpolator-options";
|
|
14
16
|
import { useDescriptorDerivations } from "../../descriptors";
|
|
15
17
|
import {
|
|
@@ -34,6 +36,7 @@ type RunInterpolatorParams = {
|
|
|
34
36
|
progress: ScreenInterpolatorFrame["progress"];
|
|
35
37
|
next: ScreenInterpolatorFrame["next"];
|
|
36
38
|
bounds: Parameters<ScreenStyleInterpolator>[0]["bounds"];
|
|
39
|
+
transition: Parameters<ScreenStyleInterpolator>[0]["transition"];
|
|
37
40
|
shouldDeferStyleBuckets: boolean;
|
|
38
41
|
};
|
|
39
42
|
|
|
@@ -60,6 +63,7 @@ const runInterpolator = ({
|
|
|
60
63
|
progress,
|
|
61
64
|
next,
|
|
62
65
|
bounds,
|
|
66
|
+
transition,
|
|
63
67
|
shouldDeferStyleBuckets,
|
|
64
68
|
}: RunInterpolatorParams): InterpolatorResult | undefined => {
|
|
65
69
|
"worklet";
|
|
@@ -74,6 +78,7 @@ const runInterpolator = ({
|
|
|
74
78
|
progress,
|
|
75
79
|
next,
|
|
76
80
|
bounds,
|
|
81
|
+
transition,
|
|
77
82
|
});
|
|
78
83
|
|
|
79
84
|
const rawStyleMap: TransitionInterpolatedStyle | undefined =
|
|
@@ -137,8 +142,11 @@ export const useInterpolatedStylesMap = () => {
|
|
|
137
142
|
selectedInterpolatorOptions,
|
|
138
143
|
nextInterpolator,
|
|
139
144
|
currentInterpolator,
|
|
145
|
+
ancestorScreenAnimationSources,
|
|
146
|
+
descendantScreenAnimationSources,
|
|
140
147
|
} = useScreenAnimationContext();
|
|
141
148
|
const boundsAccessor = useBuildBoundsAccessor();
|
|
149
|
+
const transition = useBuildTransitionAccessor();
|
|
142
150
|
const pendingLifecycleStartBlockCount = SystemStore.getValue(
|
|
143
151
|
currentScreenKey,
|
|
144
152
|
"pendingLifecycleStartBlockCount",
|
|
@@ -148,7 +156,11 @@ export const useInterpolatedStylesMap = () => {
|
|
|
148
156
|
|
|
149
157
|
return useDerivedValue<LocalStyleLayers>(() => {
|
|
150
158
|
"worklet";
|
|
151
|
-
|
|
159
|
+
readScreenAnimationRevisions(
|
|
160
|
+
screenInterpolatorPropsRevision,
|
|
161
|
+
ancestorScreenAnimationSources,
|
|
162
|
+
descendantScreenAnimationSources,
|
|
163
|
+
);
|
|
152
164
|
const props = screenInterpolatorProps.get();
|
|
153
165
|
|
|
154
166
|
/**
|
|
@@ -199,6 +211,7 @@ export const useInterpolatedStylesMap = () => {
|
|
|
199
211
|
progress: effectiveProgress,
|
|
200
212
|
next: effectiveNext,
|
|
201
213
|
bounds: boundsAccessor,
|
|
214
|
+
transition,
|
|
202
215
|
shouldDeferStyleBuckets,
|
|
203
216
|
});
|
|
204
217
|
|
|
@@ -223,6 +236,7 @@ export const useInterpolatedStylesMap = () => {
|
|
|
223
236
|
progress: effectiveProgress,
|
|
224
237
|
next: effectiveNext,
|
|
225
238
|
bounds: boundsAccessor,
|
|
239
|
+
transition,
|
|
226
240
|
shouldDeferStyleBuckets,
|
|
227
241
|
});
|
|
228
242
|
|