@capacitor/camera 8.0.0-dev-2411-20250908T081210.0 → 8.0.0-dev-2431-20251106T155052.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.
package/README.md CHANGED
@@ -143,7 +143,7 @@ with the camera.
143
143
  pickImages(options: GalleryImageOptions) => Promise<GalleryPhotos>
144
144
  ```
145
145
 
146
- Allows the user to pick multiplef pictures from the photo gallery.
146
+ Allows the user to pick multiple pictures from the photo gallery.
147
147
 
148
148
  | Param | Type |
149
149
  | ------------- | ------------------------------------------------------------------- |
@@ -13,7 +13,7 @@ buildscript {
13
13
  google()
14
14
  mavenCentral()
15
15
  maven {
16
- url "https://plugins.gradle.org/m2/"
16
+ url = "https://plugins.gradle.org/m2/"
17
17
  }
18
18
  }
19
19
  dependencies {
@@ -32,7 +32,7 @@ if (System.getenv("CAP_PLUGIN_PUBLISH") == "true") {
32
32
  }
33
33
 
34
34
  android {
35
- namespace "com.capacitorjs.plugins.camera"
35
+ namespace = "com.capacitorjs.plugins.camera"
36
36
  compileSdk project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 36
37
37
  defaultConfig {
38
38
  minSdkVersion project.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion : 24
@@ -48,7 +48,7 @@ android {
48
48
  }
49
49
  }
50
50
  lintOptions {
51
- abortOnError false
51
+ abortOnError = false
52
52
  }
53
53
  compileOptions {
54
54
  sourceCompatibility JavaVersion.VERSION_21
package/dist/docs.json CHANGED
@@ -46,7 +46,7 @@
46
46
  "text": "1.2.0"
47
47
  }
48
48
  ],
49
- "docs": "Allows the user to pick multiplef pictures from the photo gallery.",
49
+ "docs": "Allows the user to pick multiple pictures from the photo gallery.",
50
50
  "complexTypes": [
51
51
  "GalleryPhotos",
52
52
  "GalleryImageOptions"
@@ -17,7 +17,7 @@ export interface CameraPlugin {
17
17
  */
18
18
  getPhoto(options: ImageOptions): Promise<Photo>;
19
19
  /**
20
- * Allows the user to pick multiplef pictures from the photo gallery.
20
+ * Allows the user to pick multiple pictures from the photo gallery.
21
21
  *
22
22
  * @since 1.2.0
23
23
  */
@@ -1 +1 @@
1
- {"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"AAuUA,MAAM,CAAN,IAAY,YAaX;AAbD,WAAY,YAAY;IACtB;;OAEG;IACH,iCAAiB,CAAA;IACjB;;OAEG;IACH,iCAAiB,CAAA;IACjB;;OAEG;IACH,iCAAiB,CAAA;AACnB,CAAC,EAbW,YAAY,KAAZ,YAAY,QAavB;AAED,MAAM,CAAN,IAAY,eAGX;AAHD,WAAY,eAAe;IACzB,gCAAa,CAAA;IACb,kCAAe,CAAA;AACjB,CAAC,EAHW,eAAe,KAAf,eAAe,QAG1B;AAED,MAAM,CAAN,IAAY,gBAIX;AAJD,WAAY,gBAAgB;IAC1B,+BAAW,CAAA;IACX,qCAAiB,CAAA;IACjB,uCAAmB,CAAA;AACrB,CAAC,EAJW,gBAAgB,KAAhB,gBAAgB,QAI3B","sourcesContent":["import type { PermissionState } from '@capacitor/core';\n\nexport type CameraPermissionState = PermissionState | 'limited';\n\nexport type CameraPermissionType = 'camera' | 'photos';\n\nexport interface PermissionStatus {\n camera: CameraPermissionState;\n photos: CameraPermissionState;\n}\n\nexport interface CameraPluginPermissions {\n permissions: CameraPermissionType[];\n}\n\nexport interface CameraPlugin {\n /**\n * Prompt the user to pick a photo from an album, or take a new photo\n * with the camera.\n *\n * @since 1.0.0\n */\n getPhoto(options: ImageOptions): Promise<Photo>;\n\n /**\n * Allows the user to pick multiplef pictures from the photo gallery.\n *\n * @since 1.2.0\n */\n pickImages(options: GalleryImageOptions): Promise<GalleryPhotos>;\n\n /**\n * Allows the user to update their limited photo library selection.\n * Returns all the limited photos after the picker dismissal.\n * If instead the user gave full access to the photos it returns an empty array.\n *\n * @since 4.1.0\n */\n pickLimitedLibraryPhotos(): Promise<GalleryPhotos>;\n /**\n * Return an array of photos selected from the limited photo library.\n *\n * @since 4.1.0\n */\n getLimitedLibraryPhotos(): Promise<GalleryPhotos>;\n\n /**\n * Check camera and photo album permissions\n *\n * @since 1.0.0\n */\n checkPermissions(): Promise<PermissionStatus>;\n\n /**\n * Request camera and photo album permissions\n *\n * @since 1.0.0\n */\n requestPermissions(\n permissions?: CameraPluginPermissions,\n ): Promise<PermissionStatus>;\n}\n\nexport interface ImageOptions {\n /**\n * The quality of image to return as JPEG, from 0-100\n * Note: This option is only supported on Android and iOS\n *\n * @since 1.0.0\n */\n quality?: number;\n /**\n * Whether to allow the user to crop or make small edits (platform specific).\n * On iOS it's only supported for CameraSource.Camera, but not for CameraSource.Photos.\n *\n * @since 1.0.0\n */\n allowEditing?: boolean;\n /**\n * How the data should be returned. Currently, only 'Base64', 'DataUrl' or 'Uri' is supported\n *\n * @since 1.0.0\n */\n resultType: CameraResultType;\n /**\n * Whether to save the photo to the gallery.\n * If the photo was picked from the gallery, it will only be saved if edited.\n * @default: false\n *\n * @since 1.0.0\n */\n saveToGallery?: boolean;\n /**\n * The desired maximum width of the saved image. The aspect ratio is respected.\n *\n * @since 1.0.0\n */\n width?: number;\n /**\n * The desired maximum height of the saved image. The aspect ratio is respected.\n *\n * @since 1.0.0\n */\n height?: number;\n /**\n * Whether to automatically rotate the image \"up\" to correct for orientation\n * in portrait mode\n * @default: true\n *\n * @since 1.0.0\n */\n correctOrientation?: boolean;\n /**\n * The source to get the photo from. By default this prompts the user to select\n * either the photo album or take a photo.\n * @default: CameraSource.Prompt\n *\n * @since 1.0.0\n */\n source?: CameraSource;\n /**\n * iOS and Web only: The camera direction.\n * @default: CameraDirection.Rear\n *\n * @since 1.0.0\n */\n direction?: CameraDirection;\n\n /**\n * iOS only: The presentation style of the Camera.\n * @default: 'fullscreen'\n *\n * @since 1.0.0\n */\n presentationStyle?: 'fullscreen' | 'popover';\n\n /**\n * Web only: Whether to use the PWA Element experience or file input. The\n * default is to use PWA Elements if installed and fall back to file input.\n * To always use file input, set this to `true`.\n *\n * Learn more about PWA Elements: https://capacitorjs.com/docs/web/pwa-elements\n *\n * @since 1.0.0\n */\n webUseInput?: boolean;\n\n /**\n * Text value to use when displaying the prompt.\n * @default: 'Photo'\n *\n * @since 1.0.0\n *\n */\n promptLabelHeader?: string;\n\n /**\n * Text value to use when displaying the prompt.\n * iOS only: The label of the 'cancel' button.\n * @default: 'Cancel'\n *\n * @since 1.0.0\n */\n promptLabelCancel?: string;\n\n /**\n * Text value to use when displaying the prompt.\n * The label of the button to select a saved image.\n * @default: 'From Photos'\n *\n * @since 1.0.0\n */\n promptLabelPhoto?: string;\n\n /**\n * Text value to use when displaying the prompt.\n * The label of the button to open the camera.\n * @default: 'Take Picture'\n *\n * @since 1.0.0\n */\n promptLabelPicture?: string;\n}\n\nexport interface Photo {\n /**\n * The base64 encoded string representation of the image, if using CameraResultType.Base64.\n *\n * @since 1.0.0\n */\n base64String?: string;\n /**\n * The url starting with 'data:image/jpeg;base64,' and the base64 encoded string representation of the image, if using CameraResultType.DataUrl.\n *\n * Note: On web, the file format could change depending on the browser.\n * @since 1.0.0\n */\n dataUrl?: string;\n /**\n * If using CameraResultType.Uri, the path will contain a full,\n * platform-specific file URL that can be read later using the Filesystem API.\n *\n * @since 1.0.0\n */\n path?: string;\n /**\n * webPath returns a path that can be used to set the src attribute of an image for efficient\n * loading and rendering.\n *\n * @since 1.0.0\n */\n webPath?: string;\n /**\n * Exif data, if any, retrieved from the image\n *\n * @since 1.0.0\n */\n exif?: any;\n /**\n * The format of the image, ex: jpeg, png, gif.\n *\n * iOS and Android only support jpeg.\n * Web supports jpeg, png and gif, but the exact availability may vary depending on the browser.\n * gif is only supported if `webUseInput` is set to `true` or if `source` is set to `Photos`.\n *\n * @since 1.0.0\n */\n format: string;\n /**\n * Whether if the image was saved to the gallery or not.\n *\n * On Android and iOS, saving to the gallery can fail if the user didn't\n * grant the required permissions.\n * On Web there is no gallery, so always returns false.\n *\n * @since 1.1.0\n */\n saved: boolean;\n}\n\nexport interface GalleryPhotos {\n /**\n * Array of all the picked photos.\n *\n * @since 1.2.0\n */\n photos: GalleryPhoto[];\n}\n\nexport interface GalleryPhoto {\n /**\n * Full, platform-specific file URL that can be read later using the Filesystem API.\n *\n * @since 1.2.0\n */\n path?: string;\n /**\n * webPath returns a path that can be used to set the src attribute of an image for efficient\n * loading and rendering.\n *\n * @since 1.2.0\n */\n webPath: string;\n /**\n * Exif data, if any, retrieved from the image\n *\n * @since 1.2.0\n */\n exif?: any;\n /**\n * The format of the image, ex: jpeg, png, gif.\n *\n * iOS and Android only support jpeg.\n * Web supports jpeg, png and gif.\n *\n * @since 1.2.0\n */\n format: string;\n}\nexport interface GalleryImageOptions {\n /**\n * The quality of image to return as JPEG, from 0-100\n * Note: This option is only supported on Android and iOS.\n *\n * @since 1.2.0\n */\n quality?: number;\n /**\n * The desired maximum width of the saved image. The aspect ratio is respected.\n *\n * @since 1.2.0\n */\n width?: number;\n /**\n * The desired maximum height of the saved image. The aspect ratio is respected.\n *\n * @since 1.2.0\n */\n height?: number;\n /**\n * Whether to automatically rotate the image \"up\" to correct for orientation\n * in portrait mode\n * @default: true\n *\n * @since 1.2.0\n */\n correctOrientation?: boolean;\n\n /**\n * iOS only: The presentation style of the Camera.\n * @default: 'fullscreen'\n *\n * @since 1.2.0\n */\n presentationStyle?: 'fullscreen' | 'popover';\n\n /**\n * Maximum number of pictures the user will be able to choose.\n * Note: This option is only supported on Android 13+ and iOS.\n *\n * @default 0 (unlimited)\n *\n * @since 1.2.0\n */\n limit?: number;\n}\n\nexport enum CameraSource {\n /**\n * Prompts the user to select either the photo album or take a photo.\n */\n Prompt = 'PROMPT',\n /**\n * Take a new photo using the camera.\n */\n Camera = 'CAMERA',\n /**\n * Pick an existing photo from the gallery or photo album.\n */\n Photos = 'PHOTOS',\n}\n\nexport enum CameraDirection {\n Rear = 'REAR',\n Front = 'FRONT',\n}\n\nexport enum CameraResultType {\n Uri = 'uri',\n Base64 = 'base64',\n DataUrl = 'dataUrl',\n}\n\n/**\n * @deprecated Use `Photo`.\n * @since 1.0.0\n */\nexport type CameraPhoto = Photo;\n\n/**\n * @deprecated Use `ImageOptions`.\n * @since 1.0.0\n */\nexport type CameraOptions = ImageOptions;\n"]}
1
+ {"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"AAuUA,MAAM,CAAN,IAAY,YAaX;AAbD,WAAY,YAAY;IACtB;;OAEG;IACH,iCAAiB,CAAA;IACjB;;OAEG;IACH,iCAAiB,CAAA;IACjB;;OAEG;IACH,iCAAiB,CAAA;AACnB,CAAC,EAbW,YAAY,KAAZ,YAAY,QAavB;AAED,MAAM,CAAN,IAAY,eAGX;AAHD,WAAY,eAAe;IACzB,gCAAa,CAAA;IACb,kCAAe,CAAA;AACjB,CAAC,EAHW,eAAe,KAAf,eAAe,QAG1B;AAED,MAAM,CAAN,IAAY,gBAIX;AAJD,WAAY,gBAAgB;IAC1B,+BAAW,CAAA;IACX,qCAAiB,CAAA;IACjB,uCAAmB,CAAA;AACrB,CAAC,EAJW,gBAAgB,KAAhB,gBAAgB,QAI3B","sourcesContent":["import type { PermissionState } from '@capacitor/core';\n\nexport type CameraPermissionState = PermissionState | 'limited';\n\nexport type CameraPermissionType = 'camera' | 'photos';\n\nexport interface PermissionStatus {\n camera: CameraPermissionState;\n photos: CameraPermissionState;\n}\n\nexport interface CameraPluginPermissions {\n permissions: CameraPermissionType[];\n}\n\nexport interface CameraPlugin {\n /**\n * Prompt the user to pick a photo from an album, or take a new photo\n * with the camera.\n *\n * @since 1.0.0\n */\n getPhoto(options: ImageOptions): Promise<Photo>;\n\n /**\n * Allows the user to pick multiple pictures from the photo gallery.\n *\n * @since 1.2.0\n */\n pickImages(options: GalleryImageOptions): Promise<GalleryPhotos>;\n\n /**\n * Allows the user to update their limited photo library selection.\n * Returns all the limited photos after the picker dismissal.\n * If instead the user gave full access to the photos it returns an empty array.\n *\n * @since 4.1.0\n */\n pickLimitedLibraryPhotos(): Promise<GalleryPhotos>;\n /**\n * Return an array of photos selected from the limited photo library.\n *\n * @since 4.1.0\n */\n getLimitedLibraryPhotos(): Promise<GalleryPhotos>;\n\n /**\n * Check camera and photo album permissions\n *\n * @since 1.0.0\n */\n checkPermissions(): Promise<PermissionStatus>;\n\n /**\n * Request camera and photo album permissions\n *\n * @since 1.0.0\n */\n requestPermissions(\n permissions?: CameraPluginPermissions,\n ): Promise<PermissionStatus>;\n}\n\nexport interface ImageOptions {\n /**\n * The quality of image to return as JPEG, from 0-100\n * Note: This option is only supported on Android and iOS\n *\n * @since 1.0.0\n */\n quality?: number;\n /**\n * Whether to allow the user to crop or make small edits (platform specific).\n * On iOS it's only supported for CameraSource.Camera, but not for CameraSource.Photos.\n *\n * @since 1.0.0\n */\n allowEditing?: boolean;\n /**\n * How the data should be returned. Currently, only 'Base64', 'DataUrl' or 'Uri' is supported\n *\n * @since 1.0.0\n */\n resultType: CameraResultType;\n /**\n * Whether to save the photo to the gallery.\n * If the photo was picked from the gallery, it will only be saved if edited.\n * @default: false\n *\n * @since 1.0.0\n */\n saveToGallery?: boolean;\n /**\n * The desired maximum width of the saved image. The aspect ratio is respected.\n *\n * @since 1.0.0\n */\n width?: number;\n /**\n * The desired maximum height of the saved image. The aspect ratio is respected.\n *\n * @since 1.0.0\n */\n height?: number;\n /**\n * Whether to automatically rotate the image \"up\" to correct for orientation\n * in portrait mode\n * @default: true\n *\n * @since 1.0.0\n */\n correctOrientation?: boolean;\n /**\n * The source to get the photo from. By default this prompts the user to select\n * either the photo album or take a photo.\n * @default: CameraSource.Prompt\n *\n * @since 1.0.0\n */\n source?: CameraSource;\n /**\n * iOS and Web only: The camera direction.\n * @default: CameraDirection.Rear\n *\n * @since 1.0.0\n */\n direction?: CameraDirection;\n\n /**\n * iOS only: The presentation style of the Camera.\n * @default: 'fullscreen'\n *\n * @since 1.0.0\n */\n presentationStyle?: 'fullscreen' | 'popover';\n\n /**\n * Web only: Whether to use the PWA Element experience or file input. The\n * default is to use PWA Elements if installed and fall back to file input.\n * To always use file input, set this to `true`.\n *\n * Learn more about PWA Elements: https://capacitorjs.com/docs/web/pwa-elements\n *\n * @since 1.0.0\n */\n webUseInput?: boolean;\n\n /**\n * Text value to use when displaying the prompt.\n * @default: 'Photo'\n *\n * @since 1.0.0\n *\n */\n promptLabelHeader?: string;\n\n /**\n * Text value to use when displaying the prompt.\n * iOS only: The label of the 'cancel' button.\n * @default: 'Cancel'\n *\n * @since 1.0.0\n */\n promptLabelCancel?: string;\n\n /**\n * Text value to use when displaying the prompt.\n * The label of the button to select a saved image.\n * @default: 'From Photos'\n *\n * @since 1.0.0\n */\n promptLabelPhoto?: string;\n\n /**\n * Text value to use when displaying the prompt.\n * The label of the button to open the camera.\n * @default: 'Take Picture'\n *\n * @since 1.0.0\n */\n promptLabelPicture?: string;\n}\n\nexport interface Photo {\n /**\n * The base64 encoded string representation of the image, if using CameraResultType.Base64.\n *\n * @since 1.0.0\n */\n base64String?: string;\n /**\n * The url starting with 'data:image/jpeg;base64,' and the base64 encoded string representation of the image, if using CameraResultType.DataUrl.\n *\n * Note: On web, the file format could change depending on the browser.\n * @since 1.0.0\n */\n dataUrl?: string;\n /**\n * If using CameraResultType.Uri, the path will contain a full,\n * platform-specific file URL that can be read later using the Filesystem API.\n *\n * @since 1.0.0\n */\n path?: string;\n /**\n * webPath returns a path that can be used to set the src attribute of an image for efficient\n * loading and rendering.\n *\n * @since 1.0.0\n */\n webPath?: string;\n /**\n * Exif data, if any, retrieved from the image\n *\n * @since 1.0.0\n */\n exif?: any;\n /**\n * The format of the image, ex: jpeg, png, gif.\n *\n * iOS and Android only support jpeg.\n * Web supports jpeg, png and gif, but the exact availability may vary depending on the browser.\n * gif is only supported if `webUseInput` is set to `true` or if `source` is set to `Photos`.\n *\n * @since 1.0.0\n */\n format: string;\n /**\n * Whether if the image was saved to the gallery or not.\n *\n * On Android and iOS, saving to the gallery can fail if the user didn't\n * grant the required permissions.\n * On Web there is no gallery, so always returns false.\n *\n * @since 1.1.0\n */\n saved: boolean;\n}\n\nexport interface GalleryPhotos {\n /**\n * Array of all the picked photos.\n *\n * @since 1.2.0\n */\n photos: GalleryPhoto[];\n}\n\nexport interface GalleryPhoto {\n /**\n * Full, platform-specific file URL that can be read later using the Filesystem API.\n *\n * @since 1.2.0\n */\n path?: string;\n /**\n * webPath returns a path that can be used to set the src attribute of an image for efficient\n * loading and rendering.\n *\n * @since 1.2.0\n */\n webPath: string;\n /**\n * Exif data, if any, retrieved from the image\n *\n * @since 1.2.0\n */\n exif?: any;\n /**\n * The format of the image, ex: jpeg, png, gif.\n *\n * iOS and Android only support jpeg.\n * Web supports jpeg, png and gif.\n *\n * @since 1.2.0\n */\n format: string;\n}\nexport interface GalleryImageOptions {\n /**\n * The quality of image to return as JPEG, from 0-100\n * Note: This option is only supported on Android and iOS.\n *\n * @since 1.2.0\n */\n quality?: number;\n /**\n * The desired maximum width of the saved image. The aspect ratio is respected.\n *\n * @since 1.2.0\n */\n width?: number;\n /**\n * The desired maximum height of the saved image. The aspect ratio is respected.\n *\n * @since 1.2.0\n */\n height?: number;\n /**\n * Whether to automatically rotate the image \"up\" to correct for orientation\n * in portrait mode\n * @default: true\n *\n * @since 1.2.0\n */\n correctOrientation?: boolean;\n\n /**\n * iOS only: The presentation style of the Camera.\n * @default: 'fullscreen'\n *\n * @since 1.2.0\n */\n presentationStyle?: 'fullscreen' | 'popover';\n\n /**\n * Maximum number of pictures the user will be able to choose.\n * Note: This option is only supported on Android 13+ and iOS.\n *\n * @default 0 (unlimited)\n *\n * @since 1.2.0\n */\n limit?: number;\n}\n\nexport enum CameraSource {\n /**\n * Prompts the user to select either the photo album or take a photo.\n */\n Prompt = 'PROMPT',\n /**\n * Take a new photo using the camera.\n */\n Camera = 'CAMERA',\n /**\n * Pick an existing photo from the gallery or photo album.\n */\n Photos = 'PHOTOS',\n}\n\nexport enum CameraDirection {\n Rear = 'REAR',\n Front = 'FRONT',\n}\n\nexport enum CameraResultType {\n Uri = 'uri',\n Base64 = 'base64',\n DataUrl = 'dataUrl',\n}\n\n/**\n * @deprecated Use `Photo`.\n * @since 1.0.0\n */\nexport type CameraPhoto = Photo;\n\n/**\n * @deprecated Use `ImageOptions`.\n * @since 1.0.0\n */\nexport type CameraOptions = ImageOptions;\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capacitor/camera",
3
- "version": "8.0.0-dev-2411-20250908T081210.0",
3
+ "version": "8.0.0-dev-2431-20251106T155052.0",
4
4
  "description": "The Camera API provides the ability to take a photo with the camera or choose an existing one from the photo album.",
5
5
  "main": "dist/plugin.cjs.js",
6
6
  "module": "dist/esm/index.js",