@furystack/shades-nipple 7.0.32 → 7.0.33
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/CHANGELOG.md +8 -81
- package/README.md +75 -0
- package/package.json +4 -4
- package/readme.md +0 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,88 +1,15 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Changelog
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
3
|
+
## [7.0.33] - 2026-01-22
|
|
5
4
|
|
|
6
|
-
###
|
|
5
|
+
### ⬆️ Dependencies
|
|
7
6
|
|
|
8
|
-
|
|
7
|
+
- Dependency updates
|
|
9
8
|
|
|
10
|
-
###
|
|
9
|
+
### 📚 Documentation
|
|
11
10
|
|
|
12
|
-
|
|
11
|
+
- Added detailed README with component documentation and usage examples
|
|
13
12
|
|
|
14
|
-
###
|
|
13
|
+
### 🔧 Chores
|
|
15
14
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
### [1.3.13](https://github.com/furystack/furystack/compare/@furystack/shades-nipple@1.3.12...@furystack/shades-nipple@1.3.13) (2022-01-10)
|
|
19
|
-
|
|
20
|
-
**Note:** Version bump only for package @furystack/shades-nipple
|
|
21
|
-
|
|
22
|
-
### [1.3.12](https://github.com/furystack/furystack/compare/@furystack/shades-nipple@1.3.11...@furystack/shades-nipple@1.3.12) (2021-12-20)
|
|
23
|
-
|
|
24
|
-
**Note:** Version bump only for package @furystack/shades-nipple
|
|
25
|
-
|
|
26
|
-
### [1.3.11](https://github.com/furystack/furystack/compare/@furystack/shades-nipple@1.3.10...@furystack/shades-nipple@1.3.11) (2021-12-08)
|
|
27
|
-
|
|
28
|
-
### 🐛 Bug Fixes
|
|
29
|
-
|
|
30
|
-
- **@furystack/shades-nipple:** fix passing down managerOptions ([#163](https://github.com/furystack/furystack/issues/163)) ([928f44a](https://github.com/furystack/furystack/commit/928f44a13c4e2159ff61848b699e295988693239))
|
|
31
|
-
|
|
32
|
-
### [1.3.10](https://github.com/furystack/furystack/compare/@furystack/shades-nipple@1.3.9...@furystack/shades-nipple@1.3.10) (2021-11-30)
|
|
33
|
-
|
|
34
|
-
**Note:** Version bump only for package @furystack/shades-nipple
|
|
35
|
-
|
|
36
|
-
### [1.3.9](https://github.com/furystack/furystack/compare/@furystack/shades-nipple@1.3.8...@furystack/shades-nipple@1.3.9) (2021-11-29)
|
|
37
|
-
|
|
38
|
-
**Note:** Version bump only for package @furystack/shades-nipple
|
|
39
|
-
|
|
40
|
-
### [1.3.8](https://github.com/furystack/furystack/compare/@furystack/shades-nipple@1.3.7...@furystack/shades-nipple@1.3.8) (2021-11-19)
|
|
41
|
-
|
|
42
|
-
**Note:** Version bump only for package @furystack/shades-nipple
|
|
43
|
-
|
|
44
|
-
### [1.3.7](https://github.com/furystack/furystack/compare/@furystack/shades-nipple@1.3.6...@furystack/shades-nipple@1.3.7) (2021-11-17)
|
|
45
|
-
|
|
46
|
-
**Note:** Version bump only for package @furystack/shades-nipple
|
|
47
|
-
|
|
48
|
-
### [1.3.6](https://github.com/furystack/furystack/compare/@furystack/shades-nipple@1.3.5...@furystack/shades-nipple@1.3.6) (2021-11-09)
|
|
49
|
-
|
|
50
|
-
**Note:** Version bump only for package @furystack/shades-nipple
|
|
51
|
-
|
|
52
|
-
### [1.3.5](https://github.com/furystack/furystack/compare/@furystack/shades-nipple@1.3.4...@furystack/shades-nipple@1.3.5) (2021-10-15)
|
|
53
|
-
|
|
54
|
-
**Note:** Version bump only for package @furystack/shades-nipple
|
|
55
|
-
|
|
56
|
-
### [1.3.4](https://github.com/furystack/furystack/compare/@furystack/shades-nipple@1.3.3...@furystack/shades-nipple@1.3.4) (2021-10-05)
|
|
57
|
-
|
|
58
|
-
**Note:** Version bump only for package @furystack/shades-nipple
|
|
59
|
-
|
|
60
|
-
### [1.3.3](https://github.com/furystack/furystack/compare/@furystack/shades-nipple@1.3.2...@furystack/shades-nipple@1.3.3) (2021-09-16)
|
|
61
|
-
|
|
62
|
-
**Note:** Version bump only for package @furystack/shades-nipple
|
|
63
|
-
|
|
64
|
-
### [1.3.2](https://github.com/furystack/furystack/compare/@furystack/shades-nipple@1.3.1...@furystack/shades-nipple@1.3.2) (2021-08-27)
|
|
65
|
-
|
|
66
|
-
**Note:** Version bump only for package @furystack/shades-nipple
|
|
67
|
-
|
|
68
|
-
### [1.3.1](https://github.com/furystack/furystack/compare/@furystack/shades-nipple@1.3.0...@furystack/shades-nipple@1.3.1) (2021-08-19)
|
|
69
|
-
|
|
70
|
-
**Note:** Version bump only for package @furystack/shades-nipple
|
|
71
|
-
|
|
72
|
-
## 1.3.0 (2021-08-19)
|
|
73
|
-
|
|
74
|
-
### 🚀 What's new
|
|
75
|
-
|
|
76
|
-
- **project:** re-added Shades ([#120](https://github.com/furystack/furystack/issues/120)) ([9f58174](https://github.com/furystack/furystack/commit/9f58174b3762fd4e4106f48215a72ec295cf2553))
|
|
77
|
-
|
|
78
|
-
## 1.2.0 (2021-07-31)
|
|
79
|
-
|
|
80
|
-
### 🚀 What's new
|
|
81
|
-
|
|
82
|
-
- **project:** re-added Shades ([#120](https://github.com/furystack/furystack/issues/120)) ([9f58174](https://github.com/furystack/furystack/commit/9f58174b3762fd4e4106f48215a72ec295cf2553))
|
|
83
|
-
|
|
84
|
-
## 1.1.0 (2021-07-30)
|
|
85
|
-
|
|
86
|
-
### 🚀 What's new
|
|
87
|
-
|
|
88
|
-
- **project:** re-added Shades ([#120](https://github.com/furystack/furystack/issues/120)) ([9f58174](https://github.com/furystack/furystack/commit/9f58174b3762fd4e4106f48215a72ec295cf2553))
|
|
15
|
+
- Migrated to centralized changelog management system
|
package/README.md
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
# @furystack/shades-nipple
|
|
2
|
+
|
|
3
|
+
NippleJS joystick wrapper for FuryStack Shades.
|
|
4
|
+
|
|
5
|
+
This package provides a Shades component wrapper for [NippleJS](https://yoannmoi.net/nipplejs/), a virtual joystick library for touch devices.
|
|
6
|
+
|
|
7
|
+
## Installation
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install @furystack/shades-nipple nipplejs
|
|
11
|
+
# or
|
|
12
|
+
yarn add @furystack/shades-nipple nipplejs
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Usage
|
|
16
|
+
|
|
17
|
+
```tsx
|
|
18
|
+
import { Shade, createComponent } from '@furystack/shades'
|
|
19
|
+
import { NippleComponent } from '@furystack/shades-nipple'
|
|
20
|
+
|
|
21
|
+
const GameControls = Shade({
|
|
22
|
+
shadowDomName: 'game-controls',
|
|
23
|
+
render: () => (
|
|
24
|
+
<NippleComponent
|
|
25
|
+
managerOptions={{
|
|
26
|
+
mode: 'static',
|
|
27
|
+
position: { left: '50%', top: '50%' },
|
|
28
|
+
color: 'blue',
|
|
29
|
+
}}
|
|
30
|
+
style={{ width: '200px', height: '200px', position: 'relative' }}
|
|
31
|
+
onStart={(evt, data) => {
|
|
32
|
+
console.log('Joystick started', data)
|
|
33
|
+
}}
|
|
34
|
+
onMove={(evt, data) => {
|
|
35
|
+
console.log('Direction:', data.direction?.angle)
|
|
36
|
+
console.log('Distance:', data.distance)
|
|
37
|
+
console.log('Force:', data.force)
|
|
38
|
+
}}
|
|
39
|
+
onEnd={(evt, data) => {
|
|
40
|
+
console.log('Joystick released')
|
|
41
|
+
}}
|
|
42
|
+
onDir={(evt, data) => {
|
|
43
|
+
// Fired when direction changes (up, down, left, right)
|
|
44
|
+
console.log('Direction changed:', data.direction?.angle)
|
|
45
|
+
}}
|
|
46
|
+
/>
|
|
47
|
+
),
|
|
48
|
+
})
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Props
|
|
52
|
+
|
|
53
|
+
| Prop | Type | Description |
|
|
54
|
+
| ---------------- | ------------------------ | -------------------------------------------- |
|
|
55
|
+
| `managerOptions` | `JoystickManagerOptions` | NippleJS manager options (see NippleJS docs) |
|
|
56
|
+
| `style` | `CSSStyleDeclaration` | Inline styles for the container |
|
|
57
|
+
| `onStart` | `(evt, data) => void` | Called when the joystick is pressed |
|
|
58
|
+
| `onEnd` | `(evt, data) => void` | Called when the joystick is released |
|
|
59
|
+
| `onMove` | `(evt, data) => void` | Called while the joystick is being moved |
|
|
60
|
+
| `onDir` | `(evt, data) => void` | Called when direction changes |
|
|
61
|
+
|
|
62
|
+
## Manager Options
|
|
63
|
+
|
|
64
|
+
Common `managerOptions` properties:
|
|
65
|
+
|
|
66
|
+
| Option | Type | Description |
|
|
67
|
+
| ----------- | --------------------------------- | ----------------------------------------- |
|
|
68
|
+
| `mode` | `'static' \| 'semi' \| 'dynamic'` | Joystick behavior mode |
|
|
69
|
+
| `position` | `{ left: string, top: string }` | Position for static mode |
|
|
70
|
+
| `color` | `string` | Joystick color |
|
|
71
|
+
| `size` | `number` | Joystick size in pixels |
|
|
72
|
+
| `threshold` | `number` | Minimum distance before triggering events |
|
|
73
|
+
| `fadeTime` | `number` | Fade animation duration |
|
|
74
|
+
|
|
75
|
+
See the [NippleJS documentation](https://yoannmoi.net/nipplejs/) for all available options.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@furystack/shades-nipple",
|
|
3
|
-
"version": "7.0.
|
|
3
|
+
"version": "7.0.33",
|
|
4
4
|
"description": "A Nipple component wrapper for FuryStack Shades",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
@@ -28,12 +28,12 @@
|
|
|
28
28
|
"author": "gallay.lajos@gmail.com",
|
|
29
29
|
"license": "GPL-2.0",
|
|
30
30
|
"devDependencies": {
|
|
31
|
-
"@furystack/inject": "^12.0.
|
|
31
|
+
"@furystack/inject": "^12.0.26",
|
|
32
32
|
"typescript": "^5.9.3",
|
|
33
|
-
"vitest": "^4.0.
|
|
33
|
+
"vitest": "^4.0.17"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@furystack/shades": "^11.0.
|
|
36
|
+
"@furystack/shades": "^11.0.33",
|
|
37
37
|
"nipplejs": "^0.10.2"
|
|
38
38
|
},
|
|
39
39
|
"gitHead": "76e1d17a71b981984935c9a7a5791cf61ebf5213"
|