@expo/ui 55.0.0-preview.6 → 55.0.0

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 (223) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/android/build.gradle +27 -8
  3. package/android/src/main/java/expo/modules/ui/BasicAlertDialogView.kt +26 -0
  4. package/android/src/main/java/expo/modules/ui/BottomSheetView.kt +12 -37
  5. package/android/src/main/java/expo/modules/ui/CardView.kt +72 -0
  6. package/android/src/main/java/expo/modules/ui/CarouselView.kt +2 -5
  7. package/android/src/main/java/expo/modules/ui/ComposeViews.kt +91 -130
  8. package/android/src/main/java/expo/modules/ui/DatePickerView.kt +2 -2
  9. package/android/src/main/java/expo/modules/ui/DividerView.kt +1 -1
  10. package/android/src/main/java/expo/modules/ui/DockedSearchBarView.kt +53 -0
  11. package/android/src/main/java/expo/modules/ui/ExpoUIModule.kt +136 -17
  12. package/android/src/main/java/expo/modules/ui/FilterChipView.kt +59 -0
  13. package/android/src/main/java/expo/modules/ui/HorizontalFloatingToolbarView.kt +63 -0
  14. package/android/src/main/java/expo/modules/ui/LazyColumnView.kt +95 -0
  15. package/android/src/main/java/expo/modules/ui/ListItemView.kt +89 -0
  16. package/android/src/main/java/expo/modules/ui/MaterialShapes.kt +77 -0
  17. package/android/src/main/java/expo/modules/ui/ModifierRegistry.kt +168 -30
  18. package/android/src/main/java/expo/modules/ui/PickerView.kt +2 -2
  19. package/android/src/main/java/expo/modules/ui/ProgressView.kt +1 -1
  20. package/android/src/main/java/expo/modules/ui/PullToRefreshBoxView.kt +40 -0
  21. package/android/src/main/java/expo/modules/ui/RNHostView.kt +87 -0
  22. package/android/src/main/java/expo/modules/ui/RadioButtonView.kt +28 -0
  23. package/android/src/main/java/expo/modules/ui/SearchBarView.kt +60 -0
  24. package/android/src/main/java/expo/modules/ui/ShapeView.kt +36 -5
  25. package/android/src/main/java/expo/modules/ui/SliderView.kt +1 -1
  26. package/android/src/main/java/expo/modules/ui/SlotView.kt +53 -0
  27. package/android/src/main/java/expo/modules/ui/SpacerView.kt +15 -0
  28. package/android/src/main/java/expo/modules/ui/SurfaceView.kt +36 -0
  29. package/android/src/main/java/expo/modules/ui/SwitchView.kt +24 -4
  30. package/android/src/main/java/expo/modules/ui/TextButtonView.kt +33 -0
  31. package/android/src/main/java/expo/modules/ui/TextInputView.kt +1 -2
  32. package/android/src/main/java/expo/modules/ui/TextView.kt +194 -0
  33. package/android/src/main/java/expo/modules/ui/ToggleButtonView.kt +96 -0
  34. package/android/src/main/java/expo/modules/ui/Utils.kt +6 -0
  35. package/android/src/main/java/expo/modules/ui/button/Button.kt +1 -1
  36. package/android/src/main/java/expo/modules/ui/button/IconButton.kt +2 -6
  37. package/android/src/main/java/expo/modules/ui/convertibles/Alignment.kt +112 -0
  38. package/android/src/main/java/expo/modules/ui/convertibles/Arrangement.kt +72 -0
  39. package/android/src/main/java/expo/modules/ui/icon/IconView.kt +159 -0
  40. package/android/src/main/java/expo/modules/ui/icon/ResourceIdHelper.kt +47 -0
  41. package/android/src/main/java/expo/modules/ui/icon/VectorIconLoader.kt +369 -0
  42. package/android/src/main/java/expo/modules/ui/menu/ContextMenu.kt +1 -1
  43. package/build/jetpack-compose/AlertDialog/index.d.ts.map +1 -1
  44. package/build/jetpack-compose/BasicAlertDialog/index.d.ts +22 -0
  45. package/build/jetpack-compose/BasicAlertDialog/index.d.ts.map +1 -0
  46. package/build/jetpack-compose/Button/index.d.ts.map +1 -1
  47. package/build/jetpack-compose/Card/index.d.ts +40 -0
  48. package/build/jetpack-compose/Card/index.d.ts.map +1 -0
  49. package/build/jetpack-compose/Carousel/index.d.ts.map +1 -1
  50. package/build/jetpack-compose/Chip/index.d.ts +0 -4
  51. package/build/jetpack-compose/Chip/index.d.ts.map +1 -1
  52. package/build/jetpack-compose/ContextMenu/index.d.ts.map +1 -1
  53. package/build/jetpack-compose/DatePicker/index.d.ts +1 -12
  54. package/build/jetpack-compose/DatePicker/index.d.ts.map +1 -1
  55. package/build/jetpack-compose/Divider/index.d.ts.map +1 -1
  56. package/build/jetpack-compose/DockedSearchBar/index.d.ts +30 -0
  57. package/build/jetpack-compose/DockedSearchBar/index.d.ts.map +1 -0
  58. package/build/jetpack-compose/ExpoUIModule.d.ts +2 -0
  59. package/build/jetpack-compose/ExpoUIModule.d.ts.map +1 -0
  60. package/build/jetpack-compose/FilterChip/index.d.ts +49 -0
  61. package/build/jetpack-compose/FilterChip/index.d.ts.map +1 -0
  62. package/build/jetpack-compose/HorizontalFloatingToolbar/index.d.ts +41 -0
  63. package/build/jetpack-compose/HorizontalFloatingToolbar/index.d.ts.map +1 -0
  64. package/build/jetpack-compose/Icon/index.d.ts +112 -0
  65. package/build/jetpack-compose/Icon/index.d.ts.map +1 -0
  66. package/build/jetpack-compose/IconButton/index.d.ts +0 -4
  67. package/build/jetpack-compose/IconButton/index.d.ts.map +1 -1
  68. package/build/jetpack-compose/LazyColumn/index.d.ts +55 -0
  69. package/build/jetpack-compose/LazyColumn/index.d.ts.map +1 -0
  70. package/build/jetpack-compose/ListItem/index.d.ts +81 -0
  71. package/build/jetpack-compose/ListItem/index.d.ts.map +1 -0
  72. package/build/jetpack-compose/MaterialSymbolsAssetsTransformer.fx.d.ts +2 -0
  73. package/build/jetpack-compose/MaterialSymbolsAssetsTransformer.fx.d.ts.map +1 -0
  74. package/build/jetpack-compose/ModalBottomSheet/index.d.ts +34 -0
  75. package/build/jetpack-compose/ModalBottomSheet/index.d.ts.map +1 -0
  76. package/build/jetpack-compose/Picker/index.d.ts +0 -6
  77. package/build/jetpack-compose/Picker/index.d.ts.map +1 -1
  78. package/build/jetpack-compose/Progress/index.d.ts.map +1 -1
  79. package/build/jetpack-compose/PullToRefreshBox/index.d.ts +31 -0
  80. package/build/jetpack-compose/PullToRefreshBox/index.d.ts.map +1 -0
  81. package/build/jetpack-compose/RNHostView/index.d.ts +28 -0
  82. package/build/jetpack-compose/RNHostView/index.d.ts.map +1 -0
  83. package/build/jetpack-compose/RadioButton/index.d.ts +20 -0
  84. package/build/jetpack-compose/RadioButton/index.d.ts.map +1 -0
  85. package/build/jetpack-compose/SearchBar/index.d.ts +47 -0
  86. package/build/jetpack-compose/SearchBar/index.d.ts.map +1 -0
  87. package/build/jetpack-compose/Shape/index.d.ts +29 -2
  88. package/build/jetpack-compose/Shape/index.d.ts.map +1 -1
  89. package/build/jetpack-compose/Slider/index.d.ts +1 -9
  90. package/build/jetpack-compose/Slider/index.d.ts.map +1 -1
  91. package/build/jetpack-compose/Spacer/index.d.ts +22 -0
  92. package/build/jetpack-compose/Spacer/index.d.ts.map +1 -0
  93. package/build/jetpack-compose/Surface/index.d.ts +44 -0
  94. package/build/jetpack-compose/Surface/index.d.ts.map +1 -0
  95. package/build/jetpack-compose/Switch/index.d.ts +17 -9
  96. package/build/jetpack-compose/Switch/index.d.ts.map +1 -1
  97. package/build/jetpack-compose/Text/index.d.ts +182 -0
  98. package/build/jetpack-compose/Text/index.d.ts.map +1 -0
  99. package/build/jetpack-compose/TextButton/index.d.ts +29 -0
  100. package/build/jetpack-compose/TextButton/index.d.ts.map +1 -0
  101. package/build/jetpack-compose/TextInput/index.d.ts.map +1 -1
  102. package/build/jetpack-compose/ToggleButton/index.d.ts +54 -0
  103. package/build/jetpack-compose/ToggleButton/index.d.ts.map +1 -0
  104. package/build/jetpack-compose/index.d.ts +20 -1
  105. package/build/jetpack-compose/index.d.ts.map +1 -1
  106. package/build/jetpack-compose/layout.d.ts +16 -19
  107. package/build/jetpack-compose/layout.d.ts.map +1 -1
  108. package/build/jetpack-compose/modifiers/createModifier.d.ts +18 -0
  109. package/build/jetpack-compose/modifiers/createModifier.d.ts.map +1 -0
  110. package/build/jetpack-compose/modifiers/index.d.ts +133 -41
  111. package/build/jetpack-compose/modifiers/index.d.ts.map +1 -1
  112. package/build/jetpack-compose/modifiers/utils.d.ts +15 -0
  113. package/build/jetpack-compose/modifiers/utils.d.ts.map +1 -0
  114. package/build/swift-ui/ConfirmationDialog/index.d.ts +47 -0
  115. package/build/swift-ui/ConfirmationDialog/index.d.ts.map +1 -0
  116. package/build/swift-ui/ScrollView/index.d.ts +16 -0
  117. package/build/swift-ui/ScrollView/index.d.ts.map +1 -0
  118. package/build/swift-ui/index.d.ts +2 -0
  119. package/build/swift-ui/index.d.ts.map +1 -1
  120. package/build/swift-ui/modifiers/index.d.ts +12 -3
  121. package/build/swift-ui/modifiers/index.d.ts.map +1 -1
  122. package/expo-module.config.json +2 -1
  123. package/ios/ColorPickerView.swift +2 -2
  124. package/ios/ConfirmationDialog/ConfirmationDialog.swift +65 -0
  125. package/ios/ConfirmationDialog/ConfirmationDialogComponents.swift +26 -0
  126. package/ios/ConfirmationDialog/ConfirmationDialogProps.swift +15 -0
  127. package/ios/Convertibles/VisibilityOptions.swift +19 -0
  128. package/ios/ExpoUIModule.swift +5 -0
  129. package/ios/Modifiers/ForegroundStyleModifier.swift +124 -0
  130. package/ios/Modifiers/PresentationModifiers.swift +1 -18
  131. package/ios/Modifiers/ViewModifierRegistry.swift +30 -121
  132. package/ios/ScrollViewComponent.swift +23 -0
  133. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.0/expo.modules.ui-55.0.0-sources.jar +0 -0
  134. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.0/expo.modules.ui-55.0.0-sources.jar.md5 +1 -0
  135. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.0/expo.modules.ui-55.0.0-sources.jar.sha1 +1 -0
  136. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.0/expo.modules.ui-55.0.0-sources.jar.sha256 +1 -0
  137. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.0/expo.modules.ui-55.0.0-sources.jar.sha512 +1 -0
  138. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.0/expo.modules.ui-55.0.0.aar +0 -0
  139. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.0/expo.modules.ui-55.0.0.aar.md5 +1 -0
  140. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.0/expo.modules.ui-55.0.0.aar.sha1 +1 -0
  141. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.0/expo.modules.ui-55.0.0.aar.sha256 +1 -0
  142. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.0/expo.modules.ui-55.0.0.aar.sha512 +1 -0
  143. package/local-maven-repo/expo/modules/ui/expo.modules.ui/{55.0.0-preview.6/expo.modules.ui-55.0.0-preview.6.module → 55.0.0/expo.modules.ui-55.0.0.module} +46 -28
  144. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.0/expo.modules.ui-55.0.0.module.md5 +1 -0
  145. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.0/expo.modules.ui-55.0.0.module.sha1 +1 -0
  146. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.0/expo.modules.ui-55.0.0.module.sha256 +1 -0
  147. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.0/expo.modules.ui-55.0.0.module.sha512 +1 -0
  148. package/local-maven-repo/expo/modules/ui/expo.modules.ui/{55.0.0-preview.6/expo.modules.ui-55.0.0-preview.6.pom → 55.0.0/expo.modules.ui-55.0.0.pom} +36 -7
  149. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.0/expo.modules.ui-55.0.0.pom.md5 +1 -0
  150. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.0/expo.modules.ui-55.0.0.pom.sha1 +1 -0
  151. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.0/expo.modules.ui-55.0.0.pom.sha256 +1 -0
  152. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.0/expo.modules.ui-55.0.0.pom.sha512 +1 -0
  153. package/local-maven-repo/expo/modules/ui/expo.modules.ui/maven-metadata.xml +4 -4
  154. package/local-maven-repo/expo/modules/ui/expo.modules.ui/maven-metadata.xml.md5 +1 -1
  155. package/local-maven-repo/expo/modules/ui/expo.modules.ui/maven-metadata.xml.sha1 +1 -1
  156. package/local-maven-repo/expo/modules/ui/expo.modules.ui/maven-metadata.xml.sha256 +1 -1
  157. package/local-maven-repo/expo/modules/ui/expo.modules.ui/maven-metadata.xml.sha512 +1 -1
  158. package/package.json +5 -3
  159. package/src/jetpack-compose/AlertDialog/index.tsx +11 -1
  160. package/src/jetpack-compose/BasicAlertDialog/index.tsx +51 -0
  161. package/src/jetpack-compose/Button/index.tsx +13 -1
  162. package/src/jetpack-compose/Card/index.tsx +62 -0
  163. package/src/jetpack-compose/Carousel/index.tsx +7 -1
  164. package/src/jetpack-compose/Chip/index.tsx +14 -7
  165. package/src/jetpack-compose/ContextMenu/index.tsx +5 -2
  166. package/src/jetpack-compose/DatePicker/index.tsx +5 -5
  167. package/src/jetpack-compose/Divider/index.tsx +13 -2
  168. package/src/jetpack-compose/DockedSearchBar/index.tsx +78 -0
  169. package/src/jetpack-compose/ExpoUIModule.ts +3 -0
  170. package/src/jetpack-compose/FilterChip/index.tsx +89 -0
  171. package/src/jetpack-compose/HorizontalFloatingToolbar/index.tsx +90 -0
  172. package/src/jetpack-compose/Icon/index.tsx +144 -0
  173. package/src/jetpack-compose/IconButton/index.tsx +5 -5
  174. package/src/jetpack-compose/LazyColumn/index.tsx +82 -0
  175. package/src/jetpack-compose/ListItem/index.tsx +129 -0
  176. package/src/jetpack-compose/MaterialSymbolsAssetsTransformer.fx.ts +22 -0
  177. package/src/jetpack-compose/ModalBottomSheet/index.tsx +61 -0
  178. package/src/jetpack-compose/Picker/index.tsx +6 -5
  179. package/src/jetpack-compose/Progress/index.tsx +14 -4
  180. package/src/jetpack-compose/PullToRefreshBox/index.tsx +66 -0
  181. package/src/jetpack-compose/RNHostView/index.tsx +56 -0
  182. package/src/jetpack-compose/RadioButton/index.tsx +48 -0
  183. package/src/jetpack-compose/SearchBar/index.tsx +96 -0
  184. package/src/jetpack-compose/Shape/index.tsx +65 -22
  185. package/src/jetpack-compose/Slider/index.tsx +6 -5
  186. package/src/jetpack-compose/Spacer/index.tsx +43 -0
  187. package/src/jetpack-compose/Surface/index.tsx +66 -0
  188. package/src/jetpack-compose/Switch/index.tsx +43 -8
  189. package/src/jetpack-compose/Text/index.tsx +274 -0
  190. package/src/jetpack-compose/TextButton/index.tsx +55 -0
  191. package/src/jetpack-compose/TextInput/index.tsx +5 -4
  192. package/src/jetpack-compose/ToggleButton/index.tsx +83 -0
  193. package/src/jetpack-compose/index.ts +21 -1
  194. package/src/jetpack-compose/layout.tsx +55 -70
  195. package/src/jetpack-compose/modifiers/createModifier.ts +27 -0
  196. package/src/jetpack-compose/modifiers/index.ts +204 -83
  197. package/src/jetpack-compose/modifiers/utils.ts +30 -0
  198. package/src/swift-ui/ConfirmationDialog/index.tsx +98 -0
  199. package/src/swift-ui/ScrollView/index.tsx +34 -0
  200. package/src/swift-ui/index.tsx +2 -0
  201. package/src/swift-ui/modifiers/index.ts +19 -3
  202. package/src/ts-declarations/react-native-assets.d.ts +31 -0
  203. package/build/jetpack-compose/BottomSheet/index.d.ts +0 -21
  204. package/build/jetpack-compose/BottomSheet/index.d.ts.map +0 -1
  205. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.0-preview.6/expo.modules.ui-55.0.0-preview.6-sources.jar +0 -0
  206. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.0-preview.6/expo.modules.ui-55.0.0-preview.6-sources.jar.md5 +0 -1
  207. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.0-preview.6/expo.modules.ui-55.0.0-preview.6-sources.jar.sha1 +0 -1
  208. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.0-preview.6/expo.modules.ui-55.0.0-preview.6-sources.jar.sha256 +0 -1
  209. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.0-preview.6/expo.modules.ui-55.0.0-preview.6-sources.jar.sha512 +0 -1
  210. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.0-preview.6/expo.modules.ui-55.0.0-preview.6.aar +0 -0
  211. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.0-preview.6/expo.modules.ui-55.0.0-preview.6.aar.md5 +0 -1
  212. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.0-preview.6/expo.modules.ui-55.0.0-preview.6.aar.sha1 +0 -1
  213. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.0-preview.6/expo.modules.ui-55.0.0-preview.6.aar.sha256 +0 -1
  214. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.0-preview.6/expo.modules.ui-55.0.0-preview.6.aar.sha512 +0 -1
  215. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.0-preview.6/expo.modules.ui-55.0.0-preview.6.module.md5 +0 -1
  216. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.0-preview.6/expo.modules.ui-55.0.0-preview.6.module.sha1 +0 -1
  217. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.0-preview.6/expo.modules.ui-55.0.0-preview.6.module.sha256 +0 -1
  218. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.0-preview.6/expo.modules.ui-55.0.0-preview.6.module.sha512 +0 -1
  219. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.0-preview.6/expo.modules.ui-55.0.0-preview.6.pom.md5 +0 -1
  220. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.0-preview.6/expo.modules.ui-55.0.0-preview.6.pom.sha1 +0 -1
  221. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.0-preview.6/expo.modules.ui-55.0.0-preview.6.pom.sha256 +0 -1
  222. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.0-preview.6/expo.modules.ui-55.0.0-preview.6.pom.sha512 +0 -1
  223. package/src/jetpack-compose/BottomSheet/index.tsx +0 -46
@@ -1,33 +1,33 @@
1
1
  import { type ColorValue } from 'react-native';
2
2
 
3
- import { parseJSXShape, ShapeJSXElement } from '../Shape';
3
+ import { createModifier, createModifierWithEventListener } from './createModifier';
4
+ export { type ExpoModifier } from '../../types';
4
5
 
5
- /**
6
- * Modifier configuration for Jetpack Compose views.
7
- * This follows the JSON Config pattern (same as iOS SwiftUI modifiers).
8
- *
9
- * @example
10
- * ```tsx
11
- * import { Button, paddingAll, background } from 'expo-ui';
12
- *
13
- * <Button modifiers={[paddingAll(10), background('#FF0000')]} />
14
- * ```
15
- */
16
- export interface ModifierConfig {
17
- $type: string;
18
- $scope?: string;
19
- [key: string]: unknown;
20
- }
21
-
22
- // =============================================================================
23
- // Padding Modifiers
24
- // =============================================================================
6
+ export type Alignment =
7
+ // 2D Alignments
8
+ | 'topStart'
9
+ | 'topCenter'
10
+ | 'topEnd'
11
+ | 'centerStart'
12
+ | 'center'
13
+ | 'centerEnd'
14
+ | 'bottomStart'
15
+ | 'bottomCenter'
16
+ | 'bottomEnd'
17
+ // 1D Alignments Vertically
18
+ | 'top'
19
+ | 'centerVertically'
20
+ | 'bottom'
21
+ // 1D Alignments Horizontally
22
+ | 'start'
23
+ | 'centerHorizontally'
24
+ | 'end';
25
25
 
26
26
  /**
27
27
  * Applies equal padding on all sides.
28
28
  * @param all - Padding value in dp.
29
29
  */
30
- export const paddingAll = (all: number): ModifierConfig => ({ $type: 'paddingAll', all });
30
+ export const paddingAll = (all: number) => createModifier('paddingAll', { all });
31
31
 
32
32
  /**
33
33
  * Applies padding with individual values for each side.
@@ -36,12 +36,8 @@ export const paddingAll = (all: number): ModifierConfig => ({ $type: 'paddingAll
36
36
  * @param end - Right padding in dp (or left in RTL).
37
37
  * @param bottom - Bottom padding in dp.
38
38
  */
39
- export const padding = (
40
- start: number,
41
- top: number,
42
- end: number,
43
- bottom: number
44
- ): ModifierConfig => ({ $type: 'padding', start, top, end, bottom });
39
+ export const padding = (start: number, top: number, end: number, bottom: number) =>
40
+ createModifier('padding', { start, top, end, bottom });
45
41
 
46
42
  // =============================================================================
47
43
  // Size Modifiers
@@ -52,38 +48,51 @@ export const padding = (
52
48
  * @param width - Width in dp.
53
49
  * @param height - Height in dp.
54
50
  */
55
- export const size = (width: number, height: number): ModifierConfig => ({
56
- $type: 'size',
57
- width,
58
- height,
59
- });
51
+ export const size = (width: number, height: number) => createModifier('size', { width, height });
60
52
 
61
53
  /**
62
54
  * Fills the maximum available size.
63
55
  * @param fraction - Fraction of max size (0.0 to 1.0). Default is 1.0.
64
56
  */
65
- export const fillMaxSize = (fraction?: number): ModifierConfig => ({
66
- $type: 'fillMaxSize',
67
- fraction,
68
- });
57
+ export const fillMaxSize = (fraction?: number) => createModifier('fillMaxSize', { fraction });
69
58
 
70
59
  /**
71
60
  * Fills the maximum available width.
72
61
  * @param fraction - Fraction of max width (0.0 to 1.0). Default is 1.0.
73
62
  */
74
- export const fillMaxWidth = (fraction?: number): ModifierConfig => ({
75
- $type: 'fillMaxWidth',
76
- fraction,
77
- });
63
+ export const fillMaxWidth = (fraction?: number) => createModifier('fillMaxWidth', { fraction });
78
64
 
79
65
  /**
80
66
  * Fills the maximum available height.
81
67
  * @param fraction - Fraction of max height (0.0 to 1.0). Default is 1.0.
82
68
  */
83
- export const fillMaxHeight = (fraction?: number): ModifierConfig => ({
84
- $type: 'fillMaxHeight',
85
- fraction,
86
- });
69
+ export const fillMaxHeight = (fraction?: number) => createModifier('fillMaxHeight', { fraction });
70
+
71
+ /**
72
+ * Sets the exact width of the view.
73
+ * @param value - Width in dp.
74
+ */
75
+ export const width = (value: number) => createModifier('width', { width: value });
76
+
77
+ /**
78
+ * Sets the exact height of the view.
79
+ * @param value - Height in dp.
80
+ */
81
+ export const height = (value: number) => createModifier('height', { height: value });
82
+
83
+ /**
84
+ * Wraps the width to the content size.
85
+ * @param alignment - Optional horizontal alignment ('start', 'centerHorizontally', 'end').
86
+ */
87
+ export const wrapContentWidth = (alignment?: 'start' | 'centerHorizontally' | 'end') =>
88
+ createModifier('wrapContentWidth', alignment ? { alignment } : {});
89
+
90
+ /**
91
+ * Wraps the height to the content size.
92
+ * @param alignment - Optional vertical alignment ('top', 'centerVertically', 'bottom').
93
+ */
94
+ export const wrapContentHeight = (alignment?: 'top' | 'centerVertically' | 'bottom') =>
95
+ createModifier('wrapContentHeight', alignment ? { alignment } : {});
87
96
 
88
97
  // =============================================================================
89
98
  // Position Modifiers
@@ -94,7 +103,7 @@ export const fillMaxHeight = (fraction?: number): ModifierConfig => ({
94
103
  * @param x - Horizontal offset in dp.
95
104
  * @param y - Vertical offset in dp.
96
105
  */
97
- export const offset = (x: number, y: number): ModifierConfig => ({ $type: 'offset', x, y });
106
+ export const offset = (x: number, y: number) => createModifier('offset', { x, y });
98
107
 
99
108
  // =============================================================================
100
109
  // Appearance Modifiers
@@ -104,36 +113,33 @@ export const offset = (x: number, y: number): ModifierConfig => ({ $type: 'offse
104
113
  * Sets the background color.
105
114
  * @param color - Color string (hex, e.g., '#FF0000').
106
115
  */
107
- export const background = (color: ColorValue): ModifierConfig => ({ $type: 'background', color });
116
+ export const background = (color: ColorValue) => createModifier('background', { color });
108
117
 
109
118
  /**
110
119
  * Adds a border around the view.
111
120
  * @param borderWidth - Border width in dp.
112
121
  * @param borderColor - Border color string (hex).
113
122
  */
114
- export const border = (borderWidth: number, borderColor: ColorValue): ModifierConfig => ({
115
- $type: 'border',
116
- borderWidth,
117
- borderColor,
118
- });
123
+ export const border = (borderWidth: number, borderColor: ColorValue) =>
124
+ createModifier('border', { borderWidth, borderColor });
119
125
 
120
126
  /**
121
127
  * Adds a shadow/elevation effect.
122
128
  * @param elevation - Shadow elevation in dp.
123
129
  */
124
- export const shadow = (elevation: number): ModifierConfig => ({ $type: 'shadow', elevation });
130
+ export const shadow = (elevation: number) => createModifier('shadow', { elevation });
125
131
 
126
132
  /**
127
133
  * Sets the opacity/alpha of the view.
128
134
  * @param alpha - Opacity value (0.0 to 1.0).
129
135
  */
130
- export const alpha = (alpha: number): ModifierConfig => ({ $type: 'alpha', alpha });
136
+ export const alpha = (alpha: number) => createModifier('alpha', { alpha });
131
137
 
132
138
  /**
133
139
  * Applies a blur effect.
134
140
  * @param radius - Blur radius in dp.
135
141
  */
136
- export const blur = (radius: number): ModifierConfig => ({ $type: 'blur', radius });
142
+ export const blur = (radius: number) => createModifier('blur', { radius });
137
143
 
138
144
  // =============================================================================
139
145
  // Transform Modifiers
@@ -143,13 +149,13 @@ export const blur = (radius: number): ModifierConfig => ({ $type: 'blur', radius
143
149
  * Rotates the view.
144
150
  * @param degrees - Rotation angle in degrees.
145
151
  */
146
- export const rotate = (degrees: number): ModifierConfig => ({ $type: 'rotate', degrees });
152
+ export const rotate = (degrees: number) => createModifier('rotate', { degrees });
147
153
 
148
154
  /**
149
155
  * Sets the z-index for layering.
150
156
  * @param index - Z-index value.
151
157
  */
152
- export const zIndex = (index: number): ModifierConfig => ({ $type: 'zIndex', index });
158
+ export const zIndex = (index: number) => createModifier('zIndex', { index });
153
159
 
154
160
  // =============================================================================
155
161
  // Animation Modifiers
@@ -160,11 +166,8 @@ export const zIndex = (index: number): ModifierConfig => ({ $type: 'zIndex', ind
160
166
  * @param dampingRatio - Spring damping ratio. Default is DampingRatioNoBouncy.
161
167
  * @param stiffness - Spring stiffness. Default is StiffnessMedium.
162
168
  */
163
- export const animateContentSize = (dampingRatio?: number, stiffness?: number): ModifierConfig => ({
164
- $type: 'animateContentSize',
165
- dampingRatio,
166
- stiffness,
167
- });
169
+ export const animateContentSize = (dampingRatio?: number, stiffness?: number) =>
170
+ createModifier('animateContentSize', { dampingRatio, stiffness });
168
171
 
169
172
  // =============================================================================
170
173
  // Scope-dependent Modifiers
@@ -175,20 +178,18 @@ export const animateContentSize = (dampingRatio?: number, stiffness?: number): M
175
178
  * Only works when used inside Row or Column.
176
179
  * @param weight - Weight value (relative to siblings).
177
180
  */
178
- export const weight = (weight: number): ModifierConfig => ({
179
- $type: 'weight',
180
- $scope: 'RowScope',
181
- weight,
182
- });
181
+ export const weight = (weight: number) => createModifier('weight', { weight });
182
+
183
+ /**
184
+ * Aligns the view within its container.
185
+ */
186
+ export const align = (alignment: Alignment) => createModifier('align', { alignment });
183
187
 
184
188
  /**
185
189
  * Makes the view match the parent Box size.
186
190
  * Only works when used inside Box.
187
191
  */
188
- export const matchParentSize = (): ModifierConfig => ({
189
- $type: 'matchParentSize',
190
- $scope: 'BoxScope',
191
- });
192
+ export const matchParentSize = () => createModifier('matchParentSize');
192
193
 
193
194
  // =============================================================================
194
195
  // Interaction Modifiers
@@ -196,12 +197,18 @@ export const matchParentSize = (): ModifierConfig => ({
196
197
 
197
198
  /**
198
199
  * Makes the view clickable.
199
- * @param callback - Function to call when clicked.
200
+ * @param handler - Function to call when clicked.
201
+ */
202
+ export const clickable = (handler: () => void) =>
203
+ createModifierWithEventListener('clickable', handler);
204
+
205
+ /**
206
+ * Makes the view selectable, like a radio button row.
207
+ * @param selected - Whether the item is currently selected.
208
+ * @param handler - Function to call when the item is clicked.
200
209
  */
201
- export const clickable = (callback: () => void): ModifierConfig => ({
202
- $type: 'clickable',
203
- eventListener: callback,
204
- });
210
+ export const selectable = (selected: boolean, handler: () => void) =>
211
+ createModifierWithEventListener('selectable', handler, { selected });
205
212
 
206
213
  // =============================================================================
207
214
  // Utility Modifiers
@@ -211,13 +218,127 @@ export const clickable = (callback: () => void): ModifierConfig => ({
211
218
  * Sets the test ID for testing frameworks.
212
219
  * @param tag - Test ID string.
213
220
  */
214
- export const testID = (tag: string): ModifierConfig => ({ $type: 'testID', testID: tag });
221
+ export const testID = (tag: string) => createModifier('testID', { testID: tag });
222
+
223
+ // =============================================================================
224
+ // Clip Modifier & Shapes
225
+ // =============================================================================
226
+
227
+ type MaterialShapeName =
228
+ | 'cookie4Sided'
229
+ | 'cookie6Sided'
230
+ | 'cookie7Sided'
231
+ | 'cookie9Sided'
232
+ | 'cookie12Sided'
233
+ | 'clover4Leaf'
234
+ | 'clover8Leaf'
235
+ | 'softBurst'
236
+ | 'boom'
237
+ | 'oval'
238
+ | 'pill'
239
+ | 'triangle'
240
+ | 'diamond'
241
+ | 'pentagon'
242
+ | 'sunny'
243
+ | 'verySunny'
244
+ | 'fan'
245
+ | 'pixelCircle'
246
+ | 'pixelTriangle'
247
+ | 'ghostish'
248
+ | 'bun'
249
+ | 'heart'
250
+ | 'arch'
251
+ | 'slanted'
252
+ | 'puffy'
253
+ | 'puffyDiamond';
254
+
255
+ type CornerRadii = {
256
+ topStart?: number;
257
+ topEnd?: number;
258
+ bottomStart?: number;
259
+ bottomEnd?: number;
260
+ };
261
+
262
+ /**
263
+ * Built-in Jetpack Compose shape for the clip modifier.
264
+ */
265
+ export type BuiltinShape =
266
+ | { type: 'rectangle' }
267
+ | { type: 'circle' }
268
+ | {
269
+ type: 'roundedCorner';
270
+ radius?: number;
271
+ topStart?: number;
272
+ topEnd?: number;
273
+ bottomStart?: number;
274
+ bottomEnd?: number;
275
+ }
276
+ | {
277
+ type: 'cutCorner';
278
+ radius?: number;
279
+ topStart?: number;
280
+ topEnd?: number;
281
+ bottomStart?: number;
282
+ bottomEnd?: number;
283
+ }
284
+ | { type: 'material'; name: MaterialShapeName };
285
+
286
+ const material = (name: MaterialShapeName): BuiltinShape => ({ type: 'material', name });
287
+
288
+ /**
289
+ * Predefined shapes for use with the `clip` modifier.
290
+ *
291
+ * @example
292
+ * ```tsx
293
+ * clip(Shapes.Circle)
294
+ * clip(Shapes.RoundedCorner(16))
295
+ * clip(Shapes.RoundedCorner({ topStart: 8, bottomEnd: 16 }))
296
+ * clip(Shapes.Material.Heart)
297
+ * ```
298
+ */
299
+ export const Shapes = {
300
+ Rectangle: { type: 'rectangle' } as BuiltinShape,
301
+ Circle: { type: 'circle' } as BuiltinShape,
302
+ RoundedCorner: (params: number | CornerRadii): BuiltinShape =>
303
+ typeof params === 'number'
304
+ ? { type: 'roundedCorner', radius: params }
305
+ : { type: 'roundedCorner', ...params },
306
+ CutCorner: (params: number | CornerRadii): BuiltinShape =>
307
+ typeof params === 'number'
308
+ ? { type: 'cutCorner', radius: params }
309
+ : { type: 'cutCorner', ...params },
310
+ Material: {
311
+ Cookie4Sided: material('cookie4Sided'),
312
+ Cookie6Sided: material('cookie6Sided'),
313
+ Cookie7Sided: material('cookie7Sided'),
314
+ Cookie9Sided: material('cookie9Sided'),
315
+ Cookie12Sided: material('cookie12Sided'),
316
+ Clover4Leaf: material('clover4Leaf'),
317
+ Clover8Leaf: material('clover8Leaf'),
318
+ SoftBurst: material('softBurst'),
319
+ Boom: material('boom'),
320
+ Oval: material('oval'),
321
+ Pill: material('pill'),
322
+ Triangle: material('triangle'),
323
+ Diamond: material('diamond'),
324
+ Pentagon: material('pentagon'),
325
+ Sunny: material('sunny'),
326
+ VerySunny: material('verySunny'),
327
+ Fan: material('fan'),
328
+ PixelCircle: material('pixelCircle'),
329
+ PixelTriangle: material('pixelTriangle'),
330
+ Ghostish: material('ghostish'),
331
+ Bun: material('bun'),
332
+ Heart: material('heart'),
333
+ Arch: material('arch'),
334
+ Slanted: material('slanted'),
335
+ Puffy: material('puffy'),
336
+ PuffyDiamond: material('puffyDiamond'),
337
+ },
338
+ };
215
339
 
216
340
  /**
217
- * Clips the view to a shape.
218
- * @param shape - Shape JSX element to clip to.
341
+ * Clips the view to a built-in Jetpack Compose shape.
342
+ * @param shape - A shape from `Shapes`, e.g. `Shapes.Circle` or `Shapes.Material.Heart`.
219
343
  */
220
- export const clip = (shape: ShapeJSXElement): ModifierConfig => ({
221
- $type: 'clip',
222
- shape: parseJSXShape(shape),
223
- });
344
+ export const clip = (shape: BuiltinShape) => createModifier('clip', { shape });
@@ -0,0 +1,30 @@
1
+ import { type ModifierConfig } from './createModifier';
2
+
3
+ type GlobalEventPayload = [eventName: string, params: Record<string, any>];
4
+ type GlobalEvent = {
5
+ onGlobalEvent: (event: { nativeEvent: { payload: GlobalEventPayload } }) => void;
6
+ };
7
+
8
+ /**
9
+ * Create an event listener for a view modifier.
10
+ */
11
+ export function createViewModifierEventListener(modifiers: ModifierConfig[]): GlobalEvent {
12
+ const eventListeners: Record<string, (args: any) => void> = {};
13
+ for (const modifier of modifiers) {
14
+ if (modifier.eventListener) {
15
+ eventListeners[modifier.$type] = modifier.eventListener;
16
+ }
17
+ }
18
+
19
+ const onGlobalEvent: GlobalEvent['onGlobalEvent'] = ({ nativeEvent }) => {
20
+ const [eventName, params] = nativeEvent.payload;
21
+ const listener = eventListeners[eventName];
22
+ if (listener) {
23
+ listener(params);
24
+ }
25
+ };
26
+
27
+ return {
28
+ onGlobalEvent,
29
+ };
30
+ }
@@ -0,0 +1,98 @@
1
+ import { requireNativeView } from 'expo';
2
+ import { NativeSyntheticEvent } from 'react-native';
3
+
4
+ import { createViewModifierEventListener } from '../modifiers/utils';
5
+ import { type CommonViewModifierProps } from '../types';
6
+
7
+ /**
8
+ * Props of the `ConfirmationDialog` component.
9
+ */
10
+ export type ConfirmationDialogProps = {
11
+ /**
12
+ * The contents of the confirmation dialog.
13
+ * Should include `ConfirmationDialog.Trigger`, `ConfirmationDialog.Actions`, and optionally `ConfirmationDialog.Message`.
14
+ */
15
+ children: React.ReactNode;
16
+ /**
17
+ * The title of the confirmation dialog.
18
+ */
19
+ title: string;
20
+ /**
21
+ * Whether the confirmation dialog is presented.
22
+ */
23
+ isPresented?: boolean;
24
+ /**
25
+ * A callback that is called when the `isPresented` state changes.
26
+ */
27
+ onIsPresentedChange?: (isPresented: boolean) => void;
28
+ /**
29
+ * The visibility of the dialog title.
30
+ * @default 'automatic'
31
+ */
32
+ titleVisibility?: 'automatic' | 'visible' | 'hidden';
33
+ } & CommonViewModifierProps;
34
+
35
+ type NativeConfirmationDialogProps = Omit<ConfirmationDialogProps, 'onIsPresentedChange'> & {
36
+ onIsPresentedChange?: (event: NativeSyntheticEvent<{ isPresented: boolean }>) => void;
37
+ };
38
+
39
+ const ConfirmationDialogNativeView: React.ComponentType<NativeConfirmationDialogProps> =
40
+ requireNativeView('ExpoUI', 'ConfirmationDialogView');
41
+
42
+ const ConfirmationDialogNativeTrigger: React.ComponentType<{ children: React.ReactNode }> =
43
+ requireNativeView('ExpoUI', 'ConfirmationDialogTrigger');
44
+
45
+ const ConfirmationDialogNativeActions: React.ComponentType<{ children: React.ReactNode }> =
46
+ requireNativeView('ExpoUI', 'ConfirmationDialogActions');
47
+
48
+ const ConfirmationDialogNativeMessage: React.ComponentType<{ children: React.ReactNode }> =
49
+ requireNativeView('ExpoUI', 'ConfirmationDialogMessage');
50
+
51
+ /**
52
+ * The component visible all the time that triggers the confirmation dialog presentation.
53
+ */
54
+ function Trigger(props: { children: React.ReactNode }) {
55
+ return <ConfirmationDialogNativeTrigger {...props} />;
56
+ }
57
+
58
+ /**
59
+ * The action buttons displayed in the confirmation dialog. Use `Button` components from `@expo/ui/swift-ui` as children.
60
+ */
61
+ function Actions(props: { children: React.ReactNode }) {
62
+ return <ConfirmationDialogNativeActions {...props} />;
63
+ }
64
+
65
+ /**
66
+ * An optional message displayed below the title in the confirmation dialog.
67
+ */
68
+ function Message(props: { children: React.ReactNode }) {
69
+ return <ConfirmationDialogNativeMessage {...props} />;
70
+ }
71
+
72
+ /**
73
+ * `ConfirmationDialog` presents a confirmation dialog with a title, optional message, and action buttons.
74
+ *
75
+ * @see https://developer.apple.com/documentation/swiftui/view/confirmationdialog(_:ispresented:titlevisibility:actions:message:)
76
+ */
77
+ function ConfirmationDialog(props: ConfirmationDialogProps) {
78
+ const { onIsPresentedChange, modifiers, children, ...restProps } = props;
79
+
80
+ const handleIsPresentedChange = (event: NativeSyntheticEvent<{ isPresented: boolean }>) => {
81
+ onIsPresentedChange?.(event.nativeEvent.isPresented);
82
+ };
83
+
84
+ return (
85
+ <ConfirmationDialogNativeView
86
+ {...(modifiers ? createViewModifierEventListener(modifiers) : undefined)}
87
+ {...restProps}
88
+ onIsPresentedChange={handleIsPresentedChange}>
89
+ {children}
90
+ </ConfirmationDialogNativeView>
91
+ );
92
+ }
93
+
94
+ ConfirmationDialog.Trigger = Trigger;
95
+ ConfirmationDialog.Actions = Actions;
96
+ ConfirmationDialog.Message = Message;
97
+
98
+ export { ConfirmationDialog };
@@ -0,0 +1,34 @@
1
+ import { requireNativeView } from 'expo';
2
+
3
+ import { createViewModifierEventListener } from '../modifiers/utils';
4
+ import { type CommonViewModifierProps } from '../types';
5
+
6
+ export type ScrollViewProps = {
7
+ children: React.ReactNode;
8
+ /**
9
+ * The scrollable axes.
10
+ * @default 'vertical'
11
+ */
12
+ axes?: 'vertical' | 'horizontal' | 'both';
13
+ /**
14
+ * Whether to show scroll indicators.
15
+ * @default true
16
+ */
17
+ showsIndicators?: boolean;
18
+ } & CommonViewModifierProps;
19
+
20
+ const ScrollViewNativeView: React.ComponentType<ScrollViewProps> = requireNativeView(
21
+ 'ExpoUI',
22
+ 'ScrollViewComponent'
23
+ );
24
+
25
+ export function ScrollView(props: ScrollViewProps) {
26
+ const { modifiers, ...restProps } = props;
27
+ return (
28
+ <ScrollViewNativeView
29
+ modifiers={modifiers}
30
+ {...(modifiers ? createViewModifierEventListener(modifiers) : undefined)}
31
+ {...restProps}
32
+ />
33
+ );
34
+ }
@@ -3,6 +3,7 @@ export * from './Button';
3
3
  export * from './Chart';
4
4
  export * from './ColorPicker';
5
5
  export * from './ContentUnavailableView';
6
+ export * from './ConfirmationDialog';
6
7
  export * from './ContextMenu';
7
8
  export * from './DatePicker';
8
9
  export * from './Divider';
@@ -32,6 +33,7 @@ export * from './TextField';
32
33
  export * from './SecureField';
33
34
  export * from './Namespace';
34
35
  export * from './GlassEffectContainer';
36
+ export * from './ScrollView';
35
37
  export * from './Shapes';
36
38
  export * from './Popover';
37
39
  export * from './Grid';
@@ -225,10 +225,11 @@ export const border = (params: { color: Color; width?: number }) =>
225
225
 
226
226
  /**
227
227
  * Applies scaling transformation.
228
- * @param scale - Scale factor (1.0 = normal size).
228
+ * @param scale - Uniform scale factor (1.0 = normal size), or an object with separate `x` and `y` scale factors.
229
229
  * @see Official [SwiftUI documentation](https://developer.apple.com/documentation/swiftui/view/scaleeffect(_:anchor:)).
230
230
  */
231
- export const scaleEffect = (scale: number) => createModifier('scaleEffect', { scale });
231
+ export const scaleEffect = (scale: number | { x: number; y: number }) =>
232
+ createModifier('scaleEffect', typeof scale === 'number' ? { x: scale, y: scale } : scale);
232
233
 
233
234
  /**
234
235
  * Applies rotation transformation.
@@ -364,7 +365,14 @@ export const foregroundStyle = (
364
365
  if (typeof style === 'string') {
365
366
  return createModifier('foregroundStyle', { styleType: 'color', color: style });
366
367
  }
367
- return createModifier('foregroundStyle', { styleType: style.type, ...style });
368
+ if (style.type === 'hierarchical') {
369
+ return createModifier('foregroundStyle', {
370
+ styleType: 'hierarchical',
371
+ hierarchicalStyle: style.style,
372
+ });
373
+ }
374
+ const { type, ...rest } = style;
375
+ return createModifier('foregroundStyle', { styleType: type, ...rest });
368
376
  };
369
377
 
370
378
  /**
@@ -381,6 +389,13 @@ export const bold = () => createModifier('bold', {});
381
389
  */
382
390
  export const italic = () => createModifier('italic', {});
383
391
 
392
+ /**
393
+ * Modifies the fonts of all child views to use fixed-width digits, if possible, while leaving other characters proportionally spaced.
394
+ * When applied to `Text`, modifies the text view's font to use fixed-width digits, while leaving other characters proportionally spaced.
395
+ * @see Official [SwiftUI documentation](https://developer.apple.com/documentation/swiftui/view/monospaceddigit()).
396
+ */
397
+ export const monospacedDigit = () => createModifier('monospacedDigit', {});
398
+
384
399
  /**
385
400
  * Sets the tint color of a view.
386
401
  * @param color - The tint color (hex string). For example, `#FF0000`.
@@ -995,6 +1010,7 @@ export type BuiltInModifier =
995
1010
  | ReturnType<typeof foregroundStyle>
996
1011
  | ReturnType<typeof bold>
997
1012
  | ReturnType<typeof italic>
1013
+ | ReturnType<typeof monospacedDigit>
998
1014
  | ReturnType<typeof tint>
999
1015
  | ReturnType<typeof hidden>
1000
1016
  | ReturnType<typeof disabled>
@@ -0,0 +1,31 @@
1
+ declare module 'react-native/Libraries/Image/AssetSourceResolver' {
2
+ import { PackagerAsset } from '@react-native/assets/registry';
3
+
4
+ export type ResolvedAssetSource = {
5
+ __packager_asset: boolean;
6
+ width?: number | null;
7
+ height?: number | null;
8
+ uri: string;
9
+ scale: number;
10
+ };
11
+
12
+ export default class AssetSourceResolver {
13
+ serverUrl: string | null;
14
+ jsbundleUrl: string | null;
15
+ asset: PackagerAsset & { fileHashes?: string[] };
16
+
17
+ constructor(serverUrl: string | null, jsbundleUrl: string | null, asset: PackagerAsset);
18
+
19
+ isLoadedFromServer(): boolean;
20
+ isLoadedFromFileSystem(): boolean;
21
+ defaultAsset(): ResolvedAssetSource;
22
+ assetServerURL(): ResolvedAssetSource;
23
+ scaledAssetPath(): ResolvedAssetSource;
24
+ scaledAssetURLNearBundle(): ResolvedAssetSource;
25
+ resourceIdentifierWithoutScale(): ResolvedAssetSource;
26
+ drawableFolderInBundle(): ResolvedAssetSource;
27
+ fromSource(source: string): ResolvedAssetSource;
28
+
29
+ static pickScale(scales: number[], deviceScale: number): number;
30
+ }
31
+ }