react-native-screen-transitions 3.4.0-alpha.1 → 3.4.0-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -1109
- package/lib/commonjs/blank-stack/navigators/create-blank-stack-navigator.js +69 -2
- package/lib/commonjs/blank-stack/navigators/create-blank-stack-navigator.js.map +1 -1
- package/lib/commonjs/component-stack/navigators/create-component-stack-navigator.js +9 -0
- package/lib/commonjs/component-stack/navigators/create-component-stack-navigator.js.map +1 -1
- package/lib/commonjs/shared/components/create-boundary-component/hooks/helpers/measurement-rules.js +195 -0
- package/lib/commonjs/shared/components/create-boundary-component/hooks/helpers/measurement-rules.js.map +1 -0
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-auto-source-measurement.js +7 -14
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-auto-source-measurement.js.map +1 -1
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-boundary-measure-and-store.js +19 -18
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-boundary-measure-and-store.js.map +1 -1
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-deferred-measurement-trigger.js +54 -0
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-deferred-measurement-trigger.js.map +1 -0
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-group-active-measurement.js +40 -8
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-group-active-measurement.js.map +1 -1
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-group-active-source-measurement.js +72 -0
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-group-active-source-measurement.js.map +1 -0
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-initial-layout-handler.js +16 -7
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-initial-layout-handler.js.map +1 -1
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-pending-destination-measurement.js +7 -4
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-pending-destination-measurement.js.map +1 -1
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-pending-destination-retry-measurement.js +14 -15
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-pending-destination-retry-measurement.js.map +1 -1
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-scroll-settled-measurement.js +27 -9
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-scroll-settled-measurement.js.map +1 -1
- package/lib/commonjs/shared/components/create-boundary-component/index.js +23 -10
- package/lib/commonjs/shared/components/create-boundary-component/index.js.map +1 -1
- package/lib/commonjs/shared/components/create-transition-aware-component.js +4 -4
- package/lib/commonjs/shared/components/create-transition-aware-component.js.map +1 -1
- package/lib/commonjs/shared/components/native-screen-container.js +12 -6
- package/lib/commonjs/shared/components/native-screen-container.js.map +1 -1
- package/lib/commonjs/shared/components/native-screen.js +35 -8
- package/lib/commonjs/shared/components/native-screen.js.map +1 -1
- package/lib/commonjs/shared/components/screen-container/deferred-visibility-host.js +43 -0
- package/lib/commonjs/shared/components/screen-container/deferred-visibility-host.js.map +1 -0
- package/lib/commonjs/shared/components/screen-container/hooks/use-content-layout.js +60 -0
- package/lib/commonjs/shared/components/screen-container/hooks/use-content-layout.js.map +1 -0
- package/lib/commonjs/shared/components/screen-container/index.js +7 -4
- package/lib/commonjs/shared/components/screen-container/index.js.map +1 -1
- package/lib/commonjs/shared/components/screen-container/layers/content.js +32 -48
- package/lib/commonjs/shared/components/screen-container/layers/content.js.map +1 -1
- package/lib/commonjs/shared/components/screen-container/layers/maybe-masked-navigation-container.js +9 -20
- package/lib/commonjs/shared/components/screen-container/layers/maybe-masked-navigation-container.js.map +1 -1
- package/lib/commonjs/shared/configs/presets.js +6 -6
- package/lib/commonjs/shared/configs/presets.js.map +1 -1
- package/lib/commonjs/shared/constants.js +10 -4
- package/lib/commonjs/shared/constants.js.map +1 -1
- package/lib/commonjs/shared/hooks/animation/use-associated-style.js +9 -34
- package/lib/commonjs/shared/hooks/animation/use-associated-style.js.map +1 -1
- package/lib/commonjs/shared/index.js +4 -10
- package/lib/commonjs/shared/index.js.map +1 -1
- package/lib/commonjs/shared/providers/gestures/handlers/use-handlers.js +6 -7
- package/lib/commonjs/shared/providers/gestures/handlers/use-handlers.js.map +1 -1
- package/lib/commonjs/shared/providers/gestures/helpers/gesture-activation.js +11 -6
- package/lib/commonjs/shared/providers/gestures/helpers/gesture-activation.js.map +1 -1
- package/lib/commonjs/shared/providers/layout-anchor.provider.js +4 -6
- package/lib/commonjs/shared/providers/layout-anchor.provider.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/animation/helpers/pipeline.js +14 -7
- package/lib/commonjs/shared/providers/screen/animation/helpers/pipeline.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/helpers/resolve-interpolated-style-output.js +36 -0
- package/lib/commonjs/shared/providers/screen/helpers/resolve-interpolated-style-output.js.map +1 -0
- package/lib/commonjs/shared/providers/screen/styles.provider.js +31 -10
- package/lib/commonjs/shared/providers/screen/styles.provider.js.map +1 -1
- package/lib/commonjs/shared/providers/stack/core.provider.js +14 -21
- package/lib/commonjs/shared/providers/stack/core.provider.js.map +1 -1
- package/lib/commonjs/shared/stores/animation.store.js +3 -1
- package/lib/commonjs/shared/stores/animation.store.js.map +1 -1
- package/lib/commonjs/shared/stores/bounds/internals/presence.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/helpers/compute-bounds-styles.js +16 -7
- package/lib/commonjs/shared/utils/bounds/helpers/compute-bounds-styles.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/helpers/resolve-bound-tag.js +0 -5
- package/lib/commonjs/shared/utils/bounds/helpers/resolve-bound-tag.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/index.js +10 -0
- package/lib/commonjs/shared/utils/bounds/index.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/types/frame-props.js +6 -0
- package/lib/commonjs/shared/utils/bounds/types/frame-props.js.map +1 -0
- package/lib/commonjs/shared/utils/bounds/zoom/build.js +34 -31
- package/lib/commonjs/shared/utils/bounds/zoom/build.js.map +1 -1
- package/lib/commonjs/shared/utils/resolve-screen-transition-options.js +25 -0
- package/lib/commonjs/shared/utils/resolve-screen-transition-options.js.map +1 -0
- package/lib/module/blank-stack/navigators/create-blank-stack-navigator.js +69 -3
- package/lib/module/blank-stack/navigators/create-blank-stack-navigator.js.map +1 -1
- package/lib/module/component-stack/navigators/create-component-stack-navigator.js +9 -0
- package/lib/module/component-stack/navigators/create-component-stack-navigator.js.map +1 -1
- package/lib/module/shared/components/create-boundary-component/hooks/helpers/measurement-rules.js +182 -0
- package/lib/module/shared/components/create-boundary-component/hooks/helpers/measurement-rules.js.map +1 -0
- package/lib/module/shared/components/create-boundary-component/hooks/use-auto-source-measurement.js +7 -14
- package/lib/module/shared/components/create-boundary-component/hooks/use-auto-source-measurement.js.map +1 -1
- package/lib/module/shared/components/create-boundary-component/hooks/use-boundary-measure-and-store.js +19 -18
- package/lib/module/shared/components/create-boundary-component/hooks/use-boundary-measure-and-store.js.map +1 -1
- package/lib/module/shared/components/create-boundary-component/hooks/use-deferred-measurement-trigger.js +49 -0
- package/lib/module/shared/components/create-boundary-component/hooks/use-deferred-measurement-trigger.js.map +1 -0
- package/lib/module/shared/components/create-boundary-component/hooks/use-group-active-measurement.js +41 -8
- package/lib/module/shared/components/create-boundary-component/hooks/use-group-active-measurement.js.map +1 -1
- package/lib/module/shared/components/create-boundary-component/hooks/use-group-active-source-measurement.js +67 -0
- package/lib/module/shared/components/create-boundary-component/hooks/use-group-active-source-measurement.js.map +1 -0
- package/lib/module/shared/components/create-boundary-component/hooks/use-initial-layout-handler.js +16 -7
- package/lib/module/shared/components/create-boundary-component/hooks/use-initial-layout-handler.js.map +1 -1
- package/lib/module/shared/components/create-boundary-component/hooks/use-pending-destination-measurement.js +7 -4
- package/lib/module/shared/components/create-boundary-component/hooks/use-pending-destination-measurement.js.map +1 -1
- package/lib/module/shared/components/create-boundary-component/hooks/use-pending-destination-retry-measurement.js +14 -15
- package/lib/module/shared/components/create-boundary-component/hooks/use-pending-destination-retry-measurement.js.map +1 -1
- package/lib/module/shared/components/create-boundary-component/hooks/use-scroll-settled-measurement.js +27 -9
- package/lib/module/shared/components/create-boundary-component/hooks/use-scroll-settled-measurement.js.map +1 -1
- package/lib/module/shared/components/create-boundary-component/index.js +23 -10
- package/lib/module/shared/components/create-boundary-component/index.js.map +1 -1
- package/lib/module/shared/components/create-transition-aware-component.js +4 -4
- package/lib/module/shared/components/create-transition-aware-component.js.map +1 -1
- package/lib/module/shared/components/native-screen-container.js +12 -6
- package/lib/module/shared/components/native-screen-container.js.map +1 -1
- package/lib/module/shared/components/native-screen.js +35 -8
- package/lib/module/shared/components/native-screen.js.map +1 -1
- package/lib/module/shared/components/screen-container/deferred-visibility-host.js +38 -0
- package/lib/module/shared/components/screen-container/deferred-visibility-host.js.map +1 -0
- package/lib/module/shared/components/screen-container/hooks/use-content-layout.js +56 -0
- package/lib/module/shared/components/screen-container/hooks/use-content-layout.js.map +1 -0
- package/lib/module/shared/components/screen-container/index.js +7 -4
- package/lib/module/shared/components/screen-container/index.js.map +1 -1
- package/lib/module/shared/components/screen-container/layers/content.js +37 -53
- package/lib/module/shared/components/screen-container/layers/content.js.map +1 -1
- package/lib/module/shared/components/screen-container/layers/maybe-masked-navigation-container.js +10 -21
- package/lib/module/shared/components/screen-container/layers/maybe-masked-navigation-container.js.map +1 -1
- package/lib/module/shared/configs/presets.js +7 -7
- package/lib/module/shared/configs/presets.js.map +1 -1
- package/lib/module/shared/constants.js +9 -3
- package/lib/module/shared/constants.js.map +1 -1
- package/lib/module/shared/hooks/animation/use-associated-style.js +10 -35
- package/lib/module/shared/hooks/animation/use-associated-style.js.map +1 -1
- package/lib/module/shared/index.js +1 -1
- package/lib/module/shared/index.js.map +1 -1
- package/lib/module/shared/providers/gestures/handlers/use-handlers.js +6 -7
- package/lib/module/shared/providers/gestures/handlers/use-handlers.js.map +1 -1
- package/lib/module/shared/providers/gestures/helpers/gesture-activation.js +11 -6
- package/lib/module/shared/providers/gestures/helpers/gesture-activation.js.map +1 -1
- package/lib/module/shared/providers/layout-anchor.provider.js +4 -6
- package/lib/module/shared/providers/layout-anchor.provider.js.map +1 -1
- package/lib/module/shared/providers/screen/animation/helpers/pipeline.js +14 -7
- package/lib/module/shared/providers/screen/animation/helpers/pipeline.js.map +1 -1
- package/lib/module/shared/providers/screen/helpers/resolve-interpolated-style-output.js +31 -0
- package/lib/module/shared/providers/screen/helpers/resolve-interpolated-style-output.js.map +1 -0
- package/lib/module/shared/providers/screen/styles.provider.js +30 -11
- package/lib/module/shared/providers/screen/styles.provider.js.map +1 -1
- package/lib/module/shared/providers/stack/core.provider.js +14 -21
- package/lib/module/shared/providers/stack/core.provider.js.map +1 -1
- package/lib/module/shared/stores/animation.store.js +3 -1
- package/lib/module/shared/stores/animation.store.js.map +1 -1
- package/lib/module/shared/stores/bounds/internals/presence.js.map +1 -1
- package/lib/module/shared/utils/bounds/helpers/compute-bounds-styles.js +17 -8
- package/lib/module/shared/utils/bounds/helpers/compute-bounds-styles.js.map +1 -1
- package/lib/module/shared/utils/bounds/helpers/resolve-bound-tag.js +0 -5
- package/lib/module/shared/utils/bounds/helpers/resolve-bound-tag.js.map +1 -1
- package/lib/module/shared/utils/bounds/index.js +10 -0
- package/lib/module/shared/utils/bounds/index.js.map +1 -1
- package/lib/module/shared/utils/bounds/types/frame-props.js +4 -0
- package/lib/module/shared/utils/bounds/types/frame-props.js.map +1 -0
- package/lib/module/shared/utils/bounds/zoom/build.js +35 -32
- package/lib/module/shared/utils/bounds/zoom/build.js.map +1 -1
- package/lib/module/shared/utils/resolve-screen-transition-options.js +19 -0
- package/lib/module/shared/utils/resolve-screen-transition-options.js.map +1 -0
- package/lib/typescript/blank-stack/index.d.ts +1 -1
- package/lib/typescript/blank-stack/index.d.ts.map +1 -1
- package/lib/typescript/blank-stack/navigators/create-blank-stack-navigator.d.ts +29 -4
- package/lib/typescript/blank-stack/navigators/create-blank-stack-navigator.d.ts.map +1 -1
- package/lib/typescript/blank-stack/types.d.ts +33 -4
- package/lib/typescript/blank-stack/types.d.ts.map +1 -1
- package/lib/typescript/component-stack/navigators/create-component-stack-navigator.d.ts +8 -0
- package/lib/typescript/component-stack/navigators/create-component-stack-navigator.d.ts.map +1 -1
- package/lib/typescript/shared/components/create-boundary-component/hooks/helpers/measurement-rules.d.ts +81 -0
- package/lib/typescript/shared/components/create-boundary-component/hooks/helpers/measurement-rules.d.ts.map +1 -0
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-auto-source-measurement.d.ts.map +1 -1
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-boundary-measure-and-store.d.ts +2 -3
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-boundary-measure-and-store.d.ts.map +1 -1
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-deferred-measurement-trigger.d.ts +11 -0
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-deferred-measurement-trigger.d.ts.map +1 -0
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-group-active-measurement.d.ts +2 -2
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-group-active-measurement.d.ts.map +1 -1
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-group-active-source-measurement.d.ts +11 -0
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-group-active-source-measurement.d.ts.map +1 -0
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-initial-layout-handler.d.ts.map +1 -1
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-pending-destination-measurement.d.ts.map +1 -1
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-pending-destination-retry-measurement.d.ts +3 -3
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-pending-destination-retry-measurement.d.ts.map +1 -1
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-scroll-settled-measurement.d.ts +2 -2
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-scroll-settled-measurement.d.ts.map +1 -1
- package/lib/typescript/shared/components/create-boundary-component/index.d.ts +5 -3
- package/lib/typescript/shared/components/create-boundary-component/index.d.ts.map +1 -1
- package/lib/typescript/shared/components/create-boundary-component/types.d.ts +2 -4
- package/lib/typescript/shared/components/create-boundary-component/types.d.ts.map +1 -1
- package/lib/typescript/shared/components/create-transition-aware-component.d.ts +1 -0
- package/lib/typescript/shared/components/create-transition-aware-component.d.ts.map +1 -1
- package/lib/typescript/shared/components/native-screen-container.d.ts.map +1 -1
- package/lib/typescript/shared/components/native-screen.d.ts.map +1 -1
- package/lib/typescript/shared/components/screen-container/deferred-visibility-host.d.ts +13 -0
- package/lib/typescript/shared/components/screen-container/deferred-visibility-host.d.ts.map +1 -0
- package/lib/typescript/shared/components/screen-container/hooks/use-content-layout.d.ts +3 -0
- package/lib/typescript/shared/components/screen-container/hooks/use-content-layout.d.ts.map +1 -0
- package/lib/typescript/shared/components/screen-container/index.d.ts.map +1 -1
- package/lib/typescript/shared/components/screen-container/layers/content.d.ts.map +1 -1
- package/lib/typescript/shared/components/screen-container/layers/maybe-masked-navigation-container.d.ts +3 -1
- package/lib/typescript/shared/components/screen-container/layers/maybe-masked-navigation-container.d.ts.map +1 -1
- package/lib/typescript/shared/configs/index.d.ts.map +1 -1
- package/lib/typescript/shared/constants.d.ts +9 -3
- package/lib/typescript/shared/constants.d.ts.map +1 -1
- package/lib/typescript/shared/hooks/animation/use-associated-style.d.ts +5 -11
- package/lib/typescript/shared/hooks/animation/use-associated-style.d.ts.map +1 -1
- package/lib/typescript/shared/index.d.ts +1 -2
- package/lib/typescript/shared/index.d.ts.map +1 -1
- package/lib/typescript/shared/providers/gestures/handlers/use-handlers.d.ts +1 -1
- package/lib/typescript/shared/providers/gestures/handlers/use-handlers.d.ts.map +1 -1
- package/lib/typescript/shared/providers/gestures/helpers/gesture-activation.d.ts.map +1 -1
- package/lib/typescript/shared/providers/layout-anchor.provider.d.ts +1 -1
- package/lib/typescript/shared/providers/layout-anchor.provider.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/animation/helpers/pipeline.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/helpers/resolve-interpolated-style-output.d.ts +10 -0
- package/lib/typescript/shared/providers/screen/helpers/resolve-interpolated-style-output.d.ts.map +1 -0
- package/lib/typescript/shared/providers/screen/styles.provider.d.ts +4 -2
- package/lib/typescript/shared/providers/screen/styles.provider.d.ts.map +1 -1
- package/lib/typescript/shared/providers/stack/core.provider.d.ts +2 -0
- package/lib/typescript/shared/providers/stack/core.provider.d.ts.map +1 -1
- package/lib/typescript/shared/stores/animation.store.d.ts +5 -3
- package/lib/typescript/shared/stores/animation.store.d.ts.map +1 -1
- package/lib/typescript/shared/stores/bounds/internals/presence.d.ts.map +1 -1
- package/lib/typescript/shared/types/animation.types.d.ts +13 -1
- package/lib/typescript/shared/types/animation.types.d.ts.map +1 -1
- package/lib/typescript/shared/types/screen.types.d.ts +51 -22
- package/lib/typescript/shared/types/screen.types.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/helpers/compute-bounds-styles.d.ts +11 -1
- package/lib/typescript/shared/utils/bounds/helpers/compute-bounds-styles.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/helpers/resolve-bound-tag.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/index.d.ts +2 -2
- package/lib/typescript/shared/utils/bounds/index.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/types/frame-props.d.ts +5 -0
- package/lib/typescript/shared/utils/bounds/types/frame-props.d.ts.map +1 -0
- package/lib/typescript/shared/utils/bounds/zoom/accessor.d.ts +4 -4
- package/lib/typescript/shared/utils/bounds/zoom/accessor.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/zoom/build.d.ts +2 -2
- package/lib/typescript/shared/utils/bounds/zoom/build.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/zoom/types.d.ts +3 -3
- package/lib/typescript/shared/utils/bounds/zoom/types.d.ts.map +1 -1
- package/lib/typescript/shared/utils/resolve-screen-transition-options.d.ts +5 -0
- package/lib/typescript/shared/utils/resolve-screen-transition-options.d.ts.map +1 -0
- package/package.json +2 -1
- package/src/blank-stack/index.ts +1 -0
- package/src/blank-stack/navigators/create-blank-stack-navigator.tsx +138 -19
- package/src/blank-stack/types.ts +33 -5
- package/src/component-stack/navigators/create-component-stack-navigator.tsx +8 -0
- package/src/shared/components/create-boundary-component/hooks/helpers/measurement-rules.ts +258 -0
- package/src/shared/components/create-boundary-component/hooks/use-auto-source-measurement.ts +7 -17
- package/src/shared/components/create-boundary-component/hooks/use-boundary-measure-and-store.ts +38 -28
- package/src/shared/components/create-boundary-component/hooks/use-deferred-measurement-trigger.ts +58 -0
- package/src/shared/components/create-boundary-component/hooks/use-group-active-measurement.ts +41 -10
- package/src/shared/components/create-boundary-component/hooks/use-group-active-source-measurement.ts +82 -0
- package/src/shared/components/create-boundary-component/hooks/use-initial-layout-handler.ts +24 -12
- package/src/shared/components/create-boundary-component/hooks/use-pending-destination-measurement.ts +11 -9
- package/src/shared/components/create-boundary-component/hooks/use-pending-destination-retry-measurement.ts +29 -26
- package/src/shared/components/create-boundary-component/hooks/use-scroll-settled-measurement.ts +26 -17
- package/src/shared/components/create-boundary-component/index.tsx +25 -7
- package/src/shared/components/create-boundary-component/types.ts +8 -4
- package/src/shared/components/create-transition-aware-component.tsx +5 -3
- package/src/shared/components/native-screen-container.tsx +11 -3
- package/src/shared/components/native-screen.tsx +65 -20
- package/src/shared/components/screen-container/deferred-visibility-host.tsx +37 -0
- package/src/shared/components/screen-container/hooks/use-content-layout.ts +82 -0
- package/src/shared/components/screen-container/index.tsx +5 -2
- package/src/shared/components/screen-container/layers/content.tsx +53 -80
- package/src/shared/components/screen-container/layers/maybe-masked-navigation-container.tsx +12 -27
- package/src/shared/configs/presets.ts +10 -10
- package/src/shared/constants.ts +5 -3
- package/src/shared/hooks/animation/use-associated-style.ts +10 -54
- package/src/shared/index.ts +2 -3
- package/src/shared/providers/gestures/handlers/use-handlers.ts +8 -5
- package/src/shared/providers/gestures/helpers/gesture-activation.ts +11 -6
- package/src/shared/providers/layout-anchor.provider.tsx +2 -5
- package/src/shared/providers/register-bounds.provider.tsx +1 -1
- package/src/shared/providers/screen/animation/helpers/pipeline.ts +24 -8
- package/src/shared/providers/screen/helpers/resolve-interpolated-style-output.ts +41 -0
- package/src/shared/providers/screen/styles.provider.tsx +95 -72
- package/src/shared/providers/stack/core.provider.tsx +27 -14
- package/src/shared/stores/animation.store.ts +11 -7
- package/src/shared/stores/bounds/internals/presence.ts +3 -1
- package/src/shared/types/animation.types.ts +13 -1
- package/src/shared/types/screen.types.ts +55 -22
- package/src/shared/utils/bounds/helpers/compute-bounds-styles.ts +17 -3
- package/src/shared/utils/bounds/helpers/resolve-bound-tag.ts +0 -6
- package/src/shared/utils/bounds/index.ts +16 -5
- package/src/shared/utils/bounds/types/frame-props.ts +5 -0
- package/src/shared/utils/bounds/zoom/accessor.ts +3 -3
- package/src/shared/utils/bounds/zoom/build.ts +46 -32
- package/src/shared/utils/bounds/zoom/types.ts +3 -3
- package/src/shared/utils/resolve-screen-transition-options.ts +37 -0
- package/lib/commonjs/shared/providers/viewport.provider.js +0 -33
- package/lib/commonjs/shared/providers/viewport.provider.js.map +0 -1
- package/lib/module/shared/providers/viewport.provider.js +0 -27
- package/lib/module/shared/providers/viewport.provider.js.map +0 -1
- package/lib/typescript/shared/providers/viewport.provider.d.ts +0 -13
- package/lib/typescript/shared/providers/viewport.provider.d.ts.map +0 -1
- package/src/shared/providers/viewport.provider.tsx +0 -39
|
@@ -13,19 +13,23 @@ import { useAutoSourceMeasurement } from "./hooks/use-auto-source-measurement";
|
|
|
13
13
|
import { useBoundaryMeasureAndStore } from "./hooks/use-boundary-measure-and-store";
|
|
14
14
|
import { useBoundaryPresence } from "./hooks/use-boundary-presence";
|
|
15
15
|
import { useGroupActiveMeasurement } from "./hooks/use-group-active-measurement";
|
|
16
|
+
import { useGroupActiveSourceMeasurement } from "./hooks/use-group-active-source-measurement";
|
|
16
17
|
import { useInitialLayoutHandler } from "./hooks/use-initial-layout-handler";
|
|
17
18
|
import { usePendingDestinationMeasurement } from "./hooks/use-pending-destination-measurement";
|
|
18
19
|
import { usePendingDestinationRetryMeasurement } from "./hooks/use-pending-destination-retry-measurement";
|
|
19
20
|
import { useScrollSettledMeasurement } from "./hooks/use-scroll-settled-measurement";
|
|
20
21
|
import { buildBoundaryMatchKey } from "./utils/build-boundary-match-key";
|
|
21
22
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
22
|
-
const
|
|
23
|
+
const setGroupSelectionOnUI = (group, id) => {
|
|
23
24
|
"worklet";
|
|
24
25
|
|
|
25
26
|
BoundStore.setGroupActiveId(group, id);
|
|
26
27
|
};
|
|
27
|
-
export function createBoundaryComponent(Wrapped) {
|
|
28
|
-
const
|
|
28
|
+
export function createBoundaryComponent(Wrapped, options = {}) {
|
|
29
|
+
const {
|
|
30
|
+
alreadyAnimated = false
|
|
31
|
+
} = options;
|
|
32
|
+
const AnimatedComponent = alreadyAnimated ? Wrapped : Animated.createAnimatedComponent(Wrapped);
|
|
29
33
|
const Inner = /*#__PURE__*/forwardRef((props, _ref) => {
|
|
30
34
|
const {
|
|
31
35
|
enabled = true,
|
|
@@ -75,8 +79,7 @@ export function createBoundaryComponent(Wrapped) {
|
|
|
75
79
|
associatedStyles
|
|
76
80
|
} = useAssociatedStyles({
|
|
77
81
|
id: sharedBoundTag,
|
|
78
|
-
resetTransformOnUnset: true
|
|
79
|
-
waitForFirstResolvedStyle: true
|
|
82
|
+
resetTransformOnUnset: true
|
|
80
83
|
});
|
|
81
84
|
const maybeMeasureAndStore = useBoundaryMeasureAndStore({
|
|
82
85
|
enabled,
|
|
@@ -146,6 +149,18 @@ export function createBoundaryComponent(Wrapped) {
|
|
|
146
149
|
maybeMeasureAndStore
|
|
147
150
|
});
|
|
148
151
|
|
|
152
|
+
// Source-side analog for grouped retargeting: when an unfocused/source
|
|
153
|
+
// boundary becomes the active member, refresh its snapshot (and source
|
|
154
|
+
// link when one exists) so close transitions don't use stale geometry.
|
|
155
|
+
useGroupActiveSourceMeasurement({
|
|
156
|
+
enabled: runtimeEnabled,
|
|
157
|
+
group,
|
|
158
|
+
id,
|
|
159
|
+
hasNextScreen,
|
|
160
|
+
isAnimating,
|
|
161
|
+
maybeMeasureAndStore
|
|
162
|
+
});
|
|
163
|
+
|
|
149
164
|
// While idle on source screens, re-measure after scroll settles so a later
|
|
150
165
|
// close transition starts from up-to-date source geometry.
|
|
151
166
|
useScrollSettledMeasurement({
|
|
@@ -169,10 +184,10 @@ export function createBoundaryComponent(Wrapped) {
|
|
|
169
184
|
const handlePress = useCallback((...args) => {
|
|
170
185
|
// Press path has priority: capture source before user onPress/navigation.
|
|
171
186
|
if (group) {
|
|
172
|
-
runOnUI(
|
|
187
|
+
runOnUI(setGroupSelectionOnUI)(group, String(id));
|
|
173
188
|
}
|
|
174
189
|
runOnUI(maybeMeasureAndStore)({
|
|
175
|
-
|
|
190
|
+
intent: "capture-source"
|
|
176
191
|
});
|
|
177
192
|
if (typeof onPress === "function") {
|
|
178
193
|
onPress(...args);
|
|
@@ -217,8 +232,6 @@ export const Boundary = {
|
|
|
217
232
|
/** Passive boundary wrapper (no built-in press semantics). */
|
|
218
233
|
View: BoundaryView,
|
|
219
234
|
/** Pressable boundary wrapper with press-priority source capture. */
|
|
220
|
-
Pressable: BoundaryPressable
|
|
221
|
-
/** Factory for custom boundary wrappers. */
|
|
222
|
-
createBoundaryComponent
|
|
235
|
+
Pressable: BoundaryPressable
|
|
223
236
|
};
|
|
224
237
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["forwardRef","memo","useCallback","useMemo","Pressable","View","RNView","Animated","runOnUI","useAnimatedRef","useAssociatedStyles","useLayoutAnchorContext","useDescriptorDerivations","AnimationStore","BoundStore","prepareStyleForBounds","useAutoSourceMeasurement","useBoundaryMeasureAndStore","useBoundaryPresence","useGroupActiveMeasurement","useInitialLayoutHandler","usePendingDestinationMeasurement","usePendingDestinationRetryMeasurement","useScrollSettledMeasurement","buildBoundaryMatchKey","jsx","_jsx","
|
|
1
|
+
{"version":3,"names":["forwardRef","memo","useCallback","useMemo","Pressable","View","RNView","Animated","runOnUI","useAnimatedRef","useAssociatedStyles","useLayoutAnchorContext","useDescriptorDerivations","AnimationStore","BoundStore","prepareStyleForBounds","useAutoSourceMeasurement","useBoundaryMeasureAndStore","useBoundaryPresence","useGroupActiveMeasurement","useGroupActiveSourceMeasurement","useInitialLayoutHandler","usePendingDestinationMeasurement","usePendingDestinationRetryMeasurement","useScrollSettledMeasurement","buildBoundaryMatchKey","jsx","_jsx","setGroupSelectionOnUI","group","id","setGroupActiveId","createBoundaryComponent","Wrapped","options","alreadyAnimated","AnimatedComponent","createAnimatedComponent","Inner","props","_ref","enabled","anchor","scaleMode","target","method","style","onPress","rest","sharedBoundTag","animatedRef","previousScreenKey","preferredSourceScreenKey","currentScreenKey","nextScreenKey","ancestorKeys","navigatorKey","ancestorNavigatorKeys","hasConfiguredInterpolator","runtimeEnabled","hasNextScreen","shouldUpdateDestination","layoutAnchor","boundaryConfig","undefined","isAnimating","getRouteAnimation","progress","preparedStyles","associatedStyles","resetTransformOnUnset","maybeMeasureAndStore","shouldRunDestinationEffects","expectedSourceScreenKey","animating","handlePress","args","String","intent","resolvedOnPress","ref","collapsable","BoundaryView","displayName","BoundaryPressable","Boundary"],"sourceRoot":"../../../../../src","sources":["shared/components/create-boundary-component/index.tsx"],"mappings":";;AAAA,SAECA,UAAU,EACVC,IAAI,EACJC,WAAW,EACXC,OAAO,QACD,OAAO;AACd,SAASC,SAAS,EAAEC,IAAI,IAAIC,MAAM,QAAmB,cAAc;AACnE,OAAOC,QAAQ,IAAIC,OAAO,EAAEC,cAAc,QAAQ,yBAAyB;AAC3E,SAASC,mBAAmB,QAAQ,4CAA4C;AAChF,SAASC,sBAAsB,QAAQ,wCAAwC;AAC/E,SAASC,wBAAwB,QAAQ,oCAAoC;AAC7E,SAASC,cAAc,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YAAY;EAClB;EACA9E,SAAS,EAAEgF;AACZ,CAAC","ignoreList":[]}
|
|
@@ -12,9 +12,10 @@ import { ScrollSettleProvider } from "../providers/scroll-settle.provider";
|
|
|
12
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
13
|
export function createTransitionAwareComponent(Wrapped, options = {}) {
|
|
14
14
|
const {
|
|
15
|
-
isScrollable = false
|
|
15
|
+
isScrollable = false,
|
|
16
|
+
alreadyAnimated = false
|
|
16
17
|
} = options;
|
|
17
|
-
const AnimatedComponent = Animated.createAnimatedComponent(Wrapped);
|
|
18
|
+
const AnimatedComponent = alreadyAnimated ? Wrapped : Animated.createAnimatedComponent(Wrapped);
|
|
18
19
|
const ScrollableInner = /*#__PURE__*/forwardRef((props, ref) => {
|
|
19
20
|
const {
|
|
20
21
|
remeasureOnFocus: _remeasureOnFocus,
|
|
@@ -99,8 +100,7 @@ export function createTransitionAwareComponent(Wrapped, options = {}) {
|
|
|
99
100
|
} = useAssociatedStyles({
|
|
100
101
|
id: sharedBoundTag || styleId,
|
|
101
102
|
style,
|
|
102
|
-
resetTransformOnUnset: !!sharedBoundTag
|
|
103
|
-
waitForFirstResolvedStyle: false
|
|
103
|
+
resetTransformOnUnset: !!sharedBoundTag
|
|
104
104
|
});
|
|
105
105
|
return /*#__PURE__*/_jsx(RegisterBoundsProvider, {
|
|
106
106
|
animatedRef: animatedRef,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["forwardRef","memo","useCallback","GestureDetector","Animated","runOnUI","useAnimatedRef","useComposedEventHandler","useSharedValue","useAssociatedStyles","useScrollRegistry","RegisterBoundsProvider","ScrollSettleProvider","jsx","_jsx","createTransitionAwareComponent","Wrapped","options","isScrollable","AnimatedComponent","createAnimatedComponent","ScrollableInner","props","ref","remeasureOnFocus","_remeasureOnFocus","onScroll","userOnScroll","onMomentumScrollEnd","userOnMomentumScrollEnd","onScrollEndDrag","userOnScrollEndDrag","scrollableProps","settledSignal","emitScrollSettled","value","scrollDirection","horizontal","scrollHandler","onContentSizeChange","onLayout","nativeGesture","direction","composedScrollHandler","handleMomentumScrollEnd","event","handleScrollEndDrag","velocityX","Math","abs","nativeEvent","velocity","x","velocityY","y","scrollableComponent","scrollEventThrottle","children","gesture","Inner","_","style","sharedBoundTag","styleId","onPress","rest","animatedRef","associatedStyles","associatedProps","id","resetTransformOnUnset","
|
|
1
|
+
{"version":3,"names":["forwardRef","memo","useCallback","GestureDetector","Animated","runOnUI","useAnimatedRef","useComposedEventHandler","useSharedValue","useAssociatedStyles","useScrollRegistry","RegisterBoundsProvider","ScrollSettleProvider","jsx","_jsx","createTransitionAwareComponent","Wrapped","options","isScrollable","alreadyAnimated","AnimatedComponent","createAnimatedComponent","ScrollableInner","props","ref","remeasureOnFocus","_remeasureOnFocus","onScroll","userOnScroll","onMomentumScrollEnd","userOnMomentumScrollEnd","onScrollEndDrag","userOnScrollEndDrag","scrollableProps","settledSignal","emitScrollSettled","value","scrollDirection","horizontal","scrollHandler","onContentSizeChange","onLayout","nativeGesture","direction","composedScrollHandler","handleMomentumScrollEnd","event","handleScrollEndDrag","velocityX","Math","abs","nativeEvent","velocity","x","velocityY","y","scrollableComponent","scrollEventThrottle","children","gesture","Inner","_","style","sharedBoundTag","styleId","onPress","rest","animatedRef","associatedStyles","associatedProps","id","resetTransformOnUnset","captureActiveOnPress","handleInitialLayout","animatedProps","collapsable"],"sourceRoot":"../../../../src","sources":["shared/components/create-transition-aware-component.tsx"],"mappings":";;AAAA;;AAEA,SAA6BA,UAAU,EAAEC,IAAI,EAAEC,WAAW,QAAQ,OAAO;AAEzE,SAASC,eAAe,QAAQ,8BAA8B;AAC9D,OAAOC,QAAQ,IACdC,OAAO,EACPC,cAAc,EACdC,uBAAuB,EACvBC,cAAc,QACR,yBAAyB;AAChC,SAASC,mBAAmB,QAAQ,yCAAyC;AAC7E,SAASC,iBAAiB,QAAQ,uCAAuC;AACzE,SAASC,sBAAsB,QAAQ,uCAAuC;AAC9E,SA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
|
|
10
10
|
const {
|
|
11
11
|
flags: {
|
|
12
|
-
DISABLE_NATIVE_SCREENS = false
|
|
12
|
+
DISABLE_NATIVE_SCREENS = false,
|
|
13
|
+
DISABLE_NATIVE_SCREEN_CONTAINER = false
|
|
13
14
|
}
|
|
14
15
|
} = useStack();
|
|
15
|
-
if (!DISABLE_NATIVE_SCREENS) {
|
|
16
|
+
if (!DISABLE_NATIVE_SCREENS && !DISABLE_NATIVE_SCREEN_CONTAINER) {
|
|
16
17
|
return /*#__PURE__*/_jsx(ScreenContainer, {
|
|
17
18
|
style: styles.container,
|
|
18
19
|
children: children
|
|
19
20
|
});
|
|
20
21
|
}
|
|
21
|
-
return
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
return (
|
|
23
|
+
/*#__PURE__*/
|
|
24
|
+
// Mirror ScreenContainer's native boundary when screens are disabled.
|
|
25
|
+
_jsx(View, {
|
|
26
|
+
collapsable: false,
|
|
27
|
+
style: styles.container,
|
|
28
|
+
children: children
|
|
29
|
+
})
|
|
30
|
+
);
|
|
25
31
|
};
|
|
26
32
|
const styles = StyleSheet.create({
|
|
27
33
|
container: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["StyleSheet","View","ScreenContainer","useStack","jsx","_jsx","NativeScreenContainer","children","flags","DISABLE_NATIVE_SCREENS","style","styles","container","create","flex"],"sourceRoot":"../../../../src","sources":["shared/components/native-screen-container.tsx"],"mappings":";;AAAA,SAASA,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAC/C,SAASC,eAAe,QAAQ,sBAAsB;AACtD,SAASC,QAAQ,QAAQ,+BAA+B;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAMzD,OAAO,MAAMC,qBAAqB,GAAGA,CAAC;EAAEC;AAAgB,CAAC,KAAK;EAC7D,MAAM;IACLC,KAAK,EAAE;
|
|
1
|
+
{"version":3,"names":["StyleSheet","View","ScreenContainer","useStack","jsx","_jsx","NativeScreenContainer","children","flags","DISABLE_NATIVE_SCREENS","DISABLE_NATIVE_SCREEN_CONTAINER","style","styles","container","collapsable","create","flex"],"sourceRoot":"../../../../src","sources":["shared/components/native-screen-container.tsx"],"mappings":";;AAAA,SAASA,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAC/C,SAASC,eAAe,QAAQ,sBAAsB;AACtD,SAASC,QAAQ,QAAQ,+BAA+B;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAMzD,OAAO,MAAMC,qBAAqB,GAAGA,CAAC;EAAEC;AAAgB,CAAC,KAAK;EAC7D,MAAM;IACLC,KAAK,EAAE;MACNC,sBAAsB,GAAG,KAAK;MAC9BC,+BAA+B,GAAG;IACnC;EACD,CAAC,GAAGP,QAAQ,CAAC,CAAC;EACd,IAAI,CAACM,sBAAsB,IAAI,CAACC,+BAA+B,EAAE;IAChE,oBACCL,IAAA,CAACH,eAAe;MAACS,KAAK,EAAEC,MAAM,CAACC,SAAU;MAAAN,QAAA,EAAEA;IAAQ,CAAkB,CAAC;EAExE;EACA;IAAA;IACC;IACAF,IAAA,CAACJ,IAAI;MAACa,WAAW,EAAE,KAAM;MAACH,KAAK,EAAEC,MAAM,CAACC,SAAU;MAAAN,QAAA,EAChDA;IAAQ,CACJ;EAAC;AAET,CAAC;AAED,MAAMK,MAAM,GAAGZ,UAAU,CAACe,MAAM,CAAC;EAChCF,SAAS,EAAE;IACVG,IAAI,EAAE;EACP;AACD,CAAC,CAAC","ignoreList":[]}
|
|
@@ -39,24 +39,37 @@ export const NativeScreen = ({
|
|
|
39
39
|
backdropBehaviors
|
|
40
40
|
} = useManagedStackContext();
|
|
41
41
|
const routesLength = routes.length;
|
|
42
|
+
const topIndex = routesLength - 1;
|
|
43
|
+
const topRouteKey = routes[topIndex]?.key ?? routeKey;
|
|
42
44
|
const screenRef = useAnimatedRef();
|
|
43
|
-
const sceneProgress = AnimationStore.getRouteAnimation(routeKey, "progress");
|
|
44
45
|
const sceneClosing = AnimationStore.getRouteAnimation(routeKey, "closing");
|
|
46
|
+
const topSceneProgress = AnimationStore.getRouteAnimation(topRouteKey, "progress");
|
|
47
|
+
const topSceneClosing = AnimationStore.getRouteAnimation(topRouteKey, "closing");
|
|
45
48
|
const screenActivity = useSharedValue(ScreenActivity.TRANSITIONING_OR_BELOW_TOP);
|
|
46
49
|
useDerivedValue(() => {
|
|
47
|
-
if (!
|
|
50
|
+
if (!topSceneProgress) {
|
|
48
51
|
screenActivity.set(ScreenActivity.TRANSITIONING_OR_BELOW_TOP);
|
|
49
52
|
return;
|
|
50
53
|
}
|
|
51
54
|
if (index < routesLength - activeScreensLimit - 1 || isPreloaded) {
|
|
52
55
|
screenActivity.set(ScreenActivity.INACTIVE);
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
const focusedIndex = optimisticFocusedIndex.value;
|
|
59
|
+
const topIsClosing = topSceneClosing.get() > 0 && focusedIndex >= 0 && focusedIndex < topIndex;
|
|
60
|
+
if (topIsClosing) {
|
|
61
|
+
const postCloseActiveStart = Math.max(0, focusedIndex - activeScreensLimit + 1);
|
|
62
|
+
const next = index === topIndex ? ScreenActivity.ON_TOP : index > focusedIndex || index >= postCloseActiveStart ? ScreenActivity.TRANSITIONING_OR_BELOW_TOP : ScreenActivity.INACTIVE;
|
|
57
63
|
if (next !== screenActivity.get()) {
|
|
58
64
|
screenActivity.set(next);
|
|
59
65
|
}
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
const outputValue = index === topIndex ? ScreenActivity.ON_TOP : index >= routesLength - activeScreensLimit ? ScreenActivity.TRANSITIONING_OR_BELOW_TOP : ScreenActivity.INACTIVE;
|
|
69
|
+
const v = interpolate(topSceneProgress.get(), [0, 1 - EPSILON, 1], [1, 1, outputValue], Extrapolation.CLAMP);
|
|
70
|
+
const next = Math.trunc(v) ?? ScreenActivity.TRANSITIONING_OR_BELOW_TOP;
|
|
71
|
+
if (next !== screenActivity.get()) {
|
|
72
|
+
screenActivity.set(next);
|
|
60
73
|
}
|
|
61
74
|
});
|
|
62
75
|
const animatedProps = useAnimatedProps(() => {
|
|
@@ -87,8 +100,22 @@ export const NativeScreen = ({
|
|
|
87
100
|
pointerEvents
|
|
88
101
|
};
|
|
89
102
|
});
|
|
90
|
-
|
|
91
|
-
|
|
103
|
+
if (DISABLE_NATIVE_SCREENS) {
|
|
104
|
+
return /*#__PURE__*/_jsx(Animated.View, {
|
|
105
|
+
ref: screenRef
|
|
106
|
+
// Keep a native boundary per screen when falling back to plain views.
|
|
107
|
+
// Android release builds can otherwise flatten sibling screens together.
|
|
108
|
+
,
|
|
109
|
+
collapsable: false,
|
|
110
|
+
style: StyleSheet.absoluteFill,
|
|
111
|
+
animatedProps: animatedProps,
|
|
112
|
+
children: /*#__PURE__*/_jsx(LayoutAnchorProvider, {
|
|
113
|
+
anchorRef: screenRef,
|
|
114
|
+
children: children
|
|
115
|
+
})
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
return /*#__PURE__*/_jsx(AnimatedNativeScreen, {
|
|
92
119
|
enabled: true,
|
|
93
120
|
ref: screenRef,
|
|
94
121
|
style: StyleSheet.absoluteFill,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["StyleSheet","Animated","Extrapolation","interpolate","useAnimatedProps","useAnimatedRef","useDerivedValue","useSharedValue","Screen","RNSScreen","EPSILON","useStack","LayoutAnchorProvider","useManagedStackContext","AnimationStore","jsx","_jsx","PASSTHROUGH","ScreenActivity","POINT_NONE","POINT_BOX_NONE","AnimatedNativeScreen","createAnimatedComponent","NativeScreen","routeKey","index","isPreloaded","children","freezeOnBlur","shouldFreeze","flags","DISABLE_NATIVE_SCREENS","routes","optimisticFocusedIndex","activeScreensLimit","backdropBehaviors","routesLength","length","screenRef","
|
|
1
|
+
{"version":3,"names":["StyleSheet","Animated","Extrapolation","interpolate","useAnimatedProps","useAnimatedRef","useDerivedValue","useSharedValue","Screen","RNSScreen","EPSILON","useStack","LayoutAnchorProvider","useManagedStackContext","AnimationStore","jsx","_jsx","PASSTHROUGH","ScreenActivity","POINT_NONE","POINT_BOX_NONE","AnimatedNativeScreen","createAnimatedComponent","NativeScreen","routeKey","index","isPreloaded","children","freezeOnBlur","shouldFreeze","flags","DISABLE_NATIVE_SCREENS","routes","optimisticFocusedIndex","activeScreensLimit","backdropBehaviors","routesLength","length","topIndex","topRouteKey","key","screenRef","sceneClosing","getRouteAnimation","topSceneProgress","topSceneClosing","screenActivity","TRANSITIONING_OR_BELOW_TOP","set","INACTIVE","focusedIndex","value","topIsClosing","get","postCloseActiveStart","Math","max","next","ON_TOP","outputValue","v","CLAMP","trunc","animatedProps","activity","isClosing","activeIndex","isActive","activeBackdrop","activeAllowsPassthrough","isAllowedPassthroughBelow","pointerEvents","activityState","View","ref","collapsable","style","absoluteFill","anchorRef","enabled"],"sourceRoot":"../../../../src","sources":["shared/components/native-screen.tsx"],"mappings":";;AACA,SAASA,UAAU,QAAmB,cAAc;AACpD,OAAOC,QAAQ,IACdC,aAAa,EACbC,WAAW,EACXC,gBAAgB,EAChBC,cAAc,EACdC,eAAe,EACfC,cAAc,QACR,yBAAyB;AAChC,SAASC,MAAM,IAAIC,SAAS,QAAQ,sBAAsB;AAC1D,SAASC,OAAO,QAAQ,cAAc;AACtC,SAASC,QAAQ,QAAQ,+BAA+B;AACxD,SAASC,oBAAoB,QAAQ,qCAAqC;AAC1E,SAASC,sBAAsB,QAAQ,qCAAqC;AAC5E,SAASC,cAAc,QAAQ,2BAA2B;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAE3D,MAAMC,WAAW,GAAG,aAAa;AAAC,IAU7BC,cAAc,0BAAdA,cAAc;EAAdA,cAAc,CAAdA,cAAc;EAAdA,cAAc,CAAdA,cAAc;EAAdA,cAAc,CAAdA,cAAc;EAAA,OAAdA,cAAc;AAAA,EAAdA,cAAc;AAMnB,MAAMC,UAAU,GAAG,MAAe;AAClC,MAAMC,cAAc,GAAG,UAAmB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SAAU;IACfmC,KAAK,EAAE5E,UAAU,CAAC6E,YAAa;IAC/BjD,YAAY,EAAEA,YAAa;IAC3BmC,aAAa,EAAEA,aAAc;IAAApC,QAAA,eAE7BX,IAAA,CAACJ,oBAAoB;MAACkE,SAAS,EAAErC,SAAU;MAAAd,QAAA,EACzCA;IAAQ,CACY;EAAC,CACF,CAAC;AAEzB,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { memo } from "react";
|
|
4
|
+
import { StyleSheet } from "react-native";
|
|
5
|
+
import Animated, { useAnimatedStyle } from "react-native-reanimated";
|
|
6
|
+
import { HIDDEN_STYLE, NO_STYLES } from "../../constants";
|
|
7
|
+
import { useScreenStyles } from "../../providers/screen/styles.provider";
|
|
8
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
|
+
/**
|
|
10
|
+
* Hides the full screen visual subtree while an interpolator explicitly reports
|
|
11
|
+
* that it is not safe to reveal yet.
|
|
12
|
+
*
|
|
13
|
+
* This sits above backdrop/content/mask/surface so a deferred transition does
|
|
14
|
+
* not leak raw first-paint UI from nested layers.
|
|
15
|
+
*/
|
|
16
|
+
export const DeferredVisibilityHost = /*#__PURE__*/memo(({
|
|
17
|
+
children
|
|
18
|
+
}) => {
|
|
19
|
+
const {
|
|
20
|
+
resolutionMode
|
|
21
|
+
} = useScreenStyles();
|
|
22
|
+
const animatedStyle = useAnimatedStyle(() => {
|
|
23
|
+
"worklet";
|
|
24
|
+
|
|
25
|
+
return resolutionMode.value === "deferred" ? HIDDEN_STYLE : NO_STYLES;
|
|
26
|
+
});
|
|
27
|
+
return /*#__PURE__*/_jsx(Animated.View, {
|
|
28
|
+
collapsable: false,
|
|
29
|
+
style: [styles.host, animatedStyle],
|
|
30
|
+
children: children
|
|
31
|
+
});
|
|
32
|
+
});
|
|
33
|
+
const styles = StyleSheet.create({
|
|
34
|
+
host: {
|
|
35
|
+
flex: 1
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
//# sourceMappingURL=deferred-visibility-host.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["memo","StyleSheet","Animated","useAnimatedStyle","HIDDEN_STYLE","NO_STYLES","useScreenStyles","jsx","_jsx","DeferredVisibilityHost","children","resolutionMode","animatedStyle","value","View","collapsable","style","styles","host","create","flex"],"sourceRoot":"../../../../../src","sources":["shared/components/screen-container/deferred-visibility-host.tsx"],"mappings":";;AAAA,SAASA,IAAI,QAAQ,OAAO;AAC5B,SAASC,UAAU,QAAQ,cAAc;AACzC,OAAOC,QAAQ,IAAIC,gBAAgB,QAAQ,yBAAyB;AACpE,SAASC,YAAY,EAAEC,SAAS,QAAQ,iBAAiB;AACzD,SAASC,eAAe,QAAQ,wCAAwC;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAMzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,sBAAsB,gBAAGT,IAAI,CAAC,CAAC;EAAEU;AAAgB,CAAC,KAAK;EACnE,MAAM;IAAEC;EAAe,CAAC,GAAGL,eAAe,CAAC,CAAC;EAE5C,MAAMM,aAAa,GAAGT,gBAAgB,CAAC,MAAM;IAC5C,SAAS;;IACT,OAAOQ,cAAc,CAACE,KAAK,KAAK,UAAU,GAAGT,YAAY,GAAGC,SAAS;EACtE,CAAC,CAAC;EAEF,oBACCG,IAAA,CAACN,QAAQ,CAACY,IAAI;IAACC,WAAW,EAAE,KAAM;IAACC,KAAK,EAAE,CAACC,MAAM,CAACC,IAAI,EAAEN,aAAa,CAAE;IAAAF,QAAA,EACrEA;EAAQ,CACK,CAAC;AAElB,CAAC,CAAC;AAEF,MAAMO,MAAM,GAAGhB,UAAU,CAACkB,MAAM,CAAC;EAChCD,IAAI,EAAE;IACLE,IAAI,EAAE;EACP;AACD,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { useCallback } from "react";
|
|
4
|
+
import { useWindowDimensions } from "react-native";
|
|
5
|
+
import { runOnUI } from "react-native-reanimated";
|
|
6
|
+
import { useDescriptorDerivations, useDescriptors } from "../../../providers/screen/descriptors";
|
|
7
|
+
import { AnimationStore } from "../../../stores/animation.store";
|
|
8
|
+
import { animateToProgress } from "../../../utils/animation/animate-to-progress";
|
|
9
|
+
export function useContentLayout() {
|
|
10
|
+
const {
|
|
11
|
+
current
|
|
12
|
+
} = useDescriptors();
|
|
13
|
+
const {
|
|
14
|
+
isFirstKey
|
|
15
|
+
} = useDescriptorDerivations();
|
|
16
|
+
const {
|
|
17
|
+
height: screenHeight
|
|
18
|
+
} = useWindowDimensions();
|
|
19
|
+
const routeKey = current.route.key;
|
|
20
|
+
const animations = AnimationStore.getRouteAnimations(routeKey);
|
|
21
|
+
const autoSnapPointValue = AnimationStore.getAnimation(routeKey, "autoSnapPoint");
|
|
22
|
+
const contentLayoutValue = AnimationStore.getAnimation(routeKey, "contentLayout");
|
|
23
|
+
return useCallback(event => {
|
|
24
|
+
const {
|
|
25
|
+
width,
|
|
26
|
+
height
|
|
27
|
+
} = event.nativeEvent.layout;
|
|
28
|
+
if (width <= 0 || height <= 0) return;
|
|
29
|
+
const fraction = Math.min(height / screenHeight, 1);
|
|
30
|
+
const transitionSpec = current.options.transitionSpec;
|
|
31
|
+
runOnUI((nextWidth, nextHeight, nextFraction, isInitialScreen, spec) => {
|
|
32
|
+
"worklet";
|
|
33
|
+
|
|
34
|
+
contentLayoutValue.value = {
|
|
35
|
+
width: nextWidth,
|
|
36
|
+
height: nextHeight
|
|
37
|
+
};
|
|
38
|
+
const isFirstMeasurement = autoSnapPointValue.value <= 0;
|
|
39
|
+
autoSnapPointValue.value = nextFraction;
|
|
40
|
+
if (!isFirstMeasurement || animations.progress.value !== 0 || animations.animating.value !== 0) {
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
if (isInitialScreen) {
|
|
44
|
+
animations.targetProgress.value = nextFraction;
|
|
45
|
+
animations.progress.value = nextFraction;
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
animateToProgress({
|
|
49
|
+
target: nextFraction,
|
|
50
|
+
spec,
|
|
51
|
+
animations
|
|
52
|
+
});
|
|
53
|
+
})(width, height, fraction, isFirstKey, transitionSpec);
|
|
54
|
+
}, [animations, autoSnapPointValue, contentLayoutValue, current.options.transitionSpec, isFirstKey, screenHeight]);
|
|
55
|
+
}
|
|
56
|
+
//# sourceMappingURL=use-content-layout.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["useCallback","useWindowDimensions","runOnUI","useDescriptorDerivations","useDescriptors","AnimationStore","animateToProgress","useContentLayout","current","isFirstKey","height","screenHeight","routeKey","route","key","animations","getRouteAnimations","autoSnapPointValue","getAnimation","contentLayoutValue","event","width","nativeEvent","layout","fraction","Math","min","transitionSpec","options","nextWidth","nextHeight","nextFraction","isInitialScreen","spec","value","isFirstMeasurement","progress","animating","targetProgress","target"],"sourceRoot":"../../../../../../src","sources":["shared/components/screen-container/hooks/use-content-layout.ts"],"mappings":";;AAAA,SAASA,WAAW,QAAQ,OAAO;AACnC,SAAiCC,mBAAmB,QAAQ,cAAc;AAC1E,SAASC,OAAO,QAAQ,yBAAyB;AACjD,SACCC,wBAAwB,EACxBC,cAAc,QACR,uCAAuC;AAC9C,SAASC,cAAc,QAAQ,iCAAiC;AAChE,SAASC,iBAAiB,QAAQ,8CAA8C;AAEhF,OAAO,SAASC,gBAAgBA,CAAA,EAAG;EAClC,MAAM;IAAEC;EAAQ,CAAC,GAAGJ,cAAc,CAAC,CAAC;EACpC,MAAM;IAAEK;EAAW,CAAC,GAAGN,wBAAwB,CAAC,CAAC;EACjD,MAAM;IAAEO,MAAM,EAAEC;EAAa,CAAC,GAAGV,mBAAmB,CAAC,CAAC;EACtD,MAAMW,QAAQ,GAAGJ,OAAO,CAACK,KAAK,CAACC,GAAG;EAClC,MAAMC,UAAU,GAA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IACH,CACD,CAAC,CAACM,KAAK,EAAEX,MAAM,EAAEc,QAAQ,EAAEf,UAAU,EAAEkB,cAAc,CAAC;EACvD,CAAC,EACD,CACCZ,UAAU,EACVE,kBAAkB,EAClBE,kBAAkB,EAClBX,OAAO,CAACoB,OAAO,CAACD,cAAc,EAC9BlB,UAAU,EACVE,YAAY,CAEd,CAAC;AACF","ignoreList":[]}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import { memo } from "react";
|
|
4
4
|
import { StyleSheet, View } from "react-native";
|
|
5
|
+
import { DeferredVisibilityHost } from "./deferred-visibility-host";
|
|
5
6
|
import { useBackdropPointerEvents } from "./hooks/use-backdrop-pointer-events";
|
|
6
7
|
import { BackdropLayer } from "./layers/backdrop";
|
|
7
8
|
import { ContentLayer } from "./layers/content";
|
|
@@ -12,12 +13,14 @@ export const ScreenContainer = /*#__PURE__*/memo(({
|
|
|
12
13
|
const {
|
|
13
14
|
pointerEvents
|
|
14
15
|
} = useBackdropPointerEvents();
|
|
15
|
-
return /*#__PURE__*/
|
|
16
|
+
return /*#__PURE__*/_jsx(View, {
|
|
16
17
|
style: styles.container,
|
|
17
18
|
pointerEvents: pointerEvents,
|
|
18
|
-
children:
|
|
19
|
-
children:
|
|
20
|
-
|
|
19
|
+
children: /*#__PURE__*/_jsxs(DeferredVisibilityHost, {
|
|
20
|
+
children: [/*#__PURE__*/_jsx(BackdropLayer, {}), /*#__PURE__*/_jsx(ContentLayer, {
|
|
21
|
+
children: children
|
|
22
|
+
})]
|
|
23
|
+
})
|
|
21
24
|
});
|
|
22
25
|
});
|
|
23
26
|
const styles = StyleSheet.create({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["memo","StyleSheet","View","useBackdropPointerEvents","BackdropLayer","ContentLayer","jsx","_jsx","jsxs","_jsxs","ScreenContainer","children","pointerEvents","style","styles","container","create","flex"],"sourceRoot":"../../../../../src","sources":["shared/components/screen-container/index.tsx"],"mappings":";;AAAA,SAASA,IAAI,QAAQ,OAAO;AAC5B,SAASC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAC/C,SAASC,wBAAwB,QAAQ,qCAAqC;AAC9E,SAASC,aAAa,QAAQ,mBAAmB;AACjD,SAASC,YAAY,QAAQ,kBAAkB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAMhD,OAAO,MAAMC,eAAe,
|
|
1
|
+
{"version":3,"names":["memo","StyleSheet","View","DeferredVisibilityHost","useBackdropPointerEvents","BackdropLayer","ContentLayer","jsx","_jsx","jsxs","_jsxs","ScreenContainer","children","pointerEvents","style","styles","container","create","flex"],"sourceRoot":"../../../../../src","sources":["shared/components/screen-container/index.tsx"],"mappings":";;AAAA,SAASA,IAAI,QAAQ,OAAO;AAC5B,SAASC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAC/C,SAASC,sBAAsB,QAAQ,4BAA4B;AACnE,SAASC,wBAAwB,QAAQ,qCAAqC;AAC9E,SAASC,aAAa,QAAQ,mBAAmB;AACjD,SAASC,YAAY,QAAQ,kBAAkB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAMhD,OAAO,MAAMC,eAAe,gBAAGX,IAAI,CAAC,CAAC;EAAEY;AAAgB,CAAC,KAAK;EAC5D,MAAM;IAAEC;EAAc,CAAC,GAAGT,wBAAwB,CAAC,CAAC;EAEpD,oBACCI,IAAA,CAACN,IAAI;IAACY,KAAK,EAAEC,MAAM,CAACC,SAAU;IAACH,aAAa,EAAEA,aAAc;IAAAD,QAAA,eAC3DF,KAAA,CAACP,sBAAsB;MAAAS,QAAA,gBACtBJ,IAAA,CAACH,aAAa,IAAE,CAAC,eACjBG,IAAA,CAACF,YAAY;QAAAM,QAAA,EAAEA;MAAQ,CAAe,CAAC;IAAA,CAChB;EAAC,CACpB,CAAC;AAET,CAAC,CAAC;AAEF,MAAMG,MAAM,GAAGd,UAAU,CAACgB,MAAM,CAAC;EAChCD,SAAS,EAAE;IACVE,IAAI,EAAE;EACP;AACD,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
/** biome-ignore-all lint/style/noNonNullAssertion: <Screen gesture is under the gesture context, so this will always exist.> */
|
|
4
|
-
import { memo
|
|
5
|
-
import { StyleSheet,
|
|
4
|
+
import { memo } from "react";
|
|
5
|
+
import { StyleSheet, View } from "react-native";
|
|
6
6
|
import { GestureDetector } from "react-native-gesture-handler";
|
|
7
|
-
import Animated, {
|
|
8
|
-
import { NO_PROPS, NO_STYLES } from "../../../constants";
|
|
7
|
+
import Animated, { useAnimatedProps, useAnimatedStyle } from "react-native-reanimated";
|
|
8
|
+
import { NAVIGATION_MASK_CONTAINER_STYLE_ID, NO_PROPS, NO_STYLES } from "../../../constants";
|
|
9
9
|
import { useGestureContext } from "../../../providers/gestures";
|
|
10
|
-
import {
|
|
10
|
+
import { useDescriptors } from "../../../providers/screen/descriptors";
|
|
11
11
|
import { useScreenStyles } from "../../../providers/screen/styles.provider";
|
|
12
|
-
import {
|
|
13
|
-
import { animateToProgress } from "../../../utils/animation/animate-to-progress";
|
|
12
|
+
import { resolveNavigationMaskEnabled } from "../../../utils/resolve-screen-transition-options";
|
|
14
13
|
import { useBackdropPointerEvents } from "../hooks/use-backdrop-pointer-events";
|
|
14
|
+
import { useContentLayout } from "../hooks/use-content-layout";
|
|
15
15
|
import { MaybeMaskedNavigationContainer } from "./maybe-masked-navigation-container";
|
|
16
16
|
import { SurfaceContainer } from "./surface-container";
|
|
17
17
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -24,81 +24,65 @@ export const ContentLayer = /*#__PURE__*/memo(({
|
|
|
24
24
|
const {
|
|
25
25
|
current
|
|
26
26
|
} = useDescriptors();
|
|
27
|
-
const {
|
|
28
|
-
isFirstKey
|
|
29
|
-
} = useDescriptorDerivations();
|
|
30
27
|
const {
|
|
31
28
|
pointerEvents,
|
|
32
29
|
isBackdropActive
|
|
33
30
|
} = useBackdropPointerEvents();
|
|
34
31
|
const gestureContext = useGestureContext();
|
|
35
|
-
const
|
|
36
|
-
height: screenHeight
|
|
37
|
-
} = useWindowDimensions();
|
|
38
|
-
const isNavigationMaskEnabled = !!current.options.maskEnabled;
|
|
32
|
+
const isNavigationMaskEnabled = resolveNavigationMaskEnabled(current.options);
|
|
39
33
|
const contentPointerEvents = isBackdropActive ? "box-none" : pointerEvents;
|
|
40
|
-
const routeKey = current.route.key;
|
|
41
|
-
const animations = AnimationStore.getRouteAnimations(routeKey);
|
|
42
|
-
const autoSnapPointValue = AnimationStore.getAnimation(routeKey, "autoSnapPoint");
|
|
43
34
|
const hasAutoSnapPoint = current.options.snapPoints?.includes("auto") ?? false;
|
|
35
|
+
const handleContentLayout = useContentLayout();
|
|
44
36
|
const animatedContentStyle = useAnimatedStyle(() => {
|
|
45
37
|
"worklet";
|
|
46
38
|
|
|
47
39
|
return stylesMap.value.content?.style || NO_STYLES;
|
|
48
40
|
});
|
|
41
|
+
const animatedNavigationContainerStyle = useAnimatedStyle(() => {
|
|
42
|
+
"worklet";
|
|
43
|
+
|
|
44
|
+
return stylesMap.value[NAVIGATION_MASK_CONTAINER_STYLE_ID]?.style || NO_STYLES;
|
|
45
|
+
});
|
|
49
46
|
const animatedContentProps = useAnimatedProps(() => {
|
|
50
47
|
"worklet";
|
|
51
48
|
|
|
52
49
|
return stylesMap.value.content?.props ?? NO_PROPS;
|
|
53
50
|
});
|
|
54
|
-
const
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
target: nextFraction,
|
|
74
|
-
spec,
|
|
75
|
-
animations
|
|
76
|
-
});
|
|
77
|
-
})(fraction, isFirstKey, transitionSpec);
|
|
78
|
-
}, [animations, autoSnapPointValue, current.options.transitionSpec, isFirstKey, screenHeight]);
|
|
51
|
+
const surfaceChildren = /*#__PURE__*/_jsx(SurfaceContainer, {
|
|
52
|
+
pointerEvents: contentPointerEvents,
|
|
53
|
+
children: hasAutoSnapPoint ? /*#__PURE__*/_jsx(View, {
|
|
54
|
+
collapsable: false,
|
|
55
|
+
onLayout: handleContentLayout,
|
|
56
|
+
children: children
|
|
57
|
+
}) : children
|
|
58
|
+
});
|
|
59
|
+
const navigationContainer = /*#__PURE__*/_jsx(Animated.View, {
|
|
60
|
+
style: [styles.navigationContainer, animatedNavigationContainerStyle],
|
|
61
|
+
pointerEvents: contentPointerEvents,
|
|
62
|
+
collapsable: false,
|
|
63
|
+
children: surfaceChildren
|
|
64
|
+
});
|
|
65
|
+
const navigationScopedChildren = isNavigationMaskEnabled ? /*#__PURE__*/_jsx(MaybeMaskedNavigationContainer, {
|
|
66
|
+
pointerEvents: contentPointerEvents,
|
|
67
|
+
enabled: isNavigationMaskEnabled,
|
|
68
|
+
children: navigationContainer
|
|
69
|
+
}) : navigationContainer;
|
|
79
70
|
return /*#__PURE__*/_jsx(GestureDetector, {
|
|
80
71
|
gesture: gestureContext.panGesture,
|
|
81
72
|
children: /*#__PURE__*/_jsx(Animated.View, {
|
|
82
73
|
style: [styles.content, animatedContentStyle],
|
|
83
74
|
animatedProps: animatedContentProps,
|
|
84
75
|
pointerEvents: contentPointerEvents,
|
|
85
|
-
children:
|
|
86
|
-
enabled: isNavigationMaskEnabled,
|
|
87
|
-
children: /*#__PURE__*/_jsx(SurfaceContainer, {
|
|
88
|
-
pointerEvents: contentPointerEvents,
|
|
89
|
-
children: hasAutoSnapPoint ? /*#__PURE__*/_jsx(View, {
|
|
90
|
-
collapsable: false,
|
|
91
|
-
onLayout: handleContentLayout,
|
|
92
|
-
children: children
|
|
93
|
-
}) : children
|
|
94
|
-
})
|
|
95
|
-
})
|
|
76
|
+
children: navigationScopedChildren
|
|
96
77
|
})
|
|
97
78
|
});
|
|
98
79
|
});
|
|
99
80
|
const styles = StyleSheet.create({
|
|
100
81
|
content: {
|
|
101
82
|
flex: 1
|
|
83
|
+
},
|
|
84
|
+
navigationContainer: {
|
|
85
|
+
flex: 1
|
|
102
86
|
}
|
|
103
87
|
});
|
|
104
88
|
//# sourceMappingURL=content.js.map
|