react-native-screen-transitions 3.9.0-alpha.1 → 3.9.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/shared/components/boundary/components/boundary-target.js +10 -10
- package/lib/commonjs/shared/components/boundary/components/boundary-target.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/create-boundary-component.js +45 -109
- package/lib/commonjs/shared/components/boundary/create-boundary-component.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/hooks/use-boundary-measurement.js +103 -0
- package/lib/commonjs/shared/components/boundary/hooks/use-boundary-measurement.js.map +1 -0
- package/lib/commonjs/shared/components/boundary/hooks/use-boundary-presence.js +7 -4
- package/lib/commonjs/shared/components/boundary/hooks/use-boundary-presence.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/hooks/use-initial-destination-measurement.js +24 -14
- package/lib/commonjs/shared/components/boundary/hooks/use-initial-destination-measurement.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/hooks/use-initial-source-measurement.js +3 -4
- package/lib/commonjs/shared/components/boundary/hooks/use-initial-source-measurement.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/hooks/use-measurer.js +6 -8
- package/lib/commonjs/shared/components/boundary/hooks/use-measurer.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/hooks/use-refresh-boundary.js +6 -3
- package/lib/commonjs/shared/components/boundary/hooks/use-refresh-boundary.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/index.js +2 -2
- package/lib/commonjs/shared/components/boundary/portal/components/portal.js +3 -3
- package/lib/commonjs/shared/components/boundary/portal/components/portal.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/portal/resolve-portal.js +36 -0
- package/lib/commonjs/shared/components/boundary/portal/resolve-portal.js.map +1 -0
- package/lib/commonjs/shared/components/boundary/providers/{boundary-owner.provider.js → boundary-root.provider.js} +21 -23
- package/lib/commonjs/shared/components/boundary/providers/boundary-root.provider.js.map +1 -0
- package/lib/commonjs/shared/components/boundary/utils/destination-signals.js +33 -2
- package/lib/commonjs/shared/components/boundary/utils/destination-signals.js.map +1 -1
- package/lib/commonjs/shared/components/create-transition-aware-component.js +2 -20
- package/lib/commonjs/shared/components/create-transition-aware-component.js.map +1 -1
- package/lib/commonjs/shared/components/overlay/variations/float-overlay.js +1 -1
- package/lib/commonjs/shared/components/overlay/variations/float-overlay.js.map +1 -1
- package/lib/commonjs/shared/components/screen-container/layers/backdrop.js +2 -14
- package/lib/commonjs/shared/components/screen-container/layers/backdrop.js.map +1 -1
- package/lib/commonjs/shared/components/screen-container/layers/content.js +4 -16
- 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 +4 -15
- package/lib/commonjs/shared/components/screen-container/layers/maybe-masked-navigation-container.js.map +1 -1
- package/lib/commonjs/shared/components/screen-container/layers/surface-container.js +4 -16
- package/lib/commonjs/shared/components/screen-container/layers/surface-container.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/animation/helpers/pipeline.js +142 -24
- package/lib/commonjs/shared/providers/screen/animation/helpers/pipeline.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/screen-composer.js +1 -1
- package/lib/commonjs/shared/providers/screen/screen-composer.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/styles/helpers/opening-phase.js +32 -0
- package/lib/commonjs/shared/providers/screen/styles/helpers/opening-phase.js.map +1 -0
- package/lib/commonjs/shared/providers/screen/styles/helpers/resolve-slot-styles/index.js +7 -8
- package/lib/commonjs/shared/providers/screen/styles/helpers/resolve-slot-styles/index.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/styles/helpers/resolve-slot-styles/materialize-slot.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/styles/helpers/resolve-slot-styles/slot-state.js +1 -20
- package/lib/commonjs/shared/providers/screen/styles/helpers/resolve-slot-styles/slot-state.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/styles/helpers/visibility-gate.js +1 -11
- package/lib/commonjs/shared/providers/screen/styles/helpers/visibility-gate.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/styles/hooks/use-interpolated-style-maps.js +23 -36
- package/lib/commonjs/shared/providers/screen/styles/hooks/use-interpolated-style-maps.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/styles/hooks/use-maybe-block-visibility.js +1 -19
- package/lib/commonjs/shared/providers/screen/styles/hooks/use-maybe-block-visibility.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/styles/hooks/use-resolved-slot-style-map.js +8 -3
- package/lib/commonjs/shared/providers/screen/styles/hooks/use-resolved-slot-style-map.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/styles/index.js +25 -7
- package/lib/commonjs/shared/providers/screen/styles/index.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/styles/slot.provider.js +103 -0
- package/lib/commonjs/shared/providers/screen/styles/slot.provider.js.map +1 -0
- package/lib/commonjs/shared/stores/bounds/helpers/link-pairs.helpers.js +16 -1
- package/lib/commonjs/shared/stores/bounds/helpers/link-pairs.helpers.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/navigation/zoom/build.js +8 -1
- package/lib/commonjs/shared/utils/bounds/navigation/zoom/build.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/navigation/zoom/helpers.js +59 -0
- package/lib/commonjs/shared/utils/bounds/navigation/zoom/helpers.js.map +1 -1
- package/lib/commonjs/shared/utils/logger.js +11 -0
- package/lib/commonjs/shared/utils/logger.js.map +1 -1
- package/lib/module/shared/components/boundary/components/boundary-target.js +10 -10
- package/lib/module/shared/components/boundary/components/boundary-target.js.map +1 -1
- package/lib/module/shared/components/boundary/create-boundary-component.js +47 -111
- package/lib/module/shared/components/boundary/create-boundary-component.js.map +1 -1
- package/lib/module/shared/components/boundary/hooks/use-boundary-measurement.js +98 -0
- package/lib/module/shared/components/boundary/hooks/use-boundary-measurement.js.map +1 -0
- package/lib/module/shared/components/boundary/hooks/use-boundary-presence.js +7 -4
- package/lib/module/shared/components/boundary/hooks/use-boundary-presence.js.map +1 -1
- package/lib/module/shared/components/boundary/hooks/use-initial-destination-measurement.js +24 -14
- package/lib/module/shared/components/boundary/hooks/use-initial-destination-measurement.js.map +1 -1
- package/lib/module/shared/components/boundary/hooks/use-initial-source-measurement.js +3 -4
- package/lib/module/shared/components/boundary/hooks/use-initial-source-measurement.js.map +1 -1
- package/lib/module/shared/components/boundary/hooks/use-measurer.js +6 -8
- package/lib/module/shared/components/boundary/hooks/use-measurer.js.map +1 -1
- package/lib/module/shared/components/boundary/hooks/use-refresh-boundary.js +6 -3
- package/lib/module/shared/components/boundary/hooks/use-refresh-boundary.js.map +1 -1
- package/lib/module/shared/components/boundary/index.js +2 -2
- package/lib/module/shared/components/boundary/portal/components/portal.js +4 -4
- package/lib/module/shared/components/boundary/portal/components/portal.js.map +1 -1
- package/lib/module/shared/components/boundary/portal/resolve-portal.js +31 -0
- package/lib/module/shared/components/boundary/portal/resolve-portal.js.map +1 -0
- package/lib/module/shared/components/boundary/providers/{boundary-owner.provider.js → boundary-root.provider.js} +18 -20
- package/lib/module/shared/components/boundary/providers/boundary-root.provider.js.map +1 -0
- package/lib/module/shared/components/boundary/utils/destination-signals.js +33 -2
- package/lib/module/shared/components/boundary/utils/destination-signals.js.map +1 -1
- package/lib/module/shared/components/create-transition-aware-component.js +4 -22
- package/lib/module/shared/components/create-transition-aware-component.js.map +1 -1
- package/lib/module/shared/components/overlay/variations/float-overlay.js +2 -2
- package/lib/module/shared/components/overlay/variations/float-overlay.js.map +1 -1
- package/lib/module/shared/components/screen-container/layers/backdrop.js +4 -16
- package/lib/module/shared/components/screen-container/layers/backdrop.js.map +1 -1
- package/lib/module/shared/components/screen-container/layers/content.js +4 -16
- 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 +5 -16
- package/lib/module/shared/components/screen-container/layers/maybe-masked-navigation-container.js.map +1 -1
- package/lib/module/shared/components/screen-container/layers/surface-container.js +4 -16
- package/lib/module/shared/components/screen-container/layers/surface-container.js.map +1 -1
- package/lib/module/shared/providers/screen/animation/helpers/pipeline.js +143 -25
- package/lib/module/shared/providers/screen/animation/helpers/pipeline.js.map +1 -1
- package/lib/module/shared/providers/screen/screen-composer.js +2 -2
- package/lib/module/shared/providers/screen/screen-composer.js.map +1 -1
- package/lib/module/shared/providers/screen/styles/helpers/opening-phase.js +26 -0
- package/lib/module/shared/providers/screen/styles/helpers/opening-phase.js.map +1 -0
- package/lib/module/shared/providers/screen/styles/helpers/resolve-slot-styles/index.js +7 -8
- package/lib/module/shared/providers/screen/styles/helpers/resolve-slot-styles/index.js.map +1 -1
- package/lib/module/shared/providers/screen/styles/helpers/resolve-slot-styles/materialize-slot.js.map +1 -1
- package/lib/module/shared/providers/screen/styles/helpers/resolve-slot-styles/slot-state.js +0 -18
- package/lib/module/shared/providers/screen/styles/helpers/resolve-slot-styles/slot-state.js.map +1 -1
- package/lib/module/shared/providers/screen/styles/helpers/visibility-gate.js +0 -9
- package/lib/module/shared/providers/screen/styles/helpers/visibility-gate.js.map +1 -1
- package/lib/module/shared/providers/screen/styles/hooks/use-interpolated-style-maps.js +22 -35
- package/lib/module/shared/providers/screen/styles/hooks/use-interpolated-style-maps.js.map +1 -1
- package/lib/module/shared/providers/screen/styles/hooks/use-maybe-block-visibility.js +1 -19
- package/lib/module/shared/providers/screen/styles/hooks/use-maybe-block-visibility.js.map +1 -1
- package/lib/module/shared/providers/screen/styles/hooks/use-resolved-slot-style-map.js +9 -4
- package/lib/module/shared/providers/screen/styles/hooks/use-resolved-slot-style-map.js.map +1 -1
- package/lib/module/shared/providers/screen/styles/index.js +1 -1
- package/lib/module/shared/providers/screen/styles/index.js.map +1 -1
- package/lib/module/shared/providers/screen/styles/slot.provider.js +91 -0
- package/lib/module/shared/providers/screen/styles/slot.provider.js.map +1 -0
- package/lib/module/shared/stores/bounds/helpers/link-pairs.helpers.js +14 -0
- package/lib/module/shared/stores/bounds/helpers/link-pairs.helpers.js.map +1 -1
- package/lib/module/shared/utils/bounds/navigation/zoom/build.js +9 -2
- package/lib/module/shared/utils/bounds/navigation/zoom/build.js.map +1 -1
- package/lib/module/shared/utils/bounds/navigation/zoom/helpers.js +58 -0
- package/lib/module/shared/utils/bounds/navigation/zoom/helpers.js.map +1 -1
- package/lib/module/shared/utils/logger.js +11 -0
- package/lib/module/shared/utils/logger.js.map +1 -1
- package/lib/typescript/blank-stack/navigators/create-blank-stack-navigator.d.ts +2 -1
- package/lib/typescript/blank-stack/navigators/create-blank-stack-navigator.d.ts.map +1 -1
- package/lib/typescript/component-stack/components/component-screen.d.ts +1 -1
- package/lib/typescript/component-stack/components/component-screen.d.ts.map +1 -1
- package/lib/typescript/component-stack/navigators/create-component-stack-navigator.d.ts +2 -1
- package/lib/typescript/component-stack/navigators/create-component-stack-navigator.d.ts.map +1 -1
- package/lib/typescript/native-stack/navigators/createNativeStackNavigator.d.ts +1 -1
- package/lib/typescript/native-stack/navigators/createNativeStackNavigator.d.ts.map +1 -1
- package/lib/typescript/native-stack/views/NativeStackView.d.ts +2 -1
- package/lib/typescript/native-stack/views/NativeStackView.d.ts.map +1 -1
- package/lib/typescript/native-stack/views/useHeaderConfigProps.d.ts +2 -2
- package/lib/typescript/shared/adapters/with-screen-transitions/context.d.ts +1 -1
- package/lib/typescript/shared/adapters/with-screen-transitions/context.d.ts.map +1 -1
- package/lib/typescript/shared/adapters/with-screen-transitions/stack-layout.d.ts +1 -1
- package/lib/typescript/shared/adapters/with-screen-transitions/stack-layout.d.ts.map +1 -1
- package/lib/typescript/shared/components/activity/variants/activity-container.d.ts +1 -1
- package/lib/typescript/shared/components/activity/variants/activity-container.d.ts.map +1 -1
- package/lib/typescript/shared/components/activity/variants/activity-screen.d.ts +1 -1
- package/lib/typescript/shared/components/activity/variants/activity-screen.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/components/boundary-target.d.ts +1 -1
- package/lib/typescript/shared/components/boundary/components/boundary-target.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/create-boundary-component.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/hooks/use-boundary-measurement.d.ts +32 -0
- package/lib/typescript/shared/components/boundary/hooks/use-boundary-measurement.d.ts.map +1 -0
- package/lib/typescript/shared/components/boundary/hooks/use-boundary-presence.d.ts +2 -1
- package/lib/typescript/shared/components/boundary/hooks/use-boundary-presence.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/hooks/use-initial-destination-measurement.d.ts +3 -2
- package/lib/typescript/shared/components/boundary/hooks/use-initial-destination-measurement.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/hooks/use-initial-source-measurement.d.ts +2 -2
- package/lib/typescript/shared/components/boundary/hooks/use-initial-source-measurement.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/hooks/use-measurer.d.ts +3 -5
- package/lib/typescript/shared/components/boundary/hooks/use-measurer.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/hooks/use-refresh-boundary.d.ts +3 -3
- package/lib/typescript/shared/components/boundary/hooks/use-refresh-boundary.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/index.d.ts +7 -211
- package/lib/typescript/shared/components/boundary/index.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/portal/components/host.d.ts +2 -2
- package/lib/typescript/shared/components/boundary/portal/components/host.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/portal/components/portal-boundary-host.d.ts +1 -1
- package/lib/typescript/shared/components/boundary/portal/components/portal-boundary-host.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/portal/components/portal-provider.d.ts +1 -1
- package/lib/typescript/shared/components/boundary/portal/components/portal-provider.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/portal/components/portal.d.ts +1 -1
- package/lib/typescript/shared/components/boundary/portal/components/portal.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/portal/resolve-portal.d.ts +14 -0
- package/lib/typescript/shared/components/boundary/portal/resolve-portal.d.ts.map +1 -0
- package/lib/typescript/shared/components/boundary/providers/{boundary-owner.provider.d.ts → boundary-root.provider.d.ts} +12 -14
- package/lib/typescript/shared/components/boundary/providers/boundary-root.provider.d.ts.map +1 -0
- package/lib/typescript/shared/components/boundary/utils/destination-signals.d.ts +1 -0
- package/lib/typescript/shared/components/boundary/utils/destination-signals.d.ts.map +1 -1
- package/lib/typescript/shared/components/create-transition-aware-component.d.ts +5 -6
- package/lib/typescript/shared/components/create-transition-aware-component.d.ts.map +1 -1
- package/lib/typescript/shared/components/masked-view.d.ts +1 -1
- package/lib/typescript/shared/components/masked-view.d.ts.map +1 -1
- 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 +1 -1
- package/lib/typescript/shared/components/overlay/variations/overlay-host.d.ts.map +1 -1
- package/lib/typescript/shared/components/scene-view.d.ts +1 -1
- package/lib/typescript/shared/components/scene-view.d.ts.map +1 -1
- package/lib/typescript/shared/components/screen-container/index.d.ts +1 -1
- package/lib/typescript/shared/components/screen-container/index.d.ts.map +1 -1
- package/lib/typescript/shared/components/screen-container/layers/backdrop.d.ts +1 -1
- package/lib/typescript/shared/components/screen-container/layers/backdrop.d.ts.map +1 -1
- package/lib/typescript/shared/components/screen-container/layers/content.d.ts +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 +1 -1
- package/lib/typescript/shared/components/screen-container/layers/maybe-masked-navigation-container.d.ts.map +1 -1
- package/lib/typescript/shared/components/screen-container/layers/surface-container.d.ts +1 -1
- package/lib/typescript/shared/components/screen-container/layers/surface-container.d.ts.map +1 -1
- package/lib/typescript/shared/hooks/navigation/use-stack.d.ts +1 -1
- package/lib/typescript/shared/hooks/navigation/use-stack.d.ts.map +1 -1
- package/lib/typescript/shared/index.d.ts +663 -919
- package/lib/typescript/shared/index.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/descriptors/descriptors.provider.d.ts +1 -1
- package/lib/typescript/shared/providers/screen/descriptors/descriptors.provider.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/screen-composer.d.ts +1 -1
- package/lib/typescript/shared/providers/screen/screen-composer.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/styles/components/floating-overlay-layer.d.ts +1 -1
- package/lib/typescript/shared/providers/screen/styles/components/floating-overlay-layer.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/styles/helpers/opening-phase.d.ts +16 -0
- package/lib/typescript/shared/providers/screen/styles/helpers/opening-phase.d.ts.map +1 -0
- package/lib/typescript/shared/providers/screen/styles/helpers/resolve-slot-styles/index.d.ts +3 -4
- package/lib/typescript/shared/providers/screen/styles/helpers/resolve-slot-styles/index.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/styles/helpers/resolve-slot-styles/materialize-slot.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/styles/helpers/resolve-slot-styles/slot-state.d.ts +0 -1
- package/lib/typescript/shared/providers/screen/styles/helpers/resolve-slot-styles/slot-state.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/styles/helpers/visibility-gate.d.ts +0 -1
- package/lib/typescript/shared/providers/screen/styles/helpers/visibility-gate.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/styles/hooks/use-interpolated-style-maps.d.ts +0 -5
- package/lib/typescript/shared/providers/screen/styles/hooks/use-interpolated-style-maps.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/styles/hooks/use-maybe-block-visibility.d.ts +2 -3
- package/lib/typescript/shared/providers/screen/styles/hooks/use-maybe-block-visibility.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/styles/hooks/use-resolved-slot-style-map.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/styles/index.d.ts +1 -1
- package/lib/typescript/shared/providers/screen/styles/index.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/styles/slot.provider.d.ts +23 -0
- package/lib/typescript/shared/providers/screen/styles/slot.provider.d.ts.map +1 -0
- package/lib/typescript/shared/stores/bounds/helpers/link-pairs.helpers.d.ts +6 -1
- package/lib/typescript/shared/stores/bounds/helpers/link-pairs.helpers.d.ts.map +1 -1
- package/lib/typescript/shared/stores/bounds/types.d.ts +13 -0
- package/lib/typescript/shared/stores/bounds/types.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/navigation/zoom/build.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/navigation/zoom/helpers.d.ts +9 -0
- package/lib/typescript/shared/utils/bounds/navigation/zoom/helpers.d.ts.map +1 -1
- package/lib/typescript/shared/utils/logger.d.ts +6 -0
- package/lib/typescript/shared/utils/logger.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/shared/components/boundary/components/boundary-target.tsx +12 -12
- package/src/shared/components/boundary/create-boundary-component.tsx +59 -155
- package/src/shared/components/boundary/hooks/use-boundary-measurement.ts +127 -0
- package/src/shared/components/boundary/hooks/use-boundary-presence.ts +7 -5
- package/src/shared/components/boundary/hooks/use-initial-destination-measurement.ts +27 -11
- package/src/shared/components/boundary/hooks/use-initial-source-measurement.ts +5 -5
- package/src/shared/components/boundary/hooks/use-measurer.ts +11 -14
- package/src/shared/components/boundary/hooks/use-refresh-boundary.ts +5 -5
- package/src/shared/components/boundary/index.tsx +2 -2
- package/src/shared/components/boundary/portal/components/portal.tsx +3 -3
- package/src/shared/components/boundary/portal/resolve-portal.ts +40 -0
- package/src/shared/components/boundary/providers/{boundary-owner.provider.tsx → boundary-root.provider.tsx} +27 -32
- package/src/shared/components/boundary/utils/destination-signals.ts +53 -2
- package/src/shared/components/create-transition-aware-component.tsx +3 -25
- package/src/shared/components/overlay/variations/float-overlay.tsx +3 -3
- package/src/shared/components/screen-container/layers/backdrop.tsx +4 -17
- package/src/shared/components/screen-container/layers/content.tsx +4 -16
- package/src/shared/components/screen-container/layers/maybe-masked-navigation-container.tsx +8 -18
- package/src/shared/components/screen-container/layers/surface-container.tsx +4 -17
- package/src/shared/providers/screen/animation/helpers/pipeline.ts +250 -68
- package/src/shared/providers/screen/screen-composer.tsx +3 -3
- package/src/shared/providers/screen/styles/helpers/opening-phase.ts +25 -0
- package/src/shared/providers/screen/styles/helpers/resolve-slot-styles/index.ts +8 -10
- package/src/shared/providers/screen/styles/helpers/resolve-slot-styles/materialize-slot.ts +0 -1
- package/src/shared/providers/screen/styles/helpers/resolve-slot-styles/slot-state.ts +0 -24
- package/src/shared/providers/screen/styles/helpers/visibility-gate.ts +0 -12
- package/src/shared/providers/screen/styles/hooks/use-interpolated-style-maps.tsx +29 -37
- package/src/shared/providers/screen/styles/hooks/use-maybe-block-visibility.tsx +0 -18
- package/src/shared/providers/screen/styles/hooks/use-resolved-slot-style-map.tsx +17 -4
- package/src/shared/providers/screen/styles/index.tsx +8 -4
- package/src/shared/providers/screen/styles/slot.provider.tsx +111 -0
- package/src/shared/stores/bounds/helpers/link-pairs.helpers.ts +17 -0
- package/src/shared/stores/bounds/types.ts +14 -0
- package/src/shared/utils/bounds/navigation/zoom/build.ts +9 -1
- package/src/shared/utils/bounds/navigation/zoom/helpers.ts +96 -0
- package/src/shared/utils/logger.ts +12 -0
- package/lib/commonjs/shared/components/boundary/providers/boundary-owner.provider.js.map +0 -1
- package/lib/commonjs/shared/providers/screen/styles/helpers/preserve-animated-props-only.js +0 -26
- package/lib/commonjs/shared/providers/screen/styles/helpers/preserve-animated-props-only.js.map +0 -1
- package/lib/commonjs/shared/providers/screen/styles/styles.provider.js +0 -61
- package/lib/commonjs/shared/providers/screen/styles/styles.provider.js.map +0 -1
- package/lib/module/shared/components/boundary/providers/boundary-owner.provider.js.map +0 -1
- package/lib/module/shared/providers/screen/styles/helpers/preserve-animated-props-only.js +0 -21
- package/lib/module/shared/providers/screen/styles/helpers/preserve-animated-props-only.js.map +0 -1
- package/lib/module/shared/providers/screen/styles/styles.provider.js +0 -53
- package/lib/module/shared/providers/screen/styles/styles.provider.js.map +0 -1
- package/lib/typescript/shared/components/boundary/providers/boundary-owner.provider.d.ts.map +0 -1
- package/lib/typescript/shared/providers/screen/styles/helpers/preserve-animated-props-only.d.ts +0 -3
- package/lib/typescript/shared/providers/screen/styles/helpers/preserve-animated-props-only.d.ts.map +0 -1
- package/lib/typescript/shared/providers/screen/styles/styles.provider.d.ts +0 -14
- package/lib/typescript/shared/providers/screen/styles/styles.provider.d.ts.map +0 -1
- package/src/shared/providers/screen/styles/helpers/preserve-animated-props-only.ts +0 -22
- package/src/shared/providers/screen/styles/styles.provider.tsx +0 -60
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { useMemo } from "react";
|
|
1
2
|
import { useWindowDimensions } from "react-native";
|
|
2
3
|
import {
|
|
3
4
|
type DerivedValue,
|
|
@@ -6,20 +7,26 @@ import {
|
|
|
6
7
|
useSharedValue,
|
|
7
8
|
} from "react-native-reanimated";
|
|
8
9
|
import { useSafeAreaInsets } from "react-native-safe-area-context";
|
|
9
|
-
import {
|
|
10
|
+
import {
|
|
11
|
+
createScreenTransitionState,
|
|
12
|
+
DEFAULT_SCREEN_TRANSITION_STATE,
|
|
13
|
+
} from "../../../../constants";
|
|
10
14
|
import { useStack } from "../../../../hooks/navigation/use-stack";
|
|
11
15
|
import type {
|
|
12
16
|
ScreenInterpolationProps,
|
|
13
17
|
ScreenStyleInterpolator,
|
|
18
|
+
ScreenTransitionState,
|
|
14
19
|
} from "../../../../types/animation.types";
|
|
15
20
|
|
|
16
|
-
import { useDescriptors } from "../../descriptors";
|
|
21
|
+
import { type BaseDescriptor, useDescriptors } from "../../descriptors";
|
|
22
|
+
import { buildScreenTransitionOptions } from "./build-screen-transition-options";
|
|
17
23
|
import { updateDerivations } from "./derivations";
|
|
18
24
|
import { hasTransitionsEnabled } from "./has-transitions-enabled";
|
|
19
25
|
import { hydrateTransitionState } from "./hydrate-transition-state";
|
|
20
26
|
import type { SelectedInterpolatorOptions } from "./selected-interpolator-options";
|
|
21
27
|
import { resolveStackProgress } from "./stack-progress";
|
|
22
28
|
import { useBuildTransitionState } from "./use-build-transition-state";
|
|
29
|
+
import { toPlainRoute, toPlainValue } from "./worklet";
|
|
23
30
|
|
|
24
31
|
export type ScreenInterpolatorFrame = Omit<
|
|
25
32
|
ScreenInterpolationProps,
|
|
@@ -34,21 +41,148 @@ interface ScreenAnimationPipeline {
|
|
|
34
41
|
currentInterpolator: ScreenStyleInterpolator | undefined;
|
|
35
42
|
}
|
|
36
43
|
|
|
37
|
-
const
|
|
38
|
-
|
|
39
|
-
insets: ScreenInterpolatorFrame["insets"],
|
|
40
|
-
): ScreenInterpolatorFrame => {
|
|
41
|
-
const current = {
|
|
42
|
-
...DEFAULT_SCREEN_TRANSITION_STATE,
|
|
43
|
-
layouts: { screen: dimensions },
|
|
44
|
-
};
|
|
44
|
+
const getInitialSettledProgress = (descriptor: BaseDescriptor) => {
|
|
45
|
+
const { snapPoints, initialSnapIndex = 0 } = descriptor.options;
|
|
45
46
|
|
|
46
|
-
|
|
47
|
+
if (!snapPoints?.length) {
|
|
48
|
+
return 1;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
const clampedIndex = Math.min(
|
|
52
|
+
Math.max(0, initialSnapIndex),
|
|
53
|
+
snapPoints.length - 1,
|
|
54
|
+
);
|
|
55
|
+
const snapPoint = snapPoints[clampedIndex];
|
|
56
|
+
|
|
57
|
+
return typeof snapPoint === "number" ? snapPoint : 0;
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
const applyInitialProgress = ({
|
|
61
|
+
state,
|
|
62
|
+
dimensions,
|
|
63
|
+
progress,
|
|
64
|
+
entering = 0,
|
|
65
|
+
closing = 0,
|
|
66
|
+
animating = 0,
|
|
67
|
+
willAnimate = 0,
|
|
68
|
+
settled = entering || closing || animating ? 0 : 1,
|
|
69
|
+
}: {
|
|
70
|
+
state: ScreenTransitionState;
|
|
71
|
+
dimensions: ScreenInterpolatorFrame["layouts"]["screen"];
|
|
72
|
+
progress: number;
|
|
73
|
+
entering?: number;
|
|
74
|
+
closing?: number;
|
|
75
|
+
animating?: number;
|
|
76
|
+
willAnimate?: number;
|
|
77
|
+
settled?: number;
|
|
78
|
+
}) => {
|
|
79
|
+
state.progress = progress;
|
|
80
|
+
state.transitionProgress = progress;
|
|
81
|
+
state.entering = entering;
|
|
82
|
+
state.closing = closing;
|
|
83
|
+
state.animating = animating;
|
|
84
|
+
state.willAnimate = willAnimate;
|
|
85
|
+
state.settled = settled;
|
|
86
|
+
state.logicallySettled = settled;
|
|
87
|
+
state.layouts.screen = dimensions;
|
|
88
|
+
|
|
89
|
+
return state;
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
const createInitialTransitionState = ({
|
|
93
|
+
descriptor,
|
|
94
|
+
dimensions,
|
|
95
|
+
progress,
|
|
96
|
+
entering,
|
|
97
|
+
animating,
|
|
98
|
+
willAnimate,
|
|
99
|
+
settled,
|
|
100
|
+
}: {
|
|
101
|
+
descriptor: BaseDescriptor;
|
|
102
|
+
dimensions: ScreenInterpolatorFrame["layouts"]["screen"];
|
|
103
|
+
progress: number;
|
|
104
|
+
entering?: number;
|
|
105
|
+
animating?: number;
|
|
106
|
+
willAnimate?: number;
|
|
107
|
+
settled?: number;
|
|
108
|
+
}) => {
|
|
109
|
+
const meta = descriptor.options.meta
|
|
110
|
+
? (toPlainValue(descriptor.options.meta) as Record<string, unknown>)
|
|
111
|
+
: undefined;
|
|
112
|
+
const state = createScreenTransitionState(
|
|
113
|
+
toPlainRoute(descriptor.route),
|
|
114
|
+
meta,
|
|
115
|
+
buildScreenTransitionOptions(descriptor.options),
|
|
116
|
+
);
|
|
117
|
+
|
|
118
|
+
return applyInitialProgress({
|
|
119
|
+
state,
|
|
120
|
+
dimensions,
|
|
121
|
+
progress,
|
|
122
|
+
entering,
|
|
123
|
+
animating,
|
|
124
|
+
willAnimate,
|
|
125
|
+
settled,
|
|
126
|
+
});
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
const createInitialInterpolatorProps = ({
|
|
130
|
+
dimensions,
|
|
131
|
+
insets,
|
|
132
|
+
currentDescriptor,
|
|
133
|
+
nextDescriptor,
|
|
134
|
+
prevDescriptor,
|
|
135
|
+
}: {
|
|
136
|
+
dimensions: ScreenInterpolatorFrame["layouts"]["screen"];
|
|
137
|
+
insets: ScreenInterpolatorFrame["insets"];
|
|
138
|
+
currentDescriptor: BaseDescriptor;
|
|
139
|
+
nextDescriptor?: BaseDescriptor;
|
|
140
|
+
prevDescriptor?: BaseDescriptor;
|
|
141
|
+
}): ScreenInterpolatorFrame => {
|
|
142
|
+
const hasIncomingNext = !!nextDescriptor;
|
|
143
|
+
const isFocusedEntering = !!prevDescriptor && !nextDescriptor;
|
|
144
|
+
const shouldAnimateInitialMount =
|
|
145
|
+
!prevDescriptor &&
|
|
146
|
+
!nextDescriptor &&
|
|
147
|
+
!!currentDescriptor.options.experimental_animateOnInitialMount;
|
|
148
|
+
const currentProgress =
|
|
149
|
+
hasIncomingNext || (!isFocusedEntering && !shouldAnimateInitialMount)
|
|
150
|
+
? getInitialSettledProgress(currentDescriptor)
|
|
151
|
+
: 0;
|
|
152
|
+
const currentEntering =
|
|
153
|
+
isFocusedEntering || shouldAnimateInitialMount ? 1 : 0;
|
|
154
|
+
const current = createInitialTransitionState({
|
|
155
|
+
descriptor: currentDescriptor,
|
|
156
|
+
dimensions,
|
|
157
|
+
progress: currentProgress,
|
|
158
|
+
entering: currentEntering,
|
|
159
|
+
animating: currentEntering,
|
|
160
|
+
willAnimate: currentEntering,
|
|
161
|
+
});
|
|
162
|
+
const previous = prevDescriptor
|
|
163
|
+
? createInitialTransitionState({
|
|
164
|
+
descriptor: prevDescriptor,
|
|
165
|
+
dimensions,
|
|
166
|
+
progress: getInitialSettledProgress(prevDescriptor),
|
|
167
|
+
})
|
|
168
|
+
: undefined;
|
|
169
|
+
const next = nextDescriptor
|
|
170
|
+
? createInitialTransitionState({
|
|
171
|
+
descriptor: nextDescriptor,
|
|
172
|
+
dimensions,
|
|
173
|
+
progress: 0,
|
|
174
|
+
entering: 1,
|
|
175
|
+
animating: 1,
|
|
176
|
+
willAnimate: 1,
|
|
177
|
+
settled: 0,
|
|
178
|
+
})
|
|
179
|
+
: undefined;
|
|
180
|
+
const frame: ScreenInterpolatorFrame = {
|
|
47
181
|
layouts: current.layouts,
|
|
48
182
|
insets,
|
|
49
|
-
previous
|
|
183
|
+
previous,
|
|
50
184
|
current,
|
|
51
|
-
next
|
|
185
|
+
next,
|
|
52
186
|
progress: 0,
|
|
53
187
|
stackProgress: 0,
|
|
54
188
|
logicallySettled: 1,
|
|
@@ -56,6 +190,86 @@ const createInitialBaseInterpolatorProps = (
|
|
|
56
190
|
active: current,
|
|
57
191
|
inactive: undefined,
|
|
58
192
|
};
|
|
193
|
+
|
|
194
|
+
updateDerivations(frame);
|
|
195
|
+
frame.stackProgress = frame.progress;
|
|
196
|
+
frame.logicallySettled = frame.active.settled;
|
|
197
|
+
|
|
198
|
+
return frame;
|
|
199
|
+
};
|
|
200
|
+
|
|
201
|
+
type BuiltTransitionState = NonNullable<
|
|
202
|
+
ReturnType<typeof useBuildTransitionState>
|
|
203
|
+
>;
|
|
204
|
+
|
|
205
|
+
const hydrateInterpolatorFrame = <TFrame extends ScreenInterpolatorFrame>({
|
|
206
|
+
frame,
|
|
207
|
+
dimensions,
|
|
208
|
+
insets,
|
|
209
|
+
currentAnimation,
|
|
210
|
+
nextAnimation,
|
|
211
|
+
prevAnimation,
|
|
212
|
+
nextHasTransitions,
|
|
213
|
+
interpolatorOptions,
|
|
214
|
+
}: {
|
|
215
|
+
frame: TFrame;
|
|
216
|
+
dimensions: ScreenInterpolatorFrame["layouts"]["screen"];
|
|
217
|
+
insets: ScreenInterpolatorFrame["insets"];
|
|
218
|
+
currentAnimation: BuiltTransitionState | undefined;
|
|
219
|
+
nextAnimation: BuiltTransitionState | undefined;
|
|
220
|
+
prevAnimation: BuiltTransitionState | undefined;
|
|
221
|
+
nextHasTransitions: boolean;
|
|
222
|
+
interpolatorOptions: SelectedInterpolatorOptions;
|
|
223
|
+
}): TFrame => {
|
|
224
|
+
"worklet";
|
|
225
|
+
const shouldApplyOptionsToCurrent = interpolatorOptions.owner === "current";
|
|
226
|
+
const shouldApplyOptionsToNext =
|
|
227
|
+
interpolatorOptions.owner === "next" &&
|
|
228
|
+
!!nextAnimation &&
|
|
229
|
+
nextHasTransitions;
|
|
230
|
+
const previousCurrentProgress = currentAnimation?.visualProgress.get();
|
|
231
|
+
const previousNextProgress =
|
|
232
|
+
nextAnimation && nextHasTransitions
|
|
233
|
+
? nextAnimation.visualProgress.get()
|
|
234
|
+
: undefined;
|
|
235
|
+
|
|
236
|
+
frame.previous = prevAnimation
|
|
237
|
+
? hydrateTransitionState(prevAnimation, dimensions)
|
|
238
|
+
: undefined;
|
|
239
|
+
|
|
240
|
+
frame.current = currentAnimation
|
|
241
|
+
? hydrateTransitionState(
|
|
242
|
+
currentAnimation,
|
|
243
|
+
dimensions,
|
|
244
|
+
shouldApplyOptionsToCurrent ? interpolatorOptions.options : undefined,
|
|
245
|
+
)
|
|
246
|
+
: DEFAULT_SCREEN_TRANSITION_STATE;
|
|
247
|
+
|
|
248
|
+
frame.next =
|
|
249
|
+
nextAnimation && nextHasTransitions
|
|
250
|
+
? hydrateTransitionState(
|
|
251
|
+
nextAnimation,
|
|
252
|
+
dimensions,
|
|
253
|
+
shouldApplyOptionsToNext ? interpolatorOptions.options : undefined,
|
|
254
|
+
)
|
|
255
|
+
: undefined;
|
|
256
|
+
|
|
257
|
+
frame.layouts = frame.current.layouts;
|
|
258
|
+
frame.insets = insets;
|
|
259
|
+
|
|
260
|
+
updateDerivations(frame);
|
|
261
|
+
|
|
262
|
+
frame.stackProgress = resolveStackProgress(
|
|
263
|
+
currentAnimation?.stackProgress,
|
|
264
|
+
frame.progress,
|
|
265
|
+
frame.current.progress,
|
|
266
|
+
previousCurrentProgress,
|
|
267
|
+
frame.next?.progress,
|
|
268
|
+
previousNextProgress,
|
|
269
|
+
);
|
|
270
|
+
frame.logicallySettled = frame.active.settled;
|
|
271
|
+
|
|
272
|
+
return frame;
|
|
59
273
|
};
|
|
60
274
|
|
|
61
275
|
export function useScreenAnimationPipeline(): ScreenAnimationPipeline {
|
|
@@ -80,74 +294,42 @@ export function useScreenAnimationPipeline(): ScreenAnimationPipeline {
|
|
|
80
294
|
!!nextRouteKey &&
|
|
81
295
|
hasTransitionsEnabled(nextDescriptor?.options, transitionsAlwaysOn);
|
|
82
296
|
|
|
83
|
-
const
|
|
84
|
-
|
|
297
|
+
const initialInterpolatorProps = useMemo(
|
|
298
|
+
() =>
|
|
299
|
+
createInitialInterpolatorProps({
|
|
300
|
+
dimensions,
|
|
301
|
+
insets,
|
|
302
|
+
currentDescriptor: currDescriptor,
|
|
303
|
+
nextDescriptor,
|
|
304
|
+
prevDescriptor,
|
|
305
|
+
}),
|
|
306
|
+
[dimensions, insets, currDescriptor, nextDescriptor, prevDescriptor],
|
|
85
307
|
);
|
|
308
|
+
|
|
309
|
+
const screenInterpolatorProps = useSharedValue(initialInterpolatorProps);
|
|
86
310
|
const selectedInterpolatorOptions =
|
|
87
311
|
useSharedValue<SelectedInterpolatorOptions>({
|
|
88
312
|
owner: "current",
|
|
89
313
|
});
|
|
90
314
|
|
|
91
315
|
const propsRevisionState = useSharedValue({ value: 0 });
|
|
316
|
+
|
|
92
317
|
const screenInterpolatorPropsRevision = useDerivedValue<number>(() => {
|
|
93
318
|
"worklet";
|
|
94
319
|
|
|
95
320
|
screenInterpolatorProps.modify((frame) => {
|
|
96
321
|
"worklet";
|
|
97
322
|
const interpolatorOptions = selectedInterpolatorOptions.get();
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
: undefined;
|
|
109
|
-
|
|
110
|
-
frame.previous = prevAnimation
|
|
111
|
-
? hydrateTransitionState(prevAnimation, dimensions)
|
|
112
|
-
: undefined;
|
|
113
|
-
|
|
114
|
-
frame.current = currentAnimation
|
|
115
|
-
? hydrateTransitionState(
|
|
116
|
-
currentAnimation,
|
|
117
|
-
dimensions,
|
|
118
|
-
shouldApplyOptionsToCurrent
|
|
119
|
-
? interpolatorOptions.options
|
|
120
|
-
: undefined,
|
|
121
|
-
)
|
|
122
|
-
: DEFAULT_SCREEN_TRANSITION_STATE;
|
|
123
|
-
|
|
124
|
-
frame.next =
|
|
125
|
-
nextAnimation && nextHasTransitions
|
|
126
|
-
? hydrateTransitionState(
|
|
127
|
-
nextAnimation,
|
|
128
|
-
dimensions,
|
|
129
|
-
shouldApplyOptionsToNext
|
|
130
|
-
? interpolatorOptions.options
|
|
131
|
-
: undefined,
|
|
132
|
-
)
|
|
133
|
-
: undefined;
|
|
134
|
-
|
|
135
|
-
frame.layouts = frame.current.layouts;
|
|
136
|
-
frame.insets = insets;
|
|
137
|
-
|
|
138
|
-
updateDerivations(frame);
|
|
139
|
-
|
|
140
|
-
frame.stackProgress = resolveStackProgress(
|
|
141
|
-
currentAnimation?.stackProgress,
|
|
142
|
-
frame.progress,
|
|
143
|
-
frame.current.progress,
|
|
144
|
-
previousCurrentProgress,
|
|
145
|
-
frame.next?.progress,
|
|
146
|
-
previousNextProgress,
|
|
147
|
-
);
|
|
148
|
-
frame.logicallySettled = frame.active.settled;
|
|
149
|
-
|
|
150
|
-
return frame;
|
|
323
|
+
return hydrateInterpolatorFrame({
|
|
324
|
+
frame,
|
|
325
|
+
dimensions,
|
|
326
|
+
insets,
|
|
327
|
+
currentAnimation,
|
|
328
|
+
nextAnimation,
|
|
329
|
+
prevAnimation,
|
|
330
|
+
nextHasTransitions,
|
|
331
|
+
interpolatorOptions,
|
|
332
|
+
});
|
|
151
333
|
}, false);
|
|
152
334
|
|
|
153
335
|
// Critical reactive dependency for `screenInterpolatorProps`.
|
|
@@ -5,7 +5,7 @@ import { ScreenAnimationProvider } from "./animation";
|
|
|
5
5
|
import { type BaseDescriptor, DescriptorsProvider } from "./descriptors";
|
|
6
6
|
import { ScreenGestureProvider } from "./gestures";
|
|
7
7
|
import { ScreenOptionsProvider } from "./options";
|
|
8
|
-
import {
|
|
8
|
+
import { ScreenSlotProvider } from "./styles";
|
|
9
9
|
|
|
10
10
|
type Props<TDescriptor extends BaseDescriptor> = {
|
|
11
11
|
previous?: TDescriptor;
|
|
@@ -26,9 +26,9 @@ export function ScreenComposer<TDescriptor extends BaseDescriptor>({
|
|
|
26
26
|
<ScreenOptionsProvider>
|
|
27
27
|
<ScreenGestureProvider>
|
|
28
28
|
<ScreenAnimationProvider>
|
|
29
|
-
<
|
|
29
|
+
<ScreenSlotProvider>
|
|
30
30
|
<ScreenContainer>{children}</ScreenContainer>
|
|
31
|
-
</
|
|
31
|
+
</ScreenSlotProvider>
|
|
32
32
|
</ScreenAnimationProvider>
|
|
33
33
|
</ScreenGestureProvider>
|
|
34
34
|
</ScreenOptionsProvider>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The "pre-start" window of an opening transition: the screen has committed to
|
|
3
|
+
* opening (`entering`) but `transitionProgress` has not yet moved past 0, so no
|
|
4
|
+
* transformed frame has been produced yet.
|
|
5
|
+
*
|
|
6
|
+
* This window is a quarantine, and two source-level guards key off it:
|
|
7
|
+
* - the visibility gate keeps the entering screen hidden (it must not be SEEN), and
|
|
8
|
+
* - interpolator ownership stays on "current" so the entering screen does not
|
|
9
|
+
* DRIVE other screens' styles until its transition is actually live.
|
|
10
|
+
*
|
|
11
|
+
* Both must agree on when the open transition has started, so the threshold
|
|
12
|
+
* lives here in one place rather than being re-derived at each site.
|
|
13
|
+
*/
|
|
14
|
+
export const hasOpenTransitionStarted = (transitionProgress: number) => {
|
|
15
|
+
"worklet";
|
|
16
|
+
return transitionProgress > 0;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export const isOpeningBeforeStart = (
|
|
20
|
+
entering: number,
|
|
21
|
+
transitionProgress: number,
|
|
22
|
+
) => {
|
|
23
|
+
"worklet";
|
|
24
|
+
return !!entering && !hasOpenTransitionStarted(transitionProgress);
|
|
25
|
+
};
|
|
@@ -35,6 +35,11 @@ const getForwardedSlot = (
|
|
|
35
35
|
return slot;
|
|
36
36
|
};
|
|
37
37
|
|
|
38
|
+
const hasDefinedBucketValue = (value: unknown) => {
|
|
39
|
+
"worklet";
|
|
40
|
+
return value !== undefined && value !== null;
|
|
41
|
+
};
|
|
42
|
+
|
|
38
43
|
const hasEitherResetPatch = (
|
|
39
44
|
hasStyleResetPatch: boolean,
|
|
40
45
|
hasPropResetPatch: boolean,
|
|
@@ -43,11 +48,6 @@ const hasEitherResetPatch = (
|
|
|
43
48
|
return hasStyleResetPatch || hasPropResetPatch;
|
|
44
49
|
};
|
|
45
50
|
|
|
46
|
-
const hasDefinedBucketValue = (value: unknown) => {
|
|
47
|
-
"worklet";
|
|
48
|
-
return value !== undefined && value !== null;
|
|
49
|
-
};
|
|
50
|
-
|
|
51
51
|
const hasResettableDisappearedKeys = (
|
|
52
52
|
previousKeys: Record<string, true> | undefined,
|
|
53
53
|
previousResetValues: Record<string, unknown> | undefined,
|
|
@@ -81,7 +81,6 @@ const getResolvedSlotOutput = ({
|
|
|
81
81
|
}) => {
|
|
82
82
|
"worklet";
|
|
83
83
|
const state = getResolvedSlotState(slot);
|
|
84
|
-
|
|
85
84
|
const hasStyleResetPatch = hasResettableDisappearedKeys(
|
|
86
85
|
previousState?.styleKeys,
|
|
87
86
|
previousState?.styleResetValues,
|
|
@@ -459,10 +458,9 @@ const appendPreviousSlots = (context: ResolveSlotStylesContext) => {
|
|
|
459
458
|
};
|
|
460
459
|
|
|
461
460
|
/**
|
|
462
|
-
* Resolves slot styles for the current screen pass and
|
|
463
|
-
*
|
|
464
|
-
*
|
|
465
|
-
* concrete identity values.
|
|
461
|
+
* Resolves slot styles for the current screen pass and emits reset values for
|
|
462
|
+
* transition-owned keys that existed in the previous resolved map but no longer
|
|
463
|
+
* exist in the current one.
|
|
466
464
|
*/
|
|
467
465
|
export const resolveSlotStyles = ({
|
|
468
466
|
localStylesMaps,
|
|
@@ -2,11 +2,6 @@ import type { NormalizedTransitionSlotStyle } from "../../../../../types/animati
|
|
|
2
2
|
import { getPropResetValue, getStyleResetValue } from "./reset-values";
|
|
3
3
|
import type { ResettableStyleState } from "./types";
|
|
4
4
|
|
|
5
|
-
const hasTrackedKey = (keys: Record<string, true> | undefined, key: string) => {
|
|
6
|
-
"worklet";
|
|
7
|
-
return keys !== undefined && keys[key] === true;
|
|
8
|
-
};
|
|
9
|
-
|
|
10
5
|
const isDefinedStyleValue = (value: unknown) => {
|
|
11
6
|
"worklet";
|
|
12
7
|
return value !== undefined && value !== null;
|
|
@@ -52,25 +47,6 @@ const collectDefinedKeys = ({
|
|
|
52
47
|
};
|
|
53
48
|
};
|
|
54
49
|
|
|
55
|
-
export const hasDisappearedKeys = (
|
|
56
|
-
previousKeys: Record<string, true> | undefined,
|
|
57
|
-
currentKeys: Record<string, true> | undefined,
|
|
58
|
-
) => {
|
|
59
|
-
"worklet";
|
|
60
|
-
|
|
61
|
-
if (!previousKeys) {
|
|
62
|
-
return false;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
for (const key in previousKeys) {
|
|
66
|
-
if (!hasTrackedKey(currentKeys, key)) {
|
|
67
|
-
return true;
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
return false;
|
|
72
|
-
};
|
|
73
|
-
|
|
74
50
|
const hasEitherKeySet = (
|
|
75
51
|
styleKeys: Record<string, true> | undefined,
|
|
76
52
|
propKeys: Record<string, true> | undefined,
|
|
@@ -34,12 +34,7 @@ export const resolveScreenVisibilityGate = ({
|
|
|
34
34
|
const isPendingOpen =
|
|
35
35
|
pendingLifecycleRequestKind === LifecycleTransitionRequestKind.Open;
|
|
36
36
|
const isOpening = isPendingOpen || !!entering;
|
|
37
|
-
|
|
38
|
-
// Keep the screen hidden until the first transformed opening frame exists.
|
|
39
|
-
// The lifecycle request is cleared before the RAF-scheduled progress
|
|
40
|
-
// animation starts, so `entering` carries the gate through that one-frame gap.
|
|
41
37
|
const isWaitingForOpenToStart = progress <= 0;
|
|
42
|
-
|
|
43
38
|
const shouldBlock =
|
|
44
39
|
(hasPendingLifecycleBlock || isWaitingForOpenToStart) && isOpening;
|
|
45
40
|
|
|
@@ -48,10 +43,3 @@ export const resolveScreenVisibilityGate = ({
|
|
|
48
43
|
shouldOpenGate: !shouldBlock && progress > 0,
|
|
49
44
|
};
|
|
50
45
|
};
|
|
51
|
-
|
|
52
|
-
export const shouldBlockScreenVisibility = (
|
|
53
|
-
state: ScreenVisibilityGateState,
|
|
54
|
-
) => {
|
|
55
|
-
"worklet";
|
|
56
|
-
return resolveScreenVisibilityGate(state).shouldBlock;
|
|
57
|
-
};
|