@capacitor/text-zoom 1.0.3 → 1.0.8
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 +52 -0
- package/android/build.gradle +1 -1
- package/dist/esm/definitions.js.map +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/ios.js.map +1 -1
- package/dist/plugin.cjs.js +1 -1
- package/dist/plugin.cjs.js.map +1 -1
- package/dist/plugin.js +2 -2
- package/dist/plugin.js.map +1 -1
- package/package.json +4 -5
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,58 @@
|
|
|
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
|
+
## [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)
|
|
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
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## [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)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Bug Fixes
|
|
21
|
+
|
|
22
|
+
* **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))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
## [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)
|
|
29
|
+
|
|
30
|
+
**Note:** Version bump only for package @capacitor/text-zoom
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
## [1.0.5](https://github.com/ionic-team/capacitor-plugins/compare/@capacitor/text-zoom@1.0.4...@capacitor/text-zoom@1.0.5) (2021-10-14)
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
### Bug Fixes
|
|
40
|
+
|
|
41
|
+
* remove postpublish scripts ([#656](https://github.com/ionic-team/capacitor-plugins/issues/656)) ([ed6ac49](https://github.com/ionic-team/capacitor-plugins/commit/ed6ac499ebf4a47525071ccbfc36c27503e11f60))
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
## [1.0.4](https://github.com/ionic-team/capacitor-plugins/compare/@capacitor/text-zoom@1.0.3...@capacitor/text-zoom@1.0.4) (2021-10-13)
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
### Bug Fixes
|
|
51
|
+
|
|
52
|
+
* correct addListeners links ([#655](https://github.com/ionic-team/capacitor-plugins/issues/655)) ([f9871e7](https://github.com/ionic-team/capacitor-plugins/commit/f9871e7bd53478addb21155e148829f550c0e457))
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
|
|
6
58
|
## [1.0.3](https://github.com/ionic-team/capacitor-plugins/compare/@capacitor/text-zoom@1.0.2...@capacitor/text-zoom@1.0.3) (2021-09-01)
|
|
7
59
|
|
|
8
60
|
**Note:** Version bump only for package @capacitor/text-zoom
|
package/android/build.gradle
CHANGED
|
@@ -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 };
|
package/dist/esm/index.js.map
CHANGED
|
@@ -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;
|
|
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"]}
|
package/dist/esm/ios.js.map
CHANGED
|
@@ -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,CAA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,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"]}
|
package/dist/plugin.cjs.js
CHANGED
|
@@ -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 {
|
package/dist/plugin.cjs.js.map
CHANGED
|
@@ -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;
|
|
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;;;;;;;;;"}
|
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 {
|
|
@@ -57,5 +57,5 @@ var capacitorTextZoom = (function (exports, core) {
|
|
|
57
57
|
|
|
58
58
|
return exports;
|
|
59
59
|
|
|
60
|
-
}({}, capacitorExports)
|
|
60
|
+
})({}, capacitorExports);
|
|
61
61
|
//# sourceMappingURL=plugin.js.map
|
package/dist/plugin.js.map
CHANGED
|
@@ -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,mDAAe,CAAC,IAAI,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,WAAW,EAAE,CAAC;
|
|
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,UAA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AAE;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.
|
|
3
|
+
"version": "1.0.8",
|
|
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",
|
|
@@ -33,7 +33,7 @@
|
|
|
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",
|
|
36
|
-
"fmt": "npm run eslint -- --fix && npm run prettier -- --write && npm run swiftlint --
|
|
36
|
+
"fmt": "npm run eslint -- --fix && npm run prettier -- --write && npm run swiftlint -- --fix --format",
|
|
37
37
|
"eslint": "eslint . --ext ts",
|
|
38
38
|
"prettier": "prettier \"**/*.{css,html,ts,js,java}\"",
|
|
39
39
|
"swiftlint": "node-swiftlint",
|
|
@@ -42,13 +42,12 @@
|
|
|
42
42
|
"clean": "rimraf ./dist",
|
|
43
43
|
"watch": "tsc --watch",
|
|
44
44
|
"prepublishOnly": "npm run build",
|
|
45
|
-
"postpublish": "npm run publish:cocoapod",
|
|
46
45
|
"publish:cocoapod": "pod trunk push ./CapacitorTextZoom.podspec --allow-warnings"
|
|
47
46
|
},
|
|
48
47
|
"devDependencies": {
|
|
49
48
|
"@capacitor/android": "^3.0.0",
|
|
50
49
|
"@capacitor/core": "^3.0.0",
|
|
51
|
-
"@capacitor/docgen": "0.0.
|
|
50
|
+
"@capacitor/docgen": "0.0.18",
|
|
52
51
|
"@capacitor/ios": "^3.0.0",
|
|
53
52
|
"@ionic/eslint-config": "^0.3.0",
|
|
54
53
|
"@ionic/prettier-config": "~1.0.1",
|
|
@@ -80,5 +79,5 @@
|
|
|
80
79
|
"publishConfig": {
|
|
81
80
|
"access": "public"
|
|
82
81
|
},
|
|
83
|
-
"gitHead": "
|
|
82
|
+
"gitHead": "f18ee6482e1ec8e5fb0290d51f598397133af990"
|
|
84
83
|
}
|