@expo/ui 58.0.15 → 58.0.17

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 (115) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/android/build.gradle +6 -6
  3. package/android/src/main/java/expo/modules/ui/CarouselView.kt +2 -1
  4. package/android/src/main/java/expo/modules/ui/DatePickerView.kt +15 -5
  5. package/android/src/main/java/expo/modules/ui/ExpoUIModule.kt +3 -0
  6. package/android/src/main/java/expo/modules/ui/ModifierRegistry.kt +2 -2
  7. package/android/src/main/java/expo/modules/ui/RNHostView.kt +95 -0
  8. package/android/src/main/java/expo/modules/ui/SliderView.kt +21 -9
  9. package/android/src/main/java/expo/modules/ui/ToggleButtonView.kt +1 -1
  10. package/android/src/main/java/expo/modules/ui/VerticalSliderView.kt +23 -14
  11. package/android/src/main/java/expo/modules/ui/menu/DropdownMenu.kt +8 -1
  12. package/android/src/main/java/expo/modules/ui/menu/DropdownMenuRecords.kt +13 -1
  13. package/android/src/main/java/expo/modules/ui/menu/ExposedDropdownMenuView.kt +1 -0
  14. package/build/NativeTreeContext.d.ts +10 -0
  15. package/build/NativeTreeContext.js +25 -0
  16. package/build/NativeTreeContext.js.map +1 -0
  17. package/build/community/bottom-sheet/BottomSheet.ios.js +11 -4
  18. package/build/community/bottom-sheet/BottomSheet.ios.js.map +1 -1
  19. package/build/community/menu/MenuView.android.js +6 -0
  20. package/build/community/menu/MenuView.android.js.map +1 -1
  21. package/build/jetpack-compose/Carousel/index.d.ts +7 -2
  22. package/build/jetpack-compose/Carousel/index.js.map +1 -1
  23. package/build/jetpack-compose/DatePicker/index.d.ts +20 -0
  24. package/build/jetpack-compose/DatePicker/index.js.map +1 -1
  25. package/build/jetpack-compose/DropdownMenu/index.d.ts +8 -1
  26. package/build/jetpack-compose/DropdownMenu/index.js.map +1 -1
  27. package/build/jetpack-compose/Host/index.js +8 -2
  28. package/build/jetpack-compose/Host/index.js.map +1 -1
  29. package/build/jetpack-compose/RNHostView/index.js +5 -1
  30. package/build/jetpack-compose/RNHostView/index.js.map +1 -1
  31. package/build/swift-ui/Chart/index.d.ts +10 -0
  32. package/build/swift-ui/Chart/index.js.map +1 -1
  33. package/build/swift-ui/Host/index.js +8 -2
  34. package/build/swift-ui/Host/index.js.map +1 -1
  35. package/build/swift-ui/RNHostView.js +5 -1
  36. package/build/swift-ui/RNHostView.js.map +1 -1
  37. package/build/swift-ui/modifiers/presentationModifiers.d.ts +17 -1
  38. package/build/swift-ui/modifiers/presentationModifiers.js +4 -2
  39. package/build/swift-ui/modifiers/presentationModifiers.js.map +1 -1
  40. package/build/types.d.ts +27 -0
  41. package/build/types.js +1 -1
  42. package/build/types.js.map +1 -1
  43. package/build/universal/BottomSheet/index.android.js +26 -18
  44. package/build/universal/BottomSheet/index.android.js.map +1 -1
  45. package/build/universal/BottomSheet/index.ios.js +20 -12
  46. package/build/universal/BottomSheet/index.ios.js.map +1 -1
  47. package/build/universal/ListItem/ListItem.android.js +5 -2
  48. package/build/universal/ListItem/ListItem.android.js.map +1 -1
  49. package/ios/ChartView.swift +7 -4
  50. package/ios/DataListForEachView.swift +1 -0
  51. package/ios/GridView.swift +1 -0
  52. package/ios/HostView.swift +27 -4
  53. package/ios/Modifiers/PresentationModifiers.swift +20 -4
  54. package/ios/NamespaceView.swift +1 -0
  55. package/ios/RNHostView.swift +19 -4
  56. package/ios/SlotView.swift +1 -0
  57. package/ios/TabView/TabView.swift +2 -0
  58. package/ios/ToolbarView.swift +2 -1
  59. package/ios/UIBaseView.swift +13 -0
  60. package/local-maven-repo/expo/modules/ui/expo.modules.ui/{58.0.15/expo.modules.ui-58.0.15-sources.jar → 58.0.17/expo.modules.ui-58.0.17-sources.jar} +0 -0
  61. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.17/expo.modules.ui-58.0.17-sources.jar.md5 +1 -0
  62. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.17/expo.modules.ui-58.0.17-sources.jar.sha1 +1 -0
  63. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.17/expo.modules.ui-58.0.17-sources.jar.sha256 +1 -0
  64. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.17/expo.modules.ui-58.0.17-sources.jar.sha512 +1 -0
  65. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.17/expo.modules.ui-58.0.17.aar +0 -0
  66. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.17/expo.modules.ui-58.0.17.aar.md5 +1 -0
  67. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.17/expo.modules.ui-58.0.17.aar.sha1 +1 -0
  68. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.17/expo.modules.ui-58.0.17.aar.sha256 +1 -0
  69. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.17/expo.modules.ui-58.0.17.aar.sha512 +1 -0
  70. package/local-maven-repo/expo/modules/ui/expo.modules.ui/{58.0.15/expo.modules.ui-58.0.15.module → 58.0.17/expo.modules.ui-58.0.17.module} +26 -26
  71. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.17/expo.modules.ui-58.0.17.module.md5 +1 -0
  72. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.17/expo.modules.ui-58.0.17.module.sha1 +1 -0
  73. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.17/expo.modules.ui-58.0.17.module.sha256 +1 -0
  74. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.17/expo.modules.ui-58.0.17.module.sha512 +1 -0
  75. package/local-maven-repo/expo/modules/ui/expo.modules.ui/{58.0.15/expo.modules.ui-58.0.15.pom → 58.0.17/expo.modules.ui-58.0.17.pom} +5 -5
  76. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.17/expo.modules.ui-58.0.17.pom.md5 +1 -0
  77. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.17/expo.modules.ui-58.0.17.pom.sha1 +1 -0
  78. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.17/expo.modules.ui-58.0.17.pom.sha256 +1 -0
  79. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.17/expo.modules.ui-58.0.17.pom.sha512 +1 -0
  80. package/package.json +2 -2
  81. package/prebuilds/output/debug/xcframeworks/ExpoUI.tar.gz +0 -0
  82. package/prebuilds/output/release/xcframeworks/ExpoUI.tar.gz +0 -0
  83. package/src/NativeTreeContext.tsx +31 -0
  84. package/src/community/bottom-sheet/BottomSheet.ios.tsx +7 -6
  85. package/src/community/menu/MenuView.android.tsx +12 -2
  86. package/src/jetpack-compose/Carousel/index.tsx +7 -2
  87. package/src/jetpack-compose/DatePicker/index.tsx +20 -0
  88. package/src/jetpack-compose/DropdownMenu/index.tsx +12 -1
  89. package/src/jetpack-compose/Host/index.tsx +6 -2
  90. package/src/jetpack-compose/RNHostView/index.tsx +3 -1
  91. package/src/swift-ui/Chart/index.tsx +10 -0
  92. package/src/swift-ui/Host/index.tsx +6 -2
  93. package/src/swift-ui/RNHostView.tsx +3 -1
  94. package/src/swift-ui/modifiers/presentationModifiers.ts +18 -2
  95. package/src/types.ts +28 -0
  96. package/src/universal/BottomSheet/index.android.tsx +23 -12
  97. package/src/universal/BottomSheet/index.ios.tsx +20 -9
  98. package/src/universal/ListItem/ListItem.android.tsx +7 -2
  99. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.15/expo.modules.ui-58.0.15-sources.jar.md5 +0 -1
  100. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.15/expo.modules.ui-58.0.15-sources.jar.sha1 +0 -1
  101. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.15/expo.modules.ui-58.0.15-sources.jar.sha256 +0 -1
  102. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.15/expo.modules.ui-58.0.15-sources.jar.sha512 +0 -1
  103. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.15/expo.modules.ui-58.0.15.aar +0 -0
  104. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.15/expo.modules.ui-58.0.15.aar.md5 +0 -1
  105. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.15/expo.modules.ui-58.0.15.aar.sha1 +0 -1
  106. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.15/expo.modules.ui-58.0.15.aar.sha256 +0 -1
  107. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.15/expo.modules.ui-58.0.15.aar.sha512 +0 -1
  108. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.15/expo.modules.ui-58.0.15.module.md5 +0 -1
  109. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.15/expo.modules.ui-58.0.15.module.sha1 +0 -1
  110. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.15/expo.modules.ui-58.0.15.module.sha256 +0 -1
  111. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.15/expo.modules.ui-58.0.15.module.sha512 +0 -1
  112. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.15/expo.modules.ui-58.0.15.pom.md5 +0 -1
  113. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.15/expo.modules.ui-58.0.15.pom.sha1 +0 -1
  114. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.15/expo.modules.ui-58.0.15.pom.sha256 +0 -1
  115. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.15/expo.modules.ui-58.0.15.pom.sha512 +0 -1
@@ -1,6 +1,7 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { BottomSheet as SwiftUIBottomSheet, Group, Host } from '@expo/ui/swift-ui';
3
3
  import { frame, padding, presentationBackground, presentationDetents, presentationDragIndicator } from '@expo/ui/swift-ui/modifiers';
4
+ import { useIsInsideNativeTree } from '../../NativeTreeContext';
4
5
  import { resolveContentPadding } from './utils';
5
6
  function snapPointToDetent(snapPoint) {
6
7
  if (snapPoint === 'half') return 'medium';
@@ -8,6 +9,7 @@ function snapPointToDetent(snapPoint) {
8
9
  return snapPoint;
9
10
  }
10
11
  export function BottomSheet({ children, isPresented, onDismiss, showDragIndicator = true, snapPoints, testID, modifiers, contentPadding, containerColor }) {
12
+ const isInsideHost = useIsInsideNativeTree();
11
13
  const { top, bottom, left, right } = resolveContentPadding(contentPadding, {
12
14
  top: 16,
13
15
  bottom: 0,
@@ -36,23 +38,29 @@ export function BottomSheet({ children, isPresented, onDismiss, showDragIndicato
36
38
  if (modifiers?.length) {
37
39
  presentationModifiers.push(...modifiers);
38
40
  }
41
+ const sheet = /*#__PURE__*/ _jsx(SwiftUIBottomSheet, {
42
+ isPresented: isPresented,
43
+ onIsPresentedChange: (presented)=>{
44
+ if (!presented) onDismiss();
45
+ },
46
+ fitToContents: !snapPoints || snapPoints.length === 0,
47
+ testID: testID,
48
+ children: /*#__PURE__*/ _jsx(Group, {
49
+ modifiers: presentationModifiers,
50
+ children: children
51
+ })
52
+ });
53
+ // Already inside a `Host`, for example nested in another sheet's content: a `Host` of its own
54
+ // would be a `Host` directly inside SwiftUI.
55
+ if (isInsideHost) {
56
+ return sheet;
57
+ }
39
58
  return /*#__PURE__*/ _jsx(Host, {
40
59
  style: {
41
60
  position: 'absolute'
42
61
  },
43
62
  pointerEvents: "none",
44
- children: /*#__PURE__*/ _jsx(SwiftUIBottomSheet, {
45
- isPresented: isPresented,
46
- onIsPresentedChange: (presented)=>{
47
- if (!presented) onDismiss();
48
- },
49
- fitToContents: !snapPoints || snapPoints.length === 0,
50
- testID: testID,
51
- children: /*#__PURE__*/ _jsx(Group, {
52
- modifiers: presentationModifiers,
53
- children: children
54
- })
55
- })
63
+ children: sheet
56
64
  });
57
65
  }
58
66
  export * from './types';
@@ -1 +1 @@
1
- {"version":3,"sources":["universal/BottomSheet/index.ios.tsx"],"sourcesContent":[null],"names":["BottomSheet","SwiftUIBottomSheet","Group","Host","frame","padding","presentationBackground","presentationDetents","presentationDragIndicator","resolveContentPadding","snapPointToDetent","snapPoint","children","isPresented","onDismiss","showDragIndicator","snapPoints","testID","modifiers","contentPadding","containerColor","top","bottom","left","right","presentationModifiers","maxWidth","Infinity","alignment","leading","trailing","length","push","map","style","position","pointerEvents","onIsPresentedChange","presented","fitToContents"],"mappings":";AAAA,SAASA,eAAeC,kBAAkB,EAAEC,KAAK,EAAEC,IAAI,QAAQ,oBAAoB;AACnF,SACEC,KAAK,EACLC,OAAO,EACPC,sBAAsB,EACtBC,mBAAmB,EACnBC,yBAAyB,QAGpB,8BAA8B;AAGrC,SAASC,qBAAqB,QAAQ,UAAU;AAEhD,SAASC,kBAAkBC,SAAoB;IAC7C,IAAIA,cAAc,QAAQ,OAAO;IACjC,IAAIA,cAAc,QAAQ,OAAO;IACjC,OAAOA;AACT;AAEA,OAAO,SAASX,YAAY,EAC1BY,QAAQ,EACRC,WAAW,EACXC,SAAS,EACTC,oBAAoB,IAAI,EACxBC,UAAU,EACVC,MAAM,EACNC,SAAS,EACTC,cAAc,EACdC,cAAc,EACG;IACjB,MAAM,EAAEC,GAAG,EAAEC,MAAM,EAAEC,IAAI,EAAEC,KAAK,EAAE,GAAGf,sBAAsBU,gBAAgB;QACzEE,KAAK;QACLC,QAAQ;QACRC,MAAM;QACNC,OAAO;IACT;IACA,MAAMC,wBAA0C;QAC9CrB,MAAM;YAAEsB,UAAUC;YAAUC,WAAW;QAAa;QACpDvB,QAAQ;YAAEgB;YAAKC;YAAQO,SAASN;YAAMO,UAAUN;QAAM;QACtDhB,0BAA0BO,oBAAoB,YAAY;KAC3D;IACD,IAAIC,cAAcA,WAAWe,MAAM,GAAG,GAAG;QACvCN,sBAAsBO,IAAI,CAACzB,oBAAoBS,WAAWiB,GAAG,CAACvB;IAChE;IACA,IAAIU,gBAAgB;QAClBK,sBAAsBO,IAAI,CAAC1B,uBAAuBc;IACpD;IACA,IAAIF,WAAWa,QAAQ;QACrBN,sBAAsBO,IAAI,IAAId;IAChC;IAEA,qBACE,KAACf;QAAK+B,OAAO;YAAEC,UAAU;QAAW;QAAGC,eAAc;kBACnD,cAAA,KAACnC;YACCY,aAAaA;YACbwB,qBAAqB,CAACC;gBACpB,IAAI,CAACA,WAAWxB;YAClB;YACAyB,eAAe,CAACvB,cAAcA,WAAWe,MAAM,KAAK;YACpDd,QAAQA;sBACR,cAAA,KAACf;gBAAMgB,WAAWO;0BAAwBb;;;;AAIlD;AAEA,cAAc,UAAU"}
1
+ {"version":3,"sources":["universal/BottomSheet/index.ios.tsx"],"sourcesContent":[null],"names":["BottomSheet","SwiftUIBottomSheet","Group","Host","frame","padding","presentationBackground","presentationDetents","presentationDragIndicator","useIsInsideNativeTree","resolveContentPadding","snapPointToDetent","snapPoint","children","isPresented","onDismiss","showDragIndicator","snapPoints","testID","modifiers","contentPadding","containerColor","isInsideHost","top","bottom","left","right","presentationModifiers","maxWidth","Infinity","alignment","leading","trailing","length","push","map","sheet","onIsPresentedChange","presented","fitToContents","style","position","pointerEvents"],"mappings":";AAAA,SAASA,eAAeC,kBAAkB,EAAEC,KAAK,EAAEC,IAAI,QAAQ,oBAAoB;AACnF,SACEC,KAAK,EACLC,OAAO,EACPC,sBAAsB,EACtBC,mBAAmB,EACnBC,yBAAyB,QAGpB,8BAA8B;AAErC,SAASC,qBAAqB,QAAQ,0BAA0B;AAEhE,SAASC,qBAAqB,QAAQ,UAAU;AAEhD,SAASC,kBAAkBC,SAAoB;IAC7C,IAAIA,cAAc,QAAQ,OAAO;IACjC,IAAIA,cAAc,QAAQ,OAAO;IACjC,OAAOA;AACT;AAEA,OAAO,SAASZ,YAAY,EAC1Ba,QAAQ,EACRC,WAAW,EACXC,SAAS,EACTC,oBAAoB,IAAI,EACxBC,UAAU,EACVC,MAAM,EACNC,SAAS,EACTC,cAAc,EACdC,cAAc,EACG;IACjB,MAAMC,eAAeb;IACrB,MAAM,EAAEc,GAAG,EAAEC,MAAM,EAAEC,IAAI,EAAEC,KAAK,EAAE,GAAGhB,sBAAsBU,gBAAgB;QACzEG,KAAK;QACLC,QAAQ;QACRC,MAAM;QACNC,OAAO;IACT;IACA,MAAMC,wBAA0C;QAC9CvB,MAAM;YAAEwB,UAAUC;YAAUC,WAAW;QAAa;QACpDzB,QAAQ;YAAEkB;YAAKC;YAAQO,SAASN;YAAMO,UAAUN;QAAM;QACtDlB,0BAA0BQ,oBAAoB,YAAY;KAC3D;IACD,IAAIC,cAAcA,WAAWgB,MAAM,GAAG,GAAG;QACvCN,sBAAsBO,IAAI,CAAC3B,oBAAoBU,WAAWkB,GAAG,CAACxB;IAChE;IACA,IAAIU,gBAAgB;QAClBM,sBAAsBO,IAAI,CAAC5B,uBAAuBe;IACpD;IACA,IAAIF,WAAWc,QAAQ;QACrBN,sBAAsBO,IAAI,IAAIf;IAChC;IAEA,MAAMiB,sBACJ,KAACnC;QACCa,aAAaA;QACbuB,qBAAqB,CAACC;YACpB,IAAI,CAACA,WAAWvB;QAClB;QACAwB,eAAe,CAACtB,cAAcA,WAAWgB,MAAM,KAAK;QACpDf,QAAQA;kBACR,cAAA,KAAChB;YAAMiB,WAAWQ;sBAAwBd;;;IAI9C,8FAA8F;IAC9F,6CAA6C;IAC7C,IAAIS,cAAc;QAChB,OAAOc;IACT;IACA,qBACE,KAACjC;QAAKqC,OAAO;YAAEC,UAAU;QAAW;QAAGC,eAAc;kBAClDN;;AAGP;AAEA,cAAc,UAAU"}
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  import { ListItem as ComposeListItem, Text } from '@expo/ui/jetpack-compose';
3
- import { clickable } from '@expo/ui/jetpack-compose/modifiers';
3
+ import { clickable, testID as testIDModifier } from '@expo/ui/jetpack-compose/modifiers';
4
4
  import { Children } from 'react';
5
5
  import { extractListItemSlots } from './ListItemSlots';
6
6
  // Compose hosts can't render raw strings — they need a `Text` composable.
@@ -17,7 +17,7 @@ function wrapStrings(node) {
17
17
  * Android implementation of `ListItem`.
18
18
  * Delegates to Material 3 `ListItem` and applies `clickable` for tap handling.
19
19
  */ export function ListItem(props) {
20
- const { children, onPress, leading: leadingProp, trailing: trailingProp, supportingText, modifiers, colors } = props;
20
+ const { children, onPress, leading: leadingProp, trailing: trailingProp, supportingText, testID, modifiers, colors } = props;
21
21
  const slots = extractListItemSlots(children);
22
22
  const leading = slots.leading ?? leadingProp;
23
23
  const trailing = slots.trailing ?? trailingProp;
@@ -26,6 +26,9 @@ function wrapStrings(node) {
26
26
  ...onPress ? [
27
27
  clickable(onPress)
28
28
  ] : [],
29
+ ...testID ? [
30
+ testIDModifier(testID)
31
+ ] : [],
29
32
  ...modifiers ?? []
30
33
  ];
31
34
  return /*#__PURE__*/ _jsxs(ComposeListItem, {
@@ -1 +1 @@
1
- {"version":3,"sources":["universal/ListItem/ListItem.android.tsx"],"sourcesContent":[null],"names":["ListItem","ComposeListItem","Text","clickable","Children","extractListItemSlots","wrapStrings","node","Array","isArray","map","props","children","onPress","leading","leadingProp","trailing","trailingProp","supportingText","modifiers","colors","slots","supporting","itemModifiers","length","undefined","HeadlineContent","headline","SupportingContent","LeadingContent","TrailingContent"],"mappings":";AAAA,SAASA,YAAYC,eAAe,EAAEC,IAAI,QAAQ,2BAA2B;AAC7E,SAASC,SAAS,QAAQ,qCAAqC;AAC/D,SAASC,QAAQ,QAAwB,QAAQ;AAEjD,SAASC,oBAAoB,QAAQ,kBAAkB;AAGvD,0EAA0E;AAC1E,4GAA4G;AAC5G,SAASC,YAAYC,IAAe;IAClC,IAAIA,QAAQ,QAAQ,OAAOA,SAAS,WAAW,OAAOA;IACtD,IAAI,OAAOA,SAAS,YAAY,OAAOA,SAAS,UAAU,qBAAO,KAACL;kBAAMK;;IACxE,IAAIC,MAAMC,OAAO,CAACF,OAAO,OAAOH,SAASM,GAAG,CAACH,MAAMD;IACnD,OAAOC;AACT;AAEA;;;CAGC,GACD,OAAO,SAASP,SAASW,KAAoB;IAC3C,MAAM,EACJC,QAAQ,EACRC,OAAO,EACPC,SAASC,WAAW,EACpBC,UAAUC,YAAY,EACtBC,cAAc,EACdC,SAAS,EACTC,MAAM,EACP,GAAGT;IACJ,MAAMU,QAAQhB,qBAAqBO;IACnC,MAAME,UAAUO,MAAMP,OAAO,IAAIC;IACjC,MAAMC,WAAWK,MAAML,QAAQ,IAAIC;IACnC,MAAMK,aAAaD,MAAMC,UAAU,IAAIJ;IACvC,MAAMK,gBAAgB;WAAKV,UAAU;YAACV,UAAUU;SAAS,GAAG,EAAE;WAAOM,aAAa,EAAE;KAAE;IAEtF,qBACE,MAAClB;QAAgBmB,QAAQA;QAAQD,WAAWI,cAAcC,MAAM,GAAGD,gBAAgBE;;0BACjF,KAACxB,gBAAgByB,eAAe;0BAC9B,cAAA;8BAAGpB,YAAYe,MAAMM,QAAQ;;;YAE9BL,cAAc,qBACb,KAACrB,gBAAgB2B,iBAAiB;0BAC/B,OAAON,eAAe,YAAY,OAAOA,eAAe,yBACvD,KAACpB;8BAAMoB;qBAEPA;iBAGF;YACHR,WAAW,qBACV,KAACb,gBAAgB4B,cAAc;0BAAEvB,YAAYQ;iBAC3C;YACHE,YAAY,qBACX,KAACf,gBAAgB6B,eAAe;0BAAExB,YAAYU;iBAC5C;;;AAGV;AAEA,cAAc,UAAU"}
1
+ {"version":3,"sources":["universal/ListItem/ListItem.android.tsx"],"sourcesContent":[null],"names":["ListItem","ComposeListItem","Text","clickable","testID","testIDModifier","Children","extractListItemSlots","wrapStrings","node","Array","isArray","map","props","children","onPress","leading","leadingProp","trailing","trailingProp","supportingText","modifiers","colors","slots","supporting","itemModifiers","length","undefined","HeadlineContent","headline","SupportingContent","LeadingContent","TrailingContent"],"mappings":";AAAA,SAASA,YAAYC,eAAe,EAAEC,IAAI,QAAQ,2BAA2B;AAC7E,SAASC,SAAS,EAAEC,UAAUC,cAAc,QAAQ,qCAAqC;AACzF,SAASC,QAAQ,QAAwB,QAAQ;AAEjD,SAASC,oBAAoB,QAAQ,kBAAkB;AAGvD,0EAA0E;AAC1E,4GAA4G;AAC5G,SAASC,YAAYC,IAAe;IAClC,IAAIA,QAAQ,QAAQ,OAAOA,SAAS,WAAW,OAAOA;IACtD,IAAI,OAAOA,SAAS,YAAY,OAAOA,SAAS,UAAU,qBAAO,KAACP;kBAAMO;;IACxE,IAAIC,MAAMC,OAAO,CAACF,OAAO,OAAOH,SAASM,GAAG,CAACH,MAAMD;IACnD,OAAOC;AACT;AAEA;;;CAGC,GACD,OAAO,SAAST,SAASa,KAAoB;IAC3C,MAAM,EACJC,QAAQ,EACRC,OAAO,EACPC,SAASC,WAAW,EACpBC,UAAUC,YAAY,EACtBC,cAAc,EACdhB,MAAM,EACNiB,SAAS,EACTC,MAAM,EACP,GAAGT;IACJ,MAAMU,QAAQhB,qBAAqBO;IACnC,MAAME,UAAUO,MAAMP,OAAO,IAAIC;IACjC,MAAMC,WAAWK,MAAML,QAAQ,IAAIC;IACnC,MAAMK,aAAaD,MAAMC,UAAU,IAAIJ;IACvC,MAAMK,gBAAgB;WAChBV,UAAU;YAACZ,UAAUY;SAAS,GAAG,EAAE;WACnCX,SAAS;YAACC,eAAeD;SAAQ,GAAG,EAAE;WACtCiB,aAAa,EAAE;KACpB;IAED,qBACE,MAACpB;QAAgBqB,QAAQA;QAAQD,WAAWI,cAAcC,MAAM,GAAGD,gBAAgBE;;0BACjF,KAAC1B,gBAAgB2B,eAAe;0BAC9B,cAAA;8BAAGpB,YAAYe,MAAMM,QAAQ;;;YAE9BL,cAAc,qBACb,KAACvB,gBAAgB6B,iBAAiB;0BAC/B,OAAON,eAAe,YAAY,OAAOA,eAAe,yBACvD,KAACtB;8BAAMsB;qBAEPA;iBAGF;YACHR,WAAW,qBACV,KAACf,gBAAgB8B,cAAc;0BAAEvB,YAAYQ;iBAC3C;YACHE,YAAY,qBACX,KAACjB,gBAAgB+B,eAAe;0BAAExB,YAAYU;iBAC5C;;;AAGV;AAEA,cAAc,UAAU"}
@@ -59,6 +59,8 @@ struct BarChartStyle: Record {
59
59
  struct PieChartStyle: Record {
60
60
  @Field var innerRadius: Double = 0.3
61
61
  @Field var angularInset: Double = 2.0
62
+ @Field var cornerRadius: Double = 0.0
63
+ @Field var opacity: Double = 0.8
62
64
  }
63
65
 
64
66
  struct PointChartStyle: Record {
@@ -115,10 +117,11 @@ public struct ChartView: ExpoSwiftUI.View {
115
117
 
116
118
  @available(iOS 17.0, tvOS 17.0, *)
117
119
  private func createBasePieMark(for dataPoint: ChartDataPoint) -> SectorMark {
118
- let style = props.pieStyle ?? PieChartStyle()
119
- return SectorMark(angle: .value("Value", dataPoint.y), innerRadius: .ratio(style.innerRadius), angularInset: style.angularInset)
120
+ return SectorMark(angle: .value("Value", dataPoint.y), innerRadius: .ratio(pieStyle.innerRadius), angularInset: pieStyle.angularInset)
120
121
  }
121
122
 
123
+ private var pieStyle: PieChartStyle { props.pieStyle ?? PieChartStyle() }
124
+
122
125
  @available(iOS 16.0, tvOS 16.0, *)
123
126
  private func createAreaMark(for dataPoint: ChartDataPoint) -> some ChartContent {
124
127
  if let numericX = dataPoint.xNumericValue {
@@ -212,9 +215,9 @@ public struct ChartView: ExpoSwiftUI.View {
212
215
  case .pie:
213
216
  if #available(iOS 17.0, tvOS 17.0, *) {
214
217
  if hasIndividualColors {
215
- createBasePieMark(for: dataPoint).foregroundStyle(dataPoint.color ?? .blue).opacity(0.8)
218
+ createBasePieMark(for: dataPoint).foregroundStyle(dataPoint.color ?? .blue).cornerRadius(CGFloat(pieStyle.cornerRadius)).opacity(pieStyle.opacity)
216
219
  } else {
217
- createBasePieMark(for: dataPoint).foregroundStyle(by: .value("Category", dataPoint.xValue)).opacity(0.8)
220
+ createBasePieMark(for: dataPoint).foregroundStyle(by: .value("Category", dataPoint.xValue)).cornerRadius(CGFloat(pieStyle.cornerRadius)).opacity(pieStyle.opacity)
218
221
  }
219
222
  }
220
223
  case .rectangle:
@@ -48,6 +48,7 @@ struct DataListForEachItemView: ExpoSwiftUI.View {
48
48
 
49
49
  var body: some View {
50
50
  Children()
51
+ .publishZeroContentOrigin(props.shadowNodeProxy)
51
52
  }
52
53
  }
53
54
 
@@ -41,6 +41,7 @@ public struct GridRowView: ExpoSwiftUI.View {
41
41
  if #available(iOS 16.0, macOS 13.0, tvOS 16.0, *) {
42
42
  GridRow {
43
43
  Children()
44
+ .publishZeroContentOrigin(props.shadowNodeProxy)
44
45
  }
45
46
  } else {
46
47
  EmptyView()
@@ -3,11 +3,28 @@
3
3
  import SwiftUI
4
4
  import ExpoModulesCore
5
5
 
6
- /// Coordinate space anchored at the `Host`, so hosted React Native views can report where SwiftUI
7
- /// actually placed them. Name it last in the chain: Yoga measures a hosted view from the `Host`
8
- /// component view, so any `Host` inset or alignment has to be inside this space, not outside it.
6
+ /// Coordinate space anchored at the `Host`'s SwiftUI root, which macOS measures hosted React Native
7
+ /// views from. iOS uses `HostingViewReference` instead, because this space starts after the
8
+ /// safe-area inset that `UIHostingController` applies to the root.
9
9
  internal let expoHostCoordinateSpace = "expo.ui.host"
10
10
 
11
+ /// The enclosing `Host`'s UIKit view, which Yoga laid out. iOS measures hosted React Native views
12
+ /// from it.
13
+ internal final class HostingViewReference {
14
+ weak var view: UIView?
15
+ }
16
+
17
+ private struct HostingViewEnvironmentKey: EnvironmentKey {
18
+ static let defaultValue: HostingViewReference? = nil
19
+ }
20
+
21
+ extension EnvironmentValues {
22
+ var expoHostingView: HostingViewReference? {
23
+ get { self[HostingViewEnvironmentKey.self] }
24
+ set { self[HostingViewEnvironmentKey.self] = newValue }
25
+ }
26
+ }
27
+
11
28
  internal enum ExpoColorScheme: String, Enumerable {
12
29
  case light
13
30
  case dark
@@ -46,7 +63,11 @@ internal final class HostViewProps: ExpoSwiftUI.ViewProps, ExpoSwiftUI.SafeAreaC
46
63
  @Field var ignoreSafeArea: ExpoSwiftUI.IgnoreSafeArea?
47
64
  @Field var modifiers: ModifierArray?
48
65
  var onLayoutContent = EventDispatcher()
49
- weak var hostingView: UIView?
66
+ let hostingViewReference = HostingViewReference()
67
+ var hostingView: UIView? {
68
+ get { hostingViewReference.view }
69
+ set { hostingViewReference.view = newValue }
70
+ }
50
71
  }
51
72
 
52
73
  struct HostView: ExpoSwiftUI.View, ExpoSwiftUI.WithHostingView {
@@ -68,6 +89,7 @@ struct HostView: ExpoSwiftUI.View, ExpoSwiftUI.WithHostingView {
68
89
  HostLayout {
69
90
  Children()
70
91
  }
92
+ .environment(\.expoHostingView, props.hostingViewReference)
71
93
  .fixedSize(horizontal: props.matchContentsHorizontal, vertical: props.matchContentsVertical)
72
94
  .modifier(LayoutDirectionModifier(layoutDirection: layoutDirection))
73
95
  .modifier(ColorSchemeModifier(colorScheme: props.colorScheme?.toColorScheme()))
@@ -90,6 +112,7 @@ struct HostView: ExpoSwiftUI.View, ExpoSwiftUI.WithHostingView {
90
112
  ZStack(alignment: alignment) {
91
113
  Children()
92
114
  }
115
+ .environment(\.expoHostingView, props.hostingViewReference)
93
116
  .fixedSize(horizontal: props.matchContentsHorizontal, vertical: props.matchContentsVertical)
94
117
  .modifier(LayoutDirectionModifier(layoutDirection: layoutDirection))
95
118
  .modifier(ColorSchemeModifier(colorScheme: props.colorScheme?.toColorScheme()))
@@ -238,23 +238,39 @@ internal enum PresentationSizingOption: String, Enumerable {
238
238
  case page
239
239
  }
240
240
 
241
+ internal struct PresentationSizingFittedAxes: Record {
242
+ @Field var horizontal: Bool = false
243
+ @Field var vertical: Bool = false
244
+ }
245
+
241
246
  internal struct PresentationSizingModifier: ViewModifier, Record {
242
247
  @Field var sizing: PresentationSizingOption = .automatic
248
+ @Field var fitted: PresentationSizingFittedAxes?
243
249
 
244
250
  func body(content: Content) -> some View {
245
251
  if #available(iOS 18.0, tvOS 18.0, macOS 15.0, *) {
246
252
  switch sizing {
247
253
  case .automatic:
248
- content.presentationSizing(.automatic)
254
+ applySizing(content, .automatic)
249
255
  case .fitted:
250
- content.presentationSizing(.fitted)
256
+ applySizing(content, .fitted)
251
257
  case .form:
252
- content.presentationSizing(.form)
258
+ applySizing(content, .form)
253
259
  case .page:
254
- content.presentationSizing(.page)
260
+ applySizing(content, .page)
255
261
  }
256
262
  } else {
257
263
  content
258
264
  }
259
265
  }
266
+
267
+ @available(iOS 18.0, tvOS 18.0, macOS 15.0, *)
268
+ @ViewBuilder
269
+ private func applySizing(_ content: Content, _ sizing: some PresentationSizing) -> some View {
270
+ if let fitted {
271
+ content.presentationSizing(sizing.fitted(horizontal: fitted.horizontal, vertical: fitted.vertical))
272
+ } else {
273
+ content.presentationSizing(sizing)
274
+ }
275
+ }
260
276
  }
@@ -21,6 +21,7 @@ internal struct NamespaceView: ExpoSwiftUI.View {
21
21
  NamespaceRegistry.shared.registerNamespace(namespace, forKey: props.id)
22
22
 
23
23
  return Children()
24
+ .publishZeroContentOrigin(props.shadowNodeProxy)
24
25
  .onDisappear {
25
26
  NamespaceRegistry.shared.unregisterNamespace(forKey: props.id)
26
27
  }
@@ -107,14 +107,17 @@ struct RNHostView: ExpoSwiftUI.View {
107
107
  private struct PublishContentOriginModifier: ViewModifier {
108
108
  let shadowNodeProxy: ExpoSwiftUI.ShadowNodeProxy
109
109
  let isEnabled: Bool
110
+ @Environment(\.expoHostingView) private var hostingView
110
111
 
111
112
  func body(content: Content) -> some View {
112
113
  if isEnabled {
113
114
  content
114
- .onGeometryChange(for: CGRect.self) { proxy in
115
- proxy.frame(in: .named(expoHostCoordinateSpace))
116
- } action: { frame in
117
- shadowNodeProxy.setContentOrigin?(frame.origin)
115
+ .onGeometryChange(for: CGPoint?.self) { proxy in
116
+ originInHost(proxy)
117
+ } action: { origin in
118
+ if let origin {
119
+ shadowNodeProxy.setContentOrigin?(origin)
120
+ }
118
121
  }
119
122
  .onDisappear {
120
123
  shadowNodeProxy.clearContentOrigin?()
@@ -123,6 +126,18 @@ private struct PublishContentOriginModifier: ViewModifier {
123
126
  content
124
127
  }
125
128
  }
129
+
130
+ // Relative to the `Host`'s UIKit view, which Yoga laid out, so a safe-area inset is included.
131
+ private func originInHost(_ proxy: GeometryProxy) -> CGPoint? {
132
+ #if os(macOS)
133
+ return proxy.frame(in: .named(expoHostCoordinateSpace)).origin
134
+ #else
135
+ guard let hostView = hostingView?.view, let window = hostView.window else {
136
+ return nil
137
+ }
138
+ return hostView.convert(proxy.frame(in: .global).origin, from: window)
139
+ #endif
140
+ }
126
141
  }
127
142
 
128
143
  // Tracks the `RCTSurfaceTouchHandler` attached to a hosted RN view so it can be detached when the
@@ -17,6 +17,7 @@ public struct SlotView: ExpoSwiftUI.View {
17
17
 
18
18
  public var body: some View {
19
19
  Children()
20
+ .publishZeroContentOrigin(props.shadowNodeProxy)
20
21
  }
21
22
 
22
23
  func extra<T>(_ key: String, as type: T.Type = T.self) -> T? {
@@ -56,7 +56,9 @@ internal struct TabView: ExpoSwiftUI.View {
56
56
  systemImage: tab.props.systemImage ?? "",
57
57
  value: tab.props.value
58
58
  ) {
59
+ // The tab's own body does not run here, so publish its zero content origin on its content.
59
60
  Self.tabContent(for: tab.props.children ?? [])
61
+ .publishZeroContentOrigin(tab.props.shadowNodeProxy)
60
62
  }
61
63
  #if !os(tvOS)
62
64
  .badge(Self.badgeText(from: tab.props.modifiers))
@@ -15,7 +15,8 @@ private struct ToolbarContentView: View {
15
15
  let children = props.children ?? []
16
16
 
17
17
  if children.contains(where: isItem) {
18
- children.reduce(base) { view, child in
18
+ // The content slot's own body does not run here, so publish its zero content origin on the base.
19
+ children.reduce(AnyView(base.publishZeroContentOrigin(props.shadowNodeProxy))) { view, child in
19
20
  let childView: any View = child.childView
20
21
 
21
22
  guard let slot = child.childView as? SlotView, slot.props.name == "item" else {
@@ -19,6 +19,19 @@ public struct UIBaseView<Props: UIBaseViewProps, Content: ExpoSwiftUI.View<Props
19
19
  innerView
20
20
  .applyAccessibilityIdentifier(props.testID)
21
21
  .applyModifiers(props.modifiers, appContext: props.appContext, globalEventDispatcher: props.globalEventDispatcher)
22
+ .publishZeroContentOrigin(props.shadowNodeProxy)
23
+ }
24
+ }
25
+
26
+ extension View {
27
+ /**
28
+ SwiftUI places this view, so `measure()` must skip its Yoga origin. A zero content origin does that,
29
+ and `RNHostView` reports its own position inside the `Host`. Core clears the entry on teardown.
30
+ */
31
+ func publishZeroContentOrigin(_ shadowNodeProxy: ExpoSwiftUI.ShadowNodeProxy) -> some View {
32
+ onAppear {
33
+ shadowNodeProxy.setContentOrigin?(.zero)
34
+ }
22
35
  }
23
36
  }
24
37
 
@@ -0,0 +1 @@
1
+ f9a24faad34f9f66bebcdde7d05a6cf72a8b4b9030819b80049de5084a694ef0
@@ -0,0 +1 @@
1
+ 10ed672c04082cf5f06e6ca6dca0f28229f11f3d503d46e5b61dbc7d3ad50bfdc1399838dd38dc5b8c1643ec375c4bf1672c95606ce28f7ed36384f66b829b68
@@ -0,0 +1 @@
1
+ 93a6d734857d79049d179014133d651be167840a
@@ -0,0 +1 @@
1
+ 6cbb10f1e4cd5618c6997d87c2021e97c7bab1b8fc4ecc7be48f563e9c0e284a
@@ -0,0 +1 @@
1
+ ba561fa50c9fde30184d2c36051e644fd87db59555b7b38f8e2e5b7096b03bf0d2aec3e53fff1831d2705d85b174ec1a7fc2e9cadc69c41237aac262bbea9365
@@ -3,7 +3,7 @@
3
3
  "component": {
4
4
  "group": "expo.modules.ui",
5
5
  "module": "expo.modules.ui",
6
- "version": "58.0.15",
6
+ "version": "58.0.17",
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.15.aar",
28
- "url": "expo.modules.ui-58.0.15.aar",
29
- "size": 1847287,
30
- "sha512": "a96d874afa65f7edf884a6b9ea0d01b7d2eb2f1aeb86db4afaaeefa6073f153f29cafe8a1ce8ae9c8c6069cfe8534197add3dba900e350e381598cf3e76e8c79",
31
- "sha256": "85ad13c4695409acef3dad5a8fd8cb6cbd472bcf2ac7d6514b3f0e9fd3b3d590",
32
- "sha1": "019221c48e7c0648984cb5603c4927d391a241cd",
33
- "md5": "620eb66ce22bd9cd4c1e0a0c6c0812f1"
27
+ "name": "expo.modules.ui-58.0.17.aar",
28
+ "url": "expo.modules.ui-58.0.17.aar",
29
+ "size": 1859361,
30
+ "sha512": "ba561fa50c9fde30184d2c36051e644fd87db59555b7b38f8e2e5b7096b03bf0d2aec3e53fff1831d2705d85b174ec1a7fc2e9cadc69c41237aac262bbea9365",
31
+ "sha256": "6cbb10f1e4cd5618c6997d87c2021e97c7bab1b8fc4ecc7be48f563e9c0e284a",
32
+ "sha1": "93a6d734857d79049d179014133d651be167840a",
33
+ "md5": "b51953e6905c7a42506ea0d23c859703"
34
34
  }
35
35
  ]
36
36
  },
@@ -65,28 +65,28 @@
65
65
  "group": "androidx.compose.foundation",
66
66
  "module": "foundation-android",
67
67
  "version": {
68
- "requires": "1.10.6"
68
+ "requires": "1.12.1"
69
69
  }
70
70
  },
71
71
  {
72
72
  "group": "androidx.compose.ui",
73
73
  "module": "ui-android",
74
74
  "version": {
75
- "requires": "1.10.6"
75
+ "requires": "1.12.1"
76
76
  }
77
77
  },
78
78
  {
79
79
  "group": "androidx.compose.material3",
80
80
  "module": "material3",
81
81
  "version": {
82
- "requires": "1.5.0-alpha17"
82
+ "requires": "1.5.0-beta01"
83
83
  }
84
84
  },
85
85
  {
86
86
  "group": "androidx.compose.material3",
87
87
  "module": "material3-android",
88
88
  "version": {
89
- "requires": "1.5.0-alpha17"
89
+ "requires": "1.5.0-beta01"
90
90
  }
91
91
  },
92
92
  {
@@ -141,13 +141,13 @@
141
141
  ],
142
142
  "files": [
143
143
  {
144
- "name": "expo.modules.ui-58.0.15.aar",
145
- "url": "expo.modules.ui-58.0.15.aar",
146
- "size": 1847287,
147
- "sha512": "a96d874afa65f7edf884a6b9ea0d01b7d2eb2f1aeb86db4afaaeefa6073f153f29cafe8a1ce8ae9c8c6069cfe8534197add3dba900e350e381598cf3e76e8c79",
148
- "sha256": "85ad13c4695409acef3dad5a8fd8cb6cbd472bcf2ac7d6514b3f0e9fd3b3d590",
149
- "sha1": "019221c48e7c0648984cb5603c4927d391a241cd",
150
- "md5": "620eb66ce22bd9cd4c1e0a0c6c0812f1"
144
+ "name": "expo.modules.ui-58.0.17.aar",
145
+ "url": "expo.modules.ui-58.0.17.aar",
146
+ "size": 1859361,
147
+ "sha512": "ba561fa50c9fde30184d2c36051e644fd87db59555b7b38f8e2e5b7096b03bf0d2aec3e53fff1831d2705d85b174ec1a7fc2e9cadc69c41237aac262bbea9365",
148
+ "sha256": "6cbb10f1e4cd5618c6997d87c2021e97c7bab1b8fc4ecc7be48f563e9c0e284a",
149
+ "sha1": "93a6d734857d79049d179014133d651be167840a",
150
+ "md5": "b51953e6905c7a42506ea0d23c859703"
151
151
  }
152
152
  ]
153
153
  },
@@ -161,13 +161,13 @@
161
161
  },
162
162
  "files": [
163
163
  {
164
- "name": "expo.modules.ui-58.0.15-sources.jar",
165
- "url": "expo.modules.ui-58.0.15-sources.jar",
166
- "size": 111654,
167
- "sha512": "5569d8f73d7b0d41af8d77ca8cb4e8685384113a45e151b9c6cdad1b660844183067026b2fc16c150ac409a0a097fb4ac78c4f5c31afe56862f306f8daf7c538",
168
- "sha256": "651218fb79e50f51035a06d7e88ef8cd9cd391f8b66edcf46abdc431f0a41cfc",
169
- "sha1": "584c7a2ab4d40b05b4658c93c1a689ce0587dc06",
170
- "md5": "2ea3d659cdac9ba8f6d43d9679a48905"
164
+ "name": "expo.modules.ui-58.0.17-sources.jar",
165
+ "url": "expo.modules.ui-58.0.17-sources.jar",
166
+ "size": 113113,
167
+ "sha512": "10ed672c04082cf5f06e6ca6dca0f28229f11f3d503d46e5b61dbc7d3ad50bfdc1399838dd38dc5b8c1643ec375c4bf1672c95606ce28f7ed36384f66b829b68",
168
+ "sha256": "f9a24faad34f9f66bebcdde7d05a6cf72a8b4b9030819b80049de5084a694ef0",
169
+ "sha1": "5d7c4fd251da7578f23af5102d539533aefb3e64",
170
+ "md5": "83ac1d8d00a142a3ffa834c4a6c1db65"
171
171
  }
172
172
  ]
173
173
  }
@@ -0,0 +1 @@
1
+ 43aed8719871e806fa4b5a0f69fe75da7a7424f8
@@ -0,0 +1 @@
1
+ d9eeecec40ed29a204b843d0629816e5187519c1ba1af7d603696511f8a62100
@@ -0,0 +1 @@
1
+ 31f0b1ae5e0569d53a08e7814623d7680272d04bd24f24d3f769140c046097ce3d3a970d19293a9185f8406611ae6a98a742c6cde3cfa8c51a3236e4a23fbdc1
@@ -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.15</version>
12
+ <version>58.0.17</version>
13
13
  <packaging>aar</packaging>
14
14
  <name>expo.modules.ui</name>
15
15
  <url>https://github.com/expo/expo</url>
@@ -57,25 +57,25 @@
57
57
  <dependency>
58
58
  <groupId>androidx.compose.foundation</groupId>
59
59
  <artifactId>foundation-android</artifactId>
60
- <version>1.10.6</version>
60
+ <version>1.12.1</version>
61
61
  <scope>runtime</scope>
62
62
  </dependency>
63
63
  <dependency>
64
64
  <groupId>androidx.compose.ui</groupId>
65
65
  <artifactId>ui-android</artifactId>
66
- <version>1.10.6</version>
66
+ <version>1.12.1</version>
67
67
  <scope>runtime</scope>
68
68
  </dependency>
69
69
  <dependency>
70
70
  <groupId>androidx.compose.material3</groupId>
71
71
  <artifactId>material3</artifactId>
72
- <version>1.5.0-alpha17</version>
72
+ <version>1.5.0-beta01</version>
73
73
  <scope>runtime</scope>
74
74
  </dependency>
75
75
  <dependency>
76
76
  <groupId>androidx.compose.material3</groupId>
77
77
  <artifactId>material3-android</artifactId>
78
- <version>1.5.0-alpha17</version>
78
+ <version>1.5.0-beta01</version>
79
79
  <scope>runtime</scope>
80
80
  </dependency>
81
81
  <dependency>
@@ -0,0 +1 @@
1
+ 94dac94419f825b433dd7a57ba548ec8395a276f
@@ -0,0 +1 @@
1
+ 84381286ae177b29ab5287316eeb3f405532f1608c01d7535afdb85f8c0e9149
@@ -0,0 +1 @@
1
+ 9d1c51764187080d9adff9998f2fffd9702db44c55b4a507042747e0b6d3bab6e698966c5584d19c2b90c2b065e03148504c60dcc3a38f396b7218e6434f4b00
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@expo/ui",
3
- "version": "58.0.15",
3
+ "version": "58.0.17",
4
4
  "description": "A collection of UI components",
5
5
  "keywords": [
6
6
  "Jetpack Compose",
@@ -141,7 +141,7 @@
141
141
  },
142
142
  "devDependencies": {
143
143
  "@babel/core": "^7.26.0",
144
- "@expo/internal-scripts": "58.0.1",
144
+ "@expo/internal-scripts": "58.0.2",
145
145
  "@playwright/test": "^1.59.0",
146
146
  "@testing-library/react": "^16.3.0",
147
147
  "@testing-library/react-native": "^14.0.1",
@@ -0,0 +1,31 @@
1
+ import { createContext, useContext, useEffect } from 'react';
2
+
3
+ /**
4
+ * `true` inside a `Host`, where SwiftUI or Jetpack Compose renders the content. `RNHostView` sets it
5
+ * back to `false`, because its children are React Native views again.
6
+ */
7
+ export const NativeTreeContext = createContext(false);
8
+
9
+ export function useIsInsideNativeTree(): boolean {
10
+ return useContext(NativeTreeContext);
11
+ }
12
+
13
+ let warned = false;
14
+
15
+ /**
16
+ * Warns once in development when a `Host` renders directly inside another `Host`'s native content.
17
+ */
18
+ export function useWarnIfNestedHost(layoutSystem: 'SwiftUI' | 'Jetpack Compose'): void {
19
+ const isNested = useIsInsideNativeTree();
20
+ useEffect(() => {
21
+ if (__DEV__ && isNested && !warned) {
22
+ warned = true;
23
+ console.warn(
24
+ `[@expo/ui] A \`Host\` is rendered directly inside another \`Host\`'s ${layoutSystem} content. ` +
25
+ `${layoutSystem} places it, but React Native can't see where, so its layout and \`measure()\` ` +
26
+ `can be wrong, and a \`Pressable\` inside it can cancel its press. Wrap the nested \`Host\` in ` +
27
+ `\`RNHostView\`, or render its ${layoutSystem} components directly in the outer \`Host\`.`
28
+ );
29
+ }
30
+ }, [isNested, layoutSystem]);
31
+ }