react-native-screen-transitions 3.8.0 → 3.9.0-alpha.1
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/blank-stack/components/stack-view.js +2 -1
- package/lib/commonjs/blank-stack/components/stack-view.js.map +1 -1
- package/lib/commonjs/shared/components/{create-boundary-component → boundary}/components/boundary-target.js +21 -8
- package/lib/commonjs/shared/components/boundary/components/boundary-target.js.map +1 -0
- package/lib/commonjs/shared/components/{create-boundary-component → boundary}/create-boundary-component.js +18 -24
- package/lib/commonjs/shared/components/boundary/create-boundary-component.js.map +1 -0
- package/lib/commonjs/shared/components/boundary/hooks/use-boundary-presence.js.map +1 -0
- package/lib/commonjs/shared/components/boundary/hooks/use-initial-destination-measurement.js +115 -0
- package/lib/commonjs/shared/components/boundary/hooks/use-initial-destination-measurement.js.map +1 -0
- package/lib/commonjs/shared/components/{create-boundary-component → boundary}/hooks/use-initial-source-measurement.js +4 -5
- package/lib/commonjs/shared/components/boundary/hooks/use-initial-source-measurement.js.map +1 -0
- package/lib/commonjs/shared/components/{create-boundary-component → boundary}/hooks/use-measurer.js +26 -22
- package/lib/commonjs/shared/components/boundary/hooks/use-measurer.js.map +1 -0
- package/lib/commonjs/shared/components/{create-boundary-component → boundary}/hooks/use-refresh-boundary.js +10 -7
- package/lib/commonjs/shared/components/boundary/hooks/use-refresh-boundary.js.map +1 -0
- package/lib/commonjs/shared/components/{create-boundary-component → boundary}/index.js +8 -1
- package/lib/commonjs/shared/components/boundary/index.js.map +1 -0
- package/lib/commonjs/shared/components/boundary/portal/components/host.js +99 -0
- package/lib/commonjs/shared/components/boundary/portal/components/host.js.map +1 -0
- package/lib/commonjs/shared/components/boundary/portal/components/portal-boundary-host.js +74 -0
- package/lib/commonjs/shared/components/boundary/portal/components/portal-boundary-host.js.map +1 -0
- package/lib/commonjs/shared/components/boundary/portal/components/portal-provider.js +20 -0
- package/lib/commonjs/shared/components/boundary/portal/components/portal-provider.js.map +1 -0
- package/lib/commonjs/shared/components/boundary/portal/components/portal.js +198 -0
- package/lib/commonjs/shared/components/boundary/portal/components/portal.js.map +1 -0
- package/lib/commonjs/shared/components/boundary/portal/hooks/use-host-measurement.js +74 -0
- package/lib/commonjs/shared/components/boundary/portal/hooks/use-host-measurement.js.map +1 -0
- package/lib/commonjs/shared/components/boundary/portal/index.js +27 -0
- package/lib/commonjs/shared/components/boundary/portal/index.js.map +1 -0
- package/lib/commonjs/shared/components/boundary/portal/stores/host-bounds.store.js +47 -0
- package/lib/commonjs/shared/components/boundary/portal/stores/host-bounds.store.js.map +1 -0
- package/lib/commonjs/shared/components/boundary/portal/stores/host-registry.store.js +137 -0
- package/lib/commonjs/shared/components/boundary/portal/stores/host-registry.store.js.map +1 -0
- package/lib/commonjs/shared/components/boundary/portal/stores/portal-boundary-host.store.js +60 -0
- package/lib/commonjs/shared/components/boundary/portal/stores/portal-boundary-host.store.js.map +1 -0
- package/lib/commonjs/shared/components/boundary/portal/teleport.js +23 -0
- package/lib/commonjs/shared/components/boundary/portal/teleport.js.map +1 -0
- package/lib/commonjs/shared/components/boundary/portal/utils/attachment.js +40 -0
- package/lib/commonjs/shared/components/boundary/portal/utils/attachment.js.map +1 -0
- package/lib/commonjs/shared/components/boundary/portal/utils/naming.js +15 -0
- package/lib/commonjs/shared/components/boundary/portal/utils/naming.js.map +1 -0
- package/lib/commonjs/shared/components/boundary/portal/utils/offset-style.js +71 -0
- package/lib/commonjs/shared/components/boundary/portal/utils/offset-style.js.map +1 -0
- package/lib/commonjs/shared/components/boundary/portal/utils/teleport-control.js +16 -0
- package/lib/commonjs/shared/components/boundary/portal/utils/teleport-control.js.map +1 -0
- package/lib/commonjs/shared/components/{create-boundary-component → boundary}/providers/boundary-owner.provider.js +26 -25
- package/lib/commonjs/shared/components/boundary/providers/boundary-owner.provider.js.map +1 -0
- package/lib/commonjs/shared/components/boundary/types.js.map +1 -0
- package/lib/commonjs/shared/components/boundary/utils/destination-signals.js +25 -0
- package/lib/commonjs/shared/components/boundary/utils/destination-signals.js.map +1 -0
- package/lib/commonjs/shared/components/{create-boundary-component → boundary}/utils/measured-bounds.js +19 -9
- package/lib/commonjs/shared/components/boundary/utils/measured-bounds.js.map +1 -0
- package/lib/commonjs/shared/components/boundary/utils/refresh-signals.js +105 -0
- package/lib/commonjs/shared/components/boundary/utils/refresh-signals.js.map +1 -0
- package/lib/commonjs/shared/components/boundary/utils/source-signals.js +48 -0
- package/lib/commonjs/shared/components/boundary/utils/source-signals.js.map +1 -0
- package/lib/commonjs/shared/components/create-transition-aware-component.js +8 -3
- package/lib/commonjs/shared/components/create-transition-aware-component.js.map +1 -1
- package/lib/commonjs/shared/components/{integrations/masked-view.js → masked-view.js} +2 -2
- package/lib/commonjs/shared/components/masked-view.js.map +1 -0
- package/lib/commonjs/shared/components/screen-container/layers/content.js +9 -5
- package/lib/commonjs/shared/components/screen-container/layers/content.js.map +1 -1
- package/lib/commonjs/shared/configs/presets.js +6 -6
- package/lib/commonjs/shared/configs/presets.js.map +1 -1
- package/lib/commonjs/shared/hooks/navigation/use-stack.js +17 -2
- package/lib/commonjs/shared/hooks/navigation/use-stack.js.map +1 -1
- package/lib/commonjs/shared/index.js +4 -4
- package/lib/commonjs/shared/index.js.map +1 -1
- package/lib/commonjs/shared/providers/helpers/measured-bounds-writes.js +4 -2
- package/lib/commonjs/shared/providers/helpers/measured-bounds-writes.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/animation/helpers/pipeline.js +4 -13
- package/lib/commonjs/shared/providers/screen/animation/helpers/pipeline.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/animation/helpers/stack-progress.js +23 -12
- package/lib/commonjs/shared/providers/screen/animation/helpers/stack-progress.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/animation/helpers/use-build-transition-state.js +1 -0
- package/lib/commonjs/shared/providers/screen/animation/helpers/use-build-transition-state.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/descriptors/descriptors.provider.js +7 -3
- package/lib/commonjs/shared/providers/screen/descriptors/descriptors.provider.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/descriptors/helpers/derive-descriptor-derivations.js +8 -1
- package/lib/commonjs/shared/providers/screen/descriptors/helpers/derive-descriptor-derivations.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/descriptors/helpers/get-ancestor-keys.js +21 -6
- package/lib/commonjs/shared/providers/screen/descriptors/helpers/get-ancestor-keys.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/origin.provider.js +41 -0
- package/lib/commonjs/shared/providers/screen/origin.provider.js.map +1 -0
- package/lib/commonjs/shared/providers/screen/styles/constants.js +2 -0
- package/lib/commonjs/shared/providers/screen/styles/constants.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/styles/helpers/resolve-slot-styles/are-resettable-states-equal.js +58 -0
- package/lib/commonjs/shared/providers/screen/styles/helpers/resolve-slot-styles/are-resettable-states-equal.js.map +1 -0
- package/lib/commonjs/shared/providers/screen/styles/helpers/resolve-slot-styles/index.js +7 -0
- package/lib/commonjs/shared/providers/screen/styles/helpers/resolve-slot-styles/index.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/styles/hooks/use-maybe-block-visibility.js +2 -1
- package/lib/commonjs/shared/providers/screen/styles/hooks/use-maybe-block-visibility.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/styles/styles.provider.js +7 -5
- package/lib/commonjs/shared/providers/screen/styles/styles.provider.js.map +1 -1
- package/lib/commonjs/shared/stores/animation.store.js +2 -0
- package/lib/commonjs/shared/stores/animation.store.js.map +1 -1
- package/lib/commonjs/shared/stores/bounds/helpers/link-pairs.helpers.js +1 -10
- package/lib/commonjs/shared/stores/bounds/helpers/link-pairs.helpers.js.map +1 -1
- package/lib/commonjs/shared/stores/bounds/index.js.map +1 -1
- package/lib/commonjs/shared/stores/bounds/internals/entries.js.map +1 -1
- package/lib/commonjs/shared/stores/bounds/internals/links.js +36 -19
- package/lib/commonjs/shared/stores/bounds/internals/links.js.map +1 -1
- package/lib/commonjs/shared/stores/bounds/internals/resolver.js +6 -4
- package/lib/commonjs/shared/stores/bounds/internals/resolver.js.map +1 -1
- package/lib/commonjs/shared/stores/bounds/internals/state.js.map +1 -1
- package/lib/commonjs/shared/stores/scroll.store.js +54 -1
- package/lib/commonjs/shared/stores/scroll.store.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/helpers/create-bound-tag.js +38 -4
- package/lib/commonjs/shared/utils/bounds/helpers/create-bound-tag.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/helpers/create-bounds-accessor-core.js +40 -87
- package/lib/commonjs/shared/utils/bounds/helpers/create-bounds-accessor-core.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/helpers/create-link-accessor.js +6 -67
- package/lib/commonjs/shared/utils/bounds/helpers/create-link-accessor.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/helpers/prepare-bound-styles.js +8 -12
- package/lib/commonjs/shared/utils/bounds/helpers/prepare-bound-styles.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/helpers/styles/composers.js +235 -68
- package/lib/commonjs/shared/utils/bounds/helpers/styles/composers.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/helpers/styles/compute.js +74 -4
- package/lib/commonjs/shared/utils/bounds/helpers/styles/compute.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/navigation/reveal/build.js +5 -9
- package/lib/commonjs/shared/utils/bounds/navigation/reveal/build.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/navigation/zoom/build.js +5 -10
- package/lib/commonjs/shared/utils/bounds/navigation/zoom/build.js.map +1 -1
- package/lib/module/blank-stack/components/stack-view.js +3 -2
- package/lib/module/blank-stack/components/stack-view.js.map +1 -1
- package/lib/module/shared/components/{create-boundary-component → boundary}/components/boundary-target.js +21 -8
- package/lib/module/shared/components/boundary/components/boundary-target.js.map +1 -0
- package/lib/module/shared/components/{create-boundary-component → boundary}/create-boundary-component.js +20 -26
- package/lib/module/shared/components/boundary/create-boundary-component.js.map +1 -0
- package/lib/module/shared/components/boundary/hooks/use-boundary-presence.js.map +1 -0
- package/lib/module/shared/components/boundary/hooks/use-initial-destination-measurement.js +110 -0
- package/lib/module/shared/components/boundary/hooks/use-initial-destination-measurement.js.map +1 -0
- package/lib/module/shared/components/{create-boundary-component → boundary}/hooks/use-initial-source-measurement.js +4 -5
- package/lib/module/shared/components/boundary/hooks/use-initial-source-measurement.js.map +1 -0
- package/lib/module/shared/components/{create-boundary-component → boundary}/hooks/use-measurer.js +27 -23
- package/lib/module/shared/components/boundary/hooks/use-measurer.js.map +1 -0
- package/lib/module/shared/components/{create-boundary-component → boundary}/hooks/use-refresh-boundary.js +10 -7
- package/lib/module/shared/components/boundary/hooks/use-refresh-boundary.js.map +1 -0
- package/lib/module/shared/components/{create-boundary-component → boundary}/index.js +8 -1
- package/lib/module/shared/components/boundary/index.js.map +1 -0
- package/lib/module/shared/components/boundary/portal/components/host.js +94 -0
- package/lib/module/shared/components/boundary/portal/components/host.js.map +1 -0
- package/lib/module/shared/components/boundary/portal/components/portal-boundary-host.js +69 -0
- package/lib/module/shared/components/boundary/portal/components/portal-boundary-host.js.map +1 -0
- package/lib/module/shared/components/boundary/portal/components/portal-provider.js +16 -0
- package/lib/module/shared/components/boundary/portal/components/portal-provider.js.map +1 -0
- package/lib/module/shared/components/boundary/portal/components/portal.js +193 -0
- package/lib/module/shared/components/boundary/portal/components/portal.js.map +1 -0
- package/lib/module/shared/components/boundary/portal/hooks/use-host-measurement.js +69 -0
- package/lib/module/shared/components/boundary/portal/hooks/use-host-measurement.js.map +1 -0
- package/lib/module/shared/components/boundary/portal/index.js +6 -0
- package/lib/module/shared/components/boundary/portal/index.js.map +1 -0
- package/lib/module/shared/components/boundary/portal/stores/host-bounds.store.js +40 -0
- package/lib/module/shared/components/boundary/portal/stores/host-bounds.store.js.map +1 -0
- package/lib/module/shared/components/boundary/portal/stores/host-registry.store.js +126 -0
- package/lib/module/shared/components/boundary/portal/stores/host-registry.store.js.map +1 -0
- package/lib/module/shared/components/boundary/portal/stores/portal-boundary-host.store.js +53 -0
- package/lib/module/shared/components/boundary/portal/stores/portal-boundary-host.store.js.map +1 -0
- package/lib/module/shared/components/boundary/portal/teleport.js +19 -0
- package/lib/module/shared/components/boundary/portal/teleport.js.map +1 -0
- package/lib/module/shared/components/boundary/portal/utils/attachment.js +35 -0
- package/lib/module/shared/components/boundary/portal/utils/attachment.js.map +1 -0
- package/lib/module/shared/components/boundary/portal/utils/naming.js +10 -0
- package/lib/module/shared/components/boundary/portal/utils/naming.js.map +1 -0
- package/lib/module/shared/components/boundary/portal/utils/offset-style.js +66 -0
- package/lib/module/shared/components/boundary/portal/utils/offset-style.js.map +1 -0
- package/lib/module/shared/components/boundary/portal/utils/teleport-control.js +11 -0
- package/lib/module/shared/components/boundary/portal/utils/teleport-control.js.map +1 -0
- package/lib/module/shared/components/boundary/providers/boundary-owner.provider.js +60 -0
- package/lib/module/shared/components/boundary/providers/boundary-owner.provider.js.map +1 -0
- package/lib/module/shared/components/boundary/types.js.map +1 -0
- package/lib/module/shared/components/boundary/utils/destination-signals.js +20 -0
- package/lib/module/shared/components/boundary/utils/destination-signals.js.map +1 -0
- package/lib/module/shared/components/{create-boundary-component → boundary}/utils/measured-bounds.js +16 -7
- package/lib/module/shared/components/boundary/utils/measured-bounds.js.map +1 -0
- package/lib/module/shared/components/boundary/utils/refresh-signals.js +100 -0
- package/lib/module/shared/components/boundary/utils/refresh-signals.js.map +1 -0
- package/lib/module/shared/components/boundary/utils/source-signals.js +43 -0
- package/lib/module/shared/components/boundary/utils/source-signals.js.map +1 -0
- package/lib/module/shared/components/create-transition-aware-component.js +8 -3
- package/lib/module/shared/components/create-transition-aware-component.js.map +1 -1
- package/lib/module/shared/components/{integrations/masked-view.js → masked-view.js} +2 -2
- package/lib/module/shared/components/masked-view.js.map +1 -0
- package/lib/module/shared/components/screen-container/layers/content.js +10 -6
- package/lib/module/shared/components/screen-container/layers/content.js.map +1 -1
- package/lib/module/shared/configs/presets.js +6 -6
- package/lib/module/shared/configs/presets.js.map +1 -1
- package/lib/module/shared/hooks/navigation/use-stack.js +19 -4
- package/lib/module/shared/hooks/navigation/use-stack.js.map +1 -1
- package/lib/module/shared/index.js +2 -2
- package/lib/module/shared/index.js.map +1 -1
- package/lib/module/shared/providers/helpers/measured-bounds-writes.js +4 -2
- package/lib/module/shared/providers/helpers/measured-bounds-writes.js.map +1 -1
- package/lib/module/shared/providers/screen/animation/helpers/pipeline.js +5 -14
- package/lib/module/shared/providers/screen/animation/helpers/pipeline.js.map +1 -1
- package/lib/module/shared/providers/screen/animation/helpers/stack-progress.js +20 -10
- package/lib/module/shared/providers/screen/animation/helpers/stack-progress.js.map +1 -1
- package/lib/module/shared/providers/screen/animation/helpers/use-build-transition-state.js +1 -0
- package/lib/module/shared/providers/screen/animation/helpers/use-build-transition-state.js.map +1 -1
- package/lib/module/shared/providers/screen/descriptors/descriptors.provider.js +8 -4
- package/lib/module/shared/providers/screen/descriptors/descriptors.provider.js.map +1 -1
- package/lib/module/shared/providers/screen/descriptors/helpers/derive-descriptor-derivations.js +8 -1
- package/lib/module/shared/providers/screen/descriptors/helpers/derive-descriptor-derivations.js.map +1 -1
- package/lib/module/shared/providers/screen/descriptors/helpers/get-ancestor-keys.js +20 -6
- package/lib/module/shared/providers/screen/descriptors/helpers/get-ancestor-keys.js.map +1 -1
- package/lib/module/shared/providers/screen/origin.provider.js +33 -0
- package/lib/module/shared/providers/screen/origin.provider.js.map +1 -0
- package/lib/module/shared/providers/screen/styles/constants.js +2 -0
- package/lib/module/shared/providers/screen/styles/constants.js.map +1 -1
- package/lib/module/shared/providers/screen/styles/helpers/resolve-slot-styles/are-resettable-states-equal.js +53 -0
- package/lib/module/shared/providers/screen/styles/helpers/resolve-slot-styles/are-resettable-states-equal.js.map +1 -0
- package/lib/module/shared/providers/screen/styles/helpers/resolve-slot-styles/index.js +1 -0
- package/lib/module/shared/providers/screen/styles/helpers/resolve-slot-styles/index.js.map +1 -1
- package/lib/module/shared/providers/screen/styles/hooks/use-maybe-block-visibility.js +2 -1
- package/lib/module/shared/providers/screen/styles/hooks/use-maybe-block-visibility.js.map +1 -1
- package/lib/module/shared/providers/screen/styles/styles.provider.js +7 -5
- package/lib/module/shared/providers/screen/styles/styles.provider.js.map +1 -1
- package/lib/module/shared/stores/animation.store.js +2 -0
- package/lib/module/shared/stores/animation.store.js.map +1 -1
- package/lib/module/shared/stores/bounds/helpers/link-pairs.helpers.js +1 -8
- package/lib/module/shared/stores/bounds/helpers/link-pairs.helpers.js.map +1 -1
- package/lib/module/shared/stores/bounds/index.js.map +1 -1
- package/lib/module/shared/stores/bounds/internals/entries.js.map +1 -1
- package/lib/module/shared/stores/bounds/internals/links.js +36 -19
- package/lib/module/shared/stores/bounds/internals/links.js.map +1 -1
- package/lib/module/shared/stores/bounds/internals/resolver.js +6 -4
- package/lib/module/shared/stores/bounds/internals/resolver.js.map +1 -1
- package/lib/module/shared/stores/bounds/internals/state.js.map +1 -1
- package/lib/module/shared/stores/scroll.store.js +50 -0
- package/lib/module/shared/stores/scroll.store.js.map +1 -1
- package/lib/module/shared/types/animation.types.js.map +1 -1
- package/lib/module/shared/types/bounds.types.js.map +1 -1
- package/lib/module/shared/utils/bounds/helpers/create-bound-tag.js +36 -3
- package/lib/module/shared/utils/bounds/helpers/create-bound-tag.js.map +1 -1
- package/lib/module/shared/utils/bounds/helpers/create-bounds-accessor-core.js +42 -89
- package/lib/module/shared/utils/bounds/helpers/create-bounds-accessor-core.js.map +1 -1
- package/lib/module/shared/utils/bounds/helpers/create-link-accessor.js +6 -67
- package/lib/module/shared/utils/bounds/helpers/create-link-accessor.js.map +1 -1
- package/lib/module/shared/utils/bounds/helpers/prepare-bound-styles.js +8 -13
- package/lib/module/shared/utils/bounds/helpers/prepare-bound-styles.js.map +1 -1
- package/lib/module/shared/utils/bounds/helpers/styles/composers.js +236 -69
- package/lib/module/shared/utils/bounds/helpers/styles/composers.js.map +1 -1
- package/lib/module/shared/utils/bounds/helpers/styles/compute.js +74 -4
- package/lib/module/shared/utils/bounds/helpers/styles/compute.js.map +1 -1
- package/lib/module/shared/utils/bounds/navigation/reveal/build.js +5 -9
- package/lib/module/shared/utils/bounds/navigation/reveal/build.js.map +1 -1
- package/lib/module/shared/utils/bounds/navigation/zoom/build.js +5 -10
- package/lib/module/shared/utils/bounds/navigation/zoom/build.js.map +1 -1
- package/lib/typescript/blank-stack/components/stack-view.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/components/boundary-target.d.ts.map +1 -0
- package/lib/typescript/shared/components/boundary/create-boundary-component.d.ts.map +1 -0
- package/lib/typescript/shared/components/boundary/hooks/use-boundary-presence.d.ts.map +1 -0
- package/lib/typescript/shared/components/{create-boundary-component → boundary}/hooks/use-initial-destination-measurement.d.ts +1 -4
- package/lib/typescript/shared/components/boundary/hooks/use-initial-destination-measurement.d.ts.map +1 -0
- package/lib/typescript/shared/components/{create-boundary-component → boundary}/hooks/use-initial-source-measurement.d.ts +0 -2
- package/lib/typescript/shared/components/boundary/hooks/use-initial-source-measurement.d.ts.map +1 -0
- package/lib/typescript/shared/components/{create-boundary-component → boundary}/hooks/use-measurer.d.ts +4 -2
- package/lib/typescript/shared/components/boundary/hooks/use-measurer.d.ts.map +1 -0
- package/lib/typescript/shared/components/boundary/hooks/use-refresh-boundary.d.ts +10 -0
- package/lib/typescript/shared/components/boundary/hooks/use-refresh-boundary.d.ts.map +1 -0
- package/lib/typescript/shared/components/{create-boundary-component → boundary}/index.d.ts +8 -2
- package/lib/typescript/shared/components/boundary/index.d.ts.map +1 -0
- package/lib/typescript/shared/components/boundary/portal/components/host.d.ts +7 -0
- package/lib/typescript/shared/components/boundary/portal/components/host.d.ts.map +1 -0
- package/lib/typescript/shared/components/boundary/portal/components/portal-boundary-host.d.ts +9 -0
- package/lib/typescript/shared/components/boundary/portal/components/portal-boundary-host.d.ts.map +1 -0
- package/lib/typescript/shared/components/boundary/portal/components/portal-provider.d.ts +4 -0
- package/lib/typescript/shared/components/boundary/portal/components/portal-provider.d.ts.map +1 -0
- package/lib/typescript/shared/components/boundary/portal/components/portal.d.ts +19 -0
- package/lib/typescript/shared/components/boundary/portal/components/portal.d.ts.map +1 -0
- package/lib/typescript/shared/components/boundary/portal/hooks/use-host-measurement.d.ts +13 -0
- package/lib/typescript/shared/components/boundary/portal/hooks/use-host-measurement.d.ts.map +1 -0
- package/lib/typescript/shared/components/boundary/portal/index.d.ts +4 -0
- package/lib/typescript/shared/components/boundary/portal/index.d.ts.map +1 -0
- package/lib/typescript/shared/components/boundary/portal/stores/host-bounds.store.d.ts +9 -0
- package/lib/typescript/shared/components/boundary/portal/stores/host-bounds.store.d.ts.map +1 -0
- package/lib/typescript/shared/components/boundary/portal/stores/host-registry.store.d.ts +19 -0
- package/lib/typescript/shared/components/boundary/portal/stores/host-registry.store.d.ts.map +1 -0
- package/lib/typescript/shared/components/boundary/portal/stores/portal-boundary-host.store.d.ts +11 -0
- package/lib/typescript/shared/components/boundary/portal/stores/portal-boundary-host.store.d.ts.map +1 -0
- package/lib/typescript/shared/components/boundary/portal/teleport.d.ts +6 -0
- package/lib/typescript/shared/components/boundary/portal/teleport.d.ts.map +1 -0
- package/lib/typescript/shared/components/boundary/portal/utils/attachment.d.ts +21 -0
- package/lib/typescript/shared/components/boundary/portal/utils/attachment.d.ts.map +1 -0
- package/lib/typescript/shared/components/boundary/portal/utils/naming.d.ts +3 -0
- package/lib/typescript/shared/components/boundary/portal/utils/naming.d.ts.map +1 -0
- package/lib/typescript/shared/components/boundary/portal/utils/offset-style.d.ts +37 -0
- package/lib/typescript/shared/components/boundary/portal/utils/offset-style.d.ts.map +1 -0
- package/lib/typescript/shared/components/boundary/portal/utils/teleport-control.d.ts +3 -0
- package/lib/typescript/shared/components/boundary/portal/utils/teleport-control.d.ts.map +1 -0
- package/lib/typescript/shared/components/{create-boundary-component → boundary}/providers/boundary-owner.provider.d.ts +14 -6
- package/lib/typescript/shared/components/boundary/providers/boundary-owner.provider.d.ts.map +1 -0
- package/lib/typescript/shared/components/boundary/types.d.ts +78 -0
- package/lib/typescript/shared/components/boundary/types.d.ts.map +1 -0
- package/lib/typescript/shared/components/{create-boundary-component → boundary}/utils/destination-signals.d.ts +2 -3
- package/lib/typescript/shared/components/boundary/utils/destination-signals.d.ts.map +1 -0
- package/lib/typescript/shared/components/boundary/utils/measured-bounds.d.ts +12 -0
- package/lib/typescript/shared/components/boundary/utils/measured-bounds.d.ts.map +1 -0
- package/lib/typescript/shared/components/{create-boundary-component → boundary}/utils/refresh-signals.d.ts +4 -3
- package/lib/typescript/shared/components/boundary/utils/refresh-signals.d.ts.map +1 -0
- package/lib/typescript/shared/components/{create-boundary-component → boundary}/utils/source-signals.d.ts +1 -2
- package/lib/typescript/shared/components/boundary/utils/source-signals.d.ts.map +1 -0
- package/lib/typescript/shared/components/create-transition-aware-component.d.ts.map +1 -1
- package/lib/typescript/shared/components/masked-view.d.ts.map +1 -0
- package/lib/typescript/shared/components/screen-container/layers/content.d.ts.map +1 -1
- package/lib/typescript/shared/configs/presets.d.ts.map +1 -1
- package/lib/typescript/shared/hooks/navigation/use-stack.d.ts.map +1 -1
- package/lib/typescript/shared/index.d.ts +19 -17
- package/lib/typescript/shared/index.d.ts.map +1 -1
- package/lib/typescript/shared/providers/helpers/measured-bounds-writes.d.ts +3 -1
- package/lib/typescript/shared/providers/helpers/measured-bounds-writes.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/animation/helpers/hydrate-transition-state/types.d.ts +1 -0
- package/lib/typescript/shared/providers/screen/animation/helpers/hydrate-transition-state/types.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/animation/helpers/stack-progress.d.ts +2 -1
- package/lib/typescript/shared/providers/screen/animation/helpers/stack-progress.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/animation/helpers/use-build-transition-state.d.ts +1 -0
- package/lib/typescript/shared/providers/screen/animation/helpers/use-build-transition-state.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/descriptors/descriptors.provider.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/descriptors/helpers/derive-descriptor-derivations.d.ts +6 -1
- package/lib/typescript/shared/providers/screen/descriptors/helpers/derive-descriptor-derivations.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/descriptors/helpers/get-ancestor-keys.d.ts +9 -3
- package/lib/typescript/shared/providers/screen/descriptors/helpers/get-ancestor-keys.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/origin.provider.d.ts +11 -0
- package/lib/typescript/shared/providers/screen/origin.provider.d.ts.map +1 -0
- package/lib/typescript/shared/providers/screen/styles/constants.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/styles/helpers/resolve-slot-styles/are-resettable-states-equal.d.ts +3 -0
- package/lib/typescript/shared/providers/screen/styles/helpers/resolve-slot-styles/are-resettable-states-equal.d.ts.map +1 -0
- package/lib/typescript/shared/providers/screen/styles/helpers/resolve-slot-styles/index.d.ts +1 -0
- package/lib/typescript/shared/providers/screen/styles/helpers/resolve-slot-styles/index.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/styles/hooks/use-maybe-block-visibility.d.ts +1 -0
- package/lib/typescript/shared/providers/screen/styles/hooks/use-maybe-block-visibility.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/styles/styles.provider.d.ts +1 -0
- package/lib/typescript/shared/providers/screen/styles/styles.provider.d.ts.map +1 -1
- package/lib/typescript/shared/stores/animation.store.d.ts +1 -0
- package/lib/typescript/shared/stores/animation.store.d.ts.map +1 -1
- package/lib/typescript/shared/stores/bounds/helpers/link-pairs.helpers.d.ts +1 -3
- package/lib/typescript/shared/stores/bounds/helpers/link-pairs.helpers.d.ts.map +1 -1
- package/lib/typescript/shared/stores/bounds/index.d.ts +1 -1
- package/lib/typescript/shared/stores/bounds/index.d.ts.map +1 -1
- package/lib/typescript/shared/stores/bounds/internals/entries.d.ts +2 -2
- package/lib/typescript/shared/stores/bounds/internals/entries.d.ts.map +1 -1
- package/lib/typescript/shared/stores/bounds/internals/links.d.ts +2 -2
- 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/internals/state.d.ts +4 -2
- package/lib/typescript/shared/stores/bounds/internals/state.d.ts.map +1 -1
- package/lib/typescript/shared/stores/bounds/types.d.ts +47 -12
- package/lib/typescript/shared/stores/bounds/types.d.ts.map +1 -1
- package/lib/typescript/shared/stores/scroll.store.d.ts +12 -1
- package/lib/typescript/shared/stores/scroll.store.d.ts.map +1 -1
- package/lib/typescript/shared/types/animation.types.d.ts +13 -2
- package/lib/typescript/shared/types/animation.types.d.ts.map +1 -1
- package/lib/typescript/shared/types/bounds.types.d.ts +10 -40
- package/lib/typescript/shared/types/bounds.types.d.ts.map +1 -1
- package/lib/typescript/shared/types/index.d.ts +2 -2
- package/lib/typescript/shared/types/index.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/helpers/create-bound-tag.d.ts +2 -1
- package/lib/typescript/shared/utils/bounds/helpers/create-bound-tag.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/helpers/create-bounds-accessor-core.d.ts +7 -11
- package/lib/typescript/shared/utils/bounds/helpers/create-bounds-accessor-core.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/helpers/create-link-accessor.d.ts +0 -3
- package/lib/typescript/shared/utils/bounds/helpers/create-link-accessor.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/helpers/prepare-bound-styles.d.ts +7 -3
- package/lib/typescript/shared/utils/bounds/helpers/prepare-bound-styles.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/helpers/styles/composers.d.ts +3 -0
- package/lib/typescript/shared/utils/bounds/helpers/styles/composers.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/helpers/styles/compute.d.ts +1 -1
- package/lib/typescript/shared/utils/bounds/helpers/styles/compute.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/navigation/reveal/build.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/navigation/zoom/build.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/types/options.d.ts +93 -6
- package/lib/typescript/shared/utils/bounds/types/options.d.ts.map +1 -1
- package/package.json +8 -2
- package/src/blank-stack/components/stack-view.tsx +4 -3
- package/src/shared/components/{create-boundary-component → boundary}/components/boundary-target.tsx +28 -11
- package/src/shared/components/{create-boundary-component → boundary}/create-boundary-component.tsx +33 -31
- package/src/shared/components/boundary/hooks/use-initial-destination-measurement.ts +156 -0
- package/src/shared/components/{create-boundary-component → boundary}/hooks/use-initial-source-measurement.ts +5 -14
- package/src/shared/components/{create-boundary-component → boundary}/hooks/use-measurer.ts +42 -46
- package/src/shared/components/{create-boundary-component → boundary}/hooks/use-refresh-boundary.ts +16 -11
- package/src/shared/components/{create-boundary-component → boundary}/index.tsx +12 -0
- package/src/shared/components/boundary/portal/components/host.tsx +114 -0
- package/src/shared/components/boundary/portal/components/portal-boundary-host.tsx +97 -0
- package/src/shared/components/boundary/portal/components/portal-provider.tsx +14 -0
- package/src/shared/components/boundary/portal/components/portal.tsx +283 -0
- package/src/shared/components/boundary/portal/hooks/use-host-measurement.ts +102 -0
- package/src/shared/components/boundary/portal/index.ts +3 -0
- package/src/shared/components/boundary/portal/stores/host-bounds.store.ts +45 -0
- package/src/shared/components/boundary/portal/stores/host-registry.store.ts +182 -0
- package/src/shared/components/boundary/portal/stores/portal-boundary-host.store.ts +91 -0
- package/src/shared/components/boundary/portal/teleport.ts +21 -0
- package/src/shared/components/boundary/portal/utils/attachment.ts +48 -0
- package/src/shared/components/boundary/portal/utils/naming.ts +10 -0
- package/src/shared/components/boundary/portal/utils/offset-style.ts +171 -0
- package/src/shared/components/boundary/portal/utils/teleport-control.ts +13 -0
- package/src/shared/components/{create-boundary-component → boundary}/providers/boundary-owner.provider.tsx +41 -33
- package/src/shared/components/boundary/types.ts +92 -0
- package/src/shared/components/boundary/utils/destination-signals.ts +31 -0
- package/src/shared/components/{create-boundary-component → boundary}/utils/measured-bounds.ts +34 -11
- package/src/shared/components/boundary/utils/refresh-signals.ts +175 -0
- package/src/shared/components/boundary/utils/source-signals.ts +63 -0
- package/src/shared/components/create-transition-aware-component.tsx +8 -3
- package/src/shared/components/{integrations/masked-view.tsx → masked-view.tsx} +2 -2
- package/src/shared/components/screen-container/layers/content.tsx +12 -7
- package/src/shared/configs/presets.ts +2 -6
- package/src/shared/hooks/navigation/use-stack.tsx +32 -1
- package/src/shared/index.ts +13 -5
- package/src/shared/providers/helpers/measured-bounds-writes.ts +11 -1
- package/src/shared/providers/screen/animation/helpers/hydrate-transition-state/types.ts +1 -0
- package/src/shared/providers/screen/animation/helpers/pipeline.ts +13 -19
- package/src/shared/providers/screen/animation/helpers/stack-progress.ts +31 -16
- package/src/shared/providers/screen/animation/helpers/use-build-transition-state.ts +2 -0
- package/src/shared/providers/screen/descriptors/descriptors.provider.tsx +7 -3
- package/src/shared/providers/screen/descriptors/helpers/derive-descriptor-derivations.ts +16 -0
- package/src/shared/providers/screen/descriptors/helpers/get-ancestor-keys.ts +31 -6
- package/src/shared/providers/screen/origin.provider.tsx +38 -0
- package/src/shared/providers/screen/styles/constants.ts +2 -0
- package/src/shared/providers/screen/styles/helpers/resolve-slot-styles/are-resettable-states-equal.ts +74 -0
- package/src/shared/providers/screen/styles/helpers/resolve-slot-styles/index.ts +1 -0
- package/src/shared/providers/screen/styles/hooks/use-maybe-block-visibility.tsx +1 -0
- package/src/shared/providers/screen/styles/styles.provider.tsx +5 -3
- package/src/shared/stores/animation.store.ts +3 -0
- package/src/shared/stores/bounds/helpers/link-pairs.helpers.ts +1 -10
- package/src/shared/stores/bounds/index.ts +2 -4
- package/src/shared/stores/bounds/internals/entries.ts +4 -4
- package/src/shared/stores/bounds/internals/links.ts +52 -18
- package/src/shared/stores/bounds/internals/resolver.ts +5 -3
- package/src/shared/stores/bounds/internals/state.ts +5 -2
- package/src/shared/stores/bounds/types.ts +59 -15
- package/src/shared/stores/scroll.store.ts +68 -0
- package/src/shared/types/animation.types.ts +17 -2
- package/src/shared/types/bounds.types.ts +22 -60
- package/src/shared/types/index.ts +5 -0
- package/src/shared/utils/bounds/helpers/create-bound-tag.ts +46 -4
- package/src/shared/utils/bounds/helpers/create-bounds-accessor-core.ts +65 -116
- package/src/shared/utils/bounds/helpers/create-link-accessor.ts +10 -80
- package/src/shared/utils/bounds/helpers/prepare-bound-styles.ts +10 -13
- package/src/shared/utils/bounds/helpers/styles/composers.ts +269 -46
- package/src/shared/utils/bounds/helpers/styles/compute.ts +134 -2
- package/src/shared/utils/bounds/navigation/reveal/build.ts +5 -7
- package/src/shared/utils/bounds/navigation/zoom/build.ts +5 -8
- package/src/shared/utils/bounds/types/options.ts +105 -6
- package/lib/commonjs/shared/components/create-boundary-component/components/boundary-target.js.map +0 -1
- package/lib/commonjs/shared/components/create-boundary-component/create-boundary-component.js.map +0 -1
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-boundary-presence.js.map +0 -1
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-initial-destination-measurement.js +0 -99
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-initial-destination-measurement.js.map +0 -1
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-initial-source-measurement.js.map +0 -1
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-measurer.js.map +0 -1
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-refresh-boundary.js.map +0 -1
- package/lib/commonjs/shared/components/create-boundary-component/index.js.map +0 -1
- package/lib/commonjs/shared/components/create-boundary-component/providers/boundary-owner.provider.js.map +0 -1
- package/lib/commonjs/shared/components/create-boundary-component/types.js.map +0 -1
- package/lib/commonjs/shared/components/create-boundary-component/utils/destination-signals.js +0 -75
- package/lib/commonjs/shared/components/create-boundary-component/utils/destination-signals.js.map +0 -1
- package/lib/commonjs/shared/components/create-boundary-component/utils/measured-bounds.js.map +0 -1
- package/lib/commonjs/shared/components/create-boundary-component/utils/refresh-signals.js +0 -103
- package/lib/commonjs/shared/components/create-boundary-component/utils/refresh-signals.js.map +0 -1
- package/lib/commonjs/shared/components/create-boundary-component/utils/source-signals.js +0 -52
- package/lib/commonjs/shared/components/create-boundary-component/utils/source-signals.js.map +0 -1
- package/lib/commonjs/shared/components/integrations/masked-view.js.map +0 -1
- package/lib/commonjs/shared/utils/bounds/helpers/create-interpolators.js +0 -68
- package/lib/commonjs/shared/utils/bounds/helpers/create-interpolators.js.map +0 -1
- package/lib/commonjs/shared/utils/bounds/helpers/styles/interpolate-link-style.js +0 -30
- package/lib/commonjs/shared/utils/bounds/helpers/styles/interpolate-link-style.js.map +0 -1
- package/lib/module/shared/components/create-boundary-component/components/boundary-target.js.map +0 -1
- package/lib/module/shared/components/create-boundary-component/create-boundary-component.js.map +0 -1
- package/lib/module/shared/components/create-boundary-component/hooks/use-boundary-presence.js.map +0 -1
- package/lib/module/shared/components/create-boundary-component/hooks/use-initial-destination-measurement.js +0 -94
- package/lib/module/shared/components/create-boundary-component/hooks/use-initial-destination-measurement.js.map +0 -1
- package/lib/module/shared/components/create-boundary-component/hooks/use-initial-source-measurement.js.map +0 -1
- package/lib/module/shared/components/create-boundary-component/hooks/use-measurer.js.map +0 -1
- package/lib/module/shared/components/create-boundary-component/hooks/use-refresh-boundary.js.map +0 -1
- package/lib/module/shared/components/create-boundary-component/index.js.map +0 -1
- package/lib/module/shared/components/create-boundary-component/providers/boundary-owner.provider.js +0 -60
- package/lib/module/shared/components/create-boundary-component/providers/boundary-owner.provider.js.map +0 -1
- package/lib/module/shared/components/create-boundary-component/types.js.map +0 -1
- package/lib/module/shared/components/create-boundary-component/utils/destination-signals.js +0 -70
- package/lib/module/shared/components/create-boundary-component/utils/destination-signals.js.map +0 -1
- package/lib/module/shared/components/create-boundary-component/utils/measured-bounds.js.map +0 -1
- package/lib/module/shared/components/create-boundary-component/utils/refresh-signals.js +0 -98
- package/lib/module/shared/components/create-boundary-component/utils/refresh-signals.js.map +0 -1
- package/lib/module/shared/components/create-boundary-component/utils/source-signals.js +0 -47
- package/lib/module/shared/components/create-boundary-component/utils/source-signals.js.map +0 -1
- package/lib/module/shared/components/integrations/masked-view.js.map +0 -1
- package/lib/module/shared/utils/bounds/helpers/create-interpolators.js +0 -63
- package/lib/module/shared/utils/bounds/helpers/create-interpolators.js.map +0 -1
- package/lib/module/shared/utils/bounds/helpers/styles/interpolate-link-style.js +0 -26
- package/lib/module/shared/utils/bounds/helpers/styles/interpolate-link-style.js.map +0 -1
- package/lib/typescript/shared/components/create-boundary-component/components/boundary-target.d.ts.map +0 -1
- package/lib/typescript/shared/components/create-boundary-component/create-boundary-component.d.ts.map +0 -1
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-boundary-presence.d.ts.map +0 -1
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-initial-destination-measurement.d.ts.map +0 -1
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-initial-source-measurement.d.ts.map +0 -1
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-measurer.d.ts.map +0 -1
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-refresh-boundary.d.ts +0 -14
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-refresh-boundary.d.ts.map +0 -1
- package/lib/typescript/shared/components/create-boundary-component/index.d.ts.map +0 -1
- package/lib/typescript/shared/components/create-boundary-component/providers/boundary-owner.provider.d.ts.map +0 -1
- package/lib/typescript/shared/components/create-boundary-component/types.d.ts +0 -37
- package/lib/typescript/shared/components/create-boundary-component/types.d.ts.map +0 -1
- package/lib/typescript/shared/components/create-boundary-component/utils/destination-signals.d.ts.map +0 -1
- package/lib/typescript/shared/components/create-boundary-component/utils/measured-bounds.d.ts +0 -8
- package/lib/typescript/shared/components/create-boundary-component/utils/measured-bounds.d.ts.map +0 -1
- package/lib/typescript/shared/components/create-boundary-component/utils/refresh-signals.d.ts.map +0 -1
- package/lib/typescript/shared/components/create-boundary-component/utils/source-signals.d.ts.map +0 -1
- package/lib/typescript/shared/components/integrations/masked-view.d.ts.map +0 -1
- package/lib/typescript/shared/utils/bounds/helpers/create-interpolators.d.ts +0 -14
- package/lib/typescript/shared/utils/bounds/helpers/create-interpolators.d.ts.map +0 -1
- package/lib/typescript/shared/utils/bounds/helpers/styles/interpolate-link-style.d.ts +0 -17
- package/lib/typescript/shared/utils/bounds/helpers/styles/interpolate-link-style.d.ts.map +0 -1
- package/src/shared/components/create-boundary-component/hooks/use-initial-destination-measurement.ts +0 -130
- package/src/shared/components/create-boundary-component/types.ts +0 -48
- package/src/shared/components/create-boundary-component/utils/destination-signals.ts +0 -129
- package/src/shared/components/create-boundary-component/utils/refresh-signals.ts +0 -164
- package/src/shared/components/create-boundary-component/utils/source-signals.ts +0 -72
- package/src/shared/utils/bounds/helpers/create-interpolators.ts +0 -117
- package/src/shared/utils/bounds/helpers/styles/interpolate-link-style.ts +0 -43
- /package/lib/commonjs/shared/components/{create-boundary-component → boundary}/hooks/use-boundary-presence.js +0 -0
- /package/lib/commonjs/shared/components/{create-boundary-component → boundary}/types.js +0 -0
- /package/lib/module/shared/components/{create-boundary-component → boundary}/hooks/use-boundary-presence.js +0 -0
- /package/lib/module/shared/components/{create-boundary-component → boundary}/types.js +0 -0
- /package/lib/typescript/shared/components/{create-boundary-component → boundary}/components/boundary-target.d.ts +0 -0
- /package/lib/typescript/shared/components/{create-boundary-component → boundary}/create-boundary-component.d.ts +0 -0
- /package/lib/typescript/shared/components/{create-boundary-component → boundary}/hooks/use-boundary-presence.d.ts +0 -0
- /package/lib/typescript/shared/components/{integrations/masked-view.d.ts → masked-view.d.ts} +0 -0
- /package/src/shared/components/{create-boundary-component → boundary}/hooks/use-boundary-presence.ts +0 -0
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.useActiveHostKey = exports.unregisterHost = exports.resetHostRegistry = exports.registerHost = exports.getHostCapturesScroll = exports.getActiveScrollHost = exports.getActiveHostKey = void 0;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _reactNativeReanimated = require("react-native-reanimated");
|
|
9
|
+
const EMPTY_SNAPSHOT = {};
|
|
10
|
+
const listeners = new Set();
|
|
11
|
+
const hostStacks = new Map();
|
|
12
|
+
let snapshot = EMPTY_SNAPSHOT;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* UI-readable mirror of each screen's active host, kept only for hosts that
|
|
16
|
+
* capture scroll. Measurement worklets read it to record which scroll-scoped
|
|
17
|
+
* host a source boundary originated from — at measure time, without any React
|
|
18
|
+
* subscription on the boundary itself.
|
|
19
|
+
*/
|
|
20
|
+
const activeScrollHosts = (0, _reactNativeReanimated.makeMutable)({});
|
|
21
|
+
const getActiveHostFromStack = (screenKey, stack) => {
|
|
22
|
+
if (!stack || stack.length === 0) {
|
|
23
|
+
return screenKey;
|
|
24
|
+
}
|
|
25
|
+
for (let index = stack.length - 1; index >= 0; index--) {
|
|
26
|
+
const host = stack[index];
|
|
27
|
+
if (!host.fallback) {
|
|
28
|
+
return host.hostKey;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
return stack[0]?.hostKey ?? screenKey;
|
|
32
|
+
};
|
|
33
|
+
const buildSnapshot = () => {
|
|
34
|
+
const nextSnapshot = {};
|
|
35
|
+
for (const [screenKey, stack] of hostStacks) {
|
|
36
|
+
nextSnapshot[screenKey] = getActiveHostFromStack(screenKey, stack);
|
|
37
|
+
}
|
|
38
|
+
return nextSnapshot;
|
|
39
|
+
};
|
|
40
|
+
const buildScrollHostSnapshot = () => {
|
|
41
|
+
const nextSnapshot = {};
|
|
42
|
+
for (const [screenKey, stack] of hostStacks) {
|
|
43
|
+
const activeHostKey = getActiveHostFromStack(screenKey, stack);
|
|
44
|
+
const activeHost = stack.find(host => host.hostKey === activeHostKey);
|
|
45
|
+
if (activeHost?.capturesScroll) {
|
|
46
|
+
nextSnapshot[screenKey] = {
|
|
47
|
+
hostKey: activeHost.hostKey,
|
|
48
|
+
capturesScroll: true
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
return nextSnapshot;
|
|
53
|
+
};
|
|
54
|
+
const emit = () => {
|
|
55
|
+
snapshot = buildSnapshot();
|
|
56
|
+
activeScrollHosts.set(buildScrollHostSnapshot());
|
|
57
|
+
for (const listener of listeners) {
|
|
58
|
+
listener();
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
const subscribe = listener => {
|
|
62
|
+
listeners.add(listener);
|
|
63
|
+
return () => {
|
|
64
|
+
listeners.delete(listener);
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
const registerHost = registration => {
|
|
68
|
+
const stack = hostStacks.get(registration.screenKey) ?? [];
|
|
69
|
+
const previousActiveHostKey = getActiveHostFromStack(registration.screenKey, stack);
|
|
70
|
+
const nextStack = stack.filter(host => host.hostKey !== registration.hostKey);
|
|
71
|
+
if (registration.fallback) {
|
|
72
|
+
nextStack.unshift(registration);
|
|
73
|
+
} else {
|
|
74
|
+
nextStack.push(registration);
|
|
75
|
+
}
|
|
76
|
+
hostStacks.set(registration.screenKey, nextStack);
|
|
77
|
+
if (previousActiveHostKey === getActiveHostFromStack(registration.screenKey, nextStack)) {
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
emit();
|
|
81
|
+
};
|
|
82
|
+
exports.registerHost = registerHost;
|
|
83
|
+
const unregisterHost = (screenKey, hostKey) => {
|
|
84
|
+
const stack = hostStacks.get(screenKey);
|
|
85
|
+
if (!stack) {
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
const previousActiveHostKey = getActiveHostFromStack(screenKey, stack);
|
|
89
|
+
const nextStack = stack.filter(host => host.hostKey !== hostKey);
|
|
90
|
+
if (nextStack.length === 0) {
|
|
91
|
+
hostStacks.delete(screenKey);
|
|
92
|
+
} else {
|
|
93
|
+
hostStacks.set(screenKey, nextStack);
|
|
94
|
+
}
|
|
95
|
+
if (previousActiveHostKey === getActiveHostFromStack(screenKey, nextStack)) {
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
98
|
+
emit();
|
|
99
|
+
};
|
|
100
|
+
exports.unregisterHost = unregisterHost;
|
|
101
|
+
const getActiveHostKey = screenKey => {
|
|
102
|
+
return snapshot[screenKey] ?? screenKey;
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* The screen's active host, if it captures scroll. Worklet-safe: measurement
|
|
107
|
+
* code calls this on the UI thread while writing source bounds.
|
|
108
|
+
*/
|
|
109
|
+
exports.getActiveHostKey = getActiveHostKey;
|
|
110
|
+
const getActiveScrollHost = screenKey => {
|
|
111
|
+
"worklet";
|
|
112
|
+
|
|
113
|
+
return activeScrollHosts.get()[screenKey] ?? null;
|
|
114
|
+
};
|
|
115
|
+
exports.getActiveScrollHost = getActiveScrollHost;
|
|
116
|
+
const getHostCapturesScroll = hostKey => {
|
|
117
|
+
for (const stack of hostStacks.values()) {
|
|
118
|
+
const host = stack.find(registration => registration.hostKey === hostKey);
|
|
119
|
+
if (host) {
|
|
120
|
+
return host.capturesScroll;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
return false;
|
|
124
|
+
};
|
|
125
|
+
exports.getHostCapturesScroll = getHostCapturesScroll;
|
|
126
|
+
const useActiveHostKey = screenKey => {
|
|
127
|
+
return (0, _react.useSyncExternalStore)(subscribe, () => screenKey ? getActiveHostKey(screenKey) : undefined, () => undefined);
|
|
128
|
+
};
|
|
129
|
+
exports.useActiveHostKey = useActiveHostKey;
|
|
130
|
+
const resetHostRegistry = () => {
|
|
131
|
+
hostStacks.clear();
|
|
132
|
+
snapshot = EMPTY_SNAPSHOT;
|
|
133
|
+
activeScrollHosts.set({});
|
|
134
|
+
emit();
|
|
135
|
+
};
|
|
136
|
+
exports.resetHostRegistry = resetHostRegistry;
|
|
137
|
+
//# sourceMappingURL=host-registry.store.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNativeReanimated","EMPTY_SNAPSHOT","listeners","Set","hostStacks","Map","snapshot","activeScrollHosts","makeMutable","getActiveHostFromStack","screenKey","stack","length","index","host","fallback","hostKey","buildSnapshot","nextSnapshot","buildScrollHostSnapshot","activeHostKey","activeHost","find","capturesScroll","emit","set","listener","subscribe","add","delete","registerHost","registration","get","previousActiveHostKey","nextStack","filter","unshift","push","exports","unregisterHost","getActiveHostKey","getActiveScrollHost","getHostCapturesScroll","values","useActiveHostKey","useSyncExternalStore","undefined","resetHostRegistry","clear"],"sourceRoot":"../../../../../../../src","sources":["shared/components/boundary/portal/stores/host-registry.store.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,sBAAA,GAAAD,OAAA;AAYA,MAAME,cAAoC,GAAG,CAAC,CAAC;AAE/C,MAAMC,SAAS,GAAG,IAAIC,GAAG,CAAa,CAAC;AACvC,MAAMC,UAAU,GAAG,IAAIC,GAAG,CAA6B,CAAC;AAExD,IAAIC,QAA8B,GAAGL,cAAc;;AAEnD;AACA;AACA;AACA;AACA;AACA;AACA,MAAMM,iBAAiB,GAAG,IAAAC,kCAAW,EAAgC,CAAC,CAAC,CAAC;AAExE,MAAMC,sBAAsB,GAAGA,CAC9BC,SAAiB,EACjBC,KAAqC,KACjC;EACJ,IAAI,CAACA,KAAK,IAAIA,KAAK,CAACC,MAAM,KAAK,CAAC,EAAE;IACjC,OAAOF,SAAS;EACjB;EAEA,KAAK,IAAIG,KAAK,GAAGF,KAAK,CAACC,MAAM,GAAG,CAAC,EAAEC,KAAK,IAAI,CAAC,EAAEA,KAAK,EAAE,EAAE;IACvD,MAAMC,IAAI,GAAGH,KAAK,CAACE,KAAK,CAAC;IACzB,IAAI,CAACC,IAAI,CAACC,QAAQ,EAAE;MACnB,OAAOD,IAAI,CAACE,OAAO;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AAU,CAAC4C,KAAK,CAAC,CAAC;EAClB1C,QAAQ,GAAGL,cAAc;EACzBM,iBAAiB,CAACkB,GAAG,CAAC,CAAC,CAAC,CAAC;EACzBD,IAAI,CAAC,CAAC;AACP,CAAC;AAACc,OAAA,CAAAS,iBAAA,GAAAA,iBAAA","ignoreList":[]}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.useActivePortalBoundaryHosts = exports.unmountPortalBoundaryHost = exports.mountPortalBoundaryHost = void 0;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
const EMPTY_HOSTS = [];
|
|
9
|
+
const listeners = new Set();
|
|
10
|
+
const activeBoundaryHosts = new Map();
|
|
11
|
+
let snapshot = {
|
|
12
|
+
hostsByScope: {}
|
|
13
|
+
};
|
|
14
|
+
const buildSnapshot = () => {
|
|
15
|
+
const hostsByScope = {};
|
|
16
|
+
for (const host of activeBoundaryHosts.values()) {
|
|
17
|
+
const hosts = hostsByScope[host.hostKey] ?? [];
|
|
18
|
+
hosts.push(host);
|
|
19
|
+
hostsByScope[host.hostKey] = hosts;
|
|
20
|
+
}
|
|
21
|
+
return {
|
|
22
|
+
hostsByScope
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
const emit = () => {
|
|
26
|
+
snapshot = buildSnapshot();
|
|
27
|
+
for (const listener of listeners) {
|
|
28
|
+
listener();
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
const isSameHost = (a, b) => {
|
|
32
|
+
return a.boundaryId === b.boundaryId && a.capturesScroll === b.capturesScroll && a.hostKey === b.hostKey && a.pairKey === b.pairKey && a.screenKey === b.screenKey;
|
|
33
|
+
};
|
|
34
|
+
const mountPortalBoundaryHost = host => {
|
|
35
|
+
const previous = activeBoundaryHosts.get(host.boundaryId);
|
|
36
|
+
if (previous && isSameHost(previous, host)) {
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
activeBoundaryHosts.set(host.boundaryId, host);
|
|
40
|
+
emit();
|
|
41
|
+
};
|
|
42
|
+
exports.mountPortalBoundaryHost = mountPortalBoundaryHost;
|
|
43
|
+
const unmountPortalBoundaryHost = boundaryId => {
|
|
44
|
+
if (!activeBoundaryHosts.delete(boundaryId)) {
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
emit();
|
|
48
|
+
};
|
|
49
|
+
exports.unmountPortalBoundaryHost = unmountPortalBoundaryHost;
|
|
50
|
+
const subscribe = listener => {
|
|
51
|
+
listeners.add(listener);
|
|
52
|
+
return () => {
|
|
53
|
+
listeners.delete(listener);
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
const useActivePortalBoundaryHosts = hostKey => {
|
|
57
|
+
return (0, _react.useSyncExternalStore)(subscribe, () => snapshot.hostsByScope[hostKey] ?? EMPTY_HOSTS, () => EMPTY_HOSTS);
|
|
58
|
+
};
|
|
59
|
+
exports.useActivePortalBoundaryHosts = useActivePortalBoundaryHosts;
|
|
60
|
+
//# sourceMappingURL=portal-boundary-host.store.js.map
|
package/lib/commonjs/shared/components/boundary/portal/stores/portal-boundary-host.store.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","require","EMPTY_HOSTS","listeners","Set","activeBoundaryHosts","Map","snapshot","hostsByScope","buildSnapshot","host","values","hosts","hostKey","push","emit","listener","isSameHost","a","b","boundaryId","capturesScroll","pairKey","screenKey","mountPortalBoundaryHost","previous","get","set","exports","unmountPortalBoundaryHost","delete","subscribe","add","useActivePortalBoundaryHosts","useSyncExternalStore"],"sourceRoot":"../../../../../../../src","sources":["shared/components/boundary/portal/stores/portal-boundary-host.store.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAcA,MAAMC,WAAuC,GAAG,EAAE;AAElD,MAAMC,SAAS,GAAG,IAAIC,GAAG,CAAa,CAAC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AG,CAACjB,IAAI,CAACU,UAAU,EAAEV,IAAI,CAAC;EAC9CK,IAAI,CAAC,CAAC;AACP,CAAC;AAACa,OAAA,CAAAJ,uBAAA,GAAAA,uBAAA;AAEK,MAAMK,yBAAyB,GAAIT,UAAkB,IAAK;EAChE,IAAI,CAACf,mBAAmB,CAACyB,MAAM,CAACV,UAAU,CAAC,EAAE;IAC5C;EACD;EAEAL,IAAI,CAAC,CAAC;AACP,CAAC;AAACa,OAAA,CAAAC,yBAAA,GAAAA,yBAAA;AAEF,MAAME,SAAS,GAAIf,QAAoB,IAAK;EAC3Cb,SAAS,CAAC6B,GAAG,CAAChB,QAAQ,CAAC;EAEvB,OAAO,MAAM;IACZb,SAAS,CAAC2B,MAAM,CAACd,QAAQ,CAAC;EAC3B,CAAC;AACF,CAAC;AAEM,MAAMiB,4BAA4B,GAAIpB,OAAe,IAAK;EAChE,OAAO,IAAAqB,2BAAoB,EAC1BH,SAAS,EACT,MAAMxB,QAAQ,CAACC,YAAY,CAACK,OAAO,CAAC,IAAIX,WAAW,EACnD,MAAMA,WACP,CAAC;AACF,CAAC;AAAC0B,OAAA,CAAAK,4BAAA,GAAAA,4BAAA","ignoreList":[]}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.isTeleportAvailable = exports.NativePortalProvider = exports.NativePortalHost = exports.NativePortal = void 0;
|
|
7
|
+
/**
|
|
8
|
+
* `react-native-teleport` is an optional peer dependency. The require sits in a
|
|
9
|
+
* try/catch so Metro treats it as an optional dependency — an absent module no
|
|
10
|
+
* longer fails the bundle, it throws at runtime and the catch swallows it.
|
|
11
|
+
*
|
|
12
|
+
* When teleport is missing, `portal`-enabled boundaries degrade to inline
|
|
13
|
+
* rendering; everything else keeps working.
|
|
14
|
+
*/
|
|
15
|
+
let mod = null;
|
|
16
|
+
try {
|
|
17
|
+
mod = require("react-native-teleport");
|
|
18
|
+
} catch {}
|
|
19
|
+
const isTeleportAvailable = exports.isTeleportAvailable = mod !== null;
|
|
20
|
+
const NativePortal = exports.NativePortal = mod?.Portal ?? null;
|
|
21
|
+
const NativePortalProvider = exports.NativePortalProvider = mod?.PortalProvider ?? null;
|
|
22
|
+
const NativePortalHost = exports.NativePortalHost = mod?.PortalHost ?? null;
|
|
23
|
+
//# sourceMappingURL=teleport.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["mod","require","isTeleportAvailable","exports","NativePortal","Portal","NativePortalProvider","PortalProvider","NativePortalHost","PortalHost"],"sourceRoot":"../../../../../../src","sources":["shared/components/boundary/portal/teleport.ts"],"mappings":";;;;;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAIA,GAAQ,GAAG,IAAI;AACnB,IAAI;EACHA,GAAG,GAAGC,OAAO,CAAC,uBAAuB,CAAC;AACvC,CAAC,CAAC,MAAM,CAAC;AAEF,MAAMC,mBAAmB,GAAAC,OAAA,CAAAD,mBAAA,GAAGF,GAAG,KAAK,IAAI;AACxC,MAAMI,YAAuC,GAAAD,OAAA,CAAAC,YAAA,GAAGJ,GAAG,EAAEK,MAAM,IAAI,IAAI;AACnE,MAAMC,oBAA+C,GAAAH,OAAA,CAAAG,oBAAA,GAC3DN,GAAG,EAAEO,cAAc,IAAI,IAAI;AACrB,MAAMC,gBAA2C,GAAAL,OAAA,CAAAK,gBAAA,GACvDR,GAAG,EAAES,UAAU,IAAI,IAAI","ignoreList":[]}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.resolvePortalAttachmentTargets = void 0;
|
|
7
|
+
const resolvePortalAttachmentTargets = ({
|
|
8
|
+
attachment,
|
|
9
|
+
currentScreenKey,
|
|
10
|
+
nextScreenKey,
|
|
11
|
+
portalAttachTarget,
|
|
12
|
+
sourcePairKey
|
|
13
|
+
}) => {
|
|
14
|
+
const hasCurrentAttachment = attachment?.pairKey === sourcePairKey;
|
|
15
|
+
if (!hasCurrentAttachment || !attachment) {
|
|
16
|
+
return {
|
|
17
|
+
progressScreenKey: null,
|
|
18
|
+
targetScreenKey: null
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
// Matched-screen portals physically live in the matched destination host. If a
|
|
23
|
+
// closing destination is skipped by descriptor resolution, its own progress
|
|
24
|
+
// still owns the attach gate until this attachment is replaced or cleared.
|
|
25
|
+
if (portalAttachTarget === "matched-screen") {
|
|
26
|
+
return {
|
|
27
|
+
progressScreenKey: attachment.matchedScreenKey,
|
|
28
|
+
targetScreenKey: attachment.matchedScreenKey
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
// Current-screen portals stay mounted in this screen's host, but the visual
|
|
33
|
+
// handoff is still paced by the adjacent destination transition.
|
|
34
|
+
return {
|
|
35
|
+
progressScreenKey: nextScreenKey ?? null,
|
|
36
|
+
targetScreenKey: currentScreenKey
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
exports.resolvePortalAttachmentTargets = resolvePortalAttachmentTargets;
|
|
40
|
+
//# sourceMappingURL=attachment.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["resolvePortalAttachmentTargets","attachment","currentScreenKey","nextScreenKey","portalAttachTarget","sourcePairKey","hasCurrentAttachment","pairKey","progressScreenKey","targetScreenKey","matchedScreenKey","exports"],"sourceRoot":"../../../../../../../src","sources":["shared/components/boundary/portal/utils/attachment.ts"],"mappings":";;;;;;AAeO,MAAMA,8BAA8B,GAAGA,CAAC;EAC9CC,UAAU;EACVC,gBAAgB;EAChBC,aAAa;EACbC,kBAAkB;EAClBC;AACqC,CAAC,KAAK;EAC3C,MAAMC,oBAAoB,GAAGL,UAAU,EAAEM,OAAO,KAAKF,aAAa;EAElE,IAAI,CAACC,oBAAoB,IAAI,CAACL,UAAU,EAAE;IACzC,OAAO;MACNO,iBAAiB,EAAE,IAAI;MACvBC,eAAe,EAAE;IAClB,CAAC;EACF;;EAEA;EACA;EACA;EACA,IAAIL,kBAAkB,KAAK,gBAAgB,EAAE;IAC5C,OAAO;MACNI,iBAAiB,EAAEP,UAAU,CAACS,gBAAgB;MAC9CD,eAAe,EAAER,UAAU,CAACS;IAC7B,CAAC;EACF;;EAEA;EACA;EACA,OAAO;IACNF,iBAAiB,EAAEL,aAAa,IAAI,IAAI;IACxCM,eAAe,EAAEP;EAClB,CAAC;AACF,CAAC;AAACS,OAAA,CAAAX,8BAAA,GAAAA,8BAAA","ignoreList":[]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.createPortalBoundaryHostName = exports.PORTAL_HOST_NAME_RESET_VALUE = void 0;
|
|
7
|
+
const PORTAL_HOST_NAME_RESET_VALUE = exports.PORTAL_HOST_NAME_RESET_VALUE = null;
|
|
8
|
+
const PORTAL_HOST_NAME_SUFFIX = "-portal-host";
|
|
9
|
+
const createPortalBoundaryHostName = (hostKey, boundaryId) => {
|
|
10
|
+
"worklet";
|
|
11
|
+
|
|
12
|
+
return `${hostKey}-${boundaryId}${PORTAL_HOST_NAME_SUFFIX}`;
|
|
13
|
+
};
|
|
14
|
+
exports.createPortalBoundaryHostName = createPortalBoundaryHostName;
|
|
15
|
+
//# sourceMappingURL=naming.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["PORTAL_HOST_NAME_RESET_VALUE","exports","PORTAL_HOST_NAME_SUFFIX","createPortalBoundaryHostName","hostKey","boundaryId"],"sourceRoot":"../../../../../../../src","sources":["shared/components/boundary/portal/utils/naming.ts"],"mappings":";;;;;;AAAO,MAAMA,4BAA4B,GAAAC,OAAA,CAAAD,4BAAA,GAAG,IAAI;AAChD,MAAME,uBAAuB,GAAG,cAAc;AAEvC,MAAMC,4BAA4B,GAAGA,CAC3CC,OAAe,EACfC,UAAkB,KACd;EACJ,SAAS;;EACT,OAAO,GAAGD,OAAO,IAAIC,UAAU,GAAGH,uBAAuB,EAAE;AAC5D,CAAC;AAACD,OAAA,CAAAE,4BAAA,GAAAA,4BAAA","ignoreList":[]}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.resolvePortalOffsetStyle = void 0;
|
|
7
|
+
var _reactNativeReanimated = require("react-native-reanimated");
|
|
8
|
+
var _scroll = require("../../../../stores/scroll.store");
|
|
9
|
+
var _hostBounds = require("../stores/host-bounds.store");
|
|
10
|
+
const resolvePortalOffsetStyle = ({
|
|
11
|
+
alignHostToBoundsScroll = false,
|
|
12
|
+
bounds,
|
|
13
|
+
boundsCurrentScroll,
|
|
14
|
+
compensateSourceScroll = false,
|
|
15
|
+
currentScroll,
|
|
16
|
+
hostCurrentScroll,
|
|
17
|
+
hostKey,
|
|
18
|
+
hostProgress = 0,
|
|
19
|
+
includeScrollOffsets = true,
|
|
20
|
+
placement,
|
|
21
|
+
position = "relative",
|
|
22
|
+
sourceCurrentScroll,
|
|
23
|
+
trackSourceScroll = false
|
|
24
|
+
}) => {
|
|
25
|
+
"worklet";
|
|
26
|
+
|
|
27
|
+
const hostBounds = (0, _hostBounds.getPortalHostBounds)(hostKey);
|
|
28
|
+
const shouldAlignHostToBoundsScroll = placement ? placement === "same-screen" : alignHostToBoundsScroll;
|
|
29
|
+
const shouldCompensateSourceScroll = trackSourceScroll || compensateSourceScroll;
|
|
30
|
+
const shouldIncludeHostScrollOffsets = placement ? placement === "cross-screen-close" : includeScrollOffsets;
|
|
31
|
+
const boundsScrollSnapshot = bounds.scroll ?? null;
|
|
32
|
+
const sourceScrollSnapshot = shouldCompensateSourceScroll ? boundsScrollSnapshot : null;
|
|
33
|
+
const sourceScrollDeltaX = shouldCompensateSourceScroll ? (0, _scroll.getClampedScrollAxisDelta)(sourceCurrentScroll ?? null, sourceScrollSnapshot, "horizontal") : 0;
|
|
34
|
+
const sourceScrollDeltaY = shouldCompensateSourceScroll ? (0, _scroll.getClampedScrollAxisDelta)(sourceCurrentScroll ?? null, sourceScrollSnapshot, "vertical") : 0;
|
|
35
|
+
const sourcePageX = bounds.pageX - sourceScrollDeltaX;
|
|
36
|
+
const sourcePageY = bounds.pageY - sourceScrollDeltaY;
|
|
37
|
+
const boundsScroll = shouldIncludeHostScrollOffsets ? boundsScrollSnapshot ?? boundsCurrentScroll ?? currentScroll ?? null : null;
|
|
38
|
+
const hostBoundsScrollSnapshot = hostBounds?.scroll ?? null;
|
|
39
|
+
const hostBoundsScroll = shouldIncludeHostScrollOffsets ? hostBoundsScrollSnapshot : null;
|
|
40
|
+
const resolvedHostCurrentScroll = hostCurrentScroll ?? boundsScroll ?? hostBoundsScroll ?? null;
|
|
41
|
+
const hostSnapshotDeltaX = shouldAlignHostToBoundsScroll && !shouldIncludeHostScrollOffsets ? (0, _scroll.getClampedScrollAxisDelta)(boundsScrollSnapshot, hostBoundsScrollSnapshot, "horizontal") : 0;
|
|
42
|
+
const hostSnapshotDeltaY = shouldAlignHostToBoundsScroll && !shouldIncludeHostScrollOffsets ? (0, _scroll.getClampedScrollAxisDelta)(boundsScrollSnapshot, hostBoundsScrollSnapshot, "vertical") : 0;
|
|
43
|
+
// Deltas are clamped to the layout range: iOS rubber-band offsets are
|
|
44
|
+
// outside the real scroll range and must not become coordinate-space deltas.
|
|
45
|
+
const hostScrollDeltaX = (0, _scroll.getClampedScrollAxisDelta)(resolvedHostCurrentScroll, hostBoundsScroll, "horizontal");
|
|
46
|
+
const hostScrollDeltaY = (0, _scroll.getClampedScrollAxisDelta)(resolvedHostCurrentScroll, hostBoundsScroll, "vertical");
|
|
47
|
+
const adjustedHostPageX = hostBounds ? hostBounds.pageX - hostSnapshotDeltaX - (0, _reactNativeReanimated.interpolate)(hostProgress, [0, 1], [hostScrollDeltaX, 0]) : 0;
|
|
48
|
+
const adjustedHostPageY = hostBounds ? hostBounds.pageY - hostSnapshotDeltaY - (0, _reactNativeReanimated.interpolate)(hostProgress, [0, 1], [hostScrollDeltaY, 0]) : 0;
|
|
49
|
+
const boundsScrollDeltaX = shouldIncludeHostScrollOffsets ? (0, _scroll.getClampedScrollAxisDelta)(currentScroll ?? null, boundsScroll, "horizontal") : 0;
|
|
50
|
+
const boundsScrollDeltaY = shouldIncludeHostScrollOffsets ? (0, _scroll.getClampedScrollAxisDelta)(currentScroll ?? null, boundsScroll, "vertical") : 0;
|
|
51
|
+
const offsetX = hostBounds ? sourcePageX - adjustedHostPageX : sourcePageX - boundsScrollDeltaX;
|
|
52
|
+
const offsetY = hostBounds ? sourcePageY - adjustedHostPageY : sourcePageY - boundsScrollDeltaY;
|
|
53
|
+
const transform = [{
|
|
54
|
+
translateY: offsetY
|
|
55
|
+
}, {
|
|
56
|
+
translateX: offsetX
|
|
57
|
+
}];
|
|
58
|
+
if (position === "absolute") {
|
|
59
|
+
return {
|
|
60
|
+
left: 0,
|
|
61
|
+
position: "absolute",
|
|
62
|
+
top: 0,
|
|
63
|
+
transform
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
return {
|
|
67
|
+
transform
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
exports.resolvePortalOffsetStyle = resolvePortalOffsetStyle;
|
|
71
|
+
//# sourceMappingURL=offset-style.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_reactNativeReanimated","require","_scroll","_hostBounds","resolvePortalOffsetStyle","alignHostToBoundsScroll","bounds","boundsCurrentScroll","compensateSourceScroll","currentScroll","hostCurrentScroll","hostKey","hostProgress","includeScrollOffsets","placement","position","sourceCurrentScroll","trackSourceScroll","hostBounds","getPortalHostBounds","shouldAlignHostToBoundsScroll","shouldCompensateSourceScroll","shouldIncludeHostScrollOffsets","boundsScrollSnapshot","scroll","sourceScrollSnapshot","sourceScrollDeltaX","getClampedScrollAxisDelta","sourceScrollDeltaY","sourcePageX","pageX","sourcePageY","pageY","boundsScroll","hostBoundsScrollSnapshot","hostBoundsScroll","resolvedHostCurrentScroll","hostSnapshotDeltaX","hostSnapshotDeltaY","hostScrollDeltaX","hostScrollDeltaY","adjustedHostPageX","interpolate","adjustedHostPageY","boundsScrollDeltaX","boundsScrollDeltaY","offsetX","offsetY","transform","translateY","translateX","left","top","exports"],"sourceRoot":"../../../../../../../src","sources":["shared/components/boundary/portal/utils/offset-style.ts"],"mappings":";;;;;;AAAA,IAAAA,sBAAA,GAAAC,OAAA;AAKA,IAAAC,OAAA,GAAAD,OAAA;AAEA,IAAAE,WAAA,GAAAF,OAAA;AAuCO,MAAMG,wBAAwB,GAAGA,CAAC;EACxCC,uBAAuB,GAAG,KAAK;EAC/BC,MAAM;EACNC,mBAAmB;EACnBC,sBAAsB,GAAG,KAAK;EAC9BC,aAAa;EACbC,iBAAiB;EACjBC,OAAO;EACPC,YAAY,GAAG,CAAC;EAChBC,oBAAoB,GAAG,IAAI;EAC3BC,SAAS;EACTC,QAAQ,GAAG,UAAU;EACrBC,mBAAmB;EACnBC,iBAAiB,GAAG;AACW,CAAC,KAAiB;EACjD,SAAS;;EACT,MAAMC,UAAU,GAAG,IAAAC,+BAAmB,EAACR,OAAO,CAAC;EAC/C,MAAMS,6BAA6B,GAAGN,SAAS,GAC5CA,SAAS,KAAK,aAAa,GAC3BT,uBAAuB;EAC1B,MAAMgB,4BAA4B,GACjCJ,iBAAiB,IAAIT,sBAAsB;EAC5C,MAAMc,8BAA8B,GAAGR,SAAS,GAC7CA,SAAS,KAAK,oBAAoB,GAClCD,oBAAoB;EACvB,MAAMU,oBAAoB,GACxBjB,MAAM,CAA6CkB,MAAM,IAAI,IAAI;EACnE,MAAMC,oBA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,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.isTeleportEnabled = void 0;
|
|
7
|
+
const isTeleportEnabled = teleport => {
|
|
8
|
+
"worklet";
|
|
9
|
+
|
|
10
|
+
if (typeof teleport === "boolean") {
|
|
11
|
+
return teleport;
|
|
12
|
+
}
|
|
13
|
+
return teleport?.enabled !== false;
|
|
14
|
+
};
|
|
15
|
+
exports.isTeleportEnabled = isTeleportEnabled;
|
|
16
|
+
//# sourceMappingURL=teleport-control.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["isTeleportEnabled","teleport","enabled","exports"],"sourceRoot":"../../../../../../../src","sources":["shared/components/boundary/portal/utils/teleport-control.ts"],"mappings":";;;;;;AAEO,MAAMA,iBAAiB,GAC7BC,QAA6C,IACzC;EACJ,SAAS;;EAET,IAAI,OAAOA,QAAQ,KAAK,SAAS,EAAE;IAClC,OAAOA,QAAQ;EAChB;EAEA,OAAOA,QAAQ,EAAEC,OAAO,KAAK,KAAK;AACnC,CAAC;AAACC,OAAA,CAAAH,iBAAA,GAAAA,iBAAA","ignoreList":[]}
|
|
@@ -5,43 +5,41 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.useBoundaryOwnerContext = exports.useBoundaryOwner = exports.TARGET_OUTSIDE_OWNER_WARNING = exports.BoundaryOwnerProvider = void 0;
|
|
7
7
|
var _react = require("react");
|
|
8
|
-
var
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
});
|
|
21
|
-
};
|
|
22
|
-
exports.BoundaryOwnerProvider = BoundaryOwnerProvider;
|
|
23
|
-
const useBoundaryOwnerContext = () => {
|
|
24
|
-
return (0, _react.useContext)(BoundaryOwnerContext);
|
|
25
|
-
};
|
|
8
|
+
var _createProvider = _interopRequireDefault(require("../../../utils/create-provider"));
|
|
9
|
+
var _logger = require("../../../utils/logger");
|
|
10
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
|
+
// logger.warn prepends the library prefix.
|
|
12
|
+
const MULTIPLE_TARGETS_WARNING = "Multiple Boundary.Target elements were rendered under the same boundary owner. The first registered target will be measured.";
|
|
13
|
+
const TARGET_OUTSIDE_OWNER_WARNING = exports.TARGET_OUTSIDE_OWNER_WARNING = "Boundary.Target must be rendered inside a Boundary owner (Boundary.View, Boundary.Trigger, or a component created by createBoundaryComponent).";
|
|
14
|
+
const {
|
|
15
|
+
BoundaryOwnerProvider,
|
|
16
|
+
useBoundaryOwnerContext
|
|
17
|
+
} = (0, _createProvider.default)("BoundaryOwner", {
|
|
18
|
+
guarded: false
|
|
19
|
+
})(props => props);
|
|
26
20
|
exports.useBoundaryOwnerContext = useBoundaryOwnerContext;
|
|
21
|
+
exports.BoundaryOwnerProvider = BoundaryOwnerProvider;
|
|
27
22
|
const useBoundaryOwner = params => {
|
|
28
23
|
const {
|
|
29
24
|
ownerRef,
|
|
30
|
-
associatedTargetStyles
|
|
25
|
+
associatedTargetStyles,
|
|
26
|
+
entryTag,
|
|
27
|
+
portal
|
|
31
28
|
} = params;
|
|
32
29
|
const warnedAboutMultipleTargetsRef = (0, _react.useRef)(false);
|
|
33
30
|
const [targetEntry, setTargetEntry] = (0, _react.useState)(null);
|
|
34
|
-
const registerTargetRef = (0, _react.useCallback)((targetRef, preparedStyles) => {
|
|
31
|
+
const registerTargetRef = (0, _react.useCallback)((targetRef, preparedStyles, measurementRef) => {
|
|
35
32
|
setTargetEntry(prev => {
|
|
36
33
|
if (prev?.ref === targetRef) {
|
|
37
34
|
return prev;
|
|
38
35
|
}
|
|
39
36
|
if (__DEV__ && prev !== null && !warnedAboutMultipleTargetsRef.current) {
|
|
40
37
|
warnedAboutMultipleTargetsRef.current = true;
|
|
41
|
-
|
|
38
|
+
_logger.logger.warn(MULTIPLE_TARGETS_WARNING);
|
|
42
39
|
}
|
|
43
40
|
return prev ?? {
|
|
44
41
|
ref: targetRef,
|
|
42
|
+
measurementRef: measurementRef ?? targetRef,
|
|
45
43
|
preparedStyles
|
|
46
44
|
};
|
|
47
45
|
});
|
|
@@ -54,13 +52,16 @@ const useBoundaryOwner = params => {
|
|
|
54
52
|
registerTargetRef,
|
|
55
53
|
unregisterTargetRef,
|
|
56
54
|
activeTargetRef: targetEntry?.ref ?? null,
|
|
57
|
-
associatedTargetStyles
|
|
58
|
-
|
|
55
|
+
associatedTargetStyles,
|
|
56
|
+
entryTag,
|
|
57
|
+
portal
|
|
58
|
+
}), [ownerRef, registerTargetRef, unregisterTargetRef, targetEntry, associatedTargetStyles, entryTag, portal]);
|
|
59
59
|
return {
|
|
60
60
|
contextValue,
|
|
61
61
|
hasActiveTarget: targetEntry !== null,
|
|
62
|
-
measuredRef: targetEntry?.
|
|
63
|
-
targetPreparedStyles: targetEntry?.preparedStyles
|
|
62
|
+
measuredRef: targetEntry?.measurementRef ?? ownerRef,
|
|
63
|
+
targetPreparedStyles: targetEntry?.preparedStyles,
|
|
64
|
+
portal
|
|
64
65
|
};
|
|
65
66
|
};
|
|
66
67
|
exports.useBoundaryOwner = useBoundaryOwner;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","require","_createProvider","_interopRequireDefault","_logger","e","__esModule","default","MULTIPLE_TARGETS_WARNING","TARGET_OUTSIDE_OWNER_WARNING","exports","BoundaryOwnerProvider","useBoundaryOwnerContext","createProvider","guarded","props","useBoundaryOwner","params","ownerRef","associatedTargetStyles","entryTag","portal","warnedAboutMultipleTargetsRef","useRef","targetEntry","setTargetEntry","useState","registerTargetRef","useCallback","targetRef","preparedStyles","measurementRef","prev","ref","__DEV__","current","logger","warn","unregisterTargetRef","contextValue","useMemo","activeTargetRef","hasActiveTarget","measuredRef","targetPreparedStyles"],"sourceRoot":"../../../../../../src","sources":["shared/components/boundary/providers/boundary-owner.provider.tsx"],"mappings":";;;;;;AACA,IAAAA,MAAA,GAAAC,OAAA;AAIA,IAAAC,eAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AAA+C,SAAAE,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AA4B/C;AACA,MAAMG,wBAAwB,GAC7B,8HAA8H;AAExH,MAAMC,4BAA4B,GAAAC,OAAA,CAAAD,4BAAA,GACxC,gJAAgJ;AAO1I,MAAM;EAAEE,qBAAqB;EAAEC;AAAwB,CAAC,GAC9D,IAAAC,uBAAc,EAAC,eAAe,EAAE;EAAEC,OAAO,EAAE;AAAM,CAAC,CAAC,CAGhDC,KAAK,IAAKA,KAAK,CAAC;AAACL,OAAA,CAAAE,uBAAA,GAAAA,uBAAA;AAAAF,OAAA,CAAAC,qBAAA,GAAAA,qBAAA;AAEd,MAAMK,gBAAgB,GAAIC,MAKhC,IAAK;EACL,MAAM;IAAEC,QAAQ;IAAEC,sBAAsB;IAAEC,QAAQ;IAAEC;EAAO,CAAC,GAAGJ,MAAM;EACrE,MAAMK,6BAA6B,GAAG,IAAAC,aAAM,EAAC,KAAK,CAAC;EACnD,MAAM,CAACC,WAAW,EAAEC,cAAc,CAAC,GAAG,IAAAC,eAAQ,EAC7C,IACD,CAAC;EAED,MAAMC,iBAAiB,GAAG,IAAAC,kBAAW,EACpC,CACCC,SAA4B,EAC5BC,cAA0B,EAC1BC,cAAkC,KAC9B;IACJN,cAAc,CAAEO,IAAI,IAAK;MACxB,IAAIA,IAAI,EAAEC,GAAG,KAAKJ,SAAS,EAAE;QAC5B,OAAOG,IAAI;MACZ;MAEA,IACCE,OAAO,IACPF,IAAI,KAAK,IAAI,IACb,CAACV,6BAA6B,CAACa,OAAO,EACrC;QACDb,6BAA6B,CAACa,OAAO,GAAG,IAAI;QAC5CC,cAAM,CAACC,IAAI,CAAC7B,wBAAwB,CAAC;MACtC;MAEA,OACCwB,IAAI,IAAI;QACPC,GAAG,EAAEJ,SAAS;QACdE,cAAc,EAAEA,cAAc,IAAIF,SAAS;QAC3CC;MACD,CAAC;IAEH,CAAC,CAAC;EACH,CAAC,EACD,EACD,CAAC;EAED,MAAMQ,mBAAmB,GAAG,IAAAV,kBAAW,EAAEC,SAA4B,IAAK;IACzEJ,cAAc,CAAEO,IAAI,IAAMA,IAAI,EAAEC,GAAG,KAAKJ,SAAS,GAAG,IAAI,GAAGG,IAAK,CAAC;EAClE,CAAC,EAAE,EAAE,CAAC;EAEN,MAAMO,YAAY,GAAG,IAAAC,cAAO,EAC3B,OAAO;IACNtB,QAAQ;IACRS,iBAAiB;IACjBW,mBAAmB;IACnBG,eAAe,EAAEjB,WAAW,EAAES,GAAG,IAAI,IAAI;IACzCd,sBAAsB;IACtBC,QAAQ;IACRC;EACD,CAAC,CAAC,EACF,CACCH,QAAQ,EACRS,iBAAiB,EACjBW,mBAAmB,EACnBd,WAAW,EACXL,sBAAsB,EACtBC,QAAQ,EACRC,MAAM,CAER,CAAC;EAED,OAAO;IACNkB,YAAY;IACZG,eAAe,EAAElB,WAAW,KAAK,IAAI;IACrCmB,WAAW,EAAEnB,WAAW,EAAEO,cAAc,IAAIb,QAAQ;IACpD0B,oBAAoB,EAAEpB,WAAW,EAAEM,cAAc;IACjDT;EACD,CAAC;AACF,CAAC;AAACX,OAAA,CAAAM,gBAAA,GAAAA,gBAAA","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../../src","sources":["shared/components/boundary/types.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getInitialDestinationMeasurePairKey = void 0;
|
|
7
|
+
const getInitialDestinationMeasurePairKey = params => {
|
|
8
|
+
"worklet";
|
|
9
|
+
|
|
10
|
+
const {
|
|
11
|
+
enabled,
|
|
12
|
+
destinationPairKey,
|
|
13
|
+
ancestorDestinationPairKey,
|
|
14
|
+
linkId,
|
|
15
|
+
linkState
|
|
16
|
+
} = params;
|
|
17
|
+
const measurePairKey = destinationPairKey ?? ancestorDestinationPairKey;
|
|
18
|
+
if (!enabled || !measurePairKey) {
|
|
19
|
+
return null;
|
|
20
|
+
}
|
|
21
|
+
const hasDestination = linkState?.[measurePairKey]?.links?.[linkId]?.destination;
|
|
22
|
+
return hasDestination ? null : measurePairKey;
|
|
23
|
+
};
|
|
24
|
+
exports.getInitialDestinationMeasurePairKey = getInitialDestinationMeasurePairKey;
|
|
25
|
+
//# sourceMappingURL=destination-signals.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["getInitialDestinationMeasurePairKey","params","enabled","destinationPairKey","ancestorDestinationPairKey","linkId","linkState","measurePairKey","hasDestination","links","destination","exports"],"sourceRoot":"../../../../../../src","sources":["shared/components/boundary/utils/destination-signals.ts"],"mappings":";;;;;;AAKO,MAAMA,mCAAmC,GAAIC,MAMnD,IAA2B;EAC3B,SAAS;;EACT,MAAM;IACLC,OAAO;IACPC,kBAAkB;IAClBC,0BAA0B;IAC1BC,MAAM;IACNC;EACD,CAAC,GAAGL,MAAM;EACV,MAAMM,cAAc,GAAGJ,kBAAkB,IAAIC,0BAA0B;EAEvE,IAAI,CAACF,OAAO,IAAI,CAACK,cAAc,EAAE;IAChC,OAAO,IAAI;EACZ;EAEA,MAAMC,cAAc,GACnBF,SAAS,GAAGC,cAAc,CAAC,EAAEE,KAAK,GAAGJ,MAAM,CAAC,EAAEK,WAAW;EAE1D,OAAOF,cAAc,GAAG,IAAI,GAAGD,cAAc;AAC9C,CAAC;AAACI,OAAA,CAAAX,mCAAA,GAAAA,mCAAA","ignoreList":[]}
|
|
@@ -3,14 +3,17 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.measureWithOverscrollAwareness = exports.isMeasurementInViewport = exports.
|
|
6
|
+
exports.normalizeMeasuredBoundsToOrigin = exports.measureWithOverscrollAwareness = exports.isMeasurementInViewport = exports.attachScrollSnapshotToMeasuredBounds = exports.adjustedMeasuredBoundsForOverscrollDeltas = void 0;
|
|
7
7
|
var _reactNativeReanimated = require("react-native-reanimated");
|
|
8
|
+
var _scroll = require("../../../stores/scroll.store");
|
|
8
9
|
const SCROLL_MEASUREMENT_EPSILON = 1;
|
|
9
10
|
const getOverscrollDelta = axisState => {
|
|
10
11
|
"worklet";
|
|
11
12
|
|
|
12
|
-
const
|
|
13
|
-
|
|
13
|
+
const clampedOffset = (0, _scroll.clampScrollAxisOffset)(axisState);
|
|
14
|
+
if (!axisState || clampedOffset === null) {
|
|
15
|
+
return 0;
|
|
16
|
+
}
|
|
14
17
|
const delta = axisState.offset - clampedOffset;
|
|
15
18
|
return Math.abs(delta) > SCROLL_MEASUREMENT_EPSILON ? delta : 0;
|
|
16
19
|
};
|
|
@@ -34,18 +37,16 @@ const adjustedMeasuredBoundsForOverscrollDeltas = (measured, scrollState) => {
|
|
|
34
37
|
};
|
|
35
38
|
};
|
|
36
39
|
exports.adjustedMeasuredBoundsForOverscrollDeltas = adjustedMeasuredBoundsForOverscrollDeltas;
|
|
37
|
-
const
|
|
40
|
+
const normalizeMeasuredBoundsToOrigin = (measured, origin) => {
|
|
38
41
|
"worklet";
|
|
39
42
|
|
|
40
|
-
if (offset === 0) {
|
|
41
|
-
return measured;
|
|
42
|
-
}
|
|
43
43
|
return {
|
|
44
44
|
...measured,
|
|
45
|
-
|
|
45
|
+
pageX: measured.pageX - origin.pageX,
|
|
46
|
+
pageY: measured.pageY - origin.pageY
|
|
46
47
|
};
|
|
47
48
|
};
|
|
48
|
-
exports.
|
|
49
|
+
exports.normalizeMeasuredBoundsToOrigin = normalizeMeasuredBoundsToOrigin;
|
|
49
50
|
const isMeasurementInViewport = (measured, viewportWidth, viewportHeight) => {
|
|
50
51
|
"worklet";
|
|
51
52
|
|
|
@@ -67,4 +68,13 @@ const measureWithOverscrollAwareness = (ref, scrollState) => {
|
|
|
67
68
|
return adjustedMeasuredBoundsForOverscrollDeltas(measured, scrollState);
|
|
68
69
|
};
|
|
69
70
|
exports.measureWithOverscrollAwareness = measureWithOverscrollAwareness;
|
|
71
|
+
const attachScrollSnapshotToMeasuredBounds = (measured, scroll) => {
|
|
72
|
+
"worklet";
|
|
73
|
+
|
|
74
|
+
return {
|
|
75
|
+
...measured,
|
|
76
|
+
scroll: (0, _scroll.cloneScrollMetadataState)(scroll)
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
exports.attachScrollSnapshotToMeasuredBounds = attachScrollSnapshotToMeasuredBounds;
|
|
70
80
|
//# sourceMappingURL=measured-bounds.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_reactNativeReanimated","require","_scroll","SCROLL_MEASUREMENT_EPSILON","getOverscrollDelta","axisState","clampedOffset","clampScrollAxisOffset","delta","offset","Math","abs","adjustedMeasuredBoundsForOverscrollDeltas","measured","scrollState","deltaX","horizontal","deltaY","vertical","x","y","pageX","pageY","exports","normalizeMeasuredBoundsToOrigin","origin","isMeasurementInViewport","viewportWidth","viewportHeight","width","height","toleranceX","toleranceY","centerX","centerY","measureWithOverscrollAwareness","ref","measure","attachScrollSnapshotToMeasuredBounds","scroll","cloneScrollMetadataState"],"sourceRoot":"../../../../../../src","sources":["shared/components/boundary/utils/measured-bounds.ts"],"mappings":";;;;;;AACA,IAAAA,sBAAA,GAAAC,OAAA;AAKA,IAAAC,OAAA,GAAAD,OAAA;AAUA,MAAME,0BAA0B,GAAG,CAAC;AAMpC,MAAMC,kBAAkB,GACvBC,SAAoD,IACxC;EACZ,SAAS;;EACT,MA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