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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["useCallback","useMemo","runOnUI","createPendingPairKey","prepareStyleForBounds","resolvePortalHost","useBoundaryPresence","useInitialDestinationMeasurement","useInitialSourceMeasurement","useMeasurer","useRefreshBoundary","useBoundaryMeasurement","boundTag","enabled","runtimeEnabled","currentScreenKey","measuredRef","style","targetPreparedStyles","portal","shouldAutoMeasure","config","onPress","anchor","scaleMode","target","method","boundaryConfig","rootPreparedStyles","preparedStyles","portalHost","measureBoundary","measuredAnimatedRef","shouldPassivelyMeasureSource","handlePress","args","type","pairKey","undefined"],"sourceRoot":"../../../../../../src","sources":["shared/components/boundary/hooks/use-boundary-measurement.ts"],"mappings":";;AAAA,SAASA,WAAW,EAAEC,OAAO,QAAQ,OAAO;AAG5C,SAASC,OAAO,QAAQ,yBAAyB;AACjD,SAASC,oBAAoB,QAAQ,mDAAmD;AAExF,SAASC,qBAAqB,QAAQ,6CAA6C;AACnF,SAASC,iBAAiB,QAAQ,0BAA0B;AAE5D,SAASC,mBAAmB,QAAQ,yBAAyB;AAC7D,SAASC,gCAAgC,QAAQ,uCAAuC;AACxF,SAASC,2BAA2B,QAAQ,kCAAkC;AAC9E,SAASC,WAAW,QAAQ,gBAAgB;AAC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AQ;IACRC,OAAO,EAAEC,cAAc;IACvBiB;EACD,CAAC,CAAC;EAEFrB,kBAAkB,CAAC;IAClBG,OAAO,EAAEC,cAAc;IACvBF,QAAQ;IACRmB;EACD,CAAC,CAAC;EAEF,MAAMG,WAAW,GAAGlC,WAAW,CAC9B,CAAC,GAAGmC,IAAe,KAAK;IACvB;IACAjC,OAAO,CAAC6B,eAAe,CAAC,CAAC;MACxBK,IAAI,EAAE,QAAQ;MACdC,OAAO,EAAElC,oBAAoB,CAACY,gBAAgB;IAC/C,CAAC,CAAC;IAEF,IAAI,OAAOO,OAAO,KAAK,UAAU,EAAE;MAClCA,OAAO,CAAC,GAAGa,IAAI,CAAC;IACjB;EACD,CAAC,EACD,CAACJ,eAAe,EAAET,OAAO,EAAEP,gBAAgB,CAC5C,CAAC;EAED,OAAO;IACNO,OAAO,EAAE,OAAOA,OAAO,KAAK,UAAU,GAAGY,WAAW,GAAGI;EACxD,CAAC;AACF,CAAC","ignoreList":[]}
|
|
@@ -6,18 +6,21 @@ import { removeEntry, setEntry } from "../../../stores/bounds/internals/entries"
|
|
|
6
6
|
export const useBoundaryPresence = params => {
|
|
7
7
|
const {
|
|
8
8
|
enabled,
|
|
9
|
-
|
|
9
|
+
boundTag,
|
|
10
10
|
currentScreenKey,
|
|
11
11
|
boundaryConfig
|
|
12
12
|
} = params;
|
|
13
|
+
const {
|
|
14
|
+
tag
|
|
15
|
+
} = boundTag;
|
|
13
16
|
useLayoutEffect(() => {
|
|
14
17
|
if (!enabled) return;
|
|
15
|
-
runOnUI(setEntry)(
|
|
18
|
+
runOnUI(setEntry)(tag, currentScreenKey, {
|
|
16
19
|
boundaryConfig
|
|
17
20
|
});
|
|
18
21
|
return () => {
|
|
19
|
-
runOnUI(removeEntry)(
|
|
22
|
+
runOnUI(removeEntry)(tag, currentScreenKey);
|
|
20
23
|
};
|
|
21
|
-
}, [enabled,
|
|
24
|
+
}, [enabled, tag, currentScreenKey, boundaryConfig]);
|
|
22
25
|
};
|
|
23
26
|
//# sourceMappingURL=use-boundary-presence.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useLayoutEffect","runOnUI","removeEntry","setEntry","useBoundaryPresence","params","enabled","
|
|
1
|
+
{"version":3,"names":["useLayoutEffect","runOnUI","removeEntry","setEntry","useBoundaryPresence","params","enabled","boundTag","currentScreenKey","boundaryConfig","tag"],"sourceRoot":"../../../../../../src","sources":["shared/components/boundary/hooks/use-boundary-presence.ts"],"mappings":";;AAAA,SAASA,eAAe,QAAQ,OAAO;AACvC,SAASC,OAAO,QAAQ,yBAAyB;AACjD,SACCC,WAAW,EACXC,QAAQ,QACF,0CAA0C;AAIjD,OAAO,MAAMC,mBAAmB,GAAIC,MAKnC,IAAK;EACL,MAAM;IAAEC,OAAO;IAAEC,QAAQ;IAAEC,gBAAgB;IAAEC;EAAe,CAAC,GAAGJ,MAAM;EACtE,MAAM;IAAEK;EAAI,CAAC,GAAGH,QAAQ;EAExBP,eAAe,CAAC,MAAM;IACrB,IAAI,CAACM,OAAO,EAAE;IAEdL,OAAO,CAACE,QAAQ,CAAC,CAACO,GAAG,EAAEF,gBAAgB,EAAE;MACxCC;IACD,CAAC,CAAC;IAEF,OAAO,MAAM;MACZR,OAAO,CAACC,WAAW,CAAC,CAACQ,GAAG,EAAEF,gBAAgB,CAAC;IAC5C,CAAC;EACF,CAAC,EAAE,CAACF,OAAO,EAAEI,GAAG,EAAEF,gBAAgB,EAAEC,cAAc,CAAC,CAAC;AACrD,CAAC","ignoreList":[]}
|
|
@@ -8,7 +8,7 @@ import { pairs } from "../../../stores/bounds/internals/state";
|
|
|
8
8
|
import { LifecycleTransitionRequestKind, SystemStore } from "../../../stores/system.store";
|
|
9
9
|
import { logger } from "../../../utils/logger";
|
|
10
10
|
import { getInitialDestinationMeasurePairKey } from "../utils/destination-signals";
|
|
11
|
-
const VIEWPORT_RETRY_DELAY_MS =
|
|
11
|
+
const VIEWPORT_RETRY_DELAY_MS = 100;
|
|
12
12
|
/**
|
|
13
13
|
* A destination that keeps failing its measurement guards must not hold the
|
|
14
14
|
* transition gate forever — after this budget the block is released with a
|
|
@@ -16,24 +16,27 @@ const VIEWPORT_RETRY_DELAY_MS = 16;
|
|
|
16
16
|
*/
|
|
17
17
|
const MAX_VIEWPORT_RETRIES = 20;
|
|
18
18
|
export const useInitialDestinationMeasurement = ({
|
|
19
|
-
|
|
19
|
+
boundTag,
|
|
20
20
|
enabled,
|
|
21
21
|
measureBoundary
|
|
22
22
|
}) => {
|
|
23
|
+
const {
|
|
24
|
+
linkKey,
|
|
25
|
+
group
|
|
26
|
+
} = boundTag;
|
|
23
27
|
const currentScreenKey = useDescriptorsStore(s => s.derivations.currentScreenKey);
|
|
24
28
|
const nextScreenKey = useDescriptorsStore(s => s.derivations.nextScreenKey);
|
|
25
29
|
const destinationPairKey = useDescriptorsStore(s => s.derivations.destinationPairKey);
|
|
26
30
|
const ancestorDestinationPairKey = useDescriptorsStore(s => s.derivations.ancestorDestinationPairKey);
|
|
27
31
|
const destinationEnabled = enabled && !nextScreenKey;
|
|
28
32
|
const progress = AnimationStore.getValue(currentScreenKey, "transitionProgress");
|
|
29
|
-
const system = SystemStore.getBag(currentScreenKey);
|
|
30
|
-
const {
|
|
31
|
-
pendingLifecycleRequestKind
|
|
32
|
-
} = system;
|
|
33
33
|
const {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
34
|
+
pendingLifecycleRequestKind,
|
|
35
|
+
actions: {
|
|
36
|
+
blockLifecycleStart,
|
|
37
|
+
unblockLifecycleStart
|
|
38
|
+
}
|
|
39
|
+
} = SystemStore.getBag(currentScreenKey);
|
|
37
40
|
const isBlockingLifecycleStart = useSharedValue(0);
|
|
38
41
|
const retryToken = useSharedValue(0);
|
|
39
42
|
const viewportRetries = useSharedValue(0);
|
|
@@ -61,11 +64,12 @@ export const useInitialDestinationMeasurement = ({
|
|
|
61
64
|
enabled: destinationEnabled,
|
|
62
65
|
destinationPairKey,
|
|
63
66
|
ancestorDestinationPairKey,
|
|
64
|
-
linkId,
|
|
67
|
+
linkId: linkKey,
|
|
68
|
+
group,
|
|
65
69
|
linkState: destinationEnabled && (destinationPairKey || ancestorDestinationPairKey) ? pairs.get() : undefined
|
|
66
70
|
});
|
|
67
71
|
return [measurePairKey, retryTick];
|
|
68
|
-
}, ([measurePairKey]) => {
|
|
72
|
+
}, ([measurePairKey, retryTick], previous) => {
|
|
69
73
|
"worklet";
|
|
70
74
|
|
|
71
75
|
if (!measurePairKey) {
|
|
@@ -74,6 +78,12 @@ export const useInitialDestinationMeasurement = ({
|
|
|
74
78
|
hasGivenUp.set(0);
|
|
75
79
|
return;
|
|
76
80
|
}
|
|
81
|
+
const previousMeasurePairKey = previous?.[0];
|
|
82
|
+
const previousRetryTick = previous?.[1];
|
|
83
|
+
const shouldAttemptMeasure = measurePairKey !== previousMeasurePairKey || retryTick !== previousRetryTick;
|
|
84
|
+
if (!shouldAttemptMeasure) {
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
77
87
|
if (hasGivenUp.get()) {
|
|
78
88
|
return;
|
|
79
89
|
}
|
|
@@ -85,7 +95,7 @@ export const useInitialDestinationMeasurement = ({
|
|
|
85
95
|
type: "destination",
|
|
86
96
|
pairKey: measurePairKey
|
|
87
97
|
});
|
|
88
|
-
const destinationAttached = getDestination(measurePairKey,
|
|
98
|
+
const destinationAttached = getDestination(measurePairKey, linkKey) !== null;
|
|
89
99
|
if (destinationAttached) {
|
|
90
100
|
releaseLifecycleStartBlock();
|
|
91
101
|
viewportRetries.set(0);
|
|
@@ -94,12 +104,12 @@ export const useInitialDestinationMeasurement = ({
|
|
|
94
104
|
if (viewportRetries.get() >= MAX_VIEWPORT_RETRIES) {
|
|
95
105
|
hasGivenUp.set(1);
|
|
96
106
|
releaseLifecycleStartBlock();
|
|
97
|
-
logger.warn(`Destination boundary "${
|
|
107
|
+
logger.warn(`Destination boundary "${linkKey}" never produced a valid measurement after ${MAX_VIEWPORT_RETRIES} attempts; releasing the transition gate without it. The boundary is likely off-viewport (e.g. an inactive group member on a paged screen) or unmounted.`);
|
|
98
108
|
return;
|
|
99
109
|
}
|
|
100
110
|
|
|
101
111
|
// Destination did not attach (malformed off-screen measurement); retry
|
|
102
|
-
//
|
|
112
|
+
// after the retry token advances while the lifecycle stays blocked.
|
|
103
113
|
viewportRetries.set(viewportRetries.get() + 1);
|
|
104
114
|
cancelAnimation(retryToken);
|
|
105
115
|
retryToken.set(withDelay(VIEWPORT_RETRY_DELAY_MS, withTiming(retryToken.get() + 1, {
|
package/lib/module/shared/components/boundary/hooks/use-initial-destination-measurement.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["cancelAnimation","useAnimatedReaction","useSharedValue","withDelay","withTiming","useDescriptorsStore","AnimationStore","getDestination","pairs","LifecycleTransitionRequestKind","SystemStore","logger","getInitialDestinationMeasurePairKey","VIEWPORT_RETRY_DELAY_MS","MAX_VIEWPORT_RETRIES","useInitialDestinationMeasurement","
|
|
1
|
+
{"version":3,"names":["cancelAnimation","useAnimatedReaction","useSharedValue","withDelay","withTiming","useDescriptorsStore","AnimationStore","getDestination","pairs","LifecycleTransitionRequestKind","SystemStore","logger","getInitialDestinationMeasurePairKey","VIEWPORT_RETRY_DELAY_MS","MAX_VIEWPORT_RETRIES","useInitialDestinationMeasurement","boundTag","enabled","measureBoundary","linkKey","group","currentScreenKey","s","derivations","nextScreenKey","destinationPairKey","ancestorDestinationPairKey","destinationEnabled","progress","getValue","pendingLifecycleRequestKind","actions","blockLifecycleStart","unblockLifecycleStart","getBag","isBlockingLifecycleStart","retryToken","viewportRetries","hasGivenUp","releaseLifecycleStartBlock","get","set","retryTick","hasPendingOpenRequest","Open","isWaitingForOpenToStart","measurePairKey","linkId","linkState","undefined","previous","previousMeasurePairKey","previousRetryTick","shouldAttemptMeasure","type","pairKey","destinationAttached","warn","duration"],"sourceRoot":"../../../../../../src","sources":["shared/components/boundary/hooks/use-initial-destination-measurement.ts"],"mappings":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oC,UAAU,CAAC;IAC3BA,UAAU,CAACK,GAAG,CACbtC,SAAS,CACRU,uBAAuB,EACvBT,UAAU,CAACgC,UAAU,CAACI,GAAG,CAAC,CAAC,GAAG,CAAC,EAAE;MAAEkB,QAAQ,EAAE;IAAE,CAAC,CACjD,CACD,CAAC;EACF,CACD,CAAC;AACF,CAAC","ignoreList":[]}
|
|
@@ -8,8 +8,7 @@ export const useInitialSourceMeasurement = params => {
|
|
|
8
8
|
const {
|
|
9
9
|
enabled,
|
|
10
10
|
measureBoundary,
|
|
11
|
-
|
|
12
|
-
group,
|
|
11
|
+
boundTag,
|
|
13
12
|
shouldAutoMeasure
|
|
14
13
|
} = params;
|
|
15
14
|
const sourcePairKey = useDescriptorsStore(s => s.derivations.sourcePairKey);
|
|
@@ -20,8 +19,8 @@ export const useInitialSourceMeasurement = params => {
|
|
|
20
19
|
return getInitialSourceCaptureSignal({
|
|
21
20
|
enabled,
|
|
22
21
|
sourcePairKey,
|
|
23
|
-
linkId,
|
|
24
|
-
group,
|
|
22
|
+
linkId: boundTag.linkKey,
|
|
23
|
+
group: boundTag.group,
|
|
25
24
|
shouldAutoMeasure,
|
|
26
25
|
linkState: shouldAutoMeasure && sourcePairKey ? pairs.get() : undefined
|
|
27
26
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useAnimatedReaction","useSharedValue","useDescriptorsStore","pairs","getInitialSourceCaptureSignal","useInitialSourceMeasurement","params","enabled","measureBoundary","
|
|
1
|
+
{"version":3,"names":["useAnimatedReaction","useSharedValue","useDescriptorsStore","pairs","getInitialSourceCaptureSignal","useInitialSourceMeasurement","params","enabled","measureBoundary","boundTag","shouldAutoMeasure","sourcePairKey","s","derivations","lastSourceCaptureSignal","linkId","linkKey","group","linkState","get","undefined","captureSignal","set","signal","type","pairKey"],"sourceRoot":"../../../../../../src","sources":["shared/components/boundary/hooks/use-initial-source-measurement.ts"],"mappings":";;AAAA,SAASA,mBAAmB,EAAEC,cAAc,QAAQ,yBAAyB;AAC7E,SAASC,mBAAmB,QAAQ,uCAAuC;AAC3E,SAASC,KAAK,QAAQ,wCAAwC;AAG9D,SAASC,6BAA6B,QAAQ,yBAAyB;AAEvE,OAAO,MAAMC,2BAA2B,GAAIC,MAK3C,IAAK;EACL,MAAM;IAAEC,OAAO;IAAEC,eAAe;IAAEC,QAAQ;IAAEC;EAAkB,CAAC,GAAGJ,MAAM;EACxE,MAAMK,aAAa,GAAGT,mBAAmB,CAAEU,CAAC,IAAKA,CAAC,CAACC,WAAW,CAACF,aAAa,CAAC;EAC7E,MAAMG,uBAAuB,GAAGb,cAAc,CAAgB,IAAI,CAAC;EAEnED,mBAAmB,CAClB,MAAM;IACL,SAAS;;IACT,OAAOI,6BAA6B,CAAC;MACpCG,OAAO;MACPI,aAAa;MACbI,MAAM,EAAEN,QAAQ,CAACO,OAAO;MACxBC,KAAK,EAAER,QAAQ,CAACQ,KAAK;MACrBP,iBAAiB;MACjBQ,SAAS,EAAER,iBAAiB,IAAIC,aAAa,GAAGR,KAAK,CAACgB,GAAG,CAAC,CAAC,GAAGC;IAC/D,CAAC,CAAC;EACH,CAAC,EACAC,aAAa,IAAK;IAClB,SAAS;;IACT,IAAI,CAACd,OAAO,IAAI,CAACc,aAAa,EAAE;MAC/BP,uBAAuB,CAACQ,GAAG,CAAC,IAAI,CAAC;MACjC;IACD;IAEA,IAAIR,uBAAuB,CAACK,GAAG,CAAC,CAAC,KAAKE,aAAa,CAACE,MAAM,EAAE;MAC3D;IACD;IAEAT,uBAAuB,CAACQ,GAAG,CAACD,aAAa,CAACE,MAAM,CAAC;IACjDf,eAAe,CAAC;MACfgB,IAAI,EAAE,QAAQ;MACdC,OAAO,EAAEJ,aAAa,CAACI;IACxB,CAAC,CAAC;EACH,CACD,CAAC;AACF,CAAC","ignoreList":[]}
|
|
@@ -11,9 +11,7 @@ import { getActiveScrollHost } from "../portal/stores/host-registry.store";
|
|
|
11
11
|
import { attachScrollSnapshotToMeasuredBounds, isMeasurementInViewport, measureWithOverscrollAwareness, normalizeMeasuredBoundsToOrigin } from "../utils/measured-bounds";
|
|
12
12
|
export const useMeasurer = ({
|
|
13
13
|
enabled,
|
|
14
|
-
|
|
15
|
-
linkId,
|
|
16
|
-
group,
|
|
14
|
+
boundTag,
|
|
17
15
|
currentScreenKey,
|
|
18
16
|
preparedStyles,
|
|
19
17
|
measuredAnimatedRef,
|
|
@@ -45,15 +43,15 @@ export const useMeasurer = ({
|
|
|
45
43
|
* and malformed off-screen destination measurements should keep the
|
|
46
44
|
* lifecycle blocked until a valid retry lands.
|
|
47
45
|
*/
|
|
48
|
-
const shouldGuardDestinationViewport = pendingLifecycleStartBlockCount.get() > 0 || !!group;
|
|
46
|
+
const shouldGuardDestinationViewport = pendingLifecycleStartBlockCount.get() > 0 || !!boundTag.group;
|
|
49
47
|
const viewportAllowsDestinationWrite = target.type !== "destination" || !shouldGuardDestinationViewport || isMeasurementInViewport(normalizedMeasured, viewportWidth, viewportHeight);
|
|
50
48
|
if (!viewportAllowsDestinationWrite) return;
|
|
51
49
|
const measuredWithScroll = attachScrollSnapshotToMeasuredBounds(normalizedMeasured, scrollMetadata.get());
|
|
52
50
|
const sourceHost = target.type === "source" ? getActiveScrollHost(currentScreenKey) ?? undefined : undefined;
|
|
53
51
|
applyMeasuredBoundsWrites({
|
|
54
|
-
entryTag,
|
|
55
|
-
linkId,
|
|
56
|
-
group,
|
|
52
|
+
entryTag: boundTag.tag,
|
|
53
|
+
linkId: boundTag.linkKey,
|
|
54
|
+
group: boundTag.group,
|
|
57
55
|
currentScreenKey,
|
|
58
56
|
measured: measuredWithScroll,
|
|
59
57
|
preparedStyles,
|
|
@@ -61,6 +59,6 @@ export const useMeasurer = ({
|
|
|
61
59
|
portalHost,
|
|
62
60
|
sourceHost
|
|
63
61
|
});
|
|
64
|
-
}, [enabled,
|
|
62
|
+
}, [enabled, boundTag, currentScreenKey, preparedStyles, measuredAnimatedRef, portalHost, viewportWidth, viewportHeight, scrollState, scrollMetadata, pendingLifecycleStartBlockCount, originRef]);
|
|
65
63
|
};
|
|
66
64
|
//# sourceMappingURL=use-measurer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useCallback","useWindowDimensions","measure","applyMeasuredBoundsWrites","useOriginContext","ScrollStore","SystemStore","getActiveScrollHost","attachScrollSnapshotToMeasuredBounds","isMeasurementInViewport","measureWithOverscrollAwareness","normalizeMeasuredBoundsToOrigin","useMeasurer","enabled","
|
|
1
|
+
{"version":3,"names":["useCallback","useWindowDimensions","measure","applyMeasuredBoundsWrites","useOriginContext","ScrollStore","SystemStore","getActiveScrollHost","attachScrollSnapshotToMeasuredBounds","isMeasurementInViewport","measureWithOverscrollAwareness","normalizeMeasuredBoundsToOrigin","useMeasurer","enabled","boundTag","currentScreenKey","preparedStyles","measuredAnimatedRef","portalHost","width","viewportWidth","height","viewportHeight","scrollState","getValue","scrollMetadata","pendingLifecycleStartBlockCount","originRef","target","measured","get","measuredOrigin","normalizedMeasured","shouldGuardDestinationViewport","group","viewportAllowsDestinationWrite","type","measuredWithScroll","sourceHost","undefined","entryTag","tag","linkId","linkKey","linkWrite"],"sourceRoot":"../../../../../../src","sources":["shared/components/boundary/hooks/use-measurer.ts"],"mappings":";;AAAA,SAASA,WAAW,QAAQ,OAAO;AAEnC,SAASC,mBAAmB,QAAQ,cAAc;AAClD,SAECC,OAAO,QAED,yBAAyB;AAChC,SAASC,yBAAyB,QAAQ,mDAAmD;AAC7F,SAASC,gBAAgB,QAAQ,2CAA2C;AAK5E,SAASC,WAAW,QAAQ,8BAA8B;AAC1D,SAASC,WAAW,QAAQ,8BAA8B;AAC1D,SAASC,mBAAmB,QAAQ,sCAAsC;AAE1E,SACCC,oCAAoC,EACpCC,uBAAuB,EACvBC,8BAA8B,EAC9BC,+BAA+B,QACzB,0BAA0B;AAWjC,OAAO,MAAMC,WAAW,GAAGA,CAAC;EAC3BC,OAAO;EACPC,QAAQ;EACRC,gBAAgB;EAChBC,cAAc;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D,MAAMQ,UAAU,GACfV,MAAM,CAACQ,IAAI,KAAK,QAAQ,GACpB7B,mBAAmB,CAACQ,gBAAgB,CAAC,IAAIwB,SAAS,GACnDA,SAAS;IAEbpC,yBAAyB,CAAC;MACzBqC,QAAQ,EAAE1B,QAAQ,CAAC2B,GAAG;MACtBC,MAAM,EAAE5B,QAAQ,CAAC6B,OAAO;MACxBT,KAAK,EAAEpB,QAAQ,CAACoB,KAAK;MACrBnB,gBAAgB;MAChBc,QAAQ,EAAEQ,kBAAkB;MAC5BrB,cAAc;MACd4B,SAAS,EAAEhB,MAAM;MACjBV,UAAU;MACVoB;IACD,CAAC,CAAC;EACH,CAAC,EACD,CACCzB,OAAO,EACPC,QAAQ,EACRC,gBAAgB,EAChBC,cAAc,EACdC,mBAAmB,EACnBC,UAAU,EACVE,aAAa,EACbE,cAAc,EACdC,WAAW,EACXE,cAAc,EACdC,+BAA+B,EAC/BC,SAAS,CAEX,CAAC;AACF,CAAC","ignoreList":[]}
|
|
@@ -7,10 +7,13 @@ import { pairs } from "../../../stores/bounds/internals/state";
|
|
|
7
7
|
import { getRefreshBoundarySignal } from "../utils/refresh-signals";
|
|
8
8
|
export const useRefreshBoundary = ({
|
|
9
9
|
enabled,
|
|
10
|
-
|
|
11
|
-
group,
|
|
10
|
+
boundTag,
|
|
12
11
|
measureBoundary
|
|
13
12
|
}) => {
|
|
13
|
+
const {
|
|
14
|
+
linkKey,
|
|
15
|
+
group
|
|
16
|
+
} = boundTag;
|
|
14
17
|
const currentScreenKey = useDescriptorsStore(s => s.derivations.currentScreenKey);
|
|
15
18
|
const nextScreenKey = useDescriptorsStore(s => s.derivations.nextScreenKey);
|
|
16
19
|
const sourcePairKey = useDescriptorsStore(s => s.derivations.sourcePairKey);
|
|
@@ -34,7 +37,7 @@ export const useRefreshBoundary = ({
|
|
|
34
37
|
destinationPairKey,
|
|
35
38
|
ancestorDestinationPairKey,
|
|
36
39
|
nextScreenKey,
|
|
37
|
-
linkId,
|
|
40
|
+
linkId: linkKey,
|
|
38
41
|
group,
|
|
39
42
|
shouldRefresh: !!refreshWillAnimate.get(),
|
|
40
43
|
closing: !!refreshClosing.get(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useAnimatedReaction","useDescriptorsStore","AnimationStore","pairs","getRefreshBoundarySignal","useRefreshBoundary","enabled","
|
|
1
|
+
{"version":3,"names":["useAnimatedReaction","useDescriptorsStore","AnimationStore","pairs","getRefreshBoundarySignal","useRefreshBoundary","enabled","boundTag","measureBoundary","linkKey","group","currentScreenKey","s","derivations","nextScreenKey","sourcePairKey","destinationPairKey","ancestorDestinationPairKey","refreshScreenKey","refreshWillAnimate","getValue","refreshClosing","refreshEntering","refreshAnimating","refreshProgress","linkId","shouldRefresh","get","closing","entering","animating","progress","linkState","refreshSignal","prevRefreshSignal","signal","type","pairKey"],"sourceRoot":"../../../../../../src","sources":["shared/components/boundary/hooks/use-refresh-boundary.ts"],"mappings":";;AAAA,SAASA,mBAAmB,QAAQ,yBAAyB;AAC7D,SAASC,mBAAmB,QAAQ,uCAAuC;AAC3E,SAASC,cAAc,QAAQ,iCAAiC;AAChE,SAASC,KAAK,QAAQ,wCAAwC;AAG9D,SAASC,wBAAwB,QAAQ,0BAA0B;AAQnE,OAAO,MAAMC,kBAAkB,GAAGA,CAAC;EAClCC,OAAO;EACPC,QAAQ;EACRC;AACyB,CAAC,KAAK;EAC/B,MAAM;IAAEC,OAAO;IAAEC;EAAM,CAAC,GAAGH,QAAQ;EACnC,MAAMI,gBAAgB,GAAGV,mBAAmB,CAC1CW,CAAC,IAAKA,CAAC,CAACC,WAAW,CAACF,gBACtB,CAAC;EACD,MAAMG,aAAa,GAAGb,mBAAmB,CAAEW,CAAC,IAAKA,CAAC,CAACC,WAAW,CAACC,aAAa,CAAC;EAC7E,MAAMC,aAAa,GAAGd,mBAAmB,CAAEW,CAAC,IAAKA,CAAC,CAACC,WAAW,CAACE,aAAa,CAAC;EAC7E,MAAMC,kBAAkB,G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Aa,EAAEC,iBAAiB,KAAK;IACrC,SAAS;;IAET,IACC,CAACD,aAAa,IACdA,aAAa,CAACE,MAAM,KAAKD,iBAAiB,EAAEC,MAAM,EACjD;MACD;IACD;IAEA3B,eAAe,CAAC;MACf4B,IAAI,EAAEH,aAAa,CAACG,IAAI;MACxBC,OAAO,EAAEJ,aAAa,CAACI;IACxB,CAAC,CAAC;EACH,CACD,CAAC;AACF,CAAC","ignoreList":[]}
|
|
@@ -30,7 +30,7 @@ Host.displayName = "Transition.Boundary.Host";
|
|
|
30
30
|
* Use:
|
|
31
31
|
* - `Boundary.View` for passive/shared elements.
|
|
32
32
|
* - `Boundary.Trigger` for tappable elements that start navigation.
|
|
33
|
-
* - `Boundary.Target` to measure a nested descendant instead of the
|
|
33
|
+
* - `Boundary.Target` to measure a nested descendant instead of the root.
|
|
34
34
|
* - `Boundary.Host` to make nested portal placement explicit.
|
|
35
35
|
*/
|
|
36
36
|
export const Boundary = {
|
|
@@ -43,7 +43,7 @@ export const Boundary = {
|
|
|
43
43
|
*/
|
|
44
44
|
Trigger: BoundaryTrigger,
|
|
45
45
|
/**
|
|
46
|
-
* Optional nested measurement override inside a boundary
|
|
46
|
+
* Optional nested measurement override inside a boundary root.
|
|
47
47
|
*/
|
|
48
48
|
Target: BoundaryTarget,
|
|
49
49
|
/**
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { memo, useCallback, useLayoutEffect, useState } from "react";
|
|
4
4
|
import Animated, { runOnJS, useAnimatedProps, useAnimatedReaction, useAnimatedStyle, useSharedValue } from "react-native-reanimated";
|
|
5
5
|
import { useDescriptorsStore } from "../../../../providers/screen/descriptors";
|
|
6
|
-
import {
|
|
6
|
+
import { useScreenSlots } from "../../../../providers/screen/styles";
|
|
7
7
|
import { AnimationStore } from "../../../../stores/animation.store";
|
|
8
8
|
import { getLinkKeyFromTag } from "../../../../stores/bounds/helpers/link-pairs.helpers";
|
|
9
9
|
import { getLink } from "../../../../stores/bounds/internals/links";
|
|
@@ -29,8 +29,8 @@ export const Portal = /*#__PURE__*/memo(function Portal({
|
|
|
29
29
|
const isPortalEnabled = !!mode && isTeleportAvailable;
|
|
30
30
|
const portalAttachTarget = !mode || mode === true ? "current-screen" : mode.attachTo ?? "current-screen";
|
|
31
31
|
const {
|
|
32
|
-
|
|
33
|
-
} =
|
|
32
|
+
slotsMap
|
|
33
|
+
} = useScreenSlots();
|
|
34
34
|
const sourcePairKey = useDescriptorsStore(s => s.derivations.sourcePairKey);
|
|
35
35
|
const currentScreenKey = useDescriptorsStore(s => s.derivations.currentScreenKey);
|
|
36
36
|
const nextScreenKey = useDescriptorsStore(s => s.derivations.nextScreenKey);
|
|
@@ -137,7 +137,7 @@ export const Portal = /*#__PURE__*/memo(function Portal({
|
|
|
137
137
|
const {
|
|
138
138
|
teleport,
|
|
139
139
|
...slotProps
|
|
140
|
-
} =
|
|
140
|
+
} = slotsMap.get()[id]?.props ?? {};
|
|
141
141
|
const shouldTeleport = isTeleportEnabled(teleport);
|
|
142
142
|
return {
|
|
143
143
|
// Preserve portal slot props from the interpolator while keeping
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["memo","useCallback","useLayoutEffect","useState","Animated","runOnJS","useAnimatedProps","useAnimatedReaction","useAnimatedStyle","useSharedValue","useDescriptorsStore","
|
|
1
|
+
{"version":3,"names":["memo","useCallback","useLayoutEffect","useState","Animated","runOnJS","useAnimatedProps","useAnimatedReaction","useAnimatedStyle","useSharedValue","useDescriptorsStore","useScreenSlots","AnimationStore","getLinkKeyFromTag","getLink","pairs","createTransitionAwareComponent","getHostCapturesScroll","useActiveHostKey","mountPortalBoundaryHost","unmountPortalBoundaryHost","isTeleportAvailable","NativePortal","resolvePortalAttachmentTargets","createPortalBoundaryHostName","PORTAL_HOST_NAME_RESET_VALUE","isTeleportEnabled","jsx","_jsx","TransitionAwareTeleport","Portal","id","children","mode","placeholderRef","isPortalEnabled","portalAttachTarget","attachTo","slotsMap","sourcePairKey","s","derivations","currentScreenKey","nextScreenKey","attachment","setAttachment","attachedHostName","placeholderWidth","placeholderHeight","progressScreenKey","targetScreenKey","activeHostKey","activeHostCapturesScroll","progress","getValue","closing","updatePortalAttachment","matchedScreenKey","pairKey","current","set","boundaryId","capturesScroll","hostKey","screenKey","get","link","status","group","activeId","groups","destination","previousMatchedScreenKey","teleportProps","attachThreshold","teleport","slotProps","props","shouldTeleport","hostName","placeholderStyle","isAttached","width","height","View","ref","onLayout","event","nativeEvent","layout","style","collapsable","animatedProps","name"],"sourceRoot":"../../../../../../../src","sources":["shared/components/boundary/portal/components/portal.tsx"],"mappings":";;AAAA,SAGCA,IAAI,EAEJC,WAAW,EACXC,eAAe,EACfC,QAAQ,QACF,OAAO;AAEd,OAAOC,QAAQ,IAEdC,OAAO,EACPC,gBAAgB,EAChBC,mBAAmB,EACnBC,gBAAgB,EAChBC,cAAc,QACR,yBAAyB;AAChC,SAASC,mBAAmB,QAAQ,0CAA0C;AAC9E,SAASC,cAAc,QAAQ,qCAAqC;AACpE,SAASC,cAAc,QAAQ,oCAAoC;AACnE,SAASC,iBAAiB,QAAQ,sDAAsD;AACxF,SAASC,OAAO,QAAQ,2CAA2C;AACnE,SAASC,KAAK,QAAQ,2CAA2C;AACjE,SAASC,8BAA8B,QAAQ,4CAA4C;AAE3F,SACCC,qBAAqB,EACrBC,gBAAgB,QACV,+BAA+B;AACtC,SACCC,uBAAuB,EACvBC,yBAAyB,QACnB,sCAAsC;AAC7C,SAASC,mBAAmB,EAAEC,YAAY,QAAQ,aAAa;AAC/D,SAECC,8BAA8B,QACxB,qBAAqB;AAC5B,SACCC,4BAA4B,EAC5BC,4BAA4B,QACtB,iBAAiB;AACxB,SAASC,iBAAiB,QAAQ,2BAA2B;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAS9D,MAAMC,uBAAuB,GAAGP,YAAY,GACzCN,8BAA8B,CAC9BM,YACD,CAAC,GACA,IAAI;AAeP,OAAO,MAAMQ,MAAM,gBAAG9B,IAAI,CAA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W,EAAE,KAAM;MAAA3D,QAAA,eAEnBJ,IAAA,CAACC,uBAAuB;QAAC+D,aAAa,EAAEnB,aAAc;QAACoB,IAAI,EAAE9D,EAAG;QAAAC,QAAA,eAC/DJ,IAAA,CAACxB,QAAQ,CAACgF,IAAI;UAACM,KAAK,EAAEV,gBAAiB;UAAAhD,QAAA,EAAEA;QAAQ,CAAgB;MAAC,CAC1C;IAAC,CACZ,CAAC;EAElB;EAEA,OAAOA,QAAQ;AAChB,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { logger } from "../../../utils/logger";
|
|
4
|
+
import { isTeleportAvailable } from "./teleport";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Resolves the `portal` prop against teleport availability. When
|
|
8
|
+
* `react-native-teleport` is missing, portal boundaries degrade to inline
|
|
9
|
+
* rendering and we warn once for the whole app.
|
|
10
|
+
*/
|
|
11
|
+
export const resolveBoundaryPortal = portal => {
|
|
12
|
+
if (isTeleportAvailable) {
|
|
13
|
+
return portal;
|
|
14
|
+
}
|
|
15
|
+
if (portal) {
|
|
16
|
+
logger.warnOnce("boundary:teleport-missing", "react-native-teleport is not installed and will fallback to default behavior.");
|
|
17
|
+
}
|
|
18
|
+
return undefined;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Resolves which screen host a portal'd boundary attaches to. Object form may
|
|
23
|
+
* pin an explicit `attachTo`; bare `true` defaults to the current screen.
|
|
24
|
+
*/
|
|
25
|
+
export const resolvePortalHost = portal => {
|
|
26
|
+
if (typeof portal === "object") {
|
|
27
|
+
return portal.attachTo ?? "current-screen";
|
|
28
|
+
}
|
|
29
|
+
return portal ? "current-screen" : undefined;
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=resolve-portal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["logger","isTeleportAvailable","resolveBoundaryPortal","portal","warnOnce","undefined","resolvePortalHost","attachTo"],"sourceRoot":"../../../../../../src","sources":["shared/components/boundary/portal/resolve-portal.ts"],"mappings":";;AACA,SAASA,MAAM,QAAQ,uBAAuB;AAE9C,SAASC,mBAAmB,QAAQ,YAAY;;AAEhD;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,qBAAqB,GACjCC,MAAuB,IACS;EAChC,IAAIF,mBAAmB,EAAE;IACxB,OAAOE,MAAM;EACd;EAEA,IAAIA,MAAM,EAAE;IACXH,MAAM,CAACI,QAAQ,CACd,2BAA2B,EAC3B,+EACD,CAAC;EACF;EAEA,OAAOC,SAAS;AACjB,CAAC;;AAED;AACA;AACA;AACA;AACA,OAAO,MAAMC,iBAAiB,GAC7BH,MAAuB,IACmB;EAC1C,IAAI,OAAOA,MAAM,KAAK,QAAQ,EAAE;IAC/B,OAAOA,MAAM,CAACI,QAAQ,IAAI,gBAAgB;EAC3C;EAEA,OAAOJ,MAAM,GAAG,gBAAgB,GAAGE,SAAS;AAC7C,CAAC","ignoreList":[]}
|
|
@@ -1,34 +1,33 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import { useCallback, useMemo,
|
|
3
|
+
import { useCallback, useMemo, useState } from "react";
|
|
4
|
+
import { useAnimatedRef } from "react-native-reanimated";
|
|
4
5
|
import createProvider from "../../../utils/create-provider";
|
|
5
6
|
import { logger } from "../../../utils/logger";
|
|
6
7
|
// logger.warn prepends the library prefix.
|
|
7
|
-
const MULTIPLE_TARGETS_WARNING = "Multiple Boundary.Target elements were rendered under the same boundary
|
|
8
|
-
export const
|
|
8
|
+
const MULTIPLE_TARGETS_WARNING = "Multiple Boundary.Target elements were rendered under the same boundary root. The first registered target will be measured.";
|
|
9
|
+
export const TARGET_OUTSIDE_ROOT_WARNING = "Boundary.Target must be rendered inside a Boundary root (Boundary.View, Boundary.Trigger, or a component created by createBoundaryComponent).";
|
|
9
10
|
export const {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
} = createProvider("
|
|
11
|
+
BoundaryRootProvider,
|
|
12
|
+
useBoundaryRootContext
|
|
13
|
+
} = createProvider("BoundaryRoot", {
|
|
13
14
|
guarded: false
|
|
14
15
|
})(props => props);
|
|
15
|
-
export const
|
|
16
|
+
export const useBoundaryRootState = params => {
|
|
16
17
|
const {
|
|
17
|
-
ownerRef,
|
|
18
18
|
associatedTargetStyles,
|
|
19
|
-
|
|
19
|
+
boundTag,
|
|
20
20
|
portal
|
|
21
21
|
} = params;
|
|
22
|
-
const
|
|
22
|
+
const rootRef = useAnimatedRef();
|
|
23
23
|
const [targetEntry, setTargetEntry] = useState(null);
|
|
24
24
|
const registerTargetRef = useCallback((targetRef, preparedStyles, measurementRef) => {
|
|
25
25
|
setTargetEntry(prev => {
|
|
26
26
|
if (prev?.ref === targetRef) {
|
|
27
27
|
return prev;
|
|
28
28
|
}
|
|
29
|
-
if (__DEV__ && prev !== null
|
|
30
|
-
|
|
31
|
-
logger.warn(MULTIPLE_TARGETS_WARNING);
|
|
29
|
+
if (__DEV__ && prev !== null) {
|
|
30
|
+
logger.warnOnce("boundary:multiple-targets", MULTIPLE_TARGETS_WARNING);
|
|
32
31
|
}
|
|
33
32
|
return prev ?? {
|
|
34
33
|
ref: targetRef,
|
|
@@ -41,20 +40,19 @@ export const useBoundaryOwner = params => {
|
|
|
41
40
|
setTargetEntry(prev => prev?.ref === targetRef ? null : prev);
|
|
42
41
|
}, []);
|
|
43
42
|
const contextValue = useMemo(() => ({
|
|
44
|
-
ownerRef,
|
|
45
43
|
registerTargetRef,
|
|
46
44
|
unregisterTargetRef,
|
|
47
45
|
activeTargetRef: targetEntry?.ref ?? null,
|
|
48
46
|
associatedTargetStyles,
|
|
49
|
-
|
|
47
|
+
boundTag,
|
|
50
48
|
portal
|
|
51
|
-
}), [
|
|
49
|
+
}), [registerTargetRef, unregisterTargetRef, targetEntry, associatedTargetStyles, boundTag, portal]);
|
|
52
50
|
return {
|
|
51
|
+
ref: rootRef,
|
|
53
52
|
contextValue,
|
|
54
53
|
hasActiveTarget: targetEntry !== null,
|
|
55
|
-
measuredRef: targetEntry?.measurementRef ??
|
|
56
|
-
targetPreparedStyles: targetEntry?.preparedStyles
|
|
57
|
-
portal
|
|
54
|
+
measuredRef: targetEntry?.measurementRef ?? rootRef,
|
|
55
|
+
targetPreparedStyles: targetEntry?.preparedStyles
|
|
58
56
|
};
|
|
59
57
|
};
|
|
60
|
-
//# sourceMappingURL=boundary-
|
|
58
|
+
//# sourceMappingURL=boundary-root.provider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["useCallback","useMemo","useState","useAnimatedRef","createProvider","logger","MULTIPLE_TARGETS_WARNING","TARGET_OUTSIDE_ROOT_WARNING","BoundaryRootProvider","useBoundaryRootContext","guarded","props","useBoundaryRootState","params","associatedTargetStyles","boundTag","portal","rootRef","targetEntry","setTargetEntry","registerTargetRef","targetRef","preparedStyles","measurementRef","prev","ref","__DEV__","warnOnce","unregisterTargetRef","contextValue","activeTargetRef","hasActiveTarget","measuredRef","targetPreparedStyles"],"sourceRoot":"../../../../../../src","sources":["shared/components/boundary/providers/boundary-root.provider.tsx"],"mappings":";;AACA,SAAyBA,WAAW,EAAEC,OAAO,EAAEC,QAAQ,QAAQ,OAAO;AAItE,SAASC,cAAc,QAAQ,yBAAyB;AAExD,OAAOC,cAAc,MAAM,gCAAgC;AAC3D,SAASC,MAAM,QAAQ,uBAAuB;AA2B9C;AACA,MAAMC,wBAAwB,GAC7B,6HAA6H;AAE9H,OAAO,MAAMC,2BAA2B,GACvC,+IAA+I;AAOhJ,OAAO,MAAM;EAAEC,oBAAoB;EAAEC;AAAuB,CAAC,GAAGL,cAAc,CAC7E,cAAc,EACd;EAAEM,OAAO,EAAE;AAAM,CAClB,CAAC,CAA+CC,KAAK,IAAKA,KAAK,CAAC;AAEhE,OAAO,MAAMC,oBAAoB,GAAIC,MAIpC,IAAK;EACL,MAAM;IAAEC,sBAAsB;IA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EAAEK,cAAc,IAAIN,OAAO;IACnDgB,oBAAoB,EAAEf,WAAW,EAAEI;EACpC,CAAC;AACF,CAAC","ignoreList":[]}
|
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
import { createPendingPairKey, getActiveGroupId, getLinkKeyFromTag, getSourceScreenKeyFromPairKey } from "../../../stores/bounds/helpers/link-pairs.helpers";
|
|
4
|
+
const hasPendingSourceLinks = (linkState, pendingPairKey) => {
|
|
5
|
+
"worklet";
|
|
6
|
+
|
|
7
|
+
const links = linkState?.[pendingPairKey]?.links;
|
|
8
|
+
if (!links) {
|
|
9
|
+
return false;
|
|
10
|
+
}
|
|
11
|
+
for (const key in links) {
|
|
12
|
+
if (links[key]?.source) {
|
|
13
|
+
return true;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
return false;
|
|
17
|
+
};
|
|
3
18
|
export const getInitialDestinationMeasurePairKey = params => {
|
|
4
19
|
"worklet";
|
|
5
20
|
|
|
@@ -8,13 +23,29 @@ export const getInitialDestinationMeasurePairKey = params => {
|
|
|
8
23
|
destinationPairKey,
|
|
9
24
|
ancestorDestinationPairKey,
|
|
10
25
|
linkId,
|
|
26
|
+
group,
|
|
11
27
|
linkState
|
|
12
28
|
} = params;
|
|
13
29
|
const measurePairKey = destinationPairKey ?? ancestorDestinationPairKey;
|
|
14
30
|
if (!enabled || !measurePairKey) {
|
|
15
31
|
return null;
|
|
16
32
|
}
|
|
17
|
-
const
|
|
18
|
-
|
|
33
|
+
const linkKey = getLinkKeyFromTag(linkId);
|
|
34
|
+
const hasDestination = linkState?.[measurePairKey]?.links?.[linkKey]?.destination;
|
|
35
|
+
if (hasDestination) {
|
|
36
|
+
return null;
|
|
37
|
+
}
|
|
38
|
+
const sourceScreenKey = getSourceScreenKeyFromPairKey(measurePairKey);
|
|
39
|
+
const pendingPairKey = createPendingPairKey(sourceScreenKey);
|
|
40
|
+
const hasPendingSources = hasPendingSourceLinks(linkState, pendingPairKey);
|
|
41
|
+
const pendingSource = linkState?.[pendingPairKey]?.links?.[linkKey]?.source;
|
|
42
|
+
if (hasPendingSources && !pendingSource) {
|
|
43
|
+
return null;
|
|
44
|
+
}
|
|
45
|
+
const activeGroupId = group && linkState ? getActiveGroupId(linkState, measurePairKey, group) : null;
|
|
46
|
+
if (!hasPendingSources && activeGroupId && activeGroupId !== linkKey) {
|
|
47
|
+
return null;
|
|
48
|
+
}
|
|
49
|
+
return measurePairKey;
|
|
19
50
|
};
|
|
20
51
|
//# sourceMappingURL=destination-signals.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["getInitialDestinationMeasurePairKey","params","enabled","destinationPairKey","ancestorDestinationPairKey","linkId","
|
|
1
|
+
{"version":3,"names":["createPendingPairKey","getActiveGroupId","getLinkKeyFromTag","getSourceScreenKeyFromPairKey","hasPendingSourceLinks","linkState","pendingPairKey","links","key","source","getInitialDestinationMeasurePairKey","params","enabled","destinationPairKey","ancestorDestinationPairKey","linkId","group","measurePairKey","linkKey","hasDestination","destination","sourceScreenKey","hasPendingSources","pendingSource","activeGroupId"],"sourceRoot":"../../../../../../src","sources":["shared/components/boundary/utils/destination-signals.ts"],"mappings":";;AAAA,SACCA,oBAAoB,EACpBC,gBAAgB,EAChBC,iBAAiB,EACjBC,6BAA6B,QACvB,mDAAmD;AAM1D,MAAMC,qBAAqB,GAAGA,CAC7BC,SAAqC,EACrCC,cAA6B,KACzB;EACJ,SAAS;;EACT,MAAMC,KAAK,GAAGF,SAAS,GAAGC,cAAc,CAAC,EAAEC,KAAK;EAEhD,IAAI,CAACA,KAAK,EAAE;IACX,OAAO,KAAK;EACb;EAEA,KAAK,MAAMC,GAAG,IAAID,KAAK,EAAE;IACxB,IAAIA,KAAK,CAACC,GAAG,CAAC,EAAEC,MAAM,EAAE;MACvB,OAAO,IAAI;IACZ;EACD;EAEA,OAAO,KAAK;AACb,CAAC;AAED,OAAO,MAAMC,mCAAmC,GAAIC,MAOnD,IAA2B;EAC3B,SAAS;;EACT,MAAM;IACLC,OAAO;IACPC,kBAAkB;IAClBC,0BAA0B;IAC1BC,MAAM;IACNC,KAAK;IACLX;EACD,CAAC,GAAGM,MAAM;EACV,MAAMM,cAAc,GAAGJ,kBAAkB,IAAIC,0BAA0B;EAEvE,IAAI,CAACF,OAAO,IAAI,CAACK,cAAc,EAAE;IAChC,OAAO,IAAI;EACZ;EAEA,MAAMC,OAAO,GAAGhB,iBAAiB,CAACa,MAAM,CAAC;EACzC,MAAMI,cAAc,GACnBd,SAAS,GAAGY,cAAc,CAAC,EAAEV,KAAK,GAAGW,OAAO,CAAC,EAAEE,WAAW;EAE3D,IAAID,cAAc,EAAE;IACnB,OAAO,IAAI;EACZ;EAEA,MAAME,eAAe,GAAGlB,6BAA6B,CAACc,cAAc,CAAC;EACrE,MAAMX,cAAc,GAAGN,oBAAoB,CAACqB,eAAe,CAAC;EAC5D,MAAMC,iBAAiB,GAAGlB,qBAAqB,CAACC,SAAS,EAAEC,cAAc,CAAC;EAC1E,MAAMiB,aAAa,GAAGlB,SAAS,GAAGC,cAAc,CAAC,EAAEC,KAAK,GAAGW,OAAO,CAAC,EAAET,MAAM;EAE3E,IAAIa,iBAAiB,IAAI,CAACC,aAAa,EAAE;IACxC,OAAO,IAAI;EACZ;EAEA,MAAMC,aAAa,GAClBR,KAAK,IAAIX,SAAS,GACfJ,gBAAgB,CAACI,SAAS,EAAEY,cAAc,EAAED,KAAK,CAAC,GAClD,IAAI;EAER,IAAI,CAACM,iBAAiB,IAAIE,aAAa,IAAIA,aAAa,KAAKN,OAAO,EAAE;IACrE,OAAO,IAAI;EACZ;EAEA,OAAOD,cAAc;AACtB,CAAC","ignoreList":[]}
|
|
@@ -4,11 +4,10 @@
|
|
|
4
4
|
|
|
5
5
|
import { forwardRef, memo } from "react";
|
|
6
6
|
import { GestureDetector } from "react-native-gesture-handler";
|
|
7
|
-
import Animated, { runOnUI,
|
|
8
|
-
import { NO_PROPS, NO_STYLES } from "../constants";
|
|
7
|
+
import Animated, { runOnUI, useAnimatedRef, useComposedEventHandler } from "react-native-reanimated";
|
|
9
8
|
import { RegisterBoundsProvider } from "../providers/register-bounds.provider";
|
|
10
9
|
import { ScrollMetadataOwnerProvider, useScrollGestureCoordination } from "../providers/screen/gestures/scroll-coordination";
|
|
11
|
-
import {
|
|
10
|
+
import { useSlotProps, useSlotStyles } from "../providers/screen/styles";
|
|
12
11
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
12
|
export function createTransitionAwareComponent(Wrapped, options = {}) {
|
|
14
13
|
const {
|
|
@@ -83,26 +82,9 @@ export function createTransitionAwareComponent(Wrapped, options = {}) {
|
|
|
83
82
|
...rest
|
|
84
83
|
} = props;
|
|
85
84
|
const animatedRef = useAnimatedRef();
|
|
86
|
-
const {
|
|
87
|
-
stylesMap
|
|
88
|
-
} = useScreenStyles();
|
|
89
85
|
const associatedId = sharedBoundTag || styleId;
|
|
90
|
-
const associatedStyles =
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
if (!associatedId) {
|
|
94
|
-
return NO_STYLES;
|
|
95
|
-
}
|
|
96
|
-
return stylesMap.get()[associatedId]?.style ?? NO_STYLES;
|
|
97
|
-
});
|
|
98
|
-
const associatedProps = useAnimatedProps(() => {
|
|
99
|
-
"worklet";
|
|
100
|
-
|
|
101
|
-
if (!associatedId) {
|
|
102
|
-
return NO_PROPS;
|
|
103
|
-
}
|
|
104
|
-
return stylesMap.get()[associatedId]?.props ?? NO_PROPS;
|
|
105
|
-
});
|
|
86
|
+
const associatedStyles = useSlotStyles(associatedId);
|
|
87
|
+
const associatedProps = useSlotProps(associatedId);
|
|
106
88
|
return /*#__PURE__*/_jsx(RegisterBoundsProvider, {
|
|
107
89
|
animatedRef: animatedRef,
|
|
108
90
|
style: style,
|