react-native-screen-transitions 3.12.0 → 3.13.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.
Files changed (336) hide show
  1. package/lib/commonjs/shared/components/activity/variants/activity-screen.js +1 -1
  2. package/lib/commonjs/shared/components/activity/variants/activity-screen.js.map +1 -1
  3. package/lib/commonjs/shared/components/boundary/components/boundary-lifecycle.js +0 -3
  4. package/lib/commonjs/shared/components/boundary/components/boundary-lifecycle.js.map +1 -1
  5. package/lib/commonjs/shared/components/boundary/hooks/lifecycles/use-boundary-measurement-request.js +69 -0
  6. package/lib/commonjs/shared/components/boundary/hooks/lifecycles/use-boundary-measurement-request.js.map +1 -0
  7. package/lib/commonjs/shared/components/boundary/hooks/lifecycles/use-boundary-presence.js +11 -10
  8. package/lib/commonjs/shared/components/boundary/hooks/lifecycles/use-boundary-presence.js.map +1 -1
  9. package/lib/commonjs/shared/components/boundary/hooks/use-boundary-measurement.js +3 -19
  10. package/lib/commonjs/shared/components/boundary/hooks/use-boundary-measurement.js.map +1 -1
  11. package/lib/commonjs/shared/components/boundary/hooks/use-measurer.js +6 -16
  12. package/lib/commonjs/shared/components/boundary/hooks/use-measurer.js.map +1 -1
  13. package/lib/commonjs/shared/components/boundary/portal/components/boundary-content-portal/helpers/active-handoff-receiver.js +27 -1
  14. package/lib/commonjs/shared/components/boundary/portal/components/boundary-content-portal/helpers/active-handoff-receiver.js.map +1 -1
  15. package/lib/commonjs/shared/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.js +26 -8
  16. package/lib/commonjs/shared/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.js.map +1 -1
  17. package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.js +8 -1
  18. package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.js.map +1 -1
  19. package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/helpers/attachment.js +19 -0
  20. package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/helpers/attachment.js.map +1 -0
  21. package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/helpers/host-readiness.js +18 -0
  22. package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/helpers/host-readiness.js.map +1 -0
  23. package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/helpers/local-measurement.js +22 -1
  24. package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/helpers/local-measurement.js.map +1 -1
  25. package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/hooks/use-active-portal-boundary-host.js +10 -10
  26. package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/hooks/use-active-portal-boundary-host.js.map +1 -1
  27. package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.js +18 -6
  28. package/lib/commonjs/shared/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.js.map +1 -1
  29. package/lib/commonjs/shared/providers/helpers/measured-bounds-writes.js +4 -0
  30. package/lib/commonjs/shared/providers/helpers/measured-bounds-writes.js.map +1 -1
  31. package/lib/commonjs/shared/providers/screen/animation/animation.provider.js +4 -1
  32. package/lib/commonjs/shared/providers/screen/animation/animation.provider.js.map +1 -1
  33. package/lib/commonjs/shared/providers/screen/animation/helpers/hydrate-transition-state/index.js +5 -1
  34. package/lib/commonjs/shared/providers/screen/animation/helpers/hydrate-transition-state/index.js.map +1 -1
  35. package/lib/commonjs/shared/providers/screen/animation/helpers/interpolator-participation.js +9 -0
  36. package/lib/commonjs/shared/providers/screen/animation/helpers/interpolator-participation.js.map +1 -0
  37. package/lib/commonjs/shared/providers/screen/animation/helpers/pipeline.js +13 -2
  38. package/lib/commonjs/shared/providers/screen/animation/helpers/pipeline.js.map +1 -1
  39. package/lib/commonjs/shared/providers/screen/descriptors/descriptors.provider.js +40 -8
  40. package/lib/commonjs/shared/providers/screen/descriptors/descriptors.provider.js.map +1 -1
  41. package/lib/commonjs/shared/providers/screen/descriptors/helpers/derive-descriptor-derivations.js +2 -0
  42. package/lib/commonjs/shared/providers/screen/descriptors/helpers/derive-descriptor-derivations.js.map +1 -1
  43. package/lib/commonjs/shared/providers/screen/descriptors/helpers/derive-structural-ancestor-keys.js +12 -0
  44. package/lib/commonjs/shared/providers/screen/descriptors/helpers/derive-structural-ancestor-keys.js.map +1 -0
  45. package/lib/commonjs/shared/providers/screen/gestures/pan/behavior/pan-lifecycle.js +1 -0
  46. package/lib/commonjs/shared/providers/screen/gestures/pan/behavior/pan-lifecycle.js.map +1 -1
  47. package/lib/commonjs/shared/providers/screen/gestures/pan/behavior/pan-release.js +9 -2
  48. package/lib/commonjs/shared/providers/screen/gestures/pan/behavior/pan-release.js.map +1 -1
  49. package/lib/commonjs/shared/providers/screen/gestures/pan/behavior/use-pan-behavior.js +1 -0
  50. package/lib/commonjs/shared/providers/screen/gestures/pan/behavior/use-pan-behavior.js.map +1 -1
  51. package/lib/commonjs/shared/providers/screen/styles/constants.js +2 -1
  52. package/lib/commonjs/shared/providers/screen/styles/constants.js.map +1 -1
  53. package/lib/commonjs/shared/providers/screen/styles/helpers/visibility-block-ownership.js +19 -0
  54. package/lib/commonjs/shared/providers/screen/styles/helpers/visibility-block-ownership.js.map +1 -0
  55. package/lib/commonjs/shared/providers/screen/styles/hooks/use-maybe-block-visibility.js +35 -15
  56. package/lib/commonjs/shared/providers/screen/styles/hooks/use-maybe-block-visibility.js.map +1 -1
  57. package/lib/commonjs/shared/providers/screen/styles/slot.provider.js +15 -6
  58. package/lib/commonjs/shared/providers/screen/styles/slot.provider.js.map +1 -1
  59. package/lib/commonjs/shared/stores/bounds/helpers/link-pairs.helpers.js +11 -1
  60. package/lib/commonjs/shared/stores/bounds/helpers/link-pairs.helpers.js.map +1 -1
  61. package/lib/commonjs/shared/stores/bounds/internals/clear.js +6 -0
  62. package/lib/commonjs/shared/stores/bounds/internals/clear.js.map +1 -1
  63. package/lib/commonjs/shared/stores/bounds/internals/coordinator.js +298 -0
  64. package/lib/commonjs/shared/stores/bounds/internals/coordinator.js.map +1 -0
  65. package/lib/commonjs/shared/stores/bounds/internals/entries.js +0 -27
  66. package/lib/commonjs/shared/stores/bounds/internals/entries.js.map +1 -1
  67. package/lib/commonjs/shared/stores/bounds/internals/links.js +22 -32
  68. package/lib/commonjs/shared/stores/bounds/internals/links.js.map +1 -1
  69. package/lib/commonjs/shared/stores/bounds/internals/screen-graph.js +45 -0
  70. package/lib/commonjs/shared/stores/bounds/internals/screen-graph.js.map +1 -0
  71. package/lib/commonjs/shared/stores/bounds/internals/state.js +4 -1
  72. package/lib/commonjs/shared/stores/bounds/internals/state.js.map +1 -1
  73. package/lib/commonjs/shared/utils/bounds/helpers/create-bounds-accessor-core.js +7 -3
  74. package/lib/commonjs/shared/utils/bounds/helpers/create-bounds-accessor-core.js.map +1 -1
  75. package/lib/commonjs/shared/utils/bounds/helpers/create-link-accessor.js +11 -0
  76. package/lib/commonjs/shared/utils/bounds/helpers/create-link-accessor.js.map +1 -1
  77. package/lib/commonjs/shared/utils/bounds/helpers/prepare-bound-styles.js +6 -2
  78. package/lib/commonjs/shared/utils/bounds/helpers/prepare-bound-styles.js.map +1 -1
  79. package/lib/commonjs/shared/utils/bounds/helpers/resolve-bounds-pair-key.js.map +1 -1
  80. package/lib/commonjs/shared/utils/bounds/helpers/styles/compute.js +11 -5
  81. package/lib/commonjs/shared/utils/bounds/helpers/styles/compute.js.map +1 -1
  82. package/lib/module/shared/components/activity/variants/activity-screen.js +1 -1
  83. package/lib/module/shared/components/activity/variants/activity-screen.js.map +1 -1
  84. package/lib/module/shared/components/boundary/components/boundary-lifecycle.js +0 -3
  85. package/lib/module/shared/components/boundary/components/boundary-lifecycle.js.map +1 -1
  86. package/lib/module/shared/components/boundary/hooks/lifecycles/use-boundary-measurement-request.js +64 -0
  87. package/lib/module/shared/components/boundary/hooks/lifecycles/use-boundary-measurement-request.js.map +1 -0
  88. package/lib/module/shared/components/boundary/hooks/lifecycles/use-boundary-presence.js +11 -10
  89. package/lib/module/shared/components/boundary/hooks/lifecycles/use-boundary-presence.js.map +1 -1
  90. package/lib/module/shared/components/boundary/hooks/use-boundary-measurement.js +3 -19
  91. package/lib/module/shared/components/boundary/hooks/use-boundary-measurement.js.map +1 -1
  92. package/lib/module/shared/components/boundary/hooks/use-measurer.js +6 -16
  93. package/lib/module/shared/components/boundary/hooks/use-measurer.js.map +1 -1
  94. package/lib/module/shared/components/boundary/portal/components/boundary-content-portal/helpers/active-handoff-receiver.js +24 -0
  95. package/lib/module/shared/components/boundary/portal/components/boundary-content-portal/helpers/active-handoff-receiver.js.map +1 -1
  96. package/lib/module/shared/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.js +27 -9
  97. package/lib/module/shared/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.js.map +1 -1
  98. package/lib/module/shared/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.js +8 -1
  99. package/lib/module/shared/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.js.map +1 -1
  100. package/lib/module/shared/components/boundary/portal/components/boundary-portal/helpers/attachment.js +14 -0
  101. package/lib/module/shared/components/boundary/portal/components/boundary-portal/helpers/attachment.js.map +1 -0
  102. package/lib/module/shared/components/boundary/portal/components/boundary-portal/helpers/host-readiness.js +13 -0
  103. package/lib/module/shared/components/boundary/portal/components/boundary-portal/helpers/host-readiness.js.map +1 -0
  104. package/lib/module/shared/components/boundary/portal/components/boundary-portal/helpers/local-measurement.js +19 -0
  105. package/lib/module/shared/components/boundary/portal/components/boundary-portal/helpers/local-measurement.js.map +1 -1
  106. package/lib/module/shared/components/boundary/portal/components/boundary-portal/hooks/use-active-portal-boundary-host.js +10 -10
  107. package/lib/module/shared/components/boundary/portal/components/boundary-portal/hooks/use-active-portal-boundary-host.js.map +1 -1
  108. package/lib/module/shared/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.js +18 -6
  109. package/lib/module/shared/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.js.map +1 -1
  110. package/lib/module/shared/providers/helpers/measured-bounds-writes.js +4 -0
  111. package/lib/module/shared/providers/helpers/measured-bounds-writes.js.map +1 -1
  112. package/lib/module/shared/providers/screen/animation/animation.provider.js +4 -1
  113. package/lib/module/shared/providers/screen/animation/animation.provider.js.map +1 -1
  114. package/lib/module/shared/providers/screen/animation/helpers/hydrate-transition-state/index.js +5 -1
  115. package/lib/module/shared/providers/screen/animation/helpers/hydrate-transition-state/index.js.map +1 -1
  116. package/lib/module/shared/providers/screen/animation/helpers/interpolator-participation.js +4 -0
  117. package/lib/module/shared/providers/screen/animation/helpers/interpolator-participation.js.map +1 -0
  118. package/lib/module/shared/providers/screen/animation/helpers/pipeline.js +13 -2
  119. package/lib/module/shared/providers/screen/animation/helpers/pipeline.js.map +1 -1
  120. package/lib/module/shared/providers/screen/descriptors/descriptors.provider.js +41 -9
  121. package/lib/module/shared/providers/screen/descriptors/descriptors.provider.js.map +1 -1
  122. package/lib/module/shared/providers/screen/descriptors/helpers/derive-descriptor-derivations.js +2 -0
  123. package/lib/module/shared/providers/screen/descriptors/helpers/derive-descriptor-derivations.js.map +1 -1
  124. package/lib/module/shared/providers/screen/descriptors/helpers/derive-structural-ancestor-keys.js +7 -0
  125. package/lib/module/shared/providers/screen/descriptors/helpers/derive-structural-ancestor-keys.js.map +1 -0
  126. package/lib/module/shared/providers/screen/gestures/pan/behavior/pan-lifecycle.js +1 -0
  127. package/lib/module/shared/providers/screen/gestures/pan/behavior/pan-lifecycle.js.map +1 -1
  128. package/lib/module/shared/providers/screen/gestures/pan/behavior/pan-release.js +9 -2
  129. package/lib/module/shared/providers/screen/gestures/pan/behavior/pan-release.js.map +1 -1
  130. package/lib/module/shared/providers/screen/gestures/pan/behavior/use-pan-behavior.js +1 -0
  131. package/lib/module/shared/providers/screen/gestures/pan/behavior/use-pan-behavior.js.map +1 -1
  132. package/lib/module/shared/providers/screen/styles/constants.js +2 -1
  133. package/lib/module/shared/providers/screen/styles/constants.js.map +1 -1
  134. package/lib/module/shared/providers/screen/styles/helpers/visibility-block-ownership.js +14 -0
  135. package/lib/module/shared/providers/screen/styles/helpers/visibility-block-ownership.js.map +1 -0
  136. package/lib/module/shared/providers/screen/styles/hooks/use-maybe-block-visibility.js +35 -15
  137. package/lib/module/shared/providers/screen/styles/hooks/use-maybe-block-visibility.js.map +1 -1
  138. package/lib/module/shared/providers/screen/styles/slot.provider.js +13 -5
  139. package/lib/module/shared/providers/screen/styles/slot.provider.js.map +1 -1
  140. package/lib/module/shared/stores/bounds/helpers/link-pairs.helpers.js +9 -0
  141. package/lib/module/shared/stores/bounds/helpers/link-pairs.helpers.js.map +1 -1
  142. package/lib/module/shared/stores/bounds/internals/clear.js +7 -1
  143. package/lib/module/shared/stores/bounds/internals/clear.js.map +1 -1
  144. package/lib/module/shared/stores/bounds/internals/coordinator.js +286 -0
  145. package/lib/module/shared/stores/bounds/internals/coordinator.js.map +1 -0
  146. package/lib/module/shared/stores/bounds/internals/entries.js +1 -27
  147. package/lib/module/shared/stores/bounds/internals/entries.js.map +1 -1
  148. package/lib/module/shared/stores/bounds/internals/links.js +24 -32
  149. package/lib/module/shared/stores/bounds/internals/links.js.map +1 -1
  150. package/lib/module/shared/stores/bounds/internals/screen-graph.js +39 -0
  151. package/lib/module/shared/stores/bounds/internals/screen-graph.js.map +1 -0
  152. package/lib/module/shared/stores/bounds/internals/state.js +3 -0
  153. package/lib/module/shared/stores/bounds/internals/state.js.map +1 -1
  154. package/lib/module/shared/utils/bounds/helpers/create-bounds-accessor-core.js +7 -3
  155. package/lib/module/shared/utils/bounds/helpers/create-bounds-accessor-core.js.map +1 -1
  156. package/lib/module/shared/utils/bounds/helpers/create-link-accessor.js +11 -0
  157. package/lib/module/shared/utils/bounds/helpers/create-link-accessor.js.map +1 -1
  158. package/lib/module/shared/utils/bounds/helpers/prepare-bound-styles.js +6 -2
  159. package/lib/module/shared/utils/bounds/helpers/prepare-bound-styles.js.map +1 -1
  160. package/lib/module/shared/utils/bounds/helpers/resolve-bounds-pair-key.js.map +1 -1
  161. package/lib/module/shared/utils/bounds/helpers/styles/compute.js +11 -5
  162. package/lib/module/shared/utils/bounds/helpers/styles/compute.js.map +1 -1
  163. package/lib/typescript/native-stack/views/useHeaderConfigProps.d.ts +1 -1
  164. package/lib/typescript/shared/components/boundary/components/boundary-lifecycle.d.ts.map +1 -1
  165. package/lib/typescript/shared/components/boundary/hooks/lifecycles/{use-initial-source-measurement.d.ts → use-boundary-measurement-request.d.ts} +4 -3
  166. package/lib/typescript/shared/components/boundary/hooks/lifecycles/use-boundary-measurement-request.d.ts.map +1 -0
  167. package/lib/typescript/shared/components/boundary/hooks/lifecycles/use-boundary-presence.d.ts.map +1 -1
  168. package/lib/typescript/shared/components/boundary/hooks/use-boundary-measurement.d.ts +1 -3
  169. package/lib/typescript/shared/components/boundary/hooks/use-boundary-measurement.d.ts.map +1 -1
  170. package/lib/typescript/shared/components/boundary/hooks/use-measurer.d.ts.map +1 -1
  171. package/lib/typescript/shared/components/boundary/portal/components/boundary-content-portal/helpers/active-handoff-receiver.d.ts +12 -0
  172. package/lib/typescript/shared/components/boundary/portal/components/boundary-content-portal/helpers/active-handoff-receiver.d.ts.map +1 -1
  173. package/lib/typescript/shared/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.d.ts.map +1 -1
  174. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.d.ts.map +1 -1
  175. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/helpers/attachment.d.ts +8 -0
  176. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/helpers/attachment.d.ts.map +1 -0
  177. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/helpers/host-readiness.d.ts +6 -0
  178. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/helpers/host-readiness.d.ts.map +1 -0
  179. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/helpers/local-measurement.d.ts +4 -1
  180. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/helpers/local-measurement.d.ts.map +1 -1
  181. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/hooks/use-active-portal-boundary-host.d.ts +2 -3
  182. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/hooks/use-active-portal-boundary-host.d.ts.map +1 -1
  183. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.d.ts.map +1 -1
  184. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/hooks/use-placeholder-styles.d.ts +2 -2
  185. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/stores/portal-boundary-host.store.d.ts +1 -1
  186. package/lib/typescript/shared/components/boundary/portal/components/boundary-portal/stores/portal-boundary-host.store.d.ts.map +1 -1
  187. package/lib/typescript/shared/components/boundary/types.d.ts +1 -1
  188. package/lib/typescript/shared/components/boundary/types.d.ts.map +1 -1
  189. package/lib/typescript/shared/components/create-transition-aware-component.d.ts +5 -6
  190. package/lib/typescript/shared/components/create-transition-aware-component.d.ts.map +1 -1
  191. package/lib/typescript/shared/components/overlay/hooks/use-overlay-slot.d.ts +1 -1
  192. package/lib/typescript/shared/index.d.ts +651 -703
  193. package/lib/typescript/shared/index.d.ts.map +1 -1
  194. package/lib/typescript/shared/providers/helpers/measured-bounds-writes.d.ts.map +1 -1
  195. package/lib/typescript/shared/providers/screen/animation/animation.provider.d.ts.map +1 -1
  196. package/lib/typescript/shared/providers/screen/animation/helpers/hydrate-transition-state/index.d.ts.map +1 -1
  197. package/lib/typescript/shared/providers/screen/animation/helpers/interpolator-participation.d.ts +3 -0
  198. package/lib/typescript/shared/providers/screen/animation/helpers/interpolator-participation.d.ts.map +1 -0
  199. package/lib/typescript/shared/providers/screen/animation/helpers/pipeline.d.ts +2 -1
  200. package/lib/typescript/shared/providers/screen/animation/helpers/pipeline.d.ts.map +1 -1
  201. package/lib/typescript/shared/providers/screen/descriptors/descriptors.provider.d.ts.map +1 -1
  202. package/lib/typescript/shared/providers/screen/descriptors/helpers/derive-descriptor-derivations.d.ts +4 -0
  203. package/lib/typescript/shared/providers/screen/descriptors/helpers/derive-descriptor-derivations.d.ts.map +1 -1
  204. package/lib/typescript/shared/providers/screen/descriptors/helpers/derive-structural-ancestor-keys.d.ts +5 -0
  205. package/lib/typescript/shared/providers/screen/descriptors/helpers/derive-structural-ancestor-keys.d.ts.map +1 -0
  206. package/lib/typescript/shared/providers/screen/gestures/pan/behavior/pan-lifecycle.d.ts.map +1 -1
  207. package/lib/typescript/shared/providers/screen/gestures/pan/behavior/pan-release.d.ts.map +1 -1
  208. package/lib/typescript/shared/providers/screen/gestures/pan/behavior/use-pan-behavior.d.ts.map +1 -1
  209. package/lib/typescript/shared/providers/screen/gestures/types.d.ts +1 -0
  210. package/lib/typescript/shared/providers/screen/gestures/types.d.ts.map +1 -1
  211. package/lib/typescript/shared/providers/screen/styles/constants.d.ts.map +1 -1
  212. package/lib/typescript/shared/providers/screen/styles/helpers/visibility-block-ownership.d.ts +10 -0
  213. package/lib/typescript/shared/providers/screen/styles/helpers/visibility-block-ownership.d.ts.map +1 -0
  214. package/lib/typescript/shared/providers/screen/styles/hooks/slot-resolvers.d.ts +4 -4
  215. package/lib/typescript/shared/providers/screen/styles/hooks/slot-resolvers.d.ts.map +1 -1
  216. package/lib/typescript/shared/providers/screen/styles/hooks/use-maybe-block-visibility.d.ts +10 -4
  217. package/lib/typescript/shared/providers/screen/styles/hooks/use-maybe-block-visibility.d.ts.map +1 -1
  218. package/lib/typescript/shared/providers/screen/styles/slot.provider.d.ts +1 -0
  219. package/lib/typescript/shared/providers/screen/styles/slot.provider.d.ts.map +1 -1
  220. package/lib/typescript/shared/stores/bounds/helpers/link-pairs.helpers.d.ts +1 -0
  221. package/lib/typescript/shared/stores/bounds/helpers/link-pairs.helpers.d.ts.map +1 -1
  222. package/lib/typescript/shared/stores/bounds/internals/clear.d.ts.map +1 -1
  223. package/lib/typescript/shared/stores/bounds/internals/coordinator.d.ts +36 -0
  224. package/lib/typescript/shared/stores/bounds/internals/coordinator.d.ts.map +1 -0
  225. package/lib/typescript/shared/stores/bounds/internals/entries.d.ts +1 -2
  226. package/lib/typescript/shared/stores/bounds/internals/entries.d.ts.map +1 -1
  227. package/lib/typescript/shared/stores/bounds/internals/links.d.ts +1 -3
  228. package/lib/typescript/shared/stores/bounds/internals/links.d.ts.map +1 -1
  229. package/lib/typescript/shared/stores/bounds/internals/screen-graph.d.ts +5 -0
  230. package/lib/typescript/shared/stores/bounds/internals/screen-graph.d.ts.map +1 -0
  231. package/lib/typescript/shared/stores/bounds/internals/state.d.ts +3 -1
  232. package/lib/typescript/shared/stores/bounds/internals/state.d.ts.map +1 -1
  233. package/lib/typescript/shared/stores/bounds/types.d.ts +13 -1
  234. package/lib/typescript/shared/stores/bounds/types.d.ts.map +1 -1
  235. package/lib/typescript/shared/types/screen.types.d.ts +9 -0
  236. package/lib/typescript/shared/types/screen.types.d.ts.map +1 -1
  237. package/lib/typescript/shared/utils/bounds/helpers/create-bounds-accessor-core.d.ts.map +1 -1
  238. package/lib/typescript/shared/utils/bounds/helpers/create-link-accessor.d.ts.map +1 -1
  239. package/lib/typescript/shared/utils/bounds/helpers/prepare-bound-styles.d.ts.map +1 -1
  240. package/lib/typescript/shared/utils/bounds/helpers/resolve-bounds-pair-key.d.ts.map +1 -1
  241. package/lib/typescript/shared/utils/bounds/helpers/styles/compute.d.ts.map +1 -1
  242. package/package.json +1 -1
  243. package/src/shared/components/activity/variants/activity-screen.tsx +1 -1
  244. package/src/shared/components/boundary/components/boundary-lifecycle.tsx +0 -6
  245. package/src/shared/components/boundary/hooks/lifecycles/use-boundary-measurement-request.ts +102 -0
  246. package/src/shared/components/boundary/hooks/lifecycles/use-boundary-presence.ts +20 -11
  247. package/src/shared/components/boundary/hooks/use-boundary-measurement.ts +3 -22
  248. package/src/shared/components/boundary/hooks/use-measurer.ts +5 -20
  249. package/src/shared/components/boundary/portal/components/boundary-content-portal/helpers/active-handoff-receiver.ts +40 -0
  250. package/src/shared/components/boundary/portal/components/boundary-content-portal/hooks/use-boundary-content-portal-attachment.ts +68 -20
  251. package/src/shared/components/boundary/portal/components/boundary-portal/components/portal-boundary-host.tsx +10 -1
  252. package/src/shared/components/boundary/portal/components/boundary-portal/helpers/attachment.ts +19 -0
  253. package/src/shared/components/boundary/portal/components/boundary-portal/helpers/host-readiness.ts +14 -0
  254. package/src/shared/components/boundary/portal/components/boundary-portal/helpers/local-measurement.ts +36 -1
  255. package/src/shared/components/boundary/portal/components/boundary-portal/hooks/use-active-portal-boundary-host.ts +22 -13
  256. package/src/shared/components/boundary/portal/components/boundary-portal/hooks/use-boundary-portal-attachment.ts +26 -9
  257. package/src/shared/components/boundary/portal/components/boundary-portal/stores/portal-boundary-host.store.ts +1 -1
  258. package/src/shared/components/boundary/types.ts +1 -1
  259. package/src/shared/providers/helpers/measured-bounds-writes.ts +5 -0
  260. package/src/shared/providers/screen/animation/animation.provider.tsx +7 -1
  261. package/src/shared/providers/screen/animation/helpers/hydrate-transition-state/index.ts +18 -3
  262. package/src/shared/providers/screen/animation/helpers/interpolator-participation.ts +6 -0
  263. package/src/shared/providers/screen/animation/helpers/pipeline.ts +54 -32
  264. package/src/shared/providers/screen/descriptors/descriptors.provider.tsx +80 -14
  265. package/src/shared/providers/screen/descriptors/helpers/derive-descriptor-derivations.ts +6 -0
  266. package/src/shared/providers/screen/descriptors/helpers/derive-structural-ancestor-keys.ts +13 -0
  267. package/src/shared/providers/screen/gestures/pan/behavior/pan-lifecycle.ts +1 -0
  268. package/src/shared/providers/screen/gestures/pan/behavior/pan-release.ts +12 -2
  269. package/src/shared/providers/screen/gestures/pan/behavior/use-pan-behavior.ts +1 -0
  270. package/src/shared/providers/screen/gestures/types.ts +1 -0
  271. package/src/shared/providers/screen/styles/constants.ts +1 -0
  272. package/src/shared/providers/screen/styles/helpers/visibility-block-ownership.ts +16 -0
  273. package/src/shared/providers/screen/styles/hooks/use-maybe-block-visibility.tsx +40 -15
  274. package/src/shared/providers/screen/styles/slot.provider.tsx +19 -5
  275. package/src/shared/stores/bounds/helpers/link-pairs.helpers.ts +12 -0
  276. package/src/shared/stores/bounds/internals/clear.ts +12 -1
  277. package/src/shared/stores/bounds/internals/coordinator.ts +403 -0
  278. package/src/shared/stores/bounds/internals/entries.ts +1 -38
  279. package/src/shared/stores/bounds/internals/links.ts +28 -38
  280. package/src/shared/stores/bounds/internals/screen-graph.ts +45 -0
  281. package/src/shared/stores/bounds/internals/state.ts +10 -1
  282. package/src/shared/stores/bounds/types.ts +19 -1
  283. package/src/shared/types/screen.types.ts +10 -0
  284. package/src/shared/utils/bounds/helpers/create-bounds-accessor-core.ts +8 -3
  285. package/src/shared/utils/bounds/helpers/create-link-accessor.ts +11 -0
  286. package/src/shared/utils/bounds/helpers/prepare-bound-styles.ts +3 -2
  287. package/src/shared/utils/bounds/helpers/resolve-bounds-pair-key.ts +0 -1
  288. package/src/shared/utils/bounds/helpers/styles/compute.ts +12 -5
  289. package/lib/commonjs/shared/components/boundary/hooks/lifecycles/use-initial-destination-measurement.js +0 -177
  290. package/lib/commonjs/shared/components/boundary/hooks/lifecycles/use-initial-destination-measurement.js.map +0 -1
  291. package/lib/commonjs/shared/components/boundary/hooks/lifecycles/use-initial-source-measurement.js +0 -49
  292. package/lib/commonjs/shared/components/boundary/hooks/lifecycles/use-initial-source-measurement.js.map +0 -1
  293. package/lib/commonjs/shared/components/boundary/hooks/lifecycles/use-refresh-boundary.js +0 -69
  294. package/lib/commonjs/shared/components/boundary/hooks/lifecycles/use-refresh-boundary.js.map +0 -1
  295. package/lib/commonjs/shared/components/boundary/utils/destination-signals.js +0 -68
  296. package/lib/commonjs/shared/components/boundary/utils/destination-signals.js.map +0 -1
  297. package/lib/commonjs/shared/components/boundary/utils/refresh-signals.js +0 -97
  298. package/lib/commonjs/shared/components/boundary/utils/refresh-signals.js.map +0 -1
  299. package/lib/commonjs/shared/components/boundary/utils/source-signals.js +0 -43
  300. package/lib/commonjs/shared/components/boundary/utils/source-signals.js.map +0 -1
  301. package/lib/commonjs/shared/providers/screen/descriptors/helpers/get-ancestor-keys.js +0 -29
  302. package/lib/commonjs/shared/providers/screen/descriptors/helpers/get-ancestor-keys.js.map +0 -1
  303. package/lib/module/shared/components/boundary/hooks/lifecycles/use-initial-destination-measurement.js +0 -173
  304. package/lib/module/shared/components/boundary/hooks/lifecycles/use-initial-destination-measurement.js.map +0 -1
  305. package/lib/module/shared/components/boundary/hooks/lifecycles/use-initial-source-measurement.js +0 -44
  306. package/lib/module/shared/components/boundary/hooks/lifecycles/use-initial-source-measurement.js.map +0 -1
  307. package/lib/module/shared/components/boundary/hooks/lifecycles/use-refresh-boundary.js +0 -64
  308. package/lib/module/shared/components/boundary/hooks/lifecycles/use-refresh-boundary.js.map +0 -1
  309. package/lib/module/shared/components/boundary/utils/destination-signals.js +0 -63
  310. package/lib/module/shared/components/boundary/utils/destination-signals.js.map +0 -1
  311. package/lib/module/shared/components/boundary/utils/refresh-signals.js +0 -92
  312. package/lib/module/shared/components/boundary/utils/refresh-signals.js.map +0 -1
  313. package/lib/module/shared/components/boundary/utils/source-signals.js +0 -38
  314. package/lib/module/shared/components/boundary/utils/source-signals.js.map +0 -1
  315. package/lib/module/shared/providers/screen/descriptors/helpers/get-ancestor-keys.js +0 -25
  316. package/lib/module/shared/providers/screen/descriptors/helpers/get-ancestor-keys.js.map +0 -1
  317. package/lib/typescript/shared/components/boundary/hooks/lifecycles/use-initial-destination-measurement.d.ts +0 -10
  318. package/lib/typescript/shared/components/boundary/hooks/lifecycles/use-initial-destination-measurement.d.ts.map +0 -1
  319. package/lib/typescript/shared/components/boundary/hooks/lifecycles/use-initial-source-measurement.d.ts.map +0 -1
  320. package/lib/typescript/shared/components/boundary/hooks/lifecycles/use-refresh-boundary.d.ts +0 -10
  321. package/lib/typescript/shared/components/boundary/hooks/lifecycles/use-refresh-boundary.d.ts.map +0 -1
  322. package/lib/typescript/shared/components/boundary/utils/destination-signals.d.ts +0 -16
  323. package/lib/typescript/shared/components/boundary/utils/destination-signals.d.ts.map +0 -1
  324. package/lib/typescript/shared/components/boundary/utils/refresh-signals.d.ts +0 -19
  325. package/lib/typescript/shared/components/boundary/utils/refresh-signals.d.ts.map +0 -1
  326. package/lib/typescript/shared/components/boundary/utils/source-signals.d.ts +0 -14
  327. package/lib/typescript/shared/components/boundary/utils/source-signals.d.ts.map +0 -1
  328. package/lib/typescript/shared/providers/screen/descriptors/helpers/get-ancestor-keys.d.ts +0 -6
  329. package/lib/typescript/shared/providers/screen/descriptors/helpers/get-ancestor-keys.d.ts.map +0 -1
  330. package/src/shared/components/boundary/hooks/lifecycles/use-initial-destination-measurement.ts +0 -267
  331. package/src/shared/components/boundary/hooks/lifecycles/use-initial-source-measurement.ts +0 -51
  332. package/src/shared/components/boundary/hooks/lifecycles/use-refresh-boundary.ts +0 -90
  333. package/src/shared/components/boundary/utils/destination-signals.ts +0 -75
  334. package/src/shared/components/boundary/utils/refresh-signals.ts +0 -164
  335. package/src/shared/components/boundary/utils/source-signals.ts +0 -51
  336. package/src/shared/providers/screen/descriptors/helpers/get-ancestor-keys.ts +0 -28
@@ -9,6 +9,11 @@ import { useInterpolatedStylesMap } from "./hooks/use-interpolated-style-maps";
9
9
  import { useMaybeBlockVisibility } from "./hooks/use-maybe-block-visibility";
10
10
  import { useResolvedStylesMap } from "./hooks/use-resolved-slot-style-map";
11
11
  import { jsx as _jsx } from "react/jsx-runtime";
12
+ const NO_PARENT_SCREEN_KEY = "__no-parent-screen__";
13
+ export const useAreAnyBlockingVisibility = () => {
14
+ const parentScreenKey = useDescriptorsStore(store => store.derivations.parentScreenKey);
15
+ return useScreenSlots(parentScreenKey ?? NO_PARENT_SCREEN_KEY, store => store.visibilityBlocked);
16
+ };
12
17
  export const {
13
18
  ScreenSlotProvider,
14
19
  useScreenSlotStore: useScreenSlots
@@ -22,17 +27,20 @@ export const {
22
27
  }) => {
23
28
  const ancestorStylesMap = useParentStore(parentContext => parentContext?.slotsMap);
24
29
  const currentScreenKey = useDescriptorsStore(store => store.derivations.currentScreenKey);
30
+ const ancestorVisibilityBlocked = useAreAnyBlockingVisibility();
25
31
  const {
26
32
  animatedStyle,
27
33
  animatedProps,
28
- shouldBlockVisibility
29
- } = useMaybeBlockVisibility();
34
+ visibilityBlocked
35
+ } = useMaybeBlockVisibility({
36
+ ancestorVisibilityBlocked
37
+ });
30
38
  const {
31
39
  interpolatorReady,
32
40
  localStylesMaps
33
41
  } = useInterpolatedStylesMap({
34
42
  enabled: true,
35
- visibilityBlocked: shouldBlockVisibility
43
+ visibilityBlocked
36
44
  });
37
45
  const slotsMap = useResolvedStylesMap({
38
46
  localStylesMaps,
@@ -41,8 +49,8 @@ export const {
41
49
  const value = useMemo(() => ({
42
50
  interpolatorReady,
43
51
  slotsMap,
44
- visibilityBlocked: shouldBlockVisibility
45
- }), [interpolatorReady, shouldBlockVisibility, slotsMap]);
52
+ visibilityBlocked
53
+ }), [interpolatorReady, slotsMap, visibilityBlocked]);
46
54
  const content = useMemo(() => /*#__PURE__*/_jsx(Animated.View, {
47
55
  style: [styles.container, animatedStyle],
48
56
  animatedProps: animatedProps,
@@ -1 +1 @@
1
- {"version":3,"names":["useMemo","StyleSheet","Animated","createProvider","useDescriptorsStore","useInterpolatedStylesMap","useMaybeBlockVisibility","useResolvedStylesMap","jsx","_jsx","ScreenSlotProvider","useScreenSlotStore","useScreenSlots","guarded","global","children","useParentStore","ancestorStylesMap","parentContext","slotsMap","currentScreenKey","store","derivations","animatedStyle","animatedProps","shouldBlockVisibility","interpolatorReady","localStylesMaps","enabled","visibilityBlocked","value","content","View","style","styles","container","key","create","flex"],"sourceRoot":"../../../../../../src","sources":["shared/providers/screen/styles/slot.provider.tsx"],"mappings":";;AAAA,SAAyBA,OAAO,QAAQ,OAAO;AAC/C,SAASC,UAAU,QAAQ,cAAc;AACzC,OAAOC,QAAQ,MAA4B,yBAAyB;AAMpE,OAAOC,cAA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zCC,aAAa,EAAEA,aAAc;IAAAT,QAAA,EAE5BA;EAAQ,CACK,CACf,EACD,CAACA,QAAQ,EAAEQ,aAAa,EAAEC,aAAa,CACxC,CAAC;EAED,OAAO;IACNY,GAAG,EAAEhB,gBAAgB;IACrBU,KAAK;IACLf,QAAQ,EAAEgB;EACX,CAAC;AACF,CAAC,CAAC;AAEH,MAAMG,MAAM,GAAGjC,UAAU,CAACoC,MAAM,CAAC;EAChCF,SAAS,EAAE;IAAEG,IAAI,EAAE;EAAE;AACtB,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["useMemo","StyleSheet","Animated","createProvider","useDescriptorsStore","useInterpolatedStylesMap","useMaybeBlockVisibility","useResolvedStylesMap","jsx","_jsx","NO_PARENT_SCREEN_KEY","useAreAnyBlockingVisibility","parentScreenKey","store","derivations","useScreenSlots","visibilityBlocked","ScreenSlotProvider","useScreenSlotStore","guarded","global","children","useParentStore","ancestorStylesMap","parentContext","slotsMap","currentScreenKey","ancestorVisibilityBlocked","animatedStyle","animatedProps","interpolatorReady","localStylesMaps","enabled","value","content","View","style","styles","container","key","create","flex"],"sourceRoot":"../../../../../../src","sources":["shared/providers/screen/styles/slot.provider.tsx"],"mappings":";;AAAA,SAAyBA,OAAO,QAAQ,OAAO;AAC/C,SAASC,UAAU,QAAQ,cAAc;AACzC,OAAOC,QAAQ,MAA4B,yBAAyB;AAMpE,OAAOC,cAAc,MAAM,gCAAgC;AAC3D,SAASC,mBAAmB,QAAQ,gBAAgB;AACpD,SAASC,wBAAwB,QAAQ,qCAAqC;AAC9E,SAASC,uBAAuB,QAAQ,oCAAoC;AAC5E,SAASC,oBAAoB,QAAQ,qCAAqC;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAoB3E,MAAMC,oBAAoB,GAAG,sBAAsB;AAEnD,OAAO,MAAMC,2BAA2B,GAAGA,CAAA,KAAM;EAChD,MAAMC,eAAe,GAAGR,mBAAmB,CACzCS,KAAK,IAAKA,KAAK,CAACC,WAA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AE5BA;EAAQ,CACK,CACf,EACD,CAACA,QAAQ,EAAEO,aAAa,EAAEC,aAAa,CACxC,CAAC;EAED,OAAO;IACNU,GAAG,EAAEb,gBAAgB;IACrBO,KAAK;IACLZ,QAAQ,EAAEa;EACX,CAAC;AACF,CAAC,CAAC;AAEH,MAAMG,MAAM,GAAGpC,UAAU,CAACuC,MAAM,CAAC;EAChCF,SAAS,EAAE;IAAEG,IAAI,EAAE;EAAE;AACtB,CAAC,CAAC","ignoreList":[]}
@@ -96,6 +96,15 @@ export const ensurePairSourceRequests = (state, pairKey) => {
96
96
  }
97
97
  return pair.sourceRequests;
98
98
  };
99
+ export const ensurePairDestinationRequests = (state, pairKey) => {
100
+ "worklet";
101
+
102
+ const pair = ensurePairState(state, pairKey);
103
+ if (!pair.destinationRequests) {
104
+ pair.destinationRequests = {};
105
+ }
106
+ return pair.destinationRequests;
107
+ };
99
108
  export const removePairLink = (state, pairKey, linkKey) => {
100
109
  "worklet";
101
110
 
@@ -1 +1 @@
1
- {"version":3,"names":["PAIR_SEPARATOR","createScreenPairKey","sourceScreenKey","destinationScreenKey","createPendingPairKey","getSourceScreenKeyFromPairKey","pairKey","separatorIndex","indexOf","slice","getDestinationScreenKeyFromPairKey","length","isScreenPairKeyForScreen","screenKey","startsWith","endsWith","getLinkKeyFromTag","tag","getGroupKeyFromTag","createGroupTag","group","linkKey","createBoundTag","ensurePairState","state","links","groups","ensurePairLinks","ensurePairGroups","ensurePairSourceRequests","pair","sourceRequests","removePairLink","key","getLink","getSource","source","getDestination","destination","getActiveGroupId","activeId"],"sourceRoot":"../../../../../../src","sources":["shared/stores/bounds/helpers/link-pairs.helpers.ts"],"mappings":";;AAYA,MAAMA,cAAc,GAAG,IAAI;AAE3B,OAAO,MAAMC,mBAAmB,GAAGA,CAClCC,eAA8C,EAC9CC,oBAAwD,KACrC;EACnB,SAAS;;EACT,OAAO,GAAGD,eAAe,GAAGF,cAAc,GAAGG,oBAAoB,EAAE;AACpE,CAAC;AAED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C,SAAS;;EACT,OAAOa,OAAO,CAACV,KAAK,EAAElB,OAAO,EAAEe,OAAO,CAAC,EAAEiB,WAAW,IAAI,IAAI;AAC7D,CAAC;AAED,OAAO,MAAMC,gBAAgB,GAAGA,CAC/Bf,KAAqB,EACrBlB,OAAsB,EACtBc,KAAe,KACK;EACpB,SAAS;;EACT,OAAOI,KAAK,CAAClB,OAAO,CAAC,EAAEoB,MAAM,GAAGN,KAAK,CAAC,EAAEoB,QAAQ,IAAI,IAAI;AACzD,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["PAIR_SEPARATOR","createScreenPairKey","sourceScreenKey","destinationScreenKey","createPendingPairKey","getSourceScreenKeyFromPairKey","pairKey","separatorIndex","indexOf","slice","getDestinationScreenKeyFromPairKey","length","isScreenPairKeyForScreen","screenKey","startsWith","endsWith","getLinkKeyFromTag","tag","getGroupKeyFromTag","createGroupTag","group","linkKey","createBoundTag","ensurePairState","state","links","groups","ensurePairLinks","ensurePairGroups","ensurePairSourceRequests","pair","sourceRequests","ensurePairDestinationRequests","destinationRequests","removePairLink","key","getLink","getSource","source","getDestination","destination","getActiveGroupId","activeId"],"sourceRoot":"../../../../../../src","sources":["shared/stores/bounds/helpers/link-pairs.helpers.ts"],"mappings":";;AAYA,MAAMA,cAAc,GAAG,IAAI;AAE3B,OAAO,MAAMC,mBAAmB,GAAGA,CAClCC,eAA8C,EAC9CC,oBAAwD,KACrC;EACnB,SAAS;;EACT,OAAO,GAAGD,eAAe,GAAGF,cAAc,GAAGG,oBAAoB,EAAE;AACpE,CAAC;AAED,OAAO,MAAMC,oBAAoB,GAChCF,eAA8C,IAC3B;EACnB,SAAS;;EACT,OAAOD,mBAAmB,CAACC,eAAe,EAAE,EAAE,CAAC;AAChD,CAAC;AAED,OAAO,MAAMG,6BAA6B,GACzCC,OAAsB,IACa;EACnC,SAAS;;EACT,MAAMC,cAAc,GAAGD,OAAO,CAACE,OAAO,CAACR,cAAc,CAAC;EACtD,IAAIO,cAAc,KAAK,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OAAsB,EACtBe,OAAgB,KACmB;EACnC,SAAS;;EACT,OAAOe,OAAO,CAACZ,KAAK,EAAElB,OAAO,EAAEe,OAAO,CAAC,EAAEmB,WAAW,IAAI,IAAI;AAC7D,CAAC;AAED,OAAO,MAAMC,gBAAgB,GAAGA,CAC/BjB,KAAqB,EACrBlB,OAAsB,EACtBc,KAAe,KACK;EACpB,SAAS;;EACT,OAAOI,KAAK,CAAClB,OAAO,CAAC,EAAEoB,MAAM,GAAGN,KAAK,CAAC,EAAEsB,QAAQ,IAAI,IAAI;AACzD,CAAC","ignoreList":[]}
@@ -2,7 +2,7 @@
2
2
 
3
3
  import { hasAnyKeys } from "../helpers/keys";
4
4
  import { isScreenPairKeyForScreen } from "../helpers/link-pairs.helpers";
5
- import { boundaryRegistry, pairs } from "./state";
5
+ import { boundaryRegistry, boundsScreens, pairs } from "./state";
6
6
  function clear(screenKey) {
7
7
  "worklet";
8
8
 
@@ -28,6 +28,12 @@ function clear(screenKey) {
28
28
  }
29
29
  return state;
30
30
  });
31
+ boundsScreens.modify(state => {
32
+ "worklet";
33
+
34
+ delete state[screenKey];
35
+ return state;
36
+ });
31
37
  }
32
38
  export { clear };
33
39
  //# sourceMappingURL=clear.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["hasAnyKeys","isScreenPairKeyForScreen","boundaryRegistry","pairs","clear","screenKey","modify","state","tag","tagState","screens","pairKey"],"sourceRoot":"../../../../../../src","sources":["shared/stores/bounds/internals/clear.ts"],"mappings":";;AAAA,SAASA,UAAU,QAAQ,iBAAiB;AAC5C,SAASC,wBAAwB,QAAQ,+BAA+B;AAExE,SAAoCC,gBAAgB,EAAEC,KAAK,QAAQ,SAAS;AAE5E,SAASC,KAAKA,CAACC,SAAoB,EAAE;EACpC,SAAS;;EAETH,gBAAgB,CAACI,MAAM,CAAkCC,KAAQ,IAAQ;IACxE,SAAS;;IACT,KAAK,MAAMC,GAAG,IAAID,KAAK,EAAE;MACxB,MAAME,QAAQ,GAAGF,KAAK,CAACC,GAAG,CAAC;MAC3B,OAAOC,QAAQ,CAACC,OAAO,CAACL,SAAS,CAAC;MAElC,IAAI,CAACL,UAAU,CAACS,QAAQ,CAACC,OAAO,CAAC,EAAE;QAClC,OAAOH,KAAK,CAACC,GAAG,CAAC;MAClB;IACD;IAEA,OAAOD,KAAK;EACb,CAAC,CAAC;EAEFJ,KAAK,CAACG,MAAM,CAA4BC,KAAQ,IAAQ;IACvD,SAAS;;IACT,KAAK,MAAMI,OAAO,IAAIJ,KAAK,EAAE;MAC5B,IAAIN,wBAAwB,CAACU,OAAO,EAAEN,SAAS,CAAC,EAAE;QACjD,OAAOE,KAAK,CAACI,OAAO,CAAC;MACtB;IACD;IAEA,OAAOJ,KAAK;EACb,CAAC,CAAC;AACH;AAEA,SAASH,KAAK","ignoreList":[]}
1
+ {"version":3,"names":["hasAnyKeys","isScreenPairKeyForScreen","boundaryRegistry","boundsScreens","pairs","clear","screenKey","modify","state","tag","tagState","screens","pairKey"],"sourceRoot":"../../../../../../src","sources":["shared/stores/bounds/internals/clear.ts"],"mappings":";;AAAA,SAASA,UAAU,QAAQ,iBAAiB;AAC5C,SAASC,wBAAwB,QAAQ,+BAA+B;AAExE,SAECC,gBAAgB,EAChBC,aAAa,EACbC,KAAK,QACC,SAAS;AAEhB,SAASC,KAAKA,CAACC,SAAoB,EAAE;EACpC,SAAS;;EAETJ,gBAAgB,CAACK,MAAM,CAAkCC,KAAQ,IAAQ;IACxE,SAAS;;IACT,KAAK,MAAMC,GAAG,IAAID,KAAK,EAAE;MACxB,MAAME,QAAQ,GAAGF,KAAK,CAACC,GAAG,CAAC;MAC3B,OAAOC,QAAQ,CAACC,OAAO,CAACL,SAAS,CAAC;MAElC,IAAI,CAACN,UAAU,CAACU,QAAQ,CAACC,OAAO,CAAC,EAAE;QAClC,OAAOH,KAAK,CAACC,GAAG,CAAC;MAClB;IACD;IAEA,OAAOD,KAAK;EACb,CAAC,CAAC;EAEFJ,KAAK,CAACG,MAAM,CAA4BC,KAAQ,IAAQ;IACvD,SAAS;;IACT,KAAK,MAAMI,OAAO,IAAIJ,KAAK,EAAE;MAC5B,IAAIP,wBAAwB,CAACW,OAAO,EAAEN,SAAS,CAAC,EAAE;QACjD,OAAOE,KAAK,CAACI,OAAO,CAAC;MACtB;IACD;IAEA,OAAOJ,KAAK;EACb,CAAC,CAAC;EAEFL,aAAa,CAACI,MAAM,CAAEC,KAAK,IAAK;IAC/B,SAAS;;IACT,OAAOA,KAAK,CAACF,SAAS,CAAC;IACvB,OAAOE,KAAK;EACb,CAAC,CAAC;AACH;AAEA,SAASH,KAAK","ignoreList":[]}
@@ -0,0 +1,286 @@
1
+ "use strict";
2
+
3
+ import { ensurePairDestinationRequests, ensurePairGroups, ensurePairLinks, ensurePairSourceRequests, getDestinationScreenKeyFromPairKey, getGroupKeyFromTag, getLinkKeyFromTag, getSourceScreenKeyFromPairKey } from "../helpers/link-pairs.helpers";
4
+ import { removeEntry, setEntry } from "./entries";
5
+ import { registerBoundsScreen, screenBelongsToScope, unregisterBoundsScreen } from "./screen-graph";
6
+ import { boundaryRegistry, boundsScreens, pairs } from "./state";
7
+ const getRequestedLinkKey = (state, pairKey, tag) => {
8
+ "worklet";
9
+
10
+ const requestedLinkKey = getLinkKeyFromTag(tag);
11
+ const group = getGroupKeyFromTag(tag);
12
+ return group ? state[pairKey]?.groups[group]?.activeId ?? requestedLinkKey : requestedLinkKey;
13
+ };
14
+ const getConcreteTag = (state, pairKey, tag) => {
15
+ "worklet";
16
+
17
+ const group = getGroupKeyFromTag(tag);
18
+ const linkKey = getRequestedLinkKey(state, pairKey, tag);
19
+ return group ? `${group}:${linkKey}` : linkKey;
20
+ };
21
+ const hasRegisteredDestination = (pairKey, tag) => {
22
+ "worklet";
23
+
24
+ const destinationRoot = getDestinationScreenKeyFromPairKey(pairKey);
25
+ if (!destinationRoot) return false;
26
+ const screens = boundaryRegistry.get()[tag]?.screens;
27
+ for (const screenKey in screens) {
28
+ if (screenBelongsToScope(screenKey, destinationRoot)) return true;
29
+ }
30
+ return false;
31
+ };
32
+ const hasRegisteredSource = (pairKey, tag) => {
33
+ "worklet";
34
+
35
+ const sourceRoot = getSourceScreenKeyFromPairKey(pairKey);
36
+ const screens = boundaryRegistry.get()[tag]?.screens;
37
+ for (const screenKey in screens) {
38
+ if (screenBelongsToScope(screenKey, sourceRoot)) return true;
39
+ }
40
+ return false;
41
+ };
42
+ const claimDestinationBlock = (pairKey, tag) => {
43
+ "worklet";
44
+
45
+ const state = pairs.get();
46
+ const linkKey = getRequestedLinkKey(state, pairKey, tag);
47
+ const pair = state[pairKey];
48
+ if (!pair?.destinationRequests?.[linkKey] || pair.blockedDestinations?.[linkKey]) {
49
+ return;
50
+ }
51
+ const concreteTag = getConcreteTag(state, pairKey, tag);
52
+ if (!hasRegisteredSource(pairKey, concreteTag) || !hasRegisteredDestination(pairKey, concreteTag)) {
53
+ return;
54
+ }
55
+ const destinationRoot = getDestinationScreenKeyFromPairKey(pairKey);
56
+ const destinationScreen = boundsScreens.get()[destinationRoot];
57
+ if (!destinationScreen || destinationScreen.animationProgress.get() > 0) {
58
+ return;
59
+ }
60
+ destinationScreen.pendingLifecycleStartBlockCount.modify(count => {
61
+ "worklet";
62
+
63
+ return count + 1;
64
+ });
65
+ pairs.modify(current => {
66
+ "worklet";
67
+
68
+ const currentPair = current[pairKey];
69
+ if (!currentPair) return current;
70
+ if (!currentPair.blockedDestinations) {
71
+ currentPair.blockedDestinations = {};
72
+ }
73
+ currentPair.blockedDestinations[linkKey] = true;
74
+ return current;
75
+ });
76
+ };
77
+ const releaseDestinationBlock = (pairKey, linkKey) => {
78
+ "worklet";
79
+
80
+ const pair = pairs.get()[pairKey];
81
+ if (!pair?.blockedDestinations?.[linkKey]) return;
82
+ const destinationRoot = getDestinationScreenKeyFromPairKey(pairKey);
83
+ const destinationScreen = boundsScreens.get()[destinationRoot];
84
+ destinationScreen?.pendingLifecycleStartBlockCount.modify(count => {
85
+ "worklet";
86
+
87
+ return Math.max(0, count - 1);
88
+ });
89
+ pairs.modify(state => {
90
+ "worklet";
91
+
92
+ delete state[pairKey]?.blockedDestinations?.[linkKey];
93
+ return state;
94
+ });
95
+ };
96
+ const releaseDestinationBlockWhenReady = (pairKey, linkKey) => {
97
+ "worklet";
98
+
99
+ const pair = pairs.get()[pairKey];
100
+ const link = pair?.links[linkKey];
101
+ if (!link?.source || !link.destination) return;
102
+ if (link.source.escapeClipping && !pair.portalReadySources?.[linkKey]) return;
103
+ releaseDestinationBlock(pairKey, linkKey);
104
+ };
105
+ export function registerScreen(params) {
106
+ "worklet";
107
+
108
+ const node = {
109
+ parentScreenKey: params.parentScreenKey,
110
+ animationProgress: params.animationProgress,
111
+ pendingLifecycleStartBlockCount: params.pendingLifecycleStartBlockCount
112
+ };
113
+ registerBoundsScreen(params.screenKey, node);
114
+ const state = pairs.get();
115
+ for (const pairKey in state) {
116
+ const requests = state[pairKey]?.destinationRequests;
117
+ for (const linkKey in requests) {
118
+ claimDestinationBlock(pairKey, linkKey);
119
+ }
120
+ }
121
+ }
122
+ export function unregisterScreen(screenKey) {
123
+ "worklet";
124
+
125
+ unregisterBoundsScreen(screenKey);
126
+ }
127
+ export function registerBoundary({
128
+ boundTag,
129
+ screenKey,
130
+ entry
131
+ }) {
132
+ "worklet";
133
+
134
+ setEntry(boundTag.tag, screenKey, entry);
135
+ const state = pairs.get();
136
+ for (const pairKey in state) {
137
+ const linkKey = getRequestedLinkKey(state, pairKey, boundTag.tag);
138
+ if (state[pairKey]?.destinationRequests?.[linkKey]) {
139
+ claimDestinationBlock(pairKey, boundTag.tag);
140
+ }
141
+ }
142
+ }
143
+ export function unregisterBoundary(boundTag, screenKey) {
144
+ "worklet";
145
+
146
+ removeEntry(boundTag.tag, screenKey);
147
+ if (!boundsScreens.get()[screenKey]) return;
148
+ const state = pairs.get();
149
+ for (const pairKey in state) {
150
+ const concreteTag = getConcreteTag(state, pairKey, boundTag.tag);
151
+ const type = screenBelongsToScope(screenKey, getSourceScreenKeyFromPairKey(pairKey)) && !hasRegisteredSource(pairKey, concreteTag) ? "source" : screenBelongsToScope(screenKey, getDestinationScreenKeyFromPairKey(pairKey)) && !hasRegisteredDestination(pairKey, concreteTag) ? "destination" : null;
152
+ if (!type) continue;
153
+ abandonBoundaryMeasurement({
154
+ type,
155
+ pairKey,
156
+ tag: getRequestedLinkKey(state, pairKey, boundTag.tag)
157
+ });
158
+ }
159
+ }
160
+ export function requestBoundaryMeasurements({
161
+ pairKey,
162
+ tag,
163
+ destination,
164
+ refresh
165
+ }) {
166
+ "worklet";
167
+
168
+ const requestedLinkKey = getLinkKeyFromTag(tag);
169
+ const group = getGroupKeyFromTag(tag);
170
+ const previousActiveId = group ? pairs.get()[pairKey]?.groups[group]?.activeId : undefined;
171
+ if (previousActiveId && previousActiveId !== requestedLinkKey) {
172
+ releaseDestinationBlock(pairKey, previousActiveId);
173
+ }
174
+ pairs.modify(state => {
175
+ "worklet";
176
+
177
+ const groups = ensurePairGroups(state, pairKey);
178
+ if (group && groups[group]?.activeId !== requestedLinkKey) {
179
+ groups[group] = {
180
+ activeId: requestedLinkKey,
181
+ initialId: groups[group]?.initialId ?? requestedLinkKey
182
+ };
183
+ if (previousActiveId) {
184
+ delete state[pairKey]?.sourceRequests?.[previousActiveId];
185
+ delete state[pairKey]?.destinationRequests?.[previousActiveId];
186
+ }
187
+ }
188
+ const linkKey = getRequestedLinkKey(state, pairKey, tag);
189
+ const pair = state[pairKey];
190
+ const link = ensurePairLinks(state, pairKey)[linkKey];
191
+ const refreshing = !!pair?.refreshingLinks?.[linkKey];
192
+ const startsRefresh = refresh && !refreshing;
193
+ if (!pair.refreshingLinks) pair.refreshingLinks = {};
194
+ if (refresh) {
195
+ pair.refreshingLinks[linkKey] = true;
196
+ } else {
197
+ delete pair.refreshingLinks[linkKey];
198
+ }
199
+ if (!link?.source || startsRefresh) {
200
+ ensurePairSourceRequests(state, pairKey)[linkKey] = true;
201
+ delete pair.portalReadySources?.[linkKey];
202
+ }
203
+ if (destination) {
204
+ if (group) {
205
+ if (!pair.destinationGroupDemands) pair.destinationGroupDemands = {};
206
+ pair.destinationGroupDemands[group] = true;
207
+ } else {
208
+ if (!pair.destinationLinkDemands) pair.destinationLinkDemands = {};
209
+ pair.destinationLinkDemands[linkKey] = true;
210
+ }
211
+ if (!link?.destination || startsRefresh) {
212
+ ensurePairDestinationRequests(state, pairKey)[linkKey] = true;
213
+ }
214
+ }
215
+ return state;
216
+ });
217
+ if (destination) claimDestinationBlock(pairKey, tag);
218
+ }
219
+ export function getBoundaryMeasurementRequest(tag, screenKey, state = pairs.get()) {
220
+ "worklet";
221
+
222
+ const linkKey = getLinkKeyFromTag(tag);
223
+ const group = getGroupKeyFromTag(tag);
224
+ let match = null;
225
+ for (const pairKey in state) {
226
+ const pair = state[pairKey];
227
+ if (group && pair?.groups[group]?.activeId !== linkKey) continue;
228
+ const sourceRoot = getSourceScreenKeyFromPairKey(pairKey);
229
+ if (pair?.sourceRequests?.[linkKey] && screenBelongsToScope(screenKey, sourceRoot)) {
230
+ match = {
231
+ type: "source",
232
+ pairKey
233
+ };
234
+ }
235
+ const destinationRoot = getDestinationScreenKeyFromPairKey(pairKey);
236
+ if (pair?.destinationRequests?.[linkKey] && destinationRoot && screenBelongsToScope(screenKey, destinationRoot)) {
237
+ match = {
238
+ type: "destination",
239
+ pairKey
240
+ };
241
+ }
242
+ }
243
+ return match;
244
+ }
245
+ export function completeBoundaryMeasurement(target, tag) {
246
+ "worklet";
247
+
248
+ const linkKey = getLinkKeyFromTag(tag);
249
+ releaseDestinationBlockWhenReady(target.pairKey, linkKey);
250
+ }
251
+ export function markBoundaryPortalReady(pairKey, tag) {
252
+ "worklet";
253
+
254
+ const linkKey = getLinkKeyFromTag(tag);
255
+ pairs.modify(state => {
256
+ "worklet";
257
+
258
+ const pair = state[pairKey];
259
+ if (!pair) return state;
260
+ if (!pair.portalReadySources) pair.portalReadySources = {};
261
+ pair.portalReadySources[linkKey] = true;
262
+ return state;
263
+ });
264
+ releaseDestinationBlockWhenReady(pairKey, linkKey);
265
+ }
266
+ export function abandonBoundaryMeasurement(params) {
267
+ "worklet";
268
+
269
+ const linkKey = getLinkKeyFromTag(params.tag);
270
+ const pair = pairs.get()[params.pairKey];
271
+ const hasPendingRequest = params.type === "source" ? !!pair?.sourceRequests?.[linkKey] : !!pair?.destinationRequests?.[linkKey];
272
+ const hasDestinationBlock = !!pair?.blockedDestinations?.[linkKey];
273
+ if (!hasPendingRequest && !hasDestinationBlock) return;
274
+ pairs.modify(state => {
275
+ "worklet";
276
+
277
+ if (params.type === "source") {
278
+ delete state[params.pairKey]?.sourceRequests?.[linkKey];
279
+ } else {
280
+ delete state[params.pairKey]?.destinationRequests?.[linkKey];
281
+ }
282
+ return state;
283
+ });
284
+ releaseDestinationBlock(params.pairKey, linkKey);
285
+ }
286
+ //# sourceMappingURL=coordinator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["ensurePairDestinationRequests","ensurePairGroups","ensurePairLinks","ensurePairSourceRequests","getDestinationScreenKeyFromPairKey","getGroupKeyFromTag","getLinkKeyFromTag","getSourceScreenKeyFromPairKey","removeEntry","setEntry","registerBoundsScreen","screenBelongsToScope","unregisterBoundsScreen","boundaryRegistry","boundsScreens","pairs","getRequestedLinkKey","state","pairKey","tag","requestedLinkKey","group","groups","activeId","getConcreteTag","linkKey","hasRegisteredDestination","destinationRoot","screens","get","screenKey","hasRegisteredSource","sourceRoot","claimDestinationBlock","pair","destinationRequests","blockedDestinations","concreteTag","destinationScreen","animationProgress","pendingLifecycleStartBlockCount","modify","count","current","currentPair","releaseDestinationBlock","Math","max","releaseDestinationBlockWhenReady","link","links","source","destination","escapeClipping","portalReadySources","registerScreen","params","node","parentScreenKey","requests","unregisterScreen","registerBoundary","boundTag","entry","unregisterBoundary","type","abandonBoundaryMeasurement","requestBoundaryMeasurements","refresh","previousActiveId","undefined","initialId","sourceRequests","refreshing","refreshingLinks","startsRefresh","destinationGroupDemands","destinationLinkDemands","getBoundaryMeasurementRequest","match","completeBoundaryMeasurement","target","markBoundaryPortalReady","hasPendingRequest","hasDestinationBlock"],"sourceRoot":"../../../../../../src","sources":["shared/stores/bounds/internals/coordinator.ts"],"mappings":";;AACA,SACCA,6BAA6B,EAC7BC,gBAAgB,EAChBC,eAAe,EACfC,wBAAwB,EACxBC,kCAAkC,EAClCC,kBAAkB,EAClBC,iBAAiB,EACjBC,6BAA6B,QACvB,+BAA+B;AAWtC,SAASC,WAAW,EAAEC,QAAQ,QAAQ,WAAW;AACjD,SACCC,oBAAoB,EACpBC,oBAAoB,EACpBC,sBAAsB,QAChB,gBAAgB;AACvB,SAASC,gBAAgB,EAAEC,aAAa,EAAEC,KAAK,QAAQ,SAAS;AA2BhE,MAAMC,mBAAmB,GAAGA,CAC3BC,KAAqB,EACrBC,OAAsB,EACtBC,GAAU,KACG;EACb,SAAS;;EACT,MAAMC,gBAAgB,GAAGd,iBAAiB,CAACa,GAAG,CAAC;EAC/C,MAAME,KAAK,GAAGhB,kBAAkB,CAACc,GAAG,CAAC;EACrC,OAAOE,KAAK,GACRJ,KAAK,CAACC,OAAO,CAAC,EAAEI,MAAM,CAACD,KAAK,CAAC,EAAEE,QAAQ,IAAIH,gBAAgB,GAC5DA,gBAAgB;AACpB,CAAC;AAED,MAAMI,cAAc,GAAGA,CACtBP,KAAqB,EACrBC,OAAsB,EACtBC,GAAU,KACC;EACX,SAAS;;EACT,MAAME,KAAK,GAAGhB,kBAAkB,CAACc,GAAG,CAAC;EACrC,MAAMM,OAAO,GAAGT,mBAAmB,CAACC,KAAK,EAAEC,OAAO,EAAEC,GAAG,CAAC;EACxD,OAAOE,KAAK,GAAG,GAAGA,KAAK,IAAII,OAAO,EAAE,GAAGA,OAAO;AAC/C,CAAC;AAED,MAAMC,wBAAwB,GAAGA,CAChCR,OAAsB,EACtBC,GAAU,KACG;EACb,SAAS;;EACT,MAAMQ,eAAe,GAAGvB,kCAAkC,CAACc,OAAO,CAAC;EACnE,IAAI,CAACS,e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,mBAAmB,GAAGV,OAAO,CAAC;EAC1C,MAAM2D,mBAAmB,GAAG,CAAC,CAAClD,IAAI,EAAEE,mBAAmB,GAAGX,OAAO,CAAC;EAClE,IAAI,CAAC0D,iBAAiB,IAAI,CAACC,mBAAmB,EAAE;EAEhDrE,KAAK,CAAC0B,MAAM,CAA4BxB,KAAQ,IAAQ;IACvD,SAAS;;IACT,IAAIuC,MAAM,CAACS,IAAI,KAAK,QAAQ,EAAE;MAC7B,OAAOhD,KAAK,CAACuC,MAAM,CAACtC,OAAO,CAAC,EAAEsD,cAAc,GAAG/C,OAAO,CAAC;IACxD,CAAC,MAAM;MACN,OAAOR,KAAK,CAACuC,MAAM,CAACtC,OAAO,CAAC,EAAEiB,mBAAmB,GAAGV,OAAO,CAAC;IAC7D;IACA,OAAOR,KAAK;EACb,CAAC,CAAC;EAEF4B,uBAAuB,CAACW,MAAM,CAACtC,OAAO,EAAEO,OAAO,CAAC;AACjD","ignoreList":[]}
@@ -54,32 +54,6 @@ function getEntry(tag, key) {
54
54
 
55
55
  return boundaryRegistry.get()[tag]?.screens[key] ?? null;
56
56
  }
57
- function getMatchingSourceScreenKey(tag, destinationScreenKey, preferredScreenKey, excludedScreenKeys) {
58
- "worklet";
59
-
60
- const screens = boundaryRegistry.get()[tag]?.screens;
61
- if (!screens) return null;
62
- const isExcluded = screenKey => {
63
- "worklet";
64
-
65
- for (let index = 0; index < (excludedScreenKeys?.length ?? 0); index++) {
66
- if (excludedScreenKeys?.[index] === screenKey) {
67
- return true;
68
- }
69
- }
70
- return false;
71
- };
72
- if (preferredScreenKey && preferredScreenKey !== destinationScreenKey && !isExcluded(preferredScreenKey) && screens[preferredScreenKey]) {
73
- return preferredScreenKey;
74
- }
75
- let latestScreenKey = null;
76
- for (const screenKey in screens) {
77
- if (screenKey !== destinationScreenKey && !isExcluded(screenKey)) {
78
- latestScreenKey = screenKey;
79
- }
80
- }
81
- return latestScreenKey;
82
- }
83
57
  function setEntry(tag, screenKey, patch) {
84
58
  "worklet";
85
59
 
@@ -108,5 +82,5 @@ function removeEntry(tag, screenKey) {
108
82
  return state;
109
83
  });
110
84
  }
111
- export { getEntry, getMatchingSourceScreenKey, removeEntry, setEntry };
85
+ export { getEntry, removeEntry, setEntry };
112
86
  //# sourceMappingURL=entries.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["hasAnyKeys","boundaryRegistry","ensureBoundaryState","state","tag","screens","ensureScreenEntry","screenKey","tagState","bounds","styles","applyEntryPatch","entry","patch","undefined","boundaryConfig","handoff","escapeClipping","getEntry","key","get","getMatchingSourceScreenKey","destinationScreenKey","preferredScreenKey","excludedScreenKeys","isExcluded","index","length","latestScreenKey","setEntry","modify","removeEntry"],"sourceRoot":"../../../../../../src","sources":["shared/stores/bounds/internals/entries.ts"],"mappings":";;AAAA,SAASA,UAAU,QAAQ,iBAAiB;AAE5C,SAAoCC,gBAAgB,QAAQ,SAAS;AAErE,MAAMC,mBAAmB,GAAGA,CAACC,KAA2B,EAAEC,GAAU,KAAK;EACxE,SAAS;;EACT,IAAI,CAACD,KAAK,CAACC,GAAG,CAAC,EAAE;IAChBD,KAAK,CAACC,GAAG,CAAC,GAAG;MACZC,OAAO,EAAE,CAAC;IACX,CAAC;EACF;EACA,OAAOF,KAAK,CAACC,GAAG,CAAC;AAClB,CAAC;AAED,MAAME,iBAAiB,GAAGA,CACzBH,KAA2B,EAC3BC,GAAU,EACVG,SAAoB,KACT;EACX,SAAS;;EACT,MAAMC,QAAQ,GAAGN,mBAAmB,CAACC,KAAK,EAAEC,GAAG,CAAC;EAChD,IAAI,CAACI,QAAQ,CAACH,OAAO,CAACE,SAAS,CAAC,EAAE;IACjCC,QAAQ,CAACH,OAAO,CAACE,SAAS,CAAC,GAAG;MAC7BE,MAAM,EAAE,IAAI;MACZC,MAAM,EAAE,CAAC;IACV,CAAC;EACF;EACA,OAAOF,QAAQ,CAACH,OAAO,CAACE,SAAS,CAAC;AACnC,CAAC;AAED,MAAMI,eAAe,GAAGA,CAAC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AMK,QAAQ,GAAGL,KAAK,CAACC,GAAG,CAAC;IAC3B,IAAI,CAACI,QAAQ,EAAEH,OAAO,CAACE,SAAS,CAAC,EAAE;MAClC,OAAOJ,KAAK;IACb;IAEA,OAAOK,QAAQ,CAACH,OAAO,CAACE,SAAS,CAAC;IAClC,IAAI,CAACP,UAAU,CAACQ,QAAQ,CAACH,OAAO,CAAC,EAAE;MAClC,OAAOF,KAAK,CAACC,GAAG,CAAC;IAClB;IAEA,OAAOD,KAAK;EACb,CAAC,CAAC;AACH;AAEA,SAASe,QAAQ,EAAEG,0BAA0B,EAAEU,WAAW,EAAEF,QAAQ","ignoreList":[]}
1
+ {"version":3,"names":["hasAnyKeys","boundaryRegistry","ensureBoundaryState","state","tag","screens","ensureScreenEntry","screenKey","tagState","bounds","styles","applyEntryPatch","entry","patch","undefined","boundaryConfig","handoff","escapeClipping","getEntry","key","get","setEntry","modify","removeEntry"],"sourceRoot":"../../../../../../src","sources":["shared/stores/bounds/internals/entries.ts"],"mappings":";;AAAA,SAASA,UAAU,QAAQ,iBAAiB;AAE5C,SAAoCC,gBAAgB,QAAQ,SAAS;AAErE,MAAMC,mBAAmB,GAAGA,CAACC,KAA2B,EAAEC,GAAU,KAAK;EACxE,SAAS;;EACT,IAAI,CAACD,KAAK,CAACC,GAAG,CAAC,EAAE;IAChBD,KAAK,CAACC,GAAG,CAAC,GAAG;MACZC,OAAO,EAAE,CAAC;IACX,CAAC;EACF;EACA,OAAOF,KAAK,CAACC,GAAG,CAAC;AAClB,CAAC;AAED,MAAME,iBAAiB,GAAGA,CACzBH,KAA2B,EAC3BC,GAAU,EACVG,SAAoB,KACT;EACX,SAAS;;EACT,MAAMC,QAAQ,GAAGN,mBAAmB,CAACC,KAAK,EAAEC,GAAG,CAAC;EAChD,IAAI,CAACI,QAAQ,CAACH,OAAO,CAACE,SAAS,CAAC,EAAE;IACjCC,QAAQ,CAACH,OAAO,CAACE,SAAS,CAAC,GAAG;MAC7BE,MAAM,EAAE,IA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QA,CAACjB,GAAU,EAAEG,SAAoB,EAAEM,KAAiB,EAAE;EACtE,SAAS;;EACTZ,gBAAgB,CAACqB,MAAM,CAAkCnB,KAAQ,IAAQ;IACxE,SAAS;;IACT,MAAMS,KAAK,GAAGN,iBAAiB,CAACH,KAAK,EAAEC,GAAG,EAAEG,SAAS,CAAC;IACtDI,eAAe,CAACC,KAAK,EAAEC,KAAK,CAAC;IAC7B,OAAOV,KAAK;EACb,CAAC,CAAC;AACH;AAEA,SAASoB,WAAWA,CAACnB,GAAU,EAAEG,SAAoB,EAAE;EACtD,SAAS;;EACTN,gBAAgB,CAACqB,MAAM,CAAkCnB,KAAQ,IAAQ;IACxE,SAAS;;IACT,MAAMK,QAAQ,GAAGL,KAAK,CAACC,GAAG,CAAC;IAC3B,IAAI,CAACI,QAAQ,EAAEH,OAAO,CAACE,SAAS,CAAC,EAAE;MAClC,OAAOJ,KAAK;IACb;IAEA,OAAOK,QAAQ,CAACH,OAAO,CAACE,SAAS,CAAC;IAClC,IAAI,CAACP,UAAU,CAACQ,QAAQ,CAACH,OAAO,CAAC,EAAE;MAClC,OAAOF,KAAK,CAACC,GAAG,CAAC;IAClB;IAEA,OAAOD,KAAK;EACb,CAAC,CAAC;AACH;AAEA,SAASe,QAAQ,EAAEK,WAAW,EAAEF,QAAQ","ignoreList":[]}
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
 
3
- import { createGroupTag, ensurePairGroups, ensurePairLinks, ensurePairSourceRequests, getDestinationScreenKeyFromPairKey, getGroupKeyFromTag, getLinkKeyFromTag, getActiveGroupId as getPairActiveGroupId, getDestination as getPairDestination, getLink as getPairLink, getSource as getPairSource, getSourceScreenKeyFromPairKey } from "../helpers/link-pairs.helpers";
3
+ import { createGroupTag, ensurePairGroups, ensurePairLinks, ensurePairSourceRequests, getDestinationScreenKeyFromPairKey, getGroupKeyFromTag, getLinkKeyFromTag, getActiveGroupId as getPairActiveGroupId, getDestination as getPairDestination, getLink as getPairLink, getSource as getPairSource } from "../helpers/link-pairs.helpers";
4
+ import { screenBelongsToScope } from "./screen-graph";
4
5
  import { pairs } from "./state";
5
6
  const syncLinkStatus = link => {
6
7
  "worklet";
@@ -196,31 +197,21 @@ function setDestination(pairKey, tag, screenKey, bounds, styles = {}, group, run
196
197
 
197
198
  const linkKey = getLinkKeyFromTag(tag);
198
199
  writeDestination(state, pairKey, linkKey, screenKey, bounds, styles, group, runtimeFlags);
200
+ delete state[pairKey]?.destinationRequests?.[linkKey];
199
201
  return state;
200
202
  });
201
203
  }
202
204
  function setActiveGroupId(pairKey, group, tag) {
203
205
  "worklet";
204
206
 
205
- pairs.modify(state => {
206
- "worklet";
207
-
208
- writeGroup(state, pairKey, group, getLinkKeyFromTag(tag));
209
- return state;
210
- });
211
- }
212
- function requestSourceMeasure(pairKey, tag) {
213
- "worklet";
214
-
215
207
  pairs.modify(state => {
216
208
  "worklet";
217
209
 
218
210
  const linkKey = getLinkKeyFromTag(tag);
219
- const link = getPairLink(state, pairKey, linkKey);
220
- if (link?.source || state[pairKey]?.sourceRequests?.[linkKey]) {
221
- return state;
211
+ writeGroup(state, pairKey, group, linkKey);
212
+ if (!getPairLink(state, pairKey, linkKey)?.source) {
213
+ ensurePairSourceRequests(state, pairKey)[linkKey] = true;
222
214
  }
223
- ensurePairSourceRequests(state, pairKey)[linkKey] = true;
224
215
  return state;
225
216
  });
226
217
  }
@@ -245,14 +236,16 @@ function getResolvedLink(pairKey, tag) {
245
236
  const state = pairs.get();
246
237
  const linkKey = getLinkKeyFromTag(tag);
247
238
  const group = getGroupKeyFromTag(tag);
248
- const link = getPairLink(state, pairKey, linkKey);
239
+ const activeId = group ? state[pairKey]?.groups?.[group]?.activeId : undefined;
240
+ const resolvedLinkKey = activeId ?? linkKey;
241
+ const link = getPairLink(state, pairKey, resolvedLinkKey);
249
242
 
250
243
  // Group active ids can update before the new member has a full source/destination
251
244
  // link. As soon as the requested member has source bounds, prefer it; only
252
245
  // fall back while the requested member has no source yet.
253
246
  if (!group || hasSourceLink(link)) {
254
247
  return {
255
- tag,
248
+ tag: group ? createGroupTag(group, resolvedLinkKey) : tag,
256
249
  link
257
250
  };
258
251
  }
@@ -271,26 +264,25 @@ function getResolvedLink(pairKey, tag) {
271
264
  link
272
265
  };
273
266
  }
274
- function getPairKeyForSource(tag, screenKey) {
267
+ function getPairKeyForDestination(tag, screenKey) {
275
268
  "worklet";
276
269
 
277
270
  const state = pairs.get();
278
- const linkKey = getLinkKeyFromTag(tag);
271
+ const group = getGroupKeyFromTag(tag);
279
272
  for (const pairKey in state) {
280
- if (getSourceScreenKeyFromPairKey(pairKey) !== screenKey) continue;
281
- if (getResolvedLink(pairKey, tag).link?.destination || state[pairKey]?.sourceRequests?.[linkKey]) {
273
+ const resolvedLink = getResolvedLink(pairKey, tag).link;
274
+ if (!resolvedLink) continue;
275
+ if (screenBelongsToScope(screenKey, getDestinationScreenKeyFromPairKey(pairKey)) || resolvedLink.destination?.screenKey === screenKey) {
282
276
  return pairKey;
283
277
  }
284
- }
285
- return null;
286
- }
287
- function getPairKeyForDestination(tag, screenKey) {
288
- "worklet";
289
-
290
- const state = pairs.get();
291
- for (const pairKey in state) {
292
- if (getDestinationScreenKeyFromPairKey(pairKey) !== screenKey) continue;
293
- if (getResolvedLink(pairKey, tag).link) return pairKey;
278
+ if (!group) continue;
279
+ const links = state[pairKey]?.links;
280
+ for (const linkKey in links) {
281
+ const link = links[linkKey];
282
+ if (link?.group === group && link.destination?.screenKey === screenKey) {
283
+ return pairKey;
284
+ }
285
+ }
294
286
  }
295
287
  return null;
296
288
  }
@@ -304,5 +296,5 @@ function getDestination(pairKey, tag) {
304
296
 
305
297
  return getPairDestination(pairs.get(), pairKey, getLinkKeyFromTag(tag));
306
298
  }
307
- export { getActiveGroupId, getDestination, getLink, getPairKeyForDestination, getPairKeyForSource, getResolvedLink, getSource, requestSourceMeasure, setActiveGroupId, setDestination, setSource };
299
+ export { getActiveGroupId, getDestination, getLink, getPairKeyForDestination, getResolvedLink, getSource, setActiveGroupId, setDestination, setSource };
308
300
  //# sourceMappingURL=links.js.map