browser-haptic 1.0.3 → 1.0.4
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/README.md +21 -2
- package/package.json +11 -4
package/README.md
CHANGED
|
@@ -1,19 +1,38 @@
|
|
|
1
1
|
# browser-haptic
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[](https://www.npmjs.com/package/browser-haptic)
|
|
4
|
+
[](https://www.npmjs.com/package/browser-haptic)
|
|
5
|
+
[](https://opensource.org/licenses/MIT)
|
|
6
|
+
|
|
7
|
+
Lightweight haptic feedback for JavaScript. Uses the [Vibration API](https://developer.mozilla.org/en-US/docs/Web/API/Vibration_API) where available (e.g. Android). On **iOS Safari 17.4+** it uses a hidden `input[switch]` toggle so the native switch haptic fires. No runtime dependencies.
|
|
8
|
+
|
|
9
|
+
- [Install](#install)
|
|
10
|
+
- [Usage](#usage)
|
|
11
|
+
- [API](#api)
|
|
12
|
+
- [Contributing](#contributing)
|
|
4
13
|
|
|
5
14
|
## Install
|
|
6
15
|
|
|
7
|
-
|
|
16
|
+
**npm**
|
|
8
17
|
|
|
9
18
|
```bash
|
|
10
19
|
npm install browser-haptic
|
|
11
20
|
```
|
|
12
21
|
|
|
22
|
+
**bun**
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
bun add browser-haptic
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
**pnpm**
|
|
29
|
+
|
|
13
30
|
```bash
|
|
14
31
|
pnpm add browser-haptic
|
|
15
32
|
```
|
|
16
33
|
|
|
34
|
+
**yarn**
|
|
35
|
+
|
|
17
36
|
```bash
|
|
18
37
|
yarn add browser-haptic
|
|
19
38
|
```
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "browser-haptic",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "Lightweight haptic feedback for
|
|
3
|
+
"version": "1.0.4",
|
|
4
|
+
"description": "Lightweight haptic feedback for web apps. Vibration API (Android) + iOS Safari 17.4+ switch fallback. Zero dependencies.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
@@ -31,13 +31,20 @@
|
|
|
31
31
|
"keywords": [
|
|
32
32
|
"browser-haptic",
|
|
33
33
|
"haptic",
|
|
34
|
+
"haptic-feedback",
|
|
34
35
|
"vibration",
|
|
35
36
|
"vibrate",
|
|
37
|
+
"vibration-api",
|
|
36
38
|
"ios",
|
|
37
39
|
"safari",
|
|
38
|
-
"
|
|
40
|
+
"android",
|
|
39
41
|
"mobile",
|
|
40
|
-
"
|
|
42
|
+
"mobile-web",
|
|
43
|
+
"pwa",
|
|
44
|
+
"tactile",
|
|
45
|
+
"touch-feedback",
|
|
46
|
+
"ux",
|
|
47
|
+
"zero-dependencies"
|
|
41
48
|
],
|
|
42
49
|
"license": "MIT",
|
|
43
50
|
"author": {
|