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 @@
|
|
|
1
|
+
{"version":3,"names":["_reactNativeReanimated","require","_descriptors","_state","_sourceSignals","useInitialSourceMeasurement","params","enabled","measureBoundary","boundTag","sourcePairKey","useDescriptorsStore","s","derivations","lastSourceCaptureSignal","useSharedValue","useAnimatedReaction","getInitialSourceCaptureSignal","linkId","linkKey","group","linkState","pairs","get","undefined","captureSignal","set","signal","type","pairKey","exports"],"sourceRoot":"../../../../../../../src","sources":["shared/components/boundary/hooks/lifecycles/use-initial-source-measurement.ts"],"mappings":";;;;;;AAAA,IAAAA,sBAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AAGA,IAAAG,cAAA,GAAAH,OAAA;AAEO,MAAMI,2BAA2B,GAAIC,MAI3C,IAAK;EACL,MAAM;IAAEC,OAAO;IAAEC,eAAe;IAAEC;EAAS,CAAC,GAAGH,MAAM;EACrD,MAAMI,aAAa,GAAG,IAAAC,gCAAmB,EAAEC,CAAC,IAAKA,CAAC,CAACC,WAAW,CAACH,aAAa,CAAC;EAC7E,MAAMI,uBAAuB,GAAG,IAAAC,qCAAc,EAAgB,IAAI,CAAC;EAEnE,IAAAC,0CAAmB,EAClB,MAAM;IACL,SAAS;;IACT,OAAO,IAAAC,4CAA6B,EAAC;MACpCV,OAAO;MACPG,aAAa;MACbQ,MAAM,EAAET,QAAQ,CAACU,OAAO;MACxBC,KAAK,EAAEX,QAAQ,CAACW,KAAK;MACrBC,SAAS,EAAEX,aAAa,GAAGY,YAAK,CAACC,GAAG,CAAC,CAAC,GAAGC;IAC1C,CAAC,CAAC;EACH,CAAC,EACAC,aAAa,IAAK;IAClB,SAAS;;IACT,IAAI,CAAClB,OAAO,IAAI,CAACkB,aAAa,EAAE;MAC/BX,uBAAuB,CAACY,GAAG,CAAC,IAAI,CAAC;MACjC;IACD;IAEA,IAAIZ,uBAAuB,CAACS,GAAG,CAAC,CAAC,KAAKE,aAAa,CAACE,MAAM,EAAE;MAC3D;IACD;IAEAb,uBAAuB,CAACY,GAAG,CAACD,aAAa,CAACE,MAAM,CAAC;IACjDnB,eAAe,CAAC;MACfoB,IAAI,EAAE,QAAQ;MACdC,OAAO,EAAEJ,aAAa,CAACI;IACxB,CAAC,CAAC;EACH,CACD,CAAC;AACF,CAAC;AAACC,OAAA,CAAAzB,2BAAA,GAAAA,2BAAA","ignoreList":[]}
|
|
@@ -5,16 +5,19 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.useRefreshBoundary = void 0;
|
|
7
7
|
var _reactNativeReanimated = require("react-native-reanimated");
|
|
8
|
-
var _descriptors = require("
|
|
9
|
-
var _animation = require("
|
|
10
|
-
var _state = require("
|
|
11
|
-
var _refreshSignals = require("
|
|
8
|
+
var _descriptors = require("../../../../providers/screen/descriptors");
|
|
9
|
+
var _animation = require("../../../../stores/animation.store");
|
|
10
|
+
var _state = require("../../../../stores/bounds/internals/state");
|
|
11
|
+
var _refreshSignals = require("../../utils/refresh-signals");
|
|
12
12
|
const useRefreshBoundary = ({
|
|
13
13
|
enabled,
|
|
14
|
-
|
|
15
|
-
group,
|
|
14
|
+
boundTag,
|
|
16
15
|
measureBoundary
|
|
17
16
|
}) => {
|
|
17
|
+
const {
|
|
18
|
+
linkKey,
|
|
19
|
+
group
|
|
20
|
+
} = boundTag;
|
|
18
21
|
const currentScreenKey = (0, _descriptors.useDescriptorsStore)(s => s.derivations.currentScreenKey);
|
|
19
22
|
const nextScreenKey = (0, _descriptors.useDescriptorsStore)(s => s.derivations.nextScreenKey);
|
|
20
23
|
const sourcePairKey = (0, _descriptors.useDescriptorsStore)(s => s.derivations.sourcePairKey);
|
|
@@ -38,7 +41,7 @@ const useRefreshBoundary = ({
|
|
|
38
41
|
destinationPairKey,
|
|
39
42
|
ancestorDestinationPairKey,
|
|
40
43
|
nextScreenKey,
|
|
41
|
-
linkId,
|
|
44
|
+
linkId: linkKey,
|
|
42
45
|
group,
|
|
43
46
|
shouldRefresh: !!refreshWillAnimate.get(),
|
|
44
47
|
closing: !!refreshClosing.get(),
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_reactNativeReanimated","require","_descriptors","_animation","_state","_refreshSignals","useRefreshBoundary","enabled","boundTag","measureBoundary","linkKey","group","currentScreenKey","useDescriptorsStore","s","derivations","nextScreenKey","sourcePairKey","destinationPairKey","ancestorDestinationPairKey","refreshScreenKey","refreshWillAnimate","AnimationStore","getValue","refreshClosing","refreshEntering","refreshAnimating","refreshProgress","useAnimatedReaction","getRefreshBoundarySignal","linkId","shouldRefresh","get","closing","entering","animating","progress","linkState","pairs","refreshSignal","prevRefreshSignal","signal","type","pairKey","exports"],"sourceRoot":"../../../../../../../src","sources":["shared/components/boundary/hooks/lifecycles/use-refresh-boundary.ts"],"mappings":";;;;;;AAAA,IAAAA,sBAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,UAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AAGA,IAAAI,eAAA,GAAAJ,OAAA;AAQO,MAAMK,kBAAkB,GAAGA,CA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AA0B;MAC1BH,aAAa;MACbc,MAAM,EAAEpB,OAAO;MACfC,KAAK;MACLoB,aAAa,EAAE,CAAC,CAACV,kBAAkB,CAACW,GAAG,CAAC,CAAC;MACzCC,OAAO,EAAE,CAAC,CAACT,cAAc,CAACQ,GAAG,CAAC,CAAC;MAC/BE,QAAQ,EAAE,CAAC,CAACT,eAAe,CAACO,GAAG,CAAC,CAAC;MACjCG,SAAS,EAAE,CAAC,CAACT,gBAAgB,CAACM,GAAG,CAAC,CAAC;MACnCI,QAAQ,EAAET,eAAe,CAACK,GAAG,CAAC,CAAC;MAC/BK,SAAS,EAAEC,YAAK,CAACN,GAAG,CAAC;IACtB,CAAC,CAAC;EACH,CAAC,EACD,CAACO,aAAa,EAAEC,iBAAiB,KAAK;IACrC,SAAS;;IAET,IACC,CAACD,aAAa,IACdA,aAAa,CAACE,MAAM,KAAKD,iBAAiB,EAAEC,MAAM,EACjD;MACD;IACD;IAEAhC,eAAe,CAAC;MACfiC,IAAI,EAAEH,aAAa,CAACG,IAAI;MACxBC,OAAO,EAAEJ,aAAa,CAACI;IACxB,CAAC,CAAC;EACH,CACD,CAAC;AACF,CAAC;AAACC,OAAA,CAAAtC,kBAAA,GAAAA,kBAAA","ignoreList":[]}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.useBoundaryMeasurement = void 0;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _styles = require("../../../utils/bounds/helpers/styles/styles");
|
|
9
|
+
var _useBoundaryPresence = require("./lifecycles/use-boundary-presence");
|
|
10
|
+
var _useInitialDestinationMeasurement = require("./lifecycles/use-initial-destination-measurement");
|
|
11
|
+
var _useInitialSourceMeasurement = require("./lifecycles/use-initial-source-measurement");
|
|
12
|
+
var _useRefreshBoundary = require("./lifecycles/use-refresh-boundary");
|
|
13
|
+
var _useMeasurer = require("./use-measurer");
|
|
14
|
+
/**
|
|
15
|
+
* Owns the full measurement lifecycle for a boundary: builds the measurer,
|
|
16
|
+
* registers presence, runs the initial source/destination + refresh reactions,
|
|
17
|
+
* and keeps the component itself away from the measurer.
|
|
18
|
+
*/
|
|
19
|
+
const useBoundaryMeasurement = ({
|
|
20
|
+
boundTag,
|
|
21
|
+
enabled,
|
|
22
|
+
runtimeEnabled,
|
|
23
|
+
currentScreenKey,
|
|
24
|
+
measuredRef,
|
|
25
|
+
style,
|
|
26
|
+
targetPreparedStyles,
|
|
27
|
+
handoff,
|
|
28
|
+
escapeClipping,
|
|
29
|
+
config
|
|
30
|
+
}) => {
|
|
31
|
+
const {
|
|
32
|
+
anchor,
|
|
33
|
+
scaleMode,
|
|
34
|
+
target,
|
|
35
|
+
method
|
|
36
|
+
} = config;
|
|
37
|
+
const boundaryConfig = (0, _react.useMemo)(() => ({
|
|
38
|
+
anchor,
|
|
39
|
+
scaleMode,
|
|
40
|
+
target,
|
|
41
|
+
method
|
|
42
|
+
}), [anchor, scaleMode, target, method]);
|
|
43
|
+
const rootPreparedStyles = (0, _react.useMemo)(() => (0, _styles.prepareStyleForBounds)(style), [style]);
|
|
44
|
+
const preparedStyles = targetPreparedStyles ?? rootPreparedStyles;
|
|
45
|
+
const measureBoundary = (0, _useMeasurer.useMeasurer)({
|
|
46
|
+
enabled,
|
|
47
|
+
boundTag,
|
|
48
|
+
currentScreenKey,
|
|
49
|
+
preparedStyles,
|
|
50
|
+
measuredAnimatedRef: measuredRef,
|
|
51
|
+
handoff,
|
|
52
|
+
escapeClipping
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
// Register/unregister this boundary in the presence map so source/destination
|
|
56
|
+
// matching can resolve across concrete screen keys.
|
|
57
|
+
(0, _useBoundaryPresence.useBoundaryPresence)({
|
|
58
|
+
enabled: runtimeEnabled,
|
|
59
|
+
boundTag,
|
|
60
|
+
currentScreenKey,
|
|
61
|
+
boundaryConfig,
|
|
62
|
+
handoff,
|
|
63
|
+
escapeClipping
|
|
64
|
+
});
|
|
65
|
+
(0, _useInitialSourceMeasurement.useInitialSourceMeasurement)({
|
|
66
|
+
enabled: runtimeEnabled,
|
|
67
|
+
measureBoundary,
|
|
68
|
+
boundTag
|
|
69
|
+
});
|
|
70
|
+
(0, _useInitialDestinationMeasurement.useInitialDestinationMeasurement)({
|
|
71
|
+
boundTag,
|
|
72
|
+
enabled: runtimeEnabled,
|
|
73
|
+
measureBoundary
|
|
74
|
+
});
|
|
75
|
+
(0, _useRefreshBoundary.useRefreshBoundary)({
|
|
76
|
+
enabled: runtimeEnabled,
|
|
77
|
+
boundTag,
|
|
78
|
+
measureBoundary
|
|
79
|
+
});
|
|
80
|
+
};
|
|
81
|
+
exports.useBoundaryMeasurement = useBoundaryMeasurement;
|
|
82
|
+
//# sourceMappingURL=use-boundary-measurement.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","require","_styles","_useBoundaryPresence","_useInitialDestinationMeasurement","_useInitialSourceMeasurement","_useRefreshBoundary","_useMeasurer","useBoundaryMeasurement","boundTag","enabled","runtimeEnabled","currentScreenKey","measuredRef","style","targetPreparedStyles","handoff","escapeClipping","config","anchor","scaleMode","target","method","boundaryConfig","useMemo","rootPreparedStyles","prepareStyleForBounds","preparedStyles","measureBoundary","useMeasurer","measuredAnimatedRef","useBoundaryPresence","useInitialSourceMeasurement","useInitialDestinationMeasurement","useRefreshBoundary","exports"],"sourceRoot":"../../../../../../src","sources":["shared/components/boundary/hooks/use-boundary-measurement.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAIA,IAAAC,OAAA,GAAAD,OAAA;AAEA,IAAAE,oBAAA,GAAAF,OAAA;AACA,IAAAG,iCAAA,GAAAH,OAAA;AACA,IAAAI,4BAAA,GAAAJ,OAAA;AACA,IAAAK,mBAAA,GAAAL,OAAA;AACA,IAAAM,YAAA,GAAAN,OAAA;AAmBA;AACA;AACA;AACA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,OAAA,CAAA3B,sBAAA,GAAAA,sBAAA","ignoreList":[]}
|
|
@@ -11,17 +11,15 @@ var _measuredBoundsWrites = require("../../../providers/helpers/measured-bounds-
|
|
|
11
11
|
var _origin = require("../../../providers/screen/origin.provider");
|
|
12
12
|
var _scroll = require("../../../stores/scroll.store");
|
|
13
13
|
var _system = require("../../../stores/system.store");
|
|
14
|
-
var _hostRegistry = require("../portal/stores/host-registry.store");
|
|
15
14
|
var _measuredBounds = require("../utils/measured-bounds");
|
|
16
15
|
const useMeasurer = ({
|
|
17
16
|
enabled,
|
|
18
|
-
|
|
19
|
-
linkId,
|
|
20
|
-
group,
|
|
17
|
+
boundTag,
|
|
21
18
|
currentScreenKey,
|
|
22
19
|
preparedStyles,
|
|
23
20
|
measuredAnimatedRef,
|
|
24
|
-
|
|
21
|
+
handoff,
|
|
22
|
+
escapeClipping
|
|
25
23
|
}) => {
|
|
26
24
|
const {
|
|
27
25
|
width: viewportWidth,
|
|
@@ -49,23 +47,22 @@ const useMeasurer = ({
|
|
|
49
47
|
* and malformed off-screen destination measurements should keep the
|
|
50
48
|
* lifecycle blocked until a valid retry lands.
|
|
51
49
|
*/
|
|
52
|
-
const shouldGuardDestinationViewport = pendingLifecycleStartBlockCount.get() > 0 || !!group;
|
|
50
|
+
const shouldGuardDestinationViewport = pendingLifecycleStartBlockCount.get() > 0 || !!boundTag.group;
|
|
53
51
|
const viewportAllowsDestinationWrite = target.type !== "destination" || !shouldGuardDestinationViewport || (0, _measuredBounds.isMeasurementInViewport)(normalizedMeasured, viewportWidth, viewportHeight);
|
|
54
52
|
if (!viewportAllowsDestinationWrite) return;
|
|
55
53
|
const measuredWithScroll = (0, _measuredBounds.attachScrollSnapshotToMeasuredBounds)(normalizedMeasured, scrollMetadata.get());
|
|
56
|
-
const sourceHost = target.type === "source" ? (0, _hostRegistry.getActiveScrollHost)(currentScreenKey) ?? undefined : undefined;
|
|
57
54
|
(0, _measuredBoundsWrites.applyMeasuredBoundsWrites)({
|
|
58
|
-
entryTag,
|
|
59
|
-
linkId,
|
|
60
|
-
group,
|
|
55
|
+
entryTag: boundTag.tag,
|
|
56
|
+
linkId: boundTag.linkKey,
|
|
57
|
+
group: boundTag.group,
|
|
61
58
|
currentScreenKey,
|
|
62
59
|
measured: measuredWithScroll,
|
|
63
60
|
preparedStyles,
|
|
64
61
|
linkWrite: target,
|
|
65
|
-
|
|
66
|
-
|
|
62
|
+
handoff,
|
|
63
|
+
escapeClipping
|
|
67
64
|
});
|
|
68
|
-
}, [enabled,
|
|
65
|
+
}, [enabled, boundTag, currentScreenKey, preparedStyles, measuredAnimatedRef, handoff, escapeClipping, viewportWidth, viewportHeight, scrollState, scrollMetadata, pendingLifecycleStartBlockCount, originRef]);
|
|
69
66
|
};
|
|
70
67
|
exports.useMeasurer = useMeasurer;
|
|
71
68
|
//# sourceMappingURL=use-measurer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","_reactNative","_reactNativeReanimated","_measuredBoundsWrites","_origin","_scroll","_system","
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNative","_reactNativeReanimated","_measuredBoundsWrites","_origin","_scroll","_system","_measuredBounds","useMeasurer","enabled","boundTag","currentScreenKey","preparedStyles","measuredAnimatedRef","handoff","escapeClipping","width","viewportWidth","height","viewportHeight","useWindowDimensions","scrollState","ScrollStore","getValue","scrollMetadata","pendingLifecycleStartBlockCount","SystemStore","originRef","useOriginContext","useCallback","target","measured","measureWithOverscrollAwareness","get","measuredOrigin","measure","normalizedMeasured","normalizeMeasuredBoundsToOrigin","shouldGuardDestinationViewport","group","viewportAllowsDestinationWrite","type","isMeasurementInViewport","measuredWithScroll","attachScrollSnapshotToMeasuredBounds","applyMeasuredBoundsWrites","entryTag","tag","linkId","linkKey","linkWrite","exports"],"sourceRoot":"../../../../../../src","sources":["shared/components/boundary/hooks/use-measurer.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAEA,IAAAC,YAAA,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C,CAAC,GAAG,CAAC,IAAI,CAAC,CAACvB,QAAQ,CAAC6B,KAAK;IAE9D,MAAMC,8BAA8B,GACnCV,MAAM,CAACW,IAAI,KAAK,aAAa,IAC7B,CAACH,8BAA8B,IAC/B,IAAAI,uCAAuB,EACtBN,kBAAkB,EAClBnB,aAAa,EACbE,cACD,CAAC;IAEF,IAAI,CAACqB,8BAA8B,EAAE;IAErC,MAAMG,kBAAkB,GAAG,IAAAC,oDAAoC,EAC9DR,kBAAkB,EAClBZ,cAAc,CAACS,GAAG,CAAC,CACpB,CAAC;IAED,IAAAY,+CAAyB,EAAC;MACzBC,QAAQ,EAAEpC,QAAQ,CAACqC,GAAG;MACtBC,MAAM,EAAEtC,QAAQ,CAACuC,OAAO;MACxBV,KAAK,EAAE7B,QAAQ,CAAC6B,KAAK;MACrB5B,gBAAgB;MAChBoB,QAAQ,EAAEY,kBAAkB;MAC5B/B,cAAc;MACdsC,SAAS,EAAEpB,MAAM;MACjBhB,OAAO;MACPC;IACD,CAAC,CAAC;EACH,CAAC,EACD,CACCN,OAAO,EACPC,QAAQ,EACRC,gBAAgB,EAChBC,cAAc,EACdC,mBAAmB,EACnBC,OAAO,EACPC,cAAc,EACdE,aAAa,EACbE,cAAc,EACdE,WAAW,EACXG,cAAc,EACdC,+BAA+B,EAC/BE,SAAS,CAEX,CAAC;AACF,CAAC;AAACwB,OAAA,CAAA3C,WAAA,GAAAA,WAAA","ignoreList":[]}
|
|
@@ -10,54 +10,51 @@ Object.defineProperty(exports, "createBoundaryComponent", {
|
|
|
10
10
|
return _createBoundaryComponent.createBoundaryComponent;
|
|
11
11
|
}
|
|
12
12
|
});
|
|
13
|
+
var _react = require("react");
|
|
13
14
|
var _reactNative = require("react-native");
|
|
14
15
|
var _boundaryTarget = require("./components/boundary-target");
|
|
15
16
|
var _createBoundaryComponent = require("./create-boundary-component");
|
|
16
17
|
var _portal = require("./portal");
|
|
17
|
-
|
|
18
|
-
|
|
18
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
19
|
+
const BoundaryPrimitive = /*#__PURE__*/(0, _react.forwardRef)((props, ref) => {
|
|
20
|
+
const Component = "onPress" in props ? _reactNative.Pressable : _reactNative.View;
|
|
21
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(Component, {
|
|
22
|
+
...props,
|
|
23
|
+
ref: ref
|
|
24
|
+
});
|
|
19
25
|
});
|
|
26
|
+
BoundaryPrimitive.displayName = "Transition.Boundary.Primitive";
|
|
27
|
+
const BoundaryRoot = (0, _createBoundaryComponent.createBoundaryComponent)(BoundaryPrimitive);
|
|
28
|
+
const BoundaryView = (0, _createBoundaryComponent.createBoundaryComponent)(_reactNative.View);
|
|
20
29
|
const BoundaryTrigger = (0, _createBoundaryComponent.createBoundaryComponent)(_reactNative.Pressable);
|
|
30
|
+
BoundaryRoot.displayName = "Transition.Boundary";
|
|
21
31
|
BoundaryView.displayName = "Transition.Boundary.View";
|
|
22
32
|
BoundaryTrigger.displayName = "Transition.Boundary.Trigger";
|
|
23
33
|
_boundaryTarget.BoundaryTarget.displayName = "Transition.Boundary.Target";
|
|
24
34
|
_portal.Host.displayName = "Transition.Boundary.Host";
|
|
25
35
|
|
|
26
36
|
/**
|
|
27
|
-
* Shared-boundary
|
|
37
|
+
* Shared-boundary component with static helpers.
|
|
28
38
|
*
|
|
29
39
|
* How measurement works:
|
|
30
|
-
* 1.
|
|
31
|
-
* 2.
|
|
32
|
-
* 3. The link is updated as layout changes
|
|
40
|
+
* 1. Destination screen captures bounds for a tag.
|
|
41
|
+
* 2. Source screen captures bounds for the same concrete pair.
|
|
42
|
+
* 3. The link is updated as layout changes.
|
|
33
43
|
*
|
|
34
|
-
*
|
|
35
|
-
* -
|
|
36
|
-
*
|
|
37
|
-
* fresh source geometry on the first frame.
|
|
44
|
+
* Runtime primitive:
|
|
45
|
+
* - With an `onPress` handler, the root renders as a Pressable.
|
|
46
|
+
* - Without an `onPress` handler, the root renders as a View.
|
|
38
47
|
*
|
|
39
48
|
* Use:
|
|
40
|
-
* - `Boundary
|
|
41
|
-
* - `Boundary.
|
|
42
|
-
* - `Boundary.Target` to measure a nested descendant instead of the owner.
|
|
49
|
+
* - `Boundary` for passive and pressable shared elements.
|
|
50
|
+
* - `Boundary.Target` to measure a nested descendant instead of the root.
|
|
43
51
|
* - `Boundary.Host` to make nested portal placement explicit.
|
|
44
52
|
*/
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
* Passive boundary wrapper (no built-in press semantics).
|
|
48
|
-
*/
|
|
49
|
-
View: BoundaryView,
|
|
50
|
-
/**
|
|
51
|
-
* Pressable boundary wrapper with press-priority source capture.
|
|
52
|
-
*/
|
|
53
|
-
Trigger: BoundaryTrigger,
|
|
54
|
-
/**
|
|
55
|
-
* Optional nested measurement override inside a boundary owner.
|
|
56
|
-
*/
|
|
53
|
+
|
|
54
|
+
const Boundary = exports.Boundary = Object.assign(BoundaryRoot, {
|
|
57
55
|
Target: _boundaryTarget.BoundaryTarget,
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
};
|
|
56
|
+
Host: _portal.Host,
|
|
57
|
+
View: BoundaryView,
|
|
58
|
+
Trigger: BoundaryTrigger
|
|
59
|
+
});
|
|
63
60
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNative","_boundaryTarget","_createBoundaryComponent","_portal","_jsxRuntime","BoundaryPrimitive","forwardRef","props","ref","Component","Pressable","View","jsx","displayName","BoundaryRoot","createBoundaryComponent","BoundaryView","BoundaryTrigger","BoundaryTarget","Host","Boundary","exports","Object","assign","Target","Trigger"],"sourceRoot":"../../../../../src","sources":["shared/components/boundary/index.tsx"],"mappings":";;;;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAMA,IAAAE,eAAA,GAAAF,OAAA;AACA,IAAAG,wBAAA,GAAAH,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AAAgC,IAAAK,WAAA,GAAAL,OAAA;AAUhC,MAAMM,iBAAiB,gBAAG,IAAAC,iBAAU,EACnC,CAACC,KAAK,EAAEC,GAAG,KAAK;EACf,MAAMC,SAAS,GAAG,SAAS,IAAIF,KAAK,GAAGG,sBAAS,GAAGC,iBAAI;EAEvD,oBAAO,IAAAP,WAAA,CAAAQ,GAAA,EAACH,SAAS;IAAA,GAAMF,KAAK;IAAUC,GAAG,EAAEA;EAAW,CAAE,CAAC;AAC1D,CACD,CAAC;AAEDH,iBAAiB,CAACQ,WAAW,GAAG,+BAA+B;AAE/D,MAAMC,YAAY,GAAG,IAAAC,gDAAuB,EAACV,iBAAiB,CAAC;AAC/D,MAAMW,YAAY,GAAG,IAAAD,gDAAuB,EAACJ,iBAAI,CAAC;AAClD,MAAMM,eAAe,GAAG,IAAAF,gDAAuB,EAACL,sBAAS,CAAC;AAC1DI,YAAY,CAACD,WAAW,GAAG,qBAAqB;AAChDG,YAAY,CAACH,WAAW,GAAG,0BAA0B;AACrDI,eAAe,CAACJ,WAAW,GAAG,6BAA6B;AAC3DK,8BAAc,CAACL,WAAW,GAAG,4BAA4B;AACzDM,YAAI,CAACN,WAAW,GAAG,0BAA0B;;AAI7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAsBO,MAAMO,QAAQ,GAAAC,OAAA,CAAAD,QAAA,GAAGE,MAAM,CAACC,MAAM,CAACT,YAAY,EAAE;EACnDU,MAAM,EAAEN,8BAAc;EACtBC,IAAI,EAAJA,YAAI;EACJR,IAAI,EAAEK,YAAY;EAClBS,OAAO,EAAER;AACV,CAAC,CAAsB","ignoreList":[]}
|
package/lib/commonjs/shared/components/boundary/portal/components/boundary-local-portal-host.js
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.BoundaryLocalPortalHost = void 0;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
var _reactNativeReanimated = _interopRequireDefault(require("react-native-reanimated"));
|
|
10
|
+
var _system = require("../../../../stores/system.store");
|
|
11
|
+
var _teleport = require("../teleport");
|
|
12
|
+
var _naming = require("../utils/naming");
|
|
13
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
15
|
+
const AnimatedPortalHost = _teleport.NativePortalHost ? _reactNativeReanimated.default.createAnimatedComponent(_teleport.NativePortalHost) : null;
|
|
16
|
+
const BoundaryLocalPortalHost = exports.BoundaryLocalPortalHost = /*#__PURE__*/(0, _react.memo)(function BoundaryLocalPortalHost({
|
|
17
|
+
boundaryId,
|
|
18
|
+
enabled,
|
|
19
|
+
screenKey
|
|
20
|
+
}) {
|
|
21
|
+
const {
|
|
22
|
+
drainLifecycleStartBlocks
|
|
23
|
+
} = _system.SystemStore.getBag(screenKey).actions;
|
|
24
|
+
const handleLayout = (0, _react.useCallback)(() => {
|
|
25
|
+
drainLifecycleStartBlocks();
|
|
26
|
+
}, [drainLifecycleStartBlocks]);
|
|
27
|
+
(0, _react.useLayoutEffect)(() => {
|
|
28
|
+
if (!enabled || !AnimatedPortalHost) {
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
drainLifecycleStartBlocks();
|
|
32
|
+
}, [enabled, drainLifecycleStartBlocks]);
|
|
33
|
+
if (!enabled || !AnimatedPortalHost) {
|
|
34
|
+
return null;
|
|
35
|
+
}
|
|
36
|
+
const portalHostName = (0, _naming.createBoundaryLocalPortalHostName)(screenKey, boundaryId);
|
|
37
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
38
|
+
pointerEvents: "none",
|
|
39
|
+
style: styles.hostWrapper,
|
|
40
|
+
onLayout: handleLayout,
|
|
41
|
+
collapsable: false,
|
|
42
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(AnimatedPortalHost, {
|
|
43
|
+
name: portalHostName,
|
|
44
|
+
style: styles.host
|
|
45
|
+
})
|
|
46
|
+
});
|
|
47
|
+
});
|
|
48
|
+
const styles = _reactNative.StyleSheet.create({
|
|
49
|
+
host: {
|
|
50
|
+
..._reactNative.StyleSheet.absoluteFillObject,
|
|
51
|
+
overflow: "visible"
|
|
52
|
+
},
|
|
53
|
+
hostWrapper: {
|
|
54
|
+
..._reactNative.StyleSheet.absoluteFillObject,
|
|
55
|
+
overflow: "visible"
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
//# sourceMappingURL=boundary-local-portal-host.js.map
|
package/lib/commonjs/shared/components/boundary/portal/components/boundary-local-portal-host.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNative","_reactNativeReanimated","_interopRequireDefault","_system","_teleport","_naming","_jsxRuntime","e","__esModule","default","AnimatedPortalHost","NativePortalHost","Animated","createAnimatedComponent","BoundaryLocalPortalHost","exports","memo","boundaryId","enabled","screenKey","drainLifecycleStartBlocks","SystemStore","getBag","actions","handleLayout","useCallback","useLayoutEffect","portalHostName","createBoundaryLocalPortalHostName","jsx","View","pointerEvents","style","styles","hostWrapper","onLayout","collapsable","children","name","host","StyleSheet","create","absoluteFillObject","overflow"],"sourceRoot":"../../../../../../../src","sources":["shared/components/boundary/portal/components/boundary-local-portal-host.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,sBAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AACA,IAAAK,SAAA,GAAAL,OAAA;AACA,IAAAM,OAAA,GAAAN,OAAA;AAAoE,IAAAO,WAAA,GAAAP,OAAA;AAAA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AC;AAET,CAAC,CAAC;AAEF,MAAMN,MAAM,GAAGO,uBAAU,CAACC,MAAM,CAAC;EAChCF,IAAI,EAAE;IACL,GAAGC,uBAAU,CAACE,kBAAkB;IAChCC,QAAQ,EAAE;EACX,CAAC;EACDT,WAAW,EAAE;IACZ,GAAGM,uBAAU,CAACE,kBAAkB;IAChCC,QAAQ,EAAE;EACX;AACD,CAAC,CAAC","ignoreList":[]}
|
|
@@ -8,6 +8,7 @@ var _react = require("react");
|
|
|
8
8
|
var _reactNative = require("react-native");
|
|
9
9
|
var _reactNativeReanimated = _interopRequireDefault(require("react-native-reanimated"));
|
|
10
10
|
var _descriptors = require("../../../../providers/screen/descriptors");
|
|
11
|
+
var _system = require("../../../../stores/system.store");
|
|
11
12
|
var _useHostMeasurement = require("../hooks/use-host-measurement");
|
|
12
13
|
var _hostRegistry = require("../stores/host-registry.store");
|
|
13
14
|
var _portalBoundaryHost = require("../stores/portal-boundary-host.store");
|
|
@@ -20,6 +21,9 @@ function HostImpl({
|
|
|
20
21
|
style
|
|
21
22
|
}) {
|
|
22
23
|
const screenKey = (0, _descriptors.useDescriptorsStore)(s => s.derivations.currentScreenKey);
|
|
24
|
+
const {
|
|
25
|
+
drainLifecycleStartBlocks
|
|
26
|
+
} = _system.SystemStore.getBag(screenKey).actions;
|
|
23
27
|
const generatedHostKeyRef = (0, _react.useRef)(null);
|
|
24
28
|
if (generatedHostKeyRef.current === null) {
|
|
25
29
|
generatedHostKeyRef.current = `${screenKey}-host-${nextHostId++}`;
|
|
@@ -48,20 +52,32 @@ function HostImpl({
|
|
|
48
52
|
(0, _hostRegistry.unregisterHost)(screenKey, hostKey);
|
|
49
53
|
};
|
|
50
54
|
}, [capturesScroll, fallback, hostKey, screenKey]);
|
|
51
|
-
const
|
|
52
|
-
|
|
55
|
+
const handleUnblocking = (0, _react.useCallback)(() => {
|
|
56
|
+
// Screen-level escape keeps the open transition gated until portal hosts
|
|
57
|
+
// have committed layout. A screen may render more than one portal boundary
|
|
58
|
+
// host for the same lifecycle request, so the final host layout drains the
|
|
59
|
+
// outstanding start blocks for this screen.
|
|
60
|
+
drainLifecycleStartBlocks();
|
|
61
|
+
}, [drainLifecycleStartBlocks]);
|
|
62
|
+
const boundaryHosts = measurement.canRenderHosts ? activeBoundaryHosts.map((host, idx, list) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
63
|
+
pointerEvents: "none",
|
|
53
64
|
style: [styles.boundaryHostViewport, {
|
|
54
65
|
width: viewportWidth,
|
|
55
66
|
height: viewportHeight
|
|
56
67
|
}],
|
|
68
|
+
onLayout: () => {
|
|
69
|
+
if (list.length - 1 === idx) {
|
|
70
|
+
handleUnblocking();
|
|
71
|
+
}
|
|
72
|
+
},
|
|
57
73
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_portalBoundaryHost2.PortalBoundaryHost, {
|
|
58
74
|
host: host,
|
|
59
75
|
style: _reactNative.StyleSheet.absoluteFill
|
|
60
76
|
})
|
|
61
|
-
}, host.
|
|
77
|
+
}, host.portalHostName)) : null;
|
|
62
78
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeReanimated.default.View, {
|
|
63
79
|
ref: measurement.hostRef,
|
|
64
|
-
pointerEvents: "
|
|
80
|
+
pointerEvents: "none",
|
|
65
81
|
style: [styles.host, {
|
|
66
82
|
width: viewportWidth,
|
|
67
83
|
height: viewportHeight
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","_reactNative","_reactNativeReanimated","_interopRequireDefault","_descriptors","_useHostMeasurement","_hostRegistry","_portalBoundaryHost","_portalBoundaryHost2","_jsxRuntime","e","__esModule","default","nextHostId","HostImpl","fallback","style","screenKey","useDescriptorsStore","s","derivations","currentScreenKey","generatedHostKeyRef","useRef","current","hostKey","capturesScroll","activeBoundaryHosts","useActivePortalBoundaryHosts","height","viewportHeight","width","viewportWidth","useWindowDimensions","measurement","useHostMeasurement","enabled","length","useLayoutEffect","registerHost","unregisterHost","boundaryHosts","canRenderHosts","map","host","jsx","View","pointerEvents","styles","boundaryHostViewport","children","PortalBoundaryHost","StyleSheet","absoluteFill","
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNative","_reactNativeReanimated","_interopRequireDefault","_descriptors","_system","_useHostMeasurement","_hostRegistry","_portalBoundaryHost","_portalBoundaryHost2","_jsxRuntime","e","__esModule","default","nextHostId","HostImpl","fallback","style","screenKey","useDescriptorsStore","s","derivations","currentScreenKey","drainLifecycleStartBlocks","SystemStore","getBag","actions","generatedHostKeyRef","useRef","current","hostKey","capturesScroll","activeBoundaryHosts","useActivePortalBoundaryHosts","height","viewportHeight","width","viewportWidth","useWindowDimensions","measurement","useHostMeasurement","enabled","length","useLayoutEffect","registerHost","unregisterHost","handleUnblocking","useCallback","boundaryHosts","canRenderHosts","map","host","idx","list","jsx","View","pointerEvents","styles","boundaryHostViewport","onLayout","children","PortalBoundaryHost","StyleSheet","absoluteFill","portalHostName","ref","hostRef","collapsable","Host","exports","memo","props","ScreenFallbackHost","create","elevation","left","overflow","position","top","zIndex"],"sourceRoot":"../../../../../../../src","sources":["shared/components/boundary/portal/components/host.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAOA,IAAAE,sBAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,YAAA,GAAAJ,OAAA;AACA,IAAAK,OAAA,GAAAL,OAAA;AACA,IAAAM,mBAAA,GAAAN,OAAA;AACA,IAAAO,aAAA,GAAAP,OAAA;AACA,IAAAQ,mBAAA,GAAAR,OAAA;AACA,IAAAS,oBAAA,GAAAT,OAAA;AAA4D,IAAAU,WAAA,GAAAV,OAAA;AAAA,SAAAG,uBAAAQ,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAE5D,IAAIG,UAAU,GAAG,CAAC;AAUlB,SAASC,QAAQA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oBAAO,IAAA7D,WAAA,CAAA4C,GAAA,EAACvC,QAAQ;IAAA,GAAKwD;EAAK,CAAG,CAAC;AAC/B,CAAC,CAAC;AAEK,MAAMC,kBAAkB,GAAAH,OAAA,CAAAG,kBAAA,gBAAG,IAAAF,WAAI,EAAC,SAASE,kBAAkBA,CAAA,EAAG;EACpE,oBAAO,IAAA9D,WAAA,CAAA4C,GAAA,EAACvC,QAAQ;IAACC,QAAQ;EAAA,CAAE,CAAC;AAC7B,CAAC,CAAC;AAEF,MAAMyC,MAAM,GAAGK,uBAAU,CAACW,MAAM,CAAC;EAChCtB,IAAI,EAAE;IACLuB,SAAS,EAAE,MAAM;IACjBC,IAAI,EAAE,CAAC;IACPC,QAAQ,EAAE,SAAS;IACnBC,QAAQ,EAAE,UAAU;IACpBC,GAAG,EAAE,CAAC;IACNC,MAAM,EAAE;EACT,CAAC;EACDrB,oBAAoB,EAAE;IACrBiB,IAAI,EAAE,CAAC;IACPC,QAAQ,EAAE,SAAS;IACnBC,QAAQ,EAAE,UAAU;IACpBC,GAAG,EAAE;EACN;AACD,CAAC,CAAC","ignoreList":[]}
|
|
@@ -5,15 +5,13 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.PortalBoundaryHost = void 0;
|
|
7
7
|
var _react = require("react");
|
|
8
|
+
var _reactNative = require("react-native");
|
|
8
9
|
var _reactNativeReanimated = _interopRequireWildcard(require("react-native-reanimated"));
|
|
9
10
|
var _constants = require("../../../../constants");
|
|
10
|
-
var
|
|
11
|
-
var _linkPairs = require("../../../../stores/bounds/helpers/link-pairs.helpers");
|
|
11
|
+
var _composeSlotStyle = require("../../../../providers/screen/styles/helpers/compose-slot-style");
|
|
12
12
|
var _links = require("../../../../stores/bounds/internals/links");
|
|
13
|
-
var _gesture = require("../../../../stores/gesture.store");
|
|
14
|
-
var _scroll = require("../../../../stores/scroll.store");
|
|
15
13
|
var _teleport = require("../teleport");
|
|
16
|
-
var
|
|
14
|
+
var _hasLocalSlot = require("../utils/has-local-slot");
|
|
17
15
|
var _offsetStyle = require("../utils/offset-style");
|
|
18
16
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
19
17
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
@@ -22,12 +20,6 @@ const PortalBoundaryHost = exports.PortalBoundaryHost = /*#__PURE__*/(0, _react.
|
|
|
22
20
|
host,
|
|
23
21
|
style
|
|
24
22
|
}) {
|
|
25
|
-
const hostName = (0, _naming.createPortalBoundaryHostName)(host.hostKey, host.boundaryId);
|
|
26
|
-
const hostClosing = _animation.AnimationStore.getValue(host.screenKey, "closing");
|
|
27
|
-
const hostProgress = _animation.AnimationStore.getValue(host.screenKey, "transitionProgress");
|
|
28
|
-
const hostGestureDismissing = _gesture.GestureStore.getValue(host.screenKey, "dismissing");
|
|
29
|
-
const hostScrollMetadata = _scroll.ScrollStore.getValue(host.screenKey, "metadata");
|
|
30
|
-
const sourceScrollMetadata = _scroll.ScrollStore.getValue((0, _linkPairs.getSourceScreenKeyFromPairKey)(host.pairKey), "metadata");
|
|
31
23
|
const hostStyle = (0, _reactNativeReanimated.useAnimatedStyle)(() => {
|
|
32
24
|
"worklet";
|
|
33
25
|
|
|
@@ -37,38 +29,67 @@ const PortalBoundaryHost = exports.PortalBoundaryHost = /*#__PURE__*/(0, _react.
|
|
|
37
29
|
if (!link?.source || !link.destination) {
|
|
38
30
|
return _constants.NO_STYLES;
|
|
39
31
|
}
|
|
40
|
-
|
|
41
|
-
// Make the coordinate case explicit before resolving the host offset.
|
|
42
|
-
// The resolver owns the math; this component decides which screen/scroll
|
|
43
|
-
// relationship the active portal is in.
|
|
32
|
+
const sourceBounds = link.source.bounds;
|
|
44
33
|
const isCrossScreenPortal = link.source.screenKey !== host.screenKey;
|
|
45
|
-
const isHostClosing = hostClosing.get() === 1 || hostGestureDismissing.get() === 1;
|
|
46
|
-
const placement = !isCrossScreenPortal ? "same-screen" : isHostClosing ? "cross-screen-close" : "cross-screen-open";
|
|
47
|
-
|
|
48
|
-
// A source that originated inside its own scroll host moves with that
|
|
49
|
-
// ScrollView while this portal stays attached over here. Shifting the
|
|
50
|
-
// source rect by the clamped source scroll travel keeps the return
|
|
51
|
-
// landing point on the live placeholder, so the close detach is seamless.
|
|
52
|
-
const trackSourceScroll = isCrossScreenPortal && link.source.sourceHost?.capturesScroll === true;
|
|
53
34
|
return (0, _offsetStyle.resolvePortalOffsetStyle)({
|
|
54
|
-
bounds:
|
|
55
|
-
hostCurrentScroll: placement === "cross-screen-close" ? hostScrollMetadata.get() : null,
|
|
35
|
+
bounds: sourceBounds,
|
|
56
36
|
hostKey: host.hostKey,
|
|
57
|
-
placement
|
|
58
|
-
sourceCurrentScroll: trackSourceScroll ? sourceScrollMetadata.get() : null,
|
|
59
|
-
hostProgress: hostProgress.get(),
|
|
60
|
-
trackSourceScroll
|
|
37
|
+
placement: isCrossScreenPortal ? "cross-screen" : "same-screen"
|
|
61
38
|
});
|
|
62
39
|
});
|
|
40
|
+
const contentFrameStyle = (0, _reactNativeReanimated.useAnimatedStyle)(() => {
|
|
41
|
+
"worklet";
|
|
42
|
+
|
|
43
|
+
const link = (0, _links.getLink)(host.pairKey, host.boundaryId);
|
|
44
|
+
if (!link?.source || !link.destination) {
|
|
45
|
+
return _constants.NO_STYLES;
|
|
46
|
+
}
|
|
47
|
+
const sourceBounds = link.source.bounds;
|
|
48
|
+
return {
|
|
49
|
+
height: sourceBounds.height,
|
|
50
|
+
width: sourceBounds.width
|
|
51
|
+
};
|
|
52
|
+
});
|
|
53
|
+
const slotStyle = (0, _reactNativeReanimated.useAnimatedStyle)(() => {
|
|
54
|
+
"worklet";
|
|
55
|
+
|
|
56
|
+
// `slotsMap` is the resolved map: it may contain real interpolator output,
|
|
57
|
+
// inherited styles, or resolver-created reset patches for slots that just
|
|
58
|
+
// disappeared. Normal components need those reset patches so stale styles
|
|
59
|
+
// clear correctly.
|
|
60
|
+
//
|
|
61
|
+
// A screen-level portal host is different. It is only the temporary visual
|
|
62
|
+
// receiver for teleported content, not the original component that needs a
|
|
63
|
+
// cleanup frame. If the current local interpolator layers did not emit this
|
|
64
|
+
// boundary id, any resolved style here is cleanup/stale residue and should
|
|
65
|
+
// not be drawn by the host.
|
|
66
|
+
if (host.escapeClipping && !(0, _hasLocalSlot.hasLocalSlot)(host.localStylesMaps.get(), host.boundaryId)) {
|
|
67
|
+
return _constants.NO_STYLES;
|
|
68
|
+
}
|
|
69
|
+
const slot = host.slotsMap.get()[host.boundaryId];
|
|
70
|
+
return (0, _composeSlotStyle.composeSlotStyleWithLocalTransform)(slot?.style ?? _constants.NO_STYLES, undefined, slot?.boundsLocalTransform);
|
|
71
|
+
});
|
|
63
72
|
|
|
64
73
|
// Without `react-native-teleport` no portal ever mounts a boundary host, so
|
|
65
74
|
// this never renders — the guard just narrows the nullable animated host.
|
|
66
75
|
if (!AnimatedPortalBoundaryHost) {
|
|
67
76
|
return null;
|
|
68
77
|
}
|
|
69
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
70
|
-
|
|
71
|
-
style: [style, hostStyle]
|
|
78
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeReanimated.default.View, {
|
|
79
|
+
pointerEvents: "none",
|
|
80
|
+
style: [style, hostStyle],
|
|
81
|
+
collapsable: false,
|
|
82
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(AnimatedPortalBoundaryHost, {
|
|
83
|
+
name: host.portalHostName,
|
|
84
|
+
style: [styles.content, contentFrameStyle, slotStyle]
|
|
85
|
+
})
|
|
72
86
|
});
|
|
73
87
|
});
|
|
88
|
+
const styles = _reactNative.StyleSheet.create({
|
|
89
|
+
content: {
|
|
90
|
+
left: 0,
|
|
91
|
+
position: "absolute",
|
|
92
|
+
top: 0
|
|
93
|
+
}
|
|
94
|
+
});
|
|
74
95
|
//# sourceMappingURL=portal-boundary-host.js.map
|
package/lib/commonjs/shared/components/boundary/portal/components/portal-boundary-host.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","_reactNativeReanimated","_interopRequireWildcard","_constants","
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNative","_reactNativeReanimated","_interopRequireWildcard","_constants","_composeSlotStyle","_links","_teleport","_hasLocalSlot","_offsetStyle","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","AnimatedPortalBoundaryHost","NativePortalHost","Animated","createAnimatedComponent","PortalBoundaryHost","exports","memo","host","style","hostStyle","useAnimatedStyle","link","getLink","pairKey","boundaryId","source","destination","NO_STYLES","sourceBounds","bounds","isCrossScreenPortal","screenKey","resolvePortalOffsetStyle","hostKey","placement","contentFrameStyle","height","width","slotStyle","escapeClipping","hasLocalSlot","localStylesMaps","slot","slotsMap","composeSlotStyleWithLocalTransform","undefined","boundsLocalTransform","jsx","View","pointerEvents","collapsable","children","name","portalHostName","styles","content","StyleSheet","create","left","position","top"],"sourceRoot":"../../../../../../../src","sources":["shared/components/boundary/portal/components/portal-boundary-host.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,sBAAA,GAAAC,uBAAA,CAAAH,OAAA;AACA,IAAAI,UAAA,GAAAJ,OAAA;AACA,IAAAK,iBAAA,GAAAL,OAAA;AACA,IAAAM,MAAA,GAAAN,OAAA;AAGA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