react-native-screen-transitions 4.0.0-alpha.4 → 4.0.0-alpha.5

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.
Files changed (74) hide show
  1. package/lib/commonjs/components/boundary/hooks/lifecycles/use-initial-destination-measurement.js +17 -9
  2. package/lib/commonjs/components/boundary/hooks/lifecycles/use-initial-destination-measurement.js.map +1 -1
  3. package/lib/commonjs/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.js +4 -15
  4. package/lib/commonjs/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.js.map +1 -1
  5. package/lib/commonjs/components/boundary/portal/components/boundary-portal/hooks/use-active-portal-boundary-host.js +22 -24
  6. package/lib/commonjs/components/boundary/portal/components/boundary-portal/hooks/use-active-portal-boundary-host.js.map +1 -1
  7. package/lib/commonjs/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.js +3 -36
  8. package/lib/commonjs/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.js.map +1 -1
  9. package/lib/commonjs/components/boundary/portal/components/boundary-portal/hooks/use-host-measurement.js +1 -1
  10. package/lib/commonjs/components/boundary/portal/components/boundary-portal/hooks/use-host-measurement.js.map +1 -1
  11. package/lib/commonjs/components/boundary/portal/components/boundary-portal/stores/portal-boundary-host.store.js +1 -1
  12. package/lib/commonjs/components/boundary/portal/components/boundary-portal/stores/portal-boundary-host.store.js.map +1 -1
  13. package/lib/commonjs/components/boundary/utils/destination-signals.js +7 -1
  14. package/lib/commonjs/components/boundary/utils/destination-signals.js.map +1 -1
  15. package/lib/commonjs/providers/screen/styles/helpers/resolve-interpolator-style-handoff.js +15 -14
  16. package/lib/commonjs/providers/screen/styles/helpers/resolve-interpolator-style-handoff.js.map +1 -1
  17. package/lib/commonjs/providers/screen/styles/hooks/use-interpolated-style-maps.js +17 -17
  18. package/lib/commonjs/providers/screen/styles/hooks/use-interpolated-style-maps.js.map +1 -1
  19. package/lib/commonjs/stores/bounds/internals/entries.js +13 -3
  20. package/lib/commonjs/stores/bounds/internals/entries.js.map +1 -1
  21. package/lib/module/components/boundary/hooks/lifecycles/use-initial-destination-measurement.js +18 -10
  22. package/lib/module/components/boundary/hooks/lifecycles/use-initial-destination-measurement.js.map +1 -1
  23. package/lib/module/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.js +4 -15
  24. package/lib/module/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.js.map +1 -1
  25. package/lib/module/components/boundary/portal/components/boundary-portal/hooks/use-active-portal-boundary-host.js +22 -24
  26. package/lib/module/components/boundary/portal/components/boundary-portal/hooks/use-active-portal-boundary-host.js.map +1 -1
  27. package/lib/module/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.js +3 -36
  28. package/lib/module/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.js.map +1 -1
  29. package/lib/module/components/boundary/portal/components/boundary-portal/hooks/use-host-measurement.js +2 -2
  30. package/lib/module/components/boundary/portal/components/boundary-portal/hooks/use-host-measurement.js.map +1 -1
  31. package/lib/module/components/boundary/portal/components/boundary-portal/stores/portal-boundary-host.store.js +1 -1
  32. package/lib/module/components/boundary/portal/components/boundary-portal/stores/portal-boundary-host.store.js.map +1 -1
  33. package/lib/module/components/boundary/utils/destination-signals.js +7 -1
  34. package/lib/module/components/boundary/utils/destination-signals.js.map +1 -1
  35. package/lib/module/providers/screen/styles/helpers/resolve-interpolator-style-handoff.js +15 -14
  36. package/lib/module/providers/screen/styles/helpers/resolve-interpolator-style-handoff.js.map +1 -1
  37. package/lib/module/providers/screen/styles/hooks/use-interpolated-style-maps.js +17 -17
  38. package/lib/module/providers/screen/styles/hooks/use-interpolated-style-maps.js.map +1 -1
  39. package/lib/module/stores/bounds/internals/entries.js +13 -3
  40. package/lib/module/stores/bounds/internals/entries.js.map +1 -1
  41. package/lib/typescript/components/boundary/hooks/lifecycles/use-initial-destination-measurement.d.ts.map +1 -1
  42. package/lib/typescript/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.d.ts.map +1 -1
  43. package/lib/typescript/components/boundary/portal/components/boundary-portal/hooks/use-active-portal-boundary-host.d.ts +1 -5
  44. package/lib/typescript/components/boundary/portal/components/boundary-portal/hooks/use-active-portal-boundary-host.d.ts.map +1 -1
  45. package/lib/typescript/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.d.ts.map +1 -1
  46. package/lib/typescript/components/boundary/portal/components/boundary-portal/hooks/use-host-measurement.d.ts.map +1 -1
  47. package/lib/typescript/components/boundary/portal/components/boundary-portal/stores/portal-boundary-host.store.d.ts +0 -2
  48. package/lib/typescript/components/boundary/portal/components/boundary-portal/stores/portal-boundary-host.store.d.ts.map +1 -1
  49. package/lib/typescript/components/boundary/utils/destination-signals.d.ts +1 -1
  50. package/lib/typescript/components/boundary/utils/destination-signals.d.ts.map +1 -1
  51. package/lib/typescript/providers/screen/styles/helpers/resolve-interpolator-style-handoff.d.ts +1 -3
  52. package/lib/typescript/providers/screen/styles/helpers/resolve-interpolator-style-handoff.d.ts.map +1 -1
  53. package/lib/typescript/providers/screen/styles/hooks/use-interpolated-style-maps.d.ts +4 -4
  54. package/lib/typescript/providers/screen/styles/hooks/use-interpolated-style-maps.d.ts.map +1 -1
  55. package/lib/typescript/stores/bounds/internals/entries.d.ts +1 -1
  56. package/lib/typescript/stores/bounds/internals/entries.d.ts.map +1 -1
  57. package/package.json +1 -1
  58. package/src/components/boundary/hooks/lifecycles/use-initial-destination-measurement.ts +34 -13
  59. package/src/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.tsx +4 -20
  60. package/src/components/boundary/portal/components/boundary-portal/hooks/use-active-portal-boundary-host.ts +27 -37
  61. package/src/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.ts +10 -57
  62. package/src/components/boundary/portal/components/boundary-portal/hooks/use-host-measurement.ts +1 -8
  63. package/src/components/boundary/portal/components/boundary-portal/stores/portal-boundary-host.store.ts +0 -3
  64. package/src/components/boundary/utils/destination-signals.ts +6 -2
  65. package/src/providers/screen/styles/helpers/resolve-interpolator-style-handoff.ts +16 -16
  66. package/src/providers/screen/styles/hooks/use-interpolated-style-maps.tsx +21 -24
  67. package/src/stores/bounds/internals/entries.ts +12 -1
  68. package/lib/commonjs/components/boundary/portal/components/boundary-portal/helpers/has-local-slot.js +0 -18
  69. package/lib/commonjs/components/boundary/portal/components/boundary-portal/helpers/has-local-slot.js.map +0 -1
  70. package/lib/module/components/boundary/portal/components/boundary-portal/helpers/has-local-slot.js +0 -13
  71. package/lib/module/components/boundary/portal/components/boundary-portal/helpers/has-local-slot.js.map +0 -1
  72. package/lib/typescript/components/boundary/portal/components/boundary-portal/helpers/has-local-slot.d.ts +0 -3
  73. package/lib/typescript/components/boundary/portal/components/boundary-portal/helpers/has-local-slot.d.ts.map +0 -1
  74. package/src/components/boundary/portal/components/boundary-portal/helpers/has-local-slot.ts +0 -16
@@ -66,13 +66,24 @@ function getMatchingSourceScreenKey(
66
66
  tag: TagID,
67
67
  destinationScreenKey: ScreenKey,
68
68
  preferredScreenKey?: ScreenKey,
69
+ excludedScreenKeys?: readonly ScreenKey[],
69
70
  ): ScreenKey | null {
70
71
  "worklet";
71
72
  const screens = boundaryRegistry.get()[tag]?.screens;
72
73
  if (!screens) return null;
74
+ const isExcluded = (screenKey: ScreenKey) => {
75
+ "worklet";
76
+ for (let index = 0; index < (excludedScreenKeys?.length ?? 0); index++) {
77
+ if (excludedScreenKeys?.[index] === screenKey) {
78
+ return true;
79
+ }
80
+ }
81
+ return false;
82
+ };
73
83
  if (
74
84
  preferredScreenKey &&
75
85
  preferredScreenKey !== destinationScreenKey &&
86
+ !isExcluded(preferredScreenKey) &&
76
87
  screens[preferredScreenKey]
77
88
  ) {
78
89
  return preferredScreenKey;
@@ -80,7 +91,7 @@ function getMatchingSourceScreenKey(
80
91
 
81
92
  let latestScreenKey: ScreenKey | null = null;
82
93
  for (const screenKey in screens) {
83
- if (screenKey !== destinationScreenKey) {
94
+ if (screenKey !== destinationScreenKey && !isExcluded(screenKey)) {
84
95
  latestScreenKey = screenKey;
85
96
  }
86
97
  }
@@ -1,18 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.hasLocalSlot = void 0;
7
- const hasLocalSlot = (localStylesMaps, slotId) => {
8
- "worklet";
9
-
10
- for (let index = 0; index < localStylesMaps.length; index++) {
11
- if (localStylesMaps[index]?.[slotId] !== undefined) {
12
- return true;
13
- }
14
- }
15
- return false;
16
- };
17
- exports.hasLocalSlot = hasLocalSlot;
18
- //# sourceMappingURL=has-local-slot.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["hasLocalSlot","localStylesMaps","slotId","index","length","undefined","exports"],"sourceRoot":"../../../../../../../../src","sources":["components/boundary/portal/components/boundary-portal/helpers/has-local-slot.ts"],"mappings":";;;;;;AAEO,MAAMA,YAAY,GAAGA,CAC3BC,eAAiC,EACjCC,MAAc,KACV;EACJ,SAAS;;EAET,KAAK,IAAIC,KAAK,GAAG,CAAC,EAAEA,KAAK,GAAGF,eAAe,CAACG,MAAM,EAAED,KAAK,EAAE,EAAE;IAC5D,IAAIF,eAAe,CAACE,KAAK,CAAC,GAAGD,MAAM,CAAC,KAAKG,SAAS,EAAE;MACnD,OAAO,IAAI;IACZ;EACD;EAEA,OAAO,KAAK;AACb,CAAC;AAACC,OAAA,CAAAN,YAAA,GAAAA,YAAA","ignoreList":[]}
@@ -1,13 +0,0 @@
1
- "use strict";
2
-
3
- export const hasLocalSlot = (localStylesMaps, slotId) => {
4
- "worklet";
5
-
6
- for (let index = 0; index < localStylesMaps.length; index++) {
7
- if (localStylesMaps[index]?.[slotId] !== undefined) {
8
- return true;
9
- }
10
- }
11
- return false;
12
- };
13
- //# sourceMappingURL=has-local-slot.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["hasLocalSlot","localStylesMaps","slotId","index","length","undefined"],"sourceRoot":"../../../../../../../../src","sources":["components/boundary/portal/components/boundary-portal/helpers/has-local-slot.ts"],"mappings":";;AAEA,OAAO,MAAMA,YAAY,GAAGA,CAC3BC,eAAiC,EACjCC,MAAc,KACV;EACJ,SAAS;;EAET,KAAK,IAAIC,KAAK,GAAG,CAAC,EAAEA,KAAK,GAAGF,eAAe,CAACG,MAAM,EAAED,KAAK,EAAE,EAAE;IAC5D,IAAIF,eAAe,CAACE,KAAK,CAAC,GAAGD,MAAM,CAAC,KAAKG,SAAS,EAAE;MACnD,OAAO,IAAI;IACZ;EACD;EAEA,OAAO,KAAK;AACb,CAAC","ignoreList":[]}
@@ -1,3 +0,0 @@
1
- import type { LocalStyleLayers } from "../../../../../../providers/screen/styles/helpers/resolve-slot-styles";
2
- export declare const hasLocalSlot: (localStylesMaps: LocalStyleLayers, slotId: string) => boolean;
3
- //# sourceMappingURL=has-local-slot.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"has-local-slot.d.ts","sourceRoot":"","sources":["../../../../../../../../src/components/boundary/portal/components/boundary-portal/helpers/has-local-slot.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uEAAuE,CAAC;AAE9G,eAAO,MAAM,YAAY,GACxB,iBAAiB,gBAAgB,EACjC,QAAQ,MAAM,YAWd,CAAC"}
@@ -1,16 +0,0 @@
1
- import type { LocalStyleLayers } from "../../../../../../providers/screen/styles/helpers/resolve-slot-styles";
2
-
3
- export const hasLocalSlot = (
4
- localStylesMaps: LocalStyleLayers,
5
- slotId: string,
6
- ) => {
7
- "worklet";
8
-
9
- for (let index = 0; index < localStylesMaps.length; index++) {
10
- if (localStylesMaps[index]?.[slotId] !== undefined) {
11
- return true;
12
- }
13
- }
14
-
15
- return false;
16
- };