react-native-screen-transitions 3.6.0-alpha.1 → 3.6.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/component-stack/components/component-screen.js +1 -7
- package/lib/commonjs/component-stack/components/component-screen.js.map +1 -1
- package/lib/commonjs/shared/components/create-boundary-component/create-boundary-component.js +27 -34
- package/lib/commonjs/shared/components/create-boundary-component/create-boundary-component.js.map +1 -1
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-boundary-presence.js +4 -4
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-boundary-presence.js.map +1 -1
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-initial-destination-measurement.js +17 -19
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-initial-destination-measurement.js.map +1 -1
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-initial-source-measurement.js +27 -7
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-initial-source-measurement.js.map +1 -1
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-measurer.js +23 -51
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-measurer.js.map +1 -1
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-refresh-boundary.js +33 -40
- package/lib/commonjs/shared/components/create-boundary-component/hooks/use-refresh-boundary.js.map +1 -1
- package/lib/commonjs/shared/components/create-boundary-component/index.js +3 -1
- package/lib/commonjs/shared/components/create-boundary-component/index.js.map +1 -1
- package/lib/commonjs/shared/components/create-boundary-component/utils/destination-signals.js +75 -0
- package/lib/commonjs/shared/components/create-boundary-component/utils/destination-signals.js.map +1 -0
- package/lib/commonjs/shared/components/create-boundary-component/{hooks/helpers/scroll-measurement.js → utils/measured-bounds.js} +15 -2
- package/lib/commonjs/shared/components/create-boundary-component/utils/measured-bounds.js.map +1 -0
- package/lib/commonjs/shared/components/create-boundary-component/utils/refresh-signals.js +103 -0
- package/lib/commonjs/shared/components/create-boundary-component/utils/refresh-signals.js.map +1 -0
- package/lib/commonjs/shared/components/create-boundary-component/utils/source-signals.js +52 -0
- package/lib/commonjs/shared/components/create-boundary-component/utils/source-signals.js.map +1 -0
- package/lib/commonjs/shared/components/native-screen.js +2 -13
- package/lib/commonjs/shared/components/native-screen.js.map +1 -1
- package/lib/commonjs/shared/constants.js +2 -7
- package/lib/commonjs/shared/constants.js.map +1 -1
- package/lib/commonjs/shared/providers/helpers/measured-bounds-writes.js +35 -0
- package/lib/commonjs/shared/providers/helpers/measured-bounds-writes.js.map +1 -0
- package/lib/commonjs/shared/providers/register-bounds.provider.js +48 -55
- package/lib/commonjs/shared/providers/register-bounds.provider.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/animation/helpers/accessors/use-build-transition-accessor.js +1 -10
- package/lib/commonjs/shared/providers/screen/animation/helpers/accessors/use-build-transition-accessor.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/animation/helpers/hydrate-transition-state/index.js +1 -6
- package/lib/commonjs/shared/providers/screen/animation/helpers/hydrate-transition-state/index.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/animation/helpers/pipeline.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/gestures/pan/pan-activation.js +2 -2
- package/lib/commonjs/shared/providers/screen/gestures/pan/pan-activation.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/gestures/pan/pan-lifecycle.js +9 -2
- package/lib/commonjs/shared/providers/screen/gestures/pan/pan-lifecycle.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/gestures/pan/pan-release.js +19 -0
- package/lib/commonjs/shared/providers/screen/gestures/pan/pan-release.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/gestures/pan/pan-reset.js +2 -0
- package/lib/commonjs/shared/providers/screen/gestures/pan/pan-reset.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/gestures/pan/use-pan-behavior.js +2 -2
- package/lib/commonjs/shared/providers/screen/gestures/pan/use-pan-behavior.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/gestures/pinch/pinch-activation.js +2 -2
- package/lib/commonjs/shared/providers/screen/gestures/pinch/pinch-activation.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/gestures/pinch/pinch-lifecycle.js +1 -0
- package/lib/commonjs/shared/providers/screen/gestures/pinch/pinch-lifecycle.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/gestures/pinch/use-pinch-behavior.js +2 -2
- package/lib/commonjs/shared/providers/screen/gestures/pinch/use-pinch-behavior.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/gestures/shared/physics.js +18 -2
- package/lib/commonjs/shared/providers/screen/gestures/shared/physics.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/gestures/shared/policy.js +1 -5
- package/lib/commonjs/shared/providers/screen/gestures/shared/policy.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/styles/hooks/use-interpolated-style-maps.js +1 -4
- package/lib/commonjs/shared/providers/screen/styles/hooks/use-interpolated-style-maps.js.map +1 -1
- package/lib/commonjs/shared/stores/bounds/helpers/link-pairs.helpers.js +125 -0
- package/lib/commonjs/shared/stores/bounds/helpers/link-pairs.helpers.js.map +1 -0
- package/lib/commonjs/shared/stores/bounds/index.js +6 -12
- package/lib/commonjs/shared/stores/bounds/index.js.map +1 -1
- package/lib/commonjs/shared/stores/bounds/internals/clear.js +13 -21
- package/lib/commonjs/shared/stores/bounds/internals/clear.js.map +1 -1
- package/lib/commonjs/shared/stores/bounds/internals/entries.js +49 -9
- package/lib/commonjs/shared/stores/bounds/internals/entries.js.map +1 -1
- package/lib/commonjs/shared/stores/bounds/internals/links.js +143 -82
- package/lib/commonjs/shared/stores/bounds/internals/links.js.map +1 -1
- package/lib/commonjs/shared/stores/bounds/internals/resolver.js +17 -43
- package/lib/commonjs/shared/stores/bounds/internals/resolver.js.map +1 -1
- package/lib/commonjs/shared/stores/bounds/internals/state.js +26 -3
- package/lib/commonjs/shared/stores/bounds/internals/state.js.map +1 -1
- package/lib/commonjs/shared/stores/gesture.store.js +2 -0
- package/lib/commonjs/shared/stores/gesture.store.js.map +1 -1
- package/lib/commonjs/shared/types/gesture.types.js +2 -2
- package/lib/commonjs/shared/types/gesture.types.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/helpers/create-bounds-accessor-core.js +2 -1
- 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 -5
- 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 +21 -8
- package/lib/commonjs/shared/utils/bounds/helpers/prepare-bound-styles.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/helpers/resolve-bounds-pair-key.js +23 -0
- package/lib/commonjs/shared/utils/bounds/helpers/resolve-bounds-pair-key.js.map +1 -0
- package/lib/commonjs/shared/utils/bounds/navigation/reveal/build.js +91 -199
- package/lib/commonjs/shared/utils/bounds/navigation/reveal/build.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/navigation/reveal/config.js +15 -2
- package/lib/commonjs/shared/utils/bounds/navigation/reveal/config.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/navigation/reveal/math.js +155 -14
- package/lib/commonjs/shared/utils/bounds/navigation/reveal/math.js.map +1 -1
- package/lib/commonjs/shared/utils/navigation/resolve-scene-neighbors.js +20 -19
- package/lib/commonjs/shared/utils/navigation/resolve-scene-neighbors.js.map +1 -1
- package/lib/module/component-stack/components/component-screen.js +2 -8
- package/lib/module/component-stack/components/component-screen.js.map +1 -1
- package/lib/module/shared/components/create-boundary-component/create-boundary-component.js +27 -34
- package/lib/module/shared/components/create-boundary-component/create-boundary-component.js.map +1 -1
- package/lib/module/shared/components/create-boundary-component/hooks/use-boundary-presence.js +4 -4
- package/lib/module/shared/components/create-boundary-component/hooks/use-boundary-presence.js.map +1 -1
- package/lib/module/shared/components/create-boundary-component/hooks/use-initial-destination-measurement.js +18 -20
- package/lib/module/shared/components/create-boundary-component/hooks/use-initial-destination-measurement.js.map +1 -1
- package/lib/module/shared/components/create-boundary-component/hooks/use-initial-source-measurement.js +28 -8
- package/lib/module/shared/components/create-boundary-component/hooks/use-initial-source-measurement.js.map +1 -1
- package/lib/module/shared/components/create-boundary-component/hooks/use-measurer.js +22 -50
- package/lib/module/shared/components/create-boundary-component/hooks/use-measurer.js.map +1 -1
- package/lib/module/shared/components/create-boundary-component/hooks/use-refresh-boundary.js +33 -40
- package/lib/module/shared/components/create-boundary-component/hooks/use-refresh-boundary.js.map +1 -1
- package/lib/module/shared/components/create-boundary-component/index.js +3 -1
- package/lib/module/shared/components/create-boundary-component/index.js.map +1 -1
- package/lib/module/shared/components/create-boundary-component/utils/destination-signals.js +70 -0
- package/lib/module/shared/components/create-boundary-component/utils/destination-signals.js.map +1 -0
- package/lib/module/shared/components/create-boundary-component/{hooks/helpers/scroll-measurement.js → utils/measured-bounds.js} +13 -1
- package/lib/module/shared/components/create-boundary-component/utils/measured-bounds.js.map +1 -0
- package/lib/module/shared/components/create-boundary-component/utils/refresh-signals.js +98 -0
- package/lib/module/shared/components/create-boundary-component/utils/refresh-signals.js.map +1 -0
- package/lib/module/shared/components/create-boundary-component/utils/source-signals.js +47 -0
- package/lib/module/shared/components/create-boundary-component/utils/source-signals.js.map +1 -0
- package/lib/module/shared/components/native-screen.js +3 -14
- package/lib/module/shared/components/native-screen.js.map +1 -1
- package/lib/module/shared/constants.js +1 -6
- package/lib/module/shared/constants.js.map +1 -1
- package/lib/module/shared/providers/helpers/measured-bounds-writes.js +30 -0
- package/lib/module/shared/providers/helpers/measured-bounds-writes.js.map +1 -0
- package/lib/module/shared/providers/register-bounds.provider.js +48 -55
- package/lib/module/shared/providers/register-bounds.provider.js.map +1 -1
- package/lib/module/shared/providers/screen/animation/helpers/accessors/use-build-transition-accessor.js +1 -10
- package/lib/module/shared/providers/screen/animation/helpers/accessors/use-build-transition-accessor.js.map +1 -1
- package/lib/module/shared/providers/screen/animation/helpers/hydrate-transition-state/index.js +1 -1
- package/lib/module/shared/providers/screen/animation/helpers/hydrate-transition-state/index.js.map +1 -1
- package/lib/module/shared/providers/screen/animation/helpers/pipeline.js.map +1 -1
- package/lib/module/shared/providers/screen/gestures/pan/pan-activation.js +2 -2
- package/lib/module/shared/providers/screen/gestures/pan/pan-activation.js.map +1 -1
- package/lib/module/shared/providers/screen/gestures/pan/pan-lifecycle.js +10 -3
- package/lib/module/shared/providers/screen/gestures/pan/pan-lifecycle.js.map +1 -1
- package/lib/module/shared/providers/screen/gestures/pan/pan-release.js +20 -1
- package/lib/module/shared/providers/screen/gestures/pan/pan-release.js.map +1 -1
- package/lib/module/shared/providers/screen/gestures/pan/pan-reset.js +2 -0
- package/lib/module/shared/providers/screen/gestures/pan/pan-reset.js.map +1 -1
- package/lib/module/shared/providers/screen/gestures/pan/use-pan-behavior.js +3 -3
- package/lib/module/shared/providers/screen/gestures/pan/use-pan-behavior.js.map +1 -1
- package/lib/module/shared/providers/screen/gestures/pinch/pinch-activation.js +3 -3
- package/lib/module/shared/providers/screen/gestures/pinch/pinch-activation.js.map +1 -1
- package/lib/module/shared/providers/screen/gestures/pinch/pinch-lifecycle.js +1 -0
- package/lib/module/shared/providers/screen/gestures/pinch/pinch-lifecycle.js.map +1 -1
- package/lib/module/shared/providers/screen/gestures/pinch/use-pinch-behavior.js +3 -3
- package/lib/module/shared/providers/screen/gestures/pinch/use-pinch-behavior.js.map +1 -1
- package/lib/module/shared/providers/screen/gestures/shared/physics.js +15 -0
- package/lib/module/shared/providers/screen/gestures/shared/physics.js.map +1 -1
- package/lib/module/shared/providers/screen/gestures/shared/policy.js +3 -3
- package/lib/module/shared/providers/screen/gestures/shared/policy.js.map +1 -1
- package/lib/module/shared/providers/screen/styles/hooks/use-interpolated-style-maps.js +1 -4
- package/lib/module/shared/providers/screen/styles/hooks/use-interpolated-style-maps.js.map +1 -1
- package/lib/module/shared/stores/bounds/helpers/link-pairs.helpers.js +105 -0
- package/lib/module/shared/stores/bounds/helpers/link-pairs.helpers.js.map +1 -0
- package/lib/module/shared/stores/bounds/index.js +7 -13
- package/lib/module/shared/stores/bounds/index.js.map +1 -1
- package/lib/module/shared/stores/bounds/internals/clear.js +14 -22
- package/lib/module/shared/stores/bounds/internals/clear.js.map +1 -1
- package/lib/module/shared/stores/bounds/internals/entries.js +49 -9
- package/lib/module/shared/stores/bounds/internals/entries.js.map +1 -1
- package/lib/module/shared/stores/bounds/internals/links.js +139 -80
- package/lib/module/shared/stores/bounds/internals/links.js.map +1 -1
- package/lib/module/shared/stores/bounds/internals/resolver.js +17 -43
- package/lib/module/shared/stores/bounds/internals/resolver.js.map +1 -1
- package/lib/module/shared/stores/bounds/internals/state.js +25 -2
- package/lib/module/shared/stores/bounds/internals/state.js.map +1 -1
- package/lib/module/shared/stores/gesture.store.js +2 -0
- package/lib/module/shared/stores/gesture.store.js.map +1 -1
- package/lib/module/shared/types/animation.types.js +0 -4
- package/lib/module/shared/types/animation.types.js.map +1 -1
- package/lib/module/shared/types/gesture.types.js +0 -1
- package/lib/module/shared/types/gesture.types.js.map +1 -1
- package/lib/module/shared/utils/bounds/helpers/create-bounds-accessor-core.js +2 -1
- 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 -5
- 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 +21 -8
- package/lib/module/shared/utils/bounds/helpers/prepare-bound-styles.js.map +1 -1
- package/lib/module/shared/utils/bounds/helpers/resolve-bounds-pair-key.js +18 -0
- package/lib/module/shared/utils/bounds/helpers/resolve-bounds-pair-key.js.map +1 -0
- package/lib/module/shared/utils/bounds/navigation/reveal/build.js +90 -198
- package/lib/module/shared/utils/bounds/navigation/reveal/build.js.map +1 -1
- package/lib/module/shared/utils/bounds/navigation/reveal/config.js +14 -1
- package/lib/module/shared/utils/bounds/navigation/reveal/config.js.map +1 -1
- package/lib/module/shared/utils/bounds/navigation/reveal/math.js +144 -12
- package/lib/module/shared/utils/bounds/navigation/reveal/math.js.map +1 -1
- package/lib/module/shared/utils/navigation/resolve-scene-neighbors.js +20 -19
- package/lib/module/shared/utils/navigation/resolve-scene-neighbors.js.map +1 -1
- package/lib/typescript/component-stack/components/component-screen.d.ts.map +1 -1
- package/lib/typescript/shared/components/create-boundary-component/create-boundary-component.d.ts +1 -0
- package/lib/typescript/shared/components/create-boundary-component/create-boundary-component.d.ts.map +1 -1
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-boundary-presence.d.ts +1 -1
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-boundary-presence.d.ts.map +1 -1
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-initial-destination-measurement.d.ts +5 -4
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-initial-destination-measurement.d.ts.map +1 -1
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-initial-source-measurement.d.ts +6 -2
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-initial-source-measurement.d.ts.map +1 -1
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-measurer.d.ts +5 -4
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-measurer.d.ts.map +1 -1
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-refresh-boundary.d.ts +7 -7
- package/lib/typescript/shared/components/create-boundary-component/hooks/use-refresh-boundary.d.ts.map +1 -1
- package/lib/typescript/shared/components/create-boundary-component/index.d.ts.map +1 -1
- package/lib/typescript/shared/components/create-boundary-component/types.d.ts +11 -7
- package/lib/typescript/shared/components/create-boundary-component/types.d.ts.map +1 -1
- package/lib/typescript/shared/components/create-boundary-component/utils/destination-signals.d.ts +10 -0
- package/lib/typescript/shared/components/create-boundary-component/utils/destination-signals.d.ts.map +1 -0
- package/lib/typescript/shared/components/create-boundary-component/{hooks/helpers/scroll-measurement.d.ts → utils/measured-bounds.d.ts} +3 -2
- package/lib/typescript/shared/components/create-boundary-component/utils/measured-bounds.d.ts.map +1 -0
- package/lib/typescript/shared/components/create-boundary-component/utils/refresh-signals.d.ts +22 -0
- package/lib/typescript/shared/components/create-boundary-component/utils/refresh-signals.d.ts.map +1 -0
- package/lib/typescript/shared/components/create-boundary-component/utils/source-signals.d.ts +16 -0
- package/lib/typescript/shared/components/create-boundary-component/utils/source-signals.d.ts.map +1 -0
- package/lib/typescript/shared/components/native-screen.d.ts.map +1 -1
- package/lib/typescript/shared/constants.d.ts +0 -5
- package/lib/typescript/shared/constants.d.ts.map +1 -1
- package/lib/typescript/shared/index.d.ts +1 -1
- package/lib/typescript/shared/index.d.ts.map +1 -1
- package/lib/typescript/shared/providers/helpers/measured-bounds-writes.d.ts +21 -0
- package/lib/typescript/shared/providers/helpers/measured-bounds-writes.d.ts.map +1 -0
- package/lib/typescript/shared/providers/register-bounds.provider.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/animation/helpers/accessors/use-build-transition-accessor.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/animation/helpers/hydrate-transition-state/index.d.ts +0 -1
- package/lib/typescript/shared/providers/screen/animation/helpers/hydrate-transition-state/index.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/animation/helpers/pipeline.d.ts +1 -1
- package/lib/typescript/shared/providers/screen/animation/helpers/pipeline.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/gestures/pan/pan-activation.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/gestures/pan/pan-lifecycle.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/gestures/pan/pan-release.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/gestures/pan/pan-reset.d.ts +2 -1
- package/lib/typescript/shared/providers/screen/gestures/pan/pan-reset.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/gestures/pan/use-pan-behavior.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/gestures/pinch/pinch-activation.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/gestures/pinch/pinch-lifecycle.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/gestures/pinch/use-pinch-behavior.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/gestures/shared/physics.d.ts +7 -0
- package/lib/typescript/shared/providers/screen/gestures/shared/physics.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/gestures/shared/policy.d.ts +0 -10
- package/lib/typescript/shared/providers/screen/gestures/shared/policy.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/gestures/types.d.ts +2 -0
- package/lib/typescript/shared/providers/screen/gestures/types.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/styles/hooks/use-interpolated-style-maps.d.ts.map +1 -1
- package/lib/typescript/shared/stores/bounds/helpers/link-pairs.helpers.d.ts +18 -0
- package/lib/typescript/shared/stores/bounds/helpers/link-pairs.helpers.d.ts.map +1 -0
- package/lib/typescript/shared/stores/bounds/index.d.ts +6 -12
- package/lib/typescript/shared/stores/bounds/index.d.ts.map +1 -1
- package/lib/typescript/shared/stores/bounds/internals/clear.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 +13 -10
- 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 +26 -5
- package/lib/typescript/shared/stores/bounds/internals/state.d.ts.map +1 -1
- package/lib/typescript/shared/stores/bounds/types.d.ts +14 -7
- package/lib/typescript/shared/stores/bounds/types.d.ts.map +1 -1
- package/lib/typescript/shared/stores/gesture.store.d.ts +1 -0
- package/lib/typescript/shared/stores/gesture.store.d.ts.map +1 -1
- package/lib/typescript/shared/types/animation.types.d.ts +0 -18
- package/lib/typescript/shared/types/animation.types.d.ts.map +1 -1
- package/lib/typescript/shared/types/gesture.types.d.ts +8 -1
- package/lib/typescript/shared/types/gesture.types.d.ts.map +1 -1
- package/lib/typescript/shared/types/index.d.ts +1 -1
- package/lib/typescript/shared/types/index.d.ts.map +1 -1
- 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.map +1 -1
- package/lib/typescript/shared/utils/bounds/helpers/prepare-bound-styles.d.ts +1 -1
- package/lib/typescript/shared/utils/bounds/helpers/prepare-bound-styles.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/helpers/resolve-bounds-pair-key.d.ts +4 -0
- package/lib/typescript/shared/utils/bounds/helpers/resolve-bounds-pair-key.d.ts.map +1 -0
- package/lib/typescript/shared/utils/bounds/navigation/reveal/build.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/navigation/reveal/config.d.ts +14 -1
- package/lib/typescript/shared/utils/bounds/navigation/reveal/config.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/navigation/reveal/math.d.ts +48 -7
- package/lib/typescript/shared/utils/bounds/navigation/reveal/math.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/types/options.d.ts +2 -3
- package/lib/typescript/shared/utils/bounds/types/options.d.ts.map +1 -1
- package/lib/typescript/shared/utils/navigation/resolve-scene-neighbors.d.ts +3 -2
- package/lib/typescript/shared/utils/navigation/resolve-scene-neighbors.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/component-stack/components/component-screen.tsx +3 -11
- package/src/shared/components/create-boundary-component/create-boundary-component.tsx +30 -27
- package/src/shared/components/create-boundary-component/hooks/use-boundary-presence.ts +5 -5
- package/src/shared/components/create-boundary-component/hooks/use-initial-destination-measurement.ts +25 -24
- package/src/shared/components/create-boundary-component/hooks/use-initial-source-measurement.ts +41 -11
- package/src/shared/components/create-boundary-component/hooks/use-measurer.ts +49 -64
- package/src/shared/components/create-boundary-component/hooks/use-refresh-boundary.ts +44 -83
- package/src/shared/components/create-boundary-component/index.tsx +3 -1
- package/src/shared/components/create-boundary-component/types.ts +13 -11
- package/src/shared/components/create-boundary-component/utils/destination-signals.ts +129 -0
- package/src/shared/components/create-boundary-component/{hooks/helpers/scroll-measurement.ts → utils/measured-bounds.ts} +25 -1
- package/src/shared/components/create-boundary-component/utils/refresh-signals.ts +164 -0
- package/src/shared/components/create-boundary-component/utils/source-signals.ts +72 -0
- package/src/shared/components/native-screen.tsx +3 -12
- package/src/shared/constants.ts +1 -6
- package/src/shared/index.ts +0 -3
- package/src/shared/providers/helpers/measured-bounds-writes.ts +67 -0
- package/src/shared/providers/register-bounds.provider.tsx +68 -91
- package/src/shared/providers/screen/animation/helpers/accessors/use-build-transition-accessor.ts +0 -14
- package/src/shared/providers/screen/animation/helpers/hydrate-transition-state/index.ts +1 -2
- package/src/shared/providers/screen/animation/helpers/pipeline.ts +1 -4
- package/src/shared/providers/screen/gestures/pan/pan-activation.ts +4 -1
- package/src/shared/providers/screen/gestures/pan/pan-lifecycle.ts +18 -2
- package/src/shared/providers/screen/gestures/pan/pan-release.ts +33 -0
- package/src/shared/providers/screen/gestures/pan/pan-reset.ts +3 -0
- package/src/shared/providers/screen/gestures/pan/use-pan-behavior.ts +9 -6
- package/src/shared/providers/screen/gestures/pinch/pinch-activation.ts +5 -2
- package/src/shared/providers/screen/gestures/pinch/pinch-lifecycle.ts +1 -0
- package/src/shared/providers/screen/gestures/pinch/use-pinch-behavior.ts +9 -6
- package/src/shared/providers/screen/gestures/shared/physics.ts +25 -0
- package/src/shared/providers/screen/gestures/shared/policy.ts +3 -5
- package/src/shared/providers/screen/gestures/types.ts +2 -0
- package/src/shared/providers/screen/styles/hooks/use-interpolated-style-maps.tsx +0 -3
- package/src/shared/stores/bounds/helpers/link-pairs.helpers.ts +161 -0
- package/src/shared/stores/bounds/index.ts +10 -20
- package/src/shared/stores/bounds/internals/clear.ts +17 -41
- package/src/shared/stores/bounds/internals/entries.ts +56 -13
- package/src/shared/stores/bounds/internals/links.ts +222 -113
- package/src/shared/stores/bounds/internals/resolver.ts +23 -87
- package/src/shared/stores/bounds/internals/state.ts +27 -5
- package/src/shared/stores/bounds/types.ts +17 -7
- package/src/shared/stores/gesture.store.ts +3 -0
- package/src/shared/types/animation.types.ts +0 -23
- package/src/shared/types/gesture.types.ts +8 -2
- package/src/shared/types/index.ts +0 -4
- package/src/shared/utils/bounds/helpers/create-bounds-accessor-core.ts +1 -0
- package/src/shared/utils/bounds/helpers/create-link-accessor.ts +6 -6
- package/src/shared/utils/bounds/helpers/prepare-bound-styles.ts +20 -11
- package/src/shared/utils/bounds/helpers/resolve-bounds-pair-key.ts +22 -0
- package/src/shared/utils/bounds/navigation/reveal/build.ts +153 -297
- package/src/shared/utils/bounds/navigation/reveal/config.ts +20 -1
- package/src/shared/utils/bounds/navigation/reveal/math.ts +234 -18
- package/src/shared/utils/bounds/types/options.ts +2 -3
- package/src/shared/utils/navigation/resolve-scene-neighbors.ts +36 -23
- package/lib/commonjs/shared/components/create-boundary-component/helpers/apply-measured-bounds-writes.js +0 -43
- package/lib/commonjs/shared/components/create-boundary-component/helpers/apply-measured-bounds-writes.js.map +0 -1
- package/lib/commonjs/shared/components/create-boundary-component/helpers/resolve-pending-source-key.js +0 -17
- package/lib/commonjs/shared/components/create-boundary-component/helpers/resolve-pending-source-key.js.map +0 -1
- package/lib/commonjs/shared/components/create-boundary-component/hooks/helpers/boundary-link-context.js +0 -28
- package/lib/commonjs/shared/components/create-boundary-component/hooks/helpers/boundary-link-context.js.map +0 -1
- package/lib/commonjs/shared/components/create-boundary-component/hooks/helpers/measurement-rules.js +0 -75
- package/lib/commonjs/shared/components/create-boundary-component/hooks/helpers/measurement-rules.js.map +0 -1
- package/lib/commonjs/shared/components/create-boundary-component/hooks/helpers/measurement.js +0 -20
- package/lib/commonjs/shared/components/create-boundary-component/hooks/helpers/measurement.js.map +0 -1
- package/lib/commonjs/shared/components/create-boundary-component/hooks/helpers/scroll-measurement.js.map +0 -1
- package/lib/commonjs/shared/components/create-boundary-component/utils/build-boundary-match-key.js +0 -16
- package/lib/commonjs/shared/components/create-boundary-component/utils/build-boundary-match-key.js.map +0 -1
- package/lib/commonjs/shared/providers/layout-anchor.provider.js +0 -86
- package/lib/commonjs/shared/providers/layout-anchor.provider.js.map +0 -1
- package/lib/commonjs/shared/stores/bounds/helpers/entries.helpers.js +0 -49
- package/lib/commonjs/shared/stores/bounds/helpers/entries.helpers.js.map +0 -1
- package/lib/commonjs/shared/stores/bounds/helpers/find-latest.js +0 -25
- package/lib/commonjs/shared/stores/bounds/helpers/find-latest.js.map +0 -1
- package/lib/commonjs/shared/stores/bounds/helpers/groups.helpers.js +0 -30
- package/lib/commonjs/shared/stores/bounds/helpers/groups.helpers.js.map +0 -1
- package/lib/commonjs/shared/stores/bounds/helpers/link.helpers.js +0 -79
- package/lib/commonjs/shared/stores/bounds/helpers/link.helpers.js.map +0 -1
- package/lib/commonjs/shared/stores/bounds/helpers/matching.js +0 -13
- package/lib/commonjs/shared/stores/bounds/helpers/matching.js.map +0 -1
- package/lib/commonjs/shared/stores/bounds/helpers/tag-state.helpers.js +0 -30
- package/lib/commonjs/shared/stores/bounds/helpers/tag-state.helpers.js.map +0 -1
- package/lib/commonjs/shared/stores/bounds/internals/groups.js +0 -102
- package/lib/commonjs/shared/stores/bounds/internals/groups.js.map +0 -1
- package/lib/module/shared/components/create-boundary-component/helpers/apply-measured-bounds-writes.js +0 -38
- package/lib/module/shared/components/create-boundary-component/helpers/apply-measured-bounds-writes.js.map +0 -1
- package/lib/module/shared/components/create-boundary-component/helpers/resolve-pending-source-key.js +0 -12
- package/lib/module/shared/components/create-boundary-component/helpers/resolve-pending-source-key.js.map +0 -1
- package/lib/module/shared/components/create-boundary-component/hooks/helpers/boundary-link-context.js +0 -23
- package/lib/module/shared/components/create-boundary-component/hooks/helpers/boundary-link-context.js.map +0 -1
- package/lib/module/shared/components/create-boundary-component/hooks/helpers/measurement-rules.js +0 -68
- package/lib/module/shared/components/create-boundary-component/hooks/helpers/measurement-rules.js.map +0 -1
- package/lib/module/shared/components/create-boundary-component/hooks/helpers/measurement.js +0 -15
- package/lib/module/shared/components/create-boundary-component/hooks/helpers/measurement.js.map +0 -1
- package/lib/module/shared/components/create-boundary-component/hooks/helpers/scroll-measurement.js.map +0 -1
- package/lib/module/shared/components/create-boundary-component/utils/build-boundary-match-key.js +0 -12
- package/lib/module/shared/components/create-boundary-component/utils/build-boundary-match-key.js.map +0 -1
- package/lib/module/shared/providers/layout-anchor.provider.js +0 -80
- package/lib/module/shared/providers/layout-anchor.provider.js.map +0 -1
- package/lib/module/shared/stores/bounds/helpers/entries.helpers.js +0 -42
- package/lib/module/shared/stores/bounds/helpers/entries.helpers.js.map +0 -1
- package/lib/module/shared/stores/bounds/helpers/find-latest.js +0 -19
- package/lib/module/shared/stores/bounds/helpers/find-latest.js.map +0 -1
- package/lib/module/shared/stores/bounds/helpers/groups.helpers.js +0 -23
- package/lib/module/shared/stores/bounds/helpers/groups.helpers.js.map +0 -1
- package/lib/module/shared/stores/bounds/helpers/link.helpers.js +0 -69
- package/lib/module/shared/stores/bounds/helpers/link.helpers.js.map +0 -1
- package/lib/module/shared/stores/bounds/helpers/matching.js +0 -9
- package/lib/module/shared/stores/bounds/helpers/matching.js.map +0 -1
- package/lib/module/shared/stores/bounds/helpers/tag-state.helpers.js +0 -24
- package/lib/module/shared/stores/bounds/helpers/tag-state.helpers.js.map +0 -1
- package/lib/module/shared/stores/bounds/internals/groups.js +0 -95
- package/lib/module/shared/stores/bounds/internals/groups.js.map +0 -1
- package/lib/typescript/shared/components/create-boundary-component/helpers/apply-measured-bounds-writes.d.ts +0 -15
- package/lib/typescript/shared/components/create-boundary-component/helpers/apply-measured-bounds-writes.d.ts.map +0 -1
- package/lib/typescript/shared/components/create-boundary-component/helpers/resolve-pending-source-key.d.ts +0 -2
- package/lib/typescript/shared/components/create-boundary-component/helpers/resolve-pending-source-key.d.ts.map +0 -1
- package/lib/typescript/shared/components/create-boundary-component/hooks/helpers/boundary-link-context.d.ts +0 -22
- package/lib/typescript/shared/components/create-boundary-component/hooks/helpers/boundary-link-context.d.ts.map +0 -1
- package/lib/typescript/shared/components/create-boundary-component/hooks/helpers/measurement-rules.d.ts +0 -29
- package/lib/typescript/shared/components/create-boundary-component/hooks/helpers/measurement-rules.d.ts.map +0 -1
- package/lib/typescript/shared/components/create-boundary-component/hooks/helpers/measurement.d.ts +0 -3
- package/lib/typescript/shared/components/create-boundary-component/hooks/helpers/measurement.d.ts.map +0 -1
- package/lib/typescript/shared/components/create-boundary-component/hooks/helpers/scroll-measurement.d.ts.map +0 -1
- package/lib/typescript/shared/components/create-boundary-component/utils/build-boundary-match-key.d.ts +0 -8
- package/lib/typescript/shared/components/create-boundary-component/utils/build-boundary-match-key.d.ts.map +0 -1
- package/lib/typescript/shared/providers/layout-anchor.provider.d.ts +0 -39
- package/lib/typescript/shared/providers/layout-anchor.provider.d.ts.map +0 -1
- package/lib/typescript/shared/stores/bounds/helpers/entries.helpers.d.ts +0 -5
- package/lib/typescript/shared/stores/bounds/helpers/entries.helpers.d.ts.map +0 -1
- package/lib/typescript/shared/stores/bounds/helpers/find-latest.d.ts +0 -3
- package/lib/typescript/shared/stores/bounds/helpers/find-latest.d.ts.map +0 -1
- package/lib/typescript/shared/stores/bounds/helpers/groups.helpers.d.ts +0 -10
- package/lib/typescript/shared/stores/bounds/helpers/groups.helpers.d.ts.map +0 -1
- package/lib/typescript/shared/stores/bounds/helpers/link.helpers.d.ts +0 -14
- package/lib/typescript/shared/stores/bounds/helpers/link.helpers.d.ts.map +0 -1
- package/lib/typescript/shared/stores/bounds/helpers/matching.d.ts +0 -3
- package/lib/typescript/shared/stores/bounds/helpers/matching.d.ts.map +0 -1
- package/lib/typescript/shared/stores/bounds/helpers/tag-state.helpers.d.ts +0 -5
- package/lib/typescript/shared/stores/bounds/helpers/tag-state.helpers.d.ts.map +0 -1
- package/lib/typescript/shared/stores/bounds/internals/groups.d.ts +0 -16
- package/lib/typescript/shared/stores/bounds/internals/groups.d.ts.map +0 -1
- package/src/shared/components/create-boundary-component/helpers/apply-measured-bounds-writes.ts +0 -83
- package/src/shared/components/create-boundary-component/helpers/resolve-pending-source-key.ts +0 -20
- package/src/shared/components/create-boundary-component/hooks/helpers/boundary-link-context.ts +0 -48
- package/src/shared/components/create-boundary-component/hooks/helpers/measurement-rules.ts +0 -101
- package/src/shared/components/create-boundary-component/hooks/helpers/measurement.ts +0 -25
- package/src/shared/components/create-boundary-component/utils/build-boundary-match-key.ts +0 -14
- package/src/shared/providers/layout-anchor.provider.tsx +0 -112
- package/src/shared/stores/bounds/helpers/entries.helpers.ts +0 -55
- package/src/shared/stores/bounds/helpers/find-latest.ts +0 -22
- package/src/shared/stores/bounds/helpers/groups.helpers.ts +0 -27
- package/src/shared/stores/bounds/helpers/link.helpers.ts +0 -131
- package/src/shared/stores/bounds/helpers/matching.ts +0 -11
- package/src/shared/stores/bounds/helpers/tag-state.helpers.ts +0 -24
- package/src/shared/stores/bounds/internals/groups.ts +0 -116
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { TagID } from "../types";
|
|
2
|
-
type GroupTag = {
|
|
3
|
-
group: string;
|
|
4
|
-
id: string;
|
|
5
|
-
};
|
|
6
|
-
export declare const parseGroupTag: (tag: string) => GroupTag | null;
|
|
7
|
-
export declare const createGroupTag: (group: string, id: string) => TagID;
|
|
8
|
-
export declare const getGroupName: (tagOrGroup: string) => string;
|
|
9
|
-
export {};
|
|
10
|
-
//# sourceMappingURL=groups.helpers.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"groups.helpers.d.ts","sourceRoot":"","sources":["../../../../../../src/shared/stores/bounds/helpers/groups.helpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAEtC,KAAK,QAAQ,GAAG;IACf,KAAK,EAAE,MAAM,CAAC;IACd,EAAE,EAAE,MAAM,CAAC;CACX,CAAC;AAEF,eAAO,MAAM,aAAa,GAAI,KAAK,MAAM,KAAG,QAAQ,GAAG,IAStD,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,OAAO,MAAM,EAAE,IAAI,MAAM,KAAG,KAG1D,CAAC;AAEF,eAAO,MAAM,YAAY,GAAI,YAAY,MAAM,KAAG,MAGjD,CAAC"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { ScreenKey, TagLink } from "../types";
|
|
2
|
-
type LinkSide = "source" | "destination";
|
|
3
|
-
export declare const isSameScreenFamily: (a: {
|
|
4
|
-
screenKey: ScreenKey;
|
|
5
|
-
}, b: {
|
|
6
|
-
screenKey: ScreenKey;
|
|
7
|
-
}) => boolean;
|
|
8
|
-
export declare function findLatestPendingSourceLinkIndex(stack: TagLink[], expectedSourceScreenKey?: ScreenKey): number;
|
|
9
|
-
export declare function selectSourceUpdateTargetIndex(stack: TagLink[], screenKey: ScreenKey): number;
|
|
10
|
-
export declare function findLinkIndexForDestinationWrite(stack: TagLink[], destinationScreenKey?: ScreenKey, expectedSourceScreenKey?: ScreenKey): number;
|
|
11
|
-
export declare function hasLinkSide(stack: TagLink[] | undefined, screenKey: ScreenKey, side: LinkSide): boolean;
|
|
12
|
-
export declare function isCompletedLinkForScreenKey(link: TagLink, screenKey: ScreenKey): boolean;
|
|
13
|
-
export {};
|
|
14
|
-
//# sourceMappingURL=link.helpers.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"link.helpers.d.ts","sourceRoot":"","sources":["../../../../../../src/shared/stores/bounds/helpers/link.helpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAInD,KAAK,QAAQ,GAAG,QAAQ,GAAG,aAAa,CAAC;AAEzC,eAAO,MAAM,kBAAkB,GAC9B,GAAG;IAAE,SAAS,EAAE,SAAS,CAAA;CAAE,EAC3B,GAAG;IAAE,SAAS,EAAE,SAAS,CAAA;CAAE,KACzB,OAGF,CAAC;AAEF,wBAAgB,gCAAgC,CAC/C,KAAK,EAAE,OAAO,EAAE,EAChB,uBAAuB,CAAC,EAAE,SAAS,GACjC,MAAM,CASR;AAyCD,wBAAgB,6BAA6B,CAC5C,KAAK,EAAE,OAAO,EAAE,EAChB,SAAS,EAAE,SAAS,GAClB,MAAM,CAQR;AAED,wBAAgB,gCAAgC,CAC/C,KAAK,EAAE,OAAO,EAAE,EAChB,oBAAoB,CAAC,EAAE,SAAS,EAChC,uBAAuB,CAAC,EAAE,SAAS,GACjC,MAAM,CAmBR;AAED,wBAAgB,WAAW,CAC1B,KAAK,EAAE,OAAO,EAAE,GAAG,SAAS,EAC5B,SAAS,EAAE,SAAS,EACpB,IAAI,EAAE,QAAQ,GACZ,OAAO,CAST;AAED,wBAAgB,2BAA2B,CAC1C,IAAI,EAAE,OAAO,EACb,SAAS,EAAE,SAAS,GAClB,OAAO,CAOT"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"matching.d.ts","sourceRoot":"","sources":["../../../../../../src/shared/stores/bounds/helpers/matching.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAE5D,wBAAgB,gBAAgB,CAC/B,UAAU,EAAE,gBAAgB,GAAG,IAAI,GAAG,SAAS,EAC/C,GAAG,EAAE,SAAS,GACZ,OAAO,CAKT"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { RegistryState } from "../internals/state";
|
|
2
|
-
import type { TagID, TagState } from "../types";
|
|
3
|
-
export declare const ensureTagState: (state: RegistryState, tag: TagID) => TagState;
|
|
4
|
-
export declare const pruneTagState: (state: RegistryState, tag: TagID) => void;
|
|
5
|
-
//# sourceMappingURL=tag-state.helpers.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tag-state.helpers.d.ts","sourceRoot":"","sources":["../../../../../../src/shared/stores/bounds/helpers/tag-state.helpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAGhD,eAAO,MAAM,cAAc,GAAI,OAAO,aAAa,EAAE,KAAK,KAAK,KAAG,QASjE,CAAC;AAEF,eAAO,MAAM,aAAa,GAAI,OAAO,aAAa,EAAE,KAAK,KAAK,SAQ7D,CAAC"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import type { ScreenKey, TagID, TagLink } from "../types";
|
|
2
|
-
type ResolveGroupLinkParams = {
|
|
3
|
-
tag: TagID;
|
|
4
|
-
screenKey?: ScreenKey;
|
|
5
|
-
};
|
|
6
|
-
type ResolvedGroupLink = {
|
|
7
|
-
tag: TagID;
|
|
8
|
-
link: TagLink | null;
|
|
9
|
-
};
|
|
10
|
-
declare function setGroupActiveId(group: string, id: string): void;
|
|
11
|
-
declare function setGroupInitialId(group: string, id: string): void;
|
|
12
|
-
declare function getGroupActiveId(tagOrGroup: string): string | null;
|
|
13
|
-
declare function getGroupInitialId(tagOrGroup: string): string | null;
|
|
14
|
-
declare function resolveGroupLink({ tag, screenKey, }: ResolveGroupLinkParams): ResolvedGroupLink;
|
|
15
|
-
export { getGroupActiveId, getGroupInitialId, resolveGroupLink, setGroupActiveId, setGroupInitialId, };
|
|
16
|
-
//# sourceMappingURL=groups.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"groups.d.ts","sourceRoot":"","sources":["../../../../../../src/shared/stores/bounds/internals/groups.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAI1D,KAAK,sBAAsB,GAAG;IAC7B,GAAG,EAAE,KAAK,CAAC;IACX,SAAS,CAAC,EAAE,SAAS,CAAC;CACtB,CAAC;AAEF,KAAK,iBAAiB,GAAG;IACxB,GAAG,EAAE,KAAK,CAAC;IACX,IAAI,EAAE,OAAO,GAAG,IAAI,CAAC;CACrB,CAAC;AAEF,iBAAS,gBAAgB,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAYlD;AAED,iBAAS,iBAAiB,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAWnD;AAED,iBAAS,gBAAgB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAG3D;AAED,iBAAS,iBAAiB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAG5D;AAGD,iBAAS,gBAAgB,CAAC,EACzB,GAAG,EACH,SAAS,GACT,EAAE,sBAAsB,GAAG,iBAAiB,CA+C5C;AAED,OAAO,EACN,gBAAgB,EAChB,iBAAiB,EACjB,gBAAgB,EAChB,gBAAgB,EAChB,iBAAiB,GACjB,CAAC"}
|
package/src/shared/components/create-boundary-component/helpers/apply-measured-bounds-writes.ts
DELETED
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
import type { MeasuredDimensions, StyleProps } from "react-native-reanimated";
|
|
2
|
-
import { setEntry } from "../../../stores/bounds/internals/entries";
|
|
3
|
-
import {
|
|
4
|
-
setDestination,
|
|
5
|
-
setSource,
|
|
6
|
-
} from "../../../stores/bounds/internals/links";
|
|
7
|
-
|
|
8
|
-
type ApplyMeasuredBoundsWritesParams = {
|
|
9
|
-
sharedBoundTag: string;
|
|
10
|
-
currentScreenKey: string;
|
|
11
|
-
measured: MeasuredDimensions;
|
|
12
|
-
preparedStyles: StyleProps;
|
|
13
|
-
shouldSetSource?: boolean;
|
|
14
|
-
shouldUpdateSource?: boolean;
|
|
15
|
-
shouldSetDestination?: boolean;
|
|
16
|
-
shouldUpdateDestination?: boolean;
|
|
17
|
-
expectedSourceScreenKey?: string;
|
|
18
|
-
};
|
|
19
|
-
|
|
20
|
-
export const applyMeasuredBoundsWrites = (
|
|
21
|
-
params: ApplyMeasuredBoundsWritesParams,
|
|
22
|
-
) => {
|
|
23
|
-
"worklet";
|
|
24
|
-
const {
|
|
25
|
-
sharedBoundTag,
|
|
26
|
-
currentScreenKey,
|
|
27
|
-
measured,
|
|
28
|
-
preparedStyles,
|
|
29
|
-
shouldSetSource,
|
|
30
|
-
shouldUpdateSource,
|
|
31
|
-
shouldSetDestination,
|
|
32
|
-
shouldUpdateDestination,
|
|
33
|
-
expectedSourceScreenKey,
|
|
34
|
-
} = params;
|
|
35
|
-
|
|
36
|
-
// Set the bounds entry on every measure to avoid any stale measurements
|
|
37
|
-
// for the public read API.
|
|
38
|
-
setEntry(sharedBoundTag, currentScreenKey, {
|
|
39
|
-
bounds: measured,
|
|
40
|
-
});
|
|
41
|
-
|
|
42
|
-
if (shouldSetSource) {
|
|
43
|
-
setSource(
|
|
44
|
-
"capture",
|
|
45
|
-
sharedBoundTag,
|
|
46
|
-
currentScreenKey,
|
|
47
|
-
measured,
|
|
48
|
-
preparedStyles,
|
|
49
|
-
);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
if (shouldUpdateSource) {
|
|
53
|
-
setSource(
|
|
54
|
-
"refresh",
|
|
55
|
-
sharedBoundTag,
|
|
56
|
-
currentScreenKey,
|
|
57
|
-
measured,
|
|
58
|
-
preparedStyles,
|
|
59
|
-
);
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
if (shouldUpdateDestination) {
|
|
63
|
-
setDestination(
|
|
64
|
-
"refresh",
|
|
65
|
-
sharedBoundTag,
|
|
66
|
-
currentScreenKey,
|
|
67
|
-
measured,
|
|
68
|
-
preparedStyles,
|
|
69
|
-
expectedSourceScreenKey,
|
|
70
|
-
);
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
if (shouldSetDestination) {
|
|
74
|
-
setDestination(
|
|
75
|
-
"attach",
|
|
76
|
-
sharedBoundTag,
|
|
77
|
-
currentScreenKey,
|
|
78
|
-
measured,
|
|
79
|
-
preparedStyles,
|
|
80
|
-
expectedSourceScreenKey,
|
|
81
|
-
);
|
|
82
|
-
}
|
|
83
|
-
};
|
package/src/shared/components/create-boundary-component/helpers/resolve-pending-source-key.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
getPendingLink,
|
|
3
|
-
hasSourceLink,
|
|
4
|
-
} from "../../../stores/bounds/internals/links";
|
|
5
|
-
|
|
6
|
-
export const resolvePendingSourceKey = (
|
|
7
|
-
sharedBoundTag: string,
|
|
8
|
-
expectedSourceScreenKey?: string,
|
|
9
|
-
): string | null => {
|
|
10
|
-
"worklet";
|
|
11
|
-
if (
|
|
12
|
-
expectedSourceScreenKey &&
|
|
13
|
-
(getPendingLink(sharedBoundTag, expectedSourceScreenKey) ||
|
|
14
|
-
hasSourceLink(sharedBoundTag, expectedSourceScreenKey))
|
|
15
|
-
) {
|
|
16
|
-
return expectedSourceScreenKey;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
return getPendingLink(sharedBoundTag)?.source.screenKey ?? null;
|
|
20
|
-
};
|
package/src/shared/components/create-boundary-component/hooks/helpers/boundary-link-context.ts
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
getPendingLink,
|
|
3
|
-
hasDestinationLink,
|
|
4
|
-
hasSourceLink,
|
|
5
|
-
} from "../../../../stores/bounds/internals/links";
|
|
6
|
-
import { resolvePendingSourceKey } from "../../helpers/resolve-pending-source-key";
|
|
7
|
-
|
|
8
|
-
export type LinkContext = {
|
|
9
|
-
/**
|
|
10
|
-
* The source screen this measurement should pair with, if one can be
|
|
11
|
-
* resolved. Disambiguates between multiple candidate sources in the
|
|
12
|
-
* registry (e.g. nested or repeat presentations of the same tag).
|
|
13
|
-
*/
|
|
14
|
-
expectedSourceScreenKey: string | undefined;
|
|
15
|
-
/** A pending link exists waiting for a destination to attach. */
|
|
16
|
-
hasPendingLink: boolean;
|
|
17
|
-
/** The expected source screen has a captured source ready to attach to. */
|
|
18
|
-
hasAttachableSourceLink: boolean;
|
|
19
|
-
/** The current screen is already registered as the source for this tag. */
|
|
20
|
-
hasSourceLink: boolean;
|
|
21
|
-
/** The current screen is already registered as the destination for this tag. */
|
|
22
|
-
hasDestinationLink: boolean;
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
export const createLinkContext = (params: {
|
|
26
|
-
sharedBoundTag: string;
|
|
27
|
-
currentScreenKey: string;
|
|
28
|
-
preferredSourceScreenKey?: string;
|
|
29
|
-
}): LinkContext => {
|
|
30
|
-
"worklet";
|
|
31
|
-
const { sharedBoundTag, currentScreenKey, preferredSourceScreenKey } = params;
|
|
32
|
-
|
|
33
|
-
const expectedSourceScreenKey =
|
|
34
|
-
resolvePendingSourceKey(sharedBoundTag, preferredSourceScreenKey) ??
|
|
35
|
-
undefined;
|
|
36
|
-
const hasPendingLink =
|
|
37
|
-
getPendingLink(sharedBoundTag, expectedSourceScreenKey) !== null;
|
|
38
|
-
|
|
39
|
-
return {
|
|
40
|
-
expectedSourceScreenKey,
|
|
41
|
-
hasPendingLink,
|
|
42
|
-
hasAttachableSourceLink: expectedSourceScreenKey
|
|
43
|
-
? hasSourceLink(sharedBoundTag, expectedSourceScreenKey)
|
|
44
|
-
: false,
|
|
45
|
-
hasSourceLink: hasSourceLink(sharedBoundTag, currentScreenKey),
|
|
46
|
-
hasDestinationLink: hasDestinationLink(sharedBoundTag, currentScreenKey),
|
|
47
|
-
};
|
|
48
|
-
};
|
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
import type { MeasureIntent } from "../../types";
|
|
2
|
-
|
|
3
|
-
export type MeasureIntentFlags = {
|
|
4
|
-
captureSource: boolean;
|
|
5
|
-
completeDestination: boolean;
|
|
6
|
-
refreshSource: boolean;
|
|
7
|
-
refreshDestination: boolean;
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
export type MeasureWritePlan = {
|
|
11
|
-
captureSource: boolean;
|
|
12
|
-
completeDestination: boolean;
|
|
13
|
-
refreshSource: boolean;
|
|
14
|
-
refreshDestination: boolean;
|
|
15
|
-
writesAny: boolean;
|
|
16
|
-
wantsDestinationWrite: boolean;
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
export const shouldBlockInitialDestinationMeasurement = (params: {
|
|
20
|
-
enabled: boolean;
|
|
21
|
-
hasDestinationLink: boolean;
|
|
22
|
-
hasAttachableSourceLink: boolean;
|
|
23
|
-
}): boolean => {
|
|
24
|
-
"worklet";
|
|
25
|
-
const { enabled, hasDestinationLink, hasAttachableSourceLink } = params;
|
|
26
|
-
|
|
27
|
-
return enabled && hasAttachableSourceLink && !hasDestinationLink;
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
export const getMeasureIntentFlags = (
|
|
31
|
-
intent?: MeasureIntent | readonly MeasureIntent[],
|
|
32
|
-
): MeasureIntentFlags => {
|
|
33
|
-
"worklet";
|
|
34
|
-
const flags: MeasureIntentFlags = {
|
|
35
|
-
captureSource: false,
|
|
36
|
-
completeDestination: false,
|
|
37
|
-
refreshSource: false,
|
|
38
|
-
refreshDestination: false,
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
if (!intent) {
|
|
42
|
-
return flags;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
const intents = Array.isArray(intent) ? intent : [intent];
|
|
46
|
-
|
|
47
|
-
for (let i = 0; i < intents.length; i++) {
|
|
48
|
-
switch (intents[i]) {
|
|
49
|
-
case "capture-source":
|
|
50
|
-
flags.captureSource = true;
|
|
51
|
-
break;
|
|
52
|
-
case "complete-destination":
|
|
53
|
-
flags.completeDestination = true;
|
|
54
|
-
break;
|
|
55
|
-
case "refresh-source":
|
|
56
|
-
flags.refreshSource = true;
|
|
57
|
-
break;
|
|
58
|
-
case "refresh-destination":
|
|
59
|
-
flags.refreshDestination = true;
|
|
60
|
-
break;
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
return flags;
|
|
65
|
-
};
|
|
66
|
-
|
|
67
|
-
export const buildMeasurementWritePlan = (params: {
|
|
68
|
-
intents: MeasureIntentFlags;
|
|
69
|
-
hasPendingLink: boolean;
|
|
70
|
-
hasSourceLink: boolean;
|
|
71
|
-
hasDestinationLink: boolean;
|
|
72
|
-
hasAttachableSourceLink: boolean;
|
|
73
|
-
}): MeasureWritePlan => {
|
|
74
|
-
"worklet";
|
|
75
|
-
const {
|
|
76
|
-
intents,
|
|
77
|
-
hasPendingLink,
|
|
78
|
-
hasSourceLink,
|
|
79
|
-
hasDestinationLink,
|
|
80
|
-
hasAttachableSourceLink,
|
|
81
|
-
} = params;
|
|
82
|
-
|
|
83
|
-
const captureSource = intents.captureSource;
|
|
84
|
-
const completeDestination =
|
|
85
|
-
intents.completeDestination && (hasPendingLink || hasAttachableSourceLink);
|
|
86
|
-
const refreshSource = intents.refreshSource && hasSourceLink;
|
|
87
|
-
const refreshDestination =
|
|
88
|
-
intents.refreshDestination &&
|
|
89
|
-
(hasDestinationLink || hasPendingLink || hasAttachableSourceLink);
|
|
90
|
-
const writesAny =
|
|
91
|
-
captureSource || completeDestination || refreshSource || refreshDestination;
|
|
92
|
-
|
|
93
|
-
return {
|
|
94
|
-
captureSource,
|
|
95
|
-
completeDestination,
|
|
96
|
-
refreshSource,
|
|
97
|
-
refreshDestination,
|
|
98
|
-
writesAny,
|
|
99
|
-
wantsDestinationWrite: completeDestination || refreshDestination,
|
|
100
|
-
};
|
|
101
|
-
};
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import type { MeasuredDimensions } from "react-native-reanimated";
|
|
2
|
-
|
|
3
|
-
export const isMeasurementInViewport = (
|
|
4
|
-
measured: MeasuredDimensions,
|
|
5
|
-
viewportWidth: number,
|
|
6
|
-
viewportHeight: number,
|
|
7
|
-
): boolean => {
|
|
8
|
-
"worklet";
|
|
9
|
-
|
|
10
|
-
if (measured.width <= 0 || measured.height <= 0) {
|
|
11
|
-
return false;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
const toleranceX = viewportWidth * 0.15;
|
|
15
|
-
const toleranceY = viewportHeight * 0.15;
|
|
16
|
-
const centerX = measured.pageX + measured.width / 2;
|
|
17
|
-
const centerY = measured.pageY + measured.height / 2;
|
|
18
|
-
|
|
19
|
-
return (
|
|
20
|
-
centerX >= -toleranceX &&
|
|
21
|
-
centerX <= viewportWidth + toleranceX &&
|
|
22
|
-
centerY >= -toleranceY &&
|
|
23
|
-
centerY <= viewportHeight + toleranceY
|
|
24
|
-
);
|
|
25
|
-
};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { BoundaryId } from "../types";
|
|
2
|
-
|
|
3
|
-
type BuildBoundaryMatchKeyParams = {
|
|
4
|
-
group?: string;
|
|
5
|
-
id: BoundaryId;
|
|
6
|
-
};
|
|
7
|
-
|
|
8
|
-
export function buildBoundaryMatchKey(
|
|
9
|
-
params: BuildBoundaryMatchKeyParams,
|
|
10
|
-
): string {
|
|
11
|
-
"worklet";
|
|
12
|
-
const { group, id } = params;
|
|
13
|
-
return group ? `${group}:${id}` : String(id);
|
|
14
|
-
}
|
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
import { type ReactNode, useCallback, useMemo } from "react";
|
|
2
|
-
import { useWindowDimensions, type View } from "react-native";
|
|
3
|
-
import {
|
|
4
|
-
type AnimatedRef,
|
|
5
|
-
type MeasuredDimensions,
|
|
6
|
-
measure,
|
|
7
|
-
} from "react-native-reanimated";
|
|
8
|
-
import createProvider from "../utils/create-provider";
|
|
9
|
-
|
|
10
|
-
interface LayoutAnchorProviderProps {
|
|
11
|
-
anchorRef: AnimatedRef<View>;
|
|
12
|
-
children: ReactNode;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
interface LayoutAnchorContextValue {
|
|
16
|
-
/**
|
|
17
|
-
* Corrects measured dimensions for parent transforms (translation and scale).
|
|
18
|
-
* The anchor should be at (0, 0) with full screen dimensions - any difference
|
|
19
|
-
* is from parent transforms. This function reverses those transforms to yield
|
|
20
|
-
* the true layout position and dimensions.
|
|
21
|
-
*/
|
|
22
|
-
correctMeasurement: (measured: MeasuredDimensions) => MeasuredDimensions;
|
|
23
|
-
/**
|
|
24
|
-
* Returns true when the corrected measurement is plausibly inside viewport space.
|
|
25
|
-
* This helps reject transient off-page measurements from paged containers.
|
|
26
|
-
*/
|
|
27
|
-
isMeasurementInViewport: (measured: MeasuredDimensions) => boolean;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* Provides a reference point for correcting bounds measurements.
|
|
32
|
-
*
|
|
33
|
-
* When a parent view has transforms applied (e.g., during screen transitions),
|
|
34
|
-
* `measure()` returns visual positions that include those transforms. This provider
|
|
35
|
-
* establishes an anchor point (typically the screen container at 0,0) and exposes
|
|
36
|
-
* a `correctMeasurement` function that reverses translation and scale transforms
|
|
37
|
-
* to yield the true layout position and dimensions.
|
|
38
|
-
*
|
|
39
|
-
* ## How it works
|
|
40
|
-
*
|
|
41
|
-
* 1. **Translation**: Subtract anchor's pageX/pageY offset
|
|
42
|
-
* 2. **Scale**: Compare anchor's measured size to expected (screen) size to compute
|
|
43
|
-
* scale factor, then divide positions and dimensions by that factor
|
|
44
|
-
*/
|
|
45
|
-
const { LayoutAnchorProvider, useLayoutAnchorContext } = createProvider(
|
|
46
|
-
"LayoutAnchor",
|
|
47
|
-
{ guarded: false },
|
|
48
|
-
)<LayoutAnchorProviderProps, LayoutAnchorContextValue>(
|
|
49
|
-
({ anchorRef, children }) => {
|
|
50
|
-
const { width: screenWidth, height: screenHeight } = useWindowDimensions();
|
|
51
|
-
|
|
52
|
-
const correctMeasurement = useCallback(
|
|
53
|
-
(measured: MeasuredDimensions): MeasuredDimensions => {
|
|
54
|
-
"worklet";
|
|
55
|
-
const anchor = measure(anchorRef);
|
|
56
|
-
if (!anchor) return measured;
|
|
57
|
-
|
|
58
|
-
// Compute scale factor by comparing anchor size to expected screen size.
|
|
59
|
-
// Anchor should be full-screen (absoluteFill), so any difference is from scale.
|
|
60
|
-
const scaleX = anchor.width > 0 ? anchor.width / screenWidth : 1;
|
|
61
|
-
const scaleY = anchor.height > 0 ? anchor.height / screenHeight : 1;
|
|
62
|
-
|
|
63
|
-
// Get element position relative to anchor (removes translation)
|
|
64
|
-
const relativeX = measured.pageX - anchor.pageX;
|
|
65
|
-
const relativeY = measured.pageY - anchor.pageY;
|
|
66
|
-
|
|
67
|
-
// Reverse scale: divide relative position and dimensions by scale factor
|
|
68
|
-
return {
|
|
69
|
-
x: measured.x,
|
|
70
|
-
y: measured.y,
|
|
71
|
-
width: scaleX !== 1 ? measured.width / scaleX : measured.width,
|
|
72
|
-
height: scaleY !== 1 ? measured.height / scaleY : measured.height,
|
|
73
|
-
pageX: scaleX !== 1 ? relativeX / scaleX : relativeX,
|
|
74
|
-
pageY: scaleY !== 1 ? relativeY / scaleY : relativeY,
|
|
75
|
-
};
|
|
76
|
-
},
|
|
77
|
-
[anchorRef, screenWidth, screenHeight],
|
|
78
|
-
);
|
|
79
|
-
|
|
80
|
-
const isMeasurementInViewport = useCallback(
|
|
81
|
-
(measured: MeasuredDimensions): boolean => {
|
|
82
|
-
"worklet";
|
|
83
|
-
if (measured.width <= 0 || measured.height <= 0) return false;
|
|
84
|
-
|
|
85
|
-
const toleranceX = screenWidth * 0.15;
|
|
86
|
-
const toleranceY = screenHeight * 0.15;
|
|
87
|
-
const centerX = measured.pageX + measured.width / 2;
|
|
88
|
-
const centerY = measured.pageY + measured.height / 2;
|
|
89
|
-
|
|
90
|
-
return (
|
|
91
|
-
centerX >= -toleranceX &&
|
|
92
|
-
centerX <= screenWidth + toleranceX &&
|
|
93
|
-
centerY >= -toleranceY &&
|
|
94
|
-
centerY <= screenHeight + toleranceY
|
|
95
|
-
);
|
|
96
|
-
},
|
|
97
|
-
[screenWidth, screenHeight],
|
|
98
|
-
);
|
|
99
|
-
|
|
100
|
-
const value = useMemo(
|
|
101
|
-
() => ({ correctMeasurement, isMeasurementInViewport }),
|
|
102
|
-
[correctMeasurement, isMeasurementInViewport],
|
|
103
|
-
);
|
|
104
|
-
|
|
105
|
-
return {
|
|
106
|
-
value,
|
|
107
|
-
children,
|
|
108
|
-
};
|
|
109
|
-
},
|
|
110
|
-
);
|
|
111
|
-
|
|
112
|
-
export { LayoutAnchorProvider, useLayoutAnchorContext };
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import type { EntryPatch, ScreenEntry, ScreenKey, TagState } from "../types";
|
|
2
|
-
|
|
3
|
-
type EntryPatchOptionalField = "boundaryConfig";
|
|
4
|
-
|
|
5
|
-
const ENTRY_PATCH_OPTIONAL_FIELDS = [
|
|
6
|
-
"boundaryConfig",
|
|
7
|
-
] as const satisfies readonly EntryPatchOptionalField[];
|
|
8
|
-
|
|
9
|
-
export const ensureScreenEntry = (
|
|
10
|
-
tagState: TagState,
|
|
11
|
-
screenKey: ScreenKey,
|
|
12
|
-
): ScreenEntry => {
|
|
13
|
-
"worklet";
|
|
14
|
-
if (!tagState.screens[screenKey]) {
|
|
15
|
-
tagState.screens[screenKey] = {
|
|
16
|
-
bounds: null,
|
|
17
|
-
styles: {},
|
|
18
|
-
};
|
|
19
|
-
}
|
|
20
|
-
return tagState.screens[screenKey];
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
export const applyEntryPatch = (entry: ScreenEntry, patch: EntryPatch) => {
|
|
24
|
-
"worklet";
|
|
25
|
-
if (patch.bounds !== undefined) {
|
|
26
|
-
entry.bounds = patch.bounds;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
if (patch.styles !== undefined) {
|
|
30
|
-
entry.styles = patch.styles ?? {};
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
const target = entry as Record<EntryPatchOptionalField, unknown>;
|
|
34
|
-
for (let i = 0; i < ENTRY_PATCH_OPTIONAL_FIELDS.length; i++) {
|
|
35
|
-
const field = ENTRY_PATCH_OPTIONAL_FIELDS[i];
|
|
36
|
-
const value = patch[field];
|
|
37
|
-
if (value === undefined) continue;
|
|
38
|
-
|
|
39
|
-
if (value === null) {
|
|
40
|
-
delete target[field];
|
|
41
|
-
} else {
|
|
42
|
-
target[field] = value;
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
};
|
|
46
|
-
|
|
47
|
-
export const findMatchingScreenEntry = (
|
|
48
|
-
tagState: TagState | undefined,
|
|
49
|
-
screenKey: ScreenKey,
|
|
50
|
-
): ScreenEntry | null => {
|
|
51
|
-
"worklet";
|
|
52
|
-
if (!tagState) return null;
|
|
53
|
-
|
|
54
|
-
return tagState.screens[screenKey] ?? null;
|
|
55
|
-
};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
export const findLatestIndex = <T>(
|
|
2
|
-
items: readonly T[],
|
|
3
|
-
matches: (item: T) => boolean,
|
|
4
|
-
): number => {
|
|
5
|
-
"worklet";
|
|
6
|
-
for (let i = items.length - 1; i >= 0; i--) {
|
|
7
|
-
if (matches(items[i])) {
|
|
8
|
-
return i;
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
return -1;
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
export const findLatest = <T>(
|
|
16
|
-
items: readonly T[],
|
|
17
|
-
matches: (item: T) => boolean,
|
|
18
|
-
): T | null => {
|
|
19
|
-
"worklet";
|
|
20
|
-
const index = findLatestIndex(items, matches);
|
|
21
|
-
return index === -1 ? null : (items[index] ?? null);
|
|
22
|
-
};
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import type { TagID } from "../types";
|
|
2
|
-
|
|
3
|
-
type GroupTag = {
|
|
4
|
-
group: string;
|
|
5
|
-
id: string;
|
|
6
|
-
};
|
|
7
|
-
|
|
8
|
-
export const parseGroupTag = (tag: string): GroupTag | null => {
|
|
9
|
-
"worklet";
|
|
10
|
-
const separatorIndex = tag.indexOf(":");
|
|
11
|
-
if (separatorIndex === -1) return null;
|
|
12
|
-
|
|
13
|
-
return {
|
|
14
|
-
group: tag.slice(0, separatorIndex),
|
|
15
|
-
id: tag.slice(separatorIndex + 1),
|
|
16
|
-
};
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
export const createGroupTag = (group: string, id: string): TagID => {
|
|
20
|
-
"worklet";
|
|
21
|
-
return `${group}:${id}`;
|
|
22
|
-
};
|
|
23
|
-
|
|
24
|
-
export const getGroupName = (tagOrGroup: string): string => {
|
|
25
|
-
"worklet";
|
|
26
|
-
return parseGroupTag(tagOrGroup)?.group ?? tagOrGroup;
|
|
27
|
-
};
|