@capacitor/text-zoom 6.0.3 → 7.0.0-alpha.2

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,7 +11,7 @@ Pod::Spec.new do |s|
11
11
  s.author = package['author']
12
12
  s.source = { :git => 'https://github.com/ionic-team/capacitor-plugins.git', :tag => package['name'] + '@' + package['version'] }
13
13
  s.source_files = 'ios/Sources/**/*.{swift,h,m,c,cc,mm,cpp}', 'text-zoom/ios/Sources/**/*.{swift,h,m,c,cc,mm,cpp}'
14
- s.ios.deployment_target = '13.0'
14
+ s.ios.deployment_target = '14.0'
15
15
  s.dependency 'Capacitor'
16
16
  s.swift_version = '5.1'
17
17
  end
package/Package.swift CHANGED
@@ -3,14 +3,14 @@ import PackageDescription
3
3
 
4
4
  let package = Package(
5
5
  name: "CapacitorTextZoom",
6
- platforms: [.iOS(.v13)],
6
+ platforms: [.iOS(.v14)],
7
7
  products: [
8
8
  .library(
9
9
  name: "CapacitorTextZoom",
10
10
  targets: ["TextZoomPlugin"])
11
11
  ],
12
12
  dependencies: [
13
- .package(url: "https://github.com/ionic-team/capacitor-swift-pm.git", from: "6.0.0")
13
+ .package(url: "https://github.com/ionic-team/capacitor-swift-pm.git", branch: "main")
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.6.1'
5
- androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.1.5'
6
- androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.5.1'
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'
7
7
  }
8
8
 
9
9
  buildscript {
@@ -15,7 +15,7 @@ buildscript {
15
15
  }
16
16
  }
17
17
  dependencies {
18
- classpath 'com.android.tools.build:gradle:8.2.1'
18
+ classpath 'com.android.tools.build:gradle:8.7.2'
19
19
  if (System.getenv("CAP_PLUGIN_PUBLISH") == "true") {
20
20
  classpath 'io.github.gradle-nexus:publish-plugin:1.3.0'
21
21
  }
@@ -31,10 +31,10 @@ if (System.getenv("CAP_PLUGIN_PUBLISH") == "true") {
31
31
 
32
32
  android {
33
33
  namespace "com.capacitorjs.plugins.textzoom"
34
- compileSdk project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 34
34
+ compileSdk project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 35
35
35
  defaultConfig {
36
- minSdkVersion project.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion : 22
37
- targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion : 34
36
+ minSdkVersion project.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion : 23
37
+ targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion : 35
38
38
  versionCode 1
39
39
  versionName "1.0"
40
40
  testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
@@ -49,8 +49,8 @@ android {
49
49
  abortOnError false
50
50
  }
51
51
  compileOptions {
52
- sourceCompatibility JavaVersion.VERSION_17
53
- targetCompatibility JavaVersion.VERSION_17
52
+ sourceCompatibility JavaVersion.VERSION_21
53
+ targetCompatibility JavaVersion.VERSION_21
54
54
  }
55
55
  publishing {
56
56
  singleVariant("release")
package/dist/esm/ios.d.ts CHANGED
@@ -1,8 +1,8 @@
1
- import type { GetPreferredResult, GetResult, SetOptions, TextZoomPlugin } from './definitions';
1
+ import type { GetResult, SetOptions, TextZoomPlugin } from './definitions';
2
2
  export declare class TextZoomIOS implements TextZoomPlugin {
3
3
  static readonly TEXT_SIZE_REGEX: RegExp;
4
4
  get(): Promise<GetResult>;
5
- getPreferred(): Promise<GetPreferredResult>;
5
+ getPreferred(): Promise<never>;
6
6
  set(options: SetOptions): Promise<void>;
7
7
  getRaw(): string;
8
8
  setRaw(value: string): void;
package/dist/esm/ios.js CHANGED
@@ -1,4 +1,3 @@
1
- import { Plugins } from '@capacitor/core';
2
1
  export class TextZoomIOS {
3
2
  async get() {
4
3
  const percentage = this.getRaw();
@@ -6,7 +5,7 @@ export class TextZoomIOS {
6
5
  return { value };
7
6
  }
8
7
  async getPreferred() {
9
- return Plugins.TextZoom.getPreferred();
8
+ throw 'Native implementation will be used';
10
9
  }
11
10
  async set(options) {
12
11
  const num = this.textSizeNumberToPercentage(options.value);
@@ -1 +1 @@
1
- {"version":3,"file":"ios.js","sourceRoot":"","sources":["../../src/ios.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAS1C,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,OAAO,OAAO,CAAC,QAAQ,CAAC,YAAY,EAAE,CAAC;IACzC,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 { Plugins } from '@capacitor/core';\n\nimport type {\n GetPreferredResult,\n GetResult,\n SetOptions,\n TextZoomPlugin,\n} 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<GetPreferredResult> {\n return Plugins.TextZoom.getPreferred();\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,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,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 TextZoom = core.registerPlugin('TextZoom', {
@@ -15,7 +13,7 @@ class TextZoomIOS {
15
13
  return { value };
16
14
  }
17
15
  async getPreferred() {
18
- return core.Plugins.TextZoom.getPreferred();
16
+ throw 'Native implementation will be used';
19
17
  }
20
18
  async set(options) {
21
19
  const num = this.textSizeNumberToPercentage(options.value);
@@ -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","import { Plugins } from '@capacitor/core';\nexport class TextZoomIOS {\n async get() {\n const percentage = this.getRaw();\n const value = this.textSizePercentageToNumber(percentage);\n return { value };\n }\n async getPreferred() {\n return Plugins.TextZoom.getPreferred();\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","Plugins"],"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;;ACFM,MAAM,WAAW,CAAC;AACzB,IAAI,MAAM,GAAG,GAAG;AAChB,QAAQ,MAAM,UAAU,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC;AACzC,QAAQ,MAAM,KAAK,GAAG,IAAI,CAAC,0BAA0B,CAAC,UAAU,CAAC,CAAC;AAClE,QAAQ,OAAO,EAAE,KAAK,EAAE,CAAC;AACzB,KAAK;AACL,IAAI,MAAM,YAAY,GAAG;AACzB,QAAQ,OAAOC,YAAO,CAAC,QAAQ,CAAC,YAAY,EAAE,CAAC;AAC/C,KAAK;AACL,IAAI,MAAM,GAAG,CAAC,OAAO,EAAE;AACvB,QAAQ,MAAM,GAAG,GAAG,IAAI,CAAC,0BAA0B,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AACnE,QAAQ,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;AACzB,KAAK;AACL,IAAI,MAAM,GAAG;AACb,QAAQ,IAAI,OAAO,QAAQ,KAAK,WAAW,EAAE;AAC7C,YAAY,OAAO,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,oBAAoB,IAAI,MAAM,CAAC;AACtE,SAAS;AACT,QAAQ,OAAO,MAAM,CAAC;AACtB,KAAK;AACL,IAAI,MAAM,CAAC,KAAK,EAAE;AAClB,QAAQ,IAAI,OAAO,QAAQ,KAAK,WAAW,EAAE;AAC7C,YAAY,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,oBAAoB,GAAG,KAAK,CAAC;AAC7D,SAAS;AACT,KAAK;AACL,IAAI,0BAA0B,CAAC,UAAU,EAAE;AAC3C,QAAQ,MAAM,CAAC,GAAG,WAAW,CAAC,eAAe,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;AAC/D,QAAQ,IAAI,CAAC,CAAC,EAAE;AAChB,YAAY,OAAO,CAAC,CAAC;AACrB,SAAS;AACT,QAAQ,MAAM,MAAM,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;AACjD,QAAQ,IAAI,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE;AAClC,YAAY,OAAO,CAAC,CAAC;AACrB,SAAS;AACT,QAAQ,OAAO,MAAM,GAAG,GAAG,CAAC;AAC5B,KAAK;AACL,IAAI,0BAA0B,CAAC,GAAG,EAAE;AACpC,QAAQ,OAAO,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,GAAG,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;AAC3C,KAAK;AACL,CAAC;AACD,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,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;AACA,IAAI,MAAM,YAAY,GAAG;AACzB,QAAQ,MAAM,oCAAoC;AAClD;AACA,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;AACA,IAAI,MAAM,GAAG;AACb,QAAQ,IAAI,OAAO,QAAQ,KAAK,WAAW,EAAE;AAC7C,YAAY,OAAO,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,oBAAoB,IAAI,MAAM;AACrE;AACA,QAAQ,OAAO,MAAM;AACrB;AACA,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;AACA;AACA,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;AACA,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;AACA,QAAQ,OAAO,MAAM,GAAG,GAAG;AAC3B;AACA,IAAI,0BAA0B,CAAC,GAAG,EAAE;AACpC,QAAQ,OAAO,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,GAAG,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC;AAC1C;AACA;AACA,WAAW,CAAC,eAAe,GAAG,QAAQ;;;;;;;;;"}
package/dist/plugin.js CHANGED
@@ -12,7 +12,7 @@ var capacitorTextZoom = (function (exports, core) {
12
12
  return { value };
13
13
  }
14
14
  async getPreferred() {
15
- return core.Plugins.TextZoom.getPreferred();
15
+ throw 'Native implementation will be used';
16
16
  }
17
17
  async set(options) {
18
18
  const num = this.textSizeNumberToPercentage(options.value);
@@ -53,8 +53,6 @@ var capacitorTextZoom = (function (exports, core) {
53
53
 
54
54
  exports.TextZoom = TextZoom;
55
55
 
56
- Object.defineProperty(exports, '__esModule', { value: true });
57
-
58
56
  return exports;
59
57
 
60
58
  })({}, capacitorExports);
@@ -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","import { Plugins } from '@capacitor/core';\nexport class TextZoomIOS {\n async get() {\n const percentage = this.getRaw();\n const value = this.textSizePercentageToNumber(percentage);\n return { value };\n }\n async getPreferred() {\n return Plugins.TextZoom.getPreferred();\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","Plugins"],"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;;ICFM,MAAM,WAAW,CAAC;IACzB,IAAI,MAAM,GAAG,GAAG;IAChB,QAAQ,MAAM,UAAU,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC;IACzC,QAAQ,MAAM,KAAK,GAAG,IAAI,CAAC,0BAA0B,CAAC,UAAU,CAAC,CAAC;IAClE,QAAQ,OAAO,EAAE,KAAK,EAAE,CAAC;IACzB,KAAK;IACL,IAAI,MAAM,YAAY,GAAG;IACzB,QAAQ,OAAOC,YAAO,CAAC,QAAQ,CAAC,YAAY,EAAE,CAAC;IAC/C,KAAK;IACL,IAAI,MAAM,GAAG,CAAC,OAAO,EAAE;IACvB,QAAQ,MAAM,GAAG,GAAG,IAAI,CAAC,0BAA0B,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IACnE,QAAQ,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;IACzB,KAAK;IACL,IAAI,MAAM,GAAG;IACb,QAAQ,IAAI,OAAO,QAAQ,KAAK,WAAW,EAAE;IAC7C,YAAY,OAAO,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,oBAAoB,IAAI,MAAM,CAAC;IACtE,SAAS;IACT,QAAQ,OAAO,MAAM,CAAC;IACtB,KAAK;IACL,IAAI,MAAM,CAAC,KAAK,EAAE;IAClB,QAAQ,IAAI,OAAO,QAAQ,KAAK,WAAW,EAAE;IAC7C,YAAY,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,oBAAoB,GAAG,KAAK,CAAC;IAC7D,SAAS;IACT,KAAK;IACL,IAAI,0BAA0B,CAAC,UAAU,EAAE;IAC3C,QAAQ,MAAM,CAAC,GAAG,WAAW,CAAC,eAAe,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IAC/D,QAAQ,IAAI,CAAC,CAAC,EAAE;IAChB,YAAY,OAAO,CAAC,CAAC;IACrB,SAAS;IACT,QAAQ,MAAM,MAAM,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;IACjD,QAAQ,IAAI,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE;IAClC,YAAY,OAAO,CAAC,CAAC;IACrB,SAAS;IACT,QAAQ,OAAO,MAAM,GAAG,GAAG,CAAC;IAC5B,KAAK;IACL,IAAI,0BAA0B,CAAC,GAAG,EAAE;IACpC,QAAQ,OAAO,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,GAAG,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IAC3C,KAAK;IACL,CAAC;IACD,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,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,CAAC,0BAA0B,CAAC,UAAU,CAAC;IACjE,QAAQ,OAAO,EAAE,KAAK,EAAE;IACxB;IACA,IAAI,MAAM,YAAY,GAAG;IACzB,QAAQ,MAAM,oCAAoC;IAClD;IACA,IAAI,MAAM,GAAG,CAAC,OAAO,EAAE;IACvB,QAAQ,MAAM,GAAG,GAAG,IAAI,CAAC,0BAA0B,CAAC,OAAO,CAAC,KAAK,CAAC;IAClE,QAAQ,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC;IACxB;IACA,IAAI,MAAM,GAAG;IACb,QAAQ,IAAI,OAAO,QAAQ,KAAK,WAAW,EAAE;IAC7C,YAAY,OAAO,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,oBAAoB,IAAI,MAAM;IACrE;IACA,QAAQ,OAAO,MAAM;IACrB;IACA,IAAI,MAAM,CAAC,KAAK,EAAE;IAClB,QAAQ,IAAI,OAAO,QAAQ,KAAK,WAAW,EAAE;IAC7C,YAAY,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,oBAAoB,GAAG,KAAK;IAC5D;IACA;IACA,IAAI,0BAA0B,CAAC,UAAU,EAAE;IAC3C,QAAQ,MAAM,CAAC,GAAG,WAAW,CAAC,eAAe,CAAC,IAAI,CAAC,UAAU,CAAC;IAC9D,QAAQ,IAAI,CAAC,CAAC,EAAE;IAChB,YAAY,OAAO,CAAC;IACpB;IACA,QAAQ,MAAM,MAAM,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;IAChD,QAAQ,IAAI,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE;IAClC,YAAY,OAAO,CAAC;IACpB;IACA,QAAQ,OAAO,MAAM,GAAG,GAAG;IAC3B;IACA,IAAI,0BAA0B,CAAC,GAAG,EAAE;IACpC,QAAQ,OAAO,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,GAAG,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC;IAC1C;IACA;IACA,WAAW,CAAC,eAAe,GAAG,QAAQ;;;;;;;;;;;;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capacitor/text-zoom",
3
- "version": "6.0.3",
3
+ "version": "7.0.0-alpha.2",
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",
@@ -31,7 +31,7 @@
31
31
  ],
32
32
  "scripts": {
33
33
  "verify": "npm run verify:ios && npm run verify:android && npm run verify:web",
34
- "verify:ios": "xcodebuild build -scheme CapacitorTextZoom -sdk iphonesimulator17.0 -destination 'OS=17.0,name=iPhone 15'",
34
+ "verify:ios": "xcodebuild build -scheme CapacitorTextZoom -destination generic/platform=iOS",
35
35
  "verify:android": "cd android && ./gradlew clean build test && cd ..",
36
36
  "verify:web": "npm run build",
37
37
  "lint": "npm run eslint && npm run prettier -- --check && npm run swiftlint -- lint",
@@ -40,30 +40,30 @@
40
40
  "prettier": "prettier \"**/*.{css,html,ts,js,java}\"",
41
41
  "swiftlint": "node-swiftlint",
42
42
  "docgen": "docgen --api TextZoomPlugin --output-readme README.md --output-json dist/docs.json",
43
- "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.js",
43
+ "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.mjs",
44
44
  "clean": "rimraf ./dist",
45
45
  "watch": "tsc --watch",
46
46
  "prepublishOnly": "npm run build",
47
47
  "publish:cocoapod": "pod trunk push ./CapacitorTextZoom.podspec --allow-warnings"
48
48
  },
49
49
  "devDependencies": {
50
- "@capacitor/android": "^6.0.0",
51
- "@capacitor/core": "^6.0.0",
50
+ "@capacitor/android": "next",
51
+ "@capacitor/core": "next",
52
52
  "@capacitor/docgen": "0.2.2",
53
- "@capacitor/ios": "^6.0.0",
53
+ "@capacitor/ios": "next",
54
54
  "@ionic/eslint-config": "^0.4.0",
55
55
  "@ionic/prettier-config": "~1.0.1",
56
56
  "@ionic/swiftlint-config": "^1.1.2",
57
57
  "eslint": "^8.57.0",
58
58
  "prettier": "~2.3.0",
59
59
  "prettier-plugin-java": "~1.0.2",
60
- "rimraf": "^3.0.0",
61
- "rollup": "^2.29.0",
60
+ "rimraf": "^6.0.1",
61
+ "rollup": "^4.26.0",
62
62
  "swiftlint": "^1.0.1",
63
63
  "typescript": "~4.1.5"
64
64
  },
65
65
  "peerDependencies": {
66
- "@capacitor/core": "^6.0.0"
66
+ "@capacitor/core": "next"
67
67
  },
68
68
  "prettier": "@ionic/prettier-config",
69
69
  "swiftlint": "@ionic/swiftlint-config",
@@ -81,5 +81,5 @@
81
81
  "publishConfig": {
82
82
  "access": "public"
83
83
  },
84
- "gitHead": "6e94aa5bf785e957d0cfac83b62b5355bcf7d1ed"
84
+ "gitHead": "023f53b42a81049b7cdef6c7b0102b85b4df1c01"
85
85
  }