@expo/ui 57.0.13 → 57.0.15

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 (160) hide show
  1. package/CHANGELOG.md +34 -0
  2. package/android/build.gradle +2 -2
  3. package/android/src/main/java/expo/modules/ui/ExpoUIModule.kt +17 -3
  4. package/android/src/main/java/expo/modules/ui/ProgressView.kt +31 -0
  5. package/android/src/main/java/expo/modules/ui/RNHostView.kt +161 -11
  6. package/build/PresentedContentContext.d.ts +18 -0
  7. package/build/PresentedContentContext.d.ts.map +1 -0
  8. package/build/community/pager-view/PagerView.android.d.ts.map +1 -1
  9. package/build/jetpack-compose/AlertDialog/index.d.ts.map +1 -1
  10. package/build/jetpack-compose/BasicAlertDialog/index.d.ts.map +1 -1
  11. package/build/jetpack-compose/DropdownMenu/index.d.ts.map +1 -1
  12. package/build/jetpack-compose/ExposedDropdownMenuBox/ExposedDropdownMenu.d.ts.map +1 -1
  13. package/build/jetpack-compose/Host/index.d.ts +3 -0
  14. package/build/jetpack-compose/Host/index.d.ts.map +1 -1
  15. package/build/jetpack-compose/ModalBottomSheet/index.d.ts.map +1 -1
  16. package/build/jetpack-compose/Progress/index.d.ts +25 -2
  17. package/build/jetpack-compose/Progress/index.d.ts.map +1 -1
  18. package/build/jetpack-compose/RNHostView/index.d.ts +6 -6
  19. package/build/jetpack-compose/RNHostView/index.d.ts.map +1 -1
  20. package/build/jetpack-compose/TextField/shared.d.ts +2 -1
  21. package/build/jetpack-compose/TextField/shared.d.ts.map +1 -1
  22. package/build/jetpack-compose/Tooltip/index.d.ts.map +1 -1
  23. package/build/keyboard/index.d.ts +43 -0
  24. package/build/keyboard/index.d.ts.map +1 -0
  25. package/build/keyboard/interop.d.ts +16 -0
  26. package/build/keyboard/interop.d.ts.map +1 -0
  27. package/build/keyboard/textInputState.d.ts +2 -0
  28. package/build/keyboard/textInputState.d.ts.map +1 -0
  29. package/build/keyboard/textInputState.web.d.ts +11 -0
  30. package/build/keyboard/textInputState.web.d.ts.map +1 -0
  31. package/build/swift-ui/Background/index.d.ts +18 -0
  32. package/build/swift-ui/Background/index.d.ts.map +1 -0
  33. package/build/swift-ui/BottomSheet/index.d.ts.map +1 -1
  34. package/build/swift-ui/Host/index.d.ts +3 -0
  35. package/build/swift-ui/Host/index.d.ts.map +1 -1
  36. package/build/swift-ui/Popover/index.d.ts.map +1 -1
  37. package/build/swift-ui/RNHostView.d.ts +4 -1
  38. package/build/swift-ui/RNHostView.d.ts.map +1 -1
  39. package/build/swift-ui/SecureField/index.d.ts.map +1 -1
  40. package/build/swift-ui/TextField/index.d.ts.map +1 -1
  41. package/build/swift-ui/index.d.ts +1 -0
  42. package/build/swift-ui/index.d.ts.map +1 -1
  43. package/build/swift-ui/modifiers/index.d.ts +9 -34
  44. package/build/swift-ui/modifiers/index.d.ts.map +1 -1
  45. package/build/swift-ui/modifiers/presentationModifiers.d.ts +3 -2
  46. package/build/swift-ui/modifiers/presentationModifiers.d.ts.map +1 -1
  47. package/build/swift-ui/modifiers/shapeStyle.d.ts +54 -0
  48. package/build/swift-ui/modifiers/shapeStyle.d.ts.map +1 -0
  49. package/build/universal/BottomSheet/index.android.d.ts +1 -1
  50. package/build/universal/BottomSheet/index.android.d.ts.map +1 -1
  51. package/build/universal/BottomSheet/index.d.ts +1 -1
  52. package/build/universal/BottomSheet/index.d.ts.map +1 -1
  53. package/build/universal/BottomSheet/index.ios.d.ts +1 -1
  54. package/build/universal/BottomSheet/index.ios.d.ts.map +1 -1
  55. package/build/universal/BottomSheet/types.d.ts +20 -0
  56. package/build/universal/BottomSheet/types.d.ts.map +1 -1
  57. package/build/universal/ListItem/ListItem.android.d.ts.map +1 -1
  58. package/build/universal/ListItem/types.d.ts +19 -0
  59. package/build/universal/ListItem/types.d.ts.map +1 -1
  60. package/build/universal/RNHostView/index.android.d.ts +1 -1
  61. package/build/universal/RNHostView/index.android.d.ts.map +1 -1
  62. package/build/universal/RNHostView/index.d.ts +1 -1
  63. package/build/universal/RNHostView/index.d.ts.map +1 -1
  64. package/build/universal/RNHostView/index.ios.d.ts +1 -1
  65. package/build/universal/RNHostView/index.ios.d.ts.map +1 -1
  66. package/build/universal/RNHostView/types.d.ts +2 -0
  67. package/build/universal/RNHostView/types.d.ts.map +1 -1
  68. package/build/utils/useMergeRefs.d.ts +12 -0
  69. package/build/utils/useMergeRefs.d.ts.map +1 -0
  70. package/expo-module.config.json +1 -1
  71. package/ios/BackgroundView.swift +34 -0
  72. package/ios/ColorPickerView.swift +1 -1
  73. package/ios/Convertibles/ShapeStyleValue.swift +129 -0
  74. package/ios/ExpoUIModule.swift +4 -0
  75. package/ios/HostView.swift +7 -0
  76. package/ios/Modifiers/ForegroundStyleModifier.swift +12 -105
  77. package/ios/Modifiers/ViewModifierRegistry.swift +29 -5
  78. package/ios/RNHostView.swift +64 -4
  79. package/local-maven-repo/expo/modules/ui/expo.modules.ui/{57.0.13/expo.modules.ui-57.0.13-sources.jar → 57.0.15/expo.modules.ui-57.0.15-sources.jar} +0 -0
  80. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.15/expo.modules.ui-57.0.15-sources.jar.md5 +1 -0
  81. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.15/expo.modules.ui-57.0.15-sources.jar.sha1 +1 -0
  82. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.15/expo.modules.ui-57.0.15-sources.jar.sha256 +1 -0
  83. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.15/expo.modules.ui-57.0.15-sources.jar.sha512 +1 -0
  84. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.15/expo.modules.ui-57.0.15.aar +0 -0
  85. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.15/expo.modules.ui-57.0.15.aar.md5 +1 -0
  86. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.15/expo.modules.ui-57.0.15.aar.sha1 +1 -0
  87. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.15/expo.modules.ui-57.0.15.aar.sha256 +1 -0
  88. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.15/expo.modules.ui-57.0.15.aar.sha512 +1 -0
  89. package/local-maven-repo/expo/modules/ui/expo.modules.ui/{57.0.13/expo.modules.ui-57.0.13.module → 57.0.15/expo.modules.ui-57.0.15.module} +22 -22
  90. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.15/expo.modules.ui-57.0.15.module.md5 +1 -0
  91. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.15/expo.modules.ui-57.0.15.module.sha1 +1 -0
  92. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.15/expo.modules.ui-57.0.15.module.sha256 +1 -0
  93. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.15/expo.modules.ui-57.0.15.module.sha512 +1 -0
  94. package/local-maven-repo/expo/modules/ui/expo.modules.ui/{57.0.13/expo.modules.ui-57.0.13.pom → 57.0.15/expo.modules.ui-57.0.15.pom} +1 -1
  95. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.15/expo.modules.ui-57.0.15.pom.md5 +1 -0
  96. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.15/expo.modules.ui-57.0.15.pom.sha1 +1 -0
  97. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.15/expo.modules.ui-57.0.15.pom.sha256 +1 -0
  98. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.15/expo.modules.ui-57.0.15.pom.sha512 +1 -0
  99. package/local-maven-repo/expo/modules/ui/expo.modules.ui/maven-metadata.xml +4 -4
  100. package/local-maven-repo/expo/modules/ui/expo.modules.ui/maven-metadata.xml.md5 +1 -1
  101. package/local-maven-repo/expo/modules/ui/expo.modules.ui/maven-metadata.xml.sha1 +1 -1
  102. package/local-maven-repo/expo/modules/ui/expo.modules.ui/maven-metadata.xml.sha256 +1 -1
  103. package/local-maven-repo/expo/modules/ui/expo.modules.ui/maven-metadata.xml.sha512 +1 -1
  104. package/package.json +4 -4
  105. package/src/PresentedContentContext.tsx +22 -0
  106. package/src/community/pager-view/PagerView.android.tsx +1 -7
  107. package/src/jetpack-compose/AlertDialog/index.tsx +6 -1
  108. package/src/jetpack-compose/BasicAlertDialog/index.tsx +7 -1
  109. package/src/jetpack-compose/DropdownMenu/index.tsx +7 -1
  110. package/src/jetpack-compose/ExposedDropdownMenuBox/ExposedDropdownMenu.tsx +3 -1
  111. package/src/jetpack-compose/Host/index.tsx +28 -17
  112. package/src/jetpack-compose/ModalBottomSheet/index.tsx +8 -1
  113. package/src/jetpack-compose/Progress/index.tsx +32 -2
  114. package/src/jetpack-compose/RNHostView/index.tsx +28 -13
  115. package/src/jetpack-compose/TextField/shared.ts +7 -1
  116. package/src/jetpack-compose/Tooltip/index.tsx +2 -1
  117. package/src/keyboard/index.tsx +243 -0
  118. package/src/keyboard/interop.ts +99 -0
  119. package/src/keyboard/textInputState.ts +2 -0
  120. package/src/keyboard/textInputState.web.ts +16 -0
  121. package/src/swift-ui/Background/index.tsx +38 -0
  122. package/src/swift-ui/BottomSheet/index.tsx +4 -1
  123. package/src/swift-ui/Host/index.tsx +33 -18
  124. package/src/swift-ui/Popover/index.tsx +7 -1
  125. package/src/swift-ui/RNHostView.tsx +20 -3
  126. package/src/swift-ui/SecureField/index.tsx +8 -2
  127. package/src/swift-ui/TextField/index.tsx +8 -1
  128. package/src/swift-ui/index.tsx +1 -0
  129. package/src/swift-ui/modifiers/index.ts +10 -39
  130. package/src/swift-ui/modifiers/presentationModifiers.ts +3 -2
  131. package/src/swift-ui/modifiers/shapeStyle.ts +55 -0
  132. package/src/ts-declarations/react-native-text-input-state.d.ts +26 -0
  133. package/src/universal/BottomSheet/index.android.tsx +4 -0
  134. package/src/universal/BottomSheet/index.ios.tsx +5 -0
  135. package/src/universal/BottomSheet/index.tsx +4 -0
  136. package/src/universal/BottomSheet/types.ts +22 -0
  137. package/src/universal/ListItem/ListItem.android.tsx +2 -1
  138. package/src/universal/ListItem/types.ts +21 -0
  139. package/src/universal/RNHostView/index.android.tsx +2 -1
  140. package/src/universal/RNHostView/index.ios.tsx +6 -2
  141. package/src/universal/RNHostView/index.tsx +2 -0
  142. package/src/universal/RNHostView/types.ts +3 -0
  143. package/src/utils/useMergeRefs.ts +47 -0
  144. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.13/expo.modules.ui-57.0.13-sources.jar.md5 +0 -1
  145. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.13/expo.modules.ui-57.0.13-sources.jar.sha1 +0 -1
  146. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.13/expo.modules.ui-57.0.13-sources.jar.sha256 +0 -1
  147. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.13/expo.modules.ui-57.0.13-sources.jar.sha512 +0 -1
  148. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.13/expo.modules.ui-57.0.13.aar +0 -0
  149. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.13/expo.modules.ui-57.0.13.aar.md5 +0 -1
  150. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.13/expo.modules.ui-57.0.13.aar.sha1 +0 -1
  151. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.13/expo.modules.ui-57.0.13.aar.sha256 +0 -1
  152. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.13/expo.modules.ui-57.0.13.aar.sha512 +0 -1
  153. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.13/expo.modules.ui-57.0.13.module.md5 +0 -1
  154. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.13/expo.modules.ui-57.0.13.module.sha1 +0 -1
  155. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.13/expo.modules.ui-57.0.13.module.sha256 +0 -1
  156. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.13/expo.modules.ui-57.0.13.module.sha512 +0 -1
  157. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.13/expo.modules.ui-57.0.13.pom.md5 +0 -1
  158. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.13/expo.modules.ui-57.0.13.pom.sha1 +0 -1
  159. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.13/expo.modules.ui-57.0.13.pom.sha256 +0 -1
  160. package/local-maven-repo/expo/modules/ui/expo.modules.ui/57.0.13/expo.modules.ui-57.0.13.pom.sha512 +0 -1
@@ -5,22 +5,59 @@ import ExpoModulesCore
5
5
 
6
6
  internal final class RNHostViewProps: ExpoSwiftUI.ViewProps {
7
7
  @Field var matchContents: Bool = false
8
+ /**
9
+ Adds LeafNode and MeasurableYogaNode trait in Shadow node
10
+ */
11
+ @Field var expoInternalSizeFromChildren: Bool = false
12
+ /**
13
+ Whether this view owns its subtree's touches and is the origin its content is measured from. Set
14
+ by the JavaScript side for content presented in its own view controller — see `RNHostView.tsx`,
15
+ which reads it from the sheet or popover presenting the content.
16
+
17
+ Also read by `ExpoViewShadowNode` in C++, which turns it into the `RootNodeKind` trait so
18
+ `measure()` stops its ancestor walk here.
19
+ */
20
+ @Field var layoutRoot: Bool = false
8
21
  }
9
22
 
23
+ // Touches and `measure()` must agree on a coordinate space. Which space depends on where the
24
+ // content sits:
25
+ // Normal tree:
26
+ // The surface root above us already dispatches, in surface coordinates. We attach
27
+ // nothing and publish a content origin, so `measure()` matches those touches.
28
+ // Sheet, popover:
29
+ // Presented in its own view controller, so nothing above dispatches and the
30
+ // content would get no touches at all. We attach our own handler, and
31
+ // `layoutRoot` measures from this view — the space those touches arrive in.
32
+ //
33
+ // Attaching a handler in the normal tree would give the subtree two streams in two spaces: UIKit
34
+ // delivers a touch to the hit view and every ancestor, and the root's cannot be suppressed from
35
+ // below, so presses would cancel on any movement.
10
36
  struct RNHostView: ExpoSwiftUI.View {
11
37
 
12
38
  @ObservedObject var props: RNHostViewProps
13
- // Owns the RCTSurfaceTouchHandler we attach to the hosted RN view so it is detached again when
14
- // this host disappears.
15
39
  @StateObject private var touchHandler = RNHostTouchHandler()
16
40
 
17
41
  var body: some View {
42
+ hostedContent
43
+ .modifier(
44
+ PublishContentOriginModifier(
45
+ shadowNodeProxy: props.shadowNodeProxy,
46
+ isEnabled: !props.layoutRoot
47
+ )
48
+ )
49
+ }
50
+
51
+ @ViewBuilder
52
+ private var hostedContent: some View {
18
53
  if props.matchContents, let childUIView = firstChildUIView {
19
54
  ApplySizeFromYogaNode(childUIView: childUIView) {
20
55
  Children()
21
56
  }
22
57
  .onAppear {
23
- touchHandler.attach(to: childUIView)
58
+ if props.layoutRoot {
59
+ touchHandler.attach(to: childUIView)
60
+ }
24
61
  }
25
62
  .onDisappear {
26
63
  touchHandler.detach()
@@ -40,7 +77,7 @@ struct RNHostView: ExpoSwiftUI.View {
40
77
  .frame(maxWidth: .infinity, maxHeight: .infinity)
41
78
  .modifier(ReportSizeToYogaNodeModifier(shadowNodeProxy: props.shadowNodeProxy))
42
79
  .onAppear {
43
- if let view = firstChildUIView {
80
+ if props.layoutRoot, let view = firstChildUIView {
44
81
  touchHandler.attach(to: view)
45
82
  }
46
83
  }
@@ -55,6 +92,29 @@ struct RNHostView: ExpoSwiftUI.View {
55
92
  }
56
93
  }
57
94
 
95
+ // Publishes where SwiftUI placed this view inside its `Host`, so `measure()` reports the position
96
+ // the hosted content actually occupies.
97
+ private struct PublishContentOriginModifier: ViewModifier {
98
+ let shadowNodeProxy: ExpoSwiftUI.ShadowNodeProxy
99
+ let isEnabled: Bool
100
+
101
+ func body(content: Content) -> some View {
102
+ if isEnabled {
103
+ content
104
+ .onGeometryChange(for: CGRect.self) { proxy in
105
+ proxy.frame(in: .named(expoHostCoordinateSpace))
106
+ } action: { frame in
107
+ shadowNodeProxy.setContentOrigin?(frame.origin)
108
+ }
109
+ .onDisappear {
110
+ shadowNodeProxy.clearContentOrigin?()
111
+ }
112
+ } else {
113
+ content
114
+ }
115
+ }
116
+ }
117
+
58
118
  // Tracks the `RCTSurfaceTouchHandler` attached to a hosted RN view so it can be detached when the
59
119
  // `RNHostView` disappears, instead of leaking onto the recycled component view.
60
120
  private final class RNHostTouchHandler: ObservableObject {
@@ -0,0 +1 @@
1
+ c0de9f779e4c1fa3758abcbbee8831628a015e11cc4d7242fd1c1ead65a62eef
@@ -0,0 +1 @@
1
+ 20a3c1eb5e1bddbb7b3708606f314fbffaa9165cff2e148826fd2e7cd7e1def14e2b3e7ef1190ba853b66f5a71f3d32c05c71f7c7e98dc8470d2e5c2bfccd752
@@ -0,0 +1 @@
1
+ 413330dc1478358eefbcd2ad21a352e69567b868
@@ -0,0 +1 @@
1
+ 3954246789a3258d28107744fc6c8ffb721f105c6403279b0e93ca1a961bcddb
@@ -0,0 +1 @@
1
+ 0fed5da498418bb5841100fac2b2f04d302598b81abd4159f62c8f1caecca14b831712cfff61039087834f9f1f32fe6b695cbab710e70a1b969e0bae70e471f0
@@ -3,7 +3,7 @@
3
3
  "component": {
4
4
  "group": "expo.modules.ui",
5
5
  "module": "expo.modules.ui",
6
- "version": "57.0.13",
6
+ "version": "57.0.15",
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-57.0.13.aar",
28
- "url": "expo.modules.ui-57.0.13.aar",
29
- "size": 1992502,
30
- "sha512": "faa66634546960f551adaa7cda25a99fc7cff82c44a44f9ff7e6e272d562fa26bea6d54c54f0135e50c7cfab38cf0eee9496ab9ddb8f2c704a9a11a690568817",
31
- "sha256": "8ba276c06e3fda532a8966a0adc15f3c5e32067ffea21c69b9bf91c449cef93a",
32
- "sha1": "bd3b99b6985648ac5a8b5250422386cb9777482e",
33
- "md5": "64fd0f1ca916ebe5cb6d23da5899df6c"
27
+ "name": "expo.modules.ui-57.0.15.aar",
28
+ "url": "expo.modules.ui-57.0.15.aar",
29
+ "size": 1996194,
30
+ "sha512": "0fed5da498418bb5841100fac2b2f04d302598b81abd4159f62c8f1caecca14b831712cfff61039087834f9f1f32fe6b695cbab710e70a1b969e0bae70e471f0",
31
+ "sha256": "3954246789a3258d28107744fc6c8ffb721f105c6403279b0e93ca1a961bcddb",
32
+ "sha1": "413330dc1478358eefbcd2ad21a352e69567b868",
33
+ "md5": "edd3e3bac5983521c3fb8ba7a1830f75"
34
34
  }
35
35
  ]
36
36
  },
@@ -141,13 +141,13 @@
141
141
  ],
142
142
  "files": [
143
143
  {
144
- "name": "expo.modules.ui-57.0.13.aar",
145
- "url": "expo.modules.ui-57.0.13.aar",
146
- "size": 1992502,
147
- "sha512": "faa66634546960f551adaa7cda25a99fc7cff82c44a44f9ff7e6e272d562fa26bea6d54c54f0135e50c7cfab38cf0eee9496ab9ddb8f2c704a9a11a690568817",
148
- "sha256": "8ba276c06e3fda532a8966a0adc15f3c5e32067ffea21c69b9bf91c449cef93a",
149
- "sha1": "bd3b99b6985648ac5a8b5250422386cb9777482e",
150
- "md5": "64fd0f1ca916ebe5cb6d23da5899df6c"
144
+ "name": "expo.modules.ui-57.0.15.aar",
145
+ "url": "expo.modules.ui-57.0.15.aar",
146
+ "size": 1996194,
147
+ "sha512": "0fed5da498418bb5841100fac2b2f04d302598b81abd4159f62c8f1caecca14b831712cfff61039087834f9f1f32fe6b695cbab710e70a1b969e0bae70e471f0",
148
+ "sha256": "3954246789a3258d28107744fc6c8ffb721f105c6403279b0e93ca1a961bcddb",
149
+ "sha1": "413330dc1478358eefbcd2ad21a352e69567b868",
150
+ "md5": "edd3e3bac5983521c3fb8ba7a1830f75"
151
151
  }
152
152
  ]
153
153
  },
@@ -161,13 +161,13 @@
161
161
  },
162
162
  "files": [
163
163
  {
164
- "name": "expo.modules.ui-57.0.13-sources.jar",
165
- "url": "expo.modules.ui-57.0.13-sources.jar",
166
- "size": 99038,
167
- "sha512": "e5168296d77aefce39432efe6ebece0da6c78ee8dfcde914ae0166912b335b277f482bd0a347c52fc02d95a4f1bab27c004d0fd46b5aa90c3e047b036b2b316f",
168
- "sha256": "202b4f6d1b483d93f4a457a0c2823fb597e90e2ceb05a355e35bbd2a0f847097",
169
- "sha1": "477d48b6fb609e6e83752cf761439f3432207248",
170
- "md5": "28e3a694241e4bc5167c6a9ff2470b87"
164
+ "name": "expo.modules.ui-57.0.15-sources.jar",
165
+ "url": "expo.modules.ui-57.0.15-sources.jar",
166
+ "size": 101673,
167
+ "sha512": "20a3c1eb5e1bddbb7b3708606f314fbffaa9165cff2e148826fd2e7cd7e1def14e2b3e7ef1190ba853b66f5a71f3d32c05c71f7c7e98dc8470d2e5c2bfccd752",
168
+ "sha256": "c0de9f779e4c1fa3758abcbbee8831628a015e11cc4d7242fd1c1ead65a62eef",
169
+ "sha1": "8f8ba3c03ae3deb578a50866e3aa7c1da0a1608a",
170
+ "md5": "727cf7bc8ccb03288f429d152d19ebb8"
171
171
  }
172
172
  ]
173
173
  }
@@ -0,0 +1 @@
1
+ 0b9ff6c6054311175dc6bd90b07c314a7ede6f84
@@ -0,0 +1 @@
1
+ 78e5605f43fc4b0f3d2f9a15f1c4fdec5c2ea8cd318b91c420b6eb15dd5eb494
@@ -0,0 +1 @@
1
+ 5f05356766b79d9fdcf15c07d42f0d07954b8ccf6603f68f05ce2c1520ef4a7be053913ea4dc39f8c9d778ab0e844d3933e057b56073a68eecb6acbc4dffca05
@@ -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>57.0.13</version>
12
+ <version>57.0.15</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
+ 20bca33f9608309fa2b6d4b60f481576201db951
@@ -0,0 +1 @@
1
+ 05310f77cf9090370c199b477a3a20040419deaf872950d919fe112d9820ca3b
@@ -0,0 +1 @@
1
+ 872bf3ee828e9dcea87db32b2396a6eb3cccacffdedf263d0f85a7943ca20d09fbb5e97c6f20bcd2852e128597f47f67ed957b76350335de57c13f5a103cd67f
@@ -3,11 +3,11 @@
3
3
  <groupId>expo.modules.ui</groupId>
4
4
  <artifactId>expo.modules.ui</artifactId>
5
5
  <versioning>
6
- <latest>57.0.13</latest>
7
- <release>57.0.13</release>
6
+ <latest>57.0.15</latest>
7
+ <release>57.0.15</release>
8
8
  <versions>
9
- <version>57.0.13</version>
9
+ <version>57.0.15</version>
10
10
  </versions>
11
- <lastUpdated>20260824074615</lastUpdated>
11
+ <lastUpdated>20260901160721</lastUpdated>
12
12
  </versioning>
13
13
  </metadata>
@@ -1 +1 @@
1
- c5687c59b58e66b61d7ad8422409a52b
1
+ ef804b0b5130bf45649f48809235610b
@@ -1 +1 @@
1
- 19e37e7626a16f1bed2cb5e7e532fe5b2849156f
1
+ 00c505224838ff5cfc459029b30fbe70426dc730
@@ -1 +1 @@
1
- 53945cd66292791187c0bc9fab8427ab497726954b09a946a1b4324dc85ac04f
1
+ 0f4c9b5ca861ed3f22c5b000a3022934d9956a512c8c28ddb6b70f883ba75503
@@ -1 +1 @@
1
- e3b22c7838747c4ad21b1a89b65060b12b1511e30770682da53e9056895af8cbad35096654e090e29bc57b794de2f6b0390f70db5c4d3b75187edbbf36f321cb
1
+ 786895d2586ce5fb37d448df152d909e98c025c03aaf2270c419fd12255f58901f577deb0cb4d9f63fad7d3c591b528caee5583839c481d23c1737e8646dd681
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@expo/ui",
3
- "version": "57.0.13",
3
+ "version": "57.0.15",
4
4
  "description": "A collection of UI components",
5
5
  "sideEffects": [
6
6
  "*.fx.js",
@@ -96,8 +96,8 @@
96
96
  "@types/react": "~19.2.0",
97
97
  "react-native-reanimated": "4.5.1",
98
98
  "react-native-worklets": "0.10.1",
99
- "expo": "57.0.16",
100
- "expo-module-scripts": "56.0.3"
99
+ "expo-module-scripts": "56.0.3",
100
+ "expo": "57.0.19"
101
101
  },
102
102
  "jest": {
103
103
  "preset": "expo-module-scripts"
@@ -121,7 +121,7 @@
121
121
  "optional": true
122
122
  }
123
123
  },
124
- "gitHead": "52fc013ec8c75e89ba8f83c167e4b6b0416e6bf7",
124
+ "gitHead": "b76ecf192c5325793bcea31dd9bb8efd91f9ad7f",
125
125
  "scripts": {
126
126
  "build": "expo-module build",
127
127
  "clean": "expo-module clean",
@@ -0,0 +1,22 @@
1
+ import { createContext, useContext, type ReactNode } from 'react';
2
+
3
+ export const PresentedContentContext = createContext(false);
4
+
5
+ /**
6
+ * Whether the surrounding content is presented in its own view controller — a sheet, a popover
7
+ * — rather than in the React Native surface.
8
+ *
9
+ * `RNHostView` needs this because nothing above such content dispatches React Native touches: the
10
+ * surface root is not one of its ancestors. A hosted view there has to dispatch its own touches and
11
+ * be the origin its content is measured from, and both of those come from a single `layoutRoot`
12
+ * prop.
13
+ *
14
+ * Defaults to `false`, so content that is not wrapped keeps deferring to the surface root.
15
+ */
16
+ export function useIsPresentedInOwnWindow(): boolean {
17
+ return useContext(PresentedContentContext);
18
+ }
19
+
20
+ export function PresentedContent({ children }: { children: ReactNode }) {
21
+ return <PresentedContentContext.Provider value>{children}</PresentedContentContext.Provider>;
22
+ }
@@ -77,13 +77,7 @@ export function PagerView(props: PagerViewProps) {
77
77
  const pages = Children.toArray(children)
78
78
  .filter((child): child is ReactElement => isValidElement(child))
79
79
  .map((child, index) => (
80
- <RNHostView
81
- key={child.key ?? String(index)}
82
- // Overlap pages at one origin so each page's RN shadow position matches
83
- // where Compose draws it; otherwise `measure()`-based hit-testing
84
- // (e.g. `Pressable`) misfires on pages after the first (#46386).
85
- style={StyleSheet.absoluteFill}
86
- modifiers={[fillMaxSize()]}>
80
+ <RNHostView key={child.key ?? String(index)} modifiers={[fillMaxSize()]}>
87
81
  <View style={styles.page} pointerEvents={index === settledPage ? 'auto' : 'none'}>
88
82
  {child}
89
83
  </View>
@@ -1,6 +1,7 @@
1
1
  import { requireNativeView } from 'expo';
2
2
  import { type ColorValue } from 'react-native';
3
3
 
4
+ import { PresentedContent } from '../../PresentedContentContext';
4
5
  import { type ViewEvent, type ModifierConfig, type DialogProperties } from '../../types';
5
6
  import { createViewModifierEventListener } from '../modifiers/utils';
6
7
 
@@ -123,7 +124,11 @@ function AlertDialogIcon(props: { children: React.ReactNode }) {
123
124
  */
124
125
  function AlertDialogComponent(props: AlertDialogProps) {
125
126
  const { children, ...restProps } = props;
126
- return <AlertDialogNativeView {...transformProps(restProps)}>{children}</AlertDialogNativeView>;
127
+ return (
128
+ <AlertDialogNativeView {...transformProps(restProps)}>
129
+ <PresentedContent>{children}</PresentedContent>
130
+ </AlertDialogNativeView>
131
+ );
127
132
  }
128
133
 
129
134
  AlertDialogComponent.Title = AlertDialogTitle;
@@ -1,5 +1,6 @@
1
1
  import { requireNativeView } from 'expo';
2
2
 
3
+ import { PresentedContent } from '../../PresentedContentContext';
3
4
  import { type ViewEvent, type ModifierConfig, type DialogProperties } from '../../types';
4
5
  import { createViewModifierEventListener } from '../modifiers/utils';
5
6
 
@@ -51,7 +52,12 @@ function transformProps(props: BasicAlertDialogProps): NativeBasicAlertDialogPro
51
52
  * Unlike `AlertDialog`, this component does not have structured title/text/buttons slots.
52
53
  */
53
54
  export function BasicAlertDialog(props: BasicAlertDialogProps) {
54
- return <BasicAlertDialogNativeView {...transformProps(props)} />;
55
+ const { children, ...rest } = props;
56
+ return (
57
+ <BasicAlertDialogNativeView {...transformProps(rest as BasicAlertDialogProps)}>
58
+ <PresentedContent>{children}</PresentedContent>
59
+ </BasicAlertDialogNativeView>
60
+ );
55
61
  }
56
62
 
57
63
  // Re-exported so the docs generator includes DialogProperties on the BasicAlertDialog API page.
@@ -2,6 +2,7 @@ import { requireNativeView } from 'expo';
2
2
  import type { ReactNode } from 'react';
3
3
  import type { StyleProp, ViewStyle, ColorValue } from 'react-native';
4
4
 
5
+ import { PresentedContent } from '../../PresentedContentContext';
5
6
  import type { ModifierConfig } from '../../types';
6
7
  import { createViewModifierEventListener } from '../modifiers/utils';
7
8
 
@@ -67,7 +68,12 @@ type NativeMenuProps = {
67
68
  * Children should be `DropdownMenuItem` components or other native views.
68
69
  */
69
70
  export function Items(props: { children: ReactNode }) {
70
- return <SlotNativeView slotName="items">{props.children}</SlotNativeView>;
71
+ // The items are presented in their own popup window; the trigger stays in the React Native surface.
72
+ return (
73
+ <SlotNativeView slotName="items">
74
+ <PresentedContent>{props.children}</PresentedContent>
75
+ </SlotNativeView>
76
+ );
71
77
  }
72
78
  Items.tag = 'Items';
73
79
 
@@ -2,6 +2,7 @@ import { requireNativeView } from 'expo';
2
2
  import type { ReactNode } from 'react';
3
3
  import { type ColorValue } from 'react-native';
4
4
 
5
+ import { PresentedContent } from '../../PresentedContentContext';
5
6
  import { type ModifierConfig } from '../../types';
6
7
  import { createViewModifierEventListener } from '../modifiers/utils';
7
8
 
@@ -48,7 +49,8 @@ export function ExposedDropdownMenu(props: ExposedDropdownMenuProps) {
48
49
  modifiers={modifiers}
49
50
  {...(modifiers ? createViewModifierEventListener(modifiers) : undefined)}
50
51
  {...restProps}>
51
- {children}
52
+ {/* The menu is a popup in its own window. The anchor stays in `ExposedDropdownMenuBox`. */}
53
+ <PresentedContent>{children}</PresentedContent>
52
54
  </NativeView>
53
55
  );
54
56
  }
@@ -1,5 +1,5 @@
1
1
  import { requireNativeView } from 'expo';
2
- import { useMemo } from 'react';
2
+ import { useMemo, type Ref } from 'react';
3
3
  import {
4
4
  type ColorSchemeName,
5
5
  type ColorValue,
@@ -9,6 +9,8 @@ import {
9
9
  useColorScheme as useRNColorScheme,
10
10
  } from 'react-native';
11
11
 
12
+ import { TextInputHostProvider, useTextInputHostRef } from '../../keyboard';
13
+ import { useMergeRefs } from '../../utils/useMergeRefs';
12
14
  import { getMaterialColors, HostPaletteContext } from '../colors';
13
15
  import { type PrimitiveBaseProps } from '../layout';
14
16
 
@@ -65,6 +67,8 @@ export interface HostProps extends PrimitiveBaseProps {
65
67
  children: React.ReactNode;
66
68
  style?: StyleProp<ViewStyle>;
67
69
  pointerEvents?: 'box-none' | 'none' | 'box-only' | 'auto';
70
+ /** @hidden */
71
+ ref?: Ref<any>;
68
72
  }
69
73
 
70
74
  type NativeHostProps = Omit<HostProps, 'colorScheme'> & {
@@ -72,6 +76,7 @@ type NativeHostProps = Omit<HostProps, 'colorScheme'> & {
72
76
  matchContentsHorizontal?: boolean;
73
77
  colorScheme?: ColorSchemeName;
74
78
  seedColor?: ColorValue;
79
+ ref?: Ref<any>;
75
80
  };
76
81
 
77
82
  const HostNativeView: React.ComponentType<NativeHostProps> = requireNativeView(
@@ -87,6 +92,7 @@ export function Host(props: HostProps) {
87
92
  layoutDirection,
88
93
  colorScheme,
89
94
  seedColor,
95
+ ref,
90
96
  ...restProps
91
97
  } = props;
92
98
  const schemeString = colorScheme === 'light' || colorScheme === 'dark' ? colorScheme : undefined;
@@ -97,25 +103,30 @@ export function Host(props: HostProps) {
97
103
  () => getMaterialColors({ scheme: resolvedScheme, seedColor }),
98
104
  [resolvedScheme, seedColor]
99
105
  );
106
+ const hostRef = useTextInputHostRef();
107
+ const mergedRef = useMergeRefs(ref, hostRef);
100
108
 
101
109
  return (
102
110
  <HostPaletteContext.Provider value={palette}>
103
- <HostNativeView
104
- {...restProps}
105
- modifiers={modifiers}
106
- matchContentsVertical={
107
- typeof matchContents === 'object' ? matchContents.vertical : matchContents
108
- }
109
- matchContentsHorizontal={
110
- typeof matchContents === 'object' ? matchContents.horizontal : matchContents
111
- }
112
- colorScheme={schemeString}
113
- seedColor={seedColor}
114
- onLayoutContent={onLayoutContent}
115
- layoutDirection={
116
- layoutDirection ?? (I18nManager.getConstants().isRTL ? 'rightToLeft' : 'leftToRight')
117
- }
118
- />
111
+ <TextInputHostProvider hostRef={hostRef}>
112
+ <HostNativeView
113
+ {...restProps}
114
+ modifiers={modifiers}
115
+ matchContentsVertical={
116
+ typeof matchContents === 'object' ? matchContents.vertical : matchContents
117
+ }
118
+ matchContentsHorizontal={
119
+ typeof matchContents === 'object' ? matchContents.horizontal : matchContents
120
+ }
121
+ colorScheme={schemeString}
122
+ seedColor={seedColor}
123
+ onLayoutContent={onLayoutContent}
124
+ layoutDirection={
125
+ layoutDirection ?? (I18nManager.getConstants().isRTL ? 'rightToLeft' : 'leftToRight')
126
+ }
127
+ ref={mergedRef}
128
+ />
129
+ </TextInputHostProvider>
119
130
  </HostPaletteContext.Provider>
120
131
  );
121
132
  }
@@ -2,6 +2,7 @@ import { requireNativeView } from 'expo';
2
2
  import type { Ref, ReactNode, ComponentType } from 'react';
3
3
  import type { ColorValue } from 'react-native';
4
4
 
5
+ import { PresentedContent } from '../../PresentedContentContext';
5
6
  import { type ModifierConfig } from '../../types';
6
7
  import { createViewModifierEventListener } from '../modifiers/utils';
7
8
 
@@ -138,7 +139,13 @@ function DragHandle(props: { children: ReactNode }) {
138
139
  * A Material Design modal bottom sheet.
139
140
  */
140
141
  function ModalBottomSheetComponent(props: ModalBottomSheetProps) {
141
- return <ModalBottomSheetNativeView {...transformProps(props)} />;
142
+ const { children, ...rest } = props;
143
+ // The whole sheet, drag handle included, is presented in its own window, so all of it is marked.
144
+ return (
145
+ <ModalBottomSheetNativeView {...transformProps(rest as ModalBottomSheetProps)}>
146
+ <PresentedContent>{children}</PresentedContent>
147
+ </ModalBottomSheetNativeView>
148
+ );
142
149
  }
143
150
 
144
151
  ModalBottomSheetComponent.DragHandle = DragHandle;
@@ -128,9 +128,38 @@ export const CircularProgressIndicator = createProgressComponent<CircularProgres
128
128
 
129
129
  // endregion
130
130
 
131
+ // region WavyProgressIndicators
132
+
133
+ /**
134
+ * Wave configuration shared by the wavy progress indicator variants.
135
+ */
136
+ export type WavyProgressCommonConfig = {
137
+ /**
138
+ * Height of the wave, where `0` draws a flat line and `1` draws the full wave height.
139
+ * When set, the amplitude stays the same across the whole track.
140
+ * When omitted, a determinate indicator uses the Material 3 default, which flattens the wave as
141
+ * progress approaches `0` and `1`.
142
+ * An indeterminate indicator defaults to the full wave height.
143
+ */
144
+ amplitude?: number;
145
+ /**
146
+ * Length of a single wave in dp. `CircularWavyProgressIndicator` rounds this to fit a whole
147
+ * number of waves around the ring, so the wave it draws can be slightly shorter or longer.
148
+ */
149
+ wavelength?: number;
150
+ /**
151
+ * Speed of the wave in dp per second. Defaults to `wavelength`, which advances the wave by one
152
+ * wavelength per second. Set it to `0` to stop the wave from moving.
153
+ */
154
+ waveSpeed?: number;
155
+ };
156
+
157
+ // endregion
158
+
131
159
  // region LinearWavyProgressIndicator
132
160
 
133
- export interface LinearWavyProgressIndicatorProps extends ProgressCommonConfig {
161
+ export interface LinearWavyProgressIndicatorProps
162
+ extends ProgressCommonConfig, WavyProgressCommonConfig {
134
163
  /**
135
164
  * Size of the stop indicator in dp at the end of the determinate progress track.
136
165
  */
@@ -149,7 +178,8 @@ export const LinearWavyProgressIndicator =
149
178
 
150
179
  // region CircularWavyProgressIndicator
151
180
 
152
- export interface CircularWavyProgressIndicatorProps extends ProgressCommonConfig {}
181
+ export interface CircularWavyProgressIndicatorProps
182
+ extends ProgressCommonConfig, WavyProgressCommonConfig {}
153
183
 
154
184
  /**
155
185
  * A circular progress indicator with wavy animation style.