diff --git a/action-sheet/README.md b/action-sheet/README.md
index 2c9872ed1..b72498423 100644
--- a/action-sheet/README.md
+++ b/action-sheet/README.md
@@ -13,7 +13,7 @@ npx cap sync
This plugin will use the following project variables (defined in your app's `variables.gradle` file):
-- `androidxMaterialVersion`: version of `com.google.android.material:material` (default: `1.10.0`)
+- `androidxMaterialVersion`: version of `com.google.android.material:material` (default: `1.12.0`)
## PWA Notes
diff --git a/action-sheet/android/build.gradle b/action-sheet/android/build.gradle
index 96ceb4473..872de35ad 100644
--- a/action-sheet/android/build.gradle
+++ b/action-sheet/android/build.gradle
@@ -2,7 +2,7 @@ ext {
capacitorVersion = System.getenv('CAPACITOR_VERSION')
junitVersion = project.hasProperty('junitVersion') ? rootProject.ext.junitVersion : '4.13.2'
androidxAppCompatVersion = project.hasProperty('androidxAppCompatVersion') ? rootProject.ext.androidxAppCompatVersion : '1.7.0'
- androidxMaterialVersion = project.hasProperty('androidxMaterialVersion') ? rootProject.ext.androidxMaterialVersion : '1.10.0'
+ androidxMaterialVersion = project.hasProperty('androidxMaterialVersion') ? rootProject.ext.androidxMaterialVersion : '1.12.0'
androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.2.1'
androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.6.1'
}
diff --git a/action-sheet/package.json b/action-sheet/package.json
index d8ccad49d..d201c1871 100644
--- a/action-sheet/package.json
+++ b/action-sheet/package.json
@@ -40,7 +40,7 @@
"prettier": "prettier \"**/*.{css,html,ts,js,java}\"",
"swiftlint": "node-swiftlint",
"docgen": "docgen --api ActionSheetPlugin --output-readme README.md --output-json dist/docs.json",
- "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.js",
+ "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.mjs",
"clean": "rimraf ./dist",
"watch": "tsc --watch",
"prepublishOnly": "npm run build",
@@ -58,7 +58,7 @@
"prettier": "~2.3.0",
"prettier-plugin-java": "~1.0.2",
"rimraf": "^3.0.0",
- "rollup": "^2.29.0",
+ "rollup": "^4.26.0",
"swiftlint": "^1.0.1",
"typescript": "~4.1.5"
},
diff --git a/action-sheet/rollup.config.js b/action-sheet/rollup.config.mjs
similarity index 100%
rename from action-sheet/rollup.config.js
rename to action-sheet/rollup.config.mjs
diff --git a/app-launcher/package.json b/app-launcher/package.json
index 8e6ef304b..845249951 100644
--- a/app-launcher/package.json
+++ b/app-launcher/package.json
@@ -40,7 +40,7 @@
"prettier": "prettier \"**/*.{css,html,ts,js,java}\"",
"swiftlint": "node-swiftlint",
"docgen": "docgen --api AppLauncherPlugin --output-readme README.md --output-json dist/docs.json",
- "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.js",
+ "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.mjs",
"clean": "rimraf ./dist",
"watch": "tsc --watch",
"prepublishOnly": "npm run build",
@@ -58,7 +58,7 @@
"prettier": "~2.3.0",
"prettier-plugin-java": "~1.0.2",
"rimraf": "^3.0.2",
- "rollup": "^2.32.0",
+ "rollup": "^4.26.0",
"swiftlint": "^1.0.1",
"typescript": "~4.1.5"
},
diff --git a/app-launcher/rollup.config.js b/app-launcher/rollup.config.mjs
similarity index 100%
rename from app-launcher/rollup.config.js
rename to app-launcher/rollup.config.mjs
diff --git a/app/package.json b/app/package.json
index 7b917aff6..77bfe53ac 100644
--- a/app/package.json
+++ b/app/package.json
@@ -40,7 +40,7 @@
"prettier": "prettier \"**/*.{css,html,ts,js,java}\"",
"swiftlint": "node-swiftlint",
"docgen": "docgen --api AppPlugin --output-readme README.md",
- "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.js",
+ "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.mjs",
"clean": "rimraf ./dist",
"watch": "tsc --watch",
"prepublishOnly": "npm run build",
@@ -58,7 +58,7 @@
"prettier": "~2.3.0",
"prettier-plugin-java": "~1.0.2",
"rimraf": "^3.0.0",
- "rollup": "^2.29.0",
+ "rollup": "^4.26.0",
"swiftlint": "^1.0.1",
"typescript": "~4.1.5"
},
diff --git a/app/rollup.config.js b/app/rollup.config.mjs
similarity index 100%
rename from app/rollup.config.js
rename to app/rollup.config.mjs
diff --git a/browser/README.md b/browser/README.md
index 0c6a744d1..ac7553a67 100644
--- a/browser/README.md
+++ b/browser/README.md
@@ -17,7 +17,7 @@ npx cap sync
This plugin will use the following project variables (defined in your app's `variables.gradle` file):
-- `androidxBrowserVersion`: version of `androidx.browser:browser` (default: `1.7.0`)
+- `androidxBrowserVersion`: version of `androidx.browser:browser` (default: `1.8.0`)
## Example
diff --git a/browser/android/build.gradle b/browser/android/build.gradle
index d5098ac19..dae05b3a4 100644
--- a/browser/android/build.gradle
+++ b/browser/android/build.gradle
@@ -4,7 +4,7 @@ ext {
androidxAppCompatVersion = project.hasProperty('androidxAppCompatVersion') ? rootProject.ext.androidxAppCompatVersion : '1.7.0'
androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.2.1'
androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.6.1'
- androidxBrowserVersion = project.hasProperty('androidxBrowserVersion') ? rootProject.ext.androidxBrowserVersion : '1.7.0'
+ androidxBrowserVersion = project.hasProperty('androidxBrowserVersion') ? rootProject.ext.androidxBrowserVersion : '1.8.0'
}
buildscript {
diff --git a/browser/package.json b/browser/package.json
index 72b295cdb..b2f8542a7 100644
--- a/browser/package.json
+++ b/browser/package.json
@@ -40,7 +40,7 @@
"prettier": "prettier \"**/*.{css,html,ts,js,java}\"",
"swiftlint": "node-swiftlint",
"docgen": "docgen --api BrowserPlugin --output-readme README.md --output-json dist/docs.json",
- "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.js",
+ "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.mjs",
"clean": "rimraf ./dist",
"watch": "tsc --watch",
"prepublishOnly": "npm run build",
@@ -58,7 +58,7 @@
"prettier": "~2.3.0",
"prettier-plugin-java": "~1.0.2",
"rimraf": "^3.0.0",
- "rollup": "^2.29.0",
+ "rollup": "^4.26.0",
"swiftlint": "^1.0.1",
"typescript": "~4.1.5"
},
diff --git a/browser/rollup.config.js b/browser/rollup.config.mjs
similarity index 100%
rename from browser/rollup.config.js
rename to browser/rollup.config.mjs
diff --git a/camera/README.md b/camera/README.md
index 49a48d096..9ad234eee 100644
--- a/camera/README.md
+++ b/camera/README.md
@@ -68,8 +68,8 @@ Additionally, because the Camera API launches a separate Activity to handle taki
This plugin will use the following project variables (defined in your app's `variables.gradle` file):
-- `androidxExifInterfaceVersion`: version of `androidx.exifinterface:exifinterface` (default: `1.3.6`)
-- `androidxMaterialVersion`: version of `com.google.android.material:material` (default: `1.10.0`)
+- `androidxExifInterfaceVersion`: version of `androidx.exifinterface:exifinterface` (default: `1.3.7`)
+- `androidxMaterialVersion`: version of `com.google.android.material:material` (default: `1.12.0`)
## PWA Notes
diff --git a/camera/android/build.gradle b/camera/android/build.gradle
index 34bda0ae0..98f17df6a 100644
--- a/camera/android/build.gradle
+++ b/camera/android/build.gradle
@@ -3,9 +3,9 @@ ext {
junitVersion = project.hasProperty('junitVersion') ? rootProject.ext.junitVersion : '4.13.2'
androidxAppCompatVersion = project.hasProperty('androidxAppCompatVersion') ? rootProject.ext.androidxAppCompatVersion : '1.7.0'
androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.6.1'
- androidxExifInterfaceVersion = project.hasProperty('androidxExifInterfaceVersion') ? rootProject.ext.androidxExifInterfaceVersion : '1.3.6'
+ androidxExifInterfaceVersion = project.hasProperty('androidxExifInterfaceVersion') ? rootProject.ext.androidxExifInterfaceVersion : '1.3.7'
androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.2.1'
- androidxMaterialVersion = project.hasProperty('androidxMaterialVersion') ? rootProject.ext.androidxMaterialVersion : '1.10.0'
+ androidxMaterialVersion = project.hasProperty('androidxMaterialVersion') ? rootProject.ext.androidxMaterialVersion : '1.12.0'
}
buildscript {
diff --git a/camera/package.json b/camera/package.json
index 93a0b48c5..f06878ef7 100644
--- a/camera/package.json
+++ b/camera/package.json
@@ -40,7 +40,7 @@
"prettier": "prettier \"**/*.{css,html,ts,js,java}\"",
"swiftlint": "node-swiftlint",
"docgen": "docgen --api CameraPlugin --output-readme README.md --output-json dist/docs.json",
- "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.js",
+ "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.mjs",
"clean": "rimraf ./dist",
"watch": "tsc --watch",
"prepublishOnly": "npm run build",
@@ -58,7 +58,7 @@
"prettier": "~2.3.0",
"prettier-plugin-java": "~1.0.2",
"rimraf": "^3.0.0",
- "rollup": "^2.29.0",
+ "rollup": "^4.26.0",
"swiftlint": "^1.0.1",
"typescript": "~4.1.5"
},
diff --git a/camera/rollup.config.js b/camera/rollup.config.mjs
similarity index 100%
rename from camera/rollup.config.js
rename to camera/rollup.config.mjs
diff --git a/clipboard/package.json b/clipboard/package.json
index e1f27a3aa..5303ac591 100644
--- a/clipboard/package.json
+++ b/clipboard/package.json
@@ -40,7 +40,7 @@
"prettier": "prettier \"**/*.{css,html,ts,js,java}\"",
"swiftlint": "node-swiftlint",
"docgen": "docgen --api ClipboardPlugin --output-readme README.md --output-json dist/docs.json",
- "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.js",
+ "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.mjs",
"clean": "rimraf ./dist",
"watch": "tsc --watch",
"prepublishOnly": "npm run build",
@@ -58,7 +58,7 @@
"prettier": "~2.3.0",
"prettier-plugin-java": "~1.0.2",
"rimraf": "^3.0.0",
- "rollup": "^2.29.0",
+ "rollup": "^4.26.0",
"swiftlint": "^1.0.1",
"typescript": "~4.1.5"
},
diff --git a/clipboard/rollup.config.js b/clipboard/rollup.config.mjs
similarity index 100%
rename from clipboard/rollup.config.js
rename to clipboard/rollup.config.mjs
diff --git a/device/README.md b/device/README.md
index 56c7d3947..39b6c154f 100644
--- a/device/README.md
+++ b/device/README.md
@@ -9,39 +9,6 @@ npm install @capacitor/device
npx cap sync
```
-## Apple Privacy Manifest Requirements
-
-Apple mandates that app developers now specify approved reasons for API usage to enhance user privacy. By May 1st, 2024, it's required to include these reasons when submitting apps to the App Store Connect.
-
-When using this specific plugin in your app, you must create a `PrivacyInfo.xcprivacy` file in `/ios/App` or use the VS Code Extension to generate it, specifying the usage reasons.
-
-For detailed steps on how to do this, please see the [Capacitor Docs](https://capacitorjs.com/docs/ios/privacy-manifest).
-
-**For this plugin, the required dictionary key is [NSPrivacyAccessedAPICategoryDiskSpace](https://developer.apple.com/documentation/bundleresources/privacy_manifest_files/describing_use_of_required_reason_api#4278397) and the recommended reason is [85F4.1](https://developer.apple.com/documentation/bundleresources/privacy_manifest_files/describing_use_of_required_reason_api#4278397).**
-
-### Example PrivacyInfo.xcprivacy
-
-```xml
-
-
-
-
- NSPrivacyAccessedAPITypes
-
-
-
- NSPrivacyAccessedAPIType
- NSPrivacyAccessedAPICategoryDiskSpace
- NSPrivacyAccessedAPITypeReasons
-
- 85F4.1
-
-
-
-
-
-```
-
## Example Plugin Usage
```typescript
@@ -176,10 +143,6 @@ Get the device's current language locale tag.
| **`manufacturer`** | string
| The manufacturer of the device. | 1.0.0 |
| **`isVirtual`** | boolean
| Whether the app is running in a simulator/emulator. | 1.0.0 |
| **`memUsed`** | number
| Approximate memory used by the current app, in bytes. Divide by 1048576 to get the number of MBs used. | 1.0.0 |
-| **`diskFree`** | number
| How much free disk space is available on the normal data storage path for the os, in bytes. On Android it returns the free disk space on the "system" partition holding the core Android OS. On iOS this value is not accurate. | 1.0.0 |
-| **`diskTotal`** | number
| The total size of the normal data storage path for the OS, in bytes. On Android it returns the disk space on the "system" partition holding the core Android OS. | 1.0.0 |
-| **`realDiskFree`** | number
| How much free disk space is available on the normal data storage, in bytes. | 1.1.0 |
-| **`realDiskTotal`** | number
| The total size of the normal data storage path, in bytes. | 1.1.0 |
| **`webViewVersion`** | string
| The web view browser version | 1.0.0 |
diff --git a/device/android/src/main/java/com/capacitorjs/plugins/device/Device.java b/device/android/src/main/java/com/capacitorjs/plugins/device/Device.java
index 477268c10..40d997550 100644
--- a/device/android/src/main/java/com/capacitorjs/plugins/device/Device.java
+++ b/device/android/src/main/java/com/capacitorjs/plugins/device/Device.java
@@ -7,8 +7,6 @@
import android.content.pm.PackageManager;
import android.os.BatteryManager;
import android.os.Build;
-import android.os.Environment;
-import android.os.StatFs;
import android.provider.Settings;
import android.webkit.WebView;
@@ -26,26 +24,6 @@ public long getMemUsed() {
return usedMem;
}
- public long getDiskFree() {
- StatFs statFs = new StatFs(Environment.getRootDirectory().getAbsolutePath());
- return statFs.getAvailableBlocksLong() * statFs.getBlockSizeLong();
- }
-
- public long getDiskTotal() {
- StatFs statFs = new StatFs(Environment.getRootDirectory().getAbsolutePath());
- return statFs.getBlockCountLong() * statFs.getBlockSizeLong();
- }
-
- public long getRealDiskFree() {
- StatFs statFs = new StatFs(Environment.getDataDirectory().getAbsolutePath());
- return statFs.getAvailableBlocksLong() * statFs.getBlockSizeLong();
- }
-
- public long getRealDiskTotal() {
- StatFs statFs = new StatFs(Environment.getDataDirectory().getAbsolutePath());
- return statFs.getBlockCountLong() * statFs.getBlockSizeLong();
- }
-
public String getPlatform() {
return "android";
}
diff --git a/device/android/src/main/java/com/capacitorjs/plugins/device/DevicePlugin.java b/device/android/src/main/java/com/capacitorjs/plugins/device/DevicePlugin.java
index 9fed0725d..13f621353 100644
--- a/device/android/src/main/java/com/capacitorjs/plugins/device/DevicePlugin.java
+++ b/device/android/src/main/java/com/capacitorjs/plugins/device/DevicePlugin.java
@@ -32,10 +32,6 @@ public void getInfo(PluginCall call) {
JSObject r = new JSObject();
r.put("memUsed", implementation.getMemUsed());
- r.put("diskFree", implementation.getDiskFree());
- r.put("diskTotal", implementation.getDiskTotal());
- r.put("realDiskFree", implementation.getRealDiskFree());
- r.put("realDiskTotal", implementation.getRealDiskTotal());
r.put("model", android.os.Build.MODEL);
r.put("operatingSystem", "android");
r.put("osVersion", android.os.Build.VERSION.RELEASE);
diff --git a/device/ios/Sources/DevicePlugin/Device.swift b/device/ios/Sources/DevicePlugin/Device.swift
index cf2a0e832..22c194609 100644
--- a/device/ios/Sources/DevicePlugin/Device.swift
+++ b/device/ios/Sources/DevicePlugin/Device.swift
@@ -21,48 +21,6 @@ import UIKit
}
}
- /**
- * Get free disk space
- */
- public func getFreeDiskSize() -> Int64? {
- let paths = NSSearchPathForDirectoriesInDomains(.documentDirectory, .userDomainMask, true)
- if let dictionary = try? FileManager.default.attributesOfFileSystem(forPath: paths.last!) {
- if let freeSize = dictionary[FileAttributeKey.systemFreeSize] as? NSNumber {
- return freeSize.int64Value
- }
- }
- return nil
- }
-
- /**
- * Get real free disk space
- */
- public func getRealFreeDiskSize() -> Int64? {
- do {
- let values = try URL(fileURLWithPath: NSHomeDirectory() as String).resourceValues(forKeys: [URLResourceKey.volumeAvailableCapacityForImportantUsageKey])
- if let available = values.volumeAvailableCapacityForImportantUsage {
- return available
- } else {
- return nil
- }
- } catch {
- return nil
- }
- }
-
- /**
- * Get total disk size
- */
- public func getTotalDiskSize() -> Int64? {
- let paths = NSSearchPathForDirectoriesInDomains(.documentDirectory, .userDomainMask, true)
- if let dictionary = try? FileManager.default.attributesOfFileSystem(forPath: paths.last!) {
- if let freeSize = dictionary[FileAttributeKey.systemSize] as? NSNumber {
- return freeSize.int64Value
- }
- }
- return nil
- }
-
public func getLanguageCode() -> String {
return String(Locale.preferredLanguages[0].prefix(2))
}
diff --git a/device/ios/Sources/DevicePlugin/DevicePlugin.swift b/device/ios/Sources/DevicePlugin/DevicePlugin.swift
index 7b18c82ef..b340a7468 100644
--- a/device/ios/Sources/DevicePlugin/DevicePlugin.swift
+++ b/device/ios/Sources/DevicePlugin/DevicePlugin.swift
@@ -34,17 +34,10 @@ public class DevicePlugin: CAPPlugin, CAPBridgedPlugin {
#endif
let memUsed = implementation.getMemoryUsage()
- let diskFree = implementation.getFreeDiskSize() ?? 0
- let realDiskFree = implementation.getRealFreeDiskSize() ?? 0
- let diskTotal = implementation.getTotalDiskSize() ?? 0
let systemVersionNum = implementation.getSystemVersionInt() ?? 0
call.resolve([
"memUsed": memUsed,
- "diskFree": diskFree,
- "diskTotal": diskTotal,
- "realDiskFree": realDiskFree,
- "realDiskTotal": diskTotal,
"name": UIDevice.current.name,
"model": modelName,
"operatingSystem": "ios",
diff --git a/device/package.json b/device/package.json
index 3f082bae3..7544f19ec 100644
--- a/device/package.json
+++ b/device/package.json
@@ -41,7 +41,7 @@
"prettier": "prettier \"**/*.{css,html,ts,js,java}\"",
"swiftlint": "node-swiftlint",
"docgen": "docgen --api DevicePlugin --output-readme README.md --output-json dist/docs.json",
- "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.js",
+ "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.mjs",
"clean": "rimraf ./dist",
"watch": "tsc --watch",
"prepublishOnly": "npm run build",
@@ -60,7 +60,7 @@
"prettier": "~2.3.0",
"prettier-plugin-java": "~1.0.2",
"rimraf": "^3.0.0",
- "rollup": "^2.29.0",
+ "rollup": "^4.26.0",
"swiftlint": "^1.0.1",
"ts-node": "^9.1.1",
"typescript": "~4.1.5",
diff --git a/device/rollup.config.js b/device/rollup.config.mjs
similarity index 100%
rename from device/rollup.config.js
rename to device/rollup.config.mjs
diff --git a/device/src/__tests__/useragent.spec.ts b/device/src/__tests__/useragent.spec.ts
index 35fa58c59..69df133b1 100644
--- a/device/src/__tests__/useragent.spec.ts
+++ b/device/src/__tests__/useragent.spec.ts
@@ -1,11 +1,9 @@
-import type { WebPluginConfig } from '@capacitor/core';
import { test } from 'uvu';
import * as assert from 'uvu/assert';
import { DeviceWeb } from '../web';
-const config: WebPluginConfig = { name: 'DevicePlugin' };
-const web = new DeviceWeb(config);
+const web = new DeviceWeb();
test('Chrome', () => {
// Mock empty navigator/window objects
diff --git a/device/src/definitions.ts b/device/src/definitions.ts
index fd64be9a2..bbe39d611 100644
--- a/device/src/definitions.ts
+++ b/device/src/definitions.ts
@@ -99,44 +99,6 @@ export interface DeviceInfo {
*/
memUsed?: number;
- /**
- * How much free disk space is available on the normal data storage
- * path for the os, in bytes.
- *
- * On Android it returns the free disk space on the "system"
- * partition holding the core Android OS.
- * On iOS this value is not accurate.
- *
- * @deprecated Use `realDiskFree`.
- * @since 1.0.0
- */
- diskFree?: number;
-
- /**
- * The total size of the normal data storage path for the OS, in bytes.
- *
- * On Android it returns the disk space on the "system"
- * partition holding the core Android OS.
- *
- * @deprecated Use `realDiskTotal`.
- * @since 1.0.0
- */
- diskTotal?: number;
-
- /**
- * How much free disk space is available on the normal data storage, in bytes.
- *
- * @since 1.1.0
- */
- realDiskFree?: number;
-
- /**
- * The total size of the normal data storage path, in bytes.
- *
- * @since 1.1.0
- */
- realDiskTotal?: number;
-
/**
* The web view browser version
*
diff --git a/dialog/package.json b/dialog/package.json
index 033214c42..7e1e8850f 100644
--- a/dialog/package.json
+++ b/dialog/package.json
@@ -40,7 +40,7 @@
"prettier": "prettier \"**/*.{css,html,ts,js,java}\"",
"swiftlint": "node-swiftlint",
"docgen": "docgen --api DialogPlugin --output-readme README.md --output-json dist/docs.json",
- "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.js",
+ "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.mjs",
"clean": "rimraf ./dist",
"watch": "tsc --watch",
"prepublishOnly": "npm run build",
@@ -58,7 +58,7 @@
"prettier": "~2.3.0",
"prettier-plugin-java": "~1.0.2",
"rimraf": "^3.0.0",
- "rollup": "^2.29.0",
+ "rollup": "^4.26.0",
"swiftlint": "^1.0.1",
"typescript": "~4.1.5"
},
diff --git a/dialog/rollup.config.js b/dialog/rollup.config.mjs
similarity index 100%
rename from dialog/rollup.config.js
rename to dialog/rollup.config.mjs
diff --git a/filesystem/package.json b/filesystem/package.json
index e22cc71b7..d59ed59ca 100644
--- a/filesystem/package.json
+++ b/filesystem/package.json
@@ -40,7 +40,7 @@
"prettier": "prettier \"**/*.{css,html,ts,js,java}\"",
"swiftlint": "node-swiftlint",
"docgen": "docgen --api FilesystemPlugin --output-readme README.md --output-json dist/docs.json",
- "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.js",
+ "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.mjs",
"clean": "rimraf ./dist",
"watch": "tsc --watch",
"prepublishOnly": "npm run build",
@@ -58,7 +58,7 @@
"prettier": "~2.3.0",
"prettier-plugin-java": "~1.0.2",
"rimraf": "^3.0.0",
- "rollup": "^2.29.0",
+ "rollup": "^4.26.0",
"swiftlint": "^1.0.1",
"typescript": "~4.1.5"
},
diff --git a/filesystem/rollup.config.js b/filesystem/rollup.config.mjs
similarity index 100%
rename from filesystem/rollup.config.js
rename to filesystem/rollup.config.mjs
diff --git a/geolocation/README.md b/geolocation/README.md
index 2c2f86313..e390eac52 100644
--- a/geolocation/README.md
+++ b/geolocation/README.md
@@ -36,7 +36,7 @@ Read about [Setting Permissions](https://capacitorjs.com/docs/android/configurat
This plugin will use the following project variables (defined in your app's `variables.gradle` file):
-- `playServicesLocationVersion` version of `com.google.android.gms:play-services-location` (default: `21.1.0`)
+- `playServicesLocationVersion` version of `com.google.android.gms:play-services-location` (default: `21.3.0`)
## Example
diff --git a/geolocation/android/build.gradle b/geolocation/android/build.gradle
index 31e2b7564..013a6ff4d 100644
--- a/geolocation/android/build.gradle
+++ b/geolocation/android/build.gradle
@@ -4,7 +4,7 @@ ext {
androidxAppCompatVersion = project.hasProperty('androidxAppCompatVersion') ? rootProject.ext.androidxAppCompatVersion : '1.7.0'
androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.2.1'
androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.6.1'
- playServicesLocationVersion = project.hasProperty('playServicesLocationVersion') ? rootProject.ext.playServicesLocationVersion : '21.1.0'
+ playServicesLocationVersion = project.hasProperty('playServicesLocationVersion') ? rootProject.ext.playServicesLocationVersion : '21.3.0'
}
buildscript {
diff --git a/geolocation/package.json b/geolocation/package.json
index 79207416b..2f8194e74 100644
--- a/geolocation/package.json
+++ b/geolocation/package.json
@@ -40,7 +40,7 @@
"prettier": "prettier \"**/*.{css,html,ts,js,java}\"",
"swiftlint": "node-swiftlint",
"docgen": "docgen --api GeolocationPlugin --output-readme README.md --output-json dist/docs.json",
- "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.js",
+ "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.mjs",
"clean": "rimraf ./dist",
"watch": "tsc --watch",
"prepublishOnly": "npm run build",
@@ -58,7 +58,7 @@
"prettier": "~2.3.0",
"prettier-plugin-java": "~1.0.2",
"rimraf": "^3.0.0",
- "rollup": "^2.29.0",
+ "rollup": "^4.26.0",
"swiftlint": "^1.0.1",
"typescript": "~4.1.5"
},
diff --git a/geolocation/rollup.config.js b/geolocation/rollup.config.mjs
similarity index 100%
rename from geolocation/rollup.config.js
rename to geolocation/rollup.config.mjs
diff --git a/haptics/android/src/main/java/com/capacitorjs/plugins/haptics/Haptics.java b/haptics/android/src/main/java/com/capacitorjs/plugins/haptics/Haptics.java
index e9f182e68..392aa4190 100644
--- a/haptics/android/src/main/java/com/capacitorjs/plugins/haptics/Haptics.java
+++ b/haptics/android/src/main/java/com/capacitorjs/plugins/haptics/Haptics.java
@@ -10,12 +10,10 @@
public class Haptics {
- private Context context;
private boolean selectionStarted = false;
private final Vibrator vibrator;
Haptics(Context context) {
- this.context = context;
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
VibratorManager vibratorManager = (VibratorManager) context.getSystemService(Context.VIBRATOR_MANAGER_SERVICE);
this.vibrator = vibratorManager.getDefaultVibrator();
@@ -43,8 +41,8 @@ private void vibratePre26(int duration) {
}
@SuppressWarnings({ "deprecation" })
- private void vibratePre26(long[] pattern, int repeat) {
- vibrator.vibrate(pattern, repeat);
+ private void vibratePre26(long[] pattern) {
+ vibrator.vibrate(pattern, -1);
}
public void selectionStart() {
@@ -65,7 +63,7 @@ public void performHaptics(HapticsVibrationType type) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
vibrator.vibrate(VibrationEffect.createWaveform(type.getTimings(), type.getAmplitudes(), -1));
} else {
- vibratePre26(type.getOldSDKPattern(), -1);
+ vibratePre26(type.getOldSDKPattern());
}
}
}
diff --git a/haptics/package.json b/haptics/package.json
index 7923375a3..13834b1fa 100644
--- a/haptics/package.json
+++ b/haptics/package.json
@@ -40,7 +40,7 @@
"prettier": "prettier \"**/*.{css,html,ts,js,java}\"",
"swiftlint": "node-swiftlint",
"docgen": "docgen --api HapticsPlugin --output-readme README.md --output-json dist/docs.json",
- "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.js",
+ "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.mjs",
"clean": "rimraf ./dist",
"watch": "tsc --watch",
"prepublishOnly": "npm run build",
@@ -58,7 +58,7 @@
"prettier": "~2.3.0",
"prettier-plugin-java": "~1.0.2",
"rimraf": "^3.0.0",
- "rollup": "^2.29.0",
+ "rollup": "^4.26.0",
"swiftlint": "^1.0.1",
"typescript": "~4.1.5"
},
diff --git a/haptics/rollup.config.js b/haptics/rollup.config.mjs
similarity index 100%
rename from haptics/rollup.config.js
rename to haptics/rollup.config.mjs
diff --git a/haptics/src/definitions.ts b/haptics/src/definitions.ts
index 01389a6d6..aa9f61b8f 100644
--- a/haptics/src/definitions.ts
+++ b/haptics/src/definitions.ts
@@ -124,27 +124,3 @@ export interface VibrateOptions {
*/
duration: number;
}
-
-/**
- * @deprecated Use `ImpactOptions`.
- * @since 1.0.0
- */
-export type HapticsImpactOptions = ImpactOptions;
-
-/**
- * @deprecated Use `NotificationOptions`.
- * @since 1.0.0
- */
-export type HapticsNotificationOptions = NotificationOptions;
-
-/**
- * @deprecated Use `NotificationType`.
- * @since 1.0.0
- */
-export const HapticsNotificationType = NotificationType;
-
-/**
- * @deprecated Use `ImpactStyle`.
- * @since 1.0.0
- */
-export const HapticsImpactStyle = ImpactStyle;
diff --git a/keyboard/package.json b/keyboard/package.json
index f9cbecc10..7649cf881 100644
--- a/keyboard/package.json
+++ b/keyboard/package.json
@@ -40,7 +40,7 @@
"prettier": "prettier \"**/*.{css,html,ts,js,java}\"",
"swiftlint": "node-swiftlint",
"docgen": "docgen --api KeyboardPlugin --output-readme README.md --output-json dist/docs.json",
- "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.js",
+ "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.mjs",
"clean": "rimraf ./dist",
"watch": "tsc --watch",
"prepublishOnly": "npm run build",
@@ -59,7 +59,7 @@
"prettier": "~2.3.0",
"prettier-plugin-java": "~1.0.2",
"rimraf": "^3.0.0",
- "rollup": "^2.29.0",
+ "rollup": "^4.26.0",
"swiftlint": "^1.0.1",
"typescript": "~4.1.5"
},
diff --git a/keyboard/rollup.config.js b/keyboard/rollup.config.mjs
similarity index 100%
rename from keyboard/rollup.config.js
rename to keyboard/rollup.config.mjs
diff --git a/local-notifications/package.json b/local-notifications/package.json
index db666b815..52d9f4c9c 100644
--- a/local-notifications/package.json
+++ b/local-notifications/package.json
@@ -40,7 +40,7 @@
"prettier": "prettier \"**/*.{css,html,ts,js,java}\"",
"swiftlint": "node-swiftlint",
"docgen": "docgen --api LocalNotificationsPlugin --output-readme README.md --output-json dist/docs.json",
- "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.js",
+ "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.mjs",
"clean": "rimraf ./dist",
"watch": "tsc --watch",
"prepublishOnly": "npm run build",
@@ -59,7 +59,7 @@
"prettier": "~2.3.0",
"prettier-plugin-java": "~1.0.2",
"rimraf": "^3.0.0",
- "rollup": "^2.29.0",
+ "rollup": "^4.26.0",
"swiftlint": "^1.0.1",
"typescript": "~4.1.5"
},
diff --git a/local-notifications/rollup.config.js b/local-notifications/rollup.config.mjs
similarity index 100%
rename from local-notifications/rollup.config.js
rename to local-notifications/rollup.config.mjs
diff --git a/motion/package.json b/motion/package.json
index 4972c1841..4a8a66630 100644
--- a/motion/package.json
+++ b/motion/package.json
@@ -33,7 +33,7 @@
"eslint": "eslint . --ext ts",
"prettier": "prettier \"**/*.{css,html,ts,js,java}\"",
"docgen": "docgen --api MotionPlugin --output-readme README.md --output-json dist/docs.json",
- "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.js",
+ "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.mjs",
"clean": "rimraf ./dist",
"watch": "tsc --watch",
"prepublishOnly": "npm run build"
@@ -49,7 +49,7 @@
"prettier": "~2.3.0",
"prettier-plugin-java": "~1.0.2",
"rimraf": "^3.0.0",
- "rollup": "^2.29.0",
+ "rollup": "^4.26.0",
"typescript": "~4.1.5"
},
"peerDependencies": {
diff --git a/motion/rollup.config.js b/motion/rollup.config.mjs
similarity index 100%
rename from motion/rollup.config.js
rename to motion/rollup.config.mjs
diff --git a/network/package.json b/network/package.json
index 2675a31ec..83b196989 100644
--- a/network/package.json
+++ b/network/package.json
@@ -40,7 +40,7 @@
"prettier": "prettier \"**/*.{css,html,ts,js,java}\"",
"swiftlint": "node-swiftlint",
"docgen": "docgen --api NetworkPlugin --output-readme README.md --output-json dist/docs.json",
- "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.js",
+ "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.mjs",
"clean": "rimraf ./dist",
"watch": "tsc --watch",
"prepublishOnly": "npm run build",
@@ -58,7 +58,7 @@
"prettier": "~2.3.0",
"prettier-plugin-java": "~1.0.2",
"rimraf": "^3.0.0",
- "rollup": "^2.29.0",
+ "rollup": "^4.26.0",
"swiftlint": "^1.0.1",
"typescript": "~4.1.5"
},
diff --git a/network/rollup.config.js b/network/rollup.config.mjs
similarity index 100%
rename from network/rollup.config.js
rename to network/rollup.config.mjs
diff --git a/preferences/package.json b/preferences/package.json
index ad29b4cad..fb2771568 100644
--- a/preferences/package.json
+++ b/preferences/package.json
@@ -40,7 +40,7 @@
"prettier": "prettier \"**/*.{css,html,ts,js,java}\"",
"swiftlint": "node-swiftlint",
"docgen": "docgen --api PreferencesPlugin --output-readme README.md --output-json dist/docs.json",
- "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.js",
+ "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.mjs",
"clean": "rimraf ./dist",
"watch": "tsc --watch",
"prepublishOnly": "npm run build",
@@ -58,7 +58,7 @@
"prettier": "~2.3.0",
"prettier-plugin-java": "~1.0.2",
"rimraf": "^3.0.0",
- "rollup": "^2.29.0",
+ "rollup": "^4.26.0",
"swiftlint": "^1.0.1",
"typescript": "~4.1.5"
},
diff --git a/preferences/rollup.config.js b/preferences/rollup.config.mjs
similarity index 100%
rename from preferences/rollup.config.js
rename to preferences/rollup.config.mjs
diff --git a/push-notifications/package.json b/push-notifications/package.json
index 15e73c4ed..a4e59a173 100644
--- a/push-notifications/package.json
+++ b/push-notifications/package.json
@@ -40,7 +40,7 @@
"prettier": "prettier \"**/*.{css,html,ts,js,java}\"",
"swiftlint": "node-swiftlint",
"docgen": "docgen --api PushNotificationsPlugin --output-readme README.md --output-json dist/docs.json",
- "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.js",
+ "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.mjs",
"clean": "rimraf ./dist",
"watch": "tsc --watch",
"prepublishOnly": "npm run build",
@@ -59,7 +59,7 @@
"prettier": "~2.3.0",
"prettier-plugin-java": "~1.0.2",
"rimraf": "^3.0.0",
- "rollup": "^2.29.0",
+ "rollup": "^4.26.0",
"swiftlint": "^1.0.1",
"typescript": "~4.1.5"
},
diff --git a/push-notifications/rollup.config.js b/push-notifications/rollup.config.mjs
similarity index 100%
rename from push-notifications/rollup.config.js
rename to push-notifications/rollup.config.mjs
diff --git a/screen-orientation/package.json b/screen-orientation/package.json
index 510411bf4..2739f8d04 100644
--- a/screen-orientation/package.json
+++ b/screen-orientation/package.json
@@ -40,7 +40,7 @@
"prettier": "prettier \"**/*.{css,html,ts,js,java}\"",
"swiftlint": "node-swiftlint",
"docgen": "docgen --api ScreenOrientationPlugin --output-readme README.md --output-json dist/docs.json",
- "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.js",
+ "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.mjs",
"clean": "rimraf ./dist",
"watch": "tsc --watch",
"prepublishOnly": "npm run build",
@@ -58,7 +58,7 @@
"prettier": "~2.3.0",
"prettier-plugin-java": "~1.0.2",
"rimraf": "^3.0.0",
- "rollup": "^2.29.0",
+ "rollup": "^4.26.0",
"swiftlint": "^1.0.1",
"typescript": "~4.1.5"
},
diff --git a/screen-orientation/rollup.config.js b/screen-orientation/rollup.config.mjs
similarity index 100%
rename from screen-orientation/rollup.config.js
rename to screen-orientation/rollup.config.mjs
diff --git a/screen-reader/package.json b/screen-reader/package.json
index 9f1a7bc74..bdc040682 100644
--- a/screen-reader/package.json
+++ b/screen-reader/package.json
@@ -40,7 +40,7 @@
"prettier": "prettier \"**/*.{css,html,ts,js,java}\"",
"swiftlint": "node-swiftlint",
"docgen": "docgen --api ScreenReaderPlugin --output-readme README.md --output-json dist/docs.json",
- "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.js",
+ "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.mjs",
"clean": "rimraf ./dist",
"watch": "tsc --watch",
"prepublishOnly": "npm run build",
@@ -58,7 +58,7 @@
"prettier": "~2.3.0",
"prettier-plugin-java": "~1.0.2",
"rimraf": "^3.0.0",
- "rollup": "^2.29.0",
+ "rollup": "^4.26.0",
"swiftlint": "^1.0.1",
"typescript": "~4.1.5"
},
diff --git a/screen-reader/rollup.config.js b/screen-reader/rollup.config.mjs
similarity index 100%
rename from screen-reader/rollup.config.js
rename to screen-reader/rollup.config.mjs
diff --git a/share/package.json b/share/package.json
index 6121f2fe5..961be7159 100644
--- a/share/package.json
+++ b/share/package.json
@@ -40,7 +40,7 @@
"prettier": "prettier \"**/*.{css,html,ts,js,java}\"",
"swiftlint": "node-swiftlint",
"docgen": "docgen --api SharePlugin --output-readme README.md --output-json dist/docs.json",
- "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.js",
+ "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.mjs",
"clean": "rimraf ./dist",
"watch": "tsc --watch",
"prepublishOnly": "npm run build",
@@ -58,7 +58,7 @@
"prettier": "~2.3.0",
"prettier-plugin-java": "~1.0.2",
"rimraf": "^3.0.0",
- "rollup": "^2.29.0",
+ "rollup": "^4.26.0",
"swiftlint": "^1.0.1",
"typescript": "~4.1.5"
},
diff --git a/share/rollup.config.js b/share/rollup.config.mjs
similarity index 100%
rename from share/rollup.config.js
rename to share/rollup.config.mjs
diff --git a/splash-screen/package.json b/splash-screen/package.json
index 0139e1f11..58d1e4883 100644
--- a/splash-screen/package.json
+++ b/splash-screen/package.json
@@ -40,7 +40,7 @@
"prettier": "prettier \"**/*.{css,html,ts,js,java}\"",
"swiftlint": "node-swiftlint",
"docgen": "docgen --api SplashScreenPlugin --output-readme README.md --output-json dist/docs.json",
- "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.js",
+ "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.mjs",
"clean": "rimraf ./dist",
"watch": "tsc --watch",
"prepublishOnly": "npm run build",
@@ -59,7 +59,7 @@
"prettier": "~2.3.0",
"prettier-plugin-java": "~1.0.2",
"rimraf": "^3.0.2",
- "rollup": "^2.32.0",
+ "rollup": "^4.26.0",
"swiftlint": "^1.0.1",
"typescript": "~4.1.5"
},
diff --git a/splash-screen/rollup.config.js b/splash-screen/rollup.config.mjs
similarity index 100%
rename from splash-screen/rollup.config.js
rename to splash-screen/rollup.config.mjs
diff --git a/status-bar/android/src/main/java/com/capacitorjs/plugins/statusbar/StatusBar.java b/status-bar/android/src/main/java/com/capacitorjs/plugins/statusbar/StatusBar.java
index 1a903d133..a6570d4c1 100644
--- a/status-bar/android/src/main/java/com/capacitorjs/plugins/statusbar/StatusBar.java
+++ b/status-bar/android/src/main/java/com/capacitorjs/plugins/statusbar/StatusBar.java
@@ -1,9 +1,11 @@
package com.capacitorjs.plugins.statusbar;
import android.graphics.Color;
+import android.os.Build;
import android.util.DisplayMetrics;
import android.view.View;
import android.view.Window;
+import android.view.WindowInsets;
import android.view.WindowManager;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.view.ViewCompat;
@@ -113,15 +115,19 @@ private String getStyle() {
}
private int getStatusBarHeight() {
- int statusbarHeight = 0;
- int resourceId = activity.getApplicationContext().getResources().getIdentifier("status_bar_height", "dimen", "android");
- if (resourceId > 0) {
- statusbarHeight = (int) activity.getApplicationContext().getResources().getDimension(resourceId);
+ DisplayMetrics metrics = activity.getResources().getDisplayMetrics();
+
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
+ WindowInsets insets = activity.getWindowManager().getCurrentWindowMetrics().getWindowInsets();
+ return (int) (insets.getInsets(WindowInsets.Type.statusBars()).top / metrics.density);
}
- DisplayMetrics metrics = activity.getApplicationContext().getResources().getDisplayMetrics();
- float densityDpi = metrics.density;
+ WindowInsets insets = activity.getWindow().getDecorView().getRootWindowInsets();
+ if (insets != null) {
+ return (int) (insets.getSystemWindowInsetTop() / metrics.density);
+ }
- return (int) (statusbarHeight / densityDpi);
+ // Fallback if the insets are not available
+ return 0;
}
}
diff --git a/status-bar/package.json b/status-bar/package.json
index 0f9267f6d..5f29c93cc 100644
--- a/status-bar/package.json
+++ b/status-bar/package.json
@@ -40,7 +40,7 @@
"prettier": "prettier \"**/*.{css,html,ts,js,java}\"",
"swiftlint": "node-swiftlint",
"docgen": "docgen --api StatusBarPlugin --output-readme README.md --output-json dist/docs.json",
- "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.js",
+ "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.mjs",
"clean": "rimraf ./dist",
"watch": "tsc --watch",
"prepublishOnly": "npm run build",
@@ -58,7 +58,7 @@
"prettier": "~2.3.0",
"prettier-plugin-java": "~1.0.2",
"rimraf": "^3.0.0",
- "rollup": "^2.29.0",
+ "rollup": "^4.26.0",
"swiftlint": "^1.0.1",
"typescript": "~4.1.5"
},
diff --git a/status-bar/rollup.config.js b/status-bar/rollup.config.mjs
similarity index 100%
rename from status-bar/rollup.config.js
rename to status-bar/rollup.config.mjs
diff --git a/text-zoom/package.json b/text-zoom/package.json
index 38452b999..59fe3019d 100644
--- a/text-zoom/package.json
+++ b/text-zoom/package.json
@@ -40,7 +40,7 @@
"prettier": "prettier \"**/*.{css,html,ts,js,java}\"",
"swiftlint": "node-swiftlint",
"docgen": "docgen --api TextZoomPlugin --output-readme README.md --output-json dist/docs.json",
- "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.js",
+ "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.mjs",
"clean": "rimraf ./dist",
"watch": "tsc --watch",
"prepublishOnly": "npm run build",
@@ -58,7 +58,7 @@
"prettier": "~2.3.0",
"prettier-plugin-java": "~1.0.2",
"rimraf": "^3.0.0",
- "rollup": "^2.29.0",
+ "rollup": "^4.26.0",
"swiftlint": "^1.0.1",
"typescript": "~4.1.5"
},
diff --git a/text-zoom/rollup.config.js b/text-zoom/rollup.config.mjs
similarity index 100%
rename from text-zoom/rollup.config.js
rename to text-zoom/rollup.config.mjs
diff --git a/text-zoom/src/ios.ts b/text-zoom/src/ios.ts
index 6aa7ec0a5..3b307a244 100644
--- a/text-zoom/src/ios.ts
+++ b/text-zoom/src/ios.ts
@@ -1,11 +1,4 @@
-import { Plugins } from '@capacitor/core';
-
-import type {
- GetPreferredResult,
- GetResult,
- SetOptions,
- TextZoomPlugin,
-} from './definitions';
+import type { GetResult, SetOptions, TextZoomPlugin } from './definitions';
export class TextZoomIOS implements TextZoomPlugin {
static readonly TEXT_SIZE_REGEX = /(\d+)%/;
@@ -17,8 +10,8 @@ export class TextZoomIOS implements TextZoomPlugin {
return { value };
}
- async getPreferred(): Promise {
- return Plugins.TextZoom.getPreferred();
+ async getPreferred(): Promise {
+ throw 'Native implementation will be used';
}
async set(options: SetOptions): Promise {
diff --git a/toast/package.json b/toast/package.json
index 2ff6ab364..caff08ffc 100644
--- a/toast/package.json
+++ b/toast/package.json
@@ -40,7 +40,7 @@
"prettier": "prettier \"**/*.{css,html,ts,js,java}\"",
"swiftlint": "node-swiftlint",
"docgen": "docgen --api ToastPlugin --output-readme README.md --output-json dist/docs.json",
- "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.js",
+ "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.mjs",
"clean": "rimraf ./dist",
"watch": "tsc --watch",
"prepublishOnly": "npm run build",
@@ -58,7 +58,7 @@
"prettier": "~2.3.0",
"prettier-plugin-java": "~1.0.2",
"rimraf": "^3.0.0",
- "rollup": "^2.29.0",
+ "rollup": "^4.26.0",
"swiftlint": "^1.0.1",
"typescript": "~4.1.5"
},
diff --git a/toast/rollup.config.js b/toast/rollup.config.mjs
similarity index 100%
rename from toast/rollup.config.js
rename to toast/rollup.config.mjs