react-native-screen-transitions 3.9.0-alpha.2 → 3.9.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/shared/components/boundary/components/boundary-target.js +14 -9
- package/lib/commonjs/shared/components/boundary/components/boundary-target.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/create-boundary-component.js +66 -28
- package/lib/commonjs/shared/components/boundary/create-boundary-component.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/hooks/{use-boundary-presence.js → lifecycles/use-boundary-presence.js} +8 -4
- package/lib/commonjs/shared/components/boundary/hooks/lifecycles/use-boundary-presence.js.map +1 -0
- package/lib/commonjs/shared/components/boundary/hooks/{use-initial-destination-measurement.js → lifecycles/use-initial-destination-measurement.js} +27 -10
- package/lib/commonjs/shared/components/boundary/hooks/lifecycles/use-initial-destination-measurement.js.map +1 -0
- package/lib/commonjs/shared/components/boundary/hooks/{use-initial-source-measurement.js → lifecycles/use-initial-source-measurement.js} +5 -7
- package/lib/commonjs/shared/components/boundary/hooks/lifecycles/use-initial-source-measurement.js.map +1 -0
- package/lib/commonjs/shared/components/boundary/hooks/{use-refresh-boundary.js → lifecycles/use-refresh-boundary.js} +4 -4
- package/lib/commonjs/shared/components/boundary/hooks/lifecycles/use-refresh-boundary.js.map +1 -0
- package/lib/commonjs/shared/components/boundary/hooks/use-boundary-measurement.js +14 -35
- package/lib/commonjs/shared/components/boundary/hooks/use-boundary-measurement.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/hooks/use-measurer.js +5 -6
- package/lib/commonjs/shared/components/boundary/hooks/use-measurer.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/index.js +26 -29
- package/lib/commonjs/shared/components/boundary/index.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-local-portal-host.js +58 -0
- package/lib/commonjs/shared/components/boundary/portal/components/boundary-local-portal-host.js.map +1 -0
- package/lib/commonjs/shared/components/boundary/portal/components/host.js +20 -4
- package/lib/commonjs/shared/components/boundary/portal/components/host.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/portal/components/portal-boundary-host.js +78 -27
- package/lib/commonjs/shared/components/boundary/portal/components/portal-boundary-host.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/portal/components/portal.js +195 -121
- package/lib/commonjs/shared/components/boundary/portal/components/portal.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/portal/hooks/use-host-measurement.js +14 -2
- package/lib/commonjs/shared/components/boundary/portal/hooks/use-host-measurement.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/portal/hooks/use-placeholder-styles.js +57 -0
- package/lib/commonjs/shared/components/boundary/portal/hooks/use-placeholder-styles.js.map +1 -0
- package/lib/commonjs/shared/components/boundary/portal/stores/host-registry.store.js +5 -44
- package/lib/commonjs/shared/components/boundary/portal/stores/host-registry.store.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/portal/stores/portal-boundary-host.store.js +37 -5
- package/lib/commonjs/shared/components/boundary/portal/stores/portal-boundary-host.store.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/portal/teleport.js +15 -2
- package/lib/commonjs/shared/components/boundary/portal/teleport.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/portal/utils/has-local-slot.js +18 -0
- package/lib/commonjs/shared/components/boundary/portal/utils/has-local-slot.js.map +1 -0
- package/lib/commonjs/shared/components/boundary/portal/utils/naming.js +10 -3
- package/lib/commonjs/shared/components/boundary/portal/utils/naming.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/portal/utils/offset-style.js +28 -48
- package/lib/commonjs/shared/components/boundary/portal/utils/offset-style.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/portal/utils/ownership.js +254 -0
- package/lib/commonjs/shared/components/boundary/portal/utils/ownership.js.map +1 -0
- package/lib/commonjs/shared/components/boundary/portal/utils/resolve-portal.js +38 -0
- package/lib/commonjs/shared/components/boundary/portal/utils/resolve-portal.js.map +1 -0
- package/lib/commonjs/shared/components/boundary/portal/utils/shallow-equal.js +29 -0
- package/lib/commonjs/shared/components/boundary/portal/utils/shallow-equal.js.map +1 -0
- package/lib/commonjs/shared/components/boundary/portal/utils/teleport-control.js +10 -1
- package/lib/commonjs/shared/components/boundary/portal/utils/teleport-control.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/portal/utils/visible-host.js +25 -0
- package/lib/commonjs/shared/components/boundary/portal/utils/visible-host.js.map +1 -0
- package/lib/commonjs/shared/components/boundary/providers/boundary-root.provider.js +6 -7
- package/lib/commonjs/shared/components/boundary/providers/boundary-root.provider.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/utils/destination-signals.js +1 -22
- package/lib/commonjs/shared/components/boundary/utils/destination-signals.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/utils/refresh-signals.js +0 -21
- package/lib/commonjs/shared/components/boundary/utils/refresh-signals.js.map +1 -1
- package/lib/commonjs/shared/components/boundary/utils/source-signals.js +4 -9
- package/lib/commonjs/shared/components/boundary/utils/source-signals.js.map +1 -1
- package/lib/commonjs/shared/components/masked-view.js +5 -0
- package/lib/commonjs/shared/components/masked-view.js.map +1 -1
- package/lib/commonjs/shared/components/screen-container/layers/backdrop.js +18 -8
- package/lib/commonjs/shared/components/screen-container/layers/backdrop.js.map +1 -1
- package/lib/commonjs/shared/components/screen-container/layers/content.js +34 -16
- package/lib/commonjs/shared/components/screen-container/layers/content.js.map +1 -1
- package/lib/commonjs/shared/components/screen-container/layers/render-component.js +10 -0
- package/lib/commonjs/shared/components/screen-container/layers/render-component.js.map +1 -0
- package/lib/commonjs/shared/components/screen-container/layers/surface-container.js +5 -3
- package/lib/commonjs/shared/components/screen-container/layers/surface-container.js.map +1 -1
- package/lib/commonjs/shared/index.js +4 -0
- package/lib/commonjs/shared/index.js.map +1 -1
- package/lib/commonjs/shared/providers/helpers/measured-bounds-writes.js +6 -3
- package/lib/commonjs/shared/providers/helpers/measured-bounds-writes.js.map +1 -1
- package/lib/commonjs/shared/providers/register-bounds.provider.js +6 -0
- package/lib/commonjs/shared/providers/register-bounds.provider.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/animation/helpers/derivations.js +1 -0
- package/lib/commonjs/shared/providers/screen/animation/helpers/derivations.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/animation/helpers/pipeline.js +1 -0
- package/lib/commonjs/shared/providers/screen/animation/helpers/pipeline.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/styles/helpers/compose-slot-style.js +95 -0
- package/lib/commonjs/shared/providers/screen/styles/helpers/compose-slot-style.js.map +1 -0
- package/lib/commonjs/shared/providers/screen/styles/helpers/normalize-slots.js +30 -9
- package/lib/commonjs/shared/providers/screen/styles/helpers/normalize-slots.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/styles/helpers/resolve-slot-styles/index.js +9 -3
- package/lib/commonjs/shared/providers/screen/styles/helpers/resolve-slot-styles/index.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/styles/helpers/resolve-slot-styles/materialize-slot.js +2 -0
- package/lib/commonjs/shared/providers/screen/styles/helpers/resolve-slot-styles/materialize-slot.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/styles/hooks/slot-resolvers.js +96 -0
- package/lib/commonjs/shared/providers/screen/styles/hooks/slot-resolvers.js.map +1 -0
- package/lib/commonjs/shared/providers/screen/styles/hooks/use-interpolated-style-maps.js +16 -3
- package/lib/commonjs/shared/providers/screen/styles/hooks/use-interpolated-style-maps.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/styles/index.js +16 -3
- package/lib/commonjs/shared/providers/screen/styles/index.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/styles/slot.provider.js +22 -51
- package/lib/commonjs/shared/providers/screen/styles/slot.provider.js.map +1 -1
- package/lib/commonjs/shared/providers/screen/styles/stores/slot-references.store.js +53 -0
- package/lib/commonjs/shared/providers/screen/styles/stores/slot-references.store.js.map +1 -0
- package/lib/commonjs/shared/stores/bounds/helpers/link-pairs.helpers.js +22 -2
- package/lib/commonjs/shared/stores/bounds/helpers/link-pairs.helpers.js.map +1 -1
- package/lib/commonjs/shared/stores/bounds/internals/entries.js +11 -4
- package/lib/commonjs/shared/stores/bounds/internals/entries.js.map +1 -1
- package/lib/commonjs/shared/stores/bounds/internals/links.js +134 -51
- package/lib/commonjs/shared/stores/bounds/internals/links.js.map +1 -1
- package/lib/commonjs/shared/stores/bounds/internals/resolver.js +1 -3
- package/lib/commonjs/shared/stores/bounds/internals/resolver.js.map +1 -1
- package/lib/commonjs/shared/stores/system.store.js +5 -0
- package/lib/commonjs/shared/stores/system.store.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/helpers/styles/compute.js +10 -69
- package/lib/commonjs/shared/utils/bounds/helpers/styles/compute.js.map +1 -1
- package/lib/commonjs/shared/utils/bounds/helpers/styles/local-transform.js +59 -0
- package/lib/commonjs/shared/utils/bounds/helpers/styles/local-transform.js.map +1 -0
- package/lib/module/shared/components/boundary/components/boundary-target.js +12 -7
- package/lib/module/shared/components/boundary/components/boundary-target.js.map +1 -1
- package/lib/module/shared/components/boundary/create-boundary-component.js +67 -29
- package/lib/module/shared/components/boundary/create-boundary-component.js.map +1 -1
- package/lib/module/shared/components/boundary/hooks/{use-boundary-presence.js → lifecycles/use-boundary-presence.js} +8 -4
- package/lib/module/shared/components/boundary/hooks/lifecycles/use-boundary-presence.js.map +1 -0
- package/lib/module/shared/components/boundary/hooks/{use-initial-destination-measurement.js → lifecycles/use-initial-destination-measurement.js} +27 -10
- package/lib/module/shared/components/boundary/hooks/lifecycles/use-initial-destination-measurement.js.map +1 -0
- package/lib/module/shared/components/boundary/hooks/{use-initial-source-measurement.js → lifecycles/use-initial-source-measurement.js} +5 -7
- package/lib/module/shared/components/boundary/hooks/lifecycles/use-initial-source-measurement.js.map +1 -0
- package/lib/module/shared/components/boundary/hooks/{use-refresh-boundary.js → lifecycles/use-refresh-boundary.js} +4 -4
- package/lib/module/shared/components/boundary/hooks/lifecycles/use-refresh-boundary.js.map +1 -0
- package/lib/module/shared/components/boundary/hooks/use-boundary-measurement.js +15 -36
- package/lib/module/shared/components/boundary/hooks/use-boundary-measurement.js.map +1 -1
- package/lib/module/shared/components/boundary/hooks/use-measurer.js +5 -6
- package/lib/module/shared/components/boundary/hooks/use-measurer.js.map +1 -1
- package/lib/module/shared/components/boundary/index.js +26 -29
- package/lib/module/shared/components/boundary/index.js.map +1 -1
- package/lib/module/shared/components/boundary/portal/components/boundary-local-portal-host.js +53 -0
- package/lib/module/shared/components/boundary/portal/components/boundary-local-portal-host.js.map +1 -0
- package/lib/module/shared/components/boundary/portal/components/host.js +21 -5
- package/lib/module/shared/components/boundary/portal/components/host.js.map +1 -1
- package/lib/module/shared/components/boundary/portal/components/portal-boundary-host.js +79 -28
- package/lib/module/shared/components/boundary/portal/components/portal-boundary-host.js.map +1 -1
- package/lib/module/shared/components/boundary/portal/components/portal.js +201 -127
- package/lib/module/shared/components/boundary/portal/components/portal.js.map +1 -1
- package/lib/module/shared/components/boundary/portal/hooks/use-host-measurement.js +15 -3
- package/lib/module/shared/components/boundary/portal/hooks/use-host-measurement.js.map +1 -1
- package/lib/module/shared/components/boundary/portal/hooks/use-placeholder-styles.js +52 -0
- package/lib/module/shared/components/boundary/portal/hooks/use-placeholder-styles.js.map +1 -0
- package/lib/module/shared/components/boundary/portal/stores/host-registry.store.js +4 -41
- package/lib/module/shared/components/boundary/portal/stores/host-registry.store.js.map +1 -1
- package/lib/module/shared/components/boundary/portal/stores/portal-boundary-host.store.js +35 -4
- package/lib/module/shared/components/boundary/portal/stores/portal-boundary-host.store.js.map +1 -1
- package/lib/module/shared/components/boundary/portal/teleport.js +16 -2
- package/lib/module/shared/components/boundary/portal/teleport.js.map +1 -1
- package/lib/module/shared/components/boundary/portal/utils/has-local-slot.js +13 -0
- package/lib/module/shared/components/boundary/portal/utils/has-local-slot.js.map +1 -0
- package/lib/module/shared/components/boundary/portal/utils/naming.js +8 -2
- package/lib/module/shared/components/boundary/portal/utils/naming.js.map +1 -1
- package/lib/module/shared/components/boundary/portal/utils/offset-style.js +29 -48
- package/lib/module/shared/components/boundary/portal/utils/offset-style.js.map +1 -1
- package/lib/module/shared/components/boundary/portal/utils/ownership.js +246 -0
- package/lib/module/shared/components/boundary/portal/utils/ownership.js.map +1 -0
- package/lib/module/shared/components/boundary/portal/utils/resolve-portal.js +33 -0
- package/lib/module/shared/components/boundary/portal/utils/resolve-portal.js.map +1 -0
- package/lib/module/shared/components/boundary/portal/utils/shallow-equal.js +24 -0
- package/lib/module/shared/components/boundary/portal/utils/shallow-equal.js.map +1 -0
- package/lib/module/shared/components/boundary/portal/utils/teleport-control.js +8 -0
- package/lib/module/shared/components/boundary/portal/utils/teleport-control.js.map +1 -1
- package/lib/module/shared/components/boundary/portal/utils/visible-host.js +20 -0
- package/lib/module/shared/components/boundary/portal/utils/visible-host.js.map +1 -0
- package/lib/module/shared/components/boundary/providers/boundary-root.provider.js +6 -7
- package/lib/module/shared/components/boundary/providers/boundary-root.provider.js.map +1 -1
- package/lib/module/shared/components/boundary/utils/destination-signals.js +2 -23
- package/lib/module/shared/components/boundary/utils/destination-signals.js.map +1 -1
- package/lib/module/shared/components/boundary/utils/refresh-signals.js +0 -21
- package/lib/module/shared/components/boundary/utils/refresh-signals.js.map +1 -1
- package/lib/module/shared/components/boundary/utils/source-signals.js +4 -9
- package/lib/module/shared/components/boundary/utils/source-signals.js.map +1 -1
- package/lib/module/shared/components/masked-view.js +5 -0
- package/lib/module/shared/components/masked-view.js.map +1 -1
- package/lib/module/shared/components/screen-container/layers/backdrop.js +19 -9
- package/lib/module/shared/components/screen-container/layers/backdrop.js.map +1 -1
- package/lib/module/shared/components/screen-container/layers/content.js +35 -17
- package/lib/module/shared/components/screen-container/layers/content.js.map +1 -1
- package/lib/module/shared/components/screen-container/layers/render-component.js +6 -0
- package/lib/module/shared/components/screen-container/layers/render-component.js.map +1 -0
- package/lib/module/shared/components/screen-container/layers/surface-container.js +5 -3
- package/lib/module/shared/components/screen-container/layers/surface-container.js.map +1 -1
- package/lib/module/shared/index.js +4 -0
- package/lib/module/shared/index.js.map +1 -1
- package/lib/module/shared/providers/helpers/measured-bounds-writes.js +6 -3
- package/lib/module/shared/providers/helpers/measured-bounds-writes.js.map +1 -1
- package/lib/module/shared/providers/register-bounds.provider.js +6 -0
- package/lib/module/shared/providers/register-bounds.provider.js.map +1 -1
- package/lib/module/shared/providers/screen/animation/helpers/derivations.js +1 -0
- package/lib/module/shared/providers/screen/animation/helpers/derivations.js.map +1 -1
- package/lib/module/shared/providers/screen/animation/helpers/pipeline.js +1 -0
- package/lib/module/shared/providers/screen/animation/helpers/pipeline.js.map +1 -1
- package/lib/module/shared/providers/screen/styles/helpers/compose-slot-style.js +89 -0
- package/lib/module/shared/providers/screen/styles/helpers/compose-slot-style.js.map +1 -0
- package/lib/module/shared/providers/screen/styles/helpers/normalize-slots.js +30 -9
- package/lib/module/shared/providers/screen/styles/helpers/normalize-slots.js.map +1 -1
- package/lib/module/shared/providers/screen/styles/helpers/resolve-slot-styles/index.js +9 -3
- package/lib/module/shared/providers/screen/styles/helpers/resolve-slot-styles/index.js.map +1 -1
- package/lib/module/shared/providers/screen/styles/helpers/resolve-slot-styles/materialize-slot.js +2 -0
- package/lib/module/shared/providers/screen/styles/helpers/resolve-slot-styles/materialize-slot.js.map +1 -1
- package/lib/module/shared/providers/screen/styles/hooks/slot-resolvers.js +87 -0
- package/lib/module/shared/providers/screen/styles/hooks/slot-resolvers.js.map +1 -0
- package/lib/module/shared/providers/screen/styles/hooks/use-interpolated-style-maps.js +16 -3
- package/lib/module/shared/providers/screen/styles/hooks/use-interpolated-style-maps.js.map +1 -1
- package/lib/module/shared/providers/screen/styles/index.js +2 -1
- package/lib/module/shared/providers/screen/styles/index.js.map +1 -1
- package/lib/module/shared/providers/screen/styles/slot.provider.js +22 -47
- package/lib/module/shared/providers/screen/styles/slot.provider.js.map +1 -1
- package/lib/module/shared/providers/screen/styles/stores/slot-references.store.js +47 -0
- package/lib/module/shared/providers/screen/styles/stores/slot-references.store.js.map +1 -0
- package/lib/module/shared/stores/bounds/helpers/link-pairs.helpers.js +19 -1
- package/lib/module/shared/stores/bounds/helpers/link-pairs.helpers.js.map +1 -1
- package/lib/module/shared/stores/bounds/internals/entries.js +11 -4
- package/lib/module/shared/stores/bounds/internals/entries.js.map +1 -1
- package/lib/module/shared/stores/bounds/internals/links.js +135 -53
- package/lib/module/shared/stores/bounds/internals/links.js.map +1 -1
- package/lib/module/shared/stores/bounds/internals/resolver.js +1 -3
- package/lib/module/shared/stores/bounds/internals/resolver.js.map +1 -1
- package/lib/module/shared/stores/system.store.js +5 -0
- package/lib/module/shared/stores/system.store.js.map +1 -1
- package/lib/module/shared/types/animation.types.js.map +1 -1
- package/lib/module/shared/utils/bounds/helpers/styles/compute.js +10 -69
- package/lib/module/shared/utils/bounds/helpers/styles/compute.js.map +1 -1
- package/lib/module/shared/utils/bounds/helpers/styles/local-transform.js +52 -0
- package/lib/module/shared/utils/bounds/helpers/styles/local-transform.js.map +1 -0
- package/lib/typescript/blank-stack/navigators/create-blank-stack-navigator.d.ts +1 -2
- package/lib/typescript/blank-stack/navigators/create-blank-stack-navigator.d.ts.map +1 -1
- package/lib/typescript/component-stack/components/component-screen.d.ts +1 -1
- package/lib/typescript/component-stack/components/component-screen.d.ts.map +1 -1
- package/lib/typescript/component-stack/navigators/create-component-stack-navigator.d.ts +1 -2
- package/lib/typescript/component-stack/navigators/create-component-stack-navigator.d.ts.map +1 -1
- package/lib/typescript/component-stack/types.d.ts +26 -0
- package/lib/typescript/component-stack/types.d.ts.map +1 -1
- package/lib/typescript/native-stack/navigators/createNativeStackNavigator.d.ts +1 -1
- package/lib/typescript/native-stack/navigators/createNativeStackNavigator.d.ts.map +1 -1
- package/lib/typescript/native-stack/views/NativeStackView.d.ts +1 -2
- package/lib/typescript/native-stack/views/NativeStackView.d.ts.map +1 -1
- package/lib/typescript/native-stack/views/useHeaderConfigProps.d.ts +2 -2
- package/lib/typescript/shared/adapters/with-screen-transitions/context.d.ts +1 -1
- package/lib/typescript/shared/adapters/with-screen-transitions/context.d.ts.map +1 -1
- package/lib/typescript/shared/adapters/with-screen-transitions/stack-layout.d.ts +1 -1
- package/lib/typescript/shared/adapters/with-screen-transitions/stack-layout.d.ts.map +1 -1
- package/lib/typescript/shared/components/activity/variants/activity-container.d.ts +1 -1
- package/lib/typescript/shared/components/activity/variants/activity-container.d.ts.map +1 -1
- package/lib/typescript/shared/components/activity/variants/activity-screen.d.ts +1 -1
- package/lib/typescript/shared/components/activity/variants/activity-screen.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/components/boundary-target.d.ts +1 -1
- package/lib/typescript/shared/components/boundary/components/boundary-target.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/create-boundary-component.d.ts +0 -1
- package/lib/typescript/shared/components/boundary/create-boundary-component.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/hooks/lifecycles/use-boundary-presence.d.ts +11 -0
- package/lib/typescript/shared/components/boundary/hooks/lifecycles/use-boundary-presence.d.ts.map +1 -0
- package/lib/typescript/shared/components/boundary/hooks/{use-initial-destination-measurement.d.ts → lifecycles/use-initial-destination-measurement.d.ts} +2 -2
- package/lib/typescript/shared/components/boundary/hooks/lifecycles/use-initial-destination-measurement.d.ts.map +1 -0
- package/lib/typescript/shared/components/boundary/hooks/lifecycles/use-initial-source-measurement.d.ts +8 -0
- package/lib/typescript/shared/components/boundary/hooks/lifecycles/use-initial-source-measurement.d.ts.map +1 -0
- package/lib/typescript/shared/components/boundary/hooks/{use-refresh-boundary.d.ts → lifecycles/use-refresh-boundary.d.ts} +2 -2
- package/lib/typescript/shared/components/boundary/hooks/lifecycles/use-refresh-boundary.d.ts.map +1 -0
- package/lib/typescript/shared/components/boundary/hooks/use-boundary-measurement.d.ts +5 -9
- package/lib/typescript/shared/components/boundary/hooks/use-boundary-measurement.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/hooks/use-measurer.d.ts +4 -3
- package/lib/typescript/shared/components/boundary/hooks/use-measurer.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/index.d.ts +35 -24
- package/lib/typescript/shared/components/boundary/index.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/portal/components/boundary-local-portal-host.d.ts +8 -0
- package/lib/typescript/shared/components/boundary/portal/components/boundary-local-portal-host.d.ts.map +1 -0
- package/lib/typescript/shared/components/boundary/portal/components/host.d.ts +2 -2
- package/lib/typescript/shared/components/boundary/portal/components/host.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/portal/components/portal-boundary-host.d.ts +2 -2
- package/lib/typescript/shared/components/boundary/portal/components/portal-boundary-host.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/portal/components/portal-provider.d.ts +1 -1
- package/lib/typescript/shared/components/boundary/portal/components/portal-provider.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/portal/components/portal.d.ts +4 -3
- package/lib/typescript/shared/components/boundary/portal/components/portal.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/portal/hooks/use-host-measurement.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/portal/hooks/use-placeholder-styles.d.ts +17 -0
- package/lib/typescript/shared/components/boundary/portal/hooks/use-placeholder-styles.d.ts.map +1 -0
- package/lib/typescript/shared/components/boundary/portal/stores/host-registry.store.d.ts +0 -7
- package/lib/typescript/shared/components/boundary/portal/stores/host-registry.store.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/portal/stores/portal-boundary-host.store.d.ts +16 -1
- package/lib/typescript/shared/components/boundary/portal/stores/portal-boundary-host.store.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/portal/teleport.d.ts +1 -1
- package/lib/typescript/shared/components/boundary/portal/teleport.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/portal/utils/has-local-slot.d.ts +3 -0
- package/lib/typescript/shared/components/boundary/portal/utils/has-local-slot.d.ts.map +1 -0
- package/lib/typescript/shared/components/boundary/portal/utils/naming.d.ts +2 -1
- package/lib/typescript/shared/components/boundary/portal/utils/naming.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/portal/utils/offset-style.d.ts +23 -30
- package/lib/typescript/shared/components/boundary/portal/utils/offset-style.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/portal/utils/ownership.d.ts +35 -0
- package/lib/typescript/shared/components/boundary/portal/utils/ownership.d.ts.map +1 -0
- package/lib/typescript/shared/components/boundary/portal/utils/resolve-portal.d.ts +12 -0
- package/lib/typescript/shared/components/boundary/portal/utils/resolve-portal.d.ts.map +1 -0
- package/lib/typescript/shared/components/boundary/portal/utils/shallow-equal.d.ts +8 -0
- package/lib/typescript/shared/components/boundary/portal/utils/shallow-equal.d.ts.map +1 -0
- package/lib/typescript/shared/components/boundary/portal/utils/teleport-control.d.ts +4 -0
- package/lib/typescript/shared/components/boundary/portal/utils/teleport-control.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/portal/utils/visible-host.d.ts +8 -0
- package/lib/typescript/shared/components/boundary/portal/utils/visible-host.d.ts.map +1 -0
- package/lib/typescript/shared/components/boundary/providers/boundary-root.provider.d.ts +7 -12
- package/lib/typescript/shared/components/boundary/providers/boundary-root.provider.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/types.d.ts +9 -36
- package/lib/typescript/shared/components/boundary/types.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/utils/destination-signals.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/utils/refresh-signals.d.ts.map +1 -1
- package/lib/typescript/shared/components/boundary/utils/source-signals.d.ts +0 -1
- package/lib/typescript/shared/components/boundary/utils/source-signals.d.ts.map +1 -1
- package/lib/typescript/shared/components/create-transition-aware-component.d.ts +6 -5
- package/lib/typescript/shared/components/create-transition-aware-component.d.ts.map +1 -1
- package/lib/typescript/shared/components/masked-view.d.ts +5 -1
- package/lib/typescript/shared/components/masked-view.d.ts.map +1 -1
- package/lib/typescript/shared/components/overlay/variations/float-overlay.d.ts +1 -1
- package/lib/typescript/shared/components/overlay/variations/float-overlay.d.ts.map +1 -1
- package/lib/typescript/shared/components/overlay/variations/overlay-host.d.ts +1 -1
- package/lib/typescript/shared/components/overlay/variations/overlay-host.d.ts.map +1 -1
- package/lib/typescript/shared/components/scene-view.d.ts +1 -1
- package/lib/typescript/shared/components/scene-view.d.ts.map +1 -1
- package/lib/typescript/shared/components/screen-container/index.d.ts +1 -1
- package/lib/typescript/shared/components/screen-container/index.d.ts.map +1 -1
- package/lib/typescript/shared/components/screen-container/layers/backdrop.d.ts +1 -1
- package/lib/typescript/shared/components/screen-container/layers/backdrop.d.ts.map +1 -1
- package/lib/typescript/shared/components/screen-container/layers/content.d.ts +1 -1
- package/lib/typescript/shared/components/screen-container/layers/content.d.ts.map +1 -1
- package/lib/typescript/shared/components/screen-container/layers/maybe-masked-navigation-container.d.ts +1 -1
- package/lib/typescript/shared/components/screen-container/layers/maybe-masked-navigation-container.d.ts.map +1 -1
- package/lib/typescript/shared/components/screen-container/layers/render-component.d.ts +3 -0
- package/lib/typescript/shared/components/screen-container/layers/render-component.d.ts.map +1 -0
- package/lib/typescript/shared/components/screen-container/layers/surface-container.d.ts +1 -1
- package/lib/typescript/shared/components/screen-container/layers/surface-container.d.ts.map +1 -1
- package/lib/typescript/shared/hooks/navigation/use-stack.d.ts +1 -1
- package/lib/typescript/shared/hooks/navigation/use-stack.d.ts.map +1 -1
- package/lib/typescript/shared/index.d.ts +731 -683
- package/lib/typescript/shared/index.d.ts.map +1 -1
- package/lib/typescript/shared/providers/helpers/measured-bounds-writes.d.ts +3 -3
- package/lib/typescript/shared/providers/helpers/measured-bounds-writes.d.ts.map +1 -1
- package/lib/typescript/shared/providers/register-bounds.provider.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/animation/helpers/derivations.d.ts +1 -0
- package/lib/typescript/shared/providers/screen/animation/helpers/derivations.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/animation/helpers/pipeline.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/descriptors/descriptors.provider.d.ts +1 -1
- package/lib/typescript/shared/providers/screen/descriptors/descriptors.provider.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/screen-composer.d.ts +1 -1
- package/lib/typescript/shared/providers/screen/screen-composer.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/styles/components/floating-overlay-layer.d.ts +1 -1
- package/lib/typescript/shared/providers/screen/styles/components/floating-overlay-layer.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/styles/helpers/compose-slot-style.d.ts +4 -0
- package/lib/typescript/shared/providers/screen/styles/helpers/compose-slot-style.d.ts.map +1 -0
- package/lib/typescript/shared/providers/screen/styles/helpers/normalize-slots.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/styles/helpers/resolve-slot-styles/index.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/styles/helpers/resolve-slot-styles/materialize-slot.d.ts +2 -1
- package/lib/typescript/shared/providers/screen/styles/helpers/resolve-slot-styles/materialize-slot.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/styles/hooks/slot-resolvers.d.ts +11 -0
- package/lib/typescript/shared/providers/screen/styles/hooks/slot-resolvers.d.ts.map +1 -0
- package/lib/typescript/shared/providers/screen/styles/hooks/use-interpolated-style-maps.d.ts +4 -1
- package/lib/typescript/shared/providers/screen/styles/hooks/use-interpolated-style-maps.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/styles/hooks/use-maybe-block-visibility.d.ts +3 -3
- package/lib/typescript/shared/providers/screen/styles/index.d.ts +2 -1
- package/lib/typescript/shared/providers/screen/styles/index.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/styles/slot.provider.d.ts +5 -10
- package/lib/typescript/shared/providers/screen/styles/slot.provider.d.ts.map +1 -1
- package/lib/typescript/shared/providers/screen/styles/stores/slot-references.store.d.ts +6 -0
- package/lib/typescript/shared/providers/screen/styles/stores/slot-references.store.d.ts.map +1 -0
- package/lib/typescript/shared/stores/bounds/helpers/link-pairs.helpers.d.ts +2 -0
- package/lib/typescript/shared/stores/bounds/helpers/link-pairs.helpers.d.ts.map +1 -1
- package/lib/typescript/shared/stores/bounds/internals/entries.d.ts.map +1 -1
- package/lib/typescript/shared/stores/bounds/internals/links.d.ts +4 -3
- package/lib/typescript/shared/stores/bounds/internals/links.d.ts.map +1 -1
- package/lib/typescript/shared/stores/bounds/internals/resolver.d.ts.map +1 -1
- package/lib/typescript/shared/stores/bounds/types.d.ts +9 -20
- package/lib/typescript/shared/stores/bounds/types.d.ts.map +1 -1
- package/lib/typescript/shared/stores/system.store.d.ts +1 -0
- package/lib/typescript/shared/stores/system.store.d.ts.map +1 -1
- package/lib/typescript/shared/types/animation.types.d.ts +7 -1
- package/lib/typescript/shared/types/animation.types.d.ts.map +1 -1
- package/lib/typescript/shared/types/index.d.ts +1 -1
- package/lib/typescript/shared/types/index.d.ts.map +1 -1
- package/lib/typescript/shared/types/screen.types.d.ts +99 -4
- package/lib/typescript/shared/types/screen.types.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/helpers/styles/compute.d.ts.map +1 -1
- package/lib/typescript/shared/utils/bounds/helpers/styles/local-transform.d.ts +6 -0
- package/lib/typescript/shared/utils/bounds/helpers/styles/local-transform.d.ts.map +1 -0
- package/lib/typescript/shared/utils/bounds/types/options.d.ts +2 -0
- package/lib/typescript/shared/utils/bounds/types/options.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/component-stack/types.ts +26 -0
- package/src/shared/components/boundary/components/boundary-target.tsx +21 -7
- package/src/shared/components/boundary/create-boundary-component.tsx +92 -28
- package/src/shared/components/boundary/hooks/{use-boundary-presence.ts → lifecycles/use-boundary-presence.ts} +16 -5
- package/src/shared/components/boundary/hooks/{use-initial-destination-measurement.ts → lifecycles/use-initial-destination-measurement.ts} +40 -13
- package/src/shared/components/boundary/hooks/{use-initial-source-measurement.ts → lifecycles/use-initial-source-measurement.ts} +7 -9
- package/src/shared/components/boundary/hooks/{use-refresh-boundary.ts → lifecycles/use-refresh-boundary.ts} +6 -6
- package/src/shared/components/boundary/hooks/use-boundary-measurement.ts +15 -45
- package/src/shared/components/boundary/hooks/use-measurer.ts +9 -14
- package/src/shared/components/boundary/index.tsx +55 -29
- package/src/shared/components/boundary/portal/components/boundary-local-portal-host.tsx +66 -0
- package/src/shared/components/boundary/portal/components/host.tsx +20 -5
- package/src/shared/components/boundary/portal/components/portal-boundary-host.tsx +112 -46
- package/src/shared/components/boundary/portal/components/portal.tsx +263 -134
- package/src/shared/components/boundary/portal/hooks/use-host-measurement.ts +23 -2
- package/src/shared/components/boundary/portal/hooks/use-placeholder-styles.ts +55 -0
- package/src/shared/components/boundary/portal/stores/host-registry.store.ts +4 -51
- package/src/shared/components/boundary/portal/stores/portal-boundary-host.store.ts +59 -6
- package/src/shared/components/boundary/portal/teleport.ts +28 -3
- package/src/shared/components/boundary/portal/utils/has-local-slot.ts +16 -0
- package/src/shared/components/boundary/portal/utils/naming.ts +11 -1
- package/src/shared/components/boundary/portal/utils/offset-style.ts +42 -137
- package/src/shared/components/boundary/portal/utils/ownership.ts +371 -0
- package/src/shared/components/boundary/portal/utils/resolve-portal.ts +50 -0
- package/src/shared/components/boundary/portal/utils/shallow-equal.ts +25 -0
- package/src/shared/components/boundary/portal/utils/teleport-control.ts +12 -0
- package/src/shared/components/boundary/portal/utils/visible-host.ts +24 -0
- package/src/shared/components/boundary/providers/boundary-root.provider.tsx +9 -18
- package/src/shared/components/boundary/types.ts +9 -39
- package/src/shared/components/boundary/utils/destination-signals.ts +1 -32
- package/src/shared/components/boundary/utils/refresh-signals.ts +0 -41
- package/src/shared/components/boundary/utils/source-signals.ts +5 -17
- package/src/shared/components/masked-view.tsx +4 -0
- package/src/shared/components/screen-container/layers/backdrop.tsx +31 -10
- package/src/shared/components/screen-container/layers/content.tsx +61 -22
- package/src/shared/components/screen-container/layers/render-component.ts +9 -0
- package/src/shared/components/screen-container/layers/surface-container.tsx +5 -4
- package/src/shared/index.ts +9 -5
- package/src/shared/providers/helpers/measured-bounds-writes.ts +6 -11
- package/src/shared/providers/register-bounds.provider.tsx +5 -0
- package/src/shared/providers/screen/animation/helpers/derivations.ts +3 -0
- package/src/shared/providers/screen/animation/helpers/pipeline.ts +1 -0
- package/src/shared/providers/screen/styles/helpers/compose-slot-style.ts +129 -0
- package/src/shared/providers/screen/styles/helpers/normalize-slots.ts +45 -8
- package/src/shared/providers/screen/styles/helpers/resolve-slot-styles/index.ts +14 -2
- package/src/shared/providers/screen/styles/helpers/resolve-slot-styles/materialize-slot.ts +3 -0
- package/src/shared/providers/screen/styles/hooks/slot-resolvers.tsx +111 -0
- package/src/shared/providers/screen/styles/hooks/use-interpolated-style-maps.tsx +21 -3
- package/src/shared/providers/screen/styles/index.tsx +8 -3
- package/src/shared/providers/screen/styles/slot.provider.tsx +36 -54
- package/src/shared/providers/screen/styles/stores/slot-references.store.ts +71 -0
- package/src/shared/stores/bounds/helpers/link-pairs.helpers.ts +24 -1
- package/src/shared/stores/bounds/internals/entries.ts +13 -5
- package/src/shared/stores/bounds/internals/links.ts +167 -85
- package/src/shared/stores/bounds/internals/resolver.ts +0 -2
- package/src/shared/stores/bounds/types.ts +10 -22
- package/src/shared/stores/system.store.ts +6 -0
- package/src/shared/types/animation.types.ts +8 -1
- package/src/shared/types/index.ts +5 -0
- package/src/shared/types/screen.types.ts +111 -4
- package/src/shared/utils/bounds/helpers/styles/compute.ts +22 -124
- package/src/shared/utils/bounds/helpers/styles/local-transform.ts +86 -0
- package/src/shared/utils/bounds/types/options.ts +2 -0
- package/lib/commonjs/shared/components/boundary/hooks/use-boundary-presence.js.map +0 -1
- package/lib/commonjs/shared/components/boundary/hooks/use-initial-destination-measurement.js.map +0 -1
- package/lib/commonjs/shared/components/boundary/hooks/use-initial-source-measurement.js.map +0 -1
- package/lib/commonjs/shared/components/boundary/hooks/use-refresh-boundary.js.map +0 -1
- package/lib/commonjs/shared/components/boundary/portal/resolve-portal.js +0 -36
- package/lib/commonjs/shared/components/boundary/portal/resolve-portal.js.map +0 -1
- package/lib/commonjs/shared/components/boundary/portal/utils/attachment.js +0 -40
- package/lib/commonjs/shared/components/boundary/portal/utils/attachment.js.map +0 -1
- package/lib/module/shared/components/boundary/hooks/use-boundary-presence.js.map +0 -1
- package/lib/module/shared/components/boundary/hooks/use-initial-destination-measurement.js.map +0 -1
- package/lib/module/shared/components/boundary/hooks/use-initial-source-measurement.js.map +0 -1
- package/lib/module/shared/components/boundary/hooks/use-refresh-boundary.js.map +0 -1
- package/lib/module/shared/components/boundary/portal/resolve-portal.js +0 -31
- package/lib/module/shared/components/boundary/portal/resolve-portal.js.map +0 -1
- package/lib/module/shared/components/boundary/portal/utils/attachment.js +0 -35
- package/lib/module/shared/components/boundary/portal/utils/attachment.js.map +0 -1
- package/lib/typescript/shared/components/boundary/hooks/use-boundary-presence.d.ts +0 -9
- package/lib/typescript/shared/components/boundary/hooks/use-boundary-presence.d.ts.map +0 -1
- package/lib/typescript/shared/components/boundary/hooks/use-initial-destination-measurement.d.ts.map +0 -1
- package/lib/typescript/shared/components/boundary/hooks/use-initial-source-measurement.d.ts +0 -9
- package/lib/typescript/shared/components/boundary/hooks/use-initial-source-measurement.d.ts.map +0 -1
- package/lib/typescript/shared/components/boundary/hooks/use-refresh-boundary.d.ts.map +0 -1
- package/lib/typescript/shared/components/boundary/portal/resolve-portal.d.ts +0 -14
- package/lib/typescript/shared/components/boundary/portal/resolve-portal.d.ts.map +0 -1
- package/lib/typescript/shared/components/boundary/portal/utils/attachment.d.ts +0 -21
- package/lib/typescript/shared/components/boundary/portal/utils/attachment.d.ts.map +0 -1
- package/src/shared/components/boundary/portal/resolve-portal.ts +0 -40
- package/src/shared/components/boundary/portal/utils/attachment.ts +0 -48
|
@@ -107,6 +107,7 @@ const getResolvedSlotOutput = ({
|
|
|
107
107
|
resolvedSlot: materializeResolvedSlot({
|
|
108
108
|
baseStyle: state.baseStyle,
|
|
109
109
|
baseProps: state.baseProps,
|
|
110
|
+
boundsLocalTransform: slot?.boundsLocalTransform,
|
|
110
111
|
previousState,
|
|
111
112
|
styleKeys: state.styleKeys,
|
|
112
113
|
propKeys: state.propKeys,
|
|
@@ -164,6 +165,9 @@ const getMergedLocalSlot = (
|
|
|
164
165
|
"worklet";
|
|
165
166
|
let mergedStyle: Record<string, unknown> | undefined;
|
|
166
167
|
let mergedProps: Record<string, unknown> | undefined;
|
|
168
|
+
let boundsLocalTransform:
|
|
169
|
+
| NormalizedTransitionSlotStyle["boundsLocalTransform"]
|
|
170
|
+
| undefined;
|
|
167
171
|
|
|
168
172
|
for (let index = 0; index < context.localStylesMaps.length; index++) {
|
|
169
173
|
const slot = context.localStylesMaps[index]?.[slotId];
|
|
@@ -177,15 +181,19 @@ const getMergedLocalSlot = (
|
|
|
177
181
|
slot.style as Record<string, unknown> | undefined,
|
|
178
182
|
);
|
|
179
183
|
mergedProps = mergeBucket(mergedProps, slot.props);
|
|
184
|
+
if (slot.boundsLocalTransform?.length) {
|
|
185
|
+
boundsLocalTransform = slot.boundsLocalTransform;
|
|
186
|
+
}
|
|
180
187
|
}
|
|
181
188
|
|
|
182
|
-
if (!mergedStyle && !mergedProps) {
|
|
189
|
+
if (!mergedStyle && !mergedProps && !boundsLocalTransform) {
|
|
183
190
|
return undefined;
|
|
184
191
|
}
|
|
185
192
|
|
|
186
193
|
return {
|
|
187
194
|
style: mergedStyle,
|
|
188
195
|
props: mergedProps,
|
|
196
|
+
boundsLocalTransform,
|
|
189
197
|
};
|
|
190
198
|
};
|
|
191
199
|
|
|
@@ -343,7 +351,11 @@ const areSlotsEqual = (
|
|
|
343
351
|
|
|
344
352
|
return (
|
|
345
353
|
areFlatObjectsEqual(left.style, right.style) &&
|
|
346
|
-
areFlatObjectsEqual(left.props, right.props)
|
|
354
|
+
areFlatObjectsEqual(left.props, right.props) &&
|
|
355
|
+
areTransformArraysEqual(
|
|
356
|
+
left.boundsLocalTransform,
|
|
357
|
+
right.boundsLocalTransform,
|
|
358
|
+
)
|
|
347
359
|
);
|
|
348
360
|
};
|
|
349
361
|
|
|
@@ -111,6 +111,7 @@ const materializeResolvedProps = ({
|
|
|
111
111
|
export const materializeResolvedSlot = ({
|
|
112
112
|
baseStyle,
|
|
113
113
|
baseProps,
|
|
114
|
+
boundsLocalTransform,
|
|
114
115
|
previousState,
|
|
115
116
|
styleKeys,
|
|
116
117
|
propKeys,
|
|
@@ -121,6 +122,7 @@ export const materializeResolvedSlot = ({
|
|
|
121
122
|
}: {
|
|
122
123
|
baseStyle: Record<string, unknown> | undefined;
|
|
123
124
|
baseProps: Record<string, unknown> | undefined;
|
|
125
|
+
boundsLocalTransform: NormalizedTransitionSlotStyle["boundsLocalTransform"];
|
|
124
126
|
previousState: ResettableStyleState | undefined;
|
|
125
127
|
styleKeys: Record<string, true> | undefined;
|
|
126
128
|
propKeys: Record<string, true> | undefined;
|
|
@@ -149,6 +151,7 @@ export const materializeResolvedSlot = ({
|
|
|
149
151
|
|
|
150
152
|
resolvedSlot.style = resolvedStyle;
|
|
151
153
|
resolvedSlot.props = resolvedProps;
|
|
154
|
+
resolvedSlot.boundsLocalTransform = boundsLocalTransform;
|
|
152
155
|
|
|
153
156
|
if (!resolvedSlot.style && !resolvedSlot.props) {
|
|
154
157
|
return undefined;
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { useMemo } from "react";
|
|
2
|
+
import { useAnimatedProps, useAnimatedStyle } from "react-native-reanimated";
|
|
3
|
+
import { NO_PROPS, NO_STYLES } from "../../../../constants";
|
|
4
|
+
import {
|
|
5
|
+
composeSlotStyleWithLocalTransform,
|
|
6
|
+
getLocalTransformForSlotComposition,
|
|
7
|
+
} from "../helpers/compose-slot-style";
|
|
8
|
+
import { useScreenSlots } from "../slot.provider";
|
|
9
|
+
|
|
10
|
+
export const useSlotStyles = (slotId: string | undefined) => {
|
|
11
|
+
const { slotsMap } = useScreenSlots();
|
|
12
|
+
|
|
13
|
+
return useAnimatedStyle(() => {
|
|
14
|
+
const slot = slotId ? slotsMap.get()[slotId] : undefined;
|
|
15
|
+
const slotStyle = slot?.style ?? NO_STYLES;
|
|
16
|
+
|
|
17
|
+
return composeSlotStyleWithLocalTransform(
|
|
18
|
+
slotStyle,
|
|
19
|
+
undefined,
|
|
20
|
+
slot?.boundsLocalTransform,
|
|
21
|
+
);
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export const useComposedSlotStyles = (
|
|
26
|
+
slotId: string | undefined,
|
|
27
|
+
style: unknown,
|
|
28
|
+
) => {
|
|
29
|
+
const { slotsMap } = useScreenSlots();
|
|
30
|
+
const localTransform = useMemo(
|
|
31
|
+
() => getLocalTransformForSlotComposition(style),
|
|
32
|
+
[style],
|
|
33
|
+
);
|
|
34
|
+
|
|
35
|
+
return useAnimatedStyle(() => {
|
|
36
|
+
const slot = slotId ? slotsMap.get()[slotId] : undefined;
|
|
37
|
+
const slotStyle = slot?.style ?? NO_STYLES;
|
|
38
|
+
|
|
39
|
+
return composeSlotStyleWithLocalTransform(
|
|
40
|
+
slotStyle,
|
|
41
|
+
localTransform,
|
|
42
|
+
slot?.boundsLocalTransform,
|
|
43
|
+
);
|
|
44
|
+
});
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Stacking-only slice (`zIndex`/`elevation`) of a slot's style. Returned
|
|
49
|
+
* separately so an owner can keep just its stacking context while a nested
|
|
50
|
+
* target takes the full associated style. Yields `NO_STYLES` when neither is set.
|
|
51
|
+
*/
|
|
52
|
+
export const useSlotStackingStyles = (slotId: string | undefined) => {
|
|
53
|
+
const { slotsMap } = useScreenSlots();
|
|
54
|
+
|
|
55
|
+
return useAnimatedStyle(() => {
|
|
56
|
+
const baseStyle = slotId ? slotsMap.get()[slotId]?.style : undefined;
|
|
57
|
+
const zIndex = baseStyle?.zIndex ?? 0;
|
|
58
|
+
const elevation = baseStyle?.elevation ?? 0;
|
|
59
|
+
|
|
60
|
+
if (zIndex === 0 && elevation === 0) {
|
|
61
|
+
return NO_STYLES;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
return { zIndex, elevation };
|
|
65
|
+
});
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
export const useSlotLayoutStyles = (slotId: string | undefined) => {
|
|
69
|
+
const { slotsMap } = useScreenSlots();
|
|
70
|
+
|
|
71
|
+
return useAnimatedStyle(() => {
|
|
72
|
+
const baseStyle = slotId ? slotsMap.get()[slotId]?.style : undefined;
|
|
73
|
+
const width = baseStyle?.width;
|
|
74
|
+
const height = baseStyle?.height;
|
|
75
|
+
const minWidth = baseStyle?.minWidth;
|
|
76
|
+
const minHeight = baseStyle?.minHeight;
|
|
77
|
+
const maxWidth = baseStyle?.maxWidth;
|
|
78
|
+
const maxHeight = baseStyle?.maxHeight;
|
|
79
|
+
const aspectRatio = baseStyle?.aspectRatio;
|
|
80
|
+
|
|
81
|
+
if (
|
|
82
|
+
width === undefined &&
|
|
83
|
+
height === undefined &&
|
|
84
|
+
minWidth === undefined &&
|
|
85
|
+
minHeight === undefined &&
|
|
86
|
+
maxWidth === undefined &&
|
|
87
|
+
maxHeight === undefined &&
|
|
88
|
+
aspectRatio === undefined
|
|
89
|
+
) {
|
|
90
|
+
return NO_STYLES;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
return {
|
|
94
|
+
width,
|
|
95
|
+
height,
|
|
96
|
+
minWidth,
|
|
97
|
+
minHeight,
|
|
98
|
+
maxWidth,
|
|
99
|
+
maxHeight,
|
|
100
|
+
aspectRatio,
|
|
101
|
+
};
|
|
102
|
+
});
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
export const useSlotProps = (slotId: string | undefined) => {
|
|
106
|
+
const { slotsMap } = useScreenSlots();
|
|
107
|
+
|
|
108
|
+
return useAnimatedProps(() => {
|
|
109
|
+
return (slotId ? slotsMap.get()[slotId]?.props : undefined) ?? NO_PROPS;
|
|
110
|
+
});
|
|
111
|
+
};
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { useDerivedValue, useSharedValue } from "react-native-reanimated";
|
|
2
2
|
import { NO_STYLES } from "../../../../constants";
|
|
3
3
|
import { AnimationStore } from "../../../../stores/animation.store";
|
|
4
|
+
import {
|
|
5
|
+
LifecycleTransitionRequestKind,
|
|
6
|
+
SystemStore,
|
|
7
|
+
} from "../../../../stores/system.store";
|
|
4
8
|
import type {
|
|
5
9
|
NormalizedTransitionInterpolatedStyle,
|
|
6
10
|
ScreenStyleInterpolator,
|
|
@@ -140,15 +144,19 @@ export const useInterpolatedStylesMap = () => {
|
|
|
140
144
|
} = useScreenAnimationContext();
|
|
141
145
|
const boundsAccessor = useBuildBoundsAccessor();
|
|
142
146
|
const transition = useBuildTransitionAccessor();
|
|
147
|
+
const nextInterpolatorReady = useSharedValue(0);
|
|
143
148
|
|
|
149
|
+
const activeScreenKey = nextScreenKey ?? currentScreenKey;
|
|
144
150
|
const {
|
|
145
151
|
entering: activeEntering,
|
|
146
152
|
transitionProgress: activeTransitionProgress,
|
|
147
|
-
} = AnimationStore.getBag(
|
|
153
|
+
} = AnimationStore.getBag(activeScreenKey);
|
|
154
|
+
const { pendingLifecycleRequestKind: activePendingLifecycleRequestKind } =
|
|
155
|
+
SystemStore.getBag(activeScreenKey);
|
|
148
156
|
|
|
149
157
|
const isGesturingDuringCloseAnimation = useSharedValue(false);
|
|
150
158
|
|
|
151
|
-
|
|
159
|
+
const localStylesMaps = useDerivedValue<LocalStyleLayers>(() => {
|
|
152
160
|
"worklet";
|
|
153
161
|
readScreenAnimationRevisions(
|
|
154
162
|
screenInterpolatorPropsRevision,
|
|
@@ -179,13 +187,18 @@ export const useInterpolatedStylesMap = () => {
|
|
|
179
187
|
// genuinely live: never during a gesture-driven close, never before a next
|
|
180
188
|
// interpolator exists, and never in the next screen's pre-start window
|
|
181
189
|
// (entering, but no transformed frame yet). Only then does "next" take over.
|
|
190
|
+
const isPendingOpen =
|
|
191
|
+
activePendingLifecycleRequestKind.get() ===
|
|
192
|
+
LifecycleTransitionRequestKind.Open;
|
|
193
|
+
const activeOpening = isPendingOpen || !!activeEntering.get();
|
|
182
194
|
const currentOwnsInterpolator =
|
|
183
195
|
isInGestureMode ||
|
|
184
196
|
!nextInterpolator ||
|
|
185
197
|
isOpeningBeforeStart(
|
|
186
|
-
|
|
198
|
+
activeOpening ? 1 : 0,
|
|
187
199
|
activeTransitionProgress.get(),
|
|
188
200
|
);
|
|
201
|
+
nextInterpolatorReady.set(currentOwnsInterpolator ? 0 : 1);
|
|
189
202
|
|
|
190
203
|
const interpolatorOptionsOwner = currentOwnsInterpolator
|
|
191
204
|
? "current"
|
|
@@ -250,4 +263,9 @@ export const useInterpolatedStylesMap = () => {
|
|
|
250
263
|
|
|
251
264
|
return layers;
|
|
252
265
|
});
|
|
266
|
+
|
|
267
|
+
return {
|
|
268
|
+
localStylesMaps,
|
|
269
|
+
nextInterpolatorReady,
|
|
270
|
+
};
|
|
253
271
|
};
|
|
@@ -1,9 +1,14 @@
|
|
|
1
|
+
export {
|
|
2
|
+
useComposedSlotStyles,
|
|
3
|
+
useSlotLayoutStyles,
|
|
4
|
+
useSlotProps,
|
|
5
|
+
useSlotStackingStyles,
|
|
6
|
+
useSlotStyles,
|
|
7
|
+
} from "./hooks/slot-resolvers";
|
|
8
|
+
|
|
1
9
|
export {
|
|
2
10
|
ScreenSlotContext,
|
|
3
11
|
type ScreenSlotName,
|
|
4
12
|
ScreenSlotProvider,
|
|
5
13
|
useScreenSlots,
|
|
6
|
-
useSlotProps,
|
|
7
|
-
useSlotStackingStyles,
|
|
8
|
-
useSlotStyles,
|
|
9
14
|
} from "./slot.provider";
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { type ReactNode, useContext } from "react";
|
|
1
|
+
import { type ReactNode, useContext, useLayoutEffect, useMemo } from "react";
|
|
2
2
|
import { StyleSheet } from "react-native";
|
|
3
|
-
import Animated, {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
} from "react-native-reanimated";
|
|
8
|
-
import {
|
|
9
|
-
type NAVIGATION_MASK_CONTAINER_STYLE_ID,
|
|
10
|
-
type NAVIGATION_MASK_ELEMENT_STYLE_ID,
|
|
11
|
-
NO_PROPS,
|
|
12
|
-
NO_STYLES,
|
|
3
|
+
import Animated, { type SharedValue } from "react-native-reanimated";
|
|
4
|
+
import type {
|
|
5
|
+
NAVIGATION_MASK_CONTAINER_STYLE_ID,
|
|
6
|
+
NAVIGATION_MASK_ELEMENT_STYLE_ID,
|
|
13
7
|
} from "../../../constants";
|
|
14
8
|
import type { NormalizedTransitionInterpolatedStyle } from "../../../types/animation.types";
|
|
15
9
|
import createProvider from "../../../utils/create-provider";
|
|
10
|
+
import { useDescriptorsStore } from "../descriptors";
|
|
16
11
|
import { FloatingOverlayLayer } from "./components/floating-overlay-layer";
|
|
12
|
+
import type { LocalStyleLayers } from "./helpers/resolve-slot-styles";
|
|
17
13
|
import { useInterpolatedStylesMap } from "./hooks/use-interpolated-style-maps";
|
|
18
14
|
import { useMaybeBlockVisibility } from "./hooks/use-maybe-block-visibility";
|
|
19
15
|
import { useResolvedStylesMap } from "./hooks/use-resolved-slot-style-map";
|
|
16
|
+
import {
|
|
17
|
+
registerScreenSlots,
|
|
18
|
+
unregisterScreenSlots,
|
|
19
|
+
} from "./stores/slot-references.store";
|
|
20
20
|
|
|
21
21
|
type Props = {
|
|
22
22
|
children: ReactNode;
|
|
@@ -30,7 +30,9 @@ export type ScreenSlotName =
|
|
|
30
30
|
| typeof NAVIGATION_MASK_CONTAINER_STYLE_ID
|
|
31
31
|
| typeof NAVIGATION_MASK_ELEMENT_STYLE_ID;
|
|
32
32
|
|
|
33
|
-
type ScreenSlotContextValue = {
|
|
33
|
+
export type ScreenSlotContextValue = {
|
|
34
|
+
localStylesMaps: SharedValue<LocalStyleLayers>;
|
|
35
|
+
nextInterpolatorReady: SharedValue<number>;
|
|
34
36
|
slotsMap: SharedValue<NormalizedTransitionInterpolatedStyle>;
|
|
35
37
|
};
|
|
36
38
|
|
|
@@ -42,20 +44,37 @@ export const {
|
|
|
42
44
|
guarded: true,
|
|
43
45
|
})<Props, ScreenSlotContextValue>(({ children, isFloatingOverlay }) => {
|
|
44
46
|
const parentContext = useContext(ScreenSlotContext);
|
|
47
|
+
const currentScreenKey = useDescriptorsStore(
|
|
48
|
+
(s) => s.derivations.currentScreenKey,
|
|
49
|
+
);
|
|
45
50
|
|
|
46
|
-
const
|
|
51
|
+
const { localStylesMaps, nextInterpolatorReady } = useInterpolatedStylesMap();
|
|
47
52
|
|
|
48
53
|
const slotsMap = useResolvedStylesMap({
|
|
49
|
-
localStylesMaps
|
|
54
|
+
localStylesMaps,
|
|
50
55
|
ancestorStylesMap: parentContext?.slotsMap,
|
|
51
56
|
});
|
|
52
57
|
const { animatedStyle, animatedProps } =
|
|
53
58
|
useMaybeBlockVisibility(isFloatingOverlay);
|
|
59
|
+
const value = useMemo(
|
|
60
|
+
() => ({
|
|
61
|
+
localStylesMaps,
|
|
62
|
+
nextInterpolatorReady,
|
|
63
|
+
slotsMap,
|
|
64
|
+
}),
|
|
65
|
+
[localStylesMaps, nextInterpolatorReady, slotsMap],
|
|
66
|
+
);
|
|
67
|
+
|
|
68
|
+
useLayoutEffect(() => {
|
|
69
|
+
registerScreenSlots(currentScreenKey, value);
|
|
70
|
+
|
|
71
|
+
return () => {
|
|
72
|
+
unregisterScreenSlots(currentScreenKey, value);
|
|
73
|
+
};
|
|
74
|
+
}, [currentScreenKey, value]);
|
|
54
75
|
|
|
55
76
|
return {
|
|
56
|
-
value
|
|
57
|
-
slotsMap,
|
|
58
|
-
},
|
|
77
|
+
value,
|
|
59
78
|
children: (
|
|
60
79
|
<FloatingOverlayLayer enabled={isFloatingOverlay}>
|
|
61
80
|
<Animated.View
|
|
@@ -72,40 +91,3 @@ export const {
|
|
|
72
91
|
const styles = StyleSheet.create({
|
|
73
92
|
container: { flex: 1 },
|
|
74
93
|
});
|
|
75
|
-
|
|
76
|
-
export const useSlotStyles = (slotId: string | undefined) => {
|
|
77
|
-
const { slotsMap } = useScreenSlots();
|
|
78
|
-
|
|
79
|
-
return useAnimatedStyle(() => {
|
|
80
|
-
return (slotId ? slotsMap.get()[slotId]?.style : undefined) ?? NO_STYLES;
|
|
81
|
-
});
|
|
82
|
-
};
|
|
83
|
-
|
|
84
|
-
/**
|
|
85
|
-
* Stacking-only slice (`zIndex`/`elevation`) of a slot's style. Returned
|
|
86
|
-
* separately so an owner can keep just its stacking context while a nested
|
|
87
|
-
* target takes the full associated style. Yields `NO_STYLES` when neither is set.
|
|
88
|
-
*/
|
|
89
|
-
export const useSlotStackingStyles = (slotId: string | undefined) => {
|
|
90
|
-
const { slotsMap } = useScreenSlots();
|
|
91
|
-
|
|
92
|
-
return useAnimatedStyle(() => {
|
|
93
|
-
const baseStyle = slotId ? slotsMap.get()[slotId]?.style : undefined;
|
|
94
|
-
const zIndex = baseStyle?.zIndex ?? 0;
|
|
95
|
-
const elevation = baseStyle?.elevation ?? 0;
|
|
96
|
-
|
|
97
|
-
if (zIndex === 0 && elevation === 0) {
|
|
98
|
-
return NO_STYLES;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
return { zIndex, elevation };
|
|
102
|
-
});
|
|
103
|
-
};
|
|
104
|
-
|
|
105
|
-
export const useSlotProps = (slotId: string | undefined) => {
|
|
106
|
-
const { slotsMap } = useScreenSlots();
|
|
107
|
-
|
|
108
|
-
return useAnimatedProps(() => {
|
|
109
|
-
return (slotId ? slotsMap.get()[slotId]?.props : undefined) ?? NO_PROPS;
|
|
110
|
-
});
|
|
111
|
-
};
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { useSyncExternalStore } from "react";
|
|
2
|
+
import type { ScreenKey } from "../../../../stores/bounds/types";
|
|
3
|
+
import type { ScreenSlotContextValue } from "../slot.provider";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Screen-owned slot reference registry.
|
|
7
|
+
*
|
|
8
|
+
* This is important for portals: a teleported component can render outside the
|
|
9
|
+
* screen provider that owns its active transition, but it still needs references
|
|
10
|
+
* to that provider's shared values. This store does not copy or own styles; it
|
|
11
|
+
* only exposes the existing ScreenSlotProvider value by screen key.
|
|
12
|
+
*/
|
|
13
|
+
type ScreenSlotsSnapshot = Record<ScreenKey, ScreenSlotContextValue>;
|
|
14
|
+
|
|
15
|
+
const listeners = new Set<() => void>();
|
|
16
|
+
const slotsByScreenKey = new Map<ScreenKey, ScreenSlotContextValue>();
|
|
17
|
+
|
|
18
|
+
let snapshot: ScreenSlotsSnapshot = {};
|
|
19
|
+
|
|
20
|
+
const emit = () => {
|
|
21
|
+
snapshot = Object.fromEntries(slotsByScreenKey);
|
|
22
|
+
|
|
23
|
+
for (const listener of listeners) {
|
|
24
|
+
listener();
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export const registerScreenSlots = (
|
|
29
|
+
screenKey: ScreenKey,
|
|
30
|
+
slots: ScreenSlotContextValue,
|
|
31
|
+
) => {
|
|
32
|
+
const previous = slotsByScreenKey.get(screenKey);
|
|
33
|
+
if (
|
|
34
|
+
previous?.localStylesMaps === slots.localStylesMaps &&
|
|
35
|
+
previous.nextInterpolatorReady === slots.nextInterpolatorReady &&
|
|
36
|
+
previous.slotsMap === slots.slotsMap
|
|
37
|
+
) {
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
slotsByScreenKey.set(screenKey, slots);
|
|
42
|
+
emit();
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
export const unregisterScreenSlots = (
|
|
46
|
+
screenKey: ScreenKey,
|
|
47
|
+
slots: ScreenSlotContextValue,
|
|
48
|
+
) => {
|
|
49
|
+
if (slotsByScreenKey.get(screenKey) !== slots) {
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
slotsByScreenKey.delete(screenKey);
|
|
54
|
+
emit();
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
const subscribe = (listener: () => void) => {
|
|
58
|
+
listeners.add(listener);
|
|
59
|
+
|
|
60
|
+
return () => {
|
|
61
|
+
listeners.delete(listener);
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
export const useRegisteredScreenSlots = (screenKey?: ScreenKey | null) => {
|
|
66
|
+
return useSyncExternalStore(
|
|
67
|
+
subscribe,
|
|
68
|
+
() => (screenKey ? (snapshot[screenKey] ?? null) : null),
|
|
69
|
+
() => null,
|
|
70
|
+
);
|
|
71
|
+
};
|
|
@@ -36,6 +36,15 @@ export const getSourceScreenKeyFromPairKey = (
|
|
|
36
36
|
return pairKey.slice(0, separatorIndex);
|
|
37
37
|
};
|
|
38
38
|
|
|
39
|
+
export const getDestinationScreenKeyFromPairKey = (
|
|
40
|
+
pairKey: ScreenPairKey,
|
|
41
|
+
): ScreenIdentifier["screenKey"] | "" => {
|
|
42
|
+
"worklet";
|
|
43
|
+
const separatorIndex = pairKey.indexOf(PAIR_SEPARATOR);
|
|
44
|
+
if (separatorIndex === -1) return "";
|
|
45
|
+
return pairKey.slice(separatorIndex + PAIR_SEPARATOR.length);
|
|
46
|
+
};
|
|
47
|
+
|
|
39
48
|
export const isScreenPairKeyForScreen = (
|
|
40
49
|
pairKey: ScreenPairKey,
|
|
41
50
|
screenKey: ScreenIdentifier["screenKey"],
|
|
@@ -94,7 +103,9 @@ const ensurePairState = (
|
|
|
94
103
|
groups: {},
|
|
95
104
|
};
|
|
96
105
|
}
|
|
97
|
-
state[pairKey].groups
|
|
106
|
+
if (!state[pairKey].groups) {
|
|
107
|
+
state[pairKey].groups = {};
|
|
108
|
+
}
|
|
98
109
|
return state[pairKey];
|
|
99
110
|
};
|
|
100
111
|
|
|
@@ -114,6 +125,18 @@ export const ensurePairGroups = (
|
|
|
114
125
|
return ensurePairState(state, pairKey).groups;
|
|
115
126
|
};
|
|
116
127
|
|
|
128
|
+
export const ensurePairSourceRequests = (
|
|
129
|
+
state: LinkPairsState,
|
|
130
|
+
pairKey: ScreenPairKey,
|
|
131
|
+
): Record<LinkKey, true> => {
|
|
132
|
+
"worklet";
|
|
133
|
+
const pair = ensurePairState(state, pairKey);
|
|
134
|
+
if (!pair.sourceRequests) {
|
|
135
|
+
pair.sourceRequests = {};
|
|
136
|
+
}
|
|
137
|
+
return pair.sourceRequests;
|
|
138
|
+
};
|
|
139
|
+
|
|
117
140
|
export const removePairLink = (
|
|
118
141
|
state: LinkPairsState,
|
|
119
142
|
pairKey: ScreenPairKey,
|
|
@@ -38,15 +38,23 @@ const applyEntryPatch = (entry: Entry, patch: EntryPatch) => {
|
|
|
38
38
|
entry.styles = patch.styles ?? {};
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
if (patch.boundaryConfig === undefined) {
|
|
42
|
-
return;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
41
|
if (patch.boundaryConfig === null) {
|
|
46
42
|
delete entry.boundaryConfig;
|
|
47
|
-
} else {
|
|
43
|
+
} else if (patch.boundaryConfig !== undefined) {
|
|
48
44
|
entry.boundaryConfig = patch.boundaryConfig;
|
|
49
45
|
}
|
|
46
|
+
|
|
47
|
+
if (patch.handoff === null) {
|
|
48
|
+
delete entry.handoff;
|
|
49
|
+
} else if (patch.handoff !== undefined) {
|
|
50
|
+
entry.handoff = patch.handoff;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
if (patch.escapeClipping === null) {
|
|
54
|
+
delete entry.escapeClipping;
|
|
55
|
+
} else if (patch.escapeClipping !== undefined) {
|
|
56
|
+
entry.escapeClipping = patch.escapeClipping;
|
|
57
|
+
}
|
|
50
58
|
};
|
|
51
59
|
|
|
52
60
|
function getEntry(tag: TagID, key: ScreenKey): Entry | null {
|