browser-haptic 1.0.4 → 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.
Files changed (2) hide show
  1. package/README.md +7 -0
  2. package/package.json +5 -6
package/README.md CHANGED
@@ -6,9 +6,12 @@
6
6
 
7
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
8
 
9
+ **[Try the playground →](https://playground-neon-gamma.vercel.app)** — live demo, install commands, and code samples for React, Vue, Svelte, Angular, and TypeScript.
10
+
9
11
  - [Install](#install)
10
12
  - [Usage](#usage)
11
13
  - [API](#api)
14
+ - [Playground](#playground)
12
15
  - [Contributing](#contributing)
13
16
 
14
17
  ## Install
@@ -87,6 +90,10 @@ You can also use named imports if you prefer: `import { light, success, isSuppor
87
90
 
88
91
  On iOS Safari 17.4+, `isSupported()` is `true` but `hasVibration()` is `false`; the library uses a hidden native switch toggle.
89
92
 
93
+ ## Playground
94
+
95
+ A live demo and docs site is available at **[playground-neon-gamma.vercel.app](https://playground-neon-gamma.vercel.app)**. You can try haptic feedback in the browser, copy install commands, and see framework-specific examples (React, Vue, Svelte, Angular, TypeScript). The playground source lives in the `playground/` directory of this repo.
96
+
90
97
  ## Contributing
91
98
 
92
99
  Contributions are welcome. To get started:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "browser-haptic",
3
- "version": "1.0.4",
3
+ "version": "1.0.8",
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",
@@ -22,10 +22,9 @@
22
22
  "clean": "node -e \"require('fs').rmSync('dist',{recursive:true,force:true})\"",
23
23
  "build": "bun run clean && tsc",
24
24
  "prepublishOnly": "bun run build",
25
- "version:patch": "bun scripts/bump.js patch",
26
- "version:minor": "bun scripts/bump.js minor",
27
- "version:major": "bun scripts/bump.js major",
28
- "tag": "node -e \"const v=require('./package.json').version; require('child_process').execSync('git tag -a v'+v+' -m \\\"Release v'+v+'\\\"', {stdio:'inherit'})\""
25
+ "version:patch": "./scripts/bump.sh patch",
26
+ "version:minor": "./scripts/bump.sh minor",
27
+ "version:major": "./scripts/bump.sh major"
29
28
  },
30
29
  "packageManager": "bun",
31
30
  "keywords": [
@@ -56,7 +55,7 @@
56
55
  "type": "git",
57
56
  "url": "https://github.com/KemalEmirhan/browser-haptic.git"
58
57
  },
59
- "homepage": "https://github.com/KemalEmirhan/browser-haptic#readme",
58
+ "homepage": "https://playground-neon-gamma.vercel.app",
60
59
  "bugs": {
61
60
  "url": "https://github.com/KemalEmirhan/browser-haptic/issues"
62
61
  },