@expo/ui 56.0.16 → 56.0.18

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 (133) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/android/build.gradle +2 -2
  3. package/android/src/main/java/expo/modules/ui/ExpoUIModule.kt +40 -6
  4. package/android/src/main/java/expo/modules/ui/HostView.kt +0 -2
  5. package/android/src/main/java/expo/modules/ui/ModalBottomSheetView.kt +14 -0
  6. package/android/src/main/java/expo/modules/ui/ModifierRegistry.kt +20 -0
  7. package/android/src/main/java/expo/modules/ui/RNHostView.kt +182 -6
  8. package/android/src/main/java/expo/modules/ui/textfield/BasicTextField.kt +203 -0
  9. package/android/src/main/java/expo/modules/ui/{TextFieldView.kt → textfield/TextField.kt} +34 -248
  10. package/android/src/main/java/expo/modules/ui/textfield/TextFieldShared.kt +299 -0
  11. package/build/State/useNativeState.d.ts +8 -3
  12. package/build/State/useNativeState.d.ts.map +1 -1
  13. package/build/community/bottom-sheet/BottomSheet.android.d.ts.map +1 -1
  14. package/build/community/pager-view/PagerView.android.d.ts.map +1 -1
  15. package/build/jetpack-compose/ModalBottomSheet/index.d.ts +6 -0
  16. package/build/jetpack-compose/ModalBottomSheet/index.d.ts.map +1 -1
  17. package/build/jetpack-compose/RNHostView/index.d.ts +8 -0
  18. package/build/jetpack-compose/RNHostView/index.d.ts.map +1 -1
  19. package/build/jetpack-compose/TextField/BasicTextField.d.ts +36 -0
  20. package/build/jetpack-compose/TextField/BasicTextField.d.ts.map +1 -0
  21. package/build/jetpack-compose/TextField/TextField.d.ts +131 -0
  22. package/build/jetpack-compose/TextField/TextField.d.ts.map +1 -0
  23. package/build/jetpack-compose/TextField/index.d.ts +3 -244
  24. package/build/jetpack-compose/TextField/index.d.ts.map +1 -1
  25. package/build/jetpack-compose/TextField/shared.d.ts +171 -0
  26. package/build/jetpack-compose/TextField/shared.d.ts.map +1 -0
  27. package/build/jetpack-compose/index.d.ts +1 -1
  28. package/build/jetpack-compose/index.d.ts.map +1 -1
  29. package/build/jetpack-compose/modifiers/index.d.ts +11 -0
  30. package/build/jetpack-compose/modifiers/index.d.ts.map +1 -1
  31. package/build/swift-ui/Image/index.d.ts +3 -1
  32. package/build/swift-ui/Image/index.d.ts.map +1 -1
  33. package/build/swift-ui/modifiers/index.d.ts +34 -5
  34. package/build/swift-ui/modifiers/index.d.ts.map +1 -1
  35. package/build/swift-ui/modifiers/widgets.d.ts +7 -0
  36. package/build/swift-ui/modifiers/widgets.d.ts.map +1 -1
  37. package/build/universal/Button/index.ios.d.ts.map +1 -1
  38. package/build/universal/FieldGroup/FieldSectionSlots.d.ts.map +1 -1
  39. package/build/universal/FieldGroup/groupChildren.d.ts.map +1 -1
  40. package/build/universal/Text/index.ios.d.ts.map +1 -1
  41. package/build/universal/TextInput/index.android.d.ts.map +1 -1
  42. package/build/universal/TextInput/types.d.ts +5 -1
  43. package/build/universal/TextInput/types.d.ts.map +1 -1
  44. package/build/universal/modifierUtils.d.ts +16 -0
  45. package/build/universal/modifierUtils.d.ts.map +1 -0
  46. package/build/universal/transformStyle.android.d.ts +3 -0
  47. package/build/universal/transformStyle.android.d.ts.map +1 -1
  48. package/build/universal/transformStyle.ios.d.ts +3 -0
  49. package/build/universal/transformStyle.ios.d.ts.map +1 -1
  50. package/build/universal/types.d.ts +2 -0
  51. package/build/universal/types.d.ts.map +1 -1
  52. package/expo-module.config.json +1 -1
  53. package/ios/ImageView.swift +1 -5
  54. package/ios/Modifiers/ImageScaleModifier.swift +29 -0
  55. package/ios/Modifiers/OnGeometryChangeModifier.swift +8 -16
  56. package/ios/Modifiers/ViewModifierRegistry.swift +36 -0
  57. package/ios/Modifiers/WidgetModifiers.swift +12 -0
  58. package/local-maven-repo/expo/modules/ui/expo.modules.ui/{56.0.16/expo.modules.ui-56.0.16-sources.jar → 56.0.18/expo.modules.ui-56.0.18-sources.jar} +0 -0
  59. package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.18/expo.modules.ui-56.0.18-sources.jar.md5 +1 -0
  60. package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.18/expo.modules.ui-56.0.18-sources.jar.sha1 +1 -0
  61. package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.18/expo.modules.ui-56.0.18-sources.jar.sha256 +1 -0
  62. package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.18/expo.modules.ui-56.0.18-sources.jar.sha512 +1 -0
  63. package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.18/expo.modules.ui-56.0.18.aar +0 -0
  64. package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.18/expo.modules.ui-56.0.18.aar.md5 +1 -0
  65. package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.18/expo.modules.ui-56.0.18.aar.sha1 +1 -0
  66. package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.18/expo.modules.ui-56.0.18.aar.sha256 +1 -0
  67. package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.18/expo.modules.ui-56.0.18.aar.sha512 +1 -0
  68. package/local-maven-repo/expo/modules/ui/expo.modules.ui/{56.0.16/expo.modules.ui-56.0.16.module → 56.0.18/expo.modules.ui-56.0.18.module} +22 -22
  69. package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.18/expo.modules.ui-56.0.18.module.md5 +1 -0
  70. package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.18/expo.modules.ui-56.0.18.module.sha1 +1 -0
  71. package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.18/expo.modules.ui-56.0.18.module.sha256 +1 -0
  72. package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.18/expo.modules.ui-56.0.18.module.sha512 +1 -0
  73. package/local-maven-repo/expo/modules/ui/expo.modules.ui/{56.0.16/expo.modules.ui-56.0.16.pom → 56.0.18/expo.modules.ui-56.0.18.pom} +1 -1
  74. package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.18/expo.modules.ui-56.0.18.pom.md5 +1 -0
  75. package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.18/expo.modules.ui-56.0.18.pom.sha1 +1 -0
  76. package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.18/expo.modules.ui-56.0.18.pom.sha256 +1 -0
  77. package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.18/expo.modules.ui-56.0.18.pom.sha512 +1 -0
  78. package/local-maven-repo/expo/modules/ui/expo.modules.ui/maven-metadata.xml +4 -4
  79. package/local-maven-repo/expo/modules/ui/expo.modules.ui/maven-metadata.xml.md5 +1 -1
  80. package/local-maven-repo/expo/modules/ui/expo.modules.ui/maven-metadata.xml.sha1 +1 -1
  81. package/local-maven-repo/expo/modules/ui/expo.modules.ui/maven-metadata.xml.sha256 +1 -1
  82. package/local-maven-repo/expo/modules/ui/expo.modules.ui/maven-metadata.xml.sha512 +1 -1
  83. package/package.json +3 -3
  84. package/src/State/index.fx.ts +4 -1
  85. package/src/State/useNativeState.ts +24 -5
  86. package/src/community/bottom-sheet/BottomSheet.android.tsx +2 -13
  87. package/src/community/bottom-sheet/BottomSheet.ios.tsx +1 -1
  88. package/src/community/datetime-picker/DateTimePicker.tsx +1 -1
  89. package/src/community/menu/MenuView.ios.tsx +1 -1
  90. package/src/community/pager-view/PagerView.android.tsx +21 -3
  91. package/src/community/pager-view/PagerView.ios.tsx +1 -1
  92. package/src/community/picker/Picker.ios.tsx +1 -1
  93. package/src/community/slider/Slider.ios.tsx +1 -1
  94. package/src/jetpack-compose/ModalBottomSheet/index.tsx +7 -0
  95. package/src/jetpack-compose/RNHostView/index.tsx +8 -0
  96. package/src/jetpack-compose/TextField/BasicTextField.tsx +118 -0
  97. package/src/jetpack-compose/TextField/TextField.tsx +198 -0
  98. package/src/jetpack-compose/TextField/index.ts +19 -0
  99. package/src/jetpack-compose/TextField/{index.tsx → shared.ts} +71 -203
  100. package/src/jetpack-compose/index.ts +6 -0
  101. package/src/jetpack-compose/modifiers/index.ts +13 -0
  102. package/src/swift-ui/BottomSheet/index.tsx +1 -1
  103. package/src/swift-ui/Image/index.tsx +12 -3
  104. package/src/swift-ui/modifiers/index.ts +44 -6
  105. package/src/swift-ui/modifiers/widgets.ts +9 -0
  106. package/src/universal/Button/index.ios.tsx +6 -1
  107. package/src/universal/FieldGroup/FieldSectionSlots.tsx +3 -0
  108. package/src/universal/FieldGroup/groupChildren.tsx +3 -0
  109. package/src/universal/Text/index.ios.tsx +3 -1
  110. package/src/universal/TextInput/index.android.tsx +26 -60
  111. package/src/universal/TextInput/types.ts +5 -1
  112. package/src/universal/modifierUtils.ts +23 -0
  113. package/src/universal/transformStyle.android.ts +9 -1
  114. package/src/universal/transformStyle.ios.ts +9 -1
  115. package/src/universal/types.ts +2 -0
  116. package/android/src/main/java/expo/modules/ui/ShadowNodeSyncFlush.kt +0 -28
  117. package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.16/expo.modules.ui-56.0.16-sources.jar.md5 +0 -1
  118. package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.16/expo.modules.ui-56.0.16-sources.jar.sha1 +0 -1
  119. package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.16/expo.modules.ui-56.0.16-sources.jar.sha256 +0 -1
  120. package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.16/expo.modules.ui-56.0.16-sources.jar.sha512 +0 -1
  121. package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.16/expo.modules.ui-56.0.16.aar +0 -0
  122. package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.16/expo.modules.ui-56.0.16.aar.md5 +0 -1
  123. package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.16/expo.modules.ui-56.0.16.aar.sha1 +0 -1
  124. package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.16/expo.modules.ui-56.0.16.aar.sha256 +0 -1
  125. package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.16/expo.modules.ui-56.0.16.aar.sha512 +0 -1
  126. package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.16/expo.modules.ui-56.0.16.module.md5 +0 -1
  127. package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.16/expo.modules.ui-56.0.16.module.sha1 +0 -1
  128. package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.16/expo.modules.ui-56.0.16.module.sha256 +0 -1
  129. package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.16/expo.modules.ui-56.0.16.module.sha512 +0 -1
  130. package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.16/expo.modules.ui-56.0.16.pom.md5 +0 -1
  131. package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.16/expo.modules.ui-56.0.16.pom.sha1 +0 -1
  132. package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.16/expo.modules.ui-56.0.16.pom.sha256 +0 -1
  133. package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.16/expo.modules.ui-56.0.16.pom.sha512 +0 -1
@@ -22,6 +22,8 @@ export interface UniversalBaseProps {
22
22
  /**
23
23
  * Platform-specific modifier escape hatch. Pass an array of modifier configs
24
24
  * from `@expo/ui/swift-ui/modifiers` or `@expo/ui/jetpack-compose/modifiers`.
25
+ * A modifier supplied here replaces any modifier of the same type that the
26
+ * component derives from `style` or other props.
25
27
  * @platform android
26
28
  * @platform ios
27
29
  */
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/universal/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE9C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE/C;;;;GAIG;AACH,MAAM,MAAM,cAAc,GAAG,IAAI,CAC/B,SAAS,EACP,SAAS,GACT,mBAAmB,GACnB,iBAAiB,GACjB,YAAY,GACZ,eAAe,GACf,aAAa,GACb,cAAc,GACd,iBAAiB,GACjB,cAAc,GACd,aAAa,GACb,aAAa,GACb,SAAS,GACT,OAAO,GACP,QAAQ,CACX,CAAC;AAEF;;;GAGG;AACH,MAAM,WAAW,kBAAkB;IAGjC;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,cAAc,CAAC;IAEvB;;;;;OAKG;IACH,SAAS,CAAC,EAAE,cAAc,EAAE,CAAC;IAI7B;;;;;OAKG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IAIrB;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IAEtB;;;;;OAKG;IACH,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IAIzB;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;;;;OAKG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IAEjB;;;;;OAKG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;GAGG;AACH,MAAM,MAAM,kBAAkB,GAAG,OAAO,GAAG,QAAQ,GAAG,KAAK,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/universal/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE9C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE/C;;;;GAIG;AACH,MAAM,MAAM,cAAc,GAAG,IAAI,CAC/B,SAAS,EACP,SAAS,GACT,mBAAmB,GACnB,iBAAiB,GACjB,YAAY,GACZ,eAAe,GACf,aAAa,GACb,cAAc,GACd,iBAAiB,GACjB,cAAc,GACd,aAAa,GACb,aAAa,GACb,SAAS,GACT,OAAO,GACP,QAAQ,CACX,CAAC;AAEF;;;GAGG;AACH,MAAM,WAAW,kBAAkB;IAGjC;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,cAAc,CAAC;IAEvB;;;;;;;OAOG;IACH,SAAS,CAAC,EAAE,cAAc,EAAE,CAAC;IAI7B;;;;;OAKG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IAIrB;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IAEtB;;;;;OAKG;IACH,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IAIzB;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;;;;OAKG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IAEjB;;;;;OAKG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;GAGG;AACH,MAAM,MAAM,kBAAkB,GAAG,OAAO,GAAG,QAAQ,GAAG,KAAK,CAAC"}
@@ -10,7 +10,7 @@
10
10
  "publication": {
11
11
  "groupId": "expo.modules.ui",
12
12
  "artifactId": "expo.modules.ui",
13
- "version": "56.0.16",
13
+ "version": "56.0.18",
14
14
  "repository": "local-maven-repo"
15
15
  }
16
16
  }
@@ -7,8 +7,6 @@ public final class ImageViewProps: UIBaseViewProps {
7
7
  @Field var uiImage: String?
8
8
  @Field var systemName: String?
9
9
  @Field var assetName: String?
10
- @Field var size: Double?
11
- @Field var color: Color?
12
10
  @Field var variableValue: Double?
13
11
  @Field var useTapGesture: Bool?
14
12
  var onTap = EventDispatcher()
@@ -41,8 +39,7 @@ public struct ImageView: ExpoSwiftUI.View {
41
39
  public var body: some View {
42
40
  if let symbolImage {
43
41
  symbolImage
44
- .font(.system(size: CGFloat(props.size ?? 24)))
45
- .foregroundColor(props.color)
42
+ .applyImageModifiers(props.modifiers, appContext: props.appContext)
46
43
  .applyOnTapGesture(useTapGesture: props.useTapGesture, eventDispatcher: props.onTap)
47
44
  } else if let url = props.uiImage,
48
45
  let url = URL(string: url),
@@ -50,7 +47,6 @@ public struct ImageView: ExpoSwiftUI.View {
50
47
  let uiImage = UIImage(data: data) {
51
48
  Image(uiImage: uiImage)
52
49
  .applyImageModifiers(props.modifiers, appContext: props.appContext)
53
- .foregroundColor(props.color)
54
50
  .applyOnTapGesture(useTapGesture: props.useTapGesture, eventDispatcher: props.onTap)
55
51
  }
56
52
  }
@@ -0,0 +1,29 @@
1
+ // Copyright 2015-present 650 Industries. All rights reserved.
2
+
3
+ import ExpoModulesCore
4
+ import SwiftUI
5
+
6
+ internal enum ImageScaleType: String, Enumerable {
7
+ case small
8
+ case medium
9
+ case large
10
+
11
+ func toNativeImageScale() -> Image.Scale {
12
+ switch self {
13
+ case .small:
14
+ return .small
15
+ case .medium:
16
+ return .medium
17
+ case .large:
18
+ return .large
19
+ }
20
+ }
21
+ }
22
+
23
+ internal struct ImageScaleModifier: ViewModifier, Record {
24
+ @Field var scale: ImageScaleType = .medium
25
+
26
+ func body(content: Content) -> some View {
27
+ content.imageScale(scale.toNativeImageScale())
28
+ }
29
+ }
@@ -13,26 +13,18 @@ internal struct OnGeometryChangeModifier: ViewModifier, Record {
13
13
  self.eventDispatcher = eventDispatcher
14
14
  }
15
15
 
16
- private func dispatch(_ size: CGSize) {
16
+ private func dispatch(_ frame: CGRect) {
17
17
  eventDispatcher?(["onGeometryChange": [
18
- "width": size.width,
19
- "height": size.height
18
+ "x": frame.origin.x,
19
+ "y": frame.origin.y,
20
+ "width": frame.size.width,
21
+ "height": frame.size.height
20
22
  ]])
21
23
  }
22
24
 
23
25
  func body(content: Content) -> some View {
24
- if #available(iOS 16.0, tvOS 16.0, macOS 13.0, *) {
25
- content.onGeometryChange(for: CGSize.self, of: { proxy in proxy.size }, action: {
26
- dispatch($0)
27
- })
28
- } else {
29
- content.background(
30
- GeometryReader { geometry in
31
- Color.clear
32
- .onAppear { dispatch(geometry.size) }
33
- .onChange(of: geometry.size) { dispatch($0) }
34
- }
35
- )
36
- }
26
+ content.onGeometryChange(for: CGRect.self, of: { proxy in proxy.frame(in: .global) }, action: {
27
+ dispatch($0)
28
+ })
37
29
  }
38
30
  }
@@ -486,6 +486,18 @@ internal struct AccessibilityValueModifier: ViewModifier, Record {
486
486
  }
487
487
  }
488
488
 
489
+ internal struct AccessibilityInputLabelsModifier: ViewModifier, Record {
490
+ @Field var inputLabels: [String]?
491
+
492
+ func body(content: Content) -> some View {
493
+ if let inputLabels = inputLabels {
494
+ content.accessibilityInputLabels(inputLabels.map { Text($0) })
495
+ } else {
496
+ content
497
+ }
498
+ }
499
+ }
500
+
489
501
  internal struct AccessibilityIdentifierModifier: ViewModifier, Record {
490
502
  @Field var identifier: String?
491
503
 
@@ -793,6 +805,14 @@ internal struct TextAllowsTightening: ViewModifier, Record {
793
805
  }
794
806
  }
795
807
 
808
+ internal struct MinimumScaleFactorModifier: ViewModifier, Record {
809
+ @Field var factor: CGFloat = 1.0
810
+
811
+ func body(content: Content) -> some View {
812
+ content.minimumScaleFactor(factor)
813
+ }
814
+ }
815
+
796
816
  internal enum TextCaseTypes: String, Enumerable {
797
817
  case lowercase
798
818
  case uppercase
@@ -1564,6 +1584,10 @@ extension ViewModifierRegistry {
1564
1584
  return try AccessibilityValueModifier(from: params, appContext: appContext)
1565
1585
  }
1566
1586
 
1587
+ register("accessibilityInputLabels") { params, appContext, _ in
1588
+ return try AccessibilityInputLabelsModifier(from: params, appContext: appContext)
1589
+ }
1590
+
1567
1591
  register("accessibilityIdentifier") { params, appContext, _ in
1568
1592
  return try AccessibilityIdentifierModifier(from: params, appContext: appContext)
1569
1593
  }
@@ -1684,6 +1708,10 @@ extension ViewModifierRegistry {
1684
1708
  return try TextAllowsTightening(from: params, appContext: appContext)
1685
1709
  }
1686
1710
 
1711
+ register("minimumScaleFactor") { params, appContext, _ in
1712
+ return try MinimumScaleFactorModifier(from: params, appContext: appContext)
1713
+ }
1714
+
1687
1715
  register("textCase") { params, appContext, _ in
1688
1716
  return try TextCase(from: params, appContext: appContext)
1689
1717
  }
@@ -1752,6 +1780,10 @@ extension ViewModifierRegistry {
1752
1780
  return try DynamicTypeSizeModifier(from: params, appContext: appContext)
1753
1781
  }
1754
1782
 
1783
+ register("imageScale") { params, appContext, _ in
1784
+ return try ImageScaleModifier(from: params, appContext: appContext)
1785
+ }
1786
+
1755
1787
  register("gridCellUnsizedAxes") { params, appContext, _ in
1756
1788
  return try GridCellUnsizedAxes(from: params, appContext: appContext)
1757
1789
  }
@@ -1884,6 +1916,10 @@ extension ViewModifierRegistry {
1884
1916
  return try WidgetURLModifier(from: params, appContext: appContext)
1885
1917
  }
1886
1918
 
1919
+ register("activityBackgroundTint") { params, appContext, _ in
1920
+ return try ActivityBackgroundTintModifier(from: params, appContext: appContext)
1921
+ }
1922
+
1887
1923
  register("keyboardType") { params, appContext, _ in
1888
1924
  return try KeyboardTypeModifier(from: params, appContext: appContext)
1889
1925
  }
@@ -56,3 +56,15 @@ internal struct WidgetURLModifier: ViewModifier, Record {
56
56
  #endif
57
57
  }
58
58
  }
59
+
60
+ internal struct ActivityBackgroundTintModifier: ViewModifier, Record {
61
+ @Field var color: Color?
62
+
63
+ func body(content: Content) -> some View {
64
+ #if !os(tvOS) && !os(macOS)
65
+ content.activityBackgroundTint(color)
66
+ #else
67
+ content
68
+ #endif
69
+ }
70
+ }
@@ -0,0 +1 @@
1
+ e456560887c0d9471dbddf4b7f5c232432a588ecb6b531120c9ce193f8d2f07d
@@ -0,0 +1 @@
1
+ a3762cf9549225df1a60ad90cdf83586c4bb6358cecaa627f78a299a8aa5bd23ebebc740d6c0cc7acbf75d134e3c45ca8059459c6fcbc796beeeb4cb5d9dbfb8
@@ -0,0 +1 @@
1
+ b229f74d58ec12ae4375dc666928d118938e19e4
@@ -0,0 +1 @@
1
+ c5040a0bd6a33de8ffca965c4d5e5953897f6776a239283b146d677e2e7221ed
@@ -0,0 +1 @@
1
+ d10bffe2657a8f7e5e1886eec9a1404d7b6d5bcef4a50b6db763986302cbad9ae02c61a0f1996d52c2d558cc5dbc989f3ef5ad53cfc2370df88e643b377b19ee
@@ -3,7 +3,7 @@
3
3
  "component": {
4
4
  "group": "expo.modules.ui",
5
5
  "module": "expo.modules.ui",
6
- "version": "56.0.16",
6
+ "version": "56.0.18",
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-56.0.16.aar",
28
- "url": "expo.modules.ui-56.0.16.aar",
29
- "size": 1884250,
30
- "sha512": "0a92657dee5473065082fc5fa71f484a728b7f3a1ef0a8a80144ae17a1c71fffc60a6dd98a8c9e932eca828a2258a29df0529f471a1c6ee4503bc0ff7f46705d",
31
- "sha256": "d3b7205e40a307e5b1e4c3e9cb1a067fdef2c1b49984e9df3222448c856b55a2",
32
- "sha1": "12ad717dbdbff8ac4cf80073d6ce7996265718cc",
33
- "md5": "86b861e8240bfa02ed19115b82f2191b"
27
+ "name": "expo.modules.ui-56.0.18.aar",
28
+ "url": "expo.modules.ui-56.0.18.aar",
29
+ "size": 1944191,
30
+ "sha512": "d10bffe2657a8f7e5e1886eec9a1404d7b6d5bcef4a50b6db763986302cbad9ae02c61a0f1996d52c2d558cc5dbc989f3ef5ad53cfc2370df88e643b377b19ee",
31
+ "sha256": "c5040a0bd6a33de8ffca965c4d5e5953897f6776a239283b146d677e2e7221ed",
32
+ "sha1": "b229f74d58ec12ae4375dc666928d118938e19e4",
33
+ "md5": "e06c3debed9c38c907f69263825babb0"
34
34
  }
35
35
  ]
36
36
  },
@@ -141,13 +141,13 @@
141
141
  ],
142
142
  "files": [
143
143
  {
144
- "name": "expo.modules.ui-56.0.16.aar",
145
- "url": "expo.modules.ui-56.0.16.aar",
146
- "size": 1884250,
147
- "sha512": "0a92657dee5473065082fc5fa71f484a728b7f3a1ef0a8a80144ae17a1c71fffc60a6dd98a8c9e932eca828a2258a29df0529f471a1c6ee4503bc0ff7f46705d",
148
- "sha256": "d3b7205e40a307e5b1e4c3e9cb1a067fdef2c1b49984e9df3222448c856b55a2",
149
- "sha1": "12ad717dbdbff8ac4cf80073d6ce7996265718cc",
150
- "md5": "86b861e8240bfa02ed19115b82f2191b"
144
+ "name": "expo.modules.ui-56.0.18.aar",
145
+ "url": "expo.modules.ui-56.0.18.aar",
146
+ "size": 1944191,
147
+ "sha512": "d10bffe2657a8f7e5e1886eec9a1404d7b6d5bcef4a50b6db763986302cbad9ae02c61a0f1996d52c2d558cc5dbc989f3ef5ad53cfc2370df88e643b377b19ee",
148
+ "sha256": "c5040a0bd6a33de8ffca965c4d5e5953897f6776a239283b146d677e2e7221ed",
149
+ "sha1": "b229f74d58ec12ae4375dc666928d118938e19e4",
150
+ "md5": "e06c3debed9c38c907f69263825babb0"
151
151
  }
152
152
  ]
153
153
  },
@@ -161,13 +161,13 @@
161
161
  },
162
162
  "files": [
163
163
  {
164
- "name": "expo.modules.ui-56.0.16-sources.jar",
165
- "url": "expo.modules.ui-56.0.16-sources.jar",
166
- "size": 88918,
167
- "sha512": "84b9331a94360a66891a0d1d33f82f6b9e90df27e7b209774b02a9a3732dafa4d58bb800952273b60d2c3a4b5c102dbc03ac418bc6123c33b39da4c515f5c2ea",
168
- "sha256": "869fc2b13a7487be231ecffde437bf73d138786f9d20b04d843c59c2d95f376c",
169
- "sha1": "4ed8efb025b6e6c393bc9c3f5f13f3c28bedda50",
170
- "md5": "930e8ab7442da199117ed6e88be44b5b"
164
+ "name": "expo.modules.ui-56.0.18-sources.jar",
165
+ "url": "expo.modules.ui-56.0.18-sources.jar",
166
+ "size": 93876,
167
+ "sha512": "a3762cf9549225df1a60ad90cdf83586c4bb6358cecaa627f78a299a8aa5bd23ebebc740d6c0cc7acbf75d134e3c45ca8059459c6fcbc796beeeb4cb5d9dbfb8",
168
+ "sha256": "e456560887c0d9471dbddf4b7f5c232432a588ecb6b531120c9ce193f8d2f07d",
169
+ "sha1": "071ba8aee8e6056c59d7f18aa247e536e110f493",
170
+ "md5": "22f57bb7a0ea0016c8efa6cde687934b"
171
171
  }
172
172
  ]
173
173
  }
@@ -0,0 +1 @@
1
+ 0988151e459560e5e43657673bd44622ec339e10
@@ -0,0 +1 @@
1
+ daa61c8a7fb9d0f2e326c3018e5a459a828cde6430210274c43903bc38717d61
@@ -0,0 +1 @@
1
+ ab8cb4cd46417dda5090e5be5e92283e74982782289b297bb067b957bea5cfc8e2ee968da086be2a599dee0f85580dbc4686e06e15150b629c6e3e670eb44483
@@ -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>56.0.16</version>
12
+ <version>56.0.18</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
+ 8ebee813de77620f097bd91d83faf80624ff860d
@@ -0,0 +1 @@
1
+ 4d652208d530e23197763eb2f3b32fd084e6065ca63b29da0c3b454a07d586be
@@ -0,0 +1 @@
1
+ 8c2c74ce7cfe2b19bb8bf9999c7e9ab968616a25b6419741f99e93e8d15adde4d8e6fb59bd6eeb58b0b6293b21a17d6449438f960524ff163065d28b475b3140
@@ -3,11 +3,11 @@
3
3
  <groupId>expo.modules.ui</groupId>
4
4
  <artifactId>expo.modules.ui</artifactId>
5
5
  <versioning>
6
- <latest>56.0.16</latest>
7
- <release>56.0.16</release>
6
+ <latest>56.0.18</latest>
7
+ <release>56.0.18</release>
8
8
  <versions>
9
- <version>56.0.16</version>
9
+ <version>56.0.18</version>
10
10
  </versions>
11
- <lastUpdated>20260605211303</lastUpdated>
11
+ <lastUpdated>20260615113818</lastUpdated>
12
12
  </versioning>
13
13
  </metadata>
@@ -1 +1 @@
1
- 06d44b3caa511e0c357fa5a4b97c3867
1
+ 80860432a0537ca5e443caadce02f0f9
@@ -1 +1 @@
1
- 6b09b188d3943a03a462cc08d80212d62490d2b9
1
+ cd6722114453fb0a0a543e934c7f1615700af030
@@ -1 +1 @@
1
- 680aeda3449ab8b21e06cec91465124d63053367f1be0fa5c6b005526a0eccf4
1
+ 7048be1f0ef2fb14d3a3f0a98259d7ec2c89ddd3e1fb6482a2207bfaf72a0cbe
@@ -1 +1 @@
1
- 3a7cfc9313dacce167a1c0e9ff4519e357d5043205c6c16e47365cf5c5db3ea7b5660c5981e619f5e3d3f2079768975ba35d8eea6adb0d2bd9afd9543a4787d0
1
+ 8675efe9cf7924c026f205535fcc7b1c85f0cb6634c3ed42f770e8101956ee33dbada364e1fd7499b2e34e06b369e3ad7377c872ce27509c7e84180124fe5ed9
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@expo/ui",
3
- "version": "56.0.16",
3
+ "version": "56.0.18",
4
4
  "description": "A collection of UI components",
5
5
  "sideEffects": [
6
6
  "*.fx.js"
@@ -95,7 +95,7 @@
95
95
  "@types/react": "~19.2.0",
96
96
  "react-native-reanimated": "4.3.1",
97
97
  "react-native-worklets": "0.8.3",
98
- "expo": "56.0.9",
98
+ "expo": "56.0.12",
99
99
  "expo-module-scripts": "56.0.3"
100
100
  },
101
101
  "jest": {
@@ -124,7 +124,7 @@
124
124
  "optional": true
125
125
  }
126
126
  },
127
- "gitHead": "175f1e78e3444ca99ddea473faea6777a0656668",
127
+ "gitHead": "812dc007aefed0c432c0439fdfe05ee2f4f21da2",
128
128
  "scripts": {
129
129
  "build": "expo-module build",
130
130
  "clean": "expo-module clean",
@@ -41,7 +41,8 @@ function registerSharedObjectSerializer(): void {
41
41
  unpack: (packed) => {
42
42
  'worklet';
43
43
  const obj = (globalThis as any).expo.SharedObject.__resolveInWorklet(packed.objectId);
44
- // Define .value property if the object has getValue/setValue (e.g. ObservableState)
44
+ // Define .value plus the get/set accessors if the object has
45
+ // getValue/setValue (e.g. ObservableState)
45
46
  if (typeof obj.getValue === 'function' && typeof obj.setValue === 'function') {
46
47
  Object.defineProperty(obj, 'value', {
47
48
  get() {
@@ -51,6 +52,8 @@ function registerSharedObjectSerializer(): void {
51
52
  obj.setValue({ value: v });
52
53
  },
53
54
  });
55
+ obj.get = () => obj.getValue();
56
+ obj.set = (v: any) => obj.setValue({ value: v });
54
57
  }
55
58
  return obj;
56
59
  },
@@ -20,6 +20,16 @@ export type ObservableState<T> = SharedObject & {
20
20
  */
21
21
  value: T;
22
22
 
23
+ /**
24
+ * Reads the current value. A React Compiler compliant alternative to reading `.value`
25
+ */
26
+ get(): T;
27
+
28
+ /**
29
+ * Writes a new value. A React Compiler-compliant alternative to assigning `.value`
30
+ */
31
+ set(value: T): void;
32
+
23
33
  /**
24
34
  * A single listener invoked on the native UI runtime whenever the value changes
25
35
  * (after iOS `didSet` and Android's setter). Assigning replaces the previous
@@ -38,9 +48,6 @@ export type ObservableState<T> = SharedObject & {
38
48
  * 'worklet';
39
49
  * console.log('changed to', value);
40
50
  * };
41
- * return () => {
42
- * state.onChange = null;
43
- * };
44
51
  * }, []);
45
52
  * ```
46
53
  */
@@ -65,10 +72,13 @@ type NativeObservableState = {
65
72
  getValue(): unknown;
66
73
  setValue(v: { value: unknown }): void;
67
74
  setOnChange(callback: object | null): void;
75
+ get?: () => unknown;
76
+ set?: (value: unknown) => void;
68
77
  };
69
78
 
70
79
  /**
71
- * Adds a `value` property that delegates to the native `getValue`/`setValue` functions.
80
+ * Adds a `value` property plus `get`/`set` methods that delegate to the native
81
+ * `getValue`/`setValue` functions.
72
82
  */
73
83
  function defineValueProperty(state: NativeObservableState): void {
74
84
  Object.defineProperty(state, 'value', {
@@ -79,6 +89,8 @@ function defineValueProperty(state: NativeObservableState): void {
79
89
  state.setValue({ value: v });
80
90
  },
81
91
  });
92
+ state.get = () => state.getValue();
93
+ state.set = (v: unknown) => state.setValue({ value: v });
82
94
  }
83
95
 
84
96
  /**
@@ -96,7 +108,14 @@ function defineOnChangeProperty(state: NativeObservableState): void {
96
108
  set(fn: ((value: unknown) => void) | null | undefined) {
97
109
  if (!fn) {
98
110
  currentFn = null;
99
- state.setOnChange(null);
111
+ try {
112
+ state.setOnChange(null);
113
+ } catch {
114
+ // On unmount the shared object is often released before this cleanup
115
+ // runs (useReleasingSharedObject releases it earlier in the component),
116
+ // so setOnChange throws "already released". Clearing a listener on a
117
+ // gone object is a no-op, so ignore it rather than crash teardown.
118
+ }
100
119
  return;
101
120
  }
102
121
  if (!worklets) {
@@ -118,18 +118,6 @@ export function BottomSheet(props: BottomSheetProps) {
118
118
  }
119
119
  }, [clampIndex, indexProp, fireCloseCallbacks]);
120
120
 
121
- useEffect(() => {
122
- if (!isOpen) return;
123
-
124
- const targetIndex = pendingIndexRef.current ?? 0;
125
- if (hasMultipleSnapPoints && targetIndex === maxIndex) {
126
- sheetRef.current?.expand();
127
- } else if (hasMultipleSnapPoints) {
128
- sheetRef.current?.partialExpand();
129
- }
130
- pendingIndexRef.current = null;
131
- }, [hasMultipleSnapPoints, isOpen, maxIndex]);
132
-
133
121
  const handleDismiss = useCallback(() => {
134
122
  setIsOpen(false);
135
123
  fireCloseCallbacks();
@@ -197,11 +185,12 @@ export function BottomSheet(props: BottomSheetProps) {
197
185
  return (
198
186
  <BottomSheetInternalContext.Provider value={internalContextValue}>
199
187
  <BottomSheetContext.Provider value={methods}>
200
- <Host style={{ position: 'absolute', width }}>
188
+ <Host style={{ position: 'absolute', width }} pointerEvents="none">
201
189
  <ModalBottomSheet
202
190
  ref={sheetRef}
203
191
  onDismissRequest={handleDismiss}
204
192
  skipPartiallyExpanded={skipPartially}
193
+ initialFullyExpanded={hasMultipleSnapPoints && pendingIndexRef.current === maxIndex}
205
194
  showDragHandle={handleComponent !== null}
206
195
  sheetGesturesEnabled={enablePanDownToClose}
207
196
  containerColor={containerColor}
@@ -230,7 +230,7 @@ export function BottomSheet(props: BottomSheetProps) {
230
230
  return (
231
231
  <BottomSheetInternalContext.Provider value={internalContextValue}>
232
232
  <BottomSheetContext.Provider value={methods}>
233
- <Host style={{ position: 'absolute', width }}>
233
+ <Host style={{ position: 'absolute', width }} pointerEvents="none">
234
234
  <NativeBottomSheet
235
235
  isPresented={isPresented}
236
236
  onIsPresentedChange={handlePresentedChange}
@@ -87,7 +87,7 @@ export function DateTimePicker(props: DateTimePickerProps) {
87
87
  };
88
88
 
89
89
  return (
90
- <Host matchContents={{ vertical: true }} style={style}>
90
+ <Host matchContents={{ vertical: true }} style={style} ignoreSafeArea="all">
91
91
  <DatePicker {...iosProps} />
92
92
  </Host>
93
93
  );
@@ -135,7 +135,7 @@ export function MenuView(props: MenuComponentProps & { ref?: React.Ref<MenuCompo
135
135
  );
136
136
 
137
137
  return (
138
- <Host matchContents style={style} testID={testID}>
138
+ <Host matchContents style={style} testID={testID} ignoreSafeArea="all">
139
139
  {shouldOpenOnLongPress ? (
140
140
  <ContextMenu>
141
141
  <ContextMenu.Trigger>{trigger}</ContextMenu.Trigger>
@@ -8,7 +8,7 @@ import {
8
8
  useState,
9
9
  type ReactElement,
10
10
  } from 'react';
11
- import { StyleSheet } from 'react-native';
11
+ import { StyleSheet, View } from 'react-native';
12
12
 
13
13
  import { wrapNativeEvent, type PagerViewProps } from './types';
14
14
  import { worklets } from '../../State';
@@ -43,6 +43,11 @@ export function PagerView(props: PagerViewProps) {
43
43
  setScrollEnabledState(scrollEnabled);
44
44
  }, [scrollEnabled]);
45
45
 
46
+ // The pages overlap (see the absolute positioning below), so gate touches to
47
+ // the settled page; the rest are `pointerEvents="none"` so taps resolve to the
48
+ // page on screen (#46386).
49
+ const [settledPage, setSettledPage] = useState(initialPage);
50
+
46
51
  // Synthesize pager-view's `idle | dragging | settling` from Compose's raw
47
52
  // signals: `isScrollInProgress` (drag or snap-animation in flight) plus
48
53
  // drag interactions (start/stop/cancel).
@@ -72,8 +77,16 @@ export function PagerView(props: PagerViewProps) {
72
77
  const pages = Children.toArray(children)
73
78
  .filter((child): child is ReactElement => isValidElement(child))
74
79
  .map((child, index) => (
75
- <RNHostView key={child.key ?? String(index)} modifiers={[fillMaxSize()]}>
76
- {child}
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()]}>
87
+ <View style={styles.page} pointerEvents={index === settledPage ? 'auto' : 'none'}>
88
+ {child}
89
+ </View>
77
90
  </RNHostView>
78
91
  ));
79
92
 
@@ -101,6 +114,7 @@ export function PagerView(props: PagerViewProps) {
101
114
  beyondViewportPageCount={offscreenPageLimit}
102
115
  modifiers={pagerModifiers}
103
116
  onSettledPageChange={(page) => {
117
+ setSettledPage(page);
104
118
  onPageSelected?.(wrapNativeEvent({ position: page }));
105
119
  }}
106
120
  onPageScroll={pageScrollHandler}
@@ -222,3 +236,7 @@ function warnAboutStringBorderRadiusOnce(key: string, value: string): void {
222
236
  `Use a numeric pixel value, or omit the style key.`
223
237
  );
224
238
  }
239
+
240
+ const styles = StyleSheet.create({
241
+ page: { flex: 1 },
242
+ });
@@ -213,7 +213,7 @@ export function PagerView(props: PagerViewProps) {
213
213
  ];
214
214
 
215
215
  return (
216
- <Host style={style ?? { flex: 1 }} {...passthrough}>
216
+ <Host style={style ?? { flex: 1 }} ignoreSafeArea="all" {...passthrough}>
217
217
  <ScrollView axes="horizontal" showsIndicators={false} modifiers={modifiers}>
218
218
  <LazyHStack spacing={0} modifiers={[scrollTargetLayout()]}>
219
219
  {pages}
@@ -41,7 +41,7 @@ export function Picker<T extends PickerItemValue>(props: PickerProps<T>) {
41
41
  }));
42
42
 
43
43
  return (
44
- <Host matchContents={{ vertical: true }} style={style}>
44
+ <Host matchContents={{ vertical: true }} style={style} ignoreSafeArea="all">
45
45
  <SwiftUIPicker
46
46
  modifiers={modifiers}
47
47
  selection={selectedValue}