expo-image-picker 17.0.9 → 17.0.10

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 (59) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/android/build.gradle +2 -2
  3. package/android/src/main/java/expo/modules/imagepicker/ImagePickerExceptions.kt +0 -3
  4. package/android/src/main/java/expo/modules/imagepicker/ImagePickerModule.kt +2 -2
  5. package/android/src/main/java/expo/modules/imagepicker/ImagePickerOptions.kt +0 -12
  6. package/android/src/main/java/expo/modules/imagepicker/ImagePickerResponse.kt +1 -1
  7. package/android/src/main/java/expo/modules/imagepicker/ImagePickerUtils.kt +28 -7
  8. package/android/src/main/java/expo/modules/imagepicker/MediaHandler.kt +22 -13
  9. package/android/src/main/java/expo/modules/imagepicker/contracts/ContractsUtils.kt +4 -2
  10. package/android/src/main/java/expo/modules/imagepicker/contracts/CropImageContract.kt +2 -1
  11. package/build/ImagePicker.types.d.ts +4 -3
  12. package/build/ImagePicker.types.d.ts.map +1 -1
  13. package/build/ImagePicker.types.js.map +1 -1
  14. package/expo-module.config.json +1 -1
  15. package/local-maven-repo/host/exp/exponent/expo.modules.imagepicker/17.0.10/expo.modules.imagepicker-17.0.10-sources.jar +0 -0
  16. package/local-maven-repo/host/exp/exponent/expo.modules.imagepicker/17.0.10/expo.modules.imagepicker-17.0.10-sources.jar.md5 +1 -0
  17. package/local-maven-repo/host/exp/exponent/expo.modules.imagepicker/17.0.10/expo.modules.imagepicker-17.0.10-sources.jar.sha1 +1 -0
  18. package/local-maven-repo/host/exp/exponent/expo.modules.imagepicker/17.0.10/expo.modules.imagepicker-17.0.10-sources.jar.sha256 +1 -0
  19. package/local-maven-repo/host/exp/exponent/expo.modules.imagepicker/17.0.10/expo.modules.imagepicker-17.0.10-sources.jar.sha512 +1 -0
  20. package/local-maven-repo/host/exp/exponent/expo.modules.imagepicker/17.0.10/expo.modules.imagepicker-17.0.10.aar +0 -0
  21. package/local-maven-repo/host/exp/exponent/expo.modules.imagepicker/17.0.10/expo.modules.imagepicker-17.0.10.aar.md5 +1 -0
  22. package/local-maven-repo/host/exp/exponent/expo.modules.imagepicker/17.0.10/expo.modules.imagepicker-17.0.10.aar.sha1 +1 -0
  23. package/local-maven-repo/host/exp/exponent/expo.modules.imagepicker/17.0.10/expo.modules.imagepicker-17.0.10.aar.sha256 +1 -0
  24. package/local-maven-repo/host/exp/exponent/expo.modules.imagepicker/17.0.10/expo.modules.imagepicker-17.0.10.aar.sha512 +1 -0
  25. package/local-maven-repo/host/exp/exponent/expo.modules.imagepicker/{17.0.9/expo.modules.imagepicker-17.0.9.module → 17.0.10/expo.modules.imagepicker-17.0.10.module} +22 -22
  26. package/local-maven-repo/host/exp/exponent/expo.modules.imagepicker/17.0.10/expo.modules.imagepicker-17.0.10.module.md5 +1 -0
  27. package/local-maven-repo/host/exp/exponent/expo.modules.imagepicker/17.0.10/expo.modules.imagepicker-17.0.10.module.sha1 +1 -0
  28. package/local-maven-repo/host/exp/exponent/expo.modules.imagepicker/17.0.10/expo.modules.imagepicker-17.0.10.module.sha256 +1 -0
  29. package/local-maven-repo/host/exp/exponent/expo.modules.imagepicker/17.0.10/expo.modules.imagepicker-17.0.10.module.sha512 +1 -0
  30. package/local-maven-repo/host/exp/exponent/expo.modules.imagepicker/{17.0.9/expo.modules.imagepicker-17.0.9.pom → 17.0.10/expo.modules.imagepicker-17.0.10.pom} +1 -1
  31. package/local-maven-repo/host/exp/exponent/expo.modules.imagepicker/17.0.10/expo.modules.imagepicker-17.0.10.pom.md5 +1 -0
  32. package/local-maven-repo/host/exp/exponent/expo.modules.imagepicker/17.0.10/expo.modules.imagepicker-17.0.10.pom.sha1 +1 -0
  33. package/local-maven-repo/host/exp/exponent/expo.modules.imagepicker/17.0.10/expo.modules.imagepicker-17.0.10.pom.sha256 +1 -0
  34. package/local-maven-repo/host/exp/exponent/expo.modules.imagepicker/17.0.10/expo.modules.imagepicker-17.0.10.pom.sha512 +1 -0
  35. package/local-maven-repo/host/exp/exponent/expo.modules.imagepicker/maven-metadata.xml +4 -4
  36. package/local-maven-repo/host/exp/exponent/expo.modules.imagepicker/maven-metadata.xml.md5 +1 -1
  37. package/local-maven-repo/host/exp/exponent/expo.modules.imagepicker/maven-metadata.xml.sha1 +1 -1
  38. package/local-maven-repo/host/exp/exponent/expo.modules.imagepicker/maven-metadata.xml.sha256 +1 -1
  39. package/local-maven-repo/host/exp/exponent/expo.modules.imagepicker/maven-metadata.xml.sha512 +1 -1
  40. package/package.json +2 -2
  41. package/src/ImagePicker.types.ts +4 -3
  42. package/local-maven-repo/host/exp/exponent/expo.modules.imagepicker/17.0.9/expo.modules.imagepicker-17.0.9-sources.jar +0 -0
  43. package/local-maven-repo/host/exp/exponent/expo.modules.imagepicker/17.0.9/expo.modules.imagepicker-17.0.9-sources.jar.md5 +0 -1
  44. package/local-maven-repo/host/exp/exponent/expo.modules.imagepicker/17.0.9/expo.modules.imagepicker-17.0.9-sources.jar.sha1 +0 -1
  45. package/local-maven-repo/host/exp/exponent/expo.modules.imagepicker/17.0.9/expo.modules.imagepicker-17.0.9-sources.jar.sha256 +0 -1
  46. package/local-maven-repo/host/exp/exponent/expo.modules.imagepicker/17.0.9/expo.modules.imagepicker-17.0.9-sources.jar.sha512 +0 -1
  47. package/local-maven-repo/host/exp/exponent/expo.modules.imagepicker/17.0.9/expo.modules.imagepicker-17.0.9.aar +0 -0
  48. package/local-maven-repo/host/exp/exponent/expo.modules.imagepicker/17.0.9/expo.modules.imagepicker-17.0.9.aar.md5 +0 -1
  49. package/local-maven-repo/host/exp/exponent/expo.modules.imagepicker/17.0.9/expo.modules.imagepicker-17.0.9.aar.sha1 +0 -1
  50. package/local-maven-repo/host/exp/exponent/expo.modules.imagepicker/17.0.9/expo.modules.imagepicker-17.0.9.aar.sha256 +0 -1
  51. package/local-maven-repo/host/exp/exponent/expo.modules.imagepicker/17.0.9/expo.modules.imagepicker-17.0.9.aar.sha512 +0 -1
  52. package/local-maven-repo/host/exp/exponent/expo.modules.imagepicker/17.0.9/expo.modules.imagepicker-17.0.9.module.md5 +0 -1
  53. package/local-maven-repo/host/exp/exponent/expo.modules.imagepicker/17.0.9/expo.modules.imagepicker-17.0.9.module.sha1 +0 -1
  54. package/local-maven-repo/host/exp/exponent/expo.modules.imagepicker/17.0.9/expo.modules.imagepicker-17.0.9.module.sha256 +0 -1
  55. package/local-maven-repo/host/exp/exponent/expo.modules.imagepicker/17.0.9/expo.modules.imagepicker-17.0.9.module.sha512 +0 -1
  56. package/local-maven-repo/host/exp/exponent/expo.modules.imagepicker/17.0.9/expo.modules.imagepicker-17.0.9.pom.md5 +0 -1
  57. package/local-maven-repo/host/exp/exponent/expo.modules.imagepicker/17.0.9/expo.modules.imagepicker-17.0.9.pom.sha1 +0 -1
  58. package/local-maven-repo/host/exp/exponent/expo.modules.imagepicker/17.0.9/expo.modules.imagepicker-17.0.9.pom.sha256 +0 -1
  59. package/local-maven-repo/host/exp/exponent/expo.modules.imagepicker/17.0.9/expo.modules.imagepicker-17.0.9.pom.sha512 +0 -1
package/CHANGELOG.md CHANGED
@@ -10,6 +10,12 @@
10
10
 
11
11
  ### 💡 Others
12
12
 
13
+ ## 17.0.10 — 2025-12-11
14
+
15
+ ### 🐛 Bug fixes
16
+
17
+ - [android] do not crash if `ContentProvider` doesn't provide mime type ([#41495](https://github.com/expo/expo/pull/41495) by [@vonovak](https://github.com/vonovak))
18
+
13
19
  ## 17.0.9 — 2025-12-05
14
20
 
15
21
  _This version does not introduce any user-facing changes._
@@ -4,13 +4,13 @@ plugins {
4
4
  }
5
5
 
6
6
  group = 'host.exp.exponent'
7
- version = '17.0.9'
7
+ version = '17.0.10'
8
8
 
9
9
  android {
10
10
  namespace "expo.modules.imagepicker"
11
11
  defaultConfig {
12
12
  versionCode 22
13
- versionName "17.0.9"
13
+ versionName "17.0.10"
14
14
  testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
15
15
  }
16
16
  testOptions {
@@ -4,9 +4,6 @@ import androidx.core.net.toUri
4
4
  import expo.modules.kotlin.exception.CodedException
5
5
  import java.io.File
6
6
 
7
- internal class FailedToDeduceTypeException :
8
- CodedException("Can not deduce type of the returned file")
9
-
10
7
  internal class FailedToCreateFileException(path: String, cause: Throwable? = null) :
11
8
  CodedException("Failed to create the file '$path'", cause)
12
9
 
@@ -4,7 +4,6 @@ import android.Manifest
4
4
  import android.content.Context
5
5
  import android.content.Intent
6
6
  import android.content.pm.PackageManager
7
- import android.net.Uri
8
7
  import android.os.Build
9
8
  import android.os.Bundle
10
9
  import android.os.OperationCanceledException
@@ -17,6 +16,7 @@ import expo.modules.imagepicker.contracts.CropImageContractOptions
17
16
  import expo.modules.imagepicker.contracts.ImageLibraryContract
18
17
  import expo.modules.imagepicker.contracts.ImageLibraryContractOptions
19
18
  import expo.modules.imagepicker.contracts.ImagePickerContractResult
19
+ import expo.modules.imagepicker.contracts.MediaList
20
20
  import expo.modules.interfaces.permissions.Permissions
21
21
  import expo.modules.interfaces.permissions.PermissionsResponse
22
22
  import expo.modules.interfaces.permissions.PermissionsResponseListener
@@ -302,6 +302,6 @@ class ImagePickerModule : Module() {
302
302
  * Simple data structure to hold the data that has to be preserved after the Activity is destroyed.
303
303
  */
304
304
  internal data class PendingMediaPickingResult(
305
- val data: List<Pair<MediaType, Uri>>,
305
+ val data: MediaList,
306
306
  val options: ImagePickerOptions
307
307
  )
@@ -85,14 +85,6 @@ internal enum class MediaTypes(val value: String) : Enumerable {
85
85
  VIDEOS("Videos"),
86
86
  ALL("All");
87
87
 
88
- fun toMimeType(): String {
89
- return when (this) {
90
- IMAGES -> ImageAllMimeType
91
- VIDEOS -> VideoAllMimeType
92
- ALL -> AllMimeType
93
- }
94
- }
95
-
96
88
  fun toFileExtension(): String {
97
89
  return when (this) {
98
90
  VIDEOS -> ".mp4"
@@ -111,10 +103,6 @@ internal enum class MediaTypes(val value: String) : Enumerable {
111
103
  }
112
104
 
113
105
  companion object {
114
- private const val ImageAllMimeType = "image/*"
115
- private const val VideoAllMimeType = "video/*"
116
- private const val AllMimeType = "*/*"
117
-
118
106
  fun fromJSMediaTypesArray(mediaTypes: Array<JSMediaTypes>): MediaTypes {
119
107
  return if (!mediaTypes.contains(JSMediaTypes.VIDEOS)) {
120
108
  IMAGES
@@ -7,7 +7,7 @@ import expo.modules.kotlin.types.Enumerable
7
7
 
8
8
  internal class ImagePickerAsset(
9
9
  @Field val assetId: String? = null,
10
- @Field val type: MediaType = MediaType.IMAGE,
10
+ @Field val type: MediaType? = MediaType.IMAGE,
11
11
  @Field val uri: String = "",
12
12
  @Field val width: Int = 0,
13
13
  @Field val height: Int = 0,
@@ -20,6 +20,7 @@ import java.io.File
20
20
  import java.io.FileNotFoundException
21
21
  import java.io.FileOutputStream
22
22
  import java.io.IOException
23
+ import kotlin.io.use
23
24
 
24
25
  internal fun createOutputFile(cacheDir: File, extension: String): File {
25
26
  val filePath = FileUtilities.generateOutputPath(cacheDir, ImagePickerConstants.CACHE_DIR_NAME, extension)
@@ -30,10 +31,30 @@ internal fun createOutputFile(cacheDir: File, extension: String): File {
30
31
  }
31
32
  }
32
33
 
33
- internal fun getType(contentResolver: ContentResolver, uri: Uri): String =
34
- contentResolver.getType(uri)
34
+ internal fun getType(contentResolver: ContentResolver, uri: Uri): String? {
35
+ val mimeFromCursor: () -> String? = {
36
+ contentResolver
37
+ .query(
38
+ uri,
39
+ listOf(DocumentsContract.Document.COLUMN_MIME_TYPE).toTypedArray(),
40
+ null,
41
+ null,
42
+ null
43
+ ).use { cursor ->
44
+ if (cursor?.moveToFirst() == true) {
45
+ val columnIndex = cursor.getColumnIndex(DocumentsContract.Document.COLUMN_MIME_TYPE)
46
+ if (columnIndex != -1 && !cursor.isNull(columnIndex)) {
47
+ cursor.getString(columnIndex)
48
+ }
49
+ }
50
+ null
51
+ }
52
+ }
53
+
54
+ return contentResolver.getType(uri)
55
+ ?: mimeFromCursor()
35
56
  ?: getTypeFromFileUrl(uri.toString())
36
- ?: throw FailedToDeduceTypeException()
57
+ }
37
58
 
38
59
  private fun getTypeFromFileUrl(url: String): String? {
39
60
  val extension = MimeTypeMap.getFileExtensionFromUrl(url)
@@ -76,12 +97,12 @@ internal fun String.toImageFileExtension(): String = when {
76
97
  else -> ".jpeg"
77
98
  }
78
99
 
79
- internal fun Uri.toMediaType(contentResolver: ContentResolver): MediaType {
100
+ internal fun Uri.toMediaType(contentResolver: ContentResolver): MediaType? {
80
101
  val type = getType(contentResolver, this)
81
102
  return when {
82
- type.contains("image/") -> MediaType.IMAGE
83
- type.contains("video/") -> MediaType.VIDEO
84
- else -> throw FailedToDeduceTypeException()
103
+ type?.contains("image/") == true -> MediaType.IMAGE
104
+ type?.contains("video/") == true -> MediaType.VIDEO
105
+ else -> null
85
106
  }
86
107
  }
87
108
 
@@ -6,6 +6,7 @@ import android.net.Uri
6
6
  import android.provider.OpenableColumns
7
7
  import android.util.Base64
8
8
  import androidx.core.net.toUri
9
+ import expo.modules.imagepicker.contracts.MediaList
9
10
  import expo.modules.imagepicker.exporters.CompressionImageExporter
10
11
  import expo.modules.imagepicker.exporters.ImageExporter
11
12
  import expo.modules.imagepicker.exporters.RawImageExporter
@@ -19,13 +20,17 @@ internal class MediaHandler(
19
20
  get() = requireNotNull(appContextProvider.appContext.reactContext) { "React Application Context is null" }
20
21
 
21
22
  internal suspend fun readExtras(
22
- bareResult: List<Pair<MediaType, Uri>>,
23
+ bareResult: MediaList,
23
24
  options: ImagePickerOptions
24
25
  ): ImagePickerResponse {
25
26
  val results = bareResult.map { (mediaType, uri) ->
26
27
  when (mediaType) {
27
28
  MediaType.VIDEO -> handleVideo(uri)
28
29
  MediaType.IMAGE -> handleImage(uri, options)
30
+ null -> ImagePickerAsset(
31
+ type = null,
32
+ uri = uri.toString()
33
+ )
29
34
  }
30
35
  }
31
36
 
@@ -47,7 +52,7 @@ internal class MediaHandler(
47
52
  } else {
48
53
  CompressionImageExporter(appContextProvider, options.quality)
49
54
  }
50
- val mimeType = getType(context.contentResolver, sourceUri)
55
+ val mimeType = requireNotNull(getType(context.contentResolver, sourceUri)) // this won't be null due to previous checks
51
56
  val outputFile = createOutputFile(cacheDirectory, mimeType.toImageFileExtension())
52
57
 
53
58
  val exportedImage = exporter.exportAsync(sourceUri, outputFile, context.contentResolver)
@@ -73,17 +78,21 @@ internal class MediaHandler(
73
78
  )
74
79
  }
75
80
 
76
- private fun getAdditionalFileData(uri: Uri): AdditionalFileData? = context.contentResolver.query(uri, null, null, null, null)?.use { cursor ->
77
- val nameIndex = cursor.getColumnIndex(OpenableColumns.DISPLAY_NAME)
78
- val sizeIndex = cursor.getColumnIndex(OpenableColumns.SIZE)
79
- cursor.moveToFirst()
80
-
81
- val name: String? = cursor.getString(nameIndex)
82
- val size = cursor.getLong(sizeIndex)
83
- AdditionalFileData(
84
- name,
85
- size
86
- )
81
+ private fun getAdditionalFileData(uri: Uri): AdditionalFileData? {
82
+ val queriedFields = listOf(OpenableColumns.DISPLAY_NAME, OpenableColumns.SIZE).toTypedArray()
83
+ return context.contentResolver.query(uri, queriedFields, null, null, null)?.use { cursor ->
84
+ if (!cursor.moveToFirst()) {
85
+ return null
86
+ }
87
+ runCatching {
88
+ val name = cursor.getColumnIndex(OpenableColumns.DISPLAY_NAME).takeIf { it != -1 }?.let { cursor.getString(it) }
89
+ val size = cursor.getColumnIndex(OpenableColumns.SIZE).takeIf { it != -1 }?.let { cursor.getLong(it) }
90
+ AdditionalFileData(
91
+ name,
92
+ size
93
+ )
94
+ }.getOrNull()
95
+ }
87
96
  }
88
97
 
89
98
  private suspend fun handleVideo(
@@ -3,11 +3,13 @@ package expo.modules.imagepicker.contracts
3
3
  import android.net.Uri
4
4
  import expo.modules.imagepicker.MediaType
5
5
 
6
+ typealias MediaList = List<Pair<MediaType?, Uri>>
7
+
6
8
  /**
7
9
  * Data required to be returned upon successful contract completion
8
10
  */
9
- internal sealed class ImagePickerContractResult private constructor() {
10
- class Success(val data: List<Pair<MediaType, Uri>>) : ImagePickerContractResult()
11
+ internal sealed class ImagePickerContractResult {
12
+ class Success(val data: MediaList) : ImagePickerContractResult()
11
13
  object Cancelled : ImagePickerContractResult()
12
14
  object Error : ImagePickerContractResult()
13
15
  }
@@ -3,6 +3,7 @@ package expo.modules.imagepicker.contracts
3
3
  import android.app.Activity
4
4
  import android.content.Context
5
5
  import android.content.Intent
6
+ import android.graphics.Bitmap
6
7
  import android.os.Build
7
8
  import androidx.core.net.toFile
8
9
  import androidx.core.net.toUri
@@ -27,7 +28,7 @@ internal class CropImageContract(
27
28
  ) : AppContextActivityResultContract<CropImageContractOptions, ImagePickerContractResult> {
28
29
  override fun createIntent(context: Context, input: CropImageContractOptions) = Intent(context, expo.modules.imagepicker.ExpoCropImageActivity::class.java).apply {
29
30
  val mediaType = expo.modules.imagepicker.getType(context.contentResolver, input.sourceUri.toUri())
30
- val compressFormat = mediaType.toBitmapCompressFormat()
31
+ val compressFormat = mediaType?.toBitmapCompressFormat() ?: Bitmap.CompressFormat.JPEG
31
32
  val cacheDirectory = appContextProvider.appContext.cacheDirectory
32
33
  val outputUri = createOutputFile(cacheDirectory, compressFormat.toImageFileExtension()).toUri()
33
34
 
@@ -245,11 +245,11 @@ export type ImagePickerAsset = {
245
245
  */
246
246
  assetId?: string | null;
247
247
  /**
248
- * Width of the image or video.
248
+ * Width of the image or video. Can be `0` if the system did not provide the width.
249
249
  */
250
250
  width: number;
251
251
  /**
252
- * Height of the image or video.
252
+ * Height of the image or video. Can be `0` if the system did not provide the height.
253
253
  */
254
254
  height: number;
255
255
  /**
@@ -258,8 +258,9 @@ export type ImagePickerAsset = {
258
258
  * - `'video'` - for videos.
259
259
  * - `'livePhoto'` - for live photos. (iOS only)
260
260
  * - `'pairedVideo'` - for videos paired with photos, which can be combined to create a live photo. (iOS only)
261
+ * - `null` - when the type could not be determined. This is rare but can happen with some Android ContentProviders.
261
262
  */
262
- type?: 'image' | 'video' | 'livePhoto' | 'pairedVideo';
263
+ type?: 'image' | 'video' | 'livePhoto' | 'pairedVideo' | null;
263
264
  /**
264
265
  * Preferred filename to use when saving this item. This might be `null` when the name is unavailable
265
266
  * or user gave limited permission to access the media library.
@@ -1 +1 @@
1
- {"version":3,"file":"ImagePicker.types.d.ts","sourceRoot":"","sources":["../src/ImagePicker.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAGvD;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAAG,kBAAkB,CAAC;AAG1D;;GAEG;AACH,MAAM,MAAM,8BAA8B,GAAG,kBAAkB,GAAG;IAChE;;;;;OAKG;IACH,gBAAgB,CAAC,EAAE,KAAK,GAAG,SAAS,GAAG,MAAM,CAAC;CAC/C,CAAC;AAGF;;GAEG;AACH,oBAAY,gBAAgB;IAC1B;;OAEG;IACH,GAAG,QAAQ;IACX;;OAEG;IACH,MAAM,WAAW;IACjB;;OAEG;IACH,MAAM,WAAW;CAClB;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,SAAS,GAAG,QAAQ,GAAG,QAAQ,GAAG,YAAY,CAAC;AAE3D;;;;;;GAMG;AACH,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAG7C,oBAAY,iBAAiB;IAC3B;;;;OAIG;IACH,WAAW,IAAI;IACf;;;;OAIG;IACH,UAAU,IAAI;IACd;;;;OAIG;IACH,aAAa,IAAI;IACjB;;;;OAIG;IACH,cAAc,IAAI;IAClB;;;;OAIG;IACH,YAAY,IAAI;IAChB;;;;OAIG;IACH,YAAY,IAAI;IAChB;;;;OAIG;IACH,aAAa,IAAI;IACjB;;;;OAIG;IACH,cAAc,IAAI;IAClB;;;;OAIG;IACH,cAAc,IAAI;IAClB;;;;OAIG;IACH,cAAc,IAAI;IAClB;;;;OAIG;IACH,cAAc,KAAK;CACpB;AAGD,oBAAY,kCAAkC;IAC5C;;OAEG;IACH,IAAI,IAAI;IACR;;OAEG;IACH,MAAM,IAAI;IACV;;OAEG;IACH,GAAG,IAAI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;IAAE,uBAAuB,EAAE,IAAI,CAAA;CAAE,GAAG,iBAAiB,GAAG,iBAAiB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"ImagePicker.types.js","sourceRoot":"","sources":["../src/ImagePicker.types.ts"],"names":[],"mappings":"AAsBA,cAAc;AACd;;GAEG;AACH,MAAM,CAAN,IAAY,gBAaX;AAbD,WAAY,gBAAgB;IAC1B;;OAEG;IACH,+BAAW,CAAA;IACX;;OAEG;IACH,qCAAiB,CAAA;IACjB;;OAEG;IACH,qCAAiB,CAAA;AACnB,CAAC,EAbW,gBAAgB,KAAhB,gBAAgB,QAa3B;AA0BD,cAAc;AACd,MAAM,CAAN,IAAY,iBAmEX;AAnED,WAAY,iBAAiB;IAC3B;;;;OAIG;IACH,uEAAe,CAAA;IACf;;;;OAIG;IACH,qEAAc,CAAA;IACd;;;;OAIG;IACH,2EAAiB,CAAA;IACjB;;;;OAIG;IACH,6EAAkB,CAAA;IAClB;;;;OAIG;IACH,yEAAgB,CAAA;IAChB;;;;OAIG;IACH,yEAAgB,CAAA;IAChB;;;;OAIG;IACH,2EAAiB,CAAA;IACjB;;;;OAIG;IACH,6EAAkB,CAAA;IAClB;;;;OAIG;IACH,6EAAkB,CAAA;IAClB;;;;OAIG;IACH,6EAAkB,CAAA;IAClB;;;;OAIG;IACH,8EAAmB,CAAA;AACrB,CAAC,EAnEW,iBAAiB,KAAjB,iBAAiB,QAmE5B;AAED,cAAc;AACd,MAAM,CAAN,IAAY,kCAyBX;AAzBD,WAAY,kCAAkC;IAC5C;;OAEG;IACH,2FAAQ,CAAA;IACR;;OAEG;IACH,+FAAU,CAAA;IACV;;OAEG;IACH,yFAAO,CAAA;IACP;;OAEG;IACH,uGAAc,CAAA;IACd;;OAEG;IACH,+GAAkB,CAAA;IAClB;;OAEG;IACH,6GAAiB,CAAA;AACnB,CAAC,EAzBW,kCAAkC,KAAlC,kCAAkC,QAyB7C;AAED;;;;GAIG;AACH,MAAM,CAAN,IAAY,8BAoCX;AApCD,WAAY,8BAA8B;IACxC;;OAEG;IACH,4DAA0B,CAAA;IAC1B;;OAEG;IACH,0DAAwB,CAAA;IACxB;;OAEG;IACH,0DAAwB,CAAA;IACxB;;OAEG;IACH,oEAAkC,CAAA;IAClC;;OAEG;IACH,qEAAmC,CAAA;IACnC;;OAEG;IACH,6EAA2C,CAAA;IAC3C;;OAEG;IACH,qDAAmB,CAAA;IACnB;;;;;OAKG;IACH,yDAAuB,CAAA;AACzB,CAAC,EApCW,8BAA8B,KAA9B,8BAA8B,QAoCzC;AAED;;;;GAIG;AACH,MAAM,CAAN,IAAY,6CAaX;AAbD,WAAY,6CAA6C;IACvD;;OAEG;IACH,wEAAuB,CAAA;IACvB;;OAEG;IACH,0EAAyB,CAAA;IACzB;;OAEG;IACH,oEAAmB,CAAA;AACrB,CAAC,EAbW,6CAA6C,KAA7C,6CAA6C,QAaxD;AAED,MAAM,CAAN,IAAY,UASX;AATD,WAAY,UAAU;IACpB;;OAEG;IACH,2BAAa,CAAA;IACb;;OAEG;IACH,6BAAe,CAAA;AACjB,CAAC,EATW,UAAU,KAAV,UAAU,QASrB","sourcesContent":["import { PermissionResponse } from 'expo-modules-core';\n\n// @needsAudit\n/**\n * Alias for `PermissionResponse` type exported by `expo-modules-core`.\n */\nexport type CameraPermissionResponse = PermissionResponse;\n\n// @needsAudit\n/**\n * Extends `PermissionResponse` type exported by `expo-modules-core`, containing additional iOS-specific field.\n */\nexport type MediaLibraryPermissionResponse = PermissionResponse & {\n /**\n * Indicates if your app has access to the whole or only part of the photo library. Possible values are:\n * - `'all'` if the user granted your app access to the whole photo library\n * - `'limited'` if the user granted your app access only to selected photos (only available on Android API 34+ and iOS 14.0+)\n * - `'none'` if user denied or hasn't yet granted the permission\n */\n accessPrivileges?: 'all' | 'limited' | 'none';\n};\n\n// @needsAudit\n/**\n * @deprecated To set media types available in the image picker use an array of [`MediaType`](#mediatype) instead.\n */\nexport enum MediaTypeOptions {\n /**\n * Images and videos.\n */\n All = 'All',\n /**\n * Only videos.\n */\n Videos = 'Videos',\n /**\n * Only images.\n */\n Images = 'Images',\n}\n\n/**\n * Media types that can be picked by the image picker.\n * - `'images'` - for images.\n * - `'videos'` - for videos.\n * - `'livePhotos'` - for live photos (iOS only).\n *\n * > When the `livePhotos` type is added to the media types array and a live photo is selected,\n * > the resulting `ImagePickerAsset` will contain an unaltered image and the `pairedVideoAsset` field will contain a\n * > video asset paired with the image. This option will be ignored when the `allowsEditing` option is enabled. Due\n * > to platform limitations live photos are returned at original quality, regardless of the `quality` option.\n *\n * > When on Android or Web `livePhotos` type passed as a media type will be ignored.\n */\nexport type MediaType = 'images' | 'videos' | 'livePhotos';\n\n/**\n * The default tab with which the image picker will be opened.\n * - `'photos'` - the photos/videos tab will be opened.\n * - `'albums'` - the albums tab will be opened.\n *\n * @platform android\n */\nexport type DefaultTab = 'photos' | 'albums';\n\n// @needsAudit\nexport enum VideoExportPreset {\n /**\n * Resolution: __Unchanged__ •\n * Video compression: __None__ •\n * Audio compression: __None__\n */\n Passthrough = 0,\n /**\n * Resolution: __Depends on the device__ •\n * Video compression: __H.264__ •\n * Audio compression: __AAC__\n */\n LowQuality = 1,\n /**\n * Resolution: __Depends on the device__ •\n * Video compression: __H.264__ •\n * Audio compression: __AAC__\n */\n MediumQuality = 2,\n /**\n * Resolution: __Depends on the device__ •\n * Video compression: __H.264__ •\n * Audio compression: __AAC__\n */\n HighestQuality = 3,\n /**\n * Resolution: __640 × 480__ •\n * Video compression: __H.264__ •\n * Audio compression: __AAC__\n */\n H264_640x480 = 4,\n /**\n * Resolution: __960 × 540__ •\n * Video compression: __H.264__ •\n * Audio compression: __AAC__\n */\n H264_960x540 = 5,\n /**\n * Resolution: __1280 × 720__ •\n * Video compression: __H.264__ •\n * Audio compression: __AAC__\n */\n H264_1280x720 = 6,\n /**\n * Resolution: __1920 × 1080__ •\n * Video compression: __H.264__ •\n * Audio compression: __AAC__\n */\n H264_1920x1080 = 7,\n /**\n * Resolution: __3840 × 2160__ •\n * Video compression: __H.264__ •\n * Audio compression: __AAC__\n */\n H264_3840x2160 = 8,\n /**\n * Resolution: __1920 × 1080__ •\n * Video compression: __HEVC__ •\n * Audio compression: __AAC__\n */\n HEVC_1920x1080 = 9,\n /**\n * Resolution: __3840 × 2160__ •\n * Video compression: __HEVC__ •\n * Audio compression: __AAC__\n */\n HEVC_3840x2160 = 10,\n}\n\n// @needsAudit\nexport enum UIImagePickerControllerQualityType {\n /**\n * Highest available resolution.\n */\n High = 0,\n /**\n * Depends on the device.\n */\n Medium = 1,\n /**\n * Depends on the device.\n */\n Low = 2,\n /**\n * 640 × 480\n */\n VGA640x480 = 3,\n /**\n * 1280 × 720\n */\n IFrame1280x720 = 4,\n /**\n * 960 × 540\n */\n IFrame960x540 = 5,\n}\n\n/**\n * Picker presentation style. Its values are directly mapped to the [`UIModalPresentationStyle`](https://developer.apple.com/documentation/uikit/uiviewcontroller/1621355-modalpresentationstyle).\n *\n * @platform ios\n */\nexport enum UIImagePickerPresentationStyle {\n /**\n * A presentation style in which the presented picker covers the screen.\n */\n FULL_SCREEN = 'fullScreen',\n /**\n * A presentation style that partially covers the underlying content.\n */\n PAGE_SHEET = 'pageSheet',\n /**\n * A presentation style that displays the picker centered in the screen.\n */\n FORM_SHEET = 'formSheet',\n /**\n * A presentation style where the picker is displayed over the app's content.\n */\n CURRENT_CONTEXT = 'currentContext',\n /**\n * A presentation style in which the picker view covers the screen.\n */\n OVER_FULL_SCREEN = 'overFullScreen',\n /**\n * A presentation style where the picker is displayed over the app's content.\n */\n OVER_CURRENT_CONTEXT = 'overCurrentContext',\n /**\n * A presentation style where the picker is displayed in a popover view.\n */\n POPOVER = 'popover',\n /**\n * The default presentation style chosen by the system.\n * On older iOS versions, falls back to `WebBrowserPresentationStyle.FullScreen`.\n *\n * @platform ios\n */\n AUTOMATIC = 'automatic',\n}\n\n/**\n * Picker preferred asset representation mode. Its values are directly mapped to the [`PHPickerConfigurationAssetRepresentationMode`](https://developer.apple.com/documentation/photokit/phpickerconfigurationassetrepresentationmode).\n *\n * @platform ios\n */\nexport enum UIImagePickerPreferredAssetRepresentationMode {\n /**\n * A mode that indicates that the system chooses the appropriate asset representation.\n */\n Automatic = 'automatic',\n /**\n * A mode that uses the most compatible asset representation.\n */\n Compatible = 'compatible',\n /**\n * A mode that uses the current representation to avoid transcoding, if possible.\n */\n Current = 'current',\n}\n\nexport enum CameraType {\n /**\n * Back/rear camera.\n */\n back = 'back',\n /**\n * Front camera\n */\n front = 'front',\n}\n\n/**\n * @hidden\n * @deprecated Use `ImagePickerAsset` instead\n */\nexport type ImageInfo = ImagePickerAsset;\n\n/**\n * Represents an asset (image or video) returned by the image picker or camera.\n */\nexport type ImagePickerAsset = {\n /**\n * URI to the local image or video file (usable as the source of an `Image` element, in the case of\n * an image) and `width` and `height` specify the dimensions of the media.\n */\n uri: string;\n /**\n * The unique ID that represents the picked image or video, if picked from the library. It can be used\n * by [expo-media-library](./media-library) to manage the picked asset.\n *\n * > This might be `null` when the ID is unavailable or the user gave limited permission to access the media library.\n * > On Android, the ID is unavailable when the user selects a photo by directly browsing file system.\n *\n * @platform android\n * @platform ios\n */\n assetId?: string | null;\n /**\n * Width of the image or video.\n */\n width: number;\n /**\n * Height of the image or video.\n */\n height: number;\n /**\n * The type of the asset.\n * - `'image'` - for images.\n * - `'video'` - for videos.\n * - `'livePhoto'` - for live photos. (iOS only)\n * - `'pairedVideo'` - for videos paired with photos, which can be combined to create a live photo. (iOS only)\n */\n type?: 'image' | 'video' | 'livePhoto' | 'pairedVideo';\n /**\n * Preferred filename to use when saving this item. This might be `null` when the name is unavailable\n * or user gave limited permission to access the media library.\n *\n */\n fileName?: string | null;\n /**\n * File size of the picked image or video, in bytes.\n *\n */\n fileSize?: number;\n /**\n * The `exif` field is included if the `exif` option is truthy, and is an object containing the\n * image's EXIF data. The names of this object's properties are EXIF tags and the values are the\n * respective EXIF values for those tags.\n *\n * @platform android\n * @platform ios\n */\n exif?: Record<string, any> | null;\n /**\n * When the `base64` option is truthy, it is a Base64-encoded string of the selected image's JPEG data, otherwise `null`.\n * If you prepend this with `'data:image/jpeg;base64,'` to create a data URI,\n * you can use it as the source of an `Image` element; for example:\n * ```ts\n * <Image\n * source={{ uri: 'data:image/jpeg;base64,' + asset.base64 }}\n * style={{ width: 200, height: 200 }}\n * />\n * ```\n */\n base64?: string | null;\n /**\n * Length of the video in milliseconds or `null` if the asset is not a video.\n */\n duration?: number | null;\n /**\n * The MIME type of the selected asset or `null` if could not be determined.\n */\n mimeType?: string;\n /**\n * Contains information about the video paired with the image file. This property is only set when `livePhotos` media type was present in the `mediaTypes` array when launching the picker and a live photo was selected.\n *\n * @platform ios\n */\n pairedVideoAsset?: ImagePickerAsset | null;\n\n /**\n * The web `File` object containing the selected media. This property is web-only and can be used to upload to a server with `FormData`.\n *\n * @platform web\n */\n file?: File;\n};\n\n// @needsAudit\nexport type ImagePickerErrorResult = {\n /**\n * The error code.\n */\n code: string;\n /**\n * The error message.\n */\n message: string;\n /**\n * The exception which caused the error.\n */\n exception?: string;\n};\n\n// @needsAudit\n/**\n * Type representing successful and canceled pick result.\n */\nexport type ImagePickerResult = ImagePickerSuccessResult | ImagePickerCanceledResult;\n\n/**\n * Type representing successful pick result.\n */\nexport type ImagePickerSuccessResult = {\n /**\n * Boolean flag set to `false` showing that the request was successful.\n */\n canceled: false;\n /**\n * An array of picked assets.\n */\n assets: ImagePickerAsset[];\n};\n\n/**\n * Type representing canceled pick result.\n */\nexport type ImagePickerCanceledResult = {\n /**\n * Boolean flag set to `true` showing that the request was canceled.\n */\n canceled: true;\n /**\n * `null` signifying that the request was canceled.\n */\n assets: null;\n};\n\n/**\n * @hidden\n * @deprecated Use `ImagePickerResult` instead.\n */\nexport type ImagePickerCancelledResult = ImagePickerCanceledResult;\n\n/**\n * @hidden\n * @deprecated `ImagePickerMultipleResult` has been deprecated in favor of `ImagePickerResult`.\n */\nexport type ImagePickerMultipleResult = ImagePickerResult;\n\n/**\n * The shape of the crop area.\n */\nexport type CropShape = 'rectangle' | 'oval';\n\n// @needsAudit\nexport type ImagePickerOptions = {\n /**\n * Whether to show a UI to edit the image after it is picked. On Android the user can crop and\n * rotate the image and on iOS simply crop it.\n *\n * > - Cropping multiple images is not supported - this option is mutually exclusive with `allowsMultipleSelection`.\n * > - On iOS, this option is ignored if `allowsMultipleSelection` is enabled.\n * > - On iOS cropping a `.bmp` image will convert it to `.png`.\n *\n * @default false\n * @platform android\n * @platform ios\n */\n allowsEditing?: boolean;\n /**\n * An array with two entries `[x, y]` specifying the aspect ratio to maintain if the user is\n * allowed to edit the image (by passing `allowsEditing: true`). This is only applicable on\n * Android, since on iOS the crop rectangle is always a square.\n */\n aspect?: [number, number];\n /**\n * Specify the shape of the crop area if the user is allowed to edit the image\n * (by passing `allowsEditing: true`). This option is only applicable on Android.\n *\n * @default rectangle\n * @platform android\n */\n shape?: CropShape;\n /**\n * Specify the quality of compression, from `0` to `1`. `0` means compress for small size,\n * `1` means compress for maximum quality.\n * > Note: If the selected image has been compressed before, the size of the output file may be\n * > bigger than the size of the original image.\n *\n * > Note: On iOS, if a `.bmp` or `.png` image is selected from the library, this option is ignored.\n *\n * @default 1.0\n * @platform android\n * @platform ios\n */\n quality?: number;\n /**\n * Choose what type of media to pick.\n * @default 'images'\n */\n mediaTypes?: MediaType | MediaType[] | MediaTypeOptions;\n /**\n * Whether to also include the EXIF data for the image. On iOS the EXIF data does not include GPS\n * tags in the camera case.\n *\n * @platform android\n * @platform ios\n */\n exif?: boolean;\n /**\n * Whether to also include the image data in Base64 format.\n */\n base64?: boolean;\n /**\n * Specify preset which will be used to compress selected video.\n * @default ImagePicker.VideoExportPreset.Passthrough\n * @platform ios 11+\n * @deprecated See [`videoExportPreset`](https://developer.apple.com/documentation/uikit/uiimagepickercontroller/2890964-videoexportpreset?language=objc)\n * in Apple documentation.\n */\n videoExportPreset?: VideoExportPreset;\n /**\n * Specify the quality of recorded videos. Defaults to the highest quality available for the device.\n * @default ImagePicker.UIImagePickerControllerQualityType.High\n * @platform ios\n */\n videoQuality?: UIImagePickerControllerQualityType;\n /**\n * Whether or not to allow selecting multiple media files at once.\n *\n * > Cropping multiple images is not supported - this option is mutually exclusive with `allowsEditing`.\n * > If this option is enabled, then `allowsEditing` is ignored.\n *\n * @default false\n * @platform android\n * @platform ios 14+\n * @platform web\n */\n allowsMultipleSelection?: boolean;\n /**\n * The maximum number of items that user can select. Applicable when `allowsMultipleSelection` is enabled.\n * Setting the value to `0` sets the selection limit to the maximum that the system supports.\n *\n * @platform android\n * @platform ios 14+\n * @default 0\n */\n selectionLimit?: number;\n /**\n * Whether to display number badges when assets are selected. The badges are numbered\n * in selection order. Assets are then returned in the exact same order they were selected.\n *\n * > Assets should be returned in the selection order regardless of this option,\n * > but there is no guarantee that it is always true when this option is disabled.\n *\n * @platform ios 15+\n * @default false\n */\n orderedSelection?: boolean;\n /**\n * Choose the default tab with which the image picker will be opened.\n * @default 'photos'\n * @platform android\n */\n defaultTab?: DefaultTab;\n /**\n * Maximum duration, in seconds, for video recording. Setting this to `0` disables the limit.\n * Defaults to `0` (no limit).\n * - **On iOS**, when `allowsEditing` is set to `true`, maximum duration is limited to 10 minutes.\n * This limit is applied automatically, if `0` or no value is specified.\n * - **On Android**, effect of this option depends on support of installed camera app.\n * - **On Web** this option has no effect - the limit is browser-dependant.\n */\n videoMaxDuration?: number;\n /**\n * Choose [presentation style](https://developer.apple.com/documentation/uikit/uiviewcontroller/1621355-modalpresentationstyle?language=objc)\n * to customize view during taking photo/video.\n * @default ImagePicker.UIImagePickerPresentationStyle.Automatic\n * @platform ios\n */\n presentationStyle?: UIImagePickerPresentationStyle;\n /**\n * Selects the camera-facing type. The `CameraType` enum provides two options:\n * `front` for the front-facing camera and `back` for the back-facing camera.\n * - **On Android**, the behavior of this option may vary based on the camera app installed on the device.\n * - **On Web**, if this option is not provided, use \"camera\" as the default value of internal input element for backwards compatibility.\n * @default CameraType.back\n */\n cameraType?: CameraType;\n /**\n * Choose [preferred asset representation mode](https://developer.apple.com/documentation/photokit/phpickerconfigurationassetrepresentationmode)\n * to use when loading assets.\n * @default ImagePicker.UIImagePickerPreferredAssetRepresentationMode.Automatic\n * @platform ios 14+\n */\n preferredAssetRepresentationMode?: UIImagePickerPreferredAssetRepresentationMode;\n /**\n * Uses the legacy image picker on Android. This will allow media to be selected from outside the users photo library.\n * @platform android\n * @default false\n */\n legacy?: boolean;\n};\n\n/**\n * @hidden\n * @deprecated Only used internally.\n */\nexport type OpenFileBrowserOptions = {\n /**\n * Choose what type of media to pick.\n * @default 'images'\n */\n mediaTypes: MediaType | MediaType[] | MediaTypeOptions;\n // @docsMissing\n capture?: boolean | CameraType;\n /**\n * Whether or not to allow selecting multiple media files at once.\n * @platform web\n */\n allowsMultipleSelection: boolean;\n /**\n * Whether to also include the image data in Base64 format.\n */\n base64: boolean;\n};\n\n/**\n * @hidden\n * @deprecated Use `ImagePickerResult` or `OpenFileBrowserOptions` instead.\n */\nexport type ExpandImagePickerResult<T extends ImagePickerOptions | OpenFileBrowserOptions> =\n T extends { allowsMultipleSelection: true } ? ImagePickerResult : ImagePickerResult;\n"]}
1
+ {"version":3,"file":"ImagePicker.types.js","sourceRoot":"","sources":["../src/ImagePicker.types.ts"],"names":[],"mappings":"AAsBA,cAAc;AACd;;GAEG;AACH,MAAM,CAAN,IAAY,gBAaX;AAbD,WAAY,gBAAgB;IAC1B;;OAEG;IACH,+BAAW,CAAA;IACX;;OAEG;IACH,qCAAiB,CAAA;IACjB;;OAEG;IACH,qCAAiB,CAAA;AACnB,CAAC,EAbW,gBAAgB,KAAhB,gBAAgB,QAa3B;AA0BD,cAAc;AACd,MAAM,CAAN,IAAY,iBAmEX;AAnED,WAAY,iBAAiB;IAC3B;;;;OAIG;IACH,uEAAe,CAAA;IACf;;;;OAIG;IACH,qEAAc,CAAA;IACd;;;;OAIG;IACH,2EAAiB,CAAA;IACjB;;;;OAIG;IACH,6EAAkB,CAAA;IAClB;;;;OAIG;IACH,yEAAgB,CAAA;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A;IACb;;OAEG;IACH,6BAAe,CAAA;AACjB,CAAC,EATW,UAAU,KAAV,UAAU,QASrB","sourcesContent":["import { PermissionResponse } from 'expo-modules-core';\n\n// @needsAudit\n/**\n * Alias for `PermissionResponse` type exported by `expo-modules-core`.\n */\nexport type CameraPermissionResponse = PermissionResponse;\n\n// @needsAudit\n/**\n * Extends `PermissionResponse` type exported by `expo-modules-core`, containing additional iOS-specific field.\n */\nexport type MediaLibraryPermissionResponse = PermissionResponse & {\n /**\n * Indicates if your app has access to the whole or only part of the photo library. Possible values are:\n * - `'all'` if the user granted your app access to the whole photo library\n * - `'limited'` if the user granted your app access only to selected photos (only available on Android API 34+ and iOS 14.0+)\n * - `'none'` if user denied or hasn't yet granted the permission\n */\n accessPrivileges?: 'all' | 'limited' | 'none';\n};\n\n// @needsAudit\n/**\n * @deprecated To set media types available in the image picker use an array of [`MediaType`](#mediatype) instead.\n */\nexport enum MediaTypeOptions {\n /**\n * Images and videos.\n */\n All = 'All',\n /**\n * Only videos.\n */\n Videos = 'Videos',\n /**\n * Only images.\n */\n Images = 'Images',\n}\n\n/**\n * Media types that can be picked by the image picker.\n * - `'images'` - for images.\n * - `'videos'` - for videos.\n * - `'livePhotos'` - for live photos (iOS only).\n *\n * > When the `livePhotos` type is added to the media types array and a live photo is selected,\n * > the resulting `ImagePickerAsset` will contain an unaltered image and the `pairedVideoAsset` field will contain a\n * > video asset paired with the image. This option will be ignored when the `allowsEditing` option is enabled. Due\n * > to platform limitations live photos are returned at original quality, regardless of the `quality` option.\n *\n * > When on Android or Web `livePhotos` type passed as a media type will be ignored.\n */\nexport type MediaType = 'images' | 'videos' | 'livePhotos';\n\n/**\n * The default tab with which the image picker will be opened.\n * - `'photos'` - the photos/videos tab will be opened.\n * - `'albums'` - the albums tab will be opened.\n *\n * @platform android\n */\nexport type DefaultTab = 'photos' | 'albums';\n\n// @needsAudit\nexport enum VideoExportPreset {\n /**\n * Resolution: __Unchanged__ •\n * Video compression: __None__ •\n * Audio compression: __None__\n */\n Passthrough = 0,\n /**\n * Resolution: __Depends on the device__ •\n * Video compression: __H.264__ •\n * Audio compression: __AAC__\n */\n LowQuality = 1,\n /**\n * Resolution: __Depends on the device__ •\n * Video compression: __H.264__ •\n * Audio compression: __AAC__\n */\n MediumQuality = 2,\n /**\n * Resolution: __Depends on the device__ •\n * Video compression: __H.264__ •\n * Audio compression: __AAC__\n */\n HighestQuality = 3,\n /**\n * Resolution: __640 × 480__ •\n * Video compression: __H.264__ •\n * Audio compression: __AAC__\n */\n H264_640x480 = 4,\n /**\n * Resolution: __960 × 540__ •\n * Video compression: __H.264__ •\n * Audio compression: __AAC__\n */\n H264_960x540 = 5,\n /**\n * Resolution: __1280 × 720__ •\n * Video compression: __H.264__ •\n * Audio compression: __AAC__\n */\n H264_1280x720 = 6,\n /**\n * Resolution: __1920 × 1080__ •\n * Video compression: __H.264__ •\n * Audio compression: __AAC__\n */\n H264_1920x1080 = 7,\n /**\n * Resolution: __3840 × 2160__ •\n * Video compression: __H.264__ •\n * Audio compression: __AAC__\n */\n H264_3840x2160 = 8,\n /**\n * Resolution: __1920 × 1080__ •\n * Video compression: __HEVC__ •\n * Audio compression: __AAC__\n */\n HEVC_1920x1080 = 9,\n /**\n * Resolution: __3840 × 2160__ •\n * Video compression: __HEVC__ •\n * Audio compression: __AAC__\n */\n HEVC_3840x2160 = 10,\n}\n\n// @needsAudit\nexport enum UIImagePickerControllerQualityType {\n /**\n * Highest available resolution.\n */\n High = 0,\n /**\n * Depends on the device.\n */\n Medium = 1,\n /**\n * Depends on the device.\n */\n Low = 2,\n /**\n * 640 × 480\n */\n VGA640x480 = 3,\n /**\n * 1280 × 720\n */\n IFrame1280x720 = 4,\n /**\n * 960 × 540\n */\n IFrame960x540 = 5,\n}\n\n/**\n * Picker presentation style. Its values are directly mapped to the [`UIModalPresentationStyle`](https://developer.apple.com/documentation/uikit/uiviewcontroller/1621355-modalpresentationstyle).\n *\n * @platform ios\n */\nexport enum UIImagePickerPresentationStyle {\n /**\n * A presentation style in which the presented picker covers the screen.\n */\n FULL_SCREEN = 'fullScreen',\n /**\n * A presentation style that partially covers the underlying content.\n */\n PAGE_SHEET = 'pageSheet',\n /**\n * A presentation style that displays the picker centered in the screen.\n */\n FORM_SHEET = 'formSheet',\n /**\n * A presentation style where the picker is displayed over the app's content.\n */\n CURRENT_CONTEXT = 'currentContext',\n /**\n * A presentation style in which the picker view covers the screen.\n */\n OVER_FULL_SCREEN = 'overFullScreen',\n /**\n * A presentation style where the picker is displayed over the app's content.\n */\n OVER_CURRENT_CONTEXT = 'overCurrentContext',\n /**\n * A presentation style where the picker is displayed in a popover view.\n */\n POPOVER = 'popover',\n /**\n * The default presentation style chosen by the system.\n * On older iOS versions, falls back to `WebBrowserPresentationStyle.FullScreen`.\n *\n * @platform ios\n */\n AUTOMATIC = 'automatic',\n}\n\n/**\n * Picker preferred asset representation mode. Its values are directly mapped to the [`PHPickerConfigurationAssetRepresentationMode`](https://developer.apple.com/documentation/photokit/phpickerconfigurationassetrepresentationmode).\n *\n * @platform ios\n */\nexport enum UIImagePickerPreferredAssetRepresentationMode {\n /**\n * A mode that indicates that the system chooses the appropriate asset representation.\n */\n Automatic = 'automatic',\n /**\n * A mode that uses the most compatible asset representation.\n */\n Compatible = 'compatible',\n /**\n * A mode that uses the current representation to avoid transcoding, if possible.\n */\n Current = 'current',\n}\n\nexport enum CameraType {\n /**\n * Back/rear camera.\n */\n back = 'back',\n /**\n * Front camera\n */\n front = 'front',\n}\n\n/**\n * @hidden\n * @deprecated Use `ImagePickerAsset` instead\n */\nexport type ImageInfo = ImagePickerAsset;\n\n/**\n * Represents an asset (image or video) returned by the image picker or camera.\n */\nexport type ImagePickerAsset = {\n /**\n * URI to the local image or video file (usable as the source of an `Image` element, in the case of\n * an image) and `width` and `height` specify the dimensions of the media.\n */\n uri: string;\n /**\n * The unique ID that represents the picked image or video, if picked from the library. It can be used\n * by [expo-media-library](./media-library) to manage the picked asset.\n *\n * > This might be `null` when the ID is unavailable or the user gave limited permission to access the media library.\n * > On Android, the ID is unavailable when the user selects a photo by directly browsing file system.\n *\n * @platform android\n * @platform ios\n */\n assetId?: string | null;\n /**\n * Width of the image or video. Can be `0` if the system did not provide the width.\n */\n width: number;\n /**\n * Height of the image or video. Can be `0` if the system did not provide the height.\n */\n height: number;\n /**\n * The type of the asset.\n * - `'image'` - for images.\n * - `'video'` - for videos.\n * - `'livePhoto'` - for live photos. (iOS only)\n * - `'pairedVideo'` - for videos paired with photos, which can be combined to create a live photo. (iOS only)\n * - `null` - when the type could not be determined. This is rare but can happen with some Android ContentProviders.\n */\n type?: 'image' | 'video' | 'livePhoto' | 'pairedVideo' | null;\n /**\n * Preferred filename to use when saving this item. This might be `null` when the name is unavailable\n * or user gave limited permission to access the media library.\n *\n */\n fileName?: string | null;\n /**\n * File size of the picked image or video, in bytes.\n *\n */\n fileSize?: number;\n /**\n * The `exif` field is included if the `exif` option is truthy, and is an object containing the\n * image's EXIF data. The names of this object's properties are EXIF tags and the values are the\n * respective EXIF values for those tags.\n *\n * @platform android\n * @platform ios\n */\n exif?: Record<string, any> | null;\n /**\n * When the `base64` option is truthy, it is a Base64-encoded string of the selected image's JPEG data, otherwise `null`.\n * If you prepend this with `'data:image/jpeg;base64,'` to create a data URI,\n * you can use it as the source of an `Image` element; for example:\n * ```ts\n * <Image\n * source={{ uri: 'data:image/jpeg;base64,' + asset.base64 }}\n * style={{ width: 200, height: 200 }}\n * />\n * ```\n */\n base64?: string | null;\n /**\n * Length of the video in milliseconds or `null` if the asset is not a video.\n */\n duration?: number | null;\n /**\n * The MIME type of the selected asset or `null` if could not be determined.\n */\n mimeType?: string;\n /**\n * Contains information about the video paired with the image file. This property is only set when `livePhotos` media type was present in the `mediaTypes` array when launching the picker and a live photo was selected.\n *\n * @platform ios\n */\n pairedVideoAsset?: ImagePickerAsset | null;\n\n /**\n * The web `File` object containing the selected media. This property is web-only and can be used to upload to a server with `FormData`.\n *\n * @platform web\n */\n file?: File;\n};\n\n// @needsAudit\nexport type ImagePickerErrorResult = {\n /**\n * The error code.\n */\n code: string;\n /**\n * The error message.\n */\n message: string;\n /**\n * The exception which caused the error.\n */\n exception?: string;\n};\n\n// @needsAudit\n/**\n * Type representing successful and canceled pick result.\n */\nexport type ImagePickerResult = ImagePickerSuccessResult | ImagePickerCanceledResult;\n\n/**\n * Type representing successful pick result.\n */\nexport type ImagePickerSuccessResult = {\n /**\n * Boolean flag set to `false` showing that the request was successful.\n */\n canceled: false;\n /**\n * An array of picked assets.\n */\n assets: ImagePickerAsset[];\n};\n\n/**\n * Type representing canceled pick result.\n */\nexport type ImagePickerCanceledResult = {\n /**\n * Boolean flag set to `true` showing that the request was canceled.\n */\n canceled: true;\n /**\n * `null` signifying that the request was canceled.\n */\n assets: null;\n};\n\n/**\n * @hidden\n * @deprecated Use `ImagePickerResult` instead.\n */\nexport type ImagePickerCancelledResult = ImagePickerCanceledResult;\n\n/**\n * @hidden\n * @deprecated `ImagePickerMultipleResult` has been deprecated in favor of `ImagePickerResult`.\n */\nexport type ImagePickerMultipleResult = ImagePickerResult;\n\n/**\n * The shape of the crop area.\n */\nexport type CropShape = 'rectangle' | 'oval';\n\n// @needsAudit\nexport type ImagePickerOptions = {\n /**\n * Whether to show a UI to edit the image after it is picked. On Android the user can crop and\n * rotate the image and on iOS simply crop it.\n *\n * > - Cropping multiple images is not supported - this option is mutually exclusive with `allowsMultipleSelection`.\n * > - On iOS, this option is ignored if `allowsMultipleSelection` is enabled.\n * > - On iOS cropping a `.bmp` image will convert it to `.png`.\n *\n * @default false\n * @platform android\n * @platform ios\n */\n allowsEditing?: boolean;\n /**\n * An array with two entries `[x, y]` specifying the aspect ratio to maintain if the user is\n * allowed to edit the image (by passing `allowsEditing: true`). This is only applicable on\n * Android, since on iOS the crop rectangle is always a square.\n */\n aspect?: [number, number];\n /**\n * Specify the shape of the crop area if the user is allowed to edit the image\n * (by passing `allowsEditing: true`). This option is only applicable on Android.\n *\n * @default rectangle\n * @platform android\n */\n shape?: CropShape;\n /**\n * Specify the quality of compression, from `0` to `1`. `0` means compress for small size,\n * `1` means compress for maximum quality.\n * > Note: If the selected image has been compressed before, the size of the output file may be\n * > bigger than the size of the original image.\n *\n * > Note: On iOS, if a `.bmp` or `.png` image is selected from the library, this option is ignored.\n *\n * @default 1.0\n * @platform android\n * @platform ios\n */\n quality?: number;\n /**\n * Choose what type of media to pick.\n * @default 'images'\n */\n mediaTypes?: MediaType | MediaType[] | MediaTypeOptions;\n /**\n * Whether to also include the EXIF data for the image. On iOS the EXIF data does not include GPS\n * tags in the camera case.\n *\n * @platform android\n * @platform ios\n */\n exif?: boolean;\n /**\n * Whether to also include the image data in Base64 format.\n */\n base64?: boolean;\n /**\n * Specify preset which will be used to compress selected video.\n * @default ImagePicker.VideoExportPreset.Passthrough\n * @platform ios 11+\n * @deprecated See [`videoExportPreset`](https://developer.apple.com/documentation/uikit/uiimagepickercontroller/2890964-videoexportpreset?language=objc)\n * in Apple documentation.\n */\n videoExportPreset?: VideoExportPreset;\n /**\n * Specify the quality of recorded videos. Defaults to the highest quality available for the device.\n * @default ImagePicker.UIImagePickerControllerQualityType.High\n * @platform ios\n */\n videoQuality?: UIImagePickerControllerQualityType;\n /**\n * Whether or not to allow selecting multiple media files at once.\n *\n * > Cropping multiple images is not supported - this option is mutually exclusive with `allowsEditing`.\n * > If this option is enabled, then `allowsEditing` is ignored.\n *\n * @default false\n * @platform android\n * @platform ios 14+\n * @platform web\n */\n allowsMultipleSelection?: boolean;\n /**\n * The maximum number of items that user can select. Applicable when `allowsMultipleSelection` is enabled.\n * Setting the value to `0` sets the selection limit to the maximum that the system supports.\n *\n * @platform android\n * @platform ios 14+\n * @default 0\n */\n selectionLimit?: number;\n /**\n * Whether to display number badges when assets are selected. The badges are numbered\n * in selection order. Assets are then returned in the exact same order they were selected.\n *\n * > Assets should be returned in the selection order regardless of this option,\n * > but there is no guarantee that it is always true when this option is disabled.\n *\n * @platform ios 15+\n * @default false\n */\n orderedSelection?: boolean;\n /**\n * Choose the default tab with which the image picker will be opened.\n * @default 'photos'\n * @platform android\n */\n defaultTab?: DefaultTab;\n /**\n * Maximum duration, in seconds, for video recording. Setting this to `0` disables the limit.\n * Defaults to `0` (no limit).\n * - **On iOS**, when `allowsEditing` is set to `true`, maximum duration is limited to 10 minutes.\n * This limit is applied automatically, if `0` or no value is specified.\n * - **On Android**, effect of this option depends on support of installed camera app.\n * - **On Web** this option has no effect - the limit is browser-dependant.\n */\n videoMaxDuration?: number;\n /**\n * Choose [presentation style](https://developer.apple.com/documentation/uikit/uiviewcontroller/1621355-modalpresentationstyle?language=objc)\n * to customize view during taking photo/video.\n * @default ImagePicker.UIImagePickerPresentationStyle.Automatic\n * @platform ios\n */\n presentationStyle?: UIImagePickerPresentationStyle;\n /**\n * Selects the camera-facing type. The `CameraType` enum provides two options:\n * `front` for the front-facing camera and `back` for the back-facing camera.\n * - **On Android**, the behavior of this option may vary based on the camera app installed on the device.\n * - **On Web**, if this option is not provided, use \"camera\" as the default value of internal input element for backwards compatibility.\n * @default CameraType.back\n */\n cameraType?: CameraType;\n /**\n * Choose [preferred asset representation mode](https://developer.apple.com/documentation/photokit/phpickerconfigurationassetrepresentationmode)\n * to use when loading assets.\n * @default ImagePicker.UIImagePickerPreferredAssetRepresentationMode.Automatic\n * @platform ios 14+\n */\n preferredAssetRepresentationMode?: UIImagePickerPreferredAssetRepresentationMode;\n /**\n * Uses the legacy image picker on Android. This will allow media to be selected from outside the users photo library.\n * @platform android\n * @default false\n */\n legacy?: boolean;\n};\n\n/**\n * @hidden\n * @deprecated Only used internally.\n */\nexport type OpenFileBrowserOptions = {\n /**\n * Choose what type of media to pick.\n * @default 'images'\n */\n mediaTypes: MediaType | MediaType[] | MediaTypeOptions;\n // @docsMissing\n capture?: boolean | CameraType;\n /**\n * Whether or not to allow selecting multiple media files at once.\n * @platform web\n */\n allowsMultipleSelection: boolean;\n /**\n * Whether to also include the image data in Base64 format.\n */\n base64: boolean;\n};\n\n/**\n * @hidden\n * @deprecated Use `ImagePickerResult` or `OpenFileBrowserOptions` instead.\n */\nexport type ExpandImagePickerResult<T extends ImagePickerOptions | OpenFileBrowserOptions> =\n T extends { allowsMultipleSelection: true } ? ImagePickerResult : ImagePickerResult;\n"]}
@@ -8,7 +8,7 @@
8
8
  "publication": {
9
9
  "groupId": "host.exp.exponent",
10
10
  "artifactId": "expo.modules.imagepicker",
11
- "version": "17.0.9",
11
+ "version": "17.0.10",
12
12
  "repository": "local-maven-repo"
13
13
  }
14
14
  }
@@ -0,0 +1 @@
1
+ 49ca9b3dce4cee0b6a3e56d11d88d59a33dd7a1e12f3feb00de7769861e271a9
@@ -0,0 +1 @@
1
+ f134926ca57ba812ad740b762e7cfa547edca55f3d7461f772448e46cd6a1def3d65187b30d1a059461982339f92ef6ce54e5cbeb07c9591558e6b7cb538889c
@@ -0,0 +1 @@
1
+ a582750c4697e74a76713e381bb579a0ba23ad9b4c92d2591768b51f43e660e1
@@ -0,0 +1 @@
1
+ 48b86f26f07dd1bfa5bb3c7783e5d7523a631208ce649c383957b254f2951f3f8aea42b04e015b87808e4145df561ceac1fc4a6a05ff77460c5df36de8ff38e6
@@ -3,7 +3,7 @@
3
3
  "component": {
4
4
  "group": "host.exp.exponent",
5
5
  "module": "expo.modules.imagepicker",
6
- "version": "17.0.9",
6
+ "version": "17.0.10",
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.imagepicker-17.0.9.aar",
28
- "url": "expo.modules.imagepicker-17.0.9.aar",
29
- "size": 149672,
30
- "sha512": "758f973274bce8e5fca13db0a83eaae84134d98551993774fb1682b47e447f456c60819e373ad618a534bd7283dce353f17eddcf13a3c37ca38d167f402f9a0b",
31
- "sha256": "972f7bfeadfb1a654e474c2dd2e811ae0da6755125616e429bc0a87a8e78fe6c",
32
- "sha1": "ea9a3e43dc055b3dd1a991f17eb471cd405d3b40",
33
- "md5": "914471f6a6b47d82333c991656f70ef6"
27
+ "name": "expo.modules.imagepicker-17.0.10.aar",
28
+ "url": "expo.modules.imagepicker-17.0.10.aar",
29
+ "size": 150809,
30
+ "sha512": "48b86f26f07dd1bfa5bb3c7783e5d7523a631208ce649c383957b254f2951f3f8aea42b04e015b87808e4145df561ceac1fc4a6a05ff77460c5df36de8ff38e6",
31
+ "sha256": "a582750c4697e74a76713e381bb579a0ba23ad9b4c92d2591768b51f43e660e1",
32
+ "sha1": "6aef5999954b547fd3786ceb3912edd5d006b7e1",
33
+ "md5": "a0189d8d48c04a75df3d8c22b9d19194"
34
34
  }
35
35
  ]
36
36
  },
@@ -95,13 +95,13 @@
95
95
  ],
96
96
  "files": [
97
97
  {
98
- "name": "expo.modules.imagepicker-17.0.9.aar",
99
- "url": "expo.modules.imagepicker-17.0.9.aar",
100
- "size": 149672,
101
- "sha512": "758f973274bce8e5fca13db0a83eaae84134d98551993774fb1682b47e447f456c60819e373ad618a534bd7283dce353f17eddcf13a3c37ca38d167f402f9a0b",
102
- "sha256": "972f7bfeadfb1a654e474c2dd2e811ae0da6755125616e429bc0a87a8e78fe6c",
103
- "sha1": "ea9a3e43dc055b3dd1a991f17eb471cd405d3b40",
104
- "md5": "914471f6a6b47d82333c991656f70ef6"
98
+ "name": "expo.modules.imagepicker-17.0.10.aar",
99
+ "url": "expo.modules.imagepicker-17.0.10.aar",
100
+ "size": 150809,
101
+ "sha512": "48b86f26f07dd1bfa5bb3c7783e5d7523a631208ce649c383957b254f2951f3f8aea42b04e015b87808e4145df561ceac1fc4a6a05ff77460c5df36de8ff38e6",
102
+ "sha256": "a582750c4697e74a76713e381bb579a0ba23ad9b4c92d2591768b51f43e660e1",
103
+ "sha1": "6aef5999954b547fd3786ceb3912edd5d006b7e1",
104
+ "md5": "a0189d8d48c04a75df3d8c22b9d19194"
105
105
  }
106
106
  ]
107
107
  },
@@ -115,13 +115,13 @@
115
115
  },
116
116
  "files": [
117
117
  {
118
- "name": "expo.modules.imagepicker-17.0.9-sources.jar",
119
- "url": "expo.modules.imagepicker-17.0.9-sources.jar",
120
- "size": 24487,
121
- "sha512": "baee9c33a5d10479e76876096bd9774b2dc7a6b8f73c2527400ff62989933b147a3bb003ef99883b39cb6a47fac491409f2872f08ed23dc194f712e4c0a48e32",
122
- "sha256": "650f592065589e4007e6c179729c59e138577cebee67e633fb14aeb42817f0aa",
123
- "sha1": "59c158bfbacb6f207408b94fbbaf74259be961dd",
124
- "md5": "9df890d0f298eb10458eccafeab4e38e"
118
+ "name": "expo.modules.imagepicker-17.0.10-sources.jar",
119
+ "url": "expo.modules.imagepicker-17.0.10-sources.jar",
120
+ "size": 24712,
121
+ "sha512": "f134926ca57ba812ad740b762e7cfa547edca55f3d7461f772448e46cd6a1def3d65187b30d1a059461982339f92ef6ce54e5cbeb07c9591558e6b7cb538889c",
122
+ "sha256": "49ca9b3dce4cee0b6a3e56d11d88d59a33dd7a1e12f3feb00de7769861e271a9",
123
+ "sha1": "38305e73c7a08febf694eb2c3bb06d0965bf7661",
124
+ "md5": "7171e4b278d51977668a0295dd69facf"
125
125
  }
126
126
  ]
127
127
  }
@@ -0,0 +1 @@
1
+ 2342af5b2a781fdd28f9f408d40cd2e3c49db714c6b3f0d71a52e887c1d84e3e
@@ -0,0 +1 @@
1
+ 8ec914acf8eb319b68c021ef2e7495569f50bede60aa3e0e9b2a97d0eb1ebf1d33aee2ad871c933c4ed3bfee1bcefffd9a3cbbe2015a9aac5c89fad44aaa7c9b
@@ -9,7 +9,7 @@
9
9
  <modelVersion>4.0.0</modelVersion>
10
10
  <groupId>host.exp.exponent</groupId>
11
11
  <artifactId>expo.modules.imagepicker</artifactId>
12
- <version>17.0.9</version>
12
+ <version>17.0.10</version>
13
13
  <packaging>aar</packaging>
14
14
  <name>expo.modules.imagepicker</name>
15
15
  <url>https://github.com/expo/expo</url>
@@ -0,0 +1 @@
1
+ 4c63cdb99a44b4e0828244b121c682eafeb045145f585e7f8b72fd3caf94a9b7
@@ -0,0 +1 @@
1
+ 21053d97130509a33f4f55b7b69934c1fb50ae2a15609e68e5913bed6aa8a74204f23297ca1c3e9afc12f4615a366d2745445cf54b0e48c8b0d82da46dfb5973
@@ -3,11 +3,11 @@
3
3
  <groupId>host.exp.exponent</groupId>
4
4
  <artifactId>expo.modules.imagepicker</artifactId>
5
5
  <versioning>
6
- <latest>17.0.9</latest>
7
- <release>17.0.9</release>
6
+ <latest>17.0.10</latest>
7
+ <release>17.0.10</release>
8
8
  <versions>
9
- <version>17.0.9</version>
9
+ <version>17.0.10</version>
10
10
  </versions>
11
- <lastUpdated>20251205064556</lastUpdated>
11
+ <lastUpdated>20251211203607</lastUpdated>
12
12
  </versioning>
13
13
  </metadata>
@@ -1 +1 @@
1
- e8e43cd381d7a95d030b89634ffc83d7
1
+ e1ead712d962dbef1b680cc7b41653f5
@@ -1 +1 @@
1
- b5f2dc2b193638f196e1f71fdfbc663452d307ca
1
+ 86babf85a8d1b101bc61ec50353da23156947f55
@@ -1 +1 @@
1
- e45efe2319e1747deacebaf79b5ef397f0e98825b4bc3206dad4cc0d3afbf5f2
1
+ e09d104cea1a56f4d255ece47406160d79cb2f06e778ca5f20e46b24b181eed8
@@ -1 +1 @@
1
- ac7f805d8558a50d4003cd3a73fdd7702bcb6228bc10ef53d89a756f2a14200fe4e5a96d8ec2f65691e9b9d1411255b2231876ad8c9b1c9423a1d4b2eb4bfb0d
1
+ 2580cad6c336fb8ae585907550bba011dd2fd6a6f986dfe0e973a390fbf595a95cd0128d9aed010a56a361fc0b2e10d0372ce133e2a89c8a29d7cff98ca5ba09
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expo-image-picker",
3
- "version": "17.0.9",
3
+ "version": "17.0.10",
4
4
  "description": "Provides access to the system's UI for selecting images and videos from the phone's library or taking a photo with the camera.",
5
5
  "main": "build/ImagePicker.js",
6
6
  "types": "build/ImagePicker.d.ts",
@@ -45,5 +45,5 @@
45
45
  "peerDependencies": {
46
46
  "expo": "*"
47
47
  },
48
- "gitHead": "172a69f5f70c1d0e043e1532f924de97210cabc3"
48
+ "gitHead": "b6d1de9d53724e311e417c51dd0a9f9bee1c040d"
49
49
  }
@@ -262,11 +262,11 @@ export type ImagePickerAsset = {
262
262
  */
263
263
  assetId?: string | null;
264
264
  /**
265
- * Width of the image or video.
265
+ * Width of the image or video. Can be `0` if the system did not provide the width.
266
266
  */
267
267
  width: number;
268
268
  /**
269
- * Height of the image or video.
269
+ * Height of the image or video. Can be `0` if the system did not provide the height.
270
270
  */
271
271
  height: number;
272
272
  /**
@@ -275,8 +275,9 @@ export type ImagePickerAsset = {
275
275
  * - `'video'` - for videos.
276
276
  * - `'livePhoto'` - for live photos. (iOS only)
277
277
  * - `'pairedVideo'` - for videos paired with photos, which can be combined to create a live photo. (iOS only)
278
+ * - `null` - when the type could not be determined. This is rare but can happen with some Android ContentProviders.
278
279
  */
279
- type?: 'image' | 'video' | 'livePhoto' | 'pairedVideo';
280
+ type?: 'image' | 'video' | 'livePhoto' | 'pairedVideo' | null;
280
281
  /**
281
282
  * Preferred filename to use when saving this item. This might be `null` when the name is unavailable
282
283
  * or user gave limited permission to access the media library.
@@ -1 +0,0 @@
1
- 650f592065589e4007e6c179729c59e138577cebee67e633fb14aeb42817f0aa
@@ -1 +0,0 @@
1
- baee9c33a5d10479e76876096bd9774b2dc7a6b8f73c2527400ff62989933b147a3bb003ef99883b39cb6a47fac491409f2872f08ed23dc194f712e4c0a48e32
@@ -1 +0,0 @@
1
- 972f7bfeadfb1a654e474c2dd2e811ae0da6755125616e429bc0a87a8e78fe6c
@@ -1 +0,0 @@
1
- 758f973274bce8e5fca13db0a83eaae84134d98551993774fb1682b47e447f456c60819e373ad618a534bd7283dce353f17eddcf13a3c37ca38d167f402f9a0b
@@ -1 +0,0 @@
1
- fe55b1bdd05eb68eb7256d95482b4f5e9998e6ec56f3e52a07301ea85aa40baa
@@ -1 +0,0 @@
1
- bc3440ac69afaacbdd499bb6b772a60aa0d9c375bbd271f1af6620f75b8db340c68ec91a743438656113575c951d378f43d28965830c9e782d04c41e247ebf9b
@@ -1 +0,0 @@
1
- 17570e7b37bc74e45fe3dfcaeccdbca1befb058204a58221da1b512eff49db49
@@ -1 +0,0 @@
1
- 6b25b822083eadb73e45ced616cb55f19cc76f57aff32ded161ff31621a9b463bd4141803307202fc196a76821c971a1b2de4591faac59d34a673478686edc2b