@supermousejs/text 2.0.0 → 2.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/CHANGELOG.md +9 -0
- package/README.md +29 -0
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
package/README.md
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
|
|
2
|
+
# @supermousejs/text
|
|
3
|
+
|
|
4
|
+
Displays a contextual text label next to the cursor when hovering interactive elements.
|
|
5
|
+
|
|
6
|
+
## Installation
|
|
7
|
+
|
|
8
|
+
```bash
|
|
9
|
+
pnpm add @supermousejs/text
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## Usage
|
|
13
|
+
|
|
14
|
+
```ts
|
|
15
|
+
import { Supermouse } from '@supermousejs/core';
|
|
16
|
+
import { Text } from '@supermousejs/text';
|
|
17
|
+
|
|
18
|
+
const app = new Supermouse();
|
|
19
|
+
|
|
20
|
+
app.use(Text({
|
|
21
|
+
offset: [20, 20], // X, Y offset from cursor
|
|
22
|
+
duration: 200 // Fade duration
|
|
23
|
+
}));
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
**HTML:**
|
|
27
|
+
```html
|
|
28
|
+
<button data-supermouse-text="Click Me">Hover Here</button>
|
|
29
|
+
```
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@supermousejs/text",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.1",
|
|
4
4
|
"dependencies": {
|
|
5
|
-
"@supermousejs/core": "2.0.
|
|
6
|
-
"@supermousejs/utils": "2.0.
|
|
5
|
+
"@supermousejs/core": "2.0.1",
|
|
6
|
+
"@supermousejs/utils": "2.0.1"
|
|
7
7
|
},
|
|
8
8
|
"main": "dist/index.umd.js",
|
|
9
9
|
"module": "dist/index.mjs",
|