@symbiote-native/haptics 0.0.1
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 +43 -0
- package/package.json +19 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 A. Prokopenko
|
|
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,43 @@
|
|
|
1
|
+
# @symbiote-native/haptics
|
|
2
|
+
|
|
3
|
+
**Status: skeleton only — not implemented, published early to reserve the npm name.**
|
|
4
|
+
|
|
5
|
+
Planned port of [`expo-haptics`](https://docs.expo.dev/versions/latest/sdk/haptics/) for
|
|
6
|
+
[SymbioteNative](../../README.md) — vibration/haptic feedback via iOS's Taptic Engine and
|
|
7
|
+
Android's Vibrator API, reachable from every adapter (React, Vue, Angular), not just React.
|
|
8
|
+
Nothing is wired up yet: no `src/`, no dependencies, no build.
|
|
9
|
+
|
|
10
|
+
## Planned API
|
|
11
|
+
|
|
12
|
+
Free functions, no event stream, no per-instance state — upstream ships four async functions
|
|
13
|
+
and three enums, no subscribable feedback source. Signatures below are read straight from
|
|
14
|
+
`expo-haptics`'s `Haptics.ts`/`Haptics.types.ts` and are forward-looking reference only; nothing
|
|
15
|
+
here exists yet.
|
|
16
|
+
|
|
17
|
+
```ts
|
|
18
|
+
notificationAsync(type?: NotificationFeedbackType): Promise<void>
|
|
19
|
+
// Success/Warning/Error feedback — UINotificationFeedbackType on iOS, simulated via Vibrator on Android.
|
|
20
|
+
|
|
21
|
+
impactAsync(style?: ImpactFeedbackStyle): Promise<void>
|
|
22
|
+
// Collision-weight feedback (Light/Medium/Heavy/Soft/Rigid) — UIImpactFeedbackStyle on iOS, simulated via Vibrator on Android.
|
|
23
|
+
|
|
24
|
+
selectionAsync(): Promise<void>
|
|
25
|
+
// Lets the user know a selection change was registered.
|
|
26
|
+
|
|
27
|
+
performAndroidHapticsAsync(type: AndroidHaptics): Promise<void>
|
|
28
|
+
// Android only — no-ops on other platforms. Uses the device haptics engine directly, unlike the Vibrator-based impactAsync.
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Plus the `NotificationFeedbackType`, `ImpactFeedbackStyle`, and `AndroidHaptics` enums ported
|
|
32
|
+
from upstream's `Haptics.types.ts`.
|
|
33
|
+
|
|
34
|
+
## Reference
|
|
35
|
+
|
|
36
|
+
- [`@symbiote-native/local-auth`](../local-auth) — the nearest already-implemented sibling
|
|
37
|
+
package; shows the shape this package will take once it moves past skeleton (three-entry
|
|
38
|
+
`exports` map, `core`/`react`/`vue`/`angular` split, `expo-modules-core` dependency).
|
|
39
|
+
- The `symbiote-expo-native-module` project skill
|
|
40
|
+
(`../../.claude/skills/symbiote-expo-native-module/SKILL.md`) — the real wrapping mechanics
|
|
41
|
+
(depend on `expo-modules-core` only, never the `expo` meta-package; port the JS into `core/`
|
|
42
|
+
rather than importing upstream's; how autolinking picks up the native module) that will apply
|
|
43
|
+
when implementation starts.
|
package/package.json
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@symbiote-native/haptics",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "expo-haptics wrapped for SymbioteNative — one framework-agnostic core, built once and reachable from the React, Vue, and Angular adapters. Impact/notification/selection vibration feedback via iOS's Taptic Engine and Android's Vibrator API.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/OneEyed1366/symbiote-native.git",
|
|
9
|
+
"directory": "packages/haptics"
|
|
10
|
+
},
|
|
11
|
+
"homepage": "https://github.com/OneEyed1366/symbiote-native/tree/master/packages/haptics#readme",
|
|
12
|
+
"bugs": {
|
|
13
|
+
"url": "https://github.com/OneEyed1366/symbiote-native/issues"
|
|
14
|
+
},
|
|
15
|
+
"author": "Andrey Prokopenko <psevdoproger@gmail.com>",
|
|
16
|
+
"publishConfig": {
|
|
17
|
+
"access": "public"
|
|
18
|
+
}
|
|
19
|
+
}
|