@capgo/camera-preview 7.4.0-beta.8 → 7.4.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 (43) hide show
  1. package/README.md +243 -51
  2. package/android/gradle/wrapper/gradle-wrapper.properties +1 -1
  3. package/android/src/main/java/com/ahm/capacitor/camera/preview/CameraPreview.java +1249 -143
  4. package/android/src/main/java/com/ahm/capacitor/camera/preview/CameraXView.java +3400 -1382
  5. package/android/src/main/java/com/ahm/capacitor/camera/preview/GridOverlayView.java +95 -58
  6. package/android/src/main/java/com/ahm/capacitor/camera/preview/model/CameraDevice.java +55 -46
  7. package/android/src/main/java/com/ahm/capacitor/camera/preview/model/CameraLens.java +61 -52
  8. package/android/src/main/java/com/ahm/capacitor/camera/preview/model/CameraSessionConfiguration.java +160 -72
  9. package/android/src/main/java/com/ahm/capacitor/camera/preview/model/LensInfo.java +29 -23
  10. package/android/src/main/java/com/ahm/capacitor/camera/preview/model/ZoomFactors.java +24 -23
  11. package/dist/docs.json +441 -40
  12. package/dist/esm/definitions.d.ts +167 -25
  13. package/dist/esm/definitions.js.map +1 -1
  14. package/dist/esm/index.d.ts +2 -0
  15. package/dist/esm/index.js +24 -1
  16. package/dist/esm/index.js.map +1 -1
  17. package/dist/esm/web.d.ts +23 -3
  18. package/dist/esm/web.js +463 -65
  19. package/dist/esm/web.js.map +1 -1
  20. package/dist/plugin.cjs.js +485 -64
  21. package/dist/plugin.cjs.js.map +1 -1
  22. package/dist/plugin.js +485 -64
  23. package/dist/plugin.js.map +1 -1
  24. package/ios/Sources/{CapgoCameraPreview → CapgoCameraPreviewPlugin}/CameraController.swift +731 -315
  25. package/ios/Sources/CapgoCameraPreviewPlugin/Plugin.swift +1902 -0
  26. package/package.json +11 -3
  27. package/android/.gradle/8.14.2/checksums/checksums.lock +0 -0
  28. package/android/.gradle/8.14.2/checksums/md5-checksums.bin +0 -0
  29. package/android/.gradle/8.14.2/checksums/sha1-checksums.bin +0 -0
  30. package/android/.gradle/8.14.2/executionHistory/executionHistory.bin +0 -0
  31. package/android/.gradle/8.14.2/executionHistory/executionHistory.lock +0 -0
  32. package/android/.gradle/8.14.2/fileChanges/last-build.bin +0 -0
  33. package/android/.gradle/8.14.2/fileHashes/fileHashes.bin +0 -0
  34. package/android/.gradle/8.14.2/fileHashes/fileHashes.lock +0 -0
  35. package/android/.gradle/8.14.2/fileHashes/resourceHashesCache.bin +0 -0
  36. package/android/.gradle/8.14.2/gc.properties +0 -0
  37. package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
  38. package/android/.gradle/buildOutputCleanup/cache.properties +0 -2
  39. package/android/.gradle/buildOutputCleanup/outputFiles.bin +0 -0
  40. package/android/.gradle/file-system.probe +0 -0
  41. package/android/.gradle/vcs-1/gc.properties +0 -0
  42. package/ios/Sources/CapgoCameraPreview/Plugin.swift +0 -1211
  43. /package/ios/Sources/{CapgoCameraPreview → CapgoCameraPreviewPlugin}/GridOverlayView.swift +0 -0
@@ -4,31 +4,37 @@ package com.ahm.capacitor.camera.preview.model;
4
4
  * Represents lens information for a camera device.
5
5
  */
6
6
  public class LensInfo {
7
- private final float focalLength;
8
- private final String deviceType;
9
- private final float baseZoomRatio;
10
- private final float digitalZoom;
11
7
 
12
- public LensInfo(float focalLength, String deviceType, float baseZoomRatio, float digitalZoom) {
13
- this.focalLength = Math.round(focalLength * 100.0f) / 100.0f;
14
- this.deviceType = deviceType;
15
- this.baseZoomRatio = baseZoomRatio;
16
- this.digitalZoom = digitalZoom;
17
- }
8
+ private final float focalLength;
9
+ private final String deviceType;
10
+ private final float baseZoomRatio;
11
+ private final float digitalZoom;
18
12
 
19
- public float getFocalLength() {
20
- return focalLength;
21
- }
13
+ public LensInfo(
14
+ float focalLength,
15
+ String deviceType,
16
+ float baseZoomRatio,
17
+ float digitalZoom
18
+ ) {
19
+ this.focalLength = Math.round(focalLength * 100.0f) / 100.0f;
20
+ this.deviceType = deviceType;
21
+ this.baseZoomRatio = baseZoomRatio;
22
+ this.digitalZoom = digitalZoom;
23
+ }
22
24
 
23
- public String getDeviceType() {
24
- return deviceType;
25
- }
25
+ public float getFocalLength() {
26
+ return focalLength;
27
+ }
26
28
 
27
- public float getBaseZoomRatio() {
28
- return baseZoomRatio;
29
- }
29
+ public String getDeviceType() {
30
+ return deviceType;
31
+ }
30
32
 
31
- public float getDigitalZoom() {
32
- return digitalZoom;
33
- }
34
- }
33
+ public float getBaseZoomRatio() {
34
+ return baseZoomRatio;
35
+ }
36
+
37
+ public float getDigitalZoom() {
38
+ return digitalZoom;
39
+ }
40
+ }
@@ -4,31 +4,32 @@ package com.ahm.capacitor.camera.preview.model;
4
4
  * Represents zoom factor information for a camera with current lens details.
5
5
  */
6
6
  public class ZoomFactors {
7
- private final float min;
8
- private final float max;
9
- private final float current;
10
- private final LensInfo lens;
11
7
 
12
- public ZoomFactors(float min, float max, float current, LensInfo lens) {
13
- this.min = min;
14
- this.max = max;
15
- this.current = current;
16
- this.lens = lens;
17
- }
8
+ private final float min;
9
+ private final float max;
10
+ private final float current;
11
+ private final LensInfo lens;
18
12
 
19
- public float getMin() {
20
- return min;
21
- }
13
+ public ZoomFactors(float min, float max, float current, LensInfo lens) {
14
+ this.min = min;
15
+ this.max = max;
16
+ this.current = current;
17
+ this.lens = lens;
18
+ }
22
19
 
23
- public float getMax() {
24
- return max;
25
- }
20
+ public float getMin() {
21
+ return min;
22
+ }
26
23
 
27
- public float getCurrent() {
28
- return current;
29
- }
24
+ public float getMax() {
25
+ return max;
26
+ }
30
27
 
31
- public LensInfo getLens() {
32
- return lens;
33
- }
34
- }
28
+ public float getCurrent() {
29
+ return current;
30
+ }
31
+
32
+ public LensInfo getLens() {
33
+ return lens;
34
+ }
35
+ }