@expo/ui 58.0.22 → 58.0.24

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 (234) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/android/build.gradle +2 -2
  3. package/android/src/main/java/expo/modules/ui/ComposeViews.kt +53 -29
  4. package/android/src/main/java/expo/modules/ui/ExpoUIModule.kt +6 -4
  5. package/android/src/main/java/expo/modules/ui/HostView.kt +85 -15
  6. package/android/src/main/java/expo/modules/ui/ModifierRegistry.kt +40 -12
  7. package/android/src/main/java/expo/modules/ui/RNHostView.kt +138 -2
  8. package/android/src/main/java/expo/modules/ui/SliderView.kt +5 -4
  9. package/android/src/main/java/expo/modules/ui/UniversalLayout.kt +610 -0
  10. package/android/src/main/java/expo/modules/ui/VerticalSliderView.kt +5 -4
  11. package/android/src/main/java/expo/modules/ui/state/ObservableState.kt +2 -0
  12. package/android/src/main/java/expo/modules/ui/state/WorkletCallback.kt +2 -0
  13. package/build/community/bottom-sheet/BottomSheet.android.js +2 -0
  14. package/build/community/bottom-sheet/BottomSheet.android.js.map +1 -1
  15. package/build/community/menu/MenuView.ios.js +2 -1
  16. package/build/community/menu/MenuView.ios.js.map +1 -1
  17. package/build/jetpack-compose/Column/index.d.ts +5 -0
  18. package/build/jetpack-compose/Column/index.js.map +1 -1
  19. package/build/jetpack-compose/Row/index.d.ts +5 -0
  20. package/build/jetpack-compose/Row/index.js.map +1 -1
  21. package/build/jetpack-compose/Text/index.js +5 -4
  22. package/build/jetpack-compose/Text/index.js.map +1 -1
  23. package/build/recycling/useRecycledRows.d.ts +2 -0
  24. package/build/recycling/useRecycledRows.js +1 -0
  25. package/build/recycling/useRecycledRows.js.map +1 -1
  26. package/build/swift-ui/ContentUnavailableView/index.d.ts +5 -0
  27. package/build/swift-ui/ContentUnavailableView/index.js +7 -2
  28. package/build/swift-ui/ContentUnavailableView/index.js.map +1 -1
  29. package/build/swift-ui/HStack/index.d.ts +6 -0
  30. package/build/swift-ui/HStack/index.js.map +1 -1
  31. package/build/swift-ui/RNHostView.d.ts +7 -1
  32. package/build/swift-ui/RNHostView.js +2 -1
  33. package/build/swift-ui/RNHostView.js.map +1 -1
  34. package/build/swift-ui/Text/index.js +2 -1
  35. package/build/swift-ui/Text/index.js.map +1 -1
  36. package/build/swift-ui/VStack/index.d.ts +6 -0
  37. package/build/swift-ui/VStack/index.js.map +1 -1
  38. package/build/swift-ui/modifiers/index.d.ts +18 -0
  39. package/build/swift-ui/modifiers/index.js +9 -0
  40. package/build/swift-ui/modifiers/index.js.map +1 -1
  41. package/build/universal/BottomSheet/index.android.js +5 -5
  42. package/build/universal/BottomSheet/index.android.js.map +1 -1
  43. package/build/universal/Button/index.android.js +3 -1
  44. package/build/universal/Button/index.android.js.map +1 -1
  45. package/build/universal/Button/index.ios.js +3 -1
  46. package/build/universal/Button/index.ios.js.map +1 -1
  47. package/build/universal/Collapsible/index.ios.js +1 -0
  48. package/build/universal/Collapsible/index.ios.js.map +1 -1
  49. package/build/universal/Column/index.android.js +4 -1
  50. package/build/universal/Column/index.android.js.map +1 -1
  51. package/build/universal/Column/index.ios.js +2 -0
  52. package/build/universal/Column/index.ios.js.map +1 -1
  53. package/build/universal/Column/index.js +13 -4
  54. package/build/universal/Column/index.js.map +1 -1
  55. package/build/universal/FieldGroup/FieldGroup.android.js +3 -1
  56. package/build/universal/FieldGroup/FieldGroup.android.js.map +1 -1
  57. package/build/universal/FieldGroup/FieldGroup.ios.js +3 -1
  58. package/build/universal/FieldGroup/FieldGroup.ios.js.map +1 -1
  59. package/build/universal/FieldGroup/FieldSection.android.js +13 -4
  60. package/build/universal/FieldGroup/FieldSection.android.js.map +1 -1
  61. package/build/universal/FieldGroup/FieldSection.ios.js +3 -1
  62. package/build/universal/FieldGroup/FieldSection.ios.js.map +1 -1
  63. package/build/universal/Icon/index.android.js +3 -1
  64. package/build/universal/Icon/index.android.js.map +1 -1
  65. package/build/universal/Icon/index.ios.js +3 -1
  66. package/build/universal/Icon/index.ios.js.map +1 -1
  67. package/build/universal/List/ListForEach.android.d.ts +7 -0
  68. package/build/universal/List/ListForEach.android.js +6 -0
  69. package/build/universal/List/ListForEach.android.js.map +1 -0
  70. package/build/universal/List/ListForEach.d.ts +5 -0
  71. package/build/universal/List/ListForEach.ios.d.ts +5 -0
  72. package/build/universal/List/ListForEach.ios.js +11 -0
  73. package/build/universal/List/ListForEach.ios.js.map +1 -0
  74. package/build/universal/List/ListForEach.js +263 -0
  75. package/build/universal/List/ListForEach.js.map +1 -0
  76. package/build/universal/List/ListScrollContext.d.ts +5 -0
  77. package/build/universal/List/ListScrollContext.js +6 -0
  78. package/build/universal/List/ListScrollContext.js.map +1 -0
  79. package/build/universal/List/index.android.d.ts +5 -0
  80. package/build/universal/List/index.android.js +3 -0
  81. package/build/universal/List/index.android.js.map +1 -1
  82. package/build/universal/List/index.d.ts +5 -0
  83. package/build/universal/List/index.ios.d.ts +5 -0
  84. package/build/universal/List/index.ios.js +3 -0
  85. package/build/universal/List/index.ios.js.map +1 -1
  86. package/build/universal/List/index.js +12 -1
  87. package/build/universal/List/index.js.map +1 -1
  88. package/build/universal/List/types.d.ts +42 -1
  89. package/build/universal/List/types.js +1 -3
  90. package/build/universal/List/types.js.map +1 -1
  91. package/build/universal/RNHostView/index.android.js +3 -1
  92. package/build/universal/RNHostView/index.android.js.map +1 -1
  93. package/build/universal/Row/index.android.js +4 -1
  94. package/build/universal/Row/index.android.js.map +1 -1
  95. package/build/universal/Row/index.ios.js +2 -0
  96. package/build/universal/Row/index.ios.js.map +1 -1
  97. package/build/universal/Row/index.js +13 -7
  98. package/build/universal/Row/index.js.map +1 -1
  99. package/build/universal/ScrollView/index.android.js +8 -1
  100. package/build/universal/ScrollView/index.android.js.map +1 -1
  101. package/build/universal/ScrollView/index.ios.js +3 -1
  102. package/build/universal/ScrollView/index.ios.js.map +1 -1
  103. package/build/universal/Spacer/index.android.js +3 -1
  104. package/build/universal/Spacer/index.android.js.map +1 -1
  105. package/build/universal/Spacer/index.ios.js +3 -1
  106. package/build/universal/Spacer/index.ios.js.map +1 -1
  107. package/build/universal/Text/index.android.js +3 -1
  108. package/build/universal/Text/index.android.js.map +1 -1
  109. package/build/universal/Text/index.ios.js +3 -1
  110. package/build/universal/Text/index.ios.js.map +1 -1
  111. package/build/universal/TextInput/index.android.js +22 -7
  112. package/build/universal/TextInput/index.android.js.map +1 -1
  113. package/build/universal/TextInput/index.ios.js +1 -0
  114. package/build/universal/TextInput/index.ios.js.map +1 -1
  115. package/build/universal/index.d.ts +1 -1
  116. package/build/universal/modifierUtils.d.ts +34 -1
  117. package/build/universal/modifierUtils.js +98 -2
  118. package/build/universal/modifierUtils.js.map +1 -1
  119. package/build/universal/stackAxis.d.ts +9 -0
  120. package/build/universal/stackAxis.js +11 -0
  121. package/build/universal/stackAxis.js.map +1 -0
  122. package/build/universal/transformStyle.android.d.ts +6 -2
  123. package/build/universal/transformStyle.android.js +18 -11
  124. package/build/universal/transformStyle.android.js.map +1 -1
  125. package/build/universal/transformStyle.ios.d.ts +5 -1
  126. package/build/universal/transformStyle.ios.js +29 -11
  127. package/build/universal/transformStyle.ios.js.map +1 -1
  128. package/build/universal/types.d.ts +26 -1
  129. package/build/universal/types.js.map +1 -1
  130. package/build/utils/flattenFragments.d.ts +7 -0
  131. package/build/utils/flattenFragments.js +17 -0
  132. package/build/utils/flattenFragments.js.map +1 -0
  133. package/ios/ContentUnavailableView.swift +9 -1
  134. package/ios/GroupView.swift +3 -0
  135. package/ios/HStackView.swift +26 -2
  136. package/ios/HostView.swift +21 -12
  137. package/ios/Modifiers/FontModifier.swift +27 -0
  138. package/ios/Modifiers/SectionIndexLabelModifier.swift +21 -0
  139. package/ios/Modifiers/ViewModifierRegistry.swift +26 -0
  140. package/ios/RNHostView.swift +4 -0
  141. package/ios/ScrollViewComponent.swift +20 -0
  142. package/ios/UIBaseView.swift +4 -1
  143. package/ios/UniversalLayout.swift +691 -0
  144. package/ios/VStackView.swift +26 -2
  145. package/local-maven-repo/expo/modules/ui/expo.modules.ui/{58.0.22/expo.modules.ui-58.0.22-sources.jar → 58.0.24/expo.modules.ui-58.0.24-sources.jar} +0 -0
  146. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.24/expo.modules.ui-58.0.24-sources.jar.md5 +1 -0
  147. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.24/expo.modules.ui-58.0.24-sources.jar.sha1 +1 -0
  148. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.24/expo.modules.ui-58.0.24-sources.jar.sha256 +1 -0
  149. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.24/expo.modules.ui-58.0.24-sources.jar.sha512 +1 -0
  150. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.24/expo.modules.ui-58.0.24.aar +0 -0
  151. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.24/expo.modules.ui-58.0.24.aar.md5 +1 -0
  152. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.24/expo.modules.ui-58.0.24.aar.sha1 +1 -0
  153. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.24/expo.modules.ui-58.0.24.aar.sha256 +1 -0
  154. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.24/expo.modules.ui-58.0.24.aar.sha512 +1 -0
  155. package/local-maven-repo/expo/modules/ui/expo.modules.ui/{58.0.22/expo.modules.ui-58.0.22.module → 58.0.24/expo.modules.ui-58.0.24.module} +22 -22
  156. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.24/expo.modules.ui-58.0.24.module.md5 +1 -0
  157. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.24/expo.modules.ui-58.0.24.module.sha1 +1 -0
  158. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.24/expo.modules.ui-58.0.24.module.sha256 +1 -0
  159. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.24/expo.modules.ui-58.0.24.module.sha512 +1 -0
  160. package/local-maven-repo/expo/modules/ui/expo.modules.ui/{58.0.22/expo.modules.ui-58.0.22.pom → 58.0.24/expo.modules.ui-58.0.24.pom} +1 -1
  161. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.24/expo.modules.ui-58.0.24.pom.md5 +1 -0
  162. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.24/expo.modules.ui-58.0.24.pom.sha1 +1 -0
  163. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.24/expo.modules.ui-58.0.24.pom.sha256 +1 -0
  164. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.24/expo.modules.ui-58.0.24.pom.sha512 +1 -0
  165. package/package.json +1 -1
  166. package/src/community/bottom-sheet/BottomSheet.android.tsx +2 -1
  167. package/src/community/menu/MenuView.ios.tsx +3 -2
  168. package/src/jetpack-compose/Column/index.tsx +5 -0
  169. package/src/jetpack-compose/Row/index.tsx +5 -0
  170. package/src/jetpack-compose/Text/index.tsx +5 -4
  171. package/src/recycling/useRecycledRows.tsx +3 -0
  172. package/src/swift-ui/ContentUnavailableView/index.tsx +19 -4
  173. package/src/swift-ui/HStack/index.tsx +6 -0
  174. package/src/swift-ui/RNHostView.tsx +8 -1
  175. package/src/swift-ui/Text/index.tsx +2 -1
  176. package/src/swift-ui/VStack/index.tsx +6 -0
  177. package/src/swift-ui/modifiers/index.ts +19 -0
  178. package/src/universal/BottomSheet/index.android.tsx +3 -1
  179. package/src/universal/Button/index.android.tsx +3 -1
  180. package/src/universal/Button/index.ios.tsx +2 -1
  181. package/src/universal/Collapsible/index.ios.tsx +4 -1
  182. package/src/universal/Column/index.android.tsx +3 -1
  183. package/src/universal/Column/index.ios.tsx +2 -1
  184. package/src/universal/Column/index.tsx +9 -4
  185. package/src/universal/FieldGroup/FieldGroup.android.tsx +8 -1
  186. package/src/universal/FieldGroup/FieldGroup.ios.tsx +2 -1
  187. package/src/universal/FieldGroup/FieldSection.android.tsx +17 -4
  188. package/src/universal/FieldGroup/FieldSection.ios.tsx +2 -1
  189. package/src/universal/Icon/index.android.tsx +2 -1
  190. package/src/universal/Icon/index.ios.tsx +2 -1
  191. package/src/universal/List/ListForEach.android.tsx +6 -0
  192. package/src/universal/List/ListForEach.ios.tsx +9 -0
  193. package/src/universal/List/ListForEach.tsx +246 -0
  194. package/src/universal/List/ListScrollContext.ts +6 -0
  195. package/src/universal/List/index.android.tsx +5 -0
  196. package/src/universal/List/index.ios.tsx +5 -0
  197. package/src/universal/List/index.tsx +11 -2
  198. package/src/universal/List/types.ts +45 -1
  199. package/src/universal/RNHostView/index.android.tsx +2 -1
  200. package/src/universal/Row/index.android.tsx +3 -1
  201. package/src/universal/Row/index.ios.tsx +2 -1
  202. package/src/universal/Row/index.tsx +9 -10
  203. package/src/universal/ScrollView/index.android.tsx +15 -3
  204. package/src/universal/ScrollView/index.ios.tsx +2 -1
  205. package/src/universal/Spacer/index.android.tsx +6 -4
  206. package/src/universal/Spacer/index.ios.tsx +2 -1
  207. package/src/universal/Text/index.android.tsx +2 -1
  208. package/src/universal/Text/index.ios.tsx +2 -1
  209. package/src/universal/TextInput/index.android.tsx +26 -5
  210. package/src/universal/TextInput/index.ios.tsx +1 -1
  211. package/src/universal/index.ts +6 -1
  212. package/src/universal/modifierUtils.ts +159 -2
  213. package/src/universal/stackAxis.ts +17 -0
  214. package/src/universal/transformStyle.android.ts +30 -12
  215. package/src/universal/transformStyle.ios.ts +41 -13
  216. package/src/universal/types.ts +27 -3
  217. package/src/utils/flattenFragments.ts +22 -0
  218. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.22/expo.modules.ui-58.0.22-sources.jar.md5 +0 -1
  219. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.22/expo.modules.ui-58.0.22-sources.jar.sha1 +0 -1
  220. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.22/expo.modules.ui-58.0.22-sources.jar.sha256 +0 -1
  221. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.22/expo.modules.ui-58.0.22-sources.jar.sha512 +0 -1
  222. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.22/expo.modules.ui-58.0.22.aar +0 -0
  223. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.22/expo.modules.ui-58.0.22.aar.md5 +0 -1
  224. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.22/expo.modules.ui-58.0.22.aar.sha1 +0 -1
  225. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.22/expo.modules.ui-58.0.22.aar.sha256 +0 -1
  226. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.22/expo.modules.ui-58.0.22.aar.sha512 +0 -1
  227. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.22/expo.modules.ui-58.0.22.module.md5 +0 -1
  228. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.22/expo.modules.ui-58.0.22.module.sha1 +0 -1
  229. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.22/expo.modules.ui-58.0.22.module.sha256 +0 -1
  230. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.22/expo.modules.ui-58.0.22.module.sha512 +0 -1
  231. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.22/expo.modules.ui-58.0.22.pom.md5 +0 -1
  232. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.22/expo.modules.ui-58.0.22.pom.sha1 +0 -1
  233. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.22/expo.modules.ui-58.0.22.pom.sha256 +0 -1
  234. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.22/expo.modules.ui-58.0.22.pom.sha512 +0 -1
@@ -15,12 +15,15 @@ export function Column({ children, alignment = 'start', spacing, style, onPress,
15
15
  disabled,
16
16
  hidden,
17
17
  testID
18
- }, extraModifiers);
18
+ }, extraModifiers, {
19
+ componentName: 'Column'
20
+ });
19
21
  return /*#__PURE__*/ _jsx(ComposeColumn, {
20
22
  horizontalAlignment: alignmentMap[alignment],
21
23
  verticalArrangement: spacing != null ? {
22
24
  spacedBy: spacing
23
25
  } : undefined,
26
+ resolvesChildPercentages: true,
24
27
  modifiers: modifiers,
25
28
  children: children
26
29
  });
@@ -1 +1 @@
1
- {"version":3,"sources":["universal/Column/index.android.tsx"],"sourcesContent":[null],"names":["Column","ComposeColumn","useUniversalLifecycle","transformToModifiers","alignmentMap","start","center","end","children","alignment","spacing","style","onPress","onAppear","onDisappear","disabled","hidden","testID","modifiers","extraModifiers","undefined","horizontalAlignment","verticalArrangement","spacedBy"],"mappings":";AAAA,SAASA,UAAUC,aAAa,QAAQ,2BAA2B;AAEnE,SAASC,qBAAqB,QAAQ,WAAW;AACjD,SAASC,oBAAoB,QAAQ,oBAAoB;AAIzD,MAAMC,eAAuE;IAC3EC,OAAO;IACPC,QAAQ;IACRC,KAAK;AACP;AAEA,OAAO,SAASP,OAAO,EACrBQ,QAAQ,EACRC,YAAY,OAAO,EACnBC,OAAO,EACPC,KAAK,EACLC,OAAO,EACPC,QAAQ,EACRC,WAAW,EACXC,QAAQ,EACRC,MAAM,EACNC,MAAM,EACNC,WAAWC,cAAc,EACb;IACZjB,sBAAsBW,UAAUC;IAEhC,IAAIE,QAAQ,OAAO;IAEnB,MAAME,YAAYf,qBAChBQ,OACA;QAAEC,SAASG,WAAWK,YAAYR;QAASG;QAAUC;QAAQC;IAAO,GACpEE;IAGF,qBACE,KAAClB;QACCoB,qBAAqBjB,YAAY,CAACK,UAAU;QAC5Ca,qBAAqBZ,WAAW,OAAO;YAAEa,UAAUb;QAAQ,IAAIU;QAC/DF,WAAWA;kBACVV;;AAGP;AAEA,cAAc,UAAU"}
1
+ {"version":3,"sources":["universal/Column/index.android.tsx"],"sourcesContent":[null],"names":["Column","ComposeColumn","useUniversalLifecycle","transformToModifiers","alignmentMap","start","center","end","children","alignment","spacing","style","onPress","onAppear","onDisappear","disabled","hidden","testID","modifiers","extraModifiers","undefined","componentName","horizontalAlignment","verticalArrangement","spacedBy","resolvesChildPercentages"],"mappings":";AAAA,SAASA,UAAUC,aAAa,QAAQ,2BAA2B;AAEnE,SAASC,qBAAqB,QAAQ,WAAW;AACjD,SAASC,oBAAoB,QAAQ,oBAAoB;AAIzD,MAAMC,eAAuE;IAC3EC,OAAO;IACPC,QAAQ;IACRC,KAAK;AACP;AAEA,OAAO,SAASP,OAAO,EACrBQ,QAAQ,EACRC,YAAY,OAAO,EACnBC,OAAO,EACPC,KAAK,EACLC,OAAO,EACPC,QAAQ,EACRC,WAAW,EACXC,QAAQ,EACRC,MAAM,EACNC,MAAM,EACNC,WAAWC,cAAc,EACb;IACZjB,sBAAsBW,UAAUC;IAEhC,IAAIE,QAAQ,OAAO;IAEnB,MAAME,YAAYf,qBAChBQ,OACA;QAAEC,SAASG,WAAWK,YAAYR;QAASG;QAAUC;QAAQC;IAAO,GACpEE,gBACA;QAAEE,eAAe;IAAS;IAG5B,qBACE,KAACpB;QACCqB,qBAAqBlB,YAAY,CAACK,UAAU;QAC5Cc,qBAAqBb,WAAW,OAAO;YAAEc,UAAUd;QAAQ,IAAIU;QAC/DK,wBAAwB;QACxBP,WAAWA;kBACVV;;AAGP;AAEA,cAAc,UAAU"}
@@ -20,12 +20,14 @@ export function Column({ children, alignment = 'start', spacing, style, onPress,
20
20
  hidden,
21
21
  testID
22
22
  }, extraModifiers, {
23
+ componentName: 'Column',
23
24
  frameAlignment: frameAlignmentMap[alignment]
24
25
  });
25
26
  return /*#__PURE__*/ _jsx(VStack, {
26
27
  alignment: alignmentMap[alignment],
27
28
  spacing: spacing,
28
29
  modifiers: modifiers,
30
+ resolvesChildPercentages: true,
29
31
  testID: testID,
30
32
  children: children
31
33
  });
@@ -1 +1 @@
1
- {"version":3,"sources":["universal/Column/index.ios.tsx"],"sourcesContent":[null],"names":["VStack","transformToModifiers","alignmentMap","start","center","end","frameAlignmentMap","Column","children","alignment","spacing","style","onPress","onAppear","onDisappear","disabled","hidden","testID","modifiers","extraModifiers","frameAlignment"],"mappings":";AAAA,SAASA,MAAM,QAAQ,oBAAoB;AAE3C,SAASC,oBAAoB,QAAQ,oBAAoB;AAIzD,MAAMC,eAA8E;IAClFC,OAAO;IACPC,QAAQ;IACRC,KAAK;AACP;AAEA,MAAMC,oBAAsF;IAC1FH,OAAO;IACPC,QAAQ;IACRC,KAAK;AACP;AAEA,OAAO,SAASE,OAAO,EACrBC,QAAQ,EACRC,YAAY,OAAO,EACnBC,OAAO,EACPC,KAAK,EACLC,OAAO,EACPC,QAAQ,EACRC,WAAW,EACXC,QAAQ,EACRC,MAAM,EACNC,MAAM,EACNC,WAAWC,cAAc,EACb;IACZ,MAAMD,YAAYjB,qBAChBU,OACA;QAAEC;QAASC;QAAUC;QAAaC;QAAUC;QAAQC;IAAO,GAC3DE,gBACA;QAAEC,gBAAgBd,iBAAiB,CAACG,UAAU;IAAC;IAGjD,qBACE,KAACT;QACCS,WAAWP,YAAY,CAACO,UAAU;QAClCC,SAASA;QACTQ,WAAWA;QACXD,QAAQA;kBACPT;;AAGP;AAEA,cAAc,UAAU"}
1
+ {"version":3,"sources":["universal/Column/index.ios.tsx"],"sourcesContent":[null],"names":["VStack","transformToModifiers","alignmentMap","start","center","end","frameAlignmentMap","Column","children","alignment","spacing","style","onPress","onAppear","onDisappear","disabled","hidden","testID","modifiers","extraModifiers","componentName","frameAlignment","resolvesChildPercentages"],"mappings":";AAAA,SAASA,MAAM,QAAQ,oBAAoB;AAE3C,SAASC,oBAAoB,QAAQ,oBAAoB;AAIzD,MAAMC,eAA8E;IAClFC,OAAO;IACPC,QAAQ;IACRC,KAAK;AACP;AAEA,MAAMC,oBAAsF;IAC1FH,OAAO;IACPC,QAAQ;IACRC,KAAK;AACP;AAEA,OAAO,SAASE,OAAO,EACrBC,QAAQ,EACRC,YAAY,OAAO,EACnBC,OAAO,EACPC,KAAK,EACLC,OAAO,EACPC,QAAQ,EACRC,WAAW,EACXC,QAAQ,EACRC,MAAM,EACNC,MAAM,EACNC,WAAWC,cAAc,EACb;IACZ,MAAMD,YAAYjB,qBAChBU,OACA;QAAEC;QAASC;QAAUC;QAAaC;QAAUC;QAAQC;IAAO,GAC3DE,gBACA;QAAEC,eAAe;QAAUC,gBAAgBf,iBAAiB,CAACG,UAAU;IAAC;IAG1E,qBACE,KAACT;QACCS,WAAWP,YAAY,CAACO,UAAU;QAClCC,SAASA;QACTQ,WAAWA;QACXI,wBAAwB;QACxBL,QAAQA;kBACPT;;AAGP;AAEA,cAAc,UAAU"}
@@ -1,11 +1,15 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { Pressable, StyleSheet, View } from 'react-native';
3
3
  import { useUniversalLifecycle } from '../hooks';
4
+ import { StackAxisContext, useCrossAxisSize } from '../stackAxis';
4
5
  const styles = StyleSheet.create({
5
- // `alignSelf: 'stretch'` — match SwiftUI `VStack` / Compose `Column`, which fill their parent's cross-axis.
6
- // Without this, a nested Column inherits its parent's `alignItems` (often `flex-start`) and shrinks to content.
7
6
  column: {
8
- flexDirection: 'column',
7
+ flexDirection: 'column'
8
+ },
9
+ // Fill the parent's cross axis when this column has no size of its own on that axis.
10
+ // A set size must not use stretch: that overrides the parent's `alignItems`,
11
+ // and the column then sits at the start.
12
+ stretch: {
9
13
  alignSelf: 'stretch'
10
14
  },
11
15
  hidden: {
@@ -31,6 +35,7 @@ const alignmentStyles = StyleSheet.create({
31
35
  * A vertical layout container that arranges its children from top to bottom.
32
36
  */ export function Column({ children, alignment = 'start', spacing, style, onPress, onAppear, onDisappear, disabled = false, hidden = false, testID }) {
33
37
  useUniversalLifecycle(onAppear, onDisappear);
38
+ const crossAxisSize = useCrossAxisSize(style);
34
39
  const Container = onPress ? Pressable : View;
35
40
  return /*#__PURE__*/ _jsx(Container, {
36
41
  onPress: onPress,
@@ -38,6 +43,7 @@ const alignmentStyles = StyleSheet.create({
38
43
  testID: testID,
39
44
  style: [
40
45
  styles.column,
46
+ crossAxisSize == null && styles.stretch,
41
47
  alignmentStyles[alignment],
42
48
  spacing != null && {
43
49
  gap: spacing
@@ -46,7 +52,10 @@ const alignmentStyles = StyleSheet.create({
46
52
  hidden && styles.hidden,
47
53
  disabled && styles.disabled
48
54
  ],
49
- children: children
55
+ children: /*#__PURE__*/ _jsx(StackAxisContext.Provider, {
56
+ value: "vertical",
57
+ children: children
58
+ })
50
59
  });
51
60
  }
52
61
  export * from './types';
@@ -1 +1 @@
1
- {"version":3,"sources":["universal/Column/index.tsx"],"sourcesContent":[null],"names":["Pressable","StyleSheet","View","useUniversalLifecycle","styles","create","column","flexDirection","alignSelf","hidden","display","disabled","opacity","pointerEvents","alignmentStyles","start","alignItems","center","end","Column","children","alignment","spacing","style","onPress","onAppear","onDisappear","testID","Container","gap"],"mappings":";AAAA,SAASA,SAAS,EAAEC,UAAU,EAAEC,IAAI,QAAwB,eAAe;AAE3E,SAASC,qBAAqB,QAAQ,WAAW;AAIjD,MAAMC,SAASH,WAAWI,MAAM,CAAC;IAC/B,4GAA4G;IAC5G,gHAAgH;IAChHC,QAAQ;QAAEC,eAAe;QAAUC,WAAW;IAAU;IACxDC,QAAQ;QAAEC,SAAS;IAAO;IAC1BC,UAAU;QACRC,SAAS;QACTC,eAAe;IACjB;AACF;AAEA,MAAMC,kBAAkBb,WAAWI,MAAM,CAAC;IACxCU,OAAO;QAAEC,YAAY;IAAa;IAClCC,QAAQ;QAAED,YAAY;IAAS;IAC/BE,KAAK;QAAEF,YAAY;IAAW;AAChC;AAEA;;CAEC,GACD,OAAO,SAASG,OAAO,EACrBC,QAAQ,EACRC,YAAY,OAAO,EACnBC,OAAO,EACPC,KAAK,EACLC,OAAO,EACPC,QAAQ,EACRC,WAAW,EACXf,WAAW,KAAK,EAChBF,SAAS,KAAK,EACdkB,MAAM,EACM;IACZxB,sBAAsBsB,UAAUC;IAEhC,MAAME,YAAYJ,UAAUxB,YAAYE;IAExC,qBACE,KAAC0B;QACCJ,SAASA;QACTb,UAAUA;QACVgB,QAAQA;QACRJ,OAAO;YACLnB,OAAOE,MAAM;YACbQ,eAAe,CAACO,UAAU;YAC1BC,WAAW,QAAQ;gBAAEO,KAAKP;YAAQ;YAClCC;YACAd,UAAUL,OAAOK,MAAM;YACvBE,YAAYP,OAAOO,QAAQ;SAC5B;kBACAS;;AAGP;AAEA,cAAc,UAAU"}
1
+ {"version":3,"sources":["universal/Column/index.tsx"],"sourcesContent":[null],"names":["Pressable","StyleSheet","View","useUniversalLifecycle","StackAxisContext","useCrossAxisSize","styles","create","column","flexDirection","stretch","alignSelf","hidden","display","disabled","opacity","pointerEvents","alignmentStyles","start","alignItems","center","end","Column","children","alignment","spacing","style","onPress","onAppear","onDisappear","testID","crossAxisSize","Container","gap","Provider","value"],"mappings":";AAAA,SAASA,SAAS,EAAEC,UAAU,EAAEC,IAAI,QAAwB,eAAe;AAE3E,SAASC,qBAAqB,QAAQ,WAAW;AACjD,SAASC,gBAAgB,EAAEC,gBAAgB,QAAQ,eAAe;AAIlE,MAAMC,SAASL,WAAWM,MAAM,CAAC;IAC/BC,QAAQ;QAAEC,eAAe;IAAS;IAClC,qFAAqF;IACrF,6EAA6E;IAC7E,yCAAyC;IACzCC,SAAS;QAAEC,WAAW;IAAU;IAChCC,QAAQ;QAAEC,SAAS;IAAO;IAC1BC,UAAU;QACRC,SAAS;QACTC,eAAe;IACjB;AACF;AAEA,MAAMC,kBAAkBhB,WAAWM,MAAM,CAAC;IACxCW,OAAO;QAAEC,YAAY;IAAa;IAClCC,QAAQ;QAAED,YAAY;IAAS;IAC/BE,KAAK;QAAEF,YAAY;IAAW;AAChC;AAEA;;CAEC,GACD,OAAO,SAASG,OAAO,EACrBC,QAAQ,EACRC,YAAY,OAAO,EACnBC,OAAO,EACPC,KAAK,EACLC,OAAO,EACPC,QAAQ,EACRC,WAAW,EACXf,WAAW,KAAK,EAChBF,SAAS,KAAK,EACdkB,MAAM,EACM;IACZ3B,sBAAsByB,UAAUC;IAChC,MAAME,gBAAgB1B,iBAAiBqB;IAEvC,MAAMM,YAAYL,UAAU3B,YAAYE;IAExC,qBACE,KAAC8B;QACCL,SAASA;QACTb,UAAUA;QACVgB,QAAQA;QACRJ,OAAO;YACLpB,OAAOE,MAAM;YACbuB,iBAAiB,QAAQzB,OAAOI,OAAO;YACvCO,eAAe,CAACO,UAAU;YAC1BC,WAAW,QAAQ;gBAAEQ,KAAKR;YAAQ;YAClCC;YACAd,UAAUN,OAAOM,MAAM;YACvBE,YAAYR,OAAOQ,QAAQ;SAC5B;kBACD,cAAA,KAACV,iBAAiB8B,QAAQ;YAACC,OAAM;sBAAYZ;;;AAGnD;AAEA,cAAc,UAAU"}
@@ -20,7 +20,9 @@ import { groupFieldGroupChildren } from './groupChildren';
20
20
  disabled,
21
21
  hidden,
22
22
  testID
23
- }, extraModifiers);
23
+ }, extraModifiers, {
24
+ componentName: 'FieldGroup'
25
+ });
24
26
  return /*#__PURE__*/ _jsx(LazyColumn, {
25
27
  verticalArrangement: {
26
28
  spacedBy: 24
@@ -1 +1 @@
1
- {"version":3,"sources":["universal/FieldGroup/FieldGroup.android.tsx"],"sourcesContent":[null],"names":["LazyColumn","useMaterialColors","useUniversalLifecycle","transformToModifiers","groupFieldGroupChildren","FieldGroup","children","style","onAppear","onDisappear","disabled","hidden","testID","modifiers","extraModifiers","colors","mergedStyle","backgroundColor","surface","verticalArrangement","spacedBy","contentPadding","start","end","top","bottom"],"mappings":";AAAA,SAASA,UAAU,EAAEC,iBAAiB,QAAQ,2BAA2B;AAEzE,SAASC,qBAAqB,QAAQ,WAAW;AACjD,SAASC,oBAAoB,QAAQ,oBAAoB;AACzD,SAASC,uBAAuB,QAAQ,kBAAkB;AAG1D;;;;;CAKC,GACD,OAAO,SAASC,WAAW,EACzBC,QAAQ,EACRC,KAAK,EACLC,QAAQ,EACRC,WAAW,EACXC,QAAQ,EACRC,MAAM,EACNC,MAAM,EACNC,WAAWC,cAAc,EACT;IAChBZ,sBAAsBM,UAAUC;IAChC,MAAMM,SAASd;IAEf,IAAIU,QAAQ,OAAO;IAEnB,MAAMK,cAAc;QAAEC,iBAAiBF,OAAOG,OAAO;QAAE,GAAGX,KAAK;IAAC;IAChE,MAAMM,YAAYV,qBAAqBa,aAAa;QAAEN;QAAUC;QAAQC;IAAO,GAAGE;IAElF,qBACE,KAACd;QACCmB,qBAAqB;YAAEC,UAAU;QAAG;QACpCC,gBAAgB;YAAEC,OAAO;YAAIC,KAAK;YAAIC,KAAK;YAAIC,QAAQ;QAAG;QAC1DZ,WAAWA;kBACVT,wBAAwBE;;AAG/B"}
1
+ {"version":3,"sources":["universal/FieldGroup/FieldGroup.android.tsx"],"sourcesContent":[null],"names":["LazyColumn","useMaterialColors","useUniversalLifecycle","transformToModifiers","groupFieldGroupChildren","FieldGroup","children","style","onAppear","onDisappear","disabled","hidden","testID","modifiers","extraModifiers","colors","mergedStyle","backgroundColor","surface","componentName","verticalArrangement","spacedBy","contentPadding","start","end","top","bottom"],"mappings":";AAAA,SAASA,UAAU,EAAEC,iBAAiB,QAAQ,2BAA2B;AAEzE,SAASC,qBAAqB,QAAQ,WAAW;AACjD,SAASC,oBAAoB,QAAQ,oBAAoB;AACzD,SAASC,uBAAuB,QAAQ,kBAAkB;AAG1D;;;;;CAKC,GACD,OAAO,SAASC,WAAW,EACzBC,QAAQ,EACRC,KAAK,EACLC,QAAQ,EACRC,WAAW,EACXC,QAAQ,EACRC,MAAM,EACNC,MAAM,EACNC,WAAWC,cAAc,EACT;IAChBZ,sBAAsBM,UAAUC;IAChC,MAAMM,SAASd;IAEf,IAAIU,QAAQ,OAAO;IAEnB,MAAMK,cAAc;QAAEC,iBAAiBF,OAAOG,OAAO;QAAE,GAAGX,KAAK;IAAC;IAChE,MAAMM,YAAYV,qBAChBa,aACA;QAAEN;QAAUC;QAAQC;IAAO,GAC3BE,gBACA;QACEK,eAAe;IACjB;IAGF,qBACE,KAACnB;QACCoB,qBAAqB;YAAEC,UAAU;QAAG;QACpCC,gBAAgB;YAAEC,OAAO;YAAIC,KAAK;YAAIC,KAAK;YAAIC,QAAQ;QAAG;QAC1Db,WAAWA;kBACVT,wBAAwBE;;AAG/B"}
@@ -11,7 +11,9 @@ import { transformToModifiers } from '../transformStyle';
11
11
  disabled,
12
12
  hidden,
13
13
  testID
14
- }, extraModifiers);
14
+ }, extraModifiers, {
15
+ componentName: 'FieldGroup'
16
+ });
15
17
  return /*#__PURE__*/ _jsx(Form, {
16
18
  modifiers: modifiers,
17
19
  children: children
@@ -1 +1 @@
1
- {"version":3,"sources":["universal/FieldGroup/FieldGroup.ios.tsx"],"sourcesContent":[null],"names":["Form","transformToModifiers","FieldGroup","children","style","onAppear","onDisappear","disabled","hidden","testID","modifiers","extraModifiers"],"mappings":";AAAA,SAASA,IAAI,QAAQ,oBAAoB;AAEzC,SAASC,oBAAoB,QAAQ,oBAAoB;AAGzD;;;CAGC,GACD,OAAO,SAASC,WAAW,EACzBC,QAAQ,EACRC,KAAK,EACLC,QAAQ,EACRC,WAAW,EACXC,QAAQ,EACRC,MAAM,EACNC,MAAM,EACNC,WAAWC,cAAc,EACT;IAChB,MAAMD,YAAYT,qBAChBG,OACA;QAAEC;QAAUC;QAAaC;QAAUC;QAAQC;IAAO,GAClDE;IAGF,qBAAO,KAACX;QAAKU,WAAWA;kBAAYP;;AACtC"}
1
+ {"version":3,"sources":["universal/FieldGroup/FieldGroup.ios.tsx"],"sourcesContent":[null],"names":["Form","transformToModifiers","FieldGroup","children","style","onAppear","onDisappear","disabled","hidden","testID","modifiers","extraModifiers","componentName"],"mappings":";AAAA,SAASA,IAAI,QAAQ,oBAAoB;AAEzC,SAASC,oBAAoB,QAAQ,oBAAoB;AAGzD;;;CAGC,GACD,OAAO,SAASC,WAAW,EACzBC,QAAQ,EACRC,KAAK,EACLC,QAAQ,EACRC,WAAW,EACXC,QAAQ,EACRC,MAAM,EACNC,MAAM,EACNC,WAAWC,cAAc,EACT;IAChB,MAAMD,YAAYT,qBAChBG,OACA;QAAEC;QAAUC;QAAaC;QAAUC;QAAQC;IAAO,GAClDE,gBACA;QAAEC,eAAe;IAAa;IAGhC,qBAAO,KAACZ;QAAKU,WAAWA;kBAAYP;;AACtC"}
@@ -2,6 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Column as ComposeColumn, Text as ComposeText, ListItem, useMaterialColors } from '@expo/ui/jetpack-compose';
3
3
  import { clip, fillMaxWidth, padding, Shapes } from '@expo/ui/jetpack-compose/modifiers';
4
4
  import { useUniversalLifecycle } from '../hooks';
5
+ import { getUserSizingOverrides } from '../modifierUtils';
5
6
  import { transformToModifiers } from '../transformStyle';
6
7
  import { extractFieldSectionSlots } from './FieldSectionSlots';
7
8
  import { getFieldItemPosition } from './types';
@@ -16,14 +17,22 @@ import { getFieldItemPosition } from './types';
16
17
  const colors = useMaterialColors();
17
18
  if (hidden) return null;
18
19
  const { header, footer, rows } = extractFieldSectionSlots(children);
20
+ // A numeric width owns the axis, so fillMaxWidth stays off.
21
+ // A percentage is only parent data. This LazyColumn does not read it.
22
+ // Stretch in that case, unless a user modifier already owns the width.
23
+ const widthIsPercentage = typeof style?.width === 'string';
24
+ const userOwnsWidth = getUserSizingOverrides(extraModifiers, 'android').width;
25
+ const sectionModifiers = !userOwnsWidth && (style?.width == null || widthIsPercentage) ? [
26
+ fillMaxWidth(),
27
+ ...extraModifiers ?? []
28
+ ] : extraModifiers;
19
29
  const outerModifiers = transformToModifiers(style, {
20
30
  disabled,
21
31
  hidden,
22
32
  testID
23
- }, [
24
- fillMaxWidth(),
25
- ...extraModifiers ?? []
26
- ]);
33
+ }, sectionModifiers, {
34
+ componentName: 'FieldSection'
35
+ });
27
36
  const headerNode = header ?? (title ? /*#__PURE__*/ _jsx(ComposeText, {
28
37
  color: colors.onSurfaceVariant,
29
38
  style: {
@@ -1 +1 @@
1
- {"version":3,"sources":["universal/FieldGroup/FieldSection.android.tsx"],"sourcesContent":[null],"names":["Column","ComposeColumn","Text","ComposeText","ListItem","useMaterialColors","clip","fillMaxWidth","padding","Shapes","useUniversalLifecycle","transformToModifiers","extractFieldSectionSlots","getFieldItemPosition","FieldSection","children","title","style","onAppear","onDisappear","disabled","hidden","testID","titleUppercase","modifiers","extraModifiers","colors","header","footer","rows","outerModifiers","headerNode","color","onSurfaceVariant","typography","letterSpacing","undefined","toUpperCase","verticalArrangement","spacedBy","length","map","child","index","position","containerColor","surfaceContainer","RoundedCorner","cornerRadii","HeadlineContent","full","small","topStart","topEnd","bottomStart","bottomEnd"],"mappings":";AAAA,SACEA,UAAUC,aAAa,EACvBC,QAAQC,WAAW,EACnBC,QAAQ,EACRC,iBAAiB,QACZ,2BAA2B;AAClC,SAASC,IAAI,EAAEC,YAAY,EAAEC,OAAO,EAAEC,MAAM,QAAQ,qCAAqC;AAEzF,SAASC,qBAAqB,QAAQ,WAAW;AACjD,SAASC,oBAAoB,QAAQ,oBAAoB;AACzD,SAASC,wBAAwB,QAAQ,sBAAsB;AAC/D,SAASC,oBAAoB,QAAwD,UAAU;AAE/F;;;;;;CAMC,GACD,OAAO,SAASC,aAAa,EAC3BC,QAAQ,EACRC,KAAK,EACLC,KAAK,EACLC,QAAQ,EACRC,WAAW,EACXC,QAAQ,EACRC,MAAM,EACNC,MAAM,EACNC,iBAAiB,KAAK,EACtBC,WAAWC,cAAc,EACP;IAClBf,sBAAsBQ,UAAUC;IAChC,MAAMO,SAASrB;IAEf,IAAIgB,QAAQ,OAAO;IAEnB,MAAM,EAAEM,MAAM,EAAEC,MAAM,EAAEC,IAAI,EAAE,GAAGjB,yBAAyBG;IAE1D,MAAMe,iBAAiBnB,qBAAqBM,OAAO;QAAEG;QAAUC;QAAQC;IAAO,GAAG;QAC/Ef;WACIkB,kBAAkB,EAAE;KACzB;IAED,MAAMM,aACJJ,UACCX,CAAAA,sBACC,KAACb;QACC6B,OAAON,OAAOO,gBAAgB;QAC9BhB,OAAO;YACLiB,YAAY;YACZC,eAAeZ,iBAAiB,MAAMa;QACxC;kBACCb,iBAAiBP,MAAMqB,WAAW,KAAKrB;SAExC,IAAG;IAET,qBACE,MAACf;QA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null],"names":["Column","ComposeColumn","Text","ComposeText","ListItem","useMaterialColors","clip","fillMaxWidth","padding","Shapes","useUniversalLifecycle","getUserSizingOverrides","transformToModifiers","extractFieldSectionSlots","getFieldItemPosition","FieldSection","children","title","style","onAppear","onDisappear","disabled","hidden","testID","titleUppercase","modifiers","extraModifiers","colors","header","footer","rows","widthIsPercentage","width","userOwnsWidth","sectionModifiers","outerModifiers","componentName","headerNode","color","onSurfaceVariant","typography","letterSpacing","undefined","toUpperCase","verticalArrangement","spacedBy","length","map","child","index","position","containerColor","surfaceContainer","RoundedCorner","cornerRadii","HeadlineContent","full","small","topStart","topEnd","bottomStart","bottomEnd"],"mappings":";AAAA,SACEA,UAAUC,aAAa,EACvBC,QAAQC,WAAW,EACnBC,QAAQ,EACRC,iBAAiB,QACZ,2BAA2B;AAClC,SAASC,IAAI,EAAEC,YAAY,EAAEC,OAAO,EAAEC,MAAM,QAAQ,qCAAqC;AAEzF,SAASC,qBAAqB,QAAQ,WAAW;AACjD,SAASC,sBAAsB,QAAQ,mBAAmB;AAC1D,SAASC,oBAAoB,QAAQ,oBAAoB;AACzD,SAASC,wBAAwB,QAAQ,sBAAsB;AAC/D,SAASC,oBAAoB,QAAwD,UAAU;AAE/F;;;;;;CAMC,GACD,OAAO,SAASC,aAAa,EAC3BC,QAAQ,EACRC,KAAK,EACLC,KAAK,EACLC,QAAQ,EACRC,WAAW,EACXC,QAAQ,EACRC,MAAM,EACNC,MAAM,EACNC,iBAAiB,KAAK,EACtBC,WAAWC,cAAc,EACP;IAClBhB,sBAAsBS,UAAUC;IAChC,MAAMO,SAAStB;IAEf,IAAIiB,QAAQ,OAAO;IAEnB,MAAM,EAAEM,MAAM,EAAEC,MAAM,EAAEC,IAAI,EAAE,GAAGjB,yBAAyBG;IAE1D,4DAA4D;IAC5D,sEAAsE;IACtE,uEAAuE;IACvE,MAAMe,oBAAoB,OAAOb,OAAOc,UAAU;IAClD,MAAMC,gBAAgBtB,uBAAuBe,gBAAgB,WAAW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AQP;QACN,KAAK;YACH,OAAO;gBAAEQ,UAAUF;gBAAMG,QAAQH;gBAAMI,aAAaJ;gBAAMK,WAAWL;YAAK;QAC5E,KAAK;YACH,OAAO;gBAAEE,UAAUF;gBAAMG,QAAQH;gBAAMI,aAAaH;gBAAOI,WAAWJ;YAAM;QAC9E,KAAK;YACH,OAAO;gBAAEC,UAAUD;gBAAOE,QAAQF;gBAAOG,aAAaJ;gBAAMK,WAAWL;YAAK;QAC9E,KAAK;QACL;YACE,OAAO;gBAAEE,UAAUD;gBAAOE,QAAQF;gBAAOG,aAAaH;gBAAOI,WAAWJ;YAAM;IAClF;AACF"}
@@ -16,7 +16,9 @@ import { extractFieldSectionSlots } from './FieldSectionSlots';
16
16
  disabled,
17
17
  hidden,
18
18
  testID
19
- }, extraModifiers);
19
+ }, extraModifiers, {
20
+ componentName: 'FieldSection'
21
+ });
20
22
  return /*#__PURE__*/ _jsx(Section, {
21
23
  title: header ? undefined : title,
22
24
  header: header,
@@ -1 +1 @@
1
- {"version":3,"sources":["universal/FieldGroup/FieldSection.ios.tsx"],"sourcesContent":[null],"names":["Section","transformToModifiers","extractFieldSectionSlots","FieldSection","children","title","style","onAppear","onDisappear","disabled","hidden","testID","modifiers","extraModifiers","header","footer","rows","undefined"],"mappings":";AAAA,SAASA,OAAO,QAAQ,oBAAoB;AAE5C,SAASC,oBAAoB,QAAQ,oBAAoB;AACzD,SAASC,wBAAwB,QAAQ,sBAAsB;AAG/D;;;;;;CAMC,GACD,OAAO,SAASC,aAAa,EAC3BC,QAAQ,EACRC,KAAK,EACLC,KAAK,EACLC,QAAQ,EACRC,WAAW,EACXC,QAAQ,EACRC,MAAM,EACNC,MAAM,EACNC,WAAWC,cAAc,EACP;IAClB,MAAM,EAAEC,MAAM,EAAEC,MAAM,EAAEC,IAAI,EAAE,GAAGd,yBAAyBE;IAE1D,MAAMQ,YAAYX,qBAChBK,OACA;QAAEC;QAAUC;QAAaC;QAAUC;QAAQC;IAAO,GAClDE;IAGF,qBACE,KAACb;QACCK,OAAOS,SAASG,YAAYZ;QAC5BS,QAAQA;QACRC,QAAQA;QACRH,WAAWA;kBACVI;;AAGP"}
1
+ {"version":3,"sources":["universal/FieldGroup/FieldSection.ios.tsx"],"sourcesContent":[null],"names":["Section","transformToModifiers","extractFieldSectionSlots","FieldSection","children","title","style","onAppear","onDisappear","disabled","hidden","testID","modifiers","extraModifiers","header","footer","rows","componentName","undefined"],"mappings":";AAAA,SAASA,OAAO,QAAQ,oBAAoB;AAE5C,SAASC,oBAAoB,QAAQ,oBAAoB;AACzD,SAASC,wBAAwB,QAAQ,sBAAsB;AAG/D;;;;;;CAMC,GACD,OAAO,SAASC,aAAa,EAC3BC,QAAQ,EACRC,KAAK,EACLC,KAAK,EACLC,QAAQ,EACRC,WAAW,EACXC,QAAQ,EACRC,MAAM,EACNC,MAAM,EACNC,WAAWC,cAAc,EACP;IAClB,MAAM,EAAEC,MAAM,EAAEC,MAAM,EAAEC,IAAI,EAAE,GAAGd,yBAAyBE;IAE1D,MAAMQ,YAAYX,qBAChBK,OACA;QAAEC;QAAUC;QAAaC;QAAUC;QAAQC;IAAO,GAClDE,gBACA;QAAEI,eAAe;IAAe;IAGlC,qBACE,KAACjB;QACCK,OAAOS,SAASI,YAAYb;QAC5BS,QAAQA;QACRC,QAAQA;QACRH,WAAWA;kBACVI;;AAGP"}
@@ -33,7 +33,9 @@ function resolveAndroidSource(name) {
33
33
  disabled,
34
34
  hidden,
35
35
  testID
36
- }, extraModifiers);
36
+ }, extraModifiers, {
37
+ componentName: 'Icon'
38
+ });
37
39
  if (onPress) {
38
40
  // Pin the wrapping Box to the icon's size so it doesn't collapse to 0×0
39
41
  // while the native IconView swaps painters between source changes — that
@@ -1 +1 @@
1
- {"version":3,"sources":["universal/Icon/index.android.tsx"],"sourcesContent":[null],"names":["Box","Icon","ComposeIcon","size","sizeModifier","useUniversalLifecycle","transformToModifiers","resolveAndroidSource","name","android","undefined","color","accessibilityLabel","style","onPress","onAppear","onDisappear","disabled","hidden","testID","modifiers","extraModifiers","source","boxModifiers","tint","contentDescription","select","spec","value","then","Error"],"mappings":";AAAA,SAASA,GAAG,EAAEC,QAAQC,WAAW,QAAQ,2BAA2B;AACpE,SAASC,QAAQC,YAAY,QAAQ,qCAAqC;AAG1E,SAASC,qBAAqB,QAAQ,WAAW;AACjD,SAASC,oBAAoB,QAAQ,oBAAoB;AAGzD,SAASC,qBAAqBC,IAAc;IAC1C,IAAIA,QAAQ,OAAOA,SAAS,YAAY,aAAaA,MAAM;QACzD,OAAOA,KAAKC,OAAO;IACrB;IACA,IAAI,OAAOD,SAAS,UAAU;QAC5B,4DAA4D;QAC5D,OAAOE;IACT;IACA,OAAOF;AACT;AAEA;;;;;;;;;;CAUC,GACD,OAAO,SAASP,KAAK,EACnBO,IAAI,EACJL,IAAI,EACJQ,KAAK,EACLC,kBAAkB,EAClBC,KAAK,EACLC,OAAO,EACPC,QAAQ,EACRC,WAAW,EACXC,QAAQ,EACRC,MAAM,EACNC,MAAM,EACNC,WAAWC,cAAc,EACf;IACVhB,sBAAsBU,UAAUC;IAEhC,IAAIE,QAAQ,OAAO;IAEnB,MAAMI,SAASf,qBAAqBC;IACpC,IAAIc,UAAU,MAAM,OAAO;IAE3B,MAAMF,YAAYd,qBAChBO,OACA;QAAEC;QAASG;QAAUC;QAAQC;IAAO,GACpCE;IAGF,IAAIP,SAAS;QACX,wEAAwE;QACxE,yEAAyE;QACzE,yEAAyE;QACzE,MAAMS,eAAepB,QAAQ,OAAO;YAACC,aAAaD,MAAMA;eAAUiB;SAAU,GAAGA;QAC/E,qBACE,KAACpB;YAAIoB,WAAWG;sBACd,cAAA,KAACrB;gBACCoB,QAAQA;gBACRnB,MAAMA;gBACNqB,MAAMb;gBACNc,oBAAoBb;;;IAI5B;IAEA,qBACE,KAACV;QACCoB,QAAQA;QACRnB,MAAMA;QACNqB,MAAMb;QACNc,oBAAoBb;QACpBQ,WAAWA;;AAGjB;AAEAnB,KAAKyB,MAAM,GAAG,CAACC;IACb,MAAMC,QAAQD,KAAKlB,OAAO;IAC1B,IAAImB,SAAS,QAAQ,OAAO,AAACA,MAA6BC,IAAI,KAAK,YAAY;QAC7E,MAAM,IAAIC,MACR,gFACE,8EACA,uFACA,uFACA,2CACA;IAEN;IACA,OAAOF;AACT;AAEA,cAAc,UAAU"}
1
+ {"version":3,"sources":["universal/Icon/index.android.tsx"],"sourcesContent":[null],"names":["Box","Icon","ComposeIcon","size","sizeModifier","useUniversalLifecycle","transformToModifiers","resolveAndroidSource","name","android","undefined","color","accessibilityLabel","style","onPress","onAppear","onDisappear","disabled","hidden","testID","modifiers","extraModifiers","source","componentName","boxModifiers","tint","contentDescription","select","spec","value","then","Error"],"mappings":";AAAA,SAASA,GAAG,EAAEC,QAAQC,WAAW,QAAQ,2BAA2B;AACpE,SAASC,QAAQC,YAAY,QAAQ,qCAAqC;AAG1E,SAASC,qBAAqB,QAAQ,WAAW;AACjD,SAASC,oBAAoB,QAAQ,oBAAoB;AAGzD,SAASC,qBAAqBC,IAAc;IAC1C,IAAIA,QAAQ,OAAOA,SAAS,YAAY,aAAaA,MAAM;QACzD,OAAOA,KAAKC,OAAO;IACrB;IACA,IAAI,OAAOD,SAAS,UAAU;QAC5B,4DAA4D;QAC5D,OAAOE;IACT;IACA,OAAOF;AACT;AAEA;;;;;;;;;;CAUC,GACD,OAAO,SAASP,KAAK,EACnBO,IAAI,EACJL,IAAI,EACJQ,KAAK,EACLC,kBAAkB,EAClBC,KAAK,EACLC,OAAO,EACPC,QAAQ,EACRC,WAAW,EACXC,QAAQ,EACRC,MAAM,EACNC,MAAM,EACNC,WAAWC,cAAc,EACf;IACVhB,sBAAsBU,UAAUC;IAEhC,IAAIE,QAAQ,OAAO;IAEnB,MAAMI,SAASf,qBAAqBC;IACpC,IAAIc,UAAU,MAAM,OAAO;IAE3B,MAAMF,YAAYd,qBAChBO,OACA;QAAEC;QAASG;QAAUC;QAAQC;IAAO,GACpCE,gBACA;QAAEE,eAAe;IAAO;IAG1B,IAAIT,SAAS;QACX,wEAAwE;QACxE,yEAAyE;QACzE,yEAAyE;QACzE,MAAMU,eAAerB,QAAQ,OAAO;YAACC,aAAaD,MAAMA;eAAUiB;SAAU,GAAGA;QAC/E,qBACE,KAACpB;YAAIoB,WAAWI;sBACd,cAAA,KAACtB;gBACCoB,QAAQA;gBACRnB,MAAMA;gBACNsB,MAAMd;gBACNe,oBAAoBd;;;IAI5B;IAEA,qBACE,KAACV;QACCoB,QAAQA;QACRnB,MAAMA;QACNsB,MAAMd;QACNe,oBAAoBd;QACpBQ,WAAWA;;AAGjB;AAEAnB,KAAK0B,MAAM,GAAG,CAACC;IACb,MAAMC,QAAQD,KAAKnB,OAAO;IAC1B,IAAIoB,SAAS,QAAQ,OAAO,AAACA,MAA6BC,IAAI,KAAK,YAAY;QAC7E,MAAM,IAAIC,MACR,gFACE,8EACA,uFACA,uFACA,2CACA;IAEN;IACA,OAAOF;AACT;AAEA,cAAc,UAAU"}
@@ -23,7 +23,9 @@ function resolveIosName(name) {
23
23
  disabled,
24
24
  hidden,
25
25
  testID
26
- }, extraModifiers);
26
+ }, extraModifiers, {
27
+ componentName: 'Icon'
28
+ });
27
29
  return /*#__PURE__*/ _jsx(SwiftUIImage, {
28
30
  systemName: systemName,
29
31
  size: size,
@@ -1 +1 @@
1
- {"version":3,"sources":["universal/Icon/index.ios.tsx"],"sourcesContent":[null],"names":["Image","SwiftUIImage","transformToModifiers","resolveIosName","name","ios","undefined","Icon","size","color","style","onPress","onAppear","onDisappear","disabled","hidden","testID","modifiers","extraModifiers","systemName","select","spec"],"mappings":";AAAA,SAASA,SAASC,YAAY,QAAQ,oBAAoB;AAG1D,SAASC,oBAAoB,QAAQ,oBAAoB;AAGzD,SAASC,eAAeC,IAAc;IACpC,IAAI,OAAOA,SAAS,UAAU;QAC5B,OAAOA;IACT;IACA,IAAIA,QAAQ,OAAOA,SAAS,YAAY,SAASA,MAAM;QACrD,OAAOA,KAAKC,GAAG;IACjB;IACA,6EAA6E;IAC7E,4DAA4D;IAC5D,OAAOC;AACT;AAEA;;;CAGC,GACD,OAAO,SAASC,KAAK,EACnBH,IAAI,EACJI,IAAI,EACJC,KAAK,EACLC,KAAK,EACLC,OAAO,EACPC,QAAQ,EACRC,WAAW,EACXC,QAAQ,EACRC,MAAM,EACNC,MAAM,EACNC,WAAWC,cAAc,EACf;IACV,MAAMC,aAAahB,eAAeC;IAClC,MAAMa,YAAYf,qBAChBQ,OACA;QAAEE;QAAUC;QAAaC;QAAUC;QAAQC;IAAO,GAClDE;IAGF,qBACE,KAACjB;QACCkB,YAAYA;QACZX,MAAMA;QACNC,OAAOA;QACPE,SAASA;QACTM,WAAWA;;AAGjB;AAEAV,KAAKa,MAAM,GAAG,CAACC,OAAyBA,KAAKhB,GAAG;AAEhD,cAAc,UAAU"}
1
+ {"version":3,"sources":["universal/Icon/index.ios.tsx"],"sourcesContent":[null],"names":["Image","SwiftUIImage","transformToModifiers","resolveIosName","name","ios","undefined","Icon","size","color","style","onPress","onAppear","onDisappear","disabled","hidden","testID","modifiers","extraModifiers","systemName","componentName","select","spec"],"mappings":";AAAA,SAASA,SAASC,YAAY,QAAQ,oBAAoB;AAG1D,SAASC,oBAAoB,QAAQ,oBAAoB;AAGzD,SAASC,eAAeC,IAAc;IACpC,IAAI,OAAOA,SAAS,UAAU;QAC5B,OAAOA;IACT;IACA,IAAIA,QAAQ,OAAOA,SAAS,YAAY,SAASA,MAAM;QACrD,OAAOA,KAAKC,GAAG;IACjB;IACA,6EAA6E;IAC7E,4DAA4D;IAC5D,OAAOC;AACT;AAEA;;;CAGC,GACD,OAAO,SAASC,KAAK,EACnBH,IAAI,EACJI,IAAI,EACJC,KAAK,EACLC,KAAK,EACLC,OAAO,EACPC,QAAQ,EACRC,WAAW,EACXC,QAAQ,EACRC,MAAM,EACNC,MAAM,EACNC,WAAWC,cAAc,EACf;IACV,MAAMC,aAAahB,eAAeC;IAClC,MAAMa,YAAYf,qBAChBQ,OACA;QAAEE;QAAUC;QAAaC;QAAUC;QAAQC;IAAO,GAClDE,gBACA;QAAEE,eAAe;IAAO;IAG1B,qBACE,KAACnB;QACCkB,YAAYA;QACZX,MAAMA;QACNC,OAAOA;QACPE,SAASA;QACTM,WAAWA;;AAGjB;AAEAV,KAAKc,MAAM,GAAG,CAACC,OAAyBA,KAAKjB,GAAG;AAEhD,cAAc,UAAU"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Android implementation of `List.ForEach`. Delegates to Jetpack Compose `LazyColumn.Items`.
3
+ */
4
+ export declare const ListForEach: {
5
+ <T>({ recycling, ...props }: import("../../jetpack-compose").LazyItemsProps<T>): import("react").JSX.Element;
6
+ displayName: string;
7
+ };
@@ -0,0 +1,6 @@
1
+ import { createLazyItems } from '../../jetpack-compose/LazyItems';
2
+ /**
3
+ * Android implementation of `List.ForEach`. Delegates to Jetpack Compose `LazyColumn.Items`.
4
+ */ export const ListForEach = createLazyItems('List.ForEach');
5
+
6
+ //# sourceMappingURL=ListForEach.android.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["universal/List/ListForEach.android.tsx"],"sourcesContent":[null],"names":["createLazyItems","ListForEach"],"mappings":"AAAA,SAASA,eAAe,QAAQ,kCAAkC;AAElE;;CAEC,GACD,OAAO,MAAMC,cAAcD,gBAAgB,gBAAgB"}
@@ -0,0 +1,5 @@
1
+ import type { ListForEachProps } from './types';
2
+ /**
3
+ * Renders one row for each item of `data`, and reuses rows while the list scrolls.
4
+ */
5
+ export declare function ListForEach<T>({ recycling, ...props }: ListForEachProps<T>): import("react").JSX.Element;
@@ -0,0 +1,5 @@
1
+ import type { ListForEachProps } from './types';
2
+ /**
3
+ * iOS implementation of `List.ForEach`. Delegates to SwiftUI `List.ForEach`.
4
+ */
5
+ export declare function ListForEach<T>(props: ListForEachProps<T>): import("react").JSX.Element;
@@ -0,0 +1,11 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { ListForEach as SwiftUIListForEach } from '../../swift-ui/List/ListForEach';
3
+ /**
4
+ * iOS implementation of `List.ForEach`. Delegates to SwiftUI `List.ForEach`.
5
+ */ export function ListForEach(props) {
6
+ return /*#__PURE__*/ _jsx(SwiftUIListForEach, {
7
+ ...props
8
+ });
9
+ }
10
+
11
+ //# sourceMappingURL=ListForEach.ios.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["universal/List/ListForEach.ios.tsx"],"sourcesContent":[null],"names":["ListForEach","SwiftUIListForEach","props"],"mappings":";AAAA,SAASA,eAAeC,kBAAkB,QAAQ,kCAAkC;AAGpF;;CAEC,GACD,OAAO,SAASD,YAAeE,KAA0B;IACvD,qBAAO,KAACD;QAAoB,GAAGC,KAAK;;AACtC"}
@@ -0,0 +1,263 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { createContext, Fragment, useCallback, useContext, useEffect, useLayoutEffect, useMemo, useRef, useState } from 'react';
3
+ import { View } from 'react-native';
4
+ import { useItemKeys, useRecycledRows } from '../../recycling/useRecycledRows';
5
+ import { ListScrollContext } from './ListScrollContext';
6
+ const RowSizesContext = /*#__PURE__*/ createContext(null);
7
+ function asHTMLElement(value) {
8
+ return typeof HTMLElement !== 'undefined' && value instanceof HTMLElement ? value : null;
9
+ }
10
+ function getScrollParent(node) {
11
+ for(let parent = node.parentElement; parent; parent = parent.parentElement){
12
+ const { overflowY } = getComputedStyle(parent);
13
+ if ((overflowY === 'auto' || overflowY === 'scroll') && parent.scrollHeight > parent.clientHeight) {
14
+ return parent;
15
+ }
16
+ }
17
+ return document.scrollingElement;
18
+ }
19
+ // Index of the item at `offset`, clamped to the data.
20
+ function getIndexAt(offsets, offset) {
21
+ let low = 0;
22
+ let high = offsets.length - 2;
23
+ while(low < high){
24
+ const middle = low + high + 1 >> 1;
25
+ if (offsets[middle] <= offset) low = middle;
26
+ else high = middle - 1;
27
+ }
28
+ return low;
29
+ }
30
+ /**
31
+ * Renders one row for each item of `data`, and reuses rows while the list scrolls.
32
+ */ export function ListForEach({ recycling = true, ...props }) {
33
+ return recycling ? /*#__PURE__*/ _jsx(RecycledListForEach, {
34
+ ...props
35
+ }) : /*#__PURE__*/ _jsx(StaticListForEach, {
36
+ ...props
37
+ });
38
+ }
39
+ function StaticListForEach({ data, keyExtractor, children: renderItem }) {
40
+ const itemKeys = useItemKeys('List.ForEach', data, keyExtractor);
41
+ return /*#__PURE__*/ _jsx(_Fragment, {
42
+ children: data.map((item, index)=>/*#__PURE__*/ _jsx(Fragment, {
43
+ children: renderItem({
44
+ item,
45
+ index
46
+ })
47
+ }, itemKeys[index]))
48
+ });
49
+ }
50
+ function RecycledListForEach({ data, keyExtractor, children: renderItem, overscanCount, estimatedItemSize = 64 }) {
51
+ const { itemKeys, revision, rows, start, onWindowChange } = useRecycledRows({
52
+ componentName: 'List.ForEach',
53
+ Slot,
54
+ data,
55
+ keyExtractor,
56
+ renderItem,
57
+ overscanCount,
58
+ estimatedItemSize
59
+ });
60
+ const listRef = useContext(ListScrollContext);
61
+ const containerRef = useRef(null);
62
+ const heights = useRef(new Map()).current;
63
+ const [heightsVersion, setHeightsVersion] = useState(0);
64
+ const rowSizes = useMemo(()=>{
65
+ const measures = new Set();
66
+ return {
67
+ measureAll: ()=>measures.forEach((measure)=>measure()),
68
+ register: (measure)=>{
69
+ measures.add(measure);
70
+ return ()=>measures.delete(measure);
71
+ },
72
+ report: (itemKey, height)=>{
73
+ if (!(height > 0) || heights.get(itemKey) === height) return;
74
+ heights.set(itemKey, height);
75
+ setHeightsVersion((version)=>version + 1);
76
+ }
77
+ };
78
+ }, [
79
+ heights
80
+ ]);
81
+ // `offsets[i]` is the top of item `i`; the last entry is the total height.
82
+ const offsets = useMemo(()=>{
83
+ const result = new Float64Array(itemKeys.length + 1);
84
+ itemKeys.forEach((itemKey, index)=>{
85
+ result[index + 1] = result[index] + (heights.get(itemKey) ?? estimatedItemSize);
86
+ });
87
+ return result;
88
+ // `heightsVersion` tracks changes to `heights`.
89
+ }, [
90
+ itemKeys,
91
+ estimatedItemSize,
92
+ heights,
93
+ heightsVersion
94
+ ]);
95
+ const latest = useRef({
96
+ itemKeys,
97
+ offsets,
98
+ revision,
99
+ onWindowChange
100
+ });
101
+ latest.current = {
102
+ itemKeys,
103
+ offsets,
104
+ revision,
105
+ onWindowChange
106
+ };
107
+ // The first visible item and its offset, from the last window update.
108
+ const anchor = useRef(null);
109
+ const updateWindow = useCallback(()=>{
110
+ const container = asHTMLElement(containerRef.current);
111
+ const { itemKeys, offsets, revision, onWindowChange } = latest.current;
112
+ if (!container || offsets.length < 2) return;
113
+ const containerTop = container.getBoundingClientRect().top;
114
+ let top = 0;
115
+ let bottom = window.innerHeight;
116
+ const list = asHTMLElement(listRef?.current);
117
+ if (list) {
118
+ const listRect = list.getBoundingClientRect();
119
+ top = Math.max(top, listRect.top);
120
+ bottom = Math.min(bottom, listRect.bottom);
121
+ }
122
+ const first = getIndexAt(offsets, top - containerTop);
123
+ const last = getIndexAt(offsets, bottom - containerTop);
124
+ anchor.current = {
125
+ itemKeys,
126
+ index: first,
127
+ offset: offsets[first]
128
+ };
129
+ onWindowChange({
130
+ first,
131
+ last: Math.max(first, last),
132
+ revision
133
+ });
134
+ }, [
135
+ listRef
136
+ ]);
137
+ useLayoutEffect(()=>{
138
+ // Rows measured above the first visible row move it, so scroll by the same amount.
139
+ const container = asHTMLElement(containerRef.current);
140
+ const previous = anchor.current;
141
+ if (container && previous?.itemKeys === itemKeys) {
142
+ const delta = offsets[previous.index] - previous.offset;
143
+ const scrollParent = delta === 0 ? null : getScrollParent(container);
144
+ if (scrollParent) scrollParent.scrollTop += delta;
145
+ }
146
+ updateWindow();
147
+ }, [
148
+ updateWindow,
149
+ itemKeys,
150
+ offsets,
151
+ revision
152
+ ]);
153
+ useEffect(()=>{
154
+ const container = asHTMLElement(containerRef.current);
155
+ if (!container) return;
156
+ const onScroll = (event)=>{
157
+ if (event.target instanceof Node && !event.target.contains(container)) return;
158
+ updateWindow();
159
+ };
160
+ const options = {
161
+ capture: true,
162
+ passive: true
163
+ };
164
+ window.addEventListener('scroll', onScroll, options);
165
+ window.addEventListener('resize', updateWindow);
166
+ return ()=>{
167
+ window.removeEventListener('scroll', onScroll, options);
168
+ window.removeEventListener('resize', updateWindow);
169
+ };
170
+ }, [
171
+ updateWindow
172
+ ]);
173
+ useEffect(()=>{
174
+ const live = new Set(itemKeys);
175
+ for (const itemKey of heights.keys()){
176
+ if (!live.has(itemKey)) heights.delete(itemKey);
177
+ }
178
+ }, [
179
+ heights,
180
+ itemKeys
181
+ ]);
182
+ // Row heights depend on the width.
183
+ useEffect(()=>{
184
+ const container = asHTMLElement(containerRef.current);
185
+ if (!container || typeof ResizeObserver === 'undefined') return;
186
+ let width = container.getBoundingClientRect().width;
187
+ const observer = new ResizeObserver(()=>{
188
+ const nextWidth = container.getBoundingClientRect().width;
189
+ if (nextWidth === width) return;
190
+ width = nextWidth;
191
+ heights.clear();
192
+ setHeightsVersion((version)=>version + 1);
193
+ rowSizes.measureAll();
194
+ });
195
+ observer.observe(container);
196
+ return ()=>observer.disconnect();
197
+ }, [
198
+ heights,
199
+ rowSizes
200
+ ]);
201
+ // Rotate the pool from slot order to item order, so the DOM order matches the screen.
202
+ const pivot = rows.length === 0 ? 0 : start % rows.length;
203
+ const orderedRows = [
204
+ ...rows.slice(pivot),
205
+ ...rows.slice(0, pivot)
206
+ ];
207
+ const end = start + rows.length;
208
+ return /*#__PURE__*/ _jsx(RowSizesContext.Provider, {
209
+ value: rowSizes,
210
+ children: /*#__PURE__*/ _jsxs(View, {
211
+ ref: containerRef,
212
+ children: [
213
+ /*#__PURE__*/ _jsx(View, {
214
+ style: {
215
+ height: offsets[start]
216
+ }
217
+ }),
218
+ orderedRows,
219
+ /*#__PURE__*/ _jsx(View, {
220
+ style: {
221
+ height: offsets[itemKeys.length] - offsets[end]
222
+ }
223
+ })
224
+ ]
225
+ })
226
+ });
227
+ }
228
+ function Slot({ itemKey, children }) {
229
+ const rowSizes = useContext(RowSizesContext);
230
+ const ref = useRef(null);
231
+ const itemKeyRef = useRef(itemKey);
232
+ itemKeyRef.current = itemKey;
233
+ const measure = useCallback(()=>{
234
+ const node = asHTMLElement(ref.current);
235
+ if (node) rowSizes?.report(itemKeyRef.current, node.getBoundingClientRect().height);
236
+ }, [
237
+ rowSizes
238
+ ]);
239
+ useLayoutEffect(measure, [
240
+ measure,
241
+ itemKey
242
+ ]);
243
+ useEffect(()=>{
244
+ const node = asHTMLElement(ref.current);
245
+ if (!node || !rowSizes || typeof ResizeObserver === 'undefined') return;
246
+ const observer = new ResizeObserver(measure);
247
+ observer.observe(node);
248
+ const unregister = rowSizes.register(measure);
249
+ return ()=>{
250
+ observer.disconnect();
251
+ unregister();
252
+ };
253
+ }, [
254
+ measure,
255
+ rowSizes
256
+ ]);
257
+ return /*#__PURE__*/ _jsx(View, {
258
+ ref: ref,
259
+ children: children
260
+ });
261
+ }
262
+
263
+ //# sourceMappingURL=ListForEach.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["universal/List/ListForEach.tsx"],"sourcesContent":[null],"names":["createContext","Fragment","useCallback","useContext","useEffect","useLayoutEffect","useMemo","useRef","useState","View","useItemKeys","useRecycledRows","ListScrollContext","RowSizesContext","asHTMLElement","value","HTMLElement","getScrollParent","node","parent","parentElement","overflowY","getComputedStyle","scrollHeight","clientHeight","document","scrollingElement","getIndexAt","offsets","offset","low","high","length","middle","ListForEach","recycling","props","RecycledListForEach","StaticListForEach","data","keyExtractor","children","renderItem","itemKeys","map","item","index","overscanCount","estimatedItemSize","revision","rows","start","onWindowChange","componentName","Slot","listRef","containerRef","heights","Map","current","heightsVersion","setHeightsVersion","rowSizes","measures","Set","measureAll","forEach","measure","register","add","delete","report","itemKey","height","get","set","version","result","Float64Array","latest","anchor","updateWindow","container","containerTop","getBoundingClientRect","top","bottom","window","innerHeight","list","listRect","Math","max","min","first","last","previous","delta","scrollParent","scrollTop","onScroll","event","target","Node","contains","options","capture","passive","addEventListener","removeEventListener","live","keys","has","ResizeObserver","width","observer","nextWidth","clear","observe","disconnect","pivot","orderedRows","slice","end","Provider","ref","style","itemKeyRef","unregister"],"mappings":";AAAA,SACEA,aAAa,EACbC,QAAQ,EACRC,WAAW,EACXC,UAAU,EACVC,SAAS,EACTC,eAAe,EACfC,OAAO,EACPC,MAAM,EACNC,QAAQ,QACH,QAAQ;AACf,SAASC,IAAI,QAAQ,eAAe;AAEpC,SACEC,WAAW,EACXC,eAAe,QAEV,kCAAkC;AACzC,SAASC,iBAAiB,QAAQ,sBAAsB;AASxD,MAAMC,gCAAkBb,cAA+B;AAEvD,SAASc,cAAcC,KAAc;IACnC,OAAO,OAAOC,gBAAgB,eAAeD,iBAAiBC,cAAcD,QAAQ;AACtF;AAEA,SAASE,gBAAgBC,IAAiB;IACxC,IAAK,IAAIC,SAASD,KAAKE,aAAa,EAAED,QAAQA,SAASA,OAAOC,aAAa,CAAE;QAC3E,MAAM,EAAEC,SAAS,EAAE,GAAGC,iBAAiBH;QACvC,IACE,AAACE,CAAAA,cAAc,UAAUA,cAAc,QAAO,KAC9CF,OAAOI,YAAY,GAAGJ,OAAOK,YAAY,EACzC;YACA,OAAOL;QACT;IACF;IACA,OAAOM,SAASC,gBAAgB;AAClC;AAEA,sDAAsD;AACtD,SAASC,WAAWC,OAAqB,EAAEC,MAAc;IACvD,IAAIC,MAAM;IACV,IAAIC,OAAOH,QAAQI,MAAM,GAAG;IAC5B,MAAOF,MAAMC,KAAM;QACjB,MAAME,SAAS,AAACH,MAAMC,OAAO,KAAM;QACnC,IAAIH,OAAO,CAACK,OAAO,IAAKJ,QAAQC,MAAMG;aACjCF,OAAOE,SAAS;IACvB;IACA,OAAOH;AACT;AAEA;;CAEC,GACD,OAAO,SAASI,YAAe,EAAEC,YAAY,IAAI,EAAE,GAAGC,OAA4B;IAChF,OAAOD,0BAAY,KAACE;QAAqB,GAAGD,KAAK;uBAAO,KAACE;QAAmB,GAAGF,KAAK;;AACtF;AAEA,SAASE,kBAAq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MAAMc,OAAOJ,cAAc+G,IAAIlE,OAAO;QACtC,IAAI,CAACzC,QAAQ,CAAC4C,YAAY,OAAOmD,mBAAmB,aAAa;QACjE,MAAME,WAAW,IAAIF,eAAe9C;QACpCgD,SAASG,OAAO,CAACpG;QACjB,MAAM8G,aAAalE,SAASM,QAAQ,CAACD;QACrC,OAAO;YACLgD,SAASI,UAAU;YACnBS;QACF;IACF,GAAG;QAAC7D;QAASL;KAAS;IAEtB,qBAAO,KAACrD;QAAKoH,KAAKA;kBAAMpF;;AAC1B"}
@@ -0,0 +1,5 @@
1
+ import { type RefObject } from 'react';
2
+ /**
3
+ * The web `List` node. `List.ForEach` uses it to find its visible rows.
4
+ */
5
+ export declare const ListScrollContext: import("react").Context<RefObject<unknown> | null>;
@@ -0,0 +1,6 @@
1
+ import { createContext } from 'react';
2
+ /**
3
+ * The web `List` node. `List.ForEach` uses it to find its visible rows.
4
+ */ export const ListScrollContext = createContext(null);
5
+
6
+ //# sourceMappingURL=ListScrollContext.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["universal/List/ListScrollContext.ts"],"sourcesContent":[null],"names":["createContext","ListScrollContext"],"mappings":"AAAA,SAASA,aAAa,QAAwB,QAAQ;AAEtD;;CAEC,GACD,OAAO,MAAMC,oBAAoBD,cAAyC,MAAM"}