@capacitor/text-zoom 8.0.0-alpha.1 → 8.0.0-beta.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/Package.swift CHANGED
@@ -10,7 +10,7 @@ let package = Package(
10
10
  targets: ["TextZoomPlugin"])
11
11
  ],
12
12
  dependencies: [
13
- .package(url: "https://github.com/ionic-team/capacitor-swift-pm.git", from: "7.0.0")
13
+ .package(url: "https://github.com/ionic-team/capacitor-swift-pm.git", from: "8.0.0-beta")
14
14
  ],
15
15
  targets: [
16
16
  .target(
@@ -1,9 +1,9 @@
1
1
  ext {
2
2
  capacitorVersion = System.getenv('CAPACITOR_VERSION')
3
3
  junitVersion = project.hasProperty('junitVersion') ? rootProject.ext.junitVersion : '4.13.2'
4
- androidxAppCompatVersion = project.hasProperty('androidxAppCompatVersion') ? rootProject.ext.androidxAppCompatVersion : '1.7.0'
5
- androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.2.1'
6
- androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.6.1'
4
+ androidxAppCompatVersion = project.hasProperty('androidxAppCompatVersion') ? rootProject.ext.androidxAppCompatVersion : '1.7.1'
5
+ androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.3.0'
6
+ androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.7.0'
7
7
  }
8
8
 
9
9
  buildscript {
@@ -11,11 +11,11 @@ buildscript {
11
11
  google()
12
12
  mavenCentral()
13
13
  maven {
14
- url "https://plugins.gradle.org/m2/"
14
+ url = "https://plugins.gradle.org/m2/"
15
15
  }
16
16
  }
17
17
  dependencies {
18
- classpath 'com.android.tools.build:gradle:8.7.2'
18
+ classpath 'com.android.tools.build:gradle:8.13.0'
19
19
  if (System.getenv("CAP_PLUGIN_PUBLISH") == "true") {
20
20
  classpath 'io.github.gradle-nexus:publish-plugin:1.3.0'
21
21
  }
@@ -30,8 +30,8 @@ if (System.getenv("CAP_PLUGIN_PUBLISH") == "true") {
30
30
  }
31
31
 
32
32
  android {
33
- namespace "com.capacitorjs.plugins.textzoom"
34
- compileSdk project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 36
33
+ namespace = "com.capacitorjs.plugins.textzoom"
34
+ compileSdk = project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 36
35
35
  defaultConfig {
36
36
  minSdkVersion project.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion : 24
37
37
  targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion : 36
@@ -46,7 +46,7 @@ android {
46
46
  }
47
47
  }
48
48
  lintOptions {
49
- abortOnError false
49
+ abortOnError = false
50
50
  }
51
51
  compileOptions {
52
52
  sourceCompatibility JavaVersion.VERSION_21
@@ -26,29 +26,25 @@ public class TextZoomPlugin extends Plugin {
26
26
 
27
27
  @PluginMethod
28
28
  public void get(final PluginCall call) {
29
- mainHandler.post(
30
- () -> {
31
- JSObject ret = new JSObject();
32
- ret.put("value", textZoom.get());
33
- call.resolve(ret);
34
- }
35
- );
29
+ mainHandler.post(() -> {
30
+ JSObject ret = new JSObject();
31
+ ret.put("value", textZoom.get());
32
+ call.resolve(ret);
33
+ });
36
34
  }
37
35
 
38
36
  @PluginMethod
39
37
  public void set(final PluginCall call) {
40
- mainHandler.post(
41
- () -> {
42
- Double value = call.getDouble("value");
43
-
44
- if (value == null) {
45
- call.reject("Invalid integer value.");
46
- } else {
47
- textZoom.set(value);
48
- call.resolve();
49
- }
38
+ mainHandler.post(() -> {
39
+ Double value = call.getDouble("value");
40
+
41
+ if (value == null) {
42
+ call.reject("Invalid integer value.");
43
+ } else {
44
+ textZoom.set(value);
45
+ call.resolve();
50
46
  }
51
- );
47
+ });
52
48
  }
53
49
 
54
50
  @PluginMethod
package/dist/esm/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { registerPlugin } from '@capacitor/core';
2
2
  const TextZoom = registerPlugin('TextZoom', {
3
- ios: () => import('./ios').then(m => new m.TextZoomIOS()),
3
+ ios: () => import('./ios').then((m) => new m.TextZoomIOS()),
4
4
  });
5
5
  export * from './definitions';
6
6
  export { TextZoom };
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAIjD,MAAM,QAAQ,GAAG,cAAc,CAAiB,UAAU,EAAE;IAC1D,GAAG,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,WAAW,EAAE,CAAC;CAC1D,CAAC,CAAC;AAEH,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAE,QAAQ,EAAE,CAAC","sourcesContent":["import { registerPlugin } from '@capacitor/core';\n\nimport type { TextZoomPlugin } from './definitions';\n\nconst TextZoom = registerPlugin<TextZoomPlugin>('TextZoom', {\n ios: () => import('./ios').then(m => new m.TextZoomIOS()),\n});\n\nexport * from './definitions';\nexport { TextZoom };\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAIjD,MAAM,QAAQ,GAAG,cAAc,CAAiB,UAAU,EAAE;IAC1D,GAAG,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,WAAW,EAAE,CAAC;CAC5D,CAAC,CAAC;AAEH,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAE,QAAQ,EAAE,CAAC","sourcesContent":["import { registerPlugin } from '@capacitor/core';\n\nimport type { TextZoomPlugin } from './definitions';\n\nconst TextZoom = registerPlugin<TextZoomPlugin>('TextZoom', {\n ios: () => import('./ios').then((m) => new m.TextZoomIOS()),\n});\n\nexport * from './definitions';\nexport { TextZoom };\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"ios.js","sourceRoot":"","sources":["../../src/ios.ts"],"names":[],"mappings":"AAEA,MAAM,OAAO,WAAW;IAGtB,KAAK,CAAC,GAAG;QACP,MAAM,UAAU,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC;QACjC,MAAM,KAAK,GAAG,IAAI,CAAC,0BAA0B,CAAC,UAAU,CAAC,CAAC;QAE1D,OAAO,EAAE,KAAK,EAAE,CAAC;IACnB,CAAC;IAED,KAAK,CAAC,YAAY;QAChB,MAAM,oCAAoC,CAAC;IAC7C,CAAC;IAED,KAAK,CAAC,GAAG,CAAC,OAAmB;QAC3B,MAAM,GAAG,GAAG,IAAI,CAAC,0BAA0B,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QAC3D,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;IACnB,CAAC;IAED,MAAM;QACJ,IAAI,OAAO,QAAQ,KAAK,WAAW,EAAE;YACnC,OAAO,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,oBAAoB,IAAI,MAAM,CAAC;SAC3D;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,MAAM,CAAC,KAAa;QAClB,IAAI,OAAO,QAAQ,KAAK,WAAW,EAAE;YACnC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,oBAAoB,GAAG,KAAK,CAAC;SAClD;IACH,CAAC;IAED,0BAA0B,CAAC,UAAkB;QAC3C,MAAM,CAAC,GAAG,WAAW,CAAC,eAAe,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QAEvD,IAAI,CAAC,CAAC,EAAE;YACN,OAAO,CAAC,CAAC;SACV;QAED,MAAM,MAAM,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;QAEzC,IAAI,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE;YACxB,OAAO,CAAC,CAAC;SACV;QAED,OAAO,MAAM,GAAG,GAAG,CAAC;IACtB,CAAC;IAED,0BAA0B,CAAC,GAAW;QACpC,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,GAAG,GAAG,CAAC,GAAG,CAAC;IACrC,CAAC;;AAjDe,2BAAe,GAAG,QAAQ,CAAC","sourcesContent":["import type { GetResult, SetOptions, TextZoomPlugin } from './definitions';\n\nexport class TextZoomIOS implements TextZoomPlugin {\n static readonly TEXT_SIZE_REGEX = /(\\d+)%/;\n\n async get(): Promise<GetResult> {\n const percentage = this.getRaw();\n const value = this.textSizePercentageToNumber(percentage);\n\n return { value };\n }\n\n async getPreferred(): Promise<never> {\n throw 'Native implementation will be used';\n }\n\n async set(options: SetOptions): Promise<void> {\n const num = this.textSizeNumberToPercentage(options.value);\n this.setRaw(num);\n }\n\n getRaw(): string {\n if (typeof document !== 'undefined') {\n return document.body.style.webkitTextSizeAdjust || '100%';\n }\n return '100%';\n }\n\n setRaw(value: string): void {\n if (typeof document !== 'undefined') {\n document.body.style.webkitTextSizeAdjust = value;\n }\n }\n\n textSizePercentageToNumber(percentage: string): number {\n const m = TextZoomIOS.TEXT_SIZE_REGEX.exec(percentage);\n\n if (!m) {\n return 1;\n }\n\n const parsed = Number.parseInt(m[1], 10);\n\n if (Number.isNaN(parsed)) {\n return 1;\n }\n\n return parsed / 100;\n }\n\n textSizeNumberToPercentage(num: number): string {\n return `${Math.round(num * 100)}%`;\n }\n}\n"]}
1
+ {"version":3,"file":"ios.js","sourceRoot":"","sources":["../../src/ios.ts"],"names":[],"mappings":"AAEA,MAAM,OAAO,WAAW;IAGtB,KAAK,CAAC,GAAG;QACP,MAAM,UAAU,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC;QACjC,MAAM,KAAK,GAAG,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GAAG,QAAQ,CAAC","sourcesContent":["import type { GetResult, SetOptions, TextZoomPlugin } from './definitions';\n\nexport class TextZoomIOS implements TextZoomPlugin {\n static readonly TEXT_SIZE_REGEX = /(\\d+)%/;\n\n async get(): Promise<GetResult> {\n const percentage = this.getRaw();\n const value = this.textSizePercentageToNumber(percentage);\n\n return { value };\n }\n\n async getPreferred(): Promise<never> {\n throw 'Native implementation will be used';\n }\n\n async set(options: SetOptions): Promise<void> {\n const num = this.textSizeNumberToPercentage(options.value);\n this.setRaw(num);\n }\n\n getRaw(): string {\n if (typeof document !== 'undefined') {\n return document.body.style.webkitTextSizeAdjust || '100%';\n }\n return '100%';\n }\n\n setRaw(value: string): void {\n if (typeof document !== 'undefined') {\n document.body.style.webkitTextSizeAdjust = value;\n }\n }\n\n textSizePercentageToNumber(percentage: string): number {\n const m = TextZoomIOS.TEXT_SIZE_REGEX.exec(percentage);\n\n if (!m) {\n return 1;\n }\n\n const parsed = Number.parseInt(m[1], 10);\n\n if (Number.isNaN(parsed)) {\n return 1;\n }\n\n return parsed / 100;\n }\n\n textSizeNumberToPercentage(num: number): string {\n return `${Math.round(num * 100)}%`;\n }\n}\n"]}
@@ -3,7 +3,7 @@
3
3
  var core = require('@capacitor/core');
4
4
 
5
5
  const TextZoom = core.registerPlugin('TextZoom', {
6
- ios: () => Promise.resolve().then(function () { return ios; }).then(m => new m.TextZoomIOS()),
6
+ ios: () => Promise.resolve().then(function () { return ios; }).then((m) => new m.TextZoomIOS()),
7
7
  });
8
8
 
9
9
  class TextZoomIOS {
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.cjs.js","sources":["esm/index.js","esm/ios.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst TextZoom = registerPlugin('TextZoom', {\n ios: () => import('./ios').then(m => new m.TextZoomIOS()),\n});\nexport * from './definitions';\nexport { TextZoom };\n//# sourceMappingURL=index.js.map","export class TextZoomIOS {\n async get() {\n const percentage = this.getRaw();\n const value = this.textSizePercentageToNumber(percentage);\n return { value };\n }\n async getPreferred() {\n throw 'Native implementation will be used';\n }\n async set(options) {\n const num = this.textSizeNumberToPercentage(options.value);\n this.setRaw(num);\n }\n getRaw() {\n if (typeof document !== 'undefined') {\n return document.body.style.webkitTextSizeAdjust || '100%';\n }\n return '100%';\n }\n setRaw(value) {\n if (typeof document !== 'undefined') {\n document.body.style.webkitTextSizeAdjust = value;\n }\n }\n textSizePercentageToNumber(percentage) {\n const m = TextZoomIOS.TEXT_SIZE_REGEX.exec(percentage);\n if (!m) {\n return 1;\n }\n const parsed = Number.parseInt(m[1], 10);\n if (Number.isNaN(parsed)) {\n return 1;\n }\n return parsed / 100;\n }\n textSizeNumberToPercentage(num) {\n return `${Math.round(num * 100)}%`;\n }\n}\nTextZoomIOS.TEXT_SIZE_REGEX = /(\\d+)%/;\n//# sourceMappingURL=ios.js.map"],"names":["registerPlugin"],"mappings":";;;;AACK,MAAC,QAAQ,GAAGA,mBAAc,CAAC,UAAU,EAAE;AAC5C,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,WAAW,EAAE,CAAC;AAC7D,CAAC;;ACHM,MAAM,WAAW,CAAC;AACzB,IAAI,MAAM,GAAG,GAAG;AAChB,QAAQ,MAAM,UAAU,GAAG,IAAI,CAAC,MAAM,EAAE;AACxC,QAAQ,MAAM,KAAK,GAAG,IAAI,CAAC,0BAA0B,CAAC,UAAU,CAAC;AACjE,QAAQ,OAAO,EAAE,KAAK,EAAE;AACxB,IAAI;AACJ,IAAI,MAAM,YAAY,GAAG;AACzB,QAAQ,MAAM,oCAAoC;AAClD,IAAI;AACJ,IAAI,MAAM,GAAG,CAAC,OAAO,EAAE;AACvB,QAAQ,MAAM,GAAG,GAAG,IAAI,CAAC,0BAA0B,CAAC,OAAO,CAAC,KAAK,CAAC;AAClE,QAAQ,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC;AACxB,IAAI;AACJ,IAAI,MAAM,GAAG;AACb,QAAQ,IAAI,OAAO,QAAQ,KAAK,WAAW,EAAE;AAC7C,YAAY,OAAO,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,oBAAoB,IAAI,MAAM;AACrE,QAAQ;AACR,QAAQ,OAAO,MAAM;AACrB,IAAI;AACJ,IAAI,MAAM,CAAC,KAAK,EAAE;AAClB,QAAQ,IAAI,OAAO,QAAQ,KAAK,WAAW,EAAE;AAC7C,YAAY,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,oBAAoB,GAAG,KAAK;AAC5D,QAAQ;AACR,IAAI;AACJ,IAAI,0BAA0B,CAAC,UAAU,EAAE;AAC3C,QAAQ,MAAM,CAAC,GAAG,WAAW,CAAC,eAAe,CAAC,IAAI,CAAC,UAAU,CAAC;AAC9D,QAAQ,IAAI,CAAC,CAAC,EAAE;AAChB,YAAY,OAAO,CAAC;AACpB,QAAQ;AACR,QAAQ,MAAM,MAAM,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;AAChD,QAAQ,IAAI,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE;AAClC,YAAY,OAAO,CAAC;AACpB,QAAQ;AACR,QAAQ,OAAO,MAAM,GAAG,GAAG;AAC3B,IAAI;AACJ,IAAI,0BAA0B,CAAC,GAAG,EAAE;AACpC,QAAQ,OAAO,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,GAAG,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC;AAC1C,IAAI;AACJ;AACA,WAAW,CAAC,eAAe,GAAG,QAAQ;;;;;;;;;"}
1
+ {"version":3,"file":"plugin.cjs.js","sources":["esm/index.js","esm/ios.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst TextZoom = registerPlugin('TextZoom', {\n ios: () => import('./ios').then((m) => new m.TextZoomIOS()),\n});\nexport * from './definitions';\nexport { TextZoom };\n//# sourceMappingURL=index.js.map","export class TextZoomIOS {\n async get() {\n const percentage = this.getRaw();\n const value = this.textSizePercentageToNumber(percentage);\n return { value };\n }\n async getPreferred() {\n throw 'Native implementation will be used';\n }\n async set(options) {\n const num = this.textSizeNumberToPercentage(options.value);\n this.setRaw(num);\n }\n getRaw() {\n if (typeof document !== 'undefined') {\n return document.body.style.webkitTextSizeAdjust || '100%';\n }\n return '100%';\n }\n setRaw(value) {\n if (typeof document !== 'undefined') {\n document.body.style.webkitTextSizeAdjust = value;\n }\n }\n textSizePercentageToNumber(percentage) {\n const m = TextZoomIOS.TEXT_SIZE_REGEX.exec(percentage);\n if (!m) {\n return 1;\n }\n const parsed = Number.parseInt(m[1], 10);\n if (Number.isNaN(parsed)) {\n return 1;\n }\n return parsed / 100;\n }\n textSizeNumberToPercentage(num) {\n return `${Math.round(num * 100)}%`;\n }\n}\nTextZoomIOS.TEXT_SIZE_REGEX = /(\\d+)%/;\n//# sourceMappingURL=ios.js.map"],"names":["registerPlugin"],"mappings":";;;;AACK,MAAC,QAAQ,GAAGA,mBAAc,CAAC,UAAU,EAAE;AAC5C,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,WAAW,EAAE,CAAC;AAC/D,CAAC;;ACHM,MAAM,WAAW,CAAC;AACzB,IAAI,MAAM,GAAG,GAAG;AAChB,QAAQ,MAAM,UAAU,GAAG,IAAI,CAAC,MAAM,EAAE;AACxC,QAAQ,MAAM,KAAK,GAAG,IAAI,CAAC,0BAA0B,CAAC,UAAU,CAAC;AACjE,QAAQ,OAAO,EAAE,KAAK,EAAE;AACxB,IAAI;AACJ,IAAI,MAAM,YAAY,GAAG;AACzB,QAAQ,MAAM,oCAAoC;AAClD,IAAI;AACJ,IAAI,MAAM,GAAG,CAAC,OAAO,EAAE;AACvB,QAAQ,MAAM,GAAG,GAAG,IAAI,CAAC,0BAA0B,CAAC,OAAO,CAAC,KAAK,CAAC;AAClE,QAAQ,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC;AACxB,IAAI;AACJ,IAAI,MAAM,GAAG;AACb,QAAQ,IAAI,OAAO,QAAQ,KAAK,WAAW,EAAE;AAC7C,YAAY,OAAO,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,oBAAoB,IAAI,MAAM;AACrE,QAAQ;AACR,QAAQ,OAAO,MAAM;AACrB,IAAI;AACJ,IAAI,MAAM,CAAC,KAAK,EAAE;AAClB,QAAQ,IAAI,OAAO,QAAQ,KAAK,WAAW,EAAE;AAC7C,YAAY,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,oBAAoB,GAAG,KAAK;AAC5D,QAAQ;AACR,IAAI;AACJ,IAAI,0BAA0B,CAAC,UAAU,EAAE;AAC3C,QAAQ,MAAM,CAAC,GAAG,WAAW,CAAC,eAAe,CAAC,IAAI,CAAC,UAAU,CAAC;AAC9D,QAAQ,IAAI,CAAC,CAAC,EAAE;AAChB,YAAY,OAAO,CAAC;AACpB,QAAQ;AACR,QAAQ,MAAM,MAAM,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;AAChD,QAAQ,IAAI,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE;AAClC,YAAY,OAAO,CAAC;AACpB,QAAQ;AACR,QAAQ,OAAO,MAAM,GAAG,GAAG;AAC3B,IAAI;AACJ,IAAI,0BAA0B,CAAC,GAAG,EAAE;AACpC,QAAQ,OAAO,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,GAAG,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC;AAC1C,IAAI;AACJ;AACA,WAAW,CAAC,eAAe,GAAG,QAAQ;;;;;;;;;"}
package/dist/plugin.js CHANGED
@@ -2,7 +2,7 @@ var capacitorTextZoom = (function (exports, core) {
2
2
  'use strict';
3
3
 
4
4
  const TextZoom = core.registerPlugin('TextZoom', {
5
- ios: () => Promise.resolve().then(function () { return ios; }).then(m => new m.TextZoomIOS()),
5
+ ios: () => Promise.resolve().then(function () { return ios; }).then((m) => new m.TextZoomIOS()),
6
6
  });
7
7
 
8
8
  class TextZoomIOS {
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.js","sources":["esm/index.js","esm/ios.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst TextZoom = registerPlugin('TextZoom', {\n ios: () => import('./ios').then(m => new m.TextZoomIOS()),\n});\nexport * from './definitions';\nexport { TextZoom };\n//# sourceMappingURL=index.js.map","export class TextZoomIOS {\n async get() {\n const percentage = this.getRaw();\n const value = this.textSizePercentageToNumber(percentage);\n return { value };\n }\n async getPreferred() {\n throw 'Native implementation will be used';\n }\n async set(options) {\n const num = this.textSizeNumberToPercentage(options.value);\n this.setRaw(num);\n }\n getRaw() {\n if (typeof document !== 'undefined') {\n return document.body.style.webkitTextSizeAdjust || '100%';\n }\n return '100%';\n }\n setRaw(value) {\n if (typeof document !== 'undefined') {\n document.body.style.webkitTextSizeAdjust = value;\n }\n }\n textSizePercentageToNumber(percentage) {\n const m = TextZoomIOS.TEXT_SIZE_REGEX.exec(percentage);\n if (!m) {\n return 1;\n }\n const parsed = Number.parseInt(m[1], 10);\n if (Number.isNaN(parsed)) {\n return 1;\n }\n return parsed / 100;\n }\n textSizeNumberToPercentage(num) {\n return `${Math.round(num * 100)}%`;\n }\n}\nTextZoomIOS.TEXT_SIZE_REGEX = /(\\d+)%/;\n//# sourceMappingURL=ios.js.map"],"names":["registerPlugin"],"mappings":";;;AACK,UAAC,QAAQ,GAAGA,mBAAc,CAAC,UAAU,EAAE;IAC5C,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,WAAW,EAAE,CAAC;IAC7D,CAAC;;ICHM,MAAM,WAAW,CAAC;IACzB,IAAI,MAAM,GAAG,GAAG;IAChB,QAAQ,MAAM,UAAU,GAAG,IAAI,CAAC,MAAM,EAAE;IACxC,QAAQ,MAAM,KAAK,GAAG,IAAI,CA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,CAAC,KAAK,CAAC,GAAG,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC;IAC1C,IAAI;IACJ;IACA,WAAW,CAAC,eAAe,GAAG,QAAQ;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"plugin.js","sources":["esm/index.js","esm/ios.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst TextZoom = registerPlugin('TextZoom', {\n ios: () => import('./ios').then((m) => new m.TextZoomIOS()),\n});\nexport * from './definitions';\nexport { TextZoom };\n//# sourceMappingURL=index.js.map","export class TextZoomIOS {\n async get() {\n const percentage = this.getRaw();\n const value = this.textSizePercentageToNumber(percentage);\n return { value };\n }\n async getPreferred() {\n throw 'Native implementation will be used';\n }\n async set(options) {\n const num = this.textSizeNumberToPercentage(options.value);\n this.setRaw(num);\n }\n getRaw() {\n if (typeof document !== 'undefined') {\n return document.body.style.webkitTextSizeAdjust || '100%';\n }\n return '100%';\n }\n setRaw(value) {\n if (typeof document !== 'undefined') {\n document.body.style.webkitTextSizeAdjust = value;\n }\n }\n textSizePercentageToNumber(percentage) {\n const m = TextZoomIOS.TEXT_SIZE_REGEX.exec(percentage);\n if (!m) {\n return 1;\n }\n const parsed = Number.parseInt(m[1], 10);\n if (Number.isNaN(parsed)) {\n return 1;\n }\n return parsed / 100;\n }\n textSizeNumberToPercentage(num) {\n return `${Math.round(num * 100)}%`;\n }\n}\nTextZoomIOS.TEXT_SIZE_REGEX = /(\\d+)%/;\n//# sourceMappingURL=ios.js.map"],"names":["registerPlugin"],"mappings":";;;AACK,UAAC,QAAQ,GAAGA,mBAAc,CAAC,UAAU,EAAE;IAC5C,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,WAAW,EAAE,CAAC;IAC/D,CAAC;;ICHM,MAAM,WAAW,CAAC;IACzB,IAAI,MAAM,GAAG,GAAG;IAChB,QAAQ,MAAM,UAAU,GAAG,IAAI,CAAC,MAAM,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AG,EAAE;IACpC,QAAQ,OAAO,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,GAAG,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC;IAC1C,IAAI;IACJ;IACA,WAAW,CAAC,eAAe,GAAG,QAAQ;;;;;;;;;;;;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capacitor/text-zoom",
3
- "version": "8.0.0-alpha.1",
3
+ "version": "8.0.0-beta.0",
4
4
  "description": "The Text Zoom API provides the ability to change Web View text size for visual accessibility.",
5
5
  "main": "dist/plugin.cjs.js",
6
6
  "module": "dist/esm/index.js",
@@ -37,7 +37,7 @@
37
37
  "lint": "npm run eslint && npm run prettier -- --check && npm run swiftlint -- lint",
38
38
  "fmt": "npm run eslint -- --fix && npm run prettier -- --write && npm run swiftlint -- --fix --format",
39
39
  "eslint": "eslint . --ext ts",
40
- "prettier": "prettier \"**/*.{css,html,ts,js,java}\"",
40
+ "prettier": "prettier \"**/*.{css,html,ts,js,java}\" --plugin=prettier-plugin-java",
41
41
  "swiftlint": "node-swiftlint",
42
42
  "docgen": "docgen --api TextZoomPlugin --output-readme README.md --output-json dist/docs.json",
43
43
  "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.mjs",
@@ -49,18 +49,18 @@
49
49
  "devDependencies": {
50
50
  "@capacitor/android": "next",
51
51
  "@capacitor/core": "next",
52
- "@capacitor/docgen": "0.2.2",
52
+ "@capacitor/docgen": "0.3.0",
53
53
  "@capacitor/ios": "next",
54
54
  "@ionic/eslint-config": "^0.4.0",
55
- "@ionic/prettier-config": "~1.0.1",
56
- "@ionic/swiftlint-config": "^1.1.2",
57
- "eslint": "^8.57.0",
58
- "prettier": "~2.3.0",
59
- "prettier-plugin-java": "~1.0.2",
60
- "rimraf": "^6.0.1",
61
- "rollup": "^4.26.0",
62
- "swiftlint": "^1.0.1",
63
- "typescript": "~4.1.5"
55
+ "@ionic/prettier-config": "^4.0.0",
56
+ "@ionic/swiftlint-config": "^2.0.0",
57
+ "eslint": "^8.57.1",
58
+ "prettier": "^3.6.2",
59
+ "prettier-plugin-java": "^2.7.7",
60
+ "rimraf": "^6.1.0",
61
+ "rollup": "^4.53.2",
62
+ "swiftlint": "^2.0.0",
63
+ "typescript": "^5.9.3"
64
64
  },
65
65
  "peerDependencies": {
66
66
  "@capacitor/core": "next"
@@ -81,5 +81,5 @@
81
81
  "publishConfig": {
82
82
  "access": "public"
83
83
  },
84
- "gitHead": "4c2f39a8fc78578c919a81ba410d6a37e70152d0"
84
+ "gitHead": "06921fb53dc712720523c13836a92ba371054dcb"
85
85
  }