@capacitor-mlkit/selfie-segmentation 7.4.0 → 8.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.
@@ -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 = '14.0'
14
+ s.ios.deployment_target = '15.0'
15
15
  s.dependency 'Capacitor'
16
- s.dependency 'GoogleMLKit/SegmentationSelfie', '7.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
@@ -8,6 +8,14 @@ Unofficial Capacitor plugin for [ML Kit Selfie Segmentation](https://developers.
8
8
  </a>
9
9
  </div>
10
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
+
11
19
  ## Installation
12
20
 
13
21
  ```bash
@@ -15,6 +23,8 @@ npm install @capacitor-mlkit/selfie-segmentation
15
23
  npx cap sync
16
24
  ```
17
25
 
26
+ **Attention**: This plugin **only supports CocoaPods** for iOS dependency management. Swift Package Manager (SPM) is not supported for the ML Kit SDK, see [this comment](https://github.com/googlesamples/mlkit/issues/180#issuecomment-1298964099).
27
+
18
28
  ### Android
19
29
 
20
30
  #### Variables
@@ -1,8 +1,8 @@
1
1
  ext {
2
2
  junitVersion = project.hasProperty('junitVersion') ? rootProject.ext.junitVersion : '4.13.2'
3
- androidxAppCompatVersion = project.hasProperty('androidxAppCompatVersion') ? rootProject.ext.androidxAppCompatVersion : '1.7.0'
4
- androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.2.1'
5
- androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.6.1'
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
6
  mlkitSelfieSegmentationVersion = project.hasProperty('mlkitSelfieSegmentationVersion') ? rootProject.ext.mlkitSelfieSegmentationVersion : '16.0.0-beta6'
7
7
  }
8
8
 
@@ -12,18 +12,18 @@ buildscript {
12
12
  mavenCentral()
13
13
  }
14
14
  dependencies {
15
- classpath 'com.android.tools.build:gradle:8.7.2'
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 : 35
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 : 23
26
- targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion : 35
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,7 +35,7 @@ android {
35
35
  }
36
36
  }
37
37
  lintOptions {
38
- abortOnError false
38
+ abortOnError = false
39
39
  }
40
40
  compileOptions {
41
41
  sourceCompatibility JavaVersion.VERSION_21
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"]}
@@ -8,10 +8,10 @@ const SelfieSegmentation = core.registerPlugin('SelfieSegmentation', {
8
8
 
9
9
  class SelfieSegmentationWeb extends core.WebPlugin {
10
10
  async processImage(_options) {
11
- throw this.createUnavailableException();
11
+ throw this.createUnimplementedException();
12
12
  }
13
- createUnavailableException() {
14
- 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);
15
15
  }
16
16
  }
17
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;AAC/C;AACA,IAAI,0BAA0B,GAAG;AACjC,QAAQ,OAAO,IAAIC,uBAAkB,CAAC,2EAA2E,EAAEC,kBAAa,CAAC,WAAW,CAAC;AAC7I;AACA;;;;;;;;;"}
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
 
@@ -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;IAC/C;IACA,IAAI,0BAA0B,GAAG;IACjC,QAAQ,OAAO,IAAIC,uBAAkB,CAAC,2EAA2E,EAAEC,kBAAa,CAAC,WAAW,CAAC;IAC7I;IACA;;;;;;;;;;;;;;;"}
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": "7.4.0",
3
+ "version": "8.0.0",
4
4
  "description": "Capacitor plugin for ML Kit Selfie Segmentation.",
5
5
  "main": "dist/plugin.cjs.js",
6
6
  "module": "dist/esm/index.js",
@@ -56,23 +56,23 @@
56
56
  "prepublishOnly": "npm run build"
57
57
  },
58
58
  "devDependencies": {
59
- "@capacitor/android": "7.0.0",
60
- "@capacitor/cli": "7.0.0",
61
- "@capacitor/core": "7.0.0",
62
- "@capacitor/docgen": "0.3.0",
63
- "@capacitor/ios": "7.0.0",
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
64
  "@ionic/eslint-config": "0.4.0",
65
65
  "@ionic/swiftlint-config": "2.0.0",
66
66
  "eslint": "8.57.0",
67
67
  "prettier": "3.4.2",
68
68
  "prettier-plugin-java": "2.6.7",
69
- "rimraf": "6.0.1",
70
- "rollup": "4.30.1",
69
+ "rimraf": "6.1.2",
70
+ "rollup": "4.53.3",
71
71
  "swiftlint": "2.0.0",
72
- "typescript": "4.1.5"
72
+ "typescript": "5.9.3"
73
73
  },
74
74
  "peerDependencies": {
75
- "@capacitor/core": ">=7.0.0"
75
+ "@capacitor/core": ">=8.0.0"
76
76
  },
77
77
  "swiftlint": "@ionic/swiftlint-config",
78
78
  "eslintConfig": {