expo-image-picker 12.0.2 → 13.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 (45) hide show
  1. package/CHANGELOG.md +31 -1
  2. package/README.md +4 -4
  3. package/android/build.gradle +29 -13
  4. package/android/src/main/AndroidManifest.xml +1 -1
  5. package/android/src/main/java/expo/modules/imagepicker/ImagePickerConstants.kt +2 -0
  6. package/android/src/main/java/expo/modules/imagepicker/ImagePickerModule.kt +6 -2
  7. package/android/src/main/java/expo/modules/imagepicker/ImagePickerUtils.kt +6 -1
  8. package/android/src/main/java/expo/modules/imagepicker/tasks/ImageResultTask.kt +1 -1
  9. package/build/ExponentImagePicker.d.ts +1 -0
  10. package/build/ExponentImagePicker.d.ts.map +1 -0
  11. package/build/ExponentImagePicker.web.d.ts +1 -0
  12. package/build/ExponentImagePicker.web.d.ts.map +1 -0
  13. package/build/ImagePicker.d.ts +8 -7
  14. package/build/ImagePicker.d.ts.map +1 -0
  15. package/build/ImagePicker.js +5 -6
  16. package/build/ImagePicker.js.map +1 -1
  17. package/build/ImagePicker.types.d.ts +81 -17
  18. package/build/ImagePicker.types.d.ts.map +1 -0
  19. package/build/ImagePicker.types.js +72 -10
  20. package/build/ImagePicker.types.js.map +1 -1
  21. package/expo-module.config.json +6 -0
  22. package/ios/{EXImagePicker.podspec → ExpoImagePicker.podspec} +10 -3
  23. package/ios/ImagePickerExceptions.swift +105 -0
  24. package/ios/ImagePickerHandler.swift +72 -0
  25. package/ios/ImagePickerModule.swift +166 -0
  26. package/ios/ImagePickerOptions.swift +170 -0
  27. package/ios/ImagePickerPermissionRequesters.swift +137 -0
  28. package/ios/ImagePickerResponse.swift +68 -0
  29. package/ios/MediaHandler.swift +349 -0
  30. package/ios/StatusBarVisibilityController.swift +52 -0
  31. package/ios/UIImage+fixOrientation.swift +82 -0
  32. package/package.json +4 -3
  33. package/plugin/build/withImagePicker.js +2 -2
  34. package/plugin/src/withImagePicker.ts +9 -11
  35. package/src/ImagePicker.ts +7 -6
  36. package/src/ImagePicker.types.ts +80 -18
  37. package/ios/EXImagePicker/EXImagePicker.h +0 -12
  38. package/ios/EXImagePicker/EXImagePicker.m +0 -632
  39. package/ios/EXImagePicker/Permissions/EXImagePickerCameraPermissionRequester.h +0 -7
  40. package/ios/EXImagePicker/Permissions/EXImagePickerCameraPermissionRequester.m +0 -54
  41. package/ios/EXImagePicker/Permissions/EXImagePickerMediaLibraryPermissionRequester.h +0 -13
  42. package/ios/EXImagePicker/Permissions/EXImagePickerMediaLibraryPermissionRequester.m +0 -84
  43. package/ios/EXImagePicker/Permissions/EXImagePickerMediaLibraryWriteOnlyPermissionRequester.h +0 -7
  44. package/ios/EXImagePicker/Permissions/EXImagePickerMediaLibraryWriteOnlyPermissionRequester.m +0 -21
  45. package/unimodule.json +0 -4
package/CHANGELOG.md CHANGED
@@ -10,7 +10,37 @@
10
10
 
11
11
  ### 💡 Others
12
12
 
13
- ## 12.0.2 — 2022-02-01
13
+ ## 13.0.0 — 2022-04-18
14
+
15
+ ### 🛠 Breaking changes
16
+
17
+ - On Android migrated cropping library from `com.theartofdev.edmodo:android-image-cropper@2.8.0` (available from `jcenter()`) to `com.github.CanHub:Android-Image-Cropper@1.1.1` (available from `jitpack.io`). ([#11647](https://github.com/expo/expo/pull/11647) by [@bbarthec](https://github.com/bbarthec))
18
+
19
+ ### 🎉 New features
20
+
21
+ - Native module on iOS is now written in Swift using the new API. ([#15977](https://github.com/expo/expo/pull/15977) by [@bbarthec](https://github.com/bbarthec))
22
+
23
+ ### 🐛 Bug fixes
24
+
25
+ - Fixed crashes on Android after image is picked by adding missing dependency `expo-image-loader`. ([#17019](https://github.com/expo/expo/pull/17019) by [@M1ST4KE](https://github.com/M1ST4KE))
26
+ - Fix failure on Android when `allowsEditing` is `true` and non-jpeg file picked. ([#16615](https://github.com/expo/expo/pull/16615) by [@mnightingale](https://github.com/mnightingale))
27
+
28
+ ### ⚠ Notices
29
+
30
+ - Deleted the `UIImagePickerPresentationStyle.BlurOverFullScreen` option as it does not work on iOS. ([#16925](https://github.com/expo/expo/pull/16925) by [@barthap](https://github.com/barthap))
31
+ - Deprecated all `PascalCase` values of the `UIImagePickerPresentationStyle` enum. Use their `SNAKE_UPPERCASE` counterparts instead. ([#16925](https://github.com/expo/expo/pull/16925) by [@barthap](https://github.com/barthap))
32
+ - Underlying values of the `UIImagePickerPresentationStyle` are now strings. They were integers before. ([#16925](https://github.com/expo/expo/pull/16925) by [@barthap](https://github.com/barthap))
33
+
34
+ ### 💡 Others
35
+
36
+ - Updated `@expo/config-plugins` from `4.0.2` to `4.0.14` ([#15621](https://github.com/expo/expo/pull/15621) by [@EvanBacon](https://github.com/EvanBacon))
37
+ - Export missing `PermissionResponse` type. ([#15744](https://github.com/expo/expo/pull/15744) by [@Simek](https://github.com/Simek))
38
+
39
+ ### ⚠️ Notices
40
+
41
+ - On Android bump `compileSdkVersion` to `31`, `targetSdkVersion` to `31` and `Java` version to `11`. ([#16941](https://github.com/expo/expo/pull/16941) by [@bbarthec](https://github.com/bbarthec))
42
+
43
+ ## 12.0.2 - 2022-02-01
14
44
 
15
45
  ### 🐛 Bug fixes
16
46
 
package/README.md CHANGED
@@ -4,12 +4,12 @@ Provides access to the system's UI for selecting images and videos from the phon
4
4
 
5
5
  # API documentation
6
6
 
7
- - [Documentation for the master branch](https://github.com/expo/expo/blob/master/docs/pages/versions/unversioned/sdk/imagepicker.md)
8
- - [Documentation for the latest stable release](https://docs.expo.io/versions/latest/sdk/imagepicker/)
7
+ - [Documentation for the main branch](https://github.com/expo/expo/blob/main/docs/pages/versions/unversioned/sdk/imagepicker.md)
8
+ - [Documentation for the latest stable release](https://docs.expo.dev/versions/latest/sdk/imagepicker/)
9
9
 
10
10
  # Installation in managed Expo projects
11
11
 
12
- For managed [managed](https://docs.expo.io/versions/latest/introduction/managed-vs-bare/) Expo projects, please follow the installation instructions in the [API documentation for the latest stable release](https://docs.expo.io/versions/latest/sdk/imagepicker/).
12
+ For [managed](https://docs.expo.dev/versions/latest/introduction/managed-vs-bare/) Expo projects, please follow the installation instructions in the [API documentation for the latest stable release](https://docs.expo.dev/versions/latest/sdk/imagepicker/).
13
13
 
14
14
  # Installation in bare React Native projects
15
15
 
@@ -51,7 +51,7 @@ In `AndroidManifest.xml` add the following `activity` within `application`:
51
51
 
52
52
  ```xml
53
53
  <activity
54
- android:name="com.theartofdev.edmodo.cropper.CropImageActivity"
54
+ android:name="com.canhub.cropper.CropImageActivity"
55
55
  android:theme="@style/Base.Theme.AppCompat">
56
56
  </activity>
57
57
  ```
@@ -3,24 +3,38 @@ apply plugin: 'kotlin-android'
3
3
  apply plugin: 'maven-publish'
4
4
 
5
5
  group = 'host.exp.exponent'
6
- version = '12.0.2'
6
+ version = '13.0.0'
7
7
 
8
8
  buildscript {
9
+ def expoModulesCorePlugin = new File(project(":expo-modules-core").projectDir.absolutePath, "ExpoModulesCorePlugin.gradle")
10
+ if (expoModulesCorePlugin.exists()) {
11
+ apply from: expoModulesCorePlugin
12
+ applyKotlinExpoModulesCorePlugin()
13
+ }
14
+
9
15
  // Simple helper that allows the root project to override versions declared by this library.
10
16
  ext.safeExtGet = { prop, fallback ->
11
17
  rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
12
18
  }
13
19
 
20
+ // Ensures backward compatibility
21
+ ext.getKotlinVersion = {
22
+ if (ext.has("kotlinVersion")) {
23
+ ext.kotlinVersion()
24
+ } else {
25
+ ext.safeExtGet("kotlinVersion", "1.6.10")
26
+ }
27
+ }
28
+
14
29
  repositories {
15
30
  mavenCentral()
16
31
  }
17
32
 
18
33
  dependencies {
19
- classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${safeExtGet('kotlinVersion', '1.4.21')}")
34
+ classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${getKotlinVersion()}")
20
35
  }
21
36
  }
22
37
 
23
-
24
38
  // Creating sources with comments
25
39
  task androidSourcesJar(type: Jar) {
26
40
  classifier = 'sources'
@@ -45,34 +59,36 @@ afterEvaluate {
45
59
  }
46
60
 
47
61
  android {
48
- compileSdkVersion safeExtGet("compileSdkVersion", 30)
62
+ compileSdkVersion safeExtGet("compileSdkVersion", 31)
49
63
 
50
64
  compileOptions {
51
- sourceCompatibility JavaVersion.VERSION_1_8
52
- targetCompatibility JavaVersion.VERSION_1_8
65
+ sourceCompatibility JavaVersion.VERSION_11
66
+ targetCompatibility JavaVersion.VERSION_11
67
+ }
68
+
69
+ kotlinOptions {
70
+ jvmTarget = JavaVersion.VERSION_11.majorVersion
53
71
  }
54
72
 
55
73
  defaultConfig {
56
74
  minSdkVersion safeExtGet("minSdkVersion", 21)
57
- targetSdkVersion safeExtGet("targetSdkVersion", 30)
75
+ targetSdkVersion safeExtGet("targetSdkVersion", 31)
58
76
  versionCode 22
59
- versionName "12.0.2"
77
+ versionName "13.0.0"
60
78
  }
61
79
  lintOptions {
62
80
  abortOnError false
63
81
  }
64
- kotlinOptions {
65
- jvmTarget = JavaVersion.VERSION_1_8
66
- }
67
82
  }
68
83
 
69
84
  dependencies {
70
85
  implementation project(':expo-modules-core')
71
86
 
72
- implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${safeExtGet('kotlinVersion', '1.4.21')}"
87
+ implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${getKotlinVersion()}"
73
88
  implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.3")
74
89
  implementation("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.4.1")
75
- api 'com.theartofdev.edmodo:android-image-cropper:2.8.0'
90
+ implementation "com.github.CanHub:Android-Image-Cropper:1.1.1"
91
+ implementation "androidx.exifinterface:exifinterface:1.3.3"
76
92
  api "androidx.legacy:legacy-support-v4:1.0.0"
77
93
  api 'commons-codec:commons-codec:1.10'
78
94
  api 'commons-io:commons-io:2.6'
@@ -10,7 +10,7 @@
10
10
 
11
11
  <application>
12
12
  <activity
13
- android:name="com.theartofdev.edmodo.cropper.CropImageActivity"
13
+ android:name="com.canhub.cropper.CropImageActivity"
14
14
  android:theme="@style/Base.Theme.AppCompat"/>
15
15
  <!-- https://developer.android.com/guide/topics/manifest/provider-element.html -->
16
16
  <provider
@@ -26,6 +26,8 @@ object ImagePickerConstants {
26
26
  const val COROUTINE_CANCELED = "Coroutine canceled by module destruction."
27
27
  const val PROMISES_CANCELED = "Module destroyed, all promises canceled."
28
28
  const val UNKNOWN_EXCEPTION = "Unknown exception."
29
+ const val ERR_CROPPING_FAILURE = "ERR_CROPPING_FAILURE"
30
+ const val CROPPING_FAILURE_MESSAGE = "Cropping operation failed"
29
31
 
30
32
  const val OPTION_QUALITY = "quality"
31
33
  const val OPTION_ALLOWS_EDITING = "allowsEditing"
@@ -10,7 +10,7 @@ import android.net.Uri
10
10
  import android.os.Bundle
11
11
  import android.provider.MediaStore
12
12
  import android.util.Log
13
- import com.theartofdev.edmodo.cropper.CropImage
13
+ import com.canhub.cropper.CropImage
14
14
  import expo.modules.core.ExportedModule
15
15
  import expo.modules.core.ModuleRegistry
16
16
  import expo.modules.core.ModuleRegistryDelegate
@@ -356,7 +356,11 @@ class ImagePickerModule(
356
356
  val contentResolver = activity.application.contentResolver
357
357
 
358
358
  if (requestCode == CropImage.CROP_IMAGE_ACTIVITY_REQUEST_CODE) {
359
- val result = CropImage.getActivityResult(intent)
359
+ val result = CropImage.getActivityResult(intent).ifNull {
360
+ promise.reject(ImagePickerConstants.ERR_CROPPING_FAILURE, ImagePickerConstants.CROPPING_FAILURE_MESSAGE)
361
+ return
362
+ }
363
+
360
364
  val exporter = CropImageExporter(result.rotation, result.cropRect, pickerOptions.isBase64)
361
365
  ImageResultTask(
362
366
  promise,
@@ -9,6 +9,7 @@ import androidx.core.content.FileProvider
9
9
  import androidx.exifinterface.media.ExifInterface
10
10
  import expo.modules.core.utilities.FileUtilities.generateOutputPath
11
11
  import expo.modules.core.utilities.ifNull
12
+ import expo.modules.imagepicker.ImagePickerConstants.TAG
12
13
  import java.io.File
13
14
  import java.io.IOException
14
15
 
@@ -80,7 +81,11 @@ class ExifDataHandler(private val uri: Uri) {
80
81
  newExif.setAttribute(exifTag, value)
81
82
  }
82
83
  }
83
- newExif.saveAttributes()
84
+ try {
85
+ newExif.saveAttributes()
86
+ } catch (e: IOException) {
87
+ Log.w(TAG, "Couldn't save Exif data: ${e.message}", e)
88
+ }
84
89
  }
85
90
  }
86
91
  }
@@ -64,7 +64,7 @@ open class ImageResultTask(
64
64
  coroutineScope.launch {
65
65
  try {
66
66
  val outputFile = getFile()
67
- if (isEdited) {
67
+ if (isEdited && withExifData) {
68
68
  exifDataHandler?.copyExifData(uri, contentResolver)
69
69
  }
70
70
  val exif = getExifData()
@@ -1,2 +1,3 @@
1
1
  declare const _default: import("expo-modules-core").ProxyNativeModule;
2
2
  export default _default;
3
+ //# sourceMappingURL=ExponentImagePicker.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExponentImagePicker.d.ts","sourceRoot":"","sources":["../src/ExponentImagePicker.ts"],"names":[],"mappings":";AACA,wBAAsD"}
@@ -18,3 +18,4 @@ declare const _default: {
18
18
  requestMediaLibraryPermissionsAsync(_writeOnly: boolean): Promise<PermissionResponse>;
19
19
  };
20
20
  export default _default;
21
+ //# sourceMappingURL=ExponentImagePicker.web.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExponentImagePicker.web.d.ts","sourceRoot":"","sources":["../src/ExponentImagePicker.web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAA8B,MAAM,mBAAmB,CAAC;AAGnF,OAAO,EAGL,yBAAyB,EACzB,iBAAiB,EACjB,gBAAgB,EAEjB,MAAM,qBAAqB,CAAC;;;;;;;QAiBvB,QAAQ,iBAAiB,GAAG,yBAAyB,CAAC;;;;;QAgBtD,QAAQ,iBAAiB,GAAG,yBAAyB,CAAC;;;gDA2BR,OAAO;oDAGH,OAAO,GAAG,QAAQ,kBAAkB,CAAC;;AAvD7F,wBA0DE"}
@@ -1,8 +1,8 @@
1
- import { PermissionStatus, PermissionExpiration, PermissionHookOptions } from 'expo-modules-core';
1
+ import { PermissionStatus, PermissionExpiration, PermissionHookOptions, PermissionResponse } from 'expo-modules-core';
2
2
  import { CameraPermissionResponse, CameraRollPermissionResponse, MediaLibraryPermissionResponse, ImagePickerResult, ImagePickerErrorResult, MediaTypeOptions, ImagePickerOptions, VideoExportPreset, ExpandImagePickerResult, ImageInfo, ImagePickerMultipleResult, ImagePickerCancelledResult, OpenFileBrowserOptions, UIImagePickerControllerQualityType, UIImagePickerPresentationStyle } from './ImagePicker.types';
3
3
  /**
4
4
  * Checks user's permissions for accessing camera.
5
- * @return A promise that fulfills with an object of type [CameraPermissionResponse](#imagepickercamerapermissionresponse).
5
+ * @return A promise that fulfills with an object of type [CameraPermissionResponse](#camerarollpermissionresponse).
6
6
  */
7
7
  export declare function getCameraPermissionsAsync(): Promise<CameraPermissionResponse>;
8
8
  /**
@@ -12,13 +12,13 @@ export declare function getCameraRollPermissionsAsync(): Promise<MediaLibraryPer
12
12
  /**
13
13
  * Checks user's permissions for accessing photos.
14
14
  * @param writeOnly Whether to request write or read and write permissions. Defaults to `false`
15
- * @return A promise that fulfills with an object of type [MediaLibraryPermissionResponse](#imagepickercamerarollpermissionresponse).
15
+ * @return A promise that fulfills with an object of type [MediaLibraryPermissionResponse](#medialibrarypermissionresponse).
16
16
  */
17
17
  export declare function getMediaLibraryPermissionsAsync(writeOnly?: boolean): Promise<MediaLibraryPermissionResponse>;
18
18
  /**
19
19
  * Asks the user to grant permissions for accessing camera. This does nothing on web because the
20
20
  * browser camera is not used.
21
- * @return A promise that fulfills with an object of type [CameraPermissionResponse](#imagepickercamerapermissionresponse).
21
+ * @return A promise that fulfills with an object of type [CameraPermissionResponse](#camerarollpermissionresponse).
22
22
  */
23
23
  export declare function requestCameraPermissionsAsync(): Promise<CameraPermissionResponse>;
24
24
  /**
@@ -28,7 +28,7 @@ export declare function requestCameraRollPermissionsAsync(): Promise<MediaLibrar
28
28
  /**
29
29
  * Asks the user to grant permissions for accessing user's photo. This method does nothing on web.
30
30
  * @param writeOnly Whether to request write or read and write permissions. Defaults to `false`
31
- * @return A promise that fulfills with an object of type [MediaLibraryPermissionResponse](#imagepickercamerarollpermissionresponse).
31
+ * @return A promise that fulfills with an object of type [MediaLibraryPermissionResponse](#medialibrarypermissionresponse).
32
32
  */
33
33
  export declare function requestMediaLibraryPermissionsAsync(writeOnly?: boolean): Promise<MediaLibraryPermissionResponse>;
34
34
  /**
@@ -52,7 +52,7 @@ export declare const useMediaLibraryPermissions: (options?: PermissionHookOption
52
52
  * const [status, requestPermission] = ImagePicker.useCameraPermissions();
53
53
  * ```
54
54
  */
55
- export declare const useCameraPermissions: (options?: PermissionHookOptions<object> | undefined) => [import("expo-modules-core").PermissionResponse | null, () => Promise<import("expo-modules-core").PermissionResponse>, () => Promise<import("expo-modules-core").PermissionResponse>];
55
+ export declare const useCameraPermissions: (options?: PermissionHookOptions<object> | undefined) => [PermissionResponse | null, () => Promise<PermissionResponse>, () => Promise<PermissionResponse>];
56
56
  /**
57
57
  * Android system sometimes kills the `MainActivity` after the `ImagePicker` finishes. When this
58
58
  * happens, we lost the data selected from the `ImagePicker`. However, you can retrieve the lost
@@ -102,4 +102,5 @@ export declare function launchCameraAsync(options?: ImagePickerOptions): Promise
102
102
  * when the item is a video, this method returns `{ cancelled: false, type: 'video', uri, width, height, duration }`.
103
103
  */
104
104
  export declare function launchImageLibraryAsync<T extends ImagePickerOptions>(options?: T): Promise<ExpandImagePickerResult<T>>;
105
- export { MediaTypeOptions, ImagePickerOptions, ImagePickerResult, ImagePickerErrorResult, VideoExportPreset, CameraPermissionResponse, CameraRollPermissionResponse, MediaLibraryPermissionResponse, PermissionStatus, PermissionExpiration, PermissionHookOptions, ImageInfo, ImagePickerMultipleResult, ImagePickerCancelledResult, OpenFileBrowserOptions, ExpandImagePickerResult, UIImagePickerControllerQualityType, UIImagePickerPresentationStyle, };
105
+ export { MediaTypeOptions, ImagePickerOptions, ImagePickerResult, ImagePickerErrorResult, VideoExportPreset, CameraPermissionResponse, CameraRollPermissionResponse, MediaLibraryPermissionResponse, PermissionStatus, PermissionExpiration, PermissionHookOptions, PermissionResponse, ImageInfo, ImagePickerMultipleResult, ImagePickerCancelledResult, OpenFileBrowserOptions, ExpandImagePickerResult, UIImagePickerControllerQualityType, UIImagePickerPresentationStyle, };
106
+ //# sourceMappingURL=ImagePicker.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ImagePicker.d.ts","sourceRoot":"","sources":["../src/ImagePicker.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,oBAAoB,EACpB,qBAAqB,EACrB,kBAAkB,EAInB,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EACL,wBAAwB,EACxB,4BAA4B,EAC5B,8BAA8B,EAC9B,iBAAiB,EACjB,sBAAsB,EACtB,gBAAgB,EAChB,kBAAkB,EAClB,iBAAiB,EACjB,uBAAuB,EACvB,SAAS,EACT,yBAAyB,EACzB,0BAA0B,EAC1B,sBAAsB,EACtB,kCAAkC,EAClC,8BAA8B,EAC/B,MAAM,qBAAqB,CAAC;AAkC7B;;;GAGG;AACH,wBAAsB,yBAAyB,IAAI,OAAO,CAAC,wBAAwB,CAAC,CAEnF;AAED;;GAEG;AACH,wBAAsB,6BAA6B,IAAI,OAAO,CAAC,8BAA8B,CAAC,CAK7F;AAGD;;;;GAIG;AACH,wBAAsB,+BAA+B,CACnD,SAAS,GAAE,OAAe,GACzB,OAAO,CAAC,8BAA8B,CAAC,CAEzC;AAGD;;;;GAIG;AACH,wBAAsB,6BAA6B,IAAI,OAAO,CAAC,wBAAwB,CAAC,CAEvF;AAED;;GAEG;AACH,wBAAsB,iCAAiC,IAAI,OAAO,CAAC,8BAA8B,CAAC,CAKjG;AAGD;;;;GAIG;AACH,wBAAsB,mCAAmC,CACvD,SAAS,GAAE,OAAe,GACzB,OAAO,CAAC,8BAA8B,CAAC,CAGzC;AAGD;;;;;;;;GAQG;AACH,eAAO,MAAM,0BAA0B;;wJAOrC,CAAC;AAGH;;;;;;;;GAQG;AACH,eAAO,MAAM,oBAAoB,4JAG/B,CAAC;AAGH;;;;;;;;;;GAUG;AACH,wBAAsB,qBAAqB,IAAI,OAAO,CACpD,CAAC,iBAAiB,GAAG,sBAAsB,CAAC,EAAE,CAC/C,CAKA;AAGD;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,iBAAiB,CACrC,OAAO,GAAE,kBAAuB,GAC/B,OAAO,CAAC,iBAAiB,CAAC,CAK5B;AAGD;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAsB,uBAAuB,CAAC,CAAC,SAAS,kBAAkB,EACxE,OAAO,CAAC,EAAE,CAAC,GACV,OAAO,CAAC,uBAAuB,CAAC,CAAC,CAAC,CAAC,CAKrC;AAED,OAAO,EACL,gBAAgB,EAChB,kBAAkB,EAClB,iBAAiB,EACjB,sBAAsB,EACtB,iBAAiB,EACjB,wBAAwB,EACxB,4BAA4B,EAC5B,8BAA8B,EAC9B,gBAAgB,EAChB,oBAAoB,EACpB,qBAAqB,EACrB,kBAAkB,EAClB,SAAS,EACT,yBAAyB,EACzB,0BAA0B,EAC1B,sBAAsB,EACtB,uBAAuB,EACvB,kCAAkC,EAClC,8BAA8B,GAC/B,CAAC"}
@@ -20,7 +20,7 @@ function validateOptions(options) {
20
20
  // @needsAudit
21
21
  /**
22
22
  * Checks user's permissions for accessing camera.
23
- * @return A promise that fulfills with an object of type [CameraPermissionResponse](#imagepickercamerapermissionresponse).
23
+ * @return A promise that fulfills with an object of type [CameraPermissionResponse](#camerarollpermissionresponse).
24
24
  */
25
25
  export async function getCameraPermissionsAsync() {
26
26
  return ExponentImagePicker.getCameraPermissionsAsync();
@@ -36,17 +36,16 @@ export async function getCameraRollPermissionsAsync() {
36
36
  /**
37
37
  * Checks user's permissions for accessing photos.
38
38
  * @param writeOnly Whether to request write or read and write permissions. Defaults to `false`
39
- * @return A promise that fulfills with an object of type [MediaLibraryPermissionResponse](#imagepickercamerarollpermissionresponse).
39
+ * @return A promise that fulfills with an object of type [MediaLibraryPermissionResponse](#medialibrarypermissionresponse).
40
40
  */
41
41
  export async function getMediaLibraryPermissionsAsync(writeOnly = false) {
42
- const imagePickerMethod = ExponentImagePicker.getMediaLibraryPermissionsAsync;
43
- return imagePickerMethod(writeOnly);
42
+ return ExponentImagePicker.getMediaLibraryPermissionsAsync(writeOnly);
44
43
  }
45
44
  // @needsAudit
46
45
  /**
47
46
  * Asks the user to grant permissions for accessing camera. This does nothing on web because the
48
47
  * browser camera is not used.
49
- * @return A promise that fulfills with an object of type [CameraPermissionResponse](#imagepickercamerapermissionresponse).
48
+ * @return A promise that fulfills with an object of type [CameraPermissionResponse](#camerarollpermissionresponse).
50
49
  */
51
50
  export async function requestCameraPermissionsAsync() {
52
51
  return ExponentImagePicker.requestCameraPermissionsAsync();
@@ -62,7 +61,7 @@ export async function requestCameraRollPermissionsAsync() {
62
61
  /**
63
62
  * Asks the user to grant permissions for accessing user's photo. This method does nothing on web.
64
63
  * @param writeOnly Whether to request write or read and write permissions. Defaults to `false`
65
- * @return A promise that fulfills with an object of type [MediaLibraryPermissionResponse](#imagepickercamerarollpermissionresponse).
64
+ * @return A promise that fulfills with an object of type [MediaLibraryPermissionResponse](#medialibrarypermissionresponse).
66
65
  */
67
66
  export async function requestMediaLibraryPermissionsAsync(writeOnly = false) {
68
67
  const imagePickerMethod = ExponentImagePicker.requestMediaLibraryPermissionsAsync;
@@ -1 +1 @@
1
- {"version":3,"file":"ImagePicker.js","sourceRoot":"","sources":["../src/ImagePicker.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAGhB,oBAAoB,EACpB,mBAAmB,EACnB,UAAU,GACX,MAAM,mBAAmB,CAAC;AAE3B,OAAO,mBAAmB,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAML,gBAAgB,EAEhB,iBAAiB,EAMjB,kCAAkC,EAClC,8BAA8B,GAC/B,MAAM,q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CAAC,aAAa,EAAE,mBAAmB,CAAC,CAAC;KACnE;IACD,OAAO,MAAM,mBAAmB,CAAC,iBAAiB,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC,CAAC;AAC/E,CAAC;AAED,cAAc;AACd;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,CAAC,KAAK,UAAU,uBAAuB,CAC3C,OAAW;IAEX,IAAI,CAAC,mBAAmB,CAAC,uBAAuB,EAAE;QAChD,MAAM,IAAI,mBAAmB,CAAC,aAAa,EAAE,yBAAyB,CAAC,CAAC;KACzE;IACD,OAAO,MAAM,mBAAmB,CAAC,uBAAuB,CAAC,OAAO,IAAI,EAAE,CAAC,CAAC;AAC1E,CAAC;AAED,OAAO,EACL,gBAAgB,EAIhB,iBAAiB,EAIjB,gBAAgB,EAQhB,kCAAkC,EAClC,8BAA8B,GAC/B,CAAC","sourcesContent":["import {\n PermissionStatus,\n PermissionExpiration,\n PermissionHookOptions,\n createPermissionHook,\n UnavailabilityError,\n CodedError,\n} from 'expo-modules-core';\n\nimport ExponentImagePicker from './ExponentImagePicker';\nimport {\n CameraPermissionResponse,\n CameraRollPermissionResponse,\n MediaLibraryPermissionResponse,\n ImagePickerResult,\n ImagePickerErrorResult,\n MediaTypeOptions,\n ImagePickerOptions,\n VideoExportPreset,\n ExpandImagePickerResult,\n ImageInfo,\n ImagePickerMultipleResult,\n ImagePickerCancelledResult,\n OpenFileBrowserOptions,\n UIImagePickerControllerQualityType,\n UIImagePickerPresentationStyle,\n} from './ImagePicker.types';\n\nfunction validateOptions(options: ImagePickerOptions) {\n const { aspect, quality, videoMaxDuration } = options;\n\n if (aspect != null) {\n const [x, y] = aspect;\n\n if (x <= 0 || y <= 0) {\n throw new CodedError(\n 'ERR_INVALID_ARGUMENT',\n `Invalid aspect ratio values ${x}:${y}. Provide positive numbers.`\n );\n }\n }\n\n if (quality && (quality < 0 || quality > 1)) {\n throw new CodedError(\n 'ERR_INVALID_ARGUMENT',\n `Invalid 'quality' value ${quality}. Provide a value between 0 and 1.`\n );\n }\n\n if (videoMaxDuration && videoMaxDuration < 0) {\n throw new CodedError(\n 'ERR_INVALID_ARGUMENT',\n `Invalid 'videoMaxDuration' value ${videoMaxDuration}. Provide a non-negative number.`\n );\n }\n\n return options;\n}\n\n// @needsAudit\n/**\n * Checks user's permissions for accessing camera.\n * @return A promise that fulfills with an object of type [CameraPermissionResponse](#imagepickercamerapermissionresponse).\n */\nexport async function getCameraPermissionsAsync(): Promise<CameraPermissionResponse> {\n return ExponentImagePicker.getCameraPermissionsAsync();\n}\n\n/**\n * @deprecated Use `getMediaLibraryPermissionsAsync()` instead.\n */\nexport async function getCameraRollPermissionsAsync(): Promise<MediaLibraryPermissionResponse> {\n console.warn(\n 'ImagePicker.getCameraRollPermissionsAsync() is deprecated in favour of ImagePicker.getMediaLibraryPermissionsAsync()'\n );\n return getMediaLibraryPermissionsAsync();\n}\n\n// @needsAudit\n/**\n * Checks user's permissions for accessing photos.\n * @param writeOnly Whether to request write or read and write permissions. Defaults to `false`\n * @return A promise that fulfills with an object of type [MediaLibraryPermissionResponse](#imagepickercamerarollpermissionresponse).\n */\nexport async function getMediaLibraryPermissionsAsync(\n writeOnly: boolean = false\n): Promise<MediaLibraryPermissionResponse> {\n const imagePickerMethod = ExponentImagePicker.getMediaLibraryPermissionsAsync;\n return imagePickerMethod(writeOnly);\n}\n\n// @needsAudit\n/**\n * Asks the user to grant permissions for accessing camera. This does nothing on web because the\n * browser camera is not used.\n * @return A promise that fulfills with an object of type [CameraPermissionResponse](#imagepickercamerapermissionresponse).\n */\nexport async function requestCameraPermissionsAsync(): Promise<CameraPermissionResponse> {\n return ExponentImagePicker.requestCameraPermissionsAsync();\n}\n\n/**\n * @deprecated Use `requestMediaLibraryPermissionsAsync()` instead.\n */\nexport async function requestCameraRollPermissionsAsync(): Promise<MediaLibraryPermissionResponse> {\n console.warn(\n 'ImagePicker.requestCameraRollPermissionsAsync() is deprecated in favour of ImagePicker.requestMediaLibraryPermissionsAsync()'\n );\n return requestMediaLibraryPermissionsAsync();\n}\n\n// @needsAudit\n/**\n * Asks the user to grant permissions for accessing user's photo. This method does nothing on web.\n * @param writeOnly Whether to request write or read and write permissions. Defaults to `false`\n * @return A promise that fulfills with an object of type [MediaLibraryPermissionResponse](#imagepickercamerarollpermissionresponse).\n */\nexport async function requestMediaLibraryPermissionsAsync(\n writeOnly: boolean = false\n): Promise<MediaLibraryPermissionResponse> {\n const imagePickerMethod = ExponentImagePicker.requestMediaLibraryPermissionsAsync;\n return imagePickerMethod(writeOnly);\n}\n\n// @needsAudit\n/**\n * Check or request permissions to access the media library.\n * This uses both `requestMediaLibraryPermissionsAsync` and `getMediaLibraryPermissionsAsync` to interact with the permissions.\n *\n * @example\n * ```ts\n * const [status, requestPermission] = ImagePicker.useMediaLibraryPermissions();\n * ```\n */\nexport const useMediaLibraryPermissions = createPermissionHook<\n MediaLibraryPermissionResponse,\n { writeOnly?: boolean }\n>({\n // TODO(cedric): permission requesters should have an options param or a different requester\n getMethod: (options) => getMediaLibraryPermissionsAsync(options?.writeOnly),\n requestMethod: (options) => requestMediaLibraryPermissionsAsync(options?.writeOnly),\n});\n\n// @needsAudit\n/**\n * Check or request permissions to access the camera.\n * This uses both `requestCameraPermissionsAsync` and `getCameraPermissionsAsync` to interact with the permissions.\n *\n * @example\n * ```ts\n * const [status, requestPermission] = ImagePicker.useCameraPermissions();\n * ```\n */\nexport const useCameraPermissions = createPermissionHook({\n getMethod: getCameraPermissionsAsync,\n requestMethod: requestCameraPermissionsAsync,\n});\n\n// @needsAudit\n/**\n * Android system sometimes kills the `MainActivity` after the `ImagePicker` finishes. When this\n * happens, we lost the data selected from the `ImagePicker`. However, you can retrieve the lost\n * data by calling `getPendingResultAsync`. You can test this functionality by turning on\n * `Don't keep activities` in the developer options.\n * @return\n * - **On Android:** a promise that resolves to an array of objects of exactly same type as in\n * `ImagePicker.launchImageLibraryAsync` or `ImagePicker.launchCameraAsync` if the `ImagePicker`\n * finished successfully. Otherwise, to the array of [`ImagePickerErrorResult`](#imagepickerimagepickererrorresult).\n * - **On other platforms:** an empty array.\n */\nexport async function getPendingResultAsync(): Promise<\n (ImagePickerResult | ImagePickerErrorResult)[]\n> {\n if (ExponentImagePicker.getPendingResultAsync) {\n return ExponentImagePicker.getPendingResultAsync();\n }\n return [];\n}\n\n// @needsAudit\n/**\n * Display the system UI for taking a photo with the camera. Requires `Permissions.CAMERA`.\n * On Android and iOS 10 `Permissions.CAMERA_ROLL` is also required. On mobile web, this must be\n * called immediately in a user interaction like a button press, otherwise the browser will bloc\n * the request without a warning.\n * > **Note:** Make sure that you handle `MainActivity` destruction on **Android**. See [ImagePicker.getPendingResultAsync](#imagepickergetpendingresultasync).\n * > **Notes for Web:** The system UI can only be shown after user activation (e.g. a `Button` press).\n * Therefore, calling `launchCameraAsync` in `componentDidMount`, for example, will **not** work as\n * intended. The `cancelled` event will not be returned in the browser due to platform restrictions\n * and inconsistencies across browsers.\n * @param options An `ImagePickerOptions` object.\n * @return If the user cancelled the action, the method returns `{ cancelled: true }`. Otherwise,\n * this method returns information about the selected media item. When the chosen item is an image,\n * this method returns `{ cancelled: false, type: 'image', uri, width, height, exif, base64 }`;\n * when the item is a video, this method returns `{ cancelled: false, type: 'video', uri, width, height, duration }`.\n */\nexport async function launchCameraAsync(\n options: ImagePickerOptions = {}\n): Promise<ImagePickerResult> {\n if (!ExponentImagePicker.launchCameraAsync) {\n throw new UnavailabilityError('ImagePicker', 'launchCameraAsync');\n }\n return await ExponentImagePicker.launchCameraAsync(validateOptions(options));\n}\n\n// @needsAudit\n/**\n * Display the system UI for choosing an image or a video from the phone's library.\n * Requires `Permissions.MEDIA_LIBRARY` on iOS 10 only. On mobile web, this must be called\n * immediately in a user interaction like a button press, otherwise the browser will block the\n * request without a warning.\n * **Animated GIFs support** If the selected image is an animated GIF, the result image will be an\n * animated GIF too if and only if `quality` is set to `undefined` and `allowsEditing` is set to `false`.\n * Otherwise compression and/or cropper will pick the first frame of the GIF and return it as the\n * result (on Android the result will be a PNG, on iOS — GIF).\n * > **Notes for Web:** The system UI can only be shown after user activation (e.g. a `Button` press).\n * Therefore, calling `launchImageLibraryAsync` in `componentDidMount`, for example, will **not**\n * work as intended. The `cancelled` event will not be returned in the browser due to platform\n * restrictions and inconsistencies across browsers.\n * @param options An object extended by [`ImagePickerOptions`](#imagepickeroptions).\n * @return If the user cancelled the action, the method returns `{ cancelled: true }`. Otherwise,\n * this method returns information about the selected media item. When the chosen item is an image,\n * this method returns `{ cancelled: false, type: 'image', uri, width, height, exif, base64 }`;\n * when the item is a video, this method returns `{ cancelled: false, type: 'video', uri, width, height, duration }`.\n */\nexport async function launchImageLibraryAsync<T extends ImagePickerOptions>(\n options?: T\n): Promise<ExpandImagePickerResult<T>> {\n if (!ExponentImagePicker.launchImageLibraryAsync) {\n throw new UnavailabilityError('ImagePicker', 'launchImageLibraryAsync');\n }\n return await ExponentImagePicker.launchImageLibraryAsync(options ?? {});\n}\n\nexport {\n MediaTypeOptions,\n ImagePickerOptions,\n ImagePickerResult,\n ImagePickerErrorResult,\n VideoExportPreset,\n CameraPermissionResponse,\n CameraRollPermissionResponse,\n MediaLibraryPermissionResponse,\n PermissionStatus,\n PermissionExpiration,\n PermissionHookOptions,\n ImageInfo,\n ImagePickerMultipleResult,\n ImagePickerCancelledResult,\n OpenFileBrowserOptions,\n ExpandImagePickerResult,\n UIImagePickerControllerQualityType,\n UIImagePickerPresentationStyle,\n};\n"]}
1
+ {"version":3,"file":"ImagePicker.js","sourceRoot":"","sources":["../src/ImagePicker.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAIhB,oBAAoB,EACpB,mBAAmB,EACnB,UAAU,GACX,MAAM,mBAAmB,CAAC;AAE3B,OAAO,mBAAmB,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAML,gBAAgB,EAEhB,iBAAiB,EAMjB,kCAAkC,EAClC,8BAA8B,GAC/B,MAAM,qBAAqB,CAAC;AAE7B,SAAS,eAAe,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,iBAAiB,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC,CAAC;AAC/E,CAAC;AAED,cAAc;AACd;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,CAAC,KAAK,UAAU,uBAAuB,CAC3C,OAAW;IAEX,IAAI,CAAC,mBAAmB,CAAC,uBAAuB,EAAE;QAChD,MAAM,IAAI,mBAAmB,CAAC,aAAa,EAAE,yBAAyB,CAAC,CAAC;KACzE;IACD,OAAO,MAAM,mBAAmB,CAAC,uBAAuB,CAAC,OAAO,IAAI,EAAE,CAAC,CAAC;AAC1E,CAAC;AAED,OAAO,EACL,gBAAgB,EAIhB,iBAAiB,EAIjB,gBAAgB,EAShB,kCAAkC,EAClC,8BAA8B,GAC/B,CAAC","sourcesContent":["import {\n PermissionStatus,\n PermissionExpiration,\n PermissionHookOptions,\n PermissionResponse,\n createPermissionHook,\n UnavailabilityError,\n CodedError,\n} from 'expo-modules-core';\n\nimport ExponentImagePicker from './ExponentImagePicker';\nimport {\n CameraPermissionResponse,\n CameraRollPermissionResponse,\n MediaLibraryPermissionResponse,\n ImagePickerResult,\n ImagePickerErrorResult,\n MediaTypeOptions,\n ImagePickerOptions,\n VideoExportPreset,\n ExpandImagePickerResult,\n ImageInfo,\n ImagePickerMultipleResult,\n ImagePickerCancelledResult,\n OpenFileBrowserOptions,\n UIImagePickerControllerQualityType,\n UIImagePickerPresentationStyle,\n} from './ImagePicker.types';\n\nfunction validateOptions(options: ImagePickerOptions) {\n const { aspect, quality, videoMaxDuration } = options;\n\n if (aspect != null) {\n const [x, y] = aspect;\n\n if (x <= 0 || y <= 0) {\n throw new CodedError(\n 'ERR_INVALID_ARGUMENT',\n `Invalid aspect ratio values ${x}:${y}. Provide positive numbers.`\n );\n }\n }\n\n if (quality && (quality < 0 || quality > 1)) {\n throw new CodedError(\n 'ERR_INVALID_ARGUMENT',\n `Invalid 'quality' value ${quality}. Provide a value between 0 and 1.`\n );\n }\n\n if (videoMaxDuration && videoMaxDuration < 0) {\n throw new CodedError(\n 'ERR_INVALID_ARGUMENT',\n `Invalid 'videoMaxDuration' value ${videoMaxDuration}. Provide a non-negative number.`\n );\n }\n\n return options;\n}\n\n// @needsAudit\n/**\n * Checks user's permissions for accessing camera.\n * @return A promise that fulfills with an object of type [CameraPermissionResponse](#camerarollpermissionresponse).\n */\nexport async function getCameraPermissionsAsync(): Promise<CameraPermissionResponse> {\n return ExponentImagePicker.getCameraPermissionsAsync();\n}\n\n/**\n * @deprecated Use `getMediaLibraryPermissionsAsync()` instead.\n */\nexport async function getCameraRollPermissionsAsync(): Promise<MediaLibraryPermissionResponse> {\n console.warn(\n 'ImagePicker.getCameraRollPermissionsAsync() is deprecated in favour of ImagePicker.getMediaLibraryPermissionsAsync()'\n );\n return getMediaLibraryPermissionsAsync();\n}\n\n// @needsAudit\n/**\n * Checks user's permissions for accessing photos.\n * @param writeOnly Whether to request write or read and write permissions. Defaults to `false`\n * @return A promise that fulfills with an object of type [MediaLibraryPermissionResponse](#medialibrarypermissionresponse).\n */\nexport async function getMediaLibraryPermissionsAsync(\n writeOnly: boolean = false\n): Promise<MediaLibraryPermissionResponse> {\n return ExponentImagePicker.getMediaLibraryPermissionsAsync(writeOnly);\n}\n\n// @needsAudit\n/**\n * Asks the user to grant permissions for accessing camera. This does nothing on web because the\n * browser camera is not used.\n * @return A promise that fulfills with an object of type [CameraPermissionResponse](#camerarollpermissionresponse).\n */\nexport async function requestCameraPermissionsAsync(): Promise<CameraPermissionResponse> {\n return ExponentImagePicker.requestCameraPermissionsAsync();\n}\n\n/**\n * @deprecated Use `requestMediaLibraryPermissionsAsync()` instead.\n */\nexport async function requestCameraRollPermissionsAsync(): Promise<MediaLibraryPermissionResponse> {\n console.warn(\n 'ImagePicker.requestCameraRollPermissionsAsync() is deprecated in favour of ImagePicker.requestMediaLibraryPermissionsAsync()'\n );\n return requestMediaLibraryPermissionsAsync();\n}\n\n// @needsAudit\n/**\n * Asks the user to grant permissions for accessing user's photo. This method does nothing on web.\n * @param writeOnly Whether to request write or read and write permissions. Defaults to `false`\n * @return A promise that fulfills with an object of type [MediaLibraryPermissionResponse](#medialibrarypermissionresponse).\n */\nexport async function requestMediaLibraryPermissionsAsync(\n writeOnly: boolean = false\n): Promise<MediaLibraryPermissionResponse> {\n const imagePickerMethod = ExponentImagePicker.requestMediaLibraryPermissionsAsync;\n return imagePickerMethod(writeOnly);\n}\n\n// @needsAudit\n/**\n * Check or request permissions to access the media library.\n * This uses both `requestMediaLibraryPermissionsAsync` and `getMediaLibraryPermissionsAsync` to interact with the permissions.\n *\n * @example\n * ```ts\n * const [status, requestPermission] = ImagePicker.useMediaLibraryPermissions();\n * ```\n */\nexport const useMediaLibraryPermissions = createPermissionHook<\n MediaLibraryPermissionResponse,\n { writeOnly?: boolean }\n>({\n // TODO(cedric): permission requesters should have an options param or a different requester\n getMethod: (options) => getMediaLibraryPermissionsAsync(options?.writeOnly),\n requestMethod: (options) => requestMediaLibraryPermissionsAsync(options?.writeOnly),\n});\n\n// @needsAudit\n/**\n * Check or request permissions to access the camera.\n * This uses both `requestCameraPermissionsAsync` and `getCameraPermissionsAsync` to interact with the permissions.\n *\n * @example\n * ```ts\n * const [status, requestPermission] = ImagePicker.useCameraPermissions();\n * ```\n */\nexport const useCameraPermissions = createPermissionHook({\n getMethod: getCameraPermissionsAsync,\n requestMethod: requestCameraPermissionsAsync,\n});\n\n// @needsAudit\n/**\n * Android system sometimes kills the `MainActivity` after the `ImagePicker` finishes. When this\n * happens, we lost the data selected from the `ImagePicker`. However, you can retrieve the lost\n * data by calling `getPendingResultAsync`. You can test this functionality by turning on\n * `Don't keep activities` in the developer options.\n * @return\n * - **On Android:** a promise that resolves to an array of objects of exactly same type as in\n * `ImagePicker.launchImageLibraryAsync` or `ImagePicker.launchCameraAsync` if the `ImagePicker`\n * finished successfully. Otherwise, to the array of [`ImagePickerErrorResult`](#imagepickerimagepickererrorresult).\n * - **On other platforms:** an empty array.\n */\nexport async function getPendingResultAsync(): Promise<\n (ImagePickerResult | ImagePickerErrorResult)[]\n> {\n if (ExponentImagePicker.getPendingResultAsync) {\n return ExponentImagePicker.getPendingResultAsync();\n }\n return [];\n}\n\n// @needsAudit\n/**\n * Display the system UI for taking a photo with the camera. Requires `Permissions.CAMERA`.\n * On Android and iOS 10 `Permissions.CAMERA_ROLL` is also required. On mobile web, this must be\n * called immediately in a user interaction like a button press, otherwise the browser will bloc\n * the request without a warning.\n * > **Note:** Make sure that you handle `MainActivity` destruction on **Android**. See [ImagePicker.getPendingResultAsync](#imagepickergetpendingresultasync).\n * > **Notes for Web:** The system UI can only be shown after user activation (e.g. a `Button` press).\n * Therefore, calling `launchCameraAsync` in `componentDidMount`, for example, will **not** work as\n * intended. The `cancelled` event will not be returned in the browser due to platform restrictions\n * and inconsistencies across browsers.\n * @param options An `ImagePickerOptions` object.\n * @return If the user cancelled the action, the method returns `{ cancelled: true }`. Otherwise,\n * this method returns information about the selected media item. When the chosen item is an image,\n * this method returns `{ cancelled: false, type: 'image', uri, width, height, exif, base64 }`;\n * when the item is a video, this method returns `{ cancelled: false, type: 'video', uri, width, height, duration }`.\n */\nexport async function launchCameraAsync(\n options: ImagePickerOptions = {}\n): Promise<ImagePickerResult> {\n if (!ExponentImagePicker.launchCameraAsync) {\n throw new UnavailabilityError('ImagePicker', 'launchCameraAsync');\n }\n return await ExponentImagePicker.launchCameraAsync(validateOptions(options));\n}\n\n// @needsAudit\n/**\n * Display the system UI for choosing an image or a video from the phone's library.\n * Requires `Permissions.MEDIA_LIBRARY` on iOS 10 only. On mobile web, this must be called\n * immediately in a user interaction like a button press, otherwise the browser will block the\n * request without a warning.\n * **Animated GIFs support** If the selected image is an animated GIF, the result image will be an\n * animated GIF too if and only if `quality` is set to `undefined` and `allowsEditing` is set to `false`.\n * Otherwise compression and/or cropper will pick the first frame of the GIF and return it as the\n * result (on Android the result will be a PNG, on iOS — GIF).\n * > **Notes for Web:** The system UI can only be shown after user activation (e.g. a `Button` press).\n * Therefore, calling `launchImageLibraryAsync` in `componentDidMount`, for example, will **not**\n * work as intended. The `cancelled` event will not be returned in the browser due to platform\n * restrictions and inconsistencies across browsers.\n * @param options An object extended by [`ImagePickerOptions`](#imagepickeroptions).\n * @return If the user cancelled the action, the method returns `{ cancelled: true }`. Otherwise,\n * this method returns information about the selected media item. When the chosen item is an image,\n * this method returns `{ cancelled: false, type: 'image', uri, width, height, exif, base64 }`;\n * when the item is a video, this method returns `{ cancelled: false, type: 'video', uri, width, height, duration }`.\n */\nexport async function launchImageLibraryAsync<T extends ImagePickerOptions>(\n options?: T\n): Promise<ExpandImagePickerResult<T>> {\n if (!ExponentImagePicker.launchImageLibraryAsync) {\n throw new UnavailabilityError('ImagePicker', 'launchImageLibraryAsync');\n }\n return await ExponentImagePicker.launchImageLibraryAsync(options ?? {});\n}\n\nexport {\n MediaTypeOptions,\n ImagePickerOptions,\n ImagePickerResult,\n ImagePickerErrorResult,\n VideoExportPreset,\n CameraPermissionResponse,\n CameraRollPermissionResponse,\n MediaLibraryPermissionResponse,\n PermissionStatus,\n PermissionExpiration,\n PermissionHookOptions,\n PermissionResponse,\n ImageInfo,\n ImagePickerMultipleResult,\n ImagePickerCancelledResult,\n OpenFileBrowserOptions,\n ExpandImagePickerResult,\n UIImagePickerControllerQualityType,\n UIImagePickerPresentationStyle,\n};\n"]}
@@ -1,13 +1,12 @@
1
1
  import { PermissionResponse } from 'expo-modules-core';
2
2
  /**
3
- * Alias for `PermissionResponse` type exported by `unimodules-permission-interface`.
3
+ * Alias for `PermissionResponse` type exported by `expo-modules-core`.
4
4
  */
5
5
  export declare type CameraPermissionResponse = PermissionResponse;
6
6
  /**
7
- * Extends [PermissionResponse](permissions.md#permissionresponse) type exported by
8
- * `unimodules-permission-interface` and contains additional iOS-specific field.
7
+ * Extends `PermissionResponse` type exported by `expo-modules-core` and contains additional iOS-specific field.
9
8
  */
10
- export declare type MediaLibraryPermissionResponse = CameraPermissionResponse & {
9
+ export declare type MediaLibraryPermissionResponse = PermissionResponse & {
11
10
  /**
12
11
  * @platform ios
13
12
  */
@@ -15,7 +14,7 @@ export declare type MediaLibraryPermissionResponse = CameraPermissionResponse &
15
14
  };
16
15
  /**
17
16
  * An alias for the `MediaLibraryPermissionResponse` object.
18
- * @deprecated Use `ImagePicker.MediaLibraryPermissionResponse`
17
+ * @deprecated Use `ImagePicker.MediaLibraryPermissionResponse` instead.
19
18
  */
20
19
  export declare type CameraRollPermissionResponse = MediaLibraryPermissionResponse;
21
20
  export declare enum MediaTypeOptions {
@@ -126,16 +125,79 @@ export declare enum UIImagePickerControllerQualityType {
126
125
  */
127
126
  IFrame960x540 = 5
128
127
  }
128
+ /**
129
+ * Picker presentation style. Its values are directly mapped to the [`UIModalPresentationStyle`](https://developer.apple.com/documentation/uikit/uiviewcontroller/1621355-modalpresentationstyle).
130
+ *
131
+ * @platform ios
132
+ */
129
133
  export declare enum UIImagePickerPresentationStyle {
130
- FullScreen = 0,
131
- PageSheet = 1,
132
- FormSheet = 2,
133
- CurrentContext = 3,
134
- OverFullScreen = 5,
135
- OverCurrentContext = 6,
136
- Popover = 7,
137
- BlurOverFullScreen = 8,
138
- Automatic = -2
134
+ /**
135
+ * A presentation style in which the presented picker covers the screen.
136
+ */
137
+ FULL_SCREEN = "fullScreen",
138
+ /**
139
+ * A presentation style that partially covers the underlying content.
140
+ */
141
+ PAGE_SHEET = "pageSheet",
142
+ /**
143
+ * A presentation style that displays the picker centered in the screen.
144
+ */
145
+ FORM_SHEET = "formSheet",
146
+ /**
147
+ * A presentation style where the picker is displayed over the app's content.
148
+ */
149
+ CURRENT_CONTEXT = "currentContext",
150
+ /**
151
+ * A presentation style in which the picker view covers the screen.
152
+ */
153
+ OVER_FULL_SCREEN = "overFullScreen",
154
+ /**
155
+ * A presentation style where the picker is displayed over the app's content.
156
+ */
157
+ OVER_CURRENT_CONTEXT = "overCurrentContext",
158
+ /**
159
+ * A presentation style where the picker is displayed in a popover view.
160
+ */
161
+ POPOVER = "popover",
162
+ /**
163
+ * The default presentation style chosen by the system.
164
+ * On older iOS versions, falls back to `WebBrowserPresentationStyle.FullScreen`.
165
+ *
166
+ * @platform ios 13+
167
+ */
168
+ AUTOMATIC = "automatic",
169
+ /**
170
+ * @deprecated Use `UIImagePickerPresentationStyle.FULL_SCREEN` instead.
171
+ */
172
+ FullScreen = "fullScreen",
173
+ /**
174
+ * @deprecated Use `UIImagePickerPresentationStyle.PAGE_SHEET` instead.
175
+ */
176
+ PageSheet = "pageSheet",
177
+ /**
178
+ * @deprecated Use `UIImagePickerPresentationStyle.FORM_SHEET` instead.
179
+ */
180
+ FormSheet = "formSheet",
181
+ /**
182
+ * @deprecated Use `UIImagePickerPresentationStyle.CURRENT_CONTEXT` instead.
183
+ */
184
+ CurrentContext = "currentContext",
185
+ /**
186
+ * @deprecated Use `UIImagePickerPresentationStyle.OVER_FULL_SCREEN` instead.
187
+ */
188
+ OverFullScreen = "overFullScreen",
189
+ /**
190
+ * @deprecated Use `UIImagePickerPresentationStyle.OVER_CURRENT_CONTEXT` instead.
191
+ */
192
+ OverCurrentContext = "overCurrentContext",
193
+ /**
194
+ * @deprecated Use `UIImagePickerPresentationStyle.POPOVER` instead.
195
+ */
196
+ Popover = "popover",
197
+ /**
198
+ * @deprecated Use `UIImagePickerPresentationStyle.AUTOMATIC` instead.
199
+ */
200
+ Automatic = "automatic"
139
201
  }
140
202
  export declare type ImageInfo = {
141
203
  /**
@@ -246,12 +308,13 @@ export declare type ImagePickerOptions = {
246
308
  * Specify preset which will be used to compress selected video.
247
309
  * @default ImagePicker.VideoExportPreset.Passthrough
248
310
  * @platform ios 11+
249
- * @deprecated Deprecate: see [iOS videoExportPreset](https://developer.apple.com/documentation/uikit/uiimagepickercontroller/2890964-videoexportpreset?language=objc)
311
+ * @deprecated See [`videoExportPreset`](https://developer.apple.com/documentation/uikit/uiimagepickercontroller/2890964-videoexportpreset?language=objc)
312
+ * in Apple documentation.
250
313
  */
251
314
  videoExportPreset?: VideoExportPreset;
252
315
  /**
253
- * Specify the quality of recorded videos. Defaults to `ImagePicker.UIImagePickerControllerQualityType.High`,
254
- * which is the highest available for the device.
316
+ * Specify the quality of recorded videos. Defaults to the highest quality available for the device.
317
+ * @default ImagePicker.UIImagePickerControllerQualityType.High
255
318
  * @platform ios
256
319
  */
257
320
  videoQuality?: UIImagePickerControllerQualityType;
@@ -297,3 +360,4 @@ export declare type OpenFileBrowserOptions = {
297
360
  export declare type ExpandImagePickerResult<T extends ImagePickerOptions | OpenFileBrowserOptions> = T extends {
298
361
  allowsMultipleSelection: true;
299
362
  } ? ImagePickerMultipleResult : ImagePickerResult;
363
+ //# sourceMappingURL=ImagePicker.types.d.ts.map
@@ -0,0 +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,oBAAY,wBAAwB,GAAG,kBAAkB,CAAC;AAG1D;;GAEG;AACH,oBAAY,8BAA8B,GAAG,kBAAkB,GAAG;IAChE;;OAEG;IACH,gBAAgB,CAAC,EAAE,KAAK,GAAG,SAAS,GAAG,MAAM,CAAC;CAC/C,CAAC;AAGF;;;GAGG;AACH,oBAAY,4BAA4B,GAAG,8BAA8B,CAAC;AAG1E,oBAAY,gBAAgB;IAC1B;;OAEG;IACH,GAAG,QAAQ;IACX;;OAEG;IACH,MAAM,WAAW;IACjB;;OAEG;IACH,MAAM,WAAW;CAClB;AAGD,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,cAA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