@capacitor-mlkit/selfie-segmentation 6.2.0 → 7.0.0-dev.1765885034

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.
@@ -11,9 +11,9 @@ Pod::Spec.new do |s|
11
11
  s.author = package['author']
12
12
  s.source = { :git => package['repository']['url'], :tag => s.version.to_s }
13
13
  s.source_files = 'ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}'
14
- s.ios.deployment_target = '13.0'
14
+ s.ios.deployment_target = '15.0'
15
15
  s.dependency 'Capacitor'
16
- s.dependency 'GoogleMLKit/SegmentationSelfie', '5.0.0'
16
+ s.dependency 'GoogleMLKit/SegmentationSelfie', '~> 8.0.0'
17
17
  s.swift_version = '5.1'
18
18
  s.static_framework = true
19
19
  end
package/README.md CHANGED
@@ -2,6 +2,20 @@
2
2
 
3
3
  Unofficial Capacitor plugin for [ML Kit Selfie Segmentation](https://developers.google.com/ml-kit/vision/selfie-segmentation).[^1]
4
4
 
5
+ <div class="capawesome-z29o10a">
6
+ <a href="https://cloud.capawesome.io/" target="_blank">
7
+ <img alt="Deliver Live Updates to your Capacitor app with Capawesome Cloud" src="https://cloud.capawesome.io/assets/banners/cloud-deploy-real-time-app-updates.png?t=1" />
8
+ </a>
9
+ </div>
10
+
11
+ ## Compatibility
12
+
13
+ | Plugin Version | Capacitor Version | Status |
14
+ | -------------- | ----------------- | -------------- |
15
+ | 8.x.x | >=8.x.x | Active support |
16
+ | 7.x.x | 7.x.x | Deprecated |
17
+ | 6.x.x | 6.x.x | Deprecated |
18
+
5
19
  ## Installation
6
20
 
7
21
  ```bash
@@ -9,11 +23,25 @@ npm install @capacitor-mlkit/selfie-segmentation
9
23
  npx cap sync
10
24
  ```
11
25
 
26
+ ### Android
27
+
12
28
  #### Variables
13
29
 
14
- This plugin will use the following project variables (defined in your app’s `variables.gradle` file):
30
+ If needed, you can define the following project variable in your app’s `variables.gradle` file to change the default version of the dependency:
31
+
32
+ - `$mlkitSelfieSegmentationVersion` version of `com.google.mlkit:segmentation-selfie` (default: `16.0.0-beta6`)
15
33
 
16
- - `$mlkitSelfieSegmentationVersion` version of `com.google.mlkit:segmentation-selfie` (default: `16.0.0-beta4`)
34
+ This can be useful if you encounter dependency conflicts with other plugins in your project.
35
+
36
+ ### iOS
37
+
38
+ #### Minimum Deployment Target
39
+
40
+ Make sure to set the deployment target in your `ios/App/Podfile` to at least `15.5`:
41
+
42
+ ```ruby
43
+ platform :ios, '15.5'
44
+ ```
17
45
 
18
46
  ## Configuration
19
47
 
@@ -1,9 +1,9 @@
1
1
  ext {
2
2
  junitVersion = project.hasProperty('junitVersion') ? rootProject.ext.junitVersion : '4.13.2'
3
- androidxAppCompatVersion = project.hasProperty('androidxAppCompatVersion') ? rootProject.ext.androidxAppCompatVersion : '1.6.1'
4
- androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.1.5'
5
- androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.5.1'
6
- mlkitSelfieSegmentationVersion = project.hasProperty('mlkitSelfieSegmentationVersion') ? rootProject.ext.mlkitSelfieSegmentationVersion : '16.0.0-beta5'
3
+ androidxAppCompatVersion = project.hasProperty('androidxAppCompatVersion') ? rootProject.ext.androidxAppCompatVersion : '1.7.1'
4
+ androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.3.0'
5
+ androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.7.0'
6
+ mlkitSelfieSegmentationVersion = project.hasProperty('mlkitSelfieSegmentationVersion') ? rootProject.ext.mlkitSelfieSegmentationVersion : '16.0.0-beta6'
7
7
  }
8
8
 
9
9
  buildscript {
@@ -12,18 +12,18 @@ buildscript {
12
12
  mavenCentral()
13
13
  }
14
14
  dependencies {
15
- classpath 'com.android.tools.build:gradle:8.2.1'
15
+ classpath 'com.android.tools.build:gradle:8.13.0'
16
16
  }
17
17
  }
18
18
 
19
19
  apply plugin: 'com.android.library'
20
20
 
21
21
  android {
22
- namespace "io.capawesome.capacitorjs.plugins.mlkit.selfiesegmentation"
23
- compileSdk project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 34
22
+ namespace = "io.capawesome.capacitorjs.plugins.mlkit.selfiesegmentation"
23
+ compileSdk = project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 36
24
24
  defaultConfig {
25
- minSdkVersion project.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion : 22
26
- targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion : 34
25
+ minSdkVersion project.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion : 24
26
+ targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion : 36
27
27
  versionCode 1
28
28
  versionName "1.0"
29
29
  testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
@@ -35,11 +35,11 @@ android {
35
35
  }
36
36
  }
37
37
  lintOptions {
38
- abortOnError false
38
+ abortOnError = false
39
39
  }
40
40
  compileOptions {
41
- sourceCompatibility JavaVersion.VERSION_17
42
- targetCompatibility JavaVersion.VERSION_17
41
+ sourceCompatibility JavaVersion.VERSION_21
42
+ targetCompatibility JavaVersion.VERSION_21
43
43
  }
44
44
  }
45
45
 
@@ -50,83 +50,76 @@ public class SelfieSegmentation {
50
50
 
51
51
  plugin
52
52
  .getActivity()
53
- .runOnUiThread(
54
- () ->
55
- segmenter
56
- .process(inputImage)
57
- .addOnSuccessListener(
58
- segmentationMask -> {
59
- segmenter.close();
60
-
61
- ByteBuffer mask = segmentationMask.getBuffer();
62
-
63
- Bitmap bitmap = inputImage.getBitmapInternal();
64
- Objects.requireNonNull(bitmap).setHasAlpha(true);
65
-
66
- ByteBuffer pixels = ByteBuffer.allocateDirect(bitmap.getAllocationByteCount());
67
- bitmap.copyPixelsToBuffer(pixels);
68
-
69
- final boolean bigEndian = pixels.order() == ByteOrder.BIG_ENDIAN;
70
- final int ALPHA = bigEndian ? 3 : 0;
71
- final int RED = bigEndian ? 2 : 1;
72
- final int GREEN = bigEndian ? 1 : 2;
73
- final int BLUE = bigEndian ? 0 : 3;
74
-
75
- for (int i = 0; i < pixels.capacity() >> 2; i++) {
76
- float confidence = mask.getFloat();
77
-
78
- if (confidence >= threshold) {
79
- byte red = pixels.get((i << 2) + RED);
80
- byte green = pixels.get((i << 2) + GREEN);
81
- byte blue = pixels.get((i << 2) + BLUE);
82
-
83
- pixels.put((i << 2) + ALPHA, (byte) (0xff));
84
- pixels.put((i << 2) + RED, (byte) (red * confidence));
85
- pixels.put((i << 2) + GREEN, (byte) (green * confidence));
86
- pixels.put((i << 2) + BLUE, (byte) (blue * confidence));
87
- } else {
88
- pixels.putInt(i << 2, 0x00000000); // transparent
89
- }
90
- }
91
-
92
- bitmap.copyPixelsFromBuffer(pixels.rewind());
93
-
94
- // Create an image file name
95
- @SuppressLint("SimpleDateFormat")
96
- String timeStamp = new SimpleDateFormat("yyyyMMdd_HHmmss").format(new Date());
97
- String imageFileName = "PNG_" + timeStamp + "_";
98
-
99
- try {
100
- File image = File.createTempFile(imageFileName, ".png");
101
-
102
- OutputStream stream = new FileOutputStream(image);
103
- bitmap.compress(Bitmap.CompressFormat.PNG, 100, stream);
104
- stream.close();
105
-
106
- ProcessImageResult result = new ProcessImageResult(
107
- image.getAbsolutePath(),
108
- bitmap.getWidth(),
109
- bitmap.getHeight()
110
- );
111
-
112
- callback.success(result);
113
- } catch (Exception exception) {
114
- callback.error(exception);
115
- }
53
+ .runOnUiThread(() ->
54
+ segmenter
55
+ .process(inputImage)
56
+ .addOnSuccessListener(segmentationMask -> {
57
+ segmenter.close();
58
+
59
+ ByteBuffer mask = segmentationMask.getBuffer();
60
+
61
+ Bitmap bitmap = inputImage.getBitmapInternal();
62
+ Objects.requireNonNull(bitmap).setHasAlpha(true);
63
+
64
+ ByteBuffer pixels = ByteBuffer.allocateDirect(bitmap.getAllocationByteCount());
65
+ bitmap.copyPixelsToBuffer(pixels);
66
+
67
+ final boolean bigEndian = pixels.order() == ByteOrder.BIG_ENDIAN;
68
+ final int ALPHA = bigEndian ? 3 : 0;
69
+ final int RED = bigEndian ? 2 : 1;
70
+ final int GREEN = bigEndian ? 1 : 2;
71
+ final int BLUE = bigEndian ? 0 : 3;
72
+
73
+ for (int i = 0; i < pixels.capacity() >> 2; i++) {
74
+ float confidence = mask.getFloat();
75
+
76
+ if (confidence >= threshold) {
77
+ byte red = pixels.get((i << 2) + RED);
78
+ byte green = pixels.get((i << 2) + GREEN);
79
+ byte blue = pixels.get((i << 2) + BLUE);
80
+
81
+ pixels.put((i << 2) + ALPHA, (byte) (0xff));
82
+ pixels.put((i << 2) + RED, (byte) (red * confidence));
83
+ pixels.put((i << 2) + GREEN, (byte) (green * confidence));
84
+ pixels.put((i << 2) + BLUE, (byte) (blue * confidence));
85
+ } else {
86
+ pixels.putInt(i << 2, 0x00000000); // transparent
116
87
  }
117
- )
118
- .addOnCanceledListener(
119
- () -> {
120
- segmenter.close();
121
- callback.cancel();
122
- }
123
- )
124
- .addOnFailureListener(
125
- exception -> {
126
- segmenter.close();
127
- callback.error(exception);
128
- }
129
- )
88
+ }
89
+
90
+ bitmap.copyPixelsFromBuffer(pixels.rewind());
91
+
92
+ // Create an image file name
93
+ @SuppressLint("SimpleDateFormat")
94
+ String timeStamp = new SimpleDateFormat("yyyyMMdd_HHmmss").format(new Date());
95
+ String imageFileName = "PNG_" + timeStamp + "_";
96
+
97
+ try {
98
+ File image = File.createTempFile(imageFileName, ".png");
99
+
100
+ OutputStream stream = new FileOutputStream(image);
101
+ bitmap.compress(Bitmap.CompressFormat.PNG, 100, stream);
102
+ stream.close();
103
+
104
+ ProcessImageResult result = new ProcessImageResult(
105
+ image.getAbsolutePath(),
106
+ bitmap.getWidth(),
107
+ bitmap.getHeight()
108
+ );
109
+
110
+ callback.success(result);
111
+ } catch (Exception exception) {
112
+ callback.error(exception);
113
+ }
114
+ })
115
+ .addOnCanceledListener(() -> {
116
+ segmenter.close();
117
+ callback.cancel();
118
+ })
119
+ .addOnFailureListener(exception -> {
120
+ segmenter.close();
121
+ callback.error(exception);
122
+ })
130
123
  );
131
124
  }
132
125
  }
@@ -25,11 +25,12 @@ public class ProcessImageOptions {
25
25
  }
26
26
 
27
27
  private InputImage scaledImage(InputImage inputImage, Integer width, Integer height) {
28
- float scaleX = (width != null) ? width * 1f / inputImage.getWidth() : 0f;
29
- float scaleY = (height != null) ? height * 1f / inputImage.getHeight() : 0f;
28
+ float scaleX = (width != null) ? (width * 1f) / inputImage.getWidth() : 0f;
29
+ float scaleY = (height != null) ? (height * 1f) / inputImage.getHeight() : 0f;
30
30
 
31
31
  if (scaleX > 0f || scaleY > 0f) {
32
- if (scaleX > 0f && scaleY == 0f) scaleY = scaleX; else if (scaleY > 0f && scaleX == 0f) scaleX = scaleY;
32
+ if (scaleX > 0f && scaleY == 0f) scaleY = scaleX;
33
+ else if (scaleY > 0f && scaleX == 0f) scaleX = scaleY;
33
34
 
34
35
  return InputImage.fromBitmap(
35
36
  Bitmap.createScaledBitmap(
package/dist/esm/web.d.ts CHANGED
@@ -2,5 +2,5 @@ import { WebPlugin } from '@capacitor/core';
2
2
  import type { SelfieSegmentationPlugin, ProcessImageOptions, ProcessImageResult } from './definitions';
3
3
  export declare class SelfieSegmentationWeb extends WebPlugin implements SelfieSegmentationPlugin {
4
4
  processImage(_options: ProcessImageOptions): Promise<ProcessImageResult>;
5
- private createUnavailableException;
5
+ private createUnimplementedException;
6
6
  }
package/dist/esm/web.js CHANGED
@@ -1,10 +1,10 @@
1
1
  import { CapacitorException, ExceptionCode, WebPlugin } from '@capacitor/core';
2
2
  export class SelfieSegmentationWeb extends WebPlugin {
3
3
  async processImage(_options) {
4
- throw this.createUnavailableException();
4
+ throw this.createUnimplementedException();
5
5
  }
6
- createUnavailableException() {
7
- return new CapacitorException('This Selfie Segmentation plugin method is not available on this platform.', ExceptionCode.Unavailable);
6
+ createUnimplementedException() {
7
+ return new CapacitorException('This method is not implemented on web.', ExceptionCode.Unimplemented);
8
8
  }
9
9
  }
10
10
  //# sourceMappingURL=web.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAQ/E,MAAM,OAAO,qBACX,SAAQ,SAAS;IAGV,KAAK,CAAC,YAAY,CACvB,QAA6B;QAE7B,MAAM,IAAI,CAAC,0BAA0B,EAAE,CAAC;IAC1C,CAAC;IAEO,0BAA0B;QAChC,OAAO,IAAI,kBAAkB,CAC3B,2EAA2E,EAC3E,aAAa,CAAC,WAAW,CAC1B,CAAC;IACJ,CAAC;CACF","sourcesContent":["import { CapacitorException, ExceptionCode, WebPlugin } from '@capacitor/core';\n\nimport type {\n SelfieSegmentationPlugin,\n ProcessImageOptions,\n ProcessImageResult,\n} from './definitions';\n\nexport class SelfieSegmentationWeb\n extends WebPlugin\n implements SelfieSegmentationPlugin\n{\n public async processImage(\n _options: ProcessImageOptions,\n ): Promise<ProcessImageResult> {\n throw this.createUnavailableException();\n }\n\n private createUnavailableException(): CapacitorException {\n return new CapacitorException(\n 'This Selfie Segmentation plugin method is not available on this platform.',\n ExceptionCode.Unavailable,\n );\n }\n}\n"]}
1
+ {"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAQ/E,MAAM,OAAO,qBACX,SAAQ,SAAS;IAGV,KAAK,CAAC,YAAY,CACvB,QAA6B;QAE7B,MAAM,IAAI,CAAC,4BAA4B,EAAE,CAAC;IAC5C,CAAC;IAEO,4BAA4B;QAClC,OAAO,IAAI,kBAAkB,CAC3B,wCAAwC,EACxC,aAAa,CAAC,aAAa,CAC5B,CAAC;IACJ,CAAC;CACF","sourcesContent":["import { CapacitorException, ExceptionCode, WebPlugin } from '@capacitor/core';\n\nimport type {\n SelfieSegmentationPlugin,\n ProcessImageOptions,\n ProcessImageResult,\n} from './definitions';\n\nexport class SelfieSegmentationWeb\n extends WebPlugin\n implements SelfieSegmentationPlugin\n{\n public async processImage(\n _options: ProcessImageOptions,\n ): Promise<ProcessImageResult> {\n throw this.createUnimplementedException();\n }\n\n private createUnimplementedException(): CapacitorException {\n return new CapacitorException(\n 'This method is not implemented on web.',\n ExceptionCode.Unimplemented,\n );\n }\n}\n"]}
@@ -1,7 +1,5 @@
1
1
  'use strict';
2
2
 
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
3
  var core = require('@capacitor/core');
6
4
 
7
5
  const SelfieSegmentation = core.registerPlugin('SelfieSegmentation', {
@@ -10,10 +8,10 @@ const SelfieSegmentation = core.registerPlugin('SelfieSegmentation', {
10
8
 
11
9
  class SelfieSegmentationWeb extends core.WebPlugin {
12
10
  async processImage(_options) {
13
- throw this.createUnavailableException();
11
+ throw this.createUnimplementedException();
14
12
  }
15
- createUnavailableException() {
16
- return new core.CapacitorException('This Selfie Segmentation plugin method is not available on this platform.', core.ExceptionCode.Unavailable);
13
+ createUnimplementedException() {
14
+ return new core.CapacitorException('This method is not implemented on web.', core.ExceptionCode.Unimplemented);
17
15
  }
18
16
  }
19
17
 
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.cjs.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst SelfieSegmentation = registerPlugin('SelfieSegmentation', {\n web: () => import('./web').then(m => new m.SelfieSegmentationWeb()),\n});\nexport * from './definitions';\nexport { SelfieSegmentation };\n//# sourceMappingURL=index.js.map","import { CapacitorException, ExceptionCode, WebPlugin } from '@capacitor/core';\nexport class SelfieSegmentationWeb extends WebPlugin {\n async processImage(_options) {\n throw this.createUnavailableException();\n }\n createUnavailableException() {\n return new CapacitorException('This Selfie Segmentation plugin method is not available on this platform.', ExceptionCode.Unavailable);\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin","CapacitorException","ExceptionCode"],"mappings":";;;;;;AACK,MAAC,kBAAkB,GAAGA,mBAAc,CAAC,oBAAoB,EAAE;AAChE,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,qBAAqB,EAAE,CAAC;AACvE,CAAC;;ACFM,MAAM,qBAAqB,SAASC,cAAS,CAAC;AACrD,IAAI,MAAM,YAAY,CAAC,QAAQ,EAAE;AACjC,QAAQ,MAAM,IAAI,CAAC,0BAA0B,EAAE,CAAC;AAChD,KAAK;AACL,IAAI,0BAA0B,GAAG;AACjC,QAAQ,OAAO,IAAIC,uBAAkB,CAAC,2EAA2E,EAAEC,kBAAa,CAAC,WAAW,CAAC,CAAC;AAC9I,KAAK;AACL;;;;;;;;;"}
1
+ {"version":3,"file":"plugin.cjs.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst SelfieSegmentation = registerPlugin('SelfieSegmentation', {\n web: () => import('./web').then(m => new m.SelfieSegmentationWeb()),\n});\nexport * from './definitions';\nexport { SelfieSegmentation };\n//# sourceMappingURL=index.js.map","import { CapacitorException, ExceptionCode, WebPlugin } from '@capacitor/core';\nexport class SelfieSegmentationWeb extends WebPlugin {\n async processImage(_options) {\n throw this.createUnimplementedException();\n }\n createUnimplementedException() {\n return new CapacitorException('This method is not implemented on web.', ExceptionCode.Unimplemented);\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin","CapacitorException","ExceptionCode"],"mappings":";;;;AACK,MAAC,kBAAkB,GAAGA,mBAAc,CAAC,oBAAoB,EAAE;AAChE,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,qBAAqB,EAAE,CAAC;AACvE,CAAC;;ACFM,MAAM,qBAAqB,SAASC,cAAS,CAAC;AACrD,IAAI,MAAM,YAAY,CAAC,QAAQ,EAAE;AACjC,QAAQ,MAAM,IAAI,CAAC,4BAA4B,EAAE;AACjD,IAAI;AACJ,IAAI,4BAA4B,GAAG;AACnC,QAAQ,OAAO,IAAIC,uBAAkB,CAAC,wCAAwC,EAAEC,kBAAa,CAAC,aAAa,CAAC;AAC5G,IAAI;AACJ;;;;;;;;;"}
package/dist/plugin.js CHANGED
@@ -7,10 +7,10 @@ var capacitorSelfieSegmentation = (function (exports, core) {
7
7
 
8
8
  class SelfieSegmentationWeb extends core.WebPlugin {
9
9
  async processImage(_options) {
10
- throw this.createUnavailableException();
10
+ throw this.createUnimplementedException();
11
11
  }
12
- createUnavailableException() {
13
- return new core.CapacitorException('This Selfie Segmentation plugin method is not available on this platform.', core.ExceptionCode.Unavailable);
12
+ createUnimplementedException() {
13
+ return new core.CapacitorException('This method is not implemented on web.', core.ExceptionCode.Unimplemented);
14
14
  }
15
15
  }
16
16
 
@@ -21,8 +21,6 @@ var capacitorSelfieSegmentation = (function (exports, core) {
21
21
 
22
22
  exports.SelfieSegmentation = SelfieSegmentation;
23
23
 
24
- Object.defineProperty(exports, '__esModule', { value: true });
25
-
26
24
  return exports;
27
25
 
28
26
  })({}, capacitorExports);
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst SelfieSegmentation = registerPlugin('SelfieSegmentation', {\n web: () => import('./web').then(m => new m.SelfieSegmentationWeb()),\n});\nexport * from './definitions';\nexport { SelfieSegmentation };\n//# sourceMappingURL=index.js.map","import { CapacitorException, ExceptionCode, WebPlugin } from '@capacitor/core';\nexport class SelfieSegmentationWeb extends WebPlugin {\n async processImage(_options) {\n throw this.createUnavailableException();\n }\n createUnavailableException() {\n return new CapacitorException('This Selfie Segmentation plugin method is not available on this platform.', ExceptionCode.Unavailable);\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin","CapacitorException","ExceptionCode"],"mappings":";;;AACK,UAAC,kBAAkB,GAAGA,mBAAc,CAAC,oBAAoB,EAAE;IAChE,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,qBAAqB,EAAE,CAAC;IACvE,CAAC;;ICFM,MAAM,qBAAqB,SAASC,cAAS,CAAC;IACrD,IAAI,MAAM,YAAY,CAAC,QAAQ,EAAE;IACjC,QAAQ,MAAM,IAAI,CAAC,0BAA0B,EAAE,CAAC;IAChD,KAAK;IACL,IAAI,0BAA0B,GAAG;IACjC,QAAQ,OAAO,IAAIC,uBAAkB,CAAC,2EAA2E,EAAEC,kBAAa,CAAC,WAAW,CAAC,CAAC;IAC9I,KAAK;IACL;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"plugin.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst SelfieSegmentation = registerPlugin('SelfieSegmentation', {\n web: () => import('./web').then(m => new m.SelfieSegmentationWeb()),\n});\nexport * from './definitions';\nexport { SelfieSegmentation };\n//# sourceMappingURL=index.js.map","import { CapacitorException, ExceptionCode, WebPlugin } from '@capacitor/core';\nexport class SelfieSegmentationWeb extends WebPlugin {\n async processImage(_options) {\n throw this.createUnimplementedException();\n }\n createUnimplementedException() {\n return new CapacitorException('This method is not implemented on web.', ExceptionCode.Unimplemented);\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin","CapacitorException","ExceptionCode"],"mappings":";;;AACK,UAAC,kBAAkB,GAAGA,mBAAc,CAAC,oBAAoB,EAAE;IAChE,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,qBAAqB,EAAE,CAAC;IACvE,CAAC;;ICFM,MAAM,qBAAqB,SAASC,cAAS,CAAC;IACrD,IAAI,MAAM,YAAY,CAAC,QAAQ,EAAE;IACjC,QAAQ,MAAM,IAAI,CAAC,4BAA4B,EAAE;IACjD,IAAI;IACJ,IAAI,4BAA4B,GAAG;IACnC,QAAQ,OAAO,IAAIC,uBAAkB,CAAC,wCAAwC,EAAEC,kBAAa,CAAC,aAAa,CAAC;IAC5G,IAAI;IACJ;;;;;;;;;;;;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capacitor-mlkit/selfie-segmentation",
3
- "version": "6.2.0",
3
+ "version": "7.0.0-dev.1765885034",
4
4
  "description": "Capacitor plugin for ML Kit Selfie Segmentation.",
5
5
  "main": "dist/plugin.cjs.js",
6
6
  "module": "dist/esm/index.js",
@@ -15,7 +15,6 @@
15
15
  ],
16
16
  "author": "Robin Genz <mail@robingenz.dev>",
17
17
  "license": "Apache-2.0",
18
- "homepage": "https://capawesome.io/",
19
18
  "repository": {
20
19
  "type": "git",
21
20
  "url": "git+https://github.com/capawesome-team/capacitor-mlkit.git"
@@ -33,6 +32,7 @@
33
32
  "url": "https://opencollective.com/capawesome"
34
33
  }
35
34
  ],
35
+ "homepage": "https://capawesome.io/plugins/mlkit/selfie-segmentation/",
36
36
  "keywords": [
37
37
  "capacitor",
38
38
  "plugin",
@@ -49,30 +49,30 @@
49
49
  "prettier": "prettier \"**/*.{css,html,ts,js,java}\"",
50
50
  "swiftlint": "node-swiftlint",
51
51
  "docgen": "docgen --api SelfieSegmentationPlugin --output-readme README.md --output-json dist/docs.json",
52
- "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.js",
52
+ "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.mjs",
53
53
  "clean": "rimraf ./dist",
54
54
  "watch": "tsc --watch",
55
55
  "ios:pod:install": "cd ios && pod install --repo-update && cd ..",
56
56
  "prepublishOnly": "npm run build"
57
57
  },
58
58
  "devDependencies": {
59
- "@capacitor/android": "6.0.0",
60
- "@capacitor/cli": "6.0.0",
61
- "@capacitor/core": "6.0.0",
62
- "@capacitor/docgen": "0.2.1",
63
- "@capacitor/ios": "6.0.0",
64
- "@ionic/eslint-config": "0.3.0",
65
- "@ionic/swiftlint-config": "1.1.2",
66
- "eslint": "7.32.0",
67
- "prettier": "2.3.2",
68
- "prettier-plugin-java": "1.0.2",
69
- "rimraf": "3.0.2",
70
- "rollup": "2.77.2",
71
- "swiftlint": "1.0.1",
72
- "typescript": "4.1.5"
59
+ "@capacitor/android": "8.0.0",
60
+ "@capacitor/cli": "8.0.0",
61
+ "@capacitor/core": "8.0.0",
62
+ "@capacitor/docgen": "0.3.1",
63
+ "@capacitor/ios": "8.0.0",
64
+ "@ionic/eslint-config": "0.4.0",
65
+ "@ionic/swiftlint-config": "2.0.0",
66
+ "eslint": "8.57.0",
67
+ "prettier": "3.4.2",
68
+ "prettier-plugin-java": "2.6.7",
69
+ "rimraf": "6.1.2",
70
+ "rollup": "4.53.3",
71
+ "swiftlint": "2.0.0",
72
+ "typescript": "5.9.3"
73
73
  },
74
74
  "peerDependencies": {
75
- "@capacitor/core": "^6.0.0"
75
+ "@capacitor/core": ">=8.0.0"
76
76
  },
77
77
  "swiftlint": "@ionic/swiftlint-config",
78
78
  "eslintConfig": {