@capacitor/haptics 8.0.2 → 9.0.0-next.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.
- package/CapacitorHaptics.podspec +1 -1
- package/Package.swift +3 -4
- package/android/build.gradle +6 -6
- package/android/proguard-rules.pro +21 -0
- package/android/src/main/java/com/capacitorjs/plugins/haptics/Haptics.java +2 -20
- package/android/src/main/java/com/capacitorjs/plugins/haptics/arguments/HapticsImpactType.java +4 -11
- package/android/src/main/java/com/capacitorjs/plugins/haptics/arguments/HapticsNotificationType.java +4 -16
- package/android/src/main/java/com/capacitorjs/plugins/haptics/arguments/HapticsSelectionType.java +0 -6
- package/android/src/main/java/com/capacitorjs/plugins/haptics/arguments/HapticsVibrationType.java +0 -2
- package/dist/plugin.cjs.js.map +1 -1
- package/dist/plugin.js.map +1 -1
- package/package.json +11 -13
package/CapacitorHaptics.podspec
CHANGED
|
@@ -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-haptics.git', :tag => 'v' + package['version'] }
|
|
13
13
|
s.source_files = 'ios/Sources/**/*.{swift,h,m,c,cc,mm,cpp}', 'haptics/ios/Sources/**/*.{swift,h,m,c,cc,mm,cpp}'
|
|
14
|
-
s.ios.deployment_target = '
|
|
14
|
+
s.ios.deployment_target = '16.0'
|
|
15
15
|
s.dependency 'Capacitor'
|
|
16
16
|
s.swift_version = '5.1'
|
|
17
17
|
end
|
package/Package.swift
CHANGED
|
@@ -3,21 +3,20 @@ import PackageDescription
|
|
|
3
3
|
|
|
4
4
|
let package = Package(
|
|
5
5
|
name: "CapacitorHaptics",
|
|
6
|
-
platforms: [.iOS(.
|
|
6
|
+
platforms: [.iOS(.v16)],
|
|
7
7
|
products: [
|
|
8
8
|
.library(
|
|
9
9
|
name: "CapacitorHaptics",
|
|
10
10
|
targets: ["HapticsPlugin"])
|
|
11
11
|
],
|
|
12
12
|
dependencies: [
|
|
13
|
-
.package(url: "https://github.com/ionic-team/capacitor
|
|
13
|
+
.package(url: "https://github.com/ionic-team/capacitor.git", from: "9.0.0-beta.0")
|
|
14
14
|
],
|
|
15
15
|
targets: [
|
|
16
16
|
.target(
|
|
17
17
|
name: "HapticsPlugin",
|
|
18
18
|
dependencies: [
|
|
19
|
-
.product(name: "Capacitor", package: "capacitor
|
|
20
|
-
.product(name: "Cordova", package: "capacitor-swift-pm")
|
|
19
|
+
.product(name: "Capacitor", package: "capacitor")
|
|
21
20
|
],
|
|
22
21
|
path: "ios/Sources/HapticsPlugin"),
|
|
23
22
|
.testTarget(
|
package/android/build.gradle
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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.
|
|
4
|
+
androidxAppCompatVersion = project.hasProperty('androidxAppCompatVersion') ? rootProject.ext.androidxAppCompatVersion : '1.8.0'
|
|
5
5
|
androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.3.0'
|
|
6
6
|
androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.7.0'
|
|
7
7
|
}
|
|
@@ -15,9 +15,9 @@ buildscript {
|
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
17
|
dependencies {
|
|
18
|
-
classpath 'com.android.tools.build:gradle:
|
|
18
|
+
classpath 'com.android.tools.build:gradle:9.4.1'
|
|
19
19
|
if (System.getenv("CAP_PLUGIN_PUBLISH") == "true") {
|
|
20
|
-
classpath 'io.github.gradle-nexus:publish-plugin:
|
|
20
|
+
classpath 'io.github.gradle-nexus:publish-plugin:2.0.0'
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
23
|
}
|
|
@@ -31,10 +31,10 @@ if (System.getenv("CAP_PLUGIN_PUBLISH") == "true") {
|
|
|
31
31
|
|
|
32
32
|
android {
|
|
33
33
|
namespace = "com.capacitorjs.plugins.haptics"
|
|
34
|
-
compileSdk = project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion :
|
|
34
|
+
compileSdk = project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 37
|
|
35
35
|
defaultConfig {
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
consumerProguardFiles "proguard-rules.pro"
|
|
37
|
+
minSdkVersion project.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion : 26
|
|
38
38
|
versionCode 1
|
|
39
39
|
versionName "1.0"
|
|
40
40
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Add project specific ProGuard rules here.
|
|
2
|
+
# You can control the set of applied configuration files using the
|
|
3
|
+
# proguardFiles setting in build.gradle.
|
|
4
|
+
#
|
|
5
|
+
# For more details, see
|
|
6
|
+
# http://developer.android.com/guide/developing/tools/proguard.html
|
|
7
|
+
|
|
8
|
+
# If your project uses WebView with JS, uncomment the following
|
|
9
|
+
# and specify the fully qualified class name to the JavaScript interface
|
|
10
|
+
# class:
|
|
11
|
+
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
|
|
12
|
+
# public *;
|
|
13
|
+
#}
|
|
14
|
+
|
|
15
|
+
# Uncomment this to preserve the line number information for
|
|
16
|
+
# debugging stack traces.
|
|
17
|
+
#-keepattributes SourceFile,LineNumberTable
|
|
18
|
+
|
|
19
|
+
# If you keep the line number information, uncomment this to
|
|
20
|
+
# hide the original source file name.
|
|
21
|
+
#-renamesourcefileattribute SourceFile
|
|
@@ -28,21 +28,7 @@ public class Haptics {
|
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
public void vibrate(int duration) {
|
|
31
|
-
|
|
32
|
-
vibrator.vibrate(VibrationEffect.createOneShot(duration, VibrationEffect.DEFAULT_AMPLITUDE));
|
|
33
|
-
} else {
|
|
34
|
-
vibratePre26(duration);
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
@SuppressWarnings({ "deprecation" })
|
|
39
|
-
private void vibratePre26(int duration) {
|
|
40
|
-
vibrator.vibrate(duration);
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
@SuppressWarnings({ "deprecation" })
|
|
44
|
-
private void vibratePre26(long[] pattern) {
|
|
45
|
-
vibrator.vibrate(pattern, -1);
|
|
31
|
+
vibrator.vibrate(VibrationEffect.createOneShot(duration, VibrationEffect.DEFAULT_AMPLITUDE));
|
|
46
32
|
}
|
|
47
33
|
|
|
48
34
|
public void selectionStart() {
|
|
@@ -60,10 +46,6 @@ public class Haptics {
|
|
|
60
46
|
}
|
|
61
47
|
|
|
62
48
|
public void performHaptics(HapticsVibrationType type) {
|
|
63
|
-
|
|
64
|
-
vibrator.vibrate(VibrationEffect.createWaveform(type.getTimings(), type.getAmplitudes(), -1));
|
|
65
|
-
} else {
|
|
66
|
-
vibratePre26(type.getOldSDKPattern());
|
|
67
|
-
}
|
|
49
|
+
vibrator.vibrate(VibrationEffect.createWaveform(type.getTimings(), type.getAmplitudes(), -1));
|
|
68
50
|
}
|
|
69
51
|
}
|
package/android/src/main/java/com/capacitorjs/plugins/haptics/arguments/HapticsImpactType.java
CHANGED
|
@@ -1,20 +1,18 @@
|
|
|
1
1
|
package com.capacitorjs.plugins.haptics.arguments;
|
|
2
2
|
|
|
3
3
|
public enum HapticsImpactType implements HapticsVibrationType {
|
|
4
|
-
LIGHT("LIGHT", new long[] { 0, 50 }, new int[] { 0, 110 }
|
|
5
|
-
MEDIUM("MEDIUM", new long[] { 0, 43 }, new int[] { 0, 180 }
|
|
6
|
-
HEAVY("HEAVY", new long[] { 0, 60 }, new int[] { 0, 255 }
|
|
4
|
+
LIGHT("LIGHT", new long[] { 0, 50 }, new int[] { 0, 110 }),
|
|
5
|
+
MEDIUM("MEDIUM", new long[] { 0, 43 }, new int[] { 0, 180 }),
|
|
6
|
+
HEAVY("HEAVY", new long[] { 0, 60 }, new int[] { 0, 255 });
|
|
7
7
|
|
|
8
8
|
private final String type;
|
|
9
9
|
private final long[] timings;
|
|
10
10
|
private final int[] amplitudes;
|
|
11
|
-
private final long[] oldSDKPattern;
|
|
12
11
|
|
|
13
|
-
HapticsImpactType(String type, long[] timings, int[] amplitudes
|
|
12
|
+
HapticsImpactType(String type, long[] timings, int[] amplitudes) {
|
|
14
13
|
this.type = type;
|
|
15
14
|
this.timings = timings;
|
|
16
15
|
this.amplitudes = amplitudes;
|
|
17
|
-
this.oldSDKPattern = oldSDKPattern;
|
|
18
16
|
}
|
|
19
17
|
|
|
20
18
|
public static HapticsImpactType fromString(String style) {
|
|
@@ -35,9 +33,4 @@ public enum HapticsImpactType implements HapticsVibrationType {
|
|
|
35
33
|
public int[] getAmplitudes() {
|
|
36
34
|
return amplitudes;
|
|
37
35
|
}
|
|
38
|
-
|
|
39
|
-
@Override
|
|
40
|
-
public long[] getOldSDKPattern() {
|
|
41
|
-
return oldSDKPattern;
|
|
42
|
-
}
|
|
43
36
|
}
|
package/android/src/main/java/com/capacitorjs/plugins/haptics/arguments/HapticsNotificationType.java
CHANGED
|
@@ -1,25 +1,18 @@
|
|
|
1
1
|
package com.capacitorjs.plugins.haptics.arguments;
|
|
2
2
|
|
|
3
3
|
public enum HapticsNotificationType implements HapticsVibrationType {
|
|
4
|
-
SUCCESS("SUCCESS", new long[] { 0, 35, 65, 21 }, new int[] { 0, 250, 0, 180 }
|
|
5
|
-
WARNING(
|
|
6
|
-
|
|
7
|
-
new long[] { 0, 30, 40, 30, 50, 60 },
|
|
8
|
-
new int[] { 255, 255, 255, 255, 255, 255 },
|
|
9
|
-
new long[] { 0, 30, 40, 30, 50, 60 }
|
|
10
|
-
),
|
|
11
|
-
ERROR("ERROR", new long[] { 0, 27, 45, 50 }, new int[] { 0, 120, 0, 250 }, new long[] { 0, 27, 45, 50 });
|
|
4
|
+
SUCCESS("SUCCESS", new long[] { 0, 35, 65, 21 }, new int[] { 0, 250, 0, 180 }),
|
|
5
|
+
WARNING("WARNING", new long[] { 0, 30, 40, 30, 50, 60 }, new int[] { 255, 255, 255, 255, 255, 255 }),
|
|
6
|
+
ERROR("ERROR", new long[] { 0, 27, 45, 50 }, new int[] { 0, 120, 0, 250 });
|
|
12
7
|
|
|
13
8
|
private final String type;
|
|
14
9
|
private final long[] timings;
|
|
15
10
|
private final int[] amplitudes;
|
|
16
|
-
private final long[] oldSDKPattern;
|
|
17
11
|
|
|
18
|
-
HapticsNotificationType(String type, long[] timings, int[] amplitudes
|
|
12
|
+
HapticsNotificationType(String type, long[] timings, int[] amplitudes) {
|
|
19
13
|
this.type = type;
|
|
20
14
|
this.timings = timings;
|
|
21
15
|
this.amplitudes = amplitudes;
|
|
22
|
-
this.oldSDKPattern = oldSDKPattern;
|
|
23
16
|
}
|
|
24
17
|
|
|
25
18
|
public static HapticsNotificationType fromString(String type) {
|
|
@@ -40,9 +33,4 @@ public enum HapticsNotificationType implements HapticsVibrationType {
|
|
|
40
33
|
public int[] getAmplitudes() {
|
|
41
34
|
return amplitudes;
|
|
42
35
|
}
|
|
43
|
-
|
|
44
|
-
@Override
|
|
45
|
-
public long[] getOldSDKPattern() {
|
|
46
|
-
return oldSDKPattern;
|
|
47
|
-
}
|
|
48
36
|
}
|
package/android/src/main/java/com/capacitorjs/plugins/haptics/arguments/HapticsSelectionType.java
CHANGED
|
@@ -4,7 +4,6 @@ public class HapticsSelectionType implements HapticsVibrationType {
|
|
|
4
4
|
|
|
5
5
|
private static final long[] timings = { 0, 100 };
|
|
6
6
|
private static final int[] amplitudes = { 0, 100 };
|
|
7
|
-
private static final long[] oldSDKPattern = { 0, 70 };
|
|
8
7
|
|
|
9
8
|
@Override
|
|
10
9
|
public long[] getTimings() {
|
|
@@ -15,9 +14,4 @@ public class HapticsSelectionType implements HapticsVibrationType {
|
|
|
15
14
|
public int[] getAmplitudes() {
|
|
16
15
|
return amplitudes;
|
|
17
16
|
}
|
|
18
|
-
|
|
19
|
-
@Override
|
|
20
|
-
public long[] getOldSDKPattern() {
|
|
21
|
-
return oldSDKPattern;
|
|
22
|
-
}
|
|
23
17
|
}
|
package/dist/plugin.cjs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.cjs.js","sources":["esm/definitions.js","esm/index.js","esm/web.js"],"sourcesContent":["export var ImpactStyle;\n(function (ImpactStyle) {\n /**\n * A collision between large, heavy user interface elements\n *\n * @since 1.0.0\n */\n ImpactStyle[\"Heavy\"] = \"HEAVY\";\n /**\n * A collision between moderately sized user interface elements\n *\n * @since 1.0.0\n */\n ImpactStyle[\"Medium\"] = \"MEDIUM\";\n /**\n * A collision between small, light user interface elements\n *\n * @since 1.0.0\n */\n ImpactStyle[\"Light\"] = \"LIGHT\";\n})(ImpactStyle || (ImpactStyle = {}));\nexport var NotificationType;\n(function (NotificationType) {\n /**\n * A notification feedback type indicating that a task has completed successfully\n *\n * @since 1.0.0\n */\n NotificationType[\"Success\"] = \"SUCCESS\";\n /**\n * A notification feedback type indicating that a task has produced a warning\n *\n * @since 1.0.0\n */\n NotificationType[\"Warning\"] = \"WARNING\";\n /**\n * A notification feedback type indicating that a task has failed\n *\n * @since 1.0.0\n */\n NotificationType[\"Error\"] = \"ERROR\";\n})(NotificationType || (NotificationType = {}));\n//# sourceMappingURL=definitions.js.map","import { registerPlugin } from '@capacitor/core';\nconst Haptics = registerPlugin('Haptics', {\n web: () => import('./web').then((m) => new m.HapticsWeb()),\n});\nexport * from './definitions';\nexport { Haptics };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nimport { ImpactStyle, NotificationType } from './definitions';\nexport class HapticsWeb extends WebPlugin {\n constructor() {\n super(...arguments);\n this.selectionStarted = false;\n }\n async impact(options) {\n const pattern = this.patternForImpact(options === null || options === void 0 ? void 0 : options.style);\n this.vibrateWithPattern(pattern);\n }\n async notification(options) {\n const pattern = this.patternForNotification(options === null || options === void 0 ? void 0 : options.type);\n this.vibrateWithPattern(pattern);\n }\n async vibrate(options) {\n const duration = (options === null || options === void 0 ? void 0 : options.duration) || 300;\n this.vibrateWithPattern([duration]);\n }\n async selectionStart() {\n this.selectionStarted = true;\n }\n async selectionChanged() {\n if (this.selectionStarted) {\n this.vibrateWithPattern([70]);\n }\n }\n async selectionEnd() {\n this.selectionStarted = false;\n }\n patternForImpact(style = ImpactStyle.Heavy) {\n if (style === ImpactStyle.Medium) {\n return [43];\n }\n else if (style === ImpactStyle.Light) {\n return [20];\n }\n return [61];\n }\n patternForNotification(type = NotificationType.Success) {\n if (type === NotificationType.Warning) {\n return [30, 40, 30, 50, 60];\n }\n else if (type === NotificationType.Error) {\n return [27, 45, 50];\n }\n return [35, 65, 21];\n }\n vibrateWithPattern(pattern) {\n if (navigator.vibrate) {\n navigator.vibrate(pattern);\n }\n else {\n throw this.unavailable('Browser does not support the vibrate API');\n }\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["ImpactStyle","NotificationType","registerPlugin","WebPlugin"],"mappings":";;;;AAAWA;AACX,CAAC,UAAU,WAAW,EAAE;AACxB;AACA;AACA;AACA;AACA;AACA,IAAI,WAAW,CAAC,OAAO,CAAC,GAAG,OAAO;AAClC;AACA;AACA;AACA;AACA;AACA,IAAI,WAAW,CAAC,QAAQ,CAAC,GAAG,QAAQ;AACpC;AACA;AACA;AACA;AACA;AACA,IAAI,WAAW,CAAC,OAAO,CAAC,GAAG,OAAO;AAClC,CAAC,EAAEA,mBAAW,KAAKA,mBAAW,GAAG,EAAE,CAAC,CAAC;AAC1BC;AACX,CAAC,UAAU,gBAAgB,EAAE;AAC7B;AACA;AACA;AACA;AACA;AACA,IAAI,gBAAgB,CAAC,SAAS,CAAC,GAAG,SAAS;AAC3C;AACA;AACA;AACA;AACA;AACA,IAAI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YAAY,SAAS,CAAC,OAAO,CAAC,OAAO,CAAC;AACtC,QAAQ;AACR,aAAa;AACb,YAAY,MAAM,IAAI,CAAC,WAAW,CAAC,0CAA0C,CAAC;AAC9E,QAAQ;AACR,IAAI;AACJ
|
|
1
|
+
{"version":3,"file":"plugin.cjs.js","sources":["esm/definitions.js","esm/index.js","esm/web.js"],"sourcesContent":["export var ImpactStyle;\n(function (ImpactStyle) {\n /**\n * A collision between large, heavy user interface elements\n *\n * @since 1.0.0\n */\n ImpactStyle[\"Heavy\"] = \"HEAVY\";\n /**\n * A collision between moderately sized user interface elements\n *\n * @since 1.0.0\n */\n ImpactStyle[\"Medium\"] = \"MEDIUM\";\n /**\n * A collision between small, light user interface elements\n *\n * @since 1.0.0\n */\n ImpactStyle[\"Light\"] = \"LIGHT\";\n})(ImpactStyle || (ImpactStyle = {}));\nexport var NotificationType;\n(function (NotificationType) {\n /**\n * A notification feedback type indicating that a task has completed successfully\n *\n * @since 1.0.0\n */\n NotificationType[\"Success\"] = \"SUCCESS\";\n /**\n * A notification feedback type indicating that a task has produced a warning\n *\n * @since 1.0.0\n */\n NotificationType[\"Warning\"] = \"WARNING\";\n /**\n * A notification feedback type indicating that a task has failed\n *\n * @since 1.0.0\n */\n NotificationType[\"Error\"] = \"ERROR\";\n})(NotificationType || (NotificationType = {}));\n//# sourceMappingURL=definitions.js.map","import { registerPlugin } from '@capacitor/core';\nconst Haptics = registerPlugin('Haptics', {\n web: () => import('./web').then((m) => new m.HapticsWeb()),\n});\nexport * from './definitions';\nexport { Haptics };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nimport { ImpactStyle, NotificationType } from './definitions';\nexport class HapticsWeb extends WebPlugin {\n constructor() {\n super(...arguments);\n this.selectionStarted = false;\n }\n async impact(options) {\n const pattern = this.patternForImpact(options === null || options === void 0 ? void 0 : options.style);\n this.vibrateWithPattern(pattern);\n }\n async notification(options) {\n const pattern = this.patternForNotification(options === null || options === void 0 ? void 0 : options.type);\n this.vibrateWithPattern(pattern);\n }\n async vibrate(options) {\n const duration = (options === null || options === void 0 ? void 0 : options.duration) || 300;\n this.vibrateWithPattern([duration]);\n }\n async selectionStart() {\n this.selectionStarted = true;\n }\n async selectionChanged() {\n if (this.selectionStarted) {\n this.vibrateWithPattern([70]);\n }\n }\n async selectionEnd() {\n this.selectionStarted = false;\n }\n patternForImpact(style = ImpactStyle.Heavy) {\n if (style === ImpactStyle.Medium) {\n return [43];\n }\n else if (style === ImpactStyle.Light) {\n return [20];\n }\n return [61];\n }\n patternForNotification(type = NotificationType.Success) {\n if (type === NotificationType.Warning) {\n return [30, 40, 30, 50, 60];\n }\n else if (type === NotificationType.Error) {\n return [27, 45, 50];\n }\n return [35, 65, 21];\n }\n vibrateWithPattern(pattern) {\n if (navigator.vibrate) {\n navigator.vibrate(pattern);\n }\n else {\n throw this.unavailable('Browser does not support the vibrate API');\n }\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["ImpactStyle","NotificationType","registerPlugin","WebPlugin"],"mappings":";;;;AAAWA;AACX,CAAC,UAAU,WAAW,EAAE;AACxB;AACA;AACA;AACA;AACA;AACA,IAAI,WAAW,CAAC,OAAO,CAAC,GAAG,OAAO;AAClC;AACA;AACA;AACA;AACA;AACA,IAAI,WAAW,CAAC,QAAQ,CAAC,GAAG,QAAQ;AACpC;AACA;AACA;AACA;AACA;AACA,IAAI,WAAW,CAAC,OAAO,CAAC,GAAG,OAAO;AAClC,CAAC,EAAEA,mBAAW,KAAKA,mBAAW,GAAG,EAAE,CAAC,CAAC;AAC1BC;AACX,CAAC,UAAU,gBAAgB,EAAE;AAC7B;AACA;AACA;AACA;AACA;AACA,IAAI,gBAAgB,CAAC,SAAS,CAAC,GAAG,SAAS;AAC3C;AACA;AACA;AACA;AACA;AACA,IAAI,gBAAgB,CAAC,SAAS,CAAC,GAAG,SAAS;AAC3C;AACA;AACA;AACA;AACA;AACA,IAAI,gBAAgB,CAAC,OAAO,CAAC,GAAG,OAAO;AACv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C;AAC9E,QAAQ;AACR,IAAI;AACJ;;;;;;;"}
|
package/dist/plugin.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.js","sources":["esm/definitions.js","esm/index.js","esm/web.js"],"sourcesContent":["export var ImpactStyle;\n(function (ImpactStyle) {\n /**\n * A collision between large, heavy user interface elements\n *\n * @since 1.0.0\n */\n ImpactStyle[\"Heavy\"] = \"HEAVY\";\n /**\n * A collision between moderately sized user interface elements\n *\n * @since 1.0.0\n */\n ImpactStyle[\"Medium\"] = \"MEDIUM\";\n /**\n * A collision between small, light user interface elements\n *\n * @since 1.0.0\n */\n ImpactStyle[\"Light\"] = \"LIGHT\";\n})(ImpactStyle || (ImpactStyle = {}));\nexport var NotificationType;\n(function (NotificationType) {\n /**\n * A notification feedback type indicating that a task has completed successfully\n *\n * @since 1.0.0\n */\n NotificationType[\"Success\"] = \"SUCCESS\";\n /**\n * A notification feedback type indicating that a task has produced a warning\n *\n * @since 1.0.0\n */\n NotificationType[\"Warning\"] = \"WARNING\";\n /**\n * A notification feedback type indicating that a task has failed\n *\n * @since 1.0.0\n */\n NotificationType[\"Error\"] = \"ERROR\";\n})(NotificationType || (NotificationType = {}));\n//# sourceMappingURL=definitions.js.map","import { registerPlugin } from '@capacitor/core';\nconst Haptics = registerPlugin('Haptics', {\n web: () => import('./web').then((m) => new m.HapticsWeb()),\n});\nexport * from './definitions';\nexport { Haptics };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nimport { ImpactStyle, NotificationType } from './definitions';\nexport class HapticsWeb extends WebPlugin {\n constructor() {\n super(...arguments);\n this.selectionStarted = false;\n }\n async impact(options) {\n const pattern = this.patternForImpact(options === null || options === void 0 ? void 0 : options.style);\n this.vibrateWithPattern(pattern);\n }\n async notification(options) {\n const pattern = this.patternForNotification(options === null || options === void 0 ? void 0 : options.type);\n this.vibrateWithPattern(pattern);\n }\n async vibrate(options) {\n const duration = (options === null || options === void 0 ? void 0 : options.duration) || 300;\n this.vibrateWithPattern([duration]);\n }\n async selectionStart() {\n this.selectionStarted = true;\n }\n async selectionChanged() {\n if (this.selectionStarted) {\n this.vibrateWithPattern([70]);\n }\n }\n async selectionEnd() {\n this.selectionStarted = false;\n }\n patternForImpact(style = ImpactStyle.Heavy) {\n if (style === ImpactStyle.Medium) {\n return [43];\n }\n else if (style === ImpactStyle.Light) {\n return [20];\n }\n return [61];\n }\n patternForNotification(type = NotificationType.Success) {\n if (type === NotificationType.Warning) {\n return [30, 40, 30, 50, 60];\n }\n else if (type === NotificationType.Error) {\n return [27, 45, 50];\n }\n return [35, 65, 21];\n }\n vibrateWithPattern(pattern) {\n if (navigator.vibrate) {\n navigator.vibrate(pattern);\n }\n else {\n throw this.unavailable('Browser does not support the vibrate API');\n }\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["ImpactStyle","NotificationType","registerPlugin","WebPlugin"],"mappings":";;;AAAWA;IACX,CAAC,UAAU,WAAW,EAAE;IACxB;IACA;IACA;IACA;IACA;IACA,IAAI,WAAW,CAAC,OAAO,CAAC,GAAG,OAAO;IAClC;IACA;IACA;IACA;IACA;IACA,IAAI,WAAW,CAAC,QAAQ,CAAC,GAAG,QAAQ;IACpC;IACA;IACA;IACA;IACA;IACA,IAAI,WAAW,CAAC,OAAO,CAAC,GAAG,OAAO;IAClC,CAAC,EAAEA,mBAAW,KAAKA,mBAAW,GAAG,EAAE,CAAC,CAAC;AAC1BC;IACX,CAAC,UAAU,gBAAgB,EAAE;IAC7B;IACA;IACA;IACA;IACA;IACA,IAAI,gBAAgB,CAAC,SAAS,CAAC,GAAG,SAAS;IAC3C;IACA;IACA;IACA;IACA;IACA,IAAI,gBAAgB,CAAC,SAAS,CAAC,GAAG,SAAS;IAC3C;IACA;IACA;IACA;IACA;IACA,IAAI,gBAAgB,CAAC,OAAO,CAAC,GAAG,OAAO;IACvC,CAAC,EAAEA,wBAAgB,KAAKA,wBAAgB,GAAG,EAAE,CAAC,CAAC;;ACxC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esm/definitions.js","esm/index.js","esm/web.js"],"sourcesContent":["export var ImpactStyle;\n(function (ImpactStyle) {\n /**\n * A collision between large, heavy user interface elements\n *\n * @since 1.0.0\n */\n ImpactStyle[\"Heavy\"] = \"HEAVY\";\n /**\n * A collision between moderately sized user interface elements\n *\n * @since 1.0.0\n */\n ImpactStyle[\"Medium\"] = \"MEDIUM\";\n /**\n * A collision between small, light user interface elements\n *\n * @since 1.0.0\n */\n ImpactStyle[\"Light\"] = \"LIGHT\";\n})(ImpactStyle || (ImpactStyle = {}));\nexport var NotificationType;\n(function (NotificationType) {\n /**\n * A notification feedback type indicating that a task has completed successfully\n *\n * @since 1.0.0\n */\n NotificationType[\"Success\"] = \"SUCCESS\";\n /**\n * A notification feedback type indicating that a task has produced a warning\n *\n * @since 1.0.0\n */\n NotificationType[\"Warning\"] = \"WARNING\";\n /**\n * A notification feedback type indicating that a task has failed\n *\n * @since 1.0.0\n */\n NotificationType[\"Error\"] = \"ERROR\";\n})(NotificationType || (NotificationType = {}));\n//# sourceMappingURL=definitions.js.map","import { registerPlugin } from '@capacitor/core';\nconst Haptics = registerPlugin('Haptics', {\n web: () => import('./web').then((m) => new m.HapticsWeb()),\n});\nexport * from './definitions';\nexport { Haptics };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nimport { ImpactStyle, NotificationType } from './definitions';\nexport class HapticsWeb extends WebPlugin {\n constructor() {\n super(...arguments);\n this.selectionStarted = false;\n }\n async impact(options) {\n const pattern = this.patternForImpact(options === null || options === void 0 ? void 0 : options.style);\n this.vibrateWithPattern(pattern);\n }\n async notification(options) {\n const pattern = this.patternForNotification(options === null || options === void 0 ? void 0 : options.type);\n this.vibrateWithPattern(pattern);\n }\n async vibrate(options) {\n const duration = (options === null || options === void 0 ? void 0 : options.duration) || 300;\n this.vibrateWithPattern([duration]);\n }\n async selectionStart() {\n this.selectionStarted = true;\n }\n async selectionChanged() {\n if (this.selectionStarted) {\n this.vibrateWithPattern([70]);\n }\n }\n async selectionEnd() {\n this.selectionStarted = false;\n }\n patternForImpact(style = ImpactStyle.Heavy) {\n if (style === ImpactStyle.Medium) {\n return [43];\n }\n else if (style === ImpactStyle.Light) {\n return [20];\n }\n return [61];\n }\n patternForNotification(type = NotificationType.Success) {\n if (type === NotificationType.Warning) {\n return [30, 40, 30, 50, 60];\n }\n else if (type === NotificationType.Error) {\n return [27, 45, 50];\n }\n return [35, 65, 21];\n }\n vibrateWithPattern(pattern) {\n if (navigator.vibrate) {\n navigator.vibrate(pattern);\n }\n else {\n throw this.unavailable('Browser does not support the vibrate API');\n }\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["ImpactStyle","NotificationType","registerPlugin","WebPlugin"],"mappings":";;;AAAWA;IACX,CAAC,UAAU,WAAW,EAAE;IACxB;IACA;IACA;IACA;IACA;IACA,IAAI,WAAW,CAAC,OAAO,CAAC,GAAG,OAAO;IAClC;IACA;IACA;IACA;IACA;IACA,IAAI,WAAW,CAAC,QAAQ,CAAC,GAAG,QAAQ;IACpC;IACA;IACA;IACA;IACA;IACA,IAAI,WAAW,CAAC,OAAO,CAAC,GAAG,OAAO;IAClC,CAAC,EAAEA,mBAAW,KAAKA,mBAAW,GAAG,EAAE,CAAC,CAAC;AAC1BC;IACX,CAAC,UAAU,gBAAgB,EAAE;IAC7B;IACA;IACA;IACA;IACA;IACA,IAAI,gBAAgB,CAAC,SAAS,CAAC,GAAG,SAAS;IAC3C;IACA;IACA;IACA;IACA;IACA,IAAI,gBAAgB,CAAC,SAAS,CAAC,GAAG,SAAS;IAC3C;IACA;IACA;IACA;IACA;IACA,IAAI,gBAAgB,CAAC,OAAO,CAAC,GAAG,OAAO;IACvC,CAAC,EAAEA,wBAAgB,KAAKA,wBAAgB,GAAG,EAAE,CAAC,CAAC;;ACxC1C,UAAC,OAAO,GAAGC,mBAAc,CAAC,SAAS,EAAE;IAC1C,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IA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"description": "The Haptics API provides physical feedback to the user through touch or vibration.",
|
|
5
5
|
"main": "dist/plugin.cjs.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -13,7 +13,8 @@
|
|
|
13
13
|
"ios/Sources",
|
|
14
14
|
"ios/Tests",
|
|
15
15
|
"Package.swift",
|
|
16
|
-
"CapacitorHaptics.podspec"
|
|
16
|
+
"CapacitorHaptics.podspec",
|
|
17
|
+
"android/proguard-rules.pro"
|
|
17
18
|
],
|
|
18
19
|
"author": "Ionic <hi@ionicframework.com>",
|
|
19
20
|
"license": "MIT",
|
|
@@ -36,7 +37,7 @@
|
|
|
36
37
|
"verify:web": "npm run build",
|
|
37
38
|
"lint": "npm run eslint && npm run prettier -- --check && npm run swiftlint -- lint",
|
|
38
39
|
"fmt": "npm run eslint -- --fix && npm run prettier -- --write && npm run swiftlint -- --fix --format",
|
|
39
|
-
"eslint": "eslint .
|
|
40
|
+
"eslint": "eslint .",
|
|
40
41
|
"prettier": "prettier \"**/*.{css,html,ts,js,java}\" --plugin=prettier-plugin-java",
|
|
41
42
|
"swiftlint": "node-swiftlint",
|
|
42
43
|
"docgen": "docgen --api HapticsPlugin --output-readme README.md --output-json dist/docs.json",
|
|
@@ -47,11 +48,11 @@
|
|
|
47
48
|
"publish:cocoapod": "pod trunk push ./CapacitorHaptics.podspec --allow-warnings"
|
|
48
49
|
},
|
|
49
50
|
"devDependencies": {
|
|
50
|
-
"@capacitor/android": "
|
|
51
|
-
"@capacitor/core": "
|
|
52
|
-
"@capacitor/docgen": "^0.3.
|
|
53
|
-
"@capacitor/ios": "
|
|
54
|
-
"@ionic/eslint-config": "^0.
|
|
51
|
+
"@capacitor/android": "next",
|
|
52
|
+
"@capacitor/core": "next",
|
|
53
|
+
"@capacitor/docgen": "^0.3.1",
|
|
54
|
+
"@capacitor/ios": "next",
|
|
55
|
+
"@ionic/eslint-config": "^0.5.0",
|
|
55
56
|
"@ionic/prettier-config": "^4.0.0",
|
|
56
57
|
"@ionic/swiftlint-config": "^2.0.0",
|
|
57
58
|
"@semantic-release/changelog": "^6.0.3",
|
|
@@ -60,7 +61,7 @@
|
|
|
60
61
|
"@semantic-release/github": "^12.0.2",
|
|
61
62
|
"@semantic-release/npm": "^13.1.2",
|
|
62
63
|
"@types/node": "^24.10.1",
|
|
63
|
-
"eslint": "^
|
|
64
|
+
"eslint": "^10.0.0",
|
|
64
65
|
"prettier": "^3.6.2",
|
|
65
66
|
"prettier-plugin-java": "^2.7.7",
|
|
66
67
|
"rimraf": "^6.1.2",
|
|
@@ -70,13 +71,10 @@
|
|
|
70
71
|
"typescript": "^5.9.3"
|
|
71
72
|
},
|
|
72
73
|
"peerDependencies": {
|
|
73
|
-
"@capacitor/core": ">=
|
|
74
|
+
"@capacitor/core": ">=9.0.0-beta.0"
|
|
74
75
|
},
|
|
75
76
|
"prettier": "@ionic/prettier-config",
|
|
76
77
|
"swiftlint": "@ionic/swiftlint-config",
|
|
77
|
-
"eslintConfig": {
|
|
78
|
-
"extends": "@ionic/eslint-config/recommended"
|
|
79
|
-
},
|
|
80
78
|
"capacitor": {
|
|
81
79
|
"ios": {
|
|
82
80
|
"src": "ios"
|