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
|
@@ -8,6 +8,7 @@ exports.getDestination = getDestination;
|
|
|
8
8
|
exports.getLink = getLink;
|
|
9
9
|
exports.getResolvedLink = getResolvedLink;
|
|
10
10
|
exports.getSource = getSource;
|
|
11
|
+
exports.requestSourceMeasure = requestSourceMeasure;
|
|
11
12
|
exports.setActiveGroupId = setActiveGroupId;
|
|
12
13
|
exports.setDestination = setDestination;
|
|
13
14
|
exports.setSource = setSource;
|
|
@@ -18,13 +19,118 @@ const syncLinkStatus = link => {
|
|
|
18
19
|
|
|
19
20
|
link.status = link.source ? link.destination ? "complete" : "destination-incomplete" : "source-incomplete";
|
|
20
21
|
};
|
|
21
|
-
const
|
|
22
|
+
const isSharedValueLike = value => {
|
|
23
|
+
"worklet";
|
|
24
|
+
|
|
25
|
+
return value?._isReanimatedSharedValue === true;
|
|
26
|
+
};
|
|
27
|
+
const snapshotSharedValue = value => {
|
|
28
|
+
"worklet";
|
|
29
|
+
|
|
30
|
+
return value.value;
|
|
31
|
+
};
|
|
32
|
+
const snapshotTransformArrayValue = value => {
|
|
33
|
+
"worklet";
|
|
34
|
+
|
|
35
|
+
const snapshot = [];
|
|
36
|
+
for (let index = 0; index < value.length; index++) {
|
|
37
|
+
const snapshotValue = snapshotTransformEntryValue(value[index]);
|
|
38
|
+
if (snapshotValue !== undefined) {
|
|
39
|
+
snapshot.push(snapshotValue);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
return snapshot;
|
|
43
|
+
};
|
|
44
|
+
const snapshotTransformEntryValue = value => {
|
|
45
|
+
"worklet";
|
|
46
|
+
|
|
47
|
+
if (isSharedValueLike(value)) {
|
|
48
|
+
return snapshotSharedValue(value);
|
|
49
|
+
}
|
|
50
|
+
if (Array.isArray(value)) {
|
|
51
|
+
return snapshotTransformArrayValue(value);
|
|
52
|
+
}
|
|
53
|
+
if (typeof value === "function") {
|
|
54
|
+
return undefined;
|
|
55
|
+
}
|
|
56
|
+
return value === null || typeof value !== "object" ? value : undefined;
|
|
57
|
+
};
|
|
58
|
+
const snapshotTransformItem = value => {
|
|
59
|
+
"worklet";
|
|
60
|
+
|
|
61
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) {
|
|
62
|
+
return snapshotTransformEntryValue(value);
|
|
63
|
+
}
|
|
64
|
+
const snapshot = {};
|
|
65
|
+
const source = value;
|
|
66
|
+
let hasValue = false;
|
|
67
|
+
for (const key in source) {
|
|
68
|
+
const snapshotValue = snapshotTransformEntryValue(source[key]);
|
|
69
|
+
if (snapshotValue !== undefined) {
|
|
70
|
+
snapshot[key] = snapshotValue;
|
|
71
|
+
hasValue = true;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
return hasValue ? snapshot : undefined;
|
|
75
|
+
};
|
|
76
|
+
const snapshotTransform = value => {
|
|
77
|
+
"worklet";
|
|
78
|
+
|
|
79
|
+
if (!Array.isArray(value)) {
|
|
80
|
+
return undefined;
|
|
81
|
+
}
|
|
82
|
+
const snapshot = [];
|
|
83
|
+
for (let index = 0; index < value.length; index++) {
|
|
84
|
+
const snapshotValue = snapshotTransformItem(value[index]);
|
|
85
|
+
if (snapshotValue !== undefined) {
|
|
86
|
+
snapshot.push(snapshotValue);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
return snapshot;
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Link styles are measurement metadata, not a general style serializer.
|
|
94
|
+
* Snapshot only the fields bounds currently consume: primitives, top-level
|
|
95
|
+
* shared values, and transform entries. Object-valued non-transform styles are
|
|
96
|
+
* intentionally omitted to avoid retaining opaque/native style objects.
|
|
97
|
+
*/
|
|
98
|
+
const snapshotStyles = styles => {
|
|
99
|
+
"worklet";
|
|
100
|
+
|
|
101
|
+
if (!styles || typeof styles !== "object" || Array.isArray(styles)) {
|
|
102
|
+
return {};
|
|
103
|
+
}
|
|
104
|
+
const snapshot = {};
|
|
105
|
+
const source = styles;
|
|
106
|
+
for (const key in source) {
|
|
107
|
+
const value = source[key];
|
|
108
|
+
if (key === "transform") {
|
|
109
|
+
const transform = snapshotTransform(value);
|
|
110
|
+
if (transform !== undefined) {
|
|
111
|
+
snapshot.transform = transform;
|
|
112
|
+
}
|
|
113
|
+
continue;
|
|
114
|
+
}
|
|
115
|
+
if (isSharedValueLike(value)) {
|
|
116
|
+
snapshot[key] = snapshotSharedValue(value);
|
|
117
|
+
continue;
|
|
118
|
+
}
|
|
119
|
+
if (value === null || typeof value !== "object") {
|
|
120
|
+
snapshot[key] = value;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
return snapshot;
|
|
124
|
+
};
|
|
125
|
+
const createLinkSide = (screenKey, bounds, styles, runtimeFlags = {}) => {
|
|
22
126
|
"worklet";
|
|
23
127
|
|
|
24
128
|
return {
|
|
25
129
|
screenKey,
|
|
26
130
|
bounds,
|
|
27
|
-
styles
|
|
131
|
+
styles: snapshotStyles(styles),
|
|
132
|
+
handoff: runtimeFlags.handoff ? true : undefined,
|
|
133
|
+
escapeClipping: runtimeFlags.escapeClipping ? true : undefined
|
|
28
134
|
};
|
|
29
135
|
};
|
|
30
136
|
const writePairLink = (state, pairKey, linkKey, link) => {
|
|
@@ -55,32 +161,16 @@ const writeDestination = (state, pairKey, linkKey, screenKey, bounds, styles, gr
|
|
|
55
161
|
};
|
|
56
162
|
link.group = group ?? link.group;
|
|
57
163
|
link.destination = destination;
|
|
58
|
-
link.initialDestination
|
|
164
|
+
if (!link.initialDestination) {
|
|
165
|
+
link.initialDestination = destination;
|
|
166
|
+
}
|
|
59
167
|
syncLinkStatus(link);
|
|
60
168
|
writePairLink(state, pairKey, linkKey, link);
|
|
61
169
|
if (link.group) {
|
|
62
170
|
writeGroup(state, pairKey, link.group, linkKey);
|
|
63
171
|
}
|
|
64
172
|
};
|
|
65
|
-
|
|
66
|
-
"worklet";
|
|
67
|
-
|
|
68
|
-
if ((0, _linkPairs.getLink)(state, pairKey, linkKey)) return;
|
|
69
|
-
const sourceScreenKey = (0, _linkPairs.getSourceScreenKeyFromPairKey)(pairKey);
|
|
70
|
-
const pendingPairKey = (0, _linkPairs.createPendingPairKey)(sourceScreenKey);
|
|
71
|
-
if (pendingPairKey === pairKey) return;
|
|
72
|
-
const pendingLink = (0, _linkPairs.getLink)(state, pendingPairKey, linkKey);
|
|
73
|
-
if (!pendingLink) return;
|
|
74
|
-
writePairLink(state, pairKey, linkKey, pendingLink);
|
|
75
|
-
if (pendingLink.group) {
|
|
76
|
-
const pendingGroupState = state[pendingPairKey]?.groups?.[pendingLink.group];
|
|
77
|
-
if (pendingGroupState) {
|
|
78
|
-
writeGroup(state, pairKey, pendingLink.group, pendingGroupState.activeId, pendingGroupState.initialId);
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
(0, _linkPairs.removePairLink)(state, pendingPairKey, linkKey);
|
|
82
|
-
};
|
|
83
|
-
function setSource(pairKey, tag, screenKey, bounds, styles = {}, group, portalAttachTarget, sourceHost) {
|
|
173
|
+
function setSource(pairKey, tag, screenKey, bounds, styles = {}, group, runtimeFlags = {}) {
|
|
84
174
|
"worklet";
|
|
85
175
|
|
|
86
176
|
_state.pairs.modify(state => {
|
|
@@ -89,13 +179,8 @@ function setSource(pairKey, tag, screenKey, bounds, styles = {}, group, portalAt
|
|
|
89
179
|
const linkKey = (0, _linkPairs.getLinkKeyFromTag)(tag);
|
|
90
180
|
const pairLinks = (0, _linkPairs.ensurePairLinks)(state, pairKey);
|
|
91
181
|
const existingLink = pairLinks[linkKey];
|
|
92
|
-
|
|
93
|
-
// Refresh paths may re-measure the source without portal context;
|
|
94
|
-
// keep the previously recorded host in that case.
|
|
95
182
|
const source = {
|
|
96
|
-
...createLinkSide(screenKey, bounds, styles)
|
|
97
|
-
portalAttachTarget: portalAttachTarget ?? existingLink?.source?.portalAttachTarget,
|
|
98
|
-
sourceHost: sourceHost ?? existingLink?.source?.sourceHost
|
|
183
|
+
...createLinkSide(screenKey, bounds, styles, runtimeFlags)
|
|
99
184
|
};
|
|
100
185
|
const link = existingLink ?? {
|
|
101
186
|
group,
|
|
@@ -106,13 +191,12 @@ function setSource(pairKey, tag, screenKey, bounds, styles = {}, group, portalAt
|
|
|
106
191
|
};
|
|
107
192
|
link.group = group ?? link.group;
|
|
108
193
|
link.source = source;
|
|
109
|
-
link.initialSource
|
|
194
|
+
if (!link.initialSource) {
|
|
195
|
+
link.initialSource = source;
|
|
196
|
+
}
|
|
110
197
|
syncLinkStatus(link);
|
|
111
198
|
pairLinks[linkKey] = link;
|
|
112
|
-
|
|
113
|
-
if (pendingPairKey !== pairKey) {
|
|
114
|
-
(0, _linkPairs.removePairLink)(state, pendingPairKey, linkKey);
|
|
115
|
-
}
|
|
199
|
+
delete state[pairKey]?.sourceRequests?.[linkKey];
|
|
116
200
|
return state;
|
|
117
201
|
});
|
|
118
202
|
}
|
|
@@ -123,7 +207,6 @@ function setDestination(pairKey, tag, screenKey, bounds, styles = {}, group) {
|
|
|
123
207
|
"worklet";
|
|
124
208
|
|
|
125
209
|
const linkKey = (0, _linkPairs.getLinkKeyFromTag)(tag);
|
|
126
|
-
promotePendingSource(state, pairKey, linkKey);
|
|
127
210
|
writeDestination(state, pairKey, linkKey, screenKey, bounds, styles, group);
|
|
128
211
|
return state;
|
|
129
212
|
});
|
|
@@ -138,6 +221,21 @@ function setActiveGroupId(pairKey, group, tag) {
|
|
|
138
221
|
return state;
|
|
139
222
|
});
|
|
140
223
|
}
|
|
224
|
+
function requestSourceMeasure(pairKey, tag) {
|
|
225
|
+
"worklet";
|
|
226
|
+
|
|
227
|
+
_state.pairs.modify(state => {
|
|
228
|
+
"worklet";
|
|
229
|
+
|
|
230
|
+
const linkKey = (0, _linkPairs.getLinkKeyFromTag)(tag);
|
|
231
|
+
const link = (0, _linkPairs.getLink)(state, pairKey, linkKey);
|
|
232
|
+
if (link?.source || state[pairKey]?.sourceRequests?.[linkKey]) {
|
|
233
|
+
return state;
|
|
234
|
+
}
|
|
235
|
+
(0, _linkPairs.ensurePairSourceRequests)(state, pairKey)[linkKey] = true;
|
|
236
|
+
return state;
|
|
237
|
+
});
|
|
238
|
+
}
|
|
141
239
|
function getActiveGroupId(pairKey, group) {
|
|
142
240
|
"worklet";
|
|
143
241
|
|
|
@@ -153,28 +251,13 @@ const hasSourceLink = link => {
|
|
|
153
251
|
|
|
154
252
|
return !!link?.source;
|
|
155
253
|
};
|
|
156
|
-
const getPendingSourceLink = (state, pairKey, linkKey) => {
|
|
157
|
-
"worklet";
|
|
158
|
-
|
|
159
|
-
const sourceScreenKey = (0, _linkPairs.getSourceScreenKeyFromPairKey)(pairKey);
|
|
160
|
-
const pendingPairKey = (0, _linkPairs.createPendingPairKey)(sourceScreenKey);
|
|
161
|
-
if (pendingPairKey === pairKey) return null;
|
|
162
|
-
return (0, _linkPairs.getLink)(state, pendingPairKey, linkKey);
|
|
163
|
-
};
|
|
164
254
|
function getResolvedLink(pairKey, tag) {
|
|
165
255
|
"worklet";
|
|
166
256
|
|
|
167
257
|
const state = _state.pairs.get();
|
|
168
258
|
const linkKey = (0, _linkPairs.getLinkKeyFromTag)(tag);
|
|
169
259
|
const group = (0, _linkPairs.getGroupKeyFromTag)(tag);
|
|
170
|
-
const
|
|
171
|
-
|
|
172
|
-
// Press-triggered zoom captures the source before navigation under a pending
|
|
173
|
-
// source<> pair. If the destination screen has no Boundary.View, nothing
|
|
174
|
-
// promotes that source into source<>destination, but zoom can still animate to
|
|
175
|
-
// its default top target from the pending source bounds.
|
|
176
|
-
const fallbackPendingLink = requestedLink ? null : getPendingSourceLink(state, pairKey, linkKey);
|
|
177
|
-
const link = requestedLink ?? fallbackPendingLink;
|
|
260
|
+
const link = (0, _linkPairs.getLink)(state, pairKey, linkKey);
|
|
178
261
|
|
|
179
262
|
// Group active ids can update before the new member has a full source/destination
|
|
180
263
|
// link. As soon as the requested member has source bounds, prefer it; only
|
|
@@ -187,7 +270,7 @@ function getResolvedLink(pairKey, tag) {
|
|
|
187
270
|
}
|
|
188
271
|
const initialId = state[pairKey]?.groups?.[group]?.initialId;
|
|
189
272
|
if (initialId) {
|
|
190
|
-
const initialLink = (0, _linkPairs.getLink)(state, pairKey, initialId)
|
|
273
|
+
const initialLink = (0, _linkPairs.getLink)(state, pairKey, initialId);
|
|
191
274
|
if (hasSourceLink(initialLink)) {
|
|
192
275
|
return {
|
|
193
276
|
tag: (0, _linkPairs.createGroupTag)(group, initialId),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_linkPairs","require","_state","syncLinkStatus","link","status","source","destination","
|
|
1
|
+
{"version":3,"names":["_linkPairs","require","_state","syncLinkStatus","link","status","source","destination","isSharedValueLike","value","_isReanimatedSharedValue","snapshotSharedValue","snapshotTransformArrayValue","snapshot","index","length","snapshotValue","snapshotTransformEntryValue","undefined","push","Array","isArray","snapshotTransformItem","hasValue","key","snapshotTransform","snapshotStyles","styles","transform","createLinkSide","screenKey","bounds","runtimeFlags","handoff","escapeClipping","writePairLink","state","pairKey","linkKey","ensurePairLinks","writeGroup","group","activeId","initialId","previousInitialId","groups","ensurePairGroups","writeDestination","existingLink","getPairLink","initialDestination","setSource","tag","pairs","modify","getLinkKeyFromTag","pairLinks","initialSource","sourceRequests","setDestination","setActiveGroupId","requestSourceMeasure","ensurePairSourceRequests","getActiveGroupId","getPairActiveGroupId","get","getLink","hasSourceLink","getResolvedLink","getGroupKeyFromTag","initialLink","createGroupTag","getSource","getPairSource","getDestination","getPairDestination"],"sourceRoot":"../../../../../../src","sources":["shared/stores/bounds/internals/links.ts"],"mappings":";;;;;;;;;;;;;;AACA,IAAAA,UAAA,GAAAC,OAAA;AAuBA,IAAAC,MAAA,GAAAD,OAAA;AAEA,MAAME,cAAc,GAAIC,IAAa,IAAK;EACzC,SAAS;;EACTA,IAAI,CAACC,MAAM,GAAGD,IAAI,CAACE,MAAM,GACtBF,IAAI,CAACG,WAAW,GACf,UAAU,GACV,wBAAwB,GACzB,mBAAmB;AACvB,CAAC;AAQD,MAAMC,iBAAiB,GAAIC,KAAc,IAA+B;EACvE,SAAS;;EACT,OACEA,KAAK,EAAsCC,wBAAwB,KACpE,IAAI;AAEN,CAAC;AAED,MAAMC,mBAAmB,GAAIF,KAAsB,IAAc;EAChE,SAAS;;EACT,OAAOA,KAAK,CAACA,KAAK;AACnB,CAAC;AAED,MAAMG,2BAA2B,GAChCH,KAAgB,IACW;EAC3B,SAAS;;EACT,MAAMI,QAAmB,GAAG,EAAE;EAE9B,KAAK,IAAIC,KAAK,GAAG,CAAC,EAAEA,KAAK,GAAGL,KAAK,CAACM,MAAM,EAAED,KAAK,EAAE,EAAE;IAClD,MAAME,aAAa,GAAGC,2BAA2B,CAACR,KAAK,CAACK,KAAK,CAAC,CAAC;IAC/D,IAAIE,aAAa,KAAKE,SAAS,EAAE;MAChCL,QAAQ,CAACM,IAAI,CAACH,aAAa,CAAC;IAC7B;EACD;EAEA,OAAOH,QAAQ;AAChB,CAAC;AAED,MAAMI,2BAA2B,GAAIR,KAAc,IAAc;EAChE,SAAS;;EACT,IAAID,iBAAiB,CAACC,KAAK,CAAC,EAAE;IAC7B,OAAOE,mBAAmB,CAACF,KAAK,CAAC;EAClC;EAEA,IAAIW,KAAK,CAACC,OAAO,CAACZ,K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,CAAC,EAAEE,SAAS;EAC5D,IAAIA,SAAS,EAAE;IACd,MAAM2B,WAAW,GAAG,IAAArB,kBAAW,EAACb,KAAK,EAAEC,OAAO,EAAEM,SAAS,CAAC;IAE1D,IAAIwB,aAAa,CAACG,WAAW,CAAC,EAAE;MAC/B,OAAO;QACNlB,GAAG,EAAE,IAAAmB,yBAAc,EAAC9B,KAAK,EAAEE,SAAS,CAAC;QACrCvC,IAAI,EAAEkE;MACP,CAAC;IACF;EACD;EAEA,OAAO;IACNlB,GAAG;IACHhD;EACD,CAAC;AACF;AAEA,SAASoE,SAASA,CACjBnC,OAAsB,EACtBe,GAAU,EACiB;EAC3B,SAAS;;EACT,OAAO,IAAAqB,oBAAa,EAACpB,YAAK,CAACY,GAAG,CAAC,CAAC,EAAE5B,OAAO,EAAE,IAAAkB,4BAAiB,EAACH,GAAG,CAAC,CAAC;AACnE;AAEA,SAASsB,cAAcA,CACtBrC,OAAsB,EACtBe,GAAU,EACsB;EAChC,SAAS;;EACT,OAAO,IAAAuB,yBAAkB,EAACtB,YAAK,CAACY,GAAG,CAAC,CAAC,EAAE5B,OAAO,EAAE,IAAAkB,4BAAiB,EAACH,GAAG,CAAC,CAAC;AACxE","ignoreList":[]}
|
|
@@ -27,9 +27,7 @@ function resolveTransitionPair(tag, context) {
|
|
|
27
27
|
sourceStyles: matchedLink?.source?.styles ?? null,
|
|
28
28
|
destinationStyles: matchedLink?.destination?.styles ?? null,
|
|
29
29
|
sourceScreenKey: matchedLink?.source?.screenKey ?? null,
|
|
30
|
-
destinationScreenKey: matchedLink?.destination?.screenKey ?? null
|
|
31
|
-
sourcePortalAttachTarget: matchedLink?.source?.portalAttachTarget,
|
|
32
|
-
sourceHost: matchedLink?.source?.sourceHost
|
|
30
|
+
destinationScreenKey: matchedLink?.destination?.screenKey ?? null
|
|
33
31
|
};
|
|
34
32
|
}
|
|
35
33
|
//# sourceMappingURL=resolver.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_linkPairs","require","_links","resolvePairKey","context","entering","previousScreenKey","currentScreenKey","createScreenPairKey","nextScreenKey","resolveTransitionPair","tag","pairKey","matchedLink","getResolvedLink","link","sourceBounds","source","bounds","destinationBounds","destination","sourceStyles","styles","destinationStyles","sourceScreenKey","screenKey","destinationScreenKey"
|
|
1
|
+
{"version":3,"names":["_linkPairs","require","_links","resolvePairKey","context","entering","previousScreenKey","currentScreenKey","createScreenPairKey","nextScreenKey","resolveTransitionPair","tag","pairKey","matchedLink","getResolvedLink","link","sourceBounds","source","bounds","destinationBounds","destination","sourceStyles","styles","destinationStyles","sourceScreenKey","screenKey","destinationScreenKey"],"sourceRoot":"../../../../../../src","sources":["shared/stores/bounds/internals/resolver.ts"],"mappings":";;;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;AAOA,IAAAC,MAAA,GAAAD,OAAA;AAEA,SAASE,cAAcA,CACtBC,OAAiC,EACV;EACvB,SAAS;;EAET,IAAIA,OAAO,CAACC,QAAQ,EAAE;IACrB,IAAI,CAACD,OAAO,CAACE,iBAAiB,IAAI,CAACF,OAAO,CAACG,gBAAgB,EAAE,OAAO,IAAI;IACxE,OAAO,IAAAC,8BAAmB,EACzBJ,OAAO,CAACE,iBAAiB,EACzBF,OAAO,CAACG,gBACT,CAAC;EACF;EAEA,IAAI,CAACH,OAAO,CAACG,gBAAgB,IAAI,CAACH,OAAO,CAACK,aAAa,EAAE,OAAO,IAAI;EACpE,OAAO,IAAAD,8BAAmB,EAACJ,OAAO,CAACG,gBAAgB,EAAEH,OAAO,CAACK,aAAa,CAAC;AAC5E;AAEA,SAASC,qBAAqBA,CAC7BC,GAAU,EACVP,OAAiC,EACR;EACzB,SAAS;;EACT,MAAMQ,OAAO,GAAGT,cAAc,CAACC,OAAO,CAAC;EACvC,MAAMS,WAAW,GAAGD,OAAO,GAAG,IAAAE,sBAAe,EAACF,OAAO,EAAED,GAAG,CAAC,CAACI,IAAI,GAAG,IAAI;EAEvE,OAAO;IACNC,YAAY,EAAEH,WAAW,EAAEI,MAAM,EAAEC,MAAM,IAAI,IAAI;IACjDC,iBAAiB,EAAEN,WAAW,EAAEO,WAAW,EAAEF,MAAM,IAAI,IAAI;IAC3DG,YAAY,EAAER,WAAW,EAAEI,MAAM,EAAEK,MAAM,IAAI,IAAI;IACjDC,iBAAiB,EAAEV,WAAW,EAAEO,WAAW,EAAEE,MAAM,IAAI,IAAI;IAC3DE,eAAe,EAAEX,WAAW,EAAEI,MAAM,EAAEQ,SAAS,IAAI,IAAI;IACvDC,oBAAoB,EAAEb,WAAW,EAAEO,WAAW,EAAEK,SAAS,IAAI;EAC9D,CAAC;AACF","ignoreList":[]}
|
|
@@ -58,6 +58,11 @@ const SystemStore = exports.SystemStore = (0, _createStore.createStore)({
|
|
|
58
58
|
"worklet";
|
|
59
59
|
|
|
60
60
|
bag.pendingLifecycleStartBlockCount.set(Math.max(0, bag.pendingLifecycleStartBlockCount.get() - 1));
|
|
61
|
+
},
|
|
62
|
+
drainLifecycleStartBlocks() {
|
|
63
|
+
"worklet";
|
|
64
|
+
|
|
65
|
+
bag.pendingLifecycleStartBlockCount.set(0);
|
|
61
66
|
}
|
|
62
67
|
})
|
|
63
68
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNativeReanimated","require","_createStore","LifecycleTransitionRequestKind","exports","SystemStore","createStore","createBag","targetProgress","makeMutable","resolvedAutoSnapPoint","measuredContentLayout","pendingLifecycleRequestKind","None","pendingLifecycleRequestTarget","pendingLifecycleStartBlockCount","disposeBag","bag","cancelAnimation","actions","requestLifecycleTransition","kind","target","set","clearLifecycleTransitionRequest","blockLifecycleStart","get","unblockLifecycleStart","Math","max"],"sourceRoot":"../../../../src","sources":["shared/stores/system.store.ts"],"mappings":";;;;;;AAAA,IAAAA,sBAAA,GAAAC,OAAA;AAMA,IAAAC,YAAA,GAAAD,OAAA;AAAoD,IAExCE,8BAA8B,GAAAC,OAAA,CAAAD,8BAAA,0BAA9BA,8BAA8B;EAA9BA,8BAA8B,CAA9BA,8BAA8B;EAA9BA,8BAA8B,CAA9BA,8BAA8B;EAA9BA,8BAA8B,CAA9BA,8BAA8B;EAA9BA,8BAA8B,CAA9BA,8BAA8B;EAAA,OAA9BA,8BAA8B;AAAA;
|
|
1
|
+
{"version":3,"names":["_reactNativeReanimated","require","_createStore","LifecycleTransitionRequestKind","exports","SystemStore","createStore","createBag","targetProgress","makeMutable","resolvedAutoSnapPoint","measuredContentLayout","pendingLifecycleRequestKind","None","pendingLifecycleRequestTarget","pendingLifecycleStartBlockCount","disposeBag","bag","cancelAnimation","actions","requestLifecycleTransition","kind","target","set","clearLifecycleTransitionRequest","blockLifecycleStart","get","unblockLifecycleStart","Math","max","drainLifecycleStartBlocks"],"sourceRoot":"../../../../src","sources":["shared/stores/system.store.ts"],"mappings":";;;;;;AAAA,IAAAA,sBAAA,GAAAC,OAAA;AAMA,IAAAC,YAAA,GAAAD,OAAA;AAAoD,IAExCE,8BAA8B,GAAAC,OAAA,CAAAD,8BAAA,0BAA9BA,8BAA8B;EAA9BA,8BAA8B,CAA9BA,8BAA8B;EAA9BA,8BAA8B,CAA9BA,8BAA8B;EAA9BA,8BAA8B,CAA9BA,8BAA8B;EAA9BA,8BAA8B,CAA9BA,8BAA8B;EAAA,OAA9BA,8BAA8B;AAAA;AAoD1C;AACA;AACA;AACA;AACA;AACA;AACO,MAAME,WAAW,GAAAD,OAAA,CAAAC,WAAA,GAAG,IAAAC,wBAAW,EAAuC;EAC5EC,SAAS,EAAEA,CAAA,MAAO;IACjBC,cAAc,EAAE,IAAAC,kCAAW,EAAC,CAAC,CAAC;IAC9BC,qBAAqB,EAAE,IAAAD,kCAAW,EAAC,CAAC,CAAC,CAAC;IACtCE,qBAAqB,EAAE,IAAAF,kCAAW,EAAgB,IAAI,CAAC;IACvDG,2BAA2B,EAAE,IAAAH,kCAAW,EACvCN,8BAA8B,CAACU,IAChC,CAAC;IACDC,6BAA6B,EAAE,IAAAL,kCAAW,EAA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yBA,CAAA,EAAG;MAC3B,SAAS;;MACTb,GAAG,CAACF,+BAA+B,CAACQ,GAAG,CAAC,CAAC,CAAC;IAC3C;EACD,CAAC;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -5,38 +5,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.computeBoundStyles = void 0;
|
|
7
7
|
var _constants = require("../../../../constants");
|
|
8
|
+
var _linkPairs = require("../../../../stores/bounds/helpers/link-pairs.helpers");
|
|
9
|
+
var _links = require("../../../../stores/bounds/internals/links");
|
|
8
10
|
var _resolver = require("../../../../stores/bounds/internals/resolver");
|
|
9
|
-
var _scroll = require("../../../../stores/scroll.store");
|
|
10
11
|
var _geometry = require("../geometry");
|
|
11
12
|
var _composers = require("./composers");
|
|
12
|
-
|
|
13
|
-
"worklet";
|
|
14
|
-
|
|
15
|
-
return bounds?.scroll ?? null;
|
|
16
|
-
};
|
|
17
|
-
const getScreenScrollMetadata = (screenKey, previous, current, next) => {
|
|
18
|
-
"worklet";
|
|
19
|
-
|
|
20
|
-
if (!screenKey) return null;
|
|
21
|
-
if (previous?.route.key === screenKey) return previous.layouts?.scroll ?? null;
|
|
22
|
-
if (current?.route.key === screenKey) return current.layouts?.scroll ?? null;
|
|
23
|
-
if (next?.route.key === screenKey) return next.layouts?.scroll ?? null;
|
|
24
|
-
return null;
|
|
25
|
-
};
|
|
26
|
-
const shiftBounds = (bounds, dx, dy) => {
|
|
27
|
-
"worklet";
|
|
28
|
-
|
|
29
|
-
if (dx === 0 && dy === 0) {
|
|
30
|
-
return bounds;
|
|
31
|
-
}
|
|
32
|
-
return {
|
|
33
|
-
...bounds,
|
|
34
|
-
x: bounds.x + dx,
|
|
35
|
-
y: bounds.y + dy,
|
|
36
|
-
pageX: bounds.pageX + dx,
|
|
37
|
-
pageY: bounds.pageY + dy
|
|
38
|
-
};
|
|
39
|
-
};
|
|
13
|
+
var _localTransform = require("./local-transform");
|
|
40
14
|
const resolveStartEnd = params => {
|
|
41
15
|
"worklet";
|
|
42
16
|
|
|
@@ -48,6 +22,7 @@ const resolveStartEnd = params => {
|
|
|
48
22
|
const currentScreenKey = params.current?.route.key;
|
|
49
23
|
const previousScreenKey = params.previous?.route.key;
|
|
50
24
|
const nextScreenKey = params.next?.route.key;
|
|
25
|
+
const sourceMeasurePairKey = entering && previousScreenKey && currentScreenKey ? (0, _linkPairs.createScreenPairKey)(previousScreenKey, currentScreenKey) : !entering && currentScreenKey && nextScreenKey ? (0, _linkPairs.createScreenPairKey)(currentScreenKey, nextScreenKey) : null;
|
|
51
26
|
const resolvedPair = params.resolvedPair ?? (0, _resolver.resolveTransitionPair)(String(params.id), {
|
|
52
27
|
currentScreenKey,
|
|
53
28
|
previousScreenKey,
|
|
@@ -57,6 +32,9 @@ const resolveStartEnd = params => {
|
|
|
57
32
|
const sourceBounds = resolvedPair.sourceBounds;
|
|
58
33
|
const destinationBounds = resolvedPair.destinationBounds;
|
|
59
34
|
if (!sourceBounds) {
|
|
35
|
+
if (hasTargetOverride && sourceMeasurePairKey) {
|
|
36
|
+
(0, _links.requestSourceMeasure)(sourceMeasurePairKey, String(params.id));
|
|
37
|
+
}
|
|
60
38
|
return {
|
|
61
39
|
start: null,
|
|
62
40
|
end: null,
|
|
@@ -80,42 +58,7 @@ const resolveStartEnd = params => {
|
|
|
80
58
|
hasTargetOverride
|
|
81
59
|
};
|
|
82
60
|
}
|
|
83
|
-
|
|
84
|
-
/**
|
|
85
|
-
* Teleport continuity: this screen's source content physically renders
|
|
86
|
-
* inside the matched screen's portal host, which travels with that screen's
|
|
87
|
-
* ScrollView. Screen-fixed rects (the source, fullscreen/custom targets)
|
|
88
|
-
* must be expressed in the host's frame by the clamped scroll travel since
|
|
89
|
-
* the destination capture. The destination rect rides with the host, so it
|
|
90
|
-
* stays untouched. Classic two-component links never set a portal host and
|
|
91
|
-
* skip this entirely.
|
|
92
|
-
*/
|
|
93
|
-
const isTeleportedSourceElement = resolvedPair.sourcePortalAttachTarget === "matched-screen" && !!currentScreenKey && currentScreenKey === resolvedPair.sourceScreenKey && !!resolvedPair.destinationScreenKey && currentScreenKey !== resolvedPair.destinationScreenKey && params.computeOptions.method !== "content";
|
|
94
|
-
let teleportShiftX = 0;
|
|
95
|
-
let teleportShiftY = 0;
|
|
96
|
-
let sourceScrollShiftX = 0;
|
|
97
|
-
let sourceScrollShiftY = 0;
|
|
98
|
-
if (isTeleportedSourceElement) {
|
|
99
|
-
const capturedScroll = getBoundsScrollSnapshot(destinationBounds);
|
|
100
|
-
const liveScroll = getScreenScrollMetadata(resolvedPair.destinationScreenKey, params.previous, params.current, params.next);
|
|
101
|
-
teleportShiftX = (0, _scroll.getClampedScrollAxisDelta)(liveScroll, capturedScroll, "horizontal");
|
|
102
|
-
teleportShiftY = (0, _scroll.getClampedScrollAxisDelta)(liveScroll, capturedScroll, "vertical");
|
|
103
|
-
|
|
104
|
-
// A source that lives inside its own scroll host travels with that
|
|
105
|
-
// ScrollView in page space. Shifting the start rect by the clamped source
|
|
106
|
-
// scroll travel keeps it aligned with the live placeholder; the host
|
|
107
|
-
// placement applies the identical shift, so the shifts cancel at full
|
|
108
|
-
// progress and the open frame is untouched. Screen-fixed rects (the
|
|
109
|
-
// fullscreen/custom end targets below) are not inside the scroll content
|
|
110
|
-
// and keep only the destination shift.
|
|
111
|
-
if (resolvedPair.sourceHost?.capturesScroll) {
|
|
112
|
-
const capturedSourceScroll = getBoundsScrollSnapshot(sourceBounds);
|
|
113
|
-
const liveSourceScroll = getScreenScrollMetadata(resolvedPair.sourceScreenKey, params.previous, params.current, params.next);
|
|
114
|
-
sourceScrollShiftX = (0, _scroll.getClampedScrollAxisDelta)(liveSourceScroll, capturedSourceScroll, "horizontal");
|
|
115
|
-
sourceScrollShiftY = (0, _scroll.getClampedScrollAxisDelta)(liveSourceScroll, capturedSourceScroll, "vertical");
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
const start = shiftBounds(sourceBounds, teleportShiftX - sourceScrollShiftX, teleportShiftY - sourceScrollShiftY);
|
|
61
|
+
const start = sourceBounds;
|
|
119
62
|
let end = destinationBounds ?? fullscreen;
|
|
120
63
|
if (isFullscreenTarget) {
|
|
121
64
|
end = fullscreen;
|
|
@@ -124,9 +67,6 @@ const resolveStartEnd = params => {
|
|
|
124
67
|
if (typeof customTarget === "object") {
|
|
125
68
|
end = customTarget;
|
|
126
69
|
}
|
|
127
|
-
if (hasTargetOverride) {
|
|
128
|
-
end = shiftBounds(end, teleportShiftX, teleportShiftY);
|
|
129
|
-
}
|
|
130
70
|
return {
|
|
131
71
|
start,
|
|
132
72
|
end,
|
|
@@ -213,7 +153,8 @@ const computeBoundStyles = ({
|
|
|
213
153
|
};
|
|
214
154
|
const isSize = computeOptions.method === "size";
|
|
215
155
|
const isAbsolute = computeOptions.space === "absolute";
|
|
216
|
-
|
|
156
|
+
const style = isSize ? isAbsolute ? (0, _composers.composeSizeAbsolute)(common) : (0, _composers.composeSizeRelative)(common) : isAbsolute ? (0, _composers.composeTransformAbsolute)(common) : (0, _composers.composeTransformRelative)(common);
|
|
157
|
+
return (0, _localTransform.attachBoundsLocalTransform)(style, entering ? resolvedPair?.destinationStyles ?? null : resolvedPair?.sourceStyles ?? null);
|
|
217
158
|
};
|
|
218
159
|
exports.computeBoundStyles = computeBoundStyles;
|
|
219
160
|
//# sourceMappingURL=compute.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_constants","require","
|
|
1
|
+
{"version":3,"names":["_constants","require","_linkPairs","_links","_resolver","_geometry","_composers","_localTransform","resolveStartEnd","params","entering","next","fullscreen","FULLSCREEN_DIMENSIONS","dimensions","isFullscreenTarget","computeOptions","target","hasCustomTarget","hasTargetOverride","currentScreenKey","current","route","key","previousScreenKey","previous","nextScreenKey","sourceMeasurePairKey","createScreenPairKey","resolvedPair","resolveTransitionPair","String","id","sourceBounds","destinationBounds","requestSourceMeasure","start","end","sourceScreenKey","destinationScreenKey","customTarget","computeBoundStyles","progress","interpolationProps","NO_STYLES","ranges","ENTER_RANGE","EXIT_RANGE","method","currentOwnsSource","contentStart","contentEnd","geometry","computeContentTransformGeometry","anchor","scaleMode","composeContentStyle","computeRelativeGeometry","common","isSize","isAbsolute","space","style","composeSizeAbsolute","composeSizeRelative","composeTransformAbsolute","composeTransformRelative","attachBoundsLocalTransform","destinationStyles","sourceStyles","exports"],"sourceRoot":"../../../../../../../src","sources":["shared/utils/bounds/helpers/styles/compute.ts"],"mappings":";;;;;;AACA,IAAAA,UAAA,GAAAC,OAAA;AAMA,IAAAC,UAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,SAAA,GAAAH,OAAA;AASA,IAAAI,SAAA,GAAAJ,OAAA;AAIA,IAAAK,UAAA,GAAAL,OAAA;AAQA,IAAAM,eAAA,GAAAN,OAAA;AAEA,MAAMO,eAAe,GAAIC,MASxB,IAAK;EACL,SAAS;;EAET,MAAMC,QAAQ,GAAG,CAACD,MAAM,CAACE,IAAI;EAC7B,MAAMC,UAAU,GAAG,IAAAC,gCAAqB,EAACJ,MAAM,CAACK,UAAU,CAAC;EAE3D,MAAMC,kBAAkB,GAAGN,MAAM,CAACO,cAAc,CAACC,MAAM,KAAK,YAAY;EACxE,MAAMC,eAAe,GAAG,OAAOT,MAAM,CAACO,cAAc,CAACC,MAAM,KAAK,QAAQ;EACxE,MAAME,iBAAiB,GAAGJ,kBAAkB,IAAIG,eAAe;EAE/D,MAAME,gBAAgB,GAAGX,MAAM,CAACY,OAAO,EAAEC,KAAK,CAACC,GAAG;EAClD,MAAMC,iBAAiB,GAAGf,MAAM,CAACgB,QAAQ,EAAEH,KAAK,CAACC,GAAG;EACpD,MAAMG,aAAa,GAAGjB,MAAM,CAACE,IAAI,EAAEW,KAAK,CAACC,GAAG;EAC5C,MAAMI,oBAAoB,GACzBjB,QAAQ,IAAIc,iBAAiB,IAAIJ,gBAAgB,GAC9C,IAAAQ,8BAAmB,EAACJ,iBAAi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@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.stripBoundsLocalTransform = exports.getBoundsLocalTransform = exports.attachBoundsLocalTransform = exports.BOUNDS_LOCAL_TRANSFORM_STYLE_KEY = void 0;
|
|
7
|
+
const BOUNDS_LOCAL_TRANSFORM_STYLE_KEY = exports.BOUNDS_LOCAL_TRANSFORM_STYLE_KEY = "__screenTransitionsBoundsLocalTransform";
|
|
8
|
+
const getTransformFromPreparedStyle = style => {
|
|
9
|
+
"worklet";
|
|
10
|
+
|
|
11
|
+
if (style === null || style === undefined || typeof style !== "object" || Array.isArray(style)) {
|
|
12
|
+
return undefined;
|
|
13
|
+
}
|
|
14
|
+
const transform = style.transform;
|
|
15
|
+
return Array.isArray(transform) ? transform : undefined;
|
|
16
|
+
};
|
|
17
|
+
const attachBoundsLocalTransform = (slotStyle, localStyle) => {
|
|
18
|
+
"worklet";
|
|
19
|
+
|
|
20
|
+
const localTransform = getTransformFromPreparedStyle(localStyle);
|
|
21
|
+
if (!localTransform?.length) {
|
|
22
|
+
return slotStyle;
|
|
23
|
+
}
|
|
24
|
+
const next = {};
|
|
25
|
+
const source = slotStyle;
|
|
26
|
+
for (const key in source) {
|
|
27
|
+
next[key] = source[key];
|
|
28
|
+
}
|
|
29
|
+
next[BOUNDS_LOCAL_TRANSFORM_STYLE_KEY] = localTransform;
|
|
30
|
+
return next;
|
|
31
|
+
};
|
|
32
|
+
exports.attachBoundsLocalTransform = attachBoundsLocalTransform;
|
|
33
|
+
const getBoundsLocalTransform = style => {
|
|
34
|
+
"worklet";
|
|
35
|
+
|
|
36
|
+
if (!style) {
|
|
37
|
+
return undefined;
|
|
38
|
+
}
|
|
39
|
+
return style[BOUNDS_LOCAL_TRANSFORM_STYLE_KEY];
|
|
40
|
+
};
|
|
41
|
+
exports.getBoundsLocalTransform = getBoundsLocalTransform;
|
|
42
|
+
const stripBoundsLocalTransform = style => {
|
|
43
|
+
"worklet";
|
|
44
|
+
|
|
45
|
+
if (style[BOUNDS_LOCAL_TRANSFORM_STYLE_KEY] === undefined) {
|
|
46
|
+
return style;
|
|
47
|
+
}
|
|
48
|
+
const rest = {};
|
|
49
|
+
const source = style;
|
|
50
|
+
for (const key in source) {
|
|
51
|
+
if (key === BOUNDS_LOCAL_TRANSFORM_STYLE_KEY) {
|
|
52
|
+
continue;
|
|
53
|
+
}
|
|
54
|
+
rest[key] = source[key];
|
|
55
|
+
}
|
|
56
|
+
return rest;
|
|
57
|
+
};
|
|
58
|
+
exports.stripBoundsLocalTransform = stripBoundsLocalTransform;
|
|
59
|
+
//# sourceMappingURL=local-transform.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["BOUNDS_LOCAL_TRANSFORM_STYLE_KEY","exports","getTransformFromPreparedStyle","style","undefined","Array","isArray","transform","attachBoundsLocalTransform","slotStyle","localStyle","localTransform","length","next","source","key","getBoundsLocalTransform","stripBoundsLocalTransform","rest"],"sourceRoot":"../../../../../../../src","sources":["shared/utils/bounds/helpers/styles/local-transform.ts"],"mappings":";;;;;;AAEO,MAAMA,gCAAgC,GAAAC,OAAA,CAAAD,gCAAA,GAC5C,yCAAyC;AAM1C,MAAME,6BAA6B,GAClCC,KAAc,IACwB;EACtC,SAAS;;EAET,IACCA,KAAK,KAAK,IAAI,IACdA,KAAK,KAAKC,SAAS,IACnB,OAAOD,KAAK,KAAK,QAAQ,IACzBE,KAAK,CAACC,OAAO,CAACH,KAAK,CAAC,EACnB;IACD,OAAOC,SAAS;EACjB;EAEA,MAAMG,SAAS,GAAIJ,KAAK,CAA6BI,SAAS;EAE9D,OAAOF,KAAK,CAACC,OAAO,CAACC,SAAS,CAAC,GAC3BA,SAAS,GACVH,SAAS;AACb,CAAC;AAEM,MAAMI,0BAA0B,GAAGA,CACzCC,SAAqB,EACrBC,UAAyC,KACzB;EAChB,SAAS;;EACT,MAAMC,cAAc,GAAGT,6BAA6B,CAACQ,UAAU,CAAC;EAEhE,IAAI,CAACC,cAAc,EAAEC,MAAM,EAAE;IAC5B,OAAOH,SAAS;EACjB;EAEA,MAAMI,IAA6B,GAAG,CAAC,CAAC;EACxC,MAAMC,MAAM,GAAGL,SAAoC;EAEnD,KAAK,MAAMM,GAAG,IAAID,MAAM,EAAE;IACzBD,IAAI,CAACE,GAAG,CAAC,GAAGD,MAAM,CAACC,GAAG,CAAC;EACxB;EAEAF,IAAI,CAACb,gCAAgC,CAAC,GAAGW,cAAc;EAEvD,OAAOE,IAAI;AACZ,CAAC;AAACZ,OAAA,CAAAO,0BAAA,GAAAA,0BAAA;AAEK,MAAMQ,uBAAuB,GACnCb,KAA6B,IACS;EACtC,SAAS;;EACT,IAAI,CAACA,KAAK,EAAE;IACX,OAAOC,SAAS;EACjB;EAEA,OAAQD,KAAK,CAA+BH,gCAAgC,CAAC;AAC9E,CAAC;AAACC,OAAA,CAAAe,uBAAA,GAAAA,uBAAA;AAEK,MAAMC,yBAAyB,GAAId,KAAiB,IAAiB;EAC3E,SAAS;;EACT,IACEA,KAAK,CAA+BH,gCAAgC,CAAC,KACtEI,SAAS,EACR;IACD,OAAOD,KAAK;EACb;EAEA,MAAMe,IAA6B,GAAG,CAAC,CAAC;EACxC,MAAMJ,MAAM,GAAGX,KAAgC;EAE/C,KAAK,MAAMY,GAAG,IAAID,MAAM,EAAE;IACzB,IAAIC,GAAG,KAAKf,gCAAgC,EAAE;MAC7C;IACD;IAEAkB,IAAI,CAACH,GAAG,CAAC,GAAGD,MAAM,CAACC,GAAG,CAAC;EACxB;EAEA,OAAOG,IAAI;AACZ,CAAC;AAACjB,OAAA,CAAAgB,yBAAA,GAAAA,yBAAA","ignoreList":[]}
|
|
@@ -107,7 +107,14 @@ function buildZoomStyles({
|
|
|
107
107
|
const gestureHandoff = liveGesture.handoff;
|
|
108
108
|
const normX = gestureHandoff.normX;
|
|
109
109
|
const normY = gestureHandoff.normY;
|
|
110
|
-
const initialGesture =
|
|
110
|
+
const initialGesture = (0, _helpers2.resolveZoomPanGestureDirection)({
|
|
111
|
+
active: gestureHandoff.active,
|
|
112
|
+
direction: gestureHandoff.direction,
|
|
113
|
+
normX,
|
|
114
|
+
normY,
|
|
115
|
+
rawNormX: gestureHandoff.raw.normX,
|
|
116
|
+
rawNormY: gestureHandoff.raw.normY
|
|
117
|
+
});
|
|
111
118
|
const isHorizontalDismiss = initialGesture === "horizontal" || initialGesture === "horizontal-inverted";
|
|
112
119
|
const isVerticalDismiss = initialGesture === "vertical" || initialGesture === "vertical-inverted";
|
|
113
120
|
const rawDrag = isHorizontalDismiss ? Math.abs(gestureHandoff.raw.normX) : isVerticalDismiss ? Math.abs(gestureHandoff.raw.normY) : 0;
|