react-native-screen-transitions 3.11.3 → 3.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/blank-stack/components/stack-view.js +1 -2
- package/lib/commonjs/blank-stack/components/stack-view.js.map +1 -1
- package/lib/commonjs/component-stack/components/stack-view.js +1 -2
- package/lib/commonjs/component-stack/components/stack-view.js.map +1 -1
- package/lib/commonjs/native-stack/views/NativeStackView.native.js +2 -3
- package/lib/commonjs/native-stack/views/NativeStackView.native.js.map +1 -1
- package/lib/commonjs/shared/adapters/with-screen-transitions/stack-layout.js +1 -1
- package/lib/commonjs/shared/adapters/with-screen-transitions/stack-layout.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.js +7 -4
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.js.map +1 -1
- package/lib/commonjs/shared/components/overlay/helpers/create-overlay-interpolator-frame.js +30 -0
- package/lib/commonjs/shared/components/overlay/helpers/create-overlay-interpolator-frame.js.map +1 -0
- package/lib/commonjs/shared/components/overlay/helpers/get-active-overlay.js +40 -22
- package/lib/commonjs/shared/components/overlay/helpers/get-active-overlay.js.map +1 -1
- package/lib/commonjs/shared/components/overlay/helpers/retain-ready-overlay-resources.js +21 -0
- package/lib/commonjs/shared/components/overlay/helpers/retain-ready-overlay-resources.js.map +1 -0
- package/lib/commonjs/shared/components/overlay/helpers/run-overlay-slot-interpolator.js +41 -0
- package/lib/commonjs/shared/components/overlay/helpers/run-overlay-slot-interpolator.js.map +1 -0
- package/lib/commonjs/shared/components/overlay/hooks/use-overlay-slot.js +85 -0
- package/lib/commonjs/shared/components/overlay/hooks/use-overlay-slot.js.map +1 -0
- package/lib/commonjs/shared/components/overlay/variations/float-overlay.js +14 -65
- package/lib/commonjs/shared/components/overlay/variations/float-overlay.js.map +1 -1
- package/lib/commonjs/shared/components/overlay/variations/overlay-host.js +89 -16
- package/lib/commonjs/shared/components/overlay/variations/overlay-host.js.map +1 -1
- package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-close-transition-intent.js +4 -1
- package/lib/commonjs/shared/components/screen-lifecycle/hooks/use-close-transition-intent.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/animation/animation.provider.js +10 -7
- package/lib/commonjs/shared/providers/screen/animation/animation.provider.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/animation/helpers/accessors/use-build-transition-accessor.js +6 -8
- package/lib/commonjs/shared/providers/screen/animation/helpers/accessors/use-build-transition-accessor.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/animation/use-screen-animation.js +8 -2
- package/lib/commonjs/shared/providers/screen/animation/use-screen-animation.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/gestures/gestures.provider.js +9 -5
- package/lib/commonjs/shared/providers/screen/gestures/gestures.provider.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/gestures/hooks/use-screen-gesture-config.js +1 -3
- package/lib/commonjs/shared/providers/screen/gestures/hooks/use-screen-gesture-config.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/gestures/ownership/{use-walk-up-and-register-shadowing-claims.js → gesture-ownership-bridge.js} +36 -50
- package/lib/commonjs/shared/providers/screen/gestures/ownership/gesture-ownership-bridge.js.map +1 -0
- package/lib/commonjs/shared/providers/screen/styles/constants.js +1 -0
- package/lib/commonjs/shared/providers/screen/styles/constants.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/styles/helpers/transition-visual-state.js +20 -1
- package/lib/commonjs/shared/providers/screen/styles/helpers/transition-visual-state.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/styles/hooks/slot-resolvers.js +14 -15
- package/lib/commonjs/shared/providers/screen/styles/hooks/slot-resolvers.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/styles/hooks/use-interpolated-style-maps.js +34 -11
- package/lib/commonjs/shared/providers/screen/styles/hooks/use-interpolated-style-maps.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/styles/slot.provider.js +18 -29
- package/lib/commonjs/shared/providers/screen/styles/slot.provider.js.map +1 -1
- package/lib/commonjs/shared/providers/stack/blank-stack-state/helpers/resolve-presented-index.js +18 -0
- package/lib/commonjs/shared/providers/stack/blank-stack-state/helpers/resolve-presented-index.js.map +1 -0
- package/lib/commonjs/shared/providers/stack/blank-stack.provider.js +2 -1
- package/lib/commonjs/shared/providers/stack/blank-stack.provider.js.map +1 -1
- package/lib/commonjs/shared/utils/create-provider.js +119 -10
- package/lib/commonjs/shared/utils/create-provider.js.map +1 -1
- package/lib/module/blank-stack/components/stack-view.js +1 -2
- package/lib/module/blank-stack/components/stack-view.js.map +1 -1
- package/lib/module/component-stack/components/stack-view.js +1 -2
- package/lib/module/component-stack/components/stack-view.js.map +1 -1
- package/lib/module/native-stack/views/NativeStackView.native.js +2 -3
- package/lib/module/native-stack/views/NativeStackView.native.js.map +1 -1
- package/lib/module/shared/adapters/with-screen-transitions/stack-layout.js +1 -1
- package/lib/module/shared/adapters/with-screen-transitions/stack-layout.js.map +1 -1
- package/lib/module/shared/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.js +7 -4
- package/lib/module/shared/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.js.map +1 -1
- package/lib/module/shared/components/overlay/helpers/create-overlay-interpolator-frame.js +25 -0
- package/lib/module/shared/components/overlay/helpers/create-overlay-interpolator-frame.js.map +1 -0
- package/lib/module/shared/components/overlay/helpers/get-active-overlay.js +37 -21
- package/lib/module/shared/components/overlay/helpers/get-active-overlay.js.map +1 -1
- package/lib/module/shared/components/overlay/helpers/retain-ready-overlay-resources.js +17 -0
- package/lib/module/shared/components/overlay/helpers/retain-ready-overlay-resources.js.map +1 -0
- package/lib/module/shared/components/overlay/helpers/run-overlay-slot-interpolator.js +36 -0
- package/lib/module/shared/components/overlay/helpers/run-overlay-slot-interpolator.js.map +1 -0
- package/lib/module/shared/components/overlay/hooks/use-overlay-slot.js +80 -0
- package/lib/module/shared/components/overlay/hooks/use-overlay-slot.js.map +1 -0
- package/lib/module/shared/components/overlay/variations/float-overlay.js +15 -66
- package/lib/module/shared/components/overlay/variations/float-overlay.js.map +1 -1
- package/lib/module/shared/components/overlay/variations/overlay-host.js +90 -18
- package/lib/module/shared/components/overlay/variations/overlay-host.js.map +1 -1
- package/lib/module/shared/components/screen-lifecycle/hooks/use-close-transition-intent.js +4 -1
- package/lib/module/shared/components/screen-lifecycle/hooks/use-close-transition-intent.js.map +1 -1
- package/lib/module/shared/providers/screen/animation/animation.provider.js +10 -7
- package/lib/module/shared/providers/screen/animation/animation.provider.js.map +1 -1
- package/lib/module/shared/providers/screen/animation/helpers/accessors/use-build-transition-accessor.js +6 -8
- package/lib/module/shared/providers/screen/animation/helpers/accessors/use-build-transition-accessor.js.map +1 -1
- package/lib/module/shared/providers/screen/animation/use-screen-animation.js +8 -2
- package/lib/module/shared/providers/screen/animation/use-screen-animation.js.map +1 -1
- package/lib/module/shared/providers/screen/gestures/gestures.provider.js +10 -6
- package/lib/module/shared/providers/screen/gestures/gestures.provider.js.map +1 -1
- package/lib/module/shared/providers/screen/gestures/hooks/use-screen-gesture-config.js +1 -3
- package/lib/module/shared/providers/screen/gestures/hooks/use-screen-gesture-config.js.map +1 -1
- package/lib/module/shared/providers/screen/gestures/ownership/{use-walk-up-and-register-shadowing-claims.js → gesture-ownership-bridge.js} +35 -49
- package/lib/module/shared/providers/screen/gestures/ownership/gesture-ownership-bridge.js.map +1 -0
- package/lib/module/shared/providers/screen/styles/constants.js +1 -0
- package/lib/module/shared/providers/screen/styles/constants.js.map +1 -1
- package/lib/module/shared/providers/screen/styles/helpers/transition-visual-state.js +18 -0
- package/lib/module/shared/providers/screen/styles/helpers/transition-visual-state.js.map +1 -1
- package/lib/module/shared/providers/screen/styles/hooks/slot-resolvers.js +14 -15
- package/lib/module/shared/providers/screen/styles/hooks/slot-resolvers.js.map +1 -1
- package/lib/module/shared/providers/screen/styles/hooks/use-interpolated-style-maps.js +35 -12
- package/lib/module/shared/providers/screen/styles/hooks/use-interpolated-style-maps.js.map +1 -1
- package/lib/module/shared/providers/screen/styles/slot.provider.js +19 -30
- package/lib/module/shared/providers/screen/styles/slot.provider.js.map +1 -1
- package/lib/module/shared/providers/stack/blank-stack-state/helpers/resolve-presented-index.js +14 -0
- package/lib/module/shared/providers/stack/blank-stack-state/helpers/resolve-presented-index.js.map +1 -0
- package/lib/module/shared/providers/stack/blank-stack.provider.js +2 -1
- package/lib/module/shared/providers/stack/blank-stack.provider.js.map +1 -1
- package/lib/module/shared/types/animation.types.js.map +1 -1
- package/lib/module/shared/utils/create-provider.js +119 -10
- package/lib/module/shared/utils/create-provider.js.map +1 -1
- package/lib/typescript/blank-stack/components/stack-view.d.ts.map +1 -1
- package/lib/typescript/blank-stack/types.d.ts +1 -1
- package/lib/typescript/blank-stack/types.d.ts.map +1 -1
- package/lib/typescript/component-stack/components/stack-view.d.ts.map +1 -1
- package/lib/typescript/component-stack/types.d.ts +1 -1
- package/lib/typescript/component-stack/types.d.ts.map +1 -1
- package/lib/typescript/native-stack/types.d.ts +1 -1
- package/lib/typescript/native-stack/types.d.ts.map +1 -1
- package/lib/typescript/native-stack/views/NativeStackView.native.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.d.ts.map +1 -1
- package/lib/typescript/shared/components/overlay/helpers/create-overlay-interpolator-frame.d.ts +7 -0
- package/lib/typescript/shared/components/overlay/helpers/create-overlay-interpolator-frame.d.ts.map +1 -0
- package/lib/typescript/shared/components/overlay/helpers/get-active-overlay.d.ts +17 -7
- package/lib/typescript/shared/components/overlay/helpers/get-active-overlay.d.ts.map +1 -1
- package/lib/typescript/shared/components/overlay/helpers/retain-ready-overlay-resources.d.ts +11 -0
- package/lib/typescript/shared/components/overlay/helpers/retain-ready-overlay-resources.d.ts.map +1 -0
- package/lib/typescript/shared/components/overlay/helpers/run-overlay-slot-interpolator.d.ts +8 -0
- package/lib/typescript/shared/components/overlay/helpers/run-overlay-slot-interpolator.d.ts.map +1 -0
- package/lib/typescript/shared/components/overlay/hooks/use-overlay-slot.d.ts +15 -0
- package/lib/typescript/shared/components/overlay/hooks/use-overlay-slot.d.ts.map +1 -0
- package/lib/typescript/shared/components/overlay/variations/float-overlay.d.ts +1 -1
- package/lib/typescript/shared/components/overlay/variations/float-overlay.d.ts.map +1 -1
- package/lib/typescript/shared/components/overlay/variations/overlay-host.d.ts +7 -6
- package/lib/typescript/shared/components/overlay/variations/overlay-host.d.ts.map +1 -1
- package/lib/typescript/shared/components/screen-lifecycle/hooks/use-close-transition-intent.d.ts.map +1 -1
- package/lib/typescript/shared/index.d.ts +12 -12
- package/lib/typescript/shared/index.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/animation/animation.provider.d.ts +4 -0
- package/lib/typescript/shared/providers/screen/animation/animation.provider.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/animation/helpers/accessors/use-build-transition-accessor.d.ts +4 -1
- package/lib/typescript/shared/providers/screen/animation/helpers/accessors/use-build-transition-accessor.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/animation/use-screen-animation.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/gestures/gestures.provider.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/gestures/hooks/use-screen-gesture-config.d.ts +2 -2
- package/lib/typescript/shared/providers/screen/gestures/hooks/use-screen-gesture-config.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/gestures/ownership/gesture-ownership-bridge.d.ts +3 -0
- package/lib/typescript/shared/providers/screen/gestures/ownership/gesture-ownership-bridge.d.ts.map +1 -0
- package/lib/typescript/shared/providers/screen/styles/constants.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/styles/helpers/transition-visual-state.d.ts +7 -0
- package/lib/typescript/shared/providers/screen/styles/helpers/transition-visual-state.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/styles/hooks/slot-resolvers.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/styles/hooks/use-interpolated-style-maps.d.ts +1 -1
- package/lib/typescript/shared/providers/screen/styles/hooks/use-interpolated-style-maps.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/styles/slot.provider.d.ts +5 -5
- package/lib/typescript/shared/providers/screen/styles/slot.provider.d.ts.map +1 -1
- package/lib/typescript/shared/providers/stack/blank-stack-state/helpers/resolve-presented-index.d.ts +3 -0
- package/lib/typescript/shared/providers/stack/blank-stack-state/helpers/resolve-presented-index.d.ts.map +1 -0
- package/lib/typescript/shared/providers/stack/blank-stack.provider.d.ts.map +1 -1
- package/lib/typescript/shared/types/animation.types.d.ts +8 -0
- package/lib/typescript/shared/types/animation.types.d.ts.map +1 -1
- package/lib/typescript/shared/types/index.d.ts +1 -1
- package/lib/typescript/shared/types/index.d.ts.map +1 -1
- package/lib/typescript/shared/types/overlay.types.d.ts +26 -11
- package/lib/typescript/shared/types/overlay.types.d.ts.map +1 -1
- package/lib/typescript/shared/types/screen.types.d.ts +2 -2
- package/lib/typescript/shared/types/screen.types.d.ts.map +1 -1
- package/lib/typescript/shared/utils/create-provider.d.ts +21 -6
- package/lib/typescript/shared/utils/create-provider.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/blank-stack/components/stack-view.tsx +1 -4
- package/src/blank-stack/types.ts +8 -2
- package/src/component-stack/components/stack-view.tsx +1 -4
- package/src/component-stack/types.ts +8 -2
- package/src/native-stack/types.ts +8 -2
- package/src/native-stack/views/NativeStackView.native.tsx +3 -9
- package/src/shared/adapters/with-screen-transitions/stack-layout.tsx +1 -1
- package/src/shared/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.ts +9 -4
- package/src/shared/components/overlay/helpers/create-overlay-interpolator-frame.ts +29 -0
- package/src/shared/components/overlay/helpers/get-active-overlay.ts +62 -20
- package/src/shared/components/overlay/helpers/retain-ready-overlay-resources.ts +38 -0
- package/src/shared/components/overlay/helpers/run-overlay-slot-interpolator.ts +48 -0
- package/src/shared/components/overlay/hooks/use-overlay-slot.ts +103 -0
- package/src/shared/components/overlay/variations/float-overlay.tsx +22 -64
- package/src/shared/components/overlay/variations/overlay-host.tsx +135 -28
- package/src/shared/components/screen-lifecycle/hooks/use-close-transition-intent.ts +5 -1
- package/src/shared/index.ts +1 -0
- package/src/shared/providers/screen/animation/animation.provider.tsx +24 -11
- package/src/shared/providers/screen/animation/helpers/accessors/use-build-transition-accessor.ts +15 -9
- package/src/shared/providers/screen/animation/use-screen-animation.tsx +12 -2
- package/src/shared/providers/screen/gestures/gestures.provider.tsx +18 -7
- package/src/shared/providers/screen/gestures/hooks/use-screen-gesture-config.ts +4 -4
- package/src/shared/providers/screen/gestures/ownership/{use-walk-up-and-register-shadowing-claims.ts → gesture-ownership-bridge.tsx} +44 -54
- package/src/shared/providers/screen/styles/constants.ts +1 -0
- package/src/shared/providers/screen/styles/helpers/transition-visual-state.ts +26 -0
- package/src/shared/providers/screen/styles/hooks/slot-resolvers.tsx +17 -5
- package/src/shared/providers/screen/styles/hooks/use-interpolated-style-maps.tsx +51 -12
- package/src/shared/providers/screen/styles/slot.provider.tsx +46 -70
- package/src/shared/providers/stack/blank-stack-state/helpers/resolve-presented-index.ts +22 -0
- package/src/shared/providers/stack/blank-stack.provider.tsx +6 -1
- package/src/shared/types/animation.types.ts +8 -0
- package/src/shared/types/index.ts +1 -1
- package/src/shared/types/overlay.types.ts +41 -14
- package/src/shared/types/screen.types.ts +2 -2
- package/src/shared/utils/create-provider.tsx +221 -19
- package/lib/commonjs/shared/providers/screen/gestures/ownership/use-walk-up-and-register-shadowing-claims.js.map +0 -1
- package/lib/commonjs/shared/providers/screen/styles/components/floating-overlay-layer.js +0 -28
- package/lib/commonjs/shared/providers/screen/styles/components/floating-overlay-layer.js.map +0 -1
- package/lib/commonjs/shared/providers/screen/styles/stores/slot-references.store.js +0 -53
- package/lib/commonjs/shared/providers/screen/styles/stores/slot-references.store.js.map +0 -1
- package/lib/module/shared/providers/screen/gestures/ownership/use-walk-up-and-register-shadowing-claims.js.map +0 -1
- package/lib/module/shared/providers/screen/styles/components/floating-overlay-layer.js +0 -24
- package/lib/module/shared/providers/screen/styles/components/floating-overlay-layer.js.map +0 -1
- package/lib/module/shared/providers/screen/styles/stores/slot-references.store.js +0 -47
- package/lib/module/shared/providers/screen/styles/stores/slot-references.store.js.map +0 -1
- package/lib/typescript/shared/providers/screen/gestures/ownership/use-walk-up-and-register-shadowing-claims.d.ts +0 -14
- package/lib/typescript/shared/providers/screen/gestures/ownership/use-walk-up-and-register-shadowing-claims.d.ts.map +0 -1
- package/lib/typescript/shared/providers/screen/styles/components/floating-overlay-layer.d.ts +0 -7
- package/lib/typescript/shared/providers/screen/styles/components/floating-overlay-layer.d.ts.map +0 -1
- package/lib/typescript/shared/providers/screen/styles/stores/slot-references.store.d.ts +0 -6
- package/lib/typescript/shared/providers/screen/styles/stores/slot-references.store.d.ts.map +0 -1
- package/src/shared/providers/screen/styles/components/floating-overlay-layer.tsx +0 -29
- package/src/shared/providers/screen/styles/stores/slot-references.store.ts +0 -72
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useDerivedValue","useScreenAnimationStore","useBuildTransitionAccessor","readScreenAnimationRevisions","useScreenAnimation","target","screenInterpolatorPropsRevision","ancestorScreenAnimationSources","descendantScreenAnimationSources","transition","transitionTarget","normalizeScreenAnimationTarget","length","animation","isTransitionTarget","ancestorCount","undefined","depth","Number","isInteger","ancestor","NaN"],"sourceRoot":"../../../../../../src","sources":["shared/providers/screen/animation/use-screen-animation.tsx"],"mappings":";;AAAA,
|
|
1
|
+
{"version":3,"names":["useRoute","useDerivedValue","useScreenAnimationStore","useBuildTransitionAccessor","readScreenAnimationRevisions","useScreenAnimation","target","route","screenAnimationStore","key","Error","screenInterpolatorPropsRevision","ancestorScreenAnimationSources","descendantScreenAnimationSources","transition","transitionTarget","normalizeScreenAnimationTarget","length","animation","isTransitionTarget","ancestorCount","undefined","depth","Number","isInteger","ancestor","NaN"],"sourceRoot":"../../../../../../src","sources":["shared/providers/screen/animation/use-screen-animation.tsx"],"mappings":";;AAAA,SAASA,QAAQ,QAAQ,0BAA0B;AACnD,SAA4BC,eAAe,QAAQ,yBAAyB;AAK5E,SAASC,uBAAuB,QAAQ,sBAAsB;AAC9D,SAASC,0BAA0B,QAAQ,mDAAmD;AAC9F,SAASC,4BAA4B,QAAQ,2CAA2C;;AAYxF;;AAOA;;AAIA,OAAO,SAASC,kBAAkBA,CACjCC,MAA8B,EAGkB;EAChD,MAAMC,KAAK,GAAGP,QAAQ,CAAC,CAAC;EACxB,MAAMQ,oBAAoB,GAAGN,uBAAuB,CAACK,KAAK,CAACE,GAAG,CAAC;EAE/D,IAAI,CAACD,oBAAoB,EAAE;IAC1B,MAAM,IAAIE,KAAK,CACd,oCAAoCH,KAAK,CAACE,GAAG,iBAC9C,CAAC;EACF;EAEA,MAAM;IACLE,+BAA+B;IAC/BC,8BAA8B;IAC9BC;EACD,CAAC,GAAGL,oBAAoB;EACxB,MAAMM,UAAU,GAAGX,0BAA0B,CAACK,oBAAoB,CAAC;EACnE,MAAMO,gBAAgB,GAAGC,8BAA8B,CACtDV,MAAM,EACNM,8BAA8B,CAACK,MAChC,CAAC;EAED,MAAMC,SAAS,GAAGjB,eAAe,CAAkC,MAAM;IACxE,SAAS;;IACTG,4BAA4B,CAC3BO,+BAA+B,EAC/BC,8BAA8B,EAC9BC,gCACD,CAAC;IACD,OAAOC,UAAU,CAACC,gBAAgB,CAAC;EACpC,CAAC,CAAC;EAEF,OAAOG,SAAS;AACjB;AAEA,MAAMC,kBAAkB,GACvBb,MAA6B,IACS;EACtC,OAAO,OAAOA,MAAM,KAAK,QAAQ,IAAIA,MAAM,KAAK,IAAI,IAAI,OAAO,IAAIA,MAAM;AAC1E,CAAC;AAED,MAAMU,8BAA8B,GAAGA,CACtCV,MAAyC,EACzCc,aAAqB,KACmB;EACxC,IAAId,MAAM,KAAKe,SAAS,IAAIF,kBAAkB,CAACb,MAAM,CAAC,EAAE;IACvD,OAAOA,MAAM;EACd;EAEA,IAAIA,MAAM,KAAK,MAAM,EAAE;IACtB,OAAO;MAAEgB,KAAK,EAAE;IAAE,CAAC;EACpB;EAEA,IAAIhB,MAAM,KAAK,QAAQ,EAAE;IACxB,OAAO;MAAEgB,KAAK,EAAE,CAAC;IAAE,CAAC;EACrB;EAEA,IAAIhB,MAAM,KAAK,MAAM,EAAE;IACtB,OAAO;MAAEgB,KAAK,EAAEF,aAAa,GAAG,CAAC,GAAG,CAACA,aAAa,GAAG,CAAC;IAAE,CAAC;EAC1D;EAEA,IAAI,CAACG,MAAM,CAACC,SAAS,CAAClB,MAAM,CAACmB,QAAQ,CAAC,IAAInB,MAAM,CAACmB,QAAQ,GAAG,CAAC,EAAE;IAC9D,OAAO;MAAEH,KAAK,EAAEC,MAAM,CAACG;IAAI,CAAC;EAC7B;EAEA,OAAO;IAAEJ,KAAK,EAAE,CAAChB,MAAM,CAACmB;EAAS,CAAC;AACnC,CAAC","ignoreList":[]}
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import { useMemo } from "react";
|
|
3
|
+
import { Fragment, useMemo } from "react";
|
|
4
4
|
import { Gesture } from "react-native-gesture-handler";
|
|
5
5
|
import { useSharedValue } from "react-native-reanimated";
|
|
6
6
|
import { ScrollStore } from "../../../stores/scroll.store";
|
|
7
7
|
import createProvider from "../../../utils/create-provider";
|
|
8
8
|
import { useDescriptorsStore } from "../descriptors";
|
|
9
9
|
import { useScreenGestureConfig } from "./hooks/use-screen-gesture-config";
|
|
10
|
-
import {
|
|
10
|
+
import { GestureOwnershipBridge } from "./ownership/gesture-ownership-bridge";
|
|
11
11
|
import { useBuildPanGesture } from "./pan/use-build-pan-gesture";
|
|
12
12
|
import { useBuildPinchGesture } from "./pinch/use-build-pinch-gesture";
|
|
13
13
|
import { NO_DIRECTION_CLAIMS } from "./types";
|
|
14
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
15
|
export const {
|
|
15
16
|
ScreenGestureProvider,
|
|
16
17
|
useScreenGestureStore: useGestureStore
|
|
@@ -21,9 +22,10 @@ export const {
|
|
|
21
22
|
}, {
|
|
22
23
|
useParentStore
|
|
23
24
|
}) => {
|
|
24
|
-
const gestureContext = useParentStore();
|
|
25
|
-
const gestureConfig = useScreenGestureConfig();
|
|
26
25
|
const currentScreenKey = useDescriptorsStore(store => store.derivations.currentScreenKey);
|
|
26
|
+
const isTopMostScreen = useDescriptorsStore(store => store.derivations.isTopMostScreen);
|
|
27
|
+
const gestureContext = useParentStore(parentContext => isTopMostScreen ? parentContext : null);
|
|
28
|
+
const gestureConfig = useScreenGestureConfig(gestureContext);
|
|
27
29
|
const scrollState = ScrollStore.getValue(currentScreenKey, "coordination");
|
|
28
30
|
|
|
29
31
|
// Ancestors read this before activating. If a nested screen claims the same
|
|
@@ -54,10 +56,12 @@ export const {
|
|
|
54
56
|
claimedDirections: gestureConfig.participation.claimedDirections,
|
|
55
57
|
childDirectionClaims
|
|
56
58
|
}), [currentScreenKey, detectorGesture, panGesture, pinchGesture, scrollState, gestureContext, gestureConfig.participation.claimedDirections, childDirectionClaims]);
|
|
57
|
-
|
|
59
|
+
const content = useMemo(() => /*#__PURE__*/_jsxs(Fragment, {
|
|
60
|
+
children: [/*#__PURE__*/_jsx(GestureOwnershipBridge, {}), children]
|
|
61
|
+
}), [children]);
|
|
58
62
|
return {
|
|
59
63
|
value,
|
|
60
|
-
children
|
|
64
|
+
children: content
|
|
61
65
|
};
|
|
62
66
|
});
|
|
63
67
|
//# sourceMappingURL=gestures.provider.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useMemo","Gesture","useSharedValue","ScrollStore","createProvider","useDescriptorsStore","useScreenGestureConfig","
|
|
1
|
+
{"version":3,"names":["Fragment","useMemo","Gesture","useSharedValue","ScrollStore","createProvider","useDescriptorsStore","useScreenGestureConfig","GestureOwnershipBridge","useBuildPanGesture","useBuildPinchGesture","NO_DIRECTION_CLAIMS","jsx","_jsx","jsxs","_jsxs","ScreenGestureProvider","useScreenGestureStore","useGestureStore","guarded","children","useParentStore","currentScreenKey","store","derivations","isTopMostScreen","gestureContext","parentContext","gestureConfig","scrollState","getValue","childDirectionClaims","gestureCompositionOwner","panGesture","pinchGesture","detectorGesture","Simultaneous","value","routeKey","claimedDirections","participation","content"],"sourceRoot":"../../../../../../src","sources":["shared/providers/screen/gestures/gestures.provider.tsx"],"mappings":";;AAAA,SAASA,QAAQ,EAAEC,OAAO,QAAQ,OAAO;AACzC,SAASC,OAAO,QAAQ,8BAA8B;AACtD,SAASC,cAAc,QAAQ,yBAAyB;AACxD,SAASC,WAAW,QAAQ,8BAA8B;AAC1D,OAAOC,cAAc,MAAM,gCAAgC;AAC3D,SAASC,mBAAmB,QAAQ,gBAAgB;AACpD,SAASC,sBAAsB,QAAQ,mCAAmC;AAC1E,SAASC,sBAAsB,QAAQ,sCAAsC;AAC7E,SAASC,kBAAkB,QAAQ,6BAA6B;AAChE,SAASC,oBAAoB,QAAQ,iCAAiC;AACtE,SAICC,mBAAmB,QACb,SAAS;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAMjB,OAAO,MAAM;EAAEC,qBAAqB;EAAEC,qBAAqB,EAAEC;AAAgB,CAAC,GAC7Eb,cAAc,CAAC,eAAe,EAAE;EAAEc,OAAO,EAAE;AAAM,CAAC,CAAC,CAIlD,CACC;EAAEC;AAAS,CAAC,EACZ;EAAEC;AAAe,CAAC,KAC4C;EAC9D,MAAMC,gBAAgB,GAAGhB,mBAAmB,CAC1CiB,KAAK,IAAKA,KAAK,CAACC,WAAW,CAACF,gBAC9B,CAAC;EACD,MAAMG,eAAe,GAAGnB,mBAAmB,CACzCiB,KAAK,IAAKA,KAAK,CAACC,WAAW,CAACC,eAC9B,CAAC;EACD,MAAMC,cAAc,GAAGL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,KAAK;IACLjB,QAAQ,EAAEqB;EACX,CAAC;AACF,CACD,CAAC","ignoreList":[]}
|
|
@@ -3,10 +3,8 @@
|
|
|
3
3
|
import { usePreventRemoveContext } from "@react-navigation/native";
|
|
4
4
|
import { useMemo } from "react";
|
|
5
5
|
import { useDescriptorsStore } from "../../descriptors";
|
|
6
|
-
import { useGestureStore } from "../gestures.provider";
|
|
7
6
|
import { resolveScreenGestureConfig } from "../shared/policy";
|
|
8
|
-
export function useScreenGestureConfig() {
|
|
9
|
-
const gestureContext = useGestureStore();
|
|
7
|
+
export function useScreenGestureConfig(gestureContext) {
|
|
10
8
|
const options = useDescriptorsStore(store => store.options);
|
|
11
9
|
const isFirstKey = useDescriptorsStore(store => store.derivations.isFirstKey);
|
|
12
10
|
const currentScreenKey = useDescriptorsStore(store => store.derivations.currentScreenKey);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["usePreventRemoveContext","useMemo","useDescriptorsStore","
|
|
1
|
+
{"version":3,"names":["usePreventRemoveContext","useMemo","useDescriptorsStore","resolveScreenGestureConfig","useScreenGestureConfig","gestureContext","options","store","isFirstKey","derivations","currentScreenKey","preventedRoutes","isRemovePrevented","preventRemove"],"sourceRoot":"../../../../../../../src","sources":["shared/providers/screen/gestures/hooks/use-screen-gesture-config.ts"],"mappings":";;AAAA,SAASA,uBAAuB,QAAQ,0BAA0B;AAClE,SAASC,OAAO,QAAQ,OAAO;AAC/B,SAASC,mBAAmB,QAAQ,mBAAmB;AACvD,SAASC,0BAA0B,QAAQ,kBAAkB;AAG7D,OAAO,SAASC,sBAAsBA,CACrCC,cAAyC,EACnB;EACtB,MAAMC,OAAO,GAAGJ,mBAAmB,CAAEK,KAAK,IAAKA,KAAK,CAACD,OAAO,CAAC;EAC7D,MAAME,UAAU,GAAGN,mBAAmB,CACpCK,KAAK,IAAKA,KAAK,CAACE,WAAW,CAACD,UAC9B,CAAC;EACD,MAAME,gBAAgB,GAAGR,mBAAmB,CAC1CK,KAAK,IAAKA,KAAK,CAACE,WAAW,CAACC,gBAC9B,CAAC;EACD,MAAM;IAAEC;EAAgB,CAAC,GAAGX,uBAAuB,CAAC,CAAC;EACrD,MAAMY,iBAAiB,GACtBD,eAAe,CAACD,gBAAgB,CAAC,EAAEG,aAAa,KAAK,IAAI;EAE1D,OAAOZ,OAAO,CACb,MACCE,0BAA0B,CAAC;IAC1BG,OAAO;IACPE,UAAU;IACVH,cAAc;IACdO;EACD,CAAC,CAAC,EACH,CAACJ,UAAU,EAAEF,OAAO,EAAED,cAAc,EAAEO,iBAAiB,CACxD,CAAC;AACF","ignoreList":[]}
|
|
@@ -9,12 +9,13 @@ import { useGestureStore } from "../gestures.provider";
|
|
|
9
9
|
import { walkGestureAncestors } from "../shared/ancestors";
|
|
10
10
|
import { resolveScreenGestureConfig } from "../shared/policy";
|
|
11
11
|
import { resolveShadowingClaimDirections } from "./shadowing-claims";
|
|
12
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
13
|
const NO_SHADOWED_ANCESTORS = [];
|
|
13
14
|
const findShadowedDirections = (claimedDirections, ancestorDirections) => {
|
|
14
15
|
const shadowedDirections = [];
|
|
15
|
-
for (const
|
|
16
|
-
if (claimedDirections[
|
|
17
|
-
shadowedDirections.push(
|
|
16
|
+
for (const direction of DIRECTIONS) {
|
|
17
|
+
if (claimedDirections[direction] && ancestorDirections[direction]) {
|
|
18
|
+
shadowedDirections.push(direction);
|
|
18
19
|
}
|
|
19
20
|
}
|
|
20
21
|
return shadowedDirections;
|
|
@@ -44,8 +45,8 @@ const registerShadowingClaims = (shadowedAncestors, currentScreenKey) => {
|
|
|
44
45
|
const newClaims = {
|
|
45
46
|
...ancestor.childDirectionClaims.get()
|
|
46
47
|
};
|
|
47
|
-
for (const
|
|
48
|
-
newClaims[
|
|
48
|
+
for (const direction of directions) {
|
|
49
|
+
newClaims[direction] = {
|
|
49
50
|
routeKey: currentScreenKey,
|
|
50
51
|
isDismissing
|
|
51
52
|
};
|
|
@@ -63,10 +64,9 @@ const clearShadowingClaims = (shadowedAncestors, currentScreenKey) => {
|
|
|
63
64
|
...currentClaims
|
|
64
65
|
};
|
|
65
66
|
let needsUpdate = false;
|
|
66
|
-
for (const
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
newClaims[dir] = null;
|
|
67
|
+
for (const direction of directions) {
|
|
68
|
+
if (currentClaims[direction]?.routeKey === currentScreenKey) {
|
|
69
|
+
newClaims[direction] = null;
|
|
70
70
|
needsUpdate = true;
|
|
71
71
|
}
|
|
72
72
|
}
|
|
@@ -90,44 +90,23 @@ const getDescriptorClaimedDirections = (descriptor, gestureContext) => {
|
|
|
90
90
|
gestureContext
|
|
91
91
|
}).participation.claimedDirections;
|
|
92
92
|
};
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
*
|
|
102
|
-
* C walks up the tree and writes itself into A.childDirectionClaims.vertical.
|
|
103
|
-
* B is skipped because it does not claim vertical.
|
|
104
|
-
*/
|
|
105
|
-
export function useWalkUpAndRegisterShadowingClaims(claimedDirections) {
|
|
106
|
-
const parentContext = useGestureStore();
|
|
93
|
+
const requireGestureContext = gestureContext => {
|
|
94
|
+
if (!gestureContext) {
|
|
95
|
+
throw new Error("GestureOwnershipBridge must be rendered within a ScreenGestureProvider");
|
|
96
|
+
}
|
|
97
|
+
return gestureContext;
|
|
98
|
+
};
|
|
99
|
+
function ActiveGestureOwnershipBridge() {
|
|
100
|
+
const gestureContext = requireGestureContext(useGestureStore());
|
|
107
101
|
const previous = useDescriptorsStore(store => store.previous);
|
|
108
|
-
const
|
|
109
|
-
const
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
* Overlay claims horizontal
|
|
117
|
-
* └─ A has no local horizontal claim
|
|
118
|
-
* └─ B claims horizontal (closing)
|
|
119
|
-
* └─ C claims horizontal (closing)
|
|
120
|
-
*
|
|
121
|
-
* Closing screens are still mounted, so they can still block parent gestures.
|
|
122
|
-
* But they cannot receive touches anymore.
|
|
123
|
-
*
|
|
124
|
-
* So when B/C are closing and the user is really touching A, B/C should not
|
|
125
|
-
* keep blocking the parent with their own gesture config.
|
|
126
|
-
*
|
|
127
|
-
* A closing screen should act like the visible screen underneath it:
|
|
128
|
-
* - if the screen underneath claims the gesture, keep blocking the parent
|
|
129
|
-
* - if the screen underneath does not claim it, let the parent handle it
|
|
130
|
-
*/
|
|
102
|
+
const isCurrentScreenClosing = useBlankStackStore(store => store?.scenesByKey[gestureContext.routeKey]?.activity === "closing");
|
|
103
|
+
const {
|
|
104
|
+
claimedDirections,
|
|
105
|
+
gestureContext: parentContext,
|
|
106
|
+
routeKey: currentScreenKey
|
|
107
|
+
} = gestureContext;
|
|
108
|
+
// A retained closing screen cannot receive touches, so its ownership must
|
|
109
|
+
// mirror the visible screen underneath instead of blocking an ancestor.
|
|
131
110
|
const effectiveClaimedDirections = useMemo(() => resolveShadowingClaimDirections({
|
|
132
111
|
isCurrentScreenClosing,
|
|
133
112
|
currentClaimedDirections: claimedDirections,
|
|
@@ -135,13 +114,20 @@ export function useWalkUpAndRegisterShadowingClaims(claimedDirections) {
|
|
|
135
114
|
}), [isCurrentScreenClosing, claimedDirections, previous, parentContext]);
|
|
136
115
|
const shadowedAncestors = useMemo(() => findShadowedAncestors(parentContext, effectiveClaimedDirections), [parentContext, effectiveClaimedDirections]);
|
|
137
116
|
useLayoutEffect(() => {
|
|
138
|
-
if (!
|
|
117
|
+
if (!shadowedAncestors.length) {
|
|
139
118
|
return;
|
|
140
119
|
}
|
|
141
120
|
registerShadowingClaims(shadowedAncestors, currentScreenKey);
|
|
142
121
|
return () => {
|
|
143
122
|
clearShadowingClaims(shadowedAncestors, currentScreenKey);
|
|
144
123
|
};
|
|
145
|
-
}, [shadowedAncestors, currentScreenKey
|
|
124
|
+
}, [shadowedAncestors, currentScreenKey]);
|
|
125
|
+
return null;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
/** Keeps gesture ownership subscriptions attached only to participating screens. */
|
|
129
|
+
export function GestureOwnershipBridge() {
|
|
130
|
+
const isTopMostScreen = useDescriptorsStore(store => store.derivations.isTopMostScreen);
|
|
131
|
+
return isTopMostScreen ? /*#__PURE__*/_jsx(ActiveGestureOwnershipBridge, {}) : null;
|
|
146
132
|
}
|
|
147
|
-
//# sourceMappingURL=
|
|
133
|
+
//# sourceMappingURL=gesture-ownership-bridge.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["useLayoutEffect","useMemo","GestureStore","DIRECTIONS","NO_CLAIMS","useDescriptorsStore","useBlankStackStore","useGestureStore","walkGestureAncestors","resolveScreenGestureConfig","resolveShadowingClaimDirections","jsx","_jsx","NO_SHADOWED_ANCESTORS","findShadowedDirections","claimedDirections","ancestorDirections","shadowedDirections","direction","push","findShadowedAncestors","parentContext","ancestors","ancestor","directions","length","registerShadowingClaims","shadowedAncestors","currentScreenKey","isDismissing","getValue","newClaims","childDirectionClaims","get","routeKey","set","clearShadowingClaims","currentClaims","needsUpdate","getDescriptorIsFirstKey","descriptor","navigationState","navigation","getState","routes","findIndex","route","key","getDescriptorClaimedDirections","gestureContext","options","isFirstKey","participation","requireGestureContext","Error","ActiveGestureOwnershipBridge","previous","store","isCurrentScreenClosing","scenesByKey","activity","effectiveClaimedDirections","currentClaimedDirections","previousClaimedDirections","GestureOwnershipBridge","isTopMostScreen","derivations"],"sourceRoot":"../../../../../../../src","sources":["shared/providers/screen/gestures/ownership/gesture-ownership-bridge.tsx"],"mappings":";;AAAA,SAASA,eAAe,EAAEC,OAAO,QAAQ,OAAO;AAChD,SAASC,YAAY,QAAQ,kCAAkC;AAC/D,SAECC,UAAU,EAEVC,SAAS,QACH,mCAAmC;AAC1C,SAECC,mBAAmB,QACb,6BAA6B;AACpC,SAASC,kBAAkB,QAAQ,qCAAqC;AACxE,SAASC,eAAe,QA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CAACC,aAAa,EAAEwC,0BAA0B,CAAC,EACtE,CAACxC,aAAa,EAAEwC,0BAA0B,CAC3C,CAAC;EAED7D,eAAe,CAAC,MAAM;IACrB,IAAI,CAAC2B,iBAAiB,CAACF,MAAM,EAAE;MAC9B;IACD;IAEAC,uBAAuB,CAACC,iBAAiB,EAAEC,gBAAgB,CAAC;IAE5D,OAAO,MAAM;MACZQ,oBAAoB,CAACT,iBAAiB,EAAEC,gBAAgB,CAAC;IAC1D,CAAC;EACF,CAAC,EAAE,CAACD,iBAAiB,EAAEC,gBAAgB,CAAC,CAAC;EAEzC,OAAO,IAAI;AACZ;;AAEA;AACA,OAAO,SAASoC,sBAAsBA,CAAA,EAAG;EACxC,MAAMC,eAAe,GAAG5D,mBAAmB,CACzCoD,KAAK,IAAKA,KAAK,CAACS,WAAW,CAACD,eAC9B,CAAC;EAED,OAAOA,eAAe,gBAAGrD,IAAA,CAAC2C,4BAA4B,IAAE,CAAC,GAAG,IAAI;AACjE","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["PORTAL_HOST_NAME_RESET_VALUE","NAVIGATION_MASK_CONTAINER_STYLE_ID","NAVIGATION_MASK_ELEMENT_STYLE_ID","IDENTITY_TRANSFORM","translateX","translateY","scale","scaleX","scaleY","STYLE_RESET_VALUES","transform","opacity","zIndex","elevation","overflow","backgroundColor","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor","borderStartColor","borderEndColor","borderRadius","borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius","borderTopStartRadius","borderTopEndRadius","borderBottomStartRadius","borderBottomEndRadius","borderStartStartRadius","borderStartEndRadius","borderEndStartRadius","borderEndEndRadius","shadowColor","shadowOffset","width","height","shadowOpacity","shadowRadius","PROP_RESET_VALUES","hostName","pointerEvents","RESERVED_STYLE_SLOT_IDS","content","backdrop","surface","isReservedStyleSlot","slotId","Object","prototype","hasOwnProperty","call","shouldSlotInherit"],"sour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E,CAAC;EACvBC,kBAAkB,EAAE,CAAC;EACrBC,WAAW,EAAE,aAAa;EAC1BC,YAAY,EAAE;IAAEC,KAAK,EAAE,CAAC;IAAEC,MAAM,EAAE;EAAE,CAAC;EACrCC,aAAa,EAAE,CAAC;EAChBC,YAAY,EAAE;AACf,CAAC;AAED,OAAO,MAAMC,iBAA0C,GAAG;EACzDC,QAAQ,EAAE3C,4BAA4B;EACtC4C,aAAa,EAAE;AAChB,CAAC;AAED,MAAMC,uBAAuB,GAAG;EAC/BC,OAAO,EAAE,IAAI;EACbC,QAAQ,EAAE,IAAI;EACdC,OAAO,EAAE,IAAI;EACb,
|
|
1
|
+
{"version":3,"names":["PORTAL_HOST_NAME_RESET_VALUE","NAVIGATION_MASK_CONTAINER_STYLE_ID","NAVIGATION_MASK_ELEMENT_STYLE_ID","IDENTITY_TRANSFORM","translateX","translateY","scale","scaleX","scaleY","STYLE_RESET_VALUES","transform","opacity","zIndex","elevation","overflow","backgroundColor","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor","borderStartColor","borderEndColor","borderRadius","borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius","borderTopStartRadius","borderTopEndRadius","borderBottomStartRadius","borderBottomEndRadius","borderStartStartRadius","borderStartEndRadius","borderEndStartRadius","borderEndEndRadius","shadowColor","shadowOffset","width","height","shadowOpacity","shadowRadius","PROP_RESET_VALUES","hostName","pointerEvents","RESERVED_STYLE_SLOT_IDS","overlay","content","backdrop","surface","isReservedStyleSlot","slotId","Object","prototype","hasOwnProperty","call","shouldSlotInherit"],"sourceRoot":"../../../../../../src","sources":["shared/providers/screen/styles/constants.ts"],"mappings":";;AAAA,SAASA,4BAA4B,QAAQ,kDAAkD;AAC/F,SACCC,kCAAkC,EAClCC,gCAAgC,QAC1B,oBAAoB;AAE3B,MAAMC,kBAAkB,GAAG,CAC1B;EAAEC,UAAU,EAAE;AAAE,CAAC,EACjB;EAAEC,UAAU,EAAE;AAAE,C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AAE3C,4BAA4B;EACtC4C,aAAa,EAAE;AAChB,CAAC;AAED,MAAMC,uBAAuB,GAAG;EAC/BC,OAAO,EAAE,IAAI;EACbC,OAAO,EAAE,IAAI;EACbC,QAAQ,EAAE,IAAI;EACdC,OAAO,EAAE,IAAI;EACb,CAAC/C,gCAAgC,GAAG,IAAI;EACxC,CAACD,kCAAkC,GAAG;AACvC,CAAU;AAEV,OAAO,MAAMiD,mBAAmB,GAAIC,MAAc,IAAK;EACtD,SAAS;;EACT;EACA,OAAOC,MAAM,CAACC,SAAS,CAACC,cAAc,CAACC,IAAI,CAACV,uBAAuB,EAAEM,MAAM,CAAC;AAC7E,CAAC;AAED,OAAO,MAAMK,iBAAiB,GAAIL,MAAc,IAAK;EACpD,SAAS;;EACT,OAAO,CAACD,mBAAmB,CAACC,MAAM,CAAC;AACpC,CAAC","ignoreList":[]}
|
|
@@ -32,4 +32,22 @@ export const hasCloseTransitionFinished = ({
|
|
|
32
32
|
|
|
33
33
|
return !!closing && animationProgress === 0;
|
|
34
34
|
};
|
|
35
|
+
export const isScreenInterpolatorReady = ({
|
|
36
|
+
hasInterpolator,
|
|
37
|
+
opening,
|
|
38
|
+
closing,
|
|
39
|
+
pendingLifecycleStartBlockCount,
|
|
40
|
+
animationProgress
|
|
41
|
+
}) => {
|
|
42
|
+
"worklet";
|
|
43
|
+
|
|
44
|
+
return hasInterpolator && !isOpenTransitionBlocked({
|
|
45
|
+
opening,
|
|
46
|
+
pendingLifecycleStartBlockCount,
|
|
47
|
+
animationProgress
|
|
48
|
+
}) && !hasCloseTransitionFinished({
|
|
49
|
+
closing,
|
|
50
|
+
animationProgress
|
|
51
|
+
});
|
|
52
|
+
};
|
|
35
53
|
//# sourceMappingURL=transition-visual-state.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["hasOpenTransitionStarted","pendingLifecycleStartBlockCount","animationProgress","isOpenTransitionBlocked","opening","hasCloseTransitionFinished","closing"],"sourceRoot":"../../../../../../../src","sources":["shared/providers/screen/styles/helpers/transition-visual-state.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA,OAAO,MAAMA,wBAAwB,GAAGA,CAAC;EACxCC,+BAA+B;EAC/BC;AAID,CAAC,KAAK;EACL,SAAS;;EACT,OAAOD,+BAA+B,KAAK,CAAC,IAAIC,iBAAiB,GAAG,CAAC;AACtE,CAAC;AAED,OAAO,MAAMC,uBAAuB,GAAGA,CAAC;EACvCC,OAAO;EACPH,+BAA+B;EAC/BC;AAKD,CAAC,KAAK;EACL,SAAS;;EACT,OACCE,OAAO,IACP,CAACJ,wBAAwB,CAAC;IACzBC,+BAA+B;IAC/BC;EACD,CAAC,CAAC;AAEJ,CAAC;AAED,OAAO,MAAMG,0BAA0B,GAAGA,CAAC;EAC1CC,OAAO;EACPJ;AAID,CAAC,KAAK;EACL,SAAS;;EACT,OAAO,CAAC,CAACI,OAAO,IAAIJ,iBAAiB,KAAK,CAAC;AAC5C,CAAC","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["hasOpenTransitionStarted","pendingLifecycleStartBlockCount","animationProgress","isOpenTransitionBlocked","opening","hasCloseTransitionFinished","closing","isScreenInterpolatorReady","hasInterpolator"],"sourceRoot":"../../../../../../../src","sources":["shared/providers/screen/styles/helpers/transition-visual-state.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA,OAAO,MAAMA,wBAAwB,GAAGA,CAAC;EACxCC,+BAA+B;EAC/BC;AAID,CAAC,KAAK;EACL,SAAS;;EACT,OAAOD,+BAA+B,KAAK,CAAC,IAAIC,iBAAiB,GAAG,CAAC;AACtE,CAAC;AAED,OAAO,MAAMC,uBAAuB,GAAGA,CAAC;EACvCC,OAAO;EACPH,+BAA+B;EAC/BC;AAKD,CAAC,KAAK;EACL,SAAS;;EACT,OACCE,OAAO,IACP,CAACJ,wBAAwB,CAAC;IACzBC,+BAA+B;IAC/BC;EACD,CAAC,CAAC;AAEJ,CAAC;AAED,OAAO,MAAMG,0BAA0B,GAAGA,CAAC;EAC1CC,OAAO;EACPJ;AAID,CAAC,KAAK;EACL,SAAS;;EACT,OAAO,CAAC,CAACI,OAAO,IAAIJ,iBAAiB,KAAK,CAAC;AAC5C,CAAC;AAED,OAAO,MAAMK,yBAAyB,GAAGA,CAAC;EACzCC,eAAe;EACfJ,OAAO;EACPE,OAAO;EACPL,+BAA+B;EAC/BC;AAOD,CAAC,KAAK;EACL,SAAS;;EAET,OACCM,eAAe,IACf,CAACL,uBAAuB,CAAC;IACxBC,OAAO;IACPH,+BAA+B;IAC/BC;EACD,CAAC,CAAC,IACF,CAACG,0BAA0B,CAAC;IAAEC,OAAO;IAAEJ;EAAkB,CAAC,CAAC;AAE7D,CAAC","ignoreList":[]}
|
|
@@ -1,14 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
import { useRoute } from "@react-navigation/native";
|
|
3
4
|
import { useMemo } from "react";
|
|
4
5
|
import { useAnimatedProps, useAnimatedStyle } from "react-native-reanimated";
|
|
5
6
|
import { NO_PROPS, NO_STYLES } from "../../../../constants";
|
|
6
7
|
import { composeSlotStyleWithLocalTransform, getLocalTransformForSlotComposition } from "../helpers/compose-slot-style";
|
|
7
8
|
import { useScreenSlots } from "../slot.provider";
|
|
9
|
+
const useCurrentScreenSlotsMap = () => {
|
|
10
|
+
const route = useRoute();
|
|
11
|
+
const slotsMap = useScreenSlots(route.key, store => store.slotsMap);
|
|
12
|
+
if (!slotsMap) {
|
|
13
|
+
throw new Error(`ScreenSlot store for route "${route.key}" was not found`);
|
|
14
|
+
}
|
|
15
|
+
return slotsMap;
|
|
16
|
+
};
|
|
8
17
|
export const useSlotStyles = slotId => {
|
|
9
|
-
const
|
|
10
|
-
slotsMap
|
|
11
|
-
} = useScreenSlots();
|
|
18
|
+
const slotsMap = useCurrentScreenSlotsMap();
|
|
12
19
|
return useAnimatedStyle(() => {
|
|
13
20
|
const slot = slotId ? slotsMap.get()[slotId] : undefined;
|
|
14
21
|
const slotStyle = slot?.style ?? NO_STYLES;
|
|
@@ -16,9 +23,7 @@ export const useSlotStyles = slotId => {
|
|
|
16
23
|
});
|
|
17
24
|
};
|
|
18
25
|
export const useComposedSlotStyles = (slotId, style) => {
|
|
19
|
-
const
|
|
20
|
-
slotsMap
|
|
21
|
-
} = useScreenSlots();
|
|
26
|
+
const slotsMap = useCurrentScreenSlotsMap();
|
|
22
27
|
const localTransform = useMemo(() => getLocalTransformForSlotComposition(style), [style]);
|
|
23
28
|
return useAnimatedStyle(() => {
|
|
24
29
|
const slot = slotId ? slotsMap.get()[slotId] : undefined;
|
|
@@ -33,9 +38,7 @@ export const useComposedSlotStyles = (slotId, style) => {
|
|
|
33
38
|
* target takes the full associated style. Yields `NO_STYLES` when neither is set.
|
|
34
39
|
*/
|
|
35
40
|
export const useSlotStackingStyles = slotId => {
|
|
36
|
-
const
|
|
37
|
-
slotsMap
|
|
38
|
-
} = useScreenSlots();
|
|
41
|
+
const slotsMap = useCurrentScreenSlotsMap();
|
|
39
42
|
return useAnimatedStyle(() => {
|
|
40
43
|
const baseStyle = slotId ? slotsMap.get()[slotId]?.style : undefined;
|
|
41
44
|
const zIndex = baseStyle?.zIndex ?? 0;
|
|
@@ -50,9 +53,7 @@ export const useSlotStackingStyles = slotId => {
|
|
|
50
53
|
});
|
|
51
54
|
};
|
|
52
55
|
export const useSlotLayoutStyles = slotId => {
|
|
53
|
-
const
|
|
54
|
-
slotsMap
|
|
55
|
-
} = useScreenSlots();
|
|
56
|
+
const slotsMap = useCurrentScreenSlotsMap();
|
|
56
57
|
return useAnimatedStyle(() => {
|
|
57
58
|
const baseStyle = slotId ? slotsMap.get()[slotId]?.style : undefined;
|
|
58
59
|
const width = baseStyle?.width;
|
|
@@ -77,9 +78,7 @@ export const useSlotLayoutStyles = slotId => {
|
|
|
77
78
|
});
|
|
78
79
|
};
|
|
79
80
|
export const useSlotProps = slotId => {
|
|
80
|
-
const
|
|
81
|
-
slotsMap
|
|
82
|
-
} = useScreenSlots();
|
|
81
|
+
const slotsMap = useCurrentScreenSlotsMap();
|
|
83
82
|
return useAnimatedProps(() => {
|
|
84
83
|
return (slotId ? slotsMap.get()[slotId]?.props : undefined) ?? NO_PROPS;
|
|
85
84
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useMemo","useAnimatedProps","useAnimatedStyle","NO_PROPS","NO_STYLES","composeSlotStyleWithLocalTransform","getLocalTransformForSlotComposition","useScreenSlots","
|
|
1
|
+
{"version":3,"names":["useRoute","useMemo","useAnimatedProps","useAnimatedStyle","NO_PROPS","NO_STYLES","composeSlotStyleWithLocalTransform","getLocalTransformForSlotComposition","useScreenSlots","useCurrentScreenSlotsMap","route","slotsMap","key","store","Error","useSlotStyles","slotId","slot","get","undefined","slotStyle","style","boundsLocalTransform","useComposedSlotStyles","localTransform","useSlotStackingStyles","baseStyle","zIndex","elevation","useSlotLayoutStyles","width","height","minWidth","minHeight","maxWidth","maxHeight","aspectRatio","useSlotProps","props"],"sourceRoot":"../../../../../../../src","sources":["shared/providers/screen/styles/hooks/slot-resolvers.tsx"],"mappings":";;AAAA,SAASA,QAAQ,QAAQ,0BAA0B;AACnD,SAASC,OAAO,QAAQ,OAAO;AAC/B,SAASC,gBAAgB,EAAEC,gBAAgB,QAAQ,yBAAyB;AAC5E,SAASC,QAAQ,EAAEC,SAAS,QAAQ,uBAAuB;AAC3D,SACCC,kCAAkC,EAClCC,mCAAmC,QAC7B,+BAA+B;AACtC,SAASC,cAAc,QAAQ,kBAAkB;AAEjD,MAAMC,wBAAwB,GAAGA,CAAA,KAAM;EACtC,MAAMC,KAAK,GAAGV,QAAQ,CAAC,CAAC;EACxB,MAAMW,QAAQ,GAAGH,cAAc,CAACE,KAAK,CAACE,GAAG,EAAGC,KAAK,IAAKA,KAAK,CAACF,QAAQ,CAAC;EAErE,IAAI,CAACA,QAAQ,EAAE;IACd,MAAM,IAAIG,KAAK,CAAC,+BAA+BJ,KAAK,CAACE,GAAG,iBAAiB,CAAC;EAC3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AY,GAAIrB,MAA0B,IAAK;EAC3D,MAAML,QAAQ,GAAGF,wBAAwB,CAAC,CAAC;EAE3C,OAAOP,gBAAgB,CAAC,MAAM;IAC7B,OAAO,CAACc,MAAM,GAAGL,QAAQ,CAACO,GAAG,CAAC,CAAC,CAACF,MAAM,CAAC,EAAEsB,KAAK,GAAGnB,SAAS,KAAKf,QAAQ;EACxE,CAAC,CAAC;AACH,CAAC","ignoreList":[]}
|
|
@@ -18,7 +18,7 @@ import { normalizeSlots } from "../helpers/normalize-slots";
|
|
|
18
18
|
import { resolveInterpolatorStyleHandoff } from "../helpers/resolve-interpolator-style-handoff";
|
|
19
19
|
import { selectInterpolatorFrame } from "../helpers/select-interpolator-frame";
|
|
20
20
|
import { stripInterpolatorOptions } from "../helpers/strip-interpolator-options";
|
|
21
|
-
import { hasCloseTransitionFinished, isOpenTransitionBlocked } from "../helpers/transition-visual-state";
|
|
21
|
+
import { hasCloseTransitionFinished, isOpenTransitionBlocked, isScreenInterpolatorReady } from "../helpers/transition-visual-state";
|
|
22
22
|
import { resolveInitialDestinationStyleGate } from "../helpers/visibility-gate";
|
|
23
23
|
const NO_STYLE_LAYERS = [];
|
|
24
24
|
const normalizeRawStyleMap = rawStyleMap => {
|
|
@@ -89,17 +89,42 @@ export const useInterpolatedStylesMap = ({
|
|
|
89
89
|
const nextScreenKey = useDescriptorsStore(s => s.derivations.nextScreenKey);
|
|
90
90
|
const destinationPairKey = useDescriptorsStore(s => s.derivations.destinationPairKey);
|
|
91
91
|
const screenOptions = useScreenOptionsStore();
|
|
92
|
-
const
|
|
92
|
+
const screenInterpolatorProps = useScreenAnimationStore(store => store.screenInterpolatorProps);
|
|
93
|
+
const screenInterpolatorPropsRevision = useScreenAnimationStore(store => store.screenInterpolatorPropsRevision);
|
|
94
|
+
const selectedInterpolatorOptions = useScreenAnimationStore(store => store.selectedInterpolatorOptions);
|
|
95
|
+
const nextInterpolator = useScreenAnimationStore(store => store.nextInterpolator);
|
|
96
|
+
const currentInterpolator = useScreenAnimationStore(store => store.currentInterpolator);
|
|
97
|
+
const ancestorScreenAnimationSources = useScreenAnimationStore(store => store.ancestorScreenAnimationSources);
|
|
98
|
+
const descendantScreenAnimationSources = useScreenAnimationStore(store => store.descendantScreenAnimationSources);
|
|
99
|
+
const transition = useBuildTransitionAccessor({
|
|
93
100
|
screenInterpolatorProps,
|
|
94
101
|
screenInterpolatorPropsRevision,
|
|
95
|
-
selectedInterpolatorOptions,
|
|
96
|
-
nextInterpolator,
|
|
97
|
-
currentInterpolator,
|
|
98
102
|
ancestorScreenAnimationSources,
|
|
99
103
|
descendantScreenAnimationSources
|
|
100
|
-
}
|
|
101
|
-
const
|
|
102
|
-
const
|
|
104
|
+
});
|
|
105
|
+
const hasCurrentInterpolator = !!currentInterpolator;
|
|
106
|
+
const {
|
|
107
|
+
closing: currentClosing,
|
|
108
|
+
entering: currentEntering
|
|
109
|
+
} = AnimationStore.getBag(currentScreenKey);
|
|
110
|
+
const {
|
|
111
|
+
animationProgress: currentAnimationProgress,
|
|
112
|
+
pendingLifecycleRequestKind: currentPendingLifecycleRequestKind,
|
|
113
|
+
pendingLifecycleStartBlockCount: currentPendingLifecycleStartBlockCount
|
|
114
|
+
} = SystemStore.getBag(currentScreenKey);
|
|
115
|
+
const interpolatorReady = useDerivedValue(() => {
|
|
116
|
+
"worklet";
|
|
117
|
+
|
|
118
|
+
const isPendingOpen = currentPendingLifecycleRequestKind.get() === LifecycleTransitionRequestKind.Open;
|
|
119
|
+
const opening = isPendingOpen || !!currentEntering.get();
|
|
120
|
+
return isScreenInterpolatorReady({
|
|
121
|
+
hasInterpolator: hasCurrentInterpolator,
|
|
122
|
+
opening,
|
|
123
|
+
closing: currentClosing.get(),
|
|
124
|
+
pendingLifecycleStartBlockCount: currentPendingLifecycleStartBlockCount.get(),
|
|
125
|
+
animationProgress: currentAnimationProgress.get()
|
|
126
|
+
}) ? 1 : 0;
|
|
127
|
+
});
|
|
103
128
|
|
|
104
129
|
// In some cases, a user may want to use external shared values to drive animations in the interpoaltor.
|
|
105
130
|
// We can now support this by collecting those shared values and reading them here to trigger an update.
|
|
@@ -173,8 +198,6 @@ export const useInterpolatedStylesMap = ({
|
|
|
173
198
|
animationProgress: activeAnimationProgress.get()
|
|
174
199
|
});
|
|
175
200
|
const currentOwnsInterpolator = isInGestureMode || !nextInterpolator || isOpeningBlocked || hasCloseFinished;
|
|
176
|
-
const nextReady = currentOwnsInterpolator ? 0 : 1;
|
|
177
|
-
nextInterpolatorReady.set(nextReady);
|
|
178
201
|
const interpolatorOptionsOwner = currentOwnsInterpolator ? "current" : "next";
|
|
179
202
|
|
|
180
203
|
// Once the next interpolator owns the relationship, the current
|
|
@@ -223,8 +246,8 @@ export const useInterpolatedStylesMap = ({
|
|
|
223
246
|
return handoff.localStylesMaps.length ? handoff.localStylesMaps : NO_STYLE_LAYERS;
|
|
224
247
|
});
|
|
225
248
|
return {
|
|
226
|
-
|
|
227
|
-
|
|
249
|
+
interpolatorReady,
|
|
250
|
+
localStylesMaps
|
|
228
251
|
};
|
|
229
252
|
};
|
|
230
253
|
//# sourceMappingURL=use-interpolated-style-maps.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useMemo","useAnimatedReaction","useDerivedValue","useSharedValue","NO_STYLES","AnimationStore","LifecycleTransitionRequestKind","SystemStore","logger","useScreenAnimationStore","useBuildTransitionAccessor","readScreenAnimationRevisions","syncSelectedInterpolatorOptions","useDescriptorsStore","syncScreenOptionsOverrides","useScreenOptionsStore","collectInterpolatorSharedValues","createInterpolatorScope","normalizeSlots","resolveInterpolatorStyleHandoff","selectInterpolatorFrame","stripInterpolatorOptions","hasCloseTransitionFinished","isOpenTransitionBlocked","resolveInitialDestinationStyleGate","NO_STYLE_LAYERS","normalizeRawStyleMap","rawStyleMap","stylesMap","runInterpolator","interpolator","props","selectedFrame","transition","undefined","raw","frame","_","__DEV__","warn","useInterpolatedStylesMap","enabled","visibilityBlocked","currentScreenKey","s","derivations","nextScreenKey","destinationPairKey","screenOptions","screenInterpolatorProps","screenInterpolatorPropsRevision","selectedInterpolatorOptions","nextInterpolator","currentInterpolator","ancestorScreenAnimationSources","descendantScreenAnimationSources","
|
|
1
|
+
{"version":3,"names":["useMemo","useAnimatedReaction","useDerivedValue","useSharedValue","NO_STYLES","AnimationStore","LifecycleTransitionRequestKind","SystemStore","logger","useScreenAnimationStore","useBuildTransitionAccessor","readScreenAnimationRevisions","syncSelectedInterpolatorOptions","useDescriptorsStore","syncScreenOptionsOverrides","useScreenOptionsStore","collectInterpolatorSharedValues","createInterpolatorScope","normalizeSlots","resolveInterpolatorStyleHandoff","selectInterpolatorFrame","stripInterpolatorOptions","hasCloseTransitionFinished","isOpenTransitionBlocked","isScreenInterpolatorReady","resolveInitialDestinationStyleGate","NO_STYLE_LAYERS","normalizeRawStyleMap","rawStyleMap","stylesMap","runInterpolator","interpolator","props","selectedFrame","transition","undefined","raw","frame","_","__DEV__","warn","useInterpolatedStylesMap","enabled","visibilityBlocked","currentScreenKey","s","derivations","nextScreenKey","destinationPairKey","screenOptions","screenInterpolatorProps","store","screenInterpolatorPropsRevision","selectedInterpolatorOptions","nextInterpolator","currentInterpolator","ancestorScreenAnimationSources","descendantScreenAnimationSources","hasCurrentInterpolator","closing","currentClosing","entering","currentEntering","getBag","animationProgress","currentAnimationProgress","pendingLifecycleRequestKind","currentPendingLifecycleRequestKind","pendingLifecycleStartBlockCount","currentPendingLifecycleStartBlockCount","interpolatorReady","isPendingOpen","get","Open","opening","hasInterpolator","interpolatorSharedValues","activeScreenKey","activeClosing","activeEntering","activeAnimationProgress","activePendingLifecycleRequestKind","activePendingLifecycleStartBlockCount","isGesturingDuringCloseAnimation","initialDestinationStylesReady","shouldPrepareInitialDestinationStyles","isVisibilityBlocked","styleGate","shouldPrepareStyles","stylesReady","shouldMarkStylesReady","set","localStylesMaps","current","next","isDragging","gesture","dragging","isNextClosing","isInGestureMode","activeOpening","isOpeningBlocked","hasCloseFinished","currentOwnsInterpolator","interpolatorOptionsOwner","currentSelectedFrame","currentResult","initialDestinationStyleGate","shouldWithholdStyles","options","handoff","currentStylesMap","nextStylesMap","length","nextSelectedFrame","nextResult"],"sourceRoot":"../../../../../../../src","sources":["shared/providers/screen/styles/hooks/use-interpolated-style-maps.tsx"],"mappings":";;AAAA,SAASA,OAAO,QAAQ,OAAO;AAC/B,SAECC,mBAAmB,EACnBC,eAAe,EACfC,cAAc,QACR,yBAAyB;AAChC,SAASC,SAAS,QAAQ,uBAAuB;AACjD,SAASC,cAAc,QAAQ,oCAAoC;AACnE,SACCC,8BAA8B,EAC9BC,WAAW,QACL,iCAAiC;AAMxC,SAASC,MAAM,QAAQ,0BAA0B;AACjD,SAASC,uBAAuB,QAAQ,iBAAiB;AACzD,SAASC,0BAA0B,QAAQ,iEAAiE;AAE5G,SAASC,4BAA4B,QAAQ,yDAAyD;AACtG,SAASC,+BAA+B,QAAQ,uDAAuD;AACvG,SAASC,mBAAmB,QAAQ,mBAAmB;AACvD,SACCC,0BAA0B,EAC1BC,qBAAqB,QACf,eAAe;AACtB,SAASC,+BAA+B,QAAQ,+CAA+C;AAC/F,SAASC,uBAAuB,QAAQ,sCAAsC;AAC9E,SAASC,cAAc,QAAQ,4BAA4B;AAC3D,SAASC,+BAA+B,QAAQ,+CAA+C;AAE/F,SAECC,uBAAuB,QACjB,sCAAsC;AAC7C,SAASC,wBAAwB,QAAQ,uCAAuC;AAChF,SACCC,0BAA0B,EAC1BC,uBAAuB,EACvBC,yBAAyB,QACnB,oCAAoC;AAC3C,SAASC,kCAAkC,QAAQ,4BAA4B;AAE/E,MAAMC,eAAiC,GAAG,EAAE;AAc5C,MAAMC,oBAAoB,GACzBC,WAAoD,IAChD;EACJ,SAAS;;EAET,IAAI,CAACA,WAAW,EAAE;IACjB,OAAOxB,SAAS;EACjB;EAEA,MAAMyB,SAAS,GAAGX,cAAc,CAACG,wBAAwB,CAACO,WAAW,CAAC,CAAC;EAEvE,OAAOC,SAAS;AACjB,CA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;MAEF,OAAO2E,OAAO,CAAClB,eAAe,CAACqB,MAAM,GAClCH,OAAO,CAAClB,eAAe,GACvBlE,eAAe;IACnB;IAEA,MAAMwF,iBAAiB,GAAG9F,uBAAuB,CAACY,KAAK,EAAE,KAAK,CAAC;IAC/D,MAAMmF,UAAU,GAAGrF,eAAe,CAAC;MAClCC,YAAY,EAAEuB,gBAAgB;MAC9BtB,KAAK;MACLC,aAAa,EAAEiF,iBAAiB;MAChChF;IACD,CAAC,CAAC;IAEFtB,+BAA+B,CAC9ByC,2BAA2B,EAC3B,MAAM,EACN8D,UAAU,EAAEvF,WAAW,EAAEiF,OAC1B,CAAC;IACD/F,0BAA0B,CAACqB,SAAS,EAAEc,aAAa,CAAC;IAEpD,MAAM6D,OAAO,GAAG3F,+BAA+B,CAAC;MAC/CoF,uBAAuB,EAAE,KAAK;MAC9BQ,gBAAgB,EAAEL,aAAa,EAAE7E,SAAS;MAC1CmF,aAAa,EAAEG,UAAU,EAAEtF;IAC5B,CAAC,CAAC;IAEF,OAAOiF,OAAO,CAAClB,eAAe,CAACqB,MAAM,GAClCH,OAAO,CAAClB,eAAe,GACvBlE,eAAe;EACnB,CAAC,CAAC;EAEF,OAAO;IACN4C,iBAAiB;IACjBsB;EACD,CAAC;AACF,CAAC","ignoreList":[]}
|
|
@@ -1,66 +1,55 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { useMemo } from "react";
|
|
4
4
|
import { StyleSheet } from "react-native";
|
|
5
5
|
import Animated from "react-native-reanimated";
|
|
6
6
|
import createProvider from "../../../utils/create-provider";
|
|
7
7
|
import { useDescriptorsStore } from "../descriptors";
|
|
8
|
-
import { FloatingOverlayLayer } from "./components/floating-overlay-layer";
|
|
9
8
|
import { useInterpolatedStylesMap } from "./hooks/use-interpolated-style-maps";
|
|
10
9
|
import { useMaybeBlockVisibility } from "./hooks/use-maybe-block-visibility";
|
|
11
10
|
import { useResolvedStylesMap } from "./hooks/use-resolved-slot-style-map";
|
|
12
|
-
import { registerScreenSlots, unregisterScreenSlots } from "./stores/slot-references.store";
|
|
13
11
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
12
|
export const {
|
|
15
13
|
ScreenSlotProvider,
|
|
16
14
|
useScreenSlotStore: useScreenSlots
|
|
17
15
|
} = createProvider("ScreenSlot", {
|
|
18
|
-
guarded: true
|
|
16
|
+
guarded: true,
|
|
17
|
+
global: true
|
|
19
18
|
})(({
|
|
20
|
-
children
|
|
21
|
-
isFloatingOverlay
|
|
19
|
+
children
|
|
22
20
|
}, {
|
|
23
21
|
useParentStore
|
|
24
22
|
}) => {
|
|
25
|
-
const
|
|
26
|
-
const currentScreenKey = useDescriptorsStore(
|
|
23
|
+
const ancestorStylesMap = useParentStore(parentContext => parentContext?.slotsMap);
|
|
24
|
+
const currentScreenKey = useDescriptorsStore(store => store.derivations.currentScreenKey);
|
|
27
25
|
const {
|
|
28
26
|
animatedStyle,
|
|
29
27
|
animatedProps,
|
|
30
28
|
shouldBlockVisibility
|
|
31
|
-
} = useMaybeBlockVisibility(
|
|
29
|
+
} = useMaybeBlockVisibility();
|
|
32
30
|
const {
|
|
33
|
-
|
|
34
|
-
|
|
31
|
+
interpolatorReady,
|
|
32
|
+
localStylesMaps
|
|
35
33
|
} = useInterpolatedStylesMap({
|
|
36
|
-
enabled:
|
|
34
|
+
enabled: true,
|
|
37
35
|
visibilityBlocked: shouldBlockVisibility
|
|
38
36
|
});
|
|
39
37
|
const slotsMap = useResolvedStylesMap({
|
|
40
38
|
localStylesMaps,
|
|
41
|
-
ancestorStylesMap
|
|
39
|
+
ancestorStylesMap
|
|
42
40
|
});
|
|
43
41
|
const value = useMemo(() => ({
|
|
44
|
-
|
|
45
|
-
nextInterpolatorReady,
|
|
42
|
+
interpolatorReady,
|
|
46
43
|
slotsMap,
|
|
47
44
|
visibilityBlocked: shouldBlockVisibility
|
|
48
|
-
}), [
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
}, [currentScreenKey, value]);
|
|
55
|
-
const content = useMemo(() => /*#__PURE__*/_jsx(FloatingOverlayLayer, {
|
|
56
|
-
enabled: isFloatingOverlay,
|
|
57
|
-
children: /*#__PURE__*/_jsx(Animated.View, {
|
|
58
|
-
style: [styles.container, animatedStyle],
|
|
59
|
-
animatedProps: animatedProps,
|
|
60
|
-
children: children
|
|
61
|
-
})
|
|
62
|
-
}), [children, animatedStyle, isFloatingOverlay, animatedProps]);
|
|
45
|
+
}), [interpolatorReady, shouldBlockVisibility, slotsMap]);
|
|
46
|
+
const content = useMemo(() => /*#__PURE__*/_jsx(Animated.View, {
|
|
47
|
+
style: [styles.container, animatedStyle],
|
|
48
|
+
animatedProps: animatedProps,
|
|
49
|
+
children: children
|
|
50
|
+
}), [children, animatedStyle, animatedProps]);
|
|
63
51
|
return {
|
|
52
|
+
key: currentScreenKey,
|
|
64
53
|
value,
|
|
65
54
|
children: content
|
|
66
55
|
};
|