react-native-screen-transitions 3.9.0-alpha.1 → 3.9.0-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/shared/components/boundary/components/boundary-target.js +21 -16
- package/lib/commonjs/shared/components/boundary/components/boundary-target.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/create-boundary-component.js +88 -114
- package/lib/commonjs/shared/components/boundary/create-boundary-component.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/hooks/{use-boundary-presence.js → lifecycles/use-boundary-presence.js} +14 -7
- package/lib/commonjs/shared/components/boundary/hooks/lifecycles/use-boundary-presence.js.map +1 -0
- package/lib/commonjs/shared/components/boundary/hooks/{use-initial-destination-measurement.js → lifecycles/use-initial-destination-measurement.js} +51 -24
- package/lib/commonjs/shared/components/boundary/hooks/lifecycles/use-initial-destination-measurement.js.map +1 -0
- package/lib/commonjs/shared/components/boundary/hooks/{use-initial-source-measurement.js → lifecycles/use-initial-source-measurement.js} +7 -10
- package/lib/commonjs/shared/components/boundary/hooks/lifecycles/use-initial-source-measurement.js.map +1 -0
- package/lib/commonjs/shared/components/boundary/hooks/{use-refresh-boundary.js → lifecycles/use-refresh-boundary.js} +10 -7
- package/lib/commonjs/shared/components/boundary/hooks/lifecycles/use-refresh-boundary.js.map +1 -0
- package/lib/commonjs/shared/components/boundary/hooks/use-boundary-measurement.js +82 -0
- package/lib/commonjs/shared/components/boundary/hooks/use-boundary-measurement.js.map +1 -0
- package/lib/commonjs/shared/components/boundary/hooks/use-measurer.js +10 -13
- package/lib/commonjs/shared/components/boundary/hooks/use-measurer.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/index.js +27 -30
- package/lib/commonjs/shared/components/boundary/index.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-local-portal-host.js +58 -0
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-local-portal-host.js.map +1 -0
- package/lib/commonjs/shared/components/boundary/portal/components/host.js +20 -4
- package/lib/commonjs/shared/components/boundary/portal/components/host.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/portal/components/portal-boundary-host.js +53 -32
- package/lib/commonjs/shared/components/boundary/portal/components/portal-boundary-host.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/portal/components/portal.js +206 -96
- package/lib/commonjs/shared/components/boundary/portal/components/portal.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/portal/hooks/use-host-measurement.js +14 -2
- package/lib/commonjs/shared/components/boundary/portal/hooks/use-host-measurement.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/portal/stores/host-registry.store.js +5 -44
- package/lib/commonjs/shared/components/boundary/portal/stores/host-registry.store.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/portal/stores/portal-boundary-host.store.js +37 -5
- package/lib/commonjs/shared/components/boundary/portal/stores/portal-boundary-host.store.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/portal/teleport.js +15 -2
- package/lib/commonjs/shared/components/boundary/portal/teleport.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/portal/utils/has-local-slot.js +18 -0
- package/lib/commonjs/shared/components/boundary/portal/utils/has-local-slot.js.map +1 -0
- package/lib/commonjs/shared/components/boundary/portal/utils/naming.js +10 -3
- package/lib/commonjs/shared/components/boundary/portal/utils/naming.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/portal/utils/offset-style.js +28 -49
- package/lib/commonjs/shared/components/boundary/portal/utils/offset-style.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/portal/utils/ownership.js +254 -0
- package/lib/commonjs/shared/components/boundary/portal/utils/ownership.js.map +1 -0
- package/lib/commonjs/shared/components/boundary/portal/utils/resolve-portal.js +38 -0
- package/lib/commonjs/shared/components/boundary/portal/utils/resolve-portal.js.map +1 -0
- package/lib/commonjs/shared/components/boundary/portal/utils/shallow-equal.js +29 -0
- package/lib/commonjs/shared/components/boundary/portal/utils/shallow-equal.js.map +1 -0
- package/lib/commonjs/shared/components/boundary/portal/utils/teleport-control.js +10 -1
- package/lib/commonjs/shared/components/boundary/portal/utils/teleport-control.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/portal/utils/visible-host.js +25 -0
- package/lib/commonjs/shared/components/boundary/portal/utils/visible-host.js.map +1 -0
- package/lib/commonjs/shared/components/boundary/providers/boundary-root.provider.js +65 -0
- package/lib/commonjs/shared/components/boundary/providers/boundary-root.provider.js.map +1 -0
- package/lib/commonjs/shared/components/boundary/utils/destination-signals.js +12 -2
- package/lib/commonjs/shared/components/boundary/utils/destination-signals.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/utils/refresh-signals.js +0 -21
- package/lib/commonjs/shared/components/boundary/utils/refresh-signals.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/utils/source-signals.js +4 -9
- package/lib/commonjs/shared/components/boundary/utils/source-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/index.js.map +1 -1
- package/lib/commonjs/shared/providers/helpers/measured-bounds-writes.js +6 -3
- package/lib/commonjs/shared/providers/helpers/measured-bounds-writes.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/animation/helpers/derivations.js +1 -0
- package/lib/commonjs/shared/providers/screen/animation/helpers/derivations.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/animation/helpers/pipeline.js +143 -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/compose-slot-style.js +95 -0
- package/lib/commonjs/shared/providers/screen/styles/helpers/compose-slot-style.js.map +1 -0
- package/lib/commonjs/shared/providers/screen/styles/helpers/normalize-slots.js +30 -9
- package/lib/commonjs/shared/providers/screen/styles/helpers/normalize-slots.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 +16 -11
- 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 +2 -0
- 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/slot-resolvers.js +96 -0
- package/lib/commonjs/shared/providers/screen/styles/hooks/slot-resolvers.js.map +1 -0
- package/lib/commonjs/shared/providers/screen/styles/hooks/use-interpolated-style-maps.js +36 -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 +38 -7
- package/lib/commonjs/shared/providers/screen/styles/index.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/styles/{styles.provider.js → slot.provider.js} +34 -21
- package/lib/commonjs/shared/providers/screen/styles/slot.provider.js.map +1 -0
- package/lib/commonjs/shared/providers/screen/styles/stores/slot-references.store.js +53 -0
- package/lib/commonjs/shared/providers/screen/styles/stores/slot-references.store.js.map +1 -0
- package/lib/commonjs/shared/stores/bounds/helpers/link-pairs.helpers.js +37 -2
- package/lib/commonjs/shared/stores/bounds/helpers/link-pairs.helpers.js.map +1 -1
- package/lib/commonjs/shared/stores/bounds/internals/entries.js +11 -4
- package/lib/commonjs/shared/stores/bounds/internals/entries.js.map +1 -1
- package/lib/commonjs/shared/stores/bounds/internals/links.js +134 -51
- package/lib/commonjs/shared/stores/bounds/internals/links.js.map +1 -1
- package/lib/commonjs/shared/stores/bounds/internals/resolver.js +1 -3
- package/lib/commonjs/shared/stores/bounds/internals/resolver.js.map +1 -1
- package/lib/commonjs/shared/stores/system.store.js +5 -0
- package/lib/commonjs/shared/stores/system.store.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/helpers/styles/compute.js +10 -69
- package/lib/commonjs/shared/utils/bounds/helpers/styles/compute.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/helpers/styles/local-transform.js +59 -0
- package/lib/commonjs/shared/utils/bounds/helpers/styles/local-transform.js.map +1 -0
- 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 +19 -14
- package/lib/module/shared/components/boundary/components/boundary-target.js.map +1 -1
- package/lib/module/shared/components/boundary/create-boundary-component.js +93 -119
- package/lib/module/shared/components/boundary/create-boundary-component.js.map +1 -1
- package/lib/module/shared/components/boundary/hooks/lifecycles/use-boundary-presence.js +30 -0
- package/lib/module/shared/components/boundary/hooks/lifecycles/use-boundary-presence.js.map +1 -0
- package/lib/module/shared/components/boundary/hooks/{use-initial-destination-measurement.js → lifecycles/use-initial-destination-measurement.js} +51 -24
- package/lib/module/shared/components/boundary/hooks/lifecycles/use-initial-destination-measurement.js.map +1 -0
- package/lib/module/shared/components/boundary/hooks/{use-initial-source-measurement.js → lifecycles/use-initial-source-measurement.js} +7 -10
- package/lib/module/shared/components/boundary/hooks/lifecycles/use-initial-source-measurement.js.map +1 -0
- package/lib/module/shared/components/boundary/hooks/{use-refresh-boundary.js → lifecycles/use-refresh-boundary.js} +10 -7
- package/lib/module/shared/components/boundary/hooks/lifecycles/use-refresh-boundary.js.map +1 -0
- package/lib/module/shared/components/boundary/hooks/use-boundary-measurement.js +77 -0
- package/lib/module/shared/components/boundary/hooks/use-boundary-measurement.js.map +1 -0
- package/lib/module/shared/components/boundary/hooks/use-measurer.js +10 -13
- package/lib/module/shared/components/boundary/hooks/use-measurer.js.map +1 -1
- package/lib/module/shared/components/boundary/index.js +27 -30
- package/lib/module/shared/components/boundary/index.js.map +1 -1
- package/lib/module/shared/components/boundary/portal/components/boundary-local-portal-host.js +53 -0
- package/lib/module/shared/components/boundary/portal/components/boundary-local-portal-host.js.map +1 -0
- package/lib/module/shared/components/boundary/portal/components/host.js +21 -5
- package/lib/module/shared/components/boundary/portal/components/host.js.map +1 -1
- package/lib/module/shared/components/boundary/portal/components/portal-boundary-host.js +53 -32
- package/lib/module/shared/components/boundary/portal/components/portal-boundary-host.js.map +1 -1
- package/lib/module/shared/components/boundary/portal/components/portal.js +213 -103
- package/lib/module/shared/components/boundary/portal/components/portal.js.map +1 -1
- package/lib/module/shared/components/boundary/portal/hooks/use-host-measurement.js +15 -3
- package/lib/module/shared/components/boundary/portal/hooks/use-host-measurement.js.map +1 -1
- package/lib/module/shared/components/boundary/portal/stores/host-registry.store.js +4 -41
- package/lib/module/shared/components/boundary/portal/stores/host-registry.store.js.map +1 -1
- package/lib/module/shared/components/boundary/portal/stores/portal-boundary-host.store.js +35 -4
- package/lib/module/shared/components/boundary/portal/stores/portal-boundary-host.store.js.map +1 -1
- package/lib/module/shared/components/boundary/portal/teleport.js +16 -2
- package/lib/module/shared/components/boundary/portal/teleport.js.map +1 -1
- package/lib/module/shared/components/boundary/portal/utils/has-local-slot.js +13 -0
- package/lib/module/shared/components/boundary/portal/utils/has-local-slot.js.map +1 -0
- package/lib/module/shared/components/boundary/portal/utils/naming.js +8 -2
- package/lib/module/shared/components/boundary/portal/utils/naming.js.map +1 -1
- package/lib/module/shared/components/boundary/portal/utils/offset-style.js +29 -49
- package/lib/module/shared/components/boundary/portal/utils/offset-style.js.map +1 -1
- package/lib/module/shared/components/boundary/portal/utils/ownership.js +246 -0
- package/lib/module/shared/components/boundary/portal/utils/ownership.js.map +1 -0
- package/lib/module/shared/components/boundary/portal/utils/resolve-portal.js +33 -0
- package/lib/module/shared/components/boundary/portal/utils/resolve-portal.js.map +1 -0
- package/lib/module/shared/components/boundary/portal/utils/shallow-equal.js +24 -0
- package/lib/module/shared/components/boundary/portal/utils/shallow-equal.js.map +1 -0
- package/lib/module/shared/components/boundary/portal/utils/teleport-control.js +8 -0
- package/lib/module/shared/components/boundary/portal/utils/teleport-control.js.map +1 -1
- package/lib/module/shared/components/boundary/portal/utils/visible-host.js +20 -0
- package/lib/module/shared/components/boundary/portal/utils/visible-host.js.map +1 -0
- package/lib/module/shared/components/boundary/providers/boundary-root.provider.js +57 -0
- package/lib/module/shared/components/boundary/providers/boundary-root.provider.js.map +1 -0
- package/lib/module/shared/components/boundary/utils/destination-signals.js +12 -2
- package/lib/module/shared/components/boundary/utils/destination-signals.js.map +1 -1
- package/lib/module/shared/components/boundary/utils/refresh-signals.js +0 -21
- package/lib/module/shared/components/boundary/utils/refresh-signals.js.map +1 -1
- package/lib/module/shared/components/boundary/utils/source-signals.js +4 -9
- package/lib/module/shared/components/boundary/utils/source-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/index.js.map +1 -1
- package/lib/module/shared/providers/helpers/measured-bounds-writes.js +6 -3
- package/lib/module/shared/providers/helpers/measured-bounds-writes.js.map +1 -1
- package/lib/module/shared/providers/screen/animation/helpers/derivations.js +1 -0
- package/lib/module/shared/providers/screen/animation/helpers/derivations.js.map +1 -1
- package/lib/module/shared/providers/screen/animation/helpers/pipeline.js +144 -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/compose-slot-style.js +89 -0
- package/lib/module/shared/providers/screen/styles/helpers/compose-slot-style.js.map +1 -0
- package/lib/module/shared/providers/screen/styles/helpers/normalize-slots.js +30 -9
- package/lib/module/shared/providers/screen/styles/helpers/normalize-slots.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 +16 -11
- 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 +2 -0
- 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/slot-resolvers.js +87 -0
- package/lib/module/shared/providers/screen/styles/hooks/slot-resolvers.js.map +1 -0
- package/lib/module/shared/providers/screen/styles/hooks/use-interpolated-style-maps.js +36 -36
- 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 +2 -1
- package/lib/module/shared/providers/screen/styles/index.js.map +1 -1
- package/lib/module/shared/providers/screen/styles/slot.provider.js +66 -0
- package/lib/module/shared/providers/screen/styles/slot.provider.js.map +1 -0
- package/lib/module/shared/providers/screen/styles/stores/slot-references.store.js +47 -0
- package/lib/module/shared/providers/screen/styles/stores/slot-references.store.js.map +1 -0
- package/lib/module/shared/stores/bounds/helpers/link-pairs.helpers.js +33 -1
- package/lib/module/shared/stores/bounds/helpers/link-pairs.helpers.js.map +1 -1
- package/lib/module/shared/stores/bounds/internals/entries.js +11 -4
- package/lib/module/shared/stores/bounds/internals/entries.js.map +1 -1
- package/lib/module/shared/stores/bounds/internals/links.js +135 -53
- package/lib/module/shared/stores/bounds/internals/links.js.map +1 -1
- package/lib/module/shared/stores/bounds/internals/resolver.js +1 -3
- package/lib/module/shared/stores/bounds/internals/resolver.js.map +1 -1
- package/lib/module/shared/stores/system.store.js +5 -0
- package/lib/module/shared/stores/system.store.js.map +1 -1
- package/lib/module/shared/types/animation.types.js.map +1 -1
- package/lib/module/shared/utils/bounds/helpers/styles/compute.js +10 -69
- package/lib/module/shared/utils/bounds/helpers/styles/compute.js.map +1 -1
- package/lib/module/shared/utils/bounds/helpers/styles/local-transform.js +52 -0
- package/lib/module/shared/utils/bounds/helpers/styles/local-transform.js.map +1 -0
- 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/shared/components/boundary/components/boundary-target.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/create-boundary-component.d.ts +0 -1
- package/lib/typescript/shared/components/boundary/create-boundary-component.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/hooks/lifecycles/use-boundary-presence.d.ts +11 -0
- package/lib/typescript/shared/components/boundary/hooks/lifecycles/use-boundary-presence.d.ts.map +1 -0
- package/lib/typescript/shared/components/boundary/hooks/lifecycles/use-initial-destination-measurement.d.ts +10 -0
- package/lib/typescript/shared/components/boundary/hooks/lifecycles/use-initial-destination-measurement.d.ts.map +1 -0
- package/lib/typescript/shared/components/boundary/hooks/lifecycles/use-initial-source-measurement.d.ts +8 -0
- package/lib/typescript/shared/components/boundary/hooks/lifecycles/use-initial-source-measurement.d.ts.map +1 -0
- package/lib/typescript/shared/components/boundary/hooks/lifecycles/use-refresh-boundary.d.ts +10 -0
- package/lib/typescript/shared/components/boundary/hooks/lifecycles/use-refresh-boundary.d.ts.map +1 -0
- package/lib/typescript/shared/components/boundary/hooks/use-boundary-measurement.d.ts +28 -0
- package/lib/typescript/shared/components/boundary/hooks/use-boundary-measurement.d.ts.map +1 -0
- package/lib/typescript/shared/components/boundary/hooks/use-measurer.d.ts +5 -6
- package/lib/typescript/shared/components/boundary/hooks/use-measurer.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/index.d.ts +36 -229
- package/lib/typescript/shared/components/boundary/index.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/portal/components/boundary-local-portal-host.d.ts +8 -0
- package/lib/typescript/shared/components/boundary/portal/components/boundary-local-portal-host.d.ts.map +1 -0
- 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.d.ts +4 -3
- package/lib/typescript/shared/components/boundary/portal/components/portal.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/portal/hooks/use-host-measurement.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/portal/stores/host-registry.store.d.ts +0 -7
- package/lib/typescript/shared/components/boundary/portal/stores/host-registry.store.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/portal/stores/portal-boundary-host.store.d.ts +16 -1
- package/lib/typescript/shared/components/boundary/portal/stores/portal-boundary-host.store.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/portal/teleport.d.ts +1 -1
- package/lib/typescript/shared/components/boundary/portal/teleport.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/portal/utils/has-local-slot.d.ts +3 -0
- package/lib/typescript/shared/components/boundary/portal/utils/has-local-slot.d.ts.map +1 -0
- package/lib/typescript/shared/components/boundary/portal/utils/naming.d.ts +2 -1
- package/lib/typescript/shared/components/boundary/portal/utils/naming.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/portal/utils/offset-style.d.ts +16 -32
- package/lib/typescript/shared/components/boundary/portal/utils/offset-style.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/portal/utils/ownership.d.ts +35 -0
- package/lib/typescript/shared/components/boundary/portal/utils/ownership.d.ts.map +1 -0
- package/lib/typescript/shared/components/boundary/portal/utils/resolve-portal.d.ts +12 -0
- package/lib/typescript/shared/components/boundary/portal/utils/resolve-portal.d.ts.map +1 -0
- package/lib/typescript/shared/components/boundary/portal/utils/shallow-equal.d.ts +8 -0
- package/lib/typescript/shared/components/boundary/portal/utils/shallow-equal.d.ts.map +1 -0
- package/lib/typescript/shared/components/boundary/portal/utils/teleport-control.d.ts +4 -0
- package/lib/typescript/shared/components/boundary/portal/utils/teleport-control.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/portal/utils/visible-host.d.ts +8 -0
- package/lib/typescript/shared/components/boundary/portal/utils/visible-host.d.ts.map +1 -0
- package/lib/typescript/shared/components/boundary/providers/boundary-root.provider.d.ts +37 -0
- package/lib/typescript/shared/components/boundary/providers/boundary-root.provider.d.ts.map +1 -0
- package/lib/typescript/shared/components/boundary/types.d.ts +9 -36
- package/lib/typescript/shared/components/boundary/types.d.ts.map +1 -1
- 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/boundary/utils/refresh-signals.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/utils/source-signals.d.ts +0 -1
- package/lib/typescript/shared/components/boundary/utils/source-signals.d.ts.map +1 -1
- package/lib/typescript/shared/components/create-transition-aware-component.d.ts.map +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.map +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.map +1 -1
- package/lib/typescript/shared/index.d.ts +3 -215
- package/lib/typescript/shared/index.d.ts.map +1 -1
- package/lib/typescript/shared/providers/helpers/measured-bounds-writes.d.ts +3 -3
- package/lib/typescript/shared/providers/helpers/measured-bounds-writes.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/animation/helpers/derivations.d.ts +1 -0
- package/lib/typescript/shared/providers/screen/animation/helpers/derivations.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/styles/helpers/compose-slot-style.d.ts +4 -0
- package/lib/typescript/shared/providers/screen/styles/helpers/compose-slot-style.d.ts.map +1 -0
- package/lib/typescript/shared/providers/screen/styles/helpers/normalize-slots.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 +2 -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/slot-resolvers.d.ts +11 -0
- package/lib/typescript/shared/providers/screen/styles/hooks/slot-resolvers.d.ts.map +1 -0
- package/lib/typescript/shared/providers/screen/styles/hooks/use-interpolated-style-maps.d.ts +4 -6
- 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 +0 -1
- 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 +2 -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 +18 -0
- package/lib/typescript/shared/providers/screen/styles/slot.provider.d.ts.map +1 -0
- package/lib/typescript/shared/providers/screen/styles/stores/slot-references.store.d.ts +6 -0
- package/lib/typescript/shared/providers/screen/styles/stores/slot-references.store.d.ts.map +1 -0
- package/lib/typescript/shared/stores/bounds/helpers/link-pairs.helpers.d.ts +8 -1
- package/lib/typescript/shared/stores/bounds/helpers/link-pairs.helpers.d.ts.map +1 -1
- package/lib/typescript/shared/stores/bounds/internals/entries.d.ts.map +1 -1
- package/lib/typescript/shared/stores/bounds/internals/links.d.ts +4 -3
- package/lib/typescript/shared/stores/bounds/internals/links.d.ts.map +1 -1
- package/lib/typescript/shared/stores/bounds/internals/resolver.d.ts.map +1 -1
- package/lib/typescript/shared/stores/bounds/types.d.ts +22 -20
- package/lib/typescript/shared/stores/bounds/types.d.ts.map +1 -1
- package/lib/typescript/shared/stores/system.store.d.ts +1 -0
- package/lib/typescript/shared/stores/system.store.d.ts.map +1 -1
- package/lib/typescript/shared/types/animation.types.d.ts +7 -1
- package/lib/typescript/shared/types/animation.types.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/helpers/styles/compute.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/helpers/styles/local-transform.d.ts +6 -0
- package/lib/typescript/shared/utils/bounds/helpers/styles/local-transform.d.ts.map +1 -0
- 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 +30 -16
- package/src/shared/components/boundary/create-boundary-component.tsx +132 -164
- package/src/shared/components/boundary/hooks/lifecycles/use-boundary-presence.ts +41 -0
- package/src/shared/components/boundary/hooks/{use-initial-destination-measurement.ts → lifecycles/use-initial-destination-measurement.ts} +65 -22
- package/src/shared/components/boundary/hooks/{use-initial-source-measurement.ts → lifecycles/use-initial-source-measurement.ts} +10 -12
- package/src/shared/components/boundary/hooks/{use-refresh-boundary.ts → lifecycles/use-refresh-boundary.ts} +10 -10
- package/src/shared/components/boundary/hooks/use-boundary-measurement.ts +97 -0
- package/src/shared/components/boundary/hooks/use-measurer.ts +16 -24
- package/src/shared/components/boundary/index.tsx +56 -30
- package/src/shared/components/boundary/portal/components/boundary-local-portal-host.tsx +66 -0
- package/src/shared/components/boundary/portal/components/host.tsx +20 -5
- package/src/shared/components/boundary/portal/components/portal-boundary-host.tsx +67 -52
- package/src/shared/components/boundary/portal/components/portal.tsx +281 -120
- package/src/shared/components/boundary/portal/hooks/use-host-measurement.ts +23 -2
- package/src/shared/components/boundary/portal/stores/host-registry.store.ts +4 -51
- package/src/shared/components/boundary/portal/stores/portal-boundary-host.store.ts +59 -6
- package/src/shared/components/boundary/portal/teleport.ts +28 -3
- package/src/shared/components/boundary/portal/utils/has-local-slot.ts +16 -0
- package/src/shared/components/boundary/portal/utils/naming.ts +11 -1
- package/src/shared/components/boundary/portal/utils/offset-style.ts +37 -139
- package/src/shared/components/boundary/portal/utils/ownership.ts +371 -0
- package/src/shared/components/boundary/portal/utils/resolve-portal.ts +50 -0
- package/src/shared/components/boundary/portal/utils/shallow-equal.ts +25 -0
- package/src/shared/components/boundary/portal/utils/teleport-control.ts +12 -0
- package/src/shared/components/boundary/portal/utils/visible-host.ts +24 -0
- package/src/shared/components/boundary/providers/{boundary-owner.provider.tsx → boundary-root.provider.tsx} +33 -47
- package/src/shared/components/boundary/types.ts +9 -39
- package/src/shared/components/boundary/utils/destination-signals.ts +22 -2
- package/src/shared/components/boundary/utils/refresh-signals.ts +0 -41
- package/src/shared/components/boundary/utils/source-signals.ts +5 -17
- 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/index.ts +0 -5
- package/src/shared/providers/helpers/measured-bounds-writes.ts +6 -11
- package/src/shared/providers/screen/animation/helpers/derivations.ts +3 -0
- package/src/shared/providers/screen/animation/helpers/pipeline.ts +251 -68
- package/src/shared/providers/screen/screen-composer.tsx +3 -3
- package/src/shared/providers/screen/styles/helpers/compose-slot-style.ts +129 -0
- package/src/shared/providers/screen/styles/helpers/normalize-slots.ts +45 -8
- package/src/shared/providers/screen/styles/helpers/opening-phase.ts +25 -0
- package/src/shared/providers/screen/styles/helpers/resolve-slot-styles/index.ts +22 -12
- package/src/shared/providers/screen/styles/helpers/resolve-slot-styles/materialize-slot.ts +3 -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/slot-resolvers.tsx +111 -0
- package/src/shared/providers/screen/styles/hooks/use-interpolated-style-maps.tsx +48 -38
- 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 +13 -4
- package/src/shared/providers/screen/styles/slot.provider.tsx +93 -0
- package/src/shared/providers/screen/styles/stores/slot-references.store.ts +71 -0
- package/src/shared/stores/bounds/helpers/link-pairs.helpers.ts +41 -1
- package/src/shared/stores/bounds/internals/entries.ts +13 -5
- package/src/shared/stores/bounds/internals/links.ts +167 -85
- package/src/shared/stores/bounds/internals/resolver.ts +0 -2
- package/src/shared/stores/bounds/types.ts +24 -22
- package/src/shared/stores/system.store.ts +6 -0
- package/src/shared/types/animation.types.ts +8 -1
- package/src/shared/utils/bounds/helpers/styles/compute.ts +22 -124
- package/src/shared/utils/bounds/helpers/styles/local-transform.ts +86 -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/hooks/use-boundary-presence.js.map +0 -1
- package/lib/commonjs/shared/components/boundary/hooks/use-initial-destination-measurement.js.map +0 -1
- package/lib/commonjs/shared/components/boundary/hooks/use-initial-source-measurement.js.map +0 -1
- package/lib/commonjs/shared/components/boundary/hooks/use-refresh-boundary.js.map +0 -1
- package/lib/commonjs/shared/components/boundary/portal/utils/attachment.js +0 -40
- package/lib/commonjs/shared/components/boundary/portal/utils/attachment.js.map +0 -1
- package/lib/commonjs/shared/components/boundary/providers/boundary-owner.provider.js +0 -68
- 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.map +0 -1
- package/lib/module/shared/components/boundary/hooks/use-boundary-presence.js +0 -23
- package/lib/module/shared/components/boundary/hooks/use-boundary-presence.js.map +0 -1
- package/lib/module/shared/components/boundary/hooks/use-initial-destination-measurement.js.map +0 -1
- package/lib/module/shared/components/boundary/hooks/use-initial-source-measurement.js.map +0 -1
- package/lib/module/shared/components/boundary/hooks/use-refresh-boundary.js.map +0 -1
- package/lib/module/shared/components/boundary/portal/utils/attachment.js +0 -35
- package/lib/module/shared/components/boundary/portal/utils/attachment.js.map +0 -1
- package/lib/module/shared/components/boundary/providers/boundary-owner.provider.js +0 -60
- 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/hooks/use-boundary-presence.d.ts +0 -8
- package/lib/typescript/shared/components/boundary/hooks/use-boundary-presence.d.ts.map +0 -1
- package/lib/typescript/shared/components/boundary/hooks/use-initial-destination-measurement.d.ts +0 -9
- package/lib/typescript/shared/components/boundary/hooks/use-initial-destination-measurement.d.ts.map +0 -1
- package/lib/typescript/shared/components/boundary/hooks/use-initial-source-measurement.d.ts +0 -9
- package/lib/typescript/shared/components/boundary/hooks/use-initial-source-measurement.d.ts.map +0 -1
- package/lib/typescript/shared/components/boundary/hooks/use-refresh-boundary.d.ts +0 -10
- package/lib/typescript/shared/components/boundary/hooks/use-refresh-boundary.d.ts.map +0 -1
- package/lib/typescript/shared/components/boundary/portal/utils/attachment.d.ts +0 -21
- package/lib/typescript/shared/components/boundary/portal/utils/attachment.d.ts.map +0 -1
- package/lib/typescript/shared/components/boundary/providers/boundary-owner.provider.d.ts +0 -44
- 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/components/boundary/hooks/use-boundary-presence.ts +0 -28
- package/src/shared/components/boundary/portal/utils/attachment.ts +0 -48
- 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,71 @@
|
|
|
1
|
+
import { useSyncExternalStore } from "react";
|
|
2
|
+
import type { ScreenKey } from "../../../../stores/bounds/types";
|
|
3
|
+
import type { ScreenSlotContextValue } from "../slot.provider";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Screen-owned slot reference registry.
|
|
7
|
+
*
|
|
8
|
+
* This is important for portals: a teleported component can render outside the
|
|
9
|
+
* screen provider that owns its active transition, but it still needs references
|
|
10
|
+
* to that provider's shared values. This store does not copy or own styles; it
|
|
11
|
+
* only exposes the existing ScreenSlotProvider value by screen key.
|
|
12
|
+
*/
|
|
13
|
+
type ScreenSlotsSnapshot = Record<ScreenKey, ScreenSlotContextValue>;
|
|
14
|
+
|
|
15
|
+
const listeners = new Set<() => void>();
|
|
16
|
+
const slotsByScreenKey = new Map<ScreenKey, ScreenSlotContextValue>();
|
|
17
|
+
|
|
18
|
+
let snapshot: ScreenSlotsSnapshot = {};
|
|
19
|
+
|
|
20
|
+
const emit = () => {
|
|
21
|
+
snapshot = Object.fromEntries(slotsByScreenKey);
|
|
22
|
+
|
|
23
|
+
for (const listener of listeners) {
|
|
24
|
+
listener();
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export const registerScreenSlots = (
|
|
29
|
+
screenKey: ScreenKey,
|
|
30
|
+
slots: ScreenSlotContextValue,
|
|
31
|
+
) => {
|
|
32
|
+
const previous = slotsByScreenKey.get(screenKey);
|
|
33
|
+
if (
|
|
34
|
+
previous?.localStylesMaps === slots.localStylesMaps &&
|
|
35
|
+
previous.nextInterpolatorReady === slots.nextInterpolatorReady &&
|
|
36
|
+
previous.slotsMap === slots.slotsMap
|
|
37
|
+
) {
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
slotsByScreenKey.set(screenKey, slots);
|
|
42
|
+
emit();
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
export const unregisterScreenSlots = (
|
|
46
|
+
screenKey: ScreenKey,
|
|
47
|
+
slots: ScreenSlotContextValue,
|
|
48
|
+
) => {
|
|
49
|
+
if (slotsByScreenKey.get(screenKey) !== slots) {
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
slotsByScreenKey.delete(screenKey);
|
|
54
|
+
emit();
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
const subscribe = (listener: () => void) => {
|
|
58
|
+
listeners.add(listener);
|
|
59
|
+
|
|
60
|
+
return () => {
|
|
61
|
+
listeners.delete(listener);
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
export const useRegisteredScreenSlots = (screenKey?: ScreenKey | null) => {
|
|
66
|
+
return useSyncExternalStore(
|
|
67
|
+
subscribe,
|
|
68
|
+
() => (screenKey ? (snapshot[screenKey] ?? null) : null),
|
|
69
|
+
() => null,
|
|
70
|
+
);
|
|
71
|
+
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type {
|
|
2
|
+
BoundTag,
|
|
2
3
|
GroupKey,
|
|
3
4
|
LinkGroupState,
|
|
4
5
|
LinkKey,
|
|
@@ -35,6 +36,15 @@ export const getSourceScreenKeyFromPairKey = (
|
|
|
35
36
|
return pairKey.slice(0, separatorIndex);
|
|
36
37
|
};
|
|
37
38
|
|
|
39
|
+
export const getDestinationScreenKeyFromPairKey = (
|
|
40
|
+
pairKey: ScreenPairKey,
|
|
41
|
+
): ScreenIdentifier["screenKey"] | "" => {
|
|
42
|
+
"worklet";
|
|
43
|
+
const separatorIndex = pairKey.indexOf(PAIR_SEPARATOR);
|
|
44
|
+
if (separatorIndex === -1) return "";
|
|
45
|
+
return pairKey.slice(separatorIndex + PAIR_SEPARATOR.length);
|
|
46
|
+
};
|
|
47
|
+
|
|
38
48
|
export const isScreenPairKeyForScreen = (
|
|
39
49
|
pairKey: ScreenPairKey,
|
|
40
50
|
screenKey: ScreenIdentifier["screenKey"],
|
|
@@ -66,6 +76,22 @@ export const createGroupTag = (group: GroupKey, linkKey: LinkKey): string => {
|
|
|
66
76
|
return `${group}:${linkKey}`;
|
|
67
77
|
};
|
|
68
78
|
|
|
79
|
+
/**
|
|
80
|
+
* Builds the {@link BoundTag} identity for a boundary. The combined `tag` is
|
|
81
|
+
* group-prefixed only when a group is present, matching how links are keyed.
|
|
82
|
+
*/
|
|
83
|
+
export const createBoundTag = (
|
|
84
|
+
linkKey: LinkKey,
|
|
85
|
+
group?: GroupKey,
|
|
86
|
+
): BoundTag => {
|
|
87
|
+
"worklet";
|
|
88
|
+
return {
|
|
89
|
+
tag: group ? createGroupTag(group, linkKey) : linkKey,
|
|
90
|
+
linkKey,
|
|
91
|
+
group,
|
|
92
|
+
};
|
|
93
|
+
};
|
|
94
|
+
|
|
69
95
|
const ensurePairState = (
|
|
70
96
|
state: LinkPairsState,
|
|
71
97
|
pairKey: ScreenPairKey,
|
|
@@ -77,7 +103,9 @@ const ensurePairState = (
|
|
|
77
103
|
groups: {},
|
|
78
104
|
};
|
|
79
105
|
}
|
|
80
|
-
state[pairKey].groups
|
|
106
|
+
if (!state[pairKey].groups) {
|
|
107
|
+
state[pairKey].groups = {};
|
|
108
|
+
}
|
|
81
109
|
return state[pairKey];
|
|
82
110
|
};
|
|
83
111
|
|
|
@@ -97,6 +125,18 @@ export const ensurePairGroups = (
|
|
|
97
125
|
return ensurePairState(state, pairKey).groups;
|
|
98
126
|
};
|
|
99
127
|
|
|
128
|
+
export const ensurePairSourceRequests = (
|
|
129
|
+
state: LinkPairsState,
|
|
130
|
+
pairKey: ScreenPairKey,
|
|
131
|
+
): Record<LinkKey, true> => {
|
|
132
|
+
"worklet";
|
|
133
|
+
const pair = ensurePairState(state, pairKey);
|
|
134
|
+
if (!pair.sourceRequests) {
|
|
135
|
+
pair.sourceRequests = {};
|
|
136
|
+
}
|
|
137
|
+
return pair.sourceRequests;
|
|
138
|
+
};
|
|
139
|
+
|
|
100
140
|
export const removePairLink = (
|
|
101
141
|
state: LinkPairsState,
|
|
102
142
|
pairKey: ScreenPairKey,
|
|
@@ -38,15 +38,23 @@ const applyEntryPatch = (entry: Entry, patch: EntryPatch) => {
|
|
|
38
38
|
entry.styles = patch.styles ?? {};
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
if (patch.boundaryConfig === undefined) {
|
|
42
|
-
return;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
41
|
if (patch.boundaryConfig === null) {
|
|
46
42
|
delete entry.boundaryConfig;
|
|
47
|
-
} else {
|
|
43
|
+
} else if (patch.boundaryConfig !== undefined) {
|
|
48
44
|
entry.boundaryConfig = patch.boundaryConfig;
|
|
49
45
|
}
|
|
46
|
+
|
|
47
|
+
if (patch.handoff === null) {
|
|
48
|
+
delete entry.handoff;
|
|
49
|
+
} else if (patch.handoff !== undefined) {
|
|
50
|
+
entry.handoff = patch.handoff;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
if (patch.escapeClipping === null) {
|
|
54
|
+
delete entry.escapeClipping;
|
|
55
|
+
} else if (patch.escapeClipping !== undefined) {
|
|
56
|
+
entry.escapeClipping = patch.escapeClipping;
|
|
57
|
+
}
|
|
50
58
|
};
|
|
51
59
|
|
|
52
60
|
function getEntry(tag: TagID, key: ScreenKey): Entry | null {
|
|
@@ -1,26 +1,23 @@
|
|
|
1
1
|
import type { MeasuredDimensions, StyleProps } from "react-native-reanimated";
|
|
2
2
|
import {
|
|
3
3
|
createGroupTag,
|
|
4
|
-
createPendingPairKey,
|
|
5
4
|
ensurePairGroups,
|
|
6
5
|
ensurePairLinks,
|
|
6
|
+
ensurePairSourceRequests,
|
|
7
7
|
getGroupKeyFromTag,
|
|
8
8
|
getLinkKeyFromTag,
|
|
9
9
|
getActiveGroupId as getPairActiveGroupId,
|
|
10
10
|
getDestination as getPairDestination,
|
|
11
11
|
getLink as getPairLink,
|
|
12
12
|
getSource as getPairSource,
|
|
13
|
-
getSourceScreenKeyFromPairKey,
|
|
14
|
-
removePairLink,
|
|
15
13
|
} from "../helpers/link-pairs.helpers";
|
|
16
14
|
import type {
|
|
17
|
-
|
|
15
|
+
BoundaryRuntimeFlags,
|
|
18
16
|
GroupKey,
|
|
19
17
|
LinkKey,
|
|
20
18
|
LinkPairsState,
|
|
21
19
|
ScreenKey,
|
|
22
20
|
ScreenPairKey,
|
|
23
|
-
SourceHostRef,
|
|
24
21
|
SourceTagLinkSide,
|
|
25
22
|
TagID,
|
|
26
23
|
TagLink,
|
|
@@ -36,16 +33,151 @@ const syncLinkStatus = (link: TagLink) => {
|
|
|
36
33
|
: "source-incomplete";
|
|
37
34
|
};
|
|
38
35
|
|
|
36
|
+
type SharedValueLike = {
|
|
37
|
+
_isReanimatedSharedValue: true;
|
|
38
|
+
get?: () => unknown;
|
|
39
|
+
value?: unknown;
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
const isSharedValueLike = (value: unknown): value is SharedValueLike => {
|
|
43
|
+
"worklet";
|
|
44
|
+
return (
|
|
45
|
+
(value as Partial<SharedValueLike> | null)?._isReanimatedSharedValue ===
|
|
46
|
+
true
|
|
47
|
+
);
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
const snapshotSharedValue = (value: SharedValueLike): unknown => {
|
|
51
|
+
"worklet";
|
|
52
|
+
return value.value;
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
const snapshotTransformArrayValue = (
|
|
56
|
+
value: unknown[],
|
|
57
|
+
): unknown[] | undefined => {
|
|
58
|
+
"worklet";
|
|
59
|
+
const snapshot: unknown[] = [];
|
|
60
|
+
|
|
61
|
+
for (let index = 0; index < value.length; index++) {
|
|
62
|
+
const snapshotValue = snapshotTransformEntryValue(value[index]);
|
|
63
|
+
if (snapshotValue !== undefined) {
|
|
64
|
+
snapshot.push(snapshotValue);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
return snapshot;
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
const snapshotTransformEntryValue = (value: unknown): unknown => {
|
|
72
|
+
"worklet";
|
|
73
|
+
if (isSharedValueLike(value)) {
|
|
74
|
+
return snapshotSharedValue(value);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
if (Array.isArray(value)) {
|
|
78
|
+
return snapshotTransformArrayValue(value);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
if (typeof value === "function") {
|
|
82
|
+
return undefined;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
return value === null || typeof value !== "object" ? value : undefined;
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
const snapshotTransformItem = (value: unknown): unknown => {
|
|
89
|
+
"worklet";
|
|
90
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) {
|
|
91
|
+
return snapshotTransformEntryValue(value);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
const snapshot: Record<string, unknown> = {};
|
|
95
|
+
const source = value as Record<string, unknown>;
|
|
96
|
+
let hasValue = false;
|
|
97
|
+
|
|
98
|
+
for (const key in source) {
|
|
99
|
+
const snapshotValue = snapshotTransformEntryValue(source[key]);
|
|
100
|
+
if (snapshotValue !== undefined) {
|
|
101
|
+
snapshot[key] = snapshotValue;
|
|
102
|
+
hasValue = true;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
return hasValue ? snapshot : undefined;
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
const snapshotTransform = (value: unknown): unknown => {
|
|
110
|
+
"worklet";
|
|
111
|
+
if (!Array.isArray(value)) {
|
|
112
|
+
return undefined;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
const snapshot: unknown[] = [];
|
|
116
|
+
|
|
117
|
+
for (let index = 0; index < value.length; index++) {
|
|
118
|
+
const snapshotValue = snapshotTransformItem(value[index]);
|
|
119
|
+
if (snapshotValue !== undefined) {
|
|
120
|
+
snapshot.push(snapshotValue);
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
return snapshot;
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* Link styles are measurement metadata, not a general style serializer.
|
|
129
|
+
* Snapshot only the fields bounds currently consume: primitives, top-level
|
|
130
|
+
* shared values, and transform entries. Object-valued non-transform styles are
|
|
131
|
+
* intentionally omitted to avoid retaining opaque/native style objects.
|
|
132
|
+
*/
|
|
133
|
+
const snapshotStyles = (styles: StyleProps): StyleProps => {
|
|
134
|
+
"worklet";
|
|
135
|
+
if (!styles || typeof styles !== "object" || Array.isArray(styles)) {
|
|
136
|
+
return {};
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
const snapshot: Record<string, unknown> = {};
|
|
140
|
+
const source = styles as Record<string, unknown>;
|
|
141
|
+
|
|
142
|
+
for (const key in source) {
|
|
143
|
+
const value = source[key];
|
|
144
|
+
|
|
145
|
+
if (key === "transform") {
|
|
146
|
+
const transform = snapshotTransform(value);
|
|
147
|
+
|
|
148
|
+
if (transform !== undefined) {
|
|
149
|
+
snapshot.transform = transform;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
continue;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
if (isSharedValueLike(value)) {
|
|
156
|
+
snapshot[key] = snapshotSharedValue(value);
|
|
157
|
+
continue;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
if (value === null || typeof value !== "object") {
|
|
161
|
+
snapshot[key] = value;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
return snapshot as StyleProps;
|
|
166
|
+
};
|
|
167
|
+
|
|
39
168
|
const createLinkSide = (
|
|
40
169
|
screenKey: ScreenKey,
|
|
41
170
|
bounds: MeasuredDimensions,
|
|
42
171
|
styles: StyleProps,
|
|
172
|
+
runtimeFlags: BoundaryRuntimeFlags = {},
|
|
43
173
|
) => {
|
|
44
174
|
"worklet";
|
|
45
175
|
return {
|
|
46
176
|
screenKey,
|
|
47
177
|
bounds,
|
|
48
|
-
styles,
|
|
178
|
+
styles: snapshotStyles(styles),
|
|
179
|
+
handoff: runtimeFlags.handoff ? true : undefined,
|
|
180
|
+
escapeClipping: runtimeFlags.escapeClipping ? true : undefined,
|
|
49
181
|
};
|
|
50
182
|
};
|
|
51
183
|
|
|
@@ -100,7 +232,9 @@ const writeDestination = (
|
|
|
100
232
|
|
|
101
233
|
link.group = group ?? link.group;
|
|
102
234
|
link.destination = destination;
|
|
103
|
-
link.initialDestination
|
|
235
|
+
if (!link.initialDestination) {
|
|
236
|
+
link.initialDestination = destination;
|
|
237
|
+
}
|
|
104
238
|
syncLinkStatus(link);
|
|
105
239
|
|
|
106
240
|
writePairLink(state, pairKey, linkKey, link);
|
|
@@ -110,41 +244,6 @@ const writeDestination = (
|
|
|
110
244
|
}
|
|
111
245
|
};
|
|
112
246
|
|
|
113
|
-
const promotePendingSource = (
|
|
114
|
-
state: LinkPairsState,
|
|
115
|
-
pairKey: ScreenPairKey,
|
|
116
|
-
linkKey: LinkKey,
|
|
117
|
-
) => {
|
|
118
|
-
"worklet";
|
|
119
|
-
if (getPairLink(state, pairKey, linkKey)) return;
|
|
120
|
-
|
|
121
|
-
const sourceScreenKey = getSourceScreenKeyFromPairKey(pairKey);
|
|
122
|
-
const pendingPairKey = createPendingPairKey(sourceScreenKey);
|
|
123
|
-
if (pendingPairKey === pairKey) return;
|
|
124
|
-
|
|
125
|
-
const pendingLink = getPairLink(state, pendingPairKey, linkKey);
|
|
126
|
-
if (!pendingLink) return;
|
|
127
|
-
|
|
128
|
-
writePairLink(state, pairKey, linkKey, pendingLink);
|
|
129
|
-
|
|
130
|
-
if (pendingLink.group) {
|
|
131
|
-
const pendingGroupState =
|
|
132
|
-
state[pendingPairKey]?.groups?.[pendingLink.group];
|
|
133
|
-
|
|
134
|
-
if (pendingGroupState) {
|
|
135
|
-
writeGroup(
|
|
136
|
-
state,
|
|
137
|
-
pairKey,
|
|
138
|
-
pendingLink.group,
|
|
139
|
-
pendingGroupState.activeId,
|
|
140
|
-
pendingGroupState.initialId,
|
|
141
|
-
);
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
removePairLink(state, pendingPairKey, linkKey);
|
|
146
|
-
};
|
|
147
|
-
|
|
148
247
|
function setSource(
|
|
149
248
|
pairKey: ScreenPairKey,
|
|
150
249
|
tag: TagID,
|
|
@@ -152,8 +251,7 @@ function setSource(
|
|
|
152
251
|
bounds: MeasuredDimensions,
|
|
153
252
|
styles: StyleProps = {},
|
|
154
253
|
group?: GroupKey,
|
|
155
|
-
|
|
156
|
-
sourceHost?: SourceHostRef,
|
|
254
|
+
runtimeFlags: BoundaryRuntimeFlags = {},
|
|
157
255
|
) {
|
|
158
256
|
"worklet";
|
|
159
257
|
pairs.modify(<T extends LinkPairsState>(state: T): T => {
|
|
@@ -164,13 +262,8 @@ function setSource(
|
|
|
164
262
|
|
|
165
263
|
const existingLink = pairLinks[linkKey];
|
|
166
264
|
|
|
167
|
-
// Refresh paths may re-measure the source without portal context;
|
|
168
|
-
// keep the previously recorded host in that case.
|
|
169
265
|
const source: SourceTagLinkSide = {
|
|
170
|
-
...createLinkSide(screenKey, bounds, styles),
|
|
171
|
-
portalAttachTarget:
|
|
172
|
-
portalAttachTarget ?? existingLink?.source?.portalAttachTarget,
|
|
173
|
-
sourceHost: sourceHost ?? existingLink?.source?.sourceHost,
|
|
266
|
+
...createLinkSide(screenKey, bounds, styles, runtimeFlags),
|
|
174
267
|
};
|
|
175
268
|
const link =
|
|
176
269
|
existingLink ??
|
|
@@ -184,15 +277,13 @@ function setSource(
|
|
|
184
277
|
|
|
185
278
|
link.group = group ?? link.group;
|
|
186
279
|
link.source = source;
|
|
187
|
-
link.initialSource
|
|
280
|
+
if (!link.initialSource) {
|
|
281
|
+
link.initialSource = source;
|
|
282
|
+
}
|
|
188
283
|
syncLinkStatus(link);
|
|
189
284
|
|
|
190
285
|
pairLinks[linkKey] = link;
|
|
191
|
-
|
|
192
|
-
const pendingPairKey = createPendingPairKey(screenKey);
|
|
193
|
-
if (pendingPairKey !== pairKey) {
|
|
194
|
-
removePairLink(state, pendingPairKey, linkKey);
|
|
195
|
-
}
|
|
286
|
+
delete state[pairKey]?.sourceRequests?.[linkKey];
|
|
196
287
|
|
|
197
288
|
return state;
|
|
198
289
|
});
|
|
@@ -210,7 +301,6 @@ function setDestination(
|
|
|
210
301
|
pairs.modify(<T extends LinkPairsState>(state: T): T => {
|
|
211
302
|
"worklet";
|
|
212
303
|
const linkKey = getLinkKeyFromTag(tag);
|
|
213
|
-
promotePendingSource(state, pairKey, linkKey);
|
|
214
304
|
writeDestination(state, pairKey, linkKey, screenKey, bounds, styles, group);
|
|
215
305
|
|
|
216
306
|
return state;
|
|
@@ -226,6 +316,23 @@ function setActiveGroupId(pairKey: ScreenPairKey, group: GroupKey, tag: TagID) {
|
|
|
226
316
|
});
|
|
227
317
|
}
|
|
228
318
|
|
|
319
|
+
function requestSourceMeasure(pairKey: ScreenPairKey, tag: TagID) {
|
|
320
|
+
"worklet";
|
|
321
|
+
pairs.modify(<T extends LinkPairsState>(state: T): T => {
|
|
322
|
+
"worklet";
|
|
323
|
+
const linkKey = getLinkKeyFromTag(tag);
|
|
324
|
+
const link = getPairLink(state, pairKey, linkKey);
|
|
325
|
+
|
|
326
|
+
if (link?.source || state[pairKey]?.sourceRequests?.[linkKey]) {
|
|
327
|
+
return state;
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
ensurePairSourceRequests(state, pairKey)[linkKey] = true;
|
|
331
|
+
|
|
332
|
+
return state;
|
|
333
|
+
});
|
|
334
|
+
}
|
|
335
|
+
|
|
229
336
|
function getActiveGroupId(
|
|
230
337
|
pairKey: ScreenPairKey,
|
|
231
338
|
group: GroupKey,
|
|
@@ -246,20 +353,6 @@ const hasSourceLink = (
|
|
|
246
353
|
return !!link?.source;
|
|
247
354
|
};
|
|
248
355
|
|
|
249
|
-
const getPendingSourceLink = (
|
|
250
|
-
state: LinkPairsState,
|
|
251
|
-
pairKey: ScreenPairKey,
|
|
252
|
-
linkKey: LinkKey,
|
|
253
|
-
): TagLink | null => {
|
|
254
|
-
"worklet";
|
|
255
|
-
const sourceScreenKey = getSourceScreenKeyFromPairKey(pairKey);
|
|
256
|
-
const pendingPairKey = createPendingPairKey(sourceScreenKey);
|
|
257
|
-
|
|
258
|
-
if (pendingPairKey === pairKey) return null;
|
|
259
|
-
|
|
260
|
-
return getPairLink(state, pendingPairKey, linkKey);
|
|
261
|
-
};
|
|
262
|
-
|
|
263
356
|
function getResolvedLink(
|
|
264
357
|
pairKey: ScreenPairKey,
|
|
265
358
|
tag: TagID,
|
|
@@ -268,17 +361,7 @@ function getResolvedLink(
|
|
|
268
361
|
const state = pairs.get();
|
|
269
362
|
const linkKey = getLinkKeyFromTag(tag);
|
|
270
363
|
const group = getGroupKeyFromTag(tag);
|
|
271
|
-
const
|
|
272
|
-
|
|
273
|
-
// Press-triggered zoom captures the source before navigation under a pending
|
|
274
|
-
// source<> pair. If the destination screen has no Boundary.View, nothing
|
|
275
|
-
// promotes that source into source<>destination, but zoom can still animate to
|
|
276
|
-
// its default top target from the pending source bounds.
|
|
277
|
-
const fallbackPendingLink = requestedLink
|
|
278
|
-
? null
|
|
279
|
-
: getPendingSourceLink(state, pairKey, linkKey);
|
|
280
|
-
|
|
281
|
-
const link = requestedLink ?? fallbackPendingLink;
|
|
364
|
+
const link = getPairLink(state, pairKey, linkKey);
|
|
282
365
|
|
|
283
366
|
// Group active ids can update before the new member has a full source/destination
|
|
284
367
|
// link. As soon as the requested member has source bounds, prefer it; only
|
|
@@ -292,9 +375,7 @@ function getResolvedLink(
|
|
|
292
375
|
|
|
293
376
|
const initialId = state[pairKey]?.groups?.[group]?.initialId;
|
|
294
377
|
if (initialId) {
|
|
295
|
-
const initialLink =
|
|
296
|
-
getPairLink(state, pairKey, initialId) ??
|
|
297
|
-
getPendingSourceLink(state, pairKey, initialId);
|
|
378
|
+
const initialLink = getPairLink(state, pairKey, initialId);
|
|
298
379
|
|
|
299
380
|
if (hasSourceLink(initialLink)) {
|
|
300
381
|
return {
|
|
@@ -332,6 +413,7 @@ export {
|
|
|
332
413
|
getLink,
|
|
333
414
|
getResolvedLink,
|
|
334
415
|
getSource,
|
|
416
|
+
requestSourceMeasure,
|
|
335
417
|
setActiveGroupId,
|
|
336
418
|
setDestination,
|
|
337
419
|
setSource,
|
|
@@ -39,8 +39,6 @@ function resolveTransitionPair(
|
|
|
39
39
|
destinationStyles: matchedLink?.destination?.styles ?? null,
|
|
40
40
|
sourceScreenKey: matchedLink?.source?.screenKey ?? null,
|
|
41
41
|
destinationScreenKey: matchedLink?.destination?.screenKey ?? null,
|
|
42
|
-
sourcePortalAttachTarget: matchedLink?.source?.portalAttachTarget,
|
|
43
|
-
sourceHost: matchedLink?.source?.sourceHost,
|
|
44
42
|
};
|
|
45
43
|
}
|
|
46
44
|
|
|
@@ -10,9 +10,27 @@ export type TagID = string;
|
|
|
10
10
|
export type LinkKey = string;
|
|
11
11
|
export type GroupKey = string;
|
|
12
12
|
export type ScreenPairKey = string;
|
|
13
|
-
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* A boundary's identity, carried as one value instead of the
|
|
16
|
+
* `{ tag, linkKey, group }` clump that used to thread through every hook.
|
|
17
|
+
*
|
|
18
|
+
* - `tag`: the combined entry tag (`group:linkKey` when grouped, else `linkKey`).
|
|
19
|
+
* - `linkKey`: the bare member key used to address links within a screen pair.
|
|
20
|
+
* - `group`: the optional collection name.
|
|
21
|
+
*/
|
|
22
|
+
export interface BoundTag {
|
|
23
|
+
tag: string;
|
|
24
|
+
linkKey: LinkKey;
|
|
25
|
+
group?: GroupKey;
|
|
26
|
+
}
|
|
14
27
|
export type { ScreenKey } from "../../types/screen.types";
|
|
15
28
|
|
|
29
|
+
export type BoundaryRuntimeFlags = {
|
|
30
|
+
handoff?: boolean;
|
|
31
|
+
escapeClipping?: boolean;
|
|
32
|
+
};
|
|
33
|
+
|
|
16
34
|
type BoundaryConfig = {
|
|
17
35
|
anchor?: BoundsAnchor;
|
|
18
36
|
scaleMode?: BoundsScaleMode;
|
|
@@ -24,7 +42,7 @@ export type Entry = {
|
|
|
24
42
|
bounds: MeasuredDimensions | null;
|
|
25
43
|
styles: StyleProps;
|
|
26
44
|
boundaryConfig?: BoundaryConfig;
|
|
27
|
-
};
|
|
45
|
+
} & BoundaryRuntimeFlags;
|
|
28
46
|
|
|
29
47
|
export type MeasuredEntry = Entry & {
|
|
30
48
|
bounds: MeasuredDimensions;
|
|
@@ -34,6 +52,8 @@ export type EntryPatch = {
|
|
|
34
52
|
bounds?: MeasuredDimensions | null;
|
|
35
53
|
styles?: StyleProps | null;
|
|
36
54
|
boundaryConfig?: BoundaryConfig | null;
|
|
55
|
+
handoff?: boolean | null;
|
|
56
|
+
escapeClipping?: boolean | null;
|
|
37
57
|
};
|
|
38
58
|
|
|
39
59
|
export type ScreenIdentifier = {
|
|
@@ -46,24 +66,7 @@ export type BoundsLinkStatus =
|
|
|
46
66
|
| "complete";
|
|
47
67
|
|
|
48
68
|
export type TagLinkSide = ScreenIdentifier & MeasuredEntry;
|
|
49
|
-
|
|
50
|
-
/**
|
|
51
|
-
* The source screen's active portal host at measure time. Recorded only when
|
|
52
|
-
* that host captures scroll (a Transition.ScrollView scope) — matched-screen
|
|
53
|
-
* placement uses it as a coordinate space to express the source rect in the
|
|
54
|
-
* source ScrollView's live frame. The portal never attaches here.
|
|
55
|
-
*/
|
|
56
|
-
export type SourceHostRef = {
|
|
57
|
-
hostKey: string;
|
|
58
|
-
capturesScroll: boolean;
|
|
59
|
-
};
|
|
60
|
-
|
|
61
|
-
export type SourceTagLinkSide = TagLinkSide & {
|
|
62
|
-
/** Where this boundary's portal content renders during the transition. */
|
|
63
|
-
portalAttachTarget?: BoundsPortalAttachTarget;
|
|
64
|
-
/** Scroll-scoped host the source originated from, if any. */
|
|
65
|
-
sourceHost?: SourceHostRef;
|
|
66
|
-
};
|
|
69
|
+
export type SourceTagLinkSide = TagLinkSide;
|
|
67
70
|
|
|
68
71
|
type TagLinkBase = {
|
|
69
72
|
group?: GroupKey;
|
|
@@ -114,8 +117,6 @@ export type ResolvedTransitionPair = {
|
|
|
114
117
|
destinationStyles: StyleProps | null;
|
|
115
118
|
sourceScreenKey: ScreenKey | null;
|
|
116
119
|
destinationScreenKey: ScreenKey | null;
|
|
117
|
-
sourcePortalAttachTarget?: BoundsPortalAttachTarget;
|
|
118
|
-
sourceHost?: SourceHostRef;
|
|
119
120
|
};
|
|
120
121
|
|
|
121
122
|
export type LinkGroupState = {
|
|
@@ -126,6 +127,7 @@ export type LinkGroupState = {
|
|
|
126
127
|
export type LinkPairState = {
|
|
127
128
|
links: Record<LinkKey, TagLink>;
|
|
128
129
|
groups: Record<GroupKey, LinkGroupState>;
|
|
130
|
+
sourceRequests?: Record<LinkKey, true>;
|
|
129
131
|
};
|
|
130
132
|
|
|
131
133
|
export type LinkPairsState = Record<ScreenPairKey, LinkPairState>;
|
|
@@ -51,6 +51,7 @@ export interface SystemStoreActions {
|
|
|
51
51
|
clearLifecycleTransitionRequest(): void;
|
|
52
52
|
blockLifecycleStart(): void;
|
|
53
53
|
unblockLifecycleStart(): void;
|
|
54
|
+
drainLifecycleStartBlocks(): void;
|
|
54
55
|
}
|
|
55
56
|
|
|
56
57
|
export type SystemStoreMap = SystemStoreState & {
|
|
@@ -108,5 +109,10 @@ export const SystemStore = createStore<SystemStoreState, SystemStoreActions>({
|
|
|
108
109
|
Math.max(0, bag.pendingLifecycleStartBlockCount.get() - 1),
|
|
109
110
|
);
|
|
110
111
|
},
|
|
112
|
+
|
|
113
|
+
drainLifecycleStartBlocks() {
|
|
114
|
+
"worklet";
|
|
115
|
+
bag.pendingLifecycleStartBlockCount.set(0);
|
|
116
|
+
},
|
|
111
117
|
}),
|
|
112
118
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { TextStyle, ViewStyle } from "react-native";
|
|
2
|
-
import type { StyleProps } from "react-native-reanimated";
|
|
2
|
+
import type { StyleProps, TransformArrayItem } from "react-native-reanimated";
|
|
3
3
|
import type { EdgeInsets } from "react-native-safe-area-context";
|
|
4
4
|
import {
|
|
5
5
|
NAVIGATION_MASK_CONTAINER_STYLE_ID,
|
|
@@ -223,6 +223,12 @@ export interface ScreenInterpolationProps {
|
|
|
223
223
|
*/
|
|
224
224
|
progress: number;
|
|
225
225
|
|
|
226
|
+
/**
|
|
227
|
+
* Combined transition progress of current and next screens, without live
|
|
228
|
+
* gesture contribution.
|
|
229
|
+
*/
|
|
230
|
+
transitionProgress: number;
|
|
231
|
+
|
|
226
232
|
/**
|
|
227
233
|
* Accumulated progress from the current screen's position onwards in the stack.
|
|
228
234
|
* Unlike `progress` (0-2), this ranges from 0-N where N is the number of screens
|
|
@@ -346,6 +352,7 @@ export type TransitionInterpolatorOptions = Omit<
|
|
|
346
352
|
export type NormalizedTransitionSlotStyle = {
|
|
347
353
|
style?: StyleProps;
|
|
348
354
|
props?: TransitionSlotProps;
|
|
355
|
+
boundsLocalTransform?: TransformArrayItem[];
|
|
349
356
|
};
|
|
350
357
|
|
|
351
358
|
/**
|