react-native-screen-transitions 2.3.0 → 2.3.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/__configs__/index.js.map +1 -0
- package/lib/commonjs/__configs__/presets.js.map +1 -0
- package/lib/commonjs/__configs__/specs.js.map +1 -0
- package/lib/commonjs/components/controllers/screen-lifecycle.js +5 -5
- package/lib/commonjs/components/controllers/screen-lifecycle.js.map +1 -1
- package/lib/commonjs/components/create-transition-aware-component.js +13 -32
- package/lib/commonjs/components/create-transition-aware-component.js.map +1 -1
- package/lib/commonjs/components/integrations/masked-view.js +3 -4
- package/lib/commonjs/components/integrations/masked-view.js.map +1 -1
- package/lib/commonjs/components/root-transition-aware.js +3 -3
- package/lib/commonjs/components/root-transition-aware.js.map +1 -1
- package/lib/commonjs/constants.js +103 -0
- package/lib/commonjs/constants.js.map +1 -0
- package/lib/commonjs/hooks/animation/use-associated-style.js +10 -9
- package/lib/commonjs/hooks/animation/use-associated-style.js.map +1 -1
- package/lib/commonjs/hooks/animation/use-screen-animation.js +7 -20
- package/lib/commonjs/hooks/animation/use-screen-animation.js.map +1 -1
- package/lib/commonjs/hooks/bounds/use-bound-registry.js +93 -31
- package/lib/commonjs/hooks/bounds/use-bound-registry.js.map +1 -1
- package/lib/commonjs/hooks/gestures/use-build-gestures.js +9 -13
- package/lib/commonjs/hooks/gestures/use-build-gestures.js.map +1 -1
- package/lib/commonjs/index.js +3 -3
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/integrations/native-stack/utils/debounce.js.map +1 -1
- package/lib/commonjs/integrations/native-stack/utils/useAnimatedHeaderHeight.js.map +1 -1
- package/lib/commonjs/integrations/native-stack/utils/useDismissedRouteError.js.map +1 -1
- package/lib/commonjs/integrations/native-stack/views/FontProcessor.js +1 -1
- package/lib/commonjs/integrations/native-stack/views/FontProcessor.js.map +1 -1
- package/lib/commonjs/integrations/native-stack/views/FontProcessor.native.js +1 -1
- package/lib/commonjs/integrations/native-stack/views/FontProcessor.native.js.map +1 -1
- package/lib/commonjs/integrations/native-stack/views/NativeStackView.native.js +3 -15
- package/lib/commonjs/integrations/native-stack/views/NativeStackView.native.js.map +1 -1
- package/lib/commonjs/providers/gestures.js +1 -9
- package/lib/commonjs/providers/gestures.js.map +1 -1
- package/lib/commonjs/providers/screen-transition-provider.js +34 -0
- package/lib/commonjs/providers/screen-transition-provider.js.map +1 -0
- package/lib/commonjs/providers/transition-styles.js +4 -4
- package/lib/commonjs/providers/transition-styles.js.map +1 -1
- package/lib/commonjs/utils/animation/{run-transition.js → start-screen-transition.js} +9 -9
- package/lib/commonjs/utils/animation/start-screen-transition.js.map +1 -0
- package/lib/commonjs/utils/bounds/index.js +6 -18
- package/lib/commonjs/utils/bounds/index.js.map +1 -1
- package/lib/commonjs/utils/gesture/apply-offset-rules.js +12 -21
- package/lib/commonjs/utils/gesture/apply-offset-rules.js.map +1 -1
- package/lib/module/__configs__/index.js.map +1 -0
- package/lib/module/__configs__/presets.js.map +1 -0
- package/lib/module/__configs__/specs.js.map +1 -0
- package/lib/module/components/controllers/screen-lifecycle.js +5 -5
- package/lib/module/components/controllers/screen-lifecycle.js.map +1 -1
- package/lib/module/components/create-transition-aware-component.js +13 -32
- package/lib/module/components/create-transition-aware-component.js.map +1 -1
- package/lib/module/components/integrations/masked-view.js +1 -2
- package/lib/module/components/integrations/masked-view.js.map +1 -1
- package/lib/module/components/root-transition-aware.js +3 -3
- package/lib/module/components/root-transition-aware.js.map +1 -1
- package/lib/module/constants.js +98 -0
- package/lib/module/constants.js.map +1 -0
- package/lib/module/hooks/animation/use-associated-style.js +10 -9
- package/lib/module/hooks/animation/use-associated-style.js.map +1 -1
- package/lib/module/hooks/animation/use-screen-animation.js +7 -20
- package/lib/module/hooks/animation/use-screen-animation.js.map +1 -1
- package/lib/module/hooks/bounds/use-bound-registry.js +94 -33
- package/lib/module/hooks/bounds/use-bound-registry.js.map +1 -1
- package/lib/module/hooks/gestures/use-build-gestures.js +4 -8
- package/lib/module/hooks/gestures/use-build-gestures.js.map +1 -1
- package/lib/module/index.js +1 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/integrations/native-stack/utils/debounce.js.map +1 -1
- package/lib/module/integrations/native-stack/utils/useAnimatedHeaderHeight.js +1 -1
- package/lib/module/integrations/native-stack/utils/useAnimatedHeaderHeight.js.map +1 -1
- package/lib/module/integrations/native-stack/utils/useDismissedRouteError.js +1 -1
- package/lib/module/integrations/native-stack/utils/useDismissedRouteError.js.map +1 -1
- package/lib/module/integrations/native-stack/views/FontProcessor.js +1 -1
- package/lib/module/integrations/native-stack/views/FontProcessor.js.map +1 -1
- package/lib/module/integrations/native-stack/views/FontProcessor.native.js +2 -2
- package/lib/module/integrations/native-stack/views/FontProcessor.native.js.map +1 -1
- package/lib/module/integrations/native-stack/views/NativeStackView.native.js +3 -15
- package/lib/module/integrations/native-stack/views/NativeStackView.native.js.map +1 -1
- package/lib/module/providers/gestures.js +0 -8
- package/lib/module/providers/gestures.js.map +1 -1
- package/lib/module/providers/screen-transition-provider.js +30 -0
- package/lib/module/providers/screen-transition-provider.js.map +1 -0
- package/lib/module/providers/transition-styles.js +4 -4
- package/lib/module/providers/transition-styles.js.map +1 -1
- package/lib/module/utils/animation/{run-transition.js → start-screen-transition.js} +7 -7
- package/lib/module/utils/animation/start-screen-transition.js.map +1 -0
- package/lib/module/utils/bounds/index.js +5 -17
- package/lib/module/utils/bounds/index.js.map +1 -1
- package/lib/module/utils/gesture/apply-offset-rules.js +1 -10
- package/lib/module/utils/gesture/apply-offset-rules.js.map +1 -1
- package/lib/typescript/__configs__/index.d.ts.map +1 -0
- package/lib/typescript/__configs__/presets.d.ts.map +1 -0
- package/lib/typescript/__configs__/specs.d.ts.map +1 -0
- package/lib/typescript/components/create-transition-aware-component.d.ts +20 -2
- package/lib/typescript/components/create-transition-aware-component.d.ts.map +1 -1
- package/lib/typescript/components/integrations/masked-view.d.ts.map +1 -1
- package/lib/typescript/components/root-transition-aware.d.ts.map +1 -1
- package/lib/typescript/constants.d.ts +57 -0
- package/lib/typescript/constants.d.ts.map +1 -0
- package/lib/typescript/hooks/animation/use-associated-style.d.ts +1 -1
- package/lib/typescript/hooks/animation/use-associated-style.d.ts.map +1 -1
- package/lib/typescript/hooks/animation/use-screen-animation.d.ts.map +1 -1
- package/lib/typescript/hooks/bounds/use-bound-registry.d.ts +12 -9
- package/lib/typescript/hooks/bounds/use-bound-registry.d.ts.map +1 -1
- package/lib/typescript/hooks/gestures/use-build-gestures.d.ts.map +1 -1
- package/lib/typescript/index.d.ts +2 -6
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/integrations/native-stack/utils/debounce.d.ts.map +1 -1
- package/lib/typescript/integrations/native-stack/utils/useAnimatedHeaderHeight.d.ts +2 -2
- package/lib/typescript/integrations/native-stack/utils/useDismissedRouteError.d.ts +2 -2
- package/lib/typescript/integrations/native-stack/utils/useDismissedRouteError.d.ts.map +1 -1
- package/lib/typescript/integrations/native-stack/views/FontProcessor.d.ts.map +1 -1
- package/lib/typescript/integrations/native-stack/views/FontProcessor.native.d.ts.map +1 -1
- package/lib/typescript/integrations/native-stack/views/NativeStackView.native.d.ts.map +1 -1
- package/lib/typescript/providers/gestures.d.ts +0 -1
- package/lib/typescript/providers/gestures.d.ts.map +1 -1
- package/lib/typescript/providers/screen-transition-provider.d.ts +11 -0
- package/lib/typescript/providers/screen-transition-provider.d.ts.map +1 -0
- package/lib/typescript/providers/transition-styles.d.ts.map +1 -1
- package/lib/typescript/types/core.d.ts +0 -8
- package/lib/typescript/types/core.d.ts.map +1 -1
- package/lib/typescript/utils/animation/start-screen-transition.d.ts +12 -0
- package/lib/typescript/utils/animation/start-screen-transition.d.ts.map +1 -0
- package/lib/typescript/utils/bounds/_types/get-bounds.d.ts +2 -2
- package/lib/typescript/utils/bounds/_types/get-bounds.d.ts.map +1 -1
- package/lib/typescript/utils/bounds/index.d.ts.map +1 -1
- package/lib/typescript/utils/gesture/apply-offset-rules.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/controllers/screen-lifecycle.tsx +5 -5
- package/src/components/create-transition-aware-component.tsx +23 -38
- package/src/components/integrations/masked-view.tsx +1 -3
- package/src/components/root-transition-aware.tsx +4 -8
- package/src/constants.ts +106 -0
- package/src/hooks/animation/use-associated-style.tsx +14 -10
- package/src/hooks/animation/use-screen-animation.tsx +17 -24
- package/src/hooks/bounds/use-bound-registry.tsx +113 -25
- package/src/hooks/gestures/use-build-gestures.tsx +11 -10
- package/src/index.ts +1 -1
- package/src/integrations/native-stack/utils/debounce.tsx +9 -9
- package/src/integrations/native-stack/utils/useAnimatedHeaderHeight.tsx +10 -10
- package/src/integrations/native-stack/utils/useDismissedRouteError.tsx +21 -21
- package/src/integrations/native-stack/views/FontProcessor.native.tsx +7 -7
- package/src/integrations/native-stack/views/FontProcessor.tsx +2 -2
- package/src/integrations/native-stack/views/NativeStackView.native.tsx +4 -14
- package/src/providers/gestures.tsx +0 -9
- package/src/providers/screen-transition-provider.tsx +33 -0
- package/src/providers/transition-styles.tsx +6 -5
- package/src/types/core.ts +0 -9
- package/src/utils/animation/{run-transition.ts → start-screen-transition.ts} +9 -9
- package/src/utils/bounds/_types/get-bounds.ts +7 -7
- package/src/utils/bounds/index.ts +12 -19
- package/src/utils/gesture/apply-offset-rules.ts +9 -11
- package/lib/commonjs/components/bound-capture.js +0 -38
- package/lib/commonjs/components/bound-capture.js.map +0 -1
- package/lib/commonjs/configs/index.js.map +0 -1
- package/lib/commonjs/configs/presets.js.map +0 -1
- package/lib/commonjs/configs/specs.js.map +0 -1
- package/lib/commonjs/utils/animation/run-transition.js.map +0 -1
- package/lib/module/components/bound-capture.js +0 -33
- package/lib/module/components/bound-capture.js.map +0 -1
- package/lib/module/configs/index.js.map +0 -1
- package/lib/module/configs/presets.js.map +0 -1
- package/lib/module/configs/specs.js.map +0 -1
- package/lib/module/utils/animation/run-transition.js.map +0 -1
- package/lib/typescript/components/bound-capture.d.ts +0 -8
- package/lib/typescript/components/bound-capture.d.ts.map +0 -1
- package/lib/typescript/configs/index.d.ts.map +0 -1
- package/lib/typescript/configs/presets.d.ts.map +0 -1
- package/lib/typescript/configs/specs.d.ts.map +0 -1
- package/lib/typescript/utils/animation/run-transition.d.ts +0 -12
- package/lib/typescript/utils/animation/run-transition.d.ts.map +0 -1
- package/src/components/bound-capture.tsx +0 -32
- /package/lib/commonjs/{configs → __configs__}/index.js +0 -0
- /package/lib/commonjs/{configs → __configs__}/presets.js +0 -0
- /package/lib/commonjs/{configs → __configs__}/specs.js +0 -0
- /package/lib/module/{configs → __configs__}/index.js +0 -0
- /package/lib/module/{configs → __configs__}/presets.js +0 -0
- /package/lib/module/{configs → __configs__}/specs.js +0 -0
- /package/lib/typescript/{configs → __configs__}/index.d.ts +0 -0
- /package/lib/typescript/{configs → __configs__}/presets.d.ts +0 -0
- /package/lib/typescript/{configs → __configs__}/specs.d.ts +0 -0
- /package/src/{configs → __configs__}/index.ts +0 -0
- /package/src/{configs → __configs__}/presets.ts +0 -0
- /package/src/{configs → __configs__}/specs.ts +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-bound-registry.d.ts","sourceRoot":"","sources":["../../../../src/hooks/bounds/use-bound-registry.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"use-bound-registry.d.ts","sourceRoot":"","sources":["../../../../src/hooks/bounds/use-bound-registry.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EACN,KAAK,WAAW,EAIhB,KAAK,UAAU,EAGf,MAAM,yBAAyB,CAAC;AAQjC,UAAU,sBAAsB;IAC/B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,WAAW,EAAE,WAAW,CAAC,IAAI,CAAC,CAAC;IAE/B,KAAK,EAAE,UAAU,CAAC;IAClB,OAAO,CAAC,EAAE,CAAC,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;CACrD;AASD,eAAO,MAAM,iBAAiB,GAAI,kDAK/B,sBAAsB;4DAiBpB;QACF,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;QACrB,iBAAiB,CAAC,EAAE,OAAO,CAAC;KAC5B;;;8GAqEqB;QAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;KAAE;CA0BpD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-build-gestures.d.ts","sourceRoot":"","sources":["../../../../src/hooks/gestures/use-build-gestures.tsx"],"names":[],"mappings":"AAEA,OAAO,EAIN,KAAK,WAAW,EAGhB,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EAEN,KAAK,WAAW,EAEhB,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"use-build-gestures.d.ts","sourceRoot":"","sources":["../../../../src/hooks/gestures/use-build-gestures.tsx"],"names":[],"mappings":"AAEA,OAAO,EAIN,KAAK,WAAW,EAGhB,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EAEN,KAAK,WAAW,EAEhB,MAAM,yBAAyB,CAAC;AAQjC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAa7D,UAAU,sBAAsB;IAC/B,YAAY,EAAE,WAAW,CAAC,YAAY,GAAG,IAAI,CAAC,CAAC;CAC/C;AAED,eAAO,MAAM,gBAAgB,GAAI,mBAE9B,sBAAsB,KAAG;IAC3B,UAAU,EAAE,WAAW,CAAC;IACxB,aAAa,EAAE,WAAW,CAAC;CAkS3B,CAAC"}
|
|
@@ -209,7 +209,6 @@ declare const _default: {
|
|
|
209
209
|
} & {
|
|
210
210
|
styleId?: string;
|
|
211
211
|
sharedBoundTag?: string;
|
|
212
|
-
measureOnLayout?: boolean;
|
|
213
212
|
} & import("react").RefAttributes<never>>>;
|
|
214
213
|
Pressable: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<{
|
|
215
214
|
id?: string | import("react-native-reanimated").SharedValue<string | undefined> | undefined;
|
|
@@ -217,6 +216,7 @@ declare const _default: {
|
|
|
217
216
|
pointerEvents?: "none" | "auto" | "box-none" | "box-only" | import("react-native-reanimated").SharedValue<"none" | "auto" | "box-none" | "box-only" | undefined> | undefined;
|
|
218
217
|
children?: import("react").ReactNode | ((state: import("react-native").PressableStateCallbackType) => React.ReactNode) | import("react-native-reanimated").SharedValue<import("react").ReactNode | ((state: import("react-native").PressableStateCallbackType) => React.ReactNode)>;
|
|
219
218
|
ref?: import("react").Ref<View> | import("react-native-reanimated").SharedValue<import("react").Ref<View> | undefined> | undefined;
|
|
219
|
+
onPress?: ((event: import("react-native").GestureResponderEvent) => void) | import("react-native-reanimated").SharedValue<((event: import("react-native").GestureResponderEvent) => void) | null | undefined> | null | undefined;
|
|
220
220
|
hitSlop?: number | import("react-native").Insets | import("react-native-reanimated").SharedValue<number | import("react-native").Insets | null | undefined> | null | undefined;
|
|
221
221
|
needsOffscreenAlphaCompositing?: boolean | import("react-native-reanimated").SharedValue<boolean | undefined> | undefined;
|
|
222
222
|
onLayout?: ((event: import("react-native").LayoutChangeEvent) => void) | import("react-native-reanimated").SharedValue<((event: import("react-native").LayoutChangeEvent) => void) | undefined> | undefined;
|
|
@@ -305,7 +305,6 @@ declare const _default: {
|
|
|
305
305
|
accessibilityLanguage?: string | import("react-native-reanimated").SharedValue<string | undefined> | undefined;
|
|
306
306
|
accessibilityShowsLargeContentViewer?: boolean | import("react-native-reanimated").SharedValue<boolean | undefined> | undefined;
|
|
307
307
|
accessibilityLargeContentTitle?: string | import("react-native-reanimated").SharedValue<string | undefined> | undefined;
|
|
308
|
-
onPress?: ((event: import("react-native").GestureResponderEvent) => void) | import("react-native-reanimated").SharedValue<((event: import("react-native").GestureResponderEvent) => void) | null | undefined> | null | undefined;
|
|
309
308
|
disabled?: boolean | import("react-native-reanimated").SharedValue<boolean | null | undefined> | null | undefined;
|
|
310
309
|
onBlur?: ((event: import("react-native").NativeSyntheticEvent<import("react-native").TargetedEvent>) => void) | import("react-native-reanimated").SharedValue<((event: import("react-native").NativeSyntheticEvent<import("react-native").TargetedEvent>) => void) | null | undefined> | null | undefined;
|
|
311
310
|
onFocus?: ((event: import("react-native").NativeSyntheticEvent<import("react-native").TargetedEvent>) => void) | import("react-native-reanimated").SharedValue<((event: import("react-native").NativeSyntheticEvent<import("react-native").TargetedEvent>) => void) | null | undefined> | null | undefined;
|
|
@@ -339,6 +338,7 @@ declare const _default: {
|
|
|
339
338
|
pointerEvents?: "none" | "auto" | "box-none" | "box-only" | import("react-native-reanimated").SharedValue<"none" | "auto" | "box-none" | "box-only" | undefined> | undefined;
|
|
340
339
|
children?: import("react").ReactNode | ((state: import("react-native").PressableStateCallbackType) => React.ReactNode) | import("react-native-reanimated").SharedValue<import("react").ReactNode | ((state: import("react-native").PressableStateCallbackType) => React.ReactNode)>;
|
|
341
340
|
ref?: import("react").Ref<View> | import("react-native-reanimated").SharedValue<import("react").Ref<View> | undefined> | undefined;
|
|
341
|
+
onPress?: ((event: import("react-native").GestureResponderEvent) => void) | import("react-native-reanimated").SharedValue<((event: import("react-native").GestureResponderEvent) => void) | null | undefined> | null | undefined;
|
|
342
342
|
hitSlop?: number | import("react-native").Insets | import("react-native-reanimated").SharedValue<number | import("react-native").Insets | null | undefined> | null | undefined;
|
|
343
343
|
needsOffscreenAlphaCompositing?: boolean | import("react-native-reanimated").SharedValue<boolean | undefined> | undefined;
|
|
344
344
|
onLayout?: ((event: import("react-native").LayoutChangeEvent) => void) | import("react-native-reanimated").SharedValue<((event: import("react-native").LayoutChangeEvent) => void) | undefined> | undefined;
|
|
@@ -427,7 +427,6 @@ declare const _default: {
|
|
|
427
427
|
accessibilityLanguage?: string | import("react-native-reanimated").SharedValue<string | undefined> | undefined;
|
|
428
428
|
accessibilityShowsLargeContentViewer?: boolean | import("react-native-reanimated").SharedValue<boolean | undefined> | undefined;
|
|
429
429
|
accessibilityLargeContentTitle?: string | import("react-native-reanimated").SharedValue<string | undefined> | undefined;
|
|
430
|
-
onPress?: ((event: import("react-native").GestureResponderEvent) => void) | import("react-native-reanimated").SharedValue<((event: import("react-native").GestureResponderEvent) => void) | null | undefined> | null | undefined;
|
|
431
430
|
disabled?: boolean | import("react-native-reanimated").SharedValue<boolean | null | undefined> | null | undefined;
|
|
432
431
|
onBlur?: ((event: import("react-native").NativeSyntheticEvent<import("react-native").TargetedEvent>) => void) | import("react-native-reanimated").SharedValue<((event: import("react-native").NativeSyntheticEvent<import("react-native").TargetedEvent>) => void) | null | undefined> | null | undefined;
|
|
433
432
|
onFocus?: ((event: import("react-native").NativeSyntheticEvent<import("react-native").TargetedEvent>) => void) | import("react-native-reanimated").SharedValue<((event: import("react-native").NativeSyntheticEvent<import("react-native").TargetedEvent>) => void) | null | undefined> | null | undefined;
|
|
@@ -458,7 +457,6 @@ declare const _default: {
|
|
|
458
457
|
} & {
|
|
459
458
|
styleId?: string;
|
|
460
459
|
sharedBoundTag?: string;
|
|
461
|
-
measureOnLayout?: boolean;
|
|
462
460
|
} & import("react").RefAttributes<View | import("react").Component<import("react-native").PressableProps & import("react").RefAttributes<View>, any, any>>>>;
|
|
463
461
|
ScrollView: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<{
|
|
464
462
|
id?: string | import("react-native-reanimated").SharedValue<string | undefined> | undefined;
|
|
@@ -795,7 +793,6 @@ declare const _default: {
|
|
|
795
793
|
} & {
|
|
796
794
|
styleId?: string;
|
|
797
795
|
sharedBoundTag?: string;
|
|
798
|
-
measureOnLayout?: boolean;
|
|
799
796
|
} & import("react").RefAttributes<never>>>;
|
|
800
797
|
FlatList: import("react").MemoExoticComponent<import("react").ForwardRefExoticComponent<{
|
|
801
798
|
id?: string | import("react-native-reanimated").SharedValue<string | undefined> | undefined;
|
|
@@ -1266,7 +1263,6 @@ declare const _default: {
|
|
|
1266
1263
|
} & {
|
|
1267
1264
|
styleId?: string;
|
|
1268
1265
|
sharedBoundTag?: string;
|
|
1269
|
-
measureOnLayout?: boolean;
|
|
1270
1266
|
} & import("react").RefAttributes<never>>>;
|
|
1271
1267
|
MaskedView: typeof MaskedView;
|
|
1272
1268
|
presets: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmC,IAAI,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmC,IAAI,EAAE,MAAM,cAAc,CAAC;AAErE,OAAO,EAAE,8BAA8B,EAAE,MAAM,gDAAgD,CAAC;AAChG,OAAO,UAAU,MAAM,uCAAuC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yBA+Bs1D,CAAC;;;;;;;;;;;AA7Bt5D,wBAaE;AAEF,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,EAAE,0BAA0B,EAAE,MAAM,mEAAmE,CAAC;AAE/G,YAAY,EACX,0BAA0B,EAC1B,sBAAsB,EACtB,2BAA2B,EAC3B,6BAA6B,EAC7B,4BAA4B,EAC5B,yBAAyB,EACzB,yBAAyB,EACzB,sBAAsB,EACtB,sBAAsB,GACtB,MAAM,mBAAmB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"debounce.d.ts","sourceRoot":"","sources":["../../../../../src/integrations/native-stack/utils/debounce.tsx"],"names":[],"mappings":"AAAA,wBAAgB,QAAQ,CAAC,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,
|
|
1
|
+
{"version":3,"file":"debounce.d.ts","sourceRoot":"","sources":["../../../../../src/integrations/native-stack/utils/debounce.tsx"],"names":[],"mappings":"AAAA,wBAAgB,QAAQ,CAAC,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,EAC1D,IAAI,EAAE,CAAC,EACP,QAAQ,EAAE,MAAM,GACd,CAAC,CAUH"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as React from
|
|
2
|
-
import type { Animated } from
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { Animated } from "react-native";
|
|
3
3
|
export declare const AnimatedHeaderHeightContext: React.Context<Animated.AnimatedInterpolation<number> | undefined>;
|
|
4
4
|
export declare function useAnimatedHeaderHeight(): Animated.AnimatedInterpolation<number>;
|
|
5
5
|
//# sourceMappingURL=useAnimatedHeaderHeight.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ParamListBase, StackNavigationState } from
|
|
2
|
-
import * as React from
|
|
1
|
+
import type { ParamListBase, StackNavigationState } from "@react-navigation/native";
|
|
2
|
+
import * as React from "react";
|
|
3
3
|
export declare function useDismissedRouteError(state: StackNavigationState<ParamListBase>): {
|
|
4
4
|
setNextDismissedKey: React.Dispatch<React.SetStateAction<string | null>>;
|
|
5
5
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDismissedRouteError.d.ts","sourceRoot":"","sources":["../../../../../src/integrations/native-stack/utils/useDismissedRouteError.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"useDismissedRouteError.d.ts","sourceRoot":"","sources":["../../../../../src/integrations/native-stack/utils/useDismissedRouteError.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,aAAa,EACb,oBAAoB,EACpB,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,wBAAgB,sBAAsB,CACrC,KAAK,EAAE,oBAAoB,CAAC,aAAa,CAAC;;EAsB1C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FontProcessor.d.ts","sourceRoot":"","sources":["../../../../../src/integrations/native-stack/views/FontProcessor.tsx"],"names":[],"mappings":"AAAA,wBAAgB,YAAY,
|
|
1
|
+
{"version":3,"file":"FontProcessor.d.ts","sourceRoot":"","sources":["../../../../../src/integrations/native-stack/views/FontProcessor.tsx"],"names":[],"mappings":"AAAA,wBAAgB,YAAY,CAC3B,CAAC,EAAE,CAAC,MAAM,GAAG,SAAS,CAAC,EAAE,GACvB,CAAC,MAAM,GAAG,SAAS,CAAC,EAAE,CAExB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FontProcessor.native.d.ts","sourceRoot":"","sources":["../../../../../src/integrations/native-stack/views/FontProcessor.native.tsx"],"names":[],"mappings":"AAGA,wBAAgB,YAAY,
|
|
1
|
+
{"version":3,"file":"FontProcessor.native.d.ts","sourceRoot":"","sources":["../../../../../src/integrations/native-stack/views/FontProcessor.native.tsx"],"names":[],"mappings":"AAGA,wBAAgB,YAAY,CAC3B,YAAY,EAAE,CAAC,MAAM,GAAG,SAAS,CAAC,EAAE,GAClC,CAAC,MAAM,GAAG,SAAS,CAAC,EAAE,CAMxB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NativeStackView.native.d.ts","sourceRoot":"","sources":["../../../../../src/integrations/native-stack/views/NativeStackView.native.tsx"],"names":[],"mappings":"AASA,OAAO,EAGN,KAAK,aAAa,EAClB,KAAK,SAAS,EAEd,KAAK,oBAAoB,EAGzB,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"NativeStackView.native.d.ts","sourceRoot":"","sources":["../../../../../src/integrations/native-stack/views/NativeStackView.native.tsx"],"names":[],"mappings":"AASA,OAAO,EAGN,KAAK,aAAa,EAClB,KAAK,SAAS,EAEd,KAAK,oBAAoB,EAGzB,MAAM,0BAA0B,CAAC;AAiBlC,OAAO,KAAK,EACX,qBAAqB,EACrB,wBAAwB,EACxB,4BAA4B,EAC5B,MAAM,0BAA0B,CAAC;AA6blC,KAAK,KAAK,GAAG;IACZ,KAAK,EAAE,oBAAoB,CAAC,aAAa,CAAC,CAAC;IAC3C,UAAU,EAAE,4BAA4B,CAAC;IACzC,WAAW,EAAE,wBAAwB,CAAC;IACtC,QAAQ,EAAE,CACT,KAAK,EAAE,SAAS,CAAC,aAAa,CAAC,EAC/B,WAAW,EAAE,OAAO,KAChB,qBAAqB,CAAC;CAC3B,CAAC;AAEF,wBAAgB,eAAe,CAAC,EAC/B,KAAK,EACL,UAAU,EACV,WAAW,EACX,QAAQ,GACR,EAAE,KAAK,2CA4HP"}
|
|
@@ -17,7 +17,6 @@ export interface GestureContextType {
|
|
|
17
17
|
type ScreenGestureProviderProps = {
|
|
18
18
|
children: React.ReactNode;
|
|
19
19
|
};
|
|
20
|
-
export declare const DEFAULT_SCROLL_CONFIG: ScrollConfig;
|
|
21
20
|
export declare const ScreenGestureProvider: ({ children, }: ScreenGestureProviderProps) => import("react/jsx-runtime").JSX.Element;
|
|
22
21
|
export declare const useGestureContext: () => GestureContextType;
|
|
23
22
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gestures.d.ts","sourceRoot":"","sources":["../../../src/providers/gestures.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAEhE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAI3D,MAAM,MAAM,YAAY,GAAG;IAC1B,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,MAAM,WAAW,kBAAkB;IAClC,UAAU,EAAE,WAAW,CAAC;IACxB,aAAa,EAAE,WAAW,CAAC;IAC3B,YAAY,EAAE,WAAW,CAAC,YAAY,GAAG,IAAI,CAAC,CAAC;IAC/C,aAAa,EAAE,kBAAkB,GAAG,IAAI,CAAC;CACzC;AAED,KAAK,0BAA0B,GAAG;IACjC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC1B,CAAC;
|
|
1
|
+
{"version":3,"file":"gestures.d.ts","sourceRoot":"","sources":["../../../src/providers/gestures.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAEhE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAI3D,MAAM,MAAM,YAAY,GAAG;IAC1B,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,MAAM,WAAW,kBAAkB;IAClC,UAAU,EAAE,WAAW,CAAC;IACxB,aAAa,EAAE,WAAW,CAAC;IAC3B,YAAY,EAAE,WAAW,CAAC,YAAY,GAAG,IAAI,CAAC,CAAC;IAC/C,aAAa,EAAE,kBAAkB,GAAG,IAAI,CAAC;CACzC;AAED,KAAK,0BAA0B,GAAG;IACjC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC1B,CAAC;AAIF,eAAO,MAAM,qBAAqB,GAAI,eAEnC,0BAA0B,4CA0B5B,CAAC;AAEF,eAAO,MAAM,iBAAiB,0BAU7B,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type React from "react";
|
|
2
|
+
import type { NativeStackDescriptor } from "../types/navigator";
|
|
3
|
+
type Props = {
|
|
4
|
+
previous?: NativeStackDescriptor;
|
|
5
|
+
current: NativeStackDescriptor;
|
|
6
|
+
next?: NativeStackDescriptor;
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
};
|
|
9
|
+
export declare function ScreenTransitionProvider({ previous, current, next, children, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=screen-transition-provider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"screen-transition-provider.d.ts","sourceRoot":"","sources":["../../../src/providers/screen-transition-provider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAEhE,KAAK,KAAK,GAAG;IACZ,QAAQ,CAAC,EAAE,qBAAqB,CAAC;IACjC,OAAO,EAAE,qBAAqB,CAAC;IAC/B,IAAI,CAAC,EAAE,qBAAqB,CAAC;IAC7B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC1B,CAAC;AAEF,wBAAgB,wBAAwB,CAAC,EACxC,QAAQ,EACR,OAAO,EACP,IAAI,EACJ,QAAQ,GACR,EAAE,KAAK,2CAYP"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transition-styles.d.ts","sourceRoot":"","sources":["../../../src/providers/transition-styles.tsx"],"names":[],"mappings":"AACA,OAAO,EAAqB,eAAe,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"transition-styles.d.ts","sourceRoot":"","sources":["../../../src/providers/transition-styles.tsx"],"names":[],"mappings":"AACA,OAAO,EAAqB,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAG7E,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,oBAAoB,CAAC;AAEtE,KAAK,KAAK,GAAG;IACZ,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC1B,CAAC;AAQF,wBAAgB,wBAAwB,CAAC,EAAE,QAAQ,EAAE,EAAE,KAAK,2CAgC3D;AAED,wBAAgB,mBAAmB;eAtCtB,UAAU,CAAC,OAAO,eAAe,CAAC,2BAA2B,CAAC,CAAC;EA8C3E"}
|
|
@@ -39,14 +39,6 @@ export type TransitionAwareProps<T extends object> = AnimatedProps<T> & {
|
|
|
39
39
|
* </Transition.View>
|
|
40
40
|
*/
|
|
41
41
|
sharedBoundTag?: string;
|
|
42
|
-
/**
|
|
43
|
-
* Eagerly measure this component on layout and store the result in the
|
|
44
|
-
* Bounds registry. Useful for nested shared elements that may not receive
|
|
45
|
-
* the press event but still need up-to-date measurements at navigation time.
|
|
46
|
-
*
|
|
47
|
-
* Only has an effect when used together with `sharedBoundTag`.
|
|
48
|
-
*/
|
|
49
|
-
measureOnLayout?: boolean;
|
|
50
42
|
};
|
|
51
43
|
export type TransitionConfig = {
|
|
52
44
|
open: TransitionSpec;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core.d.ts","sourceRoot":"","sources":["../../../src/types/core.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAElD,MAAM,MAAM,WAAW,GAAG,UAAU,GAAG,SAAS,GAAG,MAAM,CAAC;AAE1D,MAAM,MAAM,oBAAoB,CAAC,CAAC,SAAS,MAAM,IAAI,aAAa,CAAC,CAAC,CAAC,GAAG;IACvE;;;;;;;;;;;;;;;;;;;OAmBG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;;;;;;;;;;;;;OAcG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"core.d.ts","sourceRoot":"","sources":["../../../src/types/core.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAElD,MAAM,MAAM,WAAW,GAAG,UAAU,GAAG,SAAS,GAAG,MAAM,CAAC;AAE1D,MAAM,MAAM,oBAAoB,CAAC,CAAC,SAAS,MAAM,IAAI,aAAa,CAAC,CAAC,CAAC,GAAG;IACvE;;;;;;;;;;;;;;;;;;;OAmBG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;;;;;;;;;;;;;OAcG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC9B,IAAI,EAAE,cAAc,CAAC;IACrB,KAAK,EAAE,cAAc,CAAC;CACtB,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { AnimationMap } from "../../stores/animations";
|
|
2
|
+
import type { TransitionSpec } from "../../types/animation";
|
|
3
|
+
interface StartScreenTransitionProps {
|
|
4
|
+
target: "open" | "close";
|
|
5
|
+
spec?: TransitionSpec;
|
|
6
|
+
onAnimationFinish?: (finished: boolean) => void;
|
|
7
|
+
animations: AnimationMap;
|
|
8
|
+
velocity?: number;
|
|
9
|
+
}
|
|
10
|
+
export declare const startScreenTransition: ({ target, spec, onAnimationFinish, animations, velocity, }: StartScreenTransitionProps) => void;
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=start-screen-transition.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"start-screen-transition.d.ts","sourceRoot":"","sources":["../../../../src/utils/animation/start-screen-transition.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAG5D,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,YAAY,CAAC;IACzB,QAAQ,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,eAAO,MAAM,qBAAqB,GAAI,4DAMnC,0BAA0B,SAgC5B,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
1
|
+
import type { ScreenTransitionState } from "../../../types/animation";
|
|
2
|
+
import type { ScreenPhase } from "../../../types/core";
|
|
3
3
|
export type GetBoundsParams = {
|
|
4
4
|
id: string | null;
|
|
5
5
|
phase?: ScreenPhase;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-bounds.d.ts","sourceRoot":"","sources":["../../../../../src/utils/bounds/_types/get-bounds.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"get-bounds.d.ts","sourceRoot":"","sources":["../../../../../src/utils/bounds/_types/get-bounds.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AACtE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAEvD,MAAM,MAAM,eAAe,GAAG;IAC7B,EAAE,EAAE,MAAM,GAAG,IAAI,CAAC;IAClB,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,QAAQ,CAAC,EAAE,qBAAqB,CAAC;IACjC,OAAO,EAAE,qBAAqB,CAAC;IAC/B,IAAI,CAAC,EAAE,qBAAqB,CAAC;CAC7B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/utils/bounds/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/utils/bounds/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAU/C,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AACnE,OAAO,KAAK,EAAE,cAAc,EAAiB,MAAM,oBAAoB,CAAC;AAoBxE,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,UAAU,CAAC;CACvB;AA0MD,eAAO,MAAM,YAAY,GAAI,mEAO1B,yBAAyB,KAAG,cAyC9B,CAAC"}
|
|
@@ -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,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,mFAAmF,CAAC;AACjI,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"apply-offset-rules.d.ts","sourceRoot":"","sources":["../../../../src/utils/gesture/apply-offset-rules.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,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;AAE7B,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,UAAU,CAAC;IACvB,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"}
|
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@ import { useKeys } from "../../providers/keys";
|
|
|
5
5
|
import { Animations } from "../../stores/animations";
|
|
6
6
|
import { NavigatorDismissState } from "../../stores/navigator-dismiss-state";
|
|
7
7
|
import { resetStoresForScreen } from "../../stores/utils/reset-stores-for-screen";
|
|
8
|
-
import {
|
|
8
|
+
import { startScreenTransition } from "../../utils/animation/start-screen-transition";
|
|
9
9
|
|
|
10
10
|
interface ScreenLifecycleProps {
|
|
11
11
|
children: React.ReactNode;
|
|
@@ -35,7 +35,7 @@ export const ScreenLifecycleController = ({
|
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
e.preventDefault();
|
|
38
|
-
const
|
|
38
|
+
const onAnimationFinish = (finished: boolean) => {
|
|
39
39
|
if (finished) {
|
|
40
40
|
current.navigation.dispatch(e.data.action);
|
|
41
41
|
|
|
@@ -46,16 +46,16 @@ export const ScreenLifecycleController = ({
|
|
|
46
46
|
}
|
|
47
47
|
};
|
|
48
48
|
|
|
49
|
-
|
|
49
|
+
startScreenTransition({
|
|
50
50
|
target: "close",
|
|
51
51
|
spec: current.options.transitionSpec,
|
|
52
|
-
|
|
52
|
+
onAnimationFinish,
|
|
53
53
|
animations,
|
|
54
54
|
});
|
|
55
55
|
});
|
|
56
56
|
|
|
57
57
|
const handleInitialize = useStableCallback(() => {
|
|
58
|
-
|
|
58
|
+
startScreenTransition({
|
|
59
59
|
target: "open",
|
|
60
60
|
spec: current.options.transitionSpec,
|
|
61
61
|
animations,
|
|
@@ -7,10 +7,8 @@ import { useAssociatedStyles } from "../hooks/animation/use-associated-style";
|
|
|
7
7
|
import { useBoundsRegistry } from "../hooks/bounds/use-bound-registry";
|
|
8
8
|
import { useScrollRegistry } from "../hooks/gestures/use-scroll-registry";
|
|
9
9
|
import { useGestureContext } from "../providers/gestures";
|
|
10
|
-
import { useKeys } from "../providers/keys";
|
|
11
10
|
import type { TransitionAwareProps } from "../types/core";
|
|
12
11
|
import type { Any } from "../types/utils";
|
|
13
|
-
import { BoundCapture } from "./bound-capture";
|
|
14
12
|
|
|
15
13
|
interface CreateTransitionAwareComponentOptions {
|
|
16
14
|
isScrollable?: boolean;
|
|
@@ -52,66 +50,53 @@ export function createTransitionAwareComponent<P extends object>(
|
|
|
52
50
|
const Inner = forwardRef<
|
|
53
51
|
React.ComponentRef<typeof AnimatedComponent>,
|
|
54
52
|
TransitionAwareProps<P>
|
|
55
|
-
>((props,
|
|
56
|
-
const {
|
|
57
|
-
|
|
58
|
-
style,
|
|
59
|
-
sharedBoundTag,
|
|
60
|
-
styleId,
|
|
61
|
-
onPress,
|
|
62
|
-
measureOnLayout,
|
|
63
|
-
...rest
|
|
64
|
-
} = props as Any;
|
|
53
|
+
>((props, _) => {
|
|
54
|
+
const { children, style, sharedBoundTag, styleId, onPress, ...rest } =
|
|
55
|
+
props as Any;
|
|
65
56
|
|
|
66
57
|
const animatedRef = useAnimatedRef<View>();
|
|
67
|
-
const { current } = useKeys();
|
|
68
58
|
|
|
69
59
|
const { associatedStyles } = useAssociatedStyles({
|
|
70
60
|
id: sharedBoundTag || styleId,
|
|
71
61
|
style,
|
|
72
62
|
});
|
|
73
63
|
|
|
74
|
-
const {
|
|
64
|
+
const {
|
|
65
|
+
handleTransitionLayout,
|
|
66
|
+
captureActiveOnPress,
|
|
67
|
+
MeasurementSyncProvider,
|
|
68
|
+
} = useBoundsRegistry({
|
|
75
69
|
sharedBoundTag,
|
|
76
70
|
animatedRef,
|
|
77
|
-
current,
|
|
78
71
|
style,
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
if (isScrollable) {
|
|
82
|
-
return (
|
|
83
|
-
<ScrollableInner
|
|
84
|
-
{...(props as Any)}
|
|
85
|
-
ref={ref}
|
|
86
|
-
measureBounds={measureBounds}
|
|
87
|
-
handleLayout={handleLayout}
|
|
88
|
-
/>
|
|
89
|
-
);
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
const onLayoutHandler = runOnUI(() => {
|
|
93
|
-
"worklet";
|
|
94
|
-
handleLayout();
|
|
95
|
-
if (measureOnLayout && sharedBoundTag) {
|
|
96
|
-
measureBounds();
|
|
97
|
-
}
|
|
72
|
+
onPress,
|
|
98
73
|
});
|
|
99
74
|
|
|
100
75
|
return (
|
|
101
|
-
<
|
|
76
|
+
<MeasurementSyncProvider>
|
|
102
77
|
<AnimatedComponent
|
|
103
78
|
{...(rest as Any)}
|
|
104
79
|
ref={animatedRef}
|
|
105
80
|
style={[style, associatedStyles]}
|
|
106
|
-
onPress={
|
|
107
|
-
onLayout={
|
|
81
|
+
onPress={captureActiveOnPress}
|
|
82
|
+
onLayout={runOnUI(handleTransitionLayout)}
|
|
83
|
+
collapsable={!sharedBoundTag}
|
|
108
84
|
>
|
|
109
85
|
{children}
|
|
110
86
|
</AnimatedComponent>
|
|
111
|
-
</
|
|
87
|
+
</MeasurementSyncProvider>
|
|
112
88
|
);
|
|
113
89
|
});
|
|
114
90
|
|
|
91
|
+
if (isScrollable) {
|
|
92
|
+
return memo(ScrollableInner) as React.MemoExoticComponent<
|
|
93
|
+
React.ForwardRefExoticComponent<
|
|
94
|
+
TransitionAwareProps<P> &
|
|
95
|
+
React.RefAttributes<React.ComponentRef<typeof Wrapped>>
|
|
96
|
+
>
|
|
97
|
+
>;
|
|
98
|
+
}
|
|
99
|
+
|
|
115
100
|
return memo(Inner) as React.MemoExoticComponent<
|
|
116
101
|
React.ForwardRefExoticComponent<
|
|
117
102
|
TransitionAwareProps<P> &
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type StyleProp, StyleSheet, View, type ViewStyle } from "react-native";
|
|
2
|
+
import { CONTAINER_STYLE_ID, MASK_STYLE_ID } from "../../constants";
|
|
2
3
|
import { createTransitionAwareComponent } from "../create-transition-aware-component";
|
|
3
4
|
|
|
4
5
|
const TransitionView = createTransitionAwareComponent(View);
|
|
@@ -11,9 +12,6 @@ try {
|
|
|
11
12
|
// noop
|
|
12
13
|
}
|
|
13
14
|
|
|
14
|
-
const MASK_STYLE_ID = "_ROOT_MASKED";
|
|
15
|
-
const CONTAINER_STYLE_ID = "_ROOT_CONTAINER";
|
|
16
|
-
|
|
17
15
|
export default function MaskedView({
|
|
18
16
|
children,
|
|
19
17
|
style: userStyles = {},
|
|
@@ -1,28 +1,24 @@
|
|
|
1
1
|
import { memo } from "react";
|
|
2
2
|
import { StyleSheet, View } from "react-native";
|
|
3
|
-
import Animated, {
|
|
4
|
-
|
|
5
|
-
useAnimatedStyle,
|
|
6
|
-
} from "react-native-reanimated";
|
|
3
|
+
import Animated, { useAnimatedStyle } from "react-native-reanimated";
|
|
4
|
+
import { NO_STYLES } from "../constants";
|
|
7
5
|
import { useTransitionStyles } from "../providers/transition-styles";
|
|
8
6
|
|
|
9
7
|
type Props = {
|
|
10
8
|
children: React.ReactNode;
|
|
11
9
|
};
|
|
12
10
|
|
|
13
|
-
const EMPTY_STYLE = Object.freeze({} as StyleProps);
|
|
14
|
-
|
|
15
11
|
export const RootTransitionAware = memo(({ children }: Props) => {
|
|
16
12
|
const { stylesMap } = useTransitionStyles();
|
|
17
13
|
|
|
18
14
|
const animatedContentStyle = useAnimatedStyle(() => {
|
|
19
15
|
"worklet";
|
|
20
|
-
return stylesMap.value.contentStyle ||
|
|
16
|
+
return stylesMap.value.contentStyle || NO_STYLES;
|
|
21
17
|
});
|
|
22
18
|
|
|
23
19
|
const animatedOverlayStyle = useAnimatedStyle(() => {
|
|
24
20
|
"worklet";
|
|
25
|
-
return stylesMap.value.overlayStyle ||
|
|
21
|
+
return stylesMap.value.overlayStyle || NO_STYLES;
|
|
26
22
|
});
|
|
27
23
|
|
|
28
24
|
return (
|
package/src/constants.ts
ADDED
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import type { ParamListBase, RouteProp } from "@react-navigation/native";
|
|
2
|
+
import type { ScaledSize } from "react-native";
|
|
3
|
+
import type { MeasuredDimensions } from "react-native-reanimated";
|
|
4
|
+
import type { ScreenTransitionState } from "./types/animation";
|
|
5
|
+
import type { BoundEntry } from "./types/bounds";
|
|
6
|
+
import type { ActivationArea } from "./types/gesture";
|
|
7
|
+
import type { Complete } from "./types/utils";
|
|
8
|
+
import type { BoundsBuilderOptions } from "./utils/bounds/_types/builder";
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Masked view integration
|
|
12
|
+
*/
|
|
13
|
+
export const MASK_STYLE_ID = "_ROOT_MASKED";
|
|
14
|
+
export const CONTAINER_STYLE_ID = "_ROOT_CONTAINER";
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Styles
|
|
18
|
+
*/
|
|
19
|
+
export const NO_STYLES = Object.freeze({});
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Default screen transition state
|
|
23
|
+
*/
|
|
24
|
+
export const DEFAULT_SCREEN_TRANSITION_STATE: ScreenTransitionState =
|
|
25
|
+
Object.freeze({
|
|
26
|
+
progress: 0,
|
|
27
|
+
closing: 0,
|
|
28
|
+
animating: 0,
|
|
29
|
+
gesture: {
|
|
30
|
+
x: 0,
|
|
31
|
+
y: 0,
|
|
32
|
+
normalizedX: 0,
|
|
33
|
+
normalizedY: 0,
|
|
34
|
+
isDismissing: 0,
|
|
35
|
+
isDragging: 0,
|
|
36
|
+
},
|
|
37
|
+
bounds: {} as Record<string, BoundEntry>,
|
|
38
|
+
route: {} as RouteProp<ParamListBase>,
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Bounds API Defaults
|
|
43
|
+
*/
|
|
44
|
+
export const NO_BOUNDS_MAP: Record<string, BoundEntry> = Object.freeze({});
|
|
45
|
+
export const EMPTY_BOUND_HELPER_RESULT = Object.freeze({});
|
|
46
|
+
export const EMPTY_BOUND_HELPER_RESULT_RAW = Object.freeze({
|
|
47
|
+
scaleX: 1,
|
|
48
|
+
scaleY: 1,
|
|
49
|
+
scale: 1,
|
|
50
|
+
translateX: 0,
|
|
51
|
+
translateY: 0,
|
|
52
|
+
width: 0,
|
|
53
|
+
height: 0,
|
|
54
|
+
});
|
|
55
|
+
export const ENTER_RANGE = [0, 1] as const;
|
|
56
|
+
export const EXIT_RANGE = [1, 2] as const;
|
|
57
|
+
export const FULLSCREEN_DIMENSIONS = (
|
|
58
|
+
dimensions: ScaledSize,
|
|
59
|
+
): MeasuredDimensions => {
|
|
60
|
+
"worklet";
|
|
61
|
+
return {
|
|
62
|
+
x: 0,
|
|
63
|
+
y: 0,
|
|
64
|
+
pageX: 0,
|
|
65
|
+
pageY: 0,
|
|
66
|
+
width: dimensions.width,
|
|
67
|
+
height: dimensions.height,
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
export const DEFAULT_BUILDER_OPTIONS: Complete<
|
|
72
|
+
Omit<BoundsBuilderOptions, "id">
|
|
73
|
+
> = Object.freeze({
|
|
74
|
+
gestures: { x: 0, y: 0 },
|
|
75
|
+
toFullscreen: false,
|
|
76
|
+
absolute: false,
|
|
77
|
+
relative: true,
|
|
78
|
+
method: "transform",
|
|
79
|
+
contentScaleMode: "auto",
|
|
80
|
+
//
|
|
81
|
+
space: "relative",
|
|
82
|
+
target: "bound",
|
|
83
|
+
scaleMode: "match",
|
|
84
|
+
anchor: "center",
|
|
85
|
+
raw: false,
|
|
86
|
+
} as const);
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Default gesture config
|
|
90
|
+
*/
|
|
91
|
+
export const GESTURE_VELOCITY_IMPACT = 0.3;
|
|
92
|
+
export const DEFAULT_GESTURE_DIRECTION = "horizontal";
|
|
93
|
+
export const DEFAULT_GESTURE_ENABLED = false;
|
|
94
|
+
export const DEFAULT_GESTURE_DRIVES_PROGRESS = true;
|
|
95
|
+
export const DEFAULT_GESTURE_ACTIVATION_AREA: ActivationArea = "screen";
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* Default gesture offset
|
|
99
|
+
*/
|
|
100
|
+
export const GESTURE_ACTIVATION_THRESHOLD_X = 10;
|
|
101
|
+
export const GESTURE_ACTIVATION_THRESHOLD_Y = 10;
|
|
102
|
+
export const GESTURE_FAIL_TOLERANCE_X = 15;
|
|
103
|
+
export const GESTURE_FAIL_TOLERANCE_Y = 20;
|
|
104
|
+
export const DEFAULT_EDGE_DISTANCE_HORIZONTAL = 50;
|
|
105
|
+
export const DEFAULT_EDGE_DISTANCE_VERTICAL = 135;
|
|
106
|
+
export const DEFAULT_ACTIVATION_AREA = "screen" as const;
|
|
@@ -4,6 +4,7 @@ import {
|
|
|
4
4
|
useDerivedValue,
|
|
5
5
|
useSharedValue,
|
|
6
6
|
} from "react-native-reanimated";
|
|
7
|
+
import { NO_STYLES } from "../../constants";
|
|
7
8
|
import { useTransitionStyles } from "../../providers/transition-styles";
|
|
8
9
|
|
|
9
10
|
type Props = {
|
|
@@ -11,21 +12,23 @@ type Props = {
|
|
|
11
12
|
style?: StyleProps;
|
|
12
13
|
};
|
|
13
14
|
|
|
14
|
-
const EMPTY_STYLE = Object.freeze({});
|
|
15
|
-
|
|
16
15
|
/**
|
|
17
16
|
* This hook is used to get the associated styles for a given styleId / boundTag.
|
|
18
17
|
*/
|
|
19
|
-
export const useAssociatedStyles = ({ id
|
|
18
|
+
export const useAssociatedStyles = ({ id }: Props = {}) => {
|
|
20
19
|
const { stylesMap } = useTransitionStyles();
|
|
21
20
|
const showAfterFirstFrame = useSharedValue(false);
|
|
22
21
|
|
|
23
22
|
useDerivedValue(() => {
|
|
24
23
|
"worklet";
|
|
24
|
+
|
|
25
|
+
// If the associated styles have already been shown, return.
|
|
26
|
+
|
|
25
27
|
if (!id) {
|
|
26
28
|
showAfterFirstFrame.value = true;
|
|
27
29
|
return;
|
|
28
30
|
}
|
|
31
|
+
|
|
29
32
|
if (!showAfterFirstFrame.value) {
|
|
30
33
|
requestAnimationFrame(() => {
|
|
31
34
|
showAfterFirstFrame.value = true;
|
|
@@ -37,24 +40,25 @@ export const useAssociatedStyles = ({ id, style }: Props = {}) => {
|
|
|
37
40
|
"worklet";
|
|
38
41
|
|
|
39
42
|
if (!id || !stylesMap) {
|
|
40
|
-
return
|
|
43
|
+
return NO_STYLES;
|
|
41
44
|
}
|
|
42
|
-
const base =
|
|
43
|
-
(stylesMap.value[id] as Record<string, unknown>) || EMPTY_STYLE;
|
|
45
|
+
const base = stylesMap.value[id] || NO_STYLES;
|
|
44
46
|
|
|
45
47
|
let opacity = 1;
|
|
46
48
|
|
|
47
49
|
if ("opacity" in base) {
|
|
48
50
|
opacity = base.opacity as number;
|
|
49
51
|
}
|
|
50
|
-
if (style && "opacity" in style) {
|
|
51
|
-
opacity = style.opacity as number;
|
|
52
|
-
}
|
|
53
52
|
|
|
54
53
|
// Only force opacity to 0 during the initial frame; once ready,
|
|
55
54
|
// return base unchanged so we never override user-provided opacity.
|
|
56
55
|
if (!showAfterFirstFrame.value) {
|
|
57
|
-
return { ...base, opacity: 0 }
|
|
56
|
+
return { ...base, opacity: 0 };
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
// Since opacity exists on the base style, we don't need to override it.
|
|
60
|
+
if ("opacity" in base) {
|
|
61
|
+
return base;
|
|
58
62
|
}
|
|
59
63
|
|
|
60
64
|
return { ...base, opacity };
|