@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
@@ -23,20 +23,44 @@ internal enum HorizontalAlignmentOptions: String, Enumerable {
23
23
  public final class VStackViewProps: UIBaseViewProps {
24
24
  @Field var spacing: Double?
25
25
  @Field var alignment: HorizontalAlignmentOptions?
26
+ // Universal `Column` sets this so a child percentage is a fraction of this stack.
27
+ // A SwiftUI `VStack` leaves it off and keeps the platform layout.
28
+ @Field var resolvesChildPercentages: Bool = false
26
29
  }
27
30
 
28
31
  public struct VStackView: ExpoSwiftUI.View {
29
32
  @ObservedObject public var props: VStackViewProps
33
+ // A fraction on this stack is a real size only when the parent opted in.
34
+ @Environment(\.resolvesOwnPercentage) private var resolvesOwnPercentage
30
35
 
31
36
  public init(props: VStackViewProps) {
32
37
  self.props = props
33
38
  }
34
39
 
35
40
  public var body: some View {
41
+ if props.resolvesChildPercentages {
42
+ ParentAwareVStackLayout(
43
+ alignment: props.alignment ?? .center,
44
+ spacing: props.spacing.map { CGFloat($0) },
45
+ ownDimensions: universalLayoutDimensions(from: props.modifiers),
46
+ resolvesOwnPercentage: resolvesOwnPercentage
47
+ ) {
48
+ Children()
49
+ }
50
+ .environment(\.universalPercentageParent, true)
51
+ } else {
52
+ platformStack
53
+ }
54
+ }
55
+
56
+ private var platformStack: some View {
36
57
  VStack(
37
58
  alignment: props.alignment?.toHorizontalAlignment() ?? .center,
38
- spacing: props.spacing.map { CGFloat($0) }) {
39
- Children()
59
+ spacing: props.spacing.map { CGFloat($0) }
60
+ ) {
61
+ Children()
40
62
  }
63
+ // Overrides a Host, so a percentage inside a SwiftUI stack keeps the child's own size.
64
+ .environment(\.universalPercentageParent, false)
41
65
  }
42
66
  }
@@ -0,0 +1 @@
1
+ 1f04b317f757dbed2ba12650ac539706c6a5d9a7a05cc6c004f4b0d752482ca4
@@ -0,0 +1 @@
1
+ 7067f7aabef1e8872cc798d93f8b8bc1736f678f3668d7eb4c13af5cb301454b1bcd184f3d2f8e54e73ad5638956b3e517955166551e94fe5e74ee25c6e7c703
@@ -0,0 +1 @@
1
+ 955a5ea0689652fd52f312a16936c39cdd9a8f98
@@ -0,0 +1 @@
1
+ f1af27ccdcfb9f597881ed992a638e9688a7d42fd7d7b33727b91be3326ca46f
@@ -0,0 +1 @@
1
+ d9237ef0147bd027e017d66df9f61f7c7e2af64b0ecee9b831a039d63262e45dde5db851cba79829ff5d3a0409f43e70686295d0e550ed8e5be377b2b311c581
@@ -3,7 +3,7 @@
3
3
  "component": {
4
4
  "group": "expo.modules.ui",
5
5
  "module": "expo.modules.ui",
6
- "version": "58.0.22",
6
+ "version": "58.0.24",
7
7
  "attributes": {
8
8
  "org.gradle.status": "release"
9
9
  }
@@ -24,13 +24,13 @@
24
24
  },
25
25
  "files": [
26
26
  {
27
- "name": "expo.modules.ui-58.0.22.aar",
28
- "url": "expo.modules.ui-58.0.22.aar",
29
- "size": 1882334,
30
- "sha512": "0a89be2233ee1dd16b1cb671e0694d6d9a428f7f199e3e3efcdd621090c541d435478b39402a6da271373a70cbed690f989e938ebcbbcd35b740e1bf240dfb64",
31
- "sha256": "59cc7013ee6674f030b4f81641fa80fb1829815d6ab5a7903f0e7479e6adb96e",
32
- "sha1": "7acd625f3cd50ad228fac699424fcff3c77942bb",
33
- "md5": "6b7272e2ff6f2f155c76a4e7a3341af6"
27
+ "name": "expo.modules.ui-58.0.24.aar",
28
+ "url": "expo.modules.ui-58.0.24.aar",
29
+ "size": 1946686,
30
+ "sha512": "d9237ef0147bd027e017d66df9f61f7c7e2af64b0ecee9b831a039d63262e45dde5db851cba79829ff5d3a0409f43e70686295d0e550ed8e5be377b2b311c581",
31
+ "sha256": "f1af27ccdcfb9f597881ed992a638e9688a7d42fd7d7b33727b91be3326ca46f",
32
+ "sha1": "955a5ea0689652fd52f312a16936c39cdd9a8f98",
33
+ "md5": "92b25ba3977597adf5cb9f0393240678"
34
34
  }
35
35
  ]
36
36
  },
@@ -141,13 +141,13 @@
141
141
  ],
142
142
  "files": [
143
143
  {
144
- "name": "expo.modules.ui-58.0.22.aar",
145
- "url": "expo.modules.ui-58.0.22.aar",
146
- "size": 1882334,
147
- "sha512": "0a89be2233ee1dd16b1cb671e0694d6d9a428f7f199e3e3efcdd621090c541d435478b39402a6da271373a70cbed690f989e938ebcbbcd35b740e1bf240dfb64",
148
- "sha256": "59cc7013ee6674f030b4f81641fa80fb1829815d6ab5a7903f0e7479e6adb96e",
149
- "sha1": "7acd625f3cd50ad228fac699424fcff3c77942bb",
150
- "md5": "6b7272e2ff6f2f155c76a4e7a3341af6"
144
+ "name": "expo.modules.ui-58.0.24.aar",
145
+ "url": "expo.modules.ui-58.0.24.aar",
146
+ "size": 1946686,
147
+ "sha512": "d9237ef0147bd027e017d66df9f61f7c7e2af64b0ecee9b831a039d63262e45dde5db851cba79829ff5d3a0409f43e70686295d0e550ed8e5be377b2b311c581",
148
+ "sha256": "f1af27ccdcfb9f597881ed992a638e9688a7d42fd7d7b33727b91be3326ca46f",
149
+ "sha1": "955a5ea0689652fd52f312a16936c39cdd9a8f98",
150
+ "md5": "92b25ba3977597adf5cb9f0393240678"
151
151
  }
152
152
  ]
153
153
  },
@@ -161,13 +161,13 @@
161
161
  },
162
162
  "files": [
163
163
  {
164
- "name": "expo.modules.ui-58.0.22-sources.jar",
165
- "url": "expo.modules.ui-58.0.22-sources.jar",
166
- "size": 115385,
167
- "sha512": "6c228c1dcbe9ee23cca52ba20eb724d39d18533e6c31ad738ab5738e5dfc64432b7c79363f7ff772f019f8bda955d0d38ccb3f4331d3236e4beddd70e6e426f4",
168
- "sha256": "2487d657c68bf866e677ef379bc97b7de37edb41eb173b6d8d938b81bfcb2293",
169
- "sha1": "a1628408f238e018286c0c9887ebb3cf9912577d",
170
- "md5": "3367880bd9dfec581496b8b5087f9ae0"
164
+ "name": "expo.modules.ui-58.0.24-sources.jar",
165
+ "url": "expo.modules.ui-58.0.24-sources.jar",
166
+ "size": 122645,
167
+ "sha512": "7067f7aabef1e8872cc798d93f8b8bc1736f678f3668d7eb4c13af5cb301454b1bcd184f3d2f8e54e73ad5638956b3e517955166551e94fe5e74ee25c6e7c703",
168
+ "sha256": "1f04b317f757dbed2ba12650ac539706c6a5d9a7a05cc6c004f4b0d752482ca4",
169
+ "sha1": "9e68c38ef193df41a3c083158aa103c674511b71",
170
+ "md5": "c817ba0333b967a239df3a6777bd57ff"
171
171
  }
172
172
  ]
173
173
  }
@@ -0,0 +1 @@
1
+ a739e264bc86774686e262264edb19ecd35f5ad6
@@ -0,0 +1 @@
1
+ b018bb4a15956f0267805ae2ca622e446fd680e99d01f1a0947492ed63af4732
@@ -0,0 +1 @@
1
+ 166affc52421f1e056de3c34e8e0d82455ee2673de607661f8fb9f8d5eec4951ee2f2fa41e8306ac44a663d17f1668f47c91d7f5b85d34a3dbdb202eb74908a6
@@ -9,7 +9,7 @@
9
9
  <modelVersion>4.0.0</modelVersion>
10
10
  <groupId>expo.modules.ui</groupId>
11
11
  <artifactId>expo.modules.ui</artifactId>
12
- <version>58.0.22</version>
12
+ <version>58.0.24</version>
13
13
  <packaging>aar</packaging>
14
14
  <name>expo.modules.ui</name>
15
15
  <url>https://github.com/expo/expo</url>
@@ -0,0 +1 @@
1
+ 0fcb719b9acd0fc46a710c1338722cf5632fe2b7
@@ -0,0 +1 @@
1
+ 38f70a68469f19a6d150eb63bbcb07323000702e0647a48f4b627a40d50d1814
@@ -0,0 +1 @@
1
+ ee248becc86ca6a41c86c066bfe61257fc0dcf7552d91d50a370d690a8fd6bf123c6e35afb689006491eb7c5ccf9dc372eb6c6f6a77aa57456834c583908e8d8
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@expo/ui",
3
- "version": "58.0.22",
3
+ "version": "58.0.24",
4
4
  "description": "A collection of UI components",
5
5
  "keywords": [
6
6
  "Jetpack Compose",
@@ -186,7 +186,8 @@ export function BottomSheet(props: BottomSheetProps) {
186
186
  return (
187
187
  <BottomSheetInternalContext.Provider value={internalContextValue}>
188
188
  <BottomSheetContext.Provider value={methods}>
189
- <Host style={{ position: 'absolute', width }} pointerEvents="none">
189
+ {/* Fill the parent, so `removeClippedSubviews` doesn't detach a zero-height host. */}
190
+ <Host style={{ position: 'absolute', top: 0, bottom: 0, width }} pointerEvents="none">
190
191
  <ModalBottomSheet
191
192
  ref={sheetRef}
192
193
  onDismissRequest={handleDismiss}
@@ -127,13 +127,14 @@ export function MenuView(props: MenuComponentProps & { ref?: React.Ref<MenuCompo
127
127
  // RNHostView requires a single ReactElement; wrap in a fragment so callers
128
128
  // can pass any `ReactNode` (string, array, etc.).
129
129
  const trigger = (
130
- <RNHostView matchContents>
130
+ <RNHostView matchContents boundedByHost>
131
131
  <>{children}</>
132
132
  </RNHostView>
133
133
  );
134
134
 
135
+ // Sized by Yoga like a `View`, so the trigger can fill or wrap in the space it is given.
135
136
  return (
136
- <Host matchContents style={style} testID={testID} ignoreSafeArea="all">
137
+ <Host style={style} testID={testID} ignoreSafeArea="all">
137
138
  {shouldOpenOnLongPress ? (
138
139
  <ContextMenu>
139
140
  <ContextMenu.Trigger>{trigger}</ContextMenu.Trigger>
@@ -27,6 +27,11 @@ export interface ColumnProps extends PrimitiveBaseProps {
27
27
  * Vertical alignment of children.
28
28
  */
29
29
  verticalAlignment?: VerticalAlignment;
30
+ /**
31
+ * When `true`, a child percentage is a fraction of this column.
32
+ * Universal `Column` sets this. Leave it unset to keep the Compose `Column`.
33
+ */
34
+ resolvesChildPercentages?: boolean;
30
35
  }
31
36
 
32
37
  const ColumnNativeView: React.ComponentType<ColumnProps> = requireNativeView(
@@ -27,6 +27,11 @@ export interface RowProps extends PrimitiveBaseProps {
27
27
  * Vertical alignment of children.
28
28
  */
29
29
  verticalAlignment?: VerticalAlignment;
30
+ /**
31
+ * When `true`, a child percentage is a fraction of this row.
32
+ * Universal `Row` sets this. Leave it unset to keep the Compose `Row`.
33
+ */
34
+ resolvesChildPercentages?: boolean;
30
35
  }
31
36
 
32
37
  const RowNativeView: React.ComponentType<RowProps> = requireNativeView('ExpoUI', 'RowView');
@@ -4,6 +4,7 @@ import type { ColorValue } from 'react-native';
4
4
 
5
5
  import { type ModifierConfig } from '../../types';
6
6
  import { getTextFromChildren } from '../../utils';
7
+ import { flattenFragments } from '../../utils/flattenFragments';
7
8
  import { createViewModifierEventListener } from '../modifiers/utils';
8
9
 
9
10
  /**
@@ -260,7 +261,7 @@ const TextNativeView: React.ComponentType<NativeTextProps> = requireNativeView(
260
261
  function collectSpans(children: React.ReactNode): TextSpanRecord[] | null {
261
262
  if (children === undefined || children === null) return null;
262
263
 
263
- const childArray = React.Children.toArray(children);
264
+ const childArray = flattenFragments(children);
264
265
  if (childArray.length === 0) return null;
265
266
 
266
267
  const hasNestedText = childArray.some(
@@ -294,14 +295,14 @@ function collectSpans(children: React.ReactNode): TextSpanRecord[] | null {
294
295
  if (nestedSpans) {
295
296
  span.children = nestedSpans;
296
297
  } else {
297
- span.text = getTextFromChildren(childProps.children) ?? '';
298
+ span.text = getTextFromChildren(flattenFragments(childProps.children)) ?? '';
298
299
  }
299
300
 
300
301
  spans.push(span);
301
302
  } else if (__DEV__ && React.isValidElement(child)) {
302
303
  console.warn(
303
304
  'Text: Unsupported child element of type "%s" inside <Text>. Only <Text>, string, and number children are supported.',
304
- typeof child.type === 'function' ? child.type.name || 'Unknown' : child.type
305
+ typeof child.type === 'function' ? child.type.name || 'Unknown' : String(child.type)
305
306
  );
306
307
  }
307
308
  }
@@ -319,7 +320,7 @@ function transformTextProps(props: TextProps): NativeTextProps {
319
320
  ...(modifiers ? createViewModifierEventListener(modifiers) : undefined),
320
321
  ...restProps,
321
322
  // When spans are present, use them instead of flat text
322
- ...(spans ? { spans } : { text: getTextFromChildren(children) ?? '' }),
323
+ ...(spans ? { spans } : { text: getTextFromChildren(flattenFragments(children)) ?? '' }),
323
324
  // Extract typography from style (used as base style)
324
325
  typography: style?.typography,
325
326
  // Flatten other style properties (these override the typography style)
@@ -53,6 +53,8 @@ export type RecycledRows = {
53
53
  revision: number;
54
54
  /** The pooled rows to mount, one per slot. */
55
55
  rows: ReactElement[];
56
+ /** Index of the first item in the pool. */
57
+ start: number;
56
58
  /** Applies a native window request. */
57
59
  onWindowChange: (event: WindowChangeEvent) => void;
58
60
  /** Whether a native event was sent for the data currently committed to native. */
@@ -169,6 +171,7 @@ export function useRecycledRows<ItemT>({
169
171
  itemKeys,
170
172
  revision: current.revision,
171
173
  rows,
174
+ start,
172
175
  isCurrentRevision: (revision) => revision === committedRevision.current,
173
176
  onWindowChange: (event) => {
174
177
  if (
@@ -1,6 +1,8 @@
1
1
  import { requireNativeView } from 'expo';
2
+ import { type ReactNode } from 'react';
2
3
  import { type SFSymbol } from 'sf-symbols-typescript';
3
4
 
5
+ import { Slot } from '../SlotView';
4
6
  import { createViewModifierEventListener } from '../modifiers/utils';
5
7
  import { type CommonViewModifierProps } from '../types';
6
8
 
@@ -19,15 +21,24 @@ export interface ContentUnavailableViewProps extends CommonViewModifierProps {
19
21
  * Description of why the content is not available.
20
22
  */
21
23
  description?: string;
24
+
25
+ /**
26
+ * Controls shown below the description, such as a `Button` that tries again.
27
+ */
28
+ actions?: ReactNode;
22
29
  }
23
30
 
24
- const ContentUnavailableViewNativeView: React.ComponentType<ContentUnavailableViewProps> =
31
+ type NativeContentUnavailableViewProps = Omit<ContentUnavailableViewProps, 'actions'> & {
32
+ children?: ReactNode;
33
+ };
34
+
35
+ const ContentUnavailableViewNativeView: React.ComponentType<NativeContentUnavailableViewProps> =
25
36
  requireNativeView('ExpoUI', 'ContentUnavailableView');
26
37
 
27
38
  function transformContentUnavailableViewProps(
28
39
  props: ContentUnavailableViewProps
29
- ): ContentUnavailableViewProps {
30
- const { modifiers, ...restProps } = props;
40
+ ): NativeContentUnavailableViewProps {
41
+ const { modifiers, actions, ...restProps } = props;
31
42
  return {
32
43
  modifiers,
33
44
  ...(modifiers ? createViewModifierEventListener(modifiers) : undefined),
@@ -41,5 +52,9 @@ function transformContentUnavailableViewProps(
41
52
  * @platform tvos 17.0+
42
53
  */
43
54
  export function ContentUnavailableView(props: ContentUnavailableViewProps) {
44
- return <ContentUnavailableViewNativeView {...transformContentUnavailableViewProps(props)} />;
55
+ return (
56
+ <ContentUnavailableViewNativeView {...transformContentUnavailableViewProps(props)}>
57
+ {props.actions != null ? <Slot name="actions">{props.actions}</Slot> : null}
58
+ </ContentUnavailableViewNativeView>
59
+ );
45
60
  }
@@ -13,6 +13,12 @@ export interface HStackProps extends CommonViewModifierProps {
13
13
  * The vertical alignment of children within the stack.
14
14
  */
15
15
  alignment?: 'top' | 'center' | 'bottom' | 'firstTextBaseline' | 'lastTextBaseline';
16
+ /**
17
+ * When `true`, a child percentage is a fraction of this stack.
18
+ * Universal `Row` sets this. Leave it unset to keep the SwiftUI `HStack`.
19
+ * @hidden
20
+ */
21
+ resolvesChildPercentages?: boolean;
16
22
  }
17
23
 
18
24
  const HStackNativeView: React.ComponentType<HStackProps> = requireNativeView(
@@ -19,13 +19,19 @@ export interface RNHostViewProps {
19
19
  */
20
20
  matchContents?: boolean | { vertical?: boolean; horizontal?: boolean };
21
21
  onLayout?: (event: LayoutChangeEvent) => void;
22
+ /**
23
+ * Measures the children within the space Yoga gives the `Host`. SwiftUI layout between the
24
+ * `Host` and this view (padding, siblings, scroll views) is not taken into account.
25
+ * @hidden
26
+ */
27
+ boundedByHost?: boolean;
22
28
  /**
23
29
  * The RN View to be hosted.
24
30
  */
25
31
  children: React.ReactElement;
26
32
  }
27
33
 
28
- export function RNHostView({ matchContents, ...props }: RNHostViewProps) {
34
+ export function RNHostView({ matchContents, boundedByHost, ...props }: RNHostViewProps) {
29
35
  // A sheet or popover presents its content in its own view controller, where the React Native
30
36
  // surface root is not an ancestor and so touch dispatches don't work.
31
37
  // Hosted content there owns its touches and is the origin it is measured from; native reads
@@ -41,6 +47,7 @@ export function RNHostView({ matchContents, ...props }: RNHostViewProps) {
41
47
  matchContentsHorizontal={matchContentsHorizontal}
42
48
  matchContentsVertical={matchContentsVertical}
43
49
  expoInternalSizeFromChildren={matchContentsHorizontal || matchContentsVertical}
50
+ expoInternalBoundedByHost={boundedByHost}
44
51
  // `matchContents` can only be used once on mount
45
52
  // So we force unmount when it changes to prevent unexpected layout
46
53
  key={`${matchContentsHorizontal}-${matchContentsVertical}`}>
@@ -1,6 +1,7 @@
1
1
  import { requireNativeView } from 'expo';
2
2
  import * as React from 'react';
3
3
 
4
+ import { flattenFragments } from '../../utils/flattenFragments';
4
5
  import { createViewModifierEventListener } from '../modifiers/utils';
5
6
  import { type ClosedRangeDate, type CommonViewModifierProps } from '../types';
6
7
 
@@ -98,7 +99,7 @@ export function Text(props: TextProps) {
98
99
  return null;
99
100
  }
100
101
 
101
- const childArray = React.Children.toArray(children);
102
+ const childArray = flattenFragments(children);
102
103
  if (childArray.length === 0) return null;
103
104
 
104
105
  const isSimpleText = childArray.every(
@@ -13,6 +13,12 @@ export interface VStackProps extends CommonViewModifierProps {
13
13
  * The spacing between children.
14
14
  */
15
15
  spacing?: number;
16
+ /**
17
+ * When `true`, a child percentage is a fraction of this stack.
18
+ * Universal `Column` sets this. Leave it unset to keep the SwiftUI `VStack`.
19
+ * @hidden
20
+ */
21
+ resolvesChildPercentages?: boolean;
16
22
  }
17
23
 
18
24
  const VStackNativeView: React.ComponentType<VStackProps> = requireNativeView(
@@ -1458,6 +1458,16 @@ export const font = (params: {
1458
1458
  | 'footnote'
1459
1459
  | 'caption'
1460
1460
  | 'caption2';
1461
+ /**
1462
+ * Draws both lowercase and uppercase letters as small capitals.
1463
+ * @see Official [SwiftUI documentation](https://developer.apple.com/documentation/swiftui/font/smallcaps()).
1464
+ */
1465
+ smallCaps?: boolean;
1466
+ /**
1467
+ * The space between lines of text, relative to the font's standard leading.
1468
+ * @see Official [SwiftUI documentation](https://developer.apple.com/documentation/swiftui/font/leading(_:)).
1469
+ */
1470
+ leading?: 'standard' | 'tight' | 'loose';
1461
1471
  }) => createModifier('font', params);
1462
1472
  /**
1463
1473
  * A standard size for Dynamic Type, from `xSmall` through the five
@@ -1734,6 +1744,15 @@ export type ListStyle = 'automatic' | 'plain' | 'inset' | 'insetGrouped' | 'grou
1734
1744
  */
1735
1745
  export const listStyle = (style: ListStyle) => createModifier('listStyle', { style });
1736
1746
 
1747
+ /**
1748
+ * Sets the label that a list's section index shows for this `Section`. People tap or drag along
1749
+ * the index to scroll the list to the section. On versions before iOS 26 it does nothing.
1750
+ * @param label - The label for the section, usually a single letter.
1751
+ * @platform ios 26.0+
1752
+ * @see Official [SwiftUI documentation](https://developer.apple.com/documentation/swiftui/view/sectionindexlabel(_:)).
1753
+ */
1754
+ export const sectionIndexLabel = (label: string) => createModifier('sectionIndexLabel', { label });
1755
+
1737
1756
  /**
1738
1757
  * Adds a luminance to alpha effect to this view.
1739
1758
  * @see Official [SwiftUI documentation](https://developer.apple.com/documentation/SwiftUI/View/luminanceToAlpha()).
@@ -6,6 +6,7 @@ import {
6
6
  type ModifierConfig,
7
7
  } from '@expo/ui/jetpack-compose/modifiers';
8
8
  import { useEffect, useRef, useState } from 'react';
9
+ import { StyleSheet } from 'react-native';
9
10
 
10
11
  import { useIsInsideNativeTree } from '../../NativeTreeContext';
11
12
  import type { BottomSheetProps, SnapPoint } from './types';
@@ -102,7 +103,8 @@ export function BottomSheet({
102
103
  return sheet;
103
104
  }
104
105
  return (
105
- <Host style={{ position: 'absolute' }} pointerEvents="none">
106
+ // Fill the parent, so `removeClippedSubviews` doesn't detach a zero-size host.
107
+ <Host style={StyleSheet.absoluteFill} pointerEvents="none">
106
108
  {sheet}
107
109
  </Host>
108
110
  );
@@ -26,7 +26,9 @@ export function Button({
26
26
 
27
27
  if (hidden) return null;
28
28
 
29
- const modifiers = transformToModifiers(style, { disabled, hidden, testID }, extraModifiers);
29
+ const modifiers = transformToModifiers(style, { disabled, hidden, testID }, extraModifiers, {
30
+ componentName: 'Button',
31
+ });
30
32
 
31
33
  const content = children ?? <Text>{label ?? ''}</Text>;
32
34
  const commonProps = {
@@ -34,7 +34,8 @@ export function Button({
34
34
  const universalModifiers = transformToModifiers(
35
35
  style,
36
36
  { onAppear, onDisappear, disabled, hidden, testID },
37
- extraModifiers
37
+ extraModifiers,
38
+ { componentName: 'Button' }
38
39
  );
39
40
 
40
41
  const modifiers = [...buttonSpecificModifiers, ...universalModifiers];
@@ -14,7 +14,10 @@ export function Collapsible({
14
14
  children,
15
15
  }: CollapsibleProps) {
16
16
  const labelTextModifiers = labelStyle
17
- ? transformToModifiers(undefined, {}, undefined, { textStyle: labelStyle })
17
+ ? transformToModifiers(undefined, {}, undefined, {
18
+ componentName: 'Collapsible',
19
+ textStyle: labelStyle,
20
+ })
18
21
  : undefined;
19
22
 
20
23
  return (
@@ -31,13 +31,15 @@ export function Column({
31
31
  const modifiers = transformToModifiers(
32
32
  style,
33
33
  { onPress: disabled ? undefined : onPress, disabled, hidden, testID },
34
- extraModifiers
34
+ extraModifiers,
35
+ { componentName: 'Column' }
35
36
  );
36
37
 
37
38
  return (
38
39
  <ComposeColumn
39
40
  horizontalAlignment={alignmentMap[alignment]}
40
41
  verticalArrangement={spacing != null ? { spacedBy: spacing } : undefined}
42
+ resolvesChildPercentages
41
43
  modifiers={modifiers}>
42
44
  {children}
43
45
  </ComposeColumn>
@@ -33,7 +33,7 @@ export function Column({
33
33
  style,
34
34
  { onPress, onAppear, onDisappear, disabled, hidden, testID },
35
35
  extraModifiers,
36
- { frameAlignment: frameAlignmentMap[alignment] }
36
+ { componentName: 'Column', frameAlignment: frameAlignmentMap[alignment] }
37
37
  );
38
38
 
39
39
  return (
@@ -41,6 +41,7 @@ export function Column({
41
41
  alignment={alignmentMap[alignment]}
42
42
  spacing={spacing}
43
43
  modifiers={modifiers}
44
+ resolvesChildPercentages
44
45
  testID={testID}>
45
46
  {children}
46
47
  </VStack>
@@ -1,13 +1,16 @@
1
1
  import { Pressable, StyleSheet, View, type ViewStyle } from 'react-native';
2
2
 
3
3
  import { useUniversalLifecycle } from '../hooks';
4
+ import { StackAxisContext, useCrossAxisSize } from '../stackAxis';
4
5
  import type { UniversalAlignment } from '../types';
5
6
  import type { ColumnProps } from './types';
6
7
 
7
8
  const styles = StyleSheet.create({
8
- // `alignSelf: 'stretch'` — match SwiftUI `VStack` / Compose `Column`, which fill their parent's cross-axis.
9
- // Without this, a nested Column inherits its parent's `alignItems` (often `flex-start`) and shrinks to content.
10
- column: { flexDirection: 'column', alignSelf: 'stretch' },
9
+ column: { flexDirection: 'column' },
10
+ // Fill the parent's cross axis when this column has no size of its own on that axis.
11
+ // A set size must not use stretch: that overrides the parent's `alignItems`,
12
+ // and the column then sits at the start.
13
+ stretch: { alignSelf: 'stretch' },
11
14
  hidden: { display: 'none' },
12
15
  disabled: {
13
16
  opacity: 0.5,
@@ -37,6 +40,7 @@ export function Column({
37
40
  testID,
38
41
  }: ColumnProps) {
39
42
  useUniversalLifecycle(onAppear, onDisappear);
43
+ const crossAxisSize = useCrossAxisSize(style);
40
44
 
41
45
  const Container = onPress ? Pressable : View;
42
46
 
@@ -47,13 +51,14 @@ export function Column({
47
51
  testID={testID}
48
52
  style={[
49
53
  styles.column,
54
+ crossAxisSize == null && styles.stretch,
50
55
  alignmentStyles[alignment],
51
56
  spacing != null && { gap: spacing },
52
57
  style,
53
58
  hidden && styles.hidden,
54
59
  disabled && styles.disabled,
55
60
  ]}>
56
- {children}
61
+ <StackAxisContext.Provider value="vertical">{children}</StackAxisContext.Provider>
57
62
  </Container>
58
63
  );
59
64
  }
@@ -27,7 +27,14 @@ export function FieldGroup({
27
27
  if (hidden) return null;
28
28
 
29
29
  const mergedStyle = { backgroundColor: colors.surface, ...style };
30
- const modifiers = transformToModifiers(mergedStyle, { disabled, hidden, testID }, extraModifiers);
30
+ const modifiers = transformToModifiers(
31
+ mergedStyle,
32
+ { disabled, hidden, testID },
33
+ extraModifiers,
34
+ {
35
+ componentName: 'FieldGroup',
36
+ }
37
+ );
31
38
 
32
39
  return (
33
40
  <LazyColumn
@@ -20,7 +20,8 @@ export function FieldGroup({
20
20
  const modifiers = transformToModifiers(
21
21
  style,
22
22
  { onAppear, onDisappear, disabled, hidden, testID },
23
- extraModifiers
23
+ extraModifiers,
24
+ { componentName: 'FieldGroup' }
24
25
  );
25
26
 
26
27
  return <Form modifiers={modifiers}>{children}</Form>;