@capacitor/text-zoom 1.0.6 → 4.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/CHANGELOG.md CHANGED
@@ -3,6 +3,56 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # 4.0.0-beta.0 (2022-06-27)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * inline source code in esm map files ([#760](https://github.com/ionic-team/capacitor-plugins/issues/760)) ([a960489](https://github.com/ionic-team/capacitor-plugins/commit/a960489a19db0182b90d187a50deff9dfbe51038))
12
+ * **text-zoom:** Lazy load iOS implementation ([#735](https://github.com/ionic-team/capacitor-plugins/issues/735)) ([5039a74](https://github.com/ionic-team/capacitor-plugins/commit/5039a747efa2bc36674c70bdd9dae4439165ab4d))
13
+ * add es2017 lib to tsconfig ([#180](https://github.com/ionic-team/capacitor-plugins/issues/180)) ([2c3776c](https://github.com/ionic-team/capacitor-plugins/commit/2c3776c38ca025c5ee965dec10ccf1cdb6c02e2f))
14
+ * better ignore rules for npm distribution ([#32](https://github.com/ionic-team/capacitor-plugins/issues/32)) ([b8d55b9](https://github.com/ionic-team/capacitor-plugins/commit/b8d55b9233e4ad7b8a1cd41110b4e580fc2a059f))
15
+ * correct addListeners links ([#655](https://github.com/ionic-team/capacitor-plugins/issues/655)) ([f9871e7](https://github.com/ionic-team/capacitor-plugins/commit/f9871e7bd53478addb21155e148829f550c0e457))
16
+ * remove postpublish scripts ([#656](https://github.com/ionic-team/capacitor-plugins/issues/656)) ([ed6ac49](https://github.com/ionic-team/capacitor-plugins/commit/ed6ac499ebf4a47525071ccbfc36c27503e11f60))
17
+ * support deprecated types from Capacitor 2 ([#139](https://github.com/ionic-team/capacitor-plugins/issues/139)) ([2d7127a](https://github.com/ionic-team/capacitor-plugins/commit/2d7127a488e26f0287951921a6db47c49d817336))
18
+ * use correct package in manifest files ([#22](https://github.com/ionic-team/capacitor-plugins/issues/22)) ([ab62987](https://github.com/ionic-team/capacitor-plugins/commit/ab629877e1951f944594f1b23e1bffefcbc783dd))
19
+
20
+
21
+ ### Features
22
+
23
+ * add commonjs output format ([#179](https://github.com/ionic-team/capacitor-plugins/issues/179)) ([8e9e098](https://github.com/ionic-team/capacitor-plugins/commit/8e9e09862064b3f6771d7facbc4008e995d9b463))
24
+ * set targetSDK default value to 31 ([#824](https://github.com/ionic-team/capacitor-plugins/issues/824)) ([3ee10de](https://github.com/ionic-team/capacitor-plugins/commit/3ee10de98067984c1a4e75295d001c5a895c47f4))
25
+ * set targetSDK default value to 32 ([#970](https://github.com/ionic-team/capacitor-plugins/issues/970)) ([fa70d96](https://github.com/ionic-team/capacitor-plugins/commit/fa70d96f141af751aae53ceb5642c46b204f5958))
26
+ * Text Zoom plugin ([#9](https://github.com/ionic-team/capacitor-plugins/issues/9)) ([cc18d0f](https://github.com/ionic-team/capacitor-plugins/commit/cc18d0fb1b6f4509d95a4114c92255d8d7873311))
27
+ * Upgrade gradle to 7.4 ([#826](https://github.com/ionic-team/capacitor-plugins/issues/826)) ([5db0906](https://github.com/ionic-team/capacitor-plugins/commit/5db0906f6264287c4f8e69dbaecf19d4d387824b))
28
+ * Use java 11 ([#910](https://github.com/ionic-team/capacitor-plugins/issues/910)) ([5acb2a2](https://github.com/ionic-team/capacitor-plugins/commit/5acb2a288a413492b163e4e97da46a085d9e4be0))
29
+
30
+
31
+
32
+
33
+
34
+ ## [1.0.8](https://github.com/ionic-team/capacitor-plugins/compare/@capacitor/text-zoom@1.0.7...@capacitor/text-zoom@1.0.8) (2022-01-19)
35
+
36
+
37
+ ### Bug Fixes
38
+
39
+ * inline source code in esm map files ([#760](https://github.com/ionic-team/capacitor-plugins/issues/760)) ([a960489](https://github.com/ionic-team/capacitor-plugins/commit/a960489a19db0182b90d187a50deff9dfbe51038))
40
+
41
+
42
+
43
+
44
+
45
+ ## [1.0.7](https://github.com/ionic-team/capacitor-plugins/compare/@capacitor/text-zoom@1.0.6...@capacitor/text-zoom@1.0.7) (2022-01-10)
46
+
47
+
48
+ ### Bug Fixes
49
+
50
+ * **text-zoom:** Lazy load iOS implementation ([#735](https://github.com/ionic-team/capacitor-plugins/issues/735)) ([5039a74](https://github.com/ionic-team/capacitor-plugins/commit/5039a747efa2bc36674c70bdd9dae4439165ab4d))
51
+
52
+
53
+
54
+
55
+
6
56
  ## [1.0.6](https://github.com/ionic-team/capacitor-plugins/compare/@capacitor/text-zoom@1.0.5...@capacitor/text-zoom@1.0.6) (2021-11-03)
7
57
 
8
58
  **Note:** Version bump only for package @capacitor/text-zoom
@@ -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/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}', 'text-zoom/ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}'
14
- s.ios.deployment_target = '12.0'
14
+ s.ios.deployment_target = '13.0'
15
15
  s.dependency 'Capacitor'
16
16
  s.swift_version = '5.1'
17
17
  end
package/README.md CHANGED
@@ -2,6 +2,16 @@
2
2
 
3
3
  The Text Zoom API provides the ability to change Web View text size for visual accessibility.
4
4
 
5
+ **Note:** text-zoom plugin won't work on iPads unless `preferredContentMode` configuration is set to `mobile` in your [Capacitor configuration file](https://capacitorjs.com/docs/config).
6
+
7
+ ```json
8
+ {
9
+ "ios": {
10
+ "preferredContentMode": "mobile"
11
+ }
12
+ }
13
+ ```
14
+
5
15
  ## Install
6
16
 
7
17
  ```bash
@@ -1,8 +1,8 @@
1
1
  ext {
2
- junitVersion = project.hasProperty('junitVersion') ? rootProject.ext.junitVersion : '4.13.1'
3
- androidxAppCompatVersion = project.hasProperty('androidxAppCompatVersion') ? rootProject.ext.androidxAppCompatVersion : '1.2.0'
4
- androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.1.2'
5
- androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.3.0'
2
+ junitVersion = project.hasProperty('junitVersion') ? rootProject.ext.junitVersion : '4.13.2'
3
+ androidxAppCompatVersion = project.hasProperty('androidxAppCompatVersion') ? rootProject.ext.androidxAppCompatVersion : '1.4.2'
4
+ androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.1.3'
5
+ androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.4.0'
6
6
  }
7
7
 
8
8
  buildscript {
@@ -11,17 +11,17 @@ buildscript {
11
11
  mavenCentral()
12
12
  }
13
13
  dependencies {
14
- classpath 'com.android.tools.build:gradle:4.2.1'
14
+ classpath 'com.android.tools.build:gradle:7.2.1'
15
15
  }
16
16
  }
17
17
 
18
18
  apply plugin: 'com.android.library'
19
19
 
20
20
  android {
21
- compileSdkVersion project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 30
21
+ compileSdkVersion project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 32
22
22
  defaultConfig {
23
- minSdkVersion project.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion : 21
24
- targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion : 30
23
+ minSdkVersion project.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion : 22
24
+ targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion : 32
25
25
  versionCode 1
26
26
  versionName "1.0"
27
27
  testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
@@ -36,14 +36,13 @@ android {
36
36
  abortOnError false
37
37
  }
38
38
  compileOptions {
39
- sourceCompatibility JavaVersion.VERSION_1_8
40
- targetCompatibility JavaVersion.VERSION_1_8
39
+ sourceCompatibility JavaVersion.VERSION_11
40
+ targetCompatibility JavaVersion.VERSION_11
41
41
  }
42
42
  }
43
43
 
44
44
  repositories {
45
45
  google()
46
- jcenter()
47
46
  mavenCentral()
48
47
  }
49
48
 
@@ -1 +1 @@
1
- {"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"","sourcesContent":["export interface GetResult {\n /**\n * The current zoom level (represented as a decimal).\n *\n * @since 1.0.0\n */\n value: number;\n}\n\nexport interface GetPreferredResult {\n /**\n * The preferred zoom level (represented as a decimal).\n *\n * @since 1.0.0\n */\n value: number;\n}\n\nexport interface SetOptions {\n /**\n * The new zoom level (represented as a decimal).\n *\n * @since 1.0.0\n */\n value: number;\n}\n\nexport interface TextZoomPlugin {\n /**\n * Get the current zoom level.\n *\n * Zoom levels are represented as a decimal (e.g. 1.2 is 120%).\n *\n * @since 1.0.0\n */\n get(): Promise<GetResult>;\n\n /**\n * Get the preferred zoom level.\n *\n * Zoom levels are represented as a decimal (e.g. 1.2 is 120%).\n *\n * @since 1.0.0\n */\n getPreferred(): Promise<GetPreferredResult>;\n\n /**\n * Set the current zoom level.\n *\n * Zoom levels are represented as a decimal (e.g. 1.2 is 120%).\n *\n * @since 1.0.0\n */\n set(options: SetOptions): Promise<void>;\n}\n"]}
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,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,WAAW,EAAE,CAAC;CACpD,CAAC,CAAC;AAEH,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAE,QAAQ,EAAE,CAAC"}
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 +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,C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AAG,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"]}
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  var core = require('@capacitor/core');
6
6
 
7
7
  const TextZoom = core.registerPlugin('TextZoom', {
8
- ios: Promise.resolve().then(function () { return ios; }).then(m => new m.TextZoomIOS()),
8
+ ios: () => Promise.resolve().then(function () { return ios; }).then(m => new m.TextZoomIOS()),
9
9
  });
10
10
 
11
11
  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","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,mDAAe,CAAC,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,WAAW,EAAE,CAAC;AACvD,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,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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","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,KA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AAO,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;;;;;;;;;"}
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","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 text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C7D,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","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;;;;;;;;;;;;;;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capacitor/text-zoom",
3
- "version": "1.0.6",
3
+ "version": "4.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",
@@ -29,7 +29,7 @@
29
29
  ],
30
30
  "scripts": {
31
31
  "verify": "npm run verify:ios && npm run verify:android && npm run verify:web",
32
- "verify:ios": "cd ios && pod install && xcodebuild -workspace Plugin.xcworkspace -scheme Plugin && cd ..",
32
+ "verify:ios": "cd ios && pod install && xcodebuild -workspace Plugin.xcworkspace -scheme Plugin -destination generic/platform=iOS && cd ..",
33
33
  "verify:android": "cd android && ./gradlew clean build test && cd ..",
34
34
  "verify:web": "npm run build",
35
35
  "lint": "npm run eslint && npm run prettier -- --check && npm run swiftlint -- lint",
@@ -45,10 +45,10 @@
45
45
  "publish:cocoapod": "pod trunk push ./CapacitorTextZoom.podspec --allow-warnings"
46
46
  },
47
47
  "devDependencies": {
48
- "@capacitor/android": "^3.0.0",
49
- "@capacitor/core": "^3.0.0",
48
+ "@capacitor/android": "next",
49
+ "@capacitor/core": "next",
50
50
  "@capacitor/docgen": "0.0.18",
51
- "@capacitor/ios": "^3.0.0",
51
+ "@capacitor/ios": "next",
52
52
  "@ionic/eslint-config": "^0.3.0",
53
53
  "@ionic/prettier-config": "~1.0.1",
54
54
  "@ionic/swiftlint-config": "^1.1.2",
@@ -61,7 +61,7 @@
61
61
  "typescript": "~4.1.5"
62
62
  },
63
63
  "peerDependencies": {
64
- "@capacitor/core": "^3.0.0"
64
+ "@capacitor/core": "next"
65
65
  },
66
66
  "prettier": "@ionic/prettier-config",
67
67
  "swiftlint": "@ionic/swiftlint-config",
@@ -79,5 +79,5 @@
79
79
  "publishConfig": {
80
80
  "access": "public"
81
81
  },
82
- "gitHead": "64df93225736e9dfad336562f5e53e5a2243052b"
82
+ "gitHead": "fd7db8285f72990522da0adc889514c9804b6dae"
83
83
  }