macos-haptics 1.0.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/LICENSE +21 -0
- package/README.md +42 -0
- package/index.js +3 -0
- package/package.json +48 -0
- package/prebuilds/macos-haptics.node +0 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Eliott Vincent
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# macOS Haptics
|
|
2
|
+
|
|
3
|
+
[](https://github.com/eliottvincent/macos-haptics/actions) [](https://www.npmjs.com/package/macos-haptics) [](https://www.npmjs.com/package/macos-haptics)
|
|
4
|
+
|
|
5
|
+
Native macOS trackpad haptic feedback for Node.js.
|
|
6
|
+
|
|
7
|
+
The package ships a prebuilt universal binary for Apple Silicon and Intel Macs.
|
|
8
|
+
|
|
9
|
+
## Installation
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
npm install macos-haptics
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
For applications that also run outside macOS, install it as an optional dependency:
|
|
16
|
+
|
|
17
|
+
```sh
|
|
18
|
+
npm install --save-optional macos-haptics
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Usage
|
|
22
|
+
|
|
23
|
+
```js
|
|
24
|
+
const haptics = require("macos-haptics");
|
|
25
|
+
|
|
26
|
+
haptics.performAlignment();
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Feedback is produced by the current input device when supported by macOS and the
|
|
30
|
+
user's hardware and settings.
|
|
31
|
+
|
|
32
|
+
## API
|
|
33
|
+
|
|
34
|
+
### `performAlignment()`
|
|
35
|
+
|
|
36
|
+
Performs the standard macOS alignment feedback pattern at the system-selected
|
|
37
|
+
time.
|
|
38
|
+
|
|
39
|
+
## License
|
|
40
|
+
|
|
41
|
+
macos-haptics is released under the MIT License. See the bundled LICENSE file
|
|
42
|
+
for details.
|
package/index.js
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "macos-haptics",
|
|
3
|
+
"version": "1.0.2",
|
|
4
|
+
"description": "Native macOS trackpad haptic feedback for Node.js",
|
|
5
|
+
"author": "Eliott Vincent <dev@eliottvincent.com>",
|
|
6
|
+
"main": "index.js",
|
|
7
|
+
"homepage": "https://github.com/eliottvincent/macos-haptics",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git://github.com/eliottvincent/macos-haptics"
|
|
11
|
+
},
|
|
12
|
+
"bugs": {
|
|
13
|
+
"url": "https://github.com/eliottvincent/macos-haptics/issues"
|
|
14
|
+
},
|
|
15
|
+
"engines": {
|
|
16
|
+
"node": ">=20.0.0"
|
|
17
|
+
},
|
|
18
|
+
"os": [
|
|
19
|
+
"darwin"
|
|
20
|
+
],
|
|
21
|
+
"cpu": [
|
|
22
|
+
"arm64",
|
|
23
|
+
"x64"
|
|
24
|
+
],
|
|
25
|
+
"files": [
|
|
26
|
+
"index.js",
|
|
27
|
+
"prebuilds/macos-haptics.node"
|
|
28
|
+
],
|
|
29
|
+
"scripts": {
|
|
30
|
+
"build": "node-gyp rebuild --directory native",
|
|
31
|
+
"clean": "node-gyp clean --directory native"
|
|
32
|
+
},
|
|
33
|
+
"devDependencies": {
|
|
34
|
+
"node-gyp": "12.4.0"
|
|
35
|
+
},
|
|
36
|
+
"keywords": [
|
|
37
|
+
"apple",
|
|
38
|
+
"haptic",
|
|
39
|
+
"haptics",
|
|
40
|
+
"mac",
|
|
41
|
+
"macos",
|
|
42
|
+
"native",
|
|
43
|
+
"node",
|
|
44
|
+
"taptic",
|
|
45
|
+
"trackpad"
|
|
46
|
+
],
|
|
47
|
+
"license": "MIT"
|
|
48
|
+
}
|
|
Binary file
|