@expo/ui 58.0.8 → 58.0.9

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 (119) hide show
  1. package/CHANGELOG.md +6 -7
  2. package/android/build.gradle +2 -2
  3. package/android/src/main/java/expo/modules/ui/AnimatedVisibilityView.kt +40 -8
  4. package/android/src/main/java/expo/modules/ui/ComposeViews.kt +21 -3
  5. package/android/src/main/java/expo/modules/ui/DatePickerView.kt +12 -4
  6. package/android/src/main/java/expo/modules/ui/ExpoUIModule.kt +5 -1
  7. package/android/src/main/java/expo/modules/ui/HorizontalPagerView.kt +3 -1
  8. package/android/src/main/java/expo/modules/ui/HostView.kt +64 -12
  9. package/android/src/main/java/expo/modules/ui/LazyItemsView.kt +14 -2
  10. package/android/src/main/java/expo/modules/ui/ModalBottomSheetView.kt +5 -1
  11. package/android/src/main/java/expo/modules/ui/ModifierRegistry.kt +29 -4
  12. package/android/src/main/java/expo/modules/ui/RNHostView.kt +3 -1
  13. package/android/src/main/java/expo/modules/ui/ShapeView.kt +3 -1
  14. package/android/src/main/java/expo/modules/ui/SlotView.kt +3 -1
  15. package/android/src/main/java/expo/modules/ui/SnackbarView.kt +5 -1
  16. package/android/src/main/java/expo/modules/ui/TextView.kt +3 -1
  17. package/android/src/main/java/expo/modules/ui/Utils.kt +3 -1
  18. package/android/src/main/java/expo/modules/ui/colors/MaterialColors.kt +5 -1
  19. package/android/src/main/java/expo/modules/ui/convertibles/AnimationSpecParams.kt +3 -1
  20. package/android/src/main/java/expo/modules/ui/graphics/ImageLoader.kt +6 -2
  21. package/android/src/main/java/expo/modules/ui/icon/IconView.kt +5 -1
  22. package/android/src/main/java/expo/modules/ui/state/ObservableState.kt +3 -1
  23. package/android/src/main/java/expo/modules/ui/textfield/BasicTextField.kt +10 -2
  24. package/android/src/main/java/expo/modules/ui/textfield/TextField.kt +20 -4
  25. package/android/src/main/java/expo/modules/ui/textfield/TextFieldShared.kt +3 -1
  26. package/build/jetpack-compose/LazyColumn/index.d.ts +2 -1
  27. package/build/jetpack-compose/LazyColumn/index.js +1 -0
  28. package/build/jetpack-compose/LazyColumn/index.js.map +1 -1
  29. package/build/jetpack-compose/LazyItems/index.d.ts +19 -18
  30. package/build/jetpack-compose/LazyItems/index.js +1 -2
  31. package/build/jetpack-compose/LazyItems/index.js.map +1 -1
  32. package/build/jetpack-compose/LazyRow/index.d.ts +2 -1
  33. package/build/jetpack-compose/LazyRow/index.js +1 -0
  34. package/build/jetpack-compose/LazyRow/index.js.map +1 -1
  35. package/build/jetpack-compose/index.d.ts +0 -1
  36. package/build/jetpack-compose/index.js.map +1 -1
  37. package/build/jetpack-compose/modifiers/index.d.ts +18 -3
  38. package/build/jetpack-compose/modifiers/index.js +15 -2
  39. package/build/jetpack-compose/modifiers/index.js.map +1 -1
  40. package/build/swift-ui/LazyHStack/index.d.ts +45 -0
  41. package/build/swift-ui/LazyHStack/index.js +9 -0
  42. package/build/swift-ui/LazyHStack/index.js.map +1 -1
  43. package/build/swift-ui/LazyStackForEach/index.d.ts +44 -0
  44. package/build/swift-ui/LazyStackForEach/index.js +54 -0
  45. package/build/swift-ui/LazyStackForEach/index.js.map +1 -0
  46. package/build/swift-ui/LazyVStack/index.d.ts +45 -0
  47. package/build/swift-ui/LazyVStack/index.js +9 -0
  48. package/build/swift-ui/LazyVStack/index.js.map +1 -1
  49. package/build/swift-ui/List/DataListForEach.d.ts +6 -7
  50. package/build/swift-ui/List/DataListForEach.js.map +1 -1
  51. package/build/swift-ui/List/ListForEach.d.ts +7 -1
  52. package/build/swift-ui/List/ListForEach.js +1 -5
  53. package/build/swift-ui/List/ListForEach.js.map +1 -1
  54. package/build/swift-ui/index.d.ts +1 -0
  55. package/build/swift-ui/index.js.map +1 -1
  56. package/build/universal/Switch/index.android.js +5 -1
  57. package/build/universal/Switch/index.android.js.map +1 -1
  58. package/expo-module.config.json +0 -1
  59. package/ios/DataListForEachView.swift +65 -28
  60. package/ios/LazyHStackView.swift +3 -0
  61. package/ios/LazyVStackView.swift +3 -0
  62. package/ios/ListView.swift +8 -0
  63. package/local-maven-repo/expo/modules/ui/expo.modules.ui/{58.0.8/expo.modules.ui-58.0.8-sources.jar → 58.0.9/expo.modules.ui-58.0.9-sources.jar} +0 -0
  64. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.9/expo.modules.ui-58.0.9-sources.jar.md5 +1 -0
  65. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.9/expo.modules.ui-58.0.9-sources.jar.sha1 +1 -0
  66. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.9/expo.modules.ui-58.0.9-sources.jar.sha256 +1 -0
  67. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.9/expo.modules.ui-58.0.9-sources.jar.sha512 +1 -0
  68. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.9/expo.modules.ui-58.0.9.aar +0 -0
  69. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.9/expo.modules.ui-58.0.9.aar.md5 +1 -0
  70. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.9/expo.modules.ui-58.0.9.aar.sha1 +1 -0
  71. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.9/expo.modules.ui-58.0.9.aar.sha256 +1 -0
  72. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.9/expo.modules.ui-58.0.9.aar.sha512 +1 -0
  73. package/local-maven-repo/expo/modules/ui/expo.modules.ui/{58.0.8/expo.modules.ui-58.0.8.module → 58.0.9/expo.modules.ui-58.0.9.module} +22 -22
  74. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.9/expo.modules.ui-58.0.9.module.md5 +1 -0
  75. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.9/expo.modules.ui-58.0.9.module.sha1 +1 -0
  76. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.9/expo.modules.ui-58.0.9.module.sha256 +1 -0
  77. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.9/expo.modules.ui-58.0.9.module.sha512 +1 -0
  78. package/local-maven-repo/expo/modules/ui/expo.modules.ui/{58.0.8/expo.modules.ui-58.0.8.pom → 58.0.9/expo.modules.ui-58.0.9.pom} +1 -1
  79. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.9/expo.modules.ui-58.0.9.pom.md5 +1 -0
  80. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.9/expo.modules.ui-58.0.9.pom.sha1 +1 -0
  81. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.9/expo.modules.ui-58.0.9.pom.sha256 +1 -0
  82. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.9/expo.modules.ui-58.0.9.pom.sha512 +1 -0
  83. package/package.json +3 -3
  84. package/prebuilds/output/debug/xcframeworks/ExpoUI.tar.gz +0 -0
  85. package/prebuilds/output/release/xcframeworks/ExpoUI.tar.gz +0 -0
  86. package/src/jetpack-compose/LazyColumn/index.tsx +2 -0
  87. package/src/jetpack-compose/LazyItems/index.tsx +18 -21
  88. package/src/jetpack-compose/LazyRow/index.tsx +2 -0
  89. package/src/jetpack-compose/index.ts +0 -1
  90. package/src/jetpack-compose/modifiers/index.ts +16 -3
  91. package/src/swift-ui/LazyHStack/index.tsx +45 -0
  92. package/src/swift-ui/LazyStackForEach/index.tsx +110 -0
  93. package/src/swift-ui/LazyVStack/index.tsx +45 -0
  94. package/src/swift-ui/List/DataListForEach.tsx +7 -8
  95. package/src/swift-ui/List/ListForEach.tsx +10 -3
  96. package/src/swift-ui/index.tsx +1 -0
  97. package/src/universal/Switch/index.android.tsx +11 -2
  98. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.8/expo.modules.ui-58.0.8-sources.jar.md5 +0 -1
  99. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.8/expo.modules.ui-58.0.8-sources.jar.sha1 +0 -1
  100. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.8/expo.modules.ui-58.0.8-sources.jar.sha256 +0 -1
  101. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.8/expo.modules.ui-58.0.8-sources.jar.sha512 +0 -1
  102. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.8/expo.modules.ui-58.0.8.aar +0 -0
  103. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.8/expo.modules.ui-58.0.8.aar.md5 +0 -1
  104. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.8/expo.modules.ui-58.0.8.aar.sha1 +0 -1
  105. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.8/expo.modules.ui-58.0.8.aar.sha256 +0 -1
  106. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.8/expo.modules.ui-58.0.8.aar.sha512 +0 -1
  107. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.8/expo.modules.ui-58.0.8.module.md5 +0 -1
  108. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.8/expo.modules.ui-58.0.8.module.sha1 +0 -1
  109. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.8/expo.modules.ui-58.0.8.module.sha256 +0 -1
  110. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.8/expo.modules.ui-58.0.8.module.sha512 +0 -1
  111. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.8/expo.modules.ui-58.0.8.pom.md5 +0 -1
  112. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.8/expo.modules.ui-58.0.8.pom.sha1 +0 -1
  113. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.8/expo.modules.ui-58.0.8.pom.sha256 +0 -1
  114. package/local-maven-repo/expo/modules/ui/expo.modules.ui/58.0.8/expo.modules.ui-58.0.8.pom.sha512 +0 -1
  115. package/local-maven-repo/expo/modules/ui/expo.modules.ui/maven-metadata.xml +0 -13
  116. package/local-maven-repo/expo/modules/ui/expo.modules.ui/maven-metadata.xml.md5 +0 -1
  117. package/local-maven-repo/expo/modules/ui/expo.modules.ui/maven-metadata.xml.sha1 +0 -1
  118. package/local-maven-repo/expo/modules/ui/expo.modules.ui/maven-metadata.xml.sha256 +0 -1
  119. package/local-maven-repo/expo/modules/ui/expo.modules.ui/maven-metadata.xml.sha512 +0 -1
@@ -1,3 +1,4 @@
1
+ import { type ReactElement } from 'react';
1
2
  import { type CommonViewModifierProps } from '../types';
2
3
  import { type ListForEachProps } from './DataListForEach';
3
4
  export { type ListForEachProps };
@@ -32,4 +33,9 @@ export interface ListForEachElementsProps extends CommonViewModifierProps {
32
33
  * Pass `data` with `keyExtractor`, and render each row from a `children` function.
33
34
  * Recycles rows unless `recycling` is `false`.
34
35
  */
35
- export declare function ListForEach<ItemT>(props: ListForEachProps<ItemT> | ListForEachElementsProps): import("react").JSX.Element;
36
+ export declare function ListForEach<T>(props: ListForEachProps<T>): ReactElement;
37
+ /**
38
+ * @hidden
39
+ * @deprecated Pass `data` and `keyExtractor`, and render each row from a `children` function.
40
+ */
41
+ export declare function ListForEach(props: ListForEachElementsProps): ReactElement;
@@ -4,11 +4,7 @@ import { useItemKeys } from '../../recycling/useRecycledRows';
4
4
  import { DataListForEach, NativeSlot } from './DataListForEach';
5
5
  const ListForEachNativeView = requireNativeView('ExpoUI', 'ListForEachView');
6
6
  let warnedElements = false;
7
- /**
8
- * A group of rows inside `List`, with optional deletion and reordering.
9
- * Pass `data` with `keyExtractor`, and render each row from a `children` function.
10
- * Recycles rows unless `recycling` is `false`.
11
- */ export function ListForEach(props) {
7
+ export function ListForEach(props) {
12
8
  if (props.data === undefined) {
13
9
  if (__DEV__ && !warnedElements) {
14
10
  warnedElements = true;
@@ -1 +1 @@
1
- {"version":3,"sources":["swift-ui/List/ListForEach.tsx"],"sourcesContent":[null],"names":["requireNativeView","useItemKeys","DataListForEach","NativeSlot","ListForEachNativeView","warnedElements","ListForEach","props","data","undefined","__DEV__","console","warn","ChildrenListForEach","recycling","rest","StaticListForEach","children","onDelete","onMove","deleteEnabled","moveEnabled","nativeEvent","indices","sourceIndices","destination","keyExtractor","renderItem","overscanCount","_overscanCount","estimatedItemSize","_estimatedItemSize","itemKeys","map","item","index","itemKey","revision"],"mappings":";AAAA,SAASA,iBAAiB,QAAQ,OAAO;AAEzC,SAASC,WAAW,QAAQ,kCAAkC;AAG9D,SAASC,eAAe,EAAEC,UAAU,QAA+B,oBAAoB;AAIvF,MAAMC,wBACJJ,kBAA0C,UAAU;AAyCtD,IAAIK,iBAAiB;AAErB;;;;CAIC,GACD,OAAO,SAASC,YAAmBC,KAAyD;IAC1F,IAAIA,MAAMC,IAAI,KAAKC,WAAW;QAC5B,IAAIC,WAAW,CAACL,gBAAgB;YAC9BA,iBAAiB;YACjBM,QAAQC,IAAI,CACV;QAEJ;QACA,qBAAO,KAACC;YAAqB,GAAGN,KAAK;;IACvC;IACA,MAAM,EAAEO,YAAY,IAAI,EAAE,GAAGC,MAAM,GAAGR;IACtC,OAAOO,0BAAY,KAACZ;QAAiB,GAAGa,IAAI;uBAAO,KAACC;QAAmB,GAAGD,IAAI;;AAChF;AAEA,SAASF,oBAAoB,EAAEI,QAAQ,EAAEC,QAAQ,EAAEC,MAAM,EAAE,GAAGZ,OAAiC;IAC7F,qBACE,KAACH;QACE,GAAGG,KAAK;QACTa,eAAe,CAAC,CAACF;QACjBG,aAAa,CAAC,CAACF;QACfD,UAAUA,WAAW,CAAC,EAAEI,WAAW,EAAE,GAAKJ,SAASI,YAAYC,OAAO,IAAId;QAC1EU,QACEA,SACI,CAAC,EAAEG,WAAW,EAAE,GAAKH,OAAOG,YAAYE,aAAa,EAAEF,YAAYG,WAAW,IAC9EhB;kBAELQ;;AAGP;AAEA,SAASD,kBAAyB,EAChCR,IAAI,EACJkB,YAAY,EACZT,UAAUU,UAAU,EACpBC,eAAeC,cAAc,EAC7BC,mBAAmBC,kBAAkB,EACrC,GAAGxB,OACwC;IAC3C,MAAMyB,WAAW/B,YAAY,gBAAgBO,MAAMkB;IACnD,qBACE,KAACb;QAAqB,GAAGN,KAAK;kBAC3BC,KAAKyB,GAAG,CAAC,CAACC,MAAMC,sBACf,KAAChC;gBAAiCiC,SAASJ,QAAQ,CAACG,MAAM;gBAAGA,OAAOA;gBAAOE,UAAU;0BAClFV,WAAW;oBAAEO;oBAAMC;gBAAM;eADXH,QAAQ,CAACG,MAAM;;AAMxC"}
1
+ {"version":3,"sources":["swift-ui/List/ListForEach.tsx"],"sourcesContent":[null],"names":["requireNativeView","useItemKeys","DataListForEach","NativeSlot","ListForEachNativeView","warnedElements","ListForEach","props","data","undefined","__DEV__","console","warn","ChildrenListForEach","recycling","rest","StaticListForEach","children","onDelete","onMove","deleteEnabled","moveEnabled","nativeEvent","indices","sourceIndices","destination","keyExtractor","renderItem","overscanCount","_overscanCount","estimatedItemSize","_estimatedItemSize","itemKeys","map","item","index","itemKey","revision"],"mappings":";AAAA,SAASA,iBAAiB,QAAQ,OAAO;AAGzC,SAASC,WAAW,QAAQ,kCAAkC;AAG9D,SAASC,eAAe,EAAEC,UAAU,QAA+B,oBAAoB;AAIvF,MAAMC,wBACJJ,kBAA0C,UAAU;AAyCtD,IAAIK,iBAAiB;AAarB,OAAO,SAASC,YAAeC,KAAqD;IAClF,IAAIA,MAAMC,IAAI,KAAKC,WAAW;QAC5B,IAAIC,WAAW,CAACL,gBAAgB;YAC9BA,iBAAiB;YACjBM,QAAQC,IAAI,CACV;QAEJ;QACA,qBAAO,KAACC;YAAqB,GAAGN,KAAK;;IACvC;IACA,MAAM,EAAEO,YAAY,IAAI,EAAE,GAAGC,MAAM,GAAGR;IACtC,OAAOO,0BAAY,KAACZ;QAAiB,GAAGa,IAAI;uBAAO,KAACC;QAAmB,GAAGD,IAAI;;AAChF;AAEA,SAASF,oBAAoB,EAAEI,QAAQ,EAAEC,QAAQ,EAAEC,MAAM,EAAE,GAAGZ,OAAiC;IAC7F,qBACE,KAACH;QACE,GAAGG,KAAK;QACTa,eAAe,CAAC,CAACF;QACjBG,aAAa,CAAC,CAACF;QACfD,UAAUA,WAAW,CAAC,EAAEI,WAAW,EAAE,GAAKJ,SAASI,YAAYC,OAAO,IAAId;QAC1EU,QACEA,SACI,CAAC,EAAEG,WAAW,EAAE,GAAKH,OAAOG,YAAYE,aAAa,EAAEF,YAAYG,WAAW,IAC9EhB;kBAELQ;;AAGP;AAEA,SAASD,kBAAqB,EAC5BR,IAAI,EACJkB,YAAY,EACZT,UAAUU,UAAU,EACpBC,eAAeC,cAAc,EAC7BC,mBAAmBC,kBAAkB,EACrC,GAAGxB,OACoC;IACvC,MAAMyB,WAAW/B,YAAY,gBAAgBO,MAAMkB;IACnD,qBACE,KAACb;QAAqB,GAAGN,KAAK;kBAC3BC,KAAKyB,GAAG,CAAC,CAACC,MAAMC,sBACf,KAAChC;gBAAiCiC,SAASJ,QAAQ,CAACG,MAAM;gBAAGA,OAAOA;gBAAOE,UAAU;0BAClFV,WAAW;oBAAEO;oBAAMC;gBAAM;eADXH,QAAQ,CAACG,MAAM;;AAMxC"}
@@ -20,6 +20,7 @@ export * from './LabeledContent';
20
20
  export * from './HStack';
21
21
  export * from './LazyHStack';
22
22
  export * from './LazyVStack';
23
+ export { type LazyStackForEachProps } from './LazyStackForEach';
23
24
  export * from './VStack';
24
25
  export * from './ZStack';
25
26
  export * from './Group';
@@ -1 +1 @@
1
- {"version":3,"sources":["swift-ui/index.tsx"],"sourcesContent":[null],"names":["useNativeState","withAnimation","TextField"],"mappings":"AAAA,cAAc,8BAA8B;AAC5C,cAAc,UAAU;AACxB,cAAc,gBAAgB;AAC9B,cAAc,WAAW;AACzB,cAAc,UAAU;AACxB,cAAc,gBAAgB;AAC9B,cAAc,2BAA2B;AACzC,cAAc,uBAAuB;AACrC,cAAc,iBAAiB;AAC/B,cAAc,gBAAgB;AAC9B,cAAc,eAAe;AAC7B,cAAc,YAAY;AAC1B,cAAc,oBAAoB;AAClC,cAAc,SAAS;AACvB,cAAc,UAAU;AACxB,cAAc,SAAS;AACvB,cAAc,UAAU;AACxB,cAAc,UAAU;AACxB,cAAc,mBAAmB;AACjC,cAAc,WAAW;AACzB,cAAc,eAAe;AAC7B,cAAc,eAAe;AAC7B,cAAc,WAAW;AACzB,cAAc,WAAW;AACzB,cAAc,UAAU;AACxB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,0BAA0B;AACxC,cAAc,mBAAmB;AACjC,cAAc,wBAAwB;AACtC,cAAc,oBAAoB;AAClC,cAAc,WAAW;AACzB,cAAc,iBAAiB;AAC/B,cAAc,YAAY;AAC1B,cAAc,cAAc;AAC5B,cAAc,WAAW;AACzB,cAAc,WAAW;AACzB,cAAc,YAAY;AAC1B,cAAc,iBAAiB;AAC/B,cAAc,SAAS;AACvB,SAASA,cAAc,QAAQ,WAAW;AAC1C,SAASC,aAAa,QAA8C,kBAAkB;AACtF,cAAc,eAAe;AAC7B,cAAc,YAAY;AAC1B,cAAc,YAAY;AAC1B,cAAc,WAAW;AACzB,SACEC,SAAS,QAIJ,cAAc;AACrB,cAAc,gBAAgB;AAC9B,cAAc,cAAc;AAC5B,cAAc,yBAAyB;AACvC,cAAc,eAAe;AAC7B,cAAc,WAAW;AACzB,cAAc,SAAS;AACvB,cAAc,YAAY;AAC1B,cAAc,eAAe;AAC7B,cAAc,YAAY;AAC1B,cAAc,SAAS;AACvB,cAAc,eAAe;AAC7B,cAAc,SAAS"}
1
+ {"version":3,"sources":["swift-ui/index.tsx"],"sourcesContent":[null],"names":["useNativeState","withAnimation","TextField"],"mappings":"AAAA,cAAc,8BAA8B;AAC5C,cAAc,UAAU;AACxB,cAAc,gBAAgB;AAC9B,cAAc,WAAW;AACzB,cAAc,UAAU;AACxB,cAAc,gBAAgB;AAC9B,cAAc,2BAA2B;AACzC,cAAc,uBAAuB;AACrC,cAAc,iBAAiB;AAC/B,cAAc,gBAAgB;AAC9B,cAAc,eAAe;AAC7B,cAAc,YAAY;AAC1B,cAAc,oBAAoB;AAClC,cAAc,SAAS;AACvB,cAAc,UAAU;AACxB,cAAc,SAAS;AACvB,cAAc,UAAU;AACxB,cAAc,UAAU;AACxB,cAAc,mBAAmB;AACjC,cAAc,WAAW;AACzB,cAAc,eAAe;AAC7B,cAAc,eAAe;AAE7B,cAAc,WAAW;AACzB,cAAc,WAAW;AACzB,cAAc,UAAU;AACxB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,0BAA0B;AACxC,cAAc,mBAAmB;AACjC,cAAc,wBAAwB;AACtC,cAAc,oBAAoB;AAClC,cAAc,WAAW;AACzB,cAAc,iBAAiB;AAC/B,cAAc,YAAY;AAC1B,cAAc,cAAc;AAC5B,cAAc,WAAW;AACzB,cAAc,WAAW;AACzB,cAAc,YAAY;AAC1B,cAAc,iBAAiB;AAC/B,cAAc,SAAS;AACvB,SAASA,cAAc,QAAQ,WAAW;AAC1C,SAASC,aAAa,QAA8C,kBAAkB;AACtF,cAAc,eAAe;AAC7B,cAAc,YAAY;AAC1B,cAAc,YAAY;AAC1B,cAAc,WAAW;AACzB,SACEC,SAAS,QAIJ,cAAc;AACrB,cAAc,gBAAgB;AAC9B,cAAc,cAAc;AAC5B,cAAc,yBAAyB;AACvC,cAAc,eAAe;AAC7B,cAAc,WAAW;AACzB,cAAc,SAAS;AACvB,cAAc,YAAY;AAC1B,cAAc,eAAe;AAC7B,cAAc,YAAY;AAC1B,cAAc,SAAS;AACvB,cAAc,eAAe;AAC7B,cAAc,SAAS"}
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Row, Switch as ComposeSwitch, Text } from '@expo/ui/jetpack-compose';
3
- import { testID as testIDModifier, weight } from '@expo/ui/jetpack-compose/modifiers';
3
+ import { fillMaxWidth, IntrinsicSize, testID as testIDModifier, weight, width } from '@expo/ui/jetpack-compose/modifiers';
4
4
  export function Switch({ value, onValueChange, label, disabled, testID, modifiers }) {
5
5
  const toggle = /*#__PURE__*/ _jsx(ComposeSwitch, {
6
6
  value: value,
@@ -19,6 +19,10 @@ export function Switch({ value, onValueChange, label, disabled, testID, modifier
19
19
  horizontalArrangement: {
20
20
  spacedBy: 8
21
21
  },
22
+ modifiers: [
23
+ fillMaxWidth(),
24
+ width(IntrinsicSize.Max)
25
+ ],
22
26
  children: [
23
27
  /*#__PURE__*/ _jsx(Text, {
24
28
  modifiers: [
@@ -1 +1 @@
1
- {"version":3,"sources":["universal/Switch/index.android.tsx"],"sourcesContent":[null],"names":["Row","Switch","ComposeSwitch","Text","testID","testIDModifier","weight","value","onValueChange","label","disabled","modifiers","toggle","onCheckedChange","undefined","enabled","verticalAlignment","horizontalArrangement","spacedBy"],"mappings":";AAAA,SAASA,GAAG,EAAEC,UAAUC,aAAa,EAAEC,IAAI,QAAQ,2BAA2B;AAC9E,SAASC,UAAUC,cAAc,EAAEC,MAAM,QAAQ,qCAAqC;AAItF,OAAO,SAASL,OAAO,EAAEM,KAAK,EAAEC,aAAa,EAAEC,KAAK,EAAEC,QAAQ,EAAEN,MAAM,EAAEO,SAAS,EAAe;IAC9F,MAAMC,uBACJ,KAACV;QACCK,OAAOA;QACPM,iBAAiBH,WAAWI,YAAYN;QACxCO,SAAS,CAACL;QACVC,WAAW;eAAKA,aAAa,EAAE;eAAOP,SAAS;gBAACC,eAAeD;aAAQ,GAAG,EAAE;SAAE;;IAIlF,IAAIK,SAAS,MAAM,OAAOG;IAE1B,qBACE,MAACZ;QAAIgB,mBAAkB;QAASC,uBAAuB;YAAEC,UAAU;QAAE;;0BACnE,KAACf;gBAAKQ,WAAW;oBAACL,OAAO;iBAAG;0BAAGG;;YAC9BG;;;AAGP;AAEA,cAAc,UAAU"}
1
+ {"version":3,"sources":["universal/Switch/index.android.tsx"],"sourcesContent":[null],"names":["Row","Switch","ComposeSwitch","Text","fillMaxWidth","IntrinsicSize","testID","testIDModifier","weight","width","value","onValueChange","label","disabled","modifiers","toggle","onCheckedChange","undefined","enabled","verticalAlignment","horizontalArrangement","spacedBy","Max"],"mappings":";AAAA,SAASA,GAAG,EAAEC,UAAUC,aAAa,EAAEC,IAAI,QAAQ,2BAA2B;AAC9E,SACEC,YAAY,EACZC,aAAa,EACbC,UAAUC,cAAc,EACxBC,MAAM,EACNC,KAAK,QACA,qCAAqC;AAI5C,OAAO,SAASR,OAAO,EAAES,KAAK,EAAEC,aAAa,EAAEC,KAAK,EAAEC,QAAQ,EAAEP,MAAM,EAAEQ,SAAS,EAAe;IAC9F,MAAMC,uBACJ,KAACb;QACCQ,OAAOA;QACPM,iBAAiBH,WAAWI,YAAYN;QACxCO,SAAS,CAACL;QACVC,WAAW;eAAKA,aAAa,EAAE;eAAOR,SAAS;gBAACC,eAAeD;aAAQ,GAAG,EAAE;SAAE;;IAIlF,IAAIM,SAAS,MAAM,OAAOG;IAE1B,qBACE,MAACf;QACCmB,mBAAkB;QAClBC,uBAAuB;YAAEC,UAAU;QAAE;QACrCP,WAAW;YAACV;YAAgBK,MAAMJ,cAAciB,GAAG;SAAE;;0BACrD,KAACnB;gBAAKW,WAAW;oBAACN,OAAO;iBAAG;0BAAGI;;YAC9BG;;;AAGP;AAEA,cAAc,UAAU"}
@@ -10,7 +10,6 @@
10
10
  "publication": {
11
11
  "groupId": "expo.modules.ui",
12
12
  "artifactId": "expo.modules.ui",
13
- "version": "58.0.8",
14
13
  "repository": "local-maven-repo"
15
14
  }
16
15
  }
@@ -3,7 +3,26 @@
3
3
  import ExpoModulesCore
4
4
  import SwiftUI
5
5
 
6
+ // The axis the rows scroll along: vertical in `List` and `LazyVStack`, horizontal in `LazyHStack`.
7
+ enum DataListForEachAxis: String, Enumerable {
8
+ case vertical
9
+ case horizontal
10
+ }
11
+
12
+ private struct ContainerCrossAxisSizeKey: EnvironmentKey {
13
+ static let defaultValue: CGFloat = 0
14
+ }
15
+
16
+ extension EnvironmentValues {
17
+ // Set by `ListView`, `LazyVStackView` and `LazyHStackView`, so recycled rows reset their cached sizes when it changes.
18
+ var containerCrossAxisSize: CGFloat {
19
+ get { self[ContainerCrossAxisSizeKey.self] }
20
+ set { self[ContainerCrossAxisSizeKey.self] = newValue }
21
+ }
22
+ }
23
+
6
24
  final class DataListForEachProps: UIBaseViewProps {
25
+ @Field var axis: DataListForEachAxis = .vertical
7
26
  @Field var itemKeys: [String] = []
8
27
  @Field var revision: Int = 0
9
28
  @Field var estimatedItemSize: Double = 64
@@ -79,6 +98,7 @@ private struct DataListForEachRow: View {
79
98
  @ObservedObject var listProps: DataListForEachProps
80
99
  @ObservedObject var poolProps: DataListForEachPoolProps
81
100
  let window: DataListForEachWindow
101
+ @Environment(\.containerCrossAxisSize) private var crossAxisSize
82
102
  @State private var appeared = false
83
103
  @State private var visibilityID = UUID()
84
104
 
@@ -99,27 +119,27 @@ private struct DataListForEachRow: View {
99
119
  itemKey: itemKey,
100
120
  index: index,
101
121
  revision: listProps.revision,
102
- estimatedHeight: CGFloat(listProps.estimatedItemSize),
122
+ estimatedSize: CGFloat(listProps.estimatedItemSize),
123
+ axis: listProps.axis,
103
124
  window: window
104
125
  )
105
126
  } else {
106
- Color.clear
107
- .frame(height: window.height(for: itemKey, fallback: listProps.estimatedItemSize))
108
- .accessibilityHidden(true)
127
+ DataListForEachPlaceholder(
128
+ size: window.size(for: itemKey, fallback: listProps.estimatedItemSize),
129
+ axis: listProps.axis
130
+ )
109
131
  }
110
132
  }
111
- .frame(maxWidth: .infinity, alignment: .leading)
112
133
  .onAppear {
113
134
  appeared = true
135
+ window.updateCrossAxisSize(crossAxisSize)
114
136
  window.appear(itemKey, index: index, token: visibilityID, props: listProps)
115
137
  }
138
+ .onChange(of: crossAxisSize) { window.updateCrossAxisSize($0) }
116
139
  .onChange(of: listProps.revision) { _ in
117
140
  window.reset(listProps)
118
141
  if appeared { window.appear(itemKey, index: index, token: visibilityID, props: listProps) }
119
142
  }
120
- .onGeometryChange(for: CGFloat.self, of: { $0.size.width }, action: { width in
121
- window.updateWidth(width)
122
- })
123
143
  .onDisappear {
124
144
  appeared = false
125
145
  window.disappear(itemKey, token: visibilityID)
@@ -127,12 +147,25 @@ private struct DataListForEachRow: View {
127
147
  }
128
148
  }
129
149
 
150
+ private struct DataListForEachPlaceholder: View {
151
+ let size: CGFloat
152
+ let axis: DataListForEachAxis
153
+
154
+ // Sized along the scroll axis only, so it never stretches a lazy stack across it.
155
+ var body: some View {
156
+ Color.clear
157
+ .frame(width: axis == .horizontal ? size : 0, height: axis == .horizontal ? 0 : size)
158
+ .accessibilityHidden(true)
159
+ }
160
+ }
161
+
130
162
  private struct DataListForEachSlotContent: View {
131
163
  @ObservedObject var props: DataListForEachItemProps
132
164
  let itemKey: String
133
165
  let index: Int
134
166
  let revision: Int
135
- let estimatedHeight: CGFloat
167
+ let estimatedSize: CGFloat
168
+ let axis: DataListForEachAxis
136
169
  let window: DataListForEachWindow
137
170
  // we use this state so swiftui re-layouts when the slot is reused for a different item
138
171
  @State private var showsContent = false
@@ -146,14 +179,17 @@ private struct DataListForEachSlotContent: View {
146
179
  if showsContent {
147
180
  DataListForEachItemView(props: props)
148
181
  .id(itemKey)
149
- .onGeometryChange(for: CGFloat.self, of: { $0.size.height }, action: { height in
150
- window.measure(height, for: itemKey, revision: revision)
151
- })
182
+ .onGeometryChange(
183
+ for: CGFloat.self,
184
+ of: { axis == .horizontal ? $0.size.width : $0.size.height },
185
+ action: { size in window.measure(size, for: itemKey, revision: revision) }
186
+ )
152
187
  } else {
153
188
  // Hide the previous item while JS updates this slot.
154
- Color.clear
155
- .frame(height: window.height(for: itemKey, fallback: Double(estimatedHeight)))
156
- .accessibilityHidden(true)
189
+ DataListForEachPlaceholder(
190
+ size: window.size(for: itemKey, fallback: Double(estimatedSize)),
191
+ axis: axis
192
+ )
157
193
  }
158
194
  }
159
195
  .onAppear { showsContent = matches }
@@ -166,8 +202,9 @@ private final class DataListForEachWindow: ObservableObject {
166
202
  private weak var props: DataListForEachProps?
167
203
  private var appeared: [String: Int] = [:]
168
204
  private var visibilityTokens: [String: UUID] = [:]
169
- private var heights: [String: CGFloat] = [:]
170
- private var width: CGFloat = 0
205
+ // Row sizes along the scroll axis.
206
+ private var sizes: [String: CGFloat] = [:]
207
+ private var crossAxisSize: CGFloat = 0
171
208
  private var revision = -1
172
209
  private var pending: DispatchWorkItem?
173
210
  private var lastSent: [Int] = []
@@ -182,7 +219,7 @@ private final class DataListForEachWindow: ObservableObject {
182
219
  return
183
220
  }
184
221
  revision = props.revision
185
- heights.removeAll()
222
+ sizes.removeAll()
186
223
  let positions = Dictionary(uniqueKeysWithValues: props.itemKeys.enumerated().map { ($0.element, $0.offset) })
187
224
  appeared = positions.filter { appeared[$0.key] != nil }
188
225
  visibilityTokens = visibilityTokens.filter { positions[$0.key] != nil }
@@ -190,12 +227,12 @@ private final class DataListForEachWindow: ObservableObject {
190
227
  schedule()
191
228
  }
192
229
 
193
- func updateWidth(_ newWidth: CGFloat) {
194
- if width != newWidth {
195
- if width > 0 {
196
- heights.removeAll()
230
+ func updateCrossAxisSize(_ newSize: CGFloat) {
231
+ if crossAxisSize != newSize {
232
+ if crossAxisSize > 0 {
233
+ sizes.removeAll()
197
234
  }
198
- width = newWidth
235
+ crossAxisSize = newSize
199
236
  }
200
237
  }
201
238
 
@@ -220,15 +257,15 @@ private final class DataListForEachWindow: ObservableObject {
220
257
  schedule()
221
258
  }
222
259
 
223
- func height(for key: String, fallback: Double) -> CGFloat {
224
- heights[key] ?? CGFloat(fallback)
260
+ func size(for key: String, fallback: Double) -> CGFloat {
261
+ sizes[key] ?? CGFloat(fallback)
225
262
  }
226
263
 
227
- func measure(_ height: CGFloat, for key: String, revision: Int) {
228
- guard revision == self.revision, height.isFinite, height > 0 else {
264
+ func measure(_ size: CGFloat, for key: String, revision: Int) {
265
+ guard revision == self.revision, size.isFinite, size > 0 else {
229
266
  return
230
267
  }
231
- heights[key] = height
268
+ sizes[key] = size
232
269
  }
233
270
 
234
271
  private func schedule() {
@@ -10,6 +10,7 @@ public final class LazyHStackViewProps: UIBaseViewProps {
10
10
 
11
11
  public struct LazyHStackView: ExpoSwiftUI.View {
12
12
  @ObservedObject public var props: LazyHStackViewProps
13
+ @State private var crossAxisSize: CGFloat = 0
13
14
 
14
15
  public init(props: LazyHStackViewProps) {
15
16
  self.props = props
@@ -21,5 +22,7 @@ public struct LazyHStackView: ExpoSwiftUI.View {
21
22
  spacing: props.spacing.map { CGFloat($0) }) {
22
23
  Children()
23
24
  }
25
+ .onGeometryChange(for: CGFloat.self, of: { $0.size.height }, action: { crossAxisSize = $0 })
26
+ .environment(\.containerCrossAxisSize, crossAxisSize)
24
27
  }
25
28
  }
@@ -10,6 +10,7 @@ public final class LazyVStackViewProps: UIBaseViewProps {
10
10
 
11
11
  public struct LazyVStackView: ExpoSwiftUI.View {
12
12
  @ObservedObject public var props: LazyVStackViewProps
13
+ @State private var crossAxisSize: CGFloat = 0
13
14
 
14
15
  public init(props: LazyVStackViewProps) {
15
16
  self.props = props
@@ -21,5 +22,7 @@ public struct LazyVStackView: ExpoSwiftUI.View {
21
22
  spacing: props.spacing.map { CGFloat($0) }) {
22
23
  Children()
23
24
  }
25
+ .onGeometryChange(for: CGFloat.self, of: { $0.size.width }, action: { crossAxisSize = $0 })
26
+ .environment(\.containerCrossAxisSize, crossAxisSize)
24
27
  }
25
28
  }
@@ -11,8 +11,16 @@ final class ListProps: UIBaseViewProps {
11
11
  struct ListView: ExpoSwiftUI.View {
12
12
  @ObservedObject var props: ListProps
13
13
  @State private var selection = Set<AnyHashable>()
14
+ @State private var crossAxisSize: CGFloat = 0
14
15
 
15
16
  var body: some View {
17
+ list
18
+ .onGeometryChange(for: CGFloat.self, of: { $0.size.width }, action: { crossAxisSize = $0 })
19
+ .environment(\.containerCrossAxisSize, crossAxisSize)
20
+ }
21
+
22
+ @ViewBuilder
23
+ private var list: some View {
16
24
  if props.selection != nil {
17
25
  List(selection: $selection) {
18
26
  Children()
@@ -0,0 +1 @@
1
+ a5da15def1d399f452a19c62651e73a942d873ec
@@ -0,0 +1 @@
1
+ 73965c56280c334bb29231b9523362401285d6609ef8b75839f1c89b6a3aa4f7
@@ -0,0 +1 @@
1
+ d1b747e78264dad3ee7a5322811ff5d079433fa34a32ebb5ae5c29c5c3ef412746a8c10d3e22937037b45a4b909783329deebf92b09e5c1ef486807a5978ffc6
@@ -0,0 +1 @@
1
+ 518280855fc0ebe67334a36edceffbfbce55f947
@@ -0,0 +1 @@
1
+ a88a20a3df6e5cfd20d54e45c597425a5e052a5b8ba95a41d6b5a92aa8c02fc6
@@ -0,0 +1 @@
1
+ 1c0e1676d8ed6f47450bb5e7f28d486d275a7e0264893ea78bac3cacc0341aa3e0097f5c033fb601eac07fc8482498005a51f27b8bffcc7249366b34b14b40f5
@@ -3,7 +3,7 @@
3
3
  "component": {
4
4
  "group": "expo.modules.ui",
5
5
  "module": "expo.modules.ui",
6
- "version": "58.0.8",
6
+ "version": "58.0.9",
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.8.aar",
28
- "url": "expo.modules.ui-58.0.8.aar",
29
- "size": 1836349,
30
- "sha512": "e5ced1751f3e2e90a7320abf88d98bea0a578fbcabcf73c0aca0e9997efe4d0313375d810c789fe2d96f6f6d5cdb9f36c21c2b82f67db8626149105938f29523",
31
- "sha256": "315787d05711205c64b7245b046f29efe369b50f4e86866afef62b2b2474e537",
32
- "sha1": "94aec72d27a48e827dbb31b9d734150334b08662",
33
- "md5": "31be76a409dceed307ca47e9e66c8348"
27
+ "name": "expo.modules.ui-58.0.9.aar",
28
+ "url": "expo.modules.ui-58.0.9.aar",
29
+ "size": 1842529,
30
+ "sha512": "1c0e1676d8ed6f47450bb5e7f28d486d275a7e0264893ea78bac3cacc0341aa3e0097f5c033fb601eac07fc8482498005a51f27b8bffcc7249366b34b14b40f5",
31
+ "sha256": "a88a20a3df6e5cfd20d54e45c597425a5e052a5b8ba95a41d6b5a92aa8c02fc6",
32
+ "sha1": "518280855fc0ebe67334a36edceffbfbce55f947",
33
+ "md5": "03491dfb69ff8c25616d5f8ca35be94a"
34
34
  }
35
35
  ]
36
36
  },
@@ -141,13 +141,13 @@
141
141
  ],
142
142
  "files": [
143
143
  {
144
- "name": "expo.modules.ui-58.0.8.aar",
145
- "url": "expo.modules.ui-58.0.8.aar",
146
- "size": 1836349,
147
- "sha512": "e5ced1751f3e2e90a7320abf88d98bea0a578fbcabcf73c0aca0e9997efe4d0313375d810c789fe2d96f6f6d5cdb9f36c21c2b82f67db8626149105938f29523",
148
- "sha256": "315787d05711205c64b7245b046f29efe369b50f4e86866afef62b2b2474e537",
149
- "sha1": "94aec72d27a48e827dbb31b9d734150334b08662",
150
- "md5": "31be76a409dceed307ca47e9e66c8348"
144
+ "name": "expo.modules.ui-58.0.9.aar",
145
+ "url": "expo.modules.ui-58.0.9.aar",
146
+ "size": 1842529,
147
+ "sha512": "1c0e1676d8ed6f47450bb5e7f28d486d275a7e0264893ea78bac3cacc0341aa3e0097f5c033fb601eac07fc8482498005a51f27b8bffcc7249366b34b14b40f5",
148
+ "sha256": "a88a20a3df6e5cfd20d54e45c597425a5e052a5b8ba95a41d6b5a92aa8c02fc6",
149
+ "sha1": "518280855fc0ebe67334a36edceffbfbce55f947",
150
+ "md5": "03491dfb69ff8c25616d5f8ca35be94a"
151
151
  }
152
152
  ]
153
153
  },
@@ -161,13 +161,13 @@
161
161
  },
162
162
  "files": [
163
163
  {
164
- "name": "expo.modules.ui-58.0.8-sources.jar",
165
- "url": "expo.modules.ui-58.0.8-sources.jar",
166
- "size": 109792,
167
- "sha512": "fe7df10c6d11c1f95ca7de35f60911401b64bd4b258c6c7956611f973bd062a367c0aea2693298e3d703e58a89b70cfd2c47851400299d035ea28499e595fb8e",
168
- "sha256": "02ee570f6a4a03679186bf43c56875eebf84f15abb7e79bb7040eddad7da908d",
169
- "sha1": "c96c6c3f5dc0911a893274646c0cf2096a610423",
170
- "md5": "9fb8758d9f0ad26c9154ad6536600e2c"
164
+ "name": "expo.modules.ui-58.0.9-sources.jar",
165
+ "url": "expo.modules.ui-58.0.9-sources.jar",
166
+ "size": 110135,
167
+ "sha512": "d1b747e78264dad3ee7a5322811ff5d079433fa34a32ebb5ae5c29c5c3ef412746a8c10d3e22937037b45a4b909783329deebf92b09e5c1ef486807a5978ffc6",
168
+ "sha256": "73965c56280c334bb29231b9523362401285d6609ef8b75839f1c89b6a3aa4f7",
169
+ "sha1": "a5da15def1d399f452a19c62651e73a942d873ec",
170
+ "md5": "ec47224b2d335b3f472a55d70f343b8f"
171
171
  }
172
172
  ]
173
173
  }
@@ -0,0 +1 @@
1
+ 10a6ee8c177a62ee345887c2bed3646fcdf2bcd2
@@ -0,0 +1 @@
1
+ bb9ec229a95ef7d1d0de7c04bd74d4b6bdbf3edefc4fd79ff981bf59eb9ad7c5
@@ -0,0 +1 @@
1
+ 230bb0ac3f5f59bd76471e8b3f81c13e307783067b67697d2f986d4124fa867b93dc6889fbfeea2742adf374356352c4b389681a789b0d49f374e24dea8d966a
@@ -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.8</version>
12
+ <version>58.0.9</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
+ 3ac2c204accfb124d9f79698c682e6ba02ca29cd
@@ -0,0 +1 @@
1
+ 4c1e29b3da7ef0b39b38098eae7b5825d72b6e25656f8de8bc81d1f69ee27212
@@ -0,0 +1 @@
1
+ bd9a114fb2bdac0e64ebc684918b6ee54e0ea6afc248716449dd9c5c2df5751328cca2033951d3b3aef8df411f8efaa9c0876c790a5fba751f93cd6e83939e4c
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@expo/ui",
3
- "version": "58.0.8",
3
+ "version": "58.0.9",
4
4
  "description": "A collection of UI components",
5
5
  "keywords": [
6
6
  "Jetpack Compose",
@@ -148,7 +148,7 @@
148
148
  "@types/jest": "^29.2.1",
149
149
  "@types/node": "^22.14.0",
150
150
  "@types/react": "~19.3.0",
151
- "expo-module-scripts": "56.0.3",
151
+ "expo-module-scripts": "56.0.4",
152
152
  "react-native-reanimated": "4.7.0",
153
153
  "react-native-worklets": "0.13.0"
154
154
  },
@@ -171,9 +171,9 @@
171
171
  "optional": true
172
172
  }
173
173
  },
174
- "gitHead": "74f6d2b90bc50bd8df7b160d6e6b2204b37a8ce7",
175
174
  "scripts": {
176
175
  "precompile-ios": "et prebuild-package-for-publish",
176
+ "precompile-android": "et prebuild-android-package-for-publish",
177
177
  "build": "pnpm run build:lib && pnpm run build:plugin",
178
178
  "build:lib": "expo-build src",
179
179
  "build:plugin": "expo-build --base plugin cjs:src",
@@ -4,6 +4,8 @@ import type { ExpoModifier } from '../../types';
4
4
  import { LazyItems } from '../LazyItems';
5
5
  import { createViewModifierEventListener } from '../modifiers/utils';
6
6
 
7
+ export { LazyItems, type LazyItemsProps } from '../LazyItems';
8
+
7
9
  /**
8
10
  * Content padding values for LazyColumn.
9
11
  */
@@ -5,38 +5,36 @@ import {
5
5
  useItemKeys,
6
6
  useRecycledRows,
7
7
  type RecycledSlotProps,
8
- type RenderItem,
9
8
  type WindowChangeEvent,
10
9
  } from '../../recycling/useRecycledRows';
11
10
  import { type ViewEvent } from '../../types';
12
11
 
13
- export interface LazyItemsProps<ItemT> {
12
+ export interface LazyItemsProps<T> {
14
13
  /** Items to display. Replace the array when updating data. */
15
- data: readonly ItemT[];
14
+ data: readonly T[];
16
15
  /** Returns a stable, unique string key, also used as the lazy list item key. */
17
- keyExtractor: (item: ItemT, index: number) => string;
16
+ keyExtractor: (item: T, index: number) => string;
18
17
  /**
19
- * Renders a row. Wrap it in `useCallback`, or every row re-renders on each parent render.
20
- * Recycled rows are reused for other items, so their local state (`useState`) carries over.
21
- * Reset it when the item changes, or keep the state outside the row.
18
+ * Renders an item. Wrap it in `useCallback`, or every item re-renders on each parent render.
19
+ * Recycled views are reused for other items, so their local state (`useState`) carries over.
20
+ * Reset it when the item changes, or keep the state outside the view.
22
21
  */
23
- children: RenderItem<ItemT>;
22
+ children: (info: { item: T; index: number }) => ReactElement;
24
23
  /**
25
- * Renders only the rows near the visible range and reuses them while scrolling. Set to `false` to
26
- * render every row at once. Set it once; changing it remounts the rows.
24
+ * Renders only the items near the visible range and reuses them while scrolling. Set to `false`
25
+ * to render every item at once. Set it once; changing it remounts the items.
27
26
  * @default true
28
27
  */
29
28
  recycling?: boolean;
30
29
  /**
31
- * Extra rows to prepare on each side of the visible rows. Must be a non-negative integer.
30
+ * Extra items to prepare on each side of the visible items. Must be a non-negative integer.
32
31
  * Ignored when `recycling` is `false`.
33
32
  * @default 10
34
33
  */
35
34
  overscanCount?: number;
36
35
  /**
37
- * Placeholder size in dp along the scroll axis, until a row is measured. Must be positive.
38
- * Measurements reset when the data changes. In `LazyColumn.Items` they also reset when the list
39
- * width changes. Ignored when `recycling` is `false`.
36
+ * Placeholder size in dp along the scroll axis, until an item is measured. Must be positive.
37
+ * Ignored when `recycling` is `false`.
40
38
  * @default 64
41
39
  */
42
40
  estimatedItemSize?: number;
@@ -62,8 +60,7 @@ const LazyItemsPoolNativeView: React.ComponentType<{ children: ReactElement[] }>
62
60
  * so large data sets stay cheap. Rows that are not ready yet show a placeholder of
63
61
  * `estimatedItemSize`, or of the size last measured for that item.
64
62
  *
65
- * Mount it as a direct child of `LazyColumn` or `LazyRow`. Plain children of the same list stay
66
- * single items, so static and recycled content can be mixed in order.
63
+ * Mount it as a direct child of `LazyColumn` or `LazyRow`.
67
64
  * @platform android
68
65
  */
69
66
  export const LazyItems = createLazyItems('LazyColumn.Items');
@@ -73,29 +70,29 @@ export const LazyItems = createLazyItems('LazyColumn.Items');
73
70
  * Creates the `Items` component of one lazy list, so its errors name that list.
74
71
  */
75
72
  export function createLazyItems(componentName: string) {
76
- function Items<ItemT>({ recycling = true, ...props }: LazyItemsProps<ItemT>) {
73
+ function Items<T>({ recycling = true, ...props }: LazyItemsProps<T>) {
77
74
  return recycling ? <RecycledItems {...props} /> : <StaticItems {...props} />;
78
75
  }
79
76
 
80
77
  // Each row is a plain child of the lazy list, so it becomes one lazy item.
81
- function StaticItems<ItemT>({
78
+ function StaticItems<T>({
82
79
  data,
83
80
  keyExtractor,
84
81
  children: renderItem,
85
- }: Omit<LazyItemsProps<ItemT>, 'recycling'>) {
82
+ }: Omit<LazyItemsProps<T>, 'recycling'>) {
86
83
  const itemKeys = useItemKeys(componentName, data, keyExtractor);
87
84
  return data.map((item, index) => (
88
85
  <Fragment key={itemKeys[index]}>{renderItem({ item, index })}</Fragment>
89
86
  ));
90
87
  }
91
88
 
92
- function RecycledItems<ItemT>({
89
+ function RecycledItems<T>({
93
90
  data,
94
91
  keyExtractor,
95
92
  children: renderItem,
96
93
  overscanCount,
97
94
  estimatedItemSize = 64,
98
- }: Omit<LazyItemsProps<ItemT>, 'recycling'>) {
95
+ }: Omit<LazyItemsProps<T>, 'recycling'>) {
99
96
  const { itemKeys, revision, rows, onWindowChange } = useRecycledRows({
100
97
  componentName,
101
98
  Slot: LazyItemsSlotNativeView,
@@ -5,6 +5,8 @@ import { type ContentPadding } from '../LazyColumn';
5
5
  import { createLazyItems } from '../LazyItems';
6
6
  import { createViewModifierEventListener } from '../modifiers/utils';
7
7
 
8
+ export { LazyItems, type LazyItemsProps } from '../LazyItems';
9
+
8
10
  export interface LazyRowProps {
9
11
  /**
10
12
  * The content to display inside the lazy row.
@@ -17,7 +17,6 @@ export * from './ExposedDropdownMenuBox';
17
17
  export * from './Divider';
18
18
  export * from './Host';
19
19
  export * from './LazyColumn';
20
- export { type LazyItemsProps } from './LazyItems';
21
20
  export * from './LazyRow';
22
21
  export * from './ListItem';
23
22
  export * from './RNHostView';